aboutsummaryrefslogtreecommitdiff
path: root/tests/bullet
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-04-21 17:55:35 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-04-21 17:55:35 -0700
commit887ce3dde89410d012a708c3ec454f679b2e5b1e (patch)
treedaeadbc86bf721a5d4fff109a1d87a4c69215905 /tests/bullet
parentb3f4022e35b34002f44aacde554cc8b3ea927500 (diff)
update bullet test to compile from source
Diffstat (limited to 'tests/bullet')
-rw-r--r--tests/bullet/AUTHORS22
-rw-r--r--tests/bullet/BulletLicense.txt18
-rw-r--r--tests/bullet/CMakeLists.txt338
-rw-r--r--tests/bullet/COPYING340
-rw-r--r--tests/bullet/ChangeLog779
-rw-r--r--tests/bullet/Demos/HelloWorld/HelloWorld.cpp172
-rw-r--r--tests/bullet/Doxyfile768
-rw-r--r--tests/bullet/Extras/CMakeLists.txt7
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/CMakeLists.txt64
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.cpp373
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.h112
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.cpp375
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.h220
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/bestfit.cpp466
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/bestfit.h65
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/bestfitobb.cpp173
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/bestfitobb.h43
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/cd_hull.cpp3260
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/cd_hull.h153
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/cd_vector.h1185
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/cd_wavefront.cpp860
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/cd_wavefront.h62
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/concavity.cpp795
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/concavity.h60
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/fitsphere.cpp202
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/fitsphere.h43
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/float_math.cpp257
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/float_math.h72
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/meshvolume.cpp128
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/meshvolume.h45
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/planetri.cpp238
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/planetri.h58
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/raytri.cpp134
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/raytri.h45
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/splitplane.cpp306
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/splitplane.h59
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/vlookup.cpp326
-rw-r--r--tests/bullet/Extras/ConvexDecomposition/vlookup.h119
-rw-r--r--tests/bullet/Extras/Makefile.am78
-rw-r--r--tests/bullet/Extras/Makefile.in1287
-rw-r--r--tests/bullet/Extras/glui/CMakeLists.txt66
-rw-r--r--tests/bullet/Extras/glui/GL/glui.h2723
-rw-r--r--tests/bullet/Extras/glui/algebra3.cpp1609
-rw-r--r--tests/bullet/Extras/glui/algebra3.h475
-rw-r--r--tests/bullet/Extras/glui/arcball.cpp237
-rw-r--r--tests/bullet/Extras/glui/arcball.h97
-rw-r--r--tests/bullet/Extras/glui/glui.cpp2171
-rw-r--r--tests/bullet/Extras/glui/glui_add_controls.cpp319
-rw-r--r--tests/bullet/Extras/glui/glui_bitmap_img_data.cpp138
-rw-r--r--tests/bullet/Extras/glui/glui_bitmaps.cpp176
-rw-r--r--tests/bullet/Extras/glui/glui_button.cpp186
-rw-r--r--tests/bullet/Extras/glui/glui_checkbox.cpp188
-rw-r--r--tests/bullet/Extras/glui/glui_column.cpp89
-rw-r--r--tests/bullet/Extras/glui/glui_commandline.cpp197
-rw-r--r--tests/bullet/Extras/glui/glui_control.cpp1203
-rw-r--r--tests/bullet/Extras/glui/glui_edittext.cpp1198
-rw-r--r--tests/bullet/Extras/glui/glui_filebrowser.cpp165
-rw-r--r--tests/bullet/Extras/glui/glui_internal.h107
-rw-r--r--tests/bullet/Extras/glui/glui_internal_control.h45
-rw-r--r--tests/bullet/Extras/glui/glui_list.cpp542
-rw-r--r--tests/bullet/Extras/glui/glui_listbox.cpp448
-rw-r--r--tests/bullet/Extras/glui/glui_mouse_iaction.cpp210
-rw-r--r--tests/bullet/Extras/glui/glui_node.cpp212
-rw-r--r--tests/bullet/Extras/glui/glui_panel.cpp186
-rw-r--r--tests/bullet/Extras/glui/glui_radio.cpp362
-rw-r--r--tests/bullet/Extras/glui/glui_rollout.cpp275
-rw-r--r--tests/bullet/Extras/glui/glui_rotation.cpp473
-rw-r--r--tests/bullet/Extras/glui/glui_scrollbar.cpp832
-rw-r--r--tests/bullet/Extras/glui/glui_separator.cpp75
-rw-r--r--tests/bullet/Extras/glui/glui_spinner.cpp630
-rw-r--r--tests/bullet/Extras/glui/glui_statictext.cpp105
-rw-r--r--tests/bullet/Extras/glui/glui_string.cpp62
-rw-r--r--tests/bullet/Extras/glui/glui_textbox.cpp1108
-rw-r--r--tests/bullet/Extras/glui/glui_translation.cpp559
-rw-r--r--tests/bullet/Extras/glui/glui_tree.cpp278
-rw-r--r--tests/bullet/Extras/glui/glui_treepanel.cpp388
-rw-r--r--tests/bullet/Extras/glui/glui_window.cpp44
-rw-r--r--tests/bullet/Extras/glui/quaternion.cpp243
-rw-r--r--tests/bullet/Extras/glui/quaternion.h114
-rw-r--r--tests/bullet/Extras/glui/readme.txt228
-rw-r--r--tests/bullet/INSTALL111
-rw-r--r--tests/bullet/LICENSE19
-rw-r--r--tests/bullet/Makefile.am7
-rw-r--r--tests/bullet/Makefile.in672
-rw-r--r--tests/bullet/NEWS4
-rw-r--r--tests/bullet/README6
-rw-r--r--tests/bullet/RELEASING.TXT34
-rw-r--r--tests/bullet/VERSION1
-rw-r--r--tests/bullet/acinclude.m43054
-rw-r--r--tests/bullet/aclocal.m48795
-rwxr-xr-xtests/bullet/autogen.sh61
-rw-r--r--tests/bullet/bullet.pc.cmake6
-rw-r--r--tests/bullet/bullet.pc.in11
-rw-r--r--tests/bullet/bulletTest.ll192958
-rwxr-xr-xtests/bullet/compile142
-rwxr-xr-xtests/bullet/config.guess1500
-rw-r--r--tests/bullet/config.h.in99
-rwxr-xr-xtests/bullet/config.sub1616
-rwxr-xr-xtests/bullet/configure18392
-rw-r--r--tests/bullet/configure.ac160
-rw-r--r--tests/bullet/convex0.binbin0 -> 548 bytes
-rwxr-xr-xtests/bullet/depcomp584
-rw-r--r--tests/bullet/file.obj3578
-rwxr-xr-xtests/bullet/install-sh322
-rw-r--r--tests/bullet/lib/readme.txt13
-rwxr-xr-xtests/bullet/ltmain.sh7874
-rwxr-xr-xtests/bullet/missing367
-rw-r--r--tests/bullet/output.txt470
-rw-r--r--tests/bullet/readme.txt29
-rw-r--r--tests/bullet/src/Bullet-C-Api.h176
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp37
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h1051
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h82
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp17
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h270
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp23
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h80
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.cpp1295
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.h1256
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp796
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h146
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp22
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.h110
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp489
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h151
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp633
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h469
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h40
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp1375
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h579
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp349
-rw-r--r--tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h171
-rw-r--r--tests/bullet/src/BulletCollision/CMakeLists.txt279
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp201
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h51
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp47
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h36
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp435
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h66
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp85
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h66
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp718
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.h44
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h48
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h45
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp310
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h172
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp116
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.h524
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp1513
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.h509
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp353
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h86
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp247
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h95
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp312
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h116
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp679
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h109
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp155
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h84
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp298
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h135
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp34
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h54
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.cpp171
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.h175
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp842
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h46
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp135
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.h128
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp443
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h81
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp260
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h75
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp105
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h66
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp84
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h69
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.cpp82
-rw-r--r--tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.h129
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.cpp42
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.h363
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.cpp41
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.h318
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp466
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h139
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp171
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.h173
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCollisionMargin.h26
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.cpp119
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.h150
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.cpp356
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.h212
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.cpp27
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.h60
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.cpp143
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.h103
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp92
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.h80
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp211
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.h120
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp151
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.h202
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp157
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.h105
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp185
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.h54
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.cpp429
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.h82
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp315
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h75
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.cpp279
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.h200
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.cpp50
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.h70
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp411
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h161
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btMaterial.h35
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp60
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h60
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp167
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.h99
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp45
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h120
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp391
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.h65
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp338
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h112
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp123
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h93
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.cpp170
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.h59
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.cpp71
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.h73
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp107
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h103
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp379
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h162
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp218
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.h74
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp35
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.h69
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp28
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.h42
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp95
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h131
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp86
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h84
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h240
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp140
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.h69
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp211
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h89
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btTriangleShape.h182
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp160
-rw-r--r--tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.h87
-rw-r--r--tests/bullet/src/BulletCollision/Doxyfile746
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btBoxCollision.h647
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btClipPolygon.h182
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.cpp181
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.h145
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.cpp498
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.h396
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp904
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h306
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactMassUtil.h60
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp528
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h372
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.cpp203
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.h1171
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp283
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.h163
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btGeometryOperations.h212
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btQuantization.h88
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp218
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.h180
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_array.h326
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h543
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_bitset.h123
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_box_collision.h590
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_box_set.cpp182
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_box_set.h674
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_clip_polygon.h210
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_contact.cpp146
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_contact.h164
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_geom_types.h97
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_geometry.h42
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_hash_table.h902
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_linear_math.h1573
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_math.h157
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_memory.cpp135
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_memory.h190
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_radixsort.h406
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.cpp640
-rw-r--r--tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.h379
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp243
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h59
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp20
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h73
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h42
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h91
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp176
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h50
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp989
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h75
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp66
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h43
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp457
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h103
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h158
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp362
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h40
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp260
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h232
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h64
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp360
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h46
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp177
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h72
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h63
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp160
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h50
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp609
-rw-r--r--tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h179
-rw-r--r--tests/bullet/src/BulletCollision/ibmsdk/Makefile112
-rw-r--r--tests/bullet/src/BulletDynamics/CMakeLists.txt114
-rw-r--r--tests/bullet/src/BulletDynamics/Character/btCharacterControllerInterface.h46
-rw-r--r--tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.cpp641
-rw-r--r--tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.h162
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp1127
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h346
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h52
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp178
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.h71
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h87
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp1070
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h614
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp172
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h97
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp66
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h58
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp1033
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h381
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h156
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp230
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h161
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp1239
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h128
-rwxr-xr-xtests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp857
-rwxr-xr-xtests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h333
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp255
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h107
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverBody.h191
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h96
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp214
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h436
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp87
-rw-r--r--tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h62
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/Bullet-C-API.cpp405
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btActionInterface.h46
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp196
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h46
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp1348
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h200
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btDynamicsWorld.h151
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.cpp402
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.h691
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp280
-rw-r--r--tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h89
-rw-r--r--tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp771
-rw-r--r--tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.h236
-rw-r--r--tests/bullet/src/BulletDynamics/Vehicle/btVehicleRaycaster.h35
-rw-r--r--tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.cpp56
-rw-r--r--tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.h119
-rw-r--r--tests/bullet/src/BulletDynamics/ibmsdk/Makefile53
-rw-r--r--tests/bullet/src/BulletMultiThreaded/CMakeLists.txt101
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CMakeLists.txt14
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/CMakeLists.txt42
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h744
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.cpp979
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.h370
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/CMakeLists.txt83
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ApplyForces.hlsl95
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ComputeBounds.hlsl83
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/Integrate.hlsl41
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/OutputToVertexArray.hlsl63
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/PrepareLinks.hlsl44
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositions.hlsl55
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositionsSIMDBatched.hlsl133
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateConstants.hlsl48
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNodes.hlsl49
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNormals.hlsl98
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositions.hlsl44
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositionsFromVelocities.hlsl35
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/VSolveLinks.hlsl55
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocities.hlsl170
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocitiesSIMDBatched.hlsl191
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverBuffer_DX11.h323
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11.h103
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11SIMDAware.h173
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverTriangleData_DX11.h96
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexBuffer_DX11.h107
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexData_DX11.h63
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.cpp2208
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.h679
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.cpp1051
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.h81
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD/CMakeLists.txt82
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Apple/CMakeLists.txt77
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/CMakeLists.txt13
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/CMakeLists.txt75
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/MiniCLTaskWrap.cpp40
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt78
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ApplyForces.cl91
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ComputeBounds.cl80
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/Integrate.cl35
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/OutputToVertexArray.cl57
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/PrepareLinks.cl34
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocities.cl195
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl213
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositions.cl55
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl129
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateConstants.cl44
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNodes.cl40
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNormals.cl103
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositions.cl36
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositionsFromVelocities.cl26
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/VSolveLinks.cl45
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ApplyForces.cl91
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ComputeBounds.cl82
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/Integrate.cl35
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/OutputToVertexArray.cl46
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/PrepareLinks.cl41
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocities.cl204
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl219
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositions.cl57
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl130
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateConstants.cl44
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNodes.cl39
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNormals.cl102
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositions.cl34
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositionsFromVelocities.cl28
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/VSolveLinks.cl45
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverBuffer_OpenCL.h209
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCL.h99
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCLSIMDAware.h169
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.cpp133
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.h62
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverTriangleData_OpenCL.h84
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexBuffer_OpenGL.h166
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexData_OpenCL.h52
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.cpp1676
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.h488
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.cpp1048
-rw-r--r--tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.h82
-rw-r--r--tests/bullet/src/BulletMultiThreaded/HeapManager.h117
-rw-r--r--tests/bullet/src/BulletMultiThreaded/Makefile.original187
-rw-r--r--tests/bullet/src/BulletMultiThreaded/PlatformDefinitions.h99
-rw-r--r--tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.cpp399
-rw-r--r--tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.h142
-rw-r--r--tests/bullet/src/BulletMultiThreaded/PpuAddressSpace.h37
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.cpp169
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.h96
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.cpp48
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.h40
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.cpp317
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.h163
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp69
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h120
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuDoubleBuffer.h126
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuFakeDma.cpp215
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuFakeDma.h135
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp275
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h72
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.cpp257
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.h180
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h167
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp302
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h128
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp248
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h106
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h51
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp1412
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h140
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h19
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp348
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h48
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h70
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp1160
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h65
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/readme.txt1
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp214
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h54
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuSampleTask/readme.txt1
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.cpp222
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.h153
-rw-r--r--tests/bullet/src/BulletMultiThreaded/SpuSync.h149
-rw-r--r--tests/bullet/src/BulletMultiThreaded/TrbDynBody.h79
-rw-r--r--tests/bullet/src/BulletMultiThreaded/TrbStateVec.h339
-rw-r--r--tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.cpp446
-rw-r--r--tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.h138
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.cpp590
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.h138
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h430
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h61
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h67
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpuDefines.h211
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedCode.h55
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedDefs.h52
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.cpp1389
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.h285
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.cpp22
-rw-r--r--tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.h85
-rw-r--r--tests/bullet/src/BulletMultiThreaded/vectormath2bullet.h73
-rw-r--r--tests/bullet/src/BulletSoftBody/CMakeLists.txt65
-rw-r--r--tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.cpp151
-rw-r--r--tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.h63
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBody.cpp3409
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBody.h978
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp368
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h153
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyData.h217
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.cpp1055
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.h143
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyInternals.h916
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp134
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h48
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodySolverVertexBuffer.h165
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftBodySolvers.h154
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp84
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h75
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp358
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.h107
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp47
-rw-r--r--tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h69
-rw-r--r--tests/bullet/src/BulletSoftBody/btSparseSDF.h306
-rw-r--r--tests/bullet/src/CMakeLists.txt13
-rw-r--r--tests/bullet/src/LinearMath/CMakeLists.txt65
-rw-r--r--tests/bullet/src/LinearMath/btAabbUtil2.h236
-rw-r--r--tests/bullet/src/LinearMath/btAlignedAllocator.cpp182
-rw-r--r--tests/bullet/src/LinearMath/btAlignedAllocator.h107
-rw-r--r--tests/bullet/src/LinearMath/btAlignedObjectArray.h471
-rw-r--r--tests/bullet/src/LinearMath/btConvexHull.cpp1174
-rw-r--r--tests/bullet/src/LinearMath/btConvexHull.h241
-rw-r--r--tests/bullet/src/LinearMath/btConvexHullComputer.cpp2749
-rw-r--r--tests/bullet/src/LinearMath/btConvexHullComputer.h103
-rw-r--r--tests/bullet/src/LinearMath/btDefaultMotionState.h40
-rw-r--r--tests/bullet/src/LinearMath/btGeometryUtil.cpp185
-rw-r--r--tests/bullet/src/LinearMath/btGeometryUtil.h42
-rw-r--r--tests/bullet/src/LinearMath/btHashMap.h450
-rw-r--r--tests/bullet/src/LinearMath/btIDebugDraw.h417
-rw-r--r--tests/bullet/src/LinearMath/btList.h73
-rw-r--r--tests/bullet/src/LinearMath/btMatrix3x3.h771
-rw-r--r--tests/bullet/src/LinearMath/btMinMax.h71
-rw-r--r--tests/bullet/src/LinearMath/btMotionState.h40
-rwxr-xr-xtests/bullet/src/LinearMath/btPoolAllocator.h121
-rw-r--r--tests/bullet/src/LinearMath/btQuadWord.h180
-rw-r--r--tests/bullet/src/LinearMath/btQuaternion.h433
-rw-r--r--tests/bullet/src/LinearMath/btQuickprof.cpp565
-rw-r--r--tests/bullet/src/LinearMath/btQuickprof.h196
-rw-r--r--tests/bullet/src/LinearMath/btRandom.h42
-rw-r--r--tests/bullet/src/LinearMath/btScalar.h522
-rw-r--r--tests/bullet/src/LinearMath/btSerializer.cpp832
-rw-r--r--tests/bullet/src/LinearMath/btSerializer.h655
-rw-r--r--tests/bullet/src/LinearMath/btStackAlloc.h116
-rw-r--r--tests/bullet/src/LinearMath/btTransform.h307
-rw-r--r--tests/bullet/src/LinearMath/btTransformUtil.h228
-rw-r--r--tests/bullet/src/LinearMath/btVector3.h766
-rw-r--r--tests/bullet/src/LinearMath/ibmsdk/Makefile39
-rw-r--r--tests/bullet/src/Makefile.am557
-rw-r--r--tests/bullet/src/Makefile.in2527
-rw-r--r--tests/bullet/src/MiniCL/CMakeLists.txt44
-rw-r--r--tests/bullet/src/MiniCL/MiniCL.cpp720
-rw-r--r--tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.cpp74
-rw-r--r--tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.h62
-rw-r--r--tests/bullet/src/MiniCL/MiniCLTaskScheduler.cpp519
-rw-r--r--tests/bullet/src/MiniCL/MiniCLTaskScheduler.h194
-rw-r--r--tests/bullet/src/MiniCL/cl.h867
-rw-r--r--tests/bullet/src/MiniCL/cl_MiniCL_Defs.h329
-rw-r--r--tests/bullet/src/MiniCL/cl_gl.h113
-rw-r--r--tests/bullet/src/MiniCL/cl_platform.h254
-rw-r--r--tests/bullet/src/btBulletCollisionCommon.h69
-rw-r--r--tests/bullet/src/btBulletDynamicsCommon.h49
-rw-r--r--tests/bullet/src/ibmsdk/Makefile16
-rw-r--r--tests/bullet/src/vectormath/scalar/boolInVec.h225
-rw-r--r--tests/bullet/src/vectormath/scalar/floatInVec.h343
-rw-r--r--tests/bullet/src/vectormath/scalar/mat_aos.h1630
-rw-r--r--tests/bullet/src/vectormath/scalar/quat_aos.h433
-rw-r--r--tests/bullet/src/vectormath/scalar/vec_aos.h1426
-rw-r--r--tests/bullet/src/vectormath/scalar/vectormath_aos.h1872
-rw-r--r--tests/bullet/src/vectormath/sse/boolInVec.h247
-rw-r--r--tests/bullet/src/vectormath/sse/floatInVec.h340
-rw-r--r--tests/bullet/src/vectormath/sse/mat_aos.h2190
-rw-r--r--tests/bullet/src/vectormath/sse/quat_aos.h579
-rw-r--r--tests/bullet/src/vectormath/sse/vec_aos.h1455
-rw-r--r--tests/bullet/src/vectormath/sse/vecidx_aos.h80
-rw-r--r--tests/bullet/src/vectormath/sse/vectormath_aos.h2547
-rw-r--r--tests/bullet/src/vectormath/vmInclude.h27
-rw-r--r--tests/bullet/test1.oec227
600 files changed, 218421 insertions, 193185 deletions
diff --git a/tests/bullet/AUTHORS b/tests/bullet/AUTHORS
new file mode 100644
index 00000000..f2cc86dd
--- /dev/null
+++ b/tests/bullet/AUTHORS
@@ -0,0 +1,22 @@
+
+Bullet Physics Library is an open source project with help from the community at the Physics Forum
+See the forum at http://bulletphysics.com
+
+The project was started by Erwin Coumans
+
+Following people contributed to Bullet
+(random order, please let us know on the forum if your name should be in this list)
+
+Gino van den Bergen: LinearMath classes
+Christer Ericson: parts of the voronoi simplex solver
+Simon Hobbs: 3d axis sweep and prune, Extras/SATCollision, separating axis theorem + SIMD code
+Dirk Gregorius: generic D6 constraint
+Erin Catto: accumulated impulse in sequential impulse
+Nathanael Presson: EPA penetration depth calculation
+Francisco Leon: GIMPACT Concave Concave collision
+Joerg Henrichs: make buildsystem (work in progress)
+Eric Sunshine: jam + msvcgen buildsystem
+Steve Baker: GPU physics and general implementation improvements
+Jay Lee: Double precision support
+KleMiX, aka Vsevolod Klementjev, managed version, rewritten in C# for XNA
+Erwin Coumans: most other source code
diff --git a/tests/bullet/BulletLicense.txt b/tests/bullet/BulletLicense.txt
new file mode 100644
index 00000000..2e5680a8
--- /dev/null
+++ b/tests/bullet/BulletLicense.txt
@@ -0,0 +1,18 @@
+/*
+Copyright (c) 2003-2010 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+Free for commercial use, please report projects in the forum at http://www.bulletphysics.org
+
+In case you want to display a Bullet logo in your software: you can download the Bullet logo in various vector formats and high resolution at the download section in http://bullet.googlecode.com
diff --git a/tests/bullet/CMakeLists.txt b/tests/bullet/CMakeLists.txt
new file mode 100644
index 00000000..13f22e7c
--- /dev/null
+++ b/tests/bullet/CMakeLists.txt
@@ -0,0 +1,338 @@
+cmake_minimum_required(VERSION 2.4.3)
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+
+#this line has to appear before 'PROJECT' in order to be able to disable incremental linking
+SET(MSVC_INCREMENTAL_DEFAULT ON)
+
+PROJECT(BULLET_PHYSICS)
+SET(BULLET_VERSION 2.78)
+
+IF(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+ENDIF(COMMAND cmake_policy)
+
+
+IF (NOT CMAKE_BUILD_TYPE)
+# SET(CMAKE_BUILD_TYPE "Debug")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF (NOT CMAKE_BUILD_TYPE)
+
+SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
+#MESSAGE("CMAKE_CXX_FLAGS_DEBUG="+${CMAKE_CXX_FLAGS_DEBUG})
+
+OPTION(USE_DOUBLE_PRECISION "Use double precision" OFF)
+OPTION(USE_GRAPHICAL_BENCHMARK "Use Graphical Benchmark" ON)
+OPTION(USE_MULTITHREADED_BENCHMARK "Use Multithreaded Benchmark" OFF)
+
+IF (USE_MULTITHREADED_BENCHMARK)
+ ADD_DEFINITIONS(-DUSE_PARALLEL_SOLVER_BENCHMARK -DUSE_PARALLEL_DISPATCHER_BENCHMARK)
+ENDIF()
+
+OPTION(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC Runtime Library DLL (/MD or /MDd)" OFF)
+OPTION(USE_MSVC_INCREMENTAL_LINKING "Use MSVC Incremental Linking" OFF)
+
+OPTION(USE_CUSTOM_VECTOR_MATH "Use custom vectormath library" OFF)
+
+IF (USE_CUSTOM_VECTOR_MATH)
+ ADD_DEFINITIONS(-DUSE_SYSTEM_VECTORMATH)
+ IF(WIN32)
+ SET (VECTOR_MATH_INCLUDE ${BULLET_PHYSICS_SOURCE_DIR}/src/vectormath/sse CACHE PATH "Vector Math library include path.")
+ ELSE(WIN32)
+ SET (VECTOR_MATH_INCLUDE ${BULLET_PHYSICS_SOURCE_DIR}/src/vectormath/scalar CACHE PATH "Vector Math library include path.")
+ ENDIF(WIN32)
+ENDIF(USE_CUSTOM_VECTOR_MATH)
+
+IF (MSVC)
+ FIND_PATH(DIRECTX_SDK_BASE_DIR Include/D3D11.h PATH $ENV{DXSDK_DIR} )
+ IF(DIRECTX_SDK_BASE_DIR)
+ OPTION(USE_DX11 "Use DirectX 11" ON)
+ ELSE()
+ OPTION(USE_DX11 "Use DirectX 11" OFF)
+ ENDIF()
+ENDIF(MSVC)
+
+
+#SET(CMAKE_EXE_LINKER_FLAGS_INIT "/STACK:10000000 /INCREMENTAL:NO")
+#SET(CMAKE_EXE_LINKER_FLAGS "/STACK:10000000 /INCREMENTAL:NO")
+
+#MESSAGE("MSVC_INCREMENTAL_YES_FLAG"+${MSVC_INCREMENTAL_YES_FLAG})
+
+
+IF(MSVC)
+ IF (NOT USE_MSVC_INCREMENTAL_LINKING)
+ #MESSAGE("MSVC_INCREMENTAL_DEFAULT"+${MSVC_INCREMENTAL_DEFAULT})
+ SET( MSVC_INCREMENTAL_YES_FLAG "/INCREMENTAL:NO")
+
+ STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags ${CMAKE_EXE_LINKER_FLAGS_DEBUG})
+ SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "/INCREMENTAL:NO ${replacementFlags}" )
+ MESSAGE("CMAKE_EXE_LINKER_FLAGS_DEBUG=${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
+
+# STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags2 ${CMAKE_EXE_LINKER_FLAGS})
+# SET(CMAKE_EXE_LINKER_FLAGS ${replacementFlag2})
+# STRING(REPLACE "INCREMENTAL:YES" "" replacementFlags3 ${CMAKE_EXTRA_LINK_FLAGS})
+# SET(CMAKE_EXTRA_LINK_FLAGS ${replacementFlag3})
+
+
+ STRING(REPLACE "INCREMENTAL:YES" "INCREMENTAL:NO" replacementFlags3 ${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO})
+ SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO ${replacementFlags3})
+ SET(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "/INCREMENTAL:NO ${replacementFlags3}" )
+
+ ENDIF (NOT USE_MSVC_INCREMENTAL_LINKING)
+
+ IF (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
+ #We statically link to reduce dependancies
+ FOREACH(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+ IF(${flag_var} MATCHES "/MD")
+ STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
+ ENDIF(${flag_var} MATCHES "/MD")
+ IF(${flag_var} MATCHES "/MDd")
+ STRING(REGEX REPLACE "/MDd" "/MTd" ${flag_var} "${${flag_var}}")
+ ENDIF(${flag_var} MATCHES "/MDd")
+ ENDFOREACH(flag_var)
+ ENDIF (NOT USE_MSVC_RUNTIME_LIBRARY_DLL)
+
+ OPTION(USE_MSVC_SSE "Use MSVC /arch:sse option" ON)
+ IF (USE_MSVC_SSE)
+ ADD_DEFINITIONS(/arch:SSE)
+ ENDIF()
+ OPTION(USE_MSVC_FAST_FLOATINGPOINT "Use MSVC /fp:fast option" ON)
+ IF (USE_MSVC_FAST_FLOATINGPOINT)
+ ADD_DEFINITIONS(/fp:fast)
+ ENDIF()
+ENDIF(MSVC)
+
+
+
+IF (WIN32)
+OPTION(INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES "Create MSVC projectfiles that can be distributed" OFF)
+
+IF (INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ SET (LIBRARY_OUTPUT_PATH ${BULLET_PHYSICS_SOURCE_DIR}/lib CACHE PATH "Single output directory for building all libraries.")
+ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${BULLET_PHYSICS_SOURCE_DIR})
+ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${BULLET_PHYSICS_SOURCE_DIR})
+ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${BULLET_PHYSICS_SOURCE_DIR})
+ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${BULLET_PHYSICS_SOURCE_DIR})
+ SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${BULLET_PHYSICS_SOURCE_DIR})
+ELSE()
+ SET (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE PATH "Single output directory for building all libraries.")
+ENDIF()
+
+OPTION(INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES "Create MSVC projectfiles with relative paths" OFF)
+OPTION(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES "Add MSVC postfix for executable names (_Debug)" OFF)
+
+IF(MSVC)
+ FIND_PATH(AMD_OPENCL_BASE_DIR include/CL/cl.h PATH $ENV{ATISTREAMSDKROOT} )
+ IF(AMD_OPENCL_BASE_DIR)
+ #AMD adds an extras slash at the end of the ATISTREAMSDKROOT variable
+ SET(AMD_OPENCL_INCLUDES ${AMD_OPENCL_BASE_DIR}/include )
+ MESSAGE(${AMD_OPENCL_INCLUDES})
+ IF (CMAKE_CL_64)
+ SET(CMAKE_ATISTREAMSDK_LIBPATH ${AMD_OPENCL_BASE_DIR}/lib/x86_64 )
+ ELSE(CMAKE_CL_64)
+ SET(CMAKE_ATISTREAMSDK_LIBPATH ${AMD_OPENCL_BASE_DIR}/lib/x86 )
+ ENDIF(CMAKE_CL_64)
+ OPTION(BUILD_AMD_OPENCL_DEMOS "Build OpenCL demos for AMD (GPU or CPU)" ON)
+ ELSE()
+ OPTION(BUILD_AMD_OPENCL_DEMOS "Build OpenCL demos for AMD (GPU or CPU)" OFF)
+ ENDIF()
+
+ FIND_PATH(NVIDIA_OPENCL_BASE_DIR OpenCL/common/inc/CL/cl.h PATH $ENV{NVSDKCOMPUTE_ROOT} )
+ IF(NVIDIA_OPENCL_BASE_DIR)
+ SET(NVIDIA_OPENCL_INCLUDES ${NVIDIA_OPENCL_BASE_DIR}/OpenCL/common/inc )
+ MESSAGE(${NVIDIA_OPENCL_INCLUDES})
+ IF (CMAKE_CL_64)
+ SET(CMAKE_NVSDKCOMPUTE_LIBPATH ${NVIDIA_OPENCL_BASE_DIR}/OpenCL/common/lib/x64 )
+ ELSE(CMAKE_CL_64)
+ SET(CMAKE_NVSDKCOMPUTE_LIBPATH ${NVIDIA_OPENCL_BASE_DIR}/OpenCL/common/lib/Win32 )
+ ENDIF(CMAKE_CL_64)
+ SET(NVIDIA_OPENCL_LIBRARIES ${CMAKE_NVSDKCOMPUTE_LIBPATH}/OpenCL.lib)
+
+ OPTION(BUILD_NVIDIA_OPENCL_DEMOS "Build OpenCL demos for NVidia (GPU)" ON)
+ ELSE()
+ OPTION(BUILD_NVIDIA_OPENCL_DEMOS "Build OpenCL demos for NVidia (GPU)" OFF)
+ ENDIF()
+ENDIF()
+
+
+
+IF (INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES)
+SET(CMAKE_SUPPRESS_REGENERATION 1)
+SET(CMAKE_USE_RELATIVE_PATHS 1)
+ENDIF(INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES)
+
+ENDIF (WIN32)
+
+IF (MSVC OR APPLE)
+ OPTION(BUILD_MINICL_OPENCL_DEMOS "Build OpenCL demos for MiniCL (Generic CPU)" ON)
+ELSE()
+ OPTION(BUILD_MINICL_OPENCL_DEMOS "Build OpenCL demos for MiniCL (Generic CPU)" OFF)
+
+ FIND_PATH(NVIDIA_OPENCL_INCLUDES CL/cl.h)
+ FIND_LIBRARY(NVIDIA_OPENCL_LIBRARIES OpenCL PATH /usr/lib /usr/local/lib)
+ IF (NVIDIA_OPENCL_INCLUDES AND NVIDIA_OPENCL_LIBRARIES)
+ MESSAGE("OPENCL FOUND")
+ MESSAGE(${NVIDIA_OPENCL_LIBRARIES})
+ OPTION(BUILD_NVIDIA_OPENCL_DEMOS "Build OpenCL demos for NVidia (GPU)" ON)
+ ELSE ()
+ MESSAGE("OPENCL NOT FOUND")
+ OPTION(BUILD_NVIDIA_OPENCL_DEMOS "Build OpenCL demos for NVidia (GPU)" OFF)
+ ENDIF ()
+ENDIF()
+
+OPTION(BUILD_CPU_DEMOS "Build original Bullet CPU demos" ON)
+
+
+
+OPTION(INTERNAL_UPDATE_SERIALIZATION_STRUCTURES "Internal update serialization structures" OFF)
+IF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
+ADD_DEFINITIONS( -DBT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
+ENDIF (INTERNAL_UPDATE_SERIALIZATION_STRUCTURES)
+
+IF (USE_DOUBLE_PRECISION)
+ADD_DEFINITIONS( -DBT_USE_DOUBLE_PRECISION)
+SET( BULLET_DOUBLE_DEF "-DBT_USE_DOUBLE_PRECISION")
+ENDIF (USE_DOUBLE_PRECISION)
+
+IF(USE_GRAPHICAL_BENCHMARK)
+ADD_DEFINITIONS( -DUSE_GRAPHICAL_BENCHMARK)
+ENDIF (USE_GRAPHICAL_BENCHMARK)
+
+IF (WIN32)
+OPTION(USE_GLUT "Use Glut" ON)
+ADD_DEFINITIONS( -D_IRR_STATIC_LIB_ )
+ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS )
+ADD_DEFINITIONS( -D_CRT_SECURE_NO_DEPRECATE )
+ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS )
+
+IF (USE_GLUT AND MSVC)
+ string (REPLACE "/D_WINDOWS" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+ remove_definitions(-D_WINDOWS )
+ENDIF()
+
+
+
+ELSE(WIN32)
+OPTION(USE_GLUT "Use Glut" ON)
+ENDIF(WIN32)
+
+
+IF(COMMAND cmake_policy)
+ cmake_policy(SET CMP0003 NEW)
+ENDIF(COMMAND cmake_policy)
+
+
+# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
+# This should be the case.
+
+FIND_PACKAGE(OpenGL)
+IF (OPENGL_FOUND)
+ MESSAGE("OPENGL FOUND")
+ MESSAGE(${OPENGL_LIBRARIES})
+ELSE (OPENGL_FOUND)
+ MESSAGE("OPENGL NOT FOUND")
+ SET(OPENGL_gl_LIBRARY opengl32)
+ SET(OPENGL_glu_LIBRARY glu32)
+ENDIF (OPENGL_FOUND)
+
+# ADD_DEFINITIONS(-DBT_USE_FREEGLUT)
+
+FIND_PACKAGE(GLU)
+
+IF (USE_GLUT)
+ FIND_PACKAGE(GLUT)
+ IF (GLUT_FOUND)
+ MESSAGE("GLUT FOUND")
+ MESSAGE(${GLUT_glut_LIBRARY})
+ ELSE (GLUT_FOUND)
+ IF (MINGW)
+ MESSAGE ("GLUT NOT FOUND not found, trying to use MINGW glut32")
+ SET(GLUT_glut_LIBRARY glut32)
+ #TODO add better GLUT detection for MinGW
+ SET(GLUT_FOUND TRUE)
+ ENDIF (MINGW)
+ IF (MSVC)
+ SET(GLUT_FOUND TRUE)
+ IF (CMAKE_CL_64)
+ message("Win64 using Glut/glut64.lib")
+ SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut64.lib)
+ ELSE(CMAKE_CL_64)
+ message("Win32 using Glut/glut32.lib")
+ SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut32.lib)
+ ENDIF (CMAKE_CL_64)
+ INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/Glut)
+ ELSE()
+ MESSAGE("GLUT NOT FOUND")
+ ENDIF (MSVC)
+ ENDIF (GLUT_FOUND)
+
+ IF(NOT WIN32)
+ # This is added for linux. This should always work if everything is installed and working fine.
+ INCLUDE_DIRECTORIES(/usr/include /usr/local/include)
+ ENDIF()
+ENDIF(USE_GLUT)
+
+
+OPTION(BUILD_DEMOS "Set when you want to build the demos" ON)
+IF(BUILD_DEMOS)
+ IF(EXISTS ${BULLET_PHYSICS_SOURCE_DIR}/Demos AND IS_DIRECTORY ${BULLET_PHYSICS_SOURCE_DIR}/Demos)
+ SUBDIRS(Demos)
+ ENDIF()
+ENDIF(BUILD_DEMOS)
+
+# "Demos_ps3")
+IF (MSVC)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF(EXISTS ${BULLET_PHYSICS_SOURCE_DIR}/Demos_ps3 AND IS_DIRECTORY ${BULLET_PHYSICS_SOURCE_DIR}/Demos_ps3)
+ MESSAGE("Demos_ps3 found")
+ SUBDIRS(Demos_ps3)
+ ENDIF()
+ ENDIF()
+ENDIF(MSVC)
+
+
+OPTION(BUILD_EXTRAS "Set when you want to build the extras" ON)
+IF(BUILD_EXTRAS)
+ SUBDIRS(Extras)
+ENDIF(BUILD_EXTRAS)
+
+#Maya Dynamica plugin is moved to http://dynamica.googlecode.com
+
+SUBDIRS(src)
+
+IF("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles")
+ OPTION(INSTALL_LIBS "Set when you want to install libraries" ON)
+ELSE()
+ IF(APPLE AND FRAMEWORK)
+ OPTION(INSTALL_LIBS "Set when you want to install libraries" ON)
+ ELSE()
+#by default, don't enable the 'INSTALL' option for Xcode and MSVC projectfiles
+ OPTION(INSTALL_LIBS "Set when you want to install libraries" OFF)
+ ENDIF()
+ENDIF()
+
+IF(INSTALL_LIBS)
+ SET (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
+ SET (LIB_DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE STRING "Library directory name")
+ ## the following are directories where stuff will be installed to
+ SET(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/bullet/" CACHE PATH "The subdirectory to the header prefix")
+ SET(PKGCONFIG_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig/" CACHE STRING "Base directory for pkgconfig files")
+ IF(NOT WIN32)
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/bullet.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc @ONLY)
+ INSTALL(
+ FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/bullet.pc
+ DESTINATION
+ ${PKGCONFIG_INSTALL_PREFIX})
+ ENDIF(NOT WIN32)
+ENDIF(INSTALL_LIBS)
+
+#INSTALL of other files requires CMake 2.6
+IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ OPTION(INSTALL_EXTRA_LIBS "Set when you want extra libraries installed" OFF)
+ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+OPTION(BUILD_UNIT_TESTS "Build Unit Tests" OFF)
+
+IF (BUILD_UNIT_TESTS)
+ SUBDIRS(UnitTests)
+ENDIF()
diff --git a/tests/bullet/COPYING b/tests/bullet/COPYING
new file mode 100644
index 00000000..623b6258
--- /dev/null
+++ b/tests/bullet/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/tests/bullet/ChangeLog b/tests/bullet/ChangeLog
new file mode 100644
index 00000000..bafe06ed
--- /dev/null
+++ b/tests/bullet/ChangeLog
@@ -0,0 +1,779 @@
+Bullet Continuous Collision Detection and Physics Library
+Primary author and maintainer: Erwin Coumans
+
+This ChangeLog is incomplete, for an up-to-date list of all fixed issues see http://bullet.googlecode.com
+using http://tinyurl.com/yabmjjj
+
+2011 April 8
+ - Bullet 2.78 release 2383
+ - Added FractureDemo
+ - Added Separatinx Axis Test and Polyhedral Clipping support (See InternalEdgeDemo)
+ - Added speculative contacts as CCD response method (See CcdPhysicsDemo)
+ - OpenCL and DirectCompute cloth as basic support for capsule collision
+
+2010 September 7
+ - autotools now uses CamelCase naming for libraryes just like cmake:
+ libbulletdynamics -> libBulletDynamics, libbulletmath -> libLinearMath
+
+2010 July 21
+ - Preparing for Bullet 2.77 release, around revision r2135
+ - Added an OpenCL particle demo, running on NVidia, AMD and MiniCL
+ Thanks to NVidia for the original particle demo from their OpenCL SDK
+ - Added GPU deformable object solvers for OpenCL and DirectCompute, and a DirectX 11 cloth demo
+ Thanks to AMD
+ - Create a separate library for MiniCL,
+ MiniCL is a rudimentary OpenCL wrapper that allows to compile OpenCL kernels for multi-core CPU, using Win32 Threads or Posix
+ - Moved vectormath into Bullet/src, and added a SSE implementation
+ - Added a btParallelConstraintSolver, mainly for PlayStation 3 Cell SPUs (although it runs fine on CPU too)
+
+2010 March 6
+ - Dynamica Maya plugin (and COLLADA support) is moved to http://dynamica.googlecode.com
+
+2010 February
+ - Bullet 2.76 release, revision 2010
+ - support for the .bullet binary file format
+ - btInternalEdgeUtility to adjust unwanted collisions against internal triangle edges
+ - Improved Maya Dynamica plugin with better constraint authoring and .bullet file export
+
+
+2009 September 17
+ - Minor update to Bullet 2.75 release, revision 1776
+ - Support for btConvex2dShape, check out Bullet/Demos/Box2dDemo
+ - Fixes in build systems
+ - Minor fix in btGjkPairDetector
+ - Initialize world transform for btCollisionShape in constructor
+
+
+2009 September 6
+ - Bullet 2.75 release
+ - Added SPH fluid simulation in Extras, not integrated with rigid body / soft body yet
+ Thanks to Rama Hoetzlein to make this contribution available under the ZLib license
+ - add special capsule-capsule collider code in btConvexConvexCollisionAlgorithm, to speed up capsule-ragdolls
+ - soft body improvement: faster building of bending constraints
+ - soft body improvement: allow to disable/enable cluster self-collision
+ - soft body fix: 'exploding' soft bodies when using cluster collision
+ - fix some degenerate cases in continuous convex cast, could impact ray cast/convex cast
+ Thanks to Jacob Langford for the report and reproduction cases, see http://code.google.com/p/bullet/issues/detail?id=250&can=1&start=200
+ - re-enabled split impulse
+ - added btHinge2Constraint, btUniversalConstraint, btGeneric6DofSpringConstraint
+ - demonstrate 2D physics with 2D/3D object interaction
+
+
+2008 December 2
+ - Fix contact refresh issues with btCompoundShape, introduced with btDbvt acceleration structure in btCompoundCollisionAlgorithm
+ - Made btSequentialImpulseConstraintSolver 100% compatible with ODE quickstep
+ constraints can use 'solveConstraint' method or 'getInfo/getInfo2'
+
+2008 November 30
+ - Add highly optimized SIMD branchless PGS/SI solver innerloop
+
+2008 November 12
+ - Add compound shape export to BulletColladaConverter
+ Thanks to JamesH for the report: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=12&t=2840
+ - Fix compiler build for Visual Studio 6
+ Thanks to JoF for the report: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2841
+
+2008 November 11
+ - Add CProfileManager::dumpAll() to dump performance statistics to console using printf.
+ - Add support for interaction between btSoftBody and btCollisionObject/btGhostObject
+
+2008 November 8
+ - Fix PosixThreadSupport
+ - Add improved btHeightfieldTerrainShape support and new Demos/TerrainDemo
+ Thanks to tomva, http://code.google.com/p/bullet/issues/detail?id=63&can=1
+ - Moved kinematic character controller from Demos/CharacterDemo into src/BulletDynamics/Character/btKinematicCharacterController.cpp
+
+2008 November 6
+ - reduced default memory pool allocation from 40Mb to 3Mb. This should be more suitable for all platforms, including iPhone
+ - improved CUDA broadphase
+ - IBM Cell SDK 3.x support, fix ibmsdk Makefiles
+ - improved CMake support with 'install' and 'framework option
+
+2008 November 4
+ - add btAxisSweep::resetPool to avoid non-determinism due to shuffled linked list
+ Thanks to Ole for the contribution,
+
+2008 October 30
+ - disabled btTriangleMesh duplicate search by default, it is extremely slow
+ - added Extras/IFF binary chunk serialization library as preparation for in-game native platform serialization (planned COLLADA DOM -> IFF converter)
+
+2008 October 20
+ - added SCE Physics Effects box-box collision detection for SPU/BulletMultiThreaded version
+ See Bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp
+ Thanks to Sony Computer Entertainment Japan, SCEI for the contribution
+
+2008 October 17
+ - Added btGhostObject support, this helps character controller, explosions, triggers and other local spatial queries
+
+2008 October 10
+ - Moved aabb to btBroadphaseProxy, improves rayTest dramatically. Further raytest improvements using the broadphase acceleration structures are planned
+ - Moved BulletMultiThreaded from Extras to /src/BulletMultiThreaded for better integration
+
+
+2008 October 3
+ - Add support for autoconf automake
+ ./autogen.sh and ./configure will create both Makefile and Jamfile. CMake and autogenerated Visual Studio projectfiles remain supported too.
+ - Improved ColladaConverter: plane shape export, and callback for shape construction to allow deletion of memory
+
+2008 Sept 30
+ - Improved Soft Body support, fixed issues related to soft body colliding against concave triangle meshes
+ - Shared more code between regular version and SPU/BulletMultiThreaded, in particular GJK/EPA
+
+2008 Sept 28
+ - Fixed rotation issues in Dynamic Maya Plugin
+
+2008 Sept 11
+ - Enable CCD motion clamping for btDiscreteDynamicsWorld, to avoid tunneling. A more advanced solution will be implemented in btContinuousDynamicsWorld.
+
+2008 Sept 7
+ - Add btScaledBvhTriangleMeshShape, to allow re-use of btBvhTriangleMeshShape of different sizes, without copying of the BVH data.
+
+2008 Sept 5
+ - Enabled Demos/ForkLiftDemo
+ Thanks Roman Ponomarev.
+
+2008 Sept 4
+ - Added btCudaBroadphase in Extras/CUDA: some research into accelerating Bullet using CUDA.
+ Thanks to the particle demo from the NVidia CUDA SDK.
+
+2008 Sept 3
+ - Several bug fixes and contributions related to inertia tensor, memory leaks etc.
+ Thanks to Ole K.
+
+2008 Sept 1
+ - Updated CDTestFramework, with latest version of OPCODE Array SAP. See Extras/CDTestFramework
+ Thanks to Pierre Terdiman for the update
+
+2008 August 25
+ - Walt Disney Studios contributes their in-house Maya Plugin for simulating Bullet physics, with options for other engines such as PhysBam or PhysX.
+ Thanks to Nicola Candussi and Arthur Shek
+
+2008 August 14
+ - Improved performance for btDbvtBroadphase, based on dual dynamic AABB trees (one for static, one for dynamic objects, where objects can move from one to the other tree)
+ Thanks to Nathanael Presson again, for all his work.
+
+2008 July 31
+ - Added Havok .hkx to COLLADA Physics .dae converter patch+information
+ - Fix btSubsimplexConvexCast
+ Thanks to Nacho, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2422)
+ - Fix in rendering, GL_STENCIL
+ - btTriangleIndexVertexArray indices should be unsigned int/unsigned short int,
+ - Made InternalProcessAllTriangles virtual, thanks to
+ Both thank to Fullmetalcoder, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2401
+ - clamp impulse for btPoint2PointConstraint
+ Thanks to Martijn Reuvers, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2418
+ - Free memory of bvh, pass in scaling factor (optional)
+ Thanks to Roy Eltham, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=2375
+
+2008 July 27
+
+btDbvtBroadphase:
+ - Fixed a performance issues reported by 'reltham'
+ - Added btDbvtBroadphase::optimize() for people who want good performances right
+away or don't do dynamics.
+ - fixed compilation issues when DBVT_BP_PROFILE was set.
+btSoftBody:
+ - Fixed singular matrix issues related to polar decomposition (flat meshes).
+DemoApplication:
+ - Shadows (enable/disable through 'g' or DemoApplication::setShadows(bool)).
+ - Texture can be enable/disable through 'u'
+CDFramework:
+ - fixed compilation issues.
+ All thanks to Nathanael Presson
+
+2008 July 10
+ - Added btMultimaterialTriangleMeshShape and MultiMaterialDemo
+ Thanks to Alex Silverman for the contribution
+
+2008 June 30
+ - Added initial support for kinematic character controller
+ Thanks to John McCutchan
+
+2008 April 14
+ - Added ray cast support for Soft Bodies
+ Thanks to Nathanael Presson for the contribution
+
+2008 April 9
+ - Cleanup of Stan Melax ConvexHull, removed Extras/ConvexHull, moved sources into LinearMath/BulletCollision
+
+2008 April 4
+ - Added btSliderConstraint and demo
+ Thanks Roman Ponomarev
+
+2008 April 3
+ - Fixed btMinkowskiSumShape, and added hitpoint to btSubsimplexConvexCast
+
+2008 April 2
+ - Added Extras/CdTestFrameWork
+ Thanks Pierre Terdiman
+
+2008 April 1
+ - Added posix thread (pthread) support
+ Thanks Enrico
+
+2008 March 30
+ - Added Soft Body, cloth, rope and deformable volumes, including demos and interaction
+ Thanks Nathanael Presson for this great contribution
+
+ 2008 March 17
+ - Improved BulletColladaConverter
+ Thanks John McCutchan
+
+2008 March 15
+ - btMultiSapBroadphase in a working state. Needs more optimizations to be fully useable.
+ - Allow btOptimizedBvh to be used for arbitrary objects, not just triangles
+ - added quicksort to btAlignedObjectArray
+ - removed btTypedUserInfo, added btHashMap
+
+2008 March 30
+ - Moved quickstep solver and boxbox into Bullet/src folder
+ Thanks Russell L. Smith for permission to redistribute Open Dynamics Engine quickstep and box-box under the ZLib license
+
+2008 Feb 27
+ - Added initial version for Character Control Demo
+ - Applied fixes to IBM Cell SDK 3.0 build makefiles
+ Thanks Jochen and mojo for reporting/providing patch: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1922
+
+2008 Feb 8
+ - Bugfixes in ConvexCast support against the world.
+ Thanks to Isgmasa for reporting/providing fix: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1823
+
+2008 Feb 6
+ - Added btCapsuleShapeX and btCapsuleShapeZ for capsules around X and Z axis (default capsule is around Y)
+
+2008 Feb 3
+ - Added btTypedUserInfo, useful for serialization
+
+2008 Jan 31
+ - Add support for 16 and 32-bit indices for SPU / BulletMultiThreaded version.
+
+2008 Jan 29
+ - Added COLLADA Physics export/serialization/snapshot from any Bullet btDynamicsWorld. Saving the physics world into a text .xml file is useful for debugging etc.
+
+2008 Jan 23
+ - Added Stan Melax Convex Hull utility library in Extras/ConvexHull. This is useful to render non-polyhedral convex objects, and to simplify convex polyhedra.
+
+2008 Jan 14
+ - Add support for batch raycasting on SPU / BulletMultiThreaded
+
+2007 Dec 16
+ - Added btRigidBodyConstructionInfo, to make it easier to set individual setting (and leave other untouched) during rigid body construction.
+ Thanks Vangelis Kokkevis for pointing this out.
+ - Fixed memoryleak in the ConstraintDemo and Raytracer demo.
+ - Fixed issue with clearing forces/gravity at the end of the stepSimulation, instead of during internalSingleStepSimulation.
+ Thanks chunky for pointing this out: http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1780
+ - Disabled additional damping in rigid body by default, but enable it in most demos. Set btRigidBodyConstructionInfo m_additionalDamping to true to enable this.
+ - Removed obsolete QUICKPROF BEGIN/END_PROFILE, and enabled BT_PROFILE. Profiling is enabled by default (see Bullet/Demos/OpenGL/DemoApplication.cpp how to use this).
+ User can switch off profiling by enabling define BT_NO_PROFILE in Bullet/src/btQuickprof.h.
+
+2007 Dec 14
+ - Added Hello World and BulletMultiThreaded demos
+ - Add portable version of BulletMultiThreaded, through SequentialThreadSupport (non-parallel but sharing the same code-path)
+ - Add Cmake support for AllBulletDemos
+
+
+2007 Dec 11
+ - Moved the 'btRigidBody::clearForce' to the end of the stepSimulation, instead of in each substep.
+ See discussion http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1601
+ - Added btConvexPlaneCollisionAlgorithm, makes planes perform better, and prevents tunneling
+ Thanks Andy O'Neil for reporting the performance/functionality issue
+ - Fixes for IBM Cell SDK 3.0
+ Thanks to Jochen Roth for the patch.
+
+2007 Dec 10
+ - Fixes in btHeightfieldTerrainShape
+ Thanks to Jay Lee for the patch.
+
+2007 Dec 9
+ - Only update aabb of active objects
+ Thanks Peter Tchernev for reporting (http://bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1764 )
+ - Added workaround to compile libxml under Visual Studio 2008 Beta 2
+ - Make glui compile under MSVC 9.0 beta (vsnprintf is already defined)
+
+2007 Dec 6
+ - Added DynamicControlDemo, showing dynamic control through constraint motors
+ Thanks to Eddy Boxerman
+ - Add support for generic concave shapes for convex cast.
+ - Added convex cast query to collision world.
+ - Added workaround for OpenGL bug in Mac OS X 10.5.0 (Leopard)
+ - Added concave raycast demo
+ All above thanks to John McCutchan (JMC)
+ - Fixed issues that prevent Linux version to compile.
+ Thanks to Enrico for reporting and patch, see
+ - Fixed misleading name 'numTriangleIndices' into 'numTriangles'
+ Thanks Sean Tasker for reporting:
+
+2007 Nov 28:
+ - Added raycast against trianglemesh. Will be extended to object cast soon.
+ Thanks John McCutchan (JMC)
+ - make getNumPoints const correct, add const getPoints().
+ Thanks Dirk Gregorius
+ - Bugfix: allow btCollisionObjects (non-btRigidBody) to interact properly with btRigidBody for cache-friendly btSequentialImpulseConstraintSolver.
+ Thanks Andy O'Neil for pointing this out.
+ - Bugfix: don't fail if spheres have identical center, use arbitrary separating normal (1,0,0)
+ Thanks Sean Tasker for reporting! http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1681
+
+
+2007, November 20
+ - Added hierarchical profiling
+ - Fixed memory leak in btMultiSapBroadphase,
+ - Fixed hash function (typo, should use 2 proxies)
+ Thanks to Stephen (shatcher) for reporting and fixes! http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1696
+
+2007 Nov 11
+ - Fixed parallel solver (BulletMultiThreaded) friction issue
+ - Terminate Win32 Threads when closing the CcdPhysicsDemo (when USE_PARALLEL_SOLVER/USE_PARALLEL_DISPATCHER is defined)
+
+2007 Nov 6
+ - Added support for 16-bit indices for triangle meshes
+ - Added support for multiple mesh parts using btBvhTriangleMeshShape.
+ Thanks to Tim Johansson
+
+2007 Oct 22
+ - All memory allocations go through btAlignedAlloc/btAlignedFree. User can override this to verify memory leaks
+ - added a few more demos to AllBulletDemos
+ - fix for one of the constructors of btHingeConstraint
+ Thanks Marcus Hennix
+
+2007 Oct 20
+ - included glui, a GLUT/OpenGL based toolkit for some graphical user elements
+ Removed dynamic_cast from glui, to allow linkage without rtti
+ - added Box2D framework using glui, allowing all demos to run within one executable
+ Thanks Erin Catto for the FrameWork skeleton (http://www.box2d.org)
+
+2007 Ocy 17
+ - Allow user to pass in their own memory (stack and pool) allocators, through collisionConfiguration. See demos how to use this
+
+2007 Oct 14
+ - Included working version of Cell SPU parallel optimized version for Libspe2 SPU task scheduler.
+ This version compiles and runs on Playstation 3 Linux and IBM CellBlade, see BulletSpuOptimized.pdf for build instructions
+ (Official Playstation 3 developers can request a SPURS version through Sony PS3 Devnet.)
+ Thanks to IBM 'Extreme Blue' project for the contribution
+ http://www-913.ibm.com/employment/us/extremeblue/
+ Thanks Minh Cuong Tran, Benjamin Hoeferlin, Frederick Roth and Martina Huellmann
+ for various contributions to get this initial Libspe2 parallel version up and running.
+
+2007 Oct 13
+ - made 'btCollisionShape::calculateLocalInertia' const
+ Thanks to cgripeos, see http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1514
+ - applied a large patch to remove warnings
+ Thanks to Enrico, see http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1568
+ - removed SSE includes, added #incude <string.h> for memset in Extras/quickstep, thanks Eternl Knight
+
+2007 Oct 11
+ - added Hashed Overlapping Pair Cache, recommended by Pierre Terdiman. It works like a charm, thanks Pierre and Erin Catto (code from Box2D)
+ - modified some margins inside btBoxShape, btCylinderShape and btSphereShape
+ - added cone debug rendering (for cones with x, y and z up-axis)
+ - added improvements for optional Extra/quickstep, thanks to Remotion
+ - some performance improvements for Bullet constraint solver
+
+2007 Sept 28
+ - upgraded GIMPACT to version 0.3
+ Thanks to Francisco Leon
+
+2007 Sept 27
+ - added contribution from IBM Extreme Blue project for Libspe2 support. This allow to execute BulletMultiThreaded on Cell SPU under PS3 Linux and Cell Blade. See http://www-913.ibm.com/employment/us/extremeblue
+ Thanks to Minh Cuong Tran, Frederick Roth, Martina Heullmann and Benjamin Hoeferlin.
+
+2007 Sept 13
+ - Improved btGenericD6Constraint. It can be used to create ragdolls (similar to the new btConeTwistConstraint). See GenericJointDemo
+ - Added support for Bullet constraints in the optional Extras/quickstep ODE solver. See CcdPhysicsDemo, enable #COMPARE_WITH_QUICKSTEP and add libquickstep to the dependencies.
+ For both patches/improvements thanks Francisco Leon/projectileman
+
+2007 Sept 10
+ - removed union from btQuadWordStorage, it caused issues under certain version of gcc/Linux
+
+2007 Sept 10
+ - Reverted constraint solver, due to some issues. Need to review the recent memory allocation changes.
+ - Fixed issue with kinematic objects rotating at low speed: quaternion was de-normalized, passing value > 1 into acosf returns #IND00 invalid values
+ - 16 byte memory alignment for BVH serialization
+ - memory cleanup for btPoolAllocator
+
+2007 Sept 9
+ - Added serialization for BVH/btBvhTriangleMeshShape, including endian swapping. See ConcaveDemo for an example.
+ Thanks to Phil Knight for the contribution.
+ - Fixed issues related to stack allocator/compound collision algorithm
+ Thanks Proctoid, http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=18&t=1460
+ - Increase some default memory pool settings, and added a fallback for the constraints solver to use heap memory
+ - Removed accidential testing code in btScalar.h related to operator new.
+ - Enable btAxis3Sweep and bt32BitAxis3Sweep to be linked in at the same time, using template
+
+2007 Sept 7
+ - Replaced several dynamic memory allocations by stack allocation and pool allocations
+ - Added branch-free quantized aabb bounding box overlap check, works better on Playstation 3 and XBox 360
+ Thanks to Phil Knight. Also see www.cellperformance.com for related articles
+ - Collision algorithms and settings for the memory/stack allocator can be done using btDefaultCollisionConfiguration
+ This is an API change. See demos how to modify existing implementations with a one-liner.
+ - Register several collision algorithms by default (sphere-sphere, sphere-box, sphere-triangle)
+ - Use other traveral method for BVH by default, this improves triangle mesh collision performance.
+
+2007 Aug 31
+ - fixed MSVC 6 build
+ Thanks Proctoid, http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1375
+ - fixed double precision build issues
+ Thanks Alex Silverman, http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1434
+
+2007 Aug 24
+ - fixed bug in btMatrix3x3::transposeTimes(const btMatrix3x3& m) const. Luckily it wasn't used in core parts of the library (yet).
+ Thanks to Jay Lee
+
+2007 Aug 15
+ - fixed bug in Extras/GIMPACT 0.2 related to moving triangle meshes
+ Thanks Thomas, http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1368
+
+2007 Aug 14
+ - added parallel constraint solver. Works on Playstation 3 Cell SPU and multi core (Win Threads on PC and XBox 360).
+ See Extras/BulletMultiThreaded for SpuSolverTask subfolder and SpuParallelSolver.cpp
+ Thanks Marten Svanfeldt (Starbreeze Studios)
+ - fixed some bugs related to parallel collision detection (Extras/BulletMultiThreaded)
+ Thanks Marten Svanfeldt (Starbreeze Studios)
+
+2007 Aug 2
+ - added compound and concave-convex (swapped) case for BulletMultiThreaded collision detection, thanks to Marten Svanfeldt
+ - refactored broadphase and overlapping pair cache. This allows performance improvement by combining multiple broadphases. This helps add/remove of large batches of objects and large worlds. See also Pierre Terdiman forum topic:
+ http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1329
+
+
+2007 July 27
+ - added Ragdoll Demo
+ Thanks to Marten Svanfeldt (Starbreeze Studios)
+
+ - added Vector Math library for SIMD 3D graphics linear algebra (vector, matrix, quaternion)
+ See Bullet/Extras/vectormathlibrary
+ Supports SIMD SSE, PowerPC PPU and Cell SPU (including PS3 Linux and CellBlade), as well as generic portable scalar version
+ Will be used to improve BulletMultiThreaded performance
+ Open Sourced by Sony Computer Entertainment Inc. under the new BSD license
+ - added SIMD math library
+ 4-way SIMD for common math functions like atan2f4, cosf4, floorf4, fabsf4, rsqrtf4 etc. Used by Vector Math library under PPU and SPU.
+ Supports PowerPC (PPU) and Cell SPU, including PS3 Linux and CellBlade.
+ See Bullet/Extras/simdmathlibrary
+ Open sourced by Sony Computer Entertainment Inc. under the new BSD license
+
+
+2007 July 25
+ - added several patches: per-rigidbody sleeping threshold. added Assert to prevent deletion of rigidbody while constraints are still pointing at it
+ Thanks to Marten Svanfeldt (Starbreeze Studios)
+
+2007 July 13
+ - fixed relative #include paths again. We can't use "../" relative paths: some compilers choke on it (it causes extreme long paths)
+ Within the libraries, we always need to start with "BulletCollision/" or "BulletDynamics/ or "LinearMath/"
+
+2007 July 10
+ - Updated Bullet User Manual
+
+2007 July 5
+ - added btConeTwistConstraint, especially useful for ragdolls. See Demos/RagdollDemo
+ Thanks to Marten Svanfeldt (Starbreeze Studios)
+
+2007 June 29
+ - btHeightfieldTerrainShape: Added heightfield support, with customizations
+ - Upgraded to GIMPACT 0.2, see Extras/GIMPACT and MovingConcaveDemo
+ - Several patches from Marten Svanfeldt (Starbreeze Studios)
+ Improved collision filtering (in broadphase and rigidbody)
+ Improved debug rendering
+ Allow to set collision filter group/mask in addRigidBody
+
+
+2007 June 15
+ - Changed btAlignedObjectArray to call copy constructor/replacement new for duplication, rather then assignment operator (operator=).
+
+2007 June 11
+ - Added multi-threading. Originally for Playstation 3 Cell SPU, but the same code can run using Win32 Threads using fake DMA transfers (memcpy)
+ Libspe2 support for Cell Blade / PS3 Linux is upcoming
+ See Extras/BulletMultiThreaded. Usage: replace btCollisionDispatcher by btSpuGatheringCollisionDispatcher
+
+ - Added managed Bullet library, entirely rewritten in C# for Windows and XBox 360 XNA
+ See Extras/BulletX
+ Thanks to KleMiX, aka Vsevolod Klementjev
+
+2007 May 31
+ - sign-bit went wrong in case of 32-bit broadphase, causing quantization problems.
+ Thanks DevO for reporting.
+
+2007 May 23
+ - Fixed quantization problem for planar triangle meshes in btOptimizedBvh
+ Thanks Phil Knight for reporting and helping to fix this bug.
+
+2007 May 20
+ - btAxisSweep3: Fixed a bug in btAxisSweep3 (sweep and prune) related to object removal. Only showed up when at least one btStaticPlaneShape was inserted.
+ Thanks tbp for more details on reproducing case.
+ - btAxisSweep3: Fixed issue with full 32bit precision btAxisSweep3 (define BP_USE_FIXEDPOINT_INT_32), it used only 0xffff/65536 for quantization instead of full integer space (0xffffffff)
+ - btRaycastVehicle: Added 'getForwardVector' and getCurrentSpeedKmHour utility functions
+ - Fixed local scaling issues (btConvexTriangleMeshShape, btBvhTriangleMeshShape, removed scaling from btMatrix3x3).
+ Thanks Volker for reporting!
+ - Added second filename search, so that starting BspDemo and ConvexDecompositionDemo from within Visual Studio (without setting the starting path) still works
+
+2007 April 22
+ - Added braking functionality to btRaycastVehicle
+ - Removed tons of warnings, under MSVC 2005 compilation in -W4
+
+2007 March 21
+ - Fixed issues: comma at end of enum causes errors for some compilers
+ - Fixed initialization bug in LocalRayResult ( m_localShapeInfo(localShapeInfo) )
+
+2007 March 20
+ - Added refit tree to quantized stackless tree, and updated ConcaveDemo as example.
+
+2007 March 17
+ - Added constraint solver optimizations, avoiding cross products during iterations, and gather rigidbody/constraint info in contiguous memory (btSolverBody/btSolverConstraint)
+ - These optimizations don't give large benefit yet, but it has good potential. Turned on by default. Can be switched off using solver->setSolverMode(SOLVER_RANDMIZE_ORDER).
+ - Enabled anti-jitter for rigid bodies. This is experimental, and can be switched off by setting a global (it is experimental so no proper interface) gJitterVelocityDampingFactor = 1.0;
+ - Fixed bug in islandmanifold.heapSort(btPersistentManifoldSortPredicate()); , thanks Noehrgel for reporting this (affected Sun Solaris)
+
+2007 March 12
+ - Added compile-time toggle between on 16-bit and 32-bit fixed-point SAP broadphase.
+ This allows the number of bodies to exceed 32767
+ - Enable useQuantizedAabbCompression on btTriangleMesh, see ColladaDemo
+
+2007 March 8
+ - Fixed bug in constraint/island sorting (caused by replacing STL by dedicated btAlignedObjectArray with heapSort)
+ Thanks Clemens Unterkofler for pointing this out!
+
+2007 March 6
+ - removed STL from the Bullet library: replace std::vector by btAlignedObjectArray. Also removed the std::set for overlapping pair set, and turned it into an overlapping pair array. The SAP only adds objects, never removed. Removal is postponed for during traversal of overlapping pairs (duplicates and non-overlapping pairs are removed during that traversal).
+ - added heap sort and binary search/linear search to btAlignedObjectArray
+ - fixed wrong cast, thanks Hamstray, http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1015
+
+
+2007 Feb 25
+ - Improved performance of convex collision shapes, cache local AABB instead of recomputation. This fixes issue with very slow performance in larger .bsp levels
+
+2007 Feb 24
+ - Added compressed/quantized AABB tree, 16 bytes per node, while supporting 32-bit (triangle) indices.
+ Should be faster and smaller then original version (quantized aabb check is done in integer space)
+ Original aabb tree nodes are still supported. They are 44 bytes, with full floating point precision and additional subPart index.
+ - added meter-unit scaling support in ColladaConverter.cpp
+
+2007 Feb 21
+ - Build system: updated bullet.pc.in library names
+ - Updated EPA comparison integration (missing parameter)
+
+2007 Jan 04
+ - fixed optimized AABB tree building: in some cases the tree building fails due to unbalanced trees, which generated stack overflow
+
+2006 Dec 15
+ - added contribution to allow double precision collision detection/dynamics. Define BT_USE_DOUBLE_PRECISION in your project and libraries that include Bullet
+
+2006 Dec 14
+ - merged contact and non-contact constraint solving into one loop, will improve stability of jointed bodies during collisions
+ - added first draft for hingeConstraint motor
+
+2006 Dec 8, Erwin Coumans
+ - preparation for SIMD: added btAlignedAllocator and btAlignedObjectArray, to replace stl std::vector, same interface, but compatible with 16 byte alignment
+ - cleaned up dependencies in autogenerated msvc projectfiles
+ - aligned btVector3 on 16 bytes boundary, under win32. see if developers will come up with problems
+
+2006 Dec 04, Erwin Coumans
+ Added btNearCallback. This is similar to Open Dynamics Engine (ODE) dNearCallback, but important differences:
+ - contact points are persistent (lifetime more then one frame, for warmstarting/incremental contact point management)
+ - continuous collision detection, time of impact
+ Added btRigidBody::isInWorld(), returns true if btRigidBody is inside a btCollisionWorld/btDynamicsWorld derived class
+ Added angularFactor to btRigidbody, this helps some character control (no angular impulse applied)
+
+
+2006 Nov 28
+ Moved StackAlloc from EPA into LinearMath/btStackAlloc
+ renamed internal class ConcaveShape into btConcaveShape
+ added btHeightfieldTerrainShape (not completed yet)
+
+2006 Nov 15 Nathanael Presson
+ Added EPA penetration depth algorithm, Expanding Polytope Algorithm
+ Added Pierre Terdiman penetration depth comparison/test DEMO
+ Fixed Bullet's Minkowski sampling penetration depth solver
+ Contributed by Nathanael Presson
+
+2006 Nov 11 Francisco León Nájera
+ Added GIMPACT trimesh collision detection: concave versus concave,
+ Contributed by Francisco León Nájera
+
+2006 Nov 2
+ Minor refactoring: btCollisionObject changes from struct into class, added accessor methods
+ Force use of btMotionState to synchronize graphics transform, disabled old btRigidBody constructor that accepts btTransform
+ Renamed treshold into threshold throughout the code
+
+2006 Oct 30
+ Enable decoupling of physics and graphics framerate using interpolation and internal fixed timestep, based on btMotionState
+ Enabled raycast vehicle demo (still needs tuning)
+ Refresh contact points, even when they are already persistent.
+ Fixed debugDraw colors (thanks pc0de for reporting)
+ Use Dispatcher in ConcaveConvexCollisionAlgorithm (so it uses the registered collision algorithm, not hardcoded convexconcave)
+ Improved performance of constraint solver by precalculating the cross product/impulse arm
+ Added collision comparison code: ODE box-box, also sphere-triangle
+ Added safety check into GJK, and an assert for AABB's that are very large
+ Fixed kinematic support (deriving velocities for animated objects)
+ Updated comparison/optional quickstep solver in Extras
+ UserCollisionAlgorithm demonstrates btTriangleMesh usage (easier trimesh compared to index array version)
+ Removed scaling from btTransform (we only want to deal with rigid transforms)
+
+2006 Oct 4
+ Fixed minor leak in btOptimizeBVH
+ Cleanup of btRigidBody construction
+ added getW() in btQuaternion
+ assert when setLinearVelocity is called on btRigidBody
+ renamed projectfile library from collada-dom to colladadom (to make VC6 happy)
+
+2006 Sept 27
+ Big Refactoring: renamed and moved files, create a replacement for CcdPhysicsEnvironment/CcdPhysicsController.
+ All Bullet classes in LinearMath, BulletCollision and BulletDynamics start with bt, and methods start with lowercase.
+ Moved classes into src folder, which is the only include folder needed.
+ Added 2 headerfiles in src: btBulletCollisionCommon.h and btBulletDynamicsCommon.h
+
+2006 Sept 23
+ Fixed 2 bugs, causing crashes when removing objects. Should do better unit-testing. UnionFind and 3D SAP were involved.
+
+2006 Sept 19
+ Allow programmable friction and contact solver model. User can register their own functions for several interaction types.
+ Improved performance, and removed hardcoded maximum overlaps (switched from C-array to stl::set)
+
+2006 Sept 16
+ Added Bullet 2.0 User Manual
+ Allow registration of custom user collision algorithms
+
+2006 Sept 10
+ Started cleaning up demos
+
+2006 Sept 4
+ Fixed concave collision bug (caused instability/missing collisions in meshes/compounds)
+ Fixed memoryleak in OptimizedBvh, added RayTestSingle to CollisionWorld
+ Prepared for VehicleDemo
+ Increased Performance (island generation for sleeping objects took too much time)
+ Better COLLADA 1.4.1 physics conformance in ColladaDemo
+
+2006 August 11
+ Added Quake BspDemo
+ Improved CCD for compound and non-convex objects
+
+2006 August 10
+ Added per-triangle material (friction/restitution) support for non-convex meshes. See ConcaveDemo for usage.
+
+2006 August 9
+ Added CMake support (see http://cmake.org)
+ This can autogenerate makefiles, projectfiles cross platform (including MacOS X Xcode )
+ Just run cmake . in the root folder and it will autogenerate build files
+
+2006 July 26 Erwin Coumans
+ Upgraded to COLLADA-DOM 1.4.1, latest SVN version
+ ColladaDemo can export snapshots to .dae
+
+2006 July 24 Erwin Coumans
+ Added Compound CollisionShape support
+ (this is still low performance -> requires stackless tree-versus-tree traversal for better performance)
+
+2006 July 15 Erwin Coumans
+ Added initial support for Parallel execution (collision detection, constraint solving)
+ See ParallelPhysicsEnvironment in Extras\PhysicsInterface\CcdPhysics
+
+2006 July 10 Erwin Coumans
+ Added MacOS X support (some build issues mainly)
+
+2006 July 5 Erwin Coumans
+ Improved COLLADA 1.4 physics import, both COLLADA-DOM and FCollada
+
+2006 June 29 Erwin Coumans
+ Refactoring of the broadphase
+ Moved some optional files to Extras: Algebraic ccd and EPA, quickstep
+ Moved the limits on bodies/overlap to 32k and 65k
+
+2006 June 25 Erwin Coumans
+ Added basic Collision Filtering, during broadphase
+ Allow adding meshes to the TriangleIndexVertexArray,
+ (input for TriangleMeshShape)
+ Preparation for CompoundShape
+
+2006 June 19 Erwin Coumans
+ Added support for COLLADA Physics Import.
+ Both jam and Visual Studio can compile ColladaDemo
+
+2006 June 18 Dirk Gregorius <dirk@dirkgregorius.de>
+ Started implementing Generic6DOF joint and setup basic interface
+
+
+2006 June 17 Frank Richter <resqu@gmx.ch>
+ Bumped version in configure.ac to 1.5.6 (assuming that "1.5f" is
+ the next version released).
+ Updated files in mk/autoconf and mk/jam with copies from CS; fixes a
+ GLU detection issue on MinGW.
+ Set msvc/bullet_ico.ico as the default application icon.
+ Disabled exceptions for gcc builds.
+ Applied a patch from Michael D. Adams to fix a warning with gcc.
+2006 jUNE 16 Erwin Coumans
+ Constraints now merge simulation islands.
+
+2006 May 24
+ Improved GJK accuracy, fixed GjkConvexCast issue, thanks to ~MyXa~ for reporting
+
+2006 May 19
+ Added restitution support
+ Moved out Friction and Dynamics info from ManifoldPoint (removed logical dependency)
+ Added a void* m_userPersistentData in ManifoldPoint.
+ Added a ContactDestroyedCallback, to allow user to handle destruction of m_userPersistentData
+
+2006 May 13
+ Fixed some bugs in friction / jacobian calculations. Reported by Dirk Gregorius. Thanks!
+
+2006 May 9
+ Fixed raycasting filtering
+ Moved repository to SVN at https://svn.sourceforge.net/svnroot/bullet
+
+2006 April 27
+ Moved raycasting to CollisionWorld, to make it more generic
+ Added basic CCD option in the CcdCollisionDemo
+ Fixed 'noResponse' mode, for triggering rigidbodies (useful for Artificial Intelligence queries)
+ Improved Bullet/ODE sample (in Extras)
+
+2006 April 10
+ Separating Axis Test (SAT) convex hull collision detector, contribution by Simon Hobbs
+ Added SIMD SSE Math classes (for above SAT)
+ Added Mouse picking in CcdPhysicsDemo
+ Improved penetration depth estimation in MinkowskiPenetrationDepthSolver, both accuracy and performance
+ Added Hinge constraint
+ Added quickprof profiling (see http://sourceforge.net/projects/quickprof )
+
+2006 March 21 Frank Richter <resqu@gmx.ch>
+ Removed VC manifest files.
+ Removed superfluous "grpplugins" projects.
+
+2006 March 20 Erwin Coumans
+ Clamped the acculumated impulse rather then intermediate impulse (within the iteration)
+ Use the persistent contacts for reusing the impulse
+ Separated friction and normal solving for better stability
+ Decreased the default number of iterations of the constraint solver from 10 to 4
+
+2006 March 19 Frank Richter <resqu@gmx.ch>
+ Removed a couple of CSisms from the VC projects.
+ Fixed VC include & lib paths to go to the Addtional* options
+ instead the command line arguments.
+ Added pkgconfig support.
+
+2006 March 14 Frank Richter <resqu@gmx.ch>
+ Added support for shipped GLUT on MinGW.
+ Fixed GLUT support on MinGW.
+
+2006 March 13 Frank Richter <resqu@gmx.ch>
+ Bolted on Jam-based build system.
+ Generated VC project files.
+ Fixed GCC warnings.
+ Fixed Linux build issues.
+
+2006 March 13
+Added 3D Sweep and Prune Broadphase Collision Detection, Contribution from Simon Hobbs.
+
+2006 March 2
+ Minor change in license to ZLib/LibPNG
+ This makes it legally a bit easier to deploy on Playstation 3
+ Prepared for more generic constraints, added ConstraintsDemo
+
+2006 Feb 23
+ Rearranged files and dependencies to allow for easier standalone Collision Detection without Bullet Dynamics.
+ See Demos/CollisionInterfaceDemo and Extras/ode/ode/test/test_BulletGjk.cpp for examples how to use.
+
+2005 August 6
+ Bullet 0.2 release with demos, sources, doxygen, draft manual
+
+2005 June 1
+ First public release of Bullet
+
+
+... todo: add history
+
+2003 Initial version (continuous collision detection)
diff --git a/tests/bullet/Demos/HelloWorld/HelloWorld.cpp b/tests/bullet/Demos/HelloWorld/HelloWorld.cpp
new file mode 100644
index 00000000..f16cd94e
--- /dev/null
+++ b/tests/bullet/Demos/HelloWorld/HelloWorld.cpp
@@ -0,0 +1,172 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btBulletDynamicsCommon.h"
+#include <stdio.h>
+
+/// This is a Hello World program for running a basic Bullet physics simulation
+
+int main(int argc, char** argv)
+{
+
+ int i;
+
+ ///collision configuration contains default setup for memory, collision setup. Advanced users can create their own configuration.
+ btDefaultCollisionConfiguration* collisionConfiguration = new btDefaultCollisionConfiguration();
+
+ ///use the default collision dispatcher. For parallel processing you can use a diffent dispatcher (see Extras/BulletMultiThreaded)
+ btCollisionDispatcher* dispatcher = new btCollisionDispatcher(collisionConfiguration);
+
+ ///btDbvtBroadphase is a good general purpose broadphase. You can also try out btAxis3Sweep.
+ btBroadphaseInterface* overlappingPairCache = new btDbvtBroadphase();
+
+ ///the default constraint solver. For parallel processing you can use a different solver (see Extras/BulletMultiThreaded)
+ btSequentialImpulseConstraintSolver* solver = new btSequentialImpulseConstraintSolver;
+
+ btDiscreteDynamicsWorld* dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher,overlappingPairCache,solver,collisionConfiguration);
+
+ dynamicsWorld->setGravity(btVector3(0,-10,0));
+
+ ///create a few basic rigid bodies
+ btCollisionShape* groundShape = new btBoxShape(btVector3(btScalar(50.),btScalar(50.),btScalar(50.)));
+
+ //keep track of the shapes, we release memory at exit.
+ //make sure to re-use collision shapes among rigid bodies whenever possible!
+ btAlignedObjectArray<btCollisionShape*> collisionShapes;
+
+ collisionShapes.push_back(groundShape);
+
+ btTransform groundTransform;
+ groundTransform.setIdentity();
+ groundTransform.setOrigin(btVector3(0,-56,0));
+
+ {
+ btScalar mass(0.);
+
+ //rigidbody is dynamic if and only if mass is non zero, otherwise static
+ bool isDynamic = (mass != 0.f);
+
+ btVector3 localInertia(0,0,0);
+ if (isDynamic)
+ groundShape->calculateLocalInertia(mass,localInertia);
+
+ //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects
+ btDefaultMotionState* myMotionState = new btDefaultMotionState(groundTransform);
+ btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,groundShape,localInertia);
+ btRigidBody* body = new btRigidBody(rbInfo);
+
+ //add the body to the dynamics world
+ dynamicsWorld->addRigidBody(body);
+ }
+
+
+ {
+ //create a dynamic rigidbody
+
+ //btCollisionShape* colShape = new btBoxShape(btVector3(1,1,1));
+ btCollisionShape* colShape = new btSphereShape(btScalar(1.));
+ collisionShapes.push_back(colShape);
+
+ /// Create Dynamic Objects
+ btTransform startTransform;
+ startTransform.setIdentity();
+
+ btScalar mass(1.f);
+
+ //rigidbody is dynamic if and only if mass is non zero, otherwise static
+ bool isDynamic = (mass != 0.f);
+
+ btVector3 localInertia(0,0,0);
+ if (isDynamic)
+ colShape->calculateLocalInertia(mass,localInertia);
+
+ startTransform.setOrigin(btVector3(2,10,0));
+
+ //using motionstate is recommended, it provides interpolation capabilities, and only synchronizes 'active' objects
+ btDefaultMotionState* myMotionState = new btDefaultMotionState(startTransform);
+ btRigidBody::btRigidBodyConstructionInfo rbInfo(mass,myMotionState,colShape,localInertia);
+ btRigidBody* body = new btRigidBody(rbInfo);
+
+ dynamicsWorld->addRigidBody(body);
+ }
+
+
+
+/// Do some simulation
+
+
+
+ for (i=0;i<135;i++) // XXX Emscripten
+ {
+ dynamicsWorld->stepSimulation(1.f/60.f,10);
+
+ //print positions of all objects
+ for (int j=dynamicsWorld->getNumCollisionObjects()-1; j>=0 ;j--)
+ {
+ btCollisionObject* obj = dynamicsWorld->getCollisionObjectArray()[j];
+ btRigidBody* body = btRigidBody::upcast(obj);
+ if (body && body->getMotionState())
+ {
+ btTransform trans;
+ body->getMotionState()->getWorldTransform(trans);
+ printf("world pos = %.2f,%.2f,%.2f\n",float(trans.getOrigin().getX()),float(trans.getOrigin().getY()),float(trans.getOrigin().getZ())); // XXX Emscripten
+ }
+ }
+ }
+
+
+ //cleanup in the reverse order of creation/initialization
+
+ //remove the rigidbodies from the dynamics world and delete them
+ for (i=dynamicsWorld->getNumCollisionObjects()-1; i>=0 ;i--)
+ {
+ btCollisionObject* obj = dynamicsWorld->getCollisionObjectArray()[i];
+ btRigidBody* body = btRigidBody::upcast(obj);
+ if (body && body->getMotionState())
+ {
+ delete body->getMotionState();
+ }
+ dynamicsWorld->removeCollisionObject( obj );
+ delete obj;
+ }
+
+ //delete collision shapes
+ for (int j=0;j<collisionShapes.size();j++)
+ {
+ btCollisionShape* shape = collisionShapes[j];
+ collisionShapes[j] = 0;
+ delete shape;
+ }
+
+ //delete dynamics world
+ delete dynamicsWorld;
+
+ //delete solver
+ delete solver;
+
+ //delete broadphase
+ delete overlappingPairCache;
+
+ //delete dispatcher
+ delete dispatcher;
+
+ delete collisionConfiguration;
+
+ //next line is optional: it will be cleared by the destructor when the array goes out of scope
+ collisionShapes.clear();
+
+}
+
diff --git a/tests/bullet/Doxyfile b/tests/bullet/Doxyfile
new file mode 100644
index 00000000..17500265
--- /dev/null
+++ b/tests/bullet/Doxyfile
@@ -0,0 +1,768 @@
+# Doxyfile 1.2.4
+
+# This file describes the settings to be used by doxygen for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+PROJECT_NAME = "Bullet Collision Detection & Physics Library"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese,
+# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian,
+# Polish, Portuguese and Slovene.
+
+OUTPUT_LANGUAGE = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these class will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH =
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a class diagram (in Html and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off.
+
+CLASS_DIAGRAMS = YES
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower case letters. If set to YES upper case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# reimplements.
+
+INHERIT_DOCS = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# The ENABLE_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = NO
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = src
+
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+FILE_PATTERNS = *.h *.cpp *.c
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse.
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = YES
+
+HHC_LOCATION = "C:\Program Files\HTML Help Workshop\hhc.exe"
+
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+#HTML_STYLESHEET = "\\server\exchange\Software Development\Documentation\DoxyGen\doxygen.css"
+
+CHM_FILE = BulletDocs.chm
+HHC_LOCATION = "c:\program files\HTML Help Workshop\hhc.exe"
+GENERATE_CHI = YES
+BINARY_TOC = YES
+
+TOC_EXPAND = YES
+
+SHOW_DIRECTORIES = YES
+
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 1
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript and frames is required (for instance Netscape 4.0+
+# or Internet explorer 4.0+).
+
+GENERATE_TREEVIEW = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimised for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using a WORD or other.
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assigments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation. Warning: This feature
+# is still experimental and very incomplete.
+
+GENERATE_XML = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = YES
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH = src
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to
+# YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other
+# documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to
+# YES then doxygen will generate a graph for each documented header file showing
+# the documented files that directly or indirectly include this file
+
+INCLUDED_BY_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+
+# delete intermediate dot files?
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
+
+# The CGI_NAME tag should be the name of the CGI script that
+# starts the search engine (doxysearch) with the correct parameters.
+# A script with this name will be generated by doxygen.
+
+CGI_NAME = search.cgi
+
+# The CGI_URL tag should be the absolute URL to the directory where the
+# cgi binaries are located. See the documentation of your http daemon for
+# details.
+
+CGI_URL =
+
+# The DOC_URL tag should be the absolute URL to the directory where the
+# documentation is located. If left blank the absolute path to the
+# documentation, with file:// prepended to it, will be used.
+
+DOC_URL =
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the
+# documentation is located. If left blank the directory on the local machine
+# will be used.
+
+DOC_ABSPATH =
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
+# is installed.
+
+BIN_ABSPATH = c:\program files\doxygen\bin
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to
+# documentation generated for other projects. This allows doxysearch to search
+# the documentation for these projects as well.
+
+EXT_DOC_PATHS =
diff --git a/tests/bullet/Extras/CMakeLists.txt b/tests/bullet/Extras/CMakeLists.txt
new file mode 100644
index 00000000..0b7ba7a1
--- /dev/null
+++ b/tests/bullet/Extras/CMakeLists.txt
@@ -0,0 +1,7 @@
+SUBDIRS( Serialize ConvexDecomposition GIMPACTUtils )
+
+#Maya Dynamica plugin is moved to http://dynamica.googlecode.com
+
+IF (USE_GLUT AND GLUT_FOUND)
+ SUBDIRS (glui)
+ENDIF ()
diff --git a/tests/bullet/Extras/ConvexDecomposition/CMakeLists.txt b/tests/bullet/Extras/ConvexDecomposition/CMakeLists.txt
new file mode 100644
index 00000000..693e9d26
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/CMakeLists.txt
@@ -0,0 +1,64 @@
+INCLUDE_DIRECTORIES(
+ ${BULLET_PHYSICS_SOURCE_DIR}/Extras/ConvexDecomposition ${BULLET_PHYSICS_SOURCE_DIR}/src
+)
+
+SET(ConvexDecomposition_SRCS
+ bestfitobb.cpp
+ ConvexBuilder.cpp
+ cd_wavefront.cpp
+ fitsphere.cpp
+ meshvolume.cpp
+ raytri.cpp
+ vlookup.cpp
+ bestfit.cpp
+ cd_hull.cpp
+ ConvexDecomposition.cpp
+ concavity.cpp
+ float_math.cpp
+ planetri.cpp
+ splitplane.cpp
+)
+
+SET(ConvexDecomposition_HDRS
+ ConvexDecomposition.h
+ cd_vector.h
+ concavity.h
+ bestfitobb.h
+ ConvexBuilder.h
+ cd_wavefront.h
+ fitsphere.h
+ meshvolume.h
+ raytri.h
+ vlookup.h
+ bestfit.h
+ cd_hull.h
+)
+
+ADD_LIBRARY(ConvexDecomposition ${ConvexDecomposition_SRCS} ${ConvexDecomposition_HDRS})
+SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES SOVERSION ${BULLET_VERSION})
+
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(ConvexDecomposition BulletCollision LinearMath)
+ENDIF (BUILD_SHARED_LIBS)
+
+IF (INSTALL_EXTRA_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ #FILES_MATCHING requires CMake 2.6
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS ConvexDecomposition DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS ConvexDecomposition DESTINATION lib${LIB_SUFFIX})
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN
+".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(ConvexDecomposition PROPERTIES PUBLIC_HEADER "${ConvexDecomposition_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_EXTRA_LIBS)
diff --git a/tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.cpp b/tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.cpp
new file mode 100644
index 00000000..b3d6a8c6
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.cpp
@@ -0,0 +1,373 @@
+#include "float_math.h"
+#include "ConvexBuilder.h"
+#include "meshvolume.h"
+#include "bestfit.h"
+#include <assert.h>
+#include "cd_hull.h"
+
+#include "fitsphere.h"
+#include "bestfitobb.h"
+
+unsigned int MAXDEPTH = 8 ;
+float CONCAVE_PERCENT = 1.0f ;
+float MERGE_PERCENT = 2.0f ;
+
+CHull::CHull(const ConvexResult &result)
+{
+ mResult = new ConvexResult(result);
+ mVolume = computeMeshVolume( result.mHullVertices, result.mHullTcount, result.mHullIndices );
+
+ mDiagonal = getBoundingRegion( result.mHullVcount, result.mHullVertices, sizeof(float)*3, mMin, mMax );
+
+ float dx = mMax[0] - mMin[0];
+ float dy = mMax[1] - mMin[1];
+ float dz = mMax[2] - mMin[2];
+
+ dx*=0.1f; // inflate 1/10th on each edge
+ dy*=0.1f; // inflate 1/10th on each edge
+ dz*=0.1f; // inflate 1/10th on each edge
+
+ mMin[0]-=dx;
+ mMin[1]-=dy;
+ mMin[2]-=dz;
+
+ mMax[0]+=dx;
+ mMax[1]+=dy;
+ mMax[2]+=dz;
+
+
+}
+
+CHull::~CHull(void)
+{
+ delete mResult;
+}
+
+bool CHull::overlap(const CHull &h) const
+{
+ return overlapAABB(mMin,mMax, h.mMin, h.mMax );
+}
+
+
+
+
+ConvexBuilder::ConvexBuilder(ConvexDecompInterface *callback)
+{
+ mCallback = callback;
+}
+
+ConvexBuilder::~ConvexBuilder(void)
+{
+ int i;
+ for (i=0;i<mChulls.size();i++)
+ {
+ CHull *cr = mChulls[i];
+ delete cr;
+ }
+}
+
+bool ConvexBuilder::isDuplicate(unsigned int i1,unsigned int i2,unsigned int i3,
+ unsigned int ci1,unsigned int ci2,unsigned int ci3)
+{
+ unsigned int dcount = 0;
+
+ assert( i1 != i2 && i1 != i3 && i2 != i3 );
+ assert( ci1 != ci2 && ci1 != ci3 && ci2 != ci3 );
+
+ if ( i1 == ci1 || i1 == ci2 || i1 == ci3 ) dcount++;
+ if ( i2 == ci1 || i2 == ci2 || i2 == ci3 ) dcount++;
+ if ( i3 == ci1 || i3 == ci2 || i3 == ci3 ) dcount++;
+
+ return dcount == 3;
+}
+
+void ConvexBuilder::getMesh(const ConvexResult &cr,VertexLookup vc,UintVector &indices)
+{
+ unsigned int *src = cr.mHullIndices;
+
+ for (unsigned int i=0; i<cr.mHullTcount; i++)
+ {
+ unsigned int i1 = *src++;
+ unsigned int i2 = *src++;
+ unsigned int i3 = *src++;
+
+ const float *p1 = &cr.mHullVertices[i1*3];
+ const float *p2 = &cr.mHullVertices[i2*3];
+ const float *p3 = &cr.mHullVertices[i3*3];
+
+ i1 = Vl_getIndex(vc,p1);
+ i2 = Vl_getIndex(vc,p2);
+ i3 = Vl_getIndex(vc,p3);
+
+#if 0
+ bool duplicate = false;
+
+ unsigned int tcount = indices.size()/3;
+ for (unsigned int j=0; j<tcount; j++)
+ {
+ unsigned int ci1 = indices[j*3+0];
+ unsigned int ci2 = indices[j*3+1];
+ unsigned int ci3 = indices[j*3+2];
+ if ( isDuplicate(i1,i2,i3, ci1, ci2, ci3 ) )
+ {
+ duplicate = true;
+ break;
+ }
+ }
+
+ if ( !duplicate )
+ {
+ indices.push_back(i1);
+ indices.push_back(i2);
+ indices.push_back(i3);
+ }
+#endif
+
+ }
+}
+
+CHull * ConvexBuilder::canMerge(CHull *a,CHull *b)
+{
+
+ if ( !a->overlap(*b) ) return 0; // if their AABB's (with a little slop) don't overlap, then return.
+
+ CHull *ret = 0;
+
+ // ok..we are going to combine both meshes into a single mesh
+ // and then we are going to compute the concavity...
+
+ VertexLookup vc = Vl_createVertexLookup();
+
+ UintVector indices;
+
+ getMesh( *a->mResult, vc, indices );
+ getMesh( *b->mResult, vc, indices );
+
+ unsigned int vcount = Vl_getVcount(vc);
+ const float *vertices = Vl_getVertices(vc);
+ unsigned int tcount = indices.size()/3;
+
+ //don't do anything if hull is empty
+ if (!tcount)
+ {
+ Vl_releaseVertexLookup (vc);
+ return 0;
+ }
+
+ HullResult hresult;
+ HullLibrary hl;
+ HullDesc desc;
+
+ desc.SetHullFlag(QF_TRIANGLES);
+
+ desc.mVcount = vcount;
+ desc.mVertices = vertices;
+ desc.mVertexStride = sizeof(float)*3;
+
+ HullError hret = hl.CreateConvexHull(desc,hresult);
+
+ if ( hret == QE_OK )
+ {
+
+ float combineVolume = computeMeshVolume( hresult.mOutputVertices, hresult.mNumFaces, hresult.mIndices );
+ float sumVolume = a->mVolume + b->mVolume;
+
+ float percent = (sumVolume*100) / combineVolume;
+ if ( percent >= (100.0f-MERGE_PERCENT) )
+ {
+ ConvexResult cr(hresult.mNumOutputVertices, hresult.mOutputVertices, hresult.mNumFaces, hresult.mIndices);
+ ret = new CHull(cr);
+ }
+ }
+
+
+ Vl_releaseVertexLookup(vc);
+
+ return ret;
+}
+
+bool ConvexBuilder::combineHulls(void)
+{
+
+ bool combine = false;
+
+ sortChulls(mChulls); // sort the convex hulls, largest volume to least...
+
+ CHullVector output; // the output hulls...
+
+
+ int i;
+
+ for (i=0;i<mChulls.size() && !combine; ++i)
+ {
+ CHull *cr = mChulls[i];
+
+ int j;
+ for (j=0;j<mChulls.size();j++)
+ {
+ CHull *match = mChulls[j];
+
+ if ( cr != match ) // don't try to merge a hull with itself, that be stoopid
+ {
+
+ CHull *merge = canMerge(cr,match); // if we can merge these two....
+
+ if ( merge )
+ {
+
+ output.push_back(merge);
+
+
+ ++i;
+ while ( i != mChulls.size() )
+ {
+ CHull *cr = mChulls[i];
+ if ( cr != match )
+ {
+ output.push_back(cr);
+ }
+ i++;
+ }
+
+ delete cr;
+ delete match;
+ combine = true;
+ break;
+ }
+ }
+ }
+
+ if ( combine )
+ {
+ break;
+ }
+ else
+ {
+ output.push_back(cr);
+ }
+
+ }
+
+ if ( combine )
+ {
+ mChulls.clear();
+ mChulls = output;
+ output.clear();
+ }
+
+
+ return combine;
+}
+
+unsigned int ConvexBuilder::process(const DecompDesc &desc)
+{
+
+ unsigned int ret = 0;
+
+ MAXDEPTH = desc.mDepth;
+ CONCAVE_PERCENT = desc.mCpercent;
+ MERGE_PERCENT = desc.mPpercent;
+
+
+ calcConvexDecomposition(desc.mVcount, desc.mVertices, desc.mTcount, desc.mIndices,this,0,0);
+
+
+ while ( combineHulls() ); // keep combinging hulls until I can't combine any more...
+
+ int i;
+ for (i=0;i<mChulls.size();i++)
+ {
+ CHull *cr = mChulls[i];
+
+ // before we hand it back to the application, we need to regenerate the hull based on the
+ // limits given by the user.
+
+ const ConvexResult &c = *cr->mResult; // the high resolution hull...
+
+ HullResult result;
+ HullLibrary hl;
+ HullDesc hdesc;
+
+ hdesc.SetHullFlag(QF_TRIANGLES);
+
+ hdesc.mVcount = c.mHullVcount;
+ hdesc.mVertices = c.mHullVertices;
+ hdesc.mVertexStride = sizeof(float)*3;
+ hdesc.mMaxVertices = desc.mMaxVertices; // maximum number of vertices allowed in the output
+
+ if ( desc.mSkinWidth )
+ {
+ hdesc.mSkinWidth = desc.mSkinWidth;
+ hdesc.SetHullFlag(QF_SKIN_WIDTH); // do skin width computation.
+ }
+
+ HullError ret = hl.CreateConvexHull(hdesc,result);
+
+ if ( ret == QE_OK )
+ {
+ ConvexResult r(result.mNumOutputVertices, result.mOutputVertices, result.mNumFaces, result.mIndices);
+
+ r.mHullVolume = computeMeshVolume( result.mOutputVertices, result.mNumFaces, result.mIndices ); // the volume of the hull.
+
+ // compute the best fit OBB
+ computeBestFitOBB( result.mNumOutputVertices, result.mOutputVertices, sizeof(float)*3, r.mOBBSides, r.mOBBTransform );
+
+ r.mOBBVolume = r.mOBBSides[0] * r.mOBBSides[1] *r.mOBBSides[2]; // compute the OBB volume.
+
+ fm_getTranslation( r.mOBBTransform, r.mOBBCenter ); // get the translation component of the 4x4 matrix.
+
+ fm_matrixToQuat( r.mOBBTransform, r.mOBBOrientation ); // extract the orientation as a quaternion.
+
+ r.mSphereRadius = computeBoundingSphere( result.mNumOutputVertices, result.mOutputVertices, r.mSphereCenter );
+ r.mSphereVolume = fm_sphereVolume( r.mSphereRadius );
+
+
+ mCallback->ConvexDecompResult(r);
+ }
+
+ hl.ReleaseResult (result);
+
+
+ delete cr;
+ }
+
+ ret = mChulls.size();
+
+ mChulls.clear();
+
+ return ret;
+}
+
+
+void ConvexBuilder::ConvexDebugTri(const float *p1,const float *p2,const float *p3,unsigned int color)
+{
+ mCallback->ConvexDebugTri(p1,p2,p3,color);
+}
+
+void ConvexBuilder::ConvexDebugOBB(const float *sides, const float *matrix,unsigned int color)
+{
+ mCallback->ConvexDebugOBB(sides,matrix,color);
+}
+void ConvexBuilder::ConvexDebugPoint(const float *p,float dist,unsigned int color)
+{
+ mCallback->ConvexDebugPoint(p,dist,color);
+}
+
+void ConvexBuilder::ConvexDebugBound(const float *bmin,const float *bmax,unsigned int color)
+{
+ mCallback->ConvexDebugBound(bmin,bmax,color);
+}
+
+void ConvexBuilder::ConvexDecompResult(ConvexResult &result)
+{
+ CHull *ch = new CHull(result);
+ mChulls.push_back(ch);
+}
+
+void ConvexBuilder::sortChulls(CHullVector &hulls)
+{
+ hulls.quickSort(CHullSort());
+ //hulls.heapSort(CHullSort());
+}
+
+
diff --git a/tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.h b/tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.h
new file mode 100644
index 00000000..b1d98cb6
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/ConvexBuilder.h
@@ -0,0 +1,112 @@
+#ifndef CONVEX_BUILDER_H
+#define CONVEX_BUILDER_H
+
+/*----------------------------------------------------------------------
+Copyright (c) 2004 Open Dynamics Framework Group
+www.physicstools.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided
+that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions
+and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+#include "ConvexDecomposition.h"
+#include "vlookup.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+using namespace ConvexDecomposition;
+
+
+class CHull
+{
+public:
+ CHull(const ConvexResult &result);
+
+ ~CHull(void);
+
+ bool overlap(const CHull &h) const;
+
+ float mMin[3];
+ float mMax[3];
+ float mVolume;
+ float mDiagonal; // long edge..
+ ConvexResult *mResult;
+};
+
+// Usage: std::sort( list.begin(), list.end(), StringSortRef() );
+class CHullSort
+{
+public:
+
+ inline bool operator()(const CHull *a,const CHull *b) const
+ {
+ return a->mVolume < b->mVolume;
+ }
+};
+
+
+typedef btAlignedObjectArray< CHull * > CHullVector;
+
+
+
+class ConvexBuilder : public ConvexDecompInterface
+{
+public:
+ ConvexBuilder(ConvexDecompInterface *callback);
+
+ virtual ~ConvexBuilder(void);
+
+ bool isDuplicate(unsigned int i1,unsigned int i2,unsigned int i3,
+ unsigned int ci1,unsigned int ci2,unsigned int ci3);
+
+ void getMesh(const ConvexResult &cr,VertexLookup vc,UintVector &indices);
+
+ CHull * canMerge(CHull *a,CHull *b);
+
+ bool combineHulls(void);
+
+ unsigned int process(const DecompDesc &desc);
+
+ virtual void ConvexDebugTri(const float *p1,const float *p2,const float *p3,unsigned int color);
+
+ virtual void ConvexDebugOBB(const float *sides, const float *matrix,unsigned int color);
+ virtual void ConvexDebugPoint(const float *p,float dist,unsigned int color);
+
+ virtual void ConvexDebugBound(const float *bmin,const float *bmax,unsigned int color);
+
+ virtual void ConvexDecompResult(ConvexResult &result);
+
+ void sortChulls(CHullVector &hulls);
+
+ CHullVector mChulls;
+ ConvexDecompInterface *mCallback;
+};
+
+#endif //CONVEX_BUILDER_H
+
diff --git a/tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.cpp b/tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.cpp
new file mode 100644
index 00000000..572d25f5
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.cpp
@@ -0,0 +1,375 @@
+#include "float_math.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+#include "ConvexDecomposition.h"
+#include "cd_vector.h"
+#include "cd_hull.h"
+#include "bestfit.h"
+#include "planetri.h"
+#include "vlookup.h"
+#include "splitplane.h"
+#include "meshvolume.h"
+#include "concavity.h"
+#include "bestfitobb.h"
+#include "float_math.h"
+#include "fitsphere.h"
+
+#define SHOW_MESH 0
+#define MAKE_MESH 1
+
+
+using namespace ConvexDecomposition;
+
+
+
+namespace ConvexDecomposition
+{
+
+class FaceTri
+{
+public:
+ FaceTri(void) { };
+ FaceTri(const float *vertices,unsigned int i1,unsigned int i2,unsigned int i3)
+ {
+ mP1.Set( &vertices[i1*3] );
+ mP2.Set( &vertices[i2*3] );
+ mP3.Set( &vertices[i3*3] );
+ }
+
+ Vector3d mP1;
+ Vector3d mP2;
+ Vector3d mP3;
+ Vector3d mNormal;
+
+};
+
+
+void addTri(VertexLookup vl,UintVector &list,const Vector3d &p1,const Vector3d &p2,const Vector3d &p3)
+{
+ unsigned int i1 = Vl_getIndex(vl, p1.Ptr() );
+ unsigned int i2 = Vl_getIndex(vl, p2.Ptr() );
+ unsigned int i3 = Vl_getIndex(vl, p3.Ptr() );
+
+ // do *not* process degenerate triangles!
+
+ if ( i1 != i2 && i1 != i3 && i2 != i3 )
+ {
+ list.push_back(i1);
+ list.push_back(i2);
+ list.push_back(i3);
+ }
+}
+
+
+void calcConvexDecomposition(unsigned int vcount,
+ const float *vertices,
+ unsigned int tcount,
+ const unsigned int *indices,
+ ConvexDecompInterface *callback,
+ float masterVolume,
+ unsigned int depth)
+
+{
+
+ float plane[4];
+
+ bool split = false;
+
+
+ if ( depth < MAXDEPTH )
+ {
+
+ float volume;
+ float c = computeConcavity( vcount, vertices, tcount, indices, callback, plane, volume );
+
+ if ( depth == 0 )
+ {
+ masterVolume = volume;
+ }
+
+ float percent = (c*100.0f)/masterVolume;
+
+ if ( percent > CONCAVE_PERCENT ) // if great than 5% of the total volume is concave, go ahead and keep splitting.
+ {
+ split = true;
+ }
+
+ }
+
+ if ( depth >= MAXDEPTH || !split )
+ {
+
+#if 1
+
+ HullResult result;
+ HullLibrary hl;
+ HullDesc desc;
+
+ desc.SetHullFlag(QF_TRIANGLES);
+
+ desc.mVcount = vcount;
+ desc.mVertices = vertices;
+ desc.mVertexStride = sizeof(float)*3;
+
+ HullError ret = hl.CreateConvexHull(desc,result);
+
+ if ( ret == QE_OK )
+ {
+
+ ConvexResult r(result.mNumOutputVertices, result.mOutputVertices, result.mNumFaces, result.mIndices);
+
+
+ callback->ConvexDecompResult(r);
+ }
+
+
+#else
+
+ static unsigned int colors[8] =
+ {
+ 0xFF0000,
+ 0x00FF00,
+ 0x0000FF,
+ 0xFFFF00,
+ 0x00FFFF,
+ 0xFF00FF,
+ 0xFFFFFF,
+ 0xFF8040
+ };
+
+ static int count = 0;
+
+ count++;
+
+ if ( count == 8 ) count = 0;
+
+ assert( count >= 0 && count < 8 );
+
+ unsigned int color = colors[count];
+
+ const unsigned int *source = indices;
+
+ for (unsigned int i=0; i<tcount; i++)
+ {
+
+ unsigned int i1 = *source++;
+ unsigned int i2 = *source++;
+ unsigned int i3 = *source++;
+
+ FaceTri t(vertices, i1, i2, i3 );
+
+ callback->ConvexDebugTri( t.mP1.Ptr(), t.mP2.Ptr(), t.mP3.Ptr(), color );
+
+ }
+#endif
+
+ hl.ReleaseResult (result);
+ return;
+
+ }
+
+ UintVector ifront;
+ UintVector iback;
+
+ VertexLookup vfront = Vl_createVertexLookup();
+ VertexLookup vback = Vl_createVertexLookup();
+
+
+ bool showmesh = false;
+ #if SHOW_MESH
+ showmesh = true;
+ #endif
+
+ if ( 0 )
+ {
+ showmesh = true;
+ for (float x=-1; x<1; x+=0.10f)
+ {
+ for (float y=0; y<1; y+=0.10f)
+ {
+ for (float z=-1; z<1; z+=0.04f)
+ {
+ float d = x*plane[0] + y*plane[1] + z*plane[2] + plane[3];
+ Vector3d p(x,y,z);
+ if ( d >= 0 )
+ callback->ConvexDebugPoint(p.Ptr(), 0.02f, 0x00FF00);
+ else
+ callback->ConvexDebugPoint(p.Ptr(), 0.02f, 0xFF0000);
+ }
+ }
+ }
+ }
+
+ if ( 1 )
+ {
+ // ok..now we are going to 'split' all of the input triangles against this plane!
+ const unsigned int *source = indices;
+ for (unsigned int i=0; i<tcount; i++)
+ {
+ unsigned int i1 = *source++;
+ unsigned int i2 = *source++;
+ unsigned int i3 = *source++;
+
+ FaceTri t(vertices, i1, i2, i3 );
+
+ Vector3d front[4];
+ Vector3d back[4];
+
+ unsigned int fcount=0;
+ unsigned int bcount=0;
+
+ PlaneTriResult result;
+
+ result = planeTriIntersection(plane,t.mP1.Ptr(),sizeof(Vector3d),0.00001f,front[0].Ptr(),fcount,back[0].Ptr(),bcount );
+
+ if( fcount > 4 || bcount > 4 )
+ {
+ result = planeTriIntersection(plane,t.mP1.Ptr(),sizeof(Vector3d),0.00001f,front[0].Ptr(),fcount,back[0].Ptr(),bcount );
+ }
+
+ switch ( result )
+ {
+ case PTR_FRONT:
+
+ assert( fcount == 3 );
+
+ if ( showmesh )
+ callback->ConvexDebugTri( front[0].Ptr(), front[1].Ptr(), front[2].Ptr(), 0x00FF00 );
+
+ #if MAKE_MESH
+
+ addTri( vfront, ifront, front[0], front[1], front[2] );
+
+
+ #endif
+
+ break;
+ case PTR_BACK:
+ assert( bcount == 3 );
+
+ if ( showmesh )
+ callback->ConvexDebugTri( back[0].Ptr(), back[1].Ptr(), back[2].Ptr(), 0xFFFF00 );
+
+ #if MAKE_MESH
+
+ addTri( vback, iback, back[0], back[1], back[2] );
+
+ #endif
+
+ break;
+ case PTR_SPLIT:
+
+ assert( fcount >= 3 && fcount <= 4);
+ assert( bcount >= 3 && bcount <= 4);
+
+ #if MAKE_MESH
+
+ addTri( vfront, ifront, front[0], front[1], front[2] );
+ addTri( vback, iback, back[0], back[1], back[2] );
+
+
+ if ( fcount == 4 )
+ {
+ addTri( vfront, ifront, front[0], front[2], front[3] );
+ }
+
+ if ( bcount == 4 )
+ {
+ addTri( vback, iback, back[0], back[2], back[3] );
+ }
+
+ #endif
+
+ if ( showmesh )
+ {
+ callback->ConvexDebugTri( front[0].Ptr(), front[1].Ptr(), front[2].Ptr(), 0x00D000 );
+ callback->ConvexDebugTri( back[0].Ptr(), back[1].Ptr(), back[2].Ptr(), 0xD0D000 );
+
+ if ( fcount == 4 )
+ {
+ callback->ConvexDebugTri( front[0].Ptr(), front[2].Ptr(), front[3].Ptr(), 0x00D000 );
+ }
+ if ( bcount == 4 )
+ {
+ callback->ConvexDebugTri( back[0].Ptr(), back[2].Ptr(), back[3].Ptr(), 0xD0D000 );
+ }
+ }
+
+ break;
+ }
+ }
+
+ // ok... here we recursively call
+ if ( ifront.size() )
+ {
+ unsigned int vcount = Vl_getVcount(vfront);
+ const float *vertices = Vl_getVertices(vfront);
+ unsigned int tcount = ifront.size()/3;
+
+ calcConvexDecomposition(vcount, vertices, tcount, &ifront[0], callback, masterVolume, depth+1);
+
+ }
+
+ ifront.clear();
+
+ Vl_releaseVertexLookup(vfront);
+
+ if ( iback.size() )
+ {
+ unsigned int vcount = Vl_getVcount(vback);
+ const float *vertices = Vl_getVertices(vback);
+ unsigned int tcount = iback.size()/3;
+
+ calcConvexDecomposition(vcount, vertices, tcount, &iback[0], callback, masterVolume, depth+1);
+
+ }
+
+ iback.clear();
+ Vl_releaseVertexLookup(vback);
+
+ }
+}
+
+
+
+
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.h b/tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.h
new file mode 100644
index 00000000..2886c39a
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/ConvexDecomposition.h
@@ -0,0 +1,220 @@
+#ifndef CONVEX_DECOMPOSITION_H
+
+#define CONVEX_DECOMPOSITION_H
+
+/*----------------------------------------------------------------------
+Copyright (c) 2004 Open Dynamics Framework Group
+www.physicstools.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided
+that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list of conditions
+and the following disclaimer.
+
+Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+#ifdef _WIN32
+#include <memory.h> //memcpy
+#endif
+#include <string.h>
+#include <stdio.h>
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+
+extern unsigned int MAXDEPTH ;
+extern float CONCAVE_PERCENT ;
+extern float MERGE_PERCENT ;
+
+
+typedef btAlignedObjectArray< unsigned int > UintVector;
+
+
+
+namespace ConvexDecomposition
+{
+
+ class ConvexResult
+ {
+ public:
+ ConvexResult(void)
+ {
+ mHullVcount = 0;
+ mHullVertices = 0;
+ mHullTcount = 0;
+ mHullIndices = 0;
+ }
+
+ ConvexResult(unsigned int hvcount,const float *hvertices,unsigned int htcount,const unsigned int *hindices)
+ {
+ mHullVcount = hvcount;
+ if ( mHullVcount )
+ {
+ mHullVertices = new float[mHullVcount*sizeof(float)*3];
+ memcpy(mHullVertices, hvertices, sizeof(float)*3*mHullVcount );
+ }
+ else
+ {
+ mHullVertices = 0;
+ }
+
+ mHullTcount = htcount;
+
+ if ( mHullTcount )
+ {
+ mHullIndices = new unsigned int[sizeof(unsigned int)*mHullTcount*3];
+ memcpy(mHullIndices,hindices, sizeof(unsigned int)*mHullTcount*3 );
+ }
+ else
+ {
+ mHullIndices = 0;
+ }
+
+ }
+
+ ConvexResult(const ConvexResult &r)
+ {
+ mHullVcount = r.mHullVcount;
+ if ( mHullVcount )
+ {
+ mHullVertices = new float[mHullVcount*sizeof(float)*3];
+ memcpy(mHullVertices, r.mHullVertices, sizeof(float)*3*mHullVcount );
+ }
+ else
+ {
+ mHullVertices = 0;
+ }
+ mHullTcount = r.mHullTcount;
+ if ( mHullTcount )
+ {
+ mHullIndices = new unsigned int[sizeof(unsigned int)*mHullTcount*3];
+ memcpy(mHullIndices, r.mHullIndices, sizeof(unsigned int)*mHullTcount*3 );
+ }
+ else
+ {
+ mHullIndices = 0;
+ }
+ }
+
+ ~ConvexResult(void)
+ {
+ delete [] mHullVertices;
+ delete [] mHullIndices;
+ }
+
+ // the convex hull.
+ unsigned int mHullVcount;
+ float * mHullVertices;
+ unsigned int mHullTcount;
+ unsigned int *mHullIndices;
+
+ float mHullVolume; // the volume of the convex hull.
+
+ float mOBBSides[3]; // the width, height and breadth of the best fit OBB
+ float mOBBCenter[3]; // the center of the OBB
+ float mOBBOrientation[4]; // the quaternion rotation of the OBB.
+ float mOBBTransform[16]; // the 4x4 transform of the OBB.
+ float mOBBVolume; // the volume of the OBB
+
+ float mSphereRadius; // radius and center of best fit sphere
+ float mSphereCenter[3];
+ float mSphereVolume; // volume of the best fit sphere
+
+
+
+ };
+
+ class ConvexDecompInterface
+ {
+ public:
+ virtual ~ConvexDecompInterface() {};
+ virtual void ConvexDebugTri(const float *p1,const float *p2,const float *p3,unsigned int color) { };
+ virtual void ConvexDebugPoint(const float *p,float dist,unsigned int color) { };
+ virtual void ConvexDebugBound(const float *bmin,const float *bmax,unsigned int color) { };
+ virtual void ConvexDebugOBB(const float *sides, const float *matrix,unsigned int color) { };
+
+ virtual void ConvexDecompResult(ConvexResult &result) = 0;
+
+
+
+ };
+
+ // just to avoid passing a zillion parameters to the method the
+ // options are packed into this descriptor.
+ class DecompDesc
+ {
+ public:
+ DecompDesc(void)
+ {
+ mVcount = 0;
+ mVertices = 0;
+ mTcount = 0;
+ mIndices = 0;
+ mDepth = 5;
+ mCpercent = 5;
+ mPpercent = 5;
+ mMaxVertices = 32;
+ mSkinWidth = 0;
+ mCallback = 0;
+ }
+
+ // describes the input triangle.
+ unsigned int mVcount; // the number of vertices in the source mesh.
+ const float *mVertices; // start of the vertex position array. Assumes a stride of 3 floats.
+ unsigned int mTcount; // the number of triangles in the source mesh.
+ unsigned int *mIndices; // the indexed triangle list array (zero index based)
+
+ // options
+ unsigned int mDepth; // depth to split, a maximum of 10, generally not over 7.
+ float mCpercent; // the concavity threshold percentage. 0=20 is reasonable.
+ float mPpercent; // the percentage volume conservation threshold to collapse hulls. 0-30 is reasonable.
+
+ // hull output limits.
+ unsigned int mMaxVertices; // maximum number of vertices in the output hull. Recommended 32 or less.
+ float mSkinWidth; // a skin width to apply to the output hulls.
+
+ ConvexDecompInterface *mCallback; // the interface to receive back the results.
+
+ };
+
+ // perform approximate convex decomposition on a mesh.
+ unsigned int performConvexDecomposition(const DecompDesc &desc); // returns the number of hulls produced.
+
+
+ void calcConvexDecomposition(unsigned int vcount,
+ const float *vertices,
+ unsigned int tcount,
+ const unsigned int *indices,
+ ConvexDecompInterface *callback,
+ float masterVolume,
+ unsigned int depth);
+
+
+}
+
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/bestfit.cpp b/tests/bullet/Extras/ConvexDecomposition/bestfit.cpp
new file mode 100644
index 00000000..e6469f6f
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/bestfit.cpp
@@ -0,0 +1,466 @@
+#include "float_math.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <math.h>
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+// Geometric Tools, Inc.
+// http://www.geometrictools.com
+// Copyright (c) 1998-2006. All Rights Reserved
+//
+// The Wild Magic Library (WM3) source code is supplied under the terms of
+// the license agreement
+// http://www.geometrictools.com/License/WildMagic3License.pdf
+// and may not be copied or disclosed except in accordance with the terms
+// of that agreement.
+
+#include "bestfit.h"
+
+namespace BestFit
+{
+
+class Vec3
+{
+public:
+ Vec3(void) { };
+ Vec3(float _x,float _y,float _z) { x = _x; y = _y; z = _z; };
+
+
+ float dot(const Vec3 &v)
+ {
+ return x*v.x + y*v.y + z*v.z; // the dot product
+ }
+
+ float x;
+ float y;
+ float z;
+};
+
+
+class Eigen
+{
+public:
+
+
+ void DecrSortEigenStuff(void)
+ {
+ Tridiagonal(); //diagonalize the matrix.
+ QLAlgorithm(); //
+ DecreasingSort();
+ GuaranteeRotation();
+ }
+
+ void Tridiagonal(void)
+ {
+ float fM00 = mElement[0][0];
+ float fM01 = mElement[0][1];
+ float fM02 = mElement[0][2];
+ float fM11 = mElement[1][1];
+ float fM12 = mElement[1][2];
+ float fM22 = mElement[2][2];
+
+ m_afDiag[0] = fM00;
+ m_afSubd[2] = 0;
+ if (fM02 != (float)0.0)
+ {
+ float fLength = sqrtf(fM01*fM01+fM02*fM02);
+ float fInvLength = ((float)1.0)/fLength;
+ fM01 *= fInvLength;
+ fM02 *= fInvLength;
+ float fQ = ((float)2.0)*fM01*fM12+fM02*(fM22-fM11);
+ m_afDiag[1] = fM11+fM02*fQ;
+ m_afDiag[2] = fM22-fM02*fQ;
+ m_afSubd[0] = fLength;
+ m_afSubd[1] = fM12-fM01*fQ;
+ mElement[0][0] = (float)1.0;
+ mElement[0][1] = (float)0.0;
+ mElement[0][2] = (float)0.0;
+ mElement[1][0] = (float)0.0;
+ mElement[1][1] = fM01;
+ mElement[1][2] = fM02;
+ mElement[2][0] = (float)0.0;
+ mElement[2][1] = fM02;
+ mElement[2][2] = -fM01;
+ m_bIsRotation = false;
+ }
+ else
+ {
+ m_afDiag[1] = fM11;
+ m_afDiag[2] = fM22;
+ m_afSubd[0] = fM01;
+ m_afSubd[1] = fM12;
+ mElement[0][0] = (float)1.0;
+ mElement[0][1] = (float)0.0;
+ mElement[0][2] = (float)0.0;
+ mElement[1][0] = (float)0.0;
+ mElement[1][1] = (float)1.0;
+ mElement[1][2] = (float)0.0;
+ mElement[2][0] = (float)0.0;
+ mElement[2][1] = (float)0.0;
+ mElement[2][2] = (float)1.0;
+ m_bIsRotation = true;
+ }
+ }
+
+ bool QLAlgorithm(void)
+ {
+ const int iMaxIter = 32;
+
+ for (int i0 = 0; i0 <3; i0++)
+ {
+ int i1;
+ for (i1 = 0; i1 < iMaxIter; i1++)
+ {
+ int i2;
+ for (i2 = i0; i2 <= (3-2); i2++)
+ {
+ float fTmp = fabsf(m_afDiag[i2]) + fabsf(m_afDiag[i2+1]);
+ if ( fabsf(m_afSubd[i2]) + fTmp == fTmp )
+ break;
+ }
+ if (i2 == i0)
+ {
+ break;
+ }
+
+ float fG = (m_afDiag[i0+1] - m_afDiag[i0])/(((float)2.0) * m_afSubd[i0]);
+ float fR = sqrtf(fG*fG+(float)1.0);
+ if (fG < (float)0.0)
+ {
+ fG = m_afDiag[i2]-m_afDiag[i0]+m_afSubd[i0]/(fG-fR);
+ }
+ else
+ {
+ fG = m_afDiag[i2]-m_afDiag[i0]+m_afSubd[i0]/(fG+fR);
+ }
+ float fSin = (float)1.0, fCos = (float)1.0, fP = (float)0.0;
+ for (int i3 = i2-1; i3 >= i0; i3--)
+ {
+ float fF = fSin*m_afSubd[i3];
+ float fB = fCos*m_afSubd[i3];
+ if (fabsf(fF) >= fabsf(fG))
+ {
+ fCos = fG/fF;
+ fR = sqrtf(fCos*fCos+(float)1.0);
+ m_afSubd[i3+1] = fF*fR;
+ fSin = ((float)1.0)/fR;
+ fCos *= fSin;
+ }
+ else
+ {
+ fSin = fF/fG;
+ fR = sqrtf(fSin*fSin+(float)1.0);
+ m_afSubd[i3+1] = fG*fR;
+ fCos = ((float)1.0)/fR;
+ fSin *= fCos;
+ }
+ fG = m_afDiag[i3+1]-fP;
+ fR = (m_afDiag[i3]-fG)*fSin+((float)2.0)*fB*fCos;
+ fP = fSin*fR;
+ m_afDiag[i3+1] = fG+fP;
+ fG = fCos*fR-fB;
+ for (int i4 = 0; i4 < 3; i4++)
+ {
+ fF = mElement[i4][i3+1];
+ mElement[i4][i3+1] = fSin*mElement[i4][i3]+fCos*fF;
+ mElement[i4][i3] = fCos*mElement[i4][i3]-fSin*fF;
+ }
+ }
+ m_afDiag[i0] -= fP;
+ m_afSubd[i0] = fG;
+ m_afSubd[i2] = (float)0.0;
+ }
+ if (i1 == iMaxIter)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ void DecreasingSort(void)
+ {
+ //sort eigenvalues in decreasing order, e[0] >= ... >= e[iSize-1]
+ for (int i0 = 0, i1; i0 <= 3-2; i0++)
+ {
+ // locate maximum eigenvalue
+ i1 = i0;
+ float fMax = m_afDiag[i1];
+ int i2;
+ for (i2 = i0+1; i2 < 3; i2++)
+ {
+ if (m_afDiag[i2] > fMax)
+ {
+ i1 = i2;
+ fMax = m_afDiag[i1];
+ }
+ }
+
+ if (i1 != i0)
+ {
+ // swap eigenvalues
+ m_afDiag[i1] = m_afDiag[i0];
+ m_afDiag[i0] = fMax;
+ // swap eigenvectors
+ for (i2 = 0; i2 < 3; i2++)
+ {
+ float fTmp = mElement[i2][i0];
+ mElement[i2][i0] = mElement[i2][i1];
+ mElement[i2][i1] = fTmp;
+ m_bIsRotation = !m_bIsRotation;
+ }
+ }
+ }
+ }
+
+
+ void GuaranteeRotation(void)
+ {
+ if (!m_bIsRotation)
+ {
+ // change sign on the first column
+ for (int iRow = 0; iRow <3; iRow++)
+ {
+ mElement[iRow][0] = -mElement[iRow][0];
+ }
+ }
+ }
+
+ float mElement[3][3];
+ float m_afDiag[3];
+ float m_afSubd[3];
+ bool m_bIsRotation;
+};
+
+}
+
+
+using namespace BestFit;
+
+
+bool getBestFitPlane(unsigned int vcount,
+ const float *points,
+ unsigned int vstride,
+ const float *weights,
+ unsigned int wstride,
+ float *plane)
+{
+ bool ret = false;
+
+ Vec3 kOrigin(0,0,0);
+
+ float wtotal = 0;
+
+ if ( 1 )
+ {
+ const char *source = (const char *) points;
+ const char *wsource = (const char *) weights;
+
+ for (unsigned int i=0; i<vcount; i++)
+ {
+
+ const float *p = (const float *) source;
+
+ float w = 1;
+
+ if ( wsource )
+ {
+ const float *ws = (const float *) wsource;
+ w = *ws; //
+ wsource+=wstride;
+ }
+
+ kOrigin.x+=p[0]*w;
+ kOrigin.y+=p[1]*w;
+ kOrigin.z+=p[2]*w;
+
+ wtotal+=w;
+
+ source+=vstride;
+ }
+ }
+
+ float recip = 1.0f / wtotal; // reciprocol of total weighting
+
+ kOrigin.x*=recip;
+ kOrigin.y*=recip;
+ kOrigin.z*=recip;
+
+
+ float fSumXX=0;
+ float fSumXY=0;
+ float fSumXZ=0;
+
+ float fSumYY=0;
+ float fSumYZ=0;
+ float fSumZZ=0;
+
+
+ if ( 1 )
+ {
+ const char *source = (const char *) points;
+ const char *wsource = (const char *) weights;
+
+ for (unsigned int i=0; i<vcount; i++)
+ {
+
+ const float *p = (const float *) source;
+
+ float w = 1;
+
+ if ( wsource )
+ {
+ const float *ws = (const float *) wsource;
+ w = *ws; //
+ wsource+=wstride;
+ }
+
+ Vec3 kDiff;
+
+ kDiff.x = w*(p[0] - kOrigin.x); // apply vertex weighting!
+ kDiff.y = w*(p[1] - kOrigin.y);
+ kDiff.z = w*(p[2] - kOrigin.z);
+
+ fSumXX+= kDiff.x * kDiff.x; // sume of the squares of the differences.
+ fSumXY+= kDiff.x * kDiff.y; // sume of the squares of the differences.
+ fSumXZ+= kDiff.x * kDiff.z; // sume of the squares of the differences.
+
+ fSumYY+= kDiff.y * kDiff.y;
+ fSumYZ+= kDiff.y * kDiff.z;
+ fSumZZ+= kDiff.z * kDiff.z;
+
+
+ source+=vstride;
+ }
+ }
+
+ fSumXX *= recip;
+ fSumXY *= recip;
+ fSumXZ *= recip;
+ fSumYY *= recip;
+ fSumYZ *= recip;
+ fSumZZ *= recip;
+
+ // setup the eigensolver
+ Eigen kES;
+
+ kES.mElement[0][0] = fSumXX;
+ kES.mElement[0][1] = fSumXY;
+ kES.mElement[0][2] = fSumXZ;
+
+ kES.mElement[1][0] = fSumXY;
+ kES.mElement[1][1] = fSumYY;
+ kES.mElement[1][2] = fSumYZ;
+
+ kES.mElement[2][0] = fSumXZ;
+ kES.mElement[2][1] = fSumYZ;
+ kES.mElement[2][2] = fSumZZ;
+
+ // compute eigenstuff, smallest eigenvalue is in last position
+ kES.DecrSortEigenStuff();
+
+ Vec3 kNormal;
+
+ kNormal.x = kES.mElement[0][2];
+ kNormal.y = kES.mElement[1][2];
+ kNormal.z = kES.mElement[2][2];
+
+ // the minimum energy
+ plane[0] = kNormal.x;
+ plane[1] = kNormal.y;
+ plane[2] = kNormal.z;
+
+ plane[3] = 0 - kNormal.dot(kOrigin);
+
+ return ret;
+}
+
+
+
+float getBoundingRegion(unsigned int vcount,const float *points,unsigned int pstride,float *bmin,float *bmax) // returns the diagonal distance
+{
+
+ const unsigned char *source = (const unsigned char *) points;
+
+ bmin[0] = points[0];
+ bmin[1] = points[1];
+ bmin[2] = points[2];
+
+ bmax[0] = points[0];
+ bmax[1] = points[1];
+ bmax[2] = points[2];
+
+
+ for (unsigned int i=1; i<vcount; i++)
+ {
+ source+=pstride;
+ const float *p = (const float *) source;
+
+ if ( p[0] < bmin[0] ) bmin[0] = p[0];
+ if ( p[1] < bmin[1] ) bmin[1] = p[1];
+ if ( p[2] < bmin[2] ) bmin[2] = p[2];
+
+ if ( p[0] > bmax[0] ) bmax[0] = p[0];
+ if ( p[1] > bmax[1] ) bmax[1] = p[1];
+ if ( p[2] > bmax[2] ) bmax[2] = p[2];
+
+ }
+
+ float dx = bmax[0] - bmin[0];
+ float dy = bmax[1] - bmin[1];
+ float dz = bmax[2] - bmin[2];
+
+ return sqrtf( dx*dx + dy*dy + dz*dz );
+
+}
+
+
+bool overlapAABB(const float *bmin1,const float *bmax1,const float *bmin2,const float *bmax2) // return true if the two AABB's overlap.
+{
+ if ( bmax2[0] < bmin1[0] ) return false; // if the maximum is less than our minimum on any axis
+ if ( bmax2[1] < bmin1[1] ) return false;
+ if ( bmax2[2] < bmin1[2] ) return false;
+
+ if ( bmin2[0] > bmax1[0] ) return false; // if the minimum is greater than our maximum on any axis
+ if ( bmin2[1] > bmax1[1] ) return false; // if the minimum is greater than our maximum on any axis
+ if ( bmin2[2] > bmax1[2] ) return false; // if the minimum is greater than our maximum on any axis
+
+
+ return true; // the extents overlap
+}
+
+
diff --git a/tests/bullet/Extras/ConvexDecomposition/bestfit.h b/tests/bullet/Extras/ConvexDecomposition/bestfit.h
new file mode 100644
index 00000000..f2e78e5a
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/bestfit.h
@@ -0,0 +1,65 @@
+#ifndef BEST_FIT_H
+
+#define BEST_FIT_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+// This routine was released in 'snippet' form
+// by John W. Ratcliff mailto:jratcliff@infiniplex.net
+// on March 22, 2006.
+//
+// This routine computes the 'best fit' plane equation to
+// a set of input data points with an optional per vertex
+// weighting component.
+//
+// The implementation for this was lifted directly from
+// David Eberly's Magic Software implementation.
+
+// computes the best fit plane to a collection of data points.
+// returns the plane equation as A,B,C,D format. (Ax+By+Cz+D)
+
+bool getBestFitPlane(unsigned int vcount, // number of input data points
+ const float *points, // starting address of points array.
+ unsigned int vstride, // stride between input points.
+ const float *weights, // *optional point weighting values.
+ unsigned int wstride, // weight stride for each vertex.
+ float *plane);
+
+
+float getBoundingRegion(unsigned int vcount,const float *points,unsigned int pstride,float *bmin,float *bmax); // returns the diagonal distance
+bool overlapAABB(const float *bmin1,const float *bmax1,const float *bmin2,const float *bmax2); // return true if the two AABB's overlap.
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/bestfitobb.cpp b/tests/bullet/Extras/ConvexDecomposition/bestfitobb.cpp
new file mode 100644
index 00000000..2d60fd04
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/bestfitobb.cpp
@@ -0,0 +1,173 @@
+#include "float_math.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+#include "bestfitobb.h"
+#include "float_math.h"
+
+// computes the OBB for this set of points relative to this transform matrix.
+void computeOBB(unsigned int vcount,const float *points,unsigned int pstride,float *sides,const float *matrix)
+{
+ const char *src = (const char *) points;
+
+ float bmin[3] = { 1e9, 1e9, 1e9 };
+ float bmax[3] = { -1e9, -1e9, -1e9 };
+
+ for (unsigned int i=0; i<vcount; i++)
+ {
+ const float *p = (const float *) src;
+ float t[3];
+
+ fm_inverseRT(matrix, p, t ); // inverse rotate translate
+
+ if ( t[0] < bmin[0] ) bmin[0] = t[0];
+ if ( t[1] < bmin[1] ) bmin[1] = t[1];
+ if ( t[2] < bmin[2] ) bmin[2] = t[2];
+
+ if ( t[0] > bmax[0] ) bmax[0] = t[0];
+ if ( t[1] > bmax[1] ) bmax[1] = t[1];
+ if ( t[2] > bmax[2] ) bmax[2] = t[2];
+
+ src+=pstride;
+ }
+
+
+ sides[0] = bmax[0];
+ sides[1] = bmax[1];
+ sides[2] = bmax[2];
+
+ if ( fabsf(bmin[0]) > sides[0] ) sides[0] = fabsf(bmin[0]);
+ if ( fabsf(bmin[1]) > sides[1] ) sides[1] = fabsf(bmin[1]);
+ if ( fabsf(bmin[2]) > sides[2] ) sides[2] = fabsf(bmin[2]);
+
+ sides[0]*=2.0f;
+ sides[1]*=2.0f;
+ sides[2]*=2.0f;
+
+}
+
+void computeBestFitOBB(unsigned int vcount,const float *points,unsigned int pstride,float *sides,float *matrix)
+{
+
+ float bmin[3];
+ float bmax[3];
+
+ fm_getAABB(vcount,points,pstride,bmin,bmax);
+
+ float center[3];
+
+ center[0] = (bmax[0]-bmin[0])*0.5f + bmin[0];
+ center[1] = (bmax[1]-bmin[1])*0.5f + bmin[1];
+ center[2] = (bmax[2]-bmin[2])*0.5f + bmin[2];
+
+ float ax = 0;
+ float ay = 0;
+ float az = 0;
+
+ float sweep = 45.0f; // 180 degree sweep on all three axes.
+ float steps = 8.0f; // 16 steps on each axis.
+
+ float bestVolume = 1e9;
+ float angle[3]={0.f,0.f,0.f};
+
+ while ( sweep >= 1 )
+ {
+
+ bool found = false;
+
+ float stepsize = sweep / steps;
+
+ for (float x=ax-sweep; x<=ax+sweep; x+=stepsize)
+ {
+ for (float y=ay-sweep; y<=ay+sweep; y+=stepsize)
+ {
+ for (float z=az-sweep; z<=az+sweep; z+=stepsize)
+ {
+ float pmatrix[16];
+
+ fm_eulerMatrix( x*FM_DEG_TO_RAD, y*FM_DEG_TO_RAD, z*FM_DEG_TO_RAD, pmatrix );
+
+ pmatrix[3*4+0] = center[0];
+ pmatrix[3*4+1] = center[1];
+ pmatrix[3*4+2] = center[2];
+
+ float psides[3];
+
+ computeOBB( vcount, points, pstride, psides, pmatrix );
+
+ float volume = psides[0]*psides[1]*psides[2]; // the volume of the cube
+
+ if ( volume <= bestVolume )
+ {
+ bestVolume = volume;
+
+ sides[0] = psides[0];
+ sides[1] = psides[1];
+ sides[2] = psides[2];
+
+ angle[0] = ax;
+ angle[1] = ay;
+ angle[2] = az;
+
+ memcpy(matrix,pmatrix,sizeof(float)*16);
+ found = true; // yes, we found an improvement.
+ }
+ }
+ }
+ }
+
+ if ( found )
+ {
+
+ ax = angle[0];
+ ay = angle[1];
+ az = angle[2];
+
+ sweep*=0.5f; // sweep 1/2 the distance as the last time.
+ }
+ else
+ {
+ break; // no improvement, so just
+ }
+
+ }
+
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/bestfitobb.h b/tests/bullet/Extras/ConvexDecomposition/bestfitobb.h
new file mode 100644
index 00000000..3141f587
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/bestfitobb.h
@@ -0,0 +1,43 @@
+#ifndef BEST_FIT_OBB_H
+
+#define BEST_FIT_OBB_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+
+void computeBestFitOBB(unsigned int vcount,const float *points,unsigned int pstride,float *sides,float *matrix);
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/cd_hull.cpp b/tests/bullet/Extras/ConvexDecomposition/cd_hull.cpp
new file mode 100644
index 00000000..b85b6494
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/cd_hull.cpp
@@ -0,0 +1,3260 @@
+#include "float_math.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <math.h>
+#include <float.h>
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+#include "cd_hull.h"
+
+using namespace ConvexDecomposition;
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+#define PI 3.14159264f
+
+//*****************************************************
+//*****************************************************
+//********* Stan Melax's vector math template needed
+//********* to use his hull building code.
+//*****************************************************
+//*****************************************************
+
+#define DEG2RAD (PI / 180.0f)
+#define RAD2DEG (180.0f / PI)
+#define SQRT_OF_2 (1.4142135f)
+#define OFFSET(Class,Member) (((char*) (&(((Class*)NULL)-> Member )))- ((char*)NULL))
+
+namespace ConvexDecomposition
+{
+
+
+int argmin(float a[],int n);
+float sqr(float a);
+float clampf(float a) ;
+float Round(float a,float precision);
+float Interpolate(const float &f0,const float &f1,float alpha) ;
+
+template <class T>
+void Swap(T &a,T &b)
+{
+ T tmp = a;
+ a=b;
+ b=tmp;
+}
+
+
+
+template <class T>
+T Max(const T &a,const T &b)
+{
+ return (a>b)?a:b;
+}
+
+template <class T>
+T Min(const T &a,const T &b)
+{
+ return (a<b)?a:b;
+}
+
+//----------------------------------
+
+class int3
+{
+public:
+ int x,y,z;
+ int3(){};
+ int3(int _x,int _y, int _z){x=_x;y=_y;z=_z;}
+ const int& operator[](int i) const {return (&x)[i];}
+ int& operator[](int i) {return (&x)[i];}
+};
+
+
+//-------- 2D --------
+
+class float2
+{
+public:
+ float x,y;
+ float2(){x=0;y=0;};
+ float2(float _x,float _y){x=_x;y=_y;}
+ float& operator[](int i) {assert(i>=0&&i<2);return ((float*)this)[i];}
+ const float& operator[](int i) const {assert(i>=0&&i<2);return ((float*)this)[i];}
+};
+inline float2 operator-( const float2& a, const float2& b ){return float2(a.x-b.x,a.y-b.y);}
+inline float2 operator+( const float2& a, const float2& b ){return float2(a.x+b.x,a.y+b.y);}
+
+//--------- 3D ---------
+
+class float3 // 3D
+{
+ public:
+ float x,y,z;
+ float3(){x=0;y=0;z=0;};
+ float3(float _x,float _y,float _z){x=_x;y=_y;z=_z;};
+ //operator float *() { return &x;};
+ float& operator[](int i) {assert(i>=0&&i<3);return ((float*)this)[i];}
+ const float& operator[](int i) const {assert(i>=0&&i<3);return ((float*)this)[i];}
+# ifdef PLUGIN_3DSMAX
+ float3(const Point3 &p):x(p.x),y(p.y),z(p.z){}
+ operator Point3(){return *((Point3*)this);}
+# endif
+};
+
+
+float3& operator+=( float3 &a, const float3& b );
+float3& operator-=( float3 &a ,const float3& b );
+float3& operator*=( float3 &v ,const float s );
+float3& operator/=( float3 &v, const float s );
+
+float magnitude( const float3& v );
+float3 normalize( const float3& v );
+float3 safenormalize(const float3 &v);
+float3 vabs(const float3 &v);
+float3 operator+( const float3& a, const float3& b );
+float3 operator-( const float3& a, const float3& b );
+float3 operator-( const float3& v );
+float3 operator*( const float3& v, const float s );
+float3 operator*( const float s, const float3& v );
+float3 operator/( const float3& v, const float s );
+inline int operator==( const float3 &a, const float3 &b ) { return (a.x==b.x && a.y==b.y && a.z==b.z); }
+inline int operator!=( const float3 &a, const float3 &b ) { return (a.x!=b.x || a.y!=b.y || a.z!=b.z); }
+// due to ambiguity and inconsistent standards ther are no overloaded operators for mult such as va*vb.
+float dot( const float3& a, const float3& b );
+float3 cmul( const float3 &a, const float3 &b);
+float3 cross( const float3& a, const float3& b );
+float3 Interpolate(const float3 &v0,const float3 &v1,float alpha);
+float3 Round(const float3& a,float precision);
+float3 VectorMax(const float3 &a, const float3 &b);
+float3 VectorMin(const float3 &a, const float3 &b);
+
+
+
+class float3x3
+{
+ public:
+ float3 x,y,z; // the 3 rows of the Matrix
+ float3x3(){}
+ float3x3(float xx,float xy,float xz,float yx,float yy,float yz,float zx,float zy,float zz):x(xx,xy,xz),y(yx,yy,yz),z(zx,zy,zz){}
+ float3x3(float3 _x,float3 _y,float3 _z):x(_x),y(_y),z(_z){}
+ float3& operator[](int i) {assert(i>=0&&i<3);return (&x)[i];}
+ const float3& operator[](int i) const {assert(i>=0&&i<3);return (&x)[i];}
+ float& operator()(int r, int c) {assert(r>=0&&r<3&&c>=0&&c<3);return ((&x)[r])[c];}
+ const float& operator()(int r, int c) const {assert(r>=0&&r<3&&c>=0&&c<3);return ((&x)[r])[c];}
+};
+float3x3 Transpose( const float3x3& m );
+float3 operator*( const float3& v , const float3x3& m );
+float3 operator*( const float3x3& m , const float3& v );
+float3x3 operator*( const float3x3& m , const float& s );
+float3x3 operator*( const float3x3& ma, const float3x3& mb );
+float3x3 operator/( const float3x3& a, const float& s ) ;
+float3x3 operator+( const float3x3& a, const float3x3& b );
+float3x3 operator-( const float3x3& a, const float3x3& b );
+float3x3 &operator+=( float3x3& a, const float3x3& b );
+float3x3 &operator-=( float3x3& a, const float3x3& b );
+float3x3 &operator*=( float3x3& a, const float& s );
+float Determinant(const float3x3& m );
+float3x3 Inverse(const float3x3& a); // its just 3x3 so we simply do that cofactor method
+
+
+//-------- 4D Math --------
+
+class float4
+{
+public:
+ float x,y,z,w;
+ float4(){x=0;y=0;z=0;w=0;};
+ float4(float _x,float _y,float _z,float _w){x=_x;y=_y;z=_z;w=_w;}
+ float4(const float3 &v,float _w){x=v.x;y=v.y;z=v.z;w=_w;}
+ //operator float *() { return &x;};
+ float& operator[](int i) {assert(i>=0&&i<4);return ((float*)this)[i];}
+ const float& operator[](int i) const {assert(i>=0&&i<4);return ((float*)this)[i];}
+ const float3& xyz() const { return *((float3*)this);}
+ float3& xyz() { return *((float3*)this);}
+};
+
+
+struct D3DXMATRIX;
+
+class float4x4
+{
+ public:
+ float4 x,y,z,w; // the 4 rows
+ float4x4(){}
+ float4x4(const float4 &_x, const float4 &_y, const float4 &_z, const float4 &_w):x(_x),y(_y),z(_z),w(_w){}
+ float4x4(float m00, float m01, float m02, float m03,
+ float m10, float m11, float m12, float m13,
+ float m20, float m21, float m22, float m23,
+ float m30, float m31, float m32, float m33 )
+ :x(m00,m01,m02,m03),y(m10,m11,m12,m13),z(m20,m21,m22,m23),w(m30,m31,m32,m33){}
+ float& operator()(int r, int c) {assert(r>=0&&r<4&&c>=0&&c<4);return ((&x)[r])[c];}
+ const float& operator()(int r, int c) const {assert(r>=0&&r<4&&c>=0&&c<4);return ((&x)[r])[c];}
+ operator float* () {return &x.x;}
+ operator const float* () const {return &x.x;}
+ operator struct D3DXMATRIX* () { return (struct D3DXMATRIX*) this;}
+ operator const struct D3DXMATRIX* () const { return (struct D3DXMATRIX*) this;}
+};
+
+
+int operator==( const float4 &a, const float4 &b );
+float4 Homogenize(const float3 &v3,const float &w=1.0f); // Turns a 3D float3 4D vector4 by appending w
+float4 cmul( const float4 &a, const float4 &b);
+float4 operator*( const float4 &v, float s);
+float4 operator*( float s, const float4 &v);
+float4 operator+( const float4 &a, const float4 &b);
+float4 operator-( const float4 &a, const float4 &b);
+float4x4 operator*( const float4x4& a, const float4x4& b );
+float4 operator*( const float4& v, const float4x4& m );
+float4x4 Inverse(const float4x4 &m);
+float4x4 MatrixRigidInverse(const float4x4 &m);
+float4x4 MatrixTranspose(const float4x4 &m);
+float4x4 MatrixPerspectiveFov(float fovy, float Aspect, float zn, float zf );
+float4x4 MatrixTranslation(const float3 &t);
+float4x4 MatrixRotationZ(const float angle_radians);
+float4x4 MatrixLookAt(const float3& eye, const float3& at, const float3& up);
+int operator==( const float4x4 &a, const float4x4 &b );
+
+
+//-------- Quaternion ------------
+
+class Quaternion :public float4
+{
+ public:
+ Quaternion() { x = y = z = 0.0f; w = 1.0f; }
+ Quaternion( float3 v, float t ) { v = normalize(v); w = cosf(t/2.0f); v = v*sinf(t/2.0f); x = v.x; y = v.y; z = v.z; }
+ Quaternion(float _x, float _y, float _z, float _w){x=_x;y=_y;z=_z;w=_w;}
+ float angle() const { return acosf(w)*2.0f; }
+ float3 axis() const { float3 a(x,y,z); if(fabsf(angle())<0.0000001f) return float3(1,0,0); return a*(1/sinf(angle()/2.0f)); }
+ float3 xdir() const { return float3( 1-2*(y*y+z*z), 2*(x*y+w*z), 2*(x*z-w*y) ); }
+ float3 ydir() const { return float3( 2*(x*y-w*z),1-2*(x*x+z*z), 2*(y*z+w*x) ); }
+ float3 zdir() const { return float3( 2*(x*z+w*y), 2*(y*z-w*x),1-2*(x*x+y*y) ); }
+ float3x3 getmatrix() const { return float3x3( xdir(), ydir(), zdir() ); }
+ operator float3x3() { return getmatrix(); }
+ void Normalize();
+};
+
+Quaternion& operator*=(Quaternion& a, float s );
+Quaternion operator*( const Quaternion& a, float s );
+Quaternion operator*( const Quaternion& a, const Quaternion& b);
+Quaternion operator+( const Quaternion& a, const Quaternion& b );
+Quaternion normalize( Quaternion a );
+float dot( const Quaternion &a, const Quaternion &b );
+float3 operator*( const Quaternion& q, const float3& v );
+float3 operator*( const float3& v, const Quaternion& q );
+Quaternion slerp( Quaternion a, const Quaternion& b, float interp );
+Quaternion Interpolate(const Quaternion &q0,const Quaternion &q1,float alpha);
+Quaternion RotationArc(float3 v0, float3 v1 ); // returns quat q where q*v0=v1
+Quaternion Inverse(const Quaternion &q);
+float4x4 MatrixFromQuatVec(const Quaternion &q, const float3 &v);
+
+
+//------ Euler Angle -----
+
+Quaternion YawPitchRoll( float yaw, float pitch, float roll );
+float Yaw( const Quaternion& q );
+float Pitch( const Quaternion& q );
+float Roll( Quaternion q );
+float Yaw( const float3& v );
+float Pitch( const float3& v );
+
+
+//------- Plane ----------
+
+class Plane
+{
+ public:
+ float3 normal;
+ float dist; // distance below origin - the D from plane equasion Ax+By+Cz+D=0
+ Plane(const float3 &n,float d):normal(n),dist(d){}
+ Plane():normal(),dist(0){}
+ void Transform(const float3 &position, const Quaternion &orientation);
+};
+
+inline Plane PlaneFlip(const Plane &plane){return Plane(-plane.normal,-plane.dist);}
+inline int operator==( const Plane &a, const Plane &b ) { return (a.normal==b.normal && a.dist==b.dist); }
+inline int coplanar( const Plane &a, const Plane &b ) { return (a==b || a==PlaneFlip(b)); }
+
+
+//--------- Utility Functions ------
+
+float3 PlaneLineIntersection(const Plane &plane, const float3 &p0, const float3 &p1);
+float3 PlaneProject(const Plane &plane, const float3 &point);
+float3 LineProject(const float3 &p0, const float3 &p1, const float3 &a); // projects a onto infinite line p0p1
+float LineProjectTime(const float3 &p0, const float3 &p1, const float3 &a);
+float3 ThreePlaneIntersection(const Plane &p0,const Plane &p1, const Plane &p2);
+int PolyHit(const float3 *vert,const int n,const float3 &v0, const float3 &v1, float3 *impact=NULL, float3 *normal=NULL);
+int BoxInside(const float3 &p,const float3 &bmin, const float3 &bmax) ;
+int BoxIntersect(const float3 &v0, const float3 &v1, const float3 &bmin, const float3 &bmax, float3 *impact);
+float DistanceBetweenLines(const float3 &ustart, const float3 &udir, const float3 &vstart, const float3 &vdir, float3 *upoint=NULL, float3 *vpoint=NULL);
+float3 TriNormal(const float3 &v0, const float3 &v1, const float3 &v2);
+float3 NormalOf(const float3 *vert, const int n);
+Quaternion VirtualTrackBall(const float3 &cop, const float3 &cor, const float3 &dir0, const float3 &dir1);
+
+
+float sqr(float a) {return a*a;}
+float clampf(float a) {return Min(1.0f,Max(0.0f,a));}
+
+
+float Round(float a,float precision)
+{
+ return floorf(0.5f+a/precision)*precision;
+}
+
+
+float Interpolate(const float &f0,const float &f1,float alpha)
+{
+ return f0*(1-alpha) + f1*alpha;
+}
+
+
+int argmin(float a[],int n)
+{
+ int r=0;
+ for(int i=1;i<n;i++)
+ {
+ if(a[i]<a[r])
+ {
+ r = i;
+ }
+ }
+ return r;
+}
+
+
+
+//------------ float3 (3D) --------------
+
+
+
+float3 operator+( const float3& a, const float3& b )
+{
+ return float3(a.x+b.x, a.y+b.y, a.z+b.z);
+}
+
+
+float3 operator-( const float3& a, const float3& b )
+{
+ return float3( a.x-b.x, a.y-b.y, a.z-b.z );
+}
+
+
+float3 operator-( const float3& v )
+{
+ return float3( -v.x, -v.y, -v.z );
+}
+
+
+float3 operator*( const float3& v, float s )
+{
+ return float3( v.x*s, v.y*s, v.z*s );
+}
+
+
+float3 operator*( float s, const float3& v )
+{
+ return float3( v.x*s, v.y*s, v.z*s );
+}
+
+
+float3 operator/( const float3& v, float s )
+{
+ return v*(1.0f/s);
+}
+
+float dot( const float3& a, const float3& b )
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+float3 cmul( const float3 &v1, const float3 &v2)
+{
+ return float3(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z);
+}
+
+
+float3 cross( const float3& a, const float3& b )
+{
+ return float3( a.y*b.z - a.z*b.y,
+ a.z*b.x - a.x*b.z,
+ a.x*b.y - a.y*b.x );
+}
+
+
+
+
+float3& operator+=( float3& a , const float3& b )
+{
+ a.x += b.x;
+ a.y += b.y;
+ a.z += b.z;
+ return a;
+}
+
+
+float3& operator-=( float3& a , const float3& b )
+{
+ a.x -= b.x;
+ a.y -= b.y;
+ a.z -= b.z;
+ return a;
+}
+
+
+float3& operator*=(float3& v , float s )
+{
+ v.x *= s;
+ v.y *= s;
+ v.z *= s;
+ return v;
+}
+
+
+float3& operator/=(float3& v , float s )
+{
+ float sinv = 1.0f / s;
+ v.x *= sinv;
+ v.y *= sinv;
+ v.z *= sinv;
+ return v;
+}
+
+float3 vabs(const float3 &v)
+{
+ return float3(fabsf(v.x),fabsf(v.y),fabsf(v.z));
+}
+
+
+float magnitude( const float3& v )
+{
+ return sqrtf(sqr(v.x) + sqr( v.y)+ sqr(v.z));
+}
+
+
+
+float3 normalize( const float3 &v )
+{
+ // this routine, normalize, is ok, provided magnitude works!!
+ float d=magnitude(v);
+ if (d==0)
+ {
+ printf("Cant normalize ZERO vector\n");
+ assert(0);// yes this could go here
+ d=0.1f;
+ }
+ d = 1/d;
+ return float3(v.x*d,v.y*d,v.z*d);
+}
+
+float3 safenormalize(const float3 &v)
+{
+ if(magnitude(v)<=0.0f)
+ {
+ return float3(1,0,0);
+ }
+ return normalize(v);
+}
+
+float3 Round(const float3 &a,float precision)
+{
+ return float3(Round(a.x,precision),Round(a.y,precision),Round(a.z,precision));
+}
+
+
+float3 Interpolate(const float3 &v0,const float3 &v1,float alpha)
+{
+ return v0*(1-alpha) + v1*alpha;
+}
+
+float3 VectorMin(const float3 &a,const float3 &b)
+{
+ return float3(Min(a.x,b.x),Min(a.y,b.y),Min(a.z,b.z));
+}
+float3 VectorMax(const float3 &a,const float3 &b)
+{
+ return float3(Max(a.x,b.x),Max(a.y,b.y),Max(a.z,b.z));
+}
+
+// the statement v1*v2 is ambiguous since there are 3 types
+// of vector multiplication
+// - componantwise (for example combining colors)
+// - dot product
+// - cross product
+// Therefore we never declare/implement this function.
+// So we will never see: float3 operator*(float3 a,float3 b)
+
+
+
+
+//------------ float3x3 ---------------
+float Determinant(const float3x3 &m)
+{
+ return m.x.x*m.y.y*m.z.z + m.y.x*m.z.y*m.x.z + m.z.x*m.x.y*m.y.z
+ -m.x.x*m.z.y*m.y.z - m.y.x*m.x.y*m.z.z - m.z.x*m.y.y*m.x.z ;
+}
+
+float3x3 Inverse(const float3x3 &a)
+{
+ float3x3 b;
+ float d=Determinant(a);
+ assert(d!=0);
+ for(int i=0;i<3;i++)
+ {
+ for(int j=0;j<3;j++)
+ {
+ int i1=(i+1)%3;
+ int i2=(i+2)%3;
+ int j1=(j+1)%3;
+ int j2=(j+2)%3;
+ // reverse indexs i&j to take transpose
+ b[j][i] = (a[i1][j1]*a[i2][j2]-a[i1][j2]*a[i2][j1])/d;
+ }
+ }
+ // Matrix check=a*b; // Matrix 'check' should be the identity (or close to it)
+ return b;
+}
+
+
+float3x3 Transpose( const float3x3& m )
+{
+ return float3x3( float3(m.x.x,m.y.x,m.z.x),
+ float3(m.x.y,m.y.y,m.z.y),
+ float3(m.x.z,m.y.z,m.z.z));
+}
+
+
+float3 operator*(const float3& v , const float3x3 &m ) {
+ return float3((m.x.x*v.x + m.y.x*v.y + m.z.x*v.z),
+ (m.x.y*v.x + m.y.y*v.y + m.z.y*v.z),
+ (m.x.z*v.x + m.y.z*v.y + m.z.z*v.z));
+}
+float3 operator*(const float3x3 &m,const float3& v ) {
+ return float3(dot(m.x,v),dot(m.y,v),dot(m.z,v));
+}
+
+
+float3x3 operator*( const float3x3& a, const float3x3& b )
+{
+ return float3x3(a.x*b,a.y*b,a.z*b);
+}
+
+float3x3 operator*( const float3x3& a, const float& s )
+{
+ return float3x3(a.x*s, a.y*s ,a.z*s);
+}
+float3x3 operator/( const float3x3& a, const float& s )
+{
+ float t=1/s;
+ return float3x3(a.x*t, a.y*t ,a.z*t);
+}
+float3x3 operator+( const float3x3& a, const float3x3& b )
+{
+ return float3x3(a.x+b.x, a.y+b.y, a.z+b.z);
+}
+float3x3 operator-( const float3x3& a, const float3x3& b )
+{
+ return float3x3(a.x-b.x, a.y-b.y, a.z-b.z);
+}
+float3x3 &operator+=( float3x3& a, const float3x3& b )
+{
+ a.x+=b.x;
+ a.y+=b.y;
+ a.z+=b.z;
+ return a;
+}
+float3x3 &operator-=( float3x3& a, const float3x3& b )
+{
+ a.x-=b.x;
+ a.y-=b.y;
+ a.z-=b.z;
+ return a;
+}
+float3x3 &operator*=( float3x3& a, const float& s )
+{
+ a.x*=s;
+ a.y*=s;
+ a.z*=s;
+ return a;
+}
+
+
+
+float3 ThreePlaneIntersection(const Plane &p0,const Plane &p1, const Plane &p2){
+ float3x3 mp =Transpose(float3x3(p0.normal,p1.normal,p2.normal));
+ float3x3 mi = Inverse(mp);
+ float3 b(p0.dist,p1.dist,p2.dist);
+ return -b * mi;
+}
+
+
+//--------------- 4D ----------------
+
+float4 operator*( const float4& v, const float4x4& m )
+{
+ return v.x*m.x + v.y*m.y + v.z*m.z + v.w*m.w; // yes this actually works
+}
+
+int operator==( const float4 &a, const float4 &b )
+{
+ return (a.x==b.x && a.y==b.y && a.z==b.z && a.w==b.w);
+}
+
+
+// Dont implement m*v for now, since that might confuse us
+// All our transforms are based on multiplying the "row" vector on the left
+//float4 operator*(const float4x4& m , const float4& v )
+//{
+// return float4(dot(v,m.x),dot(v,m.y),dot(v,m.z),dot(v,m.w));
+//}
+
+
+
+float4 cmul( const float4 &a, const float4 &b)
+{
+ return float4(a.x*b.x,a.y*b.y,a.z*b.z,a.w*b.w);
+}
+
+
+float4 operator*( const float4 &v, float s)
+{
+ return float4(v.x*s,v.y*s,v.z*s,v.w*s);
+}
+
+
+float4 operator*( float s, const float4 &v)
+{
+ return float4(v.x*s,v.y*s,v.z*s,v.w*s);
+}
+
+
+float4 operator+( const float4 &a, const float4 &b)
+{
+ return float4(a.x+b.x,a.y+b.y,a.z+b.z,a.w+b.w);
+}
+
+
+
+float4 operator-( const float4 &a, const float4 &b)
+{
+ return float4(a.x-b.x,a.y-b.y,a.z-b.z,a.w-b.w);
+}
+
+
+float4 Homogenize(const float3 &v3,const float &w)
+{
+ return float4(v3.x,v3.y,v3.z,w);
+}
+
+
+
+float4x4 operator*( const float4x4& a, const float4x4& b )
+{
+ return float4x4(a.x*b,a.y*b,a.z*b,a.w*b);
+}
+
+float4x4 MatrixTranspose(const float4x4 &m)
+{
+ return float4x4(
+ m.x.x, m.y.x, m.z.x, m.w.x,
+ m.x.y, m.y.y, m.z.y, m.w.y,
+ m.x.z, m.y.z, m.z.z, m.w.z,
+ m.x.w, m.y.w, m.z.w, m.w.w );
+}
+
+float4x4 MatrixRigidInverse(const float4x4 &m)
+{
+ float4x4 trans_inverse = MatrixTranslation(-m.w.xyz());
+ float4x4 rot = m;
+ rot.w = float4(0,0,0,1);
+ return trans_inverse * MatrixTranspose(rot);
+}
+
+
+float4x4 MatrixPerspectiveFov(float fovy, float aspect, float zn, float zf )
+{
+ float h = 1.0f/tanf(fovy/2.0f); // view space height
+ float w = h / aspect ; // view space width
+ return float4x4(
+ w, 0, 0 , 0,
+ 0, h, 0 , 0,
+ 0, 0, zf/(zn-zf) , -1,
+ 0, 0, zn*zf/(zn-zf) , 0 );
+}
+
+
+
+float4x4 MatrixLookAt(const float3& eye, const float3& at, const float3& up)
+{
+ float4x4 m;
+ m.w.w = 1.0f;
+ m.w.xyz() = eye;
+ m.z.xyz() = normalize(eye-at);
+ m.x.xyz() = normalize(cross(up,m.z.xyz()));
+ m.y.xyz() = cross(m.z.xyz(),m.x.xyz());
+ return MatrixRigidInverse(m);
+}
+
+
+float4x4 MatrixTranslation(const float3 &t)
+{
+ return float4x4(
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ t.x,t.y,t.z,1 );
+}
+
+
+float4x4 MatrixRotationZ(const float angle_radians)
+{
+ float s = sinf(angle_radians);
+ float c = cosf(angle_radians);
+ return float4x4(
+ c, s, 0, 0,
+ -s, c, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1 );
+}
+
+
+
+int operator==( const float4x4 &a, const float4x4 &b )
+{
+ return (a.x==b.x && a.y==b.y && a.z==b.z && a.w==b.w);
+}
+
+
+float4x4 Inverse(const float4x4 &m)
+{
+ float4x4 d;
+ float *dst = &d.x.x;
+ float tmp[12]; /* temp array for pairs */
+ float src[16]; /* array of transpose source matrix */
+ float det; /* determinant */
+ /* transpose matrix */
+ for ( int i = 0; i < 4; i++) {
+ src[i] = m(i,0) ;
+ src[i + 4] = m(i,1);
+ src[i + 8] = m(i,2);
+ src[i + 12] = m(i,3);
+ }
+ /* calculate pairs for first 8 elements (cofactors) */
+ tmp[0] = src[10] * src[15];
+ tmp[1] = src[11] * src[14];
+ tmp[2] = src[9] * src[15];
+ tmp[3] = src[11] * src[13];
+ tmp[4] = src[9] * src[14];
+ tmp[5] = src[10] * src[13];
+ tmp[6] = src[8] * src[15];
+ tmp[7] = src[11] * src[12];
+ tmp[8] = src[8] * src[14];
+ tmp[9] = src[10] * src[12];
+ tmp[10] = src[8] * src[13];
+ tmp[11] = src[9] * src[12];
+ /* calculate first 8 elements (cofactors) */
+ dst[0] = tmp[0]*src[5] + tmp[3]*src[6] + tmp[4]*src[7];
+ dst[0] -= tmp[1]*src[5] + tmp[2]*src[6] + tmp[5]*src[7];
+ dst[1] = tmp[1]*src[4] + tmp[6]*src[6] + tmp[9]*src[7];
+ dst[1] -= tmp[0]*src[4] + tmp[7]*src[6] + tmp[8]*src[7];
+ dst[2] = tmp[2]*src[4] + tmp[7]*src[5] + tmp[10]*src[7];
+ dst[2] -= tmp[3]*src[4] + tmp[6]*src[5] + tmp[11]*src[7];
+ dst[3] = tmp[5]*src[4] + tmp[8]*src[5] + tmp[11]*src[6];
+ dst[3] -= tmp[4]*src[4] + tmp[9]*src[5] + tmp[10]*src[6];
+ dst[4] = tmp[1]*src[1] + tmp[2]*src[2] + tmp[5]*src[3];
+ dst[4] -= tmp[0]*src[1] + tmp[3]*src[2] + tmp[4]*src[3];
+ dst[5] = tmp[0]*src[0] + tmp[7]*src[2] + tmp[8]*src[3];
+ dst[5] -= tmp[1]*src[0] + tmp[6]*src[2] + tmp[9]*src[3];
+ dst[6] = tmp[3]*src[0] + tmp[6]*src[1] + tmp[11]*src[3];
+ dst[6] -= tmp[2]*src[0] + tmp[7]*src[1] + tmp[10]*src[3];
+ dst[7] = tmp[4]*src[0] + tmp[9]*src[1] + tmp[10]*src[2];
+ dst[7] -= tmp[5]*src[0] + tmp[8]*src[1] + tmp[11]*src[2];
+ /* calculate pairs for second 8 elements (cofactors) */
+ tmp[0] = src[2]*src[7];
+ tmp[1] = src[3]*src[6];
+ tmp[2] = src[1]*src[7];
+ tmp[3] = src[3]*src[5];
+ tmp[4] = src[1]*src[6];
+ tmp[5] = src[2]*src[5];
+ tmp[6] = src[0]*src[7];
+ tmp[7] = src[3]*src[4];
+ tmp[8] = src[0]*src[6];
+ tmp[9] = src[2]*src[4];
+ tmp[10] = src[0]*src[5];
+ tmp[11] = src[1]*src[4];
+ /* calculate second 8 elements (cofactors) */
+ dst[8] = tmp[0]*src[13] + tmp[3]*src[14] + tmp[4]*src[15];
+ dst[8] -= tmp[1]*src[13] + tmp[2]*src[14] + tmp[5]*src[15];
+ dst[9] = tmp[1]*src[12] + tmp[6]*src[14] + tmp[9]*src[15];
+ dst[9] -= tmp[0]*src[12] + tmp[7]*src[14] + tmp[8]*src[15];
+ dst[10] = tmp[2]*src[12] + tmp[7]*src[13] + tmp[10]*src[15];
+ dst[10]-= tmp[3]*src[12] + tmp[6]*src[13] + tmp[11]*src[15];
+ dst[11] = tmp[5]*src[12] + tmp[8]*src[13] + tmp[11]*src[14];
+ dst[11]-= tmp[4]*src[12] + tmp[9]*src[13] + tmp[10]*src[14];
+ dst[12] = tmp[2]*src[10] + tmp[5]*src[11] + tmp[1]*src[9];
+ dst[12]-= tmp[4]*src[11] + tmp[0]*src[9] + tmp[3]*src[10];
+ dst[13] = tmp[8]*src[11] + tmp[0]*src[8] + tmp[7]*src[10];
+ dst[13]-= tmp[6]*src[10] + tmp[9]*src[11] + tmp[1]*src[8];
+ dst[14] = tmp[6]*src[9] + tmp[11]*src[11] + tmp[3]*src[8];
+ dst[14]-= tmp[10]*src[11] + tmp[2]*src[8] + tmp[7]*src[9];
+ dst[15] = tmp[10]*src[10] + tmp[4]*src[8] + tmp[9]*src[9];
+ dst[15]-= tmp[8]*src[9] + tmp[11]*src[10] + tmp[5]*src[8];
+ /* calculate determinant */
+ det=src[0]*dst[0]+src[1]*dst[1]+src[2]*dst[2]+src[3]*dst[3];
+ /* calculate matrix inverse */
+ det = 1/det;
+ for ( int j = 0; j < 16; j++)
+ dst[j] *= det;
+ return d;
+}
+
+
+//--------- Quaternion --------------
+
+Quaternion operator*( const Quaternion& a, const Quaternion& b )
+{
+ Quaternion c;
+ c.w = a.w*b.w - a.x*b.x - a.y*b.y - a.z*b.z;
+ c.x = a.w*b.x + a.x*b.w + a.y*b.z - a.z*b.y;
+ c.y = a.w*b.y - a.x*b.z + a.y*b.w + a.z*b.x;
+ c.z = a.w*b.z + a.x*b.y - a.y*b.x + a.z*b.w;
+ return c;
+}
+
+
+Quaternion operator*( const Quaternion& a, float b )
+{
+ return Quaternion(a.x*b, a.y*b, a.z*b ,a.w*b);
+}
+
+Quaternion Inverse(const Quaternion &q)
+{
+ return Quaternion(-q.x,-q.y,-q.z,q.w);
+}
+
+Quaternion& operator*=( Quaternion& q, const float s )
+{
+ q.x *= s;
+ q.y *= s;
+ q.z *= s;
+ q.w *= s;
+ return q;
+}
+void Quaternion::Normalize()
+{
+ float m = sqrtf(sqr(w)+sqr(x)+sqr(y)+sqr(z));
+ if(m<0.000000001f) {
+ w=1.0f;
+ x=y=z=0.0f;
+ return;
+ }
+ (*this) *= (1.0f/m);
+}
+
+float3 operator*( const Quaternion& q, const float3& v )
+{
+ // The following is equivalent to:
+ //return (q.getmatrix() * v);
+ float qx2 = q.x*q.x;
+ float qy2 = q.y*q.y;
+ float qz2 = q.z*q.z;
+
+ float qxqy = q.x*q.y;
+ float qxqz = q.x*q.z;
+ float qxqw = q.x*q.w;
+ float qyqz = q.y*q.z;
+ float qyqw = q.y*q.w;
+ float qzqw = q.z*q.w;
+ return float3(
+ (1-2*(qy2+qz2))*v.x + (2*(qxqy-qzqw))*v.y + (2*(qxqz+qyqw))*v.z ,
+ (2*(qxqy+qzqw))*v.x + (1-2*(qx2+qz2))*v.y + (2*(qyqz-qxqw))*v.z ,
+ (2*(qxqz-qyqw))*v.x + (2*(qyqz+qxqw))*v.y + (1-2*(qx2+qy2))*v.z );
+}
+
+float3 operator*( const float3& v, const Quaternion& q )
+{
+ assert(0); // must multiply with the quat on the left
+ return float3(0.0f,0.0f,0.0f);
+}
+
+Quaternion operator+( const Quaternion& a, const Quaternion& b )
+{
+ return Quaternion(a.x+b.x, a.y+b.y, a.z+b.z, a.w+b.w);
+}
+
+float dot( const Quaternion &a,const Quaternion &b )
+{
+ return (a.w*b.w + a.x*b.x + a.y*b.y + a.z*b.z);
+}
+
+Quaternion normalize( Quaternion a )
+{
+ float m = sqrtf(sqr(a.w)+sqr(a.x)+sqr(a.y)+sqr(a.z));
+ if(m<0.000000001)
+ {
+ a.w=1;
+ a.x=a.y=a.z=0;
+ return a;
+ }
+ return a * (1/m);
+}
+
+Quaternion slerp( Quaternion a, const Quaternion& b, float interp )
+{
+ if(dot(a,b) <0.0)
+ {
+ a.w=-a.w;
+ a.x=-a.x;
+ a.y=-a.y;
+ a.z=-a.z;
+ }
+ float d = dot(a,b);
+ if(d>=1.0) {
+ return a;
+ }
+ float theta = acosf(d);
+ if(theta==0.0f) { return(a);}
+ return a*(sinf(theta-interp*theta)/sinf(theta)) + b*(sinf(interp*theta)/sinf(theta));
+}
+
+
+Quaternion Interpolate(const Quaternion &q0,const Quaternion &q1,float alpha) {
+ return slerp(q0,q1,alpha);
+}
+
+
+Quaternion YawPitchRoll( float yaw, float pitch, float roll )
+{
+ roll *= DEG2RAD;
+ yaw *= DEG2RAD;
+ pitch *= DEG2RAD;
+ return Quaternion(float3(0.0f,0.0f,1.0f),yaw)*Quaternion(float3(1.0f,0.0f,0.0f),pitch)*Quaternion(float3(0.0f,1.0f,0.0f),roll);
+}
+
+float Yaw( const Quaternion& q )
+{
+ float3 v;
+ v=q.ydir();
+ return (v.y==0.0&&v.x==0.0) ? 0.0f: atan2f(-v.x,v.y)*RAD2DEG;
+}
+
+float Pitch( const Quaternion& q )
+{
+ float3 v;
+ v=q.ydir();
+ return atan2f(v.z,sqrtf(sqr(v.x)+sqr(v.y)))*RAD2DEG;
+}
+
+float Roll( Quaternion q )
+{
+ q = Quaternion(float3(0.0f,0.0f,1.0f),-Yaw(q)*DEG2RAD) *q;
+ q = Quaternion(float3(1.0f,0.0f,0.0f),-Pitch(q)*DEG2RAD) *q;
+ return atan2f(-q.xdir().z,q.xdir().x)*RAD2DEG;
+}
+
+float Yaw( const float3& v )
+{
+ return (v.y==0.0&&v.x==0.0) ? 0.0f: atan2f(-v.x,v.y)*RAD2DEG;
+}
+
+float Pitch( const float3& v )
+{
+ return atan2f(v.z,sqrtf(sqr(v.x)+sqr(v.y)))*RAD2DEG;
+}
+
+
+//------------- Plane --------------
+
+
+void Plane::Transform(const float3 &position, const Quaternion &orientation) {
+ // Transforms the plane to the space defined by the
+ // given position/orientation.
+ float3 newnormal;
+ float3 origin;
+
+ newnormal = Inverse(orientation)*normal;
+ origin = Inverse(orientation)*(-normal*dist - position);
+
+ normal = newnormal;
+ dist = -dot(newnormal, origin);
+}
+
+
+
+
+//--------- utility functions -------------
+
+// RotationArc()
+// Given two vectors v0 and v1 this function
+// returns quaternion q where q*v0==v1.
+// Routine taken from game programming gems.
+Quaternion RotationArc(float3 v0,float3 v1){
+ Quaternion q;
+ v0 = normalize(v0); // Comment these two lines out if you know its not needed.
+ v1 = normalize(v1); // If vector is already unit length then why do it again?
+ float3 c = cross(v0,v1);
+ float d = dot(v0,v1);
+ if(d<=-1.0f) { return Quaternion(1,0,0,0);} // 180 about x axis
+ float s = sqrtf((1+d)*2);
+ q.x = c.x / s;
+ q.y = c.y / s;
+ q.z = c.z / s;
+ q.w = s /2.0f;
+ return q;
+}
+
+
+float4x4 MatrixFromQuatVec(const Quaternion &q, const float3 &v)
+{
+ // builds a 4x4 transformation matrix based on orientation q and translation v
+ float qx2 = q.x*q.x;
+ float qy2 = q.y*q.y;
+ float qz2 = q.z*q.z;
+
+ float qxqy = q.x*q.y;
+ float qxqz = q.x*q.z;
+ float qxqw = q.x*q.w;
+ float qyqz = q.y*q.z;
+ float qyqw = q.y*q.w;
+ float qzqw = q.z*q.w;
+
+ return float4x4(
+ 1-2*(qy2+qz2),
+ 2*(qxqy+qzqw),
+ 2*(qxqz-qyqw),
+ 0 ,
+ 2*(qxqy-qzqw),
+ 1-2*(qx2+qz2),
+ 2*(qyqz+qxqw),
+ 0 ,
+ 2*(qxqz+qyqw),
+ 2*(qyqz-qxqw),
+ 1-2*(qx2+qy2),
+ 0 ,
+ v.x ,
+ v.y ,
+ v.z ,
+ 1.0f );
+}
+
+
+float3 PlaneLineIntersection(const Plane &plane, const float3 &p0, const float3 &p1)
+{
+ // returns the point where the line p0-p1 intersects the plane n&d
+ float3 dif;
+ dif = p1-p0;
+ float dn= dot(plane.normal,dif);
+ float t = -(plane.dist+dot(plane.normal,p0) )/dn;
+ return p0 + (dif*t);
+}
+
+float3 PlaneProject(const Plane &plane, const float3 &point)
+{
+ return point - plane.normal * (dot(point,plane.normal)+plane.dist);
+}
+
+float3 LineProject(const float3 &p0, const float3 &p1, const float3 &a)
+{
+ float3 w;
+ w = p1-p0;
+ float t= dot(w,(a-p0)) / (sqr(w.x)+sqr(w.y)+sqr(w.z));
+ return p0+ w*t;
+}
+
+
+float LineProjectTime(const float3 &p0, const float3 &p1, const float3 &a)
+{
+ float3 w;
+ w = p1-p0;
+ float t= dot(w,(a-p0)) / (sqr(w.x)+sqr(w.y)+sqr(w.z));
+ return t;
+}
+
+
+
+float3 TriNormal(const float3 &v0, const float3 &v1, const float3 &v2)
+{
+ // return the normal of the triangle
+ // inscribed by v0, v1, and v2
+ float3 cp=cross(v1-v0,v2-v1);
+ float m=magnitude(cp);
+ if(m==0) return float3(1,0,0);
+ return cp*(1.0f/m);
+}
+
+
+
+int BoxInside(const float3 &p, const float3 &bmin, const float3 &bmax)
+{
+ return (p.x >= bmin.x && p.x <=bmax.x &&
+ p.y >= bmin.y && p.y <=bmax.y &&
+ p.z >= bmin.z && p.z <=bmax.z );
+}
+
+
+int BoxIntersect(const float3 &v0, const float3 &v1, const float3 &bmin, const float3 &bmax,float3 *impact)
+{
+ if(BoxInside(v0,bmin,bmax))
+ {
+ *impact=v0;
+ return 1;
+ }
+ if(v0.x<=bmin.x && v1.x>=bmin.x)
+ {
+ float a = (bmin.x-v0.x)/(v1.x-v0.x);
+ //v.x = bmin.x;
+ float vy = (1-a) *v0.y + a*v1.y;
+ float vz = (1-a) *v0.z + a*v1.z;
+ if(vy>=bmin.y && vy<=bmax.y && vz>=bmin.z && vz<=bmax.z)
+ {
+ impact->x = bmin.x;
+ impact->y = vy;
+ impact->z = vz;
+ return 1;
+ }
+ }
+ else if(v0.x >= bmax.x && v1.x <= bmax.x)
+ {
+ float a = (bmax.x-v0.x)/(v1.x-v0.x);
+ //v.x = bmax.x;
+ float vy = (1-a) *v0.y + a*v1.y;
+ float vz = (1-a) *v0.z + a*v1.z;
+ if(vy>=bmin.y && vy<=bmax.y && vz>=bmin.z && vz<=bmax.z)
+ {
+ impact->x = bmax.x;
+ impact->y = vy;
+ impact->z = vz;
+ return 1;
+ }
+ }
+ if(v0.y<=bmin.y && v1.y>=bmin.y)
+ {
+ float a = (bmin.y-v0.y)/(v1.y-v0.y);
+ float vx = (1-a) *v0.x + a*v1.x;
+ //v.y = bmin.y;
+ float vz = (1-a) *v0.z + a*v1.z;
+ if(vx>=bmin.x && vx<=bmax.x && vz>=bmin.z && vz<=bmax.z)
+ {
+ impact->x = vx;
+ impact->y = bmin.y;
+ impact->z = vz;
+ return 1;
+ }
+ }
+ else if(v0.y >= bmax.y && v1.y <= bmax.y)
+ {
+ float a = (bmax.y-v0.y)/(v1.y-v0.y);
+ float vx = (1-a) *v0.x + a*v1.x;
+ // vy = bmax.y;
+ float vz = (1-a) *v0.z + a*v1.z;
+ if(vx>=bmin.x && vx<=bmax.x && vz>=bmin.z && vz<=bmax.z)
+ {
+ impact->x = vx;
+ impact->y = bmax.y;
+ impact->z = vz;
+ return 1;
+ }
+ }
+ if(v0.z<=bmin.z && v1.z>=bmin.z)
+ {
+ float a = (bmin.z-v0.z)/(v1.z-v0.z);
+ float vx = (1-a) *v0.x + a*v1.x;
+ float vy = (1-a) *v0.y + a*v1.y;
+ // v.z = bmin.z;
+ if(vy>=bmin.y && vy<=bmax.y && vx>=bmin.x && vx<=bmax.x)
+ {
+ impact->x = vx;
+ impact->y = vy;
+ impact->z = bmin.z;
+ return 1;
+ }
+ }
+ else if(v0.z >= bmax.z && v1.z <= bmax.z)
+ {
+ float a = (bmax.z-v0.z)/(v1.z-v0.z);
+ float vx = (1-a) *v0.x + a*v1.x;
+ float vy = (1-a) *v0.y + a*v1.y;
+ // v.z = bmax.z;
+ if(vy>=bmin.y && vy<=bmax.y && vx>=bmin.x && vx<=bmax.x)
+ {
+ impact->x = vx;
+ impact->y = vy;
+ impact->z = bmax.z;
+ return 1;
+ }
+ }
+ return 0;
+}
+
+
+float DistanceBetweenLines(const float3 &ustart, const float3 &udir, const float3 &vstart, const float3 &vdir, float3 *upoint, float3 *vpoint)
+{
+ float3 cp;
+ cp = normalize(cross(udir,vdir));
+
+ float distu = -dot(cp,ustart);
+ float distv = -dot(cp,vstart);
+ float dist = (float)fabs(distu-distv);
+ if(upoint)
+ {
+ Plane plane;
+ plane.normal = normalize(cross(vdir,cp));
+ plane.dist = -dot(plane.normal,vstart);
+ *upoint = PlaneLineIntersection(plane,ustart,ustart+udir);
+ }
+ if(vpoint)
+ {
+ Plane plane;
+ plane.normal = normalize(cross(udir,cp));
+ plane.dist = -dot(plane.normal,ustart);
+ *vpoint = PlaneLineIntersection(plane,vstart,vstart+vdir);
+ }
+ return dist;
+}
+
+
+Quaternion VirtualTrackBall(const float3 &cop, const float3 &cor, const float3 &dir1, const float3 &dir2)
+{
+ // routine taken from game programming gems.
+ // Implement track ball functionality to spin stuf on the screen
+ // cop center of projection
+ // cor center of rotation
+ // dir1 old mouse direction
+ // dir2 new mouse direction
+ // pretend there is a sphere around cor. Then find the points
+ // where dir1 and dir2 intersect that sphere. Find the
+ // rotation that takes the first point to the second.
+ float m;
+ // compute plane
+ float3 nrml = cor - cop;
+ float fudgefactor = 1.0f/(magnitude(nrml) * 0.25f); // since trackball proportional to distance from cop
+ nrml = normalize(nrml);
+ float dist = -dot(nrml,cor);
+ float3 u= PlaneLineIntersection(Plane(nrml,dist),cop,cop+dir1);
+ u=u-cor;
+ u=u*fudgefactor;
+ m= magnitude(u);
+ if(m>1)
+ {
+ u/=m;
+ }
+ else
+ {
+ u=u - (nrml * sqrtf(1-m*m));
+ }
+ float3 v= PlaneLineIntersection(Plane(nrml,dist),cop,cop+dir2);
+ v=v-cor;
+ v=v*fudgefactor;
+ m= magnitude(v);
+ if(m>1)
+ {
+ v/=m;
+ }
+ else
+ {
+ v=v - (nrml * sqrtf(1-m*m));
+ }
+ return RotationArc(u,v);
+}
+
+
+int countpolyhit=0;
+int PolyHit(const float3 *vert, const int n, const float3 &v0, const float3 &v1, float3 *impact, float3 *normal)
+{
+ countpolyhit++;
+ int i;
+ float3 nrml(0,0,0);
+ for(i=0;i<n;i++)
+ {
+ int i1=(i+1)%n;
+ int i2=(i+2)%n;
+ nrml = nrml + cross(vert[i1]-vert[i],vert[i2]-vert[i1]);
+ }
+
+ float m = magnitude(nrml);
+ if(m==0.0)
+ {
+ return 0;
+ }
+ nrml = nrml * (1.0f/m);
+ float dist = -dot(nrml,vert[0]);
+ float d0,d1;
+ if((d0=dot(v0,nrml)+dist) <0 || (d1=dot(v1,nrml)+dist) >0)
+ {
+ return 0;
+ }
+
+ float3 the_point;
+ // By using the cached plane distances d0 and d1
+ // we can optimize the following:
+ // the_point = planelineintersection(nrml,dist,v0,v1);
+ float a = d0/(d0-d1);
+ the_point = v0*(1-a) + v1*a;
+
+
+ int inside=1;
+ for(int j=0;inside && j<n;j++)
+ {
+ // let inside = 0 if outside
+ float3 pp1,pp2,side;
+ pp1 = vert[j] ;
+ pp2 = vert[(j+1)%n];
+ side = cross((pp2-pp1),(the_point-pp1));
+ inside = (dot(nrml,side) >= 0.0);
+ }
+ if(inside)
+ {
+ if(normal){*normal=nrml;}
+ if(impact){*impact=the_point;}
+ }
+ return inside;
+}
+
+//**************************************************************************
+//**************************************************************************
+//*** Stan Melax's array template, needed to compile his hull generation code
+//**************************************************************************
+//**************************************************************************
+
+template <class Type> class ArrayRet;
+template <class Type> class Array {
+ public:
+ Array(int s=0);
+ Array(Array<Type> &array);
+ Array(ArrayRet<Type> &array);
+ ~Array();
+ void allocate(int s);
+ void SetSize(int s);
+ void Pack();
+ Type& Add(Type);
+ void AddUnique(Type);
+ int Contains(Type);
+ void Insert(Type,int);
+ int IndexOf(Type);
+ void Remove(Type);
+ void DelIndex(int i);
+ Type * element;
+ int count;
+ int array_size;
+ const Type &operator[](int i) const { assert(i>=0 && i<count); return element[i]; }
+ Type &operator[](int i) { assert(i>=0 && i<count); return element[i]; }
+ Type &Pop() { assert(count); count--; return element[count]; }
+ Array<Type> &operator=(Array<Type> &array);
+ Array<Type> &operator=(ArrayRet<Type> &array);
+ // operator ArrayRet<Type> &() { return *(ArrayRet<Type> *)this;} // this worked but i suspect could be dangerous
+};
+
+template <class Type> class ArrayRet:public Array<Type>
+{
+};
+
+template <class Type> Array<Type>::Array(int s)
+{
+ count=0;
+ array_size = 0;
+ element = NULL;
+ if(s)
+ {
+ allocate(s);
+ }
+}
+
+
+template <class Type> Array<Type>::Array(Array<Type> &array)
+{
+ count=0;
+ array_size = 0;
+ element = NULL;
+ for(int i=0;i<array.count;i++)
+ {
+ Add(array[i]);
+ }
+}
+
+
+template <class Type> Array<Type>::Array(ArrayRet<Type> &array)
+{
+ *this = array;
+}
+template <class Type> Array<Type> &Array<Type>::operator=(ArrayRet<Type> &array)
+{
+ count=array.count;
+ array_size = array.array_size;
+ element = array.element;
+ array.element=NULL;
+ array.count=0;
+ array.array_size=0;
+ return *this;
+}
+
+
+template <class Type> Array<Type> &Array<Type>::operator=(Array<Type> &array)
+{
+ count=0;
+ for(int i=0;i<array.count;i++)
+ {
+ Add(array[i]);
+ }
+ return *this;
+}
+
+template <class Type> Array<Type>::~Array()
+{
+ if (element != NULL)
+ {
+ free(element);
+ }
+ count=0;array_size=0;element=NULL;
+}
+
+template <class Type> void Array<Type>::allocate(int s)
+{
+ assert(s>0);
+ assert(s>=count);
+ Type *old = element;
+ array_size =s;
+ element = (Type *) malloc( sizeof(Type)*array_size);
+ assert(element);
+ for(int i=0;i<count;i++)
+ {
+ element[i]=old[i];
+ }
+ if(old)
+ {
+ free(old);
+ }
+}
+
+template <class Type> void Array<Type>::SetSize(int s)
+{
+ if(s==0)
+ {
+ if(element)
+ {
+ free(element);
+ element = NULL;
+ }
+ array_size = s;
+ }
+ else
+ {
+ allocate(s);
+ }
+ count=s;
+}
+
+template <class Type> void Array<Type>::Pack()
+{
+ allocate(count);
+}
+
+template <class Type> Type& Array<Type>::Add(Type t)
+{
+ assert(count<=array_size);
+ if(count==array_size)
+ {
+ allocate((array_size)?array_size *2:16);
+ }
+ element[count++] = t;
+ return element[count-1];
+}
+
+template <class Type> int Array<Type>::Contains(Type t)
+{
+ int i;
+ int found=0;
+ for(i=0;i<count;i++)
+ {
+ if(element[i] == t) found++;
+ }
+ return found;
+}
+
+template <class Type> void Array<Type>::AddUnique(Type t)
+{
+ if(!Contains(t)) Add(t);
+}
+
+
+template <class Type> void Array<Type>::DelIndex(int i)
+{
+ assert(i<count);
+ count--;
+ while(i<count)
+ {
+ element[i] = element[i+1];
+ i++;
+ }
+}
+
+template <class Type> void Array<Type>::Remove(Type t)
+{
+ int i;
+ for(i=0;i<count;i++)
+ {
+ if(element[i] == t)
+ {
+ break;
+ }
+ }
+ assert(i<count); // assert object t is in the array.
+ DelIndex(i);
+ for(i=0;i<count;i++)
+ {
+ assert(element[i] != t);
+ }
+}
+
+template <class Type> void Array<Type>::Insert(Type t,int k)
+{
+ int i=count;
+ Add(t); // to allocate space
+ while(i>k)
+ {
+ element[i]=element[i-1];
+ i--;
+ }
+ assert(i==k);
+ element[k]=t;
+}
+
+
+template <class Type> int Array<Type>::IndexOf(Type t)
+{
+ int i;
+ for(i=0;i<count;i++)
+ {
+ if(element[i] == t)
+ {
+ return i;
+ }
+ }
+ assert(0);
+ return -1;
+}
+
+
+
+//*********************************************************************
+//*********************************************************************
+//******** Hull header
+//*********************************************************************
+//*********************************************************************
+
+class PHullResult
+{
+public:
+
+ PHullResult(void)
+ {
+ mVcount = 0;
+ mIndexCount = 0;
+ mFaceCount = 0;
+ mVertices = 0;
+ mIndices = 0;
+ }
+
+ unsigned int mVcount;
+ unsigned int mIndexCount;
+ unsigned int mFaceCount;
+ float *mVertices;
+ unsigned int *mIndices;
+};
+
+
+#define REAL3 float3
+#define REAL float
+
+#define COPLANAR (0)
+#define UNDER (1)
+#define OVER (2)
+#define SPLIT (OVER|UNDER)
+#define PAPERWIDTH (0.001f)
+
+float planetestepsilon = PAPERWIDTH;
+
+
+class ConvexH
+{
+ public:
+ class HalfEdge
+ {
+ public:
+ short ea; // the other half of the edge (index into edges list)
+ unsigned char v; // the vertex at the start of this edge (index into vertices list)
+ unsigned char p; // the facet on which this edge lies (index into facets list)
+ HalfEdge(){}
+ HalfEdge(short _ea,unsigned char _v, unsigned char _p):ea(_ea),v(_v),p(_p){}
+ };
+ Array<REAL3> vertices;
+ Array<HalfEdge> edges;
+ Array<Plane> facets;
+ ConvexH(int vertices_size,int edges_size,int facets_size);
+};
+
+typedef ConvexH::HalfEdge HalfEdge;
+
+ConvexH::ConvexH(int vertices_size,int edges_size,int facets_size)
+ :vertices(vertices_size)
+ ,edges(edges_size)
+ ,facets(facets_size)
+{
+ vertices.count=vertices_size;
+ edges.count = edges_size;
+ facets.count = facets_size;
+}
+
+ConvexH *ConvexHDup(ConvexH *src) {
+ ConvexH *dst = new ConvexH(src->vertices.count,src->edges.count,src->facets.count);
+ memcpy(dst->vertices.element,src->vertices.element,sizeof(float3)*src->vertices.count);
+ memcpy(dst->edges.element,src->edges.element,sizeof(HalfEdge)*src->edges.count);
+ memcpy(dst->facets.element,src->facets.element,sizeof(Plane)*src->facets.count);
+ return dst;
+}
+
+
+int PlaneTest(const Plane &p, const REAL3 &v) {
+ REAL a = dot(v,p.normal)+p.dist;
+ int flag = (a>planetestepsilon)?OVER:((a<-planetestepsilon)?UNDER:COPLANAR);
+ return flag;
+}
+
+int SplitTest(ConvexH &convex,const Plane &plane) {
+ int flag=0;
+ for(int i=0;i<convex.vertices.count;i++) {
+ flag |= PlaneTest(plane,convex.vertices[i]);
+ }
+ return flag;
+}
+
+class VertFlag
+{
+public:
+ unsigned char planetest;
+ unsigned char junk;
+ unsigned char undermap;
+ unsigned char overmap;
+};
+class EdgeFlag
+{
+public:
+ unsigned char planetest;
+ unsigned char fixes;
+ short undermap;
+ short overmap;
+};
+class PlaneFlag
+{
+public:
+ unsigned char undermap;
+ unsigned char overmap;
+};
+class Coplanar{
+public:
+ unsigned short ea;
+ unsigned char v0;
+ unsigned char v1;
+};
+
+int AssertIntact(ConvexH &convex) {
+ int i;
+ int estart=0;
+ for(i=0;i<convex.edges.count;i++) {
+ if(convex.edges[estart].p!= convex.edges[i].p) {
+ estart=i;
+ }
+ int inext = i+1;
+ if(inext>= convex.edges.count || convex.edges[inext].p != convex.edges[i].p) {
+ inext = estart;
+ }
+ assert(convex.edges[inext].p == convex.edges[i].p);
+ int nb = convex.edges[i].ea;
+ assert(nb!=255);
+ if(nb==255 || nb==-1) return 0;
+ assert(nb!=-1);
+ assert(i== convex.edges[nb].ea);
+ }
+ for(i=0;i<convex.edges.count;i++) {
+ assert(COPLANAR==PlaneTest(convex.facets[convex.edges[i].p],convex.vertices[convex.edges[i].v]));
+ if(COPLANAR!=PlaneTest(convex.facets[convex.edges[i].p],convex.vertices[convex.edges[i].v])) return 0;
+ if(convex.edges[estart].p!= convex.edges[i].p) {
+ estart=i;
+ }
+ int i1 = i+1;
+ if(i1>= convex.edges.count || convex.edges[i1].p != convex.edges[i].p) {
+ i1 = estart;
+ }
+ int i2 = i1+1;
+ if(i2>= convex.edges.count || convex.edges[i2].p != convex.edges[i].p) {
+ i2 = estart;
+ }
+ if(i==i2) continue; // i sliced tangent to an edge and created 2 meaningless edges
+ REAL3 localnormal = TriNormal(convex.vertices[convex.edges[i ].v],
+ convex.vertices[convex.edges[i1].v],
+ convex.vertices[convex.edges[i2].v]);
+ assert(dot(localnormal,convex.facets[convex.edges[i].p].normal)>0);
+ if(dot(localnormal,convex.facets[convex.edges[i].p].normal)<=0)return 0;
+ }
+ return 1;
+}
+
+// back to back quads
+ConvexH *test_btbq() {
+ ConvexH *convex = new ConvexH(4,8,2);
+ convex->vertices[0] = REAL3(0,0,0);
+ convex->vertices[1] = REAL3(1,0,0);
+ convex->vertices[2] = REAL3(1,1,0);
+ convex->vertices[3] = REAL3(0,1,0);
+ convex->facets[0] = Plane(REAL3(0,0,1),0);
+ convex->facets[1] = Plane(REAL3(0,0,-1),0);
+ convex->edges[0] = HalfEdge(7,0,0);
+ convex->edges[1] = HalfEdge(6,1,0);
+ convex->edges[2] = HalfEdge(5,2,0);
+ convex->edges[3] = HalfEdge(4,3,0);
+
+ convex->edges[4] = HalfEdge(3,0,1);
+ convex->edges[5] = HalfEdge(2,3,1);
+ convex->edges[6] = HalfEdge(1,2,1);
+ convex->edges[7] = HalfEdge(0,1,1);
+ AssertIntact(*convex);
+ return convex;
+}
+ConvexH *test_cube() {
+ ConvexH *convex = new ConvexH(8,24,6);
+ convex->vertices[0] = REAL3(0,0,0);
+ convex->vertices[1] = REAL3(0,0,1);
+ convex->vertices[2] = REAL3(0,1,0);
+ convex->vertices[3] = REAL3(0,1,1);
+ convex->vertices[4] = REAL3(1,0,0);
+ convex->vertices[5] = REAL3(1,0,1);
+ convex->vertices[6] = REAL3(1,1,0);
+ convex->vertices[7] = REAL3(1,1,1);
+
+ convex->facets[0] = Plane(REAL3(-1,0,0),0);
+ convex->facets[1] = Plane(REAL3(1,0,0),-1);
+ convex->facets[2] = Plane(REAL3(0,-1,0),0);
+ convex->facets[3] = Plane(REAL3(0,1,0),-1);
+ convex->facets[4] = Plane(REAL3(0,0,-1),0);
+ convex->facets[5] = Plane(REAL3(0,0,1),-1);
+
+ convex->edges[0 ] = HalfEdge(11,0,0);
+ convex->edges[1 ] = HalfEdge(23,1,0);
+ convex->edges[2 ] = HalfEdge(15,3,0);
+ convex->edges[3 ] = HalfEdge(16,2,0);
+
+ convex->edges[4 ] = HalfEdge(13,6,1);
+ convex->edges[5 ] = HalfEdge(21,7,1);
+ convex->edges[6 ] = HalfEdge( 9,5,1);
+ convex->edges[7 ] = HalfEdge(18,4,1);
+
+ convex->edges[8 ] = HalfEdge(19,0,2);
+ convex->edges[9 ] = HalfEdge( 6,4,2);
+ convex->edges[10] = HalfEdge(20,5,2);
+ convex->edges[11] = HalfEdge( 0,1,2);
+
+ convex->edges[12] = HalfEdge(22,3,3);
+ convex->edges[13] = HalfEdge( 4,7,3);
+ convex->edges[14] = HalfEdge(17,6,3);
+ convex->edges[15] = HalfEdge( 2,2,3);
+
+ convex->edges[16] = HalfEdge( 3,0,4);
+ convex->edges[17] = HalfEdge(14,2,4);
+ convex->edges[18] = HalfEdge( 7,6,4);
+ convex->edges[19] = HalfEdge( 8,4,4);
+
+ convex->edges[20] = HalfEdge(10,1,5);
+ convex->edges[21] = HalfEdge( 5,5,5);
+ convex->edges[22] = HalfEdge(12,7,5);
+ convex->edges[23] = HalfEdge( 1,3,5);
+
+
+ return convex;
+}
+ConvexH *ConvexHMakeCube(const REAL3 &bmin, const REAL3 &bmax) {
+ ConvexH *convex = test_cube();
+ convex->vertices[0] = REAL3(bmin.x,bmin.y,bmin.z);
+ convex->vertices[1] = REAL3(bmin.x,bmin.y,bmax.z);
+ convex->vertices[2] = REAL3(bmin.x,bmax.y,bmin.z);
+ convex->vertices[3] = REAL3(bmin.x,bmax.y,bmax.z);
+ convex->vertices[4] = REAL3(bmax.x,bmin.y,bmin.z);
+ convex->vertices[5] = REAL3(bmax.x,bmin.y,bmax.z);
+ convex->vertices[6] = REAL3(bmax.x,bmax.y,bmin.z);
+ convex->vertices[7] = REAL3(bmax.x,bmax.y,bmax.z);
+
+ convex->facets[0] = Plane(REAL3(-1,0,0), bmin.x);
+ convex->facets[1] = Plane(REAL3(1,0,0), -bmax.x);
+ convex->facets[2] = Plane(REAL3(0,-1,0), bmin.y);
+ convex->facets[3] = Plane(REAL3(0,1,0), -bmax.y);
+ convex->facets[4] = Plane(REAL3(0,0,-1), bmin.z);
+ convex->facets[5] = Plane(REAL3(0,0,1), -bmax.z);
+ return convex;
+}
+ConvexH *ConvexHCrop(ConvexH &convex,const Plane &slice)
+{
+ int i;
+ int vertcountunder=0;
+ int vertcountover =0;
+ Array<int> vertscoplanar; // existing vertex members of convex that are coplanar
+ vertscoplanar.count=0;
+ Array<int> edgesplit; // existing edges that members of convex that cross the splitplane
+ edgesplit.count=0;
+
+ assert(convex.edges.count<480);
+
+ EdgeFlag edgeflag[512];
+ VertFlag vertflag[256];
+ PlaneFlag planeflag[128];
+ HalfEdge tmpunderedges[512];
+ Plane tmpunderplanes[128];
+ Coplanar coplanaredges[512];
+ int coplanaredges_num=0;
+
+ Array<REAL3> createdverts;
+ // do the side-of-plane tests
+ for(i=0;i<convex.vertices.count;i++) {
+ vertflag[i].planetest = PlaneTest(slice,convex.vertices[i]);
+ if(vertflag[i].planetest == COPLANAR) {
+ // ? vertscoplanar.Add(i);
+ vertflag[i].undermap = vertcountunder++;
+ vertflag[i].overmap = vertcountover++;
+ }
+ else if(vertflag[i].planetest == UNDER) {
+ vertflag[i].undermap = vertcountunder++;
+ }
+ else {
+ assert(vertflag[i].planetest == OVER);
+ vertflag[i].overmap = vertcountover++;
+ vertflag[i].undermap = 255; // for debugging purposes
+ }
+ }
+ int vertcountunderold = vertcountunder; // for debugging only
+
+ int under_edge_count =0;
+ int underplanescount=0;
+ int e0=0;
+
+ for(int currentplane=0; currentplane<convex.facets.count; currentplane++) {
+ int estart =e0;
+ int enextface = 0;
+ int planeside = 0;
+ int e1 = e0+1;
+ int vout=-1;
+ int vin =-1;
+ int coplanaredge = -1;
+ do{
+
+ if(e1 >= convex.edges.count || convex.edges[e1].p!=currentplane) {
+ enextface = e1;
+ e1=estart;
+ }
+ HalfEdge &edge0 = convex.edges[e0];
+ HalfEdge &edge1 = convex.edges[e1];
+ HalfEdge &edgea = convex.edges[edge0.ea];
+
+
+ planeside |= vertflag[edge0.v].planetest;
+ //if((vertflag[edge0.v].planetest & vertflag[edge1.v].planetest) == COPLANAR) {
+ // assert(ecop==-1);
+ // ecop=e;
+ //}
+
+
+ if(vertflag[edge0.v].planetest == OVER && vertflag[edge1.v].planetest == OVER){
+ // both endpoints over plane
+ edgeflag[e0].undermap = -1;
+ }
+ else if((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == UNDER) {
+ // at least one endpoint under, the other coplanar or under
+
+ edgeflag[e0].undermap = under_edge_count;
+ tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap;
+ tmpunderedges[under_edge_count].p = underplanescount;
+ if(edge0.ea < e0) {
+ // connect the neighbors
+ assert(edgeflag[edge0.ea].undermap !=-1);
+ tmpunderedges[under_edge_count].ea = edgeflag[edge0.ea].undermap;
+ tmpunderedges[edgeflag[edge0.ea].undermap].ea = under_edge_count;
+ }
+ under_edge_count++;
+ }
+ else if((vertflag[edge0.v].planetest | vertflag[edge1.v].planetest) == COPLANAR) {
+ // both endpoints coplanar
+ // must check a 3rd point to see if UNDER
+ int e2 = e1+1;
+ if(e2>=convex.edges.count || convex.edges[e2].p!=currentplane) {
+ e2 = estart;
+ }
+ assert(convex.edges[e2].p==currentplane);
+ HalfEdge &edge2 = convex.edges[e2];
+ if(vertflag[edge2.v].planetest==UNDER) {
+
+ edgeflag[e0].undermap = under_edge_count;
+ tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap;
+ tmpunderedges[under_edge_count].p = underplanescount;
+ tmpunderedges[under_edge_count].ea = -1;
+ // make sure this edge is added to the "coplanar" list
+ coplanaredge = under_edge_count;
+ vout = vertflag[edge0.v].undermap;
+ vin = vertflag[edge1.v].undermap;
+ under_edge_count++;
+ }
+ else {
+ edgeflag[e0].undermap = -1;
+ }
+ }
+ else if(vertflag[edge0.v].planetest == UNDER && vertflag[edge1.v].planetest == OVER) {
+ // first is under 2nd is over
+
+ edgeflag[e0].undermap = under_edge_count;
+ tmpunderedges[under_edge_count].v = vertflag[edge0.v].undermap;
+ tmpunderedges[under_edge_count].p = underplanescount;
+ if(edge0.ea < e0) {
+ assert(edgeflag[edge0.ea].undermap !=-1);
+ // connect the neighbors
+ tmpunderedges[under_edge_count].ea = edgeflag[edge0.ea].undermap;
+ tmpunderedges[edgeflag[edge0.ea].undermap].ea = under_edge_count;
+ vout = tmpunderedges[edgeflag[edge0.ea].undermap].v;
+ }
+ else {
+ Plane &p0 = convex.facets[edge0.p];
+ Plane &pa = convex.facets[edgea.p];
+ createdverts.Add(ThreePlaneIntersection(p0,pa,slice));
+ //createdverts.Add(PlaneProject(slice,PlaneLineIntersection(slice,convex.vertices[edge0.v],convex.vertices[edgea.v])));
+ //createdverts.Add(PlaneLineIntersection(slice,convex.vertices[edge0.v],convex.vertices[edgea.v]));
+ vout = vertcountunder++;
+ }
+ under_edge_count++;
+ /// hmmm something to think about: i might be able to output this edge regarless of
+ // wheter or not we know v-in yet. ok i;ll try this now:
+ tmpunderedges[under_edge_count].v = vout;
+ tmpunderedges[under_edge_count].p = underplanescount;
+ tmpunderedges[under_edge_count].ea = -1;
+ coplanaredge = under_edge_count;
+ under_edge_count++;
+
+ if(vin!=-1) {
+ // we previously processed an edge where we came under
+ // now we know about vout as well
+
+ // ADD THIS EDGE TO THE LIST OF EDGES THAT NEED NEIGHBOR ON PARTITION PLANE!!
+ }
+
+ }
+ else if(vertflag[edge0.v].planetest == COPLANAR && vertflag[edge1.v].planetest == OVER) {
+ // first is coplanar 2nd is over
+
+ edgeflag[e0].undermap = -1;
+ vout = vertflag[edge0.v].undermap;
+ // I hate this but i have to make sure part of this face is UNDER before ouputting this vert
+ int k=estart;
+ assert(edge0.p == currentplane);
+ while(!(planeside&UNDER) && k<convex.edges.count && convex.edges[k].p==edge0.p) {
+ planeside |= vertflag[convex.edges[k].v].planetest;
+ k++;
+ }
+ if(planeside&UNDER){
+ tmpunderedges[under_edge_count].v = vout;
+ tmpunderedges[under_edge_count].p = underplanescount;
+ tmpunderedges[under_edge_count].ea = -1;
+ coplanaredge = under_edge_count; // hmmm should make a note of the edge # for later on
+ under_edge_count++;
+
+ }
+ }
+ else if(vertflag[edge0.v].planetest == OVER && vertflag[edge1.v].planetest == UNDER) {
+ // first is over next is under
+ // new vertex!!!
+ assert(vin==-1);
+ if(e0<edge0.ea) {
+ Plane &p0 = convex.facets[edge0.p];
+ Plane &pa = convex.facets[edgea.p];
+ createdverts.Add(ThreePlaneIntersection(p0,pa,slice));
+ //createdverts.Add(PlaneLineIntersection(slice,convex.vertices[edge0.v],convex.vertices[edgea.v]));
+ //createdverts.Add(PlaneProject(slice,PlaneLineIntersection(slice,convex.vertices[edge0.v],convex.vertices[edgea.v])));
+ vin = vertcountunder++;
+ }
+ else {
+ // find the new vertex that was created by edge[edge0.ea]
+ int nea = edgeflag[edge0.ea].undermap;
+ assert(tmpunderedges[nea].p==tmpunderedges[nea+1].p);
+ vin = tmpunderedges[nea+1].v;
+ assert(vin < vertcountunder);
+ assert(vin >= vertcountunderold); // for debugging only
+ }
+ if(vout!=-1) {
+ // we previously processed an edge where we went over
+ // now we know vin too
+ // ADD THIS EDGE TO THE LIST OF EDGES THAT NEED NEIGHBOR ON PARTITION PLANE!!
+ }
+ // output edge
+ tmpunderedges[under_edge_count].v = vin;
+ tmpunderedges[under_edge_count].p = underplanescount;
+ edgeflag[e0].undermap = under_edge_count;
+ if(e0>edge0.ea) {
+ assert(edgeflag[edge0.ea].undermap !=-1);
+ // connect the neighbors
+ tmpunderedges[under_edge_count].ea = edgeflag[edge0.ea].undermap;
+ tmpunderedges[edgeflag[edge0.ea].undermap].ea = under_edge_count;
+ }
+ assert(edgeflag[e0].undermap == under_edge_count);
+ under_edge_count++;
+ }
+ else if(vertflag[edge0.v].planetest == OVER && vertflag[edge1.v].planetest == COPLANAR) {
+ // first is over next is coplanar
+
+ edgeflag[e0].undermap = -1;
+ vin = vertflag[edge1.v].undermap;
+ assert(vin!=-1);
+ if(vout!=-1) {
+ // we previously processed an edge where we came under
+ // now we know both endpoints
+ // ADD THIS EDGE TO THE LIST OF EDGES THAT NEED NEIGHBOR ON PARTITION PLANE!!
+ }
+
+ }
+ else {
+ assert(0);
+ }
+
+
+ e0=e1;
+ e1++; // do the modulo at the beginning of the loop
+
+ } while(e0!=estart) ;
+ e0 = enextface;
+ if(planeside&UNDER) {
+ planeflag[currentplane].undermap = underplanescount;
+ tmpunderplanes[underplanescount] = convex.facets[currentplane];
+ underplanescount++;
+ }
+ else {
+ planeflag[currentplane].undermap = 0;
+ }
+ if(vout>=0 && (planeside&UNDER)) {
+ assert(vin>=0);
+ assert(coplanaredge>=0);
+ assert(coplanaredge!=511);
+ coplanaredges[coplanaredges_num].ea = coplanaredge;
+ coplanaredges[coplanaredges_num].v0 = vin;
+ coplanaredges[coplanaredges_num].v1 = vout;
+ coplanaredges_num++;
+ }
+ }
+
+ // add the new plane to the mix:
+ if(coplanaredges_num>0) {
+ tmpunderplanes[underplanescount++]=slice;
+ }
+ for(i=0;i<coplanaredges_num-1;i++) {
+ if(coplanaredges[i].v1 != coplanaredges[i+1].v0) {
+ int j = 0;
+ for(j=i+2;j<coplanaredges_num;j++) {
+ if(coplanaredges[i].v1 == coplanaredges[j].v0) {
+ Coplanar tmp = coplanaredges[i+1];
+ coplanaredges[i+1] = coplanaredges[j];
+ coplanaredges[j] = tmp;
+ break;
+ }
+ }
+ if(j>=coplanaredges_num)
+ {
+ assert(j<coplanaredges_num);
+ return NULL;
+ }
+ }
+ }
+ ConvexH *punder = new ConvexH(vertcountunder,under_edge_count+coplanaredges_num,underplanescount);
+ ConvexH &under = *punder;
+ int k=0;
+ for(i=0;i<convex.vertices.count;i++) {
+ if(vertflag[i].planetest != OVER){
+ under.vertices[k++] = convex.vertices[i];
+ }
+ }
+ i=0;
+ while(k<vertcountunder) {
+ under.vertices[k++] = createdverts[i++];
+ }
+ assert(i==createdverts.count);
+
+ for(i=0;i<coplanaredges_num;i++) {
+ under.edges[under_edge_count+i].p = underplanescount-1;
+ under.edges[under_edge_count+i].ea = coplanaredges[i].ea;
+ tmpunderedges[coplanaredges[i].ea].ea = under_edge_count+i;
+ under.edges[under_edge_count+i].v = coplanaredges[i].v0;
+ }
+
+ memcpy(under.edges.element,tmpunderedges,sizeof(HalfEdge)*under_edge_count);
+ memcpy(under.facets.element,tmpunderplanes,sizeof(Plane)*underplanescount);
+ return punder;
+}
+
+
+
+static int candidateplane(Plane *planes,int planes_count,ConvexH *convex,float epsilon)
+{
+ int p = 0 ;
+ REAL md= 0 ;
+ int i;
+ for(i=0;i<planes_count;i++)
+ {
+ REAL d=0;
+ for(int j=0;j<convex->vertices.count;j++)
+ {
+ d = Max(d,dot(convex->vertices[j],planes[i].normal)+planes[i].dist);
+ }
+ if(i==0 || d>md)
+ {
+ p=i;
+ md=d;
+ }
+ }
+ return (md>epsilon)?p:-1;
+}
+
+template<class T>
+inline int maxdir(const T *p,int count,const T &dir)
+{
+ assert(count);
+ int m=0;
+ float currDotm = dot(p[0], dir);
+ for(int i=1;i<count;i++)
+ {
+ const float currDoti = dot(p[i], dir);
+ if(currDoti > currDotm)
+ {
+ currDotm = currDoti;
+ m=i;
+ }
+ }
+ return m;
+}
+
+
+template<class T>
+int maxdirfiltered(const T *p,int count,const T &dir,Array<int> &allow)
+{
+ assert(count);
+ int m=-1;
+ float currDotm = dot(p[0], dir);
+ for(int i=0;i<count;i++)
+ {
+ if(allow[i])
+ {
+ if(m==-1 )
+ {
+ m=i;
+ }
+ else
+ {
+ const float currDoti = dot(p[i], dir);
+ if (currDoti>currDotm)
+ {
+ currDotm = currDoti;
+ m=i;
+ }
+ }
+ }
+ }
+ assert(m!=-1);
+ return m;
+}
+
+float3 orth(const float3 &v)
+{
+ float3 a=cross(v,float3(0,0,1));
+ float3 b=cross(v,float3(0,1,0));
+ return normalize((magnitude(a)>magnitude(b))?a:b);
+}
+
+
+template<class T>
+int maxdirsterid(const T *p,int count,const T &dir,Array<int> &allow)
+{
+ int m=-1;
+ while(m==-1)
+ {
+ m = maxdirfiltered(p,count,dir,allow);
+ if(allow[m]==3) return m;
+ T u = orth(dir);
+ T v = cross(u,dir);
+ int ma=-1;
+ for(float x = 0.0f ; x<= 360.0f ; x+= 45.0f)
+ {
+ float s = sinf(DEG2RAD*(x));
+ float c = cosf(DEG2RAD*(x));
+ int mb = maxdirfiltered(p,count,dir+(u*s+v*c)*0.025f,allow);
+ if(ma==m && mb==m)
+ {
+ allow[m]=3;
+ return m;
+ }
+ if(ma!=-1 && ma!=mb) // Yuck - this is really ugly
+ {
+ int mc = ma;
+ for(float xx = x-40.0f ; xx <= x ; xx+= 5.0f)
+ {
+ float s = sinf(DEG2RAD*(xx));
+ float c = cosf(DEG2RAD*(xx));
+ int md = maxdirfiltered(p,count,dir+(u*s+v*c)*0.025f,allow);
+ if(mc==m && md==m)
+ {
+ allow[m]=3;
+ return m;
+ }
+ mc=md;
+ }
+ }
+ ma=mb;
+ }
+ allow[m]=0;
+ m=-1;
+ }
+ assert(0);
+ return m;
+}
+
+
+
+
+int operator ==(const int3 &a,const int3 &b)
+{
+ for(int i=0;i<3;i++)
+ {
+ if(a[i]!=b[i]) return 0;
+ }
+ return 1;
+}
+
+int3 roll3(int3 a)
+{
+ int tmp=a[0];
+ a[0]=a[1];
+ a[1]=a[2];
+ a[2]=tmp;
+ return a;
+}
+int isa(const int3 &a,const int3 &b)
+{
+ return ( a==b || roll3(a)==b || a==roll3(b) );
+}
+int b2b(const int3 &a,const int3 &b)
+{
+ return isa(a,int3(b[2],b[1],b[0]));
+}
+int above(float3* vertices,const int3& t, const float3 &p, float epsilon)
+{
+ float3 n=TriNormal(vertices[t[0]],vertices[t[1]],vertices[t[2]]);
+ return (dot(n,p-vertices[t[0]]) > epsilon); // EPSILON???
+}
+int hasedge(const int3 &t, int a,int b)
+{
+ for(int i=0;i<3;i++)
+ {
+ int i1= (i+1)%3;
+ if(t[i]==a && t[i1]==b) return 1;
+ }
+ return 0;
+}
+int hasvert(const int3 &t, int v)
+{
+ return (t[0]==v || t[1]==v || t[2]==v) ;
+}
+int shareedge(const int3 &a,const int3 &b)
+{
+ int i;
+ for(i=0;i<3;i++)
+ {
+ int i1= (i+1)%3;
+ if(hasedge(a,b[i1],b[i])) return 1;
+ }
+ return 0;
+}
+
+class btHullTriangle;
+
+//Array<btHullTriangle*> tris;
+
+class btHullTriangle : public int3
+{
+public:
+ int3 n;
+ int id;
+ int vmax;
+ float rise;
+ Array<btHullTriangle*>* tris;
+ btHullTriangle(int a,int b,int c, Array<btHullTriangle*>* pTris):int3(a,b,c),n(-1,-1,-1)
+ {
+ tris = pTris;
+ id = tris->count;
+ tris->Add(this);
+ vmax=-1;
+ rise = 0.0f;
+ }
+ ~btHullTriangle()
+ {
+ assert((*tris)[id]==this);
+ (*tris)[id]=NULL;
+ }
+ int &neib(int a,int b);
+};
+
+
+int &btHullTriangle::neib(int a,int b)
+{
+ static int er=-1;
+ int i;
+ for(i=0;i<3;i++)
+ {
+ int i1=(i+1)%3;
+ int i2=(i+2)%3;
+ if((*this)[i]==a && (*this)[i1]==b) return n[i2];
+ if((*this)[i]==b && (*this)[i1]==a) return n[i2];
+ }
+ assert(0);
+ return er;
+}
+void b2bfix(btHullTriangle* s,btHullTriangle*t, Array<btHullTriangle*>& tris)
+{
+ int i;
+ for(i=0;i<3;i++)
+ {
+ int i1=(i+1)%3;
+ int i2=(i+2)%3;
+ int a = (*s)[i1];
+ int b = (*s)[i2];
+ assert(tris[s->neib(a,b)]->neib(b,a) == s->id);
+ assert(tris[t->neib(a,b)]->neib(b,a) == t->id);
+ tris[s->neib(a,b)]->neib(b,a) = t->neib(b,a);
+ tris[t->neib(b,a)]->neib(a,b) = s->neib(a,b);
+ }
+}
+
+void removeb2b(btHullTriangle* s,btHullTriangle*t, Array<btHullTriangle*>& tris)
+{
+ b2bfix(s,t, tris);
+ delete s;
+ delete t;
+}
+
+void checkit(btHullTriangle *t, Array<btHullTriangle*>& tris)
+{
+ int i;
+ assert(tris[t->id]==t);
+ for(i=0;i<3;i++)
+ {
+ int i1=(i+1)%3;
+ int i2=(i+2)%3;
+ int a = (*t)[i1];
+ int b = (*t)[i2];
+ assert(a!=b);
+ assert( tris[t->n[i]]->neib(b,a) == t->id);
+ }
+}
+void extrude(btHullTriangle *t0,int v, Array<btHullTriangle*>& tris)
+{
+ int3 t= *t0;
+ int n = tris.count;
+ btHullTriangle* ta = new btHullTriangle(v,t[1],t[2], &tris);
+ ta->n = int3(t0->n[0],n+1,n+2);
+ tris[t0->n[0]]->neib(t[1],t[2]) = n+0;
+ btHullTriangle* tb = new btHullTriangle(v,t[2],t[0], &tris);
+ tb->n = int3(t0->n[1],n+2,n+0);
+ tris[t0->n[1]]->neib(t[2],t[0]) = n+1;
+ btHullTriangle* tc = new btHullTriangle(v,t[0],t[1], &tris);
+ tc->n = int3(t0->n[2],n+0,n+1);
+ tris[t0->n[2]]->neib(t[0],t[1]) = n+2;
+ checkit(ta, tris);
+ checkit(tb, tris);
+ checkit(tc, tris);
+ if(hasvert(*tris[ta->n[0]],v)) removeb2b(ta,tris[ta->n[0]], tris);
+ if(hasvert(*tris[tb->n[0]],v)) removeb2b(tb,tris[tb->n[0]], tris);
+ if(hasvert(*tris[tc->n[0]],v)) removeb2b(tc,tris[tc->n[0]], tris);
+ delete t0;
+
+}
+
+btHullTriangle *extrudable(float epsilon, Array<btHullTriangle*>& tris)
+{
+ int i;
+ btHullTriangle *t=NULL;
+ for(i=0;i<tris.count;i++)
+ {
+ if(!t || (tris[i] && t->rise<tris[i]->rise))
+ {
+ t = tris[i];
+ }
+ }
+ return (t->rise >epsilon)?t:NULL ;
+}
+
+class int4
+{
+public:
+ int x,y,z,w;
+ int4(){};
+ int4(int _x,int _y, int _z,int _w){x=_x;y=_y;z=_z;w=_w;}
+ const int& operator[](int i) const {return (&x)[i];}
+ int& operator[](int i) {return (&x)[i];}
+};
+
+
+
+int4 FindSimplex(float3 *verts,int verts_count,Array<int> &allow)
+{
+ float3 basis[3];
+ basis[0] = float3( 0.01f, 0.02f, 1.0f );
+ int p0 = maxdirsterid(verts,verts_count, basis[0],allow);
+ int p1 = maxdirsterid(verts,verts_count,-basis[0],allow);
+ basis[0] = verts[p0]-verts[p1];
+ if(p0==p1 || basis[0]==float3(0,0,0))
+ return int4(-1,-1,-1,-1);
+ basis[1] = cross(float3( 1, 0.02f, 0),basis[0]);
+ basis[2] = cross(float3(-0.02f, 1, 0),basis[0]);
+ basis[1] = normalize( (magnitude(basis[1])>magnitude(basis[2])) ? basis[1]:basis[2]);
+ int p2 = maxdirsterid(verts,verts_count,basis[1],allow);
+ if(p2 == p0 || p2 == p1)
+ {
+ p2 = maxdirsterid(verts,verts_count,-basis[1],allow);
+ }
+ if(p2 == p0 || p2 == p1)
+ return int4(-1,-1,-1,-1);
+ basis[1] = verts[p2] - verts[p0];
+ basis[2] = normalize(cross(basis[1],basis[0]));
+ int p3 = maxdirsterid(verts,verts_count,basis[2],allow);
+ if(p3==p0||p3==p1||p3==p2) p3 = maxdirsterid(verts,verts_count,-basis[2],allow);
+ if(p3==p0||p3==p1||p3==p2)
+ return int4(-1,-1,-1,-1);
+ assert(!(p0==p1||p0==p2||p0==p3||p1==p2||p1==p3||p2==p3));
+ if(dot(verts[p3]-verts[p0],cross(verts[p1]-verts[p0],verts[p2]-verts[p0])) <0) {Swap(p2,p3);}
+ return int4(p0,p1,p2,p3);
+}
+
+int calchullgen(float3 *verts,int verts_count, int vlimit,Array<btHullTriangle*>& tris)
+{
+ if(verts_count <4) return 0;
+ if(vlimit==0) vlimit=1000000000;
+ int j;
+ float3 bmin(*verts),bmax(*verts);
+ Array<int> isextreme(verts_count);
+ Array<int> allow(verts_count);
+ for(j=0;j<verts_count;j++)
+ {
+ allow.Add(1);
+ isextreme.Add(0);
+ bmin = VectorMin(bmin,verts[j]);
+ bmax = VectorMax(bmax,verts[j]);
+ }
+ float epsilon = magnitude(bmax-bmin) * 0.001f;
+
+
+ int4 p = FindSimplex(verts,verts_count,allow);
+ if(p.x==-1) return 0; // simplex failed
+
+
+
+ float3 center = (verts[p[0]]+verts[p[1]]+verts[p[2]]+verts[p[3]]) /4.0f; // a valid interior point
+ btHullTriangle *t0 = new btHullTriangle(p[2],p[3],p[1], &tris); t0->n=int3(2,3,1);
+ btHullTriangle *t1 = new btHullTriangle(p[3],p[2],p[0], &tris); t1->n=int3(3,2,0);
+ btHullTriangle *t2 = new btHullTriangle(p[0],p[1],p[3], &tris); t2->n=int3(0,1,3);
+ btHullTriangle *t3 = new btHullTriangle(p[1],p[0],p[2], &tris); t3->n=int3(1,0,2);
+ isextreme[p[0]]=isextreme[p[1]]=isextreme[p[2]]=isextreme[p[3]]=1;
+ checkit(t0, tris);checkit(t1, tris);checkit(t2, tris);checkit(t3, tris);
+
+ for(j=0;j<tris.count;j++)
+ {
+ btHullTriangle *t=tris[j];
+ assert(t);
+ assert(t->vmax<0);
+ float3 n=TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]);
+ t->vmax = maxdirsterid(verts,verts_count,n,allow);
+ t->rise = dot(n,verts[t->vmax]-verts[(*t)[0]]);
+ }
+ btHullTriangle *te;
+ vlimit-=4;
+ while(vlimit >0 && (te=extrudable(epsilon, tris)))
+ {
+ int3 ti=*te;
+ int v=te->vmax;
+ assert(!isextreme[v]); // wtf we've already done this vertex
+ isextreme[v]=1;
+ //if(v==p0 || v==p1 || v==p2 || v==p3) continue; // done these already
+ j=tris.count;
+ while(j--) {
+ if(!tris[j]) continue;
+ int3 t=*tris[j];
+ if(above(verts,t,verts[v],0.01f*epsilon))
+ {
+ extrude(tris[j],v, tris);
+ }
+ }
+ // now check for those degenerate cases where we have a flipped triangle or a really skinny triangle
+ j=tris.count;
+ while(j--)
+ {
+ if(!tris[j]) continue;
+ if(!hasvert(*tris[j],v)) break;
+ int3 nt=*tris[j];
+ if(above(verts,nt,center,0.01f*epsilon) || magnitude(cross(verts[nt[1]]-verts[nt[0]],verts[nt[2]]-verts[nt[1]]))< epsilon*epsilon*0.1f )
+ {
+ btHullTriangle *nb = tris[tris[j]->n[0]];
+ assert(nb);assert(!hasvert(*nb,v));assert(nb->id<j);
+ extrude(nb,v, tris);
+ j=tris.count;
+ }
+ }
+ j=tris.count;
+ while(j--)
+ {
+ btHullTriangle *t=tris[j];
+ if(!t) continue;
+ if(t->vmax>=0) break;
+ float3 n=TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]);
+ t->vmax = maxdirsterid(verts,verts_count,n,allow);
+ if(isextreme[t->vmax])
+ {
+ t->vmax=-1; // already done that vertex - algorithm needs to be able to terminate.
+ }
+ else
+ {
+ t->rise = dot(n,verts[t->vmax]-verts[(*t)[0]]);
+ }
+ }
+ vlimit --;
+ }
+ return 1;
+}
+
+int calchull(float3 *verts,int verts_count, int *&tris_out, int &tris_count,int vlimit, Array<btHullTriangle*>& tris)
+{
+ int rc=calchullgen(verts,verts_count, vlimit, tris) ;
+ if(!rc) return 0;
+ Array<int> ts;
+ for(int i=0;i<tris.count;i++)if(tris[i])
+ {
+ for(int j=0;j<3;j++)ts.Add((*tris[i])[j]);
+ delete tris[i];
+ }
+ tris_count = ts.count/3;
+ tris_out = ts.element;
+ ts.element=NULL; ts.count=ts.array_size=0;
+ tris.count=0;
+ return 1;
+}
+
+int calchullpbev(float3 *verts,int verts_count,int vlimit, Array<Plane> &planes,float bevangle, Array<btHullTriangle*>& tris)
+{
+ int i,j;
+ planes.count=0;
+ int rc = calchullgen(verts,verts_count,vlimit, tris);
+ if(!rc) return 0;
+ for(i=0;i<tris.count;i++)if(tris[i])
+ {
+ Plane p;
+ btHullTriangle *t = tris[i];
+ p.normal = TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]);
+ p.dist = -dot(p.normal, verts[(*t)[0]]);
+ planes.Add(p);
+ for(j=0;j<3;j++)
+ {
+ if(t->n[j]<t->id) continue;
+ btHullTriangle *s = tris[t->n[j]];
+ REAL3 snormal = TriNormal(verts[(*s)[0]],verts[(*s)[1]],verts[(*s)[2]]);
+ if(dot(snormal,p.normal)>=cos(bevangle*DEG2RAD)) continue;
+ REAL3 n = normalize(snormal+p.normal);
+ planes.Add(Plane(n,-dot(n,verts[maxdir(verts,verts_count,n)])));
+ }
+ }
+
+ for(i=0;i<tris.count;i++)if(tris[i])
+ {
+ delete tris[i]; // delete tris[i];
+ }
+ tris.count=0;
+ return 1;
+}
+
+int overhull(Plane *planes,int planes_count,float3 *verts, int verts_count,int maxplanes,
+ float3 *&verts_out, int &verts_count_out, int *&faces_out, int &faces_count_out ,float inflate)
+{
+ int i,j;
+ if(verts_count <4) return 0;
+ maxplanes = Min(maxplanes,planes_count);
+ float3 bmin(verts[0]),bmax(verts[0]);
+ for(i=0;i<verts_count;i++)
+ {
+ bmin = VectorMin(bmin,verts[i]);
+ bmax = VectorMax(bmax,verts[i]);
+ }
+// float diameter = magnitude(bmax-bmin);
+// inflate *=diameter; // RELATIVE INFLATION
+ bmin -= float3(inflate,inflate,inflate);
+ bmax += float3(inflate,inflate,inflate);
+ for(i=0;i<planes_count;i++)
+ {
+ planes[i].dist -= inflate;
+ }
+ float3 emin = bmin; // VectorMin(bmin,float3(0,0,0));
+ float3 emax = bmax; // VectorMax(bmax,float3(0,0,0));
+ float epsilon = magnitude(emax-emin) * 0.025f;
+ planetestepsilon = magnitude(emax-emin) * PAPERWIDTH;
+ // todo: add bounding cube planes to force bevel. or try instead not adding the diameter expansion ??? must think.
+ // ConvexH *convex = ConvexHMakeCube(bmin - float3(diameter,diameter,diameter),bmax+float3(diameter,diameter,diameter));
+ ConvexH *c = ConvexHMakeCube(REAL3(bmin),REAL3(bmax));
+ int k;
+ while(maxplanes-- && (k=candidateplane(planes,planes_count,c,epsilon))>=0)
+ {
+ ConvexH *tmp = c;
+ c = ConvexHCrop(*tmp,planes[k]);
+ if(c==NULL) {c=tmp; break;} // might want to debug this case better!!!
+ if(!AssertIntact(*c)) {c=tmp; break;} // might want to debug this case better too!!!
+ delete tmp;
+ }
+
+ assert(AssertIntact(*c));
+ //return c;
+ faces_out = (int*)malloc(sizeof(int)*(1+c->facets.count+c->edges.count)); // new int[1+c->facets.count+c->edges.count];
+ faces_count_out=0;
+ i=0;
+ faces_out[faces_count_out++]=-1;
+ k=0;
+ while(i<c->edges.count)
+ {
+ j=1;
+ while(j+i<c->edges.count && c->edges[i].p==c->edges[i+j].p) { j++; }
+ faces_out[faces_count_out++]=j;
+ while(j--)
+ {
+ faces_out[faces_count_out++] = c->edges[i].v;
+ i++;
+ }
+ k++;
+ }
+ faces_out[0]=k; // number of faces.
+ assert(k==c->facets.count);
+ assert(faces_count_out == 1+c->facets.count+c->edges.count);
+ verts_out = c->vertices.element; // new float3[c->vertices.count];
+ verts_count_out = c->vertices.count;
+ for(i=0;i<c->vertices.count;i++)
+ {
+ verts_out[i] = float3(c->vertices[i]);
+ }
+ c->vertices.count=c->vertices.array_size=0; c->vertices.element=NULL;
+ delete c;
+ return 1;
+}
+
+int overhullv(float3 *verts, int verts_count,int maxplanes,
+ float3 *&verts_out, int &verts_count_out, int *&faces_out, int &faces_count_out ,float inflate,float bevangle,int vlimit, Array<btHullTriangle*>& tris)
+{
+ if(!verts_count) return 0;
+ extern int calchullpbev(float3 *verts,int verts_count,int vlimit, Array<Plane> &planes,float bevangle, Array<btHullTriangle*>& tris) ;
+ Array<Plane> planes;
+ int rc=calchullpbev(verts,verts_count,vlimit,planes,bevangle, tris) ;
+ if(!rc) return 0;
+ return overhull(planes.element,planes.count,verts,verts_count,maxplanes,verts_out,verts_count_out,faces_out,faces_count_out,inflate);
+}
+
+
+bool ComputeHull(unsigned int vcount,const float *vertices,PHullResult &result,unsigned int vlimit,float inflate, Array<btHullTriangle*>& arrtris)
+{
+
+ int index_count;
+ int *faces;
+ float3 *verts_out;
+ int verts_count_out;
+
+ if(inflate==0.0f)
+ {
+ int *tris_out;
+ int tris_count;
+ int ret = calchull( (float3 *) vertices, (int) vcount, tris_out, tris_count, vlimit, arrtris );
+ if(!ret) return false;
+ result.mIndexCount = (unsigned int) (tris_count*3);
+ result.mFaceCount = (unsigned int) tris_count;
+ result.mVertices = (float*) vertices;
+ result.mVcount = (unsigned int) vcount;
+ result.mIndices = (unsigned int *) tris_out;
+ return true;
+ }
+
+ int ret = overhullv((float3*)vertices,vcount,35,verts_out,verts_count_out,faces,index_count,inflate,120.0f,vlimit, arrtris);
+ if(!ret) return false;
+
+ Array<int3> tris;
+ int n=faces[0];
+ int k=1;
+ for(int i=0;i<n;i++)
+ {
+ int pn = faces[k++];
+ for(int j=2;j<pn;j++) tris.Add(int3(faces[k],faces[k+j-1],faces[k+j]));
+ k+=pn;
+ }
+ assert(tris.count == index_count-1-(n*3));
+
+ result.mIndexCount = (unsigned int) (tris.count*3);
+ result.mFaceCount = (unsigned int) tris.count;
+ result.mVertices = (float*) verts_out;
+ result.mVcount = (unsigned int) verts_count_out;
+ result.mIndices = (unsigned int *) tris.element;
+ tris.element=NULL; tris.count = tris.array_size=0;
+
+ return true;
+}
+
+
+void ReleaseHull(PHullResult &result)
+{
+ if ( result.mIndices )
+ {
+ free(result.mIndices);
+ }
+
+ result.mVcount = 0;
+ result.mIndexCount = 0;
+ result.mIndices = 0;
+ result.mVertices = 0;
+ result.mIndices = 0;
+}
+
+
+//*********************************************************************
+//*********************************************************************
+//******** HullLib header
+//*********************************************************************
+//*********************************************************************
+
+//*********************************************************************
+//*********************************************************************
+//******** HullLib implementation
+//*********************************************************************
+//*********************************************************************
+
+HullError HullLibrary::CreateConvexHull(const HullDesc &desc, // describes the input request
+ HullResult &result) // contains the resulst
+{
+ HullError ret = QE_FAIL;
+
+
+ PHullResult hr;
+
+ unsigned int vcount = desc.mVcount;
+ if ( vcount < 8 ) vcount = 8;
+
+ float *vsource = (float *) malloc( sizeof(float)*vcount*3);
+
+
+ float scale[3];
+
+ unsigned int ovcount;
+
+ bool ok = CleanupVertices(desc.mVcount,desc.mVertices, desc.mVertexStride, ovcount, vsource, desc.mNormalEpsilon, scale ); // normalize point cloud, remove duplicates!
+
+ if ( ok )
+ {
+
+
+ if ( 1 ) // scale vertices back to their original size.
+ {
+ for (unsigned int i=0; i<ovcount; i++)
+ {
+ float *v = &vsource[i*3];
+ v[0]*=scale[0];
+ v[1]*=scale[1];
+ v[2]*=scale[2];
+ }
+ }
+
+ float skinwidth = 0;
+ if ( desc.HasHullFlag(QF_SKIN_WIDTH) )
+ skinwidth = desc.mSkinWidth;
+
+ Array<btHullTriangle*> tris;
+ ok = ComputeHull(ovcount,vsource,hr,desc.mMaxVertices,skinwidth, tris);
+
+ if ( ok )
+ {
+
+ // re-index triangle mesh so it refers to only used vertices, rebuild a new vertex table.
+ float *vscratch = (float *) malloc( sizeof(float)*hr.mVcount*3);
+ BringOutYourDead(hr.mVertices,hr.mVcount, vscratch, ovcount, hr.mIndices, hr.mIndexCount );
+
+ ret = QE_OK;
+
+ if ( desc.HasHullFlag(QF_TRIANGLES) ) // if he wants the results as triangle!
+ {
+ result.mPolygons = false;
+ result.mNumOutputVertices = ovcount;
+ result.mOutputVertices = (float *)malloc( sizeof(float)*ovcount*3);
+ result.mNumFaces = hr.mFaceCount;
+ result.mNumIndices = hr.mIndexCount;
+
+ result.mIndices = (unsigned int *) malloc( sizeof(unsigned int)*hr.mIndexCount);
+
+ memcpy(result.mOutputVertices, vscratch, sizeof(float)*3*ovcount );
+
+ if ( desc.HasHullFlag(QF_REVERSE_ORDER) )
+ {
+
+ const unsigned int *source = hr.mIndices;
+ unsigned int *dest = result.mIndices;
+
+ for (unsigned int i=0; i<hr.mFaceCount; i++)
+ {
+ dest[0] = source[2];
+ dest[1] = source[1];
+ dest[2] = source[0];
+ dest+=3;
+ source+=3;
+ }
+
+ }
+ else
+ {
+ memcpy(result.mIndices, hr.mIndices, sizeof(unsigned int)*hr.mIndexCount);
+ }
+ }
+ else
+ {
+ result.mPolygons = true;
+ result.mNumOutputVertices = ovcount;
+ result.mOutputVertices = (float *)malloc( sizeof(float)*ovcount*3);
+ result.mNumFaces = hr.mFaceCount;
+ result.mNumIndices = hr.mIndexCount+hr.mFaceCount;
+ result.mIndices = (unsigned int *) malloc( sizeof(unsigned int)*result.mNumIndices);
+ memcpy(result.mOutputVertices, vscratch, sizeof(float)*3*ovcount );
+
+ if ( 1 )
+ {
+ const unsigned int *source = hr.mIndices;
+ unsigned int *dest = result.mIndices;
+ for (unsigned int i=0; i<hr.mFaceCount; i++)
+ {
+ dest[0] = 3;
+ if ( desc.HasHullFlag(QF_REVERSE_ORDER) )
+ {
+ dest[1] = source[2];
+ dest[2] = source[1];
+ dest[3] = source[0];
+ }
+ else
+ {
+ dest[1] = source[0];
+ dest[2] = source[1];
+ dest[3] = source[2];
+ }
+
+ dest+=4;
+ source+=3;
+ }
+ }
+ }
+ ReleaseHull(hr);
+ if ( vscratch )
+ {
+ free(vscratch);
+ }
+ }
+ }
+
+ if ( vsource )
+ {
+ free(vsource);
+ }
+
+
+ return ret;
+}
+
+
+
+HullError HullLibrary::ReleaseResult(HullResult &result) // release memory allocated for this result, we are done with it.
+{
+ if ( result.mOutputVertices )
+ {
+ free(result.mOutputVertices);
+ result.mOutputVertices = 0;
+ }
+ if ( result.mIndices )
+ {
+ free(result.mIndices);
+ result.mIndices = 0;
+ }
+ return QE_OK;
+}
+
+
+static void addPoint(unsigned int &vcount,float *p,float x,float y,float z)
+{
+ float *dest = &p[vcount*3];
+ dest[0] = x;
+ dest[1] = y;
+ dest[2] = z;
+ vcount++;
+}
+
+
+float GetDist(float px,float py,float pz,const float *p2)
+{
+
+ float dx = px - p2[0];
+ float dy = py - p2[1];
+ float dz = pz - p2[2];
+
+ return dx*dx+dy*dy+dz*dz;
+}
+
+
+
+bool HullLibrary::CleanupVertices(unsigned int svcount,
+ const float *svertices,
+ unsigned int stride,
+ unsigned int &vcount, // output number of vertices
+ float *vertices, // location to store the results.
+ float normalepsilon,
+ float *scale)
+{
+ if ( svcount == 0 ) return false;
+
+
+#define EPSILON 0.000001f /* close enough to consider two floating point numbers to be 'the same'. */
+
+ vcount = 0;
+
+ float recip[3];
+
+ if ( scale )
+ {
+ scale[0] = 1;
+ scale[1] = 1;
+ scale[2] = 1;
+ }
+
+ float bmin[3] = { FLT_MAX, FLT_MAX, FLT_MAX };
+ float bmax[3] = { -FLT_MAX, -FLT_MAX, -FLT_MAX };
+
+ const char *vtx = (const char *) svertices;
+
+ if ( 1 )
+ {
+ for (unsigned int i=0; i<svcount; i++)
+ {
+ const float *p = (const float *) vtx;
+
+ vtx+=stride;
+
+ for (int j=0; j<3; j++)
+ {
+ if ( p[j] < bmin[j] ) bmin[j] = p[j];
+ if ( p[j] > bmax[j] ) bmax[j] = p[j];
+ }
+ }
+ }
+
+ float dx = bmax[0] - bmin[0];
+ float dy = bmax[1] - bmin[1];
+ float dz = bmax[2] - bmin[2];
+
+ float center[3];
+
+ center[0] = dx*0.5f + bmin[0];
+ center[1] = dy*0.5f + bmin[1];
+ center[2] = dz*0.5f + bmin[2];
+
+ if ( dx < EPSILON || dy < EPSILON || dz < EPSILON || svcount < 3 )
+ {
+
+ float len = FLT_MAX;
+
+ if ( dx > EPSILON && dx < len ) len = dx;
+ if ( dy > EPSILON && dy < len ) len = dy;
+ if ( dz > EPSILON && dz < len ) len = dz;
+
+ if ( len == FLT_MAX )
+ {
+ dx = dy = dz = 0.01f; // one centimeter
+ }
+ else
+ {
+ if ( dx < EPSILON ) dx = len * 0.05f; // 1/5th the shortest non-zero edge.
+ if ( dy < EPSILON ) dy = len * 0.05f;
+ if ( dz < EPSILON ) dz = len * 0.05f;
+ }
+
+ float x1 = center[0] - dx;
+ float x2 = center[0] + dx;
+
+ float y1 = center[1] - dy;
+ float y2 = center[1] + dy;
+
+ float z1 = center[2] - dz;
+ float z2 = center[2] + dz;
+
+ addPoint(vcount,vertices,x1,y1,z1);
+ addPoint(vcount,vertices,x2,y1,z1);
+ addPoint(vcount,vertices,x2,y2,z1);
+ addPoint(vcount,vertices,x1,y2,z1);
+ addPoint(vcount,vertices,x1,y1,z2);
+ addPoint(vcount,vertices,x2,y1,z2);
+ addPoint(vcount,vertices,x2,y2,z2);
+ addPoint(vcount,vertices,x1,y2,z2);
+
+ return true; // return cube
+
+
+ }
+ else
+ {
+ if ( scale )
+ {
+ scale[0] = dx;
+ scale[1] = dy;
+ scale[2] = dz;
+
+ recip[0] = 1 / dx;
+ recip[1] = 1 / dy;
+ recip[2] = 1 / dz;
+
+ center[0]*=recip[0];
+ center[1]*=recip[1];
+ center[2]*=recip[2];
+
+ }
+
+ }
+
+
+
+ vtx = (const char *) svertices;
+
+ for (unsigned int i=0; i<svcount; i++)
+ {
+
+ const float *p = (const float *)vtx;
+ vtx+=stride;
+
+ float px = p[0];
+ float py = p[1];
+ float pz = p[2];
+
+ if ( scale )
+ {
+ px = px*recip[0]; // normalize
+ py = py*recip[1]; // normalize
+ pz = pz*recip[2]; // normalize
+ }
+
+ if ( 1 )
+ {
+ unsigned int j;
+
+ for (j=0; j<vcount; j++)
+ {
+ float *v = &vertices[j*3];
+
+ float x = v[0];
+ float y = v[1];
+ float z = v[2];
+
+ float dx = fabsf(x - px );
+ float dy = fabsf(y - py );
+ float dz = fabsf(z - pz );
+
+ if ( dx < normalepsilon && dy < normalepsilon && dz < normalepsilon )
+ {
+ // ok, it is close enough to the old one
+ // now let us see if it is further from the center of the point cloud than the one we already recorded.
+ // in which case we keep this one instead.
+
+ float dist1 = GetDist(px,py,pz,center);
+ float dist2 = GetDist(v[0],v[1],v[2],center);
+
+ if ( dist1 > dist2 )
+ {
+ v[0] = px;
+ v[1] = py;
+ v[2] = pz;
+ }
+
+ break;
+ }
+ }
+
+ if ( j == vcount )
+ {
+ float *dest = &vertices[vcount*3];
+ dest[0] = px;
+ dest[1] = py;
+ dest[2] = pz;
+ vcount++;
+ }
+ }
+ }
+
+ // ok..now make sure we didn't prune so many vertices it is now invalid.
+ if ( 1 )
+ {
+ float bmin[3] = { FLT_MAX, FLT_MAX, FLT_MAX };
+ float bmax[3] = { -FLT_MAX, -FLT_MAX, -FLT_MAX };
+
+ for (unsigned int i=0; i<vcount; i++)
+ {
+ const float *p = &vertices[i*3];
+ for (int j=0; j<3; j++)
+ {
+ if ( p[j] < bmin[j] ) bmin[j] = p[j];
+ if ( p[j] > bmax[j] ) bmax[j] = p[j];
+ }
+ }
+
+ float dx = bmax[0] - bmin[0];
+ float dy = bmax[1] - bmin[1];
+ float dz = bmax[2] - bmin[2];
+
+ if ( dx < EPSILON || dy < EPSILON || dz < EPSILON || vcount < 3)
+ {
+ float cx = dx*0.5f + bmin[0];
+ float cy = dy*0.5f + bmin[1];
+ float cz = dz*0.5f + bmin[2];
+
+ float len = FLT_MAX;
+
+ if ( dx >= EPSILON && dx < len ) len = dx;
+ if ( dy >= EPSILON && dy < len ) len = dy;
+ if ( dz >= EPSILON && dz < len ) len = dz;
+
+ if ( len == FLT_MAX )
+ {
+ dx = dy = dz = 0.01f; // one centimeter
+ }
+ else
+ {
+ if ( dx < EPSILON ) dx = len * 0.05f; // 1/5th the shortest non-zero edge.
+ if ( dy < EPSILON ) dy = len * 0.05f;
+ if ( dz < EPSILON ) dz = len * 0.05f;
+ }
+
+ float x1 = cx - dx;
+ float x2 = cx + dx;
+
+ float y1 = cy - dy;
+ float y2 = cy + dy;
+
+ float z1 = cz - dz;
+ float z2 = cz + dz;
+
+ vcount = 0; // add box
+
+ addPoint(vcount,vertices,x1,y1,z1);
+ addPoint(vcount,vertices,x2,y1,z1);
+ addPoint(vcount,vertices,x2,y2,z1);
+ addPoint(vcount,vertices,x1,y2,z1);
+ addPoint(vcount,vertices,x1,y1,z2);
+ addPoint(vcount,vertices,x2,y1,z2);
+ addPoint(vcount,vertices,x2,y2,z2);
+ addPoint(vcount,vertices,x1,y2,z2);
+
+ return true;
+ }
+ }
+
+ return true;
+}
+
+void HullLibrary::BringOutYourDead(const float *verts,unsigned int vcount, float *overts,unsigned int &ocount,unsigned int *indices,unsigned indexcount)
+{
+ unsigned int *used = (unsigned int *)malloc(sizeof(unsigned int)*vcount);
+ memset(used,0,sizeof(unsigned int)*vcount);
+
+ ocount = 0;
+
+ for (unsigned int i=0; i<indexcount; i++)
+ {
+ unsigned int v = indices[i]; // original array index
+
+ assert( v >= 0 && v < vcount );
+
+ if ( used[v] ) // if already remapped
+ {
+ indices[i] = used[v]-1; // index to new array
+ }
+ else
+ {
+
+ indices[i] = ocount; // new index mapping
+
+ overts[ocount*3+0] = verts[v*3+0]; // copy old vert to new vert array
+ overts[ocount*3+1] = verts[v*3+1];
+ overts[ocount*3+2] = verts[v*3+2];
+
+ ocount++; // increment output vert count
+
+ assert( ocount >=0 && ocount <= vcount );
+
+ used[v] = ocount; // assign new index remapping
+ }
+ }
+
+ free(used);
+}
+
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/cd_hull.h b/tests/bullet/Extras/ConvexDecomposition/cd_hull.h
new file mode 100644
index 00000000..420e241b
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/cd_hull.h
@@ -0,0 +1,153 @@
+#ifndef CD_HULL_H
+
+#define CD_HULL_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+namespace ConvexDecomposition
+{
+
+class HullResult
+{
+public:
+ HullResult(void)
+ {
+ mPolygons = true;
+ mNumOutputVertices = 0;
+ mOutputVertices = 0;
+ mNumFaces = 0;
+ mNumIndices = 0;
+ mIndices = 0;
+ }
+ bool mPolygons; // true if indices represents polygons, false indices are triangles
+ unsigned int mNumOutputVertices; // number of vertices in the output hull
+ float *mOutputVertices; // array of vertices, 3 floats each x,y,z
+ unsigned int mNumFaces; // the number of faces produced
+ unsigned int mNumIndices; // the total number of indices
+ unsigned int *mIndices; // pointer to indices.
+
+// If triangles, then indices are array indexes into the vertex list.
+// If polygons, indices are in the form (number of points in face) (p1, p2, p3, ..) etc..
+};
+
+enum HullFlag
+{
+ QF_TRIANGLES = (1<<0), // report results as triangles, not polygons.
+ QF_REVERSE_ORDER = (1<<1), // reverse order of the triangle indices.
+ QF_SKIN_WIDTH = (1<<2), // extrude hull based on this skin width
+ QF_DEFAULT = 0
+};
+
+
+class HullDesc
+{
+public:
+ HullDesc(void)
+ {
+ mFlags = QF_DEFAULT;
+ mVcount = 0;
+ mVertices = 0;
+ mVertexStride = sizeof(float)*3;
+ mNormalEpsilon = 0.001f;
+ mMaxVertices = 4096; // maximum number of points to be considered for a convex hull.
+ mMaxFaces = 4096;
+ mSkinWidth = 0.01f; // default is one centimeter
+ };
+
+ HullDesc(HullFlag flag,
+ unsigned int vcount,
+ const float *vertices,
+ unsigned int stride)
+ {
+ mFlags = flag;
+ mVcount = vcount;
+ mVertices = vertices;
+ mVertexStride = stride;
+ mNormalEpsilon = 0.001f;
+ mMaxVertices = 4096;
+ mSkinWidth = 0.01f; // default is one centimeter
+ }
+
+ bool HasHullFlag(HullFlag flag) const
+ {
+ if ( mFlags & flag ) return true;
+ return false;
+ }
+
+ void SetHullFlag(HullFlag flag)
+ {
+ mFlags|=flag;
+ }
+
+ void ClearHullFlag(HullFlag flag)
+ {
+ mFlags&=~flag;
+ }
+
+ unsigned int mFlags; // flags to use when generating the convex hull.
+ unsigned int mVcount; // number of vertices in the input point cloud
+ const float *mVertices; // the array of vertices.
+ unsigned int mVertexStride; // the stride of each vertex, in bytes.
+ float mNormalEpsilon; // the epsilon for removing duplicates. This is a normalized value, if normalized bit is on.
+ float mSkinWidth;
+ unsigned int mMaxVertices; // maximum number of vertices to be considered for the hull!
+ unsigned int mMaxFaces;
+};
+
+enum HullError
+{
+ QE_OK, // success!
+ QE_FAIL // failed.
+};
+
+class HullLibrary
+{
+public:
+
+ HullError CreateConvexHull(const HullDesc &desc, // describes the input request
+ HullResult &result); // contains the resulst
+
+ HullError ReleaseResult(HullResult &result); // release memory allocated for this result, we are done with it.
+
+private:
+
+ void BringOutYourDead(const float *verts,unsigned int vcount, float *overts,unsigned int &ocount,unsigned int *indices,unsigned indexcount);
+
+ bool CleanupVertices(unsigned int svcount,
+ const float *svertices,
+ unsigned int stride,
+ unsigned int &vcount, // output number of vertices
+ float *vertices, // location to store the results.
+ float normalepsilon,
+ float *scale);
+};
+
+}
+
+#endif
+
diff --git a/tests/bullet/Extras/ConvexDecomposition/cd_vector.h b/tests/bullet/Extras/ConvexDecomposition/cd_vector.h
new file mode 100644
index 00000000..bd1eff25
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/cd_vector.h
@@ -0,0 +1,1185 @@
+#ifndef CD_VECTOR_H
+
+#define CD_VECTOR_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+#pragma warning(disable:4786)
+
+#include <math.h>
+#include <float.h>
+#include <vector>
+
+namespace ConvexDecomposition
+{
+
+
+const float DEG_TO_RAD = ((2.0f * 3.14152654f) / 360.0f);
+const float RAD_TO_DEG = (360.0f / (2.0f * 3.141592654f));
+
+class Vector3d
+{
+public:
+ Vector3d(void) { }; // null constructor, does not inialize point.
+
+ Vector3d(const Vector3d &a) // constructor copies existing vector.
+ {
+ x = a.x;
+ y = a.y;
+ z = a.z;
+ };
+
+ Vector3d(float a,float b,float c) // construct with initial point.
+ {
+ x = a;
+ y = b;
+ z = c;
+ };
+
+ Vector3d(const float *t)
+ {
+ x = t[0];
+ y = t[1];
+ z = t[2];
+ };
+
+ Vector3d(const int *t)
+ {
+ x = t[0];
+ y = t[1];
+ z = t[2];
+ };
+
+ bool operator==(const Vector3d &a) const
+ {
+ return( a.x == x && a.y == y && a.z == z );
+ };
+
+ bool operator!=(const Vector3d &a) const
+ {
+ return( a.x != x || a.y != y || a.z != z );
+ };
+
+// Operators
+ Vector3d& operator = (const Vector3d& A) // ASSIGNMENT (=)
+ { x=A.x; y=A.y; z=A.z;
+ return(*this); };
+
+ Vector3d operator + (const Vector3d& A) const // ADDITION (+)
+ { Vector3d Sum(x+A.x, y+A.y, z+A.z);
+ return(Sum); };
+
+ Vector3d operator - (const Vector3d& A) const // SUBTRACTION (-)
+ { Vector3d Diff(x-A.x, y-A.y, z-A.z);
+ return(Diff); };
+
+ Vector3d operator * (const float s) const // MULTIPLY BY SCALAR (*)
+ { Vector3d Scaled(x*s, y*s, z*s);
+ return(Scaled); };
+
+
+ Vector3d operator + (const float s) const // ADD CONSTANT TO ALL 3 COMPONENTS (*)
+ { Vector3d Scaled(x+s, y+s, z+s);
+ return(Scaled); };
+
+
+
+
+ Vector3d operator / (const float s) const // DIVIDE BY SCALAR (/)
+ {
+ float r = 1.0f / s;
+ Vector3d Scaled(x*r, y*r, z*r);
+ return(Scaled);
+ };
+
+ void operator /= (float A) // ACCUMULATED VECTOR ADDITION (/=)
+ { x/=A; y/=A; z/=A; };
+
+ void operator += (const Vector3d A) // ACCUMULATED VECTOR ADDITION (+=)
+ { x+=A.x; y+=A.y; z+=A.z; };
+ void operator -= (const Vector3d A) // ACCUMULATED VECTOR SUBTRACTION (+=)
+ { x-=A.x; y-=A.y; z-=A.z; };
+ void operator *= (const float s) // ACCUMULATED SCALAR MULTIPLICATION (*=) (bpc 4/24/2000)
+ {x*=s; y*=s; z*=s;}
+
+ void operator += (const float A) // ACCUMULATED VECTOR ADDITION (+=)
+ { x+=A; y+=A; z+=A; };
+
+
+ Vector3d operator - (void) const // NEGATION (-)
+ { Vector3d Negated(-x, -y, -z);
+ return(Negated); };
+
+ float operator [] (const int i) const // ALLOWS VECTOR ACCESS AS AN ARRAY.
+ { return( (i==0)?x:((i==1)?y:z) ); };
+ float & operator [] (const int i)
+ { return( (i==0)?x:((i==1)?y:z) ); };
+//
+
+ // accessor methods.
+ float GetX(void) const { return x; };
+ float GetY(void) const { return y; };
+ float GetZ(void) const { return z; };
+
+ float X(void) const { return x; };
+ float Y(void) const { return y; };
+ float Z(void) const { return z; };
+
+ void SetX(float t) { x = t; };
+ void SetY(float t) { y = t; };
+ void SetZ(float t) { z = t; };
+
+ bool IsSame(const Vector3d &v,float epsilon) const
+ {
+ float dx = fabsf( x - v.x );
+ if ( dx > epsilon ) return false;
+ float dy = fabsf( y - v.y );
+ if ( dy > epsilon ) return false;
+ float dz = fabsf( z - v.z );
+ if ( dz > epsilon ) return false;
+ return true;
+ }
+
+
+ float ComputeNormal(const Vector3d &A,
+ const Vector3d &B,
+ const Vector3d &C)
+ {
+ float vx,vy,vz,wx,wy,wz,vw_x,vw_y,vw_z,mag;
+
+ vx = (B.x - C.x);
+ vy = (B.y - C.y);
+ vz = (B.z - C.z);
+
+ wx = (A.x - B.x);
+ wy = (A.y - B.y);
+ wz = (A.z - B.z);
+
+ vw_x = vy * wz - vz * wy;
+ vw_y = vz * wx - vx * wz;
+ vw_z = vx * wy - vy * wx;
+
+ mag = sqrtf((vw_x * vw_x) + (vw_y * vw_y) + (vw_z * vw_z));
+
+ if ( mag < 0.000001f )
+ {
+ mag = 0;
+ }
+ else
+ {
+ mag = 1.0f/mag;
+ }
+
+ x = vw_x * mag;
+ y = vw_y * mag;
+ z = vw_z * mag;
+
+ return mag;
+ }
+
+
+ void ScaleSumScale(float c0,float c1,const Vector3d &pos)
+ {
+ x = (x*c0) + (pos.x*c1);
+ y = (y*c0) + (pos.y*c1);
+ z = (z*c0) + (pos.z*c1);
+ }
+
+ void SwapYZ(void)
+ {
+ float t = y;
+ y = z;
+ z = t;
+ };
+
+ void Get(float *v) const
+ {
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+ };
+
+ void Set(const int *p)
+ {
+ x = (float) p[0];
+ y = (float) p[1];
+ z = (float) p[2];
+ }
+
+ void Set(const float *p)
+ {
+ x = (float) p[0];
+ y = (float) p[1];
+ z = (float) p[2];
+ }
+
+
+ void Set(float a,float b,float c)
+ {
+ x = a;
+ y = b;
+ z = c;
+ };
+
+ void Zero(void)
+ {
+ x = y = z = 0;
+ };
+
+ const float* Ptr() const { return &x; }
+ float* Ptr() { return &x; }
+
+
+// return -(*this).
+ Vector3d negative(void) const
+ {
+ Vector3d result;
+ result.x = -x;
+ result.y = -y;
+ result.z = -z;
+ return result;
+ }
+
+ float Magnitude(void) const
+ {
+ return float(sqrt(x * x + y * y + z * z));
+ };
+
+ float FastMagnitude(void) const
+ {
+ return float(sqrtf(x * x + y * y + z * z));
+ };
+
+ float FasterMagnitude(void) const
+ {
+ return float(sqrtf(x * x + y * y + z * z));
+ };
+
+ void Lerp(const Vector3d& from,const Vector3d& to,float slerp)
+ {
+ x = ((to.x - from.x) * slerp) + from.x;
+ y = ((to.y - from.y) * slerp) + from.y;
+ z = ((to.z - from.z) * slerp) + from.z;
+ };
+
+ // Highly specialized interpolate routine. Will compute the interpolated position
+ // shifted forward or backwards along the ray defined between (from) and (to).
+ // Reason for existance is so that when a bullet collides with a wall, for
+ // example, you can generate a graphic effect slightly *before* it hit the
+ // wall so that the effect doesn't sort into the wall itself.
+ void Interpolate(const Vector3d &from,const Vector3d &to,float offset)
+ {
+ x = to.x-from.x;
+ y = to.y-from.y;
+ z = to.z-from.z;
+ float d = sqrtf( x*x + y*y + z*z );
+ float recip = 1.0f / d;
+ x*=recip;
+ y*=recip;
+ z*=recip; // normalize vector
+ d+=offset; // shift along ray
+ x = x*d + from.x;
+ y = y*d + from.y;
+ z = z*d + from.z;
+ };
+
+ bool BinaryEqual(const Vector3d &p) const
+ {
+ const int *source = (const int *) &x;
+ const int *dest = (const int *) &p.x;
+
+ if ( source[0] == dest[0] &&
+ source[1] == dest[1] &&
+ source[2] == dest[2] ) return true;
+
+ return false;
+ };
+
+ /*bool BinaryEqual(const Vector3d<int> &p) const
+ {
+ if ( x == p.x && y == p.y && z == p.z ) return true;
+ return false;
+ }
+ */
+
+
+
+/** Computes the reflection vector between two vectors.*/
+ void Reflection(const Vector3d &a,const Vector3d &b)// compute reflection vector.
+ {
+ Vector3d c;
+ Vector3d d;
+
+ float dot = a.Dot(b) * 2.0f;
+
+ c = b * dot;
+
+ d = c - a;
+
+ x = -d.x;
+ y = -d.y;
+ z = -d.z;
+ };
+
+ void AngleAxis(float angle,const Vector3d& axis)
+ {
+ x = axis.x*angle;
+ y = axis.y*angle;
+ z = axis.z*angle;
+ };
+
+ float Length(void) const // length of vector.
+ {
+ return float(sqrt( x*x + y*y + z*z ));
+ };
+
+
+ float ComputePlane(const Vector3d &A,
+ const Vector3d &B,
+ const Vector3d &C)
+ {
+ float vx,vy,vz,wx,wy,wz,vw_x,vw_y,vw_z,mag;
+
+ vx = (B.x - C.x);
+ vy = (B.y - C.y);
+ vz = (B.z - C.z);
+
+ wx = (A.x - B.x);
+ wy = (A.y - B.y);
+ wz = (A.z - B.z);
+
+ vw_x = vy * wz - vz * wy;
+ vw_y = vz * wx - vx * wz;
+ vw_z = vx * wy - vy * wx;
+
+ mag = sqrtf((vw_x * vw_x) + (vw_y * vw_y) + (vw_z * vw_z));
+
+ if ( mag < 0.000001f )
+ {
+ mag = 0;
+ }
+ else
+ {
+ mag = 1.0f/mag;
+ }
+
+ x = vw_x * mag;
+ y = vw_y * mag;
+ z = vw_z * mag;
+
+
+ float D = 0.0f - ((x*A.x)+(y*A.y)+(z*A.z));
+
+ return D;
+ }
+
+
+ float FastLength(void) const // length of vector.
+ {
+ return float(sqrtf( x*x + y*y + z*z ));
+ };
+
+
+ float FasterLength(void) const // length of vector.
+ {
+ return float(sqrtf( x*x + y*y + z*z ));
+ };
+
+ float Length2(void) const // squared distance, prior to square root.
+ {
+ float l2 = x*x+y*y+z*z;
+ return l2;
+ };
+
+ float Distance(const Vector3d &a) const // distance between two points.
+ {
+ Vector3d d(a.x-x,a.y-y,a.z-z);
+ return d.Length();
+ }
+
+ float FastDistance(const Vector3d &a) const // distance between two points.
+ {
+ Vector3d d(a.x-x,a.y-y,a.z-z);
+ return d.FastLength();
+ }
+
+ float FasterDistance(const Vector3d &a) const // distance between two points.
+ {
+ Vector3d d(a.x-x,a.y-y,a.z-z);
+ return d.FasterLength();
+ }
+
+
+ float DistanceXY(const Vector3d &a) const
+ {
+ float dx = a.x - x;
+ float dy = a.y - y;
+ float dist = dx*dx + dy*dy;
+ return dist;
+ }
+
+ float Distance2(const Vector3d &a) const // squared distance.
+ {
+ float dx = a.x - x;
+ float dy = a.y - y;
+ float dz = a.z - z;
+ return dx*dx + dy*dy + dz*dz;
+ };
+
+ float Partial(const Vector3d &p) const
+ {
+ return (x*p.y) - (p.x*y);
+ }
+
+ float Area(const Vector3d &p1,const Vector3d &p2) const
+ {
+ float A = Partial(p1);
+ A+= p1.Partial(p2);
+ A+= p2.Partial(*this);
+ return A*0.5f;
+ }
+
+ inline float Normalize(void) // normalize to a unit vector, returns distance.
+ {
+ float d = sqrtf( static_cast< float >( x*x + y*y + z*z ) );
+ if ( d > 0 )
+ {
+ float r = 1.0f / d;
+ x *= r;
+ y *= r;
+ z *= r;
+ }
+ else
+ {
+ x = y = z = 1;
+ }
+ return d;
+ };
+
+ inline float FastNormalize(void) // normalize to a unit vector, returns distance.
+ {
+ float d = sqrt( static_cast< float >( x*x + y*y + z*z ) );
+ if ( d > 0 )
+ {
+ float r = 1.0f / d;
+ x *= r;
+ y *= r;
+ z *= r;
+ }
+ else
+ {
+ x = y = z = 1;
+ }
+ return d;
+ };
+
+ inline float FasterNormalize(void) // normalize to a unit vector, returns distance.
+ {
+ float d = sqrtf( static_cast< float >( x*x + y*y + z*z ) );
+ if ( d > 0 )
+ {
+ float r = 1.0f / d;
+ x *= r;
+ y *= r;
+ z *= r;
+ }
+ else
+ {
+ x = y = z = 1;
+ }
+ return d;
+ };
+
+
+
+
+ float Dot(const Vector3d &a) const // computes dot product.
+ {
+ return (x * a.x + y * a.y + z * a.z );
+ };
+
+
+ Vector3d Cross( const Vector3d& other ) const
+ {
+ Vector3d result( y*other.z - z*other.y, z*other.x - x*other.z, x*other.y - y*other.x );
+
+ return result;
+ }
+
+ void Cross(const Vector3d &a,const Vector3d &b) // cross two vectors result in this one.
+ {
+ x = a.y*b.z - a.z*b.y;
+ y = a.z*b.x - a.x*b.z;
+ z = a.x*b.y - a.y*b.x;
+ };
+
+ /******************************************/
+ // Check if next edge (b to c) turns inward
+ //
+ // Edge from a to b is already in face
+ // Edge from b to c is being considered for addition to face
+ /******************************************/
+ bool Concave(const Vector3d& a,const Vector3d& b)
+ {
+ float vx,vy,vz,wx,wy,wz,vw_x,vw_y,vw_z,mag,nx,ny,nz,mag_a,mag_b;
+
+ wx = b.x - a.x;
+ wy = b.y - a.y;
+ wz = b.z - a.z;
+
+ mag_a = (float) sqrtf((wx * wx) + (wy * wy) + (wz * wz));
+
+ vx = x - b.x;
+ vy = y - b.y;
+ vz = z - b.z;
+
+ mag_b = (float) sqrtf((vx * vx) + (vy * vy) + (vz * vz));
+
+ vw_x = (vy * wz) - (vz * wy);
+ vw_y = (vz * wx) - (vx * wz);
+ vw_z = (vx * wy) - (vy * wx);
+
+ mag = (float) sqrtf((vw_x * vw_x) + (vw_y * vw_y) + (vw_z * vw_z));
+
+ // Check magnitude of cross product, which is a sine function
+ // i.e., mag (a x b) = mag (a) * mag (b) * sin (theta);
+ // If sin (theta) small, then angle between edges is very close to
+ // 180, which we may want to call a concavity. Setting the
+ // CONCAVITY_TOLERANCE value greater than about 0.01 MAY cause
+ // face consolidation to get stuck on particular face. Most meshes
+ // convert properly with a value of 0.0
+
+ if (mag/(mag_a*mag_b) <= 0.0f ) return true;
+
+ mag = 1.0f / mag;
+
+ nx = vw_x * mag;
+ ny = vw_y * mag;
+ nz = vw_z * mag;
+
+ // Dot product of tri normal with cross product result will
+ // yield positive number if edges are convex (+1.0 if two tris
+ // are coplanar), negative number if edges are concave (-1.0 if
+ // two tris are coplanar.)
+
+ mag = ( x * nx) + ( y * ny) + ( z * nz);
+
+ if (mag > 0.0f ) return false;
+
+ return(true);
+ };
+
+ bool PointTestXY(const Vector3d &i,const Vector3d &j) const
+ {
+ if (((( i.y <= y ) && ( y < j.y )) ||
+ (( j.y <= y ) && ( y < i.y ))) &&
+ ( x < (j.x - i.x) * (y - i.y) / (j.y - i.y) + i.x)) return true;
+ return false;
+ }
+
+ // test to see if this point is inside the triangle specified by
+ // these three points on the X/Y plane.
+ bool PointInTriXY(const Vector3d &p1,
+ const Vector3d &p2,
+ const Vector3d &p3) const
+ {
+ float ax = p3.x - p2.x;
+ float ay = p3.y - p2.y;
+ float bx = p1.x - p3.x;
+ float by = p1.y - p3.y;
+ float cx = p2.x - p1.x;
+ float cy = p2.y - p1.y;
+ float apx = x - p1.x;
+ float apy = y - p1.y;
+ float bpx = x - p2.x;
+ float bpy = y - p2.y;
+ float cpx = x - p3.x;
+ float cpy = y - p3.y;
+
+ float aCROSSbp = ax*bpy - ay*bpx;
+ float cCROSSap = cx*apy - cy*apx;
+ float bCROSScp = bx*cpy - by*cpx;
+
+ return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f));
+ };
+
+ // test to see if this point is inside the triangle specified by
+ // these three points on the X/Y plane.
+ bool PointInTriYZ(const Vector3d &p1,
+ const Vector3d &p2,
+ const Vector3d &p3) const
+ {
+ float ay = p3.y - p2.y;
+ float az = p3.z - p2.z;
+ float by = p1.y - p3.y;
+ float bz = p1.z - p3.z;
+ float cy = p2.y - p1.y;
+ float cz = p2.z - p1.z;
+ float apy = y - p1.y;
+ float apz = z - p1.z;
+ float bpy = y - p2.y;
+ float bpz = z - p2.z;
+ float cpy = y - p3.y;
+ float cpz = z - p3.z;
+
+ float aCROSSbp = ay*bpz - az*bpy;
+ float cCROSSap = cy*apz - cz*apy;
+ float bCROSScp = by*cpz - bz*cpy;
+
+ return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f));
+ };
+
+
+ // test to see if this point is inside the triangle specified by
+ // these three points on the X/Y plane.
+ bool PointInTriXZ(const Vector3d &p1,
+ const Vector3d &p2,
+ const Vector3d &p3) const
+ {
+ float az = p3.z - p2.z;
+ float ax = p3.x - p2.x;
+ float bz = p1.z - p3.z;
+ float bx = p1.x - p3.x;
+ float cz = p2.z - p1.z;
+ float cx = p2.x - p1.x;
+ float apz = z - p1.z;
+ float apx = x - p1.x;
+ float bpz = z - p2.z;
+ float bpx = x - p2.x;
+ float cpz = z - p3.z;
+ float cpx = x - p3.x;
+
+ float aCROSSbp = az*bpx - ax*bpz;
+ float cCROSSap = cz*apx - cx*apz;
+ float bCROSScp = bz*cpx - bx*cpz;
+
+ return ((aCROSSbp >= 0.0f) && (bCROSScp >= 0.0f) && (cCROSSap >= 0.0f));
+ };
+
+ // Given a point and a line (defined by two points), compute the closest point
+ // in the line. (The line is treated as infinitely long.)
+ void NearestPointInLine(const Vector3d &point,
+ const Vector3d &line0,
+ const Vector3d &line1)
+ {
+ Vector3d &nearestPoint = *this;
+ Vector3d lineDelta = line1 - line0;
+
+ // Handle degenerate lines
+ if ( lineDelta == Vector3d(0, 0, 0) )
+ {
+ nearestPoint = line0;
+ }
+ else
+ {
+ float delta = (point-line0).Dot(lineDelta) / (lineDelta).Dot(lineDelta);
+ nearestPoint = line0 + lineDelta*delta;
+ }
+ }
+
+ // Given a point and a line segment (defined by two points), compute the closest point
+ // in the line. Cap the point at the endpoints of the line segment.
+ void NearestPointInLineSegment(const Vector3d &point,
+ const Vector3d &line0,
+ const Vector3d &line1)
+ {
+ Vector3d &nearestPoint = *this;
+ Vector3d lineDelta = line1 - line0;
+
+ // Handle degenerate lines
+ if ( lineDelta == Vector3d(0, 0, 0) )
+ {
+ nearestPoint = line0;
+ }
+ else
+ {
+ float delta = (point-line0).Dot(lineDelta) / (lineDelta).Dot(lineDelta);
+
+ // Clamp the point to conform to the segment's endpoints
+ if ( delta < 0 )
+ delta = 0;
+ else if ( delta > 1 )
+ delta = 1;
+
+ nearestPoint = line0 + lineDelta*delta;
+ }
+ }
+
+ // Given a point and a plane (defined by three points), compute the closest point
+ // in the plane. (The plane is unbounded.)
+ void NearestPointInPlane(const Vector3d &point,
+ const Vector3d &triangle0,
+ const Vector3d &triangle1,
+ const Vector3d &triangle2)
+ {
+ Vector3d &nearestPoint = *this;
+ Vector3d lineDelta0 = triangle1 - triangle0;
+ Vector3d lineDelta1 = triangle2 - triangle0;
+ Vector3d pointDelta = point - triangle0;
+ Vector3d normal;
+
+ // Get the normal of the polygon (doesn't have to be a unit vector)
+ normal.Cross(lineDelta0, lineDelta1);
+
+ float delta = normal.Dot(pointDelta) / normal.Dot(normal);
+ nearestPoint = point - normal*delta;
+ }
+
+ // Given a point and a plane (defined by a coplanar point and a normal), compute the closest point
+ // in the plane. (The plane is unbounded.)
+ void NearestPointInPlane(const Vector3d &point,
+ const Vector3d &planePoint,
+ const Vector3d &planeNormal)
+ {
+ Vector3d &nearestPoint = *this;
+ Vector3d pointDelta = point - planePoint;
+
+ float delta = planeNormal.Dot(pointDelta) / planeNormal.Dot(planeNormal);
+ nearestPoint = point - planeNormal*delta;
+ }
+
+ // Given a point and a triangle (defined by three points), compute the closest point
+ // in the triangle. Clamp the point so it's confined to the area of the triangle.
+ void NearestPointInTriangle(const Vector3d &point,
+ const Vector3d &triangle0,
+ const Vector3d &triangle1,
+ const Vector3d &triangle2)
+ {
+ static const Vector3d zeroVector(0, 0, 0);
+
+ Vector3d &nearestPoint = *this;
+
+ Vector3d lineDelta0 = triangle1 - triangle0;
+ Vector3d lineDelta1 = triangle2 - triangle0;
+
+ // Handle degenerate triangles
+ if ( (lineDelta0 == zeroVector) || (lineDelta1 == zeroVector) )
+ {
+ nearestPoint.NearestPointInLineSegment(point, triangle1, triangle2);
+ }
+ else if ( lineDelta0 == lineDelta1 )
+ {
+ nearestPoint.NearestPointInLineSegment(point, triangle0, triangle1);
+ }
+
+ else
+ {
+ Vector3d axis[3];
+ axis[0].NearestPointInLine(triangle0, triangle1, triangle2);
+ axis[1].NearestPointInLine(triangle1, triangle0, triangle2);
+ axis[2].NearestPointInLine(triangle2, triangle0, triangle1);
+
+ float axisDot[3];
+ axisDot[0] = (triangle0-axis[0]).Dot(point-axis[0]);
+ axisDot[1] = (triangle1-axis[1]).Dot(point-axis[1]);
+ axisDot[2] = (triangle2-axis[2]).Dot(point-axis[2]);
+
+ bool bForce = true;
+ float bestMagnitude2 = 0;
+ float closeMagnitude2;
+ Vector3d closePoint;
+
+ if ( axisDot[0] < 0 )
+ {
+ closePoint.NearestPointInLineSegment(point, triangle1, triangle2);
+ closeMagnitude2 = point.Distance2(closePoint);
+ if ( bForce || (bestMagnitude2 > closeMagnitude2) )
+ {
+ bForce = false;
+ bestMagnitude2 = closeMagnitude2;
+ nearestPoint = closePoint;
+ }
+ }
+ if ( axisDot[1] < 0 )
+ {
+ closePoint.NearestPointInLineSegment(point, triangle0, triangle2);
+ closeMagnitude2 = point.Distance2(closePoint);
+ if ( bForce || (bestMagnitude2 > closeMagnitude2) )
+ {
+ bForce = false;
+ bestMagnitude2 = closeMagnitude2;
+ nearestPoint = closePoint;
+ }
+ }
+ if ( axisDot[2] < 0 )
+ {
+ closePoint.NearestPointInLineSegment(point, triangle0, triangle1);
+ closeMagnitude2 = point.Distance2(closePoint);
+ if ( bForce || (bestMagnitude2 > closeMagnitude2) )
+ {
+ bForce = false;
+ bestMagnitude2 = closeMagnitude2;
+ nearestPoint = closePoint;
+ }
+ }
+
+ // If bForce is true at this point, it means the nearest point lies
+ // inside the triangle; use the nearest-point-on-a-plane equation
+ if ( bForce )
+ {
+ Vector3d normal;
+
+ // Get the normal of the polygon (doesn't have to be a unit vector)
+ normal.Cross(lineDelta0, lineDelta1);
+
+ Vector3d pointDelta = point - triangle0;
+ float delta = normal.Dot(pointDelta) / normal.Dot(normal);
+
+ nearestPoint = point - normal*delta;
+ }
+ }
+ }
+
+
+//private:
+
+ float x;
+ float y;
+ float z;
+};
+
+
+class Vector2d
+{
+public:
+ Vector2d(void) { }; // null constructor, does not inialize point.
+
+ Vector2d(const Vector2d &a) // constructor copies existing vector.
+ {
+ x = a.x;
+ y = a.y;
+ };
+
+ Vector2d(const float *t)
+ {
+ x = t[0];
+ y = t[1];
+ };
+
+
+ Vector2d(float a,float b) // construct with initial point.
+ {
+ x = a;
+ y = b;
+ };
+
+ const float* Ptr() const { return &x; }
+ float* Ptr() { return &x; }
+
+ Vector2d & operator+=(const Vector2d &a) // += operator.
+ {
+ x+=a.x;
+ y+=a.y;
+ return *this;
+ };
+
+ Vector2d & operator-=(const Vector2d &a)
+ {
+ x-=a.x;
+ y-=a.y;
+ return *this;
+ };
+
+ Vector2d & operator*=(const Vector2d &a)
+ {
+ x*=a.x;
+ y*=a.y;
+ return *this;
+ };
+
+ Vector2d & operator/=(const Vector2d &a)
+ {
+ x/=a.x;
+ y/=a.y;
+ return *this;
+ };
+
+ bool operator==(const Vector2d &a) const
+ {
+ if ( a.x == x && a.y == y ) return true;
+ return false;
+ };
+
+ bool operator!=(const Vector2d &a) const
+ {
+ if ( a.x != x || a.y != y ) return true;
+ return false;
+ };
+
+ Vector2d operator+(Vector2d a) const
+ {
+ a.x+=x;
+ a.y+=y;
+ return a;
+ };
+
+ Vector2d operator-(Vector2d a) const
+ {
+ a.x = x-a.x;
+ a.y = y-a.y;
+ return a;
+ };
+
+ Vector2d operator - (void) const
+ {
+ return negative();
+ };
+
+ Vector2d operator*(Vector2d a) const
+ {
+ a.x*=x;
+ a.y*=y;
+ return a;
+ };
+
+ Vector2d operator*(float c) const
+ {
+ Vector2d a;
+
+ a.x = x * c;
+ a.y = y * c;
+
+ return a;
+ };
+
+ Vector2d operator/(Vector2d a) const
+ {
+ a.x = x/a.x;
+ a.y = y/a.y;
+ return a;
+ };
+
+
+ float Dot(const Vector2d &a) const // computes dot product.
+ {
+ return (x * a.x + y * a.y );
+ };
+
+ float GetX(void) const { return x; };
+ float GetY(void) const { return y; };
+
+ void SetX(float t) { x = t; };
+ void SetY(float t) { y = t; };
+
+ void Set(float a,float b)
+ {
+ x = a;
+ y = b;
+ };
+
+ void Zero(void)
+ {
+ x = y = 0;
+ };
+
+ Vector2d negative(void) const
+ {
+ Vector2d result;
+ result.x = -x;
+ result.y = -y;
+ return result;
+ }
+
+ float magnitude(void) const
+ {
+ return (float) sqrtf(x * x + y * y );
+ }
+
+ float fastmagnitude(void) const
+ {
+ return (float) sqrtf(x * x + y * y );
+ }
+
+ float fastermagnitude(void) const
+ {
+ return (float) sqrtf( x * x + y * y );
+ }
+
+ void Reflection(Vector2d &a,Vector2d &b); // compute reflection vector.
+
+ float Length(void) const // length of vector.
+ {
+ return float(sqrtf( x*x + y*y ));
+ };
+
+ float FastLength(void) const // length of vector.
+ {
+ return float(sqrtf( x*x + y*y ));
+ };
+
+ float FasterLength(void) const // length of vector.
+ {
+ return float(sqrtf( x*x + y*y ));
+ };
+
+ float Length2(void) // squared distance, prior to square root.
+ {
+ return x*x+y*y;
+ }
+
+ float Distance(const Vector2d &a) const // distance between two points.
+ {
+ float dx = a.x - x;
+ float dy = a.y - y;
+ float d = dx*dx+dy*dy;
+ return sqrtf(d);
+ };
+
+ float FastDistance(const Vector2d &a) const // distance between two points.
+ {
+ float dx = a.x - x;
+ float dy = a.y - y;
+ float d = dx*dx+dy*dy;
+ return sqrtf(d);
+ };
+
+ float FasterDistance(const Vector2d &a) const // distance between two points.
+ {
+ float dx = a.x - x;
+ float dy = a.y - y;
+ float d = dx*dx+dy*dy;
+ return sqrtf(d);
+ };
+
+ float Distance2(Vector2d &a) // squared distance.
+ {
+ float dx = a.x - x;
+ float dy = a.y - y;
+ return dx*dx + dy *dy;
+ };
+
+ void Lerp(const Vector2d& from,const Vector2d& to,float slerp)
+ {
+ x = ((to.x - from.x)*slerp) + from.x;
+ y = ((to.y - from.y)*slerp) + from.y;
+ };
+
+
+ void Cross(const Vector2d &a,const Vector2d &b) // cross two vectors result in this one.
+ {
+ x = a.y*b.x - a.x*b.y;
+ y = a.x*b.x - a.x*b.x;
+ };
+
+ float Normalize(void) // normalize to a unit vector, returns distance.
+ {
+ float l = Length();
+ if ( l != 0 )
+ {
+ l = float( 1 ) / l;
+ x*=l;
+ y*=l;
+ }
+ else
+ {
+ x = y = 0;
+ }
+ return l;
+ };
+
+ float FastNormalize(void) // normalize to a unit vector, returns distance.
+ {
+ float l = FastLength();
+ if ( l != 0 )
+ {
+ l = float( 1 ) / l;
+ x*=l;
+ y*=l;
+ }
+ else
+ {
+ x = y = 0;
+ }
+ return l;
+ };
+
+ float FasterNormalize(void) // normalize to a unit vector, returns distance.
+ {
+ float l = FasterLength();
+ if ( l != 0 )
+ {
+ l = float( 1 ) / l;
+ x*=l;
+ y*=l;
+ }
+ else
+ {
+ x = y = 0;
+ }
+ return l;
+ };
+
+
+ float x;
+ float y;
+};
+
+class Line
+{
+public:
+ Line(const Vector3d &from,const Vector3d &to)
+ {
+ mP1 = from;
+ mP2 = to;
+ };
+ // JWR Test for the intersection of two lines.
+
+ bool Intersect(const Line& src,Vector3d &sect);
+private:
+ Vector3d mP1;
+ Vector3d mP2;
+
+};
+
+
+typedef std::vector< Vector3d > Vector3dVector;
+typedef std::vector< Vector2d > Vector2dVector;
+
+inline Vector3d operator * (float s, const Vector3d &v )
+{
+ Vector3d Scaled(v.x*s, v.y*s, v.z*s);
+ return(Scaled);
+}
+
+inline Vector2d operator * (float s, const Vector2d &v )
+ {
+ Vector2d Scaled(v.x*s, v.y*s);
+ return(Scaled);
+ }
+
+}
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/cd_wavefront.cpp b/tests/bullet/Extras/ConvexDecomposition/cd_wavefront.cpp
new file mode 100644
index 00000000..54e8bdf6
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/cd_wavefront.cpp
@@ -0,0 +1,860 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <ctype.h>
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+#include "float_math.h"
+
+#include "cd_wavefront.h"
+
+
+using namespace ConvexDecomposition;
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+#include <vector>
+
+namespace ConvexDecomposition
+{
+
+typedef std::vector< int > IntVector;
+typedef std::vector< float > FloatVector;
+
+#if defined(__APPLE__) || defined(__CELLOS_LV2__)
+#define stricmp(a, b) strcasecmp((a), (b))
+#endif
+
+/*******************************************************************/
+/******************** InParser.h ********************************/
+/*******************************************************************/
+class InPlaceParserInterface
+{
+public:
+ virtual ~InPlaceParserInterface () {} ;
+
+ virtual int ParseLine(int lineno,int argc,const char **argv) =0; // return TRUE to continue parsing, return FALSE to abort parsing process
+};
+
+enum SeparatorType
+{
+ ST_DATA, // is data
+ ST_HARD, // is a hard separator
+ ST_SOFT, // is a soft separator
+ ST_EOS // is a comment symbol, and everything past this character should be ignored
+};
+
+class InPlaceParser
+{
+public:
+ InPlaceParser(void)
+ {
+ Init();
+ }
+
+ InPlaceParser(char *data,int len)
+ {
+ Init();
+ SetSourceData(data,len);
+ }
+
+ InPlaceParser(const char *fname)
+ {
+ Init();
+ SetFile(fname);
+ }
+
+ ~InPlaceParser(void);
+
+ void Init(void)
+ {
+ mQuoteChar = 34;
+ mData = 0;
+ mLen = 0;
+ mMyAlloc = false;
+ for (int i=0; i<256; i++)
+ {
+ mHard[i] = ST_DATA;
+ mHardString[i*2] = i;
+ mHardString[i*2+1] = 0;
+ }
+ mHard[0] = ST_EOS;
+ mHard[32] = ST_SOFT;
+ mHard[9] = ST_SOFT;
+ mHard[13] = ST_SOFT;
+ mHard[10] = ST_SOFT;
+ }
+
+ void SetFile(const char *fname); // use this file as source data to parse.
+
+ void SetSourceData(char *data,int len)
+ {
+ mData = data;
+ mLen = len;
+ mMyAlloc = false;
+ };
+
+ int Parse(InPlaceParserInterface *callback); // returns true if entire file was parsed, false if it aborted for some reason
+
+ int ProcessLine(int lineno,char *line,InPlaceParserInterface *callback);
+
+ const char ** GetArglist(char *source,int &count); // convert source string into an arg list, this is a destructive parse.
+
+ void SetHardSeparator(char c) // add a hard separator
+ {
+ mHard[(int)c] = ST_HARD;
+ }
+
+ void SetHard(char c) // add a hard separator
+ {
+ mHard[(int)c] = ST_HARD;
+ }
+
+
+ void SetCommentSymbol(char c) // comment character, treated as 'end of string'
+ {
+ mHard[(int)c] = ST_EOS;
+ }
+
+ void ClearHardSeparator(char c)
+ {
+ mHard[(int)c] = ST_DATA;
+ }
+
+
+ void DefaultSymbols(void); // set up default symbols for hard seperator and comment symbol of the '#' character.
+
+ bool EOS(char c)
+ {
+ if ( mHard[(int)c] == ST_EOS )
+ {
+ return true;
+ }
+ return false;
+ }
+
+ void SetQuoteChar(char c)
+ {
+ mQuoteChar = c;
+ }
+
+private:
+
+
+ inline char * AddHard(int &argc,const char **argv,char *foo);
+ inline bool IsHard(char c);
+ inline char * SkipSpaces(char *foo);
+ inline bool IsWhiteSpace(char c);
+ inline bool IsNonSeparator(char c); // non seperator,neither hard nor soft
+
+ bool mMyAlloc; // whether or not *I* allocated the buffer and am responsible for deleting it.
+ char *mData; // ascii data to parse.
+ int mLen; // length of data
+ SeparatorType mHard[256];
+ char mHardString[256*2];
+ char mQuoteChar;
+};
+
+/*******************************************************************/
+/******************** InParser.cpp ********************************/
+/*******************************************************************/
+void InPlaceParser::SetFile(const char *fname)
+{
+ if ( mMyAlloc )
+ {
+ free(mData);
+ }
+ mData = 0;
+ mLen = 0;
+ mMyAlloc = false;
+
+
+ FILE *fph = fopen(fname,"rb");
+ if ( fph )
+ {
+ fseek(fph,0L,SEEK_END);
+ mLen = ftell(fph);
+ fseek(fph,0L,SEEK_SET);
+ if ( mLen )
+ {
+ mData = (char *) malloc(sizeof(char)*(mLen+1));
+ int ok = fread(mData, mLen, 1, fph);
+ if ( !ok )
+ {
+ free(mData);
+ mData = 0;
+ }
+ else
+ {
+ mData[mLen] = 0; // zero byte terminate end of file marker.
+ mMyAlloc = true;
+ }
+ }
+ fclose(fph);
+ }
+}
+
+InPlaceParser::~InPlaceParser(void)
+{
+ if ( mMyAlloc )
+ {
+ free(mData);
+ }
+}
+
+#define MAXARGS 512
+
+bool InPlaceParser::IsHard(char c)
+{
+ return mHard[(int)c] == ST_HARD;
+}
+
+char * InPlaceParser::AddHard(int &argc,const char **argv,char *foo)
+{
+ while ( IsHard(*foo) )
+ {
+ const char *hard = &mHardString[*foo*2];
+ if ( argc < MAXARGS )
+ {
+ argv[argc++] = hard;
+ }
+ foo++;
+ }
+ return foo;
+}
+
+bool InPlaceParser::IsWhiteSpace(char c)
+{
+ return mHard[(int)c] == ST_SOFT;
+}
+
+char * InPlaceParser::SkipSpaces(char *foo)
+{
+ while ( !EOS(*foo) && IsWhiteSpace(*foo) ) foo++;
+ return foo;
+}
+
+bool InPlaceParser::IsNonSeparator(char c)
+{
+ if ( !IsHard(c) && !IsWhiteSpace(c) && c != 0 ) return true;
+ return false;
+}
+
+
+int InPlaceParser::ProcessLine(int lineno,char *line,InPlaceParserInterface *callback)
+{
+ int ret = 0;
+
+ const char *argv[MAXARGS];
+ int argc = 0;
+
+ char *foo = line;
+
+ while ( !EOS(*foo) && argc < MAXARGS )
+ {
+
+ foo = SkipSpaces(foo); // skip any leading spaces
+
+ if ( EOS(*foo) ) break;
+
+ if ( *foo == mQuoteChar ) // if it is an open quote
+ {
+ foo++;
+ if ( argc < MAXARGS )
+ {
+ argv[argc++] = foo;
+ }
+ while ( !EOS(*foo) && *foo != mQuoteChar ) foo++;
+ if ( !EOS(*foo) )
+ {
+ *foo = 0; // replace close quote with zero byte EOS
+ foo++;
+ }
+ }
+ else
+ {
+
+ foo = AddHard(argc,argv,foo); // add any hard separators, skip any spaces
+
+ if ( IsNonSeparator(*foo) ) // add non-hard argument.
+ {
+ bool quote = false;
+ if ( *foo == mQuoteChar )
+ {
+ foo++;
+ quote = true;
+ }
+
+ if ( argc < MAXARGS )
+ {
+ argv[argc++] = foo;
+ }
+
+ if ( quote )
+ {
+ while (*foo && *foo != mQuoteChar ) foo++;
+ if ( *foo ) *foo = 32;
+ }
+
+ // continue..until we hit an eos ..
+ while ( !EOS(*foo) ) // until we hit EOS
+ {
+ if ( IsWhiteSpace(*foo) ) // if we hit a space, stomp a zero byte, and exit
+ {
+ *foo = 0;
+ foo++;
+ break;
+ }
+ else if ( IsHard(*foo) ) // if we hit a hard separator, stomp a zero byte and store the hard separator argument
+ {
+ const char *hard = &mHardString[*foo*2];
+ *foo = 0;
+ if ( argc < MAXARGS )
+ {
+ argv[argc++] = hard;
+ }
+ foo++;
+ break;
+ }
+ foo++;
+ } // end of while loop...
+ }
+ }
+ }
+
+ if ( argc )
+ {
+ ret = callback->ParseLine(lineno, argc, argv );
+ }
+
+ return ret;
+}
+
+int InPlaceParser::Parse(InPlaceParserInterface *callback) // returns true if entire file was parsed, false if it aborted for some reason
+{
+ assert( callback );
+ if ( !mData ) return 0;
+
+ int ret = 0;
+
+ int lineno = 0;
+
+ char *foo = mData;
+ char *begin = foo;
+
+
+ while ( *foo )
+ {
+ if ( *foo == 10 || *foo == 13 )
+ {
+ lineno++;
+ *foo = 0;
+
+ if ( *begin ) // if there is any data to parse at all...
+ {
+ int v = ProcessLine(lineno,begin,callback);
+ if ( v ) ret = v;
+ }
+
+ foo++;
+ if ( *foo == 10 ) foo++; // skip line feed, if it is in the carraige-return line-feed format...
+ begin = foo;
+ }
+ else
+ {
+ foo++;
+ }
+ }
+
+ lineno++; // lasst line.
+
+ int v = ProcessLine(lineno,begin,callback);
+ if ( v ) ret = v;
+ return ret;
+}
+
+
+void InPlaceParser::DefaultSymbols(void)
+{
+ SetHardSeparator(',');
+ SetHardSeparator('(');
+ SetHardSeparator(')');
+ SetHardSeparator('=');
+ SetHardSeparator('[');
+ SetHardSeparator(']');
+ SetHardSeparator('{');
+ SetHardSeparator('}');
+ SetCommentSymbol('#');
+}
+
+
+const char ** InPlaceParser::GetArglist(char *line,int &count) // convert source string into an arg list, this is a destructive parse.
+{
+ const char **ret = 0;
+
+ const char *argv[MAXARGS];
+ int argc = 0;
+
+ char *foo = line;
+
+ while ( !EOS(*foo) && argc < MAXARGS )
+ {
+
+ foo = SkipSpaces(foo); // skip any leading spaces
+
+ if ( EOS(*foo) ) break;
+
+ if ( *foo == mQuoteChar ) // if it is an open quote
+ {
+ foo++;
+ if ( argc < MAXARGS )
+ {
+ argv[argc++] = foo;
+ }
+ while ( !EOS(*foo) && *foo != mQuoteChar ) foo++;
+ if ( !EOS(*foo) )
+ {
+ *foo = 0; // replace close quote with zero byte EOS
+ foo++;
+ }
+ }
+ else
+ {
+
+ foo = AddHard(argc,argv,foo); // add any hard separators, skip any spaces
+
+ if ( IsNonSeparator(*foo) ) // add non-hard argument.
+ {
+ bool quote = false;
+ if ( *foo == mQuoteChar )
+ {
+ foo++;
+ quote = true;
+ }
+
+ if ( argc < MAXARGS )
+ {
+ argv[argc++] = foo;
+ }
+
+ if ( quote )
+ {
+ while (*foo && *foo != mQuoteChar ) foo++;
+ if ( *foo ) *foo = 32;
+ }
+
+ // continue..until we hit an eos ..
+ while ( !EOS(*foo) ) // until we hit EOS
+ {
+ if ( IsWhiteSpace(*foo) ) // if we hit a space, stomp a zero byte, and exit
+ {
+ *foo = 0;
+ foo++;
+ break;
+ }
+ else if ( IsHard(*foo) ) // if we hit a hard separator, stomp a zero byte and store the hard separator argument
+ {
+ const char *hard = &mHardString[*foo*2];
+ *foo = 0;
+ if ( argc < MAXARGS )
+ {
+ argv[argc++] = hard;
+ }
+ foo++;
+ break;
+ }
+ foo++;
+ } // end of while loop...
+ }
+ }
+ }
+
+ count = argc;
+ if ( argc )
+ {
+ ret = argv;
+ }
+
+ return ret;
+}
+
+/*******************************************************************/
+/******************** Geometry.h ********************************/
+/*******************************************************************/
+
+class GeometryVertex
+{
+public:
+ float mPos[3];
+ float mNormal[3];
+ float mTexel[2];
+};
+
+
+class GeometryInterface
+{
+public:
+
+ virtual void NodeTriangle(const GeometryVertex *v1,const GeometryVertex *v2,const GeometryVertex *v3) {}
+
+ virtual ~GeometryInterface () {}
+};
+
+
+/*******************************************************************/
+/******************** Obj.h ********************************/
+/*******************************************************************/
+
+
+class OBJ : public InPlaceParserInterface
+{
+public:
+ int LoadMesh(const char *fname,GeometryInterface *callback);
+ int ParseLine(int lineno,int argc,const char **argv); // return TRUE to continue parsing, return FALSE to abort parsing process
+private:
+
+ void getVertex(GeometryVertex &v,const char *face) const;
+
+ FloatVector mVerts;
+ FloatVector mTexels;
+ FloatVector mNormals;
+
+ GeometryInterface *mCallback;
+};
+
+
+/*******************************************************************/
+/******************** Obj.cpp ********************************/
+/*******************************************************************/
+
+int OBJ::LoadMesh(const char *fname,GeometryInterface *iface)
+{
+ int ret = 0;
+
+ mVerts.clear();
+ mTexels.clear();
+ mNormals.clear();
+
+ mCallback = iface;
+
+ InPlaceParser ipp(fname);
+
+ ipp.Parse(this);
+
+
+ return ret;
+}
+
+//static const char * GetArg(const char **argv,int i,int argc)
+//{
+ // const char * ret = 0;
+ // if ( i < argc ) ret = argv[i];
+ // return ret;
+//}
+
+void OBJ::getVertex(GeometryVertex &v,const char *face) const
+{
+ v.mPos[0] = 0;
+ v.mPos[1] = 0;
+ v.mPos[2] = 0;
+
+ v.mTexel[0] = 0;
+ v.mTexel[1] = 0;
+
+ v.mNormal[0] = 0;
+ v.mNormal[1] = 1;
+ v.mNormal[2] = 0;
+
+ int index = atoi( face )-1;
+
+ const char *texel = strstr(face,"/");
+
+ if ( texel )
+ {
+ int tindex = atoi( texel+1) - 1;
+
+ if ( tindex >=0 && tindex < (int)(mTexels.size()/2) )
+ {
+ const float *t = &mTexels[tindex*2];
+
+ v.mTexel[0] = t[0];
+ v.mTexel[1] = t[1];
+
+ }
+
+ const char *normal = strstr(texel+1,"/");
+ if ( normal )
+ {
+ int nindex = atoi( normal+1 ) - 1;
+
+ if (nindex >= 0 && nindex < (int)(mNormals.size()/3) )
+ {
+ const float *n = &mNormals[nindex*3];
+
+ v.mNormal[0] = n[0];
+ v.mNormal[1] = n[1];
+ v.mNormal[2] = n[2];
+ }
+ }
+ }
+
+ if ( index >= 0 && index < (int)(mVerts.size()/3) )
+ {
+
+ const float *p = &mVerts[index*3];
+
+ v.mPos[0] = p[0];
+ v.mPos[1] = p[1];
+ v.mPos[2] = p[2];
+ }
+
+}
+
+int OBJ::ParseLine(int lineno,int argc,const char **argv) // return TRUE to continue parsing, return FALSE to abort parsing process
+{
+ int ret = 0;
+
+ if ( argc >= 1 )
+ {
+ const char *foo = argv[0];
+ if ( *foo != '#' )
+ {
+ if ( strcmp(argv[0],"v") == 0 && argc == 4 )
+
+ //if ( stricmp(argv[0],"v") == 0 && argc == 4 )
+ {
+ float vx = (float) atof( argv[1] );
+ float vy = (float) atof( argv[2] );
+ float vz = (float) atof( argv[3] );
+ mVerts.push_back(vx);
+ mVerts.push_back(vy);
+ mVerts.push_back(vz);
+ }
+ else if ( strcmp(argv[0],"vt") == 0 && argc == 3 )
+
+ // else if ( stricmp(argv[0],"vt") == 0 && argc == 3 )
+ {
+ float tx = (float) atof( argv[1] );
+ float ty = (float) atof( argv[2] );
+ mTexels.push_back(tx);
+ mTexels.push_back(ty);
+ }
+ // else if ( stricmp(argv[0],"vn") == 0 && argc == 4 )
+
+ else if ( strcmp(argv[0],"vn") == 0 && argc == 4 )
+ {
+ float normalx = (float) atof(argv[1]);
+ float normaly = (float) atof(argv[2]);
+ float normalz = (float) atof(argv[3]);
+ mNormals.push_back(normalx);
+ mNormals.push_back(normaly);
+ mNormals.push_back(normalz);
+ }
+// else if ( stricmp(argv[0],"f") == 0 && argc >= 4 )
+
+ else if ( strcmp(argv[0],"f") == 0 && argc >= 4 )
+ {
+ GeometryVertex v[32];
+
+ int vcount = argc-1;
+
+ for (int i=1; i<argc; i++)
+ {
+ getVertex(v[i-1],argv[i] );
+ }
+
+ // need to generate a normal!
+#if 0 // not currently implemented
+ if ( mNormals.empty() )
+ {
+ Vector3d<float> p1( v[0].mPos );
+ Vector3d<float> p2( v[1].mPos );
+ Vector3d<float> p3( v[2].mPos );
+
+ Vector3d<float> n;
+ n.ComputeNormal(p3,p2,p1);
+
+ for (int i=0; i<vcount; i++)
+ {
+ v[i].mNormal[0] = n.x;
+ v[i].mNormal[1] = n.y;
+ v[i].mNormal[2] = n.z;
+ }
+
+ }
+#endif
+
+ mCallback->NodeTriangle(&v[0],&v[1],&v[2]);
+
+ if ( vcount >=3 ) // do the fan
+ {
+ for (int i=2; i<(vcount-1); i++)
+ {
+ mCallback->NodeTriangle(&v[0],&v[i],&v[i+1]);
+ }
+ }
+
+ }
+ }
+ }
+
+ return ret;
+}
+
+
+
+
+class BuildMesh : public GeometryInterface
+{
+public:
+
+ int getIndex(const float *p)
+ {
+
+ int vcount = mVertices.size()/3;
+
+ if(vcount>0)
+ {
+ //New MS STL library checks indices in debug build, so zero causes an assert if it is empty.
+ const float *v = &mVertices[0];
+
+ for (int i=0; i<vcount; i++)
+ {
+ if ( v[0] == p[0] && v[1] == p[1] && v[2] == p[2] ) return i;
+ v+=3;
+ }
+ }
+
+ mVertices.push_back( p[0] );
+ mVertices.push_back( p[1] );
+ mVertices.push_back( p[2] );
+
+ return vcount;
+ }
+
+ virtual void NodeTriangle(const GeometryVertex *v1,const GeometryVertex *v2,const GeometryVertex *v3)
+ {
+ mIndices.push_back( getIndex(v1->mPos) );
+ mIndices.push_back( getIndex(v2->mPos) );
+ mIndices.push_back( getIndex(v3->mPos) );
+ }
+
+ const FloatVector& GetVertices(void) const { return mVertices; };
+ const IntVector& GetIndices(void) const { return mIndices; };
+
+private:
+ FloatVector mVertices;
+ IntVector mIndices;
+};
+
+
+WavefrontObj::WavefrontObj(void)
+{
+ mVertexCount = 0;
+ mTriCount = 0;
+ mIndices = 0;
+ mVertices = 0;
+}
+
+WavefrontObj::~WavefrontObj(void)
+{
+ delete [] mIndices;
+ delete [] mVertices;
+}
+
+unsigned int WavefrontObj::loadObj(const char *fname) // load a wavefront obj returns number of triangles that were loaded. Data is persists until the class is destructed.
+{
+
+ unsigned int ret = 0;
+
+ delete [] mVertices;
+ mVertices = 0;
+ delete [] mIndices;
+ mIndices = 0;
+ mVertexCount = 0;
+ mTriCount = 0;
+
+
+ BuildMesh bm;
+
+ OBJ obj;
+
+ obj.LoadMesh(fname,&bm);
+
+
+ const FloatVector &vlist = bm.GetVertices();
+ const IntVector &indices = bm.GetIndices();
+ if ( vlist.size() )
+ {
+ mVertexCount = vlist.size()/3;
+ mVertices = new float[mVertexCount*3];
+ memcpy( mVertices, &vlist[0], sizeof(float)*mVertexCount*3 );
+ mTriCount = indices.size()/3;
+ mIndices = new int[mTriCount*3*sizeof(int)];
+ memcpy(mIndices, &indices[0], sizeof(int)*mTriCount*3);
+ ret = mTriCount;
+ }
+
+
+ return ret;
+}
+
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/cd_wavefront.h b/tests/bullet/Extras/ConvexDecomposition/cd_wavefront.h
new file mode 100644
index 00000000..ba5f90bd
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/cd_wavefront.h
@@ -0,0 +1,62 @@
+#ifndef CD_WAVEFRONT_OBJ_H
+
+
+#define CD_WAVEFRONT_OBJ_H
+
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+namespace ConvexDecomposition
+{
+
+class WavefrontObj
+{
+public:
+
+ WavefrontObj(void);
+ ~WavefrontObj(void);
+
+ unsigned int loadObj(const char *fname); // load a wavefront obj returns number of triangles that were loaded. Data is persists until the class is destructed.
+
+ int mVertexCount;
+ int mTriCount;
+ int *mIndices;
+ float *mVertices;
+};
+
+}
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/concavity.cpp b/tests/bullet/Extras/ConvexDecomposition/concavity.cpp
new file mode 100644
index 00000000..f1a46600
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/concavity.cpp
@@ -0,0 +1,795 @@
+#include "float_math.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include <vector>
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+#include "concavity.h"
+#include "raytri.h"
+#include "bestfit.h"
+#include "cd_hull.h"
+#include "meshvolume.h"
+#include "cd_vector.h"
+#include "splitplane.h"
+#include "ConvexDecomposition.h"
+
+
+#define WSCALE 4
+#define CONCAVE_THRESH 0.05f
+
+namespace ConvexDecomposition
+{
+
+unsigned int getDebugColor(void)
+{
+ static unsigned int colors[8] =
+ {
+ 0xFF0000,
+ 0x00FF00,
+ 0x0000FF,
+ 0xFFFF00,
+ 0x00FFFF,
+ 0xFF00FF,
+ 0xFFFFFF,
+ 0xFF8040
+ };
+
+ static int count = 0;
+
+ count++;
+
+ if ( count == 8 ) count = 0;
+
+ assert( count >= 0 && count < 8 );
+
+ unsigned int color = colors[count];
+
+ return color;
+
+}
+
+class Wpoint
+{
+public:
+ Wpoint(const Vector3d &p,float w)
+ {
+ mPoint = p;
+ mWeight = w;
+ }
+
+ Vector3d mPoint;
+ float mWeight;
+};
+
+typedef std::vector< Wpoint > WpointVector;
+
+
+static inline float DistToPt(const float *p,const float *plane)
+{
+ float x = p[0];
+ float y = p[1];
+ float z = p[2];
+ float d = x*plane[0] + y*plane[1] + z*plane[2] + plane[3];
+ return d;
+}
+
+
+static void intersect(const float *p1,const float *p2,float *split,const float *plane)
+{
+
+ float dp1 = DistToPt(p1,plane);
+
+ float dir[3];
+
+ dir[0] = p2[0] - p1[0];
+ dir[1] = p2[1] - p1[1];
+ dir[2] = p2[2] - p1[2];
+
+ float dot1 = dir[0]*plane[0] + dir[1]*plane[1] + dir[2]*plane[2];
+ float dot2 = dp1 - plane[3];
+
+ float t = -(plane[3] + dot2 ) / dot1;
+
+ split[0] = (dir[0]*t)+p1[0];
+ split[1] = (dir[1]*t)+p1[1];
+ split[2] = (dir[2]*t)+p1[2];
+}
+
+
+class CTri
+{
+public:
+ CTri(void) { };
+
+ CTri(const float *p1,const float *p2,const float *p3,unsigned int i1,unsigned int i2,unsigned int i3)
+ {
+ mProcessed = 0;
+ mI1 = i1;
+ mI2 = i2;
+ mI3 = i3;
+
+ mP1.Set(p1);
+ mP2.Set(p2);
+ mP3.Set(p3);
+
+ mPlaneD = mNormal.ComputePlane(mP1,mP2,mP3);
+ }
+
+ float Facing(const CTri &t)
+ {
+ float d = mNormal.Dot(t.mNormal);
+ return d;
+ }
+
+ // clip this line segment against this triangle.
+ bool clip(const Vector3d &start,Vector3d &end) const
+ {
+ Vector3d sect;
+
+ bool hit = lineIntersectsTriangle(start.Ptr(), end.Ptr(), mP1.Ptr(), mP2.Ptr(), mP3.Ptr(), sect.Ptr() );
+
+ if ( hit )
+ {
+ end = sect;
+ }
+ return hit;
+ }
+
+ bool Concave(const Vector3d &p,float &distance,Vector3d &n) const
+ {
+ n.NearestPointInTriangle(p,mP1,mP2,mP3);
+ distance = p.Distance(n);
+ return true;
+ }
+
+ void addTri(unsigned int *indices,unsigned int i1,unsigned int i2,unsigned int i3,unsigned int &tcount) const
+ {
+ indices[tcount*3+0] = i1;
+ indices[tcount*3+1] = i2;
+ indices[tcount*3+2] = i3;
+ tcount++;
+ }
+
+ float getVolume(ConvexDecompInterface *callback) const
+ {
+ unsigned int indices[8*3];
+
+
+ unsigned int tcount = 0;
+
+ addTri(indices,0,1,2,tcount);
+ addTri(indices,3,4,5,tcount);
+
+ addTri(indices,0,3,4,tcount);
+ addTri(indices,0,4,1,tcount);
+
+ addTri(indices,1,4,5,tcount);
+ addTri(indices,1,5,2,tcount);
+
+ addTri(indices,0,3,5,tcount);
+ addTri(indices,0,5,2,tcount);
+
+ const float *vertices = mP1.Ptr();
+
+ if ( callback )
+ {
+ unsigned int color = getDebugColor();
+
+#if 0
+ Vector3d d1 = mNear1;
+ Vector3d d2 = mNear2;
+ Vector3d d3 = mNear3;
+
+ callback->ConvexDebugPoint(mP1.Ptr(),0.01f,0x00FF00);
+ callback->ConvexDebugPoint(mP2.Ptr(),0.01f,0x00FF00);
+ callback->ConvexDebugPoint(mP3.Ptr(),0.01f,0x00FF00);
+ callback->ConvexDebugPoint(d1.Ptr(),0.01f,0xFF0000);
+ callback->ConvexDebugPoint(d2.Ptr(),0.01f,0xFF0000);
+ callback->ConvexDebugPoint(d3.Ptr(),0.01f,0xFF0000);
+
+ callback->ConvexDebugTri(mP1.Ptr(), d1.Ptr(), d1.Ptr(),0x00FF00);
+ callback->ConvexDebugTri(mP2.Ptr(), d2.Ptr(), d2.Ptr(),0x00FF00);
+ callback->ConvexDebugTri(mP3.Ptr(), d3.Ptr(), d3.Ptr(),0x00FF00);
+
+#else
+ for (unsigned int i=0; i<tcount; i++)
+ {
+ unsigned int i1 = indices[i*3+0];
+ unsigned int i2 = indices[i*3+1];
+ unsigned int i3 = indices[i*3+2];
+
+ const float *p1 = &vertices[ i1*3 ];
+ const float *p2 = &vertices[ i2*3 ];
+ const float *p3 = &vertices[ i3*3 ];
+
+ callback->ConvexDebugTri(p1,p2,p3,color);
+
+ }
+#endif
+ }
+
+ float v = computeMeshVolume(mP1.Ptr(), tcount, indices );
+
+ return v;
+
+ }
+
+ float raySect(const Vector3d &p,const Vector3d &dir,Vector3d &sect) const
+ {
+ float plane[4];
+
+ plane[0] = mNormal.x;
+ plane[1] = mNormal.y;
+ plane[2] = mNormal.z;
+ plane[3] = mPlaneD;
+
+ Vector3d dest = p+dir*100000;
+
+ intersect( p.Ptr(), dest.Ptr(), sect.Ptr(), plane );
+
+ return sect.Distance(p); // return the intersection distance.
+
+ }
+
+ float planeDistance(const Vector3d &p) const
+ {
+ float plane[4];
+
+ plane[0] = mNormal.x;
+ plane[1] = mNormal.y;
+ plane[2] = mNormal.z;
+ plane[3] = mPlaneD;
+
+ return DistToPt( p.Ptr(), plane );
+
+ }
+
+ bool samePlane(const CTri &t) const
+ {
+ const float THRESH = 0.001f;
+ float dd = fabsf( t.mPlaneD - mPlaneD );
+ if ( dd > THRESH ) return false;
+ dd = fabsf( t.mNormal.x - mNormal.x );
+ if ( dd > THRESH ) return false;
+ dd = fabsf( t.mNormal.y - mNormal.y );
+ if ( dd > THRESH ) return false;
+ dd = fabsf( t.mNormal.z - mNormal.z );
+ if ( dd > THRESH ) return false;
+ return true;
+ }
+
+ bool hasIndex(unsigned int i) const
+ {
+ if ( i == mI1 || i == mI2 || i == mI3 ) return true;
+ return false;
+ }
+
+ bool sharesEdge(const CTri &t) const
+ {
+ bool ret = false;
+ unsigned int count = 0;
+
+ if ( t.hasIndex(mI1) ) count++;
+ if ( t.hasIndex(mI2) ) count++;
+ if ( t.hasIndex(mI3) ) count++;
+
+ if ( count >= 2 ) ret = true;
+
+ return ret;
+ }
+
+ void debug(unsigned int color,ConvexDecompInterface *callback)
+ {
+ callback->ConvexDebugTri( mP1.Ptr(), mP2.Ptr(), mP3.Ptr(), color );
+ callback->ConvexDebugTri( mP1.Ptr(), mP1.Ptr(), mNear1.Ptr(), 0xFF0000 );
+ callback->ConvexDebugTri( mP2.Ptr(), mP2.Ptr(), mNear2.Ptr(), 0xFF0000 );
+ callback->ConvexDebugTri( mP2.Ptr(), mP3.Ptr(), mNear3.Ptr(), 0xFF0000 );
+ callback->ConvexDebugPoint( mNear1.Ptr(), 0.01f, 0xFF0000 );
+ callback->ConvexDebugPoint( mNear2.Ptr(), 0.01f, 0xFF0000 );
+ callback->ConvexDebugPoint( mNear3.Ptr(), 0.01f, 0xFF0000 );
+ }
+
+ float area(void)
+ {
+ float a = mConcavity*mP1.Area(mP2,mP3);
+ return a;
+ }
+
+ void addWeighted(WpointVector &list,ConvexDecompInterface *callback)
+ {
+
+ Wpoint p1(mP1,mC1);
+ Wpoint p2(mP2,mC2);
+ Wpoint p3(mP3,mC3);
+
+ Vector3d d1 = mNear1 - mP1;
+ Vector3d d2 = mNear2 - mP2;
+ Vector3d d3 = mNear3 - mP3;
+
+ d1*=WSCALE;
+ d2*=WSCALE;
+ d3*=WSCALE;
+
+ d1 = d1 + mP1;
+ d2 = d2 + mP2;
+ d3 = d3 + mP3;
+
+ Wpoint p4(d1,mC1);
+ Wpoint p5(d2,mC2);
+ Wpoint p6(d3,mC3);
+
+ list.push_back(p1);
+ list.push_back(p2);
+ list.push_back(p3);
+
+ list.push_back(p4);
+ list.push_back(p5);
+ list.push_back(p6);
+
+#if 0
+ callback->ConvexDebugPoint(mP1.Ptr(),0.01f,0x00FF00);
+ callback->ConvexDebugPoint(mP2.Ptr(),0.01f,0x00FF00);
+ callback->ConvexDebugPoint(mP3.Ptr(),0.01f,0x00FF00);
+ callback->ConvexDebugPoint(d1.Ptr(),0.01f,0xFF0000);
+ callback->ConvexDebugPoint(d2.Ptr(),0.01f,0xFF0000);
+ callback->ConvexDebugPoint(d3.Ptr(),0.01f,0xFF0000);
+
+ callback->ConvexDebugTri(mP1.Ptr(), d1.Ptr(), d1.Ptr(),0x00FF00);
+ callback->ConvexDebugTri(mP2.Ptr(), d2.Ptr(), d2.Ptr(),0x00FF00);
+ callback->ConvexDebugTri(mP3.Ptr(), d3.Ptr(), d3.Ptr(),0x00FF00);
+
+ Vector3d np1 = mP1 + mNormal*0.05f;
+ Vector3d np2 = mP2 + mNormal*0.05f;
+ Vector3d np3 = mP3 + mNormal*0.05f;
+
+ callback->ConvexDebugTri(mP1.Ptr(), np1.Ptr(), np1.Ptr(), 0xFF00FF );
+ callback->ConvexDebugTri(mP2.Ptr(), np2.Ptr(), np2.Ptr(), 0xFF00FF );
+ callback->ConvexDebugTri(mP3.Ptr(), np3.Ptr(), np3.Ptr(), 0xFF00FF );
+
+ callback->ConvexDebugPoint( np1.Ptr(), 0.01F, 0XFF00FF );
+ callback->ConvexDebugPoint( np2.Ptr(), 0.01F, 0XFF00FF );
+ callback->ConvexDebugPoint( np3.Ptr(), 0.01F, 0XFF00FF );
+
+#endif
+
+
+
+ }
+
+ Vector3d mP1;
+ Vector3d mP2;
+ Vector3d mP3;
+ Vector3d mNear1;
+ Vector3d mNear2;
+ Vector3d mNear3;
+ Vector3d mNormal;
+ float mPlaneD;
+ float mConcavity;
+ float mC1;
+ float mC2;
+ float mC3;
+ unsigned int mI1;
+ unsigned int mI2;
+ unsigned int mI3;
+ int mProcessed; // already been added...
+};
+
+typedef std::vector< CTri > CTriVector;
+
+bool featureMatch(CTri &m,const CTriVector &tris,ConvexDecompInterface *callback,const CTriVector &input_mesh)
+{
+
+ bool ret = false;
+
+ float neardot = 0.707f;
+
+ m.mConcavity = 0;
+
+ //gLog->Display("*********** FEATURE MATCH *************\r\n");
+ //gLog->Display("Plane: %0.4f,%0.4f,%0.4f %0.4f\r\n", m.mNormal.x, m.mNormal.y, m.mNormal.z, m.mPlaneD );
+ //gLog->Display("*********************************************\r\n");
+
+ CTriVector::const_iterator i;
+
+ CTri nearest;
+
+
+ for (i=tris.begin(); i!=tris.end(); ++i)
+ {
+ const CTri &t = (*i);
+
+
+ //gLog->Display(" HullPlane: %0.4f,%0.4f,%0.4f %0.4f\r\n", t.mNormal.x, t.mNormal.y, t.mNormal.z, t.mPlaneD );
+
+ if ( t.samePlane(m) )
+ {
+ //gLog->Display("*** PLANE MATCH!!!\r\n");
+ ret = false;
+ break;
+ }
+
+ float dot = t.mNormal.Dot(m.mNormal);
+
+ if ( dot > neardot )
+ {
+
+ float d1 = t.planeDistance( m.mP1 );
+ float d2 = t.planeDistance( m.mP2 );
+ float d3 = t.planeDistance( m.mP3 );
+
+ if ( d1 > 0.001f || d2 > 0.001f || d3 > 0.001f ) // can't be near coplaner!
+ {
+
+ neardot = dot;
+
+ Vector3d n1,n2,n3;
+
+ t.raySect( m.mP1, m.mNormal, m.mNear1 );
+ t.raySect( m.mP2, m.mNormal, m.mNear2 );
+ t.raySect( m.mP3, m.mNormal, m.mNear3 );
+
+ nearest = t;
+
+ ret = true;
+ }
+
+ }
+ }
+
+ if ( ret )
+ {
+ if ( 0 )
+ {
+ CTriVector::const_iterator i;
+ for (i=input_mesh.begin(); i!=input_mesh.end(); ++i)
+ {
+ const CTri &c = (*i);
+ if ( c.mI1 != m.mI1 && c.mI2 != m.mI2 && c.mI3 != m.mI3 )
+ {
+ c.clip( m.mP1, m.mNear1 );
+ c.clip( m.mP2, m.mNear2 );
+ c.clip( m.mP3, m.mNear3 );
+ }
+ }
+ }
+
+ //gLog->Display("*********************************************\r\n");
+ //gLog->Display(" HullPlaneNearest: %0.4f,%0.4f,%0.4f %0.4f\r\n", nearest.mNormal.x, nearest.mNormal.y, nearest.mNormal.z, nearest.mPlaneD );
+
+ m.mC1 = m.mP1.Distance( m.mNear1 );
+ m.mC2 = m.mP2.Distance( m.mNear2 );
+ m.mC3 = m.mP3.Distance( m.mNear3 );
+
+ m.mConcavity = m.mC1;
+
+ if ( m.mC2 > m.mConcavity ) m.mConcavity = m.mC2;
+ if ( m.mC3 > m.mConcavity ) m.mConcavity = m.mC3;
+
+ #if 0
+ callback->ConvexDebugTri( m.mP1.Ptr(), m.mP2.Ptr(), m.mP3.Ptr(), 0x00FF00 );
+ callback->ConvexDebugTri( m.mNear1.Ptr(), m.mNear2.Ptr(), m.mNear3.Ptr(), 0xFF0000 );
+
+ callback->ConvexDebugTri( m.mP1.Ptr(), m.mP1.Ptr(), m.mNear1.Ptr(), 0xFFFF00 );
+ callback->ConvexDebugTri( m.mP2.Ptr(), m.mP2.Ptr(), m.mNear2.Ptr(), 0xFFFF00 );
+ callback->ConvexDebugTri( m.mP3.Ptr(), m.mP3.Ptr(), m.mNear3.Ptr(), 0xFFFF00 );
+ #endif
+
+ }
+ else
+ {
+ //gLog->Display("No match\r\n");
+ }
+
+ //gLog->Display("*********************************************\r\n");
+ return ret;
+}
+
+bool isFeatureTri(CTri &t,CTriVector &flist,float fc,ConvexDecompInterface *callback,unsigned int color)
+{
+ bool ret = false;
+
+ if ( t.mProcessed == 0 ) // if not already processed
+ {
+
+ float c = t.mConcavity / fc; // must be within 80% of the concavity of the parent.
+
+ if ( c > 0.85f )
+ {
+ // see if this triangle is a 'feature' triangle. Meaning it shares an
+ // edge with any existing feature triangle and is within roughly the same
+ // concavity of the parent.
+ if ( flist.size() )
+ {
+ CTriVector::iterator i;
+ for (i=flist.begin(); i!=flist.end(); ++i)
+ {
+ CTri &ftri = (*i);
+ if ( ftri.sharesEdge(t) )
+ {
+ t.mProcessed = 2; // it is now part of a feature.
+ flist.push_back(t); // add it to the feature list.
+// callback->ConvexDebugTri( t.mP1.Ptr(), t.mP2.Ptr(),t.mP3.Ptr(), color );
+ ret = true;
+ break;
+ }
+ }
+ }
+ else
+ {
+ t.mProcessed = 2;
+ flist.push_back(t); // add it to the feature list.
+// callback->ConvexDebugTri( t.mP1.Ptr(), t.mP2.Ptr(),t.mP3.Ptr(), color );
+ ret = true;
+ }
+ }
+ else
+ {
+ t.mProcessed = 1; // eliminated for this feature, but might be valid for the next one..
+ }
+
+ }
+ return ret;
+}
+
+float computeConcavity(unsigned int vcount,
+ const float *vertices,
+ unsigned int tcount,
+ const unsigned int *indices,
+ ConvexDecompInterface *callback,
+ float *plane, // plane equation to split on
+ float &volume)
+{
+
+
+ float cret = 0;
+ volume = 1;
+
+ HullResult result;
+ HullLibrary hl;
+ HullDesc desc;
+
+ desc.mMaxFaces = 256;
+ desc.mMaxVertices = 256;
+ desc.SetHullFlag(QF_TRIANGLES);
+
+
+ desc.mVcount = vcount;
+ desc.mVertices = vertices;
+ desc.mVertexStride = sizeof(float)*3;
+
+ HullError ret = hl.CreateConvexHull(desc,result);
+
+ if ( ret == QE_OK )
+ {
+#if 0
+ float bmin[3];
+ float bmax[3];
+
+ float dx = bmax[0] - bmin[0];
+ float dy = bmax[1] - bmin[1];
+ float dz = bmax[2] - bmin[2];
+
+ Vector3d center;
+
+ center.x = bmin[0] + dx*0.5f;
+ center.y = bmin[1] + dy*0.5f;
+ center.z = bmin[2] + dz*0.5f;
+#endif
+
+ volume = computeMeshVolume2( result.mOutputVertices, result.mNumFaces, result.mIndices );
+
+#if 1
+ // ok..now..for each triangle on the original mesh..
+ // we extrude the points to the nearest point on the hull.
+ const unsigned int *source = result.mIndices;
+
+ CTriVector tris;
+
+ for (unsigned int i=0; i<result.mNumFaces; i++)
+ {
+ unsigned int i1 = *source++;
+ unsigned int i2 = *source++;
+ unsigned int i3 = *source++;
+
+ const float *p1 = &result.mOutputVertices[i1*3];
+ const float *p2 = &result.mOutputVertices[i2*3];
+ const float *p3 = &result.mOutputVertices[i3*3];
+
+// callback->ConvexDebugTri(p1,p2,p3,0xFFFFFF);
+
+ CTri t(p1,p2,p3,i1,i2,i3); //
+ tris.push_back(t);
+ }
+
+ // we have not pre-computed the plane equation for each triangle in the convex hull..
+
+ float totalVolume = 0;
+
+ CTriVector ftris; // 'feature' triangles.
+
+ const unsigned int *src = indices;
+
+
+ float maxc=0;
+
+
+ if ( 1 )
+ {
+ CTriVector input_mesh;
+ if ( 1 )
+ {
+ const unsigned int *src = indices;
+ for (unsigned int i=0; i<tcount; i++)
+ {
+
+ unsigned int i1 = *src++;
+ unsigned int i2 = *src++;
+ unsigned int i3 = *src++;
+
+ const float *p1 = &vertices[i1*3];
+ const float *p2 = &vertices[i2*3];
+ const float *p3 = &vertices[i3*3];
+
+ CTri t(p1,p2,p3,i1,i2,i3);
+ input_mesh.push_back(t);
+ }
+ }
+
+ CTri maxctri;
+
+ for (unsigned int i=0; i<tcount; i++)
+ {
+
+ unsigned int i1 = *src++;
+ unsigned int i2 = *src++;
+ unsigned int i3 = *src++;
+
+ const float *p1 = &vertices[i1*3];
+ const float *p2 = &vertices[i2*3];
+ const float *p3 = &vertices[i3*3];
+
+ CTri t(p1,p2,p3,i1,i2,i3);
+
+ featureMatch(t, tris, callback, input_mesh );
+
+ if ( t.mConcavity > CONCAVE_THRESH )
+ {
+
+ if ( t.mConcavity > maxc )
+ {
+ maxc = t.mConcavity;
+ maxctri = t;
+ }
+
+ float v = t.getVolume(0);
+ totalVolume+=v;
+ ftris.push_back(t);
+ }
+
+ }
+ }
+
+ if ( ftris.size() && 0 )
+ {
+
+ // ok..now we extract the triangles which form the maximum concavity.
+ CTriVector major_feature;
+ float maxarea = 0;
+
+ while ( maxc > CONCAVE_THRESH )
+ {
+
+ unsigned int color = getDebugColor(); //
+
+ CTriVector flist;
+
+ bool found;
+
+ float totalarea = 0;
+
+ do
+ {
+ found = false;
+ CTriVector::iterator i;
+ for (i=ftris.begin(); i!=ftris.end(); ++i)
+ {
+ CTri &t = (*i);
+ if ( isFeatureTri(t,flist,maxc,callback,color) )
+ {
+ found = true;
+ totalarea+=t.area();
+ }
+ }
+ } while ( found );
+
+
+ if ( totalarea > maxarea )
+ {
+ major_feature = flist;
+ maxarea = totalarea;
+ }
+
+ maxc = 0;
+
+ for (unsigned int i=0; i<ftris.size(); i++)
+ {
+ CTri &t = ftris[i];
+ if ( t.mProcessed != 2 )
+ {
+ t.mProcessed = 0;
+ if ( t.mConcavity > maxc )
+ {
+ maxc = t.mConcavity;
+ }
+ }
+ }
+ }
+
+ unsigned int color = getDebugColor();
+
+ WpointVector list;
+ for (unsigned int i=0; i<major_feature.size(); ++i)
+ {
+ major_feature[i].addWeighted(list,callback);
+ major_feature[i].debug(color,callback);
+ }
+
+ getBestFitPlane( list.size(), &list[0].mPoint.x, sizeof(Wpoint), &list[0].mWeight, sizeof(Wpoint), plane );
+
+ computeSplitPlane( vcount, vertices, tcount, indices, callback, plane );
+
+
+ }
+ else
+ {
+ computeSplitPlane( vcount, vertices, tcount, indices, callback, plane );
+ }
+#endif
+
+ cret = totalVolume;
+
+ hl.ReleaseResult(result);
+ }
+
+
+ return cret;
+}
+
+
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/concavity.h b/tests/bullet/Extras/ConvexDecomposition/concavity.h
new file mode 100644
index 00000000..012f8a31
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/concavity.h
@@ -0,0 +1,60 @@
+#ifndef COMPUTE_CONCAVITY_H
+
+#define COMPUTE_CONCAVITY_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+
+namespace ConvexDecomposition
+{
+
+class ConvexDecompInterface;
+
+// compute's how 'concave' this object is and returns the total volume of the
+// convex hull as well as the volume of the 'concavity' which was found.
+float computeConcavity(unsigned int vcount,
+ const float *vertices,
+ unsigned int tcount,
+ const unsigned int *indices,
+ ConvexDecompInterface *callback,
+ float *plane,
+ float &volume);
+
+
+}
+
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/fitsphere.cpp b/tests/bullet/Extras/ConvexDecomposition/fitsphere.cpp
new file mode 100644
index 00000000..53e6e6d7
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/fitsphere.cpp
@@ -0,0 +1,202 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <math.h>
+
+#include "fitsphere.h"
+
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+/*
+An Efficient Bounding Sphere
+by Jack Ritter
+from "Graphics Gems", Academic Press, 1990
+*/
+
+/* Routine to calculate tight bounding sphere over */
+/* a set of points in 3D */
+/* This contains the routine find_bounding_sphere(), */
+/* the struct definition, and the globals used for parameters. */
+/* The abs() of all coordinates must be < BIGNUMBER */
+/* Code written by Jack Ritter and Lyle Rains. */
+
+#define BIGNUMBER 100000000.0 /* hundred million */
+
+static inline void Set(float *n,float x,float y,float z)
+{
+ n[0] = x;
+ n[1] = y;
+ n[2] = z;
+}
+
+static inline void Copy(float *dest,const float *source)
+{
+ dest[0] = source[0];
+ dest[1] = source[1];
+ dest[2] = source[2];
+}
+
+float computeBoundingSphere(unsigned int vcount,const float *points,float *center)
+{
+
+ float mRadius;
+ float mRadius2;
+
+ float xmin[3];
+ float xmax[3];
+ float ymin[3];
+ float ymax[3];
+ float zmin[3];
+ float zmax[3];
+ float dia1[3];
+ float dia2[3];
+
+ /* FIRST PASS: find 6 minima/maxima points */
+ Set(xmin,BIGNUMBER,BIGNUMBER,BIGNUMBER);
+ Set(xmax,-BIGNUMBER,-BIGNUMBER,-BIGNUMBER);
+ Set(ymin,BIGNUMBER,BIGNUMBER,BIGNUMBER);
+ Set(ymax,-BIGNUMBER,-BIGNUMBER,-BIGNUMBER);
+ Set(zmin,BIGNUMBER,BIGNUMBER,BIGNUMBER);
+ Set(zmax,-BIGNUMBER,-BIGNUMBER,-BIGNUMBER);
+
+ for (unsigned i=0; i<vcount; i++)
+ {
+ const float *caller_p = &points[i*3];
+
+ if (caller_p[0]<xmin[0])
+ Copy(xmin,caller_p); /* New xminimum point */
+ if (caller_p[0]>xmax[0])
+ Copy(xmax,caller_p);
+ if (caller_p[1]<ymin[1])
+ Copy(ymin,caller_p);
+ if (caller_p[1]>ymax[1])
+ Copy(ymax,caller_p);
+ if (caller_p[2]<zmin[2])
+ Copy(zmin,caller_p);
+ if (caller_p[2]>zmax[2])
+ Copy(zmax,caller_p);
+ }
+
+ /* Set xspan = distance between the 2 points xmin & xmax (squared) */
+ float dx = xmax[0] - xmin[0];
+ float dy = xmax[1] - xmin[1];
+ float dz = xmax[2] - xmin[2];
+ float xspan = dx*dx + dy*dy + dz*dz;
+
+ /* Same for y & z spans */
+ dx = ymax[0] - ymin[0];
+ dy = ymax[1] - ymin[1];
+ dz = ymax[2] - ymin[2];
+ float yspan = dx*dx + dy*dy + dz*dz;
+
+ dx = zmax[0] - zmin[0];
+ dy = zmax[1] - zmin[1];
+ dz = zmax[2] - zmin[2];
+ float zspan = dx*dx + dy*dy + dz*dz;
+
+ /* Set points dia1 & dia2 to the maximally separated pair */
+ Copy(dia1,xmin);
+ Copy(dia2,xmax); /* assume xspan biggest */
+ float maxspan = xspan;
+
+ if (yspan>maxspan)
+ {
+ maxspan = yspan;
+ Copy(dia1,ymin);
+ Copy(dia2,ymax);
+ }
+
+ if (zspan>maxspan)
+ {
+ Copy(dia1,zmin);
+ Copy(dia2,zmax);
+ }
+
+
+ /* dia1,dia2 is a diameter of initial sphere */
+ /* calc initial center */
+ center[0] = (dia1[0]+dia2[0])*0.5f;
+ center[1] = (dia1[1]+dia2[1])*0.5f;
+ center[2] = (dia1[2]+dia2[2])*0.5f;
+
+ /* calculate initial radius**2 and radius */
+
+ dx = dia2[0]-center[0]; /* x component of radius vector */
+ dy = dia2[1]-center[1]; /* y component of radius vector */
+ dz = dia2[2]-center[2]; /* z component of radius vector */
+
+ mRadius2 = dx*dx + dy*dy + dz*dz;
+ mRadius = float(sqrt(mRadius2));
+
+ /* SECOND PASS: increment current sphere */
+
+ if ( 1 )
+ {
+ for (unsigned i=0; i<vcount; i++)
+ {
+ const float *caller_p = &points[i*3];
+
+ dx = caller_p[0]-center[0];
+ dy = caller_p[1]-center[1];
+ dz = caller_p[2]-center[2];
+
+ float old_to_p_sq = dx*dx + dy*dy + dz*dz;
+
+ if (old_to_p_sq > mRadius2) /* do r**2 test first */
+ { /* this point is outside of current sphere */
+ float old_to_p = float(sqrt(old_to_p_sq));
+ /* calc radius of new sphere */
+ mRadius = (mRadius + old_to_p) * 0.5f;
+ mRadius2 = mRadius*mRadius; /* for next r**2 compare */
+ float old_to_new = old_to_p - mRadius;
+
+ /* calc center of new sphere */
+
+ float recip = 1.0f /old_to_p;
+
+ float cx = (mRadius*center[0] + old_to_new*caller_p[0]) * recip;
+ float cy = (mRadius*center[1] + old_to_new*caller_p[1]) * recip;
+ float cz = (mRadius*center[2] + old_to_new*caller_p[2]) * recip;
+
+ Set(center,cx,cy,cz);
+ }
+ }
+ }
+
+ return mRadius;
+}
+
+
diff --git a/tests/bullet/Extras/ConvexDecomposition/fitsphere.h b/tests/bullet/Extras/ConvexDecomposition/fitsphere.h
new file mode 100644
index 00000000..cd4a565c
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/fitsphere.h
@@ -0,0 +1,43 @@
+#ifndef FIT_SPHERE_H
+
+#define FIT_SPHERE_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+
+float computeBoundingSphere(unsigned int vcount,const float *points,float *center);
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/float_math.cpp b/tests/bullet/Extras/ConvexDecomposition/float_math.cpp
new file mode 100644
index 00000000..38c699b5
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/float_math.cpp
@@ -0,0 +1,257 @@
+#include "float_math.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <math.h>
+
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+void fm_inverseRT(const float *matrix,const float *pos,float *t) // inverse rotate translate the point.
+{
+
+ float _x = pos[0] - matrix[3*4+0];
+ float _y = pos[1] - matrix[3*4+1];
+ float _z = pos[2] - matrix[3*4+2];
+
+ // Multiply inverse-translated source vector by inverted rotation transform
+
+ t[0] = (matrix[0*4+0] * _x) + (matrix[0*4+1] * _y) + (matrix[0*4+2] * _z);
+ t[1] = (matrix[1*4+0] * _x) + (matrix[1*4+1] * _y) + (matrix[1*4+2] * _z);
+ t[2] = (matrix[2*4+0] * _x) + (matrix[2*4+1] * _y) + (matrix[2*4+2] * _z);
+
+}
+
+
+void fm_identity(float *matrix) // set 4x4 matrix to identity.
+{
+ matrix[0*4+0] = 1;
+ matrix[1*4+1] = 1;
+ matrix[2*4+2] = 1;
+ matrix[3*4+3] = 1;
+
+ matrix[1*4+0] = 0;
+ matrix[2*4+0] = 0;
+ matrix[3*4+0] = 0;
+
+ matrix[0*4+1] = 0;
+ matrix[2*4+1] = 0;
+ matrix[3*4+1] = 0;
+
+ matrix[0*4+2] = 0;
+ matrix[1*4+2] = 0;
+ matrix[3*4+2] = 0;
+
+ matrix[0*4+3] = 0;
+ matrix[1*4+3] = 0;
+ matrix[2*4+3] = 0;
+
+}
+
+void fm_eulerMatrix(float ax,float ay,float az,float *matrix) // convert euler (in radians) to a dest 4x4 matrix (translation set to zero)
+{
+ float quat[4];
+ fm_eulerToQuat(ax,ay,az,quat);
+ fm_quatToMatrix(quat,matrix);
+}
+
+void fm_getAABB(unsigned int vcount,const float *points,unsigned int pstride,float *bmin,float *bmax)
+{
+
+ const unsigned char *source = (const unsigned char *) points;
+
+ bmin[0] = points[0];
+ bmin[1] = points[1];
+ bmin[2] = points[2];
+
+ bmax[0] = points[0];
+ bmax[1] = points[1];
+ bmax[2] = points[2];
+
+
+ for (unsigned int i=1; i<vcount; i++)
+ {
+ source+=pstride;
+ const float *p = (const float *) source;
+
+ if ( p[0] < bmin[0] ) bmin[0] = p[0];
+ if ( p[1] < bmin[1] ) bmin[1] = p[1];
+ if ( p[2] < bmin[2] ) bmin[2] = p[2];
+
+ if ( p[0] > bmax[0] ) bmax[0] = p[0];
+ if ( p[1] > bmax[1] ) bmax[1] = p[1];
+ if ( p[2] > bmax[2] ) bmax[2] = p[2];
+
+ }
+}
+
+
+void fm_eulerToQuat(float roll,float pitch,float yaw,float *quat) // convert euler angles to quaternion.
+{
+ roll *= 0.5f;
+ pitch *= 0.5f;
+ yaw *= 0.5f;
+
+ float cr = cosf(roll);
+ float cp = cosf(pitch);
+ float cy = cosf(yaw);
+
+ float sr = sinf(roll);
+ float sp = sinf(pitch);
+ float sy = sinf(yaw);
+
+ float cpcy = cp * cy;
+ float spsy = sp * sy;
+ float spcy = sp * cy;
+ float cpsy = cp * sy;
+
+ quat[0] = ( sr * cpcy - cr * spsy);
+ quat[1] = ( cr * spcy + sr * cpsy);
+ quat[2] = ( cr * cpsy - sr * spcy);
+ quat[3] = cr * cpcy + sr * spsy;
+}
+
+void fm_quatToMatrix(const float *quat,float *matrix) // convert quaterinion rotation to matrix, zeros out the translation component.
+{
+
+ float xx = quat[0]*quat[0];
+ float yy = quat[1]*quat[1];
+ float zz = quat[2]*quat[2];
+ float xy = quat[0]*quat[1];
+ float xz = quat[0]*quat[2];
+ float yz = quat[1]*quat[2];
+ float wx = quat[3]*quat[0];
+ float wy = quat[3]*quat[1];
+ float wz = quat[3]*quat[2];
+
+ matrix[0*4+0] = 1 - 2 * ( yy + zz );
+ matrix[1*4+0] = 2 * ( xy - wz );
+ matrix[2*4+0] = 2 * ( xz + wy );
+
+ matrix[0*4+1] = 2 * ( xy + wz );
+ matrix[1*4+1] = 1 - 2 * ( xx + zz );
+ matrix[2*4+1] = 2 * ( yz - wx );
+
+ matrix[0*4+2] = 2 * ( xz - wy );
+ matrix[1*4+2] = 2 * ( yz + wx );
+ matrix[2*4+2] = 1 - 2 * ( xx + yy );
+
+ matrix[3*4+0] = matrix[3*4+1] = matrix[3*4+2] = 0.0f;
+ matrix[0*4+3] = matrix[1*4+3] = matrix[2*4+3] = 0.0f;
+ matrix[3*4+3] = 1.0f;
+
+}
+
+
+void fm_quatRotate(const float *quat,const float *v,float *r) // rotate a vector directly by a quaternion.
+{
+ float left[4];
+
+ left[0] = quat[3]*v[0] + quat[1]*v[2] - v[1]*quat[2];
+ left[1] = quat[3]*v[1] + quat[2]*v[0] - v[2]*quat[0];
+ left[2] = quat[3]*v[2] + quat[0]*v[1] - v[0]*quat[1];
+ left[3] = - quat[0]*v[0] - quat[1]*v[1] - quat[2]*v[2];
+
+ r[0] = (left[3]*-quat[0]) + (quat[3]*left[0]) + (left[1]*-quat[2]) - (-quat[1]*left[2]);
+ r[1] = (left[3]*-quat[1]) + (quat[3]*left[1]) + (left[2]*-quat[0]) - (-quat[2]*left[0]);
+ r[2] = (left[3]*-quat[2]) + (quat[3]*left[2]) + (left[0]*-quat[1]) - (-quat[0]*left[1]);
+
+}
+
+
+void fm_getTranslation(const float *matrix,float *t)
+{
+ t[0] = matrix[3*4+0];
+ t[1] = matrix[3*4+1];
+ t[2] = matrix[3*4+2];
+}
+
+void fm_matrixToQuat(const float *matrix,float *quat) // convert the 3x3 portion of a 4x4 matrix into a quaterion as x,y,z,w
+{
+
+ float tr = matrix[0*4+0] + matrix[1*4+1] + matrix[2*4+2];
+
+ // check the diagonal
+
+ if (tr > 0.0f )
+ {
+ float s = (float) sqrt ( (double) (tr + 1.0f) );
+ quat[3] = s * 0.5f;
+ s = 0.5f / s;
+ quat[0] = (matrix[1*4+2] - matrix[2*4+1]) * s;
+ quat[1] = (matrix[2*4+0] - matrix[0*4+2]) * s;
+ quat[2] = (matrix[0*4+1] - matrix[1*4+0]) * s;
+
+ }
+ else
+ {
+ // diagonal is negative
+ int nxt[3] = {1, 2, 0};
+ float qa[4];
+
+ int i = 0;
+
+ if (matrix[1*4+1] > matrix[0*4+0]) i = 1;
+ if (matrix[2*4+2] > matrix[i*4+i]) i = 2;
+
+ int j = nxt[i];
+ int k = nxt[j];
+
+ float s = sqrtf ( ((matrix[i*4+i] - (matrix[j*4+j] + matrix[k*4+k])) + 1.0f) );
+
+ qa[i] = s * 0.5f;
+
+ if (s != 0.0f ) s = 0.5f / s;
+
+ qa[3] = (matrix[j*4+k] - matrix[k*4+j]) * s;
+ qa[j] = (matrix[i*4+j] + matrix[j*4+i]) * s;
+ qa[k] = (matrix[i*4+k] + matrix[k*4+i]) * s;
+
+ quat[0] = qa[0];
+ quat[1] = qa[1];
+ quat[2] = qa[2];
+ quat[3] = qa[3];
+ }
+
+
+}
+
+
+float fm_sphereVolume(float radius) // return's the volume of a sphere of this radius (4/3 PI * R cubed )
+{
+ return (4.0f / 3.0f ) * FM_PI * radius * radius * radius;
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/float_math.h b/tests/bullet/Extras/ConvexDecomposition/float_math.h
new file mode 100644
index 00000000..d6046d3b
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/float_math.h
@@ -0,0 +1,72 @@
+#ifndef FLOAT_MATH_H
+
+#define FLOAT_MATH_H
+
+#ifdef _WIN32
+ #pragma warning(disable : 4324) // disable padding warning
+ #pragma warning(disable : 4244) // disable padding warning
+ #pragma warning(disable : 4267) // possible loss of data
+ #pragma warning(disable:4530) // Disable the exception disable but used in MSCV Stl warning.
+ #pragma warning(disable:4996) //Turn off warnings about deprecated C routines
+ #pragma warning(disable:4786) // Disable the "debug name too long" warning
+#endif
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+// a set of routines that last you do common 3d math
+// operations without any vector, matrix, or quaternion
+// classes or templates.
+//
+// a vector (or point) is a 'float *' to 3 floating point numbers.
+// a matrix is a 'float *' to an array of 16 floating point numbers representing a 4x4 transformation matrix compatible with D3D or OGL
+// a quaternion is a 'float *' to 4 floats representing a quaternion x,y,z,w
+
+const float FM_PI = 3.141592654f;
+const float FM_DEG_TO_RAD = ((2.0f * FM_PI) / 360.0f);
+const float FM_RAD_TO_DEG = (360.0f / (2.0f * FM_PI));
+
+void fm_identity(float *matrix); // set 4x4 matrix to identity.
+void fm_inverseRT(const float *matrix,const float *pos,float *t); // inverse rotate translate the point.
+void fm_eulerMatrix(float ax,float ay,float az,float *matrix); // convert euler (in radians) to a dest 4x4 matrix (translation set to zero)
+void fm_getAABB(unsigned int vcount,const float *points,unsigned int pstride,float *bmin,float *bmax);
+void fm_eulerToQuat(float roll,float pitch,float yaw,float *quat); // convert euler angles to quaternion.
+void fm_quatToMatrix(const float *quat,float *matrix); // convert quaterinion rotation to matrix, translation set to zero.
+void fm_quatRotate(const float *quat,const float *v,float *r); // rotate a vector directly by a quaternion.
+void fm_getTranslation(const float *matrix,float *t);
+void fm_matrixToQuat(const float *matrix,float *quat); // convert the 3x3 portion of a 4x4 matrix into a quaterion as x,y,z,w
+float fm_sphereVolume(float radius); // return's the volume of a sphere of this radius (4/3 PI * R cubed )
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/meshvolume.cpp b/tests/bullet/Extras/ConvexDecomposition/meshvolume.cpp
new file mode 100644
index 00000000..b9dfa174
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/meshvolume.cpp
@@ -0,0 +1,128 @@
+#include "float_math.h"
+#include "meshvolume.h"
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+inline float det(const float *p1,const float *p2,const float *p3)
+{
+ return p1[0]*p2[1]*p3[2] + p2[0]*p3[1]*p1[2] + p3[0]*p1[1]*p2[2] -p1[0]*p3[1]*p2[2] - p2[0]*p1[1]*p3[2] - p3[0]*p2[1]*p1[2];
+}
+
+float computeMeshVolume(const float *vertices,unsigned int tcount,const unsigned int *indices)
+{
+ float volume = 0;
+
+ for (unsigned int i=0; i<tcount; i++,indices+=3)
+ {
+
+ const float *p1 = &vertices[ indices[0]*3 ];
+ const float *p2 = &vertices[ indices[1]*3 ];
+ const float *p3 = &vertices[ indices[2]*3 ];
+
+ volume+=det(p1,p2,p3); // compute the volume of the tetrahedran relative to the origin.
+ }
+
+ volume*=(1.0f/6.0f);
+ if ( volume < 0 )
+ volume*=-1;
+ return volume;
+}
+
+
+inline void CrossProduct(const float *a,const float *b,float *cross)
+{
+ cross[0] = a[1]*b[2] - a[2]*b[1];
+ cross[1] = a[2]*b[0] - a[0]*b[2];
+ cross[2] = a[0]*b[1] - a[1]*b[0];
+}
+
+inline float DotProduct(const float *a,const float *b)
+{
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
+}
+
+inline float tetVolume(const float *p0,const float *p1,const float *p2,const float *p3)
+{
+ float a[3];
+ float b[3];
+ float c[3];
+
+ a[0] = p1[0] - p0[0];
+ a[1] = p1[1] - p0[1];
+ a[2] = p1[2] - p0[2];
+
+ b[0] = p2[0] - p0[0];
+ b[1] = p2[1] - p0[1];
+ b[2] = p2[2] - p0[2];
+
+ c[0] = p3[0] - p0[0];
+ c[1] = p3[1] - p0[1];
+ c[2] = p3[2] - p0[2];
+
+ float cross[3];
+
+ CrossProduct( b, c, cross );
+
+ float volume = DotProduct( a, cross );
+
+ if ( volume < 0 )
+ return -volume;
+
+ return volume;
+}
+
+inline float det(const float *p0,const float *p1,const float *p2,const float *p3)
+{
+ return p1[0]*p2[1]*p3[2] + p2[0]*p3[1]*p1[2] + p3[0]*p1[1]*p2[2] -p1[0]*p3[1]*p2[2] - p2[0]*p1[1]*p3[2] - p3[0]*p2[1]*p1[2];
+}
+
+float computeMeshVolume2(const float *vertices,unsigned int tcount,const unsigned int *indices)
+{
+ float volume = 0;
+
+ const float *p0 = vertices;
+ for (unsigned int i=0; i<tcount; i++,indices+=3)
+ {
+
+ const float *p1 = &vertices[ indices[0]*3 ];
+ const float *p2 = &vertices[ indices[1]*3 ];
+ const float *p3 = &vertices[ indices[2]*3 ];
+
+ volume+=tetVolume(p0,p1,p2,p3); // compute the volume of the tetrahdren relative to the root vertice
+ }
+
+ return volume * (1.0f / 6.0f );
+}
+
diff --git a/tests/bullet/Extras/ConvexDecomposition/meshvolume.h b/tests/bullet/Extras/ConvexDecomposition/meshvolume.h
new file mode 100644
index 00000000..4fc62c81
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/meshvolume.h
@@ -0,0 +1,45 @@
+#ifndef MESH_VOLUME_H
+
+#define MESH_VOLUME_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+
+float computeMeshVolume(const float *vertices,unsigned int tcount,const unsigned int *indices);
+float computeMeshVolume2(const float *vertices,unsigned int tcount,const unsigned int *indices);
+
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/planetri.cpp b/tests/bullet/Extras/ConvexDecomposition/planetri.cpp
new file mode 100644
index 00000000..c6317221
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/planetri.cpp
@@ -0,0 +1,238 @@
+#include "float_math.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#include "planetri.h"
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+static inline float DistToPt(const float *p,const float *plane)
+{
+ float x = p[0];
+ float y = p[1];
+ float z = p[2];
+ float d = x*plane[0] + y*plane[1] + z*plane[2] + plane[3];
+ return d;
+}
+
+
+static PlaneTriResult getSidePlane(const float *p,const float *plane,float epsilon)
+{
+
+ float d = DistToPt(p,plane);
+
+ if ( (d+epsilon) > 0 )
+ return PTR_FRONT; // it is 'in front' within the provided epsilon value.
+
+ return PTR_BACK;
+}
+
+static void add(const float *p,float *dest,unsigned int tstride,unsigned int &pcount)
+{
+ char *d = (char *) dest;
+ d = d + pcount*tstride;
+ dest = (float *) d;
+ dest[0] = p[0];
+ dest[1] = p[1];
+ dest[2] = p[2];
+ pcount++;
+ assert( pcount <= 4 );
+}
+
+
+// assumes that the points are on opposite sides of the plane!
+static void intersect(const float *p1,const float *p2,float *split,const float *plane)
+{
+
+ float dp1 = DistToPt(p1,plane);
+
+ float dir[3];
+
+ dir[0] = p2[0] - p1[0];
+ dir[1] = p2[1] - p1[1];
+ dir[2] = p2[2] - p1[2];
+
+ float dot1 = dir[0]*plane[0] + dir[1]*plane[1] + dir[2]*plane[2];
+ float dot2 = dp1 - plane[3];
+
+ float t = -(plane[3] + dot2 ) / dot1;
+
+ split[0] = (dir[0]*t)+p1[0];
+ split[1] = (dir[1]*t)+p1[1];
+ split[2] = (dir[2]*t)+p1[2];
+
+}
+
+PlaneTriResult planeTriIntersection(const float *plane, // the plane equation in Ax+By+Cz+D format
+ const float *triangle, // the source triangle.
+ unsigned int tstride, // stride in bytes of the input and output triangles
+ float epsilon, // the co-planer epsilon value.
+ float *front, // the triangle in front of the
+ unsigned int &fcount, // number of vertices in the 'front' triangle
+ float *back, // the triangle in back of the plane
+ unsigned int &bcount) // the number of vertices in the 'back' triangle.
+{
+ fcount = 0;
+ bcount = 0;
+
+ const char *tsource = (const char *) triangle;
+
+ // get the three vertices of the triangle.
+ const float *p1 = (const float *) (tsource);
+ const float *p2 = (const float *) (tsource+tstride);
+ const float *p3 = (const float *) (tsource+tstride*2);
+
+
+ PlaneTriResult r1 = getSidePlane(p1,plane,epsilon); // compute the side of the plane each vertex is on
+ PlaneTriResult r2 = getSidePlane(p2,plane,epsilon);
+ PlaneTriResult r3 = getSidePlane(p3,plane,epsilon);
+
+ if ( r1 == r2 && r1 == r3 ) // if all three vertices are on the same side of the plane.
+ {
+ if ( r1 == PTR_FRONT ) // if all three are in front of the plane, then copy to the 'front' output triangle.
+ {
+ add(p1,front,tstride,fcount);
+ add(p2,front,tstride,fcount);
+ add(p3,front,tstride,fcount);
+ }
+ else
+ {
+ add(p1,back,tstride,bcount); // if all three are in 'abck' then copy to the 'back' output triangle.
+ add(p2,back,tstride,bcount);
+ add(p3,back,tstride,bcount);
+ }
+ return r1; // if all three points are on the same side of the plane return result
+ }
+
+ // ok.. we need to split the triangle at the plane.
+
+ // First test ray segment P1 to P2
+ if ( r1 == r2 ) // if these are both on the same side...
+ {
+ if ( r1 == PTR_FRONT )
+ {
+ add( p1, front, tstride, fcount );
+ add( p2, front, tstride, fcount );
+ }
+ else
+ {
+ add( p1, back, tstride, bcount );
+ add( p2, back, tstride, bcount );
+ }
+ }
+ else
+ {
+ float split[3]; // split the point
+ intersect(p1,p2,split,plane);
+
+ if ( r1 == PTR_FRONT )
+ {
+
+ add(p1, front, tstride, fcount );
+ add(split, front, tstride, fcount );
+
+ add(split, back, tstride, bcount );
+ add(p2, back, tstride, bcount );
+
+ }
+ else
+ {
+ add(p1, back, tstride, bcount );
+ add(split, back, tstride, bcount );
+
+ add(split, front, tstride, fcount );
+ add(p2, front, tstride, fcount );
+ }
+
+ }
+
+ // Next test ray segment P2 to P3
+ if ( r2 == r3 ) // if these are both on the same side...
+ {
+ if ( r3 == PTR_FRONT )
+ {
+ add( p3, front, tstride, fcount );
+ }
+ else
+ {
+ add( p3, back, tstride, bcount );
+ }
+ }
+ else
+ {
+ float split[3]; // split the point
+ intersect(p2,p3,split,plane);
+
+ if ( r3 == PTR_FRONT )
+ {
+ add(split, front, tstride, fcount );
+ add(split, back, tstride, bcount );
+
+ add(p3, front, tstride, fcount );
+ }
+ else
+ {
+ add(split, front, tstride, fcount );
+ add(split, back, tstride, bcount );
+
+ add(p3, back, tstride, bcount );
+ }
+ }
+
+ // Next test ray segment P3 to P1
+ if ( r3 != r1 ) // if these are both on the same side...
+ {
+ float split[3]; // split the point
+
+ intersect(p3,p1,split,plane);
+
+ if ( r1 == PTR_FRONT )
+ {
+ add(split, front, tstride, fcount );
+ add(split, back, tstride, bcount );
+ }
+ else
+ {
+ add(split, front, tstride, fcount );
+ add(split, back, tstride, bcount );
+ }
+ }
+
+
+
+ return PTR_SPLIT;
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/planetri.h b/tests/bullet/Extras/ConvexDecomposition/planetri.h
new file mode 100644
index 00000000..780ac854
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/planetri.h
@@ -0,0 +1,58 @@
+#ifndef PLANE_TRI_H
+
+#define PLANE_TRI_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+
+enum PlaneTriResult
+{
+ PTR_FRONT,
+ PTR_BACK,
+ PTR_SPLIT
+};
+
+PlaneTriResult planeTriIntersection(const float *plane, // the plane equation in Ax+By+Cz+D format
+ const float *triangle, // the source position triangle.
+ unsigned int tstride, // stride in bytes between vertices of the triangle.
+ float epsilon, // the co-planer epsilon value.
+ float *front, // the triangle in front of the
+ unsigned int &fcount, // number of vertices in the 'front' triangle.
+ float *back, // the triangle in back of the plane
+ unsigned int &bcount); // the number of vertices in the 'back' triangle.
+
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/raytri.cpp b/tests/bullet/Extras/ConvexDecomposition/raytri.cpp
new file mode 100644
index 00000000..83b076a2
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/raytri.cpp
@@ -0,0 +1,134 @@
+#include "float_math.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <math.h>
+
+#include "raytri.h"
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+/* a = b - c */
+#define vector(a,b,c) \
+ (a)[0] = (b)[0] - (c)[0]; \
+ (a)[1] = (b)[1] - (c)[1]; \
+ (a)[2] = (b)[2] - (c)[2];
+
+
+
+#define innerProduct(v,q) \
+ ((v)[0] * (q)[0] + \
+ (v)[1] * (q)[1] + \
+ (v)[2] * (q)[2])
+
+#define crossProduct(a,b,c) \
+ (a)[0] = (b)[1] * (c)[2] - (c)[1] * (b)[2]; \
+ (a)[1] = (b)[2] * (c)[0] - (c)[2] * (b)[0]; \
+ (a)[2] = (b)[0] * (c)[1] - (c)[0] * (b)[1];
+
+bool rayIntersectsTriangle(const float *p,const float *d,const float *v0,const float *v1,const float *v2,float &t)
+{
+
+ float e1[3],e2[3],h[3],s[3],q[3];
+ float a,f,u,v;
+
+ vector(e1,v1,v0);
+ vector(e2,v2,v0);
+ crossProduct(h,d,e2);
+ a = innerProduct(e1,h);
+
+ if (a > -0.00001 && a < 0.00001)
+ return(false);
+
+ f = 1/a;
+ vector(s,p,v0);
+ u = f * (innerProduct(s,h));
+
+ if (u < 0.0 || u > 1.0)
+ return(false);
+
+ crossProduct(q,s,e1);
+ v = f * innerProduct(d,q);
+ if (v < 0.0 || u + v > 1.0)
+ return(false);
+ // at this stage we can compute t to find out where
+ // the intersection point is on the line
+ t = f * innerProduct(e2,q);
+ if (t > 0) // ray intersection
+ return(true);
+ else // this means that there is a line intersection
+ // but not a ray intersection
+ return (false);
+}
+
+
+bool lineIntersectsTriangle(const float *rayStart,const float *rayEnd,const float *p1,const float *p2,const float *p3,float *sect)
+{
+ float dir[3];
+
+ dir[0] = rayEnd[0] - rayStart[0];
+ dir[1] = rayEnd[1] - rayStart[1];
+ dir[2] = rayEnd[2] - rayStart[2];
+
+ float d = sqrtf(dir[0]*dir[0] + dir[1]*dir[1] + dir[2]*dir[2]);
+ float r = 1.0f / d;
+
+ dir[0]*=r;
+ dir[1]*=r;
+ dir[2]*=r;
+
+
+ float t;
+
+ bool ret = rayIntersectsTriangle(rayStart, dir, p1, p2, p3, t );
+
+ if ( ret )
+ {
+ if ( t > d )
+ {
+ sect[0] = rayStart[0] + dir[0]*t;
+ sect[1] = rayStart[1] + dir[1]*t;
+ sect[2] = rayStart[2] + dir[2]*t;
+ }
+ else
+ {
+ ret = false;
+ }
+ }
+
+ return ret;
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/raytri.h b/tests/bullet/Extras/ConvexDecomposition/raytri.h
new file mode 100644
index 00000000..76370c6d
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/raytri.h
@@ -0,0 +1,45 @@
+#ifndef RAY_TRI_H
+
+#define RAY_TRI_H
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+
+// returns true if the ray intersects the triangle.
+bool lineIntersectsTriangle(const float *rayStart,const float *rayEnd,const float *p1,const float *p2,const float *p3,float *sect);
+bool rayIntersectsTriangle(const float *p,const float *d,const float *v0,const float *v1,const float *v2,float &t);
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/splitplane.cpp b/tests/bullet/Extras/ConvexDecomposition/splitplane.cpp
new file mode 100644
index 00000000..2ae408e6
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/splitplane.cpp
@@ -0,0 +1,306 @@
+#include "float_math.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <float.h>
+#include <math.h>
+
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+#include "splitplane.h"
+#include "ConvexDecomposition.h"
+#include "cd_vector.h"
+#include "cd_hull.h"
+#include "cd_wavefront.h"
+#include "bestfit.h"
+#include "planetri.h"
+#include "vlookup.h"
+#include "meshvolume.h"
+
+namespace ConvexDecomposition
+{
+
+static void computePlane(const float *A,const float *B,const float *C,float *plane)
+{
+
+ float vx = (B[0] - C[0]);
+ float vy = (B[1] - C[1]);
+ float vz = (B[2] - C[2]);
+
+ float wx = (A[0] - B[0]);
+ float wy = (A[1] - B[1]);
+ float wz = (A[2] - B[2]);
+
+ float vw_x = vy * wz - vz * wy;
+ float vw_y = vz * wx - vx * wz;
+ float vw_z = vx * wy - vy * wx;
+
+ float mag = sqrtf((vw_x * vw_x) + (vw_y * vw_y) + (vw_z * vw_z));
+
+ if ( mag < 0.000001f )
+ {
+ mag = 0;
+ }
+ else
+ {
+ mag = 1.0f/mag;
+ }
+
+ float x = vw_x * mag;
+ float y = vw_y * mag;
+ float z = vw_z * mag;
+
+
+ float D = 0.0f - ((x*A[0])+(y*A[1])+(z*A[2]));
+
+ plane[0] = x;
+ plane[1] = y;
+ plane[2] = z;
+ plane[3] = D;
+
+}
+
+class Rect3d
+{
+public:
+ Rect3d(void) { };
+
+ Rect3d(const float *bmin,const float *bmax)
+ {
+
+ mMin[0] = bmin[0];
+ mMin[1] = bmin[1];
+ mMin[2] = bmin[2];
+
+ mMax[0] = bmax[0];
+ mMax[1] = bmax[1];
+ mMax[2] = bmax[2];
+
+ }
+
+ void SetMin(const float *bmin)
+ {
+ mMin[0] = bmin[0];
+ mMin[1] = bmin[1];
+ mMin[2] = bmin[2];
+ }
+
+ void SetMax(const float *bmax)
+ {
+ mMax[0] = bmax[0];
+ mMax[1] = bmax[1];
+ mMax[2] = bmax[2];
+ }
+
+ void SetMin(float x,float y,float z)
+ {
+ mMin[0] = x;
+ mMin[1] = y;
+ mMin[2] = z;
+ }
+
+ void SetMax(float x,float y,float z)
+ {
+ mMax[0] = x;
+ mMax[1] = y;
+ mMax[2] = z;
+ }
+
+ float mMin[3];
+ float mMax[3];
+};
+
+void splitRect(unsigned int axis,
+ const Rect3d &source,
+ Rect3d &b1,
+ Rect3d &b2,
+ const float *midpoint)
+{
+ switch ( axis )
+ {
+ case 0:
+ b1.SetMin(source.mMin);
+ b1.SetMax( midpoint[0], source.mMax[1], source.mMax[2] );
+
+ b2.SetMin( midpoint[0], source.mMin[1], source.mMin[2] );
+ b2.SetMax(source.mMax);
+
+ break;
+ case 1:
+ b1.SetMin(source.mMin);
+ b1.SetMax( source.mMax[0], midpoint[1], source.mMax[2] );
+
+ b2.SetMin( source.mMin[0], midpoint[1], source.mMin[2] );
+ b2.SetMax(source.mMax);
+
+ break;
+ case 2:
+ b1.SetMin(source.mMin);
+ b1.SetMax( source.mMax[0], source.mMax[1], midpoint[2] );
+
+ b2.SetMin( source.mMin[0], source.mMin[1], midpoint[2] );
+ b2.SetMax(source.mMax);
+
+ break;
+ }
+}
+
+bool computeSplitPlane(unsigned int vcount,
+ const float *vertices,
+ unsigned int tcount,
+ const unsigned int *indices,
+ ConvexDecompInterface *callback,
+ float *plane)
+{
+ float bmin[3] = { 1e9, 1e9, 1e9 };
+ float bmax[3] = { -1e9, -1e9, -1e9 };
+
+ for (unsigned int i=0; i<vcount; i++)
+ {
+ const float *p = &vertices[i*3];
+
+ if ( p[0] < bmin[0] ) bmin[0] = p[0];
+ if ( p[1] < bmin[1] ) bmin[1] = p[1];
+ if ( p[2] < bmin[2] ) bmin[2] = p[2];
+
+ if ( p[0] > bmax[0] ) bmax[0] = p[0];
+ if ( p[1] > bmax[1] ) bmax[1] = p[1];
+ if ( p[2] > bmax[2] ) bmax[2] = p[2];
+
+ }
+
+ float dx = bmax[0] - bmin[0];
+ float dy = bmax[1] - bmin[1];
+ float dz = bmax[2] - bmin[2];
+
+
+ float laxis = dx;
+
+ unsigned int axis = 0;
+
+ if ( dy > dx )
+ {
+ axis = 1;
+ laxis = dy;
+ }
+
+ if ( dz > dx && dz > dy )
+ {
+ axis = 2;
+ laxis = dz;
+ }
+
+ float p1[3];
+ float p2[3];
+ float p3[3];
+
+ p3[0] = p2[0] = p1[0] = bmin[0] + dx*0.5f;
+ p3[1] = p2[1] = p1[1] = bmin[1] + dy*0.5f;
+ p3[2] = p2[2] = p1[2] = bmin[2] + dz*0.5f;
+
+ Rect3d b(bmin,bmax);
+
+ Rect3d b1,b2;
+
+ splitRect(axis,b,b1,b2,p1);
+
+
+// callback->ConvexDebugBound(b1.mMin,b1.mMax,0x00FF00);
+// callback->ConvexDebugBound(b2.mMin,b2.mMax,0xFFFF00);
+
+ switch ( axis )
+ {
+ case 0:
+ p2[1] = bmin[1];
+ p2[2] = bmin[2];
+
+ if ( dz > dy )
+ {
+ p3[1] = bmax[1];
+ p3[2] = bmin[2];
+ }
+ else
+ {
+ p3[1] = bmin[1];
+ p3[2] = bmax[2];
+ }
+
+ break;
+ case 1:
+ p2[0] = bmin[0];
+ p2[2] = bmin[2];
+
+ if ( dx > dz )
+ {
+ p3[0] = bmax[0];
+ p3[2] = bmin[2];
+ }
+ else
+ {
+ p3[0] = bmin[0];
+ p3[2] = bmax[2];
+ }
+
+ break;
+ case 2:
+ p2[0] = bmin[0];
+ p2[1] = bmin[1];
+
+ if ( dx > dy )
+ {
+ p3[0] = bmax[0];
+ p3[1] = bmin[1];
+ }
+ else
+ {
+ p3[0] = bmin[0];
+ p3[1] = bmax[1];
+ }
+
+ break;
+ }
+
+// callback->ConvexDebugTri(p1,p2,p3,0xFF0000);
+
+ computePlane(p1,p2,p3,plane);
+
+ return true;
+
+}
+
+
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/splitplane.h b/tests/bullet/Extras/ConvexDecomposition/splitplane.h
new file mode 100644
index 00000000..26fe2e33
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/splitplane.h
@@ -0,0 +1,59 @@
+#ifndef SPLIT_PLANE_H
+
+#define SPLIT_PLANE_H
+
+//** Computes an 'optimal' split plane for the supplied mesh.
+//** needs much improvement since it currently just splits along
+//** the longest side of the AABB.
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+
+namespace ConvexDecomposition
+{
+
+class ConvexDecompInterface;
+
+bool computeSplitPlane(unsigned int vcount,
+ const float *vertices,
+ unsigned int tcount,
+ const unsigned int *indices,
+ ConvexDecompInterface *callback,
+ float *plane);
+
+
+}
+
+#endif
diff --git a/tests/bullet/Extras/ConvexDecomposition/vlookup.cpp b/tests/bullet/Extras/ConvexDecomposition/vlookup.cpp
new file mode 100644
index 00000000..3b9e928c
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/vlookup.cpp
@@ -0,0 +1,326 @@
+#include "float_math.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+#pragma warning(disable:4786)
+
+#include <vector>
+#include <map>
+#include <set>
+
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+// CodeSnippet provided by John W. Ratcliff
+// on March 23, 2006.
+//
+// mailto: jratcliff@infiniplex.net
+//
+// Personal website: http://jratcliffscarab.blogspot.com
+// Coding Website: http://codesuppository.blogspot.com
+// FundRaising Blog: http://amillionpixels.blogspot.com
+// Fundraising site: http://www.amillionpixels.us
+// New Temple Site: http://newtemple.blogspot.com
+//
+// This snippet shows how to 'hide' the complexity of
+// the STL by wrapping some useful piece of functionality
+// around a handful of discrete API calls.
+//
+// This API allows you to create an indexed triangle list
+// from a collection of raw input triangles. Internally
+// it uses an STL set to build the lookup table very rapidly.
+//
+// Here is how you would use it to build an indexed triangle
+// list from a raw list of triangles.
+//
+// (1) create a 'VertexLookup' interface by calling
+//
+// VertexLook vl = Vl_createVertexLookup();
+//
+// (2) For each vertice in each triangle call:
+//
+// unsigned int i1 = Vl_getIndex(vl,p1);
+// unsigned int i2 = Vl_getIndex(vl,p2);
+// unsigned int i3 = Vl_getIndex(vl,p3);
+//
+// save the 3 indices into your triangle list array.
+//
+// (3) Get the vertex array by calling:
+//
+// const float *vertices = Vl_getVertices(vl);
+//
+// (4) Get the number of vertices so you can copy them into
+// your own buffer.
+// unsigned int vcount = Vl_getVcount(vl);
+//
+// (5) Release the VertexLookup interface when you are done with it.
+// Vl_releaseVertexLookup(vl);
+//
+// Teaches the following lessons:
+//
+// How to wrap the complexity of STL and C++ classes around a
+// simple API interface.
+//
+// How to use an STL set and custom comparator operator for
+// a complex data type.
+//
+// How to create a template class.
+//
+// How to achieve significant performance improvements by
+// taking advantage of built in STL containers in just
+// a few lines of code.
+//
+// You could easily modify this code to support other vertex
+// formats with any number of interpolants.
+
+
+
+
+#include "vlookup.h"
+
+namespace Vlookup
+{
+
+class VertexPosition
+{
+public:
+ VertexPosition(void) { };
+ VertexPosition(const float *p)
+ {
+ mPos[0] = p[0];
+ mPos[1] = p[1];
+ mPos[2] = p[2];
+ };
+
+ void Set(int index,const float *pos)
+ {
+ const float * p = &pos[index*3];
+
+ mPos[0] = p[0];
+ mPos[1] = p[1];
+ mPos[2] = p[2];
+
+ };
+
+ float GetX(void) const { return mPos[0]; };
+ float GetY(void) const { return mPos[1]; };
+ float GetZ(void) const { return mPos[2]; };
+
+ float mPos[3];
+};
+
+typedef std::vector< VertexPosition > VertexVector;
+
+struct Tracker
+{
+ VertexPosition mFind; // vertice to locate.
+ VertexVector *mList;
+
+ Tracker()
+ {
+ mList = 0;
+ }
+
+ void SetSearch(const VertexPosition& match,VertexVector *list)
+ {
+ mFind = match;
+ mList = list;
+ };
+};
+
+struct VertexID
+{
+ int mID;
+ Tracker* mTracker;
+
+ VertexID(int ID, Tracker* Tracker)
+ {
+ mID = ID;
+ mTracker = Tracker;
+ }
+};
+
+class VertexLess
+{
+public:
+
+ bool operator()(VertexID v1,VertexID v2) const;
+
+private:
+ const VertexPosition& Get(VertexID index) const
+ {
+ if ( index.mID == -1 ) return index.mTracker->mFind;
+ VertexVector &vlist = *index.mTracker->mList;
+ return vlist[index.mID];
+ }
+};
+
+template <class Type> class VertexPool
+{
+public:
+ typedef std::set<VertexID, VertexLess > VertexSet;
+ typedef std::vector< Type > VertexVector;
+
+ int getVertex(const Type& vtx)
+ {
+ mTracker.SetSearch(vtx,&mVtxs);
+ VertexSet::iterator found;
+ found = mVertSet.find( VertexID(-1,&mTracker) );
+ if ( found != mVertSet.end() )
+ {
+ return found->mID;
+ }
+ int idx = (int)mVtxs.size();
+ mVtxs.push_back( vtx );
+ mVertSet.insert( VertexID(idx,&mTracker) );
+ return idx;
+ };
+
+
+ const float * GetPos(int idx) const
+ {
+ return mVtxs[idx].mPos;
+ }
+
+ const Type& Get(int idx) const
+ {
+ return mVtxs[idx];
+ };
+
+ unsigned int GetSize(void) const
+ {
+ return mVtxs.size();
+ };
+
+ void Clear(int reservesize) // clear the vertice pool.
+ {
+ mVertSet.clear();
+ mVtxs.clear();
+ mVtxs.reserve(reservesize);
+ };
+
+ const VertexVector& GetVertexList(void) const { return mVtxs; };
+
+ void Set(const Type& vtx)
+ {
+ mVtxs.push_back(vtx);
+ }
+
+ unsigned int GetVertexCount(void) const
+ {
+ return mVtxs.size();
+ };
+
+
+ Type * getBuffer(void)
+ {
+ return &mVtxs[0];
+ };
+
+private:
+ VertexSet mVertSet; // ordered list.
+ VertexVector mVtxs; // set of vertices.
+ Tracker mTracker;
+};
+
+
+bool VertexLess::operator()(VertexID v1,VertexID v2) const
+{
+
+ const VertexPosition& a = Get(v1);
+ const VertexPosition& b = Get(v2);
+
+ int ixA = (int) (a.GetX()*10000.0f);
+ int ixB = (int) (b.GetX()*10000.0f);
+
+ if ( ixA < ixB ) return true;
+ if ( ixA > ixB ) return false;
+
+ int iyA = (int) (a.GetY()*10000.0f);
+ int iyB = (int) (b.GetY()*10000.0f);
+
+ if ( iyA < iyB ) return true;
+ if ( iyA > iyB ) return false;
+
+ int izA = (int) (a.GetZ()*10000.0f);
+ int izB = (int) (b.GetZ()*10000.0f);
+
+ if ( izA < izB ) return true;
+ if ( izA > izB ) return false;
+
+
+ return false;
+}
+
+
+
+
+}
+
+using namespace Vlookup;
+
+VertexLookup Vl_createVertexLookup(void)
+{
+ VertexLookup ret = new VertexPool< VertexPosition >;
+ return ret;
+}
+
+void Vl_releaseVertexLookup(VertexLookup vlook)
+{
+ VertexPool< VertexPosition > *vp = (VertexPool< VertexPosition > *) vlook;
+ delete vp;
+}
+
+unsigned int Vl_getIndex(VertexLookup vlook,const float *pos) // get index.
+{
+ VertexPool< VertexPosition > *vp = (VertexPool< VertexPosition > *) vlook;
+ VertexPosition p(pos);
+ return vp->getVertex(p);
+}
+
+const float * Vl_getVertices(VertexLookup vlook)
+{
+ VertexPool< VertexPosition > *vp = (VertexPool< VertexPosition > *) vlook;
+ return vp->GetPos(0);
+}
+
+
+unsigned int Vl_getVcount(VertexLookup vlook)
+{
+ VertexPool< VertexPosition > *vp = (VertexPool< VertexPosition > *) vlook;
+ return vp->GetVertexCount();
+}
diff --git a/tests/bullet/Extras/ConvexDecomposition/vlookup.h b/tests/bullet/Extras/ConvexDecomposition/vlookup.h
new file mode 100644
index 00000000..1a6e0a9e
--- /dev/null
+++ b/tests/bullet/Extras/ConvexDecomposition/vlookup.h
@@ -0,0 +1,119 @@
+#ifndef VLOOKUP_H
+
+#define VLOOKUP_H
+
+
+/*----------------------------------------------------------------------
+ Copyright (c) 2004 Open Dynamics Framework Group
+ www.physicstools.org
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided
+ that the following conditions are met:
+
+ Redistributions of source code must retain the above copyright notice, this list of conditions
+ and the following disclaimer.
+
+ Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+ Neither the name of the Open Dynamics Framework Group nor the names of its contributors may
+ be used to endorse or promote products derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-----------------------------------------------------------------------*/
+
+// http://codesuppository.blogspot.com
+//
+// mailto: jratcliff@infiniplex.net
+//
+// http://www.amillionpixels.us
+//
+
+
+// CodeSnippet provided by John W. Ratcliff
+// on March 23, 2006.
+//
+// mailto: jratcliff@infiniplex.net
+//
+// Personal website: http://jratcliffscarab.blogspot.com
+// Coding Website: http://codesuppository.blogspot.com
+// FundRaising Blog: http://amillionpixels.blogspot.com
+// Fundraising site: http://www.amillionpixels.us
+// New Temple Site: http://newtemple.blogspot.com
+//
+// This snippet shows how to 'hide' the complexity of
+// the STL by wrapping some useful piece of functionality
+// around a handful of discrete API calls.
+//
+// This API allows you to create an indexed triangle list
+// from a collection of raw input triangles. Internally
+// it uses an STL set to build the lookup table very rapidly.
+//
+// Here is how you would use it to build an indexed triangle
+// list from a raw list of triangles.
+//
+// (1) create a 'VertexLookup' interface by calling
+//
+// VertexLook vl = Vl_createVertexLookup();
+//
+// (2) For each vertice in each triangle call:
+//
+// unsigned int i1 = Vl_getIndex(vl,p1);
+// unsigned int i2 = Vl_getIndex(vl,p2);
+// unsigned int i3 = Vl_getIndex(vl,p3);
+//
+// save the 3 indices into your triangle list array.
+//
+// (3) Get the vertex array by calling:
+//
+// const float *vertices = Vl_getVertices(vl);
+//
+// (4) Get the number of vertices so you can copy them into
+// your own buffer.
+// unsigned int vcount = Vl_getVcount(vl);
+//
+// (5) Release the VertexLookup interface when you are done with it.
+// Vl_releaseVertexLookup(vl);
+//
+// Teaches the following lessons:
+//
+// How to wrap the complexity of STL and C++ classes around a
+// simple API interface.
+//
+// How to use an STL set and custom comparator operator for
+// a complex data type.
+//
+// How to create a template class.
+//
+// How to achieve significant performance improvements by
+// taking advantage of built in STL containers in just
+// a few lines of code.
+//
+// You could easily modify this code to support other vertex
+// formats with any number of interpolants.
+//
+// Hide C++ classes from the rest of your application by
+// keeping them in the CPP and wrapping them in a namespace
+// Uses an STL set to create an index table for a bunch of vertex positions
+// used typically to re-index a collection of raw triangle data.
+
+
+typedef void * VertexLookup;
+
+VertexLookup Vl_createVertexLookup(void);
+void Vl_releaseVertexLookup(VertexLookup vlook);
+
+unsigned int Vl_getIndex(VertexLookup vlook,const float *pos); // get index.
+const float * Vl_getVertices(VertexLookup vlook);
+unsigned int Vl_getVcount(VertexLookup vlook);
+
+
+#endif
diff --git a/tests/bullet/Extras/Makefile.am b/tests/bullet/Extras/Makefile.am
new file mode 100644
index 00000000..8628c394
--- /dev/null
+++ b/tests/bullet/Extras/Makefile.am
@@ -0,0 +1,78 @@
+noinst_LIBRARIES = libgimpactutils.a libconvexdecomposition.a libglui.a
+
+libglui_a_CXXFLAGS = ${CXXFLAGS} -Iglui
+libglui_a_SOURCES =\
+ glui/glui_spinner.cpp\
+ glui/glui_treepanel.cpp\
+ glui/arcball.cpp\
+ glui/glui_scrollbar.cpp\
+ glui/glui_filebrowser.cpp\
+ glui/glui_node.cpp\
+ glui/glui_edittext.cpp\
+ glui/glui_statictext.cpp\
+ glui/glui_bitmaps.cpp\
+ glui/algebra3.cpp\
+ glui/glui_string.cpp\
+ glui/glui_button.cpp\
+ glui/glui_add_controls.cpp\
+ glui/glui_control.cpp\
+ glui/glui.cpp\
+ glui/glui_listbox.cpp\
+ glui/glui_checkbox.cpp\
+ glui/glui_commandline.cpp\
+ glui/glui_textbox.cpp\
+ glui/glui_column.cpp\
+ glui/glui_mouse_iaction.cpp\
+ glui/glui_radio.cpp\
+ glui/glui_translation.cpp\
+ glui/glui_tree.cpp\
+ glui/glui_rotation.cpp\
+ glui/glui_panel.cpp\
+ glui/glui_rollout.cpp\
+ glui/glui_separator.cpp\
+ glui/glui_bitmap_img_data.cpp\
+ glui/quaternion.cpp\
+ glui/glui_window.cpp\
+ glui/glui_list.cpp\
+ glui/GL/glui.h\
+ glui/quaternion.h\
+ glui/glui_internal.h\
+ glui/glui_internal_control.h\
+ glui/arcball.h\
+ glui/algebra3.h
+
+libconvexdecomposition_a_CXXFLAGS = ${CXXFLAGS} -IConvexDecomposition/ -I../src
+libconvexdecomposition_a_SOURCES =\
+ ConvexDecomposition/concavity.cpp\
+ ConvexDecomposition/ConvexDecomposition.cpp\
+ ConvexDecomposition/vlookup.cpp\
+ ConvexDecomposition/bestfit.cpp\
+ ConvexDecomposition/ConvexBuilder.cpp\
+ ConvexDecomposition/cd_hull.cpp\
+ ConvexDecomposition/raytri.cpp\
+ ConvexDecomposition/splitplane.cpp\
+ ConvexDecomposition/float_math.cpp\
+ ConvexDecomposition/planetri.cpp\
+ ConvexDecomposition/cd_wavefront.cpp\
+ ConvexDecomposition/bestfitobb.cpp\
+ ConvexDecomposition/meshvolume.cpp\
+ ConvexDecomposition/fitsphere.cpp\
+ ConvexDecomposition/fitsphere.h\
+ ConvexDecomposition/vlookup.h\
+ ConvexDecomposition/concavity.h\
+ ConvexDecomposition/ConvexDecomposition.h\
+ ConvexDecomposition/bestfit.h\
+ ConvexDecomposition/cd_vector.h\
+ ConvexDecomposition/ConvexBuilder.h\
+ ConvexDecomposition/cd_hull.h\
+ ConvexDecomposition/raytri.h\
+ ConvexDecomposition/splitplane.h\
+ ConvexDecomposition/float_math.h\
+ ConvexDecomposition/planetri.h\
+ ConvexDecomposition/cd_wavefront.h\
+ ConvexDecomposition/bestfitobb.h\
+ ConvexDecomposition/meshvolume.h
+
+libgimpactutils_a_CXXFLAGS = ${CXXFLAGS} -I../src -IGIMPACTUtils -IConvexDecomposition
+libgimpactutils_a_SOURCES = GIMPACTUtils/btGImpactConvexDecompositionShape.cpp GIMPACTUtils/btGImpactConvexDecompositionShape.h
+
diff --git a/tests/bullet/Extras/Makefile.in b/tests/bullet/Extras/Makefile.in
new file mode 100644
index 00000000..ac702c85
--- /dev/null
+++ b/tests/bullet/Extras/Makefile.in
@@ -0,0 +1,1287 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = Extras
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+libconvexdecomposition_a_AR = $(AR) $(ARFLAGS)
+libconvexdecomposition_a_LIBADD =
+am_libconvexdecomposition_a_OBJECTS = \
+ libconvexdecomposition_a-concavity.$(OBJEXT) \
+ libconvexdecomposition_a-ConvexDecomposition.$(OBJEXT) \
+ libconvexdecomposition_a-vlookup.$(OBJEXT) \
+ libconvexdecomposition_a-bestfit.$(OBJEXT) \
+ libconvexdecomposition_a-ConvexBuilder.$(OBJEXT) \
+ libconvexdecomposition_a-cd_hull.$(OBJEXT) \
+ libconvexdecomposition_a-raytri.$(OBJEXT) \
+ libconvexdecomposition_a-splitplane.$(OBJEXT) \
+ libconvexdecomposition_a-float_math.$(OBJEXT) \
+ libconvexdecomposition_a-planetri.$(OBJEXT) \
+ libconvexdecomposition_a-cd_wavefront.$(OBJEXT) \
+ libconvexdecomposition_a-bestfitobb.$(OBJEXT) \
+ libconvexdecomposition_a-meshvolume.$(OBJEXT) \
+ libconvexdecomposition_a-fitsphere.$(OBJEXT)
+libconvexdecomposition_a_OBJECTS = \
+ $(am_libconvexdecomposition_a_OBJECTS)
+libgimpactutils_a_AR = $(AR) $(ARFLAGS)
+libgimpactutils_a_LIBADD =
+am_libgimpactutils_a_OBJECTS = \
+ libgimpactutils_a-btGImpactConvexDecompositionShape.$(OBJEXT)
+libgimpactutils_a_OBJECTS = $(am_libgimpactutils_a_OBJECTS)
+libglui_a_AR = $(AR) $(ARFLAGS)
+libglui_a_LIBADD =
+am_libglui_a_OBJECTS = libglui_a-glui_spinner.$(OBJEXT) \
+ libglui_a-glui_treepanel.$(OBJEXT) libglui_a-arcball.$(OBJEXT) \
+ libglui_a-glui_scrollbar.$(OBJEXT) \
+ libglui_a-glui_filebrowser.$(OBJEXT) \
+ libglui_a-glui_node.$(OBJEXT) \
+ libglui_a-glui_edittext.$(OBJEXT) \
+ libglui_a-glui_statictext.$(OBJEXT) \
+ libglui_a-glui_bitmaps.$(OBJEXT) libglui_a-algebra3.$(OBJEXT) \
+ libglui_a-glui_string.$(OBJEXT) \
+ libglui_a-glui_button.$(OBJEXT) \
+ libglui_a-glui_add_controls.$(OBJEXT) \
+ libglui_a-glui_control.$(OBJEXT) libglui_a-glui.$(OBJEXT) \
+ libglui_a-glui_listbox.$(OBJEXT) \
+ libglui_a-glui_checkbox.$(OBJEXT) \
+ libglui_a-glui_commandline.$(OBJEXT) \
+ libglui_a-glui_textbox.$(OBJEXT) \
+ libglui_a-glui_column.$(OBJEXT) \
+ libglui_a-glui_mouse_iaction.$(OBJEXT) \
+ libglui_a-glui_radio.$(OBJEXT) \
+ libglui_a-glui_translation.$(OBJEXT) \
+ libglui_a-glui_tree.$(OBJEXT) \
+ libglui_a-glui_rotation.$(OBJEXT) \
+ libglui_a-glui_panel.$(OBJEXT) \
+ libglui_a-glui_rollout.$(OBJEXT) \
+ libglui_a-glui_separator.$(OBJEXT) \
+ libglui_a-glui_bitmap_img_data.$(OBJEXT) \
+ libglui_a-quaternion.$(OBJEXT) libglui_a-glui_window.$(OBJEXT) \
+ libglui_a-glui_list.$(OBJEXT)
+libglui_a_OBJECTS = $(am_libglui_a_OBJECTS)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libconvexdecomposition_a_SOURCES) \
+ $(libgimpactutils_a_SOURCES) $(libglui_a_SOURCES)
+DIST_SOURCES = $(libconvexdecomposition_a_SOURCES) \
+ $(libgimpactutils_a_SOURCES) $(libglui_a_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GL_LIBS = @GL_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+opengl_LIBS = @opengl_LIBS@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+noinst_LIBRARIES = libgimpactutils.a libconvexdecomposition.a libglui.a
+libglui_a_CXXFLAGS = ${CXXFLAGS} -Iglui
+libglui_a_SOURCES = \
+ glui/glui_spinner.cpp\
+ glui/glui_treepanel.cpp\
+ glui/arcball.cpp\
+ glui/glui_scrollbar.cpp\
+ glui/glui_filebrowser.cpp\
+ glui/glui_node.cpp\
+ glui/glui_edittext.cpp\
+ glui/glui_statictext.cpp\
+ glui/glui_bitmaps.cpp\
+ glui/algebra3.cpp\
+ glui/glui_string.cpp\
+ glui/glui_button.cpp\
+ glui/glui_add_controls.cpp\
+ glui/glui_control.cpp\
+ glui/glui.cpp\
+ glui/glui_listbox.cpp\
+ glui/glui_checkbox.cpp\
+ glui/glui_commandline.cpp\
+ glui/glui_textbox.cpp\
+ glui/glui_column.cpp\
+ glui/glui_mouse_iaction.cpp\
+ glui/glui_radio.cpp\
+ glui/glui_translation.cpp\
+ glui/glui_tree.cpp\
+ glui/glui_rotation.cpp\
+ glui/glui_panel.cpp\
+ glui/glui_rollout.cpp\
+ glui/glui_separator.cpp\
+ glui/glui_bitmap_img_data.cpp\
+ glui/quaternion.cpp\
+ glui/glui_window.cpp\
+ glui/glui_list.cpp\
+ glui/GL/glui.h\
+ glui/quaternion.h\
+ glui/glui_internal.h\
+ glui/glui_internal_control.h\
+ glui/arcball.h\
+ glui/algebra3.h
+
+libconvexdecomposition_a_CXXFLAGS = ${CXXFLAGS} -IConvexDecomposition/ -I../src
+libconvexdecomposition_a_SOURCES = \
+ ConvexDecomposition/concavity.cpp\
+ ConvexDecomposition/ConvexDecomposition.cpp\
+ ConvexDecomposition/vlookup.cpp\
+ ConvexDecomposition/bestfit.cpp\
+ ConvexDecomposition/ConvexBuilder.cpp\
+ ConvexDecomposition/cd_hull.cpp\
+ ConvexDecomposition/raytri.cpp\
+ ConvexDecomposition/splitplane.cpp\
+ ConvexDecomposition/float_math.cpp\
+ ConvexDecomposition/planetri.cpp\
+ ConvexDecomposition/cd_wavefront.cpp\
+ ConvexDecomposition/bestfitobb.cpp\
+ ConvexDecomposition/meshvolume.cpp\
+ ConvexDecomposition/fitsphere.cpp\
+ ConvexDecomposition/fitsphere.h\
+ ConvexDecomposition/vlookup.h\
+ ConvexDecomposition/concavity.h\
+ ConvexDecomposition/ConvexDecomposition.h\
+ ConvexDecomposition/bestfit.h\
+ ConvexDecomposition/cd_vector.h\
+ ConvexDecomposition/ConvexBuilder.h\
+ ConvexDecomposition/cd_hull.h\
+ ConvexDecomposition/raytri.h\
+ ConvexDecomposition/splitplane.h\
+ ConvexDecomposition/float_math.h\
+ ConvexDecomposition/planetri.h\
+ ConvexDecomposition/cd_wavefront.h\
+ ConvexDecomposition/bestfitobb.h\
+ ConvexDecomposition/meshvolume.h
+
+libgimpactutils_a_CXXFLAGS = ${CXXFLAGS} -I../src -IGIMPACTUtils -IConvexDecomposition
+libgimpactutils_a_SOURCES = GIMPACTUtils/btGImpactConvexDecompositionShape.cpp GIMPACTUtils/btGImpactConvexDecompositionShape.h
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Extras/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Extras/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libconvexdecomposition.a: $(libconvexdecomposition_a_OBJECTS) $(libconvexdecomposition_a_DEPENDENCIES)
+ -rm -f libconvexdecomposition.a
+ $(libconvexdecomposition_a_AR) libconvexdecomposition.a $(libconvexdecomposition_a_OBJECTS) $(libconvexdecomposition_a_LIBADD)
+ $(RANLIB) libconvexdecomposition.a
+libgimpactutils.a: $(libgimpactutils_a_OBJECTS) $(libgimpactutils_a_DEPENDENCIES)
+ -rm -f libgimpactutils.a
+ $(libgimpactutils_a_AR) libgimpactutils.a $(libgimpactutils_a_OBJECTS) $(libgimpactutils_a_LIBADD)
+ $(RANLIB) libgimpactutils.a
+libglui.a: $(libglui_a_OBJECTS) $(libglui_a_DEPENDENCIES)
+ -rm -f libglui.a
+ $(libglui_a_AR) libglui.a $(libglui_a_OBJECTS) $(libglui_a_LIBADD)
+ $(RANLIB) libglui.a
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-ConvexBuilder.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-ConvexDecomposition.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-bestfit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-bestfitobb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-cd_hull.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-cd_wavefront.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-concavity.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-fitsphere.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-float_math.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-meshvolume.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-planetri.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-raytri.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-splitplane.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconvexdecomposition_a-vlookup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgimpactutils_a-btGImpactConvexDecompositionShape.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-algebra3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-arcball.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_add_controls.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_bitmap_img_data.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_bitmaps.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_button.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_checkbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_column.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_commandline.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_control.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_edittext.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_filebrowser.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_listbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_mouse_iaction.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_node.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_panel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_radio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_rollout.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_rotation.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_scrollbar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_separator.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_spinner.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_statictext.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_string.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_textbox.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_translation.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_tree.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_treepanel.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-glui_window.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libglui_a-quaternion.Po@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libconvexdecomposition_a-concavity.o: ConvexDecomposition/concavity.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-concavity.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-concavity.Tpo -c -o libconvexdecomposition_a-concavity.o `test -f 'ConvexDecomposition/concavity.cpp' || echo '$(srcdir)/'`ConvexDecomposition/concavity.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-concavity.Tpo $(DEPDIR)/libconvexdecomposition_a-concavity.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/concavity.cpp' object='libconvexdecomposition_a-concavity.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-concavity.o `test -f 'ConvexDecomposition/concavity.cpp' || echo '$(srcdir)/'`ConvexDecomposition/concavity.cpp
+
+libconvexdecomposition_a-concavity.obj: ConvexDecomposition/concavity.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-concavity.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-concavity.Tpo -c -o libconvexdecomposition_a-concavity.obj `if test -f 'ConvexDecomposition/concavity.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/concavity.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/concavity.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-concavity.Tpo $(DEPDIR)/libconvexdecomposition_a-concavity.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/concavity.cpp' object='libconvexdecomposition_a-concavity.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-concavity.obj `if test -f 'ConvexDecomposition/concavity.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/concavity.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/concavity.cpp'; fi`
+
+libconvexdecomposition_a-ConvexDecomposition.o: ConvexDecomposition/ConvexDecomposition.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-ConvexDecomposition.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-ConvexDecomposition.Tpo -c -o libconvexdecomposition_a-ConvexDecomposition.o `test -f 'ConvexDecomposition/ConvexDecomposition.cpp' || echo '$(srcdir)/'`ConvexDecomposition/ConvexDecomposition.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-ConvexDecomposition.Tpo $(DEPDIR)/libconvexdecomposition_a-ConvexDecomposition.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/ConvexDecomposition.cpp' object='libconvexdecomposition_a-ConvexDecomposition.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-ConvexDecomposition.o `test -f 'ConvexDecomposition/ConvexDecomposition.cpp' || echo '$(srcdir)/'`ConvexDecomposition/ConvexDecomposition.cpp
+
+libconvexdecomposition_a-ConvexDecomposition.obj: ConvexDecomposition/ConvexDecomposition.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-ConvexDecomposition.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-ConvexDecomposition.Tpo -c -o libconvexdecomposition_a-ConvexDecomposition.obj `if test -f 'ConvexDecomposition/ConvexDecomposition.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/ConvexDecomposition.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/ConvexDecomposition.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-ConvexDecomposition.Tpo $(DEPDIR)/libconvexdecomposition_a-ConvexDecomposition.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/ConvexDecomposition.cpp' object='libconvexdecomposition_a-ConvexDecomposition.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-ConvexDecomposition.obj `if test -f 'ConvexDecomposition/ConvexDecomposition.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/ConvexDecomposition.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/ConvexDecomposition.cpp'; fi`
+
+libconvexdecomposition_a-vlookup.o: ConvexDecomposition/vlookup.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-vlookup.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-vlookup.Tpo -c -o libconvexdecomposition_a-vlookup.o `test -f 'ConvexDecomposition/vlookup.cpp' || echo '$(srcdir)/'`ConvexDecomposition/vlookup.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-vlookup.Tpo $(DEPDIR)/libconvexdecomposition_a-vlookup.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/vlookup.cpp' object='libconvexdecomposition_a-vlookup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-vlookup.o `test -f 'ConvexDecomposition/vlookup.cpp' || echo '$(srcdir)/'`ConvexDecomposition/vlookup.cpp
+
+libconvexdecomposition_a-vlookup.obj: ConvexDecomposition/vlookup.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-vlookup.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-vlookup.Tpo -c -o libconvexdecomposition_a-vlookup.obj `if test -f 'ConvexDecomposition/vlookup.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/vlookup.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/vlookup.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-vlookup.Tpo $(DEPDIR)/libconvexdecomposition_a-vlookup.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/vlookup.cpp' object='libconvexdecomposition_a-vlookup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-vlookup.obj `if test -f 'ConvexDecomposition/vlookup.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/vlookup.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/vlookup.cpp'; fi`
+
+libconvexdecomposition_a-bestfit.o: ConvexDecomposition/bestfit.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-bestfit.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-bestfit.Tpo -c -o libconvexdecomposition_a-bestfit.o `test -f 'ConvexDecomposition/bestfit.cpp' || echo '$(srcdir)/'`ConvexDecomposition/bestfit.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-bestfit.Tpo $(DEPDIR)/libconvexdecomposition_a-bestfit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/bestfit.cpp' object='libconvexdecomposition_a-bestfit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-bestfit.o `test -f 'ConvexDecomposition/bestfit.cpp' || echo '$(srcdir)/'`ConvexDecomposition/bestfit.cpp
+
+libconvexdecomposition_a-bestfit.obj: ConvexDecomposition/bestfit.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-bestfit.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-bestfit.Tpo -c -o libconvexdecomposition_a-bestfit.obj `if test -f 'ConvexDecomposition/bestfit.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/bestfit.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/bestfit.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-bestfit.Tpo $(DEPDIR)/libconvexdecomposition_a-bestfit.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/bestfit.cpp' object='libconvexdecomposition_a-bestfit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-bestfit.obj `if test -f 'ConvexDecomposition/bestfit.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/bestfit.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/bestfit.cpp'; fi`
+
+libconvexdecomposition_a-ConvexBuilder.o: ConvexDecomposition/ConvexBuilder.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-ConvexBuilder.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-ConvexBuilder.Tpo -c -o libconvexdecomposition_a-ConvexBuilder.o `test -f 'ConvexDecomposition/ConvexBuilder.cpp' || echo '$(srcdir)/'`ConvexDecomposition/ConvexBuilder.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-ConvexBuilder.Tpo $(DEPDIR)/libconvexdecomposition_a-ConvexBuilder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/ConvexBuilder.cpp' object='libconvexdecomposition_a-ConvexBuilder.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-ConvexBuilder.o `test -f 'ConvexDecomposition/ConvexBuilder.cpp' || echo '$(srcdir)/'`ConvexDecomposition/ConvexBuilder.cpp
+
+libconvexdecomposition_a-ConvexBuilder.obj: ConvexDecomposition/ConvexBuilder.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-ConvexBuilder.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-ConvexBuilder.Tpo -c -o libconvexdecomposition_a-ConvexBuilder.obj `if test -f 'ConvexDecomposition/ConvexBuilder.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/ConvexBuilder.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/ConvexBuilder.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-ConvexBuilder.Tpo $(DEPDIR)/libconvexdecomposition_a-ConvexBuilder.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/ConvexBuilder.cpp' object='libconvexdecomposition_a-ConvexBuilder.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-ConvexBuilder.obj `if test -f 'ConvexDecomposition/ConvexBuilder.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/ConvexBuilder.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/ConvexBuilder.cpp'; fi`
+
+libconvexdecomposition_a-cd_hull.o: ConvexDecomposition/cd_hull.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-cd_hull.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-cd_hull.Tpo -c -o libconvexdecomposition_a-cd_hull.o `test -f 'ConvexDecomposition/cd_hull.cpp' || echo '$(srcdir)/'`ConvexDecomposition/cd_hull.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-cd_hull.Tpo $(DEPDIR)/libconvexdecomposition_a-cd_hull.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/cd_hull.cpp' object='libconvexdecomposition_a-cd_hull.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-cd_hull.o `test -f 'ConvexDecomposition/cd_hull.cpp' || echo '$(srcdir)/'`ConvexDecomposition/cd_hull.cpp
+
+libconvexdecomposition_a-cd_hull.obj: ConvexDecomposition/cd_hull.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-cd_hull.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-cd_hull.Tpo -c -o libconvexdecomposition_a-cd_hull.obj `if test -f 'ConvexDecomposition/cd_hull.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/cd_hull.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/cd_hull.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-cd_hull.Tpo $(DEPDIR)/libconvexdecomposition_a-cd_hull.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/cd_hull.cpp' object='libconvexdecomposition_a-cd_hull.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-cd_hull.obj `if test -f 'ConvexDecomposition/cd_hull.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/cd_hull.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/cd_hull.cpp'; fi`
+
+libconvexdecomposition_a-raytri.o: ConvexDecomposition/raytri.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-raytri.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-raytri.Tpo -c -o libconvexdecomposition_a-raytri.o `test -f 'ConvexDecomposition/raytri.cpp' || echo '$(srcdir)/'`ConvexDecomposition/raytri.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-raytri.Tpo $(DEPDIR)/libconvexdecomposition_a-raytri.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/raytri.cpp' object='libconvexdecomposition_a-raytri.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-raytri.o `test -f 'ConvexDecomposition/raytri.cpp' || echo '$(srcdir)/'`ConvexDecomposition/raytri.cpp
+
+libconvexdecomposition_a-raytri.obj: ConvexDecomposition/raytri.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-raytri.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-raytri.Tpo -c -o libconvexdecomposition_a-raytri.obj `if test -f 'ConvexDecomposition/raytri.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/raytri.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/raytri.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-raytri.Tpo $(DEPDIR)/libconvexdecomposition_a-raytri.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/raytri.cpp' object='libconvexdecomposition_a-raytri.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-raytri.obj `if test -f 'ConvexDecomposition/raytri.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/raytri.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/raytri.cpp'; fi`
+
+libconvexdecomposition_a-splitplane.o: ConvexDecomposition/splitplane.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-splitplane.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-splitplane.Tpo -c -o libconvexdecomposition_a-splitplane.o `test -f 'ConvexDecomposition/splitplane.cpp' || echo '$(srcdir)/'`ConvexDecomposition/splitplane.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-splitplane.Tpo $(DEPDIR)/libconvexdecomposition_a-splitplane.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/splitplane.cpp' object='libconvexdecomposition_a-splitplane.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-splitplane.o `test -f 'ConvexDecomposition/splitplane.cpp' || echo '$(srcdir)/'`ConvexDecomposition/splitplane.cpp
+
+libconvexdecomposition_a-splitplane.obj: ConvexDecomposition/splitplane.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-splitplane.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-splitplane.Tpo -c -o libconvexdecomposition_a-splitplane.obj `if test -f 'ConvexDecomposition/splitplane.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/splitplane.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/splitplane.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-splitplane.Tpo $(DEPDIR)/libconvexdecomposition_a-splitplane.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/splitplane.cpp' object='libconvexdecomposition_a-splitplane.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-splitplane.obj `if test -f 'ConvexDecomposition/splitplane.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/splitplane.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/splitplane.cpp'; fi`
+
+libconvexdecomposition_a-float_math.o: ConvexDecomposition/float_math.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-float_math.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-float_math.Tpo -c -o libconvexdecomposition_a-float_math.o `test -f 'ConvexDecomposition/float_math.cpp' || echo '$(srcdir)/'`ConvexDecomposition/float_math.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-float_math.Tpo $(DEPDIR)/libconvexdecomposition_a-float_math.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/float_math.cpp' object='libconvexdecomposition_a-float_math.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-float_math.o `test -f 'ConvexDecomposition/float_math.cpp' || echo '$(srcdir)/'`ConvexDecomposition/float_math.cpp
+
+libconvexdecomposition_a-float_math.obj: ConvexDecomposition/float_math.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-float_math.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-float_math.Tpo -c -o libconvexdecomposition_a-float_math.obj `if test -f 'ConvexDecomposition/float_math.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/float_math.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/float_math.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-float_math.Tpo $(DEPDIR)/libconvexdecomposition_a-float_math.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/float_math.cpp' object='libconvexdecomposition_a-float_math.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-float_math.obj `if test -f 'ConvexDecomposition/float_math.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/float_math.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/float_math.cpp'; fi`
+
+libconvexdecomposition_a-planetri.o: ConvexDecomposition/planetri.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-planetri.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-planetri.Tpo -c -o libconvexdecomposition_a-planetri.o `test -f 'ConvexDecomposition/planetri.cpp' || echo '$(srcdir)/'`ConvexDecomposition/planetri.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-planetri.Tpo $(DEPDIR)/libconvexdecomposition_a-planetri.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/planetri.cpp' object='libconvexdecomposition_a-planetri.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-planetri.o `test -f 'ConvexDecomposition/planetri.cpp' || echo '$(srcdir)/'`ConvexDecomposition/planetri.cpp
+
+libconvexdecomposition_a-planetri.obj: ConvexDecomposition/planetri.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-planetri.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-planetri.Tpo -c -o libconvexdecomposition_a-planetri.obj `if test -f 'ConvexDecomposition/planetri.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/planetri.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/planetri.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-planetri.Tpo $(DEPDIR)/libconvexdecomposition_a-planetri.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/planetri.cpp' object='libconvexdecomposition_a-planetri.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-planetri.obj `if test -f 'ConvexDecomposition/planetri.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/planetri.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/planetri.cpp'; fi`
+
+libconvexdecomposition_a-cd_wavefront.o: ConvexDecomposition/cd_wavefront.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-cd_wavefront.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-cd_wavefront.Tpo -c -o libconvexdecomposition_a-cd_wavefront.o `test -f 'ConvexDecomposition/cd_wavefront.cpp' || echo '$(srcdir)/'`ConvexDecomposition/cd_wavefront.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-cd_wavefront.Tpo $(DEPDIR)/libconvexdecomposition_a-cd_wavefront.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/cd_wavefront.cpp' object='libconvexdecomposition_a-cd_wavefront.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-cd_wavefront.o `test -f 'ConvexDecomposition/cd_wavefront.cpp' || echo '$(srcdir)/'`ConvexDecomposition/cd_wavefront.cpp
+
+libconvexdecomposition_a-cd_wavefront.obj: ConvexDecomposition/cd_wavefront.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-cd_wavefront.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-cd_wavefront.Tpo -c -o libconvexdecomposition_a-cd_wavefront.obj `if test -f 'ConvexDecomposition/cd_wavefront.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/cd_wavefront.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/cd_wavefront.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-cd_wavefront.Tpo $(DEPDIR)/libconvexdecomposition_a-cd_wavefront.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/cd_wavefront.cpp' object='libconvexdecomposition_a-cd_wavefront.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-cd_wavefront.obj `if test -f 'ConvexDecomposition/cd_wavefront.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/cd_wavefront.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/cd_wavefront.cpp'; fi`
+
+libconvexdecomposition_a-bestfitobb.o: ConvexDecomposition/bestfitobb.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-bestfitobb.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-bestfitobb.Tpo -c -o libconvexdecomposition_a-bestfitobb.o `test -f 'ConvexDecomposition/bestfitobb.cpp' || echo '$(srcdir)/'`ConvexDecomposition/bestfitobb.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-bestfitobb.Tpo $(DEPDIR)/libconvexdecomposition_a-bestfitobb.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/bestfitobb.cpp' object='libconvexdecomposition_a-bestfitobb.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-bestfitobb.o `test -f 'ConvexDecomposition/bestfitobb.cpp' || echo '$(srcdir)/'`ConvexDecomposition/bestfitobb.cpp
+
+libconvexdecomposition_a-bestfitobb.obj: ConvexDecomposition/bestfitobb.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-bestfitobb.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-bestfitobb.Tpo -c -o libconvexdecomposition_a-bestfitobb.obj `if test -f 'ConvexDecomposition/bestfitobb.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/bestfitobb.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/bestfitobb.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-bestfitobb.Tpo $(DEPDIR)/libconvexdecomposition_a-bestfitobb.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/bestfitobb.cpp' object='libconvexdecomposition_a-bestfitobb.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-bestfitobb.obj `if test -f 'ConvexDecomposition/bestfitobb.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/bestfitobb.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/bestfitobb.cpp'; fi`
+
+libconvexdecomposition_a-meshvolume.o: ConvexDecomposition/meshvolume.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-meshvolume.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-meshvolume.Tpo -c -o libconvexdecomposition_a-meshvolume.o `test -f 'ConvexDecomposition/meshvolume.cpp' || echo '$(srcdir)/'`ConvexDecomposition/meshvolume.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-meshvolume.Tpo $(DEPDIR)/libconvexdecomposition_a-meshvolume.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/meshvolume.cpp' object='libconvexdecomposition_a-meshvolume.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-meshvolume.o `test -f 'ConvexDecomposition/meshvolume.cpp' || echo '$(srcdir)/'`ConvexDecomposition/meshvolume.cpp
+
+libconvexdecomposition_a-meshvolume.obj: ConvexDecomposition/meshvolume.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-meshvolume.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-meshvolume.Tpo -c -o libconvexdecomposition_a-meshvolume.obj `if test -f 'ConvexDecomposition/meshvolume.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/meshvolume.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/meshvolume.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-meshvolume.Tpo $(DEPDIR)/libconvexdecomposition_a-meshvolume.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/meshvolume.cpp' object='libconvexdecomposition_a-meshvolume.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-meshvolume.obj `if test -f 'ConvexDecomposition/meshvolume.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/meshvolume.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/meshvolume.cpp'; fi`
+
+libconvexdecomposition_a-fitsphere.o: ConvexDecomposition/fitsphere.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-fitsphere.o -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-fitsphere.Tpo -c -o libconvexdecomposition_a-fitsphere.o `test -f 'ConvexDecomposition/fitsphere.cpp' || echo '$(srcdir)/'`ConvexDecomposition/fitsphere.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-fitsphere.Tpo $(DEPDIR)/libconvexdecomposition_a-fitsphere.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/fitsphere.cpp' object='libconvexdecomposition_a-fitsphere.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-fitsphere.o `test -f 'ConvexDecomposition/fitsphere.cpp' || echo '$(srcdir)/'`ConvexDecomposition/fitsphere.cpp
+
+libconvexdecomposition_a-fitsphere.obj: ConvexDecomposition/fitsphere.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -MT libconvexdecomposition_a-fitsphere.obj -MD -MP -MF $(DEPDIR)/libconvexdecomposition_a-fitsphere.Tpo -c -o libconvexdecomposition_a-fitsphere.obj `if test -f 'ConvexDecomposition/fitsphere.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/fitsphere.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/fitsphere.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libconvexdecomposition_a-fitsphere.Tpo $(DEPDIR)/libconvexdecomposition_a-fitsphere.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ConvexDecomposition/fitsphere.cpp' object='libconvexdecomposition_a-fitsphere.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconvexdecomposition_a_CXXFLAGS) $(CXXFLAGS) -c -o libconvexdecomposition_a-fitsphere.obj `if test -f 'ConvexDecomposition/fitsphere.cpp'; then $(CYGPATH_W) 'ConvexDecomposition/fitsphere.cpp'; else $(CYGPATH_W) '$(srcdir)/ConvexDecomposition/fitsphere.cpp'; fi`
+
+libgimpactutils_a-btGImpactConvexDecompositionShape.o: GIMPACTUtils/btGImpactConvexDecompositionShape.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimpactutils_a_CXXFLAGS) $(CXXFLAGS) -MT libgimpactutils_a-btGImpactConvexDecompositionShape.o -MD -MP -MF $(DEPDIR)/libgimpactutils_a-btGImpactConvexDecompositionShape.Tpo -c -o libgimpactutils_a-btGImpactConvexDecompositionShape.o `test -f 'GIMPACTUtils/btGImpactConvexDecompositionShape.cpp' || echo '$(srcdir)/'`GIMPACTUtils/btGImpactConvexDecompositionShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libgimpactutils_a-btGImpactConvexDecompositionShape.Tpo $(DEPDIR)/libgimpactutils_a-btGImpactConvexDecompositionShape.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GIMPACTUtils/btGImpactConvexDecompositionShape.cpp' object='libgimpactutils_a-btGImpactConvexDecompositionShape.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimpactutils_a_CXXFLAGS) $(CXXFLAGS) -c -o libgimpactutils_a-btGImpactConvexDecompositionShape.o `test -f 'GIMPACTUtils/btGImpactConvexDecompositionShape.cpp' || echo '$(srcdir)/'`GIMPACTUtils/btGImpactConvexDecompositionShape.cpp
+
+libgimpactutils_a-btGImpactConvexDecompositionShape.obj: GIMPACTUtils/btGImpactConvexDecompositionShape.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimpactutils_a_CXXFLAGS) $(CXXFLAGS) -MT libgimpactutils_a-btGImpactConvexDecompositionShape.obj -MD -MP -MF $(DEPDIR)/libgimpactutils_a-btGImpactConvexDecompositionShape.Tpo -c -o libgimpactutils_a-btGImpactConvexDecompositionShape.obj `if test -f 'GIMPACTUtils/btGImpactConvexDecompositionShape.cpp'; then $(CYGPATH_W) 'GIMPACTUtils/btGImpactConvexDecompositionShape.cpp'; else $(CYGPATH_W) '$(srcdir)/GIMPACTUtils/btGImpactConvexDecompositionShape.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libgimpactutils_a-btGImpactConvexDecompositionShape.Tpo $(DEPDIR)/libgimpactutils_a-btGImpactConvexDecompositionShape.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='GIMPACTUtils/btGImpactConvexDecompositionShape.cpp' object='libgimpactutils_a-btGImpactConvexDecompositionShape.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgimpactutils_a_CXXFLAGS) $(CXXFLAGS) -c -o libgimpactutils_a-btGImpactConvexDecompositionShape.obj `if test -f 'GIMPACTUtils/btGImpactConvexDecompositionShape.cpp'; then $(CYGPATH_W) 'GIMPACTUtils/btGImpactConvexDecompositionShape.cpp'; else $(CYGPATH_W) '$(srcdir)/GIMPACTUtils/btGImpactConvexDecompositionShape.cpp'; fi`
+
+libglui_a-glui_spinner.o: glui/glui_spinner.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_spinner.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_spinner.Tpo -c -o libglui_a-glui_spinner.o `test -f 'glui/glui_spinner.cpp' || echo '$(srcdir)/'`glui/glui_spinner.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_spinner.Tpo $(DEPDIR)/libglui_a-glui_spinner.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_spinner.cpp' object='libglui_a-glui_spinner.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_spinner.o `test -f 'glui/glui_spinner.cpp' || echo '$(srcdir)/'`glui/glui_spinner.cpp
+
+libglui_a-glui_spinner.obj: glui/glui_spinner.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_spinner.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_spinner.Tpo -c -o libglui_a-glui_spinner.obj `if test -f 'glui/glui_spinner.cpp'; then $(CYGPATH_W) 'glui/glui_spinner.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_spinner.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_spinner.Tpo $(DEPDIR)/libglui_a-glui_spinner.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_spinner.cpp' object='libglui_a-glui_spinner.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_spinner.obj `if test -f 'glui/glui_spinner.cpp'; then $(CYGPATH_W) 'glui/glui_spinner.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_spinner.cpp'; fi`
+
+libglui_a-glui_treepanel.o: glui/glui_treepanel.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_treepanel.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_treepanel.Tpo -c -o libglui_a-glui_treepanel.o `test -f 'glui/glui_treepanel.cpp' || echo '$(srcdir)/'`glui/glui_treepanel.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_treepanel.Tpo $(DEPDIR)/libglui_a-glui_treepanel.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_treepanel.cpp' object='libglui_a-glui_treepanel.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_treepanel.o `test -f 'glui/glui_treepanel.cpp' || echo '$(srcdir)/'`glui/glui_treepanel.cpp
+
+libglui_a-glui_treepanel.obj: glui/glui_treepanel.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_treepanel.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_treepanel.Tpo -c -o libglui_a-glui_treepanel.obj `if test -f 'glui/glui_treepanel.cpp'; then $(CYGPATH_W) 'glui/glui_treepanel.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_treepanel.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_treepanel.Tpo $(DEPDIR)/libglui_a-glui_treepanel.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_treepanel.cpp' object='libglui_a-glui_treepanel.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_treepanel.obj `if test -f 'glui/glui_treepanel.cpp'; then $(CYGPATH_W) 'glui/glui_treepanel.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_treepanel.cpp'; fi`
+
+libglui_a-arcball.o: glui/arcball.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-arcball.o -MD -MP -MF $(DEPDIR)/libglui_a-arcball.Tpo -c -o libglui_a-arcball.o `test -f 'glui/arcball.cpp' || echo '$(srcdir)/'`glui/arcball.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-arcball.Tpo $(DEPDIR)/libglui_a-arcball.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/arcball.cpp' object='libglui_a-arcball.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-arcball.o `test -f 'glui/arcball.cpp' || echo '$(srcdir)/'`glui/arcball.cpp
+
+libglui_a-arcball.obj: glui/arcball.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-arcball.obj -MD -MP -MF $(DEPDIR)/libglui_a-arcball.Tpo -c -o libglui_a-arcball.obj `if test -f 'glui/arcball.cpp'; then $(CYGPATH_W) 'glui/arcball.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/arcball.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-arcball.Tpo $(DEPDIR)/libglui_a-arcball.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/arcball.cpp' object='libglui_a-arcball.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-arcball.obj `if test -f 'glui/arcball.cpp'; then $(CYGPATH_W) 'glui/arcball.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/arcball.cpp'; fi`
+
+libglui_a-glui_scrollbar.o: glui/glui_scrollbar.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_scrollbar.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_scrollbar.Tpo -c -o libglui_a-glui_scrollbar.o `test -f 'glui/glui_scrollbar.cpp' || echo '$(srcdir)/'`glui/glui_scrollbar.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_scrollbar.Tpo $(DEPDIR)/libglui_a-glui_scrollbar.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_scrollbar.cpp' object='libglui_a-glui_scrollbar.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_scrollbar.o `test -f 'glui/glui_scrollbar.cpp' || echo '$(srcdir)/'`glui/glui_scrollbar.cpp
+
+libglui_a-glui_scrollbar.obj: glui/glui_scrollbar.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_scrollbar.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_scrollbar.Tpo -c -o libglui_a-glui_scrollbar.obj `if test -f 'glui/glui_scrollbar.cpp'; then $(CYGPATH_W) 'glui/glui_scrollbar.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_scrollbar.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_scrollbar.Tpo $(DEPDIR)/libglui_a-glui_scrollbar.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_scrollbar.cpp' object='libglui_a-glui_scrollbar.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_scrollbar.obj `if test -f 'glui/glui_scrollbar.cpp'; then $(CYGPATH_W) 'glui/glui_scrollbar.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_scrollbar.cpp'; fi`
+
+libglui_a-glui_filebrowser.o: glui/glui_filebrowser.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_filebrowser.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_filebrowser.Tpo -c -o libglui_a-glui_filebrowser.o `test -f 'glui/glui_filebrowser.cpp' || echo '$(srcdir)/'`glui/glui_filebrowser.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_filebrowser.Tpo $(DEPDIR)/libglui_a-glui_filebrowser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_filebrowser.cpp' object='libglui_a-glui_filebrowser.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_filebrowser.o `test -f 'glui/glui_filebrowser.cpp' || echo '$(srcdir)/'`glui/glui_filebrowser.cpp
+
+libglui_a-glui_filebrowser.obj: glui/glui_filebrowser.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_filebrowser.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_filebrowser.Tpo -c -o libglui_a-glui_filebrowser.obj `if test -f 'glui/glui_filebrowser.cpp'; then $(CYGPATH_W) 'glui/glui_filebrowser.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_filebrowser.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_filebrowser.Tpo $(DEPDIR)/libglui_a-glui_filebrowser.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_filebrowser.cpp' object='libglui_a-glui_filebrowser.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_filebrowser.obj `if test -f 'glui/glui_filebrowser.cpp'; then $(CYGPATH_W) 'glui/glui_filebrowser.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_filebrowser.cpp'; fi`
+
+libglui_a-glui_node.o: glui/glui_node.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_node.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_node.Tpo -c -o libglui_a-glui_node.o `test -f 'glui/glui_node.cpp' || echo '$(srcdir)/'`glui/glui_node.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_node.Tpo $(DEPDIR)/libglui_a-glui_node.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_node.cpp' object='libglui_a-glui_node.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_node.o `test -f 'glui/glui_node.cpp' || echo '$(srcdir)/'`glui/glui_node.cpp
+
+libglui_a-glui_node.obj: glui/glui_node.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_node.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_node.Tpo -c -o libglui_a-glui_node.obj `if test -f 'glui/glui_node.cpp'; then $(CYGPATH_W) 'glui/glui_node.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_node.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_node.Tpo $(DEPDIR)/libglui_a-glui_node.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_node.cpp' object='libglui_a-glui_node.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_node.obj `if test -f 'glui/glui_node.cpp'; then $(CYGPATH_W) 'glui/glui_node.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_node.cpp'; fi`
+
+libglui_a-glui_edittext.o: glui/glui_edittext.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_edittext.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_edittext.Tpo -c -o libglui_a-glui_edittext.o `test -f 'glui/glui_edittext.cpp' || echo '$(srcdir)/'`glui/glui_edittext.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_edittext.Tpo $(DEPDIR)/libglui_a-glui_edittext.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_edittext.cpp' object='libglui_a-glui_edittext.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_edittext.o `test -f 'glui/glui_edittext.cpp' || echo '$(srcdir)/'`glui/glui_edittext.cpp
+
+libglui_a-glui_edittext.obj: glui/glui_edittext.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_edittext.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_edittext.Tpo -c -o libglui_a-glui_edittext.obj `if test -f 'glui/glui_edittext.cpp'; then $(CYGPATH_W) 'glui/glui_edittext.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_edittext.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_edittext.Tpo $(DEPDIR)/libglui_a-glui_edittext.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_edittext.cpp' object='libglui_a-glui_edittext.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_edittext.obj `if test -f 'glui/glui_edittext.cpp'; then $(CYGPATH_W) 'glui/glui_edittext.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_edittext.cpp'; fi`
+
+libglui_a-glui_statictext.o: glui/glui_statictext.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_statictext.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_statictext.Tpo -c -o libglui_a-glui_statictext.o `test -f 'glui/glui_statictext.cpp' || echo '$(srcdir)/'`glui/glui_statictext.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_statictext.Tpo $(DEPDIR)/libglui_a-glui_statictext.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_statictext.cpp' object='libglui_a-glui_statictext.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_statictext.o `test -f 'glui/glui_statictext.cpp' || echo '$(srcdir)/'`glui/glui_statictext.cpp
+
+libglui_a-glui_statictext.obj: glui/glui_statictext.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_statictext.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_statictext.Tpo -c -o libglui_a-glui_statictext.obj `if test -f 'glui/glui_statictext.cpp'; then $(CYGPATH_W) 'glui/glui_statictext.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_statictext.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_statictext.Tpo $(DEPDIR)/libglui_a-glui_statictext.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_statictext.cpp' object='libglui_a-glui_statictext.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_statictext.obj `if test -f 'glui/glui_statictext.cpp'; then $(CYGPATH_W) 'glui/glui_statictext.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_statictext.cpp'; fi`
+
+libglui_a-glui_bitmaps.o: glui/glui_bitmaps.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_bitmaps.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_bitmaps.Tpo -c -o libglui_a-glui_bitmaps.o `test -f 'glui/glui_bitmaps.cpp' || echo '$(srcdir)/'`glui/glui_bitmaps.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_bitmaps.Tpo $(DEPDIR)/libglui_a-glui_bitmaps.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_bitmaps.cpp' object='libglui_a-glui_bitmaps.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_bitmaps.o `test -f 'glui/glui_bitmaps.cpp' || echo '$(srcdir)/'`glui/glui_bitmaps.cpp
+
+libglui_a-glui_bitmaps.obj: glui/glui_bitmaps.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_bitmaps.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_bitmaps.Tpo -c -o libglui_a-glui_bitmaps.obj `if test -f 'glui/glui_bitmaps.cpp'; then $(CYGPATH_W) 'glui/glui_bitmaps.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_bitmaps.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_bitmaps.Tpo $(DEPDIR)/libglui_a-glui_bitmaps.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_bitmaps.cpp' object='libglui_a-glui_bitmaps.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_bitmaps.obj `if test -f 'glui/glui_bitmaps.cpp'; then $(CYGPATH_W) 'glui/glui_bitmaps.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_bitmaps.cpp'; fi`
+
+libglui_a-algebra3.o: glui/algebra3.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-algebra3.o -MD -MP -MF $(DEPDIR)/libglui_a-algebra3.Tpo -c -o libglui_a-algebra3.o `test -f 'glui/algebra3.cpp' || echo '$(srcdir)/'`glui/algebra3.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-algebra3.Tpo $(DEPDIR)/libglui_a-algebra3.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/algebra3.cpp' object='libglui_a-algebra3.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-algebra3.o `test -f 'glui/algebra3.cpp' || echo '$(srcdir)/'`glui/algebra3.cpp
+
+libglui_a-algebra3.obj: glui/algebra3.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-algebra3.obj -MD -MP -MF $(DEPDIR)/libglui_a-algebra3.Tpo -c -o libglui_a-algebra3.obj `if test -f 'glui/algebra3.cpp'; then $(CYGPATH_W) 'glui/algebra3.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/algebra3.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-algebra3.Tpo $(DEPDIR)/libglui_a-algebra3.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/algebra3.cpp' object='libglui_a-algebra3.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-algebra3.obj `if test -f 'glui/algebra3.cpp'; then $(CYGPATH_W) 'glui/algebra3.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/algebra3.cpp'; fi`
+
+libglui_a-glui_string.o: glui/glui_string.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_string.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_string.Tpo -c -o libglui_a-glui_string.o `test -f 'glui/glui_string.cpp' || echo '$(srcdir)/'`glui/glui_string.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_string.Tpo $(DEPDIR)/libglui_a-glui_string.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_string.cpp' object='libglui_a-glui_string.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_string.o `test -f 'glui/glui_string.cpp' || echo '$(srcdir)/'`glui/glui_string.cpp
+
+libglui_a-glui_string.obj: glui/glui_string.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_string.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_string.Tpo -c -o libglui_a-glui_string.obj `if test -f 'glui/glui_string.cpp'; then $(CYGPATH_W) 'glui/glui_string.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_string.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_string.Tpo $(DEPDIR)/libglui_a-glui_string.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_string.cpp' object='libglui_a-glui_string.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_string.obj `if test -f 'glui/glui_string.cpp'; then $(CYGPATH_W) 'glui/glui_string.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_string.cpp'; fi`
+
+libglui_a-glui_button.o: glui/glui_button.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_button.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_button.Tpo -c -o libglui_a-glui_button.o `test -f 'glui/glui_button.cpp' || echo '$(srcdir)/'`glui/glui_button.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_button.Tpo $(DEPDIR)/libglui_a-glui_button.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_button.cpp' object='libglui_a-glui_button.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_button.o `test -f 'glui/glui_button.cpp' || echo '$(srcdir)/'`glui/glui_button.cpp
+
+libglui_a-glui_button.obj: glui/glui_button.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_button.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_button.Tpo -c -o libglui_a-glui_button.obj `if test -f 'glui/glui_button.cpp'; then $(CYGPATH_W) 'glui/glui_button.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_button.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_button.Tpo $(DEPDIR)/libglui_a-glui_button.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_button.cpp' object='libglui_a-glui_button.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_button.obj `if test -f 'glui/glui_button.cpp'; then $(CYGPATH_W) 'glui/glui_button.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_button.cpp'; fi`
+
+libglui_a-glui_add_controls.o: glui/glui_add_controls.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_add_controls.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_add_controls.Tpo -c -o libglui_a-glui_add_controls.o `test -f 'glui/glui_add_controls.cpp' || echo '$(srcdir)/'`glui/glui_add_controls.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_add_controls.Tpo $(DEPDIR)/libglui_a-glui_add_controls.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_add_controls.cpp' object='libglui_a-glui_add_controls.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_add_controls.o `test -f 'glui/glui_add_controls.cpp' || echo '$(srcdir)/'`glui/glui_add_controls.cpp
+
+libglui_a-glui_add_controls.obj: glui/glui_add_controls.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_add_controls.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_add_controls.Tpo -c -o libglui_a-glui_add_controls.obj `if test -f 'glui/glui_add_controls.cpp'; then $(CYGPATH_W) 'glui/glui_add_controls.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_add_controls.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_add_controls.Tpo $(DEPDIR)/libglui_a-glui_add_controls.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_add_controls.cpp' object='libglui_a-glui_add_controls.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_add_controls.obj `if test -f 'glui/glui_add_controls.cpp'; then $(CYGPATH_W) 'glui/glui_add_controls.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_add_controls.cpp'; fi`
+
+libglui_a-glui_control.o: glui/glui_control.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_control.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_control.Tpo -c -o libglui_a-glui_control.o `test -f 'glui/glui_control.cpp' || echo '$(srcdir)/'`glui/glui_control.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_control.Tpo $(DEPDIR)/libglui_a-glui_control.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_control.cpp' object='libglui_a-glui_control.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_control.o `test -f 'glui/glui_control.cpp' || echo '$(srcdir)/'`glui/glui_control.cpp
+
+libglui_a-glui_control.obj: glui/glui_control.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_control.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_control.Tpo -c -o libglui_a-glui_control.obj `if test -f 'glui/glui_control.cpp'; then $(CYGPATH_W) 'glui/glui_control.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_control.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_control.Tpo $(DEPDIR)/libglui_a-glui_control.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_control.cpp' object='libglui_a-glui_control.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_control.obj `if test -f 'glui/glui_control.cpp'; then $(CYGPATH_W) 'glui/glui_control.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_control.cpp'; fi`
+
+libglui_a-glui.o: glui/glui.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui.o -MD -MP -MF $(DEPDIR)/libglui_a-glui.Tpo -c -o libglui_a-glui.o `test -f 'glui/glui.cpp' || echo '$(srcdir)/'`glui/glui.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui.Tpo $(DEPDIR)/libglui_a-glui.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui.cpp' object='libglui_a-glui.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui.o `test -f 'glui/glui.cpp' || echo '$(srcdir)/'`glui/glui.cpp
+
+libglui_a-glui.obj: glui/glui.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui.Tpo -c -o libglui_a-glui.obj `if test -f 'glui/glui.cpp'; then $(CYGPATH_W) 'glui/glui.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui.Tpo $(DEPDIR)/libglui_a-glui.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui.cpp' object='libglui_a-glui.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui.obj `if test -f 'glui/glui.cpp'; then $(CYGPATH_W) 'glui/glui.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui.cpp'; fi`
+
+libglui_a-glui_listbox.o: glui/glui_listbox.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_listbox.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_listbox.Tpo -c -o libglui_a-glui_listbox.o `test -f 'glui/glui_listbox.cpp' || echo '$(srcdir)/'`glui/glui_listbox.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_listbox.Tpo $(DEPDIR)/libglui_a-glui_listbox.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_listbox.cpp' object='libglui_a-glui_listbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_listbox.o `test -f 'glui/glui_listbox.cpp' || echo '$(srcdir)/'`glui/glui_listbox.cpp
+
+libglui_a-glui_listbox.obj: glui/glui_listbox.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_listbox.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_listbox.Tpo -c -o libglui_a-glui_listbox.obj `if test -f 'glui/glui_listbox.cpp'; then $(CYGPATH_W) 'glui/glui_listbox.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_listbox.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_listbox.Tpo $(DEPDIR)/libglui_a-glui_listbox.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_listbox.cpp' object='libglui_a-glui_listbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_listbox.obj `if test -f 'glui/glui_listbox.cpp'; then $(CYGPATH_W) 'glui/glui_listbox.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_listbox.cpp'; fi`
+
+libglui_a-glui_checkbox.o: glui/glui_checkbox.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_checkbox.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_checkbox.Tpo -c -o libglui_a-glui_checkbox.o `test -f 'glui/glui_checkbox.cpp' || echo '$(srcdir)/'`glui/glui_checkbox.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_checkbox.Tpo $(DEPDIR)/libglui_a-glui_checkbox.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_checkbox.cpp' object='libglui_a-glui_checkbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_checkbox.o `test -f 'glui/glui_checkbox.cpp' || echo '$(srcdir)/'`glui/glui_checkbox.cpp
+
+libglui_a-glui_checkbox.obj: glui/glui_checkbox.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_checkbox.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_checkbox.Tpo -c -o libglui_a-glui_checkbox.obj `if test -f 'glui/glui_checkbox.cpp'; then $(CYGPATH_W) 'glui/glui_checkbox.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_checkbox.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_checkbox.Tpo $(DEPDIR)/libglui_a-glui_checkbox.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_checkbox.cpp' object='libglui_a-glui_checkbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_checkbox.obj `if test -f 'glui/glui_checkbox.cpp'; then $(CYGPATH_W) 'glui/glui_checkbox.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_checkbox.cpp'; fi`
+
+libglui_a-glui_commandline.o: glui/glui_commandline.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_commandline.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_commandline.Tpo -c -o libglui_a-glui_commandline.o `test -f 'glui/glui_commandline.cpp' || echo '$(srcdir)/'`glui/glui_commandline.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_commandline.Tpo $(DEPDIR)/libglui_a-glui_commandline.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_commandline.cpp' object='libglui_a-glui_commandline.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_commandline.o `test -f 'glui/glui_commandline.cpp' || echo '$(srcdir)/'`glui/glui_commandline.cpp
+
+libglui_a-glui_commandline.obj: glui/glui_commandline.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_commandline.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_commandline.Tpo -c -o libglui_a-glui_commandline.obj `if test -f 'glui/glui_commandline.cpp'; then $(CYGPATH_W) 'glui/glui_commandline.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_commandline.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_commandline.Tpo $(DEPDIR)/libglui_a-glui_commandline.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_commandline.cpp' object='libglui_a-glui_commandline.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_commandline.obj `if test -f 'glui/glui_commandline.cpp'; then $(CYGPATH_W) 'glui/glui_commandline.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_commandline.cpp'; fi`
+
+libglui_a-glui_textbox.o: glui/glui_textbox.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_textbox.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_textbox.Tpo -c -o libglui_a-glui_textbox.o `test -f 'glui/glui_textbox.cpp' || echo '$(srcdir)/'`glui/glui_textbox.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_textbox.Tpo $(DEPDIR)/libglui_a-glui_textbox.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_textbox.cpp' object='libglui_a-glui_textbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_textbox.o `test -f 'glui/glui_textbox.cpp' || echo '$(srcdir)/'`glui/glui_textbox.cpp
+
+libglui_a-glui_textbox.obj: glui/glui_textbox.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_textbox.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_textbox.Tpo -c -o libglui_a-glui_textbox.obj `if test -f 'glui/glui_textbox.cpp'; then $(CYGPATH_W) 'glui/glui_textbox.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_textbox.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_textbox.Tpo $(DEPDIR)/libglui_a-glui_textbox.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_textbox.cpp' object='libglui_a-glui_textbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_textbox.obj `if test -f 'glui/glui_textbox.cpp'; then $(CYGPATH_W) 'glui/glui_textbox.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_textbox.cpp'; fi`
+
+libglui_a-glui_column.o: glui/glui_column.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_column.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_column.Tpo -c -o libglui_a-glui_column.o `test -f 'glui/glui_column.cpp' || echo '$(srcdir)/'`glui/glui_column.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_column.Tpo $(DEPDIR)/libglui_a-glui_column.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_column.cpp' object='libglui_a-glui_column.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_column.o `test -f 'glui/glui_column.cpp' || echo '$(srcdir)/'`glui/glui_column.cpp
+
+libglui_a-glui_column.obj: glui/glui_column.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_column.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_column.Tpo -c -o libglui_a-glui_column.obj `if test -f 'glui/glui_column.cpp'; then $(CYGPATH_W) 'glui/glui_column.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_column.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_column.Tpo $(DEPDIR)/libglui_a-glui_column.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_column.cpp' object='libglui_a-glui_column.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_column.obj `if test -f 'glui/glui_column.cpp'; then $(CYGPATH_W) 'glui/glui_column.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_column.cpp'; fi`
+
+libglui_a-glui_mouse_iaction.o: glui/glui_mouse_iaction.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_mouse_iaction.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_mouse_iaction.Tpo -c -o libglui_a-glui_mouse_iaction.o `test -f 'glui/glui_mouse_iaction.cpp' || echo '$(srcdir)/'`glui/glui_mouse_iaction.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_mouse_iaction.Tpo $(DEPDIR)/libglui_a-glui_mouse_iaction.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_mouse_iaction.cpp' object='libglui_a-glui_mouse_iaction.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_mouse_iaction.o `test -f 'glui/glui_mouse_iaction.cpp' || echo '$(srcdir)/'`glui/glui_mouse_iaction.cpp
+
+libglui_a-glui_mouse_iaction.obj: glui/glui_mouse_iaction.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_mouse_iaction.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_mouse_iaction.Tpo -c -o libglui_a-glui_mouse_iaction.obj `if test -f 'glui/glui_mouse_iaction.cpp'; then $(CYGPATH_W) 'glui/glui_mouse_iaction.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_mouse_iaction.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_mouse_iaction.Tpo $(DEPDIR)/libglui_a-glui_mouse_iaction.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_mouse_iaction.cpp' object='libglui_a-glui_mouse_iaction.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_mouse_iaction.obj `if test -f 'glui/glui_mouse_iaction.cpp'; then $(CYGPATH_W) 'glui/glui_mouse_iaction.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_mouse_iaction.cpp'; fi`
+
+libglui_a-glui_radio.o: glui/glui_radio.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_radio.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_radio.Tpo -c -o libglui_a-glui_radio.o `test -f 'glui/glui_radio.cpp' || echo '$(srcdir)/'`glui/glui_radio.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_radio.Tpo $(DEPDIR)/libglui_a-glui_radio.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_radio.cpp' object='libglui_a-glui_radio.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_radio.o `test -f 'glui/glui_radio.cpp' || echo '$(srcdir)/'`glui/glui_radio.cpp
+
+libglui_a-glui_radio.obj: glui/glui_radio.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_radio.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_radio.Tpo -c -o libglui_a-glui_radio.obj `if test -f 'glui/glui_radio.cpp'; then $(CYGPATH_W) 'glui/glui_radio.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_radio.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_radio.Tpo $(DEPDIR)/libglui_a-glui_radio.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_radio.cpp' object='libglui_a-glui_radio.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_radio.obj `if test -f 'glui/glui_radio.cpp'; then $(CYGPATH_W) 'glui/glui_radio.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_radio.cpp'; fi`
+
+libglui_a-glui_translation.o: glui/glui_translation.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_translation.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_translation.Tpo -c -o libglui_a-glui_translation.o `test -f 'glui/glui_translation.cpp' || echo '$(srcdir)/'`glui/glui_translation.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_translation.Tpo $(DEPDIR)/libglui_a-glui_translation.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_translation.cpp' object='libglui_a-glui_translation.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_translation.o `test -f 'glui/glui_translation.cpp' || echo '$(srcdir)/'`glui/glui_translation.cpp
+
+libglui_a-glui_translation.obj: glui/glui_translation.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_translation.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_translation.Tpo -c -o libglui_a-glui_translation.obj `if test -f 'glui/glui_translation.cpp'; then $(CYGPATH_W) 'glui/glui_translation.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_translation.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_translation.Tpo $(DEPDIR)/libglui_a-glui_translation.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_translation.cpp' object='libglui_a-glui_translation.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_translation.obj `if test -f 'glui/glui_translation.cpp'; then $(CYGPATH_W) 'glui/glui_translation.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_translation.cpp'; fi`
+
+libglui_a-glui_tree.o: glui/glui_tree.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_tree.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_tree.Tpo -c -o libglui_a-glui_tree.o `test -f 'glui/glui_tree.cpp' || echo '$(srcdir)/'`glui/glui_tree.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_tree.Tpo $(DEPDIR)/libglui_a-glui_tree.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_tree.cpp' object='libglui_a-glui_tree.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_tree.o `test -f 'glui/glui_tree.cpp' || echo '$(srcdir)/'`glui/glui_tree.cpp
+
+libglui_a-glui_tree.obj: glui/glui_tree.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_tree.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_tree.Tpo -c -o libglui_a-glui_tree.obj `if test -f 'glui/glui_tree.cpp'; then $(CYGPATH_W) 'glui/glui_tree.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_tree.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_tree.Tpo $(DEPDIR)/libglui_a-glui_tree.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_tree.cpp' object='libglui_a-glui_tree.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_tree.obj `if test -f 'glui/glui_tree.cpp'; then $(CYGPATH_W) 'glui/glui_tree.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_tree.cpp'; fi`
+
+libglui_a-glui_rotation.o: glui/glui_rotation.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_rotation.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_rotation.Tpo -c -o libglui_a-glui_rotation.o `test -f 'glui/glui_rotation.cpp' || echo '$(srcdir)/'`glui/glui_rotation.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_rotation.Tpo $(DEPDIR)/libglui_a-glui_rotation.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_rotation.cpp' object='libglui_a-glui_rotation.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_rotation.o `test -f 'glui/glui_rotation.cpp' || echo '$(srcdir)/'`glui/glui_rotation.cpp
+
+libglui_a-glui_rotation.obj: glui/glui_rotation.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_rotation.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_rotation.Tpo -c -o libglui_a-glui_rotation.obj `if test -f 'glui/glui_rotation.cpp'; then $(CYGPATH_W) 'glui/glui_rotation.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_rotation.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_rotation.Tpo $(DEPDIR)/libglui_a-glui_rotation.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_rotation.cpp' object='libglui_a-glui_rotation.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_rotation.obj `if test -f 'glui/glui_rotation.cpp'; then $(CYGPATH_W) 'glui/glui_rotation.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_rotation.cpp'; fi`
+
+libglui_a-glui_panel.o: glui/glui_panel.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_panel.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_panel.Tpo -c -o libglui_a-glui_panel.o `test -f 'glui/glui_panel.cpp' || echo '$(srcdir)/'`glui/glui_panel.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_panel.Tpo $(DEPDIR)/libglui_a-glui_panel.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_panel.cpp' object='libglui_a-glui_panel.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_panel.o `test -f 'glui/glui_panel.cpp' || echo '$(srcdir)/'`glui/glui_panel.cpp
+
+libglui_a-glui_panel.obj: glui/glui_panel.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_panel.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_panel.Tpo -c -o libglui_a-glui_panel.obj `if test -f 'glui/glui_panel.cpp'; then $(CYGPATH_W) 'glui/glui_panel.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_panel.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_panel.Tpo $(DEPDIR)/libglui_a-glui_panel.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_panel.cpp' object='libglui_a-glui_panel.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_panel.obj `if test -f 'glui/glui_panel.cpp'; then $(CYGPATH_W) 'glui/glui_panel.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_panel.cpp'; fi`
+
+libglui_a-glui_rollout.o: glui/glui_rollout.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_rollout.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_rollout.Tpo -c -o libglui_a-glui_rollout.o `test -f 'glui/glui_rollout.cpp' || echo '$(srcdir)/'`glui/glui_rollout.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_rollout.Tpo $(DEPDIR)/libglui_a-glui_rollout.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_rollout.cpp' object='libglui_a-glui_rollout.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_rollout.o `test -f 'glui/glui_rollout.cpp' || echo '$(srcdir)/'`glui/glui_rollout.cpp
+
+libglui_a-glui_rollout.obj: glui/glui_rollout.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_rollout.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_rollout.Tpo -c -o libglui_a-glui_rollout.obj `if test -f 'glui/glui_rollout.cpp'; then $(CYGPATH_W) 'glui/glui_rollout.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_rollout.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_rollout.Tpo $(DEPDIR)/libglui_a-glui_rollout.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_rollout.cpp' object='libglui_a-glui_rollout.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_rollout.obj `if test -f 'glui/glui_rollout.cpp'; then $(CYGPATH_W) 'glui/glui_rollout.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_rollout.cpp'; fi`
+
+libglui_a-glui_separator.o: glui/glui_separator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_separator.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_separator.Tpo -c -o libglui_a-glui_separator.o `test -f 'glui/glui_separator.cpp' || echo '$(srcdir)/'`glui/glui_separator.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_separator.Tpo $(DEPDIR)/libglui_a-glui_separator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_separator.cpp' object='libglui_a-glui_separator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_separator.o `test -f 'glui/glui_separator.cpp' || echo '$(srcdir)/'`glui/glui_separator.cpp
+
+libglui_a-glui_separator.obj: glui/glui_separator.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_separator.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_separator.Tpo -c -o libglui_a-glui_separator.obj `if test -f 'glui/glui_separator.cpp'; then $(CYGPATH_W) 'glui/glui_separator.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_separator.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_separator.Tpo $(DEPDIR)/libglui_a-glui_separator.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_separator.cpp' object='libglui_a-glui_separator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_separator.obj `if test -f 'glui/glui_separator.cpp'; then $(CYGPATH_W) 'glui/glui_separator.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_separator.cpp'; fi`
+
+libglui_a-glui_bitmap_img_data.o: glui/glui_bitmap_img_data.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_bitmap_img_data.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_bitmap_img_data.Tpo -c -o libglui_a-glui_bitmap_img_data.o `test -f 'glui/glui_bitmap_img_data.cpp' || echo '$(srcdir)/'`glui/glui_bitmap_img_data.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_bitmap_img_data.Tpo $(DEPDIR)/libglui_a-glui_bitmap_img_data.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_bitmap_img_data.cpp' object='libglui_a-glui_bitmap_img_data.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_bitmap_img_data.o `test -f 'glui/glui_bitmap_img_data.cpp' || echo '$(srcdir)/'`glui/glui_bitmap_img_data.cpp
+
+libglui_a-glui_bitmap_img_data.obj: glui/glui_bitmap_img_data.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_bitmap_img_data.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_bitmap_img_data.Tpo -c -o libglui_a-glui_bitmap_img_data.obj `if test -f 'glui/glui_bitmap_img_data.cpp'; then $(CYGPATH_W) 'glui/glui_bitmap_img_data.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_bitmap_img_data.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_bitmap_img_data.Tpo $(DEPDIR)/libglui_a-glui_bitmap_img_data.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_bitmap_img_data.cpp' object='libglui_a-glui_bitmap_img_data.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_bitmap_img_data.obj `if test -f 'glui/glui_bitmap_img_data.cpp'; then $(CYGPATH_W) 'glui/glui_bitmap_img_data.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_bitmap_img_data.cpp'; fi`
+
+libglui_a-quaternion.o: glui/quaternion.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-quaternion.o -MD -MP -MF $(DEPDIR)/libglui_a-quaternion.Tpo -c -o libglui_a-quaternion.o `test -f 'glui/quaternion.cpp' || echo '$(srcdir)/'`glui/quaternion.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-quaternion.Tpo $(DEPDIR)/libglui_a-quaternion.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/quaternion.cpp' object='libglui_a-quaternion.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-quaternion.o `test -f 'glui/quaternion.cpp' || echo '$(srcdir)/'`glui/quaternion.cpp
+
+libglui_a-quaternion.obj: glui/quaternion.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-quaternion.obj -MD -MP -MF $(DEPDIR)/libglui_a-quaternion.Tpo -c -o libglui_a-quaternion.obj `if test -f 'glui/quaternion.cpp'; then $(CYGPATH_W) 'glui/quaternion.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/quaternion.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-quaternion.Tpo $(DEPDIR)/libglui_a-quaternion.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/quaternion.cpp' object='libglui_a-quaternion.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-quaternion.obj `if test -f 'glui/quaternion.cpp'; then $(CYGPATH_W) 'glui/quaternion.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/quaternion.cpp'; fi`
+
+libglui_a-glui_window.o: glui/glui_window.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_window.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_window.Tpo -c -o libglui_a-glui_window.o `test -f 'glui/glui_window.cpp' || echo '$(srcdir)/'`glui/glui_window.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_window.Tpo $(DEPDIR)/libglui_a-glui_window.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_window.cpp' object='libglui_a-glui_window.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_window.o `test -f 'glui/glui_window.cpp' || echo '$(srcdir)/'`glui/glui_window.cpp
+
+libglui_a-glui_window.obj: glui/glui_window.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_window.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_window.Tpo -c -o libglui_a-glui_window.obj `if test -f 'glui/glui_window.cpp'; then $(CYGPATH_W) 'glui/glui_window.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_window.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_window.Tpo $(DEPDIR)/libglui_a-glui_window.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_window.cpp' object='libglui_a-glui_window.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_window.obj `if test -f 'glui/glui_window.cpp'; then $(CYGPATH_W) 'glui/glui_window.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_window.cpp'; fi`
+
+libglui_a-glui_list.o: glui/glui_list.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_list.o -MD -MP -MF $(DEPDIR)/libglui_a-glui_list.Tpo -c -o libglui_a-glui_list.o `test -f 'glui/glui_list.cpp' || echo '$(srcdir)/'`glui/glui_list.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_list.Tpo $(DEPDIR)/libglui_a-glui_list.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_list.cpp' object='libglui_a-glui_list.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_list.o `test -f 'glui/glui_list.cpp' || echo '$(srcdir)/'`glui/glui_list.cpp
+
+libglui_a-glui_list.obj: glui/glui_list.cpp
+@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -MT libglui_a-glui_list.obj -MD -MP -MF $(DEPDIR)/libglui_a-glui_list.Tpo -c -o libglui_a-glui_list.obj `if test -f 'glui/glui_list.cpp'; then $(CYGPATH_W) 'glui/glui_list.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_list.cpp'; fi`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libglui_a-glui_list.Tpo $(DEPDIR)/libglui_a-glui_list.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='glui/glui_list.cpp' object='libglui_a-glui_list.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libglui_a_CXXFLAGS) $(CXXFLAGS) -c -o libglui_a-glui_list.obj `if test -f 'glui/glui_list.cpp'; then $(CYGPATH_W) 'glui/glui_list.cpp'; else $(CYGPATH_W) '$(srcdir)/glui/glui_list.cpp'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+ pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/bullet/Extras/glui/CMakeLists.txt b/tests/bullet/Extras/glui/CMakeLists.txt
new file mode 100644
index 00000000..c2018a78
--- /dev/null
+++ b/tests/bullet/Extras/glui/CMakeLists.txt
@@ -0,0 +1,66 @@
+# This is basically the overall name of the project in Visual Studio this is the name of the Solution File
+
+ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS)
+
+# For every executable you have with a main method you should have an add_executable line below.
+# For every add executable line you should list every .cpp and .h file you have associated with that executable.
+
+
+# This is the variable for Windows. I use this to define the root of my directory structure.
+SET(GLUT_ROOT ${BULLET_PHYSICS_SOURCE_DIR}/glut)
+
+# You shouldn't have to modify anything below this line
+########################################################
+
+
+# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
+# This should be the case.
+INCLUDE (${CMAKE_ROOT}/Modules/FindGLU.cmake)
+INCLUDE (${CMAKE_ROOT}/Modules/FindGLUT.cmake)
+INCLUDE (${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
+
+
+IF (WIN32)
+ # This is the Windows code for which Opengl, and Glut are not properly installed
+ # since I can't install them I must cheat and copy libraries around
+ INCLUDE_DIRECTORIES(${GLUT_ROOT})
+ # LINK_DIRECTORIES(${GLUT_ROOT}\\lib)
+ # IF (${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
+ # LINK_LIBRARIES(${GLUT_ROOT}\\lib\\glut32 ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY})
+ # TARGET_LINK_LIBRARIES(table ${GLUT_ROOT}\\lib\\glut32)
+#
+# ADD_CUSTOM_COMMAND(TARGET table POST_BUILD COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs2005\\Debug
+# COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs2003\\Debug
+# COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs6\\Debug)
+# ELSE (${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
+# LINK_LIBRARIES(${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
+# TARGET_LINK_LIBRARIES(table ${GLUT_glut_LIBRARY})
+# ENDIF(${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
+# TARGET_LINK_LIBRARIES(table ${OPENGL_gl_LIBRARY})
+# TARGET_LINK_LIBRARIES(table ${OPENGL_glu_LIBRARY})
+ELSE (WIN32)
+ # This is the lines for linux. This should always work if everything is installed and working fine.
+# SET(CMAKE_BUILD_TYPE Debug)
+# SET(CMAKE_CXX_FLAGS_DEBUG "-g")
+ INCLUDE_DIRECTORIES(/usr/include /usr/local/include ${GLUT_INCLUDE_DIR})
+# TARGET_LINK_LIBRARIES(table ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
+# TARGET_LINK_LIBRARIES(checker ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
+ENDIF (WIN32)
+
+INCLUDE_DIRECTORIES(
+${BULLET_PHYSICS_SOURCE_DIR}/Extras/glui
+)
+
+ADD_LIBRARY(GLUI
+ arcball.h glui_checkbox.cpp glui_internal.h glui_panel.cpp glui_spinner.cpp glui_treepanel.cpp
+GL glui.cpp glui_column.cpp glui_internal_control.h glui_radio.cpp glui_statictext.cpp glui_window.cpp
+glui_add_controls.cpp glui_commandline.cpp glui_list.cpp glui_rollout.cpp glui_string.cpp quaternion.cpp
+algebra3.cpp glui_bitmap_img_data.cpp glui_control.cpp glui_listbox.cpp glui_rotation.cpp glui_textbox.cpp quaternion.h
+algebra3.h glui_bitmaps.cpp glui_edittext.cpp glui_mouse_iaction.cpp glui_scrollbar.cpp glui_translation.cpp
+arcball.cpp glui_button.cpp glui_filebrowser.cpp glui_node.cpp glui_separator.cpp glui_tree.cpp
+
+)
+
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(GLUI ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
+ENDIF (BUILD_SHARED_LIBS)
diff --git a/tests/bullet/Extras/glui/GL/glui.h b/tests/bullet/Extras/glui/GL/glui.h
new file mode 100644
index 00000000..b2229415
--- /dev/null
+++ b/tests/bullet/Extras/glui/GL/glui.h
@@ -0,0 +1,2723 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit (LGPL)
+ ----------------------------------
+
+ glui.h - Main (and only) external header for
+ GLUI User Interface Toolkit
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#ifndef GLUI_GLUI_H
+#define GLUI_GLUI_H
+
+#ifdef WIN32
+ #pragma warning(disable : 4324) // disable padding warning
+ #pragma warning(disable:4530) // Disable the exception disable but used in MSCV Stl warning.
+ #pragma warning(disable:4996) //Turn off warnings about deprecated C routines
+ #pragma warning(disable:4786) // Disable the "debug name too long" warning
+#endif
+
+
+#ifdef WIN32//for glut.h
+#include <windows.h>
+#endif
+
+#if defined(GLUI_FREEGLUT) || defined(BT_USE_FREEGLUT)
+
+ // FreeGLUT does not yet work perfectly with GLUI
+ // - use at your own risk.
+ #include <GL/freeglut.h>
+
+#elif defined(GLUI_OPENGLUT)
+
+ // OpenGLUT does not yet work properly with GLUI
+ // - use at your own risk.
+
+ #include <GL/openglut.h>
+
+#else
+
+#if defined(__APPLE__) && !defined (VMDMESA)
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glu.h>
+ #include <GLUT/glut.h>
+#else
+// #include "../../freeglut/gl/glut.h"
+ #include <GL/glut.h>
+ #endif
+
+#endif
+
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#include <string>
+#include <vector>
+
+#define GLUI_VERSION 2.3f /********** Current version **********/
+
+#if defined(_WIN32)
+#if !defined(GLUI_NO_LIB_PRAGMA)
+//#pragma comment(lib, "glui32.lib") // Link automatically with GLUI library
+#endif
+#endif
+
+/********** Do some basic defines *******/
+
+#ifndef Byte
+#define Byte unsigned char
+#endif
+
+#ifndef _RGBC_
+class RGBc {
+public:
+ Byte r, g, b;
+
+ void set(Byte r,Byte g,Byte b) {this->r=r;this->g=g;this->b=b;}
+
+ RGBc( void ) {}
+ RGBc( Byte r, Byte g, Byte b ) { set( r, g, b ); }
+};
+#define _RGBC_
+#endif
+
+/********** List of GLUT callbacks ********/
+
+enum GLUI_Glut_CB_Types
+{
+ GLUI_GLUT_RESHAPE,
+ GLUI_GLUT_KEYBOARD,
+ GLUI_GLUT_DISPLAY,
+ GLUI_GLUT_MOUSE,
+ GLUI_GLUT_MOTION,
+ GLUI_GLUT_SPECIAL,
+ GLUI_GLUT_SPECIAL_UP,
+ GLUI_GLUT_PASSIVE_MOTION,
+ GLUI_GLUT_ENTRY,
+ GLUI_GLUT_VISIBILITY
+};
+
+/********* Constants for window placement **********/
+
+#define GLUI_XOFF 6
+#define GLUI_YOFF 6
+#define GLUI_ITEMSPACING 3
+#define GLUI_CHECKBOX_SIZE 13
+#define GLUI_RADIOBUTTON_SIZE 13
+#define GLUI_BUTTON_SIZE 20
+#define GLUI_STATICTEXT_SIZE 13
+#define GLUI_SEPARATOR_HEIGHT 8
+#define GLUI_DEFAULT_CONTROL_WIDTH 100
+#define GLUI_DEFAULT_CONTROL_HEIGHT 13
+#define GLUI_EDITTEXT_BOXINNERMARGINX 3
+#define GLUI_EDITTEXT_HEIGHT 20
+#define GLUI_EDITTEXT_WIDTH 130
+#define GLUI_EDITTEXT_MIN_INT_WIDTH 35
+#define GLUI_EDITTEXT_MIN_TEXT_WIDTH 50
+#define GLUI_PANEL_NAME_DROP 8
+#define GLUI_PANEL_EMBOSS_TOP 4
+/* #define GLUI_ROTATION_WIDTH 60 */
+/* #define GLUI_ROTATION_HEIGHT 78 */
+#define GLUI_ROTATION_WIDTH 50
+#define GLUI_ROTATION_HEIGHT (GLUI_ROTATION_WIDTH+18)
+#define GLUI_MOUSE_INTERACTION_WIDTH 50
+#define GLUI_MOUSE_INTERACTION_HEIGHT (GLUI_MOUSE_INTERACTION_WIDTH)+18
+
+/** Different panel control types **/
+#define GLUI_PANEL_NONE 0
+#define GLUI_PANEL_EMBOSSED 1
+#define GLUI_PANEL_RAISED 2
+
+/** Max # of els in control's float_array **/
+#define GLUI_DEF_MAX_ARRAY 30
+
+/********* The control's 'active' behavior *********/
+#define GLUI_CONTROL_ACTIVE_MOUSEDOWN 1
+#define GLUI_CONTROL_ACTIVE_PERMANENT 2
+
+/********* Control alignment types **********/
+#define GLUI_ALIGN_CENTER 1
+#define GLUI_ALIGN_RIGHT 2
+#define GLUI_ALIGN_LEFT 3
+
+/********** Limit types - how to limit spinner values *********/
+#define GLUI_LIMIT_NONE 0
+#define GLUI_LIMIT_CLAMP 1
+#define GLUI_LIMIT_WRAP 2
+
+/********** Translation control types ********************/
+#define GLUI_TRANSLATION_XY 0
+#define GLUI_TRANSLATION_Z 1
+#define GLUI_TRANSLATION_X 2
+#define GLUI_TRANSLATION_Y 3
+
+#define GLUI_TRANSLATION_LOCK_NONE 0
+#define GLUI_TRANSLATION_LOCK_X 1
+#define GLUI_TRANSLATION_LOCK_Y 2
+
+/********** How was a control activated? *****************/
+#define GLUI_ACTIVATE_MOUSE 1
+#define GLUI_ACTIVATE_TAB 2
+
+/********** What type of live variable does a control have? **********/
+#define GLUI_LIVE_NONE 0
+#define GLUI_LIVE_INT 1
+#define GLUI_LIVE_FLOAT 2
+#define GLUI_LIVE_TEXT 3
+#define GLUI_LIVE_STRING 6
+#define GLUI_LIVE_DOUBLE 4
+#define GLUI_LIVE_FLOAT_ARRAY 5
+
+/************* Textbox and List Defaults - JVK ******************/
+#define GLUI_TEXTBOX_HEIGHT 130
+#define GLUI_TEXTBOX_WIDTH 130
+#define GLUI_LIST_HEIGHT 130
+#define GLUI_LIST_WIDTH 130
+#define GLUI_DOUBLE_CLICK 1
+#define GLUI_SINGLE_CLICK 0
+#define GLUI_TAB_WIDTH 50 /* In pixels */
+#define GLUI_TEXTBOX_BOXINNERMARGINX 3
+#define GLUI_TEXTBOX_MIN_TEXT_WIDTH 50
+#define GLUI_LIST_BOXINNERMARGINX 3
+#define GLUI_LIST_MIN_TEXT_WIDTH 50
+
+/*********************** TreePanel Defaults - JVK *****************************/
+#define GLUI_TREEPANEL_DEFAULTS 0 // bar, standard bar color
+#define GLUI_TREEPANEL_ALTERNATE_COLOR 1 // Alternate between 8 different bar colors
+#define GLUI_TREEPANEL_ENABLE_BAR 2 // enable the bar
+#define GLUI_TREEPANEL_DISABLE_BAR 4 // disable the bar
+#define GLUI_TREEPANEL_DISABLE_DEEPEST_BAR 8 // disable only the deepest bar
+#define GLUI_TREEPANEL_CONNECT_CHILDREN_ONLY 16 // disable only the bar of the last child of each root
+#define GLUI_TREEPANEL_DISPLAY_HIERARCHY 32 // display some sort of hierachy in the tree node title
+#define GLUI_TREEPANEL_HIERARCHY_NUMERICDOT 64 // display hierarchy in 1.3.2 (etc... ) format
+#define GLUI_TREEPANEL_HIERARCHY_LEVEL_ONLY 128 // display hierarchy as only the level depth
+
+/******************* GLUI Scrollbar Defaults - JVK ***************************/
+#define GLUI_SCROLL_ARROW_WIDTH 16
+#define GLUI_SCROLL_ARROW_HEIGHT 16
+#define GLUI_SCROLL_BOX_MIN_HEIGHT 5
+#define GLUI_SCROLL_BOX_STD_HEIGHT 16
+#define GLUI_SCROLL_STATE_NONE 0
+#define GLUI_SCROLL_STATE_UP 1
+#define GLUI_SCROLL_STATE_DOWN 2
+#define GLUI_SCROLL_STATE_BOTH 3
+#define GLUI_SCROLL_STATE_SCROLL 4
+#define GLUI_SCROLL_DEFAULT_GROWTH_EXP 1.05f
+#define GLUI_SCROLL_VERTICAL 0
+#define GLUI_SCROLL_HORIZONTAL 1
+
+
+/** Size of the character width hash table for faster lookups.
+ Make sure to keep this a power of two to avoid the slow divide.
+ This is also a speed/memory tradeoff; 128 is enough for low ASCII.
+*/
+#define CHAR_WIDTH_HASH_SIZE 128
+
+/********** Translation codes **********/
+
+enum TranslationCodes
+{
+ GLUI_TRANSLATION_MOUSE_NONE = 0,
+ GLUI_TRANSLATION_MOUSE_UP,
+ GLUI_TRANSLATION_MOUSE_DOWN,
+ GLUI_TRANSLATION_MOUSE_LEFT,
+ GLUI_TRANSLATION_MOUSE_RIGHT,
+ GLUI_TRANSLATION_MOUSE_UP_LEFT,
+ GLUI_TRANSLATION_MOUSE_UP_RIGHT,
+ GLUI_TRANSLATION_MOUSE_DOWN_LEFT,
+ GLUI_TRANSLATION_MOUSE_DOWN_RIGHT
+};
+
+/************ A string type for us to use **********/
+
+typedef std::string GLUI_String;
+GLUI_String& glui_format_str(GLUI_String &str, const char* fmt, ...);
+
+/********* Pre-declare classes as needed *********/
+
+class GLUI;
+class GLUI_Control;
+class GLUI_Listbox;
+class GLUI_StaticText;
+class GLUI_EditText;
+class GLUI_Panel;
+class GLUI_Spinner;
+class GLUI_RadioButton;
+class GLUI_RadioGroup;
+class GLUI_Glut_Window;
+class GLUI_TreePanel;
+class GLUI_Scrollbar;
+class GLUI_List;
+
+class Arcball;
+
+/*** Flags for GLUI class constructor ***/
+#define GLUI_SUBWINDOW ((long)(1<<1))
+#define GLUI_SUBWINDOW_TOP ((long)(1<<2))
+#define GLUI_SUBWINDOW_BOTTOM ((long)(1<<3))
+#define GLUI_SUBWINDOW_LEFT ((long)(1<<4))
+#define GLUI_SUBWINDOW_RIGHT ((long)(1<<5))
+
+/*** Codes for different type of edittext boxes and spinners ***/
+#define GLUI_EDITTEXT_TEXT 1
+#define GLUI_EDITTEXT_INT 2
+#define GLUI_EDITTEXT_FLOAT 3
+#define GLUI_SPINNER_INT GLUI_EDITTEXT_INT
+#define GLUI_SPINNER_FLOAT GLUI_EDITTEXT_FLOAT
+#define GLUI_SCROLL_INT GLUI_EDITTEXT_INT
+#define GLUI_SCROLL_FLOAT GLUI_EDITTEXT_FLOAT
+// This is only for deprecated interface
+#define GLUI_EDITTEXT_STRING 4
+
+/*** Definition of callbacks ***/
+typedef void (*GLUI_Update_CB) (int id);
+typedef void (*GLUI_Control_CB)(GLUI_Control *);
+typedef void (*Int1_CB) (int);
+typedef void (*Int2_CB) (int, int);
+typedef void (*Int3_CB) (int, int, int);
+typedef void (*Int4_CB) (int, int, int, int);
+
+/************************************************************/
+/**
+ Callback Adapter Class
+ Allows us to support different types of callbacks;
+ like a GLUI_Update_CB function pointer--which takes an int;
+ and a GLUI_Control_CB function pointer--which takes a GUI_Control object.
+*/
+class GLUI_CB
+{
+public:
+ GLUI_CB() : idCB(0),objCB(0) {}
+ GLUI_CB(GLUI_Update_CB cb) : idCB(cb),objCB(0) {}
+ GLUI_CB(GLUI_Control_CB cb) : idCB(0),objCB(cb) {}
+ // (Compiler generated copy constructor)
+
+ /** This control just activated. Fire our callback.*/
+ void operator()(GLUI_Control *ctrl) const;
+ bool operator!() const { return !idCB && !objCB; }
+ operator bool() const { return !(!(*this)); }
+private:
+ GLUI_Update_CB idCB;
+ GLUI_Control_CB objCB;
+};
+
+/************************************************************/
+/* */
+/* Base class, for hierarchical relationships */
+/* */
+/************************************************************/
+
+class GLUI_Control;
+class GLUI_Column;
+class GLUI_Panel;
+class GLUI_FileBrowser;
+class GLUI_Scrollbar;
+class GLUI_Listbox;
+class GLUI_List;
+class GLUI_Rollout;
+class GLUI_Tree;
+
+
+/**
+ GLUI_Node is a node in a sort of tree of GLUI controls.
+ Each GLUI_Node has a list of siblings (in a circular list)
+ and a linked list of children.
+
+ Everything onscreen is a GLUI_Node--windows, buttons, etc.
+ The nodes are traversed for event processing, sizing, redraws, etc.
+*/
+class GLUI_Node
+{
+ friend class GLUI_Tree; /* JVK */
+ friend class GLUI_Rollout;
+ friend class GLUI_Main;
+
+public:
+ GLUI_Node();
+ virtual ~GLUI_Node() {}
+
+ GLUI_Node *first_sibling();
+ GLUI_Node *last_sibling();
+ GLUI_Node *prev();
+ GLUI_Node *next();
+
+ GLUI_Node *first_child() { return child_head; }
+ GLUI_Node *last_child() { return child_tail; }
+ GLUI_Node *parent() { return parent_node; }
+
+ /** Link in a new child control */
+ virtual int add_control( GLUI_Control *control );
+
+ void link_this_to_parent_last (GLUI_Node *parent );
+ void link_this_to_parent_first(GLUI_Node *parent );
+ void link_this_to_sibling_next(GLUI_Node *sibling );
+ void link_this_to_sibling_prev(GLUI_Node *sibling );
+ void unlink();
+
+ void dump( FILE *out, const char *name );
+
+ virtual GLUI_Panel* dynamicCastGLUI_Panel()
+ {
+ return 0;
+ }
+
+ virtual GLUI_Column* dynamicCastGLUI_Column()
+ {
+ return 0;
+ }
+ virtual GLUI_EditText* dynamicCastGLUI_EditText()
+ {
+ return 0;
+ }
+ virtual GLUI_Rollout* dynamicCastGLUI_Rollout()
+ {
+ return 0;
+ }
+
+ virtual GLUI_Tree* dynamicCastGLUI_Tree()
+ {
+ return 0;
+ }
+
+ virtual GLUI_List* dynamicCastGLUI_List()
+ {
+ return 0;
+ }
+
+ virtual GLUI_FileBrowser* dynamicCastGLUI_FileBrowser()
+ {
+ return 0;
+ }
+
+ virtual GLUI_Scrollbar* dynamicCastGLUI_Scrollbar()
+ {
+ return 0;
+ }
+
+ virtual GLUI_Listbox* dynamicCastGLUI_Listbox()
+ {
+ return 0;
+ }
+
+ virtual GLUI_TreePanel* dynamicCastGLUI_TreePanel()
+ {
+ return 0;
+ }
+
+
+
+protected:
+ static void add_child_to_control(GLUI_Node *parent,GLUI_Control *child);
+ GLUI_Node *parent_node;
+ GLUI_Node *child_head;
+ GLUI_Node *child_tail;
+ GLUI_Node *next_sibling;
+ GLUI_Node *prev_sibling;
+};
+
+
+/************************************************************/
+/* */
+/* Standard Bitmap stuff */
+/* */
+/************************************************************/
+
+enum GLUI_StdBitmaps_Codes
+{
+ GLUI_STDBITMAP_CHECKBOX_OFF = 0,
+ GLUI_STDBITMAP_CHECKBOX_ON,
+ GLUI_STDBITMAP_RADIOBUTTON_OFF,
+ GLUI_STDBITMAP_RADIOBUTTON_ON,
+ GLUI_STDBITMAP_UP_ARROW,
+ GLUI_STDBITMAP_DOWN_ARROW,
+ GLUI_STDBITMAP_LEFT_ARROW,
+ GLUI_STDBITMAP_RIGHT_ARROW,
+ GLUI_STDBITMAP_SPINNER_UP_OFF,
+ GLUI_STDBITMAP_SPINNER_UP_ON,
+ GLUI_STDBITMAP_SPINNER_DOWN_OFF,
+ GLUI_STDBITMAP_SPINNER_DOWN_ON,
+ GLUI_STDBITMAP_CHECKBOX_OFF_DIS, /*** Disactivated control bitmaps ***/
+ GLUI_STDBITMAP_CHECKBOX_ON_DIS,
+ GLUI_STDBITMAP_RADIOBUTTON_OFF_DIS,
+ GLUI_STDBITMAP_RADIOBUTTON_ON_DIS,
+ GLUI_STDBITMAP_SPINNER_UP_DIS,
+ GLUI_STDBITMAP_SPINNER_DOWN_DIS,
+ GLUI_STDBITMAP_LISTBOX_UP,
+ GLUI_STDBITMAP_LISTBOX_DOWN,
+ GLUI_STDBITMAP_LISTBOX_UP_DIS,
+ GLUI_STDBITMAP_NUM_ITEMS
+};
+
+/************************************************************/
+/* */
+/* Class GLUI_Bitmap */
+/* */
+/************************************************************/
+
+/**
+ GLUI_Bitmap is a simple 2D texture map. It's used
+ to represent small textures like checkboxes, arrows, etc.
+ via the GLUI_StdBitmaps class.
+*/
+class GLUI_Bitmap
+{
+ friend class GLUI_StdBitmaps;
+
+public:
+ GLUI_Bitmap();
+ ~GLUI_Bitmap();
+
+ /** Create bitmap from greyscale byte image */
+ void init_grey(unsigned char *array);
+
+ /** Create bitmap from color int image */
+ void init(int *array);
+
+private:
+ /** RGB pixel data */
+ unsigned char *pixels;
+ int w, h;
+};
+
+
+/************************************************************/
+/* */
+/* Class GLUI_StdBitmap */
+/* */
+/************************************************************/
+
+/**
+ Keeps an array of GLUI_Bitmap objects to represent all the
+ images used in the UI: checkboxes, arrows, etc.
+*/
+class GLUI_StdBitmaps
+{
+public:
+ GLUI_StdBitmaps();
+ ~GLUI_StdBitmaps();
+
+ /** Return the width (in pixels) of the n'th standard bitmap. */
+ int width (int n) const;
+ /** Return the height (in pixels) of the n'th standard bitmap. */
+ int height(int n) const;
+
+ /** Draw the n'th standard bitmap (one of the enums
+ listed in GLUI_StdBitmaps_Codes) at pixel corner (x,y).
+ */
+ void draw(int n, int x, int y) const;
+
+private:
+ GLUI_Bitmap bitmaps[GLUI_STDBITMAP_NUM_ITEMS];
+};
+
+/************************************************************/
+/* */
+/* Master GLUI Class */
+/* */
+/************************************************************/
+
+/**
+ The master manages our interaction with GLUT.
+ There's only one GLUI_Master_Object.
+*/
+class GLUI_Master_Object
+{
+
+ friend void glui_idle_func();
+
+public:
+
+ GLUI_Master_Object();
+ ~GLUI_Master_Object();
+
+ GLUI_Node gluis;
+ GLUI_Control *active_control, *curr_left_button_glut_menu;
+ GLUI *active_control_glui;
+ int glui_id_counter;
+
+ GLUI_Glut_Window *find_glut_window( int window_id );
+
+ void set_glutIdleFunc(void (*f)(void));
+
+ /**************
+ void (*glut_keyboard_CB)(unsigned char, int, int);
+ void (*glut_reshape_CB)(int, int);
+ void (*glut_special_CB)(int, int, int);
+ void (*glut_mouse_CB)(int,int,int,int);
+
+ void (*glut_passive_motion_CB)(int,int);
+ void (*glut_visibility_CB)(int);
+ void (*glut_motion_CB)(int,int);
+ void (*glut_display_CB)(void);
+ void (*glut_entry_CB)(int);
+ **********/
+
+ void set_left_button_glut_menu_control( GLUI_Control *control );
+
+ /********** GLUT callthroughs **********/
+ /* These are the glut callbacks that we do not handle */
+
+ void set_glutReshapeFunc (void (*f)(int width, int height));
+ void set_glutKeyboardFunc(void (*f)(unsigned char key, int x, int y));
+ void set_glutSpecialFunc (void (*f)(int key, int x, int y));
+ void set_glutSpecialUpFunc(void (*f)(int key, int x, int y));
+
+ void set_glutMouseFunc (void (*f)(int, int, int, int ));
+
+ void set_glutDisplayFunc(void (*f)(void)) {glutDisplayFunc(f);}
+ void set_glutTimerFunc(unsigned int millis, void (*f)(int value), int value)
+ { ::glutTimerFunc(millis,f,value);}
+ void set_glutOverlayDisplayFunc(void(*f)(void)){glutOverlayDisplayFunc(f);}
+ void set_glutSpaceballMotionFunc(Int3_CB f) {glutSpaceballMotionFunc(f);}
+ void set_glutSpaceballRotateFunc(Int3_CB f) {glutSpaceballRotateFunc(f);}
+ void set_glutSpaceballButtonFunc(Int2_CB f) {glutSpaceballButtonFunc(f);}
+ void set_glutTabletMotionFunc(Int2_CB f) {glutTabletMotionFunc(f);}
+ void set_glutTabletButtonFunc(Int4_CB f) {glutTabletButtonFunc(f);}
+ /* void set_glutWindowStatusFunc(Int1_CB f) {glutWindowStatusFunc(f);} */
+ void set_glutMenuStatusFunc(Int3_CB f) {glutMenuStatusFunc(f);}
+ void set_glutMenuStateFunc(Int1_CB f) {glutMenuStateFunc(f);}
+ void set_glutButtonBoxFunc(Int2_CB f) {glutButtonBoxFunc(f);}
+ void set_glutDialsFunc(Int2_CB f) {glutDialsFunc(f);}
+
+
+ GLUI *create_glui( const char *name, long flags=0, int x=-1, int y=-1 );
+ GLUI *create_glui_subwindow( int parent_window, long flags=0 );
+ GLUI *find_glui_by_window_id( int window_id );
+ void get_viewport_area( int *x, int *y, int *w, int *h );
+ void auto_set_viewport();
+ void close_all();
+ void sync_live_all();
+
+ void reshape();
+
+ float get_version() { return GLUI_VERSION; }
+
+ void glui_setIdleFuncIfNecessary(void);
+
+private:
+ GLUI_Node glut_windows;
+ void (*glut_idle_CB)(void);
+
+ void add_cb_to_glut_window(int window,int cb_type,void *cb);
+};
+
+/**
+ This is the only GLUI_Master_Object in existence.
+*/
+extern GLUI_Master_Object GLUI_Master;
+
+/************************************************************/
+/* */
+/* Class for managing a GLUT window */
+/* */
+/************************************************************/
+
+/**
+ A top-level window. The GLUI_Master GLUT callback can route events
+ to the callbacks in this class, for arbitrary use by external users.
+ (see GLUI_Master_Object::set_glutKeyboardFunc).
+
+ This entire approach seems to be superceded by the "subwindow" flavor
+ of GLUI.
+*/
+class GLUI_Glut_Window : public GLUI_Node
+{
+public:
+ GLUI_Glut_Window();
+
+ int glut_window_id;
+
+ /*********** Pointers to GLUT callthrough functions *****/
+ void (*glut_keyboard_CB)(unsigned char, int, int);
+ void (*glut_special_CB)(int, int, int);
+ void (*glut_special_up_CB)(int, int, int);
+ void (*glut_reshape_CB)(int, int);
+ void (*glut_passive_motion_CB)(int,int);
+ void (*glut_mouse_CB)(int,int,int,int);
+ void (*glut_visibility_CB)(int);
+ void (*glut_motion_CB)(int,int);
+ void (*glut_display_CB)(void);
+ void (*glut_entry_CB)(int);
+};
+
+/************************************************************/
+/* */
+/* Main Window GLUI class (not user-level) */
+/* */
+/************************************************************/
+
+/**
+ A GLUI_Main handles GLUT events for one window, routing them to the
+ appropriate controls. The central user-visible "GLUI" class
+ inherits from this class; users should not allocate GLUT_Main objects.
+
+ There's a separate GLUI_Main object for:
+ - Each top-level window with GUI stuff in it.
+ - Each "subwindow" of another top-level window.
+
+ All the GLUI_Main objects are listed in GLUI_Master.gluis.
+ A better name for this class might be "GLUI_Environment";
+ this class provides the window-level context for every control.
+*/
+class GLUI_Main : public GLUI_Node
+{
+ /********** Friend classes *************/
+
+ friend class GLUI_Control;
+ friend class GLUI_Rotation;
+ friend class GLUI_Translation;
+ friend class GLUI;
+ friend class GLUI_Master_Object;
+
+ /*********** Friend functions **********/
+
+ friend void glui_mouse_func(int button, int state, int x, int y);
+ friend void glui_keyboard_func(unsigned char key, int x, int y);
+ friend void glui_special_func(int key, int x, int y);
+ friend void glui_special_up_func(int key, int x, int y);
+ friend void glui_passive_motion_func(int x, int y);
+ friend void glui_reshape_func( int w, int h );
+ friend void glui_visibility_func(int state);
+ friend void glui_motion_func(int x, int y);
+ friend void glui_entry_func(int state);
+ friend void glui_display_func( void );
+ friend void glui_idle_func(void);
+
+ friend void glui_parent_window_reshape_func( int w, int h );
+ friend void glui_parent_window_keyboard_func( unsigned char, int, int );
+ friend void glui_parent_window_special_func( int, int, int );
+ friend void glui_parent_window_mouse_func( int, int, int, int );
+
+protected:
+ /*** Variables ***/
+ int main_gfx_window_id;
+ int mouse_button_down;
+ int glut_window_id;
+ int top_level_glut_window_id;
+ GLUI_Control *active_control;
+ GLUI_Control *mouse_over_control;
+ GLUI_Panel *main_panel;
+ enum buffer_mode_t {
+ buffer_front=1, ///< Draw updated controls directly to screen.
+ buffer_back=2 ///< Double buffering: postpone updates until next redraw.
+ };
+ buffer_mode_t buffer_mode; ///< Current drawing mode
+ int curr_cursor;
+ int w, h;
+ long flags;
+ bool closing;
+ int parent_window;
+ int glui_id;
+
+ /********** Misc functions *************/
+
+ GLUI_Control *find_control( int x, int y );
+ GLUI_Control *find_next_control( GLUI_Control *control );
+ GLUI_Control *find_next_control_rec( GLUI_Control *control );
+ GLUI_Control *find_next_control_( GLUI_Control *control );
+ GLUI_Control *find_prev_control( GLUI_Control *control );
+ void create_standalone_window( const char *name, int x=-1, int y=-1 );
+ void create_subwindow( int parent,int window_alignment );
+ void setup_default_glut_callbacks( void );
+
+ void mouse(int button, int state, int x, int y);
+ void keyboard(unsigned char key, int x, int y);
+ void special(int key, int x, int y);
+ void special_up(int key, int x, int y);
+ void passive_motion(int x, int y);
+ void reshape( int w, int h );
+ void visibility(int state);
+ void motion(int x, int y);
+ void entry(int state);
+ void display( void );
+ void idle(void);
+ int needs_idle(void);
+
+ void (*glut_mouse_CB)(int, int, int, int);
+ void (*glut_keyboard_CB)(unsigned char, int, int);
+ void (*glut_special_CB)(int, int, int);
+ void (*glut_reshape_CB)(int, int);
+
+
+ /*********** Controls ************/
+
+ virtual int add_control( GLUI_Node *parent, GLUI_Control *control );
+
+
+ /********** Constructors and Destructors ***********/
+
+ GLUI_Main( void );
+
+public:
+ GLUI_StdBitmaps std_bitmaps;
+ GLUI_String window_name;
+ RGBc bkgd_color;
+ float bkgd_color_f[3];
+
+ void *font;
+ int curr_modifiers;
+
+ void adjust_glut_xy( int &x, int &y ) { (void)x; y = h-y; }
+ void activate_control( GLUI_Control *control, int how );
+ void align_controls( GLUI_Control *control );
+ void deactivate_current_control( void );
+
+ /** Draw a 3D-look pushed-out box around this rectangle */
+ void draw_raised_box( int x, int y, int w, int h );
+ /** Draw a 3D-look pushed-in box around this rectangle */
+ void draw_lowered_box( int x, int y, int w, int h );
+
+ /** Return true if this control should redraw itself immediately (front buffer);
+ Or queue up a redraw and return false if it shouldn't (back buffer).
+ */
+ bool should_redraw_now(GLUI_Control *ctl);
+
+ int getMainWindowId()
+ {
+ return main_gfx_window_id;
+ }
+ /** Switch to the appropriate draw buffer now. Returns the old draw buffer.
+ This routine should probably only be called from inside the GLUI_DrawingSentinal,
+ in glui_internal_control.h
+ */
+ int set_current_draw_buffer();
+ /** Go back to using this draw buffer. Undoes set_current_draw_buffer. */
+ void restore_draw_buffer( int buffer_state );
+
+ /** Pack, resize the window, and redraw all the controls. */
+ void refresh();
+
+ /** Redraw the main graphics window */
+ void post_update_main_gfx();
+
+ /** Recompute the sizes and positions of all controls */
+ void pack_controls();
+
+ void close_internal();
+ void check_subwindow_position();
+ void set_ortho_projection();
+ void set_viewport();
+ int get_glut_window_id( void ) { return glut_window_id; } /* JVK */
+};
+
+/************************************************************/
+/* */
+/* GLUI_Control: base class for all controls */
+/* */
+/************************************************************/
+
+//get rid of the dynamic_cast/RTTI requirements, just do a virtual function
+
+
+/**
+ All the GUI objects inherit from GLUI_Control: buttons,
+ checkboxes, labels, edit boxes, scrollbars, etc.
+ Most of the work of this class is in routing events,
+ like keystrokes, mouseclicks, redraws, and sizing events.
+
+ Yes, this is a huge and hideous class. It needs to be
+ split up into simpler subobjects. None of the data members
+ should be directly accessed by users (they should be protected,
+ not public); only subclasses.
+*/
+class GLUI_Control : public GLUI_Node
+{
+public:
+
+/** Onscreen coordinates */
+ int w, h; /* dimensions of control */
+ int x_abs, y_abs;
+ int x_off, y_off_top, y_off_bot; /* INNER margins, by which child
+ controls are indented */
+ int contain_x, contain_y;
+ int contain_w, contain_h;
+ /* if this is a container control (e.g.,
+ radiogroup or panel) this indicated dimensions
+ of inner area in which controls reside */
+
+/** "activation" for tabbing between controls. */
+ int active_type; ///< "GLUI_CONTROL_ACTIVE_..."
+ bool active; ///< If true, we've got the focus
+ bool can_activate; ///< If false, remove from tab order.
+ bool spacebar_mouse_click; ///< Spacebar simulates click.
+
+/** Callbacks */
+ long user_id; ///< Integer to pass to callback function.
+ GLUI_CB callback; ///< User callback function, or NULL.
+
+/** Variable value storage */
+ float float_val; /**< Our float value */
+ int int_val; /**< Our integer value */
+ float float_array_val[GLUI_DEF_MAX_ARRAY];
+ int float_array_size;
+ GLUI_String text; /**< The text inside this control */
+
+/** "Live variable" updating */
+ void *ptr_val; /**< A pointer to the user's live variable value */
+ int live_type;
+ bool live_inited;
+ /* These variables store the last value that live variable was known to have. */
+ int last_live_int;
+ float last_live_float;
+ GLUI_String last_live_text;
+ float last_live_float_array[GLUI_DEF_MAX_ARRAY];
+
+/** Properties of our control */
+ GLUI *glui; /**< Our containing event handler (NEVER NULL during event processing!) */
+ bool is_container; /**< Is this a container class (e.g., panel) */
+ int alignment;
+ bool enabled; /**< Is this control grayed out? */
+ GLUI_String name; /**< The name of this control */
+ void *font; /**< Our glutbitmap font */
+ bool collapsible, is_open;
+ GLUI_Node collapsed_node;
+ bool hidden; /* Collapsed controls (and children) are hidden */
+ int char_widths[CHAR_WIDTH_HASH_SIZE][2]; /* Character width hash table */
+
+public:
+ /*** Get/Set values ***/
+ virtual void set_name( const char *string );
+ virtual void set_int_val( int new_int ) { int_val = new_int; output_live(true); }
+ virtual void set_float_val( float new_float ) { float_val = new_float; output_live(true); }
+ virtual void set_ptr_val( void *new_ptr ) { ptr_val = new_ptr; output_live(true); }
+ virtual void set_float_array_val( float *array_ptr );
+
+ virtual float get_float_val( void ) { return float_val; }
+ virtual int get_int_val( void ) { return int_val; }
+ virtual void get_float_array_val( float *array_ptr );
+ virtual int get_id( void ) const { return user_id; }
+ virtual void set_id( int id ) { user_id=id; }
+
+ virtual int mouse_down_handler( int local_x, int local_y ) { (void)local_x; (void)local_y; return false; }
+ virtual int mouse_up_handler( int local_x, int local_y, bool inside ) { (void)local_x; (void)local_y; (void)inside; return false; }
+ virtual int mouse_held_down_handler( int local_x, int local_y, bool inside) { (void)local_x; (void)local_y; (void)inside; return false; }
+ virtual int key_handler( unsigned char key, int modifiers ) { (void)key; (void)modifiers; return false; }
+ virtual int special_handler( int key,int modifiers ) { (void)key; (void)modifiers; return false; }
+ virtual int special_up_handler( int key,int modifiers ) { (void)key; (void)modifiers; return false; }
+
+ virtual void update_size( void ) { }
+ virtual void idle( void ) { }
+ virtual int mouse_over( int state, int x, int y ) { (void)state; (void)x; (void)y; return false; }
+
+ virtual void enable( void );
+ virtual void disable( void );
+ virtual void activate( int how ) { (void)how; active = true; }
+ virtual void deactivate( void ) { active = false; }
+
+ /** Hide (shrink into a rollout) and unhide (expose from a rollout) */
+ void hide_internal( int recurse );
+ void unhide_internal( int recurse );
+
+
+ /** Return true if it currently makes sense to draw this class. */
+ int can_draw( void ) { return (glui != NULL && hidden == false); }
+
+ /** Redraw this control.
+ In single-buffering mode (drawing to GL_FRONT), this is just
+ a call to translate_and_draw_front (after a can_draw() check).
+ In double-buffering mode (drawing to GL_BACK), this queues up
+ a redraw and returns false, since you shouldn't draw yet.
+ */
+ void redraw(void);
+
+ /** Redraw everybody in our window. */
+ void redraw_window(void);
+
+ virtual void align( void );
+ void pack( int x, int y ); /* Recalculate positions and offsets */
+ void pack_old( int x, int y );
+ void draw_recursive( int x, int y );
+ int set_to_glut_window( void );
+ void restore_window( int orig );
+ void translate_and_draw_front( void );
+ void translate_to_origin( void )
+ {glTranslatef((float)x_abs+.5f,(float)y_abs+.5f,0.0f);}
+ virtual void draw( int x, int y )=0;
+ void set_font( void *new_font );
+ void *get_font( void );
+ int string_width( const char *text );
+ int string_width( const GLUI_String &str )
+ { return string_width(str.c_str()); }
+ int char_width( char c );
+
+ void draw_name( int x, int y );
+ void draw_box_inwards_outline( int x_min, int x_max,
+ int y_min, int y_max );
+ void draw_box( int x_min, int x_max, int y_min, int y_max,
+ float r, float g, float b );
+ void draw_bkgd_box( int x_min, int x_max, int y_min, int y_max );
+ void draw_emboss_box( int x_min, int x_max,int y_min,int y_max);
+ void draw_string( const char *text );
+ void draw_string( const GLUI_String &s )
+ { draw_string(s.c_str()); }
+ void draw_char( char c );
+ void draw_active_box( int x_min, int x_max, int y_min, int y_max );
+ void set_to_bkgd_color( void );
+
+ void set_w( int new_w );
+ void set_h( int new_w );
+ void set_alignment( int new_align );
+ void sync_live( int recurse, int draw ); /* Reads live variable */
+ void init_live( void );
+ void output_live( int update_main_gfx ); /** Writes live variable **/
+ virtual void set_text( const char *t ) { (void)t; }
+ void execute_callback( void );
+ void get_this_column_dims( int *col_x, int *col_y,
+ int *col_w, int *col_h,
+ int *col_x_off, int *col_y_off );
+ virtual bool needs_idle( void ) const;
+ virtual bool wants_tabs() const { return false; }
+
+ GLUI_Control(void)
+ {
+ x_off = GLUI_XOFF;
+ y_off_top = GLUI_YOFF;
+ y_off_bot = GLUI_YOFF;
+ x_abs = GLUI_XOFF;
+ y_abs = GLUI_YOFF;
+ active = false;
+ enabled = true;
+ int_val = 0;
+ last_live_int = 0;
+ float_array_size = 0;
+ glui_format_str(name, "Control: %p", this);
+ float_val = 0.0;
+ last_live_float = 0.0;
+ ptr_val = NULL;
+ glui = NULL;
+ w = GLUI_DEFAULT_CONTROL_WIDTH;
+ h = GLUI_DEFAULT_CONTROL_HEIGHT;
+ font = NULL;
+ active_type = GLUI_CONTROL_ACTIVE_MOUSEDOWN;
+ alignment = GLUI_ALIGN_LEFT;
+ is_container = false;
+ can_activate = true; /* By default, you can activate a control */
+ spacebar_mouse_click = true; /* Does spacebar simulate a mouse click? */
+ live_type = GLUI_LIVE_NONE;
+ text = "";
+ last_live_text == "";
+ live_inited = false;
+ collapsible = false;
+ is_open = true;
+ hidden = false;
+ memset(char_widths, -1, sizeof(char_widths)); /* JVK */
+ int i;
+ for( i=0; i<GLUI_DEF_MAX_ARRAY; i++ )
+ float_array_val[i] = last_live_float_array[i] = 0.0;
+ }
+
+ virtual ~GLUI_Control();
+};
+
+/************************************************************/
+/* */
+/* Button class (container) */
+/* */
+/************************************************************/
+/**
+ An onscreen, clickable button--an outlined label that
+ can be clicked. When clicked, a button
+ calls its GLUI_CB callback with its ID.
+*/
+class GLUI_Button : public GLUI_Control
+{
+public:
+ bool currently_inside;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+
+ void draw( int x, int y );
+ void draw_pressed( void );
+ void draw_text( int sunken );
+
+ void update_size( void );
+
+/**
+ Create a new button.
+
+ @param parent The panel our object is inside; or the main GLUI object.
+ @param name The text inside the button.
+ @param id Optional ID number, to pass to the optional callback function.
+ @param callback Optional callback function, taking either the int ID or control.
+*/
+ GLUI_Button( GLUI_Node *parent, const char *name,
+ int id=-1, GLUI_CB cb=GLUI_CB() );
+ GLUI_Button( void ) { common_init(); };
+
+protected:
+ void common_init(void) {
+ glui_format_str(name, "Button: %p", this );
+ h = GLUI_BUTTON_SIZE;
+ w = 100;
+ alignment = GLUI_ALIGN_CENTER;
+ can_activate = true;
+ }
+};
+
+
+/************************************************************/
+/* */
+/* Checkbox class (container) */
+/* */
+/************************************************************/
+
+/**
+ A checkbox, which can be checked on or off. Can be linked
+ to an int value, which gets 1 for on and 0 for off.
+*/
+class GLUI_Checkbox : public GLUI_Control
+{
+public:
+ int orig_value;
+ bool currently_inside;
+ int text_x_offset;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+
+ void update_size( void );
+
+ void draw( int x, int y );
+
+ void draw_active_area( void );
+ void draw_empty_box( void );
+ void set_int_val( int new_val );
+
+/**
+ Create a new checkbox object.
+
+ @param parent The panel our object is inside; or the main GLUI object.
+ @param name Label next to our checkbox.
+ @param value_ptr Optional integer value to attach to this checkbox. When the
+ checkbox is checked or unchecked, *value_ptr will also be changed. ("Live Vars").
+ @param id Optional ID number, to pass to the optional callback function.
+ @param callback Optional callback function, taking either the int ID or control.
+*/
+ GLUI_Checkbox(GLUI_Node *parent, const char *name, int *value_ptr=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB());
+ GLUI_Checkbox( void ) { common_init(); }
+
+protected:
+ void common_init(void) {
+ glui_format_str( name, "Checkbox: %p", this );
+ w = 100;
+ h = GLUI_CHECKBOX_SIZE;
+ orig_value = -1;
+ text_x_offset = 18;
+ can_activate = true;
+ live_type = GLUI_LIVE_INT; /* This control has an 'int' live var */
+ }
+};
+
+/************************************************************/
+/* */
+/* Column class */
+/* */
+/************************************************************/
+
+/**
+ A GLUI_Column object separates all previous controls
+ from subsequent controls with a vertical bar.
+*/
+class GLUI_Column : public GLUI_Control
+{
+public:
+ void draw( int x, int y );
+
+/**
+ Create a new column, which separates the previous controls
+ from subsequent controls.
+
+ @param parent The panel our object is inside; or the main GLUI object.
+ @param draw_bar If true, draw a visible bar between new and old controls.
+*/
+ GLUI_Column( GLUI_Node *parent, int draw_bar = true );
+ GLUI_Column( void ) { common_init(); }
+
+ virtual GLUI_Column* dynamicCastGLUI_Column()
+ {
+ return this;
+ }
+protected:
+ void common_init() {
+ w = 0;
+ h = 0;
+ int_val = 0;
+ can_activate = false;
+ }
+};
+
+
+/************************************************************/
+/* */
+/* Panel class (container) */
+/* */
+/************************************************************/
+
+/**
+ A GLUI_Panel contains a group of related controls.
+*/
+class GLUI_Panel : public GLUI_Control
+{
+public:
+
+/**
+ Create a new panel. A panel groups together a set of related controls.
+
+ @param parent The outer panel our panel is inside; or the main GLUI object.
+ @param name The string name at the top of our panel.
+ @param type Optional style to display the panel with--GLUI_PANEL_EMBOSSED by default.
+ GLUI_PANEL_RAISED causes the panel to appear higher than the surroundings.
+ GLUI_PANEL_NONE causes the panel's outline to be invisible.
+*/
+ GLUI_Panel( GLUI_Node *parent, const char *name,
+ int type=GLUI_PANEL_EMBOSSED );
+ GLUI_Panel() { common_init(); }
+
+ void draw( int x, int y );
+ void set_name( const char *text );
+ void set_type( int new_type );
+
+ void update_size( void );
+
+ virtual GLUI_Panel* dynamicCastGLUI_Panel()
+ {
+ return this;
+ }
+
+protected:
+ void common_init( void ) {
+ w = 300;
+ h = GLUI_DEFAULT_CONTROL_HEIGHT + 7;
+ int_val = GLUI_PANEL_EMBOSSED;
+ alignment = GLUI_ALIGN_CENTER;
+ is_container = true;
+ can_activate = false;
+ name="";
+ };
+};
+
+/************************************************************/
+/* */
+/* File Browser class (container) */
+/* JVK */
+/************************************************************/
+
+/**
+ A list of files the user can select from.
+*/
+class GLUI_FileBrowser : public GLUI_Panel
+{
+public:
+/**
+ Create a new list of files the user can select from.
+
+ @param parent The panel our object is inside; or the main GLUI object.
+ @param name Prompt to give to the user at the top of the file browser.
+ @param frame_type Optional style to display the panel with--GLUI_PANEL_EMBOSSED by default.
+ GLUI_PANEL_RAISED causes the panel to appear higher than the surroundings.
+ GLUI_PANEL_NONE causes the panel's outline to be invisible.
+ @param id Optional ID number, to pass to the optional callback function.
+ @param callback Optional callback function, taking either the int ID or control.
+*/
+ GLUI_FileBrowser( GLUI_Node *parent,
+ const char *name,
+ int frame_type = GLUI_PANEL_EMBOSSED,
+ int user_id = -1,
+ GLUI_CB callback = GLUI_CB());
+
+ GLUI_List *list;
+ GLUI_String current_dir;
+
+ void fbreaddir(const char *);
+ static void dir_list_callback(GLUI_Control*);
+
+ void set_w(int w);
+ void set_h(int h);
+ const char* get_file() { return file.c_str(); }
+ void set_allow_change_dir(int c) { allow_change_dir = c; }
+
+ virtual GLUI_FileBrowser* dynamicCastGLUI_FileBrowser()
+ {
+ return this;
+ }
+
+protected:
+ void common_init()
+ {
+ w = GLUI_DEFAULT_CONTROL_WIDTH;
+ h = GLUI_DEFAULT_CONTROL_HEIGHT;
+ int_val = GLUI_PANEL_EMBOSSED;
+ alignment = GLUI_ALIGN_CENTER;
+ is_container = true;
+ can_activate = false;
+ allow_change_dir = true;
+ last_item = -1;
+ user_id = -1;
+ name = "";
+ current_dir = ".";
+ file = "";
+ };
+
+private:
+ int last_item;
+ GLUI_String file;
+ int allow_change_dir;
+
+};
+
+/************************************************************/
+/* */
+/* Rollout class (container) */
+/* */
+/************************************************************/
+/**
+ A rollout contains a set of controls,
+ like a panel, but can be collapsed to just the name.
+*/
+class GLUI_Rollout : public GLUI_Panel
+{
+public:
+
+/**
+ Create a new rollout. A rollout contains a set of controls,
+ like a panel, but can be collapsed to just the name.
+
+ @param parent The panel our object is inside; or the main GLUI object.
+ @param name String to show at the top of the rollout.
+ @param open Optional boolean. If true (the default), the rollout's controls are displayed.
+ If false, the rollout is closed to display only the name.
+ @param type Optional style to display the panel with--GLUI_PANEL_EMBOSSED by default.
+ GLUI_PANEL_RAISED causes the panel to appear higher than the surroundings.
+ GLUI_PANEL_NONE causes the panel's outline to be invisible.
+*/
+ GLUI_Rollout( GLUI_Node *parent, const char *name, int open=true,
+ int type=GLUI_PANEL_EMBOSSED );
+ GLUI_Rollout( void ) { common_init(); }
+
+
+ bool currently_inside, initially_inside;
+ GLUI_Button button;
+
+ void draw( int x, int y );
+ void draw_pressed( void );
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+
+ void open( void );
+ void close( void );
+
+ void update_size( void );
+
+ virtual GLUI_Rollout* dynamicCastGLUI_Rollout()
+ {
+ return this;
+ }
+
+protected:
+ void common_init() {
+ currently_inside = false;
+ initially_inside = false;
+ can_activate = true;
+ is_container = true;
+ h = GLUI_DEFAULT_CONTROL_HEIGHT + 7;
+ w = GLUI_DEFAULT_CONTROL_WIDTH;
+ y_off_top = 21;
+ collapsible = true;
+ name = "";
+ }
+};
+
+/************************************************************/
+/* */
+/* Tree Panel class (container) */
+/* JVK */
+/************************************************************/
+
+/**
+ One collapsible entry in a GLUI_TreePanel.
+*/
+class GLUI_Tree : public GLUI_Panel
+{
+public:
+ GLUI_Tree(GLUI_Node *parent, const char *name,
+ int open=false, int inset=0);
+
+private:
+ int level; // how deep is this node
+ float red; //Color coding of column line
+ float green;
+ float blue;
+ float lred; //Color coding of level name
+ float lgreen;
+ float lblue;
+ int id;
+ GLUI_Column *column;
+ int is_current; // Whether this tree is the
+ // current root in a treePanel
+ int child_number;
+ int format;
+
+public:
+ bool currently_inside, initially_inside;
+ GLUI_Button button;
+ GLUI_String level_name; // level name, eg: 1.1.2, III, or 3
+ GLUI_TreePanel *panel;
+
+ void draw( int x, int y );
+ void draw_pressed( void );
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ void set_column(GLUI_Column *c) { column = c; }
+ void open( void );
+ void close( void );
+
+ /* void set_name( const char *text ) { panel.set_name( text ); }; */
+ void update_size( void );
+ void set_id(int i) { id = i; }
+ void set_level(int l) { level = l; }
+ void set_format(int f) { format = f; }
+ void set_current(int c) { is_current = c; }
+ int get_id() { return id; }
+ int get_level() { return level; }
+ int get_child_number() { return child_number; }
+ void enable_bar() { if (column) { column->int_val = 1; set_color(red, green, blue); } }
+ void disable_bar() { if (column) { column->int_val = 0; } }
+ void set_child_number(int c) { child_number = c; }
+ void set_level_color(float r, float g, float b) {
+ lred = r;
+ lgreen = g;
+ lblue = b;
+ }
+ void set_color(float r, float g, float b) {
+ red = r;
+ green = g;
+ blue = b;
+ }
+
+ virtual GLUI_Tree* dynamicCastGLUI_Tree()
+ {
+ return this;
+ }
+protected:
+ void common_init()
+ {
+ currently_inside = false;
+ initially_inside = false;
+ can_activate = true;
+ is_container = true;
+ h = GLUI_DEFAULT_CONTROL_HEIGHT + 7;
+ w = GLUI_DEFAULT_CONTROL_WIDTH;
+ y_off_top = 21;
+ collapsible = true;
+ red = .5;
+ green = .5;
+ blue = .5;
+ lred = 0;
+ lgreen = 0;
+ lblue = 0;
+ column = NULL;
+ is_current = 0;
+ child_number = 0;
+ format = 0;
+ panel = NULL;
+ name = "";
+ level_name = "";
+ level = 0;
+
+ };
+};
+
+
+/************************************************************/
+/* */
+/* TreePanel class (container) JVK */
+/* */
+/************************************************************/
+
+/**
+ Manages, maintains, and formats a tree of GLUI_Tree objects.
+ These are shown in a heirarchical, collapsible display.
+
+ FIXME: There's an infinite loop in the traversal code (OSL 2006/06)
+*/
+class GLUI_TreePanel : public GLUI_Panel
+{
+public:
+ GLUI_TreePanel(GLUI_Node *parent, const char *name,
+ bool open=false, int inset=0);
+
+ int max_levels;
+ int next_id;
+ int format;
+ float red;
+ float green;
+ float blue;
+ float lred;
+ float lgreen;
+ float lblue;
+ int root_children;
+ /* These variables allow the tree panel to traverse the tree
+ using only two function calls. (Well, four, if you count
+ going in reverse */
+
+ GLUI_Tree *curr_branch; /* Current Branch */
+ GLUI_Panel *curr_root; /* Current Root */
+
+public:
+ void set_color(float r, float g, float b);
+ void set_level_color(float r, float g, float b);
+ void set_format(int f) { format = f; }
+
+ /* Adds branch to curr_root */
+ GLUI_Tree * ab(const char *name, GLUI_Tree *root = NULL);
+ /* Goes up one level, resets curr_root and curr_branch to parents*/
+ void fb(GLUI_Tree *branch= NULL);
+ /* Deletes the curr_branch, goes up one level using fb */
+ void db(GLUI_Tree *branch = NULL);
+ /* Finds the very last branch of curr_root, resets vars */
+ void descendBranch(GLUI_Panel *root = NULL);
+ /* Resets curr_root and curr branch to TreePanel and lastChild */
+ void resetToRoot(GLUI_Panel *new_root = NULL);
+ void next( void );
+ void refresh( void );
+ void expand_all( void );
+ void collapse_all( void );
+ void update_all( void );
+ void initNode(GLUI_Tree *temp);
+ void formatNode(GLUI_Tree *temp);
+ virtual GLUI_TreePanel* dynamicCastGLUI_TreePanel()
+ {
+ return this;
+ }
+
+protected:
+ int uniqueID( void ) { next_id++; return next_id - 1; }
+ void common_init()
+ {
+ GLUI_Panel();
+ next_id = 0;
+ curr_root = this;
+ curr_branch = NULL;
+ red = .5;
+ green = .5;
+ blue = .5;
+ root_children = 0;
+ }
+};
+
+/************************************************************/
+/* */
+/* User-Level GLUI class */
+/* */
+/************************************************************/
+
+class GLUI_Rotation;
+class GLUI_Translation;
+
+/**
+ The main user-visible interface object to GLUI.
+
+*/
+class GLUI : public GLUI_Main
+{
+public:
+/** DEPRECATED interface for creating new GLUI objects */
+ int add_control( GLUI_Control *control ) { return main_panel->add_control(control); }
+
+ void add_column( int draw_bar = true );
+ void add_column_to_panel( GLUI_Panel *panel, int draw_bar = true );
+
+ void add_separator( void );
+ void add_separator_to_panel( GLUI_Panel *panel );
+
+ GLUI_RadioGroup
+ *add_radiogroup( int *live_var=NULL,
+ int user_id=-1,GLUI_CB callback=GLUI_CB());
+
+ GLUI_RadioGroup
+ *add_radiogroup_to_panel( GLUI_Panel *panel,
+ int *live_var=NULL,
+ int user_id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_RadioButton
+ *add_radiobutton_to_group( GLUI_RadioGroup *group,
+ const char *name );
+
+ GLUI_Listbox *add_listbox( const char *name, int *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_Listbox *add_listbox_to_panel( GLUI_Panel *panel,
+ const char *name, int *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB());
+
+ GLUI_Rotation *add_rotation( const char *name, float *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_Rotation *add_rotation_to_panel( GLUI_Panel *panel,
+ const char *name, float *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB());
+
+ GLUI_Translation *add_translation( const char *name,
+ int trans_type, float *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_Translation *add_translation_to_panel(
+ GLUI_Panel *panel, const char *name,
+ int trans_type, float *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB());
+
+ GLUI_Checkbox *add_checkbox( const char *name,
+ int *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB());
+ GLUI_Checkbox *add_checkbox_to_panel( GLUI_Panel *panel, const char *name,
+ int *live_var=NULL, int id=-1,
+ GLUI_CB callback=GLUI_CB());
+
+ GLUI_Button *add_button( const char *name, int id=-1,
+ GLUI_CB callback=GLUI_CB());
+ GLUI_Button *add_button_to_panel( GLUI_Panel *panel, const char *name,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+
+ GLUI_StaticText *add_statictext( const char *name );
+ GLUI_StaticText *add_statictext_to_panel( GLUI_Panel *panel, const char *name );
+
+ GLUI_EditText *add_edittext( const char *name,
+ int data_type=GLUI_EDITTEXT_TEXT,
+ void*live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_EditText *add_edittext_to_panel( GLUI_Panel *panel,
+ const char *name,
+ int data_type=GLUI_EDITTEXT_TEXT,
+ void *live_var=NULL, int id=-1,
+ GLUI_CB callback=GLUI_CB() );
+ GLUI_EditText *add_edittext( const char *name, GLUI_String& live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_EditText *add_edittext_to_panel( GLUI_Panel *panel, const char *name,
+ GLUI_String& live_var, int id=-1,
+ GLUI_CB callback=GLUI_CB() );
+
+ GLUI_Spinner *add_spinner( const char *name,
+ int data_type=GLUI_SPINNER_INT,
+ void *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_Spinner *add_spinner_to_panel( GLUI_Panel *panel,
+ const char *name,
+ int data_type=GLUI_SPINNER_INT,
+ void *live_var=NULL,
+ int id=-1,
+ GLUI_CB callback=GLUI_CB() );
+
+ GLUI_Panel *add_panel( const char *name, int type=GLUI_PANEL_EMBOSSED );
+ GLUI_Panel *add_panel_to_panel( GLUI_Panel *panel, const char *name,
+ int type=GLUI_PANEL_EMBOSSED );
+
+
+ GLUI_Rollout *add_rollout( const char *name, int open=true,
+ int type=GLUI_PANEL_EMBOSSED);
+ GLUI_Rollout *add_rollout_to_panel( GLUI_Panel *panel, const char *name,
+ int open=true,
+ int type=GLUI_PANEL_EMBOSSED);
+
+
+/** Set the window where our widgets should be displayed. */
+ void set_main_gfx_window( int window_id );
+ int get_glut_window_id( void ) { return glut_window_id; }
+
+ void enable( void ) { main_panel->enable(); }
+ void disable( void );
+
+ void sync_live( void );
+
+ void close( void );
+
+ void show( void );
+ void hide( void );
+
+ /***** GLUT callback setup functions *****/
+ /*
+ void set_glutDisplayFunc(void (*f)(void));
+ void set_glutReshapeFunc(void (*f)(int width, int height));
+ void set_glutKeyboardFunc(void (*f)(unsigned char key, int x, int y));
+ void set_glutSpecialFunc(void (*f)(int key, int x, int y));
+ void set_glutMouseFunc(void (*f)(int button, int state, int x, int y));
+ void set_glutMotionFunc(void (*f)(int x, int y));
+ void set_glutPassiveMotionFunc(void (*f)(int x, int y));
+ void set_glutEntryFunc(void (*f)(int state));
+ void set_glutVisibilityFunc(void (*f)(int state));
+ void set_glutInit( int *argcp, const char **argv );
+ void set_glutInitWindowSize(int width, int height);
+ void set_glutInitWindowPosition(int x, int y);
+ void set_glutInitDisplayMode(unsigned int mode);
+ int set_glutCreateWindow(const char *name);
+ */
+
+ /***** Constructors and desctructors *****/
+
+ int init( const char *name, long flags, int x, int y, int parent_window );
+protected:
+ virtual int add_control( GLUI_Node *parent, GLUI_Control *control ) {
+ return GLUI_Main::add_control( parent, control );
+ }
+};
+
+/************************************************************/
+/* */
+/* EditText class */
+/* */
+/************************************************************/
+
+class GLUI_EditText : public GLUI_Control
+{
+public:
+ int has_limits;
+ int data_type;
+ GLUI_String orig_text;
+ int insertion_pt;
+ int title_x_offset;
+ int text_x_offset;
+ int substring_start; /*substring that gets displayed in box*/
+ int substring_end;
+ int sel_start, sel_end; /* current selection */
+ int num_periods;
+ int last_insertion_pt;
+ float float_low, float_high;
+ int int_low, int_high;
+ GLUI_Spinner *spinner;
+ int debug;
+ int draw_text_only;
+
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+ int special_handler( int key, int modifiers );
+
+ void activate( int how );
+ void deactivate( void );
+
+ void draw( int x, int y );
+
+ int mouse_over( int state, int x, int y );
+
+ int find_word_break( int start, int direction );
+ int substring_width( int start, int end );
+ void clear_substring( int start, int end );
+ int find_insertion_pt( int x, int y );
+ int update_substring_bounds( void );
+ void update_and_draw_text( void );
+ void draw_text( int x, int y );
+ void draw_insertion_pt( void );
+ void set_numeric_text( void );
+ void update_x_offsets( void );
+ void update_size( void );
+
+ void set_float_limits( float low,float high,int limit_type=GLUI_LIMIT_CLAMP);
+ void set_int_limits( int low, int high, int limit_type=GLUI_LIMIT_CLAMP );
+ void set_float_val( float new_val );
+ void set_int_val( int new_val );
+ void set_text( const char *text );
+ void set_text( const GLUI_String &s) { set_text(s.c_str()); }
+ const char *get_text() { return text.c_str(); }
+
+ void dump( FILE *out, const char *text );
+
+ // Constructor, no live variable
+ GLUI_EditText( GLUI_Node *parent, const char *name,
+ int text_type=GLUI_EDITTEXT_TEXT,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Constructor, int live variable
+ GLUI_EditText( GLUI_Node *parent, const char *name,
+ int *live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Constructor, float live variable
+ GLUI_EditText( GLUI_Node *parent, const char *name,
+ float *live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Constructor, char* live variable
+ GLUI_EditText( GLUI_Node *parent, const char *name,
+ char *live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Constructor, std::string live variable
+ GLUI_EditText( GLUI_Node *parent, const char *name,
+ std::string &live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+
+ // Deprecated constructor, only called internally
+ GLUI_EditText( GLUI_Node *parent, const char *name,
+ int text_type, void *live_var,
+ int id, GLUI_CB callback );
+ // Deprecated constructor, only called internally
+ GLUI_EditText( void ) { common_init(); }
+
+ virtual GLUI_EditText* dynamicCastGLUI_EditText()
+ {
+ return this;
+ }
+
+
+protected:
+ void common_init( void ) {
+ h = GLUI_EDITTEXT_HEIGHT;
+ w = GLUI_EDITTEXT_WIDTH;
+ title_x_offset = 0;
+ text_x_offset = 55;
+ insertion_pt = -1;
+ last_insertion_pt = -1;
+ name = "";
+ substring_start = 0;
+ data_type = GLUI_EDITTEXT_TEXT;
+ substring_end = 2;
+ num_periods = 0;
+ has_limits = GLUI_LIMIT_NONE;
+ sel_start = 0;
+ sel_end = 0;
+ active_type = GLUI_CONTROL_ACTIVE_PERMANENT;
+ can_activate = true;
+ spacebar_mouse_click = false;
+ spinner = NULL;
+ debug = false;
+ draw_text_only = false;
+ }
+ void common_construct( GLUI_Node *parent, const char *name,
+ int data_type, int live_type, void *live_var,
+ int id, GLUI_CB callback );
+};
+
+/************************************************************/
+/* */
+/* CommandLine class */
+/* */
+/************************************************************/
+
+class GLUI_CommandLine : public GLUI_EditText
+{
+public:
+ typedef GLUI_EditText Super;
+
+ enum { HIST_SIZE = 100 };
+ std::vector<GLUI_String> hist_list;
+ int curr_hist;
+ int oldest_hist;
+ int newest_hist;
+ bool commit_flag;
+
+public:
+ int key_handler( unsigned char key,int modifiers );
+ int special_handler( int key,int modifiers );
+ void deactivate( void );
+
+ virtual const char *get_history( int command_number ) const
+ { return hist_list[command_number - oldest_hist].c_str(); }
+ virtual GLUI_String& get_history_str( int command_number )
+ { return hist_list[command_number - oldest_hist]; }
+ virtual const GLUI_String& get_history_str( int command_number ) const
+ { return hist_list[command_number - oldest_hist]; }
+ virtual void recall_history( int history_number );
+ virtual void scroll_history( int direction );
+ virtual void add_to_history( const char *text );
+ virtual void reset_history( void );
+
+ void dump( FILE *out, const char *text );
+
+
+ GLUI_CommandLine( GLUI_Node *parent, const char *name, void *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_CommandLine( void ) { common_init(); }
+protected:
+ void common_init() {
+ hist_list.resize(HIST_SIZE);
+ curr_hist = 0;
+ oldest_hist = 0;
+ newest_hist = 0;
+ commit_flag = false;
+ }
+};
+
+/************************************************************/
+/* */
+/* RadioGroup class (container) */
+/* */
+/************************************************************/
+
+class GLUI_RadioGroup : public GLUI_Control
+{
+public:
+ int num_buttons;
+
+ void draw( int x, int y );
+ void set_name( const char *text );
+ void set_int_val( int int_val );
+ void set_selected( int int_val );
+
+ void draw_group( int translate );
+
+ GLUI_RadioGroup( GLUI_Node *parent, int *live_var=NULL,
+ int user_id=-1,GLUI_CB callback=GLUI_CB() );
+ GLUI_RadioGroup( void ) { common_init(); }
+
+protected:
+ void common_init( void ) {
+ x_off = 0;
+ y_off_top = 0;
+ y_off_bot = 0;
+ is_container = true;
+ w = 300;
+ h = 300;
+ num_buttons = 0;
+ name = "";
+ can_activate = false;
+ live_type = GLUI_LIVE_INT;
+ }
+};
+
+/************************************************************/
+/* */
+/* RadioButton class (container) */
+/* */
+/************************************************************/
+
+class GLUI_RadioButton : public GLUI_Control
+{
+public:
+ int orig_value;
+ bool currently_inside;
+ int text_x_offset;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+
+ void draw( int x, int y );
+ void update_size( void );
+
+ void draw_active_area( void );
+ void draw_checked( void );
+ void draw_unchecked( void );
+ void draw_O( void );
+
+ GLUI_RadioButton( GLUI_RadioGroup *group, const char *name );
+ GLUI_RadioGroup *group;
+
+protected:
+ void common_init()
+ {
+ glui_format_str( name, "RadioButton: %p", (void *) this );
+ h = GLUI_RADIOBUTTON_SIZE;
+ group = NULL;
+ orig_value = -1;
+ text_x_offset = 18;
+ can_activate = true;
+ }
+};
+
+
+/************************************************************/
+/* */
+/* Separator class (container) */
+/* */
+/************************************************************/
+
+class GLUI_Separator : public GLUI_Control
+{
+public:
+ void draw( int x, int y );
+
+ GLUI_Separator( GLUI_Node *parent );
+ GLUI_Separator( void ) { common_init(); }
+
+protected:
+ void common_init() {
+ w = 100;
+ h = GLUI_SEPARATOR_HEIGHT;
+ can_activate = false;
+ }
+};
+
+#define GLUI_SPINNER_ARROW_WIDTH 12
+#define GLUI_SPINNER_ARROW_HEIGHT 8
+#define GLUI_SPINNER_ARROW_Y 2
+
+#define GLUI_SPINNER_STATE_NONE 0
+#define GLUI_SPINNER_STATE_UP 1
+#define GLUI_SPINNER_STATE_DOWN 2
+#define GLUI_SPINNER_STATE_BOTH 3
+
+#define GLUI_SPINNER_DEFAULT_GROWTH_EXP 1.05f
+
+/************************************************************/
+/* */
+/* Spinner class (container) */
+/* */
+/************************************************************/
+
+class GLUI_Spinner : public GLUI_Control
+{
+public:
+ // Constructor, no live var
+ GLUI_Spinner( GLUI_Node* parent, const char *name,
+ int data_type=GLUI_SPINNER_INT, int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Constructor, int live var
+ GLUI_Spinner( GLUI_Node* parent, const char *name,
+ int *live_var, int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Constructor, float live var
+ GLUI_Spinner( GLUI_Node* parent, const char *name,
+ float *live_var, int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Deprecated constructor
+ GLUI_Spinner( GLUI_Node* parent, const char *name,
+ int data_type,
+ void *live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ // Deprecated constructor
+ GLUI_Spinner( void ) { common_init(); }
+
+ bool currently_inside;
+ int state;
+ float growth, growth_exp;
+ int last_x, last_y;
+ int data_type;
+ int callback_count;
+ int last_int_val;
+ float last_float_val;
+ int first_callback;
+ float user_speed;
+
+ GLUI_EditText *edittext;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+ int special_handler( int key,int modifiers );
+
+ void draw( int x, int y );
+ void draw_pressed( void );
+ void draw_unpressed( void );
+ void draw_text( int sunken );
+
+ void update_size( void );
+
+ void set_float_limits( float low,float high,int limit_type=GLUI_LIMIT_CLAMP);
+ void set_int_limits( int low, int high,int limit_type=GLUI_LIMIT_CLAMP);
+ int find_arrow( int local_x, int local_y );
+ void do_drag( int x, int y );
+ void do_callbacks( void );
+ void do_click( void );
+ void idle( void );
+ bool needs_idle( void ) const;
+
+ const char *get_text( void );
+
+ void set_float_val( float new_val );
+ void set_int_val( int new_val );
+ float get_float_val( void );
+ int get_int_val( void );
+ void increase_growth( void );
+ void reset_growth( void );
+
+ void set_speed( float speed ) { user_speed = speed; }
+
+protected:
+ void common_init() {
+ glui_format_str( name, "Spinner: %p", this );
+ h = GLUI_EDITTEXT_HEIGHT;
+ w = GLUI_EDITTEXT_WIDTH;
+ x_off = 0;
+ y_off_top = 0;
+ y_off_bot = 0;
+ can_activate = true;
+ state = GLUI_SPINNER_STATE_NONE;
+ edittext = NULL;
+ growth_exp = GLUI_SPINNER_DEFAULT_GROWTH_EXP;
+ callback_count = 0;
+ first_callback = true;
+ user_speed = 1.0;
+ }
+ void common_construct( GLUI_Node* parent, const char *name,
+ int data_type, void *live_var,
+ int id, GLUI_CB callback );
+};
+
+/************************************************************/
+/* */
+/* StaticText class */
+/* */
+/************************************************************/
+
+class GLUI_StaticText : public GLUI_Control
+{
+public:
+ void set_text( const char *text );
+ void draw( int x, int y );
+ void draw_text( void );
+ void update_size( void );
+ void erase_text( void );
+
+ GLUI_StaticText(GLUI_Node *parent, const char *name);
+ GLUI_StaticText( void ) { common_init(); }
+
+protected:
+ void common_init() {
+ h = GLUI_STATICTEXT_SIZE;
+ name = "";
+ can_activate = false;
+ }
+};
+
+/************************************************************/
+/* */
+/* TextBox class - JVK */
+/* */
+/************************************************************/
+
+class GLUI_TextBox : public GLUI_Control
+{
+public:
+ /* GLUI Textbox - JVK */
+ GLUI_TextBox(GLUI_Node *parent, GLUI_String &live_var,
+ bool scroll = false, int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_TextBox( GLUI_Node *parent,
+ bool scroll = false, int id=-1,
+ GLUI_CB callback=GLUI_CB() );
+
+ GLUI_String orig_text;
+ int insertion_pt;
+ int substring_start; /*substring that gets displayed in box*/
+ int substring_end;
+ int sel_start, sel_end; /* current selection */
+ int last_insertion_pt;
+ int debug;
+ int draw_text_only;
+ int tab_width;
+ int start_line;
+ int num_lines;
+ int curr_line;
+ int visible_lines;
+ int insert_x; /* Similar to "insertion_pt", these variables keep */
+ int insert_y; /* track of where the ptr is, but in pixels */
+ int keygoal_x; /* where up down keys would like to put insertion pt*/
+ GLUI_Scrollbar *scrollbar;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+ int special_handler( int key,int modifiers );
+
+ void activate( int how );
+ void deactivate( void );
+
+ void enable( void );
+ void disable( void );
+
+ void draw( int x, int y );
+
+ int mouse_over( int state, int x, int y );
+
+ int get_box_width();
+ int find_word_break( int start, int direction );
+ int substring_width( int start, int end, int initial_width=0 );
+ void clear_substring( int start, int end );
+ int find_insertion_pt( int x, int y );
+ int update_substring_bounds( void );
+ void update_and_draw_text( void );
+ void draw_text( int x, int y );
+ void draw_insertion_pt( void );
+ void update_x_offsets( void );
+ void update_size( void );
+
+ void set_text( const char *text );
+ const char *get_text( void ) { return text.c_str(); }
+
+ void dump( FILE *out, char *text );
+ void set_tab_w(int w) { tab_width = w; }
+ void set_start_line(int l) { start_line = l; }
+ static void scrollbar_callback(GLUI_Control*);
+
+ bool wants_tabs( void ) const { return true; }
+
+protected:
+ void common_init()
+ {
+ h = GLUI_TEXTBOX_HEIGHT;
+ w = GLUI_TEXTBOX_WIDTH;
+ tab_width = GLUI_TAB_WIDTH;
+ num_lines = 0;
+ visible_lines = 0;
+ start_line = 0;
+ curr_line = 0;
+ insert_y = -1;
+ insert_x = -1;
+ insertion_pt = -1;
+ last_insertion_pt = -1;
+ name[0] = '\0';
+ substring_start = 0;
+ substring_end = 2;
+ sel_start = 0;
+ sel_end = 0;
+ active_type = GLUI_CONTROL_ACTIVE_PERMANENT;
+ can_activate = true;
+ spacebar_mouse_click = false;
+ scrollbar = NULL;
+ debug = false;
+ draw_text_only = false;
+ }
+ void common_construct(
+ GLUI_Node *parent, GLUI_String *live_var,
+ bool scroll, int id, GLUI_CB callback);
+};
+
+/************************************************************/
+/* */
+/* List class - JVK */
+/* */
+/************************************************************/
+
+class GLUI_List_Item : public GLUI_Node
+{
+public:
+ GLUI_String text;
+ int id;
+};
+
+/************************************************************/
+/* */
+/* List class - JVK */
+/* */
+/************************************************************/
+
+class GLUI_List : public GLUI_Control
+{
+public:
+ /* GLUI List - JVK */
+ GLUI_List( GLUI_Node *parent, bool scroll = false,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ /*, GLUI_Control *object = NULL
+ ,GLUI_InterObject_CB obj_cb = NULL);*/
+
+ GLUI_List( GLUI_Node *parent,
+ GLUI_String& live_var, bool scroll = false,
+ int id=-1,
+ GLUI_CB callback=GLUI_CB()
+ /*,GLUI_Control *object = NULL */
+ /*,GLUI_InterObject_CB obj_cb = NULL*/);
+
+
+ GLUI_String orig_text;
+ int debug;
+ int draw_text_only;
+ int start_line;
+ int num_lines;
+ int curr_line;
+ int visible_lines;
+ GLUI_Scrollbar *scrollbar;
+ GLUI_List_Item items_list;
+ GLUI_Control *associated_object;
+ GLUI_CB obj_cb;
+ int cb_click_type;
+ int last_line;
+ int last_click_time;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+ int special_handler( int key,int modifiers );
+
+ void activate( int how );
+ void deactivate( void );
+
+ void draw( int x, int y );
+
+ int mouse_over( int state, int x, int y );
+
+ int get_box_width();
+ int find_word_break( int start, int direction );
+ int substring_width( const char *t, int start, int end );
+ int find_line( int x, int y );
+ void update_and_draw_text( void );
+ void draw_text( const char *t, int selected, int x, int y );
+ void update_size( void );
+
+
+ int add_item( int id, const char *text );
+ int delete_item( const char *text );
+ int delete_item( int id );
+ int delete_all();
+
+ GLUI_List_Item *get_item_ptr( const char *text );
+ GLUI_List_Item *get_item_ptr( int id );
+
+ void dump( FILE *out, const char *text );
+ void set_start_line(int l) { start_line = l; }
+ static void scrollbar_callback(GLUI_Control*);
+ int get_current_item() { return curr_line; }
+ void set_click_type(int d) {
+ cb_click_type = d; }
+ void set_object_callback(GLUI_CB cb=GLUI_CB(), GLUI_Control*obj=NULL)
+ { obj_cb=cb; associated_object=obj; }
+
+ virtual GLUI_List* dynamicCastGLUI_List()
+ {
+ return this;
+ }
+
+protected:
+ void common_init()
+ {
+ h = GLUI_LIST_HEIGHT;
+ w = GLUI_LIST_WIDTH;
+ num_lines = 0;
+ visible_lines = 0;
+ start_line = 0;
+ curr_line = 0;
+ name[0] = '\0';
+ active_type = GLUI_CONTROL_ACTIVE_PERMANENT;
+ can_activate = true;
+ spacebar_mouse_click = false;
+ scrollbar = NULL;
+ debug = false;
+ draw_text_only = false;
+ cb_click_type = GLUI_SINGLE_CLICK;
+ last_line = -1;
+ last_click_time = 0;
+ associated_object = NULL;
+ };
+ void common_construct(
+ GLUI_Node *parent,
+ GLUI_String* live_var, bool scroll,
+ int id,
+ GLUI_CB callback
+ /*,GLUI_Control *object*/
+ /*,GLUI_InterObject_CB obj_cb*/);
+};
+
+/************************************************************/
+/* */
+/* Scrollbar class - JVK */
+/* */
+/************************************************************/
+
+class GLUI_Scrollbar : public GLUI_Control
+{
+public:
+ // Constructor, no live var
+ GLUI_Scrollbar( GLUI_Node *parent,
+ const char *name,
+ int horz_vert=GLUI_SCROLL_HORIZONTAL,
+ int data_type=GLUI_SCROLL_INT,
+ int id=-1, GLUI_CB callback=GLUI_CB()
+ /*,GLUI_Control *object = NULL*/
+ /*,GLUI_InterObject_CB obj_cb = NULL*/
+ );
+
+ // Constructor, int live var
+ GLUI_Scrollbar( GLUI_Node *parent, const char *name, int horz_vert,
+ int *live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB()
+ /*,GLUI_Control *object = NULL*/
+ /*,GLUI_InterObject_CB obj_cb = NULL*/
+ );
+
+ // Constructor, float live var
+ GLUI_Scrollbar( GLUI_Node *parent, const char *name, int horz_vert,
+ float *live_var,
+ int id=-1, GLUI_CB callback=GLUI_CB()
+ /*,GLUI_Control *object = NULL*/
+ /*,GLUI_InterObject_CB obj_cb = NULL*/
+ );
+
+ bool currently_inside;
+ int state;
+ float growth, growth_exp;
+ int last_x, last_y;
+ int data_type;
+ int callback_count;
+ int last_int_val; ///< Used to prevent repeated callbacks.
+ float last_float_val;
+ int first_callback;
+ float user_speed;
+ float float_min, float_max;
+ int int_min, int_max;
+ int horizontal;
+ double last_update_time; ///< GLUI_Time() we last advanced scrollbar.
+ double velocity_limit; ///< Maximum distance to advance per second.
+ int box_length;
+ int box_start_position;
+ int box_end_position;
+ int track_length;
+
+
+ /* Rather than directly access an Editbox or Textbox for
+ changing variables, a pointer to some object is defined
+ along with a static callback in the form func(void *, int) -
+ the int is the new value, the void * must be cast to that
+ particular object type before use.
+ */
+ void * associated_object; /* Lets the Spinner manage it's own callbacks */
+ GLUI_CB object_cb; /* function pointer to object call_back */
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+ int special_handler( int key,int modifiers );
+
+ void draw( int x, int y );
+ void draw_pressed( void );
+ void draw_unpressed( void );
+ void draw_text( int sunken );
+
+ void update_size( void );
+
+ void set_int_limits( int low, int high,int limit_type=GLUI_LIMIT_CLAMP);
+ void set_float_limits( float low,float high,int limit_type=GLUI_LIMIT_CLAMP);
+ int find_arrow( int local_x, int local_y );
+ void do_drag( int x, int y );
+ void do_callbacks( void );
+ void draw_scroll( void );
+ void do_click( void );
+ void idle( void );
+ bool needs_idle( void ) const;
+ void set_int_val( int new_val );
+ void set_float_val( float new_val );
+ void increase_growth( void );
+ void reset_growth( void );
+
+ void set_speed( float speed ) { user_speed = speed; };
+ void update_scroll_parameters();
+ void set_object_callback(GLUI_CB cb=GLUI_CB(), GLUI_Control*obj=NULL)
+ { object_cb=cb; associated_object=obj; }
+
+ virtual GLUI_Scrollbar* dynamicCastGLUI_Scrollbar()
+ {
+ return this;
+ }
+
+protected:
+ void common_init ( void );
+ void common_construct(
+ GLUI_Node *parent,
+ const char *name,
+ int horz_vert,
+ int data_type, void* live_var,
+ int id, GLUI_CB callback
+ /*,GLUI_Control *object
+ ,GLUI_InterObject_CB obj_cb*/
+ );
+
+ virtual void draw_scroll_arrow(int arrowtype, int x, int y);
+ virtual void draw_scroll_box(int x, int y, int w, int h);
+};
+
+/************************************************************/
+/* */
+/* Listbox class */
+/* */
+/************************************************************/
+
+class GLUI_Listbox_Item : public GLUI_Node
+{
+public:
+ GLUI_String text;
+ int id;
+};
+
+class GLUI_Listbox : public GLUI_Control
+{
+public:
+ GLUI_String curr_text;
+ GLUI_Listbox_Item items_list;
+ int depressed;
+
+ int orig_value;
+ bool currently_inside;
+ int text_x_offset, title_x_offset;
+ int glut_menu_id;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int key_handler( unsigned char key,int modifiers );
+ int special_handler( int key,int modifiers );
+
+ void update_size( void );
+ void draw( int x, int y );
+ int mouse_over( int state, int x, int y );
+
+ void set_int_val( int new_val );
+ void dump( FILE *output );
+
+ int add_item( int id, const char *text );
+ int delete_item( const char *text );
+ int delete_item( int id );
+ int sort_items( void );
+
+ int do_selection( int item );
+
+ GLUI_Listbox_Item *get_item_ptr( const char *text );
+ GLUI_Listbox_Item *get_item_ptr( int id );
+
+
+ GLUI_Listbox( GLUI_Node *parent,
+ const char *name, int *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_Listbox( void ) { common_init(); }
+
+ virtual GLUI_Listbox* dynamicCastGLUI_Listbox()
+ {
+ return this;
+ }
+
+protected:
+ /** Change w and return true if we need to be widened to fit the current item. */
+ bool recalculate_item_width( void );
+ void common_init() {
+ glui_format_str( name, "Listbox: %p", this );
+ w = GLUI_EDITTEXT_WIDTH;
+ h = GLUI_EDITTEXT_HEIGHT;
+ orig_value = -1;
+ title_x_offset = 0;
+ text_x_offset = 55;
+ can_activate = true;
+ curr_text = "";
+ live_type = GLUI_LIVE_INT; /* This has an integer live var */
+ depressed = false;
+ glut_menu_id = -1;
+ }
+
+ ~GLUI_Listbox();
+};
+
+/************************************************************/
+/* */
+/* Mouse_Interaction class */
+/* */
+/************************************************************/
+
+/**
+ This is the superclass of translation and rotation widgets.
+*/
+class GLUI_Mouse_Interaction : public GLUI_Control
+{
+public:
+ /*int get_main_area_size( void ) { return MIN( h-18, */
+ int draw_active_area_only;
+
+ int mouse_down_handler( int local_x, int local_y );
+ int mouse_up_handler( int local_x, int local_y, bool inside );
+ int mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int special_handler( int key, int modifiers );
+ void update_size( void );
+ void draw( int x, int y );
+ void draw_active_area( void );
+
+ /*** The following methods (starting with "iaction_") need to
+ be overloaded ***/
+ virtual int iaction_mouse_down_handler( int local_x, int local_y ) = 0;
+ virtual int iaction_mouse_up_handler( int local_x, int local_y, bool inside )=0;
+ virtual int iaction_mouse_held_down_handler( int local_x, int local_y, bool inside )=0;
+ virtual int iaction_special_handler( int key, int modifiers )=0;
+ virtual void iaction_draw_active_area_persp( void )=0;
+ virtual void iaction_draw_active_area_ortho( void )=0;
+ virtual void iaction_dump( FILE *output )=0;
+ virtual void iaction_init( void ) = 0;
+
+ GLUI_Mouse_Interaction( void ) {
+ glui_format_str( name, "Mouse_Interaction: %p", this );
+ w = GLUI_MOUSE_INTERACTION_WIDTH;
+ h = GLUI_MOUSE_INTERACTION_HEIGHT;
+ can_activate = true;
+ live_type = GLUI_LIVE_NONE;
+ alignment = GLUI_ALIGN_CENTER;
+ draw_active_area_only = false;
+ }
+};
+
+/************************************************************/
+/* */
+/* Rotation class */
+/* */
+/************************************************************/
+
+/**
+ An onscreen rotation controller--allows the user to interact with
+ a 3D rotation via a spaceball-like interface.
+*/
+class GLUI_Rotation : public GLUI_Mouse_Interaction
+{
+public:
+ Arcball *ball;
+ GLUquadricObj *quadObj;
+ bool can_spin, spinning;
+ float damping;
+
+ int iaction_mouse_down_handler( int local_x, int local_y );
+ int iaction_mouse_up_handler( int local_x, int local_y, bool inside );
+ int iaction_mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int iaction_special_handler( int key, int modifiers );
+ void iaction_init( void ) { init_ball(); }
+ void iaction_draw_active_area_persp( void );
+ void iaction_draw_active_area_ortho( void );
+ void iaction_dump( FILE *output );
+
+ /* void update_size( void ); */
+ /* void draw( int x, int y ); */
+ /* int mouse_over( int state, int x, int y ); */
+
+ void setup_texture( void );
+ void setup_lights( void );
+ void draw_ball( float radius );
+
+ void init_ball( void );
+
+ void reset( void );
+
+ bool needs_idle( void ) const;
+ void idle( void );
+
+ void copy_float_array_to_ball( void );
+ void copy_ball_to_float_array( void );
+
+ void set_spin( float damp_factor );
+
+ GLUI_Rotation( GLUI_Node *parent, const char *name, float *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_Rotation(void) { common_init(); }
+
+protected:
+ void common_init();
+};
+
+/************************************************************/
+/* */
+/* Translation class */
+/* */
+/************************************************************/
+
+/**
+ An onscreen translation controller--allows the user to interact with
+ a 3D translation.
+*/
+class GLUI_Translation : public GLUI_Mouse_Interaction
+{
+public:
+ int trans_type; /* Is this an XY or a Z controller? */
+ int down_x, down_y;
+ float scale_factor;
+ GLUquadricObj *quadObj;
+ int trans_mouse_code;
+ float orig_x, orig_y, orig_z;
+ int locked;
+
+ int iaction_mouse_down_handler( int local_x, int local_y );
+ int iaction_mouse_up_handler( int local_x, int local_y, bool inside );
+ int iaction_mouse_held_down_handler( int local_x, int local_y, bool inside );
+ int iaction_special_handler( int key, int modifiers );
+ void iaction_init( void ) { }
+ void iaction_draw_active_area_persp( void );
+ void iaction_draw_active_area_ortho( void );
+ void iaction_dump( FILE *output );
+
+ void set_speed( float s ) { scale_factor = s; }
+
+ void setup_texture( void );
+ void setup_lights( void );
+ void draw_2d_arrow( int radius, int filled, int orientation );
+ void draw_2d_x_arrows( int radius );
+ void draw_2d_y_arrows( int radius );
+ void draw_2d_z_arrows( int radius );
+ void draw_2d_xy_arrows( int radius );
+
+ int get_mouse_code( int x, int y );
+
+ /* Float array is either a single float (for single-axis controls),
+ or two floats for X and Y (if an XY controller) */
+
+ float get_z( void ) { return float_array_val[0]; }
+ float get_x( void ) { return float_array_val[0]; }
+ float get_y( void ) {
+ if ( trans_type == GLUI_TRANSLATION_XY ) return float_array_val[1];
+ else return float_array_val[0];
+ }
+
+ void set_z( float val );
+ void set_x( float val );
+ void set_y( float val );
+ void set_one_val( float val, int index );
+
+ GLUI_Translation( GLUI_Node *parent, const char *name,
+ int trans_type, float *live_var=NULL,
+ int id=-1, GLUI_CB callback=GLUI_CB() );
+ GLUI_Translation( void ) { common_init(); }
+
+protected:
+ void common_init() {
+ locked = GLUI_TRANSLATION_LOCK_NONE;
+ glui_format_str( name, "Translation: %p", this );
+ w = GLUI_MOUSE_INTERACTION_WIDTH;
+ h = GLUI_MOUSE_INTERACTION_HEIGHT;
+ can_activate = true;
+ live_type = GLUI_LIVE_FLOAT_ARRAY;
+ float_array_size = 0;
+ alignment = GLUI_ALIGN_CENTER;
+ trans_type = GLUI_TRANSLATION_XY;
+ scale_factor = 1.0;
+ quadObj = NULL;
+ trans_mouse_code = GLUI_TRANSLATION_MOUSE_NONE;
+ }
+};
+
+/********** Misc functions *********************/
+int _glutBitmapWidthString( void *font, const char *s );
+void _glutBitmapString( void *font, const char *s );
+
+/********** Our own callbacks for glut *********/
+/* These are the callbacks that we pass to glut. They take
+ some action if necessary, then (possibly) call the user-level
+ glut callbacks.
+*/
+
+void glui_display_func( void );
+void glui_reshape_func( int w, int h );
+void glui_keyboard_func(unsigned char key, int x, int y);
+void glui_special_func(int key, int x, int y);
+void glui_mouse_func(int button, int state, int x, int y);
+void glui_motion_func(int x, int y);
+void glui_passive_motion_func(int x, int y);
+void glui_entry_func(int state);
+void glui_visibility_func(int state);
+void glui_idle_func(void);
+
+void glui_parent_window_reshape_func( int w, int h );
+void glui_parent_window_keyboard_func(unsigned char key, int x, int y);
+void glui_parent_window_mouse_func(int, int, int, int );
+void glui_parent_window_special_func(int key, int x, int y);
+
+#endif
diff --git a/tests/bullet/Extras/glui/algebra3.cpp b/tests/bullet/Extras/glui/algebra3.cpp
new file mode 100644
index 00000000..5101480e
--- /dev/null
+++ b/tests/bullet/Extras/glui/algebra3.cpp
@@ -0,0 +1,1609 @@
+/*
+
+ algebra3.cpp, algebra3.h - C++ Vector and Matrix Algebra routines
+
+ GLUI User Interface Toolkit (LGPL)
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+
+/**************************************************************************
+
+ There are three vector classes and two matrix classes: vec2, vec3,
+ vec4, mat3, and mat4.
+
+ All the standard arithmetic operations are defined, with '*'
+ for dot product of two vectors and multiplication of two matrices,
+ and '^' for cross product of two vectors.
+
+ Additional functions include length(), normalize(), homogenize for
+ vectors, and print(), set(), apply() for all classes.
+
+ There is a function transpose() for matrices, but note that it
+ does not actually change the matrix,
+
+ When multiplied with a matrix, a vector is treated as a row vector
+ if it precedes the matrix (v*M), and as a column vector if it
+ follows the matrix (M*v).
+
+ Matrices are stored in row-major form.
+
+ A vector of one dimension (2d, 3d, or 4d) can be cast to a vector
+ of a higher or lower dimension. If casting to a higher dimension,
+ the new component is set by default to 1.0, unless a value is
+ specified:
+ vec3 a(1.0, 2.0, 3.0 );
+ vec4 b( a, 4.0 ); // now b == {1.0, 2.0, 3.0, 4.0};
+ When casting to a lower dimension, the vector is homogenized in
+ the lower dimension. E.g., if a 4d {X,Y,Z,W} is cast to 3d, the
+ resulting vector is {X/W, Y/W, Z/W}. It is up to the user to
+ insure the fourth component is not zero before casting.
+
+ There are also the following function for building matrices:
+ identity2D(), translation2D(), rotation2D(),
+ scaling2D(), identity3D(), translation3D(),
+ rotation3D(), rotation3Drad(), scaling3D(),
+ perspective3D()
+
+
+ ---------------------------------------------------------------------
+
+ Author: Jean-Francois DOUEg
+ Revised: Paul Rademacher
+ Version 3.2 - Feb 1998
+ Revised: Nigel Stewart (GLUI Code Cleaning)
+
+**************************************************************************/
+
+#include "algebra3.h"
+#include "glui_internal.h"
+#include <cmath>
+
+#ifdef VEC_ERROR_FATAL
+#ifndef VEC_ERROR
+#define VEC_ERROR(E) { printf( "VERROR %s\n", E ); exit(1); }
+#endif
+#else
+#ifndef VEC_ERROR
+#define VEC_ERROR(E) { printf( "VERROR %s\n", E ); }
+#endif
+#endif
+
+/****************************************************************
+ * *
+ * vec2 Member functions *
+ * *
+ ****************************************************************/
+
+/******************** vec2 CONSTRUCTORS ********************/
+
+vec2::vec2()
+{
+ n[VX] = n[VY] = 0.0;
+}
+
+vec2::vec2(float x, float y)
+{
+ n[VX] = x;
+ n[VY] = y;
+}
+
+vec2::vec2(const vec2 &v)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+}
+
+vec2::vec2(const vec3 &v) // it is up to caller to avoid divide-by-zero
+{
+ n[VX] = v.n[VX]/v.n[VZ];
+ n[VY] = v.n[VY]/v.n[VZ];
+}
+
+vec2::vec2(const vec3 &v, int dropAxis)
+{
+ switch (dropAxis)
+ {
+ case VX: n[VX] = v.n[VY]; n[VY] = v.n[VZ]; break;
+ case VY: n[VX] = v.n[VX]; n[VY] = v.n[VZ]; break;
+ default: n[VX] = v.n[VX]; n[VY] = v.n[VY]; break;
+ }
+}
+
+/******************** vec2 ASSIGNMENT OPERATORS ******************/
+
+vec2 & vec2::operator=(const vec2 &v)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ return *this;
+}
+
+vec2 & vec2::operator+=(const vec2 &v)
+{
+ n[VX] += v.n[VX];
+ n[VY] += v.n[VY];
+ return *this;
+}
+
+vec2 & vec2::operator-=(const vec2 &v)
+{
+ n[VX] -= v.n[VX];
+ n[VY] -= v.n[VY];
+ return *this;
+}
+
+vec2 &vec2::operator*=(float d)
+{
+ n[VX] *= d;
+ n[VY] *= d;
+ return *this;
+}
+
+vec2 &vec2::operator/=(float d)
+{
+ float d_inv = 1.0f/d;
+ n[VX] *= d_inv;
+ n[VY] *= d_inv;
+ return *this;
+}
+
+float &vec2::operator[](int i)
+{
+ if (i < VX || i > VY)
+ //VEC_ERROR("vec2 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("vec2 [] operator: illegal access" );
+ return n[i];
+}
+
+const float &vec2::operator[](int i) const
+{
+ if (i < VX || i > VY)
+ //VEC_ERROR("vec2 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("vec2 [] operator: illegal access" );
+
+ return n[i];
+}
+
+/******************** vec2 SPECIAL FUNCTIONS ********************/
+
+float vec2::length() const
+{
+ return (float) sqrt(length2());
+}
+
+float vec2::length2() const
+{
+ return n[VX]*n[VX] + n[VY]*n[VY];
+}
+
+vec2 &vec2::normalize() // it is up to caller to avoid divide-by-zero
+{
+ *this /= length();
+ return *this;
+}
+
+vec2 &vec2::apply(V_FCT_PTR fct)
+{
+ n[VX] = (*fct)(n[VX]);
+ n[VY] = (*fct)(n[VY]);
+ return *this;
+}
+
+void vec2::set( float x, float y )
+{
+ n[VX] = x; n[VY] = y;
+}
+
+/******************** vec2 FRIENDS *****************************/
+
+vec2 operator-(const vec2 &a)
+{
+ return vec2(-a.n[VX],-a.n[VY]);
+}
+
+vec2 operator+(const vec2 &a, const vec2& b)
+{
+ return vec2(a.n[VX]+b.n[VX], a.n[VY]+b.n[VY]);
+}
+
+vec2 operator-(const vec2 &a, const vec2& b)
+{
+ return vec2(a.n[VX]-b.n[VX], a.n[VY]-b.n[VY]);
+}
+
+vec2 operator*(const vec2 &a, float d)
+{
+ return vec2(d*a.n[VX], d*a.n[VY]);
+}
+
+vec2 operator*(float d, const vec2 &a)
+{
+ return a*d;
+}
+
+vec2 operator*(const mat3 &a, const vec2 &v)
+{
+ vec3 av;
+
+ av.n[VX] = a.v[0].n[VX]*v.n[VX] + a.v[0].n[VY]*v.n[VY] + a.v[0].n[VZ];
+ av.n[VY] = a.v[1].n[VX]*v.n[VX] + a.v[1].n[VY]*v.n[VY] + a.v[1].n[VZ];
+ av.n[VZ] = a.v[2].n[VX]*v.n[VX] + a.v[2].n[VY]*v.n[VY] + a.v[2].n[VZ];
+
+ return av;
+}
+
+vec2 operator*(const vec2 &v, const mat3 &a)
+{
+ return a.transpose() * v;
+}
+
+vec3 operator*(const mat3 &a, const vec3 &v)
+{
+ vec3 av;
+
+ av.n[VX] = a.v[0].n[VX]*v.n[VX] + a.v[0].n[VY]*v.n[VY] + a.v[0].n[VZ]*v.n[VZ];
+ av.n[VY] = a.v[1].n[VX]*v.n[VX] + a.v[1].n[VY]*v.n[VY] + a.v[1].n[VZ]*v.n[VZ];
+ av.n[VZ] = a.v[2].n[VX]*v.n[VX] + a.v[2].n[VY]*v.n[VY] + a.v[2].n[VZ]*v.n[VZ];
+
+ return av;
+}
+
+vec3 operator*(const vec3 &v, const mat3 &a)
+{
+ return a.transpose() * v;
+}
+
+float operator*(const vec2 &a, const vec2 &b)
+{
+ return a.n[VX]*b.n[VX] + a.n[VY]*b.n[VY];
+}
+
+vec2 operator/(const vec2 &a, float d)
+{
+ float d_inv = 1.0f/d;
+ return vec2(a.n[VX]*d_inv, a.n[VY]*d_inv);
+}
+
+vec3 operator^(const vec2 &a, const vec2 &b)
+{
+ return vec3(0.0, 0.0, a.n[VX] * b.n[VY] - b.n[VX] * a.n[VY]);
+}
+
+int operator==(const vec2 &a, const vec2 &b)
+{
+ return (a.n[VX] == b.n[VX]) && (a.n[VY] == b.n[VY]);
+}
+
+int operator!=(const vec2 &a, const vec2 &b)
+{
+ return !(a == b);
+}
+
+/*ostream& operator << (ostream& s, vec2& v)
+{ return s << "| " << v.n[VX] << ' ' << v.n[VY] << " |"; }
+*/
+
+/*istream& operator >> (istream& s, vec2& v) {
+ vec2 v_tmp;
+ char c = ' ';
+
+ while (isspace(c))
+ s >> c;
+ // The vectors can be formatted either as x y or | x y |
+ if (c == '|') {
+ s >> v_tmp[VX] >> v_tmp[VY];
+ while (s >> c && isspace(c)) ;
+ if (c != '|')
+ ;//s.set(_bad);
+ }
+ else {
+ s.putback(c);
+ s >> v_tmp[VX] >> v_tmp[VY];
+ }
+ if (s)
+ v = v_tmp;
+ return s;
+}
+*/
+
+void swap(vec2 &a, vec2 &b)
+{
+ vec2 tmp(a);
+ a = b;
+ b = tmp;
+}
+
+vec2 min_vec(const vec2 &a, const vec2 &b)
+{
+ return vec2(MIN(a.n[VX], b.n[VX]), MIN(a.n[VY], b.n[VY]));
+}
+
+vec2 max_vec(const vec2 &a, const vec2 &b)
+{
+ return vec2(MAX(a.n[VX], b.n[VX]), MAX(a.n[VY], b.n[VY]));
+}
+
+vec2 prod(const vec2 &a, const vec2 &b)
+{
+ return vec2(a.n[VX] * b.n[VX], a.n[VY] * b.n[VY]);
+}
+
+/****************************************************************
+ * *
+ * vec3 Member functions *
+ * *
+ ****************************************************************/
+
+// CONSTRUCTORS
+
+vec3::vec3()
+{
+ n[VX] = n[VY] = n[VZ] = 0.0;
+}
+
+vec3::vec3(float x, float y, float z)
+{
+ n[VX] = x;
+ n[VY] = y;
+ n[VZ] = z;
+}
+
+vec3::vec3(const vec3 &v)
+{
+ n[VX] = v.n[VX]; n[VY] = v.n[VY]; n[VZ] = v.n[VZ];
+}
+
+vec3::vec3(const vec2 &v)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ n[VZ] = 1.0;
+}
+
+vec3::vec3(const vec2 &v, float d)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ n[VZ] = d;
+}
+
+vec3::vec3(const vec4 &v) // it is up to caller to avoid divide-by-zero
+{
+ n[VX] = v.n[VX] / v.n[VW];
+ n[VY] = v.n[VY] / v.n[VW];
+ n[VZ] = v.n[VZ] / v.n[VW];
+}
+
+vec3::vec3(const vec4 &v, int dropAxis)
+{
+ switch (dropAxis)
+ {
+ case VX: n[VX] = v.n[VY]; n[VY] = v.n[VZ]; n[VZ] = v.n[VW]; break;
+ case VY: n[VX] = v.n[VX]; n[VY] = v.n[VZ]; n[VZ] = v.n[VW]; break;
+ case VZ: n[VX] = v.n[VX]; n[VY] = v.n[VY]; n[VZ] = v.n[VW]; break;
+ default: n[VX] = v.n[VX]; n[VY] = v.n[VY]; n[VZ] = v.n[VZ]; break;
+ }
+}
+
+
+// ASSIGNMENT OPERATORS
+
+vec3 &vec3::operator=(const vec3 &v)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ n[VZ] = v.n[VZ];
+ return *this;
+}
+
+vec3 &vec3::operator+=(const vec3 &v)
+{
+ n[VX] += v.n[VX];
+ n[VY] += v.n[VY];
+ n[VZ] += v.n[VZ];
+ return *this;
+}
+
+vec3 &vec3::operator-=(const vec3& v)
+{
+ n[VX] -= v.n[VX];
+ n[VY] -= v.n[VY];
+ n[VZ] -= v.n[VZ];
+ return *this;
+}
+
+vec3 &vec3::operator*=(float d)
+{
+ n[VX] *= d;
+ n[VY] *= d;
+ n[VZ] *= d;
+ return *this;
+}
+
+vec3 &vec3::operator/=(float d)
+{
+ float d_inv = 1.0f/d;
+ n[VX] *= d_inv;
+ n[VY] *= d_inv;
+ n[VZ] *= d_inv;
+ return *this;
+}
+
+float &vec3::operator[](int i)
+{
+ if (i < VX || i > VZ)
+ //VEC_ERROR("vec3 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("vec3 [] operator: illegal access" );
+
+ return n[i];
+}
+
+const float &vec3::operator[](int i) const
+{
+ if (i < VX || i > VZ)
+ //VEC_ERROR("vec3 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("vec3 [] operator: illegal access" );
+
+ return n[i];
+}
+
+// SPECIAL FUNCTIONS
+
+float vec3::length() const
+{
+ return (float) sqrt(length2());
+}
+
+float vec3::length2() const
+{
+ return n[VX]*n[VX] + n[VY]*n[VY] + n[VZ]*n[VZ];
+}
+
+vec3 &vec3::normalize() // it is up to caller to avoid divide-by-zero
+{
+ *this /= length();
+ return *this;
+}
+
+vec3 &vec3::homogenize(void) // it is up to caller to avoid divide-by-zero
+{
+ n[VX] /= n[VZ];
+ n[VY] /= n[VZ];
+ n[VZ] = 1.0;
+ return *this;
+}
+
+vec3 &vec3::apply(V_FCT_PTR fct)
+{
+ n[VX] = (*fct)(n[VX]);
+ n[VY] = (*fct)(n[VY]);
+ n[VZ] = (*fct)(n[VZ]);
+ return *this;
+}
+
+void vec3::set(float x, float y, float z) // set vector
+{
+ n[VX] = x;
+ n[VY] = y;
+ n[VZ] = z;
+}
+
+void vec3::print(FILE *file, const char *name) const // print vector to a file
+{
+ fprintf( file, "%s: <%f, %f, %f>\n", name, n[VX], n[VY], n[VZ] );
+}
+
+// FRIENDS
+
+vec3 operator-(const vec3 &a)
+{
+ return vec3(-a.n[VX],-a.n[VY],-a.n[VZ]);
+}
+
+vec3 operator+(const vec3 &a, const vec3 &b)
+{
+ return vec3(a.n[VX]+ b.n[VX], a.n[VY] + b.n[VY], a.n[VZ] + b.n[VZ]);
+}
+
+vec3 operator-(const vec3 &a, const vec3 &b)
+{
+ return vec3(a.n[VX]-b.n[VX], a.n[VY]-b.n[VY], a.n[VZ]-b.n[VZ]);
+}
+
+vec3 operator*(const vec3 &a, float d)
+{
+ return vec3(d*a.n[VX], d*a.n[VY], d*a.n[VZ]);
+}
+
+vec3 operator*(float d, const vec3 &a)
+{
+ return a*d;
+}
+
+vec3 operator*(const mat4 &a, const vec3 &v)
+{
+ return a*vec4(v);
+}
+
+vec3 operator*(const vec3 &v, mat4 &a)
+{
+ return a.transpose()*v;
+}
+
+float operator*(const vec3 &a, const vec3 &b)
+{
+ return a.n[VX]*b.n[VX] + a.n[VY]*b.n[VY] + a.n[VZ]*b.n[VZ];
+}
+
+vec3 operator/(const vec3 &a, float d)
+{
+ float d_inv = 1.0f/d;
+ return vec3(a.n[VX]*d_inv, a.n[VY]*d_inv, a.n[VZ]*d_inv);
+}
+
+vec3 operator^(const vec3 &a, const vec3 &b)
+{
+ return
+ vec3(a.n[VY]*b.n[VZ] - a.n[VZ]*b.n[VY],
+ a.n[VZ]*b.n[VX] - a.n[VX]*b.n[VZ],
+ a.n[VX]*b.n[VY] - a.n[VY]*b.n[VX]);
+}
+
+int operator==(const vec3 &a, const vec3 &b)
+{
+ return (a.n[VX] == b.n[VX]) && (a.n[VY] == b.n[VY]) && (a.n[VZ] == b.n[VZ]);
+}
+
+int operator!=(const vec3 &a, const vec3 &b)
+{
+ return !(a == b);
+}
+
+/*ostream& operator << (ostream& s, vec3& v)
+{ return s << "| " << v.n[VX] << ' ' << v.n[VY] << ' ' << v.n[VZ] << " |"; }
+
+istream& operator >> (istream& s, vec3& v) {
+ vec3 v_tmp;
+ char c = ' ';
+
+ while (isspace(c))
+ s >> c;
+ // The vectors can be formatted either as x y z or | x y z |
+ if (c == '|') {
+ s >> v_tmp[VX] >> v_tmp[VY] >> v_tmp[VZ];
+ while (s >> c && isspace(c)) ;
+ if (c != '|')
+ ;//s.set(_bad);
+ }
+ else {
+ s.putback(c);
+ s >> v_tmp[VX] >> v_tmp[VY] >> v_tmp[VZ];
+ }
+ if (s)
+ v = v_tmp;
+ return s;
+}
+*/
+
+void swap(vec3 &a, vec3 &b)
+{
+ vec3 tmp(a);
+ a = b;
+ b = tmp;
+}
+
+vec3 min_vec(const vec3 &a, const vec3 &b)
+{
+ return vec3(
+ MIN(a.n[VX], b.n[VX]),
+ MIN(a.n[VY], b.n[VY]),
+ MIN(a.n[VZ], b.n[VZ]));
+}
+
+vec3 max_vec(const vec3 &a, const vec3 &b)
+{
+ return vec3(
+ MAX(a.n[VX], b.n[VX]),
+ MAX(a.n[VY], b.n[VY]),
+ MAX(a.n[VZ], b.n[VZ]));
+}
+
+vec3 prod(const vec3 &a, const vec3 &b)
+{
+ return vec3(a.n[VX]*b.n[VX], a.n[VY]*b.n[VY], a.n[VZ]*b.n[VZ]);
+}
+
+/****************************************************************
+ * *
+ * vec4 Member functions *
+ * *
+ ****************************************************************/
+
+// CONSTRUCTORS
+
+vec4::vec4()
+{
+ n[VX] = n[VY] = n[VZ] = 0.0;
+ n[VW] = 1.0;
+}
+
+vec4::vec4(float x, float y, float z, float w)
+{
+ n[VX] = x;
+ n[VY] = y;
+ n[VZ] = z;
+ n[VW] = w;
+}
+
+vec4::vec4(const vec4 &v)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ n[VZ] = v.n[VZ];
+ n[VW] = v.n[VW];
+}
+
+vec4::vec4(const vec3 &v)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ n[VZ] = v.n[VZ];
+ n[VW] = 1.0;
+}
+
+vec4::vec4(const vec3 &v, float d)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ n[VZ] = v.n[VZ];
+ n[VW] = d;
+}
+
+// ASSIGNMENT OPERATORS
+
+vec4 &vec4::operator=(const vec4 &v)
+{
+ n[VX] = v.n[VX];
+ n[VY] = v.n[VY];
+ n[VZ] = v.n[VZ];
+ n[VW] = v.n[VW];
+ return *this;
+}
+
+vec4 &vec4::operator+=(const vec4 &v)
+{
+ n[VX] += v.n[VX];
+ n[VY] += v.n[VY];
+ n[VZ] += v.n[VZ];
+ n[VW] += v.n[VW];
+ return *this;
+}
+
+vec4 &vec4::operator-=(const vec4 &v)
+{
+ n[VX] -= v.n[VX];
+ n[VY] -= v.n[VY];
+ n[VZ] -= v.n[VZ];
+ n[VW] -= v.n[VW];
+ return *this;
+}
+
+vec4 &vec4::operator*=(float d)
+{
+ n[VX] *= d;
+ n[VY] *= d;
+ n[VZ] *= d;
+ n[VW] *= d;
+ return *this;
+}
+
+vec4 &vec4::operator/=(float d)
+{
+ float d_inv = 1.0f/d;
+ n[VX] *= d_inv;
+ n[VY] *= d_inv;
+ n[VZ] *= d_inv;
+ n[VW] *= d_inv;
+ return *this;
+}
+
+float &vec4::operator[](int i)
+{
+ if (i < VX || i > VW)
+ //VEC_ERROR("vec4 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("vec4 [] operator: illegal access" );
+
+ return n[i];
+}
+
+const float &vec4::operator[](int i) const
+{
+ if (i < VX || i > VW)
+ //VEC_ERROR("vec4 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("vec4 [] operator: illegal access" );
+
+ return n[i];
+}
+
+// SPECIAL FUNCTIONS
+
+float vec4::length() const
+{
+ return (float) sqrt(length2());
+}
+
+float vec4::length2() const
+{
+ return n[VX]*n[VX] + n[VY]*n[VY] + n[VZ]*n[VZ] + n[VW]*n[VW];
+}
+
+vec4 &vec4::normalize() // it is up to caller to avoid divide-by-zero
+{
+ *this /= length();
+ return *this;
+}
+
+vec4 &vec4::homogenize() // it is up to caller to avoid divide-by-zero
+{
+ n[VX] /= n[VW];
+ n[VY] /= n[VW];
+ n[VZ] /= n[VW];
+ n[VW] = 1.0;
+ return *this;
+}
+
+vec4 &vec4::apply(V_FCT_PTR fct)
+{
+ n[VX] = (*fct)(n[VX]);
+ n[VY] = (*fct)(n[VY]);
+ n[VZ] = (*fct)(n[VZ]);
+ n[VW] = (*fct)(n[VW]);
+ return *this;
+}
+
+void vec4::print(FILE *file, const char *name) const // print vector to a file
+{
+ fprintf( file, "%s: <%f, %f, %f, %f>\n", name, n[VX], n[VY], n[VZ], n[VW]);
+}
+
+void vec4::set(float x, float y, float z, float a)
+{
+ n[0] = x;
+ n[1] = y;
+ n[2] = z;
+ n[3] = a;
+}
+
+
+// FRIENDS
+
+vec4 operator-(const vec4 &a)
+{
+ return vec4(-a.n[VX],-a.n[VY],-a.n[VZ],-a.n[VW]);
+}
+
+vec4 operator+(const vec4 &a, const vec4 &b)
+{
+ return vec4(
+ a.n[VX] + b.n[VX],
+ a.n[VY] + b.n[VY],
+ a.n[VZ] + b.n[VZ],
+ a.n[VW] + b.n[VW]);
+}
+
+vec4 operator-(const vec4 &a, const vec4 &b)
+{
+ return vec4(
+ a.n[VX] - b.n[VX],
+ a.n[VY] - b.n[VY],
+ a.n[VZ] - b.n[VZ],
+ a.n[VW] - b.n[VW]);
+}
+
+vec4 operator*(const vec4 &a, float d)
+{
+ return vec4(d*a.n[VX], d*a.n[VY], d*a.n[VZ], d*a.n[VW]);
+}
+
+vec4 operator*(float d, const vec4 &a)
+{
+ return a*d;
+}
+
+vec4 operator*(const mat4 &a, const vec4 &v)
+{
+ #define ROWCOL(i) \
+ a.v[i].n[0]*v.n[VX] + \
+ a.v[i].n[1]*v.n[VY] + \
+ a.v[i].n[2]*v.n[VZ] + \
+ a.v[i].n[3]*v.n[VW]
+
+ return vec4(ROWCOL(0), ROWCOL(1), ROWCOL(2), ROWCOL(3));
+
+ #undef ROWCOL
+}
+
+vec4 operator*(const vec4 &v, const mat4 &a)
+{
+ return a.transpose()*v;
+}
+
+float operator*(const vec4 &a, const vec4 &b)
+{
+ return
+ a.n[VX]*b.n[VX] +
+ a.n[VY]*b.n[VY] +
+ a.n[VZ]*b.n[VZ] +
+ a.n[VW]*b.n[VW];
+}
+
+vec4 operator/(const vec4 &a, float d)
+{
+ float d_inv = 1.0f/d;
+ return vec4(
+ a.n[VX]*d_inv,
+ a.n[VY]*d_inv,
+ a.n[VZ]*d_inv,
+ a.n[VW]*d_inv);
+}
+
+int operator==(const vec4 &a, const vec4 &b)
+{
+ return
+ (a.n[VX] == b.n[VX]) &&
+ (a.n[VY] == b.n[VY]) &&
+ (a.n[VZ] == b.n[VZ]) &&
+ (a.n[VW] == b.n[VW]);
+}
+
+int operator!=(const vec4 &a, const vec4 &b)
+{
+ return !(a == b);
+}
+
+/*ostream& operator << (ostream& s, vec4& v)
+{ return s << "| " << v.n[VX] << ' ' << v.n[VY] << ' ' << v.n[VZ] << ' '
+ << v.n[VW] << " |"; }
+
+istream& operator >> (istream& s, vec4& v) {
+ vec4 v_tmp;
+ char c = ' ';
+
+ while (isspace(c))
+ s >> c;
+ // The vectors can be formatted either as x y z w or | x y z w |
+ if (c == '|') {
+ s >> v_tmp[VX] >> v_tmp[VY] >> v_tmp[VZ] >> v_tmp[VW];
+ while (s >> c && isspace(c)) ;
+ if (c != '|')
+ ;//s.set(_bad);
+ }
+ else {
+ s.putback(c);
+ s >> v_tmp[VX] >> v_tmp[VY] >> v_tmp[VZ] >> v_tmp[VW];
+ }
+ if (s)
+ v = v_tmp;
+ return s;
+}
+*/
+
+void swap(vec4 &a, vec4 &b)
+{
+ vec4 tmp(a);
+ a = b;
+ b = tmp;
+}
+
+vec4 min_vec(const vec4 &a, const vec4 &b)
+{
+ return vec4(
+ MIN(a.n[VX], b.n[VX]),
+ MIN(a.n[VY], b.n[VY]),
+ MIN(a.n[VZ], b.n[VZ]),
+ MIN(a.n[VW], b.n[VW]));
+}
+
+vec4 max_vec(const vec4 &a, const vec4 &b)
+{
+ return vec4(
+ MAX(a.n[VX], b.n[VX]),
+ MAX(a.n[VY], b.n[VY]),
+ MAX(a.n[VZ], b.n[VZ]),
+ MAX(a.n[VW], b.n[VW]));
+}
+
+vec4 prod(const vec4 &a, const vec4 &b)
+{
+ return vec4(
+ a.n[VX] * b.n[VX],
+ a.n[VY] * b.n[VY],
+ a.n[VZ] * b.n[VZ],
+ a.n[VW] * b.n[VW]);
+}
+
+/****************************************************************
+ * *
+ * mat3 member functions *
+ * *
+ ****************************************************************/
+
+// CONSTRUCTORS
+
+mat3::mat3()
+{
+ *this = identity2D();
+}
+
+mat3::mat3(const vec3 &v0, const vec3 &v1, const vec3 &v2)
+{
+ set(v0, v1, v2);
+}
+
+mat3::mat3(const mat3 &m)
+{
+ v[0] = m.v[0];
+ v[1] = m.v[1];
+ v[2] = m.v[2];
+}
+
+// ASSIGNMENT OPERATORS
+
+mat3 &mat3::operator=(const mat3 &m)
+{
+ v[0] = m.v[0];
+ v[1] = m.v[1];
+ v[2] = m.v[2];
+ return *this;
+}
+
+mat3 &mat3::operator+=(const mat3& m)
+{
+ v[0] += m.v[0];
+ v[1] += m.v[1];
+ v[2] += m.v[2];
+ return *this;
+}
+
+mat3 &mat3::operator-=(const mat3& m)
+{
+ v[0] -= m.v[0];
+ v[1] -= m.v[1];
+ v[2] -= m.v[2];
+ return *this;
+}
+
+mat3 &mat3::operator*=(float d)
+{
+ v[0] *= d;
+ v[1] *= d;
+ v[2] *= d;
+ return *this;
+}
+
+mat3 &mat3::operator/=(float d)
+{
+ v[0] /= d;
+ v[1] /= d;
+ v[2] /= d;
+ return *this;
+}
+
+vec3 &mat3::operator[](int i)
+{
+ if (i < VX || i > VZ)
+ //VEC_ERROR("mat3 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("mat3 [] operator: illegal access" );
+
+ return v[i];
+}
+
+const vec3 &mat3::operator[](int i) const
+{
+ if (i < VX || i > VZ)
+ //VEC_ERROR("mat3 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("mat3 [] operator: illegal access" );
+
+ return v[i];
+}
+
+void mat3::set(const vec3 &v0, const vec3 &v1, const vec3 &v2)
+{
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+}
+
+// SPECIAL FUNCTIONS
+
+mat3 mat3::transpose() const
+{
+ return mat3(
+ vec3(v[0][0], v[1][0], v[2][0]),
+ vec3(v[0][1], v[1][1], v[2][1]),
+ vec3(v[0][2], v[1][2], v[2][2]));
+}
+
+mat3 mat3::inverse() const // Gauss-Jordan elimination with partial pivoting
+{
+ mat3 a(*this); // As a evolves from original mat into identity
+ mat3 b(identity2D()); // b evolves from identity into inverse(a)
+ int i, j, i1;
+
+ // Loop over cols of a from left to right, eliminating above and below diag
+ for (j=0; j<3; j++) // Find largest pivot in column j among rows j..2
+ {
+ i1 = j; // Row with largest pivot candidate
+ for (i=j+1; i<3; i++)
+ if (fabs(a.v[i].n[j]) > fabs(a.v[i1].n[j]))
+ i1 = i;
+
+ // Swap rows i1 and j in a and b to put pivot on diagonal
+ swap(a.v[i1], a.v[j]);
+ swap(b.v[i1], b.v[j]);
+
+ // Scale row j to have a unit diagonal
+ if (a.v[j].n[j]==0.)
+ VEC_ERROR("mat3::inverse: singular matrix; can't invert\n");
+
+ b.v[j] /= a.v[j].n[j];
+ a.v[j] /= a.v[j].n[j];
+
+ // Eliminate off-diagonal elems in col j of a, doing identical ops to b
+ for (i=0; i<3; i++)
+ if (i!=j)
+ {
+ b.v[i] -= a.v[i].n[j]*b.v[j];
+ a.v[i] -= a.v[i].n[j]*a.v[j];
+ }
+ }
+
+ return b;
+}
+
+mat3 &mat3::apply(V_FCT_PTR fct)
+{
+ v[VX].apply(fct);
+ v[VY].apply(fct);
+ v[VZ].apply(fct);
+ return *this;
+}
+
+
+// FRIENDS
+
+mat3 operator-(const mat3 &a)
+{
+ return mat3(-a.v[0], -a.v[1], -a.v[2]);
+}
+
+mat3 operator+(const mat3 &a, const mat3 &b)
+{
+ return mat3(a.v[0]+b.v[0], a.v[1]+b.v[1], a.v[2]+b.v[2]);
+}
+
+mat3 operator-(const mat3 &a, const mat3 &b)
+{
+ return mat3(a.v[0]-b.v[0], a.v[1]-b.v[1], a.v[2]-b.v[2]);
+}
+
+mat3 operator*(const mat3 &a, const mat3 &b)
+{
+ #define ROWCOL(i, j) \
+ a.v[i].n[0]*b.v[0][j] + a.v[i].n[1]*b.v[1][j] + a.v[i].n[2]*b.v[2][j]
+
+ return mat3(
+ vec3(ROWCOL(0,0), ROWCOL(0,1), ROWCOL(0,2)),
+ vec3(ROWCOL(1,0), ROWCOL(1,1), ROWCOL(1,2)),
+ vec3(ROWCOL(2,0), ROWCOL(2,1), ROWCOL(2,2)));
+
+ #undef ROWCOL
+}
+
+mat3 operator*(const mat3 &a, float d)
+{
+ return mat3(a.v[0]*d, a.v[1]*d, a.v[2]*d);
+}
+
+mat3 operator*(float d, const mat3 &a)
+{
+ return a*d;
+}
+
+mat3 operator/(const mat3 &a, float d)
+{
+ return mat3(a.v[0]/d, a.v[1]/d, a.v[2]/d);
+}
+
+int operator==(const mat3 &a, const mat3 &b)
+{
+ return
+ (a.v[0] == b.v[0]) &&
+ (a.v[1] == b.v[1]) &&
+ (a.v[2] == b.v[2]);
+}
+
+int operator!=(const mat3 &a, const mat3 &b)
+{
+ return !(a == b);
+}
+
+/*ostream& operator << (ostream& s, mat3& m)
+{ return s << m.v[VX] << '\n' << m.v[VY] << '\n' << m.v[VZ]; }
+
+istream& operator >> (istream& s, mat3& m) {
+ mat3 m_tmp;
+
+ s >> m_tmp[VX] >> m_tmp[VY] >> m_tmp[VZ];
+ if (s)
+ m = m_tmp;
+ return s;
+}
+*/
+
+void swap(mat3 &a, mat3 &b)
+{
+ mat3 tmp(a);
+ a = b;
+ b = tmp;
+}
+
+void mat3::print(FILE *file, const char *name) const
+{
+ int i, j;
+
+ fprintf( stderr, "%s:\n", name );
+
+ for( i = 0; i < 3; i++ )
+ {
+ fprintf( stderr, " " );
+ for( j = 0; j < 3; j++ )
+ {
+ fprintf( stderr, "%f ", v[i][j] );
+ }
+ fprintf( stderr, "\n" );
+ }
+}
+
+
+
+/****************************************************************
+ * *
+ * mat4 member functions *
+ * *
+ ****************************************************************/
+
+// CONSTRUCTORS
+
+mat4::mat4()
+{
+ *this = identity3D();
+}
+
+mat4::mat4(const vec4& v0, const vec4& v1, const vec4& v2, const vec4& v3)
+{
+ v[0] = v0;
+ v[1] = v1;
+ v[2] = v2;
+ v[3] = v3;
+}
+
+mat4::mat4(const mat4 &m)
+{
+ v[0] = m.v[0];
+ v[1] = m.v[1];
+ v[2] = m.v[2];
+ v[3] = m.v[3];
+}
+
+mat4::mat4(
+ float a00, float a01, float a02, float a03,
+ float a10, float a11, float a12, float a13,
+ float a20, float a21, float a22, float a23,
+ float a30, float a31, float a32, float a33 )
+{
+ v[0][0] = a00; v[0][1] = a01; v[0][2] = a02; v[0][3] = a03;
+ v[1][0] = a10; v[1][1] = a11; v[1][2] = a12; v[1][3] = a13;
+ v[2][0] = a20; v[2][1] = a21; v[2][2] = a22; v[2][3] = a23;
+ v[3][0] = a30; v[3][1] = a31; v[3][2] = a32; v[3][3] = a33;
+}
+
+// ASSIGNMENT OPERATORS
+
+mat4 &mat4::operator=(const mat4 &m)
+{
+ v[0] = m.v[0];
+ v[1] = m.v[1];
+ v[2] = m.v[2];
+ v[3] = m.v[3];
+ return *this;
+}
+
+mat4 &mat4::operator+=(const mat4 &m)
+{
+ v[0] += m.v[0];
+ v[1] += m.v[1];
+ v[2] += m.v[2];
+ v[3] += m.v[3];
+ return *this;
+}
+
+mat4 &mat4::operator-=(const mat4 &m)
+{
+ v[0] -= m.v[0];
+ v[1] -= m.v[1];
+ v[2] -= m.v[2];
+ v[3] -= m.v[3];
+ return *this;
+}
+
+mat4 &mat4::operator*=(float d)
+{
+ v[0] *= d;
+ v[1] *= d;
+ v[2] *= d;
+ v[3] *= d;
+ return *this;
+}
+
+mat4 &mat4::operator/=(float d)
+{
+ v[0] /= d;
+ v[1] /= d;
+ v[2] /= d;
+ v[3] /= d;
+ return *this;
+}
+
+vec4 &mat4::operator[](int i)
+{
+ if (i < VX || i > VW)
+ //VEC_ERROR("mat4 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("mat4 [] operator: illegal access" );
+ return v[i];
+}
+
+const vec4 &mat4::operator[](int i) const
+{
+ if (i < VX || i > VW)
+ //VEC_ERROR("mat4 [] operator: illegal access; index = " << i << '\n')
+ VEC_ERROR("mat4 [] operator: illegal access" );
+ return v[i];
+}
+
+// SPECIAL FUNCTIONS;
+
+mat4 mat4::transpose() const
+{
+ return mat4(
+ vec4(v[0][0], v[1][0], v[2][0], v[3][0]),
+ vec4(v[0][1], v[1][1], v[2][1], v[3][1]),
+ vec4(v[0][2], v[1][2], v[2][2], v[3][2]),
+ vec4(v[0][3], v[1][3], v[2][3], v[3][3]));
+}
+
+mat4 mat4::inverse() const // Gauss-Jordan elimination with partial pivoting
+{
+ mat4 a(*this); // As a evolves from original mat into identity
+ mat4 b(identity3D()); // b evolves from identity into inverse(a)
+ int i, j, i1;
+
+ // Loop over cols of a from left to right, eliminating above and below diag
+ for (j=0; j<4; j++) // Find largest pivot in column j among rows j..3
+ {
+ i1 = j; // Row with largest pivot candidate
+ for (i=j+1; i<4; i++)
+ if (fabs(a.v[i].n[j]) > fabs(a.v[i1].n[j]))
+ i1 = i;
+
+ // Swap rows i1 and j in a and b to put pivot on diagonal
+ swap(a.v[i1], a.v[j]);
+ swap(b.v[i1], b.v[j]);
+
+ // Scale row j to have a unit diagonal
+ if (a.v[j].n[j]==0.)
+ VEC_ERROR("mat4::inverse: singular matrix; can't invert\n");
+
+ b.v[j] /= a.v[j].n[j];
+ a.v[j] /= a.v[j].n[j];
+
+ // Eliminate off-diagonal elems in col j of a, doing identical ops to b
+ for (i=0; i<4; i++)
+ if (i!=j)
+ {
+ b.v[i] -= a.v[i].n[j]*b.v[j];
+ a.v[i] -= a.v[i].n[j]*a.v[j];
+ }
+ }
+
+ return b;
+}
+
+mat4 &mat4::apply(V_FCT_PTR fct)
+{
+ v[VX].apply(fct);
+ v[VY].apply(fct);
+ v[VZ].apply(fct);
+ v[VW].apply(fct);
+ return *this;
+}
+
+void mat4::print(FILE *file, const char *name) const
+{
+ int i, j;
+
+ fprintf( stderr, "%s:\n", name );
+
+ for( i = 0; i < 4; i++ )
+ {
+ fprintf( stderr, " " );
+ for( j = 0; j < 4; j++ )
+ {
+ fprintf( stderr, "%f ", v[i][j] );
+ }
+ fprintf( stderr, "\n" );
+ }
+}
+
+void mat4::swap_rows(int i, int j)
+{
+ vec4 t;
+
+ t = v[i];
+ v[i] = v[j];
+ v[j] = t;
+}
+
+void mat4::swap_cols(int i, int j)
+{
+ float t;
+ int k;
+
+ for (k=0; k<4; k++)
+ {
+ t = v[k][i];
+ v[k][i] = v[k][j];
+ v[k][j] = t;
+ }
+}
+
+
+// FRIENDS
+
+mat4 operator-(const mat4 &a)
+{
+ return mat4(-a.v[0],-a.v[1],-a.v[2],-a.v[3]);
+}
+
+mat4 operator+(const mat4 &a, const mat4 &b)
+{
+ return mat4(
+ a.v[0] + b.v[0],
+ a.v[1] + b.v[1],
+ a.v[2] + b.v[2],
+ a.v[3] + b.v[3]);
+}
+
+mat4 operator-(const mat4 &a, const mat4 &b)
+{
+ return mat4(
+ a.v[0] - b.v[0],
+ a.v[1] - b.v[1],
+ a.v[2] - b.v[2],
+ a.v[3] - b.v[3]);
+}
+
+mat4 operator*(const mat4 &a, const mat4 &b)
+{
+ #define ROWCOL(i, j) \
+ a.v[i].n[0]*b.v[0][j] + \
+ a.v[i].n[1]*b.v[1][j] + \
+ a.v[i].n[2]*b.v[2][j] + \
+ a.v[i].n[3]*b.v[3][j]
+
+ return mat4(
+ vec4(ROWCOL(0,0), ROWCOL(0,1), ROWCOL(0,2), ROWCOL(0,3)),
+ vec4(ROWCOL(1,0), ROWCOL(1,1), ROWCOL(1,2), ROWCOL(1,3)),
+ vec4(ROWCOL(2,0), ROWCOL(2,1), ROWCOL(2,2), ROWCOL(2,3)),
+ vec4(ROWCOL(3,0), ROWCOL(3,1), ROWCOL(3,2), ROWCOL(3,3))
+ );
+
+ #undef ROWCOL
+}
+
+mat4 operator*(const mat4 &a, float d)
+{
+ return mat4(a.v[0]*d, a.v[1]*d, a.v[2]*d, a.v[3]*d);
+}
+
+mat4 operator*(float d, const mat4 &a)
+{
+ return a*d;
+}
+
+mat4 operator/(const mat4 &a, float d)
+{
+ return mat4(a.v[0]/d, a.v[1]/d, a.v[2]/d, a.v[3]/d);
+}
+
+int operator==(const mat4 &a, const mat4 &b)
+{
+ return
+ (a.v[0] == b.v[0]) &&
+ (a.v[1] == b.v[1]) &&
+ (a.v[2] == b.v[2]) &&
+ (a.v[3] == b.v[3]);
+}
+
+int operator!=(const mat4 &a, const mat4 &b)
+{
+ return !(a == b);
+}
+
+/*ostream& operator << (ostream& s, mat4& m)
+{ return s << m.v[VX] << '\n' << m.v[VY] << '\n' << m.v[VZ] << '\n' << m.v[VW]; }
+
+istream& operator >> (istream& s, mat4& m)
+{
+ mat4 m_tmp;
+
+ s >> m_tmp[VX] >> m_tmp[VY] >> m_tmp[VZ] >> m_tmp[VW];
+ if (s)
+ m = m_tmp;
+ return s;
+}
+*/
+
+void swap(mat4 &a, mat4 &b)
+{
+ mat4 tmp(a);
+ a = b;
+ b = tmp;
+}
+
+/****************************************************************
+ * *
+ * 2D functions and 3D functions *
+ * *
+ ****************************************************************/
+
+mat3 identity2D()
+{
+ return mat3(
+ vec3(1.0, 0.0, 0.0),
+ vec3(0.0, 1.0, 0.0),
+ vec3(0.0, 0.0, 1.0));
+}
+
+mat3 translation2D(const vec2 &v)
+{
+ return mat3(
+ vec3(1.0, 0.0, v[VX]),
+ vec3(0.0, 1.0, v[VY]),
+ vec3(0.0, 0.0, 1.0));
+}
+
+mat3 rotation2D(const vec2 &Center, float angleDeg)
+{
+ float angleRad = (float) (angleDeg * M_PI / 180.0);
+ float c = (float) cos(angleRad);
+ float s = (float) sin(angleRad);
+
+ return mat3(
+ vec3(c, -s, Center[VX] * (1.0f-c) + Center[VY] * s),
+ vec3(s, c, Center[VY] * (1.0f-c) - Center[VX] * s),
+ vec3(0.0, 0.0, 1.0));
+}
+
+mat3 scaling2D(const vec2 &scaleVector)
+{
+ return mat3(
+ vec3(scaleVector[VX], 0.0, 0.0),
+ vec3(0.0, scaleVector[VY], 0.0),
+ vec3(0.0, 0.0, 1.0));
+}
+
+mat4 identity3D()
+{
+ return mat4(
+ vec4(1.0, 0.0, 0.0, 0.0),
+ vec4(0.0, 1.0, 0.0, 0.0),
+ vec4(0.0, 0.0, 1.0, 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0));
+}
+
+mat4 translation3D(const vec3 &v)
+{
+ return mat4(
+ vec4(1.0, 0.0, 0.0, v[VX]),
+ vec4(0.0, 1.0, 0.0, v[VY]),
+ vec4(0.0, 0.0, 1.0, v[VZ]),
+ vec4(0.0, 0.0, 0.0, 1.0));
+}
+
+mat4 rotation3D(const vec3 &Axis, float angleDeg)
+{
+ float angleRad = (float) (angleDeg * M_PI / 180.0);
+ float c = (float) cos(angleRad);
+ float s = (float) sin(angleRad);
+ float t = 1.0f - c;
+
+ vec3 axis(Axis);
+ axis.normalize();
+
+ return mat4(
+ vec4(t * axis[VX] * axis[VX] + c,
+ t * axis[VX] * axis[VY] - s * axis[VZ],
+ t * axis[VX] * axis[VZ] + s * axis[VY],
+ 0.0),
+ vec4(t * axis[VX] * axis[VY] + s * axis[VZ],
+ t * axis[VY] * axis[VY] + c,
+ t * axis[VY] * axis[VZ] - s * axis[VX],
+ 0.0),
+ vec4(t * axis[VX] * axis[VZ] - s * axis[VY],
+ t * axis[VY] * axis[VZ] + s * axis[VX],
+ t * axis[VZ] * axis[VZ] + c,
+ 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0));
+}
+
+mat4 rotation3Drad(const vec3 &Axis, float angleRad)
+{
+ float c = (float) cos(angleRad);
+ float s = (float) sin(angleRad);
+ float t = 1.0f - c;
+
+ vec3 axis(Axis);
+ axis.normalize();
+
+ return mat4(
+ vec4(t * axis[VX] * axis[VX] + c,
+ t * axis[VX] * axis[VY] - s * axis[VZ],
+ t * axis[VX] * axis[VZ] + s * axis[VY],
+ 0.0),
+ vec4(t * axis[VX] * axis[VY] + s * axis[VZ],
+ t * axis[VY] * axis[VY] + c,
+ t * axis[VY] * axis[VZ] - s * axis[VX],
+ 0.0),
+ vec4(t * axis[VX] * axis[VZ] - s * axis[VY],
+ t * axis[VY] * axis[VZ] + s * axis[VX],
+ t * axis[VZ] * axis[VZ] + c,
+ 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0));
+}
+
+mat4 scaling3D(const vec3 &scaleVector)
+{
+ return mat4(
+ vec4(scaleVector[VX], 0.0, 0.0, 0.0),
+ vec4(0.0, scaleVector[VY], 0.0, 0.0),
+ vec4(0.0, 0.0, scaleVector[VZ], 0.0),
+ vec4(0.0, 0.0, 0.0, 1.0));
+}
+
+mat4 perspective3D(float d)
+{
+ return mat4(
+ vec4(1.0f, 0.0f, 0.0f, 0.0f),
+ vec4(0.0f, 1.0f, 0.0f, 0.0f),
+ vec4(0.0f, 0.0f, 1.0f, 0.0f),
+ vec4(0.0f, 0.0f, 1.0f/d, 0.0f));
+}
diff --git a/tests/bullet/Extras/glui/algebra3.h b/tests/bullet/Extras/glui/algebra3.h
new file mode 100644
index 00000000..9875b3a8
--- /dev/null
+++ b/tests/bullet/Extras/glui/algebra3.h
@@ -0,0 +1,475 @@
+/*
+
+ algebra3.cpp, algebra3.h - C++ Vector and Matrix Algebra routines
+
+ GLUI User Interface Toolkit (LGPL)
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+
+/**************************************************************************
+
+ There are three vector classes and two matrix classes: vec2, vec3,
+ vec4, mat3, and mat4.
+
+ All the standard arithmetic operations are defined, with '*'
+ for dot product of two vectors and multiplication of two matrices,
+ and '^' for cross product of two vectors.
+
+ Additional functions include length(), normalize(), homogenize for
+ vectors, and print(), set(), apply() for all classes.
+
+ There is a function transpose() for matrices, but note that it
+ does not actually change the matrix,
+
+ When multiplied with a matrix, a vector is treated as a row vector
+ if it precedes the matrix (v*M), and as a column vector if it
+ follows the matrix (M*v).
+
+ Matrices are stored in row-major form.
+
+ A vector of one dimension (2d, 3d, or 4d) can be cast to a vector
+ of a higher or lower dimension. If casting to a higher dimension,
+ the new component is set by default to 1.0, unless a value is
+ specified:
+ vec3 a(1.0, 2.0, 3.0 );
+ vec4 b( a, 4.0 ); // now b == {1.0, 2.0, 3.0, 4.0};
+ When casting to a lower dimension, the vector is homogenized in
+ the lower dimension. E.g., if a 4d {X,Y,Z,W} is cast to 3d, the
+ resulting vector is {X/W, Y/W, Z/W}. It is up to the user to
+ insure the fourth component is not zero before casting.
+
+ There are also the following function for building matrices:
+ identity2D(), translation2D(), rotation2D(),
+ scaling2D(), identity3D(), translation3D(),
+ rotation3D(), rotation3Drad(), scaling3D(),
+ perspective3D()
+
+ NOTE: When compiling for Windows, include this file first, to avoid
+ certain name conflicts
+
+ ---------------------------------------------------------------------
+
+ Author: Jean-Francois DOUEg
+ Revised: Paul Rademacher
+ Version 3.2 - Feb 1998
+ Revised: Nigel Stewart (GLUI Code Cleaning)
+
+**************************************************************************/
+
+#ifndef GLUI_ALGEBRA3_H
+#define GLUI_ALGEBRA3_H
+
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+
+// this line defines a new type: pointer to a function which returns a
+// float and takes as argument a float
+typedef float (*V_FCT_PTR)(float);
+
+class vec2;
+class vec3;
+class vec4;
+class mat3;
+class mat4;
+
+#ifndef M_PI
+#define M_PI 3.141592654
+#endif
+
+enum {VX, VY, VZ, VW}; // axes
+enum {PA, PB, PC, PD}; // planes
+enum {RED, GREEN, BLUE, ALPHA}; // colors
+enum {KA, KD, KS, ES}; // phong coefficients
+
+/****************************************************************
+ * *
+ * 2D Vector *
+ * *
+ ****************************************************************/
+
+class vec2
+{
+ friend class vec3;
+
+protected:
+
+ float n[2];
+
+public:
+
+ // Constructors
+
+ vec2();
+ vec2(float x, float y);
+ vec2(const vec2 &v); // copy constructor
+ vec2(const vec3 &v); // cast v3 to v2
+ vec2(const vec3 &v, int dropAxis); // cast v3 to v2
+
+ // Assignment operators
+
+ vec2 &operator = (const vec2 &v); // assignment of a vec2
+ vec2 &operator += (const vec2 &v); // incrementation by a vec2
+ vec2 &operator -= (const vec2 &v); // decrementation by a vec2
+ vec2 &operator *= (float d); // multiplication by a constant
+ vec2 &operator /= (float d); // division by a constant
+
+ // special functions
+
+ float length() const; // length of a vec2
+ float length2() const; // squared length of a vec2
+ vec2 &normalize(); // normalize a vec2
+ vec2 &apply(V_FCT_PTR fct); // apply a func. to each component
+ void set(float x, float y); // set vector
+
+ float &operator [] (int i); // indexing
+ const float &operator [] (int i) const; // indexing
+
+ // friends
+
+ friend vec2 operator - (const vec2 &v); // -v1
+ friend vec2 operator + (const vec2 &a, const vec2 &b); // v1 + v2
+ friend vec2 operator - (const vec2 &a, const vec2 &b); // v1 - v2
+ friend vec2 operator * (const vec2 &a, float d); // v1 * 3.0
+ friend vec2 operator * (float d, const vec2 &a); // 3.0 * v1
+ friend vec2 operator * (const mat3 &a, const vec2 &v); // M . v
+ friend vec2 operator * (const vec2 &v, const mat3 &a); // v . M
+ friend float operator * (const vec2 &a, const vec2 &b); // dot product
+ friend vec2 operator / (const vec2 &a, float d); // v1 / 3.0
+ friend vec3 operator ^ (const vec2 &a, const vec2 &b); // cross product
+ friend int operator == (const vec2 &a, const vec2 &b); // v1 == v2 ?
+ friend int operator != (const vec2 &a, const vec2 &b); // v1 != v2 ?
+ //friend ostream& operator << (ostream& s, vec2& v); // output to stream
+ //friend istream& operator >> (istream& s, vec2& v); // input from strm.
+ friend void swap(vec2 &a, vec2 &b); // swap v1 & v2
+ friend vec2 min_vec(const vec2 &a, const vec2 &b); // min(v1, v2)
+ friend vec2 max_vec(const vec2 &a, const vec2 &b); // max(v1, v2)
+ friend vec2 prod (const vec2 &a, const vec2 &b); // term by term *
+};
+
+/****************************************************************
+ * *
+ * 3D Vector *
+ * *
+ ****************************************************************/
+
+class vec3
+{
+ friend class vec2;
+ friend class vec4;
+ friend class mat3;
+
+protected:
+
+ float n[3];
+
+public:
+
+ // Constructors
+
+ vec3();
+ vec3(float x, float y, float z);
+ vec3(const vec3 &v); // copy constructor
+ vec3(const vec2 &v); // cast v2 to v3
+ vec3(const vec2 &v, float d); // cast v2 to v3
+ vec3(const vec4 &v); // cast v4 to v3
+ vec3(const vec4 &v, int dropAxis); // cast v4 to v3
+
+ // Assignment operators
+
+ vec3 &operator = (const vec3 &v); // assignment of a vec3
+ vec3 &operator += (const vec3 &v); // incrementation by a vec3
+ vec3 &operator -= (const vec3 &v); // decrementation by a vec3
+ vec3 &operator *= (float d); // multiplication by a constant
+ vec3 &operator /= (float d); // division by a constant
+
+ // special functions
+
+ float length() const; // length of a vec3
+ float length2() const; // squared length of a vec3
+ vec3& normalize(); // normalize a vec3
+ vec3& homogenize(); // homogenize (div by Z)
+ vec3& apply(V_FCT_PTR fct); // apply a func. to each component
+ void set(float x, float y, float z); // set vector
+
+ void print(FILE *file, const char *name) const; // print vector to a file
+
+
+ float &operator [] (int i); // indexing
+ const float &operator [] (int i) const; // indexing
+
+ // friends
+
+ friend vec3 operator - (const vec3 &v); // -v1
+ friend vec3 operator + (const vec3 &a, const vec3 &b); // v1 + v2
+ friend vec3 operator - (const vec3 &a, const vec3 &b); // v1 - v2
+ friend vec3 operator * (const vec3 &a, float d); // v1 * 3.0
+ friend vec3 operator * (float d, const vec3 &a); // 3.0 * v1
+ friend vec3 operator * (const mat4 &a, const vec3 &v); // M . v
+ friend vec3 operator * (const vec3 &v, const mat4 &a); // v . M
+ friend float operator * (const vec3 &a, const vec3 &b); // dot product
+ friend vec3 operator / (const vec3 &a, float d); // v1 / 3.0
+ friend vec3 operator ^ (const vec3 &a, const vec3 &b); // cross product
+ friend int operator == (const vec3 &a, const vec3 &b); // v1 == v2 ?
+ friend int operator != (const vec3 &a, const vec3 &b); // v1 != v2 ?
+ //friend ostream& operator << (ostream& s, vec3& v); // output to stream
+ //friend istream& operator >> (istream& s, vec3& v); // input from strm.
+ friend void swap(vec3 &a, vec3 &b); // swap v1 & v2
+ friend vec3 min_vec(const vec3 &a, const vec3 &b); // min(v1, v2)
+ friend vec3 max_vec(const vec3 &a, const vec3 &b); // max(v1, v2)
+ friend vec3 prod(const vec3 &a, const vec3 &b); // term by term *
+
+ // necessary friend declarations
+
+ friend vec2 operator * (const mat3 &a, const vec2 &v); // linear transform
+ friend vec3 operator * (const mat3 &a, const vec3 &v); // linear transform
+ friend mat3 operator * (const mat3 &a, const mat3 &b); // matrix 3 product
+};
+
+/****************************************************************
+ * *
+ * 4D Vector *
+ * *
+ ****************************************************************/
+
+class vec4
+{
+ friend class vec3;
+ friend class mat4;
+
+protected:
+
+ float n[4];
+
+public:
+
+ // Constructors
+
+ vec4();
+ vec4(float x, float y, float z, float w);
+ vec4(const vec4 &v); // copy constructor
+ vec4(const vec3 &v); // cast vec3 to vec4
+ vec4(const vec3 &v, float d); // cast vec3 to vec4
+
+ // Assignment operators
+
+ vec4 &operator = (const vec4 &v); // assignment of a vec4
+ vec4 &operator += (const vec4 &v); // incrementation by a vec4
+ vec4 &operator -= (const vec4 &v); // decrementation by a vec4
+ vec4 &operator *= (float d); // multiplication by a constant
+ vec4 &operator /= (float d); // division by a constant
+
+ // special functions
+
+ float length() const; // length of a vec4
+ float length2() const; // squared length of a vec4
+ vec4 &normalize(); // normalize a vec4
+ vec4 &apply(V_FCT_PTR fct); // apply a func. to each component
+ vec4 &homogenize();
+
+ void print(FILE *file, const char *name) const; // print vector to a file
+
+ void set(float x, float y, float z, float a);
+
+ float &operator [] (int i); // indexing
+ const float &operator [] (int i) const; // indexing
+
+ // friends
+
+ friend vec4 operator - (const vec4 &v); // -v1
+ friend vec4 operator + (const vec4 &a, const vec4 &b); // v1 + v2
+ friend vec4 operator - (const vec4 &a, const vec4 &b); // v1 - v2
+ friend vec4 operator * (const vec4 &a, float d); // v1 * 3.0
+ friend vec4 operator * (float d, const vec4 &a); // 3.0 * v1
+ friend vec4 operator * (const mat4 &a, const vec4 &v); // M . v
+ friend vec4 operator * (const vec4 &v, const mat4 &a); // v . M
+ friend float operator * (const vec4 &a, const vec4 &b); // dot product
+ friend vec4 operator / (const vec4 &a, float d); // v1 / 3.0
+ friend int operator == (const vec4 &a, const vec4 &b); // v1 == v2 ?
+ friend int operator != (const vec4 &a, const vec4 &b); // v1 != v2 ?
+ //friend ostream& operator << (ostream& s, vec4& v); // output to stream
+ //friend istream& operator >> (istream& s, vec4& v); // input from strm.
+ friend void swap(vec4 &a, vec4 &b); // swap v1 & v2
+ friend vec4 min_vec(const vec4 &a, const vec4 &b); // min(v1, v2)
+ friend vec4 max_vec(const vec4 &a, const vec4 &b); // max(v1, v2)
+ friend vec4 prod (const vec4 &a, const vec4 &b); // term by term *
+
+ // necessary friend declarations
+
+ friend vec3 operator * (const mat4 &a, const vec3 &v); // linear transform
+ friend mat4 operator * (const mat4 &a, const mat4 &b); // matrix 4 product
+};
+
+/****************************************************************
+ * *
+ * 3x3 Matrix *
+ * *
+ ****************************************************************/
+
+class mat3
+{
+protected:
+
+ vec3 v[3];
+
+public:
+
+ // Constructors
+
+ mat3();
+ mat3(const vec3 &v0, const vec3 &v1, const vec3 &v2);
+ mat3(const mat3 &m);
+
+ // Assignment operators
+
+ mat3 &operator = (const mat3 &m); // assignment of a mat3
+ mat3 &operator += (const mat3 &m); // incrementation by a mat3
+ mat3 &operator -= (const mat3 &m); // decrementation by a mat3
+ mat3 &operator *= (float d); // multiplication by a constant
+ mat3 &operator /= (float d); // division by a constant
+
+ // special functions
+
+ mat3 transpose() const; // transpose
+ mat3 inverse() const; // inverse
+ mat3 &apply(V_FCT_PTR fct); // apply a func. to each element
+
+ void print(FILE *file, const char *name ) const; // print matrix to a file
+
+ void set(const vec3 &v0, const vec3 &v1, const vec3 &v2);
+
+ vec3 &operator [] (int i); // indexing
+ const vec3 &operator [] (int i) const; // indexing
+
+ // friends
+
+ friend mat3 operator - (const mat3 &a); // -m1
+ friend mat3 operator + (const mat3 &a, const mat3 &b); // m1 + m2
+ friend mat3 operator - (const mat3 &a, const mat3 &b); // m1 - m2
+ friend mat3 operator * (const mat3 &a, const mat3 &b); // m1 * m2
+ friend mat3 operator * (const mat3 &a, float d); // m1 * 3.0
+ friend mat3 operator * (float d, const mat3 &a); // 3.0 * m1
+ friend mat3 operator / (const mat3 &a, float d); // m1 / 3.0
+ friend int operator == (const mat3 &a, const mat3 &b); // m1 == m2 ?
+ friend int operator != (const mat3 &a, const mat3 &b); // m1 != m2 ?
+ //friend ostream& operator << (ostream& s, mat3& m); // output to stream
+ //friend istream& operator >> (istream& s, mat3& m); // input from strm.
+ friend void swap(mat3 &a, mat3 &b); // swap m1 & m2
+
+ // necessary friend declarations
+
+ friend vec3 operator * (const mat3 &a, const vec3 &v); // linear transform
+ friend vec2 operator * (const mat3 &a, const vec2 &v); // linear transform
+};
+
+/****************************************************************
+ * *
+ * 4x4 Matrix *
+ * *
+ ****************************************************************/
+
+class mat4
+{
+protected:
+
+ vec4 v[4];
+
+public:
+
+ // Constructors
+
+ mat4();
+ mat4(const vec4 &v0, const vec4 &v1, const vec4 &v2, const vec4 &v3);
+ mat4(const mat4 &m);
+ mat4(float a00, float a01, float a02, float a03,
+ float a10, float a11, float a12, float a13,
+ float a20, float a21, float a22, float a23,
+ float a30, float a31, float a32, float a33 );
+
+
+ // Assignment operators
+
+ mat4 &operator = (const mat4 &m); // assignment of a mat4
+ mat4 &operator += (const mat4 &m); // incrementation by a mat4
+ mat4 &operator -= (const mat4 &m); // decrementation by a mat4
+ mat4 &operator *= (float d); // multiplication by a constant
+ mat4 &operator /= (float d); // division by a constant
+
+ // special functions
+
+ mat4 transpose() const; // transpose
+ mat4 inverse() const; // inverse
+ mat4 &apply(V_FCT_PTR fct); // apply a func. to each element
+
+ void print(FILE *file, const char *name) const; // print matrix to a file
+
+ vec4 &operator [] (int i); // indexing
+ const vec4 &operator [] (int i) const; // indexing
+
+ void swap_rows(int i, int j); // swap rows i and j
+ void swap_cols(int i, int j); // swap cols i and j
+
+ // friends
+
+ friend mat4 operator - (const mat4 &a); // -m1
+ friend mat4 operator + (const mat4 &a, const mat4 &b); // m1 + m2
+ friend mat4 operator - (const mat4 &a, const mat4 &b); // m1 - m2
+ friend mat4 operator * (const mat4 &a, const mat4 &b); // m1 * m2
+ friend mat4 operator * (const mat4 &a, float d); // m1 * 4.0
+ friend mat4 operator * (float d, const mat4 &a); // 4.0 * m1
+ friend mat4 operator / (const mat4 &a, float d); // m1 / 3.0
+ friend int operator == (const mat4 &a, const mat4 &b); // m1 == m2 ?
+ friend int operator != (const mat4 &a, const mat4 &b); // m1 != m2 ?
+ //friend ostream& operator << (ostream& s, mat4& m); // output to stream
+ //friend istream& operator >> (istream& s, mat4& m); // input from strm.
+ friend void swap(mat4 &a, mat4 &b); // swap m1 & m2
+
+ // necessary friend declarations
+
+ friend vec4 operator * (const mat4 &a, const vec4 &v); // linear transform
+ //friend vec4 operator * (const vec4& v, const mat4& a); // linear transform
+ friend vec3 operator * (const mat4 &a, const vec3 &v); // linear transform
+ friend vec3 operator * (const vec3 &v, const mat4 &a); // linear transform
+};
+
+/****************************************************************
+ * *
+ * 2D functions and 3D functions *
+ * *
+ ****************************************************************/
+
+mat3 identity2D (); // identity 2D
+mat3 translation2D(const vec2 &v); // translation 2D
+mat3 rotation2D (const vec2 &Center, float angleDeg); // rotation 2D
+mat3 scaling2D (const vec2 &scaleVector); // scaling 2D
+mat4 identity3D (); // identity 3D
+mat4 translation3D(const vec3 &v); // translation 3D
+mat4 rotation3D (const vec3 &Axis, float angleDeg); // rotation 3D
+mat4 rotation3Drad(const vec3 &Axis, float angleRad); // rotation 3D
+mat4 scaling3D (const vec3 &scaleVector); // scaling 3D
+mat4 perspective3D(float d); // perspective 3D
+
+vec3 operator * (const vec3 &v, const mat3 &a);
+vec2 operator * (const vec2 &v, const mat3 &a);
+vec3 operator * (const vec3 &v, const mat4 &a);
+vec4 operator * (const vec4 &v, const mat4 &a);
+
+#endif
diff --git a/tests/bullet/Extras/glui/arcball.cpp b/tests/bullet/Extras/glui/arcball.cpp
new file mode 100644
index 00000000..63c983e6
--- /dev/null
+++ b/tests/bullet/Extras/glui/arcball.cpp
@@ -0,0 +1,237 @@
+/**********************************************************************
+
+ arcball.cpp
+
+
+ --------------------------------------------------
+
+ GLUI User Interface Toolkit (LGPL)
+ Copyright (c) 1998 Paul Rademacher
+ Feb 1998, Paul Rademacher (rademach@cs.unc.edu)
+ Oct 2003, Nigel Stewart - GLUI Code Cleaning
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+**********************************************************************/
+
+#include "arcball.h"
+
+#include <cstdio>
+
+
+/**************************************** Arcball::Arcball() ****/
+/* Default (void) constructor for Arcball */
+
+Arcball::Arcball()
+{
+ rot_ptr = &rot;
+ init();
+}
+
+/**************************************** Arcball::Arcball() ****/
+/* Takes as argument a mat4 to use instead of the internal rot */
+
+Arcball::Arcball(mat4 *mtx)
+{
+ rot_ptr = mtx;
+}
+
+
+/**************************************** Arcball::Arcball() ****/
+/* A constructor that accepts the screen center and arcball radius*/
+
+Arcball::Arcball(const vec2 &_center, float _radius)
+{
+ rot_ptr = &rot;
+ init();
+ set_params(_center, _radius);
+}
+
+
+/************************************** Arcball::set_params() ****/
+
+void Arcball::set_params(const vec2 &_center, float _radius)
+{
+ center = _center;
+ radius = _radius;
+}
+
+/*************************************** Arcball::init() **********/
+
+void Arcball::init()
+{
+ center.set( 0.0, 0.0 );
+ radius = 1.0;
+ q_now = quat_identity();
+ *rot_ptr = identity3D();
+ q_increment = quat_identity();
+ rot_increment = identity3D();
+ is_mouse_down = false;
+ is_spinning = false;
+ damp_factor = 0.0;
+ zero_increment = true;
+}
+
+/*********************************** Arcball::mouse_to_sphere() ****/
+
+vec3 Arcball::mouse_to_sphere(const vec2 &p)
+{
+ float mag;
+ vec2 v2 = (p - center) / radius;
+ vec3 v3( v2[0], v2[1], 0.0 );
+
+ mag = v2*v2;
+
+ if ( mag > 1.0 )
+ v3.normalize();
+ else
+ v3[VZ] = (float) sqrt( 1.0 - mag );
+
+ /* Now we add constraints - X takes precedence over Y */
+ if ( constraint_x )
+ {
+ v3 = constrain_vector( v3, vec3( 1.0, 0.0, 0.0 ));
+ }
+ else if ( constraint_y )
+ {
+ v3 = constrain_vector( v3, vec3( 0.0, 1.0, 0.0 ));
+ }
+
+ return v3;
+}
+
+
+/************************************ Arcball::constrain_vector() ****/
+
+vec3 Arcball::constrain_vector(const vec3 &vector, const vec3 &axis)
+{
+ return (vector-(vector*axis)*axis).normalize();
+}
+
+/************************************ Arcball::mouse_down() **********/
+
+void Arcball::mouse_down(int x, int y)
+{
+ down_pt.set( (float)x, (float) y );
+ is_mouse_down = true;
+
+ q_increment = quat_identity();
+ rot_increment = identity3D();
+ zero_increment = true;
+}
+
+
+/************************************ Arcball::mouse_up() **********/
+
+void Arcball::mouse_up()
+{
+ q_now = q_drag * q_now;
+ is_mouse_down = false;
+}
+
+
+/********************************** Arcball::mouse_motion() **********/
+
+void Arcball::mouse_motion(int x, int y, int shift, int ctrl, int alt)
+{
+ /* Set the X constraint if CONTROL key is pressed, Y if ALT key */
+ set_constraints( ctrl != 0, alt != 0 );
+
+ vec2 new_pt( (float)x, (float) y );
+ vec3 v0 = mouse_to_sphere( down_pt );
+ vec3 v1 = mouse_to_sphere( new_pt );
+
+ vec3 cross = v0^v1;
+
+ q_drag.set( cross, v0 * v1 );
+
+ // *rot_ptr = (q_drag * q_now).to_mat4();
+ mat4 temp = q_drag.to_mat4();
+ *rot_ptr = *rot_ptr * temp;
+
+ down_pt = new_pt;
+
+ /* We keep a copy of the current incremental rotation (= q_drag) */
+ q_increment = q_drag;
+ rot_increment = q_increment.to_mat4();
+
+ set_constraints(false, false);
+
+ if ( q_increment.s < .999999 )
+ {
+ is_spinning = true;
+ zero_increment = false;
+ }
+ else
+ {
+ is_spinning = false;
+ zero_increment = true;
+ }
+}
+
+
+/********************************** Arcball::mouse_motion() **********/
+
+void Arcball::mouse_motion(int x, int y)
+{
+ mouse_motion(x, y, 0, 0, 0);
+}
+
+
+/***************************** Arcball::set_constraints() **********/
+
+void Arcball::set_constraints(bool _constraint_x, bool _constraint_y)
+{
+ constraint_x = _constraint_x;
+ constraint_y = _constraint_y;
+}
+
+/***************************** Arcball::idle() *********************/
+
+void Arcball::idle()
+{
+ if (is_mouse_down)
+ {
+ is_spinning = false;
+ zero_increment = true;
+ }
+
+ if (damp_factor < 1.0f)
+ q_increment.scale_angle(1.0f - damp_factor);
+
+ rot_increment = q_increment.to_mat4();
+
+ if (q_increment.s >= .999999f)
+ {
+ is_spinning = false;
+ zero_increment = true;
+ }
+}
+
+
+/************************ Arcball::set_damping() *********************/
+
+void Arcball::set_damping(float d)
+{
+ damp_factor = d;
+}
+
+
+
+
+
diff --git a/tests/bullet/Extras/glui/arcball.h b/tests/bullet/Extras/glui/arcball.h
new file mode 100644
index 00000000..18edd059
--- /dev/null
+++ b/tests/bullet/Extras/glui/arcball.h
@@ -0,0 +1,97 @@
+/**********************************************************************
+
+ arcball.h
+
+ GLUI User Interface Toolkit (LGPL)
+ Copyright (c) 1998 Paul Rademacher
+ Feb 1998, Paul Rademacher (rademach@cs.unc.edu)
+ Oct 2003, Nigel Stewart - GLUI Code Cleaning
+
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ ---------------------------------------------------------------------
+
+ A C++ class that implements the Arcball, as described by Ken
+ Shoemake in Graphics Gems IV.
+ This class takes as input mouse events (mouse down, mouse drag,
+ mouse up), and creates the appropriate quaternions and 4x4 matrices
+ to represent the rotation given by the mouse.
+
+ This class is used as follows:
+ - initialize [either in the constructor or with set_params()], the
+ center position (x,y) of the arcball on the screen, and the radius
+ - on mouse down, call mouse_down(x,y) with the mouse position
+ - as the mouse is dragged, repeatedly call mouse_motion() with the
+ current x and y positions. One can optionally pass in the current
+ state of the SHIFT, ALT, and CONTROL keys (passing zero if keys
+ are not pressed, non-zero otherwise), which constrains
+ the rotation to certain axes (X for CONTROL, Y for ALT).
+ - when the mouse button is released, call mouse_up()
+
+ Axis constraints can also be explicitly set with the
+ set_constraints() function.
+
+ The current rotation is stored in the 4x4 float matrix 'rot'.
+ It is also stored in the quaternion 'q_now'.
+
+**********************************************************************/
+
+#ifndef GLUI_ARCBALL_H
+#define GLUI_ARCBALL_H
+
+#include "glui_internal.h"
+#include "algebra3.h"
+#include "quaternion.h"
+
+class Arcball
+{
+public:
+ Arcball();
+ Arcball(mat4 *mtx);
+ Arcball(const vec2 &center, float radius);
+
+ void set_damping(float d);
+ void idle();
+ void mouse_down(int x, int y);
+ void mouse_up();
+ void mouse_motion(int x, int y, int shift, int ctrl, int alt);
+ void mouse_motion(int x, int y);
+ void set_constraints(bool constrain_x, bool constrain_y);
+ void set_params(const vec2 &center, float radius);
+ void reset_mouse();
+ void init();
+
+ vec3 constrain_vector(const vec3 &vector, const vec3 &axis);
+ vec3 mouse_to_sphere(const vec2 &p);
+
+ //public:
+ int is_mouse_down; /* true for down, false for up */
+ int is_spinning;
+ quat q_now, q_down, q_drag, q_increment;
+ vec2 down_pt;
+ mat4 rot, rot_increment;
+ mat4 *rot_ptr;
+
+ bool constraint_x, constraint_y;
+ vec2 center;
+ float radius, damp_factor;
+ int zero_increment;
+};
+
+#endif
diff --git a/tests/bullet/Extras/glui/glui.cpp b/tests/bullet/Extras/glui/glui.cpp
new file mode 100644
index 00000000..239b12f5
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui.cpp
@@ -0,0 +1,2171 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit (LGPL)
+ ---------------------------
+
+ glui.cpp
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+#include "glui_internal_control.h"
+
+
+/**
+ Note: moving this routine here from glui_add_controls.cpp prevents the linker
+ from touching glui_add_controls.o in non-deprecated programs, which
+ descreases the linked size of small GLUI programs substantially (100K+). (OSL 2006/06)
+*/
+void GLUI_Node::add_child_to_control(GLUI_Node *parent,GLUI_Control *child)
+{
+ GLUI_Control *parent_control;
+
+ /*** Collapsible nodes have to be handled differently, b/c the first and
+ last children are swapped in and out ***/
+ parent_control = ((GLUI_Control*)parent);
+ if ( parent_control->collapsible == true ) {
+ if ( NOT parent_control->is_open ) {
+ /** Swap in the original first and last children **/
+ parent_control->child_head = parent_control->collapsed_node.child_head;
+ parent_control->child_tail = parent_control->collapsed_node.child_tail;
+
+ /*** Link this control ***/
+ child->link_this_to_parent_last( parent_control );
+
+ /** Swap the children back out ***/
+ parent_control->collapsed_node.child_head = parent_control->child_head;
+ parent_control->collapsed_node.child_tail = parent_control->child_tail;
+ parent_control->child_head = NULL;
+ parent_control->child_tail = NULL;
+ }
+ else {
+ child->link_this_to_parent_last( parent_control );
+ }
+ }
+ else {
+ child->link_this_to_parent_last( parent_control );
+ }
+ child->glui = (GLUI*) parent_control->glui;
+ child->update_size();
+ child->enabled = parent_control->enabled;
+ child->glui->refresh();
+
+ /** Now set the 'hidden' var based on the parent **/
+ if ( parent_control->hidden OR
+ (parent_control->collapsible AND NOT parent_control->is_open ) )
+ {
+ child->hidden = true;
+ }
+}
+
+
+/************************************ GLUI_Node::add_control() **************/
+
+int GLUI_Node::add_control( GLUI_Control *child )
+{
+ add_child_to_control(this,child);
+ return true;
+}
+
+/************************************ GLUI_Main::add_control() **************/
+
+int GLUI_Main::add_control( GLUI_Node *parent, GLUI_Control *control )
+{
+ add_child_to_control(parent,control);
+ return true;
+}
+
+
+
+/*** This object must be used to create a GLUI ***/
+
+GLUI_Master_Object GLUI_Master;
+
+/************************************ finish_drawing() ***********
+ Probably a silly routine. Called after all event handling callbacks.
+*/
+
+static void finish_drawing(void)
+{
+ glFinish();
+}
+
+/************************************ GLUI_CB::operator()() ************/
+void GLUI_CB::operator()(GLUI_Control*ctrl) const
+{
+ if (idCB) idCB(ctrl->user_id);
+ if (objCB) objCB(ctrl);
+}
+
+
+/************************************************ GLUI::GLUI() **********/
+
+int GLUI::init( const char *text, long flags, int x, int y, int parent_window )
+{
+ int old_glut_window;
+
+ this->flags = flags;
+
+ window_name = text;
+
+ buffer_mode = buffer_back; ///< New smooth way
+ //buffer_mode = buffer_front; ///< Old flickery way (a bit faster).
+
+ /*** We copy over the current window callthroughs ***/
+ /*** (I think this might actually only be needed for subwindows) ***/
+ /* glut_keyboard_CB = GLUI_Master.glut_keyboard_CB;
+ glut_reshape_CB = GLUI_Master.glut_reshape_CB;
+ glut_special_CB = GLUI_Master.glut_special_CB;
+ glut_mouse_CB = GLUI_Master.glut_mouse_CB;*/
+
+
+ if ( (flags & GLUI_SUBWINDOW) != GLUI_SUBWINDOW ) { /* not a subwindow, creating a new top-level window */
+ old_glut_window = glutGetWindow();
+
+ create_standalone_window( window_name.c_str(), x, y );
+ setup_default_glut_callbacks();
+
+ if ( old_glut_window > 0 )
+ glutSetWindow( old_glut_window );
+
+ top_level_glut_window_id = glut_window_id;
+ }
+ else /* *is* a subwindow */
+ {
+ old_glut_window = glutGetWindow();
+
+ create_subwindow( parent_window, flags );
+ setup_default_glut_callbacks();
+
+ if ( old_glut_window > 0 )
+ glutSetWindow( old_glut_window );
+
+ top_level_glut_window_id = parent_window;
+
+ /*
+ glutReshapeFunc( glui_parent_window_reshape_func );
+ glutSpecialFunc( glui_parent_window_special_func );
+ glutKeyboardFunc( glui_parent_window_keyboard_func );
+ glutMouseFunc( glui_parent_window_mouse_func );
+ */
+
+ }
+
+ return true;
+}
+
+
+/**************************** GLUI_Main::create_standalone_window() ********/
+
+void GLUI_Main::create_standalone_window( const char *name, int x, int y )
+{
+ glutInitWindowSize( 100, 100 );
+ if ( x >= 0 OR y >= 0 )
+ glutInitWindowPosition( x, y );
+ glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
+ glut_window_id = glutCreateWindow( name );
+}
+
+
+/******************************** GLUI_Main::create_subwindow() **********/
+
+void GLUI_Main::create_subwindow( int parent_window, int window_alignment )
+{
+ glut_window_id = glutCreateSubWindow(parent_window, 0,0, 100, 100);
+ this->parent_window = parent_window;
+}
+
+
+/**************************** GLUI_Main::setup_default_glut_callbacks() *****/
+
+void GLUI_Main::setup_default_glut_callbacks( void )
+{
+ glutDisplayFunc( glui_display_func );
+ glutReshapeFunc( glui_reshape_func );
+ glutKeyboardFunc( glui_keyboard_func );
+ glutSpecialFunc( glui_special_func );
+ glutMouseFunc( glui_mouse_func );
+ glutMotionFunc( glui_motion_func );
+ glutPassiveMotionFunc( glui_passive_motion_func );
+ glutEntryFunc( glui_entry_func );
+ glutVisibilityFunc( glui_visibility_func );
+ /* glutIdleFunc( glui_idle_func ); // FIXME! 100% CPU usage! */
+}
+
+
+/********************************************** glui_display_func() ********/
+
+void glui_display_func(void)
+{
+ GLUI *glui;
+
+ /* printf( "display func\n" ); */
+
+ glui = GLUI_Master.find_glui_by_window_id( glutGetWindow() );
+
+ if ( glui ) {
+ glui->display();
+ /*
+ Do not do anything after the above line, b/c the GLUI
+ window might have just closed itself
+ */
+ }
+}
+
+
+/********************************************** glui_reshape_func() ********/
+
+void glui_reshape_func(int w,int h )
+{
+ GLUI *glui;
+ GLUI_Glut_Window *glut_window;
+ int current_window;
+
+ /*printf( "glui_reshape_func(): %d w/h: %d/%d\n", glutGetWindow(), w, h ); */
+
+ current_window = glutGetWindow();
+
+ /*** First check if this is main glut window ***/
+ glut_window = GLUI_Master.find_glut_window( current_window );
+ if ( glut_window ) {
+ if (glut_window->glut_reshape_CB) glut_window->glut_reshape_CB(w,h);
+
+ /*** Now send reshape events to all subwindows ***/
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while(glui) {
+ if ( TEST_AND( glui->flags, GLUI_SUBWINDOW) AND
+ glui->parent_window == current_window ) {
+ glutSetWindow( glui->get_glut_window_id());
+ glui->reshape(w,h);
+ /* glui->check_subwindow_position(); */
+ }
+ glui = (GLUI*) glui->next();
+ }
+ }
+ else {
+ /*** A standalone GLUI window ***/
+
+ glui = GLUI_Master.find_glui_by_window_id( current_window );
+
+ if ( glui ) {
+ glui->reshape(w,h);
+ }
+ }
+}
+
+/********************************************** glui_keyboard_func() ********/
+
+void glui_keyboard_func(unsigned char key, int x, int y)
+{
+ GLUI *glui;
+ int current_window;
+ GLUI_Glut_Window *glut_window;
+
+ current_window = glutGetWindow();
+ glut_window = GLUI_Master.find_glut_window( current_window );
+
+ /*printf( "key: %d\n", current_window ); */
+
+ if ( glut_window ) { /** Was event in a GLUT window? **/
+ if ( GLUI_Master.active_control_glui AND GLUI_Master.active_control ) {
+ glutSetWindow( GLUI_Master.active_control_glui->get_glut_window_id() );
+
+ GLUI_Master.active_control_glui->keyboard(key,x,y);
+ finish_drawing();
+
+ glutSetWindow( current_window );
+ }
+ else {
+ if (glut_window->glut_keyboard_CB)
+ glut_window->glut_keyboard_CB( key, x, y );
+ }
+ }
+ else { /*** Nope, event was in a standalone GLUI window **/
+ glui = GLUI_Master.find_glui_by_window_id( glutGetWindow() );
+
+ if ( glui ) {
+ glui->keyboard(key,x,y);
+ finish_drawing();
+ }
+ }
+}
+
+
+
+
+void glui_special_up_func(int key, int x, int y)
+{
+ GLUI *glui;
+ int current_window;
+ GLUI_Glut_Window *glut_window;
+
+ current_window = glutGetWindow();
+ glut_window = GLUI_Master.find_glut_window( current_window );
+
+ if (glut_window) /** Was event in a GLUT window? **/
+ {
+ if ( GLUI_Master.active_control_glui AND GLUI_Master.active_control )
+ {
+ glutSetWindow( GLUI_Master.active_control_glui->get_glut_window_id() );
+
+ GLUI_Master.active_control_glui->special_up(key,x,y);
+ finish_drawing();
+
+ glutSetWindow( current_window );
+ }
+ else
+ {
+ if (glut_window->glut_special_up_CB)
+ glut_window->glut_special_up_CB( key, x, y );
+ }
+ }
+ else /*** Nope, event was in a standalone GLUI window **/
+ {
+ glui = GLUI_Master.find_glui_by_window_id(glutGetWindow());
+
+ if ( glui )
+ {
+ glui->special_up(key,x,y);
+ finish_drawing();
+ }
+ }
+}
+
+
+
+/************************************************ glui_special_func() ********/
+
+void glui_special_func(int key, int x, int y)
+{
+ GLUI *glui;
+ int current_window;
+ GLUI_Glut_Window *glut_window;
+
+ current_window = glutGetWindow();
+ glut_window = GLUI_Master.find_glut_window( current_window );
+
+ if (glut_window) /** Was event in a GLUT window? **/
+ {
+ if ( GLUI_Master.active_control_glui AND GLUI_Master.active_control )
+ {
+ glutSetWindow( GLUI_Master.active_control_glui->get_glut_window_id() );
+
+ GLUI_Master.active_control_glui->special(key,x,y);
+ finish_drawing();
+
+ glutSetWindow( current_window );
+ }
+ else
+ {
+ if (glut_window->glut_special_CB)
+ glut_window->glut_special_CB( key, x, y );
+ }
+ }
+ else /*** Nope, event was in a standalone GLUI window **/
+ {
+ glui = GLUI_Master.find_glui_by_window_id(glutGetWindow());
+
+ if ( glui )
+ {
+ glui->special(key,x,y);
+ finish_drawing();
+ }
+ }
+}
+
+/********************************************** glui_mouse_func() ********/
+
+void glui_mouse_func(int button, int state, int x, int y)
+{
+ GLUI *glui;
+ int current_window;
+ GLUI_Glut_Window *glut_window;
+
+ current_window = glutGetWindow();
+ glut_window = GLUI_Master.find_glut_window( current_window );
+
+ if ( glut_window ) { /** Was event in a GLUT window? **/
+ if ( GLUI_Master.active_control_glui != NULL )
+ GLUI_Master.active_control_glui->deactivate_current_control();
+
+ if (glut_window->glut_mouse_CB)
+ glut_window->glut_mouse_CB( button, state, x, y );
+ finish_drawing();
+ }
+ else { /** Nope - event was in a GLUI standalone window **/
+ glui = GLUI_Master.find_glui_by_window_id( glutGetWindow() );
+ if ( glui ) {
+ glui->passive_motion( 0,0 );
+ glui->mouse( button, state, x, y );
+ finish_drawing();
+ }
+ }
+}
+
+
+/********************************************** glui_motion_func() ********/
+
+void glui_motion_func(int x, int y)
+{
+ GLUI *glui;
+
+ glui = GLUI_Master.find_glui_by_window_id( glutGetWindow() );
+
+ if ( glui ) {
+ glui->motion(x,y);
+ finish_drawing();
+ }
+
+}
+
+
+/**************************************** glui_passive_motion_func() ********/
+
+void glui_passive_motion_func(int x, int y)
+{
+ GLUI *glui;
+
+ glui = GLUI_Master.find_glui_by_window_id( glutGetWindow() );
+
+ if ( glui ) {
+ glui->passive_motion(x,y);
+ finish_drawing();
+ }
+}
+
+
+/********************************************** glui_entry_func() ********/
+
+void glui_entry_func(int state)
+{
+ GLUI *glui;
+
+ glui = GLUI_Master.find_glui_by_window_id( glutGetWindow() );
+
+ if ( glui ) {
+ glui->entry(state);
+ }
+}
+
+
+/******************************************** glui_visibility_func() ********/
+
+void glui_visibility_func(int state)
+{
+ GLUI *glui;
+
+ /* printf( "IN GLUI VISIBILITY()\n" ); */
+ /* fflush( stdout ); */
+
+ glui = GLUI_Master.find_glui_by_window_id( glutGetWindow() );
+
+ if ( glui ) {
+ glui->visibility(state);
+ }
+}
+
+
+/********************************************** glui_idle_func() ********/
+/* Send idle event to each glui, then to the main window */
+
+void glui_idle_func(void)
+{
+ GLUI *glui;
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+ glui->idle();
+ finish_drawing();
+
+ glui = (GLUI*) glui->next();
+ }
+
+ if ( GLUI_Master.glut_idle_CB ) {
+ /*** We set the current glut window before calling the user's
+ idle function, even though glut explicitly says the window id is
+ undefined in an idle callback. ***/
+
+ /** Check what the current window is first ***/
+
+ /*** Arbitrarily set the window id to the main gfx window of the
+ first glui window ***/
+ /* int current_window, new_window; */
+ /* current_window = glutGetWindow(); */
+ /* if (GLUI_Master.gluis.first_child() != NULL ) { */
+ /* new_window = ((GLUI_Main*)GLUI_Master.gluis.first_child())-> */
+ /* main_gfx_window_id; */
+ /* if ( new_window > 0 AND new_window != old_window ) { */
+ /* --- Window is changed only if its not already the current window ---*/
+ /* glutSetWindow( new_window ); */
+ /* } */
+ /*} */
+
+ GLUI_Master.glut_idle_CB();
+ }
+}
+
+/*********************************** GLUI_Master_Object::GLUI_Master_Object() ******/
+
+GLUI_Master_Object::GLUI_Master_Object()
+: glui_id_counter(1),
+ glut_idle_CB(NULL)
+{
+}
+
+GLUI_Master_Object::~GLUI_Master_Object()
+{
+}
+
+/*********************************** GLUI_Master_Object::create_glui() ******/
+
+GLUI *GLUI_Master_Object::create_glui( const char *name, long flags,int x,int y )
+{
+ GLUI *new_glui = new GLUI;
+ new_glui->init( name, flags, x, y, -1 );
+ new_glui->link_this_to_parent_last( &this->gluis );
+ return new_glui;
+}
+
+
+/************************** GLUI_Master_Object::create_glui_subwindow() ******/
+
+GLUI *GLUI_Master_Object::create_glui_subwindow( int parent_window,
+ long flags )
+{
+ GLUI *new_glui = new GLUI;
+ GLUI_String new_name;
+ glui_format_str( new_name, "subwin_%p", this );
+
+ new_glui->init( new_name.c_str(), flags | GLUI_SUBWINDOW, 0,0,
+ parent_window );
+ new_glui->main_panel->set_int_val( GLUI_PANEL_EMBOSSED );
+ new_glui->link_this_to_parent_last( &this->gluis );
+ return new_glui;
+}
+
+
+/********************** GLUI_Master_Object::find_glui_by_window_id() ********/
+
+GLUI *GLUI_Master_Object::find_glui_by_window_id( int window_id )
+{
+ GLUI_Node *node;
+
+ node = gluis.first_child();
+ while( node ) {
+ if ( ((GLUI*)node)->get_glut_window_id() == window_id )
+ return (GLUI*) node;
+
+ node = node->next();
+ }
+ return NULL;
+}
+
+
+/******************************************** GLUI_Main::display() **********/
+
+void GLUI_Main::display( void )
+{
+ int win_w, win_h;
+
+ /* SUBTLE: on freeGLUT, the correct window is always already set.
+ But older versions of GLUT need this call, or else subwindows
+ don't update properly when resizing or damage-painting.
+ */
+ glutSetWindow( glut_window_id );
+
+ /* Set up OpenGL state for widget drawing */
+ glDisable( GL_DEPTH_TEST );
+ glCullFace( GL_BACK );
+ glDisable( GL_CULL_FACE );
+ glDisable( GL_LIGHTING );
+ set_current_draw_buffer();
+
+ /**** This function is used as a special place to do 'safe' processing,
+ e.g., handling window close requests.
+ That is, we can't close the window directly in the callback, so
+ we set a flag, post a redisplay message (which eventually calls
+ this function), then close the window safely in here. ****/
+ if ( closing ) {
+ close_internal();
+ return;
+ }
+
+ /* if ( TEST_AND( this->flags, GLUI_SUBWINDOW ))
+ check_subwindow_position();
+ */
+
+ win_w = glutGet( GLUT_WINDOW_WIDTH );
+ win_h = glutGet( GLUT_WINDOW_HEIGHT );
+
+ /*** Check here if the window needs resizing ***/
+ if ( win_w != main_panel->w OR win_h != main_panel->h ) {
+ glutReshapeWindow( main_panel->w, main_panel->h );
+ return;
+ }
+
+ /******* Draw GLUI window ******/
+ glClearColor( (float) bkgd_color.r / 255.0,
+ (float) bkgd_color.g / 255.0,
+ (float) bkgd_color.b / 255.0,
+ 1.0 );
+ glClear( GL_COLOR_BUFFER_BIT ); /* | GL_DEPTH_BUFFER_BIT ); */
+
+ set_ortho_projection();
+
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+
+ /*** Rotate image so y increases downward.
+ In normal OpenGL, y increases upward. ***/
+ glTranslatef( (float) win_w/2.0, (float) win_h/2.0, 0.0 );
+ glRotatef( 180.0, 0.0, 1.0, 0.0 );
+ glRotatef( 180.0, 0.0, 0.0, 1.0 );
+ glTranslatef( (float) -win_w/2.0, (float) -win_h/2.0, 0.0 );
+
+ // Recursively draw the main panel
+ // main_panel->draw_bkgd_box( 0, 0, win_w, win_h );
+ main_panel->draw_recursive( 0, 0 );
+
+ switch (buffer_mode) {
+ case buffer_front: /* Make sure drawing gets to screen */
+ glFlush();
+ break;
+ case buffer_back: /* Bring back buffer to front */
+ glutSwapBuffers();
+ break;
+ }
+}
+
+
+
+
+/*************************************** _glutBitmapWidthString() **********/
+
+int _glutBitmapWidthString( void *font, const char *s )
+{
+ const char *p = s;
+ int width = 0;
+
+ while( *p != '\0' ) {
+ width += glutBitmapWidth( font, *p );
+ p++;
+ }
+
+ return width;
+}
+
+/************************************ _glutBitmapString *********************/
+/* Displays the contents of a string using GLUT's bitmap character function */
+/* Does not handle newlines */
+
+void _glutBitmapString( void *font, const char *s )
+{
+ const char *p = s;
+
+ while( *p != '\0' ) {
+ glutBitmapCharacter( font, *p );
+ p++;
+ }
+}
+
+
+
+/****************************** GLUI_Main::reshape() **************/
+
+void GLUI_Main::reshape( int reshape_w, int reshape_h )
+{
+ int new_w, new_h;
+
+ pack_controls();
+
+ new_w = main_panel->w;/* + 1; */
+ new_h = main_panel->h;/* + 1; */
+
+ if ( reshape_w != new_w OR reshape_h != new_h ) {
+ this->w = new_w;
+ this->h = new_h;
+
+ glutReshapeWindow( new_w, new_h );
+ }
+ else {
+ }
+
+ if ( TEST_AND( this->flags, GLUI_SUBWINDOW ) ) {
+ check_subwindow_position();
+
+ /***** if ( TEST_AND(this->flags,GLUI_SUBWINDOW_LEFT )) {
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_LEFT )) {
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_LEFT )) {
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_RIGHT )) {
+ }
+ ****/
+ }
+
+ glViewport( 0, 0, new_w, new_h );
+
+ /* printf( "%d: %d\n", glutGetWindow(), this->flags ); */
+
+ glutPostRedisplay();
+}
+
+
+/****************************** GLUI_Main::keyboard() **************/
+
+void GLUI_Main::keyboard(unsigned char key, int x, int y)
+{
+ GLUI_Control *new_control;
+
+ curr_modifiers = glutGetModifiers();
+
+ /*** If it's a tab or shift tab, we don't pass it on to the controls.
+ Instead, we use it to cycle through active controls ***/
+ if ( key == '\t' AND !mouse_button_down AND
+ (!active_control || !active_control->wants_tabs())) {
+ if ( curr_modifiers & GLUT_ACTIVE_SHIFT ) {
+ new_control = find_prev_control( active_control );
+ }
+ else {
+ new_control = find_next_control( active_control );
+ }
+
+ /* if ( new_control )
+ printf( "new_control: %s\n", new_control->name );
+ */
+
+ deactivate_current_control();
+ activate_control( new_control, GLUI_ACTIVATE_TAB );
+ }
+ else if ( key == ' ' AND active_control
+ AND active_control->spacebar_mouse_click ) {
+ /*** If the user presses the spacebar, and a non-edittext control
+ is active, we send it a mouse down event followed by a mouse up
+ event (simulated mouse-click) ***/
+
+ active_control->mouse_down_handler( 0, 0 );
+ active_control->mouse_up_handler( 0, 0, true );
+ } else {
+ /*** Pass the keystroke onto the active control, if any ***/
+ if ( active_control != NULL )
+ active_control->key_handler( key, curr_modifiers );
+ }
+}
+
+
+
+void GLUI_Main::special_up(int key, int x, int y)
+{
+ curr_modifiers = glutGetModifiers();
+
+ /*** Pass the keystroke onto the active control, if any ***/
+ if ( active_control != NULL )
+ active_control->special_up_handler( key, glutGetModifiers() );
+}
+
+
+/****************************** GLUI_Main::special() **************/
+
+void GLUI_Main::special(int key, int x, int y)
+{
+ curr_modifiers = glutGetModifiers();
+
+ /*** Pass the keystroke onto the active control, if any ***/
+ if ( active_control != NULL )
+ active_control->special_handler( key, glutGetModifiers() );
+}
+
+
+
+/****************************** GLUI_Main::mouse() **************/
+
+void GLUI_Main::mouse(int button, int state, int x, int y)
+{
+ int callthrough;
+ GLUI_Control *control;
+
+ /* printf( "MOUSE: %d %d\n", button, state ); */
+
+ callthrough = true;
+
+ curr_modifiers = glutGetModifiers();
+
+ if ( button == GLUT_LEFT ) {
+ control = find_control( x, y );
+
+ /*if ( control ) printf( "control: %s\n", control->name.c_str() ); */
+
+ if ( mouse_button_down AND active_control != NULL AND
+ state == GLUT_UP )
+ {
+ /** We just released the mouse, which was depressed at some control **/
+
+ callthrough = active_control->
+ mouse_up_handler( x, y, control==active_control);
+ glutSetCursor( GLUT_CURSOR_LEFT_ARROW );
+
+ if ( active_control AND
+ active_control->active_type == GLUI_CONTROL_ACTIVE_MOUSEDOWN AND 0)
+ {
+ /*** This is a control that needs to be deactivated when the
+ mouse button is released ****/
+ deactivate_current_control();
+ }
+ }
+ else {
+ if ( control ) {
+ if ( NOT mouse_button_down AND state == GLUT_DOWN ) {
+ /*** We just pressed the mouse down at some control ***/
+
+ if ( active_control != control ) {
+ if ( active_control != NULL ) {
+ /** There is an active control still - deactivate it ***/
+ deactivate_current_control();
+ }
+ }
+
+ if ( control->enabled ) {
+ activate_control( control, GLUI_ACTIVATE_MOUSE );
+ callthrough = control->mouse_down_handler( x, y );
+ }
+ }
+ }
+ }
+
+ if ( state == GLUT_DOWN )
+ mouse_button_down = true;
+ else if ( state == GLUT_UP )
+ mouse_button_down = false;
+ }
+
+ /**
+ NO CALLTHROUGH NEEDED FOR MOUSE EVENTS
+ if ( callthrough AND glut_mouse_CB )
+ glut_mouse_CB( button, state, x, y );
+ **/
+
+ callthrough=callthrough; /* To get rid of compiler warnings */
+}
+
+
+/****************************** GLUI_Main::motion() **************/
+
+void GLUI_Main::motion(int x, int y)
+{
+ int callthrough;
+ GLUI_Control *control;
+
+ /* printf( "MOTION: %d %d\n", x, y ); */
+
+ callthrough = true;
+
+ control = find_control(x,y);
+
+ if ( mouse_button_down AND active_control != NULL ) {
+ callthrough =
+ active_control->mouse_held_down_handler(x,y,control==active_control);
+ }
+
+ /**
+ NO CALLTHROUGH NEEDED FOR MOUSE EVENTS
+
+ if ( callthrough AND glut_motion_CB )
+ glut_motion_CB(x,y);
+ **/
+
+ callthrough=callthrough; /* To get rid of compiler warnings */
+}
+
+
+/*********************** GLUI_Main::passive_motion() **************/
+
+void GLUI_Main::passive_motion(int x, int y)
+{
+ GLUI_Control *control;
+
+ control = find_control( x, y );
+
+ /* printf( "%p %p\n", control, mouse_over_control ); */
+
+ if ( control != mouse_over_control ) {
+ if ( mouse_over_control ) {
+ mouse_over_control->mouse_over( false, x, y );
+ }
+
+ if ( control ) {
+ control->mouse_over( true, x, y );
+ mouse_over_control = control;
+ }
+ }
+
+ /*
+ if ( curr_cursor != GLUT_CURSOR_INHERIT ) {
+ curr_cursor = GLUT_CURSOR_INHERIT;
+ glutSetCursor( GLUT_CURSOR_INHERIT );
+ }*/
+
+}
+
+
+/****************************** GLUI_Main::entry() **************/
+
+void GLUI_Main::entry(int state)
+{
+ /*if ( NOT active_control OR ( active_control AND ( active_control->type == GLUI_CONTROL_EDITTEXT
+ OR active_control->type == GLUI_CONTROL_SPINNER) ) )*/
+ glutSetCursor( GLUT_CURSOR_LEFT_ARROW );
+}
+
+
+/****************************** GLUI_Main::visibility() **************/
+
+void GLUI_Main::visibility(int state)
+{
+}
+
+
+/****************************** GLUI_Main::idle() **************/
+
+void GLUI_Main::idle(void)
+{
+ /*** Pass the idle event onto the active control, if any ***/
+
+ /* printf( "IDLE \t" ); */
+
+ if ( active_control != NULL ) {
+ /* First we check if the control actually needs the idle right now.
+ Otherwise, let's avoid wasting cycles and OpenGL context switching */
+
+ if ( active_control->needs_idle() ) {
+ /*** Set the current glut window to the glui window */
+ /*** But don't change the window if we're already at that window ***/
+
+ if ( glut_window_id > 0 AND glutGetWindow() != glut_window_id ) {
+ glutSetWindow( glut_window_id );
+ }
+
+ active_control->idle();
+ }
+ }
+}
+
+int GLUI_Main::needs_idle( void )
+{
+ return active_control != NULL && active_control->needs_idle();
+}
+
+
+/******************************************* GLUI_Main::find_control() ******/
+
+GLUI_Control *GLUI_Main::find_control( int x, int y )
+{
+ GLUI_Control *node, *last_container;
+
+ last_container = NULL;
+
+ node = main_panel;
+ while( node != NULL ) {
+ if ( !node->dynamicCastGLUI_Column() AND
+ PT_IN_BOX( x, y,
+ node->x_abs, node->x_abs + node->w,
+ node->y_abs, node->y_abs + node->h )
+ )
+ {
+ /*** Point is inside current node ***/
+
+ if ( node->first_child() == NULL ) {
+ /*** SPECIAL CASE: for edittext boxes, we make sure click is
+ in box, and not on name string. This should be generalized
+ for all controls later... ***/
+ if ( node->dynamicCastGLUI_EditText() ) {
+ if ( x < node->x_abs + ((GLUI_EditText*)node)->text_x_offset )
+ return (GLUI_Control*) node->parent();
+ }
+
+ return node; /* point is inside this node, and node has no children,
+ so return this node as the selected node */
+ }
+ else {
+ /*** This is a container class ***/
+ last_container = node;
+ node = (GLUI_Control*) node->first_child(); /* Descend into child */
+ }
+
+ }
+ else {
+ node = (GLUI_Control*) node->next();
+ }
+ }
+
+ /** No leaf-level nodes found to accept the mouse click, so
+ return the last container control found which DOES accept the click **/
+
+ if ( last_container ) {
+ /* printf( "ctrl: '%s'\n", last_container->name ); */
+
+ return last_container;
+ }
+ else {
+ return NULL;
+ }
+}
+
+
+/************************************* GLUI_Main::pack_controls() ***********/
+
+void GLUI_Main::pack_controls( void )
+{
+ main_panel->pack(0,0);
+
+ /**** Now align controls within their bounds ****/
+ align_controls( main_panel );
+
+ /*** If this is a subwindow, expand panel to fit parent window ***/
+ if ( TEST_AND( this->flags, GLUI_SUBWINDOW ) ) {
+ int parent_h, parent_w;
+ int orig_window;
+
+ orig_window = glutGetWindow();
+ glutSetWindow( this->top_level_glut_window_id );
+ parent_h = glutGet( GLUT_WINDOW_HEIGHT );
+ parent_w = glutGet( GLUT_WINDOW_WIDTH );
+
+ glutSetWindow( orig_window );
+
+ /* printf( "%d %d\n", parent_h, parent_w ); */
+
+ if ( 1 ) {
+ if ( TEST_AND(this->flags,GLUI_SUBWINDOW_TOP )) {
+ main_panel->w = MAX( main_panel->w, parent_w );
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_LEFT )) {
+ main_panel->h = MAX( main_panel->h, parent_h );
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_BOTTOM )) {
+ main_panel->w = MAX( main_panel->w, parent_w );
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_RIGHT )) {
+ main_panel->h = MAX( main_panel->h, parent_h );
+ }
+ }
+ }
+
+ this->w = main_panel->w;
+ this->h = main_panel->h;
+}
+
+
+/************************************ GLUI_Main::align_controls() **********/
+
+void GLUI_Main::align_controls( GLUI_Control *control )
+{
+ GLUI_Control *child;
+
+ control->align();
+
+ child = (GLUI_Control*) control->first_child();
+
+ while( child != NULL ) {
+ align_controls( child );
+
+ child = (GLUI_Control*)child->next();
+ }
+}
+
+
+
+/*********************************** GLUI::set_main_gfx_window() ************/
+
+void GLUI::set_main_gfx_window( int window_id )
+{
+ main_gfx_window_id = window_id;
+}
+
+
+/********************************* GLUI_Main::post_update_main_gfx() ********/
+
+void GLUI_Main::post_update_main_gfx( void )
+{
+ int old_window;
+
+ if ( main_gfx_window_id > 0 ) {
+ old_window = glutGetWindow();
+ glutSetWindow( main_gfx_window_id );
+ glutPostRedisplay();
+ if( old_window > 0 )
+ glutSetWindow( old_window );
+ }
+}
+
+/********************************* GLUI_Main::should_redraw_now() ********/
+/** Return true if this control should redraw itself immediately (front buffer);
+ Or queue up a redraw and return false if it shouldn't (back buffer).
+
+ Called from GLUI_Control::redraw.
+*/
+bool GLUI_Main::should_redraw_now(GLUI_Control *ctl)
+{
+ switch (buffer_mode) {
+ case buffer_front: return true; /* always draw in front-buffer mode */
+ case buffer_back: {
+ int orig = ctl->set_to_glut_window();
+ glutPostRedisplay(); /* redraw soon */
+ ctl->restore_window(orig);
+ return false; /* don't draw now. */
+ }
+ }
+ return false; /* never executed */
+}
+
+/********************************* GLUI_Main::set_current_draw_buffer() ********/
+
+int GLUI_Main::set_current_draw_buffer( void )
+{
+ /* Save old buffer */
+ GLint state;
+ glGetIntegerv( GL_DRAW_BUFFER, &state );
+ /* Switch to new buffer */
+ switch (buffer_mode) {
+ case buffer_front: glDrawBuffer(GL_FRONT); break;
+ case buffer_back: glDrawBuffer(GL_BACK); break; /* might not be needed... */
+ }
+ return (int)state;
+}
+
+
+/********************************* GLUI_Main::restore_draw_buffer() **********/
+
+void GLUI_Main::restore_draw_buffer( int buffer_state )
+{
+ glDrawBuffer( buffer_state );
+}
+
+
+/******************************************** GLUI_Main::GLUI_Main() ********/
+
+GLUI_Main::GLUI_Main( void )
+{
+ mouse_button_down = false;
+ w = 0;
+ h = 0;
+ active_control = NULL;
+ mouse_over_control = NULL;
+ main_gfx_window_id = -1;
+ glut_window_id = -1;
+ curr_modifiers = 0;
+ closing = false;
+ parent_window = -1;
+ glui_id = GLUI_Master.glui_id_counter;
+ GLUI_Master.glui_id_counter++;
+
+ font = GLUT_BITMAP_HELVETICA_12;
+ curr_cursor = GLUT_CURSOR_LEFT_ARROW;
+
+ int r=200, g=200, b=200;
+ bkgd_color.set( r,g,b );
+ bkgd_color_f[0] = r / 255.0;
+ bkgd_color_f[1] = g / 255.0;
+ bkgd_color_f[2] = b / 255.0;
+
+ /*** Create the main panel ***/
+ main_panel = new GLUI_Panel;
+ main_panel->set_int_val( GLUI_PANEL_NONE );
+ main_panel->glui = (GLUI*) this;
+ main_panel->name = "\0";
+}
+
+/************************************ GLUI_Main::draw_raised_box() **********/
+
+void GLUI_Main::draw_raised_box( int x, int y, int w, int h )
+{
+ w = w+x;
+ h = h+y;
+
+ glColor3ub( bkgd_color.r, bkgd_color.g, bkgd_color.b );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( x+1, y+1 ); glVertex2i( w-1, y+1 );
+ glVertex2i( w-1, h-1 ); glVertex2i( x+1, h-1 );
+ glEnd();
+
+ glColor3d( 1.0, 1.0, 1.0 );
+ glBegin( GL_LINE_STRIP );
+ glVertex2i( x, h ); glVertex2i( x, y ); glVertex2i( w, y );
+ glEnd();
+
+ glColor3d( 0.0, 0.0, 0.0 );
+ glBegin( GL_LINE_STRIP );
+ glVertex2i( w, y ); glVertex2i( w, h ); glVertex2i( x, h );
+ glEnd();
+
+ glColor3d( .5, .5, .5 );
+ glBegin( GL_LINE_STRIP );
+ glVertex2i( w-1, y+1 ); glVertex2i( w-1, h-1 ); glVertex2i( x+1, h-1 );
+ glEnd();
+}
+
+
+/************************************ GLUI_Main::draw_lowered_box() **********/
+/* Not quite perfect... **/
+
+void GLUI_Main::draw_lowered_box( int x, int y, int w, int h )
+{
+ w = w+x;
+ h = h+y;
+
+ glColor3ub( bkgd_color.r, bkgd_color.g, bkgd_color.b );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( x+1, y+1 ); glVertex2i( w-1, y+1 );
+ glVertex2i( w-1, h-1 ); glVertex2i( x+1, h-1 );
+ glEnd();
+
+ glColor3d( 0.0, 0.0, 0.0 );
+ glBegin( GL_LINE_STRIP );
+ glVertex2i( x, h ); glVertex2i( x, y ); glVertex2i( w, y );
+ glEnd();
+
+ glColor3d( 1.0, 1.0, 1.0 );
+ glBegin( GL_LINE_STRIP );
+ glVertex2i( w, y ); glVertex2i( w, h ); glVertex2i( x, h );
+ glEnd();
+
+ glColor3d( .5, .5, .5 );
+ glBegin( GL_LINE_STRIP );
+ glVertex2i( w-1, y+1 ); glVertex2i( w-1, h-1 ); glVertex2i( x+1, h-1 );
+ glEnd();
+}
+
+
+/************************************* GLUI_Main::activate_control() *********/
+
+void GLUI_Main::activate_control( GLUI_Control *control, int how )
+{
+ /** Are we not activating a control in the same window as the
+ previous active control? */
+ if ( GLUI_Master.active_control_glui AND
+ this != (GLUI_Main*) GLUI_Master.active_control_glui ) {
+ GLUI_Master.active_control_glui->deactivate_current_control();
+ }
+
+ /******* Now activate it *****/
+ if ( control != NULL AND control->can_activate AND control->enabled ) {
+ active_control = control;
+
+ control->activate(how);
+
+ /*if ( NOT active_control->is_container OR */
+ /* active_control->type == GLUI_CONTROL_ROLLOUT) { */
+ active_control->redraw();
+ /*} */
+ }
+ else {
+ active_control = NULL;
+ }
+
+ /* printf( "activate: %d\n", glutGetWindow() ); */
+ GLUI_Master.active_control = active_control;
+ GLUI_Master.active_control_glui = (GLUI*) this;
+}
+
+
+/************************* GLUI_Main::deactivate_current_control() **********/
+
+void GLUI_Main::deactivate_current_control( void )
+{
+ int orig;
+
+ if ( active_control != NULL ) {
+ orig = active_control->set_to_glut_window();
+
+ active_control->deactivate();
+
+ /** If this isn't a container control, then redraw it in its
+ deactivated state. Container controls, such as panels, look
+ the same activated or not **/
+
+ /*if ( NOT active_control->is_container OR */
+ /* active_control->type == GLUI_CONTROL_ROLLOUT ) { */
+ active_control->redraw();
+ /*} */
+
+ active_control->restore_window( orig );
+
+ active_control = NULL;
+ }
+
+ /* printf( "deactivate: %d\n", glutGetWindow() ); */
+ GLUI_Master.active_control = NULL;
+ GLUI_Master.active_control_glui = NULL;
+}
+
+
+/****************************** GLUI_Main::find_next_control() **************/
+
+GLUI_Control *GLUI_Main::find_next_control_( GLUI_Control *control )
+{
+ /*** THIS IS NOT find_next_control()! This is an unused older
+ version (look at the underscore at the end) ***/
+
+ if ( control == NULL )
+ return find_next_control_rec( main_panel );
+ else
+ return find_next_control_rec( control );
+}
+
+/****************************** GLUI_Main::find_next_control() **************/
+
+GLUI_Control *GLUI_Main::find_next_control_rec( GLUI_Control *control )
+{
+ GLUI_Control *child = NULL, *rec_control, *sibling;
+
+ /*** Recursively investigate children ***/
+ child = (GLUI_Control*) control->first_child();
+ if ( child ) {
+ /*** If we can activate the first child, then do so ***/
+ if ( child->can_activate AND child->enabled )
+ return child;
+ else /*** Recurse into first child ***/
+ rec_control = find_next_control_rec( child );
+
+ if ( rec_control )
+ return rec_control;
+ }
+
+ /*** At this point, either we don't have children, or the child cannot
+ be activated. So let's try the next sibling ***/
+
+ sibling = (GLUI_Control*) control->next();
+ if ( sibling ) {
+ if ( sibling->can_activate AND sibling->enabled )
+ return sibling;
+ else /*** Recurse into sibling ***/
+ rec_control = find_next_control_rec( sibling );
+
+ if ( rec_control )
+ return rec_control;
+ }
+
+ return NULL;
+}
+
+
+/****************************** GLUI_Main::find_next_control() **************/
+
+GLUI_Control *GLUI_Main::find_next_control( GLUI_Control *control )
+{
+ GLUI_Control *tmp_control = NULL;
+ int back_up;
+
+ if ( control == NULL )
+ control = main_panel;
+
+ while( control != NULL ) {
+ /** see if this control has a child **/
+ tmp_control = (GLUI_Control*) control->first_child();
+
+ if ( tmp_control != NULL ) {
+ if ( tmp_control->can_activate AND tmp_control->enabled )
+ return tmp_control;
+
+ control = tmp_control; /* Descend into child */
+ continue;
+ }
+
+ /*** At this point, control has no children ***/
+
+ /** see if this control has a next sibling **/
+ tmp_control = (GLUI_Control*) control->next();
+
+ if ( tmp_control != NULL ) {
+ if ( tmp_control->can_activate AND tmp_control->enabled )
+ return tmp_control;
+
+ control = tmp_control;
+ continue;
+ }
+
+ /** back up until we find a sibling of an ancestor **/
+ back_up = true;
+ while ( control->parent() AND back_up ) {
+ control = (GLUI_Control*) control->parent();
+
+ if ( control->next() ) {
+ control = (GLUI_Control*) control->next();
+ if ( control->can_activate AND control->enabled )
+ return control;
+ else
+ back_up = false;
+
+ /*** if ( control->is_container ) {
+ tmp_control = control;
+ control = NULL;
+ break;
+ }
+ else {
+ back_up = false;
+ }
+ ***/
+ }
+ }
+
+ /** Check if we've cycled back to the top... if so, return NULL **/
+ if ( control == main_panel ) {
+ return NULL;
+ }
+ }
+ /*
+ if ( tmp_control != NULL AND tmp_control->can_activate AND
+ tmp_control->enabled ) {
+ return tmp_control;
+ }*/
+
+ return NULL;
+}
+
+
+/****************************** GLUI_Main::find_prev_control() **************/
+
+GLUI_Control *GLUI_Main::find_prev_control( GLUI_Control *control )
+{
+ GLUI_Control *tmp_control, *next_control;
+
+ if ( control == NULL ) { /* here we find the last valid control */
+ next_control = main_panel;
+
+ do {
+ tmp_control = next_control;
+ next_control = find_next_control( tmp_control );
+ } while( next_control != NULL );
+
+ return tmp_control;
+ }
+ else { /* here we find the actual previous control */
+ next_control = main_panel;
+
+ do {
+ tmp_control = next_control;
+ next_control = find_next_control( tmp_control );
+ } while( next_control != NULL AND next_control != control );
+
+ if ( next_control == NULL OR tmp_control == main_panel )
+ return NULL;
+ else
+ return tmp_control;
+ }
+}
+
+/************************* GLUI_Master_Object::set_glutIdleFunc() ***********/
+
+void GLUI_Master_Object::set_glutIdleFunc(void (*f)(void))
+{
+ glut_idle_CB = f;
+ GLUI_Master.glui_setIdleFuncIfNecessary();
+}
+
+
+/**************************************** GLUI::disable() ********************/
+
+void GLUI::disable( void )
+{
+ deactivate_current_control();
+ main_panel->disable();
+}
+
+
+/******************************************** GLUI::sync_live() **************/
+
+void GLUI::sync_live( void )
+{
+ main_panel->sync_live(true, true);
+}
+
+
+/********************************* GLUI_Master_Object::sync_live_all() *****/
+
+void GLUI_Master_Object::sync_live_all( void )
+{
+ GLUI *glui;
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+
+ glui->sync_live(); /** sync it **/
+
+ glui = (GLUI*) glui->next();
+ }
+}
+
+
+/************************************* GLUI_Master_Object::close() **********/
+
+void GLUI_Master_Object::close_all( void )
+{
+ GLUI *glui;
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+
+ glui->close(); /** Set flag to close **/
+
+ glui = (GLUI*) glui->next();
+ }
+}
+
+
+/************************************* GLUI_Main::close_internal() **********/
+
+void GLUI_Main::close_internal( void )
+{
+ glutDestroyWindow(glutGetWindow()); /** Close this window **/
+
+ this->unlink();
+
+ if ( GLUI_Master.active_control_glui == this ) {
+ GLUI_Master.active_control = NULL;
+ GLUI_Master.active_control_glui = NULL;
+ }
+
+ if ( parent_window != -1 ) {
+ glutSetWindow( parent_window );
+ int win_w = glutGet( GLUT_WINDOW_WIDTH );
+ int win_h = glutGet( GLUT_WINDOW_HEIGHT );
+ glutReshapeWindow(win_w+1, win_h);
+ glutReshapeWindow(win_w-1, win_h);
+ }
+
+ delete this->main_panel;
+
+ delete this;
+}
+
+
+/************************************************** GLUI::close() **********/
+
+void GLUI::close( void )
+{
+ int old_glut_window;
+
+ closing = true;
+
+ old_glut_window = glutGetWindow();
+ glutSetWindow( get_glut_window_id() );
+ glutPostRedisplay();
+
+ glutSetWindow( old_glut_window );
+}
+
+
+/************************** GLUI_Main::check_subwindow_position() **********/
+
+void GLUI_Main::check_subwindow_position( void )
+{
+ /*** Reposition this window if subwindow ***/
+ if ( TEST_AND( this->flags, GLUI_SUBWINDOW ) ) {
+
+ int parent_w, parent_h, new_x, new_y;
+ int old_window = glutGetWindow();
+
+ glutSetWindow( glut_window_id );
+
+ glutSetWindow( glutGet( GLUT_WINDOW_PARENT ));
+ parent_w = glutGet( GLUT_WINDOW_WIDTH );
+ parent_h = glutGet( GLUT_WINDOW_HEIGHT );
+
+ glutSetWindow( glut_window_id );
+
+ if ( TEST_AND(this->flags,GLUI_SUBWINDOW_RIGHT )) {
+ new_x = parent_w - this->w;
+ new_y = 0;
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_LEFT )) {
+ new_x = 0;
+ new_y = 0;
+ }
+ else if ( TEST_AND(this->flags,GLUI_SUBWINDOW_BOTTOM )) {
+ new_x = 0;
+ new_y = parent_h - this->h;
+ }
+ else { /*** GLUI_SUBWINDOW_TOP ***/
+ new_x = 0;
+ new_y = 0;
+ }
+
+ /** Now make adjustments based on presence of other subwindows **/
+ GLUI *curr_glui;
+ curr_glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( curr_glui ) {
+ if ( TEST_AND( curr_glui->flags, GLUI_SUBWINDOW) AND
+ curr_glui->parent_window == this->parent_window ) {
+
+ if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_LEFT ) ) {
+ }
+ else if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_BOTTOM ) ) {
+ }
+ else if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_RIGHT ) ) {
+ }
+ else if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_TOP ) AND
+ ( TEST_AND( this->flags,GLUI_SUBWINDOW_LEFT ) OR
+ TEST_AND( this->flags,GLUI_SUBWINDOW_RIGHT ) ) ) {
+ /** If we are a RIGHT or LEFT subwindow, and there exists some
+ TOP subwindow, bump our position down **/
+
+ new_y += curr_glui->h;
+ }
+
+ /** CHeck multiple subwins at same position **/
+ /** We check the glui_id's: only the glui with the higher
+ ID number (meaning it was created later) gets bumped over **/
+ if ( curr_glui != this AND this->glui_id > curr_glui->glui_id ) {
+ if ( TEST_AND( this->flags,GLUI_SUBWINDOW_LEFT ) AND
+ TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_LEFT ) ) {
+ new_x += curr_glui->w;
+ }
+ else if ( TEST_AND( this->flags,GLUI_SUBWINDOW_TOP ) AND
+ TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_TOP ) ) {
+ new_y += curr_glui->h;
+ }
+ else if ( TEST_AND( this->flags,GLUI_SUBWINDOW_BOTTOM ) AND
+ TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_BOTTOM ) ) {
+ new_y -= curr_glui->h;
+ }
+ else if ( TEST_AND( this->flags,GLUI_SUBWINDOW_RIGHT ) AND
+ TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_RIGHT ) ) {
+ new_x -= curr_glui->w;
+ }
+
+ }
+ }
+
+ curr_glui = (GLUI*) curr_glui->next();
+ }
+
+
+
+ CLAMP( new_x, 0, new_x );
+ CLAMP( new_y, 0, new_y );
+
+ glutPositionWindow( new_x, new_y );
+ /* glutPostRedisplay(); */
+
+ glutSetWindow( old_window );
+ }
+}
+
+
+/********************************* GLUI_Master_Object::reshape() **********/
+/* This gets called by the user from a GLUT reshape callback. So we look */
+/* for subwindows that belong to the current window */
+
+void GLUI_Master_Object::reshape( void )
+{
+ GLUI *glui;
+ int current_window;
+
+ current_window = glutGetWindow();
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+ if ( TEST_AND( glui->flags, GLUI_SUBWINDOW) AND
+ glui->parent_window == current_window ) {
+ glutSetWindow( glui->get_glut_window_id());
+ glui->check_subwindow_position();
+ }
+
+ glui = (GLUI*) glui->next();
+ }
+
+ glutSetWindow(current_window);
+}
+
+
+/**************************** GLUI_Master_Object::set_glutReshapeFunc() *****/
+
+void GLUI_Master_Object::set_glutReshapeFunc(void (*f)(int width, int height))
+{
+ glutReshapeFunc( glui_reshape_func );
+ add_cb_to_glut_window( glutGetWindow(), GLUI_GLUT_RESHAPE, (void*) f);
+}
+
+
+/**************************** GLUI_Master_Object::set_glutKeyboardFunc() ****/
+
+void GLUI_Master_Object::set_glutKeyboardFunc(void (*f)(unsigned char key,
+ int x, int y))
+{
+ glutKeyboardFunc( glui_keyboard_func );
+ add_cb_to_glut_window( glutGetWindow(), GLUI_GLUT_KEYBOARD, (void*) f);
+}
+
+
+/*********************** GLUI_Master_Object::set_glutSpecialFunc() **********/
+
+
+
+void GLUI_Master_Object::set_glutSpecialUpFunc(void (*f)(int key,
+ int x, int y))
+{
+ glutSpecialUpFunc( glui_special_up_func );
+ add_cb_to_glut_window( glutGetWindow(), GLUI_GLUT_SPECIAL_UP, (void*) f);
+}
+
+
+void GLUI_Master_Object::set_glutSpecialFunc(void (*f)(int key,
+ int x, int y))
+{
+ glutSpecialFunc( glui_special_func );
+ add_cb_to_glut_window( glutGetWindow(), GLUI_GLUT_SPECIAL, (void*) f);
+}
+
+
+/*********************** GLUI_Master_Object::set_glutMouseFunc() **********/
+
+void GLUI_Master_Object::set_glutMouseFunc(void (*f)(int button, int state,
+ int x, int y))
+{
+ glutMouseFunc( glui_mouse_func );
+ add_cb_to_glut_window( glutGetWindow(), GLUI_GLUT_MOUSE, (void*) f);
+}
+
+
+/****************************** glui_parent_window_reshape_func() **********/
+/* This is the reshape callback for a window that contains subwindows */
+
+void glui_parent_window_reshape_func( int w, int h )
+{
+ int current_window;
+ GLUI *glui;
+ int first = true;
+
+ /* printf( "glui_parent_window_reshape_func: %d\n", glutGetWindow() ); */
+
+ current_window = glutGetWindow();
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+ if ( TEST_AND( glui->flags, GLUI_SUBWINDOW) AND
+ glui->parent_window == current_window ) {
+ glutSetWindow( glui->get_glut_window_id());
+ glui->check_subwindow_position();
+ glutSetWindow( current_window );
+
+ if ( first ) {
+ if (glui->glut_reshape_CB) glui->glut_reshape_CB( w, h );
+
+ first = false;
+ }
+ }
+
+ glui = (GLUI*) glui->next();
+ }
+}
+
+
+/****************************** glui_parent_window_keyboard_func() **********/
+
+void glui_parent_window_keyboard_func(unsigned char key, int x, int y)
+{
+ /* printf( "glui_parent_window_keyboard_func: %d\n", glutGetWindow() ); */
+
+ int current_window;
+ GLUI *glui;
+
+ current_window = glutGetWindow();
+
+ if ( GLUI_Master.active_control_glui AND GLUI_Master.active_control ) {
+ glutSetWindow( GLUI_Master.active_control_glui->get_glut_window_id() );
+
+ GLUI_Master.active_control_glui->keyboard(key,x,y);
+
+ glutSetWindow( current_window );
+ }
+ else {
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+ if ( TEST_AND( glui->flags, GLUI_SUBWINDOW) AND
+ glui->parent_window == current_window AND
+ glui->glut_keyboard_CB )
+ {
+ glui->glut_keyboard_CB( key, x, y );
+ break;
+ }
+
+ glui = (GLUI*) glui->next();
+ }
+ }
+}
+
+
+/****************************** glui_parent_window_special_func() **********/
+
+void glui_parent_window_special_func(int key, int x, int y)
+{
+ /*printf( "glui_parent_window_special_func: %d\n", glutGetWindow() ); */
+
+ int current_window;
+ GLUI *glui;
+
+ /** If clicking in the main area of a window w/subwindows,
+ deactivate any current control **/
+ if ( GLUI_Master.active_control_glui != NULL )
+ GLUI_Master.active_control_glui->deactivate_current_control();
+
+ /*** Now pass on the mouse event ***/
+
+ current_window = glutGetWindow();
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+ if ( TEST_AND( glui->flags, GLUI_SUBWINDOW) AND
+ glui->parent_window == current_window )
+ {
+ glutSetWindow( glui->get_glut_window_id());
+ if (glui->glut_special_CB) glui->glut_special_CB( key, x, y );
+ break;
+ }
+
+ glui = (GLUI*) glui->next();
+ }
+}
+
+
+/****************************** glui_parent_window_mouse_func() **********/
+
+void glui_parent_window_mouse_func(int button, int state, int x, int y)
+{
+ int current_window;
+ GLUI *glui;
+
+ /** If clicking in the main area of a window w/subwindows,
+ deactivate any current control **/
+ if ( GLUI_Master.active_control_glui != NULL )
+ GLUI_Master.active_control_glui->deactivate_current_control();
+
+
+ /*** Now pass on the mouse event ***/
+
+ current_window = glutGetWindow();
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ while( glui ) {
+ if ( TEST_AND( glui->flags, GLUI_SUBWINDOW) AND
+ glui->parent_window == current_window AND
+ glui->glut_mouse_CB)
+ {
+ glutSetWindow( glui->get_glut_window_id());
+ glui->glut_mouse_CB( button, state, x, y );
+ break;
+ }
+
+ glui = (GLUI*) glui->next();
+ }
+}
+
+
+/************************** GLUI_Master_Object::find_glut_window() **********/
+
+GLUI_Glut_Window *GLUI_Master_Object::find_glut_window( int window_id )
+{
+ GLUI_Glut_Window *window;
+
+ window = (GLUI_Glut_Window*) glut_windows.first_child();
+ while( window ) {
+ if ( window->glut_window_id == window_id )
+ return window;
+
+ window = (GLUI_Glut_Window*) window->next();
+ }
+
+ /*** Window not found - return NULL ***/
+ return NULL;
+}
+
+
+/******************** GLUI_Master_Object::add_cb_to_glut_window() **********/
+
+void GLUI_Master_Object::add_cb_to_glut_window(int window_id,
+ int cb_type,void *cb)
+{
+ GLUI_Glut_Window *window;
+
+ window = find_glut_window( window_id );
+ if ( NOT window ) {
+ /*** Allocate new window structure ***/
+
+ window = new GLUI_Glut_Window;
+ window->glut_window_id = window_id;
+ window->link_this_to_parent_last( (GLUI_Node*) &this->glut_windows );
+ }
+
+ switch( cb_type ) {
+ case GLUI_GLUT_RESHAPE:
+ window->glut_reshape_CB = (void(*)(int,int)) cb;
+ break;
+ case GLUI_GLUT_DISPLAY:
+ window->glut_display_CB = (void(*)()) cb;
+ break;
+ case GLUI_GLUT_KEYBOARD:
+ window->glut_keyboard_CB = (void(*)(unsigned char,int,int)) cb;
+ break;
+ case GLUI_GLUT_SPECIAL:
+ window->glut_special_CB = (void(*)(int,int,int)) cb;
+ break;
+ case GLUI_GLUT_SPECIAL_UP:
+ window->glut_special_up_CB = (void(*)(int,int,int)) cb;
+ break;
+ case GLUI_GLUT_MOUSE:
+ window->glut_mouse_CB = (void(*)(int,int,int,int)) cb;
+ break;
+ case GLUI_GLUT_MOTION:
+ window->glut_motion_CB = (void(*)(int,int)) cb;
+ break;
+ case GLUI_GLUT_PASSIVE_MOTION:
+ window->glut_passive_motion_CB = (void(*)(int,int)) cb;
+ break;
+ case GLUI_GLUT_ENTRY:
+ window->glut_entry_CB = (void(*)(int)) cb;
+ break;
+ case GLUI_GLUT_VISIBILITY:
+ window->glut_visibility_CB= (void(*)(int)) cb;
+ break;
+ }
+}
+
+
+/************* GLUI_Master_Object::set_left_button_glut_menu_control() *****/
+
+void GLUI_Master_Object::set_left_button_glut_menu_control(
+ GLUI_Control *control )
+{
+ curr_left_button_glut_menu = control;
+}
+
+
+/******************************* GLUI_Main::set_ortho_projection() **********/
+
+void GLUI_Main::set_ortho_projection( void )
+{
+ int win_h, win_w;
+
+ win_w = glutGet( GLUT_WINDOW_WIDTH );
+ win_h = glutGet( GLUT_WINDOW_HEIGHT );
+
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ /* gluOrtho2D( 0.0, (float) win_w, 0.0, (float) win_h ); */
+ glOrtho( 0.0, (float)win_w, 0.0, (float) win_h, -1000.0, 1000.0 );
+
+ glMatrixMode( GL_MODELVIEW );
+
+ return; /****-----------------------------------------------***/
+
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+
+ /*** Rotate image so y increases upwards, contrary to OpenGL axes ***/
+ glTranslatef( (float) win_w/2.0, (float) win_h/2.0, 0.0 );
+ glRotatef( 180.0, 0.0, 1.0, 0.0 );
+ glRotatef( 180.0, 0.0, 0.0, 1.0 );
+ glTranslatef( (float) -win_w/2.0, (float) -win_h/2.0, 0.0 );
+}
+
+
+/******************************* GLUI_Main::set_viewport() **********/
+
+void GLUI_Main::set_viewport( void )
+{
+ glViewport( 0, 0, main_panel->w, main_panel->h );
+}
+
+
+/****************************** GLUI_Main::refresh() ****************/
+
+void GLUI_Main::refresh( void )
+{
+ int orig;
+
+ /****** GLUI_Glut_Window *glut_window;
+ int current_window;
+ current_window = glutGetWindow();
+ glut_window = GLUI_Master.find_glut_window( current_window );
+ if ( glut_window ) {
+ glut_window->glut_reshape_CB(w,h);
+ ******/
+
+ orig = glutGetWindow();
+
+ pack_controls();
+
+ if ( glut_window_id > 0 )
+ glutSetWindow( glut_window_id );
+
+
+ if ( TEST_AND( this->flags, GLUI_SUBWINDOW ) ) {
+ /*** GLUI subwindow ***/
+
+ check_subwindow_position();
+ }
+ else {
+ /*** Standalone GLUI window ***/
+
+ glutReshapeWindow( this->h, this->w );
+
+ }
+
+ glutPostRedisplay();
+ glutSetWindow( orig);
+}
+
+
+
+/***************** GLUI_Master_Object::get_main_gfx_viewport() ***********/
+
+void GLUI_Master_Object::get_viewport_area( int *x, int *y,
+ int *w, int *h )
+{
+ GLUI *curr_glui;
+ int curr_x, curr_y, curr_w, curr_h;
+ int curr_window;
+
+ curr_window = glutGetWindow();
+ curr_x = 0;
+ curr_y = 0;
+ curr_w = glutGet( GLUT_WINDOW_WIDTH );
+ curr_h = glutGet( GLUT_WINDOW_HEIGHT );
+
+ curr_glui = (GLUI*) gluis.first_child();
+ while( curr_glui ) {
+ if ( TEST_AND( curr_glui->flags, GLUI_SUBWINDOW) AND
+ curr_glui->parent_window == curr_window ) {
+
+ /* printf( "%s -> %d %d %d\n", curr_glui->window_name.c_str(), curr_glui->flags,
+ curr_glui->w, curr_glui->h );*/
+
+ if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_LEFT ) ) {
+ curr_x += curr_glui->w;
+ curr_w -= curr_glui->w;
+ }
+ else if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_BOTTOM ) ) {
+ curr_y += curr_glui->h;
+ curr_h -= curr_glui->h;
+ }
+ else if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_RIGHT ) ) {
+ curr_w -= curr_glui->w;
+ }
+ else if ( TEST_AND( curr_glui->flags,GLUI_SUBWINDOW_TOP ) ) {
+ curr_h -= curr_glui->h;
+ }
+ }
+
+ curr_glui = (GLUI*) curr_glui->next();
+ }
+
+ curr_x = MAX( 0, curr_x );
+ curr_y = MAX( 0, curr_y );
+ curr_w = MAX( 0, curr_w );
+ curr_h = MAX( 0, curr_h );
+
+ *x = curr_x;
+ *y = curr_y;
+ *w = curr_w;
+ *h = curr_h;
+}
+
+
+/*****************GLUI_Master_Object::auto_set_main_gfx_viewport() **********/
+
+void GLUI_Master_Object::auto_set_viewport( void )
+{
+ int x, y, w, h;
+
+ get_viewport_area( &x, &y, &w, &h );
+ glViewport( MAX(x,0), MAX(y,0), MAX(w,0), MAX(h,0) );
+}
+
+
+
+/***************************************** GLUI::show() **********************/
+
+void GLUI::show( void )
+{
+ int orig_window;
+
+ orig_window = main_panel->set_to_glut_window();
+
+ glutShowWindow();
+
+ main_panel->restore_window(orig_window);
+}
+
+
+
+/***************************************** GLUI::hide() **********************/
+
+void GLUI::hide( void )
+{
+ int orig_window;
+
+ this->deactivate_current_control();
+
+ orig_window = main_panel->set_to_glut_window();
+
+ glutHideWindow();
+
+ main_panel->restore_window(orig_window);
+}
+
+
+/**************** GLUI_DrawingSentinal **************/
+GLUI_DrawingSentinal::GLUI_DrawingSentinal(GLUI_Control *c_)
+ :c(c_)
+{
+ orig_win = c->set_to_glut_window();
+ orig_buf = c->glui->set_current_draw_buffer();
+}
+GLUI_DrawingSentinal::~GLUI_DrawingSentinal() {
+ c->glui->restore_draw_buffer(orig_buf);
+ c->restore_window(orig_win);
+}
+
+
+void GLUI_Master_Object::glui_setIdleFuncIfNecessary( void )
+{
+ GLUI *glui;
+
+ glui = (GLUI*) GLUI_Master.gluis.first_child();
+ int necessary;
+ if (this->glut_idle_CB)
+ necessary = true;
+ else {
+ necessary = false;
+ while( glui ) {
+ if( glui->needs_idle() ) {
+ necessary = true;
+ break;
+ }
+ glui = (GLUI*) glui->next();
+ }
+ }
+ if( necessary )
+ glutIdleFunc( glui_idle_func );
+ else
+ glutIdleFunc( NULL );
+}
diff --git a/tests/bullet/Extras/glui/glui_add_controls.cpp b/tests/bullet/Extras/glui/glui_add_controls.cpp
new file mode 100644
index 00000000..20ed43d1
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_add_controls.cpp
@@ -0,0 +1,319 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit (LGPL)
+ ---------------------------
+
+ glui_add_controls.cpp - Routines for adding controls to a GLUI window
+
+Note: these routines are all deprecated. Keeping them all here
+prevents the linker from dragging in all the .o files, even for controls
+that aren't used.
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include "glui_internal.h"
+
+
+/*********************************** GLUI:: add_checkbox() ************/
+
+GLUI_Checkbox *GLUI:: add_checkbox( const char *name, int *value_ptr,
+ int id, GLUI_CB callback )
+{
+ return add_checkbox_to_panel( main_panel,
+ name, value_ptr, id, callback );
+}
+
+
+/*********************************** GLUI:: add_checkbox_to_panel() **********/
+
+GLUI_Checkbox *GLUI::add_checkbox_to_panel( GLUI_Panel *panel,
+ const char *name, int *value_ptr,
+ int id,
+ GLUI_CB callback )
+{
+ return new GLUI_Checkbox( panel, name, value_ptr, id, callback );
+}
+
+/********************************************* GLUI::add_panel() *************/
+
+GLUI_Panel *GLUI::add_panel( const char *name, int type )
+{
+ return add_panel_to_panel( main_panel, name, type );
+}
+
+
+/**************************************** GLUI::add_panel_to_panel() *********/
+
+GLUI_Panel *GLUI::add_panel_to_panel( GLUI_Panel *parent_panel,
+ const char *name, int type )
+{
+ return new GLUI_Panel( parent_panel, name, type );
+}
+
+
+/***************************** GLUI::add_radiogroup() ***************/
+
+GLUI_RadioGroup *GLUI::add_radiogroup( int *value_ptr,
+ int user_id, GLUI_CB callback)
+{
+ return add_radiogroup_to_panel( main_panel, value_ptr,
+ user_id, callback );
+}
+
+
+/***************************** GLUI::add_radiogroup_to_panel() ***************/
+
+GLUI_RadioGroup *GLUI::add_radiogroup_to_panel(
+ GLUI_Panel *panel, int *value_ptr,
+ int user_id, GLUI_CB callback
+ )
+{
+ return new GLUI_RadioGroup( panel, value_ptr, user_id, callback );
+}
+
+
+/***************************** GLUI::add_radiobutton_to_group() *************/
+
+GLUI_RadioButton *GLUI::add_radiobutton_to_group( GLUI_RadioGroup *group,
+ const char *name )
+{
+ return new GLUI_RadioButton( group, name );
+}
+
+
+/********************************** GLUI::add_statictext() ************/
+
+GLUI_StaticText *GLUI::add_statictext( const char *name )
+{
+ return add_statictext_to_panel( main_panel, name );
+}
+
+
+/******************************* GLUI::add_statictext_to_panel() **********/
+
+GLUI_StaticText *GLUI::add_statictext_to_panel( GLUI_Panel *panel,
+ const char *name )
+{
+ return new GLUI_StaticText( panel, name );
+}
+
+
+/***************************************** GLUI:: add_button() ************/
+
+GLUI_Button *GLUI:: add_button( const char *name,
+ int id, GLUI_CB callback )
+{
+ return add_button_to_panel( main_panel,
+ name, id, callback );
+}
+
+/*********************************** GLUI:: add_button_to_panel() **********/
+
+GLUI_Button *GLUI::add_button_to_panel( GLUI_Panel *panel,
+ const char *name,
+ int id,
+ GLUI_CB callback )
+{
+ return new GLUI_Button( panel, name, id, callback );
+}
+
+/********************************** GLUI::add_separator() ************/
+
+void GLUI::add_separator( void )
+{
+ add_separator_to_panel( main_panel );
+}
+
+
+/******************************* GLUI::add_separator_to_panel() **********/
+
+void GLUI::add_separator_to_panel( GLUI_Panel *panel )
+{
+ new GLUI_Separator( panel );
+}
+
+
+/********************************** GLUI::add_edittext() ************/
+
+GLUI_EditText *GLUI::add_edittext( const char *name,
+ int data_type, void *data,
+ int id, GLUI_CB callback)
+{
+ return add_edittext_to_panel( main_panel, name, data_type, data,
+ id, callback );
+}
+
+
+/******************************* GLUI::add_edittext_to_panel() **********/
+
+GLUI_EditText *GLUI::add_edittext_to_panel( GLUI_Panel *panel,
+ const char *name,
+ int data_type, void *data,
+ int id, GLUI_CB callback)
+{
+ return new GLUI_EditText( panel, name, data_type, data, id, callback );
+}
+
+/********************************** GLUI::add_edittext() ************/
+
+GLUI_EditText *GLUI::add_edittext( const char *name,
+ GLUI_String & data,
+ int id, GLUI_CB callback)
+{
+ return add_edittext_to_panel( main_panel, name, data, id, callback );
+}
+
+
+/******************************* GLUI::add_edittext_to_panel() **********/
+
+GLUI_EditText*
+GLUI::add_edittext_to_panel( GLUI_Panel *panel, const char *name,
+ GLUI_String& data,
+ int id, GLUI_CB callback)
+{
+ return new GLUI_EditText( panel, name, GLUI_EDITTEXT_STRING, &data, id, callback );
+}
+
+/********************************** GLUI::add_spinner() ************/
+
+GLUI_Spinner *GLUI::add_spinner( const char *name,
+ int data_type, void *data,
+ int id, GLUI_CB callback)
+{
+ return add_spinner_to_panel( main_panel, name, data_type, data,
+ id, callback );
+}
+
+
+/******************************* GLUI::add_spinner_to_panel() **********/
+
+GLUI_Spinner *GLUI::add_spinner_to_panel(
+ GLUI_Panel *panel, const char *name,
+ int data_type, void *data,
+ int id, GLUI_CB callback
+)
+{
+ return new GLUI_Spinner( panel, name, data_type, data, id, callback );
+}
+
+
+/********************************** GLUI::add_column() ************/
+
+void GLUI::add_column( int draw_bar )
+{
+ add_column_to_panel( main_panel, draw_bar );
+}
+
+
+/******************************* GLUI::add_column_to_panel() **********/
+
+void GLUI::add_column_to_panel( GLUI_Panel *panel, int draw_bar )
+{
+ new GLUI_Column( panel, draw_bar );
+}
+
+
+/*********************************** GLUI:: add_listbox() ************/
+
+GLUI_Listbox *GLUI:: add_listbox( const char *name, int *value_ptr,
+ int id, GLUI_CB callback )
+{
+ return add_listbox_to_panel( main_panel,
+ name, value_ptr, id, callback );
+}
+
+
+/*********************************** GLUI:: add_listbox_to_panel() **********/
+
+GLUI_Listbox *GLUI::add_listbox_to_panel( GLUI_Panel *panel,
+ const char *name, int *value_ptr,
+ int id,
+ GLUI_CB callback )
+{
+ return new GLUI_Listbox( panel, name, value_ptr, id, callback );
+}
+
+
+/*********************************** GLUI:: add_rotation() ************/
+
+GLUI_Rotation *GLUI:: add_rotation( const char *name, float *value_ptr,
+ int id, GLUI_CB callback )
+{
+ return add_rotation_to_panel( main_panel, name, value_ptr, id, callback );
+}
+
+
+/*********************************** GLUI:: add_rotation_to_panel() **********/
+
+GLUI_Rotation *GLUI::add_rotation_to_panel( GLUI_Panel *panel,
+ const char *name, float *value_ptr,
+ int id,
+ GLUI_CB callback )
+{
+ return new GLUI_Rotation( panel, name, value_ptr, id, callback );
+}
+
+
+/*********************************** GLUI:: add_translation() ************/
+
+GLUI_Translation *GLUI:: add_translation( const char *name, int trans_type,
+ float *value_ptr, int id,
+ GLUI_CB callback )
+{
+ return add_translation_to_panel( main_panel,name,trans_type,
+ value_ptr, id, callback );
+}
+
+
+/*********************************** GLUI:: add_translation_to_panel() **********/
+
+GLUI_Translation *GLUI::add_translation_to_panel(
+ GLUI_Panel *panel, const char *name,
+ int trans_type, float *value_ptr,
+ int id, GLUI_CB callback
+ )
+{
+ return new GLUI_Translation(panel, name, trans_type, value_ptr, id, callback);
+}
+
+
+/********************************** GLUI::add_rollout() **************/
+
+GLUI_Rollout *GLUI::add_rollout( const char *name, int open, int type)
+{
+ return add_rollout_to_panel( main_panel, name, open, type);
+}
+
+
+/****************************** GLUI::add_rollout_to_panel() *********/
+
+GLUI_Rollout *GLUI::add_rollout_to_panel(GLUI_Panel *panel, const char *name,
+ int open, int type)
+{
+ return new GLUI_Rollout( panel, name, open, type );
+}
+
+
+
diff --git a/tests/bullet/Extras/glui/glui_bitmap_img_data.cpp b/tests/bullet/Extras/glui/glui_bitmap_img_data.cpp
new file mode 100644
index 00000000..bfcef31f
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_bitmap_img_data.cpp
@@ -0,0 +1,138 @@
+/**
+ Bitmaps for all GLUI images.
+
+ These were converted from original PPM images
+ (mostly lost) with the tools/ppm2array program.
+
+ The images here are extracted in typical OpenGL
+ bottom-to-top fashion.
+
+ FIXME: don't use greyscale brightness here--this prevents
+ people changing the background color. Instead, use a code
+ indicating the underlying purpose of the pixel:
+ 0 = shadows; outlines; UI elements (check boxes, arrows)
+ 64 = disabled shadows and UI elements
+ 128 = shadowing, disabled
+ 192 = disabled white; background
+ 255 = highlights; checkbox/radio background
+
+ I'm thinking the way to do this would be to have an
+enum {
+ BG = 0, // Background shines through-- totally alpha transparent
+ BS, // Background of scrollbar/spin box-- opaque gray
+ SB, // Shadowed-black element-- strong alpha blend to black
+ SD, // Shadowed-dark element-- weak alpha blend to black
+ HL, // Highlight-light-- weak alpha blend to white
+ HW, // Highlight-white-- strong alpha blend to white
+ UB, // User-interface black-- arrows, checkboxes, radio buttons
+ UW, // User-interface white-- backgrounds of checkboxes and radio buttons
+};
+
+ Orion Sky Lawlor, olawlor@acm.org, 2006/05/04 (LGPL)
+*/
+
+/*----------------------- checkboxes --------------------------*/
+unsigned char glui_img_checkbox_0[] = { 13, 13, /* width, height */
+255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 255,
+};
+
+
+unsigned char glui_img_checkbox_0_dis[] = { 13, 13, /* width, height */
+255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 255,
+};
+
+
+unsigned char glui_img_checkbox_1[] = { 13, 13, /* width, height */
+255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 255, 0, 255, 255, 255, 255, 255, 192, 255, 128, 0, 255, 255, 0, 0, 0, 255, 255, 255, 255, 192, 255, 128, 0, 255, 0, 0, 0, 0, 0, 255, 255, 255, 192, 255, 128, 0, 255, 0, 0, 255, 0, 0, 0, 255, 255, 192, 255, 128, 0, 255, 0, 255, 255, 255, 0, 0, 0, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 0, 0, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 0, 255, 192, 255, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 255,
+};
+
+
+unsigned char glui_img_checkbox_1_dis[] = { 13, 13, /* width, height */
+255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 192, 64, 192, 192, 192, 192, 192, 192, 255, 128, 64, 192, 192, 64, 64, 64, 192, 192, 192, 192, 192, 255, 128, 64, 192, 64, 64, 64, 64, 64, 192, 192, 192, 192, 255, 128, 64, 192, 64, 64, 192, 64, 64, 64, 192, 192, 192, 255, 128, 64, 192, 64, 192, 192, 192, 64, 64, 64, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 64, 64, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 64, 192, 192, 255, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 128, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 255,
+};
+
+
+/*------------------------------- arrows -------------------------------------*/
+unsigned char glui_img_downarrow[] = { 16, 16, /* width, height */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 0, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 0, 0, 0, 0, 0, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 0, 0, 0, 0, 0, 0, 0, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0,
+};
+
+
+unsigned char glui_img_leftarrow[] = { 16, 16, /* width, height */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 0, 0, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0,
+};
+
+unsigned char glui_img_rightarrow[] = { 16, 16, /* width, height */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 0, 0, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0,
+};
+
+unsigned char glui_img_uparrow[] = { 16, 16, /* width, height */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 0, 0, 0, 0, 0, 0, 0, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 0, 0, 0, 0, 0, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 0, 0, 0, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 0, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 128, 0, 192, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 128, 0, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 0,
+};
+
+/*------------------ listboxes ---------------------*/
+unsigned char glui_img_listbox_down[] = { 11, 17, /* width, height */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 127, 191, 191, 191, 127, 0, 127, 191, 191, 191, 127, 127, 127, 191, 191, 127, 0, 127, 191, 191, 127, 127, 127, 127, 127, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 0,
+};
+
+
+unsigned char glui_img_listbox_up[] = { 11, 17, /* width, height */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 191, 127, 127, 127, 127, 127, 127, 127, 127, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 0, 191, 191, 191, 127, 0, 191, 255, 191, 191, 0, 0, 0, 191, 191, 127, 0, 191, 255, 191, 0, 0, 0, 0, 0, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 0, 191, 255, 255, 255, 255, 255, 255, 255, 255, 127, 0, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 0,
+};
+
+unsigned char glui_img_listbox_up_dis[] = { 11, 17, /* width, height */
+127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 191, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 254, 191, 191, 191, 127, 127, 191, 255, 191, 191, 127, 127, 254, 191, 191, 127, 127, 191, 255, 191, 127, 127, 127, 127, 254, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 191, 191, 191, 191, 191, 191, 191, 127, 127, 191, 255, 255, 255, 255, 255, 255, 255, 255, 127, 127, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127,
+};
+
+/*--------------------------- radio buttons -------------------------*/
+unsigned char glui_img_radiobutton_0[] = { 14, 14, /* width, height */
+192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 255, 255, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 192, 128, 192, 192, 255, 255, 255, 255, 192, 192, 255, 192, 192, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 192, 192, 128, 0, 0, 255, 255, 255, 255, 0, 0, 255, 192, 192, 192, 192, 192, 128, 128, 0, 0, 0, 0, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 128, 128, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+};
+
+
+unsigned char glui_img_radiobutton_0_dis[] = { 14, 14, /* width, height */
+192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 255, 255, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 192, 128, 192, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 192, 192, 128, 64, 64, 192, 192, 192, 192, 64, 64, 255, 192, 192, 192, 192, 192, 128, 128, 64, 64, 64, 64, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 128, 128, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+};
+
+
+unsigned char glui_img_radiobutton_1[] = { 14, 14, /* width, height */
+192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 255, 255, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 192, 128, 192, 192, 255, 255, 255, 255, 192, 192, 255, 192, 192, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 192, 128, 0, 255, 255, 255, 0, 0, 255, 255, 255, 192, 255, 192, 192, 128, 0, 255, 255, 0, 0, 0, 0, 255, 255, 192, 255, 192, 192, 128, 0, 255, 255, 0, 0, 0, 0, 255, 255, 192, 255, 192, 192, 128, 0, 255, 255, 255, 0, 0, 255, 255, 255, 192, 255, 192, 192, 192, 128, 0, 255, 255, 255, 255, 255, 255, 192, 255, 192, 192, 192, 192, 128, 0, 0, 255, 255, 255, 255, 0, 0, 255, 192, 192, 192, 192, 192, 128, 128, 0, 0, 0, 0, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 128, 128, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+};
+
+
+unsigned char glui_img_radiobutton_1_dis[] = { 14, 14, /* width, height */
+192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 255, 255, 192, 192, 192, 192, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 255, 255, 192, 192, 192, 192, 192, 128, 192, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 192, 128, 64, 192, 192, 192, 64, 64, 192, 192, 192, 192, 255, 192, 192, 128, 64, 192, 192, 64, 64, 64, 64, 192, 192, 192, 255, 192, 192, 128, 64, 192, 192, 64, 64, 64, 64, 192, 192, 192, 255, 192, 192, 128, 64, 192, 192, 192, 64, 64, 192, 192, 192, 192, 255, 192, 192, 192, 128, 64, 192, 192, 192, 192, 192, 192, 192, 255, 192, 192, 192, 192, 128, 64, 64, 192, 192, 192, 192, 64, 64, 255, 192, 192, 192, 192, 192, 128, 128, 64, 64, 64, 64, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 128, 128, 128, 128, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192, 192,
+};
+
+
+
+/*----------------- spinners ----------------------------*/
+unsigned char glui_img_spindown_0[] = { 12, 8, /* width, height */
+255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 0, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 255, 191, 191, 191, 191, 0, 127, 191, 191, 191, 127, 0, 255, 191, 191, 191, 0, 0, 0, 127, 191, 191, 127, 0, 255, 191, 191, 0, 0, 0, 0, 0, 127, 191, 127, 0, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0,
+};
+
+
+unsigned char glui_img_spindown_1[] = { 12, 8, /* width, height */
+255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 191, 255, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 191, 255, 0, 127, 191, 191, 191, 127, 0, 191, 191, 191, 191, 255, 0, 127, 191, 191, 127, 0, 0, 0, 191, 191, 191, 255, 0, 127, 191, 127, 0, 0, 0, 0, 0, 191, 191, 255, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 191, 255, 0, 127, 127, 127, 127, 127, 127, 127, 127, 127, 191, 255,
+};
+
+
+unsigned char glui_img_spindown_dis[] = { 12, 8, /* width, height */
+255, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 255, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 64, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 64, 255, 191, 191, 191, 191, 127, 255, 191, 191, 191, 127, 64, 255, 191, 191, 191, 127, 127, 127, 255, 191, 191, 127, 64, 255, 191, 191, 127, 127, 127, 127, 127, 255, 191, 127, 64, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 64, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 64,
+};
+
+
+unsigned char glui_img_spinup_0[] = { 12, 8, /* width, height */
+255, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 0, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 255, 191, 191, 0, 0, 0, 0, 0, 127, 191, 127, 0, 255, 191, 191, 191, 0, 0, 0, 127, 191, 191, 127, 0, 255, 191, 191, 191, 191, 0, 127, 191, 191, 191, 127, 0, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 0, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+};
+
+
+unsigned char glui_img_spinup_1[] = { 12, 8, /* width, height */
+ 0, 127, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 191, 255, 0, 127, 191, 127, 0, 0, 0, 0, 0, 191, 191, 255, 0, 127, 191, 191, 127, 0, 0, 0, 191, 191, 191, 255, 0, 127, 191, 191, 191, 127, 0, 191, 191, 191, 191, 255, 0, 127, 191, 191, 191, 191, 191, 191, 191, 191, 191, 255, 0, 127, 127, 127, 127, 127, 127, 127, 127, 127, 191, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255,
+};
+
+
+unsigned char glui_img_spinup_dis[] = { 12, 8, /* width, height */
+255, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 64, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 64, 255, 191, 191, 127, 127, 127, 127, 127, 255, 191, 127, 64, 255, 191, 191, 191, 127, 127, 127, 255, 191, 191, 127, 64, 255, 191, 191, 191, 191, 127, 255, 191, 191, 191, 127, 64, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 127, 64, 255, 191, 191, 191, 191, 191, 191, 191, 191, 191, 191, 64, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
+};
+
diff --git a/tests/bullet/Extras/glui/glui_bitmaps.cpp b/tests/bullet/Extras/glui/glui_bitmaps.cpp
new file mode 100644
index 00000000..35d338ec
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_bitmaps.cpp
@@ -0,0 +1,176 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_bitmaps.cpp
+
+Draws the hardcoded images listed in glui_bitmap_img_data with OpenGL.
+
+FIXME: upload the images to a texture. This will allow them to be:
+ - Drawn with alpha blending
+ - Drawn at random sizes and angles onscreen
+ - Drawn much faster than with glDrawPixels
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include "glui_internal.h"
+#include <cassert>
+
+/************ Image Bitmap arrays **********/
+
+extern unsigned char glui_img_checkbox_0[];
+extern unsigned char glui_img_checkbox_1[];
+extern unsigned char glui_img_radiobutton_0[];
+extern unsigned char glui_img_radiobutton_1[];
+extern unsigned char glui_img_uparrow[];
+extern unsigned char glui_img_downarrow[];
+extern unsigned char glui_img_leftarrow[];
+extern unsigned char glui_img_rightarrow[];
+extern unsigned char glui_img_spinup_0[];
+extern unsigned char glui_img_spinup_1[];
+extern unsigned char glui_img_spindown_0[];
+extern unsigned char glui_img_spindown_1[];
+extern unsigned char glui_img_checkbox_0_dis[];
+extern unsigned char glui_img_checkbox_1_dis[];
+extern unsigned char glui_img_radiobutton_0_dis[];
+extern unsigned char glui_img_radiobutton_1_dis[];
+extern unsigned char glui_img_spinup_dis[];
+extern unsigned char glui_img_spindown_dis[];
+extern unsigned char glui_img_listbox_up[];
+extern unsigned char glui_img_listbox_down[];
+extern unsigned char glui_img_listbox_up_dis[];
+
+
+// These must be in the same order as the GLUI_STDBITMAP enums from glui.h!
+unsigned char *bitmap_arrays[] = {
+ glui_img_checkbox_0,
+ glui_img_checkbox_1,
+ glui_img_radiobutton_0,
+ glui_img_radiobutton_1,
+ glui_img_uparrow,
+ glui_img_downarrow,
+ glui_img_leftarrow,
+ glui_img_rightarrow,
+ glui_img_spinup_0,
+ glui_img_spinup_1,
+ glui_img_spindown_0,
+ glui_img_spindown_1,
+ glui_img_checkbox_0_dis,
+ glui_img_checkbox_1_dis,
+ glui_img_radiobutton_0_dis,
+ glui_img_radiobutton_1_dis,
+ glui_img_spinup_dis,
+ glui_img_spindown_dis,
+ glui_img_listbox_up,
+ glui_img_listbox_down,
+ glui_img_listbox_up_dis,
+};
+
+
+/************************************ GLUI_Bitmap::load_from_array() ********/
+
+GLUI_Bitmap::GLUI_Bitmap()
+: pixels(NULL),
+ w(0),
+ h(0)
+{
+}
+
+GLUI_Bitmap::~GLUI_Bitmap()
+{
+ if (pixels)
+ {
+ free(pixels);
+ pixels = NULL;
+ }
+}
+
+/* Create bitmap from greyscale byte array */
+void GLUI_Bitmap::init_grey(unsigned char *array)
+{
+ w = array[0]; h = array[1];
+ pixels = (unsigned char *) malloc(w*h*3);
+ assert(pixels);
+
+ for(int i = 0; i<w*h; i++ )
+ for (int j = 0; j<3; j++) /* copy grey to r,g,b channels */
+ pixels[i*3+j] = (unsigned char) array[i+2];
+}
+
+
+/* Create bitmap from color int array.
+ (OSL) This used to be how all GLUI bitmaps were stored, which was horribly
+ inefficient--three ints per pixel, or 12 bytes per pixel!
+*/
+void GLUI_Bitmap::init(int *array)
+{
+ w = array[0]; h = array[1];
+ pixels = (unsigned char *) malloc(w*h*3);
+ assert(pixels);
+
+ for (int i = 0; i<w*h*3; i++)
+ pixels[i] = (unsigned char) array[i+2];
+}
+
+
+/*********************************** GLUI_StdBitmaps::draw() *****************/
+
+GLUI_StdBitmaps::GLUI_StdBitmaps()
+{
+ for (int i=0; i<GLUI_STDBITMAP_NUM_ITEMS; i++)
+ bitmaps[i].init_grey(bitmap_arrays[i]);
+}
+
+GLUI_StdBitmaps::~GLUI_StdBitmaps()
+{
+}
+
+int GLUI_StdBitmaps::width(int i) const
+{
+ assert(i>=0 && i<GLUI_STDBITMAP_NUM_ITEMS);
+ return bitmaps[i].w;
+}
+
+int GLUI_StdBitmaps::height(int i) const
+{
+ assert(i>=0 && i<GLUI_STDBITMAP_NUM_ITEMS);
+ return bitmaps[i].h;
+}
+
+void GLUI_StdBitmaps::draw(int i, int x, int y) const
+{
+ assert(i>=0 && i<GLUI_STDBITMAP_NUM_ITEMS);
+
+ if (bitmaps[i].pixels != NULL )
+ {
+ glPixelStorei(GL_UNPACK_ALIGNMENT,1);
+ glRasterPos2f(0.5f+x, 0.5f+y+bitmaps[i].h);
+ glDrawPixels(
+ bitmaps[i].w, bitmaps[i].h,
+ GL_RGB, GL_UNSIGNED_BYTE, bitmaps[i].pixels);
+ }
+}
+
diff --git a/tests/bullet/Extras/glui/glui_button.cpp b/tests/bullet/Extras/glui/glui_button.cpp
new file mode 100644
index 00000000..4b128cc0
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_button.cpp
@@ -0,0 +1,186 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_button.cpp - GLUI_Button control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+#include "glui_internal_control.h"
+
+/****************************** GLUI_Button::GLUI_Button() **********/
+
+GLUI_Button::GLUI_Button( GLUI_Node *parent, const char *name,
+ int id, GLUI_CB cb )
+{
+ common_init();
+ user_id = id;
+ callback = cb;
+ set_name( name );
+ currently_inside = false;
+
+ parent->add_control( this );
+}
+
+
+/****************************** GLUI_Button::mouse_down_handler() **********/
+
+int GLUI_Button::mouse_down_handler( int local_x, int local_y )
+{
+ int_val = 1; /** A button always in unpressed before here, so
+ now we invariably set it to 'depressed' **/
+
+ currently_inside = true;
+ redraw();
+
+ return false;
+}
+
+
+/****************************** GLUI_Button::mouse_up_handler() **********/
+
+int GLUI_Button::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ set_int_val( 0 ); /** A button always turns off after you press it **/
+
+ currently_inside = false;
+ redraw();
+
+ if ( inside ) {
+ /*** Invoke the user's callback ***/
+ execute_callback();
+ }
+
+ return false;
+}
+
+
+/****************************** GLUI_Button::mouse_held_down_handler() ******/
+
+int GLUI_Button::mouse_held_down_handler( int local_x, int local_y,
+ bool new_inside)
+{
+ if (new_inside != currently_inside) {
+ currently_inside = new_inside;
+ redraw();
+ }
+
+ return false;
+}
+
+
+/****************************** GLUI_Button::key_handler() **********/
+
+int GLUI_Button::key_handler( unsigned char key,int modifiers )
+{
+ return false;
+}
+
+/********************************************** GLUI_Button::draw() **********/
+
+void GLUI_Button::draw( int x, int y )
+{
+ if (currently_inside) draw_pressed();
+ else {
+ glui->draw_raised_box( 0, 0, w, h );
+ draw_text( 0 );
+ }
+}
+
+
+/************************************** GLUI_Button::draw_pressed() ******/
+
+void GLUI_Button::draw_pressed( void )
+{
+ glColor3f( 0.0, 0.0, 0.0 );
+
+ draw_text( 1 );
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( 0, 0 ); glVertex2i( w, 0 );
+ glVertex2i( w, h ); glVertex2i( 0, h );
+ glEnd();
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( 1, 1 ); glVertex2i( w-1, 1 );
+ glVertex2i( w-1, h-1 ); glVertex2i( 1, h-1 );
+ glEnd();
+}
+
+
+/**************************************** GLUI_Button::draw_text() **********/
+
+void GLUI_Button::draw_text( int sunken )
+{
+ int string_width;
+
+ glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( 2, 2 ); glVertex2i( w-2, 2 );
+ glVertex2i( w-2, h-2 ); glVertex2i( 2, h-2 );
+ glEnd();
+
+ glColor3ub( 0,0,0 );
+
+ string_width = _glutBitmapWidthString( glui->font,
+ this->name.c_str() );
+ if ( NOT sunken ) {
+ draw_name( MAX((w-string_width),0)/2, 13);
+ }
+ else {
+ draw_name( MAX((w-string_width),0)/2 + 1, 13 + 1);
+ }
+
+ if ( active ) {
+ glEnable( GL_LINE_STIPPLE );
+ glLineStipple( 1, 0x5555 );
+
+ glColor3f( 0., 0., 0. );
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( 3, 3 ); glVertex2i( w-3, 3 );
+ glVertex2i( w-3, h-3 ); glVertex2i( 3, h-3 );
+ glEnd();
+
+ glDisable( GL_LINE_STIPPLE );
+ }
+}
+
+
+/************************************** GLUI_Button::update_size() **********/
+
+void GLUI_Button::update_size( void )
+{
+ int text_size;
+
+ if ( NOT glui )
+ return;
+
+ text_size = string_width( name );
+
+ if ( w < text_size + 16 )
+ w = text_size + 16 ;
+}
diff --git a/tests/bullet/Extras/glui/glui_checkbox.cpp b/tests/bullet/Extras/glui/glui_checkbox.cpp
new file mode 100644
index 00000000..ed77b363
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_checkbox.cpp
@@ -0,0 +1,188 @@
+
+/****************************************************************************
+
+ GLUI User Interface Toolkit (LGPL)
+ ---------------------------
+
+ glui_checkbox - GLUI_Checkbox control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+/****************************** GLUI_Checkbox::GLUI_Checkbox() **********/
+
+GLUI_Checkbox::GLUI_Checkbox( GLUI_Node *parent,
+ const char *name, int *value_ptr,
+ int id,
+ GLUI_CB cb )
+{
+ common_init();
+
+ set_ptr_val( value_ptr );
+ set_name( name );
+ user_id = id;
+ callback = cb;
+
+ parent->add_control( this );
+
+ init_live();
+}
+
+/****************************** GLUI_Checkbox::mouse_down_handler() **********/
+
+int GLUI_Checkbox::mouse_down_handler( int local_x, int local_y )
+{
+ orig_value = int_val;
+ int_val = !int_val;
+
+ currently_inside = true;
+ redraw();
+
+ return false;
+}
+
+
+/****************************** GLUI_Checkbox::mouse_up_handler() **********/
+
+int GLUI_Checkbox::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ if ( NOT inside ) { /* undo effect on value */
+ int_val = orig_value;
+ }
+ else {
+ set_int_val( int_val );
+
+ /*** Invoke the callback ***/
+ execute_callback();
+ }
+
+ return false;
+}
+
+
+/****************************** GLUI_Checkbox::mouse_held_down_handler() ******/
+
+int GLUI_Checkbox::mouse_held_down_handler( int local_x, int local_y,
+ bool inside)
+{
+ /********** Toggle checked and unchecked bitmap if we're entering or
+ leaving the checkbox area **********/
+ if ( inside != currently_inside ) {
+ int_val = !int_val;
+ currently_inside = inside;
+ redraw();
+ }
+
+ return false;
+}
+
+
+/****************************** GLUI_Checkbox::key_handler() **********/
+
+int GLUI_Checkbox::key_handler( unsigned char key,int modifiers )
+{
+ return false;
+}
+
+
+/****************************** GLUI_Checkbox::draw() **********/
+
+void GLUI_Checkbox::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( int_val != 0 ) {
+ if ( enabled )
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_CHECKBOX_ON, 0, 0 );
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_CHECKBOX_ON_DIS, 0, 0 );
+ }
+ else {
+ if ( enabled )
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_CHECKBOX_OFF, 0, 0 );
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_CHECKBOX_OFF_DIS, 0, 0 );
+ }
+
+ draw_active_area();
+
+ draw_name( text_x_offset, 10);
+}
+
+/**************************** GLUI_Checkbox::draw_active_area() **************/
+
+void GLUI_Checkbox::draw_active_area( void )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int text_width, left, right;
+
+ text_width = _glutBitmapWidthString( glui->font, name.c_str() );
+ left = text_x_offset-3;
+ right = left + 7 + text_width;
+
+ if ( active ) {
+ glEnable( GL_LINE_STIPPLE );
+ glLineStipple( 1, 0x5555 );
+ glColor3f( 0., 0., 0. );
+ } else {
+ glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
+ }
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i(left,0); glVertex2i( right,0);
+ glVertex2i(right,h+1); glVertex2i( left,h+1);
+ glEnd();
+
+ glDisable( GL_LINE_STIPPLE );
+}
+
+
+/************************************ GLUI_Checkbox::update_size() **********/
+
+void GLUI_Checkbox::update_size( void )
+{
+ int text_size;
+
+ if ( NOT glui )
+ return;
+
+ text_size = _glutBitmapWidthString( glui->font, name.c_str() );
+
+ /* if ( w < text_x_offset + text_size + 6 ) */
+ w = text_x_offset + text_size + 6 ;
+}
+
+
+/********************************* GLUI_Checkbox::set_int_val() **************/
+
+void GLUI_Checkbox::set_int_val( int new_val )
+{
+ int_val = new_val;
+
+ /*** Update the variable we're (possibly) pointing to ***/
+ output_live(true);
+ redraw();
+}
diff --git a/tests/bullet/Extras/glui/glui_column.cpp b/tests/bullet/Extras/glui/glui_column.cpp
new file mode 100644
index 00000000..29901bc3
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_column.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_column.cpp - GLUI_Column control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+/******************************** GLUI_Column::GLUI_Column() ************/
+
+GLUI_Column::GLUI_Column( GLUI_Node *parent, int draw_bar )
+{
+ common_init();
+ int_val = draw_bar; /* Whether to draw vertical bar or not */
+
+ parent->add_control( this );
+}
+
+/**************************************** GLUI_Column::draw() ************/
+
+void GLUI_Column::draw( int x, int y )
+{
+ int panel_x, panel_y, panel_w, panel_h, panel_x_off, panel_y_off;
+ int y_diff;
+
+ if ( int_val == 1 ) { /* Draw a vertical bar */
+ GLUI_DRAWINGSENTINAL_IDIOM
+ if ( parent() != NULL ) {
+ get_this_column_dims(&panel_x, &panel_y, &panel_w, &panel_h,
+ &panel_x_off, &panel_y_off);
+
+ y_diff = y_abs - panel_y;
+
+ if ( 0 ) {
+ glLineWidth(1.0);
+ glBegin( GL_LINES );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( -GLUI_XOFF+1, -y_diff + GLUI_SEPARATOR_HEIGHT/2 );
+ glVertex2i( -GLUI_XOFF+1, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2);
+
+ glColor3f( 1.0, 1.0, 1.0 );
+ glVertex2i( -GLUI_XOFF+2, -y_diff + GLUI_SEPARATOR_HEIGHT/2 );
+ glVertex2i( -GLUI_XOFF+2, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2);
+ glEnd();
+ }
+ else {
+ glLineWidth(1.0);
+ glBegin( GL_LINES );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( -2, 0 );
+ glVertex2i( -2, h );
+ /*glVertex2i( 0, -y_diff + GLUI_SEPARATOR_HEIGHT/2 ); */
+ /*glVertex2i( 0, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2); */
+
+ glColor3f( 1.0, 1.0, 1.0 );
+ glVertex2i( -1, 0 );
+ glVertex2i( -1, h );
+ /*glVertex2i( 1, -y_diff + GLUI_SEPARATOR_HEIGHT/2 ); */
+ /*glVertex2i( 1, -y_diff + panel_h - GLUI_SEPARATOR_HEIGHT/2); */
+ glEnd();
+ }
+ }
+ }
+}
+
diff --git a/tests/bullet/Extras/glui/glui_commandline.cpp b/tests/bullet/Extras/glui/glui_commandline.cpp
new file mode 100644
index 00000000..75865982
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_commandline.cpp
@@ -0,0 +1,197 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_commandline.cpp - GLUI_CommandLine control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher, 2005 William Baxter
+
+ This library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ This program is -not- in the public domain.
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include "glui_internal.h"
+
+/****************************** GLUI_CommandLine::GLUI_CommandLine() **********/
+GLUI_CommandLine::GLUI_CommandLine( GLUI_Node *parent, const char *name,
+ void *data, int id, GLUI_CB cb )
+{
+ common_init();
+ set_name( name );
+
+ data_type = GLUI_EDITTEXT_TEXT;
+ ptr_val = data;
+ user_id = id;
+ callback = cb;
+
+ live_type = GLUI_LIVE_TEXT;
+
+ parent->add_control( this );
+
+ init_live();
+}
+
+/****************************** GLUI_CommandLine::key_handler() **********/
+
+int GLUI_CommandLine::key_handler( unsigned char key,int modifiers )
+{
+ int ret;
+
+ if ( NOT glui )
+ return false;
+
+ if ( debug )
+ dump( stdout, "-> CMD_TEXT KEY HANDLER" );
+
+ if ( key == 13 ) { /* RETURN */
+ commit_flag = true;
+ }
+
+ ret = Super::key_handler( key, modifiers );
+
+ if ( debug )
+ dump( stdout, "<- CMD_TEXT KEY HANDLER" );
+
+ return ret;
+}
+
+
+/****************************** GLUI_CommandLine::deactivate() **********/
+
+void GLUI_CommandLine::deactivate( void )
+{
+ // if the commit_flag is set, add the current command to
+ // history and call deactivate as normal
+
+ // Trick deactivate into calling callback if and only if commit_flag set.
+ // A bit subtle, but deactivate checks that orig_text and text
+ // are the same to decide whether or not to call the callback.
+ // Force them to be different for commit, and the same for no commit.
+ if (commit_flag) {
+ add_to_history(text.c_str());
+ orig_text = "";
+ Super::deactivate( );
+ set_text( "" );
+ commit_flag = false;
+ }
+ else {
+ orig_text = text;
+ }
+}
+
+/**************************** GLUI_CommandLine::special_handler() **********/
+
+int GLUI_CommandLine::special_handler( int key,int modifiers )
+{
+ if ( NOT glui )
+ return false;
+
+ if ( debug )
+ printf( "CMD_TEXT SPECIAL:%d - mod:%d subs:%d/%d ins:%d sel:%d/%d\n",
+ key, modifiers, substring_start, substring_end,insertion_pt,
+ sel_start, sel_end );
+
+ if ( key == GLUT_KEY_UP ) // PREVIOUS HISTORY
+ {
+ scroll_history(-1);
+ }
+ else if ( key == GLUT_KEY_DOWN ) // NEXT HISTORY
+ {
+ scroll_history(+1);
+ }
+ else {
+ return Super::special_handler( key, modifiers );
+ }
+ return false;
+}
+
+
+
+/**************************** GLUI_CommandLine::scroll_history() ********/
+
+void GLUI_CommandLine::scroll_history( int direction )
+{
+ recall_history(curr_hist + direction);
+}
+
+/**************************** GLUI_CommandLine::recall_history() ********/
+
+void GLUI_CommandLine::recall_history( int hist_num )
+{
+ if (hist_num < oldest_hist OR
+ hist_num > newest_hist OR
+ hist_num == curr_hist)
+ return;
+
+ // Commit the current text first before we blow it away!
+ if (curr_hist == newest_hist) {
+ get_history_str(newest_hist) = text;
+ }
+
+ curr_hist = hist_num;
+ set_text(get_history_str(curr_hist));
+ sel_end = sel_start = insertion_pt = (int)text.length();
+ update_and_draw_text();
+}
+
+/**************************** GLUI_CommandLine::add_to_history() ********/
+
+void GLUI_CommandLine::add_to_history( const char *cmd )
+{
+ if (cmd[0]=='\0') return; // don't add if it's empty
+
+ curr_hist = newest_hist;
+ get_history_str(newest_hist) = text;
+
+ newest_hist = ++curr_hist;
+ if ( newest_hist >= HIST_SIZE )
+ {
+ // bump oldest off the list
+ hist_list.erase(hist_list.begin());
+ hist_list.push_back("");
+
+ oldest_hist++;
+ }
+}
+
+/**************************** GLUI_CommandLine::reset_history() ********/
+
+void GLUI_CommandLine::reset_history( void )
+{
+ oldest_hist = newest_hist = curr_hist = 0;
+}
+
+
+
+/*************************************** GLUI_CommandLine::dump() **************/
+
+void GLUI_CommandLine::dump( FILE *out, const char *name )
+{
+ fprintf( out,
+ "%s (commandline@%p): ins_pt:%d subs:%d/%d sel:%d/%d len:%d\n",
+ name, this,
+ insertion_pt, substring_start, substring_end, sel_start, sel_end,
+ (int)text.length());
+}
+
+
diff --git a/tests/bullet/Extras/glui/glui_control.cpp b/tests/bullet/Extras/glui/glui_control.cpp
new file mode 100644
index 00000000..576a2a9d
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_control.cpp
@@ -0,0 +1,1203 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_control.cpp - top-level GLUI_Control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+int _glui_draw_border_only = 0;
+
+/*************************** Drawing Utility routines *********************/
+
+/* Redraw this control. */
+void GLUI_Control::redraw(void) {
+ if (glui==NULL || hidden) return;
+ if (glui->should_redraw_now(this))
+ translate_and_draw_front();
+}
+
+/** Redraw everybody in our window. */
+void GLUI_Control::redraw_window(void) {
+ if (glui==NULL || hidden) return;
+ if ( glui->get_glut_window_id() == -1 ) return;
+ int orig = set_to_glut_window();
+ glutPostRedisplay();
+ restore_window(orig);
+}
+
+
+
+/* GLUI_Control::translate_and_draw_front() ********/
+
+void GLUI_Control::translate_and_draw_front()
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix();
+ translate_to_origin();
+ draw(0,0);
+ glPopMatrix();
+}
+
+
+/********** GLUI_Control::set_to_bkgd_color() ********/
+
+void GLUI_Control::set_to_bkgd_color( void )
+{
+ if ( NOT glui )
+ return;
+
+ glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
+}
+
+/******** GLUI_Control::draw_box_inwards_outline() ********/
+
+void GLUI_Control::draw_box_inwards_outline( int x_min, int x_max, int y_min, int y_max )
+{
+ glBegin( GL_LINES );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( x_min, y_min ); glVertex2i( x_max, y_min );
+ glVertex2i( x_min, y_min ); glVertex2i( x_min, y_max );
+
+ glColor3f( 1., 1., 1. );
+ glVertex2i( x_min, y_max ); glVertex2i( x_max, y_max );
+ glVertex2i( x_max, y_max ); glVertex2i( x_max, y_min );
+
+ if ( enabled )
+ glColor3f( 0., 0., 0. );
+ else
+ glColor3f( .25, .25, .25 );
+
+ glVertex2i( x_min+1, y_min+1 ); glVertex2i( x_max-1, y_min+1 );
+ glVertex2i( x_min+1, y_min+1 ); glVertex2i( x_min+1, y_max-1 );
+
+ glColor3f( .75, .75, .75 );
+ glVertex2i( x_min+1, y_max-1 ); glVertex2i( x_max-1, y_max-1 );
+ glVertex2i( x_max-1, y_max-1 ); glVertex2i( x_max-1, y_min+1 );
+ glEnd();
+}
+
+
+/******* GLUI_Control::draw_box() **********/
+
+void GLUI_Control::draw_box( int x_min, int x_max, int y_min, int y_max, float r, float g, float b)
+{
+ if ( r == 1.0 AND g == 1.0 AND b == 1.0 AND NOT enabled AND glui ) {
+ draw_bkgd_box( x_min, x_max, y_min, y_max );
+ return;
+ }
+
+ glColor3f( r, g, b );
+ glBegin( GL_QUADS );
+ glVertex2i( x_min, y_min ); glVertex2i( x_max, y_min );
+ glVertex2i( x_max, y_max ); glVertex2i( x_min, y_max );
+ glEnd();
+}
+
+
+/******* GLUI_Control::draw_bkgd_box() **********/
+
+void GLUI_Control::draw_bkgd_box( int x_min, int x_max, int y_min, int y_max )
+{
+ set_to_bkgd_color();
+
+ glBegin( GL_QUADS );
+ glVertex2i( x_min, y_min ); glVertex2i( x_max, y_min );
+ glVertex2i( x_max, y_max ); glVertex2i( x_min, y_max );
+ glEnd();
+}
+
+
+/**** GLUI_Control::draw_active_area() ********/
+
+void GLUI_Control::draw_active_box( int x_min, int x_max, int y_min, int y_max )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( active ) {
+ glEnable( GL_LINE_STIPPLE );
+ glLineStipple( 1, 0x5555 );
+ glColor3f( 0., 0., 0. );
+ } else {
+ set_to_bkgd_color();
+ }
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i(x_min, y_min); glVertex2i( x_max, y_min );
+ glVertex2i(x_max, y_max); glVertex2i( x_min, y_max );
+ glEnd();
+
+ glDisable( GL_LINE_STIPPLE );
+}
+
+
+/**** GLUI_Control::draw_emboss_box() ********/
+
+void GLUI_Control::draw_emboss_box(int x_min,int x_max,int y_min,int y_max)
+{
+ glLineWidth( 1.0 );
+ glColor3f( 1.0, 1.0, 1.0 );
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( x_min, y_min ); glVertex2i( x_max, y_min );
+ glVertex2i( x_max, y_max ); glVertex2i( x_min, y_max );
+ glEnd();
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( x_min+1, y_min+1 ); glVertex2i( x_max-1, y_min+1 );
+ glVertex2i( x_max-1, y_max-1 ); glVertex2i( x_min+1, y_max-1 );
+ glEnd();
+
+ glColor3f( .5, .5, .5 );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( x_min, y_min );
+ glVertex2i( x_max-1, y_min );
+ glVertex2i( x_max-1, y_max-1 );
+ glVertex2i( x_min, y_max-1 );
+ glEnd();
+}
+
+
+
+/******* GLUT_Control::draw_recursive() **********/
+
+void GLUI_Control::draw_recursive( int x, int y )
+{
+ GLUI_Control *node;
+
+ /* printf( "%s %d\n", this->name.c_str(), this->hidden );*/
+ if ( NOT can_draw() )
+ return;
+
+ /*if ( 1 ) { -- Debugging to check control width
+ glColor3f( 1.0, 0.0, 0.0 );
+ glBegin( GL_LINES );
+ glVertex2i( x_abs, y_abs );00
+ glVertex2i( x_abs+w, y_abs );
+
+ glEnd();
+ }*/
+
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix();
+
+ glTranslatef( (float) this->x_abs + .5,
+ (float) this->y_abs + .5,
+ 0.0 );
+
+ if ( NOT _glui_draw_border_only ) {
+ if ( NOT strcmp( name.c_str(), "Rollout" ) ) {
+ }
+
+ this->draw( this->x_off, this->y_off_top );
+ }
+ else
+ {
+ if ( this->dynamicCastGLUI_Column() ) {
+ /* printf( "%s w/h: %d/%d\n", (char*) name, w, h ); */
+ /*w = 2; */
+ }
+
+ /* The following draws the area of each control */
+ glColor3f( 1.0, 0.0, 0.0 );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( 0, 0 ); glVertex2i( w, 0 );
+ glVertex2i( w, h ); glVertex2i( 0, h );
+ glEnd();
+ }
+ glPopMatrix();
+
+ node = (GLUI_Control*) first_child();
+ while( node ) {
+ node->draw_recursive( node->x_abs, node->y_abs );
+ node = (GLUI_Control*) node->next();
+ }
+}
+
+
+/****** GLUI_Control::set_to_glut_window() *********/
+/* Sets the current window to the glut window associated with this control */
+
+int GLUI_Control::set_to_glut_window()
+{
+ int orig_window;
+
+ if ( NOT glui)
+ return 1;
+
+ orig_window = glutGetWindow();
+
+ glutSetWindow( glui->get_glut_window_id());
+
+ return orig_window;
+}
+
+
+/********** GLUI_Control::restore_window() *********/
+
+void GLUI_Control::restore_window(int orig)
+{
+ if ( orig > 0 )
+ glutSetWindow( orig );
+}
+
+
+
+/****************************** Text ***************************/
+
+/*************** GLUI_Control::set_font() **********/
+
+void GLUI_Control::set_font(void *new_font)
+{
+ font = new_font;
+ redraw();
+}
+
+
+/********** GLUI_Control::draw_string() ************/
+
+void GLUI_Control::draw_string( const char *text )
+{
+ _glutBitmapString( get_font(), text );
+}
+
+
+/**************** GLUI_Control::draw_char() ********/
+
+void GLUI_Control::draw_char(char c)
+{
+ glutBitmapCharacter( get_font(), c );
+}
+
+
+/*********** GLUI_Control::string_width() **********/
+
+int GLUI_Control::string_width(const char *text)
+{
+ return _glutBitmapWidthString( get_font(), text );
+}
+
+
+/************* GLUI_Control::char_width() **********/
+
+int GLUI_Control::char_width(char c)
+{ /* Hash table for faster character width lookups - JVK
+ Speeds up the textbox a little bit.
+ */
+ int hash_index = c % CHAR_WIDTH_HASH_SIZE;
+ if (char_widths[hash_index][0] != c) {
+ char_widths[hash_index][0] = c;
+ char_widths[hash_index][1] = glutBitmapWidth( get_font(), c );
+ }
+ return char_widths[hash_index][1];
+}
+
+
+/*************** GLUI_Control::get_font() **********/
+
+void *GLUI_Control::get_font( void )
+{
+ /*** Does this control have its own font? ***/
+ if ( this->font != NULL )
+ return this->font;
+
+ /*** Does the parent glui have a font? ***/
+ if ( glui )
+ return glui->font;
+
+ /*** Return the default font ***/
+ return GLUT_BITMAP_HELVETICA_12;
+}
+
+
+/************* GLUI_Control::draw_name() ***********/
+/* This draws the name of the control as either black (if enabled), or */
+/* embossed if disabled. */
+
+void GLUI_Control::draw_name(int x, int y)
+{
+ if ( NOT can_draw() )
+ return;
+
+ if ( enabled )
+ {
+ set_to_bkgd_color();
+ glRasterPos2i(x+1, y+1);
+ draw_string(name);
+ glColor3b( 0, 0, 0 );
+ glRasterPos2i(x, y);
+ draw_string(name);
+ }
+ else
+ { /* Control is disabled - emboss the string */
+ glColor3f( 1.0f, 1.0f, 1.0f );
+ glRasterPos2i(x+1, y+1);
+ draw_string(name);
+ glColor3f( .4f, .4f, .4f );
+ glRasterPos2i(x, y);
+ draw_string(name);
+ }
+}
+
+
+/**************************** Layout and Packing *********************/
+
+/****** GLUI_Control::align() **************/
+
+void GLUI_Control::align()
+{
+ int col_x, col_y, col_w, col_h, col_x_off, col_y_off;
+ int orig_x_abs;
+
+ orig_x_abs = x_abs;
+
+ /* Fix alignment bug relating to columns */
+ /*return; */
+
+ if ( NOT parent() )
+ return; /* Clearly this shouldn't happen, though */
+
+ get_this_column_dims(&col_x, &col_y, &col_w, &col_h,
+ &col_x_off, &col_y_off);
+
+ if ( this->dynamicCastGLUI_Column() ) {
+ /* if ( this->prev() != NULL ) {
+ ((GLUI_Control*)prev())->get_this_column_dims(&col_x, &col_y, &col_w, &col_h,
+ &col_x_off, &col_y_off);
+
+ x_abs = col_x + col_w;
+ }
+ else {
+ x_abs = ((GLUI_Control*)parent())->x_abs;
+ }
+ */
+ return;
+ }
+
+ if ( alignment == GLUI_ALIGN_LEFT ) {
+ x_abs = col_x + col_x_off;
+ }
+ else if ( alignment == GLUI_ALIGN_RIGHT ) {
+ x_abs = col_x + col_w - col_x_off - this->w;
+ }
+ else if ( alignment == GLUI_ALIGN_CENTER ) {
+ x_abs = col_x + (col_w - this->w) / 2;
+ }
+
+ if ( this->is_container ) {
+ /*** Shift all child columns ***/
+ int delta = x_abs - orig_x_abs;
+
+ GLUI_Control *node;
+
+ node = (GLUI_Control*) this->first_child();
+ while( node != NULL ) {
+ if ( node->dynamicCastGLUI_Column() ) {
+ node->x_abs += delta;
+ }
+
+ node = (GLUI_Control*) node->next();
+ }
+ }
+
+}
+
+
+/************** GLUI_Control::pack() ************/
+/* Recalculate positions and offsets */
+
+void GLUI_Control::pack_old(int x, int y)
+{
+ GLUI_Control *node;
+ int max_w, curr_y, curr_x, max_y;
+ int x_in = x, y_in =y;
+ int x_margin, y_margin_top, y_margin_bot;
+ int y_top_column;
+ int column_x;
+ GLUI_Column *curr_column = NULL;
+ this->update_size();
+ x_margin = this->x_off;
+ y_margin_top = this->y_off_top;
+ y_margin_bot = this->y_off_bot;
+ this->x_abs = x_in;
+ this->y_abs = y_in;
+ max_w = -1;
+ max_y = -1;
+ curr_x = this->x_abs + x_margin;
+ curr_y = this->y_abs + y_margin_top;
+ /*** Record start of this set of columns ***/
+ y_top_column = curr_y;
+ column_x = 0;
+ if ( this == glui->main_panel ) {
+ x=x;
+ }
+ /*** Iterate over children, packing them first ***/
+ node = (GLUI_Control*) this->first_child();
+ while( node != NULL ) {
+ if ( node->dynamicCastGLUI_Panel() && !node->collapsible) {
+ /* Pad some space above fixed size panels */
+ curr_y += GLUI_ITEMSPACING;
+ }
+ else if ( node->dynamicCastGLUI_Column()) {
+ curr_column = (GLUI_Column*) node;
+ if ( 1 ) {
+ column_x += max_w + 2 * x_margin;
+ curr_x += max_w + 2 * x_margin;
+ }
+ else {
+ column_x += max_w + 0 * x_margin;
+ curr_x += max_w + 0 * x_margin;
+ }
+ /*node->pack( curr_x, curr_y ); */
+ node->x_abs = curr_x;
+ node->y_abs = y_top_column;
+ node->w = 2;
+ node->h = curr_y - y_top_column;
+ curr_x += x_margin * 3 + 40;
+ curr_y = y_top_column;
+ max_w = 0;
+ node = (GLUI_Control*) node->next();
+ continue;
+ }
+ node->pack( curr_x, curr_y );
+ if ( node->dynamicCastGLUI_Panel() && !node->collapsible)
+ /* Pad some space below fixed size panels */
+ curr_y += GLUI_ITEMSPACING;
+ curr_y += node->h;
+ if ( node->w > max_w ) {
+ max_w = node->w;
+ if ( curr_column != NULL )
+ curr_column->w = max_w;
+ }
+ node = (GLUI_Control*) node->next();
+ if ( node ) {
+ curr_y += GLUI_ITEMSPACING;
+ }
+ if ( curr_y > max_y )
+ max_y = curr_y;
+ }
+ if ( this->is_container ) {
+ max_y += y_margin_bot; /*** Add bottom border inside box */
+ if ( this->first_child() ) {
+ if ( this->dynamicCastGLUI_Rollout() ) {
+ /** We don't want the rollout to shrink in width when it's
+ closed **/
+ this->w = MAX(this->w, column_x + max_w + 2 * x_margin );
+ }
+ else {
+ this->w = column_x + max_w + 2 * x_margin;
+ }
+ this->h = (max_y - y_in);
+ }
+ else { /* An empty container, so just assign default w & h */
+ this->w = GLUI_DEFAULT_CONTROL_WIDTH;
+ this->h = GLUI_DEFAULT_CONTROL_HEIGHT;
+ }
+ /** Expand panel if necessary (e.g., to include all the text in
+ a panel label) **/
+ this->update_size();
+ }
+}
+
+/*** GLUI_Control::get_this_column_dims() **********/
+/* Gets the x,y,w,h,and x/y offsets of the column to which a control belongs */
+
+void GLUI_Control::get_this_column_dims( int *col_x, int *col_y,
+ int *col_w, int *col_h,
+ int *col_x_off, int *col_y_off )
+{
+ GLUI_Control *node, *parent_ptr;
+ int parent_h, parent_y_abs;
+
+ parent_ptr = (GLUI_Control*) parent();
+
+ if ( parent_ptr==NULL )
+ return;
+
+ parent_h = parent_ptr->h;
+ parent_y_abs = parent_ptr->y_abs;
+
+ if ( parent_ptr->dynamicCastGLUI_Panel() AND
+ parent_ptr->int_val == GLUI_PANEL_EMBOSSED AND
+ parent_ptr->name != "" ) {
+ parent_h -= GLUI_PANEL_EMBOSS_TOP;
+ parent_y_abs += GLUI_PANEL_EMBOSS_TOP;
+ }
+
+ if ( 0 ) {
+ GLUI_Node *first, *last, *curr;
+
+ /** Look for first control in this column **/
+ first = this;
+ while (first->prev() AND !(first->prev())->dynamicCastGLUI_Column() )
+ first = first->prev();
+
+ /** Look for last control in this column **/
+ last = this;
+ while ( last->next() AND !(first->next())->dynamicCastGLUI_Column() )
+ last = last->next();
+
+ curr = first;
+ int max_w = -1;
+ do {
+ if ( ((GLUI_Control*)curr)->w > max_w )
+ max_w = ((GLUI_Control*)curr)->w;
+
+ if ( curr == last )
+ break;
+
+ curr = curr->next();
+ } while( curr != NULL );
+
+ *col_x = ((GLUI_Control*)first)->x_abs;
+ *col_y = ((GLUI_Control*)first)->y_abs;
+ *col_w = max_w;
+ if ( parent() ) {
+ *col_h = ((GLUI_Control*)parent())->h;
+ *col_x_off = ((GLUI_Control*)parent())->x_off;
+ }
+ else {
+ *col_h = 10;
+ *col_x_off = 0;
+ }
+ *col_y_off = 0;
+
+ return;
+ }
+
+ if ( 1 ) { /* IS THIS WRONG? */
+ /*** Look for preceding column ***/
+ node = (GLUI_Control*) this->prev();
+ while( node ) {
+ if ( node->dynamicCastGLUI_Column() ) {
+ *col_x = node->x_abs;
+ *col_y = parent_y_abs;
+ *col_w = node->w;
+ *col_h = parent_h;
+ *col_x_off = node->x_off;
+ *col_y_off = 0;
+
+ return;
+ }
+
+ node = (GLUI_Control*) node->prev();
+ }
+
+ /*** Nope, Look for next column ***/
+ node = (GLUI_Control*) this->next();
+ while( node ) {
+ if ( node->dynamicCastGLUI_Column() ) {
+ *col_x = parent_ptr->x_abs;
+ *col_y = parent_y_abs;
+ *col_w = node->x_abs - parent_ptr->x_abs;
+ *col_h = parent_h;
+ *col_x_off = node->x_off;
+ *col_y_off = 0;
+
+ return;
+ }
+
+ node = (GLUI_Control*) node->next();
+ }
+
+ /*** This is single-column panel, so return panel dims ***/
+ *col_x = parent_ptr->x_abs;
+ *col_y = parent_y_abs;
+ *col_w = parent_ptr->w;
+ *col_h = parent_h;
+ *col_x_off = parent_ptr->x_off;
+ *col_y_off = 0;
+ }
+}
+
+
+void GLUI_Control::pack( int x, int y )
+{
+ GLUI_Control *node;
+ int max_w, curr_y, curr_x, max_y;
+ int x_in = x, y_in =y;
+ int x_margin, y_margin_top, y_margin_bot;
+ int y_top_column;
+ int column_x;
+ GLUI_Column *curr_column = NULL;
+
+ this->update_size();
+
+ x_margin = this->x_off;
+ y_margin_top = this->y_off_top;
+ y_margin_bot = this->y_off_bot;
+
+ this->x_abs = x_in;
+ this->y_abs = y_in;
+
+ max_w = 0;
+ max_y = 0;
+ curr_x = this->x_abs + x_margin;
+ curr_y = this->y_abs + y_margin_top;
+
+ /*** Record start of this set of columns ***/
+
+ y_top_column = curr_y;
+ column_x = curr_x;
+
+ /*** Iterate over children, packing them first ***/
+
+ node = (GLUI_Control*) this->first_child();
+ while( node != NULL ) {
+ if ( node->dynamicCastGLUI_Panel() && !node->collapsible) {
+ /* Pad some space above fixed-size panels */
+ curr_y += GLUI_ITEMSPACING;
+ }
+ else if ( node->dynamicCastGLUI_Column() ) {
+ curr_column = (GLUI_Column*) node;
+ curr_x += max_w + 1 * x_margin;
+ column_x = curr_x;
+
+ node->x_abs = curr_x;
+ node->y_abs = y_top_column;
+ node->w = 2;
+ node->h = curr_y - y_top_column;
+
+ curr_x += x_margin * 1;
+ curr_y = y_top_column;
+ max_w = 0;
+
+ node = (GLUI_Control*) node->next();
+ continue;
+ }
+
+ node->pack( curr_x, curr_y );
+
+ if ( node->dynamicCastGLUI_Panel() && !node->collapsible)
+ /* Pad some space below fixed-size panels */
+ curr_y += GLUI_ITEMSPACING;
+
+ curr_y += node->h;
+
+ if ( node->w > max_w ) {
+ max_w = node->w;
+ if ( curr_column != NULL )
+ curr_column->w = max_w + x_margin;
+ }
+
+ if ( curr_y > max_y ) {
+ max_y = curr_y;
+ if ( curr_column != NULL )
+ curr_column->h = max_y - y_top_column;
+ }
+
+ node = (GLUI_Control*) node->next();
+
+ if ( node ) {
+ curr_y += GLUI_ITEMSPACING;
+ }
+
+ }
+
+ if ( this->is_container ) {
+ max_y += y_margin_bot; /*** Add bottom border inside box */
+
+ if ( this->first_child() ) {
+ this->w = column_x + max_w + 2 * x_margin - x_in;
+ this->h = (max_y - y_in);
+ }
+ else { /* An empty container, so just assign default w & h */
+ if ( !this->dynamicCastGLUI_Rollout() &&
+ !this->dynamicCastGLUI_Tree() ) {
+ this->w = GLUI_DEFAULT_CONTROL_WIDTH;
+ this->h = GLUI_DEFAULT_CONTROL_HEIGHT;
+ }
+ }
+
+ /** Expand panel if necessary (e.g., to include all the text in
+ a panel label) **/
+ this->update_size();
+
+
+ /*** Now we step through the GLUI_Columns, setting the 'h' ***/
+ node = (GLUI_Control*) this->first_child();
+ while( node != NULL ) {
+ if ( node->dynamicCastGLUI_Column() ) {
+ node->h = this->h - y_margin_bot - y_margin_top;
+ }
+
+ node = (GLUI_Control*) node->next();
+ }
+ }
+}
+
+
+
+/******************************** Live Variables **************************/
+/*********** GLUI_Control::sync_live() ************/
+/* Reads live variable and sets control to its current value */
+/* This function is recursive, and operates on control's children */
+
+void GLUI_Control::sync_live(int recurse, int draw_it)
+{
+ GLUI_Node *node;
+ int sync_it=true;
+ int i;
+ float *fp;
+ bool changed = false;
+
+ /*** If this is currently active control, and mouse button is down,
+ don't sync ***/
+ if ( glui )
+ {
+ if ( this == glui->active_control AND glui->mouse_button_down )
+ sync_it = false;
+
+ /*** Actually, just disable syncing if button is down ***/
+ /*** Nope, go ahead and sync if mouse is down - this allows syncing in
+ callbacks ***/
+ if ( 0 ) { /* THIS CODE BELOW SHOULD NOT BE EXECUTED */
+ if ( glui->mouse_button_down ) {
+ /* printf( "Can't sync\n" ); */
+ return;
+ }
+ }
+ }
+
+ /*** If this control has a live variable, we check its current value
+ against the stored value in the control ***/
+
+ if ( ptr_val != NULL ) {
+ if ( live_type == GLUI_LIVE_NONE OR NOT sync_it ) {
+ }
+ else if ( live_type == GLUI_LIVE_INT ) {
+ if ( *((int*)ptr_val) != last_live_int ) {
+ set_int_val( *((int*)ptr_val) );
+ last_live_int = *((int*)ptr_val);
+ changed = true;
+ }
+ }
+ else if ( live_type == GLUI_LIVE_FLOAT ) {
+ if ( *((float*)ptr_val) != last_live_float ) {
+ set_float_val( *((float*)ptr_val) );
+ last_live_float = *((float*)ptr_val);
+ changed = true;
+ }
+ }
+ else if ( live_type == GLUI_LIVE_TEXT ) {
+ if ( last_live_text.compare((const char*)ptr_val) != 0 ) {
+ set_text( (char*) ptr_val );
+ last_live_text = (const char*)ptr_val;
+ changed = true;
+ }
+ }
+ else if ( live_type == GLUI_LIVE_STRING ) {
+ if ( last_live_text.compare(((std::string*) ptr_val)->c_str()) != 0 ) {
+ set_text( ((std::string*) ptr_val)->c_str());
+ last_live_text = *((std::string*) ptr_val);
+ changed = true;
+ }
+ }
+ else if ( live_type == GLUI_LIVE_FLOAT_ARRAY ) {
+ /*** Step through the arrays, and see if they're the same ***/
+
+ fp = (float*) ptr_val;
+ for ( i=0; i<float_array_size; i++ ) {
+ if ( *fp != last_live_float_array[i] ) {
+ changed = true;
+ break;
+ }
+
+ fp++;
+ }
+
+ if ( changed == true) {
+ fp = (float*) ptr_val;
+ set_float_array_val( fp );
+ for ( i=0; i<float_array_size; i++ ) {
+ last_live_float_array[i] = *fp;
+ fp++;
+ }
+ }
+ }
+ else if ( live_type == GLUI_LIVE_DOUBLE ) {
+ }
+ }
+
+ /*** If this control is changed and we're supposed to be drawing, then
+ draw it now ***/
+ if ( changed == true AND draw_it ) {
+ redraw();
+ }
+
+ if ( recurse ) {
+ /*** Now recursively output live vars for all children ***/
+ node = this->first_child();
+ while( node ) {
+ ((GLUI_Control*) node)->sync_live(true, true);
+ node = node->next();
+ }
+
+ if ( collapsible == true AND is_open == false ) {
+ /** Here we have a collapsed control (e.g., a rollout that is closed **/
+ /** We need to go in and sync all the collapsed controls inside **/
+
+ node = this->collapsed_node.first_child();
+ while( node ) {
+ ((GLUI_Control*) node)->sync_live(true, false);
+ node = node->next();
+ }
+ }
+ }
+}
+
+
+/********** GLUI_Control::output_live() ************/
+/* Writes current value of control to live variable. */
+
+void GLUI_Control::output_live(int update_main_gfx)
+{
+ int i;
+ float *fp;
+
+ if ( ptr_val == NULL )
+ return;
+
+ if ( NOT live_inited )
+ return;
+
+ if ( live_type == GLUI_LIVE_NONE ) {
+ }
+ else if ( live_type == GLUI_LIVE_INT ) {
+ *((int*)ptr_val) = int_val;
+ last_live_int = int_val;
+ }
+ else if ( live_type == GLUI_LIVE_FLOAT ) {
+ *((float*)ptr_val) = float_val;
+ last_live_float = float_val;
+ }
+ else if ( live_type == GLUI_LIVE_TEXT ) {
+ strncpy( (char*) ptr_val, text.c_str(), text.length()+1);
+ last_live_text = text;
+ }
+ else if ( live_type == GLUI_LIVE_STRING ) {
+ (*(std::string*)ptr_val)= text.c_str();
+ last_live_text = text;
+ }
+ else if ( live_type == GLUI_LIVE_FLOAT_ARRAY ) {
+ fp = (float*) ptr_val;
+
+ for( i=0; i<float_array_size; i++ ) {
+ *fp = float_array_val[i];
+ last_live_float_array[i] = float_array_val[i];
+ fp++;
+ }
+ }
+ else if ( live_type == GLUI_LIVE_DOUBLE ) {
+ }
+
+ /** Update the main gfx window? **/
+ if ( update_main_gfx AND this->glui != NULL ) {
+ this->glui->post_update_main_gfx();
+ }
+}
+
+
+/****** GLUI_Control::execute_callback() **********/
+
+void GLUI_Control::execute_callback()
+{
+ int old_window;
+
+ old_window = glutGetWindow();
+
+ if ( glui AND glui->main_gfx_window_id != -1 )
+ glutSetWindow( glui->main_gfx_window_id );
+
+ this->callback( this );
+// if ( this->callback )
+// this->callback( this->user_id );
+
+ glutSetWindow( old_window );
+}
+
+
+/************** GLUI_Control::init_live() **********/
+/* Reads in value of a live variable. Called once, when ctrl is created */
+
+void GLUI_Control::init_live()
+{
+ int i;
+ float *fp;
+
+ if ( ptr_val == NULL )
+ return;
+
+ if ( live_type == GLUI_LIVE_NONE ) {
+ }
+ else if ( live_type == GLUI_LIVE_INT ) {
+ set_int_val( *((int*)ptr_val) );
+ last_live_int = *((int*)ptr_val);
+ }
+ else if ( live_type == GLUI_LIVE_FLOAT ) {
+ set_float_val( *((float*)ptr_val) );
+ last_live_float = *((float*)ptr_val);
+ }
+ else if ( live_type == GLUI_LIVE_TEXT ) {
+ set_text( (const char*) ptr_val );
+ last_live_text = (const char*) ptr_val;
+ }
+ else if ( live_type == GLUI_LIVE_STRING ) {
+ set_text( ((std::string*) ptr_val)->c_str() );
+ last_live_text = ((std::string*) ptr_val)->c_str();
+ }
+ else if ( live_type == GLUI_LIVE_FLOAT_ARRAY ) {
+ set_float_array_val( (float*) ptr_val );
+
+ fp = (float*) ptr_val;
+
+ for( i=0; i<float_array_size; i++ ) {
+ last_live_float_array[i] = *fp;
+ fp++;
+ }
+
+ }
+ else if ( live_type == GLUI_LIVE_DOUBLE ) {
+ }
+
+ live_inited = true;
+}
+
+/***** GLUI_Control::set_float_array_val() ********/
+
+void GLUI_Control::set_float_array_val( float *array_ptr )
+{
+ int i;
+
+ if ( array_ptr == NULL )
+ return;
+
+ for( i=0; i<float_array_size; i++ ) {
+ float_array_val[i] = array_ptr[i];
+ }
+
+ /*** Output the live var, without updating the main gfx window ***/
+ output_live(false);
+}
+
+
+/***** GLUI_Control::get_float_array_val() ********/
+
+void GLUI_Control::get_float_array_val( float *array_ptr )
+{
+ int i;
+
+ if ( array_ptr == NULL )
+ return;
+
+ for( i=0; i<float_array_size; i++ ) {
+ array_ptr[i] = float_array_val[i];
+ }
+}
+
+
+
+/**************************** Little Utility Routines ********************/
+
+/**** GLUI_Control::set_name() ********************/
+
+void GLUI_Control::set_name( const char *str )
+{
+ name = str;
+ redraw();
+}
+
+/**** GLUI_Control::enable() ****************/
+
+void GLUI_Control::enable()
+{
+ GLUI_Control *node;
+
+ enabled = true;
+
+ if ( NOT glui )
+ return;
+
+ redraw();
+
+ /*** Now recursively enable all buttons below it ***/
+ node = (GLUI_Control*) first_child();
+ while(node)
+ {
+ node->enable();
+ node = (GLUI_Control*) node->next();
+ }
+}
+
+
+/***** GLUI_Control::disable() ****************/
+
+void GLUI_Control::disable()
+{
+ GLUI_Control *node;
+
+ enabled = false;
+
+ if ( NOT glui )
+ return;
+
+ if ( glui->active_control == this )
+ glui->deactivate_current_control();
+ redraw();
+
+ /*** Now recursively disable all buttons below it ***/
+ node = (GLUI_Control*) first_child();
+ while(node) {
+ node->disable();
+ node = (GLUI_Control*) node->next();
+ }
+}
+
+/******* GLUI_Control::set_w() **************/
+
+void GLUI_Control::set_w(int new_w)
+{
+ w = new_w;
+ update_size(); /* Make sure control is big enough to fit text */
+ if (glui) glui->refresh();
+}
+
+
+/**** GLUI_Control::set_h() **************/
+
+void GLUI_Control::set_h(int new_h)
+{
+ h = new_h;
+ update_size(); /* Make sure control is big enough to fit text */
+ if (glui) glui->refresh();
+}
+
+
+/***** GLUI_Control::set_alignment() ******/
+
+void GLUI_Control::set_alignment(int new_align)
+{
+ alignment = new_align;
+
+ if ( glui )
+ {
+ glui->align_controls(this);
+ redraw_window();
+ }
+}
+
+
+/***** GLUI_Control::needs_idle() *********/
+/* This method gets overloaded by specific classes, e.g. Spinner. */
+/* It returns whether or not a control needs to receive an idle event or not */
+/* For example, a spinner only needs idle events when the user is holding */
+/* the mouse down in one of the arrows. Otherwise, don't waste cycles */
+/* and OpenGL context switching by calling its idle. */
+
+bool GLUI_Control::needs_idle() const
+{
+ return false;
+}
+
+
+/********* GLUI_Control::~GLUI_Control() **********/
+
+GLUI_Control::~GLUI_Control()
+{
+ GLUI_Control *item = (GLUI_Control*) this->first_child();
+
+ while (item)
+ {
+ GLUI_Control *tmp = item;
+ item = (GLUI_Control*) item->next();
+ delete tmp;
+ }
+}
+
+/********* GLUI_Control::hide_internal() ********/
+/** Sets hidden==true for this control and all its siblings. */
+/** If recurse is true, we go to children as well */
+
+void GLUI_Control::hide_internal( int recurse )
+{
+ GLUI_Node *node;
+
+ node = (GLUI_Node *) this;
+ while( node != NULL ) {
+ ((GLUI_Control*)node)->hidden = true;
+
+ if ( recurse AND node->first_child() != NULL )
+ ((GLUI_Control*) node->first_child())->hide_internal(true);
+
+ node = node->next();
+ }
+
+ node = this->collapsed_node.first_child();
+ while( node != NULL ) {
+ ((GLUI_Control*)node)->hidden = true;
+
+ if ( recurse AND node->first_child() != NULL )
+ ((GLUI_Control*) node->first_child())->hide_internal(true);
+
+ node = node->next();
+ }
+}
+
+
+/********* GLUI_Control::unhide_internal() ********/
+/** Sets hidden==false for this control and all its siblings. */
+/** If recurse is true, we go to children as well */
+
+void GLUI_Control::unhide_internal( int recurse )
+{
+ GLUI_Node *node;
+
+ node = (GLUI_Node *) this;
+ while( node != NULL ) {
+ /* printf( "unhide: %s [%d]\n", ((GLUI_Control*)node)->name.c_str(),
+ ((GLUI_Control*)node)->hidden );*/
+ ((GLUI_Control*)node)->hidden = false;
+
+ if ( recurse AND node->first_child() != NULL )
+ ((GLUI_Control*) node->first_child())->unhide_internal(true);
+
+ node = node->next();
+ }
+
+ node = this->collapsed_node.first_child();
+ while( node != NULL ) {
+ ((GLUI_Control*)node)->hidden = false;
+
+ if ( recurse AND node->first_child() != NULL )
+ ((GLUI_Control*) node->first_child())->unhide_internal(true);
+
+ node = node->next();
+ }
+}
diff --git a/tests/bullet/Extras/glui/glui_edittext.cpp b/tests/bullet/Extras/glui/glui_edittext.cpp
new file mode 100644
index 00000000..1241033e
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_edittext.cpp
@@ -0,0 +1,1198 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_edittext.cpp - GLUI_EditText control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+#include <cassert>
+
+/****************************** GLUI_EditText::GLUI_EditText() **********/
+
+GLUI_EditText::GLUI_EditText( GLUI_Node *parent, const char *name,
+ int data_type, void *live_var,
+ int id, GLUI_CB callback )
+{
+ if (data_type == GLUI_EDITTEXT_TEXT) {
+ live_type = GLUI_LIVE_TEXT;
+ }
+ else if (data_type == GLUI_EDITTEXT_STRING) {
+ data_type = GLUI_EDITTEXT_TEXT; // EDITTEXT_STRING doesn't really exist.
+ // Except as a signal to make a string.
+ // It's a backwards-compat hack.
+ live_type = GLUI_LIVE_STRING;
+ }
+ else if (data_type == GLUI_EDITTEXT_INT) {
+ live_type = GLUI_LIVE_INT;
+ }
+ else if (data_type == GLUI_EDITTEXT_FLOAT) {
+ live_type = GLUI_LIVE_FLOAT;
+ }
+ common_construct( parent, name, data_type, live_type, live_var, id, callback );
+}
+
+/****************************** GLUI_EditText::GLUI_EditText() **********/
+
+GLUI_EditText::GLUI_EditText( GLUI_Node *parent, const char *name,
+ int text_type, int id, GLUI_CB callback )
+{
+ common_construct( parent, name, text_type, GLUI_LIVE_NONE, 0, id, callback);
+}
+
+/****************************** GLUI_EditText::GLUI_EditText() **********/
+
+GLUI_EditText::GLUI_EditText( GLUI_Node *parent, const char *name,
+ int *live_var,
+ int id, GLUI_CB callback )
+{
+ common_construct( parent, name, GLUI_EDITTEXT_INT, GLUI_LIVE_INT, live_var, id, callback);
+}
+
+/****************************** GLUI_EditText::GLUI_EditText() **********/
+
+GLUI_EditText::GLUI_EditText( GLUI_Node *parent, const char *name,
+ float *live_var,
+ int id, GLUI_CB callback )
+{
+ common_construct( parent, name, GLUI_EDITTEXT_FLOAT, GLUI_LIVE_FLOAT, live_var, id, callback);
+}
+
+/****************************** GLUI_EditText::GLUI_EditText() **********/
+
+GLUI_EditText::GLUI_EditText( GLUI_Node *parent, const char *name,
+ char *live_var,
+ int id, GLUI_CB callback )
+{
+ common_construct( parent, name, GLUI_EDITTEXT_TEXT, GLUI_LIVE_TEXT, live_var, id, callback);
+}
+
+/****************************** GLUI_EditText::GLUI_EditText() **********/
+
+GLUI_EditText::GLUI_EditText( GLUI_Node *parent, const char *name,
+ std::string &live_var,
+ int id, GLUI_CB callback )
+{
+ common_construct( parent, name, GLUI_EDITTEXT_TEXT, GLUI_LIVE_STRING, &live_var, id, callback);
+}
+
+/****************************** GLUI_EditText::common_construct() **********/
+
+void GLUI_EditText::common_construct( GLUI_Node *parent, const char *name,
+ int data_t, int live_t, void *data, int id,
+ GLUI_CB cb )
+{
+ common_init();
+ set_name( name );
+
+ live_type = live_t;
+ data_type = data_t;
+ ptr_val = data;
+ user_id = id;
+ callback = cb;
+
+
+ if ( live_type == GLUI_LIVE_INT) {
+ if ( data == NULL )
+ set_int_val(int_val); /** Set to some default, in case of no live var **/
+ }
+ else if ( live_type == GLUI_LIVE_FLOAT ) {
+ num_periods = 1;
+ if ( data == NULL )
+ set_float_val(float_val); /** Set to some default, in case of no live var **/
+ }
+
+ parent->add_control( this );
+
+ init_live();
+}
+
+/****************************** GLUI_EditText::mouse_down_handler() **********/
+
+int GLUI_EditText::mouse_down_handler( int local_x, int local_y )
+{
+ int tmp_insertion_pt;
+
+ if ( debug ) dump( stdout, "-> MOUSE DOWN" );
+
+ tmp_insertion_pt = find_insertion_pt( local_x, local_y );
+ if ( tmp_insertion_pt == -1 ) {
+ if ( glui )
+ glui->deactivate_current_control( );
+ return false;
+ }
+
+ insertion_pt = tmp_insertion_pt;
+
+ sel_start = sel_end = insertion_pt;
+
+ if ( can_draw())
+ update_and_draw_text();
+
+ if ( debug ) dump( stdout, "<- MOUSE UP" );
+
+ return true;
+}
+
+
+/******************************** GLUI_EditText::mouse_up_handler() **********/
+
+int GLUI_EditText::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ return false;
+}
+
+
+/***************************** GLUI_EditText::mouse_held_down_handler() ******/
+
+int GLUI_EditText::mouse_held_down_handler( int local_x, int local_y,
+ bool new_inside)
+{
+ int tmp_pt;
+
+ if ( NOT new_inside )
+ return false;
+
+ if ( debug ) dump( stdout, "-> HELD DOWN" );
+
+ tmp_pt = find_insertion_pt( local_x, local_y );
+
+ if ( tmp_pt == -1 AND sel_end != 0 ) { /* moved mouse past left edge */
+ special_handler( GLUT_KEY_LEFT, GLUT_ACTIVE_SHIFT );
+ }
+ else if ( tmp_pt == substring_end+1 AND sel_end != (int) text.length()) {
+ /* moved mouse past right edge */
+ special_handler( GLUT_KEY_RIGHT, GLUT_ACTIVE_SHIFT );
+ }
+ else if ( tmp_pt != -1 AND tmp_pt != sel_end ) {
+ sel_end = insertion_pt = tmp_pt;
+
+ update_and_draw_text();
+ }
+
+ if ( debug )
+ dump( stdout, "<- HELD DOWN" );
+
+ return false;
+}
+
+
+/****************************** GLUI_EditText::key_handler() **********/
+
+int GLUI_EditText::key_handler( unsigned char key,int modifiers )
+{
+ int i, regular_key;
+ /* int has_selection; */
+
+ if ( NOT glui )
+ return false;
+
+ if ( debug )
+ dump( stdout, "-> KEY HANDLER" );
+
+ regular_key = false;
+ bool ctrl_down = (modifiers & GLUT_ACTIVE_CTRL)!=0;
+ /* has_selection = (sel_start != sel_end); */
+
+ if ( key == CTRL('m') ) { /* RETURN */
+ /* glui->deactivate_current_control(); */
+ deactivate(); /** Force callbacks, etc **/
+ activate(GLUI_ACTIVATE_TAB); /** Reselect all text **/
+ redraw();
+ return true;
+ }
+ else if ( key == CTRL('[')) { /* ESCAPE */
+ glui->deactivate_current_control();
+ return true;
+ }
+ else if ( (key == 127 AND !ctrl_down) OR /* FORWARD DELETE */
+ ( key == CTRL('d') AND modifiers == GLUT_ACTIVE_CTRL) )
+ {
+ if ( sel_start == sel_end ) { /* no selection */
+ if ( insertion_pt < (int)text.length() ) {
+ /*** See if we're deleting a period in a float data-type box ***/
+ if ( data_type == GLUI_EDITTEXT_FLOAT AND text[insertion_pt]=='.' )
+ num_periods--;
+
+ /*** Shift over string first ***/
+ text.erase(insertion_pt,1);
+ }
+ }
+ else { /* There is a selection */
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+ }
+ else if ( ((key == 127) AND ctrl_down) OR // Delete word forward
+ ((key == 'd') AND (modifiers == GLUT_ACTIVE_ALT)) )
+ {
+ if ( sel_start == sel_end ) { /* no selection */
+ sel_start = insertion_pt;
+ sel_end = find_word_break( insertion_pt, +1 );
+ }
+
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+ else if ( key == CTRL('h') ) { /* BACKSPACE */
+ if ( sel_start == sel_end ) { /* no selection */
+ if ( insertion_pt > 0 ) {
+ /*** See if we're deleting a period in a float data-type box ***/
+ if ( data_type == GLUI_EDITTEXT_FLOAT AND text[insertion_pt-1]=='.' )
+ num_periods--;
+
+ /*** Shift over string first ***/
+ insertion_pt--;
+ text.erase(insertion_pt,1);
+ }
+ }
+ else { /* There is a selection */
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+ }
+ else if ( modifiers == GLUT_ACTIVE_CTRL ) /* CTRL ONLY */
+ {
+ /* Ctrl-key bindings */
+ if ( key == CTRL('a') ) {
+ return special_handler( GLUT_KEY_HOME, 0 );
+ }
+ else if ( key == CTRL('e') ) {
+ return special_handler( GLUT_KEY_END, 0 );
+ }
+ else if ( key == CTRL('b') ) {
+ return special_handler( GLUT_KEY_LEFT, 0 );
+ }
+ else if ( key == CTRL('f') ) {
+ return special_handler( GLUT_KEY_RIGHT, 0 );
+ }
+ else if ( key == CTRL('p') ) {
+ return special_handler( GLUT_KEY_UP, 0 );
+ }
+ else if ( key == CTRL('n') ) {
+ return special_handler( GLUT_KEY_DOWN, 0 );
+ }
+ else if ( key == CTRL('u') ) { /* ERASE LINE */
+ insertion_pt = 0;
+ text.erase(0,text.length());
+ sel_start = sel_end = 0;
+ }
+ else if ( key == CTRL('k') ) { /* KILL TO END OF LINE */
+ sel_start = sel_end = insertion_pt;
+ text.erase(insertion_pt,GLUI_String::npos);
+ }
+ }
+ else if ( modifiers == GLUT_ACTIVE_ALT ) /* ALT ONLY */
+ {
+ if ( key == 'b' ) { // Backward word
+ return special_handler ( GLUT_KEY_LEFT, GLUT_ACTIVE_CTRL );
+ }
+ if ( key == 'f' ) { // Forward word
+ return special_handler ( GLUT_KEY_RIGHT, GLUT_ACTIVE_CTRL );
+ }
+ }
+ else if ( (modifiers & GLUT_ACTIVE_CTRL) OR
+ (modifiers & GLUT_ACTIVE_ALT) )
+ {
+ /** ignore other keys with modifiers */
+ return true;
+ }
+ else { /* Regular key */
+ regular_key = true;
+
+ /** Check if we only accept numbers **/
+ if (data_type == GLUI_EDITTEXT_FLOAT ) {
+ if ( (key < '0' OR key > '9') AND key != '.' AND key != '-' )
+ return true;
+
+ if ( key == '-' ) { /* User typed a '-' */
+
+ /* If user has first character selected, then '-' is allowed */
+ if ( NOT ( MIN(sel_start,sel_end) == 0 AND
+ MAX(sel_start,sel_end) > 0 ) ) {
+
+ /* User does not have 1st char selected */
+ if (insertion_pt != 0 OR text[0] == '-' ) {
+ return true; /* Can only place negative at beginning of text,
+ and only one of them */
+ }
+ }
+ }
+
+ if ( key == '.' ) {
+ /*printf( "PERIOD: %d\n", num_periods ); */
+
+ if ( num_periods > 0 ) {
+ /** We're trying to type a period, but the text already contains
+ a period. Check whether the period is contained within
+ is current selection (thus it will be safely replaced) **/
+
+ int period_found = false;
+ if ( sel_start != sel_end ) {
+ for( i=MIN(sel_end,sel_start); i<MAX(sel_start,sel_end); i++ ) {
+ /* printf( "%c ", text[i] ); */
+ if ( text[i] == '.' ) {
+ period_found = true;
+ break;
+ }
+ }
+ }
+
+ /* printf( "found: %d num: %d\n", period_found, num_periods ); */
+
+ if ( NOT period_found )
+ return true;
+ }
+ }
+ }
+ else if (data_type == GLUI_EDITTEXT_INT)
+ {
+ if ( (key < '0' OR key > '9') AND key != '-' )
+ return true;
+
+ if ( key == '-' ) { /* User typed a '-' */
+
+ /* If user has first character selected, then '-' is allowed */
+ if ( NOT ( MIN(sel_start,sel_end) == 0 AND
+ MAX(sel_start,sel_end) > 0 ) ) {
+
+ /* User does not have 1st char selected */
+ if (insertion_pt != 0 OR text[0] == '-' ) {
+ return true; /* Can only place negative at beginning of text,
+ and only one of them */
+ }
+ }
+ }
+ }
+
+ /** This is just to get rid of warnings - the flag regular_key is
+ set if the key was not a backspace, return, whatever. But I
+ believe if we're here, we know it was a regular key anyway */
+ if ( regular_key ) {
+ }
+
+ /**** If there's a current selection, erase it ******/
+ if ( sel_start != sel_end ) {
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+
+ /******** We insert the character into the string ***/
+
+ text.insert(insertion_pt,1,key);
+
+ /******** Move the insertion point and substring_end one over ******/
+ insertion_pt++;
+ substring_end++;
+
+ sel_start = sel_end = insertion_pt;
+ }
+
+ /******** Now redraw text ***********/
+ /* Hack to prevent text box from being cleared first **/
+ /** int substring_change = update_substring_bounds();
+ draw_text_only =
+ (NOT substring_change AND NOT has_selection AND regular_key );
+ */
+
+ draw_text_only = false; /** Well, hack is not yet working **/
+ update_and_draw_text();
+ draw_text_only = false;
+
+
+ if ( debug )
+ dump( stdout, "<- KEY HANDLER" );
+
+ /*** Now look to see if this string has a period ***/
+ num_periods = 0;
+ for( i=0; i<(int)text.length(); i++ )
+ if ( text[i] == '.' )
+ num_periods++;
+
+ return true;
+}
+
+
+/****************************** GLUI_EditText::activate() **********/
+
+void GLUI_EditText::activate( int how )
+{
+ if ( debug )
+ dump( stdout, "-> ACTIVATE" );
+
+ active = true;
+
+ if ( how == GLUI_ACTIVATE_MOUSE )
+ return; /* Don't select everything if activated with mouse */
+
+ orig_text = text;
+
+ sel_start = 0;
+ sel_end = (int)text.length();
+ insertion_pt = 0;
+
+ if ( debug )
+ dump( stdout, "<- ACTIVATE" );
+}
+
+
+/****************************** GLUI_EditText::deactivate() **********/
+
+void GLUI_EditText::deactivate( void )
+{
+ int new_int_val;
+ float new_float_val;
+
+ active = false;
+
+ if ( NOT glui )
+ return;
+
+ if ( debug )
+ dump( stdout, "-> DISACTIVATE" );
+
+ sel_start = sel_end = insertion_pt = -1;
+
+ /***** Retrieve the current value from the text *****/
+ /***** The live variable will be updated by set_text() ****/
+ if ( data_type == GLUI_EDITTEXT_FLOAT ) {
+ if ( text.length() == 0 ) /* zero-length string - make it "0.0" */
+ text = "0.0";
+
+ new_float_val = atof( text.c_str() );
+
+ set_float_val( new_float_val );
+ }
+ else if ( data_type == GLUI_EDITTEXT_INT ) {
+ if ( text.length() == 0 ) /* zero-length string - make it "0" */
+ text = "0";
+
+ new_int_val = atoi( text.c_str() );
+
+ set_int_val( new_int_val );
+ }
+ else
+ if ( data_type == GLUI_EDITTEXT_TEXT ) {
+ set_text(text); /* This will force callbacks and gfx refresh */
+ }
+
+ update_substring_bounds();
+
+ /******** redraw text without insertion point ***********/
+ redraw();
+
+ /***** Now do callbacks if value changed ******/
+ if ( orig_text != text ) {
+ this->execute_callback();
+
+ if ( 0 ) {
+ /* THE CODE BELOW IS FROM WHEN SPINNER ALSO MAINTAINED CALLBACKS */
+ if ( spinner == NULL ) { /** Are we independent of a spinner? **/
+ if ( callback ) {
+ callback( this );
+ }
+ }
+ else { /* We're attached to a spinner */
+ spinner->do_callbacks(); /* Let the spinner do the callback stuff */
+ }
+ }
+ }
+
+ if ( debug )
+ dump( stdout, "<- DISACTIVATE" );
+}
+
+/****************************** GLUI_EditText::draw() **********/
+
+void GLUI_EditText::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int name_x;
+
+ name_x = MAX(text_x_offset - string_width(this->name) - 3,0);
+ draw_name( name_x , 13);
+
+ glBegin( GL_LINES );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( text_x_offset, 0 ); glVertex2i( w, 0 );
+ glVertex2i( text_x_offset, 0 ); glVertex2i( text_x_offset, h );
+
+ glColor3f( 1., 1., 1. );
+ glVertex2i( text_x_offset, h ); glVertex2i( w, h );
+ glVertex2i( w, h ); glVertex2i( w, 0 );
+
+ if ( enabled )
+ glColor3f( 0., 0., 0. );
+ else
+ glColor3f( .25, .25, .25 );
+ glVertex2i( text_x_offset+1, 1 ); glVertex2i( w-1, 1 );
+ glVertex2i( text_x_offset+1, 1 ); glVertex2i( text_x_offset+1, h-1 );
+
+ glColor3f( .75, .75, .75 );
+ glVertex2i( text_x_offset+1, h-1 ); glVertex2i( w-1, h-1 );
+ glVertex2i( w-1, h-1 ); glVertex2i( w-1, 1 );
+ glEnd();
+
+ /** Find where to draw the text **/
+ update_substring_bounds();
+ draw_text(0,0);
+
+ draw_insertion_pt();
+}
+
+
+
+/************************** GLUI_EditText::update_substring_bounds() *********/
+
+int GLUI_EditText::update_substring_bounds( void )
+{
+ int box_width;
+ int text_len = (int)text.length();
+ int old_start, old_end;
+
+ old_start = substring_start;
+ old_end = substring_end;
+
+ /*** Calculate the width of the usable area of the edit box ***/
+ box_width = MAX( this->w - this->text_x_offset
+ - 4 /* 2 * the two-line box border */
+ - 2 * GLUI_EDITTEXT_BOXINNERMARGINX, 0 );
+
+ CLAMP( substring_end, 0, MAX(text_len-1,0) );
+ CLAMP( substring_start, 0, MAX(text_len-1,0) );
+
+ if ( debug ) dump( stdout, "-> UPDATE SS" );
+
+ if ( insertion_pt >= 0 AND
+ insertion_pt < substring_start ) { /* cursor moved left */
+ substring_start = insertion_pt;
+
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_end--;
+ }
+ else if ( insertion_pt > substring_end ) { /* cursor moved right */
+ substring_end = insertion_pt-1;
+
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_start++;
+ }
+ else { /* cursor is within old substring bounds */
+ if ( last_insertion_pt > insertion_pt ) { /* cursor moved left */
+ }
+ else {
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_end--;
+
+ while(substring_end < text_len-1
+ AND substring_width( substring_start, substring_end ) <= box_width)
+ substring_end++;
+ }
+ }
+
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_end--;
+
+ last_insertion_pt = insertion_pt;
+
+ /*** No selection if not enabled ***/
+ if ( NOT enabled ) {
+ sel_start = sel_end = 0;
+ }
+
+ if ( debug ) dump( stdout, "<- UPDATE SS" );
+
+ if ( substring_start == old_start AND substring_end == old_end )
+ return false; /*** bounds did not change ***/
+ else
+ return true; /*** bounds did change ***/
+}
+
+
+/********************************* GLUI_EditText::update_x_offsets() *********/
+
+void GLUI_EditText::update_x_offsets( void )
+{
+}
+
+
+/********************************* GLUI_EditText::draw_text() ****************/
+
+void GLUI_EditText::draw_text( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int text_x, i, sel_lo, sel_hi;
+
+ if ( debug ) dump( stdout, "-> DRAW_TEXT" );
+
+ if ( NOT draw_text_only ) {
+ if ( enabled )
+ glColor3f( 1., 1., 1. );
+ else
+ set_to_bkgd_color();
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( text_x_offset+2, 2 ); glVertex2i( w-2, 2 );
+ glVertex2i( w-2, h-2 ); glVertex2i( text_x_offset+2, h-2 );
+ glEnd();
+ }
+
+ /** Find where to draw the text **/
+
+ text_x = text_x_offset + 2 + GLUI_EDITTEXT_BOXINNERMARGINX;
+
+ /*printf( "text_x: %d substr_width: %d start/end: %d/%d\n",
+ text_x, substring_width( substring_start, substring_end ),
+ substring_start, substring_end );
+ */
+ /** Find lower and upper selection bounds **/
+ sel_lo = MIN(sel_start, sel_end );
+ sel_hi = MAX(sel_start, sel_end );
+
+ int sel_x_start, sel_x_end, delta;
+
+ /** Draw selection area dark **/
+ if ( sel_start != sel_end ) {
+ sel_x_start = text_x;
+ sel_x_end = text_x;
+ for( i=substring_start; i<=substring_end; i++ ) {
+ delta = char_width( text[i] );
+
+ if ( i < sel_lo ) {
+ sel_x_start += delta;
+ sel_x_end += delta;
+ }
+ else if ( i < sel_hi ) {
+ sel_x_end += delta;
+ }
+ }
+
+ glColor3f( 0.0f, 0.0f, .6f );
+ glBegin( GL_QUADS );
+ glVertex2i( sel_x_start, 2 ); glVertex2i( sel_x_end, 2 );
+ glVertex2i( sel_x_end, h-2 ); glVertex2i( sel_x_start, h-2 );
+ glEnd();
+ }
+
+
+ if ( sel_start == sel_end ) { /* No current selection */
+ if ( enabled )
+ glColor3b( 0, 0, 0 );
+ else
+ glColor3b( 32, 32, 32 );
+
+ glRasterPos2i( text_x, 13);
+ for( i=substring_start; i<=substring_end; i++ ) {
+ glutBitmapCharacter( get_font(), this->text[i] );
+ }
+ }
+ else { /* There is a selection */
+ int x = text_x;
+ for( i=substring_start; i<=substring_end; i++ ) {
+ if ( IN_BOUNDS( i, sel_lo, sel_hi-1)) { /* This character is selected */
+ glColor3f( 1., 1., 1. );
+ glRasterPos2i( x, 13);
+ glutBitmapCharacter( get_font(), this->text[i] );
+ }
+ else {
+ glColor3f( 0., 0., 0. );
+ glRasterPos2i( x, 13);
+ glutBitmapCharacter( get_font(), this->text[i] );
+ }
+
+ x += char_width( text[i] );
+ }
+ }
+
+ if ( debug ) dump( stdout, "<- DRAW_TEXT" );
+}
+
+
+/******************************** GLUI_EditText::find_insertion_pt() *********/
+/* This function returns the character numer *before which* the insertion */
+/* point goes */
+
+int GLUI_EditText::find_insertion_pt( int x, int y )
+{
+ int curr_x, i;
+
+ /*** See if we clicked outside box ***/
+ if ( x < this->x_abs + text_x_offset )
+ return -1;
+
+ /* We move from right to left, looking to see if the mouse was clicked
+ to the right of the ith character */
+
+ curr_x = this->x_abs + text_x_offset
+ + substring_width( substring_start, substring_end )
+ + 2 /* The edittext box has a 2-pixel margin */
+ + GLUI_EDITTEXT_BOXINNERMARGINX; /** plus this many pixels blank space
+ between the text and the box **/
+
+ /*** See if we clicked in an empty box ***/
+ if ( (int) text.length() == 0 )
+ return 0;
+
+ /** find mouse click in text **/
+ for( i=substring_end; i>=substring_start; i-- ) {
+ curr_x -= char_width( text[i] );
+
+ if ( x > curr_x ) {
+ /* printf( "-> %d\n", i ); */
+
+ return i+1;
+ }
+ }
+
+ return 0;
+
+ /* Well, the mouse wasn't after any of the characters...see if it's
+ before the beginning of the substring */
+ if ( 0 ) {
+ if ( x > (x_abs + text_x_offset + 2 ) )
+ return substring_start;
+
+ return -1; /* Nothing found */
+ }
+}
+
+
+/******************************** GLUI_EditText::draw_insertion_pt() *********/
+
+void GLUI_EditText::draw_insertion_pt( void )
+{
+ int curr_x, i;
+
+ if ( NOT can_draw() )
+ return;
+
+ /*** Don't draw insertion pt if control is disabled ***/
+ if ( NOT enabled )
+ return;
+
+ if ( debug ) dump( stdout, "-> DRAW_INS_PT" );
+
+ if ( sel_start != sel_end OR insertion_pt < 0 ) {
+ return; /* Don't draw insertion point if there is a current selection */
+ }
+
+ /* printf( "insertion pt: %d\n", insertion_pt ); */
+
+ curr_x = this->x_abs + text_x_offset
+ + substring_width( substring_start, substring_end )
+ + 2 /* The edittext box has a 2-pixel margin */
+ + GLUI_EDITTEXT_BOXINNERMARGINX; /** plus this many pixels blank space
+ between the text and the box **/
+
+ for( i=substring_end; i>=insertion_pt; i-- ) {
+ curr_x -= char_width( text[i] );
+ }
+
+ glColor3f( 0.0, 0.0, 0.0 );
+ glBegin( GL_LINE_LOOP );
+ /***
+ glVertex2i( curr_x, y_abs + 4 );
+ glVertex2i( curr_x, y_abs + 4 );
+ glVertex2i( curr_x, y_abs + h - 3 );
+ glVertex2i( curr_x, y_abs + h - 3 );
+ ***/
+ curr_x -= x_abs;
+ glVertex2i( curr_x, 0 + 4 );
+ glVertex2i( curr_x, 0 + 4 );
+ glVertex2i( curr_x, 0 + h - 3 );
+ glVertex2i( curr_x, 0 + h - 3 );
+ glEnd();
+
+ if ( debug ) dump( stdout, "-> DRAW_INS_PT" );
+}
+
+
+
+/******************************** GLUI_EditText::substring_width() *********/
+
+int GLUI_EditText::substring_width( int start, int end )
+{
+ int i, width;
+
+ width = 0;
+
+ for( i=start; i<=end; i++ )
+ width += char_width( text[i] );
+
+ return width;
+}
+
+
+/***************************** GLUI_EditText::update_and_draw_text() ********/
+
+void GLUI_EditText::update_and_draw_text( void )
+{
+ if ( NOT can_draw() )
+ return;
+
+ update_substring_bounds();
+ /* printf( "ss: %d/%d\n", substring_start, substring_end ); */
+
+ redraw();
+}
+
+
+/********************************* GLUI_EditText::special_handler() **********/
+
+int GLUI_EditText::special_handler( int key,int modifiers )
+{
+ if ( NOT glui )
+ return false;
+
+ if ( debug )
+ printf( "SPECIAL:%d - mod:%d subs:%d/%d ins:%d sel:%d/%d\n",
+ key, modifiers, substring_start, substring_end,insertion_pt,
+ sel_start, sel_end );
+
+ if ( key == GLUT_KEY_LEFT ) {
+ if ( (modifiers & GLUT_ACTIVE_CTRL) != 0 ) {
+ insertion_pt = find_word_break( insertion_pt, -1 );
+ }
+ else {
+ insertion_pt--;
+ }
+ }
+ else if ( key == GLUT_KEY_RIGHT ) {
+ if ( (modifiers & GLUT_ACTIVE_CTRL) != 0 ) {
+ insertion_pt = find_word_break( insertion_pt, +1 );
+ }
+ else {
+ insertion_pt++;
+ }
+ }
+ else if ( key == GLUT_KEY_HOME ) {
+ insertion_pt = 0;
+ }
+ else if ( key == GLUT_KEY_END ) {
+ insertion_pt = (int) text.length();
+ }
+
+ /*** Update selection if shift key is down ***/
+ if ( (modifiers & GLUT_ACTIVE_SHIFT ) != 0 )
+ sel_end = insertion_pt;
+ else
+ sel_start = sel_end = insertion_pt;
+
+
+ CLAMP( insertion_pt, 0, (int) text.length()); /* Make sure insertion_pt
+ is in bounds */
+ CLAMP( sel_start, 0, (int) text.length()); /* Make sure insertion_pt
+ is in bounds */
+ CLAMP( sel_end, 0, (int) text.length()); /* Make sure insertion_pt
+ is in bounds */
+
+ /******** Now redraw text ***********/
+ if ( can_draw())
+ update_and_draw_text();
+
+ return true;
+}
+
+
+/****************************** GLUI_EditText::find_word_break() **********/
+/* It looks either left or right (depending on value of 'direction' */
+/* for the beginning of the next 'word', where word are characters */
+/* separated by one of the following tokens: " :-.," */
+/* If there is no next word in the specified direction, this returns */
+/* the beginning of 'text', or the very end. */
+
+int GLUI_EditText::find_word_break( int start, int direction )
+{
+ int i, j;
+ char *breaks = " :-.,";
+ int num_break_chars = (int)strlen(breaks), text_len = (int)text.length();
+ int new_pt;
+
+ /** If we're moving left, we have to start two back, in case we're either
+ already at the beginning of a word, or on a separating token.
+ Otherwise, this function would just return the word we're already at **/
+ if ( direction == -1 ) {
+ start -= 2;
+ }
+
+ /***** Iterate over text in the specified direction *****/
+ for ( i=start; i >= 0 AND i < text_len; i += direction ) {
+
+ /** For each character in text, iterate over list of separating tokens **/
+ for( j=0; j<num_break_chars; j++ ) {
+ if ( text[i] == breaks[j] ) {
+
+ /** character 'i' is a separating token, so we return i+1 **/
+ new_pt = i + 1;
+
+ CLAMP( new_pt, 0, text_len );
+
+ return new_pt;
+ }
+ }
+ }
+
+ if ( direction > 0 ) /* Return the end of string */
+ return text_len;
+ else /* Return the beginning of the text */
+ return 0;
+}
+
+
+/********************************** GLUI_EditText::clear_substring() ********/
+
+void GLUI_EditText::clear_substring( int start, int end )
+{
+ int i;
+
+ /*
+ printf( "clearing: %d-%d '", start,end);
+ for(i=start;i<end;i++ )
+ putchar(text[i]);
+ printf( "'\n" ); flushout;
+ */
+ /*** See if we're deleting a period in a float data-type box ***/
+ if ( data_type == GLUI_EDITTEXT_FLOAT ) {
+ for( i=start; i<end; i++ )
+ if ( text[i] == '.' )
+ num_periods = 0;
+ }
+
+ text.erase(start,end-start);
+}
+
+
+
+/************************************ GLUI_EditText::update_size() **********/
+
+void GLUI_EditText::update_size( void )
+{
+ int text_size, delta;
+
+ if ( NOT glui )
+ return;
+
+ text_size = string_width( name );
+
+ delta = 0;
+ if ( text_x_offset < text_size +2 )
+ delta = text_size+2-text_x_offset;
+
+ text_x_offset += delta;
+ /* w += delta; */
+
+ if ( data_type == GLUI_EDITTEXT_TEXT OR
+ data_type == GLUI_EDITTEXT_FLOAT) {
+ if ( w < text_x_offset + GLUI_EDITTEXT_MIN_TEXT_WIDTH )
+ w = text_x_offset + GLUI_EDITTEXT_MIN_TEXT_WIDTH;
+ }
+ else if ( data_type == GLUI_EDITTEXT_INT ) {
+ if ( w < text_x_offset + GLUI_EDITTEXT_MIN_INT_WIDTH )
+ w = text_x_offset + GLUI_EDITTEXT_MIN_INT_WIDTH;
+ }
+}
+
+
+/****************************** GLUI_EditText::set_text() **********/
+
+void GLUI_EditText::set_text( const char *new_text )
+{
+ text=new_text;
+ substring_start = 0;
+ substring_end = (int) text.length() - 1;
+ insertion_pt = -1;
+ sel_start = 0;
+ sel_end = 0;
+
+ if ( can_draw() )
+ update_and_draw_text();
+
+ /** Update the spinner, if we have one **/
+ if ( spinner ) {
+ spinner->float_val = this->float_val;
+ spinner->int_val = this->int_val;
+ }
+
+ /*** Now update the live variable ***/
+ output_live(true);
+}
+
+
+/******************************* GLUI_EditText::set_float_val() ************/
+
+void GLUI_EditText::set_float_val( float new_val )
+{
+ if ( has_limits == GLUI_LIMIT_CLAMP ) {
+ /*** Clamp the new value to the existing limits ***/
+
+ CLAMP( new_val, float_low, float_high );
+ }
+ else if ( has_limits == GLUI_LIMIT_WRAP ) {
+ /*** Clamp the value cyclically to the limits - that is, if the
+ value exceeds the max, set it the the minimum, and conversely ***/
+
+ if ( new_val < float_low )
+ new_val = float_high;
+ if ( new_val > float_high )
+ new_val = float_low;
+ }
+
+ float_val = new_val;
+ int_val = (int) new_val; /* Mirror the value as an int, too */
+
+ set_numeric_text();
+}
+
+
+/********************************** GLUI_EditText::set_int_val() ************/
+
+void GLUI_EditText::set_int_val( int new_val )
+{
+ if ( has_limits == GLUI_LIMIT_CLAMP ) {
+ /*** Clamp the new value to the existing limits ***/
+
+ CLAMP( new_val, int_low, int_high );
+ }
+ else if ( has_limits == GLUI_LIMIT_WRAP ) {
+ /*** Clamp the value cyclically to the limits - that is, if the
+ value exceeds the max, set it the the minimum, and conversely ***/
+
+ if ( new_val < int_low )
+ new_val = int_high;
+ if ( new_val > int_high )
+ new_val = int_low;
+ }
+
+ int_val = new_val;
+ float_val = (float) new_val; /* We mirror the value as a float, too */
+
+ set_numeric_text();
+}
+
+
+/********************************* GLUI_EditText::set_float_limits() *********/
+
+void GLUI_EditText::set_float_limits( float low, float high, int limit_type )
+{
+ has_limits = limit_type;
+ float_low = low;
+ float_high = high;
+
+ if ( NOT IN_BOUNDS( float_val, float_low, float_high ))
+ set_float_val( float_low );
+
+ int_low = (int) float_low;
+ int_high = (int) float_high;
+}
+
+
+/*********************************** GLUI_EditText::set_int_limits() *********/
+
+void GLUI_EditText::set_int_limits( int low, int high, int limit_type )
+{
+ has_limits = limit_type;
+ int_low = low;
+ int_high = high;
+
+ if ( NOT IN_BOUNDS( int_val, int_low, int_high ))
+ set_int_val( int_low );
+
+ float_low = (float) int_low;
+ float_high = (float) int_high;
+}
+
+
+/************************************ GLUI_EditText::set_numeric_text() ******/
+
+void GLUI_EditText::set_numeric_text( void )
+{
+ char buf_num[200];
+ int i, text_len;
+
+ if ( data_type == GLUI_EDITTEXT_FLOAT ) {
+ sprintf( buf_num, "%#g", float_val );
+
+ num_periods = 0;
+ text_len = (int) strlen(buf_num);
+ for ( i=0; i<text_len; i++ )
+ if ( buf_num[i] == '.' )
+ num_periods++;
+
+ /* Now remove trailing zeros */
+ if ( num_periods > 0 ) {
+ text_len = (int) strlen(buf_num);
+ for ( i=text_len-1; i>0; i-- ) {
+ if ( buf_num[i] == '0' AND buf_num[i-1] != '.' )
+ buf_num[i] = '\0';
+ else
+ break;
+ }
+ }
+ set_text( buf_num );
+ }
+ else {
+ sprintf( buf_num, "%d", int_val );
+ set_text( buf_num );
+ }
+
+}
+
+
+/*************************************** GLUI_EditText::dump() **************/
+
+void GLUI_EditText::dump( FILE *out, const char *name )
+{
+ fprintf( out,
+ "%s (edittext@%p): ins_pt:%d subs:%d/%d sel:%d/%d len:%d\n",
+ name, this,
+ insertion_pt,
+ substring_start,
+ substring_end,
+ sel_start,
+ sel_end,
+ (int) text.length());
+}
+
+
+/**************************************** GLUI_EditText::mouse_over() ********/
+
+int GLUI_EditText::mouse_over( int state, int x, int y )
+{
+ if ( state ) {
+ /* curr_cursor = GLUT_CURSOR_TEXT; */
+ glutSetCursor( GLUT_CURSOR_TEXT );
+ }
+ else {
+ /* printf( "OUT\n" ); */
+ glutSetCursor( GLUT_CURSOR_LEFT_ARROW );
+ }
+
+ return true;
+}
diff --git a/tests/bullet/Extras/glui/glui_filebrowser.cpp b/tests/bullet/Extras/glui/glui_filebrowser.cpp
new file mode 100644
index 00000000..81361cb6
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_filebrowser.cpp
@@ -0,0 +1,165 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_filebrowser.cpp - GLUI_FileBrowser control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ This program is freely distributable without licensing fees and is
+ provided without guarantee or warrantee expressed or implied. This
+ program is -not- in the public domain.
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include "glui_internal.h"
+#include <sys/types.h>
+
+#ifdef __GNUC__
+#include <dirent.h>
+#include <unistd.h>
+#endif
+
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#include <sys/stat.h>
+
+GLUI_FileBrowser::GLUI_FileBrowser( GLUI_Node *parent,
+ const char *name,
+ int type,
+ int id,
+ GLUI_CB cb)
+{
+ common_init();
+
+ set_name( name );
+ user_id = id;
+ int_val = type;
+ callback = cb;
+
+ parent->add_control( this );
+ list = new GLUI_List(this, true, 1);
+ list->set_object_callback( GLUI_FileBrowser::dir_list_callback, this );
+ list->set_click_type(GLUI_DOUBLE_CLICK);
+ this->fbreaddir(this->current_dir.c_str());
+}
+
+/****************************** GLUI_FileBrowser::draw() **********/
+
+void GLUI_FileBrowser::dir_list_callback(GLUI_Control *glui_object) {
+ GLUI_List *list = glui_object->dynamicCastGLUI_List();
+ if (!list)
+ return;
+ GLUI_FileBrowser* me = list->associated_object->dynamicCastGLUI_FileBrowser();
+ if (!me)
+ return;
+ int this_item;
+ const char *selected;
+ this_item = list->get_current_item();
+ if (this_item > 0) { /* file or directory selected */
+ selected = list->get_item_ptr( this_item )->text.c_str();
+ if (selected[0] == '/' || selected[0] == '\\') {
+ if (me->allow_change_dir) {
+#ifdef __GNUC__
+ chdir(selected+1);
+#endif
+#ifdef _WIN32
+ SetCurrentDirectory(selected+1);
+#endif
+ me->fbreaddir(".");
+ }
+ } else {
+ me->file = selected;
+ me->execute_callback();
+ }
+ }
+}
+
+
+
+void GLUI_FileBrowser::fbreaddir(const char *d) {
+ GLUI_String item;
+ int i = 0;
+
+ if (!d)
+ return;
+
+#ifdef _WIN32
+
+ WIN32_FIND_DATA FN;
+ HANDLE hFind;
+ //char search_arg[MAX_PATH], new_file_path[MAX_PATH];
+ //sprintf(search_arg, "%s\\*.*", path_name);
+
+ hFind = FindFirstFile("*.*", &FN);
+ if (list) {
+ list->delete_all();
+ if (hFind != INVALID_HANDLE_VALUE) {
+ do {
+ int len = int(strlen(FN.cFileName));
+ if (FN.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ item = '\\';
+ item += FN.cFileName;
+ } else {
+ item = FN.cFileName;
+ }
+ list->add_item(i,item.c_str());
+ i++;
+ } while (FindNextFile(hFind, &FN) != 0);
+
+ if (GetLastError() == ERROR_NO_MORE_FILES)
+ FindClose(&FN);
+ else
+ perror("fbreaddir");
+ }
+ }
+
+#elif defined(__GNUC__)
+
+ DIR *dir;
+ struct dirent *dirp;
+ struct stat dr;
+
+ if (list) {
+ list->delete_all();
+ if ((dir = opendir(d)) == NULL)
+ perror("fbreaddir:");
+ else {
+ while ((dirp = readdir(dir)) != NULL) /* open directory */
+ {
+ if (!lstat(dirp->d_name,&dr) && S_ISDIR(dr.st_mode)) /* dir is directory */
+ item = dirp->d_name + GLUI_String("/");
+ else
+ item = dirp->d_name;
+
+ list->add_item(i,item.c_str());
+ i++;
+ }
+ closedir(dir);
+ }
+ }
+#endif
+}
+
+void ProcessFiles(const char *path_name)
+{
+
+}
+
+
+void GLUI_FileBrowser::set_w(int w)
+{
+ if (list) list->set_w(w);
+}
+
+void GLUI_FileBrowser::set_h(int h)
+{
+ if (list) list->set_h(h);
+}
diff --git a/tests/bullet/Extras/glui/glui_internal.h b/tests/bullet/Extras/glui/glui_internal.h
new file mode 100644
index 00000000..147b65c2
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_internal.h
@@ -0,0 +1,107 @@
+#ifndef GLUI_INTERNAL_H
+#define GLUI_INTERNAL_H
+
+#include <cstdio>
+#include <cmath>
+
+
+
+#ifndef AND
+#define AND &&
+#define OR ||
+#define NOT !
+#endif
+
+#ifndef MAX
+#define MAX(a,b) ((a)>(b) ? (a) : (b))
+#define MIN(a,b) ((a)<(b) ? (a) : (b))
+#endif
+
+#ifndef ABS
+#define ABS(a) ((a)>=0 ? (a) : (-(a)))
+#endif
+
+/******************** bit comparisons and operations ***************/
+#ifndef TEST_BIT
+#define TEST_BIT( x, b ) (((x) & (1<<(b))) != 0 )
+#define SET_BIT( x, b ) ((x) |= (1 << (b)))
+#define CLEAR_BIT( x, b ) ((x) &= ~(1 << (b)))
+#define TOGGLE_BIT( x, b ) ((TEST_BIT(x,b)) ?(CLEAR_BIT(x,b)):(SET_BIT(x,b)))
+#endif
+
+#ifndef TEST_AND
+#define TEST_AND( a, b ) ((a&b)==b)
+#endif
+
+
+#ifndef M_PI
+#define M_PI 3.141592654
+#endif
+
+/*********** flush the stdout and stderr output streams *************/
+#ifndef flushout
+#define flushout fflush(stdout)
+#define flusherr fflush(stderr)
+#endif
+
+/********** Debugging functions *************************************/
+#ifndef error_return
+#define error_return( c ); {fprintf(stderr,c);return;}
+#endif
+
+/************************* floating-point random ********************/
+#ifndef randf
+#define randf() ((float) rand() / (float)RAND_MAX )
+#endif
+
+#ifndef SIGN
+#define SIGN(x) ((x)>=0 ? 1 : -1)
+#endif
+
+/****************** conversion between degrees and radians **********/
+#ifndef DEG2RAD
+#define DEG2RAD(x) ((x)/180.0*M_PI)
+#define RAD2DEG(x) ((x)/M_PI*180.0)
+#endif
+
+/***************** clamp a value to some fixed interval *************/
+#ifndef CLAMP
+#define CLAMP(x,lo,hi) {if ((x) < (lo)) {(x)=(lo);} else if((x) > (hi)) {(x)=(hi);}}
+#endif
+
+/************ check if a value lies within a closed interval *********/
+#ifndef IN_BOUNDS
+#define IN_BOUNDS( x, lo, hi ) ( (x) >= (lo) AND (x) <= (hi) )
+#endif
+
+/************ check if a 2D point lies within a 2D box ***************/
+#ifndef PT_IN_BOX
+#define PT_IN_BOX( x, y, lo_x, hi_x, lo_y, hi_y ) \
+( IN_BOUNDS(x,lo_x,hi_x) AND IN_BOUNDS(y,lo_y,hi_y) )
+#endif
+
+/****** check if value lies on proper side of another value *****/
+/*** if side is positive => proper side is positive, else negative **/
+#ifndef CHECK_PROPER_SIDE
+#define CHECK_PROPER_SIDE(x,val,side) ((side) > 0 ? (x) > (val) : (x) < (val))
+#endif
+
+
+/***** Small value when we want to do a comparison to 'close to zero' *****/
+#ifndef FUDGE
+#define FUDGE .00001
+#endif
+
+
+/******************* swap two values, using a temp variable *********/
+#ifndef SWAP2
+#define SWAP2(a,b,t) {t=a;a=b;b=t;}
+#endif
+
+#define VEC3_TO_ARRAY(v,a) a[0]=v[0], a[1]=v[1], a[2]=v[2]
+
+/**** Return the ASCII control code given the non-control ASCII character */
+#define CTRL(c) ( (c>=('a'-1)) ? (c-'a'+1) : (c-'A'+1) )
+
+
+#endif /* GLUI_INTERNAL_H */
diff --git a/tests/bullet/Extras/glui/glui_internal_control.h b/tests/bullet/Extras/glui/glui_internal_control.h
new file mode 100644
index 00000000..7e363aab
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_internal_control.h
@@ -0,0 +1,45 @@
+/*
+ Header file for use by GLUI controls.
+ Everything you need is right here.
+
+
+*/
+#ifndef __GLUI_INTERNAL_CONTROL_H
+#define __GLUI_INTERNAL_CONTROL_H
+
+/* This is the main GLUI external header */
+#include "GL/glui.h"
+
+/* Here's some utility routines */
+#include "glui_internal.h"
+
+
+/**
+ A GLUI_Control-drawing sentinal object.
+ On creation, saves the current draw buffer and window.
+ On destruction, restores draw buffer and window.
+ This is way nicer than calling save/restore manually.
+*/
+class GLUI_DrawingSentinal {
+ int orig_buf, orig_win;
+ GLUI_Control *c;
+public:
+ /** The constructor sets up the drawing system */
+ GLUI_DrawingSentinal(GLUI_Control *c_);
+ /** The destructor cleans up drawing back how it was */
+ ~GLUI_DrawingSentinal();
+
+ // Do-nothing routine to avoid compiler warning about unused variable
+ inline void avoid_warning(void) {}
+};
+/** Just drop a GLUI_DRAWINGSENTINAL_IDIOM at the start of your draw methods,
+and they'll return if we can't be drawn, and
+automatically save and restore all needed state.
+*/
+#define GLUI_DRAWINGSENTINAL_IDIOM if (NOT can_draw()) return; GLUI_DrawingSentinal drawSentinal(this); drawSentinal.avoid_warning();
+
+
+/** Return the time, in seconds. */
+inline double GLUI_Time(void) {return 0.001*glutGet(GLUT_ELAPSED_TIME);}
+
+#endif
diff --git a/tests/bullet/Extras/glui/glui_list.cpp b/tests/bullet/Extras/glui/glui_list.cpp
new file mode 100644
index 00000000..f0ffd475
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_list.cpp
@@ -0,0 +1,542 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_list.cpp - GLUI_List control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 2004 John Kew
+
+ This program is freely distributable without licensing fees and is
+ provided without guarantee or warrantee expressed or implied. This
+ program is -not- in the public domain.
+
+*****************************************************************************/
+
+
+
+#include "glui_internal_control.h"
+#include <cmath>
+#include <sys/timeb.h>
+
+/****************************** GLUI_List::GLUI_List() **********/
+
+GLUI_List::GLUI_List( GLUI_Node *parent, bool scroll,
+ int id, GLUI_CB callback
+ /*,GLUI_Control *object
+ GLUI_InterObject_CB obj_cb*/)
+{
+ common_construct(parent, NULL, scroll, id, callback/*, object, obj_cb*/);
+}
+
+/****************************** GLUI_List::GLUI_List() **********/
+
+GLUI_List::GLUI_List( GLUI_Node *parent,
+ GLUI_String& live_var, bool scroll,
+ int id,
+ GLUI_CB callback
+ /* ,GLUI_Control *object
+ ,GLUI_InterObject_CB obj_cb*/ )
+{
+ common_construct(parent, &live_var, scroll, id, callback/*, object, obj_cb*/);
+}
+
+/****************************** GLUI_List::common_construct() **********/
+
+void GLUI_List::common_construct(
+ GLUI_Node *parent,
+ GLUI_String* data, bool scroll,
+ int id,
+ GLUI_CB callback
+ /*,GLUI_Control *object
+ , GLUI_InterObject_CB obj_cb*/)
+{
+ common_init();
+ GLUI_Node *list_panel = parent;
+
+ if (scroll) {
+ GLUI_Panel *p = new GLUI_Panel(parent,"",GLUI_PANEL_NONE);
+ p->x_off = 1;
+ list_panel = p;
+ }
+ this->ptr_val = data;
+ if (data) {
+ this->live_type = GLUI_LIVE_STRING;
+ }
+ this->user_id = id;
+ this->callback = callback;
+ this->name = "list";
+ list_panel->add_control( this );
+ if (scroll)
+ {
+ new GLUI_Column(list_panel, false);
+ scrollbar =
+ new GLUI_Scrollbar(list_panel,
+ "scrollbar",
+ GLUI_SCROLL_VERTICAL,
+ GLUI_SCROLL_INT);
+ scrollbar->set_object_callback(GLUI_List::scrollbar_callback, this);
+ scrollbar->set_alignment(GLUI_ALIGN_LEFT);
+ // scrollbar->can_activate = false; //kills ability to mouse drag too
+ }
+ init_live();
+}
+
+/****************************** GLUI_List::mouse_down_handler() **********/
+int GLUI_List::mouse_down_handler( int local_x, int local_y )
+{
+ int tmp_line;
+ unsigned long int ms;
+ timeb time;
+ ftime(&time);
+ ms = time.millitm + (time.time)*1000;
+
+ tmp_line = find_line( local_x-x_abs, local_y-y_abs-5 );
+ if ( tmp_line == -1 ) {
+ if ( glui )
+ glui->deactivate_current_control( );
+ return false;
+ }
+
+ if (tmp_line < num_lines) {
+ curr_line = tmp_line;
+ if (scrollbar)
+ scrollbar->set_int_val(curr_line);
+ this->execute_callback();
+ if (associated_object != NULL)
+ if (cb_click_type == GLUI_SINGLE_CLICK) {
+ if (obj_cb) {
+ // obj_cb(associated_object, user_id);
+ obj_cb(this);
+ }
+ } else {
+ if (last_line == curr_line && (ms - last_click_time) < 300) {
+ //obj_cb(associated_object, user_id);
+ obj_cb(this);
+ } else {
+ last_click_time = ms;
+ last_line = curr_line;
+ }
+ }
+ if ( can_draw())
+ update_and_draw_text();
+ }
+
+ return true;
+}
+
+
+
+
+/******************************** GLUI_List::mouse_up_handler() **********/
+
+int GLUI_List::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ return false;
+}
+
+
+/***************************** GLUI_List::mouse_held_down_handler() ******/
+
+int GLUI_List::mouse_held_down_handler( int local_x, int local_y,
+ bool new_inside)
+{
+ return false;
+}
+
+
+/****************************** GLUI_List::key_handler() **********/
+
+int GLUI_List::key_handler( unsigned char key,int modifiers )
+{
+
+
+ draw_text_only = false; /** Well, hack is not yet working **/
+ update_and_draw_text();
+ draw_text_only = false;
+
+ return true;
+}
+
+
+/****************************** GLUI_List::activate() **********/
+
+void GLUI_List::activate( int how )
+{
+// if ( debug )
+// dump( stdout, "-> ACTIVATE" );
+ active = true;
+
+ if ( how == GLUI_ACTIVATE_MOUSE )
+ return; /* Don't select everything if activated with mouse */
+
+}
+
+
+/****************************** GLUI_List::deactivate() **********/
+
+void GLUI_List::deactivate( void )
+{
+ active = false;
+ redraw();
+}
+
+/****************************** GLUI_List::draw() **********/
+
+void GLUI_List::draw( int x, int y )
+{
+ int line = 0;
+ int box_width;
+ GLUI_List_Item *item;
+
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ /* Bevelled Border */
+ glBegin( GL_LINES );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( 0, 0 ); glVertex2i( w, 0 );
+ glVertex2i( 0, 0 ); glVertex2i( 0, h );
+
+ glColor3f( 1., 1., 1. );
+ glVertex2i( 0, h ); glVertex2i( w, h );
+ glVertex2i( w, h ); glVertex2i( w, 0 );
+
+ if ( enabled )
+ glColor3f( 0., 0., 0. );
+ else
+ glColor3f( .25, .25, .25 );
+ glVertex2i( 1, 1 ); glVertex2i( w-1, 1 );
+ glVertex2i( 1, 1 ); glVertex2i( 1, h-1 );
+
+ glColor3f( .75, .75, .75 );
+ glVertex2i( 1, h-1 ); glVertex2i( w-1, h-1 );
+ glVertex2i( w-1, h-1 ); glVertex2i( w-1, 1 );
+ glEnd();
+
+ /* Draw Background if enabled*/
+ if (enabled) {
+ glColor3f( 1., 1., 1. );
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( 2, 2 ); glVertex2i( w-2, 2 );
+ glVertex2i( w-2, h-2 ); glVertex2i(2, h-2 );
+ glEnd();
+ } else {
+ glColor3f( .8, .8, .8 );
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( 2, 2 ); glVertex2i( w-2, 2 );
+ glVertex2i( w-2, h-2 ); glVertex2i(2, h-2 );
+ glEnd();
+ }
+
+ /* Figure out how wide the box is */
+ box_width = get_box_width();
+
+ /* Figure out which lines are visible*/
+
+ visible_lines = (int)(h-20)/15;
+
+ item = (GLUI_List_Item *) items_list.first_child();
+
+ line = 0;
+ while (item) {
+ if (line < start_line) {
+ line++;
+ item = (GLUI_List_Item *) item->next();
+ continue;
+ }
+ if (line >= start_line && line <= (start_line+visible_lines)) {
+ if (curr_line == line)
+ draw_text(item->text.c_str(),1,0,(line - start_line)*15);
+ else
+ draw_text(item->text.c_str(),0,0,(line - start_line)*15);
+ }
+ line++;
+ item = (GLUI_List_Item *) item->next();
+ }
+
+ if (scrollbar) {
+ scrollbar->set_int_limits(MAX(0,num_lines-visible_lines), 0);
+ glPushMatrix();
+ glTranslatef(scrollbar->x_abs-x_abs, scrollbar->y_abs-y_abs,0.0);
+ scrollbar->draw_scroll();
+ glPopMatrix();
+ }
+}
+
+/********************************* GLUI_List::draw_text() ****************/
+
+void GLUI_List::draw_text(const char *t, int selected, int x, int y )
+{
+ int text_x, i, x_pos;
+ int box_width;
+
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ /** Find where to draw the text **/
+
+ text_x = 2 + GLUI_LIST_BOXINNERMARGINX;
+
+ /** Draw selection area dark **/
+ if ( enabled && selected ) {
+ glColor3f( 0.0f, 0.0f, .6f );
+ glBegin( GL_QUADS );
+ glVertex2i(text_x, y+5 ); glVertex2i( w-text_x, y+5 );
+ glVertex2i(w-text_x, y+19 ); glVertex2i(text_x, y+19 );
+ glEnd();
+ }
+ box_width = get_box_width();
+
+ if ( !selected || !enabled ) { /* No current selection */
+ x_pos = text_x; /* or control disabled */
+ if ( enabled )
+ glColor3b( 0, 0, 0 );
+ else
+ glColor3b( 32, 32, 32 );
+
+ glRasterPos2i( text_x, y+15);
+ i = 0;
+ while( t[i] != '\0' && substring_width(t,0,i) < box_width) {
+ glutBitmapCharacter( get_font(), t[i] );
+ x_pos += char_width( t[i] );
+ i++;
+ }
+ }
+ else { /* There is a selection */
+ i = 0;
+ x_pos = text_x;
+ glColor3f( 1., 1., 1. );
+ glRasterPos2i( text_x, y+15);
+ while( t[i] != '\0' && substring_width(t,0,i) < box_width) {
+ glutBitmapCharacter( get_font(), t[i] );
+ x_pos += char_width( t[i] );
+ i++;
+ }
+ }
+}
+
+
+int GLUI_List::find_line(int x, int y) {
+ return start_line + ((int)(y/15));
+}
+
+int GLUI_List::get_box_width() {
+ return MAX( this->w
+ - 6 /* 2 * the two-line box border */
+ - 2 * GLUI_LIST_BOXINNERMARGINX, 0 );
+
+}
+
+/******************************** GLUI_List::substring_width() *********/
+int GLUI_List::substring_width( const char *t, int start, int end )
+{
+ int i, width;
+
+ width = 0;
+
+ for( i=start; i<=end; i++ )
+ width += char_width( t[i] );
+
+ return width;
+}
+
+
+/***************************** GLUI_List::update_and_draw_text() ********/
+
+void GLUI_List::update_and_draw_text( void )
+{
+ if ( NOT can_draw() )
+ return;
+
+ //update_substring_bounds();
+ /* printf( "ss: %d/%d\n", substring_start, substring_end ); */
+
+ redraw();
+}
+
+
+/********************************* GLUI_List::special_handler() **********/
+
+int GLUI_List::special_handler( int key,int modifiers )
+{
+ if ( NOT glui )
+ return false;
+
+ if ( key == GLUT_KEY_DOWN ) {
+ if (curr_line < num_lines) {
+ curr_line++;
+ if (curr_line > start_line+visible_lines)
+ start_line++;
+ }
+ } else if ( key == GLUT_KEY_UP ) {
+ if (curr_line > 0) {
+ curr_line--;
+ if (curr_line < start_line)
+ start_line--;
+ }
+ }
+
+ if (scrollbar)
+ scrollbar->set_int_val(curr_line);
+ redraw();
+ return true;
+}
+
+
+/************************************ GLUI_List::update_size() **********/
+
+void GLUI_List::update_size( void )
+{
+ if ( NOT glui )
+ return;
+
+ if ( w < GLUI_LIST_MIN_TEXT_WIDTH )
+ w = GLUI_LIST_MIN_TEXT_WIDTH;
+}
+
+/**************************************** GLUI_Listbox::add_item() **********/
+
+int GLUI_List::add_item( int id, const char *new_text )
+{
+ GLUI_List_Item *new_node = new GLUI_List_Item;
+ GLUI_List_Item *head;
+
+ new_node->text = new_text;
+ new_node->id = id;
+
+ head = (GLUI_List_Item*) items_list.first_child();
+ new_node->link_this_to_parent_last( &items_list );
+
+ if ( head == NULL ) {
+ /*** This is first item added ***/
+
+ int_val = id+1; /** Different than id **/
+ // do_selection( id );
+ last_live_int = id;
+
+ if( glui )
+ glui->post_update_main_gfx();
+ }
+ num_lines++;
+ if (scrollbar)
+ scrollbar->set_int_limits(MAX(num_lines-visible_lines,0), 0);
+
+ return true;
+}
+
+/************************************** GLUI_Listbox::delete_() **********/
+
+int GLUI_List::delete_all()
+{
+ GLUI_List_Item *item;
+
+ item = (GLUI_List_Item *) items_list.first_child();
+ while( item ) {
+ item->unlink();
+ delete item;
+ item = (GLUI_List_Item *) items_list.first_child();
+ }
+
+ num_lines = 0;
+ curr_line = 0;
+
+ return true;
+}
+
+
+/************************************** GLUI_Listbox::delete_item() **********/
+
+int GLUI_List::delete_item( const char *text )
+{
+ GLUI_List_Item *node = get_item_ptr( text );
+
+ if ( node ) {
+ node->unlink();
+ delete node;
+ num_lines--;
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+
+/************************************** GLUI_Listbox::delete_item() **********/
+
+int GLUI_List::delete_item( int id )
+{
+ GLUI_List_Item *node = get_item_ptr( id );
+
+ if ( node ) {
+ node->unlink();
+ delete node;
+ num_lines--;
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+
+/************************************ GLUI_Listbox::get_item_ptr() **********/
+
+GLUI_List_Item *GLUI_List::get_item_ptr( const char *text )
+{
+ GLUI_List_Item *item;
+
+ item = (GLUI_List_Item *) items_list.first_child();
+ while( item ) {
+ if ( item->text == text )
+ return item;
+
+ item = (GLUI_List_Item *) item->next();
+ }
+
+ return NULL;
+}
+
+
+/************************************ GLUI_Listbox::get_item_ptr() **********/
+
+GLUI_List_Item *GLUI_List::get_item_ptr( int id )
+{
+ GLUI_List_Item *item;
+
+ item = (GLUI_List_Item *) items_list.first_child();
+ while( item ) {
+ if ( item->id == id )
+ return item;
+
+ item = (GLUI_List_Item *) item->next();
+ }
+
+ return NULL;
+}
+
+/**************************************** GLUI_List::mouse_over() ********/
+
+int GLUI_List::mouse_over( int state, int x, int y )
+{
+ glutSetCursor( GLUT_CURSOR_LEFT_ARROW );
+
+ return true;
+}
+
+void GLUI_List::scrollbar_callback(GLUI_Control *my_scrollbar) {
+ GLUI_Scrollbar *sb = my_scrollbar->dynamicCastGLUI_Scrollbar();
+ if (!sb) return;
+ GLUI_List* me = (GLUI_List*) sb->associated_object;
+ if (me->scrollbar == NULL)
+ return;
+ int new_start_line = sb->get_int_val(); // TODO!!
+ me->start_line = new_start_line;
+
+ if ( me->can_draw() )
+ me->update_and_draw_text();
+}
diff --git a/tests/bullet/Extras/glui/glui_listbox.cpp b/tests/bullet/Extras/glui/glui_listbox.cpp
new file mode 100644
index 00000000..1bf12762
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_listbox.cpp
@@ -0,0 +1,448 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_listbox - GLUI_ListBox control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+/****************************** GLUI_Listbox::GLUI_Listbox() **********/
+GLUI_Listbox::GLUI_Listbox( GLUI_Node *parent,
+ const char *name, int *value_ptr,
+ int id,
+ GLUI_CB cb)
+{
+ common_init();
+ set_ptr_val( value_ptr );
+ user_id = id;
+ set_name( name );
+ callback = cb;
+
+ parent->add_control( this );
+
+ init_live();
+}
+
+
+/****************************** GLUI_Listbox::mouse_down_handler() **********/
+
+int GLUI_Listbox::mouse_down_handler( int local_x, int local_y )
+{
+ return false;
+}
+
+
+/****************************** GLUI_Listbox::mouse_up_handler() **********/
+
+int GLUI_Listbox::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+
+ return false;
+}
+
+
+/****************************** GLUI_Listbox::mouse_held_down_handler() ******/
+
+int GLUI_Listbox::mouse_held_down_handler( int local_x, int local_y,
+ bool inside)
+{
+
+ return false;
+}
+
+
+/****************************** GLUI_Listbox::key_handler() **********/
+
+int GLUI_Listbox::key_handler( unsigned char key,int modifiers )
+{
+ return false;
+}
+
+
+/****************************** GLUI_Listbox::draw() **********/
+
+void GLUI_Listbox::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int name_x;
+
+ /* draw_active_area(); */
+
+ name_x = MAX(text_x_offset - string_width(this->name) - 3,0);
+ draw_name( name_x , 13);
+ draw_box_inwards_outline( text_x_offset, w,
+ 0, h );
+
+ if ( NOT active ) {
+ draw_box( text_x_offset+3, w-2, 2, h-2, 1.0, 1.0, 1.0 );
+ if ( NOT enabled )
+ glColor3b( 32, 32, 32 );
+ else
+ glColor3f( 0.0, 0.0, 0.0 );
+ glRasterPos2i( text_x_offset+5, 13 );
+ draw_string( curr_text );
+ }
+ else {
+ draw_box( text_x_offset+3, w-2, 2, h-2, .0, .0, .6 );
+ glColor3f( 1.0, 1.0, 1.0 );
+ glRasterPos2i( text_x_offset+5, 13 );
+ draw_string( curr_text );
+ }
+
+
+ if ( enabled ) {
+ glui->std_bitmaps.
+ draw(GLUI_STDBITMAP_LISTBOX_UP,
+ w-glui->std_bitmaps.width(GLUI_STDBITMAP_LISTBOX_UP)-1,
+ 2 );
+ }
+ else {
+ glui->std_bitmaps.
+ draw(GLUI_STDBITMAP_LISTBOX_UP_DIS,
+ w-glui->std_bitmaps.width(GLUI_STDBITMAP_LISTBOX_UP)-1,
+ 2 );
+ }
+}
+
+
+/************************************ GLUI_Listbox::update_si() **********/
+void GLUI_Listbox::update_size( void )
+{
+ recalculate_item_width();
+}
+
+/********************************* GLUI_Listbox::set_int_val() **************/
+
+void GLUI_Listbox::set_int_val( int new_val )
+{
+ /* int_val = new_val; */
+
+ do_selection( new_val );
+
+ /*** Update the variable we're (possibly) pointing to, and update the main gfx ***/
+ output_live(true);
+}
+
+/**************************************** GLUI_Listbox::add_item() **********/
+
+int GLUI_Listbox::add_item( int id, const char *new_text )
+{
+ GLUI_Listbox_Item *new_node = new GLUI_Listbox_Item;
+ GLUI_Listbox_Item *head;
+
+ new_node->text = new_text;
+ new_node->id = id;
+
+ head = (GLUI_Listbox_Item*) items_list.first_child();
+ new_node->link_this_to_parent_last( &items_list );
+
+ if ( head == NULL ) {
+ /*** This is first item added ***/
+
+ int_val = id+1; /** Different than id **/
+ do_selection( id );
+ last_live_int = id;
+
+ if( glui )
+ glui->post_update_main_gfx();
+ }
+ if (recalculate_item_width()) glui->refresh();
+
+ return true;
+}
+
+
+/************************************** GLUI_Listbox::delete_item() **********/
+
+int GLUI_Listbox::delete_item( const char *text )
+{
+ GLUI_Listbox_Item *node = get_item_ptr(text);
+
+ if (node)
+ {
+ node->unlink();
+ delete node;
+ return true;
+ }
+ if (recalculate_item_width()) glui->refresh();
+
+ return false;
+}
+
+
+/************************************** GLUI_Listbox::delete_item() **********/
+
+int GLUI_Listbox::delete_item(int id)
+{
+ GLUI_Listbox_Item *node = get_item_ptr(id);
+
+ if (node)
+ {
+ node->unlink();
+ delete node;
+ return true;
+ }
+ if (recalculate_item_width()) glui->refresh();
+
+ return false;
+}
+
+
+/************************************** GLUI_Listbox::sort_items() **********/
+
+int GLUI_Listbox::sort_items( void )
+{
+ return false;
+}
+
+
+/********************************************* GLUI_Listbox::dump() **********/
+
+void GLUI_Listbox::dump( FILE *output )
+{
+ GLUI_Listbox_Item *item;
+
+ /* printf( "%p\n", (char*) name ); */
+
+ fprintf( output, "Listbox: %s\n", name.c_str() );
+
+ item = (GLUI_Listbox_Item *) items_list.first_child();
+ while( item ) {
+ fprintf( output, " %3d : %s\n", item->id, item->text.c_str() );
+
+ item = (GLUI_Listbox_Item *) item->next();
+ }
+}
+
+
+/************************************ GLUI_Listbox::get_item_ptr() **********/
+
+GLUI_Listbox_Item *GLUI_Listbox::get_item_ptr( const char *text )
+{
+ GLUI_Listbox_Item *item;
+
+ item = (GLUI_Listbox_Item *) items_list.first_child();
+ while( item ) {
+ if ( item->text == text )
+ return item;
+
+ item = (GLUI_Listbox_Item *) item->next();
+ }
+
+ return NULL;
+}
+
+
+/************************************ GLUI_Listbox::get_item_ptr() **********/
+
+GLUI_Listbox_Item *GLUI_Listbox::get_item_ptr( int id )
+{
+ GLUI_Listbox_Item *item;
+
+ item = (GLUI_Listbox_Item *) items_list.first_child();
+ while( item ) {
+ if ( item->id == id )
+ return item;
+
+ item = (GLUI_Listbox_Item *) item->next();
+ }
+
+ return NULL;
+}
+
+
+/************************************ GLUI_Listbox::mouse_over() **********/
+
+static void listbox_callback( int i )
+{
+ int old_val;
+
+ if ( NOT GLUI_Master.curr_left_button_glut_menu OR
+ !GLUI_Master.curr_left_button_glut_menu->dynamicCastGLUI_Listbox() )
+ return;
+
+ old_val = ((GLUI_Listbox*)GLUI_Master.curr_left_button_glut_menu)->int_val;
+ ((GLUI_Listbox*)GLUI_Master.curr_left_button_glut_menu)->set_int_val(i);
+
+ /**** If value changed, execute callback ****/
+ if ( old_val !=
+ ((GLUI_Listbox*)GLUI_Master.curr_left_button_glut_menu)->int_val ) {
+ ((GLUI_Listbox*)GLUI_Master.curr_left_button_glut_menu)->execute_callback();
+ }
+}
+
+
+/*************************************** GLUI_Listbox::mouse_over() **********/
+
+int GLUI_Listbox::mouse_over( int state, int x, int y )
+{
+ GLUI_Listbox_Item *item;
+
+ /* printf( "x/y: %d/%d\n", x, y ); */
+
+ if ( state AND enabled AND x > x_abs + text_x_offset) {
+ /**** Build a GLUT menu for this listbox ***/
+
+ /* printf( "%d %d\n", x, y ); */
+
+ glut_menu_id = glutCreateMenu(listbox_callback);
+
+ item = (GLUI_Listbox_Item *) items_list.first_child();
+ while( item ) {
+ glutAddMenuEntry( item->text.c_str(), item->id );
+ item = (GLUI_Listbox_Item *) item->next();
+ }
+
+ glutAttachMenu( GLUT_LEFT_BUTTON);
+
+ GLUI_Master.set_left_button_glut_menu_control( this );
+ }
+ else if ( glut_menu_id != -1 ) {
+ /* printf( "OUT\n" ); */
+ glutDetachMenu( GLUT_LEFT_BUTTON );
+ glutDestroyMenu( glut_menu_id );
+ glut_menu_id = -1;
+ }
+
+ return true;
+}
+
+
+/************************************ GLUI_Listbox::do_selection() **********/
+
+int GLUI_Listbox::do_selection( int item_num )
+{
+ GLUI_Listbox_Item *item, *sel_item;
+
+ /*** Is this item already selected? ***/
+ if ( item_num == int_val )
+ return false;
+
+ sel_item = NULL;
+ item = (GLUI_Listbox_Item *) items_list.first_child();
+ while( item ) {
+ if ( item->id == item_num ) {
+ sel_item = item;
+ break;
+ }
+
+ item = (GLUI_Listbox_Item *) item->next();
+ }
+
+ if ( NOT sel_item )
+ return false;
+
+ /* printf( "-> %s\n", (char*) sel_item->text ); */
+
+ int_val = item_num;
+ curr_text = sel_item->text;
+ redraw();
+
+ return true;
+}
+
+
+/*********************************** GLUI_Listbox::~GLUI_Listbox() **********/
+
+GLUI_Listbox::~GLUI_Listbox()
+{
+ GLUI_Listbox_Item *item = (GLUI_Listbox_Item *) items_list.first_child();
+
+ while (item)
+ {
+ GLUI_Listbox_Item *tmp = item;
+ item = (GLUI_Listbox_Item *) item->next();
+ delete tmp;
+ }
+}
+
+/****************************** GLUI_Listbox::special_handler() **********/
+
+int GLUI_Listbox::special_handler( int key,int modifiers )
+{
+ GLUI_Listbox_Item *node, *new_node;
+
+ node = get_item_ptr( int_val );
+ new_node = NULL;
+
+ if ( key == GLUT_KEY_DOWN ) {
+ new_node = (GLUI_Listbox_Item*) node->next();
+ }
+ else if ( key == GLUT_KEY_UP ) {
+ new_node = (GLUI_Listbox_Item*) node->prev();
+ }
+ else if ( key == GLUT_KEY_HOME ) {
+ new_node = (GLUI_Listbox_Item*) items_list.first_child();
+ }
+ else if ( key == GLUT_KEY_END ) {
+ new_node = (GLUI_Listbox_Item*) items_list.last_child();
+ }
+
+ if ( new_node != NULL AND new_node != node ) {
+ node = new_node;
+ set_int_val( node->id );
+ execute_callback();
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+
+/************************* GLUI_Listbox::recalculate_item_width( void ) ***********/
+/** Change w and return true if we need to be widened to fit the current items. */
+bool GLUI_Listbox::recalculate_item_width( void )
+{
+ int item_text_size;
+
+ if ( NOT glui )
+ return false;
+
+ /* Find the title size */
+ text_x_offset = string_width( name );
+
+ /* Find the longest item string ***/
+ item_text_size = 0;
+
+ GLUI_Listbox_Item *item = (GLUI_Listbox_Item *) items_list.first_child();
+ while( item ) {
+ item_text_size = MAX(item_text_size,string_width(item->text));
+ item = (GLUI_Listbox_Item *) item->next();
+ }
+
+ /* Sum up our layout: name, item, and drop-down marker */
+ int new_wid=text_x_offset+MAX(GLUI_EDITTEXT_MIN_TEXT_WIDTH,item_text_size)+20;
+ if ( w != new_wid) {
+ w = new_wid;
+ return true; /* we gotta be shortened or widened */
+ }
+ else {
+ return false; /* our current width is OK */
+ }
+}
diff --git a/tests/bullet/Extras/glui/glui_mouse_iaction.cpp b/tests/bullet/Extras/glui/glui_mouse_iaction.cpp
new file mode 100644
index 00000000..0acd69f7
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_mouse_iaction.cpp
@@ -0,0 +1,210 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_mouse_iaction - GLUI Mouse Interaction control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+/********************** GLUI_Mouse_Interaction::mouse_down_handler() ******/
+
+int GLUI_Mouse_Interaction::mouse_down_handler( int local_x, int local_y )
+{
+ /* int win_h = glutGet( GLUT_WINDOW_HEIGHT ); */
+
+ /* iaction_mouse_down_handler( local_x, local_y ); */
+ iaction_mouse_down_handler( local_x-x_abs, local_y-y_abs );
+ /*local_x-x_abs, ((glui->h-local_y)-y_abs) ); */
+ redraw();
+
+ return false;
+}
+
+
+/**************************** GLUI_Mouse_Interaction::mouse_up_handler() */
+
+int GLUI_Mouse_Interaction::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ iaction_mouse_up_handler( local_x-x_abs, local_y-y_abs, inside );
+ return false;
+}
+
+
+/****************************** GLUI_Mouse_Interaction::mouse_held_down_handler() ******/
+
+int GLUI_Mouse_Interaction::mouse_held_down_handler( int local_x, int local_y,
+ bool inside)
+{
+ iaction_mouse_held_down_handler( local_x-x_abs, local_y-y_abs , inside );
+
+ redraw();
+
+ /** Tell the main graphics window to update iteself **/
+ if( glui )
+ glui->post_update_main_gfx();
+
+ execute_callback();
+
+ return false;
+}
+
+
+
+/****************************** GLUI_Mouse_Interaction::draw() **********/
+
+void GLUI_Mouse_Interaction::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int text_width = string_width( this->name );
+ int x_left = this->w/2 - text_width/2;
+
+ if ( NOT draw_active_area_only ) {
+ draw_name( x_left, h-4 );
+ draw_active_box( x_left-4, x_left+string_width( name )+4,
+ h, h-14 );
+ }
+
+ draw_active_area();
+}
+
+
+/************************************ GLUI_Mouse_Interaction::update_size() **********/
+
+void GLUI_Mouse_Interaction::update_size( void )
+{
+ if ( NOT glui )
+ return;
+
+ int text_width = string_width( this->name );
+
+ if ( w < text_width+6 )
+ w = text_width+6;
+
+ if ( h - 18 > w )
+ w = h - 18;
+
+ iaction_init();
+}
+
+
+/****************************** GLUI_Mouse_Interaction::special_handler() **********/
+
+int GLUI_Mouse_Interaction::special_handler( int key,int modifiers )
+{
+ int center_x, center_y;
+ int drag_x, drag_y;
+
+ center_x = w/2;
+ center_y = (h-18)/2;
+ drag_x = 0;
+ drag_y = 0;
+
+ if ( key == GLUT_KEY_LEFT )
+ drag_x = -6;
+ else if ( key == GLUT_KEY_RIGHT )
+ drag_x = 6;
+ else if ( key == GLUT_KEY_UP )
+ drag_y = -6;
+ else if ( key == GLUT_KEY_DOWN )
+ drag_y = 6;
+
+ if ( drag_x != 0 OR drag_y != 0 ) {
+ mouse_down_handler( center_x, center_y );
+ mouse_held_down_handler( center_x + drag_x, center_y + drag_y,true );
+ mouse_up_handler( center_x + drag_x, center_y + drag_y, true );
+ }
+
+ return false;
+}
+
+
+/****************************** GLUI_Mouse_Interaction::draw_active_area() **********/
+
+void GLUI_Mouse_Interaction::draw_active_area( void )
+{
+ int win_h = glutGet( GLUT_WINDOW_HEIGHT ), win_w = glutGet(GLUT_WINDOW_WIDTH);
+
+ int text_height = 18; /* what a kludge */
+
+ int viewport_size = h-text_height; /*MIN(w,h); */
+
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix();
+ glLoadIdentity();
+ glTranslatef( (float) win_w/2.0, (float) win_h/2.0, 0.0 );
+ glRotatef( 180.0, 0.0, 1.0, 0.0 );
+ glRotatef( 180.0, 0.0, 0.0, 1.0 );
+ glTranslatef( (float) -win_w/2.0, (float) -win_h/2.0, 0.0 );
+
+ glTranslatef( (float) this->x_abs + .5, (float) this->y_abs + .5, 0.0 );
+
+ glTranslatef( (float)this->w/2.0, (float)viewport_size/2.0 + 2.0 , 0.0 );
+
+ /*** Draw the interaction control's orthographic elements ***/
+ iaction_draw_active_area_ortho();
+
+ /*** Setup and draw the interaction control's perspective elements ***/
+
+ /*** Set the viewport to just the square of the drawing area ***/
+ /* glViewport( this->x_abs , glui->main_panel->h - this->y_abs - this->h,*/
+ /*glViewport( this->x_abs+1+(this->w/2-viewport_size/2),
+ this->h-this->y_abs-viewport_size-1,
+ viewport_size, viewport_size );*/
+
+ viewport_size -= 4;
+ int offset = 0;
+ if ( ((this->w-viewport_size) % 2) == 1 )
+ offset = 1;
+
+ glViewport( this->x_abs + (this->w-viewport_size)/2 + offset,
+ win_h - this->y_abs - this->h + text_height,
+ viewport_size, viewport_size );
+
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ double xy=1.00,zc=50.0; /* X-Y size, and Z origin */
+ glFrustum( -1.0*xy, 1.0*xy, -xy, xy, zc*0.7, zc*1.3 );
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix();
+ glLoadIdentity();
+ glTranslatef( 0.0, 0.0, -zc );
+ glScalef(xy,xy,1.0); // xy);
+
+ /* glutSolidTeapot( 1.0 ); */
+ iaction_draw_active_area_persp();
+
+ glMatrixMode( GL_MODELVIEW );
+ glPopMatrix();
+
+ glui->set_viewport();
+ glui->set_ortho_projection();
+
+ glMatrixMode( GL_MODELVIEW );
+ glPopMatrix();
+}
+
diff --git a/tests/bullet/Extras/glui/glui_node.cpp b/tests/bullet/Extras/glui/glui_node.cpp
new file mode 100644
index 00000000..a943332f
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_node.cpp
@@ -0,0 +1,212 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_node.cpp - linked-list tree structure
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include "glui_internal.h"
+
+/********************************************* GLUI_Node::GLUI_Node() *******/
+
+GLUI_Node::GLUI_Node()
+:
+ parent_node(NULL),
+ child_head(NULL),
+ child_tail(NULL),
+ next_sibling(NULL),
+ prev_sibling(NULL)
+{
+}
+
+/********************************************* GLUI_Node::first() *******/
+/* Returns first sibling in 'this' node's sibling list */
+
+GLUI_Node *GLUI_Node::first_sibling( void )
+{
+ if ( parent_node == NULL )
+ return this; /* root node has no siblings */
+ else
+ return parent_node->child_head;
+}
+
+
+/******************************************** GLUI_Node::next() ********/
+/* Returns next sibling in 'this' node's sibling list */
+
+GLUI_Node *GLUI_Node::next( void )
+{
+ return next_sibling;
+}
+
+
+/******************************************** GLUI_Node::prev() ********/
+/* Returns prev sibling in 'this' node's sibling list */
+
+GLUI_Node *GLUI_Node::prev( void )
+{
+ return prev_sibling;
+}
+
+
+/********************************************* GLUI_Node::last() *******/
+/* Returns last sibling in 'this' node's sibling list */
+
+GLUI_Node *GLUI_Node::last_sibling( void )
+{
+ if ( parent_node == NULL )
+ return this; /* root node has no siblings */
+ else
+ return parent_node->child_tail;
+}
+
+
+/*************************** GLUI_Node::link_this_to_parent_last() *******/
+/* Links as last child of parent */
+
+void GLUI_Node::link_this_to_parent_last( GLUI_Node *new_parent )
+{
+ if ( new_parent->child_tail == NULL ) { /* parent has no children */
+ new_parent->child_head = this;
+ new_parent->child_tail = this;
+ this->parent_node = new_parent;
+ }
+ else { /* parent has children */
+ new_parent->child_tail->next_sibling = this;
+ this->prev_sibling = new_parent->child_tail;
+ new_parent->child_tail = this;
+ this->parent_node = new_parent;
+ }
+}
+
+
+/*************************** GLUI_Node::link_this_to_parent_first() *******/
+/* Links as first child of parent */
+
+void GLUI_Node::link_this_to_parent_first( GLUI_Node *new_parent )
+{
+ if ( new_parent->child_head == NULL ) { /* parent has no children */
+ new_parent->child_head = this;
+ new_parent->child_tail = this;
+ this->parent_node = new_parent;
+ }
+ else { /* parent has children */
+ new_parent->child_head->prev_sibling = this;
+ this->next_sibling = new_parent->child_head;
+ new_parent->child_head = this;
+ this->parent_node = new_parent;
+ }
+}
+
+/**************************** GLUI_Node::link_this_to_sibling_next() *****/
+
+void GLUI_Node::link_this_to_sibling_next( GLUI_Node *sibling )
+{
+ if ( sibling->next_sibling == NULL ) { /* node has no next sibling */
+ sibling->next_sibling = this;
+ this->prev_sibling = sibling;
+
+ /* This was the parent's last child, so update that as well */
+ if ( sibling->parent_node != NULL ) {
+ sibling->parent_node->child_tail = this;
+ }
+ }
+ else { /* node already has a next sibling */
+ sibling->next_sibling->prev_sibling = this;
+ this->next_sibling = sibling->next_sibling;
+ sibling->next_sibling = this;
+ this->prev_sibling = sibling;
+ }
+
+ this->parent_node = sibling->parent_node;
+}
+
+
+/**************************** GLUI_Node::link_this_to_sibling_prev() *****/
+
+void GLUI_Node::link_this_to_sibling_prev( GLUI_Node *sibling )
+{
+ if ( sibling->prev_sibling == NULL ) { /* node has no prev sibling */
+ sibling->prev_sibling = this;
+ this->next_sibling = sibling;
+
+ /* This was the parent's first child, so update that as well */
+ if ( sibling->parent_node != NULL ) {
+ sibling->parent_node->child_head = this;
+ }
+ }
+ else { /* node already has a prev sibling */
+ sibling->prev_sibling->next_sibling = this;
+ this->prev_sibling = sibling->prev_sibling;
+ sibling->prev_sibling = this;
+ this->next_sibling = sibling;
+ }
+
+ this->parent_node = sibling->parent_node;
+}
+
+/**************************************** GLUI_Node::unlink() **************/
+
+void GLUI_Node::unlink( void )
+{
+ /* Unlink from prev sibling */
+ if ( this->prev_sibling != NULL ) {
+ this->prev_sibling->next_sibling = this->next_sibling;
+ }
+ else { /* No prev sibling: this was parent's first child */
+ this->parent_node->child_head = this->next_sibling;
+ }
+
+ /* Unlink from next sibling */
+ if ( this->next_sibling != NULL ) {
+ this->next_sibling->prev_sibling = this->prev_sibling;
+ }
+ else { /* No next sibling: this was parent's last child */
+ this->parent_node->child_tail = this->prev_sibling;
+ }
+
+ this->parent_node = NULL;
+ this->next_sibling = NULL;
+ this->prev_sibling = NULL;
+ this->child_head = NULL;
+ this->child_tail = NULL;
+}
+
+/**************************************** GLUI_Node::dump() **************/
+
+void GLUI_Node::dump( FILE *out, const char *name )
+{
+ fprintf( out, "GLUI_node: %s\n", name );
+ fprintf( out, " parent: %p child_head: %p child_tail: %p\n",
+ (void *) parent_node,
+ (void *) child_head,
+ (void *) child_tail );
+ fprintf( out, " next: %p prev: %p\n",
+ (void *) next_sibling,
+ (void *) prev_sibling );
+}
diff --git a/tests/bullet/Extras/glui/glui_panel.cpp b/tests/bullet/Extras/glui/glui_panel.cpp
new file mode 100644
index 00000000..3aa61ae8
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_panel.cpp
@@ -0,0 +1,186 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_panel.cpp - GLUI_Panel control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+GLUI_Panel::GLUI_Panel( GLUI_Node *parent, const char *name, int type )
+{
+ common_init();
+ set_name( name );
+ user_id = -1;
+ int_val = type;
+
+ parent->add_control( this );
+}
+
+/****************************** GLUI_Panel::draw() **********/
+
+void GLUI_Panel::draw( int x, int y )
+{
+ int top;
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( int_val == GLUI_PANEL_RAISED ) {
+ top = 0;
+ glLineWidth( 1.0 );
+ glColor3f( 1.0, 1.0, 1.0 );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( 0, top ); glVertex2i( w, top );
+ glVertex2i( 0, top ); glVertex2i( 0, h );
+ glEnd();
+
+ glColor3f( .5, .5, .5 );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( w, top );
+ glVertex2i( w, h );
+ glVertex2i( 0, h );
+ glVertex2i( w, h );
+ glEnd();
+
+ /** ORIGINAL RAISED PANEL METHOD - A LITTLE TOO HIGH **
+ glLineWidth(1.0);
+ glBegin( GL_LINES );
+ glColor3f( 1.0, 1.0, 1.0 );
+ glVertex2i( 1, 1 ); glVertex2i( w-2, 1 );
+ glVertex2i( 1, 1 ); glVertex2i( 1, h-2 );
+
+ glColor3f( .5, .5, .5 );
+ glVertex2i( w-1, 1 ); glVertex2i( w-1, h-1 );
+ glVertex2i( 1, h-1 ); glVertex2i( w-1, h-1 );
+
+ glColor3f( 0.0, 0.0, 0.0 );
+ glVertex2i( 0, h ); glVertex2i( w, h );
+ glVertex2i( w, 0 ); glVertex2i( w, h );
+ glEnd();
+
+ -- Touch up the lines a bit (needed in some opengl implementations
+ glBegin( GL_POINTS );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( w-1, h-1 );
+ glColor3f( 0.0, 0.0, 0.0 );
+ glVertex2i( w, h );
+ glEnd();
+ **/
+ }
+ else if ( int_val == GLUI_PANEL_EMBOSSED ) {
+ if ( parent_node == NULL || name == "" ) {
+ top = 0;
+ }
+ else {
+ top = GLUI_PANEL_EMBOSS_TOP;
+ }
+
+ glLineWidth( 1.0 );
+ glColor3f( 1.0, 1.0, 1.0 );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( 0, top ); glVertex2i( w, top );
+ glVertex2i( w, h ); glVertex2i( 0, h );
+
+ glVertex2i( 1, top+1 ); glVertex2i( w-1, top+1 );
+ glVertex2i( w-1, h-1 ); glVertex2i( 1, h-1 );
+ glEnd();
+
+ glColor3f( .5, .5, .5 );
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( 0, top );
+ glVertex2i( w-1, top );
+ glVertex2i( w-1, h-1 );
+ glVertex2i( 0, h-1 );
+ glEnd();
+
+ /**** Only display text in embossed panel ****/
+ if ( parent_node != NULL && name != "" ) { /* Only draw non-null strings */
+ int left = 7, height=GLUI_PANEL_NAME_DROP+1;
+ int str_width;
+
+ str_width = string_width(name);
+
+ if ( glui )
+ glColor3ub(glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b);
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( left-3, 0 ); glVertex2i( left+str_width+3, 0 );
+ glVertex2i( left+str_width+3, height ); glVertex2i( left-3, height );
+ glEnd();
+
+ draw_name( left, GLUI_PANEL_NAME_DROP );
+ }
+ }
+
+ glLineWidth( 1.0 );
+}
+
+/****************************** GLUI_Panel::set_name() **********/
+
+void GLUI_Panel::set_name( const char *new_name )
+{
+ name = new_name ? new_name : "";
+
+ update_size();
+
+ if ( glui )
+ glui->refresh();
+}
+
+
+/****************************** GLUI_Panel::set_type() **********/
+
+void GLUI_Panel::set_type( int new_type )
+{
+ if ( new_type != int_val ) {
+ int_val = new_type;
+ update_size();
+ redraw();
+ }
+}
+
+
+/************************************** GLUI_Panel::update_size() **********/
+
+void GLUI_Panel::update_size( void )
+{
+ int text_size;
+
+ if ( NOT glui )
+ return;
+
+ text_size = string_width(name);
+
+ if ( w < text_size + 16 )
+ w = text_size + 16 ;
+
+ if ( name != "" AND int_val == GLUI_PANEL_EMBOSSED ) {
+ this->y_off_top = GLUI_YOFF + 8;
+ }
+ else {
+ this->y_off_top = GLUI_YOFF;
+ }
+}
diff --git a/tests/bullet/Extras/glui/glui_radio.cpp b/tests/bullet/Extras/glui/glui_radio.cpp
new file mode 100644
index 00000000..aef16685
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_radio.cpp
@@ -0,0 +1,362 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_radio.cpp - GLUI_RadioGroup and GLUI_RadioButton control classes
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+#include <cassert>
+
+/****************************** GLUI_RadioGroup::GLUI_RadioGroup() **********/
+
+GLUI_RadioGroup::GLUI_RadioGroup(GLUI_Node *parent,
+ int *value_ptr,
+ int id, GLUI_CB cb)
+{
+ common_init();
+ GLUI_String buf;
+
+ set_ptr_val( value_ptr );
+ if ( value_ptr ) {
+ int_val = *value_ptr; /** Can't call set_int_val(), b/c that
+ function will try to call the
+ callback, etc */
+ /** Actually, maybe not **/
+ last_live_int = *value_ptr;
+ }
+
+ user_id = id;
+ glui_format_str( buf, "RadioGroup: %p", this );
+ set_name( buf.c_str() );
+ callback = cb;
+
+ parent->add_control( this );
+
+ init_live();
+}
+
+
+/****************************** GLUI_RadioGroup::draw() **********/
+
+void GLUI_RadioGroup::draw( int x, int y )
+{
+ if ( NOT can_draw() )
+ return;
+
+ draw_group(false);
+}
+
+
+/********************* GLUI_RadioGroup::draw_group(int translate) **********/
+
+void GLUI_RadioGroup::draw_group( int translate )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ GLUI_RadioButton *button;
+ this->int_val = int_val;
+
+ glMatrixMode(GL_MODELVIEW );
+
+ button = (GLUI_RadioButton*) first_child();
+ while( button != NULL ) {
+ glPushMatrix();
+ if (translate) {
+ button->translate_to_origin();
+ }
+ else {
+ glTranslatef(button->x_abs-x_abs,
+ button->y_abs-y_abs,0.0);
+ }
+
+ if ( button->int_val )
+ button->draw_checked();
+ else
+ button->draw_unchecked();
+
+ glPopMatrix();
+
+ button = (GLUI_RadioButton*) button->next();
+ }
+}
+
+
+/****************************** GLUI_RadioGroup::set_name() **********/
+
+void GLUI_RadioGroup::set_name( const char *text )
+{
+ name = text;
+
+ if ( glui )
+ glui->refresh();
+}
+
+
+/********************************* GLUI_RadioGroup::set_selected() **********/
+
+void GLUI_RadioGroup::set_selected( int int_val )
+{
+ GLUI_RadioButton *button;
+
+ this->int_val = int_val;
+
+ button = (GLUI_RadioButton*) first_child();
+ while( button != NULL ) {
+ if ( int_val == -1 ) { /*** All buttons in group are deselected ***/
+ button->set_int_val(0);
+ }
+ else if ( int_val == button->user_id ) { /*** This is selected button ***/
+ button->set_int_val(1);
+ }
+ else { /*** This is NOT selected button ***/
+ button->set_int_val(0);
+
+ }
+ button = (GLUI_RadioButton*) button->next();
+ }
+ redraw();
+}
+
+
+/************************ GLUI_RadioButton::GLUI_RadioButton() **********/
+
+GLUI_RadioButton::GLUI_RadioButton( GLUI_RadioGroup *grp, const char *name )
+{
+ common_init();
+
+ set_int_val( 0 );
+
+ /** A radio button's user id is always its ordinal number (zero-indexed)
+ within the group */
+ user_id = grp->num_buttons;
+ set_name( name );
+ group = grp;
+
+ group->num_buttons++; /* Increments radiogroup's button count */
+ group->add_control( this );
+
+ /*** Now update button states ***/
+ group->set_int_val( group->int_val ); /* This tells the group to
+ reset itself to its
+ current value, thereby
+ updating all its buttons */
+}
+
+
+/************************ GLUI_RadioButton::mouse_down_handler() **********/
+
+int GLUI_RadioButton::mouse_down_handler( int local_x, int local_y )
+{
+ if ( NOT group )
+ return false;
+
+ orig_value = group->int_val;
+
+ currently_inside = true;
+
+ group->set_selected( this->user_id );
+ redraw();
+
+ return false;
+}
+
+/********************** GLUI_RadioButton::mouse_held_down_handler() ******/
+
+int GLUI_RadioButton::mouse_held_down_handler( int local_x, int local_y,
+ bool inside)
+{
+ if (inside != currently_inside) {
+ if (inside) group->set_selected( this->user_id );
+ else group->set_selected( orig_value );
+ currently_inside = inside;
+ redraw();
+ }
+
+ return false;
+}
+
+
+/*************************** GLUI_RadioButton::mouse_up_handler() **********/
+
+int GLUI_RadioButton::mouse_up_handler( int local_x, int local_y,
+ bool inside )
+{
+ if ( NOT group )
+ return false;
+
+ if ( NOT inside ) {
+ group->set_selected( orig_value );
+ redraw();
+ }
+ else {
+ /** Now we update the radio button group. We tell the group
+ handler to set the currently-selected item to this button, which
+ is reference by its user_id/ordinal number within group **/
+
+ group->set_selected( this->user_id );
+ redraw();
+
+ /*** Now update the linked variable, and call the callback,
+ but ONLY if the value of the radio group actually changed ***/
+ if ( group->int_val != orig_value ) {
+ group->output_live(true); /** Output live and update gfx ***/
+
+ group->execute_callback();
+ }
+ }
+
+ return false;
+}
+
+/****************************** GLUI_RadioButton::draw() **********/
+
+void GLUI_RadioButton::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( NOT group OR NOT can_draw() )
+ return;
+
+ /*** See if we're the currently-selected button. If so, draw ***/
+ if ( group->int_val == this->user_id ) {
+ if ( enabled )
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_ON, 0, 0 );
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_ON_DIS, 0, 0 );
+ }
+ else {
+ if ( enabled )
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_OFF, 0, 0 );
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_OFF_DIS, 0, 0 );
+ }
+
+ draw_active_area();
+
+ draw_name( text_x_offset, 10 );
+}
+
+
+/************************************ GLUI_RadioButton::draw_checked() ******/
+
+void GLUI_RadioButton::draw_checked( void )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ if ( enabled )
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_ON, 0, 0 );
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_ON_DIS, 0, 0 );
+ draw_active_area();
+}
+
+
+/*********************************** GLUI_RadioButton::draw_unchecked() ******/
+
+void GLUI_RadioButton::draw_unchecked( void )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( enabled )
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_OFF, 0, 0 );
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_RADIOBUTTON_OFF_DIS, 0, 0 );
+ draw_active_area();
+}
+
+
+/**************************************** GLUI_RadioButton::draw_O() ********/
+
+void GLUI_RadioButton::draw_O( void )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int i, j;
+
+ glBegin( GL_POINTS );
+ for(i=3; i<=GLUI_RADIOBUTTON_SIZE-3; i++ )
+ for(j=3; j<=GLUI_RADIOBUTTON_SIZE-3; j++ )
+ glVertex2i(i,j);
+ glEnd();
+}
+
+
+/******************************** GLUI_RadioButton::update_size() **********/
+
+void GLUI_RadioButton::update_size( void )
+{
+ int text_size;
+
+ if ( NOT glui )
+ return;
+
+ text_size = _glutBitmapWidthString( glui->font, name.c_str() );
+
+ /* if ( w < text_x_offset + text_size + 6 ) */
+ w = text_x_offset + text_size + 6 ;
+}
+
+
+/************************* GLUI_RadioButton::draw_active_area() **************/
+
+void GLUI_RadioButton::draw_active_area( void )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int text_width, left, right;
+
+ text_width = _glutBitmapWidthString( glui->font, name.c_str() );
+ left = text_x_offset-3;
+ right = left + 7 + text_width;
+
+ if ( active ) {
+ glEnable( GL_LINE_STIPPLE );
+ glLineStipple( 1, 0x5555 );
+ glColor3f( 0., 0., 0. );
+ } else {
+ glColor3ub( glui->bkgd_color.r, glui->bkgd_color.g, glui->bkgd_color.b );
+ }
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i(left,0); glVertex2i( right,0);
+ glVertex2i(right,h+1); glVertex2i( left,h+1);
+ glEnd();
+
+ glDisable( GL_LINE_STIPPLE );
+}
+
+
+/********************************* GLUI_RadioGroup::set_int_val() **********/
+
+void GLUI_RadioGroup::set_int_val( int new_val )
+{
+ if ( new_val == int_val )
+ return;
+
+ set_selected( new_val );
+ redraw();
+
+ output_live(true);
+
+}
diff --git a/tests/bullet/Extras/glui/glui_rollout.cpp b/tests/bullet/Extras/glui/glui_rollout.cpp
new file mode 100644
index 00000000..d29e0064
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_rollout.cpp
@@ -0,0 +1,275 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_panel.cpp - GLUI_Panel control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+enum {rollout_height_pixels=GLUI_DEFAULT_CONTROL_HEIGHT + 7};
+
+/****************************** GLUI_Rollout::GLUI_Rollout() **********/
+
+GLUI_Rollout::GLUI_Rollout( GLUI_Node *parent, const char *name,
+ int open, int type )
+{
+ common_init();
+ set_name( name );
+ user_id = -1;
+ int_val = type;
+
+ if ( NOT open ) {
+ is_open = false;
+ h = rollout_height_pixels;
+ }
+
+ parent->add_control( this );
+}
+
+/****************************** GLUI_Rollout::open() **********/
+
+void GLUI_Rollout::open( void )
+{
+ if ( NOT glui )
+ return;
+
+ if ( is_open )
+ return;
+ is_open = true;
+
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ /* Copy hidden children into our private list "collapsed_node" */
+ child_head = collapsed_node.child_head;
+ child_tail = collapsed_node.child_tail;
+ collapsed_node.child_head = NULL;
+ collapsed_node.child_tail = NULL;
+
+ if ( child_head != NULL ) {
+ ((GLUI_Control*) child_head)->unhide_internal( true );
+ }
+
+ glui->refresh();
+}
+
+
+/****************************** GLUI_Rollout::close() **********/
+
+void GLUI_Rollout::close( void )
+{
+ if ( NOT glui )
+ return;
+
+ if ( NOT is_open )
+ return;
+ is_open = false;
+
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( child_head != NULL ) {
+ ((GLUI_Control*) child_head)->hide_internal( true );
+ }
+
+ /* Move all children into a private list of hidden children */
+ collapsed_node.child_head = first_child();
+ collapsed_node.child_tail = last_child();
+ child_head = NULL;
+ child_tail = NULL;
+
+ this->h = rollout_height_pixels;
+
+ glui->refresh();
+}
+
+
+/**************************** GLUI_Rollout::mouse_down_handler() **********/
+
+
+int GLUI_Rollout::mouse_down_handler( int local_x, int local_y )
+{
+ if ( local_y - y_abs > rollout_height_pixels ) {
+ initially_inside = currently_inside = false;
+ return false;
+ }
+
+ currently_inside = true;
+ initially_inside = true;
+ redraw();
+
+ return false;
+}
+
+
+/**************************** GLUI_Rollout::mouse_held_down_handler() ****/
+
+int GLUI_Rollout::mouse_held_down_handler(
+ int local_x, int local_y,
+ bool new_inside )
+{
+ if ( NOT initially_inside )
+ return false;
+
+ if ( local_y - y_abs> rollout_height_pixels )
+ new_inside = false;
+
+ if (new_inside != currently_inside) {
+ currently_inside = new_inside;
+ redraw();
+ }
+
+ return false;
+}
+
+
+/**************************** GLUI_Rollout::mouse_down_handler() **********/
+
+int GLUI_Rollout::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ if ( currently_inside ) {
+ if ( is_open )
+ close();
+ else
+ open();
+ }
+
+ currently_inside = false;
+ initially_inside = false;
+ redraw();
+
+ return false;
+}
+
+
+/********************************* GLUI_Rollout::draw() ***********/
+
+void GLUI_Rollout::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ int left, right, top, bottom;
+
+ left = 5;
+ right = w-left;
+ top = 3;
+ bottom = 3+16;
+
+ if ( is_open )
+ draw_emboss_box( 0, w, top+3, h );
+ else
+ draw_emboss_box( 0, w, top+3, h-7 );
+
+ glui->draw_raised_box( left, top, w-left*2, 16 );
+
+ if ( glui )
+ glColor3ub(glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b);
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( left+1, top+1 ); glVertex2i( right-1, top+1 );
+ glVertex2i( right-1, bottom-1 ); glVertex2i( left+1, bottom-1 );
+ glEnd();
+
+ draw_name( left+8, top+11 );
+
+ if ( active )
+ /*draw_active_box( left+4, left+string_width( name.c_str() )+12, */
+ draw_active_box( left+4, right-17,
+ top+2, bottom-2 );
+
+
+ /** Draw '+' or '-' **/
+
+ glBegin( GL_LINES );
+ if ( is_open ) {
+ if ( enabled ) glColor3f( 0.0, 0.0, 0.0 );
+ else glColor3f( 0.5, 0.5, 0.5 );
+ glVertex2i(right-14,(top+bottom)/2); glVertex2i(right-5,(top+bottom)/2);
+
+ glColor3f( 1.0, 1.0, 1.0 );
+ glVertex2i(right-14,1+(top+bottom)/2);glVertex2i(right-5,1+(top+bottom)/2);
+ }
+ else
+ {
+ glColor3f( 1.0, 1.0, 1.0 );
+ glVertex2i(right-9,top+3); glVertex2i(right-9,bottom-4);
+ glVertex2i(right-14,(top+bottom)/2); glVertex2i(right-5,(top+bottom)/2);
+
+ if ( enabled ) glColor3f( 0.0, 0.0, 0.0 );
+ else glColor3f( 0.5, 0.5, 0.5 );
+ glVertex2i(right-14,-1+(top+bottom)/2);
+ glVertex2i(right-5,-1+(top+bottom)/2);
+ glVertex2i(right-10,top+3);
+ glVertex2i(right-10,bottom-4);
+ }
+ glEnd();
+
+ glLineWidth( 1.0 );
+
+ if (currently_inside) {draw_pressed(); /* heavy black outline when pressed */ }
+}
+
+
+/***************************** GLUI_Rollout::update_size() **********/
+
+void GLUI_Rollout::update_size( void )
+{
+ int text_size;
+
+ if ( NOT glui )
+ return;
+
+ text_size = string_width(name);
+
+ if ( w < text_size + 36 )
+ w = text_size + 36;
+}
+
+
+/**************************** GLUI_Rollout::draw_pressed() ***********/
+
+void GLUI_Rollout::draw_pressed( void )
+{
+ int left, right, top, bottom;
+
+ left = 5;
+ right = w-left;
+ top = 3;
+ bottom = 3+16;
+
+
+ glColor3f( 0.0, 0.0, 0.0 );
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( left, top ); glVertex2i( right, top );
+ glVertex2i( right, bottom ); glVertex2i( left,bottom );
+ glEnd();
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( left+1, top+1 ); glVertex2i( right-1, top+1 );
+ glVertex2i( right-1, bottom-1 ); glVertex2i( left+1,bottom-1 );
+ glEnd();
+}
diff --git a/tests/bullet/Extras/glui/glui_rotation.cpp b/tests/bullet/Extras/glui/glui_rotation.cpp
new file mode 100644
index 00000000..b02d7435
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_rotation.cpp
@@ -0,0 +1,473 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_rotation - GLUI_Rotation control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include "arcball.h"
+#include "algebra3.h"
+
+/*************************** GLUI_Rotation::iaction_mouse_down_handler() ***/
+
+int GLUI_Rotation::iaction_mouse_down_handler( int local_x, int local_y )
+{
+ copy_float_array_to_ball();
+
+ init_ball();
+
+ local_y = (int) floor(2.0 * ball->center[1] - local_y);
+
+ ball->mouse_down( local_x, local_y );
+
+ /* printf( "%d %d - %f %f\n", local_x, local_y, ball->center[0], ball->center[1] ); */
+
+ copy_ball_to_float_array();
+
+ spinning = false;
+
+ return false;
+}
+
+
+/*********************** GLUI_Rotation::iaction_mouse_up_handler() **********/
+
+int GLUI_Rotation::iaction_mouse_up_handler( int local_x, int local_y,
+ bool inside )
+{
+ copy_float_array_to_ball();
+
+ ball->mouse_up();
+
+ return false;
+}
+
+
+/******************* GLUI_Rotation::iaction_mouse_held_down_handler() ******/
+
+int GLUI_Rotation::iaction_mouse_held_down_handler( int local_x, int local_y,
+ bool inside)
+{
+ if ( NOT glui )
+ return 0;
+
+ copy_float_array_to_ball();
+
+ local_y = (int) floor(2.0 * ball->center[1] - local_y);
+
+ /* printf( "%d %d\n", local_x, local_y ); */
+
+ ball->mouse_motion( local_x, local_y, 0,
+ (glui->curr_modifiers & GLUT_ACTIVE_ALT) != 0,
+ (glui->curr_modifiers & GLUT_ACTIVE_CTRL) != 0 );
+
+ copy_ball_to_float_array();
+
+ if ( can_spin )
+ spinning = true;
+
+ return false;
+}
+
+
+/******************** GLUI_Rotation::iaction_draw_active_area_persp() **************/
+
+void GLUI_Rotation::iaction_draw_active_area_persp( void )
+{
+ /********** arcball *******/
+ copy_float_array_to_ball();
+
+ setup_texture();
+ setup_lights();
+
+ glEnable(GL_CULL_FACE );
+
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix();
+
+ mat4 tmp_rot = *ball->rot_ptr;
+ glMultMatrixf( (float*) &tmp_rot[0][0] );
+
+ /*** Draw the checkered box ***/
+ /*glDisable( GL_TEXTURE_2D ); */
+ draw_ball(1.35); // 1.96 );
+
+ glPopMatrix();
+
+ glBindTexture(GL_TEXTURE_2D,0); /* unhook our checkerboard texture */
+ glDisable( GL_TEXTURE_2D );
+ glDisable( GL_LIGHTING );
+ glDisable( GL_CULL_FACE );
+}
+
+
+/******************** GLUI_Rotation::iaction_draw_active_area_ortho() **********/
+
+void GLUI_Rotation::iaction_draw_active_area_ortho( void )
+{
+ float radius;
+ radius = (float)(h-22)/2.0; /*MIN((float)w/2.0, (float)h/2.0); */
+
+ /********* Draw emboss circles around arcball control *********/
+ int k;
+ glLineWidth( 1.0 );
+ glBegin( GL_LINE_LOOP);
+ for( k=0; k<60; k++ ) {
+ float phi = 2*M_PI*(float)k/60.0;
+ vec2 p( cos(phi) * (2.0 + radius), sin(phi) * (2.0 + radius));
+ if ( p[1] < -p[0] ) glColor3ub( 128,128,128 );
+ else glColor3ub( 255,255,255 );
+ glVertex2fv((float*)&p[0]);
+ }
+ glEnd();
+
+ glBegin( GL_LINE_LOOP);
+ for( k=0; k<60; k++ ) {
+ float phi = 2*M_PI*(float)k/60.0;
+ vec2 p( cos(phi) * (1.0 + radius), sin(phi) * (1.0 + radius));
+ if ( enabled ) {
+ if ( p[1] < -p[0] ) glColor3ub( 0,0,0);
+ else glColor3ub( 192,192,192);
+ }
+ else
+ {
+ if ( p[1] < -p[0] ) glColor3ub( 180,180,180);
+ else glColor3ub( 192,192,192);
+ }
+ glVertex2fv((float*)&p[0]);
+ }
+ glEnd();
+}
+
+
+/******************************** GLUI_Rotation::iaction_dump() **********/
+
+void GLUI_Rotation::iaction_dump( FILE *output )
+{
+}
+
+
+/******************** GLUI_Rotation::iaction_special_handler() **********/
+
+int GLUI_Rotation::iaction_special_handler( int key,int modifiers )
+{
+
+ return false;
+}
+
+/********************************** GLUI_Rotation::init_ball() **********/
+
+void GLUI_Rotation::init_ball( void )
+{
+ /*printf( "%f %f %f", float( MIN(w/2,h/2)), (float) w/2, (float) h/2 ); */
+
+ ball->set_params( vec2( (float)(w/2), (float)((h-18)/2)),
+ (float) 2.0*(h-18) );
+ /*ball->set_damping( .05 ); */
+ /*float( MIN(w/2,h/2))*2.0 ); */
+ /* ball->reset_mouse(); */
+}
+
+
+/****************************** GLUI_Rotation::setup_texture() *********/
+
+void GLUI_Rotation::setup_texture( void )
+{
+ static GLuint tex=0u;
+ GLenum t=GL_TEXTURE_2D;
+ glEnable(t);
+ glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
+ glColor3f( 1.0, 1.0, 1.0 );
+ if (tex!=0u) {
+ /* (OSL 2006/06) Just use glBindTexture to avoid having to re-upload the whole checkerboard every frame. */
+ glBindTexture(t,tex);
+ return;
+ } /* Else need to make a new checkerboard texture */
+ glGenTextures(1,&tex);
+ glBindTexture(t,tex);
+ glEnable(t);
+
+ unsigned int i, j;
+ int dark, light; /*** Dark and light colors for ball checkerboard ***/
+
+/* Note: you can change the number of checkers across there sphere in draw_ball */
+#define CHECKBOARD_SIZE 64 /* pixels across whole texture */
+#define CHECKBOARD_REPEAT 32u /* pixels across one black/white sector */
+ unsigned char texture_image[CHECKBOARD_SIZE] [CHECKBOARD_SIZE] [3];
+ unsigned char c;
+ for( i=0; i<CHECKBOARD_SIZE; i++ )
+ {
+ for( j=0; j<CHECKBOARD_SIZE; j++ )
+ {
+ dark = 110;
+ light = 220;
+
+ if ((((i/CHECKBOARD_REPEAT)&0x1)==0) ^ (((j/CHECKBOARD_REPEAT)&0x1)==0))
+ c = light;
+ else
+ c = dark;
+
+ texture_image[i][j][0] = c;
+ texture_image[i][j][1] = c;
+ texture_image[i][j][2] = c;
+ }
+ }
+
+ glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
+ glTexParameteri( t, GL_TEXTURE_WRAP_S, GL_REPEAT );
+ glTexParameteri( t, GL_TEXTURE_WRAP_T, GL_REPEAT );
+ glTexParameteri( t, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
+ glTexParameteri( t, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
+ gluBuild2DMipmaps(t, GL_RGB, CHECKBOARD_SIZE, CHECKBOARD_SIZE,
+ GL_RGB, GL_UNSIGNED_BYTE, texture_image);
+
+/* Add some mipmapping LOD bias, to keep sphere texture sharp */
+ float bias=-0.5;
+ /* glTexEnvf(TEXTURE_FILTER_CONTROL_EXT,TEXTURE_LOD_BIAS_EXT,bias); */
+ /* glTexParameteri( t, GL_TEXTURE_MAX_LEVEL,1);*/
+ glTexEnvf(0x8500,0x8501,bias); /* <- numeric version for older OpenGL headers */
+ /* Cap out the mipmap level, to prevent blurring on horizon */
+ glTexParameteri(t, 0x813D, 1);
+ if (glGetError()) {
+ /* Ignore errors in setting funky texture state-- go with defaults.
+ If somebody knows how to check OpenGL 1.2 before doing this, please do!
+ */
+ }
+}
+
+/****************************** GLUI_Rotation::setup_lights() ***********/
+
+void GLUI_Rotation::setup_lights( void )
+{
+ glEnable( GL_LIGHTING );
+ /* if ( enabled )
+ glEnable( GL_LIGHTING );
+ else
+ glDisable( GL_LIGHTING );*/
+ glEnable(GL_LIGHT0);
+ glColorMaterial(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE );
+ glEnable(GL_COLOR_MATERIAL);
+ GLfloat light0_position[] = {-1.f, 1.f, 1.0f, 0.0f};
+ glLightfv(GL_LIGHT0, GL_POSITION, light0_position);
+ if (enabled) { /* enabled colors */
+ GLfloat light0_ambient[] = {0.2f, 0.2f, 0.2f, 1.0f};
+ GLfloat light0_diffuse[] = {1.f, 1.f, 1.0f, 1.0f};
+ glLightfv(GL_LIGHT0, GL_AMBIENT, light0_ambient);
+ glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse);
+ }
+ else { /* disabled colors */
+ GLfloat light0_ambient[] = {0.6f, 0.6f, 0.6f, 1.0f};
+ GLfloat light0_diffuse[] = {0.2f, 0.2f, 0.2f, 1.0f};
+ glLightfv(GL_LIGHT0, GL_AMBIENT, light0_ambient);
+ glLightfv(GL_LIGHT0, GL_DIFFUSE, light0_diffuse);
+ }
+
+}
+
+
+/****************************** GLUI_Rotation::draw_ball() **************/
+
+void GLUI_Rotation::draw_ball( float radius )
+{
+ if ( NOT can_draw() )
+ return;
+
+ if (quadObj == NULL) quadObj = gluNewQuadric();
+ if (quadObj) {
+ gluQuadricDrawStyle(quadObj, GLU_FILL);
+ gluQuadricNormals(quadObj, GLU_SMOOTH);
+ gluQuadricTexture(quadObj, true );
+ glMatrixMode(GL_TEXTURE);
+ glLoadIdentity();
+ double checkerTiles=2.0; /* black-white checker tiles across whole sphere */
+ glScalef(checkerTiles,checkerTiles,1.0);
+ gluSphere(quadObj, radius, 32, 16);
+ glLoadIdentity();
+ glMatrixMode(GL_MODELVIEW);
+ }
+}
+
+
+/****************************** GLUI_Rotation::reset() **********/
+
+void GLUI_Rotation::reset( void )
+{
+ ball->init(); /** reset quaternion, etc. **/
+ ball->set_params( vec2( (float)(w/2), (float)((h-18)/2)),
+ (float) 2.0*(h-18) );
+
+ set_spin( this->damping );
+
+ copy_ball_to_float_array();
+
+ translate_and_draw_front();
+
+ output_live(true); /*** Output live and draw main grx window ***/
+}
+
+
+/****************************** GLUI_Rotation::needs_idle() *********/
+
+bool GLUI_Rotation::needs_idle( void ) const
+{
+ return can_spin;
+}
+
+
+/****************************** GLUI_Rotation::idle() ***************/
+
+void GLUI_Rotation::idle( void )
+{
+ spinning = ball->is_spinning?true:false;
+
+ if ( can_spin AND spinning ) {
+ copy_float_array_to_ball();
+ ball->idle();
+
+ *ball->rot_ptr = *ball->rot_ptr * ball->rot_increment;
+
+ mat4 tmp_rot;
+ tmp_rot = *ball->rot_ptr;
+
+ copy_ball_to_float_array();
+
+ draw_active_area_only = true;
+ translate_and_draw_front();
+ draw_active_area_only = false;
+
+ output_live(true); /** output live and update gfx **/
+ }
+ else {
+ }
+}
+
+
+/********************** GLUI_Rotation::copy_float_array_to_ball() *********/
+
+void GLUI_Rotation::copy_float_array_to_ball( void )
+{
+ int i;
+ float *fp_src, *fp_dst;
+
+ fp_src = &float_array_val[0];
+ fp_dst = &((*ball->rot_ptr)[0][0]);
+
+ for( i=0; i<16; i++ ) {
+ *fp_dst = *fp_src;
+
+ fp_src++;
+ fp_dst++;
+ }
+}
+
+
+/********************** GLUI_Rotation::copy_ball_to_float_array() *********/
+
+void GLUI_Rotation::copy_ball_to_float_array( void )
+{
+ mat4 tmp_rot;
+ tmp_rot = *ball->rot_ptr;
+
+ set_float_array_val( (float*) &tmp_rot[0][0] );
+}
+
+
+/************************ GLUI_Rotation::set_spin() **********************/
+
+void GLUI_Rotation::set_spin( float damp_factor )
+{
+ if ( damp_factor == 0.0 )
+ can_spin = false;
+ else
+ can_spin = true;
+
+ ball->set_damping( 1.0 - damp_factor );
+
+ this->damping = damp_factor;
+}
+
+
+/************** GLUI_Rotation::GLUI_Rotation() ********************/
+
+GLUI_Rotation::GLUI_Rotation( GLUI_Node *parent,
+ const char *name, float *value_ptr,
+ int id,
+ GLUI_CB cb )
+{
+ common_init();
+ set_ptr_val( value_ptr );
+ user_id = id;
+ set_name( name );
+ callback = cb;
+ parent->add_control( this );
+ init_live();
+
+ /*** Init the live 4x4 matrix. This is different than the standard
+ live variable behavior, since the original value of the 4x4 matrix
+ is ignored and reset to Identity ***/
+/*
+NO! WVB
+ if ( value_ptr != NULL ) {
+ int i, j, index;
+ for( i=0; i<4; i++ ) {
+ for( j=0; j<4; j++ ) {
+ index = i*4+j;
+ if ( i==j )
+ value_ptr[index] = 1.0;
+ else
+ value_ptr[index] = 0.0;
+ }
+ }
+ }
+*/
+ /*init_ball(); */
+
+
+}
+
+
+/************** GLUI_Rotation::common_init() ********************/
+
+void GLUI_Rotation::common_init( void )
+{
+ glui_format_str( name, "Rotation: %p", this );
+// type = GLUI_CONTROL_ROTATION;
+ w = GLUI_ROTATION_WIDTH;
+ h = GLUI_ROTATION_HEIGHT;
+ can_activate = true;
+ live_type = GLUI_LIVE_FLOAT_ARRAY;
+ float_array_size = 16;
+ quadObj = NULL;
+ alignment = GLUI_ALIGN_CENTER;
+ can_spin = false;
+ spinning = false;
+ damping = 0.0;
+ ball = new Arcball;
+
+ reset();
+}
diff --git a/tests/bullet/Extras/glui/glui_scrollbar.cpp b/tests/bullet/Extras/glui/glui_scrollbar.cpp
new file mode 100644
index 00000000..f0fb1370
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_scrollbar.cpp
@@ -0,0 +1,832 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_scrollbar.cpp - GLUI_Scrollbar class
+
+ --------------------------------------------------
+
+ Copyright (c) 2004 John Kew, 1998 Paul Rademacher
+
+ This program is freely distributable without licensing fees and is
+ provided without guarantee or warrantee expressed or implied. This
+ program is -not- in the public domain.
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+#include <cmath>
+#include <cassert>
+
+/*static int __debug=0; */
+
+#define GLUI_SCROLL_GROWTH_STEPS 800
+#define GLUI_SCROLL_MIN_GROWTH_STEPS 100
+#define GLUI_SCROLL_CALLBACK_INTERVAL 1 /* Execute the user's callback every this many clicks */
+
+enum {
+ GLUI_SCROLL_ARROW_UP,
+ GLUI_SCROLL_ARROW_DOWN,
+ GLUI_SCROLL_ARROW_LEFT,
+ GLUI_SCROLL_ARROW_RIGHT
+};
+
+
+/****************************** GLUI_Scrollbar::GLUI_Scrollbar() **********/
+// Constructor, no live var
+GLUI_Scrollbar::GLUI_Scrollbar( GLUI_Node *parent,
+ const char *name,
+ int horz_vert,
+ int data_type,
+ int id, GLUI_CB callback
+ /*,GLUI_Control *object
+ ,GLUI_InterObject_CB obj_cb*/
+ )
+{
+ common_construct(parent, name, horz_vert, data_type, NULL, id, callback/*, object, obj_cb*/);
+}
+
+/****************************** GLUI_Scrollbar::GLUI_Scrollbar() **********/
+// Constructor, int live var
+GLUI_Scrollbar::GLUI_Scrollbar( GLUI_Node *parent, const char *name,
+ int horz_vert,
+ int *live_var,
+ int id, GLUI_CB callback
+ /*,GLUI_Control *object
+ ,GLUI_InterObject_CB obj_cb*/
+ )
+{
+ common_construct(parent, name, horz_vert, GLUI_SCROLL_INT, live_var, id, callback/*, object, obj_cb*/);
+}
+
+/****************************** GLUI_Scrollbar::GLUI_Scrollbar() **********/
+// Constructor, float live var
+GLUI_Scrollbar::GLUI_Scrollbar( GLUI_Node *parent, const char *name,
+ int horz_vert,
+ float *live_var,
+ int id, GLUI_CB callback
+ /*,GLUI_Control *object
+ ,GLUI_InterObject_CB obj_cb*/
+ )
+{
+ common_construct(parent, name, horz_vert, GLUI_SCROLL_FLOAT, live_var, id, callback/*, object, obj_cb*/);
+}
+
+/****************************** GLUI_Scrollbar::common_init() **********/
+void GLUI_Scrollbar::common_init(void)
+{
+ horizontal = true;
+ h = GLUI_SCROLL_ARROW_HEIGHT;
+ w = GLUI_TEXTBOX_WIDTH;
+ alignment = GLUI_ALIGN_CENTER;
+ x_off = 0;
+ y_off_top = 0;
+ y_off_bot = 0;
+ can_activate = true;
+ state = GLUI_SCROLL_STATE_NONE;
+ growth_exp = GLUI_SCROLL_DEFAULT_GROWTH_EXP;
+ callback_count = 0;
+ first_callback = true;
+ user_speed = 1.0;
+ float_min = 0.0;
+ float_max = 0.0;
+ int_min = 0;
+ int_max = 0;
+ associated_object = NULL;
+ last_update_time=0;
+ velocity_limit=50.0; /* Change value by at most 50 per second */
+ box_length = 0;
+ box_start_position = 0;
+ box_end_position = 0;
+ track_length = 0;
+}
+
+/****************************** GLUI_Scrollbar::common_construct() **********/
+void GLUI_Scrollbar::common_construct(
+ GLUI_Node *parent,
+ const char *name,
+ int horz_vert,
+ int data_type,
+ void *data,
+ int id, GLUI_CB callback
+ /*,GLUI_Control *object,
+ GLUI_InterObject_CB obj_cb*/
+ )
+{
+ common_init();
+
+ // make sure limits are wide enough to hold live value
+ if (data_type==GLUI_SCROLL_FLOAT) {
+ float lo = 0.0f, hi=1.0f;
+ if (data) {
+ float d = *(float*)(data);
+ lo = MIN(lo, d);
+ hi = MAX(hi, d);
+ }
+ this->set_float_limits(lo,hi);
+ this->set_float_val(lo);
+ this->live_type = GLUI_LIVE_FLOAT;
+ } else {
+ int lo = 0, hi=100;
+ if (data) {
+ int d = *(int*)(data);
+ lo = MIN(lo, d);
+ hi = MAX(hi, d);
+ }
+ this->set_int_limits(lo,hi);
+ this->set_int_val(0);
+ this->live_type = GLUI_LIVE_INT;
+ }
+ this->data_type = data_type;
+ this->set_ptr_val( data );
+ this->set_name(name);
+ this->user_id = id;
+ this->callback = callback;
+ //this->associated_object = object;
+ //this->object_cb = obj_cb;
+ this->horizontal=(horz_vert==GLUI_SCROLL_HORIZONTAL);
+ if (this->horizontal) {
+ this->h = GLUI_SCROLL_ARROW_HEIGHT;
+ this->w = GLUI_TEXTBOX_WIDTH;
+ } else {
+ this->h = GLUI_TEXTBOX_HEIGHT;
+ this->w = GLUI_SCROLL_ARROW_WIDTH;
+ }
+ parent->add_control( this );
+ this->init_live();
+}
+
+/****************************** GLUI_Scrollbar::mouse_down_handler() **********/
+
+int GLUI_Scrollbar::mouse_down_handler( int local_x, int local_y )
+{
+ last_update_time=GLUI_Time()-1.0;
+ this->state = find_arrow( local_x, local_y );
+ GLUI_Master.glui_setIdleFuncIfNecessary();
+
+ /* printf( "spinner: mouse down : %d/%d arrow:%d\n", local_x, local_y,
+ find_arrow( local_x, local_y ));
+ */
+
+ if ( state != GLUI_SCROLL_STATE_UP AND state != GLUI_SCROLL_STATE_DOWN)
+ return true;
+
+ reset_growth();
+
+ /*** ints and floats behave a bit differently. When you click on
+ an int spinner, you expect the value to immediately go up by 1, whereas
+ for a float it'll go up only by a fractional amount. Therefore, we
+ go ahead and increment by one for int spinners ***/
+#if 1
+ if ( data_type == GLUI_SCROLL_INT ) {
+ // Allow for possibility of reversed limits
+ int lo = MIN(int_min,int_max);
+ int hi = MAX(int_min,int_max);
+ int increase = int_min < int_max ? 1 : -1;
+ int new_val = int_val;
+ if ( state == GLUI_SCROLL_STATE_UP ) {
+ new_val += increase;
+ } else if ( state == GLUI_SCROLL_STATE_DOWN ) {
+ new_val -= increase;
+ }
+ if (new_val >= lo && new_val <= hi && new_val!=int_val) {
+ set_int_val(new_val);
+ do_callbacks();
+ }
+ }
+#endif
+ do_click();
+ redraw();
+
+ return false;
+}
+
+
+/******************************** GLUI_Scrollbar::mouse_up_handler() **********/
+
+int GLUI_Scrollbar::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ state = GLUI_SCROLL_STATE_NONE;
+ GLUI_Master.glui_setIdleFuncIfNecessary();
+
+ /* printf("spinner: mouse up : %d/%d inside: %d\n",local_x,local_y,inside); */
+
+ /*glutSetCursor( GLUT_CURSOR_INHERIT ); */
+ glutSetCursor( GLUT_CURSOR_LEFT_ARROW );
+
+ redraw();
+
+ /* do_callbacks(); --- stub */
+ /* if ( callback ) */
+ /* callback( this->user_id ); */
+
+ return false;
+}
+
+
+/***************************** GLUI_Scrollbar::mouse_held_down_handler() ******/
+
+int GLUI_Scrollbar::mouse_held_down_handler( int local_x, int local_y,
+ bool new_inside)
+{
+ int new_state;
+ if ( state == GLUI_SCROLL_STATE_NONE )
+ return false;
+
+ /* printf("spinner: mouse held: %d/%d inside: %d\n",local_x,local_y,
+ new_inside);
+ */
+
+ if ( state == GLUI_SCROLL_STATE_SCROLL) { /* dragging? */
+ do_drag( local_x-x_abs, local_y-y_abs );
+ }
+ else { /* not dragging */
+ new_state = find_arrow( local_x, local_y );
+
+ if ( new_state == state ) {
+ /** Still in same arrow **/
+ do_click();
+ }
+ }
+ redraw();
+
+ return false;
+}
+
+
+/****************************** GLUI_Scrollbar::key_handler() **********/
+
+int GLUI_Scrollbar::key_handler( unsigned char key,int modifiers )
+{
+ return true;
+}
+
+
+/****************************** GLUI_Scrollbar::draw() **********/
+
+void GLUI_Scrollbar::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( horizontal ) {
+ draw_scroll_arrow(GLUI_SCROLL_ARROW_LEFT, 0, 0);
+ draw_scroll_arrow(GLUI_SCROLL_ARROW_RIGHT, w-GLUI_SCROLL_ARROW_WIDTH, 0);
+ } else {
+ draw_scroll_arrow(GLUI_SCROLL_ARROW_UP, 0, 0);
+ draw_scroll_arrow(GLUI_SCROLL_ARROW_DOWN, 0, h-GLUI_SCROLL_ARROW_HEIGHT);
+ }
+ draw_scroll();
+}
+
+
+/****************************** GLUI_Scrollbar::draw_scroll_arrow() **********/
+
+void GLUI_Scrollbar::draw_scroll_arrow(int arrowtype, int x, int y)
+{
+ float offset=0;
+ float L=3.5f,HC=7.f,R=10.5f;
+ float T=4.5f,VC=8.f,B=11.5;
+ const float verts[][6]={
+ { L,10.5f, R, 10.5f, HC, 6.5f }, // up arrow
+ { L,6.5f, R, 6.5f, HC,10.5f }, // down arrow
+ { R-2,T, R-2, B, L+1, VC }, // left arrow
+ { L+2,T, L+2, B, R-1, VC } // right arrow
+ };
+
+ const float *tri = NULL;
+
+ switch (arrowtype)
+ {
+ case GLUI_SCROLL_ARROW_UP:
+ tri = verts[0];
+ if (state & GLUI_SCROLL_STATE_UP) offset = 1;
+ break;
+
+ case GLUI_SCROLL_ARROW_DOWN:
+ tri = verts[1];
+ if (state & GLUI_SCROLL_STATE_DOWN) offset = 1;
+ break;
+
+ case GLUI_SCROLL_ARROW_LEFT:
+ tri = verts[2];
+ if (state & GLUI_SCROLL_STATE_DOWN) offset = 1;
+ break;
+
+ case GLUI_SCROLL_ARROW_RIGHT:
+ tri = verts[3];
+ if (state & GLUI_SCROLL_STATE_UP) offset = 1;
+ break;
+
+ default:
+ return; /* tri is NULL */
+ }
+
+ glColor3ubv(&glui->bkgd_color.r);
+ glRecti(x,y,x+GLUI_SCROLL_ARROW_WIDTH,y+GLUI_SCROLL_ARROW_HEIGHT);
+ if (!offset) {
+ glui->draw_raised_box(x,y+1,GLUI_SCROLL_ARROW_WIDTH-1,GLUI_SCROLL_ARROW_HEIGHT-1);
+ } else {
+ glColor3ub(128,128,128);
+ glBegin(GL_LINE_LOOP);
+ int x2=x+GLUI_SCROLL_ARROW_WIDTH, y2=y+GLUI_SCROLL_ARROW_HEIGHT;
+ glVertex2i(x ,y);
+ glVertex2i(x2,y);
+ glVertex2i(x2,y2);
+ glVertex2i(x ,y2);
+ glEnd();
+ }
+
+ GLubyte black[]={0,0,0};
+ GLubyte white[]={255,255,255};
+ GLubyte gray[]={128,128,128};
+ GLubyte *color=black;
+ if (!enabled) {
+ offset = 1;
+ color = white;
+ }
+ glTranslatef(x+offset,y+offset,0);
+ glColor3ubv(color);
+ glBegin(GL_TRIANGLES);
+ glVertex2fv(tri); glVertex2fv(tri+2), glVertex2fv(tri+4);
+ glEnd();
+ glTranslatef(-(x+offset),-(y+offset),0);
+
+ if (!enabled) { // once more!
+ glTranslatef(x,y,0);
+ glColor3ubv(gray);
+ glBegin(GL_TRIANGLES);
+ glVertex2fv(tri); glVertex2fv(tri+2), glVertex2fv(tri+4);
+ glEnd();
+ glTranslatef(-x,-y,0);
+ }
+}
+
+
+void GLUI_Scrollbar::draw_scroll() {
+ update_scroll_parameters();
+
+ // Draw track using a checkerboard background
+ const unsigned char scroll_bg[] = {
+ 0xD4, 0xD0, 0xC8, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xD4, 0xD0, 0xC8
+ };
+ glColor3f( 1.0, 1.0, 1.0 );
+ glPixelStorei( GL_UNPACK_ALIGNMENT, 1 );
+ glEnable( GL_TEXTURE_2D);
+ glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+ glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_RGB, 2, 2, 0, GL_RGB, GL_UNSIGNED_BYTE,
+ scroll_bg);
+
+ float y0 = horizontal? 0 : GLUI_SCROLL_ARROW_HEIGHT;
+ float y1 = horizontal? h : h-GLUI_SCROLL_ARROW_HEIGHT;
+ float x0 = horizontal? GLUI_SCROLL_ARROW_WIDTH : 0;
+ float x1 = horizontal? w-GLUI_SCROLL_ARROW_WIDTH : w;
+ x0-=0.5; y0+=0.5;
+ x1-=0.5; y1+=0.5;
+ float dy = y1-y0;
+ float dx = x1-x0;
+ glBegin(GL_QUADS);
+ glTexCoord2f(0, 0); glVertex2f(x0,y0);
+ glTexCoord2f(dx*0.5f,0); glVertex2f(x1,y0);
+ glTexCoord2f(dx*0.5f,dy*0.5f); glVertex2f(x1,y1);
+ glTexCoord2f(0, dy*0.5f); glVertex2f(x0,y1);
+ glEnd();
+ glDisable(GL_TEXTURE_2D);
+
+ // Draw scroll box
+ int box = box_start_position;
+ if (horizontal) {
+ box += GLUI_SCROLL_ARROW_WIDTH;
+ draw_scroll_box(box,1,box_length,h);
+ } else {
+ box += GLUI_SCROLL_ARROW_HEIGHT+1;
+ draw_scroll_box(0,box,w,box_length);
+ }
+}
+
+/****************************** GLUI_Scrollbar::draw_scroll_box() **********/
+
+void GLUI_Scrollbar::draw_scroll_box(int x, int y, int w, int h)
+{
+ if (!enabled) return;
+ glColor3ubv(&glui->bkgd_color.r);
+ glRecti(x,y,x+w,y+h);
+ glui->draw_raised_box(x,y, w-1, h-1);
+
+ if (active) {
+ glEnable( GL_LINE_STIPPLE );
+ glLineStipple( 1, 0x5555 );
+ glColor3f( 0., 0., 0. );
+ glBegin(GL_LINE_LOOP);
+ int x1 = x+2, y1 = y+2, x2 = x+w-4, y2 = y+h-4;
+ glVertex2i(x1,y1);
+ glVertex2i(x2,y1);
+ glVertex2i(x2,y2);
+ glVertex2i(x1,y2);
+ glEnd();
+ glDisable( GL_LINE_STIPPLE );
+ }
+}
+
+
+
+/**************************** update_scroll_parameters ***********/
+
+void GLUI_Scrollbar::update_scroll_parameters() {
+ track_length = horizontal?
+ this->w-GLUI_SCROLL_ARROW_WIDTH*2 :
+ this->h-GLUI_SCROLL_ARROW_HEIGHT*2;
+ if (data_type==GLUI_SCROLL_INT)
+ {
+ if (int_max==int_min)
+ box_length=track_length;
+ else {
+ const int MIN_TAB = GLUI_SCROLL_BOX_STD_HEIGHT;
+ //box_length = int(track_length/float(visible_range));
+ //if (box_length < MIN_TAB)
+ box_length = MIN_TAB;
+ }
+ float pixels_per_unit = (track_length-box_length)/float(int_max-int_min);
+ if (horizontal)
+ box_start_position = int((int_val-int_min)*pixels_per_unit);
+ else
+ box_start_position = int((int_max-int_val)*pixels_per_unit);
+ box_end_position = box_start_position+box_length;
+ }
+ else if (data_type==GLUI_SCROLL_FLOAT)
+ {
+ if (float_max==float_min)
+ box_length=track_length;
+ else {
+ box_length = GLUI_SCROLL_BOX_STD_HEIGHT;
+ }
+ float pixels_per_unit = (track_length-box_length)/float(float_max-float_min);
+ if (horizontal)
+ box_start_position = int((float_val-float_min)*pixels_per_unit);
+ else
+ box_start_position = int((float_max-float_val)*pixels_per_unit);
+ box_end_position = box_start_position+box_length;
+ }
+}
+
+
+/********************************* GLUI_Scrollbar::special_handler() **********/
+
+int GLUI_Scrollbar::special_handler( int key,int modifiers )
+{
+ if ( !horizontal && key == GLUT_KEY_UP ) {
+ mouse_down_handler( x_abs + w - GLUI_SCROLL_ARROW_WIDTH + 1,
+ y_abs + 1 );
+ mouse_up_handler( x_abs + w - GLUI_SCROLL_ARROW_WIDTH + 1,
+ y_abs + 1, true );
+ }
+ else if ( !horizontal && key == GLUT_KEY_DOWN ) {
+ mouse_down_handler(x_abs + w - GLUI_SCROLL_ARROW_WIDTH + 1,
+ y_abs+1+GLUI_SCROLL_ARROW_HEIGHT);
+ mouse_up_handler( x_abs + w - GLUI_SCROLL_ARROW_WIDTH + 1,
+ y_abs+1 +GLUI_SCROLL_ARROW_HEIGHT,
+ true );
+ }
+ if ( horizontal && key == GLUT_KEY_LEFT ) {
+ mouse_down_handler( x_abs + 1,y_abs + 1 );
+ mouse_up_handler( x_abs + 1, y_abs + 1, true );
+ }
+ else if ( horizontal && key == GLUT_KEY_RIGHT ) {
+ mouse_down_handler(x_abs + w - GLUI_SCROLL_ARROW_WIDTH + 1,
+ y_abs+1);
+ mouse_up_handler( x_abs + w - GLUI_SCROLL_ARROW_WIDTH + 1,
+ y_abs+1,
+ true );
+ }
+ else if ( key == GLUT_KEY_HOME ) { /** Set value to limit top -
+ or increment by 10 **/
+ }
+ else if ( key == GLUT_KEY_END ) {
+ }
+
+ return true;
+}
+
+
+/************************************ GLUI_Scrollbar::update_size() **********/
+
+void GLUI_Scrollbar::update_size( void )
+{
+ if (horizontal) {
+ h = GLUI_SCROLL_ARROW_HEIGHT;
+ if (associated_object) {
+ this->w = ((GLUI_Control *)associated_object)->w;
+ }
+ }
+ else {
+ w = GLUI_SCROLL_ARROW_WIDTH;
+ if (associated_object) {
+ this->h = ((GLUI_Control *)associated_object)->h;
+ }
+ }
+}
+
+
+/************************************ GLUI_Scrollbar::find_arrow() ************/
+
+int GLUI_Scrollbar::find_arrow( int local_x, int local_y )
+{
+
+ local_x = local_x-x_abs;
+ local_y = local_y-y_abs;
+
+ if (horizontal)
+ {
+ if ( local_y >= h-GLUI_SCROLL_ARROW_HEIGHT-3 && local_y <= h)
+ {
+ update_scroll_parameters();
+ if ( local_x >= 0 AND local_x <= (GLUI_SCROLL_ARROW_WIDTH+box_start_position) )
+ {
+ return GLUI_SCROLL_STATE_DOWN;
+ }
+ if ( local_x >= (GLUI_SCROLL_ARROW_WIDTH+box_end_position)
+ AND local_x <= (w+GLUI_SCROLL_ARROW_WIDTH) )
+ {
+ return GLUI_SCROLL_STATE_UP;
+ }
+ return GLUI_SCROLL_STATE_SCROLL;
+ }
+ }
+ else
+ {
+ if ( local_x >= w-GLUI_SCROLL_ARROW_WIDTH-3 && local_x <= w)
+ {
+ update_scroll_parameters();
+ if ( local_y >= 0 AND local_y <= (GLUI_SCROLL_ARROW_HEIGHT+box_start_position) )
+ {
+ return GLUI_SCROLL_STATE_UP;
+ }
+ if ( local_y >= (GLUI_SCROLL_ARROW_HEIGHT+box_end_position)
+ AND local_y <= (h+GLUI_SCROLL_ARROW_HEIGHT) )
+ {
+ return GLUI_SCROLL_STATE_DOWN;
+ }
+ return GLUI_SCROLL_STATE_SCROLL;
+ }
+ }
+
+ return GLUI_SCROLL_STATE_NONE;
+}
+
+/***************************************** GLUI_Scrollbar::do_click() **********/
+
+void GLUI_Scrollbar::do_click( void )
+{
+ int direction = 0;
+
+ if ( state == GLUI_SCROLL_STATE_UP )
+ direction = +1;
+ else if ( state == GLUI_SCROLL_STATE_DOWN )
+ direction = -1;
+
+ if (data_type==GLUI_SCROLL_INT&&int_min>int_max) direction*=-1;
+ if (data_type==GLUI_SCROLL_FLOAT&&float_min>float_max) direction*=-1;
+
+ increase_growth();
+
+ float modifier_factor = 1.0;
+ float incr = growth * modifier_factor * user_speed ;
+
+ double frame_time=GLUI_Time()-last_update_time;
+ double frame_limit=velocity_limit*frame_time;
+ if (incr>frame_limit) incr=frame_limit; /* don't scroll faster than limit */
+ last_update_time=GLUI_Time();
+
+ float new_val = float_val;
+
+ new_val += direction * incr;
+ if (1 || data_type==GLUI_SCROLL_FLOAT) set_float_val(new_val);
+ if (0 && data_type==GLUI_SCROLL_INT) set_int_val((int)new_val);
+ //printf("do_click: incr %f val=%f float_val=%f\n",incr,new_val,float_val);
+
+ /*** Now update live variable and do callback. We don't want
+ to do the callback on each iteration of this function, just on every
+ i^th iteration, where i is given by GLUI_SCROLL_CALLBACK_INTERVAL ****/
+ callback_count++;
+ if ( (callback_count % GLUI_SCROLL_CALLBACK_INTERVAL ) == 0 )
+ do_callbacks();
+
+}
+
+
+/***************************************** GLUI_Scrollbar::do_drag() **********/
+
+void GLUI_Scrollbar::do_drag( int x, int y )
+{
+ int direction = 0;
+ float incr, modifier_factor;
+ /* int delta_x; */
+ int new_int_val = int_val;
+ float new_float_val = float_val;
+
+ int free_len = track_length-box_length;
+ if (free_len == 0) return;
+
+ modifier_factor = 1.0;
+ if ( state == GLUI_SCROLL_STATE_SCROLL) {
+ update_scroll_parameters();
+
+ int hbox = box_length/2;
+ if (horizontal) {
+ int track_v = x-GLUI_SCROLL_ARROW_WIDTH;
+ new_int_val = int_min + (track_v-hbox)*(int_max-int_min)/free_len;
+ new_float_val = float_min + (track_v-hbox)*(float_max-float_min)/float(free_len);
+ } else {
+ int track_v = y-GLUI_SCROLL_ARROW_HEIGHT;
+ new_int_val = int_max - (track_v-hbox)*(int_max-int_min)/free_len;
+ new_float_val = float_max - (track_v-hbox)*(float_max-float_min)/float(free_len);
+ }
+ }
+ else {
+ if ( state == GLUI_SCROLL_STATE_UP )
+ direction = +1;
+ else if ( state == GLUI_SCROLL_STATE_DOWN )
+ direction = -1;
+ incr = growth * direction * modifier_factor * user_speed;
+ new_int_val += direction;
+ new_float_val += direction * (float_max-float_min)/free_len;
+ }
+ last_y = y;
+ last_x = x;
+
+ /*** Now update live variable and do callback. We don't want
+ to do the callback on each iteration of this function, just on every
+ i^th iteration, where i is given by GLUI_SCROLL_CALLBACK_INTERVAL ****/
+ if(data_type==GLUI_SCROLL_INT)
+ set_int_val(new_int_val);
+ else if (data_type==GLUI_SCROLL_FLOAT)
+ set_float_val(new_float_val);
+
+ callback_count++;
+ if ( (callback_count % GLUI_SCROLL_CALLBACK_INTERVAL ) == 0 )
+ do_callbacks();
+}
+
+
+/***************************************** GLUI_Scrollbar::needs_idle() ******/
+
+bool GLUI_Scrollbar::needs_idle( void ) const
+{
+ if (state == GLUI_SCROLL_STATE_UP OR state == GLUI_SCROLL_STATE_DOWN ) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+/***************************************** GLUI_Scrollbar::idle() **********/
+
+void GLUI_Scrollbar::idle( void )
+{
+ if ( NOT needs_idle() )
+ return;
+ else
+ do_click();
+}
+
+
+/************************************ GLUI_Scrollbar::do_callbacks() **********/
+
+void GLUI_Scrollbar::do_callbacks( void )
+{
+
+ /* *******************************************/
+
+ if ( NOT first_callback ) {
+ if ( data_type == GLUI_SCROLL_INT AND int_val == last_int_val ) {
+ return;
+ }
+ if ( data_type == GLUI_SPINNER_FLOAT AND float_val == last_float_val ) {
+ return;
+ }
+ }
+
+ if (associated_object == NULL) {
+ this->execute_callback();
+ }
+ else { // Use internal Callbacks
+ if (object_cb) {
+ //object_cb(associated_object, int_val);
+ object_cb(this);
+ }
+ }
+ last_int_val = int_val;
+ last_float_val = float_val;
+ first_callback = false;
+}
+
+
+/********************************** GLUI_Scrollbar::set_float_val() ************/
+
+void GLUI_Scrollbar::set_float_val( float new_val )
+{
+ // Allow for the possibility that the limits are reversed
+ float hi = MAX(float_min,float_max);
+ float lo = MIN(float_min,float_max);
+ if (new_val > hi)
+ new_val = hi;
+ if (new_val < lo)
+ new_val = lo;
+ last_float_val = float_val;
+ float_val = new_val;
+ int_val = (int)new_val;
+
+ redraw();
+
+ /*** Now update the live variable ***/
+ output_live(true);
+}
+
+
+/********************************** GLUI_Scrollbar::set_int_val() ************/
+
+void GLUI_Scrollbar::set_int_val( int new_val )
+{
+ // Allow for the possibility that the limits are reversed
+ int hi = MAX(int_min,int_max);
+ int lo = MIN(int_min,int_max);
+ if (new_val > hi)
+ new_val = hi;
+ if (new_val < lo)
+ new_val = lo;
+ last_int_val = int_val;
+ float_val = int_val = new_val;
+
+ redraw();
+
+ /*** Now update the live variable ***/
+ output_live(true);
+}
+
+/*********************************** GLUI_Scrollbar::set_float_limits() *********/
+
+void GLUI_Scrollbar::set_float_limits( float low, float high, int limit_type )
+{
+ if (limit_type != GLUI_LIMIT_CLAMP) {
+ // error!
+ }
+ float_min = low;
+ float_max = high;
+ // Allow for possiblitly of reversed limits
+ float lo = MIN(low,high);
+ float hi = MAX(low,high);
+ if (float_val<lo) set_float_val(lo);
+ if (float_val>hi) set_float_val(hi);
+}
+
+
+/*********************************** GLUI_Scrollbar::set_int_limits() *********/
+
+void GLUI_Scrollbar::set_int_limits( int low, int high, int limit_type )
+{
+ if (limit_type != GLUI_LIMIT_CLAMP) {
+ // error!
+ }
+ int_min = low;
+ int_max = high;
+ // Allow for possiblitly of reversed limits
+ int lo = MIN(low,high);
+ int hi = MAX(low,high);
+ if (int_val<lo) set_int_val(lo);
+ if (int_val>hi) set_int_val(hi);
+ float_min = low;
+ float_max = high;
+}
+
+
+/*********************************** GLUI_Scrollbar::reset_growth() *************/
+
+void GLUI_Scrollbar::reset_growth( void )
+{
+ growth = fabs(float_max - float_min) / float(GLUI_SCROLL_GROWTH_STEPS);
+ if (data_type == GLUI_SCROLL_INT && growth<1) growth=1;
+}
+
+
+/******************************* GLUI_Scrollbar::increase_growth() *************/
+
+void GLUI_Scrollbar::increase_growth( void )
+{
+ float range=0;
+ if (data_type==GLUI_SCROLL_FLOAT)
+ range = fabs(float_max-float_min);
+ else
+ range = fabs(float(int_max-int_min));
+ if ( growth < (range / float(GLUI_SCROLL_MIN_GROWTH_STEPS)) )
+ growth *= growth_exp;
+ return;
+}
+
+
+
diff --git a/tests/bullet/Extras/glui/glui_separator.cpp b/tests/bullet/Extras/glui/glui_separator.cpp
new file mode 100644
index 00000000..87907d8a
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_separator.cpp
@@ -0,0 +1,75 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_separator.cpp - GLUI_Separator control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+/****************************** GLUI_Separator::GLUI_Separator() **********/
+
+GLUI_Separator::GLUI_Separator( GLUI_Node *parent )
+{
+ common_init();
+ parent->add_control( this );
+}
+
+/****************************** GLUI_Separator::draw() **********/
+
+void GLUI_Separator::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ int width, indent;
+ int cont_x, cont_y, cont_w, cont_h, cont_x_off, cont_y_off;
+
+ if ( parent() != NULL ) {
+ get_this_column_dims(&cont_x, &cont_y, &cont_w, &cont_h,
+ &cont_x_off, &cont_y_off);
+
+ width = cont_w - cont_x_off*2;
+ }
+ else {
+ width = this->w;
+ }
+
+ indent = (int) floor(width * .05);
+
+ glLineWidth( 1.0 );
+ glBegin( GL_LINES );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( indent, GLUI_SEPARATOR_HEIGHT/2-1 );
+ glVertex2i( width-indent, GLUI_SEPARATOR_HEIGHT/2-1 );
+
+ glColor3f( 1., 1., 1. );
+ glVertex2i( indent, GLUI_SEPARATOR_HEIGHT/2 );
+ glVertex2i( width-indent, GLUI_SEPARATOR_HEIGHT/2 );
+ glEnd();
+}
+
+
diff --git a/tests/bullet/Extras/glui/glui_spinner.cpp b/tests/bullet/Extras/glui/glui_spinner.cpp
new file mode 100644
index 00000000..98677391
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_spinner.cpp
@@ -0,0 +1,630 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_spinner.cpp - GLUI_Spinner class
+
+
+ notes:
+ spinner does not explicitly keep track of the current value - this is all
+ handled by the underlying edittext control
+ -> thus, spinner->sync_live() has no meaning, nor spinner->output_live
+ -> BUT, edittext will alter this spinner's float_val and int_val,
+ so that spinner->get/set will work
+
+
+FIXME: there's a heck of a lot of duplication between this and glui_scrollbar.cpp.
+ (OSL, 2006/06)
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+#include <cmath>
+#include <cassert>
+
+/*static int __debug=0; */
+
+#define GLUI_SPINNER_GROWTH_STEPS 800
+#define GLUI_SPINNER_MIN_GROWTH_STEPS 100
+#define GLUI_SPINNER_CALLBACK_INTERVAL 1
+
+
+
+
+/****************************** GLUI_Spinner::GLUI_Spinner() ****************/
+
+GLUI_Spinner::GLUI_Spinner( GLUI_Node* parent, const char *name,
+ int data_type, int id, GLUI_CB callback )
+{
+ common_construct(parent, name, data_type, NULL, id, callback);
+}
+
+/****************************** GLUI_Spinner::GLUI_Spinner() ****************/
+
+GLUI_Spinner::GLUI_Spinner( GLUI_Node* parent, const char *name,
+ int *live_var, int id, GLUI_CB callback )
+{
+ common_construct(parent, name, GLUI_SPINNER_INT, live_var, id, callback);
+}
+
+/****************************** GLUI_Spinner::GLUI_Spinner() ****************/
+
+GLUI_Spinner::GLUI_Spinner( GLUI_Node* parent, const char *name,
+ float *live_var, int id, GLUI_CB callback )
+{
+ common_construct(parent, name, GLUI_SPINNER_FLOAT, live_var, id, callback);
+}
+
+/****************************** GLUI_Spinner::GLUI_Spinner() ****************/
+
+GLUI_Spinner::GLUI_Spinner( GLUI_Node *parent, const char *name,
+ int data_t, void *live_var,
+ int id, GLUI_CB callback )
+{
+ common_construct(parent, name, data_t, live_var, id, callback);
+}
+
+/****************************** GLUI_Spinner::common_construct() ************/
+
+void GLUI_Spinner::common_construct( GLUI_Node* parent, const char *name,
+ int data_t, void *data,
+ int id, GLUI_CB cb )
+{
+ common_init();
+
+ if ( NOT strcmp( name, "Spinner Test" ))
+ id=id;
+
+ int text_type;
+ if ( data_t == GLUI_SPINNER_INT ) {
+ text_type = GLUI_EDITTEXT_INT;
+ }
+ else if ( data_t == GLUI_SPINNER_FLOAT ) {
+ text_type = GLUI_EDITTEXT_FLOAT;
+ }
+ else {
+ assert(0); /* Did not pass in a valid data type */
+ }
+
+ user_id = id;
+ data_type = data_t;
+ callback = cb;
+ set_name( name );
+ //glui = parent->get_glui();
+
+ parent->add_control( this );
+
+ GLUI_EditText *txt =
+ new GLUI_EditText( this, name, text_type, data, id, cb);
+
+ edittext = txt; /* Link the edittext to the spinner */
+ /* control->ptr_val = data; */
+
+ edittext->spinner = this; /* Link the spinner to the edittext */
+
+}
+
+/****************************** GLUI_Spinner::mouse_down_handler() **********/
+
+int GLUI_Spinner::mouse_down_handler( int local_x, int local_y )
+{
+ this->state = find_arrow( local_x, local_y );
+ GLUI_Master.glui_setIdleFuncIfNecessary();
+
+ /* printf( "spinner: mouse down : %d/%d arrow:%d\n", local_x, local_y,
+ find_arrow( local_x, local_y ));
+ */
+
+ if ( state != GLUI_SPINNER_STATE_UP AND state != GLUI_SPINNER_STATE_DOWN )
+ return true;
+
+ reset_growth();
+ redraw();
+
+ /*** ints and floats behave a bit differently. When you click on
+ an int spinner, you expect the value to immediately go up by 1, whereas
+ for a float it'll go up only by a fractional amount. Therefore, we
+ go ahead and increment by one for int spinners ***/
+ if ( data_type == GLUI_SPINNER_INT ) {
+ if ( state == GLUI_SPINNER_STATE_UP )
+ edittext->set_float_val( edittext->float_val + 1.0 );
+ else if ( state == GLUI_SPINNER_STATE_DOWN )
+ edittext->set_float_val( edittext->float_val - .9 );
+ }
+
+ do_click();
+
+ return false;
+}
+
+
+/******************************** GLUI_Spinner::mouse_up_handler() **********/
+
+int GLUI_Spinner::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ state = GLUI_SPINNER_STATE_NONE;
+ GLUI_Master.glui_setIdleFuncIfNecessary();
+
+ /* printf("spinner: mouse up : %d/%d inside: %d\n",local_x,local_y,inside); */
+
+ /*glutSetCursor( GLUT_CURSOR_INHERIT ); */
+ glutSetCursor( GLUT_CURSOR_LEFT_ARROW );
+ redraw();
+
+ /* do_callbacks(); --- stub */
+ /* if ( callback ) */
+ /* callback( this->user_id ); */
+
+ return false;
+}
+
+
+/***************************** GLUI_Spinner::mouse_held_down_handler() ******/
+
+int GLUI_Spinner::mouse_held_down_handler( int local_x, int local_y,
+ bool new_inside)
+{
+ int new_state;
+
+ if ( state == GLUI_SPINNER_STATE_NONE )
+ return false;
+
+ /* printf("spinner: mouse held: %d/%d inside: %d\n",local_x,local_y,
+ new_inside);
+ */
+
+ if ( state == GLUI_SPINNER_STATE_BOTH ) { /* dragging? */
+ do_drag( local_x, local_y );
+ }
+ else { /* not dragging */
+ new_state = find_arrow( local_x, local_y );
+
+ if ( new_state == state ) {
+ /** Still in same arrow **/
+ do_click();
+ }
+ else {
+ if ( new_inside OR 1) {
+ /** The state changed, but we're still inside - that
+ means we moved off the arrow: begin dragging **/
+ state = GLUI_SPINNER_STATE_BOTH;
+ }
+ else {
+ /*** Here check y of mouse position to determine whether to
+ drag ***/
+
+ /* ... */
+ }
+ }
+
+ /*** We switched to up/down dragging ***/
+ if ( state == GLUI_SPINNER_STATE_BOTH ) {
+ glutSetCursor( GLUT_CURSOR_UP_DOWN );
+ last_x = local_x;
+ last_y = local_y;
+
+ /** If the spinner has limits, we reset the growth value, since
+ reset_growth() will compute a new growth value for dragging
+ vs. clicking. If the spinner has no limits, then we just let the
+ growth remain at whatever the user has incremented it up to **/
+ if ( edittext->has_limits != GLUI_LIMIT_NONE )
+ reset_growth();
+ }
+
+ redraw();
+ }
+
+ return false;
+}
+
+
+/****************************** GLUI_Spinner::key_handler() **********/
+
+int GLUI_Spinner::key_handler( unsigned char key,int modifiers )
+{
+
+
+ return true;
+}
+
+
+/****************************** GLUI_Spinner::draw() **********/
+
+void GLUI_Spinner::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( enabled ) {
+ /*** Draw the up arrow either pressed or unrpessed ***/
+ if ( state == GLUI_SPINNER_STATE_UP OR state == GLUI_SPINNER_STATE_BOTH )
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_SPINNER_UP_ON,
+ w-GLUI_SPINNER_ARROW_WIDTH-1,
+ GLUI_SPINNER_ARROW_Y);
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_SPINNER_UP_OFF,
+ w-GLUI_SPINNER_ARROW_WIDTH-1,
+ GLUI_SPINNER_ARROW_Y);
+
+ /*** Draw the down arrow either pressed or unrpessed ***/
+ if (state == GLUI_SPINNER_STATE_DOWN OR state == GLUI_SPINNER_STATE_BOTH)
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_SPINNER_DOWN_ON,
+ w-GLUI_SPINNER_ARROW_WIDTH-1,
+ GLUI_SPINNER_ARROW_HEIGHT+GLUI_SPINNER_ARROW_Y);
+ else
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_SPINNER_DOWN_OFF,
+ w-GLUI_SPINNER_ARROW_WIDTH-1,
+ GLUI_SPINNER_ARROW_HEIGHT+GLUI_SPINNER_ARROW_Y);
+ }
+ else { /**** The spinner is disabled ****/
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_SPINNER_UP_DIS,
+ w-GLUI_SPINNER_ARROW_WIDTH-1,
+ GLUI_SPINNER_ARROW_Y);
+ glui->std_bitmaps.draw( GLUI_STDBITMAP_SPINNER_DOWN_DIS,
+ w-GLUI_SPINNER_ARROW_WIDTH-1,
+ GLUI_SPINNER_ARROW_HEIGHT+GLUI_SPINNER_ARROW_Y);
+ }
+
+ if ( active ) {
+ glColor3ub( 0, 0, 0 );
+ glEnable( GL_LINE_STIPPLE );
+ glLineStipple( 1, 0x5555 );
+ }
+ else {
+ glColor3ub( glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b );
+ }
+
+ glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( w-GLUI_SPINNER_ARROW_WIDTH-2, 0 );
+ glVertex2i( w, 0 );
+ glVertex2i( w, h );
+ glVertex2i( w-GLUI_SPINNER_ARROW_WIDTH-2, h );
+ glEnd();
+ glDisable( GL_LINE_STIPPLE );
+ glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
+}
+
+
+/********************************* GLUI_Spinner::special_handler() **********/
+
+int GLUI_Spinner::special_handler( int key,int modifiers )
+{
+ if ( key == GLUT_KEY_UP ) { /** Simulate a click in the up arrow **/
+ mouse_down_handler( x_abs + w - GLUI_SPINNER_ARROW_WIDTH + 1,
+ y_abs + GLUI_SPINNER_ARROW_Y+1 );
+ mouse_up_handler( x_abs + w - GLUI_SPINNER_ARROW_WIDTH + 1,
+ y_abs + GLUI_SPINNER_ARROW_Y+1, true );
+ }
+ else if ( key == GLUT_KEY_DOWN ) { /** Simulate a click in the up arrow **/
+ mouse_down_handler(x_abs + w - GLUI_SPINNER_ARROW_WIDTH + 1,
+ y_abs+GLUI_SPINNER_ARROW_Y+1+GLUI_SPINNER_ARROW_HEIGHT);
+ mouse_up_handler( x_abs + w - GLUI_SPINNER_ARROW_WIDTH + 1,
+ y_abs+GLUI_SPINNER_ARROW_Y+1 +GLUI_SPINNER_ARROW_HEIGHT,
+ true );
+ }
+ else if ( key == GLUT_KEY_HOME ) { /** Set value to limit top -
+ or increment by 10 **/
+ }
+ else if ( key == GLUT_KEY_END ) {
+ }
+
+ return true;
+}
+
+
+/******************************* GLUI_Spinner::set_float_val() ************/
+
+void GLUI_Spinner::set_float_val( float new_val )
+{
+ if ( NOT edittext )
+ return;
+
+ edittext->set_float_val( new_val );
+}
+
+
+/********************************** GLUI_Spinner::set_int_val() ************/
+
+void GLUI_Spinner::set_int_val( int new_val )
+{
+ if ( NOT edittext )
+ return;
+
+ edittext->set_int_val( new_val );
+}
+
+
+/************************************ GLUI_Spinner::update_size() **********/
+
+void GLUI_Spinner::update_size( void )
+{
+ if (!edittext) return;
+ /*edittext->w = this->w - GLUI_SPINNER_ARROW_WIDTH-3; */
+ this->w = edittext->w + GLUI_SPINNER_ARROW_WIDTH + 3;
+}
+
+
+/************************************ GLUI_Spinner::find_arrow() ************/
+
+int GLUI_Spinner::find_arrow( int local_x, int local_y )
+{
+ local_x -= x_abs;
+ local_y -= y_abs;
+
+ if ( local_x >= (w - GLUI_SPINNER_ARROW_WIDTH) AND
+ local_x <= w ) {
+
+ if ( local_y >= GLUI_SPINNER_ARROW_Y AND
+ local_y <= (GLUI_SPINNER_ARROW_Y+GLUI_SPINNER_ARROW_HEIGHT) )
+ return GLUI_SPINNER_STATE_UP;
+
+ if ( local_y >= GLUI_SPINNER_ARROW_Y+GLUI_SPINNER_ARROW_HEIGHT AND
+ local_y <= (GLUI_SPINNER_ARROW_Y+GLUI_SPINNER_ARROW_HEIGHT*2) )
+ return GLUI_SPINNER_STATE_DOWN;
+
+ }
+
+ return GLUI_SPINNER_STATE_NONE;
+}
+
+
+/***************************************** GLUI_Spinner::do_click() **********/
+
+void GLUI_Spinner::do_click( void )
+{
+ int direction = 0;
+ float incr;
+ float modifier_factor;
+
+ if ( state == GLUI_SPINNER_STATE_UP )
+ direction = +1;
+ else if ( state == GLUI_SPINNER_STATE_DOWN )
+ direction = -1;
+
+ increase_growth();
+
+ modifier_factor = 1.0;
+ if ( glui ) {
+ if ( glui->curr_modifiers & GLUT_ACTIVE_SHIFT )
+ modifier_factor = 100.0f;
+ else if ( glui->curr_modifiers & GLUT_ACTIVE_CTRL )
+ modifier_factor = .01f;
+ }
+
+ if ( this->data_type == GLUI_SPINNER_FLOAT OR 1) {
+ incr = growth * direction * modifier_factor * user_speed;
+ edittext->set_float_val( edittext->float_val + incr );
+ /** Remember, edittext mirrors the float and int values ***/
+ }
+
+ /*** Now update live variable and do callback. We don't want
+ to do the callback on each iteration of this function, just on every
+ i^th iteration, where i is given by GLUI_SPINNER_CALLBACK_INTERVAL ****/
+ callback_count++;
+ if ( (callback_count % GLUI_SPINNER_CALLBACK_INTERVAL ) == 0 )
+ do_callbacks();
+}
+
+
+/***************************************** GLUI_Spinner::do_drag() **********/
+
+void GLUI_Spinner::do_drag( int x, int y )
+{
+ int delta_y;
+ float incr, modifier_factor;
+ /* int delta_x; */
+
+ modifier_factor = 1.0f;
+ if ( glui ) {
+ if ( glui->curr_modifiers & GLUT_ACTIVE_SHIFT )
+ modifier_factor = 100.0f;
+ else if ( glui->curr_modifiers & GLUT_ACTIVE_CTRL )
+ modifier_factor = .01f;
+ }
+
+ /* delta_x = x - last_x; */
+ delta_y = -(y - last_y);
+
+ if ( this->data_type == GLUI_SPINNER_FLOAT OR 1 ) {
+ incr = growth * delta_y * modifier_factor * user_speed;
+ edittext->set_float_val( edittext->float_val + incr );
+ /** Remember, edittext mirrors the float and int values ***/
+ }
+
+ last_x = x;
+ last_y = y;
+
+ /*** Now update live variable and do callback. We don't want
+ to do the callback on each iteration of this function, just on every
+ i^th iteration, where i is given by GLUI_SPINNER_CALLBACK_INTERVAL ****/
+
+ callback_count++;
+ if ( (callback_count % GLUI_SPINNER_CALLBACK_INTERVAL ) == 0 )
+ do_callbacks();
+}
+
+
+/***************************************** GLUI_Spinner::needs_idle() ******/
+
+bool GLUI_Spinner::needs_idle( void ) const
+{
+ if (state == GLUI_SPINNER_STATE_UP OR state == GLUI_SPINNER_STATE_DOWN ) {
+ return true;
+ }
+ else {
+ return false;
+ }
+}
+
+/***************************************** GLUI_Spinner::idle() **********/
+
+void GLUI_Spinner::idle( void )
+{
+ if ( NOT needs_idle() )
+ return;
+ else
+ do_click();
+}
+
+
+/************************************ GLUI_Spinner::do_callbacks() **********/
+
+void GLUI_Spinner::do_callbacks( void )
+{
+ /*** This is not necessary, b/c edittext automatically updates us ***/
+ if ( NOT edittext )
+ return;
+ this->float_val = edittext->float_val;
+ this->int_val = edittext->int_val;
+ /* *******************************************/
+
+ if ( NOT first_callback ) {
+ if ( data_type == GLUI_SPINNER_INT AND int_val == last_int_val ) {
+ return;
+ }
+
+ if ( data_type == GLUI_SPINNER_FLOAT AND float_val == last_float_val ) {
+ return;
+ }
+ }
+
+ this->execute_callback();
+
+ last_int_val = int_val;
+ last_float_val = float_val;
+ first_callback = false;
+}
+
+
+/********************************* GLUI_Spinner::set_float_limits() *********/
+
+void GLUI_Spinner::set_float_limits( float low, float high, int limit_type )
+{
+ if ( NOT edittext )
+ return;
+
+ edittext->set_float_limits( low, high, limit_type );
+}
+
+
+/*********************************** GLUI_Spinner::set_int_limits() *********/
+
+void GLUI_Spinner::set_int_limits( int low, int high, int limit_type )
+{
+ if ( NOT edittext )
+ return;
+
+ edittext->set_int_limits( low, high, limit_type );
+}
+
+
+/*********************************** GLUI_Spinner:reset_growth() *************/
+
+void GLUI_Spinner::reset_growth( void )
+{
+ float lo, hi;
+
+ if ( edittext->has_limits == GLUI_LIMIT_NONE ) {
+ if ( data_type == GLUI_SPINNER_FLOAT )
+ growth = sqrt(ABS(edittext->float_val)) * .05f;
+ else if ( data_type == GLUI_SPINNER_INT )
+ growth = .4f;
+ }
+ else {
+ if ( data_type == GLUI_SPINNER_FLOAT ) {
+ lo = edittext->float_low;
+ hi = edittext->float_high;
+ growth = (hi-lo) / GLUI_SPINNER_GROWTH_STEPS;
+ }
+ else if ( data_type == GLUI_SPINNER_INT ) {
+ lo = (float) edittext->int_low;
+ hi = (float) edittext->int_high;
+
+ growth = (hi-lo) / GLUI_SPINNER_GROWTH_STEPS;
+ }
+ }
+
+ if ( growth == 0.0f )
+ growth = .001f;
+}
+
+
+/******************************* GLUI_Spinner:increase_growth() *************/
+
+void GLUI_Spinner::increase_growth( void )
+{
+ float hi = 0.0,lo = 0.0;
+
+ if ( data_type == GLUI_SPINNER_FLOAT ) {
+ lo = edittext->float_low;
+ hi = edittext->float_high;
+ }
+ else if ( data_type == GLUI_SPINNER_INT ) {
+ lo = (float) edittext->int_low;
+ hi = (float) edittext->int_high;
+ }
+
+ if ( growth < (hi-lo) / GLUI_SPINNER_MIN_GROWTH_STEPS )
+ growth *= growth_exp;
+
+ /* printf( "growth: %f\n", growth ); */
+}
+
+
+/*************************************** GLUI_Spinner:get_text() *************/
+
+const char *GLUI_Spinner::get_text( void )
+{
+ if (edittext)
+ return edittext->text.c_str();
+ else
+ return "";
+}
+
+
+/********************************** GLUI_Spinner:get_float_val() *************/
+
+float GLUI_Spinner::get_float_val( void )
+{
+ if (edittext)
+ return edittext->float_val;
+ else
+ return 0.0f;
+}
+
+
+/********************************** GLUI_Spinner:get_int_val() *************/
+
+int GLUI_Spinner::get_int_val( void )
+{
+ if (edittext)
+ return edittext->int_val;
+ else
+ return 0;
+}
+
+
diff --git a/tests/bullet/Extras/glui/glui_statictext.cpp b/tests/bullet/Extras/glui/glui_statictext.cpp
new file mode 100644
index 00000000..21ffa13a
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_statictext.cpp
@@ -0,0 +1,105 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_statictext.cpp - GLUI_StaticText Control
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+/****************************** GLUI_StaticText::GLUI_StaticText() **********/
+GLUI_StaticText::GLUI_StaticText( GLUI_Node *parent, const char *name )
+{
+ common_init();
+ set_name( name );
+ parent->add_control( this );
+}
+
+/****************************** GLUI_StaticText::draw() **********/
+
+void GLUI_StaticText::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ draw_text();
+}
+
+
+/****************************** GLUI_StaticText::set_text() **********/
+
+void GLUI_StaticText::set_text( const char *text )
+{
+ set_name( text );
+ redraw();
+}
+
+
+/************************************ GLUI_StaticText::update_size() **********/
+
+void GLUI_StaticText::update_size( void )
+{
+ int text_size;
+
+ if ( NOT glui )
+ return;
+
+ text_size = string_width( name );
+
+ if ( w < text_size )
+ w = text_size;
+}
+
+
+/****************************** GLUI_StaticText::draw_text() **********/
+
+void GLUI_StaticText::draw_text( void )
+{
+ if ( NOT can_draw() )
+ return;
+
+ erase_text();
+ draw_name( 0, 9 );
+}
+
+
+/****************************** GLUI_StaticText::erase_text() **********/
+
+void GLUI_StaticText::erase_text( void )
+{
+ if ( NOT can_draw() )
+ return;
+
+ set_to_bkgd_color();
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_TRIANGLES );
+ glVertex2i( 0,0 ); glVertex2i( w, 0 ); glVertex2i( w, h );
+ glVertex2i( 0, 0 ); glVertex2i( w, h ); glVertex2i( 0, h );
+ glEnd();
+}
+
+
+
diff --git a/tests/bullet/Extras/glui/glui_string.cpp b/tests/bullet/Extras/glui/glui_string.cpp
new file mode 100644
index 00000000..b2fe2eb5
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_string.cpp
@@ -0,0 +1,62 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui.cpp
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher (this file, Bill Baxter 2005)
+
+ This library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA
+
+ This program is -not- in the public domain.
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include <stdarg.h>
+
+#if defined (_MSC_VER) && (_MSC_VER < 1500)
+#define vsnprintf _vsnprintf
+#endif
+
+GLUI_String& glui_format_str(GLUI_String& str, const char* fmt, ...)
+{
+ const size_t ISIZE = 128;
+ char stackbuf[ISIZE];
+ size_t bufsz = ISIZE;
+ char *buf = stackbuf;
+ str = "";
+ va_list arg;
+ while (1) {
+ va_start(arg, fmt);
+ int ret = vsnprintf(buf,299,fmt,arg);
+ va_end(arg);
+ if (ret>=0) {
+ break;
+ }
+ // else make a bigger buf, try again
+ bufsz <<= 1;
+ if (buf==stackbuf) buf = (char*)malloc(sizeof(char)*bufsz);
+ else buf = (char*)realloc(buf, sizeof(char)*bufsz);
+ }
+ if (buf!=stackbuf) free(buf);
+ str=buf;
+ return str;
+}
diff --git a/tests/bullet/Extras/glui/glui_textbox.cpp b/tests/bullet/Extras/glui/glui_textbox.cpp
new file mode 100644
index 00000000..9bf04265
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_textbox.cpp
@@ -0,0 +1,1108 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_textbox.cpp - GLUI_TextBox control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher, 2004 John Kew
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+#include <cmath>
+
+
+static const int LINE_HEIGHT = 15;
+
+/****************************** GLUI_TextBox::GLUI_TextBox() **********/
+
+GLUI_TextBox::GLUI_TextBox(GLUI_Node *parent, GLUI_String &live_var,
+ bool scroll, int id, GLUI_CB callback )
+{
+ common_construct(parent, &live_var, scroll, id, callback);
+}
+
+/****************************** GLUI_TextBox::GLUI_TextBox() **********/
+
+GLUI_TextBox::GLUI_TextBox( GLUI_Node *parent, bool scroll, int id,
+ GLUI_CB callback )
+{
+ common_construct(parent, NULL, scroll, id, callback);
+}
+
+/****************************** GLUI_TextBox::common_construct() **********/
+void GLUI_TextBox::common_construct(
+ GLUI_Node *parent, GLUI_String *data,
+ bool scroll, int id, GLUI_CB callback)
+{
+ common_init();
+
+ GLUI_Node *tb_panel = parent;
+
+ if (scroll) {
+ GLUI_Panel *p = new GLUI_Panel(parent,"",GLUI_PANEL_NONE);
+ p->x_off = 1;
+ tb_panel = p;
+ }
+ this->ptr_val = data;
+ if (data) {
+ this->live_type = GLUI_LIVE_STRING;
+ } else {
+ this->live_type = GLUI_LIVE_NONE;
+ }
+ this->user_id = id;
+ this->callback = callback;
+ this->name = "textbox";
+ tb_panel->add_control( this );
+ if (scroll) {
+ new GLUI_Column(tb_panel, false);
+ scrollbar =
+ new GLUI_Scrollbar(tb_panel,
+ "scrollbar",
+ GLUI_SCROLL_VERTICAL,
+ GLUI_SCROLL_INT);
+ scrollbar->set_object_callback(GLUI_TextBox::scrollbar_callback, this);
+ scrollbar->set_alignment(GLUI_ALIGN_LEFT);
+ // scrollbar->can_activate = false; //kills ability to mouse drag too
+ }
+ init_live();
+}
+
+/****************************** GLUI_TextBox::mouse_down_handler() **********/
+
+int GLUI_TextBox::mouse_down_handler( int local_x, int local_y )
+{
+ int tmp_insertion_pt;
+
+ if ( debug ) dump( stdout, "-> MOUSE DOWN" );
+
+ tmp_insertion_pt = find_insertion_pt( local_x, local_y );
+ if ( tmp_insertion_pt == -1 ) {
+ if ( glui )
+ glui->deactivate_current_control( );
+ return false;
+ }
+
+ insertion_pt = tmp_insertion_pt;
+
+ sel_start = sel_end = insertion_pt;
+
+ keygoal_x = insert_x;
+
+ if ( can_draw())
+ update_and_draw_text();
+
+ if ( debug ) dump( stdout, "<- MOUSE UP" );
+
+ return true;
+}
+
+
+/******************************** GLUI_TextBox::mouse_up_handler() **********/
+
+int GLUI_TextBox::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ return false;
+}
+
+
+/***************************** GLUI_TextBox::mouse_held_down_handler() ******/
+
+int GLUI_TextBox::mouse_held_down_handler( int local_x, int local_y,
+ bool new_inside)
+{
+ int tmp_pt;
+
+ if ( NOT new_inside ) return false;
+
+ if ( debug ) dump( stdout, "-> HELD DOWN" );
+
+ tmp_pt = find_insertion_pt( local_x, local_y );
+ keygoal_x = insert_x;
+
+ if ( tmp_pt == -1 AND sel_end != 0 ) { /* moved mouse past left edge */
+ special_handler( GLUT_KEY_LEFT, GLUT_ACTIVE_SHIFT );
+ }
+ else if ( tmp_pt == substring_end+1 AND sel_end != (int) text.length()) {
+ /* moved mouse past right edge */
+ special_handler( GLUT_KEY_RIGHT, GLUT_ACTIVE_SHIFT );
+ }
+ else if ( tmp_pt != -1 AND tmp_pt != sel_end ) {
+ sel_end = insertion_pt = tmp_pt;
+
+ update_and_draw_text();
+ }
+
+ if ( debug )
+ dump( stdout, "<- HELD DOWN" );
+
+ return false;
+}
+
+
+/****************************** GLUI_TextBox::key_handler() **********/
+int GLUI_TextBox::key_handler( unsigned char key,int modifiers )
+{
+ int regular_key;
+ /* int has_selection; */
+
+ if ( NOT glui )
+ return false;
+
+ if ( debug )
+ dump( stdout, "-> KEY HANDLER" );
+
+ regular_key = false;
+ bool ctrl_down = (modifiers & GLUT_ACTIVE_CTRL)!=0;
+ /* has_selection = (sel_start != sel_end); */
+
+ if ( key == CTRL('[')) { /* ESCAPE */
+ glui->deactivate_current_control();
+ return true;
+ }
+ else if ( (key == 127 AND !ctrl_down) OR /* FORWARD DELETE */
+ ( key == CTRL('d') AND modifiers == GLUT_ACTIVE_CTRL) )
+ {
+ if ( sel_start == sel_end ) { /* no selection */
+ if ( insertion_pt < (int)text.length() ) {
+ text.erase(insertion_pt,1);
+ }
+ }
+ else { /* There is a selection */
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+ }
+ else if ( ((key == 127) AND ctrl_down) OR // Delete word forward
+ ((key == 'd') AND (modifiers == GLUT_ACTIVE_ALT)) )
+ {
+ if ( sel_start == sel_end ) { /* no selection */
+ sel_start = insertion_pt;
+ sel_end = find_word_break( insertion_pt, +1 );
+ }
+
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+ else if ( key == CTRL('h') ) { /* BACKSPACE */
+ if ( sel_start == sel_end ) { /* no selection */
+ if ( insertion_pt > 0 ) {
+ insertion_pt--;
+ text.erase(insertion_pt,1);
+ }
+ }
+ else { /* There is a selection */
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+ }
+ else if ( modifiers == GLUT_ACTIVE_CTRL ) /* CTRL ONLY */
+ {
+ /* Ctrl-key bindings */
+ if ( key == CTRL('a') ) {
+ return special_handler( GLUT_KEY_HOME, 0 );
+ }
+ else if ( key == CTRL('e') ) {
+ return special_handler( GLUT_KEY_END, 0 );
+ }
+ else if ( key == CTRL('b') ) {
+ return special_handler( GLUT_KEY_LEFT, 0 );
+ }
+ else if ( key == CTRL('f') ) {
+ return special_handler( GLUT_KEY_RIGHT, 0 );
+ }
+ else if ( key == CTRL('p') ) {
+ return special_handler( GLUT_KEY_UP, 0 );
+ }
+ else if ( key == CTRL('n') ) {
+ return special_handler( GLUT_KEY_DOWN, 0 );
+ }
+ else if ( key == CTRL('u') ) { /* ERASE LINE */
+ insertion_pt = 0;
+ text.erase(0,text.length());
+ sel_start = sel_end = 0;
+ }
+ else if ( key == CTRL('k') ) { /* KILL TO END OF LINE */
+ sel_start = sel_end = insertion_pt;
+ text.erase(insertion_pt,GLUI_String::npos);
+ }
+ }
+ else if ( modifiers == GLUT_ACTIVE_ALT ) /* ALT ONLY */
+ {
+ if ( key == 'b' ) { // Backward word
+ return special_handler ( GLUT_KEY_LEFT, GLUT_ACTIVE_CTRL );
+ }
+ if ( key == 'f' ) { // Forward word
+ return special_handler ( GLUT_KEY_RIGHT, GLUT_ACTIVE_CTRL );
+ }
+ }
+ else if ( (modifiers & GLUT_ACTIVE_CTRL) OR
+ (modifiers & GLUT_ACTIVE_ALT) )
+ {
+ /** ignore other keys with modifiers */
+ return true;
+ }
+ else { /* Regular key */
+ if ( key == 13 ) /* RETURNS are written as newlines*/
+ key = '\n';
+
+ regular_key = true;
+
+ /** This is just to get rid of warnings - the flag regular_key is
+ set if the key was not a backspace, return, whatever. But I
+ believe if we're here, we know it was a regular key anyway */
+ if ( regular_key ) {
+ }
+
+ /**** If there's a current selection, erase it ******/
+ if ( sel_start != sel_end ) {
+ clear_substring( MIN(sel_start,sel_end), MAX(sel_start,sel_end ));
+ insertion_pt = MIN(sel_start,sel_end);
+ sel_start = sel_end = insertion_pt;
+ }
+
+ /******** We insert the character into the string ***/
+
+ text.insert(insertion_pt,1,key);
+
+ /******** Move the insertion point and substring_end one over ******/
+ insertion_pt++;
+ substring_end++;
+
+ sel_start = sel_end = insertion_pt;
+ }
+
+ /******** Now redraw text ***********/
+ /* Hack to prevent text box from being cleared first **/
+ /** int substring_change = update_substring_bounds();
+ draw_text_only =
+ (NOT substring_change AND NOT has_selection AND regular_key );
+ */
+
+ draw_text_only = false; /** Well, hack is not yet working **/
+ update_and_draw_text();
+ draw_text_only = false;
+
+
+ if ( debug )
+ dump( stdout, "<- KEY HANDLER" );
+
+ return true;
+}
+
+/****************************** GLUI_TextBox::enable() **********/
+
+void GLUI_TextBox::enable( void )
+{
+ GLUI_Control::enable();
+ scrollbar->enable();
+}
+
+/****************************** GLUI_TextBox::disable() **********/
+
+void GLUI_TextBox::disable( void )
+{
+ GLUI_Control::disable();
+ scrollbar->disable();
+}
+
+/****************************** GLUI_TextBox::activate() **********/
+
+void GLUI_TextBox::activate( int how )
+{
+ if ( debug )
+ dump( stdout, "-> ACTIVATE" );
+ active = true;
+
+ if ( how == GLUI_ACTIVATE_MOUSE )
+ return; /* Don't select everything if activated with mouse */
+
+ orig_text = text;
+
+ sel_start = 0;
+ sel_end = int(text.length());
+ insertion_pt = 0;
+ if ( debug )
+ dump( stdout, "<- ACTIVATE" );
+}
+
+
+/****************************** GLUI_TextBox::deactivate() **********/
+
+void GLUI_TextBox::deactivate( void )
+{
+ active = false;
+
+ if ( NOT glui )
+ return;
+
+ if ( debug )
+ dump( stdout, "-> DISACTIVATE" );
+
+ sel_start = sel_end = insertion_pt = -1;
+
+ /***** Retrieve the current value from the text *****/
+ /***** The live variable will be updated by set_text() ****/
+ set_text(text.c_str()); /* This will force callbacks and gfx refresh */
+
+ update_substring_bounds();
+
+ /******** redraw text without insertion point ***********/
+ redraw();
+
+ /***** Now do callbacks if value changed ******/
+ if ( orig_text != text ) {
+ this->execute_callback();
+
+
+ }
+
+
+ if ( debug )
+ dump( stdout, "<- DISACTIVATE" );
+}
+
+/****************************** GLUI_TextBox::draw() **********/
+
+void GLUI_TextBox::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int line = 0;
+ int text_length;
+ int box_width;
+ int i;
+
+ /* Bevelled Border */
+ glBegin( GL_LINES );
+ glColor3f( .5, .5, .5 );
+ glVertex2i( 0, 0 ); glVertex2i( w, 0 );
+ glVertex2i( 0, 0 ); glVertex2i( 0, h );
+
+ glColor3f( 1., 1., 1. );
+ glVertex2i( 0, h ); glVertex2i( w, h );
+ glVertex2i( w, h ); glVertex2i( w, 0 );
+
+ if ( enabled )
+ glColor3f( 0., 0., 0. );
+ else
+ glColor3f( .25, .25, .25 );
+ glVertex2i( 1, 1 ); glVertex2i( w-1, 1 );
+ glVertex2i( 1, 1 ); glVertex2i( 1, h-1 );
+
+ glColor3f( .75, .75, .75 );
+ glVertex2i( 1, h-1 ); glVertex2i( w-1, h-1 );
+ glVertex2i( w-1, h-1 ); glVertex2i( w-1, 1 );
+ glEnd();
+
+ /* Draw Background if enabled*/
+ if (enabled) {
+ glColor3f( 1., 1., 1. );
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( 2, 2 ); glVertex2i( w-2, 2 );
+ glVertex2i( w-2, h-2 ); glVertex2i(2, h-2 );
+ glEnd();
+ } else {
+ glColor3f( .8, .8, .8 );
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( 2, 2 ); glVertex2i( w-2, 2 );
+ glVertex2i( w-2, h-2 ); glVertex2i(2, h-2 );
+ glEnd();
+ }
+
+ /* Begin Drawing Lines of Text */
+ substring_start = 0;
+ substring_end = 0;
+ text_length = int(text.length())-1;
+
+ /* Figure out how wide the box is */
+ box_width = get_box_width();
+
+ /* Get the first line substring */
+ while (substring_width(substring_start, substring_end+1 ) < box_width &&
+ substring_end < text_length && text[substring_end+1] != '\n')
+ substring_end++;
+
+ /* Figure out which lines are visible*/
+
+ visible_lines = (int)(h-20)/LINE_HEIGHT;
+ if (start_line < (curr_line-visible_lines)) {
+ for (i = 0; ((curr_line-i)*LINE_HEIGHT+20) > h; i++);
+ start_line = i;
+ } else if ( start_line > curr_line) {
+ start_line = curr_line;
+ }
+ line = 0;
+ do {
+ if (line && substring_end < text_length) {
+ substring_start = substring_end+1;
+ while (substring_width(substring_start, substring_end+1 ) < box_width &&
+ substring_end < text_length && text[substring_end+1] != '\n')
+ substring_end++;
+ }
+ if (text[substring_end+1] == '\n') { /* Skip newline */
+ substring_end++;
+ }
+ if (line < start_line || (line > curr_line && curr_line > (start_line + visible_lines))) {
+ line++;
+ continue;
+ }
+ if ((line - start_line) <= visible_lines)
+ draw_text(0,(line - start_line)*LINE_HEIGHT); /* tabs and other nasties are handled by substring_width */
+ line++;
+ } while (substring_end < text_length);
+
+ num_lines = line;
+
+ draw_insertion_pt();
+ if (scrollbar) {
+ scrollbar->set_int_limits(MAX(0,num_lines/*-1*/-visible_lines),0);
+ glPushMatrix();
+ glTranslatef(scrollbar->x_abs-x_abs, scrollbar->y_abs-y_abs,0.0);
+ scrollbar->draw_scroll();
+ glPopMatrix();
+ }
+}
+
+
+
+/************************** GLUI_TextBox::update_substring_bounds() *********/
+
+int GLUI_TextBox::update_substring_bounds( void )
+{
+ int box_width;
+ int text_len = int(text.length());
+ int old_start, old_end;
+
+ old_start = substring_start;
+ old_end = substring_end;
+
+ /*** Calculate the width of the usable area of the edit box ***/
+ box_width = get_box_width();
+
+ CLAMP( substring_end, 0, MAX(text_len-1,0) );
+ CLAMP( substring_start, 0, MAX(text_len-1,0) );
+
+ if ( debug ) dump( stdout, "-> UPDATE SS" );
+
+ if ( insertion_pt >= 0 AND
+ insertion_pt < substring_start ) { /* cursor moved left */
+ substring_start = insertion_pt;
+
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_end--;
+ }
+ else if ( insertion_pt > substring_end ) { /* cursor moved right */
+ substring_end = insertion_pt-1;
+
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_start++;
+ }
+ else { /* cursor is within old substring bounds */
+ if ( last_insertion_pt > insertion_pt ) { /* cursor moved left */
+ }
+ else {
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_end--;
+
+ while(substring_width( substring_start, substring_end+1 ) <= box_width
+ AND substring_end < text_len-1 )
+ substring_end++;
+ }
+ }
+
+ while ( substring_width( substring_start, substring_end ) > box_width )
+ substring_end--;
+
+ last_insertion_pt = insertion_pt;
+
+ /*** No selection if not enabled ***/
+ if ( NOT enabled ) {
+ sel_start = sel_end = 0;
+ }
+
+ if ( debug ) dump( stdout, "<- UPDATE SS" );
+
+ if ( substring_start == old_start AND substring_end == old_end )
+ return false; /*** bounds did not change ***/
+ else
+ return true; /*** bounds did change ***/
+
+}
+
+
+/********************************* GLUI_TextBox::update_x_offsets() *********/
+
+void GLUI_TextBox::update_x_offsets( void )
+{
+}
+
+
+/********************************* GLUI_TextBox::draw_text() ****************/
+
+void GLUI_TextBox::draw_text( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int text_x, i, sel_lo, sel_hi, x_pos;
+
+ if ( debug ) dump( stdout, "-> DRAW_TEXT" );
+
+ /** Find where to draw the text **/
+
+ text_x = 2 + GLUI_TEXTBOX_BOXINNERMARGINX;
+
+ /** Find lower and upper selection bounds **/
+ sel_lo = MIN(sel_start, sel_end );
+ sel_hi = MAX(sel_start, sel_end );
+
+ int sel_x_start, sel_x_end, delta;
+
+ /** Draw selection area dark **/
+ if ( sel_start != sel_end ) {
+ sel_x_start = text_x;
+ sel_x_end = text_x;
+ delta = 0;
+ for( i=substring_start; sel_x_end < (w - text_x) && i<=substring_end; i++ ) {
+ delta = 0;
+ if (text[i] == '\t') // Character is a tab, go to next tab stop
+ while (((delta + sel_x_end) < (w - text_x)) &&
+ (delta == 0 || delta % tab_width))
+ delta++;
+ else
+ delta = char_width( text[i] );
+
+ if ( i < sel_lo ) {
+ sel_x_start += delta;
+ sel_x_end += delta;
+ }
+ else if ( i < sel_hi ) {
+ sel_x_end += delta;
+ }
+ }
+
+ glColor3f( 0.0f, 0.0f, .6f );
+ glRecti(sel_x_start, y+5, sel_x_end, y+20);
+ }
+
+
+ if ( sel_start == sel_end ) { // No current selection
+ x_pos = text_x;
+ if ( enabled )
+ glColor3b( 0, 0, 0 );
+ else
+ glColor3b( 32, 32, 32 );
+
+ glRasterPos2i( text_x, y+LINE_HEIGHT);
+ for( i=substring_start; i<=substring_end; i++ ) {
+ if (this->text[i] == '\t') { // Character is a tab, go to next tab stop
+ x_pos = ((x_pos-text_x)/tab_width)*tab_width+tab_width+text_x;
+ glRasterPos2i( x_pos, y+LINE_HEIGHT); // Reposition pen after tab
+ } else {
+ glutBitmapCharacter( get_font(), this->text[i] );
+ x_pos += char_width( this->text[i] );
+ }
+ }
+ }
+ else { // There is a selection
+ x_pos = text_x;
+ for( i=substring_start; i<=substring_end; i++ ) {
+ if ( IN_BOUNDS( i, sel_lo, sel_hi-1)) { // This character is selected
+ glColor3f( 1., 1., 1. );
+ glRasterPos2i( x_pos, y+LINE_HEIGHT);
+ if (this->text[i] == '\t') { // Character is a tab, go to next tab stop
+ x_pos = ((x_pos-text_x)/tab_width)*tab_width+tab_width+text_x;
+ }
+ else
+ glutBitmapCharacter( get_font(), this->text[i] );
+ }
+ else {
+ glColor3f( 0., 0., 0. );
+ glRasterPos2i( x_pos, y+LINE_HEIGHT);
+ if (this->text[i] == '\t') { // Character is a tab, go to next tab stop
+ x_pos = ((x_pos-text_x)/tab_width)*tab_width+tab_width+text_x;
+ glRasterPos2i( x_pos, y+LINE_HEIGHT); // Reposition pen after tab
+ } else
+ glutBitmapCharacter( get_font(), this->text[i] );
+ }
+
+ x_pos += char_width( text[i] );
+ }
+ }
+
+ if ( debug ) dump( stdout, "<- DRAW_TEXT" );
+}
+
+
+/******************************** GLUI_TextBox::find_insertion_pt() *********/
+/* This function returns the character number *before which* the insertion */
+/* point goes */
+
+int GLUI_TextBox::find_insertion_pt( int x, int y )
+{
+ /*** See if we clicked outside box ***/
+ if ( x < this->x_abs || y < this->y_abs)
+ return -1;
+
+ /*** See if we clicked in an empty box ***/
+ if ( text.empty() )
+ return 0;
+
+ /* update insert variables */
+ insert_x = x;
+ insert_y = y;
+
+ int text_length = int(text.length())-1;
+ int box_width = get_box_width();
+
+ int sol = 0;
+ int eol = 0;
+ int line = 0;
+
+ int y_off = y - (y_abs + 2 + GLUI_TEXTBOX_BOXINNERMARGINX);
+ int x_off = x - (x_abs + 2 + GLUI_TEXTBOX_BOXINNERMARGINX);
+
+ /* Find the line clicked,
+ The possibility of long lines getting wrapped complicates this. */
+ while ((line-start_line+1)*LINE_HEIGHT < y_off && eol < text_length)
+ {
+ while (eol < text_length && text[eol] != '\n' &&
+ substring_width(sol, eol+1) <= box_width)
+ {
+ eol++;
+ }
+ if (text[eol]=='\n' && eol<text_length) { eol++; }
+ line++;
+ sol = eol;
+ }
+ curr_line = line;
+ // Now search to the end of this line for the closest insertion point
+ int prev_w=0,total_w=0,prev_eol=eol;
+ while (eol <= text_length
+ && (total_w=substring_width(prev_eol,eol,prev_w))< x_off
+ && (eol==text_length||text[eol]!='\n'))
+ {
+ prev_w=total_w;
+ eol++;
+ prev_eol=eol;
+ }
+ if (total_w>=x_off) {
+ // did we go far enough? (see if click was >1/2 width of last char)
+ int decision_pt = prev_w+(total_w-prev_w)/2;
+ if (x_off>decision_pt) eol++;
+ }
+ return eol;
+
+#if 0
+ while (eol < text_length && text[eol] != '\n' &&
+ substring_width(sol, eol+1) < box_width )
+ {
+ eol++;
+ }
+
+
+ /* We move from right to left, looking to see if the mouse was clicked
+ to the right of the ith character */
+#if 0
+ int curr_x = this->x_abs
+ + substring_width( sol, eol )
+ + 2 /* The edittext box has a 2-pixel margin */
+ + GLUI_TEXTBOX_BOXINNERMARGINX; /** plus this many pixels blank space
+ between the text and the box **/
+#endif
+
+ /** find mouse click in text **/
+
+ if (x_off > substring_width(sol, eol))
+ return eol;
+
+ for(i = sol; i <= eol+1; i++) {
+ if (x_off <= substring_width(sol, i))
+ return i+1;
+ }
+ return 0;
+#endif
+}
+
+
+int GLUI_TextBox::get_box_width()
+{
+ return MAX( this->w
+ - 4 /* 2 * the two-line box border */
+ - 2 * GLUI_TEXTBOX_BOXINNERMARGINX, 0 );
+
+}
+
+/******************************** GLUI_TextBox::draw_insertion_pt() *********/
+
+void GLUI_TextBox::draw_insertion_pt( void )
+{
+ int curr_x, box_width, text_length, eol, sol, line;
+
+ if ( NOT can_draw() )
+ return;
+
+ /*** Don't draw insertion pt if control is disabled ***/
+ if ( NOT enabled )
+ return;
+
+ if ( sel_start != sel_end OR insertion_pt < 0 ) {
+ return; /* Don't draw insertion point if there is a current selection */
+ }
+
+ if ( debug ) dump( stdout, "-> DRAW_INS_PT" );
+
+ /* printf( "insertion pt: %d\n", insertion_pt ); */
+
+ box_width = get_box_width();
+
+ // This function is unable to distinguish whether an insertion
+ // point on a line break should be drawn on the line before or the line after.
+ // This depends on the sequence of operations used to get there, and this
+ // function just doesn't have that information. If curr_line were kept up
+ // to date elsewhere that could be used here to disambiguate, but arrow keys
+ // and such do not update it.
+
+ sol = 0;
+ eol = 0;
+ text_length = int(text.length())-1;
+
+ //while (eol < text_length && text[eol] != '\n'
+ // && substring_width(sol, eol + 1) < box_width )
+ // eol++;
+ line = 0;
+ while (eol < insertion_pt && eol <= text_length)
+ {
+ if (text[eol] == '\n' || substring_width(sol, eol + 1) >= box_width)
+ {
+ eol++;
+ if (text[eol]=='\n'||eol!=insertion_pt
+ ||(eol==insertion_pt && eol>0 && text[eol-1]=='\n')) {
+ sol = eol;
+ line++;
+ }
+ }
+ else {
+ eol++;
+ }
+ }
+
+ //glColor3f(1,0,0);
+ //glRecti(0, curr_line*LINE_HEIGHT, 3, (curr_line+1)*LINE_HEIGHT);
+
+ curr_line = line;
+
+ if (scrollbar)
+ scrollbar->set_int_val(start_line);
+ if (curr_line < start_line || curr_line > (start_line + visible_lines)) /* Insertion pt out of draw area */
+ return;
+
+ curr_x = this->x_abs
+ + 2 /* The edittext box has a 2-pixel margin */
+ + GLUI_TEXTBOX_BOXINNERMARGINX; /** plus this many pixels blank space
+ between the text and the box **/
+
+ curr_x += substring_width(sol,insertion_pt-1);
+ if (insertion_pt == text.length() && text[text.length()-1] == '\n'
+ || curr_x-this->x_abs > (w - 2 - GLUI_TEXTBOX_BOXINNERMARGINX)) { // Insert on the next line
+ curr_x = this->x_abs + GLUI_TEXTBOX_BOXINNERMARGINX;
+ line++;
+ }
+ /* update insertion coordinates */
+ insert_x = curr_x+5; /* I hate magic numbers too, these offset the imagined insertion point */
+ insert_y = (curr_line-start_line+2)*LINE_HEIGHT;
+
+
+ glColor3f( 0.0, 0.0, 0.0 );
+ glBegin( GL_LINE_LOOP );
+
+ curr_x -= x_abs;
+ glVertex2i( curr_x+1, (curr_line-start_line)*LINE_HEIGHT + 4 );
+ glVertex2i( curr_x, (curr_line-start_line)*LINE_HEIGHT + 4 );
+ glVertex2i( curr_x+1, (curr_line-start_line)*LINE_HEIGHT + 16 );
+ glVertex2i( curr_x, (curr_line-start_line)*LINE_HEIGHT + 16 );
+ glEnd();
+
+
+ if ( debug ) dump( stdout, "-> DRAW_INS_PT" );
+}
+
+
+
+
+/******************************** GLUI_TextBox::substring_width() *********/
+int GLUI_TextBox::substring_width( int start, int end, int initial_width )
+{
+ // This function only works properly if start is really the start of a line.
+ // Otherwise tabs will be messed up.
+ int i, width = initial_width;
+
+ for( i=start; i<=end; i++ )
+ if (text[i] == '\t') { // Character is a tab, jump to next tab stop
+ width += tab_width-(width%tab_width);
+ //while (width == 0 || width % tab_width)
+ // width++;
+ }
+ else
+ width += char_width( text[i] );
+
+ return width;
+}
+
+
+/***************************** GLUI_TextBox::update_and_draw_text() ********/
+
+void GLUI_TextBox::update_and_draw_text( void )
+{
+ //update_substring_bounds();
+ /* printf( "ss: %d/%d\n", substring_start, substring_end ); */
+
+ redraw();
+}
+
+
+/********************************* GLUI_TextBox::special_handler() **********/
+
+int GLUI_TextBox::special_handler( int key,int modifiers )
+{
+ int tmp_insertion_pt;
+ if ( NOT glui )
+ return false;
+
+ if ( debug )
+ printf( "SPECIAL:%d - mod:%d subs:%d/%d ins:%d sel:%d/%d\n",
+ key, modifiers, substring_start, substring_end,insertion_pt,
+ sel_start, sel_end );
+
+ if ( key == GLUT_KEY_DOWN ) {
+ if (insert_x == -1 || insert_y == -1)
+ return false;
+ tmp_insertion_pt = find_insertion_pt( keygoal_x, insert_y+LINE_HEIGHT);
+ if (tmp_insertion_pt < 0)
+ return false;
+ insertion_pt = tmp_insertion_pt;
+ sel_end = insertion_pt;
+ if (!(modifiers & GLUT_ACTIVE_SHIFT)) {
+ sel_start = sel_end;
+ }
+ if ( can_draw())
+ update_and_draw_text();
+ } else if ( key == GLUT_KEY_UP ) {
+ if (insert_x == -1 || insert_y == -1)
+ return false;
+ tmp_insertion_pt = find_insertion_pt( keygoal_x, insert_y-LINE_HEIGHT);
+ if (tmp_insertion_pt < 0)
+ return false;
+ insertion_pt = tmp_insertion_pt;
+ sel_end = insertion_pt;
+ if (!(modifiers & GLUT_ACTIVE_SHIFT)) {
+ sel_start = sel_end;
+ }
+ if ( can_draw())
+ update_and_draw_text();
+ } else if ( key == GLUT_KEY_LEFT ) {
+ if ( (modifiers & GLUT_ACTIVE_CTRL) != 0 ) {
+ insertion_pt = find_word_break( insertion_pt, -1 );
+ }
+ else {
+ insertion_pt--;
+ }
+ // update keygoal_x!
+ }
+ else if ( key == GLUT_KEY_RIGHT ) {
+ if ( (modifiers & GLUT_ACTIVE_CTRL) != 0 ) {
+ insertion_pt = find_word_break( insertion_pt, +1 );
+ }
+ else {
+ insertion_pt++;
+ }
+ // update keygoal_x!
+ }
+ else if ( key == GLUT_KEY_HOME ) {
+ insertion_pt = 0;
+ // update keygoal_x!
+ }
+ else if ( key == GLUT_KEY_END ) {
+ insertion_pt = int(text.length());
+ // update keygoal_x!
+ }
+
+ /*** Update selection if shift key is down ***/
+ if ( (modifiers & GLUT_ACTIVE_SHIFT ) != 0 )
+ sel_end = insertion_pt;
+ else
+ sel_start = sel_end = insertion_pt;
+
+
+ CLAMP( insertion_pt, 0, (int)text.length()); /* Make sure insertion_pt
+ is in bounds */
+ CLAMP( sel_start, 0, (int)text.length()); /* Make sure insertion_pt
+ is in bounds */
+ CLAMP( sel_end, 0, (int)text.length()); /* Make sure insertion_pt
+ is in bounds */
+
+ /******** Now redraw text ***********/
+ if ( can_draw())
+ update_and_draw_text();
+
+ return true;
+}
+
+
+/****************************** GLUI_TextBox::find_word_break() **********/
+/* It looks either left or right (depending on value of 'direction' */
+/* for the beginning of the next 'word', where word are characters */
+/* separated by one of the following tokens: " :-.," */
+/* If there is no next word in the specified direction, this returns */
+/* the beginning of 'text', or the very end. */
+
+int GLUI_TextBox::find_word_break( int start, int direction )
+{
+ int i, j;
+ char breaks[] = " \n\t:-.,";
+ int num_break_chars = (int)strlen(breaks), text_len = int(text.length());
+ int new_pt;
+
+ /** If we're moving left, we have to start two back, in case we're either
+ already at the beginning of a word, or on a separating token.
+ Otherwise, this function would just return the word we're already at **/
+ if ( direction == -1 ) {
+ start -= 2;
+ }
+
+ /***** Iterate over text in the specified direction *****/
+ for ( i=start; i >= 0 AND i < text_len; i += direction ) {
+
+ /** For each character in text, iterate over list of separating tokens **/
+ for( j=0; j<num_break_chars; j++ ) {
+ if ( text[i] == breaks[j] ) {
+
+ /** character 'i' is a separating token, so we return i+1 **/
+ new_pt = i + 1;
+
+ CLAMP( new_pt, 0, text_len );
+
+ return new_pt;
+ }
+ }
+ }
+
+ if ( direction > 0 ) /* Return the end of string */
+ return text_len;
+ else /* Return the beginning of the text */
+ return 0;
+}
+
+
+/********************************** GLUI_TextBox::clear_substring() ********/
+
+void GLUI_TextBox::clear_substring( int start, int end )
+{
+ text.erase(start,end-start);
+}
+
+
+
+/************************************ GLUI_TextBox::update_size() **********/
+
+void GLUI_TextBox::update_size( void )
+{
+ if ( NOT glui )
+ return;
+
+ if ( w < GLUI_TEXTBOX_MIN_TEXT_WIDTH )
+ w = GLUI_TEXTBOX_MIN_TEXT_WIDTH;
+}
+
+
+/****************************** GLUI_TextBox::set_text() **********/
+
+void GLUI_TextBox::set_text( const char *new_text )
+{
+ text = new_text;
+
+ substring_start = 0;
+ substring_end = int(text.length()) - 1;
+ insertion_pt = -1;
+ sel_start = 0;
+ sel_end = 0;
+ visible_lines = 0;
+ start_line = 0;
+ curr_line = 0;
+ num_lines = 0;
+
+ if ( can_draw() )
+ update_and_draw_text();
+
+ /*** Now update the live variable ***/
+ output_live(true);
+}
+
+
+/*************************************** GLUI_TextBox::dump() **************/
+
+void GLUI_TextBox::dump( FILE *out, char *name )
+{
+ fprintf( out,
+ "%s (edittext@%p): line:%d ins_pt:%d subs:%d/%d sel:%d/%d len:%d\n",
+ name, this, curr_line,
+ insertion_pt, substring_start, substring_end, sel_start, sel_end,
+ text.length());
+}
+
+
+/**************************************** GLUI_TextBox::mouse_over() ********/
+
+int GLUI_TextBox::mouse_over( int state, int x, int y )
+{
+ if ( state && enabled) {
+ /* curr_cursor = GLUT_CURSOR_TEXT; */
+ glutSetCursor( GLUT_CURSOR_TEXT );
+ }
+ else {
+ /* printf( "OUT\n" ); */
+ glutSetCursor( GLUT_CURSOR_LEFT_ARROW );
+ }
+
+ return true;
+}
+
+void GLUI_TextBox::scrollbar_callback(GLUI_Control *my_scrollbar) {
+ GLUI_Scrollbar *sb = my_scrollbar->dynamicCastGLUI_Scrollbar();
+ if (!sb) return;
+ GLUI_TextBox* me = (GLUI_TextBox*) sb->associated_object;
+ if (me->scrollbar == NULL)
+ return;
+ int new_start_line = sb->get_int_val(); // ??
+ me->start_line = new_start_line;
+ if (new_start_line < (me->curr_line - me->visible_lines))
+ me->curr_line = new_start_line + me->visible_lines;
+ if (new_start_line > me->curr_line)
+ me->curr_line = new_start_line;
+ if ( me->can_draw() )
+ me->update_and_draw_text();
+}
diff --git a/tests/bullet/Extras/glui/glui_translation.cpp b/tests/bullet/Extras/glui/glui_translation.cpp
new file mode 100644
index 00000000..43e82d87
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_translation.cpp
@@ -0,0 +1,559 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_translation - GLUI_Translation control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#include "GL/glui.h"
+#include "glui_internal.h"
+#include "algebra3.h"
+
+/********************** GLUI_Translation::GLUI_Translation() ***/
+
+GLUI_Translation::GLUI_Translation(
+ GLUI_Node *parent, const char *name,
+ int trans_t, float *value_ptr,
+ int id, GLUI_CB cb )
+{
+ common_init();
+
+ set_ptr_val( value_ptr );
+ user_id = id;
+ set_name( name );
+ callback = cb;
+ parent->add_control( this );
+ //init_live();
+
+ trans_type = trans_t;
+
+ if ( trans_type == GLUI_TRANSLATION_XY ) {
+ float_array_size = 2;
+ }
+ else if ( trans_type == GLUI_TRANSLATION_X ) {
+ float_array_size = 1;
+ }
+ else if ( trans_type == GLUI_TRANSLATION_Y ) {
+ float_array_size = 1;
+ }
+ else if ( trans_type == GLUI_TRANSLATION_Z ) {
+ float_array_size = 1;
+ }
+ init_live();
+}
+
+/********************** GLUI_Translation::iaction_mouse_down_handler() ***/
+/* These are really in local coords (5/10/99) */
+
+int GLUI_Translation::iaction_mouse_down_handler( int local_x,
+ int local_y )
+{
+ int center_x, center_y;
+
+ down_x = local_x;
+ down_y = local_y;
+
+ if ( trans_type == GLUI_TRANSLATION_XY ) {
+ orig_x = float_array_val[0];
+ orig_y = float_array_val[1];
+
+ /** Check if the Alt key is down, which means lock to an axis **/
+
+ center_x = w/2;
+ center_y = (h-18)/2;
+
+ if ( glui->curr_modifiers & GLUT_ACTIVE_ALT ) {
+ if ( ABS(local_y-center_y) > ABS(local_x-center_x) ) {
+ locked = GLUI_TRANSLATION_LOCK_Y;
+ glutSetCursor( GLUT_CURSOR_UP_DOWN );
+ }
+ else {
+ locked = GLUI_TRANSLATION_LOCK_X;
+ glutSetCursor( GLUT_CURSOR_LEFT_RIGHT );
+ }
+ }
+ else {
+ locked = GLUI_TRANSLATION_LOCK_NONE;
+ glutSetCursor( GLUT_CURSOR_SPRAY );
+ }
+ }
+ else if ( trans_type == GLUI_TRANSLATION_X ) {
+ glutSetCursor( GLUT_CURSOR_LEFT_RIGHT );
+ orig_x = float_array_val[0];
+ }
+ else if ( trans_type == GLUI_TRANSLATION_Y ) {
+ glutSetCursor( GLUT_CURSOR_UP_DOWN );
+ orig_y = float_array_val[0];
+ }
+ else if ( trans_type == GLUI_TRANSLATION_Z ) {
+ glutSetCursor( GLUT_CURSOR_UP_DOWN );
+ orig_z = float_array_val[0];
+ }
+
+ trans_mouse_code = 1;
+ redraw();
+
+ return false;
+}
+
+
+/*********************** GLUI_Translation::iaction_mouse_up_handler() **********/
+
+int GLUI_Translation::iaction_mouse_up_handler( int local_x, int local_y,
+ bool inside )
+{
+ trans_mouse_code = GLUI_TRANSLATION_MOUSE_NONE;
+ locked = GLUI_TRANSLATION_LOCK_NONE;
+
+ redraw();
+
+ return false;
+}
+
+
+/******************* GLUI_Translation::iaction_mouse_held_down_handler() ******/
+
+int GLUI_Translation::iaction_mouse_held_down_handler( int local_x, int local_y,
+ bool inside)
+{
+ float x_off, y_off;
+ float off_array[2];
+
+ x_off = scale_factor * (float)(local_x - down_x);
+ y_off = -scale_factor * (float)(local_y - down_y);
+
+ if ( glui->curr_modifiers & GLUT_ACTIVE_SHIFT ) {
+ x_off *= 100.0f;
+ y_off *= 100.0f;
+ }
+ else if ( glui->curr_modifiers & GLUT_ACTIVE_CTRL ) {
+ x_off *= .01f;
+ y_off *= .01f;
+ }
+
+
+ if ( trans_type == GLUI_TRANSLATION_XY ) {
+
+ if ( locked == GLUI_TRANSLATION_LOCK_X )
+ y_off = 0.0;
+ else if ( locked == GLUI_TRANSLATION_LOCK_Y )
+ x_off = 0.0;
+
+ off_array[0] = x_off + orig_x;
+ off_array[1] = y_off + orig_y;
+ }
+ else if ( trans_type == GLUI_TRANSLATION_X ) {
+ off_array[0] = x_off + orig_x;
+ }
+ else if ( trans_type == GLUI_TRANSLATION_Y ) {
+ off_array[0] = y_off + orig_y;
+ }
+ else if ( trans_type == GLUI_TRANSLATION_Z ) {
+ off_array[0] = y_off + orig_z;
+ }
+
+ set_float_array_val( (float*) &off_array[0] );
+
+ return false;
+}
+
+
+/******************** GLUI_Translation::iaction_draw_active_area_persp() **************/
+
+void GLUI_Translation::iaction_draw_active_area_persp( void )
+{
+}
+
+
+/******************** GLUI_Translation::iaction_draw_active_area_ortho() **********/
+
+void GLUI_Translation::iaction_draw_active_area_ortho( void )
+{
+ /********* Draw emboss circles around arcball control *********/
+ float radius;
+ radius = (float)(h-22)/2.0; /* MIN((float)w/2.0, (float)h/2.0); */
+ glLineWidth( 1.0 );
+
+ draw_emboss_box( (int) -radius-2, (int)radius+2,
+ (int)-radius-2, (int)radius+2 );
+
+ glMatrixMode( GL_MODELVIEW );
+ glPushMatrix();
+ glTranslatef( .5, .5, .5 );
+ /* glScalef( radius-1.0, radius-1.0, radius-1.0 ); */
+ if ( trans_type == GLUI_TRANSLATION_Z )
+ draw_2d_z_arrows((int)radius-1);
+ else if ( trans_type == GLUI_TRANSLATION_XY )
+ draw_2d_xy_arrows((int)radius-1);
+ else if ( trans_type == GLUI_TRANSLATION_X )
+ draw_2d_x_arrows((int)radius-1);
+ else if ( trans_type == GLUI_TRANSLATION_Y )
+ draw_2d_y_arrows((int)radius-1);
+
+ glPopMatrix();
+}
+
+
+/******************************** GLUI_Translation::iaction_dump() **********/
+
+void GLUI_Translation::iaction_dump( FILE *output )
+{
+}
+
+
+/******************** GLUI_Translation::iaction_special_handler() **********/
+
+int GLUI_Translation::iaction_special_handler( int key,int modifiers )
+{
+
+ return false;
+}
+
+
+
+/*************************** GLUI_Translation::draw_2d_z_arrows() **************/
+
+void GLUI_Translation::draw_2d_z_arrows( int radius )
+{
+ if ( trans_mouse_code != GLUI_TRANSLATION_MOUSE_NONE ) {
+ draw_2d_arrow(radius, true, 2);
+ draw_2d_arrow(radius, true, 0);
+ }
+ else {
+ draw_2d_arrow(radius, false, 2);
+ draw_2d_arrow(radius, false, 0);
+ }
+}
+
+
+/*************************** GLUI_Translation::draw_2d_x_arrows() **************/
+
+void GLUI_Translation::draw_2d_x_arrows( int radius )
+{
+ if ( trans_mouse_code != GLUI_TRANSLATION_MOUSE_NONE ) {
+ draw_2d_arrow(radius, true, 1);
+ draw_2d_arrow(radius, true, 3);
+ }
+ else {
+ draw_2d_arrow(radius, false, 1);
+ draw_2d_arrow(radius, false, 3);
+ }
+}
+
+
+/*************************** GLUI_Translation::draw_2d_y_arrows() **************/
+
+void GLUI_Translation::draw_2d_y_arrows( int radius )
+{
+ if ( trans_mouse_code != GLUI_TRANSLATION_MOUSE_NONE ) {
+ draw_2d_arrow(radius, true, 0);
+ draw_2d_arrow(radius, true, 2);
+ }
+ else {
+ draw_2d_arrow(radius, false, 0);
+ draw_2d_arrow(radius, false, 2);
+ }
+}
+
+
+/************************** GLUI_Translation::draw_2d_xy_arrows() **************/
+
+void GLUI_Translation::draw_2d_xy_arrows( int radius)
+{
+ if ( trans_mouse_code != GLUI_TRANSLATION_MOUSE_NONE ) {
+ if ( locked == GLUI_TRANSLATION_LOCK_X ) {
+ draw_2d_arrow(radius, false, 0);
+ draw_2d_arrow(radius, false, 2);
+ draw_2d_arrow(radius, true, 1);
+ draw_2d_arrow(radius, true, 3);
+ }
+ else if ( locked == GLUI_TRANSLATION_LOCK_Y ) {
+ draw_2d_arrow(radius, false, 1);
+ draw_2d_arrow(radius, false, 3);
+ draw_2d_arrow(radius, true, 0);
+ draw_2d_arrow(radius, true, 2);
+ }
+ else {
+ draw_2d_arrow(radius, true, 0);
+ draw_2d_arrow(radius, true, 1);
+ draw_2d_arrow(radius, true, 2);
+ draw_2d_arrow(radius, true, 3);
+ }
+ }
+ else {
+ draw_2d_arrow(radius, false, 0);
+ draw_2d_arrow(radius, false, 1);
+ draw_2d_arrow(radius, false, 2);
+ draw_2d_arrow(radius, false, 3);
+ }
+
+ return;
+}
+
+
+/*************************** GLUI_Translation::draw_2d_arrow() **************/
+/* ori: 0=up, 1=left, 2=down, 3=right */
+/* */
+/* */
+/* 0, y2 */
+/* / \ */
+/* / \ */
+/* / \ */
+/* / \ */
+/* / \ */
+/* / \ */
+/* / \ */
+/* / \ */
+/* -x2,y1 -x1b,y1 x1b,y1 x2,y1 */
+/* | | */
+/* | | */
+/* | | */
+/* | | */
+/* | | */
+/* -x1a,y0 x1a,y0 */
+/* */
+
+
+void GLUI_Translation::draw_2d_arrow( int radius, int filled, int orientation )
+{
+ float x1 = .2, x2 = .4, y1 = .54, y2 = .94, y0;
+ float x1a, x1b;
+/*
+ vec3 col1( 0.0, 0.0, 0.0 ), col2( .45, .45, .45 ),
+ col3( .7, .7, .7 ), col4( 1.0, 1.0, 1.0 );
+ vec3 c1, c2, c3, c4, c5, c6;
+*/
+ vec3 white(1.0,1.0,1.0), black(0.0,0.0,0.0), gray(.45,.45,.45),
+ bkgd(.7,.7,.7);
+ int c_off=0; /* color index offset */
+
+ if ( glui )
+ bkgd.set(glui->bkgd_color_f[0],
+ glui->bkgd_color_f[1],
+ glui->bkgd_color_f[2]);
+
+ /* bkgd[0] = 255.0; bkgd[1] = 0; */
+
+ /** The following 8 colors define the shading of an octagon, in
+ clockwise order, starting from the upstroke on the left **/
+ /** This is for an outside and inside octagons **/
+ vec3 colors_out[]={white, white, white, gray, black, black, black, gray};
+ vec3 colors_in[] ={bkgd,white,bkgd,gray,gray,gray,gray,gray};
+
+#define SET_COL_OUT(i) glColor3fv((float*) &colors_out[(i)%8][0]);
+#define SET_COL_IN(i) glColor3fv((float*) &colors_in[(i)%8][0]);
+
+ x1 = (float)radius * .2;
+ x2 = x1 * 2;
+ y1 = (float)radius * .54;
+ y2 = y1 + x2;
+ x1a = x1;
+ x1b = x1;
+
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+
+#define DRAW_SEG( xa,ya,xb,yb ) glVertex2f(xa,ya); glVertex2f(xb,yb);
+
+ glScalef( -1.0, 1.0, 1.0 );
+
+ if ( orientation == 2 ) {
+ c_off = 4;
+ }
+ else if ( orientation == 0 ) {
+ c_off = 0;
+ glRotatef( 180.0, 0.0, 0.0, 1.0 );
+ }
+ else if ( orientation == 1 ) {
+ c_off = 2;
+ glRotatef( 90.0, 0.0, 0.0, 1.0 );
+ }
+ else if ( orientation == 3 ) {
+ c_off = 6;
+ glRotatef( -90.0, 0.0, 0.0, 1.0 );
+ }
+
+ if ( trans_type == GLUI_TRANSLATION_Z )
+ y0 = 0.0;
+ else if ( trans_type == GLUI_TRANSLATION_XY )
+ y0 = x1;
+ else
+ y0 = 0.0;
+
+
+ if ( trans_type == GLUI_TRANSLATION_Z ) {
+ if ( orientation == 0 ) {
+ y1 += 2.0;
+ y2 += 0.0;
+
+ x1b -= 2.0;
+ x2 -= 2.0;
+ x1a += 2.0;
+ }
+ else if ( orientation == 2 ) {
+ y1 -= 6.0;
+ x1a += 2.0;
+ x1b += 4.0;
+ x2 += 6.0;
+ }
+ }
+
+ /*** Fill in inside of arrow ***/
+ if ( NOT filled ) { /*** Means button is up - control is not clicked ***/
+ /*glColor3f( .8, .8, .8 ); */
+ set_to_bkgd_color();
+ glColor3f( bkgd[0]+.07, bkgd[1]+.07, bkgd[2]+.07 );
+ }
+ else { /*** Button is down on control ***/
+ glColor3f( .6, .6, .6 );
+ c_off += 4; /* Indents the shadows - goes from a raised look to embossed */
+ }
+
+ /*** Check if control is enabled or not ***/
+ if ( NOT enabled ) {
+ set_to_bkgd_color();
+ /*c_off += 4; -- Indents the shadows - goes from a raised look to embossed */
+ colors_out[0] = colors_out[1] = colors_out[2] = colors_out[7] = gray;
+ colors_out[3] = colors_out[4] = colors_out[5] = colors_out[6] = white;
+ colors_in[0] = colors_in[1] = colors_in[2] = colors_in[7] = white;
+ colors_in[3] = colors_in[4] = colors_in[5] = colors_in[6] = gray;
+
+ }
+
+ glBegin( GL_POLYGON );
+ glVertex2f( 0.0, 0.0 ); glVertex2f( -x1a, 0.0 );
+ glVertex2f( -x1a, 0.0 ); glVertex2f( -x1b, y1 );
+ glVertex2f( x1b, y1); glVertex2f( x1a, 0.0 );
+ glVertex2f( x1a, 0.0 ); glVertex2f( 0.0, 0.0 );
+ glEnd();
+ glBegin( GL_TRIANGLES );
+ glVertex2f( -x2, y1 ); glVertex2f( 0.0, y2 ); glVertex2f( x2, y1 );
+ glEnd();
+
+ glLineWidth( 1.0 );
+ /*** Draw arrow outline ***/
+ glBegin( GL_LINES );
+
+ SET_COL_IN(1+c_off); DRAW_SEG( 0.0, y2-1.0, -x2, y1-1.0 );
+ SET_COL_IN(6+c_off); DRAW_SEG( -x2+2.0, y1+1.0, -x1b+1.0, y1+1.0 );
+ SET_COL_IN(0+c_off); DRAW_SEG( -x1b+1.0, y1+1.0, -x1a+1.0, y0 );
+ SET_COL_IN(3+c_off); DRAW_SEG( 0.0, y2-1.0, x2, y1-1.0 );
+ SET_COL_IN(6+c_off); DRAW_SEG( x2-1.0, y1+1.0, x1b-1.0, y1+1.0 );
+ SET_COL_IN(4+c_off); DRAW_SEG( x1b-1.0, y1+1.0, x1a-1.0, y0 );
+
+ SET_COL_OUT(0+c_off); DRAW_SEG( -x1a, y0, -x1b, y1 );
+ SET_COL_OUT(6+c_off); DRAW_SEG( -x1b, y1, -x2, y1 );
+ SET_COL_OUT(1+c_off); DRAW_SEG( -x2, y1, 0.0, y2 );
+ SET_COL_OUT(3+c_off); DRAW_SEG( 0.0, y2, x2, y1 );
+ SET_COL_OUT(6+c_off); DRAW_SEG( x2, y1, x1b, y1 );
+ SET_COL_OUT(4+c_off); DRAW_SEG( x1b, y1, x1a, y0 );
+
+ glEnd();
+
+#undef DRAW_SEG
+
+ glPopMatrix();
+}
+
+
+/*************************** GLUI_Translation::get_mouse_code() *************/
+
+int GLUI_Translation::get_mouse_code( int x, int y )
+{
+ if ( x == 0 AND y < 0 )
+ return GLUI_TRANSLATION_MOUSE_DOWN;
+ else if ( x == 0 AND y > 0 )
+ return GLUI_TRANSLATION_MOUSE_UP;
+ else if ( x > 0 AND y == 0 )
+ return GLUI_TRANSLATION_MOUSE_LEFT;
+ else if ( x < 0 AND y == 0 )
+ return GLUI_TRANSLATION_MOUSE_RIGHT;
+ else if ( x < 0 AND y < 0 )
+ return GLUI_TRANSLATION_MOUSE_DOWN_LEFT;
+ else if ( x < 0 AND y > 0 )
+ return GLUI_TRANSLATION_MOUSE_DOWN_RIGHT;
+ else if ( x > 0 AND y < 0 )
+ return GLUI_TRANSLATION_MOUSE_UP_LEFT;
+ else if ( x > 0 AND y > 0 )
+ return GLUI_TRANSLATION_MOUSE_UP_RIGHT;
+
+
+ return GLUI_TRANSLATION_MOUSE_NONE;
+}
+
+
+/*********************************** GLUI_Translation::set_x() ******/
+
+void GLUI_Translation::set_x( float val )
+{
+ set_one_val( val, 0 );
+}
+
+
+/*********************************** GLUI_Translation::set_y() ******/
+
+void GLUI_Translation::set_y( float val )
+{
+ if ( trans_type == GLUI_TRANSLATION_XY )
+ set_one_val( val, 1 );
+ else
+ set_one_val( val, 0 );
+}
+
+
+/*********************************** GLUI_Translation::set_z() ******/
+
+void GLUI_Translation::set_z( float val )
+{
+ set_one_val( val, 0 );
+}
+
+
+/******************************* GLUI_Translation::set_one_val() ****/
+
+void GLUI_Translation::set_one_val( float val, int index )
+{
+ float *fp;
+
+ float_array_val[index] = val; /* set value in array */
+
+ /*** The code below is like output_live, except it only operates on
+ a single member of the float array (given by 'index') instead of
+ outputting the entire array ****/
+
+ if ( ptr_val == NULL OR NOT live_inited )
+ return;
+
+ fp = (float*) ptr_val;
+ fp[index] = float_array_val[index];
+ last_live_float_array[index] = float_array_val[index];
+
+ /** Update the main gfx window? **/
+ if ( this->glui != NULL ) {
+ this->glui->post_update_main_gfx();
+ }
+}
diff --git a/tests/bullet/Extras/glui/glui_tree.cpp b/tests/bullet/Extras/glui/glui_tree.cpp
new file mode 100644
index 00000000..f253fa4f
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_tree.cpp
@@ -0,0 +1,278 @@
+/****************************************************************************
+
+ GLUI User Interface Toolkit
+ ---------------------------
+
+ glui_panel.cpp - GLUI_Panel control class
+
+
+ --------------------------------------------------
+
+ Copyright (c) 1998 Paul Rademacher
+
+ This program is freely distributable without licensing fees and is
+ provided without guarantee or warrantee expressed or implied. This
+ program is -not- in the public domain.
+
+*****************************************************************************/
+
+#include "glui_internal_control.h"
+
+
+/****************************** GLUI_Tree::GLUI_Tree() **********/
+GLUI_Tree::GLUI_Tree(GLUI_Node *parent, const char *name,
+ int open, int inset)
+{
+ common_init();
+ GLUI_StaticText *inset_label;
+ GLUI_Column *col;
+
+ this->set_name( name );
+ this->user_id = -1;
+
+ if ( NOT open ) {
+ this->is_open = false;
+ this->h = GLUI_DEFAULT_CONTROL_HEIGHT + 7;
+ }
+
+ parent->add_control( this );
+ inset_label = new GLUI_StaticText(this,"");
+ inset_label->set_w(inset);
+ col = new GLUI_Column(this,true);
+ this->set_column(col);
+ this->set_alignment(GLUI_ALIGN_LEFT);
+}
+
+
+/****************************** GLUI_Tree::open() **********/
+
+void GLUI_Tree::open( void )
+{
+ if ( is_open )
+ return;
+ is_open = true;
+
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ child_head = collapsed_node.child_head;
+ child_tail = collapsed_node.child_tail;
+
+ collapsed_node.child_head = NULL;
+ collapsed_node.child_tail = NULL;
+
+ if ( child_head != NULL ) {
+ ((GLUI_Control*) child_head)->unhide_internal( true );
+ }
+
+ glui->refresh();
+}
+
+
+/****************************** GLUI_Tree::close() **********/
+
+void GLUI_Tree::close( void )
+{
+ if ( NOT glui )
+ return;
+
+ if ( NOT is_open )
+ return;
+ is_open = false;
+
+ GLUI_DRAWINGSENTINAL_IDIOM
+
+ if ( child_head != NULL ) {
+ ((GLUI_Control*) child_head)->hide_internal( true );
+ }
+
+ collapsed_node.child_head = first_child();
+ collapsed_node.child_tail = last_child();
+
+ child_head = NULL;
+ child_tail = NULL;
+
+ this->h = GLUI_DEFAULT_CONTROL_HEIGHT + 7;
+
+ glui->refresh();
+}
+
+
+/**************************** GLUI_Tree::mouse_down_handler() **********/
+
+
+int GLUI_Tree::mouse_down_handler( int local_x, int local_y )
+{
+ if ( local_y - y_abs > 18 ) {
+ initially_inside = currently_inside = false;
+ return false;
+ }
+
+ currently_inside = true;
+ initially_inside = true;
+ redraw();
+
+ return false;
+}
+
+/**************************** GLUI_Tree::mouse_held_down_handler() ****/
+
+int GLUI_Tree::mouse_held_down_handler(
+ int local_x, int local_y,
+ bool new_inside )
+{
+ if ( NOT initially_inside )
+ return false;
+
+ if ( local_y - y_abs> 18 )
+ new_inside = false;
+
+ if (currently_inside != new_inside)
+ redraw();
+
+ return false;
+}
+
+
+/**************************** GLUI_Tree::mouse_down_handler() **********/
+
+int GLUI_Tree::mouse_up_handler( int local_x, int local_y, bool inside )
+{
+ if ( currently_inside ) {
+ if ( is_open )
+ close();
+ else
+ open();
+ }
+
+ currently_inside = false;
+ initially_inside = false;
+ redraw();
+
+ return false;
+}
+
+
+/********************************* GLUI_Tree::draw() ***********/
+
+void GLUI_Tree::draw( int x, int y )
+{
+ GLUI_DRAWINGSENTINAL_IDIOM
+ int left, right, top, bottom, delta_x;
+
+ left = 5;
+ right = w-left;
+ top = 3;
+ bottom = 3+16;
+ delta_x = 0;
+
+ glui->draw_raised_box( left, top, 16, 16 );
+
+ if ( glui )
+ glColor3ub(glui->bkgd_color.r,glui->bkgd_color.g,glui->bkgd_color.b);
+ glDisable( GL_CULL_FACE );
+ glBegin( GL_QUADS );
+ glVertex2i( left+17, top+1 ); glVertex2i( right-1, top+1 );
+ glVertex2i( right-1, bottom-1 ); glVertex2i( left+17, bottom-1 );
+ glEnd();
+
+ if (format & GLUI_TREEPANEL_DISPLAY_HIERARCHY) {
+ delta_x = string_width( level_name ) + char_width(' ');
+ glColor3f( lred, lgreen, lblue); /* The hierarchy is drawn in bold */
+ glRasterPos2i(left + 25, top + 11);
+ draw_string(level_name);
+ glRasterPos2i(left + 24, top + 11);
+ draw_string(level_name);
+ }
+
+ draw_name( delta_x+left+24, top+11 );
+
+ if ( active )
+ draw_active_box( left+22, delta_x+left+string_width( name )+32,
+ top, bottom-2 );
+
+
+ /** Draw '+' or '-' **/
+
+ glBegin( GL_LINES );
+ if ( is_open ) {
+ if ( enabled )
+ if (is_current)
+ glColor3f( 0, 0, 1 );
+ else
+ glColor3f( 0.0, 0.0, 0.0 );
+ else
+ glColor3f( 0.5, 0.5, 0.5 );
+ glVertex2i(left+4,(top+bottom)/2); glVertex2i(left+13,(top+bottom)/2);
+
+ glColor3f( 1.0, 1.0, 1.0 );
+ glVertex2i(left+4,1+(top+bottom)/2);glVertex2i(left+13,1+(top+bottom)/2);
+ }
+ else
+ {
+ glColor3f( 1.0, 1.0, 1.0 );
+ glVertex2i(left+9,top+3); glVertex2i(left+9,bottom-4);
+ glVertex2i(left+4,(top+bottom)/2); glVertex2i(left+13,(top+bottom)/2);
+
+ if ( enabled )
+ if (is_current)
+ glColor3f( 0, 0, 1 );
+ else
+ glColor3f( 0.0, 0.0, 0.0 );
+ else
+ glColor3f( 0.5, 0.5, 0.5 );
+ glVertex2i(left+4,-1+(top+bottom)/2);
+ glVertex2i(left+13,-1+(top+bottom)/2);
+ glVertex2i(left+8,top+3);
+ glVertex2i(left+8,bottom-4);
+ }
+ glEnd();
+
+ glLineWidth( 1.0 );
+
+ if (currently_inside) draw_pressed();
+}
+
+
+/***************************** GLUI_Tree::update_size() **********/
+
+void GLUI_Tree::update_size( void )
+{
+ int text_size = 0, delta_x = 0;
+
+ if ( NOT glui )
+ return;
+
+ text_size = string_width(name);
+
+ if (format & GLUI_TREEPANEL_DISPLAY_HIERARCHY) {
+ delta_x = string_width( level_name );
+ }
+
+ if ( w < text_size + 36 + delta_x)
+ w = text_size + 36 + delta_x;
+}
+
+
+/**************************** GLUI_Tree::draw_pressed() ***********/
+
+void GLUI_Tree::draw_pressed( void )
+{
+ int left, right, top, bottom;
+
+ left = 5;
+ right = w-left;
+ top = 3;
+ bottom = 3+16;
+
+ glColor3f( 0.0, 0.0, 0.0 );
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( left, top ); glVertex2i( right, top );
+ glVertex2i( right, bottom ); glVertex2i( left,bottom );
+ glEnd();
+
+ glBegin( GL_LINE_LOOP );
+ glVertex2i( left+1, top+1 ); glVertex2i( right-1, top+1 );
+ glVertex2i( right-1, bottom-1 ); glVertex2i( left+1,bottom-1 );
+ glEnd();
+}
diff --git a/tests/bullet/Extras/glui/glui_treepanel.cpp b/tests/bullet/Extras/glui/glui_treepanel.cpp
new file mode 100644
index 00000000..27c659c1
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_treepanel.cpp
@@ -0,0 +1,388 @@
+#include "GL/glui.h"
+
+
+/****************************** GLUI_TreePanel::GLUI_TreePanel() *********/
+
+GLUI_TreePanel::GLUI_TreePanel(GLUI_Node *parent, const char *name,
+ bool open, int inset)
+{
+ common_init();
+
+ set_name( name );
+ user_id = -1;
+
+ if ( !open ) {
+ is_open = false;
+ h = GLUI_DEFAULT_CONTROL_HEIGHT + 7;
+ }
+
+ parent->add_control( this );
+}
+
+/****************************** GLUI_TreePanel::set_color() *********/
+
+void GLUI_TreePanel::set_color(float r, float g, float b)
+{
+ red = r;
+ green = g;
+ blue = b;
+ redraw();
+}
+
+/************************ GLUI_TreePanel::set_level_color() *********/
+
+void GLUI_TreePanel::set_level_color(float r, float g, float b)
+{
+ lred = r;
+ lgreen = g;
+ lblue = b;
+ redraw();
+}
+
+/****************************** GLUI_TreePanel::ab() *********/
+
+/* Adds branch to curr_root */
+GLUI_Tree *GLUI_TreePanel::ab(const char *name, GLUI_Tree *root)
+{
+ GLUI_Tree *temp;
+
+
+ if (root != NULL) {
+ resetToRoot(root);
+ }
+
+ temp = new GLUI_Tree(curr_root, name);
+ initNode(temp);
+ formatNode(temp);
+
+ curr_root = temp;
+ curr_branch = NULL; /* Currently at leaf */
+
+ if (temp->dynamicCastGLUI_Tree())
+ ((GLUI_Tree *)temp)->set_current(true);
+ //refresh();
+ // glui->deactivate_current_control();
+ //glui->activate_control( temp, GLUI_ACTIVATE_TAB );
+ return temp;
+
+}
+
+/****************************** GLUI_TreePanel::fb() *********/
+
+/* Goes up one level, resets curr_root and curr_branch to parents*/
+void GLUI_TreePanel::fb(GLUI_Tree *branch)
+{
+ if (((GLUI_Panel *)branch) == ((GLUI_Panel *)this))
+ return;
+
+ if (((GLUI_Panel *)curr_branch) == ((GLUI_Panel *)this)) {
+ resetToRoot();
+ return;
+ }
+ if (((GLUI_Panel *)curr_root) == ((GLUI_Panel *)this)) {
+ resetToRoot();
+ return;
+ }
+
+ if (branch != NULL) {
+
+ if ( branch->dynamicCastGLUI_Tree() )
+ ((GLUI_Tree *)branch)->set_current(false);
+
+ curr_branch = (GLUI_Tree *)branch->next();
+ curr_root = (GLUI_Panel *)branch->parent();
+
+ if (curr_branch == NULL && (curr_root->collapsed_node).first_child() != NULL)
+ curr_branch = (GLUI_Tree *)(curr_root->collapsed_node).first_child();
+
+
+ if ( curr_root->dynamicCastGLUI_Tree() )
+ ((GLUI_Tree *)curr_root)->set_current(true);
+
+ } else {
+ if (curr_root != NULL) { /* up one parent */
+
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree *)curr_root)->set_current(false);
+
+ curr_branch = (GLUI_Tree *) curr_root->next();
+ curr_root = (GLUI_Panel *) curr_root->parent();
+
+ if (curr_branch == NULL && (curr_root->collapsed_node).first_child() != NULL)
+ curr_branch = (GLUI_Tree *)(curr_root->collapsed_node).first_child();
+
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree *)curr_root)->set_current(true);
+
+ }
+
+ }
+ //refresh();
+}
+
+
+/****************************** GLUI_TreePanel::refresh() *********/
+
+void GLUI_TreePanel::refresh()
+{
+ glui->deactivate_current_control();
+ glui->activate_control( curr_root, GLUI_ACTIVATE_TAB );
+
+ redraw();
+}
+
+/****************************** GLUI_TreePanel::initNode() *********/
+
+void GLUI_TreePanel::initNode(GLUI_Tree *temp)
+{
+ if (temp == NULL)
+ return;
+ int level = temp->get_level();
+ int child_number = 1;
+
+ GLUI_Tree *ptree = temp->parent()->dynamicCastGLUI_Tree();
+ if (ptree) {
+ level = ptree->get_level() + 1;
+ GLUI_Tree *prevTree = temp->prev()->dynamicCastGLUI_Tree();
+ if (prevTree) {
+ child_number = prevTree->get_child_number() + 1;
+ }
+ } else if (temp->dynamicCastGLUI_Tree() &&
+ temp->parent()->dynamicCastGLUI_TreePanel()) {
+ child_number = ++root_children;
+ }
+ temp->set_id(uniqueID()); // -1 if unset
+ temp->set_level(level);
+ temp->set_child_number(child_number);
+}
+
+/****************************** GLUI_TreePanel::formatNode() *********/
+
+void GLUI_TreePanel::formatNode(GLUI_Tree *temp)
+{
+ if (temp == NULL)
+ return;
+ int level = temp->get_level();
+ int child_number = temp->get_child_number();
+ GLUI_String level_name="";
+ GLUI_String full_name="";
+
+ temp->level_name == "";
+
+ if (format & GLUI_TREEPANEL_DISPLAY_HIERARCHY) {
+ if (format & GLUI_TREEPANEL_HIERARCHY_LEVEL_ONLY) {
+ glui_format_str(level_name, "%d", level);
+ }
+ if (format & GLUI_TREEPANEL_HIERARCHY_NUMERICDOT) {
+ if ( temp->parent()->dynamicCastGLUI_Tree() )
+ glui_format_str(level_name, "%s.%d",
+ ((GLUI_Tree *)(temp->parent()))->level_name.c_str(),
+ child_number);
+ else
+ glui_format_str(level_name, "%d", child_number);
+ }
+ }
+
+ temp->set_level_color(lred, lgreen, lblue);
+ temp->set_format(format);
+ temp->level_name = level_name;
+
+ if (format & GLUI_TREEPANEL_ALTERNATE_COLOR) {
+ switch (level%8) {
+ case (7): temp->set_color(.5,.5,.5); break;
+ case (6): temp->set_color(.3,.5,.5); break;
+ case (5): temp->set_color(.5,.3,.5); break;
+ case (4): temp->set_color(.3,.3,.5); break;
+ case (3): temp->set_color(.5,.5,.3); break;
+ case (2): temp->set_color(.3,.5,.3); break;
+ case (1): temp->set_color(.5,.3,.3); break;
+ default: temp->set_color(.3,.3,.3);
+ }
+ } else {
+ temp->set_color(red,green,blue);
+ }
+
+ if (format & GLUI_TREEPANEL_DISABLE_BAR) {
+ temp->disable_bar();
+ } else {
+ if (format & GLUI_TREEPANEL_DISABLE_DEEPEST_BAR) {
+ temp->disable_bar();
+ if ( curr_root->dynamicCastGLUI_Tree() )
+ ((GLUI_Tree *)curr_root)->enable_bar();
+ } else
+ if (format & GLUI_TREEPANEL_CONNECT_CHILDREN_ONLY) {
+ temp->disable_bar();
+ if (temp->prev() && temp->prev()->dynamicCastGLUI_Tree() )
+ {
+ ((GLUI_Tree *)temp->prev())->enable_bar();
+ }
+ }
+ }
+}
+
+/****************************** GLUI_TreePanel::update_all() *********/
+
+void GLUI_TreePanel::update_all()
+{
+ printf("GLUI_TreePanel::update_all() doesn't work yet. - JVK\n");
+ return;
+ GLUI_Panel *saved_root = curr_root;
+ GLUI_Tree *saved_branch = curr_branch;
+ root_children = 0;
+ resetToRoot(this);
+ if (curr_branch && curr_branch->dynamicCastGLUI_Tree())
+ formatNode((GLUI_Tree *)curr_branch);
+ next();
+ while (curr_root && curr_branch != this->first_child()) {
+ if (curr_branch && curr_branch->dynamicCastGLUI_Tree()) {
+ formatNode((GLUI_Tree *)curr_branch);
+ }
+ next();
+ }
+ curr_root = saved_root;
+ curr_branch = saved_branch;
+}
+
+/****************************** GLUI_TreePanel::expand_all() *********/
+
+void GLUI_TreePanel::expand_all()
+{
+ GLUI_Panel *saved_root = curr_root;
+ GLUI_Tree *saved_branch = curr_branch;
+
+ resetToRoot(this);
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree*)curr_root)->open();
+ next();
+ while (curr_root != NULL && curr_branch != this->first_child()) {
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree*)curr_root)->open();
+ next();
+ }
+
+ curr_root = saved_root;
+ curr_branch = saved_branch;
+}
+
+/****************************** GLUI_TreePanel::collapse_all() *********/
+
+void GLUI_TreePanel::collapse_all()
+{
+ GLUI_Panel *saved_root = curr_root;
+ GLUI_Tree *saved_branch = curr_branch;
+
+ resetToRoot(this);
+ next();
+ while (curr_root != NULL && curr_branch != this->first_child()) {
+ if (curr_root->dynamicCastGLUI_Tree() &&
+ curr_branch == NULL) { /* we want to close everything leaf-first */
+ ((GLUI_Tree*)curr_root)->close();
+ /* Rather than simply next(), we need to manually move the
+ curr_root because this node has been moved to the
+ collapsed_node list */
+ curr_branch = (GLUI_Tree *)curr_root->next();
+ curr_root = (GLUI_Panel *)curr_root->parent();
+ } else
+ next();
+ }
+
+ curr_root = saved_root;
+ curr_branch = saved_branch;
+
+}
+
+/****************************** GLUI_TreePanel::db() *********/
+
+/* Deletes the curr_root */
+void GLUI_TreePanel::db(GLUI_Tree *root)
+{
+ GLUI_Tree *temp_branch;
+ GLUI_Panel *temp_root;
+
+ if (((GLUI_Control *)root) == ((GLUI_Control *)this))
+ return;
+
+ if (root != NULL) {
+ curr_root = (GLUI_Tree *)root;
+ curr_branch = NULL;
+ }
+
+ if (curr_root == NULL || ((GLUI_Panel *)curr_root) == ((GLUI_Panel *)this)) {
+ resetToRoot();
+ return;
+ }
+
+
+ temp_branch = (GLUI_Tree *)curr_root->next(); /* Next branch, if any */
+ temp_root = (GLUI_Panel *)curr_root->parent(); /* new root */
+ curr_root->unlink();
+ delete curr_root;
+ curr_branch = (GLUI_Tree *) temp_branch;
+ curr_root = (GLUI_Panel *) temp_root;
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree *)curr_root)->open();
+
+ if ((format & GLUI_TREEPANEL_DISABLE_DEEPEST_BAR) == GLUI_TREEPANEL_DISABLE_DEEPEST_BAR) {
+ if (curr_root->dynamicCastGLUI_Tree() && ((GLUI_Tree *)curr_root->next()) == NULL)
+ ((GLUI_Tree *)curr_root)->disable_bar();
+ }
+ //refresh();
+}
+
+/****************************** GLUI_TreePanel::descendBranch() *********/
+
+/* Finds the very last branch of curr_root, resets vars */
+void GLUI_TreePanel::descendBranch(GLUI_Panel *root) {
+ if (root)
+ resetToRoot(root);
+ else
+ resetToRoot(curr_root);
+ if (curr_branch != NULL && curr_branch != ((GLUI_Panel *)this)) {
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree *)curr_root)->set_current(false);
+ descendBranch(curr_branch);
+ }
+}
+
+/****************************** GLUI_TreePanel::next() *********/
+
+void GLUI_TreePanel::next()
+{
+ if (curr_root == NULL)
+ resetToRoot(this);
+
+ if (curr_branch == NULL && (curr_root->collapsed_node).first_child() != NULL)
+ curr_branch = (GLUI_Tree *)(curr_root->collapsed_node).first_child();
+
+
+ if (curr_branch != NULL && curr_branch != ((GLUI_Panel *)this)) { /* Descend into branch */
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree *)curr_root)->set_current(false);
+ resetToRoot(curr_branch);
+ } else if (curr_branch == NULL) {
+ fb(NULL); /* Backup and move on */
+ }
+}
+
+/****************************** GLUI_TreePanel::resetToRoot() *********/
+
+/* Resets curr_root and curr branch to TreePanel and lastChild */
+void GLUI_TreePanel::resetToRoot(GLUI_Panel *new_root)
+{
+ GLUI_Panel *root = this;
+ if (new_root != NULL)
+ root = new_root;
+ curr_root = root;
+ if (curr_root->dynamicCastGLUI_Tree())
+ ((GLUI_Tree *)curr_root)->set_current(true);
+ curr_branch = (GLUI_Tree *)root->first_child();
+
+ /* since Trees are collapsable, we need to check the collapsed nodes
+ in case the curr_root is collapsed */
+ if (curr_branch == NULL && (root->collapsed_node).first_child() != NULL) {
+ curr_branch = (GLUI_Tree *)(root->collapsed_node).first_child();
+ }
+ while (curr_branch && curr_branch->dynamicCastGLUI_Tree()) {
+ curr_branch=(GLUI_Tree *)curr_branch->next();
+ }
+}
diff --git a/tests/bullet/Extras/glui/glui_window.cpp b/tests/bullet/Extras/glui/glui_window.cpp
new file mode 100644
index 00000000..02c2d0d2
--- /dev/null
+++ b/tests/bullet/Extras/glui/glui_window.cpp
@@ -0,0 +1,44 @@
+/*
+
+ glui_window.cpp - GLUI_Button control class
+
+ GLUI User Interface Toolkit (LGPL)
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+
+#include "GL/glui.h"
+#include "glui_internal.h"
+
+GLUI_Glut_Window::GLUI_Glut_Window()
+: GLUI_Node(),
+
+ glut_window_id(0),
+ glut_keyboard_CB(NULL),
+ glut_special_CB(NULL),
+ glut_reshape_CB(NULL),
+ glut_passive_motion_CB(NULL),
+ glut_mouse_CB(NULL),
+ glut_visibility_CB(NULL),
+ glut_motion_CB(NULL),
+ glut_display_CB(NULL),
+ glut_entry_CB(NULL)
+{
+}
diff --git a/tests/bullet/Extras/glui/quaternion.cpp b/tests/bullet/Extras/glui/quaternion.cpp
new file mode 100644
index 00000000..d73523eb
--- /dev/null
+++ b/tests/bullet/Extras/glui/quaternion.cpp
@@ -0,0 +1,243 @@
+/***********************************************************************
+
+ quaternion.cpp - A quaternion class
+
+ -------------------------------------------------------------------
+
+ GLUI User Interface Toolkit (LGPL)
+ Copyright (c) 1998 Paul Rademacher
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+************************************************************************
+
+ Feb 1998, Paul Rademacher (rademach@cs.unc.edu)
+ Oct 2003, Nigel Stewart - GLUI Code Cleaning
+
+************************************************************************/
+#include "glui_internal_control.h"
+#include "quaternion.h"
+#include <cmath>
+#include "glui_internal.h"
+
+/******************************************* constructors **************/
+
+quat::quat()
+{
+ *this = quat_identity();
+}
+
+quat::quat(const float x, const float y, const float z, const float w)
+{
+ v.set( x, y, z );
+ s = w;
+}
+
+quat::quat(const vec3 &_v, const float _s)
+{
+ set( _v, _s );
+}
+
+quat::quat(const float _s, const vec3 &_v)
+{
+ set( _v, _s );
+}
+
+quat::quat(const float *d)
+{
+ v[0] = d[0];
+ v[1] = d[1];
+ v[2] = d[2];
+ s = d[3];
+}
+
+quat::quat(const double *d)
+{
+ v[0] = (float) d[0];
+ v[1] = (float) d[1];
+ v[2] = (float) d[2];
+ s = (float) d[3];
+}
+
+quat::quat(const quat &q)
+{
+ v = q.v;
+ s = q.s;
+}
+
+void quat::set(const vec3 &_v, const float _s)
+{
+ v = _v;
+ s = _s;
+}
+
+quat &quat::operator=(const quat &q)
+{
+ v = q.v;
+ s = q.s;
+ return *this;
+}
+
+/******** quat friends ************/
+
+quat operator + (const quat &a, const quat &b)
+{
+ return quat( a.s+b.s, a.v+b.v );
+}
+
+quat operator - (const quat &a, const quat &b)
+{
+ return quat( a.s-b.s, a.v-b.v );
+}
+
+quat operator - (const quat &a )
+{
+ return quat( -a.s, -a.v );
+}
+
+quat operator * ( const quat &a, const quat &b)
+{
+ return quat( a.s*b.s - a.v*b.v, a.s*b.v + b.s*a.v + a.v^b.v );
+}
+
+quat operator * ( const quat &a, const float t)
+{
+ return quat( a.v * t, a.s * t );
+}
+
+quat operator * ( const float t, const quat &a )
+{
+ return quat( a.v * t, a.s * t );
+}
+
+mat4 quat::to_mat4() const
+{
+ float xs, ys, zs, wx, wy, wz, xx, xy, xz, yy, yz, zz;
+
+ float t = 2.0f / (v*v + s*s);
+
+ xs = v[VX]*t; ys = v[VY]*t; zs = v[VZ]*t;
+ wx = s*xs; wy = s*ys; wz = s*zs;
+ xx = v[VX]*xs; xy = v[VX]*ys; xz = v[VX]*zs;
+ yy = v[VY]*ys; yz = v[VY]*zs; zz = v[VZ]*zs;
+
+ mat4 matrix(
+ 1.0f-(yy+zz), xy+wz, xz-wy, 0.0f,
+ xy-wz, 1.0f-(xx+zz), yz+wx, 0.0f,
+ xz+wy, yz-wx, 1.0f-(xx+yy), 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f );
+
+ return matrix;
+}
+
+/************************************************* quat_identity() *****/
+/* Returns quaternion identity element */
+
+quat quat_identity()
+{
+ return quat( vec3( 0.0, 0.0, 0.0 ), 1.0 );
+}
+
+/************************************************ quat_slerp() ********/
+/* Quaternion spherical interpolation */
+
+quat quat_slerp(const quat &from, const quat &to, float t)
+{
+ quat to1;
+ float omega, cosom, sinom, scale0, scale1;
+
+ /* calculate cosine */
+ cosom = from.v * to.v + from.s + to.s;
+
+ /* Adjust signs (if necessary) */
+ if ( cosom < 0.0 )
+ {
+ cosom = -cosom;
+ to1 = -to;
+ }
+ else
+ {
+ to1 = to;
+ }
+
+ /* Calculate coefficients */
+ if ((1.0 - cosom) > FUDGE )
+ {
+ /* standard case (slerp) */
+ omega = (float) acos( cosom );
+ sinom = (float) sin( omega );
+ scale0 = (float) sin((1.0 - t) * omega) / sinom;
+ scale1 = (float) sin(t * omega) / sinom;
+ }
+ else
+ {
+ /* 'from' and 'to' are very close - just do linear interpolation */
+ scale0 = 1.0f - t;
+ scale1 = t;
+ }
+
+ return scale0 * from + scale1 * to1;
+}
+
+/********************************************** set_angle() ************/
+/* set rot angle (degrees) */
+
+void quat::set_angle(float f)
+{
+ vec3 axis = get_axis();
+
+ s = (float) cos( DEG2RAD( f ) / 2.0 );
+
+ v = axis * (float) sin(DEG2RAD(f) / 2.0);
+}
+
+/********************************************** scale_angle() ************/
+/* scale rot angle (degrees) */
+
+void quat::scale_angle(float f)
+{
+ set_angle( f * get_angle() );
+}
+
+/********************************************** get_angle() ************/
+/* get rot angle (degrees). Assumes s is between -1 and 1 */
+
+float quat::get_angle() const
+{
+ return (float) RAD2DEG( 2.0 * acos( s ) );
+}
+
+/********************************************* get_axis() **************/
+
+vec3 quat::get_axis() const
+{
+ float scale = (float) sin( acos( s ) );
+
+ if ( scale < FUDGE AND scale > -FUDGE )
+ return vec3( 0.0, 0.0, 0.0 );
+ else
+ return v / scale;
+}
+
+/******************************************* quat::print() ************/
+
+void quat::print(FILE *dest, const char *name) const
+{
+ fprintf( dest, "%s: v:<%3.2f %3.2f %3.2f> s:%3.2f\n",
+ name, v[0], v[1], v[2], s );
+}
diff --git a/tests/bullet/Extras/glui/quaternion.h b/tests/bullet/Extras/glui/quaternion.h
new file mode 100644
index 00000000..f58a7445
--- /dev/null
+++ b/tests/bullet/Extras/glui/quaternion.h
@@ -0,0 +1,114 @@
+/****************************************************************************
+
+ quaternion.h - A quaternion class
+
+ GLUI User Interface Toolkit (LGPL)
+ Copyright (c) 1998 Paul Rademacher
+
+ ---------------------------------------------------------------------
+
+ WWW: http://sourceforge.net/projects/glui/
+ Forums: http://sourceforge.net/forum/?group_id=92496
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*****************************************************************************/
+
+#ifndef GLUI_QUATERNION_H
+#define GLUI_QUATERNION_H
+
+#include "algebra3.h"
+#include <cstdio>
+
+/* this line defines a new type: pointer to a function which returns a */
+/* float and takes as argument a float */
+typedef float (*V_FCT_PTR)(float);
+
+/****************************************************************
+ * Quaternion *
+ ****************************************************************/
+
+class quat
+{
+ /*protected: */
+public:
+
+ vec3 v; /* vector component */
+ float s; /* scalar component */
+
+ /*public: */
+
+ /* Constructors */
+
+ quat();
+ quat(float x, float y, float z, float w);
+ quat(const vec3 &v, float s);
+ quat(float s, const vec3 &v);
+ quat(const float *d); /* copy from four-element float array */
+ quat(const double *f); /* copy from four-element double array */
+ quat(const quat &q); /* copy from other quat */
+
+ /* Assignment operators */
+
+ quat &operator = (const quat &v); /* assignment of a quat */
+ quat &operator += (const quat &v); /* incrementation by a quat */
+ quat &operator -= (const quat &v); /* decrementation by a quat */
+ quat &operator *= (float d); /* multiplication by a constant */
+ quat &operator /= (float d); /* division by a constant */
+
+ /* special functions */
+
+ float length() const; /* length of a quat */
+ float length2() const; /* squared length of a quat */
+ quat &normalize(); /* normalize a quat */
+ quat &apply(V_FCT_PTR fct); /* apply a func. to each component */
+ vec3 xform(const vec3 &v ); /* q*v*q-1 */
+ mat4 to_mat4() const;
+ void set_angle(float f); /* set rot angle (degrees) */
+ void scale_angle(float f); /* scale rot angle (degrees) */
+ float get_angle() const; /* set rot angle (degrees) */
+ vec3 get_axis() const; /* get axis */
+
+ void print( FILE *file, const char *name ) const; /* print to a file */
+
+ float &operator [] (int i); /* indexing */
+ const float &operator [] (int i) const; /* indexing */
+
+ void set(float x, float y, float z); /* set quat */
+ void set(const vec3 &v, float s); /* set quat */
+
+ /* friends */
+
+ friend quat operator - (const quat &v); /* -q1 */
+ friend quat operator + (const quat &a, const quat &b); /* q1 + q2 */
+ friend quat operator - (const quat &a, const quat &b); /* q1 - q2 */
+ friend quat operator * (const quat &a, float d); /* q1 * 3.0 */
+ friend quat operator * (float d, const quat &a); /* 3.0 * q1 */
+ friend quat operator * (const quat &a, const quat &b); /* q1 * q2 */
+ friend quat operator / (const quat &a, float d); /* q1 / 3.0 */
+ friend int operator == (const quat &a, const quat &b); /* q1 == q2 ? */
+ friend int operator != (const quat &a, const quat &b); /* q1 != q2 ? */
+ friend void swap(quat &a, quat &b); /* swap q1 &q2 */
+ /*friend quat min(const quat &a, const quat &b); -- min(q1, q2) */
+ /*friend quat max(const quat &a, const quat &b); -- max(q1, q2) */
+ friend quat prod(const quat &a, const quat &b); /* term by term mult*/
+};
+
+/* Utility functions */
+
+quat quat_identity(); /* Returns quaternion identity element */
+quat quat_slerp(const quat &from, const quat &to, float t);
+
+#endif
diff --git a/tests/bullet/Extras/glui/readme.txt b/tests/bullet/Extras/glui/readme.txt
new file mode 100644
index 00000000..4cda867f
--- /dev/null
+++ b/tests/bullet/Extras/glui/readme.txt
@@ -0,0 +1,228 @@
+Welcome to the GLUI User Interface Library, v2.3!
+March 22, 2005
+-------------------------------------------------
+
+This distribution contains the latest community-maintained fork of the
+GLUI Library. It is based on the GLUI v2.1 beta version from Paul
+Rademacher (http://www.cs.unc.edu/~rademach/glui/) plus the
+compatibility changes made by Nigel Stewart in his "GLUI v2.2"
+(http://www.nigels.com/glt/glui) In accordance with the LGPL under
+which the library is released (according to Paul's web page at least),
+these changes are available to everyone in the community.
+
+WARNING: This version (2.3) introduces some incompatible changes with
+previous versions!!
+
+CHANGES:
+
+----------------------------------
+- GLUI_String is now a std::string
+ This is the main source of most incopatibilities, but I felt it was
+ a necessary change, because the previous usage of a fixed-sized
+ buffer was just too unsafe. I myself was bitten a few times passing
+ a char* buffer of insufficient size into GLUI as a live variable.
+ It is still possible to use a char buffer, but it is not recommended.
+
+ If you used GLUI_String before as a live var type, the easiest way
+ to get your code compiling again is to change those to "char
+ buf[300]". The better way, though, is to update your code to treat
+ it as a std::string.
+
+ For instance, if you used to pass mystr to functions that take
+ 'const char*', now use mystr.c_str() method, instead.
+ If you used strcpy(mystr, b) to set the value, now just do mystr=b.
+ If you used sprintf(mystr,...) to set the value, now do
+ glui_format_string(mystr,...).
+ If you used to clear the string with mystr[0]='\0', now just clear
+ it with mystr="".
+
+----------------------------------
+- Enhanced GLUI_EditText
+ Control keys can be used for navigation and control. The bindings
+ are bash-like: Ctrl-B for previous char, Ctrl-F for forward char, etc.
+ bindings. Also control keys that aren't bound to commands are
+ simply ignored, whereas before they would be inserted as invisible
+ characters.
+
+----------------------------------
+- Added GLUI_CommandLine class
+ This is a GLUI_EditText with a history mechanism.
+
+----------------------------------
+- New, more object oriented construction API.
+ Now instead of calling
+
+ glui->add_button_to_panel( panel, "my button", myid, mycallback );
+
+ you should just call the button constructor:
+
+ new GLUI_Button( panel, "my button", myid, mycallback );
+
+ And similarly to add it to a GLUI instead of a panel, rather than:
+
+ glui->add_button( glui, "my button", myid, mycallback );
+
+ just call the constructor with the GLUI as the first argument:
+
+ new GLUI_Button( glui, "my button", myid, mycallback );
+
+ The old scheme is now deprecated, but still works. The benefit of
+ this new scheme is that now the GLUI class doesn't have to know
+ about all the different types of GLUI_Controls that exist.
+ Previously GLUI had to both know about all the controls, and know
+ how to initialize them. Now the responsibility for initialization
+ belongs to the GLUI_Control subclasses themselves, where it
+ belongs. Additionally it means that you can create your own
+ GLUI_Control subclasses which will be on equal footing with the
+ built-in controls, whereas before any user-created controls would
+ always be "second-class citizens" since they would have to be
+ constructed differently from the built-ins.
+
+
+----------------------------------
+- Removed need for type-declaring arguments when argment type suffices.
+ This effects GLUI_Spinner and GLUI_EditText (and GLUI_CommandLine?).
+
+ For example, instead of calling
+
+ new GLUI_Spinner( glui, "myspin", GLUI_SPINNER_INT, &live_int_var );
+
+ you can just omit the GLUI_SPINNER_INT part, because the type of the
+ live_int_var tells the compiler which type you want.
+
+ new GLUI_Spinner( glui, "myspin", &live_int_var );
+
+ If you're not using a live, var, you can still use the
+ GLUI_SPINNER_INT type argument. See glui.h for all the new
+ constructor signatures. Note this only works with the new
+ construction API, not with the old "add_blah_to_panel" style of
+ API.
+
+----------------------------------
+- GLUI_Rotation uses your matrix live-variable now.
+ GLUI used to ignore the matrix in your live variable. This version
+ doesn't ignore it, so you'll need to set it to the identity matrix
+ yourself if that's what you want it to start as. There could
+ probably be some improvements to this API, though.
+
+----------------------------------
+- Improvements to 'const' usage.
+ Most char*'s in GLUI functions used to be non-const even when the
+ functions did not modify the string. I changed everywhere
+ appropriate to use const char* instead.
+
+----------------------------------
+- Updated license info in the headers
+ Paul's web page says that GLUI is LGPL, but that wasn't declared in
+ the code itself. I've modified all the headers with the standard
+ LGPL notice.
+
+----------------------------------
+- Updated examples for the API changes
+
+----------------------------------
+- Created project files for Visual Studio .NET (MSVC7.1)
+
+
+That's about it. Enjoy!
+
+
+If you find yourself with too much time on your hands, the things I
+think would be most useful for future improvements to GLUI would be:
+
+1. The GLUI_TextBox and GLUI_Tree definitely need some work, still.
+2. Clipboard integration under Windows/X-Win. I have some code that
+ works on Win32 that I once integrated with GLUI, but I lost that
+ version somewhere. I still have the Win32 clipboard code, though
+ if anyone wants to work on integrating it. I have some X-Win
+ clipboard code, too, but I never got it working quite right.
+3. Remove the dependency on GLUT, making the connection with window
+ system APIs into a more plug-in/adapter modular design.
+ So e.g. if you want to use GLUT, you'd link with the GLUI lib and a
+ GLUI_GLUT lib, and call one extra GLUI_glut_init() function or
+ something.
+
+
+Definitly consider submitting a patch if you've made some nice improvements
+to GLUI. Hopefully being an LGPL sourceforge project will attract some new
+interest to the GLUI project.
+
+Bill Baxter
+baxter
+at
+cs unc edu
+
+=================================================
+JOHN KEW'S ADDITIONS (March 2005)
+=================================================
+
+Thanks to John Kew of Natural Solutions Inc.,
+there are some new widgets. These are demonstrated in example6.cpp.
+
+The new widgets are:
+
+* GLUI_Scrollbar - A scrollbar slider widget
+* GLUI_TextBox - A multi-line text widget
+* GLUI_List - A static choice list
+* GLUI_FileBrowser - A simple filebrowser based on GLUI_List
+* GLUI_Tree - Hierarchical tree widget
+* GLUI_TreePanel - Manager for the tree widget
+
+And one other change:
+
+* GLUI_Rollout has optional embossed border
+
+=================================================
+PAUL'S ORIGINAL GLUI 2.0/2.1 README
+=================================================
+
+Welcome to the GLUI User Interface Library, v2.0 beta!
+-------------------------------------------------
+
+This distribution contains the full GLUI sources, as well as 5 example
+programs. You'll find the full manual under "glui_manual.pdf". The
+GLUI web page is at
+
+ http://www.cs.unc.edu/~rademach/glui
+
+
+ ---------- Windows ----------
+
+The directory 'msvc' contains a Visual C++ workspace entitled
+'glui.dsw'. To recompile the library and examples, open this
+workspace and run the menu command "Build:Batch Build:Build". The 3
+executables will be in the 'bin' directory, and the library in the
+'lib' directory.
+
+To create a new Windows executable using GLUI, create a "Win32 Console
+Application" in VC++, add the GLUI library (in 'msvc/lib/glui32.lib'),
+and add the OpenGL libs:
+
+ glui32.lib glut32.lib glu32.lib opengl32.lib (Microsoft OpenGL)
+
+Include the file "glui.h" in any file that uses the GLUI library.
+
+
+ ---------- Unix ----------
+
+An SGI/HP makefile is found in the file 'makefile' (certain lines may need
+to be commented/uncommented).
+
+To include GLUI in your own apps, add the glui library to your
+makefile (before the glut library 'libglut.a'), and include "glui.h"
+in your sources.
+
+
+
+----------------------------------------------------------------------
+
+Please let me know what you think, what you'd like to change or add,
+and especially what bugs you encounter. Also, please send me your
+e-mail so I can add you to a mailing list for updates.
+
+Good luck, and thanks for trying this out!
+
+Paul Rademacher
+rademach
+at
+cs unc edu \ No newline at end of file
diff --git a/tests/bullet/INSTALL b/tests/bullet/INSTALL
new file mode 100644
index 00000000..0f42fb52
--- /dev/null
+++ b/tests/bullet/INSTALL
@@ -0,0 +1,111 @@
+Bullet Collision Detection and Physics Library
+
+See also http://bulletphysics.org/mediawiki-1.5.8/index.php/Creating_a_project_from_scratch
+
+** Windows Compilation **
+
+ Open the Microsoft Visual Studio solution in msvc/20xx/BULLET_PHYSICS.sln
+
+Alternatively, use CMake to autogenerate a build system for Windows:
+
+ - Download/install CMake from www.cmake.org or package manager
+ - Use cmake-gui or
+ - List available build systems by running 'cmake' in the Bullet root folder
+ - Use cmake-gui
+ - Create a build system using the -G option for example:
+
+ cmake . -G "Visual Studio 9 2008" or
+ cmake . -G "Visual Studio 9 2008 Win64"
+
+
+** Linux Compilation **
+
+ - Download/install CMake from www.cmake.org or package manager
+ CMake is like autoconf in that it will create build scripts which are then
+ used for the actual compilation
+
+ - List available build systems by running 'cmake' in the Bullet root folder
+ - Create a build system using the -G option for example:
+
+ cmake . -G "Unix Makefiles"
+
+ - There are some options for cmake builds:
+ BUILD_SHARED_LIBS: default 'OFF', set to 'ON' to build .so libraries
+ BUILD_EXTRAS: default 'ON', compiles additional libraries in 'Extras'
+ BUILD_DEMOS: default 'ON', compiles applications found in 'Demos'
+ CMAKE_INSTALL_PREFIX: default '/usr/local', the installation path.
+ CMAKE_INSTALL_RPATH: if you install outside a standard ld search path,
+ then you should set this to the installation lib path.
+ CMAKE_BUILD_TYPE: default 'Release', can include debug symbols with
+ either 'Debug' or 'RelWithDebInfo'.
+ Other options may be discovered by 'cmake --help-variable-list' and
+ 'cmake --help-variable OPTION'
+
+ - Run 'cmake' with desired options of the form -DOPTION=VALUE
+ By default this will create the usual Makefile build system, but CMake can
+ also produce Eclipse or KDevelop project files. See 'cmake --help' to see
+ what "generators" are available in your environment, selected via '-G'.
+ For example:
+ cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebugInfo
+
+ - Assuming using the default Makefile output from cmake, run 'make' to
+ build, and then 'make install' if you wish to install.
+
+
+** Mac OS X Compilation **
+
+ - Download/install CMake from www.cmake.org or package manager
+ CMake is like autoconf in that it will create build scripts which are then
+ used for the actual compilation
+
+ - List available build systems by running 'cmake' in the Bullet root folder
+ - Create a build system using the -G option for example:
+
+ cmake . -G Xcode
+ cmake . -G "Unix Makefiles"
+
+ - There are some options for cmake builds:
+ BUILD_SHARED_LIBS: default 'OFF', set to 'ON' to build .dylib libraries
+ BUILD_EXTRAS: default 'ON', compiles additional libraries in 'Extras'
+ BUILD_DEMOS: default 'ON', compiles applications found in 'Demos'
+ CMAKE_INSTALL_PREFIX: default '/usr/local', the installation path.
+ CMAKE_INSTALL_NAME_DIR: if you install outside a standard ld search
+ path, then you should set this to the installation lib/framework path.
+ CMAKE_OSX_ARCHITECTURES: defaults to the native architecture, but can be
+ set to a semicolon separated list for fat binaries, e.g. ppc;i386;x86_64
+ CMAKE_BUILD_TYPE: default 'Release', can include debug symbols with
+ either 'Debug' or 'RelWithDebInfo'.
+
+ To build framework bundles:
+ FRAMEWORK: default 'OFF', also requires 'BUILD_SHARED_LIBS' set ON
+ If both FRAMEWORK and BUILD_SHARED_LIBS are set, will create
+ OS X style Framework Bundles which can be placed in
+ linked via the -framework gcc argument or drag into Xcode projects.
+ (If not framework, then UNIX style 'include' and 'lib' will be produced)
+
+ Other options may be discovered by 'cmake --help-variable-list' and
+ 'cmake --help-variable OPTION'
+
+ - Run 'cmake' with desired options of the form -DOPTION=VALUE
+ By default this will create the usual Makefile build system, but CMake can
+ also produce Eclipse or KDevelop project files. See 'cmake --help' to see
+ what "generators" are available in your environment, selected via '-G'.
+ For example:
+ cmake -DBUILD_SHARED_LIBS=ON -DFRAMEWORK=ON \
+ -DCMAKE_INSTALL_PREFIX=/Library/Frameworks \
+ -DCMAKE_INSTALL_NAME_DIR=/Library/Frameworks \
+ -DCMAKE_OSX_ARCHITECTURES='ppc;i386;x86_64' \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo
+
+ - Assuming using the default Makefile output from cmake, run 'make' to build
+ and then 'make install'.
+
+
+** Alternative Mac OS X and Linux via autoconf/make **
+ - at the command line:
+ ./autogen.sh
+ ./configure
+ make
+
+
+** For more help, visit http://www.bulletphysics.org **
diff --git a/tests/bullet/LICENSE b/tests/bullet/LICENSE
new file mode 100644
index 00000000..ba24a53c
--- /dev/null
+++ b/tests/bullet/LICENSE
@@ -0,0 +1,19 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+All files in the Bullet/src folder are under this Zlib license.
+Optional Extras/GIMPACT and Extras/GIMPACTBullet is also under ZLib license. Other optional external libraries in Extras/Demos have own license,see respective files.
+
+This means Bullet can freely be used in any software, including commercial and console software. A Playstation 3 optimized version is available through Sony.
diff --git a/tests/bullet/Makefile.am b/tests/bullet/Makefile.am
new file mode 100644
index 00000000..32ecfe7a
--- /dev/null
+++ b/tests/bullet/Makefile.am
@@ -0,0 +1,7 @@
+if CONDITIONAL_BUILD_DEMOS
+SUBDIRS=src Extras
+else
+SUBDIRS=src
+endif
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bullet.pc
diff --git a/tests/bullet/Makefile.in b/tests/bullet/Makefile.in
new file mode 100644
index 00000000..ae734464
--- /dev/null
+++ b/tests/bullet/Makefile.in
@@ -0,0 +1,672 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = .
+DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/bullet.pc.in \
+ $(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
+ ChangeLog INSTALL NEWS compile config.guess config.sub depcomp \
+ install-sh ltmain.sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = bullet.pc
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
+pkgconfigDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = src Extras
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d $(distdir) \
+ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr $(distdir); }; }
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GL_LIBS = @GL_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+opengl_LIBS = @opengl_LIBS@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+@CONDITIONAL_BUILD_DEMOS_FALSE@SUBDIRS = src
+@CONDITIONAL_BUILD_DEMOS_TRUE@SUBDIRS = src Extras Demos
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = bullet.pc
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
+ cd $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: $(am__configure_deps)
+ cd $(top_srcdir) && $(AUTOHEADER)
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+bullet.pc: $(top_builddir)/config.status $(srcdir)/bullet.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \
+ done
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d $(distdir) || mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r $(distdir)
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && cd $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @cd $(distuninstallcheck_dir) \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA) config.h
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-info: install-info-recursive
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-pkgconfigDATA
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
+ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-pkgconfigDATA
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/bullet/NEWS b/tests/bullet/NEWS
new file mode 100644
index 00000000..42bdab7f
--- /dev/null
+++ b/tests/bullet/NEWS
@@ -0,0 +1,4 @@
+
+For news, visit the Bullet Physics forums at
+http://www.bulletphysics.org
+
diff --git a/tests/bullet/README b/tests/bullet/README
new file mode 100644
index 00000000..1eda762c
--- /dev/null
+++ b/tests/bullet/README
@@ -0,0 +1,6 @@
+
+Bullet is a 3D Collision Detection and Rigid Body Dynamics Library for games and animation.
+Free for commercial use, including Playstation 3, open source under the ZLib License.
+
+See the Bullet_User_Manual.pdf for more info and visit the Bullet Physics Forum at
+http://bulletphysics.org
diff --git a/tests/bullet/RELEASING.TXT b/tests/bullet/RELEASING.TXT
new file mode 100644
index 00000000..8fba4a5a
--- /dev/null
+++ b/tests/bullet/RELEASING.TXT
@@ -0,0 +1,34 @@
+This document details the steps necessary to package a release of Bullet.
+
+1) Preparing for release:
+
+update VERSION in several places
+update ChangeLog
+regenerate MSVC project files
+
+2) Generating the release .zip:
+Do an SVN export on a Windows machine into the directory: bullet-X.YY
+prepare a zip file containing the directory
+
+3) Generating the release .tar.gz:
+Do an SVN export on a Unix machine into the directory: bullet-X.YY
+prepare a .tar.gz file containing the directory
+
+4) Uploading release to google code:
+
+Google Code Bullet downloads URL: http://code.google.com/p/bullet/downloads/list
+
+Title of release should follow this guide line: Bullet <VERSION> Physics SDK <Release Type> (revision)
+
+It is better to upload the .tar.gz before the .zip so that the .zip appears first in the list
+
+If the release is an Alpha/Beta or RC the tags should be: Type-Source, OpSys-ALL
+If the release is a final release the tags should be: Type-Source, OpSys-ALL, Featured
+
+5) Obsoleting old releases
+
+Edit the tags on old releases and add the 'Deprecated' tag
+
+6) Announcing final releases:
+
+Final release announcements are done here: http://bulletphysics.com/Bullet/phpBB3/viewforum.php?f=18
diff --git a/tests/bullet/VERSION b/tests/bullet/VERSION
new file mode 100644
index 00000000..e24a9333
--- /dev/null
+++ b/tests/bullet/VERSION
@@ -0,0 +1 @@
+2.78
diff --git a/tests/bullet/acinclude.m4 b/tests/bullet/acinclude.m4
new file mode 100644
index 00000000..0505895c
--- /dev/null
+++ b/tests/bullet/acinclude.m4
@@ -0,0 +1,3054 @@
+# checkbuild.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_SPLIT_TUPLE(TUPLE, OUTPUT-VARIABLES)
+# Split a build-tuple into its component parts. A build tuple is
+# constructed by CS_CREATE_TUPLE() and is comprised of compiler flags,
+# linker flags, and library references. OUTPUT-VARIABLES is a
+# comma-delimited list of shell variables which should receive the
+# extracted compiler flags, linker flags, and library references,
+# respectively.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_SPLIT_TUPLE],
+ [CS_SPLIT([$1], [cs_dummy,$2], [@])
+ m4_map([_CS_SPLIT_TUPLE], [$2])])
+
+AC_DEFUN([_CS_SPLIT_TUPLE],
+ [$1=`echo $$1 | sed 'y%@%:@% %'`
+ ])
+
+
+
+#------------------------------------------------------------------------------
+# CS_CREATE_TUPLE([CFLAGS], [LFLAGS], [LIBS])
+# Construct a build-tuple which is comprised of compiler flags, linker
+# flags, and library references. Build tuples are encoded so as to
+# preserve whitespace in each component. This makes it possible for
+# macros (such as CS_BUILD_IFELSE) which employ build tuples to accept
+# whitespace-delimited lists of tuples, and for shell "for" statements to
+# iterate over tuple lists without compromising whitespace embedded
+# within individual flags or library references.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CREATE_TUPLE], [`echo @$1@$2@$3 | sed 'y% %@%:@%'`])
+
+
+
+#------------------------------------------------------------------------------
+# CS_LANG_CFLAGS
+# Return the literal string CFLAGS if the current language is C. Return
+# the literal string CXXFLAGS if the current language is C++. Generic
+# compiler test macros which need to modify or save the compiler flags
+# can invoke this macro to get the name of the compiler flags environment
+# variable (either CFLAGS or CXXFLAGS) depending upon the current
+# language. For example:
+# CS_LANG_CFLAGS="$CS_LANG_CFLAGS -Wall"
+# With C, this expands to:
+# CFLAGS="$CFLAGS -Wall"
+# With C++, it expands to:
+# CXXFLAGS="$CXXFLAGS -Wall"
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_LANG_CFLAGS], [AC_LANG_CASE([C], [CFLAGS], [C++], [CXXFLAGS])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_BUILD_IFELSE([PROGRAM], [FLAGS], [LANGUAGE], [ACTION-IF-BUILT],
+# [ACTION-IF-NOT-BUILT], [OTHER-CFLAGS], [OTHER-LFLAGS],
+# [OTHER-LIBS], [INHIBIT-OTHER-FLAGS], [ERROR-REGEX])
+# Try building a program using the supplied compiler flags, linker flags,
+# and library references. PROGRAM is typically a program composed via
+# AC_LANG_PROGRAM(). PROGRAM may be omitted if you are interested only
+# in learning if the compiler or linker respects certain flags. LANGUAGE
+# is typically either C or C++ and specifies which compiler to use for
+# the test. If LANGUAGE is omitted, C is used. FLAGS is a whitespace
+# delimited list of build tuples. Tuples are created with
+# CS_CREATE_TUPLE() and are composed of up to three elements each. The
+# first element represents compiler flags, the second linker flags, and
+# the third libraries used when linking the program. Each tuple from
+# FLAGS is attempted in order. If you want a build attempted with no
+# special flags prior to builds with specialized flags, create an empty
+# tuple with CS_CREATE_TUPLE() at the start of the FLAGS list. If the
+# build is successful, then the shell variables cs_build_ok is set to
+# "yes", cs_build_cflags, cs_build_lflags, and cs_build_libs are set to
+# the tuple elements which resulted in the successful build, and
+# ACTION-IF-BUILT is invoked. Upon successful build, no further tuples
+# are consulted. If no tuple results in a successful build, then
+# cs_build_ok is set to "no" and ACTION-IF-NOT-BUILT is invoked.
+# OTHER-CFLAGS, OTHER-LFLAGS, and OTHER-LIBS specify additional compiler
+# flags, linker flags, and libraries which should be used with each tuple
+# build attempt. Upon successful build, these additional flags are also
+# reflected in the variables cs_build_cflags, cs_build_lflags, and
+# cs_build_libs unless INHIBIT-OTHER-FLAGS is a non-empty string. The
+# optional ERROR-REGEX places an additional constraint upon the build
+# check. If specified, ERROR-REGEX, which is a standard `grep' regular
+# expression, is applied to output captured from the compiler and linker.
+# If ERROR-REGEX matches, then the build is deemed a failure, and
+# cs_build_ok is set to "no". This facility is useful for broken build
+# tools which emit an error message yet still return success as a result.
+# In such cases, it should be possible to detect the failure by scanning
+# the tools' output.
+#
+# IMPLEMENTATION NOTES
+#
+# In Autoconf 2.57 and earlier, AC_LINK_IFELSE() invokes AC_TRY_EVAL(),
+# which does not provide access to the captured output. To work around
+# this limitation, we temporarily re-define AC_TRY_EVAL() as
+# _AC_EVAL_STDERR(), which leaves the captured output in conftest.err
+# (which we must also delete). In Autoconf 2.58, however,
+# AC_LINK_IFELSE() instead already invokes _AC_EVAL_STDERR() on our
+# behalf, however we must be careful to apply ERROR-REGEX within the
+# invocation AC_LINK_IFELSE(), since AC_LINK_IFELSE() deletes
+# conftest.err before it returns.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_BUILD_IFELSE],
+ [AC_LANG_PUSH(m4_default([$3],[C]))
+ cs_cflags_save="$CS_LANG_CFLAGS"
+ cs_lflags_save="$LDFLAGS"
+ cs_libs_save="$LIBS"
+ cs_build_ok=no
+ m4_ifval([$10], [m4_pushdef([AC_TRY_EVAL], [_AC_EVAL_STDERR]($$[1]))])
+
+ for cs_build_item in m4_default([$2],[CS_CREATE_TUPLE()])
+ do
+ CS_SPLIT_TUPLE(
+ [$cs_build_item],[cs_cflags_test,cs_lflags_test,cs_libs_test])
+ CS_LANG_CFLAGS="$cs_cflags_test $6 $cs_cflags_save"
+ LDFLAGS="$cs_lflags_test $7 $cs_lflags_save"
+ LIBS="$cs_libs_test $8 $cs_libs_save"
+ AC_LINK_IFELSE(m4_default([$1], [AC_LANG_PROGRAM([],[])]),
+ [m4_ifval([$10],
+ [AS_IF([AC_TRY_COMMAND(
+ [grep "AS_ESCAPE([$10])" conftest.err >/dev/null 2>&1])],
+ [cs_build_ok=no], [cs_build_ok=yes])],
+ [cs_build_ok=yes])])
+ AS_IF([test $cs_build_ok = yes], [break])
+ done
+
+ m4_ifval([$10], [m4_popdef([AC_TRY_EVAL]) rm -f conftest.err])
+ CS_LANG_CFLAGS=$cs_cflags_save
+ LDFLAGS=$cs_lflags_save
+ LIBS=$cs_libs_save
+ AC_LANG_POP(m4_default([$3],[C]))
+
+ AS_IF([test $cs_build_ok = yes],
+ [cs_build_cflags=CS_TRIM([$cs_cflags_test[]m4_ifval([$9],[],[ $6])])
+ cs_build_lflags=CS_TRIM([$cs_lflags_test[]m4_ifval([$9],[],[ $7])])
+ cs_build_libs=CS_TRIM([$cs_libs_test[]m4_ifval([$9],[],[ $8])])
+ $4],
+ [$5])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_BUILD(MESSAGE, CACHE-VAR, [PROGRAM], [FLAGS], [LANGUAGE],
+# [ACTION-IF-BUILT], [ACTION-IF-NOT-BUILT], [IGNORE-CACHE],
+# [OTHER-CFLAGS], [OTHER-LFLAGS], [OTHER-LIBS],
+# [INHIBIT-OTHER-FLAGS], [ERROR-REGEX])
+# Like CS_BUILD_IFELSE() but also prints "checking" and result messages,
+# and optionally respects the cache. Sets CACHE-VAR to "yes" upon
+# success, else "no" upon failure. Additionally, sets CACHE-VAR_cflags,
+# CACHE-VAR_lflags, and CACHE-VAR_libs to the values which resulted in a
+# successful build. If IGNORE-CACHE is "yes", then the cache variables
+# are ignored upon entry to this macro, however they are still set to
+# appropriate values upon exit.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_BUILD],
+ [AS_IF([test "$8" != yes],
+ [AC_CACHE_CHECK([$1], [$2],
+ [CS_BUILD_IFELSE([$3], [$4], [$5],
+ [$2=yes
+ $2_cflags=$cs_build_cflags
+ $2_lflags=$cs_build_lflags
+ $2_libs=$cs_build_libs],
+ [$2=no], [$9], [$10], [$11], [$12], [$13])])],
+ [AC_MSG_CHECKING([$1])
+ CS_BUILD_IFELSE([$3], [$4], [$5],
+ [$2=yes
+ $2_cflags=$cs_build_cflags
+ $2_lflags=$cs_build_lflags
+ $2_libs=$cs_build_libs],
+ [$2=no], [$9], [$10], [$11], [$12], [$13])
+ AC_MSG_RESULT([$$2])])
+ AS_IF([test $$2 = yes], [$6],
+ [$2_cflags=''
+ $2_lflags=''
+ $2_libs=''
+ $7])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_BUILD_FLAGS(MESSAGE, CACHE-VAR, FLAGS, [LANGUAGE],
+# [ACTION-IF-RECOGNIZED], [ACTION-IF-NOT-RECOGNIZED],
+# [OTHER-CFLAGS], [OTHER-LFLAGS], [OTHER-LIBS],
+# [ERROR-REGEX])
+# Like CS_CHECK_BUILD(), but checks only if the compiler or linker
+# recognizes a command-line option or options. MESSAGE is the "checking"
+# message. CACHE-VAR is the shell cache variable which receives the flag
+# or flags recognized by the compiler or linker. FLAGS is a
+# whitespace-delimited list of build tuples created with
+# CS_CREATE_TUPLE(). Each tuple from FLAGS is attempted in order until
+# one is found which is recognized by the compiler. After that, no
+# further flags are checked. LANGUAGE is typically either C or C++ and
+# specifies which compiler to use for the test. If LANGUAGE is omitted,
+# C is used. If a command-line option is recognized, then CACHE-VAR is
+# set to the composite value of $cs_build_cflags, $cs_build_lflags, and
+# $cs_build_libs of the FLAGS element which succeeded (not including the
+# "other" flags) and ACTION-IF-RECOGNIZED is invoked. If no options are
+# recognized, then CACHE-VAR is set to the empty string, and
+# ACTION-IF-NOT-RECOGNIZED is invoked. As a convenience, in case
+# comparing CACHE-VAR against the empty string to test for failure is
+# undesirable, a second variable named CACHE-VAR_ok is set to the literal
+# "no" upon failure, and to the same value as CACHE-VAR upon success.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_BUILD_FLAGS],
+ [AC_CACHE_CHECK([$1], [$2_ok],
+ [CS_BUILD_IFELSE([], [$3], [$4],
+ [$2=CS_TRIM([$cs_build_cflags $cs_build_lflags $cs_build_libs])
+ $2_ok="$$2"],
+ [$2=''
+ $2_ok=no], [$7], [$8], [$9], [Y], [$10])])
+ AS_IF([test "$$2_ok" != no], [$5], [$6])])
+#==============================================================================
+# Copyright (C)2003-2006 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_COMMON_TOOLS_LINK
+# Checks for common tools related to linking.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_COMMON_TOOLS_LINK],
+ [
+ # The default RANLIB in Jambase is wrong on some platforms, and is also
+ # unsuitable during cross-compilation, so we set the value unconditionally
+ # (sixth argument of CS_EMIT_BUILD_PROPERTY).
+ AC_PROG_RANLIB
+ CS_EMIT_BUILD_PROPERTY([RANLIB], [$RANLIB], [], [], [], [Y])
+
+ CS_CHECK_TOOLS([DLLTOOL], [dlltool])
+ CS_EMIT_BUILD_PROPERTY([CMD.DLLTOOL], [$DLLTOOL])
+
+ CS_CHECK_TOOLS([DLLWRAP], [dllwrap])
+ CS_EMIT_BUILD_PROPERTY([CMD.DLLWRAP], [$DLLWRAP])
+
+ CS_CHECK_TOOLS([WINDRES], [windres])
+ CS_EMIT_BUILD_PROPERTY([CMD.WINDRES], [$WINDRES])
+
+ CS_CHECK_TOOLS([STRINGS], [strings])
+ CS_EMIT_BUILD_PROPERTY([CMD.STRINGS], [$STRINGS])
+
+ CS_CHECK_TOOLS([OBJCOPY], [objcopy])
+ CS_EMIT_BUILD_PROPERTY([CMD.OBJCOPY], [$OBJCOPY])
+
+ CS_CHECK_LIBTOOL
+ CS_EMIT_BUILD_PROPERTY([LIBTOOL], [$LIBTOOL])
+ CS_EMIT_BUILD_PROPERTY([APPLE_LIBTOOL], [$APPLE_LIBTOOL])
+ ])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_COMMON_TOOLS_BASIC
+# Checks for basic tools for building things.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_COMMON_TOOLS_BASIC],
+ [CS_CHECK_MKDIR
+ CS_EMIT_BUILD_PROPERTY([CMD.MKDIR], [$MKDIR])
+ CS_EMIT_BUILD_PROPERTY([CMD.MKDIRS], [$MKDIRS])
+
+ CS_CHECK_PROGS([INSTALL], [install])
+ CS_EMIT_BUILD_PROPERTY([INSTALL], [$INSTALL])])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_COMMON_TOOLS_DOC_TEXINFO
+# Checks for tools to generate documentation from texinfo files.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_COMMON_TOOLS_DOC_TEXINFO],
+ [CS_CHECK_PROGS([TEXI2DVI], [texi2dvi])
+ CS_EMIT_BUILD_PROPERTY([CMD.TEXI2DVI], [$TEXI2DVI])
+
+ CS_CHECK_PROGS([TEXI2PDF], [texi2pdf])
+ CS_EMIT_BUILD_PROPERTY([CMD.TEXI2PDF], [$TEXI2PDF])
+
+ CS_CHECK_PROGS([DVIPS], [dvips])
+ CS_EMIT_BUILD_PROPERTY([CMD.DVIPS], [$DVIPS])
+
+ CS_CHECK_PROGS([DVIPDF], [dvipdf])
+ CS_EMIT_BUILD_PROPERTY([CMD.DVIPDF], [$DVIPDF])
+
+ CS_CHECK_PROGS([MAKEINFO], [makeinfo])
+ CS_EMIT_BUILD_PROPERTY([CMD.MAKEINFO], [$MAKEINFO])])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_COMMON_TOOLS_DOC_DOXYGEN
+# Checks for tools to generate source documentation via doxygen.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_COMMON_TOOLS_DOC_DOXYGEN],
+ [CS_CHECK_PROGS([DOXYGEN], [doxygen])
+ CS_EMIT_BUILD_PROPERTY([CMD.DOXYGEN], [$DOXYGEN])
+
+ CS_CHECK_TOOLS([DOT], [dot])
+ CS_EMIT_BUILD_PROPERTY([CMD.DOT], [$DOT])])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_COMMON_LIBS
+# Check for typical required libraries (libm, libmx, libdl, libnsl).
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_COMMON_LIBS],
+ [AC_LANG_PUSH([C])
+ AC_CHECK_LIB([m], [pow], [cs_cv_libm_libs=-lm], [cs_cv_libm_libs=])
+ AC_CHECK_LIB([m], [cosf], [cs_cv_libm_libs=-lm])
+ AC_CHECK_LIB([mx], [cosf])
+ AC_CHECK_LIB([dl], [dlopen], [cs_cv_libdl_libs=-ldl], [cs_cv_libdl_libs=])
+ AC_CHECK_LIB([nsl], [gethostbyname])
+ AC_LANG_POP([C])])
+# checkcppunit.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_CPPUNIT([EMITTER])
+# Check if CppUnit (http://cppunit.sourceforge.net/), the unit-testing
+# framework is available. The shell variable cs_cv_libcppunit is set to
+# "yes" if CppUnit is discovered, else "no". If available, then the
+# variables cs_cv_libcppunit_cflags, cs_cv_libcppunit_lflags, and
+# cs_cv_libcppunit_libs are set. If EMITTER is provided, then
+# CS_EMIT_BUILD_RESULT() is invoked with EMITTER in order to record the
+# results in an output file. As a convenience, if EMITTER is the literal
+# value "emit" or "yes", then CS_EMIT_BUILD_RESULT()'s default emitter
+# will be used.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_CPPUNIT],
+ [CS_CHECK_LIB_WITH([cppunit],
+ [AC_LANG_PROGRAM([[#include <cppunit/ui/text/TestRunner.h>]],
+ [CppUnit::TextUi::TestRunner r; r.run();])],
+ [], [C++])
+
+ AS_IF([test $cs_cv_libcppunit = yes],
+ [CS_CHECK_BUILD([if cppunit is sufficiently recent],
+ [cs_cv_libcppunit_recent],
+ [AC_LANG_PROGRAM(
+ [[#include <cppunit/BriefTestProgressListener.h>]],
+ [CppUnit::BriefTestProgressListener b; b.startTest(0);])],
+ [], [C++],
+ [CS_EMIT_BUILD_RESULT([cs_cv_libcppunit], [CPPUNIT],
+ CS_EMITTER_OPTIONAL([$1]))], [], [],
+ [$cs_cv_libcppunit_cflags],
+ [$cs_cv_libcppunit_lflags],
+ [$cs_cv_libcppunit_libs])])])
+# checklib.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003-2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# cs_lib_paths_default
+# Whitespace delimited list of directory tuples in which to search, by
+# default, for external libraries. Each list item can specify an
+# include|library directory tuple (for example, "/usr/include|/usr/lib"),
+# or a single directory (for example, "/usr"). If the second form is
+# used, then "include" and "lib" subdirectories of the directory are
+# searched. If the library resources are not found, then the directory
+# itself is searched. Thus, "/proj" is shorthand for
+# "/proj/include|/proj/lib /proj|/proj".
+#
+# Present Cases:
+# /usr/local -- Not all compilers search here by default, so we specify
+# it manually.
+# /sw -- Fink, the MacOS/X manager of Unix packages, installs here by
+# default.
+# /opt/local -- DarwinPorts installs here by default.
+#------------------------------------------------------------------------------
+m4_define([cs_lib_paths_default],
+ [/usr/local/include|/usr/local/lib \
+ /sw/include|/sw/lib \
+ /opt/local/include|/opt/local/lib \
+ /opt/include|/opt/lib])
+
+
+
+#------------------------------------------------------------------------------
+# cs_pkg_paths_default
+# Comma delimited list of additional directories in which the
+# `pkg-config' command should search for its `.pc' files.
+#
+# Present Cases:
+# /usr/local/lib/pkgconfig -- Although a common location for .pc files
+# installed by "make install", many `pkg-config' commands neglect
+# to search here automatically.
+# /sw/lib/pkgconfig -- Fink, the MacOS/X manager of Unix packages,
+# installs .pc files here by default.
+# /opt/local/lib/pkgconfig -- DarwinPorts installs .pc files here by
+# default.
+#------------------------------------------------------------------------------
+m4_define([cs_pkg_paths_default],
+ [/usr/local/lib/pkgconfig,
+ /sw/lib/pkgconfig,
+ /opt/local/lib/pkgconfig,
+ /opt/lib/pkgconfig])
+
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_LIB_WITH(LIBRARY, PROGRAM, [SEARCH-LIST], [LANGUAGE],
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [OTHER-CFLAGS],
+# [OTHER-LFLAGS], [OTHER-LIBS], [ALIASES])
+# Very roughly similar in concept to AC_CHECK_LIB(), but allows caller to
+# to provide list of directories in which to search for LIBRARY; allows
+# user to override library location via --with-LIBRARY=dir; and consults
+# `pkg-config' (if present) and `LIBRARY-config' (if present, i.e.
+# `sdl-config') in order to obtain compiler and linker flags. LIBRARY is
+# the name of the library or MacOS/X framework which is to be located
+# (for example, "readline" for `libreadline.a' or `readline.framework').
+# PROGRAM, which is typically composed with AC_LANG_PROGRAM(), is a
+# program which references at least one function or symbol in LIBRARY.
+# SEARCH-LIST is a whitespace-delimited list of paths in which to search
+# for the library and its header files, in addition to those searched by
+# the compiler and linker by default, and those referenced by the
+# cs_lib_paths_default macro. Each list item can specify an
+# `include|library' directory tuple (for example,
+# "/usr/include|/usr/lib"), or a single directory (for example, "/usr").
+# If the second form is used, then "include" and "lib" subdirectories of
+# the directory are searched. If the library resources are not found,
+# then the directory itself is searched. Thus, "/proj" is shorthand for
+# "/proj/include|/proj/lib /proj|/proj". Items in the search list can
+# include wildcards. SEARCH-LIST can be overridden by the user with the
+# --with-LIBRARY=dir option, in which case only "dir/include|dir/lib" and
+# "dir|dir" are searched. If SEARCH-LIST is omitted and the user did not
+# override the search list via --with-LIBRARY=dir, then only the
+# directories normally searched by the compiler and the directories
+# mentioned via cs_lib_paths_default are searched. LANGUAGE is typically
+# either C or C++ and specifies which compiler to use for the test. If
+# LANGUAGE is omitted, C is used. OTHER-CFLAGS, OTHER-LFLAGS, and
+# OTHER-LIBS can specify additional compiler flags, linker flags, and
+# libraries needed to successfully link with LIBRARY. The optional
+# ALIASES is a comma-delimited list of library names for which to search
+# in case LIBRARY is not located (for example "[sdl1.2, sdl12]" for
+# libsdl1.2.a, sdl1.2.framework, libsdl12.a, and sdl12.framework). If
+# the library or one of its aliases is found and can be successfully
+# linked into a program, then the shell cache variable cs_cv_libLIBRARY
+# is set to "yes"; cs_cv_libLIBRARY_cflags, cs_cv_libLIBRARY_lflags, and
+# cs_cv_libLIBRARY_libs are set, respectively, to the compiler flags
+# (including OTHER-CFLAGS), linker flags (including OTHER-LFLAGS), and
+# library references (including OTHER-LIBS) which resulted in a
+# successful build; and ACTION-IF-FOUND is invoked. If the library was
+# not found or was unlinkable, or if the user disabled the library via
+# --without-LIBRARY, then cs_cv_libLIBRARY is set to "no" and
+# ACTION-IF-NOT-FOUND is invoked. Note that the exported shell variable
+# names are always composed from LIBRARY regardless of whether the test
+# succeeded because the primary library was discovered or one of the
+# aliases.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_LIB_WITH],
+ [AC_ARG_WITH([$1], [AC_HELP_STRING([--with-$1=dir],
+ [specify location of lib$1 if not detected automatically; searches
+ dir/include, dir/lib, and dir])])
+
+ # Backward compatibility: Recognize --with-lib$1 as alias for --with-$1.
+ AS_IF([test -n "$with_lib$1" && test -z "$with_$1"],
+ [with_$1="$with_lib$1"])
+
+ AS_IF([test -z "$with_$1"], [with_$1=yes])
+ AS_IF([test "$with_$1" != no],
+ [# If --with-$1 value is same as cached value, then assume other
+ # cached values are also valid; otherwise, ignore all cached values.
+ AS_IF([test "$with_$1" != "$cs_cv_with_$1"],
+ [cs_ignore_cache=yes], [cs_ignore_cache=no])
+
+ cs_check_lib_flags=''
+ AS_IF([test $with_$1 = yes],
+ [m4_foreach([cs_check_lib_alias], [$1, $10],
+ [_CS_CHECK_LIB_PKG_CONFIG_FLAGS([cs_check_lib_flags],
+ cs_check_lib_alias)
+ _CS_CHECK_LIB_CONFIG_FLAGS([cs_check_lib_flags],
+ cs_check_lib_alias)
+ ])])
+
+ AS_IF([test $with_$1 != yes],
+ [cs_check_lib_paths=$with_$1],
+ [cs_check_lib_paths="| cs_lib_paths_default $3"])
+ m4_foreach([cs_check_lib_alias], [$1, $10],
+ [_CS_CHECK_LIB_CREATE_FLAGS([cs_check_lib_flags],
+ cs_check_lib_alias, [$cs_check_lib_paths])
+ ])
+
+ CS_CHECK_BUILD([for lib$1], [cs_cv_lib$1], [$2], [$cs_check_lib_flags],
+ [$4], [], [], [$cs_ignore_cache], [$7], [$8], [$9])],
+ [cs_cv_lib$1=no])
+
+ cs_cv_with_$1="$with_$1"
+ AS_IF([test "$cs_cv_lib$1" = yes], [$5], [$6])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_PKG_CONFIG
+# Check if the `pkg-config' command is available and reasonably recent.
+# This program acts as a central repository of build flags for various
+# packages. For example, to determine the compiler flags for FreeType2
+# use, "pkg-config --cflags freetype2"; and "pkg-config --libs freetype2"
+# to determine the linker flags. If `pkg-config' is found and is
+# sufficiently recent, PKG_CONFIG is set and AC_SUBST() invoked.
+#------------------------------------------------------------------------------
+m4_define([CS_PKG_CONFIG_MIN], [0.9.0])
+AC_DEFUN([CS_CHECK_PKG_CONFIG],
+ [AS_IF([test "$cs_prog_pkg_config_checked" != yes],
+ [CS_CHECK_TOOLS([PKG_CONFIG], [pkg-config])
+ _CS_CHECK_PKG_CONFIG_PREPARE_PATH
+ cs_prog_pkg_config_checked=yes])
+ AS_IF([test -z "$cs_cv_prog_pkg_config_ok"],
+ [AS_IF([test -n "$PKG_CONFIG"],
+ [AS_IF([$PKG_CONFIG --atleast-pkgconfig-version=CS_PKG_CONFIG_MIN],
+ [cs_cv_prog_pkg_config_ok=yes],
+ [cs_cv_prog_pkg_config_ok=no])],
+ [cs_cv_prog_pkg_config_ok=no])])])
+
+AC_DEFUN([_CS_CHECK_PKG_CONFIG_PREPARE_PATH],
+ [PKG_CONFIG_PATH="m4_foreach([cs_pkg_path], [cs_pkg_paths_default],
+ [cs_pkg_path$PATH_SEPARATOR])$PKG_CONFIG_PATH"
+ export PKG_CONFIG_PATH])
+
+
+
+#------------------------------------------------------------------------------
+# _CS_CHECK_LIB_PKG_CONFIG_FLAGS(VARIABLE, LIBRARY)
+# Helper macro for CS_CHECK_LIB_WITH(). Checks if `pkg-config' knows
+# about LIBRARY and, if so, appends a build tuple consisting of the
+# compiler and linker flags reported by `pkg-config' to the list of
+# tuples stored in the shell variable VARIABLE.
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_CHECK_LIB_PKG_CONFIG_FLAGS],
+ [CS_CHECK_PKG_CONFIG
+ AS_IF([test $cs_cv_prog_pkg_config_ok = yes],
+ [AC_CACHE_CHECK([if $PKG_CONFIG recognizes $2], [_CS_CLPCF_CVAR([$2])],
+ [AS_IF([$PKG_CONFIG --exists $2],
+ [_CS_CLPCF_CVAR([$2])=yes], [_CS_CLPCF_CVAR([$2])=no])])
+ AS_IF([test $_CS_CLPCF_CVAR([$2]) = yes],
+ [_CS_CHECK_LIB_CONFIG_PROG_FLAGS([$1], [pkg_config_$2],
+ [$PKG_CONFIG], [$2])])])])
+
+AC_DEFUN([_CS_CLPCF_CVAR], [AS_TR_SH([cs_cv_prog_pkg_config_$1])])
+
+
+
+#------------------------------------------------------------------------------
+# _CS_CHECK_LIB_CONFIG_FLAGS(VARIABLE, LIBRARY)
+# Helper macro for CS_CHECK_LIB_WITH(). Checks if `LIBRARY-config'
+# (i.e. `sdl-config') exists and, if so, appends a build tuple consisting
+# of the compiler and linker flags reported by `LIBRARY-config' to the
+# list of tuples stored in the shell variable VARIABLE.
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_CHECK_LIB_CONFIG_FLAGS],
+ [CS_CHECK_TOOLS(_CS_CLCF_SHVAR([$2]), [$2-config])
+ AS_IF([test -n "$_CS_CLCF_SHVAR([$2])"],
+ [AS_IF([test -z "$_CS_CLCF_CVAR([$2])"],
+ [AS_IF([$_CS_CLCF_SHVAR([$2]) --cflags --libs >/dev/null 2>&1],
+ [_CS_CLCF_CVAR([$2])=yes], [_CS_CLCF_CVAR([$2])=no])])
+ AS_IF([test $_CS_CLCF_CVAR([$2]) = yes],
+ [_CS_CHECK_LIB_CONFIG_PROG_FLAGS([$1], [config_$2],
+ [$_CS_CLCF_SHVAR([$2])])])])])
+
+AC_DEFUN([_CS_CLCF_CVAR], [AS_TR_SH([cs_cv_prog_config_$1_ok])])
+AC_DEFUN([_CS_CLCF_SHVAR], [m4_toupper(AS_TR_SH([CONFIG_$1]))])
+
+
+
+#------------------------------------------------------------------------------
+# _CS_CHECK_LIB_CONFIG_PROG_FLAGS(VARIABLE, TAG, CONFIG-PROGRAM, [ARGS])
+# Helper macro for _CS_CHECK_LIB_PKG_CONFIG_FLAGS() and
+# _CS_CHECK_LIB_CONFIG_FLAGS(). CONFIG-PROGRAM is a command which
+# responds to the --cflags and --libs options and returns suitable
+# compiler and linker flags for some package. ARGS, if supplied, is
+# passed to CONFIG-PROGRAM after the --cflags or --libs argument. The
+# results of the --cflags and --libs options are packed into a build
+# tuple and appended to the list of tuples stored in the shell variable
+# VARIABLE. TAG is used to compose the name of the cache variable. A good
+# choice for TAG is some unique combination of the library name and
+# configuration program.
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_CHECK_LIB_CONFIG_PROG_FLAGS],
+ [AS_IF([test -z "$_CS_CLCPF_CVAR([$2])"],
+ [cs_check_lib_cflag=CS_RUN_PATH_NORMALIZE([$3 --cflags $4])
+ cs_check_lib_lflag=''
+ cs_check_lib_libs=CS_RUN_PATH_NORMALIZE([$3 --libs $4])
+ _CS_CLCPF_CVAR([$2])=CS_CREATE_TUPLE(
+ [$cs_check_lib_cflag],
+ [$cs_check_lib_lflag],
+ [$cs_check_lib_libs])])
+ $1="$$1 $_CS_CLCPF_CVAR([$2])"])
+
+AC_DEFUN([_CS_CLCPF_CVAR], [AS_TR_SH([cs_cv_prog_$1_flags])])
+
+
+
+#------------------------------------------------------------------------------
+# _CS_CHECK_LIB_CREATE_FLAGS(VARIABLE, LIBRARY, PATHS)
+# Helper macro for CS_CHECK_LIB_WITH(). Constructs a list of build
+# tuples suitable for CS_CHECK_BUILD() and appends the tuple list to the
+# shell variable VARIABLE. LIBRARY and PATHS have the same meanings as
+# the like-named arguments of CS_CHECK_LIB_WITH().
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_CHECK_LIB_CREATE_FLAGS],
+ [for cs_lib_item in $3
+ do
+ case $cs_lib_item in
+ *\|*) CS_SPLIT(
+ [$cs_lib_item], [cs_check_incdir,cs_check_libdir], [|])
+ _CS_CHECK_LIB_CREATE_FLAG([$1],
+ [$cs_check_incdir], [$cs_check_libdir], [$2])
+ ;;
+ *) _CS_CHECK_LIB_CREATE_FLAG([$1],
+ [$cs_lib_item/include], [$cs_lib_item/lib], [$2])
+ _CS_CHECK_LIB_CREATE_FLAG(
+ [$1], [$cs_lib_item], [$cs_lib_item], [$2])
+ ;;
+ esac
+ done])
+
+
+
+#------------------------------------------------------------------------------
+# _CS_CHECK_LIB_CREATE_FLAG(VARIABLE, HEADER-DIR, LIBRARY-DIR, LIBRARY)
+# Helper macro for _CS_CHECK_LIB_CREATE_FLAGS(). Constructs build tuples
+# suitable for CS_CHECK_BUILD() for given header and library directories,
+# and appends the tuples to the shell variable VARIABLE. Synthesizes
+# tuples which check for LIBRARY as a MacOS/X framework, and a standard
+# link library.
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_CHECK_LIB_CREATE_FLAG],
+ [AS_IF([test -n "$2"], [cs_check_lib_cflag="-I$2"], [cs_check_lib_cflag=''])
+ AS_IF([test -n "$3"], [cs_check_lib_lflag="-L$3"], [cs_check_lib_lflag=''])
+ AS_IF([test -n "$4"],
+ [cs_check_lib_libs="-l$4"
+ cs_check_lib_framework="-framework $4"],
+ [cs_check_lib_libs=''
+ cs_check_lib_framework=''])
+ $1="$$1
+ CS_CREATE_TUPLE(
+ [$cs_check_lib_cflag],
+ [$cs_check_lib_lflag],
+ [$cs_check_lib_framework])
+ CS_CREATE_TUPLE(
+ [$cs_check_lib_cflag],
+ [$cs_check_lib_lflag],
+ [$cs_check_lib_libs])"])
+# checklibtool.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2004 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_LIBTOOL
+# Find and identify the various implementations of libtool. In
+# particular, this macro is aware of GNU libtool and Apple's libtool
+# (which serves a completely different purpose). On MacOS/X, GNU libtool
+# is typically named glibtool, however a user might also use Fink to
+# install the unadorned libtool; and the Fink-installed version might
+# shadow Apple's own libtool if it appears in the PATH before the Apple
+# tool. This macro jumps through the necessary hoops to distinguish and
+# locate the various implementations. Sets the shell variable LIBTOOL to
+# the located GNU libtool (if any), and APPLE_LIBTOOL to the located
+# Apple libtool. Invokes AC_SUBST() for LIBTOOL and APPLE_LIBTOOL.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_LIBTOOL],
+[# GNU: Search for libtool before glibtool since Fink version is likely newer.
+m4_define([cs_lt_path_gnu],
+ [/sw/bin$PATH_SEPARATOR/usr/local/bin$PATH_SEPARATOR$PATH])
+AS_IF([test -z "$LIBTOOL"],
+ [CS_CHECK_TOOLS([LIBTOOL_TEST], [libtool glibtool gnulibtool], [],
+ [cs_lt_path_gnu])
+ AS_IF([test -n "$LIBTOOL_TEST"],
+ [CS_PATH_PROG([LIBTOOL_PATH], [$LIBTOOL_TEST], [], [cs_lt_path_gnu])
+ CS_LIBTOOL_CLASSIFY([$LIBTOOL_PATH],
+ [LIBTOOL="$LIBTOOL_PATH"],
+ [AS_IF([test -z "$APPLE_LIBTOOL"], [APPLE_LIBTOOL="$LIBTOOL_PATH"])
+ CS_CHECK_TOOLS([LIBTOOL], [glibtool gnulibtool])])])])
+AC_SUBST([LIBTOOL])
+
+# Apple: Ensure that Apple libtool will be found before GNU libtool from Fink.
+m4_define([cs_lt_path_apple],[/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH])
+AS_IF([test -z "$APPLE_LIBTOOL"],
+ [CS_PATH_PROG([CS_LT_APPLE], [libtool], [], [cs_lt_path_apple])
+ CS_LIBTOOL_CLASSIFY([$CS_LT_APPLE], [],
+ [APPLE_LIBTOOL="$CS_LT_APPLE"])])
+AC_SUBST([APPLE_LIBTOOL])])
+
+AC_DEFUN([CS_LIBTOOL_CLASSIFY],
+ [AS_IF([test -n "$1"],
+ [AC_MSG_CHECKING([classification of $1])
+ CS_LIBTOOL_GNU_IFELSE([$1],
+ [AC_MSG_RESULT([gnu])
+ $2],
+ [AC_MSG_RESULT([apple])
+ $3])])])
+
+AC_DEFUN([CS_LIBTOOL_GNU_IFELSE],
+ [AS_IF([AC_RUN_LOG([$1 --version 1>&2])], [$2], [$3])])
+#==============================================================================
+# Copyright (C)2003-2006 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_OPENGL
+# Check for OpenGL.
+#
+# IMPLEMENTATION NOTES
+#
+# Some Mesa installations require pthread, so pthread flags are employed if
+# available.
+#
+# The check for opengl32 needs to precede other checks because Cygwin users
+# often have Mesa installed, and Mesa's OpenGL library is compiled without the
+# __stdcall flags which results in link errors, whereas Microsoft's native
+# opengl32 works fine. Conversely, some Unix implementations have Wine
+# installed (Windows emulation layer) which includes an opengl32.so library.
+# We need to avoid detection of this library on Unix since it would cause an
+# undesirable dependence upon Wine.
+#
+# Many OpenGL libraries on Unix already contain GLX, so there is no separate
+# GLX library, thus we first check for GLX using the discovered OpenGL library
+# before attempting to locate a separate GLX-specific library.
+#
+# On MacOS/X, some users have XFree86 installed which creates a link from
+# /usr/include/GL to /usr/X11R6/include/GL. We want to ignore this directory
+# and instead check for Apple's OpenGL.framework, if we are not cross-building
+# for Darwin. We accomplish this by placing the OpenGL.framework test ahead of
+# the other tests.
+#
+# At least one user (Jorrit) has a strange installation in which inclusion of
+# <windows.h> fails if an int32 is not present, thus we must take this into
+# account.
+#------------------------------------------------------------------------------
+m4_define([cs_define_int32],
+ [[#if !HAVE_TYPE_INT32
+ typedef long int32;
+ #endif
+ ]])
+
+# CS_GL_INCLUDE(CPP-MACRO,FALLBACK,HEADER)
+AC_DEFUN([CS_GL_INCLUDE],
+ [[#if HAVE_WINDOWS_H
+ #if !HAVE_TYPE_INT32
+ typedef long int32;
+ #endif
+ #include <windows.h>
+ #endif
+ #ifndef CS_HEADER_GLOBAL
+ #define CS_HEADER_GLOBAL(X,Y) CS_HEADER_GLOBAL_COMPOSE(X,Y)
+ #define CS_HEADER_GLOBAL_COMPOSE(X,Y) <X/Y>
+ #endif
+ #ifdef $1
+ #include CS_HEADER_GLOBAL($1,$3)
+ #else
+ #include <$2/$3>
+ #endif]])
+
+AC_DEFUN([CS_CHECK_OPENGL],
+ [AC_REQUIRE([CS_CHECK_HOST])
+ AC_REQUIRE([CS_CHECK_COMMON_LIBS])
+ AC_REQUIRE([CS_CHECK_PTHREAD])
+ AC_REQUIRE([AC_PATH_X])
+ AC_REQUIRE([AC_PATH_XTRA])
+ AC_CHECK_TYPE([int32], [AC_DEFINE([HAVE_TYPE_INT32], [],
+ [Whether the int32 type is available])], [])
+ AC_CHECK_HEADERS([windows.h], [], [], [cs_define_int32])
+
+ # Apply plaform-specific flags if necessary.
+ cs_gl_plat_cflags=''
+ cs_gl_plat_lflags=''
+ cs_gl_plat_libs=''
+ AS_IF([test -n "$cs_cv_libm_cflags$cs_cv_libm_lflags$cs_cv_libm_libs"],
+ [cs_gl_plat_cflags="$cs_cv_libm_cflags $cs_gl_plat_cflags"
+ cs_gl_plat_lflags="$cs_cv_libm_lflags $cs_gl_plat_lflags"
+ cs_gl_plat_libs="$cs_cv_libm_libs $cs_gl_plat_libs"])
+ AS_IF([test $cs_cv_sys_pthread = yes],
+ [cs_gl_plat_cflags="$cs_cv_sys_pthread_cflags $cs_gl_plat_cflags"
+ cs_gl_plat_lflags="$cs_cv_sys_pthread_lflags $cs_gl_plat_lflags"
+ cs_gl_plat_libs="$cs_cv_sys_pthread_libs $cs_gl_plat_libs"])
+ AS_IF([test "$no_x" != yes],
+ [cs_gl_plat_cflags="$X_CFLAGS $cs_gl_plat_cflags"
+ cs_gl_plat_lflags="$cs_gl_plat_lflags"
+ cs_gl_plat_libs="
+ $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS $cs_gl_plat_libs"])
+
+ # Mesa requested?
+ AC_ARG_WITH([mesa], [AC_HELP_STRING([--with-mesa],
+ [use Mesa OpenGL library if available (default YES)])],
+ [], [with_mesa=yes])
+
+ AS_IF([test $with_mesa != no],
+ [cs_mesa_gl=CS_CREATE_TUPLE([],[],[-lMesaGL])])
+
+ # MacOS/X or Darwin?
+ AS_IF([test "x$cs_host_macosx" = "xyes"],
+ [cs_osx_gl=CS_CREATE_TUPLE([-DCS_OPENGL_PATH=OpenGL],[],[-framework OpenGL])])
+ AS_IF([test "x$cs_host_macosx" = "xyes"],
+ [cs_gl_plat_lflags="$cs_plat_lflags -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib"])
+
+ # Windows?
+ AS_IF([test $cs_host_family = windows],
+ [cs_win32_gl=CS_CREATE_TUPLE([],[],[-lopengl32])])
+
+ # Check for OpenGL.
+ CS_CHECK_BUILD([for OpenGL], [cs_cv_libgl],
+ [AC_LANG_PROGRAM([CS_GL_INCLUDE([CS_OPENGL_PATH],[GL],[gl.h])],[glEnd()])],
+ [$cs_win32_gl \
+ $cs_osx_gl \
+ CS_CREATE_TUPLE([],[],[-lGL]) \
+ CS_CREATE_TUPLE([],[],[-lgl]) \
+ $cs_mesa_gl], [],
+ [CS_EMIT_BUILD_RESULT([cs_cv_libgl], [GL])], [], [],
+ [$cs_gl_plat_cflags], [$cs_gl_plat_lflags], [$cs_gl_plat_libs])])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_GLU
+# Check for GLU.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_GLU],
+ [AC_REQUIRE([CS_CHECK_OPENGL])
+ AS_IF([test $cs_cv_libgl = yes],
+ [AS_IF([test $with_mesa != no],
+ [cs_mesa_glu=CS_CREATE_TUPLE([],[],[-lMesaGLU])])
+
+ # MacOS/X or Darwin?
+ AS_IF([test "x$cs_host_macosx" = "xyes"],
+ [cs_osx_glu=CS_CREATE_TUPLE([-DCS_GLU_PATH=OpenGL],[],[-framework OpenGL])])
+
+ # Windows?
+ AS_IF([test $cs_host_family = windows],
+ [cs_win32_glu=CS_CREATE_TUPLE([],[],[-lglu32])])
+
+ # Check for GLU.
+ CS_CHECK_BUILD([for GLU], [cs_cv_libglu],
+ [AC_LANG_PROGRAM(
+ [CS_GL_INCLUDE([CS_GLU_PATH],[GL],[glu.h])], [gluNewQuadric()])],
+ [$cs_osx_glu \
+ CS_CREATE_TUPLE() \
+ $cs_win32_glu \
+ CS_CREATE_TUPLE([],[],[-lGLU]) \
+ CS_CREATE_TUPLE([],[],[-lglu]) \
+ $cs_mesa_glu], [],
+ [CS_EMIT_BUILD_RESULT([cs_cv_libglu], [GLU])], [], [],
+ [$cs_cv_libgl_cflags], [$cs_cv_libgl_lflags], [$cs_cv_libgl_libs])])])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_GLX
+# Check for GLX.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_GLX],
+ [AC_REQUIRE([CS_CHECK_OPENGL])
+ AS_IF([test $cs_cv_libgl = yes],
+ [AS_IF([test $with_mesa != no],
+ [cs_mesa_glx=CS_CREATE_TUPLE([],[],[-lMesaGLX])])
+
+ # Check for GLX.
+ AS_IF([test "$no_x" != yes],
+ [CS_CHECK_BUILD([for GLX], [cs_cv_libglx],
+ [AC_LANG_PROGRAM([[#include <GL/glx.h>]], [glXWaitGL()])],
+ [CS_CREATE_TUPLE() \
+ CS_CREATE_TUPLE([],[],[-lGLX]) \
+ CS_CREATE_TUPLE([],[],[-lglx]) \
+ $cs_mesa_glx], [],
+ [CS_EMIT_BUILD_RESULT([cs_cv_libglx], [GLX])], [], [],
+ [$cs_cv_libgl_cflags], [$cs_cv_libgl_lflags], [$cs_cv_libgl_libs])])])])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_GLXEXT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# Check for GLX extensions.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_GLXEXT],
+ [AC_REQUIRE([CS_CHECK_GLX])
+ AS_IF([test x$cs_cv_libglx = "xyes"],
+ [# Check for GLX extensions.
+ CS_CHECK_BUILD([for GLX extensions], [cs_cv_libglx_extensions],
+ [AC_LANG_PROGRAM(
+ [[#define GLX_GLXEXT_PROTOTYPES
+ #include <GL/glx.h>]],
+ [glXGetProcAddressARB(0)])],
+ [CS_CREATE_TUPLE(
+ [$cs_cv_libglx_cflags],
+ [$cs_cv_libglx_lflags],
+ [$cs_cv_libglx_libs])],
+ [], [$1], [$2])])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_GLUT
+# Check for GLUT.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_GLUT],
+ [AC_REQUIRE([CS_CHECK_GLU])
+ AS_IF([test x$cs_cv_libglu = "xyes"],
+ [# MacOS/X or Darwin?
+ AS_IF([test "x$cs_host_macosx" = "xyes"],
+ [cs_osx_glut=CS_CREATE_TUPLE([-DCS_GLUT_PATH=GLUT],[],[-framework GLUT])])
+
+ # Windows?
+ AS_IF([test $cs_host_family = windows],
+ [cs_win32_glut=CS_CREATE_TUPLE([],[],[-lglut32])])
+
+ # Check for GLUT.
+ CS_CHECK_BUILD([for GLUT], [cs_cv_libglut],
+ [AC_LANG_PROGRAM(
+ [CS_GL_INCLUDE([CS_GLUT_PATH],[GL],[glut.h])], [glutSwapBuffers()])],
+ [$cs_osx_glut \
+ CS_CREATE_TUPLE() \
+ $cs_win32_glut \
+ CS_CREATE_TUPLE([],[],[-lGLUT]) \
+ CS_CREATE_TUPLE([],[],[-lglut])], [],
+ [CS_EMIT_BUILD_RESULT([cs_cv_libglut], [GLUT])], [], [],
+ [$cs_cv_libgl_cflags $cs_cv_libglu_cflags],
+ [$cs_cv_libgl_lflags $cs_cv_libglu_lflags],
+ [$cs_cv_libgl_libs $cs_cv_libglu_libs])])])
+
+# checkpic.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_COMPILER_PIC([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# Check if compiler can be instructed to produce
+# position-independent-code (PIC). This feature is required by some
+# platforms when building plugin modules and shared libraries. If
+# LANGUAGE is not provided, then `C' is assumed (other options include
+# `C++'). If CACHE-VAR is not provided, then it defaults to the name
+# "cs_cv_prog_compiler_pic". If a PIC-enabling option (such as `-fPIC')
+# is discovered, then it is assigned to CACHE-VAR and ACTION-IF-FOUND is
+# invoked; otherwise the empty string is assigned to CACHE-VAR and
+# ACTION-IF-NOT-FOUND is invoked.
+#
+# IMPLEMENTATION NOTES
+#
+# On some platforms (such as Windows), the -fPIC option is superfluous
+# and emits a warning "-fPIC ignored for target (all code is position
+# independent)", despite the fact that the compiler accepts the option
+# and returns a success code. We want to re-interpret the warning as a
+# failure in order to avoid unnecessary compiler diagnostics in case the
+# client inserts the result of this check into CFLAGS, for instance. We
+# do so by attempting to promote warnings to errors using the result of
+# CS_COMPILER_ERRORS(). As an extra safe-guard, we also scan the compiler
+# output for an appropriate diagnostic because some gcc warnings fail to
+# promote to error status despite use of -Werror.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_COMPILER_PIC],
+ [CS_COMPILER_ERRORS([$1],
+ [m4_default([$2_werror],[cs_cv_prog_compiler_pic_werror])])
+ CS_CHECK_BUILD_FLAGS(
+ [how to enable m4_default([$1],[C]) PIC generation],
+ [m4_default([$2],[cs_cv_prog_compiler_pic])],
+ [CS_CREATE_TUPLE([-fPIC])], [$1], [$3], [$4],
+ [m4_default([$$2_werror],[$cs_cv_prog_compiler_pic_werror])], [], [],
+ [fPIC])])
+
+# Backward-compatiblity alias.
+AC_DEFUN([CS_CHECK_COMPILER_PIC], [CS_COMPILER_PIC([$1],[$2],[$3],[$4])])
+# checkprog.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2004 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# cs_bin_paths_default
+# Comma delimited list of additional directories in which tools and
+# commands might be found.
+#
+# Present Cases:
+# /usr/local/bin -- Although a common location for executables, it is
+# now-and-then absent from the default PATH setting.
+# /sw/bin -- Fink, the MacOS/X manager of Unix packages, installs
+# executables here.
+#------------------------------------------------------------------------------
+m4_define([cs_bin_paths_default], [/usr/local/bin, /sw/bin])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_PROG(VARIABLE, PROGRAM, VALUE-IF-FOUND, [VALUE-IF-NOT-FOUND],
+# [PATH], [REJECT])
+# Simple wrapper for AC_CHECK_PROG() which ensures that the search path
+# is augmented by the directories mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_PROG],
+ [_CS_PROG_PATH_PREPARE
+ AC_CHECK_PROG([$1], [$2], [$3], [$4],
+ m4_ifval([$5], [_CS_PROG_CLIENT_PATH([$5])]), [$6])])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_PROGS(VARIABLE, PROGRAMS, [VALUE-IF-NOT-FOUND], [PATH])
+# Simple wrapper for AC_CHECK_PROGS() which ensures that the search path
+# is augmented by the directories mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_PROGS],
+ [_CS_PROG_PATH_PREPARE
+ AC_CHECK_PROGS([$1], [$2], [$3],
+ m4_ifval([$4], [_CS_PROG_CLIENT_PATH([$4])]))])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_TOOL(VARIABLE, TOOL, [VALUE-IF-NOT-FOUND], [PATH])
+# Simple wrapper for AC_CHECK_TOOL() which ensures that the search path
+# is augmented by the directories mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_TOOL],
+ [_CS_PROG_PATH_PREPARE
+ AC_CHECK_TOOL([$1], [$2], [$3],
+ m4_ifval([$4], [_CS_PROG_CLIENT_PATH([$4])]))])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_TOOLS(VARIABLE, TOOLS, [VALUE-IF-NOT-FOUND], [PATH])
+# Simple wrapper for AC_CHECK_TOOLS() which ensures that the search path
+# is augmented by the directories mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_TOOLS],
+ [_CS_PROG_PATH_PREPARE
+ AC_CHECK_TOOLS([$1], [$2], [$3],
+ m4_ifval([$4], [_CS_PROG_CLIENT_PATH([$4])]))])
+
+
+#------------------------------------------------------------------------------
+# CS_PATH_PROG(VARIABLE, PROGRAM, [VALUE-IF-NOT-FOUND], [PATH])
+# Simple wrapper for AC_PATH_PROG() which ensures that the search path
+# is augmented by the directories mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_PATH_PROG],
+ [_CS_PROG_PATH_PREPARE
+ AC_PATH_PROG([$1], [$2], [$3],
+ m4_ifval([$4], [_CS_PROG_CLIENT_PATH([$4])]))])
+
+
+#------------------------------------------------------------------------------
+# CS_PATH_PROGS(VARIABLE, PROGRAMS, [VALUE-IF-NOT-FOUND], [PATH])
+# Simple wrapper for AC_PATH_PROGS() which ensures that the search path
+# is augmented by the directories mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_PATH_PROGS],
+ [_CS_PROG_PATH_PREPARE
+ AC_PATH_PROGS([$1], [$2], [$3],
+ m4_ifval([$4], [_CS_PROG_CLIENT_PATH([$4])]))])
+
+
+#------------------------------------------------------------------------------
+# CS_PATH_TOOL(VARIABLE, TOOL, [VALUE-IF-NOT-FOUND], [PATH])
+# Simple wrapper for AC_PATH_TOOL() which ensures that the search path
+# is augmented by the directories mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_PATH_TOOL],
+ [_CS_PROG_PATH_PREPARE
+ AC_PATH_TOOL([$1], [$2], [$3],
+ m4_ifval([$4], [_CS_PROG_CLIENT_PATH([$4])]))])
+
+
+#------------------------------------------------------------------------------
+# _CS_PROG_PATH_PREPARE
+# Ensure that the PATH environment variable mentions the set of
+# directories listed in cs_bin_paths_default. These directories may not
+# appear by default in the typical PATH, yet they might be common
+# locations for tools and commands.
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_PROG_PATH_PREPARE],
+ [AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])
+ AS_IF([test "$cs_prog_path_prepared" != yes],
+ [cs_prog_path_prepared=yes
+ PATH="$PATH[]m4_foreach([cs_bin_path], [cs_bin_paths_default],
+ [$PATH_SEPARATOR[]cs_bin_path])"
+ export PATH])])
+
+
+#------------------------------------------------------------------------------
+# _CS_PROG_CLIENT_PATH(CLIENT-PATH)
+# Given a client-supplied replacement for PATH, augment the list by
+# appending the locations mentioned in cs_bin_paths_default.
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_PROG_CLIENT_PATH],
+ [AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])dnl
+ $1[]m4_foreach([cs_bin_path], [cs_bin_paths_default],
+ [$PATH_SEPARATOR[]cs_bin_path])])
+# checkpthread.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003-2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_PTHREAD([REJECT-MASK])
+# Check for pthread. Also check if the pthread implementation supports
+# the recursive and timed mutex extensions. (Timed mutexes are needed for
+# the NPTL: New Posix Thread Library on GNU/Linux if the mutex is going
+# to be used with any of the timed condition-wait functions.) The shell
+# variable cs_cv_sys_pthread is set to "yes" if pthread is available,
+# else "no". If available, then the variables cs_cv_sys_pthread_cflags,
+# cs_cv_sys_pthread_lflags, and cs_cv_sys_pthread_libs are set. (As a
+# convenience, these variables can be emitted to an output file with
+# CS_EMIT_BUILD_RESULT() by passing "cs_cv_sys_pthread" as its CACHE-VAR
+# argument.) If the recursive mutex extension is supported, then
+# cs_cv_sys_pthread_mutex_recursive will be set with the literal name of
+# the constant which must be passed to pthread_mutexattr_settype() to
+# enable this feature. The constant name will be typically
+# PTHREAD_MUTEX_RECURSIVE or PTHREAD_MUTEX_RECURSIVE_NP. If the recursive
+# mutex extension is not available, then
+# cs_cv_sys_pthread_mutex_recursive will be set to "no". If the timed
+# mutex extension is supported, then cs_cv_sys_pthread_mutex_timed will
+# be set with the literal name of the constant which must be passed to
+# pthread_mutexattr_settype() to enable this feature. The constant name
+# will be typically PTHREAD_MUTEX_TIMED or PTHREAD_MUTEX_TIMED_NP. If the
+# timed mutex extension is not available, then
+# cs_cv_sys_pthread_mutex_timed will be set to "no". REJECT-MASK can be
+# used to limit the platforms on which the pthread test is performed. It
+# is compared against $host_os; matches are rejected. If omitted, then
+# the test is performed on all platforms. Examples: To avoid testing on
+# Cygwin, use "cygwin*"; to avoid testing on Cygwin and AIX, use
+# "cygwin*|aix*".
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_PTHREAD],
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+ case $host_os in
+ m4_ifval([$1],
+ [$1)
+ cs_cv_sys_pthread=no
+ ;;
+ ])
+ *)
+ CS_CHECK_BUILD([for pthread], [cs_cv_sys_pthread],
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ #include <semaphore.h>
+ void* worker(void* p) { (void)p; return p; }]],
+ [pthread_t tid;
+ sem_t sem;
+ pthread_create(&tid, 0, worker, 0);
+ sem_init(&sem, 0, 0);
+ sem_destroy(&sem);])],
+ [cs_pthread_flags])
+ ;;
+ esac
+ _CS_CHECK_MUTEX_FEATURE([PTHREAD_MUTEX_RECURSIVE],
+ [cs_cv_sys_pthread_mutex_recursive], [for pthread recursive mutexes])])
+
+# _CS_CHECK_MUTEX_FEATURE(FEATURE, CACHE-VAR, MESSAGE)
+AC_DEFUN([_CS_CHECK_MUTEX_FEATURE],
+ [AS_IF([test $cs_cv_sys_pthread = yes],
+ [AC_CACHE_CHECK([$3], [$2],
+ [CS_BUILD_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>]],
+ [pthread_mutexattr_t attr;
+ pthread_mutexattr_settype(&attr, CS_MUTEX_FEATURE);])],
+ [CS_CREATE_TUPLE([-DCS_MUTEX_FEATURE=$1]) \
+ CS_CREATE_TUPLE([-DCS_MUTEX_FEATURE=$1_NP])],
+ [],
+ [$2=`echo $cs_build_cflags | sed 's/.*\($1_*N*P*\).*/\1/'`],
+ [$2=no],
+ [$cs_cv_sys_pthread_cflags -D_GNU_SOURCE],
+ [$cs_cv_sys_pthread_lflags],
+ [$cs_cv_sys_pthread_libs])])],
+ [$2=no])])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_PTHREAD_ATFORK(CACHE-VAR)
+# Checks whether the pthread library contains pthread_atfork(). Sets
+# CACHE-VAR to "yes" or "no", according to the test result.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_PTHREAD_ATFORK],
+ [AS_IF([test $cs_cv_sys_pthread = yes],
+ [AC_CACHE_CHECK([for pthread_atfork support], [$1],
+ [CS_BUILD_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>]],
+ [pthread_atfork (0, 0, 0);])],
+ [], [],
+ [$1=yes], [$1=no],
+ [$cs_cv_sys_pthread_cflags -D_GNU_SOURCE],
+ [$cs_cv_sys_pthread_lflags],
+ [$cs_cv_sys_pthread_libs])])],
+ [$1=no])])
+
+m4_define([cs_pthread_flags],
+ [CS_CREATE_TUPLE() \
+ CS_CREATE_TUPLE([], [], [-lpthread]) \
+ CS_CREATE_TUPLE([], [], [-lpthread -lrt]) \
+ CS_CREATE_TUPLE([-pthread], [-pthread], []) \
+ CS_CREATE_TUPLE([-pthread], [-pthread], [-lpthread]) \
+ CS_CREATE_TUPLE([-pthread], [-pthread], [-lc_r])])
+# checktt2.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2004,2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_TEMPLATE_TOOLKIT2([EMITTER])
+# Check if Template Toolkit 2 (http://www.tt2.org/) is available. The
+# shell variable cs_cv_perl_tt2 is set to "yes" if the package is
+# discovered, else "no". Also sets the shell variable TTREE to the name
+# path of the 'ttree' utility program and invokes AC_SUBST(). If EMITTER
+# is provided and the package was discovered, then
+# CS_EMIT_BUILD_PROPERTY() is invoked with EMITTER in order to record the
+# value of the TTREE variable in an output file. As a convenience, if
+# EMITTER is the literal value "emit" or "yes", then
+# CS_EMIT_BUILD_RESULT()'s default emitter will be used.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_TEMPLATE_TOOLKIT2],
+ [CS_CHECK_PROGS([PERL], [perl5 perl])
+ AS_IF([test -n "$PERL"],
+ [AC_CACHE_CHECK([for TemplateToolkit], [cs_cv_perl_tt2],
+ [AS_IF([AC_RUN_LOG(
+ [$PERL -M'Template 2.11' -MTemplate::Plugin -e 0 1>&2])],
+ [cs_cv_perl_tt2=yes],
+ [cs_cv_perl_tt2=no])])
+ CS_PATH_PROGS([TTREE], [ttree])
+ AS_IF([test $cs_cv_perl_tt2 = yes && test -n "$TTREE"],
+ [CS_EMIT_BUILD_PROPERTY([TTREE], [$TTREE], [], [],
+ CS_EMITTER_OPTIONAL([$1]))])])])
+# compiler.m4 -*- Autoconf -*-
+#=============================================================================
+# Copyright (C)2003 by Matze Braun <matze@braunis.de>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#=============================================================================
+
+#-----------------------------------------------------------------------------
+# Detection of C and C++ compilers and setting flags
+#
+# CS_PROG_CC
+# Detects the C compiler. Also takes care of the CFLAGS, CPPFLAGS and CC
+# environment variables. This will filter out all -g and -O from the
+# CFLAGS variable because Autoconf's -g and -O defaults are not always
+# desired. This will also set the CMD.CC and COMPILER.CFLAGS variables
+# in Jamconfig
+# CS_PROG_CXX
+# Detects the C++ compiler. Also takes care of the CXXFLAGS, CPPFLAGS
+# and CXX environment variables. This will filter out all -g and -O from
+# the CXXFLAGS variable because Autoconf's -g and -O defaults are not
+# always desired. This will also set the CMD.C++ and COMPILER.C++FLAGS
+# variables in Jamconfig
+# CS_PROG_LINK
+# Tries to determine a linker. This is done by checking if a C++ or
+# Objecctive-C++ compiler is available in which case it is used for
+# linking; otherwise the C or Objective-C compiler is used. This also
+# sets the CMD.LINK and COMPILER.LFLAGS variables in Jamconfig and
+# respects the LDFLAGS environment variable. Finally, checks if linker
+# recognizes -shared and sets PLUGIN.LFLAGS; and checks if linker
+# recognizes -soname and sets PLUGIN.LFLAGS.USE_SONAME to "yes".
+#-----------------------------------------------------------------------------
+AC_DEFUN([CS_PROG_CC],[
+ CFLAGS="$CFLAGS" # Filter undesired flags
+ AS_IF([test -n "$CC"],[
+ CS_EMIT_BUILD_PROPERTY([CMD.CC], [$CC])
+ CS_EMIT_BUILD_PROPERTY([COMPILER.CFLAGS], [$CPPFLAGS $CFLAGS], [+])
+
+ # Check if compiler recognizes -pipe directive.
+ CS_EMIT_BUILD_FLAGS([if $CC accepts -pipe], [cs_cv_prog_cc_pipe],
+ [CS_CREATE_TUPLE([-pipe])], [C], [COMPILER.CFLAGS], [+])
+ ])
+])
+
+AC_DEFUN([CS_PROG_CXX],[
+ CXXFLAGS="$CXXFLAGS" # Filter undesired flags
+ AS_IF([test -n "$CXX"],[
+ CS_EMIT_BUILD_PROPERTY([CMD.C++], [$CXX])
+
+ CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS], [$CPPFLAGS $CXXFLAGS], [+])
+
+ # Check if compiler can be instructed to produce position-independent-code
+ # (PIC). This feature is required by some platforms when building plugin
+ # modules and shared libraries.
+ CS_COMPILER_PIC([C++], [cs_cv_prog_cxx_pic],
+ [CS_EMIT_BUILD_PROPERTY([COMPILER.C++FLAGS.PIC],
+ [$cs_cv_prog_cxx_pic])])
+ ])
+])
+
+AC_DEFUN([CS_PROG_LINK],[
+ AC_REQUIRE([CS_PROG_CXX])
+ AS_IF([test -n "$CXX"],
+ [CS_EMIT_BUILD_PROPERTY([CMD.LINK], [AS_ESCAPE([$(CMD.C++)])])],
+ [CS_EMIT_BUILD_PROPERTY([CMD.LINK], [AS_ESCAPE([$(CMD.CC)])])])
+
+ CS_EMIT_BUILD_PROPERTY([COMPILER.LFLAGS], [$LDFLAGS], [+])
+
+ # Check if compiler/linker recognizes -shared directive which is needed for
+ # linking plugin modules. Unfortunately, the Apple compiler (and possibly
+ # others) requires extra effort. Even though the compiler does not recognize
+ # the -shared option, it nevertheless returns a "success" result after emitting
+ # the warning "unrecognized option `-shared'". Worse, even -Werror fails to
+ # promote the warning to an error, so we must instead scan the compiler's
+ # output for an appropriate diagnostic.
+ CS_CHECK_BUILD_FLAGS([if -shared is accepted], [cs_cv_prog_link_shared],
+ [CS_CREATE_TUPLE([-shared $cs_cv_prog_cxx_pic])], [C++],
+ [CS_EMIT_BUILD_PROPERTY([PLUGIN.LFLAGS], [-shared], [+])], [],
+ [], [], [], [shared])
+
+ # Check if linker recognizes -soname which is used to assign a name internally
+ # to plugin modules.
+ CS_CHECK_BUILD([if -soname is accepted], [cs_cv_prog_link_soname], [],
+ [CS_CREATE_TUPLE([-Wl,-soname,foobar])], [C++],
+ [CS_EMIT_BUILD_PROPERTY([PLUGIN.LFLAGS.USE_SONAME], [yes])])
+])
+#------------------------------------------------------------------------------
+# Determine host platform. Recognized families: Unix, Windows, MacOS/X.
+# Orginial Macros Copyright (C)2003 Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#------------------------------------------------------------------------------
+
+#------------------------------------------------------------------------------
+# Determine host CPU.
+#
+# CS_CHECK_HOST_CPU
+# Set the shell variable cs_host_cpu to a normalized form of the CPU name
+# returned by config.guess/config.sub. Typically, Crystal Space's
+# conception of CPU name is the same as that returned by
+# config.guess/config.sub, but there may be exceptions as seen in the
+# `case' statement. Also takes the normalized name, uppercases it to
+# form a name suitable for the C preprocessor. Additionally sets the
+# TARGET.PROCESSOR Jamconfig property.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_HOST_CPU],
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+ case $host_cpu in
+ [[Ii][3-9]86*|[Xx]86*]) cs_host_cpu=x86 ;;
+ *) cs_host_cpu=$host_cpu ;;
+ esac
+ cs_host_cpu_normalized="AS_TR_CPP([$cs_host_cpu])"
+ CS_JAMCONFIG_PROPERTY([TARGET.PROCESSOR], [$cs_host_cpu_normalized])
+ ])
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_HOST
+# Sets the shell variables cs_host_target cs_host_family,
+# cs_host_os_normalized, and cs_host_os_normalized_uc. Emits appropriate
+# CS_PLATFORM_UNIX, CS_PLATFORM_WIN32, CS_PLATFORM_MACOSX via
+# AC_DEFINE(), and TARGET.OS and TARGET.OS.NORMALIZED to Jamconfig.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_HOST],
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+ CS_CHECK_HOST_CPU
+ cs_host_os_normalized=''
+ case $host_os in
+ mingw*|cygwin*)
+ cs_host_target=win32gcc
+ cs_host_family=windows
+ ;;
+ darwin*)
+ _CS_CHECK_HOST_DARWIN
+ ;;
+ *)
+ # Everything else is assumed to be Unix or Unix-like.
+ cs_host_target=unix
+ cs_host_family=unix
+ ;;
+ esac
+
+ case $cs_host_family in
+ windows)
+ AC_DEFINE([CS_PLATFORM_WIN32], [],
+ [Define when compiling for Win32])
+ AS_IF([test -z "$cs_host_os_normalized"],
+ [cs_host_os_normalized='Win32'])
+ ;;
+ unix)
+ AC_DEFINE([CS_PLATFORM_UNIX], [],
+ [Define when compiling for Unix and Unix-like (i.e. MacOS/X)])
+ AS_IF([test -z "$cs_host_os_normalized"],
+ [cs_host_os_normalized='Unix'])
+ ;;
+ esac
+
+ cs_host_os_normalized_uc="AS_TR_CPP([$cs_host_os_normalized])"
+ CS_JAMCONFIG_PROPERTY([TARGET.OS], [$cs_host_os_normalized_uc])
+ CS_JAMCONFIG_PROPERTY([TARGET.OS.NORMALIZED], [$cs_host_os_normalized])
+])
+
+AC_DEFUN([_CS_CHECK_HOST_DARWIN],
+ [AC_REQUIRE([CS_PROG_CC])
+ AC_REQUIRE([CS_PROG_CXX])
+
+ # Both MacOS/X and Darwin are identified via $host_os as "darwin". We need
+ # a way to distinguish between the two. If Carbon.h is present, then
+ # assume MacOX/S; if not, assume Darwin. If --with-x=yes was invoked, and
+ # Carbon.h is present, then assume that user wants to cross-build for
+ # Darwin even though build host is MacOS/X.
+ # IMPLEMENTATION NOTE *1*
+ # The QuickTime 7.0 installer removes <CarbonSound/CarbonSound.h>, which
+ # causes #include <Carbon/Carbon.h> to fail unconditionally. Re-installing
+ # the QuickTime SDK should restore the header, however not all developers
+ # know to do this, so we work around the problem of the missing
+ # CarbonSound.h by #defining __CARBONSOUND__ in the test in order to
+ # prevent Carbon.h from attempting to #include the missing header.
+ # IMPLEMENTATION NOTE *2*
+ # At least one MacOS/X user switches between gcc 2.95 and gcc 3.3 with a
+ # script which toggles the values of CC, CXX, and CPP. Unfortunately, CPP
+ # was being set to run the preprocessor directly ("cpp", for instance)
+ # rather than running it via the compiler ("gcc -E", for instance). The
+ # problem with running the preprocessor directly is that __APPLE__ and
+ # __GNUC__ are not defined, which causes the Carbon.h check to fail. We
+ # avoid this problem by supplying a non-empty fourth argument to
+ # AC_CHECK_HEADER(), which causes it to test compile the header only (which
+ # is a more robust test), rather than also testing it via the preprocessor.
+
+ AC_DEFINE([__CARBONSOUND__], [],
+ [Avoid problem caused by missing <Carbon/CarbonSound.h>])
+ AC_CHECK_HEADER([Carbon/Carbon.h],
+ [cs_host_macosx=yes], [cs_host_macosx=no], [/* force compile */])
+
+ AS_IF([test $cs_host_macosx = yes],
+ [AC_MSG_CHECKING([for --with-x])
+ AS_IF([test "${with_x+set}" = set && test "$with_x" = "yes"],
+ [AC_MSG_RESULT([yes (assume Darwin)])
+ cs_host_macosx=no],
+ [AC_MSG_RESULT([no])])])
+
+ AS_IF([test $cs_host_macosx = yes],
+ [cs_host_target=macosx
+ cs_host_family=unix
+ cs_host_os_normalized='MacOS/X'
+ AC_DEFINE([CS_PLATFORM_MACOSX], [],
+ [Define when compiling for MacOS/X])
+
+ AC_CACHE_CHECK([for Objective-C compiler], [cs_cv_prog_objc],
+ [cs_cv_prog_objc="$CC"])
+ CS_JAMCONFIG_PROPERTY([CMD.OBJC], [$cs_cv_prog_objc])
+ AC_CACHE_CHECK([for Objective-C++ compiler], [cs_cv_prog_objcxx],
+ [cs_cv_prog_objcxx="$CXX"])
+ CS_JAMCONFIG_PROPERTY([CMD.OBJC++], [$cs_cv_prog_objcxx])],
+
+ [cs_host_target=unix
+ cs_host_family=unix])])
+# diagnose.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_MSG_ERROR(ERROR-DESCRIPTION, [EXIT-STATUS])
+# A convenience wrapper for AC_MSG_ERROR() which invokes AC_CACHE_SAVE()
+# before aborting the script. Saving the cache should make subsequent
+# re-invocations of the configure script faster once the user has
+# corrected the problem(s) which caused the failure.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_MSG_ERROR],
+ [AC_CACHE_SAVE
+ AC_MSG_ERROR([$1], [$2])])
+# embed.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003,2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_META_INFO_EMBED([EMITTER], [GPL-OKAY])
+# Determine if plugin meta-information should be embedded or if it should
+# exist in a stand-alone .csplugin file, and check if necessary tools and
+# libraries are present. Sets the shell variable
+# enable_meta_info_embedding to "yes" if the user requested embedding or
+# if it was enabled by default; otherwise sets it to "no".
+#
+# If EMITTER is provided, then a subset of the following variables
+# (depending upon platform and availability) are recorded by invoking
+# CS_EMIT_BUILD_PROPERTY() with EMITTER. As a convenience, if EMITTER is
+# the literal value "emit" or "yes", then CS_EMIT_BUILD_RESULT()'s
+# default emitter will be used.
+#
+# EMBED_META := yes or no
+# EMBED_META.CFLAGS := compiler flags
+# EMBED_META.LFLAGS := linker flags
+# CMD.WINDRES := windres.exe
+# OBJCOPY.AVAILABLE := yes or no
+# CMD.OBJCOPY := objcopy.exe
+# LIBBFD.AVAILABLE := yes or no
+# LIBBFD.CFLAGS := libbfd compiler flags
+# LIBBFD.LFLAGS := libbfd linker flags
+# ELF.AVAILABLE := yes or no
+#
+# In general, clients need only concern themselves with the various
+# EMBED_META-related variables. For building plugin modules, utilize
+# EMBED_META.CFLAGS when compiling, and EMBED_META.LFLAGS when linking.
+#
+# On Unix, when CS' own ELF metadata reader can't be used (because the
+# necessary header file elf.h was not found) embedding is accomplished
+# via libbfd, which carries a GPL license. Projects which carry licenses
+# not compatible with GPL should consider carefully before enabling
+# embedding on Unix. If your project is GPL-compatible, then set GPL-OKAY
+# to "yes". This will indicate that it is safe to use libbfd if the ELF
+# reader can not be used. If your project is not GPL-compatible, then
+# set it to "no" in order to disable embedding on Unix if the ELF reader
+# is not usable. (The user can still manually override the setting via
+# the --enable-meta-info-embedding option.)
+#
+# IMPLEMENTATION NOTES
+#
+# Recent versions of Mingw supply libbfd and libiberty. Since Crystal
+# Space uses native Win32 API for meta-information embedding on Windows,
+# we do not require these libraries on Windows. More importantly, users
+# do not want to see these GPL-licensed libraries appear in the link
+# statement for plugin modules, thus we explicitly disable the libbfd
+# test on Windows.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_META_INFO_EMBED],
+ [AC_REQUIRE([AC_CANONICAL_HOST])
+ _CS_META_INFO_EMBED_ENABLE([$1], [$2])
+ AS_IF([test $enable_meta_info_embedding = yes],
+ [_CS_META_INFO_EMBED_TOOLS([$1])
+ AS_IF([test $cs_header_elf_h = yes],
+ [CS_EMIT_BUILD_PROPERTY([ELF.AVAILABLE], [yes], [], [],
+ CS_EMITTER_OPTIONAL([$1]))],
+ [case $host_os in
+ mingw*|cygwin*) ;;
+ *)
+ CS_CHECK_LIBBFD([$1],
+ [CS_EMIT_BUILD_PROPERTY([EMBED_META.CFLAGS],
+ [$cs_cv_libbfd_ok_cflags], [+], [],
+ CS_EMITTER_OPTIONAL([$1]))
+ CS_EMIT_BUILD_PROPERTY([EMBED_META.LFLAGS],
+ [$cs_cv_libbfd_ok_lflags $cs_cv_libbfd_ok_libs],
+ [+], [], CS_EMITTER_OPTIONAL([$1]))])
+ ;;
+ esac])])])
+
+
+#------------------------------------------------------------------------------
+# _CS_META_INFO_EMBED_ENABLE([EMITTER], [GPL-OKAY])
+# Helper for CS_META_INFO_EMBED which adds an
+# --enable-meta-info-embedding option to the configure script allowing
+# the user to control embedding. Sets the shell variable
+# enable_meta_info_embedding to yes or no.
+#
+# IMPLEMENTATION NOTES
+#
+# On Unix, embedding is enabled by default if elf.h is found and disabled
+# by default unless overridden via GPL-OKAY because libbfd carries a GPL
+# license which may be incompatible with a project's own license (such as
+# LGPL).
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_META_INFO_EMBED_ENABLE],
+ [AC_REQUIRE([CS_CHECK_HOST])
+ AC_CHECK_HEADERS([elf.h], [cs_header_elf_h=yes], [cs_header_elf_h=no])
+ AC_MSG_CHECKING([whether to embed plugin meta-information])
+ case $cs_host_target in
+ unix) AS_IF([test $cs_header_elf_h = yes],
+ [cs_embed_meta_info_default=yes],
+ [cs_embed_meta_info_default=m4_ifval([$2],[$2],[no])]) ;;
+ *) cs_embed_meta_info_default=yes ;;
+ esac
+ AC_ARG_ENABLE([meta-info-embedding],
+ [AC_HELP_STRING([--enable-meta-info-embedding],
+ [store plugin meta-information directly inside plugin modules if
+ supported by platform; if disabled, meta-information is stored in
+ stand-alone .csplugin files; this option is enabled by default for
+ non-Unix platforms and on Unix platforms with ELF-format object
+ files; it is disabled by default on Unix platforms if ELF is not
+ available and the project uses a non-GPL-compatible license (such
+ as LGPL) since the non-ELF Unix embedding technology requires the
+ GPL-licensed libbfd library; if ELF is not available, enable this
+ option on Unix only if you are certain you want a GPL-licensed
+ library infecting your project])],
+ [], [enable_meta_info_embedding=$cs_embed_meta_info_default])
+ AC_MSG_RESULT([$enable_meta_info_embedding])
+ CS_EMIT_BUILD_PROPERTY([EMBED_META], [$enable_meta_info_embedding],
+ [], [], CS_EMITTER_OPTIONAL([$1]))])
+
+
+
+#------------------------------------------------------------------------------
+# _CS_META_INFO_EMBED_TOOLS([EMITTER])
+# Helper for CS_META_INFO_EMBED() which searches for tools required for
+# plugin meta-info embedding.
+#------------------------------------------------------------------------------
+AC_DEFUN([_CS_META_INFO_EMBED_TOOLS],
+ [CS_CHECK_TOOLS([WINDRES], [windres])
+ CS_EMIT_BUILD_PROPERTY([CMD.WINDRES], [$WINDRES], [], [],
+ CS_EMITTER_OPTIONAL([$1]))
+
+ CS_CHECK_TOOLS([OBJCOPY], [objcopy])
+ AS_IF([test -n "$OBJCOPY"],
+ [CS_EMIT_BUILD_PROPERTY([OBJCOPY.AVAILABLE], [yes], [], [],
+ CS_EMITTER_OPTIONAL([$1]))
+ CS_EMIT_BUILD_PROPERTY([CMD.OBJCOPY], [$OBJCOPY], [], [],
+ CS_EMITTER_OPTIONAL([$1]))])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_CHECK_LIBBFD([EMITTER], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# Exhaustive check for a usable GPL-licensed libbfd, the Binary File
+# Descriptor library, a component of binutils, which allows low-level
+# manipulation of executable and object files. If EMITTER is provided,
+# then the following variables are recorded by invoking
+# CS_EMIT_BUILD_PROPERTY() with EMITTER. As a convenience, if EMITTER is
+# the literal value "emit" or "yes", then CS_EMIT_BUILD_RESULT()'s
+# default emitter will be used.
+#
+# LIBBFD.AVAILABLE := yes or no
+# LIBBFD.CFLAGS := libbfd compiler flags
+# LIBBFD.LFLAGS := libbfd linker flags
+#
+# The shell variable cs_cv_libbfd_ok is set to yes if a usable libbfd was
+# discovered, else no. If found, the additional shell variables
+# cs_cv_libbfd_ok_cflags, cs_cv_libbfd_ok_lflags, and
+# cs_cv_libbfd_ok_libs are also set.
+#
+# WARNING
+#
+# libbfd carries a GPL license which is incompatible with the LGPL
+# license of Crystal Space. Do not use this library with projects under
+# less restrictive licenses, such as LGPL.
+#
+# IMPLEMENTATION NOTES
+#
+# It seems that some platforms have two version of libiberty installed:
+# one from binutils and one from gcc. The binutils version resides in
+# /usr/lib, whereas the gcc version resides in the gcc installation
+# directory. The gcc version, by default, takes precedence at link time
+# over the binutils version. Unfortunately, in broken cases, the gcc
+# version of libiberty is missing htab_create_alloc() which is required
+# by some libbfd functions. The extensive secondary check of libbfd
+# catches this anomalous case of broken gcc libiberty. It turns out that
+# it is possible to make the linker prefer the binutils version by
+# specifying -L/usr/lib, thus the extensive test attempts to do so in an
+# effort to resolve this unfortunate issue.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_LIBBFD],
+ [CS_CHECK_LIB_WITH([bfd],
+ [AC_LANG_PROGRAM([[#include <bfd.h>]], [bfd_init();])],
+ [], [], [], [], [], [], [-liberty])
+
+ AS_IF([test $cs_cv_libbfd = yes],
+ [CS_CHECK_BUILD([if libbfd is usable], [cs_cv_libbfd_ok],
+ [AC_LANG_PROGRAM([[#include <bfd.h>]],
+ [bfd* p;
+ asection* s;
+ bfd_init();
+ p = bfd_openr(0,0);
+ bfd_check_format(p,bfd_object);
+ bfd_get_section_by_name(p,0);
+ bfd_section_size(p,s);
+ bfd_get_section_contents(p,s,0,0,0);
+ bfd_close(p);])],
+ [CS_CREATE_TUPLE() CS_CREATE_TUPLE([],[-L/usr/lib],[])],
+ [], [], [], [],
+ [$cs_cv_libbfd_cflags],
+ [$cs_cv_libbfd_lflags],
+ [$cs_cv_libbfd_libs])],
+ [cs_cv_libbfd_ok=no])
+
+ AS_IF([test $cs_cv_libbfd_ok = yes],
+ [CS_EMIT_BUILD_RESULT([cs_cv_libbfd_ok], [LIBBFD],
+ CS_EMITTER_OPTIONAL([$1]))
+ $2],
+ [$3])])
+# emit.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003-2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_EMIT_BUILD_PROPERTY(KEY, VALUE, [APPEND], [EMPTY-OKAY], [EMITTER],
+# [UNCONDITIONAL])
+# A utility function which invokes an emitter to record the KEY/VALUE
+# tuple if VALUE is not the empty string (after leading and trailing
+# whitespace is stripped). If EMPTY-OKAY is not an empty string, then the
+# property is emitted even if VALUE is empty; that is, it is emitted
+# unconditionally. If APPEND is the empty string, then the emitter sets
+# the key's value directly (though it may be overridden by the
+# environment), otherwise the emitter appends VALUE to the existing value
+# of the key. EMITTER is a macro name, such as CS_JAMCONFIG_PROPERTY or
+# CS_MAKEFILE_PROPERTY, which performs the actual task of emitting the
+# KEY/VALUE tuple; it should also accept APPEND as an optional third
+# argument. If EMITTER is omitted, CS_JAMCONFIG_PROPERTY is used. Some
+# emitters accept an optional fourth argument, UNCONDITIONAL, which
+# instructs it to set KEY's value unconditionally, even if KEY already
+# had been assigned a value via some other mechanism (such as imported
+# from the environment, or from Jambase, in the case of
+# CS_JAMCONFIG_PROPERTY).
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_EMIT_BUILD_PROPERTY],
+ [cs_build_prop_val="$2"
+ cs_build_prop_val=CS_TRIM([$cs_build_prop_val])
+ m4_ifval([$4],
+ [CS_JAMCONFIG_PROPERTY([$1], [$cs_build_prop_val], [$3])],
+ AS_IF([test -n "$cs_build_prop_val"],
+ [m4_default([$5],[CS_JAMCONFIG_PROPERTY])(
+ [$1], [$cs_build_prop_val], [$3], [$6])]))])
+
+
+
+#------------------------------------------------------------------------------
+# CS_EMIT_BUILD_RESULT(CACHE-VAR, PREFIX, [EMITTER])
+# Record the results of CS_CHECK_BUILD() or CS_CHECK_LIB_WITH() via some
+# emitter. If CACHE-VAR indicates that the build succeeded, then the
+# following properties are emitted:
+#
+# PREFIX.AVAILABLE = yes
+# PREFIX.CFLAGS = $CACHE-VAR_cflags
+# PREFIX.LFLAGS = $CACHE-VAR_lflags $CACHE-VAR_libs
+#
+# EMITTER is a macro name, such as CS_JAMCONFIG_PROPERTY or
+# CS_MAKEFILE_PROPERTY, which performs the actual task of emitting the
+# KEY/VALUE tuple. If EMITTER is omitted, CS_JAMCONFIG_PROPERTY is used.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_EMIT_BUILD_RESULT],
+ [AS_IF([test "$$1" = yes],
+ [CS_EMIT_BUILD_PROPERTY([$2.AVAILABLE], [yes], [], [], [$3])
+ CS_EMIT_BUILD_PROPERTY([$2.CFLAGS], [$$1_cflags], [], [], [$3])
+ CS_EMIT_BUILD_PROPERTY([$2.LFLAGS], [$$1_lflags $$1_libs],
+ [], [], [$3])])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_EMIT_BUILD_FLAGS(MESSAGE, CACHE-VAR, FLAGS, [LANGUAGE], EMITTER-KEY,
+# [APPEND], [ACTION-IF-RECOGNIZED],
+# [ACTION-IF-NOT-RECOGNIZED], [EMITTER])
+# A convenience wrapper for CS_CHECK_BUILD_FLAGS() which also records the
+# results via CS_EMIT_BUILD_PROPERTY(). Checks if the compiler or linker
+# recognizes a command-line option. MESSAGE is the "checking" message.
+# CACHE-VAR is the shell cache variable which receives the flag
+# recognized by the compiler or linker, or "no" if the flag was not
+# recognized. FLAGS is a whitespace- delimited list of build tuples
+# created with CS_CREATE_TUPLE(). Each tuple from FLAGS is attempted in
+# order until one is found which is recognized by the compiler. After
+# that, no further flags are checked. LANGUAGE is typically either C or
+# C++ and specifies which compiler to use for the test. If LANGUAGE is
+# omitted, C is used. EMITTER-KEY is the name to pass as the emitter's
+# "key" argument if a usable flag is encountered. If APPEND is not the
+# empty string, then the discovered flag is appended to the existing
+# value of the EMITTER-KEY. If the command-line option was recognized,
+# then ACTION-IF-RECOGNIZED is invoked, otherwise
+# ACTION-IF-NOT-RECOGNIZED is invoked. EMITTER is a macro name, such as
+# CS_JAMCONFIG_PROPERTY or CS_MAKEFILE_PROPERTY, which performs the
+# actual task of emitting the KEY/VALUE tuple; it should also accept
+# APPEND as an optional third argument. If EMITTER is omitted,
+# CS_JAMCONFIG_PROPERTY is used.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_EMIT_BUILD_FLAGS],
+ [CS_CHECK_BUILD_FLAGS([$1], [$2], [$3], [$4],
+ [CS_EMIT_BUILD_PROPERTY([$5], [$$2], [$6], [], [$9])
+ $7],
+ [$8])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_EMITTER_OPTIONAL([EMITTER])
+# The CS_EMIT_FOO() macros optionally accept an emitter. If no emitter is
+# supplied to those macros, then a default emitter is chosen. Other
+# macros, however, which perform testing and optionally emit the results
+# may wish to interpret an omitted EMITTER as a request not to emit the
+# results. CS_EMITTER_OPTIONAL() is a convenience macro to help in these
+# cases. It should be passed to one of the CS_EMIT_FOO() macros in place
+# of the literal EMITTER argument. It functions by re-interpretating
+# EMITTER as follows:
+#
+# - If EMITTER is omitted, then CS_NULL_EMITTER is returned, effectively
+# disabling output by the CS_EMIT_FOO() macro.
+# - If EMITTER is the literal string "emit" or "yes", then it returns an
+# empty string, which signals to the CS_EMIT_FOO() macro that is should
+# use its default emitter.
+# - Any other value for EMITTER is passed along as-is to the
+# CS_EMIT_FOO() macro.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_EMITTER_OPTIONAL],
+ [m4_case([$1],
+ [], [[CS_NULL_EMITTER]],
+ [emit], [],
+ [yes], [],
+ [[$1]])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_NULL_EMITTER(KEY, VALUE, [APPEND])
+# A do-nothing emitter suitable for use as the EMITTER argument of one of
+# the CS_EMIT_FOO() macros.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_NULL_EMITTER], [:
+])
+
+
+
+#------------------------------------------------------------------------------
+# CS_SUBST_EMITTER(KEY, VALUE, [APPEND])
+# An emitter wrapped around AC_SUBST(). Invokes
+# AC_SUBST(AS_TR_SH(KEY),VALUE). The APPEND argument is ignored.
+# Suitable for use as the EMITTER argument of one of the CS_EMIT_FOO()
+# macros. The call to AS_TR_SH() ensures that KEY is transformed into a
+# valid shell variable. For instance, if a macro attempts to emit
+# MYLIB.CFLAGS and MYLIB.LFLAGS via CS_SUBST_EMITTER(), then the names
+# will be transformed to MYLIB_CFLAGS and MYLIB_LFLAGS, respectively, for
+# the invocation of AC_SUBST().
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_SUBST_EMITTER], [AC_SUBST(AS_TR_SH([$1]),[$2])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_DEFINE_EMITTER(KEY, VALUE, [APPEND])
+# An emitter wrapped around AC_DEFINE_UNQUOTED(). Invokes
+# AC_DEFINE_UNQUOTED(AS_TR_CPP(KEY),VALUE). The APPEND argument is
+# ignored. Suitable for use as the EMITTER argument of one of the
+# CS_EMIT_FOO() macros. The call to AS_TR_CPP() ensures that KEY is a
+# well-formed token for the C-preprocessor.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_DEFINE_EMITTER],
+ [AC_DEFINE_UNQUOTED(AS_TR_CPP([$1]),[$2],
+ [Define when feature is available])])
+# headercache.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# Text cache facility for C-style #define properties. The cache is stored in
+# the shell variable cs_header_text.
+#
+# CS_HEADER_APPEND(TEXT)
+# Append text to the C header text cache. This is a cover for
+# CS_TEXT_CACHE_APPEND().
+#
+# CS_HEADER_PREPEND(TEXT)
+# Prepend text to the C header text cache. This is a cover for
+# CS_TEXT_CACHE_PREPEND().
+#
+# CS_HEADER_PROPERTY(KEY, [VALUE])
+# Append a line of the form "#define KEY VALUE" to the C header text
+# cache. If the VALUE argument is omitted, then the appended line has
+# the simplified form "#define KEY".
+#
+# CS_HEADER_OUTPUT(FILENAME)
+# Instruct config.status to write the C header text cache to the given
+# filename. This is a cover for CS_TEXT_CACHE_OUTPUT().
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_HEADER_APPEND], [CS_TEXT_CACHE_APPEND([cs_header_text], [$1])])
+AC_DEFUN([CS_HEADER_PREPEND], [CS_TEXT_CACHE_PREPEND([cs_header_text], [$1])])
+AC_DEFUN([CS_HEADER_PROPERTY],
+[CS_HEADER_APPEND([@%:@define $1[]m4_ifval([$2], [ $2], [])
+])])
+AC_DEFUN([CS_HEADER_OUTPUT], [CS_TEXT_CACHE_OUTPUT([cs_header_text], [$1])])
+#-----------------------------------------------------------------------------
+# installdirs.m4 (c) Matze Braun <matze@braunis.de>
+# Macro for emitting the installation paths gathered by Autoconf.
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#-----------------------------------------------------------------------------
+
+#-----------------------------------------------------------------------------
+# CS_OUTPUT_INSTALLDIRS([EMITTER], [RAW-BACKSLASHES])
+# Emit installation directories collected by Autoconf. EMITTER is a macro
+# name, such as CS_JAMCONFIG_PROPERTY or CS_MAKEFILE_PROPERTY, which performs
+# the actual task of emitting the KEY/VALUE tuple. If EMITTER is omitted,
+# CS_JAMCONFIG_PROPERTY is used. If RAW-BACKSLASHES is not provided, then
+# backslashes in emitted values are each escaped with an additional
+# backslash. If RAW-BACKSLASHES is not the null value, then backslashes are
+# emitted raw. The following properties are emitted:
+#
+# prefix
+# exec_prefix
+# bindir
+# sbindir
+# libexecdir
+# datadir
+# sysconfdir
+# sharedstatedir
+# localstatedir
+# libdir
+# includedir
+# oldincludedir
+# infodir
+# mandir
+#-----------------------------------------------------------------------------
+AC_DEFUN([CS_OUTPUT_INSTALLDIRS],[
+# Handle the case when no prefix is given, and the special case when a path
+# contains more than 2 slashes, these paths seem to be correct but Jam fails
+# on them.
+AS_IF([test $prefix = NONE],
+ [cs_install_prefix="$ac_default_prefix"],
+ [cs_install_prefix=`echo "$prefix" | sed -e 's:///*:/:g'`])
+AS_IF([test $exec_prefix = NONE],
+ [cs_install_exec_prefix="AS_ESCAPE([$(prefix)])"],
+ [cs_install_exec_prefix=`echo "$exec_prefix" | sed -e 's:///*:/:g'`])
+
+_CS_OUTPUT_INSTALL_DIRS([$1], [prefix],
+ [CS_PREPARE_INSTALLPATH([$cs_install_prefix], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [exec_prefix],
+ [CS_PREPARE_INSTALLPATH([$cs_install_exec_prefix], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [bindir],
+ [CS_PREPARE_INSTALLPATH([$bindir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [sbindir],
+ [CS_PREPARE_INSTALLPATH([$sbindir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [libexecdir],
+ [CS_PREPARE_INSTALLPATH([$libexecdir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [datadir],
+ [CS_PREPARE_INSTALLPATH([$datadir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [sysconfdir],
+ [CS_PREPARE_INSTALLPATH([$sysconfdir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [sharedstatedir],
+ [CS_PREPARE_INSTALLPATH([$sharedstatedir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [localstatedir],
+ [CS_PREPARE_INSTALLPATH([$localstatedir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [libdir],
+ [CS_PREPARE_INSTALLPATH([$libdir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [includedir],
+ [CS_PREPARE_INSTALLPATH([$includedir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [oldincludedir],
+ [CS_PREPARE_INSTALLPATH([$oldincludedir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [infodir],
+ [CS_PREPARE_INSTALLPATH([$infodir], [$2])])
+_CS_OUTPUT_INSTALL_DIRS([$1], [mandir],
+ [CS_PREPARE_INSTALLPATH([$mandir], [$2])])
+])
+
+AC_DEFUN([_CS_OUTPUT_INSTALL_DIRS],
+ [m4_default([$1], [CS_JAMCONFIG_PROPERTY])([$2], [$3])])
+
+
+#-----------------------------------------------------------------------------
+# CS_PREPARE_INSTALLPATH(VALUE, [RAW-BACKSLASHES])
+# Transform variable references of the form ${bla} to $(bla) in VALUE and
+# correctly quotes backslashes. This is needed if you need to emit some of
+# the paths from Autoconf. RAW-BACKSLASHES has the same meaning as in
+# CS_OUTPUT_INSTALLDIRS.
+#-----------------------------------------------------------------------------
+AC_DEFUN([CS_PREPARE_INSTALLPATH],
+[`echo "$1" | sed 's/\${\([[a-zA-Z_][a-zA-Z_]]*\)}/$(\1)/g;m4_ifval([$2],
+ [s/\\/\\\\/g], [s/\\\\/\\\\\\\\/g])'`])
+# jamcache.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# Text cache facility for Jam-style properties. The cache is stored in
+# the shell variable cs_jamfile_text.
+#
+# CS_JAMCONFIG_APPEND(TEXT)
+# Append text to the Jam text cache. This is a cover for
+# CS_TEXT_CACHE_APPEND().
+#
+# CS_JAMCONFIG_PREPEND(TEXT)
+# Prepend text to the Jam text cache. This is a cover for
+# CS_TEXT_CACHE_PREPEND().
+#
+# CS_JAMCONFIG_PROPERTY(KEY, VALUE, [APPEND], [UNCONDITIONAL])
+# Append a line of the form "KEY ?= VALUE" to the Jam text cache. If the
+# APPEND argument is not the empty string, then VALUE is appended to the
+# existing value of KEY using the form "KEY += VALUE". If the
+# UNCONDITIONAL argument is not empty, then the value of KEY is set
+# unconditionally "KEY = VALUE", rather than via "KEY ?= VALUE". APPEND
+# takes precedence over UNCONDITIONAL. Note that if VALUE references
+# other Jam variables, for example $(OBJS), then be sure to protect the
+# value with AS_ESCAPE(). For example:
+# CS_JAMCONFIG_PROPERTY([ALLOBJS], [AS_ESCAPE([$(OBJS) $(LIBOBJS)])])
+#
+# CS_JAMCONFIG_OUTPUT(FILENAME)
+# Instruct config.status to write the Jam text cache to the given
+# filename. This is a cover for CS_TEXT_CACHE_OUTPUT().
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_JAMCONFIG_APPEND],
+ [CS_TEXT_CACHE_APPEND([cs_jamconfig_text], [$1])])
+AC_DEFUN([CS_JAMCONFIG_PREPEND],
+ [CS_TEXT_CACHE_PREPEND([cs_jamconfig_text], [$1])])
+AC_DEFUN([CS_JAMCONFIG_PROPERTY],
+ [CS_JAMCONFIG_APPEND(
+ [$1 m4_ifval([$3], [+=], m4_ifval([$4], [=], [?=])) \"$2\" ;
+])])
+AC_DEFUN([CS_JAMCONFIG_OUTPUT],
+ [CS_TEXT_CACHE_OUTPUT([cs_jamconfig_text], [$1])])
+# makecache.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# Text cache facility for makefile-style properties. The cache is stored in
+# the shell variable cs_makefile_text.
+#
+# CS_MAKEFILE_APPEND(TEXT)
+# Append text to the makefile text cache. This is a cover for
+# CS_TEXT_CACHE_APPEND().
+#
+# CS_MAKEFILE_PREPEND(TEXT)
+# Prepend text to the makefile text cache. This is a cover for
+# CS_TEXT_CACHE_PREPEND().
+#
+# CS_MAKEFILE_PROPERTY(KEY, VALUE, [APPEND])
+# Append a line of the form "KEY = VALUE" to the makefile text cache. If
+# the APPEND argument is not the empty string, then VALUE is appended to
+# the existing value of KEY using the form "KEY += VALUE". Note that if
+# VALUE references other makefile variables, for example $(OBJS), then be
+# sure to protect the value with AS_ESCAPE(). For example:
+# CS_MAKEFILE_PROPERTY([ALLOBJS], [AS_ESCAPE([$(OBJS) $(LIBOBJS)])])
+#
+# CS_MAKEFILE_OUTPUT(FILENAME)
+# Instruct config.status to write the makefile text cache to the given
+# filename. This is a cover for CS_TEXT_CACHE_OUTPUT().
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_MAKEFILE_APPEND],
+ [CS_TEXT_CACHE_APPEND([cs_makefile_text], [$1])])
+AC_DEFUN([CS_MAKEFILE_PREPEND],
+ [CS_TEXT_CACHE_PREPEND([cs_makefile_text], [$1])])
+AC_DEFUN([CS_MAKEFILE_PROPERTY],
+ [CS_MAKEFILE_APPEND([$1 m4_ifval([$3], [+=], [=]) $2
+])])
+AC_DEFUN([CS_MAKEFILE_OUTPUT],[CS_TEXT_CACHE_OUTPUT([cs_makefile_text], [$1])])
+# mkdir.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_CHECK_MKDIR
+# Determine how to create a directory and a directory tree. Sets the
+# shell variable MKDIR to the command which creates a directory, and
+# MKDIRS to the command which creates a directory tree. Invokes
+# AC_SUBST() for MKDIR and MKDIRS.
+#
+# IMPLEMENTATION NOTES
+# We need to know the exact commands, so that we can emit them, thus the
+# AS_MKDIR_P function is not what we want to use here since it does not
+# provide access to the commands (and might not even discover suitable
+# commands). First try "mkdir -p", then try the older "mkdirs".
+# Finally, if the mkdir command failed to recognize -p, then it might
+# have created a directory named "-p", so clean up that bogus directory.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_CHECK_MKDIR],
+ [AC_CACHE_CHECK([how to create a directory], [cs_cv_shell_mkdir],
+ [cs_cv_shell_mkdir='mkdir'])
+ AC_SUBST([MKDIR], [$cs_cv_shell_mkdir])
+
+ AC_CACHE_CHECK([how to create a directory tree], [cs_cv_shell_mkdir_p],
+ [if $cs_cv_shell_mkdir -p . 2>/dev/null; then
+ cs_cv_shell_mkdir_p='mkdir -p'
+ elif mkdirs . 2>/dev/null; then
+ cs_cv_shell_mkdir_p='mkdirs'
+ fi
+ test -d ./-p && rmdir ./-p])
+ AS_VAR_SET_IF([cs_cv_shell_mkdir_p],
+ [AC_SUBST([MKDIRS], [$cs_cv_shell_mkdir_p])],
+ [CS_MSG_ERROR([do not know how to create a directory tree])])])
+
+
+
+#------------------------------------------------------------------------------
+# Replacement for AS_MKDIR_P() from m4sugar/m4sh.m4 which fixes two problems
+# which are present in Autoconf 2.57 and probably all earlier 2.5x versions.
+# This bug, along with a patch, was submitted to the Autoconf GNATS database by
+# Eric Sunshine as #227 on 17-Dec-2002. The bogus "-p" directory bug was fixed
+# for Autoconf 2.58 on 26-Sep-2003. The "mkdirs" optimization was not accepted
+# (since it is unnecessary; it's only an optimization).
+#
+# 1) Removes bogus "-p" directory which the stock AS_MKDIR_P() leaves laying
+# around in the working directory if the mkdir command does not recognize
+# the -p option.
+# 2) Takes advantage of the older "mkdirs" program if it exists and if "mkdir
+# -p" does not work.
+#------------------------------------------------------------------------------
+m4_defun([_AS_MKDIR_P_PREPARE],
+[if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p'
+elif mkdirs . 2>/dev/null; then
+ as_mkdir_p='mkdirs'
+else
+ as_mkdir_p=''
+fi
+test -d ./-p && rmdir ./-p
+])# _AS_MKDIR_P_PREPARE
+
+m4_define([AS_MKDIR_P],
+[AS_REQUIRE([_$0_PREPARE])dnl
+{ if test -n "$as_mkdir_p"; then
+ $as_mkdir_p $1
+ else
+ as_dir=$1
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`AS_DIRNAME("$as_dir")`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || AS_ERROR([cannot create directory $1]); }
+])# AS_MKDIR_P
+#==============================================================================
+# packageinfo.m4
+# Macros for setting general info on the package, such as name and version
+# numbers and propagate them to the generated make and Jam property files.
+#
+# Copyright (C)2003 by Matthias Braun <matze@braunis.de>
+# Copyright (C)2003,2004 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+
+#------------------------------------------------------------------------------
+# CS_PACKAGEINFO([LONGNAME], [COPYRIGHT, [HOMEPAGE])
+# Set additional information for the package. Note that the version
+# number of your application should only contain numbers, because on
+# Windows you can only set numerical values in some of the file
+# properties (such as versioninfo .rc files).
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_PACKAGEINFO],
+ [PACKAGE_LONGNAME="[$1]"
+ PACKAGE_COPYRIGHT="[$2]"
+ PACKAGE_HOMEPAGE="[$3]"
+])
+
+
+#------------------------------------------------------------------------------
+# CS_EMIT_PACKAGEINFO([EMITTER])
+# Emit extended package information using the provided EMITTER. EMITTER
+# is a macro name, such as CS_JAMCONFIG_PROPERTY or CS_MAKEFILE_PROPERTY,
+# which performs the actual task of emitting the KEY/VALUE tuple. If
+# EMITTER is omitted, CS_JAMCONFIG_PROPERTY is used. For backward
+# compatibility, if EMITTER is the literal value "jam", then
+# CS_JAMCONFIG_PROPERTY is used; if it is "make", then
+# CS_MAKEFILE_PROPERTY is used; however use of these literal names is
+# highly discouraged.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_EMIT_PACKAGEINFO],
+ [_CS_EMIT_PACKAGEINFO([$1], [PACKAGE_NAME], [$PACKAGE_NAME])
+ _CS_EMIT_PACKAGEINFO([$1], [PACKAGE_VERSION], [$PACKAGE_VERSION])
+ _CS_EMIT_PACKAGEINFO([$1], [PACKAGE_STRING], [$PACKAGE_STRING])
+ _CS_EMIT_PACKAGEINFO([$1], [PACKAGE_BUGREPORT], [$PACKAGE_BUGREPORT])
+ _CS_EMIT_PACKAGEINFO([$1], [PACKAGE_LONGNAME], [$PACKAGE_LONGNAME])
+ _CS_EMIT_PACKAGEINFO([$1], [PACKAGE_HOMEPAGE], [$PACKAGE_HOMEPAGE])
+ _CS_EMIT_PACKAGEINFO([$1], [PACKAGE_COPYRIGHT], [$PACKAGE_COPYRIGHT])
+ for cs_veritem in m4_translit(AC_PACKAGE_VERSION, [.], [ ]); do
+ _CS_EMIT_PACKAGEINFO([$1], [PACKAGE_VERSION_LIST], [$cs_veritem], [+])
+ done
+ ])
+
+AC_DEFUN([_CS_EMIT_PACKAGEINFO],
+ [m4_case([$1],
+ [make], [CS_MAKEFILE_PROPERTY([$2], [$3], [$4])],
+ [jam], [CS_JAMCONFIG_PROPERTY([$2], [$3], [$4])],
+ [], [CS_JAMCONFIG_PROPERTY([$2], [$3], [$4])],
+ [$1([$2], [$3], [$4])])])
+# path.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2004 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_PATH_NORMALIZE(STRING)
+# Normalize a pathname at run-time by transliterating Windows/DOS
+# backslashes to forward slashes. Also collapses whitespace.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_PATH_NORMALIZE],
+[`echo "x$1" | tr '\\\\' '/' | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'`])
+
+
+#------------------------------------------------------------------------------
+# CS_RUN_PATH_NORMALIZE(COMMAND)
+# Normalize the pathname emitted by COMMAND by transliterating
+# Windows/DOS backslashes to forward slashes. Also collapses whitespace.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_RUN_PATH_NORMALIZE],
+[`AC_RUN_LOG([$1]) | tr '\\\\' '/' | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'`])
+###############################################################################
+# progver.m4
+# Written by Norman Kramer <norman@users.sourceforge.net>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+###############################################################################
+#
+# From the input pattern we create regular expressions we send through sed
+# to extract the version information from the standard input to sed.
+# Then we extract from the resulting version string subparts.
+# The same happens with the supplied version string. It too is split into its
+# subparts according to the pattern.
+# Then the subparts from the gathered version string and the supplied one are
+# compared.
+#
+# How does the pattern look like ?
+# It is a sequence of 9s and _s and separators.
+# 9 denotes a non empty sequence of digits.
+# _ denotes a non empty sequence of characters from the class [a-zA-Z].
+# | everything behind is optional
+# Everything else is treated as a separator.
+# Consecutive 9s and _s are compressed to contain only one of each type.
+# For instance "99_.9.__abc9_" will become "9_.9._abc9_".
+#
+# How we find the parts we compare ?
+# From this transformed string we yield the parts we will later compare.
+# We break up the string as follows:
+# Any sequence of separators represent one breakup. Additional breakups are
+# placed behind every 9 and _ .
+# So the example from above will give:
+#
+# "99_.9.__abc9_" ===compress==> "9_.9._abc9_" ===breakup==> "9" "_" "9" "_" "9" "_"
+#
+# How we create the regular expressions ?
+# We take the compressed pattern and quote every separator.
+# The we replace the 9s with [0-9][0-9]*
+# and the _s with [a-zA-Z][a-zA-Z]* .
+# The above example will become:
+#
+# "99_.9.__abc9_" ===compress==> "9_.9._abc9_" ===rexify==>
+# [0-9][0-9]*[a-zA-Z][a-zA-Z]*\.[0-9][0-9]*\.[a-zA-Z][a-zA-Z]*\a\b\c[0-9][0-9]*[a-zA-Z][a-zA-Z]*
+#
+# Voila.
+#
+# To yield the subparts from the string we additionally enclose the
+# 9s and _s with \( and \).
+#
+###############################################################################
+
+# ****************************************************************
+# ** helper definitions **
+# ****************************************************************
+m4_define([CS_VCHK_RUNTH], [m4_pushdef([i], [$1])m4_if($1,0,,[CS_VCHK_RUNTH(m4_decr($1), [$2])][$2])m4_popdef([i])])
+m4_define([CS_VCHK_PREFIX], [])
+m4_define([CS_VCHK_SUFFIX], [])
+m4_define([CS_VCHK_GROUPPREFIX], [\(])
+m4_define([CS_VCHK_GROUPSUFFIX], [\)])
+m4_define([CS_VCHK_CHAR], [[[[a-zA-Z]]]])
+m4_define([CS_VCHK_DIGIT], [[[0-9]]])
+m4_define([CS_VCHK_SEQUENCE], [CS_VCHK_PREFIX[]CS_VCHK_SINGLE[]CS_VCHK_SINGLE[]*CS_VCHK_SUFFIX[]])
+m4_define([CS_VCHK_OPTSEQUENCE], [CS_VCHK_PREFIX[]CS_VCHK_SINGLE[]*CS_VCHK_SUFFIX[]])
+m4_define([CS_VCHK_REXSEQ], [m4_bpatsubst($1, [$2], [[]CS_VCHK_SEQUENCE[]])])
+m4_define([CS_VCHK_GROUPINGON], [m4_pushdef([CS_VCHK_PREFIX], [CS_VCHK_GROUPPREFIX])m4_pushdef([CS_VCHK_SUFFIX], [CS_VCHK_GROUPSUFFIX])])
+m4_define([CS_VCHK_GROUPINGOFF], [m4_popdef([CS_VCHK_SUFFIX])m4_popdef([CS_VCHK_PREFIX])])
+m4_define([CS_VCHK_OPTON], [m4_pushdef([CS_VCHK_SEQUENCE], [CS_VCHK_OPTSEQUENCE])])
+m4_define([CS_VCHK_OPTOFF], [m4_popdef([CS_VCHK_SEQUENCE])])
+m4_define([CS_VCHK_RMOPT], [CS_VCHK_RMCHAR([$1], m4_index([$1], [|]))])
+m4_define([CS_VCHK_RMCHAR], [m4_if($2,-1,[$1],m4_substr([$1], 0, $2)[]m4_substr([$1], m4_incr($2)))])
+m4_define([CS_VCHK_RMALL], [m4_translit([$1], [|], [])])
+m4_define([CS_VCHK_CUTOFF], [m4_if(m4_index($1,[|]),-1, [$1], [m4_substr($1, 0, m4_index($1,[|]))])])
+m4_define([CS_VCHK_CYCLEOPT], [
+m4_if($2,-1,, [m4_pushdef([i], CS_VCHK_CUTOFF([$1])) m4_pushdef([j], CS_VCHK_DUMMY_TAIL([$1])) CS_VCHK_CYCLEOPT( CS_VCHK_RMOPT([$1]), m4_index($1, [|]), [$3])$3 m4_popdef([i]) m4_popdef([j])])
+])
+m4_define([CS_VCHK_TAIL], [m4_if(m4_index($1,[|]),-1, [], [m4_substr($1, m4_incr(m4_index($1,[|])))])])
+m4_define([CS_VCHK_DUMMY_COMPRESS], [m4_bpatsubst(m4_bpatsubst([$1], [__*], [A]), [99*], [0])])
+m4_define([CS_VCHK_DUMMY_TAIL], [CS_VCHK_DUMMY_COMPRESS(m4_translit(CS_VCHK_TAIL([$1]), [|], []))])
+
+# ****************************************************************
+# ** FlagsOn / FlagsOff **
+# ****************************************************************
+m4_define([CS_VCHK_FLAGSON],
+[m4_if($#, 0, [],
+ $1, [], [],
+ [$1], [group], [CS_VCHK_GROUPINGON[]],
+ [$1], [opt], [CS_VCHK_OPTON[]])dnl
+m4_if($#, 0, [], $1, [], [], [CS_VCHK_FLAGSON(m4_shift($@))])])
+
+m4_define([CS_VCHK_FLAGSOFF],
+[m4_if($#, 0, [],
+ $1, [], [],
+ $1, [group], [CS_VCHK_GROUPINGOFF[]],
+ [$1], [opt], [CS_VCHK_OPTOFF[]])dnl
+m4_if($#, 0, [], $1, [], [], [CS_VCHK_FLAGSOFF(m4_shift($@))])])
+
+# ****************************************************************
+# ** rexify / sedify **
+# ****************************************************************
+m4_define([CS_VCHK_REXIFY],
+[m4_pushdef([CS_VCHK_SINGLE], [$1])dnl
+CS_VCHK_FLAGSON(m4_shift(m4_shift(m4_shift($@))))dnl
+CS_VCHK_REXSEQ([$3], [$2])dnl
+CS_VCHK_FLAGSOFF(m4_shift(m4_shift(m4_shift($@))))dnl
+m4_popdef([CS_VCHK_SINGLE])])
+
+m4_define([CS_VCHK_QUOTESEP], [m4_bpatsubst($1, [[^9_]], [\\\&])])
+
+m4_define([CS_VCHK_REXCHAR], [CS_VCHK_REXIFY([CS_VCHK_CHAR], [__*], $@)])
+m4_define([CS_VCHK_REXDIGIT], [CS_VCHK_REXIFY([CS_VCHK_DIGIT], [99*], $@)])
+m4_define([CS_VCHK_SEDIFY], [CS_VCHK_REXDIGIT([CS_VCHK_REXCHAR([CS_VCHK_QUOTESEP([$1])], m4_shift($@))], m4_shift($@))])
+m4_define([CS_VCHK_SEDEXPRALL], [/CS_VCHK_SEDIFY([$1])/!d;s/.*\(CS_VCHK_SEDIFY([$1])\).*/\1/;q])
+m4_define([CS_VCHK_SEDEXPRNTH], [/CS_VCHK_SEDIFY([$1])/!d;s/.*CS_VCHK_SEDIFY([$1],[group]).*/\$2/])
+
+# ****************************************************************
+# ** Pattern splitting **
+# ****************************************************************
+m4_define([CS_VCHK_SPLITSEP], [CS_VCHK_REXIFY([s], [[^9_][^9_]*], $@)])
+m4_define([CS_VCHK_SPLITDIGIT], [CS_VCHK_REXIFY([d], [99*], $@)])
+m4_define([CS_VCHK_SPLITCHAR], [CS_VCHK_REXIFY([c], [__*], $@)])
+
+# ****************************************************************
+# ** return a list of 's' 'd' 'c' 'e' chars denoting the kind **
+# ** pattern parts: separator, digit, char, end **
+# ****************************************************************
+m4_define([CS_VCHK_PATTERNLIST], [m4_pushdef([CS_VCHK_SEQUENCE], [CS_VCHK_SINGLE ])dnl
+m4_translit(CS_VCHK_SPLITDIGIT([CS_VCHK_SPLITCHAR([CS_VCHK_SPLITSEP([$1])])]), [ ], m4_if([$2],[],[ ],[$2]))e[]dnl
+m4_popdef([CS_VCHK_SEQUENCE])])
+
+# ****************************************************************
+# ** Build the shell commands we emit to the configure script. **
+# ****************************************************************
+m4_define([CS_VCHK_PATCOUNT], [m4_len(m4_bpatsubst(CS_VCHK_PATTERNLIST([$1]), [[^dc]]))])
+
+# ****************************************************************************************
+# ** CS_VCHK_EXTRACTVERSION(EXTRACT_CALL, MIN_VERSION, PATTERN, PRGPREFIX, COMPARISION) **
+# ****************************************************************************************
+m4_define([CS_VCHK_EXTRACTVERSION],
+[cs_prog_$4_is_version=
+cs_prog_$4_min_version=
+cs_prog_$4_is_suffix=
+cs_prog_$4_min_suffix=
+cs_prog_$4_is_suffix_done=
+cs_prog_$4_min_suffix_done=
+CS_VCHK_CYCLEOPT([$3], [],
+[test -z $cs_prog_$4_is_version && cs_prog_$4_is_version=`$1 | sed 'CS_VCHK_SEDEXPRALL([i])'`
+test -n "$cs_prog_$4_is_version" && test -z $cs_prog_$4_is_suffix_done && { cs_prog_$4_is_suffix_done=yes ; cs_prog_$4_is_suffix=j ; }
+])
+CS_VCHK_CYCLEOPT([$3], ,
+[test -z $cs_prog_$4_min_version && cs_prog_$4_min_version=`echo $2 | sed 'CS_VCHK_SEDEXPRALL([i])'`
+test -n "$cs_prog_$4_min_version" && test -z $cs_prog_$4_min_suffix_done && { cs_prog_$4_min_suffix_done=yes ; cs_prog_$4_min_suffix=j ; }
+])
+CS_VCHK_RUNTH([CS_VCHK_PATCOUNT([$3])],
+ [cs_prog_$4_is_ver_[]i=`echo ${cs_prog_$4_is_version}${cs_prog_$4_is_suffix} | sed 'CS_VCHK_SEDEXPRNTH([CS_VCHK_RMALL([$3])], [i])'`
+])
+CS_VCHK_RUNTH([CS_VCHK_PATCOUNT([$3])],
+ [cs_prog_$4_min_ver_[]i=`echo $cs_prog_$4_min_version${cs_prog_$4_min_suffix} | sed 'CS_VCHK_SEDEXPRNTH([CS_VCHK_RMALL([$3])], [i])'`
+])
+cs_cv_prog_$4_version_ok=''
+CS_VCHK_RUNTH([CS_VCHK_PATCOUNT([$3])],
+[test -z "$cs_cv_prog_$4_version_ok" && { expr "$cs_prog_$4_is_ver_[]i" "$5" "$cs_prog_$4_min_ver_[]i" >/dev/null || cs_cv_prog_$4_version_ok=no ; }
+test -z "$cs_cv_prog_$4_version_ok" && { expr "$cs_prog_$4_min_ver_[]i" "$5" "$cs_prog_$4_is_ver_[]i" >/dev/null || cs_cv_prog_$4_version_ok=yes ; }
+])
+AS_IF([test -z "$cs_cv_prog_$4_version_ok"], [cs_cv_prog_$4_version_ok=yes])
+cs_cv_prog_$4_version_ok_annotated="$cs_cv_prog_$4_version_ok"
+AS_IF([test -n "$cs_prog_$4_is_version"],
+ [cs_cv_prog_$4_version_ok_annotated="$cs_cv_prog_$4_version_ok_annotated (version $cs_prog_$4_is_version)"])
+])
+
+##############################################################################
+# CS_CHECK_PROG_VERSION(PROG, EXTRACT_CALL, VERSION, PATTERN,
+# [ACTION-IF-OKAY], [ACTION-IF-NOT-OKAY], [CMP])
+# Check the version of a program PROG.
+# Version information is emitted by EXTRACT_CALL (for instance "bison -V").
+# The discovered program version is compared against VERSION.
+# The pattern of the version string matches PATTERN
+# The extracted version and the supplied version are compared with the CMP
+# operator. i.e. EXTRACTED_VERSION CMP SUPPLIED_VERSION
+# CMP defaults to >= if not specified.
+# ACTION-IF-OKAY is invoked if comparision yields true, otherwise
+# ACTION-IF-NOT-OKAY is invoked.
+#
+# PATTERN literals: 9 .. marks a non empty sequence of digits
+# _ .. marks a non empty sequence of characters from [a-zA-Z]
+# | .. everything behind is optional
+# .. everything else is taken as separator - it is better
+# to not try stuff like space, slash or comma.
+#
+# The test results in cs_cv_prog_PROG_version_ok being either yes or no.
+##############################################################################
+AC_DEFUN([CS_CHECK_PROG_VERSION],
+[AC_CACHE_CHECK([if $1 version m4_default([$7],[>=]) $3],
+ [AS_TR_SH([cs_cv_prog_$1_version_ok_annotated])],
+ [CS_VCHK_EXTRACTVERSION([$2], [$3], [$4], AS_TR_SH([$1]),
+ m4_default([$7],[>=]))])
+AS_IF([test "$AS_TR_SH([cs_cv_prog_$1_version_ok])" = yes], [$5], [$6])])
+# qualify.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_SYMBOL_QUALIFIER(MESSAGE, CACHE-VAR, QUALIFIERS, [SYMBOL], [LANG],
+# [ACTION-IF-ACCEPTED], [ACTION-IF-NOT-ACCEPTED])
+# Test if a symbol can be qualified by one of the elements of the
+# comma-separated list of QUALIFIERS. Examples of qualifiers include
+# __attribute__((deprecated)), __declspec(dllimport), etc. MESSAGE is the
+# "checking" message. CACHE-VAR is the variable which receives the
+# qualifier which succeeded, or the the literal "no" if none were
+# accepted. SYMBOL is the symbol to which the qualifier should be
+# applied. If omitted, then SYMBOL defaults to "void f();". LANG is the
+# language of the test, typically "C" or "C++". It defaults to "C" if
+# omitted. ACTION-IF-ACCEPTED is invoked after CACHE-VAR is set if one of
+# the qualifiers is accepted, else ACTION-IF-NOT-ACCEPTED is invoked.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_SYMBOL_QUALIFIER],
+ [AC_CACHE_CHECK([$1], [$2],
+ [$2='no'
+ m4_foreach([cs_symbol_qualifier], [$3],
+ [AS_IF([test "$$2" = no],
+ [CS_BUILD_IFELSE(
+ [AC_LANG_PROGRAM(
+ [cs_symbol_qualifier m4_default([$4],[void f()]);],
+ [])],
+ [], [$5], [$2='cs_symbol_qualifier'], [$2='no'])])])])
+ AS_IF([test $$2 != no], [$6], [$7])])
+# split.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_SPLIT(LINE, [OUTPUT-VARIABLES], [DELIMITER], [FILLER])
+# Split LINE into individual tokens. Tokens are delimited by DELIMITER,
+# which is the space character if omitted. OUTPUT-VARIABLES is a
+# comma-delimited list of shell variables which should receive the
+# extracted tokens. If there are too few tokens to fill the output
+# variables, then the excess variables will be assigned the empty string.
+# If there are too few output variables, then the excess tokens will be
+# ignored. If OUTPUT-VARIABLES is omitted, then the split tokens will be
+# assigned to the shell meta-variables $1, $2, $3, etc. When
+# OUTPUT-VARIABLES is omitted, FILLER is assigned to meta-variables in
+# cases where DELIMITER delimits a zero-length token. FILLER defaults
+# to "filler". For example, if DELIMITER is "+" and OUTPUT-VARIABLES is
+# omitted, given the line "one++three", $1 will be "one", $2 will be
+# "filler", and $3 will be "three".
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_SPLIT],
+ [m4_define([cs_split_filler], m4_default([$4],[filler]))
+ set cs_split_filler `echo "$1" | awk 'BEGIN { FS="m4_default([$3],[ ])" }
+ { for (i=1; i <= NF; ++i)
+ { if ($i == "") print "cs_split_filler"; else print $i } }'`
+ shift
+ m4_map([_CS_SPLIT], [$2])])
+
+AC_DEFUN([_CS_SPLIT],
+ [AS_IF([test $[@%:@] -eq 0], [$1=''],
+ [AS_IF([test "$[1]" = cs_split_filler], [$1=''], [$1=$[1]])
+ shift])])
+# textcache.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# Text cache facility. These macros provide a way to incrementally store
+# arbitrary text in a shell variable, and to write the saved text to a file.
+#
+# CS_TEXT_CACHE_APPEND(VARIABLE, TEXT)
+# Append text to the contents of the named shell variable. If the text
+# contains references to shell variables (such as $foo), then those
+# references will be expanded. If expansion is not desired, then protect
+# the text with AS_ESCAPE().
+#
+# CS_TEXT_CACHE_PREPEND(VARIABLE, TEXT)
+# Prepend text to the contents of the named shell variable. If the text
+# contains references to shell variables (such as $foo), then those
+# references will be expanded. If expansion is not desired, then protect
+# the text with AS_ESCAPE().
+#
+# CS_TEXT_CACHE_OUTPUT(VARIABLE, FILENAME)
+# Instruct config.status to write the contents of the named shell
+# variable to the given filename. If the file resides in a directory,
+# the directory will be created, if necessary. If the output file
+# already exists, and if the cached text is identical to the contents of
+# the existing file, then the existing file is left alone, thus its time
+# stamp remains unmolested. This heuristic may help to minimize rebuilds
+# when the file is listed as a dependency in a makefile.
+#
+# *NOTE*
+# There is a bug in Autoconf 2.57 and probably all earlier 2.5x versions
+# which results in errors if AC_CONFIG_COMMANDS is invoked for a `tag'
+# which represents a file in a directory which does not yet exist.
+# Unfortunately, even invoking AS_MKDIR_P in the `cmd' portion of
+# AC_CONFIG_COMMANDS does not solve the problem because the generated
+# configure script attempts to access information about the directory
+# before AS_MKDIR_P has a chance to create it. This forces us to invoke
+# AS_MKDIR_P in the third argument to AC_CONFIG_COMMANDS (the
+# `init-cmds') rather than the second (the `cmds'). This is undesirable
+# because it means that the directory will be created anytime
+# config.status is invoked (even for a simple --help), rather than being
+# created only when requested to output the text cache. This bug was
+# submitted to the Autoconf GNATS database by Eric Sunshine as #228 on
+# 27-Dec-2002. It was fixed for Autoconf 2.58 on 26-Sep-2003. The
+# official fix makes the assumption that `tag' always represents a file
+# (as opposed to some generic target), and creates the file's directory
+# is not present.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_TEXT_CACHE_APPEND], [$1="${$1}$2"])
+AC_DEFUN([CS_TEXT_CACHE_PREPEND], [$1="$2${$1}"])
+AC_DEFUN([CS_TEXT_CACHE_OUTPUT],
+ [AC_CONFIG_COMMANDS([$2],
+ [echo $ECHO_N "$$1$ECHO_C" > $tmp/tcache
+ AS_IF([diff $2 $tmp/tcache >/dev/null 2>&1],
+ [AC_MSG_NOTICE([$2 is unchanged])],
+ [rm -f $2
+ cp $tmp/tcache $2])
+ rm -f $tmp/tcache],
+ [$1='$$1'
+ cs_dir=`AS_DIRNAME([$2])`
+ AS_ESCAPE(AS_MKDIR_P([$cs_dir]), [$`\])])])
+# trim.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2003 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_TRIM(STRING)
+# Strip leading and trailing spaces from STRING and collapse internal
+# runs of multiple spaces to a single space.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_TRIM], [`echo x$1 | sed 's/^x//;s/ */ /g;s/^ //;s/ $//'`])
+# warnings.m4 -*- Autoconf -*-
+#==============================================================================
+# Copyright (C)2005 by Eric Sunshine <sunshine@sunshineco.com>
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Library General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with this library; if not, write to the Free Software Foundation,
+# Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+#==============================================================================
+AC_PREREQ([2.56])
+
+#------------------------------------------------------------------------------
+# CS_COMPILER_WARNINGS([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# Check how to enable compilation warnings. If LANGUAGE is not provided,
+# then `C' is assumed (other options include `C++'). If CACHE-VAR is not
+# provided, then it defaults to the name
+# "cs_cv_prog_compiler_enable_warnings". If an option for enabling
+# warnings (such as `-Wall') is discovered, then it is assigned to
+# CACHE-VAR and ACTION-IF-FOUND is invoked; otherwise the empty string is
+# assigned to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked.
+#
+# IMPLEMENTATION NOTES
+#
+# On some platforms, it is more appropriate to use -Wmost rather than
+# -Wall even if the compiler understands both, thus we attempt -Wmost
+# before -Wall.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_COMPILER_WARNINGS],
+ [CS_CHECK_BUILD_FLAGS(
+ [how to enable m4_default([$1],[C]) compilation warnings],
+ [m4_default([$2],[cs_cv_prog_compiler_enable_warnings])],
+ [CS_CREATE_TUPLE([-Wmost]) CS_CREATE_TUPLE([-Wall])],
+ [$1], [$3], [$4])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_COMPILER_ERRORS([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# Check how to promote compilation diganostics from warning to error
+# status. If LANGUAGE is not provided, then `C' is assumed (other options
+# include `C++'). If CACHE-VAR is not provided, then it defaults to the
+# name "cs_cv_prog_compiler_enable_errors". If an option for performing
+# this promotion (such as `-Werror') is discovered, then it is assigned
+# to CACHE-VAR and ACTION-IF-FOUND is invoked; otherwise the empty string
+# is assigned to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_COMPILER_ERRORS],
+ [CS_CHECK_BUILD_FLAGS(
+ [how to treat m4_default([$1],[C]) warnings as errors],
+ [m4_default([$2],[cs_cv_prog_compiler_enable_errors])],
+ [CS_CREATE_TUPLE([-Werror])], [$1], [$3], [$4])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_COMPILER_IGNORE_UNUSED([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# Check how to instruct compiler to ignore unused variables and
+# arguments. This option may be useful for code generated by tools, such
+# as Swig, Bison, and Flex, over which the client has no control, yet
+# wishes to compile without excessive diagnostic spew. If LANGUAGE is
+# not provided, then `C' is assumed (other options include `C++'). If
+# CACHE-VAR is not provided, then it defaults to the name
+# "cs_cv_prog_compiler_ignore_unused". If an option (such as
+# `-Wno-unused') is discovered, then it is assigned to CACHE-VAR and
+# ACTION-IF-FOUND is invoked; otherwise the empty string is assigned to
+# CACHE-VAR and ACTION-IF-NOT-FOUND is invoked.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_COMPILER_IGNORE_UNUSED],
+ [CS_CHECK_BUILD_FLAGS(
+ [how to suppress m4_default([$1],[C]) unused variable warnings],
+ [m4_default([$2],[cs_cv_prog_compiler_ignore_unused])],
+ [CS_CREATE_TUPLE([-Wno-unused])], [$1], [$3], [$4])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_COMPILER_IGNORE_UNINITIALIZED([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# Check how to instruct compiler to ignore uninitialized variables. This
+# option may be useful for code generated by tools, such as Swig, Bison,
+# and Flex, over which the client has no control, yet wishes to compile
+# without excessive diagnostic spew. If LANGUAGE is not provided, then
+# `C' is assumed (other options include `C++'). If CACHE-VAR is not
+# provided, then it defaults to the name
+# "cs_cv_prog_compiler_ignore_uninitialized". If an option (such as
+# `-Wno-uninitialized') is discovered, then it is assigned to CACHE-VAR
+# and ACTION-IF-FOUND is invoked; otherwise the empty string is assigned
+# to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_COMPILER_IGNORE_UNINITIALIZED],
+ [CS_CHECK_BUILD_FLAGS(
+ [how to suppress m4_default([$1],[C]) uninitialized warnings],
+ [m4_default([$2],
+ [cs_cv_prog_compiler_ignore_uninitialized_variables])],
+ [CS_CREATE_TUPLE([-Wno-uninitialized])], [$1], [$3], [$4])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_COMPILER_IGNORE_PRAGMAS([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# Check how to instruct compiler to ignore unrecognized #pragma
+# directives. This option may be useful for code which contains
+# unprotected #pragmas which are not understood by all compilers. If
+# LANGUAGE is not provided, then `C' is assumed (other options include
+# `C++'). If CACHE-VAR is not provided, then it defaults to the name
+# "cs_cv_prog_compiler_ignore_unknown_pragmas". If an option (such as
+# `-Wno-unknown-pragmas') is discovered, then it is assigned to CACHE-VAR
+# and ACTION-IF-FOUND is invoked; otherwise the empty string is assigned
+# to CACHE-VAR and ACTION-IF-NOT-FOUND is invoked.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_COMPILER_IGNORE_PRAGMAS],
+ [CS_CHECK_BUILD_FLAGS(
+ [how to suppress m4_default([$1],[C]) unknown [#pragma] warnings],
+ [m4_default([$2],[cs_cv_prog_compiler_ignore_unknown_pragmas])],
+ [CS_CREATE_TUPLE([-Wno-unknown-pragmas])], [$1], [$3], [$4])])
+
+
+
+#------------------------------------------------------------------------------
+# CS_COMPILER_IGNORE_LONG_DOUBLE([LANGUAGE], [CACHE-VAR], [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+# Check how to instruct compiler to suppress warnings about `long double'
+# usage. This option may be useful for code generated by tools, such as
+# Swig, Bison, and Flex, over which the client has no control, yet wishes
+# to compile without excessive diagnostic spew. If LANGUAGE is not
+# provided, then `C' is assumed (other options include `C++'). If
+# CACHE-VAR is not provided, then it defaults to the name
+# "cs_cv_prog_compiler_ignore_long_double". If an option (such as
+# `-Wno-long-double') is discovered, then it is assigned to CACHE-VAR and
+# ACTION-IF-FOUND is invoked; otherwise the empty string is assigned to
+# CACHE-VAR and ACTION-IF-NOT-FOUND is invoked.
+#------------------------------------------------------------------------------
+AC_DEFUN([CS_COMPILER_IGNORE_LONG_DOUBLE],
+ [CS_CHECK_BUILD_FLAGS(
+ [how to suppress m4_default([$1],[C]) `long double' warnings],
+ [m4_default([$2],[cs_cv_prog_compiler_ignore_long_double])],
+ [CS_CREATE_TUPLE([-Wno-long-double])], [$1], [$3], [$4])])
diff --git a/tests/bullet/aclocal.m4 b/tests/bullet/aclocal.m4
new file mode 100644
index 00000000..fdc342b9
--- /dev/null
+++ b/tests/bullet/aclocal.m4
@@ -0,0 +1,8795 @@
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_if(m4_PACKAGE_VERSION, [2.61],,
+[m4_fatal([this file was generated for autoconf 2.61.
+You have another version of autoconf. If you want to use that,
+you should regenerate the build system entirely.], [63])])
+
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_quote(m4_if([$2], [],
+ m4_quote(lt_decl_tag_varnames),
+ m4_quote(m4_shift($@)))),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
+m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM -f \"$cfgfile\"; exit 1" 1 2 15
+ $RM -f "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ if test "$GCC" = "yes"; then
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM -r conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM -r conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM -r conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext ${libname}${release}${versuffix}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -r -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -r -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $RM -r conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM -r conftest*
+ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${F77-"f77"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${FC-"f95"}
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+ ;;
+ esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
+
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+m4_define([lt_combine],
+[m4_if([$2], [], [],
+ [m4_if([$4], [], [],
+ [lt_join(m4_quote(m4_default([$1], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2],
+ [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]),
+ [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl
+])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
+
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 2976 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.4])
+m4_define([LT_PACKAGE_REVISION], [1.2976])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.4'
+macro_revision='1.2976'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+
+# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.10], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.10])dnl
+_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 8
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 3
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 12
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.60])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $1 | $1:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([acinclude.m4])
diff --git a/tests/bullet/autogen.sh b/tests/bullet/autogen.sh
new file mode 100755
index 00000000..35623fac
--- /dev/null
+++ b/tests/bullet/autogen.sh
@@ -0,0 +1,61 @@
+#! /bin/sh
+
+if [ "$USER" = "root" ]; then
+ echo "*** You cannot do this as "$USER" please use a normal user account."
+ exit 1
+fi
+if test ! -f configure.ac ; then
+ echo "*** Please invoke this script from directory containing configure.ac."
+ exit 1
+fi
+
+echo "running aclocal"
+aclocal
+rc=$?
+
+if test $rc -eq 0; then
+ echo "running libtool"
+ libtoolize --force --automake --copy
+ rc=$?
+else
+ echo "An error occured, autogen.sh stopping."
+ exit $rc
+fi
+
+if test $rc -eq 0; then
+ echo "libtool worked."
+else
+ echo "libtool not found. trying glibtool."
+ glibtoolize --force --automake --copy
+ rc=$?
+fi
+
+if test $rc -eq 0; then
+ echo "running automake"
+ automake --add-missing --copy
+ rc=$?
+else
+ echo "An error occured, autogen.sh stopping."
+ exit $rc
+fi
+
+if test $rc -eq 0; then
+ echo "running autoheader"
+ autoheader
+ rc=$?
+else
+ echo "An error occured, autogen.sh stopping."
+ exit $rc
+fi
+
+if test $rc -eq 0; then
+ echo "running autoconf"
+ autoconf
+ rc=$?
+else
+ echo "An error occured, autogen.sh stopping."
+ exit $rc
+fi
+
+echo "autogen.sh complete"
+exit $rc
diff --git a/tests/bullet/bullet.pc.cmake b/tests/bullet/bullet.pc.cmake
new file mode 100644
index 00000000..c5649d58
--- /dev/null
+++ b/tests/bullet/bullet.pc.cmake
@@ -0,0 +1,6 @@
+Name: bullet
+Description: Bullet Continuous Collision Detection and Physics Library
+Requires:
+Version: @BULLET_VERSION@
+Libs: -L@LIB_DESTINATION@ -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath
+Cflags: @BULLET_DOUBLE_DEF@ -I@INCLUDE_INSTALL_DIR@
diff --git a/tests/bullet/bullet.pc.in b/tests/bullet/bullet.pc.in
new file mode 100644
index 00000000..ffcd4f36
--- /dev/null
+++ b/tests/bullet/bullet.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: bullet
+Description: Bullet Continuous Collision Detection and Physics Library
+Requires:
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lBulletSoftBody -lBulletDynamics -lBulletCollision -lLinearMath
+Cflags: -I${includedir}/bullet
diff --git a/tests/bullet/bulletTest.ll b/tests/bullet/bulletTest.ll
deleted file mode 100644
index bbf096ca..00000000
--- a/tests/bullet/bulletTest.ll
+++ /dev/null
@@ -1,192958 +0,0 @@
-; ModuleID = 'bulletTest.bc'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
-target triple = "i386-pc-linux-gnu"
-
-%0 = type { i32, void ()* }
-%struct..0AabbCalculationCallback = type { %struct.btActionInterface, %struct.btQuadWord, %struct.btQuadWord }
-%struct..0BridgeTriangleRaycastCallback = type { %struct.btTriangleRaycastCallback, %"struct.btCollisionWorld::RayResultCallback"*, %struct.btCollisionObject*, %struct.btTriangleMeshShape*, %struct.btTransform }
-%struct..0CenterCallback = type { %struct.btActionInterface, i8, %struct.btQuadWord, %struct.btQuadWord, float }
-%struct..0CleanPairCallback = type { %struct.btActionInterface, %struct.btBroadphaseProxy*, %struct..0btMultiSapOverlapFilterCallback*, %struct.btActionInterface* }
-%struct..0FilteredCallback = type { %struct.btActionInterface, %struct.btActionInterface*, %struct.btQuadWord, %struct.btQuadWord }
-%struct..0InplaceSolverIslandCallback = type { %struct.btActionInterface, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btTypedConstraint**, i32, %struct.btActionInterface*, %struct.btStackAlloc*, %struct.btActionInterface*, %"struct.btAlignedObjectArray<btCollisionObject*>", %"struct.btAlignedObjectArray<btPersistentManifold*>", %"struct.btAlignedObjectArray<btTypedConstraint*>" }
-%struct..0LocalTriangleSphereCastCallback = type { %struct.btActionInterface, %struct.btTransform, %struct.btTransform, %struct.btTransform, float, float }
-%struct..0MyNodeOverlapCallback = type { %struct.btActionInterface, %struct.btStridingMeshInterface*, %struct.btActionInterface* }
-%struct..0NodeTriangleCallback = type { %struct.btActionInterface, %struct.NodeArray* }
-%struct..0btIntermediateResult = type { %struct.btActionInterface, %struct.btQuadWord, %struct.btQuadWord, float, i8 }
-%struct..0btMultiSapOverlapFilterCallback = type { %struct.btActionInterface }
-%struct..1BridgeTriangleRaycastCallback = type { %struct.btTriangleRaycastCallback, %"struct.btCollisionWorld::RayResultCallback"*, %struct.btCollisionObject*, %struct.btConcaveShape*, %struct.btTransform }
-%struct..1InertiaCallback = type { %struct.btActionInterface, %struct.btMatrix3x3, %struct.btQuadWord }
-%struct..1MyNodeOverlapCallback = type { %struct.btActionInterface, %struct.btMultiSapBroadphase*, %"struct.btMultiSapBroadphase::btMultiSapProxy"*, %struct.btActionInterface* }
-%struct..1QuantizedNodeTriangleCallback = type { %struct.btActionInterface, %struct.QuantizedNodeArray*, %struct.btQuantizedBvh* }
-%struct..1RemovePairCallback = type { %struct.btActionInterface, %struct.btBroadphaseProxy* }
-%struct..2LocalInfoAdder2 = type { %"struct.btCollisionWorld::RayResultCallback", %"struct.btCollisionWorld::RayResultCallback"*, i32 }
-%struct..2MyNodeOverlapCallback = type { %struct.btActionInterface, %struct.btStridingMeshInterface*, %struct.btActionInterface*, [3 x %struct.btQuadWord] }
-%struct..3BridgeTriangleConvexcastCallback = type { %struct.btTriangleConvexcastCallback, %"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btCollisionObject*, %struct.btTriangleMeshShape* }
-%struct..4BridgeTriangleConvexcastCallback = type { %struct.btTriangleConvexcastCallback, %"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btCollisionObject*, %struct.btConcaveShape* }
-%struct..5LocalInfoAdder = type { %"struct.btCollisionWorld::ConvexResultCallback", %"struct.btCollisionWorld::ConvexResultCallback"*, i32 }
-%struct.BT_BOX_BOX_TRANSFORM_CACHE = type { %struct.btQuadWord, %struct.btMatrix3x3, %struct.btMatrix3x3 }
-%struct.BT_QUANTIZED_BVH_NODE = type { [3 x i16], [3 x i16], i32 }
-%struct.BroadphaseAabbTester = type { %struct.btActionInterface, %struct.btActionInterface* }
-%struct.BroadphaseRayTester = type { %struct.btActionInterface, %struct.btBroadphaseRayCallback* }
-%struct.BvhSubtreeInfoArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btBvhSubtreeInfo*, i8 }
-%struct.CONTACT_KEY_TOKEN = type { i32, i32 }
-%struct.CONTACT_KEY_TOKEN_COMP = type <{ i8 }>
-%struct.CProfileIterator = type { %struct.CProfileNode*, %struct.CProfileNode* }
-%struct.CProfileNode = type { i8*, i32, float, i32, i32, %struct.CProfileNode*, %struct.CProfileNode*, %struct.CProfileNode* }
-%struct.CProfileSample = type <{ i8 }>
-%struct.ClipVertex = type { %struct.btQuadWord, i32 }
-%struct.ConvexH = type { %"struct.btAlignedObjectArray<btVector3>", %"struct.btAlignedObjectArray<ConvexH::HalfEdge>", %"struct.btAlignedObjectArray<btPlane>" }
-%"struct.ConvexH::HalfEdge" = type { i16, i8, i8 }
-%struct.DISTANCE_PLANE_3D_FUNC = type <{ i8 }>
-%struct.DebugDrawcallback = type { %struct.btActionInterface, %struct.btActionInterface, %struct.btActionInterface*, %struct.btQuadWord, %struct.btTransform }
-%struct.GIM_AABB = type { %struct.btQuadWord, %struct.btQuadWord }
-%struct.GIM_AABB_DATA = type { %struct.GIM_AABB, i32 }
-%struct.GIM_BOX_TREE = type { i32, %"struct.gim_array<GIM_BOX_TREE_NODE>" }
-%struct.GIM_BOX_TREE_NODE = type { %struct.GIM_AABB, i32, i32, i32, i32 }
-%struct.GIM_BVH_DATA = type { %struct.GIM_AABB, i32 }
-%struct.GIM_BVH_DATA_ARRAY = type { %"struct.btAlignedObjectArray<GIM_BVH_DATA>" }
-%struct.GIM_CONTACT = type { %struct.btQuadWord, %struct.btQuadWord, float, float, i32, i32 }
-%struct.GIM_PAIR = type { i32, i32 }
-%struct.GIM_QUANTIZED_BVH_NODE_ARRAY = type { %struct.QuantizedNodeArray }
-%struct.GIM_RSORT_TOKEN = type { i32, i32 }
-%struct.GIM_RSORT_TOKEN_COMPARATOR = type <{ i8 }>
-%struct.GIM_STANDARD_ALLOCATOR = type { %struct.btGenericPoolAllocator }
-%struct.GIM_ShapeRetriever = type { %struct.btGImpactShapeInterface*, %struct.btTriangleShapeEx, %struct.btTetrahedronShapeEx, %"struct.GIM_ShapeRetriever::ChildShapeRetriever", %"struct.GIM_ShapeRetriever::TetraShapeRetriever", %"struct.GIM_ShapeRetriever::TetraShapeRetriever", %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* }
-%"struct.GIM_ShapeRetriever::ChildShapeRetriever" = type { i32 (...)**, %struct.GIM_ShapeRetriever* }
-%"struct.GIM_ShapeRetriever::TetraShapeRetriever" = type { %"struct.GIM_ShapeRetriever::ChildShapeRetriever" }
-%struct.GIM_TRIANGLE = type { float, [3 x %struct.btQuadWord] }
-%struct.GIM_TRIANGLE_CALCULATION_CACHE = type { float, [3 x %struct.btQuadWord], [3 x %struct.btQuadWord], %struct.btQuaternion, %struct.btQuaternion, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, [4 x float], float, float, [4 x float], float, float, [16 x %struct.btQuadWord], [16 x %struct.btQuadWord], [16 x %struct.btQuadWord] }
-%struct.GIM_TRIANGLE_CONTACT = type { float, i32, %struct.btQuaternion, [16 x %struct.btQuadWord] }
-%struct.GIM_TRIANGLE_CONTACT_DATA = type { float, i32, %struct.btQuaternion, [16 x %struct.btQuadWord] }
-%struct.HullDesc = type { i32, i32, %struct.btQuadWord*, i32, float, i32, i32 }
-%struct.HullLibrary = type { %"struct.btAlignedObjectArray<btHullTriangle*>", %"struct.btAlignedObjectArray<int>" }
-%struct.HullResult = type { i8, i32, %"struct.btAlignedObjectArray<btVector3>", i32, i32, %"struct.btAlignedObjectArray<int>" }
-%struct.IndexedMeshArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btIndexedMesh*, i8 }
-%struct.LocalSupportVertexCallback = type { %struct.btActionInterface, %struct.btQuadWord, float, %struct.btQuadWord }
-%struct.MaterialArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btMaterialProperties*, i8 }
-%struct.NodeArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btOptimizedBvhNode*, i8 }
-%struct.PHullResult = type { i32, i32, i32, %struct.btQuadWord*, %"struct.btAlignedObjectArray<int>" }
-%struct.PfxConstraintRow = type { [3 x float], float, float, float, float, float }
-%struct.QuantizedNodeArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.BT_QUANTIZED_BVH_NODE*, i8 }
-%struct.SphereTriangleDetector = type { %struct.btActionInterface, %struct.btPolyhedralConvexShape*, %struct.btTriangleShape*, float }
-%struct.SupportVertexCallback = type { %struct.btActionInterface, %struct.btQuadWord, %struct.btTransform, float, %struct.btQuadWord }
-%struct.__base_class_type_info_pseudo = type { %"struct.std::type_info"*, i32 }
-%struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo }
-%struct.__si_class_type_info_pseudo = type { %struct.__type_info_pseudo, %"struct.std::type_info"* }
-%struct.__type_info_pseudo = type { i8*, i8* }
-%struct.__vmi_class_type_info_pseudo1 = type { %struct.__type_info_pseudo, i32, i32, [1 x %struct.__base_class_type_info_pseudo] }
-%struct.__vmi_class_type_info_pseudo2 = type { %struct.__type_info_pseudo, i32, i32, [2 x %struct.__base_class_type_info_pseudo] }
-%struct.anon = type { void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)*, i32 }
-%struct.bt32BitAxisSweep3 = type { %"struct.btAxisSweep3Internal<unsigned int>" }
-%struct.btAABB = type { %struct.btQuadWord, %struct.btQuadWord }
-%struct.btActionInterface = type { i32 (...)** }
-%struct.btActivatingCollisionAlgorithm = type { %struct.btCollisionAlgorithm }
-%"struct.btAlignedAllocator<BT_QUANTIZED_BVH_NODE,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<ConvexH::HalfEdge,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<GIM_BVH_DATA,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btActionInterface*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btBroadphaseInterface*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btBroadphasePair,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btBvhSubtreeInfo,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btCollisionAlgorithm*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btCollisionObject*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btCollisionShape*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btCompoundShapeChild,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btDbvt::sStkCLN,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btDbvt::sStkNN,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btElement,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btHashInt,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btHullTriangle*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btIndexedMesh,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btPersistentManifold*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btRigidBody*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btSolverConstraint,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btTriangle,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btTriangleInfo,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btTypedConstraint*,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btTypedConstraint::btConstraintInfo1,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<btVector3,16u>" = type <{ i8 }>
-%"struct.btAlignedAllocator<int,16u>" = type <{ i8 }>
-%"struct.btAlignedObjectArray<BT_QUANTIZED_BVH_NODE>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.BT_QUANTIZED_BVH_NODE*, i8 }
-%"struct.btAlignedObjectArray<BT_QUANTIZED_BVH_NODE>.base.32" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.BT_QUANTIZED_BVH_NODE*, i8 }
-%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.CONTACT_KEY_TOKEN*, i8 }
-%"struct.btAlignedObjectArray<ConvexH::HalfEdge>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %"struct.ConvexH::HalfEdge"*, i8 }
-%"struct.btAlignedObjectArray<GIM_BVH_DATA>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.GIM_AABB_DATA*, i8 }
-%"struct.btAlignedObjectArray<GIM_CONTACT>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.GIM_CONTACT*, i8 }
-%"struct.btAlignedObjectArray<GIM_PAIR>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.CONTACT_KEY_TOKEN*, i8 }
-%"struct.btAlignedObjectArray<btActionInterface*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btActionInterface**, i8 }
-%"struct.btAlignedObjectArray<btBroadphasePair>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btBroadphasePair*, i8 }
-%"struct.btAlignedObjectArray<btCollisionAlgorithm*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btCollisionAlgorithm**, i8 }
-%"struct.btAlignedObjectArray<btCollisionObject*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btCollisionObject**, i8 }
-%"struct.btAlignedObjectArray<btCollisionShape*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btCollisionShape**, i8 }
-%"struct.btAlignedObjectArray<btCompoundShapeChild>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btCompoundShapeChild*, i8 }
-%"struct.btAlignedObjectArray<btDbvt::sStkCLN>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %"struct.btDbvt::sStkCLN"*, i8 }
-%"struct.btAlignedObjectArray<btDbvt::sStkNN>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %"struct.btDbvt::sStkCLN"*, i8 }
-%"struct.btAlignedObjectArray<btDbvtNode*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btDbvtNode**, i8 }
-%"struct.btAlignedObjectArray<btElement>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.CONTACT_KEY_TOKEN*, i8 }
-%"struct.btAlignedObjectArray<btGImpactMeshShapePart*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btGImpactMeshShapePart**, i8 }
-%"struct.btAlignedObjectArray<btHashInt>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btHashInt*, i8 }
-%"struct.btAlignedObjectArray<btHashPtr>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btHashPtr*, i8 }
-%"struct.btAlignedObjectArray<btHullTriangle*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btHullTriangle**, i8 }
-%"struct.btAlignedObjectArray<btMaterial*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btMaterial**, i8 }
-%"struct.btAlignedObjectArray<btMultiSapBroadphase::btBridgeProxy*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %"struct.btMultiSapBroadphase::btBridgeProxy"**, i8 }
-%"struct.btAlignedObjectArray<btMultiSapBroadphase::btMultiSapProxy*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %"struct.btMultiSapBroadphase::btMultiSapProxy"**, i8 }
-%"struct.btAlignedObjectArray<btPersistentManifold*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btPersistentManifold**, i8 }
-%"struct.btAlignedObjectArray<btPlane>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btPlane*, i8 }
-%"struct.btAlignedObjectArray<btRigidBody*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btRigidBody**, i8 }
-%"struct.btAlignedObjectArray<btTransform>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btTransform*, i8 }
-%"struct.btAlignedObjectArray<btTriangle>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btTriangle*, i8 }
-%"struct.btAlignedObjectArray<btTriangleInfo>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btTriangleInfo*, i8 }
-%"struct.btAlignedObjectArray<btTypedConstraint*>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btTypedConstraint**, i8 }
-%"struct.btAlignedObjectArray<btTypedConstraint::btConstraintInfo1>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.CONTACT_KEY_TOKEN*, i8 }
-%"struct.btAlignedObjectArray<btVector3>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btQuadWord*, i8 }
-%"struct.btAlignedObjectArray<btWheelInfo>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btWheelInfo*, i8 }
-%"struct.btAlignedObjectArray<float>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, float*, i8 }
-%"struct.btAlignedObjectArray<int>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, i32*, i8 }
-%"struct.btAlignedObjectArray<short unsigned int>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, i16*, i8 }
-%"struct.btAlignedObjectArray<unsigned int>" = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, i32*, i8 }
-%struct.btAxisSweep3 = type { %"struct.btAxisSweep3Internal<short unsigned int>" }
-%"struct.btAxisSweep3Internal<short unsigned int>" = type { %struct.btActionInterface, i16, i16, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i16, i16, %"struct.btAxisSweep3Internal<short unsigned int>::Handle"*, i16, [3 x %"struct.btAxisSweep3Internal<short unsigned int>::Edge"*], [3 x i8*], %struct..0btMultiSapOverlapFilterCallback*, %struct.btActionInterface*, i8, i32, %struct.btDbvtBroadphase*, %struct..0btMultiSapOverlapFilterCallback* }
-%"struct.btAxisSweep3Internal<short unsigned int>::Edge" = type { i16, i16 }
-%"struct.btAxisSweep3Internal<short unsigned int>::Handle" = type { %struct.btBroadphaseProxy, [3 x i16], [3 x i16], %struct.btBroadphaseProxy* }
-%"struct.btAxisSweep3Internal<unsigned int>" = type { %struct.btActionInterface, i32, i32, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i32, i32, %"struct.btAxisSweep3Internal<unsigned int>::Handle"*, i32, [3 x %struct.CONTACT_KEY_TOKEN*], [3 x i8*], %struct..0btMultiSapOverlapFilterCallback*, %struct.btActionInterface*, i8, i32, %struct.btDbvtBroadphase*, %struct..0btMultiSapOverlapFilterCallback* }
-%"struct.btAxisSweep3Internal<unsigned int>::Edge" = type { i32, i32 }
-%"struct.btAxisSweep3Internal<unsigned int>::Handle" = type { %struct.btBroadphaseProxy, [3 x i32], [3 x i32], %struct.btBroadphaseProxy* }
-%struct.btBU_Simplex1to4 = type { %struct.btPolyhedralConvexAabbCachingShape, i32, [4 x %struct.btQuadWord] }
-%struct.btBlock = type { %struct.btBlock*, i8* }
-%struct.btBox2dBox2dCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, i8, %struct.btPersistentManifold* }
-%struct.btBox2dShape = type { %struct.btPolyhedralConvexShape, %struct.btQuadWord, [4 x %struct.btQuadWord], [4 x %struct.btQuadWord] }
-%struct.btBoxBoxCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, i8, %struct.btPersistentManifold* }
-%"struct.btBoxBoxCollisionAlgorithm::CreateFunc" = type { %struct.btCollisionAlgorithmCreateFunc }
-%struct.btBoxBoxDetector = type { %struct.btActionInterface, %struct.btBoxShape*, %struct.btBoxShape* }
-%struct.btBoxShape = type { %struct.btPolyhedralConvexShape }
-%struct.btBridgedManifoldResult = type { %struct.btManifoldResult, %"struct.btCollisionWorld::ContactResultCallback"* }
-%struct.btBroadphaseAabbCallback = type { i32 (...)** }
-%struct.btBroadphaseInterface = type { i32 (...)** }
-%struct.btBroadphasePair = type { %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btCollisionAlgorithm*, %"union.btBroadphasePair::._22" }
-%struct.btBroadphasePairArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btBroadphasePair*, i8 }
-%struct.btBroadphaseProxy = type { i8*, i16, i16, i8*, i32, %struct.btQuadWord, %struct.btQuadWord }
-%struct.btBroadphaseRayCallback = type { %struct.btActionInterface, %struct.btQuadWord, [3 x i32], float }
-%struct.btBvhSubtreeInfo = type { [3 x i16], [3 x i16], i32, i32, [3 x i32] }
-%struct.btBvhSubtreeInfoData = type { i32, i32, [3 x i16], [3 x i16] }
-%struct.btBvhTree = type { i32, %struct.GIM_BVH_DATA_ARRAY }
-%struct.btBvhTriangleMeshShape = type { %struct.btTriangleMeshShape, %struct.btOptimizedBvh*, %struct.btTriangleInfoMap*, i8, i8, [11 x i8] }
-%struct.btCapsuleShape = type { %struct.btConvexInternalShape, i32 }
-%struct.btCapsuleShapeX = type { %struct.btCapsuleShape }
-%struct.btCharacterControllerInterface = type { %struct.btActionInterface }
-%struct.btChunk = type { i32, i32, i8*, i32, i32 }
-%struct.btClock = type { %struct.btClockData* }
-%struct.btClockData = type { %struct.CONTACT_KEY_TOKEN }
-%struct.btClosestNotMeConvexResultCallback = type { %"struct.btCollisionWorld::ClosestConvexResultCallback", %struct.btCollisionObject*, float, %struct..0btMultiSapOverlapFilterCallback*, %struct.btActionInterface* }
-%struct.btCollisionAlgorithm = type { i32 (...)**, %struct.btActionInterface* }
-%struct.btCollisionAlgorithmConstructionInfo = type { %struct.btActionInterface*, %struct.btPersistentManifold* }
-%struct.btCollisionAlgorithmCreateFunc = type { i32 (...)**, i8 }
-%struct.btCollisionConfiguration = type { i32 (...)** }
-%struct.btCollisionDispatcher = type { %struct.btActionInterface, i32, %"struct.btAlignedObjectArray<btPersistentManifold*>", %struct.btManifoldResult, void (%struct.btBroadphasePair*, %struct.btCollisionDispatcher*, %struct.btDispatcherInfo*)*, %struct.btPoolAllocator*, %struct.btPoolAllocator*, [36 x [36 x %struct.btCollisionAlgorithmCreateFunc*]], %struct.btActionInterface* }
-%struct.btCollisionObject = type { i32 (...)**, %struct.btTransform, %struct.btTransform, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i32, float, %struct.btBroadphaseProxy*, %struct.btCollisionShape*, i8*, %struct.btCollisionShape*, i32, i32, i32, i32, float, float, float, i32, i8*, float, float, float, i32 }
-%struct.btCollisionObjectArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btCollisionObject**, i8 }
-%struct.btCollisionObjectFloatData = type { i8*, i8*, %struct.btCollisionShapeData*, i8*, %struct.btTransform, %struct.btTransform, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, float, float, float, float, float, i32, i32, i32, i32, i32, i32, i32 }
-%struct.btCollisionPairCallback = type { %struct.btActionInterface, %struct.btDispatcherInfo*, %struct.btCollisionDispatcher* }
-%struct.btCollisionShape = type { i32 (...)**, i32, i8* }
-%struct.btCollisionShapeData = type { i8*, i32, [4 x i8] }
-%struct.btCollisionWorld = type { i32 (...)**, %"struct.btAlignedObjectArray<btCollisionObject*>", %struct.btActionInterface*, %struct.btDispatcherInfo, %struct.btStackAlloc*, %struct.btActionInterface*, %struct.btActionInterface*, i8 }
-%struct.btCollisionWorld.base.32 = type { i32 (...)**, %"struct.btAlignedObjectArray<btCollisionObject*>", %struct.btActionInterface*, %struct.btDispatcherInfo, %struct.btStackAlloc*, %struct.btActionInterface*, %struct.btActionInterface*, i8 }
-%"struct.btCollisionWorld::ClosestConvexResultCallback" = type { %"struct.btCollisionWorld::ConvexResultCallback", %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btCollisionObject* }
-%"struct.btCollisionWorld::ClosestRayResultCallback" = type { %"struct.btCollisionWorld::RayResultCallback", %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord }
-%"struct.btCollisionWorld::ContactResultCallback" = type { i32 (...)**, i16, i16 }
-%"struct.btCollisionWorld::ConvexResultCallback" = type { i32 (...)**, float, i16, i16 }
-%"struct.btCollisionWorld::LocalConvexResult" = type { %struct.btCollisionObject*, %struct.CONTACT_KEY_TOKEN*, %struct.btQuadWord, %struct.btQuadWord, float }
-%"struct.btCollisionWorld::LocalRayResult" = type { %struct.btCollisionObject*, %struct.CONTACT_KEY_TOKEN*, %struct.btQuadWord, float }
-%"struct.btCollisionWorld::LocalShapeInfo" = type { i32, i32 }
-%"struct.btCollisionWorld::RayResultCallback" = type { i32 (...)**, float, %struct.btCollisionObject*, i16, i16, i32 }
-%struct.btCompoundCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, %"struct.btAlignedObjectArray<btCollisionAlgorithm*>", i8, %struct.btPersistentManifold*, i8, i32 }
-%struct.btCompoundLeafCallback = type { %struct.btActionInterface, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btActionInterface*, %struct.btDispatcherInfo*, %struct.btManifoldResult*, %struct.btCollisionAlgorithm**, %struct.btPersistentManifold* }
-%struct.btCompoundShape = type { %struct.btCollisionShape, %"struct.btAlignedObjectArray<btCompoundShapeChild>", %struct.btQuadWord, %struct.btQuadWord, %struct.btDbvt*, i32, float, %struct.btQuadWord }
-%struct.btCompoundShapeChild = type { %struct.btTransform, %struct.btCollisionShape*, i32, float, %struct.btDbvtNode* }
-%struct.btCompoundShapeChildData = type { %struct.btTransform, %struct.btCollisionShapeData*, i32, float }
-%struct.btConcaveShape = type { %struct.btCollisionShape, float }
-%struct.btConeShape = type { %struct.btConvexInternalShape, float, float, float, [3 x i32] }
-%struct.btConeShapeX = type { %struct.btConeShape }
-%struct.btConeTwistConstraint = type { %struct.btTypedConstraint, [3 x %struct.btJacobianEntry], %struct.btTransform, %struct.btTransform, float, float, float, float, float, float, float, float, %struct.btQuadWord, %struct.btQuadWord, float, float, float, float, float, float, float, float, i8, i8, i8, i8, float, float, %struct.btQuadWord, i8, i8, %struct.btQuaternion, float, %struct.btQuadWord, i32, float, float, float }
-%struct.btConnectivityProcessor = type { %struct.btActionInterface, i32, i32, %struct.btQuadWord*, %struct.btTriangleInfoMap* }
-%struct.btConstraintArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btSolverConstraint*, i8 }
-%struct.btConstraintSetting = type { float, float, float }
-%struct.btConstraintSolver = type { i32 (...)** }
-%struct.btContactArray = type { %"struct.btAlignedObjectArray<GIM_CONTACT>" }
-%struct.btContactConstraint = type { %struct.btTypedConstraint, %struct.btPersistentManifold }
-%struct.btContactSolverInfo = type { %struct.btContactSolverInfoData }
-%struct.btContactSolverInfoData = type { float, float, float, float, float, i32, float, float, float, float, float, i32, float, float, float, i32, i32, i32 }
-%struct.btContinuousConvexCollision = type { %struct.btActionInterface, %struct.btVoronoiSimplexSolver*, %struct.btActionInterface*, %struct.btConvexShape*, %struct.btConvexShape* }
-%struct.btContinuousDynamicsWorld = type { %struct.btDiscreteDynamicsWorld }
-%struct.btConvex2dConvex2dAlgorithm = type { %struct.btActivatingCollisionAlgorithm, %struct.btVoronoiSimplexSolver*, %struct.btActionInterface*, i8, %struct.btPersistentManifold*, i8, i32, i32 }
-%"struct.btConvex2dConvex2dAlgorithm::CreateFunc" = type { %struct.btCollisionAlgorithmCreateFunc, %struct.btActionInterface*, %struct.btVoronoiSimplexSolver*, i32, i32 }
-%struct.btConvex2dShape = type { %struct.btConvexShape, %struct.btConvexShape* }
-%struct.btConvexCast = type { i32 (...)** }
-%"struct.btConvexCast::CastResult" = type { i32 (...)**, %struct.btTransform, %struct.btTransform, %struct.btQuadWord, %struct.btQuadWord, float, %struct.btActionInterface*, float }
-%struct.btConvexConcaveCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, i8, %struct.btConvexTriangleCallback }
-%struct.btConvexConvexAlgorithm = type { %struct.btActivatingCollisionAlgorithm, %struct.btVoronoiSimplexSolver*, %struct.btActionInterface*, i8, %struct.btPersistentManifold*, i8, i32, i32 }
-%"struct.btConvexConvexAlgorithm::CreateFunc" = type { %struct.btCollisionAlgorithmCreateFunc, %struct.btActionInterface*, %struct.btVoronoiSimplexSolver*, i32, i32 }
-%struct.btConvexHullShape = type { %struct.btPolyhedralConvexAabbCachingShape, %"struct.btAlignedObjectArray<btVector3>" }
-%struct.btConvexInternalAabbCachingShape = type { %struct.btConvexInternalShape, %struct.btQuadWord, %struct.btQuadWord, i8 }
-%struct.btConvexInternalAabbCachingShape.base.32 = type { %struct.btConvexInternalShape, %struct.btQuadWord, %struct.btQuadWord, i8 }
-%struct.btConvexInternalShape = type { %struct.btConvexShape, %struct.btQuadWord, %struct.btQuadWord, float, float }
-%struct.btConvexPenetrationDepthSolver = type { i32 (...)** }
-%struct.btConvexPlaneCollisionAlgorithm = type { %struct.btCollisionAlgorithm, i8, %struct.btPersistentManifold*, i8, i32, i32 }
-%"struct.btConvexPlaneCollisionAlgorithm::CreateFunc" = type { %struct.btCollisionAlgorithmCreateFunc, i32, i32 }
-%struct.btConvexPointCloudShape = type { %struct.btPolyhedralConvexAabbCachingShape, %struct.btQuadWord*, i32 }
-%struct.btConvexShape = type { %struct.btCollisionShape }
-%struct.btConvexTriangleCallback = type { %struct.btActionInterface, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btQuadWord, %struct.btQuadWord, %struct.btManifoldResult*, %struct.btActionInterface*, %struct.btDispatcherInfo*, float, i32, %struct.btPersistentManifold* }
-%struct.btConvexTriangleMeshShape = type { %struct.btPolyhedralConvexAabbCachingShape, %struct.btStridingMeshInterface* }
-%struct.btCylinderShape = type { %struct.btConvexInternalShape, i32 }
-%struct.btCylinderShapeX = type { %struct.btCapsuleShape }
-%struct.btDbvt = type { %struct.btDbvtNode*, %struct.btDbvtNode*, i32, i32, i32, %"struct.btAlignedObjectArray<btDbvt::sStkCLN>" }
-%"struct.btDbvt::IClone" = type { i32 (...)** }
-%"struct.btDbvt::ICollide" = type { i32 (...)** }
-%"struct.btDbvt::sStkCLN" = type { %struct.btDbvtNode*, %struct.btDbvtNode* }
-%"struct.btDbvt::sStkNN" = type { %struct.btDbvtNode*, %struct.btDbvtNode* }
-%struct.btDbvtBroadphase = type { %struct.btActionInterface, [2 x %struct.btDbvt], [3 x %struct.btDbvtProxy*], %struct..0btMultiSapOverlapFilterCallback*, float, i32, i32, i32, i32, i32, i32, i32, i32, float, i32, i32, i32, i8, i8, i8 }
-%struct.btDbvtNode = type { %struct.GIM_AABB, %struct.btDbvtNode*, %"union.btDbvtNode::._22" }
-%struct.btDbvtNodeEnumerator = type { %struct.btActionInterface, %"struct.btAlignedObjectArray<btDbvtNode*>" }
-%struct.btDbvtProxy = type { %struct.btBroadphaseProxy, %struct.btDbvtNode*, [2 x %struct.btDbvtProxy*], i32 }
-%struct.btDbvtTreeCollider = type { %struct.btActionInterface, %struct.btDbvtBroadphase*, %struct.btDbvtProxy* }
-%struct.btDbvtVolume = type { %struct.btQuadWord, %struct.btQuadWord }
-%struct.btDefaultCollisionConfiguration = type { %struct.btActionInterface, i32, %struct.btStackAlloc*, i8, %struct.btPoolAllocator*, i8, %struct.btPoolAllocator*, i8, %struct.btVoronoiSimplexSolver*, %struct.btActionInterface*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmCreateFunc* }
-%struct.btDefaultCollisionConstructionInfo = type { %struct.btStackAlloc*, %struct.btPoolAllocator*, %struct.btPoolAllocator*, i32, i32, i32, i32, i32 }
-%struct.btDefaultMotionState = type { %struct.btActionInterface, %struct.btTransform, %struct.btTransform, %struct.btTransform, i8* }
-%struct.btDefaultVehicleRaycaster = type { %struct.btActionInterface, %struct.btDynamicsWorld* }
-%struct.btDiscreteCollisionDetectorInterface = type { i32 (...)** }
-%"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput" = type { %struct.btTransform, %struct.btTransform, float, %struct.btStackAlloc* }
-%"struct.btDiscreteCollisionDetectorInterface::Result" = type { i32 (...)** }
-%struct.btDiscreteDynamicsWorld = type { %struct.btDynamicsWorld, %struct.btActionInterface*, %struct.btSimulationIslandManager*, %"struct.btAlignedObjectArray<btTypedConstraint*>", %"struct.btAlignedObjectArray<btRigidBody*>", %struct.btQuadWord, float, i8, i8, i8, %"struct.btAlignedObjectArray<btActionInterface*>", i32 }
-%struct.btDispatcher = type { i32 (...)** }
-%struct.btDispatcherInfo = type { float, i32, i32, float, i8, %struct.btActionInterface*, i8, i8, i8, float, i8, float, i8, %struct.btStackAlloc* }
-%struct.btDynamicsWorld = type { %struct.btCollisionWorld, void (%struct.btDynamicsWorld*, float)*, void (%struct.btDynamicsWorld*, float)*, i8*, %struct.btContactSolverInfo }
-%struct.btElement = type { i32, i32 }
-%struct.btEmptyAlgorithm = type { %struct.btCollisionAlgorithm }
-%struct.btEmptyShape = type { %struct.btConcaveShape, %struct.btQuadWord }
-%struct.btGImpactBoxSet = type { %struct.btQuantizedBvhTree, %struct.btActionInterface* }
-%struct.btGImpactBvh = type { %struct.btBvhTree, %struct.btActionInterface* }
-%struct.btGImpactCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, %struct.btCollisionAlgorithm*, %struct.btPersistentManifold*, %struct.btManifoldResult*, %struct.btDispatcherInfo*, i32, i32, i32, i32 }
-%"struct.btGImpactCollisionAlgorithm::CreateFunc" = type { %struct.btCollisionAlgorithmCreateFunc }
-%struct.btGImpactCompoundShape = type { %struct.btGImpactShapeInterface, %"struct.btGImpactCompoundShape::CompoundPrimitiveManager", %"struct.btAlignedObjectArray<btTransform>", %"struct.btAlignedObjectArray<btCollisionShape*>" }
-%"struct.btGImpactCompoundShape::CompoundPrimitiveManager" = type { %struct.btActionInterface, %struct.btGImpactCompoundShape* }
-%struct.btGImpactMeshShape = type { %struct.btGImpactShapeInterface, %struct.btStridingMeshInterface*, %"struct.btAlignedObjectArray<btGImpactMeshShapePart*>" }
-%struct.btGImpactMeshShapePart = type { %struct.btGImpactShapeInterface, %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager" }
-%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager" = type { %struct.btActionInterface, float, %struct.btStridingMeshInterface*, %struct.btQuadWord, i32, i32, i8*, i32, i32, i32, i8*, i32, i32, i32 }
-%struct.btGImpactQuantizedBvh = type { %struct.btQuantizedBvhTree, %struct.btActionInterface* }
-%struct.btGImpactShapeInterface = type { %struct.btConcaveShape, %struct.GIM_AABB, i8, %struct.btQuadWord, %struct.btGImpactBoxSet }
-%struct.btGImpactTriangleCallback = type { %struct.btActionInterface, %struct.btGImpactCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btGImpactShapeInterface*, i8, float }
-%struct.btGeneric6DofConstraint = type { %struct.btTypedConstraint, %struct.btTransform, %struct.btTransform, [3 x %struct.btJacobianEntry], [3 x %struct.btJacobianEntry], %struct.btTranslationalLimitMotor, [3 x %struct.btRotationalLimitMotor], float, %struct.btTransform, %struct.btTransform, %struct.btQuadWord, [3 x %struct.btQuadWord], %struct.btQuadWord, float, float, i8, %struct.btQuadWord, i8, i8, i32, i8 }
-%struct.btGeneric6DofSpringConstraint = type { [1297 x i8], [6 x i8], [6 x float], [6 x float], [6 x float] }
-%struct.btGenericMemoryPool = type { i8*, i32*, i32*, i32, i32, i32, i32 }
-%struct.btGenericPoolAllocator = type { i32 (...)**, i32, i32, [16 x %struct.btGenericMemoryPool*], i32 }
-%struct.btGhostObject = type { %struct.btCollisionObject, %"struct.btAlignedObjectArray<btCollisionObject*>" }
-%struct.btGjkConvexCast = type { %struct.btActionInterface, %struct.btVoronoiSimplexSolver*, %struct.btConvexShape*, %struct.btConvexShape* }
-%struct.btGjkEpaPenetrationDepthSolver = type { %struct.btActionInterface }
-%"struct.btGjkEpaSolver2::sResults" = type { i32, [2 x %struct.btQuadWord], %struct.btQuadWord, float }
-%struct.btGjkPairDetector = type { %struct.btActionInterface, %struct.btQuadWord, %struct.btActionInterface*, %struct.btVoronoiSimplexSolver*, %struct.btConvexShape*, %struct.btConvexShape*, i32, i32, float, float, i8, float, i32, i32, i32, i32 }
-%struct.btHashInt = type { i32 }
-%"struct.btHashMap<btHashInt,btTriangleInfo>" = type { %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<btTriangleInfo>", %"struct.btAlignedObjectArray<btHashInt>" }
-%"struct.btHashMap<btHashPtr,btCollisionShape*>" = type { %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<btCollisionShape*>", %"struct.btAlignedObjectArray<btHashPtr>" }
-%struct.btHashPtr = type { %"union.btHashPtr::._23" }
-%struct.btHashedOverlappingPairCache = type { %struct..0btMultiSapOverlapFilterCallback, %"struct.btAlignedObjectArray<btBroadphasePair>", %struct.btActionInterface*, i8, %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<int>", %struct.btActionInterface* }
-%struct.btHeightfieldTerrainShape = type { %struct.btConcaveShape, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i32, i32, float, float, float, float, float, %"union.btBroadphasePair::._22", i32, i8, i8, i32, %struct.btQuadWord }
-%struct.btHinge2Constraint = type { %struct.btGeneric6DofSpringConstraint, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord }
-%struct.btHingeConstraint = type { %struct.btTypedConstraint, [3 x %struct.btJacobianEntry], [3 x %struct.btJacobianEntry], %struct.btTransform, %struct.btTransform, float, float, float, float, float, float, float, float, float, float, float, float, float, i8, i8, i8, i8, i8, i8, float, i32, float, float, float }
-%struct.btHullTriangle = type { %struct.int3, %struct.int3, i32, i32, float }
-%struct.btIDebugDraw = type { i32 (...)** }
-%struct.btIndexedMesh = type { i32, i8*, i32, i32, i8*, i32, i32, i32 }
-%struct.btIntIndexData = type { i32 }
-%struct.btInternalTriangleIndexCallback = type { i32 (...)** }
-%struct.btJacobianEntry = type { %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float }
-%struct.btKinematicCharacterController = type { %struct..0btMultiSapOverlapFilterCallback, float, %struct.btPairCachingGhostObject*, %struct.btConvexShape*, float, float, float, float, float, float, float, float, float, float, float, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, %struct.btQuadWord, %"struct.btAlignedObjectArray<btPersistentManifold*>", i8, %struct.btQuadWord, i8, i8, i8, i8, float, i32 }
-%struct.btKinematicClosestNotMeConvexResultCallback = type { %"struct.btCollisionWorld::ClosestConvexResultCallback", %struct.btCollisionObject*, %struct.btQuadWord, float }
-%struct.btManifoldArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btPersistentManifold**, i8 }
-%struct.btManifoldPoint = type { %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, float, i32, i32, i32, i32, i8*, float, i8, float, float, float, float, float, float, i32, %struct.btQuadWord, %struct.btQuadWord, [3 x %struct.PfxConstraintRow] }
-%struct.btManifoldResult = type { %struct.btActionInterface, %struct.btPersistentManifold*, %struct.btTransform, %struct.btTransform, %struct.btCollisionObject*, %struct.btCollisionObject*, i32, i32, i32, i32 }
-%struct.btMaterial = type { float, float, [2 x i32] }
-%struct.btMaterialProperties = type { i32, i8*, i32, i32, i32, i8*, i32, i32 }
-%struct.btMatrix3x3 = type { [3 x %struct.btQuadWord] }
-%struct.btMeshPartData = type { %struct.btQuadWord*, %struct.btVector3DoubleData*, %struct.btHashInt*, %struct.btShortIntIndexTripletData*, %struct.btShortIntIndexData*, i32, i32 }
-%struct.btMinkowskiPenetrationDepthSolver = type { %struct.btActionInterface }
-%struct.btMinkowskiSumShape = type { %struct.btConvexInternalShape, %struct.btTransform, %struct.btTransform, %struct.btConvexShape*, %struct.btConvexShape* }
-%struct.btMotionState = type { i32 (...)** }
-%struct.btMultiSapBroadphase = type { %struct.btActionInterface, %"struct.btAlignedObjectArray<btActionInterface*>", %struct.btSimpleBroadphase*, %struct..0btMultiSapOverlapFilterCallback*, %struct.btQuantizedBvh*, i8, %struct.btActionInterface*, i32, %"struct.btAlignedObjectArray<btMultiSapBroadphase::btMultiSapProxy*>" }
-%"struct.btMultiSapBroadphase::btBridgeProxy" = type { %struct.btBroadphaseProxy*, %struct.btActionInterface* }
-%"struct.btMultiSapBroadphase::btMultiSapProxy" = type { %struct.btBroadphaseProxy, %"struct.btAlignedObjectArray<btMultiSapBroadphase::btBridgeProxy*>", %struct.btQuadWord, %struct.btQuadWord, i32 }
-%struct.btMultiSphereShape = type { %struct.btConvexInternalAabbCachingShape, %"struct.btAlignedObjectArray<btVector3>", %"struct.btAlignedObjectArray<float>" }
-%struct.btMultimaterialTriangleMeshShape = type { %struct.btBvhTriangleMeshShape, %"struct.btAlignedObjectArray<btMaterial*>", i32** }
-%struct.btNodeOverlapCallback = type { i32 (...)** }
-%struct.btNullPairCache = type { %struct..0btMultiSapOverlapFilterCallback, %"struct.btAlignedObjectArray<btBroadphasePair>" }
-%struct.btOptimizedBvh = type { %struct.btQuantizedBvh }
-%struct.btOptimizedBvhNode = type { %struct.btQuadWord, %struct.btQuadWord, i32, i32, i32, [5 x i32] }
-%struct.btOptimizedBvhNodeDoubleData = type { %struct.btVector3DoubleData, %struct.btVector3DoubleData, i32, i32, i32, [4 x i8] }
-%struct.btOptimizedBvhNodeFloatData = type { %struct.btQuadWord, %struct.btQuadWord, i32, i32, i32, [4 x i8] }
-%struct.btOverlappingPairCache = type { %struct.btActionInterface }
-%struct.btOverlappingPairCallback = type { i32 (...)** }
-%struct.btPairCachingGhostObject = type { %struct.btGhostObject, %struct.btHashedOverlappingPairCache* }
-%struct.btPairSet = type { %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>" }
-%struct.btPersistentManifold = type { %struct.btHashInt, [4 x %struct.btManifoldPoint], i8*, i8*, i32, float, float, i32, i32, i32 }
-%struct.btPerturbedContactResult = type { %struct.btManifoldResult, %struct.btManifoldResult*, %struct.btTransform, %struct.btTransform, %struct.btTransform, i8, %struct.btActionInterface* }
-%struct.btPlane = type { %struct.btQuadWord, float }
-%struct.btPoint2PointConstraint = type { %struct.btTypedConstraint, [3 x %struct.btJacobianEntry], %struct.btQuadWord, %struct.btQuadWord, i32, float, float, i8, %struct.btConstraintSetting }
-%struct.btPointCollector = type { %struct.btActionInterface, %struct.btQuadWord, %struct.btQuadWord, float, i8 }
-%struct.btPolyhedralConvexAabbCachingShape = type { %struct.btPolyhedralConvexShape, %struct.btQuadWord, %struct.btQuadWord, i8 }
-%struct.btPolyhedralConvexAabbCachingShape.base.32 = type { %struct.btPolyhedralConvexShape, %struct.btQuadWord, %struct.btQuadWord, i8 }
-%struct.btPolyhedralConvexShape = type { %struct.btConvexInternalShape }
-%struct.btPoolAllocator = type { i32, i32, i32, i8*, i8* }
-%struct.btPositionAndRadius = type { %struct.btQuadWord, float }
-%struct.btPrimitiveManagerBase = type { i32 (...)** }
-%struct.btPrimitiveTriangle = type { [3 x %struct.btQuadWord], %struct.btQuaternion, float, float }
-%struct.btQuadWord = type { [4 x float] }
-%struct.btQuantizedBvh = type { i32 (...)**, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i32, i32, i8, %struct.NodeArray, %struct.NodeArray, %struct.QuantizedNodeArray, %struct.QuantizedNodeArray, i32, %struct.BvhSubtreeInfoArray, i32 }
-%struct.btQuantizedBvhDoubleData = type { %struct.btVector3DoubleData, %struct.btVector3DoubleData, %struct.btVector3DoubleData, i32, i32, i32, i32, %struct.btOptimizedBvhNodeDoubleData*, %struct.BT_QUANTIZED_BVH_NODE*, i32, i32, %struct.btBvhSubtreeInfoData* }
-%struct.btQuantizedBvhFloatData = type { %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i32, i32, i32, i32, %struct.btOptimizedBvhNodeFloatData*, %struct.BT_QUANTIZED_BVH_NODE*, %struct.btBvhSubtreeInfoData*, i32, i32 }
-%struct.btQuantizedBvhNode = type { [3 x i16], [3 x i16], i32 }
-%struct.btQuantizedBvhTree = type { i32, %struct.GIM_QUANTIZED_BVH_NODE_ARRAY, %struct.GIM_AABB, %struct.btQuadWord }
-%struct.btQuaternion = type { %struct.btQuadWord }
-%struct.btRaycastVehicle = type { %struct.btActionInterface, %"struct.btAlignedObjectArray<btVector3>", %"struct.btAlignedObjectArray<btVector3>", %"struct.btAlignedObjectArray<float>", %"struct.btAlignedObjectArray<float>", i32, i32, float, float, %struct.btActionInterface*, float, float, float, %struct.btRigidBody*, i32, i32, i32, %"struct.btAlignedObjectArray<btWheelInfo>" }
-%"struct.btRaycastVehicle::btVehicleTuning" = type { float, float, float, float, float, float }
-%struct.btRigidBody = type { %struct.btCollisionObject, %struct.btMatrix3x3, %struct.btQuadWord, %struct.btQuadWord, float, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, i8, float, float, float, float, float, float, %struct.btActionInterface*, %"struct.btAlignedObjectArray<btTypedConstraint*>", i32, i32, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i32, i32 }
-%"struct.btRigidBody::btRigidBodyConstructionInfo" = type { float, %struct.btActionInterface*, %struct.btTransform, %struct.btCollisionShape*, %struct.btQuadWord, float, float, float, float, float, float, i8, float, float, float, float }
-%struct.btRigidBodyFloatData = type { %struct.btCollisionObjectFloatData, %struct.btMatrix3x3, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, float, float, float, float, float, float, float, i32 }
-%struct.btRotationalLimitMotor = type { float, float, float, float, float, float, float, float, float, float, float, i8, float, float, i32, float }
-%struct.btSapBroadphaseArray = type { %struct.CONTACT_KEY_TOKEN_COMP, i32, i32, %struct.btActionInterface**, i8 }
-%struct.btScaledBvhTriangleMeshShape = type { %struct.btConcaveShape, %struct.btQuadWord, %struct.btBvhTriangleMeshShape* }
-%struct.btScaledTriangleCallback = type { %struct.btActionInterface, %struct.btActionInterface*, %struct.btQuadWord }
-%struct.btSequentialImpulseConstraintSolver = type { %struct.btActionInterface, %struct.btConstraintArray, %struct.btConstraintArray, %struct.btConstraintArray, %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>", i32 }
-%struct.btSerializer = type { i32 (...)** }
-%struct.btShapeHull = type { %"struct.btAlignedObjectArray<btVector3>", %"struct.btAlignedObjectArray<int>", i32, %struct.btConvexShape* }
-%struct.btShortIntIndexData = type { i16, [2 x i8] }
-%struct.btShortIntIndexTripletData = type { [3 x i16], [2 x i8] }
-%struct.btSimpleBroadphase = type { %struct.btActionInterface, i32, i32, i32, %struct.btSimpleBroadphaseProxy*, i8*, i32, %struct..0btMultiSapOverlapFilterCallback*, i8, i32 }
-%struct.btSimpleBroadphaseProxy = type { %struct.btBroadphaseProxy, i32 }
-%struct.btSimpleDynamicsWorld = type { %struct.btDynamicsWorld, %struct.btActionInterface*, i8, %struct.btQuadWord }
-%struct.btSimulationIslandManager = type { i32 (...)**, %struct.btPairSet, %"struct.btAlignedObjectArray<btPersistentManifold*>", %"struct.btAlignedObjectArray<btCollisionObject*>", i8 }
-%struct.btSingleContactCallback = type { %struct.btActionInterface, %struct.btCollisionObject*, %struct.btCollisionWorld*, %"struct.btCollisionWorld::ContactResultCallback"* }
-%struct.btSingleRayCallback = type { %struct.btBroadphaseRayCallback, %struct.btQuadWord, %struct.btQuadWord, %struct.btTransform, %struct.btTransform, %struct.btQuadWord, %struct.btCollisionWorld*, %"struct.btCollisionWorld::RayResultCallback"* }
-%struct.btSingleSweepCallback = type { %struct.btBroadphaseRayCallback, %struct.btTransform, %struct.btTransform, %struct.btQuadWord, %struct.btCollisionWorld*, %"struct.btCollisionWorld::ConvexResultCallback"*, float, %struct.btConvexShape* }
-%struct.btSliderConstraint = type { %struct.btTypedConstraint, i8, i8, %struct.btTransform, %struct.btTransform, i8, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, i8, i8, i32, [3 x %struct.btJacobianEntry], [3 x float], [3 x %struct.btJacobianEntry], float, %struct.btTransform, %struct.btTransform, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, float, float, i8, float, float, float, i8, float, float, float }
-%struct.btSolve2LinearConstraint = type { float, float }
-%struct.btSolverConstraint = type { %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, float, float, %struct.btHashInt, %struct.btHashInt, %"union.btSolverConstraint::._25", %"union.btSolverConstraint::._25", %"union.btBroadphasePair::._22", float, float, float, float, float }
-%struct.btSortedOverlappingPairCache = type { %struct..0btMultiSapOverlapFilterCallback, %"struct.btAlignedObjectArray<btBroadphasePair>", i8, i8, %struct.btActionInterface*, %struct.btActionInterface* }
-%struct.btSphereBoxCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, i8, %struct.btPersistentManifold*, i8 }
-%struct.btSphereShape = type { %struct.btConvexInternalShape }
-%struct.btSphereSphereCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, i8, %struct.btPersistentManifold* }
-%struct.btSphereTriangleCollisionAlgorithm = type { %struct.btActivatingCollisionAlgorithm, i8, %struct.btPersistentManifold*, i8 }
-%struct.btStackAlloc = type { i8*, i32, i32, %struct.btBlock*, i8 }
-%struct.btStaticPlaneShape = type { %struct.btConcaveShape, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, %struct.btQuadWord }
-%struct.btStridingMeshInterface = type { i32 (...)**, %struct.btQuadWord }
-%struct.btSubSimplexClosestResult = type { %struct.btQuadWord, %struct.btUsageBitfield, [4 x float], i8 }
-%struct.btSubsimplexConvexCast = type { %struct.btActionInterface, %struct.btVoronoiSimplexSolver*, %struct.btConvexShape*, %struct.btConvexShape* }
-%struct.btTetrahedronShapeEx = type { %struct.btBU_Simplex1to4 }
-%struct.btTransform = type { %struct.btMatrix3x3, %struct.btQuadWord }
-%struct.btTranslationalLimitMotor = type { %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, float, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, [3 x i8], %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, [3 x i32] }
-%struct.btTriangle = type { %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i32, i32 }
-%struct.btTriangleBuffer = type { %struct.btActionInterface, %"struct.btAlignedObjectArray<btTriangle>" }
-%struct.btTriangleCallback = type { i32 (...)** }
-%struct.btTriangleConvexcastCallback = type { %struct.btActionInterface, %struct.btConvexShape*, %struct.btTransform, %struct.btTransform, %struct.btTransform, float, float }
-%struct.btTriangleIndexVertexArray = type { %struct.btStridingMeshInterface, %struct.IndexedMeshArray, [2 x i32], i32, %struct.btQuadWord, %struct.btQuadWord }
-%struct.btTriangleIndexVertexMaterialArray = type { %struct.btTriangleIndexVertexArray, %struct.MaterialArray }
-%struct.btTriangleInfo = type { i32, float, float, float }
-%struct.btTriangleInfoData = type { i32, float, float, float }
-%struct.btTriangleInfoMap = type { i32 (...)**, %"struct.btHashMap<btHashInt,btTriangleInfo>", float, float, float, float, float }
-%struct.btTriangleInfoMapData = type { i32*, i32*, %struct.btTriangleInfo*, i32*, float, float, float, float, float, i32, i32, i32, i32, [4 x i8] }
-%struct.btTriangleMesh = type { %struct.btTriangleIndexVertexArray, %"struct.btAlignedObjectArray<btVector3>", %"struct.btAlignedObjectArray<float>", %"struct.btAlignedObjectArray<int>", %"struct.btAlignedObjectArray<short unsigned int>", i8, i8, float }
-%struct.btTriangleMeshShape = type { %struct.btConcaveShape, %struct.btQuadWord, %struct.btQuadWord, %struct.btStridingMeshInterface* }
-%struct.btTriangleRaycastCallback = type { %struct.btActionInterface, %struct.btQuadWord, %struct.btQuadWord, i32, float }
-%struct.btTriangleShape = type { %struct.btPolyhedralConvexShape, [3 x %struct.btQuadWord] }
-%struct.btTriangleShapeEx = type { %struct.btTriangleShape }
-%struct.btTypedConstraint = type { i32 (...)**, %struct.btHashInt, i32, %struct.btHashInt, i8, %struct.btRigidBody*, %struct.btRigidBody*, float, float }
-%"struct.btTypedConstraint::btConstraintInfo1" = type { i32, i32 }
-%"struct.btTypedConstraint::btConstraintInfo2" = type { float, float, float*, float*, float*, float*, i32, float*, float*, float*, float*, i32*, i32, float }
-%struct.btTypedObject = type { i32 }
-%struct.btUniformScalingShape = type { %struct.btConvexShape, %struct.btConvexShape*, float }
-%struct.btUnionFind = type { %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>" }
-%struct.btUniversalConstraint = type { %struct.btGeneric6DofConstraint, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord }
-%struct.btUsageBitfield = type <{ i8, i8 }>
-%struct.btVector3 = type { [4 x float] }
-%struct.btVector3DoubleData = type { [4 x double] }
-%struct.btVector4 = type { %struct.btQuadWord }
-%"struct.btVehicleRaycaster::btVehicleRaycasterResult" = type { %struct.btQuadWord, %struct.btQuadWord, float }
-%struct.btVoronoiSimplexSolver = type { i32, [5 x %struct.btQuadWord], [5 x %struct.btQuadWord], [5 x %struct.btQuadWord], %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, i8, %struct.btSubSimplexClosestResult, i8 }
-%struct.btWheelContactPoint = type { %struct.btRigidBody*, %struct.btRigidBody*, %struct.btQuadWord, %struct.btQuadWord, float, float }
-%struct.btWheelInfo = type { %"struct.btWheelInfo::RaycastInfo", %struct.btTransform, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, float, float, float, float, float, float, float, float, float, float, float, float, float, float, i8, i8*, float, float, float, float }
-%"struct.btWheelInfo::RaycastInfo" = type { %struct.btQuadWord, %struct.btQuadWord, float, %struct.btQuadWord, %struct.btQuadWord, %struct.btQuadWord, i8, i8* }
-%struct.dContactGeom = type opaque
-%"struct.gim_array<GIM_AABB_DATA>" = type { %struct.GIM_AABB_DATA*, i32, i32 }
-%"struct.gim_array<GIM_BOX_TREE_NODE>" = type { %struct.GIM_BOX_TREE_NODE*, i32, i32 }
-%"struct.gim_array<GIM_CONTACT>" = type { %struct.GIM_CONTACT*, i32, i32 }
-%struct.gim_contact_array = type { %"struct.gim_array<GIM_CONTACT>" }
-%"struct.gjkepa2_impl::EPA" = type { i32, %"struct.gjkepa2_impl::GJK::sSimplex", %struct.btQuadWord, float, [64 x %struct.GIM_AABB], [128 x %"struct.gjkepa2_impl::EPA::sFace"], i32, %"struct.gjkepa2_impl::EPA::sList", %"struct.gjkepa2_impl::EPA::sList" }
-%"struct.gjkepa2_impl::EPA::sFace" = type { %struct.btQuadWord, float, float, [3 x %struct.GIM_AABB*], [3 x %"struct.gjkepa2_impl::EPA::sFace"*], [2 x %"struct.gjkepa2_impl::EPA::sFace"*], [3 x i8], i8 }
-%"struct.gjkepa2_impl::EPA::sHorizon" = type { %"struct.gjkepa2_impl::EPA::sFace"*, %"struct.gjkepa2_impl::EPA::sFace"*, i32 }
-%"struct.gjkepa2_impl::EPA::sList" = type { %"struct.gjkepa2_impl::EPA::sFace"*, i32 }
-%"struct.gjkepa2_impl::GJK" = type { %"struct.gjkepa2_impl::MinkowskiDiff", %struct.btQuadWord, float, [2 x %"struct.gjkepa2_impl::GJK::sSimplex"], [4 x %struct.GIM_AABB], [4 x %struct.GIM_AABB*], i32, i32, %"struct.gjkepa2_impl::GJK::sSimplex"*, i32 }
-%"struct.gjkepa2_impl::GJK::sSV" = type { %struct.btQuadWord, %struct.btQuadWord }
-%"struct.gjkepa2_impl::GJK::sSimplex" = type { [4 x %struct.GIM_AABB*], [4 x float], i32 }
-%"struct.gjkepa2_impl::MinkowskiDiff" = type { [2 x %struct.btConvexShape*], %struct.btMatrix3x3, %struct.btTransform, %struct.anon }
-%struct.int3 = type { i32, i32, i32 }
-%struct.int4 = type { i32, i32, i32, i32 }
-%"struct.std::type_info" = type opaque
-%struct.timeval = type { i32, i32 }
-%"union.btBroadphasePair::._22" = type { i8* }
-%"union.btBroadphasePair::._24" = type { i8* }
-%"union.btDbvtNode::._22" = type { [2 x %struct.btDbvtNode*] }
-%"union.btDbvtNode::._23" = type { [2 x %struct.btDbvtNode*] }
-%"union.btDbvtNode::._25" = type { [2 x %struct.btDbvtNode*] }
-%"union.btHashPtr::._23" = type { [2 x i32] }
-%"union.btHeightfieldTerrainShape::._23" = type { i8* }
-%"union.btSolverConstraint::._25" = type { %struct.btRigidBody* }
-%"union.btSolverConstraint::._27" = type { i8* }
-%"union.btSolverConstraint::._30" = type { %struct.btRigidBody* }
-%"union.btSolverConstraint::._32" = type { i8* }
-%"union.btSolverConstraint::._33" = type { i32 }
-%"union.btSolverConstraint::._34" = type { i32 }
-%"union.btSolverConstraint::._35" = type { %struct.btRigidBody* }
-%"union.btSolverConstraint::._36" = type { %struct.btRigidBody* }
-%"union.btSolverConstraint::._37" = type { i8* }
-%"union.btTypedConstraint::._38" = type { i32 }
-
-@_ZGVZN12btQuaternion11getIdentityEvE12identityQuat = weak global i64 0, align 8 ; [#uses=0]
-@_ZGVZN11btMatrix3x311getIdentityEvE14identityMatrix = weak global i64 0, align 8 ; [#uses=4]
-@_ZGVZN11btTransform11getIdentityEvE17identityTransform = weak global i64 0, align 8 ; [#uses=4]
-@_ZTV13btMotionState = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI13btMotionState to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN13btMotionStateD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN13btMotionStateD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI13btMotionState = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([16 x i8]* @_ZTS13btMotionState, i32 0, i32 0) } } ; [#uses=2]
-@_ZTVN10__cxxabiv117__class_type_infoE = external constant [0 x i32 (...)*] ; [#uses=1]
-@_ZTS13btMotionState = weak_odr constant [16 x i8] c"13btMotionState\00" ; [#uses=1]
-@_ZTV20btDefaultMotionState = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btDefaultMotionState to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultMotionState*)* @_ZN20btDefaultMotionStateD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultMotionState*)* @_ZN20btDefaultMotionStateD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultMotionState*, %struct.btTransform*)* @_ZNK20btDefaultMotionState17getWorldTransformER11btTransform to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultMotionState*, %struct.btTransform*)* @_ZN20btDefaultMotionState17setWorldTransformERK11btTransform to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI20btDefaultMotionState = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([23 x i8]* @_ZTS20btDefaultMotionState, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI13btMotionState to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTVN10__cxxabiv120__si_class_type_infoE = external constant [0 x i32 (...)*] ; [#uses=1]
-@_ZTS20btDefaultMotionState = weak_odr constant [23 x i8] c"20btDefaultMotionState\00" ; [#uses=1]
-@.str = private constant [4 x i8] c"int\00", align 1 ; [#uses=1]
-@.str1 = private constant [19 x i8] c"btTriangleInfoData\00", align 1 ; [#uses=1]
-@.str2 = private constant [22 x i8] c"btTriangleInfoMapData\00", align 1 ; [#uses=1]
-@_ZTV17btTypedConstraint = weak_odr constant [13 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTypedConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*)* @_ZN17btTypedConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*)* @_ZN17btTypedConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*)* @_ZN17btTypedConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTypedConstraint*)* @_ZNK17btTypedConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btTypedConstraint*, i8*, %struct.btActionInterface*)* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI17btTypedConstraint = weak_odr constant %struct.__vmi_class_type_info_pseudo1 { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv121__vmi_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btTypedConstraint, i32 0, i32 0) }, i32 0, i32 1, [1 x %struct.__base_class_type_info_pseudo] [%struct.__base_class_type_info_pseudo { %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI13btTypedObject to %"struct.std::type_info"*), i32 1026 }] } ; [#uses=2]
-@_ZTVN10__cxxabiv121__vmi_class_type_infoE = external constant [0 x i32 (...)*] ; [#uses=1]
-@_ZTS17btTypedConstraint = weak_odr constant [20 x i8] c"17btTypedConstraint\00" ; [#uses=1]
-@_ZTI13btTypedObject = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([16 x i8]* @_ZTS13btTypedObject, i32 0, i32 0) } } ; [#uses=1]
-@_ZTS13btTypedObject = weak_odr constant [16 x i8] c"13btTypedObject\00" ; [#uses=1]
-@llvm.eh.catch.all.value = linkonce constant i8* null, section "llvm.metadata" ; [#uses=1]
-@_ZTV17btTriangleInfoMap = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTriangleInfoMap to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleInfoMap*)* @_ZN17btTriangleInfoMapD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleInfoMap*)* @_ZN17btTriangleInfoMapD0Ev to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleInfoMap*)* @_ZNK17btTriangleInfoMap28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btTriangleInfoMap*, i8*, %struct.btActionInterface*)* @_ZNK17btTriangleInfoMap9serializeEPvP12btSerializer to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI17btTriangleInfoMap = weak_odr constant %struct.__vmi_class_type_info_pseudo1 { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv121__vmi_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btTriangleInfoMap, i32 0, i32 0) }, i32 0, i32 1, [1 x %struct.__base_class_type_info_pseudo] [%struct.__base_class_type_info_pseudo { %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI9btHashMapI9btHashInt14btTriangleInfoE to %"struct.std::type_info"*), i32 1026 }] } ; [#uses=1]
-@_ZTS17btTriangleInfoMap = weak_odr constant [20 x i8] c"17btTriangleInfoMap\00" ; [#uses=1]
-@_ZTI9btHashMapI9btHashInt14btTriangleInfoE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([39 x i8]* @_ZTS9btHashMapI9btHashInt14btTriangleInfoE, i32 0, i32 0) } } ; [#uses=1]
-@_ZTS9btHashMapI9btHashInt14btTriangleInfoE = weak_odr constant [39 x i8] c"9btHashMapI9btHashInt14btTriangleInfoE\00", align 32 ; [#uses=1]
-@_ZZN11btMatrix3x311getIdentityEvE14identityMatrix = weak global %struct.btMatrix3x3 zeroinitializer, align 32 ; [#uses=2]
-@_ZZN11btTransform11getIdentityEvE17identityTransform = weak global %struct.btTransform zeroinitializer, align 32 ; [#uses=18]
-@.str3 = private constant [28 x i8] c"world pos = %.5f,%.5f,%.5f\0A\00", align 1 ; [#uses=1]
-@_ZTV21btBroadphaseInterface = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btBroadphaseInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN21btBroadphaseInterfaceD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN21btBroadphaseInterfaceD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btActionInterface*)* @_ZN21btBroadphaseInterface9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI21btBroadphaseInterface = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btBroadphaseInterface, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS21btBroadphaseInterface = weak_odr constant [24 x i8] c"21btBroadphaseInterface\00" ; [#uses=1]
-@_ZTV25btOverlappingPairCallback = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI25btOverlappingPairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN25btOverlappingPairCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN25btOverlappingPairCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI25btOverlappingPairCallback = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btOverlappingPairCallback, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS25btOverlappingPairCallback = weak_odr constant [28 x i8] c"25btOverlappingPairCallback\00" ; [#uses=1]
-@_ZTV22btOverlappingPairCache = weak_odr constant [19 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btOverlappingPairCache to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN22btOverlappingPairCacheD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN22btOverlappingPairCacheD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI22btOverlappingPairCache = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btOverlappingPairCache, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI25btOverlappingPairCallback to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS22btOverlappingPairCache = weak_odr constant [25 x i8] c"22btOverlappingPairCache\00" ; [#uses=1]
-@_ZTV20btAxisSweep3InternalIjE = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btAxisSweep3InternalIjE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZN20btAxisSweep3InternalIjED1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZN20btAxisSweep3InternalIjED0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphaseProxy* (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* @_ZN20btAxisSweep3InternalIjE11createProxyERK9btVector3S3_iPvssP12btDispatcherS4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE12destroyProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE7setAabbEP17btBroadphaseProxyRK9btVector3S5_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalIjE7getAabbEP17btBroadphaseProxyR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZN20btAxisSweep3InternalIjE7rayTestERK9btVector3S3_R23btBroadphaseRayCallbackS3_S3_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE8aabbTestERK9btVector3S3_R24btBroadphaseAabbCallback to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE25calculateOverlappingPairsEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZN20btAxisSweep3InternalIjE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZNK20btAxisSweep3InternalIjE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalIjE17getBroadphaseAabbER9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZN20btAxisSweep3InternalIjE10printStatsEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI20btAxisSweep3InternalIjE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS20btAxisSweep3InternalIjE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btBroadphaseInterface to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS20btAxisSweep3InternalIjE = weak_odr constant [26 x i8] c"20btAxisSweep3InternalIjE\00" ; [#uses=1]
-@_ZTV17bt32BitAxisSweep3 = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI17bt32BitAxisSweep3 to i32 (...)*), i32 (...)* bitcast (void (%struct.bt32BitAxisSweep3*)* @_ZN17bt32BitAxisSweep3D1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.bt32BitAxisSweep3*)* @_ZN17bt32BitAxisSweep3D0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphaseProxy* (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* @_ZN20btAxisSweep3InternalIjE11createProxyERK9btVector3S3_iPvssP12btDispatcherS4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE12destroyProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE7setAabbEP17btBroadphaseProxyRK9btVector3S5_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalIjE7getAabbEP17btBroadphaseProxyR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZN20btAxisSweep3InternalIjE7rayTestERK9btVector3S3_R23btBroadphaseRayCallbackS3_S3_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE8aabbTestERK9btVector3S3_R24btBroadphaseAabbCallback to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE25calculateOverlappingPairsEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZN20btAxisSweep3InternalIjE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZNK20btAxisSweep3InternalIjE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalIjE17getBroadphaseAabbER9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalIjE9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<unsigned int>"*)* @_ZN20btAxisSweep3InternalIjE10printStatsEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI17bt32BitAxisSweep3 = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17bt32BitAxisSweep3, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btAxisSweep3InternalIjE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS17bt32BitAxisSweep3 = weak_odr constant [20 x i8] c"17bt32BitAxisSweep3\00" ; [#uses=1]
-@_ZTV20btAxisSweep3InternalItE = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btAxisSweep3InternalItE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZN20btAxisSweep3InternalItED1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZN20btAxisSweep3InternalItED0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphaseProxy* (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* @_ZN20btAxisSweep3InternalItE11createProxyERK9btVector3S3_iPvssP12btDispatcherS4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE12destroyProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE7setAabbEP17btBroadphaseProxyRK9btVector3S5_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalItE7getAabbEP17btBroadphaseProxyR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZN20btAxisSweep3InternalItE7rayTestERK9btVector3S3_R23btBroadphaseRayCallbackS3_S3_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE8aabbTestERK9btVector3S3_R24btBroadphaseAabbCallback to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE25calculateOverlappingPairsEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZN20btAxisSweep3InternalItE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZNK20btAxisSweep3InternalItE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalItE17getBroadphaseAabbER9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZN20btAxisSweep3InternalItE10printStatsEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI20btAxisSweep3InternalItE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS20btAxisSweep3InternalItE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btBroadphaseInterface to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS20btAxisSweep3InternalItE = weak_odr constant [26 x i8] c"20btAxisSweep3InternalItE\00" ; [#uses=1]
-@_ZTV12btAxisSweep3 = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI12btAxisSweep3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btAxisSweep3*)* @_ZN12btAxisSweep3D1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btAxisSweep3*)* @_ZN12btAxisSweep3D0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphaseProxy* (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* @_ZN20btAxisSweep3InternalItE11createProxyERK9btVector3S3_iPvssP12btDispatcherS4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE12destroyProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE7setAabbEP17btBroadphaseProxyRK9btVector3S5_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalItE7getAabbEP17btBroadphaseProxyR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZN20btAxisSweep3InternalItE7rayTestERK9btVector3S3_R23btBroadphaseRayCallbackS3_S3_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE8aabbTestERK9btVector3S3_R24btBroadphaseAabbCallback to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE25calculateOverlappingPairsEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZN20btAxisSweep3InternalItE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZNK20btAxisSweep3InternalItE23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btAxisSweep3InternalItE17getBroadphaseAabbER9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*, %struct.btActionInterface*)* @_ZN20btAxisSweep3InternalItE9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%"struct.btAxisSweep3Internal<short unsigned int>"*)* @_ZN20btAxisSweep3InternalItE10printStatsEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI12btAxisSweep3 = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12btAxisSweep3, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btAxisSweep3InternalItE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS12btAxisSweep3 = weak_odr constant [15 x i8] c"12btAxisSweep3\00" ; [#uses=1]
-@_ZTV15btNullPairCache = weak_odr constant [19 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btNullPairCache to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*)* @_ZN15btNullPairCacheD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*)* @_ZN15btNullPairCacheD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btNullPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN15btNullPairCache18addOverlappingPairEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btNullPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN15btNullPairCache21removeOverlappingPairEP17btBroadphaseProxyS1_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN15btNullPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btNullPairCache*)* @_ZN15btNullPairCache26getOverlappingPairArrayPtrEv to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btNullPairCache*)* @_ZNK15btNullPairCache26getOverlappingPairArrayPtrEv to i32 (...)*), i32 (...)* bitcast (%"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct.btNullPairCache*)* @_ZN15btNullPairCache23getOverlappingPairArrayEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*, %struct.btBroadphasePair*, %struct.btActionInterface*)* @_ZN15btNullPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btNullPairCache*)* @_ZNK15btNullPairCache22getNumOverlappingPairsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN15btNullPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*, %struct.btActionInterface*)* @_ZN15btNullPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*, %struct.btActionInterface*, %struct.btActionInterface*)* @_ZN15btNullPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btNullPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN15btNullPairCache8findPairEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btNullPairCache*)* @_ZN15btNullPairCache18hasDeferredRemovalEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*, %struct.btActionInterface*)* @_ZN15btNullPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btNullPairCache*, %struct.btActionInterface*)* @_ZN15btNullPairCache20sortOverlappingPairsEP12btDispatcher to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btNullPairCache = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btNullPairCache, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btOverlappingPairCache to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS15btNullPairCache = weak_odr constant [18 x i8] c"15btNullPairCache\00" ; [#uses=1]
-@_ZTV20btCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI20btCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionAlgorithm*)* @_ZN20btCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionAlgorithm*)* @_ZN20btCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI20btCollisionAlgorithm = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([23 x i8]* @_ZTS20btCollisionAlgorithm, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS20btCollisionAlgorithm = weak_odr constant [23 x i8] c"20btCollisionAlgorithm\00" ; [#uses=1]
-@_ZTVN6btDbvt8ICollideE = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTIN6btDbvt8ICollideE to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN6btDbvt8ICollideD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN6btDbvt8ICollideD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, float)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodef to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7DescentEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide9AllLeavesEPK10btDbvtNode to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTIN6btDbvt8ICollideE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTSN6btDbvt8ICollideE, i32 0, i32 0) } } ; [#uses=2]
-@_ZTSN6btDbvt8ICollideE = weak_odr constant [19 x i8] c"N6btDbvt8ICollideE\00" ; [#uses=1]
-@_ZTV20btDbvtNodeEnumerator = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btDbvtNodeEnumerator to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtNodeEnumerator*)* @_ZN20btDbvtNodeEnumeratorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtNodeEnumerator*)* @_ZN20btDbvtNodeEnumeratorD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtNodeEnumerator*, %struct.btDbvtNode*)* @_ZN20btDbvtNodeEnumerator7ProcessEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, float)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodef to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7DescentEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide9AllLeavesEPK10btDbvtNode to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI20btDbvtNodeEnumerator = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([23 x i8]* @_ZTS20btDbvtNodeEnumerator, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN6btDbvt8ICollideE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS20btDbvtNodeEnumerator = weak_odr constant [23 x i8] c"20btDbvtNodeEnumerator\00" ; [#uses=1]
-@_ZGVZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis = internal global i64 0, align 8 ; [#uses=3]
-@_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis = internal global [3 x %struct.btQuadWord] zeroinitializer, align 32 ; [#uses=15]
-@_ZTV18btDbvtTreeCollider = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI18btDbvtTreeCollider to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtTreeCollider*)* @_ZN18btDbvtTreeColliderD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtTreeCollider*)* @_ZN18btDbvtTreeColliderD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtTreeCollider*, %struct.btDbvtNode*, %struct.btDbvtNode*)* @_ZN18btDbvtTreeCollider7ProcessEPK10btDbvtNodeS2_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtTreeCollider*, %struct.btDbvtNode*)* @_ZN18btDbvtTreeCollider7ProcessEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, float)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodef to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7DescentEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide9AllLeavesEPK10btDbvtNode to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btDbvtTreeCollider = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btDbvtTreeCollider, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN6btDbvt8ICollideE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS18btDbvtTreeCollider = weak_odr constant [21 x i8] c"18btDbvtTreeCollider\00" ; [#uses=1]
-@_ZTV19BroadphaseRayTester = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI19BroadphaseRayTester to i32 (...)*), i32 (...)* bitcast (void (%struct.BroadphaseRayTester*)* @_ZN19BroadphaseRayTesterD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.BroadphaseRayTester*)* @_ZN19BroadphaseRayTesterD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.BroadphaseRayTester*, %struct.btDbvtNode*)* @_ZN19BroadphaseRayTester7ProcessEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, float)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodef to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7DescentEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide9AllLeavesEPK10btDbvtNode to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI19BroadphaseRayTester = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([22 x i8]* @_ZTS19BroadphaseRayTester, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN6btDbvt8ICollideE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS19BroadphaseRayTester = weak_odr constant [22 x i8] c"19BroadphaseRayTester\00" ; [#uses=1]
-@_ZTV20BroadphaseAabbTester = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20BroadphaseAabbTester to i32 (...)*), i32 (...)* bitcast (void (%struct.BroadphaseAabbTester*)* @_ZN20BroadphaseAabbTesterD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.BroadphaseAabbTester*)* @_ZN20BroadphaseAabbTesterD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.BroadphaseAabbTester*, %struct.btDbvtNode*)* @_ZN20BroadphaseAabbTester7ProcessEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, float)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodef to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7DescentEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide9AllLeavesEPK10btDbvtNode to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI20BroadphaseAabbTester = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([23 x i8]* @_ZTS20BroadphaseAabbTester, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN6btDbvt8ICollideE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS20BroadphaseAabbTester = weak_odr constant [23 x i8] c"20BroadphaseAabbTester\00" ; [#uses=1]
-@_ZTV16btDbvtBroadphase = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btDbvtBroadphase to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*)* @_ZN16btDbvtBroadphaseD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*)* @_ZN16btDbvtBroadphaseD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphaseProxy* (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* @_ZN16btDbvtBroadphase11createProxyERK9btVector3S2_iPvssP12btDispatcherS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN16btDbvtBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN16btDbvtBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK16btDbvtBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZN16btDbvtBroadphase7rayTestERK9btVector3S2_R23btBroadphaseRayCallbackS2_S2_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN16btDbvtBroadphase8aabbTestERK9btVector3S2_R24btBroadphaseAabbCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btActionInterface*)* @_ZN16btDbvtBroadphase25calculateOverlappingPairsEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%struct.btDbvtBroadphase*)* @_ZN16btDbvtBroadphase23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%struct.btDbvtBroadphase*)* @_ZNK16btDbvtBroadphase23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK16btDbvtBroadphase17getBroadphaseAabbER9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*, %struct.btActionInterface*)* @_ZN16btDbvtBroadphase9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btDbvtBroadphase*)* @_ZN16btDbvtBroadphase10printStatsEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI16btDbvtBroadphase = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btDbvtBroadphase, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btBroadphaseInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btDbvtBroadphase = weak_odr constant [19 x i8] c"16btDbvtBroadphase\00" ; [#uses=1]
-@_ZTV12btDispatcher = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN12btDispatcherD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN12btDispatcherD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI12btDispatcher = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12btDispatcher, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS12btDispatcher = weak_odr constant [15 x i8] c"12btDispatcher\00" ; [#uses=1]
-@_ZTV23btOverlapFilterCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI23btOverlapFilterCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN23btOverlapFilterCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN23btOverlapFilterCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI23btOverlapFilterCallback = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btOverlapFilterCallback, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS23btOverlapFilterCallback = weak_odr constant [26 x i8] c"23btOverlapFilterCallback\00" ; [#uses=1]
-@_ZTVZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheEN31btMultiSapOverlapFilterCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheEN31btMultiSapOverlapFilterCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheENK31btMultiSapOverlapFilterCallback23needBroadphaseCollisionEP17btBroadphaseProxyS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([88 x i8]* @_ZTSZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI23btOverlapFilterCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback = weak_odr constant [88 x i8] c"ZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback\00", align 32 ; [#uses=1]
-@_ZTV21btNodeOverlapCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btNodeOverlapCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN21btNodeOverlapCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN21btNodeOverlapCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI21btNodeOverlapCallback = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btNodeOverlapCallback, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS21btNodeOverlapCallback = weak_odr constant [24 x i8] c"21btNodeOverlapCallback\00" ; [#uses=1]
-@_ZTVZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..1MyNodeOverlapCallback*)* @_ZZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherEN21MyNodeOverlapCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1MyNodeOverlapCallback*)* @_ZZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherEN21MyNodeOverlapCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1MyNodeOverlapCallback*, i32, i32)* @_ZZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherEN21MyNodeOverlapCallback11processNodeEii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([108 x i8]* @_ZTSZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btNodeOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback = weak_odr constant [108 x i8] c"ZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback\00", align 32 ; [#uses=1]
-@stopUpdating = global i8 0 ; [#uses=1]
-@_ZTV20btMultiSapBroadphase = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btMultiSapBroadphase to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*)* @_ZN20btMultiSapBroadphaseD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*)* @_ZN20btMultiSapBroadphaseD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphaseProxy* (%struct.btMultiSapBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* @_ZN20btMultiSapBroadphase11createProxyERK9btVector3S2_iPvssP12btDispatcherS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN20btMultiSapBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btMultiSapBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZN20btMultiSapBroadphase7rayTestERK9btVector3S2_R23btBroadphaseRayCallbackS2_S2_ to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*, %struct.btActionInterface*)* @_ZN20btMultiSapBroadphase25calculateOverlappingPairsEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%struct.btMultiSapBroadphase*)* @_ZN20btMultiSapBroadphase23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%struct.btMultiSapBroadphase*)* @_ZNK20btMultiSapBroadphase23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK20btMultiSapBroadphase17getBroadphaseAabbER9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*, %struct.btActionInterface*)* @_ZN20btMultiSapBroadphase9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSapBroadphase*)* @_ZN20btMultiSapBroadphase10printStatsEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI20btMultiSapBroadphase = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([23 x i8]* @_ZTS20btMultiSapBroadphase, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btBroadphaseInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS20btMultiSapBroadphase = weak_odr constant [23 x i8] c"20btMultiSapBroadphase\00" ; [#uses=1]
-@gOverlappingPairs = global i32 0 ; [#uses=16]
-@_ZTV17btOverlapCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btOverlapCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN17btOverlapCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN17btOverlapCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI17btOverlapCallback = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btOverlapCallback, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS17btOverlapCallback = weak_odr constant [20 x i8] c"17btOverlapCallback\00" ; [#uses=1]
-@_ZTVZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0CleanPairCallback*)* @_ZZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0CleanPairCallback*)* @_ZZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct..0CleanPairCallback*, %struct.btBroadphasePair*)* @_ZZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallback14processOverlapER16btBroadphasePair to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([110 x i8]* @_ZTSZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback = weak_odr constant [110 x i8] c"ZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback\00", align 32 ; [#uses=1]
-@_ZTVZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..1RemovePairCallback*)* @_ZZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1RemovePairCallback*)* @_ZZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct..1RemovePairCallback*, %struct.btBroadphasePair*)* @_ZZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallback14processOverlapER16btBroadphasePair to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([129 x i8]* @_ZTSZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback = weak_odr constant [129 x i8] c"ZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback\00", align 32 ; [#uses=1]
-@gRemovePairs = global i32 0 ; [#uses=4]
-@_ZTVZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0CleanPairCallback*)* @_ZZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0CleanPairCallback*)* @_ZZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct..0CleanPairCallback*, %struct.btBroadphasePair*)* @_ZZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallback14processOverlapER16btBroadphasePair to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([110 x i8]* @_ZTSZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback = weak_odr constant [110 x i8] c"ZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback\00", align 32 ; [#uses=1]
-@_ZTVZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..1RemovePairCallback*)* @_ZZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1RemovePairCallback*)* @_ZZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct..1RemovePairCallback*, %struct.btBroadphasePair*)* @_ZZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallback14processOverlapER16btBroadphasePair to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([129 x i8]* @_ZTSZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback = weak_odr constant [129 x i8] c"ZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback\00", align 32 ; [#uses=1]
-@gFindPairs = global i32 0 ; [#uses=2]
-@_ZTV28btSortedOverlappingPairCache = weak_odr constant [19 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI28btSortedOverlappingPairCache to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*)* @_ZN28btSortedOverlappingPairCacheD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*)* @_ZN28btSortedOverlappingPairCacheD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btSortedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN28btSortedOverlappingPairCache18addOverlappingPairEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btSortedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache21removeOverlappingPairEP17btBroadphaseProxyS1_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btSortedOverlappingPairCache*)* @_ZN28btSortedOverlappingPairCache26getOverlappingPairArrayPtrEv to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btSortedOverlappingPairCache*)* @_ZNK28btSortedOverlappingPairCache26getOverlappingPairArrayPtrEv to i32 (...)*), i32 (...)* bitcast (%"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct.btSortedOverlappingPairCache*)* @_ZN28btSortedOverlappingPairCache23getOverlappingPairArrayEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*, %struct.btBroadphasePair*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btSortedOverlappingPairCache*)* @_ZNK28btSortedOverlappingPairCache22getNumOverlappingPairsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*, %struct.btActionInterface*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btSortedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN28btSortedOverlappingPairCache8findPairEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btSortedOverlappingPairCache*)* @_ZN28btSortedOverlappingPairCache18hasDeferredRemovalEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btSortedOverlappingPairCache*, %struct.btActionInterface*)* @_ZN28btSortedOverlappingPairCache20sortOverlappingPairsEP12btDispatcher to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI28btSortedOverlappingPairCache = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([31 x i8]* @_ZTS28btSortedOverlappingPairCache, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btOverlappingPairCache to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS28btSortedOverlappingPairCache = weak_odr constant [31 x i8] c"28btSortedOverlappingPairCache\00", align 4 ; [#uses=1]
-@_ZTV28btHashedOverlappingPairCache = weak_odr constant [19 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI28btHashedOverlappingPairCache to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*)* @_ZN28btHashedOverlappingPairCacheD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*)* @_ZN28btHashedOverlappingPairCacheD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN28btHashedOverlappingPairCache18addOverlappingPairEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache21removeOverlappingPairEP17btBroadphaseProxyS1_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btHashedOverlappingPairCache*)* @_ZN28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btHashedOverlappingPairCache*)* @_ZNK28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv to i32 (...)*), i32 (...)* bitcast (%"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct.btHashedOverlappingPairCache*)* @_ZN28btHashedOverlappingPairCache23getOverlappingPairArrayEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*, %struct.btBroadphasePair*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btHashedOverlappingPairCache*)* @_ZNK28btHashedOverlappingPairCache22getNumOverlappingPairsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*, %struct.btActionInterface*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphasePair* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN28btHashedOverlappingPairCache8findPairEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btHashedOverlappingPairCache*)* @_ZN28btHashedOverlappingPairCache18hasDeferredRemovalEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btHashedOverlappingPairCache*, %struct.btActionInterface*)* @_ZN28btHashedOverlappingPairCache20sortOverlappingPairsEP12btDispatcher to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI28btHashedOverlappingPairCache = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([31 x i8]* @_ZTS28btHashedOverlappingPairCache, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btOverlappingPairCache to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS28btHashedOverlappingPairCache = weak_odr constant [31 x i8] c"28btHashedOverlappingPairCache\00", align 4 ; [#uses=1]
-@gAddedPairs = global i32 0 ; [#uses=4]
-@maxIterations = global i32 0 ; [#uses=8]
-@.str4 = private constant [23 x i8] c"btOptimizedBvhNodeData\00", align 1 ; [#uses=1]
-@.str15 = private constant [23 x i8] c"btQuantizedBvhNodeData\00", align 1 ; [#uses=1]
-@.str26 = private constant [21 x i8] c"btBvhSubtreeInfoData\00", align 1 ; [#uses=1]
-@.str37 = private constant [24 x i8] c"btQuantizedBvhFloatData\00", align 1 ; [#uses=1]
-@_ZTV14btQuantizedBvh = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI14btQuantizedBvh to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuantizedBvh*)* @_ZN14btQuantizedBvhD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuantizedBvh*)* @_ZN14btQuantizedBvhD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btQuantizedBvh*, i8*, i32, i8)* @_ZNK14btQuantizedBvh9serializeEPvjb to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btQuantizedBvh*)* @_ZNK14btQuantizedBvh31calculateSerializeBufferSizeNewEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btQuantizedBvh*, i8*, %struct.btActionInterface*)* @_ZNK14btQuantizedBvh9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuantizedBvh*, %struct.btQuantizedBvhFloatData*)* @_ZN14btQuantizedBvh16deSerializeFloatER23btQuantizedBvhFloatData to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuantizedBvh*, %struct.btQuantizedBvhDoubleData*)* @_ZN14btQuantizedBvh17deSerializeDoubleER24btQuantizedBvhDoubleData to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI14btQuantizedBvh = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([17 x i8]* @_ZTS14btQuantizedBvh, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS14btQuantizedBvh = weak_odr constant [17 x i8] c"14btQuantizedBvh\00" ; [#uses=1]
-@_ZTV18btSimpleBroadphase = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI18btSimpleBroadphase to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*)* @_ZN18btSimpleBroadphaseD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*)* @_ZN18btSimpleBroadphaseD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btBroadphaseProxy* (%struct.btSimpleBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* @_ZN18btSimpleBroadphase11createProxyERK9btVector3S2_iPvssP12btDispatcherS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* @_ZN18btSimpleBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN18btSimpleBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK18btSimpleBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZN18btSimpleBroadphase7rayTestERK9btVector3S2_R23btBroadphaseRayCallbackS2_S2_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* @_ZN18btSimpleBroadphase8aabbTestERK9btVector3S2_R24btBroadphaseAabbCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btActionInterface*)* @_ZN18btSimpleBroadphase25calculateOverlappingPairsEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%struct.btSimpleBroadphase*)* @_ZN18btSimpleBroadphase23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (%struct..0btMultiSapOverlapFilterCallback* (%struct.btSimpleBroadphase*)* @_ZNK18btSimpleBroadphase23getOverlappingPairCacheEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK18btSimpleBroadphase17getBroadphaseAabbER9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*, %struct.btActionInterface*)* @_ZN18btSimpleBroadphase9resetPoolEP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleBroadphase*)* @_ZN18btSimpleBroadphase10printStatsEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btSimpleBroadphase = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btSimpleBroadphase, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btBroadphaseInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS18btSimpleBroadphase = weak_odr constant [21 x i8] c"18btSimpleBroadphase\00" ; [#uses=1]
-@_ZTV30btActivatingCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btActivatingCollisionAlgorithm*)* @_ZN30btActivatingCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActivatingCollisionAlgorithm*)* @_ZN30btActivatingCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI30btActivatingCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTS30btActivatingCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI20btCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS30btActivatingCollisionAlgorithm = weak_odr constant [33 x i8] c"30btActivatingCollisionAlgorithm\00", align 32 ; [#uses=1]
-@_ZTV26btBoxBoxCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI26btBoxBoxCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*)* @_ZN26btBoxBoxCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*)* @_ZN26btBoxBoxCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN26btBoxBoxCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btBox2dBox2dCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN26btBoxBoxCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN26btBoxBoxCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI26btBoxBoxCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([29 x i8]* @_ZTS26btBoxBoxCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS26btBoxBoxCollisionAlgorithm = weak_odr constant [29 x i8] c"26btBoxBoxCollisionAlgorithm\00" ; [#uses=1]
-@b2_maxManifoldPoints = global i32 2 ; [#uses=2]
-@_ZTV30btBox2dBox2dCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btBox2dBox2dCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*)* @_ZN30btBox2dBox2dCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*)* @_ZN30btBox2dBox2dCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN30btBox2dBox2dCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btBox2dBox2dCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN30btBox2dBox2dCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN30btBox2dBox2dCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI30btBox2dBox2dCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTS30btBox2dBox2dCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS30btBox2dBox2dCollisionAlgorithm = weak_odr constant [33 x i8] c"30btBox2dBox2dCollisionAlgorithm\00", align 32 ; [#uses=1]
-@_ZTV36btDiscreteCollisionDetectorInterface = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI36btDiscreteCollisionDetectorInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN36btDiscreteCollisionDetectorInterfaceD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN36btDiscreteCollisionDetectorInterfaceD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI36btDiscreteCollisionDetectorInterface = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([39 x i8]* @_ZTS36btDiscreteCollisionDetectorInterface, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS36btDiscreteCollisionDetectorInterface = weak_odr constant [39 x i8] c"36btDiscreteCollisionDetectorInterface\00", align 32 ; [#uses=1]
-@_ZTV16btBoxBoxDetector = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btBoxBoxDetector to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxBoxDetector*)* @_ZN16btBoxBoxDetectorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxBoxDetector*)* @_ZN16btBoxBoxDetectorD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxBoxDetector*, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"*, %struct.btActionInterface*, %struct.btActionInterface*, i8)* @_ZN16btBoxBoxDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI16btBoxBoxDetector = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btBoxBoxDetector, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI36btDiscreteCollisionDetectorInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btBoxBoxDetector = weak_odr constant [19 x i8] c"16btBoxBoxDetector\00" ; [#uses=1]
-@gNumManifold = global i32 0 ; [#uses=4]
-@_ZTVN36btDiscreteCollisionDetectorInterface6ResultE = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTIN36btDiscreteCollisionDetectorInterface6ResultE to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN36btDiscreteCollisionDetectorInterface6ResultD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN36btDiscreteCollisionDetectorInterface6ResultD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN36btDiscreteCollisionDetectorInterface6ResultE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([48 x i8]* @_ZTSN36btDiscreteCollisionDetectorInterface6ResultE, i32 0, i32 0) } } ; [#uses=2]
-@_ZTSN36btDiscreteCollisionDetectorInterface6ResultE = weak_odr constant [48 x i8] c"N36btDiscreteCollisionDetectorInterface6ResultE\00", align 32 ; [#uses=1]
-@_ZTV23btCollisionPairCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btCollisionPairCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionPairCallback*)* @_ZN23btCollisionPairCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionPairCallback*)* @_ZN23btCollisionPairCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btCollisionPairCallback*, %struct.btBroadphasePair*)* @_ZN23btCollisionPairCallback14processOverlapER16btBroadphasePair to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI23btCollisionPairCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btCollisionPairCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS23btCollisionPairCallback = weak_odr constant [26 x i8] c"23btCollisionPairCallback\00" ; [#uses=1]
-@_ZTV21btCollisionDispatcher = weak_odr constant [16 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btCollisionDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionDispatcher*)* @_ZN21btCollisionDispatcherD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionDispatcher*)* @_ZN21btCollisionDispatcherD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%struct.btCollisionDispatcher*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* @_ZN21btCollisionDispatcher13findAlgorithmEP17btCollisionObjectS1_P20btPersistentManifold to i32 (...)*), i32 (...)* bitcast (%struct.btPersistentManifold* (%struct.btCollisionDispatcher*, i8*, i8*)* @_ZN21btCollisionDispatcher14getNewManifoldEPvS0_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionDispatcher*, %struct.btPersistentManifold*)* @_ZN21btCollisionDispatcher15releaseManifoldEP20btPersistentManifold to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionDispatcher*, %struct.btPersistentManifold*)* @_ZN21btCollisionDispatcher13clearManifoldEP20btPersistentManifold to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btCollisionDispatcher*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN21btCollisionDispatcher14needsCollisionEP17btCollisionObjectS1_ to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btCollisionDispatcher*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN21btCollisionDispatcher13needsResponseEP17btCollisionObjectS1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionDispatcher*, %struct..0btMultiSapOverlapFilterCallback*, %struct.btDispatcherInfo*, %struct.btActionInterface*)* @_ZN21btCollisionDispatcher25dispatchAllCollisionPairsEP22btOverlappingPairCacheRK16btDispatcherInfoP12btDispatcher to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionDispatcher*)* @_ZNK21btCollisionDispatcher15getNumManifoldsEv to i32 (...)*), i32 (...)* bitcast (%struct.btPersistentManifold* (%struct.btCollisionDispatcher*, i32)* @_ZN21btCollisionDispatcher26getManifoldByIndexInternalEi to i32 (...)*), i32 (...)* bitcast (%struct.btPersistentManifold** (%struct.btCollisionDispatcher*)* @_ZN21btCollisionDispatcher26getInternalManifoldPointerEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionDispatcher*, i32)* @_ZN21btCollisionDispatcher26allocateCollisionAlgorithmEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionDispatcher*, i8*)* @_ZN21btCollisionDispatcher22freeCollisionAlgorithmEPv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI21btCollisionDispatcher = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btCollisionDispatcher, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI12btDispatcher to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS21btCollisionDispatcher = weak_odr constant [24 x i8] c"21btCollisionDispatcher\00" ; [#uses=1]
-@_ZTV17btCollisionObject = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btCollisionObject to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN17btCollisionObject24checkCollideWithOverrideEPS_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*)* @_ZN17btCollisionObjectD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*)* @_ZN17btCollisionObjectD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*, %struct.btCollisionShape*)* @_ZN17btCollisionObject17setCollisionShapeEP16btCollisionShape to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionObject*)* @_ZNK17btCollisionObject28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionObject*, i8*, %struct.btActionInterface*)* @_ZNK17btCollisionObject9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*, %struct.btActionInterface*)* @_ZNK17btCollisionObject21serializeSingleObjectEP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI17btCollisionObject = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btCollisionObject, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS17btCollisionObject = weak_odr constant [20 x i8] c"17btCollisionObject\00" ; [#uses=1]
-@.str11 = private constant [27 x i8] c"btCollisionObjectFloatData\00", align 1 ; [#uses=1]
-@_ZTVN16btCollisionWorld17RayResultCallbackE = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTIN16btCollisionWorld17RayResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::RayResultCallback"*)* @_ZN16btCollisionWorld17RayResultCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::RayResultCallback"*)* @_ZN16btCollisionWorld17RayResultCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btCollisionWorld::RayResultCallback"*, %struct.btBroadphaseProxy*)* @_ZNK16btCollisionWorld17RayResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN16btCollisionWorld17RayResultCallbackE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([40 x i8]* @_ZTSN16btCollisionWorld17RayResultCallbackE, i32 0, i32 0) } } ; [#uses=2]
-@_ZTSN16btCollisionWorld17RayResultCallbackE = weak_odr constant [40 x i8] c"N16btCollisionWorld17RayResultCallbackE\00", align 32 ; [#uses=1]
-@_ZTVN16btCollisionWorld20ConvexResultCallbackE = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTIN16btCollisionWorld20ConvexResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::ConvexResultCallback"*)* @_ZN16btCollisionWorld20ConvexResultCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::ConvexResultCallback"*)* @_ZN16btCollisionWorld20ConvexResultCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btBroadphaseProxy*)* @_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN16btCollisionWorld20ConvexResultCallbackE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([43 x i8]* @_ZTSN16btCollisionWorld20ConvexResultCallbackE, i32 0, i32 0) } } ; [#uses=2]
-@_ZTSN16btCollisionWorld20ConvexResultCallbackE = weak_odr constant [43 x i8] c"N16btCollisionWorld20ConvexResultCallbackE\00", align 32 ; [#uses=1]
-@_ZTV30btConvexPenetrationDepthSolver = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btConvexPenetrationDepthSolver to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN30btConvexPenetrationDepthSolverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN30btConvexPenetrationDepthSolverD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI30btConvexPenetrationDepthSolver = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTS30btConvexPenetrationDepthSolver, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS30btConvexPenetrationDepthSolver = weak_odr constant [33 x i8] c"30btConvexPenetrationDepthSolver\00", align 32 ; [#uses=1]
-@_ZTVN12btConvexCast10CastResultE = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTIN12btConvexCast10CastResultE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvexCast::CastResult"*, float)* @_ZN12btConvexCast10CastResult9DebugDrawEf to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvexCast::CastResult"*, %struct.btTransform*)* @_ZN12btConvexCast10CastResult15drawCoordSystemERK11btTransform to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvexCast::CastResult"*)* @_ZN12btConvexCast10CastResultD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvexCast::CastResult"*)* @_ZN12btConvexCast10CastResultD0Ev to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN12btConvexCast10CastResultE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([29 x i8]* @_ZTSN12btConvexCast10CastResultE, i32 0, i32 0) } } ; [#uses=1]
-@_ZTSN12btConvexCast10CastResultE = weak_odr constant [29 x i8] c"N12btConvexCast10CastResultE\00" ; [#uses=1]
-@_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2 = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2 to i32 (...)*), i32 (...)* bitcast (void (%struct..2LocalInfoAdder2*)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN15LocalInfoAdder2D1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..2LocalInfoAdder2*)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN15LocalInfoAdder2D0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btCollisionWorld::RayResultCallback"*, %struct.btBroadphaseProxy*)* @_ZNK16btCollisionWorld17RayResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (float (%struct..2LocalInfoAdder2*, %"struct.btCollisionWorld::LocalRayResult"*, i8)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN15LocalInfoAdder215addSingleResultERNS_14LocalRayResultEb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2 = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([140 x i8]* @_ZTSZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN16btCollisionWorld17RayResultCallbackE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2 = weak_odr constant [140 x i8] c"ZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2\00", align 32 ; [#uses=1]
-@_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder to i32 (...)*), i32 (...)* bitcast (void (%struct..5LocalInfoAdder*)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN14LocalInfoAdderD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..5LocalInfoAdder*)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN14LocalInfoAdderD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btBroadphaseProxy*)* @_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (float (%struct..5LocalInfoAdder*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN14LocalInfoAdder15addSingleResultERNS_17LocalConvexResultEb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([164 x i8]* @_ZTSZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN16btCollisionWorld20ConvexResultCallbackE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder = weak_odr constant [164 x i8] c"ZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder\00", align 32 ; [#uses=1]
-@_ZTV24btBroadphaseAabbCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI24btBroadphaseAabbCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN24btBroadphaseAabbCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN24btBroadphaseAabbCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI24btBroadphaseAabbCallback = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([27 x i8]* @_ZTS24btBroadphaseAabbCallback, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS24btBroadphaseAabbCallback = weak_odr constant [27 x i8] c"24btBroadphaseAabbCallback\00" ; [#uses=1]
-@_ZTV23btBroadphaseRayCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btBroadphaseRayCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btBroadphaseRayCallback*)* @_ZN23btBroadphaseRayCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBroadphaseRayCallback*)* @_ZN23btBroadphaseRayCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI23btBroadphaseRayCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btBroadphaseRayCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI24btBroadphaseAabbCallback to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS23btBroadphaseRayCallback = weak_odr constant [26 x i8] c"23btBroadphaseRayCallback\00" ; [#uses=1]
-@_ZTV23btSingleContactCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btSingleContactCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btSingleContactCallback*)* @_ZN23btSingleContactCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSingleContactCallback*)* @_ZN23btSingleContactCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btSingleContactCallback*, %struct.btBroadphaseProxy*)* @_ZN23btSingleContactCallback7processEPK17btBroadphaseProxy to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI23btSingleContactCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btSingleContactCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI24btBroadphaseAabbCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS23btSingleContactCallback = weak_odr constant [26 x i8] c"23btSingleContactCallback\00" ; [#uses=1]
-@_ZTV17DebugDrawcallback = weak_odr constant [11 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__vmi_class_type_info_pseudo2* @_ZTI17DebugDrawcallback to i32 (...)*), i32 (...)* bitcast (void (%struct.DebugDrawcallback*)* @_ZN17DebugDrawcallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.DebugDrawcallback*)* @_ZN17DebugDrawcallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.DebugDrawcallback*, %struct.btQuadWord*, i32, i32)* @_ZN17DebugDrawcallback15processTriangleEP9btVector3ii to i32 (...)*), i32 (...)* bitcast (void (%struct.DebugDrawcallback*, %struct.btQuadWord*, i32, i32)* @_ZN17DebugDrawcallback28internalProcessTriangleIndexEP9btVector3ii to i32 (...)*), i32 (...)* inttoptr (i32 -4 to i32 (...)*), i32 (...)* bitcast (%struct.__vmi_class_type_info_pseudo2* @_ZTI17DebugDrawcallback to i32 (...)*), i32 (...)* bitcast (void (%struct.DebugDrawcallback*)* @_ZThn4_N17DebugDrawcallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.DebugDrawcallback*)* @_ZThn4_N17DebugDrawcallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.DebugDrawcallback*, %struct.btQuadWord*, i32, i32)* @_ZThn4_N17DebugDrawcallback28internalProcessTriangleIndexEP9btVector3ii to i32 (...)*)], align 32 ; [#uses=2]
-@_ZTI17DebugDrawcallback = weak_odr constant %struct.__vmi_class_type_info_pseudo2 { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv121__vmi_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17DebugDrawcallback, i32 0, i32 0) }, i32 0, i32 2, [2 x %struct.__base_class_type_info_pseudo] [%struct.__base_class_type_info_pseudo { %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*), i32 2 }, %struct.__base_class_type_info_pseudo { %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*), i32 1026 }] }, align 32 ; [#uses=1]
-@_ZTS17DebugDrawcallback = weak_odr constant [20 x i8] c"17DebugDrawcallback\00" ; [#uses=1]
-@.str12 = private constant [4 x i8] c"int\00", align 1 ; [#uses=0]
-@.str113 = private constant [19 x i8] c"btTriangleInfoData\00", align 1 ; [#uses=0]
-@.str214 = private constant [22 x i8] c"btTriangleInfoMapData\00", align 1 ; [#uses=0]
-@_ZTV23btBridgedManifoldResult = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btBridgedManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btBridgedManifoldResult*)* @_ZN23btBridgedManifoldResultD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBridgedManifoldResult*)* @_ZN23btBridgedManifoldResultD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*, i32, i32)* @_ZN16btManifoldResult20setShapeIdentifiersAEii to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*, i32, i32)* @_ZN16btManifoldResult20setShapeIdentifiersBEii to i32 (...)*), i32 (...)* bitcast (void (%struct.btBridgedManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* @_ZN23btBridgedManifoldResult15addContactPointERK9btVector3S2_f to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI23btBridgedManifoldResult = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btBridgedManifoldResult, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btManifoldResult to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS23btBridgedManifoldResult = weak_odr constant [26 x i8] c"23btBridgedManifoldResult\00" ; [#uses=1]
-@_ZTV21btSingleSweepCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btSingleSweepCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btSingleSweepCallback*)* @_ZN21btSingleSweepCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSingleSweepCallback*)* @_ZN21btSingleSweepCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btSingleSweepCallback*, %struct.btBroadphaseProxy*)* @_ZN21btSingleSweepCallback7processEPK17btBroadphaseProxy to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI21btSingleSweepCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btSingleSweepCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btBroadphaseRayCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS21btSingleSweepCallback = weak_odr constant [24 x i8] c"21btSingleSweepCallback\00" ; [#uses=1]
-@_ZTV19btSingleRayCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI19btSingleRayCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btSingleRayCallback*)* @_ZN19btSingleRayCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSingleRayCallback*)* @_ZN19btSingleRayCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btSingleRayCallback*, %struct.btBroadphaseProxy*)* @_ZN19btSingleRayCallback7processEPK17btBroadphaseProxy to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI19btSingleRayCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([22 x i8]* @_ZTS19btSingleRayCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btBroadphaseRayCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS19btSingleRayCallback = weak_odr constant [22 x i8] c"19btSingleRayCallback\00" ; [#uses=1]
-@_ZTV16btCollisionWorld = weak_odr constant [14 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI16btCollisionWorld to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorldD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorldD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld11updateAabbsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld14setDebugDrawerEP12btIDebugDraw to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld14getDebugDrawerEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld14debugDrawWorldEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btTransform*, %struct.btCollisionShape*, %struct.btQuadWord*)* @_ZN16btCollisionWorld15debugDrawObjectERK11btTransformPK16btCollisionShapeRK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK16btCollisionWorld7rayTestERK9btVector3S2_RNS_17RayResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btCollisionObject*, i16, i16)* @_ZN16btCollisionWorld18addCollisionObjectEP17btCollisionObjectss to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btCollisionObject*)* @_ZN16btCollisionWorld21removeCollisionObjectEP17btCollisionObject to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld33performDiscreteCollisionDetectionEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld9serializeEP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI16btCollisionWorld = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btCollisionWorld, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS16btCollisionWorld = weak_odr constant [19 x i8] c"16btCollisionWorld\00" ; [#uses=1]
-@_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback_0 = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback_0 to i32 (...)*), i32 (...)* bitcast (void (%struct..4BridgeTriangleConvexcastCallback*)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD1E_0v to i32 (...)*), i32 (...)* bitcast (void (%struct..4BridgeTriangleConvexcastCallback*)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD0E_0v to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleConvexcastCallback*, %struct.btQuadWord*, i32, i32)* @_ZN28btTriangleConvexcastCallback15processTriangleEP9btVector3ii to i32 (...)*), i32 (...)* bitcast (float (%struct..4BridgeTriangleConvexcastCallback*, %struct.btQuadWord*, %struct.btQuadWord*, float, i32, i32)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallback9reportHitE_0RK9btVector3SG_fii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback_0 = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([184 x i8]* @_ZTSZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback_0, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI28btTriangleConvexcastCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback_0 = weak_odr constant [184 x i8] c"ZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback_0\00", align 32 ; [#uses=1]
-@_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..3BridgeTriangleConvexcastCallback*)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..3BridgeTriangleConvexcastCallback*)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleConvexcastCallback*, %struct.btQuadWord*, i32, i32)* @_ZN28btTriangleConvexcastCallback15processTriangleEP9btVector3ii to i32 (...)*), i32 (...)* bitcast (float (%struct..3BridgeTriangleConvexcastCallback*, %struct.btQuadWord*, %struct.btQuadWord*, float, i32, i32)* @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallback9reportHitERK9btVector3SG_fii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([182 x i8]* @_ZTSZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI28btTriangleConvexcastCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback = weak_odr constant [182 x i8] c"ZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback\00", align 32 ; [#uses=1]
-@_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback_0 = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback_0 to i32 (...)*), i32 (...)* bitcast (void (%struct..1BridgeTriangleRaycastCallback*)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD1E_0v to i32 (...)*), i32 (...)* bitcast (void (%struct..1BridgeTriangleRaycastCallback*)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD0E_0v to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleRaycastCallback*, %struct.btQuadWord*, i32, i32)* @_ZN25btTriangleRaycastCallback15processTriangleEP9btVector3ii to i32 (...)*), i32 (...)* bitcast (float (%struct..1BridgeTriangleRaycastCallback*, %struct.btQuadWord*, float, i32, i32)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallback9reportHitE_0RK9btVector3fii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback_0 = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([156 x i8]* @_ZTSZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback_0, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btTriangleRaycastCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback_0 = weak_odr constant [156 x i8] c"ZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback_0\00", align 32 ; [#uses=1]
-@_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0BridgeTriangleRaycastCallback*)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0BridgeTriangleRaycastCallback*)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleRaycastCallback*, %struct.btQuadWord*, i32, i32)* @_ZN25btTriangleRaycastCallback15processTriangleEP9btVector3ii to i32 (...)*), i32 (...)* bitcast (float (%struct..0BridgeTriangleRaycastCallback*, %struct.btQuadWord*, float, i32, i32)* @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallback9reportHitERK9btVector3fii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([154 x i8]* @_ZTSZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btTriangleRaycastCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback = weak_odr constant [154 x i8] c"ZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback\00", align 32 ; [#uses=1]
-@.str315 = private constant [16 x i8] c"convexSweepTest\00", align 1 ; [#uses=1]
-@.str48 = private constant [34 x i8] c"performDiscreteCollisionDetection\00", align 4 ; [#uses=1]
-@.str5 = private constant [26 x i8] c"calculateOverlappingPairs\00", align 1 ; [#uses=1]
-@.str6 = private constant [26 x i8] c"dispatchAllCollisionPairs\00", align 1 ; [#uses=1]
-@.str7 = private constant [20 x i8] c"convexSweepCompound\00", align 1 ; [#uses=1]
-@_ZZN16btCollisionWorld16updateSingleAabbEP17btCollisionObjectE8reportMe.b = internal global i1 false ; [#uses=2]
-@.str8 = private constant [49 x i8] c"Overflow in AABB, object removed from simulation\00", align 4 ; [#uses=1]
-@.str9 = private constant [68 x i8] c"If you can reproduce this, please email bugs@continuousphysics.com\0A\00", align 4 ; [#uses=1]
-@.str10 = private constant [65 x i8] c"Please include above information, your Platform, version of OS.\0A\00", align 4 ; [#uses=1]
-@.str1116 = private constant [9 x i8] c"Thanks.\0A\00", align 1 ; [#uses=1]
-@.str1217 = private constant [12 x i8] c"updateAabbs\00", align 1 ; [#uses=1]
-@_ZTV22btCompoundLeafCallback = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btCompoundLeafCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundLeafCallback*)* @_ZN22btCompoundLeafCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundLeafCallback*)* @_ZN22btCompoundLeafCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundLeafCallback*, %struct.btDbvtNode*)* @_ZN22btCompoundLeafCallback7ProcessEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btDbvtNode*, float)* @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodef to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide7DescentEPK10btDbvtNode to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btActionInterface*, %struct.btDbvtNode*)* @_ZN6btDbvt8ICollide9AllLeavesEPK10btDbvtNode to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI22btCompoundLeafCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btCompoundLeafCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN6btDbvt8ICollideE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS22btCompoundLeafCallback = weak_odr constant [25 x i8] c"22btCompoundLeafCallback\00" ; [#uses=1]
-@_ZTV28btCompoundCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI28btCompoundCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundCollisionAlgorithm*)* @_ZN28btCompoundCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundCollisionAlgorithm*)* @_ZN28btCompoundCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN28btCompoundCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btCompoundCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN28btCompoundCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN28btCompoundCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI28btCompoundCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([31 x i8]* @_ZTS28btCompoundCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS28btCompoundCollisionAlgorithm = weak_odr constant [31 x i8] c"28btCompoundCollisionAlgorithm\00", align 4 ; [#uses=1]
-@.str18 = private constant [9 x i8] c"Triangle\00", align 1 ; [#uses=1]
-@_ZTVZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0LocalTriangleSphereCastCallback*)* @_ZZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultEN31LocalTriangleSphereCastCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0LocalTriangleSphereCastCallback*)* @_ZZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultEN31LocalTriangleSphereCastCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0LocalTriangleSphereCastCallback*, %struct.btQuadWord*, i32, i32)* @_ZZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultEN31LocalTriangleSphereCastCallback15processTriangleEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([158 x i8]* @_ZTSZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback = weak_odr constant [158 x i8] c"ZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback\00", align 32 ; [#uses=1]
-@_ZTV15btTriangleShape = weak_odr constant [31 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btTriangleShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*)* @_ZN15btTriangleShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*)* @_ZN15btTriangleShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btTriangleShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, float, %struct.btQuadWord*)* @_ZNK15btTriangleShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btTriangleShape*)* @_ZNK15btTriangleShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btTriangleShape*, %struct.btQuadWord*)* @_ZNK15btTriangleShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK15btTriangleShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* @_ZNK15btTriangleShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape14getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape11getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btTriangleShape7getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* @_ZNK15btTriangleShape9getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape12getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK15btTriangleShape8getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btTriangleShape*, %struct.btQuadWord*, float)* @_ZNK15btTriangleShape8isInsideERK9btVector3f to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btTriangleShape16getPlaneEquationEiR9btVector3S1_ to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btTriangleShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btTriangleShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btPolyhedralConvexShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS15btTriangleShape = weak_odr constant [18 x i8] c"15btTriangleShape\00" ; [#uses=1]
-@.str119 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=1]
-@_ZTV24btConvexTriangleCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI24btConvexTriangleCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleCallback*)* @_ZN24btConvexTriangleCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleCallback*)* @_ZN24btConvexTriangleCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleCallback*, %struct.btQuadWord*, i32, i32)* @_ZN24btConvexTriangleCallback15processTriangleEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI24btConvexTriangleCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([27 x i8]* @_ZTS24btConvexTriangleCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS24btConvexTriangleCallback = weak_odr constant [27 x i8] c"24btConvexTriangleCallback\00" ; [#uses=1]
-@_ZTV33btConvexConcaveCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI33btConvexConcaveCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexConcaveCollisionAlgorithm*)* @_ZN33btConvexConcaveCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexConcaveCollisionAlgorithm*)* @_ZN33btConvexConcaveCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexConcaveCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN33btConvexConcaveCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexConcaveCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexConcaveCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN33btConvexConcaveCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI33btConvexConcaveCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([36 x i8]* @_ZTS33btConvexConcaveCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS33btConvexConcaveCollisionAlgorithm = weak_odr constant [36 x i8] c"33btConvexConcaveCollisionAlgorithm\00", align 32 ; [#uses=1]
-@_ZTV30btCollisionAlgorithmCreateFunc = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionAlgorithmCreateFunc*)* @_ZN30btCollisionAlgorithmCreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionAlgorithmCreateFunc*)* @_ZN30btCollisionAlgorithmCreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN30btCollisionAlgorithmCreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS3_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI30btCollisionAlgorithmCreateFunc = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTS30btCollisionAlgorithmCreateFunc, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS30btCollisionAlgorithmCreateFunc = weak_odr constant [33 x i8] c"30btCollisionAlgorithmCreateFunc\00", align 32 ; [#uses=1]
-@_ZTVN23btConvexConvexAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN23btConvexConvexAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"*)* @_ZN23btConvexConvexAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"*)* @_ZN23btConvexConvexAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN23btConvexConvexAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN23btConvexConvexAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([40 x i8]* @_ZTSN23btConvexConvexAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN23btConvexConvexAlgorithm10CreateFuncE = weak_odr constant [40 x i8] c"N23btConvexConvexAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTV24btPerturbedContactResult = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI24btPerturbedContactResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btPerturbedContactResult*)* @_ZN24btPerturbedContactResultD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPerturbedContactResult*)* @_ZN24btPerturbedContactResultD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*, i32, i32)* @_ZN16btManifoldResult20setShapeIdentifiersAEii to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*, i32, i32)* @_ZN16btManifoldResult20setShapeIdentifiersBEii to i32 (...)*), i32 (...)* bitcast (void (%struct.btPerturbedContactResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* @_ZN24btPerturbedContactResult15addContactPointERK9btVector3S2_f to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI24btPerturbedContactResult = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([27 x i8]* @_ZTS24btPerturbedContactResult, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btManifoldResult to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS24btPerturbedContactResult = weak_odr constant [27 x i8] c"24btPerturbedContactResult\00" ; [#uses=1]
-@disableCcd = global i8 0 ; [#uses=2]
-@_ZTV23btConvexConvexAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btConvexConvexAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*)* @_ZN23btConvexConvexAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*)* @_ZN23btConvexConvexAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN23btConvexConvexAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvex2dConvex2dAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN23btConvexConvexAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN23btConvexConvexAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI23btConvexConvexAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btConvexConvexAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS23btConvexConvexAlgorithm = weak_odr constant [26 x i8] c"23btConvexConvexAlgorithm\00" ; [#uses=1]
-@_ZTV31btConvexPlaneCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI31btConvexPlaneCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPlaneCollisionAlgorithm*)* @_ZN31btConvexPlaneCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPlaneCollisionAlgorithm*)* @_ZN31btConvexPlaneCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPlaneCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN31btConvexPlaneCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexPlaneCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN31btConvexPlaneCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPlaneCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN31btConvexPlaneCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI31btConvexPlaneCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([34 x i8]* @_ZTS31btConvexPlaneCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI20btCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS31btConvexPlaneCollisionAlgorithm = weak_odr constant [34 x i8] c"31btConvexPlaneCollisionAlgorithm\00", align 32 ; [#uses=1]
-@_ZTVN27btConvex2dConvex2dAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN27btConvex2dConvex2dAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"*)* @_ZN27btConvex2dConvex2dAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"*)* @_ZN27btConvex2dConvex2dAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN27btConvex2dConvex2dAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN27btConvex2dConvex2dAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([44 x i8]* @_ZTSN27btConvex2dConvex2dAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN27btConvex2dConvex2dAlgorithm10CreateFuncE = weak_odr constant [44 x i8] c"N27btConvex2dConvex2dAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTV27btConvex2dConvex2dAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI27btConvex2dConvex2dAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*)* @_ZN27btConvex2dConvex2dAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*)* @_ZN27btConvex2dConvex2dAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN27btConvex2dConvex2dAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvex2dConvex2dAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN27btConvex2dConvex2dAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dConvex2dAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN27btConvex2dConvex2dAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI27btConvex2dConvex2dAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([30 x i8]* @_ZTS27btConvex2dConvex2dAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS27btConvex2dConvex2dAlgorithm = weak_odr constant [30 x i8] c"27btConvex2dConvex2dAlgorithm\00" ; [#uses=1]
-@_ZTVN31btConvexPlaneCollisionAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN31btConvexPlaneCollisionAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"*)* @_ZN31btConvexPlaneCollisionAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"*)* @_ZN31btConvexPlaneCollisionAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN31btConvexPlaneCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN31btConvexPlaneCollisionAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([48 x i8]* @_ZTSN31btConvexPlaneCollisionAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN31btConvexPlaneCollisionAlgorithm10CreateFuncE = weak_odr constant [48 x i8] c"N31btConvexPlaneCollisionAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTV24btCollisionConfiguration = weak_odr constant [8 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI24btCollisionConfiguration to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN24btCollisionConfigurationD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN24btCollisionConfigurationD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI24btCollisionConfiguration = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([27 x i8]* @_ZTS24btCollisionConfiguration, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS24btCollisionConfiguration = weak_odr constant [27 x i8] c"24btCollisionConfiguration\00" ; [#uses=1]
-@_ZTVN33btConvexConcaveCollisionAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN33btConvexConcaveCollisionAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN33btConvexConcaveCollisionAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN33btConvexConcaveCollisionAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN33btConvexConcaveCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN33btConvexConcaveCollisionAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([50 x i8]* @_ZTSN33btConvexConcaveCollisionAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN33btConvexConcaveCollisionAlgorithm10CreateFuncE = weak_odr constant [50 x i8] c"N33btConvexConcaveCollisionAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTVN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN33btConvexConcaveCollisionAlgorithm17SwappedCreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([57 x i8]* @_ZTSN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE = weak_odr constant [57 x i8] c"N33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE\00", align 32 ; [#uses=1]
-@_ZTVN28btCompoundCollisionAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN28btCompoundCollisionAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN28btCompoundCollisionAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN28btCompoundCollisionAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN28btCompoundCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN28btCompoundCollisionAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([45 x i8]* @_ZTSN28btCompoundCollisionAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN28btCompoundCollisionAlgorithm10CreateFuncE = weak_odr constant [45 x i8] c"N28btCompoundCollisionAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTVN28btCompoundCollisionAlgorithm17SwappedCreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN28btCompoundCollisionAlgorithm17SwappedCreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN28btCompoundCollisionAlgorithm17SwappedCreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN28btCompoundCollisionAlgorithm17SwappedCreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN28btCompoundCollisionAlgorithm17SwappedCreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN28btCompoundCollisionAlgorithm17SwappedCreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([52 x i8]* @_ZTSN28btCompoundCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN28btCompoundCollisionAlgorithm17SwappedCreateFuncE = weak_odr constant [52 x i8] c"N28btCompoundCollisionAlgorithm17SwappedCreateFuncE\00", align 32 ; [#uses=1]
-@_ZTVN16btEmptyAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN16btEmptyAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN16btEmptyAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN16btEmptyAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN16btEmptyAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN16btEmptyAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTSN16btEmptyAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN16btEmptyAlgorithm10CreateFuncE = weak_odr constant [33 x i8] c"N16btEmptyAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTVN32btSphereSphereCollisionAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN32btSphereSphereCollisionAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN32btSphereSphereCollisionAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN32btSphereSphereCollisionAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN32btSphereSphereCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN32btSphereSphereCollisionAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([49 x i8]* @_ZTSN32btSphereSphereCollisionAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN32btSphereSphereCollisionAlgorithm10CreateFuncE = weak_odr constant [49 x i8] c"N32btSphereSphereCollisionAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTVN34btSphereTriangleCollisionAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN34btSphereTriangleCollisionAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN34btSphereTriangleCollisionAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN34btSphereTriangleCollisionAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN34btSphereTriangleCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN34btSphereTriangleCollisionAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([51 x i8]* @_ZTSN34btSphereTriangleCollisionAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN34btSphereTriangleCollisionAlgorithm10CreateFuncE = weak_odr constant [51 x i8] c"N34btSphereTriangleCollisionAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTVN26btBoxBoxCollisionAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN26btBoxBoxCollisionAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN26btBoxBoxCollisionAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN26btBoxBoxCollisionAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN26btBoxBoxCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN26btBoxBoxCollisionAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([43 x i8]* @_ZTSN26btBoxBoxCollisionAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN26btBoxBoxCollisionAlgorithm10CreateFuncE = weak_odr constant [43 x i8] c"N26btBoxBoxCollisionAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZTV31btDefaultCollisionConfiguration = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI31btDefaultCollisionConfiguration to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultCollisionConfiguration*)* @_ZN31btDefaultCollisionConfigurationD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultCollisionConfiguration*)* @_ZN31btDefaultCollisionConfigurationD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btPoolAllocator* (%struct.btDefaultCollisionConfiguration*)* @_ZN31btDefaultCollisionConfiguration25getPersistentManifoldPoolEv to i32 (...)*), i32 (...)* bitcast (%struct.btPoolAllocator* (%struct.btDefaultCollisionConfiguration*)* @_ZN31btDefaultCollisionConfiguration25getCollisionAlgorithmPoolEv to i32 (...)*), i32 (...)* bitcast (%struct.btStackAlloc* (%struct.btDefaultCollisionConfiguration*)* @_ZN31btDefaultCollisionConfiguration17getStackAllocatorEv to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithmCreateFunc* (%struct.btDefaultCollisionConfiguration*, i32, i32)* @_ZN31btDefaultCollisionConfiguration31getCollisionAlgorithmCreateFuncEii to i32 (...)*), i32 (...)* bitcast (%struct.btVoronoiSimplexSolver* (%struct.btDefaultCollisionConfiguration*)* @_ZN31btDefaultCollisionConfiguration16getSimplexSolverEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI31btDefaultCollisionConfiguration = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([34 x i8]* @_ZTS31btDefaultCollisionConfiguration, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI24btCollisionConfiguration to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS31btDefaultCollisionConfiguration = weak_odr constant [34 x i8] c"31btDefaultCollisionConfiguration\00", align 32 ; [#uses=1]
-@_ZTV16btEmptyAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btEmptyAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btActivatingCollisionAlgorithm*)* @_ZN16btEmptyAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActivatingCollisionAlgorithm*)* @_ZN16btEmptyAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActivatingCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN16btEmptyAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btActivatingCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN16btEmptyAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btActivatingCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN16btEmptyAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI16btEmptyAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btEmptyAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI20btCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btEmptyAlgorithm = weak_odr constant [19 x i8] c"16btEmptyAlgorithm\00" ; [#uses=1]
-@_ZTV13btGhostObject = weak_odr constant [11 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI13btGhostObject to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN17btCollisionObject24checkCollideWithOverrideEPS_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btGhostObject*)* @_ZN13btGhostObjectD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGhostObject*)* @_ZN13btGhostObjectD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*, %struct.btCollisionShape*)* @_ZN17btCollisionObject17setCollisionShapeEP16btCollisionShape to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionObject*)* @_ZNK17btCollisionObject28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionObject*, i8*, %struct.btActionInterface*)* @_ZNK17btCollisionObject9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*, %struct.btActionInterface*)* @_ZNK17btCollisionObject21serializeSingleObjectEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGhostObject*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN13btGhostObject28addOverlappingObjectInternalEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btGhostObject*, %struct.btBroadphaseProxy*, %struct.btActionInterface*, %struct.btBroadphaseProxy*)* @_ZN13btGhostObject31removeOverlappingObjectInternalEP17btBroadphaseProxyP12btDispatcherS1_ to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI13btGhostObject = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([16 x i8]* @_ZTS13btGhostObject, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btCollisionObject to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS13btGhostObject = weak_odr constant [16 x i8] c"13btGhostObject\00" ; [#uses=1]
-@_ZTV24btPairCachingGhostObject = weak_odr constant [11 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI24btPairCachingGhostObject to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN17btCollisionObject24checkCollideWithOverrideEPS_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btPairCachingGhostObject*)* @_ZN24btPairCachingGhostObjectD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPairCachingGhostObject*)* @_ZN24btPairCachingGhostObjectD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*, %struct.btCollisionShape*)* @_ZN17btCollisionObject17setCollisionShapeEP16btCollisionShape to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionObject*)* @_ZNK17btCollisionObject28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionObject*, i8*, %struct.btActionInterface*)* @_ZNK17btCollisionObject9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*, %struct.btActionInterface*)* @_ZNK17btCollisionObject21serializeSingleObjectEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btPairCachingGhostObject*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* @_ZN24btPairCachingGhostObject28addOverlappingObjectInternalEP17btBroadphaseProxyS1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btPairCachingGhostObject*, %struct.btBroadphaseProxy*, %struct.btActionInterface*, %struct.btBroadphaseProxy*)* @_ZN24btPairCachingGhostObject31removeOverlappingObjectInternalEP17btBroadphaseProxyP12btDispatcherS1_ to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI24btPairCachingGhostObject = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([27 x i8]* @_ZTS24btPairCachingGhostObject, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI13btGhostObject to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS24btPairCachingGhostObject = weak_odr constant [27 x i8] c"24btPairCachingGhostObject\00" ; [#uses=1]
-@.str21 = private constant [9 x i8] c"Triangle\00", align 1 ; [#uses=0]
-@_ZTV23btConnectivityProcessor = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btConnectivityProcessor to i32 (...)*), i32 (...)* bitcast (void (%struct.btConnectivityProcessor*)* @_ZN23btConnectivityProcessorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConnectivityProcessor*)* @_ZN23btConnectivityProcessorD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConnectivityProcessor*, %struct.btQuadWord*, i32, i32)* @_ZN23btConnectivityProcessor15processTriangleEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI23btConnectivityProcessor = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btConnectivityProcessor, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS23btConnectivityProcessor = weak_odr constant [26 x i8] c"23btConnectivityProcessor\00" ; [#uses=1]
-@.str122 = private constant [4 x i8] c"int\00", align 1 ; [#uses=0]
-@.str223 = private constant [19 x i8] c"btTriangleInfoData\00", align 1 ; [#uses=0]
-@.str324 = private constant [22 x i8] c"btTriangleInfoMapData\00", align 1 ; [#uses=0]
-@.str425 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@gContactAddedCallback = global i8 (%struct.btManifoldPoint*, %struct.btCollisionObject*, i32, i32, %struct.btCollisionObject*, i32, i32)* null ; [#uses=1]
-@_ZTV16btManifoldResult = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*)* @_ZN16btManifoldResultD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*)* @_ZN16btManifoldResultD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*, i32, i32)* @_ZN16btManifoldResult20setShapeIdentifiersAEii to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*, i32, i32)* @_ZN16btManifoldResult20setShapeIdentifiersBEii to i32 (...)*), i32 (...)* bitcast (void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* @_ZN16btManifoldResult15addContactPointERK9btVector3S2_f to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI16btManifoldResult = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btManifoldResult, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN36btDiscreteCollisionDetectorInterface6ResultE to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS16btManifoldResult = weak_odr constant [19 x i8] c"16btManifoldResult\00" ; [#uses=1]
-@.str30 = private constant [28 x i8] c"islandUnionFindAndQuickSort\00", align 1 ; [#uses=1]
-@.str131 = private constant [15 x i8] c"processIslands\00", align 1 ; [#uses=1]
-@_ZTV25btSimulationIslandManager = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI25btSimulationIslandManager to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimulationIslandManager*)* @_ZN25btSimulationIslandManagerD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimulationIslandManager*)* @_ZN25btSimulationIslandManagerD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimulationIslandManager*, %struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN25btSimulationIslandManager21updateActivationStateEP16btCollisionWorldP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimulationIslandManager*, %struct.btCollisionWorld*)* @_ZN25btSimulationIslandManager26storeIslandActivationStateEP16btCollisionWorld to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI25btSimulationIslandManager = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btSimulationIslandManager, i32 0, i32 0) } } ; [#uses=1]
-@_ZTS25btSimulationIslandManager = weak_odr constant [28 x i8] c"25btSimulationIslandManager\00" ; [#uses=1]
-@_ZTV29btSphereBoxCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI29btSphereBoxCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*)* @_ZN29btSphereBoxCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*)* @_ZN29btSphereBoxCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN29btSphereBoxCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btSphereBoxCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN29btSphereBoxCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN29btSphereBoxCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI29btSphereBoxCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([32 x i8]* @_ZTS29btSphereBoxCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS29btSphereBoxCollisionAlgorithm = weak_odr constant [32 x i8] c"29btSphereBoxCollisionAlgorithm\00", align 32 ; [#uses=1]
-@_ZTV32btSphereSphereCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI32btSphereSphereCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*)* @_ZN32btSphereSphereCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*)* @_ZN32btSphereSphereCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN32btSphereSphereCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btBox2dBox2dCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN32btSphereSphereCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dBox2dCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN32btSphereSphereCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI32btSphereSphereCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([35 x i8]* @_ZTS32btSphereSphereCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS32btSphereSphereCollisionAlgorithm = weak_odr constant [35 x i8] c"32btSphereSphereCollisionAlgorithm\00", align 32 ; [#uses=1]
-@_ZTV34btSphereTriangleCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btSphereTriangleCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*)* @_ZN34btSphereTriangleCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*)* @_ZN34btSphereTriangleCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN34btSphereTriangleCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btSphereBoxCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN34btSphereTriangleCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btSphereBoxCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN34btSphereTriangleCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI34btSphereTriangleCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([37 x i8]* @_ZTS34btSphereTriangleCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS34btSphereTriangleCollisionAlgorithm = weak_odr constant [37 x i8] c"34btSphereTriangleCollisionAlgorithm\00", align 32 ; [#uses=1]
-@_ZTV22SphereTriangleDetector = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22SphereTriangleDetector to i32 (...)*), i32 (...)* bitcast (void (%struct.SphereTriangleDetector*)* @_ZN22SphereTriangleDetectorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.SphereTriangleDetector*)* @_ZN22SphereTriangleDetectorD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.SphereTriangleDetector*, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"*, %struct.btActionInterface*, %struct.btActionInterface*, i8)* @_ZN22SphereTriangleDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI22SphereTriangleDetector = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22SphereTriangleDetector, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI36btDiscreteCollisionDetectorInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS22SphereTriangleDetector = weak_odr constant [25 x i8] c"22SphereTriangleDetector\00" ; [#uses=1]
-@.str40 = private constant [4 x i8] c"Box\00", align 1 ; [#uses=1]
-@.str141 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV10btBoxShape = weak_odr constant [31 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI10btBoxShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*)* @_ZN10btBoxShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*)* @_ZN10btBoxShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK10btBoxShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, %struct.btQuadWord*)* @_ZN10btBoxShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, float, %struct.btQuadWord*)* @_ZNK10btBoxShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btBoxShape*)* @_ZNK10btBoxShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, float)* @_ZN10btBoxShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btBoxShape*, %struct.btQuadWord*)* @_ZNK10btBoxShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btBoxShape*, %struct.btQuadWord*)* @_ZNK10btBoxShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK10btBoxShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBoxShape*)* @_ZNK10btBoxShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, i32, %struct.btQuadWord*)* @_ZNK10btBoxShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBoxShape*)* @_ZNK10btBoxShape14getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBoxShape*)* @_ZNK10btBoxShape11getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK10btBoxShape7getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, i32, %struct.btQuadWord*)* @_ZNK10btBoxShape9getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBoxShape*)* @_ZNK10btBoxShape12getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK10btBoxShape8getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btBoxShape*, %struct.btQuadWord*, float)* @_ZNK10btBoxShape8isInsideERK9btVector3f to i32 (...)*), i32 (...)* bitcast (void (%struct.btBoxShape*, %struct.btQuaternion*, i32)* @_ZNK10btBoxShape16getPlaneEquationER9btVector4i to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI10btBoxShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([13 x i8]* @_ZTS10btBoxShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btPolyhedralConvexShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS10btBoxShape = weak_odr constant [13 x i8] c"10btBoxShape\00" ; [#uses=1]
-@.str42 = private constant [6 x i8] c"Box2d\00", align 1 ; [#uses=1]
-@.str143 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV12btBox2dShape = weak_odr constant [31 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI12btBox2dShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*)* @_ZN12btBox2dShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*)* @_ZN12btBox2dShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK12btBox2dShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, %struct.btQuadWord*)* @_ZN12btBox2dShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, float, %struct.btQuadWord*)* @_ZNK12btBox2dShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btBox2dShape*)* @_ZNK12btBox2dShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, float)* @_ZN12btBox2dShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btBox2dShape*, %struct.btQuadWord*)* @_ZNK12btBox2dShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btBox2dShape*, %struct.btQuadWord*)* @_ZNK12btBox2dShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK12btBox2dShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBox2dShape*)* @_ZNK12btBox2dShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, i32, %struct.btQuadWord*)* @_ZNK12btBox2dShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBox2dShape*)* @_ZNK12btBox2dShape14getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBox2dShape*)* @_ZNK12btBox2dShape11getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK12btBox2dShape7getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, i32, %struct.btQuadWord*)* @_ZNK12btBox2dShape9getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBox2dShape*)* @_ZNK12btBox2dShape12getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK12btBox2dShape8getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btBox2dShape*, %struct.btQuadWord*, float)* @_ZNK12btBox2dShape8isInsideERK9btVector3f to i32 (...)*), i32 (...)* bitcast (void (%struct.btBox2dShape*, %struct.btQuaternion*, i32)* @_ZNK12btBox2dShape16getPlaneEquationER9btVector4i to i32 (...)*)], align 32 ; [#uses=0]
-@_ZTI12btBox2dShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12btBox2dShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btPolyhedralConvexShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS12btBox2dShape = weak_odr constant [15 x i8] c"12btBox2dShape\00" ; [#uses=1]
-@.str44 = private constant [16 x i8] c"BVHTRIANGLEMESH\00", align 1 ; [#uses=1]
-@_ZTVZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0MyNodeOverlapCallback*)* @_ZZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0MyNodeOverlapCallback*)* @_ZZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0MyNodeOverlapCallback*, i32, i32)* @_ZZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallback11processNodeEii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([104 x i8]* @_ZTSZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btNodeOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback = weak_odr constant [104 x i8] c"ZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback\00", align 32 ; [#uses=1]
-@_ZTVZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0MyNodeOverlapCallback*)* @_ZZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_EN21MyNodeOverlapCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0MyNodeOverlapCallback*)* @_ZZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_EN21MyNodeOverlapCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0MyNodeOverlapCallback*, i32, i32)* @_ZZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_EN21MyNodeOverlapCallback11processNodeEii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([113 x i8]* @_ZTSZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btNodeOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback = weak_odr constant [113 x i8] c"ZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback\00", align 32 ; [#uses=1]
-@_ZTVZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..2MyNodeOverlapCallback*)* @_ZZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..2MyNodeOverlapCallback*)* @_ZZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..2MyNodeOverlapCallback*, i32, i32)* @_ZZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallback11processNodeEii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([110 x i8]* @_ZTSZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI21btNodeOverlapCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback = weak_odr constant [110 x i8] c"ZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback\00", align 32 ; [#uses=1]
-@.str145 = private constant [4 x i8] c"int\00", align 1 ; [#uses=0]
-@.str246 = private constant [19 x i8] c"btTriangleInfoData\00", align 1 ; [#uses=0]
-@.str347 = private constant [22 x i8] c"btTriangleInfoMapData\00", align 1 ; [#uses=0]
-@.str448 = private constant [24 x i8] c"btTriangleMeshShapeData\00", align 1 ; [#uses=1]
-@_ZTV22btBvhTriangleMeshShape = weak_odr constant [22 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btBvhTriangleMeshShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btBvhTriangleMeshShape*)* @_ZN22btBvhTriangleMeshShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBvhTriangleMeshShape*)* @_ZN22btBvhTriangleMeshShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btBvhTriangleMeshShape*, %struct.btQuadWord*)* @_ZN22btBvhTriangleMeshShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btTriangleMeshShape*)* @_ZNK19btTriangleMeshShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*, float, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btBvhTriangleMeshShape*)* @_ZNK22btBvhTriangleMeshShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*, float)* @_ZN14btConcaveShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBvhTriangleMeshShape*)* @_ZNK22btBvhTriangleMeshShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btBvhTriangleMeshShape*, i8*, %struct.btActionInterface*)* @_ZNK22btBvhTriangleMeshShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btBvhTriangleMeshShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btBvhTriangleMeshShape*, %struct.btActionInterface*)* @_ZNK22btBvhTriangleMeshShape18serializeSingleBvhEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btBvhTriangleMeshShape*, %struct.btActionInterface*)* @_ZNK22btBvhTriangleMeshShape30serializeSingleTriangleInfoMapEP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI22btBvhTriangleMeshShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btBvhTriangleMeshShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI19btTriangleMeshShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS22btBvhTriangleMeshShape = weak_odr constant [25 x i8] c"22btBvhTriangleMeshShape\00" ; [#uses=1]
-@.str51 = private constant [13 x i8] c"CapsuleShape\00", align 1 ; [#uses=1]
-@.str152 = private constant [9 x i8] c"CapsuleX\00", align 1 ; [#uses=1]
-@.str253 = private constant [9 x i8] c"CapsuleZ\00", align 1 ; [#uses=1]
-@.str454 = private constant [19 x i8] c"btCapsuleShapeData\00", align 1 ; [#uses=1]
-@_ZTV14btCapsuleShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btCapsuleShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*)* @_ZN14btCapsuleShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*)* @_ZN14btCapsuleShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK14btCapsuleShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZN14btCapsuleShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float, %struct.btQuadWord*)* @_ZNK14btCapsuleShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*)* @_ZNK14btCapsuleShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float)* @_ZN14btCapsuleShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCapsuleShape*)* @_ZNK14btCapsuleShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*, i8*, %struct.btActionInterface*)* @_ZNK14btCapsuleShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZNK14btCapsuleShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK14btCapsuleShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI14btCapsuleShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([17 x i8]* @_ZTS14btCapsuleShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS14btCapsuleShape = weak_odr constant [17 x i8] c"14btCapsuleShape\00" ; [#uses=1]
-@_ZTV15btCapsuleShapeZ = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btCapsuleShapeZ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN15btCapsuleShapeZD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN15btCapsuleShapeZD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK14btCapsuleShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZN14btCapsuleShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float, %struct.btQuadWord*)* @_ZNK14btCapsuleShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShapeX*)* @_ZNK15btCapsuleShapeZ7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float)* @_ZN14btCapsuleShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCapsuleShape*)* @_ZNK14btCapsuleShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*, i8*, %struct.btActionInterface*)* @_ZNK14btCapsuleShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZNK14btCapsuleShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK14btCapsuleShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btCapsuleShapeZ = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btCapsuleShapeZ, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btCapsuleShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS15btCapsuleShapeZ = weak_odr constant [18 x i8] c"15btCapsuleShapeZ\00" ; [#uses=1]
-@_ZTV15btCapsuleShapeX = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btCapsuleShapeX to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN15btCapsuleShapeXD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN15btCapsuleShapeXD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK14btCapsuleShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZN14btCapsuleShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float, %struct.btQuadWord*)* @_ZNK14btCapsuleShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShapeX*)* @_ZNK15btCapsuleShapeX7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float)* @_ZN14btCapsuleShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCapsuleShape*)* @_ZNK14btCapsuleShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*, i8*, %struct.btActionInterface*)* @_ZNK14btCapsuleShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZNK14btCapsuleShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK14btCapsuleShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btCapsuleShapeX = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btCapsuleShapeX, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btCapsuleShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS15btCapsuleShapeX = weak_odr constant [18 x i8] c"15btCapsuleShapeX\00" ; [#uses=1]
-@.str55 = private constant [21 x i8] c"btCollisionShapeData\00", align 1 ; [#uses=1]
-@_ZTV16btCollisionShape = weak_odr constant [17 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI16btCollisionShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*)* @_ZN16btCollisionShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*)* @_ZN16btCollisionShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI16btCollisionShape = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btCollisionShape, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS16btCollisionShape = weak_odr constant [19 x i8] c"16btCollisionShape\00" ; [#uses=1]
-@.str62 = private constant [9 x i8] c"Compound\00", align 1 ; [#uses=1]
-@.str163 = private constant [25 x i8] c"btCompoundShapeChildData\00", align 1 ; [#uses=1]
-@.str264 = private constant [20 x i8] c"btCompoundShapeData\00", align 1 ; [#uses=1]
-@_ZTV15btCompoundShape = weak_odr constant [19 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btCompoundShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*)* @_ZN15btCompoundShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*)* @_ZN15btCompoundShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btCompoundShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*, %struct.btQuadWord*)* @_ZN15btCompoundShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btCompoundShape*)* @_ZNK15btCompoundShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*, float, %struct.btQuadWord*)* @_ZNK15btCompoundShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCompoundShape*)* @_ZNK15btCompoundShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*, float)* @_ZN15btCompoundShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCompoundShape*)* @_ZNK15btCompoundShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCompoundShape*)* @_ZNK15btCompoundShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCompoundShape*, i8*, %struct.btActionInterface*)* @_ZNK15btCompoundShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*, %struct.btCollisionShape*)* @_ZN15btCompoundShape16removeChildShapeEP16btCollisionShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btCompoundShape*)* @_ZN15btCompoundShape20recalculateLocalAabbEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btCompoundShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btCompoundShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI16btCollisionShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS15btCompoundShape = weak_odr constant [18 x i8] c"15btCompoundShape\00" ; [#uses=1]
-@_ZTV14btConcaveShape = weak_odr constant [18 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btConcaveShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*)* @_ZN14btConcaveShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*)* @_ZN14btConcaveShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*, float)* @_ZN14btConcaveShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI14btConcaveShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([17 x i8]* @_ZTS14btConcaveShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI16btCollisionShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS14btConcaveShape = weak_odr constant [17 x i8] c"14btConcaveShape\00" ; [#uses=1]
-@.str65 = private constant [5 x i8] c"Cone\00", align 1 ; [#uses=1]
-@.str166 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV11btConeShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI11btConeShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*)* @_ZN11btConeShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*)* @_ZN11btConeShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*, float, %struct.btQuadWord*)* @_ZNK11btConeShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConeShape*)* @_ZNK11btConeShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConeShape*, %struct.btQuadWord*)* @_ZNK11btConeShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConeShape*, %struct.btQuadWord*)* @_ZNK11btConeShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK11btConeShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI11btConeShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([14 x i8]* @_ZTS11btConeShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS11btConeShape = weak_odr constant [14 x i8] c"11btConeShape\00" ; [#uses=1]
-@_ZTV12btConeShapeX = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI12btConeShapeX to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShapeX*)* @_ZN12btConeShapeXD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShapeX*)* @_ZN12btConeShapeXD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*, float, %struct.btQuadWord*)* @_ZNK11btConeShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConeShape*)* @_ZNK11btConeShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConeShape*, %struct.btQuadWord*)* @_ZNK11btConeShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConeShape*, %struct.btQuadWord*)* @_ZNK11btConeShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK11btConeShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI12btConeShapeX = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12btConeShapeX, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI11btConeShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS12btConeShapeX = weak_odr constant [15 x i8] c"12btConeShapeX\00" ; [#uses=1]
-@_ZTV12btConeShapeZ = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI12btConeShapeZ to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShapeX*)* @_ZN12btConeShapeZD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShapeX*)* @_ZN12btConeShapeZD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*, float, %struct.btQuadWord*)* @_ZNK11btConeShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConeShape*)* @_ZNK11btConeShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConeShape*, %struct.btQuadWord*)* @_ZNK11btConeShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConeShape*, %struct.btQuadWord*)* @_ZNK11btConeShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK11btConeShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI12btConeShapeZ = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12btConeShapeZ, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI11btConeShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS12btConeShapeZ = weak_odr constant [15 x i8] c"12btConeShapeZ\00" ; [#uses=1]
-@.str67 = private constant [7 x i8] c"Convex\00", align 1 ; [#uses=1]
-@_ZTV17btConvexHullShape = weak_odr constant [30 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI17btConvexHullShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexHullShape*)* @_ZN17btConvexHullShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexHullShape*)* @_ZN17btConvexHullShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK34btPolyhedralConvexAabbCachingShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexHullShape*, %struct.btQuadWord*)* @_ZN17btConvexHullShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexHullShape*)* @_ZNK17btConvexHullShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexHullShape*)* @_ZNK17btConvexHullShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexHullShape*, i8*, %struct.btActionInterface*)* @_ZNK17btConvexHullShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexHullShape*, %struct.btQuadWord*)* @_ZNK17btConvexHullShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexHullShape*, %struct.btQuadWord*)* @_ZNK17btConvexHullShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexHullShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK17btConvexHullShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexHullShape*)* @_ZNK17btConvexHullShape14getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexHullShape*)* @_ZNK17btConvexHullShape11getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexHullShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK17btConvexHullShape7getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexHullShape*, i32, %struct.btQuadWord*)* @_ZNK17btConvexHullShape9getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexHullShape*)* @_ZNK17btConvexHullShape12getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexHullShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK17btConvexHullShape8getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btConvexHullShape*, %struct.btQuadWord*, float)* @_ZNK17btConvexHullShape8isInsideERK9btVector3f to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI17btConvexHullShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btConvexHullShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btPolyhedralConvexAabbCachingShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS17btConvexHullShape = weak_odr constant [20 x i8] c"17btConvexHullShape\00" ; [#uses=1]
-@.str268 = private constant [19 x i8] c"btVector3FloatData\00", align 1 ; [#uses=1]
-@.str369 = private constant [22 x i8] c"btConvexHullShapeData\00", align 1 ; [#uses=1]
-@_ZTV21btConvexInternalShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*)* @_ZN21btConvexInternalShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*)* @_ZN21btConvexInternalShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI21btConvexInternalShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btConvexInternalShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI13btConvexShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS21btConvexInternalShape = weak_odr constant [24 x i8] c"21btConvexInternalShape\00" ; [#uses=1]
-@_ZTV32btConvexInternalAabbCachingShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI32btConvexInternalAabbCachingShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalAabbCachingShape*)* @_ZN32btConvexInternalAabbCachingShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalAabbCachingShape*)* @_ZN32btConvexInternalAabbCachingShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalAabbCachingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK32btConvexInternalAabbCachingShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalAabbCachingShape*, %struct.btQuadWord*)* @_ZN32btConvexInternalAabbCachingShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI32btConvexInternalAabbCachingShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([35 x i8]* @_ZTS32btConvexInternalAabbCachingShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS32btConvexInternalAabbCachingShape = weak_odr constant [35 x i8] c"32btConvexInternalAabbCachingShape\00", align 32 ; [#uses=1]
-@.str72 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZGVZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions = internal global i64 0, align 8 ; [#uses=3]
-@_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions = internal global [6 x %struct.btQuadWord] zeroinitializer, align 32 ; [#uses=25]
-@.str77 = private constant [17 x i8] c"ConvexPointCloud\00", align 1 ; [#uses=1]
-@.str178 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV23btConvexPointCloudShape = weak_odr constant [30 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btConvexPointCloudShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPointCloudShape*)* @_ZN23btConvexPointCloudShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPointCloudShape*)* @_ZN23btConvexPointCloudShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK34btPolyhedralConvexAabbCachingShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPointCloudShape*, %struct.btQuadWord*)* @_ZN23btConvexPointCloudShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexPointCloudShape*)* @_ZNK23btConvexPointCloudShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexPointCloudShape*, %struct.btQuadWord*)* @_ZNK23btConvexPointCloudShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexPointCloudShape*, %struct.btQuadWord*)* @_ZNK23btConvexPointCloudShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPointCloudShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK23btConvexPointCloudShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexPointCloudShape*)* @_ZNK23btConvexPointCloudShape14getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexPointCloudShape*)* @_ZNK23btConvexPointCloudShape11getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPointCloudShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btConvexPointCloudShape7getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPointCloudShape*, i32, %struct.btQuadWord*)* @_ZNK23btConvexPointCloudShape9getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexPointCloudShape*)* @_ZNK23btConvexPointCloudShape12getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexPointCloudShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK23btConvexPointCloudShape8getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btConvexPointCloudShape*, %struct.btQuadWord*, float)* @_ZNK23btConvexPointCloudShape8isInsideERK9btVector3f to i32 (...)*)], align 32 ; [#uses=0]
-@_ZTI23btConvexPointCloudShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btConvexPointCloudShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btPolyhedralConvexAabbCachingShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS23btConvexPointCloudShape = weak_odr constant [26 x i8] c"23btConvexPointCloudShape\00" ; [#uses=1]
-@_ZTV13btConvexShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI13btConvexShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexShape*)* @_ZN13btConvexShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexShape*)* @_ZN13btConvexShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI13btConvexShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([16 x i8]* @_ZTS13btConvexShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI16btCollisionShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS13btConvexShape = weak_odr constant [16 x i8] c"13btConvexShape\00" ; [#uses=1]
-@.str82 = private constant [14 x i8] c"Convex2dShape\00", align 1 ; [#uses=1]
-@_ZTV15btConvex2dShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btConvex2dShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*)* @_ZN15btConvex2dShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*)* @_ZN15btConvex2dShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btConvex2dShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*, %struct.btQuadWord*)* @_ZN15btConvex2dShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvex2dShape*)* @_ZNK15btConvex2dShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*, float, %struct.btQuadWord*)* @_ZNK15btConvex2dShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvex2dShape*)* @_ZNK15btConvex2dShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*, float)* @_ZN15btConvex2dShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvex2dShape*)* @_ZNK15btConvex2dShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvex2dShape*, %struct.btQuadWord*)* @_ZNK15btConvex2dShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvex2dShape*, %struct.btQuadWord*)* @_ZNK15btConvex2dShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK15btConvex2dShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btConvex2dShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvex2dShape*)* @_ZNK15btConvex2dShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvex2dShape*, i32, %struct.btQuadWord*)* @_ZNK15btConvex2dShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btConvex2dShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btConvex2dShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI13btConvexShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS15btConvex2dShape = weak_odr constant [18 x i8] c"15btConvex2dShape\00" ; [#uses=1]
-@.str83 = private constant [14 x i8] c"ConvexTrimesh\00", align 1 ; [#uses=1]
-@_ZTV26LocalSupportVertexCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI26LocalSupportVertexCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.LocalSupportVertexCallback*)* @_ZN26LocalSupportVertexCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.LocalSupportVertexCallback*)* @_ZN26LocalSupportVertexCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.LocalSupportVertexCallback*, %struct.btQuadWord*, i32, i32)* @_ZN26LocalSupportVertexCallback28internalProcessTriangleIndexEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI26LocalSupportVertexCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([29 x i8]* @_ZTS26LocalSupportVertexCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS26LocalSupportVertexCallback = weak_odr constant [29 x i8] c"26LocalSupportVertexCallback\00" ; [#uses=1]
-@_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0CenterCallback*)* @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN14CenterCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0CenterCallback*)* @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN14CenterCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0CenterCallback*, %struct.btQuadWord*, i32, i32)* @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN14CenterCallback28internalProcessTriangleIndexEPS2_ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([109 x i8]* @_ZTSZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback = weak_odr constant [109 x i8] c"ZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback\00", align 32 ; [#uses=1]
-@.str184 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV25btConvexTriangleMeshShape = weak_odr constant [30 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btConvexTriangleMeshShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleMeshShape*)* @_ZN25btConvexTriangleMeshShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleMeshShape*)* @_ZN25btConvexTriangleMeshShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK34btPolyhedralConvexAabbCachingShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleMeshShape*, %struct.btQuadWord*)* @_ZN25btConvexTriangleMeshShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexTriangleMeshShape*)* @_ZNK25btConvexTriangleMeshShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexTriangleMeshShape*)* @_ZNK25btConvexTriangleMeshShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexTriangleMeshShape*, %struct.btQuadWord*)* @_ZNK25btConvexTriangleMeshShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexTriangleMeshShape*, %struct.btQuadWord*)* @_ZNK25btConvexTriangleMeshShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleMeshShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK25btConvexTriangleMeshShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexTriangleMeshShape*)* @_ZNK25btConvexTriangleMeshShape14getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexTriangleMeshShape*)* @_ZNK25btConvexTriangleMeshShape11getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleMeshShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK25btConvexTriangleMeshShape7getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleMeshShape*, i32, %struct.btQuadWord*)* @_ZNK25btConvexTriangleMeshShape9getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexTriangleMeshShape*)* @_ZNK25btConvexTriangleMeshShape12getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexTriangleMeshShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK25btConvexTriangleMeshShape8getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btConvexTriangleMeshShape*, %struct.btQuadWord*, float)* @_ZNK25btConvexTriangleMeshShape8isInsideERK9btVector3f to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI25btConvexTriangleMeshShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btConvexTriangleMeshShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btPolyhedralConvexAabbCachingShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS25btConvexTriangleMeshShape = weak_odr constant [28 x i8] c"25btConvexTriangleMeshShape\00" ; [#uses=1]
-@_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..1InertiaCallback*)* @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN15InertiaCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1InertiaCallback*)* @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN15InertiaCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1InertiaCallback*, %struct.btQuadWord*, i32, i32)* @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN15InertiaCallback28internalProcessTriangleIndexEPS2_ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([110 x i8]* @_ZTSZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback = weak_odr constant [110 x i8] c"ZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback\00", align 32 ; [#uses=1]
-@.str85 = private constant [10 x i8] c"CylinderY\00", align 1 ; [#uses=1]
-@.str186 = private constant [10 x i8] c"CylinderX\00", align 1 ; [#uses=1]
-@.str287 = private constant [10 x i8] c"CylinderZ\00", align 1 ; [#uses=1]
-@_ZTV15btCylinderShape = weak_odr constant [24 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btCylinderShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*)* @_ZN15btCylinderShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*)* @_ZN15btCylinderShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btCylinderShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZN15btCylinderShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float, %struct.btQuadWord*)* @_ZNK15btCylinderShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*)* @_ZNK15btCylinderShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float)* @_ZN15btCylinderShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCapsuleShape*)* @_ZNK15btCylinderShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*, i8*, %struct.btActionInterface*)* @_ZNK15btCylinderShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZNK15btCylinderShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZNK15btCylinderShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK15btCylinderShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (float (%struct.btCapsuleShape*)* @_ZNK15btCylinderShape9getRadiusEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btCylinderShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btCylinderShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS15btCylinderShape = weak_odr constant [18 x i8] c"15btCylinderShape\00" ; [#uses=1]
-@_ZTV16btCylinderShapeX = weak_odr constant [24 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btCylinderShapeX to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN16btCylinderShapeXD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN16btCylinderShapeXD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btCylinderShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZN15btCylinderShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float, %struct.btQuadWord*)* @_ZNK15btCylinderShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShapeX*)* @_ZNK16btCylinderShapeX7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float)* @_ZN15btCylinderShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCapsuleShape*)* @_ZNK15btCylinderShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*, i8*, %struct.btActionInterface*)* @_ZNK15btCylinderShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZNK15btCylinderShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShapeX*, %struct.btQuadWord*)* @_ZNK16btCylinderShapeX37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK16btCylinderShapeX49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (float (%struct.btCapsuleShapeX*)* @_ZNK16btCylinderShapeX9getRadiusEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI16btCylinderShapeX = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btCylinderShapeX, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btCylinderShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btCylinderShapeX = weak_odr constant [19 x i8] c"16btCylinderShapeX\00" ; [#uses=1]
-@_ZTV16btCylinderShapeZ = weak_odr constant [24 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btCylinderShapeZ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN16btCylinderShapeZD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*)* @_ZN16btCylinderShapeZD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btCylinderShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZN15btCylinderShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float, %struct.btQuadWord*)* @_ZNK15btCylinderShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShapeX*)* @_ZNK16btCylinderShapeZ7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShape*, float)* @_ZN15btCylinderShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCapsuleShape*)* @_ZNK15btCylinderShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCapsuleShape*, i8*, %struct.btActionInterface*)* @_ZNK15btCylinderShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* @_ZNK15btCylinderShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btCapsuleShapeX*, %struct.btQuadWord*)* @_ZNK16btCylinderShapeZ37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCapsuleShapeX*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK16btCylinderShapeZ49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (float (%struct.btCapsuleShapeX*)* @_ZNK16btCylinderShapeZ9getRadiusEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI16btCylinderShapeZ = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btCylinderShapeZ, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btCylinderShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btCylinderShapeZ = weak_odr constant [19 x i8] c"16btCylinderShapeZ\00" ; [#uses=1]
-@.str488 = private constant [20 x i8] c"btCylinderShapeData\00", align 1 ; [#uses=1]
-@.str89 = private constant [6 x i8] c"Empty\00", align 1 ; [#uses=1]
-@_ZTV12btEmptyShape = weak_odr constant [18 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI12btEmptyShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btEmptyShape*)* @_ZN12btEmptyShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btEmptyShape*)* @_ZN12btEmptyShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btEmptyShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK12btEmptyShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btEmptyShape*, %struct.btQuadWord*)* @_ZN12btEmptyShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btEmptyShape*)* @_ZNK12btEmptyShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btEmptyShape*, float, %struct.btQuadWord*)* @_ZNK12btEmptyShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btEmptyShape*)* @_ZNK12btEmptyShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*, float)* @_ZN14btConcaveShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btEmptyShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK12btEmptyShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI12btEmptyShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12btEmptyShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btConcaveShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS12btEmptyShape = weak_odr constant [15 x i8] c"12btEmptyShape\00" ; [#uses=1]
-@.str90 = private constant [12 x i8] c"HEIGHTFIELD\00", align 1 ; [#uses=1]
-@_ZTV25btHeightfieldTerrainShape = weak_odr constant [19 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btHeightfieldTerrainShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btHeightfieldTerrainShape*)* @_ZN25btHeightfieldTerrainShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btHeightfieldTerrainShape*)* @_ZN25btHeightfieldTerrainShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btHeightfieldTerrainShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK25btHeightfieldTerrainShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btHeightfieldTerrainShape*, %struct.btQuadWord*)* @_ZN25btHeightfieldTerrainShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btHeightfieldTerrainShape*)* @_ZNK25btHeightfieldTerrainShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btHeightfieldTerrainShape*, float, %struct.btQuadWord*)* @_ZNK25btHeightfieldTerrainShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btHeightfieldTerrainShape*)* @_ZNK25btHeightfieldTerrainShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*, float)* @_ZN14btConcaveShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btHeightfieldTerrainShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK25btHeightfieldTerrainShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (float (%struct.btHeightfieldTerrainShape*, i32, i32)* @_ZNK25btHeightfieldTerrainShape22getRawHeightFieldValueEii to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI25btHeightfieldTerrainShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btHeightfieldTerrainShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btConcaveShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS25btHeightfieldTerrainShape = weak_odr constant [28 x i8] c"25btHeightfieldTerrainShape\00" ; [#uses=1]
-@.str91 = private constant [13 x i8] c"MinkowskiSum\00", align 1 ; [#uses=1]
-@.str192 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV19btMinkowskiSumShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI19btMinkowskiSumShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btMinkowskiSumShape*)* @_ZN19btMinkowskiSumShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btMinkowskiSumShape*)* @_ZN19btMinkowskiSumShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btMinkowskiSumShape*, float, %struct.btQuadWord*)* @_ZNK19btMinkowskiSumShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btMinkowskiSumShape*)* @_ZNK19btMinkowskiSumShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btMinkowskiSumShape*)* @_ZNK19btMinkowskiSumShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btMinkowskiSumShape*, %struct.btQuadWord*)* @_ZNK19btMinkowskiSumShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btMinkowskiSumShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK19btMinkowskiSumShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI19btMinkowskiSumShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([22 x i8]* @_ZTS19btMinkowskiSumShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS19btMinkowskiSumShape = weak_odr constant [22 x i8] c"19btMinkowskiSumShape\00" ; [#uses=1]
-@.str93 = private constant [4 x i8] c"int\00", align 1 ; [#uses=0]
-@.str194 = private constant [19 x i8] c"btTriangleInfoData\00", align 1 ; [#uses=0]
-@.str295 = private constant [22 x i8] c"btTriangleInfoMapData\00", align 1 ; [#uses=0]
-@.str96 = private constant [12 x i8] c"MultiSphere\00", align 1 ; [#uses=1]
-@_ZTV18btMultiSphereShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI18btMultiSphereShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSphereShape*)* @_ZN18btMultiSphereShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSphereShape*)* @_ZN18btMultiSphereShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalAabbCachingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK32btConvexInternalAabbCachingShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalAabbCachingShape*, %struct.btQuadWord*)* @_ZN32btConvexInternalAabbCachingShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSphereShape*, float, %struct.btQuadWord*)* @_ZNK18btMultiSphereShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btMultiSphereShape*)* @_ZNK18btMultiSphereShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btMultiSphereShape*)* @_ZNK18btMultiSphereShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btMultiSphereShape*, i8*, %struct.btActionInterface*)* @_ZNK18btMultiSphereShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btMultiSphereShape*, %struct.btQuadWord*)* @_ZNK18btMultiSphereShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btMultiSphereShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK18btMultiSphereShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btMultiSphereShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btMultiSphereShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI32btConvexInternalAabbCachingShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS18btMultiSphereShape = weak_odr constant [21 x i8] c"18btMultiSphereShape\00" ; [#uses=1]
-@.str297 = private constant [20 x i8] c"btPositionAndRadius\00", align 1 ; [#uses=1]
-@.str398 = private constant [23 x i8] c"btMultiSphereShapeData\00", align 1 ; [#uses=1]
-@_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0NodeTriangleCallback*)* @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0NodeTriangleCallback*)* @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0NodeTriangleCallback*, %struct.btQuadWord*, i32, i32)* @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallback28internalProcessTriangleIndexEPS2_ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([91 x i8]* @_ZTSZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback = weak_odr constant [91 x i8] c"ZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback\00", align 32 ; [#uses=1]
-@_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..1QuantizedNodeTriangleCallback*)* @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1QuantizedNodeTriangleCallback*)* @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..1QuantizedNodeTriangleCallback*, %struct.btQuadWord*, i32, i32)* @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallback28internalProcessTriangleIndexEPS2_ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([100 x i8]* @_ZTSZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback = weak_odr constant [100 x i8] c"ZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback\00", align 32 ; [#uses=1]
-@_ZTV14btOptimizedBvh = weak_odr constant [10 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btOptimizedBvh to i32 (...)*), i32 (...)* bitcast (void (%struct.btOptimizedBvh*)* @_ZN14btOptimizedBvhD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btOptimizedBvh*)* @_ZN14btOptimizedBvhD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btQuantizedBvh*, i8*, i32, i8)* @_ZNK14btQuantizedBvh9serializeEPvjb to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btQuantizedBvh*)* @_ZNK14btQuantizedBvh31calculateSerializeBufferSizeNewEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btQuantizedBvh*, i8*, %struct.btActionInterface*)* @_ZNK14btQuantizedBvh9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuantizedBvh*, %struct.btQuantizedBvhFloatData*)* @_ZN14btQuantizedBvh16deSerializeFloatER23btQuantizedBvhFloatData to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuantizedBvh*, %struct.btQuantizedBvhDoubleData*)* @_ZN14btQuantizedBvh17deSerializeDoubleER24btQuantizedBvhDoubleData to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btOptimizedBvh*, i8*, i32, i8)* @_ZNK14btOptimizedBvh16serializeInPlaceEPvjb to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI14btOptimizedBvh = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([17 x i8]* @_ZTS14btOptimizedBvh, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI14btQuantizedBvh to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS14btOptimizedBvh = weak_odr constant [17 x i8] c"14btOptimizedBvh\00" ; [#uses=1]
-@_ZTV23btPolyhedralConvexShape = weak_odr constant [30 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btPolyhedralConvexShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*)* @_ZN23btPolyhedralConvexShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*)* @_ZN23btPolyhedralConvexShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btPolyhedralConvexShape*, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK23btPolyhedralConvexShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI23btPolyhedralConvexShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btPolyhedralConvexShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS23btPolyhedralConvexShape = weak_odr constant [26 x i8] c"23btPolyhedralConvexShape\00" ; [#uses=1]
-@_ZTV34btPolyhedralConvexAabbCachingShape = weak_odr constant [30 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btPolyhedralConvexAabbCachingShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*)* @_ZN34btPolyhedralConvexAabbCachingShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*)* @_ZN34btPolyhedralConvexAabbCachingShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK34btPolyhedralConvexAabbCachingShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*, %struct.btQuadWord*)* @_ZN34btPolyhedralConvexAabbCachingShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btPolyhedralConvexShape*, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK23btPolyhedralConvexShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI34btPolyhedralConvexAabbCachingShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([37 x i8]* @_ZTS34btPolyhedralConvexAabbCachingShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btPolyhedralConvexShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS34btPolyhedralConvexAabbCachingShape = weak_odr constant [37 x i8] c"34btPolyhedralConvexAabbCachingShape\00", align 32 ; [#uses=1]
-@.str105 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZGVZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions = internal global i64 0, align 8 ; [#uses=3]
-@_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions = internal global [6 x %struct.btQuadWord] zeroinitializer, align 32 ; [#uses=25]
-@.str111 = private constant [22 x i8] c"SCALEDBVHTRIANGLEMESH\00", align 1 ; [#uses=1]
-@_ZTV24btScaledTriangleCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI24btScaledTriangleCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledTriangleCallback*)* @_ZN24btScaledTriangleCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledTriangleCallback*)* @_ZN24btScaledTriangleCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledTriangleCallback*, %struct.btQuadWord*, i32, i32)* @_ZN24btScaledTriangleCallback15processTriangleEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI24btScaledTriangleCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([27 x i8]* @_ZTS24btScaledTriangleCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS24btScaledTriangleCallback = weak_odr constant [27 x i8] c"24btScaledTriangleCallback\00" ; [#uses=1]
-@.str1112 = private constant [4 x i8] c"int\00", align 1 ; [#uses=0]
-@.str2113 = private constant [19 x i8] c"btTriangleInfoData\00", align 1 ; [#uses=0]
-@.str3114 = private constant [22 x i8] c"btTriangleInfoMapData\00", align 1 ; [#uses=0]
-@_ZTV28btScaledBvhTriangleMeshShape = weak_odr constant [18 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI28btScaledBvhTriangleMeshShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledBvhTriangleMeshShape*)* @_ZN28btScaledBvhTriangleMeshShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledBvhTriangleMeshShape*)* @_ZN28btScaledBvhTriangleMeshShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledBvhTriangleMeshShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK28btScaledBvhTriangleMeshShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledBvhTriangleMeshShape*, %struct.btQuadWord*)* @_ZN28btScaledBvhTriangleMeshShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btScaledBvhTriangleMeshShape*)* @_ZNK28btScaledBvhTriangleMeshShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledBvhTriangleMeshShape*, float, %struct.btQuadWord*)* @_ZNK28btScaledBvhTriangleMeshShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btScaledBvhTriangleMeshShape*)* @_ZNK28btScaledBvhTriangleMeshShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*, float)* @_ZN14btConcaveShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btScaledBvhTriangleMeshShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK28btScaledBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI28btScaledBvhTriangleMeshShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([31 x i8]* @_ZTS28btScaledBvhTriangleMeshShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btConcaveShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS28btScaledBvhTriangleMeshShape = weak_odr constant [31 x i8] c"28btScaledBvhTriangleMeshShape\00", align 4 ; [#uses=1]
-@_ZGVZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints = internal global i64 0, align 8 ; [#uses=3]
-@_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints = internal global [62 x %struct.btQuadWord] zeroinitializer, align 32 ; [#uses=174]
-@.str115 = private constant [7 x i8] c"SPHERE\00", align 1 ; [#uses=1]
-@.str1117 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV13btSphereShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI13btSphereShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*)* @_ZN13btSphereShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*)* @_ZN13btSphereShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK13btSphereShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK13btSphereShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btPolyhedralConvexShape*)* @_ZNK13btSphereShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float)* @_ZN13btSphereShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btPolyhedralConvexShape*)* @_ZNK13btSphereShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btPolyhedralConvexShape*, %struct.btQuadWord*)* @_ZNK13btSphereShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btPolyhedralConvexShape*, %struct.btQuadWord*)* @_ZNK13btSphereShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK13btSphereShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI13btSphereShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([16 x i8]* @_ZTS13btSphereShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConvexInternalShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS13btSphereShape = weak_odr constant [16 x i8] c"13btSphereShape\00" ; [#uses=1]
-@.str120 = private constant [12 x i8] c"STATICPLANE\00", align 1 ; [#uses=1]
-@.str1121 = private constant [23 x i8] c"btStaticPlaneShapeData\00", align 1 ; [#uses=1]
-@_ZTV18btStaticPlaneShape = weak_odr constant [18 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI18btStaticPlaneShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btStaticPlaneShape*)* @_ZN18btStaticPlaneShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btStaticPlaneShape*)* @_ZN18btStaticPlaneShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btStaticPlaneShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK18btStaticPlaneShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btStaticPlaneShape*, %struct.btQuadWord*)* @_ZN18btStaticPlaneShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btStaticPlaneShape*)* @_ZNK18btStaticPlaneShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btStaticPlaneShape*, float, %struct.btQuadWord*)* @_ZNK18btStaticPlaneShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btStaticPlaneShape*)* @_ZNK18btStaticPlaneShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*, float)* @_ZN14btConcaveShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btStaticPlaneShape*)* @_ZNK18btStaticPlaneShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btStaticPlaneShape*, i8*, %struct.btActionInterface*)* @_ZNK18btStaticPlaneShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btStaticPlaneShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK18btStaticPlaneShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btStaticPlaneShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btStaticPlaneShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btConcaveShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS18btStaticPlaneShape = weak_odr constant [21 x i8] c"18btStaticPlaneShape\00" ; [#uses=1]
-@_ZTVZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0AabbCalculationCallback*)* @_ZZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_EN23AabbCalculationCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0AabbCalculationCallback*)* @_ZZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_EN23AabbCalculationCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0AabbCalculationCallback*, %struct.btQuadWord*, i32, i32)* @_ZZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_EN23AabbCalculationCallback28internalProcessTriangleIndexEPS0_ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([94 x i8]* @_ZTSZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback = weak_odr constant [94 x i8] c"ZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback\00", align 32 ; [#uses=1]
-@.str123 = private constant [15 x i8] c"btIntIndexData\00", align 1 ; [#uses=1]
-@.str1124 = private constant [27 x i8] c"btShortIntIndexTripletData\00", align 1 ; [#uses=1]
-@.str2125 = private constant [19 x i8] c"btVector3FloatData\00", align 1 ; [#uses=1]
-@.str3126 = private constant [20 x i8] c"btVector3DoubleData\00", align 1 ; [#uses=1]
-@.str4127 = private constant [15 x i8] c"btMeshPartData\00", align 1 ; [#uses=1]
-@.str5128 = private constant [28 x i8] c"btStridingMeshInterfaceData\00", align 1 ; [#uses=1]
-@_ZTV23btStridingMeshInterface = weak_odr constant [17 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI23btStridingMeshInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*)* @_ZN23btStridingMeshInterfaceD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*)* @_ZN23btStridingMeshInterfaceD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btStridingMeshInterface27InternalProcessAllTrianglesEP31btInternalTriangleIndexCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btStridingMeshInterface*)* @_ZNK23btStridingMeshInterface14hasPremadeAabbEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btStridingMeshInterface14setPremadeAabbERK9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btStridingMeshInterface14getPremadeAabbEP9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btStridingMeshInterface*)* @_ZNK23btStridingMeshInterface28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btStridingMeshInterface*, i8*, %struct.btActionInterface*)* @_ZNK23btStridingMeshInterface9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI23btStridingMeshInterface = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btStridingMeshInterface, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS23btStridingMeshInterface = weak_odr constant [26 x i8] c"23btStridingMeshInterface\00" ; [#uses=1]
-@.str129 = private constant [17 x i8] c"btBU_Simplex1to4\00", align 1 ; [#uses=1]
-@.str1130 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV16btBU_Simplex1to4 = weak_odr constant [31 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btBU_Simplex1to4 to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*)* @_ZN16btBU_Simplex1to4D1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*)* @_ZN16btBU_Simplex1to4D0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK16btBU_Simplex1to47getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*, %struct.btQuadWord*)* @_ZN34btPolyhedralConvexAabbCachingShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to47getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btPolyhedralConvexShape*, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK23btPolyhedralConvexShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to414getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to411getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK16btBU_Simplex1to47getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, i32, %struct.btQuadWord*)* @_ZNK16btBU_Simplex1to49getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to412getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK16btBU_Simplex1to48getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btBU_Simplex1to4*, %struct.btQuadWord*, float)* @_ZNK16btBU_Simplex1to48isInsideERK9btVector3f to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*, i32)* @_ZNK16btBU_Simplex1to48getIndexEi to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI16btBU_Simplex1to4 = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btBU_Simplex1to4, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btPolyhedralConvexAabbCachingShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS16btBU_Simplex1to4 = weak_odr constant [19 x i8] c"16btBU_Simplex1to4\00" ; [#uses=1]
-@_ZTV16btTriangleBuffer = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btTriangleBuffer to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleBuffer*)* @_ZN16btTriangleBufferD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleBuffer*)* @_ZN16btTriangleBufferD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleBuffer*, %struct.btQuadWord*, i32, i32)* @_ZN16btTriangleBuffer15processTriangleEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI16btTriangleBuffer = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btTriangleBuffer, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btTriangleBuffer = weak_odr constant [19 x i8] c"16btTriangleBuffer\00" ; [#uses=1]
-@_ZTV31btInternalTriangleIndexCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN31btInternalTriangleIndexCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN31btInternalTriangleIndexCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI31btInternalTriangleIndexCallback = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([34 x i8]* @_ZTS31btInternalTriangleIndexCallback, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS31btInternalTriangleIndexCallback = weak_odr constant [34 x i8] c"31btInternalTriangleIndexCallback\00", align 32 ; [#uses=1]
-@_ZTV18btTriangleCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN18btTriangleCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN18btTriangleCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI18btTriangleCallback = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btTriangleCallback, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS18btTriangleCallback = weak_odr constant [21 x i8] c"18btTriangleCallback\00" ; [#uses=1]
-@_ZTV26btTriangleIndexVertexArray = weak_odr constant [17 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI26btTriangleIndexVertexArray to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*)* @_ZN26btTriangleIndexVertexArrayD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*)* @_ZN26btTriangleIndexVertexArrayD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btStridingMeshInterface27InternalProcessAllTrianglesEP31btInternalTriangleIndexCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZN26btTriangleIndexVertexArray24getLockedVertexIndexBaseEPPhRiR14PHY_ScalarTypeS2_S1_S2_S2_S4_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZNK26btTriangleIndexVertexArray32getLockedReadOnlyVertexIndexBaseEPPKhRiR14PHY_ScalarTypeS3_S2_S3_S3_S5_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZN26btTriangleIndexVertexArray16unLockVertexBaseEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZNK26btTriangleIndexVertexArray24unLockReadOnlyVertexBaseEi to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleIndexVertexArray*)* @_ZNK26btTriangleIndexVertexArray14getNumSubPartsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZN26btTriangleIndexVertexArray19preallocateVerticesEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZN26btTriangleIndexVertexArray18preallocateIndicesEi to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btTriangleIndexVertexArray*)* @_ZNK26btTriangleIndexVertexArray14hasPremadeAabbEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK26btTriangleIndexVertexArray14setPremadeAabbERK9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK26btTriangleIndexVertexArray14getPremadeAabbEP9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btStridingMeshInterface*)* @_ZNK23btStridingMeshInterface28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btStridingMeshInterface*, i8*, %struct.btActionInterface*)* @_ZNK23btStridingMeshInterface9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI26btTriangleIndexVertexArray = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([29 x i8]* @_ZTS26btTriangleIndexVertexArray, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI23btStridingMeshInterface to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS26btTriangleIndexVertexArray = weak_odr constant [29 x i8] c"26btTriangleIndexVertexArray\00" ; [#uses=1]
-@_ZTV34btTriangleIndexVertexMaterialArray = weak_odr constant [19 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btTriangleIndexVertexMaterialArray to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexMaterialArray*)* @_ZN34btTriangleIndexVertexMaterialArrayD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexMaterialArray*)* @_ZN34btTriangleIndexVertexMaterialArrayD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btStridingMeshInterface27InternalProcessAllTrianglesEP31btInternalTriangleIndexCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZN26btTriangleIndexVertexArray24getLockedVertexIndexBaseEPPhRiR14PHY_ScalarTypeS2_S1_S2_S2_S4_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZNK26btTriangleIndexVertexArray32getLockedReadOnlyVertexIndexBaseEPPKhRiR14PHY_ScalarTypeS3_S2_S3_S3_S5_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZN26btTriangleIndexVertexArray16unLockVertexBaseEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZNK26btTriangleIndexVertexArray24unLockReadOnlyVertexBaseEi to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleIndexVertexArray*)* @_ZNK26btTriangleIndexVertexArray14getNumSubPartsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZN26btTriangleIndexVertexArray19preallocateVerticesEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZN26btTriangleIndexVertexArray18preallocateIndicesEi to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btTriangleIndexVertexArray*)* @_ZNK26btTriangleIndexVertexArray14hasPremadeAabbEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK26btTriangleIndexVertexArray14setPremadeAabbERK9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK26btTriangleIndexVertexArray14getPremadeAabbEP9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btStridingMeshInterface*)* @_ZNK23btStridingMeshInterface28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btStridingMeshInterface*, i8*, %struct.btActionInterface*)* @_ZNK23btStridingMeshInterface9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexMaterialArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZN34btTriangleIndexVertexMaterialArray21getLockedMaterialBaseEPPhRiR14PHY_ScalarTypeS2_S1_S2_S2_S4_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexMaterialArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZN34btTriangleIndexVertexMaterialArray29getLockedReadOnlyMaterialBaseEPPKhRiR14PHY_ScalarTypeS3_S2_S3_S3_S5_i to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI34btTriangleIndexVertexMaterialArray = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([37 x i8]* @_ZTS34btTriangleIndexVertexMaterialArray, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI26btTriangleIndexVertexArray to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS34btTriangleIndexVertexMaterialArray = weak_odr constant [37 x i8] c"34btTriangleIndexVertexMaterialArray\00", align 32 ; [#uses=1]
-@_ZTV14btTriangleMesh = weak_odr constant [17 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btTriangleMesh to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMesh*)* @_ZN14btTriangleMeshD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMesh*)* @_ZN14btTriangleMeshD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btStridingMeshInterface27InternalProcessAllTrianglesEP31btInternalTriangleIndexCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZN26btTriangleIndexVertexArray24getLockedVertexIndexBaseEPPhRiR14PHY_ScalarTypeS2_S1_S2_S2_S4_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* @_ZNK26btTriangleIndexVertexArray32getLockedReadOnlyVertexIndexBaseEPPKhRiR14PHY_ScalarTypeS3_S2_S3_S3_S5_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZN26btTriangleIndexVertexArray16unLockVertexBaseEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, i32)* @_ZNK26btTriangleIndexVertexArray24unLockReadOnlyVertexBaseEi to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleIndexVertexArray*)* @_ZNK26btTriangleIndexVertexArray14getNumSubPartsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMesh*, i32)* @_ZN14btTriangleMesh19preallocateVerticesEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMesh*, i32)* @_ZN14btTriangleMesh18preallocateIndicesEi to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btTriangleIndexVertexArray*)* @_ZNK26btTriangleIndexVertexArray14hasPremadeAabbEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK26btTriangleIndexVertexArray14setPremadeAabbERK9btVector3S2_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleIndexVertexArray*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK26btTriangleIndexVertexArray14getPremadeAabbEP9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btStridingMeshInterface*)* @_ZNK23btStridingMeshInterface28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btStridingMeshInterface*, i8*, %struct.btActionInterface*)* @_ZNK23btStridingMeshInterface9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI14btTriangleMesh = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([17 x i8]* @_ZTS14btTriangleMesh, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI26btTriangleIndexVertexArray to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS14btTriangleMesh = weak_odr constant [17 x i8] c"14btTriangleMesh\00" ; [#uses=1]
-@.str135 = private constant [13 x i8] c"TRIANGLEMESH\00", align 1 ; [#uses=1]
-@_ZTV21SupportVertexCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21SupportVertexCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.SupportVertexCallback*)* @_ZN21SupportVertexCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.SupportVertexCallback*)* @_ZN21SupportVertexCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.SupportVertexCallback*, %struct.btQuadWord*, i32, i32)* @_ZN21SupportVertexCallback15processTriangleEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI21SupportVertexCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21SupportVertexCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS21SupportVertexCallback = weak_odr constant [24 x i8] c"21SupportVertexCallback\00" ; [#uses=1]
-@_ZTVZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0FilteredCallback*)* @_ZZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN16FilteredCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0FilteredCallback*)* @_ZZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN16FilteredCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0FilteredCallback*, %struct.btQuadWord*, i32, i32)* @_ZZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN16FilteredCallback28internalProcessTriangleIndexEPS2_ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([102 x i8]* @_ZTSZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI31btInternalTriangleIndexCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback = weak_odr constant [102 x i8] c"ZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback\00", align 32 ; [#uses=1]
-@_ZTV19btTriangleMeshShape = weak_odr constant [20 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI19btTriangleMeshShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*)* @_ZN19btTriangleMeshShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*)* @_ZN19btTriangleMeshShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*, %struct.btQuadWord*)* @_ZN19btTriangleMeshShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btTriangleMeshShape*)* @_ZNK19btTriangleMeshShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*, float, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btTriangleMeshShape*)* @_ZNK19btTriangleMeshShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConcaveShape*, float)* @_ZN14btConcaveShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleMeshShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* @_ZNK19btTriangleMeshShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI19btTriangleMeshShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([22 x i8]* @_ZTS19btTriangleMeshShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btConcaveShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS19btTriangleMeshShape = weak_odr constant [22 x i8] c"19btTriangleMeshShape\00" ; [#uses=1]
-@.str146 = private constant [20 x i8] c"UniformScalingShape\00", align 1 ; [#uses=1]
-@_ZTV21btUniformScalingShape = weak_odr constant [23 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btUniformScalingShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*)* @_ZN21btUniformScalingShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*)* @_ZN21btUniformScalingShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btUniformScalingShape7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*, %struct.btQuadWord*)* @_ZN21btUniformScalingShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btUniformScalingShape*)* @_ZNK21btUniformScalingShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*, float, %struct.btQuadWord*)* @_ZNK21btUniformScalingShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btUniformScalingShape*)* @_ZNK21btUniformScalingShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*, float)* @_ZN21btUniformScalingShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btUniformScalingShape*)* @_ZNK21btUniformScalingShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btUniformScalingShape*, %struct.btQuadWord*)* @_ZNK21btUniformScalingShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btUniformScalingShape*, %struct.btQuadWord*)* @_ZNK21btUniformScalingShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK21btUniformScalingShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btUniformScalingShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btUniformScalingShape*)* @_ZNK21btUniformScalingShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniformScalingShape*, i32, %struct.btQuadWord*)* @_ZNK21btUniformScalingShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI21btUniformScalingShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btUniformScalingShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI13btConvexShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS21btUniformScalingShape = weak_odr constant [24 x i8] c"21btUniformScalingShape\00" ; [#uses=1]
-@_ZTV22btGenericPoolAllocator = weak_odr constant [4 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI22btGenericPoolAllocator to i32 (...)*), i32 (...)* bitcast (void (%struct.btGenericPoolAllocator*)* @_ZN22btGenericPoolAllocatorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGenericPoolAllocator*)* @_ZN22btGenericPoolAllocatorD0Ev to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI22btGenericPoolAllocator = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btGenericPoolAllocator, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS22btGenericPoolAllocator = weak_odr constant [25 x i8] c"22btGenericPoolAllocator\00" ; [#uses=1]
-@_ZTV22GIM_STANDARD_ALLOCATOR = weak_odr constant [4 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22GIM_STANDARD_ALLOCATOR to i32 (...)*), i32 (...)* bitcast (void (%struct.GIM_STANDARD_ALLOCATOR*)* @_ZN22GIM_STANDARD_ALLOCATORD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.GIM_STANDARD_ALLOCATOR*)* @_ZN22GIM_STANDARD_ALLOCATORD0Ev to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI22GIM_STANDARD_ALLOCATOR = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22GIM_STANDARD_ALLOCATOR, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI22btGenericPoolAllocator to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS22GIM_STANDARD_ALLOCATOR = weak_odr constant [25 x i8] c"22GIM_STANDARD_ALLOCATOR\00" ; [#uses=1]
-@g_main_allocator = global %struct.GIM_STANDARD_ALLOCATOR zeroinitializer, align 32 ; [#uses=10]
-@__dso_handle = external global i8* ; [#uses=1]
-@.str147 = private constant [9 x i8] c"Triangle\00", align 1 ; [#uses=0]
-@.str1148 = private constant [17 x i8] c"btBU_Simplex1to4\00", align 1 ; [#uses=0]
-@_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTIN18GIM_ShapeRetriever19ChildShapeRetrieverE to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%"struct.GIM_ShapeRetriever::ChildShapeRetriever"*, i32)* @_ZN18GIM_ShapeRetriever19ChildShapeRetriever13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (void (%"struct.GIM_ShapeRetriever::ChildShapeRetriever"*)* @_ZN18GIM_ShapeRetriever19ChildShapeRetrieverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.GIM_ShapeRetriever::ChildShapeRetriever"*)* @_ZN18GIM_ShapeRetriever19ChildShapeRetrieverD0Ev to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN18GIM_ShapeRetriever19ChildShapeRetrieverE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([44 x i8]* @_ZTSN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 0) } } ; [#uses=2]
-@_ZTSN18GIM_ShapeRetriever19ChildShapeRetrieverE = weak_odr constant [44 x i8] c"N18GIM_ShapeRetriever19ChildShapeRetrieverE\00", align 32 ; [#uses=1]
-@_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN18GIM_ShapeRetriever22TriangleShapeRetrieverE to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%"struct.GIM_ShapeRetriever::TetraShapeRetriever"*, i32)* @_ZN18GIM_ShapeRetriever22TriangleShapeRetriever13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (void (%"struct.GIM_ShapeRetriever::TetraShapeRetriever"*)* @_ZN18GIM_ShapeRetriever22TriangleShapeRetrieverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.GIM_ShapeRetriever::TetraShapeRetriever"*)* @_ZN18GIM_ShapeRetriever22TriangleShapeRetrieverD0Ev to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN18GIM_ShapeRetriever22TriangleShapeRetrieverE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([47 x i8]* @_ZTSN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN18GIM_ShapeRetriever19ChildShapeRetrieverE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN18GIM_ShapeRetriever22TriangleShapeRetrieverE = weak_odr constant [47 x i8] c"N18GIM_ShapeRetriever22TriangleShapeRetrieverE\00", align 32 ; [#uses=1]
-@_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN18GIM_ShapeRetriever19TetraShapeRetrieverE to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%"struct.GIM_ShapeRetriever::TetraShapeRetriever"*, i32)* @_ZN18GIM_ShapeRetriever19TetraShapeRetriever13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (void (%"struct.GIM_ShapeRetriever::TetraShapeRetriever"*)* @_ZN18GIM_ShapeRetriever19TetraShapeRetrieverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.GIM_ShapeRetriever::TetraShapeRetriever"*)* @_ZN18GIM_ShapeRetriever19TetraShapeRetrieverD0Ev to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN18GIM_ShapeRetriever19TetraShapeRetrieverE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([44 x i8]* @_ZTSN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN18GIM_ShapeRetriever19ChildShapeRetrieverE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN18GIM_ShapeRetriever19TetraShapeRetrieverE = weak_odr constant [44 x i8] c"N18GIM_ShapeRetriever19TetraShapeRetrieverE\00", align 32 ; [#uses=1]
-@_ZTV25btGImpactTriangleCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btGImpactTriangleCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactTriangleCallback*)* @_ZN25btGImpactTriangleCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactTriangleCallback*)* @_ZN25btGImpactTriangleCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactTriangleCallback*, %struct.btQuadWord*, i32, i32)* @_ZN25btGImpactTriangleCallback15processTriangleEP9btVector3ii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI25btGImpactTriangleCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btGImpactTriangleCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS25btGImpactTriangleCallback = weak_odr constant [28 x i8] c"25btGImpactTriangleCallback\00" ; [#uses=1]
-@_ZTVN27btGImpactCollisionAlgorithm10CreateFuncE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN27btGImpactCollisionAlgorithm10CreateFuncE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN27btGImpactCollisionAlgorithm10CreateFuncD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*)* @_ZN27btGImpactCollisionAlgorithm10CreateFuncD0Ev to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionAlgorithm* (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* @_ZN27btGImpactCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_ to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN27btGImpactCollisionAlgorithm10CreateFuncE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([44 x i8]* @_ZTSN27btGImpactCollisionAlgorithm10CreateFuncE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btCollisionAlgorithmCreateFunc to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN27btGImpactCollisionAlgorithm10CreateFuncE = weak_odr constant [44 x i8] c"N27btGImpactCollisionAlgorithm10CreateFuncE\00", align 32 ; [#uses=1]
-@_ZGVZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf = internal global i64 0, align 8 ; [#uses=3]
-@_ZZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf = internal global %"struct.btBoxBoxCollisionAlgorithm::CreateFunc" zeroinitializer ; [#uses=3]
-@.str2149 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV17btTriangleShapeEx = weak_odr constant [31 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI17btTriangleShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShapeEx*)* @_ZN17btTriangleShapeExD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShapeEx*)* @_ZN17btTriangleShapeExD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShapeEx*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK17btTriangleShapeEx7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, float, %struct.btQuadWord*)* @_ZNK15btTriangleShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btTriangleShape*)* @_ZNK15btTriangleShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btTriangleShape*, %struct.btQuadWord*)* @_ZNK15btTriangleShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK15btTriangleShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* @_ZNK15btTriangleShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape14getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape11getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btTriangleShape7getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* @_ZNK15btTriangleShape9getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTriangleShape*)* @_ZNK15btTriangleShape12getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK15btTriangleShape8getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btTriangleShape*, %struct.btQuadWord*, float)* @_ZNK15btTriangleShape8isInsideERK9btVector3f to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK15btTriangleShape16getPlaneEquationEiR9btVector3S1_ to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI17btTriangleShapeEx = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btTriangleShapeEx, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btTriangleShape to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS17btTriangleShapeEx = weak_odr constant [20 x i8] c"17btTriangleShapeEx\00" ; [#uses=1]
-@_ZTV20btTetrahedronShapeEx = weak_odr constant [31 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI20btTetrahedronShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btTetrahedronShapeEx*)* @_ZN20btTetrahedronShapeExD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTetrahedronShapeEx*)* @_ZN20btTetrahedronShapeExD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK16btBU_Simplex1to47getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexAabbCachingShape*, %struct.btQuadWord*)* @_ZN34btPolyhedralConvexAabbCachingShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, float, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to47getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, float)* @_ZN21btConvexInternalShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConvexInternalShape*, i8*, %struct.btActionInterface*)* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btPolyhedralConvexShape*, %struct.btQuadWord*)* @_ZNK23btPolyhedralConvexShape37localGetSupportingVertexWithoutMarginERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btPolyhedralConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK23btPolyhedralConvexShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConvexInternalShape*)* @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btConvexInternalShape*, i32, %struct.btQuadWord*)* @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to414getNumVerticesEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to411getNumEdgesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK16btBU_Simplex1to47getEdgeEiR9btVector3S1_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, i32, %struct.btQuadWord*)* @_ZNK16btBU_Simplex1to49getVertexEiR9btVector3 to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*)* @_ZNK16btBU_Simplex1to412getNumPlanesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btBU_Simplex1to4*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* @_ZNK16btBU_Simplex1to48getPlaneER9btVector3S1_i to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btBU_Simplex1to4*, %struct.btQuadWord*, float)* @_ZNK16btBU_Simplex1to48isInsideERK9btVector3f to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btBU_Simplex1to4*, i32)* @_ZNK16btBU_Simplex1to48getIndexEi to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI20btTetrahedronShapeEx = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([23 x i8]* @_ZTS20btTetrahedronShapeEx, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btBU_Simplex1to4 to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS20btTetrahedronShapeEx = weak_odr constant [23 x i8] c"20btTetrahedronShapeEx\00" ; [#uses=1]
-@_ZTV27btGImpactCollisionAlgorithm = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI27btGImpactCollisionAlgorithm to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCollisionAlgorithm*)* @_ZN27btGImpactCollisionAlgorithmD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCollisionAlgorithm*)* @_ZN27btGImpactCollisionAlgorithmD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN27btGImpactCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (float (%struct.btGImpactCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* @_ZN27btGImpactCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* @_ZN27btGImpactCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI27btGImpactCollisionAlgorithm = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([30 x i8]* @_ZTS27btGImpactCollisionAlgorithm, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btActivatingCollisionAlgorithm to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS27btGImpactCollisionAlgorithm = weak_odr constant [30 x i8] c"27btGImpactCollisionAlgorithm\00" ; [#uses=1]
-@.str153 = private constant [16 x i8] c"GImpactCompound\00", align 1 ; [#uses=1]
-@.str1154 = private constant [21 x i8] c"GImpactMeshShapePart\00", align 1 ; [#uses=1]
-@.str2155 = private constant [12 x i8] c"GImpactMesh\00", align 1 ; [#uses=1]
-@.str3156 = private constant [23 x i8] c"btGImpactMeshShapeData\00", align 1 ; [#uses=1]
-@_ZTVN22btGImpactCompoundShape24CompoundPrimitiveManagerE = weak_odr constant [8 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN22btGImpactCompoundShape24CompoundPrimitiveManagerE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"*)* @_ZN22btGImpactCompoundShape24CompoundPrimitiveManagerD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"*)* @_ZN22btGImpactCompoundShape24CompoundPrimitiveManagerD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"*)* @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager10is_trimeshEv to i32 (...)*), i32 (...)* bitcast (i32 (%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"*)* @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager19get_primitive_countEv to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"*, i32, %struct.GIM_AABB*)* @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager17get_primitive_boxEiR6btAABB to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"*, i32, %struct.btPrimitiveTriangle*)* @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager22get_primitive_triangleEiR19btPrimitiveTriangle to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTIN22btGImpactCompoundShape24CompoundPrimitiveManagerE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([53 x i8]* @_ZTSN22btGImpactCompoundShape24CompoundPrimitiveManagerE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI22btPrimitiveManagerBase to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN22btGImpactCompoundShape24CompoundPrimitiveManagerE = weak_odr constant [53 x i8] c"N22btGImpactCompoundShape24CompoundPrimitiveManagerE\00", align 32 ; [#uses=1]
-@_ZTI22btPrimitiveManagerBase = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btPrimitiveManagerBase, i32 0, i32 0) } } ; [#uses=1]
-@_ZTS22btPrimitiveManagerBase = weak_odr constant [25 x i8] c"22btPrimitiveManagerBase\00" ; [#uses=1]
-@_ZTVN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE = weak_odr constant [8 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"*)* @_ZN22btGImpactMeshShapePart23TrimeshPrimitiveManagerD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"*)* @_ZN22btGImpactMeshShapePart23TrimeshPrimitiveManagerD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"*)* @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10is_trimeshEv to i32 (...)*), i32 (...)* bitcast (i32 (%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"*)* @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager19get_primitive_countEv to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"*, i32, %struct.GIM_AABB*)* @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager17get_primitive_boxEiR6btAABB to i32 (...)*), i32 (...)* bitcast (void (%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"*, i32, %struct.btPrimitiveTriangle*)* @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager22get_primitive_triangleEiR19btPrimitiveTriangle to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTIN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([52 x i8]* @_ZTSN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI22btPrimitiveManagerBase to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE = weak_odr constant [52 x i8] c"N22btGImpactMeshShapePart23TrimeshPrimitiveManagerE\00", align 32 ; [#uses=1]
-@_ZTV23btGImpactShapeInterface = weak_odr constant [37 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btGImpactShapeInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterfaceD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterfaceD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btQuadWord*)* @_ZN23btGImpactShapeInterface15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, float)* @_ZN23btGImpactShapeInterface9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterface13calcLocalAABBEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterface10postUpdateEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface12getShapeTypeEv to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface15lockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface17unlockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, i32, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface12getChildAabbEiRK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK23btGImpactShapeInterface7rayTestERK9btVector3S2_RN16btCollisionWorld17RayResultCallbackE to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI23btGImpactShapeInterface = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btGImpactShapeInterface, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI14btConcaveShape to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS23btGImpactShapeInterface = weak_odr constant [26 x i8] c"23btGImpactShapeInterface\00" ; [#uses=1]
-@_ZTV22btGImpactCompoundShape = weak_odr constant [37 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btGImpactCompoundShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCompoundShape*)* @_ZN22btGImpactCompoundShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCompoundShape*)* @_ZN22btGImpactCompoundShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btQuadWord*)* @_ZN23btGImpactShapeInterface15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCompoundShape*, float, %struct.btQuadWord*)* @_ZNK22btGImpactCompoundShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGImpactCompoundShape*)* @_ZNK22btGImpactCompoundShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, float)* @_ZN23btGImpactShapeInterface9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterface13calcLocalAABBEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterface10postUpdateEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface12getShapeTypeEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactCompoundShape*)* @_ZNK22btGImpactCompoundShape19getGImpactShapeTypeEv to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btGImpactCompoundShape*)* @_ZNK22btGImpactCompoundShape19getPrimitiveManagerEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactCompoundShape*)* @_ZNK22btGImpactCompoundShape17getNumChildShapesEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactCompoundShape*)* @_ZNK22btGImpactCompoundShape20childrenHasTransformEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactCompoundShape*)* @_ZNK22btGImpactCompoundShape22needsRetrieveTrianglesEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactCompoundShape*)* @_ZNK22btGImpactCompoundShape25needsRetrieveTetrahedronsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCompoundShape*, i32, %struct.btTriangleShapeEx*)* @_ZNK22btGImpactCompoundShape17getBulletTriangleEiR17btTriangleShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCompoundShape*, i32, %struct.btTetrahedronShapeEx*)* @_ZNK22btGImpactCompoundShape20getBulletTetrahedronEiR20btTetrahedronShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface15lockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface17unlockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCompoundShape*, i32, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK22btGImpactCompoundShape12getChildAabbEiRK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%struct.btGImpactCompoundShape*, i32)* @_ZN22btGImpactCompoundShape13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%struct.btGImpactCompoundShape*, i32)* @_ZNK22btGImpactCompoundShape13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTransform*, %struct.btGImpactCompoundShape*, i32)* @_ZNK22btGImpactCompoundShape17getChildTransformEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactCompoundShape*, i32, %struct.btTransform*)* @_ZN22btGImpactCompoundShape17setChildTransformEiRK11btTransform to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK23btGImpactShapeInterface7rayTestERK9btVector3S2_RN16btCollisionWorld17RayResultCallbackE to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI22btGImpactCompoundShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btGImpactCompoundShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btGImpactShapeInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS22btGImpactCompoundShape = weak_odr constant [25 x i8] c"22btGImpactCompoundShape\00" ; [#uses=1]
-@_ZTV22btGImpactMeshShapePart = weak_odr constant [37 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btGImpactMeshShapePart to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*)* @_ZN22btGImpactMeshShapePartD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*)* @_ZN22btGImpactMeshShapePartD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*, %struct.btQuadWord*)* @_ZN22btGImpactMeshShapePart15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*, float, %struct.btQuadWord*)* @_ZNK22btGImpactMeshShapePart21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*, float)* @_ZN22btGImpactMeshShapePart9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btCollisionShape*)* @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* @_ZNK16btCollisionShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK22btGImpactMeshShapePart19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterface13calcLocalAABBEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*)* @_ZN23btGImpactShapeInterface10postUpdateEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface12getShapeTypeEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart19getGImpactShapeTypeEv to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart19getPrimitiveManagerEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart17getNumChildShapesEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart20childrenHasTransformEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart22needsRetrieveTrianglesEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart25needsRetrieveTetrahedronsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*, i32, %struct.btTriangleShapeEx*)* @_ZNK22btGImpactMeshShapePart17getBulletTriangleEiR17btTriangleShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*, i32, %struct.btTetrahedronShapeEx*)* @_ZNK22btGImpactMeshShapePart20getBulletTetrahedronEiR20btTetrahedronShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart15lockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*)* @_ZNK22btGImpactMeshShapePart17unlockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, i32, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface12getChildAabbEiRK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%struct.btGImpactMeshShapePart*, i32)* @_ZN22btGImpactMeshShapePart13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%struct.btGImpactMeshShapePart*, i32)* @_ZNK22btGImpactMeshShapePart13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTransform*, %struct.btGImpactMeshShapePart*, i32)* @_ZNK22btGImpactMeshShapePart17getChildTransformEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShapePart*, i32, %struct.btTransform*)* @_ZN22btGImpactMeshShapePart17setChildTransformEiRK11btTransform to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK23btGImpactShapeInterface7rayTestERK9btVector3S2_RN16btCollisionWorld17RayResultCallbackE to i32 (...)*)], align 32 ; [#uses=0]
-@_ZTI22btGImpactMeshShapePart = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btGImpactMeshShapePart, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btGImpactShapeInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS22btGImpactMeshShapePart = weak_odr constant [25 x i8] c"22btGImpactMeshShapePart\00" ; [#uses=1]
-@_ZTV18btGImpactMeshShape = weak_odr constant [37 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI18btGImpactMeshShape to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*)* @_ZN18btGImpactMeshShapeD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*)* @_ZN18btGImpactMeshShapeD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactShapeInterface*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK23btGImpactShapeInterface7getAabbERK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*)* @_ZNK16btCollisionShape20getAngularMotionDiscEv to i32 (...)*), i32 (...)* bitcast (float (%struct.btCollisionShape*, float)* @_ZNK16btCollisionShape27getContactBreakingThresholdEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, %struct.btQuadWord*)* @_ZN18btGImpactMeshShape15setLocalScalingERK9btVector3 to i32 (...)*), i32 (...)* bitcast (%struct.btQuadWord* (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface15getLocalScalingEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, float, %struct.btQuadWord*)* @_ZNK18btGImpactMeshShape21calculateLocalInertiaEfR9btVector3 to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape7getNameEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, float)* @_ZN18btGImpactMeshShape9setMarginEf to i32 (...)*), i32 (...)* bitcast (float (%struct.btConcaveShape*)* @_ZNK14btConcaveShape9getMarginEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGImpactMeshShape*, i8*, %struct.btActionInterface*)* @_ZNK18btGImpactMeshShape9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionShape*, %struct.btActionInterface*)* @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK18btGImpactMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*)* @_ZN18btGImpactMeshShape13calcLocalAABBEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*)* @_ZN18btGImpactMeshShape10postUpdateEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactShapeInterface*)* @_ZNK23btGImpactShapeInterface12getShapeTypeEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape19getGImpactShapeTypeEv to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape19getPrimitiveManagerEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape17getNumChildShapesEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape20childrenHasTransformEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape22needsRetrieveTrianglesEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape25needsRetrieveTetrahedronsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, i32, %struct.btTriangleShapeEx*)* @_ZNK18btGImpactMeshShape17getBulletTriangleEiR17btTriangleShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, i32, %struct.btTetrahedronShapeEx*)* @_ZNK18btGImpactMeshShape20getBulletTetrahedronEiR20btTetrahedronShapeEx to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape15lockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*)* @_ZNK18btGImpactMeshShape17unlockChildShapesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, i32, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* @_ZNK18btGImpactMeshShape12getChildAabbEiRK11btTransformR9btVector3S4_ to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%struct.btGImpactMeshShape*, i32)* @_ZN18btGImpactMeshShape13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (%struct.btCollisionShape* (%struct.btGImpactMeshShape*, i32)* @_ZNK18btGImpactMeshShape13getChildShapeEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btTransform*, %struct.btGImpactMeshShape*, i32)* @_ZNK18btGImpactMeshShape17getChildTransformEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, i32, %struct.btTransform*)* @_ZN18btGImpactMeshShape17setChildTransformEiRK11btTransform to i32 (...)*), i32 (...)* bitcast (void (%struct.btGImpactMeshShape*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK18btGImpactMeshShape7rayTestERK9btVector3S2_RN16btCollisionWorld17RayResultCallbackE to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btGImpactMeshShape = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btGImpactMeshShape, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btGImpactShapeInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS18btGImpactMeshShape = weak_odr constant [21 x i8] c"18btGImpactMeshShape\00" ; [#uses=1]
-@_ZGVZN27GIM_BOX_BOX_TRANSFORM_CACHE20calc_absolute_matrixEvE5vepsi = weak global i64 0, align 8 ; [#uses=0]
-@_ZL9g_allocfn = internal global i8* (i32)* null ; [#uses=5]
-@_ZL10g_allocafn = internal global i8* (i32)* null ; [#uses=3]
-@_ZL11g_reallocfn = internal global i8* (i8*, i32, i32)* null ; [#uses=2]
-@_ZL8g_freefn = internal global void (i8*)* null ; [#uses=4]
-@_ZTV16btPointCollector = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btPointCollector to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*)* @_ZN16btPointCollectorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*)* @_ZN16btPointCollectorD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*, i32, i32)* @_ZN16btPointCollector20setShapeIdentifiersAEii to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*, i32, i32)* @_ZN16btPointCollector20setShapeIdentifiersBEii to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* @_ZN16btPointCollector15addContactPointERK9btVector3S2_f to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI16btPointCollector = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btPointCollector, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN36btDiscreteCollisionDetectorInterface6ResultE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btPointCollector = weak_odr constant [19 x i8] c"16btPointCollector\00" ; [#uses=1]
-@_ZTV27btContinuousConvexCollision = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI27btContinuousConvexCollision to i32 (...)*), i32 (...)* bitcast (void (%struct.btContinuousConvexCollision*)* @_ZN27btContinuousConvexCollisionD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btContinuousConvexCollision*)* @_ZN27btContinuousConvexCollisionD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btContinuousConvexCollision*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %"struct.btConvexCast::CastResult"*)* @_ZN27btContinuousConvexCollision16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI27btContinuousConvexCollision = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([30 x i8]* @_ZTS27btContinuousConvexCollision, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI12btConvexCast to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS27btContinuousConvexCollision = weak_odr constant [30 x i8] c"27btContinuousConvexCollision\00" ; [#uses=1]
-@_ZTV12btConvexCast = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI12btConvexCast to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN12btConvexCastD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN12btConvexCastD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI12btConvexCast = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([15 x i8]* @_ZTS12btConvexCast, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS12btConvexCast = weak_odr constant [15 x i8] c"12btConvexCast\00" ; [#uses=1]
-@_ZTV15btGjkConvexCast = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btGjkConvexCast to i32 (...)*), i32 (...)* bitcast (void (%struct.btGjkConvexCast*)* @_ZN15btGjkConvexCastD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGjkConvexCast*)* @_ZN15btGjkConvexCastD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGjkConvexCast*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %"struct.btConvexCast::CastResult"*)* @_ZN15btGjkConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI15btGjkConvexCast = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btGjkConvexCast, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI12btConvexCast to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS15btGjkConvexCast = weak_odr constant [18 x i8] c"15btGjkConvexCast\00" ; [#uses=1]
-@_ZZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_PfRjE4imd3 = weak_odr constant [3 x i32] [i32 1, i32 2, i32 0] ; [#uses=2]
-@_ZZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_S3_PfRjE4imd3 = weak_odr constant [3 x i32] [i32 1, i32 2, i32 0] ; [#uses=2]
-@_ZZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonEE4i1m3 = weak_odr constant [3 x i32] [i32 1, i32 2, i32 0] ; [#uses=1]
-@_ZZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonEE4i2m3 = weak_odr constant [3 x i32] [i32 2, i32 0, i32 1] ; [#uses=1]
-@_ZTV30btGjkEpaPenetrationDepthSolver = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btGjkEpaPenetrationDepthSolver to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN30btGjkEpaPenetrationDepthSolverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN30btGjkEpaPenetrationDepthSolverD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct..0btMultiSapOverlapFilterCallback*, %struct.btVoronoiSimplexSolver*, %struct.btConvexShape*, %struct.btConvexShape*, %struct.btTransform*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN30btGjkEpaPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAlloc to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI30btGjkEpaPenetrationDepthSolver = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTS30btGjkEpaPenetrationDepthSolver, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btConvexPenetrationDepthSolver to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS30btGjkEpaPenetrationDepthSolver = weak_odr constant [33 x i8] c"30btGjkEpaPenetrationDepthSolver\00", align 32 ; [#uses=1]
-@gNumDeepPenetrationChecks = global i32 0 ; [#uses=2]
-@_ZTV17btGjkPairDetector = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI17btGjkPairDetector to i32 (...)*), i32 (...)* bitcast (void (%struct.btGjkPairDetector*)* @_ZN17btGjkPairDetectorD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGjkPairDetector*)* @_ZN17btGjkPairDetectorD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGjkPairDetector*, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"*, %struct.btActionInterface*, %struct.btActionInterface*, i8)* @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI17btGjkPairDetector = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btGjkPairDetector, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI36btDiscreteCollisionDetectorInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS17btGjkPairDetector = weak_odr constant [20 x i8] c"17btGjkPairDetector\00" ; [#uses=1]
-@gNumGjkChecks = global i32 0 ; [#uses=2]
-@_ZTVZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult = weak_odr constant [7 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*)* @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResultD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*)* @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResultD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*, i32, i32)* @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResult20setShapeIdentifiersAEii to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*, i32, i32)* @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResult20setShapeIdentifiersBEii to i32 (...)*), i32 (...)* bitcast (void (%struct..0btIntermediateResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResult15addContactPointERKS8_SG_f to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([186 x i8]* @_ZTSZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN36btDiscreteCollisionDetectorInterface6ResultE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult = weak_odr constant [186 x i8] c"ZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult\00", align 32 ; [#uses=1]
-@_ZTV33btMinkowskiPenetrationDepthSolver = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI33btMinkowskiPenetrationDepthSolver to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN33btMinkowskiPenetrationDepthSolverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN33btMinkowskiPenetrationDepthSolverD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct..0btMultiSapOverlapFilterCallback*, %struct.btVoronoiSimplexSolver*, %struct.btConvexShape*, %struct.btConvexShape*, %struct.btTransform*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAlloc to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI33btMinkowskiPenetrationDepthSolver = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([36 x i8]* @_ZTS33btMinkowskiPenetrationDepthSolver, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI30btConvexPenetrationDepthSolver to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS33btMinkowskiPenetrationDepthSolver = weak_odr constant [36 x i8] c"33btMinkowskiPenetrationDepthSolver\00", align 32 ; [#uses=1]
-@_ZGVZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections = internal global i64 0, align 8 ; [#uses=3]
-@_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections = internal global [62 x %struct.btQuadWord] zeroinitializer, align 32 ; [#uses=184]
-@gContactBreakingThreshold = global float 0x3F947AE140000000 ; [#uses=6]
-@gContactDestroyedCallback = global i8 (i8*)* null ; [#uses=4]
-@gContactProcessedCallback = global i8 (%struct.btManifoldPoint*, i8*, i8*)* null ; [#uses=1]
-@.str181 = private constant [9 x i8] c"Triangle\00", align 1 ; [#uses=0]
-@_ZTV25btTriangleRaycastCallback = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btTriangleRaycastCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleRaycastCallback*)* @_ZN25btTriangleRaycastCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleRaycastCallback*)* @_ZN25btTriangleRaycastCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleRaycastCallback*, %struct.btQuadWord*, i32, i32)* @_ZN25btTriangleRaycastCallback15processTriangleEP9btVector3ii to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI25btTriangleRaycastCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btTriangleRaycastCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS25btTriangleRaycastCallback = weak_odr constant [28 x i8] c"25btTriangleRaycastCallback\00" ; [#uses=1]
-@_ZTV28btTriangleConvexcastCallback = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI28btTriangleConvexcastCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleConvexcastCallback*)* @_ZN28btTriangleConvexcastCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleConvexcastCallback*)* @_ZN28btTriangleConvexcastCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTriangleConvexcastCallback*, %struct.btQuadWord*, i32, i32)* @_ZN28btTriangleConvexcastCallback15processTriangleEP9btVector3ii to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI28btTriangleConvexcastCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([31 x i8]* @_ZTS28btTriangleConvexcastCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btTriangleCallback to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS28btTriangleConvexcastCallback = weak_odr constant [31 x i8] c"28btTriangleConvexcastCallback\00", align 4 ; [#uses=1]
-@.str1186 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZTV22btSubsimplexConvexCast = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI22btSubsimplexConvexCast to i32 (...)*), i32 (...)* bitcast (void (%struct.btGjkConvexCast*)* @_ZN22btSubsimplexConvexCastD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGjkConvexCast*)* @_ZN22btSubsimplexConvexCastD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btGjkConvexCast*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %"struct.btConvexCast::CastResult"*)* @_ZN22btSubsimplexConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI22btSubsimplexConvexCast = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([25 x i8]* @_ZTS22btSubsimplexConvexCast, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI12btConvexCast to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS22btSubsimplexConvexCast = weak_odr constant [25 x i8] c"22btSubsimplexConvexCast\00" ; [#uses=1]
-@_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN16btCollisionWorld27ClosestConvexResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::ClosestConvexResultCallback"*)* @_ZN16btCollisionWorld27ClosestConvexResultCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::ClosestConvexResultCallback"*)* @_ZN16btCollisionWorld27ClosestConvexResultCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btBroadphaseProxy*)* @_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (float (%"struct.btCollisionWorld::ClosestConvexResultCallback"*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* @_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN16btCollisionWorld27ClosestConvexResultCallbackE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([50 x i8]* @_ZTSN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN16btCollisionWorld20ConvexResultCallbackE to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTSN16btCollisionWorld27ClosestConvexResultCallbackE = weak_odr constant [50 x i8] c"N16btCollisionWorld27ClosestConvexResultCallbackE\00", align 32 ; [#uses=1]
-@_ZTV17btActionInterface = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN17btActionInterfaceD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN17btActionInterfaceD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI17btActionInterface = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btActionInterface, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS17btActionInterface = weak_odr constant [20 x i8] c"17btActionInterface\00" ; [#uses=1]
-@_ZTV30btCharacterControllerInterface = weak_odr constant [15 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btCharacterControllerInterface to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN30btCharacterControllerInterfaceD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0btMultiSapOverlapFilterCallback*)* @_ZN30btCharacterControllerInterfaceD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI30btCharacterControllerInterface = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTS30btCharacterControllerInterface, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btActionInterface to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS30btCharacterControllerInterface = weak_odr constant [33 x i8] c"30btCharacterControllerInterface\00", align 32 ; [#uses=1]
-@_ZTV43btKinematicClosestNotMeConvexResultCallback = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI43btKinematicClosestNotMeConvexResultCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicClosestNotMeConvexResultCallback*)* @_ZN43btKinematicClosestNotMeConvexResultCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicClosestNotMeConvexResultCallback*)* @_ZN43btKinematicClosestNotMeConvexResultCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btBroadphaseProxy*)* @_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (float (%struct.btKinematicClosestNotMeConvexResultCallback*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* @_ZN43btKinematicClosestNotMeConvexResultCallback15addSingleResultERN16btCollisionWorld17LocalConvexResultEb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI43btKinematicClosestNotMeConvexResultCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([46 x i8]* @_ZTS43btKinematicClosestNotMeConvexResultCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN16btCollisionWorld27ClosestConvexResultCallbackE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS43btKinematicClosestNotMeConvexResultCallback = weak_odr constant [46 x i8] c"43btKinematicClosestNotMeConvexResultCallback\00", align 32 ; [#uses=1]
-@_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection = internal global i64 0, align 8 ; [#uses=15]
-@_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection = internal global [3 x %struct.btQuadWord] zeroinitializer, align 32 ; [#uses=32]
-@_ZTV30btKinematicCharacterController = weak_odr constant [15 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btKinematicCharacterController to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*)* @_ZN30btKinematicCharacterControllerD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*)* @_ZN30btKinematicCharacterControllerD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*, %struct.btCollisionWorld*, float)* @_ZN30btKinematicCharacterController12updateActionEP16btCollisionWorldf to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*, %struct.btActionInterface*)* @_ZN30btKinematicCharacterController9debugDrawEP12btIDebugDraw to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*, %struct.btQuadWord*)* @_ZN30btKinematicCharacterController16setWalkDirectionERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*, %struct.btQuadWord*, float)* @_ZN30btKinematicCharacterController26setVelocityForTimeIntervalERK9btVector3f to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*)* @_ZN30btKinematicCharacterController5resetEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*, %struct.btQuadWord*)* @_ZN30btKinematicCharacterController4warpERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*, %struct.btCollisionWorld*)* @_ZN30btKinematicCharacterController7preStepEP16btCollisionWorld to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*, %struct.btCollisionWorld*, float)* @_ZN30btKinematicCharacterController10playerStepEP16btCollisionWorldf to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btKinematicCharacterController*)* @_ZNK30btKinematicCharacterController7canJumpEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btKinematicCharacterController*)* @_ZN30btKinematicCharacterController4jumpEv to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btKinematicCharacterController*)* @_ZNK30btKinematicCharacterController8onGroundEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI30btKinematicCharacterController = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([33 x i8]* @_ZTS30btKinematicCharacterController, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI30btCharacterControllerInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS30btKinematicCharacterController = weak_odr constant [33 x i8] c"30btKinematicCharacterController\00", align 32 ; [#uses=1]
-@_ZL6vTwist = internal global %struct.btQuadWord { [4 x float] [float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00] } ; [#uses=3]
-@.str13 = private constant [26 x i8] c"btConeTwistConstraintData\00", align 1 ; [#uses=1]
-@_ZTV21btConeTwistConstraint = weak_odr constant [13 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btConeTwistConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeTwistConstraint*)* @_ZN21btConeTwistConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeTwistConstraint*)* @_ZN21btConeTwistConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeTwistConstraint*)* @_ZN21btConeTwistConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeTwistConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN21btConeTwistConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeTwistConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN21btConeTwistConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeTwistConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN21btConeTwistConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btConeTwistConstraint*, i32, float, i32)* @_ZN21btConeTwistConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btConeTwistConstraint*, i32, i32)* @_ZNK21btConeTwistConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btConeTwistConstraint*)* @_ZNK21btConeTwistConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btConeTwistConstraint*, i8*, %struct.btActionInterface*)* @_ZNK21btConeTwistConstraint9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI21btConeTwistConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btConeTwistConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTypedConstraint to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS21btConeTwistConstraint = weak_odr constant [24 x i8] c"21btConeTwistConstraint\00" ; [#uses=1]
-@_ZTV19btContactConstraint = weak_odr constant [13 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI19btContactConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btContactConstraint*)* @_ZN19btContactConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btContactConstraint*)* @_ZN19btContactConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btContactConstraint*)* @_ZN19btContactConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btContactConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN19btContactConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btContactConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN19btContactConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btTypedConstraint*)* @_ZNK17btTypedConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btTypedConstraint*, i8*, %struct.btActionInterface*)* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI19btContactConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([22 x i8]* @_ZTS19btContactConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTypedConstraint to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS19btContactConstraint = weak_odr constant [22 x i8] c"19btContactConstraint\00" ; [#uses=1]
-@.str114 = private constant [28 x i8] c"btGeneric6DofConstraintData\00", align 1 ; [#uses=1]
-@_ZTV23btGeneric6DofConstraint = weak_odr constant [14 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btGeneric6DofConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN23btGeneric6DofConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN23btGeneric6DofConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, i32, float, i32)* @_ZN23btGeneric6DofConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btGeneric6DofConstraint*, i32, i32)* @_ZNK23btGeneric6DofConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGeneric6DofConstraint*)* @_ZNK23btGeneric6DofConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGeneric6DofConstraint*, i8*, %struct.btActionInterface*)* @_ZNK23btGeneric6DofConstraint9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13calcAnchorPosEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI23btGeneric6DofConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btGeneric6DofConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTypedConstraint to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS23btGeneric6DofConstraint = weak_odr constant [26 x i8] c"23btGeneric6DofConstraint\00" ; [#uses=1]
-@.str215 = private constant [28 x i8] c"btGeneric6DofConstraintData\00", align 1 ; [#uses=0]
-@_ZTV29btGeneric6DofSpringConstraint = weak_odr constant [14 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI29btGeneric6DofSpringConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofSpringConstraint*)* @_ZN29btGeneric6DofSpringConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofSpringConstraint*)* @_ZN29btGeneric6DofSpringConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN23btGeneric6DofConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofSpringConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN29btGeneric6DofSpringConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, i32, float, i32)* @_ZN23btGeneric6DofConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btGeneric6DofConstraint*, i32, i32)* @_ZNK23btGeneric6DofConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGeneric6DofConstraint*)* @_ZNK23btGeneric6DofConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGeneric6DofConstraint*, i8*, %struct.btActionInterface*)* @_ZNK23btGeneric6DofConstraint9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13calcAnchorPosEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI29btGeneric6DofSpringConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([32 x i8]* @_ZTS29btGeneric6DofSpringConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btGeneric6DofConstraint to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS29btGeneric6DofSpringConstraint = weak_odr constant [32 x i8] c"29btGeneric6DofSpringConstraint\00", align 32 ; [#uses=1]
-@.str316 = private constant [28 x i8] c"btGeneric6DofConstraintData\00", align 1 ; [#uses=0]
-@_ZTV18btHinge2Constraint = weak_odr constant [14 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI18btHinge2Constraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btHinge2Constraint*)* @_ZN18btHinge2ConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btHinge2Constraint*)* @_ZN18btHinge2ConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN23btGeneric6DofConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofSpringConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN29btGeneric6DofSpringConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, i32, float, i32)* @_ZN23btGeneric6DofConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btGeneric6DofConstraint*, i32, i32)* @_ZNK23btGeneric6DofConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGeneric6DofConstraint*)* @_ZNK23btGeneric6DofConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGeneric6DofConstraint*, i8*, %struct.btActionInterface*)* @_ZNK23btGeneric6DofConstraint9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13calcAnchorPosEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btHinge2Constraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btHinge2Constraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI29btGeneric6DofSpringConstraint to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS18btHinge2Constraint = weak_odr constant [21 x i8] c"18btHinge2Constraint\00" ; [#uses=1]
-@_ZL6vHinge = internal global %struct.btQuadWord { [4 x float] [float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00] } ; [#uses=3]
-@.str417 = private constant [27 x i8] c"btHingeConstraintFloatData\00", align 1 ; [#uses=1]
-@_ZTV17btHingeConstraint = weak_odr constant [13 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI17btHingeConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btHingeConstraint*)* @_ZN17btHingeConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btHingeConstraint*)* @_ZN17btHingeConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btHingeConstraint*)* @_ZN17btHingeConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btHingeConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN17btHingeConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btHingeConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN17btHingeConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btHingeConstraint*, i32, float, i32)* @_ZN17btHingeConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btHingeConstraint*, i32, i32)* @_ZNK17btHingeConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btHingeConstraint*)* @_ZNK17btHingeConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btHingeConstraint*, i8*, %struct.btActionInterface*)* @_ZNK17btHingeConstraint9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI17btHingeConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([20 x i8]* @_ZTS17btHingeConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTypedConstraint to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS17btHingeConstraint = weak_odr constant [20 x i8] c"17btHingeConstraint\00" ; [#uses=1]
-@.str518 = private constant [33 x i8] c"btPoint2PointConstraintFloatData\00", align 4 ; [#uses=1]
-@_ZTV23btPoint2PointConstraint = weak_odr constant [13 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btPoint2PointConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btPoint2PointConstraint*)* @_ZN23btPoint2PointConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPoint2PointConstraint*)* @_ZN23btPoint2PointConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btPoint2PointConstraint*)* @_ZN23btPoint2PointConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btPoint2PointConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN23btPoint2PointConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btPoint2PointConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN23btPoint2PointConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btPoint2PointConstraint*, i32, float, i32)* @_ZN23btPoint2PointConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btPoint2PointConstraint*, i32, i32)* @_ZNK23btPoint2PointConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btPoint2PointConstraint*)* @_ZNK23btPoint2PointConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btPoint2PointConstraint*, i8*, %struct.btActionInterface*)* @_ZNK23btPoint2PointConstraint9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI23btPoint2PointConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btPoint2PointConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTypedConstraint to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS23btPoint2PointConstraint = weak_odr constant [26 x i8] c"23btPoint2PointConstraint\00" ; [#uses=1]
-@gNumSplitImpulseRecoveries = global i32 0 ; [#uses=2]
-@_ZTV18btConstraintSolver = weak_odr constant [8 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btConstraintSolver to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN18btConstraintSolverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN18btConstraintSolverD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, i32, i32)* @_ZN18btConstraintSolver12prepareSolveEii to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN18btConstraintSolver9allSolvedERK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btConstraintSolver = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btConstraintSolver, i32 0, i32 0) } } ; [#uses=2]
-@_ZTS18btConstraintSolver = weak_odr constant [21 x i8] c"18btConstraintSolver\00" ; [#uses=1]
-@_ZGVZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed = internal global i64 0, align 8 ; [#uses=4]
-@_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed = internal global %struct.btRigidBody zeroinitializer, align 32 ; [#uses=13]
-@_ZTV35btSequentialImpulseConstraintSolver = weak_odr constant [12 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI35btSequentialImpulseConstraintSolver to i32 (...)*), i32 (...)* bitcast (void (%struct.btSequentialImpulseConstraintSolver*)* @_ZN35btSequentialImpulseConstraintSolverD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSequentialImpulseConstraintSolver*)* @_ZN35btSequentialImpulseConstraintSolverD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, i32, i32)* @_ZN18btConstraintSolver12prepareSolveEii to i32 (...)*), i32 (...)* bitcast (float (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*, %struct.btActionInterface*)* @_ZN35btSequentialImpulseConstraintSolver10solveGroupEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAllocP12btDispatcher to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN18btConstraintSolver9allSolvedERK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc to i32 (...)*), i32 (...)* bitcast (void (%struct.btSequentialImpulseConstraintSolver*)* @_ZN35btSequentialImpulseConstraintSolver5resetEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN35btSequentialImpulseConstraintSolver45solveGroupCacheFriendlySplitImpulseIterationsEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc to i32 (...)*), i32 (...)* bitcast (float (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN35btSequentialImpulseConstraintSolver29solveGroupCacheFriendlyFinishEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc to i32 (...)*), i32 (...)* bitcast (float (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN35btSequentialImpulseConstraintSolver28solveGroupCacheFriendlySetupEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc to i32 (...)*), i32 (...)* bitcast (float (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* @_ZN35btSequentialImpulseConstraintSolver33solveGroupCacheFriendlyIterationsEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI35btSequentialImpulseConstraintSolver = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([38 x i8]* @_ZTS35btSequentialImpulseConstraintSolver, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btConstraintSolver to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS35btSequentialImpulseConstraintSolver = weak_odr constant [38 x i8] c"35btSequentialImpulseConstraintSolver\00", align 32 ; [#uses=1]
-@.str619 = private constant [11 x i8] c"solveGroup\00", align 1 ; [#uses=1]
-@.str17 = private constant [34 x i8] c"solveGroupCacheFriendlyIterations\00", align 4 ; [#uses=1]
-@.str28 = private constant [29 x i8] c"solveGroupCacheFriendlySetup\00", align 1 ; [#uses=1]
-@.str920 = private constant [23 x i8] c"btSliderConstraintData\00", align 1 ; [#uses=1]
-@_ZTV18btSliderConstraint = weak_odr constant [13 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI18btSliderConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btSliderConstraint*)* @_ZN18btSliderConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSliderConstraint*)* @_ZN18btSliderConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*)* @_ZN17btTypedConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btSliderConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN18btSliderConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btSliderConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN18btSliderConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btSliderConstraint*, i32, float, i32)* @_ZN18btSliderConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btSliderConstraint*, i32, i32)* @_ZNK18btSliderConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btSliderConstraint*)* @_ZNK18btSliderConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btSliderConstraint*, i8*, %struct.btActionInterface*)* @_ZNK18btSliderConstraint9serializeEPvP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI18btSliderConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btSliderConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__vmi_class_type_info_pseudo1* @_ZTI17btTypedConstraint to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS18btSliderConstraint = weak_odr constant [21 x i8] c"18btSliderConstraint\00" ; [#uses=1]
-@.str1021 = private constant [22 x i8] c"btTypedConstraintData\00", align 1 ; [#uses=1]
-@_ZGVZN17btTypedConstraint12getFixedBodyEvE7s_fixed = internal global i64 0, align 8 ; [#uses=4]
-@_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed = internal global %struct.btRigidBody zeroinitializer, align 32 ; [#uses=11]
-@.str1822 = private constant [28 x i8] c"btGeneric6DofConstraintData\00", align 1 ; [#uses=0]
-@_ZTV21btUniversalConstraint = weak_odr constant [14 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btUniversalConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniversalConstraint*)* @_ZN21btUniversalConstraintD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btUniversalConstraint*)* @_ZN21btUniversalConstraintD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13buildJacobianEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btConstraintArray*, i32, i32, float)* @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, %struct.CONTACT_KEY_TOKEN*)* @_ZN23btGeneric6DofConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* @_ZN23btGeneric6DofConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E to i32 (...)*), i32 (...)* bitcast (void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*, i32, float, i32)* @_ZN23btGeneric6DofConstraint8setParamEifi to i32 (...)*), i32 (...)* bitcast (float (%struct.btGeneric6DofConstraint*, i32, i32)* @_ZNK23btGeneric6DofConstraint8getParamEii to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btGeneric6DofConstraint*)* @_ZNK23btGeneric6DofConstraint28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btGeneric6DofConstraint*, i8*, %struct.btActionInterface*)* @_ZNK23btGeneric6DofConstraint9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btGeneric6DofConstraint*)* @_ZN23btGeneric6DofConstraint13calcAnchorPosEv to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI21btUniversalConstraint = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btUniversalConstraint, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btGeneric6DofConstraint to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS21btUniversalConstraint = weak_odr constant [24 x i8] c"21btUniversalConstraint\00" ; [#uses=1]
-@.str19 = private constant [10 x i8] c"toi = %f\0A\00", align 1 ; [#uses=1]
-@_ZTV25btContinuousDynamicsWorld = weak_odr constant [46 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btContinuousDynamicsWorld to i32 (...)*), i32 (...)* bitcast (void (%struct.btContinuousDynamicsWorld*)* @_ZN25btContinuousDynamicsWorldD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btContinuousDynamicsWorld*)* @_ZN25btContinuousDynamicsWorldD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld11updateAabbsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld14setDebugDrawerEP12btIDebugDraw to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld14getDebugDrawerEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld14debugDrawWorldEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btTransform*, %struct.btCollisionShape*, %struct.btQuadWord*)* @_ZN16btCollisionWorld15debugDrawObjectERK11btTransformPK16btCollisionShapeRK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK16btCollisionWorld7rayTestERK9btVector3S2_RNS_17RayResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btCollisionObject*, i16, i16)* @_ZN23btDiscreteDynamicsWorld18addCollisionObjectEP17btCollisionObjectss to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btCollisionObject*)* @_ZN23btDiscreteDynamicsWorld21removeCollisionObjectEP17btCollisionObject to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld33performDiscreteCollisionDetectionEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld9serializeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btDiscreteDynamicsWorld*, float, i32, float)* @_ZN23btDiscreteDynamicsWorld14stepSimulationEfif to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btTypedConstraint*, i8)* @_ZN23btDiscreteDynamicsWorld13addConstraintEP17btTypedConstraintb to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btTypedConstraint*)* @_ZN23btDiscreteDynamicsWorld16removeConstraintEP17btTypedConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld9addActionEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld12removeActionEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btQuadWord*)* @_ZN23btDiscreteDynamicsWorld10setGravityERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btDiscreteDynamicsWorld*)* @_ZNK23btDiscreteDynamicsWorld10getGravityEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld23synchronizeMotionStatesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*)* @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBody to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*)* @_ZN23btDiscreteDynamicsWorld15removeRigidBodyEP11btRigidBody to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld19setConstraintSolverEP18btConstraintSolver to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld19getConstraintSolverEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btDiscreteDynamicsWorld*)* @_ZNK23btDiscreteDynamicsWorld17getNumConstraintsEv to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDiscreteDynamicsWorld*, i32)* @_ZN23btDiscreteDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDiscreteDynamicsWorld*, i32)* @_ZNK23btDiscreteDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btContinuousDynamicsWorld*)* @_ZNK25btContinuousDynamicsWorld12getWorldTypeEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld11clearForcesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld10addVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld13removeVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld12addCharacterEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld15removeCharacterEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld25predictUnconstraintMotionEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld19integrateTransformsEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld26calculateSimulationIslandsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btContactSolverInfo*)* @_ZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfo to i32 (...)*), i32 (...)* bitcast (void (%struct.btContinuousDynamicsWorld*, float)* @_ZN25btContinuousDynamicsWorld28internalSingleStepSimulationEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld18saveKinematicStateEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*, i16, i16)* @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBodyss to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld12applyGravityEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, i32)* @_ZN23btDiscreteDynamicsWorld11setNumTasksEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld14updateVehiclesEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btContinuousDynamicsWorld*, float)* @_ZN25btContinuousDynamicsWorld22calculateTimeOfImpactsEf to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI25btContinuousDynamicsWorld = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btContinuousDynamicsWorld, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btDiscreteDynamicsWorld to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS25btContinuousDynamicsWorld = weak_odr constant [28 x i8] c"25btContinuousDynamicsWorld\00" ; [#uses=1]
-@_ZTVN25btSimulationIslandManager14IslandCallbackE = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTIN25btSimulationIslandManager14IslandCallbackE to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN25btSimulationIslandManager14IslandCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btActionInterface*)* @_ZN25btSimulationIslandManager14IslandCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN25btSimulationIslandManager14IslandCallbackE = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([46 x i8]* @_ZTSN25btSimulationIslandManager14IslandCallbackE, i32 0, i32 0) } } ; [#uses=2]
-@_ZTSN25btSimulationIslandManager14IslandCallbackE = weak_odr constant [46 x i8] c"N25btSimulationIslandManager14IslandCallbackE\00", align 32 ; [#uses=1]
-@_ZTV34btClosestNotMeConvexResultCallback = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI34btClosestNotMeConvexResultCallback to i32 (...)*), i32 (...)* bitcast (void (%struct.btClosestNotMeConvexResultCallback*)* @_ZN34btClosestNotMeConvexResultCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btClosestNotMeConvexResultCallback*)* @_ZN34btClosestNotMeConvexResultCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btClosestNotMeConvexResultCallback*, %struct.btBroadphaseProxy*)* @_ZNK34btClosestNotMeConvexResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (float (%struct.btClosestNotMeConvexResultCallback*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* @_ZN34btClosestNotMeConvexResultCallback15addSingleResultERN16btCollisionWorld17LocalConvexResultEb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI34btClosestNotMeConvexResultCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([37 x i8]* @_ZTS34btClosestNotMeConvexResultCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN16btCollisionWorld27ClosestConvexResultCallbackE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS34btClosestNotMeConvexResultCallback = weak_odr constant [37 x i8] c"34btClosestNotMeConvexResultCallback\00", align 32 ; [#uses=1]
-@_ZTVZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback to i32 (...)*), i32 (...)* bitcast (void (%struct..0InplaceSolverIslandCallback*)* @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0InplaceSolverIslandCallback*)* @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct..0InplaceSolverIslandCallback*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, i32)* @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallback13ProcessIslandEPP17btCollisionObjectiPP20btPersistentManifoldii to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([99 x i8]* @_ZTSZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN25btSimulationIslandManager14IslandCallbackE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback = weak_odr constant [99 x i8] c"ZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback\00", align 32 ; [#uses=1]
-@.str20 = private constant [26 x i8] c"predictUnconstraintMotion\00", align 1 ; [#uses=1]
-@.str121 = private constant [27 x i8] c"calculateSimulationIslands\00", align 1 ; [#uses=1]
-@.str222 = private constant [14 x i8] c"updateActions\00", align 1 ; [#uses=1]
-@.str323 = private constant [20 x i8] c"integrateTransforms\00", align 1 ; [#uses=1]
-@.str424 = private constant [20 x i8] c"CCD motion clamping\00", align 1 ; [#uses=1]
-@gNumClampedCcdMotions = global i32 0 ; [#uses=2]
-@.str525 = private constant [17 x i8] c"solveConstraints\00", align 1 ; [#uses=1]
-@.str626 = private constant [22 x i8] c"updateActivationState\00", align 1 ; [#uses=1]
-@.str723 = private constant [29 x i8] c"internalSingleStepSimulation\00", align 1 ; [#uses=1]
-@.str824 = private constant [15 x i8] c"stepSimulation\00", align 1 ; [#uses=1]
-@.str927 = private constant [24 x i8] c"synchronizeMotionStates\00", align 1 ; [#uses=1]
-@.str1028 = private constant [15 x i8] c"debugDrawWorld\00", align 1 ; [#uses=1]
-@_ZTV15btDynamicsWorld = weak_odr constant [35 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btDynamicsWorld to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*)* @_ZN15btDynamicsWorldD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*)* @_ZN15btDynamicsWorldD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld11updateAabbsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld14setDebugDrawerEP12btIDebugDraw to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld14getDebugDrawerEv to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btTransform*, %struct.btCollisionShape*, %struct.btQuadWord*)* @_ZN16btCollisionWorld15debugDrawObjectERK11btTransformPK16btCollisionShapeRK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK16btCollisionWorld7rayTestERK9btVector3S2_RNS_17RayResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btCollisionObject*, i16, i16)* @_ZN16btCollisionWorld18addCollisionObjectEP17btCollisionObjectss to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btCollisionObject*)* @_ZN16btCollisionWorld21removeCollisionObjectEP17btCollisionObject to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld33performDiscreteCollisionDetectionEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld9serializeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btTypedConstraint*, i8)* @_ZN15btDynamicsWorld13addConstraintEP17btTypedConstraintb to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btTypedConstraint*)* @_ZN15btDynamicsWorld16removeConstraintEP17btTypedConstraint to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btDynamicsWorld*)* @_ZNK15btDynamicsWorld17getNumConstraintsEv to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDynamicsWorld*, i32)* @_ZN15btDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDynamicsWorld*, i32)* @_ZNK15btDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld10addVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld13removeVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld12addCharacterEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld15removeCharacterEP17btActionInterface to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI15btDynamicsWorld = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([18 x i8]* @_ZTS15btDynamicsWorld, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI16btCollisionWorld to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS15btDynamicsWorld = weak_odr constant [18 x i8] c"15btDynamicsWorld\00" ; [#uses=1]
-@_ZTV23btDiscreteDynamicsWorld = weak_odr constant [45 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI23btDiscreteDynamicsWorld to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorldD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorldD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld11updateAabbsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld14setDebugDrawerEP12btIDebugDraw to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld14getDebugDrawerEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld14debugDrawWorldEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btTransform*, %struct.btCollisionShape*, %struct.btQuadWord*)* @_ZN16btCollisionWorld15debugDrawObjectERK11btTransformPK16btCollisionShapeRK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK16btCollisionWorld7rayTestERK9btVector3S2_RNS_17RayResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btCollisionObject*, i16, i16)* @_ZN23btDiscreteDynamicsWorld18addCollisionObjectEP17btCollisionObjectss to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btCollisionObject*)* @_ZN23btDiscreteDynamicsWorld21removeCollisionObjectEP17btCollisionObject to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld33performDiscreteCollisionDetectionEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld9serializeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btDiscreteDynamicsWorld*, float, i32, float)* @_ZN23btDiscreteDynamicsWorld14stepSimulationEfif to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btTypedConstraint*, i8)* @_ZN23btDiscreteDynamicsWorld13addConstraintEP17btTypedConstraintb to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btTypedConstraint*)* @_ZN23btDiscreteDynamicsWorld16removeConstraintEP17btTypedConstraint to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld9addActionEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld12removeActionEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btQuadWord*)* @_ZN23btDiscreteDynamicsWorld10setGravityERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btDiscreteDynamicsWorld*)* @_ZNK23btDiscreteDynamicsWorld10getGravityEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld23synchronizeMotionStatesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*)* @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBody to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*)* @_ZN23btDiscreteDynamicsWorld15removeRigidBodyEP11btRigidBody to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld19setConstraintSolverEP18btConstraintSolver to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld19getConstraintSolverEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btDiscreteDynamicsWorld*)* @_ZNK23btDiscreteDynamicsWorld17getNumConstraintsEv to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDiscreteDynamicsWorld*, i32)* @_ZN23btDiscreteDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDiscreteDynamicsWorld*, i32)* @_ZNK23btDiscreteDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btDiscreteDynamicsWorld*)* @_ZNK23btDiscreteDynamicsWorld12getWorldTypeEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld11clearForcesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld10addVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld13removeVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld12addCharacterEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* @_ZN23btDiscreteDynamicsWorld15removeCharacterEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld25predictUnconstraintMotionEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld19integrateTransformsEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld26calculateSimulationIslandsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btContactSolverInfo*)* @_ZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfo to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld28internalSingleStepSimulationEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld18saveKinematicStateEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*, i16, i16)* @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBodyss to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*)* @_ZN23btDiscreteDynamicsWorld12applyGravityEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, i32)* @_ZN23btDiscreteDynamicsWorld11setNumTasksEi to i32 (...)*), i32 (...)* bitcast (void (%struct.btDiscreteDynamicsWorld*, float)* @_ZN23btDiscreteDynamicsWorld14updateVehiclesEf to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI23btDiscreteDynamicsWorld = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([26 x i8]* @_ZTS23btDiscreteDynamicsWorld, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btDynamicsWorld to %"struct.std::type_info"*) } ; [#uses=2]
-@_ZTS23btDiscreteDynamicsWorld = weak_odr constant [26 x i8] c"23btDiscreteDynamicsWorld\00" ; [#uses=1]
-@gDeactivationTime = global float 2.000000e+00 ; [#uses=1]
-@_ZL8uniqueId = internal global i32 0 ; [#uses=2]
-@_ZTV11btRigidBody = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI11btRigidBody to i32 (...)*), i32 (...)* bitcast (i8 (%struct.btRigidBody*, %struct.btCollisionObject*)* @_ZN11btRigidBody24checkCollideWithOverrideEP17btCollisionObject to i32 (...)*), i32 (...)* bitcast (void (%struct.btRigidBody*)* @_ZN11btRigidBodyD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btRigidBody*)* @_ZN11btRigidBodyD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionObject*, %struct.btCollisionShape*)* @_ZN17btCollisionObject17setCollisionShapeEP16btCollisionShape to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btRigidBody*)* @_ZNK11btRigidBody28calculateSerializeBufferSizeEv to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btRigidBody*, i8*, %struct.btActionInterface*)* @_ZNK11btRigidBody9serializeEPvP12btSerializer to i32 (...)*), i32 (...)* bitcast (void (%struct.btRigidBody*, %struct.btActionInterface*)* @_ZNK11btRigidBody21serializeSingleObjectEP12btSerializer to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI11btRigidBody = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([14 x i8]* @_ZTS11btRigidBody, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btCollisionObject to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS11btRigidBody = weak_odr constant [14 x i8] c"11btRigidBody\00" ; [#uses=1]
-@.str68 = private constant [21 x i8] c"btRigidBodyFloatData\00", align 1 ; [#uses=1]
-@gDisableDeactivation = global i8 0 ; [#uses=2]
-@_ZTV21btSimpleDynamicsWorld = weak_odr constant [35 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI21btSimpleDynamicsWorld to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*)* @_ZN21btSimpleDynamicsWorldD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*)* @_ZN21btSimpleDynamicsWorldD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*)* @_ZN21btSimpleDynamicsWorld11updateAabbsEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld14setDebugDrawerEP12btIDebugDraw to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld14getDebugDrawerEv to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btTransform*, %struct.btCollisionShape*, %struct.btQuadWord*)* @_ZN16btCollisionWorld15debugDrawObjectERK11btTransformPK16btCollisionShapeRK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* @_ZNK16btCollisionWorld7rayTestERK9btVector3S2_RNS_17RayResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btCollisionObject*, i16, i16)* @_ZN16btCollisionWorld18addCollisionObjectEP17btCollisionObjectss to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*, %struct.btCollisionObject*)* @_ZN21btSimpleDynamicsWorld21removeCollisionObjectEP17btCollisionObject to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*)* @_ZN16btCollisionWorld33performDiscreteCollisionDetectionEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btCollisionWorld*, %struct.btActionInterface*)* @_ZN16btCollisionWorld9serializeEP12btSerializer to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btSimpleDynamicsWorld*, float, i32, float)* @_ZN21btSimpleDynamicsWorld14stepSimulationEfif to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btTypedConstraint*, i8)* @_ZN15btDynamicsWorld13addConstraintEP17btTypedConstraintb to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btTypedConstraint*)* @_ZN15btDynamicsWorld16removeConstraintEP17btTypedConstraint to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void ()* @__cxa_pure_virtual to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*, %struct.btQuadWord*)* @_ZN21btSimpleDynamicsWorld10setGravityERK9btVector3 to i32 (...)*), i32 (...)* bitcast (void (%struct.btQuadWord*, %struct.btSimpleDynamicsWorld*)* @_ZNK21btSimpleDynamicsWorld10getGravityEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*)* @_ZN21btSimpleDynamicsWorld23synchronizeMotionStatesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*, %struct.btRigidBody*)* @_ZN21btSimpleDynamicsWorld12addRigidBodyEP11btRigidBody to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*, %struct.btRigidBody*)* @_ZN21btSimpleDynamicsWorld15removeRigidBodyEP11btRigidBody to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*, %struct.btActionInterface*)* @_ZN21btSimpleDynamicsWorld19setConstraintSolverEP18btConstraintSolver to i32 (...)*), i32 (...)* bitcast (%struct.btActionInterface* (%struct.btSimpleDynamicsWorld*)* @_ZN21btSimpleDynamicsWorld19getConstraintSolverEv to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btDynamicsWorld*)* @_ZNK15btDynamicsWorld17getNumConstraintsEv to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDynamicsWorld*, i32)* @_ZN15btDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (%struct.btTypedConstraint* (%struct.btDynamicsWorld*, i32)* @_ZNK15btDynamicsWorld13getConstraintEi to i32 (...)*), i32 (...)* bitcast (i32 (%struct.btSimpleDynamicsWorld*)* @_ZNK21btSimpleDynamicsWorld12getWorldTypeEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btSimpleDynamicsWorld*)* @_ZN21btSimpleDynamicsWorld11clearForcesEv to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld10addVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld13removeVehicleEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld12addCharacterEP17btActionInterface to i32 (...)*), i32 (...)* bitcast (void (%struct.btDynamicsWorld*, %struct.btActionInterface*)* @_ZN15btDynamicsWorld15removeCharacterEP17btActionInterface to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI21btSimpleDynamicsWorld = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([24 x i8]* @_ZTS21btSimpleDynamicsWorld, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI15btDynamicsWorld to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS21btSimpleDynamicsWorld = weak_odr constant [24 x i8] c"21btSimpleDynamicsWorld\00" ; [#uses=1]
-@.str8225 = private constant [9 x i8] c"Triangle\00", align 1 ; [#uses=0]
-@.str183 = private constant [4 x i8] c"int\00", align 1 ; [#uses=0]
-@.str284 = private constant [19 x i8] c"btTriangleInfoData\00", align 1 ; [#uses=0]
-@.str385 = private constant [22 x i8] c"btTriangleInfoMapData\00", align 1 ; [#uses=0]
-@_ZZ15plNearestPointsE7Solver1 = internal global %struct..0btMultiSapOverlapFilterCallback zeroinitializer ; [#uses=2]
-@_ZZ15plNearestPointsE7Solver0 = internal global %struct..0btMultiSapOverlapFilterCallback zeroinitializer ; [#uses=1]
-@.str486 = private constant [26 x i8] c"btConvexInternalShapeData\00", align 1 ; [#uses=0]
-@_ZGVZ15plNearestPointsE17sGjkSimplexSolver = internal global i64 0, align 8 ; [#uses=3]
-@_ZZ15plNearestPointsE17sGjkSimplexSolver = internal global %struct.btVoronoiSimplexSolver zeroinitializer, align 32 ; [#uses=4]
-@_ZGVZ15plNearestPointsE7Solver0 = internal global i64 0, align 8 ; [#uses=3]
-@_ZGVZ15plNearestPointsE7Solver1 = internal global i64 0, align 8 ; [#uses=3]
-@_ZTVN16btCollisionWorld24ClosestRayResultCallbackE = weak_odr constant [6 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTIN16btCollisionWorld24ClosestRayResultCallbackE to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::ClosestRayResultCallback"*)* @_ZN16btCollisionWorld24ClosestRayResultCallbackD1Ev to i32 (...)*), i32 (...)* bitcast (void (%"struct.btCollisionWorld::ClosestRayResultCallback"*)* @_ZN16btCollisionWorld24ClosestRayResultCallbackD0Ev to i32 (...)*), i32 (...)* bitcast (i8 (%"struct.btCollisionWorld::RayResultCallback"*, %struct.btBroadphaseProxy*)* @_ZNK16btCollisionWorld17RayResultCallback14needsCollisionEP17btBroadphaseProxy to i32 (...)*), i32 (...)* bitcast (float (%"struct.btCollisionWorld::ClosestRayResultCallback"*, %"struct.btCollisionWorld::LocalRayResult"*, i8)* @_ZN16btCollisionWorld24ClosestRayResultCallback15addSingleResultERNS_14LocalRayResultEb to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTIN16btCollisionWorld24ClosestRayResultCallbackE = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([47 x i8]* @_ZTSN16btCollisionWorld24ClosestRayResultCallbackE, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTIN16btCollisionWorld17RayResultCallbackE to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTSN16btCollisionWorld24ClosestRayResultCallbackE = weak_odr constant [47 x i8] c"N16btCollisionWorld24ClosestRayResultCallbackE\00", align 32 ; [#uses=1]
-@_ZTV25btDefaultVehicleRaycaster = weak_odr constant [5 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI25btDefaultVehicleRaycaster to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultVehicleRaycaster*)* @_ZN25btDefaultVehicleRaycasterD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btDefaultVehicleRaycaster*)* @_ZN25btDefaultVehicleRaycasterD0Ev to i32 (...)*), i32 (...)* bitcast (i8* (%struct.btDefaultVehicleRaycaster*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btVehicleRaycaster::btVehicleRaycasterResult"*)* @_ZN25btDefaultVehicleRaycaster7castRayERK9btVector3S2_RN18btVehicleRaycaster24btVehicleRaycasterResultE to i32 (...)*)], align 8 ; [#uses=1]
-@_ZTI25btDefaultVehicleRaycaster = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([28 x i8]* @_ZTS25btDefaultVehicleRaycaster, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI18btVehicleRaycaster to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS25btDefaultVehicleRaycaster = weak_odr constant [28 x i8] c"25btDefaultVehicleRaycaster\00" ; [#uses=1]
-@_ZTI18btVehicleRaycaster = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([21 x i8]* @_ZTS18btVehicleRaycaster, i32 0, i32 0) } } ; [#uses=1]
-@_ZTS18btVehicleRaycaster = weak_odr constant [21 x i8] c"18btVehicleRaycaster\00" ; [#uses=1]
-@sideFrictionStiffness2 = global float 1.000000e+00 ; [#uses=1]
-@_ZTV16btRaycastVehicle = weak_odr constant [9 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__si_class_type_info_pseudo* @_ZTI16btRaycastVehicle to i32 (...)*), i32 (...)* bitcast (void (%struct.btRaycastVehicle*)* @_ZN16btRaycastVehicleD1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btRaycastVehicle*)* @_ZN16btRaycastVehicleD0Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.btRaycastVehicle*, %struct.btCollisionWorld*, float)* @_ZN16btRaycastVehicle12updateActionEP16btCollisionWorldf to i32 (...)*), i32 (...)* bitcast (void (%struct.btRaycastVehicle*, %struct.btActionInterface*)* @_ZN16btRaycastVehicle9debugDrawEP12btIDebugDraw to i32 (...)*), i32 (...)* bitcast (void (%struct.btRaycastVehicle*, float)* @_ZN16btRaycastVehicle13updateVehicleEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btRaycastVehicle*, float)* @_ZN16btRaycastVehicle14updateFrictionEf to i32 (...)*), i32 (...)* bitcast (void (%struct.btRaycastVehicle*, i32, i32, i32)* @_ZN16btRaycastVehicle19setCoordinateSystemEiii to i32 (...)*)], align 32 ; [#uses=1]
-@_ZTI16btRaycastVehicle = weak_odr constant %struct.__si_class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i32 add (i32 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv120__si_class_type_infoE to i32), i32 8) to i8*), i8* getelementptr inbounds ([19 x i8]* @_ZTS16btRaycastVehicle, i32 0, i32 0) }, %"struct.std::type_info"* bitcast (%struct.__class_type_info_pseudo* @_ZTI17btActionInterface to %"struct.std::type_info"*) } ; [#uses=1]
-@_ZTS16btRaycastVehicle = weak_odr constant [19 x i8] c"16btRaycastVehicle\00" ; [#uses=1]
-@_ZGVZN17btActionInterface12getFixedBodyEvE7s_fixed = internal global i64 0, align 8 ; [#uses=4]
-@_ZZN17btActionInterface12getFixedBodyEvE7s_fixed = internal global %struct.btRigidBody zeroinitializer, align 32 ; [#uses=10]
-@gNumAlignedAllocs = global i32 0 ; [#uses=2]
-@_ZL10sAllocFunc = internal global i8* (i32)* @_ZL14btAllocDefaultj ; [#uses=2]
-@_ZL9sFreeFunc = internal global void (i8*)* @_ZL13btFreeDefaultPv ; [#uses=2]
-@_ZL17sAlignedAllocFunc = internal global i8* (i32, i32)* @_ZL21btAlignedAllocDefaultji ; [#uses=2]
-@_ZL16sAlignedFreeFunc = internal global void (i8*)* @_ZL20btAlignedFreeDefaultPv ; [#uses=2]
-@gNumAlignedFree = global i32 0 ; [#uses=2]
-@gTotalBytesAlignedAllocs = global i32 0 ; [#uses=0]
-@planetestepsilon = global float 0x3F50624DE0000000 ; [#uses=2]
-@_ZZN14btHullTriangle4neibEiiE2er = internal global i32 -1 ; [#uses=10]
-@_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif = internal global i64 0, align 8 ; [#uses=7]
-@_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif = internal global %struct.btQuadWord zeroinitializer ; [#uses=4]
-@_ZGVZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp = internal global i64 0, align 8 ; [#uses=3]
-@_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp = internal global %struct.btQuadWord zeroinitializer ; [#uses=4]
-@_ZN15CProfileManager12FrameCounterE = global i32 0 ; [#uses=4]
-@_ZN15CProfileManager4RootE = global %struct.CProfileNode zeroinitializer, align 32 ; [#uses=13]
-@_ZL13gProfileClock = internal global %struct.btClock zeroinitializer ; [#uses=1]
-@_ZN15CProfileManager9ResetTimeE = global i32 0 ; [#uses=3]
-@.str27 = private constant [35 x i8] c"----------------------------------\00", align 4 ; [#uses=1]
-@.str128 = private constant [49 x i8] c"Profiling: %s (total running time: %.3f ms) ---\0A\00", align 4 ; [#uses=1]
-@.str229 = private constant [50 x i8] c"%d -- %s (%.2f %%) :: %.3f ms / frame (%d calls)\0A\00", align 4 ; [#uses=1]
-@.str330 = private constant [13 x i8] c"what's wrong\00", align 1 ; [#uses=1]
-@.str431 = private constant [25 x i8] c"%s (%.3f %%) :: %.3f ms\0A\00", align 1 ; [#uses=1]
-@.str532 = private constant [13 x i8] c"Unaccounted:\00", align 1 ; [#uses=1]
-@_ZN15CProfileManager11CurrentNodeE = global %struct.CProfileNode* @_ZN15CProfileManager4RootE ; [#uses=5]
-@.str633 = private constant [5 x i8] c"Root\00", align 1 ; [#uses=1]
-@sBulletDNAstr64 = global [5704 x i8] c"SDNANAME\B1\00\00\00m_size\00m_capacity\00*m_data\00m_collisionShapes\00m_collisionObjects\00m_constraints\00*first\00*last\00m_floats[4]\00m_el[3]\00m_basis\00m_origin\00m_rootNodeIndex\00m_subtreeSize\00m_quantizedAabbMin[3]\00m_quantizedAabbMax[3]\00m_aabbMinOrg\00m_aabbMaxOrg\00m_escapeIndex\00m_subPart\00m_triangleIndex\00m_pad[4]\00m_escapeIndexOrTriangleIndex\00m_bvhAabbMin\00m_bvhAabbMax\00m_bvhQuantization\00m_curNodeIndex\00m_useQuantization\00m_numContiguousLeafNodes\00m_numQuantizedContiguousNodes\00*m_contiguousNodesPtr\00*m_quantizedContiguousNodesPtr\00*m_subTreeInfoPtr\00m_traversalMode\00m_numSubtreeHeaders\00*m_name\00m_shapeType\00m_padding[4]\00m_collisionShapeData\00m_localScaling\00m_planeNormal\00m_planeConstant\00m_implicitShapeDimensions\00m_collisionMargin\00m_padding\00m_pos\00m_radius\00m_convexInternalShapeData\00*m_localPositionArrayPtr\00m_localPositionArraySize\00m_value\00m_pad[2]\00m_values[3]\00*m_vertices3f\00*m_vertices3d\00*m_indices32\00*m_3indices16\00*m_indices16\00m_numTriangles\00m_numVertices\00*m_meshPartsPtr\00m_scaling\00m_numMeshParts\00m_meshInterface\00*m_quantizedFloatBvh\00*m_quantizedDoubleBvh\00*m_triangleInfoMap\00m_pad3[4]\00m_transform\00*m_childShape\00m_childShapeType\00m_childMargin\00*m_childShapePtr\00m_numChildShapes\00m_upAxis\00m_flags\00m_edgeV0V1Angle\00m_edgeV1V2Angle\00m_edgeV2V0Angle\00*m_hashTablePtr\00*m_nextPtr\00*m_valueArrayPtr\00*m_keyArrayPtr\00m_convexEpsilon\00m_planarEpsilon\00m_equalVertexThreshold\00m_edgeDistanceThreshold\00m_zeroAreaThreshold\00m_nextSize\00m_hashTableSize\00m_numValues\00m_numKeys\00m_gimpactSubType\00*m_unscaledPointsFloatPtr\00*m_unscaledPointsDoublePtr\00m_numUnscaledPoints\00m_padding3[4]\00*m_broadphaseHandle\00*m_collisionShape\00*m_rootCollisionShape\00m_worldTransform\00m_interpolationWorldTransform\00m_interpolationLinearVelocity\00m_interpolationAngularVelocity\00m_anisotropicFriction\00m_contactProcessingThreshold\00m_deactivationTime\00m_friction\00m_restitution\00m_hitFraction\00m_ccdSweptSphereRadius\00m_ccdMotionThreshold\00m_hasAnisotropicFriction\00m_collisionFlags\00m_islandTag1\00m_companionId\00m_activationState1\00m_internalType\00m_checkCollideWith\00m_collisionObjectData\00m_invInertiaTensorWorld\00m_linearVelocity\00m_angularVelocity\00m_angularFactor\00m_linearFactor\00m_gravity\00m_gravity_acceleration\00m_invInertiaLocal\00m_totalForce\00m_totalTorque\00m_inverseMass\00m_linearDamping\00m_angularDamping\00m_additionalDampingFactor\00m_additionalLinearDampingThresholdSqr\00m_additionalAngularDampingThresholdSqr\00m_additionalAngularDampingFactor\00m_linearSleepingThreshold\00m_angularSleepingThreshold\00m_additionalDamping\00m_numConstraintRows\00nub\00*m_rbA\00*m_rbB\00m_objectType\00m_userConstraintType\00m_userConstraintId\00m_needsFeedback\00m_appliedImpulse\00m_dbgDrawSize\00m_disableCollisionsBetweenLinkedBodies\00m_pad4[4]\00m_typeConstraintData\00m_pivotInA\00m_pivotInB\00m_rbAFrame\00m_rbBFrame\00m_useReferenceFrameA\00m_angularOnly\00m_enableAngularMotor\00m_motorTargetVelocity\00m_maxMotorImpulse\00m_lowerLimit\00m_upperLimit\00m_limitSoftness\00m_biasFactor\00m_relaxationFactor\00m_swingSpan1\00m_swingSpan2\00m_twistSpan\00m_damping\00m_linearUpperLimit\00m_linearLowerLimit\00m_angularUpperLimit\00m_angularLowerLimit\00m_useLinearReferenceFrameA\00m_useOffsetForConstraintFrame\00TYPE:\00\00\00char\00uchar\00short\00ushort\00int\00long\00ulong\00float\00double\00void\00PointerArray\00btPhysicsSystem\00ListBase\00btVector3FloatData\00btVector3DoubleData\00btMatrix3x3FloatData\00btMatrix3x3DoubleData\00btTransformFloatData\00btTransformDoubleData\00btBvhSubtreeInfoData\00btOptimizedBvhNodeFloatData\00btOptimizedBvhNodeDoubleData\00btQuantizedBvhNodeData\00btQuantizedBvhFloatData\00btQuantizedBvhDoubleData\00btCollisionShapeData\00btStaticPlaneShapeData\00btConvexInternalShapeData\00btPositionAndRadius\00btMultiSphereShapeData\00btIntIndexData\00btShortIntIndexData\00btShortIntIndexTripletData\00btMeshPartData\00btStridingMeshInterfaceData\00btTriangleMeshShapeData\00btTriangleInfoMapData\00btCompoundShapeChildData\00btCompoundShapeData\00btCylinderShapeData\00btCapsuleShapeData\00btTriangleInfoData\00btGImpactMeshShapeData\00btConvexHullShapeData\00btCollisionObjectDoubleData\00btCollisionObjectFloatData\00btRigidBodyFloatData\00btRigidBodyDoubleData\00btConstraintInfo1\00btTypedConstraintData\00btRigidBodyData\00btPoint2PointConstraintFloatData\00btPoint2PointConstraintDoubleData\00btHingeConstraintDoubleData\00btHingeConstraintFloatData\00btConeTwistConstraintData\00btGeneric6DofConstraintData\00btSliderConstraintData\00\00TLEN\01\00\01\00\02\00\02\00\04\00\04\00\04\00\04\00\08\00\00\00\10\000\00\10\00\10\00 \000\00`\00@\00\80\00\14\000\00P\00\10\00`\00\90\00\10\008\008\00\14\00H\00\04\00\04\00\08\000\00 \00P\00H\00P\00 \00@\00@\00\10\00H\00P\00\D8\01\08\01\F0\01\A8\03\08\008\00\00\00X\00x\00`\01\E0\00\D8\00\00\01\D0\00STRC/\00\00\00\0A\00\03\00\04\00\00\00\04\00\01\00\09\00\02\00\0B\00\03\00\0A\00\03\00\0A\00\04\00\0A\00\05\00\0C\00\02\00\09\00\06\00\09\00\07\00\0D\00\01\00\07\00\08\00\0E\00\01\00\08\00\08\00\0F\00\01\00\0D\00\09\00\10\00\01\00\0E\00\09\00\11\00\02\00\0F\00\0A\00\0D\00\0B\00\12\00\02\00\10\00\0A\00\0E\00\0B\00\13\00\04\00\04\00\0C\00\04\00\0D\00\02\00\0E\00\02\00\0F\00\14\00\06\00\0D\00\10\00\0D\00\11\00\04\00\12\00\04\00\13\00\04\00\14\00\00\00\15\00\15\00\06\00\0E\00\10\00\0E\00\11\00\04\00\12\00\04\00\13\00\04\00\14\00\00\00\15\00\16\00\03\00\02\00\0E\00\02\00\0F\00\04\00\16\00\17\00\0C\00\0D\00\17\00\0D\00\18\00\0D\00\19\00\04\00\1A\00\04\00\1B\00\04\00\1C\00\04\00\1D\00\14\00\1E\00\16\00\1F\00\13\00 \00\04\00!\00\04\00\22\00\18\00\0C\00\0E\00\17\00\0E\00\18\00\0E\00\19\00\04\00\1A\00\04\00\1B\00\04\00\1C\00\04\00\1D\00\15\00\1E\00\16\00\1F\00\04\00!\00\04\00\22\00\13\00 \00\19\00\03\00\00\00#\00\04\00$\00\00\00%\00\1A\00\05\00\19\00&\00\0D\00'\00\0D\00(\00\07\00)\00\00\00\15\00\1B\00\05\00\19\00&\00\0D\00'\00\0D\00*\00\07\00+\00\04\00,\00\1C\00\02\00\0D\00-\00\07\00.\00\1D\00\04\00\1B\00/\00\1C\000\00\04\001\00\00\00%\00\1E\00\01\00\04\002\00\1F\00\02\00\02\002\00\00\003\00 \00\02\00\02\004\00\00\003\00!\00\07\00\0D\005\00\0E\006\00\1E\007\00 \008\00\1F\009\00\04\00:\00\04\00;\00\22\00\04\00!\00<\00\0D\00=\00\04\00>\00\00\00%\00#\00\07\00\19\00&\00\22\00?\00\17\00@\00\18\00A\00$\00B\00\07\00+\00\00\00C\00%\00\04\00\11\00D\00\19\00E\00\04\00F\00\07\00G\00&\00\04\00\19\00&\00%\00H\00\04\00I\00\07\00+\00'\00\03\00\1B\00/\00\04\00J\00\00\00%\00(\00\03\00\1B\00/\00\04\00J\00\00\00%\00)\00\04\00\04\00K\00\07\00L\00\07\00M\00\07\00N\00$\00\0E\00\04\00O\00\04\00P\00)\00Q\00\04\00R\00\07\00S\00\07\00T\00\07\00U\00\07\00V\00\07\00W\00\04\00X\00\04\00Y\00\04\00Z\00\04\00[\00\00\00%\00*\00\05\00\19\00&\00\22\00?\00\0D\00'\00\07\00+\00\04\00\5C\00+\00\05\00\1B\00/\00\0D\00]\00\0E\00^\00\04\00_\00\00\00`\00,\00\18\00\09\00a\00\09\00b\00\19\00c\00\00\00#\00\12\00d\00\12\00e\00\0E\00f\00\0E\00g\00\0E\00h\00\08\00i\00\08\00j\00\08\00k\00\08\00l\00\08\00m\00\08\00n\00\08\00o\00\04\00p\00\04\00q\00\04\00r\00\04\00s\00\04\00t\00\04\00u\00\04\00v\00\00\00%\00-\00\17\00\09\00a\00\09\00b\00\19\00c\00\00\00#\00\11\00d\00\11\00e\00\0D\00f\00\0D\00g\00\0D\00h\00\07\00i\00\07\00j\00\07\00k\00\07\00l\00\07\00m\00\07\00n\00\07\00o\00\04\00p\00\04\00q\00\04\00r\00\04\00s\00\04\00t\00\04\00u\00\04\00v\00.\00\15\00-\00w\00\0F\00x\00\0D\00y\00\0D\00z\00\0D\00{\00\0D\00|\00\0D\00}\00\0D\00~\00\0D\00\7F\00\0D\00\80\00\0D\00\81\00\07\00\82\00\07\00\83\00\07\00\84\00\07\00\85\00\07\00\86\00\07\00\87\00\07\00\88\00\07\00\89\00\07\00\8A\00\04\00\8B\00/\00\16\00,\00w\00\10\00x\00\0E\00y\00\0E\00z\00\0E\00{\00\0E\00|\00\0E\00}\00\0E\00~\00\0E\00\7F\00\0E\00\80\00\0E\00\81\00\08\00\82\00\08\00\83\00\08\00\84\00\08\00\85\00\08\00\86\00\08\00\87\00\08\00\88\00\08\00\89\00\08\00\8A\00\04\00\8B\00\00\00%\000\00\02\00\04\00\8C\00\04\00\8D\001\00\0B\002\00\8E\002\00\8F\00\00\00#\00\04\00\90\00\04\00\91\00\04\00\92\00\04\00\93\00\07\00\94\00\07\00\95\00\04\00\96\00\00\00\97\003\00\03\001\00\98\00\0D\00\99\00\0D\00\9A\004\00\03\001\00\98\00\0E\00\99\00\0E\00\9A\005\00\0D\001\00\98\00\12\00\9B\00\12\00\9C\00\04\00\9D\00\04\00\9E\00\04\00\9F\00\07\00\A0\00\07\00\A1\00\07\00\A2\00\07\00\A3\00\07\00\A4\00\07\00\A5\00\07\00\A6\006\00\0D\001\00\98\00\11\00\9B\00\11\00\9C\00\04\00\9D\00\04\00\9E\00\04\00\9F\00\07\00\A0\00\07\00\A1\00\07\00\A2\00\07\00\A3\00\07\00\A4\00\07\00\A5\00\07\00\A6\007\00\0B\001\00\98\00\11\00\9B\00\11\00\9C\00\07\00\A7\00\07\00\A8\00\07\00\A9\00\07\00\A4\00\07\00\A5\00\07\00\A6\00\07\00\AA\00\00\00\15\008\00\09\001\00\98\00\11\00\9B\00\11\00\9C\00\0D\00\AB\00\0D\00\AC\00\0D\00\AD\00\0D\00\AE\00\04\00\AF\00\04\00\B0\009\00\09\001\00\98\00\11\00\9B\00\11\00\9C\00\07\00\AB\00\07\00\AC\00\07\00\AD\00\07\00\AE\00\04\00\AF\00\04\00\B0\00", align 32 ; [#uses=0]
-@sBulletDNAlen64 = global i32 5704 ; [#uses=0]
-@sBulletDNAstr = global [5704 x i8] c"SDNANAME\B1\00\00\00m_size\00m_capacity\00*m_data\00m_collisionShapes\00m_collisionObjects\00m_constraints\00*first\00*last\00m_floats[4]\00m_el[3]\00m_basis\00m_origin\00m_rootNodeIndex\00m_subtreeSize\00m_quantizedAabbMin[3]\00m_quantizedAabbMax[3]\00m_aabbMinOrg\00m_aabbMaxOrg\00m_escapeIndex\00m_subPart\00m_triangleIndex\00m_pad[4]\00m_escapeIndexOrTriangleIndex\00m_bvhAabbMin\00m_bvhAabbMax\00m_bvhQuantization\00m_curNodeIndex\00m_useQuantization\00m_numContiguousLeafNodes\00m_numQuantizedContiguousNodes\00*m_contiguousNodesPtr\00*m_quantizedContiguousNodesPtr\00*m_subTreeInfoPtr\00m_traversalMode\00m_numSubtreeHeaders\00*m_name\00m_shapeType\00m_padding[4]\00m_collisionShapeData\00m_localScaling\00m_planeNormal\00m_planeConstant\00m_implicitShapeDimensions\00m_collisionMargin\00m_padding\00m_pos\00m_radius\00m_convexInternalShapeData\00*m_localPositionArrayPtr\00m_localPositionArraySize\00m_value\00m_pad[2]\00m_values[3]\00*m_vertices3f\00*m_vertices3d\00*m_indices32\00*m_3indices16\00*m_indices16\00m_numTriangles\00m_numVertices\00*m_meshPartsPtr\00m_scaling\00m_numMeshParts\00m_meshInterface\00*m_quantizedFloatBvh\00*m_quantizedDoubleBvh\00*m_triangleInfoMap\00m_pad3[4]\00m_transform\00*m_childShape\00m_childShapeType\00m_childMargin\00*m_childShapePtr\00m_numChildShapes\00m_upAxis\00m_flags\00m_edgeV0V1Angle\00m_edgeV1V2Angle\00m_edgeV2V0Angle\00*m_hashTablePtr\00*m_nextPtr\00*m_valueArrayPtr\00*m_keyArrayPtr\00m_convexEpsilon\00m_planarEpsilon\00m_equalVertexThreshold\00m_edgeDistanceThreshold\00m_zeroAreaThreshold\00m_nextSize\00m_hashTableSize\00m_numValues\00m_numKeys\00m_gimpactSubType\00*m_unscaledPointsFloatPtr\00*m_unscaledPointsDoublePtr\00m_numUnscaledPoints\00m_padding3[4]\00*m_broadphaseHandle\00*m_collisionShape\00*m_rootCollisionShape\00m_worldTransform\00m_interpolationWorldTransform\00m_interpolationLinearVelocity\00m_interpolationAngularVelocity\00m_anisotropicFriction\00m_contactProcessingThreshold\00m_deactivationTime\00m_friction\00m_restitution\00m_hitFraction\00m_ccdSweptSphereRadius\00m_ccdMotionThreshold\00m_hasAnisotropicFriction\00m_collisionFlags\00m_islandTag1\00m_companionId\00m_activationState1\00m_internalType\00m_checkCollideWith\00m_collisionObjectData\00m_invInertiaTensorWorld\00m_linearVelocity\00m_angularVelocity\00m_angularFactor\00m_linearFactor\00m_gravity\00m_gravity_acceleration\00m_invInertiaLocal\00m_totalForce\00m_totalTorque\00m_inverseMass\00m_linearDamping\00m_angularDamping\00m_additionalDampingFactor\00m_additionalLinearDampingThresholdSqr\00m_additionalAngularDampingThresholdSqr\00m_additionalAngularDampingFactor\00m_linearSleepingThreshold\00m_angularSleepingThreshold\00m_additionalDamping\00m_numConstraintRows\00nub\00*m_rbA\00*m_rbB\00m_objectType\00m_userConstraintType\00m_userConstraintId\00m_needsFeedback\00m_appliedImpulse\00m_dbgDrawSize\00m_disableCollisionsBetweenLinkedBodies\00m_pad4[4]\00m_typeConstraintData\00m_pivotInA\00m_pivotInB\00m_rbAFrame\00m_rbBFrame\00m_useReferenceFrameA\00m_angularOnly\00m_enableAngularMotor\00m_motorTargetVelocity\00m_maxMotorImpulse\00m_lowerLimit\00m_upperLimit\00m_limitSoftness\00m_biasFactor\00m_relaxationFactor\00m_swingSpan1\00m_swingSpan2\00m_twistSpan\00m_damping\00m_linearUpperLimit\00m_linearLowerLimit\00m_angularUpperLimit\00m_angularLowerLimit\00m_useLinearReferenceFrameA\00m_useOffsetForConstraintFrame\00TYPE:\00\00\00char\00uchar\00short\00ushort\00int\00long\00ulong\00float\00double\00void\00PointerArray\00btPhysicsSystem\00ListBase\00btVector3FloatData\00btVector3DoubleData\00btMatrix3x3FloatData\00btMatrix3x3DoubleData\00btTransformFloatData\00btTransformDoubleData\00btBvhSubtreeInfoData\00btOptimizedBvhNodeFloatData\00btOptimizedBvhNodeDoubleData\00btQuantizedBvhNodeData\00btQuantizedBvhFloatData\00btQuantizedBvhDoubleData\00btCollisionShapeData\00btStaticPlaneShapeData\00btConvexInternalShapeData\00btPositionAndRadius\00btMultiSphereShapeData\00btIntIndexData\00btShortIntIndexData\00btShortIntIndexTripletData\00btMeshPartData\00btStridingMeshInterfaceData\00btTriangleMeshShapeData\00btTriangleInfoMapData\00btCompoundShapeChildData\00btCompoundShapeData\00btCylinderShapeData\00btCapsuleShapeData\00btTriangleInfoData\00btGImpactMeshShapeData\00btConvexHullShapeData\00btCollisionObjectDoubleData\00btCollisionObjectFloatData\00btRigidBodyFloatData\00btRigidBodyDoubleData\00btConstraintInfo1\00btTypedConstraintData\00btRigidBodyData\00btPoint2PointConstraintFloatData\00btPoint2PointConstraintDoubleData\00btHingeConstraintDoubleData\00btHingeConstraintFloatData\00btConeTwistConstraintData\00btGeneric6DofConstraintData\00btSliderConstraintData\00\00TLEN\01\00\01\00\02\00\02\00\04\00\04\00\04\00\04\00\08\00\00\00\0C\00$\00\08\00\10\00 \000\00`\00@\00\80\00\14\000\00P\00\10\00T\00\84\00\0C\004\004\00\14\00@\00\04\00\04\00\08\00\1C\00\1C\00<\008\00L\00\18\00<\00<\00\10\00@\00D\00\C8\01\F8\00\E0\01\98\03\08\00,\00\00\00L\00l\00T\01\D4\00\CC\00\F4\00\C4\00STRC/\00\00\00\0A\00\03\00\04\00\00\00\04\00\01\00\09\00\02\00\0B\00\03\00\0A\00\03\00\0A\00\04\00\0A\00\05\00\0C\00\02\00\09\00\06\00\09\00\07\00\0D\00\01\00\07\00\08\00\0E\00\01\00\08\00\08\00\0F\00\01\00\0D\00\09\00\10\00\01\00\0E\00\09\00\11\00\02\00\0F\00\0A\00\0D\00\0B\00\12\00\02\00\10\00\0A\00\0E\00\0B\00\13\00\04\00\04\00\0C\00\04\00\0D\00\02\00\0E\00\02\00\0F\00\14\00\06\00\0D\00\10\00\0D\00\11\00\04\00\12\00\04\00\13\00\04\00\14\00\00\00\15\00\15\00\06\00\0E\00\10\00\0E\00\11\00\04\00\12\00\04\00\13\00\04\00\14\00\00\00\15\00\16\00\03\00\02\00\0E\00\02\00\0F\00\04\00\16\00\17\00\0C\00\0D\00\17\00\0D\00\18\00\0D\00\19\00\04\00\1A\00\04\00\1B\00\04\00\1C\00\04\00\1D\00\14\00\1E\00\16\00\1F\00\13\00 \00\04\00!\00\04\00\22\00\18\00\0C\00\0E\00\17\00\0E\00\18\00\0E\00\19\00\04\00\1A\00\04\00\1B\00\04\00\1C\00\04\00\1D\00\15\00\1E\00\16\00\1F\00\04\00!\00\04\00\22\00\13\00 \00\19\00\03\00\00\00#\00\04\00$\00\00\00%\00\1A\00\05\00\19\00&\00\0D\00'\00\0D\00(\00\07\00)\00\00\00\15\00\1B\00\05\00\19\00&\00\0D\00'\00\0D\00*\00\07\00+\00\04\00,\00\1C\00\02\00\0D\00-\00\07\00.\00\1D\00\04\00\1B\00/\00\1C\000\00\04\001\00\00\00%\00\1E\00\01\00\04\002\00\1F\00\02\00\02\002\00\00\003\00 \00\02\00\02\004\00\00\003\00!\00\07\00\0D\005\00\0E\006\00\1E\007\00 \008\00\1F\009\00\04\00:\00\04\00;\00\22\00\04\00!\00<\00\0D\00=\00\04\00>\00\00\00%\00#\00\07\00\19\00&\00\22\00?\00\17\00@\00\18\00A\00$\00B\00\07\00+\00\00\00C\00%\00\04\00\11\00D\00\19\00E\00\04\00F\00\07\00G\00&\00\04\00\19\00&\00%\00H\00\04\00I\00\07\00+\00'\00\03\00\1B\00/\00\04\00J\00\00\00%\00(\00\03\00\1B\00/\00\04\00J\00\00\00%\00)\00\04\00\04\00K\00\07\00L\00\07\00M\00\07\00N\00$\00\0E\00\04\00O\00\04\00P\00)\00Q\00\04\00R\00\07\00S\00\07\00T\00\07\00U\00\07\00V\00\07\00W\00\04\00X\00\04\00Y\00\04\00Z\00\04\00[\00\00\00%\00*\00\05\00\19\00&\00\22\00?\00\0D\00'\00\07\00+\00\04\00\5C\00+\00\05\00\1B\00/\00\0D\00]\00\0E\00^\00\04\00_\00\00\00`\00,\00\18\00\09\00a\00\09\00b\00\19\00c\00\00\00#\00\12\00d\00\12\00e\00\0E\00f\00\0E\00g\00\0E\00h\00\08\00i\00\08\00j\00\08\00k\00\08\00l\00\08\00m\00\08\00n\00\08\00o\00\04\00p\00\04\00q\00\04\00r\00\04\00s\00\04\00t\00\04\00u\00\04\00v\00\00\00%\00-\00\17\00\09\00a\00\09\00b\00\19\00c\00\00\00#\00\11\00d\00\11\00e\00\0D\00f\00\0D\00g\00\0D\00h\00\07\00i\00\07\00j\00\07\00k\00\07\00l\00\07\00m\00\07\00n\00\07\00o\00\04\00p\00\04\00q\00\04\00r\00\04\00s\00\04\00t\00\04\00u\00\04\00v\00.\00\15\00-\00w\00\0F\00x\00\0D\00y\00\0D\00z\00\0D\00{\00\0D\00|\00\0D\00}\00\0D\00~\00\0D\00\7F\00\0D\00\80\00\0D\00\81\00\07\00\82\00\07\00\83\00\07\00\84\00\07\00\85\00\07\00\86\00\07\00\87\00\07\00\88\00\07\00\89\00\07\00\8A\00\04\00\8B\00/\00\16\00,\00w\00\10\00x\00\0E\00y\00\0E\00z\00\0E\00{\00\0E\00|\00\0E\00}\00\0E\00~\00\0E\00\7F\00\0E\00\80\00\0E\00\81\00\08\00\82\00\08\00\83\00\08\00\84\00\08\00\85\00\08\00\86\00\08\00\87\00\08\00\88\00\08\00\89\00\08\00\8A\00\04\00\8B\00\00\00%\000\00\02\00\04\00\8C\00\04\00\8D\001\00\0B\002\00\8E\002\00\8F\00\00\00#\00\04\00\90\00\04\00\91\00\04\00\92\00\04\00\93\00\07\00\94\00\07\00\95\00\04\00\96\00\00\00\97\003\00\03\001\00\98\00\0D\00\99\00\0D\00\9A\004\00\03\001\00\98\00\0E\00\99\00\0E\00\9A\005\00\0D\001\00\98\00\12\00\9B\00\12\00\9C\00\04\00\9D\00\04\00\9E\00\04\00\9F\00\07\00\A0\00\07\00\A1\00\07\00\A2\00\07\00\A3\00\07\00\A4\00\07\00\A5\00\07\00\A6\006\00\0D\001\00\98\00\11\00\9B\00\11\00\9C\00\04\00\9D\00\04\00\9E\00\04\00\9F\00\07\00\A0\00\07\00\A1\00\07\00\A2\00\07\00\A3\00\07\00\A4\00\07\00\A5\00\07\00\A6\007\00\0B\001\00\98\00\11\00\9B\00\11\00\9C\00\07\00\A7\00\07\00\A8\00\07\00\A9\00\07\00\A4\00\07\00\A5\00\07\00\A6\00\07\00\AA\00\00\00\15\008\00\09\001\00\98\00\11\00\9B\00\11\00\9C\00\0D\00\AB\00\0D\00\AC\00\0D\00\AD\00\0D\00\AE\00\04\00\AF\00\04\00\B0\009\00\09\001\00\98\00\11\00\9B\00\11\00\9C\00\07\00\AB\00\07\00\AC\00\07\00\AD\00\07\00\AE\00\04\00\AF\00\04\00\B0\00", align 32 ; [#uses=0]
-@sBulletDNAlen = global i32 5704 ; [#uses=0]
-@llvm.global_ctors = appending global [2 x %0] [%0 { i32 65535, void ()* @_GLOBAL__I__ZN19btGenericMemoryPool24allocate_from_free_nodesEj }, %0 { i32 65535, void ()* @_GLOBAL__I__ZN7btClockC2Ev }] ; [#uses=0]
-@llvm.used = appending global [68 x i8*] [i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*), i8* bitcast (i8** @llvm.eh.catch.all.value to i8*)], section "llvm.metadata" ; [#uses=0]
-
-; [#uses=0]
-define i32 @main(i32 %argc, i8** %argv) {
-entry:
- %argc_addr = alloca i32, align 4 ; [#uses=1]
- %argv_addr = alloca i8**, align 4 ; [#uses=1]
- %retval = alloca i32 ; [#uses=2]
- %save_filt.650 = alloca i32 ; [#uses=2]
- %save_eptr.649 = alloca i8* ; [#uses=2]
- %save_filt.648 = alloca i32 ; [#uses=2]
- %save_eptr.647 = alloca i8* ; [#uses=2]
- %save_filt.646 = alloca i32 ; [#uses=2]
- %save_eptr.645 = alloca i8* ; [#uses=2]
- %save_filt.644 = alloca i32 ; [#uses=2]
- %save_eptr.643 = alloca i8* ; [#uses=2]
- %save_filt.642 = alloca i32 ; [#uses=2]
- %save_eptr.641 = alloca i8* ; [#uses=2]
- %save_filt.640 = alloca i32 ; [#uses=2]
- %save_eptr.639 = alloca i8* ; [#uses=2]
- %save_filt.638 = alloca i32 ; [#uses=2]
- %save_eptr.637 = alloca i8* ; [#uses=2]
- %save_filt.636 = alloca i32 ; [#uses=2]
- %save_eptr.635 = alloca i8* ; [#uses=2]
- %save_filt.634 = alloca i32 ; [#uses=2]
- %save_eptr.633 = alloca i8* ; [#uses=2]
- %save_filt.632 = alloca i32 ; [#uses=2]
- %save_eptr.631 = alloca i8* ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %retval.462 = alloca i8 ; [#uses=2]
- %1 = alloca %struct.btActionInterface* ; [#uses=4]
- %iftmp.461 = alloca i8 ; [#uses=3]
- %retval.460 = alloca i8 ; [#uses=2]
- %2 = alloca %struct.btActionInterface* ; [#uses=3]
- %iftmp.459 = alloca i8 ; [#uses=3]
- %retval.458 = alloca i8 ; [#uses=2]
- %3 = alloca %struct.btRigidBody* ; [#uses=4]
- %4 = alloca %struct.btDefaultMotionState* ; [#uses=3]
- %5 = alloca %struct.btTransform* ; [#uses=2]
- %6 = alloca float ; [#uses=2]
- %7 = alloca float ; [#uses=2]
- %8 = alloca float ; [#uses=2]
- %9 = alloca %struct.btQuadWord ; [#uses=2]
- %10 = alloca float ; [#uses=2]
- %11 = alloca float ; [#uses=2]
- %12 = alloca float ; [#uses=2]
- %13 = alloca %struct.btPolyhedralConvexShape* ; [#uses=4]
- %14 = alloca %struct.btRigidBody* ; [#uses=4]
- %15 = alloca %struct.btDefaultMotionState* ; [#uses=3]
- %16 = alloca %struct.btTransform* ; [#uses=2]
- %17 = alloca float ; [#uses=2]
- %18 = alloca float ; [#uses=2]
- %19 = alloca float ; [#uses=2]
- %20 = alloca float ; [#uses=2]
- %21 = alloca float ; [#uses=2]
- %22 = alloca float ; [#uses=2]
- %23 = alloca %struct.btQuadWord ; [#uses=2]
- %24 = alloca %struct.btBoxShape* ; [#uses=4]
- %25 = alloca float ; [#uses=2]
- %26 = alloca float ; [#uses=2]
- %27 = alloca float ; [#uses=2]
- %28 = alloca %struct.btQuadWord ; [#uses=2]
- %29 = alloca %struct.btQuadWord* ; [#uses=2]
- %30 = alloca float ; [#uses=2]
- %31 = alloca float ; [#uses=2]
- %32 = alloca float ; [#uses=2]
- %33 = alloca %struct.btQuadWord ; [#uses=2]
- %34 = alloca %struct.btDiscreteDynamicsWorld* ; [#uses=4]
- %35 = alloca %struct.btSequentialImpulseConstraintSolver* ; [#uses=4]
- %36 = alloca %struct.btDbvtBroadphase* ; [#uses=4]
- %37 = alloca %struct.btCollisionDispatcher* ; [#uses=4]
- %38 = alloca %struct.btDefaultCollisionConfiguration* ; [#uses=4]
- %39 = alloca %struct.btDefaultCollisionConstructionInfo ; [#uses=2]
- %40 = alloca %struct.btDefaultCollisionConstructionInfo* ; [#uses=2]
- %i = alloca i32 ; [#uses=9]
- %collisionConfiguration = alloca %struct.btDefaultCollisionConfiguration* ; [#uses=6]
- %dispatcher = alloca %struct.btCollisionDispatcher* ; [#uses=5]
- %overlappingPairCache = alloca %struct.btActionInterface* ; [#uses=5]
- %solver = alloca %struct.btSequentialImpulseConstraintSolver* ; [#uses=5]
- %dynamicsWorld = alloca %struct.btDiscreteDynamicsWorld* ; [#uses=18]
- %groundShape = alloca %struct.btCollisionShape* ; [#uses=6]
- %collisionShapes = alloca %"struct.btAlignedObjectArray<btCollisionShape*>" ; [#uses=9]
- %groundTransform = alloca %struct.btTransform ; [#uses=4]
- %eh_exception = alloca i8* ; [#uses=51]
- %eh_selector = alloca i32 ; [#uses=35]
- %mass = alloca float ; [#uses=4]
- %isDynamic = alloca i8 ; [#uses=2]
- %localInertia = alloca %struct.btQuadWord ; [#uses=3]
- %myMotionState = alloca %struct.btDefaultMotionState* ; [#uses=2]
- %rbInfo = alloca %"struct.btRigidBody::btRigidBodyConstructionInfo" ; [#uses=2]
- %body = alloca %struct.btRigidBody* ; [#uses=2]
- %colShape = alloca %struct.btCollisionShape* ; [#uses=6]
- %startTransform = alloca %struct.btTransform ; [#uses=4]
- %mass44 = alloca float ; [#uses=4]
- %isDynamic45 = alloca i8 ; [#uses=2]
- %localInertia46 = alloca %struct.btQuadWord ; [#uses=3]
- %myMotionState47 = alloca %struct.btDefaultMotionState* ; [#uses=2]
- %rbInfo48 = alloca %"struct.btRigidBody::btRigidBodyConstructionInfo" ; [#uses=2]
- %body49 = alloca %struct.btRigidBody* ; [#uses=2]
- %j = alloca i32 ; [#uses=5]
- %obj = alloca %struct.btCollisionObject* ; [#uses=2]
- %body78 = alloca %struct.btRigidBody* ; [#uses=4]
- %trans = alloca %struct.btTransform ; [#uses=5]
- %obj94 = alloca %struct.btCollisionObject* ; [#uses=6]
- %body95 = alloca %struct.btRigidBody* ; [#uses=4]
- %j111 = alloca i32 ; [#uses=6]
- %shape = alloca %struct.btCollisionShape* ; [#uses=4]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i32 %argc, i32* %argc_addr
- store i8** %argv, i8*** %argv_addr
- call void @_ZN34btDefaultCollisionConstructionInfoC1Ev(%struct.btDefaultCollisionConstructionInfo* %39) nounwind
- store %struct.btDefaultCollisionConstructionInfo* %39, %struct.btDefaultCollisionConstructionInfo** %40, align 4
- %41 = call i8* @_Znwj(i32 88) ; [#uses=1]
- %42 = bitcast i8* %41 to %struct.btDefaultCollisionConfiguration* ; [#uses=1]
- store %struct.btDefaultCollisionConfiguration* %42, %struct.btDefaultCollisionConfiguration** %38, align 4
- %43 = load %struct.btDefaultCollisionConfiguration** %38, align 4 ; [#uses=1]
- %44 = load %struct.btDefaultCollisionConstructionInfo** %40, align 4 ; [#uses=1]
- invoke void @_ZN31btDefaultCollisionConfigurationC1ERK34btDefaultCollisionConstructionInfo(%struct.btDefaultCollisionConfiguration* %43, %struct.btDefaultCollisionConstructionInfo* %44)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %45 = load %struct.btDefaultCollisionConfiguration** %38, align 4 ; [#uses=1]
- store %struct.btDefaultCollisionConfiguration* %45, %struct.btDefaultCollisionConfiguration** %collisionConfiguration, align 4
- %46 = call i8* @_Znwj(i32 5388) ; [#uses=1]
- %47 = bitcast i8* %46 to %struct.btCollisionDispatcher* ; [#uses=1]
- store %struct.btCollisionDispatcher* %47, %struct.btCollisionDispatcher** %37, align 4
- %48 = load %struct.btDefaultCollisionConfiguration** %collisionConfiguration, align 4 ; [#uses=1]
- %49 = bitcast %struct.btDefaultCollisionConfiguration* %48 to %struct.btActionInterface* ; [#uses=1]
- %50 = load %struct.btCollisionDispatcher** %37, align 4 ; [#uses=1]
- invoke void @_ZN21btCollisionDispatcherC1EP24btCollisionConfiguration(%struct.btCollisionDispatcher* %50, %struct.btActionInterface* %49)
- to label %invcont1 unwind label %lpad143
-
-invcont1: ; preds = %invcont
- br label %bb2
-
-bb: ; preds = %ppad
- %eh_select = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select, i32* %save_filt.632, align 4
- %eh_value = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value, i8** %save_eptr.631, align 4
- %51 = load %struct.btDefaultCollisionConfiguration** %38, align 4 ; [#uses=1]
- %52 = bitcast %struct.btDefaultCollisionConfiguration* %51 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %52) nounwind
- %53 = load i8** %save_eptr.631, align 4 ; [#uses=1]
- store i8* %53, i8** %eh_exception, align 4
- %54 = load i32* %save_filt.632, align 4 ; [#uses=1]
- store i32 %54, i32* %eh_selector, align 4
- br label %Unwind
-
-bb2: ; preds = %invcont1
- %55 = load %struct.btCollisionDispatcher** %37, align 4 ; [#uses=1]
- store %struct.btCollisionDispatcher* %55, %struct.btCollisionDispatcher** %dispatcher, align 4
- %56 = call i8* @_Znwj(i32 156) ; [#uses=1]
- %57 = bitcast i8* %56 to %struct.btDbvtBroadphase* ; [#uses=1]
- store %struct.btDbvtBroadphase* %57, %struct.btDbvtBroadphase** %36, align 4
- %58 = load %struct.btDbvtBroadphase** %36, align 4 ; [#uses=1]
- invoke void @_ZN16btDbvtBroadphaseC1EP22btOverlappingPairCache(%struct.btDbvtBroadphase* %58, %struct..0btMultiSapOverlapFilterCallback* null)
- to label %invcont3 unwind label %lpad147
-
-invcont3: ; preds = %bb2
- br label %bb7
-
-bb4: ; preds = %ppad199
- %eh_select5 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select5, i32* %save_filt.634, align 4
- %eh_value6 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value6, i8** %save_eptr.633, align 4
- %59 = load %struct.btCollisionDispatcher** %37, align 4 ; [#uses=1]
- %60 = bitcast %struct.btCollisionDispatcher* %59 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %60) nounwind
- %61 = load i8** %save_eptr.633, align 4 ; [#uses=1]
- store i8* %61, i8** %eh_exception, align 4
- %62 = load i32* %save_filt.634, align 4 ; [#uses=1]
- store i32 %62, i32* %eh_selector, align 4
- br label %Unwind
-
-bb7: ; preds = %invcont3
- %63 = load %struct.btDbvtBroadphase** %36, align 4 ; [#uses=1]
- %64 = bitcast %struct.btDbvtBroadphase* %63 to %struct.btActionInterface* ; [#uses=1]
- store %struct.btActionInterface* %64, %struct.btActionInterface** %overlappingPairCache, align 4
- %65 = call i8* @_Znwj(i32 128) ; [#uses=1]
- %66 = bitcast i8* %65 to %struct.btSequentialImpulseConstraintSolver* ; [#uses=1]
- store %struct.btSequentialImpulseConstraintSolver* %66, %struct.btSequentialImpulseConstraintSolver** %35, align 4
- %67 = load %struct.btSequentialImpulseConstraintSolver** %35, align 4 ; [#uses=1]
- invoke void @_ZN35btSequentialImpulseConstraintSolverC1Ev(%struct.btSequentialImpulseConstraintSolver* %67)
- to label %invcont8 unwind label %lpad151
-
-invcont8: ; preds = %bb7
- br label %bb12
-
-bb9: ; preds = %ppad200
- %eh_select10 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select10, i32* %save_filt.636, align 4
- %eh_value11 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value11, i8** %save_eptr.635, align 4
- %68 = load %struct.btDbvtBroadphase** %36, align 4 ; [#uses=1]
- %69 = bitcast %struct.btDbvtBroadphase* %68 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %69) nounwind
- %70 = load i8** %save_eptr.635, align 4 ; [#uses=1]
- store i8* %70, i8** %eh_exception, align 4
- %71 = load i32* %save_filt.636, align 4 ; [#uses=1]
- store i32 %71, i32* %eh_selector, align 4
- br label %Unwind
-
-bb12: ; preds = %invcont8
- %72 = load %struct.btSequentialImpulseConstraintSolver** %35, align 4 ; [#uses=1]
- store %struct.btSequentialImpulseConstraintSolver* %72, %struct.btSequentialImpulseConstraintSolver** %solver, align 4
- %73 = call i8* @_Znwj(i32 272) ; [#uses=1]
- %74 = bitcast i8* %73 to %struct.btDiscreteDynamicsWorld* ; [#uses=1]
- store %struct.btDiscreteDynamicsWorld* %74, %struct.btDiscreteDynamicsWorld** %34, align 4
- %75 = load %struct.btDefaultCollisionConfiguration** %collisionConfiguration, align 4 ; [#uses=1]
- %76 = bitcast %struct.btDefaultCollisionConfiguration* %75 to %struct.btActionInterface* ; [#uses=1]
- %77 = load %struct.btSequentialImpulseConstraintSolver** %solver, align 4 ; [#uses=1]
- %78 = bitcast %struct.btSequentialImpulseConstraintSolver* %77 to %struct.btActionInterface* ; [#uses=1]
- %79 = load %struct.btCollisionDispatcher** %dispatcher, align 4 ; [#uses=1]
- %80 = bitcast %struct.btCollisionDispatcher* %79 to %struct.btActionInterface* ; [#uses=1]
- %81 = load %struct.btDiscreteDynamicsWorld** %34, align 4 ; [#uses=1]
- %82 = load %struct.btActionInterface** %overlappingPairCache, align 4 ; [#uses=1]
- invoke void @_ZN23btDiscreteDynamicsWorldC1EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btDiscreteDynamicsWorld* %81, %struct.btActionInterface* %80, %struct.btActionInterface* %82, %struct.btActionInterface* %78, %struct.btActionInterface* %76)
- to label %invcont13 unwind label %lpad155
-
-invcont13: ; preds = %bb12
- br label %bb17
-
-bb14: ; preds = %ppad201
- %eh_select15 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select15, i32* %save_filt.638, align 4
- %eh_value16 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value16, i8** %save_eptr.637, align 4
- %83 = load %struct.btSequentialImpulseConstraintSolver** %35, align 4 ; [#uses=1]
- %84 = bitcast %struct.btSequentialImpulseConstraintSolver* %83 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %84) nounwind
- %85 = load i8** %save_eptr.637, align 4 ; [#uses=1]
- store i8* %85, i8** %eh_exception, align 4
- %86 = load i32* %save_filt.638, align 4 ; [#uses=1]
- store i32 %86, i32* %eh_selector, align 4
- br label %Unwind
-
-bb17: ; preds = %invcont13
- %87 = load %struct.btDiscreteDynamicsWorld** %34, align 4 ; [#uses=1]
- store %struct.btDiscreteDynamicsWorld* %87, %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4
- %88 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %88, i32 0, i32 0 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btDynamicsWorld* %89, i32 0, i32 0 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btCollisionWorld* %90, i32 0, i32 0 ; [#uses=1]
- %92 = load i32 (...)*** %91, align 4 ; [#uses=1]
- %93 = getelementptr inbounds i32 (...)** %92, i32 17 ; [#uses=1]
- %94 = load i32 (...)** %93, align 1 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- store float -1.000000e+01, float* %31, align 4
- store float 0.000000e+00, float* %30, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %33, float* %30, float* %31, float* %32) nounwind
- %95 = bitcast i32 (...)* %94 to void (%struct.btDiscreteDynamicsWorld*, %struct.btQuadWord*)* ; [#uses=1]
- %96 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- call void %95(%struct.btDiscreteDynamicsWorld* %96, %struct.btQuadWord* %33)
- store float 5.000000e+01, float* %27, align 4
- store float 5.000000e+01, float* %26, align 4
- store float 5.000000e+01, float* %25, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %28, float* %25, float* %26, float* %27) nounwind
- store %struct.btQuadWord* %28, %struct.btQuadWord** %29, align 4
- %97 = call i8* @_ZN13btConvexShapenwEj(i32 52) inlinehint ; [#uses=1]
- %98 = bitcast i8* %97 to %struct.btBoxShape* ; [#uses=1]
- store %struct.btBoxShape* %98, %struct.btBoxShape** %24, align 4
- %99 = load %struct.btBoxShape** %24, align 4 ; [#uses=1]
- %100 = load %struct.btQuadWord** %29, align 4 ; [#uses=1]
- invoke void @_ZN10btBoxShapeC1ERK9btVector3(%struct.btBoxShape* %99, %struct.btQuadWord* %100)
- to label %invcont18 unwind label %lpad159
-
-invcont18: ; preds = %bb17
- br label %bb22
-
-bb19: ; preds = %ppad202
- %eh_select20 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select20, i32* %save_filt.640, align 4
- %eh_value21 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value21, i8** %save_eptr.639, align 4
- %101 = load %struct.btDiscreteDynamicsWorld** %34, align 4 ; [#uses=1]
- %102 = bitcast %struct.btDiscreteDynamicsWorld* %101 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %102) nounwind
- %103 = load i8** %save_eptr.639, align 4 ; [#uses=1]
- store i8* %103, i8** %eh_exception, align 4
- %104 = load i32* %save_filt.640, align 4 ; [#uses=1]
- store i32 %104, i32* %eh_selector, align 4
- br label %Unwind
-
-bb22: ; preds = %invcont18
- %105 = load %struct.btBoxShape** %24, align 4 ; [#uses=1]
- %106 = bitcast %struct.btBoxShape* %105 to %struct.btCollisionShape* ; [#uses=1]
- store %struct.btCollisionShape* %106, %struct.btCollisionShape** %groundShape, align 4
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeEC1Ev(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes)
- invoke void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE9push_backERKS1_(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes, %struct.btCollisionShape** %groundShape) inlinehint
- to label %invcont23 unwind label %lpad167
-
-invcont23: ; preds = %bb22
- br label %bb29
-
-bb24: ; preds = %ppad203
- %eh_select25 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select25, i32* %save_filt.642, align 4
- %eh_value26 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value26, i8** %save_eptr.641, align 4
- %107 = load %struct.btBoxShape** %24, align 4 ; [#uses=1]
- %108 = bitcast %struct.btBoxShape* %107 to i8* ; [#uses=1]
- invoke void @_ZN13btConvexShapedlEPv(i8* %108) inlinehint
- to label %invcont27 unwind label %lpad163
-
-invcont27: ; preds = %bb24
- %109 = load i8** %save_eptr.641, align 4 ; [#uses=1]
- store i8* %109, i8** %eh_exception, align 4
- %110 = load i32* %save_filt.642, align 4 ; [#uses=1]
- store i32 %110, i32* %eh_selector, align 4
- br label %Unwind
-
-bb28: ; preds = %ppad204
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb29: ; preds = %invcont23
- call void @_ZN11btTransformC1Ev(%struct.btTransform* %groundTransform) nounwind
- call void @_ZN11btTransform11setIdentityEv(%struct.btTransform* %groundTransform) nounwind
- store float 0.000000e+00, float* %22, align 4
- store float -5.600000e+01, float* %21, align 4
- store float 0.000000e+00, float* %20, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %23, float* %20, float* %21, float* %22) nounwind
- call void @_ZN11btTransform9setOriginERK9btVector3(%struct.btTransform* %groundTransform, %struct.btQuadWord* %23) nounwind
- store float 0.000000e+00, float* %mass, align 4
- %111 = load float* %mass, align 4 ; [#uses=1]
- %112 = fcmp une float %111, 0.000000e+00 ; [#uses=1]
- %113 = zext i1 %112 to i8 ; [#uses=1]
- store i8 %113, i8* %isDynamic, align 1
- store float 0.000000e+00, float* %19, align 4
- store float 0.000000e+00, float* %18, align 4
- store float 0.000000e+00, float* %17, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %localInertia, float* %17, float* %18, float* %19) nounwind
- %114 = load i8* %isDynamic, align 1 ; [#uses=1]
- %toBool = icmp ne i8 %114, 0 ; [#uses=1]
- br i1 %toBool, label %bb30, label %bb32
-
-bb30: ; preds = %bb29
- %115 = load %struct.btCollisionShape** %groundShape, align 4 ; [#uses=0]
- %116 = load %struct.btCollisionShape** %groundShape, align 4 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btCollisionShape* %116, i32 0, i32 0 ; [#uses=1]
- %118 = load i32 (...)*** %117, align 4 ; [#uses=1]
- %119 = getelementptr inbounds i32 (...)** %118, i32 8 ; [#uses=1]
- %120 = load i32 (...)** %119, align 1 ; [#uses=1]
- %121 = load %struct.btCollisionShape** %groundShape, align 4 ; [#uses=1]
- %122 = bitcast i32 (...)* %120 to void (%struct.btCollisionShape*, float, %struct.btQuadWord*)* ; [#uses=1]
- %123 = load float* %mass, align 4 ; [#uses=1]
- invoke void %122(%struct.btCollisionShape* %121, float %123, %struct.btQuadWord* %localInertia)
- to label %invcont31 unwind label %lpad167
-
-invcont31: ; preds = %bb30
- br label %bb32
-
-bb32: ; preds = %invcont31, %bb29
- %124 = invoke %struct.btTransform* @_ZN11btTransform11getIdentityEv()
- to label %invcont33 unwind label %lpad167 ; [#uses=1]
-
-invcont33: ; preds = %bb32
- store %struct.btTransform* %124, %struct.btTransform** %16, align 4
- %125 = invoke i8* @_Znwj(i32 200)
- to label %invcont34 unwind label %lpad167 ; [#uses=1]
-
-invcont34: ; preds = %invcont33
- %126 = bitcast i8* %125 to %struct.btDefaultMotionState* ; [#uses=1]
- store %struct.btDefaultMotionState* %126, %struct.btDefaultMotionState** %15, align 4
- %127 = load %struct.btDefaultMotionState** %15, align 4 ; [#uses=1]
- %128 = load %struct.btTransform** %16, align 4 ; [#uses=1]
- call void @_ZN20btDefaultMotionStateC1ERK11btTransformS2_(%struct.btDefaultMotionState* %127, %struct.btTransform* %groundTransform, %struct.btTransform* %128) nounwind
- %129 = load %struct.btDefaultMotionState** %15, align 4 ; [#uses=1]
- store %struct.btDefaultMotionState* %129, %struct.btDefaultMotionState** %myMotionState, align 4
- %130 = load %struct.btCollisionShape** %groundShape, align 4 ; [#uses=1]
- %131 = load %struct.btDefaultMotionState** %myMotionState, align 4 ; [#uses=1]
- %132 = bitcast %struct.btDefaultMotionState* %131 to %struct.btActionInterface* ; [#uses=1]
- %133 = load float* %mass, align 4 ; [#uses=1]
- call void @_ZN11btRigidBody27btRigidBodyConstructionInfoC1EfP13btMotionStateP16btCollisionShapeRK9btVector3(%"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbInfo, float %133, %struct.btActionInterface* %132, %struct.btCollisionShape* %130, %struct.btQuadWord* %localInertia) nounwind
- %134 = invoke i8* @_ZN17btCollisionObjectnwEj(i32 608) inlinehint
- to label %invcont35 unwind label %lpad167 ; [#uses=1]
-
-invcont35: ; preds = %invcont34
- %135 = bitcast i8* %134 to %struct.btRigidBody* ; [#uses=1]
- store %struct.btRigidBody* %135, %struct.btRigidBody** %14, align 4
- %136 = load %struct.btRigidBody** %14, align 4 ; [#uses=1]
- invoke void @_ZN11btRigidBodyC1ERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %136, %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbInfo)
- to label %invcont36 unwind label %lpad171
-
-invcont36: ; preds = %invcont35
- %137 = load %struct.btRigidBody** %14, align 4 ; [#uses=1]
- store %struct.btRigidBody* %137, %struct.btRigidBody** %body, align 4
- %138 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %138, i32 0, i32 0 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btDynamicsWorld* %139, i32 0, i32 0 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btCollisionWorld* %140, i32 0, i32 0 ; [#uses=1]
- %142 = load i32 (...)*** %141, align 4 ; [#uses=1]
- %143 = getelementptr inbounds i32 (...)** %142, i32 20 ; [#uses=1]
- %144 = load i32 (...)** %143, align 1 ; [#uses=1]
- %145 = bitcast i32 (...)* %144 to void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*)* ; [#uses=1]
- %146 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %147 = load %struct.btRigidBody** %body, align 4 ; [#uses=1]
- invoke void %145(%struct.btDiscreteDynamicsWorld* %146, %struct.btRigidBody* %147)
- to label %invcont37 unwind label %lpad167
-
-invcont37: ; preds = %invcont36
- br label %bb43
-
-bb38: ; preds = %ppad206
- %eh_select39 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select39, i32* %save_filt.644, align 4
- %eh_value40 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value40, i8** %save_eptr.643, align 4
- %148 = load %struct.btRigidBody** %14, align 4 ; [#uses=1]
- %149 = bitcast %struct.btRigidBody* %148 to i8* ; [#uses=1]
- invoke void @_ZN17btCollisionObjectdlEPv(i8* %149) inlinehint
- to label %invcont41 unwind label %lpad175
-
-invcont41: ; preds = %bb38
- %150 = load i8** %save_eptr.643, align 4 ; [#uses=1]
- store i8* %150, i8** %eh_exception, align 4
- %151 = load i32* %save_filt.644, align 4 ; [#uses=1]
- store i32 %151, i32* %eh_selector, align 4
- br label %ppad205
-
-bb42: ; preds = %ppad207
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb43: ; preds = %invcont37
- %152 = invoke i8* @_ZN13btSphereShapenwEj(i32 52) inlinehint
- to label %invcont50 unwind label %lpad167 ; [#uses=1]
-
-invcont50: ; preds = %bb43
- %153 = bitcast i8* %152 to %struct.btPolyhedralConvexShape* ; [#uses=1]
- store %struct.btPolyhedralConvexShape* %153, %struct.btPolyhedralConvexShape** %13, align 4
- %154 = load %struct.btPolyhedralConvexShape** %13, align 4 ; [#uses=1]
- invoke void @_ZN13btSphereShapeC1Ef(%struct.btPolyhedralConvexShape* %154, float 1.000000e+00)
- to label %invcont51 unwind label %lpad179
-
-invcont51: ; preds = %invcont50
- %155 = load %struct.btPolyhedralConvexShape** %13, align 4 ; [#uses=1]
- %156 = bitcast %struct.btPolyhedralConvexShape* %155 to %struct.btCollisionShape* ; [#uses=1]
- store %struct.btCollisionShape* %156, %struct.btCollisionShape** %colShape, align 4
- invoke void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE9push_backERKS1_(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes, %struct.btCollisionShape** %colShape) inlinehint
- to label %invcont52 unwind label %lpad167
-
-invcont52: ; preds = %invcont51
- br label %bb58
-
-bb53: ; preds = %ppad208
- %eh_select54 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select54, i32* %save_filt.646, align 4
- %eh_value55 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value55, i8** %save_eptr.645, align 4
- %157 = load %struct.btPolyhedralConvexShape** %13, align 4 ; [#uses=1]
- %158 = bitcast %struct.btPolyhedralConvexShape* %157 to i8* ; [#uses=1]
- invoke void @_ZN13btSphereShapedlEPv(i8* %158) inlinehint
- to label %invcont56 unwind label %lpad183
-
-invcont56: ; preds = %bb53
- %159 = load i8** %save_eptr.645, align 4 ; [#uses=1]
- store i8* %159, i8** %eh_exception, align 4
- %160 = load i32* %save_filt.646, align 4 ; [#uses=1]
- store i32 %160, i32* %eh_selector, align 4
- br label %ppad205
-
-bb57: ; preds = %ppad209
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb58: ; preds = %invcont52
- call void @_ZN11btTransformC1Ev(%struct.btTransform* %startTransform) nounwind
- call void @_ZN11btTransform11setIdentityEv(%struct.btTransform* %startTransform) nounwind
- store float 1.000000e+00, float* %mass44, align 4
- %161 = load float* %mass44, align 4 ; [#uses=1]
- %162 = fcmp une float %161, 0.000000e+00 ; [#uses=1]
- %163 = zext i1 %162 to i8 ; [#uses=1]
- store i8 %163, i8* %isDynamic45, align 1
- store float 0.000000e+00, float* %12, align 4
- store float 0.000000e+00, float* %11, align 4
- store float 0.000000e+00, float* %10, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %localInertia46, float* %10, float* %11, float* %12) nounwind
- %164 = load i8* %isDynamic45, align 1 ; [#uses=1]
- %toBool59 = icmp ne i8 %164, 0 ; [#uses=1]
- br i1 %toBool59, label %bb60, label %bb62
-
-bb60: ; preds = %bb58
- %165 = load %struct.btCollisionShape** %colShape, align 4 ; [#uses=0]
- %166 = load %struct.btCollisionShape** %colShape, align 4 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btCollisionShape* %166, i32 0, i32 0 ; [#uses=1]
- %168 = load i32 (...)*** %167, align 4 ; [#uses=1]
- %169 = getelementptr inbounds i32 (...)** %168, i32 8 ; [#uses=1]
- %170 = load i32 (...)** %169, align 1 ; [#uses=1]
- %171 = load %struct.btCollisionShape** %colShape, align 4 ; [#uses=1]
- %172 = bitcast i32 (...)* %170 to void (%struct.btCollisionShape*, float, %struct.btQuadWord*)* ; [#uses=1]
- %173 = load float* %mass44, align 4 ; [#uses=1]
- invoke void %172(%struct.btCollisionShape* %171, float %173, %struct.btQuadWord* %localInertia46)
- to label %invcont61 unwind label %lpad167
-
-invcont61: ; preds = %bb60
- br label %bb62
-
-bb62: ; preds = %invcont61, %bb58
- store float 0.000000e+00, float* %8, align 4
- store float 1.000000e+01, float* %7, align 4
- store float 2.000000e+00, float* %6, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %9, float* %6, float* %7, float* %8) nounwind
- call void @_ZN11btTransform9setOriginERK9btVector3(%struct.btTransform* %startTransform, %struct.btQuadWord* %9) nounwind
- %174 = invoke %struct.btTransform* @_ZN11btTransform11getIdentityEv()
- to label %invcont63 unwind label %lpad167 ; [#uses=1]
-
-invcont63: ; preds = %bb62
- store %struct.btTransform* %174, %struct.btTransform** %5, align 4
- %175 = invoke i8* @_Znwj(i32 200)
- to label %invcont64 unwind label %lpad167 ; [#uses=1]
-
-invcont64: ; preds = %invcont63
- %176 = bitcast i8* %175 to %struct.btDefaultMotionState* ; [#uses=1]
- store %struct.btDefaultMotionState* %176, %struct.btDefaultMotionState** %4, align 4
- %177 = load %struct.btDefaultMotionState** %4, align 4 ; [#uses=1]
- %178 = load %struct.btTransform** %5, align 4 ; [#uses=1]
- call void @_ZN20btDefaultMotionStateC1ERK11btTransformS2_(%struct.btDefaultMotionState* %177, %struct.btTransform* %startTransform, %struct.btTransform* %178) nounwind
- %179 = load %struct.btDefaultMotionState** %4, align 4 ; [#uses=1]
- store %struct.btDefaultMotionState* %179, %struct.btDefaultMotionState** %myMotionState47, align 4
- %180 = load %struct.btCollisionShape** %colShape, align 4 ; [#uses=1]
- %181 = load %struct.btDefaultMotionState** %myMotionState47, align 4 ; [#uses=1]
- %182 = bitcast %struct.btDefaultMotionState* %181 to %struct.btActionInterface* ; [#uses=1]
- %183 = load float* %mass44, align 4 ; [#uses=1]
- call void @_ZN11btRigidBody27btRigidBodyConstructionInfoC1EfP13btMotionStateP16btCollisionShapeRK9btVector3(%"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbInfo48, float %183, %struct.btActionInterface* %182, %struct.btCollisionShape* %180, %struct.btQuadWord* %localInertia46) nounwind
- %184 = invoke i8* @_ZN17btCollisionObjectnwEj(i32 608) inlinehint
- to label %invcont65 unwind label %lpad167 ; [#uses=1]
-
-invcont65: ; preds = %invcont64
- %185 = bitcast i8* %184 to %struct.btRigidBody* ; [#uses=1]
- store %struct.btRigidBody* %185, %struct.btRigidBody** %3, align 4
- %186 = load %struct.btRigidBody** %3, align 4 ; [#uses=1]
- invoke void @_ZN11btRigidBodyC1ERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %186, %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbInfo48)
- to label %invcont66 unwind label %lpad187
-
-invcont66: ; preds = %invcont65
- %187 = load %struct.btRigidBody** %3, align 4 ; [#uses=1]
- store %struct.btRigidBody* %187, %struct.btRigidBody** %body49, align 4
- %188 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %188, i32 0, i32 0 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btDynamicsWorld* %189, i32 0, i32 0 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btCollisionWorld* %190, i32 0, i32 0 ; [#uses=1]
- %192 = load i32 (...)*** %191, align 4 ; [#uses=1]
- %193 = getelementptr inbounds i32 (...)** %192, i32 20 ; [#uses=1]
- %194 = load i32 (...)** %193, align 1 ; [#uses=1]
- %195 = bitcast i32 (...)* %194 to void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*)* ; [#uses=1]
- %196 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %197 = load %struct.btRigidBody** %body49, align 4 ; [#uses=1]
- invoke void %195(%struct.btDiscreteDynamicsWorld* %196, %struct.btRigidBody* %197)
- to label %invcont67 unwind label %lpad167
-
-invcont67: ; preds = %invcont66
- br label %bb73
-
-bb68: ; preds = %ppad210
- %eh_select69 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select69, i32* %save_filt.648, align 4
- %eh_value70 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value70, i8** %save_eptr.647, align 4
- %198 = load %struct.btRigidBody** %3, align 4 ; [#uses=1]
- %199 = bitcast %struct.btRigidBody* %198 to i8* ; [#uses=1]
- invoke void @_ZN17btCollisionObjectdlEPv(i8* %199) inlinehint
- to label %invcont71 unwind label %lpad191
-
-invcont71: ; preds = %bb68
- %200 = load i8** %save_eptr.647, align 4 ; [#uses=1]
- store i8* %200, i8** %eh_exception, align 4
- %201 = load i32* %save_filt.648, align 4 ; [#uses=1]
- store i32 %201, i32* %eh_selector, align 4
- br label %ppad205
-
-bb72: ; preds = %ppad211
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb73: ; preds = %invcont67
- store i32 0, i32* %i, align 4
- br label %bb90
-
-bb74: ; preds = %bb90
- %202 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %202, i32 0, i32 0 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btDynamicsWorld* %203, i32 0, i32 0 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btCollisionWorld* %204, i32 0, i32 0 ; [#uses=1]
- %206 = load i32 (...)*** %205, align 4 ; [#uses=1]
- %207 = getelementptr inbounds i32 (...)** %206, i32 12 ; [#uses=1]
- %208 = load i32 (...)** %207, align 1 ; [#uses=1]
- %209 = bitcast i32 (...)* %208 to i32 (%struct.btDiscreteDynamicsWorld*, float, i32, float)* ; [#uses=1]
- %210 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %211 = invoke i32 %209(%struct.btDiscreteDynamicsWorld* %210, float 0x3F91111120000000, i32 10, float 0x3F91111120000000)
- to label %invcont75 unwind label %lpad167 ; [#uses=0]
-
-invcont75: ; preds = %bb74
- %212 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %213 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %212, i32 0, i32 0 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btDynamicsWorld* %213, i32 0, i32 0 ; [#uses=1]
- %215 = invoke i32 @_ZNK16btCollisionWorld22getNumCollisionObjectsEv(%struct.btCollisionWorld* %214)
- to label %invcont76 unwind label %lpad167 ; [#uses=1]
-
-invcont76: ; preds = %invcont75
- %216 = sub nsw i32 %215, 1 ; [#uses=1]
- store i32 %216, i32* %j, align 4
- br label %bb88
-
-bb77: ; preds = %bb88
- %217 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %217, i32 0, i32 0 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btDynamicsWorld* %218, i32 0, i32 0 ; [#uses=1]
- %220 = call %"struct.btAlignedObjectArray<btCollisionObject*>"* @_ZN16btCollisionWorld23getCollisionObjectArrayEv(%struct.btCollisionWorld* %219) nounwind ; [#uses=1]
- %221 = load i32* %j, align 4 ; [#uses=1]
- %222 = call %struct.btCollisionObject** @_ZN20btAlignedObjectArrayIP17btCollisionObjectEixEi(%"struct.btAlignedObjectArray<btCollisionObject*>"* %220, i32 %221) nounwind ; [#uses=1]
- %223 = load %struct.btCollisionObject** %222, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %223, %struct.btCollisionObject** %obj, align 4
- %224 = load %struct.btCollisionObject** %obj, align 4 ; [#uses=1]
- %225 = call %struct.btRigidBody* @_ZN11btRigidBody6upcastEP17btCollisionObject(%struct.btCollisionObject* %224) nounwind ; [#uses=1]
- store %struct.btRigidBody* %225, %struct.btRigidBody** %body78, align 4
- %226 = load %struct.btRigidBody** %body78, align 4 ; [#uses=1]
- %227 = icmp eq %struct.btRigidBody* %226, null ; [#uses=1]
- br i1 %227, label %bb81, label %bb79
-
-bb79: ; preds = %bb77
- %228 = load %struct.btRigidBody** %body78, align 4 ; [#uses=1]
- %229 = call %struct.btActionInterface* @_ZN11btRigidBody14getMotionStateEv(%struct.btRigidBody* %228) nounwind ; [#uses=1]
- %230 = icmp eq %struct.btActionInterface* %229, null ; [#uses=1]
- br i1 %230, label %bb81, label %bb80
-
-bb80: ; preds = %bb79
- store i8 1, i8* %iftmp.459, align 1
- br label %bb82
-
-bb81: ; preds = %bb79, %bb77
- store i8 0, i8* %iftmp.459, align 1
- br label %bb82
-
-bb82: ; preds = %bb81, %bb80
- %231 = load i8* %iftmp.459, align 1 ; [#uses=1]
- store i8 %231, i8* %retval.458, align 1
- %232 = load i8* %retval.458, align 1 ; [#uses=1]
- %toBool83 = icmp ne i8 %232, 0 ; [#uses=1]
- br i1 %toBool83, label %bb84, label %bb87
-
-bb84: ; preds = %bb82
- call void @_ZN11btTransformC1Ev(%struct.btTransform* %trans) nounwind
- %233 = load %struct.btRigidBody** %body78, align 4 ; [#uses=1]
- %234 = call %struct.btActionInterface* @_ZN11btRigidBody14getMotionStateEv(%struct.btRigidBody* %233) nounwind ; [#uses=1]
- store %struct.btActionInterface* %234, %struct.btActionInterface** %2, align 4
- %235 = load %struct.btActionInterface** %2, align 4 ; [#uses=1]
- %236 = getelementptr inbounds %struct.btActionInterface* %235, i32 0, i32 0 ; [#uses=1]
- %237 = load i32 (...)*** %236, align 4 ; [#uses=1]
- %238 = getelementptr inbounds i32 (...)** %237, i32 2 ; [#uses=1]
- %239 = load i32 (...)** %238, align 1 ; [#uses=1]
- %240 = bitcast i32 (...)* %239 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- %241 = load %struct.btActionInterface** %2, align 4 ; [#uses=1]
- invoke void %240(%struct.btActionInterface* %241, %struct.btTransform* %trans)
- to label %invcont85 unwind label %lpad167
-
-invcont85: ; preds = %bb84
- %242 = call %struct.btQuadWord* @_ZN11btTransform9getOriginEv(%struct.btTransform* %trans) nounwind ; [#uses=1]
- %243 = call float* @_ZNK9btVector34getZEv(%struct.btQuadWord* %242) nounwind ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = fpext float %244 to double ; [#uses=1]
- %246 = call %struct.btQuadWord* @_ZN11btTransform9getOriginEv(%struct.btTransform* %trans) nounwind ; [#uses=1]
- %247 = call float* @_ZNK9btVector34getYEv(%struct.btQuadWord* %246) nounwind ; [#uses=1]
- %248 = load float* %247, align 4 ; [#uses=1]
- %249 = fpext float %248 to double ; [#uses=1]
- %250 = call %struct.btQuadWord* @_ZN11btTransform9getOriginEv(%struct.btTransform* %trans) nounwind ; [#uses=1]
- %251 = call float* @_ZNK9btVector34getXEv(%struct.btQuadWord* %250) nounwind ; [#uses=1]
- %252 = load float* %251, align 4 ; [#uses=1]
- %253 = fpext float %252 to double ; [#uses=1]
- %254 = invoke i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([28 x i8]* @.str3, i32 0, i32 0), double %253, double %249, double %245)
- to label %invcont86 unwind label %lpad167 ; [#uses=0]
-
-invcont86: ; preds = %invcont85
- br label %bb87
-
-bb87: ; preds = %invcont86, %bb82
- %255 = load i32* %j, align 4 ; [#uses=1]
- %256 = sub nsw i32 %255, 1 ; [#uses=1]
- store i32 %256, i32* %j, align 4
- br label %bb88
-
-bb88: ; preds = %bb87, %invcont76
- %257 = load i32* %j, align 4 ; [#uses=1]
- %258 = icmp sge i32 %257, 0 ; [#uses=1]
- br i1 %258, label %bb77, label %bb89
-
-bb89: ; preds = %bb88
- %259 = load i32* %i, align 4 ; [#uses=1]
- %260 = add nsw i32 %259, 1 ; [#uses=1]
- store i32 %260, i32* %i, align 4
- br label %bb90
-
-bb90: ; preds = %bb89, %bb73
- %261 = load i32* %i, align 4 ; [#uses=1]
- %262 = icmp sle i32 %261, 99 ; [#uses=1]
- br i1 %262, label %bb74, label %bb91
-
-bb91: ; preds = %bb90
- %263 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %264 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %263, i32 0, i32 0 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btDynamicsWorld* %264, i32 0, i32 0 ; [#uses=1]
- %266 = invoke i32 @_ZNK16btCollisionWorld22getNumCollisionObjectsEv(%struct.btCollisionWorld* %265)
- to label %invcont92 unwind label %lpad167 ; [#uses=1]
-
-invcont92: ; preds = %bb91
- %267 = sub nsw i32 %266, 1 ; [#uses=1]
- store i32 %267, i32* %i, align 4
- br label %bb109
-
-bb93: ; preds = %bb109
- %268 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %269 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %268, i32 0, i32 0 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btDynamicsWorld* %269, i32 0, i32 0 ; [#uses=1]
- %271 = call %"struct.btAlignedObjectArray<btCollisionObject*>"* @_ZN16btCollisionWorld23getCollisionObjectArrayEv(%struct.btCollisionWorld* %270) nounwind ; [#uses=1]
- %272 = load i32* %i, align 4 ; [#uses=1]
- %273 = call %struct.btCollisionObject** @_ZN20btAlignedObjectArrayIP17btCollisionObjectEixEi(%"struct.btAlignedObjectArray<btCollisionObject*>"* %271, i32 %272) nounwind ; [#uses=1]
- %274 = load %struct.btCollisionObject** %273, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %274, %struct.btCollisionObject** %obj94, align 4
- %275 = load %struct.btCollisionObject** %obj94, align 4 ; [#uses=1]
- %276 = call %struct.btRigidBody* @_ZN11btRigidBody6upcastEP17btCollisionObject(%struct.btCollisionObject* %275) nounwind ; [#uses=1]
- store %struct.btRigidBody* %276, %struct.btRigidBody** %body95, align 4
- %277 = load %struct.btRigidBody** %body95, align 4 ; [#uses=1]
- %278 = icmp eq %struct.btRigidBody* %277, null ; [#uses=1]
- br i1 %278, label %bb98, label %bb96
-
-bb96: ; preds = %bb93
- %279 = load %struct.btRigidBody** %body95, align 4 ; [#uses=1]
- %280 = call %struct.btActionInterface* @_ZN11btRigidBody14getMotionStateEv(%struct.btRigidBody* %279) nounwind ; [#uses=1]
- %281 = icmp eq %struct.btActionInterface* %280, null ; [#uses=1]
- br i1 %281, label %bb98, label %bb97
-
-bb97: ; preds = %bb96
- store i8 1, i8* %iftmp.461, align 1
- br label %bb99
-
-bb98: ; preds = %bb96, %bb93
- store i8 0, i8* %iftmp.461, align 1
- br label %bb99
-
-bb99: ; preds = %bb98, %bb97
- %282 = load i8* %iftmp.461, align 1 ; [#uses=1]
- store i8 %282, i8* %retval.460, align 1
- %283 = load i8* %retval.460, align 1 ; [#uses=1]
- %toBool100 = icmp ne i8 %283, 0 ; [#uses=1]
- br i1 %toBool100, label %bb101, label %bb104
-
-bb101: ; preds = %bb99
- %284 = load %struct.btRigidBody** %body95, align 4 ; [#uses=1]
- %285 = call %struct.btActionInterface* @_ZN11btRigidBody14getMotionStateEv(%struct.btRigidBody* %284) nounwind ; [#uses=1]
- store %struct.btActionInterface* %285, %struct.btActionInterface** %1, align 4
- %286 = load %struct.btActionInterface** %1, align 4 ; [#uses=1]
- %287 = icmp ne %struct.btActionInterface* %286, null ; [#uses=1]
- br i1 %287, label %bb102, label %bb104
-
-bb102: ; preds = %bb101
- %288 = load %struct.btActionInterface** %1, align 4 ; [#uses=1]
- %289 = getelementptr inbounds %struct.btActionInterface* %288, i32 0, i32 0 ; [#uses=1]
- %290 = load i32 (...)*** %289, align 4 ; [#uses=1]
- %291 = getelementptr inbounds i32 (...)** %290, i32 1 ; [#uses=1]
- %292 = load i32 (...)** %291, align 1 ; [#uses=1]
- %293 = bitcast i32 (...)* %292 to void (%struct.btActionInterface*)* ; [#uses=1]
- %294 = load %struct.btActionInterface** %1, align 4 ; [#uses=1]
- invoke void %293(%struct.btActionInterface* %294)
- to label %invcont103 unwind label %lpad167
-
-invcont103: ; preds = %bb102
- br label %bb104
-
-bb104: ; preds = %invcont103, %bb101, %bb99
- %295 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %296 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %295, i32 0, i32 0 ; [#uses=1]
- %297 = getelementptr inbounds %struct.btDynamicsWorld* %296, i32 0, i32 0 ; [#uses=1]
- %298 = getelementptr inbounds %struct.btCollisionWorld* %297, i32 0, i32 0 ; [#uses=1]
- %299 = load i32 (...)*** %298, align 4 ; [#uses=1]
- %300 = getelementptr inbounds i32 (...)** %299, i32 9 ; [#uses=1]
- %301 = load i32 (...)** %300, align 1 ; [#uses=1]
- %302 = bitcast i32 (...)* %301 to void (%struct.btDiscreteDynamicsWorld*, %struct.btCollisionObject*)* ; [#uses=1]
- %303 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %304 = load %struct.btCollisionObject** %obj94, align 4 ; [#uses=1]
- invoke void %302(%struct.btDiscreteDynamicsWorld* %303, %struct.btCollisionObject* %304)
- to label %invcont105 unwind label %lpad167
-
-invcont105: ; preds = %bb104
- %305 = load %struct.btCollisionObject** %obj94, align 4 ; [#uses=1]
- %306 = icmp ne %struct.btCollisionObject* %305, null ; [#uses=1]
- br i1 %306, label %bb106, label %bb108
-
-bb106: ; preds = %invcont105
- %307 = load %struct.btCollisionObject** %obj94, align 4 ; [#uses=1]
- %308 = getelementptr inbounds %struct.btCollisionObject* %307, i32 0, i32 0 ; [#uses=1]
- %309 = load i32 (...)*** %308, align 4 ; [#uses=1]
- %310 = getelementptr inbounds i32 (...)** %309, i32 2 ; [#uses=1]
- %311 = load i32 (...)** %310, align 1 ; [#uses=1]
- %312 = bitcast i32 (...)* %311 to void (%struct.btCollisionObject*)* ; [#uses=1]
- %313 = load %struct.btCollisionObject** %obj94, align 4 ; [#uses=1]
- invoke void %312(%struct.btCollisionObject* %313)
- to label %invcont107 unwind label %lpad167
-
-invcont107: ; preds = %bb106
- br label %bb108
-
-bb108: ; preds = %invcont107, %invcont105
- %314 = load i32* %i, align 4 ; [#uses=1]
- %315 = sub nsw i32 %314, 1 ; [#uses=1]
- store i32 %315, i32* %i, align 4
- br label %bb109
-
-bb109: ; preds = %bb108, %invcont92
- %316 = load i32* %i, align 4 ; [#uses=1]
- %317 = icmp sge i32 %316, 0 ; [#uses=1]
- br i1 %317, label %bb93, label %bb110
-
-bb110: ; preds = %bb109
- store i32 0, i32* %j111, align 4
- br label %bb116
-
-bb112: ; preds = %bb116
- %318 = load i32* %j111, align 4 ; [#uses=1]
- %319 = call %struct.btCollisionShape** @_ZN20btAlignedObjectArrayIP16btCollisionShapeEixEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes, i32 %318) nounwind ; [#uses=1]
- %320 = load %struct.btCollisionShape** %319, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %320, %struct.btCollisionShape** %shape, align 4
- %321 = load i32* %j111, align 4 ; [#uses=1]
- %322 = call %struct.btCollisionShape** @_ZN20btAlignedObjectArrayIP16btCollisionShapeEixEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes, i32 %321) nounwind ; [#uses=1]
- store %struct.btCollisionShape* null, %struct.btCollisionShape** %322, align 4
- %323 = load %struct.btCollisionShape** %shape, align 4 ; [#uses=1]
- %324 = icmp ne %struct.btCollisionShape* %323, null ; [#uses=1]
- br i1 %324, label %bb113, label %bb115
-
-bb113: ; preds = %bb112
- %325 = load %struct.btCollisionShape** %shape, align 4 ; [#uses=1]
- %326 = getelementptr inbounds %struct.btCollisionShape* %325, i32 0, i32 0 ; [#uses=1]
- %327 = load i32 (...)*** %326, align 4 ; [#uses=1]
- %328 = getelementptr inbounds i32 (...)** %327, i32 1 ; [#uses=1]
- %329 = load i32 (...)** %328, align 1 ; [#uses=1]
- %330 = bitcast i32 (...)* %329 to void (%struct.btCollisionShape*)* ; [#uses=1]
- %331 = load %struct.btCollisionShape** %shape, align 4 ; [#uses=1]
- invoke void %330(%struct.btCollisionShape* %331)
- to label %invcont114 unwind label %lpad167
-
-invcont114: ; preds = %bb113
- br label %bb115
-
-bb115: ; preds = %invcont114, %bb112
- %332 = load i32* %j111, align 4 ; [#uses=1]
- %333 = add nsw i32 %332, 1 ; [#uses=1]
- store i32 %333, i32* %j111, align 4
- br label %bb116
-
-bb116: ; preds = %bb115, %bb110
- %334 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4sizeEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes) nounwind ; [#uses=1]
- %335 = load i32* %j111, align 4 ; [#uses=1]
- %336 = icmp sgt i32 %334, %335 ; [#uses=1]
- %337 = zext i1 %336 to i8 ; [#uses=1]
- store i8 %337, i8* %retval.462, align 1
- %338 = load i8* %retval.462, align 1 ; [#uses=1]
- %toBool117 = icmp ne i8 %338, 0 ; [#uses=1]
- br i1 %toBool117, label %bb112, label %bb118
-
-bb118: ; preds = %bb116
- %339 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %340 = icmp ne %struct.btDiscreteDynamicsWorld* %339, null ; [#uses=1]
- br i1 %340, label %bb119, label %bb121
-
-bb119: ; preds = %bb118
- %341 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- %342 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %341, i32 0, i32 0 ; [#uses=1]
- %343 = getelementptr inbounds %struct.btDynamicsWorld* %342, i32 0, i32 0 ; [#uses=1]
- %344 = getelementptr inbounds %struct.btCollisionWorld* %343, i32 0, i32 0 ; [#uses=1]
- %345 = load i32 (...)*** %344, align 4 ; [#uses=1]
- %346 = getelementptr inbounds i32 (...)** %345, i32 1 ; [#uses=1]
- %347 = load i32 (...)** %346, align 1 ; [#uses=1]
- %348 = bitcast i32 (...)* %347 to void (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- %349 = load %struct.btDiscreteDynamicsWorld** %dynamicsWorld, align 4 ; [#uses=1]
- invoke void %348(%struct.btDiscreteDynamicsWorld* %349)
- to label %invcont120 unwind label %lpad167
-
-invcont120: ; preds = %bb119
- br label %bb121
-
-bb121: ; preds = %invcont120, %bb118
- %350 = load %struct.btSequentialImpulseConstraintSolver** %solver, align 4 ; [#uses=1]
- %351 = icmp ne %struct.btSequentialImpulseConstraintSolver* %350, null ; [#uses=1]
- br i1 %351, label %bb122, label %bb124
-
-bb122: ; preds = %bb121
- %352 = load %struct.btSequentialImpulseConstraintSolver** %solver, align 4 ; [#uses=1]
- %353 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %352, i32 0, i32 0 ; [#uses=1]
- %354 = getelementptr inbounds %struct.btActionInterface* %353, i32 0, i32 0 ; [#uses=1]
- %355 = load i32 (...)*** %354, align 4 ; [#uses=1]
- %356 = getelementptr inbounds i32 (...)** %355, i32 1 ; [#uses=1]
- %357 = load i32 (...)** %356, align 1 ; [#uses=1]
- %358 = bitcast i32 (...)* %357 to void (%struct.btSequentialImpulseConstraintSolver*)* ; [#uses=1]
- %359 = load %struct.btSequentialImpulseConstraintSolver** %solver, align 4 ; [#uses=1]
- invoke void %358(%struct.btSequentialImpulseConstraintSolver* %359)
- to label %invcont123 unwind label %lpad167
-
-invcont123: ; preds = %bb122
- br label %bb124
-
-bb124: ; preds = %invcont123, %bb121
- %360 = load %struct.btActionInterface** %overlappingPairCache, align 4 ; [#uses=1]
- %361 = icmp ne %struct.btActionInterface* %360, null ; [#uses=1]
- br i1 %361, label %bb125, label %bb127
-
-bb125: ; preds = %bb124
- %362 = load %struct.btActionInterface** %overlappingPairCache, align 4 ; [#uses=1]
- %363 = getelementptr inbounds %struct.btActionInterface* %362, i32 0, i32 0 ; [#uses=1]
- %364 = load i32 (...)*** %363, align 4 ; [#uses=1]
- %365 = getelementptr inbounds i32 (...)** %364, i32 1 ; [#uses=1]
- %366 = load i32 (...)** %365, align 1 ; [#uses=1]
- %367 = bitcast i32 (...)* %366 to void (%struct.btActionInterface*)* ; [#uses=1]
- %368 = load %struct.btActionInterface** %overlappingPairCache, align 4 ; [#uses=1]
- invoke void %367(%struct.btActionInterface* %368)
- to label %invcont126 unwind label %lpad167
-
-invcont126: ; preds = %bb125
- br label %bb127
-
-bb127: ; preds = %invcont126, %bb124
- %369 = load %struct.btCollisionDispatcher** %dispatcher, align 4 ; [#uses=1]
- %370 = icmp ne %struct.btCollisionDispatcher* %369, null ; [#uses=1]
- br i1 %370, label %bb128, label %bb130
-
-bb128: ; preds = %bb127
- %371 = load %struct.btCollisionDispatcher** %dispatcher, align 4 ; [#uses=1]
- %372 = getelementptr inbounds %struct.btCollisionDispatcher* %371, i32 0, i32 0 ; [#uses=1]
- %373 = getelementptr inbounds %struct.btActionInterface* %372, i32 0, i32 0 ; [#uses=1]
- %374 = load i32 (...)*** %373, align 4 ; [#uses=1]
- %375 = getelementptr inbounds i32 (...)** %374, i32 1 ; [#uses=1]
- %376 = load i32 (...)** %375, align 1 ; [#uses=1]
- %377 = bitcast i32 (...)* %376 to void (%struct.btCollisionDispatcher*)* ; [#uses=1]
- %378 = load %struct.btCollisionDispatcher** %dispatcher, align 4 ; [#uses=1]
- invoke void %377(%struct.btCollisionDispatcher* %378)
- to label %invcont129 unwind label %lpad167
-
-invcont129: ; preds = %bb128
- br label %bb130
-
-bb130: ; preds = %invcont129, %bb127
- %379 = load %struct.btDefaultCollisionConfiguration** %collisionConfiguration, align 4 ; [#uses=1]
- %380 = icmp ne %struct.btDefaultCollisionConfiguration* %379, null ; [#uses=1]
- br i1 %380, label %bb131, label %bb133
-
-bb131: ; preds = %bb130
- %381 = load %struct.btDefaultCollisionConfiguration** %collisionConfiguration, align 4 ; [#uses=1]
- %382 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %381, i32 0, i32 0 ; [#uses=1]
- %383 = getelementptr inbounds %struct.btActionInterface* %382, i32 0, i32 0 ; [#uses=1]
- %384 = load i32 (...)*** %383, align 4 ; [#uses=1]
- %385 = getelementptr inbounds i32 (...)** %384, i32 1 ; [#uses=1]
- %386 = load i32 (...)** %385, align 1 ; [#uses=1]
- %387 = bitcast i32 (...)* %386 to void (%struct.btDefaultCollisionConfiguration*)* ; [#uses=1]
- %388 = load %struct.btDefaultCollisionConfiguration** %collisionConfiguration, align 4 ; [#uses=1]
- invoke void %387(%struct.btDefaultCollisionConfiguration* %388)
- to label %invcont132 unwind label %lpad167
-
-invcont132: ; preds = %bb131
- br label %bb133
-
-bb133: ; preds = %invcont132, %bb130
- invoke void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE5clearEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes) inlinehint
- to label %invcont134 unwind label %lpad167
-
-invcont134: ; preds = %bb133
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes)
- store i32 0, i32* %0, align 4
- %389 = load i32* %0, align 4 ; [#uses=1]
- store i32 %389, i32* %retval, align 4
- br label %return
-
-bb135: ; preds = %ppad205
- %eh_select136 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select136, i32* %save_filt.650, align 4
- %eh_value137 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value137, i8** %save_eptr.649, align 4
- invoke void @_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev(%"struct.btAlignedObjectArray<btCollisionShape*>"* %collisionShapes)
- to label %invcont138 unwind label %lpad195
-
-invcont138: ; preds = %bb135
- %390 = load i8** %save_eptr.649, align 4 ; [#uses=1]
- store i8* %390, i8** %eh_exception, align 4
- %391 = load i32* %save_filt.650, align 4 ; [#uses=1]
- store i32 %391, i32* %eh_selector, align 4
- br label %Unwind
-
-bb139: ; preds = %ppad212
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-return: ; preds = %invcont134
- %retval140 = load i32* %retval ; [#uses=1]
- ret i32 %retval140
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr, i8** %eh_exception
- %eh_ptr141 = load i8** %eh_exception ; [#uses=1]
- %eh_select142 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr141, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select142, i32* %eh_selector
- br label %ppad
-
-lpad143: ; preds = %invcont
- %eh_ptr144 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr144, i8** %eh_exception
- %eh_ptr145 = load i8** %eh_exception ; [#uses=1]
- %eh_select146 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr145, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select146, i32* %eh_selector
- br label %ppad199
-
-lpad147: ; preds = %bb2
- %eh_ptr148 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr148, i8** %eh_exception
- %eh_ptr149 = load i8** %eh_exception ; [#uses=1]
- %eh_select150 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr149, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select150, i32* %eh_selector
- br label %ppad200
-
-lpad151: ; preds = %bb7
- %eh_ptr152 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr152, i8** %eh_exception
- %eh_ptr153 = load i8** %eh_exception ; [#uses=1]
- %eh_select154 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr153, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select154, i32* %eh_selector
- br label %ppad201
-
-lpad155: ; preds = %bb12
- %eh_ptr156 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr156, i8** %eh_exception
- %eh_ptr157 = load i8** %eh_exception ; [#uses=1]
- %eh_select158 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr157, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select158, i32* %eh_selector
- br label %ppad202
-
-lpad159: ; preds = %bb17
- %eh_ptr160 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr160, i8** %eh_exception
- %eh_ptr161 = load i8** %eh_exception ; [#uses=1]
- %eh_select162 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr161, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select162, i32* %eh_selector
- br label %ppad203
-
-lpad163: ; preds = %bb24
- %eh_ptr164 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr164, i8** %eh_exception
- %eh_ptr165 = load i8** %eh_exception ; [#uses=1]
- %eh_select166 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr165, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select166, i32* %eh_selector
- br label %ppad204
-
-lpad167: ; preds = %bb133, %bb131, %bb128, %bb125, %bb122, %bb119, %bb113, %bb106, %bb104, %bb102, %bb91, %invcont85, %bb84, %invcont75, %bb74, %invcont66, %invcont64, %invcont63, %bb62, %bb60, %invcont51, %bb43, %invcont36, %invcont34, %invcont33, %bb32, %bb30, %bb22
- %eh_ptr168 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr168, i8** %eh_exception
- %eh_ptr169 = load i8** %eh_exception ; [#uses=1]
- %eh_select170 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr169, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select170, i32* %eh_selector
- br label %ppad205
-
-lpad171: ; preds = %invcont35
- %eh_ptr172 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr172, i8** %eh_exception
- %eh_ptr173 = load i8** %eh_exception ; [#uses=1]
- %eh_select174 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr173, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select174, i32* %eh_selector
- br label %ppad206
-
-lpad175: ; preds = %bb38
- %eh_ptr176 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr176, i8** %eh_exception
- %eh_ptr177 = load i8** %eh_exception ; [#uses=1]
- %eh_select178 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr177, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select178, i32* %eh_selector
- br label %ppad207
-
-lpad179: ; preds = %invcont50
- %eh_ptr180 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr180, i8** %eh_exception
- %eh_ptr181 = load i8** %eh_exception ; [#uses=1]
- %eh_select182 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr181, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select182, i32* %eh_selector
- br label %ppad208
-
-lpad183: ; preds = %bb53
- %eh_ptr184 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr184, i8** %eh_exception
- %eh_ptr185 = load i8** %eh_exception ; [#uses=1]
- %eh_select186 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr185, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select186, i32* %eh_selector
- br label %ppad209
-
-lpad187: ; preds = %invcont65
- %eh_ptr188 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr188, i8** %eh_exception
- %eh_ptr189 = load i8** %eh_exception ; [#uses=1]
- %eh_select190 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr189, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select190, i32* %eh_selector
- br label %ppad210
-
-lpad191: ; preds = %bb68
- %eh_ptr192 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr192, i8** %eh_exception
- %eh_ptr193 = load i8** %eh_exception ; [#uses=1]
- %eh_select194 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr193, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select194, i32* %eh_selector
- br label %ppad211
-
-lpad195: ; preds = %bb135
- %eh_ptr196 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr196, i8** %eh_exception
- %eh_ptr197 = load i8** %eh_exception ; [#uses=1]
- %eh_select198 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr197, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select198, i32* %eh_selector
- br label %ppad212
-
-ppad: ; preds = %lpad
- br label %bb
-
-ppad199: ; preds = %lpad143
- br label %bb4
-
-ppad200: ; preds = %lpad147
- br label %bb9
-
-ppad201: ; preds = %lpad151
- br label %bb14
-
-ppad202: ; preds = %lpad155
- br label %bb19
-
-ppad203: ; preds = %lpad159
- br label %bb24
-
-ppad204: ; preds = %lpad163
- br label %bb28
-
-ppad205: ; preds = %lpad167, %invcont71, %invcont56, %invcont41
- br label %bb135
-
-ppad206: ; preds = %lpad171
- br label %bb38
-
-ppad207: ; preds = %lpad175
- br label %bb42
-
-ppad208: ; preds = %lpad179
- br label %bb53
-
-ppad209: ; preds = %lpad183
- br label %bb57
-
-ppad210: ; preds = %lpad187
- br label %bb68
-
-ppad211: ; preds = %lpad191
- br label %bb72
-
-ppad212: ; preds = %lpad195
- br label %bb139
-
-Unwind: ; preds = %invcont138, %invcont27, %bb19, %bb14, %bb9, %bb4, %bb
- %eh_ptr213 = load i8** %eh_exception ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr213)
- unreachable
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN9btVector3C1Ev(%struct.btQuadWord* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=13]
-define linkonce_odr void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %this, float* %x, float* %y, float* %z) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=5]
- %x_addr = alloca float*, align 4 ; [#uses=2]
- %y_addr = alloca float*, align 4 ; [#uses=2]
- %z_addr = alloca float*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- store float* %x, float** %x_addr
- store float* %y, float** %y_addr
- store float* %z, float** %z_addr
- %0 = load float** %x_addr, align 4 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds [4 x float]* %3, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %4, align 4
- %5 = load float** %y_addr, align 4 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds [4 x float]* %8, i32 0, i32 1 ; [#uses=1]
- store float %6, float* %9, align 4
- %10 = load float** %z_addr, align 4 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [4 x float]* %13, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %14, align 4
- %15 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %15, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds [4 x float]* %16, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=6]
-define linkonce_odr float @_ZNK9btVector33dotERKS_(%struct.btQuadWord* %this, %struct.btQuadWord* %v) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %v_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %retval = alloca float ; [#uses=2]
- %0 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- store %struct.btQuadWord* %v, %struct.btQuadWord** %v_addr
- %1 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [4 x float]* %2, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds [4 x float]* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %4, %8 ; [#uses=1]
- %10 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %10, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds [4 x float]* %11, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %14, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds [4 x float]* %15, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fmul float %13, %17 ; [#uses=1]
- %19 = fadd float %9, %18 ; [#uses=1]
- %20 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %20, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds [4 x float]* %21, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %24, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds [4 x float]* %25, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fmul float %23, %27 ; [#uses=1]
- %29 = fadd float %19, %28 ; [#uses=1]
- store float %29, float* %0, align 4
- %30 = load float* %0, align 4 ; [#uses=1]
- store float %30, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; [#uses=1]
- ret float %retval1
-}
-
-; [#uses=1]
-define linkonce_odr float* @_ZNK9btVector34getXEv(%struct.btQuadWord* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %retval = alloca float* ; [#uses=2]
- %0 = alloca float* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- %1 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [4 x float]* %2, i32 0, i32 0 ; [#uses=1]
- store float* %3, float** %0, align 4
- %4 = load float** %0, align 4 ; [#uses=1]
- store float* %4, float** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float** %retval ; [#uses=1]
- ret float* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr float* @_ZNK9btVector34getYEv(%struct.btQuadWord* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %retval = alloca float* ; [#uses=2]
- %0 = alloca float* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- %1 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [4 x float]* %2, i32 0, i32 1 ; [#uses=1]
- store float* %3, float** %0, align 4
- %4 = load float** %0, align 4 ; [#uses=1]
- store float* %4, float** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float** %retval ; [#uses=1]
- ret float* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr float* @_ZNK9btVector34getZEv(%struct.btQuadWord* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %retval = alloca float* ; [#uses=2]
- %0 = alloca float* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- %1 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [4 x float]* %2, i32 0, i32 2 ; [#uses=1]
- store float* %3, float** %0, align 4
- %4 = load float** %0, align 4 ; [#uses=1]
- store float* %4, float** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float** %retval ; [#uses=1]
- ret float* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9btVector34setXEf(%struct.btQuadWord* %this, float %x) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %x_addr = alloca float, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- store float %x, float* %x_addr
- %0 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds [4 x float]* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %x_addr, align 4 ; [#uses=1]
- store float %3, float* %2, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=10]
-define linkonce_odr float* @_ZNK9btVector31xEv(%struct.btQuadWord* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %retval = alloca float* ; [#uses=2]
- %0 = alloca float* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- %1 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [4 x float]* %2, i32 0, i32 0 ; [#uses=1]
- store float* %3, float** %0, align 4
- %4 = load float** %0, align 4 ; [#uses=1]
- store float* %4, float** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float** %retval ; [#uses=1]
- ret float* %retval1
-}
-
-; [#uses=10]
-define linkonce_odr float* @_ZNK9btVector31yEv(%struct.btQuadWord* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %retval = alloca float* ; [#uses=2]
- %0 = alloca float* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- %1 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [4 x float]* %2, i32 0, i32 1 ; [#uses=1]
- store float* %3, float** %0, align 4
- %4 = load float** %0, align 4 ; [#uses=1]
- store float* %4, float** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float** %retval ; [#uses=1]
- ret float* %retval1
-}
-
-; [#uses=10]
-define linkonce_odr float* @_ZNK9btVector31zEv(%struct.btQuadWord* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %retval = alloca float* ; [#uses=2]
- %0 = alloca float* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- %1 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [4 x float]* %2, i32 0, i32 2 ; [#uses=1]
- store float* %3, float** %0, align 4
- %4 = load float** %0, align 4 ; [#uses=1]
- store float* %4, float** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float** %retval ; [#uses=1]
- ret float* %retval1
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN9btVector38setValueERKfS1_S1_(%struct.btQuadWord* %this, float* %x, float* %y, float* %z) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=5]
- %x_addr = alloca float*, align 4 ; [#uses=2]
- %y_addr = alloca float*, align 4 ; [#uses=2]
- %z_addr = alloca float*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %this, %struct.btQuadWord** %this_addr
- store float* %x, float** %x_addr
- store float* %y, float** %y_addr
- store float* %z, float** %z_addr
- %0 = load float** %x_addr, align 4 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds [4 x float]* %3, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %4, align 4
- %5 = load float** %y_addr, align 4 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds [4 x float]* %8, i32 0, i32 1 ; [#uses=1]
- store float %6, float* %9, align 4
- %10 = load float** %z_addr, align 4 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [4 x float]* %13, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %14, align 4
- %15 = load %struct.btQuadWord** %this_addr, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %15, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds [4 x float]* %16, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZmlRK9btVector3S1_(%struct.btQuadWord* noalias sret %agg.result, %struct.btQuadWord* %v1, %struct.btQuadWord* %v2) nounwind inlinehint {
-entry:
- %v1_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %v2_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %v1, %struct.btQuadWord** %v1_addr
- store %struct.btQuadWord* %v2, %struct.btQuadWord** %v2_addr
- %3 = load %struct.btQuadWord** %v1_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds [4 x float]* %4, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = load %struct.btQuadWord** %v2_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds [4 x float]* %8, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %6, %10 ; [#uses=1]
- store float %11, float* %2, align 4
- %12 = load %struct.btQuadWord** %v1_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [4 x float]* %13, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = load %struct.btQuadWord** %v2_addr, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %16, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds [4 x float]* %17, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fmul float %15, %19 ; [#uses=1]
- store float %20, float* %1, align 4
- %21 = load %struct.btQuadWord** %v1_addr, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %21, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds [4 x float]* %22, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load %struct.btQuadWord** %v2_addr, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %25, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds [4 x float]* %26, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %24, %28 ; [#uses=1]
- store float %29, float* %0, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %agg.result, float* %0, float* %1, float* %2) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZmiRK9btVector3S1_(%struct.btQuadWord* noalias sret %agg.result, %struct.btQuadWord* %v1, %struct.btQuadWord* %v2) nounwind inlinehint {
-entry:
- %v1_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %v2_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %v1, %struct.btQuadWord** %v1_addr
- store %struct.btQuadWord* %v2, %struct.btQuadWord** %v2_addr
- %3 = load %struct.btQuadWord** %v1_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds [4 x float]* %4, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = load %struct.btQuadWord** %v2_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds [4 x float]* %8, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fsub float %6, %10 ; [#uses=1]
- store float %11, float* %2, align 4
- %12 = load %struct.btQuadWord** %v1_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [4 x float]* %13, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = load %struct.btQuadWord** %v2_addr, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %16, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds [4 x float]* %17, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %15, %19 ; [#uses=1]
- store float %20, float* %1, align 4
- %21 = load %struct.btQuadWord** %v1_addr, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %21, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds [4 x float]* %22, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load %struct.btQuadWord** %v2_addr, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %25, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds [4 x float]* %26, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fsub float %24, %28 ; [#uses=1]
- store float %29, float* %0, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %agg.result, float* %0, float* %1, float* %2) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZngRK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btQuadWord* %v) nounwind inlinehint {
-entry:
- %v_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btQuadWord* %v, %struct.btQuadWord** %v_addr
- %3 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds [4 x float]* %4, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = fsub float -0.000000e+00, %6 ; [#uses=1]
- store float %7, float* %2, align 4
- %8 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds [4 x float]* %9, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fsub float -0.000000e+00, %11 ; [#uses=1]
- store float %12, float* %1, align 4
- %13 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %13, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds [4 x float]* %14, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float -0.000000e+00, %16 ; [#uses=1]
- store float %17, float* %0, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %agg.result, float* %0, float* %1, float* %2) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN11btMatrix3x3C1Ev(%struct.btMatrix3x3* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=2]
- %0 = alloca i32 ; [#uses=4]
- %1 = alloca %struct.btQuadWord* ; [#uses=4]
- %2 = alloca %struct.btQuadWord* ; [#uses=3]
- %retval.40 = alloca %struct.btQuadWord* ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- %3 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds [3 x %struct.btQuadWord]* %4, i32 0, i32 0 ; [#uses=1]
- store %struct.btQuadWord* %5, %struct.btQuadWord** %2, align 4
- %6 = load %struct.btQuadWord** %2, align 4 ; [#uses=1]
- store %struct.btQuadWord* %6, %struct.btQuadWord** %1, align 4
- store i32 2, i32* %0, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %7 = load %struct.btQuadWord** %1, align 4 ; [#uses=1]
- call void @_ZN9btVector3C1Ev(%struct.btQuadWord* %7) nounwind
- %8 = load %struct.btQuadWord** %1, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %8, i64 1 ; [#uses=1]
- store %struct.btQuadWord* %9, %struct.btQuadWord** %1, align 4
- %10 = load i32* %0, align 4 ; [#uses=1]
- %11 = sub nsw i32 %10, 1 ; [#uses=1]
- store i32 %11, i32* %0, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %12 = load i32* %0, align 4 ; [#uses=1]
- %13 = icmp ne i32 %12, -1 ; [#uses=1]
- br i1 %13, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- %14 = load %struct.btQuadWord** %2, align 4 ; [#uses=1]
- store %struct.btQuadWord* %14, %struct.btQuadWord** %retval.40, align 4
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN11btMatrix3x3C1ERKS_(%struct.btMatrix3x3* %this, %struct.btMatrix3x3* %other) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=5]
- %other_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=4]
- %0 = alloca i32 ; [#uses=4]
- %1 = alloca %struct.btQuadWord* ; [#uses=4]
- %2 = alloca %struct.btQuadWord* ; [#uses=3]
- %retval.43 = alloca %struct.btQuadWord* ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store %struct.btMatrix3x3* %other, %struct.btMatrix3x3** %other_addr
- %3 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds [3 x %struct.btQuadWord]* %4, i32 0, i32 0 ; [#uses=1]
- store %struct.btQuadWord* %5, %struct.btQuadWord** %2, align 4
- %6 = load %struct.btQuadWord** %2, align 4 ; [#uses=1]
- store %struct.btQuadWord* %6, %struct.btQuadWord** %1, align 4
- store i32 2, i32* %0, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %7 = load %struct.btQuadWord** %1, align 4 ; [#uses=1]
- call void @_ZN9btVector3C1Ev(%struct.btQuadWord* %7) nounwind
- %8 = load %struct.btQuadWord** %1, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %8, i64 1 ; [#uses=1]
- store %struct.btQuadWord* %9, %struct.btQuadWord** %1, align 4
- %10 = load i32* %0, align 4 ; [#uses=1]
- %11 = sub nsw i32 %10, 1 ; [#uses=1]
- store i32 %11, i32* %0, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %12 = load i32* %0, align 4 ; [#uses=1]
- %13 = icmp ne i32 %12, -1 ; [#uses=1]
- br i1 %13, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- %14 = load %struct.btQuadWord** %2, align 4 ; [#uses=1]
- store %struct.btQuadWord* %14, %struct.btQuadWord** %retval.43, align 4
- %15 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btMatrix3x3* %15, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds [3 x %struct.btQuadWord]* %16, i32 0, i32 0 ; [#uses=1]
- %18 = load %struct.btMatrix3x3** %other_addr, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btMatrix3x3* %18, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds [3 x %struct.btQuadWord]* %19, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %17, i32 0, i32 0 ; [#uses=4]
- %22 = getelementptr inbounds %struct.btQuadWord* %20, i32 0, i32 0 ; [#uses=4]
- %23 = getelementptr inbounds [4 x float]* %21, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds [4 x float]* %22, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds [4 x float]* %21, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds [4 x float]* %22, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds [4 x float]* %21, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds [4 x float]* %22, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds [4 x float]* %21, i32 0, i32 3 ; [#uses=1]
- %33 = getelementptr inbounds [4 x float]* %22, i32 0, i32 3 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btMatrix3x3* %35, i32 0, i32 0 ; [#uses=1]
- %37 = getelementptr inbounds [3 x %struct.btQuadWord]* %36, i32 0, i32 1 ; [#uses=1]
- %38 = load %struct.btMatrix3x3** %other_addr, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btMatrix3x3* %38, i32 0, i32 0 ; [#uses=1]
- %40 = getelementptr inbounds [3 x %struct.btQuadWord]* %39, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %37, i32 0, i32 0 ; [#uses=4]
- %42 = getelementptr inbounds %struct.btQuadWord* %40, i32 0, i32 0 ; [#uses=4]
- %43 = getelementptr inbounds [4 x float]* %41, i32 0, i32 0 ; [#uses=1]
- %44 = getelementptr inbounds [4 x float]* %42, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds [4 x float]* %41, i32 0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds [4 x float]* %42, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds [4 x float]* %41, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds [4 x float]* %42, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds [4 x float]* %41, i32 0, i32 3 ; [#uses=1]
- %53 = getelementptr inbounds [4 x float]* %42, i32 0, i32 3 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btMatrix3x3* %55, i32 0, i32 0 ; [#uses=1]
- %57 = getelementptr inbounds [3 x %struct.btQuadWord]* %56, i32 0, i32 2 ; [#uses=1]
- %58 = load %struct.btMatrix3x3** %other_addr, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btMatrix3x3* %58, i32 0, i32 0 ; [#uses=1]
- %60 = getelementptr inbounds [3 x %struct.btQuadWord]* %59, i32 0, i32 2 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuadWord* %57, i32 0, i32 0 ; [#uses=4]
- %62 = getelementptr inbounds %struct.btQuadWord* %60, i32 0, i32 0 ; [#uses=4]
- %63 = getelementptr inbounds [4 x float]* %61, i32 0, i32 0 ; [#uses=1]
- %64 = getelementptr inbounds [4 x float]* %62, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds [4 x float]* %61, i32 0, i32 1 ; [#uses=1]
- %67 = getelementptr inbounds [4 x float]* %62, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 4
- %69 = getelementptr inbounds [4 x float]* %61, i32 0, i32 2 ; [#uses=1]
- %70 = getelementptr inbounds [4 x float]* %62, i32 0, i32 2 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = getelementptr inbounds [4 x float]* %61, i32 0, i32 3 ; [#uses=1]
- %73 = getelementptr inbounds [4 x float]* %62, i32 0, i32 3 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 4
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btMatrix3x3* @_ZN11btMatrix3x3aSERKS_(%struct.btMatrix3x3* %this, %struct.btMatrix3x3* %other) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=5]
- %other_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=4]
- %retval = alloca %struct.btMatrix3x3* ; [#uses=2]
- %0 = alloca %struct.btMatrix3x3* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store %struct.btMatrix3x3* %other, %struct.btMatrix3x3** %other_addr
- %1 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMatrix3x3* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [3 x %struct.btQuadWord]* %2, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btMatrix3x3** %other_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btMatrix3x3* %4, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds [3 x %struct.btQuadWord]* %5, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0 ; [#uses=4]
- %9 = getelementptr inbounds [4 x float]* %7, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds [4 x float]* %8, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds [4 x float]* %7, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds [4 x float]* %8, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds [4 x float]* %7, i32 0, i32 2 ; [#uses=1]
- %16 = getelementptr inbounds [4 x float]* %8, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds [4 x float]* %7, i32 0, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds [4 x float]* %8, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btMatrix3x3* %21, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds [3 x %struct.btQuadWord]* %22, i32 0, i32 1 ; [#uses=1]
- %24 = load %struct.btMatrix3x3** %other_addr, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btMatrix3x3* %24, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds [3 x %struct.btQuadWord]* %25, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %23, i32 0, i32 0 ; [#uses=4]
- %28 = getelementptr inbounds %struct.btQuadWord* %26, i32 0, i32 0 ; [#uses=4]
- %29 = getelementptr inbounds [4 x float]* %27, i32 0, i32 0 ; [#uses=1]
- %30 = getelementptr inbounds [4 x float]* %28, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds [4 x float]* %27, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds [4 x float]* %28, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds [4 x float]* %27, i32 0, i32 2 ; [#uses=1]
- %36 = getelementptr inbounds [4 x float]* %28, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds [4 x float]* %27, i32 0, i32 3 ; [#uses=1]
- %39 = getelementptr inbounds [4 x float]* %28, i32 0, i32 3 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btMatrix3x3* %41, i32 0, i32 0 ; [#uses=1]
- %43 = getelementptr inbounds [3 x %struct.btQuadWord]* %42, i32 0, i32 2 ; [#uses=1]
- %44 = load %struct.btMatrix3x3** %other_addr, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btMatrix3x3* %44, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds [3 x %struct.btQuadWord]* %45, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btQuadWord* %43, i32 0, i32 0 ; [#uses=4]
- %48 = getelementptr inbounds %struct.btQuadWord* %46, i32 0, i32 0 ; [#uses=4]
- %49 = getelementptr inbounds [4 x float]* %47, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds [4 x float]* %48, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds [4 x float]* %47, i32 0, i32 1 ; [#uses=1]
- %53 = getelementptr inbounds [4 x float]* %48, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds [4 x float]* %47, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds [4 x float]* %48, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 4
- %58 = getelementptr inbounds [4 x float]* %47, i32 0, i32 3 ; [#uses=1]
- %59 = getelementptr inbounds [4 x float]* %48, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- store %struct.btMatrix3x3* %61, %struct.btMatrix3x3** %0, align 4
- %62 = load %struct.btMatrix3x3** %0, align 4 ; [#uses=1]
- store %struct.btMatrix3x3* %62, %struct.btMatrix3x3** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btMatrix3x3** %retval ; [#uses=1]
- ret %struct.btMatrix3x3* %retval1
-}
-
-; [#uses=15]
-define linkonce_odr %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %this, i32 %i) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=2]
- %i_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca %struct.btQuadWord* ; [#uses=2]
- %0 = alloca %struct.btQuadWord* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store i32 %i, i32* %i_addr
- %1 = load i32* %i_addr, align 4 ; [#uses=1]
- %2 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds [3 x %struct.btQuadWord]* %3, i32 0, i32 %1 ; [#uses=1]
- store %struct.btQuadWord* %4, %struct.btQuadWord** %0, align 4
- %5 = load %struct.btQuadWord** %0, align 4 ; [#uses=1]
- store %struct.btQuadWord* %5, %struct.btQuadWord** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btQuadWord** %retval ; [#uses=1]
- ret %struct.btQuadWord* %retval1
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN11btMatrix3x38setValueERKfS1_S1_S1_S1_S1_S1_S1_S1_(%struct.btMatrix3x3* %this, float* %xx, float* %xy, float* %xz, float* %yx, float* %yy, float* %yz, float* %zx, float* %zy, float* %zz) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=4]
- %xx_addr = alloca float*, align 4 ; [#uses=2]
- %xy_addr = alloca float*, align 4 ; [#uses=2]
- %xz_addr = alloca float*, align 4 ; [#uses=2]
- %yx_addr = alloca float*, align 4 ; [#uses=2]
- %yy_addr = alloca float*, align 4 ; [#uses=2]
- %yz_addr = alloca float*, align 4 ; [#uses=2]
- %zx_addr = alloca float*, align 4 ; [#uses=2]
- %zy_addr = alloca float*, align 4 ; [#uses=2]
- %zz_addr = alloca float*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store float* %xx, float** %xx_addr
- store float* %xy, float** %xy_addr
- store float* %xz, float** %xz_addr
- store float* %yx, float** %yx_addr
- store float* %yy, float** %yy_addr
- store float* %yz, float** %yz_addr
- store float* %zx, float** %zx_addr
- store float* %zy, float** %zy_addr
- store float* %zz, float** %zz_addr
- %0 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btMatrix3x3* %0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds [3 x %struct.btQuadWord]* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load float** %xx_addr, align 4 ; [#uses=1]
- %4 = load float** %xy_addr, align 4 ; [#uses=1]
- %5 = load float** %xz_addr, align 4 ; [#uses=1]
- call void @_ZN9btVector38setValueERKfS1_S1_(%struct.btQuadWord* %2, float* %3, float* %4, float* %5) nounwind
- %6 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btMatrix3x3* %6, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds [3 x %struct.btQuadWord]* %7, i32 0, i32 1 ; [#uses=1]
- %9 = load float** %yx_addr, align 4 ; [#uses=1]
- %10 = load float** %yy_addr, align 4 ; [#uses=1]
- %11 = load float** %yz_addr, align 4 ; [#uses=1]
- call void @_ZN9btVector38setValueERKfS1_S1_(%struct.btQuadWord* %8, float* %9, float* %10, float* %11) nounwind
- %12 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btMatrix3x3* %12, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [3 x %struct.btQuadWord]* %13, i32 0, i32 2 ; [#uses=1]
- %15 = load float** %zx_addr, align 4 ; [#uses=1]
- %16 = load float** %zy_addr, align 4 ; [#uses=1]
- %17 = load float** %zz_addr, align 4 ; [#uses=1]
- call void @_ZN9btVector38setValueERKfS1_S1_(%struct.btQuadWord* %14, float* %15, float* %16, float* %17) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN11btMatrix3x3C1ERKfS1_S1_S1_S1_S1_S1_S1_S1_(%struct.btMatrix3x3* %this, float* %xx, float* %xy, float* %xz, float* %yx, float* %yy, float* %yz, float* %zx, float* %zy, float* %zz) align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=3]
- %xx_addr = alloca float*, align 4 ; [#uses=2]
- %xy_addr = alloca float*, align 4 ; [#uses=2]
- %xz_addr = alloca float*, align 4 ; [#uses=2]
- %yx_addr = alloca float*, align 4 ; [#uses=2]
- %yy_addr = alloca float*, align 4 ; [#uses=2]
- %yz_addr = alloca float*, align 4 ; [#uses=2]
- %zx_addr = alloca float*, align 4 ; [#uses=2]
- %zy_addr = alloca float*, align 4 ; [#uses=2]
- %zz_addr = alloca float*, align 4 ; [#uses=2]
- %0 = alloca i32 ; [#uses=4]
- %1 = alloca %struct.btQuadWord* ; [#uses=4]
- %2 = alloca %struct.btQuadWord* ; [#uses=3]
- %retval.42 = alloca %struct.btQuadWord* ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store float* %xx, float** %xx_addr
- store float* %xy, float** %xy_addr
- store float* %xz, float** %xz_addr
- store float* %yx, float** %yx_addr
- store float* %yy, float** %yy_addr
- store float* %yz, float** %yz_addr
- store float* %zx, float** %zx_addr
- store float* %zy, float** %zy_addr
- store float* %zz, float** %zz_addr
- %3 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds [3 x %struct.btQuadWord]* %4, i32 0, i32 0 ; [#uses=1]
- store %struct.btQuadWord* %5, %struct.btQuadWord** %2, align 4
- %6 = load %struct.btQuadWord** %2, align 4 ; [#uses=1]
- store %struct.btQuadWord* %6, %struct.btQuadWord** %1, align 4
- store i32 2, i32* %0, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %7 = load %struct.btQuadWord** %1, align 4 ; [#uses=1]
- call void @_ZN9btVector3C1Ev(%struct.btQuadWord* %7) nounwind
- %8 = load %struct.btQuadWord** %1, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %8, i64 1 ; [#uses=1]
- store %struct.btQuadWord* %9, %struct.btQuadWord** %1, align 4
- %10 = load i32* %0, align 4 ; [#uses=1]
- %11 = sub nsw i32 %10, 1 ; [#uses=1]
- store i32 %11, i32* %0, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %12 = load i32* %0, align 4 ; [#uses=1]
- %13 = icmp ne i32 %12, -1 ; [#uses=1]
- br i1 %13, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- %14 = load %struct.btQuadWord** %2, align 4 ; [#uses=1]
- store %struct.btQuadWord* %14, %struct.btQuadWord** %retval.42, align 4
- %15 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %16 = load float** %xx_addr, align 4 ; [#uses=1]
- %17 = load float** %xy_addr, align 4 ; [#uses=1]
- %18 = load float** %xz_addr, align 4 ; [#uses=1]
- %19 = load float** %yx_addr, align 4 ; [#uses=1]
- %20 = load float** %yy_addr, align 4 ; [#uses=1]
- %21 = load float** %yz_addr, align 4 ; [#uses=1]
- %22 = load float** %zx_addr, align 4 ; [#uses=1]
- %23 = load float** %zy_addr, align 4 ; [#uses=1]
- %24 = load float** %zz_addr, align 4 ; [#uses=1]
- call void @_ZN11btMatrix3x38setValueERKfS1_S1_S1_S1_S1_S1_S1_S1_(%struct.btMatrix3x3* %15, float* %16, float* %17, float* %18, float* %19, float* %20, float* %21, float* %22, float* %23, float* %24) nounwind
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN11btMatrix3x311setIdentityEv(%struct.btMatrix3x3* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=2]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %3 = alloca float ; [#uses=2]
- %4 = alloca float ; [#uses=2]
- %5 = alloca float ; [#uses=2]
- %6 = alloca float ; [#uses=2]
- %7 = alloca float ; [#uses=2]
- %8 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store float 1.000000e+00, float* %8, align 4
- store float 0.000000e+00, float* %7, align 4
- store float 0.000000e+00, float* %6, align 4
- store float 0.000000e+00, float* %5, align 4
- store float 1.000000e+00, float* %4, align 4
- store float 0.000000e+00, float* %3, align 4
- store float 0.000000e+00, float* %2, align 4
- store float 0.000000e+00, float* %1, align 4
- store float 1.000000e+00, float* %0, align 4
- %9 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- call void @_ZN11btMatrix3x38setValueERKfS1_S1_S1_S1_S1_S1_S1_S1_(%struct.btMatrix3x3* %9, float* %0, float* %1, float* %2, float* %3, float* %4, float* %5, float* %6, float* %7, float* %8) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr float @_ZNK11btMatrix3x35tdotxERK9btVector3(%struct.btMatrix3x3* %this, %struct.btQuadWord* %v) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=4]
- %v_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %retval = alloca float ; [#uses=2]
- %0 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store %struct.btQuadWord* %v, %struct.btQuadWord** %v_addr
- %1 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMatrix3x3* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [3 x %struct.btQuadWord]* %2, i32 0, i32 0 ; [#uses=1]
- %4 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %3) nounwind ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %7 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %6) nounwind ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %5, %8 ; [#uses=1]
- %10 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btMatrix3x3* %10, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds [3 x %struct.btQuadWord]* %11, i32 0, i32 1 ; [#uses=1]
- %13 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %12) nounwind ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %16 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %15) nounwind ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fmul float %14, %17 ; [#uses=1]
- %19 = fadd float %9, %18 ; [#uses=1]
- %20 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btMatrix3x3* %20, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds [3 x %struct.btQuadWord]* %21, i32 0, i32 2 ; [#uses=1]
- %23 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %22) nounwind ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %26 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %25) nounwind ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fmul float %24, %27 ; [#uses=1]
- %29 = fadd float %19, %28 ; [#uses=1]
- store float %29, float* %0, align 4
- %30 = load float* %0, align 4 ; [#uses=1]
- store float %30, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; [#uses=1]
- ret float %retval1
-}
-
-; [#uses=3]
-define linkonce_odr float @_ZNK11btMatrix3x35tdotyERK9btVector3(%struct.btMatrix3x3* %this, %struct.btQuadWord* %v) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=4]
- %v_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %retval = alloca float ; [#uses=2]
- %0 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store %struct.btQuadWord* %v, %struct.btQuadWord** %v_addr
- %1 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMatrix3x3* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [3 x %struct.btQuadWord]* %2, i32 0, i32 0 ; [#uses=1]
- %4 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %3) nounwind ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %7 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %6) nounwind ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %5, %8 ; [#uses=1]
- %10 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btMatrix3x3* %10, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds [3 x %struct.btQuadWord]* %11, i32 0, i32 1 ; [#uses=1]
- %13 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %12) nounwind ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %16 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %15) nounwind ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fmul float %14, %17 ; [#uses=1]
- %19 = fadd float %9, %18 ; [#uses=1]
- %20 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btMatrix3x3* %20, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds [3 x %struct.btQuadWord]* %21, i32 0, i32 2 ; [#uses=1]
- %23 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %22) nounwind ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %26 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %25) nounwind ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fmul float %24, %27 ; [#uses=1]
- %29 = fadd float %19, %28 ; [#uses=1]
- store float %29, float* %0, align 4
- %30 = load float* %0, align 4 ; [#uses=1]
- store float %30, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; [#uses=1]
- ret float %retval1
-}
-
-; [#uses=3]
-define linkonce_odr float @_ZNK11btMatrix3x35tdotzERK9btVector3(%struct.btMatrix3x3* %this, %struct.btQuadWord* %v) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=4]
- %v_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %retval = alloca float ; [#uses=2]
- %0 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- store %struct.btQuadWord* %v, %struct.btQuadWord** %v_addr
- %1 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMatrix3x3* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [3 x %struct.btQuadWord]* %2, i32 0, i32 0 ; [#uses=1]
- %4 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %3) nounwind ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %7 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %6) nounwind ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %5, %8 ; [#uses=1]
- %10 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btMatrix3x3* %10, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds [3 x %struct.btQuadWord]* %11, i32 0, i32 1 ; [#uses=1]
- %13 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %12) nounwind ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %16 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %15) nounwind ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fmul float %14, %17 ; [#uses=1]
- %19 = fadd float %9, %18 ; [#uses=1]
- %20 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btMatrix3x3* %20, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds [3 x %struct.btQuadWord]* %21, i32 0, i32 2 ; [#uses=1]
- %23 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %22) nounwind ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %26 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %25) nounwind ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fmul float %24, %27 ; [#uses=1]
- %29 = fadd float %19, %28 ; [#uses=1]
- store float %29, float* %0, align 4
- %30 = load float* %0, align 4 ; [#uses=1]
- store float %30, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; [#uses=1]
- ret float %retval1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK11btMatrix3x39transposeEv(%struct.btMatrix3x3* noalias sret %agg.result, %struct.btMatrix3x3* %this) inlinehint align 2 {
-entry:
- %memtmp = alloca %struct.btMatrix3x3* ; [#uses=2]
- %this_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=10]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %agg.result, %struct.btMatrix3x3** %memtmp
- store %struct.btMatrix3x3* %this, %struct.btMatrix3x3** %this_addr
- %0 = load %struct.btMatrix3x3** %memtmp, align 4 ; [#uses=1]
- %1 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMatrix3x3* %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds [3 x %struct.btQuadWord]* %2, i32 0, i32 2 ; [#uses=1]
- %4 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %3) nounwind ; [#uses=1]
- %5 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btMatrix3x3* %5, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds [3 x %struct.btQuadWord]* %6, i32 0, i32 1 ; [#uses=1]
- %8 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %7) nounwind ; [#uses=1]
- %9 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btMatrix3x3* %9, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds [3 x %struct.btQuadWord]* %10, i32 0, i32 0 ; [#uses=1]
- %12 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %11) nounwind ; [#uses=1]
- %13 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btMatrix3x3* %13, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds [3 x %struct.btQuadWord]* %14, i32 0, i32 2 ; [#uses=1]
- %16 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %15) nounwind ; [#uses=1]
- %17 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btMatrix3x3* %17, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds [3 x %struct.btQuadWord]* %18, i32 0, i32 1 ; [#uses=1]
- %20 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %19) nounwind ; [#uses=1]
- %21 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btMatrix3x3* %21, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds [3 x %struct.btQuadWord]* %22, i32 0, i32 0 ; [#uses=1]
- %24 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %23) nounwind ; [#uses=1]
- %25 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btMatrix3x3* %25, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds [3 x %struct.btQuadWord]* %26, i32 0, i32 2 ; [#uses=1]
- %28 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %27) nounwind ; [#uses=1]
- %29 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMatrix3x3* %29, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds [3 x %struct.btQuadWord]* %30, i32 0, i32 1 ; [#uses=1]
- %32 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %31) nounwind ; [#uses=1]
- %33 = load %struct.btMatrix3x3** %this_addr, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btMatrix3x3* %33, i32 0, i32 0 ; [#uses=1]
- %35 = getelementptr inbounds [3 x %struct.btQuadWord]* %34, i32 0, i32 0 ; [#uses=1]
- %36 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %35) nounwind ; [#uses=1]
- call void @_ZN11btMatrix3x3C1ERKfS1_S1_S1_S1_S1_S1_S1_S1_(%struct.btMatrix3x3* %0, float* %36, float* %32, float* %28, float* %24, float* %20, float* %16, float* %12, float* %8, float* %4)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZmlRK11btMatrix3x3RK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btMatrix3x3* %m, %struct.btQuadWord* %v) nounwind inlinehint {
-entry:
- %m_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=4]
- %v_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %m, %struct.btMatrix3x3** %m_addr
- store %struct.btQuadWord* %v, %struct.btQuadWord** %v_addr
- %3 = load %struct.btMatrix3x3** %m_addr, align 4 ; [#uses=1]
- %4 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %3, i32 2) nounwind ; [#uses=1]
- %5 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %6 = call float @_ZNK9btVector33dotERKS_(%struct.btQuadWord* %4, %struct.btQuadWord* %5) nounwind ; [#uses=1]
- store float %6, float* %2, align 4
- %7 = load %struct.btMatrix3x3** %m_addr, align 4 ; [#uses=1]
- %8 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %7, i32 1) nounwind ; [#uses=1]
- %9 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %10 = call float @_ZNK9btVector33dotERKS_(%struct.btQuadWord* %8, %struct.btQuadWord* %9) nounwind ; [#uses=1]
- store float %10, float* %1, align 4
- %11 = load %struct.btMatrix3x3** %m_addr, align 4 ; [#uses=1]
- %12 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %11, i32 0) nounwind ; [#uses=1]
- %13 = load %struct.btQuadWord** %v_addr, align 4 ; [#uses=1]
- %14 = call float @_ZNK9btVector33dotERKS_(%struct.btQuadWord* %12, %struct.btQuadWord* %13) nounwind ; [#uses=1]
- store float %14, float* %0, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %agg.result, float* %0, float* %1, float* %2) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZmlRK11btMatrix3x3S1_(%struct.btMatrix3x3* noalias sret %agg.result, %struct.btMatrix3x3* %m1, %struct.btMatrix3x3* %m2) inlinehint {
-entry:
- %memtmp = alloca %struct.btMatrix3x3* ; [#uses=2]
- %m1_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=10]
- %m2_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=10]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %3 = alloca float ; [#uses=2]
- %4 = alloca float ; [#uses=2]
- %5 = alloca float ; [#uses=2]
- %6 = alloca float ; [#uses=2]
- %7 = alloca float ; [#uses=2]
- %8 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btMatrix3x3* %agg.result, %struct.btMatrix3x3** %memtmp
- store %struct.btMatrix3x3* %m1, %struct.btMatrix3x3** %m1_addr
- store %struct.btMatrix3x3* %m2, %struct.btMatrix3x3** %m2_addr
- %9 = load %struct.btMatrix3x3** %memtmp, align 4 ; [#uses=1]
- %10 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %11 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %10, i32 2) nounwind ; [#uses=1]
- %12 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %13 = call float @_ZNK11btMatrix3x35tdotzERK9btVector3(%struct.btMatrix3x3* %12, %struct.btQuadWord* %11) nounwind ; [#uses=1]
- store float %13, float* %8, align 4
- %14 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %15 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %14, i32 2) nounwind ; [#uses=1]
- %16 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %17 = call float @_ZNK11btMatrix3x35tdotyERK9btVector3(%struct.btMatrix3x3* %16, %struct.btQuadWord* %15) nounwind ; [#uses=1]
- store float %17, float* %7, align 4
- %18 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %19 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %18, i32 2) nounwind ; [#uses=1]
- %20 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %21 = call float @_ZNK11btMatrix3x35tdotxERK9btVector3(%struct.btMatrix3x3* %20, %struct.btQuadWord* %19) nounwind ; [#uses=1]
- store float %21, float* %6, align 4
- %22 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %23 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %22, i32 1) nounwind ; [#uses=1]
- %24 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %25 = call float @_ZNK11btMatrix3x35tdotzERK9btVector3(%struct.btMatrix3x3* %24, %struct.btQuadWord* %23) nounwind ; [#uses=1]
- store float %25, float* %5, align 4
- %26 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %27 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %26, i32 1) nounwind ; [#uses=1]
- %28 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %29 = call float @_ZNK11btMatrix3x35tdotyERK9btVector3(%struct.btMatrix3x3* %28, %struct.btQuadWord* %27) nounwind ; [#uses=1]
- store float %29, float* %4, align 4
- %30 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %31 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %30, i32 1) nounwind ; [#uses=1]
- %32 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %33 = call float @_ZNK11btMatrix3x35tdotxERK9btVector3(%struct.btMatrix3x3* %32, %struct.btQuadWord* %31) nounwind ; [#uses=1]
- store float %33, float* %3, align 4
- %34 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %35 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %34, i32 0) nounwind ; [#uses=1]
- %36 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %37 = call float @_ZNK11btMatrix3x35tdotzERK9btVector3(%struct.btMatrix3x3* %36, %struct.btQuadWord* %35) nounwind ; [#uses=1]
- store float %37, float* %2, align 4
- %38 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %39 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %38, i32 0) nounwind ; [#uses=1]
- %40 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %41 = call float @_ZNK11btMatrix3x35tdotyERK9btVector3(%struct.btMatrix3x3* %40, %struct.btQuadWord* %39) nounwind ; [#uses=1]
- store float %41, float* %1, align 4
- %42 = load %struct.btMatrix3x3** %m1_addr, align 4 ; [#uses=1]
- %43 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %42, i32 0) nounwind ; [#uses=1]
- %44 = load %struct.btMatrix3x3** %m2_addr, align 4 ; [#uses=1]
- %45 = call float @_ZNK11btMatrix3x35tdotxERK9btVector3(%struct.btMatrix3x3* %44, %struct.btQuadWord* %43) nounwind ; [#uses=1]
- store float %45, float* %0, align 4
- call void @_ZN11btMatrix3x3C1ERKfS1_S1_S1_S1_S1_S1_S1_S1_(%struct.btMatrix3x3* %9, float* %0, float* %1, float* %2, float* %3, float* %4, float* %5, float* %6, float* %7, float* %8)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN11btTransformC1Ev(%struct.btTransform* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- %0 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN11btMatrix3x3C1Ev(%struct.btMatrix3x3* %1) nounwind
- %2 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %2, i32 0, i32 1 ; [#uses=1]
- call void @_ZN9btVector3C1Ev(%struct.btQuadWord* %3) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN11btTransformC1ERK11btMatrix3x3RK9btVector3(%struct.btTransform* %this, %struct.btMatrix3x3* %b, %struct.btQuadWord* %c) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %b_addr = alloca %struct.btMatrix3x3*, align 4 ; [#uses=2]
- %c_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- store %struct.btMatrix3x3* %b, %struct.btMatrix3x3** %b_addr
- store %struct.btQuadWord* %c, %struct.btQuadWord** %c_addr
- %0 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0 ; [#uses=1]
- %2 = load %struct.btMatrix3x3** %b_addr, align 4 ; [#uses=1]
- call void @_ZN11btMatrix3x3C1ERKS_(%struct.btMatrix3x3* %1, %struct.btMatrix3x3* %2) nounwind
- %3 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %3, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btQuadWord** %c_addr, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0 ; [#uses=4]
- %8 = getelementptr inbounds [4 x float]* %6, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds [4 x float]* %7, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds [4 x float]* %6, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds [4 x float]* %7, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds [4 x float]* %6, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds [4 x float]* %7, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds [4 x float]* %6, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds [4 x float]* %7, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN11btTransformC1ERKS_(%struct.btTransform* %this, %struct.btTransform* %other) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %other_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- store %struct.btTransform* %other, %struct.btTransform** %other_addr
- %0 = load %struct.btTransform** %other_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0 ; [#uses=1]
- %2 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %2, i32 0, i32 0 ; [#uses=1]
- call void @_ZN11btMatrix3x3C1ERKS_(%struct.btMatrix3x3* %3, %struct.btMatrix3x3* %1) nounwind
- %4 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %4, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btTransform** %other_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %6, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0 ; [#uses=4]
- %9 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0 ; [#uses=4]
- %10 = getelementptr inbounds [4 x float]* %8, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds [4 x float]* %9, i32 0, i32 0 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds [4 x float]* %8, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds [4 x float]* %9, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds [4 x float]* %8, i32 0, i32 2 ; [#uses=1]
- %17 = getelementptr inbounds [4 x float]* %9, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds [4 x float]* %8, i32 0, i32 3 ; [#uses=1]
- %20 = getelementptr inbounds [4 x float]* %9, i32 0, i32 3 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr %struct.btTransform* @_ZN11btTransformaSERKS_(%struct.btTransform* %this, %struct.btTransform* %other) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=4]
- %other_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %retval = alloca %struct.btTransform* ; [#uses=2]
- %0 = alloca %struct.btTransform* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- store %struct.btTransform* %other, %struct.btTransform** %other_addr
- %1 = load %struct.btTransform** %other_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %3, i32 0, i32 0 ; [#uses=1]
- %5 = call %struct.btMatrix3x3* @_ZN11btMatrix3x3aSERKS_(%struct.btMatrix3x3* %4, %struct.btMatrix3x3* %2) nounwind ; [#uses=0]
- %6 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %6, i32 0, i32 1 ; [#uses=1]
- %8 = load %struct.btTransform** %other_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %8, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0 ; [#uses=4]
- %11 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0 ; [#uses=4]
- %12 = getelementptr inbounds [4 x float]* %10, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds [4 x float]* %11, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds [4 x float]* %10, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds [4 x float]* %11, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds [4 x float]* %10, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds [4 x float]* %11, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds [4 x float]* %10, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds [4 x float]* %11, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- store %struct.btTransform* %24, %struct.btTransform** %0, align 4
- %25 = load %struct.btTransform** %0, align 4 ; [#uses=1]
- store %struct.btTransform* %25, %struct.btTransform** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btTransform** %retval ; [#uses=1]
- ret %struct.btTransform* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK11btTransformclERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btTransform* %this, %struct.btQuadWord* %x) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=7]
- %x_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=4]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- store %struct.btQuadWord* %x, %struct.btQuadWord** %x_addr
- %3 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %3, i32 0, i32 0 ; [#uses=1]
- %5 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %4, i32 2) nounwind ; [#uses=1]
- %6 = load %struct.btQuadWord** %x_addr, align 4 ; [#uses=1]
- %7 = call float @_ZNK9btVector33dotERKS_(%struct.btQuadWord* %5, %struct.btQuadWord* %6) nounwind ; [#uses=1]
- %8 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %8, i32 0, i32 1 ; [#uses=1]
- %10 = call float* @_ZNK9btVector31zEv(%struct.btQuadWord* %9) nounwind ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fadd float %7, %11 ; [#uses=1]
- store float %12, float* %2, align 4
- %13 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %13, i32 0, i32 0 ; [#uses=1]
- %15 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %14, i32 1) nounwind ; [#uses=1]
- %16 = load %struct.btQuadWord** %x_addr, align 4 ; [#uses=1]
- %17 = call float @_ZNK9btVector33dotERKS_(%struct.btQuadWord* %15, %struct.btQuadWord* %16) nounwind ; [#uses=1]
- %18 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %18, i32 0, i32 1 ; [#uses=1]
- %20 = call float* @_ZNK9btVector31yEv(%struct.btQuadWord* %19) nounwind ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %17, %21 ; [#uses=1]
- store float %22, float* %1, align 4
- %23 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %23, i32 0, i32 0 ; [#uses=1]
- %25 = call %struct.btQuadWord* @_ZNK11btMatrix3x3ixEi(%struct.btMatrix3x3* %24, i32 0) nounwind ; [#uses=1]
- %26 = load %struct.btQuadWord** %x_addr, align 4 ; [#uses=1]
- %27 = call float @_ZNK9btVector33dotERKS_(%struct.btQuadWord* %25, %struct.btQuadWord* %26) nounwind ; [#uses=1]
- %28 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %28, i32 0, i32 1 ; [#uses=1]
- %30 = call float* @_ZNK9btVector31xEv(%struct.btQuadWord* %29) nounwind ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fadd float %27, %31 ; [#uses=1]
- store float %32, float* %0, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %agg.result, float* %0, float* %1, float* %2) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr %struct.btQuadWord* @_ZN11btTransform9getOriginEv(%struct.btTransform* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=2]
- %retval = alloca %struct.btQuadWord* ; [#uses=2]
- %0 = alloca %struct.btQuadWord* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- %1 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 1 ; [#uses=1]
- store %struct.btQuadWord* %2, %struct.btQuadWord** %0, align 4
- %3 = load %struct.btQuadWord** %0, align 4 ; [#uses=1]
- store %struct.btQuadWord* %3, %struct.btQuadWord** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btQuadWord** %retval ; [#uses=1]
- ret %struct.btQuadWord* %retval1
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN11btTransform9setOriginERK9btVector3(%struct.btTransform* %this, %struct.btQuadWord* %origin) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=2]
- %origin_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- store %struct.btQuadWord* %origin, %struct.btQuadWord** %origin_addr
- %0 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1 ; [#uses=1]
- %2 = load %struct.btQuadWord** %origin_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0 ; [#uses=4]
- %5 = getelementptr inbounds [4 x float]* %3, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds [4 x float]* %4, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds [4 x float]* %3, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds [4 x float]* %4, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds [4 x float]* %3, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds [4 x float]* %4, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds [4 x float]* %3, i32 0, i32 3 ; [#uses=1]
- %15 = getelementptr inbounds [4 x float]* %4, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN11btTransform11setIdentityEv(%struct.btTransform* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %0 = alloca float ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- %3 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %3, i32 0, i32 0 ; [#uses=1]
- call void @_ZN11btMatrix3x311setIdentityEv(%struct.btMatrix3x3* %4) nounwind
- store float 0.000000e+00, float* %2, align 4
- store float 0.000000e+00, float* %1, align 4
- store float 0.000000e+00, float* %0, align 4
- %5 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %5, i32 0, i32 1 ; [#uses=1]
- call void @_ZN9btVector38setValueERKfS1_S1_(%struct.btQuadWord* %6, float* %0, float* %1, float* %2) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK11btTransform7inverseEv(%struct.btTransform* noalias sret %agg.result, %struct.btTransform* %this) align 2 {
-entry:
- %memtmp = alloca %struct.btTransform* ; [#uses=2]
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %0 = alloca %struct.btQuadWord ; [#uses=2]
- %1 = alloca %struct.btQuadWord ; [#uses=2]
- %inv = alloca %struct.btMatrix3x3 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %agg.result, %struct.btTransform** %memtmp
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- %2 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %2, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x39transposeEv(%struct.btMatrix3x3* noalias sret %inv, %struct.btMatrix3x3* %3)
- %4 = load %struct.btTransform** %memtmp, align 4 ; [#uses=1]
- %5 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %5, i32 0, i32 1 ; [#uses=1]
- call void @_ZngRK9btVector3(%struct.btQuadWord* noalias sret %0, %struct.btQuadWord* %6) nounwind
- call void @_ZmlRK11btMatrix3x3RK9btVector3(%struct.btQuadWord* noalias sret %1, %struct.btMatrix3x3* %inv, %struct.btQuadWord* %0) nounwind
- call void @_ZN11btTransformC1ERK11btMatrix3x3RK9btVector3(%struct.btTransform* %4, %struct.btMatrix3x3* %inv, %struct.btQuadWord* %1) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZNK11btTransformmlERKS_(%struct.btTransform* noalias sret %agg.result, %struct.btTransform* %this, %struct.btTransform* %t) inlinehint align 2 {
-entry:
- %memtmp = alloca %struct.btTransform* ; [#uses=2]
- %this_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %t_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %0 = alloca %struct.btMatrix3x3 ; [#uses=2]
- %1 = alloca %struct.btQuadWord ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTransform* %agg.result, %struct.btTransform** %memtmp
- store %struct.btTransform* %this, %struct.btTransform** %this_addr
- store %struct.btTransform* %t, %struct.btTransform** %t_addr
- %2 = load %struct.btTransform** %memtmp, align 4 ; [#uses=1]
- %3 = load %struct.btTransform** %t_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %3, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- call void @_ZNK11btTransformclERK9btVector3(%struct.btQuadWord* noalias sret %1, %struct.btTransform* %5, %struct.btQuadWord* %4) nounwind
- %6 = load %struct.btTransform** %t_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load %struct.btTransform** %this_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %8, i32 0, i32 0 ; [#uses=1]
- call void @_ZmlRK11btMatrix3x3S1_(%struct.btMatrix3x3* noalias sret %0, %struct.btMatrix3x3* %9, %struct.btMatrix3x3* %7)
- call void @_ZN11btTransformC1ERK11btMatrix3x3RK9btVector3(%struct.btTransform* %2, %struct.btMatrix3x3* %0, %struct.btQuadWord* %1) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr i8* @_ZnwjPv(i32 %unnamed_arg, i8* %__p) nounwind inlinehint {
-entry:
- %unnamed_arg_addr = alloca i32, align 4 ; [#uses=1]
- %__p_addr = alloca i8*, align 4 ; [#uses=2]
- %retval = alloca i8* ; [#uses=2]
- %0 = alloca i8* ; [#uses=4]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i32 %unnamed_arg, i32* %unnamed_arg_addr
- store i8* %__p, i8** %__p_addr
- %1 = load i8** %__p_addr, align 4 ; [#uses=1]
- store i8* %1, i8** %0, align 4
- %2 = load i8** %0, align 4 ; [#uses=1]
- store i8* %2, i8** %0, align 4
- %3 = load i8** %0, align 4 ; [#uses=1]
- store i8* %3, i8** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i8** %retval ; [#uses=1]
- ret i8* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK17btCollisionObject15getInternalTypeEv(%struct.btCollisionObject* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btCollisionObject*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btCollisionObject* %this, %struct.btCollisionObject** %this_addr
- %1 = load %struct.btCollisionObject** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionObject* %1, i32 0, i32 19 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=2]
-define linkonce_odr %"struct.btAlignedObjectArray<btCollisionObject*>"* @_ZN16btCollisionWorld23getCollisionObjectArrayEv(%struct.btCollisionWorld* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btCollisionWorld*, align 4 ; [#uses=2]
- %retval = alloca %"struct.btAlignedObjectArray<btCollisionObject*>"* ; [#uses=2]
- %0 = alloca %"struct.btAlignedObjectArray<btCollisionObject*>"* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btCollisionWorld* %this, %struct.btCollisionWorld** %this_addr
- %1 = load %struct.btCollisionWorld** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionWorld* %1, i32 0, i32 1 ; [#uses=1]
- store %"struct.btAlignedObjectArray<btCollisionObject*>"* %2, %"struct.btAlignedObjectArray<btCollisionObject*>"** %0, align 4
- %3 = load %"struct.btAlignedObjectArray<btCollisionObject*>"** %0, align 4 ; [#uses=1]
- store %"struct.btAlignedObjectArray<btCollisionObject*>"* %3, %"struct.btAlignedObjectArray<btCollisionObject*>"** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %"struct.btAlignedObjectArray<btCollisionObject*>"** %retval ; [#uses=1]
- ret %"struct.btAlignedObjectArray<btCollisionObject*>"* %retval1
-}
-
-; [#uses=4]
-define linkonce_odr float @_ZNK21btConvexInternalShape9getMarginEv(%struct.btConvexInternalShape* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btConvexInternalShape*, align 4 ; [#uses=2]
- %retval = alloca float ; [#uses=2]
- %0 = alloca float ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btConvexInternalShape* %this, %struct.btConvexInternalShape** %this_addr
- %1 = load %struct.btConvexInternalShape** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btConvexInternalShape* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %0, align 4
- %4 = load float* %0, align 4 ; [#uses=1]
- store float %4, float* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load float* %retval ; [#uses=1]
- ret float %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK9btHashInt7getUid1Ev(%struct.btHashInt* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btHashInt*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btHashInt* %this, %struct.btHashInt** %this_addr
- %1 = load %struct.btHashInt** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btHashInt* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK17btTriangleInfoMap28calculateSerializeBufferSizeEv(%struct.btTriangleInfoMap* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTriangleInfoMap*, align 4 ; [#uses=1]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTriangleInfoMap* %this, %struct.btTriangleInfoMap** %this_addr
- store i32 56, i32* %0, align 4
- %1 = load i32* %0, align 4 ; [#uses=1]
- store i32 %1, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btDefaultCollisionConstructionInfoC1Ev(%struct.btDefaultCollisionConstructionInfo* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btDefaultCollisionConstructionInfo*, align 4 ; [#uses=9]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btDefaultCollisionConstructionInfo* %this, %struct.btDefaultCollisionConstructionInfo** %this_addr
- %0 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 0 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %1, align 4
- %2 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %2, i32 0, i32 1 ; [#uses=1]
- store %struct.btPoolAllocator* null, %struct.btPoolAllocator** %3, align 4
- %4 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %4, i32 0, i32 2 ; [#uses=1]
- store %struct.btPoolAllocator* null, %struct.btPoolAllocator** %5, align 4
- %6 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %6, i32 0, i32 3 ; [#uses=1]
- store i32 4096, i32* %7, align 4
- %8 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %8, i32 0, i32 4 ; [#uses=1]
- store i32 4096, i32* %9, align 4
- %10 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %10, i32 0, i32 5 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %12, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = load %struct.btDefaultCollisionConstructionInfo** %this_addr, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %14, i32 0, i32 7 ; [#uses=1]
- store i32 1, i32* %15, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btMotionStateC2Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btActionInterface*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btActionInterface* %this, %struct.btActionInterface** %this_addr
- %0 = load %struct.btActionInterface** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btActionInterface* %0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV13btMotionState, i32 0, i32 2), i32 (...)*** %1, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btMotionStateD1Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btActionInterface*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btActionInterface* %this, %struct.btActionInterface** %this_addr
- %0 = load %struct.btActionInterface** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btActionInterface* %0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV13btMotionState, i32 0, i32 2), i32 (...)*** %1, align 4
- br label %bb
-
-bb: ; preds = %entry
- %2 = trunc i32 0 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %3 = load %struct.btActionInterface** %this_addr, align 4 ; [#uses=1]
- %4 = bitcast %struct.btActionInterface* %3 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %4) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btMotionStateD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btActionInterface*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btActionInterface* %this, %struct.btActionInterface** %this_addr
- %0 = load %struct.btActionInterface** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btActionInterface* %0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV13btMotionState, i32 0, i32 2), i32 (...)*** %1, align 4
- br label %bb
-
-bb: ; preds = %entry
- %2 = trunc i32 1 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %3 = load %struct.btActionInterface** %this_addr, align 4 ; [#uses=1]
- %4 = bitcast %struct.btActionInterface* %3 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %4) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-declare void @__cxa_pure_virtual() nounwind
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btDefaultMotionStateC1ERK11btTransformS2_(%struct.btDefaultMotionState* %this, %struct.btTransform* %startTrans, %struct.btTransform* %centerOfMassOffset) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btDefaultMotionState*, align 4 ; [#uses=7]
- %startTrans_addr = alloca %struct.btTransform*, align 4 ; [#uses=3]
- %centerOfMassOffset_addr = alloca %struct.btTransform*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btDefaultMotionState* %this, %struct.btDefaultMotionState** %this_addr
- store %struct.btTransform* %startTrans, %struct.btTransform** %startTrans_addr
- store %struct.btTransform* %centerOfMassOffset, %struct.btTransform** %centerOfMassOffset_addr
- %0 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDefaultMotionState* %0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN13btMotionStateC2Ev(%struct.btActionInterface* %1) nounwind
- %2 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btDefaultMotionState* %2, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btActionInterface* %3, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV20btDefaultMotionState, i32 0, i32 2), i32 (...)*** %4, align 4
- %5 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btDefaultMotionState* %5, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btTransform** %startTrans_addr, align 4 ; [#uses=1]
- call void @_ZN11btTransformC1ERKS_(%struct.btTransform* %6, %struct.btTransform* %7) nounwind
- %8 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btDefaultMotionState* %8, i32 0, i32 2 ; [#uses=1]
- %10 = load %struct.btTransform** %centerOfMassOffset_addr, align 4 ; [#uses=1]
- call void @_ZN11btTransformC1ERKS_(%struct.btTransform* %9, %struct.btTransform* %10) nounwind
- %11 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btDefaultMotionState* %11, i32 0, i32 3 ; [#uses=1]
- %13 = load %struct.btTransform** %startTrans_addr, align 4 ; [#uses=1]
- call void @_ZN11btTransformC1ERKS_(%struct.btTransform* %12, %struct.btTransform* %13) nounwind
- %14 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btDefaultMotionState* %14, i32 0, i32 4 ; [#uses=1]
- store i8* null, i8** %15, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btDefaultMotionStateD1Ev(%struct.btDefaultMotionState* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btDefaultMotionState*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btDefaultMotionState* %this, %struct.btDefaultMotionState** %this_addr
- %0 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDefaultMotionState* %0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV20btDefaultMotionState, i32 0, i32 2), i32 (...)*** %2, align 4
- br label %bb
-
-bb: ; preds = %entry
- %3 = trunc i32 0 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %3, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %4 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDefaultMotionState* %4 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %5) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btDefaultMotionStateD0Ev(%struct.btDefaultMotionState* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btDefaultMotionState*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btDefaultMotionState* %this, %struct.btDefaultMotionState** %this_addr
- %0 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDefaultMotionState* %0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV20btDefaultMotionState, i32 0, i32 2), i32 (...)*** %2, align 4
- br label %bb
-
-bb: ; preds = %entry
- %3 = trunc i32 1 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %3, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %4 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDefaultMotionState* %4 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %5) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btDefaultMotionState17getWorldTransformER11btTransform(%struct.btDefaultMotionState* %this, %struct.btTransform* %centerOfMassWorldTrans) align 2 {
-entry:
- %this_addr = alloca %struct.btDefaultMotionState*, align 4 ; [#uses=3]
- %centerOfMassWorldTrans_addr = alloca %struct.btTransform*, align 4 ; [#uses=2]
- %0 = alloca %struct.btTransform ; [#uses=2]
- %1 = alloca %struct.btTransform ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btDefaultMotionState* %this, %struct.btDefaultMotionState** %this_addr
- store %struct.btTransform* %centerOfMassWorldTrans, %struct.btTransform** %centerOfMassWorldTrans_addr
- %2 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btDefaultMotionState* %2, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btDefaultMotionState* %4, i32 0, i32 2 ; [#uses=1]
- call void @_ZNK11btTransform7inverseEv(%struct.btTransform* noalias sret %0, %struct.btTransform* %5)
- call void @_ZNK11btTransformmlERKS_(%struct.btTransform* noalias sret %1, %struct.btTransform* %0, %struct.btTransform* %3)
- %6 = load %struct.btTransform** %centerOfMassWorldTrans_addr, align 4 ; [#uses=1]
- %7 = call %struct.btTransform* @_ZN11btTransformaSERKS_(%struct.btTransform* %6, %struct.btTransform* %1) nounwind ; [#uses=0]
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btDefaultMotionState17setWorldTransformERK11btTransform(%struct.btDefaultMotionState* %this, %struct.btTransform* %centerOfMassWorldTrans) align 2 {
-entry:
- %this_addr = alloca %struct.btDefaultMotionState*, align 4 ; [#uses=3]
- %centerOfMassWorldTrans_addr = alloca %struct.btTransform*, align 4 ; [#uses=2]
- %0 = alloca %struct.btTransform ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btDefaultMotionState* %this, %struct.btDefaultMotionState** %this_addr
- store %struct.btTransform* %centerOfMassWorldTrans, %struct.btTransform** %centerOfMassWorldTrans_addr
- %1 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btDefaultMotionState* %1, i32 0, i32 2 ; [#uses=1]
- %3 = load %struct.btTransform** %centerOfMassWorldTrans_addr, align 4 ; [#uses=1]
- call void @_ZNK11btTransformmlERKS_(%struct.btTransform* noalias sret %0, %struct.btTransform* %3, %struct.btTransform* %2)
- %4 = load %struct.btDefaultMotionState** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btDefaultMotionState* %4, i32 0, i32 1 ; [#uses=1]
- %6 = call %struct.btTransform* @_ZN11btTransformaSERKS_(%struct.btTransform* %5, %struct.btTransform* %0) nounwind ; [#uses=0]
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN11btRigidBody27btRigidBodyConstructionInfoC1EfP13btMotionStateP16btCollisionShapeRK9btVector3(%"struct.btRigidBody::btRigidBodyConstructionInfo"* %this, float %mass, %struct.btActionInterface* %motionState, %struct.btCollisionShape* %collisionShape, %struct.btQuadWord* %localInertia) nounwind align 2 {
-entry:
- %this_addr = alloca %"struct.btRigidBody::btRigidBodyConstructionInfo"*, align 4 ; [#uses=18]
- %mass_addr = alloca float, align 4 ; [#uses=2]
- %motionState_addr = alloca %struct.btActionInterface*, align 4 ; [#uses=2]
- %collisionShape_addr = alloca %struct.btCollisionShape*, align 4 ; [#uses=2]
- %localInertia_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btRigidBody::btRigidBodyConstructionInfo"* %this, %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr
- store float %mass, float* %mass_addr
- store %struct.btActionInterface* %motionState, %struct.btActionInterface** %motionState_addr
- store %struct.btCollisionShape* %collisionShape, %struct.btCollisionShape** %collisionShape_addr
- store %struct.btQuadWord* %localInertia, %struct.btQuadWord** %localInertia_addr
- %0 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %mass_addr, align 4 ; [#uses=1]
- store float %2, float* %1, align 4
- %3 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %3, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btActionInterface** %motionState_addr, align 4 ; [#uses=1]
- store %struct.btActionInterface* %5, %struct.btActionInterface** %4, align 4
- %6 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %6, i32 0, i32 2 ; [#uses=1]
- call void @_ZN11btTransformC1Ev(%struct.btTransform* %7) nounwind
- %8 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %8, i32 0, i32 3 ; [#uses=1]
- %10 = load %struct.btCollisionShape** %collisionShape_addr, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %10, %struct.btCollisionShape** %9, align 4
- %11 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %11, i32 0, i32 4 ; [#uses=1]
- %13 = load %struct.btQuadWord** %localInertia_addr, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btQuadWord* %13, i32 0, i32 0 ; [#uses=4]
- %16 = getelementptr inbounds [4 x float]* %14, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds [4 x float]* %15, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds [4 x float]* %14, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds [4 x float]* %15, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds [4 x float]* %14, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds [4 x float]* %15, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds [4 x float]* %14, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds [4 x float]* %15, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %28, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %30, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %32, i32 0, i32 7 ; [#uses=1]
- store float 5.000000e-01, float* %33, align 4
- %34 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %34, i32 0, i32 8 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %36, i32 0, i32 9 ; [#uses=1]
- store float 0x3FE99999A0000000, float* %37, align 4
- %38 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %38, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %39, align 4
- %40 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %40, i32 0, i32 11 ; [#uses=1]
- store i8 0, i8* %41, align 4
- %42 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %42, i32 0, i32 12 ; [#uses=1]
- store float 0x3F747AE140000000, float* %43, align 4
- %44 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %44, i32 0, i32 13 ; [#uses=1]
- store float 0x3F847AE140000000, float* %45, align 4
- %46 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %46, i32 0, i32 14 ; [#uses=1]
- store float 0x3F847AE140000000, float* %47, align 4
- %48 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %48, i32 0, i32 15 ; [#uses=1]
- store float 0x3F847AE140000000, float* %49, align 4
- %50 = load %"struct.btRigidBody::btRigidBodyConstructionInfo"** %this_addr, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %50, i32 0, i32 2 ; [#uses=1]
- call void @_ZN11btTransform11setIdentityEv(%struct.btTransform* %51) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr %struct.btRigidBody* @_ZN11btRigidBody6upcastEP17btCollisionObject(%struct.btCollisionObject* %colObj) nounwind {
-entry:
- %colObj_addr = alloca %struct.btCollisionObject*, align 4 ; [#uses=3]
- %retval = alloca %struct.btRigidBody* ; [#uses=2]
- %0 = alloca %struct.btRigidBody* ; [#uses=3]
- %retval.413 = alloca i8 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btCollisionObject* %colObj, %struct.btCollisionObject** %colObj_addr
- %1 = load %struct.btCollisionObject** %colObj_addr, align 4 ; [#uses=1]
- %2 = call i32 @_ZNK17btCollisionObject15getInternalTypeEv(%struct.btCollisionObject* %1) nounwind ; [#uses=1]
- %3 = and i32 %2, 2 ; [#uses=1]
- %4 = icmp ne i32 %3, 0 ; [#uses=1]
- %5 = zext i1 %4 to i8 ; [#uses=1]
- store i8 %5, i8* %retval.413, align 1
- %6 = load i8* %retval.413, align 1 ; [#uses=1]
- %toBool = icmp ne i8 %6, 0 ; [#uses=1]
- br i1 %toBool, label %bb, label %bb1
-
-bb: ; preds = %entry
- %7 = load %struct.btCollisionObject** %colObj_addr, align 4 ; [#uses=1]
- %8 = bitcast %struct.btCollisionObject* %7 to %struct.btRigidBody* ; [#uses=1]
- store %struct.btRigidBody* %8, %struct.btRigidBody** %0, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- store %struct.btRigidBody* null, %struct.btRigidBody** %0, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %9 = load %struct.btRigidBody** %0, align 4 ; [#uses=1]
- store %struct.btRigidBody* %9, %struct.btRigidBody** %retval, align 4
- br label %return
-
-return: ; preds = %bb2
- %retval3 = load %struct.btRigidBody** %retval ; [#uses=1]
- ret %struct.btRigidBody* %retval3
-}
-
-; [#uses=4]
-define linkonce_odr %struct.btActionInterface* @_ZN11btRigidBody14getMotionStateEv(%struct.btRigidBody* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btRigidBody*, align 4 ; [#uses=2]
- %retval = alloca %struct.btActionInterface* ; [#uses=2]
- %0 = alloca %struct.btActionInterface* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btRigidBody* %this, %struct.btRigidBody** %this_addr
- %1 = load %struct.btRigidBody** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 20 ; [#uses=1]
- %3 = load %struct.btActionInterface** %2, align 4 ; [#uses=1]
- store %struct.btActionInterface* %3, %struct.btActionInterface** %0, align 4
- %4 = load %struct.btActionInterface** %0, align 4 ; [#uses=1]
- store %struct.btActionInterface* %4, %struct.btActionInterface** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btActionInterface** %retval ; [#uses=1]
- ret %struct.btActionInterface* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTypedConstraint13buildJacobianEv(%struct.btTypedConstraint* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTypedConstraint*, align 4 ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTypedConstraint* %this, %struct.btTypedConstraint** %this_addr
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTypedConstraint21setupSolverConstraintER20btAlignedObjectArrayI18btSolverConstraintEiif(%struct.btTypedConstraint* %this, %struct.btConstraintArray* %ca, i32 %solverBodyA, i32 %solverBodyB, float %timeStep) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTypedConstraint*, align 4 ; [#uses=1]
- %ca_addr = alloca %struct.btConstraintArray*, align 4 ; [#uses=1]
- %solverBodyA_addr = alloca i32, align 4 ; [#uses=1]
- %solverBodyB_addr = alloca i32, align 4 ; [#uses=1]
- %timeStep_addr = alloca float, align 4 ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTypedConstraint* %this, %struct.btTypedConstraint** %this_addr
- store %struct.btConstraintArray* %ca, %struct.btConstraintArray** %ca_addr
- store i32 %solverBodyA, i32* %solverBodyA_addr
- store i32 %solverBodyB, i32* %solverBodyB_addr
- store float %timeStep, float* %timeStep_addr
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTypedConstraint23solveConstraintObsoleteER11btRigidBodyS1_f(%struct.btTypedConstraint* %this, %struct.btRigidBody* %unnamed_arg, %struct.btRigidBody* %unnamed_arg2, float %unnamed_arg4) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTypedConstraint*, align 4 ; [#uses=1]
- %unnamed_arg_addr = alloca %struct.btRigidBody*, align 4 ; [#uses=1]
- %unnamed_arg_addr1 = alloca %struct.btRigidBody*, align 4 ; [#uses=1]
- %unnamed_arg_addr3 = alloca float, align 4 ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTypedConstraint* %this, %struct.btTypedConstraint** %this_addr
- store %struct.btRigidBody* %unnamed_arg, %struct.btRigidBody** %unnamed_arg_addr
- store %struct.btRigidBody* %unnamed_arg2, %struct.btRigidBody** %unnamed_arg_addr1
- store float %unnamed_arg4, float* %unnamed_arg_addr3
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK17btTypedConstraint28calculateSerializeBufferSizeEv(%struct.btTypedConstraint* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTypedConstraint*, align 4 ; [#uses=1]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTypedConstraint* %this, %struct.btTypedConstraint** %this_addr
- store i32 44, i32* %0, align 4
- %1 = load i32* %0, align 4 ; [#uses=1]
- store i32 %1, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4sizeEv(%"struct.btAlignedObjectArray<btCollisionObject*>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionObject*>"*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, %"struct.btAlignedObjectArray<btCollisionObject*>"** %this_addr
- %1 = load %"struct.btAlignedObjectArray<btCollisionObject*>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %1, i32 0, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=2]
-define linkonce_odr i32 @_ZNK16btCollisionWorld22getNumCollisionObjectsEv(%struct.btCollisionWorld* %this) align 2 {
-entry:
- %this_addr = alloca %struct.btCollisionWorld*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btCollisionWorld* %this, %struct.btCollisionWorld** %this_addr
- %1 = load %struct.btCollisionWorld** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionWorld* %1, i32 0, i32 1 ; [#uses=1]
- %3 = call i32 @_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4sizeEv(%"struct.btAlignedObjectArray<btCollisionObject*>"* %2) nounwind ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=3]
-define linkonce_odr i32 @_ZNK20btAlignedObjectArrayIiE4sizeEv(%"struct.btAlignedObjectArray<int>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<int>"*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<int>"* %this, %"struct.btAlignedObjectArray<int>"** %this_addr
- %1 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %1, i32 0, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=6]
-define linkonce_odr i32* @_ZNK20btAlignedObjectArrayIiEixEi(%"struct.btAlignedObjectArray<int>"* %this, i32 %n) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<int>"*, align 4 ; [#uses=2]
- %n_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca i32* ; [#uses=2]
- %0 = alloca i32* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<int>"* %this, %"struct.btAlignedObjectArray<int>"** %this_addr
- store i32 %n, i32* %n_addr
- %1 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load i32** %2, align 4 ; [#uses=1]
- %4 = load i32* %n_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32* %3, i32 %4 ; [#uses=1]
- store i32* %5, i32** %0, align 4
- %6 = load i32** %0, align 4 ; [#uses=1]
- store i32* %6, i32** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32** %retval ; [#uses=1]
- ret i32* %retval1
-}
-
-; [#uses=2]
-define linkonce_odr i32 @_ZNK20btAlignedObjectArrayI14btTriangleInfoE4sizeEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr
- %1 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %1, i32 0, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=6]
-define linkonce_odr %struct.btTriangleInfo* @_ZNK20btAlignedObjectArrayI14btTriangleInfoEixEi(%"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 %n) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"*, align 4 ; [#uses=2]
- %n_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca %struct.btTriangleInfo* ; [#uses=2]
- %0 = alloca %struct.btTriangleInfo* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr
- store i32 %n, i32* %n_addr
- %1 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btTriangleInfo** %2, align 4 ; [#uses=1]
- %4 = load i32* %n_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTriangleInfo* %3, i32 %4 ; [#uses=1]
- store %struct.btTriangleInfo* %5, %struct.btTriangleInfo** %0, align 4
- %6 = load %struct.btTriangleInfo** %0, align 4 ; [#uses=1]
- store %struct.btTriangleInfo* %6, %struct.btTriangleInfo** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btTriangleInfo** %retval ; [#uses=1]
- ret %struct.btTriangleInfo* %retval1
-}
-
-; [#uses=2]
-define linkonce_odr i32 @_ZNK20btAlignedObjectArrayI9btHashIntE4sizeEv(%"struct.btAlignedObjectArray<btHashInt>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btHashInt>"*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btHashInt>"* %this, %"struct.btAlignedObjectArray<btHashInt>"** %this_addr
- %1 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %1, i32 0, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=3]
-define linkonce_odr %struct.btHashInt* @_ZNK20btAlignedObjectArrayI9btHashIntEixEi(%"struct.btAlignedObjectArray<btHashInt>"* %this, i32 %n) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btHashInt>"*, align 4 ; [#uses=2]
- %n_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca %struct.btHashInt* ; [#uses=2]
- %0 = alloca %struct.btHashInt* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btHashInt>"* %this, %"struct.btAlignedObjectArray<btHashInt>"** %this_addr
- store i32 %n, i32* %n_addr
- %1 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btHashInt** %2, align 4 ; [#uses=1]
- %4 = load i32* %n_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btHashInt* %3, i32 %4 ; [#uses=1]
- store %struct.btHashInt* %5, %struct.btHashInt** %0, align 4
- %6 = load %struct.btHashInt** %0, align 4 ; [#uses=1]
- store %struct.btHashInt* %6, %struct.btHashInt** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btHashInt** %retval ; [#uses=1]
- ret %struct.btHashInt* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK17btTriangleInfoMap9serializeEPvP12btSerializer(%struct.btTriangleInfoMap* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %this_addr = alloca %struct.btTriangleInfoMap*, align 4 ; [#uses=25]
- %dataBuffer_addr = alloca i8*, align 4 ; [#uses=2]
- %serializer_addr = alloca %struct.btActionInterface*, align 4 ; [#uses=25]
- %retval = alloca i8* ; [#uses=2]
- %0 = alloca i8* ; [#uses=2]
- %iftmp.303 = alloca i32* ; [#uses=3]
- %iftmp.301 = alloca %struct.btTriangleInfo* ; [#uses=3]
- %iftmp.299 = alloca i32* ; [#uses=3]
- %iftmp.297 = alloca i32* ; [#uses=3]
- %tmapData = alloca %struct.btTriangleInfoMapData* ; [#uses=26]
- %sz = alloca i32 ; [#uses=2]
- %numElem = alloca i32 ; [#uses=3]
- %chunk = alloca %struct.btChunk* ; [#uses=3]
- %memPtr = alloca i32* ; [#uses=4]
- %i = alloca i32 ; [#uses=5]
- %sz12 = alloca i32 ; [#uses=2]
- %numElem13 = alloca i32 ; [#uses=3]
- %chunk14 = alloca %struct.btChunk* ; [#uses=3]
- %memPtr15 = alloca i32* ; [#uses=4]
- %i16 = alloca i32 ; [#uses=5]
- %sz25 = alloca i32 ; [#uses=2]
- %numElem26 = alloca i32 ; [#uses=3]
- %chunk27 = alloca %struct.btChunk* ; [#uses=3]
- %memPtr28 = alloca %struct.btTriangleInfo* ; [#uses=7]
- %i29 = alloca i32 ; [#uses=8]
- %sz38 = alloca i32 ; [#uses=2]
- %numElem39 = alloca i32 ; [#uses=3]
- %chunk40 = alloca %struct.btChunk* ; [#uses=3]
- %memPtr41 = alloca i32* ; [#uses=4]
- %i42 = alloca i32 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTriangleInfoMap* %this, %struct.btTriangleInfoMap** %this_addr
- store i8* %dataBuffer, i8** %dataBuffer_addr
- store %struct.btActionInterface* %serializer, %struct.btActionInterface** %serializer_addr
- %1 = load i8** %dataBuffer_addr, align 4 ; [#uses=1]
- %2 = bitcast i8* %1 to %struct.btTriangleInfoMapData* ; [#uses=1]
- store %struct.btTriangleInfoMapData* %2, %struct.btTriangleInfoMapData** %tmapData, align 4
- %3 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleInfoMap* %3, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleInfoMapData* %6, i32 0, i32 4 ; [#uses=1]
- store float %5, float* %7, align 4
- %8 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTriangleInfoMap* %8, i32 0, i32 3 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTriangleInfoMapData* %11, i32 0, i32 5 ; [#uses=1]
- store float %10, float* %12, align 4
- %13 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTriangleInfoMap* %13, i32 0, i32 4 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTriangleInfoMapData* %16, i32 0, i32 6 ; [#uses=1]
- store float %15, float* %17, align 4
- %18 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTriangleInfoMap* %18, i32 0, i32 5 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTriangleInfoMapData* %21, i32 0, i32 7 ; [#uses=1]
- store float %20, float* %22, align 4
- %23 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTriangleInfoMap* %23, i32 0, i32 6 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTriangleInfoMapData* %26, i32 0, i32 8 ; [#uses=1]
- store float %25, float* %27, align 4
- %28 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTriangleInfoMap* %28, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %29, i32 0, i32 0 ; [#uses=1]
- %31 = call i32 @_ZNK20btAlignedObjectArrayIiE4sizeEv(%"struct.btAlignedObjectArray<int>"* %30) nounwind ; [#uses=1]
- %32 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTriangleInfoMapData* %32, i32 0, i32 10 ; [#uses=1]
- store i32 %31, i32* %33, align 4
- %34 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTriangleInfoMapData* %34, i32 0, i32 10 ; [#uses=1]
- %36 = load i32* %35, align 4 ; [#uses=1]
- %37 = icmp ne i32 %36, 0 ; [#uses=1]
- br i1 %37, label %bb, label %bb1
-
-bb: ; preds = %entry
- %38 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btActionInterface* %38, i32 0, i32 0 ; [#uses=1]
- %40 = load i32 (...)*** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds i32 (...)** %40, i32 7 ; [#uses=1]
- %42 = load i32 (...)** %41, align 1 ; [#uses=1]
- %43 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTriangleInfoMap* %43, i32 0, i32 1 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %44, i32 0, i32 0 ; [#uses=1]
- %46 = call i32* @_ZNK20btAlignedObjectArrayIiEixEi(%"struct.btAlignedObjectArray<int>"* %45, i32 0) nounwind ; [#uses=1]
- %47 = bitcast i32* %46 to i8* ; [#uses=1]
- %48 = bitcast i32 (...)* %42 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %49 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %50 = call i8* %48(%struct.btActionInterface* %49, i8* %47) ; [#uses=1]
- %51 = bitcast i8* %50 to i32* ; [#uses=1]
- store i32* %51, i32** %iftmp.297, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- store i32* null, i32** %iftmp.297, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %52 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTriangleInfoMapData* %52, i32 0, i32 0 ; [#uses=1]
- %54 = load i32** %iftmp.297, align 4 ; [#uses=1]
- store i32* %54, i32** %53, align 4
- %55 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTriangleInfoMapData* %55, i32 0, i32 0 ; [#uses=1]
- %57 = load i32** %56, align 4 ; [#uses=1]
- %58 = icmp ne i32* %57, null ; [#uses=1]
- br i1 %58, label %bb3, label %bb7
-
-bb3: ; preds = %bb2
- store i32 4, i32* %sz, align 4
- %59 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTriangleInfoMapData* %59, i32 0, i32 10 ; [#uses=1]
- %61 = load i32* %60, align 4 ; [#uses=1]
- store i32 %61, i32* %numElem, align 4
- %62 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btActionInterface* %62, i32 0, i32 0 ; [#uses=1]
- %64 = load i32 (...)*** %63, align 4 ; [#uses=1]
- %65 = getelementptr inbounds i32 (...)** %64, i32 4 ; [#uses=1]
- %66 = load i32 (...)** %65, align 1 ; [#uses=1]
- %67 = load i32* %sz, align 4 ; [#uses=1]
- %68 = bitcast i32 (...)* %66 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %69 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %70 = load i32* %numElem, align 4 ; [#uses=1]
- %71 = call %struct.btChunk* %68(%struct.btActionInterface* %69, i32 %67, i32 %70) ; [#uses=1]
- store %struct.btChunk* %71, %struct.btChunk** %chunk, align 4
- %72 = load %struct.btChunk** %chunk, align 4 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btChunk* %72, i32 0, i32 2 ; [#uses=1]
- %74 = load i8** %73, align 4 ; [#uses=1]
- %75 = bitcast i8* %74 to i32* ; [#uses=1]
- store i32* %75, i32** %memPtr, align 4
- store i32 0, i32* %i, align 4
- br label %bb5
-
-bb4: ; preds = %bb5
- %76 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTriangleInfoMap* %76, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %77, i32 0, i32 0 ; [#uses=1]
- %79 = load i32* %i, align 4 ; [#uses=1]
- %80 = call i32* @_ZNK20btAlignedObjectArrayIiEixEi(%"struct.btAlignedObjectArray<int>"* %78, i32 %79) nounwind ; [#uses=1]
- %81 = load i32* %80, align 4 ; [#uses=1]
- %82 = load i32** %memPtr, align 4 ; [#uses=1]
- store i32 %81, i32* %82, align 4
- %83 = load i32* %i, align 4 ; [#uses=1]
- %84 = add nsw i32 %83, 1 ; [#uses=1]
- store i32 %84, i32* %i, align 4
- %85 = load i32** %memPtr, align 4 ; [#uses=1]
- %86 = getelementptr inbounds i32* %85, i64 1 ; [#uses=1]
- store i32* %86, i32** %memPtr, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %87 = load i32* %i, align 4 ; [#uses=1]
- %88 = load i32* %numElem, align 4 ; [#uses=1]
- %89 = icmp slt i32 %87, %88 ; [#uses=1]
- br i1 %89, label %bb4, label %bb6
-
-bb6: ; preds = %bb5
- %90 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btActionInterface* %90, i32 0, i32 0 ; [#uses=1]
- %92 = load i32 (...)*** %91, align 4 ; [#uses=1]
- %93 = getelementptr inbounds i32 (...)** %92, i32 5 ; [#uses=1]
- %94 = load i32 (...)** %93, align 1 ; [#uses=1]
- %95 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btTriangleInfoMap* %95, i32 0, i32 1 ; [#uses=1]
- %97 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %96, i32 0, i32 0 ; [#uses=1]
- %98 = call i32* @_ZNK20btAlignedObjectArrayIiEixEi(%"struct.btAlignedObjectArray<int>"* %97, i32 0) nounwind ; [#uses=1]
- %99 = bitcast i32* %98 to i8* ; [#uses=1]
- %100 = bitcast i32 (...)* %94 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %101 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %102 = load %struct.btChunk** %chunk, align 4 ; [#uses=1]
- call void %100(%struct.btActionInterface* %101, %struct.btChunk* %102, i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 1497453121, i8* %99)
- br label %bb7
-
-bb7: ; preds = %bb6, %bb2
- %103 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btTriangleInfoMap* %103, i32 0, i32 1 ; [#uses=1]
- %105 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %104, i32 0, i32 1 ; [#uses=1]
- %106 = call i32 @_ZNK20btAlignedObjectArrayIiE4sizeEv(%"struct.btAlignedObjectArray<int>"* %105) nounwind ; [#uses=1]
- %107 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btTriangleInfoMapData* %107, i32 0, i32 9 ; [#uses=1]
- store i32 %106, i32* %108, align 4
- %109 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btTriangleInfoMapData* %109, i32 0, i32 9 ; [#uses=1]
- %111 = load i32* %110, align 4 ; [#uses=1]
- %112 = icmp ne i32 %111, 0 ; [#uses=1]
- br i1 %112, label %bb8, label %bb9
-
-bb8: ; preds = %bb7
- %113 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btActionInterface* %113, i32 0, i32 0 ; [#uses=1]
- %115 = load i32 (...)*** %114, align 4 ; [#uses=1]
- %116 = getelementptr inbounds i32 (...)** %115, i32 7 ; [#uses=1]
- %117 = load i32 (...)** %116, align 1 ; [#uses=1]
- %118 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btTriangleInfoMap* %118, i32 0, i32 1 ; [#uses=1]
- %120 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %119, i32 0, i32 1 ; [#uses=1]
- %121 = call i32* @_ZNK20btAlignedObjectArrayIiEixEi(%"struct.btAlignedObjectArray<int>"* %120, i32 0) nounwind ; [#uses=1]
- %122 = bitcast i32* %121 to i8* ; [#uses=1]
- %123 = bitcast i32 (...)* %117 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %124 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %125 = call i8* %123(%struct.btActionInterface* %124, i8* %122) ; [#uses=1]
- %126 = bitcast i8* %125 to i32* ; [#uses=1]
- store i32* %126, i32** %iftmp.299, align 4
- br label %bb10
-
-bb9: ; preds = %bb7
- store i32* null, i32** %iftmp.299, align 4
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %127 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btTriangleInfoMapData* %127, i32 0, i32 1 ; [#uses=1]
- %129 = load i32** %iftmp.299, align 4 ; [#uses=1]
- store i32* %129, i32** %128, align 4
- %130 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btTriangleInfoMapData* %130, i32 0, i32 1 ; [#uses=1]
- %132 = load i32** %131, align 4 ; [#uses=1]
- %133 = icmp ne i32* %132, null ; [#uses=1]
- br i1 %133, label %bb11, label %bb20
-
-bb11: ; preds = %bb10
- store i32 4, i32* %sz12, align 4
- %134 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btTriangleInfoMapData* %134, i32 0, i32 9 ; [#uses=1]
- %136 = load i32* %135, align 4 ; [#uses=1]
- store i32 %136, i32* %numElem13, align 4
- %137 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btActionInterface* %137, i32 0, i32 0 ; [#uses=1]
- %139 = load i32 (...)*** %138, align 4 ; [#uses=1]
- %140 = getelementptr inbounds i32 (...)** %139, i32 4 ; [#uses=1]
- %141 = load i32 (...)** %140, align 1 ; [#uses=1]
- %142 = load i32* %sz12, align 4 ; [#uses=1]
- %143 = bitcast i32 (...)* %141 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %144 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %145 = load i32* %numElem13, align 4 ; [#uses=1]
- %146 = call %struct.btChunk* %143(%struct.btActionInterface* %144, i32 %142, i32 %145) ; [#uses=1]
- store %struct.btChunk* %146, %struct.btChunk** %chunk14, align 4
- %147 = load %struct.btChunk** %chunk14, align 4 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btChunk* %147, i32 0, i32 2 ; [#uses=1]
- %149 = load i8** %148, align 4 ; [#uses=1]
- %150 = bitcast i8* %149 to i32* ; [#uses=1]
- store i32* %150, i32** %memPtr15, align 4
- store i32 0, i32* %i16, align 4
- br label %bb18
-
-bb17: ; preds = %bb18
- %151 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btTriangleInfoMap* %151, i32 0, i32 1 ; [#uses=1]
- %153 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %152, i32 0, i32 1 ; [#uses=1]
- %154 = load i32* %i16, align 4 ; [#uses=1]
- %155 = call i32* @_ZNK20btAlignedObjectArrayIiEixEi(%"struct.btAlignedObjectArray<int>"* %153, i32 %154) nounwind ; [#uses=1]
- %156 = load i32* %155, align 4 ; [#uses=1]
- %157 = load i32** %memPtr15, align 4 ; [#uses=1]
- store i32 %156, i32* %157, align 4
- %158 = load i32* %i16, align 4 ; [#uses=1]
- %159 = add nsw i32 %158, 1 ; [#uses=1]
- store i32 %159, i32* %i16, align 4
- %160 = load i32** %memPtr15, align 4 ; [#uses=1]
- %161 = getelementptr inbounds i32* %160, i64 1 ; [#uses=1]
- store i32* %161, i32** %memPtr15, align 4
- br label %bb18
-
-bb18: ; preds = %bb17, %bb11
- %162 = load i32* %i16, align 4 ; [#uses=1]
- %163 = load i32* %numElem13, align 4 ; [#uses=1]
- %164 = icmp slt i32 %162, %163 ; [#uses=1]
- br i1 %164, label %bb17, label %bb19
-
-bb19: ; preds = %bb18
- %165 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btActionInterface* %165, i32 0, i32 0 ; [#uses=1]
- %167 = load i32 (...)*** %166, align 4 ; [#uses=1]
- %168 = getelementptr inbounds i32 (...)** %167, i32 5 ; [#uses=1]
- %169 = load i32 (...)** %168, align 1 ; [#uses=1]
- %170 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btTriangleInfoMap* %170, i32 0, i32 1 ; [#uses=1]
- %172 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %171, i32 0, i32 1 ; [#uses=1]
- %173 = call i32* @_ZNK20btAlignedObjectArrayIiEixEi(%"struct.btAlignedObjectArray<int>"* %172, i32 0) nounwind ; [#uses=1]
- %174 = bitcast i32* %173 to i8* ; [#uses=1]
- %175 = bitcast i32 (...)* %169 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %176 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %177 = load %struct.btChunk** %chunk14, align 4 ; [#uses=1]
- call void %175(%struct.btActionInterface* %176, %struct.btChunk* %177, i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 1497453121, i8* %174)
- br label %bb20
-
-bb20: ; preds = %bb19, %bb10
- %178 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btTriangleInfoMap* %178, i32 0, i32 1 ; [#uses=1]
- %180 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %179, i32 0, i32 2 ; [#uses=1]
- %181 = call i32 @_ZNK20btAlignedObjectArrayI14btTriangleInfoE4sizeEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %180) nounwind ; [#uses=1]
- %182 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btTriangleInfoMapData* %182, i32 0, i32 11 ; [#uses=1]
- store i32 %181, i32* %183, align 4
- %184 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btTriangleInfoMapData* %184, i32 0, i32 11 ; [#uses=1]
- %186 = load i32* %185, align 4 ; [#uses=1]
- %187 = icmp ne i32 %186, 0 ; [#uses=1]
- br i1 %187, label %bb21, label %bb22
-
-bb21: ; preds = %bb20
- %188 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btActionInterface* %188, i32 0, i32 0 ; [#uses=1]
- %190 = load i32 (...)*** %189, align 4 ; [#uses=1]
- %191 = getelementptr inbounds i32 (...)** %190, i32 7 ; [#uses=1]
- %192 = load i32 (...)** %191, align 1 ; [#uses=1]
- %193 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btTriangleInfoMap* %193, i32 0, i32 1 ; [#uses=1]
- %195 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %194, i32 0, i32 2 ; [#uses=1]
- %196 = call %struct.btTriangleInfo* @_ZNK20btAlignedObjectArrayI14btTriangleInfoEixEi(%"struct.btAlignedObjectArray<btTriangleInfo>"* %195, i32 0) nounwind ; [#uses=1]
- %197 = bitcast %struct.btTriangleInfo* %196 to i8* ; [#uses=1]
- %198 = bitcast i32 (...)* %192 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %199 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %200 = call i8* %198(%struct.btActionInterface* %199, i8* %197) ; [#uses=1]
- %201 = bitcast i8* %200 to %struct.btTriangleInfo* ; [#uses=1]
- store %struct.btTriangleInfo* %201, %struct.btTriangleInfo** %iftmp.301, align 4
- br label %bb23
-
-bb22: ; preds = %bb20
- store %struct.btTriangleInfo* null, %struct.btTriangleInfo** %iftmp.301, align 4
- br label %bb23
-
-bb23: ; preds = %bb22, %bb21
- %202 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btTriangleInfoMapData* %202, i32 0, i32 2 ; [#uses=1]
- %204 = load %struct.btTriangleInfo** %iftmp.301, align 4 ; [#uses=1]
- store %struct.btTriangleInfo* %204, %struct.btTriangleInfo** %203, align 4
- %205 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btTriangleInfoMapData* %205, i32 0, i32 2 ; [#uses=1]
- %207 = load %struct.btTriangleInfo** %206, align 4 ; [#uses=1]
- %208 = icmp ne %struct.btTriangleInfo* %207, null ; [#uses=1]
- br i1 %208, label %bb24, label %bb33
-
-bb24: ; preds = %bb23
- store i32 16, i32* %sz25, align 4
- %209 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %210 = getelementptr inbounds %struct.btTriangleInfoMapData* %209, i32 0, i32 11 ; [#uses=1]
- %211 = load i32* %210, align 4 ; [#uses=1]
- store i32 %211, i32* %numElem26, align 4
- %212 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %213 = getelementptr inbounds %struct.btActionInterface* %212, i32 0, i32 0 ; [#uses=1]
- %214 = load i32 (...)*** %213, align 4 ; [#uses=1]
- %215 = getelementptr inbounds i32 (...)** %214, i32 4 ; [#uses=1]
- %216 = load i32 (...)** %215, align 1 ; [#uses=1]
- %217 = load i32* %sz25, align 4 ; [#uses=1]
- %218 = bitcast i32 (...)* %216 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %219 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %220 = load i32* %numElem26, align 4 ; [#uses=1]
- %221 = call %struct.btChunk* %218(%struct.btActionInterface* %219, i32 %217, i32 %220) ; [#uses=1]
- store %struct.btChunk* %221, %struct.btChunk** %chunk27, align 4
- %222 = load %struct.btChunk** %chunk27, align 4 ; [#uses=1]
- %223 = getelementptr inbounds %struct.btChunk* %222, i32 0, i32 2 ; [#uses=1]
- %224 = load i8** %223, align 4 ; [#uses=1]
- %225 = bitcast i8* %224 to %struct.btTriangleInfo* ; [#uses=1]
- store %struct.btTriangleInfo* %225, %struct.btTriangleInfo** %memPtr28, align 4
- store i32 0, i32* %i29, align 4
- br label %bb31
-
-bb30: ; preds = %bb31
- %226 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btTriangleInfoMap* %226, i32 0, i32 1 ; [#uses=1]
- %228 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %227, i32 0, i32 2 ; [#uses=1]
- %229 = load i32* %i29, align 4 ; [#uses=1]
- %230 = call %struct.btTriangleInfo* @_ZNK20btAlignedObjectArrayI14btTriangleInfoEixEi(%"struct.btAlignedObjectArray<btTriangleInfo>"* %228, i32 %229) nounwind ; [#uses=1]
- %231 = getelementptr inbounds %struct.btTriangleInfo* %230, i32 0, i32 1 ; [#uses=1]
- %232 = load float* %231, align 4 ; [#uses=1]
- %233 = load %struct.btTriangleInfo** %memPtr28, align 4 ; [#uses=1]
- %234 = getelementptr inbounds %struct.btTriangleInfo* %233, i32 0, i32 1 ; [#uses=1]
- store float %232, float* %234, align 4
- %235 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %236 = getelementptr inbounds %struct.btTriangleInfoMap* %235, i32 0, i32 1 ; [#uses=1]
- %237 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %236, i32 0, i32 2 ; [#uses=1]
- %238 = load i32* %i29, align 4 ; [#uses=1]
- %239 = call %struct.btTriangleInfo* @_ZNK20btAlignedObjectArrayI14btTriangleInfoEixEi(%"struct.btAlignedObjectArray<btTriangleInfo>"* %237, i32 %238) nounwind ; [#uses=1]
- %240 = getelementptr inbounds %struct.btTriangleInfo* %239, i32 0, i32 2 ; [#uses=1]
- %241 = load float* %240, align 4 ; [#uses=1]
- %242 = load %struct.btTriangleInfo** %memPtr28, align 4 ; [#uses=1]
- %243 = getelementptr inbounds %struct.btTriangleInfo* %242, i32 0, i32 2 ; [#uses=1]
- store float %241, float* %243, align 4
- %244 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %245 = getelementptr inbounds %struct.btTriangleInfoMap* %244, i32 0, i32 1 ; [#uses=1]
- %246 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %245, i32 0, i32 2 ; [#uses=1]
- %247 = load i32* %i29, align 4 ; [#uses=1]
- %248 = call %struct.btTriangleInfo* @_ZNK20btAlignedObjectArrayI14btTriangleInfoEixEi(%"struct.btAlignedObjectArray<btTriangleInfo>"* %246, i32 %247) nounwind ; [#uses=1]
- %249 = getelementptr inbounds %struct.btTriangleInfo* %248, i32 0, i32 3 ; [#uses=1]
- %250 = load float* %249, align 4 ; [#uses=1]
- %251 = load %struct.btTriangleInfo** %memPtr28, align 4 ; [#uses=1]
- %252 = getelementptr inbounds %struct.btTriangleInfo* %251, i32 0, i32 3 ; [#uses=1]
- store float %250, float* %252, align 4
- %253 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %254 = getelementptr inbounds %struct.btTriangleInfoMap* %253, i32 0, i32 1 ; [#uses=1]
- %255 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %254, i32 0, i32 2 ; [#uses=1]
- %256 = load i32* %i29, align 4 ; [#uses=1]
- %257 = call %struct.btTriangleInfo* @_ZNK20btAlignedObjectArrayI14btTriangleInfoEixEi(%"struct.btAlignedObjectArray<btTriangleInfo>"* %255, i32 %256) nounwind ; [#uses=1]
- %258 = getelementptr inbounds %struct.btTriangleInfo* %257, i32 0, i32 0 ; [#uses=1]
- %259 = load i32* %258, align 4 ; [#uses=1]
- %260 = load %struct.btTriangleInfo** %memPtr28, align 4 ; [#uses=1]
- %261 = getelementptr inbounds %struct.btTriangleInfo* %260, i32 0, i32 0 ; [#uses=1]
- store i32 %259, i32* %261, align 4
- %262 = load i32* %i29, align 4 ; [#uses=1]
- %263 = add nsw i32 %262, 1 ; [#uses=1]
- store i32 %263, i32* %i29, align 4
- %264 = load %struct.btTriangleInfo** %memPtr28, align 4 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btTriangleInfo* %264, i64 1 ; [#uses=1]
- store %struct.btTriangleInfo* %265, %struct.btTriangleInfo** %memPtr28, align 4
- br label %bb31
-
-bb31: ; preds = %bb30, %bb24
- %266 = load i32* %i29, align 4 ; [#uses=1]
- %267 = load i32* %numElem26, align 4 ; [#uses=1]
- %268 = icmp slt i32 %266, %267 ; [#uses=1]
- br i1 %268, label %bb30, label %bb32
-
-bb32: ; preds = %bb31
- %269 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btActionInterface* %269, i32 0, i32 0 ; [#uses=1]
- %271 = load i32 (...)*** %270, align 4 ; [#uses=1]
- %272 = getelementptr inbounds i32 (...)** %271, i32 5 ; [#uses=1]
- %273 = load i32 (...)** %272, align 1 ; [#uses=1]
- %274 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btTriangleInfoMap* %274, i32 0, i32 1 ; [#uses=1]
- %276 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %275, i32 0, i32 2 ; [#uses=1]
- %277 = call %struct.btTriangleInfo* @_ZNK20btAlignedObjectArrayI14btTriangleInfoEixEi(%"struct.btAlignedObjectArray<btTriangleInfo>"* %276, i32 0) nounwind ; [#uses=1]
- %278 = bitcast %struct.btTriangleInfo* %277 to i8* ; [#uses=1]
- %279 = bitcast i32 (...)* %273 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %280 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %281 = load %struct.btChunk** %chunk27, align 4 ; [#uses=1]
- call void %279(%struct.btActionInterface* %280, %struct.btChunk* %281, i8* getelementptr inbounds ([19 x i8]* @.str1, i32 0, i32 0), i32 1497453121, i8* %278)
- br label %bb33
-
-bb33: ; preds = %bb32, %bb23
- %282 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %283 = getelementptr inbounds %struct.btTriangleInfoMap* %282, i32 0, i32 1 ; [#uses=1]
- %284 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %283, i32 0, i32 3 ; [#uses=1]
- %285 = call i32 @_ZNK20btAlignedObjectArrayI9btHashIntE4sizeEv(%"struct.btAlignedObjectArray<btHashInt>"* %284) nounwind ; [#uses=1]
- %286 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %287 = getelementptr inbounds %struct.btTriangleInfoMapData* %286, i32 0, i32 12 ; [#uses=1]
- store i32 %285, i32* %287, align 4
- %288 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %289 = getelementptr inbounds %struct.btTriangleInfoMapData* %288, i32 0, i32 12 ; [#uses=1]
- %290 = load i32* %289, align 4 ; [#uses=1]
- %291 = icmp ne i32 %290, 0 ; [#uses=1]
- br i1 %291, label %bb34, label %bb35
-
-bb34: ; preds = %bb33
- %292 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %293 = getelementptr inbounds %struct.btActionInterface* %292, i32 0, i32 0 ; [#uses=1]
- %294 = load i32 (...)*** %293, align 4 ; [#uses=1]
- %295 = getelementptr inbounds i32 (...)** %294, i32 7 ; [#uses=1]
- %296 = load i32 (...)** %295, align 1 ; [#uses=1]
- %297 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %298 = getelementptr inbounds %struct.btTriangleInfoMap* %297, i32 0, i32 1 ; [#uses=1]
- %299 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %298, i32 0, i32 3 ; [#uses=1]
- %300 = call %struct.btHashInt* @_ZNK20btAlignedObjectArrayI9btHashIntEixEi(%"struct.btAlignedObjectArray<btHashInt>"* %299, i32 0) nounwind ; [#uses=1]
- %301 = bitcast %struct.btHashInt* %300 to i8* ; [#uses=1]
- %302 = bitcast i32 (...)* %296 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %303 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %304 = call i8* %302(%struct.btActionInterface* %303, i8* %301) ; [#uses=1]
- %305 = bitcast i8* %304 to i32* ; [#uses=1]
- store i32* %305, i32** %iftmp.303, align 4
- br label %bb36
-
-bb35: ; preds = %bb33
- store i32* null, i32** %iftmp.303, align 4
- br label %bb36
-
-bb36: ; preds = %bb35, %bb34
- %306 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %307 = getelementptr inbounds %struct.btTriangleInfoMapData* %306, i32 0, i32 3 ; [#uses=1]
- %308 = load i32** %iftmp.303, align 4 ; [#uses=1]
- store i32* %308, i32** %307, align 4
- %309 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %310 = getelementptr inbounds %struct.btTriangleInfoMapData* %309, i32 0, i32 3 ; [#uses=1]
- %311 = load i32** %310, align 4 ; [#uses=1]
- %312 = icmp ne i32* %311, null ; [#uses=1]
- br i1 %312, label %bb37, label %bb46
-
-bb37: ; preds = %bb36
- store i32 4, i32* %sz38, align 4
- %313 = load %struct.btTriangleInfoMapData** %tmapData, align 4 ; [#uses=1]
- %314 = getelementptr inbounds %struct.btTriangleInfoMapData* %313, i32 0, i32 11 ; [#uses=1]
- %315 = load i32* %314, align 4 ; [#uses=1]
- store i32 %315, i32* %numElem39, align 4
- %316 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btActionInterface* %316, i32 0, i32 0 ; [#uses=1]
- %318 = load i32 (...)*** %317, align 4 ; [#uses=1]
- %319 = getelementptr inbounds i32 (...)** %318, i32 4 ; [#uses=1]
- %320 = load i32 (...)** %319, align 1 ; [#uses=1]
- %321 = load i32* %sz38, align 4 ; [#uses=1]
- %322 = bitcast i32 (...)* %320 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %323 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %324 = load i32* %numElem39, align 4 ; [#uses=1]
- %325 = call %struct.btChunk* %322(%struct.btActionInterface* %323, i32 %321, i32 %324) ; [#uses=1]
- store %struct.btChunk* %325, %struct.btChunk** %chunk40, align 4
- %326 = load %struct.btChunk** %chunk40, align 4 ; [#uses=1]
- %327 = getelementptr inbounds %struct.btChunk* %326, i32 0, i32 2 ; [#uses=1]
- %328 = load i8** %327, align 4 ; [#uses=1]
- %329 = bitcast i8* %328 to i32* ; [#uses=1]
- store i32* %329, i32** %memPtr41, align 4
- store i32 0, i32* %i42, align 4
- br label %bb44
-
-bb43: ; preds = %bb44
- %330 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %331 = getelementptr inbounds %struct.btTriangleInfoMap* %330, i32 0, i32 1 ; [#uses=1]
- %332 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %331, i32 0, i32 3 ; [#uses=1]
- %333 = load i32* %i42, align 4 ; [#uses=1]
- %334 = call %struct.btHashInt* @_ZNK20btAlignedObjectArrayI9btHashIntEixEi(%"struct.btAlignedObjectArray<btHashInt>"* %332, i32 %333) nounwind ; [#uses=1]
- %335 = call i32 @_ZNK9btHashInt7getUid1Ev(%struct.btHashInt* %334) nounwind ; [#uses=1]
- %336 = load i32** %memPtr41, align 4 ; [#uses=1]
- store i32 %335, i32* %336, align 4
- %337 = load i32* %i42, align 4 ; [#uses=1]
- %338 = add nsw i32 %337, 1 ; [#uses=1]
- store i32 %338, i32* %i42, align 4
- %339 = load i32** %memPtr41, align 4 ; [#uses=1]
- %340 = getelementptr inbounds i32* %339, i64 1 ; [#uses=1]
- store i32* %340, i32** %memPtr41, align 4
- br label %bb44
-
-bb44: ; preds = %bb43, %bb37
- %341 = load i32* %i42, align 4 ; [#uses=1]
- %342 = load i32* %numElem39, align 4 ; [#uses=1]
- %343 = icmp slt i32 %341, %342 ; [#uses=1]
- br i1 %343, label %bb43, label %bb45
-
-bb45: ; preds = %bb44
- %344 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %345 = getelementptr inbounds %struct.btActionInterface* %344, i32 0, i32 0 ; [#uses=1]
- %346 = load i32 (...)*** %345, align 4 ; [#uses=1]
- %347 = getelementptr inbounds i32 (...)** %346, i32 5 ; [#uses=1]
- %348 = load i32 (...)** %347, align 1 ; [#uses=1]
- %349 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %350 = getelementptr inbounds %struct.btTriangleInfoMap* %349, i32 0, i32 1 ; [#uses=1]
- %351 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %350, i32 0, i32 3 ; [#uses=1]
- %352 = call %struct.btHashInt* @_ZNK20btAlignedObjectArrayI9btHashIntEixEi(%"struct.btAlignedObjectArray<btHashInt>"* %351, i32 0) nounwind ; [#uses=1]
- %353 = bitcast %struct.btHashInt* %352 to i8* ; [#uses=1]
- %354 = bitcast i32 (...)* %348 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %355 = load %struct.btActionInterface** %serializer_addr, align 4 ; [#uses=1]
- %356 = load %struct.btChunk** %chunk40, align 4 ; [#uses=1]
- call void %354(%struct.btActionInterface* %355, %struct.btChunk* %356, i8* getelementptr inbounds ([4 x i8]* @.str, i32 0, i32 0), i32 1497453121, i8* %353)
- br label %bb46
-
-bb46: ; preds = %bb45, %bb36
- store i8* getelementptr inbounds ([22 x i8]* @.str2, i32 0, i32 0), i8** %0, align 4
- %357 = load i8** %0, align 4 ; [#uses=1]
- store i8* %357, i8** %retval, align 4
- br label %return
-
-return: ; preds = %bb46
- %retval47 = load i8** %retval ; [#uses=1]
- ret i8* %retval47
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btTriangleInfoD1Ev(%struct.btTriangleInfo* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTriangleInfo*, align 4 ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTriangleInfo* %this, %struct.btTriangleInfo** %this_addr
- br label %bb
-
-bb: ; preds = %entry
- br label %return
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9btHashIntD1Ev(%struct.btHashInt* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btHashInt*, align 4 ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btHashInt* %this, %struct.btHashInt** %this_addr
- br label %bb
-
-bb: ; preds = %entry
- br label %return
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr %struct.btCollisionObject** @_ZN20btAlignedObjectArrayIP17btCollisionObjectEixEi(%"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 %n) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionObject*>"*, align 4 ; [#uses=2]
- %n_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca %struct.btCollisionObject** ; [#uses=2]
- %0 = alloca %struct.btCollisionObject** ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, %"struct.btAlignedObjectArray<btCollisionObject*>"** %this_addr
- store i32 %n, i32* %n_addr
- %1 = load %"struct.btAlignedObjectArray<btCollisionObject*>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btCollisionObject*** %2, align 4 ; [#uses=1]
- %4 = load i32* %n_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCollisionObject** %3, i32 %4 ; [#uses=1]
- store %struct.btCollisionObject** %5, %struct.btCollisionObject*** %0, align 4
- %6 = load %struct.btCollisionObject*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionObject** %6, %struct.btCollisionObject*** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btCollisionObject*** %retval ; [#uses=1]
- ret %struct.btCollisionObject** %retval1
-}
-
-; [#uses=6]
-define linkonce_odr i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4sizeEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- %1 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %1, i32 0, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=2]
-define linkonce_odr %struct.btCollisionShape** @_ZN20btAlignedObjectArrayIP16btCollisionShapeEixEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this, i32 %n) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=2]
- %n_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca %struct.btCollisionShape** ; [#uses=2]
- %0 = alloca %struct.btCollisionShape** ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- store i32 %n, i32* %n_addr
- %1 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btCollisionShape*** %2, align 4 ; [#uses=1]
- %4 = load i32* %n_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCollisionShape** %3, i32 %4 ; [#uses=1]
- store %struct.btCollisionShape** %5, %struct.btCollisionShape*** %0, align 4
- %6 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape** %6, %struct.btCollisionShape*** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btCollisionShape*** %retval ; [#uses=1]
- ret %struct.btCollisionShape** %retval1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIiE4initEv(%"struct.btAlignedObjectArray<int>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<int>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<int>"* %this, %"struct.btAlignedObjectArray<int>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %2, i32 0, i32 3 ; [#uses=1]
- store i32* null, i32** %3, align 4
- %4 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %4, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %6, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %7, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btHashIntE4initEv(%"struct.btAlignedObjectArray<btHashInt>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btHashInt>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btHashInt>"* %this, %"struct.btAlignedObjectArray<btHashInt>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %2, i32 0, i32 3 ; [#uses=1]
- store %struct.btHashInt* null, %struct.btHashInt** %3, align 4
- %4 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %4, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %6, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %7, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI14btTriangleInfoE4initEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %2, i32 0, i32 3 ; [#uses=1]
- store %struct.btTriangleInfo* null, %struct.btTriangleInfo** %3, align 4
- %4 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %4, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %6, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %7, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIiE7destroyEii(%"struct.btAlignedObjectArray<int>"* %this, i32 %first, i32 %last) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<int>"*, align 4 ; [#uses=2]
- %first_addr = alloca i32, align 4 ; [#uses=2]
- %last_addr = alloca i32, align 4 ; [#uses=2]
- %i = alloca i32 ; [#uses=4]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<int>"* %this, %"struct.btAlignedObjectArray<int>"** %this_addr
- store i32 %first, i32* %first_addr
- store i32 %last, i32* %last_addr
- %0 = load i32* %first_addr, align 4 ; [#uses=1]
- store i32 %0, i32* %i, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %1 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load i32** %2, align 4 ; [#uses=0]
- %4 = load i32* %i, align 4 ; [#uses=1]
- %5 = add nsw i32 %4, 1 ; [#uses=1]
- store i32 %5, i32* %i, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %6 = load i32* %i, align 4 ; [#uses=1]
- %7 = load i32* %last_addr, align 4 ; [#uses=1]
- %8 = icmp slt i32 %6, %7 ; [#uses=1]
- br i1 %8, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btAlignedAllocatorIP16btCollisionShapeLj16EEC1Ev(%struct.CONTACT_KEY_TOKEN_COMP* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.CONTACT_KEY_TOKEN_COMP*, align 4 ; [#uses=1]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.CONTACT_KEY_TOKEN_COMP** %this_addr
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE4initEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %2, i32 0, i32 3 ; [#uses=1]
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %3, align 4
- %4 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %4, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %6, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %7, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeEC1Ev(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this) align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN18btAlignedAllocatorIP16btCollisionShapeLj16EEC1Ev(%struct.CONTACT_KEY_TOKEN_COMP* %1) nounwind
- %2 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE4initEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %2) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE8capacityEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=2]
- %retval = alloca i32 ; [#uses=2]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- %1 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %1, i32 0, i32 2 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %0, align 4
- %4 = load i32* %0, align 4 ; [#uses=1]
- store i32 %4, i32* %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i32* %retval ; [#uses=1]
- ret i32 %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZN20btAlignedObjectArrayIP16btCollisionShapeE9allocSizeEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this, i32 %size) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=1]
- %size_addr = alloca i32, align 4 ; [#uses=3]
- %retval = alloca i32 ; [#uses=2]
- %iftmp.574 = alloca i32 ; [#uses=3]
- %0 = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- store i32 %size, i32* %size_addr
- %1 = load i32* %size_addr, align 4 ; [#uses=1]
- %2 = icmp ne i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- %3 = load i32* %size_addr, align 4 ; [#uses=1]
- %4 = mul nsw i32 %3, 2 ; [#uses=1]
- store i32 %4, i32* %iftmp.574, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- store i32 1, i32* %iftmp.574, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %5 = load i32* %iftmp.574, align 4 ; [#uses=1]
- store i32 %5, i32* %0, align 4
- %6 = load i32* %0, align 4 ; [#uses=1]
- store i32 %6, i32* %retval, align 4
- br label %return
-
-return: ; preds = %bb2
- %retval3 = load i32* %retval ; [#uses=1]
- ret i32 %retval3
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE7destroyEii(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this, i32 %first, i32 %last) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=2]
- %first_addr = alloca i32, align 4 ; [#uses=2]
- %last_addr = alloca i32, align 4 ; [#uses=2]
- %i = alloca i32 ; [#uses=4]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- store i32 %first, i32* %first_addr
- store i32 %last, i32* %last_addr
- %0 = load i32* %first_addr, align 4 ; [#uses=1]
- store i32 %0, i32* %i, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %1 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btCollisionShape*** %2, align 4 ; [#uses=0]
- %4 = load i32* %i, align 4 ; [#uses=1]
- %5 = add nsw i32 %4, 1 ; [#uses=1]
- store i32 %5, i32* %i, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %6 = load i32* %i, align 4 ; [#uses=1]
- %7 = load i32* %last_addr, align 4 ; [#uses=1]
- %8 = icmp slt i32 %6, %7 ; [#uses=1]
- br i1 %8, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btHashIntE7destroyEii(%"struct.btAlignedObjectArray<btHashInt>"* %this, i32 %first, i32 %last) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btHashInt>"*, align 4 ; [#uses=2]
- %first_addr = alloca i32, align 4 ; [#uses=2]
- %last_addr = alloca i32, align 4 ; [#uses=2]
- %i = alloca i32 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btHashInt>"* %this, %"struct.btAlignedObjectArray<btHashInt>"** %this_addr
- store i32 %first, i32* %first_addr
- store i32 %last, i32* %last_addr
- %0 = load i32* %first_addr, align 4 ; [#uses=1]
- store i32 %0, i32* %i, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %1 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btHashInt** %2, align 4 ; [#uses=1]
- %4 = load i32* %i, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btHashInt* %3, i32 %4 ; [#uses=1]
- call void @_ZN9btHashIntD1Ev(%struct.btHashInt* %5) nounwind
- %6 = load i32* %i, align 4 ; [#uses=1]
- %7 = add nsw i32 %6, 1 ; [#uses=1]
- store i32 %7, i32* %i, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %8 = load i32* %i, align 4 ; [#uses=1]
- %9 = load i32* %last_addr, align 4 ; [#uses=1]
- %10 = icmp slt i32 %8, %9 ; [#uses=1]
- br i1 %10, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI14btTriangleInfoE7destroyEii(%"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 %first, i32 %last) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"*, align 4 ; [#uses=2]
- %first_addr = alloca i32, align 4 ; [#uses=2]
- %last_addr = alloca i32, align 4 ; [#uses=2]
- %i = alloca i32 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr
- store i32 %first, i32* %first_addr
- store i32 %last, i32* %last_addr
- %0 = load i32* %first_addr, align 4 ; [#uses=1]
- store i32 %0, i32* %i, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %1 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %1, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btTriangleInfo** %2, align 4 ; [#uses=1]
- %4 = load i32* %i, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTriangleInfo* %3, i32 %4 ; [#uses=1]
- call void @_ZN14btTriangleInfoD1Ev(%struct.btTriangleInfo* %5) nounwind
- %6 = load i32* %i, align 4 ; [#uses=1]
- %7 = add nsw i32 %6, 1 ; [#uses=1]
- store i32 %7, i32* %i, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %8 = load i32* %i, align 4 ; [#uses=1]
- %9 = load i32* %last_addr, align 4 ; [#uses=1]
- %10 = icmp slt i32 %8, %9 ; [#uses=1]
- br i1 %10, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4copyEiiPS1_(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this, i32 %start, i32 %end, %struct.btCollisionShape** %dest) nounwind inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=2]
- %start_addr = alloca i32, align 4 ; [#uses=2]
- %end_addr = alloca i32, align 4 ; [#uses=2]
- %dest_addr = alloca %struct.btCollisionShape**, align 4 ; [#uses=2]
- %iftmp.601 = alloca %struct.btCollisionShape** ; [#uses=2]
- %0 = alloca %struct.btCollisionShape** ; [#uses=5]
- %i = alloca i32 ; [#uses=6]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- store i32 %start, i32* %start_addr
- store i32 %end, i32* %end_addr
- store %struct.btCollisionShape** %dest, %struct.btCollisionShape*** %dest_addr
- %1 = load i32* %start_addr, align 4 ; [#uses=1]
- store i32 %1, i32* %i, align 4
- br label %bb4
-
-bb: ; preds = %bb4
- %2 = load %struct.btCollisionShape*** %dest_addr, align 4 ; [#uses=1]
- %3 = load i32* %i, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCollisionShape** %2, i32 %3 ; [#uses=1]
- %5 = bitcast %struct.btCollisionShape** %4 to i8* ; [#uses=1]
- %6 = call i8* @_ZnwjPv(i32 4, i8* %5) nounwind ; [#uses=1]
- %7 = bitcast i8* %6 to %struct.btCollisionShape** ; [#uses=1]
- store %struct.btCollisionShape** %7, %struct.btCollisionShape*** %0, align 4
- %8 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- %9 = icmp ne %struct.btCollisionShape** %8, null ; [#uses=1]
- br i1 %9, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %10 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %10, i32 0, i32 3 ; [#uses=1]
- %12 = load %struct.btCollisionShape*** %11, align 4 ; [#uses=1]
- %13 = load i32* %i, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionShape** %12, i32 %13 ; [#uses=1]
- %15 = load %struct.btCollisionShape** %14, align 1 ; [#uses=1]
- %16 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %15, %struct.btCollisionShape** %16, align 4
- %17 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape** %17, %struct.btCollisionShape*** %iftmp.601, align 4
- br label %bb3
-
-bb2: ; preds = %bb
- %18 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape** %18, %struct.btCollisionShape*** %iftmp.601, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %19 = load i32* %i, align 4 ; [#uses=1]
- %20 = add nsw i32 %19, 1 ; [#uses=1]
- store i32 %20, i32* %i, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %entry
- %21 = load i32* %i, align 4 ; [#uses=1]
- %22 = load i32* %end_addr, align 4 ; [#uses=1]
- %23 = icmp slt i32 %21, %22 ; [#uses=1]
- br i1 %23, label %bb, label %bb5
-
-bb5: ; preds = %bb4
- br label %return
-
-return: ; preds = %bb5
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTypedConstraintD0Ev(%struct.btTypedConstraint* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTypedConstraint*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTypedConstraint* %this, %struct.btTypedConstraint** %this_addr
- %0 = load %struct.btTypedConstraint** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTypedConstraint* %0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btTypedConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- br label %bb
-
-bb: ; preds = %entry
- %2 = trunc i32 1 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %3 = load %struct.btTypedConstraint** %this_addr, align 4 ; [#uses=1]
- %4 = bitcast %struct.btTypedConstraint* %3 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %4) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTypedConstraintD1Ev(%struct.btTypedConstraint* %this) nounwind align 2 {
-entry:
- %this_addr = alloca %struct.btTypedConstraint*, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTypedConstraint* %this, %struct.btTypedConstraint** %this_addr
- %0 = load %struct.btTypedConstraint** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTypedConstraint* %0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btTypedConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- br label %bb
-
-bb: ; preds = %entry
- %2 = trunc i32 0 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %3 = load %struct.btTypedConstraint** %this_addr, align 4 ; [#uses=1]
- %4 = bitcast %struct.btTypedConstraint* %3 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %4) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=180]
-declare void @_ZdlPv(i8*) nounwind
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btAlignedAllocatorI9btHashIntLj16EE10deallocateEPS0_(%struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.btHashInt* %ptr) align 2 {
-entry:
- %this_addr = alloca %struct.CONTACT_KEY_TOKEN_COMP*, align 4 ; [#uses=1]
- %ptr_addr = alloca %struct.btHashInt*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.CONTACT_KEY_TOKEN_COMP** %this_addr
- store %struct.btHashInt* %ptr, %struct.btHashInt** %ptr_addr
- %0 = load %struct.btHashInt** %ptr_addr, align 4 ; [#uses=1]
- %1 = bitcast %struct.btHashInt* %0 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %1)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btHashIntE10deallocateEv(%"struct.btAlignedObjectArray<btHashInt>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btHashInt>"*, align 4 ; [#uses=6]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btHashInt>"* %this, %"struct.btAlignedObjectArray<btHashInt>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %0, i32 0, i32 3 ; [#uses=1]
- %2 = load %struct.btHashInt** %1, align 4 ; [#uses=1]
- %3 = icmp ne %struct.btHashInt* %2, null ; [#uses=1]
- br i1 %3, label %bb, label %bb3
-
-bb: ; preds = %entry
- %4 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %4, i32 0, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool = icmp ne i8 %6, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %7 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %7, i32 0, i32 3 ; [#uses=1]
- %9 = load %struct.btHashInt** %8, align 4 ; [#uses=1]
- %10 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %10, i32 0, i32 0 ; [#uses=1]
- call void @_ZN18btAlignedAllocatorI9btHashIntLj16EE10deallocateEPS0_(%struct.CONTACT_KEY_TOKEN_COMP* %11, %struct.btHashInt* %9)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %12 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %12, i32 0, i32 3 ; [#uses=1]
- store %struct.btHashInt* null, %struct.btHashInt** %13, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- br label %return
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btHashIntE5clearEv(%"struct.btAlignedObjectArray<btHashInt>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btHashInt>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btHashInt>"* %this, %"struct.btAlignedObjectArray<btHashInt>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- %1 = call i32 @_ZNK20btAlignedObjectArrayI9btHashIntE4sizeEv(%"struct.btAlignedObjectArray<btHashInt>"* %0) nounwind ; [#uses=1]
- %2 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btHashIntE7destroyEii(%"struct.btAlignedObjectArray<btHashInt>"* %2, i32 0, i32 %1) nounwind
- %3 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btHashIntE10deallocateEv(%"struct.btAlignedObjectArray<btHashInt>"* %3) inlinehint
- %4 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btHashIntE4initEv(%"struct.btAlignedObjectArray<btHashInt>"* %4) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btHashIntED1Ev(%"struct.btAlignedObjectArray<btHashInt>"* %this) align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btHashInt>"*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btHashInt>"* %this, %"struct.btAlignedObjectArray<btHashInt>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btHashInt>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btHashIntE5clearEv(%"struct.btAlignedObjectArray<btHashInt>"* %0) inlinehint
- br label %bb
-
-bb: ; preds = %entry
- br label %return
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btAlignedAllocatorI14btTriangleInfoLj16EE10deallocateEPS0_(%struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.btTriangleInfo* %ptr) align 2 {
-entry:
- %this_addr = alloca %struct.CONTACT_KEY_TOKEN_COMP*, align 4 ; [#uses=1]
- %ptr_addr = alloca %struct.btTriangleInfo*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.CONTACT_KEY_TOKEN_COMP** %this_addr
- store %struct.btTriangleInfo* %ptr, %struct.btTriangleInfo** %ptr_addr
- %0 = load %struct.btTriangleInfo** %ptr_addr, align 4 ; [#uses=1]
- %1 = bitcast %struct.btTriangleInfo* %0 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %1)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI14btTriangleInfoE10deallocateEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"*, align 4 ; [#uses=6]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %0, i32 0, i32 3 ; [#uses=1]
- %2 = load %struct.btTriangleInfo** %1, align 4 ; [#uses=1]
- %3 = icmp ne %struct.btTriangleInfo* %2, null ; [#uses=1]
- br i1 %3, label %bb, label %bb3
-
-bb: ; preds = %entry
- %4 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %4, i32 0, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool = icmp ne i8 %6, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %7 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %7, i32 0, i32 3 ; [#uses=1]
- %9 = load %struct.btTriangleInfo** %8, align 4 ; [#uses=1]
- %10 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %10, i32 0, i32 0 ; [#uses=1]
- call void @_ZN18btAlignedAllocatorI14btTriangleInfoLj16EE10deallocateEPS0_(%struct.CONTACT_KEY_TOKEN_COMP* %11, %struct.btTriangleInfo* %9)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %12 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %12, i32 0, i32 3 ; [#uses=1]
- store %struct.btTriangleInfo* null, %struct.btTriangleInfo** %13, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- br label %return
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI14btTriangleInfoE5clearEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %1 = call i32 @_ZNK20btAlignedObjectArrayI14btTriangleInfoE4sizeEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %0) nounwind ; [#uses=1]
- %2 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI14btTriangleInfoE7destroyEii(%"struct.btAlignedObjectArray<btTriangleInfo>"* %2, i32 0, i32 %1) nounwind
- %3 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI14btTriangleInfoE10deallocateEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %3) inlinehint
- %4 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI14btTriangleInfoE4initEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %4) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI14btTriangleInfoED1Ev(%"struct.btAlignedObjectArray<btTriangleInfo>"* %this) align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI14btTriangleInfoE5clearEv(%"struct.btAlignedObjectArray<btTriangleInfo>"* %0) inlinehint
- br label %bb
-
-bb: ; preds = %entry
- br label %return
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btAlignedAllocatorIiLj16EE10deallocateEPi(%struct.CONTACT_KEY_TOKEN_COMP* %this, i32* %ptr) align 2 {
-entry:
- %this_addr = alloca %struct.CONTACT_KEY_TOKEN_COMP*, align 4 ; [#uses=1]
- %ptr_addr = alloca i32*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.CONTACT_KEY_TOKEN_COMP** %this_addr
- store i32* %ptr, i32** %ptr_addr
- %0 = load i32** %ptr_addr, align 4 ; [#uses=1]
- %1 = bitcast i32* %0 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %1)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIiE10deallocateEv(%"struct.btAlignedObjectArray<int>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<int>"*, align 4 ; [#uses=6]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<int>"* %this, %"struct.btAlignedObjectArray<int>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %0, i32 0, i32 3 ; [#uses=1]
- %2 = load i32** %1, align 4 ; [#uses=1]
- %3 = icmp ne i32* %2, null ; [#uses=1]
- br i1 %3, label %bb, label %bb3
-
-bb: ; preds = %entry
- %4 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %4, i32 0, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool = icmp ne i8 %6, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %7 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %7, i32 0, i32 3 ; [#uses=1]
- %9 = load i32** %8, align 4 ; [#uses=1]
- %10 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %10, i32 0, i32 0 ; [#uses=1]
- call void @_ZN18btAlignedAllocatorIiLj16EE10deallocateEPi(%struct.CONTACT_KEY_TOKEN_COMP* %11, i32* %9)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %12 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %12, i32 0, i32 3 ; [#uses=1]
- store i32* null, i32** %13, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- br label %return
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIiE5clearEv(%"struct.btAlignedObjectArray<int>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<int>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<int>"* %this, %"struct.btAlignedObjectArray<int>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- %1 = call i32 @_ZNK20btAlignedObjectArrayIiE4sizeEv(%"struct.btAlignedObjectArray<int>"* %0) nounwind ; [#uses=1]
- %2 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE7destroyEii(%"struct.btAlignedObjectArray<int>"* %2, i32 0, i32 %1) nounwind
- %3 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE10deallocateEv(%"struct.btAlignedObjectArray<int>"* %3) inlinehint
- %4 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE4initEv(%"struct.btAlignedObjectArray<int>"* %4) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIiED1Ev(%"struct.btAlignedObjectArray<int>"* %this) align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<int>"*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<int>"* %this, %"struct.btAlignedObjectArray<int>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<int>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE5clearEv(%"struct.btAlignedObjectArray<int>"* %0) inlinehint
- br label %bb
-
-bb: ; preds = %entry
- br label %return
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN9btHashMapI9btHashInt14btTriangleInfoED2Ev(%"struct.btHashMap<btHashInt,btTriangleInfo>"* %this) align 2 {
-entry:
- %this_addr = alloca %"struct.btHashMap<btHashInt,btTriangleInfo>"*, align 4 ; [#uses=8]
- %save_filt.630 = alloca i32 ; [#uses=2]
- %save_eptr.629 = alloca i8* ; [#uses=2]
- %save_filt.628 = alloca i32 ; [#uses=2]
- %save_eptr.627 = alloca i8* ; [#uses=2]
- %save_filt.626 = alloca i32 ; [#uses=2]
- %save_eptr.625 = alloca i8* ; [#uses=2]
- %eh_exception = alloca i8* ; [#uses=19]
- %eh_selector = alloca i32 ; [#uses=12]
- %memtmp = alloca %"struct.btAlignedObjectArray<btTriangleInfo>"* ; [#uses=4]
- %memtmp9 = alloca %"struct.btAlignedObjectArray<int>"* ; [#uses=4]
- %memtmp17 = alloca %"struct.btAlignedObjectArray<int>"* ; [#uses=4]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr
- %0 = load %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %0, i32 0, i32 3 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btHashIntED1Ev(%"struct.btAlignedObjectArray<btHashInt>"* %1)
- to label %invcont unwind label %lpad28
-
-invcont: ; preds = %entry
- %2 = load %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %2, i32 0, i32 2 ; [#uses=1]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %3, %"struct.btAlignedObjectArray<btTriangleInfo>"** %memtmp
- %mtmp = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %memtmp ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI14btTriangleInfoED1Ev(%"struct.btAlignedObjectArray<btTriangleInfo>"* %mtmp)
- to label %invcont1 unwind label %lpad24
-
-invcont1: ; preds = %invcont
- br label %bb4
-
-bb: ; preds = %ppad45
- %eh_select = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select, i32* %save_filt.626, align 4
- %eh_value = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value, i8** %save_eptr.625, align 4
- %4 = load %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %4, i32 0, i32 2 ; [#uses=1]
- store %"struct.btAlignedObjectArray<btTriangleInfo>"* %5, %"struct.btAlignedObjectArray<btTriangleInfo>"** %memtmp, align 4
- %6 = load %"struct.btAlignedObjectArray<btTriangleInfo>"** %memtmp, align 4 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI14btTriangleInfoED1Ev(%"struct.btAlignedObjectArray<btTriangleInfo>"* %6)
- to label %invcont2 unwind label %lpad32
-
-invcont2: ; preds = %bb
- %7 = load i8** %save_eptr.625, align 4 ; [#uses=1]
- store i8* %7, i8** %eh_exception, align 4
- %8 = load i32* %save_filt.626, align 4 ; [#uses=1]
- store i32 %8, i32* %eh_selector, align 4
- br label %ppad44
-
-bb3: ; preds = %ppad46
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb4: ; preds = %invcont1
- %9 = load %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %9, i32 0, i32 1 ; [#uses=1]
- store %"struct.btAlignedObjectArray<int>"* %10, %"struct.btAlignedObjectArray<int>"** %memtmp9
- %mtmp10 = load %"struct.btAlignedObjectArray<int>"** %memtmp9 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIiED1Ev(%"struct.btAlignedObjectArray<int>"* %mtmp10)
- to label %invcont5 unwind label %lpad
-
-invcont5: ; preds = %bb4
- br label %bb13
-
-bb6: ; preds = %ppad44
- %eh_select7 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select7, i32* %save_filt.628, align 4
- %eh_value8 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value8, i8** %save_eptr.627, align 4
- %11 = load %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %11, i32 0, i32 1 ; [#uses=1]
- store %"struct.btAlignedObjectArray<int>"* %12, %"struct.btAlignedObjectArray<int>"** %memtmp9, align 4
- %13 = load %"struct.btAlignedObjectArray<int>"** %memtmp9, align 4 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIiED1Ev(%"struct.btAlignedObjectArray<int>"* %13)
- to label %invcont11 unwind label %lpad36
-
-invcont11: ; preds = %bb6
- %14 = load i8** %save_eptr.627, align 4 ; [#uses=1]
- store i8* %14, i8** %eh_exception, align 4
- %15 = load i32* %save_filt.628, align 4 ; [#uses=1]
- store i32 %15, i32* %eh_selector, align 4
- br label %ppad
-
-bb12: ; preds = %ppad47
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb13: ; preds = %invcont5
- %16 = load %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %16, i32 0, i32 0 ; [#uses=1]
- store %"struct.btAlignedObjectArray<int>"* %17, %"struct.btAlignedObjectArray<int>"** %memtmp17
- %mtmp18 = load %"struct.btAlignedObjectArray<int>"** %memtmp17 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiED1Ev(%"struct.btAlignedObjectArray<int>"* %mtmp18)
- br label %bb21
-
-bb14: ; preds = %ppad
- %eh_select15 = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select15, i32* %save_filt.630, align 4
- %eh_value16 = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value16, i8** %save_eptr.629, align 4
- %18 = load %"struct.btHashMap<btHashInt,btTriangleInfo>"** %this_addr, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %18, i32 0, i32 0 ; [#uses=1]
- store %"struct.btAlignedObjectArray<int>"* %19, %"struct.btAlignedObjectArray<int>"** %memtmp17, align 4
- %20 = load %"struct.btAlignedObjectArray<int>"** %memtmp17, align 4 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIiED1Ev(%"struct.btAlignedObjectArray<int>"* %20)
- to label %invcont19 unwind label %lpad40
-
-invcont19: ; preds = %bb14
- %21 = load i8** %save_eptr.629, align 4 ; [#uses=1]
- store i8* %21, i8** %eh_exception, align 4
- %22 = load i32* %save_filt.630, align 4 ; [#uses=1]
- store i32 %22, i32* %eh_selector, align 4
- br label %Unwind
-
-bb20: ; preds = %ppad48
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb21: ; preds = %bb13
- br label %return
-
-return: ; preds = %bb21
- ret void
-
-lpad: ; preds = %bb4
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr, i8** %eh_exception
- %eh_ptr22 = load i8** %eh_exception ; [#uses=1]
- %eh_select23 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr22, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select23, i32* %eh_selector
- br label %ppad
-
-lpad24: ; preds = %invcont
- %eh_ptr25 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr25, i8** %eh_exception
- %eh_ptr26 = load i8** %eh_exception ; [#uses=1]
- %eh_select27 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select27, i32* %eh_selector
- br label %ppad44
-
-lpad28: ; preds = %entry
- %eh_ptr29 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr29, i8** %eh_exception
- %eh_ptr30 = load i8** %eh_exception ; [#uses=1]
- %eh_select31 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr30, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select31, i32* %eh_selector
- br label %ppad45
-
-lpad32: ; preds = %bb
- %eh_ptr33 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr33, i8** %eh_exception
- %eh_ptr34 = load i8** %eh_exception ; [#uses=1]
- %eh_select35 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr34, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select35, i32* %eh_selector
- br label %ppad46
-
-lpad36: ; preds = %bb6
- %eh_ptr37 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr37, i8** %eh_exception
- %eh_ptr38 = load i8** %eh_exception ; [#uses=1]
- %eh_select39 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr38, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select39, i32* %eh_selector
- br label %ppad47
-
-lpad40: ; preds = %bb14
- %eh_ptr41 = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr41, i8** %eh_exception
- %eh_ptr42 = load i8** %eh_exception ; [#uses=1]
- %eh_select43 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr42, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=1]
- store i32 %eh_select43, i32* %eh_selector
- br label %ppad48
-
-ppad: ; preds = %lpad, %invcont11
- br label %bb14
-
-ppad44: ; preds = %lpad24, %invcont2
- br label %bb6
-
-ppad45: ; preds = %lpad28
- br label %bb
-
-ppad46: ; preds = %lpad32
- br label %bb3
-
-ppad47: ; preds = %lpad36
- br label %bb12
-
-ppad48: ; preds = %lpad40
- br label %bb20
-
-Unwind: ; preds = %invcont19
- %eh_ptr49 = load i8** %eh_exception ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr49)
- unreachable
-}
-
-; [#uses=830]
-declare i8* @llvm.eh.exception() nounwind readonly
-
-; [#uses=830]
-declare i32 @llvm.eh.selector(i8*, i8*, ...) nounwind
-
-; [#uses=0]
-declare i32 @llvm.eh.typeid.for(i8*) nounwind
-
-; [#uses=374]
-declare void @_ZSt9terminatev() noreturn nounwind
-
-; [#uses=1]
-declare i32 @__gxx_personality_v0(...)
-
-; [#uses=317]
-declare void @_Unwind_Resume_or_Rethrow(i8*)
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTriangleInfoMapD0Ev(%struct.btTriangleInfoMap* %this) align 2 {
-entry:
- %this_addr = alloca %struct.btTriangleInfoMap*, align 4 ; [#uses=4]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTriangleInfoMap* %this, %struct.btTriangleInfoMap** %this_addr
- %0 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTriangleInfoMap* %0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV17btTriangleInfoMap, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %3 = ptrtoint %struct.btTriangleInfoMap* %2 to i32 ; [#uses=1]
- %4 = ptrtoint %struct.btTriangleInfoMap* inttoptr (i64 4 to %struct.btTriangleInfoMap*) to i32 ; [#uses=1]
- %5 = add i32 %3, %4 ; [#uses=1]
- %6 = inttoptr i32 %5 to %struct.btTriangleInfoMap* ; [#uses=1]
- %7 = bitcast %struct.btTriangleInfoMap* %6 to %"struct.btHashMap<btHashInt,btTriangleInfo>"* ; [#uses=1]
- call void @_ZN9btHashMapI9btHashInt14btTriangleInfoED2Ev(%"struct.btHashMap<btHashInt,btTriangleInfo>"* %7)
- br label %bb
-
-bb: ; preds = %entry
- %8 = trunc i32 1 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %8, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %9 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %10 = bitcast %struct.btTriangleInfoMap* %9 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %10) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTriangleInfoMapD1Ev(%struct.btTriangleInfoMap* %this) align 2 {
-entry:
- %this_addr = alloca %struct.btTriangleInfoMap*, align 4 ; [#uses=4]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btTriangleInfoMap* %this, %struct.btTriangleInfoMap** %this_addr
- %0 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTriangleInfoMap* %0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV17btTriangleInfoMap, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %3 = ptrtoint %struct.btTriangleInfoMap* %2 to i32 ; [#uses=1]
- %4 = ptrtoint %struct.btTriangleInfoMap* inttoptr (i64 4 to %struct.btTriangleInfoMap*) to i32 ; [#uses=1]
- %5 = add i32 %3, %4 ; [#uses=1]
- %6 = inttoptr i32 %5 to %struct.btTriangleInfoMap* ; [#uses=1]
- %7 = bitcast %struct.btTriangleInfoMap* %6 to %"struct.btHashMap<btHashInt,btTriangleInfo>"* ; [#uses=1]
- call void @_ZN9btHashMapI9btHashInt14btTriangleInfoED2Ev(%"struct.btHashMap<btHashInt,btTriangleInfo>"* %7)
- br label %bb
-
-bb: ; preds = %entry
- %8 = trunc i32 0 to i8 ; [#uses=1]
- %toBool = icmp ne i8 %8, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %9 = load %struct.btTriangleInfoMap** %this_addr, align 4 ; [#uses=1]
- %10 = bitcast %struct.btTriangleInfoMap* %9 to i8* ; [#uses=1]
- call void @_ZdlPv(i8* %10) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- br label %return
-
-return: ; preds = %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btConvexShapedlEPv(i8* %ptr) inlinehint {
-entry:
- %ptr_addr = alloca i8*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i8* %ptr, i8** %ptr_addr
- %0 = load i8** %ptr_addr, align 4 ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %0)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btAlignedAllocatorIP16btCollisionShapeLj16EE10deallocateEPS1_(%struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.btCollisionShape** %ptr) align 2 {
-entry:
- %this_addr = alloca %struct.CONTACT_KEY_TOKEN_COMP*, align 4 ; [#uses=1]
- %ptr_addr = alloca %struct.btCollisionShape**, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.CONTACT_KEY_TOKEN_COMP** %this_addr
- store %struct.btCollisionShape** %ptr, %struct.btCollisionShape*** %ptr_addr
- %0 = load %struct.btCollisionShape*** %ptr_addr, align 4 ; [#uses=1]
- %1 = bitcast %struct.btCollisionShape** %0 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %1)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE10deallocateEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=6]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %0, i32 0, i32 3 ; [#uses=1]
- %2 = load %struct.btCollisionShape*** %1, align 4 ; [#uses=1]
- %3 = icmp ne %struct.btCollisionShape** %2, null ; [#uses=1]
- br i1 %3, label %bb, label %bb3
-
-bb: ; preds = %entry
- %4 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %4, i32 0, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool = icmp ne i8 %6, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %7 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %7, i32 0, i32 3 ; [#uses=1]
- %9 = load %struct.btCollisionShape*** %8, align 4 ; [#uses=1]
- %10 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %10, i32 0, i32 0 ; [#uses=1]
- call void @_ZN18btAlignedAllocatorIP16btCollisionShapeLj16EE10deallocateEPS1_(%struct.CONTACT_KEY_TOKEN_COMP* %11, %struct.btCollisionShape** %9)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %12 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %12, i32 0, i32 3 ; [#uses=1]
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %13, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- br label %return
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE5clearEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=5]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %1 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4sizeEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %0) nounwind ; [#uses=1]
- %2 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE7destroyEii(%"struct.btAlignedObjectArray<btCollisionShape*>"* %2, i32 0, i32 %1) nounwind
- %3 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE10deallocateEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %3) inlinehint
- %4 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE4initEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %4) nounwind
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this) align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- %0 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE5clearEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %0) inlinehint
- br label %bb
-
-bb: ; preds = %entry
- br label %return
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btSphereShapedlEPv(i8* %ptr) inlinehint {
-entry:
- %ptr_addr = alloca i8*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i8* %ptr, i8** %ptr_addr
- %0 = load i8** %ptr_addr, align 4 ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %0)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN17btCollisionObjectdlEPv(i8* %ptr) inlinehint {
-entry:
- %ptr_addr = alloca i8*, align 4 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i8* %ptr, i8** %ptr_addr
- %0 = load i8** %ptr_addr, align 4 ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %0)
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZN13btConvexShapenwEj(i32 %sizeInBytes) inlinehint {
-entry:
- %sizeInBytes_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca i8* ; [#uses=2]
- %0 = alloca i8* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i32 %sizeInBytes, i32* %sizeInBytes_addr
- %1 = load i32* %sizeInBytes_addr, align 4 ; [#uses=1]
- %2 = call i8* @_Z22btAlignedAllocInternalji(i32 %1, i32 16) ; [#uses=1]
- store i8* %2, i8** %0, align 4
- %3 = load i8** %0, align 4 ; [#uses=1]
- store i8* %3, i8** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i8** %retval ; [#uses=1]
- ret i8* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZN13btSphereShapenwEj(i32 %sizeInBytes) inlinehint {
-entry:
- %sizeInBytes_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca i8* ; [#uses=2]
- %0 = alloca i8* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i32 %sizeInBytes, i32* %sizeInBytes_addr
- %1 = load i32* %sizeInBytes_addr, align 4 ; [#uses=1]
- %2 = call i8* @_Z22btAlignedAllocInternalji(i32 %1, i32 16) ; [#uses=1]
- store i8* %2, i8** %0, align 4
- %3 = load i8** %0, align 4 ; [#uses=1]
- store i8* %3, i8** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i8** %retval ; [#uses=1]
- ret i8* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionShape** @_ZN18btAlignedAllocatorIP16btCollisionShapeLj16EE8allocateEiPPKS1_(%struct.CONTACT_KEY_TOKEN_COMP* %this, i32 %n, %struct.btCollisionShape*** %hint) align 2 {
-entry:
- %this_addr = alloca %struct.CONTACT_KEY_TOKEN_COMP*, align 4 ; [#uses=1]
- %n_addr = alloca i32, align 4 ; [#uses=2]
- %hint_addr = alloca %struct.btCollisionShape***, align 4 ; [#uses=1]
- %retval = alloca %struct.btCollisionShape** ; [#uses=2]
- %0 = alloca %struct.btCollisionShape** ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.CONTACT_KEY_TOKEN_COMP* %this, %struct.CONTACT_KEY_TOKEN_COMP** %this_addr
- store i32 %n, i32* %n_addr
- store %struct.btCollisionShape*** %hint, %struct.btCollisionShape**** %hint_addr
- %1 = load i32* %n_addr, align 4 ; [#uses=1]
- %2 = mul i32 %1, 4 ; [#uses=1]
- %3 = call i8* @_Z22btAlignedAllocInternalji(i32 %2, i32 16) ; [#uses=1]
- %4 = bitcast i8* %3 to %struct.btCollisionShape** ; [#uses=1]
- store %struct.btCollisionShape** %4, %struct.btCollisionShape*** %0, align 4
- %5 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape** %5, %struct.btCollisionShape*** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load %struct.btCollisionShape*** %retval ; [#uses=1]
- ret %struct.btCollisionShape** %retval1
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZN20btAlignedObjectArrayIP16btCollisionShapeE8allocateEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this, i32 %size) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=2]
- %size_addr = alloca i32, align 4 ; [#uses=3]
- %retval = alloca i8* ; [#uses=2]
- %0 = alloca i8* ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- store i32 %size, i32* %size_addr
- %1 = load i32* %size_addr, align 4 ; [#uses=1]
- %2 = icmp ne i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- %3 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %3, i32 0, i32 0 ; [#uses=1]
- %5 = load i32* %size_addr, align 4 ; [#uses=1]
- %6 = call %struct.btCollisionShape** @_ZN18btAlignedAllocatorIP16btCollisionShapeLj16EE8allocateEiPPKS1_(%struct.CONTACT_KEY_TOKEN_COMP* %4, i32 %5, %struct.btCollisionShape*** null) ; [#uses=1]
- %7 = bitcast %struct.btCollisionShape** %6 to i8* ; [#uses=1]
- store i8* %7, i8** %0, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- store i8* null, i8** %0, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %8 = load i8** %0, align 4 ; [#uses=1]
- store i8* %8, i8** %retval, align 4
- br label %return
-
-return: ; preds = %bb2
- %retval3 = load i8** %retval ; [#uses=1]
- ret i8* %retval3
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE7reserveEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this, i32 %_Count) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=11]
- %_Count_addr = alloca i32, align 4 ; [#uses=4]
- %retval.573 = alloca i8 ; [#uses=2]
- %s = alloca %struct.btCollisionShape** ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- store i32 %_Count, i32* %_Count_addr
- %0 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %1 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE8capacityEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %0) nounwind ; [#uses=1]
- %2 = load i32* %_Count_addr, align 4 ; [#uses=1]
- %3 = icmp slt i32 %1, %2 ; [#uses=1]
- %4 = zext i1 %3 to i8 ; [#uses=1]
- store i8 %4, i8* %retval.573, align 1
- %5 = load i8* %retval.573, align 1 ; [#uses=1]
- %toBool = icmp ne i8 %5, 0 ; [#uses=1]
- br i1 %toBool, label %bb, label %bb1
-
-bb: ; preds = %entry
- %6 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %7 = load i32* %_Count_addr, align 4 ; [#uses=1]
- %8 = call i8* @_ZN20btAlignedObjectArrayIP16btCollisionShapeE8allocateEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %6, i32 %7) inlinehint ; [#uses=1]
- %9 = bitcast i8* %8 to %struct.btCollisionShape** ; [#uses=1]
- store %struct.btCollisionShape** %9, %struct.btCollisionShape*** %s, align 4
- %10 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %11 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4sizeEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %10) nounwind ; [#uses=1]
- %12 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %13 = load %struct.btCollisionShape*** %s, align 4 ; [#uses=1]
- call void @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4copyEiiPS1_(%"struct.btAlignedObjectArray<btCollisionShape*>"* %12, i32 0, i32 %11, %struct.btCollisionShape** %13) nounwind
- %14 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %15 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4sizeEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %14) nounwind ; [#uses=1]
- %16 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE7destroyEii(%"struct.btAlignedObjectArray<btCollisionShape*>"* %16, i32 0, i32 %15) nounwind
- %17 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE10deallocateEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %17) inlinehint
- %18 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %18, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- %20 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %20, i32 0, i32 3 ; [#uses=1]
- %22 = load %struct.btCollisionShape*** %s, align 4 ; [#uses=1]
- store %struct.btCollisionShape** %22, %struct.btCollisionShape*** %21, align 4
- %23 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %23, i32 0, i32 2 ; [#uses=1]
- %25 = load i32* %_Count_addr, align 4 ; [#uses=1]
- store i32 %25, i32* %24, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- br label %return
-
-return: ; preds = %bb1
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE9push_backERKS1_(%"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %struct.btCollisionShape** %_Val) inlinehint align 2 {
-entry:
- %this_addr = alloca %"struct.btAlignedObjectArray<btCollisionShape*>"*, align 4 ; [#uses=10]
- %_Val_addr = alloca %struct.btCollisionShape**, align 4 ; [#uses=2]
- %iftmp.506 = alloca %struct.btCollisionShape** ; [#uses=2]
- %0 = alloca %struct.btCollisionShape** ; [#uses=5]
- %retval.505 = alloca i8 ; [#uses=2]
- %sz = alloca i32 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %"struct.btAlignedObjectArray<btCollisionShape*>"* %this, %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr
- store %struct.btCollisionShape** %_Val, %struct.btCollisionShape*** %_Val_addr
- %1 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %2 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4sizeEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %1) nounwind ; [#uses=1]
- store i32 %2, i32* %sz, align 4
- %3 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %4 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE8capacityEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %3) nounwind ; [#uses=1]
- %5 = load i32* %sz, align 4 ; [#uses=1]
- %6 = icmp eq i32 %4, %5 ; [#uses=1]
- %7 = zext i1 %6 to i8 ; [#uses=1]
- store i8 %7, i8* %retval.505, align 1
- %8 = load i8* %retval.505, align 1 ; [#uses=1]
- %toBool = icmp ne i8 %8, 0 ; [#uses=1]
- br i1 %toBool, label %bb, label %bb1
-
-bb: ; preds = %entry
- %9 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %10 = call i32 @_ZNK20btAlignedObjectArrayIP16btCollisionShapeE4sizeEv(%"struct.btAlignedObjectArray<btCollisionShape*>"* %9) nounwind ; [#uses=1]
- %11 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %12 = call i32 @_ZN20btAlignedObjectArrayIP16btCollisionShapeE9allocSizeEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %11, i32 %10) nounwind ; [#uses=1]
- %13 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE7reserveEi(%"struct.btAlignedObjectArray<btCollisionShape*>"* %13, i32 %12) inlinehint
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %14 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %14, i32 0, i32 3 ; [#uses=1]
- %16 = load %struct.btCollisionShape*** %15, align 4 ; [#uses=1]
- %17 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %17, i32 0, i32 1 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionShape** %16, i32 %19 ; [#uses=1]
- %21 = bitcast %struct.btCollisionShape** %20 to i8* ; [#uses=1]
- %22 = call i8* @_ZnwjPv(i32 4, i8* %21) nounwind ; [#uses=1]
- %23 = bitcast i8* %22 to %struct.btCollisionShape** ; [#uses=1]
- store %struct.btCollisionShape** %23, %struct.btCollisionShape*** %0, align 4
- %24 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- %25 = icmp ne %struct.btCollisionShape** %24, null ; [#uses=1]
- br i1 %25, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %26 = load %struct.btCollisionShape*** %_Val_addr, align 4 ; [#uses=1]
- %27 = load %struct.btCollisionShape** %26, align 4 ; [#uses=1]
- %28 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %27, %struct.btCollisionShape** %28, align 4
- %29 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape** %29, %struct.btCollisionShape*** %iftmp.506, align 4
- br label %bb4
-
-bb3: ; preds = %bb1
- %30 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- store %struct.btCollisionShape** %30, %struct.btCollisionShape*** %iftmp.506, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %31 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %31, i32 0, i32 1 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = add nsw i32 %33, 1 ; [#uses=1]
- %35 = load %"struct.btAlignedObjectArray<btCollisionShape*>"** %this_addr, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionShape*>"* %35, i32 0, i32 1 ; [#uses=1]
- store i32 %34, i32* %36, align 4
- br label %return
-
-return: ; preds = %bb4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr i8* @_ZN17btCollisionObjectnwEj(i32 %sizeInBytes) inlinehint {
-entry:
- %sizeInBytes_addr = alloca i32, align 4 ; [#uses=2]
- %retval = alloca i8* ; [#uses=2]
- %0 = alloca i8* ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store i32 %sizeInBytes, i32* %sizeInBytes_addr
- %1 = load i32* %sizeInBytes_addr, align 4 ; [#uses=1]
- %2 = call i8* @_Z22btAlignedAllocInternalji(i32 %1, i32 16) ; [#uses=1]
- store i8* %2, i8** %0, align 4
- %3 = load i8** %0, align 4 ; [#uses=1]
- store i8* %3, i8** %retval, align 4
- br label %return
-
-return: ; preds = %entry
- %retval1 = load i8** %retval ; [#uses=1]
- ret i8* %retval1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN10btBoxShapeC1ERK9btVector3(%struct.btBoxShape* %this, %struct.btQuadWord* %boxHalfExtents) align 2 {
-entry:
- %this_addr = alloca %struct.btBoxShape*, align 4 ; [#uses=9]
- %boxHalfExtents_addr = alloca %struct.btQuadWord*, align 4 ; [#uses=2]
- %0 = alloca %struct.btQuadWord ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %3 = alloca float ; [#uses=2]
- %margin = alloca %struct.btQuadWord ; [#uses=2]
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btBoxShape* %this, %struct.btBoxShape** %this_addr
- store %struct.btQuadWord* %boxHalfExtents, %struct.btQuadWord** %boxHalfExtents_addr
- %4 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btBoxShape* %4, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %5)
- %6 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBoxShape* %6, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btPolyhedralConvexShape* %7, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexInternalShape* %8, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btConvexShape* %9, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionShape* %10, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV10btBoxShape, i32 0, i32 2), i32 (...)*** %11, align 4
- %12 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btBoxShape* %12, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btPolyhedralConvexShape* %13, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btConvexInternalShape* %14, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btConvexShape* %15, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionShape* %16, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btBoxShape* %18, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btPolyhedralConvexShape* %19, i32 0, i32 0 ; [#uses=1]
- %21 = call float @_ZNK21btConvexInternalShape9getMarginEv(%struct.btConvexInternalShape* %20) nounwind ; [#uses=1]
- store float %21, float* %3, align 4
- %22 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btBoxShape* %22, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btPolyhedralConvexShape* %23, i32 0, i32 0 ; [#uses=1]
- %25 = call float @_ZNK21btConvexInternalShape9getMarginEv(%struct.btConvexInternalShape* %24) nounwind ; [#uses=1]
- store float %25, float* %2, align 4
- %26 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btBoxShape* %26, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btPolyhedralConvexShape* %27, i32 0, i32 0 ; [#uses=1]
- %29 = call float @_ZNK21btConvexInternalShape9getMarginEv(%struct.btConvexInternalShape* %28) nounwind ; [#uses=1]
- store float %29, float* %1, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %margin, float* %1, float* %2, float* %3) nounwind
- %30 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btBoxShape* %30, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btPolyhedralConvexShape* %31, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btConvexInternalShape* %32, i32 0, i32 1 ; [#uses=1]
- %34 = load %struct.btQuadWord** %boxHalfExtents_addr, align 4 ; [#uses=1]
- call void @_ZmlRK9btVector3S1_(%struct.btQuadWord* noalias sret %0, %struct.btQuadWord* %34, %struct.btQuadWord* %33) nounwind
- %35 = load %struct.btBoxShape** %this_addr, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btBoxShape* %35, i32 0, i32 0 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btPolyhedralConvexShape* %36, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btConvexInternalShape* %37, i32 0, i32 2 ; [#uses=1]
- call void @_ZmiRK9btVector3S1_(%struct.btQuadWord* noalias sret %memtmp, %struct.btQuadWord* %0, %struct.btQuadWord* %margin) nounwind
- %39 = getelementptr inbounds %struct.btQuadWord* %38, i32 0, i32 0 ; [#uses=4]
- %40 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0 ; [#uses=4]
- %41 = getelementptr inbounds [4 x float]* %39, i32 0, i32 0 ; [#uses=1]
- %42 = getelementptr inbounds [4 x float]* %40, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds [4 x float]* %39, i32 0, i32 1 ; [#uses=1]
- %45 = getelementptr inbounds [4 x float]* %40, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds [4 x float]* %39, i32 0, i32 2 ; [#uses=1]
- %48 = getelementptr inbounds [4 x float]* %40, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds [4 x float]* %39, i32 0, i32 3 ; [#uses=1]
- %51 = getelementptr inbounds [4 x float]* %40, i32 0, i32 3 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btSphereShapeC1Ef(%struct.btPolyhedralConvexShape* %this, float %radius) align 2 {
-entry:
- %this_addr = alloca %struct.btPolyhedralConvexShape*, align 4 ; [#uses=6]
- %radius_addr = alloca float, align 4 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- store %struct.btPolyhedralConvexShape* %this, %struct.btPolyhedralConvexShape** %this_addr
- store float %radius, float* %radius_addr
- %0 = load %struct.btPolyhedralConvexShape** %this_addr, align 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %1)
- %2 = load %struct.btPolyhedralConvexShape** %this_addr, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btPolyhedralConvexShape* %2, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btConvexInternalShape* %3, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btConvexShape* %4, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionShape* %5, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %6, align 4
- %7 = load %struct.btPolyhedralConvexShape** %this_addr, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btPolyhedralConvexShape* %7, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexInternalShape* %8, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btConvexShape* %9, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionShape* %10, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %11, align 4
- %12 = load %struct.btPolyhedralConvexShape** %this_addr, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btPolyhedralConvexShape* %12, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btConvexInternalShape* %13, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %radius_addr, align 4 ; [#uses=1]
- call void @_ZN9btVector34setXEf(%struct.btQuadWord* %14, float %15) nounwind
- %16 = load %struct.btPolyhedralConvexShape** %this_addr, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btPolyhedralConvexShape* %16, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btConvexInternalShape* %17, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %radius_addr, align 4 ; [#uses=1]
- store float %19, float* %18, align 4
- br label %return
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btMatrix3x3* @_ZN11btMatrix3x311getIdentityEv() {
-entry:
- %retval = alloca %struct.btMatrix3x3* ; [#uses=2]
- %save_filt.654 = alloca i32 ; [#uses=2]
- %save_eptr.653 = alloca i8* ; [#uses=2]
- %0 = alloca %struct.btMatrix3x3* ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %3 = alloca float ; [#uses=2]
- %4 = alloca float ; [#uses=2]
- %5 = alloca float ; [#uses=2]
- %6 = alloca float ; [#uses=2]
- %7 = alloca float ; [#uses=2]
- %8 = alloca float ; [#uses=2]
- %9 = alloca float ; [#uses=2]
- %10 = alloca i8 ; [#uses=3]
- %retval.48 = alloca i8 ; [#uses=2]
- %eh_exception = alloca i8* ; [#uses=5]
- %eh_selector = alloca i32 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- %11 = load i8* bitcast (i64* @_ZGVZN11btMatrix3x311getIdentityEvE14identityMatrix to i8*), align 1 ; [#uses=1]
- %12 = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %12, label %bb, label %bb9
-
-bb: ; preds = %entry
- %13 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN11btMatrix3x311getIdentityEvE14identityMatrix) nounwind ; [#uses=1]
- %14 = icmp ne i32 %13, 0 ; [#uses=1]
- %15 = zext i1 %14 to i8 ; [#uses=1]
- store i8 %15, i8* %retval.48, align 1
- %16 = load i8* %retval.48, align 1 ; [#uses=1]
- %toBool = icmp ne i8 %16, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb9
-
-bb1: ; preds = %bb
- store i8 0, i8* %10, align 1
- store float 1.000000e+00, float* %9, align 4
- store float 0.000000e+00, float* %8, align 4
- store float 0.000000e+00, float* %7, align 4
- store float 0.000000e+00, float* %6, align 4
- store float 1.000000e+00, float* %5, align 4
- store float 0.000000e+00, float* %4, align 4
- store float 0.000000e+00, float* %3, align 4
- store float 0.000000e+00, float* %2, align 4
- store float 1.000000e+00, float* %1, align 4
- invoke void @_ZN11btMatrix3x3C1ERKfS1_S1_S1_S1_S1_S1_S1_S1_(%struct.btMatrix3x3* @_ZZN11btMatrix3x311getIdentityEvE14identityMatrix, float* %1, float* %2, float* %3, float* %4, float* %5, float* %6, float* %7, float* %8, float* %9)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb1
- store i8 1, i8* %10, align 1
- call void @__cxa_guard_release(i64* @_ZGVZN11btMatrix3x311getIdentityEvE14identityMatrix) nounwind
- br label %bb9
-
-bb2: ; preds = %ppad
- %eh_select = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select, i32* %save_filt.654, align 4
- %eh_value = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value, i8** %save_eptr.653, align 4
- %17 = load i8* %10, align 1 ; [#uses=1]
- %toBool3 = icmp ne i8 %17, 0 ; [#uses=1]
- %toBool3not = xor i1 %toBool3, true ; [#uses=1]
- %toBool3not4 = zext i1 %toBool3not to i8 ; [#uses=1]
- %toBool6 = icmp ne i8 %toBool3not4, 0 ; [#uses=1]
- br i1 %toBool6, label %bb7, label %bb8
-
-bb7: ; preds = %bb2
- call void @__cxa_guard_abort(i64* @_ZGVZN11btMatrix3x311getIdentityEvE14identityMatrix) nounwind
- br label %bb8
-
-bb8: ; preds = %bb7, %bb2
- %18 = load i8** %save_eptr.653, align 4 ; [#uses=1]
- store i8* %18, i8** %eh_exception, align 4
- %19 = load i32* %save_filt.654, align 4 ; [#uses=1]
- store i32 %19, i32* %eh_selector, align 4
- br label %Unwind
-
-bb9: ; preds = %invcont, %bb, %entry
- store %struct.btMatrix3x3* @_ZZN11btMatrix3x311getIdentityEvE14identityMatrix, %struct.btMatrix3x3** %0, align 4
- %20 = load %struct.btMatrix3x3** %0, align 4 ; [#uses=1]
- store %struct.btMatrix3x3* %20, %struct.btMatrix3x3** %retval, align 4
- br label %return
-
-return: ; preds = %bb9
- %retval10 = load %struct.btMatrix3x3** %retval ; [#uses=1]
- ret %struct.btMatrix3x3* %retval10
-
-lpad: ; preds = %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr, i8** %eh_exception
- %eh_ptr11 = load i8** %eh_exception ; [#uses=1]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select12, i32* %eh_selector
- br label %ppad
-
-ppad: ; preds = %lpad
- br label %bb2
-
-Unwind: ; preds = %bb8
- %eh_ptr13 = load i8** %eh_exception ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr13)
- unreachable
-}
-
-; [#uses=25]
-declare i32 @__cxa_guard_acquire(i64*) nounwind
-
-; [#uses=25]
-declare void @__cxa_guard_release(i64*) nounwind
-
-; [#uses=5]
-declare void @__cxa_guard_abort(i64*) nounwind
-
-; [#uses=7]
-define linkonce_odr %struct.btTransform* @_ZN11btTransform11getIdentityEv() {
-entry:
- %retval = alloca %struct.btTransform* ; [#uses=2]
- %save_filt.652 = alloca i32 ; [#uses=2]
- %save_eptr.651 = alloca i8* ; [#uses=2]
- %0 = alloca %struct.btTransform* ; [#uses=2]
- %1 = alloca float ; [#uses=2]
- %2 = alloca float ; [#uses=2]
- %3 = alloca float ; [#uses=2]
- %4 = alloca %struct.btQuadWord ; [#uses=2]
- %5 = alloca i8 ; [#uses=3]
- %retval.99 = alloca i8 ; [#uses=2]
- %eh_exception = alloca i8* ; [#uses=5]
- %eh_selector = alloca i32 ; [#uses=3]
- %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
- %6 = load i8* bitcast (i64* @_ZGVZN11btTransform11getIdentityEvE17identityTransform to i8*), align 1 ; [#uses=1]
- %7 = icmp eq i8 %6, 0 ; [#uses=1]
- br i1 %7, label %bb, label %bb9
-
-bb: ; preds = %entry
- %8 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN11btTransform11getIdentityEvE17identityTransform) nounwind ; [#uses=1]
- %9 = icmp ne i32 %8, 0 ; [#uses=1]
- %10 = zext i1 %9 to i8 ; [#uses=1]
- store i8 %10, i8* %retval.99, align 1
- %11 = load i8* %retval.99, align 1 ; [#uses=1]
- %toBool = icmp ne i8 %11, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb9
-
-bb1: ; preds = %bb
- store i8 0, i8* %5, align 1
- store float 0.000000e+00, float* %3, align 4
- store float 0.000000e+00, float* %2, align 4
- store float 0.000000e+00, float* %1, align 4
- call void @_ZN9btVector3C1ERKfS1_S1_(%struct.btQuadWord* %4, float* %1, float* %2, float* %3) nounwind
- %12 = invoke %struct.btMatrix3x3* @_ZN11btMatrix3x311getIdentityEv()
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb1
- call void @_ZN11btTransformC1ERK11btMatrix3x3RK9btVector3(%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, %struct.btMatrix3x3* %12, %struct.btQuadWord* %4) nounwind
- store i8 1, i8* %5, align 1
- call void @__cxa_guard_release(i64* @_ZGVZN11btTransform11getIdentityEvE17identityTransform) nounwind
- br label %bb9
-
-bb2: ; preds = %ppad
- %eh_select = load i32* %eh_selector ; [#uses=1]
- store i32 %eh_select, i32* %save_filt.652, align 4
- %eh_value = load i8** %eh_exception ; [#uses=1]
- store i8* %eh_value, i8** %save_eptr.651, align 4
- %13 = load i8* %5, align 1 ; [#uses=1]
- %toBool3 = icmp ne i8 %13, 0 ; [#uses=1]
- %toBool3not = xor i1 %toBool3, true ; [#uses=1]
- %toBool3not4 = zext i1 %toBool3not to i8 ; [#uses=1]
- %toBool6 = icmp ne i8 %toBool3not4, 0 ; [#uses=1]
- br i1 %toBool6, label %bb7, label %bb8
-
-bb7: ; preds = %bb2
- call void @__cxa_guard_abort(i64* @_ZGVZN11btTransform11getIdentityEvE17identityTransform) nounwind
- br label %bb8
-
-bb8: ; preds = %bb7, %bb2
- %14 = load i8** %save_eptr.651, align 4 ; [#uses=1]
- store i8* %14, i8** %eh_exception, align 4
- %15 = load i32* %save_filt.652, align 4 ; [#uses=1]
- store i32 %15, i32* %eh_selector, align 4
- br label %Unwind
-
-bb9: ; preds = %invcont, %bb, %entry
- store %struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, %struct.btTransform** %0, align 4
- %16 = load %struct.btTransform** %0, align 4 ; [#uses=1]
- store %struct.btTransform* %16, %struct.btTransform** %retval, align 4
- br label %return
-
-return: ; preds = %bb9
- %retval10 = load %struct.btTransform** %retval ; [#uses=1]
- ret %struct.btTransform* %retval10
-
-lpad: ; preds = %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=1]
- store i8* %eh_ptr, i8** %eh_exception
- %eh_ptr11 = load i8** %eh_exception ; [#uses=1]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=1]
- store i32 %eh_select12, i32* %eh_selector
- br label %ppad
-
-ppad: ; preds = %lpad
- br label %bb2
-
-Unwind: ; preds = %bb8
- %eh_ptr13 = load i8** %eh_exception ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr13)
- unreachable
-}
-
-; [#uses=15]
-declare i8* @_Znwj(i32)
-
-; [#uses=8]
-declare i32 @printf(i8* noalias, ...)
-
-; [#uses=0]
-define void @_ZN12btAxisSweep3C2ERK9btVector3S2_tP22btOverlappingPairCacheb(%struct.btAxisSweep3* %this, %struct.btQuadWord* nocapture %worldAabbMin, %struct.btQuadWord* nocapture %worldAabbMax, i16 zeroext %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalItEC2ERK9btVector3S3_tttP22btOverlappingPairCacheb(%"struct.btAxisSweep3Internal<short unsigned int>"* %0, %struct.btQuadWord* %worldAabbMin, %struct.btQuadWord* %worldAabbMax, i16 zeroext -2, i16 zeroext -1, i16 zeroext %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator)
- %1 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV12btAxisSweep3, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btBroadphaseInterface9resetPoolEP12btDispatcher(%struct.btActionInterface* nocapture %this, %struct.btActionInterface* nocapture %dispatcher) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %"struct.btAlignedObjectArray<btBroadphasePair>"* @_ZN15btNullPairCache23getOverlappingPairArrayEv(%struct.btNullPairCache* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1 ; [#uses=1]
- ret %"struct.btAlignedObjectArray<btBroadphasePair>"* %0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher(%struct.btNullPairCache* nocapture %this, %struct.btBroadphasePair* nocapture %unnamed_arg, %struct.btActionInterface* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btNullPairCache22getNumOverlappingPairsEv(%struct.btNullPairCache* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher(%struct.btNullPairCache* nocapture %this, %struct.btBroadphaseProxy* nocapture %unnamed_arg, %struct.btActionInterface* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback(%struct.btNullPairCache* nocapture %this, %struct.btActionInterface* nocapture %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher(%struct.btNullPairCache* nocapture %this, %struct.btActionInterface* nocapture %unnamed_arg, %struct.btActionInterface* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btBroadphasePair* @_ZN15btNullPairCache8findPairEP17btBroadphaseProxyS1_(%struct.btNullPairCache* nocapture %this, %struct.btBroadphaseProxy* nocapture %unnamed_arg, %struct.btBroadphaseProxy* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret %struct.btBroadphasePair* null
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN15btNullPairCache18hasDeferredRemovalEv(%struct.btNullPairCache* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback(%struct.btNullPairCache* nocapture %this, %struct.btActionInterface* nocapture %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btBroadphasePair* @_ZN15btNullPairCache18addOverlappingPairEP17btBroadphaseProxyS1_(%struct.btNullPairCache* nocapture %this, %struct.btBroadphaseProxy* nocapture %unnamed_arg, %struct.btBroadphaseProxy* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret %struct.btBroadphasePair* null
-}
-
-; [#uses=1]
-define linkonce_odr noalias i8* @_ZN15btNullPairCache21removeOverlappingPairEP17btBroadphaseProxyS1_P12btDispatcher(%struct.btNullPairCache* nocapture %this, %struct.btBroadphaseProxy* nocapture %unnamed_arg, %struct.btBroadphaseProxy* nocapture %unnamed_arg2, %struct.btActionInterface* nocapture %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret i8* null
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher(%struct.btNullPairCache* nocapture %this, %struct.btBroadphaseProxy* nocapture %unnamed_arg, %struct.btActionInterface* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCache20sortOverlappingPairsEP12btDispatcher(%struct.btNullPairCache* nocapture %this, %struct.btActionInterface* nocapture %dispatcher) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphasePair* @_ZN15btNullPairCache26getOverlappingPairArrayPtrEv(%struct.btNullPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btBroadphasePair** %0, align 4 ; [#uses=1]
- ret %struct.btBroadphasePair* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphasePair* @_ZNK15btNullPairCache26getOverlappingPairArrayPtrEv(%struct.btNullPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btBroadphasePair** %0, align 4 ; [#uses=1]
- ret %struct.btBroadphasePair* %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btBroadphaseInterfaceD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btBroadphaseInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btBroadphaseInterfaceD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btBroadphaseInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btOverlappingPairCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV25btOverlappingPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btOverlappingPairCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV25btOverlappingPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btOverlappingPairCacheD1Ev(%struct..0btMultiSapOverlapFilterCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV22btOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btOverlappingPairCacheD0Ev(%struct..0btMultiSapOverlapFilterCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV22btOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0btMultiSapOverlapFilterCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btAxisSweep3InternalIjE7getAabbEP17btBroadphaseProxyR9btVector3S4_(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZN20btAxisSweep3InternalIjE23getOverlappingPairCacheEv(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZNK20btAxisSweep3InternalIjE23getOverlappingPairCacheEv(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btAxisSweep3InternalIjE17getBroadphaseAabbER9btVector3S2_(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE9resetPoolEP12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btActionInterface* nocapture %dispatcher) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 9 ; [#uses=1]
- store i32 1, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 7 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=2]
- %6 = icmp ugt i32 %5, 1 ; [#uses=1]
- br i1 %6, label %bb.nph, label %bb3
-
-bb.nph: ; preds = %bb
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %tmp, %bb1 ] ; [#uses=2]
- %tmp = add i32 %indvar, 1 ; [#uses=2]
- %tmp6 = add i32 %indvar, 2 ; [#uses=2]
- %8 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %7, align 4 ; [#uses=1]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %8, i32 %tmp, i32 1, i32 0 ; [#uses=1]
- store i32 %tmp6, i32* %scevgep, align 4
- %9 = load i32* %4, align 4 ; [#uses=2]
- %10 = icmp ugt i32 %9, %tmp6 ; [#uses=1]
- br i1 %10, label %bb1, label %bb3
-
-bb3: ; preds = %bb1, %bb
- %11 = phi i32 [ %5, %bb ], [ %9, %bb1 ] ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %13 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %12, align 4 ; [#uses=1]
- %14 = add i32 %11, -1 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %14, i32 1, i32 0 ; [#uses=1]
- store i32 0, i32* %15, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE10printStatsEv(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btAxisSweep3InternalItE7getAabbEP17btBroadphaseProxyR9btVector3S4_(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZN20btAxisSweep3InternalItE23getOverlappingPairCacheEv(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZNK20btAxisSweep3InternalItE23getOverlappingPairCacheEv(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btAxisSweep3InternalItE17getBroadphaseAabbER9btVector3S2_(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE9resetPoolEP12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btActionInterface* nocapture %dispatcher) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i16* %0, align 4 ; [#uses=1]
- %2 = icmp eq i16 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 9 ; [#uses=1]
- store i16 1, i16* %3, align 4
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 7 ; [#uses=2]
- %5 = load i16* %4, align 2 ; [#uses=2]
- %6 = icmp ugt i16 %5, 1 ; [#uses=1]
- br i1 %6, label %bb.nph, label %bb3
-
-bb.nph: ; preds = %bb
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph
- %indvar = phi i16 [ 0, %bb.nph ], [ %i.05, %bb1 ] ; [#uses=2]
- %i.05 = add i16 %indvar, 1 ; [#uses=2]
- %tmp = add i16 %indvar, 2 ; [#uses=2]
- %8 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %7, align 4 ; [#uses=1]
- %9 = zext i16 %i.05 to i32 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %8, i32 %9, i32 1, i32 0 ; [#uses=1]
- store i16 %tmp, i16* %10, align 2
- %11 = load i16* %4, align 2 ; [#uses=2]
- %12 = icmp ugt i16 %11, %tmp ; [#uses=1]
- br i1 %12, label %bb1, label %bb3
-
-bb3: ; preds = %bb1, %bb
- %13 = phi i16 [ %5, %bb ], [ %11, %bb1 ] ; [#uses=1]
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %15 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %14, align 4 ; [#uses=1]
- %16 = zext i16 %13 to i32 ; [#uses=1]
- %17 = add nsw i32 %16, -1 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %17, i32 1, i32 0 ; [#uses=1]
- store i16 0, i16* %18, align 2
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE10printStatsEv(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE8aabbTestERK9btVector3S3_R24btBroadphaseAabbCallback(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %callback) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %1 = load %struct.btDbvtBroadphase** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btDbvtBroadphase* %1, null ; [#uses=1]
- br i1 %2, label %bb7.preheader, label %bb
-
-bb7.preheader: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 6 ; [#uses=2]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = shl i32 %4, 1 ; [#uses=1]
- %6 = or i32 %5, 1 ; [#uses=1]
- %7 = icmp eq i32 %6, 1 ; [#uses=1]
- br i1 %7, label %return, label %bb.nph
-
-bb: ; preds = %entry
- %8 = getelementptr inbounds %struct.btDbvtBroadphase* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 7 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %12(%struct.btDbvtBroadphase* %1, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %callback)
- ret void
-
-bb.nph: ; preds = %bb7.preheader
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb6, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %tmp, %bb6 ] ; [#uses=2]
- %tmp = add i32 %indvar, 1 ; [#uses=3]
- %tmp13 = add i32 %indvar, 2 ; [#uses=1]
- %22 = load %struct.CONTACT_KEY_TOKEN** %13, align 4 ; [#uses=2]
- %scevgep1112 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %22, i32 %tmp, i32 0 ; [#uses=1]
- %23 = load i32* %scevgep1112, align 4 ; [#uses=1]
- %24 = and i32 %23, 1 ; [#uses=1]
- %25 = icmp eq i32 %24, 0 ; [#uses=1]
- br i1 %25, label %bb6, label %bb3
-
-bb3: ; preds = %bb2
- %scevgep = getelementptr %struct.CONTACT_KEY_TOKEN* %22, i32 %tmp, i32 1 ; [#uses=1]
- %26 = load i32* %scevgep, align 4 ; [#uses=7]
- %27 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %14, align 4 ; [#uses=7]
- %28 = load float* %15, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 %26, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fcmp ogt float %28, %30 ; [#uses=1]
- br i1 %31, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %bb3
- %32 = load float* %21, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 %26, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fcmp olt float %32, %34 ; [#uses=1]
- br i1 %35, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb.i, %bb3
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb.i
- %iftmp.122.0.i = phi i8 [ 0, %bb2.i ], [ 1, %bb.i ] ; [#uses=1]
- %36 = load float* %16, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 %26, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fcmp ogt float %36, %38 ; [#uses=1]
- br i1 %39, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %40 = load float* %20, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 %26, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fcmp olt float %40, %42 ; [#uses=1]
- br i1 %43, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i
- %iftmp.123.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.122.0.i, %bb4.i ] ; [#uses=1]
- %44 = load float* %17, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 %26, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fcmp ogt float %44, %46 ; [#uses=1]
- br i1 %47, label %bb6, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- %48 = load float* %18, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 %26, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fcmp olt float %48, %50 ; [#uses=1]
- %phitmp9 = icmp eq i8 %iftmp.123.0.i, 0 ; [#uses=1]
- %phitmp = or i1 %51, %phitmp9 ; [#uses=1]
- br i1 %phitmp, label %bb6, label %bb5
-
-bb5: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
- %52 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %53 = getelementptr inbounds i32 (...)** %52, i32 2 ; [#uses=1]
- %54 = load i32 (...)** %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 %26, i32 0 ; [#uses=1]
- %56 = bitcast i32 (...)* %54 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %57 = tail call zeroext i8 %56(%struct.btActionInterface* %callback, %struct.btBroadphaseProxy* %55) ; [#uses=0]
- br label %bb6
-
-bb6: ; preds = %bb5, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb7.i, %bb2
- %58 = load i32* %3, align 4 ; [#uses=1]
- %59 = shl i32 %58, 1 ; [#uses=1]
- %60 = or i32 %59, 1 ; [#uses=1]
- %61 = icmp ugt i32 %60, %tmp13 ; [#uses=1]
- br i1 %61, label %bb2, label %return
-
-return: ; preds = %bb6, %bb7.preheader
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE7rayTestERK9btVector3S3_R23btBroadphaseRayCallbackS3_S3_(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btQuadWord* %rayFrom, %struct.btQuadWord* %rayTo, %struct.btBroadphaseRayCallback* %rayCallback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %1 = load %struct.btDbvtBroadphase** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btDbvtBroadphase* %1, null ; [#uses=1]
- br i1 %2, label %bb5.preheader, label %bb
-
-bb5.preheader: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 6 ; [#uses=2]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = shl i32 %4, 1 ; [#uses=1]
- %6 = or i32 %5, 1 ; [#uses=1]
- %7 = icmp eq i32 %6, 1 ; [#uses=1]
- br i1 %7, label %return, label %bb.nph
-
-bb: ; preds = %entry
- %8 = getelementptr inbounds %struct.btDbvtBroadphase* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 6 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %12(%struct.btDbvtBroadphase* %1, %struct.btQuadWord* %rayFrom, %struct.btQuadWord* %rayTo, %struct.btBroadphaseRayCallback* %rayCallback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-
-bb.nph: ; preds = %bb5.preheader
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb4, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %tmp, %bb4 ] ; [#uses=2]
- %tmp = add i32 %indvar, 1 ; [#uses=3]
- %tmp10 = add i32 %indvar, 2 ; [#uses=1]
- %17 = load %struct.CONTACT_KEY_TOKEN** %13, align 4 ; [#uses=2]
- %scevgep89 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %17, i32 %tmp, i32 0 ; [#uses=1]
- %18 = load i32* %scevgep89, align 4 ; [#uses=1]
- %19 = and i32 %18, 1 ; [#uses=1]
- %20 = icmp eq i32 %19, 0 ; [#uses=1]
- br i1 %20, label %bb4, label %bb3
-
-bb3: ; preds = %bb2
- %21 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 2 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.CONTACT_KEY_TOKEN* %17, i32 %tmp, i32 1 ; [#uses=1]
- %24 = load i32* %scevgep, align 4 ; [#uses=1]
- %25 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %15, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %25, i32 %24, i32 0 ; [#uses=1]
- %27 = bitcast i32 (...)* %23 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %28 = tail call zeroext i8 %27(%struct.btActionInterface* %16, %struct.btBroadphaseProxy* %26) ; [#uses=0]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %29 = load i32* %3, align 4 ; [#uses=1]
- %30 = shl i32 %29, 1 ; [#uses=1]
- %31 = or i32 %30, 1 ; [#uses=1]
- %32 = icmp ugt i32 %31, %tmp10 ; [#uses=1]
- br i1 %32, label %bb2, label %return
-
-return: ; preds = %bb4, %bb5.preheader
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE8aabbTestERK9btVector3S3_R24btBroadphaseAabbCallback(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %callback) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %1 = load %struct.btDbvtBroadphase** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btDbvtBroadphase* %1, null ; [#uses=1]
- br i1 %2, label %bb7.preheader, label %bb
-
-bb7.preheader: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 6 ; [#uses=2]
- %4 = load i16* %3, align 4 ; [#uses=1]
- %5 = zext i16 %4 to i32 ; [#uses=1]
- %6 = shl i32 %5, 1 ; [#uses=1]
- %7 = or i32 %6, 1 ; [#uses=1]
- %8 = icmp eq i32 %7, 1 ; [#uses=1]
- br i1 %8, label %return, label %bb.nph
-
-bb: ; preds = %entry
- %9 = getelementptr inbounds %struct.btDbvtBroadphase* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 7 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to void (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %13(%struct.btDbvtBroadphase* %1, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %callback)
- ret void
-
-bb.nph: ; preds = %bb7.preheader
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb6, %bb.nph
- %indvar = phi i16 [ 0, %bb.nph ], [ %i.010, %bb6 ] ; [#uses=2]
- %i.010 = add i16 %indvar, 1 ; [#uses=2]
- %tmp = add i16 %indvar, 2 ; [#uses=1]
- %23 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %14, align 4 ; [#uses=2]
- %24 = zext i16 %i.010 to i32 ; [#uses=2]
- %25 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %23, i32 %24, i32 0 ; [#uses=1]
- %26 = load i16* %25, align 2 ; [#uses=1]
- %27 = and i16 %26, 1 ; [#uses=1]
- %28 = icmp eq i16 %27, 0 ; [#uses=1]
- br i1 %28, label %bb6, label %bb3
-
-bb3: ; preds = %bb2
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %23, i32 %24, i32 1 ; [#uses=1]
- %30 = load i16* %29, align 2 ; [#uses=1]
- %31 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %15, align 4 ; [#uses=7]
- %32 = zext i16 %30 to i32 ; [#uses=7]
- %33 = load float* %16, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %31, i32 %32, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fcmp ogt float %33, %35 ; [#uses=1]
- br i1 %36, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %bb3
- %37 = load float* %22, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %31, i32 %32, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fcmp olt float %37, %39 ; [#uses=1]
- br i1 %40, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb.i, %bb3
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb.i
- %iftmp.122.0.i = phi i8 [ 0, %bb2.i ], [ 1, %bb.i ] ; [#uses=1]
- %41 = load float* %17, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %31, i32 %32, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fcmp ogt float %41, %43 ; [#uses=1]
- br i1 %44, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %45 = load float* %21, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %31, i32 %32, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fcmp olt float %45, %47 ; [#uses=1]
- br i1 %48, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i
- %iftmp.123.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.122.0.i, %bb4.i ] ; [#uses=1]
- %49 = load float* %18, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %31, i32 %32, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fcmp ogt float %49, %51 ; [#uses=1]
- br i1 %52, label %bb6, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- %53 = load float* %19, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %31, i32 %32, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fcmp olt float %53, %55 ; [#uses=1]
- %phitmp9 = icmp eq i8 %iftmp.123.0.i, 0 ; [#uses=1]
- %phitmp = or i1 %56, %phitmp9 ; [#uses=1]
- br i1 %phitmp, label %bb6, label %bb5
-
-bb5: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
- %57 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %58 = getelementptr inbounds i32 (...)** %57, i32 2 ; [#uses=1]
- %59 = load i32 (...)** %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %31, i32 %32, i32 0 ; [#uses=1]
- %61 = bitcast i32 (...)* %59 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %62 = tail call zeroext i8 %61(%struct.btActionInterface* %callback, %struct.btBroadphaseProxy* %60) ; [#uses=0]
- br label %bb6
-
-bb6: ; preds = %bb5, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb7.i, %bb2
- %63 = zext i16 %tmp to i32 ; [#uses=1]
- %64 = load i16* %3, align 4 ; [#uses=1]
- %65 = zext i16 %64 to i32 ; [#uses=1]
- %66 = shl i32 %65, 1 ; [#uses=1]
- %67 = or i32 %66, 1 ; [#uses=1]
- %68 = icmp ult i32 %63, %67 ; [#uses=1]
- br i1 %68, label %bb2, label %return
-
-return: ; preds = %bb6, %bb7.preheader
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE7rayTestERK9btVector3S3_R23btBroadphaseRayCallbackS3_S3_(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btQuadWord* %rayFrom, %struct.btQuadWord* %rayTo, %struct.btBroadphaseRayCallback* %rayCallback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %1 = load %struct.btDbvtBroadphase** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btDbvtBroadphase* %1, null ; [#uses=1]
- br i1 %2, label %bb5.preheader, label %bb
-
-bb5.preheader: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 6 ; [#uses=2]
- %4 = load i16* %3, align 4 ; [#uses=1]
- %5 = zext i16 %4 to i32 ; [#uses=1]
- %6 = shl i32 %5, 1 ; [#uses=1]
- %7 = or i32 %6, 1 ; [#uses=1]
- %8 = icmp eq i32 %7, 1 ; [#uses=1]
- br i1 %8, label %return, label %bb.nph
-
-bb: ; preds = %entry
- %9 = getelementptr inbounds %struct.btDbvtBroadphase* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 6 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to void (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %13(%struct.btDbvtBroadphase* %1, %struct.btQuadWord* %rayFrom, %struct.btQuadWord* %rayTo, %struct.btBroadphaseRayCallback* %rayCallback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-
-bb.nph: ; preds = %bb5.preheader
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb4, %bb.nph
- %indvar = phi i16 [ 0, %bb.nph ], [ %i.07, %bb4 ] ; [#uses=2]
- %i.07 = add i16 %indvar, 1 ; [#uses=2]
- %tmp = add i16 %indvar, 2 ; [#uses=1]
- %18 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %14, align 4 ; [#uses=2]
- %19 = zext i16 %i.07 to i32 ; [#uses=2]
- %20 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %18, i32 %19, i32 0 ; [#uses=1]
- %21 = load i16* %20, align 2 ; [#uses=1]
- %22 = and i16 %21, 1 ; [#uses=1]
- %23 = icmp eq i16 %22, 0 ; [#uses=1]
- br i1 %23, label %bb4, label %bb3
-
-bb3: ; preds = %bb2
- %24 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 2 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %18, i32 %19, i32 1 ; [#uses=1]
- %28 = load i16* %27, align 2 ; [#uses=1]
- %29 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %16, align 4 ; [#uses=1]
- %30 = zext i16 %28 to i32 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %29, i32 %30, i32 0 ; [#uses=1]
- %32 = bitcast i32 (...)* %26 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %33 = tail call zeroext i8 %32(%struct.btActionInterface* %17, %struct.btBroadphaseProxy* %31) ; [#uses=0]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %34 = zext i16 %tmp to i32 ; [#uses=1]
- %35 = load i16* %3, align 4 ; [#uses=1]
- %36 = zext i16 %35 to i32 ; [#uses=1]
- %37 = shl i32 %36, 1 ; [#uses=1]
- %38 = or i32 %37, 1 ; [#uses=1]
- %39 = icmp ult i32 %34, %38 ; [#uses=1]
- br i1 %39, label %bb2, label %return
-
-return: ; preds = %bb4, %bb5.preheader
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZNK20btAxisSweep3InternalIjE8quantizeEPjRK9btVector3i(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, i32* nocapture %out, %struct.btQuadWord* nocapture %point, i32 %isMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %4, %16 ; [#uses=3]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fmul float %9, %19 ; [#uses=3]
- %21 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %14, %22 ; [#uses=3]
- %24 = fcmp ugt float %23, 0.000000e+00 ; [#uses=1]
- br i1 %24, label %bb1, label %bb5
-
-bb1: ; preds = %entry
- %25 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 2 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=2]
- %27 = uitofp i32 %26 to float ; [#uses=1]
- %28 = fcmp ult float %23, %27 ; [#uses=1]
- br i1 %28, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = and i32 %30, %26 ; [#uses=1]
- br label %bb4
-
-bb3: ; preds = %bb1
- %32 = fptoui float %23 to i32 ; [#uses=1]
- %33 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = and i32 %34, %32 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %.pn = phi i32 [ %31, %bb2 ], [ %35, %bb3 ] ; [#uses=1]
- %iftmp.386.0 = or i32 %.pn, %isMax ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %entry
- %iftmp.385.0 = phi i32 [ %iftmp.386.0, %bb4 ], [ %isMax, %entry ] ; [#uses=1]
- store i32 %iftmp.385.0, i32* %out, align 4
- %36 = fcmp ugt float %20, 0.000000e+00 ; [#uses=1]
- br i1 %36, label %bb7, label %bb11
-
-bb7: ; preds = %bb5
- %37 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 2 ; [#uses=1]
- %38 = load i32* %37, align 4 ; [#uses=2]
- %39 = uitofp i32 %38 to float ; [#uses=1]
- %40 = fcmp ult float %20, %39 ; [#uses=1]
- br i1 %40, label %bb9, label %bb8
-
-bb8: ; preds = %bb7
- %41 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %43 = and i32 %42, %38 ; [#uses=1]
- br label %bb10
-
-bb9: ; preds = %bb7
- %44 = fptoui float %20 to i32 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=1]
- %47 = and i32 %46, %44 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %.pn18 = phi i32 [ %43, %bb8 ], [ %47, %bb9 ] ; [#uses=1]
- %iftmp.390.0 = or i32 %.pn18, %isMax ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb10, %bb5
- %iftmp.389.0 = phi i32 [ %iftmp.390.0, %bb10 ], [ %isMax, %bb5 ] ; [#uses=1]
- %48 = getelementptr inbounds i32* %out, i32 1 ; [#uses=1]
- store i32 %iftmp.389.0, i32* %48, align 4
- %49 = fcmp ugt float %17, 0.000000e+00 ; [#uses=1]
- br i1 %49, label %bb13, label %bb17
-
-bb13: ; preds = %bb11
- %50 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 2 ; [#uses=1]
- %51 = load i32* %50, align 4 ; [#uses=2]
- %52 = uitofp i32 %51 to float ; [#uses=1]
- %53 = fcmp ult float %17, %52 ; [#uses=1]
- br i1 %53, label %bb15, label %bb14
-
-bb14: ; preds = %bb13
- %54 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %55 = load i32* %54, align 4 ; [#uses=1]
- %56 = and i32 %55, %51 ; [#uses=1]
- br label %bb16
-
-bb15: ; preds = %bb13
- %57 = fptoui float %17 to i32 ; [#uses=1]
- %58 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %59 = load i32* %58, align 4 ; [#uses=1]
- %60 = and i32 %59, %57 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb15, %bb14
- %.pn19 = phi i32 [ %56, %bb14 ], [ %60, %bb15 ] ; [#uses=1]
- %iftmp.394.0 = or i32 %.pn19, %isMax ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb11
- %iftmp.393.0 = phi i32 [ %iftmp.394.0, %bb16 ], [ %isMax, %bb11 ] ; [#uses=1]
- %61 = getelementptr inbounds i32* %out, i32 2 ; [#uses=1]
- store i32 %iftmp.393.0, i32* %61, align 4
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZNK20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, i16* nocapture %out, %struct.btQuadWord* nocapture %point, i32 %isMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %4, %16 ; [#uses=3]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fmul float %9, %19 ; [#uses=3]
- %21 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %14, %22 ; [#uses=3]
- %24 = fcmp ugt float %23, 0.000000e+00 ; [#uses=1]
- br i1 %24, label %bb1, label %bb
-
-bb: ; preds = %entry
- %25 = trunc i32 %isMax to i16 ; [#uses=1]
- br label %bb5
-
-bb1: ; preds = %entry
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 2 ; [#uses=1]
- %27 = load i16* %26, align 2 ; [#uses=2]
- %28 = zext i16 %27 to i32 ; [#uses=1]
- %29 = sitofp i32 %28 to float ; [#uses=1]
- %30 = fcmp ult float %23, %29 ; [#uses=1]
- br i1 %30, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %31 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %32 = load i16* %31, align 4 ; [#uses=1]
- %33 = and i16 %32, %27 ; [#uses=1]
- %34 = trunc i32 %isMax to i16 ; [#uses=1]
- %35 = or i16 %33, %34 ; [#uses=1]
- br label %bb5
-
-bb3: ; preds = %bb1
- %36 = fptoui float %23 to i16 ; [#uses=1]
- %37 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %38 = load i16* %37, align 4 ; [#uses=1]
- %39 = and i16 %38, %36 ; [#uses=1]
- %40 = trunc i32 %isMax to i16 ; [#uses=1]
- %41 = or i16 %39, %40 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb2, %bb
- %iftmp.444.0 = phi i16 [ %25, %bb ], [ %35, %bb2 ], [ %41, %bb3 ] ; [#uses=1]
- store i16 %iftmp.444.0, i16* %out, align 2
- %42 = fcmp ugt float %20, 0.000000e+00 ; [#uses=1]
- br i1 %42, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %43 = trunc i32 %isMax to i16 ; [#uses=1]
- br label %bb11
-
-bb7: ; preds = %bb5
- %44 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 2 ; [#uses=1]
- %45 = load i16* %44, align 2 ; [#uses=2]
- %46 = zext i16 %45 to i32 ; [#uses=1]
- %47 = sitofp i32 %46 to float ; [#uses=1]
- %48 = fcmp ult float %20, %47 ; [#uses=1]
- br i1 %48, label %bb9, label %bb8
-
-bb8: ; preds = %bb7
- %49 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %50 = load i16* %49, align 4 ; [#uses=1]
- %51 = and i16 %50, %45 ; [#uses=1]
- %52 = trunc i32 %isMax to i16 ; [#uses=1]
- %53 = or i16 %51, %52 ; [#uses=1]
- br label %bb11
-
-bb9: ; preds = %bb7
- %54 = fptoui float %20 to i16 ; [#uses=1]
- %55 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %56 = load i16* %55, align 4 ; [#uses=1]
- %57 = and i16 %56, %54 ; [#uses=1]
- %58 = trunc i32 %isMax to i16 ; [#uses=1]
- %59 = or i16 %57, %58 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb9, %bb8, %bb6
- %iftmp.446.0 = phi i16 [ %43, %bb6 ], [ %53, %bb8 ], [ %59, %bb9 ] ; [#uses=1]
- %60 = getelementptr inbounds i16* %out, i32 1 ; [#uses=1]
- store i16 %iftmp.446.0, i16* %60, align 2
- %61 = fcmp ugt float %17, 0.000000e+00 ; [#uses=1]
- br i1 %61, label %bb13, label %bb12
-
-bb12: ; preds = %bb11
- %62 = trunc i32 %isMax to i16 ; [#uses=1]
- br label %bb17
-
-bb13: ; preds = %bb11
- %63 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 2 ; [#uses=1]
- %64 = load i16* %63, align 2 ; [#uses=2]
- %65 = zext i16 %64 to i32 ; [#uses=1]
- %66 = sitofp i32 %65 to float ; [#uses=1]
- %67 = fcmp ult float %17, %66 ; [#uses=1]
- br i1 %67, label %bb15, label %bb14
-
-bb14: ; preds = %bb13
- %68 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %69 = load i16* %68, align 4 ; [#uses=1]
- %70 = and i16 %69, %64 ; [#uses=1]
- %71 = trunc i32 %isMax to i16 ; [#uses=1]
- %72 = or i16 %70, %71 ; [#uses=1]
- br label %bb17
-
-bb15: ; preds = %bb13
- %73 = fptoui float %17 to i16 ; [#uses=1]
- %74 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- %75 = load i16* %74, align 4 ; [#uses=1]
- %76 = and i16 %75, %73 ; [#uses=1]
- %77 = trunc i32 %isMax to i16 ; [#uses=1]
- %78 = or i16 %76, %77 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb15, %bb14, %bb12
- %iftmp.448.0 = phi i16 [ %62, %bb12 ], [ %72, %bb14 ], [ %78, %bb15 ] ; [#uses=1]
- %79 = getelementptr inbounds i16* %out, i32 2 ; [#uses=1]
- store i16 %iftmp.448.0, i16* %79, align 2
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE11sortMinDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, i32 %axis, i32 %edge, %struct.btActionInterface* nocapture %unnamed_arg, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=7]
- %.sum = add i32 %edge, -1 ; [#uses=2]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %edge, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=6]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %5 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=7]
- %6 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %edge, i32 0 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %.sum, i32 0 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = icmp ult i32 %7, %9 ; [#uses=1]
- br i1 %10, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %11 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 %axis ; [#uses=2]
- %12 = shl i32 1, %axis ; [#uses=1]
- %13 = and i32 %12, 3 ; [#uses=5]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %14 = shl i32 1, %13 ; [#uses=1]
- %15 = and i32 %14, 3 ; [#uses=4]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 %13 ; [#uses=1]
- %17 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 %13 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 %15 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 %15 ; [#uses=1]
- %20 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %21 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 0 ; [#uses=2]
- %22 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %tmp26 = add i32 %edge, -2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb19.bb_crit_edge, %bb.nph
- %23 = phi %"struct.btAxisSweep3Internal<unsigned int>::Handle"* [ %5, %bb.nph ], [ %.pre, %bb19.bb_crit_edge ] ; [#uses=7]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb19.bb_crit_edge ] ; [#uses=4]
- %tmp27 = sub i32 %tmp26, %indvar ; [#uses=1]
- %scevgep28 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp27, i32 0 ; [#uses=1]
- %tmp29 = sub i32 %edge, %indvar ; [#uses=2]
- %scevgep30 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp29, i32 0 ; [#uses=3]
- %scevgep31 = getelementptr i32* %scevgep30, i32 -1 ; [#uses=3]
- %tmp33 = sub i32 %.sum, %indvar ; [#uses=1]
- %scevgep3435 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp33, i32 0 ; [#uses=3]
- %scevgep36 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp29, i32 1 ; [#uses=2]
- %24 = load i32* %scevgep31, align 4 ; [#uses=7]
- %25 = load i32* %scevgep3435, align 4 ; [#uses=1]
- %26 = and i32 %25, 1 ; [#uses=1]
- %27 = icmp eq i32 %26, 0 ; [#uses=1]
- br i1 %27, label %bb18, label %bb1
-
-bb1: ; preds = %bb
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %28 = load i32* %16, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %23, i32 %24, i32 1, i32 %13 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = icmp ult i32 %28, %30 ; [#uses=1]
- br i1 %31, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %32 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %23, i32 %24, i32 2, i32 %13 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = load i32* %17, align 4 ; [#uses=1]
- %35 = icmp ult i32 %33, %34 ; [#uses=1]
- br i1 %35, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %36 = load i32* %18, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %23, i32 %24, i32 1, i32 %15 ; [#uses=1]
- %38 = load i32* %37, align 4 ; [#uses=1]
- %39 = icmp ult i32 %36, %38 ; [#uses=1]
- br i1 %39, label %bb17, label %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %40 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %23, i32 %24, i32 2, i32 %15 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=1]
- %42 = load i32* %19, align 4 ; [#uses=1]
- %phitmp = icmp ult i32 %41, %42 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %43 = load %struct..0btMultiSapOverlapFilterCallback** %20, align 4 ; [#uses=2]
- %44 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %43, i32 0, i32 0, i32 0 ; [#uses=1]
- %45 = load i32 (...)*** %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds i32 (...)** %45, i32 2 ; [#uses=1]
- %47 = load i32 (...)** %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %23, i32 %24, i32 0 ; [#uses=2]
- %49 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %43, i32 0, i32 0 ; [#uses=1]
- %50 = bitcast i32 (...)* %47 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %51 = tail call %struct.btBroadphasePair* %50(%struct.btActionInterface* %49, %struct.btBroadphaseProxy* %21, %struct.btBroadphaseProxy* %48) ; [#uses=0]
- %52 = load %struct.btActionInterface** %22, align 4 ; [#uses=3]
- %53 = icmp eq %struct.btActionInterface* %52, null ; [#uses=1]
- br i1 %53, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %54 = getelementptr inbounds %struct.btActionInterface* %52, i32 0, i32 0 ; [#uses=1]
- %55 = load i32 (...)*** %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds i32 (...)** %55, i32 2 ; [#uses=1]
- %57 = load i32 (...)** %56, align 4 ; [#uses=1]
- %58 = bitcast i32 (...)* %57 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %59 = tail call %struct.btBroadphasePair* %58(%struct.btActionInterface* %52, %struct.btBroadphaseProxy* %21, %struct.btBroadphaseProxy* %48) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %60 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %23, i32 %24, i32 2, i32 %axis ; [#uses=2]
- %61 = load i32* %60, align 4 ; [#uses=1]
- %62 = add i32 %61, 1 ; [#uses=1]
- store i32 %62, i32* %60, align 4
- br label %bb19
-
-bb18: ; preds = %bb
- %63 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %23, i32 %24, i32 1, i32 %axis ; [#uses=2]
- %64 = load i32* %63, align 4 ; [#uses=1]
- %65 = add i32 %64, 1 ; [#uses=1]
- store i32 %65, i32* %63, align 4
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %66 = load i32* %11, align 4 ; [#uses=1]
- %67 = add i32 %66, -1 ; [#uses=1]
- store i32 %67, i32* %11, align 4
- %68 = load i32* %scevgep30, align 4 ; [#uses=2]
- %69 = load i32* %scevgep36, align 4 ; [#uses=1]
- %70 = load i32* %scevgep3435, align 4 ; [#uses=1]
- %71 = load i32* %scevgep31, align 4 ; [#uses=1]
- store i32 %70, i32* %scevgep30, align 4
- store i32 %71, i32* %scevgep36, align 4
- store i32 %68, i32* %scevgep3435, align 4
- store i32 %69, i32* %scevgep31, align 4
- %72 = load i32* %scevgep28, align 4 ; [#uses=1]
- %73 = icmp ult i32 %68, %72 ; [#uses=1]
- br i1 %73, label %bb19.bb_crit_edge, label %return
-
-bb19.bb_crit_edge: ; preds = %bb19
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- %.pre = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- br label %bb
-
-return: ; preds = %bb19, %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE9sortMaxUpEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, i32 %axis, i32 %edge, %struct.btActionInterface* nocapture %unnamed_arg, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=5]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %edge, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=5]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %5 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=5]
- %6 = shl i32 1, %axis ; [#uses=1]
- %7 = and i32 %6, 3 ; [#uses=5]
- %8 = shl i32 1, %7 ; [#uses=1]
- %9 = and i32 %8, 3 ; [#uses=4]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 %7 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 %7 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 %9 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 %9 ; [#uses=1]
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 %axis ; [#uses=2]
- %tmp27 = add i32 %edge, 1 ; [#uses=1]
- br label %bb20
-
-bb: ; preds = %bb21
- %17 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=8]
- %18 = and i32 %69, 1 ; [#uses=1]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- br i1 %19, label %bb1, label %bb18
-
-bb1: ; preds = %bb
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %20 = load i32* %10, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %66, i32 1, i32 %7 ; [#uses=1]
- %22 = load i32* %21, align 4 ; [#uses=1]
- %23 = icmp ult i32 %20, %22 ; [#uses=1]
- br i1 %23, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %66, i32 2, i32 %7 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = load i32* %11, align 4 ; [#uses=1]
- %27 = icmp ult i32 %25, %26 ; [#uses=1]
- br i1 %27, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %28 = load i32* %12, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %66, i32 1, i32 %9 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = icmp ult i32 %28, %30 ; [#uses=1]
- br i1 %31, label %bb17, label %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %32 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %66, i32 2, i32 %9 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = load i32* %13, align 4 ; [#uses=1]
- %phitmp = icmp ult i32 %33, %34 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %35 = load i32* %scevgep26, align 4 ; [#uses=1]
- %36 = load %struct..0btMultiSapOverlapFilterCallback** %14, align 4 ; [#uses=2]
- %37 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %36, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32 (...)** %38, i32 2 ; [#uses=1]
- %40 = load i32 (...)** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %66, i32 0 ; [#uses=2]
- %42 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %35, i32 0 ; [#uses=2]
- %43 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %36, i32 0, i32 0 ; [#uses=1]
- %44 = bitcast i32 (...)* %40 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %45 = tail call %struct.btBroadphasePair* %44(%struct.btActionInterface* %43, %struct.btBroadphaseProxy* %42, %struct.btBroadphaseProxy* %41) ; [#uses=0]
- %46 = load %struct.btActionInterface** %15, align 4 ; [#uses=3]
- %47 = icmp eq %struct.btActionInterface* %46, null ; [#uses=1]
- br i1 %47, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %48 = getelementptr inbounds %struct.btActionInterface* %46, i32 0, i32 0 ; [#uses=1]
- %49 = load i32 (...)*** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds i32 (...)** %49, i32 2 ; [#uses=1]
- %51 = load i32 (...)** %50, align 4 ; [#uses=1]
- %52 = bitcast i32 (...)* %51 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %53 = tail call %struct.btBroadphasePair* %52(%struct.btActionInterface* %46, %struct.btBroadphaseProxy* %42, %struct.btBroadphaseProxy* %41) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %54 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %66, i32 1, i32 %axis ; [#uses=2]
- %55 = load i32* %54, align 4 ; [#uses=1]
- %56 = add i32 %55, -1 ; [#uses=1]
- store i32 %56, i32* %54, align 4
- br label %bb19
-
-bb18: ; preds = %bb
- %57 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %17, i32 %66, i32 2, i32 %axis ; [#uses=2]
- %58 = load i32* %57, align 4 ; [#uses=1]
- %59 = add i32 %58, -1 ; [#uses=1]
- store i32 %59, i32* %57, align 4
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %60 = load i32* %16, align 4 ; [#uses=1]
- %61 = add i32 %60, 1 ; [#uses=1]
- store i32 %61, i32* %16, align 4
- %62 = load i32* %scevgep25, align 4 ; [#uses=1]
- %63 = load i32* %scevgep26, align 4 ; [#uses=1]
- %64 = load i32* %scevgep2930, align 4 ; [#uses=1]
- %65 = load i32* %scevgep31, align 4 ; [#uses=1]
- store i32 %64, i32* %scevgep25, align 4
- store i32 %65, i32* %scevgep26, align 4
- store i32 %62, i32* %scevgep2930, align 4
- store i32 %63, i32* %scevgep31, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb19, %entry
- %indvar = phi i32 [ %indvar.next, %bb19 ], [ 0, %entry ] ; [#uses=3]
- %tmp = add i32 %indvar, %edge ; [#uses=2]
- %scevgep25 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp, i32 0 ; [#uses=3]
- %scevgep26 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp, i32 1 ; [#uses=3]
- %tmp28 = add i32 %tmp27, %indvar ; [#uses=2]
- %scevgep2930 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp28, i32 0 ; [#uses=3]
- %scevgep31 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp28, i32 1 ; [#uses=3]
- %66 = load i32* %scevgep31, align 4 ; [#uses=8]
- %67 = icmp eq i32 %66, 0 ; [#uses=1]
- br i1 %67, label %return, label %bb21
-
-bb21: ; preds = %bb20
- %68 = load i32* %scevgep25, align 4 ; [#uses=1]
- %69 = load i32* %scevgep2930, align 4 ; [#uses=2]
- %70 = icmp ult i32 %68, %69 ; [#uses=1]
- br i1 %70, label %return, label %bb
-
-return: ; preds = %bb21, %bb20
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE9sortMinUpEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, i32 %axis, i32 %edge, %struct.btActionInterface* %dispatcher, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=5]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %edge, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %5 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 %axis ; [#uses=2]
- %7 = shl i32 1, %axis ; [#uses=1]
- %8 = and i32 %7, 3 ; [#uses=5]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %9 = shl i32 1, %8 ; [#uses=1]
- %10 = and i32 %9, 3 ; [#uses=4]
- %11 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %tmp27 = add i32 %edge, 1 ; [#uses=1]
- br label %bb20
-
-bb: ; preds = %bb21
- %13 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=12]
- %14 = and i32 %69, 1 ; [#uses=1]
- %15 = icmp eq i32 %14, 0 ; [#uses=1]
- br i1 %15, label %bb18, label %bb1
-
-bb1: ; preds = %bb
- %16 = load i32* %scevgep26, align 4 ; [#uses=5]
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %17 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %16, i32 2, i32 %8 ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %66, i32 1, i32 %8 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=1]
- %21 = icmp ult i32 %18, %20 ; [#uses=1]
- br i1 %21, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %22 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %66, i32 2, i32 %8 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %16, i32 1, i32 %8 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = icmp ult i32 %23, %25 ; [#uses=1]
- br i1 %26, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %27 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %16, i32 2, i32 %10 ; [#uses=1]
- %28 = load i32* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %66, i32 1, i32 %10 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = icmp ult i32 %28, %30 ; [#uses=1]
- br i1 %31, label %bb17, label %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %32 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %66, i32 2, i32 %10 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %16, i32 1, i32 %10 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %phitmp = icmp ult i32 %33, %35 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %36 = load %struct..0btMultiSapOverlapFilterCallback** %11, align 4 ; [#uses=2]
- %37 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %36, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32 (...)** %38, i32 3 ; [#uses=1]
- %40 = load i32 (...)** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %66, i32 0 ; [#uses=2]
- %42 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %16, i32 0 ; [#uses=2]
- %43 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %36, i32 0, i32 0 ; [#uses=1]
- %44 = bitcast i32 (...)* %40 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %45 = tail call i8* %44(%struct.btActionInterface* %43, %struct.btBroadphaseProxy* %42, %struct.btBroadphaseProxy* %41, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- %46 = load %struct.btActionInterface** %12, align 4 ; [#uses=3]
- %47 = icmp eq %struct.btActionInterface* %46, null ; [#uses=1]
- br i1 %47, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %48 = getelementptr inbounds %struct.btActionInterface* %46, i32 0, i32 0 ; [#uses=1]
- %49 = load i32 (...)*** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds i32 (...)** %49, i32 3 ; [#uses=1]
- %51 = load i32 (...)** %50, align 4 ; [#uses=1]
- %52 = bitcast i32 (...)* %51 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %53 = tail call i8* %52(%struct.btActionInterface* %46, %struct.btBroadphaseProxy* %42, %struct.btBroadphaseProxy* %41, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %54 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %66, i32 2, i32 %axis ; [#uses=2]
- %55 = load i32* %54, align 4 ; [#uses=1]
- %56 = add i32 %55, -1 ; [#uses=1]
- store i32 %56, i32* %54, align 4
- br label %bb19
-
-bb18: ; preds = %bb
- %57 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %13, i32 %66, i32 1, i32 %axis ; [#uses=2]
- %58 = load i32* %57, align 4 ; [#uses=1]
- %59 = add i32 %58, -1 ; [#uses=1]
- store i32 %59, i32* %57, align 4
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %60 = load i32* %6, align 4 ; [#uses=1]
- %61 = add i32 %60, 1 ; [#uses=1]
- store i32 %61, i32* %6, align 4
- %62 = load i32* %scevgep25, align 4 ; [#uses=1]
- %63 = load i32* %scevgep26, align 4 ; [#uses=1]
- %64 = load i32* %scevgep2930, align 4 ; [#uses=1]
- %65 = load i32* %scevgep31, align 4 ; [#uses=1]
- store i32 %64, i32* %scevgep25, align 4
- store i32 %65, i32* %scevgep26, align 4
- store i32 %62, i32* %scevgep2930, align 4
- store i32 %63, i32* %scevgep31, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb19, %entry
- %indvar = phi i32 [ %indvar.next, %bb19 ], [ 0, %entry ] ; [#uses=3]
- %tmp = add i32 %indvar, %edge ; [#uses=2]
- %scevgep25 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp, i32 0 ; [#uses=3]
- %scevgep26 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp, i32 1 ; [#uses=3]
- %tmp28 = add i32 %tmp27, %indvar ; [#uses=2]
- %scevgep2930 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp28, i32 0 ; [#uses=3]
- %scevgep31 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp28, i32 1 ; [#uses=3]
- %66 = load i32* %scevgep31, align 4 ; [#uses=8]
- %67 = icmp eq i32 %66, 0 ; [#uses=1]
- br i1 %67, label %return, label %bb21
-
-bb21: ; preds = %bb20
- %68 = load i32* %scevgep25, align 4 ; [#uses=1]
- %69 = load i32* %scevgep2930, align 4 ; [#uses=2]
- %70 = icmp ult i32 %68, %69 ; [#uses=1]
- br i1 %70, label %return, label %bb
-
-return: ; preds = %bb21, %bb20
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE12removeHandleEjP12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, i32 %handle, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=5]
- %1 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- %3 = load %struct..0btMultiSapOverlapFilterCallback** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 14 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %9 = tail call zeroext i8 %8(%struct..0btMultiSapOverlapFilterCallback* %3) ; [#uses=1]
- %toBoolnot = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb.nph
-
-bb: ; preds = %entry
- %10 = load %struct..0btMultiSapOverlapFilterCallback** %2, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %10, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 4 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %1, i32 %handle, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %10, i32 0, i32 0 ; [#uses=1]
- %17 = bitcast i32 (...)* %14 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %17(%struct.btActionInterface* %16, %struct.btBroadphaseProxy* %15, %struct.btActionInterface* %dispatcher)
- br label %bb.nph
-
-bb.nph: ; preds = %bb, %entry
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 6 ; [#uses=3]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = shl i32 %19, 1 ; [#uses=1]
- %21 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %scevgep16 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %21, i32 0, i32 2, i32 0 ; [#uses=2]
- %22 = load i32* %scevgep16, align 4 ; [#uses=1]
- %23 = add i32 %22, -2 ; [#uses=1]
- store i32 %23, i32* %scevgep16, align 4
- %24 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %scevgep16.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %24, i32 0, i32 2, i32 1 ; [#uses=2]
- %25 = load i32* %scevgep16.1, align 4 ; [#uses=1]
- %26 = add i32 %25, -2 ; [#uses=1]
- store i32 %26, i32* %scevgep16.1, align 4
- %27 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %scevgep16.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %27, i32 0, i32 2, i32 2 ; [#uses=2]
- %28 = load i32* %scevgep16.2, align 4 ; [#uses=1]
- %29 = add i32 %28, -2 ; [#uses=1]
- store i32 %29, i32* %scevgep16.2, align 4
- %30 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 2 ; [#uses=3]
- %31 = add nsw i32 %20, -1 ; [#uses=2]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %32 = phi i32 [ 0, %bb.nph ], [ %43, %bb7 ] ; [#uses=6]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 %32 ; [#uses=1]
- %scevgep13 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %1, i32 %handle, i32 2, i32 %32 ; [#uses=1]
- %scevgep14 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %1, i32 %handle, i32 1, i32 %32 ; [#uses=1]
- %33 = load %struct.CONTACT_KEY_TOKEN** %scevgep, align 4 ; [#uses=4]
- %34 = load i32* %scevgep13, align 4 ; [#uses=2]
- %35 = load i32* %30, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %33, i32 %34, i32 0 ; [#uses=1]
- store i32 %35, i32* %36, align 4
- tail call void @_ZN20btAxisSweep3InternalIjE9sortMaxUpEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %32, i32 %34, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %37 = load i32* %scevgep14, align 4 ; [#uses=2]
- %38 = load i32* %30, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %33, i32 %37, i32 0 ; [#uses=1]
- store i32 %38, i32* %39, align 4
- tail call void @_ZN20btAxisSweep3InternalIjE9sortMinUpEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %32, i32 %37, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %40 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %33, i32 %31, i32 1 ; [#uses=1]
- store i32 0, i32* %40, align 4
- %41 = load i32* %30, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %33, i32 %31, i32 0 ; [#uses=1]
- store i32 %41, i32* %42, align 4
- %43 = add nsw i32 %32, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %43, 3 ; [#uses=1]
- br i1 %exitcond, label %bb9, label %bb7
-
-bb9: ; preds = %bb7
- %44 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 9 ; [#uses=2]
- %45 = load i32* %44, align 4 ; [#uses=1]
- %46 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %46, i32 %handle, i32 1, i32 0 ; [#uses=1]
- store i32 %45, i32* %47, align 4
- store i32 %handle, i32* %44, align 4
- %48 = load i32* %18, align 4 ; [#uses=1]
- %49 = add i32 %48, -1 ; [#uses=1]
- store i32 %49, i32* %18, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE12destroyProxyEP17btBroadphaseProxyP12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %1 = load %struct.btDbvtBroadphase** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btDbvtBroadphase* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDbvtBroadphase* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 3 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 2 ; [#uses=1]
- %8 = bitcast float* %7 to %struct.btBroadphaseProxy** ; [#uses=1]
- %9 = load %struct.btBroadphaseProxy** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %6 to void (%struct.btDbvtBroadphase*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %10(%struct.btDbvtBroadphase* %1, %struct.btBroadphaseProxy* %9, %struct.btActionInterface* %dispatcher)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %11 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 4 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalIjE12removeHandleEjP12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %12, %struct.btActionInterface* %dispatcher)
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE11sortMaxDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, i32 %axis, i32 %edge, %struct.btActionInterface* %dispatcher, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=7]
- %.sum = add i32 %edge, -1 ; [#uses=2]
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %3 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %edge, i32 0 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %.sum, i32 0 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = icmp ult i32 %5, %7 ; [#uses=1]
- br i1 %8, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %edge, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = shl i32 1, %axis ; [#uses=1]
- %12 = and i32 %11, 3 ; [#uses=5]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %13 = shl i32 1, %12 ; [#uses=1]
- %14 = and i32 %13, 3 ; [#uses=4]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %17 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %3, i32 %10, i32 2, i32 %axis ; [#uses=2]
- %tmp26 = add i32 %edge, -2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb19.bb_crit_edge, %bb.nph
- %18 = phi %"struct.btAxisSweep3Internal<unsigned int>::Handle"* [ %3, %bb.nph ], [ %.pre, %bb19.bb_crit_edge ] ; [#uses=12]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb19.bb_crit_edge ] ; [#uses=4]
- %tmp27 = sub i32 %tmp26, %indvar ; [#uses=1]
- %scevgep28 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp27, i32 0 ; [#uses=1]
- %tmp29 = sub i32 %edge, %indvar ; [#uses=2]
- %scevgep30 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp29, i32 0 ; [#uses=3]
- %scevgep31 = getelementptr i32* %scevgep30, i32 -1 ; [#uses=3]
- %tmp33 = sub i32 %.sum, %indvar ; [#uses=1]
- %scevgep3435 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp33, i32 0 ; [#uses=3]
- %scevgep36 = getelementptr %struct.CONTACT_KEY_TOKEN* %1, i32 %tmp29, i32 1 ; [#uses=3]
- %19 = load i32* %scevgep31, align 4 ; [#uses=7]
- %20 = load i32* %scevgep3435, align 4 ; [#uses=1]
- %21 = and i32 %20, 1 ; [#uses=1]
- %22 = icmp eq i32 %21, 0 ; [#uses=1]
- br i1 %22, label %bb1, label %bb18
-
-bb1: ; preds = %bb
- %23 = load i32* %scevgep36, align 4 ; [#uses=5]
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %23, i32 2, i32 %12 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %19, i32 1, i32 %12 ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = icmp ult i32 %25, %27 ; [#uses=1]
- br i1 %28, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %19, i32 2, i32 %12 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %23, i32 1, i32 %12 ; [#uses=1]
- %32 = load i32* %31, align 4 ; [#uses=1]
- %33 = icmp ult i32 %30, %32 ; [#uses=1]
- br i1 %33, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %34 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %23, i32 2, i32 %14 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %19, i32 1, i32 %14 ; [#uses=1]
- %37 = load i32* %36, align 4 ; [#uses=1]
- %38 = icmp ult i32 %35, %37 ; [#uses=1]
- br i1 %38, label %bb17, label %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %39 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %19, i32 2, i32 %14 ; [#uses=1]
- %40 = load i32* %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %23, i32 1, i32 %14 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %phitmp = icmp ult i32 %40, %42 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %43 = load %struct..0btMultiSapOverlapFilterCallback** %15, align 4 ; [#uses=2]
- %44 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %43, i32 0, i32 0, i32 0 ; [#uses=1]
- %45 = load i32 (...)*** %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds i32 (...)** %45, i32 3 ; [#uses=1]
- %47 = load i32 (...)** %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %19, i32 0 ; [#uses=2]
- %49 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %23, i32 0 ; [#uses=2]
- %50 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %43, i32 0, i32 0 ; [#uses=1]
- %51 = bitcast i32 (...)* %47 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %52 = tail call i8* %51(%struct.btActionInterface* %50, %struct.btBroadphaseProxy* %49, %struct.btBroadphaseProxy* %48, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- %53 = load %struct.btActionInterface** %16, align 4 ; [#uses=3]
- %54 = icmp eq %struct.btActionInterface* %53, null ; [#uses=1]
- br i1 %54, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %55 = getelementptr inbounds %struct.btActionInterface* %53, i32 0, i32 0 ; [#uses=1]
- %56 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 3 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = bitcast i32 (...)* %58 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %60 = tail call i8* %59(%struct.btActionInterface* %53, %struct.btBroadphaseProxy* %49, %struct.btBroadphaseProxy* %48, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalIjE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %61 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %19, i32 1, i32 %axis ; [#uses=2]
- %62 = load i32* %61, align 4 ; [#uses=1]
- %63 = add i32 %62, 1 ; [#uses=1]
- store i32 %63, i32* %61, align 4
- br label %bb19
-
-bb18: ; preds = %bb
- %64 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %18, i32 %19, i32 2, i32 %axis ; [#uses=2]
- %65 = load i32* %64, align 4 ; [#uses=1]
- %66 = add i32 %65, 1 ; [#uses=1]
- store i32 %66, i32* %64, align 4
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %67 = load i32* %17, align 4 ; [#uses=1]
- %68 = add i32 %67, -1 ; [#uses=1]
- store i32 %68, i32* %17, align 4
- %69 = load i32* %scevgep30, align 4 ; [#uses=2]
- %70 = load i32* %scevgep36, align 4 ; [#uses=1]
- %71 = load i32* %scevgep3435, align 4 ; [#uses=1]
- %72 = load i32* %scevgep31, align 4 ; [#uses=1]
- store i32 %71, i32* %scevgep30, align 4
- store i32 %72, i32* %scevgep36, align 4
- store i32 %69, i32* %scevgep3435, align 4
- store i32 %70, i32* %scevgep31, align 4
- %73 = load i32* %scevgep28, align 4 ; [#uses=1]
- %74 = icmp ult i32 %69, %73 ; [#uses=1]
- br i1 %74, label %bb19.bb_crit_edge, label %return
-
-bb19.bb_crit_edge: ; preds = %bb19
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- %.pre = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %2, align 4 ; [#uses=1]
- br label %bb
-
-return: ; preds = %bb19, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE12updateHandleEjRK9btVector3S3_P12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, i32 %handle, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* %dispatcher) align 2 {
-bb.nph:
- %min = alloca [3 x i32], align 4 ; [#uses=2]
- %max = alloca [3 x i32], align 4 ; [#uses=2]
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %1 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds [3 x i32]* %min, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK20btAxisSweep3InternalIjE8quantizeEPjRK9btVector3i(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32* %2, %struct.btQuadWord* %aabbMin, i32 0) nounwind
- %3 = getelementptr inbounds [3 x i32]* %max, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK20btAxisSweep3InternalIjE8quantizeEPjRK9btVector3i(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32* %3, %struct.btQuadWord* %aabbMax, i32 1) nounwind
- br label %bb
-
-bb: ; preds = %bb8, %bb.nph
- %4 = phi i32 [ 0, %bb.nph ], [ %22, %bb8 ] ; [#uses=10]
- %scevgep = getelementptr [3 x i32]* %min, i32 0, i32 %4 ; [#uses=1]
- %scevgep12 = getelementptr [3 x i32]* %max, i32 0, i32 %4 ; [#uses=1]
- %scevgep13 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %1, i32 %handle, i32 1, i32 %4 ; [#uses=1]
- %scevgep14 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %1, i32 %handle, i32 2, i32 %4 ; [#uses=1]
- %scevgep15 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 %4 ; [#uses=2]
- %5 = load i32* %scevgep13, align 4 ; [#uses=3]
- %6 = load i32* %scevgep14, align 4 ; [#uses=4]
- %7 = load i32* %scevgep, align 4 ; [#uses=2]
- %8 = load %struct.CONTACT_KEY_TOKEN** %scevgep15, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %5, i32 0 ; [#uses=2]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = sub nsw i32 %7, %10 ; [#uses=2]
- %12 = load i32* %scevgep12, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %6, i32 0 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %15 = sub nsw i32 %12, %14 ; [#uses=2]
- store i32 %7, i32* %9, align 4
- %16 = load %struct.CONTACT_KEY_TOKEN** %scevgep15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %16, i32 %6, i32 0 ; [#uses=1]
- store i32 %12, i32* %17, align 4
- %18 = icmp slt i32 %11, 0 ; [#uses=1]
- br i1 %18, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- call void @_ZN20btAxisSweep3InternalIjE11sortMinDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %4, i32 %5, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %19 = icmp sgt i32 %15, 0 ; [#uses=1]
- br i1 %19, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- call void @_ZN20btAxisSweep3InternalIjE9sortMaxUpEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %4, i32 %6, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %20 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %20, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- call void @_ZN20btAxisSweep3InternalIjE9sortMinUpEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %4, i32 %5, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %21 = icmp slt i32 %15, 0 ; [#uses=1]
- br i1 %21, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- call void @_ZN20btAxisSweep3InternalIjE11sortMaxDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %4, i32 %6, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6
- %22 = add nsw i32 %4, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %22, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb8
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE7setAabbEP17btBroadphaseProxyRK9btVector3S5_P12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 4 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalIjE12updateHandleEjRK9btVector3S3_P12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 %25, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher)
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %27 = load %struct.btDbvtBroadphase** %26, align 4 ; [#uses=3]
- %28 = icmp eq %struct.btDbvtBroadphase* %27, null ; [#uses=1]
- br i1 %28, label %return, label %bb
-
-bb: ; preds = %entry
- %29 = getelementptr inbounds %struct.btDbvtBroadphase* %27, i32 0, i32 0, i32 0 ; [#uses=1]
- %30 = load i32 (...)*** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds i32 (...)** %30, i32 4 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 2 ; [#uses=1]
- %34 = bitcast float* %33 to %struct.btBroadphaseProxy** ; [#uses=1]
- %35 = load %struct.btBroadphaseProxy** %34, align 4 ; [#uses=1]
- %36 = bitcast i32 (...)* %32 to void (%struct.btDbvtBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %36(%struct.btDbvtBroadphase* %27, %struct.btBroadphaseProxy* %35, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZN20btAxisSweep3InternalIjE9addHandleERK9btVector3S3_PvssP12btDispatcherS4_(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, i8* %pOwner, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* %multiSapProxy) align 2 {
-bb2:
- %min = alloca [3 x i32], align 4 ; [#uses=3]
- %max = alloca [3 x i32], align 4 ; [#uses=3]
- %0 = getelementptr inbounds [3 x i32]* %min, i32 0, i32 0 ; [#uses=2]
- call void @_ZNK20btAxisSweep3InternalIjE8quantizeEPjRK9btVector3i(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32* %0, %struct.btQuadWord* %aabbMin, i32 0) nounwind
- %1 = getelementptr inbounds [3 x i32]* %max, i32 0, i32 0 ; [#uses=2]
- call void @_ZNK20btAxisSweep3InternalIjE8quantizeEPjRK9btVector3i(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32* %1, %struct.btQuadWord* %aabbMax, i32 1) nounwind
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 9 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=24]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=4]
- %5 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=16]
- %6 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 0 ; [#uses=3]
- %7 = load i32* %6, align 4 ; [#uses=1]
- store i32 %7, i32* %2, align 4
- %8 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 6 ; [#uses=3]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = add i32 %9, 1 ; [#uses=1]
- store i32 %10, i32* %8, align 4
- %11 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 0, i32 4 ; [#uses=1]
- store i32 %3, i32* %11, align 4
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 0, i32 0 ; [#uses=1]
- store i8* %pOwner, i8** %12, align 4
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 0, i32 1 ; [#uses=1]
- store i16 %collisionFilterGroup, i16* %13, align 4
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 0, i32 2 ; [#uses=1]
- store i16 %collisionFilterMask, i16* %14, align 2
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 0, i32 3 ; [#uses=1]
- store i8* %multiSapProxy, i8** %15, align 4
- %16 = load i32* %8, align 4 ; [#uses=1]
- %17 = shl i32 %16, 1 ; [#uses=11]
- %18 = or i32 %17, 1 ; [#uses=6]
- %19 = add i32 %17, -1 ; [#uses=15]
- %scevgep8 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=5]
- %scevgep10 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 0 ; [#uses=1]
- %20 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- %scevgep6 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %20, i32 0, i32 2, i32 0 ; [#uses=2]
- %21 = load i32* %scevgep6, align 4 ; [#uses=1]
- %22 = add i32 %21, 2 ; [#uses=1]
- store i32 %22, i32* %scevgep6, align 4
- %23 = load %struct.CONTACT_KEY_TOKEN** %scevgep8, align 4 ; [#uses=4]
- %24 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %23, i32 %19, i32 0 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %23, i32 %19, i32 1 ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %23, i32 %18, i32 0 ; [#uses=1]
- store i32 %25, i32* %28, align 4
- %29 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %23, i32 %18, i32 1 ; [#uses=1]
- store i32 %27, i32* %29, align 4
- %30 = load %struct.CONTACT_KEY_TOKEN** %scevgep8, align 4 ; [#uses=1]
- %31 = load i32* %0, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %30, i32 %19, i32 0 ; [#uses=1]
- store i32 %31, i32* %32, align 4
- %33 = load %struct.CONTACT_KEY_TOKEN** %scevgep8, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %33, i32 %19, i32 1 ; [#uses=1]
- store i32 %3, i32* %34, align 4
- %35 = load %struct.CONTACT_KEY_TOKEN** %scevgep8, align 4 ; [#uses=1]
- %36 = load i32* %1, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %35, i32 %17, i32 0 ; [#uses=1]
- store i32 %36, i32* %37, align 4
- %38 = load %struct.CONTACT_KEY_TOKEN** %scevgep8, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %38, i32 %17, i32 1 ; [#uses=1]
- store i32 %3, i32* %39, align 4
- store i32 %19, i32* %6, align 4
- store i32 %17, i32* %scevgep10, align 4
- %scevgep.1 = getelementptr [3 x i32]* %min, i32 0, i32 1 ; [#uses=1]
- %scevgep5.1 = getelementptr [3 x i32]* %max, i32 0, i32 1 ; [#uses=1]
- %scevgep8.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 1 ; [#uses=5]
- %scevgep9.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 1 ; [#uses=1]
- %scevgep10.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 1 ; [#uses=1]
- %40 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- %scevgep6.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %40, i32 0, i32 2, i32 1 ; [#uses=2]
- %41 = load i32* %scevgep6.1, align 4 ; [#uses=1]
- %42 = add i32 %41, 2 ; [#uses=1]
- store i32 %42, i32* %scevgep6.1, align 4
- %43 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.1, align 4 ; [#uses=4]
- %44 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %43, i32 %19, i32 0 ; [#uses=1]
- %45 = load i32* %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %43, i32 %19, i32 1 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %43, i32 %18, i32 0 ; [#uses=1]
- store i32 %45, i32* %48, align 4
- %49 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %43, i32 %18, i32 1 ; [#uses=1]
- store i32 %47, i32* %49, align 4
- %50 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.1, align 4 ; [#uses=1]
- %51 = load i32* %scevgep.1, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %50, i32 %19, i32 0 ; [#uses=1]
- store i32 %51, i32* %52, align 4
- %53 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.1, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %53, i32 %19, i32 1 ; [#uses=1]
- store i32 %3, i32* %54, align 4
- %55 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.1, align 4 ; [#uses=1]
- %56 = load i32* %scevgep5.1, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %55, i32 %17, i32 0 ; [#uses=1]
- store i32 %56, i32* %57, align 4
- %58 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.1, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %58, i32 %17, i32 1 ; [#uses=1]
- store i32 %3, i32* %59, align 4
- store i32 %19, i32* %scevgep9.1, align 4
- store i32 %17, i32* %scevgep10.1, align 4
- %scevgep.2 = getelementptr [3 x i32]* %min, i32 0, i32 2 ; [#uses=1]
- %scevgep5.2 = getelementptr [3 x i32]* %max, i32 0, i32 2 ; [#uses=1]
- %scevgep8.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 2 ; [#uses=5]
- %scevgep9.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 2 ; [#uses=1]
- %scevgep10.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 2 ; [#uses=1]
- %60 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- %scevgep6.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %60, i32 0, i32 2, i32 2 ; [#uses=2]
- %61 = load i32* %scevgep6.2, align 4 ; [#uses=1]
- %62 = add i32 %61, 2 ; [#uses=1]
- store i32 %62, i32* %scevgep6.2, align 4
- %63 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.2, align 4 ; [#uses=4]
- %64 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %63, i32 %19, i32 0 ; [#uses=1]
- %65 = load i32* %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %63, i32 %19, i32 1 ; [#uses=1]
- %67 = load i32* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %63, i32 %18, i32 0 ; [#uses=1]
- store i32 %65, i32* %68, align 4
- %69 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %63, i32 %18, i32 1 ; [#uses=1]
- store i32 %67, i32* %69, align 4
- %70 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.2, align 4 ; [#uses=1]
- %71 = load i32* %scevgep.2, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %70, i32 %19, i32 0 ; [#uses=1]
- store i32 %71, i32* %72, align 4
- %73 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.2, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %73, i32 %19, i32 1 ; [#uses=1]
- store i32 %3, i32* %74, align 4
- %75 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.2, align 4 ; [#uses=1]
- %76 = load i32* %scevgep5.2, align 4 ; [#uses=1]
- %77 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %75, i32 %17, i32 0 ; [#uses=1]
- store i32 %76, i32* %77, align 4
- %78 = load %struct.CONTACT_KEY_TOKEN** %scevgep8.2, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %78, i32 %17, i32 1 ; [#uses=1]
- store i32 %3, i32* %79, align 4
- store i32 %19, i32* %scevgep9.2, align 4
- store i32 %17, i32* %scevgep10.2, align 4
- %80 = load i32* %6, align 4 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalIjE11sortMinDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 %80, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %81 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 0 ; [#uses=1]
- %82 = load i32* %81, align 4 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalIjE11sortMaxDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 %82, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %83 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 1 ; [#uses=1]
- %84 = load i32* %83, align 4 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalIjE11sortMinDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 1, i32 %84, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %85 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 1 ; [#uses=1]
- %86 = load i32* %85, align 4 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalIjE11sortMaxDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 1, i32 %86, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %87 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 1, i32 2 ; [#uses=1]
- %88 = load i32* %87, align 4 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalIjE11sortMinDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 2, i32 %88, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- %89 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %5, i32 %3, i32 2, i32 2 ; [#uses=1]
- %90 = load i32* %89, align 4 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalIjE11sortMaxDownEijP12btDispatcherb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 2, i32 %90, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- ret i32 %3
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphaseProxy* @_ZN20btAxisSweep3InternalIjE11createProxyERK9btVector3S3_iPvssP12btDispatcherS4_(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i32 %shapeType, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* %multiSapProxy) align 2 {
-entry:
- %0 = tail call i32 @_ZN20btAxisSweep3InternalIjE9addHandleERK9btVector3S3_PvssP12btDispatcherS4_(%"struct.btAxisSweep3Internal<unsigned int>"* %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* %multiSapProxy) ; [#uses=2]
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %2 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %4 = load %struct.btDbvtBroadphase** %3, align 4 ; [#uses=3]
- %5 = icmp eq %struct.btDbvtBroadphase* %4, null ; [#uses=1]
- br i1 %5, label %bb1, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btDbvtBroadphase* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 2 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to %struct.btBroadphaseProxy* (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* ; [#uses=1]
- %11 = tail call %struct.btBroadphaseProxy* %10(%struct.btDbvtBroadphase* %4, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i32 %shapeType, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* null) ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %2, i32 %0, i32 3 ; [#uses=1]
- store %struct.btBroadphaseProxy* %11, %struct.btBroadphaseProxy** %12, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %2, i32 %0, i32 0 ; [#uses=1]
- ret %struct.btBroadphaseProxy* %13
-}
-
-; [#uses=11]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %CompareFunc, i32 %lo, i32 %hi) nounwind align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=3]
- %4 = add nsw i32 %hi, %lo ; [#uses=1]
- %5 = sdiv i32 %4, 2 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 %5, i32 0 ; [#uses=1]
- %7 = load %struct.btBroadphaseProxy** %6, align 4 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 %5, i32 1 ; [#uses=1]
- %9 = load %struct.btBroadphaseProxy** %8, align 4 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 %5, i32 2 ; [#uses=1]
- %11 = load %struct.btCollisionAlgorithm** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btBroadphaseProxy* %7, null ; [#uses=2]
- %13 = icmp eq %struct.btBroadphaseProxy* %9, null ; [#uses=2]
- %14 = getelementptr inbounds %struct.btBroadphaseProxy* %9, i32 0, i32 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btBroadphaseProxy* %7, i32 0, i32 4 ; [#uses=2]
- br label %bb1.outer
-
-bb1.outer: ; preds = %bb7, %entry
- %i.0.ph = phi i32 [ %lo, %entry ], [ %i.1, %bb7 ] ; [#uses=1]
- %j.1.ph = phi i32 [ %hi, %entry ], [ %j.2, %bb7 ] ; [#uses=1]
- %16 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=8]
- br label %bb1
-
-bb: ; preds = %_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit, %bb12.i, %bb11.i
- %indvar.next42 = add i32 %indvar41, 1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %bb1.outer
- %indvar41 = phi i32 [ 0, %bb1.outer ], [ %indvar.next42, %bb ] ; [#uses=2]
- %i.0 = add i32 %i.0.ph, %indvar41 ; [#uses=7]
- %scevgep44 = getelementptr %struct.btBroadphasePair* %16, i32 %i.0, i32 2 ; [#uses=3]
- %scevgep45 = getelementptr %struct.btBroadphasePair* %16, i32 %i.0, i32 1 ; [#uses=2]
- %scevgep4647 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %i.0, i32 0 ; [#uses=2]
- %17 = load %struct.btBroadphaseProxy** %scevgep4647, align 4 ; [#uses=4]
- %18 = icmp eq %struct.btBroadphaseProxy* %17, null ; [#uses=1]
- br i1 %18, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %bb1
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %17, i32 0, i32 4 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=1]
- br label %bb2.i
-
-bb2.i: ; preds = %bb.i, %bb1
- %iftmp.37.0.i = phi i32 [ %20, %bb.i ], [ -1, %bb1 ] ; [#uses=1]
- br i1 %12, label %bb5.i, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %21 = load i32* %15, align 4 ; [#uses=1]
- br label %bb5.i
-
-bb5.i: ; preds = %bb3.i, %bb2.i
- %iftmp.38.0.i = phi i32 [ %21, %bb3.i ], [ -1, %bb2.i ] ; [#uses=1]
- %22 = load %struct.btBroadphaseProxy** %scevgep45, align 4 ; [#uses=4]
- %23 = icmp eq %struct.btBroadphaseProxy* %22, null ; [#uses=1]
- br i1 %23, label %bb8.i, label %bb6.i
-
-bb6.i: ; preds = %bb5.i
- %24 = getelementptr inbounds %struct.btBroadphaseProxy* %22, i32 0, i32 4 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- br label %bb8.i
-
-bb8.i: ; preds = %bb6.i, %bb5.i
- %iftmp.39.0.i = phi i32 [ %25, %bb6.i ], [ -1, %bb5.i ] ; [#uses=1]
- br i1 %13, label %bb11.i, label %bb9.i
-
-bb9.i: ; preds = %bb8.i
- %26 = load i32* %14, align 4 ; [#uses=1]
- br label %bb11.i
-
-bb11.i: ; preds = %bb9.i, %bb8.i
- %iftmp.40.0.i = phi i32 [ %26, %bb9.i ], [ -1, %bb8.i ] ; [#uses=1]
- %27 = icmp sgt i32 %iftmp.37.0.i, %iftmp.38.0.i ; [#uses=1]
- br i1 %27, label %bb, label %bb12.i
-
-bb12.i: ; preds = %bb11.i
- %28 = icmp eq %struct.btBroadphaseProxy* %17, %7 ; [#uses=2]
- %29 = icmp sgt i32 %iftmp.39.0.i, %iftmp.40.0.i ; [#uses=1]
- %30 = and i1 %28, %29 ; [#uses=1]
- br i1 %30, label %bb, label %bb15.i
-
-bb15.i: ; preds = %bb12.i
- %31 = icmp eq %struct.btBroadphaseProxy* %22, %9 ; [#uses=1]
- %or.cond.i = and i1 %28, %31 ; [#uses=1]
- br i1 %or.cond.i, label %_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit, label %bb3
-
-_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit: ; preds = %bb15.i
- %32 = load %struct.btCollisionAlgorithm** %scevgep44, align 4 ; [#uses=1]
- %phitmp = icmp ugt %struct.btCollisionAlgorithm* %32, %11 ; [#uses=1]
- br i1 %phitmp, label %bb, label %bb3
-
-bb2: ; preds = %_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit32, %bb12.i25, %bb11.i24
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit, %bb15.i
- %indvar = phi i32 [ %indvar.next, %bb2 ], [ 0, %bb15.i ], [ 0, %_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit ] ; [#uses=2]
- %j.0 = sub i32 %j.1.ph, %indvar ; [#uses=11]
- %scevgep = getelementptr %struct.btBroadphasePair* %16, i32 %j.0, i32 2 ; [#uses=2]
- %scevgep38 = getelementptr %struct.btBroadphasePair* %16, i32 %j.0, i32 1 ; [#uses=1]
- %scevgep3940 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %j.0, i32 0 ; [#uses=1]
- br i1 %12, label %bb2.i15, label %bb.i13
-
-bb.i13: ; preds = %bb3
- %33 = load i32* %15, align 4 ; [#uses=1]
- br label %bb2.i15
-
-bb2.i15: ; preds = %bb.i13, %bb3
- %iftmp.37.0.i14 = phi i32 [ %33, %bb.i13 ], [ -1, %bb3 ] ; [#uses=1]
- %34 = load %struct.btBroadphaseProxy** %scevgep3940, align 4 ; [#uses=4]
- %35 = icmp eq %struct.btBroadphaseProxy* %34, null ; [#uses=1]
- br i1 %35, label %bb5.i18, label %bb3.i16
-
-bb3.i16: ; preds = %bb2.i15
- %36 = getelementptr inbounds %struct.btBroadphaseProxy* %34, i32 0, i32 4 ; [#uses=1]
- %37 = load i32* %36, align 4 ; [#uses=1]
- br label %bb5.i18
-
-bb5.i18: ; preds = %bb3.i16, %bb2.i15
- %iftmp.38.0.i17 = phi i32 [ %37, %bb3.i16 ], [ -1, %bb2.i15 ] ; [#uses=1]
- br i1 %13, label %bb8.i21, label %bb6.i19
-
-bb6.i19: ; preds = %bb5.i18
- %38 = load i32* %14, align 4 ; [#uses=1]
- br label %bb8.i21
-
-bb8.i21: ; preds = %bb6.i19, %bb5.i18
- %iftmp.39.0.i20 = phi i32 [ %38, %bb6.i19 ], [ -1, %bb5.i18 ] ; [#uses=1]
- %39 = load %struct.btBroadphaseProxy** %scevgep38, align 4 ; [#uses=4]
- %40 = icmp eq %struct.btBroadphaseProxy* %39, null ; [#uses=1]
- br i1 %40, label %bb11.i24, label %bb9.i22
-
-bb9.i22: ; preds = %bb8.i21
- %41 = getelementptr inbounds %struct.btBroadphaseProxy* %39, i32 0, i32 4 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- br label %bb11.i24
-
-bb11.i24: ; preds = %bb9.i22, %bb8.i21
- %iftmp.40.0.i23 = phi i32 [ %42, %bb9.i22 ], [ -1, %bb8.i21 ] ; [#uses=1]
- %43 = icmp sgt i32 %iftmp.37.0.i14, %iftmp.38.0.i17 ; [#uses=1]
- br i1 %43, label %bb2, label %bb12.i25
-
-bb12.i25: ; preds = %bb11.i24
- %44 = icmp eq %struct.btBroadphaseProxy* %7, %34 ; [#uses=2]
- %45 = icmp sgt i32 %iftmp.39.0.i20, %iftmp.40.0.i23 ; [#uses=1]
- %46 = and i1 %44, %45 ; [#uses=1]
- br i1 %46, label %bb2, label %bb15.i27
-
-bb15.i27: ; preds = %bb12.i25
- %47 = icmp eq %struct.btBroadphaseProxy* %9, %39 ; [#uses=1]
- %or.cond.i26 = and i1 %44, %47 ; [#uses=1]
- br i1 %or.cond.i26, label %_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit32, label %bb5
-
-_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit32: ; preds = %bb15.i27
- %48 = load %struct.btCollisionAlgorithm** %scevgep, align 4 ; [#uses=1]
- %phitmp34 = icmp ugt %struct.btCollisionAlgorithm* %11, %48 ; [#uses=1]
- br i1 %phitmp34, label %bb2, label %bb5
-
-bb5: ; preds = %_ZN29btBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit32, %bb15.i27
- %49 = icmp sgt i32 %i.0, %j.0 ; [#uses=1]
- br i1 %49, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %50 = load %struct.btCollisionAlgorithm** %scevgep44, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %i.0, i32 3, i32 0 ; [#uses=2]
- %52 = load i8** %51, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %34, %struct.btBroadphaseProxy** %scevgep4647, align 4
- store %struct.btBroadphaseProxy* %39, %struct.btBroadphaseProxy** %scevgep45, align 4
- %53 = load %struct.btCollisionAlgorithm** %scevgep, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %53, %struct.btCollisionAlgorithm** %scevgep44, align 4
- %54 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %j.0, i32 3, i32 0 ; [#uses=1]
- %55 = load i8** %54, align 4 ; [#uses=1]
- store i8* %55, i8** %51, align 4
- %56 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=4]
- %57 = getelementptr inbounds %struct.btBroadphasePair* %56, i32 %j.0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* %17, %struct.btBroadphaseProxy** %57, align 4
- %58 = getelementptr inbounds %struct.btBroadphasePair* %56, i32 %j.0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %22, %struct.btBroadphaseProxy** %58, align 4
- %59 = getelementptr inbounds %struct.btBroadphasePair* %56, i32 %j.0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %50, %struct.btCollisionAlgorithm** %59, align 4
- %60 = getelementptr inbounds %struct.btBroadphasePair* %56, i32 %j.0, i32 3, i32 0 ; [#uses=1]
- store i8* %52, i8** %60, align 4
- %61 = add nsw i32 %i.0, 1 ; [#uses=1]
- %62 = add nsw i32 %j.0, -1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %i.1 = phi i32 [ %61, %bb6 ], [ %i.0, %bb5 ] ; [#uses=4]
- %j.2 = phi i32 [ %62, %bb6 ], [ %j.0, %bb5 ] ; [#uses=4]
- %63 = icmp sgt i32 %i.1, %j.2 ; [#uses=1]
- br i1 %63, label %bb8, label %bb1.outer
-
-bb8: ; preds = %bb7
- %64 = icmp sgt i32 %j.2, %lo ; [#uses=1]
- br i1 %64, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 %lo, i32 %j.2)
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %65 = icmp slt i32 %i.1, %hi ; [#uses=1]
- br i1 %65, label %bb11, label %return
-
-bb11: ; preds = %bb10
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 %i.1, i32 %hi)
- ret void
-
-return: ; preds = %bb10
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, i32 %axis, i16 zeroext %edge, %struct.btActionInterface* nocapture %unnamed_arg, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %0, align 4 ; [#uses=7]
- %2 = zext i16 %edge to i32 ; [#uses=5]
- %.sum = add i32 %2, -1 ; [#uses=2]
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %2, i32 1 ; [#uses=1]
- %4 = load i16* %3, align 2 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %6 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %5, align 4 ; [#uses=7]
- %7 = zext i16 %4 to i32 ; [#uses=6]
- %8 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %2, i32 0 ; [#uses=1]
- %9 = load i16* %8, align 2 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %.sum, i32 0 ; [#uses=1]
- %11 = load i16* %10, align 2 ; [#uses=1]
- %12 = icmp ult i16 %9, %11 ; [#uses=1]
- br i1 %12, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 1, i32 %axis ; [#uses=2]
- %14 = shl i32 1, %axis ; [#uses=1]
- %15 = and i32 %14, 3 ; [#uses=5]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %16 = shl i32 1, %15 ; [#uses=1]
- %17 = and i32 %16, 3 ; [#uses=4]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 2, i32 %15 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 1, i32 %15 ; [#uses=1]
- %20 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 2, i32 %17 ; [#uses=1]
- %21 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 1, i32 %17 ; [#uses=1]
- %22 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 0 ; [#uses=2]
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %tmp27 = add i32 %2, -2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb19.bb_crit_edge, %bb.nph
- %25 = phi %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* [ %6, %bb.nph ], [ %.pre, %bb19.bb_crit_edge ] ; [#uses=7]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb19.bb_crit_edge ] ; [#uses=4]
- %tmp28 = sub i32 %tmp27, %indvar ; [#uses=1]
- %scevgep29 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp28, i32 0 ; [#uses=1]
- %tmp30 = sub i32 %2, %indvar ; [#uses=2]
- %scevgep31 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp30, i32 0 ; [#uses=3]
- %scevgep32 = getelementptr i16* %scevgep31, i32 -1 ; [#uses=3]
- %tmp34 = sub i32 %.sum, %indvar ; [#uses=1]
- %scevgep3536 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp34, i32 0 ; [#uses=3]
- %scevgep37 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp30, i32 1 ; [#uses=2]
- %26 = load i16* %scevgep32, align 2 ; [#uses=1]
- %27 = zext i16 %26 to i32 ; [#uses=7]
- %28 = load i16* %scevgep3536, align 2 ; [#uses=1]
- %29 = and i16 %28, 1 ; [#uses=1]
- %30 = icmp eq i16 %29, 0 ; [#uses=1]
- br i1 %30, label %bb18, label %bb1
-
-bb1: ; preds = %bb
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %31 = load i16* %18, align 2 ; [#uses=1]
- %32 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %25, i32 %27, i32 1, i32 %15 ; [#uses=1]
- %33 = load i16* %32, align 2 ; [#uses=1]
- %34 = icmp ult i16 %31, %33 ; [#uses=1]
- br i1 %34, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %35 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %25, i32 %27, i32 2, i32 %15 ; [#uses=1]
- %36 = load i16* %35, align 2 ; [#uses=1]
- %37 = load i16* %19, align 2 ; [#uses=1]
- %38 = icmp ult i16 %36, %37 ; [#uses=1]
- br i1 %38, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %39 = load i16* %20, align 2 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %25, i32 %27, i32 1, i32 %17 ; [#uses=1]
- %41 = load i16* %40, align 2 ; [#uses=1]
- %42 = icmp ult i16 %39, %41 ; [#uses=1]
- br i1 %42, label %bb17, label %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %43 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %25, i32 %27, i32 2, i32 %17 ; [#uses=1]
- %44 = load i16* %43, align 2 ; [#uses=1]
- %45 = load i16* %21, align 2 ; [#uses=1]
- %phitmp = icmp ult i16 %44, %45 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %46 = load %struct..0btMultiSapOverlapFilterCallback** %22, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %46, i32 0, i32 0, i32 0 ; [#uses=1]
- %48 = load i32 (...)*** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds i32 (...)** %48, i32 2 ; [#uses=1]
- %50 = load i32 (...)** %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %25, i32 %27, i32 0 ; [#uses=2]
- %52 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %46, i32 0, i32 0 ; [#uses=1]
- %53 = bitcast i32 (...)* %50 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %54 = tail call %struct.btBroadphasePair* %53(%struct.btActionInterface* %52, %struct.btBroadphaseProxy* %23, %struct.btBroadphaseProxy* %51) ; [#uses=0]
- %55 = load %struct.btActionInterface** %24, align 4 ; [#uses=3]
- %56 = icmp eq %struct.btActionInterface* %55, null ; [#uses=1]
- br i1 %56, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %57 = getelementptr inbounds %struct.btActionInterface* %55, i32 0, i32 0 ; [#uses=1]
- %58 = load i32 (...)*** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 2 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %62 = tail call %struct.btBroadphasePair* %61(%struct.btActionInterface* %55, %struct.btBroadphaseProxy* %23, %struct.btBroadphaseProxy* %51) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %63 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %25, i32 %27, i32 2, i32 %axis ; [#uses=2]
- %64 = load i16* %63, align 2 ; [#uses=1]
- %65 = add i16 %64, 1 ; [#uses=1]
- store i16 %65, i16* %63, align 2
- br label %bb19
-
-bb18: ; preds = %bb
- %66 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %25, i32 %27, i32 1, i32 %axis ; [#uses=2]
- %67 = load i16* %66, align 2 ; [#uses=1]
- %68 = add i16 %67, 1 ; [#uses=1]
- store i16 %68, i16* %66, align 2
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %69 = load i16* %13, align 2 ; [#uses=1]
- %70 = add i16 %69, -1 ; [#uses=1]
- store i16 %70, i16* %13, align 2
- %71 = load i16* %scevgep31, align 2 ; [#uses=2]
- %72 = load i16* %scevgep37, align 2 ; [#uses=1]
- %73 = load i16* %scevgep3536, align 2 ; [#uses=1]
- %74 = load i16* %scevgep32, align 2 ; [#uses=1]
- store i16 %73, i16* %scevgep31, align 2
- store i16 %74, i16* %scevgep37, align 2
- store i16 %71, i16* %scevgep3536, align 2
- store i16 %72, i16* %scevgep32, align 2
- %75 = load i16* %scevgep29, align 2 ; [#uses=1]
- %76 = icmp ult i16 %71, %75 ; [#uses=1]
- br i1 %76, label %bb19.bb_crit_edge, label %return
-
-bb19.bb_crit_edge: ; preds = %bb19
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- %.pre = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %5, align 4 ; [#uses=1]
- br label %bb
-
-return: ; preds = %bb19, %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE9sortMaxUpEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, i32 %axis, i16 zeroext %edge, %struct.btActionInterface* nocapture %unnamed_arg, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %0, align 4 ; [#uses=5]
- %2 = zext i16 %edge to i32 ; [#uses=3]
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %2, i32 1 ; [#uses=1]
- %4 = load i16* %3, align 2 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %6 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %5, align 4 ; [#uses=5]
- %7 = zext i16 %4 to i32 ; [#uses=5]
- %8 = shl i32 1, %axis ; [#uses=1]
- %9 = and i32 %8, 3 ; [#uses=5]
- %10 = shl i32 1, %9 ; [#uses=1]
- %11 = and i32 %10, 3 ; [#uses=4]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 2, i32 %9 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 1, i32 %9 ; [#uses=1]
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 2, i32 %11 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 1, i32 %11 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %17 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 2, i32 %axis ; [#uses=2]
- %tmp28 = add i32 %2, 1 ; [#uses=1]
- br label %bb20
-
-bb: ; preds = %bb21
- %19 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %5, align 4 ; [#uses=8]
- %20 = zext i16 %70 to i32 ; [#uses=7]
- %21 = and i16 %73, 1 ; [#uses=1]
- %22 = icmp eq i16 %21, 0 ; [#uses=1]
- br i1 %22, label %bb1, label %bb18
-
-bb1: ; preds = %bb
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %23 = load i16* %12, align 2 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %20, i32 1, i32 %9 ; [#uses=1]
- %25 = load i16* %24, align 2 ; [#uses=1]
- %26 = icmp ult i16 %23, %25 ; [#uses=1]
- br i1 %26, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %27 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %20, i32 2, i32 %9 ; [#uses=1]
- %28 = load i16* %27, align 2 ; [#uses=1]
- %29 = load i16* %13, align 2 ; [#uses=1]
- %30 = icmp ult i16 %28, %29 ; [#uses=1]
- br i1 %30, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %31 = load i16* %14, align 2 ; [#uses=1]
- %32 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %20, i32 1, i32 %11 ; [#uses=1]
- %33 = load i16* %32, align 2 ; [#uses=1]
- %34 = icmp ult i16 %31, %33 ; [#uses=1]
- br i1 %34, label %bb17, label %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %35 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %20, i32 2, i32 %11 ; [#uses=1]
- %36 = load i16* %35, align 2 ; [#uses=1]
- %37 = load i16* %15, align 2 ; [#uses=1]
- %phitmp = icmp ult i16 %36, %37 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %38 = load i16* %scevgep27, align 2 ; [#uses=1]
- %39 = zext i16 %38 to i32 ; [#uses=1]
- %40 = load %struct..0btMultiSapOverlapFilterCallback** %16, align 4 ; [#uses=2]
- %41 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %40, i32 0, i32 0, i32 0 ; [#uses=1]
- %42 = load i32 (...)*** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds i32 (...)** %42, i32 2 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %20, i32 0 ; [#uses=2]
- %46 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %39, i32 0 ; [#uses=2]
- %47 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %40, i32 0, i32 0 ; [#uses=1]
- %48 = bitcast i32 (...)* %44 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %49 = tail call %struct.btBroadphasePair* %48(%struct.btActionInterface* %47, %struct.btBroadphaseProxy* %46, %struct.btBroadphaseProxy* %45) ; [#uses=0]
- %50 = load %struct.btActionInterface** %17, align 4 ; [#uses=3]
- %51 = icmp eq %struct.btActionInterface* %50, null ; [#uses=1]
- br i1 %51, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %52 = getelementptr inbounds %struct.btActionInterface* %50, i32 0, i32 0 ; [#uses=1]
- %53 = load i32 (...)*** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds i32 (...)** %53, i32 2 ; [#uses=1]
- %55 = load i32 (...)** %54, align 4 ; [#uses=1]
- %56 = bitcast i32 (...)* %55 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %57 = tail call %struct.btBroadphasePair* %56(%struct.btActionInterface* %50, %struct.btBroadphaseProxy* %46, %struct.btBroadphaseProxy* %45) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %58 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %20, i32 1, i32 %axis ; [#uses=2]
- %59 = load i16* %58, align 2 ; [#uses=1]
- %60 = add i16 %59, -1 ; [#uses=1]
- store i16 %60, i16* %58, align 2
- br label %bb19
-
-bb18: ; preds = %bb
- %61 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %19, i32 %20, i32 2, i32 %axis ; [#uses=2]
- %62 = load i16* %61, align 2 ; [#uses=1]
- %63 = add i16 %62, -1 ; [#uses=1]
- store i16 %63, i16* %61, align 2
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %64 = load i16* %18, align 2 ; [#uses=1]
- %65 = add i16 %64, 1 ; [#uses=1]
- store i16 %65, i16* %18, align 2
- %66 = load i16* %scevgep26, align 2 ; [#uses=1]
- %67 = load i16* %scevgep27, align 2 ; [#uses=1]
- %68 = load i16* %scevgep3031, align 2 ; [#uses=1]
- %69 = load i16* %scevgep32, align 2 ; [#uses=1]
- store i16 %68, i16* %scevgep26, align 2
- store i16 %69, i16* %scevgep27, align 2
- store i16 %66, i16* %scevgep3031, align 2
- store i16 %67, i16* %scevgep32, align 2
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb19, %entry
- %indvar = phi i32 [ %indvar.next, %bb19 ], [ 0, %entry ] ; [#uses=3]
- %tmp25 = add i32 %2, %indvar ; [#uses=2]
- %scevgep26 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp25, i32 0 ; [#uses=3]
- %scevgep27 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp25, i32 1 ; [#uses=3]
- %tmp29 = add i32 %tmp28, %indvar ; [#uses=2]
- %scevgep3031 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp29, i32 0 ; [#uses=3]
- %scevgep32 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp29, i32 1 ; [#uses=3]
- %70 = load i16* %scevgep32, align 2 ; [#uses=2]
- %71 = icmp eq i16 %70, 0 ; [#uses=1]
- br i1 %71, label %return, label %bb21
-
-bb21: ; preds = %bb20
- %72 = load i16* %scevgep26, align 2 ; [#uses=1]
- %73 = load i16* %scevgep3031, align 2 ; [#uses=2]
- %74 = icmp ult i16 %72, %73 ; [#uses=1]
- br i1 %74, label %return, label %bb
-
-return: ; preds = %bb21, %bb20
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE9sortMinUpEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, i32 %axis, i16 zeroext %edge, %struct.btActionInterface* %dispatcher, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %0, align 4 ; [#uses=5]
- %2 = zext i16 %edge to i32 ; [#uses=3]
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %2, i32 1 ; [#uses=1]
- %4 = load i16* %3, align 2 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %6 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %5, align 4 ; [#uses=1]
- %7 = zext i16 %4 to i32 ; [#uses=1]
- %8 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %6, i32 %7, i32 1, i32 %axis ; [#uses=2]
- %9 = shl i32 1, %axis ; [#uses=1]
- %10 = and i32 %9, 3 ; [#uses=5]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %11 = shl i32 1, %10 ; [#uses=1]
- %12 = and i32 %11, 3 ; [#uses=4]
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %tmp28 = add i32 %2, 1 ; [#uses=1]
- br label %bb20
-
-bb: ; preds = %bb21
- %15 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %5, align 4 ; [#uses=12]
- %16 = zext i16 %70 to i32 ; [#uses=7]
- %17 = and i16 %73, 1 ; [#uses=1]
- %18 = icmp eq i16 %17, 0 ; [#uses=1]
- br i1 %18, label %bb18, label %bb1
-
-bb1: ; preds = %bb
- %19 = load i16* %scevgep27, align 2 ; [#uses=1]
- %20 = zext i16 %19 to i32 ; [#uses=5]
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %21 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %20, i32 2, i32 %10 ; [#uses=1]
- %22 = load i16* %21, align 2 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %16, i32 1, i32 %10 ; [#uses=1]
- %24 = load i16* %23, align 2 ; [#uses=1]
- %25 = icmp ult i16 %22, %24 ; [#uses=1]
- br i1 %25, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %16, i32 2, i32 %10 ; [#uses=1]
- %27 = load i16* %26, align 2 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %20, i32 1, i32 %10 ; [#uses=1]
- %29 = load i16* %28, align 2 ; [#uses=1]
- %30 = icmp ult i16 %27, %29 ; [#uses=1]
- br i1 %30, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %31 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %20, i32 2, i32 %12 ; [#uses=1]
- %32 = load i16* %31, align 2 ; [#uses=1]
- %33 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %16, i32 1, i32 %12 ; [#uses=1]
- %34 = load i16* %33, align 2 ; [#uses=1]
- %35 = icmp ult i16 %32, %34 ; [#uses=1]
- br i1 %35, label %bb17, label %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %36 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %16, i32 2, i32 %12 ; [#uses=1]
- %37 = load i16* %36, align 2 ; [#uses=1]
- %38 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %20, i32 1, i32 %12 ; [#uses=1]
- %39 = load i16* %38, align 2 ; [#uses=1]
- %phitmp = icmp ult i16 %37, %39 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %40 = load %struct..0btMultiSapOverlapFilterCallback** %13, align 4 ; [#uses=2]
- %41 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %40, i32 0, i32 0, i32 0 ; [#uses=1]
- %42 = load i32 (...)*** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds i32 (...)** %42, i32 3 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %16, i32 0 ; [#uses=2]
- %46 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %20, i32 0 ; [#uses=2]
- %47 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %40, i32 0, i32 0 ; [#uses=1]
- %48 = bitcast i32 (...)* %44 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %49 = tail call i8* %48(%struct.btActionInterface* %47, %struct.btBroadphaseProxy* %46, %struct.btBroadphaseProxy* %45, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- %50 = load %struct.btActionInterface** %14, align 4 ; [#uses=3]
- %51 = icmp eq %struct.btActionInterface* %50, null ; [#uses=1]
- br i1 %51, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %52 = getelementptr inbounds %struct.btActionInterface* %50, i32 0, i32 0 ; [#uses=1]
- %53 = load i32 (...)*** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds i32 (...)** %53, i32 3 ; [#uses=1]
- %55 = load i32 (...)** %54, align 4 ; [#uses=1]
- %56 = bitcast i32 (...)* %55 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %57 = tail call i8* %56(%struct.btActionInterface* %50, %struct.btBroadphaseProxy* %46, %struct.btBroadphaseProxy* %45, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %58 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %16, i32 2, i32 %axis ; [#uses=2]
- %59 = load i16* %58, align 2 ; [#uses=1]
- %60 = add i16 %59, -1 ; [#uses=1]
- store i16 %60, i16* %58, align 2
- br label %bb19
-
-bb18: ; preds = %bb
- %61 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %15, i32 %16, i32 1, i32 %axis ; [#uses=2]
- %62 = load i16* %61, align 2 ; [#uses=1]
- %63 = add i16 %62, -1 ; [#uses=1]
- store i16 %63, i16* %61, align 2
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %64 = load i16* %8, align 2 ; [#uses=1]
- %65 = add i16 %64, 1 ; [#uses=1]
- store i16 %65, i16* %8, align 2
- %66 = load i16* %scevgep26, align 2 ; [#uses=1]
- %67 = load i16* %scevgep27, align 2 ; [#uses=1]
- %68 = load i16* %scevgep3031, align 2 ; [#uses=1]
- %69 = load i16* %scevgep32, align 2 ; [#uses=1]
- store i16 %68, i16* %scevgep26, align 2
- store i16 %69, i16* %scevgep27, align 2
- store i16 %66, i16* %scevgep3031, align 2
- store i16 %67, i16* %scevgep32, align 2
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb19, %entry
- %indvar = phi i32 [ %indvar.next, %bb19 ], [ 0, %entry ] ; [#uses=3]
- %tmp25 = add i32 %2, %indvar ; [#uses=2]
- %scevgep26 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp25, i32 0 ; [#uses=3]
- %scevgep27 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp25, i32 1 ; [#uses=3]
- %tmp29 = add i32 %tmp28, %indvar ; [#uses=2]
- %scevgep3031 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp29, i32 0 ; [#uses=3]
- %scevgep32 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp29, i32 1 ; [#uses=3]
- %70 = load i16* %scevgep32, align 2 ; [#uses=2]
- %71 = icmp eq i16 %70, 0 ; [#uses=1]
- br i1 %71, label %return, label %bb21
-
-bb21: ; preds = %bb20
- %72 = load i16* %scevgep26, align 2 ; [#uses=1]
- %73 = load i16* %scevgep3031, align 2 ; [#uses=2]
- %74 = icmp ult i16 %72, %73 ; [#uses=1]
- br i1 %74, label %return, label %bb
-
-return: ; preds = %bb21, %bb20
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE12removeHandleEtP12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, i16 zeroext %handle, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=5]
- %1 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- %3 = load %struct..0btMultiSapOverlapFilterCallback** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 14 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %9 = tail call zeroext i8 %8(%struct..0btMultiSapOverlapFilterCallback* %3) ; [#uses=1]
- %toBoolnot = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb.nph
-
-bb: ; preds = %entry
- %10 = zext i16 %handle to i32 ; [#uses=1]
- %11 = load %struct..0btMultiSapOverlapFilterCallback** %2, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %11, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 4 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %1, i32 %10, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %11, i32 0, i32 0 ; [#uses=1]
- %18 = bitcast i32 (...)* %15 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %18(%struct.btActionInterface* %17, %struct.btBroadphaseProxy* %16, %struct.btActionInterface* %dispatcher)
- br label %bb.nph
-
-bb.nph: ; preds = %bb, %entry
- %19 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 6 ; [#uses=3]
- %20 = load i16* %19, align 4 ; [#uses=1]
- %21 = zext i16 %20 to i32 ; [#uses=1]
- %22 = shl i32 %21, 1 ; [#uses=1]
- %23 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %scevgep16 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %23, i32 0, i32 2, i32 0 ; [#uses=2]
- %24 = load i16* %scevgep16, align 2 ; [#uses=1]
- %25 = add i16 %24, -2 ; [#uses=1]
- store i16 %25, i16* %scevgep16, align 2
- %26 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %scevgep16.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %26, i32 0, i32 2, i32 1 ; [#uses=2]
- %27 = load i16* %scevgep16.1, align 2 ; [#uses=1]
- %28 = add i16 %27, -2 ; [#uses=1]
- store i16 %28, i16* %scevgep16.1, align 2
- %29 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %scevgep16.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %29, i32 0, i32 2, i32 2 ; [#uses=2]
- %30 = load i16* %scevgep16.2, align 2 ; [#uses=1]
- %31 = add i16 %30, -2 ; [#uses=1]
- store i16 %31, i16* %scevgep16.2, align 2
- %32 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 2 ; [#uses=3]
- %33 = add nsw i32 %22, -1 ; [#uses=2]
- %tmp = zext i16 %handle to i32 ; [#uses=2]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %34 = phi i32 [ 0, %bb.nph ], [ %47, %bb7 ] ; [#uses=6]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 %34 ; [#uses=1]
- %scevgep13 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %1, i32 %tmp, i32 2, i32 %34 ; [#uses=1]
- %scevgep14 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %1, i32 %tmp, i32 1, i32 %34 ; [#uses=1]
- %35 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep, align 4 ; [#uses=4]
- %36 = load i16* %scevgep13, align 2 ; [#uses=2]
- %37 = zext i16 %36 to i32 ; [#uses=1]
- %38 = load i16* %32, align 2 ; [#uses=1]
- %39 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %35, i32 %37, i32 0 ; [#uses=1]
- store i16 %38, i16* %39, align 2
- tail call void @_ZN20btAxisSweep3InternalItE9sortMaxUpEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 %34, i16 zeroext %36, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %40 = load i16* %scevgep14, align 2 ; [#uses=2]
- %41 = zext i16 %40 to i32 ; [#uses=1]
- %42 = load i16* %32, align 2 ; [#uses=1]
- %43 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %35, i32 %41, i32 0 ; [#uses=1]
- store i16 %42, i16* %43, align 2
- tail call void @_ZN20btAxisSweep3InternalItE9sortMinUpEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 %34, i16 zeroext %40, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %44 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %35, i32 %33, i32 1 ; [#uses=1]
- store i16 0, i16* %44, align 2
- %45 = load i16* %32, align 2 ; [#uses=1]
- %46 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %35, i32 %33, i32 0 ; [#uses=1]
- store i16 %45, i16* %46, align 2
- %47 = add nsw i32 %34, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %47, 3 ; [#uses=1]
- br i1 %exitcond, label %bb9, label %bb7
-
-bb9: ; preds = %bb7
- %48 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 9 ; [#uses=2]
- %49 = load i16* %48, align 4 ; [#uses=1]
- %50 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %0, align 4 ; [#uses=1]
- %51 = zext i16 %handle to i32 ; [#uses=1]
- %52 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %50, i32 %51, i32 1, i32 0 ; [#uses=1]
- store i16 %49, i16* %52, align 2
- store i16 %handle, i16* %48, align 4
- %53 = load i16* %19, align 4 ; [#uses=1]
- %54 = add i16 %53, -1 ; [#uses=1]
- store i16 %54, i16* %19, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE12destroyProxyEP17btBroadphaseProxyP12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %1 = load %struct.btDbvtBroadphase** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btDbvtBroadphase* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDbvtBroadphase* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 3 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 4 ; [#uses=1]
- %8 = bitcast i32* %7 to %struct.btBroadphaseProxy** ; [#uses=1]
- %9 = load %struct.btBroadphaseProxy** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %6 to void (%struct.btDbvtBroadphase*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %10(%struct.btDbvtBroadphase* %1, %struct.btBroadphaseProxy* %9, %struct.btActionInterface* %dispatcher)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %11 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 4 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = trunc i32 %12 to i16 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalItE12removeHandleEtP12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i16 zeroext %13, %struct.btActionInterface* %dispatcher)
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, i32 %axis, i16 zeroext %edge, %struct.btActionInterface* %dispatcher, i8 zeroext %updateOverlaps) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 %axis ; [#uses=1]
- %1 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %0, align 4 ; [#uses=7]
- %2 = zext i16 %edge to i32 ; [#uses=5]
- %.sum = add i32 %2, -1 ; [#uses=2]
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=2]
- %4 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %2, i32 0 ; [#uses=1]
- %6 = load i16* %5, align 2 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %.sum, i32 0 ; [#uses=1]
- %8 = load i16* %7, align 2 ; [#uses=1]
- %9 = icmp ult i16 %6, %8 ; [#uses=1]
- br i1 %9, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %10 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %2, i32 1 ; [#uses=1]
- %11 = load i16* %10, align 2 ; [#uses=1]
- %12 = zext i16 %11 to i32 ; [#uses=1]
- %13 = shl i32 1, %axis ; [#uses=1]
- %14 = and i32 %13, 3 ; [#uses=5]
- %toBool2not = icmp eq i8 %updateOverlaps, 0 ; [#uses=1]
- %15 = shl i32 1, %14 ; [#uses=1]
- %16 = and i32 %15, 3 ; [#uses=4]
- %17 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %4, i32 %12, i32 2, i32 %axis ; [#uses=2]
- %tmp27 = add i32 %2, -2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb19.bb_crit_edge, %bb.nph
- %20 = phi %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* [ %4, %bb.nph ], [ %.pre, %bb19.bb_crit_edge ] ; [#uses=12]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb19.bb_crit_edge ] ; [#uses=4]
- %tmp28 = sub i32 %tmp27, %indvar ; [#uses=1]
- %scevgep29 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp28, i32 0 ; [#uses=1]
- %tmp30 = sub i32 %2, %indvar ; [#uses=2]
- %scevgep31 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp30, i32 0 ; [#uses=3]
- %scevgep32 = getelementptr i16* %scevgep31, i32 -1 ; [#uses=3]
- %tmp34 = sub i32 %.sum, %indvar ; [#uses=1]
- %scevgep3536 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp34, i32 0 ; [#uses=3]
- %scevgep37 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %1, i32 %tmp30, i32 1 ; [#uses=3]
- %21 = load i16* %scevgep32, align 2 ; [#uses=1]
- %22 = zext i16 %21 to i32 ; [#uses=7]
- %23 = load i16* %scevgep3536, align 2 ; [#uses=1]
- %24 = and i16 %23, 1 ; [#uses=1]
- %25 = icmp eq i16 %24, 0 ; [#uses=1]
- br i1 %25, label %bb1, label %bb18
-
-bb1: ; preds = %bb
- %26 = load i16* %scevgep37, align 2 ; [#uses=1]
- %27 = zext i16 %26 to i32 ; [#uses=5]
- br i1 %toBool2not, label %bb17, label %bb6
-
-bb6: ; preds = %bb1
- %28 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %27, i32 2, i32 %14 ; [#uses=1]
- %29 = load i16* %28, align 2 ; [#uses=1]
- %30 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %22, i32 1, i32 %14 ; [#uses=1]
- %31 = load i16* %30, align 2 ; [#uses=1]
- %32 = icmp ult i16 %29, %31 ; [#uses=1]
- br i1 %32, label %bb17, label %bb.i
-
-bb.i: ; preds = %bb6
- %33 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %22, i32 2, i32 %14 ; [#uses=1]
- %34 = load i16* %33, align 2 ; [#uses=1]
- %35 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %27, i32 1, i32 %14 ; [#uses=1]
- %36 = load i16* %35, align 2 ; [#uses=1]
- %37 = icmp ult i16 %34, %36 ; [#uses=1]
- br i1 %37, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %38 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %27, i32 2, i32 %16 ; [#uses=1]
- %39 = load i16* %38, align 2 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %22, i32 1, i32 %16 ; [#uses=1]
- %41 = load i16* %40, align 2 ; [#uses=1]
- %42 = icmp ult i16 %39, %41 ; [#uses=1]
- br i1 %42, label %bb17, label %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
-
-_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit: ; preds = %bb1.i
- %43 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %22, i32 2, i32 %16 ; [#uses=1]
- %44 = load i16* %43, align 2 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %27, i32 1, i32 %16 ; [#uses=1]
- %46 = load i16* %45, align 2 ; [#uses=1]
- %phitmp = icmp ult i16 %44, %46 ; [#uses=1]
- br i1 %phitmp, label %bb17, label %bb15
-
-bb15: ; preds = %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit
- %47 = load %struct..0btMultiSapOverlapFilterCallback** %17, align 4 ; [#uses=2]
- %48 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %47, i32 0, i32 0, i32 0 ; [#uses=1]
- %49 = load i32 (...)*** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds i32 (...)** %49, i32 3 ; [#uses=1]
- %51 = load i32 (...)** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %22, i32 0 ; [#uses=2]
- %53 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %27, i32 0 ; [#uses=2]
- %54 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %47, i32 0, i32 0 ; [#uses=1]
- %55 = bitcast i32 (...)* %51 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %56 = tail call i8* %55(%struct.btActionInterface* %54, %struct.btBroadphaseProxy* %53, %struct.btBroadphaseProxy* %52, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- %57 = load %struct.btActionInterface** %18, align 4 ; [#uses=3]
- %58 = icmp eq %struct.btActionInterface* %57, null ; [#uses=1]
- br i1 %58, label %bb17, label %bb16
-
-bb16: ; preds = %bb15
- %59 = getelementptr inbounds %struct.btActionInterface* %57, i32 0, i32 0 ; [#uses=1]
- %60 = load i32 (...)*** %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds i32 (...)** %60, i32 3 ; [#uses=1]
- %62 = load i32 (...)** %61, align 4 ; [#uses=1]
- %63 = bitcast i32 (...)* %62 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %64 = tail call i8* %63(%struct.btActionInterface* %57, %struct.btBroadphaseProxy* %53, %struct.btBroadphaseProxy* %52, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15, %_ZN20btAxisSweep3InternalItE13testOverlap2DEPKNS0_6HandleES3_ii.exit, %bb1.i, %bb.i, %bb6, %bb1
- %65 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %22, i32 1, i32 %axis ; [#uses=2]
- %66 = load i16* %65, align 2 ; [#uses=1]
- %67 = add i16 %66, 1 ; [#uses=1]
- store i16 %67, i16* %65, align 2
- br label %bb19
-
-bb18: ; preds = %bb
- %68 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %20, i32 %22, i32 2, i32 %axis ; [#uses=2]
- %69 = load i16* %68, align 2 ; [#uses=1]
- %70 = add i16 %69, 1 ; [#uses=1]
- store i16 %70, i16* %68, align 2
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %71 = load i16* %19, align 2 ; [#uses=1]
- %72 = add i16 %71, -1 ; [#uses=1]
- store i16 %72, i16* %19, align 2
- %73 = load i16* %scevgep31, align 2 ; [#uses=2]
- %74 = load i16* %scevgep37, align 2 ; [#uses=1]
- %75 = load i16* %scevgep3536, align 2 ; [#uses=1]
- %76 = load i16* %scevgep32, align 2 ; [#uses=1]
- store i16 %75, i16* %scevgep31, align 2
- store i16 %76, i16* %scevgep37, align 2
- store i16 %73, i16* %scevgep3536, align 2
- store i16 %74, i16* %scevgep32, align 2
- %77 = load i16* %scevgep29, align 2 ; [#uses=1]
- %78 = icmp ult i16 %73, %77 ; [#uses=1]
- br i1 %78, label %bb19.bb_crit_edge, label %return
-
-bb19.bb_crit_edge: ; preds = %bb19
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- %.pre = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %3, align 4 ; [#uses=1]
- br label %bb
-
-return: ; preds = %bb19, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE12updateHandleEtRK9btVector3S3_P12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, i16 zeroext %handle, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* %dispatcher) align 2 {
-bb.nph:
- %min = alloca [3 x i16], align 2 ; [#uses=2]
- %max = alloca [3 x i16], align 2 ; [#uses=2]
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %1 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds [3 x i16]* %min, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i16* %2, %struct.btQuadWord* %aabbMin, i32 0) nounwind
- %3 = getelementptr inbounds [3 x i16]* %max, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i16* %3, %struct.btQuadWord* %aabbMax, i32 1) nounwind
- %tmp = zext i16 %handle to i32 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb8, %bb.nph
- %4 = phi i32 [ 0, %bb.nph ], [ %28, %bb8 ] ; [#uses=10]
- %scevgep = getelementptr [3 x i16]* %min, i32 0, i32 %4 ; [#uses=1]
- %scevgep12 = getelementptr [3 x i16]* %max, i32 0, i32 %4 ; [#uses=1]
- %scevgep13 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %1, i32 %tmp, i32 1, i32 %4 ; [#uses=1]
- %scevgep14 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %1, i32 %tmp, i32 2, i32 %4 ; [#uses=1]
- %scevgep15 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 %4 ; [#uses=2]
- %5 = load i16* %scevgep13, align 2 ; [#uses=3]
- %6 = load i16* %scevgep14, align 2 ; [#uses=3]
- %7 = load i16* %scevgep, align 2 ; [#uses=2]
- %8 = zext i16 %7 to i32 ; [#uses=1]
- %9 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep15, align 4 ; [#uses=2]
- %10 = zext i16 %5 to i32 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %9, i32 %10, i32 0 ; [#uses=2]
- %12 = load i16* %11, align 2 ; [#uses=1]
- %13 = zext i16 %12 to i32 ; [#uses=1]
- %14 = sub nsw i32 %8, %13 ; [#uses=2]
- %15 = load i16* %scevgep12, align 2 ; [#uses=2]
- %16 = zext i16 %15 to i32 ; [#uses=1]
- %17 = zext i16 %6 to i32 ; [#uses=2]
- %18 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %9, i32 %17, i32 0 ; [#uses=1]
- %19 = load i16* %18, align 2 ; [#uses=1]
- %20 = zext i16 %19 to i32 ; [#uses=1]
- %21 = sub nsw i32 %16, %20 ; [#uses=2]
- store i16 %7, i16* %11, align 2
- %22 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep15, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %22, i32 %17, i32 0 ; [#uses=1]
- store i16 %15, i16* %23, align 2
- %24 = icmp slt i32 %14, 0 ; [#uses=1]
- br i1 %24, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- call void @_ZN20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 %4, i16 zeroext %5, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %25 = icmp sgt i32 %21, 0 ; [#uses=1]
- br i1 %25, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- call void @_ZN20btAxisSweep3InternalItE9sortMaxUpEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 %4, i16 zeroext %6, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %26 = icmp sgt i32 %14, 0 ; [#uses=1]
- br i1 %26, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- call void @_ZN20btAxisSweep3InternalItE9sortMinUpEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 %4, i16 zeroext %5, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %27 = icmp slt i32 %21, 0 ; [#uses=1]
- br i1 %27, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- call void @_ZN20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 %4, i16 zeroext %6, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6
- %28 = add nsw i32 %4, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %28, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb8
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE7setAabbEP17btBroadphaseProxyRK9btVector3S5_P12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 4 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = trunc i32 %25 to i16 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalItE12updateHandleEtRK9btVector3S3_P12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i16 zeroext %26, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher)
- %27 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %28 = load %struct.btDbvtBroadphase** %27, align 4 ; [#uses=3]
- %29 = icmp eq %struct.btDbvtBroadphase* %28, null ; [#uses=1]
- br i1 %29, label %return, label %bb
-
-bb: ; preds = %entry
- %30 = getelementptr inbounds %struct.btDbvtBroadphase* %28, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load i32 (...)*** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32 (...)** %31, i32 4 ; [#uses=1]
- %33 = load i32 (...)** %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 4 ; [#uses=1]
- %35 = bitcast i32* %34 to %struct.btBroadphaseProxy** ; [#uses=1]
- %36 = load %struct.btBroadphaseProxy** %35, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %33 to void (%struct.btDbvtBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %37(%struct.btDbvtBroadphase* %28, %struct.btBroadphaseProxy* %36, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i16 @_ZN20btAxisSweep3InternalItE9addHandleERK9btVector3S3_PvssP12btDispatcherS4_(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, i8* %pOwner, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* %multiSapProxy) align 2 {
-bb2:
- %min = alloca [3 x i16], align 2 ; [#uses=3]
- %max = alloca [3 x i16], align 2 ; [#uses=3]
- %0 = getelementptr inbounds [3 x i16]* %min, i32 0, i32 0 ; [#uses=2]
- call void @_ZNK20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i16* %0, %struct.btQuadWord* %aabbMin, i32 0) nounwind
- %1 = getelementptr inbounds [3 x i16]* %max, i32 0, i32 0 ; [#uses=2]
- call void @_ZNK20btAxisSweep3InternalItE8quantizeEPtRK9btVector3i(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i16* %1, %struct.btQuadWord* %aabbMax, i32 1) nounwind
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 9 ; [#uses=2]
- %3 = load i16* %2, align 4 ; [#uses=8]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=4]
- %5 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %4, align 4 ; [#uses=16]
- %6 = zext i16 %3 to i32 ; [#uses=17]
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 1, i32 0 ; [#uses=3]
- %8 = load i16* %7, align 2 ; [#uses=1]
- store i16 %8, i16* %2, align 4
- %9 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 6 ; [#uses=3]
- %10 = load i16* %9, align 4 ; [#uses=1]
- %11 = add i16 %10, 1 ; [#uses=1]
- store i16 %11, i16* %9, align 4
- %12 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 0, i32 4 ; [#uses=1]
- store i32 %6, i32* %12, align 4
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 0, i32 0 ; [#uses=1]
- store i8* %pOwner, i8** %13, align 4
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 0, i32 1 ; [#uses=1]
- store i16 %collisionFilterGroup, i16* %14, align 4
- %15 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 0, i32 2 ; [#uses=1]
- store i16 %collisionFilterMask, i16* %15, align 2
- %16 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 0, i32 3 ; [#uses=1]
- store i8* %multiSapProxy, i8** %16, align 4
- %17 = load i16* %9, align 4 ; [#uses=1]
- %18 = shl i16 %17, 1 ; [#uses=5]
- %19 = zext i16 %18 to i32 ; [#uses=8]
- %20 = or i32 %19, 1 ; [#uses=6]
- %21 = add nsw i32 %19, -1 ; [#uses=12]
- %22 = add i16 %18, -1 ; [#uses=3]
- %scevgep7 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=5]
- %scevgep11 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 2, i32 0 ; [#uses=1]
- %23 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- %scevgep6 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %23, i32 0, i32 2, i32 0 ; [#uses=2]
- %24 = load i16* %scevgep6, align 2 ; [#uses=1]
- %25 = add i16 %24, 2 ; [#uses=1]
- store i16 %25, i16* %scevgep6, align 2
- %26 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7, align 4 ; [#uses=4]
- %27 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %26, i32 %21, i32 0 ; [#uses=1]
- %28 = load i16* %27, align 2 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %26, i32 %21, i32 1 ; [#uses=1]
- %30 = load i16* %29, align 2 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %26, i32 %20, i32 0 ; [#uses=1]
- store i16 %28, i16* %31, align 2
- %32 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %26, i32 %20, i32 1 ; [#uses=1]
- store i16 %30, i16* %32, align 2
- %33 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7, align 4 ; [#uses=1]
- %34 = load i16* %0, align 2 ; [#uses=1]
- %35 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %33, i32 %21, i32 0 ; [#uses=1]
- store i16 %34, i16* %35, align 2
- %36 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %36, i32 %21, i32 1 ; [#uses=1]
- store i16 %3, i16* %37, align 2
- %38 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7, align 4 ; [#uses=1]
- %39 = load i16* %1, align 2 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %38, i32 %19, i32 0 ; [#uses=1]
- store i16 %39, i16* %40, align 2
- %41 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %41, i32 %19, i32 1 ; [#uses=1]
- store i16 %3, i16* %42, align 2
- store i16 %22, i16* %7, align 2
- store i16 %18, i16* %scevgep11, align 2
- %scevgep7.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 1 ; [#uses=5]
- %scevgep8.1 = getelementptr [3 x i16]* %min, i32 0, i32 1 ; [#uses=1]
- %scevgep9.1 = getelementptr [3 x i16]* %max, i32 0, i32 1 ; [#uses=1]
- %scevgep10.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 1, i32 1 ; [#uses=1]
- %scevgep11.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 2, i32 1 ; [#uses=1]
- %43 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- %scevgep6.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %43, i32 0, i32 2, i32 1 ; [#uses=2]
- %44 = load i16* %scevgep6.1, align 2 ; [#uses=1]
- %45 = add i16 %44, 2 ; [#uses=1]
- store i16 %45, i16* %scevgep6.1, align 2
- %46 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.1, align 4 ; [#uses=4]
- %47 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %46, i32 %21, i32 0 ; [#uses=1]
- %48 = load i16* %47, align 2 ; [#uses=1]
- %49 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %46, i32 %21, i32 1 ; [#uses=1]
- %50 = load i16* %49, align 2 ; [#uses=1]
- %51 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %46, i32 %20, i32 0 ; [#uses=1]
- store i16 %48, i16* %51, align 2
- %52 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %46, i32 %20, i32 1 ; [#uses=1]
- store i16 %50, i16* %52, align 2
- %53 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.1, align 4 ; [#uses=1]
- %54 = load i16* %scevgep8.1, align 2 ; [#uses=1]
- %55 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %53, i32 %21, i32 0 ; [#uses=1]
- store i16 %54, i16* %55, align 2
- %56 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.1, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %56, i32 %21, i32 1 ; [#uses=1]
- store i16 %3, i16* %57, align 2
- %58 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.1, align 4 ; [#uses=1]
- %59 = load i16* %scevgep9.1, align 2 ; [#uses=1]
- %60 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %58, i32 %19, i32 0 ; [#uses=1]
- store i16 %59, i16* %60, align 2
- %61 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.1, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %61, i32 %19, i32 1 ; [#uses=1]
- store i16 %3, i16* %62, align 2
- store i16 %22, i16* %scevgep10.1, align 2
- store i16 %18, i16* %scevgep11.1, align 2
- %scevgep7.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 2 ; [#uses=5]
- %scevgep8.2 = getelementptr [3 x i16]* %min, i32 0, i32 2 ; [#uses=1]
- %scevgep9.2 = getelementptr [3 x i16]* %max, i32 0, i32 2 ; [#uses=1]
- %scevgep10.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 1, i32 2 ; [#uses=1]
- %scevgep11.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 2, i32 2 ; [#uses=1]
- %63 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %4, align 4 ; [#uses=1]
- %scevgep6.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %63, i32 0, i32 2, i32 2 ; [#uses=2]
- %64 = load i16* %scevgep6.2, align 2 ; [#uses=1]
- %65 = add i16 %64, 2 ; [#uses=1]
- store i16 %65, i16* %scevgep6.2, align 2
- %66 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.2, align 4 ; [#uses=4]
- %67 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %66, i32 %21, i32 0 ; [#uses=1]
- %68 = load i16* %67, align 2 ; [#uses=1]
- %69 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %66, i32 %21, i32 1 ; [#uses=1]
- %70 = load i16* %69, align 2 ; [#uses=1]
- %71 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %66, i32 %20, i32 0 ; [#uses=1]
- store i16 %68, i16* %71, align 2
- %72 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %66, i32 %20, i32 1 ; [#uses=1]
- store i16 %70, i16* %72, align 2
- %73 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.2, align 4 ; [#uses=1]
- %74 = load i16* %scevgep8.2, align 2 ; [#uses=1]
- %75 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %73, i32 %21, i32 0 ; [#uses=1]
- store i16 %74, i16* %75, align 2
- %76 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.2, align 4 ; [#uses=1]
- %77 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %76, i32 %21, i32 1 ; [#uses=1]
- store i16 %3, i16* %77, align 2
- %78 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.2, align 4 ; [#uses=1]
- %79 = load i16* %scevgep9.2, align 2 ; [#uses=1]
- %80 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %78, i32 %19, i32 0 ; [#uses=1]
- store i16 %79, i16* %80, align 2
- %81 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep7.2, align 4 ; [#uses=1]
- %82 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %81, i32 %19, i32 1 ; [#uses=1]
- store i16 %3, i16* %82, align 2
- store i16 %22, i16* %scevgep10.2, align 2
- store i16 %18, i16* %scevgep11.2, align 2
- %83 = load i16* %7, align 2 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i16 zeroext %83, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %84 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 2, i32 0 ; [#uses=1]
- %85 = load i16* %84, align 2 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i16 zeroext %85, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %86 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 1, i32 1 ; [#uses=1]
- %87 = load i16* %86, align 2 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 1, i16 zeroext %87, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %88 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 2, i32 1 ; [#uses=1]
- %89 = load i16* %88, align 2 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 1, i16 zeroext %89, %struct.btActionInterface* %dispatcher, i8 zeroext 0)
- %90 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 1, i32 2 ; [#uses=1]
- %91 = load i16* %90, align 2 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalItE11sortMinDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 2, i16 zeroext %91, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- %92 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %5, i32 %6, i32 2, i32 2 ; [#uses=1]
- %93 = load i16* %92, align 2 ; [#uses=1]
- call void @_ZN20btAxisSweep3InternalItE11sortMaxDownEitP12btDispatcherb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 2, i16 zeroext %93, %struct.btActionInterface* %dispatcher, i8 zeroext 1)
- ret i16 %3
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphaseProxy* @_ZN20btAxisSweep3InternalItE11createProxyERK9btVector3S3_iPvssP12btDispatcherS4_(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i32 %shapeType, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* %multiSapProxy) align 2 {
-entry:
- %0 = tail call zeroext i16 @_ZN20btAxisSweep3InternalItE9addHandleERK9btVector3S3_PvssP12btDispatcherS4_(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* %multiSapProxy) ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %2 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %1, align 4 ; [#uses=2]
- %3 = zext i16 %0 to i32 ; [#uses=2]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=1]
- %5 = load %struct.btDbvtBroadphase** %4, align 4 ; [#uses=3]
- %6 = icmp eq %struct.btDbvtBroadphase* %5, null ; [#uses=1]
- br i1 %6, label %bb1, label %bb
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct.btDbvtBroadphase* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 2 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to %struct.btBroadphaseProxy* (%struct.btDbvtBroadphase*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* ; [#uses=1]
- %12 = tail call %struct.btBroadphaseProxy* %11(%struct.btDbvtBroadphase* %5, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i32 %shapeType, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* null) ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %2, i32 %3, i32 3 ; [#uses=1]
- store %struct.btBroadphaseProxy* %12, %struct.btBroadphaseProxy** %13, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %14 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %2, i32 %3, i32 0 ; [#uses=1]
- ret %struct.btBroadphaseProxy* %14
-}
-
-; [#uses=9]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* nocapture %this, i32 %newsize, %struct.btBroadphasePair* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb9, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb9
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 4 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to %struct.btBroadphasePair* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi %struct.btBroadphasePair* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=5]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb.i4.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb.i4.i ] ; [#uses=9]
- %scevgep13.i.i = getelementptr %struct.btBroadphasePair* %11, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %scevgep11.i.i = getelementptr %struct.btBroadphasePair* %11, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %scevgep9.i.i = getelementptr %struct.btBroadphasePair* %11, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep67.i.i = getelementptr inbounds %struct.btBroadphasePair* %11, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %14 = load %struct.btBroadphasePair** %13, align 4 ; [#uses=4]
- %scevgep5.i.i = getelementptr inbounds %struct.btBroadphasePair* %14, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %15 = load %struct.btBroadphaseProxy** %scevgep5.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %15, %struct.btBroadphaseProxy** %scevgep67.i.i, align 4
- %scevgep8.i.i = getelementptr %struct.btBroadphasePair* %14, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %16 = load %struct.btBroadphaseProxy** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %16, %struct.btBroadphaseProxy** %scevgep9.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btBroadphasePair* %14, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %17 = load %struct.btCollisionAlgorithm** %scevgep10.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %17, %struct.btCollisionAlgorithm** %scevgep11.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btBroadphasePair* %14, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %18 = load i8** %scevgep12.i.i, align 4 ; [#uses=1]
- store i8* %18, i8** %scevgep13.i.i, align 4
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond19 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond19, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i: ; preds = %bb.i4.i, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=3]
- %20 = load %struct.btBroadphasePair** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.btBroadphasePair* %20, null ; [#uses=1]
- br i1 %21, label %bb8.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %22 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %24 = bitcast %struct.btBroadphasePair* %20 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %24)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %19, align 4
- br label %bb8.preheader
-
-bb8.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store %struct.btBroadphasePair* %11, %struct.btBroadphasePair** %19, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb9
-
-bb.nph: ; preds = %bb8.preheader, %bb4
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btBroadphasePair* %fillData, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btBroadphasePair* %fillData, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btBroadphasePair* %fillData, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btBroadphasePair* %fillData, i32 0, i32 3, i32 0 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb7 ] ; [#uses=2]
- %tmp14 = add i32 %1, %indvar ; [#uses=4]
- %31 = load %struct.btBroadphasePair** %26, align 4 ; [#uses=4]
- %32 = load %struct.btBroadphaseProxy** %27, align 4 ; [#uses=1]
- %scevgep15 = getelementptr inbounds %struct.btBroadphasePair* %31, i32 %tmp14, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* %32, %struct.btBroadphaseProxy** %scevgep15, align 4
- %33 = load %struct.btBroadphaseProxy** %28, align 4 ; [#uses=1]
- %scevgep16 = getelementptr %struct.btBroadphasePair* %31, i32 %tmp14, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %33, %struct.btBroadphaseProxy** %scevgep16, align 4
- %34 = load %struct.btCollisionAlgorithm** %29, align 4 ; [#uses=1]
- %scevgep17 = getelementptr %struct.btBroadphasePair* %31, i32 %tmp14, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %34, %struct.btCollisionAlgorithm** %scevgep17, align 4
- %35 = load i8** %30, align 4 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btBroadphasePair* %31, i32 %tmp14, i32 3, i32 0 ; [#uses=1]
- store i8* %35, i8** %scevgep18, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb9, label %bb7
-
-bb9: ; preds = %bb7, %bb8.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjE25calculateOverlappingPairsEP12btDispatcher(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %3 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=3]
- %5 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 14 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %11 = call zeroext i8 %10(%struct..0btMultiSapOverlapFilterCallback* %5) ; [#uses=1]
- %toBool = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %12 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 7 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to %"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %18 = call %"struct.btAlignedObjectArray<btBroadphasePair>"* %17(%struct..0btMultiSapOverlapFilterCallback* %12) ; [#uses=6]
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 0, i32 1 ; [#uses=5]
- %20 = load i32* %19, align 4 ; [#uses=3]
- %21 = icmp sgt i32 %20, 1 ; [#uses=1]
- br i1 %21, label %bb.i, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
-
-bb.i: ; preds = %bb
- %22 = add nsw i32 %20, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 0, i32 %22) nounwind
- %.pre = load i32* %19, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit: ; preds = %bb.i, %bb
- %23 = phi i32 [ %20, %bb ], [ %.pre, %bb.i ] ; [#uses=1]
- %24 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %24, align 8
- %25 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %25, align 4
- %26 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %26, align 8
- %27 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %27, align 4
- %28 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 15 ; [#uses=6]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %30 = sub nsw i32 %23, %29 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 %30, %struct.btBroadphasePair* %3) inlinehint
- store i32 0, i32* %28, align 4
- %31 = load i32* %19, align 4 ; [#uses=2]
- %32 = icmp sgt i32 %31, 0 ; [#uses=1]
- br i1 %32, label %bb.nph, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-bb.nph: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
- %33 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 0, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb14, %bb.nph
- %i.037 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb14 ] ; [#uses=5]
- %previousPair.1.036 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %58, %bb14 ] ; [#uses=1]
- %previousPair.0.035 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %35, %bb14 ] ; [#uses=1]
- %tmp = add i32 %i.037, 1 ; [#uses=2]
- %34 = load %struct.btBroadphasePair** %33, align 4 ; [#uses=4]
- %scevgep4849 = getelementptr inbounds %struct.btBroadphasePair* %34, i32 %i.037, i32 0 ; [#uses=2]
- %35 = load %struct.btBroadphaseProxy** %scevgep4849, align 4 ; [#uses=4]
- %36 = icmp eq %struct.btBroadphaseProxy* %35, %previousPair.0.035 ; [#uses=1]
- %scevgep58 = getelementptr %struct.btBroadphasePair* %34, i32 %i.037, i32 1 ; [#uses=2]
- %37 = load %struct.btBroadphaseProxy** %scevgep58, align 4 ; [#uses=6]
- %phitmp = icmp eq %struct.btBroadphaseProxy* %37, %previousPair.1.036 ; [#uses=1]
- %or.cond = and i1 %36, %phitmp ; [#uses=1]
- br i1 %or.cond, label %bb13, label %bb6
-
-bb6: ; preds = %bb1
- %scevgep = getelementptr %struct.btBroadphaseProxy* %35, i32 1, i32 0 ; [#uses=1]
- %scevgep40 = getelementptr %struct.btBroadphaseProxy* %37, i32 1, i32 4 ; [#uses=1]
- %scevgep42 = getelementptr %struct.btBroadphaseProxy* %35, i32 1, i32 4 ; [#uses=1]
- %scevgep44 = getelementptr %struct.btBroadphaseProxy* %37, i32 1, i32 0 ; [#uses=1]
- br label %bb4.i
-
-bb.i27: ; preds = %bb4.i
- %scevgep45 = getelementptr i8** %scevgep44, i32 %45 ; [#uses=1]
- %scevgep1617.i = bitcast i8** %scevgep45 to i32* ; [#uses=1]
- %scevgep11.i = getelementptr i32* %scevgep42, i32 %45 ; [#uses=1]
- %38 = load i32* %scevgep11.i, align 4 ; [#uses=1]
- %39 = load i32* %scevgep1617.i, align 4 ; [#uses=1]
- %40 = icmp ult i32 %38, %39 ; [#uses=1]
- br i1 %40, label %bb13.loopexit, label %bb1.i
-
-bb1.i: ; preds = %bb.i27
- %41 = load i32* %scevgep9.i, align 4 ; [#uses=1]
- %42 = load i32* %scevgep1314.i, align 4 ; [#uses=1]
- %43 = icmp ult i32 %41, %42 ; [#uses=1]
- br i1 %43, label %bb13.loopexit, label %bb3.i
-
-bb3.i: ; preds = %bb1.i
- %44 = add nsw i32 %45, 1 ; [#uses=1]
- br label %bb4.i
-
-bb4.i: ; preds = %bb3.i, %bb6
- %45 = phi i32 [ 0, %bb6 ], [ %44, %bb3.i ] ; [#uses=6]
- %scevgep38 = getelementptr i8** %scevgep, i32 %45 ; [#uses=1]
- %scevgep1314.i = bitcast i8** %scevgep38 to i32* ; [#uses=1]
- %scevgep9.i = getelementptr i32* %scevgep40, i32 %45 ; [#uses=1]
- %46 = icmp slt i32 %45, 3 ; [#uses=1]
- br i1 %46, label %bb.i27, label %bb14
-
-bb13.loopexit: ; preds = %bb1.i, %bb.i27
- %scevgep54.pre = getelementptr %struct.btBroadphasePair* %34, i32 %i.037, i32 1 ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb13.loopexit, %bb1
- %scevgep54.pre-phi = phi %struct.btBroadphaseProxy** [ %scevgep54.pre, %bb13.loopexit ], [ %scevgep58, %bb1 ] ; [#uses=1]
- %47 = phi %struct.btBroadphaseProxy* [ %37, %bb13.loopexit ], [ %37, %bb1 ] ; [#uses=1]
- %48 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %49 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %48, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load i32 (...)*** %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds i32 (...)** %50, i32 8 ; [#uses=1]
- %52 = load i32 (...)** %51, align 4 ; [#uses=1]
- %53 = bitcast i32 (...)* %52 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- %scevgep47 = getelementptr %struct.btBroadphasePair* %34, i32 %i.037 ; [#uses=1]
- call void %53(%struct..0btMultiSapOverlapFilterCallback* %48, %struct.btBroadphasePair* %scevgep47, %struct.btActionInterface* %dispatcher)
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep4849, align 4
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep54.pre-phi, align 4
- %54 = load i32* %28, align 4 ; [#uses=1]
- %55 = add nsw i32 %54, 1 ; [#uses=1]
- store i32 %55, i32* %28, align 4
- %56 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %57 = add nsw i32 %56, -1 ; [#uses=1]
- store i32 %57, i32* @gOverlappingPairs, align 4
- br label %bb14
-
-bb14: ; preds = %bb13, %bb4.i
- %58 = phi %struct.btBroadphaseProxy* [ %47, %bb13 ], [ %37, %bb4.i ] ; [#uses=1]
- %59 = load i32* %19, align 4 ; [#uses=4]
- %60 = icmp sgt i32 %59, %tmp ; [#uses=1]
- br i1 %60, label %bb1, label %bb17
-
-bb17: ; preds = %bb14
- %61 = icmp sgt i32 %59, 1 ; [#uses=1]
- br i1 %61, label %bb.i24, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-bb.i24: ; preds = %bb17
- %62 = add nsw i32 %59, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %62) nounwind
- %.pre62 = load i32* %19, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26: ; preds = %bb.i24, %bb17, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
- %63 = phi i32 [ %.pre62, %bb.i24 ], [ %59, %bb17 ], [ %31, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit ] ; [#uses=1]
- %64 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %64, align 8
- %65 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %65, align 4
- %66 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %66, align 8
- %67 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %67, align 4
- %68 = load i32* %28, align 4 ; [#uses=1]
- %69 = sub nsw i32 %63, %68 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 %69, %struct.btBroadphasePair* %2) inlinehint
- store i32 0, i32* %28, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItE25calculateOverlappingPairsEP12btDispatcher(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %3 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=3]
- %5 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 14 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %11 = call zeroext i8 %10(%struct..0btMultiSapOverlapFilterCallback* %5) ; [#uses=1]
- %toBool = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %12 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 7 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to %"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %18 = call %"struct.btAlignedObjectArray<btBroadphasePair>"* %17(%struct..0btMultiSapOverlapFilterCallback* %12) ; [#uses=6]
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 0, i32 1 ; [#uses=5]
- %20 = load i32* %19, align 4 ; [#uses=3]
- %21 = icmp sgt i32 %20, 1 ; [#uses=1]
- br i1 %21, label %bb.i, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
-
-bb.i: ; preds = %bb
- %22 = add nsw i32 %20, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 0, i32 %22) nounwind
- %.pre = load i32* %19, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit: ; preds = %bb.i, %bb
- %23 = phi i32 [ %20, %bb ], [ %.pre, %bb.i ] ; [#uses=1]
- %24 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %24, align 8
- %25 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %25, align 4
- %26 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %26, align 8
- %27 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %27, align 4
- %28 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 15 ; [#uses=6]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %30 = sub nsw i32 %23, %29 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 %30, %struct.btBroadphasePair* %3) inlinehint
- store i32 0, i32* %28, align 4
- %31 = load i32* %19, align 4 ; [#uses=2]
- %32 = icmp sgt i32 %31, 0 ; [#uses=1]
- br i1 %32, label %bb.nph, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-bb.nph: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
- %33 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 0, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb14, %bb.nph
- %i.037 = phi i32 [ 0, %bb.nph ], [ %tmp63, %bb14 ] ; [#uses=5]
- %previousPair.1.036 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %58, %bb14 ] ; [#uses=1]
- %previousPair.0.035 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %35, %bb14 ] ; [#uses=1]
- %tmp63 = add i32 %i.037, 1 ; [#uses=2]
- %34 = load %struct.btBroadphasePair** %33, align 4 ; [#uses=4]
- %scevgep4950 = getelementptr inbounds %struct.btBroadphasePair* %34, i32 %i.037, i32 0 ; [#uses=2]
- %35 = load %struct.btBroadphaseProxy** %scevgep4950, align 4 ; [#uses=4]
- %36 = icmp eq %struct.btBroadphaseProxy* %35, %previousPair.0.035 ; [#uses=1]
- %scevgep59 = getelementptr %struct.btBroadphasePair* %34, i32 %i.037, i32 1 ; [#uses=2]
- %37 = load %struct.btBroadphaseProxy** %scevgep59, align 4 ; [#uses=6]
- %phitmp = icmp eq %struct.btBroadphaseProxy* %37, %previousPair.1.036 ; [#uses=1]
- %or.cond = and i1 %36, %phitmp ; [#uses=1]
- br i1 %or.cond, label %bb13, label %bb6
-
-bb6: ; preds = %bb1
- %scevgep = getelementptr %struct.btBroadphaseProxy* %35, i32 1, i32 0 ; [#uses=1]
- %scevgep38 = bitcast i8** %scevgep to i8* ; [#uses=1]
- %scevgep40 = getelementptr %struct.btBroadphaseProxy* %37, i32 1, i32 0 ; [#uses=1]
- %scevgep4041 = bitcast i8** %scevgep40 to i8* ; [#uses=1]
- %scevgep44 = getelementptr %struct.btBroadphaseProxy* %37, i32 1, i32 2 ; [#uses=1]
- %scevgep46 = getelementptr %struct.btBroadphaseProxy* %35, i32 1, i32 2 ; [#uses=1]
- br label %bb4.i
-
-bb.i27: ; preds = %bb4.i
- %uglygep42 = getelementptr i8* %scevgep4041, i32 %tmp ; [#uses=1]
- %scevgep11.i = getelementptr i16* %scevgep46, i32 %45 ; [#uses=1]
- %uglygep1718.i = bitcast i8* %uglygep42 to i16* ; [#uses=1]
- %38 = load i16* %scevgep11.i, align 2 ; [#uses=1]
- %39 = load i16* %uglygep1718.i, align 2 ; [#uses=1]
- %40 = icmp ult i16 %38, %39 ; [#uses=1]
- br i1 %40, label %bb13.loopexit, label %bb1.i
-
-bb1.i: ; preds = %bb.i27
- %41 = load i16* %scevgep9.i, align 2 ; [#uses=1]
- %42 = load i16* %uglygep14.i, align 2 ; [#uses=1]
- %43 = icmp ult i16 %41, %42 ; [#uses=1]
- br i1 %43, label %bb13.loopexit, label %bb3.i
-
-bb3.i: ; preds = %bb1.i
- %44 = add nsw i32 %45, 1 ; [#uses=1]
- br label %bb4.i
-
-bb4.i: ; preds = %bb3.i, %bb6
- %45 = phi i32 [ 0, %bb6 ], [ %44, %bb3.i ] ; [#uses=5]
- %tmp = shl i32 %45, 1 ; [#uses=2]
- %uglygep = getelementptr i8* %scevgep38, i32 %tmp ; [#uses=1]
- %uglygep14.i = bitcast i8* %uglygep to i16* ; [#uses=1]
- %scevgep9.i = getelementptr i16* %scevgep44, i32 %45 ; [#uses=1]
- %46 = icmp slt i32 %45, 3 ; [#uses=1]
- br i1 %46, label %bb.i27, label %bb14
-
-bb13.loopexit: ; preds = %bb1.i, %bb.i27
- %scevgep55.pre = getelementptr %struct.btBroadphasePair* %34, i32 %i.037, i32 1 ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb13.loopexit, %bb1
- %scevgep55.pre-phi = phi %struct.btBroadphaseProxy** [ %scevgep55.pre, %bb13.loopexit ], [ %scevgep59, %bb1 ] ; [#uses=1]
- %47 = phi %struct.btBroadphaseProxy* [ %37, %bb13.loopexit ], [ %37, %bb1 ] ; [#uses=1]
- %48 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %49 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %48, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load i32 (...)*** %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds i32 (...)** %50, i32 8 ; [#uses=1]
- %52 = load i32 (...)** %51, align 4 ; [#uses=1]
- %53 = bitcast i32 (...)* %52 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- %scevgep48 = getelementptr %struct.btBroadphasePair* %34, i32 %i.037 ; [#uses=1]
- call void %53(%struct..0btMultiSapOverlapFilterCallback* %48, %struct.btBroadphasePair* %scevgep48, %struct.btActionInterface* %dispatcher)
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep4950, align 4
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep55.pre-phi, align 4
- %54 = load i32* %28, align 4 ; [#uses=1]
- %55 = add nsw i32 %54, 1 ; [#uses=1]
- store i32 %55, i32* %28, align 4
- %56 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %57 = add nsw i32 %56, -1 ; [#uses=1]
- store i32 %57, i32* @gOverlappingPairs, align 4
- br label %bb14
-
-bb14: ; preds = %bb13, %bb4.i
- %58 = phi %struct.btBroadphaseProxy* [ %47, %bb13 ], [ %37, %bb4.i ] ; [#uses=1]
- %59 = load i32* %19, align 4 ; [#uses=4]
- %60 = icmp sgt i32 %59, %tmp63 ; [#uses=1]
- br i1 %60, label %bb1, label %bb17
-
-bb17: ; preds = %bb14
- %61 = icmp sgt i32 %59, 1 ; [#uses=1]
- br i1 %61, label %bb.i24, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-bb.i24: ; preds = %bb17
- %62 = add nsw i32 %59, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %62) nounwind
- %.pre64 = load i32* %19, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26: ; preds = %bb.i24, %bb17, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
- %63 = phi i32 [ %.pre64, %bb.i24 ], [ %59, %bb17 ], [ %31, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit ] ; [#uses=1]
- %64 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %64, align 8
- %65 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %65, align 4
- %66 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %66, align 8
- %67 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %67, align 4
- %68 = load i32* %28, align 4 ; [#uses=1]
- %69 = sub nsw i32 %63, %68 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %18, i32 %69, %struct.btBroadphasePair* %2) inlinehint
- store i32 0, i32* %28, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjED2Ev(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btAxisSweep3InternalIjE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=3]
- %2 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %3 = icmp eq %struct.btDbvtBroadphase* %2, null ; [#uses=1]
- br i1 %3, label %bb2, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 17 ; [#uses=2]
- %5 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %9(%struct..0btMultiSapOverlapFilterCallback* %5)
- %10 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=1]
- %11 = bitcast %struct..0btMultiSapOverlapFilterCallback* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- %12 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to void (%struct.btDbvtBroadphase*)* ; [#uses=1]
- tail call void %16(%struct.btDbvtBroadphase* %12)
- %17 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %18 = bitcast %struct.btDbvtBroadphase* %17 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %18)
- br label %bb2
-
-bb2: ; preds = %bb2, %bb, %entry
- %indvar = phi i32 [ %indvar.next, %bb2 ], [ 0, %bb ], [ 0, %entry ] ; [#uses=2]
- %tmp13 = sub i32 2, %indvar ; [#uses=1]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 11, i32 %tmp13 ; [#uses=1]
- %19 = load i8** %scevgep, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %19)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %bb2
- %20 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %21 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %20, align 4 ; [#uses=2]
- %22 = icmp eq %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %21, null ; [#uses=1]
- br i1 %22, label %bb6, label %bb5
-
-bb5: ; preds = %bb4
- %23 = bitcast %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 14 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb7
-
-bb7: ; preds = %bb6
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- %27 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %27, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %31(%struct..0btMultiSapOverlapFilterCallback* %27)
- %32 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=1]
- %33 = bitcast %struct..0btMultiSapOverlapFilterCallback* %32 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %33)
- ret void
-
-return: ; preds = %bb6
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjED1Ev(%"struct.btAxisSweep3Internal<unsigned int>"* nocapture %this) align 2 {
-entry:
- tail call void @_ZN20btAxisSweep3InternalIjED2Ev(%"struct.btAxisSweep3Internal<unsigned int>"* %this)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjED0Ev(%"struct.btAxisSweep3Internal<unsigned int>"* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btAxisSweep3InternalIjE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=3]
- %2 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %3 = icmp eq %struct.btDbvtBroadphase* %2, null ; [#uses=1]
- br i1 %3, label %bb2, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 17 ; [#uses=2]
- %5 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %9(%struct..0btMultiSapOverlapFilterCallback* %5)
- %10 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=1]
- %11 = bitcast %struct..0btMultiSapOverlapFilterCallback* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- %12 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to void (%struct.btDbvtBroadphase*)* ; [#uses=1]
- tail call void %16(%struct.btDbvtBroadphase* %12)
- %17 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %18 = bitcast %struct.btDbvtBroadphase* %17 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %18)
- br label %bb2
-
-bb2: ; preds = %bb2, %bb, %entry
- %indvar = phi i32 [ %indvar.next, %bb2 ], [ 0, %bb ], [ 0, %entry ] ; [#uses=2]
- %tmp13 = sub i32 2, %indvar ; [#uses=1]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 11, i32 %tmp13 ; [#uses=1]
- %19 = load i8** %scevgep, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %19)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %bb2
- %20 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %21 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %20, align 4 ; [#uses=2]
- %22 = icmp eq %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %21, null ; [#uses=1]
- br i1 %22, label %bb6, label %bb5
-
-bb5: ; preds = %bb4
- %23 = bitcast %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 14 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool, label %bb10, label %bb7
-
-bb7: ; preds = %bb6
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- %27 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %27, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %31(%struct..0btMultiSapOverlapFilterCallback* %27)
- %32 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=1]
- %33 = bitcast %struct..0btMultiSapOverlapFilterCallback* %32 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %33)
- br label %bb10
-
-bb10: ; preds = %bb7, %bb6
- %34 = bitcast %"struct.btAxisSweep3Internal<unsigned int>"* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %34)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17bt32BitAxisSweep3D0Ev(%struct.bt32BitAxisSweep3* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV17bt32BitAxisSweep3, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalIjED2Ev(%"struct.btAxisSweep3Internal<unsigned int>"* %1)
- %2 = bitcast %struct.bt32BitAxisSweep3* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17bt32BitAxisSweep3D1Ev(%struct.bt32BitAxisSweep3* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV17bt32BitAxisSweep3, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalIjED2Ev(%"struct.btAxisSweep3Internal<unsigned int>"* %1)
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItED2Ev(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btAxisSweep3InternalItE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=3]
- %2 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %3 = icmp eq %struct.btDbvtBroadphase* %2, null ; [#uses=1]
- br i1 %3, label %bb2, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 17 ; [#uses=2]
- %5 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %9(%struct..0btMultiSapOverlapFilterCallback* %5)
- %10 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=1]
- %11 = bitcast %struct..0btMultiSapOverlapFilterCallback* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- %12 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to void (%struct.btDbvtBroadphase*)* ; [#uses=1]
- tail call void %16(%struct.btDbvtBroadphase* %12)
- %17 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %18 = bitcast %struct.btDbvtBroadphase* %17 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %18)
- br label %bb2
-
-bb2: ; preds = %bb2, %bb, %entry
- %indvar = phi i32 [ %indvar.next, %bb2 ], [ 0, %bb ], [ 0, %entry ] ; [#uses=2]
- %tmp13 = sub i32 2, %indvar ; [#uses=1]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 11, i32 %tmp13 ; [#uses=1]
- %19 = load i8** %scevgep, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %19)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %bb2
- %20 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %21 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %20, align 4 ; [#uses=2]
- %22 = icmp eq %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %21, null ; [#uses=1]
- br i1 %22, label %bb6, label %bb5
-
-bb5: ; preds = %bb4
- %23 = bitcast %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 14 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb7
-
-bb7: ; preds = %bb6
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- %27 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %27, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %31(%struct..0btMultiSapOverlapFilterCallback* %27)
- %32 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=1]
- %33 = bitcast %struct..0btMultiSapOverlapFilterCallback* %32 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %33)
- ret void
-
-return: ; preds = %bb6
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItED1Ev(%"struct.btAxisSweep3Internal<short unsigned int>"* nocapture %this) align 2 {
-entry:
- tail call void @_ZN20btAxisSweep3InternalItED2Ev(%"struct.btAxisSweep3Internal<short unsigned int>"* %this)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItED0Ev(%"struct.btAxisSweep3Internal<short unsigned int>"* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btAxisSweep3InternalItE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=3]
- %2 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %3 = icmp eq %struct.btDbvtBroadphase* %2, null ; [#uses=1]
- br i1 %3, label %bb2, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 17 ; [#uses=2]
- %5 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %9(%struct..0btMultiSapOverlapFilterCallback* %5)
- %10 = load %struct..0btMultiSapOverlapFilterCallback** %4, align 4 ; [#uses=1]
- %11 = bitcast %struct..0btMultiSapOverlapFilterCallback* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- %12 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to void (%struct.btDbvtBroadphase*)* ; [#uses=1]
- tail call void %16(%struct.btDbvtBroadphase* %12)
- %17 = load %struct.btDbvtBroadphase** %1, align 4 ; [#uses=1]
- %18 = bitcast %struct.btDbvtBroadphase* %17 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %18)
- br label %bb2
-
-bb2: ; preds = %bb2, %bb, %entry
- %indvar = phi i32 [ %indvar.next, %bb2 ], [ 0, %bb ], [ 0, %entry ] ; [#uses=2]
- %tmp13 = sub i32 2, %indvar ; [#uses=1]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 11, i32 %tmp13 ; [#uses=1]
- %19 = load i8** %scevgep, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %19)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %bb2
- %20 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=1]
- %21 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %20, align 4 ; [#uses=2]
- %22 = icmp eq %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %21, null ; [#uses=1]
- br i1 %22, label %bb6, label %bb5
-
-bb5: ; preds = %bb4
- %23 = bitcast %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %24 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 14 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool, label %bb10, label %bb7
-
-bb7: ; preds = %bb6
- %26 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- %27 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %27, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %31(%struct..0btMultiSapOverlapFilterCallback* %27)
- %32 = load %struct..0btMultiSapOverlapFilterCallback** %26, align 4 ; [#uses=1]
- %33 = bitcast %struct..0btMultiSapOverlapFilterCallback* %32 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %33)
- br label %bb10
-
-bb10: ; preds = %bb7, %bb6
- %34 = bitcast %"struct.btAxisSweep3Internal<short unsigned int>"* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %34)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btAxisSweep3D0Ev(%struct.btAxisSweep3* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV12btAxisSweep3, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalItED2Ev(%"struct.btAxisSweep3Internal<short unsigned int>"* %1)
- %2 = bitcast %struct.btAxisSweep3* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btAxisSweep3D1Ev(%struct.btAxisSweep3* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV12btAxisSweep3, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalItED2Ev(%"struct.btAxisSweep3Internal<short unsigned int>"* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCacheD0Ev(%struct.btNullPairCache* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btNullPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btBroadphasePair* %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btBroadphasePair* %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- %8 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = bitcast %struct.btNullPairCache* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %10) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btNullPairCacheD1Ev(%struct.btNullPairCache* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btNullPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btBroadphasePair* %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btBroadphasePair* %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- %8 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btNullPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAxisSweep3InternalIjEC2ERK9btVector3S3_jjjP22btOverlappingPairCacheb(%"struct.btAxisSweep3Internal<unsigned int>"* %this, %struct.btQuadWord* nocapture %worldAabbMin, %struct.btQuadWord* nocapture %worldAabbMax, i32 %handleMask, i32 %handleSentinel, i32 %userMaxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btAxisSweep3InternalIjE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- store i32 %handleMask, i32* %1, align 4
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 2 ; [#uses=5]
- store i32 %handleSentinel, i32* %2, align 4
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- store %struct..0btMultiSapOverlapFilterCallback* %pairCache, %struct..0btMultiSapOverlapFilterCallback** %3, align 4
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %4, align 4
- %5 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 14 ; [#uses=2]
- store i8 0, i8* %5, align 4
- %6 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 15 ; [#uses=1]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 16 ; [#uses=2]
- store %struct.btDbvtBroadphase* null, %struct.btDbvtBroadphase** %7, align 4
- %8 = add i32 %userMaxHandles, 1 ; [#uses=5]
- %9 = icmp eq %struct..0btMultiSapOverlapFilterCallback* %pairCache, null ; [#uses=1]
- br i1 %9, label %bb, label %bb7
-
-bb: ; preds = %entry
- %10 = invoke i8* @_Z22btAlignedAllocInternalji(i32 76, i32 16)
- to label %invcont unwind label %lpad ; [#uses=3]
-
-invcont: ; preds = %bb
- %11 = icmp eq i8* %10, null ; [#uses=1]
- br i1 %11, label %bb6, label %bb1
-
-bb1: ; preds = %invcont
- %12 = bitcast i8* %10 to %struct.btHashedOverlappingPairCache* ; [#uses=1]
- invoke void @_ZN28btHashedOverlappingPairCacheC1Ev(%struct.btHashedOverlappingPairCache* %12)
- to label %bb6 unwind label %lpad54
-
-bb6: ; preds = %bb1, %invcont
- %13 = bitcast i8* %10 to %struct..0btMultiSapOverlapFilterCallback* ; [#uses=1]
- store %struct..0btMultiSapOverlapFilterCallback* %13, %struct..0btMultiSapOverlapFilterCallback** %3, align 4
- store i8 1, i8* %5, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %entry
- %toBoolnot = icmp eq i8 %disableRaycastAccelerator, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb11, label %bb30
-
-bb11: ; preds = %bb7
- %14 = invoke i8* @_Z22btAlignedAllocInternalji(i32 24, i32 16)
- to label %invcont12 unwind label %lpad ; [#uses=7]
-
-invcont12: ; preds = %bb11
- %15 = icmp eq i8* %14, null ; [#uses=1]
- br i1 %15, label %bb20, label %bb13
-
-bb13: ; preds = %invcont12
- %16 = bitcast i8* %14 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btNullPairCache, i32 0, i32 2), i32 (...)*** %16, align 4
- %17 = getelementptr inbounds i8* %14, i32 20 ; [#uses=1]
- store i8 1, i8* %17, align 4
- %18 = getelementptr inbounds i8* %14, i32 16 ; [#uses=1]
- %19 = bitcast i8* %18 to %struct.btBroadphasePair** ; [#uses=1]
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %19, align 4
- %20 = getelementptr inbounds i8* %14, i32 8 ; [#uses=1]
- %21 = bitcast i8* %20 to i32* ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds i8* %14, i32 12 ; [#uses=1]
- %23 = bitcast i8* %22 to i32* ; [#uses=1]
- store i32 0, i32* %23, align 4
- br label %bb20
-
-bb20: ; preds = %bb13, %invcont12
- %24 = bitcast i8* %14 to %struct..0btMultiSapOverlapFilterCallback* ; [#uses=1]
- %25 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 17 ; [#uses=2]
- store %struct..0btMultiSapOverlapFilterCallback* %24, %struct..0btMultiSapOverlapFilterCallback** %25, align 4
- %26 = invoke i8* @_Z22btAlignedAllocInternalji(i32 156, i32 16)
- to label %invcont21 unwind label %lpad ; [#uses=3]
-
-invcont21: ; preds = %bb20
- %27 = bitcast i8* %26 to %struct.btDbvtBroadphase* ; [#uses=2]
- %28 = icmp eq i8* %26, null ; [#uses=1]
- br i1 %28, label %bb29, label %bb22
-
-bb22: ; preds = %invcont21
- %29 = load %struct..0btMultiSapOverlapFilterCallback** %25, align 4 ; [#uses=1]
- invoke void @_ZN16btDbvtBroadphaseC1EP22btOverlappingPairCache(%struct.btDbvtBroadphase* %27, %struct..0btMultiSapOverlapFilterCallback* %29)
- to label %bb29 unwind label %lpad62
-
-bb29: ; preds = %bb22, %invcont21
- store %struct.btDbvtBroadphase* %27, %struct.btDbvtBroadphase** %7, align 4
- %30 = getelementptr inbounds i8* %26, i32 153 ; [#uses=1]
- store i8 1, i8* %30, align 1
- br label %bb30
-
-bb30: ; preds = %bb29, %bb7
- %31 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=2]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = fsub float %51, %39 ; [#uses=1]
- %56 = fsub float %48, %36 ; [#uses=1]
- %57 = fsub float %45, %33 ; [#uses=1]
- %58 = load i32* %2, align 4 ; [#uses=1]
- %59 = uitofp i32 %58 to float ; [#uses=3]
- %60 = fdiv float %59, %55 ; [#uses=1]
- %61 = fdiv float %59, %56 ; [#uses=1]
- %62 = fdiv float %59, %57 ; [#uses=1]
- %63 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float %62, float* %63, align 4
- %64 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float %61, float* %64, align 4
- %65 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float %60, float* %65, align 4
- %66 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %66, align 4
- %67 = mul i32 %8, 76 ; [#uses=1]
- %68 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %67, i32 16)
- to label %invcont31 unwind label %lpad ; [#uses=3]
-
-invcont31: ; preds = %bb30
- %69 = icmp eq i32 %userMaxHandles, -1 ; [#uses=1]
- br i1 %69, label %bb34, label %bb32
-
-bb32: ; preds = %bb32, %invcont31
- %indvar90 = phi i32 [ %indvar.next91, %bb32 ], [ 0, %invcont31 ] ; [#uses=2]
- %tmp94 = mul i32 %indvar90, 76 ; [#uses=2]
- %scevgep95 = getelementptr i8* %68, i32 %tmp94 ; [#uses=1]
- %scevgep9596 = bitcast i8* %scevgep95 to i8** ; [#uses=1]
- %tmp97 = add i32 %tmp94, 8 ; [#uses=1]
- %scevgep98 = getelementptr i8* %68, i32 %tmp97 ; [#uses=1]
- %scevgep9899 = bitcast i8* %scevgep98 to i8** ; [#uses=1]
- store i8* null, i8** %scevgep9596, align 4
- store i8* null, i8** %scevgep9899, align 4
- %indvar.next91 = add i32 %indvar90, 1 ; [#uses=2]
- %exitcond93 = icmp eq i32 %indvar.next91, %8 ; [#uses=1]
- br i1 %exitcond93, label %bb34, label %bb32
-
-bb34: ; preds = %bb32, %invcont31
- %70 = bitcast i8* %68 to %"struct.btAxisSweep3Internal<unsigned int>::Handle"* ; [#uses=3]
- %71 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 8 ; [#uses=9]
- store %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %70, %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4
- %72 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %8, i32* %72, align 4
- %73 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %73, align 4
- %74 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 9 ; [#uses=1]
- store i32 1, i32* %74, align 4
- %75 = icmp ugt i32 %8, 1 ; [#uses=1]
- br i1 %75, label %bb36, label %bb38
-
-bb36: ; preds = %bb36, %bb34
- %76 = phi %"struct.btAxisSweep3Internal<unsigned int>::Handle"* [ %70, %bb34 ], [ %.pre, %bb36 ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb34 ], [ %tmp, %bb36 ] ; [#uses=2]
- %tmp = add i32 %indvar, 1 ; [#uses=3]
- %tmp89 = add i32 %indvar, 2 ; [#uses=1]
- %scevgep88 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %76, i32 %tmp, i32 1, i32 0 ; [#uses=1]
- store i32 %tmp89, i32* %scevgep88, align 4
- %exitcond = icmp eq i32 %tmp, %userMaxHandles ; [#uses=1]
- %.pre = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=2]
- br i1 %exitcond, label %bb38, label %bb36
-
-bb38: ; preds = %bb36, %bb34
- %77 = phi %"struct.btAxisSweep3Internal<unsigned int>::Handle"* [ %70, %bb34 ], [ %.pre, %bb36 ] ; [#uses=1]
- %78 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %77, i32 %userMaxHandles, i32 1, i32 0 ; [#uses=1]
- store i32 0, i32* %78, align 4
- %79 = shl i32 %8, 4 ; [#uses=1]
- br label %bb43
-
-bb41: ; preds = %bb43
- %80 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %79, i32 16)
- to label %invcont42 unwind label %lpad ; [#uses=2]
-
-invcont42: ; preds = %bb41
- store i8* %80, i8** %scevgep87, align 4
- %81 = bitcast i8* %80 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* %81, %struct.CONTACT_KEY_TOKEN** %scevgep86, align 4
- %82 = add nsw i32 %83, 1 ; [#uses=1]
- br label %bb43
-
-bb43: ; preds = %invcont42, %bb38
- %83 = phi i32 [ 0, %bb38 ], [ %82, %invcont42 ] ; [#uses=4]
- %scevgep86 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 %83 ; [#uses=1]
- %scevgep87 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 11, i32 %83 ; [#uses=1]
- %84 = icmp slt i32 %83, 3 ; [#uses=1]
- br i1 %84, label %bb41, label %return
-
-return: ; preds = %bb43
- %85 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %85, i32 0, i32 0, i32 0 ; [#uses=1]
- store i8* null, i8** %86, align 4
- %scevgep85 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=4]
- %87 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=1]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %87, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 0, i32* %scevgep, align 4
- %88 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=1]
- %scevgep84 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %88, i32 0, i32 2, i32 0 ; [#uses=1]
- store i32 1, i32* %scevgep84, align 4
- %89 = load %struct.CONTACT_KEY_TOKEN** %scevgep85, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %89, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %90, align 4
- %91 = load %struct.CONTACT_KEY_TOKEN** %scevgep85, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %91, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %92, align 4
- %93 = load %struct.CONTACT_KEY_TOKEN** %scevgep85, align 4 ; [#uses=1]
- %94 = load i32* %2, align 4 ; [#uses=1]
- %95 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %93, i32 1, i32 0 ; [#uses=1]
- store i32 %94, i32* %95, align 4
- %96 = load %struct.CONTACT_KEY_TOKEN** %scevgep85, align 4 ; [#uses=1]
- %97 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %96, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %97, align 4
- %scevgep85.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 1 ; [#uses=4]
- %98 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=1]
- %scevgep.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %98, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %scevgep.1, align 4
- %99 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=1]
- %scevgep84.1 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %99, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 1, i32* %scevgep84.1, align 4
- %100 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.1, align 4 ; [#uses=1]
- %101 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %100, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %101, align 4
- %102 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.1, align 4 ; [#uses=1]
- %103 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %102, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %103, align 4
- %104 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.1, align 4 ; [#uses=1]
- %105 = load i32* %2, align 4 ; [#uses=1]
- %106 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %104, i32 1, i32 0 ; [#uses=1]
- store i32 %105, i32* %106, align 4
- %107 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.1, align 4 ; [#uses=1]
- %108 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %107, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %108, align 4
- %scevgep85.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>"* %this, i32 0, i32 10, i32 2 ; [#uses=4]
- %109 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=1]
- %scevgep.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %109, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %scevgep.2, align 4
- %110 = load %"struct.btAxisSweep3Internal<unsigned int>::Handle"** %71, align 4 ; [#uses=1]
- %scevgep84.2 = getelementptr %"struct.btAxisSweep3Internal<unsigned int>::Handle"* %110, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 1, i32* %scevgep84.2, align 4
- %111 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.2, align 4 ; [#uses=1]
- %112 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %111, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %112, align 4
- %113 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.2, align 4 ; [#uses=1]
- %114 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %113, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %114, align 4
- %115 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.2, align 4 ; [#uses=1]
- %116 = load i32* %2, align 4 ; [#uses=1]
- %117 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %115, i32 1, i32 0 ; [#uses=1]
- store i32 %116, i32* %117, align 4
- %118 = load %struct.CONTACT_KEY_TOKEN** %scevgep85.2, align 4 ; [#uses=1]
- %119 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %118, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %119, align 4
- ret void
-
-lpad: ; preds = %bb41, %bb30, %bb20, %bb11, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select53 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad54: ; preds = %bb1
- %eh_ptr55 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select57 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr55, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad62: ; preds = %bb22
- %eh_ptr63 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select65 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr63, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-ppad: ; preds = %lpad62, %lpad54, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr63, %lpad62 ], [ %eh_ptr55, %lpad54 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btBroadphaseInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN17bt32BitAxisSweep3C1ERK9btVector3S2_jP22btOverlappingPairCacheb(%struct.bt32BitAxisSweep3* %this, %struct.btQuadWord* nocapture %worldAabbMin, %struct.btQuadWord* nocapture %worldAabbMax, i32 %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalIjEC2ERK9btVector3S3_jjjP22btOverlappingPairCacheb(%"struct.btAxisSweep3Internal<unsigned int>"* %0, %struct.btQuadWord* %worldAabbMin, %struct.btQuadWord* %worldAabbMax, i32 -2, i32 2147483647, i32 %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator)
- %1 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV17bt32BitAxisSweep3, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17bt32BitAxisSweep3C2ERK9btVector3S2_jP22btOverlappingPairCacheb(%struct.bt32BitAxisSweep3* %this, %struct.btQuadWord* nocapture %worldAabbMin, %struct.btQuadWord* nocapture %worldAabbMax, i32 %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalIjEC2ERK9btVector3S3_jjjP22btOverlappingPairCacheb(%"struct.btAxisSweep3Internal<unsigned int>"* %0, %struct.btQuadWord* %worldAabbMin, %struct.btQuadWord* %worldAabbMax, i32 -2, i32 2147483647, i32 %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator)
- %1 = getelementptr inbounds %struct.bt32BitAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV17bt32BitAxisSweep3, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAxisSweep3InternalItEC2ERK9btVector3S3_tttP22btOverlappingPairCacheb(%"struct.btAxisSweep3Internal<short unsigned int>"* %this, %struct.btQuadWord* nocapture %worldAabbMin, %struct.btQuadWord* nocapture %worldAabbMax, i16 zeroext %handleMask, i16 zeroext %handleSentinel, i16 zeroext %userMaxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btAxisSweep3InternalItE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 1 ; [#uses=1]
- store i16 %handleMask, i16* %1, align 4
- %2 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 2 ; [#uses=5]
- store i16 %handleSentinel, i16* %2, align 2
- %3 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 12 ; [#uses=2]
- store %struct..0btMultiSapOverlapFilterCallback* %pairCache, %struct..0btMultiSapOverlapFilterCallback** %3, align 4
- %4 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 13 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %4, align 4
- %5 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 14 ; [#uses=2]
- store i8 0, i8* %5, align 4
- %6 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 15 ; [#uses=1]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 16 ; [#uses=2]
- store %struct.btDbvtBroadphase* null, %struct.btDbvtBroadphase** %7, align 4
- %8 = add i16 %userMaxHandles, 1 ; [#uses=4]
- %9 = icmp eq %struct..0btMultiSapOverlapFilterCallback* %pairCache, null ; [#uses=1]
- br i1 %9, label %bb, label %bb7
-
-bb: ; preds = %entry
- %10 = invoke i8* @_Z22btAlignedAllocInternalji(i32 76, i32 16)
- to label %invcont unwind label %lpad ; [#uses=3]
-
-invcont: ; preds = %bb
- %11 = icmp eq i8* %10, null ; [#uses=1]
- br i1 %11, label %bb6, label %bb1
-
-bb1: ; preds = %invcont
- %12 = bitcast i8* %10 to %struct.btHashedOverlappingPairCache* ; [#uses=1]
- invoke void @_ZN28btHashedOverlappingPairCacheC1Ev(%struct.btHashedOverlappingPairCache* %12)
- to label %bb6 unwind label %lpad54
-
-bb6: ; preds = %bb1, %invcont
- %13 = bitcast i8* %10 to %struct..0btMultiSapOverlapFilterCallback* ; [#uses=1]
- store %struct..0btMultiSapOverlapFilterCallback* %13, %struct..0btMultiSapOverlapFilterCallback** %3, align 4
- store i8 1, i8* %5, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %entry
- %toBoolnot = icmp eq i8 %disableRaycastAccelerator, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb11, label %bb30
-
-bb11: ; preds = %bb7
- %14 = invoke i8* @_Z22btAlignedAllocInternalji(i32 24, i32 16)
- to label %invcont12 unwind label %lpad ; [#uses=7]
-
-invcont12: ; preds = %bb11
- %15 = icmp eq i8* %14, null ; [#uses=1]
- br i1 %15, label %bb20, label %bb13
-
-bb13: ; preds = %invcont12
- %16 = bitcast i8* %14 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btNullPairCache, i32 0, i32 2), i32 (...)*** %16, align 4
- %17 = getelementptr inbounds i8* %14, i32 20 ; [#uses=1]
- store i8 1, i8* %17, align 4
- %18 = getelementptr inbounds i8* %14, i32 16 ; [#uses=1]
- %19 = bitcast i8* %18 to %struct.btBroadphasePair** ; [#uses=1]
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %19, align 4
- %20 = getelementptr inbounds i8* %14, i32 8 ; [#uses=1]
- %21 = bitcast i8* %20 to i32* ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds i8* %14, i32 12 ; [#uses=1]
- %23 = bitcast i8* %22 to i32* ; [#uses=1]
- store i32 0, i32* %23, align 4
- br label %bb20
-
-bb20: ; preds = %bb13, %invcont12
- %24 = bitcast i8* %14 to %struct..0btMultiSapOverlapFilterCallback* ; [#uses=1]
- %25 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 17 ; [#uses=2]
- store %struct..0btMultiSapOverlapFilterCallback* %24, %struct..0btMultiSapOverlapFilterCallback** %25, align 4
- %26 = invoke i8* @_Z22btAlignedAllocInternalji(i32 156, i32 16)
- to label %invcont21 unwind label %lpad ; [#uses=3]
-
-invcont21: ; preds = %bb20
- %27 = bitcast i8* %26 to %struct.btDbvtBroadphase* ; [#uses=2]
- %28 = icmp eq i8* %26, null ; [#uses=1]
- br i1 %28, label %bb29, label %bb22
-
-bb22: ; preds = %invcont21
- %29 = load %struct..0btMultiSapOverlapFilterCallback** %25, align 4 ; [#uses=1]
- invoke void @_ZN16btDbvtBroadphaseC1EP22btOverlappingPairCache(%struct.btDbvtBroadphase* %27, %struct..0btMultiSapOverlapFilterCallback* %29)
- to label %bb29 unwind label %lpad62
-
-bb29: ; preds = %bb22, %invcont21
- store %struct.btDbvtBroadphase* %27, %struct.btDbvtBroadphase** %7, align 4
- %30 = getelementptr inbounds i8* %26, i32 153 ; [#uses=1]
- store i8 1, i8* %30, align 1
- br label %bb30
-
-bb30: ; preds = %bb29, %bb7
- %31 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=2]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = fsub float %51, %39 ; [#uses=1]
- %56 = fsub float %48, %36 ; [#uses=1]
- %57 = fsub float %45, %33 ; [#uses=1]
- %58 = load i16* %2, align 2 ; [#uses=1]
- %59 = uitofp i16 %58 to float ; [#uses=3]
- %60 = fdiv float %59, %55 ; [#uses=1]
- %61 = fdiv float %59, %56 ; [#uses=1]
- %62 = fdiv float %59, %57 ; [#uses=1]
- %63 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float %62, float* %63, align 4
- %64 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float %61, float* %64, align 4
- %65 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float %60, float* %65, align 4
- %66 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %66, align 4
- %67 = zext i16 %8 to i32 ; [#uses=4]
- %68 = shl i32 %67, 6 ; [#uses=1]
- %69 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %68, i32 16)
- to label %invcont31 unwind label %lpad ; [#uses=3]
-
-invcont31: ; preds = %bb30
- %70 = icmp eq i16 %8, 0 ; [#uses=1]
- br i1 %70, label %bb34, label %bb32
-
-bb32: ; preds = %bb32, %invcont31
- %indvar95 = phi i32 [ %indvar.next96, %bb32 ], [ 0, %invcont31 ] ; [#uses=2]
- %tmp100 = shl i32 %indvar95, 6 ; [#uses=2]
- %scevgep101 = getelementptr i8* %69, i32 %tmp100 ; [#uses=1]
- %scevgep101102 = bitcast i8* %scevgep101 to i8** ; [#uses=1]
- %tmp103106 = or i32 %tmp100, 8 ; [#uses=1]
- %scevgep104 = getelementptr i8* %69, i32 %tmp103106 ; [#uses=1]
- %scevgep104105 = bitcast i8* %scevgep104 to i8** ; [#uses=1]
- store i8* null, i8** %scevgep101102, align 4
- store i8* null, i8** %scevgep104105, align 4
- %indvar.next96 = add i32 %indvar95, 1 ; [#uses=2]
- %exitcond99 = icmp eq i32 %indvar.next96, %67 ; [#uses=1]
- br i1 %exitcond99, label %bb34, label %bb32
-
-bb34: ; preds = %bb32, %invcont31
- %71 = bitcast i8* %69 to %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* ; [#uses=3]
- %72 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 8 ; [#uses=9]
- store %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %71, %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4
- %73 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 7 ; [#uses=1]
- store i16 %8, i16* %73, align 2
- %74 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 6 ; [#uses=1]
- store i16 0, i16* %74, align 4
- %75 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 9 ; [#uses=1]
- store i16 1, i16* %75, align 4
- %76 = icmp ugt i16 %8, 1 ; [#uses=1]
- br i1 %76, label %bb.nph80, label %bb38
-
-bb.nph80: ; preds = %bb34
- %tmp = add i16 %userMaxHandles, -1 ; [#uses=1]
- %tmp89 = zext i16 %tmp to i32 ; [#uses=1]
- %tmp90 = add i32 %tmp89, 1 ; [#uses=1]
- br label %bb36
-
-bb36: ; preds = %bb36, %bb.nph80
- %77 = phi %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* [ %71, %bb.nph80 ], [ %.pre, %bb36 ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb.nph80 ], [ %tmp91, %bb36 ] ; [#uses=2]
- %tmp91 = add i32 %indvar, 1 ; [#uses=3]
- %tmp93 = add i32 %indvar, 2 ; [#uses=1]
- %tmp94 = trunc i32 %tmp93 to i16 ; [#uses=1]
- %scevgep92 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %77, i32 %tmp91, i32 1, i32 0 ; [#uses=1]
- store i16 %tmp94, i16* %scevgep92, align 2
- %exitcond = icmp eq i32 %tmp91, %tmp90 ; [#uses=1]
- %.pre = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=2]
- br i1 %exitcond, label %bb38, label %bb36
-
-bb38: ; preds = %bb36, %bb34
- %78 = phi %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* [ %71, %bb34 ], [ %.pre, %bb36 ] ; [#uses=1]
- %79 = add nsw i32 %67, -1 ; [#uses=1]
- %80 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %78, i32 %79, i32 1, i32 0 ; [#uses=1]
- store i16 0, i16* %80, align 2
- %81 = shl i32 %67, 3 ; [#uses=1]
- br label %bb43
-
-bb41: ; preds = %bb43
- %82 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %81, i32 16)
- to label %invcont42 unwind label %lpad ; [#uses=2]
-
-invcont42: ; preds = %bb41
- store i8* %82, i8** %scevgep88, align 4
- %83 = bitcast i8* %82 to %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* ; [#uses=1]
- store %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %83, %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep87, align 4
- %84 = add nsw i32 %85, 1 ; [#uses=1]
- br label %bb43
-
-bb43: ; preds = %invcont42, %bb38
- %85 = phi i32 [ 0, %bb38 ], [ %84, %invcont42 ] ; [#uses=4]
- %scevgep87 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 %85 ; [#uses=1]
- %scevgep88 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 11, i32 %85 ; [#uses=1]
- %86 = icmp slt i32 %85, 3 ; [#uses=1]
- br i1 %86, label %bb41, label %return
-
-return: ; preds = %bb43
- %87 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %87, i32 0, i32 0, i32 0 ; [#uses=1]
- store i8* null, i8** %88, align 4
- %scevgep86 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 0 ; [#uses=4]
- %89 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=1]
- %scevgep = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %89, i32 0, i32 1, i32 0 ; [#uses=1]
- store i16 0, i16* %scevgep, align 2
- %90 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=1]
- %scevgep85 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %90, i32 0, i32 2, i32 0 ; [#uses=1]
- store i16 1, i16* %scevgep85, align 2
- %91 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %91, i32 0, i32 0 ; [#uses=1]
- store i16 0, i16* %92, align 2
- %93 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86, align 4 ; [#uses=1]
- %94 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %93, i32 0, i32 1 ; [#uses=1]
- store i16 0, i16* %94, align 2
- %95 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86, align 4 ; [#uses=1]
- %96 = load i16* %2, align 2 ; [#uses=1]
- %97 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %95, i32 1, i32 0 ; [#uses=1]
- store i16 %96, i16* %97, align 2
- %98 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86, align 4 ; [#uses=1]
- %99 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %98, i32 1, i32 1 ; [#uses=1]
- store i16 0, i16* %99, align 2
- %scevgep86.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 1 ; [#uses=4]
- %100 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=1]
- %scevgep.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %100, i32 0, i32 1, i32 1 ; [#uses=1]
- store i16 0, i16* %scevgep.1, align 2
- %101 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=1]
- %scevgep85.1 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %101, i32 0, i32 2, i32 1 ; [#uses=1]
- store i16 1, i16* %scevgep85.1, align 2
- %102 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.1, align 4 ; [#uses=1]
- %103 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %102, i32 0, i32 0 ; [#uses=1]
- store i16 0, i16* %103, align 2
- %104 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.1, align 4 ; [#uses=1]
- %105 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %104, i32 0, i32 1 ; [#uses=1]
- store i16 0, i16* %105, align 2
- %106 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.1, align 4 ; [#uses=1]
- %107 = load i16* %2, align 2 ; [#uses=1]
- %108 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %106, i32 1, i32 0 ; [#uses=1]
- store i16 %107, i16* %108, align 2
- %109 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.1, align 4 ; [#uses=1]
- %110 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %109, i32 1, i32 1 ; [#uses=1]
- store i16 0, i16* %110, align 2
- %scevgep86.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>"* %this, i32 0, i32 10, i32 2 ; [#uses=4]
- %111 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=1]
- %scevgep.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %111, i32 0, i32 1, i32 2 ; [#uses=1]
- store i16 0, i16* %scevgep.2, align 2
- %112 = load %"struct.btAxisSweep3Internal<short unsigned int>::Handle"** %72, align 4 ; [#uses=1]
- %scevgep85.2 = getelementptr %"struct.btAxisSweep3Internal<short unsigned int>::Handle"* %112, i32 0, i32 2, i32 2 ; [#uses=1]
- store i16 1, i16* %scevgep85.2, align 2
- %113 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.2, align 4 ; [#uses=1]
- %114 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %113, i32 0, i32 0 ; [#uses=1]
- store i16 0, i16* %114, align 2
- %115 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.2, align 4 ; [#uses=1]
- %116 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %115, i32 0, i32 1 ; [#uses=1]
- store i16 0, i16* %116, align 2
- %117 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.2, align 4 ; [#uses=1]
- %118 = load i16* %2, align 2 ; [#uses=1]
- %119 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %117, i32 1, i32 0 ; [#uses=1]
- store i16 %118, i16* %119, align 2
- %120 = load %"struct.btAxisSweep3Internal<short unsigned int>::Edge"** %scevgep86.2, align 4 ; [#uses=1]
- %121 = getelementptr inbounds %"struct.btAxisSweep3Internal<short unsigned int>::Edge"* %120, i32 1, i32 1 ; [#uses=1]
- store i16 0, i16* %121, align 2
- ret void
-
-lpad: ; preds = %bb41, %bb30, %bb20, %bb11, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select53 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad54: ; preds = %bb1
- %eh_ptr55 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select57 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr55, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad62: ; preds = %bb22
- %eh_ptr63 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select65 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr63, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-ppad: ; preds = %lpad62, %lpad54, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr63, %lpad62 ], [ %eh_ptr55, %lpad54 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btBroadphaseInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN12btAxisSweep3C1ERK9btVector3S2_tP22btOverlappingPairCacheb(%struct.btAxisSweep3* %this, %struct.btQuadWord* nocapture %worldAabbMin, %struct.btQuadWord* nocapture %worldAabbMax, i16 zeroext %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAxisSweep3InternalItEC2ERK9btVector3S3_tttP22btOverlappingPairCacheb(%"struct.btAxisSweep3Internal<short unsigned int>"* %0, %struct.btQuadWord* %worldAabbMin, %struct.btQuadWord* %worldAabbMax, i16 zeroext -2, i16 zeroext -1, i16 zeroext %maxHandles, %struct..0btMultiSapOverlapFilterCallback* %pairCache, i8 zeroext %disableRaycastAccelerator)
- %1 = getelementptr inbounds %struct.btAxisSweep3* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV12btAxisSweep3, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=8]
-define void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* nocapture %ci) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV20btCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %2 = load %struct.btActionInterface** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %2, %struct.btActionInterface** %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btCollisionAlgorithmD1Ev(%struct.btCollisionAlgorithm* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV20btCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btCollisionAlgorithmD0Ev(%struct.btCollisionAlgorithm* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV20btCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN20btCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* nocapture %ci) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV20btCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %2 = load %struct.btActionInterface** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %2, %struct.btActionInterface** %3, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN6btDbvtC2Ev(%struct.btDbvt* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %1, align 4
- %2 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %4, align 4
- %5 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %5, align 4
- %6 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %8, align 4
- ret void
-}
-
-; [#uses=289]
-declare float @fabsf(float)
-
-; [#uses=1]
-define linkonce_odr void @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodeS3_(%struct.btActionInterface* nocapture %this, %struct.btDbvtNode* nocapture %unnamed_arg, %struct.btDbvtNode* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNode(%struct.btActionInterface* nocapture %this, %struct.btDbvtNode* nocapture %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN6btDbvt8ICollide7ProcessEPK10btDbvtNodef(%struct.btActionInterface* %this, %struct.btDbvtNode* %n, float %unnamed_arg) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 3 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btActionInterface*, %struct.btDbvtNode*)* ; [#uses=1]
- tail call void %4(%struct.btActionInterface* %this, %struct.btDbvtNode* %n)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN6btDbvt8ICollide7DescentEPK10btDbvtNode(%struct.btActionInterface* nocapture %this, %struct.btDbvtNode* nocapture %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret i8 1
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN6btDbvt8ICollide9AllLeavesEPK10btDbvtNode(%struct.btActionInterface* nocapture %this, %struct.btDbvtNode* nocapture %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret i8 1
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN6btDbvt9enumNodesEPK10btDbvtNodeRNS_8ICollideE(%struct.btDbvtNode* %root, %struct.btActionInterface* %policy) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %policy, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 3 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btActionInterface*, %struct.btDbvtNode*)* ; [#uses=1]
- tail call void %4(%struct.btActionInterface* %policy, %struct.btDbvtNode* %root)
- %5 = getelementptr inbounds %struct.btDbvtNode* %root, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btDbvtNode** %5, align 4 ; [#uses=1]
- %toBoolnot.i2 = icmp eq %struct.btDbvtNode* %6, null ; [#uses=1]
- br i1 %toBoolnot.i2, label %return, label %bb
-
-bb: ; preds = %bb, %entry
- %root.tr3 = phi %struct.btDbvtNode* [ %10, %bb ], [ %root, %entry ] ; [#uses=2]
- %7 = getelementptr inbounds %struct.btDbvtNode* %root.tr3, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %8 = load %struct.btDbvtNode** %7, align 4 ; [#uses=1]
- tail call void @_ZN6btDbvt9enumNodesEPK10btDbvtNodeRNS_8ICollideE(%struct.btDbvtNode* %8, %struct.btActionInterface* %policy) inlinehint
- %9 = getelementptr inbounds %struct.btDbvtNode* %root.tr3, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %10 = load %struct.btDbvtNode** %9, align 4 ; [#uses=3]
- %11 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 3 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to void (%struct.btActionInterface*, %struct.btDbvtNode*)* ; [#uses=1]
- tail call void %14(%struct.btActionInterface* %policy, %struct.btDbvtNode* %10)
- %15 = getelementptr inbounds %struct.btDbvtNode* %10, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %16 = load %struct.btDbvtNode** %15, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %16, null ; [#uses=1]
- br i1 %toBoolnot.i, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN6btDbvt8ICollideD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTVN6btDbvt8ICollideE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN6btDbvt8ICollideD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTVN6btDbvt8ICollideE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN6btDbvt11countLeavesEPK10btDbvtNode(%struct.btDbvtNode* nocapture %node) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %node, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %toBoolnot.i4 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %toBoolnot.i4, label %bb2, label %bb
-
-bb: ; preds = %bb, %entry
- %2 = phi %struct.btDbvtNode* [ %8, %bb ], [ %1, %entry ] ; [#uses=2]
- %node.tr6 = phi %struct.btDbvtNode* [ %2, %bb ], [ %node, %entry ] ; [#uses=1]
- %accumulator.tr5 = phi i32 [ %6, %bb ], [ 1, %entry ] ; [#uses=1]
- %3 = getelementptr inbounds %struct.btDbvtNode* %node.tr6, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- %5 = tail call i32 @_ZN6btDbvt11countLeavesEPK10btDbvtNode(%struct.btDbvtNode* %4) ; [#uses=1]
- %6 = add nsw i32 %5, %accumulator.tr5 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btDbvtNode* %2, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load %struct.btDbvtNode** %7, align 4 ; [#uses=2]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %8, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb2, label %bb
-
-bb2: ; preds = %bb, %entry
- %accumulator.tr.lcssa = phi i32 [ 1, %entry ], [ %6, %bb ] ; [#uses=1]
- ret i32 %accumulator.tr.lcssa
-}
-
-; [#uses=3]
-define internal fastcc void @_ZL11getmaxdepthPK10btDbvtNodeiRi(%struct.btDbvtNode* nocapture %node, i32 %depth, i32* %maxdepth) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %node, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = add nsw i32 %depth, 1 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btDbvtNode* %node, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- call fastcc void @_ZL11getmaxdepthPK10btDbvtNodeiRi(%struct.btDbvtNode* %4, i32 %2, i32* %maxdepth)
- %5 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- call fastcc void @_ZL11getmaxdepthPK10btDbvtNodeiRi(%struct.btDbvtNode* %5, i32 %2, i32* %maxdepth)
- ret void
-
-bb1: ; preds = %entry
- %6 = load i32* %maxdepth, align 4 ; [#uses=2]
- %7 = icmp sgt i32 %6, %depth ; [#uses=1]
- %8 = select i1 %7, i32 %6, i32 %depth ; [#uses=1]
- store i32 %8, i32* %maxdepth, align 4
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN6btDbvt8maxdepthEPK10btDbvtNode(%struct.btDbvtNode* %node) nounwind align 2 {
-entry:
- %depth = alloca i32, align 4 ; [#uses=3]
- store i32 0, i32* %depth, align 4
- %0 = icmp eq %struct.btDbvtNode* %node, null ; [#uses=1]
- br i1 %0, label %bb1, label %bb
-
-bb: ; preds = %entry
- call fastcc void @_ZL11getmaxdepthPK10btDbvtNodeiRi(%struct.btDbvtNode* %node, i32 1, i32* %depth)
- %.pre = load i32* %depth, align 4 ; [#uses=1]
- ret i32 %.pre
-
-bb1: ; preds = %entry
- ret i32 0
-}
-
-; [#uses=3]
-define void @_ZN6btDbvtC1Ev(%struct.btDbvt* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %1, align 4
- %2 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %4, align 4
- %5 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %5, align 4
- %6 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %8, align 4
- ret void
-}
-
-; [#uses=7]
-define internal fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* nocapture %pdbvt, %struct.btDbvtNode* %root, %struct.btDbvtNode* %leaf) {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 0 ; [#uses=3]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- store %struct.btDbvtNode* %leaf, %struct.btDbvtNode** %0, align 4
- %3 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %3, align 4
- ret void
-
-bb1: ; preds = %entry
- %4 = getelementptr inbounds %struct.btDbvtNode* %root, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btDbvtNode** %4, align 4 ; [#uses=2]
- %6 = icmp eq %struct.btDbvtNode* %5, null ; [#uses=1]
- br i1 %6, label %bb8, label %bb4.preheader
-
-bb4.preheader: ; preds = %bb1
- %7 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fadd float %8, %10 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fadd float %13, %15 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fadd float %18, %20 ; [#uses=2]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb4.preheader
- %22 = phi %struct.btDbvtNode* [ %76, %bb4 ], [ %5, %bb4.preheader ] ; [#uses=6]
- %root_addr.0 = phi %struct.btDbvtNode* [ %74, %bb4 ], [ %root, %bb4.preheader ] ; [#uses=2]
- %23 = getelementptr inbounds %struct.btDbvtNode* %root_addr.0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %24 = load %struct.btDbvtNode** %23, align 4 ; [#uses=6]
- %25 = getelementptr inbounds %struct.btDbvtNode* %24, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btDbvtNode* %24, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fadd float %26, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btDbvtNode* %24, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btDbvtNode* %24, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fadd float %31, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btDbvtNode* %24, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btDbvtNode* %24, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fadd float %36, %38 ; [#uses=1]
- %40 = fsub float %11, %29 ; [#uses=1]
- %41 = fsub float %16, %34 ; [#uses=1]
- %42 = fsub float %21, %39 ; [#uses=1]
- %43 = tail call float @fabsf(float %42) nounwind readnone ; [#uses=1]
- %44 = tail call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %45 = fadd float %43, %44 ; [#uses=1]
- %46 = tail call float @fabsf(float %40) nounwind readnone ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fadd float %49, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fadd float %54, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=1]
- %63 = fsub float %11, %52 ; [#uses=1]
- %64 = fsub float %16, %57 ; [#uses=1]
- %65 = fsub float %21, %62 ; [#uses=1]
- %66 = tail call float @fabsf(float %65) nounwind readnone ; [#uses=1]
- %67 = tail call float @fabsf(float %64) nounwind readnone ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = tail call float @fabsf(float %63) nounwind readnone ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fcmp uge float %47, %70 ; [#uses=1]
- %72 = zext i1 %71 to i32 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btDbvtNode* %root_addr.0, i32 0, i32 2, i32 0, i32 %72 ; [#uses=1]
- %74 = load %struct.btDbvtNode** %73, align 4 ; [#uses=3]
- %75 = getelementptr inbounds %struct.btDbvtNode* %74, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %76 = load %struct.btDbvtNode** %75, align 4 ; [#uses=2]
- %77 = icmp eq %struct.btDbvtNode* %76, null ; [#uses=1]
- br i1 %77, label %bb8, label %bb4
-
-bb8: ; preds = %bb4, %bb1
- %root_addr.1 = phi %struct.btDbvtNode* [ %root, %bb1 ], [ %74, %bb4 ] ; [#uses=10]
- %78 = getelementptr inbounds %struct.btDbvtNode* %root_addr.1, i32 0, i32 1 ; [#uses=4]
- %79 = load %struct.btDbvtNode** %78, align 4 ; [#uses=4]
- %80 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 1 ; [#uses=2]
- %81 = load %struct.btDbvtNode** %80, align 4 ; [#uses=2]
- %82 = icmp eq %struct.btDbvtNode* %81, null ; [#uses=1]
- br i1 %82, label %bb1.i.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb8
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %80, align 4
- br label %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit
-
-bb1.i.i: ; preds = %bb8
- %83 = tail call i8* @_Z22btAlignedAllocInternalji(i32 44, i32 16) ; [#uses=1]
- %84 = bitcast i8* %83 to %struct.btDbvtNode* ; [#uses=1]
- br label %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit
-
-_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit: ; preds = %bb1.i.i, %bb.i.i
- %node.0.i.i = phi %struct.btDbvtNode* [ %81, %bb.i.i ], [ %84, %bb1.i.i ] ; [#uses=16]
- %85 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %79, %struct.btDbvtNode** %85, align 4
- %86 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %86, align 4
- %87 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %87, align 4
- %scevgep.i.i = getelementptr %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep11.i.i = getelementptr %struct.btDbvtNode* %root_addr.1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep12.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %scevgep13.i.i = getelementptr %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i.i = getelementptr %struct.btDbvtNode* %root_addr.1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep15.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %scevgep.i.i, align 4 ; [#uses=2]
- %89 = load float* %scevgep11.i.i, align 4 ; [#uses=2]
- %90 = fcmp olt float %88, %89 ; [#uses=1]
- %storemerge.i.i = select i1 %90, float %88, float %89 ; [#uses=1]
- store float %storemerge.i.i, float* %scevgep12.i.i, align 4
- %91 = load float* %scevgep13.i.i, align 4 ; [#uses=2]
- %92 = load float* %scevgep14.i.i, align 4 ; [#uses=2]
- %93 = fcmp ogt float %91, %92 ; [#uses=1]
- %storemerge16.i.i = select i1 %93, float %91, float %92 ; [#uses=1]
- store float %storemerge16.i.i, float* %scevgep15.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep11.1.i.i = getelementptr %struct.btDbvtNode* %root_addr.1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep12.1.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.1.i.i = getelementptr %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1.i.i = getelementptr %struct.btDbvtNode* %root_addr.1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep15.1.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %scevgep.1.i.i, align 4 ; [#uses=2]
- %95 = load float* %scevgep11.1.i.i, align 4 ; [#uses=2]
- %96 = fcmp olt float %94, %95 ; [#uses=1]
- %storemerge17.i.i = select i1 %96, float %94, float %95 ; [#uses=1]
- store float %storemerge17.i.i, float* %scevgep12.1.i.i, align 4
- %97 = load float* %scevgep13.1.i.i, align 4 ; [#uses=2]
- %98 = load float* %scevgep14.1.i.i, align 4 ; [#uses=2]
- %99 = fcmp ogt float %97, %98 ; [#uses=1]
- %storemerge18.i.i = select i1 %99, float %97, float %98 ; [#uses=1]
- store float %storemerge18.i.i, float* %scevgep15.1.i.i, align 4
- %scevgep.2.i.i = getelementptr %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep11.2.i.i = getelementptr %struct.btDbvtNode* %root_addr.1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep12.2.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep13.2.i.i = getelementptr %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2.i.i = getelementptr %struct.btDbvtNode* %root_addr.1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep15.2.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %100 = load float* %scevgep.2.i.i, align 4 ; [#uses=2]
- %101 = load float* %scevgep11.2.i.i, align 4 ; [#uses=2]
- %102 = fcmp olt float %100, %101 ; [#uses=1]
- %storemerge19.i.i = select i1 %102, float %100, float %101 ; [#uses=1]
- store float %storemerge19.i.i, float* %scevgep12.2.i.i, align 4
- %103 = load float* %scevgep13.2.i.i, align 4 ; [#uses=2]
- %104 = load float* %scevgep14.2.i.i, align 4 ; [#uses=2]
- %105 = fcmp ogt float %103, %104 ; [#uses=1]
- %storemerge20.i.i = select i1 %105, float %103, float %104 ; [#uses=1]
- store float %storemerge20.i.i, float* %scevgep15.2.i.i, align 4
- %106 = icmp eq %struct.btDbvtNode* %79, null ; [#uses=1]
- br i1 %106, label %bb16, label %bb9
-
-bb9: ; preds = %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit
- %107 = load %struct.btDbvtNode** %78, align 4 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btDbvtNode* %107, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %109 = load %struct.btDbvtNode** %108, align 4 ; [#uses=1]
- %110 = icmp eq %struct.btDbvtNode* %109, %root_addr.1 ; [#uses=1]
- %111 = zext i1 %110 to i32 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btDbvtNode* %79, i32 0, i32 2, i32 0, i32 %111 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %112, align 4
- store %struct.btDbvtNode* %root_addr.1, %struct.btDbvtNode** %86, align 4
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %78, align 4
- store %struct.btDbvtNode* %leaf, %struct.btDbvtNode** %87, align 4
- %113 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %113, align 4
- %.pre = load float* %scevgep12.i.i, align 4 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb14, %bb9
- %114 = phi float [ %.pre, %bb9 ], [ %storemerge.i, %bb14 ] ; [#uses=1]
- %prev.0 = phi %struct.btDbvtNode* [ %79, %bb9 ], [ %165, %bb14 ] ; [#uses=15]
- %node.0 = phi %struct.btDbvtNode* [ %node.0.i.i, %bb9 ], [ %prev.0, %bb14 ] ; [#uses=5]
- %115 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %116 = load float* %115, align 4 ; [#uses=1]
- %117 = fcmp ugt float %116, %114 ; [#uses=1]
- br i1 %117, label %bb14, label %bb.i
-
-bb.i: ; preds = %bb10
- %118 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btDbvtNode* %node.0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- %122 = fcmp ugt float %119, %121 ; [#uses=1]
- br i1 %122, label %bb14, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %123 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btDbvtNode* %node.0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- %127 = fcmp ugt float %124, %126 ; [#uses=1]
- br i1 %127, label %bb14, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %128 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btDbvtNode* %node.0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = fcmp ult float %129, %131 ; [#uses=1]
- br i1 %132, label %bb14, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %133 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btDbvtNode* %node.0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- %137 = fcmp ult float %134, %136 ; [#uses=1]
- br i1 %137, label %bb14, label %_ZNK12btDbvtAabbMm7ContainERKS_.exit
-
-_ZNK12btDbvtAabbMm7ContainERKS_.exit: ; preds = %bb3.i
- %138 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btDbvtNode* %node.0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %139, %141 ; [#uses=1]
- br i1 %phitmp, label %bb14, label %return
-
-bb14: ; preds = %_ZNK12btDbvtAabbMm7ContainERKS_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %bb10
- %142 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %143 = load %struct.btDbvtNode** %142, align 4 ; [#uses=6]
- %144 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %145 = load %struct.btDbvtNode** %144, align 4 ; [#uses=6]
- %scevgep.i = getelementptr %struct.btDbvtNode* %145, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep11.i = getelementptr %struct.btDbvtNode* %143, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep13.i = getelementptr %struct.btDbvtNode* %145, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i = getelementptr %struct.btDbvtNode* %143, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %146 = load float* %scevgep.i, align 4 ; [#uses=2]
- %147 = load float* %scevgep11.i, align 4 ; [#uses=2]
- %148 = fcmp olt float %146, %147 ; [#uses=1]
- %storemerge.i = select i1 %148, float %146, float %147 ; [#uses=2]
- store float %storemerge.i, float* %115, align 4
- %149 = load float* %scevgep13.i, align 4 ; [#uses=2]
- %150 = load float* %scevgep14.i, align 4 ; [#uses=2]
- %151 = fcmp ogt float %149, %150 ; [#uses=1]
- %storemerge16.i = select i1 %151, float %149, float %150 ; [#uses=1]
- store float %storemerge16.i, float* %scevgep15.i, align 4
- %scevgep.1.i = getelementptr %struct.btDbvtNode* %145, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep11.1.i = getelementptr %struct.btDbvtNode* %143, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep12.1.i = getelementptr %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.1.i = getelementptr %struct.btDbvtNode* %145, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1.i = getelementptr %struct.btDbvtNode* %143, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep15.1.i = getelementptr %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %152 = load float* %scevgep.1.i, align 4 ; [#uses=2]
- %153 = load float* %scevgep11.1.i, align 4 ; [#uses=2]
- %154 = fcmp olt float %152, %153 ; [#uses=1]
- %storemerge17.i = select i1 %154, float %152, float %153 ; [#uses=1]
- store float %storemerge17.i, float* %scevgep12.1.i, align 4
- %155 = load float* %scevgep13.1.i, align 4 ; [#uses=2]
- %156 = load float* %scevgep14.1.i, align 4 ; [#uses=2]
- %157 = fcmp ogt float %155, %156 ; [#uses=1]
- %storemerge18.i = select i1 %157, float %155, float %156 ; [#uses=1]
- store float %storemerge18.i, float* %scevgep15.1.i, align 4
- %scevgep.2.i = getelementptr %struct.btDbvtNode* %145, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep11.2.i = getelementptr %struct.btDbvtNode* %143, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep12.2.i = getelementptr %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep13.2.i = getelementptr %struct.btDbvtNode* %145, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2.i = getelementptr %struct.btDbvtNode* %143, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep15.2.i = getelementptr %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %158 = load float* %scevgep.2.i, align 4 ; [#uses=2]
- %159 = load float* %scevgep11.2.i, align 4 ; [#uses=2]
- %160 = fcmp olt float %158, %159 ; [#uses=1]
- %storemerge19.i = select i1 %160, float %158, float %159 ; [#uses=1]
- store float %storemerge19.i, float* %scevgep12.2.i, align 4
- %161 = load float* %scevgep13.2.i, align 4 ; [#uses=2]
- %162 = load float* %scevgep14.2.i, align 4 ; [#uses=2]
- %163 = fcmp ogt float %161, %162 ; [#uses=1]
- %storemerge20.i = select i1 %163, float %161, float %162 ; [#uses=1]
- store float %storemerge20.i, float* %scevgep15.2.i, align 4
- %164 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 1 ; [#uses=1]
- %165 = load %struct.btDbvtNode** %164, align 4 ; [#uses=2]
- %166 = icmp eq %struct.btDbvtNode* %165, null ; [#uses=1]
- br i1 %166, label %return, label %bb10
-
-bb16: ; preds = %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit
- store %struct.btDbvtNode* %root_addr.1, %struct.btDbvtNode** %86, align 4
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %78, align 4
- store %struct.btDbvtNode* %leaf, %struct.btDbvtNode** %87, align 4
- %167 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %167, align 4
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %0, align 4
- ret void
-
-return: ; preds = %bb14, %_ZNK12btDbvtAabbMm7ContainERKS_.exit
- ret void
-}
-
-; [#uses=6]
-define %struct.btDbvtNode* @_ZN6btDbvt6insertERK12btDbvtAabbMmPv(%struct.btDbvt* nocapture %this, %struct.GIM_AABB* nocapture %volume, i8* %data) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1.i.i, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %0, align 4
- br label %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmPv.exit
-
-bb1.i.i: ; preds = %entry
- %3 = tail call i8* @_Z22btAlignedAllocInternalji(i32 44, i32 16) ; [#uses=1]
- %4 = bitcast i8* %3 to %struct.btDbvtNode* ; [#uses=1]
- br label %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmPv.exit
-
-_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmPv.exit: ; preds = %bb1.i.i, %bb.i.i
- %node.0.i.i = phi %struct.btDbvtNode* [ %1, %bb.i.i ], [ %4, %bb1.i.i ] ; [#uses=13]
- %5 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %5, align 4
- %6 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %data.c.i.i = bitcast i8* %data to %struct.btDbvtNode* ; [#uses=1]
- store %struct.btDbvtNode* %data.c.i.i, %struct.btDbvtNode** %6, align 4
- %7 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %7, align 4
- %8 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %24 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %30 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %33 = load %struct.btDbvtNode** %32, align 4 ; [#uses=1]
- tail call fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* %this, %struct.btDbvtNode* %33, %struct.btDbvtNode* %node.0.i.i)
- %34 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=2]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = add nsw i32 %35, 1 ; [#uses=1]
- store i32 %36, i32* %34, align 4
- ret %struct.btDbvtNode* %node.0.i.i
-}
-
-; [#uses=2]
-define internal fastcc void @_ZL8bottomupP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeE(%struct.btDbvt* nocapture %pdbvt, %"struct.btAlignedObjectArray<btDbvtNode*>"* nocapture %leaves) {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 1 ; [#uses=4]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 1 ; [#uses=1]
- br i1 %2, label %bb.nph49, label %return
-
-bb.nph: ; preds = %bb5.preheader
- %tmp66 = xor i32 %33, -1 ; [#uses=1]
- %3 = load %struct.btDbvtNode*** %81, align 4 ; [#uses=2]
- %scevgep68 = getelementptr %struct.btDbvtNode** %3, i32 %33 ; [#uses=1]
- %4 = load %struct.btDbvtNode** %scevgep68, align 4 ; [#uses=6]
- %scevgep.i.i13 = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep13.i.i15 = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %scevgep.i.i13, align 4 ; [#uses=2]
- %6 = load float* %scevgep13.i.i15, align 4 ; [#uses=2]
- %scevgep.1.i.i19 = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.1.i.i21 = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %scevgep.1.i.i19, align 4 ; [#uses=2]
- %8 = load float* %scevgep13.1.i.i21, align 4 ; [#uses=2]
- %scevgep.2.i.i25 = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep13.2.i.i27 = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %scevgep.2.i.i25, align 4 ; [#uses=2]
- %10 = load float* %scevgep13.2.i.i27, align 4 ; [#uses=2]
- %tmp63 = icmp sgt i32 %83, %tmp ; [#uses=1]
- %smax64 = select i1 %tmp63, i32 %83, i32 %tmp ; [#uses=1]
- %tmp53 = add i32 %smax64, %tmp66 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb2 ] ; [#uses=2]
- %minsize.138 = phi float [ %minsize.244, %bb.nph ], [ %minsize.0, %bb2 ] ; [#uses=2]
- %minidx.0.137 = phi i32 [ %minidx.0.243, %bb.nph ], [ %minidx.0.0, %bb2 ] ; [#uses=1]
- %minidx.1.136 = phi i32 [ %minidx.1.242, %bb.nph ], [ %minidx.1.0, %bb2 ] ; [#uses=1]
- %j.039 = add i32 %j.035, %indvar ; [#uses=2]
- %scevgep = getelementptr %struct.btDbvtNode** %3, i32 %j.039 ; [#uses=1]
- %11 = load %struct.btDbvtNode** %scevgep, align 4 ; [#uses=6]
- %scevgep11.i.i14 = getelementptr %struct.btDbvtNode* %11, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i.i16 = getelementptr %struct.btDbvtNode* %11, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %12 = load float* %scevgep11.i.i14, align 4 ; [#uses=2]
- %13 = fcmp olt float %5, %12 ; [#uses=1]
- %storemerge.i.i17 = select i1 %13, float %5, float %12 ; [#uses=1]
- %14 = load float* %scevgep14.i.i16, align 4 ; [#uses=2]
- %15 = fcmp ogt float %6, %14 ; [#uses=1]
- %storemerge16.i.i18 = select i1 %15, float %6, float %14 ; [#uses=1]
- %scevgep11.1.i.i20 = getelementptr %struct.btDbvtNode* %11, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1.i.i22 = getelementptr %struct.btDbvtNode* %11, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %scevgep11.1.i.i20, align 4 ; [#uses=2]
- %17 = fcmp olt float %7, %16 ; [#uses=1]
- %storemerge17.i.i23 = select i1 %17, float %7, float %16 ; [#uses=1]
- %18 = load float* %scevgep14.1.i.i22, align 4 ; [#uses=2]
- %19 = fcmp ogt float %8, %18 ; [#uses=1]
- %storemerge18.i.i24 = select i1 %19, float %8, float %18 ; [#uses=1]
- %scevgep11.2.i.i26 = getelementptr %struct.btDbvtNode* %11, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2.i.i28 = getelementptr %struct.btDbvtNode* %11, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %scevgep11.2.i.i26, align 4 ; [#uses=2]
- %21 = fcmp olt float %9, %20 ; [#uses=1]
- %storemerge19.i.i29 = select i1 %21, float %9, float %20 ; [#uses=1]
- %22 = load float* %scevgep14.2.i.i28, align 4 ; [#uses=2]
- %23 = fcmp ogt float %10, %22 ; [#uses=1]
- %storemerge20.i.i30 = select i1 %23, float %10, float %22 ; [#uses=1]
- %24 = fsub float %storemerge20.i.i30, %storemerge19.i.i29 ; [#uses=2]
- %25 = fsub float %storemerge18.i.i24, %storemerge17.i.i23 ; [#uses=2]
- %26 = fsub float %storemerge16.i.i18, %storemerge.i.i17 ; [#uses=2]
- %27 = fmul float %26, %25 ; [#uses=1]
- %28 = fmul float %27, %24 ; [#uses=1]
- %29 = fadd float %28, %26 ; [#uses=1]
- %30 = fadd float %29, %25 ; [#uses=1]
- %31 = fadd float %30, %24 ; [#uses=2]
- %32 = fcmp olt float %31, %minsize.138 ; [#uses=3]
- %minidx.1.0 = select i1 %32, i32 %j.039, i32 %minidx.1.136 ; [#uses=2]
- %minidx.0.0 = select i1 %32, i32 %33, i32 %minidx.0.137 ; [#uses=2]
- %minsize.0 = select i1 %32, float %31, float %minsize.138 ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp53 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb2
-
-bb6: ; preds = %bb5.preheader, %bb2
- %minsize.1.lcssa = phi float [ %minsize.244, %bb5.preheader ], [ %minsize.0, %bb2 ] ; [#uses=1]
- %minidx.0.1.lcssa = phi i32 [ %minidx.0.243, %bb5.preheader ], [ %minidx.0.0, %bb2 ] ; [#uses=2]
- %minidx.1.1.lcssa = phi i32 [ %minidx.1.242, %bb5.preheader ], [ %minidx.1.0, %bb2 ] ; [#uses=2]
- %exitcond58 = icmp eq i32 %j.035, %83 ; [#uses=1]
- br i1 %exitcond58, label %bb9, label %bb5.preheader
-
-bb5.preheader: ; preds = %bb7.preheader, %bb6
- %33 = phi i32 [ %j.035, %bb6 ], [ 0, %bb7.preheader ] ; [#uses=5]
- %minsize.244 = phi float [ %minsize.1.lcssa, %bb6 ], [ 0x47EFFFFFE0000000, %bb7.preheader ] ; [#uses=2]
- %minidx.0.243 = phi i32 [ %minidx.0.1.lcssa, %bb6 ], [ -1, %bb7.preheader ] ; [#uses=2]
- %minidx.1.242 = phi i32 [ %minidx.1.1.lcssa, %bb6 ], [ -1, %bb7.preheader ] ; [#uses=2]
- %j.035 = add i32 %33, 1 ; [#uses=4]
- %tmp = add i32 %33, 2 ; [#uses=2]
- %34 = icmp sgt i32 %83, %j.035 ; [#uses=1]
- br i1 %34, label %bb.nph, label %bb6
-
-bb9: ; preds = %bb7.preheader, %bb6
- %minidx.0.2.lcssa = phi i32 [ %minidx.0.1.lcssa, %bb6 ], [ -1, %bb7.preheader ] ; [#uses=2]
- %minidx.1.2.lcssa = phi i32 [ %minidx.1.1.lcssa, %bb6 ], [ -1, %bb7.preheader ] ; [#uses=2]
- %35 = load %struct.btDbvtNode*** %81, align 4 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btDbvtNode** %35, i32 %minidx.0.2.lcssa ; [#uses=1]
- %37 = load %struct.btDbvtNode** %36, align 4 ; [#uses=8]
- %38 = getelementptr inbounds %struct.btDbvtNode** %35, i32 %minidx.1.2.lcssa ; [#uses=1]
- %39 = load %struct.btDbvtNode** %38, align 4 ; [#uses=8]
- %40 = load %struct.btDbvtNode** %82, align 4 ; [#uses=2]
- %41 = icmp eq %struct.btDbvtNode* %40, null ; [#uses=1]
- br i1 %41, label %bb1.i.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb9
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %82, align 4
- br label %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit
-
-bb1.i.i: ; preds = %bb9
- %42 = tail call i8* @_Z22btAlignedAllocInternalji(i32 44, i32 16) ; [#uses=1]
- %43 = bitcast i8* %42 to %struct.btDbvtNode* ; [#uses=1]
- br label %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit
-
-_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit: ; preds = %bb1.i.i, %bb.i.i
- %node.0.i.i = phi %struct.btDbvtNode* [ %40, %bb.i.i ], [ %43, %bb1.i.i ] ; [#uses=12]
- %44 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %44, align 4
- %45 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %45, align 4
- %46 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %46, align 4
- %scevgep.i.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep11.i.i = getelementptr %struct.btDbvtNode* %39, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep12.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep13.i.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i.i = getelementptr %struct.btDbvtNode* %39, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep15.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %scevgep.i.i, align 4 ; [#uses=2]
- %48 = load float* %scevgep11.i.i, align 4 ; [#uses=2]
- %49 = fcmp olt float %47, %48 ; [#uses=1]
- %storemerge.i.i = select i1 %49, float %47, float %48 ; [#uses=1]
- store float %storemerge.i.i, float* %scevgep12.i.i, align 4
- %50 = load float* %scevgep13.i.i, align 4 ; [#uses=2]
- %51 = load float* %scevgep14.i.i, align 4 ; [#uses=2]
- %52 = fcmp ogt float %50, %51 ; [#uses=1]
- %storemerge16.i.i = select i1 %52, float %50, float %51 ; [#uses=1]
- store float %storemerge16.i.i, float* %scevgep15.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep11.1.i.i = getelementptr %struct.btDbvtNode* %39, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep12.1.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.1.i.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1.i.i = getelementptr %struct.btDbvtNode* %39, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep15.1.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %scevgep.1.i.i, align 4 ; [#uses=2]
- %54 = load float* %scevgep11.1.i.i, align 4 ; [#uses=2]
- %55 = fcmp olt float %53, %54 ; [#uses=1]
- %storemerge17.i.i = select i1 %55, float %53, float %54 ; [#uses=1]
- store float %storemerge17.i.i, float* %scevgep12.1.i.i, align 4
- %56 = load float* %scevgep13.1.i.i, align 4 ; [#uses=2]
- %57 = load float* %scevgep14.1.i.i, align 4 ; [#uses=2]
- %58 = fcmp ogt float %56, %57 ; [#uses=1]
- %storemerge18.i.i = select i1 %58, float %56, float %57 ; [#uses=1]
- store float %storemerge18.i.i, float* %scevgep15.1.i.i, align 4
- %scevgep.2.i.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep11.2.i.i = getelementptr %struct.btDbvtNode* %39, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep12.2.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep13.2.i.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2.i.i = getelementptr %struct.btDbvtNode* %39, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep15.2.i.i = getelementptr %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %scevgep.2.i.i, align 4 ; [#uses=2]
- %60 = load float* %scevgep11.2.i.i, align 4 ; [#uses=2]
- %61 = fcmp olt float %59, %60 ; [#uses=1]
- %storemerge19.i.i = select i1 %61, float %59, float %60 ; [#uses=1]
- store float %storemerge19.i.i, float* %scevgep12.2.i.i, align 4
- %62 = load float* %scevgep13.2.i.i, align 4 ; [#uses=2]
- %63 = load float* %scevgep14.2.i.i, align 4 ; [#uses=2]
- %64 = fcmp ogt float %62, %63 ; [#uses=1]
- %storemerge20.i.i = select i1 %64, float %62, float %63 ; [#uses=1]
- store float %storemerge20.i.i, float* %scevgep15.2.i.i, align 4
- store %struct.btDbvtNode* %37, %struct.btDbvtNode** %45, align 4
- store %struct.btDbvtNode* %39, %struct.btDbvtNode** %46, align 4
- %65 = getelementptr inbounds %struct.btDbvtNode* %37, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %65, align 4
- %66 = getelementptr inbounds %struct.btDbvtNode* %39, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %66, align 4
- %67 = load %struct.btDbvtNode*** %81, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btDbvtNode** %67, i32 %minidx.0.2.lcssa ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %68, align 4
- %69 = load i32* %0, align 4 ; [#uses=1]
- %70 = add nsw i32 %69, -1 ; [#uses=2]
- %71 = load %struct.btDbvtNode*** %81, align 4 ; [#uses=2]
- %72 = getelementptr inbounds %struct.btDbvtNode** %71, i32 %minidx.1.2.lcssa ; [#uses=2]
- %73 = load %struct.btDbvtNode** %72, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btDbvtNode** %71, i32 %70 ; [#uses=1]
- %75 = load %struct.btDbvtNode** %74, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %75, %struct.btDbvtNode** %72, align 4
- %76 = load %struct.btDbvtNode*** %81, align 4 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btDbvtNode** %76, i32 %70 ; [#uses=1]
- store %struct.btDbvtNode* %73, %struct.btDbvtNode** %77, align 4
- %78 = load i32* %0, align 4 ; [#uses=1]
- %79 = add nsw i32 %78, -1 ; [#uses=3]
- store i32 %79, i32* %0, align 4
- %80 = icmp sgt i32 %79, 1 ; [#uses=1]
- br i1 %80, label %bb7.preheader, label %return
-
-bb.nph49: ; preds = %entry
- %81 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=5]
- %82 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 1 ; [#uses=2]
- br label %bb7.preheader
-
-bb7.preheader: ; preds = %bb.nph49, %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit
- %83 = phi i32 [ %1, %bb.nph49 ], [ %79, %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit ] ; [#uses=5]
- %84 = icmp sgt i32 %83, 0 ; [#uses=1]
- br i1 %84, label %bb5.preheader, label %bb9
-
-return: ; preds = %_ZL10createnodeP6btDbvtP10btDbvtNodeRK12btDbvtAabbMmS5_Pv.exit, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN6btDbvt13extractLeavesEPK10btDbvtNodeR20btAlignedObjectArrayIS2_E(%struct.btDbvtNode* %node, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %node, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- %toBoolnot.i3 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %toBoolnot.i3, label %bb1, label %bb
-
-bb: ; preds = %bb, %entry
- %node.tr4 = phi %struct.btDbvtNode* [ %5, %bb ], [ %node, %entry ] ; [#uses=2]
- %2 = getelementptr inbounds %struct.btDbvtNode* %node.tr4, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = load %struct.btDbvtNode** %2, align 4 ; [#uses=1]
- tail call void @_ZN6btDbvt13extractLeavesEPK10btDbvtNodeR20btAlignedObjectArrayIS2_E(%struct.btDbvtNode* %3, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves)
- %4 = getelementptr inbounds %struct.btDbvtNode* %node.tr4, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btDbvtNode** %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btDbvtNode* %5, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btDbvtNode** %6, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %7, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb1, label %bb
-
-bb1: ; preds = %bb, %entry
- %node.tr.lcssa = phi %struct.btDbvtNode* [ %node, %entry ], [ %5, %bb ] ; [#uses=1]
- %8 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 1 ; [#uses=5]
- %9 = load i32* %8, align 4 ; [#uses=6]
- %10 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 2 ; [#uses=2]
- %11 = load i32* %10, align 4 ; [#uses=2]
- %12 = icmp eq i32 %11, %9 ; [#uses=1]
- br i1 %12, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb1
- %13 = icmp eq i32 %9, 0 ; [#uses=1]
- %14 = shl i32 %9, 1 ; [#uses=1]
- %iftmp.309.0.i.i = select i1 %13, i32 1, i32 %14 ; [#uses=4]
- %15 = icmp slt i32 %11, %iftmp.309.0.i.i ; [#uses=1]
- br i1 %15, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %16 = icmp eq i32 %iftmp.309.0.i.i, 0 ; [#uses=1]
- br i1 %16, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %17 = shl i32 %iftmp.309.0.i.i, 2 ; [#uses=1]
- %18 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %17, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %18 to %struct.btDbvtNode** ; [#uses=1]
- %.pre.i = load i32* %8, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %19 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %9, %bb.i.i ] ; [#uses=2]
- %20 = phi %struct.btDbvtNode** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %21 = icmp sgt i32 %19, 0 ; [#uses=1]
- br i1 %21, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i
- %22 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btDbvtNode** %20, i32 %indvar.i.i.i ; [#uses=2]
- %23 = icmp eq %struct.btDbvtNode** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %23, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %24 = load %struct.btDbvtNode*** %22, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btDbvtNode** %24, i32 %indvar.i.i.i ; [#uses=1]
- %25 = load %struct.btDbvtNode** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %25, %struct.btDbvtNode** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %19 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=3]
- %27 = load %struct.btDbvtNode*** %26, align 4 ; [#uses=2]
- %28 = icmp eq %struct.btDbvtNode** %27, null ; [#uses=1]
- br i1 %28, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i
- %29 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 4 ; [#uses=1]
- %30 = load i8* %29, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %30, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %31 = bitcast %struct.btDbvtNode** %27 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %31)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %26, align 4
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i
- %32 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %32, align 4
- store %struct.btDbvtNode** %20, %struct.btDbvtNode*** %26, align 4
- store i32 %iftmp.309.0.i.i, i32* %10, align 4
- %.pre5.i = load i32* %8, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i, %bb.i, %bb1
- %33 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i ], [ %9, %bb1 ], [ %9, %bb.i ] ; [#uses=2]
- %34 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=1]
- %35 = load %struct.btDbvtNode*** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btDbvtNode** %35, i32 %33 ; [#uses=2]
- %37 = icmp eq %struct.btDbvtNode** %36, null ; [#uses=1]
- br i1 %37, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btDbvtNode* %node.tr.lcssa, %struct.btDbvtNode** %36, align 4
- %.pre6.i = load i32* %8, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit: ; preds = %bb2.i, %bb1.i
- %38 = phi i32 [ %33, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %39 = add nsw i32 %38, 1 ; [#uses=1]
- store i32 %39, i32* %8, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btDbvtNodeEnumerator7ProcessEPK10btDbvtNode(%struct.btDbvtNodeEnumerator* nocapture %this, %struct.btDbvtNode* %n) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.309.0.i.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.309.0.i.i ; [#uses=1]
- br i1 %7, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %8 = icmp eq i32 %iftmp.309.0.i.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %9 = shl i32 %iftmp.309.0.i.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %10 to %struct.btDbvtNode** ; [#uses=1]
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %11 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %1, %bb.i.i ] ; [#uses=2]
- %12 = phi %struct.btDbvtNode** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i
- %14 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btDbvtNode** %12, i32 %indvar.i.i.i ; [#uses=2]
- %15 = icmp eq %struct.btDbvtNode** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %16 = load %struct.btDbvtNode*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btDbvtNode** %16, i32 %indvar.i.i.i ; [#uses=1]
- %17 = load %struct.btDbvtNode** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %17, %struct.btDbvtNode** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i
- %18 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %19 = load %struct.btDbvtNode*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btDbvtNode** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i
- %21 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %23 = bitcast %struct.btDbvtNode** %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i
- %24 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btDbvtNode** %12, %struct.btDbvtNode*** %18, align 4
- store i32 %iftmp.309.0.i.i, i32* %2, align 4
- %.pre5.i = load i32* %0, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i, %bb.i, %entry
- %25 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i.i ], [ %1, %entry ], [ %1, %bb.i ] ; [#uses=2]
- %26 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %27 = load %struct.btDbvtNode*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btDbvtNode** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btDbvtNode** %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btDbvtNode* %n, %struct.btDbvtNode** %28, align 4
- %.pre6.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit: ; preds = %bb2.i, %bb1.i
- %30 = phi i32 [ %25, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %31 = add nsw i32 %30, 1 ; [#uses=1]
- store i32 %31, i32* %0, align 4
- ret void
-}
-
-; [#uses=7]
-define internal fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* nocapture %pdbvt, %struct.btDbvtNode* %leaf) {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 0 ; [#uses=5]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btDbvtNode* %1, %leaf ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %0, align 4
- ret %struct.btDbvtNode* null
-
-bb1: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=6]
- %5 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btDbvtNode** %5, align 4 ; [#uses=5]
- %7 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load %struct.btDbvtNode** %7, align 4 ; [#uses=1]
- %not. = icmp ne %struct.btDbvtNode* %8, %leaf ; [#uses=1]
- %9 = zext i1 %not. to i32 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 2, i32 0, i32 %9 ; [#uses=1]
- %11 = load %struct.btDbvtNode** %10, align 4 ; [#uses=4]
- %12 = icmp eq %struct.btDbvtNode* %6, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb2
-
-bb2: ; preds = %bb1
- %13 = getelementptr inbounds %struct.btDbvtNode* %6, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %14 = load %struct.btDbvtNode** %13, align 4 ; [#uses=1]
- %15 = icmp eq %struct.btDbvtNode* %14, %4 ; [#uses=1]
- %16 = zext i1 %15 to i32 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btDbvtNode* %6, i32 0, i32 2, i32 0, i32 %16 ; [#uses=1]
- store %struct.btDbvtNode* %11, %struct.btDbvtNode** %17, align 4
- %18 = getelementptr inbounds %struct.btDbvtNode* %11, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %6, %struct.btDbvtNode** %18, align 4
- %19 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 1 ; [#uses=2]
- %20 = load %struct.btDbvtNode** %19, align 4 ; [#uses=1]
- %21 = bitcast %struct.btDbvtNode* %20 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %21)
- store %struct.btDbvtNode* %4, %struct.btDbvtNode** %19, align 4
- br label %bb5
-
-bb3: ; preds = %bb5
- %22 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %35 = load %struct.btDbvtNode** %34, align 4 ; [#uses=6]
- %36 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %37 = load %struct.btDbvtNode** %36, align 4 ; [#uses=6]
- %scevgep.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep11.i = getelementptr %struct.btDbvtNode* %35, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep13.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i = getelementptr %struct.btDbvtNode* %35, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %scevgep.i, align 4 ; [#uses=2]
- %39 = load float* %scevgep11.i, align 4 ; [#uses=2]
- %40 = fcmp olt float %38, %39 ; [#uses=1]
- %storemerge.i = select i1 %40, float %38, float %39 ; [#uses=2]
- store float %storemerge.i, float* %22, align 4
- %41 = load float* %scevgep13.i, align 4 ; [#uses=2]
- %42 = load float* %scevgep14.i, align 4 ; [#uses=2]
- %43 = fcmp ogt float %41, %42 ; [#uses=1]
- %storemerge16.i = select i1 %43, float %41, float %42 ; [#uses=2]
- store float %storemerge16.i, float* %28, align 4
- %scevgep.1.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep11.1.i = getelementptr %struct.btDbvtNode* %35, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.1.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1.i = getelementptr %struct.btDbvtNode* %35, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %scevgep.1.i, align 4 ; [#uses=2]
- %45 = load float* %scevgep11.1.i, align 4 ; [#uses=2]
- %46 = fcmp olt float %44, %45 ; [#uses=1]
- %storemerge17.i = select i1 %46, float %44, float %45 ; [#uses=2]
- store float %storemerge17.i, float* %24, align 4
- %47 = load float* %scevgep13.1.i, align 4 ; [#uses=2]
- %48 = load float* %scevgep14.1.i, align 4 ; [#uses=2]
- %49 = fcmp ogt float %47, %48 ; [#uses=1]
- %storemerge18.i = select i1 %49, float %47, float %48 ; [#uses=2]
- store float %storemerge18.i, float* %30, align 4
- %scevgep.2.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep11.2.i = getelementptr %struct.btDbvtNode* %35, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep13.2.i = getelementptr %struct.btDbvtNode* %37, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2.i = getelementptr %struct.btDbvtNode* %35, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %scevgep.2.i, align 4 ; [#uses=2]
- %51 = load float* %scevgep11.2.i, align 4 ; [#uses=2]
- %52 = fcmp olt float %50, %51 ; [#uses=1]
- %storemerge19.i = select i1 %52, float %50, float %51 ; [#uses=2]
- store float %storemerge19.i, float* %26, align 4
- %53 = load float* %scevgep13.2.i, align 4 ; [#uses=2]
- %54 = load float* %scevgep14.2.i, align 4 ; [#uses=2]
- %55 = fcmp ogt float %53, %54 ; [#uses=1]
- %storemerge20.i = select i1 %55, float %53, float %54 ; [#uses=2]
- store float %storemerge20.i, float* %32, align 4
- %56 = fcmp une float %23, %storemerge.i ; [#uses=1]
- %57 = fcmp une float %25, %storemerge17.i ; [#uses=1]
- %or.cond = or i1 %56, %57 ; [#uses=1]
- %58 = fcmp une float %27, %storemerge19.i ; [#uses=1]
- %or.cond19 = or i1 %or.cond, %58 ; [#uses=1]
- %59 = fcmp une float %29, %storemerge16.i ; [#uses=1]
- %or.cond20 = or i1 %or.cond19, %59 ; [#uses=1]
- %60 = fcmp une float %31, %storemerge18.i ; [#uses=1]
- %or.cond21 = or i1 %or.cond20, %60 ; [#uses=1]
- %or.cond21.not = xor i1 %or.cond21, true ; [#uses=1]
- %phitmp = fcmp oeq float %33, %storemerge20.i ; [#uses=1]
- %or.cond22 = and i1 %or.cond21.not, %phitmp ; [#uses=1]
- br i1 %or.cond22, label %bb11, label %bb4
-
-bb4: ; preds = %bb3
- %61 = getelementptr inbounds %struct.btDbvtNode* %prev.0, i32 0, i32 1 ; [#uses=1]
- %62 = load %struct.btDbvtNode** %61, align 4 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb2
- %prev.0 = phi %struct.btDbvtNode* [ %6, %bb2 ], [ %62, %bb4 ] ; [#uses=11]
- %cond = icmp eq %struct.btDbvtNode* %prev.0, null ; [#uses=1]
- br i1 %cond, label %bb7, label %bb3
-
-bb7: ; preds = %bb5
- %63 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- ret %struct.btDbvtNode* %63
-
-bb10: ; preds = %bb1
- store %struct.btDbvtNode* %11, %struct.btDbvtNode** %0, align 4
- %64 = getelementptr inbounds %struct.btDbvtNode* %11, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %64, align 4
- %65 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 1 ; [#uses=2]
- %66 = load %struct.btDbvtNode** %65, align 4 ; [#uses=1]
- %67 = bitcast %struct.btDbvtNode* %66 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %67)
- store %struct.btDbvtNode* %4, %struct.btDbvtNode** %65, align 4
- %68 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- ret %struct.btDbvtNode* %68
-
-bb11: ; preds = %bb3
- ret %struct.btDbvtNode* %prev.0
-}
-
-; [#uses=7]
-define void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %leaf) align 2 {
-entry:
- %0 = tail call fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %leaf) ; [#uses=0]
- %1 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 1 ; [#uses=2]
- %2 = load %struct.btDbvtNode** %1, align 4 ; [#uses=1]
- %3 = bitcast %struct.btDbvtNode* %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %3)
- store %struct.btDbvtNode* %leaf, %struct.btDbvtNode** %1, align 4
- %4 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = add nsw i32 %5, -1 ; [#uses=1]
- store i32 %6, i32* %4, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %leaf, %struct.GIM_AABB* nocapture %volume) align 2 {
-entry:
- %0 = tail call fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %leaf) ; [#uses=2]
- %1 = icmp eq %struct.btDbvtNode* %0, null ; [#uses=1]
- br i1 %1, label %bb6, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp sgt i32 %3, -1 ; [#uses=1]
- br i1 %4, label %bb3, label %bb5
-
-bb2: ; preds = %bb4
- %5 = add nsw i32 %6, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb
- %root.0 = phi %struct.btDbvtNode* [ %9, %bb2 ], [ %0, %bb ] ; [#uses=3]
- %6 = phi i32 [ %5, %bb2 ], [ 0, %bb ] ; [#uses=2]
- %7 = icmp sgt i32 %3, %6 ; [#uses=1]
- br i1 %7, label %bb4, label %bb6
-
-bb4: ; preds = %bb3
- %8 = getelementptr inbounds %struct.btDbvtNode* %root.0, i32 0, i32 1 ; [#uses=1]
- %9 = load %struct.btDbvtNode** %8, align 4 ; [#uses=2]
- %10 = icmp eq %struct.btDbvtNode* %9, null ; [#uses=1]
- br i1 %10, label %bb6, label %bb2
-
-bb5: ; preds = %bb
- %11 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %12 = load %struct.btDbvtNode** %11, align 4 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4, %bb3, %entry
- %root.1 = phi %struct.btDbvtNode* [ %12, %bb5 ], [ null, %entry ], [ %root.0, %bb3 ], [ %root.0, %bb4 ] ; [#uses=1]
- %13 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- tail call fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* %this, %struct.btDbvtNode* %root.1, %struct.btDbvtNode* %leaf)
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMmf(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %leaf, %struct.GIM_AABB* nocapture %volume, float %margin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fcmp ugt float %1, %3 ; [#uses=1]
- br i1 %4, label %entry.bb1_crit_edge, label %bb.i
-
-entry.bb1_crit_edge: ; preds = %entry
- %.phi.trans.insert = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb1
-
-bb.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=6]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %bb1, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %10 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fcmp ugt float %11, %13 ; [#uses=1]
- br i1 %14, label %bb1, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %15 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp ult float %16, %18 ; [#uses=1]
- br i1 %19, label %bb1, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %20 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ult float %21, %23 ; [#uses=1]
- br i1 %24, label %bb1, label %_ZNK12btDbvtAabbMm7ContainERKS_.exit
-
-_ZNK12btDbvtAabbMm7ContainERKS_.exit: ; preds = %bb3.i
- %25 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %26, %28 ; [#uses=1]
- br i1 %phitmp, label %bb1, label %bb2
-
-bb1: ; preds = %_ZNK12btDbvtAabbMm7ContainERKS_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %entry.bb1_crit_edge
- %29 = phi float [ %.pre, %entry.bb1_crit_edge ], [ %8, %_ZNK12btDbvtAabbMm7ContainERKS_.exit ], [ %8, %bb.i ], [ %8, %bb1.i ], [ %8, %bb2.i ], [ %8, %bb3.i ] ; [#uses=1]
- %30 = fsub float %3, %margin ; [#uses=1]
- store float %30, float* %2, align 4
- %31 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %32 = fsub float %29, %margin ; [#uses=1]
- store float %32, float* %31, align 4
- %33 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fsub float %34, %margin ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fadd float %37, %margin ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fadd float %40, %margin ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %margin ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = tail call fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %leaf) ; [#uses=2]
- %46 = icmp eq %struct.btDbvtNode* %45, null ; [#uses=1]
- br i1 %46, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit, label %bb.i5
-
-bb.i5: ; preds = %bb1
- %47 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- %48 = load i32* %47, align 4 ; [#uses=2]
- %49 = icmp sgt i32 %48, -1 ; [#uses=1]
- br i1 %49, label %bb3.i7, label %bb5.i
-
-bb2.i6: ; preds = %bb4.i8
- %50 = add nsw i32 %51, 1 ; [#uses=1]
- br label %bb3.i7
-
-bb3.i7: ; preds = %bb2.i6, %bb.i5
- %root.0.i = phi %struct.btDbvtNode* [ %54, %bb2.i6 ], [ %45, %bb.i5 ] ; [#uses=3]
- %51 = phi i32 [ %50, %bb2.i6 ], [ 0, %bb.i5 ] ; [#uses=2]
- %52 = icmp sgt i32 %48, %51 ; [#uses=1]
- br i1 %52, label %bb4.i8, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit
-
-bb4.i8: ; preds = %bb3.i7
- %53 = getelementptr inbounds %struct.btDbvtNode* %root.0.i, i32 0, i32 1 ; [#uses=1]
- %54 = load %struct.btDbvtNode** %53, align 4 ; [#uses=2]
- %55 = icmp eq %struct.btDbvtNode* %54, null ; [#uses=1]
- br i1 %55, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit, label %bb2.i6
-
-bb5.i: ; preds = %bb.i5
- %56 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %57 = load %struct.btDbvtNode** %56, align 4 ; [#uses=1]
- br label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit
-
-_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit: ; preds = %bb5.i, %bb4.i8, %bb3.i7, %bb1
- %root.1.i = phi %struct.btDbvtNode* [ %57, %bb5.i ], [ null, %bb1 ], [ %root.0.i, %bb4.i8 ], [ %root.0.i, %bb3.i7 ] ; [#uses=1]
- %58 = load float* %2, align 4 ; [#uses=1]
- store float %58, float* %0, align 4
- %59 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %31, align 4 ; [#uses=1]
- store float %60, float* %59, align 4
- %61 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %33, align 4 ; [#uses=1]
- store float %62, float* %61, align 4
- %63 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %64 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %36, align 4 ; [#uses=1]
- store float %67, float* %66, align 4
- %68 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %39, align 4 ; [#uses=1]
- store float %69, float* %68, align 4
- %70 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = load float* %42, align 4 ; [#uses=1]
- store float %71, float* %70, align 4
- %72 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 4
- tail call fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* %this, %struct.btDbvtNode* %root.1.i, %struct.btDbvtNode* %leaf)
- ret i8 1
-
-bb2: ; preds = %_ZNK12btDbvtAabbMm7ContainERKS_.exit
- ret i8 0
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMmRK9btVector3(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %leaf, %struct.GIM_AABB* nocapture %volume, %struct.btQuadWord* nocapture %velocity) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fcmp ugt float %1, %3 ; [#uses=1]
- br i1 %4, label %bb1, label %bb.i
-
-bb.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %bb1, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %10 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fcmp ugt float %11, %13 ; [#uses=1]
- br i1 %14, label %bb1, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %15 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp ult float %16, %18 ; [#uses=1]
- br i1 %19, label %bb1, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %20 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ult float %21, %23 ; [#uses=1]
- br i1 %24, label %bb1, label %_ZNK12btDbvtAabbMm7ContainERKS_.exit
-
-_ZNK12btDbvtAabbMm7ContainERKS_.exit: ; preds = %bb3.i
- %25 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %26, %28 ; [#uses=1]
- br i1 %phitmp, label %bb1, label %bb2
-
-bb1: ; preds = %_ZNK12btDbvtAabbMm7ContainERKS_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %entry
- %29 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=3]
- %31 = fcmp ogt float %30, 0.000000e+00 ; [#uses=1]
- br i1 %31, label %bb.i10, label %bb1.i11
-
-bb.i10: ; preds = %bb1
- %32 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fadd float %33, %30 ; [#uses=1]
- store float %34, float* %32, align 4
- br label %bb2.i12
-
-bb1.i11: ; preds = %bb1
- %35 = fadd float %3, %30 ; [#uses=1]
- store float %35, float* %2, align 4
- br label %bb2.i12
-
-bb2.i12: ; preds = %bb1.i11, %bb.i10
- %36 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=3]
- %38 = fcmp ogt float %37, 0.000000e+00 ; [#uses=1]
- br i1 %38, label %bb4.i13, label %bb5.i14
-
-bb4.i13: ; preds = %bb2.i12
- %39 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fadd float %40, %37 ; [#uses=1]
- store float %41, float* %39, align 4
- br label %bb6.i15
-
-bb5.i14: ; preds = %bb2.i12
- %42 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %37 ; [#uses=1]
- store float %44, float* %42, align 4
- br label %bb6.i15
-
-bb6.i15: ; preds = %bb5.i14, %bb4.i13
- %45 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fcmp ogt float %46, 0.000000e+00 ; [#uses=1]
- br i1 %47, label %bb8.i, label %bb9.i
-
-bb8.i: ; preds = %bb6.i15
- %48 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %49, %46 ; [#uses=1]
- store float %50, float* %48, align 4
- br label %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
-
-bb9.i: ; preds = %bb6.i15
- %51 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fadd float %52, %46 ; [#uses=1]
- store float %53, float* %51, align 4
- br label %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
-
-_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit: ; preds = %bb9.i, %bb8.i
- %54 = tail call fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %leaf) ; [#uses=2]
- %55 = icmp eq %struct.btDbvtNode* %54, null ; [#uses=1]
- br i1 %55, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit, label %bb.i5
-
-bb.i5: ; preds = %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
- %56 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- %57 = load i32* %56, align 4 ; [#uses=2]
- %58 = icmp sgt i32 %57, -1 ; [#uses=1]
- br i1 %58, label %bb3.i7, label %bb5.i
-
-bb2.i6: ; preds = %bb4.i8
- %59 = add nsw i32 %60, 1 ; [#uses=1]
- br label %bb3.i7
-
-bb3.i7: ; preds = %bb2.i6, %bb.i5
- %root.0.i = phi %struct.btDbvtNode* [ %63, %bb2.i6 ], [ %54, %bb.i5 ] ; [#uses=3]
- %60 = phi i32 [ %59, %bb2.i6 ], [ 0, %bb.i5 ] ; [#uses=2]
- %61 = icmp sgt i32 %57, %60 ; [#uses=1]
- br i1 %61, label %bb4.i8, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit
-
-bb4.i8: ; preds = %bb3.i7
- %62 = getelementptr inbounds %struct.btDbvtNode* %root.0.i, i32 0, i32 1 ; [#uses=1]
- %63 = load %struct.btDbvtNode** %62, align 4 ; [#uses=2]
- %64 = icmp eq %struct.btDbvtNode* %63, null ; [#uses=1]
- br i1 %64, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit, label %bb2.i6
-
-bb5.i: ; preds = %bb.i5
- %65 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %66 = load %struct.btDbvtNode** %65, align 4 ; [#uses=1]
- br label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit
-
-_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit: ; preds = %bb5.i, %bb4.i8, %bb3.i7, %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
- %root.1.i = phi %struct.btDbvtNode* [ %66, %bb5.i ], [ null, %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit ], [ %root.0.i, %bb4.i8 ], [ %root.0.i, %bb3.i7 ] ; [#uses=1]
- %67 = load float* %2, align 4 ; [#uses=1]
- store float %67, float* %0, align 4
- %68 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %69 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %72 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %75 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %84 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %87 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- store float %88, float* %86, align 4
- tail call fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* %this, %struct.btDbvtNode* %root.1.i, %struct.btDbvtNode* %leaf)
- ret i8 1
-
-bb2: ; preds = %_ZNK12btDbvtAabbMm7ContainERKS_.exit
- ret i8 0
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMmRK9btVector3f(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %leaf, %struct.GIM_AABB* %volume, %struct.btQuadWord* nocapture %velocity, float %margin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fcmp ugt float %1, %3 ; [#uses=1]
- br i1 %4, label %entry.bb1_crit_edge, label %bb.i
-
-entry.bb1_crit_edge: ; preds = %entry
- %.phi.trans.insert = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb1
-
-bb.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=6]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %bb1, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %10 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fcmp ugt float %11, %13 ; [#uses=1]
- br i1 %14, label %bb1, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %15 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp ult float %16, %18 ; [#uses=1]
- br i1 %19, label %bb1, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %20 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ult float %21, %23 ; [#uses=1]
- br i1 %24, label %bb1, label %_ZNK12btDbvtAabbMm7ContainERKS_.exit
-
-_ZNK12btDbvtAabbMm7ContainERKS_.exit: ; preds = %bb3.i
- %25 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %26, %28 ; [#uses=1]
- br i1 %phitmp, label %bb1, label %bb2
-
-bb1: ; preds = %_ZNK12btDbvtAabbMm7ContainERKS_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %entry.bb1_crit_edge
- %29 = phi float [ %.pre, %entry.bb1_crit_edge ], [ %8, %_ZNK12btDbvtAabbMm7ContainERKS_.exit ], [ %8, %bb.i ], [ %8, %bb1.i ], [ %8, %bb2.i ], [ %8, %bb3.i ] ; [#uses=1]
- %30 = fsub float %3, %margin ; [#uses=2]
- store float %30, float* %2, align 4
- %31 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %32 = fsub float %29, %margin ; [#uses=2]
- store float %32, float* %31, align 4
- %33 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fsub float %34, %margin ; [#uses=2]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fadd float %37, %margin ; [#uses=2]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fadd float %40, %margin ; [#uses=2]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %margin ; [#uses=2]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fcmp ogt float %46, 0.000000e+00 ; [#uses=1]
- br i1 %47, label %bb.i10, label %bb1.i11
-
-bb.i10: ; preds = %bb1
- %48 = fadd float %38, %46 ; [#uses=1]
- store float %48, float* %36, align 4
- br label %bb2.i12
-
-bb1.i11: ; preds = %bb1
- %49 = fadd float %30, %46 ; [#uses=1]
- store float %49, float* %2, align 4
- br label %bb2.i12
-
-bb2.i12: ; preds = %bb1.i11, %bb.i10
- %50 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = fcmp ogt float %51, 0.000000e+00 ; [#uses=1]
- br i1 %52, label %bb4.i13, label %bb5.i14
-
-bb4.i13: ; preds = %bb2.i12
- %53 = fadd float %41, %51 ; [#uses=1]
- store float %53, float* %39, align 4
- br label %bb6.i15
-
-bb5.i14: ; preds = %bb2.i12
- %54 = fadd float %32, %51 ; [#uses=1]
- store float %54, float* %31, align 4
- br label %bb6.i15
-
-bb6.i15: ; preds = %bb5.i14, %bb4.i13
- %55 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=3]
- %57 = fcmp ogt float %56, 0.000000e+00 ; [#uses=1]
- br i1 %57, label %bb8.i, label %bb9.i
-
-bb8.i: ; preds = %bb6.i15
- %58 = fadd float %44, %56 ; [#uses=1]
- store float %58, float* %42, align 4
- br label %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
-
-bb9.i: ; preds = %bb6.i15
- %59 = fadd float %35, %56 ; [#uses=1]
- store float %59, float* %33, align 4
- br label %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
-
-_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit: ; preds = %bb9.i, %bb8.i
- %60 = tail call fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %leaf) ; [#uses=2]
- %61 = icmp eq %struct.btDbvtNode* %60, null ; [#uses=1]
- br i1 %61, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit, label %bb.i5
-
-bb.i5: ; preds = %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
- %62 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- %63 = load i32* %62, align 4 ; [#uses=2]
- %64 = icmp sgt i32 %63, -1 ; [#uses=1]
- br i1 %64, label %bb3.i7, label %bb5.i
-
-bb2.i6: ; preds = %bb4.i8
- %65 = add nsw i32 %66, 1 ; [#uses=1]
- br label %bb3.i7
-
-bb3.i7: ; preds = %bb2.i6, %bb.i5
- %root.0.i = phi %struct.btDbvtNode* [ %69, %bb2.i6 ], [ %60, %bb.i5 ] ; [#uses=3]
- %66 = phi i32 [ %65, %bb2.i6 ], [ 0, %bb.i5 ] ; [#uses=2]
- %67 = icmp sgt i32 %63, %66 ; [#uses=1]
- br i1 %67, label %bb4.i8, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit
-
-bb4.i8: ; preds = %bb3.i7
- %68 = getelementptr inbounds %struct.btDbvtNode* %root.0.i, i32 0, i32 1 ; [#uses=1]
- %69 = load %struct.btDbvtNode** %68, align 4 ; [#uses=2]
- %70 = icmp eq %struct.btDbvtNode* %69, null ; [#uses=1]
- br i1 %70, label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit, label %bb2.i6
-
-bb5.i: ; preds = %bb.i5
- %71 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %72 = load %struct.btDbvtNode** %71, align 4 ; [#uses=1]
- br label %_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit
-
-_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm.exit: ; preds = %bb5.i, %bb4.i8, %bb3.i7, %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit
- %root.1.i = phi %struct.btDbvtNode* [ %72, %bb5.i ], [ null, %_ZN12btDbvtAabbMm12SignedExpandERK9btVector3.exit ], [ %root.0.i, %bb4.i8 ], [ %root.0.i, %bb3.i7 ] ; [#uses=1]
- %73 = load float* %2, align 4 ; [#uses=1]
- store float %73, float* %0, align 4
- %74 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %31, align 4 ; [#uses=1]
- store float %75, float* %74, align 4
- %76 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %77 = load float* %33, align 4 ; [#uses=1]
- store float %77, float* %76, align 4
- %78 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %79 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 4
- %81 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %36, align 4 ; [#uses=1]
- store float %82, float* %81, align 4
- %83 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %39, align 4 ; [#uses=1]
- store float %84, float* %83, align 4
- %85 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %86 = load float* %42, align 4 ; [#uses=1]
- store float %86, float* %85, align 4
- %87 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %88 = getelementptr inbounds %struct.GIM_AABB* %volume, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- tail call fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* %this, %struct.btDbvtNode* %root.1.i, %struct.btDbvtNode* %leaf)
- ret i8 1
-
-bb2: ; preds = %_ZNK12btDbvtAabbMm7ContainERKS_.exit
- ret i8 0
-}
-
-; [#uses=0]
-define void @_ZN6btDbvt6updateEP10btDbvtNodei(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %leaf, i32 %lookahead) align 2 {
-entry:
- %0 = tail call fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %leaf) ; [#uses=2]
- %1 = icmp eq %struct.btDbvtNode* %0, null ; [#uses=1]
- br i1 %1, label %bb6, label %bb
-
-bb: ; preds = %entry
- %2 = icmp sgt i32 %lookahead, -1 ; [#uses=1]
- br i1 %2, label %bb3, label %bb5
-
-bb2: ; preds = %bb4
- %3 = add nsw i32 %4, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb
- %root.0 = phi %struct.btDbvtNode* [ %7, %bb2 ], [ %0, %bb ] ; [#uses=3]
- %4 = phi i32 [ %3, %bb2 ], [ 0, %bb ] ; [#uses=2]
- %5 = icmp slt i32 %4, %lookahead ; [#uses=1]
- br i1 %5, label %bb4, label %bb6
-
-bb4: ; preds = %bb3
- %6 = getelementptr inbounds %struct.btDbvtNode* %root.0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btDbvtNode** %6, align 4 ; [#uses=2]
- %8 = icmp eq %struct.btDbvtNode* %7, null ; [#uses=1]
- br i1 %8, label %bb6, label %bb2
-
-bb5: ; preds = %bb
- %9 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %10 = load %struct.btDbvtNode** %9, align 4 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4, %bb3, %entry
- %root.1 = phi %struct.btDbvtNode* [ %10, %bb5 ], [ null, %entry ], [ %root.0, %bb3 ], [ %root.0, %bb4 ] ; [#uses=1]
- tail call fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* %this, %struct.btDbvtNode* %root.1, %struct.btDbvtNode* %leaf)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN6btDbvt19optimizeIncrementalEi(%struct.btDbvt* nocapture %this, i32 %passes) align 2 {
-entry:
- %0 = icmp slt i32 %passes, 0 ; [#uses=1]
- br i1 %0, label %bb, label %bb1
-
-bb: ; preds = %entry
- %1 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %passes_addr.0 = phi i32 [ %2, %bb ], [ %passes, %entry ] ; [#uses=2]
- %3 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=4]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=2]
- %5 = icmp ne %struct.btDbvtNode* %4, null ; [#uses=1]
- %6 = icmp sgt i32 %passes_addr.0, 0 ; [#uses=1]
- %7 = and i1 %5, %6 ; [#uses=1]
- br i1 %7, label %bb4.preheader, label %return
-
-bb4.preheader: ; preds = %bb1
- %8 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 4 ; [#uses=3]
- br label %bb4
-
-bb4: ; preds = %_ZN6btDbvt6updateEP10btDbvtNodei.exit.bb4_crit_edge, %bb4.preheader
- %node.013 = phi %struct.btDbvtNode* [ %4, %bb4.preheader ], [ %node.013.pre, %_ZN6btDbvt6updateEP10btDbvtNodei.exit.bb4_crit_edge ] ; [#uses=3]
- %indvar = phi i32 [ 1, %bb4.preheader ], [ %phitmp, %_ZN6btDbvt6updateEP10btDbvtNodei.exit.bb4_crit_edge ] ; [#uses=2]
- %9 = getelementptr inbounds %struct.btDbvtNode* %node.013, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %10 = load %struct.btDbvtNode** %9, align 4 ; [#uses=1]
- %toBoolnot.i14 = icmp eq %struct.btDbvtNode* %10, null ; [#uses=1]
- br i1 %toBoolnot.i14, label %bb8, label %bb5
-
-bb5: ; preds = %_ZL4sortP10btDbvtNodeRS0_.exit, %bb4
- %node.016 = phi %struct.btDbvtNode* [ %node.0, %_ZL4sortP10btDbvtNodeRS0_.exit ], [ %node.013, %bb4 ] ; [#uses=20]
- %bit.015 = phi i32 [ %78, %_ZL4sortP10btDbvtNodeRS0_.exit ], [ 0, %bb4 ] ; [#uses=2]
- %11 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 1 ; [#uses=2]
- %12 = load %struct.btDbvtNode** %11, align 4 ; [#uses=18]
- %13 = icmp ugt %struct.btDbvtNode* %12, %node.016 ; [#uses=1]
- br i1 %13, label %bb.i, label %_ZL4sortP10btDbvtNodeRS0_.exit
-
-bb.i: ; preds = %bb5
- %14 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %15 = load %struct.btDbvtNode** %14, align 4 ; [#uses=1]
- %16 = icmp eq %struct.btDbvtNode* %15, %node.016 ; [#uses=1]
- %17 = zext i1 %16 to i32 ; [#uses=2]
- %18 = xor i32 %17, 1 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 2, i32 0, i32 %18 ; [#uses=1]
- %20 = load %struct.btDbvtNode** %19, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 1 ; [#uses=2]
- %22 = load %struct.btDbvtNode** %21, align 4 ; [#uses=4]
- %23 = icmp eq %struct.btDbvtNode* %22, null ; [#uses=1]
- br i1 %23, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %24 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %25 = load %struct.btDbvtNode** %24, align 4 ; [#uses=1]
- %26 = icmp eq %struct.btDbvtNode* %25, %12 ; [#uses=1]
- %27 = zext i1 %26 to i32 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btDbvtNode* %22, i32 0, i32 2, i32 0, i32 %27 ; [#uses=1]
- store %struct.btDbvtNode* %node.016, %struct.btDbvtNode** %28, align 4
- br label %bb3.i
-
-bb2.i: ; preds = %bb.i
- store %struct.btDbvtNode* %node.016, %struct.btDbvtNode** %3, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb1.i
- %29 = getelementptr inbounds %struct.btDbvtNode* %20, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.016, %struct.btDbvtNode** %29, align 4
- store %struct.btDbvtNode* %node.016, %struct.btDbvtNode** %21, align 4
- store %struct.btDbvtNode* %22, %struct.btDbvtNode** %11, align 4
- %30 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %31 = load %struct.btDbvtNode** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %31, %struct.btDbvtNode** %32, align 4
- %33 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %34 = load %struct.btDbvtNode** %33, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %34, %struct.btDbvtNode** %14, align 4
- %35 = load %struct.btDbvtNode** %30, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %12, %struct.btDbvtNode** %36, align 4
- %37 = load %struct.btDbvtNode** %33, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btDbvtNode* %37, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %12, %struct.btDbvtNode** %38, align 4
- %39 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 2, i32 0, i32 %17 ; [#uses=1]
- store %struct.btDbvtNode* %12, %struct.btDbvtNode** %39, align 4
- %40 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 2, i32 0, i32 %18 ; [#uses=1]
- store %struct.btDbvtNode* %20, %struct.btDbvtNode** %40, align 4
- %41 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btDbvtNode* %12, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %41, align 4
- %59 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %43, align 4
- %61 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %45, align 4
- %63 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %47, align 4
- %65 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %49, align 4
- %67 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %51, align 4
- %69 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %53, align 4
- %71 = getelementptr inbounds %struct.btDbvtNode* %node.016, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %55, align 4
- store float %42, float* %57, align 4
- store float %44, float* %59, align 4
- store float %46, float* %61, align 4
- store float %48, float* %63, align 4
- store float %50, float* %65, align 4
- store float %52, float* %67, align 4
- store float %54, float* %69, align 4
- store float %56, float* %71, align 4
- br label %_ZL4sortP10btDbvtNodeRS0_.exit
-
-_ZL4sortP10btDbvtNodeRS0_.exit: ; preds = %bb3.i, %bb5
- %73 = phi %struct.btDbvtNode* [ %12, %bb3.i ], [ %node.016, %bb5 ] ; [#uses=1]
- %74 = load i32* %8, align 4 ; [#uses=1]
- %75 = lshr i32 %74, %bit.015 ; [#uses=1]
- %76 = add i32 %bit.015, 1 ; [#uses=1]
- %77 = and i32 %75, 1 ; [#uses=1]
- %78 = and i32 %76, 31 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btDbvtNode* %73, i32 0, i32 2, i32 0, i32 %77 ; [#uses=1]
- %node.0 = load %struct.btDbvtNode** %79, align 4 ; [#uses=3]
- %80 = getelementptr inbounds %struct.btDbvtNode* %node.0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %81 = load %struct.btDbvtNode** %80, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %81, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb8, label %bb5
-
-bb8: ; preds = %_ZL4sortP10btDbvtNodeRS0_.exit, %bb4
- %node.0.lcssa = phi %struct.btDbvtNode* [ %node.013, %bb4 ], [ %node.0, %_ZL4sortP10btDbvtNodeRS0_.exit ] ; [#uses=2]
- %82 = tail call fastcc %struct.btDbvtNode* @_ZL10removeleafP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %node.0.lcssa) ; [#uses=1]
- %83 = icmp eq %struct.btDbvtNode* %82, null ; [#uses=1]
- br i1 %83, label %_ZN6btDbvt6updateEP10btDbvtNodei.exit, label %bb.i11
-
-bb.i11: ; preds = %bb8
- %84 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- br label %_ZN6btDbvt6updateEP10btDbvtNodei.exit
-
-_ZN6btDbvt6updateEP10btDbvtNodei.exit: ; preds = %bb.i11, %bb8
- %root.1.i = phi %struct.btDbvtNode* [ %84, %bb.i11 ], [ null, %bb8 ] ; [#uses=1]
- tail call fastcc void @_ZL10insertleafP6btDbvtP10btDbvtNodeS2_(%struct.btDbvt* %this, %struct.btDbvtNode* %root.1.i, %struct.btDbvtNode* %node.0.lcssa)
- %85 = load i32* %8, align 4 ; [#uses=1]
- %86 = add i32 %85, 1 ; [#uses=1]
- store i32 %86, i32* %8, align 4
- %exitcond = icmp eq i32 %indvar, %passes_addr.0 ; [#uses=1]
- br i1 %exitcond, label %return, label %_ZN6btDbvt6updateEP10btDbvtNodei.exit.bb4_crit_edge
-
-_ZN6btDbvt6updateEP10btDbvtNodei.exit.bb4_crit_edge: ; preds = %_ZN6btDbvt6updateEP10btDbvtNodei.exit
- %node.013.pre = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- %phitmp = add i32 %indvar, 1 ; [#uses=1]
- br label %bb4
-
-return: ; preds = %_ZN6btDbvt6updateEP10btDbvtNodei.exit, %bb1
- ret void
-}
-
-; [#uses=6]
-define internal fastcc void @_ZL17recursedeletenodeP6btDbvtP10btDbvtNode(%struct.btDbvt* %pdbvt, %struct.btDbvtNode* %node) {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %node, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %bb3, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDbvtNode* %node, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- tail call fastcc void @_ZL17recursedeletenodeP6btDbvtP10btDbvtNode(%struct.btDbvt* %pdbvt, %struct.btDbvtNode* %4)
- %5 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- tail call fastcc void @_ZL17recursedeletenodeP6btDbvtP10btDbvtNode(%struct.btDbvt* %pdbvt, %struct.btDbvtNode* %5)
- br label %bb3
-
-bb3: ; preds = %bb, %entry
- %6 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 0 ; [#uses=2]
- %7 = load %struct.btDbvtNode** %6, align 4 ; [#uses=1]
- %8 = icmp eq %struct.btDbvtNode* %7, %node ; [#uses=1]
- br i1 %8, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %6, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %9 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 1 ; [#uses=2]
- %10 = load %struct.btDbvtNode** %9, align 4 ; [#uses=1]
- %11 = bitcast %struct.btDbvtNode* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- store %struct.btDbvtNode* %node, %struct.btDbvtNode** %9, align 4
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP10btDbvtNodeE9push_backERKS1_(%"struct.btAlignedObjectArray<btDbvtNode*>"* nocapture %this, %struct.btDbvtNode** nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.315.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.315.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.315.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.315.0.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btDbvtNode** ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btDbvtNode** [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr %struct.btDbvtNode** %12, i32 %indvar.i.i ; [#uses=2]
- %15 = icmp eq %struct.btDbvtNode** %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %16 = load %struct.btDbvtNode*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btDbvtNode** %16, i32 %indvar.i.i ; [#uses=1]
- %17 = load %struct.btDbvtNode** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %17, %struct.btDbvtNode** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.btDbvtNode*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btDbvtNode** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %struct.btDbvtNode** %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btDbvtNode** %12, %struct.btDbvtNode*** %18, align 4
- store i32 %iftmp.315.0.i, i32* %2, align 4
- %.pre5 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, %bb, %entry
- %25 = phi i32 [ %.pre5, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=2]
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %this, i32 0, i32 3 ; [#uses=1]
- %27 = load %struct.btDbvtNode*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btDbvtNode** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btDbvtNode** %28, null ; [#uses=1]
- br i1 %29, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %30 = load %struct.btDbvtNode** %_Val, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %30, %struct.btDbvtNode** %28, align 4
- %.pre6 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %31 = phi i32 [ %25, %bb1 ], [ %.pre6, %bb2 ] ; [#uses=1]
- %32 = add nsw i32 %31, 1 ; [#uses=1]
- store i32 %32, i32* %0, align 4
- ret void
-}
-
-; [#uses=4]
-define internal fastcc void @_ZL11fetchleavesP6btDbvtP10btDbvtNodeR20btAlignedObjectArrayIS2_Ei(%struct.btDbvt* %pdbvt, %struct.btDbvtNode* %root, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 %depth) {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %root, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- %notlhs = icmp ne i32 %depth, 0 ; [#uses=1]
- %notrhs = icmp ne %struct.btDbvtNode* %1, null ; [#uses=1]
- %not.or.cond = and i1 %notrhs, %notlhs ; [#uses=1]
- br i1 %not.or.cond, label %bb8, label %bb9
-
-bb8: ; preds = %entry
- %2 = add nsw i32 %depth, -1 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btDbvtNode* %root, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- tail call fastcc void @_ZL11fetchleavesP6btDbvtP10btDbvtNodeR20btAlignedObjectArrayIS2_Ei(%struct.btDbvt* %pdbvt, %struct.btDbvtNode* %4, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 %2)
- %5 = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- tail call fastcc void @_ZL11fetchleavesP6btDbvtP10btDbvtNodeR20btAlignedObjectArrayIS2_Ei(%struct.btDbvt* %pdbvt, %struct.btDbvtNode* %5, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 %2)
- %6 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 1 ; [#uses=2]
- %7 = load %struct.btDbvtNode** %6, align 4 ; [#uses=1]
- %8 = bitcast %struct.btDbvtNode* %7 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %8)
- store %struct.btDbvtNode* %root, %struct.btDbvtNode** %6, align 4
- ret void
-
-bb9: ; preds = %entry
- %9 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 1 ; [#uses=5]
- %10 = load i32* %9, align 4 ; [#uses=6]
- %11 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 2 ; [#uses=2]
- %12 = load i32* %11, align 4 ; [#uses=2]
- %13 = icmp eq i32 %12, %10 ; [#uses=1]
- br i1 %13, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb9
- %14 = icmp eq i32 %10, 0 ; [#uses=1]
- %15 = shl i32 %10, 1 ; [#uses=1]
- %iftmp.315.0.i.i = select i1 %14, i32 1, i32 %15 ; [#uses=4]
- %16 = icmp slt i32 %12, %iftmp.315.0.i.i ; [#uses=1]
- br i1 %16, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %17 = icmp eq i32 %iftmp.315.0.i.i, 0 ; [#uses=1]
- br i1 %17, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %18 = shl i32 %iftmp.315.0.i.i, 2 ; [#uses=1]
- %19 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %18, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %19 to %struct.btDbvtNode** ; [#uses=1]
- %.pre.i = load i32* %9, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %20 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %10, %bb.i.i ] ; [#uses=2]
- %21 = phi %struct.btDbvtNode** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %22 = icmp sgt i32 %20, 0 ; [#uses=1]
- br i1 %22, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btDbvtNode** %21, i32 %indvar.i.i.i ; [#uses=2]
- %24 = icmp eq %struct.btDbvtNode** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %24, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %25 = load %struct.btDbvtNode*** %23, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btDbvtNode** %25, i32 %indvar.i.i.i ; [#uses=1]
- %26 = load %struct.btDbvtNode** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %26, %struct.btDbvtNode** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %20 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=3]
- %28 = load %struct.btDbvtNode*** %27, align 4 ; [#uses=2]
- %29 = icmp eq %struct.btDbvtNode** %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i.i
- %30 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 4 ; [#uses=1]
- %31 = load i8* %30, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %32 = bitcast %struct.btDbvtNode** %28 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %32)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %27, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i.i
- %33 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %33, align 4
- store %struct.btDbvtNode** %21, %struct.btDbvtNode*** %27, align 4
- store i32 %iftmp.315.0.i.i, i32* %11, align 4
- %.pre5.i = load i32* %9, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i.i, %bb.i, %bb9
- %34 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i.i ], [ %10, %bb9 ], [ %10, %bb.i ] ; [#uses=2]
- %35 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=1]
- %36 = load %struct.btDbvtNode*** %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btDbvtNode** %36, i32 %34 ; [#uses=2]
- %38 = icmp eq %struct.btDbvtNode** %37, null ; [#uses=1]
- br i1 %38, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btDbvtNode* %root, %struct.btDbvtNode** %37, align 4
- %.pre6.i = load i32* %9, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %39 = phi i32 [ %34, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %40 = add nsw i32 %39, 1 ; [#uses=1]
- store i32 %40, i32* %9, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN6btDbvt5clearEv(%struct.btDbvt* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- tail call fastcc void @_ZL17recursedeletenodeP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %1)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %3 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 1 ; [#uses=2]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDbvtNode* %4 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %5)
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %3, align 4
- %6 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %8 = load %"struct.btDbvt::sStkCLN"** %7, align 4 ; [#uses=2]
- %9 = icmp eq %"struct.btDbvt::sStkCLN"* %8, null ; [#uses=1]
- br i1 %9, label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %bb1
- %10 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %11 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %12 = bitcast %"struct.btDbvt::sStkCLN"* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- br label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE5clearEv.exit
-
-_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE5clearEv.exit: ; preds = %bb2.i.i, %bb1
- %13 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- %14 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %16, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK6btDbvt5cloneERS_PNS_6ICloneE(%struct.btDbvt* nocapture %this, %struct.btDbvt* %dest, %struct.btActionInterface* %iclone) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 0 ; [#uses=2]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- tail call fastcc void @_ZL17recursedeletenodeP6btDbvtP10btDbvtNode(%struct.btDbvt* %dest, %struct.btDbvtNode* %1)
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %entry
- %3 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 1 ; [#uses=4]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDbvtNode* %4 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %5)
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %3, align 4
- %6 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 5, i32 3 ; [#uses=3]
- %8 = load %"struct.btDbvt::sStkCLN"** %7, align 4 ; [#uses=2]
- %9 = icmp eq %"struct.btDbvt::sStkCLN"* %8, null ; [#uses=1]
- br i1 %9, label %_ZN6btDbvt5clearEv.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb1.i
- %10 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 5, i32 4 ; [#uses=1]
- %11 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %12 = bitcast %"struct.btDbvt::sStkCLN"* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- br label %_ZN6btDbvt5clearEv.exit
-
-_ZN6btDbvt5clearEv.exit: ; preds = %bb2.i.i.i, %bb1.i
- %13 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- %14 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btDbvt* %dest, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=2]
- %18 = load %struct.btDbvtNode** %17, align 4 ; [#uses=2]
- %19 = icmp eq %struct.btDbvtNode* %18, null ; [#uses=1]
- br i1 %19, label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEED1Ev.exit51, label %bb
-
-bb: ; preds = %_ZN6btDbvt5clearEv.exit
- %20 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=3]
- %22 = icmp sgt i32 %21, 0 ; [#uses=1]
- br i1 %22, label %bb.i2.i, label %bb.i2.i.i
-
-bb.i2.i: ; preds = %bb
- %23 = shl i32 %21, 3 ; [#uses=1]
- %24 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %23, i32 16)
- to label %invcont unwind label %lpad.thread ; [#uses=1]
-
-invcont: ; preds = %bb.i2.i
- %25 = load %struct.btDbvtNode** %17, align 4 ; [#uses=1]
- br label %bb1.i36
-
-bb.i2.i.i: ; preds = %bb
- %26 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %bb1.i36 unwind label %lpad.thread ; [#uses=1]
-
-bb1.i36: ; preds = %bb.i2.i.i, %invcont
- %27 = phi %struct.btDbvtNode* [ %25, %invcont ], [ %18, %bb.i2.i.i ] ; [#uses=1]
- %stack.2.4 = phi i32 [ %21, %invcont ], [ 1, %bb.i2.i.i ] ; [#uses=1]
- %stack.3.5.in = phi i8* [ %24, %invcont ], [ %26, %bb.i2.i.i ] ; [#uses=4]
- %stack.3.5 = bitcast i8* %stack.3.5.in to %"struct.btDbvt::sStkCLN"* ; [#uses=1]
- %28 = icmp eq i8* %stack.3.5.in, null ; [#uses=1]
- br i1 %28, label %bb2.preheader, label %bb2.i
-
-bb2.i: ; preds = %bb1.i36
- %29 = bitcast i8* %stack.3.5.in to %struct.btDbvtNode** ; [#uses=1]
- store %struct.btDbvtNode* %27, %struct.btDbvtNode** %29, align 4
- %30 = getelementptr inbounds i8* %stack.3.5.in, i32 4 ; [#uses=1]
- %31 = bitcast i8* %30 to %struct.btDbvtNode** ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %31, align 4
- br label %bb2.preheader
-
-bb2.preheader: ; preds = %bb2.i, %bb1.i36
- %32 = getelementptr inbounds %struct.btActionInterface* %iclone, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb12, %bb2.preheader
- %stack.1.1 = phi i32 [ %stack.1.0, %bb12 ], [ 1, %bb2.preheader ] ; [#uses=10]
- %stack.2.2 = phi i32 [ %stack.2.1, %bb12 ], [ %stack.2.4, %bb2.preheader ] ; [#uses=5]
- %stack.3.2 = phi %"struct.btDbvt::sStkCLN"* [ %stack.3.1, %bb12 ], [ %stack.3.5, %bb2.preheader ] ; [#uses=13]
- %33 = add nsw i32 %stack.1.1, -1 ; [#uses=12]
- %34 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.2, i32 %33, i32 0 ; [#uses=1]
- %35 = load %struct.btDbvtNode** %34, align 4 ; [#uses=11]
- %36 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.2, i32 %33, i32 1 ; [#uses=1]
- %37 = load %struct.btDbvtNode** %36, align 4 ; [#uses=3]
- %38 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 2, i32 0 ; [#uses=1]
- %39 = bitcast [2 x %struct.btDbvtNode*]* %38 to i8** ; [#uses=1]
- %40 = load i8** %39, align 4 ; [#uses=1]
- %41 = load %struct.btDbvtNode** %3, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btDbvtNode* %41, null ; [#uses=1]
- br i1 %42, label %bb1.i.i40, label %bb.i.i39
-
-bb.i.i39: ; preds = %bb2
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %3, align 4
- br label %invcont3
-
-bb1.i.i40: ; preds = %bb2
- %43 = invoke i8* @_Z22btAlignedAllocInternalji(i32 44, i32 16)
- to label %.noexc41 unwind label %lpad ; [#uses=1]
-
-.noexc41: ; preds = %bb1.i.i40
- %44 = bitcast i8* %43 to %struct.btDbvtNode* ; [#uses=1]
- br label %invcont3
-
-invcont3: ; preds = %.noexc41, %bb.i.i39
- %node.0.i.i = phi %struct.btDbvtNode* [ %41, %bb.i.i39 ], [ %44, %.noexc41 ] ; [#uses=16]
- %45 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %37, %struct.btDbvtNode** %45, align 4
- %46 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %data.c.i.i = bitcast i8* %40 to %struct.btDbvtNode* ; [#uses=1]
- store %struct.btDbvtNode* %data.c.i.i, %struct.btDbvtNode** %46, align 4
- %47 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %47, align 4
- %48 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %51 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 4
- %54 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 4
- %57 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 4
- %63 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 4
- %69 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = icmp eq %struct.btDbvtNode* %37, null ; [#uses=1]
- br i1 %72, label %bb5, label %bb4
-
-bb4: ; preds = %invcont3
- %73 = and i32 %33, 1 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btDbvtNode* %37, i32 0, i32 2, i32 0, i32 %73 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %74, align 4
- br label %bb6
-
-bb5: ; preds = %invcont3
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %0, align 4
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %75 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %76 = load %struct.btDbvtNode** %75, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %76, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb10, label %bb7
-
-bb7: ; preds = %bb6
- %77 = getelementptr inbounds %struct.btDbvtNode* %35, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %78 = load %struct.btDbvtNode** %77, align 4 ; [#uses=1]
- %79 = icmp eq i32 %stack.2.2, %33 ; [#uses=1]
- br i1 %79, label %bb.i53, label %bb1.i78
-
-bb.i53: ; preds = %bb7
- %80 = icmp eq i32 %33, 0 ; [#uses=1]
- %81 = shl i32 %33, 1 ; [#uses=1]
- %iftmp.318.0.i.i52 = select i1 %80, i32 1, i32 %81 ; [#uses=5]
- %82 = icmp slt i32 %stack.2.2, %iftmp.318.0.i.i52 ; [#uses=1]
- br i1 %82, label %bb.i.i54, label %bb1.i78
-
-bb.i.i54: ; preds = %bb.i53
- %83 = icmp eq i32 %iftmp.318.0.i.i52, 0 ; [#uses=1]
- br i1 %83, label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i58, label %bb.i2.i.i57
-
-bb.i2.i.i57: ; preds = %bb.i.i54
- %84 = shl i32 %iftmp.318.0.i.i52, 3 ; [#uses=1]
- %85 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %84, i32 16)
- to label %.noexc81 unwind label %lpad ; [#uses=1]
-
-.noexc81: ; preds = %bb.i2.i.i57
- %phitmp.i.i55 = bitcast i8* %85 to %"struct.btDbvt::sStkCLN"* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i58
-
-_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i58: ; preds = %.noexc81, %bb.i.i54
- %86 = phi %"struct.btDbvt::sStkCLN"* [ %phitmp.i.i55, %.noexc81 ], [ null, %bb.i.i54 ] ; [#uses=5]
- %87 = icmp sgt i32 %33, 0 ; [#uses=1]
- br i1 %87, label %bb.i4.i.i62, label %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i71
-
-bb.i4.i.i62: ; preds = %bb3.i.i.i70, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i58
- %indvar.i.i.i60 = phi i32 [ %indvar.next.i.i.i68, %bb3.i.i.i70 ], [ 0, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i58 ] ; [#uses=6]
- %scevgep.i.i.i61 = getelementptr %"struct.btDbvt::sStkCLN"* %86, i32 %indvar.i.i.i60 ; [#uses=1]
- %88 = icmp eq %"struct.btDbvt::sStkCLN"* %scevgep.i.i.i61, null ; [#uses=1]
- br i1 %88, label %bb3.i.i.i70, label %bb1.i5.i.i67
-
-bb1.i5.i.i67: ; preds = %bb.i4.i.i62
- %scevgep12.i.i.i63 = getelementptr %"struct.btDbvt::sStkCLN"* %86, i32 %indvar.i.i.i60, i32 1 ; [#uses=1]
- %scevgep11.i.i.i64 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %86, i32 %indvar.i.i.i60, i32 0 ; [#uses=1]
- %scevgep89.i.i.i65 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.2, i32 %indvar.i.i.i60, i32 0 ; [#uses=1]
- %scevgep10.i.i.i66 = getelementptr %"struct.btDbvt::sStkCLN"* %stack.3.2, i32 %indvar.i.i.i60, i32 1 ; [#uses=1]
- %89 = load %struct.btDbvtNode** %scevgep89.i.i.i65, align 4 ; [#uses=1]
- %90 = load %struct.btDbvtNode** %scevgep10.i.i.i66, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %89, %struct.btDbvtNode** %scevgep11.i.i.i64, align 4
- store %struct.btDbvtNode* %90, %struct.btDbvtNode** %scevgep12.i.i.i63, align 4
- br label %bb3.i.i.i70
-
-bb3.i.i.i70: ; preds = %bb1.i5.i.i67, %bb.i4.i.i62
- %indvar.next.i.i.i68 = add i32 %indvar.i.i.i60, 1 ; [#uses=2]
- %exitcond135 = icmp eq i32 %indvar.next.i.i.i68, %33 ; [#uses=1]
- br i1 %exitcond135, label %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i71, label %bb.i4.i.i62
-
-_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i71: ; preds = %bb3.i.i.i70, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i58
- %91 = icmp eq %"struct.btDbvt::sStkCLN"* %stack.3.2, null ; [#uses=1]
- br i1 %91, label %bb1.i78, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i71
- %92 = bitcast %"struct.btDbvt::sStkCLN"* %stack.3.2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %92)
- to label %bb1.i78 unwind label %lpad.thread126
-
-bb1.i78: ; preds = %bb1.i.i.i74, %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i71, %bb.i53, %bb7
- %stack.2.3 = phi i32 [ %stack.2.2, %bb.i53 ], [ %stack.2.2, %bb7 ], [ %iftmp.318.0.i.i52, %bb1.i.i.i74 ], [ %iftmp.318.0.i.i52, %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i71 ] ; [#uses=4]
- %stack.3.4 = phi %"struct.btDbvt::sStkCLN"* [ %stack.3.2, %bb.i53 ], [ %stack.3.2, %bb7 ], [ %86, %bb1.i.i.i74 ], [ %86, %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i71 ] ; [#uses=11]
- %93 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.4, i32 %33 ; [#uses=1]
- %94 = icmp eq %"struct.btDbvt::sStkCLN"* %93, null ; [#uses=1]
- br i1 %94, label %invcont8, label %bb2.i80
-
-bb2.i80: ; preds = %bb1.i78
- %95 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.4, i32 %33, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %78, %struct.btDbvtNode** %95, align 4
- %96 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.4, i32 %33, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %96, align 4
- br label %invcont8
-
-invcont8: ; preds = %bb2.i80, %bb1.i78
- %97 = load %struct.btDbvtNode** %75, align 4 ; [#uses=1]
- %98 = icmp eq i32 %stack.2.3, %stack.1.1 ; [#uses=1]
- br i1 %98, label %bb.i85, label %bb1.i110
-
-bb.i85: ; preds = %invcont8
- %99 = icmp eq i32 %stack.1.1, 0 ; [#uses=1]
- %100 = shl i32 %stack.1.1, 1 ; [#uses=1]
- %iftmp.318.0.i.i84 = select i1 %99, i32 1, i32 %100 ; [#uses=5]
- %101 = icmp slt i32 %stack.2.3, %iftmp.318.0.i.i84 ; [#uses=1]
- br i1 %101, label %bb.i.i86, label %bb1.i110
-
-bb.i.i86: ; preds = %bb.i85
- %102 = icmp eq i32 %iftmp.318.0.i.i84, 0 ; [#uses=1]
- br i1 %102, label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i90, label %bb.i2.i.i89
-
-bb.i2.i.i89: ; preds = %bb.i.i86
- %103 = shl i32 %iftmp.318.0.i.i84, 3 ; [#uses=1]
- %104 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %103, i32 16)
- to label %.noexc113 unwind label %lpad ; [#uses=1]
-
-.noexc113: ; preds = %bb.i2.i.i89
- %phitmp.i.i87 = bitcast i8* %104 to %"struct.btDbvt::sStkCLN"* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i90
-
-_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i90: ; preds = %.noexc113, %bb.i.i86
- %105 = phi %"struct.btDbvt::sStkCLN"* [ %phitmp.i.i87, %.noexc113 ], [ null, %bb.i.i86 ] ; [#uses=5]
- %106 = icmp sgt i32 %stack.1.1, 0 ; [#uses=1]
- br i1 %106, label %bb.i4.i.i94, label %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i103
-
-bb.i4.i.i94: ; preds = %bb3.i.i.i102, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i90
- %indvar.i.i.i92 = phi i32 [ %indvar.next.i.i.i100, %bb3.i.i.i102 ], [ 0, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i90 ] ; [#uses=6]
- %scevgep.i.i.i93 = getelementptr %"struct.btDbvt::sStkCLN"* %105, i32 %indvar.i.i.i92 ; [#uses=1]
- %107 = icmp eq %"struct.btDbvt::sStkCLN"* %scevgep.i.i.i93, null ; [#uses=1]
- br i1 %107, label %bb3.i.i.i102, label %bb1.i5.i.i99
-
-bb1.i5.i.i99: ; preds = %bb.i4.i.i94
- %scevgep12.i.i.i95 = getelementptr %"struct.btDbvt::sStkCLN"* %105, i32 %indvar.i.i.i92, i32 1 ; [#uses=1]
- %scevgep11.i.i.i96 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %105, i32 %indvar.i.i.i92, i32 0 ; [#uses=1]
- %scevgep89.i.i.i97 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.4, i32 %indvar.i.i.i92, i32 0 ; [#uses=1]
- %scevgep10.i.i.i98 = getelementptr %"struct.btDbvt::sStkCLN"* %stack.3.4, i32 %indvar.i.i.i92, i32 1 ; [#uses=1]
- %108 = load %struct.btDbvtNode** %scevgep89.i.i.i97, align 4 ; [#uses=1]
- %109 = load %struct.btDbvtNode** %scevgep10.i.i.i98, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %108, %struct.btDbvtNode** %scevgep11.i.i.i96, align 4
- store %struct.btDbvtNode* %109, %struct.btDbvtNode** %scevgep12.i.i.i95, align 4
- br label %bb3.i.i.i102
-
-bb3.i.i.i102: ; preds = %bb1.i5.i.i99, %bb.i4.i.i94
- %indvar.next.i.i.i100 = add i32 %indvar.i.i.i92, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i100, %stack.1.1 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i103, label %bb.i4.i.i94
-
-_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i103: ; preds = %bb3.i.i.i102, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE8allocateEi.exit.i.i90
- %110 = icmp eq %"struct.btDbvt::sStkCLN"* %stack.3.4, null ; [#uses=1]
- br i1 %110, label %bb1.i110, label %bb1.i.i.i106
-
-bb1.i.i.i106: ; preds = %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i103
- %111 = bitcast %"struct.btDbvt::sStkCLN"* %stack.3.4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %111)
- to label %bb1.i110 unwind label %lpad.thread126
-
-bb1.i110: ; preds = %bb1.i.i.i106, %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i103, %bb.i85, %invcont8
- %stack.2.0 = phi i32 [ %stack.2.3, %bb.i85 ], [ %stack.2.3, %invcont8 ], [ %iftmp.318.0.i.i84, %bb1.i.i.i106 ], [ %iftmp.318.0.i.i84, %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i103 ] ; [#uses=1]
- %stack.3.0 = phi %"struct.btDbvt::sStkCLN"* [ %stack.3.4, %bb.i85 ], [ %stack.3.4, %invcont8 ], [ %105, %bb1.i.i.i106 ], [ %105, %_ZNK20btAlignedObjectArrayIN6btDbvt7sStkCLNEE4copyEiiPS1_.exit.i.i103 ] ; [#uses=4]
- %112 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.0, i32 %stack.1.1 ; [#uses=1]
- %113 = icmp eq %"struct.btDbvt::sStkCLN"* %112, null ; [#uses=1]
- br i1 %113, label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE9push_backERKS1_.exit115, label %bb2.i112
-
-bb2.i112: ; preds = %bb1.i110
- %114 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.0, i32 %stack.1.1, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %97, %struct.btDbvtNode** %114, align 4
- %115 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %stack.3.0, i32 %stack.1.1, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %115, align 4
- br label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE9push_backERKS1_.exit115
-
-_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE9push_backERKS1_.exit115: ; preds = %bb2.i112, %bb1.i110
- %116 = add nsw i32 %stack.1.1, 1 ; [#uses=1]
- br label %bb12
-
-bb10: ; preds = %bb6
- %117 = load i32 (...)*** %32, align 4 ; [#uses=1]
- %118 = getelementptr inbounds i32 (...)** %117, i32 2 ; [#uses=1]
- %119 = load i32 (...)** %118, align 4 ; [#uses=1]
- %120 = bitcast i32 (...)* %119 to void (%struct.btActionInterface*, %struct.btDbvtNode*)* ; [#uses=1]
- invoke void %120(%struct.btActionInterface* %iclone, %struct.btDbvtNode* %node.0.i.i)
- to label %bb12 unwind label %lpad
-
-bb12: ; preds = %bb10, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE9push_backERKS1_.exit115
- %stack.1.0 = phi i32 [ %33, %bb10 ], [ %116, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE9push_backERKS1_.exit115 ] ; [#uses=2]
- %stack.2.1 = phi i32 [ %stack.2.2, %bb10 ], [ %stack.2.0, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE9push_backERKS1_.exit115 ] ; [#uses=1]
- %stack.3.1 = phi %"struct.btDbvt::sStkCLN"* [ %stack.3.2, %bb10 ], [ %stack.3.0, %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEE9push_backERKS1_.exit115 ] ; [#uses=3]
- %121 = icmp sgt i32 %stack.1.0, 0 ; [#uses=1]
- br i1 %121, label %bb2, label %bb17
-
-invcont15: ; preds = %bb1.i.i.i44, %lpad, %lpad.thread
- %eh_ptr124 = phi i8* [ %eh_ptr122, %lpad.thread ], [ %eh_ptr, %lpad ], [ %eh_ptr130, %bb1.i.i.i44 ] ; [#uses=1]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr124)
- unreachable
-
-bb17: ; preds = %bb12
- %122 = icmp eq %"struct.btDbvt::sStkCLN"* %stack.3.1, null ; [#uses=1]
- br i1 %122, label %_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEED1Ev.exit51, label %bb2.i.i.i50
-
-bb2.i.i.i50: ; preds = %bb17
- %123 = bitcast %"struct.btDbvt::sStkCLN"* %stack.3.1 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %123)
- ret void
-
-_ZN20btAlignedObjectArrayIN6btDbvt7sStkCLNEED1Ev.exit51: ; preds = %bb17, %_ZN6btDbvt5clearEv.exit
- ret void
-
-lpad.thread: ; preds = %bb.i2.i.i, %bb.i2.i
- %eh_ptr122 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20123 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr122, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %invcont15
-
-lpad.thread126: ; preds = %bb1.i.i.i106, %bb1.i.i.i74
- %stack.3.3.ph = phi %"struct.btDbvt::sStkCLN"* [ %stack.3.4, %bb1.i.i.i106 ], [ %stack.3.2, %bb1.i.i.i74 ] ; [#uses=1]
- %eh_ptr127 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20128 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr127, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %bb1.i.i.i44
-
-lpad: ; preds = %bb10, %bb.i2.i.i89, %bb.i2.i.i57, %bb1.i.i40
- %stack.3.3 = phi %"struct.btDbvt::sStkCLN"* [ %stack.3.2, %bb10 ], [ %stack.3.4, %bb.i2.i.i89 ], [ %stack.3.2, %bb.i2.i.i57 ], [ %stack.3.2, %bb1.i.i40 ] ; [#uses=2]
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=3]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %124 = icmp eq %"struct.btDbvt::sStkCLN"* %stack.3.3, null ; [#uses=1]
- br i1 %124, label %invcont15, label %bb1.i.i.i44
-
-bb1.i.i.i44: ; preds = %lpad, %lpad.thread126
- %stack.3.3129 = phi %"struct.btDbvt::sStkCLN"* [ %stack.3.3.ph, %lpad.thread126 ], [ %stack.3.3, %lpad ] ; [#uses=1]
- %eh_ptr130 = phi i8* [ %eh_ptr127, %lpad.thread126 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- %125 = bitcast %"struct.btDbvt::sStkCLN"* %stack.3.3129 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %125)
- to label %invcont15 unwind label %lpad21
-
-lpad21: ; preds = %bb1.i.i.i44
- %eh_ptr22 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select24 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr22, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN6btDbvt16optimizeBottomUpEv(%struct.btDbvt* %this) align 2 {
-entry:
- %leaves = alloca %"struct.btAlignedObjectArray<btDbvtNode*>", align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=3]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit21, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 4 ; [#uses=6]
- store i8 1, i8* %3, align 8
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=10]
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 1 ; [#uses=3]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 2 ; [#uses=3]
- store i32 0, i32* %6, align 8
- %7 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=3]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.i2.i, label %invcont
-
-bb.i2.i: ; preds = %bb
- %10 = shl i32 %8, 2 ; [#uses=1]
- %11 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %10, i32 16)
- to label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i unwind label %lpad ; [#uses=2]
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i: ; preds = %bb.i2.i
- %phitmp.i = bitcast i8* %11 to %struct.btDbvtNode** ; [#uses=1]
- %12 = load i32* %5, align 4 ; [#uses=2]
- %13 = icmp sgt i32 %12, 0 ; [#uses=1]
- br i1 %13, label %bb.i4.i, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
-
-bb.i4.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %indvar.i.i = phi i32 [ %indvar.next.i.i, %bb3.i.i ], [ 0, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i ] ; [#uses=3]
- %tmp = shl i32 %indvar.i.i, 2 ; [#uses=1]
- %scevgep = getelementptr i8* %11, i32 %tmp ; [#uses=2]
- %14 = icmp eq i8* %scevgep, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep.i.i = bitcast i8* %scevgep to %struct.btDbvtNode** ; [#uses=1]
- %15 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btDbvtNode** %15, i32 %indvar.i.i ; [#uses=1]
- %16 = load %struct.btDbvtNode** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %16, %struct.btDbvtNode** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %12 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %17 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=2]
- %18 = icmp eq %struct.btDbvtNode** %17, null ; [#uses=1]
- br i1 %18, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- %19 = load i8* %3, align 8 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %19, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %20 = bitcast %struct.btDbvtNode** %17 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %20)
- to label %bb2.i.i unwind label %lpad
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- store i8 1, i8* %3, align 8
- store %struct.btDbvtNode** %phitmp.i, %struct.btDbvtNode*** %4, align 4
- store i32 %8, i32* %6, align 8
- %.pre = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- br label %invcont
-
-invcont: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, %bb
- %21 = phi %struct.btDbvtNode* [ %.pre, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i ], [ %1, %bb ] ; [#uses=1]
- invoke fastcc void @_ZL11fetchleavesP6btDbvtP10btDbvtNodeR20btAlignedObjectArrayIS2_Ei(%struct.btDbvt* %this, %struct.btDbvtNode* %21, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 -1)
- to label %invcont1 unwind label %lpad
-
-invcont1: ; preds = %invcont
- invoke fastcc void @_ZL8bottomupP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeE(%struct.btDbvt* %this, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %invcont1
- %22 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=3]
- %23 = load %struct.btDbvtNode** %22, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %23, %struct.btDbvtNode** %0, align 4
- %24 = icmp eq %struct.btDbvtNode** %22, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit21, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %invcont2
- %25 = load i8* %3, align 8 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %26 = bitcast %struct.btDbvtNode** %22 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %26)
- br label %bb2.i.i.i20
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- ret void
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit21: ; preds = %invcont2, %entry
- ret void
-
-invcont4: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %3, align 8
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- store i32 0, i32* %5, align 4
- store i32 0, i32* %6, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %invcont1, %invcont, %bb1.i.i, %bb.i2.i
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %27 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=2]
- %28 = icmp eq %struct.btDbvtNode** %27, null ; [#uses=1]
- br i1 %28, label %invcont4, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %29 = load i8* %3, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %29, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %30 = bitcast %struct.btDbvtNode** %27 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %30)
- to label %bb2.i.i.i unwind label %lpad9
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- br label %invcont4
-
-lpad9: ; preds = %bb1.i.i.i
- %eh_ptr10 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=11]
-define void @_ZN6btDbvtD1Ev(%struct.btDbvt* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- invoke fastcc void @_ZL17recursedeletenodeP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %1)
- to label %bb1.i unwind label %lpad
-
-bb1.i: ; preds = %bb.i, %entry
- %3 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 1 ; [#uses=2]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDbvtNode* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %.noexc13 unwind label %lpad
-
-.noexc13: ; preds = %bb1.i
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %3, align 4
- %6 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %8 = load %"struct.btDbvt::sStkCLN"** %7, align 4 ; [#uses=2]
- %9 = icmp eq %"struct.btDbvt::sStkCLN"* %8, null ; [#uses=1]
- br i1 %9, label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %.noexc13
- %10 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %11 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %12 = bitcast %"struct.btDbvt::sStkCLN"* %8 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %12)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- br label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEED1Ev.exit
-
-invcont1: ; preds = %bb2.i.i.i22, %lpad
- %13 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %20, align 4
- %14 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %15, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEED1Ev.exit: ; preds = %bb2.i.i.i, %.noexc13
- %16 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %19, align 4
- store i8 1, i8* %16, align 4
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- store i32 0, i32* %17, align 4
- store i32 0, i32* %18, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i, %bb1.i, %bb.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %20 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %21 = load %"struct.btDbvt::sStkCLN"** %20, align 4 ; [#uses=2]
- %22 = icmp eq %"struct.btDbvt::sStkCLN"* %21, null ; [#uses=1]
- br i1 %22, label %invcont1, label %bb.i.i.i20
-
-bb.i.i.i20: ; preds = %lpad
- %23 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i19 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i19, label %bb2.i.i.i22, label %bb1.i.i.i21
-
-bb1.i.i.i21: ; preds = %bb.i.i.i20
- %25 = bitcast %"struct.btDbvt::sStkCLN"* %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i22 unwind label %lpad7
-
-bb2.i.i.i22: ; preds = %bb1.i.i.i21, %bb.i.i.i20
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %20, align 4
- br label %invcont1
-
-lpad7: ; preds = %bb1.i.i.i21
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN6btDbvtD2Ev(%struct.btDbvt* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- invoke fastcc void @_ZL17recursedeletenodeP6btDbvtP10btDbvtNode(%struct.btDbvt* %this, %struct.btDbvtNode* %1)
- to label %bb1.i unwind label %lpad
-
-bb1.i: ; preds = %bb.i, %entry
- %3 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 1 ; [#uses=2]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDbvtNode* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %.noexc13 unwind label %lpad
-
-.noexc13: ; preds = %bb1.i
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %3, align 4
- %6 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %8 = load %"struct.btDbvt::sStkCLN"** %7, align 4 ; [#uses=2]
- %9 = icmp eq %"struct.btDbvt::sStkCLN"* %8, null ; [#uses=1]
- br i1 %9, label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %.noexc13
- %10 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %11 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %12 = bitcast %"struct.btDbvt::sStkCLN"* %8 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %12)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- br label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEED1Ev.exit
-
-invcont1: ; preds = %bb2.i.i.i22, %lpad
- %13 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %20, align 4
- %14 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %15, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEED1Ev.exit: ; preds = %bb2.i.i.i, %.noexc13
- %16 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %19, align 4
- store i8 1, i8* %16, align 4
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %7, align 4
- store i32 0, i32* %17, align 4
- store i32 0, i32* %18, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i, %bb1.i, %bb.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %20 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %21 = load %"struct.btDbvt::sStkCLN"** %20, align 4 ; [#uses=2]
- %22 = icmp eq %"struct.btDbvt::sStkCLN"* %21, null ; [#uses=1]
- br i1 %22, label %invcont1, label %bb.i.i.i20
-
-bb.i.i.i20: ; preds = %lpad
- %23 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i19 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i19, label %bb2.i.i.i22, label %bb1.i.i.i21
-
-bb1.i.i.i21: ; preds = %bb.i.i.i20
- %25 = bitcast %"struct.btDbvt::sStkCLN"* %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i22 unwind label %lpad7
-
-bb2.i.i.i22: ; preds = %bb1.i.i.i21, %bb.i.i.i20
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %20, align 4
- br label %invcont1
-
-lpad7: ; preds = %bb1.i.i.i21
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btDbvtNodeEnumeratorD0Ev(%struct.btDbvtNodeEnumerator* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20btDbvtNodeEnumerator, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btDbvtNode*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btDbvtNode** %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btDbvtNode** %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %1, align 4
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %1, align 4
- %8 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = bitcast %struct.btDbvtNodeEnumerator* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %10) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btDbvtNodeEnumeratorD1Ev(%struct.btDbvtNodeEnumerator* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20btDbvtNodeEnumerator, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btDbvtNode*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btDbvtNode** %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btDbvtNode** %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %1, align 4
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %1, align 4
- %8 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK6btDbvt5writeEPNS_7IWriterE(%struct.btDbvt* nocapture %this, %struct.btActionInterface* %iwriter) align 2 {
-entry:
- %nodes = alloca %struct.btDbvtNodeEnumerator, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %nodes, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20btDbvtNodeEnumerator, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %nodes, i32 0, i32 1, i32 4 ; [#uses=6]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %nodes, i32 0, i32 1, i32 3 ; [#uses=11]
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %2, align 4
- %3 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %nodes, i32 0, i32 1, i32 1 ; [#uses=5]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %nodes, i32 0, i32 1, i32 2 ; [#uses=3]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=2]
- %7 = shl i32 %6, 1 ; [#uses=2]
- %8 = icmp sgt i32 %7, 0 ; [#uses=1]
- br i1 %8, label %bb.i2.i, label %invcont
-
-bb.i2.i: ; preds = %entry
- %9 = shl i32 %6, 3 ; [#uses=1]
- %10 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16)
- to label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i unwind label %lpad ; [#uses=2]
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i: ; preds = %bb.i2.i
- %phitmp.i = bitcast i8* %10 to %struct.btDbvtNode** ; [#uses=1]
- %11 = load i32* %3, align 4 ; [#uses=2]
- %12 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %12, label %bb.i4.i, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i
-
-bb.i4.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i
- %indvar.i.i = phi i32 [ %indvar.next.i.i, %bb3.i.i ], [ 0, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i ] ; [#uses=3]
- %tmp = shl i32 %indvar.i.i, 2 ; [#uses=1]
- %scevgep45 = getelementptr i8* %10, i32 %tmp ; [#uses=2]
- %13 = icmp eq i8* %scevgep45, null ; [#uses=1]
- br i1 %13, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep.i.i = bitcast i8* %scevgep45 to %struct.btDbvtNode** ; [#uses=1]
- %14 = load %struct.btDbvtNode*** %2, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btDbvtNode** %14, i32 %indvar.i.i ; [#uses=1]
- %15 = load %struct.btDbvtNode** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %15, %struct.btDbvtNode** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i
- %16 = load %struct.btDbvtNode*** %2, align 4 ; [#uses=2]
- %17 = icmp eq %struct.btDbvtNode** %16, null ; [#uses=1]
- br i1 %17, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i
- %18 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %18, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %19 = bitcast %struct.btDbvtNode** %16 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %19)
- to label %bb2.i.i unwind label %lpad
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %2, align 4
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i
- store i8 1, i8* %1, align 4
- store %struct.btDbvtNode** %phitmp.i, %struct.btDbvtNode*** %2, align 4
- store i32 %7, i32* %4, align 4
- br label %invcont
-
-invcont: ; preds = %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE10deallocateEv.exit.i, %entry
- %20 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=2]
- %21 = load %struct.btDbvtNode** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btDbvtNodeEnumerator* %nodes, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN6btDbvt9enumNodesEPK10btDbvtNodeRNS_8ICollideE(%struct.btDbvtNode* %21, %struct.btActionInterface* %22) inlinehint
- to label %invcont1 unwind label %lpad
-
-invcont1: ; preds = %invcont
- %23 = getelementptr inbounds %struct.btActionInterface* %iwriter, i32 0, i32 0 ; [#uses=3]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 2 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = load i32* %3, align 4 ; [#uses=1]
- %28 = load %struct.btDbvtNode** %20, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %26 to void (%struct.btActionInterface*, %struct.btDbvtNode*, i32)* ; [#uses=1]
- invoke void %29(%struct.btActionInterface* %iwriter, %struct.btDbvtNode* %28, i32 %27)
- to label %bb10 unwind label %lpad
-
-bb: ; preds = %bb10
- %30 = load %struct.btDbvtNode*** %2, align 4 ; [#uses=4]
- %scevgep = getelementptr %struct.btDbvtNode** %30, i32 %63 ; [#uses=1]
- %31 = load %struct.btDbvtNode** %scevgep, align 4 ; [#uses=5]
- %32 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 1 ; [#uses=1]
- %33 = load %struct.btDbvtNode** %32, align 4 ; [#uses=2]
- %34 = icmp eq %struct.btDbvtNode* %33, null ; [#uses=1]
- br i1 %34, label %bb4, label %bb3.i
-
-bb.i31: ; preds = %bb3.i
- %scevgep.i = getelementptr %struct.btDbvtNode** %30, i32 %38 ; [#uses=1]
- %35 = load %struct.btDbvtNode** %scevgep.i, align 4 ; [#uses=1]
- %36 = icmp eq %struct.btDbvtNode* %35, %33 ; [#uses=1]
- br i1 %36, label %bb4, label %bb2.i
-
-bb2.i: ; preds = %bb.i31
- %37 = add nsw i32 %38, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb
- %38 = phi i32 [ %37, %bb2.i ], [ 0, %bb ] ; [#uses=4]
- %39 = icmp sgt i32 %64, %38 ; [#uses=1]
- br i1 %39, label %bb.i31, label %bb4
-
-bb4: ; preds = %bb3.i, %bb.i31, %bb
- %p.0 = phi i32 [ -1, %bb ], [ %64, %bb3.i ], [ %38, %bb.i31 ] ; [#uses=2]
- %40 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %41 = load %struct.btDbvtNode** %40, align 4 ; [#uses=2]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %41, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb7, label %bb5
-
-bb5: ; preds = %bb4
- %42 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %43 = load %struct.btDbvtNode** %42, align 4 ; [#uses=1]
- br label %bb3.i35
-
-bb.i33: ; preds = %bb3.i35
- %scevgep.i32 = getelementptr %struct.btDbvtNode** %30, i32 %47 ; [#uses=1]
- %44 = load %struct.btDbvtNode** %scevgep.i32, align 4 ; [#uses=1]
- %45 = icmp eq %struct.btDbvtNode* %44, %43 ; [#uses=1]
- br i1 %45, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit37, label %bb2.i34
-
-bb2.i34: ; preds = %bb.i33
- %46 = add nsw i32 %47, 1 ; [#uses=1]
- br label %bb3.i35
-
-bb3.i35: ; preds = %bb2.i34, %bb5
- %47 = phi i32 [ 0, %bb5 ], [ %46, %bb2.i34 ] ; [#uses=4]
- %48 = icmp sgt i32 %64, %47 ; [#uses=1]
- br i1 %48, label %bb.i33, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit37
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit37: ; preds = %bb3.i35, %bb.i33
- %index.0.i36 = phi i32 [ %64, %bb3.i35 ], [ %47, %bb.i33 ] ; [#uses=1]
- br label %bb3.i41
-
-bb.i39: ; preds = %bb3.i41
- %scevgep.i38 = getelementptr %struct.btDbvtNode** %30, i32 %52 ; [#uses=1]
- %49 = load %struct.btDbvtNode** %scevgep.i38, align 4 ; [#uses=1]
- %50 = icmp eq %struct.btDbvtNode* %49, %41 ; [#uses=1]
- br i1 %50, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit43, label %bb2.i40
-
-bb2.i40: ; preds = %bb.i39
- %51 = add nsw i32 %52, 1 ; [#uses=1]
- br label %bb3.i41
-
-bb3.i41: ; preds = %bb2.i40, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit37
- %52 = phi i32 [ 0, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit37 ], [ %51, %bb2.i40 ] ; [#uses=4]
- %53 = icmp sgt i32 %64, %52 ; [#uses=1]
- br i1 %53, label %bb.i39, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit43
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit43: ; preds = %bb3.i41, %bb.i39
- %index.0.i42 = phi i32 [ %64, %bb3.i41 ], [ %52, %bb.i39 ] ; [#uses=1]
- %54 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %55 = getelementptr inbounds i32 (...)** %54, i32 3 ; [#uses=1]
- %56 = load i32 (...)** %55, align 4 ; [#uses=1]
- %57 = bitcast i32 (...)* %56 to void (%struct.btActionInterface*, %struct.btDbvtNode*, i32, i32, i32, i32)* ; [#uses=1]
- invoke void %57(%struct.btActionInterface* %iwriter, %struct.btDbvtNode* %31, i32 %63, i32 %p.0, i32 %index.0.i36, i32 %index.0.i42)
- to label %bb9 unwind label %lpad
-
-bb7: ; preds = %bb4
- %58 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 4 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to void (%struct.btActionInterface*, %struct.btDbvtNode*, i32, i32)* ; [#uses=1]
- invoke void %61(%struct.btActionInterface* %iwriter, %struct.btDbvtNode* %31, i32 %63, i32 %p.0)
- to label %bb9 unwind label %lpad
-
-bb9: ; preds = %bb7, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit43
- %62 = add nsw i32 %63, 1 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb9, %invcont1
- %63 = phi i32 [ %62, %bb9 ], [ 0, %invcont1 ] ; [#uses=5]
- %64 = load i32* %3, align 4 ; [#uses=7]
- %65 = icmp sgt i32 %64, %63 ; [#uses=1]
- br i1 %65, label %bb, label %bb15
-
-invcont13: ; preds = %bb2.i.i.i.i, %lpad
- store i8 1, i8* %1, align 4
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 4
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb15: ; preds = %bb10
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20btDbvtNodeEnumerator, i32 0, i32 2), i32 (...)*** %0, align 8
- %66 = load %struct.btDbvtNode*** %2, align 4 ; [#uses=2]
- %67 = icmp eq %struct.btDbvtNode** %66, null ; [#uses=1]
- br i1 %67, label %_ZN20btDbvtNodeEnumeratorD1Ev.exit30, label %bb.i.i.i.i27
-
-bb.i.i.i.i27: ; preds = %bb15
- %68 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i.i.i26 = icmp eq i8 %68, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i26, label %bb2.i.i.i.i29, label %bb1.i.i.i.i28
-
-bb1.i.i.i.i28: ; preds = %bb.i.i.i.i27
- %69 = bitcast %struct.btDbvtNode** %66 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %69)
- br label %bb2.i.i.i.i29
-
-bb2.i.i.i.i29: ; preds = %bb1.i.i.i.i28, %bb.i.i.i.i27
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %2, align 4
- ret void
-
-_ZN20btDbvtNodeEnumeratorD1Ev.exit30: ; preds = %bb15
- ret void
-
-lpad: ; preds = %bb7, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE16findLinearSearchERKS2_.exit43, %invcont1, %invcont, %bb1.i.i, %bb.i2.i
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20btDbvtNodeEnumerator, i32 0, i32 2), i32 (...)*** %0, align 8
- %70 = load %struct.btDbvtNode*** %2, align 4 ; [#uses=2]
- %71 = icmp eq %struct.btDbvtNode** %70, null ; [#uses=1]
- br i1 %71, label %invcont13, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %lpad
- %72 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %72, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %73 = bitcast %struct.btDbvtNode** %70 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %73)
- to label %bb2.i.i.i.i unwind label %lpad18
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %2, align 4
- br label %invcont13
-
-lpad18: ; preds = %bb1.i.i.i.i
- %eh_ptr19 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select21 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=3]
-define internal fastcc %struct.btDbvtNode* @_ZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEi(%struct.btDbvt* %pdbvt, %"struct.btAlignedObjectArray<btDbvtNode*>"* nocapture %leaves, i32 %bu_treshold) {
-entry:
- %sets = alloca [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"], align 8 ; [#uses=57]
- %splitcount = alloca [3 x [2 x i32]], align 4 ; [#uses=11]
- %0 = load i8* bitcast (i64* @_ZGVZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis to i8*), align 8 ; [#uses=1]
- %1 = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb2
-
-bb: ; preds = %entry
- %2 = call i32 @__cxa_guard_acquire(i64* @_ZGVZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis) nounwind ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 2, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb, %entry
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 1 ; [#uses=4]
- %5 = load i32* %4, align 4 ; [#uses=11]
- %6 = icmp sgt i32 %5, 1 ; [#uses=1]
- br i1 %6, label %bb4, label %bb60
-
-bb4: ; preds = %bb2
- %7 = icmp sgt i32 %5, %bu_treshold ; [#uses=1]
- br i1 %7, label %bb.nph.i, label %bb59
-
-bb.nph.i: ; preds = %bb4
- %leaves.idx85 = getelementptr %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=3]
- %leaves.idx85.val = load %struct.btDbvtNode*** %leaves.idx85, align 4 ; [#uses=3]
- %8 = load %struct.btDbvtNode** %leaves.idx85.val, align 4 ; [#uses=8]
- %9 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btDbvtNode* %8, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %tmp.i = add i32 %5, -1 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %tmp276, %bb.i ] ; [#uses=1]
- %locals.0.0.0.014.i = phi float [ %10, %bb.nph.i ], [ %storemerge.i.i, %bb.i ] ; [#uses=2]
- %locals.0.0.1.013.i = phi float [ %12, %bb.nph.i ], [ %storemerge17.i.i, %bb.i ] ; [#uses=2]
- %locals.0.0.2.012.i = phi float [ %14, %bb.nph.i ], [ %storemerge19.i.i, %bb.i ] ; [#uses=2]
- %locals.1.0.2.011.i = phi float [ %22, %bb.nph.i ], [ %storemerge20.i.i, %bb.i ] ; [#uses=2]
- %locals.1.0.0.010.i = phi float [ %18, %bb.nph.i ], [ %storemerge16.i.i, %bb.i ] ; [#uses=2]
- %locals.1.0.1.09.i = phi float [ %20, %bb.nph.i ], [ %storemerge18.i.i, %bb.i ] ; [#uses=2]
- %tmp276 = add i32 %indvar.i, 1 ; [#uses=3]
- %scevgep.i = getelementptr %struct.btDbvtNode** %leaves.idx85.val, i32 %tmp276 ; [#uses=1]
- %25 = load %struct.btDbvtNode** %scevgep.i, align 4 ; [#uses=6]
- %scevgep11.i.i = getelementptr %struct.btDbvtNode* %25, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i.i = getelementptr %struct.btDbvtNode* %25, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %scevgep11.i.i, align 4 ; [#uses=2]
- %27 = fcmp olt float %locals.0.0.0.014.i, %26 ; [#uses=1]
- %storemerge.i.i = select i1 %27, float %locals.0.0.0.014.i, float %26 ; [#uses=3]
- %28 = load float* %scevgep14.i.i, align 4 ; [#uses=2]
- %29 = fcmp ogt float %locals.1.0.0.010.i, %28 ; [#uses=1]
- %storemerge16.i.i = select i1 %29, float %locals.1.0.0.010.i, float %28 ; [#uses=3]
- %scevgep11.1.i.i = getelementptr %struct.btDbvtNode* %25, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1.i.i = getelementptr %struct.btDbvtNode* %25, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %scevgep11.1.i.i, align 4 ; [#uses=2]
- %31 = fcmp olt float %locals.0.0.1.013.i, %30 ; [#uses=1]
- %storemerge17.i.i = select i1 %31, float %locals.0.0.1.013.i, float %30 ; [#uses=3]
- %32 = load float* %scevgep14.1.i.i, align 4 ; [#uses=2]
- %33 = fcmp ogt float %locals.1.0.1.09.i, %32 ; [#uses=1]
- %storemerge18.i.i = select i1 %33, float %locals.1.0.1.09.i, float %32 ; [#uses=3]
- %scevgep11.2.i.i = getelementptr %struct.btDbvtNode* %25, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2.i.i = getelementptr %struct.btDbvtNode* %25, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %scevgep11.2.i.i, align 4 ; [#uses=2]
- %35 = fcmp olt float %locals.0.0.2.012.i, %34 ; [#uses=1]
- %storemerge19.i.i = select i1 %35, float %locals.0.0.2.012.i, float %34 ; [#uses=3]
- %36 = load float* %scevgep14.2.i.i, align 4 ; [#uses=2]
- %37 = fcmp ogt float %locals.1.0.2.011.i, %36 ; [#uses=1]
- %storemerge20.i.i = select i1 %37, float %locals.1.0.2.011.i, float %36 ; [#uses=3]
- %exitcond275 = icmp eq i32 %tmp276, %tmp.i ; [#uses=1]
- br i1 %exitcond275, label %bb16, label %bb.i
-
-bb16: ; preds = %bb.i
- %38 = fadd float %storemerge19.i.i, %storemerge20.i.i ; [#uses=1]
- %39 = fadd float %storemerge17.i.i, %storemerge18.i.i ; [#uses=1]
- %40 = fadd float %storemerge.i.i, %storemerge16.i.i ; [#uses=1]
- %41 = fmul float %38, 5.000000e-01 ; [#uses=2]
- %42 = fmul float %39, 5.000000e-01 ; [#uses=2]
- %43 = fmul float %40, 5.000000e-01 ; [#uses=2]
- %scevgep271 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 4 ; [#uses=1]
- %scevgep272 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep273 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep274 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %scevgep271, align 8
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %scevgep272, align 4
- store i32 0, i32* %scevgep273, align 4
- store i32 0, i32* %scevgep274, align 8
- %scevgep271.1 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 4 ; [#uses=1]
- %scevgep272.1 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 3 ; [#uses=1]
- %scevgep273.1 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 1 ; [#uses=1]
- %scevgep274.1 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 2 ; [#uses=1]
- store i8 1, i8* %scevgep271.1, align 4
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %scevgep272.1, align 4
- store i32 0, i32* %scevgep273.1, align 4
- store i32 0, i32* %scevgep274.1, align 4
- %44 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 0, i32* %44, align 4
- %45 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 1, i32 0 ; [#uses=2]
- store i32 0, i32* %46, align 4
- %47 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 2, i32 0 ; [#uses=2]
- store i32 0, i32* %48, align 4
- %49 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 2, i32 1 ; [#uses=2]
- store i32 0, i32* %49, align 4
- %50 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %50, label %bb23, label %bb.nph206
-
-bb23: ; preds = %bb23, %bb16
- %i.0209 = phi i32 [ 0, %bb16 ], [ %106, %bb23 ] ; [#uses=2]
- %scevgep267 = getelementptr %struct.btDbvtNode** %leaves.idx85.val, i32 %i.0209 ; [#uses=1]
- %51 = load %struct.btDbvtNode** %scevgep267, align 4 ; [#uses=6]
- %52 = getelementptr inbounds %struct.btDbvtNode* %51, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btDbvtNode* %51, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fadd float %53, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btDbvtNode* %51, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btDbvtNode* %51, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = fadd float %58, %60 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btDbvtNode* %51, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btDbvtNode* %51, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = fadd float %63, %65 ; [#uses=1]
- %67 = fmul float %56, 5.000000e-01 ; [#uses=1]
- %68 = fmul float %61, 5.000000e-01 ; [#uses=1]
- %69 = fmul float %66, 5.000000e-01 ; [#uses=1]
- %70 = fsub float %67, %41 ; [#uses=3]
- %71 = fsub float %68, %42 ; [#uses=3]
- %72 = fsub float %69, %43 ; [#uses=3]
- %73 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 0, i32 0, i32 0), align 32 ; [#uses=1]
- %74 = fmul float %72, %73 ; [#uses=1]
- %75 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 0, i32 0, i32 1), align 4 ; [#uses=1]
- %76 = fmul float %71, %75 ; [#uses=1]
- %77 = fadd float %74, %76 ; [#uses=1]
- %78 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 0, i32 0, i32 2), align 8 ; [#uses=1]
- %79 = fmul float %70, %78 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=1]
- %81 = fcmp ogt float %80, 0.000000e+00 ; [#uses=1]
- %tmp257 = zext i1 %81 to i32 ; [#uses=1]
- %scevgep258 = getelementptr [3 x [2 x i32]]* %splitcount, i32 0, i32 0, i32 %tmp257 ; [#uses=2]
- %82 = load i32* %scevgep258, align 4 ; [#uses=1]
- %83 = add nsw i32 %82, 1 ; [#uses=1]
- store i32 %83, i32* %scevgep258, align 4
- %84 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 1, i32 0, i32 0), align 16 ; [#uses=1]
- %85 = fmul float %72, %84 ; [#uses=1]
- %86 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 1, i32 0, i32 1), align 4 ; [#uses=1]
- %87 = fmul float %71, %86 ; [#uses=1]
- %88 = fadd float %85, %87 ; [#uses=1]
- %89 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 1, i32 0, i32 2), align 8 ; [#uses=1]
- %90 = fmul float %70, %89 ; [#uses=1]
- %91 = fadd float %88, %90 ; [#uses=1]
- %92 = fcmp ogt float %91, 0.000000e+00 ; [#uses=1]
- %tmp257.1 = zext i1 %92 to i32 ; [#uses=1]
- %scevgep258.1 = getelementptr [3 x [2 x i32]]* %splitcount, i32 0, i32 1, i32 %tmp257.1 ; [#uses=2]
- %93 = load i32* %scevgep258.1, align 4 ; [#uses=1]
- %94 = add nsw i32 %93, 1 ; [#uses=1]
- store i32 %94, i32* %scevgep258.1, align 4
- %95 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 2, i32 0, i32 0), align 32 ; [#uses=1]
- %96 = fmul float %72, %95 ; [#uses=1]
- %97 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 2, i32 0, i32 1), align 4 ; [#uses=1]
- %98 = fmul float %71, %97 ; [#uses=1]
- %99 = fadd float %96, %98 ; [#uses=1]
- %100 = load float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 2, i32 0, i32 2), align 8 ; [#uses=1]
- %101 = fmul float %70, %100 ; [#uses=1]
- %102 = fadd float %99, %101 ; [#uses=1]
- %103 = fcmp ogt float %102, 0.000000e+00 ; [#uses=1]
- %tmp257.2 = zext i1 %103 to i32 ; [#uses=1]
- %scevgep258.2 = getelementptr [3 x [2 x i32]]* %splitcount, i32 0, i32 2, i32 %tmp257.2 ; [#uses=2]
- %104 = load i32* %scevgep258.2, align 4 ; [#uses=1]
- %105 = add nsw i32 %104, 1 ; [#uses=1]
- store i32 %105, i32* %scevgep258.2, align 4
- %106 = add nsw i32 %i.0209, 1 ; [#uses=2]
- %exitcond266 = icmp eq i32 %106, %5 ; [#uses=1]
- br i1 %exitcond266, label %bb.nph206, label %bb23
-
-bb.nph206: ; preds = %bb23, %bb16
- %107 = load i32* %44, align 4 ; [#uses=2]
- %108 = icmp sgt i32 %107, 0 ; [#uses=1]
- br i1 %108, label %bb28, label %bb31
-
-bb28: ; preds = %bb.nph206
- %109 = load i32* %45, align 4 ; [#uses=2]
- %110 = icmp sgt i32 %109, 0 ; [#uses=1]
- br i1 %110, label %bb29, label %bb31
-
-bb29: ; preds = %bb28
- %111 = sub nsw i32 %107, %109 ; [#uses=1]
- %112 = sitofp i32 %111 to float ; [#uses=1]
- %113 = call float @fabsf(float %112) nounwind readnone ; [#uses=1]
- %114 = fptosi float %113 to i32 ; [#uses=2]
- %115 = icmp slt i32 %114, %5 ; [#uses=1]
- br i1 %115, label %bb30, label %bb31
-
-bb30: ; preds = %bb29
- br label %bb31
-
-bb31: ; preds = %bb30, %bb29, %bb28, %bb.nph206
- %bestaxis.0 = phi i32 [ 0, %bb30 ], [ -1, %bb.nph206 ], [ -1, %bb28 ], [ -1, %bb29 ] ; [#uses=3]
- %bestmidp.0 = phi i32 [ %114, %bb30 ], [ %5, %bb.nph206 ], [ %5, %bb28 ], [ %5, %bb29 ] ; [#uses=4]
- %116 = load i32* %46, align 4 ; [#uses=2]
- %117 = icmp sgt i32 %116, 0 ; [#uses=1]
- br i1 %117, label %bb28.1, label %bb31.1
-
-bb33: ; preds = %bb29.2, %bb28.2, %bb31.1
- %118 = icmp sgt i32 %bestaxis.0.1, -1 ; [#uses=1]
- br i1 %118, label %bb34, label %bb38
-
-bb34: ; preds = %bb29.2, %bb33
- %bestaxis.0.2279 = phi i32 [ %bestaxis.0.1, %bb33 ], [ 2, %bb29.2 ] ; [#uses=5]
- %119 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 %bestaxis.0.2279, i32 0 ; [#uses=1]
- %120 = load i32* %119, align 4 ; [#uses=4]
- %121 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 2 ; [#uses=4]
- %122 = load i32* %121, align 8 ; [#uses=1]
- %123 = icmp slt i32 %122, %120 ; [#uses=1]
- br i1 %123, label %bb.i140, label %invcont35
-
-bb.i140: ; preds = %bb34
- %124 = icmp eq i32 %120, 0 ; [#uses=1]
- br i1 %124, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i143, label %bb.i2.i142
-
-bb.i2.i142: ; preds = %bb.i140
- %125 = shl i32 %120, 2 ; [#uses=1]
- %126 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %125, i32 16)
- to label %.noexc160 unwind label %lpad69 ; [#uses=1]
-
-.noexc160: ; preds = %bb.i2.i142
- %phitmp.i141 = bitcast i8* %126 to %struct.btDbvtNode** ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i143
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i143: ; preds = %.noexc160, %bb.i140
- %127 = phi %struct.btDbvtNode** [ %phitmp.i141, %.noexc160 ], [ null, %bb.i140 ] ; [#uses=2]
- %128 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 1 ; [#uses=1]
- %129 = load i32* %128, align 4 ; [#uses=2]
- %130 = icmp sgt i32 %129, 0 ; [#uses=1]
- br i1 %130, label %bb.nph.i.i144, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i153
-
-bb.nph.i.i144: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i143
- %131 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i147
-
-bb.i4.i147: ; preds = %bb3.i.i152, %bb.nph.i.i144
- %indvar.i.i145 = phi i32 [ 0, %bb.nph.i.i144 ], [ %indvar.next.i.i150, %bb3.i.i152 ] ; [#uses=3]
- %scevgep.i.i146 = getelementptr %struct.btDbvtNode** %127, i32 %indvar.i.i145 ; [#uses=2]
- %132 = icmp eq %struct.btDbvtNode** %scevgep.i.i146, null ; [#uses=1]
- br i1 %132, label %bb3.i.i152, label %bb1.i5.i149
-
-bb1.i5.i149: ; preds = %bb.i4.i147
- %133 = load %struct.btDbvtNode*** %131, align 4 ; [#uses=1]
- %scevgep8.i.i148 = getelementptr %struct.btDbvtNode** %133, i32 %indvar.i.i145 ; [#uses=1]
- %134 = load %struct.btDbvtNode** %scevgep8.i.i148, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %134, %struct.btDbvtNode** %scevgep.i.i146, align 4
- br label %bb3.i.i152
-
-bb3.i.i152: ; preds = %bb1.i5.i149, %bb.i4.i147
- %indvar.next.i.i150 = add i32 %indvar.i.i145, 1 ; [#uses=2]
- %exitcond249 = icmp eq i32 %indvar.next.i.i150, %129 ; [#uses=1]
- br i1 %exitcond249, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i153, label %bb.i4.i147
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i153: ; preds = %bb3.i.i152, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i143
- %135 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 3 ; [#uses=3]
- %136 = load %struct.btDbvtNode*** %135, align 4 ; [#uses=2]
- %137 = icmp eq %struct.btDbvtNode** %136, null ; [#uses=1]
- br i1 %137, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i158, label %bb.i.i155
-
-bb.i.i155: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i153
- %138 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 4 ; [#uses=1]
- %139 = load i8* %138, align 8 ; [#uses=1]
- %toBool.i.i154 = icmp eq i8 %139, 0 ; [#uses=1]
- br i1 %toBool.i.i154, label %bb2.i.i157, label %bb1.i.i156
-
-bb1.i.i156: ; preds = %bb.i.i155
- %140 = bitcast %struct.btDbvtNode** %136 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %140)
- to label %bb2.i.i157 unwind label %lpad69
-
-bb2.i.i157: ; preds = %bb1.i.i156, %bb.i.i155
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %135, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i158
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i158: ; preds = %bb2.i.i157, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i153
- %141 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %141, align 8
- store %struct.btDbvtNode** %127, %struct.btDbvtNode*** %135, align 4
- store i32 %120, i32* %121, align 8
- br label %invcont35
-
-invcont35: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i158, %bb34
- %142 = getelementptr inbounds [3 x [2 x i32]]* %splitcount, i32 0, i32 %bestaxis.0.2279, i32 1 ; [#uses=1]
- %143 = load i32* %142, align 4 ; [#uses=4]
- %144 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 2 ; [#uses=4]
- %145 = load i32* %144, align 4 ; [#uses=1]
- %146 = icmp slt i32 %145, %143 ; [#uses=1]
- br i1 %146, label %bb.i163, label %invcont36
-
-bb.i163: ; preds = %invcont35
- %147 = icmp eq i32 %143, 0 ; [#uses=1]
- br i1 %147, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i166, label %bb.i2.i165
-
-bb.i2.i165: ; preds = %bb.i163
- %148 = shl i32 %143, 2 ; [#uses=1]
- %149 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %148, i32 16)
- to label %.noexc183 unwind label %lpad69 ; [#uses=1]
-
-.noexc183: ; preds = %bb.i2.i165
- %phitmp.i164 = bitcast i8* %149 to %struct.btDbvtNode** ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i166
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i166: ; preds = %.noexc183, %bb.i163
- %150 = phi %struct.btDbvtNode** [ %phitmp.i164, %.noexc183 ], [ null, %bb.i163 ] ; [#uses=2]
- %151 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 1 ; [#uses=1]
- %152 = load i32* %151, align 4 ; [#uses=2]
- %153 = icmp sgt i32 %152, 0 ; [#uses=1]
- br i1 %153, label %bb.nph.i.i167, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i176
-
-bb.nph.i.i167: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i166
- %154 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i4.i170
-
-bb.i4.i170: ; preds = %bb3.i.i175, %bb.nph.i.i167
- %indvar.i.i168 = phi i32 [ 0, %bb.nph.i.i167 ], [ %indvar.next.i.i173, %bb3.i.i175 ] ; [#uses=3]
- %scevgep.i.i169 = getelementptr %struct.btDbvtNode** %150, i32 %indvar.i.i168 ; [#uses=2]
- %155 = icmp eq %struct.btDbvtNode** %scevgep.i.i169, null ; [#uses=1]
- br i1 %155, label %bb3.i.i175, label %bb1.i5.i172
-
-bb1.i5.i172: ; preds = %bb.i4.i170
- %156 = load %struct.btDbvtNode*** %154, align 4 ; [#uses=1]
- %scevgep8.i.i171 = getelementptr %struct.btDbvtNode** %156, i32 %indvar.i.i168 ; [#uses=1]
- %157 = load %struct.btDbvtNode** %scevgep8.i.i171, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %157, %struct.btDbvtNode** %scevgep.i.i169, align 4
- br label %bb3.i.i175
-
-bb3.i.i175: ; preds = %bb1.i5.i172, %bb.i4.i170
- %indvar.next.i.i173 = add i32 %indvar.i.i168, 1 ; [#uses=2]
- %exitcond246 = icmp eq i32 %indvar.next.i.i173, %152 ; [#uses=1]
- br i1 %exitcond246, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i176, label %bb.i4.i170
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i176: ; preds = %bb3.i.i175, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i166
- %158 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 3 ; [#uses=3]
- %159 = load %struct.btDbvtNode*** %158, align 4 ; [#uses=2]
- %160 = icmp eq %struct.btDbvtNode** %159, null ; [#uses=1]
- br i1 %160, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i181, label %bb.i.i178
-
-bb.i.i178: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i176
- %161 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 4 ; [#uses=1]
- %162 = load i8* %161, align 4 ; [#uses=1]
- %toBool.i.i177 = icmp eq i8 %162, 0 ; [#uses=1]
- br i1 %toBool.i.i177, label %bb2.i.i180, label %bb1.i.i179
-
-bb1.i.i179: ; preds = %bb.i.i178
- %163 = bitcast %struct.btDbvtNode** %159 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %163)
- to label %bb2.i.i180 unwind label %lpad69
-
-bb2.i.i180: ; preds = %bb1.i.i179, %bb.i.i178
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %158, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i181
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i181: ; preds = %bb2.i.i180, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i176
- %164 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %164, align 4
- store %struct.btDbvtNode** %150, %struct.btDbvtNode*** %158, align 4
- store i32 %143, i32* %144, align 4
- br label %invcont36
-
-invcont36: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i181, %invcont35
- %165 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0 ; [#uses=1]
- %166 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1 ; [#uses=1]
- %167 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 1 ; [#uses=2]
- %168 = load i32* %167, align 4 ; [#uses=3]
- %169 = icmp slt i32 %168, 0 ; [#uses=1]
- br i1 %169, label %bb4.i.i, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit.i
-
-bb4.i.i: ; preds = %invcont36
- %170 = load i32* %121, align 8 ; [#uses=1]
- %171 = icmp slt i32 %170, 0 ; [#uses=1]
- br i1 %171, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i.i, label %bb.nph.i.i127
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i.i: ; preds = %bb4.i.i
- %172 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 3 ; [#uses=3]
- %173 = load %struct.btDbvtNode*** %172, align 4 ; [#uses=2]
- %174 = icmp eq %struct.btDbvtNode** %173, null ; [#uses=1]
- br i1 %174, label %bb11.preheader.i.i, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i.i
- %175 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 4 ; [#uses=1]
- %176 = load i8* %175, align 8 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %176, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %177 = bitcast %struct.btDbvtNode** %173 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %177)
- to label %bb2.i.i.i.i unwind label %lpad69
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %172, align 4
- br label %bb11.preheader.i.i
-
-bb11.preheader.i.i: ; preds = %bb2.i.i.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i.i
- %178 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %178, align 8
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %172, align 4
- store i32 0, i32* %121, align 8
- br label %bb.nph.i.i127
-
-bb.nph.i.i127: ; preds = %bb11.preheader.i.i, %bb4.i.i
- %179 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp.i.i = sub i32 0, %168 ; [#uses=1]
- br label %bb7.i.i
-
-bb7.i.i: ; preds = %bb10.i.i, %bb.nph.i.i127
- %indvar.i.i128 = phi i32 [ 0, %bb.nph.i.i127 ], [ %indvar.next.i.i131, %bb10.i.i ] ; [#uses=2]
- %tmp243 = add i32 %168, %indvar.i.i128 ; [#uses=1]
- %180 = load %struct.btDbvtNode*** %179, align 4 ; [#uses=1]
- %scevgep245 = getelementptr %struct.btDbvtNode** %180, i32 %tmp243 ; [#uses=2]
- %181 = icmp eq %struct.btDbvtNode** %scevgep245, null ; [#uses=1]
- br i1 %181, label %bb10.i.i, label %bb8.i.i
-
-bb8.i.i: ; preds = %bb7.i.i
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %scevgep245, align 4
- br label %bb10.i.i
-
-bb10.i.i: ; preds = %bb8.i.i, %bb7.i.i
- %indvar.next.i.i131 = add i32 %indvar.i.i128, 1 ; [#uses=2]
- %exitcond242 = icmp eq i32 %indvar.next.i.i131, %tmp.i.i ; [#uses=1]
- br i1 %exitcond242, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit.i, label %bb7.i.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit.i: ; preds = %bb10.i.i, %invcont36
- store i32 0, i32* %167, align 4
- %182 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 1 ; [#uses=2]
- %183 = load i32* %182, align 4 ; [#uses=3]
- %184 = icmp slt i32 %183, 0 ; [#uses=1]
- br i1 %184, label %bb4.i7.i, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit35.i
-
-bb4.i7.i: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit.i
- %185 = load i32* %144, align 4 ; [#uses=1]
- %186 = icmp slt i32 %185, 0 ; [#uses=1]
- br i1 %186, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i9.i, label %bb.nph.i26.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i9.i: ; preds = %bb4.i7.i
- %187 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 3 ; [#uses=3]
- %188 = load %struct.btDbvtNode*** %187, align 4 ; [#uses=2]
- %189 = icmp eq %struct.btDbvtNode** %188, null ; [#uses=1]
- br i1 %189, label %bb11.preheader.i24.i, label %bb.i.i.i21.i
-
-bb.i.i.i21.i: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i9.i
- %190 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 4 ; [#uses=1]
- %191 = load i8* %190, align 4 ; [#uses=1]
- %toBool.i.i.i20.i = icmp eq i8 %191, 0 ; [#uses=1]
- br i1 %toBool.i.i.i20.i, label %bb2.i.i.i23.i, label %bb1.i.i.i22.i
-
-bb1.i.i.i22.i: ; preds = %bb.i.i.i21.i
- %192 = bitcast %struct.btDbvtNode** %188 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %192)
- to label %bb2.i.i.i23.i unwind label %lpad69
-
-bb2.i.i.i23.i: ; preds = %bb1.i.i.i22.i, %bb.i.i.i21.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %187, align 4
- br label %bb11.preheader.i24.i
-
-bb11.preheader.i24.i: ; preds = %bb2.i.i.i23.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i.i9.i
- %193 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %193, align 4
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %187, align 4
- store i32 0, i32* %144, align 4
- br label %bb.nph.i26.i
-
-bb.nph.i26.i: ; preds = %bb11.preheader.i24.i, %bb4.i7.i
- %194 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 3 ; [#uses=1]
- %tmp.i25.i = sub i32 0, %183 ; [#uses=1]
- br label %bb7.i30.i
-
-bb7.i30.i: ; preds = %bb10.i34.i, %bb.nph.i26.i
- %indvar.i27.i = phi i32 [ 0, %bb.nph.i26.i ], [ %indvar.next.i32.i, %bb10.i34.i ] ; [#uses=2]
- %tmp239 = add i32 %183, %indvar.i27.i ; [#uses=1]
- %195 = load %struct.btDbvtNode*** %194, align 4 ; [#uses=1]
- %scevgep241 = getelementptr %struct.btDbvtNode** %195, i32 %tmp239 ; [#uses=2]
- %196 = icmp eq %struct.btDbvtNode** %scevgep241, null ; [#uses=1]
- br i1 %196, label %bb10.i34.i, label %bb8.i31.i
-
-bb8.i31.i: ; preds = %bb7.i30.i
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %scevgep241, align 4
- br label %bb10.i34.i
-
-bb10.i34.i: ; preds = %bb8.i31.i, %bb7.i30.i
- %indvar.next.i32.i = add i32 %indvar.i27.i, 1 ; [#uses=2]
- %exitcond238 = icmp eq i32 %indvar.next.i32.i, %tmp.i25.i ; [#uses=1]
- br i1 %exitcond238, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit35.i, label %bb7.i30.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit35.i: ; preds = %bb10.i34.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit.i
- store i32 0, i32* %182, align 4
- %197 = load i32* %4, align 4 ; [#uses=2]
- %198 = icmp sgt i32 %197, 0 ; [#uses=1]
- br i1 %198, label %bb.nph.i133, label %bb45
-
-bb.nph.i133: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit35.i
- %199 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 %bestaxis.0.2279, i32 0, i32 0 ; [#uses=1]
- %200 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 %bestaxis.0.2279, i32 0, i32 1 ; [#uses=1]
- %201 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEiE4axis, i32 0, i32 %bestaxis.0.2279, i32 0, i32 2 ; [#uses=1]
- br label %bb.i134
-
-bb.i134: ; preds = %bb3.i, %bb.nph.i133
- %i.044.i = phi i32 [ 0, %bb.nph.i133 ], [ %tmp234, %bb3.i ] ; [#uses=2]
- %tmp234 = add i32 %i.044.i, 1 ; [#uses=2]
- %202 = load %struct.btDbvtNode*** %leaves.idx85, align 4 ; [#uses=1]
- %scevgep237 = getelementptr %struct.btDbvtNode** %202, i32 %i.044.i ; [#uses=3]
- %203 = load %struct.btDbvtNode** %scevgep237, align 4 ; [#uses=6]
- %204 = getelementptr inbounds %struct.btDbvtNode* %203, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btDbvtNode* %203, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %207 = load float* %206, align 4 ; [#uses=1]
- %208 = fadd float %205, %207 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btDbvtNode* %203, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btDbvtNode* %203, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=1]
- %213 = fadd float %210, %212 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btDbvtNode* %203, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %215 = load float* %214, align 4 ; [#uses=1]
- %216 = getelementptr inbounds %struct.btDbvtNode* %203, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %217 = load float* %216, align 4 ; [#uses=1]
- %218 = fadd float %215, %217 ; [#uses=1]
- %219 = fmul float %208, 5.000000e-01 ; [#uses=1]
- %220 = fmul float %213, 5.000000e-01 ; [#uses=1]
- %221 = fmul float %218, 5.000000e-01 ; [#uses=1]
- %222 = fsub float %219, %41 ; [#uses=1]
- %223 = fsub float %220, %42 ; [#uses=1]
- %224 = fsub float %221, %43 ; [#uses=1]
- %225 = load float* %199, align 16 ; [#uses=1]
- %226 = fmul float %225, %224 ; [#uses=1]
- %227 = load float* %200, align 4 ; [#uses=1]
- %228 = fmul float %227, %223 ; [#uses=1]
- %229 = fadd float %226, %228 ; [#uses=1]
- %230 = load float* %201, align 8 ; [#uses=1]
- %231 = fmul float %230, %222 ; [#uses=1]
- %232 = fadd float %229, %231 ; [#uses=1]
- %233 = fcmp olt float %232, 0.000000e+00 ; [#uses=1]
- br i1 %233, label %bb1.i, label %bb2.i
-
-bb1.i: ; preds = %bb.i134
- invoke void @_ZN20btAlignedObjectArrayIP10btDbvtNodeE9push_backERKS1_(%"struct.btAlignedObjectArray<btDbvtNode*>"* %165, %struct.btDbvtNode** %scevgep237) inlinehint
- to label %bb3.i unwind label %lpad69
-
-bb2.i: ; preds = %bb.i134
- invoke void @_ZN20btAlignedObjectArrayIP10btDbvtNodeE9push_backERKS1_(%"struct.btAlignedObjectArray<btDbvtNode*>"* %166, %struct.btDbvtNode** %scevgep237) inlinehint
- to label %bb3.i unwind label %lpad69
-
-bb3.i: ; preds = %bb2.i, %bb1.i
- %exitcond49.i = icmp eq i32 %tmp234, %197 ; [#uses=1]
- br i1 %exitcond49.i, label %bb45, label %bb.i134
-
-bb38: ; preds = %bb33
- %234 = sdiv i32 %5, 2 ; [#uses=1]
- %235 = add nsw i32 %234, 1 ; [#uses=4]
- %236 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 2 ; [#uses=2]
- %237 = load i32* %236, align 8 ; [#uses=1]
- %238 = icmp slt i32 %237, %235 ; [#uses=1]
- br i1 %238, label %bb.i104, label %invcont39
-
-bb.i104: ; preds = %bb38
- %239 = icmp eq i32 %235, 0 ; [#uses=1]
- br i1 %239, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i107, label %bb.i2.i106
-
-bb.i2.i106: ; preds = %bb.i104
- %240 = shl i32 %235, 2 ; [#uses=1]
- %241 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %240, i32 16)
- to label %.noexc124 unwind label %lpad69 ; [#uses=1]
-
-.noexc124: ; preds = %bb.i2.i106
- %phitmp.i105 = bitcast i8* %241 to %struct.btDbvtNode** ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i107
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i107: ; preds = %.noexc124, %bb.i104
- %242 = phi %struct.btDbvtNode** [ %phitmp.i105, %.noexc124 ], [ null, %bb.i104 ] ; [#uses=2]
- %243 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 1 ; [#uses=1]
- %244 = load i32* %243, align 4 ; [#uses=2]
- %245 = icmp sgt i32 %244, 0 ; [#uses=1]
- br i1 %245, label %bb.nph.i.i108, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i117
-
-bb.nph.i.i108: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i107
- %246 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i111
-
-bb.i4.i111: ; preds = %bb3.i.i116, %bb.nph.i.i108
- %indvar.i.i109 = phi i32 [ 0, %bb.nph.i.i108 ], [ %indvar.next.i.i114, %bb3.i.i116 ] ; [#uses=3]
- %scevgep.i.i110 = getelementptr %struct.btDbvtNode** %242, i32 %indvar.i.i109 ; [#uses=2]
- %247 = icmp eq %struct.btDbvtNode** %scevgep.i.i110, null ; [#uses=1]
- br i1 %247, label %bb3.i.i116, label %bb1.i5.i113
-
-bb1.i5.i113: ; preds = %bb.i4.i111
- %248 = load %struct.btDbvtNode*** %246, align 4 ; [#uses=1]
- %scevgep8.i.i112 = getelementptr %struct.btDbvtNode** %248, i32 %indvar.i.i109 ; [#uses=1]
- %249 = load %struct.btDbvtNode** %scevgep8.i.i112, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %249, %struct.btDbvtNode** %scevgep.i.i110, align 4
- br label %bb3.i.i116
-
-bb3.i.i116: ; preds = %bb1.i5.i113, %bb.i4.i111
- %indvar.next.i.i114 = add i32 %indvar.i.i109, 1 ; [#uses=2]
- %exitcond216 = icmp eq i32 %indvar.next.i.i114, %244 ; [#uses=1]
- br i1 %exitcond216, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i117, label %bb.i4.i111
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i117: ; preds = %bb3.i.i116, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i107
- %250 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 3 ; [#uses=3]
- %251 = load %struct.btDbvtNode*** %250, align 4 ; [#uses=2]
- %252 = icmp eq %struct.btDbvtNode** %251, null ; [#uses=1]
- br i1 %252, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i122, label %bb.i.i119
-
-bb.i.i119: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i117
- %253 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 4 ; [#uses=1]
- %254 = load i8* %253, align 8 ; [#uses=1]
- %toBool.i.i118 = icmp eq i8 %254, 0 ; [#uses=1]
- br i1 %toBool.i.i118, label %bb2.i.i121, label %bb1.i.i120
-
-bb1.i.i120: ; preds = %bb.i.i119
- %255 = bitcast %struct.btDbvtNode** %251 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %255)
- to label %bb2.i.i121 unwind label %lpad69
-
-bb2.i.i121: ; preds = %bb1.i.i120, %bb.i.i119
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %250, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i122
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i122: ; preds = %bb2.i.i121, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i117
- %256 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %256, align 8
- store %struct.btDbvtNode** %242, %struct.btDbvtNode*** %250, align 4
- store i32 %235, i32* %236, align 8
- %.pre = load i32* %4, align 4 ; [#uses=1]
- br label %invcont39
-
-invcont39: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i122, %bb38
- %257 = phi i32 [ %.pre, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i122 ], [ %5, %bb38 ] ; [#uses=3]
- %258 = sdiv i32 %257, 2 ; [#uses=3]
- %259 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 2 ; [#uses=2]
- %260 = load i32* %259, align 4 ; [#uses=1]
- %261 = icmp slt i32 %260, %258 ; [#uses=1]
- br i1 %261, label %bb.i92, label %invcont40
-
-bb.i92: ; preds = %invcont39
- %.off = add i32 %257, 1 ; [#uses=1]
- %262 = icmp ult i32 %.off, 3 ; [#uses=1]
- br i1 %262, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i92
- %263 = shl i32 %258, 2 ; [#uses=1]
- %264 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %263, i32 16)
- to label %.noexc96 unwind label %lpad69 ; [#uses=1]
-
-.noexc96: ; preds = %bb.i2.i
- %phitmp.i = bitcast i8* %264 to %struct.btDbvtNode** ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i: ; preds = %.noexc96, %bb.i92
- %265 = phi %struct.btDbvtNode** [ %phitmp.i, %.noexc96 ], [ null, %bb.i92 ] ; [#uses=2]
- %266 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 1 ; [#uses=1]
- %267 = load i32* %266, align 4 ; [#uses=2]
- %268 = icmp sgt i32 %267, 0 ; [#uses=1]
- br i1 %268, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %269 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr %struct.btDbvtNode** %265, i32 %indvar.i.i ; [#uses=2]
- %270 = icmp eq %struct.btDbvtNode** %scevgep.i.i, null ; [#uses=1]
- br i1 %270, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %271 = load %struct.btDbvtNode*** %269, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btDbvtNode** %271, i32 %indvar.i.i ; [#uses=1]
- %272 = load %struct.btDbvtNode** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %272, %struct.btDbvtNode** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %267 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %273 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 3 ; [#uses=3]
- %274 = load %struct.btDbvtNode*** %273, align 4 ; [#uses=2]
- %275 = icmp eq %struct.btDbvtNode** %274, null ; [#uses=1]
- br i1 %275, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, label %bb.i.i94
-
-bb.i.i94: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- %276 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 4 ; [#uses=1]
- %277 = load i8* %276, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %277, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i95
-
-bb1.i.i95: ; preds = %bb.i.i94
- %278 = bitcast %struct.btDbvtNode** %274 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %278)
- to label %bb2.i.i unwind label %lpad69
-
-bb2.i.i: ; preds = %bb1.i.i95, %bb.i.i94
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %273, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- %279 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %279, align 4
- store %struct.btDbvtNode** %265, %struct.btDbvtNode*** %273, align 4
- store i32 %258, i32* %259, align 4
- %.pre278 = load i32* %4, align 4 ; [#uses=1]
- br label %invcont40
-
-invcont40: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, %invcont39
- %280 = phi i32 [ %.pre278, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i ], [ %257, %invcont39 ] ; [#uses=1]
- br label %bb44
-
-bb42: ; preds = %bb44
- %281 = load %struct.btDbvtNode*** %leaves.idx85, align 4 ; [#uses=1]
- %282 = and i32 %285, 1 ; [#uses=1]
- %283 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %282 ; [#uses=1]
- %scevgep = getelementptr %struct.btDbvtNode** %281, i32 %285 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIP10btDbvtNodeE9push_backERKS1_(%"struct.btAlignedObjectArray<btDbvtNode*>"* %283, %struct.btDbvtNode** %scevgep) inlinehint
- to label %invcont43 unwind label %lpad69
-
-invcont43: ; preds = %bb42
- %284 = add nsw i32 %285, 1 ; [#uses=1]
- br label %bb44
-
-bb44: ; preds = %invcont43, %invcont40
- %285 = phi i32 [ 0, %invcont40 ], [ %284, %invcont43 ] ; [#uses=4]
- %286 = icmp slt i32 %285, %280 ; [#uses=1]
- br i1 %286, label %bb42, label %bb45
-
-bb45: ; preds = %bb44, %bb3.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE6resizeEiRKS1_.exit35.i
- %287 = getelementptr inbounds %struct.btDbvt* %pdbvt, i32 0, i32 1 ; [#uses=2]
- %288 = load %struct.btDbvtNode** %287, align 4 ; [#uses=2]
- %289 = icmp eq %struct.btDbvtNode* %288, null ; [#uses=1]
- br i1 %289, label %bb1.i.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb45
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %287, align 4
- br label %invcont46
-
-bb1.i.i: ; preds = %bb45
- %290 = invoke i8* @_Z22btAlignedAllocInternalji(i32 44, i32 16)
- to label %.noexc91 unwind label %lpad69 ; [#uses=1]
-
-.noexc91: ; preds = %bb1.i.i
- %291 = bitcast i8* %290 to %struct.btDbvtNode* ; [#uses=1]
- br label %invcont46
-
-invcont46: ; preds = %.noexc91, %bb.i.i
- %node.0.i.i = phi %struct.btDbvtNode* [ %288, %bb.i.i ], [ %291, %.noexc91 ] ; [#uses=14]
- %292 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %292, align 4
- %293 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %293, align 4
- %294 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %294, align 4
- %295 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %storemerge.i.i, float* %295, align 4
- %296 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %storemerge17.i.i, float* %296, align 4
- %297 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %storemerge19.i.i, float* %297, align 4
- %298 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %16, float* %298, align 4
- %299 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %storemerge16.i.i, float* %299, align 4
- %300 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %storemerge18.i.i, float* %300, align 4
- %301 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %storemerge20.i.i, float* %301, align 4
- %302 = getelementptr inbounds %struct.btDbvtNode* %node.0.i.i, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %24, float* %302, align 4
- %303 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0 ; [#uses=1]
- %304 = invoke fastcc %struct.btDbvtNode* @_ZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEi(%struct.btDbvt* %pdbvt, %"struct.btAlignedObjectArray<btDbvtNode*>"* %303, i32 %bu_treshold)
- to label %invcont47 unwind label %lpad69 ; [#uses=1]
-
-invcont47: ; preds = %invcont46
- store %struct.btDbvtNode* %304, %struct.btDbvtNode** %293, align 4
- %305 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 1 ; [#uses=1]
- %306 = invoke fastcc %struct.btDbvtNode* @_ZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEi(%struct.btDbvt* %pdbvt, %"struct.btAlignedObjectArray<btDbvtNode*>"* %305, i32 %bu_treshold)
- to label %bb.nph unwind label %lpad69 ; [#uses=1]
-
-bb52: ; preds = %lpad69, %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit90
- %indvar = phi i32 [ %indvar.next, %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit90 ], [ 0, %lpad69 ] ; [#uses=3]
- %tmp = sub i32 0, %indvar ; [#uses=1]
- %tmp219 = sub i32 1, %indvar ; [#uses=4]
- %scevgep220 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp219, i32 2 ; [#uses=1]
- %scevgep221 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp219, i32 1 ; [#uses=1]
- %scevgep222 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp219, i32 4 ; [#uses=2]
- %scevgep223 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp219, i32 3 ; [#uses=3]
- %.081 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 1, i32 %tmp ; [#uses=1]
- %307 = icmp eq %"struct.btAlignedObjectArray<btDbvtNode*>"* %.081, %326 ; [#uses=1]
- br i1 %307, label %Unwind, label %bb53
-
-bb53: ; preds = %bb52
- %308 = load %struct.btDbvtNode*** %scevgep223, align 4 ; [#uses=2]
- %309 = icmp eq %struct.btDbvtNode** %308, null ; [#uses=1]
- br i1 %309, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit90, label %bb.i.i.i87
-
-bb.i.i.i87: ; preds = %bb53
- %310 = load i8* %scevgep222, align 4 ; [#uses=1]
- %toBool.i.i.i86 = icmp eq i8 %310, 0 ; [#uses=1]
- br i1 %toBool.i.i.i86, label %bb2.i.i.i89, label %bb1.i.i.i88
-
-bb1.i.i.i88: ; preds = %bb.i.i.i87
- %311 = bitcast %struct.btDbvtNode** %308 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %311)
- to label %bb2.i.i.i89 unwind label %lpad73
-
-bb2.i.i.i89: ; preds = %bb1.i.i.i88, %bb.i.i.i87
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %scevgep223, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit90
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit90: ; preds = %bb2.i.i.i89, %bb53
- store i8 1, i8* %scevgep222, align 4
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %scevgep223, align 4
- store i32 0, i32* %scevgep221, align 4
- store i32 0, i32* %scevgep220, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb52
-
-bb.nph: ; preds = %invcont47
- store %struct.btDbvtNode* %306, %struct.btDbvtNode** %294, align 4
- %312 = load %struct.btDbvtNode** %293, align 4 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btDbvtNode* %312, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %313, align 4
- %314 = load %struct.btDbvtNode** %294, align 4 ; [#uses=1]
- %315 = getelementptr inbounds %struct.btDbvtNode* %314, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %node.0.i.i, %struct.btDbvtNode** %315, align 4
- br label %bb58
-
-bb58: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit, %bb.nph
- %indvar225 = phi i32 [ 0, %bb.nph ], [ %indvar.next226, %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit ] ; [#uses=2]
- %tmp229 = sub i32 1, %indvar225 ; [#uses=4]
- %scevgep230 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp229, i32 3 ; [#uses=3]
- %scevgep231 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp229, i32 4 ; [#uses=2]
- %scevgep232 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp229, i32 1 ; [#uses=1]
- %scevgep233 = getelementptr [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 %tmp229, i32 2 ; [#uses=1]
- %316 = load %struct.btDbvtNode*** %scevgep230, align 4 ; [#uses=2]
- %317 = icmp eq %struct.btDbvtNode** %316, null ; [#uses=1]
- br i1 %317, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb58
- %318 = load i8* %scevgep231, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %318, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %319 = bitcast %struct.btDbvtNode** %316 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %319)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %scevgep230, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit: ; preds = %bb2.i.i.i, %bb58
- store i8 1, i8* %scevgep231, align 4
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %scevgep230, align 4
- store i32 0, i32* %scevgep232, align 4
- store i32 0, i32* %scevgep233, align 4
- %indvar.next226 = add i32 %indvar225, 1 ; [#uses=2]
- %exitcond227 = icmp eq i32 %indvar.next226, 2 ; [#uses=1]
- br i1 %exitcond227, label %bb61, label %bb58
-
-bb59: ; preds = %bb4
- call fastcc void @_ZL8bottomupP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeE(%struct.btDbvt* %pdbvt, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves)
- %320 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=1]
- %321 = load %struct.btDbvtNode*** %320, align 4 ; [#uses=1]
- %322 = load %struct.btDbvtNode** %321, align 4 ; [#uses=1]
- ret %struct.btDbvtNode* %322
-
-bb60: ; preds = %bb2
- %323 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=1]
- %324 = load %struct.btDbvtNode*** %323, align 4 ; [#uses=1]
- %325 = load %struct.btDbvtNode** %324, align 4 ; [#uses=1]
- ret %struct.btDbvtNode* %325
-
-bb61: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit
- ret %struct.btDbvtNode* %node.0.i.i
-
-lpad69: ; preds = %invcont47, %invcont46, %bb1.i.i, %bb42, %bb1.i.i95, %bb.i2.i, %bb1.i.i120, %bb.i2.i106, %bb2.i, %bb1.i, %bb1.i.i.i22.i, %bb1.i.i.i.i, %bb1.i.i179, %bb.i2.i165, %bb1.i.i156, %bb.i2.i142
- %eh_ptr70 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select72 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr70, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %326 = getelementptr inbounds [2 x %"struct.btAlignedObjectArray<btDbvtNode*>"]* %sets, i32 0, i32 0 ; [#uses=1]
- br label %bb52
-
-lpad73: ; preds = %bb1.i.i.i88
- %eh_ptr74 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select76 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr74, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-Unwind: ; preds = %bb52
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr70)
- unreachable
-
-bb31.1: ; preds = %bb30.1, %bb29.1, %bb28.1, %bb31
- %bestaxis.0.1 = phi i32 [ 1, %bb30.1 ], [ %bestaxis.0, %bb31 ], [ %bestaxis.0, %bb28.1 ], [ %bestaxis.0, %bb29.1 ] ; [#uses=2]
- %bestmidp.0.1 = phi i32 [ %334, %bb30.1 ], [ %bestmidp.0, %bb31 ], [ %bestmidp.0, %bb28.1 ], [ %bestmidp.0, %bb29.1 ] ; [#uses=1]
- %327 = load i32* %48, align 4 ; [#uses=2]
- %328 = icmp sgt i32 %327, 0 ; [#uses=1]
- br i1 %328, label %bb28.2, label %bb33
-
-bb28.1: ; preds = %bb31
- %329 = load i32* %47, align 4 ; [#uses=2]
- %330 = icmp sgt i32 %329, 0 ; [#uses=1]
- br i1 %330, label %bb29.1, label %bb31.1
-
-bb29.1: ; preds = %bb28.1
- %331 = sub nsw i32 %116, %329 ; [#uses=1]
- %332 = sitofp i32 %331 to float ; [#uses=1]
- %333 = call float @fabsf(float %332) nounwind readnone ; [#uses=1]
- %334 = fptosi float %333 to i32 ; [#uses=2]
- %335 = icmp slt i32 %334, %bestmidp.0 ; [#uses=1]
- br i1 %335, label %bb30.1, label %bb31.1
-
-bb30.1: ; preds = %bb29.1
- br label %bb31.1
-
-bb28.2: ; preds = %bb31.1
- %336 = load i32* %49, align 4 ; [#uses=2]
- %337 = icmp sgt i32 %336, 0 ; [#uses=1]
- br i1 %337, label %bb29.2, label %bb33
-
-bb29.2: ; preds = %bb28.2
- %338 = sub nsw i32 %327, %336 ; [#uses=1]
- %339 = sitofp i32 %338 to float ; [#uses=1]
- %340 = call float @fabsf(float %339) nounwind readnone ; [#uses=1]
- %341 = fptosi float %340 to i32 ; [#uses=1]
- %342 = icmp slt i32 %341, %bestmidp.0.1 ; [#uses=1]
- br i1 %342, label %bb34, label %bb33
-}
-
-; [#uses=2]
-define void @_ZN6btDbvt15optimizeTopDownEi(%struct.btDbvt* %this, i32 %bu_treshold) align 2 {
-entry:
- %leaves = alloca %"struct.btAlignedObjectArray<btDbvtNode*>", align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 0 ; [#uses=3]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- br i1 %2, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit21, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 4 ; [#uses=6]
- store i8 1, i8* %3, align 8
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 3 ; [#uses=10]
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 1 ; [#uses=3]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 0, i32 2 ; [#uses=3]
- store i32 0, i32* %6, align 8
- %7 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 3 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=3]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.i2.i, label %invcont
-
-bb.i2.i: ; preds = %bb
- %10 = shl i32 %8, 2 ; [#uses=1]
- %11 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %10, i32 16)
- to label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i unwind label %lpad ; [#uses=2]
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i: ; preds = %bb.i2.i
- %phitmp.i = bitcast i8* %11 to %struct.btDbvtNode** ; [#uses=1]
- %12 = load i32* %5, align 4 ; [#uses=2]
- %13 = icmp sgt i32 %12, 0 ; [#uses=1]
- br i1 %13, label %bb.i4.i, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
-
-bb.i4.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %indvar.i.i = phi i32 [ %indvar.next.i.i, %bb3.i.i ], [ 0, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i ] ; [#uses=3]
- %tmp = shl i32 %indvar.i.i, 2 ; [#uses=1]
- %scevgep = getelementptr i8* %11, i32 %tmp ; [#uses=2]
- %14 = icmp eq i8* %scevgep, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep.i.i = bitcast i8* %scevgep to %struct.btDbvtNode** ; [#uses=1]
- %15 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btDbvtNode** %15, i32 %indvar.i.i ; [#uses=1]
- %16 = load %struct.btDbvtNode** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %16, %struct.btDbvtNode** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %12 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE8allocateEi.exit.i
- %17 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=2]
- %18 = icmp eq %struct.btDbvtNode** %17, null ; [#uses=1]
- br i1 %18, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- %19 = load i8* %3, align 8 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %19, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %20 = bitcast %struct.btDbvtNode** %17 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %20)
- to label %bb2.i.i unwind label %lpad
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- br label %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP10btDbvtNodeE4copyEiiPS1_.exit.i
- store i8 1, i8* %3, align 8
- store %struct.btDbvtNode** %phitmp.i, %struct.btDbvtNode*** %4, align 4
- store i32 %8, i32* %6, align 8
- %.pre = load %struct.btDbvtNode** %0, align 4 ; [#uses=1]
- br label %invcont
-
-invcont: ; preds = %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i, %bb
- %21 = phi %struct.btDbvtNode* [ %.pre, %_ZN20btAlignedObjectArrayIP10btDbvtNodeE10deallocateEv.exit.i ], [ %1, %bb ] ; [#uses=1]
- invoke fastcc void @_ZL11fetchleavesP6btDbvtP10btDbvtNodeR20btAlignedObjectArrayIS2_Ei(%struct.btDbvt* %this, %struct.btDbvtNode* %21, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 -1)
- to label %invcont1 unwind label %lpad
-
-invcont1: ; preds = %invcont
- %22 = invoke fastcc %struct.btDbvtNode* @_ZL7topdownP6btDbvtR20btAlignedObjectArrayIP10btDbvtNodeEi(%struct.btDbvt* %this, %"struct.btAlignedObjectArray<btDbvtNode*>"* %leaves, i32 %bu_treshold)
- to label %invcont2 unwind label %lpad ; [#uses=1]
-
-invcont2: ; preds = %invcont1
- store %struct.btDbvtNode* %22, %struct.btDbvtNode** %0, align 4
- %23 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btDbvtNode** %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit21, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %invcont2
- %25 = load i8* %3, align 8 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %26 = bitcast %struct.btDbvtNode** %23 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %26)
- br label %bb2.i.i.i20
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- ret void
-
-_ZN20btAlignedObjectArrayIP10btDbvtNodeED1Ev.exit21: ; preds = %invcont2, %entry
- ret void
-
-invcont4: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %3, align 8
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- store i32 0, i32* %5, align 4
- store i32 0, i32* %6, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %invcont1, %invcont, %bb1.i.i, %bb.i2.i
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %27 = load %struct.btDbvtNode*** %4, align 4 ; [#uses=2]
- %28 = icmp eq %struct.btDbvtNode** %27, null ; [#uses=1]
- br i1 %28, label %invcont4, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %29 = load i8* %3, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %29, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %30 = bitcast %struct.btDbvtNode** %27 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %30)
- to label %bb2.i.i.i unwind label %lpad9
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btDbvtNode** null, %struct.btDbvtNode*** %4, align 4
- br label %invcont4
-
-lpad9: ; preds = %bb1.i.i.i
- %eh_ptr10 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphaseC2EP22btOverlappingPairCache(%struct.btDbvtBroadphase* %this, %struct..0btMultiSapOverlapFilterCallback* %paircache) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV16btDbvtBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=3]
- br label %bb1
-
-bb: ; preds = %bb1
- %.0 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %indvar79 ; [#uses=1]
- invoke void @_ZN6btDbvtC1Ev(%struct.btDbvt* %.0)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %indvar.next80 = add i32 %indvar79, 1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %invcont, %entry
- %indvar79 = phi i32 [ %indvar.next80, %invcont ], [ 0, %entry ] ; [#uses=3]
- %.061 = sub i32 1, %indvar79 ; [#uses=2]
- %2 = icmp eq i32 %.061, -1 ; [#uses=1]
- br i1 %2, label %bb9, label %bb
-
-bb3: ; preds = %lpad
- %3 = sub nsw i32 1, %.061 ; [#uses=1]
- %4 = mul i32 %3, 40 ; [#uses=1]
- %5 = ptrtoint %struct.btDbvt* %1 to i32 ; [#uses=1]
- %6 = add i32 %4, %5 ; [#uses=1]
- %7 = inttoptr i32 %6 to %struct.btDbvt* ; [#uses=2]
- br label %bb4
-
-bb4: ; preds = %bb5, %bb3
- %indvar = phi i32 [ %indvar.next, %bb5 ], [ 0, %bb3 ] ; [#uses=3]
- %tmp = sub i32 0, %indvar ; [#uses=1]
- %.062 = getelementptr %struct.btDbvt* %7, i32 %tmp ; [#uses=1]
- %8 = icmp eq %struct.btDbvt* %.062, %1 ; [#uses=1]
- br i1 %8, label %ppad, label %bb5
-
-bb5: ; preds = %bb4
- %tmp67 = xor i32 %indvar, -1 ; [#uses=1]
- %scevgep = getelementptr %struct.btDbvt* %7, i32 %tmp67 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep)
- to label %bb4 unwind label %lpad39
-
-bb9: ; preds = %bb1
- %9 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 18 ; [#uses=1]
- store i8 0, i8* %9, align 1
- %10 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 19 ; [#uses=1]
- store i8 1, i8* %10, align 2
- %11 = icmp eq %struct..0btMultiSapOverlapFilterCallback* %paircache, null ; [#uses=2]
- %12 = zext i1 %11 to i8 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 17 ; [#uses=1]
- store i8 %12, i8* %13, align 4
- %14 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 10 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 6 ; [#uses=1]
- store i32 1, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 8 ; [#uses=1]
- store i32 10, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 9 ; [#uses=1]
- store i32 1, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=1]
- store i32 0, i32* %22, align 4
- %23 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- br i1 %11, label %bb10, label %return
-
-bb10: ; preds = %bb9
- %24 = invoke i8* @_Z22btAlignedAllocInternalji(i32 76, i32 16)
- to label %invcont11 unwind label %lpad43 ; [#uses=3]
-
-invcont11: ; preds = %bb10
- %25 = icmp eq i8* %24, null ; [#uses=1]
- br i1 %25, label %bb19, label %bb12
-
-bb12: ; preds = %invcont11
- %26 = bitcast i8* %24 to %struct.btHashedOverlappingPairCache* ; [#uses=1]
- invoke void @_ZN28btHashedOverlappingPairCacheC1Ev(%struct.btHashedOverlappingPairCache* %26)
- to label %bb19 unwind label %lpad47
-
-bb19: ; preds = %bb12, %invcont11
- %27 = bitcast i8* %24 to %struct..0btMultiSapOverlapFilterCallback* ; [#uses=1]
- br label %return
-
-bb28: ; preds = %ppad57, %bb29
- %indvar69 = phi i32 [ %indvar.next70, %bb29 ], [ 0, %ppad57 ] ; [#uses=3]
- %scevgep75.idx = mul i32 %indvar69, -40 ; [#uses=1]
- %28 = icmp eq i32 %scevgep75.idx, -80 ; [#uses=1]
- br i1 %28, label %ppad, label %bb29
-
-bb29: ; preds = %bb28
- %tmp72 = sub i32 1, %indvar69 ; [#uses=1]
- %scevgep73 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %tmp72 ; [#uses=1]
- %indvar.next70 = add i32 %indvar69, 1 ; [#uses=1]
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep73)
- to label %bb28 unwind label %lpad51
-
-return: ; preds = %bb19, %bb9
- %iftmp.237.0 = phi %struct..0btMultiSapOverlapFilterCallback* [ %27, %bb19 ], [ %paircache, %bb9 ] ; [#uses=1]
- %29 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=1]
- store %struct..0btMultiSapOverlapFilterCallback* %iftmp.237.0, %struct..0btMultiSapOverlapFilterCallback** %29, align 4
- %30 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 16 ; [#uses=1]
- store i32 0, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 14 ; [#uses=1]
- store i32 0, i32* %31, align 4
- %32 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 15 ; [#uses=1]
- store i32 0, i32* %32, align 4
- %scevgep77 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %scevgep77, align 4
- %scevgep77.1 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %scevgep77.1, align 4
- %scevgep77.2 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %scevgep77.2, align 4
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=3]
- %eh_select38 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %33 = icmp eq %struct.btDbvt* %1, null ; [#uses=1]
- br i1 %33, label %ppad, label %bb3
-
-lpad39: ; preds = %bb5
- %eh_ptr40 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select42 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr40, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad43: ; preds = %bb10
- %eh_ptr44 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select46 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr44, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad57
-
-lpad47: ; preds = %bb12
- %eh_ptr48 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select50 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr48, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad57
-
-lpad51: ; preds = %bb29
- %eh_ptr52 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select54 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr52, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %ppad57, %lpad, %bb28, %bb4
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %ppad57 ], [ %eh_ptr, %bb4 ], [ %eh_exception.1, %bb28 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btBroadphaseInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-ppad57: ; preds = %lpad47, %lpad43
- %eh_exception.1 = phi i8* [ %eh_ptr48, %lpad47 ], [ %eh_ptr44, %lpad43 ] ; [#uses=2]
- %34 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1 ; [#uses=1]
- %35 = icmp eq [2 x %struct.btDbvt]* %34, null ; [#uses=1]
- br i1 %35, label %ppad, label %bb28
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btDbvtTreeColliderD1Ev(%struct.btDbvtTreeCollider* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtTreeCollider* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btDbvtTreeColliderD0Ev(%struct.btDbvtTreeCollider* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtTreeCollider* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btDbvtTreeCollider* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btDbvtTreeCollider7ProcessEPK10btDbvtNodeS2_(%struct.btDbvtTreeCollider* nocapture %this, %struct.btDbvtNode* %na, %struct.btDbvtNode* %nb) align 2 {
-entry:
- %0 = icmp eq %struct.btDbvtNode* %na, %nb ; [#uses=1]
- br i1 %0, label %return, label %bb
-
-bb: ; preds = %entry
- %1 = getelementptr inbounds %struct.btDbvtNode* %na, i32 0, i32 2, i32 0 ; [#uses=1]
- %2 = bitcast [2 x %struct.btDbvtNode*]* %1 to i8** ; [#uses=1]
- %3 = load i8** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btDbvtNode* %nb, i32 0, i32 2, i32 0 ; [#uses=1]
- %5 = bitcast [2 x %struct.btDbvtNode*]* %4 to i8** ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btDbvtTreeCollider* %this, i32 0, i32 1 ; [#uses=2]
- %8 = load %struct.btDbvtBroadphase** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btDbvtBroadphase* %8, i32 0, i32 3 ; [#uses=1]
- %10 = load %struct..0btMultiSapOverlapFilterCallback** %9, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %10, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 2 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i8* %6 to %struct.btBroadphaseProxy* ; [#uses=1]
- %16 = bitcast i8* %3 to %struct.btBroadphaseProxy* ; [#uses=1]
- %17 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %10, i32 0, i32 0 ; [#uses=1]
- %18 = bitcast i32 (...)* %14 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %19 = tail call %struct.btBroadphasePair* %18(%struct.btActionInterface* %17, %struct.btBroadphaseProxy* %16, %struct.btBroadphaseProxy* %15) ; [#uses=0]
- %20 = load %struct.btDbvtBroadphase** %7, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btDbvtBroadphase* %20, i32 0, i32 9 ; [#uses=2]
- %22 = load i32* %21, align 4 ; [#uses=1]
- %23 = add nsw i32 %22, 1 ; [#uses=1]
- store i32 %23, i32* %21, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btDbvtTreeCollider7ProcessEPK10btDbvtNode(%struct.btDbvtTreeCollider* %this, %struct.btDbvtNode* %n) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtTreeCollider* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 2 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btDbvtTreeCollider* %this, i32 0, i32 2 ; [#uses=1]
- %5 = load %struct.btDbvtProxy** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btDbvtProxy* %5, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btDbvtNode** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %3 to void (%struct.btDbvtTreeCollider*, %struct.btDbvtNode*, %struct.btDbvtNode*)* ; [#uses=1]
- tail call void %8(%struct.btDbvtTreeCollider* %this, %struct.btDbvtNode* %n, %struct.btDbvtNode* %7)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btDbvtBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3_(%struct.btDbvtBroadphase* nocapture %this, %struct.btBroadphaseProxy* nocapture %absproxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19BroadphaseRayTesterD1Ev(%struct.BroadphaseRayTester* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.BroadphaseRayTester* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV19BroadphaseRayTester, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19BroadphaseRayTesterD0Ev(%struct.BroadphaseRayTester* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.BroadphaseRayTester* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV19BroadphaseRayTester, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.BroadphaseRayTester* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19BroadphaseRayTester7ProcessEPK10btDbvtNode(%struct.BroadphaseRayTester* nocapture %this, %struct.btDbvtNode* nocapture %leaf) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 2, i32 0 ; [#uses=1]
- %1 = bitcast [2 x %struct.btDbvtNode*]* %0 to i8** ; [#uses=1]
- %2 = load i8** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.BroadphaseRayTester* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btBroadphaseRayCallback** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btBroadphaseRayCallback* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 2 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i8* %2 to %struct.btBroadphaseProxy* ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBroadphaseRayCallback* %4, i32 0, i32 0 ; [#uses=1]
- %11 = bitcast i32 (...)* %8 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %12 = tail call zeroext i8 %11(%struct.btActionInterface* %10, %struct.btBroadphaseProxy* %9) ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20BroadphaseAabbTesterD1Ev(%struct.BroadphaseAabbTester* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.BroadphaseAabbTester* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20BroadphaseAabbTester, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20BroadphaseAabbTesterD0Ev(%struct.BroadphaseAabbTester* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.BroadphaseAabbTester* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20BroadphaseAabbTester, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.BroadphaseAabbTester* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20BroadphaseAabbTester7ProcessEPK10btDbvtNode(%struct.BroadphaseAabbTester* nocapture %this, %struct.btDbvtNode* nocapture %leaf) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 2, i32 0 ; [#uses=1]
- %1 = bitcast [2 x %struct.btDbvtNode*]* %0 to i8** ; [#uses=1]
- %2 = load i8** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.BroadphaseAabbTester* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 2 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i8* %2 to %struct.btBroadphaseProxy* ; [#uses=1]
- %10 = bitcast i32 (...)* %8 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %11 = tail call zeroext i8 %10(%struct.btActionInterface* %4, %struct.btBroadphaseProxy* %9) ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define %struct..0btMultiSapOverlapFilterCallback* @_ZN16btDbvtBroadphase23getOverlappingPairCacheEv(%struct.btDbvtBroadphase* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define %struct..0btMultiSapOverlapFilterCallback* @_ZNK16btDbvtBroadphase23getOverlappingPairCacheEv(%struct.btDbvtBroadphase* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define void @_ZNK16btDbvtBroadphase17getBroadphaseAabbER9btVector3S1_(%struct.btDbvtBroadphase* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btDbvtNode** %0, align 4 ; [#uses=14]
- %2 = icmp eq %struct.btDbvtNode* %1, null ; [#uses=1]
- %3 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- %4 = load %struct.btDbvtNode** %3, align 4 ; [#uses=15]
- %5 = icmp eq %struct.btDbvtNode* %4, null ; [#uses=2]
- br i1 %2, label %bb8, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr %struct.btDbvtNode* %1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- br i1 %5, label %bb7, label %bb6
-
-bb6: ; preds = %bb
- %scevgep11.i = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep13.i = getelementptr %struct.btDbvtNode* %1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = load float* %scevgep11.i, align 4 ; [#uses=2]
- %9 = fcmp olt float %7, %8 ; [#uses=1]
- %storemerge.i = select i1 %9, float %7, float %8 ; [#uses=1]
- %10 = load float* %scevgep13.i, align 4 ; [#uses=2]
- %11 = load float* %scevgep14.i, align 4 ; [#uses=2]
- %12 = fcmp ogt float %10, %11 ; [#uses=1]
- %storemerge16.i = select i1 %12, float %10, float %11 ; [#uses=1]
- %scevgep.1.i = getelementptr %struct.btDbvtNode* %1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep11.1.i = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.1.i = getelementptr %struct.btDbvtNode* %1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1.i = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %scevgep.1.i, align 4 ; [#uses=2]
- %14 = load float* %scevgep11.1.i, align 4 ; [#uses=2]
- %15 = fcmp olt float %13, %14 ; [#uses=1]
- %storemerge17.i = select i1 %15, float %13, float %14 ; [#uses=1]
- %16 = load float* %scevgep13.1.i, align 4 ; [#uses=2]
- %17 = load float* %scevgep14.1.i, align 4 ; [#uses=2]
- %18 = fcmp ogt float %16, %17 ; [#uses=1]
- %storemerge18.i = select i1 %18, float %16, float %17 ; [#uses=1]
- %scevgep.2.i = getelementptr %struct.btDbvtNode* %1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep11.2.i = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep13.2.i = getelementptr %struct.btDbvtNode* %1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2.i = getelementptr %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %scevgep.2.i, align 4 ; [#uses=2]
- %20 = load float* %scevgep11.2.i, align 4 ; [#uses=2]
- %21 = fcmp olt float %19, %20 ; [#uses=1]
- %storemerge19.i = select i1 %21, float %19, float %20 ; [#uses=1]
- %22 = load float* %scevgep13.2.i, align 4 ; [#uses=2]
- %23 = load float* %scevgep14.2.i, align 4 ; [#uses=2]
- %24 = fcmp ogt float %22, %23 ; [#uses=1]
- %storemerge20.i = select i1 %24, float %22, float %23 ; [#uses=1]
- br label %bb14
-
-bb7: ; preds = %bb
- %25 = load float* %6, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btDbvtNode* %1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btDbvtNode* %1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btDbvtNode* %1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btDbvtNode* %1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btDbvtNode* %1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btDbvtNode* %1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btDbvtNode* %1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- br label %bb14
-
-bb8: ; preds = %entry
- br i1 %5, label %bb14, label %bb12
-
-bb12: ; preds = %bb8
- %40 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btDbvtNode* %4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb12, %bb8, %bb7, %bb6
- %bounds.0.0.3.0 = phi float [ undef, %bb6 ], [ %31, %bb7 ], [ %47, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %bounds.0.0.2.0 = phi float [ %storemerge19.i, %bb6 ], [ %29, %bb7 ], [ %45, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %bounds.0.0.1.0 = phi float [ %storemerge17.i, %bb6 ], [ %27, %bb7 ], [ %43, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %bounds.0.0.0.0 = phi float [ %storemerge.i, %bb6 ], [ %25, %bb7 ], [ %41, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %bounds.1.0.0.0 = phi float [ %storemerge16.i, %bb6 ], [ %33, %bb7 ], [ %49, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %bounds.1.0.1.0 = phi float [ %storemerge18.i, %bb6 ], [ %35, %bb7 ], [ %51, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %bounds.1.0.2.0 = phi float [ %storemerge20.i, %bb6 ], [ %37, %bb7 ], [ %53, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %bounds.1.0.3.0 = phi float [ undef, %bb6 ], [ %39, %bb7 ], [ %55, %bb12 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %bounds.0.0.0.0, float* %56, align 4
- %57 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %bounds.0.0.1.0, float* %57, align 4
- %58 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %bounds.0.0.2.0, float* %58, align 4
- %59 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %bounds.0.0.3.0, float* %59, align 4
- %60 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %bounds.1.0.0.0, float* %60, align 4
- %61 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %bounds.1.0.1.0, float* %61, align 4
- %62 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %bounds.1.0.2.0, float* %62, align 4
- %63 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %bounds.1.0.3.0, float* %63, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase10printStatsEv(%struct.btDbvtBroadphase* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btDbvtBroadphase9benchmarkEP21btBroadphaseInterface(%struct.btActionInterface* nocapture %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase9resetPoolEP12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btActionInterface* nocapture %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 3 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = sub i32 0, %3 ; [#uses=1]
- %5 = icmp eq i32 %1, %4 ; [#uses=1]
- br i1 %5, label %return.loopexit, label %return
-
-return.loopexit: ; preds = %entry
- %6 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- tail call void @_ZN6btDbvt5clearEv(%struct.btDbvt* %6)
- %7 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- tail call void @_ZN6btDbvt5clearEv(%struct.btDbvt* %7)
- %8 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 18 ; [#uses=1]
- store i8 0, i8* %8, align 1
- %9 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 19 ; [#uses=1]
- store i8 1, i8* %9, align 2
- %10 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 10 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 6 ; [#uses=1]
- store i32 1, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 8 ; [#uses=1]
- store i32 10, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 9 ; [#uses=1]
- store i32 1, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 16 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 14 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 15 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %scevgep = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %scevgep, align 4
- %scevgep.1 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %scevgep.1, align 4
- %scevgep.2 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %scevgep.2, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btDbvtBroadphase8optimizeEv(%struct.btDbvtBroadphase* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- tail call void @_ZN6btDbvt15optimizeTopDownEi(%struct.btDbvt* %0, i32 128)
- %1 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- tail call void @_ZN6btDbvt15optimizeTopDownEi(%struct.btDbvt* %1, i32 128)
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE6resizeEiRKS1_(%"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* nocapture %this, i32 %newsize, %"struct.btDbvt::sStkCLN"* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 3 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to %"struct.btDbvt::sStkCLN"* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi %"struct.btDbvt::sStkCLN"* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=4]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIN6btDbvt6sStkNNEE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=6]
- %scevgep.i.i = getelementptr %"struct.btDbvt::sStkCLN"* %11, i32 %indvar.i.i ; [#uses=1]
- %14 = icmp eq %"struct.btDbvt::sStkCLN"* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep12.i.i = getelementptr %"struct.btDbvt::sStkCLN"* %11, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep11.i.i = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %11, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %15 = load %"struct.btDbvt::sStkCLN"** %13, align 4 ; [#uses=2]
- %scevgep89.i.i = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %15, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load %struct.btDbvtNode** %scevgep89.i.i, align 4 ; [#uses=1]
- %scevgep10.i.i = getelementptr %"struct.btDbvt::sStkCLN"* %15, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %17 = load %struct.btDbvtNode** %scevgep10.i.i, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %16, %struct.btDbvtNode** %scevgep11.i.i, align 4
- store %struct.btDbvtNode* %17, %struct.btDbvtNode** %scevgep12.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond21 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond21, label %_ZNK20btAlignedObjectArrayIN6btDbvt6sStkNNEE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIN6btDbvt6sStkNNEE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %"struct.btDbvt::sStkCLN"** %18, align 4 ; [#uses=2]
- %20 = icmp eq %"struct.btDbvt::sStkCLN"* %19, null ; [#uses=1]
- br i1 %20, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIN6btDbvt6sStkNNEE4copyEiiPS1_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %"struct.btDbvt::sStkCLN"* %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %"struct.btDbvt::sStkCLN"* null, %"struct.btDbvt::sStkCLN"** %18, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIN6btDbvt6sStkNNEE4copyEiiPS1_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %"struct.btDbvt::sStkCLN"* %11, %"struct.btDbvt::sStkCLN"** %18, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %this, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %fillData, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %fillData, i32 0, i32 1 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=3]
- %28 = load %"struct.btDbvt::sStkCLN"** %25, align 4 ; [#uses=3]
- %scevgep = getelementptr %"struct.btDbvt::sStkCLN"* %28, i32 %tmp17 ; [#uses=1]
- %29 = icmp eq %"struct.btDbvt::sStkCLN"* %scevgep, null ; [#uses=1]
- br i1 %29, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %30 = load %struct.btDbvtNode** %26, align 4 ; [#uses=1]
- %31 = load %struct.btDbvtNode** %27, align 4 ; [#uses=1]
- %scevgep1819 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %28, i32 %tmp17, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %30, %struct.btDbvtNode** %scevgep1819, align 4
- %scevgep20 = getelementptr %"struct.btDbvt::sStkCLN"* %28, i32 %tmp17, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %31, %struct.btDbvtNode** %scevgep20, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=6]
-define linkonce_odr void @_ZN6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2_RNS_8ICollideE(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %root0, %struct.btDbvtNode* %root1, %struct.btActionInterface* %policy) inlinehint align 2 {
-entry:
- %0 = alloca %"struct.btDbvt::sStkCLN", align 8 ; [#uses=1]
- %1 = alloca %"struct.btDbvt::sStkCLN", align 8 ; [#uses=1]
- %2 = icmp ne %struct.btDbvtNode* %root0, null ; [#uses=1]
- %3 = icmp ne %struct.btDbvtNode* %root1, null ; [#uses=1]
- %4 = and i1 %2, %3 ; [#uses=1]
- br i1 %4, label %bb, label %return
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5 ; [#uses=2]
- call void @_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE6resizeEiRKS1_(%"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %5, i32 128, %"struct.btDbvt::sStkCLN"* %1) inlinehint
- %6 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 3 ; [#uses=12]
- %7 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %7, i32 0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %root0, %struct.btDbvtNode** %8, align 4
- %9 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %7, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %root1, %struct.btDbvtNode** %9, align 4
- %10 = getelementptr inbounds %struct.btDbvt* %this, i32 0, i32 5, i32 1 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btActionInterface* %policy, i32 0, i32 0 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb21, %bb
- %depth.0 = phi i32 [ 1, %bb ], [ %depth.1, %bb21 ] ; [#uses=16]
- %treshold.1 = phi i32 [ 124, %bb ], [ %treshold.0, %bb21 ] ; [#uses=2]
- %12 = add nsw i32 %depth.0, -1 ; [#uses=19]
- %13 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %13, i32 %12, i32 0 ; [#uses=1]
- %15 = load %struct.btDbvtNode** %14, align 4 ; [#uses=15]
- %16 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %13, i32 %12, i32 1 ; [#uses=1]
- %17 = load %struct.btDbvtNode** %16, align 4 ; [#uses=13]
- %18 = icmp sgt i32 %12, %treshold.1 ; [#uses=1]
- br i1 %18, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %19 = load i32* %10, align 4 ; [#uses=1]
- %20 = shl i32 %19, 1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIN6btDbvt6sStkNNEE6resizeEiRKS1_(%"struct.btAlignedObjectArray<btDbvt::sStkCLN>"* %5, i32 %20, %"struct.btDbvt::sStkCLN"* %0) inlinehint
- %21 = load i32* %10, align 4 ; [#uses=1]
- %22 = add nsw i32 %21, -4 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %treshold.0 = phi i32 [ %22, %bb4 ], [ %treshold.1, %bb3 ] ; [#uses=1]
- %23 = icmp eq %struct.btDbvtNode* %15, %17 ; [#uses=1]
- br i1 %23, label %bb6, label %bb9
-
-bb6: ; preds = %bb5
- %24 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %25 = load %struct.btDbvtNode** %24, align 4 ; [#uses=1]
- %toBoolnot.i25 = icmp eq %struct.btDbvtNode* %25, null ; [#uses=1]
- br i1 %toBoolnot.i25, label %bb21, label %bb8
-
-bb8: ; preds = %bb6
- %26 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %28 = load %struct.btDbvtNode** %27, align 4 ; [#uses=2]
- %29 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %26, i32 %12, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %28, %struct.btDbvtNode** %29, align 4
- %30 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %26, i32 %12, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %28, %struct.btDbvtNode** %30, align 4
- %31 = add nsw i32 %depth.0, 1 ; [#uses=2]
- %32 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %33 = load %struct.btDbvtNode** %24, align 4 ; [#uses=2]
- %34 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %32, i32 %depth.0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %33, %struct.btDbvtNode** %34, align 4
- %35 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %32, i32 %depth.0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %33, %struct.btDbvtNode** %35, align 4
- %36 = add nsw i32 %depth.0, 2 ; [#uses=1]
- %37 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %38 = load %struct.btDbvtNode** %24, align 4 ; [#uses=1]
- %39 = load %struct.btDbvtNode** %27, align 4 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %37, i32 %31, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %39, %struct.btDbvtNode** %40, align 4
- %41 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %37, i32 %31, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %38, %struct.btDbvtNode** %41, align 4
- br label %bb21
-
-bb9: ; preds = %bb5
- %42 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fcmp ugt float %43, %45 ; [#uses=1]
- br i1 %46, label %bb21, label %bb.i
-
-bb.i: ; preds = %bb9
- %47 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fcmp ult float %48, %50 ; [#uses=1]
- br i1 %51, label %bb21, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %52 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fcmp ugt float %53, %55 ; [#uses=1]
- br i1 %56, label %bb21, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %57 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = fcmp ult float %58, %60 ; [#uses=1]
- br i1 %61, label %bb21, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %62 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = fcmp ugt float %63, %65 ; [#uses=1]
- br i1 %66, label %bb21, label %_Z9IntersectRK12btDbvtAabbMmS1_.exit
-
-_Z9IntersectRK12btDbvtAabbMmS1_.exit: ; preds = %bb3.i
- %67 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %68, %70 ; [#uses=1]
- br i1 %phitmp, label %bb21, label %bb11
-
-bb11: ; preds = %_Z9IntersectRK12btDbvtAabbMmS1_.exit
- %71 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %72 = load %struct.btDbvtNode** %71, align 4 ; [#uses=1]
- %toBoolnot.i23 = icmp eq %struct.btDbvtNode* %72, null ; [#uses=1]
- %73 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %74 = load %struct.btDbvtNode** %73, align 4 ; [#uses=1]
- %toBoolnot.i = icmp ne %struct.btDbvtNode* %74, null ; [#uses=2]
- br i1 %toBoolnot.i23, label %bb17, label %bb13
-
-bb13: ; preds = %bb11
- %75 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=4]
- br i1 %toBoolnot.i, label %bb15, label %bb16
-
-bb15: ; preds = %bb13
- %76 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %77 = load %struct.btDbvtNode** %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %79 = load %struct.btDbvtNode** %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %75, i32 %12, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %79, %struct.btDbvtNode** %80, align 4
- %81 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %75, i32 %12, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %77, %struct.btDbvtNode** %81, align 4
- %82 = add nsw i32 %depth.0, 1 ; [#uses=2]
- %83 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %84 = load %struct.btDbvtNode** %76, align 4 ; [#uses=1]
- %85 = load %struct.btDbvtNode** %71, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %83, i32 %depth.0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %85, %struct.btDbvtNode** %86, align 4
- %87 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %83, i32 %depth.0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %84, %struct.btDbvtNode** %87, align 4
- %88 = add nsw i32 %depth.0, 2 ; [#uses=2]
- %89 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %90 = load %struct.btDbvtNode** %73, align 4 ; [#uses=1]
- %91 = load %struct.btDbvtNode** %78, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %89, i32 %82, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %91, %struct.btDbvtNode** %92, align 4
- %93 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %89, i32 %82, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %90, %struct.btDbvtNode** %93, align 4
- %94 = add nsw i32 %depth.0, 3 ; [#uses=1]
- %95 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %96 = load %struct.btDbvtNode** %73, align 4 ; [#uses=1]
- %97 = load %struct.btDbvtNode** %71, align 4 ; [#uses=1]
- %98 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %95, i32 %88, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %97, %struct.btDbvtNode** %98, align 4
- %99 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %95, i32 %88, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %96, %struct.btDbvtNode** %99, align 4
- br label %bb21
-
-bb16: ; preds = %bb13
- %100 = getelementptr inbounds %struct.btDbvtNode* %15, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %101 = load %struct.btDbvtNode** %100, align 4 ; [#uses=1]
- %102 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %75, i32 %12, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %101, %struct.btDbvtNode** %102, align 4
- %103 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %75, i32 %12, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %17, %struct.btDbvtNode** %103, align 4
- %104 = add nsw i32 %depth.0, 1 ; [#uses=1]
- %105 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %106 = load %struct.btDbvtNode** %71, align 4 ; [#uses=1]
- %107 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %105, i32 %depth.0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %106, %struct.btDbvtNode** %107, align 4
- %108 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %105, i32 %depth.0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %17, %struct.btDbvtNode** %108, align 4
- br label %bb21
-
-bb17: ; preds = %bb11
- br i1 %toBoolnot.i, label %bb19, label %bb20
-
-bb19: ; preds = %bb17
- %109 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %110 = getelementptr inbounds %struct.btDbvtNode* %17, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %111 = load %struct.btDbvtNode** %110, align 4 ; [#uses=1]
- %112 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %109, i32 %12, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %15, %struct.btDbvtNode** %112, align 4
- %113 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %109, i32 %12, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %111, %struct.btDbvtNode** %113, align 4
- %114 = add nsw i32 %depth.0, 1 ; [#uses=1]
- %115 = load %"struct.btDbvt::sStkCLN"** %6, align 4 ; [#uses=2]
- %116 = load %struct.btDbvtNode** %73, align 4 ; [#uses=1]
- %117 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %115, i32 %depth.0, i32 0 ; [#uses=1]
- store %struct.btDbvtNode* %15, %struct.btDbvtNode** %117, align 4
- %118 = getelementptr inbounds %"struct.btDbvt::sStkCLN"* %115, i32 %depth.0, i32 1 ; [#uses=1]
- store %struct.btDbvtNode* %116, %struct.btDbvtNode** %118, align 4
- br label %bb21
-
-bb20: ; preds = %bb17
- %119 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %120 = getelementptr inbounds i32 (...)** %119, i32 2 ; [#uses=1]
- %121 = load i32 (...)** %120, align 4 ; [#uses=1]
- %122 = bitcast i32 (...)* %121 to void (%struct.btActionInterface*, %struct.btDbvtNode*, %struct.btDbvtNode*)* ; [#uses=1]
- call void %122(%struct.btActionInterface* %policy, %struct.btDbvtNode* %15, %struct.btDbvtNode* %17)
- br label %bb21
-
-bb21: ; preds = %bb20, %bb19, %bb16, %bb15, %_Z9IntersectRK12btDbvtAabbMmS1_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %bb9, %bb8, %bb6
- %depth.1 = phi i32 [ %36, %bb8 ], [ %12, %bb6 ], [ %94, %bb15 ], [ %104, %bb16 ], [ %114, %bb19 ], [ %12, %bb20 ], [ %12, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ], [ %12, %bb3.i ], [ %12, %bb2.i ], [ %12, %bb1.i ], [ %12, %bb.i ], [ %12, %bb9 ] ; [#uses=2]
- %123 = icmp eq i32 %depth.1, 0 ; [#uses=1]
- br i1 %123, label %return, label %bb3
-
-return: ; preds = %bb21, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase7collideEP12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %curAabb = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %collider8 = alloca %struct.btDbvtTreeCollider, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 7 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = mul nsw i32 %3, %1 ; [#uses=1]
- %5 = sdiv i32 %4, 100 ; [#uses=1]
- %6 = add nsw i32 %5, 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=4]
- call void @_ZN6btDbvt19optimizeIncrementalEi(%struct.btDbvt* %7, i32 %6)
- %8 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 10 ; [#uses=4]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = icmp eq i32 %9, 0 ; [#uses=1]
- br i1 %10, label %bb1, label %bb
-
-bb: ; preds = %entry
- %11 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 3 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 6 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %15 = mul nsw i32 %14, %12 ; [#uses=2]
- %16 = sdiv i32 %15, 100 ; [#uses=1]
- %17 = add nsw i32 %16, 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- call void @_ZN6btDbvt19optimizeIncrementalEi(%struct.btDbvt* %18, i32 %17)
- %19 = load i32* %8, align 4 ; [#uses=1]
- %.neg = sdiv i32 %15, -100 ; [#uses=1]
- %.neg58 = add nsw i32 %.neg, -1 ; [#uses=1]
- %20 = add i32 %.neg58, %19 ; [#uses=2]
- %21 = icmp slt i32 %20, 0 ; [#uses=1]
- %22 = select i1 %21, i32 0, i32 %20 ; [#uses=1]
- store i32 %22, i32* %8, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %23 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 5 ; [#uses=2]
- %24 = load i32* %23, align 4 ; [#uses=1]
- %25 = add nsw i32 %24, 1 ; [#uses=1]
- %26 = srem i32 %25, 2 ; [#uses=2]
- store i32 %26, i32* %23, align 4
- %27 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %26 ; [#uses=1]
- %28 = load %struct.btDbvtProxy** %27, align 4 ; [#uses=2]
- %29 = icmp eq %struct.btDbvtProxy* %28, null ; [#uses=1]
- br i1 %29, label %bb7, label %bb3.preheader
-
-bb3.preheader: ; preds = %bb1
- %30 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 2 ; [#uses=3]
- %31 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %37 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.GIM_AABB* %curAabb, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %invcont4, %bb3.preheader
- %current.0 = phi %struct.btDbvtProxy* [ %41, %invcont4 ], [ %28, %bb3.preheader ] ; [#uses=16]
- %40 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 2, i32 1 ; [#uses=3]
- %41 = load %struct.btDbvtProxy** %40, align 4 ; [#uses=4]
- %42 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 2, i32 0 ; [#uses=3]
- %43 = load %struct.btDbvtProxy** %42, align 4 ; [#uses=2]
- %44 = icmp eq %struct.btDbvtProxy* %43, null ; [#uses=1]
- br i1 %44, label %bb1.i48, label %bb.i47
-
-bb.i47: ; preds = %bb3
- %45 = getelementptr inbounds %struct.btDbvtProxy* %43, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btDbvtProxy* %41, %struct.btDbvtProxy** %45, align 4
- br label %bb2.i49
-
-bb1.i48: ; preds = %bb3
- %46 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 3 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %47 ; [#uses=1]
- store %struct.btDbvtProxy* %41, %struct.btDbvtProxy** %48, align 4
- br label %bb2.i49
-
-bb2.i49: ; preds = %bb1.i48, %bb.i47
- %49 = load %struct.btDbvtProxy** %40, align 4 ; [#uses=2]
- %50 = icmp eq %struct.btDbvtProxy* %49, null ; [#uses=1]
- br i1 %50, label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit, label %bb3.i50
-
-bb3.i50: ; preds = %bb2.i49
- %51 = load %struct.btDbvtProxy** %42, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btDbvtProxy* %49, i32 0, i32 2, i32 0 ; [#uses=1]
- store %struct.btDbvtProxy* %51, %struct.btDbvtProxy** %52, align 4
- br label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb3.i50, %bb2.i49
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %42, align 4
- %53 = load %struct.btDbvtProxy** %30, align 4 ; [#uses=1]
- store %struct.btDbvtProxy* %53, %struct.btDbvtProxy** %40, align 4
- %54 = load %struct.btDbvtProxy** %30, align 4 ; [#uses=2]
- %55 = icmp eq %struct.btDbvtProxy* %54, null ; [#uses=1]
- br i1 %55, label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit, label %bb.i51
-
-bb.i51: ; preds = %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
- %56 = getelementptr inbounds %struct.btDbvtProxy* %54, i32 0, i32 2, i32 0 ; [#uses=1]
- store %struct.btDbvtProxy* %current.0, %struct.btDbvtProxy** %56, align 4
- br label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listappendI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb.i51, %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
- store %struct.btDbvtProxy* %current.0, %struct.btDbvtProxy** %30, align 4
- %57 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 1 ; [#uses=2]
- %58 = load %struct.btDbvtNode** %57, align 4 ; [#uses=1]
- invoke void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* %7, %struct.btDbvtNode* %58)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- %59 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %31, align 8
- %61 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %32, align 4
- %63 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %33, align 8
- %65 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %34, align 4
- %67 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %35, align 8
- %69 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %36, align 4
- %71 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %37, align 8
- %73 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %38, align 4
- %75 = bitcast %struct.btDbvtProxy* %current.0 to i8* ; [#uses=1]
- %76 = invoke %struct.btDbvtNode* @_ZN6btDbvt6insertERK12btDbvtAabbMmPv(%struct.btDbvt* %39, %struct.GIM_AABB* %curAabb, i8* %75)
- to label %invcont4 unwind label %lpad ; [#uses=1]
-
-invcont4: ; preds = %invcont
- store %struct.btDbvtNode* %76, %struct.btDbvtNode** %57, align 4
- %77 = getelementptr inbounds %struct.btDbvtProxy* %current.0, i32 0, i32 3 ; [#uses=1]
- store i32 2, i32* %77, align 4
- %78 = icmp eq %struct.btDbvtProxy* %41, null ; [#uses=1]
- br i1 %78, label %bb5, label %bb3
-
-bb5: ; preds = %invcont4
- %79 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 3 ; [#uses=1]
- %80 = load i32* %79, align 4 ; [#uses=1]
- store i32 %80, i32* %8, align 4
- %81 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 19 ; [#uses=1]
- store i8 1, i8* %81, align 2
- br label %bb7
-
-bb7: ; preds = %bb5, %bb1
- %82 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider8, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %82, align 8
- %83 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider8, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtBroadphase* %this, %struct.btDbvtBroadphase** %83, align 4
- %84 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 18 ; [#uses=2]
- %85 = load i8* %84, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %85, 0 ; [#uses=1]
- br i1 %toBool, label %bb18, label %bb9
-
-bb9: ; preds = %bb7
- %86 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- %87 = load %struct.btDbvtNode** %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %89 = load %struct.btDbvtNode** %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider8, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2_RNS_8ICollideE(%struct.btDbvt* %7, %struct.btDbvtNode* %89, %struct.btDbvtNode* %87, %struct.btActionInterface* %90) inlinehint
- to label %bb11 unwind label %lpad40
-
-bb11: ; preds = %bb9
- %.pre62 = load i8* %84, align 1 ; [#uses=1]
- %toBool12 = icmp eq i8 %.pre62, 0 ; [#uses=1]
- br i1 %toBool12, label %bb18, label %bb13
-
-bb13: ; preds = %bb11
- %91 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %92 = load %struct.btDbvtNode** %91, align 4 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider8, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2_RNS_8ICollideE(%struct.btDbvt* %7, %struct.btDbvtNode* %92, %struct.btDbvtNode* %92, %struct.btActionInterface* %93) inlinehint
- to label %bb18 unwind label %lpad40
-
-bb18: ; preds = %bb13, %bb11, %bb7
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %82, align 8
- %94 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 19 ; [#uses=2]
- %95 = load i8* %94, align 2 ; [#uses=1]
- %toBool19 = icmp eq i8 %95, 0 ; [#uses=1]
- br i1 %toBool19, label %bb34, label %bb20
-
-bb20: ; preds = %bb18
- %96 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %97 = load %struct..0btMultiSapOverlapFilterCallback** %96, align 4 ; [#uses=2]
- %98 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %97, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = load i32 (...)*** %98, align 4 ; [#uses=1]
- %100 = getelementptr inbounds i32 (...)** %99, i32 7 ; [#uses=1]
- %101 = load i32 (...)** %100, align 4 ; [#uses=1]
- %102 = bitcast i32 (...)* %101 to %"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %103 = call %"struct.btAlignedObjectArray<btBroadphasePair>"* %102(%struct..0btMultiSapOverlapFilterCallback* %97) ; [#uses=2]
- %104 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %103, i32 0, i32 1 ; [#uses=3]
- %105 = load i32* %104, align 4 ; [#uses=5]
- %106 = icmp sgt i32 %105, 0 ; [#uses=1]
- br i1 %106, label %bb22, label %bb34
-
-bb22: ; preds = %bb20
- %107 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 8 ; [#uses=1]
- %108 = load i32* %107, align 4 ; [#uses=1]
- %109 = mul nsw i32 %108, %105 ; [#uses=1]
- %110 = sdiv i32 %109, 100 ; [#uses=2]
- %111 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 9 ; [#uses=1]
- %112 = load i32* %111, align 4 ; [#uses=2]
- %113 = icmp sgt i32 %112, %110 ; [#uses=1]
- %114 = select i1 %113, i32 %112, i32 %110 ; [#uses=2]
- %115 = icmp slt i32 %105, %114 ; [#uses=1]
- %116 = select i1 %115, i32 %105, i32 %114 ; [#uses=3]
- %117 = icmp sgt i32 %116, 0 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 15 ; [#uses=2]
- br i1 %117, label %bb.nph, label %bb32
-
-bb.nph: ; preds = %bb22
- %119 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %103, i32 0, i32 3 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb28, %bb.nph
- %i.160 = phi i32 [ 0, %bb.nph ], [ %174, %bb28 ] ; [#uses=3]
- %ni.159 = phi i32 [ %116, %bb.nph ], [ %ni.0, %bb28 ] ; [#uses=2]
- %120 = load i32* %118, align 4 ; [#uses=1]
- %121 = add nsw i32 %120, %i.160 ; [#uses=1]
- %122 = load i32* %104, align 4 ; [#uses=1]
- %123 = srem i32 %121, %122 ; [#uses=2]
- %124 = load %struct.btBroadphasePair** %119, align 4 ; [#uses=2]
- %125 = getelementptr inbounds %struct.btBroadphasePair* %124, i32 %123, i32 0 ; [#uses=1]
- %126 = load %struct.btBroadphaseProxy** %125, align 4 ; [#uses=2]
- %127 = getelementptr inbounds %struct.btBroadphasePair* %124, i32 %123, i32 1 ; [#uses=1]
- %128 = load %struct.btBroadphaseProxy** %127, align 4 ; [#uses=2]
- %129 = getelementptr inbounds %struct.btBroadphaseProxy* %128, i32 1 ; [#uses=1]
- %130 = bitcast %struct.btBroadphaseProxy* %129 to %struct.btDbvtNode** ; [#uses=1]
- %131 = load %struct.btDbvtNode** %130, align 4 ; [#uses=6]
- %132 = getelementptr inbounds %struct.btBroadphaseProxy* %126, i32 1 ; [#uses=1]
- %133 = bitcast %struct.btBroadphaseProxy* %132 to %struct.btDbvtNode** ; [#uses=1]
- %134 = load %struct.btDbvtNode** %133, align 4 ; [#uses=6]
- %135 = getelementptr inbounds %struct.btDbvtNode* %134, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btDbvtNode* %131, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- %139 = fcmp ugt float %136, %138 ; [#uses=1]
- br i1 %139, label %bb27, label %bb.i
-
-bb.i: ; preds = %bb23
- %140 = getelementptr inbounds %struct.btDbvtNode* %134, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btDbvtNode* %131, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %143 = load float* %142, align 4 ; [#uses=1]
- %144 = fcmp ult float %141, %143 ; [#uses=1]
- br i1 %144, label %bb27, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %145 = getelementptr inbounds %struct.btDbvtNode* %134, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %146 = load float* %145, align 4 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btDbvtNode* %131, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=1]
- %149 = fcmp ugt float %146, %148 ; [#uses=1]
- br i1 %149, label %bb27, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %150 = getelementptr inbounds %struct.btDbvtNode* %134, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btDbvtNode* %131, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = fcmp ult float %151, %153 ; [#uses=1]
- br i1 %154, label %bb27, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %155 = getelementptr inbounds %struct.btDbvtNode* %134, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btDbvtNode* %131, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- %159 = fcmp ugt float %156, %158 ; [#uses=1]
- br i1 %159, label %bb27, label %_Z9IntersectRK12btDbvtAabbMmS1_.exit
-
-_Z9IntersectRK12btDbvtAabbMmS1_.exit: ; preds = %bb3.i
- %160 = getelementptr inbounds %struct.btDbvtNode* %134, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %161 = load float* %160, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btDbvtNode* %131, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %161, %163 ; [#uses=1]
- br i1 %phitmp, label %bb27, label %bb28
-
-bb27: ; preds = %_Z9IntersectRK12btDbvtAabbMmS1_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %bb23
- %164 = load %struct..0btMultiSapOverlapFilterCallback** %96, align 4 ; [#uses=2]
- %165 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %164, i32 0, i32 0, i32 0 ; [#uses=1]
- %166 = load i32 (...)*** %165, align 4 ; [#uses=1]
- %167 = getelementptr inbounds i32 (...)** %166, i32 3 ; [#uses=1]
- %168 = load i32 (...)** %167, align 4 ; [#uses=1]
- %169 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %164, i32 0, i32 0 ; [#uses=1]
- %170 = bitcast i32 (...)* %168 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %171 = call i8* %170(%struct.btActionInterface* %169, %struct.btBroadphaseProxy* %126, %struct.btBroadphaseProxy* %128, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- %172 = add nsw i32 %ni.159, -1 ; [#uses=1]
- %173 = add nsw i32 %i.160, -1 ; [#uses=1]
- br label %bb28
-
-bb28: ; preds = %bb27, %_Z9IntersectRK12btDbvtAabbMmS1_.exit
- %ni.0 = phi i32 [ %172, %bb27 ], [ %ni.159, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ] ; [#uses=3]
- %i.0 = phi i32 [ %173, %bb27 ], [ %i.160, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ] ; [#uses=1]
- %174 = add nsw i32 %i.0, 1 ; [#uses=2]
- %175 = icmp slt i32 %174, %ni.0 ; [#uses=1]
- br i1 %175, label %bb23, label %bb30
-
-bb30: ; preds = %bb28
- %.pre61 = load i32* %104, align 4 ; [#uses=2]
- %176 = icmp sgt i32 %.pre61, 0 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 15 ; [#uses=2]
- br i1 %176, label %bb32, label %bb33
-
-bb32: ; preds = %bb30, %bb22
- %178 = phi i32* [ %177, %bb30 ], [ %118, %bb22 ] ; [#uses=2]
- %ni.1.lcssa64 = phi i32 [ %ni.0, %bb30 ], [ %116, %bb22 ] ; [#uses=1]
- %179 = phi i32 [ %.pre61, %bb30 ], [ %105, %bb22 ] ; [#uses=1]
- %180 = load i32* %178, align 4 ; [#uses=1]
- %181 = add nsw i32 %180, %ni.1.lcssa64 ; [#uses=1]
- %182 = srem i32 %181, %179 ; [#uses=1]
- store i32 %182, i32* %178, align 4
- br label %bb34
-
-bb33: ; preds = %bb30
- store i32 0, i32* %177, align 4
- br label %bb34
-
-bb34: ; preds = %bb33, %bb32, %bb20, %bb18
- %183 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 14 ; [#uses=2]
- %184 = load i32* %183, align 4 ; [#uses=1]
- %185 = add nsw i32 %184, 1 ; [#uses=1]
- store i32 %185, i32* %183, align 4
- %186 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 9 ; [#uses=1]
- store i32 1, i32* %186, align 4
- store i8 0, i8* %94, align 2
- %187 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 11 ; [#uses=2]
- %188 = load i32* %187, align 4 ; [#uses=3]
- %189 = icmp eq i32 %188, 0 ; [#uses=1]
- br i1 %189, label %bb36, label %bb35
-
-bb35: ; preds = %bb34
- %190 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=1]
- %191 = load i32* %190, align 4 ; [#uses=2]
- %192 = uitofp i32 %191 to float ; [#uses=1]
- %193 = uitofp i32 %188 to float ; [#uses=1]
- %194 = fdiv float %192, %193 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 13 ; [#uses=1]
- store float %194, float* %195, align 4
- br label %bb37
-
-bb36: ; preds = %bb34
- %196 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %196, align 4
- %.phi.trans.insert = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=1]
- %.pre = load i32* %.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb37
-
-bb37: ; preds = %bb36, %bb35
- %197 = phi i32 [ %.pre, %bb36 ], [ %191, %bb35 ] ; [#uses=1]
- %198 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=1]
- %199 = lshr i32 %197, 1 ; [#uses=1]
- store i32 %199, i32* %198, align 4
- %200 = lshr i32 %188, 1 ; [#uses=1]
- store i32 %200, i32* %187, align 4
- ret void
-
-lpad: ; preds = %invcont, %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-lpad40: ; preds = %bb13, %bb9
- %eh_ptr41 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %82, align 8
- br label %Unwind
-
-Unwind: ; preds = %lpad40, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr41, %lpad40 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase22performDeferredRemovalEP12btDispatcher(%struct.btDbvtBroadphase* nocapture %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %3 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=3]
- %4 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 14 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %10 = call zeroext i8 %9(%struct..0btMultiSapOverlapFilterCallback* %4) ; [#uses=1]
- %toBool = icmp eq i8 %10, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %11 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %11, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 7 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to %"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %17 = call %"struct.btAlignedObjectArray<btBroadphasePair>"* %16(%struct..0btMultiSapOverlapFilterCallback* %11) ; [#uses=5]
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %17, i32 0, i32 1 ; [#uses=4]
- %19 = load i32* %18, align 4 ; [#uses=3]
- %20 = icmp sgt i32 %19, 1 ; [#uses=1]
- br i1 %20, label %bb.i, label %bb15.preheader
-
-bb.i: ; preds = %bb
- %21 = add nsw i32 %19, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %17, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 0, i32 %21) nounwind
- %.pre = load i32* %18, align 4 ; [#uses=1]
- br label %bb15.preheader
-
-bb15.preheader: ; preds = %bb.i, %bb
- %22 = phi i32 [ %19, %bb ], [ %.pre, %bb.i ] ; [#uses=2]
- %23 = icmp sgt i32 %22, 0 ; [#uses=1]
- br i1 %23, label %bb.nph, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-bb.nph: ; preds = %bb15.preheader
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %17, i32 0, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb14, %bb.nph
- %i.041 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb14 ] ; [#uses=5]
- %invalidPair.140 = phi i32 [ 0, %bb.nph ], [ %invalidPair.0, %bb14 ] ; [#uses=2]
- %previousPair.1.039 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %72, %bb14 ] ; [#uses=1]
- %previousPair.0.038 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %26, %bb14 ] ; [#uses=1]
- %tmp = add i32 %i.041, 1 ; [#uses=2]
- %25 = load %struct.btBroadphasePair** %24, align 4 ; [#uses=4]
- %scevgep4243 = getelementptr inbounds %struct.btBroadphasePair* %25, i32 %i.041, i32 0 ; [#uses=2]
- %26 = load %struct.btBroadphaseProxy** %scevgep4243, align 4 ; [#uses=3]
- %27 = icmp eq %struct.btBroadphaseProxy* %26, %previousPair.0.038 ; [#uses=1]
- %scevgep52 = getelementptr %struct.btBroadphasePair* %25, i32 %i.041, i32 1 ; [#uses=1]
- %28 = load %struct.btBroadphaseProxy** %scevgep52, align 4 ; [#uses=10]
- %phitmp = icmp eq %struct.btBroadphaseProxy* %28, %previousPair.1.039 ; [#uses=1]
- %or.cond = and i1 %27, %phitmp ; [#uses=1]
- br i1 %or.cond, label %bb13, label %bb6
-
-bb6: ; preds = %bb1
- %29 = getelementptr inbounds %struct.btBroadphaseProxy* %28, i32 1 ; [#uses=1]
- %30 = bitcast %struct.btBroadphaseProxy* %29 to %struct.btDbvtNode** ; [#uses=1]
- %31 = load %struct.btDbvtNode** %30, align 4 ; [#uses=6]
- %32 = getelementptr inbounds %struct.btBroadphaseProxy* %26, i32 1 ; [#uses=1]
- %33 = bitcast %struct.btBroadphaseProxy* %32 to %struct.btDbvtNode** ; [#uses=1]
- %34 = load %struct.btDbvtNode** %33, align 4 ; [#uses=6]
- %35 = getelementptr inbounds %struct.btDbvtNode* %34, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fcmp ugt float %36, %38 ; [#uses=1]
- br i1 %39, label %bb13, label %bb.i28
-
-bb.i28: ; preds = %bb6
- %40 = getelementptr inbounds %struct.btDbvtNode* %34, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fcmp ult float %41, %43 ; [#uses=1]
- br i1 %44, label %bb13, label %bb1.i
-
-bb1.i: ; preds = %bb.i28
- %45 = getelementptr inbounds %struct.btDbvtNode* %34, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fcmp ugt float %46, %48 ; [#uses=1]
- br i1 %49, label %bb13, label %bb2.i29
-
-bb2.i29: ; preds = %bb1.i
- %50 = getelementptr inbounds %struct.btDbvtNode* %34, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = fcmp ult float %51, %53 ; [#uses=1]
- br i1 %54, label %bb13, label %bb3.i
-
-bb3.i: ; preds = %bb2.i29
- %55 = getelementptr inbounds %struct.btDbvtNode* %34, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fcmp ugt float %56, %58 ; [#uses=1]
- br i1 %59, label %bb13, label %_Z9IntersectRK12btDbvtAabbMmS1_.exit
-
-_Z9IntersectRK12btDbvtAabbMmS1_.exit: ; preds = %bb3.i
- %60 = getelementptr inbounds %struct.btDbvtNode* %34, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btDbvtNode* %31, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %phitmp37 = fcmp ult float %61, %63 ; [#uses=1]
- br i1 %phitmp37, label %bb13, label %bb14
-
-bb13: ; preds = %_Z9IntersectRK12btDbvtAabbMmS1_.exit, %bb3.i, %bb2.i29, %bb1.i, %bb.i28, %bb6, %bb1
- %64 = phi %struct.btBroadphaseProxy* [ %28, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ], [ %28, %bb3.i ], [ %28, %bb2.i29 ], [ %28, %bb1.i ], [ %28, %bb.i28 ], [ %28, %bb6 ], [ %28, %bb1 ] ; [#uses=1]
- %65 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %66 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %65, i32 0, i32 0, i32 0 ; [#uses=1]
- %67 = load i32 (...)*** %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds i32 (...)** %67, i32 8 ; [#uses=1]
- %69 = load i32 (...)** %68, align 4 ; [#uses=1]
- %70 = bitcast i32 (...)* %69 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- %scevgep = getelementptr %struct.btBroadphasePair* %25, i32 %i.041 ; [#uses=1]
- call void %70(%struct..0btMultiSapOverlapFilterCallback* %65, %struct.btBroadphasePair* %scevgep, %struct.btActionInterface* %dispatcher)
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep4243, align 4
- %scevgep48 = getelementptr %struct.btBroadphasePair* %25, i32 %i.041, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep48, align 4
- %71 = add nsw i32 %invalidPair.140, 1 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb13, %_Z9IntersectRK12btDbvtAabbMmS1_.exit
- %72 = phi %struct.btBroadphaseProxy* [ %64, %bb13 ], [ %28, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ] ; [#uses=1]
- %invalidPair.0 = phi i32 [ %71, %bb13 ], [ %invalidPair.140, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ] ; [#uses=3]
- %73 = load i32* %18, align 4 ; [#uses=4]
- %74 = icmp sgt i32 %73, %tmp ; [#uses=1]
- br i1 %74, label %bb1, label %bb17
-
-bb17: ; preds = %bb14
- %75 = icmp sgt i32 %73, 1 ; [#uses=1]
- br i1 %75, label %bb.i24, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-bb.i24: ; preds = %bb17
- %76 = add nsw i32 %73, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %17, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %76) nounwind
- %.pre56 = load i32* %18, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit26: ; preds = %bb.i24, %bb17, %bb15.preheader
- %invalidPair.1.lcssa57 = phi i32 [ %invalidPair.0, %bb17 ], [ %invalidPair.0, %bb.i24 ], [ 0, %bb15.preheader ] ; [#uses=1]
- %77 = phi i32 [ %73, %bb17 ], [ %.pre56, %bb.i24 ], [ %22, %bb15.preheader ] ; [#uses=1]
- %78 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %78, align 8
- %79 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %79, align 4
- %80 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %80, align 8
- %81 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %81, align 4
- %82 = sub nsw i32 %77, %invalidPair.1.lcssa57 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %17, i32 %82, %struct.btBroadphasePair* %2) inlinehint
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase25calculateOverlappingPairsEP12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- tail call void @_ZN16btDbvtBroadphase7collideEP12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btActionInterface* %dispatcher)
- tail call void @_ZN16btDbvtBroadphase22performDeferredRemovalEP12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btActionInterface* %dispatcher)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btBroadphaseProxy* %absproxy, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 4 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1 ; [#uses=1]
- %4 = bitcast %struct.btBroadphaseProxy* %3 to %struct.btDbvtNode** ; [#uses=1]
- %5 = load %struct.btDbvtNode** %4, align 4 ; [#uses=2]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- tail call void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* %6, %struct.btDbvtNode* %5)
- br label %bb2
-
-bb1: ; preds = %entry
- %7 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- tail call void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* %7, %struct.btDbvtNode* %5)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %8 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 1 ; [#uses=1]
- %9 = bitcast i16* %8 to %struct.btDbvtProxy** ; [#uses=2]
- %10 = load %struct.btDbvtProxy** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btDbvtProxy* %10, null ; [#uses=1]
- %12 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 3 ; [#uses=2]
- %13 = load i8** %12, align 4 ; [#uses=1]
- %14 = bitcast i8* %13 to %struct.btDbvtProxy* ; [#uses=2]
- br i1 %11, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb2
- %15 = getelementptr inbounds %struct.btDbvtProxy* %10, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btDbvtProxy* %14, %struct.btDbvtProxy** %15, align 4
- br label %bb2.i
-
-bb1.i: ; preds = %bb2
- %16 = load i32* %0, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %16 ; [#uses=1]
- store %struct.btDbvtProxy* %14, %struct.btDbvtProxy** %17, align 4
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- %18 = load i8** %12, align 4 ; [#uses=2]
- %19 = icmp eq i8* %18, null ; [#uses=1]
- br i1 %19, label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %20 = load %struct.btDbvtProxy** %9, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i8* %18, i32 52 ; [#uses=1]
- %22 = bitcast i8* %21 to %struct.btDbvtProxy** ; [#uses=1]
- store %struct.btDbvtProxy* %20, %struct.btDbvtProxy** %22, align 4
- br label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb3.i, %bb2.i
- %23 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=1]
- %24 = load %struct..0btMultiSapOverlapFilterCallback** %23, align 4 ; [#uses=2]
- %25 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %24, i32 0, i32 0, i32 0 ; [#uses=1]
- %26 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 4 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %24, i32 0, i32 0 ; [#uses=1]
- %30 = bitcast i32 (...)* %28 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %30(%struct.btActionInterface* %29, %struct.btBroadphaseProxy* %absproxy, %struct.btActionInterface* %dispatcher)
- %31 = bitcast %struct.btBroadphaseProxy* %absproxy to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %31)
- %32 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 19 ; [#uses=1]
- store i8 1, i8* %32, align 2
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btDbvtBroadphase18setAabbForceUpdateEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btBroadphaseProxy* %absproxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* nocapture %unnamed_arg) align 2 {
-entry:
- %aabb = alloca %struct.GIM_AABB, align 8 ; [#uses=10]
- %collider = alloca %struct.btDbvtTreeCollider, align 8 ; [#uses=3]
- %0 = bitcast %struct.btBroadphaseProxy* %absproxy to %struct.btDbvtProxy* ; [#uses=2]
- %1 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 8
- %4 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 8
- %10 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 8
- %16 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 8
- %22 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 4 ; [#uses=3]
- %26 = load i32* %25, align 4 ; [#uses=1]
- %27 = icmp eq i32 %26, 2 ; [#uses=1]
- br i1 %27, label %bb, label %bb1
-
-bb: ; preds = %entry
- %28 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1 ; [#uses=1]
- %29 = bitcast %struct.btBroadphaseProxy* %28 to %struct.btDbvtNode** ; [#uses=1]
- %30 = load %struct.btDbvtNode** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- call void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* %31, %struct.btDbvtNode* %30)
- %32 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %33 = bitcast %struct.btBroadphaseProxy* %absproxy to i8* ; [#uses=1]
- %34 = call %struct.btDbvtNode* @_ZN6btDbvt6insertERK12btDbvtAabbMmPv(%struct.btDbvt* %32, %struct.GIM_AABB* %aabb, i8* %33) ; [#uses=1]
- %35 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 0 ; [#uses=1]
- %.c = bitcast %struct.btDbvtNode* %34 to i8* ; [#uses=1]
- store i8* %.c, i8** %35, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- %36 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 11 ; [#uses=2]
- %37 = load i32* %36, align 4 ; [#uses=1]
- %38 = add i32 %37, 1 ; [#uses=1]
- store i32 %38, i32* %36, align 4
- %39 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1 ; [#uses=1]
- %40 = bitcast %struct.btBroadphaseProxy* %39 to %struct.btDbvtNode** ; [#uses=1]
- %41 = load %struct.btDbvtNode** %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- call void @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm(%struct.btDbvt* %42, %struct.btDbvtNode* %41, %struct.GIM_AABB* %aabb)
- %43 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=2]
- %44 = load i32* %43, align 4 ; [#uses=1]
- %45 = add i32 %44, 1 ; [#uses=1]
- store i32 %45, i32* %43, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %46 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 1 ; [#uses=1]
- %47 = bitcast i16* %46 to %struct.btDbvtProxy** ; [#uses=3]
- %48 = load %struct.btDbvtProxy** %47, align 4 ; [#uses=2]
- %49 = icmp eq %struct.btDbvtProxy* %48, null ; [#uses=1]
- %50 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 3 ; [#uses=3]
- %51 = load i8** %50, align 4 ; [#uses=1]
- %52 = bitcast i8* %51 to %struct.btDbvtProxy* ; [#uses=2]
- br i1 %49, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb2
- %53 = getelementptr inbounds %struct.btDbvtProxy* %48, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btDbvtProxy* %52, %struct.btDbvtProxy** %53, align 4
- br label %bb2.i
-
-bb1.i: ; preds = %bb2
- %54 = load i32* %25, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %54 ; [#uses=1]
- store %struct.btDbvtProxy* %52, %struct.btDbvtProxy** %55, align 4
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- %56 = load i8** %50, align 4 ; [#uses=2]
- %57 = icmp eq i8* %56, null ; [#uses=1]
- br i1 %57, label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %58 = load %struct.btDbvtProxy** %47, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i8* %56, i32 52 ; [#uses=1]
- %60 = bitcast i8* %59 to %struct.btDbvtProxy** ; [#uses=1]
- store %struct.btDbvtProxy* %58, %struct.btDbvtProxy** %60, align 4
- br label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb3.i, %bb2.i
- %61 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %2, align 4 ; [#uses=1]
- store float %62, float* %61, align 4
- %63 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %5, align 4 ; [#uses=1]
- store float %64, float* %63, align 4
- %65 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %8, align 4 ; [#uses=1]
- store float %66, float* %65, align 4
- %67 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %68 = load float* %11, align 4 ; [#uses=1]
- store float %68, float* %67, align 4
- %69 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %70 = load float* %14, align 4 ; [#uses=1]
- store float %70, float* %69, align 4
- %71 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %17, align 4 ; [#uses=1]
- store float %72, float* %71, align 4
- %73 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %20, align 4 ; [#uses=1]
- store float %74, float* %73, align 4
- %75 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %76 = load float* %23, align 4 ; [#uses=1]
- store float %76, float* %75, align 4
- %77 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 5 ; [#uses=2]
- %78 = load i32* %77, align 4 ; [#uses=1]
- store i32 %78, i32* %25, align 4
- %79 = load i32* %77, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %79 ; [#uses=3]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %47, align 4
- %81 = load %struct.btDbvtProxy** %80, align 4 ; [#uses=1]
- %.c18 = bitcast %struct.btDbvtProxy* %81 to i8* ; [#uses=1]
- store i8* %.c18, i8** %50, align 4
- %82 = load %struct.btDbvtProxy** %80, align 4 ; [#uses=2]
- %83 = icmp eq %struct.btDbvtProxy* %82, null ; [#uses=1]
- br i1 %83, label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit, label %bb.i16
-
-bb.i16: ; preds = %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
- %84 = getelementptr inbounds %struct.btDbvtProxy* %82, i32 0, i32 2, i32 0 ; [#uses=1]
- store %struct.btDbvtProxy* %0, %struct.btDbvtProxy** %84, align 4
- br label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listappendI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb.i16, %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
- store %struct.btDbvtProxy* %0, %struct.btDbvtProxy** %80, align 4
- %85 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 19 ; [#uses=1]
- store i8 1, i8* %85, align 2
- %86 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 18 ; [#uses=1]
- %87 = load i8* %86, align 1 ; [#uses=1]
- %toBool4not = icmp eq i8 %87, 0 ; [#uses=1]
- br i1 %toBool4not, label %bb8, label %bb11
-
-bb8: ; preds = %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- %88 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %88, align 8
- %89 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtBroadphase* %this, %struct.btDbvtBroadphase** %89, align 4
- %90 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1 ; [#uses=1]
- %91 = bitcast %struct.btBroadphaseProxy* %90 to %struct.btDbvtNode** ; [#uses=2]
- %92 = load %struct.btDbvtNode** %91, align 4 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- %94 = load %struct.btDbvtNode** %93, align 4 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZN6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2_RNS_8ICollideE(%struct.btDbvt* %95, %struct.btDbvtNode* %94, %struct.btDbvtNode* %92, %struct.btActionInterface* %96) inlinehint
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb8
- %97 = load %struct.btDbvtNode** %91, align 4 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %99 = load %struct.btDbvtNode** %98, align 4 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- invoke void @_ZN6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2_RNS_8ICollideE(%struct.btDbvt* %100, %struct.btDbvtNode* %99, %struct.btDbvtNode* %97, %struct.btActionInterface* %96) inlinehint
- to label %bb11 unwind label %lpad
-
-bb11: ; preds = %invcont, %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- ret void
-
-lpad: ; preds = %invcont, %bb8
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select14 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %88, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcher(%struct.btDbvtBroadphase* %this, %struct.btBroadphaseProxy* %absproxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* nocapture %unnamed_arg) align 2 {
-entry:
- %aabb = alloca %struct.GIM_AABB, align 8 ; [#uses=11]
- %velocity = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %collider = alloca %struct.btDbvtTreeCollider, align 8 ; [#uses=3]
- %0 = bitcast %struct.btBroadphaseProxy* %absproxy to %struct.btDbvtProxy* ; [#uses=2]
- %1 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load float* %2, align 4 ; [#uses=2]
- store float %3, float* %1, align 8
- %4 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=3]
- %6 = load float* %5, align 4 ; [#uses=2]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=3]
- %9 = load float* %8, align 4 ; [#uses=2]
- store float %9, float* %7, align 8
- %10 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=2]
- store float %15, float* %13, align 8
- %16 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=2]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=2]
- store float %21, float* %19, align 8
- %22 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 4 ; [#uses=3]
- %26 = load i32* %25, align 4 ; [#uses=1]
- %27 = icmp eq i32 %26, 2 ; [#uses=1]
- br i1 %27, label %bb, label %bb1
-
-bb: ; preds = %entry
- %28 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1 ; [#uses=1]
- %29 = bitcast %struct.btBroadphaseProxy* %28 to %struct.btDbvtNode** ; [#uses=1]
- %30 = load %struct.btDbvtNode** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- call void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* %31, %struct.btDbvtNode* %30)
- %32 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %33 = bitcast %struct.btBroadphaseProxy* %absproxy to i8* ; [#uses=1]
- %34 = call %struct.btDbvtNode* @_ZN6btDbvt6insertERK12btDbvtAabbMmPv(%struct.btDbvt* %32, %struct.GIM_AABB* %aabb, i8* %33) ; [#uses=1]
- %35 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 0 ; [#uses=1]
- %.c = bitcast %struct.btDbvtNode* %34 to i8* ; [#uses=1]
- store i8* %.c, i8** %35, align 4
- br label %bb15
-
-bb1: ; preds = %entry
- %36 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 11 ; [#uses=2]
- %37 = load i32* %36, align 4 ; [#uses=1]
- %38 = add i32 %37, 1 ; [#uses=1]
- store i32 %38, i32* %36, align 4
- %39 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1 ; [#uses=1]
- %40 = bitcast %struct.btBroadphaseProxy* %39 to %struct.btDbvtNode** ; [#uses=1]
- %41 = load %struct.btDbvtNode** %40, align 4 ; [#uses=8]
- %42 = getelementptr inbounds %struct.btDbvtNode* %41, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fcmp ugt float %43, %15 ; [#uses=1]
- br i1 %44, label %bb14, label %bb.i
-
-bb.i: ; preds = %bb1
- %45 = getelementptr inbounds %struct.btDbvtNode* %41, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fcmp ult float %46, %3 ; [#uses=1]
- br i1 %47, label %bb14, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %48 = getelementptr inbounds %struct.btDbvtNode* %41, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fcmp ugt float %49, %18 ; [#uses=1]
- br i1 %50, label %bb14, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %51 = getelementptr inbounds %struct.btDbvtNode* %41, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fcmp ult float %52, %6 ; [#uses=1]
- br i1 %53, label %bb14, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %54 = getelementptr inbounds %struct.btDbvtNode* %41, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fcmp ugt float %55, %21 ; [#uses=1]
- br i1 %56, label %bb14, label %_Z9IntersectRK12btDbvtAabbMmS1_.exit
-
-_Z9IntersectRK12btDbvtAabbMmS1_.exit: ; preds = %bb3.i
- %57 = getelementptr inbounds %struct.btDbvtNode* %41, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %58, %9 ; [#uses=1]
- br i1 %phitmp, label %bb14, label %bb2
-
-bb2: ; preds = %_Z9IntersectRK12btDbvtAabbMmS1_.exit
- %59 = load float* %8, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=2]
- %62 = fsub float %59, %61 ; [#uses=1]
- %63 = load float* %5, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=2]
- %66 = fsub float %63, %65 ; [#uses=1]
- %67 = load float* %2, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=2]
- %70 = fsub float %67, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fsub float %73, %61 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fsub float %76, %65 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = fsub float %79, %69 ; [#uses=1]
- %81 = fmul float %74, 5.000000e-01 ; [#uses=1]
- %82 = fmul float %77, 5.000000e-01 ; [#uses=1]
- %83 = fmul float %80, 5.000000e-01 ; [#uses=1]
- %84 = load float* %71, align 4 ; [#uses=3]
- %85 = fmul float %81, %84 ; [#uses=2]
- %86 = fmul float %82, %84 ; [#uses=2]
- %87 = fmul float %83, %84 ; [#uses=2]
- %88 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %87, float* %88, align 8
- %89 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %86, float* %89, align 4
- %90 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %85, float* %90, align 8
- %91 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %91, align 4
- %92 = fcmp olt float %70, 0.000000e+00 ; [#uses=1]
- br i1 %92, label %bb4, label %bb5
-
-bb4: ; preds = %bb2
- %93 = fsub float -0.000000e+00, %87 ; [#uses=1]
- store float %93, float* %88, align 8
- br label %bb5
-
-bb5: ; preds = %bb4, %bb2
- %94 = fcmp olt float %66, 0.000000e+00 ; [#uses=1]
- br i1 %94, label %bb7, label %bb8
-
-bb7: ; preds = %bb5
- %95 = fsub float -0.000000e+00, %86 ; [#uses=1]
- store float %95, float* %89, align 4
- br label %bb8
-
-bb8: ; preds = %bb7, %bb5
- %96 = fcmp olt float %62, 0.000000e+00 ; [#uses=1]
- br i1 %96, label %bb10, label %bb11
-
-bb10: ; preds = %bb8
- %97 = fsub float -0.000000e+00, %85 ; [#uses=1]
- store float %97, float* %90, align 8
- br label %bb11
-
-bb11: ; preds = %bb10, %bb8
- %98 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %99 = call zeroext i8 @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMmRK9btVector3f(%struct.btDbvt* %98, %struct.btDbvtNode* %41, %struct.GIM_AABB* %aabb, %struct.btQuadWord* %velocity, float 0x3FA99999A0000000) ; [#uses=1]
- %toBool12 = icmp eq i8 %99, 0 ; [#uses=1]
- br i1 %toBool12, label %bb15, label %bb13
-
-bb13: ; preds = %bb11
- %100 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=2]
- %101 = load i32* %100, align 4 ; [#uses=1]
- %102 = add i32 %101, 1 ; [#uses=1]
- store i32 %102, i32* %100, align 4
- br label %bb15
-
-bb14: ; preds = %_Z9IntersectRK12btDbvtAabbMmS1_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %bb1
- %103 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- call void @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm(%struct.btDbvt* %103, %struct.btDbvtNode* %41, %struct.GIM_AABB* %aabb)
- %104 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 12 ; [#uses=2]
- %105 = load i32* %104, align 4 ; [#uses=1]
- %106 = add i32 %105, 1 ; [#uses=1]
- store i32 %106, i32* %104, align 4
- br label %bb15
-
-bb15: ; preds = %bb14, %bb13, %bb11, %bb
- %docollide.0 = phi i1 [ true, %bb ], [ true, %bb13 ], [ false, %bb11 ], [ true, %bb14 ] ; [#uses=1]
- %107 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 1 ; [#uses=1]
- %108 = bitcast i16* %107 to %struct.btDbvtProxy** ; [#uses=3]
- %109 = load %struct.btDbvtProxy** %108, align 4 ; [#uses=2]
- %110 = icmp eq %struct.btDbvtProxy* %109, null ; [#uses=1]
- %111 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1, i32 3 ; [#uses=3]
- %112 = load i8** %111, align 4 ; [#uses=1]
- %113 = bitcast i8* %112 to %struct.btDbvtProxy* ; [#uses=2]
- br i1 %110, label %bb1.i33, label %bb.i32
-
-bb.i32: ; preds = %bb15
- %114 = getelementptr inbounds %struct.btDbvtProxy* %109, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btDbvtProxy* %113, %struct.btDbvtProxy** %114, align 4
- br label %bb2.i34
-
-bb1.i33: ; preds = %bb15
- %115 = load i32* %25, align 4 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %115 ; [#uses=1]
- store %struct.btDbvtProxy* %113, %struct.btDbvtProxy** %116, align 4
- br label %bb2.i34
-
-bb2.i34: ; preds = %bb1.i33, %bb.i32
- %117 = load i8** %111, align 4 ; [#uses=2]
- %118 = icmp eq i8* %117, null ; [#uses=1]
- br i1 %118, label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit, label %bb3.i35
-
-bb3.i35: ; preds = %bb2.i34
- %119 = load %struct.btDbvtProxy** %108, align 4 ; [#uses=1]
- %120 = getelementptr inbounds i8* %117, i32 52 ; [#uses=1]
- %121 = bitcast i8* %120 to %struct.btDbvtProxy** ; [#uses=1]
- store %struct.btDbvtProxy* %119, %struct.btDbvtProxy** %121, align 4
- br label %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb3.i35, %bb2.i34
- %122 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %123 = load float* %2, align 4 ; [#uses=1]
- store float %123, float* %122, align 4
- %124 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %125 = load float* %5, align 4 ; [#uses=1]
- store float %125, float* %124, align 4
- %126 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %127 = load float* %8, align 4 ; [#uses=1]
- store float %127, float* %126, align 4
- %128 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %129 = load float* %11, align 4 ; [#uses=1]
- store float %129, float* %128, align 4
- %130 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %131 = load float* %14, align 4 ; [#uses=1]
- store float %131, float* %130, align 4
- %132 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %133 = load float* %17, align 4 ; [#uses=1]
- store float %133, float* %132, align 4
- %134 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %135 = load float* %20, align 4 ; [#uses=1]
- store float %135, float* %134, align 4
- %136 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %137 = load float* %23, align 4 ; [#uses=1]
- store float %137, float* %136, align 4
- %138 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 5 ; [#uses=2]
- %139 = load i32* %138, align 4 ; [#uses=1]
- store i32 %139, i32* %25, align 4
- %140 = load i32* %138, align 4 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %140 ; [#uses=3]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %108, align 4
- %142 = load %struct.btDbvtProxy** %141, align 4 ; [#uses=1]
- %.c48 = bitcast %struct.btDbvtProxy* %142 to i8* ; [#uses=1]
- store i8* %.c48, i8** %111, align 4
- %143 = load %struct.btDbvtProxy** %141, align 4 ; [#uses=2]
- %144 = icmp eq %struct.btDbvtProxy* %143, null ; [#uses=1]
- br i1 %144, label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit, label %bb.i30
-
-bb.i30: ; preds = %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
- %145 = getelementptr inbounds %struct.btDbvtProxy* %143, i32 0, i32 2, i32 0 ; [#uses=1]
- store %struct.btDbvtProxy* %0, %struct.btDbvtProxy** %145, align 4
- br label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listappendI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb.i30, %_Z10listremoveI11btDbvtProxyEvPT_RS2_.exit
- store %struct.btDbvtProxy* %0, %struct.btDbvtProxy** %141, align 4
- br i1 %docollide.0, label %bb17, label %bb25
-
-bb17: ; preds = %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- %146 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 19 ; [#uses=1]
- store i8 1, i8* %146, align 2
- %147 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 18 ; [#uses=1]
- %148 = load i8* %147, align 1 ; [#uses=1]
- %toBool18not = icmp eq i8 %148, 0 ; [#uses=1]
- br i1 %toBool18not, label %bb22, label %bb25
-
-bb22: ; preds = %bb17
- %149 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %149, align 8
- %150 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtBroadphase* %this, %struct.btDbvtBroadphase** %150, align 4
- %151 = getelementptr inbounds %struct.btBroadphaseProxy* %absproxy, i32 1 ; [#uses=1]
- %152 = bitcast %struct.btBroadphaseProxy* %151 to %struct.btDbvtNode** ; [#uses=2]
- %153 = load %struct.btDbvtNode** %152, align 4 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- %155 = load %struct.btDbvtNode** %154, align 4 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZN6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2_RNS_8ICollideE(%struct.btDbvt* %156, %struct.btDbvtNode* %155, %struct.btDbvtNode* %153, %struct.btActionInterface* %157) inlinehint
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb22
- %158 = load %struct.btDbvtNode** %152, align 4 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %160 = load %struct.btDbvtNode** %159, align 4 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- invoke void @_ZN6btDbvt24collideTTpersistentStackEPK10btDbvtNodeS2_RNS_8ICollideE(%struct.btDbvt* %161, %struct.btDbvtNode* %160, %struct.btDbvtNode* %158, %struct.btActionInterface* %157) inlinehint
- to label %bb25 unwind label %lpad
-
-bb25: ; preds = %invcont, %bb17, %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- ret void
-
-lpad: ; preds = %invcont, %bb22
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select28 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %149, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=5]
-define linkonce_odr void @_ZN6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS_8ICollideE(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %root, %struct.GIM_AABB* nocapture %vol, %struct.btActionInterface* %policy) inlinehint align 2 {
-entry:
- %0 = icmp eq %struct.btDbvtNode* %root, null ; [#uses=1]
- br i1 %0, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit59, label %bb.i
-
-bb.i: ; preds = %entry
- %1 = getelementptr inbounds %struct.GIM_AABB* %vol, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.GIM_AABB* %vol, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.GIM_AABB* %vol, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.GIM_AABB* %vol, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.GIM_AABB* %vol, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_AABB* %vol, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = invoke i8* @_Z22btAlignedAllocInternalji(i32 256, i32 16)
- to label %bb1.i unwind label %lpad.thread134 ; [#uses=2]
-
-lpad.thread134: ; preds = %bb.i
- %eh_ptr135 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select19136 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr135, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %invcont14
-
-bb1.i: ; preds = %bb.i
- %phitmp.i = bitcast i8* %13 to %struct.btDbvtNode** ; [#uses=2]
- %14 = icmp eq i8* %13, null ; [#uses=1]
- br i1 %14, label %bb3.preheader, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btDbvtNode* %root, %struct.btDbvtNode** %phitmp.i, align 4
- br label %bb3.preheader
-
-bb3.preheader: ; preds = %bb2.i, %bb1.i
- %15 = getelementptr inbounds %struct.btActionInterface* %policy, i32 0, i32 0 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb11, %bb3.preheader
- %stack.1.1 = phi i32 [ 1, %bb3.preheader ], [ %stack.1.0, %bb11 ] ; [#uses=8]
- %stack.2.2 = phi i32 [ 64, %bb3.preheader ], [ %stack.2.1, %bb11 ] ; [#uses=11]
- %stack.3.3 = phi %struct.btDbvtNode** [ %phitmp.i, %bb3.preheader ], [ %stack.3.1, %bb11 ] ; [#uses=16]
- %16 = add nsw i32 %stack.1.1, -1 ; [#uses=14]
- %17 = getelementptr inbounds %struct.btDbvtNode** %stack.3.3, i32 %16 ; [#uses=1]
- %18 = load %struct.btDbvtNode** %17, align 4 ; [#uses=9]
- %19 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fcmp ugt float %20, %8 ; [#uses=1]
- br i1 %21, label %bb11, label %bb.i60
-
-bb.i60: ; preds = %bb3
- %22 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ult float %23, %2 ; [#uses=1]
- br i1 %24, label %bb11, label %bb1.i61
-
-bb1.i61: ; preds = %bb.i60
- %25 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fcmp ugt float %26, %10 ; [#uses=1]
- br i1 %27, label %bb11, label %bb2.i62
-
-bb2.i62: ; preds = %bb1.i61
- %28 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fcmp ult float %29, %4 ; [#uses=1]
- br i1 %30, label %bb11, label %bb3.i63
-
-bb3.i63: ; preds = %bb2.i62
- %31 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fcmp ugt float %32, %12 ; [#uses=1]
- br i1 %33, label %bb11, label %_Z9IntersectRK12btDbvtAabbMmS1_.exit
-
-_Z9IntersectRK12btDbvtAabbMmS1_.exit: ; preds = %bb3.i63
- %34 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %phitmp = fcmp ult float %35, %6 ; [#uses=1]
- br i1 %phitmp, label %bb11, label %bb4
-
-bb4: ; preds = %_Z9IntersectRK12btDbvtAabbMmS1_.exit
- %36 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %37 = load %struct.btDbvtNode** %36, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %37, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb9, label %bb6
-
-bb6: ; preds = %bb4
- %38 = getelementptr inbounds %struct.btDbvtNode* %18, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %39 = load %struct.btDbvtNode** %38, align 4 ; [#uses=1]
- %40 = icmp eq i32 %stack.2.2, %16 ; [#uses=1]
- br i1 %40, label %bb.i96, label %bb1.i118
-
-bb.i96: ; preds = %bb6
- %41 = icmp eq i32 %16, 0 ; [#uses=1]
- %42 = shl i32 %16, 1 ; [#uses=1]
- %iftmp.288.0.i.i95 = select i1 %41, i32 1, i32 %42 ; [#uses=5]
- %43 = icmp slt i32 %stack.2.2, %iftmp.288.0.i.i95 ; [#uses=1]
- br i1 %43, label %bb.i.i97, label %bb1.i118
-
-bb.i.i97: ; preds = %bb.i96
- %44 = icmp eq i32 %iftmp.288.0.i.i95, 0 ; [#uses=1]
- br i1 %44, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i101, label %bb.i2.i.i100
-
-bb.i2.i.i100: ; preds = %bb.i.i97
- %45 = shl i32 %iftmp.288.0.i.i95, 2 ; [#uses=1]
- %46 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %45, i32 16)
- to label %.noexc122 unwind label %lpad ; [#uses=1]
-
-.noexc122: ; preds = %bb.i2.i.i100
- %phitmp.i.i98 = bitcast i8* %46 to %struct.btDbvtNode** ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i101
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i101: ; preds = %.noexc122, %bb.i.i97
- %47 = phi %struct.btDbvtNode** [ %phitmp.i.i98, %.noexc122 ], [ null, %bb.i.i97 ] ; [#uses=3]
- %48 = icmp sgt i32 %16, 0 ; [#uses=1]
- br i1 %48, label %bb.i4.i.i105, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i111
-
-bb.i4.i.i105: ; preds = %bb3.i.i.i110, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i101
- %indvar.i.i.i103 = phi i32 [ %indvar.next.i.i.i108, %bb3.i.i.i110 ], [ 0, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i101 ] ; [#uses=3]
- %scevgep.i.i.i104 = getelementptr %struct.btDbvtNode** %47, i32 %indvar.i.i.i103 ; [#uses=2]
- %49 = icmp eq %struct.btDbvtNode** %scevgep.i.i.i104, null ; [#uses=1]
- br i1 %49, label %bb3.i.i.i110, label %bb1.i5.i.i107
-
-bb1.i5.i.i107: ; preds = %bb.i4.i.i105
- %scevgep8.i.i.i106 = getelementptr %struct.btDbvtNode** %stack.3.3, i32 %indvar.i.i.i103 ; [#uses=1]
- %50 = load %struct.btDbvtNode** %scevgep8.i.i.i106, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %50, %struct.btDbvtNode** %scevgep.i.i.i104, align 4
- br label %bb3.i.i.i110
-
-bb3.i.i.i110: ; preds = %bb1.i5.i.i107, %bb.i4.i.i105
- %indvar.next.i.i.i108 = add i32 %indvar.i.i.i103, 1 ; [#uses=2]
- %exitcond137 = icmp eq i32 %indvar.next.i.i.i108, %16 ; [#uses=1]
- br i1 %exitcond137, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i111, label %bb.i4.i.i105
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i111: ; preds = %bb3.i.i.i110, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i101
- %51 = icmp eq %struct.btDbvtNode** %stack.3.3, null ; [#uses=1]
- br i1 %51, label %bb1.i118, label %bb1.i.i.i114
-
-bb1.i.i.i114: ; preds = %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i111
- %52 = bitcast %struct.btDbvtNode** %stack.3.3 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %52)
- to label %bb1.i118 unwind label %lpad.thread
-
-bb1.i118: ; preds = %bb1.i.i.i114, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i111, %bb.i96, %bb6
- %stack.2.0 = phi i32 [ %stack.2.2, %bb.i96 ], [ %stack.2.2, %bb6 ], [ %iftmp.288.0.i.i95, %bb1.i.i.i114 ], [ %iftmp.288.0.i.i95, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i111 ] ; [#uses=4]
- %stack.3.0 = phi %struct.btDbvtNode** [ %stack.3.3, %bb.i96 ], [ %stack.3.3, %bb6 ], [ %47, %bb1.i.i.i114 ], [ %47, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i111 ] ; [#uses=8]
- %53 = getelementptr inbounds %struct.btDbvtNode** %stack.3.0, i32 %16 ; [#uses=2]
- %54 = icmp eq %struct.btDbvtNode** %53, null ; [#uses=1]
- br i1 %54, label %invcont7, label %bb2.i120
-
-bb2.i120: ; preds = %bb1.i118
- store %struct.btDbvtNode* %39, %struct.btDbvtNode** %53, align 4
- br label %invcont7
-
-invcont7: ; preds = %bb2.i120, %bb1.i118
- %55 = load %struct.btDbvtNode** %36, align 4 ; [#uses=1]
- %56 = icmp eq i32 %stack.2.0, %stack.1.1 ; [#uses=1]
- br i1 %56, label %bb.i66, label %bb1.i88
-
-bb.i66: ; preds = %invcont7
- %57 = icmp eq i32 %stack.1.1, 0 ; [#uses=1]
- %58 = shl i32 %stack.1.1, 1 ; [#uses=1]
- %iftmp.288.0.i.i65 = select i1 %57, i32 1, i32 %58 ; [#uses=5]
- %59 = icmp slt i32 %stack.2.0, %iftmp.288.0.i.i65 ; [#uses=1]
- br i1 %59, label %bb.i.i67, label %bb1.i88
-
-bb.i.i67: ; preds = %bb.i66
- %60 = icmp eq i32 %iftmp.288.0.i.i65, 0 ; [#uses=1]
- br i1 %60, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i71, label %bb.i2.i.i70
-
-bb.i2.i.i70: ; preds = %bb.i.i67
- %61 = shl i32 %iftmp.288.0.i.i65, 2 ; [#uses=1]
- %62 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %61, i32 16)
- to label %.noexc92 unwind label %lpad ; [#uses=1]
-
-.noexc92: ; preds = %bb.i2.i.i70
- %phitmp.i.i68 = bitcast i8* %62 to %struct.btDbvtNode** ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i71
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i71: ; preds = %.noexc92, %bb.i.i67
- %63 = phi %struct.btDbvtNode** [ %phitmp.i.i68, %.noexc92 ], [ null, %bb.i.i67 ] ; [#uses=3]
- %64 = icmp sgt i32 %stack.1.1, 0 ; [#uses=1]
- br i1 %64, label %bb.i4.i.i75, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i81
-
-bb.i4.i.i75: ; preds = %bb3.i.i.i80, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i71
- %indvar.i.i.i73 = phi i32 [ %indvar.next.i.i.i78, %bb3.i.i.i80 ], [ 0, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i71 ] ; [#uses=3]
- %scevgep.i.i.i74 = getelementptr %struct.btDbvtNode** %63, i32 %indvar.i.i.i73 ; [#uses=2]
- %65 = icmp eq %struct.btDbvtNode** %scevgep.i.i.i74, null ; [#uses=1]
- br i1 %65, label %bb3.i.i.i80, label %bb1.i5.i.i77
-
-bb1.i5.i.i77: ; preds = %bb.i4.i.i75
- %scevgep8.i.i.i76 = getelementptr %struct.btDbvtNode** %stack.3.0, i32 %indvar.i.i.i73 ; [#uses=1]
- %66 = load %struct.btDbvtNode** %scevgep8.i.i.i76, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %66, %struct.btDbvtNode** %scevgep.i.i.i74, align 4
- br label %bb3.i.i.i80
-
-bb3.i.i.i80: ; preds = %bb1.i5.i.i77, %bb.i4.i.i75
- %indvar.next.i.i.i78 = add i32 %indvar.i.i.i73, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i78, %stack.1.1 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i81, label %bb.i4.i.i75
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i81: ; preds = %bb3.i.i.i80, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i71
- %67 = icmp eq %struct.btDbvtNode** %stack.3.0, null ; [#uses=1]
- br i1 %67, label %bb1.i88, label %bb1.i.i.i84
-
-bb1.i.i.i84: ; preds = %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i81
- %68 = bitcast %struct.btDbvtNode** %stack.3.0 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %68)
- to label %bb1.i88 unwind label %lpad.thread
-
-bb1.i88: ; preds = %bb1.i.i.i84, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i81, %bb.i66, %invcont7
- %stack.2.3 = phi i32 [ %stack.2.0, %bb.i66 ], [ %stack.2.0, %invcont7 ], [ %iftmp.288.0.i.i65, %bb1.i.i.i84 ], [ %iftmp.288.0.i.i65, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i81 ] ; [#uses=1]
- %stack.3.4 = phi %struct.btDbvtNode** [ %stack.3.0, %bb.i66 ], [ %stack.3.0, %invcont7 ], [ %63, %bb1.i.i.i84 ], [ %63, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i81 ] ; [#uses=2]
- %69 = getelementptr inbounds %struct.btDbvtNode** %stack.3.4, i32 %stack.1.1 ; [#uses=2]
- %70 = icmp eq %struct.btDbvtNode** %69, null ; [#uses=1]
- br i1 %70, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit94, label %bb2.i90
-
-bb2.i90: ; preds = %bb1.i88
- store %struct.btDbvtNode* %55, %struct.btDbvtNode** %69, align 4
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit94
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit94: ; preds = %bb2.i90, %bb1.i88
- %71 = add nsw i32 %stack.1.1, 1 ; [#uses=1]
- br label %bb11
-
-bb9: ; preds = %bb4
- %72 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %73 = getelementptr inbounds i32 (...)** %72, i32 3 ; [#uses=1]
- %74 = load i32 (...)** %73, align 4 ; [#uses=1]
- %75 = bitcast i32 (...)* %74 to void (%struct.btActionInterface*, %struct.btDbvtNode*)* ; [#uses=1]
- invoke void %75(%struct.btActionInterface* %policy, %struct.btDbvtNode* %18)
- to label %bb11 unwind label %lpad
-
-bb11: ; preds = %bb9, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit94, %_Z9IntersectRK12btDbvtAabbMmS1_.exit, %bb3.i63, %bb2.i62, %bb1.i61, %bb.i60, %bb3
- %stack.1.0 = phi i32 [ %16, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ], [ %16, %bb9 ], [ %71, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit94 ], [ %16, %bb3.i63 ], [ %16, %bb2.i62 ], [ %16, %bb1.i61 ], [ %16, %bb.i60 ], [ %16, %bb3 ] ; [#uses=2]
- %stack.2.1 = phi i32 [ %stack.2.2, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ], [ %stack.2.2, %bb9 ], [ %stack.2.3, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit94 ], [ %stack.2.2, %bb3.i63 ], [ %stack.2.2, %bb2.i62 ], [ %stack.2.2, %bb1.i61 ], [ %stack.2.2, %bb.i60 ], [ %stack.2.2, %bb3 ] ; [#uses=1]
- %stack.3.1 = phi %struct.btDbvtNode** [ %stack.3.3, %_Z9IntersectRK12btDbvtAabbMmS1_.exit ], [ %stack.3.3, %bb9 ], [ %stack.3.4, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE9push_backERKS2_.exit94 ], [ %stack.3.3, %bb3.i63 ], [ %stack.3.3, %bb2.i62 ], [ %stack.3.3, %bb1.i61 ], [ %stack.3.3, %bb.i60 ], [ %stack.3.3, %bb3 ] ; [#uses=3]
- %76 = icmp sgt i32 %stack.1.0, 0 ; [#uses=1]
- br i1 %76, label %bb3, label %bb16
-
-invcont14: ; preds = %bb1.i.i.i, %lpad, %lpad.thread134
- %eh_ptr133 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr135, %lpad.thread134 ], [ %eh_ptr132, %bb1.i.i.i ] ; [#uses=1]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr133)
- unreachable
-
-bb16: ; preds = %bb11
- %77 = icmp eq %struct.btDbvtNode** %stack.3.1, null ; [#uses=1]
- br i1 %77, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit59, label %bb2.i.i.i58
-
-bb2.i.i.i58: ; preds = %bb16
- %78 = bitcast %struct.btDbvtNode** %stack.3.1 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %78)
- ret void
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit59: ; preds = %bb16, %entry
- ret void
-
-lpad.thread: ; preds = %bb1.i.i.i84, %bb1.i.i.i114
- %stack.3.2.ph = phi %struct.btDbvtNode** [ %stack.3.0, %bb1.i.i.i84 ], [ %stack.3.3, %bb1.i.i.i114 ] ; [#uses=1]
- %eh_ptr129 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select19130 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr129, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %bb1.i.i.i
-
-lpad: ; preds = %bb9, %bb.i2.i.i70, %bb.i2.i.i100
- %stack.3.2 = phi %struct.btDbvtNode** [ %stack.3.3, %bb9 ], [ %stack.3.0, %bb.i2.i.i70 ], [ %stack.3.3, %bb.i2.i.i100 ] ; [#uses=2]
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=3]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %79 = icmp eq %struct.btDbvtNode** %stack.3.2, null ; [#uses=1]
- br i1 %79, label %invcont14, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %lpad, %lpad.thread
- %stack.3.2131 = phi %struct.btDbvtNode** [ %stack.3.2.ph, %lpad.thread ], [ %stack.3.2, %lpad ] ; [#uses=1]
- %eh_ptr132 = phi i8* [ %eh_ptr129, %lpad.thread ], [ %eh_ptr, %lpad ] ; [#uses=1]
- %80 = bitcast %struct.btDbvtNode** %stack.3.2131 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %80)
- to label %invcont14 unwind label %lpad20
-
-lpad20: ; preds = %bb1.i.i.i
- %eh_ptr21 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select23 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase8aabbTestERK9btVector3S2_R24btBroadphaseAabbCallback(%struct.btDbvtBroadphase* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* %aabbCallback) align 2 {
-entry:
- %callback = alloca %struct.BroadphaseAabbTester, align 8 ; [#uses=3]
- %bounds = alloca %struct.GIM_AABB, align 8 ; [#uses=10]
- %0 = getelementptr inbounds %struct.BroadphaseAabbTester* %callback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20BroadphaseAabbTester, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct.BroadphaseAabbTester* %callback, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %aabbCallback, %struct.btActionInterface** %1, align 4
- %2 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 8
- %5 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 8
- %11 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 8
- %17 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 8
- %23 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %27 = load %struct.btDbvtNode** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.BroadphaseAabbTester* %callback, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZN6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS_8ICollideE(%struct.btDbvt* %28, %struct.btDbvtNode* %27, %struct.GIM_AABB* %bounds, %struct.btActionInterface* %29) inlinehint
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %30 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- %31 = load %struct.btDbvtNode** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- invoke void @_ZN6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS_8ICollideE(%struct.btDbvt* %32, %struct.btDbvtNode* %31, %struct.GIM_AABB* %bounds, %struct.btActionInterface* %29) inlinehint
- to label %bb2 unwind label %lpad
-
-bb2: ; preds = %invcont
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV20BroadphaseAabbTester, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define %struct.btBroadphaseProxy* @_ZN16btDbvtBroadphase11createProxyERK9btVector3S2_iPvssP12btDispatcherS3_(%struct.btDbvtBroadphase* %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, i32 %unnamed_arg, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* nocapture %unnamed_arg2, i8* nocapture %unnamed_arg4) align 2 {
-entry:
- %aabb = alloca %struct.GIM_AABB, align 8 ; [#uses=11]
- %collider = alloca %struct.btDbvtTreeCollider, align 8 ; [#uses=4]
- %0 = call i8* @_Z22btAlignedAllocInternalji(i32 64, i32 16) ; [#uses=20]
- %1 = bitcast i8* %0 to %struct.btDbvtProxy* ; [#uses=3]
- %2 = bitcast i8* %0 to i8** ; [#uses=1]
- store i8* %userPtr, i8** %2, align 4
- %3 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %4 = bitcast i8* %3 to i16* ; [#uses=1]
- store i16 %collisionFilterGroup, i16* %4, align 4
- %5 = getelementptr inbounds i8* %0, i32 6 ; [#uses=1]
- %6 = bitcast i8* %5 to i16* ; [#uses=1]
- store i16 %collisionFilterMask, i16* %6, align 2
- %7 = getelementptr inbounds i8* %0, i32 16 ; [#uses=1]
- %8 = bitcast i8* %7 to float* ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds i8* %0, i32 20 ; [#uses=1]
- %12 = bitcast i8* %11 to float* ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds i8* %0, i32 24 ; [#uses=1]
- %16 = bitcast i8* %15 to float* ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds i8* %0, i32 28 ; [#uses=1]
- %20 = bitcast i8* %19 to float* ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds i8* %0, i32 32 ; [#uses=1]
- %24 = bitcast i8* %23 to float* ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds i8* %0, i32 36 ; [#uses=1]
- %28 = bitcast i8* %27 to float* ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds i8* %0, i32 40 ; [#uses=1]
- %32 = bitcast i8* %31 to float* ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds i8* %0, i32 44 ; [#uses=1]
- %36 = bitcast i8* %35 to float* ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds i8* %0, i32 8 ; [#uses=1]
- %40 = bitcast i8* %39 to i8** ; [#uses=1]
- store i8* null, i8** %40, align 4
- %41 = getelementptr inbounds i8* %0, i32 56 ; [#uses=1]
- %42 = bitcast i8* %41 to %struct.btDbvtProxy** ; [#uses=2]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %42, align 4
- %43 = getelementptr inbounds i8* %0, i32 52 ; [#uses=1]
- %44 = bitcast i8* %43 to %struct.btDbvtProxy** ; [#uses=2]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %44, align 4
- %45 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %9, align 4 ; [#uses=1]
- store float %46, float* %45, align 8
- %47 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %13, align 4 ; [#uses=1]
- store float %48, float* %47, align 4
- %49 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %17, align 4 ; [#uses=1]
- store float %50, float* %49, align 8
- %51 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %52 = load float* %21, align 4 ; [#uses=1]
- store float %52, float* %51, align 4
- %53 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %25, align 4 ; [#uses=1]
- store float %54, float* %53, align 8
- %55 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %29, align 4 ; [#uses=1]
- store float %56, float* %55, align 4
- %57 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %33, align 4 ; [#uses=1]
- store float %58, float* %57, align 8
- %59 = getelementptr inbounds %struct.GIM_AABB* %aabb, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %37, align 4 ; [#uses=1]
- store float %60, float* %59, align 4
- %61 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 5 ; [#uses=2]
- %62 = load i32* %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds i8* %0, i32 60 ; [#uses=1]
- %64 = bitcast i8* %63 to i32* ; [#uses=1]
- store i32 %62, i32* %64, align 4
- %65 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 16 ; [#uses=2]
- %66 = load i32* %65, align 4 ; [#uses=1]
- %67 = add nsw i32 %66, 1 ; [#uses=2]
- store i32 %67, i32* %65, align 4
- %68 = getelementptr inbounds i8* %0, i32 12 ; [#uses=1]
- %69 = bitcast i8* %68 to i32* ; [#uses=1]
- store i32 %67, i32* %69, align 4
- %70 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=2]
- %71 = call %struct.btDbvtNode* @_ZN6btDbvt6insertERK12btDbvtAabbMmPv(%struct.btDbvt* %70, %struct.GIM_AABB* %aabb, i8* %0) ; [#uses=1]
- %72 = getelementptr inbounds i8* %0, i32 48 ; [#uses=1]
- %73 = bitcast i8* %72 to %struct.btDbvtNode** ; [#uses=1]
- store %struct.btDbvtNode* %71, %struct.btDbvtNode** %73, align 4
- %74 = load i32* %61, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 2, i32 %74 ; [#uses=3]
- store %struct.btDbvtProxy* null, %struct.btDbvtProxy** %44, align 4
- %76 = load %struct.btDbvtProxy** %75, align 4 ; [#uses=1]
- store %struct.btDbvtProxy* %76, %struct.btDbvtProxy** %42, align 4
- %77 = load %struct.btDbvtProxy** %75, align 4 ; [#uses=2]
- %78 = icmp eq %struct.btDbvtProxy* %77, null ; [#uses=1]
- br i1 %78, label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit, label %bb.i
-
-bb.i: ; preds = %entry
- %79 = getelementptr inbounds %struct.btDbvtProxy* %77, i32 0, i32 2, i32 0 ; [#uses=1]
- store %struct.btDbvtProxy* %1, %struct.btDbvtProxy** %79, align 4
- br label %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
-
-_Z10listappendI11btDbvtProxyEvPT_RS2_.exit: ; preds = %bb.i, %entry
- store %struct.btDbvtProxy* %1, %struct.btDbvtProxy** %75, align 4
- %80 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 18 ; [#uses=1]
- %81 = load i8* %80, align 1 ; [#uses=1]
- %toBoolnot = icmp eq i8 %81, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb11
-
-bb: ; preds = %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- %82 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %82, align 8
- %83 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 1 ; [#uses=1]
- store %struct.btDbvtBroadphase* %this, %struct.btDbvtBroadphase** %83, align 4
- %84 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 2 ; [#uses=1]
- store %struct.btDbvtProxy* %1, %struct.btDbvtProxy** %84, align 8
- %85 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %86 = load %struct.btDbvtNode** %85, align 4 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btDbvtTreeCollider* %collider, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZN6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS_8ICollideE(%struct.btDbvt* %70, %struct.btDbvtNode* %86, %struct.GIM_AABB* %aabb, %struct.btActionInterface* %87) inlinehint
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %88 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- %89 = load %struct.btDbvtNode** %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- invoke void @_ZN6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS_8ICollideE(%struct.btDbvt* %90, %struct.btDbvtNode* %89, %struct.GIM_AABB* %aabb, %struct.btActionInterface* %87) inlinehint
- to label %bb10 unwind label %lpad
-
-bb10: ; preds = %invcont
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %82, align 8
- br label %bb11
-
-bb11: ; preds = %bb10, %_Z10listappendI11btDbvtProxyEvPT_RS2_.exit
- %91 = bitcast i8* %0 to %struct.btBroadphaseProxy* ; [#uses=1]
- ret %struct.btBroadphaseProxy* %91
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select14 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV18btDbvtTreeCollider, i32 0, i32 2), i32 (...)*** %82, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZNK6btDbvt15rayTestInternalEPK10btDbvtNodeRK9btVector3S5_S5_PjfS5_S5_RNS_8ICollideE(%struct.btDbvt* nocapture %this, %struct.btDbvtNode* %root, %struct.btQuadWord* nocapture %rayFrom, %struct.btQuadWord* nocapture %rayTo, %struct.btQuadWord* nocapture %rayDirectionInverse, i32* nocapture %signs, float %lambda_max, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* %policy) inlinehint align 2 {
-entry:
- %bounds = alloca [2 x %struct.btQuadWord], align 8 ; [#uses=14]
- %0 = icmp eq %struct.btDbvtNode* %root, null ; [#uses=1]
- br i1 %0, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit34, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %1 = invoke i8* @_Z22btAlignedAllocInternalji(i32 512, i32 16)
- to label %bb7.i unwind label %lpad.thread ; [#uses=2]
-
-lpad.thread: ; preds = %bb.i.i
- %eh_ptr82 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select2283 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr82, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %invcont17
-
-bb7.i: ; preds = %bb10.i, %bb.i.i
- %indvar.i = phi i32 [ %indvar.next.i, %bb10.i ], [ 0, %bb.i.i ] ; [#uses=2]
- %tmp99 = shl i32 %indvar.i, 2 ; [#uses=1]
- %scevgep = getelementptr i8* %1, i32 %tmp99 ; [#uses=2]
- %2 = icmp eq i8* %scevgep, null ; [#uses=1]
- br i1 %2, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- %scevgep18.i = bitcast i8* %scevgep to %struct.btDbvtNode** ; [#uses=1]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %scevgep18.i, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond98 = icmp eq i32 %indvar.next.i, 128 ; [#uses=1]
- br i1 %exitcond98, label %bb4.preheader, label %bb7.i
-
-bb4.preheader: ; preds = %bb10.i
- %phitmp.i.i = bitcast i8* %1 to %struct.btDbvtNode** ; [#uses=2]
- store %struct.btDbvtNode* %root, %struct.btDbvtNode** %phitmp.i.i, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %15 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %rayFrom, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %rayDirectionInverse, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds i32* %signs, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %rayFrom, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %rayDirectionInverse, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds i32* %signs, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %rayFrom, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %rayDirectionInverse, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btActionInterface* %policy, i32 0, i32 0 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb13, %bb4.preheader
- %stack.3.4 = phi %struct.btDbvtNode** [ %phitmp.i.i, %bb4.preheader ], [ %stack.3.3, %bb13 ] ; [#uses=14]
- %stack.2.4 = phi i32 [ 128, %bb4.preheader ], [ %stack.2.3, %bb13 ] ; [#uses=9]
- %stack.1.2 = phi i32 [ 128, %bb4.preheader ], [ %stack.1.1, %bb13 ] ; [#uses=13]
- %depth.0 = phi i32 [ 1, %bb4.preheader ], [ %depth.1, %bb13 ] ; [#uses=3]
- %treshold.2 = phi i32 [ 126, %bb4.preheader ], [ %treshold.1, %bb13 ] ; [#uses=6]
- %26 = add nsw i32 %depth.0, -1 ; [#uses=7]
- %27 = getelementptr inbounds %struct.btDbvtNode** %stack.3.4, i32 %26 ; [#uses=1]
- %28 = load %struct.btDbvtNode** %27, align 4 ; [#uses=9]
- %29 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = load float* %3, align 4 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = load float* %4, align 4 ; [#uses=1]
- %36 = fsub float %34, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = load float* %5, align 4 ; [#uses=1]
- %40 = fsub float %38, %39 ; [#uses=1]
- store float %40, float* %6, align 8
- store float %36, float* %7, align 4
- store float %32, float* %8, align 8
- store float 0.000000e+00, float* %9, align 4
- %41 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = load float* %10, align 4 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = load float* %11, align 4 ; [#uses=1]
- %48 = fsub float %46, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = load float* %12, align 4 ; [#uses=1]
- %52 = fsub float %50, %51 ; [#uses=1]
- store float %52, float* %13, align 8
- store float %48, float* %14, align 4
- store float %44, float* %15, align 8
- store float 0.000000e+00, float* %16, align 4
- %53 = load i32* %signs, align 4 ; [#uses=2]
- %54 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %53, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 8 ; [#uses=1]
- %56 = load float* %17, align 4 ; [#uses=2]
- %57 = fsub float %55, %56 ; [#uses=1]
- %58 = load float* %18, align 4 ; [#uses=2]
- %59 = fmul float %57, %58 ; [#uses=3]
- %60 = sub i32 1, %53 ; [#uses=1]
- %61 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %60, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 8 ; [#uses=1]
- %63 = fsub float %62, %56 ; [#uses=1]
- %64 = fmul float %63, %58 ; [#uses=3]
- %65 = load i32* %19, align 4 ; [#uses=2]
- %66 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %65, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = load float* %20, align 4 ; [#uses=2]
- %69 = fsub float %67, %68 ; [#uses=1]
- %70 = load float* %21, align 4 ; [#uses=2]
- %71 = fmul float %69, %70 ; [#uses=3]
- %72 = sub i32 1, %65 ; [#uses=1]
- %73 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %72, i32 0, i32 1 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fsub float %74, %68 ; [#uses=1]
- %76 = fmul float %75, %70 ; [#uses=3]
- %77 = fcmp ogt float %59, %76 ; [#uses=1]
- %78 = fcmp ogt float %71, %64 ; [#uses=1]
- %or.cond.i = or i1 %77, %78 ; [#uses=1]
- br i1 %or.cond.i, label %bb13, label %bb2.i
-
-bb2.i: ; preds = %bb4
- %79 = fcmp olt float %59, %71 ; [#uses=1]
- %80 = select i1 %79, float %71, float %59 ; [#uses=3]
- %81 = fcmp olt float %76, %64 ; [#uses=1]
- %tmax.0.i = select i1 %81, float %76, float %64 ; [#uses=3]
- %82 = load i32* %22, align 4 ; [#uses=2]
- %83 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %82, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 8 ; [#uses=1]
- %85 = load float* %23, align 4 ; [#uses=2]
- %86 = fsub float %84, %85 ; [#uses=1]
- %87 = load float* %24, align 4 ; [#uses=2]
- %88 = fmul float %86, %87 ; [#uses=3]
- %89 = sub i32 1, %82 ; [#uses=1]
- %90 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %89, i32 0, i32 2 ; [#uses=1]
- %91 = load float* %90, align 8 ; [#uses=1]
- %92 = fsub float %91, %85 ; [#uses=1]
- %93 = fmul float %92, %87 ; [#uses=3]
- %94 = fcmp ogt float %80, %93 ; [#uses=1]
- %95 = fcmp ogt float %88, %tmax.0.i ; [#uses=1]
- %or.cond21.i = or i1 %94, %95 ; [#uses=1]
- br i1 %or.cond21.i, label %bb13, label %bb9.i
-
-bb9.i: ; preds = %bb2.i
- %96 = fcmp olt float %80, %88 ; [#uses=1]
- %97 = select i1 %96, float %88, float %80 ; [#uses=1]
- %98 = fcmp olt float %93, %tmax.0.i ; [#uses=1]
- %tmax.1.i = select i1 %98, float %93, float %tmax.0.i ; [#uses=1]
- %99 = fcmp uge float %97, %lambda_max ; [#uses=1]
- %100 = fcmp ule float %tmax.1.i, 0.000000e+00 ; [#uses=1]
- %or.cond22.i = or i1 %99, %100 ; [#uses=1]
- br i1 %or.cond22.i, label %bb13, label %bb6
-
-bb6: ; preds = %bb9.i
- %101 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %102 = load %struct.btDbvtNode** %101, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq %struct.btDbvtNode* %102, null ; [#uses=1]
- br i1 %toBoolnot.i, label %bb11, label %bb7
-
-bb7: ; preds = %bb6
- %103 = icmp sgt i32 %26, %treshold.2 ; [#uses=1]
- br i1 %103, label %bb8, label %bb10
-
-bb8: ; preds = %bb7
- %104 = shl i32 %stack.1.2, 1 ; [#uses=8]
- %105 = icmp sgt i32 %stack.1.2, %104 ; [#uses=1]
- br i1 %105, label %invcont9, label %bb3.i41
-
-bb3.i41: ; preds = %bb8
- %106 = icmp slt i32 %stack.1.2, %104 ; [#uses=2]
- br i1 %106, label %bb4.i42, label %invcont9
-
-bb4.i42: ; preds = %bb3.i41
- %107 = icmp slt i32 %stack.2.4, %104 ; [#uses=1]
- br i1 %107, label %bb.i.i43, label %bb.nph.i63
-
-bb.i.i43: ; preds = %bb4.i42
- %108 = icmp eq i32 %104, 0 ; [#uses=1]
- br i1 %108, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i46, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i43
- %109 = shl i32 %stack.1.2, 3 ; [#uses=1]
- %110 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %109, i32 16)
- to label %.noexc72 unwind label %lpad ; [#uses=1]
-
-.noexc72: ; preds = %bb.i2.i.i
- %phitmp.i.i44 = bitcast i8* %110 to %struct.btDbvtNode** ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i46
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i46: ; preds = %.noexc72, %bb.i.i43
- %111 = phi %struct.btDbvtNode** [ %phitmp.i.i44, %.noexc72 ], [ null, %bb.i.i43 ] ; [#uses=3]
- %112 = icmp sgt i32 %stack.1.2, 0 ; [#uses=1]
- br i1 %112, label %bb.i4.i.i50, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i56
-
-bb.i4.i.i50: ; preds = %bb3.i.i.i55, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i46
- %indvar.i.i.i48 = phi i32 [ %indvar.next.i.i.i53, %bb3.i.i.i55 ], [ 0, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i46 ] ; [#uses=3]
- %scevgep.i.i.i49 = getelementptr %struct.btDbvtNode** %111, i32 %indvar.i.i.i48 ; [#uses=2]
- %113 = icmp eq %struct.btDbvtNode** %scevgep.i.i.i49, null ; [#uses=1]
- br i1 %113, label %bb3.i.i.i55, label %bb1.i5.i.i52
-
-bb1.i5.i.i52: ; preds = %bb.i4.i.i50
- %scevgep8.i.i.i51 = getelementptr %struct.btDbvtNode** %stack.3.4, i32 %indvar.i.i.i48 ; [#uses=1]
- %114 = load %struct.btDbvtNode** %scevgep8.i.i.i51, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %114, %struct.btDbvtNode** %scevgep.i.i.i49, align 4
- br label %bb3.i.i.i55
-
-bb3.i.i.i55: ; preds = %bb1.i5.i.i52, %bb.i4.i.i50
- %indvar.next.i.i.i53 = add i32 %indvar.i.i.i48, 1 ; [#uses=2]
- %exitcond93 = icmp eq i32 %indvar.next.i.i.i53, %stack.1.2 ; [#uses=1]
- br i1 %exitcond93, label %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i56, label %bb.i4.i.i50
-
-_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i56: ; preds = %bb3.i.i.i55, %_ZN20btAlignedObjectArrayIPK10btDbvtNodeE8allocateEi.exit.i.i46
- %115 = icmp eq %struct.btDbvtNode** %stack.3.4, null ; [#uses=1]
- br i1 %115, label %bb11.preheader.i61, label %bb1.i.i.i59
-
-bb1.i.i.i59: ; preds = %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i56
- %116 = bitcast %struct.btDbvtNode** %stack.3.4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %116)
- to label %bb11.preheader.i61 unwind label %lpad.thread85
-
-lpad.thread85: ; preds = %bb1.i.i.i59
- %eh_ptr86 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select2287 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr86, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %bb1.i.i.i
-
-bb11.preheader.i61: ; preds = %bb1.i.i.i59, %_ZNK20btAlignedObjectArrayIPK10btDbvtNodeE4copyEiiPS2_.exit.i.i56
- br i1 %106, label %bb.nph.i63, label %invcont9
-
-bb.nph.i63: ; preds = %bb11.preheader.i61, %bb4.i42
- %stack.3.0 = phi %struct.btDbvtNode** [ %111, %bb11.preheader.i61 ], [ %stack.3.4, %bb4.i42 ] ; [#uses=2]
- %stack.2.0 = phi i32 [ %104, %bb11.preheader.i61 ], [ %stack.2.4, %bb4.i42 ] ; [#uses=1]
- br label %bb7.i67
-
-bb7.i67: ; preds = %bb10.i71, %bb.nph.i63
- %indvar.i64 = phi i32 [ 0, %bb.nph.i63 ], [ %indvar.next.i69, %bb10.i71 ] ; [#uses=2]
- %tmp = add i32 %stack.1.2, %indvar.i64 ; [#uses=1]
- %scevgep18.i66 = getelementptr %struct.btDbvtNode** %stack.3.0, i32 %tmp ; [#uses=2]
- %117 = icmp eq %struct.btDbvtNode** %scevgep18.i66, null ; [#uses=1]
- br i1 %117, label %bb10.i71, label %bb8.i68
-
-bb8.i68: ; preds = %bb7.i67
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %scevgep18.i66, align 4
- br label %bb10.i71
-
-bb10.i71: ; preds = %bb8.i68, %bb7.i67
- %indvar.next.i69 = add i32 %indvar.i64, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i69, %stack.1.2 ; [#uses=1]
- br i1 %exitcond, label %invcont9, label %bb7.i67
-
-invcont9: ; preds = %bb10.i71, %bb11.preheader.i61, %bb3.i41, %bb8
- %stack.2.1 = phi i32 [ %stack.2.4, %bb8 ], [ %104, %bb11.preheader.i61 ], [ %stack.2.4, %bb3.i41 ], [ %stack.2.0, %bb10.i71 ] ; [#uses=1]
- %stack.3.1 = phi %struct.btDbvtNode** [ %stack.3.4, %bb8 ], [ %111, %bb11.preheader.i61 ], [ %stack.3.4, %bb3.i41 ], [ %stack.3.0, %bb10.i71 ] ; [#uses=1]
- %118 = add nsw i32 %104, -2 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %invcont9, %bb7
- %stack.3.2 = phi %struct.btDbvtNode** [ %stack.3.1, %invcont9 ], [ %stack.3.4, %bb7 ] ; [#uses=3]
- %stack.2.2 = phi i32 [ %stack.2.1, %invcont9 ], [ %stack.2.4, %bb7 ] ; [#uses=1]
- %stack.1.0 = phi i32 [ %104, %invcont9 ], [ %stack.1.2, %bb7 ] ; [#uses=1]
- %treshold.0 = phi i32 [ %118, %invcont9 ], [ %treshold.2, %bb7 ] ; [#uses=1]
- %119 = getelementptr inbounds %struct.btDbvtNode** %stack.3.2, i32 %26 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btDbvtNode* %28, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %121 = load %struct.btDbvtNode** %120, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %121, %struct.btDbvtNode** %119, align 4
- %122 = add nsw i32 %depth.0, 1 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btDbvtNode** %stack.3.2, i32 %depth.0 ; [#uses=1]
- %124 = load %struct.btDbvtNode** %101, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %124, %struct.btDbvtNode** %123, align 4
- br label %bb13
-
-bb11: ; preds = %bb6
- %125 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %126 = getelementptr inbounds i32 (...)** %125, i32 3 ; [#uses=1]
- %127 = load i32 (...)** %126, align 4 ; [#uses=1]
- %128 = bitcast i32 (...)* %127 to void (%struct.btActionInterface*, %struct.btDbvtNode*)* ; [#uses=1]
- invoke void %128(%struct.btActionInterface* %policy, %struct.btDbvtNode* %28)
- to label %bb13 unwind label %lpad
-
-bb13: ; preds = %bb11, %bb10, %bb9.i, %bb2.i, %bb4
- %stack.3.3 = phi %struct.btDbvtNode** [ %stack.3.4, %bb9.i ], [ %stack.3.4, %bb11 ], [ %stack.3.2, %bb10 ], [ %stack.3.4, %bb2.i ], [ %stack.3.4, %bb4 ] ; [#uses=3]
- %stack.2.3 = phi i32 [ %stack.2.4, %bb9.i ], [ %stack.2.4, %bb11 ], [ %stack.2.2, %bb10 ], [ %stack.2.4, %bb2.i ], [ %stack.2.4, %bb4 ] ; [#uses=1]
- %stack.1.1 = phi i32 [ %stack.1.2, %bb9.i ], [ %stack.1.2, %bb11 ], [ %stack.1.0, %bb10 ], [ %stack.1.2, %bb2.i ], [ %stack.1.2, %bb4 ] ; [#uses=1]
- %depth.1 = phi i32 [ %26, %bb9.i ], [ %26, %bb11 ], [ %122, %bb10 ], [ %26, %bb2.i ], [ %26, %bb4 ] ; [#uses=2]
- %treshold.1 = phi i32 [ %treshold.2, %bb9.i ], [ %treshold.2, %bb11 ], [ %treshold.0, %bb10 ], [ %treshold.2, %bb2.i ], [ %treshold.2, %bb4 ] ; [#uses=1]
- %129 = icmp eq i32 %depth.1, 0 ; [#uses=1]
- br i1 %129, label %bb19, label %bb4
-
-invcont17: ; preds = %bb1.i.i.i, %lpad, %lpad.thread
- %eh_ptr84 = phi i8* [ %eh_ptr82, %lpad.thread ], [ %eh_ptr, %lpad ], [ %eh_ptr88, %bb1.i.i.i ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr84)
- unreachable
-
-bb19: ; preds = %bb13
- %130 = icmp eq %struct.btDbvtNode** %stack.3.3, null ; [#uses=1]
- br i1 %130, label %_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit34, label %bb2.i.i.i33
-
-bb2.i.i.i33: ; preds = %bb19
- %131 = bitcast %struct.btDbvtNode** %stack.3.3 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %131)
- ret void
-
-_ZN20btAlignedObjectArrayIPK10btDbvtNodeED1Ev.exit34: ; preds = %bb19, %entry
- ret void
-
-lpad: ; preds = %bb11, %bb.i2.i.i
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=3]
- %eh_select22 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %132 = icmp eq %struct.btDbvtNode** %stack.3.4, null ; [#uses=1]
- br i1 %132, label %invcont17, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %lpad, %lpad.thread85
- %eh_ptr88 = phi i8* [ %eh_ptr86, %lpad.thread85 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- %133 = bitcast %struct.btDbvtNode** %stack.3.4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %133)
- to label %invcont17 unwind label %lpad23
-
-lpad23: ; preds = %bb1.i.i.i
- %eh_ptr24 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select26 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphase7rayTestERK9btVector3S2_R23btBroadphaseRayCallbackS2_S2_(%struct.btDbvtBroadphase* nocapture %this, %struct.btQuadWord* nocapture %rayFrom, %struct.btQuadWord* nocapture %rayTo, %struct.btBroadphaseRayCallback* %rayCallback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %callback = alloca %struct.BroadphaseRayTester, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.BroadphaseRayTester* %callback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV19BroadphaseRayTester, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct.BroadphaseRayTester* %callback, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseRayCallback* %rayCallback, %struct.btBroadphaseRayCallback** %1, align 4
- %2 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 3 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 2, i32 0 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 1 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load %struct.btDbvtNode** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.BroadphaseRayTester* %callback, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZNK6btDbvt15rayTestInternalEPK10btDbvtNodeRK9btVector3S5_S5_PjfS5_S5_RNS_8ICollideE(%struct.btDbvt* %8, %struct.btDbvtNode* %7, %struct.btQuadWord* %rayFrom, %struct.btQuadWord* %rayTo, %struct.btQuadWord* %5, i32* %4, float %3, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %9) inlinehint
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %10 = load float* %2, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- %12 = load %struct.btDbvtNode** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- invoke void @_ZNK6btDbvt15rayTestInternalEPK10btDbvtNodeRK9btVector3S5_S5_PjfS5_S5_RNS_8ICollideE(%struct.btDbvt* %13, %struct.btDbvtNode* %12, %struct.btQuadWord* %rayFrom, %struct.btQuadWord* %rayTo, %struct.btQuadWord* %5, i32* %4, float %10, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %9) inlinehint
- to label %bb2 unwind label %lpad
-
-bb2: ; preds = %invcont
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV19BroadphaseRayTester, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphaseD0Ev(%struct.btDbvtBroadphase* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV16btDbvtBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 17 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb9, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %4 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- invoke void %8(%struct..0btMultiSapOverlapFilterCallback* %4)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %9 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct..0btMultiSapOverlapFilterCallback* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb9 unwind label %lpad
-
-bb4: ; preds = %lpad, %bb5
- %indvar = phi i32 [ %indvar.next, %bb5 ], [ 0, %lpad ] ; [#uses=3]
- %scevgep32.idx = mul i32 %indvar, -40 ; [#uses=1]
- %11 = icmp eq i32 %scevgep32.idx, -80 ; [#uses=1]
- br i1 %11, label %bb7, label %bb5
-
-bb5: ; preds = %bb4
- %tmp30 = sub i32 1, %indvar ; [#uses=1]
- %scevgep = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %tmp30 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep)
- to label %bb4 unwind label %lpad23
-
-bb7: ; preds = %lpad, %bb4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9: ; preds = %invcont, %entry
- %12 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1 ; [#uses=2]
- %13 = icmp eq [2 x %struct.btDbvt]* %12, null ; [#uses=1]
- br i1 %13, label %bb19, label %bb10
-
-bb10: ; preds = %bb9
- %14 = getelementptr inbounds [2 x %struct.btDbvt]* %12, i32 1, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %16 = icmp eq %struct.btDbvt* %14, %15 ; [#uses=1]
- br i1 %16, label %bb19, label %bb16
-
-bb16: ; preds = %bb16, %bb10
- %indvar34 = phi i32 [ %indvar.next35, %bb16 ], [ 0, %bb10 ] ; [#uses=2]
- %tmp37 = sub i32 1, %indvar34 ; [#uses=1]
- %scevgep38 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %tmp37 ; [#uses=1]
- tail call void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep38)
- %indvar.next35 = add i32 %indvar34, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next35, 2 ; [#uses=1]
- br i1 %exitcond, label %bb19, label %bb16
-
-bb19: ; preds = %bb16, %bb10, %bb9
- %17 = bitcast %struct.btDbvtBroadphase* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %17) nounwind
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %18 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1 ; [#uses=1]
- %19 = icmp eq [2 x %struct.btDbvt]* %18, null ; [#uses=1]
- br i1 %19, label %bb7, label %bb4
-
-lpad23: ; preds = %bb5
- %eh_ptr24 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select26 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btDbvtBroadphaseD1Ev(%struct.btDbvtBroadphase* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV16btDbvtBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 17 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb9, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %4 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- invoke void %8(%struct..0btMultiSapOverlapFilterCallback* %4)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %9 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct..0btMultiSapOverlapFilterCallback* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb9 unwind label %lpad
-
-bb4: ; preds = %lpad, %bb5
- %indvar = phi i32 [ %indvar.next, %bb5 ], [ 0, %lpad ] ; [#uses=3]
- %scevgep32.idx = mul i32 %indvar, -40 ; [#uses=1]
- %11 = icmp eq i32 %scevgep32.idx, -80 ; [#uses=1]
- br i1 %11, label %bb7, label %bb5
-
-bb5: ; preds = %bb4
- %tmp30 = sub i32 1, %indvar ; [#uses=1]
- %scevgep = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %tmp30 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep)
- to label %bb4 unwind label %lpad23
-
-bb7: ; preds = %lpad, %bb4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9: ; preds = %invcont, %entry
- %12 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1 ; [#uses=2]
- %13 = icmp eq [2 x %struct.btDbvt]* %12, null ; [#uses=1]
- br i1 %13, label %return, label %bb10
-
-bb10: ; preds = %bb9
- %14 = getelementptr inbounds [2 x %struct.btDbvt]* %12, i32 1, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %16 = icmp eq %struct.btDbvt* %14, %15 ; [#uses=1]
- br i1 %16, label %return, label %bb16
-
-bb16: ; preds = %bb16, %bb10
- %indvar34 = phi i32 [ %indvar.next35, %bb16 ], [ 0, %bb10 ] ; [#uses=2]
- %tmp37 = sub i32 1, %indvar34 ; [#uses=1]
- %scevgep38 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %tmp37 ; [#uses=1]
- tail call void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep38)
- %indvar.next35 = add i32 %indvar34, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next35, 2 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb16
-
-return: ; preds = %bb16, %bb10, %bb9
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %17 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1 ; [#uses=1]
- %18 = icmp eq [2 x %struct.btDbvt]* %17, null ; [#uses=1]
- br i1 %18, label %bb7, label %bb4
-
-lpad23: ; preds = %bb5
- %eh_ptr24 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select26 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN16btDbvtBroadphaseD2Ev(%struct.btDbvtBroadphase* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV16btDbvtBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 17 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb9, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %4 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- invoke void %8(%struct..0btMultiSapOverlapFilterCallback* %4)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %9 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct..0btMultiSapOverlapFilterCallback* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb9 unwind label %lpad
-
-bb4: ; preds = %lpad, %bb5
- %indvar = phi i32 [ %indvar.next, %bb5 ], [ 0, %lpad ] ; [#uses=3]
- %scevgep32.idx = mul i32 %indvar, -40 ; [#uses=1]
- %11 = icmp eq i32 %scevgep32.idx, -80 ; [#uses=1]
- br i1 %11, label %bb7, label %bb5
-
-bb5: ; preds = %bb4
- %tmp30 = sub i32 1, %indvar ; [#uses=1]
- %scevgep = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %tmp30 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep)
- to label %bb4 unwind label %lpad23
-
-bb7: ; preds = %lpad, %bb4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9: ; preds = %invcont, %entry
- %12 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1 ; [#uses=2]
- %13 = icmp eq [2 x %struct.btDbvt]* %12, null ; [#uses=1]
- br i1 %13, label %return, label %bb10
-
-bb10: ; preds = %bb9
- %14 = getelementptr inbounds [2 x %struct.btDbvt]* %12, i32 1, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %16 = icmp eq %struct.btDbvt* %14, %15 ; [#uses=1]
- br i1 %16, label %return, label %bb16
-
-bb16: ; preds = %bb16, %bb10
- %indvar34 = phi i32 [ %indvar.next35, %bb16 ], [ 0, %bb10 ] ; [#uses=2]
- %tmp37 = sub i32 1, %indvar34 ; [#uses=1]
- %scevgep38 = getelementptr %struct.btDbvtBroadphase* %this, i32 0, i32 1, i32 %tmp37 ; [#uses=1]
- tail call void @_ZN6btDbvtD1Ev(%struct.btDbvt* %scevgep38)
- %indvar.next35 = add i32 %indvar34, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next35, 2 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb16
-
-return: ; preds = %bb16, %bb10, %bb9
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %17 = getelementptr inbounds %struct.btDbvtBroadphase* %this, i32 0, i32 1 ; [#uses=1]
- %18 = icmp eq [2 x %struct.btDbvt]* %17, null ; [#uses=1]
- br i1 %18, label %bb7, label %bb4
-
-lpad23: ; preds = %bb5
- %eh_ptr24 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select26 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=3]
-define void @_ZN16btDbvtBroadphaseC1EP22btOverlappingPairCache(%struct.btDbvtBroadphase* %this, %struct..0btMultiSapOverlapFilterCallback* %paircache) align 2 {
-entry:
- tail call void @_ZN16btDbvtBroadphaseC2EP22btOverlappingPairCache(%struct.btDbvtBroadphase* %this, %struct..0btMultiSapOverlapFilterCallback* %paircache)
- ret void
-}
-
-; [#uses=7]
-define void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV12btDispatcher, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN12btDispatcherD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV12btDispatcher, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN12btDispatcherD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV12btDispatcher, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheEN31btMultiSapOverlapFilterCallbackC2Ev(%struct..0btMultiSapOverlapFilterCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZN20btMultiSapBroadphase23getOverlappingPairCacheEv(%struct.btMultiSapBroadphase* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZNK20btMultiSapBroadphase23getOverlappingPairCacheEv(%struct.btMultiSapBroadphase* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btMultiSapBroadphase17getBroadphaseAabbER9btVector3S1_(%struct.btMultiSapBroadphase* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- ret void
-}
-
-; [#uses=1]
-define internal zeroext i8 @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheENK31btMultiSapOverlapFilterCallback23needBroadphaseCollisionEP17btBroadphaseProxyS4_(%struct..0btMultiSapOverlapFilterCallback* nocapture %this, %struct.btBroadphaseProxy* nocapture %childProxy0, %struct.btBroadphaseProxy* nocapture %childProxy1) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %childProxy0, i32 0, i32 3 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBroadphaseProxy* %childProxy1, i32 0, i32 3 ; [#uses=1]
- %3 = load i8** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds i8* %1, i32 4 ; [#uses=1]
- %5 = bitcast i8* %4 to i16* ; [#uses=1]
- %6 = load i16* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i8* %3, i32 6 ; [#uses=1]
- %8 = bitcast i8* %7 to i16* ; [#uses=1]
- %9 = load i16* %8, align 2 ; [#uses=1]
- %10 = and i16 %9, %6 ; [#uses=1]
- %toBoolnot = icmp eq i16 %10, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb
-
-bb: ; preds = %entry
- %11 = getelementptr inbounds i8* %3, i32 4 ; [#uses=1]
- %12 = bitcast i8* %11 to i16* ; [#uses=1]
- %13 = load i16* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i8* %1, i32 6 ; [#uses=1]
- %15 = bitcast i8* %14 to i16* ; [#uses=1]
- %16 = load i16* %15, align 2 ; [#uses=1]
- %17 = and i16 %16, %13 ; [#uses=1]
- %not. = icmp ne i16 %17, 0 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb5: ; preds = %entry
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btOverlapFilterCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btOverlapFilterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btOverlapFilterCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btOverlapFilterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheEN31btMultiSapOverlapFilterCallbackD1Ev(%struct..0btMultiSapOverlapFilterCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheEN31btMultiSapOverlapFilterCallbackD0Ev(%struct..0btMultiSapOverlapFilterCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0btMultiSapOverlapFilterCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheEN31btMultiSapOverlapFilterCallbackC1Ev(%struct..0btMultiSapOverlapFilterCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher(%struct.btMultiSapBroadphase* nocapture %this, %struct.btBroadphaseProxy* nocapture %unnamed_arg, %struct.btActionInterface* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_Z23boxIsContainedWithinBoxRK9btVector3S1_S1_S1_(%struct.btQuadWord* nocapture %amin, %struct.btQuadWord* nocapture %amax, %struct.btQuadWord* nocapture %bmin, %struct.btQuadWord* nocapture %bmax) nounwind readonly {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %amin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %bmin, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fcmp ult float %1, %3 ; [#uses=1]
- br i1 %4, label %bb6, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btQuadWord* %amax, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %bmax, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %bb6, label %bb1
-
-bb1: ; preds = %bb
- %10 = getelementptr inbounds %struct.btQuadWord* %amin, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %bmin, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fcmp ult float %11, %13 ; [#uses=1]
- br i1 %14, label %bb6, label %bb2
-
-bb2: ; preds = %bb1
- %15 = getelementptr inbounds %struct.btQuadWord* %amax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %bmax, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp ugt float %16, %18 ; [#uses=1]
- br i1 %19, label %bb6, label %bb3
-
-bb3: ; preds = %bb2
- %20 = getelementptr inbounds %struct.btQuadWord* %amin, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %bmin, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ult float %21, %23 ; [#uses=1]
- br i1 %24, label %bb6, label %bb4
-
-bb4: ; preds = %bb3
- %25 = getelementptr inbounds %struct.btQuadWord* %amax, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %bmax, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %not. = fcmp ole float %26, %28 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb6: ; preds = %bb3, %bb2, %bb1, %bb, %entry
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZNK20btMultiSapBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3_(%struct.btMultiSapBroadphase* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %0, align 4 ; [#uses=1]
- store float %2, float* %1, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 3 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 4 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %12, align 4 ; [#uses=1]
- store float %14, float* %13, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 4 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btNodeOverlapCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21btNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btNodeOverlapCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21btNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherEN21MyNodeOverlapCallbackD1Ev(%struct..1MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherEN21MyNodeOverlapCallbackD0Ev(%struct..1MyNodeOverlapCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..1MyNodeOverlapCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherEN21MyNodeOverlapCallback11processNodeEii(%struct..1MyNodeOverlapCallback* nocapture %this, i32 %unnamed_arg, i32 %broadphaseIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.btMultiSapBroadphase** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMultiSapBroadphase* %1, i32 0, i32 1, i32 3 ; [#uses=1]
- %3 = load %struct.btActionInterface*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btActionInterface** %3, i32 %broadphaseIndex ; [#uses=1]
- %5 = load %struct.btActionInterface** %4, align 4 ; [#uses=4]
- %6 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %this, i32 0, i32 2 ; [#uses=2]
- %7 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"** %6, align 4 ; [#uses=9]
- %8 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 1, i32 1 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %bb3
- %10 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 1, i32 3 ; [#uses=1]
- %11 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %10, align 4 ; [#uses=1]
- %scevgep = getelementptr %"struct.btMultiSapBroadphase::btBridgeProxy"** %11, i32 %17 ; [#uses=1]
- %12 = load %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"* %12, i32 0, i32 1 ; [#uses=1]
- %14 = load %struct.btActionInterface** %13, align 4 ; [#uses=1]
- %15 = icmp eq %struct.btActionInterface* %14, %5 ; [#uses=1]
- br i1 %15, label %bb5, label %bb2
-
-bb2: ; preds = %bb
- %16 = add nsw i32 %17, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- %17 = phi i32 [ 0, %entry ], [ %16, %bb2 ] ; [#uses=4]
- %18 = icmp sgt i32 %9, %17 ; [#uses=1]
- br i1 %18, label %bb, label %bb6
-
-bb5: ; preds = %bb
- %19 = icmp slt i32 %17, 0 ; [#uses=1]
- br i1 %19, label %bb6, label %return
-
-bb6: ; preds = %bb5, %bb3
- %20 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %21 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 2 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %this, i32 0, i32 3 ; [#uses=1]
- %25 = load %struct.btActionInterface** %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = load i16* %26, align 2 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 0, i32 1 ; [#uses=1]
- %29 = load i16* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load i8** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 4 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7, i32 0, i32 2 ; [#uses=1]
- %36 = bitcast i32 (...)* %23 to %struct.btBroadphaseProxy* (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* ; [#uses=1]
- %37 = bitcast %"struct.btMultiSapBroadphase::btMultiSapProxy"* %7 to i8* ; [#uses=1]
- %38 = tail call %struct.btBroadphaseProxy* %36(%struct.btActionInterface* %5, %struct.btQuadWord* %35, %struct.btQuadWord* %34, i32 %33, i8* %31, i16 signext %29, i16 signext %27, %struct.btActionInterface* %25, i8* %37) ; [#uses=1]
- %39 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"** %6, align 4 ; [#uses=1]
- %40 = load %struct.btMultiSapBroadphase** %0, align 4 ; [#uses=1]
- tail call void @_ZN20btMultiSapBroadphase20addToChildBroadphaseEPNS_15btMultiSapProxyEP17btBroadphaseProxyP21btBroadphaseInterface(%struct.btMultiSapBroadphase* %40, %"struct.btMultiSapBroadphase::btMultiSapProxy"* %39, %struct.btBroadphaseProxy* %38, %struct.btActionInterface* %5)
- ret void
-
-return: ; preds = %bb5
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN20btMultiSapBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_(%struct.btMultiSapBroadphase* nocapture %this, %struct.btBroadphaseProxy* nocapture %childProxy0, %struct.btBroadphaseProxy* nocapture %childProxy1) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %childProxy0, i32 0, i32 3 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btBroadphaseProxy* %childProxy1, i32 0, i32 3 ; [#uses=1]
- %3 = load i8** %2, align 4 ; [#uses=6]
- %4 = getelementptr inbounds i8* %3, i32 84 ; [#uses=1]
- %5 = getelementptr inbounds i8* %1, i32 68 ; [#uses=1]
- %6 = bitcast i8* %5 to float* ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = bitcast i8* %4 to float* ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fcmp ogt float %7, %9 ; [#uses=1]
- br i1 %10, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %entry
- %11 = getelementptr inbounds i8* %1, i32 84 ; [#uses=1]
- %12 = getelementptr inbounds i8* %3, i32 68 ; [#uses=1]
- %13 = bitcast i8* %11 to float* ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = bitcast i8* %12 to float* ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fcmp olt float %14, %16 ; [#uses=1]
- br i1 %17, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb.i, %entry
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb.i
- %iftmp.123.0.i = phi i8 [ 0, %bb2.i ], [ 1, %bb.i ] ; [#uses=1]
- %18 = getelementptr inbounds i8* %1, i32 76 ; [#uses=1]
- %19 = bitcast i8* %18 to float* ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i8* %3, i32 92 ; [#uses=1]
- %22 = bitcast i8* %21 to float* ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ogt float %20, %23 ; [#uses=1]
- br i1 %24, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %25 = getelementptr inbounds i8* %1, i32 92 ; [#uses=1]
- %26 = bitcast i8* %25 to float* ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i8* %3, i32 76 ; [#uses=1]
- %29 = bitcast i8* %28 to float* ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fcmp olt float %27, %30 ; [#uses=1]
- br i1 %31, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i
- %iftmp.124.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.123.0.i, %bb4.i ] ; [#uses=1]
- %32 = getelementptr inbounds i8* %1, i32 72 ; [#uses=1]
- %33 = bitcast i8* %32 to float* ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds i8* %3, i32 88 ; [#uses=1]
- %36 = bitcast i8* %35 to float* ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fcmp ogt float %34, %37 ; [#uses=1]
- br i1 %38, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- %39 = getelementptr inbounds i8* %1, i32 88 ; [#uses=1]
- %40 = bitcast i8* %39 to float* ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i8* %3, i32 72 ; [#uses=1]
- %43 = bitcast i8* %42 to float* ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fcmp olt float %41, %44 ; [#uses=1]
- %retval.i = select i1 %45, i8 0, i8 %iftmp.124.0.i ; [#uses=1]
- ret i8 %retval.i
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphase10printStatsEv(%struct.btMultiSapBroadphase* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphase9resetPoolEP12btDispatcher(%struct.btMultiSapBroadphase* nocapture %this, %struct.btActionInterface* nocapture %dispatcher) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphase7rayTestERK9btVector3S2_R23btBroadphaseRayCallbackS2_S2_(%struct.btMultiSapBroadphase* nocapture %this, %struct.btQuadWord* nocapture %rayFrom, %struct.btQuadWord* nocapture %rayTo, %struct.btBroadphaseRayCallback* %rayCallback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.03 = phi i32 [ 0, %bb.nph ], [ %14, %bb ] ; [#uses=2]
- %6 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 2 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %4, align 4 ; [#uses=1]
- %scevgep = getelementptr %"struct.btMultiSapBroadphase::btMultiSapProxy"** %9, i32 %i.03 ; [#uses=1]
- %10 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"** %scevgep, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %10, i32 0, i32 0 ; [#uses=1]
- %12 = bitcast i32 (...)* %8 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %13 = tail call zeroext i8 %12(%struct.btActionInterface* %5, %struct.btBroadphaseProxy* %11) ; [#uses=0]
- %14 = add nsw i32 %i.03, 1 ; [#uses=2]
- %15 = load i32* %0, align 4 ; [#uses=1]
- %16 = icmp sgt i32 %15, %14 ; [#uses=1]
- br i1 %16, label %bb, label %return
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI37btMultiSapBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %CompareFunc, i32 %lo, i32 %hi) nounwind align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=3]
- %4 = add nsw i32 %hi, %lo ; [#uses=1]
- %5 = sdiv i32 %4, 2 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 %5, i32 0 ; [#uses=1]
- %7 = load %struct.btBroadphaseProxy** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 %5, i32 1 ; [#uses=1]
- %9 = load %struct.btBroadphaseProxy** %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 %5, i32 2 ; [#uses=1]
- %11 = load %struct.btCollisionAlgorithm** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btBroadphaseProxy* %7, null ; [#uses=2]
- %13 = icmp eq %struct.btBroadphaseProxy* %9, null ; [#uses=2]
- %14 = getelementptr inbounds %struct.btBroadphaseProxy* %9, i32 0, i32 3 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btBroadphaseProxy* %7, i32 0, i32 3 ; [#uses=2]
- br label %bb1.outer
-
-bb1.outer: ; preds = %bb7, %entry
- %i.0.ph = phi i32 [ %lo, %entry ], [ %i.1, %bb7 ] ; [#uses=1]
- %j.1.ph = phi i32 [ %hi, %entry ], [ %j.2, %bb7 ] ; [#uses=1]
- %16 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=8]
- br label %bb1
-
-bb: ; preds = %_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit, %bb12.i, %bb11.i
- %indvar.next44 = add i32 %indvar43, 1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %bb1.outer
- %indvar43 = phi i32 [ 0, %bb1.outer ], [ %indvar.next44, %bb ] ; [#uses=2]
- %i.0 = add i32 %i.0.ph, %indvar43 ; [#uses=7]
- %scevgep46 = getelementptr %struct.btBroadphasePair* %16, i32 %i.0, i32 2 ; [#uses=3]
- %scevgep47 = getelementptr %struct.btBroadphasePair* %16, i32 %i.0, i32 1 ; [#uses=2]
- %scevgep4849 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %i.0, i32 0 ; [#uses=2]
- %17 = load %struct.btBroadphaseProxy** %scevgep4849, align 4 ; [#uses=3]
- %18 = icmp eq %struct.btBroadphaseProxy* %17, null ; [#uses=1]
- br i1 %18, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %bb1
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %17, i32 0, i32 3 ; [#uses=1]
- %20 = load i8** %19, align 4 ; [#uses=1]
- %21 = bitcast i8* %20 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb2.i
-
-bb2.i: ; preds = %bb.i, %bb1
- %iftmp.170.0.i = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %21, %bb.i ], [ null, %bb1 ] ; [#uses=3]
- %22 = load %struct.btBroadphaseProxy** %scevgep47, align 4 ; [#uses=3]
- %23 = icmp eq %struct.btBroadphaseProxy* %22, null ; [#uses=1]
- br i1 %23, label %bb5.i, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %24 = getelementptr inbounds %struct.btBroadphaseProxy* %22, i32 0, i32 3 ; [#uses=1]
- %25 = load i8** %24, align 4 ; [#uses=1]
- %26 = bitcast i8* %25 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb5.i
-
-bb5.i: ; preds = %bb3.i, %bb2.i
- %iftmp.171.0.i = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %26, %bb3.i ], [ null, %bb2.i ] ; [#uses=2]
- br i1 %12, label %bb8.i, label %bb6.i
-
-bb6.i: ; preds = %bb5.i
- %27 = load i8** %15, align 4 ; [#uses=1]
- %28 = bitcast i8* %27 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb8.i
-
-bb8.i: ; preds = %bb6.i, %bb5.i
- %iftmp.172.0.i = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %28, %bb6.i ], [ null, %bb5.i ] ; [#uses=3]
- br i1 %13, label %bb11.i, label %bb9.i
-
-bb9.i: ; preds = %bb8.i
- %29 = load i8** %14, align 4 ; [#uses=1]
- %30 = bitcast i8* %29 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb11.i
-
-bb11.i: ; preds = %bb9.i, %bb8.i
- %iftmp.173.0.i = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %30, %bb9.i ], [ null, %bb8.i ] ; [#uses=2]
- %31 = icmp ugt %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.170.0.i, %iftmp.172.0.i ; [#uses=1]
- br i1 %31, label %bb, label %bb12.i
-
-bb12.i: ; preds = %bb11.i
- %32 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.170.0.i, %iftmp.172.0.i ; [#uses=1]
- %33 = icmp ugt %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.171.0.i, %iftmp.173.0.i ; [#uses=1]
- %34 = and i1 %32, %33 ; [#uses=1]
- br i1 %34, label %bb, label %bb15.i
-
-bb15.i: ; preds = %bb12.i
- %notlhs.i = icmp ne %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.170.0.i, %iftmp.172.0.i ; [#uses=1]
- %notrhs.i = icmp ne %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.171.0.i, %iftmp.173.0.i ; [#uses=1]
- %toBool18not.i = or i1 %notrhs.i, %notlhs.i ; [#uses=1]
- br i1 %toBool18not.i, label %bb3, label %_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit
-
-_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit: ; preds = %bb15.i
- %35 = load %struct.btCollisionAlgorithm** %scevgep46, align 4 ; [#uses=1]
- %phitmp = icmp ugt %struct.btCollisionAlgorithm* %35, %11 ; [#uses=1]
- br i1 %phitmp, label %bb, label %bb3
-
-bb2: ; preds = %_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit34, %bb12.i25, %bb11.i24
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit, %bb15.i
- %indvar = phi i32 [ %indvar.next, %bb2 ], [ 0, %bb15.i ], [ 0, %_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit ] ; [#uses=2]
- %j.0 = sub i32 %j.1.ph, %indvar ; [#uses=11]
- %scevgep = getelementptr %struct.btBroadphasePair* %16, i32 %j.0, i32 2 ; [#uses=2]
- %scevgep40 = getelementptr %struct.btBroadphasePair* %16, i32 %j.0, i32 1 ; [#uses=1]
- %scevgep4142 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %j.0, i32 0 ; [#uses=1]
- br i1 %12, label %bb2.i15, label %bb.i13
-
-bb.i13: ; preds = %bb3
- %36 = load i8** %15, align 4 ; [#uses=1]
- %37 = bitcast i8* %36 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb2.i15
-
-bb2.i15: ; preds = %bb.i13, %bb3
- %iftmp.170.0.i14 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %37, %bb.i13 ], [ null, %bb3 ] ; [#uses=3]
- br i1 %13, label %bb5.i18, label %bb3.i16
-
-bb3.i16: ; preds = %bb2.i15
- %38 = load i8** %14, align 4 ; [#uses=1]
- %39 = bitcast i8* %38 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb5.i18
-
-bb5.i18: ; preds = %bb3.i16, %bb2.i15
- %iftmp.171.0.i17 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %39, %bb3.i16 ], [ null, %bb2.i15 ] ; [#uses=2]
- %40 = load %struct.btBroadphaseProxy** %scevgep4142, align 4 ; [#uses=3]
- %41 = icmp eq %struct.btBroadphaseProxy* %40, null ; [#uses=1]
- br i1 %41, label %bb8.i21, label %bb6.i19
-
-bb6.i19: ; preds = %bb5.i18
- %42 = getelementptr inbounds %struct.btBroadphaseProxy* %40, i32 0, i32 3 ; [#uses=1]
- %43 = load i8** %42, align 4 ; [#uses=1]
- %44 = bitcast i8* %43 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb8.i21
-
-bb8.i21: ; preds = %bb6.i19, %bb5.i18
- %iftmp.172.0.i20 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %44, %bb6.i19 ], [ null, %bb5.i18 ] ; [#uses=3]
- %45 = load %struct.btBroadphaseProxy** %scevgep40, align 4 ; [#uses=3]
- %46 = icmp eq %struct.btBroadphaseProxy* %45, null ; [#uses=1]
- br i1 %46, label %bb11.i24, label %bb9.i22
-
-bb9.i22: ; preds = %bb8.i21
- %47 = getelementptr inbounds %struct.btBroadphaseProxy* %45, i32 0, i32 3 ; [#uses=1]
- %48 = load i8** %47, align 4 ; [#uses=1]
- %49 = bitcast i8* %48 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb11.i24
-
-bb11.i24: ; preds = %bb9.i22, %bb8.i21
- %iftmp.173.0.i23 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %49, %bb9.i22 ], [ null, %bb8.i21 ] ; [#uses=2]
- %50 = icmp ugt %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.170.0.i14, %iftmp.172.0.i20 ; [#uses=1]
- br i1 %50, label %bb2, label %bb12.i25
-
-bb12.i25: ; preds = %bb11.i24
- %51 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.170.0.i14, %iftmp.172.0.i20 ; [#uses=1]
- %52 = icmp ugt %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.171.0.i17, %iftmp.173.0.i23 ; [#uses=1]
- %53 = and i1 %51, %52 ; [#uses=1]
- br i1 %53, label %bb2, label %bb15.i29
-
-bb15.i29: ; preds = %bb12.i25
- %notlhs.i26 = icmp ne %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.170.0.i14, %iftmp.172.0.i20 ; [#uses=1]
- %notrhs.i27 = icmp ne %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.171.0.i17, %iftmp.173.0.i23 ; [#uses=1]
- %toBool18not.i28 = or i1 %notrhs.i27, %notlhs.i26 ; [#uses=1]
- br i1 %toBool18not.i28, label %bb5, label %_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit34
-
-_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit34: ; preds = %bb15.i29
- %54 = load %struct.btCollisionAlgorithm** %scevgep, align 4 ; [#uses=1]
- %phitmp36 = icmp ugt %struct.btCollisionAlgorithm* %11, %54 ; [#uses=1]
- br i1 %phitmp36, label %bb2, label %bb5
-
-bb5: ; preds = %_ZN37btMultiSapBroadphasePairSortPredicateclERK16btBroadphasePairS2_.exit34, %bb15.i29
- %55 = icmp sgt i32 %i.0, %j.0 ; [#uses=1]
- br i1 %55, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %56 = load %struct.btCollisionAlgorithm** %scevgep46, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %i.0, i32 3, i32 0 ; [#uses=2]
- %58 = load i8** %57, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %40, %struct.btBroadphaseProxy** %scevgep4849, align 4
- store %struct.btBroadphaseProxy* %45, %struct.btBroadphaseProxy** %scevgep47, align 4
- %59 = load %struct.btCollisionAlgorithm** %scevgep, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %59, %struct.btCollisionAlgorithm** %scevgep46, align 4
- %60 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %j.0, i32 3, i32 0 ; [#uses=1]
- %61 = load i8** %60, align 4 ; [#uses=1]
- store i8* %61, i8** %57, align 4
- %62 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=4]
- %63 = getelementptr inbounds %struct.btBroadphasePair* %62, i32 %j.0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* %17, %struct.btBroadphaseProxy** %63, align 4
- %64 = getelementptr inbounds %struct.btBroadphasePair* %62, i32 %j.0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %22, %struct.btBroadphaseProxy** %64, align 4
- %65 = getelementptr inbounds %struct.btBroadphasePair* %62, i32 %j.0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %56, %struct.btCollisionAlgorithm** %65, align 4
- %66 = getelementptr inbounds %struct.btBroadphasePair* %62, i32 %j.0, i32 3, i32 0 ; [#uses=1]
- store i8* %58, i8** %66, align 4
- %67 = add nsw i32 %i.0, 1 ; [#uses=1]
- %68 = add nsw i32 %j.0, -1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %i.1 = phi i32 [ %67, %bb6 ], [ %i.0, %bb5 ] ; [#uses=4]
- %j.2 = phi i32 [ %68, %bb6 ], [ %j.0, %bb5 ] ; [#uses=4]
- %69 = icmp sgt i32 %i.1, %j.2 ; [#uses=1]
- br i1 %69, label %bb8, label %bb1.outer
-
-bb8: ; preds = %bb7
- %70 = icmp sgt i32 %j.2, %lo ; [#uses=1]
- br i1 %70, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI37btMultiSapBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 %lo, i32 %j.2)
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %71 = icmp slt i32 %i.1, %hi ; [#uses=1]
- br i1 %71, label %bb11, label %return
-
-bb11: ; preds = %bb10
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI37btMultiSapBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 %i.1, i32 %hi)
- ret void
-
-return: ; preds = %bb10
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphase25calculateOverlappingPairsEP12btDispatcher(%struct.btMultiSapBroadphase* %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %3 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %4 = load i8* @stopUpdating, align 1 ; [#uses=1]
- %toBool3not = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool3not, label %bb, label %bb12
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 9 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btMultiSapBroadphase*)* ; [#uses=1]
- %10 = call %struct..0btMultiSapOverlapFilterCallback* %9(%struct.btMultiSapBroadphase* %this) ; [#uses=2]
- %11 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %10, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 14 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %16 = call zeroext i8 %15(%struct..0btMultiSapOverlapFilterCallback* %10) ; [#uses=1]
- %toBool7not = icmp eq i8 %16, 0 ; [#uses=1]
- br i1 %toBool7not, label %bb12, label %bb15
-
-bb12: ; preds = %bb, %entry
- ret void
-
-bb15: ; preds = %bb
- %17 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 9 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %19 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btMultiSapBroadphase*)* ; [#uses=1]
- %21 = call %struct..0btMultiSapOverlapFilterCallback* %20(%struct.btMultiSapBroadphase* %this) ; [#uses=2]
- %22 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %21, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load i32 (...)*** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 7 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to %"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %27 = call %"struct.btAlignedObjectArray<btBroadphasePair>"* %26(%struct..0btMultiSapOverlapFilterCallback* %21) ; [#uses=6]
- %28 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %27, i32 0, i32 1 ; [#uses=5]
- %29 = load i32* %28, align 4 ; [#uses=3]
- %30 = icmp sgt i32 %29, 1 ; [#uses=1]
- br i1 %30, label %bb.i, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit
-
-bb.i: ; preds = %bb15
- %31 = add nsw i32 %29, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI37btMultiSapBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %27, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 0, i32 %31) nounwind
- %.pre = load i32* %28, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit: ; preds = %bb.i, %bb15
- %32 = phi i32 [ %29, %bb15 ], [ %.pre, %bb.i ] ; [#uses=1]
- %33 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %33, align 8
- %34 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %34, align 4
- %35 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %35, align 8
- %36 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %36, align 4
- %37 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 7 ; [#uses=6]
- %38 = load i32* %37, align 4 ; [#uses=1]
- %39 = sub nsw i32 %32, %38 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %27, i32 %39, %struct.btBroadphasePair* %3) inlinehint
- store i32 0, i32* %37, align 4
- %40 = load i32* %28, align 4 ; [#uses=2]
- %41 = icmp sgt i32 %40, 0 ; [#uses=1]
- br i1 %41, label %bb.nph, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit55
-
-bb.nph: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit
- %42 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %27, i32 0, i32 3 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb43, %bb.nph
- %i.065 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb43 ] ; [#uses=4]
- %previousPair.1.064 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %49, %bb43 ] ; [#uses=2]
- %previousPair.0.063 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %44, %bb43 ] ; [#uses=2]
- %tmp = add i32 %i.065, 1 ; [#uses=2]
- %43 = load %struct.btBroadphasePair** %42, align 4 ; [#uses=3]
- %scevgep6667 = getelementptr inbounds %struct.btBroadphasePair* %43, i32 %i.065, i32 0 ; [#uses=2]
- %44 = load %struct.btBroadphaseProxy** %scevgep6667, align 4 ; [#uses=4]
- %45 = icmp eq %struct.btBroadphaseProxy* %44, null ; [#uses=1]
- br i1 %45, label %bb19, label %bb17
-
-bb17: ; preds = %bb16
- %46 = getelementptr inbounds %struct.btBroadphaseProxy* %44, i32 0, i32 3 ; [#uses=1]
- %47 = load i8** %46, align 4 ; [#uses=1]
- %48 = bitcast i8* %47 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb17, %bb16
- %iftmp.179.0 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %48, %bb17 ], [ null, %bb16 ] ; [#uses=1]
- %scevgep70 = getelementptr %struct.btBroadphasePair* %43, i32 %i.065, i32 1 ; [#uses=2]
- %49 = load %struct.btBroadphaseProxy** %scevgep70, align 4 ; [#uses=4]
- %50 = icmp eq %struct.btBroadphaseProxy* %49, null ; [#uses=1]
- br i1 %50, label %bb22, label %bb20
-
-bb20: ; preds = %bb19
- %51 = getelementptr inbounds %struct.btBroadphaseProxy* %49, i32 0, i32 3 ; [#uses=1]
- %52 = load i8** %51, align 4 ; [#uses=1]
- %53 = bitcast i8* %52 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %bb20, %bb19
- %iftmp.180.0 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %53, %bb20 ], [ null, %bb19 ] ; [#uses=1]
- %54 = icmp eq %struct.btBroadphaseProxy* %previousPair.0.063, null ; [#uses=1]
- br i1 %54, label %bb25, label %bb23
-
-bb23: ; preds = %bb22
- %55 = getelementptr inbounds %struct.btBroadphaseProxy* %previousPair.0.063, i32 0, i32 3 ; [#uses=1]
- %56 = load i8** %55, align 4 ; [#uses=1]
- %57 = bitcast i8* %56 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb25
-
-bb25: ; preds = %bb23, %bb22
- %iftmp.181.0 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %57, %bb23 ], [ null, %bb22 ] ; [#uses=1]
- %58 = icmp eq %struct.btBroadphaseProxy* %previousPair.1.064, null ; [#uses=1]
- br i1 %58, label %bb28, label %bb26
-
-bb26: ; preds = %bb25
- %59 = getelementptr inbounds %struct.btBroadphaseProxy* %previousPair.1.064, i32 0, i32 3 ; [#uses=1]
- %60 = load i8** %59, align 4 ; [#uses=1]
- %61 = bitcast i8* %60 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- br label %bb28
-
-bb28: ; preds = %bb26, %bb25
- %iftmp.182.0 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"* [ %61, %bb26 ], [ null, %bb25 ] ; [#uses=1]
- %notlhs = icmp ne %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.179.0, %iftmp.181.0 ; [#uses=1]
- %notrhs = icmp ne %"struct.btMultiSapBroadphase::btMultiSapProxy"* %iftmp.180.0, %iftmp.182.0 ; [#uses=1]
- %toBool31not = or i1 %notrhs, %notlhs ; [#uses=1]
- br i1 %toBool31not, label %bb35, label %bb42
-
-bb35: ; preds = %bb28
- %62 = getelementptr inbounds %struct.btBroadphaseProxy* %44, i32 0, i32 3 ; [#uses=1]
- %63 = load i8** %62, align 4 ; [#uses=6]
- %64 = getelementptr inbounds %struct.btBroadphaseProxy* %49, i32 0, i32 3 ; [#uses=1]
- %65 = load i8** %64, align 4 ; [#uses=6]
- %66 = getelementptr inbounds i8* %65, i32 84 ; [#uses=1]
- %67 = getelementptr inbounds i8* %63, i32 68 ; [#uses=1]
- %68 = bitcast i8* %67 to float* ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = bitcast i8* %66 to float* ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = fcmp ogt float %69, %71 ; [#uses=1]
- br i1 %72, label %bb2.i.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb35
- %73 = getelementptr inbounds i8* %63, i32 84 ; [#uses=1]
- %74 = getelementptr inbounds i8* %65, i32 68 ; [#uses=1]
- %75 = bitcast i8* %73 to float* ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = bitcast i8* %74 to float* ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fcmp olt float %76, %78 ; [#uses=1]
- br i1 %79, label %bb2.i.i, label %bb3.i.i
-
-bb2.i.i: ; preds = %bb.i.i, %bb35
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %bb.i.i
- %iftmp.123.0.i.i = phi i8 [ 0, %bb2.i.i ], [ 1, %bb.i.i ] ; [#uses=1]
- %80 = getelementptr inbounds i8* %63, i32 76 ; [#uses=1]
- %81 = bitcast i8* %80 to float* ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = getelementptr inbounds i8* %65, i32 92 ; [#uses=1]
- %84 = bitcast i8* %83 to float* ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fcmp ogt float %82, %85 ; [#uses=1]
- br i1 %86, label %bb6.i.i, label %bb4.i.i
-
-bb4.i.i: ; preds = %bb3.i.i
- %87 = getelementptr inbounds i8* %63, i32 92 ; [#uses=1]
- %88 = bitcast i8* %87 to float* ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds i8* %65, i32 76 ; [#uses=1]
- %91 = bitcast i8* %90 to float* ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- %93 = fcmp olt float %89, %92 ; [#uses=1]
- br i1 %93, label %bb6.i.i, label %bb7.i.i
-
-bb6.i.i: ; preds = %bb4.i.i, %bb3.i.i
- br label %bb7.i.i
-
-bb7.i.i: ; preds = %bb6.i.i, %bb4.i.i
- %iftmp.124.0.i.i = phi i8 [ 0, %bb6.i.i ], [ %iftmp.123.0.i.i, %bb4.i.i ] ; [#uses=1]
- %94 = getelementptr inbounds i8* %63, i32 72 ; [#uses=1]
- %95 = bitcast i8* %94 to float* ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = getelementptr inbounds i8* %65, i32 88 ; [#uses=1]
- %98 = bitcast i8* %97 to float* ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fcmp ogt float %96, %99 ; [#uses=1]
- br i1 %100, label %bb42, label %_ZN20btMultiSapBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit
-
-_ZN20btMultiSapBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit: ; preds = %bb7.i.i
- %101 = getelementptr inbounds i8* %63, i32 88 ; [#uses=1]
- %102 = bitcast i8* %101 to float* ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=1]
- %104 = getelementptr inbounds i8* %65, i32 72 ; [#uses=1]
- %105 = bitcast i8* %104 to float* ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- %107 = fcmp olt float %103, %106 ; [#uses=1]
- %phitmp62 = icmp eq i8 %iftmp.124.0.i.i, 0 ; [#uses=1]
- %phitmp = or i1 %107, %phitmp62 ; [#uses=1]
- br i1 %phitmp, label %bb42, label %bb43
-
-bb42: ; preds = %_ZN20btMultiSapBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit, %bb7.i.i, %bb28
- %108 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %109 = getelementptr inbounds i32 (...)** %108, i32 9 ; [#uses=1]
- %110 = load i32 (...)** %109, align 4 ; [#uses=1]
- %111 = bitcast i32 (...)* %110 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btMultiSapBroadphase*)* ; [#uses=1]
- %112 = call %struct..0btMultiSapOverlapFilterCallback* %111(%struct.btMultiSapBroadphase* %this) ; [#uses=2]
- %113 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %112, i32 0, i32 0, i32 0 ; [#uses=1]
- %114 = load i32 (...)*** %113, align 4 ; [#uses=1]
- %115 = getelementptr inbounds i32 (...)** %114, i32 8 ; [#uses=1]
- %116 = load i32 (...)** %115, align 4 ; [#uses=1]
- %117 = bitcast i32 (...)* %116 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- %scevgep = getelementptr %struct.btBroadphasePair* %43, i32 %i.065 ; [#uses=1]
- call void %117(%struct..0btMultiSapOverlapFilterCallback* %112, %struct.btBroadphasePair* %scevgep, %struct.btActionInterface* %dispatcher)
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep6667, align 4
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep70, align 4
- %118 = load i32* %37, align 4 ; [#uses=1]
- %119 = add nsw i32 %118, 1 ; [#uses=1]
- store i32 %119, i32* %37, align 4
- %120 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %121 = add nsw i32 %120, -1 ; [#uses=1]
- store i32 %121, i32* @gOverlappingPairs, align 4
- br label %bb43
-
-bb43: ; preds = %bb42, %_ZN20btMultiSapBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit
- %122 = load i32* %28, align 4 ; [#uses=4]
- %123 = icmp sgt i32 %122, %tmp ; [#uses=1]
- br i1 %123, label %bb16, label %bb46
-
-bb46: ; preds = %bb43
- %124 = icmp sgt i32 %122, 1 ; [#uses=1]
- br i1 %124, label %bb.i53, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit55
-
-bb.i53: ; preds = %bb46
- %125 = add nsw i32 %122, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI37btMultiSapBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %27, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %125) nounwind
- %.pre81 = load i32* %28, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit55
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit55: ; preds = %bb.i53, %bb46, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit
- %126 = phi i32 [ %.pre81, %bb.i53 ], [ %122, %bb46 ], [ %40, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI37btMultiSapBroadphasePairSortPredicateEEvT_.exit ] ; [#uses=1]
- %127 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %127, align 8
- %128 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %128, align 4
- %129 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %129, align 8
- %130 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %130, align 4
- %131 = load i32* %37, align 4 ; [#uses=1]
- %132 = sub nsw i32 %126, %131 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %27, i32 %132, %struct.btBroadphasePair* %2) inlinehint
- store i32 0, i32* %37, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphase20addToChildBroadphaseEPNS_15btMultiSapProxyEP17btBroadphaseProxyP21btBroadphaseInterface(%struct.btMultiSapBroadphase* nocapture %this, %"struct.btMultiSapBroadphase::btMultiSapProxy"* nocapture %parentMultiSapProxy, %struct.btBroadphaseProxy* %childProxy, %struct.btActionInterface* %childBroadphase) align 2 {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16) ; [#uses=3]
- %1 = bitcast i8* %0 to %"struct.btMultiSapBroadphase::btBridgeProxy"* ; [#uses=1]
- %2 = bitcast i8* %0 to %struct.btBroadphaseProxy** ; [#uses=1]
- store %struct.btBroadphaseProxy* %childProxy, %struct.btBroadphaseProxy** %2, align 4
- %3 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %4 = bitcast i8* %3 to %struct.btActionInterface** ; [#uses=1]
- store %struct.btActionInterface* %childBroadphase, %struct.btActionInterface** %4, align 4
- %5 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %parentMultiSapProxy, i32 0, i32 1, i32 1 ; [#uses=5]
- %6 = load i32* %5, align 4 ; [#uses=6]
- %7 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %parentMultiSapProxy, i32 0, i32 1, i32 2 ; [#uses=2]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp eq i32 %8, %6 ; [#uses=1]
- br i1 %9, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %10 = icmp eq i32 %6, 0 ; [#uses=1]
- %11 = shl i32 %6, 1 ; [#uses=1]
- %iftmp.199.0.i.i = select i1 %10, i32 1, i32 %11 ; [#uses=4]
- %12 = icmp slt i32 %8, %iftmp.199.0.i.i ; [#uses=1]
- br i1 %12, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %13 = icmp eq i32 %iftmp.199.0.i.i, 0 ; [#uses=1]
- br i1 %13, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %14 = shl i32 %iftmp.199.0.i.i, 2 ; [#uses=1]
- %15 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %14, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %15 to %"struct.btMultiSapBroadphase::btBridgeProxy"** ; [#uses=1]
- %.pre.i = load i32* %5, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %16 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %6, %bb.i.i ] ; [#uses=2]
- %17 = phi %"struct.btMultiSapBroadphase::btBridgeProxy"** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %18 = icmp sgt i32 %16, 0 ; [#uses=1]
- br i1 %18, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE4copyEiiPS2_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE8allocateEi.exit.i.i
- %19 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %parentMultiSapProxy, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %"struct.btMultiSapBroadphase::btBridgeProxy"** %17, i32 %indvar.i.i.i ; [#uses=2]
- %20 = icmp eq %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %20, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %21 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %19, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %"struct.btMultiSapBroadphase::btBridgeProxy"** %21, i32 %indvar.i.i.i ; [#uses=1]
- %22 = load %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %"struct.btMultiSapBroadphase::btBridgeProxy"* %22, %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %16 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE4copyEiiPS2_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE4copyEiiPS2_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE8allocateEi.exit.i.i
- %23 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %parentMultiSapProxy, i32 0, i32 1, i32 3 ; [#uses=3]
- %24 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %23, align 4 ; [#uses=2]
- %25 = icmp eq %"struct.btMultiSapBroadphase::btBridgeProxy"** %24, null ; [#uses=1]
- br i1 %25, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE4copyEiiPS2_.exit.i.i
- %26 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %parentMultiSapProxy, i32 0, i32 1, i32 4 ; [#uses=1]
- %27 = load i8* %26, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %28 = bitcast %"struct.btMultiSapBroadphase::btBridgeProxy"** %24 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %28)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btMultiSapBroadphase::btBridgeProxy"** null, %"struct.btMultiSapBroadphase::btBridgeProxy"*** %23, align 4
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE4copyEiiPS2_.exit.i.i
- %29 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %parentMultiSapProxy, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %29, align 4
- store %"struct.btMultiSapBroadphase::btBridgeProxy"** %17, %"struct.btMultiSapBroadphase::btBridgeProxy"*** %23, align 4
- store i32 %iftmp.199.0.i.i, i32* %7, align 4
- %.pre5.i = load i32* %5, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE10deallocateEv.exit.i.i, %bb.i, %entry
- %30 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE10deallocateEv.exit.i.i ], [ %6, %entry ], [ %6, %bb.i ] ; [#uses=2]
- %31 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"* %parentMultiSapProxy, i32 0, i32 1, i32 3 ; [#uses=1]
- %32 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"** %32, i32 %30 ; [#uses=2]
- %34 = icmp eq %"struct.btMultiSapBroadphase::btBridgeProxy"** %33, null ; [#uses=1]
- br i1 %34, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE9push_backERKS2_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %"struct.btMultiSapBroadphase::btBridgeProxy"* %1, %"struct.btMultiSapBroadphase::btBridgeProxy"** %33, align 4
- %.pre6.i = load i32* %5, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE9push_backERKS2_.exit
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase13btBridgeProxyEE9push_backERKS2_.exit: ; preds = %bb2.i, %bb1.i
- %35 = phi i32 [ %30, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %36 = add nsw i32 %35, 1 ; [#uses=1]
- store i32 %36, i32* %5, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btBroadphaseProxy* @_ZN20btMultiSapBroadphase11createProxyERK9btVector3S2_iPvssP12btDispatcherS3_(%struct.btMultiSapBroadphase* %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i32 %shapeType, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %dispatcher, i8* nocapture %unnamed_arg) align 2 {
-bb1:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 104, i32 16) ; [#uses=28]
- %1 = bitcast i8* %0 to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- %2 = bitcast i8* %0 to i8** ; [#uses=1]
- store i8* %userPtr, i8** %2, align 4
- %3 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %4 = bitcast i8* %3 to i16* ; [#uses=1]
- store i16 %collisionFilterGroup, i16* %4, align 4
- %5 = getelementptr inbounds i8* %0, i32 6 ; [#uses=1]
- %6 = bitcast i8* %5 to i16* ; [#uses=1]
- store i16 %collisionFilterMask, i16* %6, align 2
- %7 = getelementptr inbounds i8* %0, i32 16 ; [#uses=1]
- %8 = bitcast i8* %7 to float* ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds i8* %0, i32 20 ; [#uses=1]
- %12 = bitcast i8* %11 to float* ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds i8* %0, i32 24 ; [#uses=1]
- %16 = bitcast i8* %15 to float* ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds i8* %0, i32 28 ; [#uses=1]
- %20 = bitcast i8* %19 to float* ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds i8* %0, i32 32 ; [#uses=1]
- %24 = bitcast i8* %23 to float* ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds i8* %0, i32 36 ; [#uses=1]
- %28 = bitcast i8* %27 to float* ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds i8* %0, i32 40 ; [#uses=1]
- %32 = bitcast i8* %31 to float* ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds i8* %0, i32 44 ; [#uses=1]
- %36 = bitcast i8* %35 to float* ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds i8* %0, i32 8 ; [#uses=1]
- %40 = bitcast i8* %39 to i8** ; [#uses=2]
- store i8* null, i8** %40, align 4
- %41 = getelementptr inbounds i8* %0, i32 64 ; [#uses=1]
- store i8 1, i8* %41, align 4
- %42 = getelementptr inbounds i8* %0, i32 60 ; [#uses=1]
- %43 = bitcast i8* %42 to %"struct.btMultiSapBroadphase::btBridgeProxy"*** ; [#uses=1]
- store %"struct.btMultiSapBroadphase::btBridgeProxy"** null, %"struct.btMultiSapBroadphase::btBridgeProxy"*** %43, align 4
- %44 = getelementptr inbounds i8* %0, i32 52 ; [#uses=1]
- %45 = bitcast i8* %44 to i32* ; [#uses=1]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds i8* %0, i32 56 ; [#uses=1]
- %47 = bitcast i8* %46 to i32* ; [#uses=1]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds i8* %0, i32 68 ; [#uses=1]
- %49 = bitcast i8* %48 to float* ; [#uses=1]
- %50 = load float* %9, align 4 ; [#uses=1]
- store float %50, float* %49, align 4
- %51 = getelementptr inbounds i8* %0, i32 72 ; [#uses=1]
- %52 = bitcast i8* %51 to float* ; [#uses=1]
- %53 = load float* %13, align 4 ; [#uses=1]
- store float %53, float* %52, align 4
- %54 = getelementptr inbounds i8* %0, i32 76 ; [#uses=1]
- %55 = bitcast i8* %54 to float* ; [#uses=1]
- %56 = load float* %17, align 4 ; [#uses=1]
- store float %56, float* %55, align 4
- %57 = getelementptr inbounds i8* %0, i32 80 ; [#uses=1]
- %58 = bitcast i8* %57 to float* ; [#uses=1]
- %59 = load float* %21, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %60 = getelementptr inbounds i8* %0, i32 84 ; [#uses=1]
- %61 = bitcast i8* %60 to float* ; [#uses=1]
- %62 = load float* %25, align 4 ; [#uses=1]
- store float %62, float* %61, align 4
- %63 = getelementptr inbounds i8* %0, i32 88 ; [#uses=1]
- %64 = bitcast i8* %63 to float* ; [#uses=1]
- %65 = load float* %29, align 4 ; [#uses=1]
- store float %65, float* %64, align 4
- %66 = getelementptr inbounds i8* %0, i32 92 ; [#uses=1]
- %67 = bitcast i8* %66 to float* ; [#uses=1]
- %68 = load float* %33, align 4 ; [#uses=1]
- store float %68, float* %67, align 4
- %69 = getelementptr inbounds i8* %0, i32 96 ; [#uses=1]
- %70 = bitcast i8* %69 to float* ; [#uses=1]
- %71 = load float* %37, align 4 ; [#uses=1]
- store float %71, float* %70, align 4
- %72 = getelementptr inbounds i8* %0, i32 100 ; [#uses=1]
- %73 = bitcast i8* %72 to i32* ; [#uses=1]
- store i32 %shapeType, i32* %73, align 4
- store i8* %0, i8** %40, align 4
- %74 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 1 ; [#uses=5]
- %75 = load i32* %74, align 4 ; [#uses=6]
- %76 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 2 ; [#uses=2]
- %77 = load i32* %76, align 4 ; [#uses=2]
- %78 = icmp eq i32 %77, %75 ; [#uses=1]
- br i1 %78, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb1
- %79 = icmp eq i32 %75, 0 ; [#uses=1]
- %80 = shl i32 %75, 1 ; [#uses=1]
- %iftmp.197.0.i.i = select i1 %79, i32 1, i32 %80 ; [#uses=4]
- %81 = icmp slt i32 %77, %iftmp.197.0.i.i ; [#uses=1]
- br i1 %81, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %82 = icmp eq i32 %iftmp.197.0.i.i, 0 ; [#uses=1]
- br i1 %82, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %83 = shl i32 %iftmp.197.0.i.i, 2 ; [#uses=1]
- %84 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %83, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %84 to %"struct.btMultiSapBroadphase::btMultiSapProxy"** ; [#uses=1]
- %.pre.i = load i32* %74, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %85 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %75, %bb.i.i ] ; [#uses=2]
- %86 = phi %"struct.btMultiSapBroadphase::btMultiSapProxy"** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %87 = icmp sgt i32 %85, 0 ; [#uses=1]
- br i1 %87, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE4copyEiiPS2_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE8allocateEi.exit.i.i
- %88 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %"struct.btMultiSapBroadphase::btMultiSapProxy"** %86, i32 %indvar.i.i.i ; [#uses=2]
- %89 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %89, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %90 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %88, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %"struct.btMultiSapBroadphase::btMultiSapProxy"** %90, i32 %indvar.i.i.i ; [#uses=1]
- %91 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"* %91, %"struct.btMultiSapBroadphase::btMultiSapProxy"** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %85 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE4copyEiiPS2_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE4copyEiiPS2_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE8allocateEi.exit.i.i
- %92 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %93 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %92, align 4 ; [#uses=2]
- %94 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %93, null ; [#uses=1]
- br i1 %94, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE4copyEiiPS2_.exit.i.i
- %95 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %96 = load i8* %95, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %96, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %97 = bitcast %"struct.btMultiSapBroadphase::btMultiSapProxy"** %93 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %97)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %92, align 4
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE4copyEiiPS2_.exit.i.i
- %98 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %98, align 4
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** %86, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %92, align 4
- store i32 %iftmp.197.0.i.i, i32* %76, align 4
- %.pre5.i = load i32* %74, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE10deallocateEv.exit.i.i, %bb.i, %bb1
- %99 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE10deallocateEv.exit.i.i ], [ %75, %bb1 ], [ %75, %bb.i ] ; [#uses=2]
- %100 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %101 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %100, align 4 ; [#uses=1]
- %102 = getelementptr inbounds %"struct.btMultiSapBroadphase::btMultiSapProxy"** %101, i32 %99 ; [#uses=2]
- %103 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %102, null ; [#uses=1]
- br i1 %103, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE9push_backERKS2_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"* %1, %"struct.btMultiSapBroadphase::btMultiSapProxy"** %102, align 4
- %.pre6.i = load i32* %74, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE9push_backERKS2_.exit
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEE9push_backERKS2_.exit: ; preds = %bb2.i, %bb1.i
- %104 = phi i32 [ %99, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %105 = add nsw i32 %104, 1 ; [#uses=1]
- store i32 %105, i32* %74, align 4
- %106 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %107 = load i32 (...)*** %106, align 4 ; [#uses=1]
- %108 = getelementptr inbounds i32 (...)** %107, i32 4 ; [#uses=1]
- %109 = load i32 (...)** %108, align 4 ; [#uses=1]
- %110 = bitcast i8* %0 to %struct.btBroadphaseProxy* ; [#uses=2]
- %111 = bitcast i32 (...)* %109 to void (%struct.btMultiSapBroadphase*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %111(%struct.btMultiSapBroadphase* %this, %struct.btBroadphaseProxy* %110, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher)
- ret %struct.btBroadphaseProxy* %110
-}
-
-; [#uses=6]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE7reserveEi(%struct.QuantizedNodeArray* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = shl i32 %_Count, 4 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.BT_QUANTIZED_BVH_NODE* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=8]
- %7 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI18btQuantizedBvhNodeE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE8allocateEi.exit
- %10 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb.i4, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb.i4 ] ; [#uses=15]
- %scevgep1213.i = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 0, i32 0 ; [#uses=1]
- %scevgep14.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 0, i32 1 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 0, i32 2 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 1, i32 0 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 1, i32 1 ; [#uses=1]
- %scevgep18.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 1, i32 2 ; [#uses=1]
- %scevgep19.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 2 ; [#uses=1]
- %11 = load %struct.BT_QUANTIZED_BVH_NODE** %10, align 4 ; [#uses=7]
- %scevgep5.i = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %indvar.i, i32 0, i32 0 ; [#uses=1]
- %12 = load i16* %scevgep5.i, align 4 ; [#uses=1]
- store i16 %12, i16* %scevgep1213.i, align 4
- %scevgep6.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %indvar.i, i32 0, i32 1 ; [#uses=1]
- %13 = load i16* %scevgep6.i, align 2 ; [#uses=1]
- store i16 %13, i16* %scevgep14.i, align 2
- %scevgep7.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %indvar.i, i32 0, i32 2 ; [#uses=1]
- %14 = load i16* %scevgep7.i, align 4 ; [#uses=1]
- store i16 %14, i16* %scevgep15.i, align 4
- %scevgep8.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %indvar.i, i32 1, i32 0 ; [#uses=1]
- %15 = load i16* %scevgep8.i, align 2 ; [#uses=1]
- store i16 %15, i16* %scevgep16.i, align 2
- %scevgep9.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %indvar.i, i32 1, i32 1 ; [#uses=1]
- %16 = load i16* %scevgep9.i, align 2 ; [#uses=1]
- store i16 %16, i16* %scevgep17.i, align 2
- %scevgep10.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %indvar.i, i32 1, i32 2 ; [#uses=1]
- %17 = load i16* %scevgep10.i, align 2 ; [#uses=1]
- store i16 %17, i16* %scevgep18.i, align 2
- %scevgep11.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %indvar.i, i32 2 ; [#uses=1]
- %18 = load i32* %scevgep11.i, align 4 ; [#uses=1]
- store i32 %18, i32* %scevgep19.i, align 4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI18btQuantizedBvhNodeE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI18btQuantizedBvhNodeE4copyEiiPS0_.exit: ; preds = %bb.i4, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE8allocateEi.exit
- %19 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 3 ; [#uses=3]
- %20 = load %struct.BT_QUANTIZED_BVH_NODE** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %20, null ; [#uses=1]
- br i1 %21, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI18btQuantizedBvhNodeE4copyEiiPS0_.exit
- %22 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %24 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %20 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %24)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI18btQuantizedBvhNodeE4copyEiiPS0_.exit
- %25 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* %6, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcher(%struct.btMultiSapBroadphase* %this, %struct.btBroadphaseProxy* %proxy, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %myNodeCallback = alloca %struct..1MyNodeOverlapCallback, align 8 ; [#uses=5]
- %worldAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %worldAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = bitcast %struct.btBroadphaseProxy* %proxy to %"struct.btMultiSapBroadphase::btMultiSapProxy"* ; [#uses=1]
- %1 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 1 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 2 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 3 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 5, i32 0, i32 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 1 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 2 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 3 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 6, i32 0, i32 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %25, align 8
- %26 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btMultiSapBroadphase* %this, %struct.btMultiSapBroadphase** %26, align 4
- %27 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 2 ; [#uses=1]
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"* %0, %"struct.btMultiSapBroadphase::btMultiSapProxy"** %27, align 8
- %28 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 3 ; [#uses=1]
- store %struct.btActionInterface* %dispatcher, %struct.btActionInterface** %28, align 4
- %29 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- %30 = load %struct.btQuantizedBvh** %29, align 4 ; [#uses=2]
- %31 = icmp eq %struct.btQuantizedBvh* %30, null ; [#uses=1]
- br i1 %31, label %bb10.preheader, label %bb
-
-bb: ; preds = %entry
- %32 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK14btQuantizedBvh26reportAabbOverlappingNodexEP21btNodeOverlapCallbackRK9btVector3S4_(%struct.btQuantizedBvh* %30, %struct.btActionInterface* %32, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %bb10.preheader unwind label %lpad
-
-bb10.preheader: ; preds = %bb, %entry
- %33 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 1 ; [#uses=1]
- %34 = bitcast i16* %33 to i32* ; [#uses=5]
- %35 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 1, i32 4 ; [#uses=1]
- %36 = bitcast i32* %35 to %"struct.btMultiSapBroadphase::btBridgeProxy"*** ; [#uses=5]
- %37 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb10
-
-bb2: ; preds = %bb10
- %43 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %36, align 4 ; [#uses=1]
- %scevgep24 = getelementptr %"struct.btMultiSapBroadphase::btBridgeProxy"** %43, i32 %92 ; [#uses=1]
- %44 = load %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep24, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"* %44, i32 0, i32 1 ; [#uses=1]
- %46 = load %struct.btActionInterface** %45, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btActionInterface* %46, i32 0, i32 0 ; [#uses=1]
- %48 = load i32 (...)*** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds i32 (...)** %48, i32 11 ; [#uses=1]
- %50 = load i32 (...)** %49, align 4 ; [#uses=1]
- %51 = bitcast i32 (...)* %50 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %51(%struct.btActionInterface* %46, %struct.btQuadWord* %worldAabbMin, %struct.btQuadWord* %worldAabbMax)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %bb2
- %52 = load float* %37, align 8 ; [#uses=1]
- %53 = load float* %13, align 4 ; [#uses=1]
- %54 = fcmp ogt float %52, %53 ; [#uses=1]
- br i1 %54, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %invcont3
- %55 = load float* %42, align 8 ; [#uses=1]
- %56 = load float* %1, align 4 ; [#uses=1]
- %57 = fcmp olt float %55, %56 ; [#uses=1]
- br i1 %57, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb.i, %invcont3
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb.i
- %iftmp.123.0.i = phi i8 [ 0, %bb2.i ], [ 1, %bb.i ] ; [#uses=1]
- %58 = load float* %38, align 8 ; [#uses=1]
- %59 = load float* %19, align 4 ; [#uses=1]
- %60 = fcmp ogt float %58, %59 ; [#uses=1]
- br i1 %60, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %61 = load float* %41, align 8 ; [#uses=1]
- %62 = load float* %7, align 4 ; [#uses=1]
- %63 = fcmp olt float %61, %62 ; [#uses=1]
- br i1 %63, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i
- %iftmp.124.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.123.0.i, %bb4.i ] ; [#uses=1]
- %64 = load float* %39, align 4 ; [#uses=1]
- %65 = load float* %16, align 4 ; [#uses=1]
- %66 = fcmp ogt float %64, %65 ; [#uses=1]
- br i1 %66, label %bb7, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- %67 = load float* %40, align 4 ; [#uses=1]
- %68 = load float* %4, align 4 ; [#uses=1]
- %69 = fcmp olt float %67, %68 ; [#uses=1]
- %phitmp22 = icmp eq i8 %iftmp.124.0.i, 0 ; [#uses=1]
- %phitmp = or i1 %69, %phitmp22 ; [#uses=1]
- br i1 %phitmp, label %bb7, label %bb9
-
-bb7: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb7.i
- %70 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %36, align 4 ; [#uses=1]
- %scevgep25 = getelementptr %"struct.btMultiSapBroadphase::btBridgeProxy"** %70, i32 %92 ; [#uses=1]
- %71 = load %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep25, align 4 ; [#uses=2]
- %72 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"* %71, i32 0, i32 0 ; [#uses=1]
- %73 = load %struct.btBroadphaseProxy** %72, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"* %71, i32 0, i32 1 ; [#uses=1]
- %75 = load %struct.btActionInterface** %74, align 4 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btActionInterface* %75, i32 0, i32 0 ; [#uses=1]
- %77 = load i32 (...)*** %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds i32 (...)** %77, i32 3 ; [#uses=1]
- %79 = load i32 (...)** %78, align 4 ; [#uses=1]
- %80 = bitcast i32 (...)* %79 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %80(%struct.btActionInterface* %75, %struct.btBroadphaseProxy* %73, %struct.btActionInterface* %dispatcher)
- to label %invcont8 unwind label %lpad
-
-invcont8: ; preds = %bb7
- %81 = load i32* %34, align 4 ; [#uses=1]
- %82 = add nsw i32 %81, -1 ; [#uses=2]
- %83 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %36, align 4 ; [#uses=2]
- %scevgep27 = getelementptr %"struct.btMultiSapBroadphase::btBridgeProxy"** %83, i32 %92 ; [#uses=2]
- %84 = load %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep27, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"** %83, i32 %82 ; [#uses=1]
- %86 = load %"struct.btMultiSapBroadphase::btBridgeProxy"** %85, align 4 ; [#uses=1]
- store %"struct.btMultiSapBroadphase::btBridgeProxy"* %86, %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep27, align 4
- %87 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %36, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"** %87, i32 %82 ; [#uses=1]
- store %"struct.btMultiSapBroadphase::btBridgeProxy"* %84, %"struct.btMultiSapBroadphase::btBridgeProxy"** %88, align 4
- %89 = load i32* %34, align 4 ; [#uses=1]
- %90 = add nsw i32 %89, -1 ; [#uses=1]
- store i32 %90, i32* %34, align 4
- br label %bb9
-
-bb9: ; preds = %invcont8, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
- %91 = add nsw i32 %92, 1 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb9, %bb10.preheader
- %92 = phi i32 [ %91, %bb9 ], [ 0, %bb10.preheader ] ; [#uses=5]
- %93 = load i32* %34, align 4 ; [#uses=2]
- %94 = icmp sgt i32 %93, %92 ; [#uses=1]
- br i1 %94, label %bb2, label %bb15
-
-bb13: ; preds = %bb15
- %95 = load %"struct.btMultiSapBroadphase::btBridgeProxy"*** %36, align 4 ; [#uses=1]
- %scevgep = getelementptr %"struct.btMultiSapBroadphase::btBridgeProxy"** %95, i32 %108 ; [#uses=1]
- %96 = load %"struct.btMultiSapBroadphase::btBridgeProxy"** %scevgep, align 4 ; [#uses=2]
- %97 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"* %96, i32 0, i32 1 ; [#uses=1]
- %98 = load %struct.btActionInterface** %97, align 4 ; [#uses=2]
- %99 = getelementptr inbounds %struct.btActionInterface* %98, i32 0, i32 0 ; [#uses=1]
- %100 = load i32 (...)*** %99, align 4 ; [#uses=1]
- %101 = getelementptr inbounds i32 (...)** %100, i32 4 ; [#uses=1]
- %102 = load i32 (...)** %101, align 4 ; [#uses=1]
- %103 = getelementptr inbounds %"struct.btMultiSapBroadphase::btBridgeProxy"* %96, i32 0, i32 0 ; [#uses=1]
- %104 = load %struct.btBroadphaseProxy** %103, align 4 ; [#uses=1]
- %105 = bitcast i32 (...)* %102 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %105(%struct.btActionInterface* %98, %struct.btBroadphaseProxy* %104, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %dispatcher)
- to label %invcont14 unwind label %lpad
-
-invcont14: ; preds = %bb13
- %106 = add nsw i32 %108, 1 ; [#uses=1]
- %.pre = load i32* %34, align 4 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %invcont14, %bb10
- %107 = phi i32 [ %.pre, %invcont14 ], [ %93, %bb10 ] ; [#uses=1]
- %108 = phi i32 [ %106, %invcont14 ], [ 0, %bb10 ] ; [#uses=3]
- %109 = icmp sgt i32 %107, %108 ; [#uses=1]
- br i1 %109, label %bb13, label %bb18
-
-bb18: ; preds = %bb15
- ret void
-
-lpad: ; preds = %bb13, %bb7, %bb2, %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %25, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherEN21MyNodeOverlapCallbackD2Ev(%struct..1MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcherE21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphaseD0Ev(%struct.btMultiSapBroadphase* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btMultiSapBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %4 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- invoke void %8(%struct..0btMultiSapOverlapFilterCallback* %4)
- to label %invcont unwind label %lpad21
-
-invcont: ; preds = %bb
- %9 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct..0btMultiSapOverlapFilterCallback* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb5 unwind label %lpad21
-
-bb5: ; preds = %invcont, %entry
- %11 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %12 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %11, align 4 ; [#uses=2]
- %13 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %12, null ; [#uses=1]
- br i1 %13, label %bb12, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb5
- %14 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %15 = load i8* %14, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %16 = bitcast %"struct.btMultiSapBroadphase::btMultiSapProxy"** %12 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %16)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %11, align 4
- br label %bb12
-
-invcont10: ; preds = %bb2.i.i.i50, %ppad
- %17 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %17, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %42, align 4
- %18 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %19, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb12: ; preds = %bb2.i.i.i, %bb5
- %20 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %20, align 4
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %11, align 4
- %21 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %22, align 4
- %23 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %24 = load %struct.btActionInterface*** %23, align 4 ; [#uses=2]
- %25 = icmp eq %struct.btActionInterface** %24, null ; [#uses=1]
- br i1 %25, label %_ZN20btAlignedObjectArrayIP21btBroadphaseInterfaceED1Ev.exit, label %bb.i.i.i38
-
-bb.i.i.i38: ; preds = %bb12
- %26 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %27 = load i8* %26, align 4 ; [#uses=1]
- %toBool.i.i.i37 = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool.i.i.i37, label %bb2.i.i.i40, label %bb1.i.i.i39
-
-bb1.i.i.i39: ; preds = %bb.i.i.i38
- %28 = bitcast %struct.btActionInterface** %24 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %28)
- br label %bb2.i.i.i40
-
-bb2.i.i.i40: ; preds = %bb1.i.i.i39, %bb.i.i.i38
- store %struct.btActionInterface** null, %struct.btActionInterface*** %23, align 4
- br label %_ZN20btAlignedObjectArrayIP21btBroadphaseInterfaceED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP21btBroadphaseInterfaceED1Ev.exit: ; preds = %bb2.i.i.i40, %bb12
- %29 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %29, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %23, align 4
- %30 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %31, align 4
- %32 = bitcast %struct.btMultiSapBroadphase* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %32) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad21: ; preds = %invcont, %bb
- %eh_ptr22 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select24 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr22, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %33 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %34 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %33, align 4 ; [#uses=2]
- %35 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %34, null ; [#uses=1]
- br i1 %35, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46, label %bb.i.i.i42
-
-bb.i.i.i42: ; preds = %lpad21
- %36 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %37 = load i8* %36, align 4 ; [#uses=1]
- %toBool.i.i.i41 = icmp eq i8 %37, 0 ; [#uses=1]
- br i1 %toBool.i.i.i41, label %bb2.i.i.i44, label %bb1.i.i.i43
-
-bb1.i.i.i43: ; preds = %bb.i.i.i42
- %38 = bitcast %"struct.btMultiSapBroadphase::btMultiSapProxy"** %34 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %38)
- to label %bb2.i.i.i44 unwind label %lpad25
-
-bb2.i.i.i44: ; preds = %bb1.i.i.i43, %bb.i.i.i42
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %33, align 4
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46: ; preds = %bb2.i.i.i44, %lpad21
- %39 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %39, align 4
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %33, align 4
- %40 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %40, align 4
- %41 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %41, align 4
- br label %ppad
-
-lpad25: ; preds = %bb1.i.i.i43
- %eh_ptr26 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad29: ; preds = %bb1.i.i.i49
- %eh_ptr30 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select32 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr30, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr22, %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46 ] ; [#uses=1]
- %42 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %43 = load %struct.btActionInterface*** %42, align 4 ; [#uses=2]
- %44 = icmp eq %struct.btActionInterface** %43, null ; [#uses=1]
- br i1 %44, label %invcont10, label %bb.i.i.i48
-
-bb.i.i.i48: ; preds = %ppad
- %45 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %46 = load i8* %45, align 4 ; [#uses=1]
- %toBool.i.i.i47 = icmp eq i8 %46, 0 ; [#uses=1]
- br i1 %toBool.i.i.i47, label %bb2.i.i.i50, label %bb1.i.i.i49
-
-bb1.i.i.i49: ; preds = %bb.i.i.i48
- %47 = bitcast %struct.btActionInterface** %43 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %47)
- to label %bb2.i.i.i50 unwind label %lpad29
-
-bb2.i.i.i50: ; preds = %bb1.i.i.i49, %bb.i.i.i48
- store %struct.btActionInterface** null, %struct.btActionInterface*** %42, align 4
- br label %invcont10
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphaseD1Ev(%struct.btMultiSapBroadphase* nocapture %this) align 2 {
-entry:
- tail call void @_ZN20btMultiSapBroadphaseD2Ev(%struct.btMultiSapBroadphase* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphaseD2Ev(%struct.btMultiSapBroadphase* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btMultiSapBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %4 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- invoke void %8(%struct..0btMultiSapOverlapFilterCallback* %4)
- to label %invcont unwind label %lpad21
-
-invcont: ; preds = %bb
- %9 = load %struct..0btMultiSapOverlapFilterCallback** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct..0btMultiSapOverlapFilterCallback* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb5 unwind label %lpad21
-
-bb5: ; preds = %invcont, %entry
- %11 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %12 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %11, align 4 ; [#uses=2]
- %13 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %12, null ; [#uses=1]
- br i1 %13, label %bb12, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb5
- %14 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %15 = load i8* %14, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %16 = bitcast %"struct.btMultiSapBroadphase::btMultiSapProxy"** %12 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %16)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %11, align 4
- br label %bb12
-
-invcont10: ; preds = %bb2.i.i.i50, %ppad
- %17 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %17, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %41, align 4
- %18 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %19, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb12: ; preds = %bb2.i.i.i, %bb5
- %20 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %20, align 4
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %11, align 4
- %21 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %22, align 4
- %23 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %24 = load %struct.btActionInterface*** %23, align 4 ; [#uses=2]
- %25 = icmp eq %struct.btActionInterface** %24, null ; [#uses=1]
- br i1 %25, label %_ZN20btAlignedObjectArrayIP21btBroadphaseInterfaceED1Ev.exit, label %bb.i.i.i38
-
-bb.i.i.i38: ; preds = %bb12
- %26 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %27 = load i8* %26, align 4 ; [#uses=1]
- %toBool.i.i.i37 = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool.i.i.i37, label %bb2.i.i.i40, label %bb1.i.i.i39
-
-bb1.i.i.i39: ; preds = %bb.i.i.i38
- %28 = bitcast %struct.btActionInterface** %24 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %28)
- br label %bb2.i.i.i40
-
-bb2.i.i.i40: ; preds = %bb1.i.i.i39, %bb.i.i.i38
- store %struct.btActionInterface** null, %struct.btActionInterface*** %23, align 4
- br label %_ZN20btAlignedObjectArrayIP21btBroadphaseInterfaceED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP21btBroadphaseInterfaceED1Ev.exit: ; preds = %bb2.i.i.i40, %bb12
- %29 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %29, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %23, align 4
- %30 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %31, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad21: ; preds = %invcont, %bb
- %eh_ptr22 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select24 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr22, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %32 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %33 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %32, align 4 ; [#uses=2]
- %34 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %33, null ; [#uses=1]
- br i1 %34, label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46, label %bb.i.i.i42
-
-bb.i.i.i42: ; preds = %lpad21
- %35 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %36 = load i8* %35, align 4 ; [#uses=1]
- %toBool.i.i.i41 = icmp eq i8 %36, 0 ; [#uses=1]
- br i1 %toBool.i.i.i41, label %bb2.i.i.i44, label %bb1.i.i.i43
-
-bb1.i.i.i43: ; preds = %bb.i.i.i42
- %37 = bitcast %"struct.btMultiSapBroadphase::btMultiSapProxy"** %33 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %37)
- to label %bb2.i.i.i44 unwind label %lpad25
-
-bb2.i.i.i44: ; preds = %bb1.i.i.i43, %bb.i.i.i42
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %32, align 4
- br label %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46
-
-_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46: ; preds = %bb2.i.i.i44, %lpad21
- %38 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %38, align 4
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %32, align 4
- %39 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %40, align 4
- br label %ppad
-
-lpad25: ; preds = %bb1.i.i.i43
- %eh_ptr26 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad29: ; preds = %bb1.i.i.i49
- %eh_ptr30 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select32 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr30, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr22, %_ZN20btAlignedObjectArrayIPN20btMultiSapBroadphase15btMultiSapProxyEED1Ev.exit46 ] ; [#uses=1]
- %41 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %42 = load %struct.btActionInterface*** %41, align 4 ; [#uses=2]
- %43 = icmp eq %struct.btActionInterface** %42, null ; [#uses=1]
- br i1 %43, label %invcont10, label %bb.i.i.i48
-
-bb.i.i.i48: ; preds = %ppad
- %44 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %45 = load i8* %44, align 4 ; [#uses=1]
- %toBool.i.i.i47 = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i47, label %bb2.i.i.i50, label %bb1.i.i.i49
-
-bb1.i.i.i49: ; preds = %bb.i.i.i48
- %46 = bitcast %struct.btActionInterface** %42 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %46)
- to label %bb2.i.i.i50 unwind label %lpad29
-
-bb2.i.i.i50: ; preds = %bb1.i.i.i49, %bb.i.i.i48
- store %struct.btActionInterface** null, %struct.btActionInterface*** %41, align 4
- br label %invcont10
-}
-
-; [#uses=0]
-define void @_ZN20btMultiSapBroadphase9buildTreeERK9btVector3S2_(%struct.btMultiSapBroadphase* nocapture %this, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax) align 2 {
-entry:
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = call i8* @_Z22btAlignedAllocInternalji(i32 172, i32 16) ; [#uses=2]
- %1 = bitcast i8* %0 to %struct.btQuantizedBvh* ; [#uses=3]
- invoke void @_ZN14btQuantizedBvhC1Ev(%struct.btQuantizedBvh* %1)
- to label %bb3 unwind label %lpad
-
-invcont1: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %entry
- %2 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 4 ; [#uses=4]
- store %struct.btQuantizedBvh* %1, %struct.btQuantizedBvh** %2, align 4
- call void @_ZN14btQuantizedBvh21setQuantizationValuesERK9btVector3S2_f(%struct.btQuantizedBvh* %1, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax, float 1.000000e+00)
- %3 = load %struct.btQuantizedBvh** %2, align 4 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %3, i32 0, i32 9 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp sgt i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb3
- %8 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuantizedBvh* %3, i32 0, i32 9, i32 1 ; [#uses=4]
- %16 = getelementptr inbounds %struct.btQuantizedBvh* %3, i32 0, i32 9, i32 2 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuantizedBvh* %3, i32 0, i32 9, i32 3 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit, %bb.nph
- %18 = phi i32 [ 0, %bb.nph ], [ %tmp, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit ] ; [#uses=3]
- %tmp = add i32 %18, 1 ; [#uses=2]
- %19 = load %struct.btActionInterface*** %8, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btActionInterface** %19, i32 %18 ; [#uses=1]
- %20 = load %struct.btActionInterface** %scevgep, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btActionInterface* %20, i32 0, i32 0 ; [#uses=1]
- %22 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 11 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %24 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %25(%struct.btActionInterface* %20, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %26 = load %struct.btQuantizedBvh** %2, align 4 ; [#uses=6]
- %27 = load float* %9, align 8 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuantizedBvh* %26, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fsub float %27, %29 ; [#uses=1]
- %31 = load float* %10, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %26, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = fsub float %31, %33 ; [#uses=1]
- %35 = load float* %11, align 8 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuantizedBvh* %26, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = fsub float %35, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuantizedBvh* %26, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = fmul float %30, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuantizedBvh* %26, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=2]
- %44 = fmul float %34, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuantizedBvh* %26, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- %47 = fmul float %38, %46 ; [#uses=1]
- %48 = fptoui float %47 to i16 ; [#uses=1]
- %49 = and i16 %48, -2 ; [#uses=1]
- %50 = fptoui float %44 to i16 ; [#uses=1]
- %51 = and i16 %50, -2 ; [#uses=1]
- %52 = fptoui float %41 to i16 ; [#uses=1]
- %53 = and i16 %52, -2 ; [#uses=1]
- %54 = load float* %12, align 8 ; [#uses=1]
- %55 = fsub float %54, %29 ; [#uses=1]
- %56 = load float* %13, align 4 ; [#uses=1]
- %57 = fsub float %56, %33 ; [#uses=1]
- %58 = load float* %14, align 8 ; [#uses=1]
- %59 = fsub float %58, %37 ; [#uses=1]
- %60 = fmul float %55, %40 ; [#uses=1]
- %61 = fmul float %57, %43 ; [#uses=1]
- %62 = fmul float %59, %46 ; [#uses=1]
- %63 = fadd float %62, 1.000000e+00 ; [#uses=1]
- %64 = fptoui float %63 to i16 ; [#uses=1]
- %65 = or i16 %64, 1 ; [#uses=1]
- %66 = fadd float %61, 1.000000e+00 ; [#uses=1]
- %67 = fptoui float %66 to i16 ; [#uses=1]
- %68 = or i16 %67, 1 ; [#uses=1]
- %69 = fadd float %60, 1.000000e+00 ; [#uses=1]
- %70 = fptoui float %69 to i16 ; [#uses=1]
- %71 = or i16 %70, 1 ; [#uses=1]
- %72 = load i32* %15, align 4 ; [#uses=4]
- %73 = load i32* %16, align 4 ; [#uses=1]
- %74 = icmp eq i32 %73, %72 ; [#uses=1]
- br i1 %74, label %bb.i, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit
-
-bb.i: ; preds = %bb4
- %75 = icmp eq i32 %72, 0 ; [#uses=1]
- %76 = shl i32 %72, 1 ; [#uses=1]
- %iftmp.195.0.i.i = select i1 %75, i32 1, i32 %76 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE7reserveEi(%struct.QuantizedNodeArray* %4, i32 %iftmp.195.0.i.i) inlinehint
- %.pre.i = load i32* %15, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit: ; preds = %bb.i, %bb4
- %77 = phi i32 [ %.pre.i, %bb.i ], [ %72, %bb4 ] ; [#uses=7]
- %78 = load %struct.BT_QUANTIZED_BVH_NODE** %17, align 4 ; [#uses=7]
- %79 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %78, i32 %77, i32 0, i32 0 ; [#uses=1]
- store i16 %49, i16* %79, align 4
- %80 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %78, i32 %77, i32 0, i32 1 ; [#uses=1]
- store i16 %51, i16* %80, align 2
- %81 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %78, i32 %77, i32 0, i32 2 ; [#uses=1]
- store i16 %53, i16* %81, align 4
- %82 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %78, i32 %77, i32 1, i32 0 ; [#uses=1]
- store i16 %65, i16* %82, align 2
- %83 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %78, i32 %77, i32 1, i32 1 ; [#uses=1]
- store i16 %68, i16* %83, align 2
- %84 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %78, i32 %77, i32 1, i32 2 ; [#uses=1]
- store i16 %71, i16* %84, align 2
- %85 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %78, i32 %77, i32 2 ; [#uses=1]
- store i32 %18, i32* %85, align 4
- %86 = load i32* %15, align 4 ; [#uses=1]
- %87 = add nsw i32 %86, 1 ; [#uses=1]
- store i32 %87, i32* %15, align 4
- %88 = load i32* %5, align 4 ; [#uses=1]
- %89 = icmp sgt i32 %88, %tmp ; [#uses=1]
- br i1 %89, label %bb4, label %bb5.bb6_crit_edge
-
-bb5.bb6_crit_edge: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit
- %.pre = load %struct.btQuantizedBvh** %2, align 4 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5.bb6_crit_edge, %bb3
- %90 = phi %struct.btQuantizedBvh* [ %.pre, %bb5.bb6_crit_edge ], [ %3, %bb3 ] ; [#uses=1]
- call void @_ZN14btQuantizedBvh13buildInternalEv(%struct.btQuantizedBvh* %90)
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %0)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN20btMultiSapBroadphaseC2EiP22btOverlappingPairCache(%struct.btMultiSapBroadphase* nocapture %this, i32 %unnamed_arg, %struct..0btMultiSapOverlapFilterCallback* %pairCache) align 2 {
-invcont1:
- %0 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV20btMultiSapBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- store %struct.btActionInterface** null, %struct.btActionInterface*** %2, align 4
- %3 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 3 ; [#uses=3]
- store %struct..0btMultiSapOverlapFilterCallback* %pairCache, %struct..0btMultiSapOverlapFilterCallback** %5, align 4
- %6 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btQuantizedBvh* null, %struct.btQuantizedBvh** %6, align 4
- %7 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 5 ; [#uses=2]
- store i8 0, i8* %7, align 4
- %8 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 4 ; [#uses=3]
- store i8 1, i8* %9, align 4
- %10 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 3 ; [#uses=4]
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %10, align 4
- %11 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 1 ; [#uses=2]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 8, i32 2 ; [#uses=2]
- store i32 0, i32* %12, align 4
- %13 = icmp eq %struct..0btMultiSapOverlapFilterCallback* %pairCache, null ; [#uses=1]
- br i1 %13, label %bb, label %bb10
-
-bb: ; preds = %invcont1
- store i8 1, i8* %7, align 4
- %14 = invoke i8* @_Z22btAlignedAllocInternalji(i32 36, i32 16)
- to label %invcont3 unwind label %lpad36 ; [#uses=3]
-
-invcont3: ; preds = %bb
- %15 = icmp eq i8* %14, null ; [#uses=1]
- br i1 %15, label %bb9, label %bb4
-
-bb4: ; preds = %invcont3
- %16 = bitcast i8* %14 to %struct.btSortedOverlappingPairCache* ; [#uses=1]
- invoke void @_ZN28btSortedOverlappingPairCacheC1Ev(%struct.btSortedOverlappingPairCache* %16)
- to label %bb9 unwind label %lpad40
-
-bb9: ; preds = %bb4, %invcont3
- %17 = bitcast i8* %14 to %struct..0btMultiSapOverlapFilterCallback* ; [#uses=1]
- store %struct..0btMultiSapOverlapFilterCallback* %17, %struct..0btMultiSapOverlapFilterCallback** %5, align 4
- br label %bb10
-
-bb10: ; preds = %bb9, %invcont1
- %18 = invoke i8* @_Z22btAlignedAllocInternalji(i32 4, i32 16)
- to label %invcont11 unwind label %lpad36 ; [#uses=3]
-
-invcont11: ; preds = %bb10
- %19 = icmp eq i8* %18, null ; [#uses=1]
- br i1 %19, label %bb14, label %bb12
-
-bb12: ; preds = %invcont11
- %20 = bitcast i8* %18 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN20btMultiSapBroadphaseC4EiP22btOverlappingPairCacheE31btMultiSapOverlapFilterCallback, i32 0, i32 2), i32 (...)*** %20, align 4
- br label %bb14
-
-bb14: ; preds = %bb12, %invcont11
- %21 = bitcast i8* %18 to %struct.btActionInterface* ; [#uses=2]
- %22 = getelementptr inbounds %struct.btMultiSapBroadphase* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* %21, %struct.btActionInterface** %22, align 4
- %23 = load %struct..0btMultiSapOverlapFilterCallback** %5, align 4 ; [#uses=2]
- %24 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %23, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load i32 (...)*** %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32 (...)** %25, i32 11 ; [#uses=1]
- %27 = load i32 (...)** %26, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %27 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %28(%struct..0btMultiSapOverlapFilterCallback* %23, %struct.btActionInterface* %21)
- to label %return unwind label %lpad36
-
-return: ; preds = %bb14
- ret void
-
-lpad36: ; preds = %bb14, %bb10, %bb
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad53
-
-lpad40: ; preds = %bb4
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad53
-
-lpad44: ; preds = %bb1.i.i.i
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad48: ; preds = %bb1.i.i.i60
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i61, %ppad52
- store i8 1, i8* %1, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 4
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btBroadphaseInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-ppad52: ; preds = %bb2.i.i.i, %ppad53
- store i8 1, i8* %9, align 4
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %10, align 4
- store i32 0, i32* %11, align 4
- store i32 0, i32* %12, align 4
- %29 = load %struct.btActionInterface*** %2, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btActionInterface** %29, null ; [#uses=1]
- br i1 %30, label %ppad, label %bb.i.i.i59
-
-bb.i.i.i59: ; preds = %ppad52
- %31 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i.i58 = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i58, label %bb2.i.i.i61, label %bb1.i.i.i60
-
-bb1.i.i.i60: ; preds = %bb.i.i.i59
- %32 = bitcast %struct.btActionInterface** %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %32)
- to label %bb2.i.i.i61 unwind label %lpad48
-
-bb2.i.i.i61: ; preds = %bb1.i.i.i60, %bb.i.i.i59
- store %struct.btActionInterface** null, %struct.btActionInterface*** %2, align 4
- br label %ppad
-
-ppad53: ; preds = %lpad40, %lpad36
- %eh_exception.0 = phi i8* [ %eh_ptr37, %lpad36 ], [ %eh_ptr41, %lpad40 ] ; [#uses=1]
- %33 = load %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %10, align 4 ; [#uses=2]
- %34 = icmp eq %"struct.btMultiSapBroadphase::btMultiSapProxy"** %33, null ; [#uses=1]
- br i1 %34, label %ppad52, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad53
- %35 = load i8* %9, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %36 = bitcast %"struct.btMultiSapBroadphase::btMultiSapProxy"** %33 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %36)
- to label %bb2.i.i.i unwind label %lpad44
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.btMultiSapBroadphase::btMultiSapProxy"** null, %"struct.btMultiSapBroadphase::btMultiSapProxy"*** %10, align 4
- br label %ppad52
-}
-
-; [#uses=0]
-define void @_ZN20btMultiSapBroadphaseC1EiP22btOverlappingPairCache(%struct.btMultiSapBroadphase* nocapture %this, i32 %unnamed_arg, %struct..0btMultiSapOverlapFilterCallback* %pairCache) align 2 {
-entry:
- tail call void @_ZN20btMultiSapBroadphaseC2EiP22btOverlappingPairCache(%struct.btMultiSapBroadphase* %this, i32 %unnamed_arg, %struct..0btMultiSapOverlapFilterCallback* %pairCache)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %"struct.btAlignedObjectArray<btBroadphasePair>"* @_ZN28btHashedOverlappingPairCache23getOverlappingPairArrayEv(%struct.btHashedOverlappingPairCache* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1 ; [#uses=1]
- ret %"struct.btAlignedObjectArray<btBroadphasePair>"* %0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btHashedOverlappingPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback(%struct.btHashedOverlappingPairCache* nocapture %this, %struct.btActionInterface* %callback) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %callback, %struct.btActionInterface** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN28btHashedOverlappingPairCache18hasDeferredRemovalEv(%struct.btHashedOverlappingPairCache* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btHashedOverlappingPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback(%struct.btHashedOverlappingPairCache* nocapture %this, %struct.btActionInterface* %ghostPairCallback) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* %ghostPairCallback, %struct.btActionInterface** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %"struct.btAlignedObjectArray<btBroadphasePair>"* @_ZN28btSortedOverlappingPairCache23getOverlappingPairArrayEv(%struct.btSortedOverlappingPairCache* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1 ; [#uses=1]
- ret %"struct.btAlignedObjectArray<btBroadphasePair>"* %0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btSortedOverlappingPairCache24setOverlapFilterCallbackEP23btOverlapFilterCallback(%struct.btSortedOverlappingPairCache* nocapture %this, %struct.btActionInterface* %callback) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btActionInterface* %callback, %struct.btActionInterface** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN28btSortedOverlappingPairCache18hasDeferredRemovalEv(%struct.btSortedOverlappingPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load i8* %0, align 1 ; [#uses=1]
- ret i8 %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btSortedOverlappingPairCache28setInternalGhostPairCallbackEP25btOverlappingPairCallback(%struct.btSortedOverlappingPairCache* nocapture %this, %struct.btActionInterface* %ghostPairCallback) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btActionInterface* %ghostPairCallback, %struct.btActionInterface** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher(%struct.btHashedOverlappingPairCache* nocapture %this, %struct.btBroadphasePair* nocapture %pair, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 2 ; [#uses=3]
- %1 = load %struct.btCollisionAlgorithm** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btCollisionAlgorithm* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCollisionAlgorithm* %1, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- tail call void %6(%struct.btCollisionAlgorithm* %1)
- %7 = getelementptr inbounds %struct.btActionInterface* %dispatcher, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 13 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = load %struct.btCollisionAlgorithm** %0, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %10 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %13 = bitcast %struct.btCollisionAlgorithm* %11 to i8* ; [#uses=1]
- tail call void %12(%struct.btActionInterface* %dispatcher, i8* %13)
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btOverlapCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btOverlapCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD1Ev(%struct..0CleanPairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD0Ev(%struct..0CleanPairCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0CleanPairCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal zeroext i8 @_ZZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallback14processOverlapER16btBroadphasePair(%struct..0CleanPairCallback* nocapture %this, %struct.btBroadphasePair* %pair) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btBroadphaseProxy** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btBroadphaseProxy** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.btBroadphaseProxy* %1, %3 ; [#uses=1]
- br i1 %4, label %bb1, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btBroadphaseProxy** %5, align 4 ; [#uses=1]
- %7 = icmp eq %struct.btBroadphaseProxy* %6, %3 ; [#uses=1]
- br i1 %7, label %bb1, label %bb2
-
-bb1: ; preds = %bb, %entry
- %8 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 2 ; [#uses=1]
- %9 = load %struct..0btMultiSapOverlapFilterCallback** %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %9, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 8 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 3 ; [#uses=1]
- %15 = load %struct.btActionInterface** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %13 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %16(%struct..0btMultiSapOverlapFilterCallback* %9, %struct.btBroadphasePair* %pair, %struct.btActionInterface* %15)
- ret i8 0
-
-bb2: ; preds = %bb
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD1Ev(%struct..1RemovePairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD0Ev(%struct..1RemovePairCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..1RemovePairCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal zeroext i8 @_ZZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallback14processOverlapER16btBroadphasePair(%struct..1RemovePairCallback* nocapture %this, %struct.btBroadphasePair* nocapture %pair) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btBroadphaseProxy** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btBroadphaseProxy** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.btBroadphaseProxy* %1, %3 ; [#uses=1]
- br i1 %4, label %bb3, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btBroadphaseProxy** %5, align 4 ; [#uses=1]
- %7 = icmp eq %struct.btBroadphaseProxy* %6, %3 ; [#uses=1]
- %retval = zext i1 %7 to i8 ; [#uses=1]
- ret i8 %retval
-
-bb3: ; preds = %entry
- ret i8 1
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCache20cleanOverlappingPairER16btBroadphasePairP12btDispatcher(%struct.btSortedOverlappingPairCache* nocapture %this, %struct.btBroadphasePair* nocapture %pair, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 2 ; [#uses=3]
- %1 = load %struct.btCollisionAlgorithm** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btCollisionAlgorithm* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCollisionAlgorithm* %1, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- tail call void %6(%struct.btCollisionAlgorithm* %1)
- %7 = getelementptr inbounds %struct.btActionInterface* %dispatcher, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 13 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = load %struct.btCollisionAlgorithm** %0, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %10 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %13 = bitcast %struct.btCollisionAlgorithm* %11 to i8* ; [#uses=1]
- tail call void %12(%struct.btActionInterface* %dispatcher, i8* %13)
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %0, align 4
- %14 = load i32* @gRemovePairs, align 4 ; [#uses=1]
- %15 = add nsw i32 %14, -1 ; [#uses=1]
- store i32 %15, i32* @gRemovePairs, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD1Ev(%struct..0CleanPairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD0Ev(%struct..0CleanPairCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0CleanPairCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal zeroext i8 @_ZZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallback14processOverlapER16btBroadphasePair(%struct..0CleanPairCallback* nocapture %this, %struct.btBroadphasePair* %pair) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btBroadphaseProxy** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btBroadphaseProxy** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.btBroadphaseProxy* %1, %3 ; [#uses=1]
- br i1 %4, label %bb1, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btBroadphaseProxy** %5, align 4 ; [#uses=1]
- %7 = icmp eq %struct.btBroadphaseProxy* %6, %3 ; [#uses=1]
- br i1 %7, label %bb1, label %bb2
-
-bb1: ; preds = %bb, %entry
- %8 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 2 ; [#uses=1]
- %9 = load %struct..0btMultiSapOverlapFilterCallback** %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %9, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 8 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 3 ; [#uses=1]
- %15 = load %struct.btActionInterface** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %13 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %16(%struct..0btMultiSapOverlapFilterCallback* %9, %struct.btBroadphasePair* %pair, %struct.btActionInterface* %15)
- ret i8 0
-
-bb2: ; preds = %bb
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD1Ev(%struct..1RemovePairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD0Ev(%struct..1RemovePairCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..1RemovePairCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal zeroext i8 @_ZZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallback14processOverlapER16btBroadphasePair(%struct..1RemovePairCallback* nocapture %this, %struct.btBroadphasePair* nocapture %pair) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btBroadphaseProxy** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btBroadphaseProxy** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.btBroadphaseProxy* %1, %3 ; [#uses=1]
- br i1 %4, label %bb3, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBroadphasePair* %pair, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btBroadphaseProxy** %5, align 4 ; [#uses=1]
- %7 = icmp eq %struct.btBroadphaseProxy* %6, %3 ; [#uses=1]
- %retval = zext i1 %7 to i8 ; [#uses=1]
- ret i8 %retval
-
-bb3: ; preds = %entry
- ret i8 1
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCache20sortOverlappingPairsEP12btDispatcher(%struct.btSortedOverlappingPairCache* nocapture %this, %struct.btActionInterface* nocapture %dispatcher) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphasePair* @_ZN28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv(%struct.btHashedOverlappingPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btBroadphasePair** %0, align 4 ; [#uses=1]
- ret %struct.btBroadphasePair* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphasePair* @_ZN28btSortedOverlappingPairCache26getOverlappingPairArrayPtrEv(%struct.btSortedOverlappingPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btBroadphasePair** %0, align 4 ; [#uses=1]
- ret %struct.btBroadphasePair* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphasePair* @_ZNK28btHashedOverlappingPairCache26getOverlappingPairArrayPtrEv(%struct.btHashedOverlappingPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btBroadphasePair** %0, align 4 ; [#uses=1]
- ret %struct.btBroadphasePair* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphasePair* @_ZNK28btSortedOverlappingPairCache26getOverlappingPairArrayPtrEv(%struct.btSortedOverlappingPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btBroadphasePair** %0, align 4 ; [#uses=1]
- ret %struct.btBroadphasePair* %1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK28btHashedOverlappingPairCache22getNumOverlappingPairsEv(%struct.btHashedOverlappingPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK28btSortedOverlappingPairCache22getNumOverlappingPairsEv(%struct.btSortedOverlappingPairCache* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher(%struct.btHashedOverlappingPairCache* %this, %struct.btActionInterface* %callback, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb3.outer
-
-bb: ; preds = %bb3
- %4 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=3]
- %5 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 2 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to i8 (%struct.btActionInterface*, %struct.btBroadphasePair*)* ; [#uses=1]
- %scevgep = getelementptr %struct.btBroadphasePair* %4, i32 %20 ; [#uses=1]
- %9 = tail call zeroext i8 %8(%struct.btActionInterface* %callback, %struct.btBroadphasePair* %scevgep) ; [#uses=1]
- %toBool = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %10 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 3 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btBroadphasePair* %4, i32 %20, i32 1 ; [#uses=1]
- %13 = load %struct.btBroadphaseProxy** %scevgep6, align 4 ; [#uses=1]
- %scevgep78 = getelementptr inbounds %struct.btBroadphasePair* %4, i32 %20, i32 0 ; [#uses=1]
- %14 = load %struct.btBroadphaseProxy** %scevgep78, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %12 to i8* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %16 = tail call i8* %15(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %14, %struct.btBroadphaseProxy* %13, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- %17 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %18 = add nsw i32 %17, -1 ; [#uses=1]
- store i32 %18, i32* @gOverlappingPairs, align 4
- br label %bb3
-
-bb2: ; preds = %bb
- %19 = add nsw i32 %20, 1 ; [#uses=1]
- br label %bb3.outer
-
-bb3.outer: ; preds = %bb2, %entry
- %20 = phi i32 [ 0, %entry ], [ %19, %bb2 ] ; [#uses=5]
- br label %bb3
-
-bb3: ; preds = %bb3.outer, %bb1
- %21 = load i32* %0, align 4 ; [#uses=1]
- %22 = icmp sgt i32 %21, %20 ; [#uses=1]
- br i1 %22, label %bb, label %return
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=1]
-define %struct.btBroadphasePair* @_ZN28btHashedOverlappingPairCache8findPairEP17btBroadphaseProxyS1_(%struct.btHashedOverlappingPairCache* nocapture %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) nounwind align 2 {
-entry:
- %0 = load i32* @gFindPairs, align 4 ; [#uses=1]
- %1 = add nsw i32 %0, 1 ; [#uses=1]
- store i32 %1, i32* @gFindPairs, align 4
- %2 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 4 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 4 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp sgt i32 %3, %5 ; [#uses=2]
- %proxy1_addr.0 = select i1 %6, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1 ; [#uses=1]
- %proxy0_addr.0 = select i1 %6, %struct.btBroadphaseProxy* %proxy1, %struct.btBroadphaseProxy* %proxy0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0_addr.0, i32 0, i32 4 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1_addr.0, i32 0, i32 4 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=2]
- %11 = shl i32 %10, 16 ; [#uses=1]
- %12 = or i32 %11, %8 ; [#uses=2]
- %13 = shl i32 %12, 15 ; [#uses=1]
- %not.i = xor i32 %13, -1 ; [#uses=1]
- %14 = add nsw i32 %12, %not.i ; [#uses=2]
- %15 = ashr i32 %14, 10 ; [#uses=1]
- %16 = xor i32 %15, %14 ; [#uses=1]
- %17 = mul i32 %16, 9 ; [#uses=2]
- %18 = ashr i32 %17, 6 ; [#uses=1]
- %19 = xor i32 %18, %17 ; [#uses=2]
- %20 = shl i32 %19, 11 ; [#uses=1]
- %not2.i = xor i32 %20, -1 ; [#uses=1]
- %21 = add nsw i32 %19, %not2.i ; [#uses=2]
- %22 = ashr i32 %21, 16 ; [#uses=1]
- %23 = xor i32 %22, %21 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = add nsw i32 %25, -1 ; [#uses=1]
- %27 = and i32 %23, %26 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %30 = icmp sgt i32 %29, %27 ; [#uses=1]
- br i1 %30, label %bb3, label %bb21
-
-bb3: ; preds = %entry
- %31 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %32 = load i32** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32* %32, i32 %27 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- br label %bb5
-
-bb4: ; preds = %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit, %bb6
- %36 = load i32** %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32* %36, i32 %index.0 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %index.0.in = phi i32* [ %33, %bb3 ], [ %37, %bb4 ] ; [#uses=1]
- %index.0 = load i32* %index.0.in, align 4 ; [#uses=5]
- %cond = icmp eq i32 %index.0, -1 ; [#uses=1]
- br i1 %cond, label %bb21, label %bb6
-
-bb6: ; preds = %bb5
- %38 = load %struct.btBroadphasePair** %34, align 4 ; [#uses=3]
- %39 = getelementptr inbounds %struct.btBroadphasePair* %38, i32 %index.0, i32 0 ; [#uses=1]
- %40 = load %struct.btBroadphaseProxy** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btBroadphaseProxy* %40, i32 0, i32 4 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %43 = icmp eq i32 %42, %8 ; [#uses=1]
- br i1 %43, label %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit, label %bb4
-
-_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit: ; preds = %bb6
- %44 = getelementptr inbounds %struct.btBroadphasePair* %38, i32 %index.0, i32 1 ; [#uses=1]
- %45 = load %struct.btBroadphaseProxy** %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btBroadphaseProxy* %45, i32 0, i32 4 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %phitmp = icmp eq i32 %47, %10 ; [#uses=1]
- br i1 %phitmp, label %bb20, label %bb4
-
-bb20: ; preds = %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit
- %48 = getelementptr inbounds %struct.btBroadphasePair* %38, i32 %index.0 ; [#uses=1]
- ret %struct.btBroadphasePair* %48
-
-bb21: ; preds = %bb5, %entry
- ret %struct.btBroadphasePair* null
-}
-
-; [#uses=1]
-define i8* @_ZN28btHashedOverlappingPairCache21removeOverlappingPairEP17btBroadphaseProxyS1_P12btDispatcher(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = load i32* @gRemovePairs, align 4 ; [#uses=1]
- %1 = add nsw i32 %0, 1 ; [#uses=1]
- store i32 %1, i32* @gRemovePairs, align 4
- %2 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 4 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 4 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp sgt i32 %3, %5 ; [#uses=2]
- %proxy1_addr.0 = select i1 %6, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1 ; [#uses=2]
- %proxy0_addr.0 = select i1 %6, %struct.btBroadphaseProxy* %proxy1, %struct.btBroadphaseProxy* %proxy0 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0_addr.0, i32 0, i32 4 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1_addr.0, i32 0, i32 4 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=2]
- %11 = shl i32 %10, 16 ; [#uses=1]
- %12 = or i32 %11, %8 ; [#uses=2]
- %13 = shl i32 %12, 15 ; [#uses=1]
- %not.i22 = xor i32 %13, -1 ; [#uses=1]
- %14 = add nsw i32 %12, %not.i22 ; [#uses=2]
- %15 = ashr i32 %14, 10 ; [#uses=1]
- %16 = xor i32 %15, %14 ; [#uses=1]
- %17 = mul i32 %16, 9 ; [#uses=2]
- %18 = ashr i32 %17, 6 ; [#uses=1]
- %19 = xor i32 %18, %17 ; [#uses=2]
- %20 = shl i32 %19, 11 ; [#uses=1]
- %not2.i23 = xor i32 %20, -1 ; [#uses=1]
- %21 = add nsw i32 %19, %not2.i23 ; [#uses=2]
- %22 = ashr i32 %21, 16 ; [#uses=1]
- %23 = xor i32 %22, %21 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = add nsw i32 %25, -1 ; [#uses=1]
- %27 = and i32 %23, %26 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=5]
- %29 = load i32** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32* %29, i32 %27 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- %32 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=8]
- br label %bb1.i
-
-bb.i: ; preds = %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i, %bb2.i
- %33 = load i32** %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i32* %33, i32 %index.0.i ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %entry
- %index.0.in.i = phi i32* [ %30, %entry ], [ %34, %bb.i ] ; [#uses=1]
- %index.0.i = load i32* %index.0.in.i, align 4 ; [#uses=6]
- %cond.i = icmp eq i32 %index.0.i, -1 ; [#uses=1]
- br i1 %cond.i, label %bb20, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %35 = load %struct.btBroadphasePair** %31, align 4 ; [#uses=4]
- %36 = getelementptr inbounds %struct.btBroadphasePair* %35, i32 %index.0.i, i32 0 ; [#uses=1]
- %37 = load %struct.btBroadphaseProxy** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btBroadphaseProxy* %37, i32 0, i32 4 ; [#uses=1]
- %39 = load i32* %38, align 4 ; [#uses=1]
- %40 = icmp eq i32 %39, %8 ; [#uses=1]
- br i1 %40, label %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i, label %bb.i
-
-_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i: ; preds = %bb2.i
- %41 = getelementptr inbounds %struct.btBroadphasePair* %35, i32 %index.0.i, i32 1 ; [#uses=1]
- %42 = load %struct.btBroadphaseProxy** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btBroadphaseProxy* %42, i32 0, i32 4 ; [#uses=1]
- %44 = load i32* %43, align 4 ; [#uses=1]
- %phitmp.i = icmp eq i32 %44, %10 ; [#uses=1]
- br i1 %phitmp.i, label %_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit, label %bb.i
-
-_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit: ; preds = %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i
- %45 = getelementptr inbounds %struct.btBroadphasePair* %35, i32 %index.0.i ; [#uses=3]
- %46 = icmp eq %struct.btBroadphasePair* %45, null ; [#uses=1]
- br i1 %46, label %bb20, label %bb3
-
-bb3: ; preds = %_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit
- %47 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %48 = load i32 (...)*** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds i32 (...)** %48, i32 8 ; [#uses=1]
- %50 = load i32 (...)** %49, align 4 ; [#uses=1]
- %51 = bitcast i32 (...)* %50 to void (%struct.btHashedOverlappingPairCache*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %51(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphasePair* %45, %struct.btActionInterface* %dispatcher)
- %52 = getelementptr inbounds %struct.btBroadphasePair* %35, i32 %index.0.i, i32 3, i32 0 ; [#uses=1]
- %53 = load i8** %52, align 4 ; [#uses=2]
- %54 = ptrtoint %struct.btBroadphasePair* %45 to i32 ; [#uses=1]
- %55 = load %struct.btBroadphasePair** %31, align 4 ; [#uses=1]
- %56 = ptrtoint %struct.btBroadphasePair* %55 to i32 ; [#uses=1]
- %57 = sub nsw i32 %54, %56 ; [#uses=1]
- %58 = ashr i32 %57, 4 ; [#uses=11]
- %59 = load i32** %28, align 4 ; [#uses=1]
- %60 = getelementptr inbounds i32* %59, i32 %27 ; [#uses=2]
- %index.026 = load i32* %60, align 4 ; [#uses=2]
- %61 = icmp eq i32 %index.026, %58 ; [#uses=1]
- br i1 %61, label %bb8, label %bb.nph28
-
-bb.nph28: ; preds = %bb3
- %62 = load i32** %32, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb.nph28
- %index.027 = phi i32 [ %index.026, %bb.nph28 ], [ %index.0, %bb4 ] ; [#uses=3]
- %63 = getelementptr inbounds i32* %62, i32 %index.027 ; [#uses=1]
- %index.0 = load i32* %63, align 4 ; [#uses=2]
- %64 = icmp eq i32 %index.0, %58 ; [#uses=1]
- br i1 %64, label %bb6, label %bb4
-
-bb6: ; preds = %bb4
- %65 = icmp eq i32 %index.027, -1 ; [#uses=1]
- br i1 %65, label %bb8, label %bb7
-
-bb7: ; preds = %bb6
- %66 = load i32** %32, align 4 ; [#uses=2]
- %67 = getelementptr inbounds i32* %66, i32 %index.027 ; [#uses=1]
- %68 = getelementptr inbounds i32* %66, i32 %58 ; [#uses=1]
- %69 = load i32* %68, align 4 ; [#uses=1]
- store i32 %69, i32* %67, align 4
- br label %bb9
-
-bb8: ; preds = %bb6, %bb3
- %70 = load i32** %32, align 4 ; [#uses=1]
- %71 = getelementptr inbounds i32* %70, i32 %58 ; [#uses=1]
- %72 = load i32* %71, align 4 ; [#uses=1]
- store i32 %72, i32* %60, align 4
- br label %bb9
-
-bb9: ; preds = %bb8, %bb7
- %73 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- %74 = load i32* %73, align 4 ; [#uses=1]
- %75 = add nsw i32 %74, -1 ; [#uses=11]
- %76 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 6 ; [#uses=1]
- %77 = load %struct.btActionInterface** %76, align 4 ; [#uses=3]
- %78 = icmp eq %struct.btActionInterface* %77, null ; [#uses=1]
- br i1 %78, label %bb11, label %bb10
-
-bb10: ; preds = %bb9
- %79 = getelementptr inbounds %struct.btActionInterface* %77, i32 0, i32 0 ; [#uses=1]
- %80 = load i32 (...)*** %79, align 4 ; [#uses=1]
- %81 = getelementptr inbounds i32 (...)** %80, i32 3 ; [#uses=1]
- %82 = load i32 (...)** %81, align 4 ; [#uses=1]
- %83 = bitcast i32 (...)* %82 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %84 = tail call i8* %83(%struct.btActionInterface* %77, %struct.btBroadphaseProxy* %proxy0_addr.0, %struct.btBroadphaseProxy* %proxy1_addr.0, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9
- %85 = icmp eq i32 %75, %58 ; [#uses=1]
- br i1 %85, label %bb12, label %bb13
-
-bb12: ; preds = %bb11
- %86 = load i32* %73, align 4 ; [#uses=1]
- %87 = add nsw i32 %86, -1 ; [#uses=1]
- store i32 %87, i32* %73, align 4
- ret i8* %53
-
-bb13: ; preds = %bb11
- %88 = load %struct.btBroadphasePair** %31, align 4 ; [#uses=2]
- %89 = getelementptr inbounds %struct.btBroadphasePair* %88, i32 %75, i32 1 ; [#uses=1]
- %90 = load %struct.btBroadphaseProxy** %89, align 4 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btBroadphaseProxy* %90, i32 0, i32 4 ; [#uses=1]
- %92 = load i32* %91, align 4 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btBroadphasePair* %88, i32 %75, i32 0 ; [#uses=1]
- %94 = load %struct.btBroadphaseProxy** %93, align 4 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btBroadphaseProxy* %94, i32 0, i32 4 ; [#uses=1]
- %96 = load i32* %95, align 4 ; [#uses=1]
- %97 = shl i32 %92, 16 ; [#uses=1]
- %98 = or i32 %96, %97 ; [#uses=2]
- %99 = shl i32 %98, 15 ; [#uses=1]
- %not.i = xor i32 %99, -1 ; [#uses=1]
- %100 = add nsw i32 %98, %not.i ; [#uses=2]
- %101 = ashr i32 %100, 10 ; [#uses=1]
- %102 = xor i32 %101, %100 ; [#uses=1]
- %103 = mul i32 %102, 9 ; [#uses=2]
- %104 = ashr i32 %103, 6 ; [#uses=1]
- %105 = xor i32 %104, %103 ; [#uses=2]
- %106 = shl i32 %105, 11 ; [#uses=1]
- %not2.i = xor i32 %106, -1 ; [#uses=1]
- %107 = add nsw i32 %105, %not2.i ; [#uses=2]
- %108 = ashr i32 %107, 16 ; [#uses=1]
- %109 = xor i32 %108, %107 ; [#uses=1]
- %110 = load i32* %24, align 4 ; [#uses=1]
- %111 = add nsw i32 %110, -1 ; [#uses=1]
- %112 = and i32 %109, %111 ; [#uses=3]
- %113 = load i32** %28, align 4 ; [#uses=1]
- %114 = getelementptr inbounds i32* %113, i32 %112 ; [#uses=2]
- %index.124 = load i32* %114, align 4 ; [#uses=2]
- %115 = icmp eq i32 %index.124, %75 ; [#uses=1]
- br i1 %115, label %bb18, label %bb.nph
-
-bb.nph: ; preds = %bb13
- %116 = load i32** %32, align 4 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb14, %bb.nph
- %index.125 = phi i32 [ %index.124, %bb.nph ], [ %index.1, %bb14 ] ; [#uses=3]
- %117 = getelementptr inbounds i32* %116, i32 %index.125 ; [#uses=1]
- %index.1 = load i32* %117, align 4 ; [#uses=2]
- %118 = icmp eq i32 %index.1, %75 ; [#uses=1]
- br i1 %118, label %bb16, label %bb14
-
-bb16: ; preds = %bb14
- %119 = icmp eq i32 %index.125, -1 ; [#uses=1]
- br i1 %119, label %bb18, label %bb17
-
-bb17: ; preds = %bb16
- %120 = load i32** %32, align 4 ; [#uses=2]
- %121 = getelementptr inbounds i32* %120, i32 %index.125 ; [#uses=1]
- %122 = getelementptr inbounds i32* %120, i32 %75 ; [#uses=1]
- %123 = load i32* %122, align 4 ; [#uses=1]
- store i32 %123, i32* %121, align 4
- br label %bb19
-
-bb18: ; preds = %bb16, %bb13
- %124 = load i32** %32, align 4 ; [#uses=1]
- %125 = getelementptr inbounds i32* %124, i32 %75 ; [#uses=1]
- %126 = load i32* %125, align 4 ; [#uses=1]
- store i32 %126, i32* %114, align 4
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %127 = load %struct.btBroadphasePair** %31, align 4 ; [#uses=8]
- %128 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %58, i32 0 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %75, i32 0 ; [#uses=1]
- %130 = load %struct.btBroadphaseProxy** %129, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %130, %struct.btBroadphaseProxy** %128, align 4
- %131 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %58, i32 1 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %75, i32 1 ; [#uses=1]
- %133 = load %struct.btBroadphaseProxy** %132, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %133, %struct.btBroadphaseProxy** %131, align 4
- %134 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %58, i32 2 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %75, i32 2 ; [#uses=1]
- %136 = load %struct.btCollisionAlgorithm** %135, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %136, %struct.btCollisionAlgorithm** %134, align 4
- %137 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %58, i32 3, i32 0 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btBroadphasePair* %127, i32 %75, i32 3, i32 0 ; [#uses=1]
- %139 = load i8** %138, align 4 ; [#uses=1]
- store i8* %139, i8** %137, align 4
- %140 = load i32** %32, align 4 ; [#uses=1]
- %141 = getelementptr inbounds i32* %140, i32 %58 ; [#uses=1]
- %142 = load i32** %28, align 4 ; [#uses=1]
- %143 = getelementptr inbounds i32* %142, i32 %112 ; [#uses=1]
- %144 = load i32* %143, align 4 ; [#uses=1]
- store i32 %144, i32* %141, align 4
- %145 = load i32** %28, align 4 ; [#uses=1]
- %146 = getelementptr inbounds i32* %145, i32 %112 ; [#uses=1]
- store i32 %58, i32* %146, align 4
- %147 = load i32* %73, align 4 ; [#uses=1]
- %148 = add nsw i32 %147, -1 ; [#uses=1]
- store i32 %148, i32* %73, align 4
- ret i8* %53
-
-bb20: ; preds = %_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit, %bb1.i
- ret i8* null
-}
-
-; [#uses=1]
-define %struct.btBroadphasePair* @_ZN28btSortedOverlappingPairCache8findPairEP17btBroadphaseProxyS1_(%struct.btSortedOverlappingPairCache* nocapture %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 4 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btActionInterface* %1, null ; [#uses=1]
- br i1 %2, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 2 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %8 = tail call zeroext i8 %7(%struct.btActionInterface* %1, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) ; [#uses=1]
- br label %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
-
-bb1.i: ; preds = %entry
- %9 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 1 ; [#uses=1]
- %10 = load i16* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 2 ; [#uses=1]
- %12 = load i16* %11, align 2 ; [#uses=1]
- %13 = and i16 %12, %10 ; [#uses=1]
- %toBoolnot.i = icmp eq i16 %13, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %bb7, label %bb5.i
-
-bb5.i: ; preds = %bb1.i
- %14 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 1 ; [#uses=1]
- %15 = load i16* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 2 ; [#uses=1]
- %17 = load i16* %16, align 2 ; [#uses=1]
- %18 = and i16 %17, %15 ; [#uses=1]
- %not..i = icmp ne i16 %18, 0 ; [#uses=1]
- %retval.i = zext i1 %not..i to i8 ; [#uses=1]
- br label %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
-
-_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit: ; preds = %bb5.i, %bb.i
- %19 = phi i8 [ %8, %bb.i ], [ %retval.i, %bb5.i ] ; [#uses=1]
- %toBoolnot = icmp eq i8 %19, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb7, label %bb3
-
-bb3: ; preds = %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
- %20 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 4 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 4 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = icmp slt i32 %21, %23 ; [#uses=2]
- %tmpPair.1.0 = select i1 %24, %struct.btBroadphaseProxy* %proxy1, %struct.btBroadphaseProxy* %proxy0 ; [#uses=1]
- %tmpPair.0.0 = select i1 %24, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- br label %bb3.i
-
-bb.i11: ; preds = %bb3.i
- %28 = load %struct.btBroadphasePair** %27, align 4 ; [#uses=2]
- %scevgep78.i = getelementptr inbounds %struct.btBroadphasePair* %28, i32 %33, i32 0 ; [#uses=1]
- %29 = load %struct.btBroadphaseProxy** %scevgep78.i, align 4 ; [#uses=1]
- %30 = icmp eq %struct.btBroadphaseProxy* %29, %tmpPair.0.0 ; [#uses=1]
- br i1 %30, label %_ZeqRK16btBroadphasePairS1_.exit.i, label %bb2.i
-
-_ZeqRK16btBroadphasePairS1_.exit.i: ; preds = %bb.i11
- %scevgep.i = getelementptr %struct.btBroadphasePair* %28, i32 %33, i32 1 ; [#uses=1]
- %31 = load %struct.btBroadphaseProxy** %scevgep.i, align 4 ; [#uses=1]
- %phitmp.i = icmp eq %struct.btBroadphaseProxy* %31, %tmpPair.1.0 ; [#uses=1]
- br i1 %phitmp.i, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit, label %bb2.i
-
-bb2.i: ; preds = %_ZeqRK16btBroadphasePairS1_.exit.i, %bb.i11
- %32 = add nsw i32 %33, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb3
- %33 = phi i32 [ 0, %bb3 ], [ %32, %bb2.i ] ; [#uses=5]
- %34 = icmp sgt i32 %26, %33 ; [#uses=1]
- br i1 %34, label %bb.i11, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit
-
-_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit: ; preds = %bb3.i, %_ZeqRK16btBroadphasePairS1_.exit.i
- %index.0.i = phi i32 [ %26, %bb3.i ], [ %33, %_ZeqRK16btBroadphasePairS1_.exit.i ] ; [#uses=2]
- %35 = icmp sgt i32 %26, %index.0.i ; [#uses=1]
- br i1 %35, label %bb5, label %bb7
-
-bb5: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit
- %36 = load %struct.btBroadphasePair** %27, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btBroadphasePair* %36, i32 %index.0.i ; [#uses=1]
- ret %struct.btBroadphasePair* %37
-
-bb7: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit, %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit, %bb1.i
- ret %struct.btBroadphasePair* null
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCache26processAllOverlappingPairsEP17btOverlapCallbackP12btDispatcher(%struct.btSortedOverlappingPairCache* %this, %struct.btActionInterface* %callback, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=4]
- %1 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb3.outer
-
-bb: ; preds = %bb3
- %4 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=3]
- %5 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 2 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to i8 (%struct.btActionInterface*, %struct.btBroadphasePair*)* ; [#uses=1]
- %scevgep6 = getelementptr %struct.btBroadphasePair* %4, i32 %39 ; [#uses=2]
- %9 = tail call zeroext i8 %8(%struct.btActionInterface* %callback, %struct.btBroadphasePair* %scevgep6) ; [#uses=1]
- %toBool = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %10 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 8 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to void (%struct.btSortedOverlappingPairCache*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %13(%struct.btSortedOverlappingPairCache* %this, %struct.btBroadphasePair* %scevgep6, %struct.btActionInterface* %dispatcher)
- %scevgep1718 = getelementptr inbounds %struct.btBroadphasePair* %4, i32 %39, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep1718, align 4
- %scevgep19 = getelementptr %struct.btBroadphasePair* %4, i32 %39, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep19, align 4
- %14 = load i32* %0, align 4 ; [#uses=1]
- %15 = add nsw i32 %14, -1 ; [#uses=8]
- %16 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=8]
- %scevgep910 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %39, i32 0 ; [#uses=2]
- %17 = load %struct.btBroadphaseProxy** %scevgep910, align 4 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btBroadphasePair* %16, i32 %39, i32 1 ; [#uses=2]
- %18 = load %struct.btBroadphaseProxy** %scevgep12, align 4 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btBroadphasePair* %16, i32 %39, i32 2 ; [#uses=2]
- %19 = load %struct.btCollisionAlgorithm** %scevgep14, align 4 ; [#uses=1]
- %scevgep16 = getelementptr %struct.btBroadphasePair* %16, i32 %39, i32 3, i32 0 ; [#uses=2]
- %20 = load i8** %scevgep16, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %15, i32 0 ; [#uses=1]
- %22 = load %struct.btBroadphaseProxy** %21, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %22, %struct.btBroadphaseProxy** %scevgep910, align 4
- %23 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %15, i32 1 ; [#uses=1]
- %24 = load %struct.btBroadphaseProxy** %23, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %24, %struct.btBroadphaseProxy** %scevgep12, align 4
- %25 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %15, i32 2 ; [#uses=1]
- %26 = load %struct.btCollisionAlgorithm** %25, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %26, %struct.btCollisionAlgorithm** %scevgep14, align 4
- %27 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %15, i32 3, i32 0 ; [#uses=1]
- %28 = load i8** %27, align 4 ; [#uses=1]
- store i8* %28, i8** %scevgep16, align 4
- %29 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=4]
- %30 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %15, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* %17, %struct.btBroadphaseProxy** %30, align 4
- %31 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %15, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %18, %struct.btBroadphaseProxy** %31, align 4
- %32 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %15, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %19, %struct.btCollisionAlgorithm** %32, align 4
- %33 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %15, i32 3, i32 0 ; [#uses=1]
- store i8* %20, i8** %33, align 4
- %34 = load i32* %0, align 4 ; [#uses=1]
- %35 = add nsw i32 %34, -1 ; [#uses=1]
- store i32 %35, i32* %0, align 4
- %36 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %37 = add nsw i32 %36, -1 ; [#uses=1]
- store i32 %37, i32* @gOverlappingPairs, align 4
- br label %bb3
-
-bb2: ; preds = %bb
- %38 = add nsw i32 %39, 1 ; [#uses=1]
- br label %bb3.outer
-
-bb3.outer: ; preds = %bb2, %entry
- %39 = phi i32 [ 0, %entry ], [ %38, %bb2 ] ; [#uses=9]
- br label %bb3
-
-bb3: ; preds = %bb3.outer, %bb1
- %40 = load i32* %0, align 4 ; [#uses=1]
- %41 = icmp sgt i32 %40, %39 ; [#uses=1]
- br i1 %41, label %bb, label %return
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZN28btSortedOverlappingPairCache21removeOverlappingPairEP17btBroadphaseProxyS1_P12btDispatcher(%struct.btSortedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 14 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i8 (%struct.btSortedOverlappingPairCache*)* ; [#uses=1]
- %5 = tail call zeroext i8 %4(%struct.btSortedOverlappingPairCache* %this) ; [#uses=1]
- %toBoolnot = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb8
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 4 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 4 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = icmp slt i32 %7, %9 ; [#uses=2]
- %findPair.1.0 = select i1 %10, %struct.btBroadphaseProxy* %proxy1, %struct.btBroadphaseProxy* %proxy0 ; [#uses=1]
- %findPair.0.0 = select i1 %10, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %12 = load i32* %11, align 4 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- br label %bb3.i
-
-bb.i10: ; preds = %bb3.i
- %14 = load %struct.btBroadphasePair** %13, align 4 ; [#uses=2]
- %scevgep78.i = getelementptr inbounds %struct.btBroadphasePair* %14, i32 %19, i32 0 ; [#uses=1]
- %15 = load %struct.btBroadphaseProxy** %scevgep78.i, align 4 ; [#uses=1]
- %16 = icmp eq %struct.btBroadphaseProxy* %15, %findPair.0.0 ; [#uses=1]
- br i1 %16, label %_ZeqRK16btBroadphasePairS1_.exit.i, label %bb2.i
-
-_ZeqRK16btBroadphasePairS1_.exit.i: ; preds = %bb.i10
- %scevgep.i = getelementptr %struct.btBroadphasePair* %14, i32 %19, i32 1 ; [#uses=1]
- %17 = load %struct.btBroadphaseProxy** %scevgep.i, align 4 ; [#uses=1]
- %phitmp.i = icmp eq %struct.btBroadphaseProxy* %17, %findPair.1.0 ; [#uses=1]
- br i1 %phitmp.i, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit, label %bb2.i
-
-bb2.i: ; preds = %_ZeqRK16btBroadphasePairS1_.exit.i, %bb.i10
- %18 = add nsw i32 %19, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb
- %19 = phi i32 [ 0, %bb ], [ %18, %bb2.i ] ; [#uses=5]
- %20 = icmp sgt i32 %12, %19 ; [#uses=1]
- br i1 %20, label %bb.i10, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit
-
-_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit: ; preds = %bb3.i, %_ZeqRK16btBroadphasePairS1_.exit.i
- %index.0.i = phi i32 [ %12, %bb3.i ], [ %19, %_ZeqRK16btBroadphasePairS1_.exit.i ] ; [#uses=7]
- %21 = icmp sgt i32 %12, %index.0.i ; [#uses=1]
- br i1 %21, label %bb4, label %bb8
-
-bb4: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit
- %22 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %23 = add nsw i32 %22, -1 ; [#uses=1]
- store i32 %23, i32* @gOverlappingPairs, align 4
- %24 = load %struct.btBroadphasePair** %13, align 4 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btBroadphasePair* %24, i32 %index.0.i ; [#uses=1]
- %26 = getelementptr inbounds %struct.btBroadphasePair* %24, i32 %index.0.i, i32 3, i32 0 ; [#uses=1]
- %27 = load i8** %26, align 4 ; [#uses=1]
- %28 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 8 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct.btSortedOverlappingPairCache*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %31(%struct.btSortedOverlappingPairCache* %this, %struct.btBroadphasePair* %25, %struct.btActionInterface* %dispatcher)
- %32 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 5 ; [#uses=1]
- %33 = load %struct.btActionInterface** %32, align 4 ; [#uses=3]
- %34 = icmp eq %struct.btActionInterface* %33, null ; [#uses=1]
- br i1 %34, label %bb6, label %bb5
-
-bb5: ; preds = %bb4
- %35 = getelementptr inbounds %struct.btActionInterface* %33, i32 0, i32 0 ; [#uses=1]
- %36 = load i32 (...)*** %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 3 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = bitcast i32 (...)* %38 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %40 = tail call i8* %39(%struct.btActionInterface* %33, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %41 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %43 = add nsw i32 %42, -1 ; [#uses=8]
- %44 = load %struct.btBroadphasePair** %13, align 4 ; [#uses=8]
- %45 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %index.0.i, i32 0 ; [#uses=2]
- %46 = load %struct.btBroadphaseProxy** %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %index.0.i, i32 1 ; [#uses=2]
- %48 = load %struct.btBroadphaseProxy** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %index.0.i, i32 2 ; [#uses=2]
- %50 = load %struct.btCollisionAlgorithm** %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %index.0.i, i32 3, i32 0 ; [#uses=2]
- %52 = load i8** %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %43, i32 0 ; [#uses=1]
- %54 = load %struct.btBroadphaseProxy** %53, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %54, %struct.btBroadphaseProxy** %45, align 4
- %55 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %43, i32 1 ; [#uses=1]
- %56 = load %struct.btBroadphaseProxy** %55, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %56, %struct.btBroadphaseProxy** %47, align 4
- %57 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %43, i32 2 ; [#uses=1]
- %58 = load %struct.btCollisionAlgorithm** %57, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %58, %struct.btCollisionAlgorithm** %49, align 4
- %59 = getelementptr inbounds %struct.btBroadphasePair* %44, i32 %43, i32 3, i32 0 ; [#uses=1]
- %60 = load i8** %59, align 4 ; [#uses=1]
- store i8* %60, i8** %51, align 4
- %61 = load %struct.btBroadphasePair** %13, align 4 ; [#uses=4]
- %62 = getelementptr inbounds %struct.btBroadphasePair* %61, i32 %43, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* %46, %struct.btBroadphaseProxy** %62, align 4
- %63 = getelementptr inbounds %struct.btBroadphasePair* %61, i32 %43, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %48, %struct.btBroadphaseProxy** %63, align 4
- %64 = getelementptr inbounds %struct.btBroadphasePair* %61, i32 %43, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %50, %struct.btCollisionAlgorithm** %64, align 4
- %65 = getelementptr inbounds %struct.btBroadphasePair* %61, i32 %43, i32 3, i32 0 ; [#uses=1]
- store i8* %52, i8** %65, align 4
- %66 = load i32* %11, align 4 ; [#uses=1]
- %67 = add nsw i32 %66, -1 ; [#uses=1]
- store i32 %67, i32* %11, align 4
- ret i8* %27
-
-bb8: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE16findLinearSearchERKS0_.exit, %entry
- ret i8* null
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher(%struct.btSortedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %proxy, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %removeCallback = alloca %struct..1RemovePairCallback, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %removeCallback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct..1RemovePairCallback* %removeCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy, %struct.btBroadphaseProxy** %1, align 4
- %2 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btSortedOverlappingPairCache*, %struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- %7 = getelementptr inbounds %struct..1RemovePairCallback* %removeCallback, i32 0, i32 0 ; [#uses=1]
- invoke void %6(%struct.btSortedOverlappingPairCache* %this, %struct.btActionInterface* %7, %struct.btActionInterface* %dispatcher)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD2Ev(%struct..1RemovePairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher(%struct.btSortedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %proxy, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %cleanPairs = alloca %struct..0CleanPairCallback, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %1, align 8
- %2 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy, %struct.btBroadphaseProxy** %2, align 4
- %3 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 2 ; [#uses=1]
- store %struct..0btMultiSapOverlapFilterCallback* %0, %struct..0btMultiSapOverlapFilterCallback** %3, align 8
- %4 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 3 ; [#uses=1]
- store %struct.btActionInterface* %dispatcher, %struct.btActionInterface** %4, align 4
- %5 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 12 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct.btSortedOverlappingPairCache*, %struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- %10 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 0 ; [#uses=1]
- invoke void %9(%struct.btSortedOverlappingPairCache* %this, %struct.btActionInterface* %10, %struct.btActionInterface* %dispatcher)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %1, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD2Ev(%struct..0CleanPairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btSortedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcher(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %proxy, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %removeCallback = alloca %struct..1RemovePairCallback, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %removeCallback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct..1RemovePairCallback* %removeCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy, %struct.btBroadphaseProxy** %1, align 4
- %2 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btHashedOverlappingPairCache*, %struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- %7 = getelementptr inbounds %struct..1RemovePairCallback* %removeCallback, i32 0, i32 0 ; [#uses=1]
- invoke void %6(%struct.btHashedOverlappingPairCache* %this, %struct.btActionInterface* %7, %struct.btActionInterface* %dispatcher)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherEN18RemovePairCallbackD2Ev(%struct..1RemovePairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1RemovePairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache37removeOverlappingPairsContainingProxyEP17btBroadphaseProxyP12btDispatcherE18RemovePairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcher(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %proxy, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %cleanPairs = alloca %struct..0CleanPairCallback, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %1, align 8
- %2 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy, %struct.btBroadphaseProxy** %2, align 4
- %3 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 2 ; [#uses=1]
- store %struct..0btMultiSapOverlapFilterCallback* %0, %struct..0btMultiSapOverlapFilterCallback** %3, align 8
- %4 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 3 ; [#uses=1]
- store %struct.btActionInterface* %dispatcher, %struct.btActionInterface** %4, align 4
- %5 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 12 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct.btHashedOverlappingPairCache*, %struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- %10 = getelementptr inbounds %struct..0CleanPairCallback* %cleanPairs, i32 0, i32 0 ; [#uses=1]
- invoke void %9(%struct.btHashedOverlappingPairCache* %this, %struct.btActionInterface* %10, %struct.btActionInterface* %dispatcher)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %1, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherEN17CleanPairCallbackD2Ev(%struct..0CleanPairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CleanPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN28btHashedOverlappingPairCache19cleanProxyFromPairsEP17btBroadphaseProxyP12btDispatcherE17CleanPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCacheD0Ev(%struct.btSortedOverlappingPairCache* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btSortedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btBroadphasePair* %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btBroadphasePair* %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- %8 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = bitcast %struct.btSortedOverlappingPairCache* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %10) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCacheD1Ev(%struct.btSortedOverlappingPairCache* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btSortedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btBroadphasePair* %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btBroadphasePair* %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- %8 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btBroadphasePair* @_ZN28btSortedOverlappingPairCache18addOverlappingPairEP17btBroadphaseProxyS1_(%struct.btSortedOverlappingPairCache* nocapture %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 4 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btActionInterface* %1, null ; [#uses=1]
- br i1 %2, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 2 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %8 = tail call zeroext i8 %7(%struct.btActionInterface* %1, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) ; [#uses=1]
- br label %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
-
-bb1.i: ; preds = %entry
- %9 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 1 ; [#uses=1]
- %10 = load i16* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 2 ; [#uses=1]
- %12 = load i16* %11, align 2 ; [#uses=1]
- %13 = and i16 %12, %10 ; [#uses=1]
- %toBoolnot.i = icmp eq i16 %13, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %bb6, label %bb5.i
-
-bb5.i: ; preds = %bb1.i
- %14 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 1 ; [#uses=1]
- %15 = load i16* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 2 ; [#uses=1]
- %17 = load i16* %16, align 2 ; [#uses=1]
- %18 = and i16 %17, %15 ; [#uses=1]
- %not..i = icmp ne i16 %18, 0 ; [#uses=1]
- %retval.i = zext i1 %not..i to i8 ; [#uses=1]
- br label %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
-
-_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit: ; preds = %bb5.i, %bb.i
- %19 = phi i8 [ %8, %bb.i ], [ %retval.i, %bb5.i ] ; [#uses=1]
- %toBoolnot = icmp eq i8 %19, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb6, label %bb3
-
-bb3: ; preds = %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
- %20 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1 ; [#uses=1]
- %21 = tail call %struct.btBroadphasePair* @_ZN20btAlignedObjectArrayI16btBroadphasePairE21expandNonInitializingEv(%"struct.btAlignedObjectArray<btBroadphasePair>"* %20) inlinehint ; [#uses=7]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 4 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 4 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = icmp slt i32 %23, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btBroadphasePair* %21, i32 0, i32 0 ; [#uses=2]
- br i1 %26, label %bb.i8, label %bb1.i9
-
-bb.i8: ; preds = %bb3
- store %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy** %27, align 4
- %28 = getelementptr inbounds %struct.btBroadphasePair* %21, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy1, %struct.btBroadphaseProxy** %28, align 4
- br label %_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit
-
-bb1.i9: ; preds = %bb3
- store %struct.btBroadphaseProxy* %proxy1, %struct.btBroadphaseProxy** %27, align 4
- %29 = getelementptr inbounds %struct.btBroadphasePair* %21, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy** %29, align 4
- br label %_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit
-
-_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit: ; preds = %bb1.i9, %bb.i8
- %30 = getelementptr inbounds %struct.btBroadphasePair* %21, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %30, align 4
- %31 = getelementptr inbounds %struct.btBroadphasePair* %21, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %31, align 4
- %32 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %33 = add nsw i32 %32, 1 ; [#uses=1]
- store i32 %33, i32* @gOverlappingPairs, align 4
- %34 = load i32* @gAddedPairs, align 4 ; [#uses=1]
- %35 = add nsw i32 %34, 1 ; [#uses=1]
- store i32 %35, i32* @gAddedPairs, align 4
- %36 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 5 ; [#uses=1]
- %37 = load %struct.btActionInterface** %36, align 4 ; [#uses=3]
- %38 = icmp eq %struct.btActionInterface* %37, null ; [#uses=1]
- br i1 %38, label %bb6, label %bb4
-
-bb4: ; preds = %_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit
- %39 = getelementptr inbounds %struct.btActionInterface* %37, i32 0, i32 0 ; [#uses=1]
- %40 = load i32 (...)*** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds i32 (...)** %40, i32 2 ; [#uses=1]
- %42 = load i32 (...)** %41, align 4 ; [#uses=1]
- %43 = bitcast i32 (...)* %42 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %44 = tail call %struct.btBroadphasePair* %43(%struct.btActionInterface* %37, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) ; [#uses=0]
- ret %struct.btBroadphasePair* %21
-
-bb6: ; preds = %_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit, %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit, %bb1.i
- %.0 = phi %struct.btBroadphasePair* [ null, %_ZNK28btSortedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit ], [ %21, %_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit ], [ null, %bb1.i ] ; [#uses=1]
- ret %struct.btBroadphasePair* %.0
-}
-
-; [#uses=0]
-define void @_ZN28btSortedOverlappingPairCacheD2Ev(%struct.btSortedOverlappingPairCache* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btSortedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btBroadphasePair** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btBroadphasePair* %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btBroadphasePair* %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %1, align 4
- %8 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCacheD0Ev(%struct.btHashedOverlappingPairCache* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btHashedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %2 = load i32** %1, align 4 ; [#uses=2]
- %3 = icmp eq i32* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast i32* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store i32* null, i32** %1, align 4
- %8 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %11 = load i32** %10, align 4 ; [#uses=2]
- %12 = icmp eq i32* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast i32* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store i32* null, i32** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %bb2.i.i.i53, %ppad
- %16 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %41, align 4
- %17 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %19 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- store i32* null, i32** %10, align 4
- %20 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %23 = load %struct.btBroadphasePair** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btBroadphasePair* %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i41
-
-bb.i.i.i41: ; preds = %bb10
- %25 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i40 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i40, label %bb2.i.i.i43, label %bb1.i.i.i42
-
-bb1.i.i.i42: ; preds = %bb.i.i.i41
- %27 = bitcast %struct.btBroadphasePair* %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i43
-
-bb2.i.i.i43: ; preds = %bb1.i.i.i42, %bb.i.i.i41
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %22, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i43, %bb10
- %28 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %22, align 4
- %29 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %30, align 4
- %31 = bitcast %struct.btHashedOverlappingPairCache* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %31) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %32 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %33 = load i32** %32, align 4 ; [#uses=2]
- %34 = icmp eq i32* %33, null ; [#uses=1]
- br i1 %34, label %_ZN20btAlignedObjectArrayIiED1Ev.exit49, label %bb.i.i.i45
-
-bb.i.i.i45: ; preds = %lpad18
- %35 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %36 = load i8* %35, align 4 ; [#uses=1]
- %toBool.i.i.i44 = icmp eq i8 %36, 0 ; [#uses=1]
- br i1 %toBool.i.i.i44, label %bb2.i.i.i47, label %bb1.i.i.i46
-
-bb1.i.i.i46: ; preds = %bb.i.i.i45
- %37 = bitcast i32* %33 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %37)
- to label %bb2.i.i.i47 unwind label %lpad22
-
-bb2.i.i.i47: ; preds = %bb1.i.i.i46, %bb.i.i.i45
- store i32* null, i32** %32, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit49
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit49: ; preds = %bb2.i.i.i47, %lpad18
- %38 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %38, align 4
- store i32* null, i32** %32, align 4
- %39 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %40, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i46
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %bb1.i.i.i52
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit49, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIiED1Ev.exit49 ] ; [#uses=1]
- %41 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %42 = load %struct.btBroadphasePair** %41, align 4 ; [#uses=2]
- %43 = icmp eq %struct.btBroadphasePair* %42, null ; [#uses=1]
- br i1 %43, label %invcont8, label %bb.i.i.i51
-
-bb.i.i.i51: ; preds = %ppad
- %44 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %45 = load i8* %44, align 4 ; [#uses=1]
- %toBool.i.i.i50 = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i50, label %bb2.i.i.i53, label %bb1.i.i.i52
-
-bb1.i.i.i52: ; preds = %bb.i.i.i51
- %46 = bitcast %struct.btBroadphasePair* %42 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %46)
- to label %bb2.i.i.i53 unwind label %lpad26
-
-bb2.i.i.i53: ; preds = %bb1.i.i.i52, %bb.i.i.i51
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %41, align 4
- br label %invcont8
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCacheD1Ev(%struct.btHashedOverlappingPairCache* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btHashedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %2 = load i32** %1, align 4 ; [#uses=2]
- %3 = icmp eq i32* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast i32* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store i32* null, i32** %1, align 4
- %8 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %11 = load i32** %10, align 4 ; [#uses=2]
- %12 = icmp eq i32* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast i32* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store i32* null, i32** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %bb2.i.i.i53, %ppad
- %16 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %40, align 4
- %17 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %19 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- store i32* null, i32** %10, align 4
- %20 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %23 = load %struct.btBroadphasePair** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btBroadphasePair* %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i41
-
-bb.i.i.i41: ; preds = %bb10
- %25 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i40 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i40, label %bb2.i.i.i43, label %bb1.i.i.i42
-
-bb1.i.i.i42: ; preds = %bb.i.i.i41
- %27 = bitcast %struct.btBroadphasePair* %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i43
-
-bb2.i.i.i43: ; preds = %bb1.i.i.i42, %bb.i.i.i41
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %22, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i43, %bb10
- %28 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %22, align 4
- %29 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %30, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %32 = load i32** %31, align 4 ; [#uses=2]
- %33 = icmp eq i32* %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayIiED1Ev.exit49, label %bb.i.i.i45
-
-bb.i.i.i45: ; preds = %lpad18
- %34 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i44 = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i44, label %bb2.i.i.i47, label %bb1.i.i.i46
-
-bb1.i.i.i46: ; preds = %bb.i.i.i45
- %36 = bitcast i32* %32 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %36)
- to label %bb2.i.i.i47 unwind label %lpad22
-
-bb2.i.i.i47: ; preds = %bb1.i.i.i46, %bb.i.i.i45
- store i32* null, i32** %31, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit49
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit49: ; preds = %bb2.i.i.i47, %lpad18
- %37 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store i32* null, i32** %31, align 4
- %38 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i46
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %bb1.i.i.i52
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit49, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIiED1Ev.exit49 ] ; [#uses=1]
- %40 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %41 = load %struct.btBroadphasePair** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btBroadphasePair* %41, null ; [#uses=1]
- br i1 %42, label %invcont8, label %bb.i.i.i51
-
-bb.i.i.i51: ; preds = %ppad
- %43 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i50 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i50, label %bb2.i.i.i53, label %bb1.i.i.i52
-
-bb1.i.i.i52: ; preds = %bb.i.i.i51
- %45 = bitcast %struct.btBroadphasePair* %41 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %45)
- to label %bb2.i.i.i53 unwind label %lpad26
-
-bb2.i.i.i53: ; preds = %bb1.i.i.i52, %bb.i.i.i51
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %40, align 4
- br label %invcont8
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btBroadphasePair* @_ZN28btHashedOverlappingPairCache18addOverlappingPairEP17btBroadphaseProxyS1_(%struct.btHashedOverlappingPairCache* nocapture %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) align 2 {
-entry:
- %0 = load i32* @gAddedPairs, align 4 ; [#uses=1]
- %1 = add nsw i32 %0, 1 ; [#uses=1]
- store i32 %1, i32* @gAddedPairs, align 4
- %2 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 2 ; [#uses=1]
- %3 = load %struct.btActionInterface** %2, align 4 ; [#uses=3]
- %4 = icmp eq %struct.btActionInterface* %3, null ; [#uses=1]
- br i1 %4, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btActionInterface* %3, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 2 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %10 = tail call zeroext i8 %9(%struct.btActionInterface* %3, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) ; [#uses=1]
- br label %_ZNK28btHashedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
-
-bb1.i: ; preds = %entry
- %11 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 1 ; [#uses=1]
- %12 = load i16* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 2 ; [#uses=1]
- %14 = load i16* %13, align 2 ; [#uses=1]
- %15 = and i16 %14, %12 ; [#uses=1]
- %toBoolnot.i = icmp eq i16 %15, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %bb4, label %bb5.i
-
-bb5.i: ; preds = %bb1.i
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 1 ; [#uses=1]
- %17 = load i16* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 2 ; [#uses=1]
- %19 = load i16* %18, align 2 ; [#uses=1]
- %20 = and i16 %19, %17 ; [#uses=1]
- %not..i = icmp ne i16 %20, 0 ; [#uses=1]
- %retval.i = zext i1 %not..i to i8 ; [#uses=1]
- br label %_ZNK28btHashedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
-
-_ZNK28btHashedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit: ; preds = %bb5.i, %bb.i
- %21 = phi i8 [ %10, %bb.i ], [ %retval.i, %bb5.i ] ; [#uses=1]
- %toBoolnot = icmp eq i8 %21, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb4, label %bb3
-
-bb3: ; preds = %_ZNK28btHashedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit
- %22 = tail call %struct.btBroadphasePair* @_ZN28btHashedOverlappingPairCache15internalAddPairEP17btBroadphaseProxyS1_(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) ; [#uses=1]
- ret %struct.btBroadphasePair* %22
-
-bb4: ; preds = %_ZNK28btHashedOverlappingPairCache24needsBroadphaseCollisionEP17btBroadphaseProxyS1_.exit, %bb1.i
- ret %struct.btBroadphasePair* null
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCache20sortOverlappingPairsEP12btDispatcher(%struct.btHashedOverlappingPairCache* %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %tmpPairs = alloca %"struct.btAlignedObjectArray<btBroadphasePair>", align 8 ; [#uses=6]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %tmpPairs, i32 0, i32 4 ; [#uses=4]
- store i8 1, i8* %1, align 8
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %tmpPairs, i32 0, i32 3 ; [#uses=8]
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %tmpPairs, i32 0, i32 1 ; [#uses=5]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %tmpPairs, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %4, align 8
- %5 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb1
-
-bb: ; preds = %bb1
- %7 = load %struct.btBroadphasePair** %6, align 4 ; [#uses=1]
- %scevgep46 = getelementptr %struct.btBroadphasePair* %7, i32 %9 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI16btBroadphasePairE9push_backERKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %tmpPairs, %struct.btBroadphasePair* %scevgep46) inlinehint
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %8 = add nsw i32 %9, 1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %invcont, %entry
- %9 = phi i32 [ 0, %entry ], [ %8, %invcont ] ; [#uses=3]
- %10 = load i32* %5, align 4 ; [#uses=1]
- %11 = icmp sgt i32 %10, %9 ; [#uses=1]
- br i1 %11, label %bb, label %bb5.preheader
-
-bb5.preheader: ; preds = %bb1
- %12 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- br label %bb5
-
-bb3: ; preds = %bb5
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 3 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %scevgep45 = getelementptr %struct.btBroadphasePair* %16, i32 %22, i32 1 ; [#uses=1]
- %17 = load %struct.btBroadphaseProxy** %scevgep45, align 4 ; [#uses=1]
- %scevgep4344 = getelementptr inbounds %struct.btBroadphasePair* %16, i32 %22, i32 0 ; [#uses=1]
- %18 = load %struct.btBroadphaseProxy** %scevgep4344, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %15 to i8* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %20 = invoke i8* %19(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %18, %struct.btBroadphaseProxy* %17, %struct.btActionInterface* %dispatcher)
- to label %invcont4 unwind label %lpad ; [#uses=0]
-
-invcont4: ; preds = %bb3
- %21 = add nsw i32 %22, 1 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %invcont4, %bb5.preheader
- %22 = phi i32 [ %21, %invcont4 ], [ 0, %bb5.preheader ] ; [#uses=4]
- %23 = load i32* %3, align 4 ; [#uses=2]
- %24 = icmp sgt i32 %23, %22 ; [#uses=1]
- br i1 %24, label %bb3, label %bb9.preheader
-
-bb9.preheader: ; preds = %bb5
- %25 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 1 ; [#uses=2]
- %26 = load i32* %25, align 4 ; [#uses=1]
- %27 = icmp sgt i32 %26, 0 ; [#uses=1]
- br i1 %27, label %bb.nph, label %bb11
-
-bb.nph: ; preds = %bb9.preheader
- %28 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb8, %bb.nph
- %i.237 = phi i32 [ 0, %bb.nph ], [ %30, %bb8 ] ; [#uses=2]
- %29 = load i32** %28, align 4 ; [#uses=1]
- %scevgep42 = getelementptr i32* %29, i32 %i.237 ; [#uses=1]
- store i32 -1, i32* %scevgep42, align 4
- %30 = add nsw i32 %i.237, 1 ; [#uses=2]
- %31 = load i32* %25, align 4 ; [#uses=1]
- %32 = icmp sgt i32 %31, %30 ; [#uses=1]
- br i1 %32, label %bb8, label %bb9.bb11_crit_edge
-
-bb9.bb11_crit_edge: ; preds = %bb8
- %.pre = load i32* %3, align 4 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb9.bb11_crit_edge, %bb9.preheader
- %33 = phi i32 [ %.pre, %bb9.bb11_crit_edge ], [ %23, %bb9.preheader ] ; [#uses=2]
- %34 = icmp sgt i32 %33, 1 ; [#uses=1]
- br i1 %34, label %bb.i, label %bb15
-
-bb.i: ; preds = %bb11
- %35 = add nsw i32 %33, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %tmpPairs, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %35) nounwind
- br label %bb15
-
-bb13: ; preds = %bb15
- %36 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 2 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %scevgep41 = getelementptr %struct.btBroadphasePair* %39, i32 %45, i32 1 ; [#uses=1]
- %40 = load %struct.btBroadphaseProxy** %scevgep41, align 4 ; [#uses=1]
- %scevgep40 = getelementptr inbounds %struct.btBroadphasePair* %39, i32 %45, i32 0 ; [#uses=1]
- %41 = load %struct.btBroadphaseProxy** %scevgep40, align 4 ; [#uses=1]
- %42 = bitcast i32 (...)* %38 to %struct.btBroadphasePair* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %43 = invoke %struct.btBroadphasePair* %42(%struct.btHashedOverlappingPairCache* %this, %struct.btBroadphaseProxy* %41, %struct.btBroadphaseProxy* %40)
- to label %invcont14 unwind label %lpad ; [#uses=0]
-
-invcont14: ; preds = %bb13
- %44 = add nsw i32 %45, 1 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %invcont14, %bb.i, %bb11
- %45 = phi i32 [ %44, %invcont14 ], [ 0, %bb11 ], [ 0, %bb.i ] ; [#uses=4]
- %46 = load i32* %3, align 4 ; [#uses=1]
- %47 = icmp sgt i32 %46, %45 ; [#uses=1]
- br i1 %47, label %bb13, label %bb20
-
-invcont18: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %1, align 8
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb20: ; preds = %bb15
- %48 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %49 = icmp eq %struct.btBroadphasePair* %48, null ; [#uses=1]
- br i1 %49, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit33, label %bb.i.i.i30
-
-bb.i.i.i30: ; preds = %bb20
- %50 = load i8* %1, align 8 ; [#uses=1]
- %toBool.i.i.i29 = icmp eq i8 %50, 0 ; [#uses=1]
- br i1 %toBool.i.i.i29, label %bb2.i.i.i32, label %bb1.i.i.i31
-
-bb1.i.i.i31: ; preds = %bb.i.i.i30
- %51 = bitcast %struct.btBroadphasePair* %48 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %51)
- br label %bb2.i.i.i32
-
-bb2.i.i.i32: ; preds = %bb1.i.i.i31, %bb.i.i.i30
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- ret void
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit33: ; preds = %bb20
- ret void
-
-lpad: ; preds = %bb13, %bb3, %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select22 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %52 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %53 = icmp eq %struct.btBroadphasePair* %52, null ; [#uses=1]
- br i1 %53, label %invcont18, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %54 = load i8* %1, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %54, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %55 = bitcast %struct.btBroadphasePair* %52 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %55)
- to label %bb2.i.i.i unwind label %lpad23
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- br label %invcont18
-
-lpad23: ; preds = %bb1.i.i.i
- %eh_ptr24 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select26 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN28btHashedOverlappingPairCacheD2Ev(%struct.btHashedOverlappingPairCache* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btHashedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %2 = load i32** %1, align 4 ; [#uses=2]
- %3 = icmp eq i32* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast i32* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store i32* null, i32** %1, align 4
- %8 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %11 = load i32** %10, align 4 ; [#uses=2]
- %12 = icmp eq i32* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast i32* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store i32* null, i32** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %bb2.i.i.i53, %ppad
- %16 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %40, align 4
- %17 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %19 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- store i32* null, i32** %10, align 4
- %20 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %23 = load %struct.btBroadphasePair** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btBroadphasePair* %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit, label %bb.i.i.i41
-
-bb.i.i.i41: ; preds = %bb10
- %25 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i40 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i40, label %bb2.i.i.i43, label %bb1.i.i.i42
-
-bb1.i.i.i42: ; preds = %bb.i.i.i41
- %27 = bitcast %struct.btBroadphasePair* %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i43
-
-bb2.i.i.i43: ; preds = %bb1.i.i.i42, %bb.i.i.i41
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %22, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairED1Ev.exit: ; preds = %bb2.i.i.i43, %bb10
- %28 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %22, align 4
- %29 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %30, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %32 = load i32** %31, align 4 ; [#uses=2]
- %33 = icmp eq i32* %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayIiED1Ev.exit49, label %bb.i.i.i45
-
-bb.i.i.i45: ; preds = %lpad18
- %34 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i44 = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i44, label %bb2.i.i.i47, label %bb1.i.i.i46
-
-bb1.i.i.i46: ; preds = %bb.i.i.i45
- %36 = bitcast i32* %32 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %36)
- to label %bb2.i.i.i47 unwind label %lpad22
-
-bb2.i.i.i47: ; preds = %bb1.i.i.i46, %bb.i.i.i45
- store i32* null, i32** %31, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit49
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit49: ; preds = %bb2.i.i.i47, %lpad18
- %37 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store i32* null, i32** %31, align 4
- %38 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i46
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %bb1.i.i.i52
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit49, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIiED1Ev.exit49 ] ; [#uses=1]
- %40 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %41 = load %struct.btBroadphasePair** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btBroadphasePair* %41, null ; [#uses=1]
- br i1 %42, label %invcont8, label %bb.i.i.i51
-
-bb.i.i.i51: ; preds = %ppad
- %43 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i50 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i50, label %bb2.i.i.i53, label %bb1.i.i.i52
-
-bb1.i.i.i52: ; preds = %bb.i.i.i51
- %45 = bitcast %struct.btBroadphasePair* %41 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %45)
- to label %bb2.i.i.i53 unwind label %lpad26
-
-bb2.i.i.i53: ; preds = %bb1.i.i.i52, %bb.i.i.i51
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %40, align 4
- br label %invcont8
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCacheC2Ev(%struct.btSortedOverlappingPairCache* nocapture %this) align 2 {
-bb.i:
- %0 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btSortedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=5]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=8]
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- %3 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=3]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 2 ; [#uses=1]
- store i8 0, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 3 ; [#uses=1]
- store i8 1, i8* %6, align 1
- %7 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %7, align 4
- %8 = getelementptr inbounds %struct.btSortedOverlappingPairCache* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %8, align 4
- %9 = invoke i8* @_Z22btAlignedAllocInternalji(i32 32, i32 16)
- to label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i unwind label %lpad10 ; [#uses=5]
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i: ; preds = %bb.i
- %phitmp.i = bitcast i8* %9 to %struct.btBroadphasePair* ; [#uses=1]
- %10 = load i32* %3, align 4 ; [#uses=2]
- %11 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %11, label %bb.i4.i, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
-
-bb.i4.i: ; preds = %bb.i4.i, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %indvar.i.i = phi i32 [ %indvar.next.i.i, %bb.i4.i ], [ 0, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i ] ; [#uses=6]
- %tmp = shl i32 %indvar.i.i, 4 ; [#uses=4]
- %tmp2435 = or i32 %tmp, 12 ; [#uses=1]
- %scevgep25 = getelementptr i8* %9, i32 %tmp2435 ; [#uses=1]
- %scevgep13.i.i = bitcast i8* %scevgep25 to i8** ; [#uses=1]
- %tmp2736 = or i32 %tmp, 8 ; [#uses=1]
- %scevgep28 = getelementptr i8* %9, i32 %tmp2736 ; [#uses=1]
- %scevgep11.i.i = bitcast i8* %scevgep28 to %struct.btCollisionAlgorithm** ; [#uses=1]
- %tmp3037 = or i32 %tmp, 4 ; [#uses=1]
- %scevgep31 = getelementptr i8* %9, i32 %tmp3037 ; [#uses=1]
- %scevgep9.i.i = bitcast i8* %scevgep31 to %struct.btBroadphaseProxy** ; [#uses=1]
- %scevgep33 = getelementptr i8* %9, i32 %tmp ; [#uses=1]
- %scevgep67.i.i = bitcast i8* %scevgep33 to %struct.btBroadphaseProxy** ; [#uses=1]
- %12 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=4]
- %scevgep5.i.i = getelementptr inbounds %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %13 = load %struct.btBroadphaseProxy** %scevgep5.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %13, %struct.btBroadphaseProxy** %scevgep67.i.i, align 4
- %scevgep8.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %14 = load %struct.btBroadphaseProxy** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %14, %struct.btBroadphaseProxy** %scevgep9.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %15 = load %struct.btCollisionAlgorithm** %scevgep10.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %15, %struct.btCollisionAlgorithm** %scevgep11.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %16 = load i8** %scevgep12.i.i, align 4 ; [#uses=1]
- store i8* %16, i8** %scevgep13.i.i, align 4
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i: ; preds = %bb.i4.i, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %17 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %18 = icmp eq %struct.btBroadphasePair* %17, null ; [#uses=1]
- br i1 %18, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %19 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %19, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %20 = bitcast %struct.btBroadphasePair* %17 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %20)
- to label %bb2.i.i unwind label %lpad10
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- store i8 1, i8* %1, align 4
- store %struct.btBroadphasePair* %phitmp.i, %struct.btBroadphasePair** %2, align 4
- store i32 2, i32* %4, align 4
- ret void
-
-lpad10: ; preds = %bb1.i.i, %bb.i
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %21 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btBroadphasePair* %21, null ; [#uses=1]
- br i1 %22, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad10
- %23 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %24 = bitcast %struct.btBroadphasePair* %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i unwind label %lpad14
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- br label %ppad
-
-lpad14: ; preds = %bb1.i.i.i
- %eh_ptr15 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr15, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad10
- store i8 1, i8* %1, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 4
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV22btOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr11)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN28btSortedOverlappingPairCacheC1Ev(%struct.btSortedOverlappingPairCache* nocapture %this) align 2 {
-entry:
- tail call void @_ZN28btSortedOverlappingPairCacheC2Ev(%struct.btSortedOverlappingPairCache* %this)
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr %struct.btBroadphasePair* @_ZN20btAlignedObjectArrayI16btBroadphasePairE21expandNonInitializingEv(%"struct.btAlignedObjectArray<btBroadphasePair>"* nocapture %this) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 1 ; [#uses=4]
- %1 = load i32* %0, align 4 ; [#uses=7]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.218.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.218.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.218.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.218.0.i, 4 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btBroadphasePair* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btBroadphasePair* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=5]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb.i4.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb.i4.i ] ; [#uses=9]
- %scevgep13.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %scevgep11.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %scevgep9.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep67.i.i = getelementptr inbounds %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %15 = load %struct.btBroadphasePair** %14, align 4 ; [#uses=4]
- %scevgep5.i.i = getelementptr inbounds %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load %struct.btBroadphaseProxy** %scevgep5.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %16, %struct.btBroadphaseProxy** %scevgep67.i.i, align 4
- %scevgep8.i.i = getelementptr %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %17 = load %struct.btBroadphaseProxy** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %17, %struct.btBroadphaseProxy** %scevgep9.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %18 = load %struct.btCollisionAlgorithm** %scevgep10.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %18, %struct.btCollisionAlgorithm** %scevgep11.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %19 = load i8** %scevgep12.i.i, align 4 ; [#uses=1]
- store i8* %19, i8** %scevgep13.i.i, align 4
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i: ; preds = %bb.i4.i, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=3]
- %21 = load %struct.btBroadphasePair** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btBroadphasePair* %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %25 = bitcast %struct.btBroadphasePair* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %25)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %20, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btBroadphasePair* %12, %struct.btBroadphasePair** %20, align 4
- store i32 %iftmp.218.0.i, i32* %2, align 4
- %.pre9 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i, %bb, %entry
- %27 = phi i32 [ %.pre9, %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=1]
- %28 = add nsw i32 %27, 1 ; [#uses=1]
- store i32 %28, i32* %0, align 4
- %29 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=1]
- %30 = load %struct.btBroadphasePair** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btBroadphasePair* %30, i32 %1 ; [#uses=1]
- ret %struct.btBroadphasePair* %31
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI16btBroadphasePairE9push_backERKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* nocapture %this, %struct.btBroadphasePair* nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.218.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.218.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.218.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.218.0.i, 4 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btBroadphasePair* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btBroadphasePair* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=5]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb.i4.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb.i4.i ] ; [#uses=9]
- %scevgep13.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %scevgep11.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %scevgep9.i.i = getelementptr %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep67.i.i = getelementptr inbounds %struct.btBroadphasePair* %12, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %15 = load %struct.btBroadphasePair** %14, align 4 ; [#uses=4]
- %scevgep5.i.i = getelementptr inbounds %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load %struct.btBroadphaseProxy** %scevgep5.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %16, %struct.btBroadphaseProxy** %scevgep67.i.i, align 4
- %scevgep8.i.i = getelementptr %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %17 = load %struct.btBroadphaseProxy** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %17, %struct.btBroadphaseProxy** %scevgep9.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %18 = load %struct.btCollisionAlgorithm** %scevgep10.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %18, %struct.btCollisionAlgorithm** %scevgep11.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btBroadphasePair* %15, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %19 = load i8** %scevgep12.i.i, align 4 ; [#uses=1]
- store i8* %19, i8** %scevgep13.i.i, align 4
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i: ; preds = %bb.i4.i, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=3]
- %21 = load %struct.btBroadphasePair** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btBroadphasePair* %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %25 = bitcast %struct.btBroadphasePair* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %25)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %20, align 4
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btBroadphasePair* %12, %struct.btBroadphasePair** %20, align 4
- store i32 %iftmp.218.0.i, i32* %2, align 4
- %.pre8 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i, %bb, %entry
- %27 = phi i32 [ %.pre8, %_ZN20btAlignedObjectArrayI16btBroadphasePairE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=4]
- %28 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %this, i32 0, i32 3 ; [#uses=1]
- %29 = load %struct.btBroadphasePair** %28, align 4 ; [#uses=4]
- %30 = getelementptr inbounds %struct.btBroadphasePair* %_Val, i32 0, i32 0 ; [#uses=1]
- %31 = load %struct.btBroadphaseProxy** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %27, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* %31, %struct.btBroadphaseProxy** %32, align 4
- %33 = getelementptr inbounds %struct.btBroadphasePair* %_Val, i32 0, i32 1 ; [#uses=1]
- %34 = load %struct.btBroadphaseProxy** %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %27, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %34, %struct.btBroadphaseProxy** %35, align 4
- %36 = getelementptr inbounds %struct.btBroadphasePair* %_Val, i32 0, i32 2 ; [#uses=1]
- %37 = load %struct.btCollisionAlgorithm** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %27, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %37, %struct.btCollisionAlgorithm** %38, align 4
- %39 = getelementptr inbounds %struct.btBroadphasePair* %_Val, i32 0, i32 3, i32 0 ; [#uses=1]
- %40 = load i8** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btBroadphasePair* %29, i32 %27, i32 3, i32 0 ; [#uses=1]
- store i8* %40, i8** %41, align 4
- %42 = load i32* %0, align 4 ; [#uses=1]
- %43 = add nsw i32 %42, 1 ; [#uses=1]
- store i32 %43, i32* %0, align 4
- ret void
-}
-
-; [#uses=8]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* nocapture %this, i32 %newsize, i32* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 2 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to i32* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi i32* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr i32* %11, i32 %indvar.i.i ; [#uses=2]
- %14 = icmp eq i32* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %15 = load i32** %13, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr i32* %15, i32 %indvar.i.i ; [#uses=1]
- %16 = load i32* %scevgep8.i.i, align 4 ; [#uses=1]
- store i32 %16, i32* %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond19 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond19, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i
- %17 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 3 ; [#uses=3]
- %18 = load i32** %17, align 4 ; [#uses=2]
- %19 = icmp eq i32* %18, null ; [#uses=1]
- br i1 %19, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 4 ; [#uses=1]
- %21 = load i8* %20, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %21, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %22 = bitcast i32* %18 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %22)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store i32* null, i32** %17, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %23, align 4
- store i32* %11, i32** %17, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 3 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=1]
- %25 = load i32** %24, align 4 ; [#uses=1]
- %scevgep18 = getelementptr i32* %25, i32 %tmp17 ; [#uses=2]
- %26 = icmp eq i32* %scevgep18, null ; [#uses=1]
- br i1 %26, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %27 = load i32* %fillData, align 4 ; [#uses=1]
- store i32 %27, i32* %scevgep18, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN28btHashedOverlappingPairCache10growTablesEv(%struct.btHashedOverlappingPairCache* nocapture %this) align 2 {
-entry:
- %0 = alloca i32, align 4 ; [#uses=2]
- %1 = alloca i32, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=6]
- %4 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = icmp slt i32 %5, %3 ; [#uses=1]
- br i1 %6, label %bb, label %return
-
-bb: ; preds = %entry
- store i32 0, i32* %1, align 4
- %7 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %7, i32 %3, i32* %1) inlinehint
- store i32 0, i32* %0, align 4
- %8 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %8, i32 %3, i32* %0) inlinehint
- %9 = icmp sgt i32 %3, 0 ; [#uses=2]
- br i1 %9, label %bb.nph14, label %bb8.preheader
-
-bb.nph14: ; preds = %bb
- %10 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph14
- %i.013 = phi i32 [ 0, %bb.nph14 ], [ %12, %bb1 ] ; [#uses=2]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %scevgep21 = getelementptr i32* %11, i32 %i.013 ; [#uses=1]
- store i32 -1, i32* %scevgep21, align 4
- %12 = add nsw i32 %i.013, 1 ; [#uses=2]
- %exitcond20 = icmp eq i32 %12, %3 ; [#uses=1]
- br i1 %exitcond20, label %bb5.preheader, label %bb1
-
-bb5.preheader: ; preds = %bb1
- br i1 %9, label %bb.nph12, label %bb8.preheader
-
-bb.nph12: ; preds = %bb5.preheader
- %13 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb.nph12
- %i.111 = phi i32 [ 0, %bb.nph12 ], [ %15, %bb4 ] ; [#uses=2]
- %14 = load i32** %13, align 4 ; [#uses=1]
- %scevgep19 = getelementptr i32* %14, i32 %i.111 ; [#uses=1]
- store i32 -1, i32* %scevgep19, align 4
- %15 = add nsw i32 %i.111, 1 ; [#uses=2]
- %exitcond18 = icmp eq i32 %15, %3 ; [#uses=1]
- br i1 %exitcond18, label %bb8.preheader, label %bb4
-
-bb8.preheader: ; preds = %bb4, %bb5.preheader, %bb
- %16 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %16, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb8.preheader
- %17 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=2]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %20 = phi i32 [ 0, %bb.nph ], [ %50, %bb7 ] ; [#uses=5]
- %21 = load %struct.btBroadphasePair** %17, align 4 ; [#uses=2]
- %scevgep1516 = getelementptr inbounds %struct.btBroadphasePair* %21, i32 %20, i32 0 ; [#uses=1]
- %22 = load %struct.btBroadphaseProxy** %scevgep1516, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btBroadphaseProxy* %22, i32 0, i32 4 ; [#uses=1]
- %24 = load i32* %23, align 4 ; [#uses=1]
- %scevgep17 = getelementptr %struct.btBroadphasePair* %21, i32 %20, i32 1 ; [#uses=1]
- %25 = load %struct.btBroadphaseProxy** %scevgep17, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btBroadphaseProxy* %25, i32 0, i32 4 ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = shl i32 %27, 16 ; [#uses=1]
- %29 = or i32 %28, %24 ; [#uses=2]
- %30 = shl i32 %29, 15 ; [#uses=1]
- %not.i = xor i32 %30, -1 ; [#uses=1]
- %31 = add nsw i32 %29, %not.i ; [#uses=2]
- %32 = ashr i32 %31, 10 ; [#uses=1]
- %33 = xor i32 %32, %31 ; [#uses=1]
- %34 = mul i32 %33, 9 ; [#uses=2]
- %35 = ashr i32 %34, 6 ; [#uses=1]
- %36 = xor i32 %35, %34 ; [#uses=2]
- %37 = shl i32 %36, 11 ; [#uses=1]
- %not2.i = xor i32 %37, -1 ; [#uses=1]
- %38 = add nsw i32 %36, %not2.i ; [#uses=2]
- %39 = ashr i32 %38, 16 ; [#uses=1]
- %40 = xor i32 %39, %38 ; [#uses=1]
- %41 = load i32* %2, align 4 ; [#uses=1]
- %42 = add nsw i32 %41, -1 ; [#uses=1]
- %43 = and i32 %40, %42 ; [#uses=2]
- %44 = load i32** %18, align 4 ; [#uses=1]
- %45 = load i32** %19, align 4 ; [#uses=1]
- %46 = getelementptr inbounds i32* %45, i32 %43 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %44, i32 %20 ; [#uses=1]
- store i32 %47, i32* %scevgep, align 4
- %48 = load i32** %19, align 4 ; [#uses=1]
- %49 = getelementptr inbounds i32* %48, i32 %43 ; [#uses=1]
- store i32 %20, i32* %49, align 4
- %50 = add nsw i32 %20, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %50, %5 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb7
-
-return: ; preds = %bb7, %bb8.preheader, %entry
- ret void
-}
-
-; [#uses=1]
-define %struct.btBroadphasePair* @_ZN28btHashedOverlappingPairCache15internalAddPairEP17btBroadphaseProxyS1_(%struct.btHashedOverlappingPairCache* nocapture %this, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 4 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 4 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = icmp sgt i32 %1, %3 ; [#uses=2]
- %proxy1_addr.0 = select i1 %4, %struct.btBroadphaseProxy* %proxy0, %struct.btBroadphaseProxy* %proxy1 ; [#uses=4]
- %proxy0_addr.0 = select i1 %4, %struct.btBroadphaseProxy* %proxy1, %struct.btBroadphaseProxy* %proxy0 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0_addr.0, i32 0, i32 4 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1_addr.0, i32 0, i32 4 ; [#uses=2]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = shl i32 %8, 16 ; [#uses=1]
- %10 = or i32 %9, %6 ; [#uses=2]
- %11 = shl i32 %10, 15 ; [#uses=1]
- %not.i10 = xor i32 %11, -1 ; [#uses=1]
- %12 = add nsw i32 %10, %not.i10 ; [#uses=2]
- %13 = ashr i32 %12, 10 ; [#uses=1]
- %14 = xor i32 %13, %12 ; [#uses=1]
- %15 = mul i32 %14, 9 ; [#uses=2]
- %16 = ashr i32 %15, 6 ; [#uses=1]
- %17 = xor i32 %16, %15 ; [#uses=2]
- %18 = shl i32 %17, 11 ; [#uses=1]
- %not2.i11 = xor i32 %18, -1 ; [#uses=1]
- %19 = add nsw i32 %17, %not2.i11 ; [#uses=2]
- %20 = ashr i32 %19, 16 ; [#uses=1]
- %21 = xor i32 %20, %19 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=3]
- %23 = load i32* %22, align 4 ; [#uses=2]
- %24 = add nsw i32 %23, -1 ; [#uses=1]
- %25 = and i32 %21, %24 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %27 = load i32** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32* %27, i32 %25 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=2]
- br label %bb1.i13
-
-bb.i12: ; preds = %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i, %bb2.i
- %31 = load i32** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32* %31, i32 %index.0.i ; [#uses=1]
- br label %bb1.i13
-
-bb1.i13: ; preds = %bb.i12, %entry
- %index.0.in.i = phi i32* [ %28, %entry ], [ %32, %bb.i12 ] ; [#uses=1]
- %index.0.i = load i32* %index.0.in.i, align 4 ; [#uses=5]
- %cond.i = icmp eq i32 %index.0.i, -1 ; [#uses=1]
- br i1 %cond.i, label %bb3, label %bb2.i
-
-bb2.i: ; preds = %bb1.i13
- %33 = load %struct.btBroadphasePair** %29, align 4 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btBroadphasePair* %33, i32 %index.0.i, i32 0 ; [#uses=1]
- %35 = load %struct.btBroadphaseProxy** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btBroadphaseProxy* %35, i32 0, i32 4 ; [#uses=1]
- %37 = load i32* %36, align 4 ; [#uses=1]
- %38 = icmp eq i32 %37, %6 ; [#uses=1]
- br i1 %38, label %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i, label %bb.i12
-
-_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i: ; preds = %bb2.i
- %39 = getelementptr inbounds %struct.btBroadphasePair* %33, i32 %index.0.i, i32 1 ; [#uses=1]
- %40 = load %struct.btBroadphaseProxy** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btBroadphaseProxy* %40, i32 0, i32 4 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %phitmp.i = icmp eq i32 %42, %8 ; [#uses=1]
- br i1 %phitmp.i, label %_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit, label %bb.i12
-
-_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit: ; preds = %_ZN28btHashedOverlappingPairCache10equalsPairERK16btBroadphasePairii.exit.i
- %43 = getelementptr inbounds %struct.btBroadphasePair* %33, i32 %index.0.i ; [#uses=2]
- %44 = icmp eq %struct.btBroadphasePair* %43, null ; [#uses=1]
- br i1 %44, label %bb3, label %bb8
-
-bb3: ; preds = %_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit, %bb1.i13
- %45 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1 ; [#uses=1]
- %48 = tail call %struct.btBroadphasePair* @_ZN20btAlignedObjectArrayI16btBroadphasePairE21expandNonInitializingEv(%"struct.btAlignedObjectArray<btBroadphasePair>"* %47) inlinehint ; [#uses=6]
- %49 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 6 ; [#uses=1]
- %50 = load %struct.btActionInterface** %49, align 4 ; [#uses=3]
- %51 = icmp eq %struct.btActionInterface* %50, null ; [#uses=1]
- br i1 %51, label %bb5, label %bb4
-
-bb4: ; preds = %bb3
- %52 = getelementptr inbounds %struct.btActionInterface* %50, i32 0, i32 0 ; [#uses=1]
- %53 = load i32 (...)*** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds i32 (...)** %53, i32 2 ; [#uses=1]
- %55 = load i32 (...)** %54, align 4 ; [#uses=1]
- %56 = bitcast i32 (...)* %55 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %57 = tail call %struct.btBroadphasePair* %56(%struct.btActionInterface* %50, %struct.btBroadphaseProxy* %proxy0_addr.0, %struct.btBroadphaseProxy* %proxy1_addr.0) ; [#uses=0]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %58 = load i32* %22, align 4 ; [#uses=1]
- %59 = icmp slt i32 %23, %58 ; [#uses=1]
- br i1 %59, label %bb6, label %bb7
-
-bb6: ; preds = %bb5
- tail call void @_ZN28btHashedOverlappingPairCache10growTablesEv(%struct.btHashedOverlappingPairCache* %this)
- %60 = load i32* %22, align 4 ; [#uses=1]
- %61 = add nsw i32 %60, -1 ; [#uses=1]
- %62 = and i32 %61, %21 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %hash.0 = phi i32 [ %62, %bb6 ], [ %25, %bb5 ] ; [#uses=2]
- %63 = load i32* %5, align 4 ; [#uses=1]
- %64 = load i32* %7, align 4 ; [#uses=1]
- %65 = icmp slt i32 %63, %64 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btBroadphasePair* %48, i32 0, i32 0 ; [#uses=2]
- br i1 %65, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb7
- store %struct.btBroadphaseProxy* %proxy0_addr.0, %struct.btBroadphaseProxy** %66, align 4
- %67 = getelementptr inbounds %struct.btBroadphasePair* %48, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy1_addr.0, %struct.btBroadphaseProxy** %67, align 4
- br label %_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit
-
-bb1.i: ; preds = %bb7
- store %struct.btBroadphaseProxy* %proxy1_addr.0, %struct.btBroadphaseProxy** %66, align 4
- %68 = getelementptr inbounds %struct.btBroadphasePair* %48, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* %proxy0_addr.0, %struct.btBroadphaseProxy** %68, align 4
- br label %_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit
-
-_ZN16btBroadphasePairC1ER17btBroadphaseProxyS1_.exit: ; preds = %bb1.i, %bb.i
- %69 = getelementptr inbounds %struct.btBroadphasePair* %48, i32 0, i32 2 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btBroadphasePair* %48, i32 0, i32 3, i32 0 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %69, align 4
- store i8* null, i8** %70, align 4
- %71 = load i32** %30, align 4 ; [#uses=1]
- %72 = getelementptr inbounds i32* %71, i32 %46 ; [#uses=1]
- %73 = load i32** %26, align 4 ; [#uses=1]
- %74 = getelementptr inbounds i32* %73, i32 %hash.0 ; [#uses=1]
- %75 = load i32* %74, align 4 ; [#uses=1]
- store i32 %75, i32* %72, align 4
- %76 = load i32** %26, align 4 ; [#uses=1]
- %77 = getelementptr inbounds i32* %76, i32 %hash.0 ; [#uses=1]
- store i32 %46, i32* %77, align 4
- ret %struct.btBroadphasePair* %48
-
-bb8: ; preds = %_ZN28btHashedOverlappingPairCache16internalFindPairEP17btBroadphaseProxyS1_i.exit
- ret %struct.btBroadphasePair* %43
-}
-
-; [#uses=1]
-define void @_ZN28btHashedOverlappingPairCacheC2Ev(%struct.btHashedOverlappingPairCache* nocapture %this) align 2 {
-bb.i:
- %0 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV28btHashedOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 4 ; [#uses=5]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 3 ; [#uses=8]
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- %3 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 1, i32 2 ; [#uses=3]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %5, align 4
- %6 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %6, align 4
- %7 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 4 ; [#uses=3]
- store i8 1, i8* %7, align 4
- %8 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 3 ; [#uses=4]
- store i32* null, i32** %8, align 4
- %9 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 1 ; [#uses=2]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 4 ; [#uses=3]
- store i8 1, i8* %11, align 4
- %12 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 3 ; [#uses=4]
- store i32* null, i32** %12, align 4
- %13 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 1 ; [#uses=2]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 5, i32 2 ; [#uses=2]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %15, align 4
- %16 = invoke i8* @_Z22btAlignedAllocInternalji(i32 32, i32 16)
- to label %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i unwind label %lpad31 ; [#uses=5]
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i: ; preds = %bb.i
- %phitmp.i = bitcast i8* %16 to %struct.btBroadphasePair* ; [#uses=1]
- %17 = load i32* %3, align 4 ; [#uses=2]
- %18 = icmp sgt i32 %17, 0 ; [#uses=1]
- br i1 %18, label %bb.i4.i, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
-
-bb.i4.i: ; preds = %bb.i4.i, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %indvar.i.i = phi i32 [ %indvar.next.i.i, %bb.i4.i ], [ 0, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i ] ; [#uses=6]
- %tmp = shl i32 %indvar.i.i, 4 ; [#uses=4]
- %tmp6879 = or i32 %tmp, 12 ; [#uses=1]
- %scevgep69 = getelementptr i8* %16, i32 %tmp6879 ; [#uses=1]
- %scevgep13.i.i = bitcast i8* %scevgep69 to i8** ; [#uses=1]
- %tmp7180 = or i32 %tmp, 8 ; [#uses=1]
- %scevgep72 = getelementptr i8* %16, i32 %tmp7180 ; [#uses=1]
- %scevgep11.i.i = bitcast i8* %scevgep72 to %struct.btCollisionAlgorithm** ; [#uses=1]
- %tmp7481 = or i32 %tmp, 4 ; [#uses=1]
- %scevgep75 = getelementptr i8* %16, i32 %tmp7481 ; [#uses=1]
- %scevgep9.i.i = bitcast i8* %scevgep75 to %struct.btBroadphaseProxy** ; [#uses=1]
- %scevgep77 = getelementptr i8* %16, i32 %tmp ; [#uses=1]
- %scevgep67.i.i = bitcast i8* %scevgep77 to %struct.btBroadphaseProxy** ; [#uses=1]
- %19 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=4]
- %scevgep5.i.i = getelementptr inbounds %struct.btBroadphasePair* %19, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %20 = load %struct.btBroadphaseProxy** %scevgep5.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %20, %struct.btBroadphaseProxy** %scevgep67.i.i, align 4
- %scevgep8.i.i = getelementptr %struct.btBroadphasePair* %19, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %21 = load %struct.btBroadphaseProxy** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btBroadphaseProxy* %21, %struct.btBroadphaseProxy** %scevgep9.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btBroadphasePair* %19, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %22 = load %struct.btCollisionAlgorithm** %scevgep10.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %22, %struct.btCollisionAlgorithm** %scevgep11.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btBroadphasePair* %19, i32 %indvar.i.i, i32 3, i32 0 ; [#uses=1]
- %23 = load i8** %scevgep12.i.i, align 4 ; [#uses=1]
- store i8* %23, i8** %scevgep13.i.i, align 4
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %17 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i: ; preds = %bb.i4.i, %_ZN20btAlignedObjectArrayI16btBroadphasePairE8allocateEi.exit.i
- %24 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %25 = icmp eq %struct.btBroadphasePair* %24, null ; [#uses=1]
- br i1 %25, label %invcont3, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- %26 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %27 = bitcast %struct.btBroadphasePair* %24 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %27)
- to label %bb2.i.i unwind label %lpad31
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- br label %invcont3
-
-invcont3: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI16btBroadphasePairE4copyEiiPS0_.exit.i
- store i8 1, i8* %1, align 4
- store %struct.btBroadphasePair* %phitmp.i, %struct.btBroadphasePair** %2, align 4
- store i32 2, i32* %4, align 4
- invoke void @_ZN28btHashedOverlappingPairCache10growTablesEv(%struct.btHashedOverlappingPairCache* %this)
- to label %return unwind label %lpad31
-
-return: ; preds = %invcont3
- ret void
-
-lpad31: ; preds = %invcont3, %bb1.i.i, %bb.i
- %eh_ptr32 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select34 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %28 = load i32** %12, align 4 ; [#uses=2]
- %29 = icmp eq i32* %28, null ; [#uses=1]
- br i1 %29, label %ppad48, label %bb.i.i.i60
-
-bb.i.i.i60: ; preds = %lpad31
- %30 = load i8* %11, align 4 ; [#uses=1]
- %toBool.i.i.i59 = icmp eq i8 %30, 0 ; [#uses=1]
- br i1 %toBool.i.i.i59, label %bb2.i.i.i62, label %bb1.i.i.i61
-
-bb1.i.i.i61: ; preds = %bb.i.i.i60
- %31 = bitcast i32* %28 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %31)
- to label %bb2.i.i.i62 unwind label %lpad35
-
-bb2.i.i.i62: ; preds = %bb1.i.i.i61, %bb.i.i.i60
- store i32* null, i32** %12, align 4
- br label %ppad48
-
-lpad35: ; preds = %bb1.i.i.i61
- %eh_ptr36 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select38 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr36, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad39: ; preds = %bb1.i.i.i
- %eh_ptr40 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select42 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr40, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad43: ; preds = %bb1.i.i.i56
- %eh_ptr44 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select46 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr44, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i57, %ppad47
- store i8 1, i8* %1, align 4
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 4
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV22btOverlappingPairCache, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr32)
- unreachable
-
-ppad47: ; preds = %bb2.i.i.i, %ppad48
- store i8 1, i8* %7, align 4
- store i32* null, i32** %8, align 4
- store i32 0, i32* %9, align 4
- store i32 0, i32* %10, align 4
- %32 = load %struct.btBroadphasePair** %2, align 4 ; [#uses=2]
- %33 = icmp eq %struct.btBroadphasePair* %32, null ; [#uses=1]
- br i1 %33, label %ppad, label %bb.i.i.i55
-
-bb.i.i.i55: ; preds = %ppad47
- %34 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i.i54 = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i54, label %bb2.i.i.i57, label %bb1.i.i.i56
-
-bb1.i.i.i56: ; preds = %bb.i.i.i55
- %35 = bitcast %struct.btBroadphasePair* %32 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %35)
- to label %bb2.i.i.i57 unwind label %lpad43
-
-bb2.i.i.i57: ; preds = %bb1.i.i.i56, %bb.i.i.i55
- store %struct.btBroadphasePair* null, %struct.btBroadphasePair** %2, align 4
- br label %ppad
-
-ppad48: ; preds = %bb2.i.i.i62, %lpad31
- store i8 1, i8* %11, align 4
- store i32* null, i32** %12, align 4
- store i32 0, i32* %13, align 4
- store i32 0, i32* %14, align 4
- %36 = load i32** %8, align 4 ; [#uses=2]
- %37 = icmp eq i32* %36, null ; [#uses=1]
- br i1 %37, label %ppad47, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad48
- %38 = load i8* %7, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %38, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %39 = bitcast i32* %36 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %39)
- to label %bb2.i.i.i unwind label %lpad39
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %8, align 4
- br label %ppad47
-}
-
-; [#uses=5]
-define void @_ZN28btHashedOverlappingPairCacheC1Ev(%struct.btHashedOverlappingPairCache* nocapture %this) align 2 {
-entry:
- tail call void @_ZN28btHashedOverlappingPairCacheC2Ev(%struct.btHashedOverlappingPairCache* %this)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN14btQuantizedBvhC2Ev(%struct.btQuantizedBvh* nocapture %this) align 2 {
-invcont3:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 4 ; [#uses=1]
- store i32 277, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %3, align 4
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %4, align 4
- %5 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %8, align 4
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %11, align 4
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %12, align 4
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %15, align 4
- %16 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %16, align 4
- %17 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %20, align 4
- %21 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %21, align 4
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- store i32 0, i32* %22, align 4
- %23 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 13 ; [#uses=1]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %25, align 4
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %30, align 4
- %31 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- ret void
-}
-
-; [#uses=18]
-declare i32 @llvm.bswap.i32(i32) nounwind readnone
-
-; [#uses=24]
-declare i16 @llvm.bswap.i16(i16) nounwind readnone
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK14btQuantizedBvh31calculateSerializeBufferSizeNewEv(%struct.btQuantizedBvh* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 84
-}
-
-; [#uses=3]
-define void @_ZN14btQuantizedBvh21setQuantizationValuesERK9btVector3S2_f(%struct.btQuantizedBvh* nocapture %this, %struct.btQuadWord* nocapture %bvhAabbMin, %struct.btQuadWord* nocapture %bvhAabbMax, float %quantizationMargin) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %bvhAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fsub float %1, %quantizationMargin ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuadWord* %bvhAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = fsub float %4, %quantizationMargin ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %bvhAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fsub float %7, %quantizationMargin ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %8, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %5, float* %10, align 4
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %2, float* %11, align 4
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %bvhAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fadd float %14, %quantizationMargin ; [#uses=2]
- %16 = getelementptr inbounds %struct.btQuadWord* %bvhAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fadd float %17, %quantizationMargin ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %bvhAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fadd float %20, %quantizationMargin ; [#uses=2]
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %21, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %18, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = fsub float %15, %2 ; [#uses=1]
- %27 = fsub float %18, %5 ; [#uses=1]
- %28 = fsub float %21, %8 ; [#uses=1]
- %29 = fdiv float 6.553300e+04, %26 ; [#uses=1]
- %30 = fdiv float 6.553300e+04, %27 ; [#uses=1]
- %31 = fdiv float 6.553300e+04, %28 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %31, float* %32, align 4
- %33 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %30, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %29, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- store i8 1, i8* %36, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZNK14btQuantizedBvh42walkRecursiveQuantizedTreeAgainstQueryAabbEPK18btQuantizedBvhNodeP21btNodeOverlapCallbackPtS5_(%struct.btQuantizedBvh* %this, %struct.BT_QUANTIZED_BVH_NODE* %currentNode, %struct.btActionInterface* %nodeCallback, i16* %quantizedQueryAabbMin, i16* %quantizedQueryAabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds i16* %quantizedQueryAabbMin, i32 2 ; [#uses=1]
- %1 = getelementptr inbounds i16* %quantizedQueryAabbMax, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds i16* %quantizedQueryAabbMin, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds i16* %quantizedQueryAabbMax, i32 1 ; [#uses=1]
- br label %tailrecurse
-
-tailrecurse: ; preds = %bb5, %bb4, %entry
- %currentNode.tr = phi %struct.BT_QUANTIZED_BVH_NODE* [ %currentNode, %entry ], [ %45, %bb4 ], [ %46, %bb5 ] ; [#uses=11]
- %4 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 0, i32 1, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i16* %quantizedQueryAabbMin, align 2 ; [#uses=1]
- %7 = load i16* %4, align 2 ; [#uses=1]
- %8 = icmp ule i16 %6, %7 ; [#uses=1]
- %9 = load i16* %quantizedQueryAabbMax, align 2 ; [#uses=1]
- %10 = load i16* %5, align 2 ; [#uses=1]
- %11 = icmp uge i16 %9, %10 ; [#uses=1]
- %12 = and i1 %8, %11 ; [#uses=1]
- %13 = load i16* %0, align 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 0, i32 1, i32 2 ; [#uses=1]
- %15 = load i16* %14, align 2 ; [#uses=1]
- %16 = icmp ule i16 %13, %15 ; [#uses=1]
- %17 = and i1 %12, %16 ; [#uses=1]
- %18 = load i16* %1, align 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load i16* %19, align 2 ; [#uses=1]
- %21 = icmp uge i16 %18, %20 ; [#uses=1]
- %22 = and i1 %17, %21 ; [#uses=1]
- %23 = load i16* %2, align 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 0, i32 1, i32 1 ; [#uses=1]
- %25 = load i16* %24, align 2 ; [#uses=1]
- %26 = icmp ule i16 %23, %25 ; [#uses=1]
- %27 = and i1 %22, %26 ; [#uses=1]
- %28 = load i16* %3, align 2 ; [#uses=1]
- %29 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = load i16* %29, align 2 ; [#uses=1]
- %31 = icmp uge i16 %28, %30 ; [#uses=1]
- %32 = and i1 %27, %31 ; [#uses=1]
- br i1 %32, label %bb, label %return
-
-bb: ; preds = %tailrecurse
- %33 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 0, i32 2 ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=3]
- %toBool = icmp slt i32 %34, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %35 = getelementptr inbounds %struct.btActionInterface* %nodeCallback, i32 0, i32 0 ; [#uses=1]
- %36 = load i32 (...)*** %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 2 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = and i32 %34, 2097151 ; [#uses=1]
- %40 = ashr i32 %34, 21 ; [#uses=1]
- %41 = bitcast i32 (...)* %38 to void (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- tail call void %41(%struct.btActionInterface* %nodeCallback, i32 %40, i32 %39)
- ret void
-
-bb2: ; preds = %bb
- %42 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 1 ; [#uses=1]
- tail call void @_ZNK14btQuantizedBvh42walkRecursiveQuantizedTreeAgainstQueryAabbEPK18btQuantizedBvhNodeP21btNodeOverlapCallbackPtS5_(%struct.btQuantizedBvh* %this, %struct.BT_QUANTIZED_BVH_NODE* %42, %struct.btActionInterface* %nodeCallback, i16* %quantizedQueryAabbMin, i16* %quantizedQueryAabbMax)
- %43 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 1, i32 2 ; [#uses=1]
- %44 = load i32* %43, align 4 ; [#uses=2]
- %toBool3 = icmp slt i32 %44, 0 ; [#uses=1]
- br i1 %toBool3, label %bb5, label %bb4
-
-bb4: ; preds = %bb2
- %45 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 2 ; [#uses=1]
- br label %tailrecurse
-
-bb5: ; preds = %bb2
- %.sum = sub i32 1, %44 ; [#uses=1]
- %46 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %currentNode.tr, i32 %.sum ; [#uses=1]
- br label %tailrecurse
-
-return: ; preds = %tailrecurse
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN14btQuantizedBvh32getAlignmentSerializationPaddingEv() nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=0]
-define i32 @_ZNK14btQuantizedBvh28calculateSerializeBufferSizeEv(%struct.btQuantizedBvh* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 13 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = shl i32 %1, 5 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %.pn.v = select i1 %toBool, i32 6, i32 4 ; [#uses=1]
- %.pn = shl i32 %6, %.pn.v ; [#uses=1]
- %7 = add i32 %2, 172 ; [#uses=1]
- %.0 = add i32 %7, %.pn ; [#uses=1]
- ret i32 %.0
-}
-
-; [#uses=0]
-define void @_ZN14btQuantizedBvh30assignInternalNodeFromLeafNodeEii(%struct.btQuantizedBvh* nocapture %this, i32 %internalNode, i32 %leafNodeIndex) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %3 = load %struct.BT_QUANTIZED_BVH_NODE** %2, align 4 ; [#uses=7]
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- %5 = load %struct.BT_QUANTIZED_BVH_NODE** %4, align 4 ; [#uses=7]
- %6 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %internalNode, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %5, i32 %leafNodeIndex, i32 0, i32 0 ; [#uses=1]
- %8 = load i16* %7, align 4 ; [#uses=1]
- store i16 %8, i16* %6, align 4
- %9 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %internalNode, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %5, i32 %leafNodeIndex, i32 0, i32 1 ; [#uses=1]
- %11 = load i16* %10, align 2 ; [#uses=1]
- store i16 %11, i16* %9, align 2
- %12 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %internalNode, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %5, i32 %leafNodeIndex, i32 0, i32 2 ; [#uses=1]
- %14 = load i16* %13, align 4 ; [#uses=1]
- store i16 %14, i16* %12, align 4
- %15 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %internalNode, i32 1, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %5, i32 %leafNodeIndex, i32 1, i32 0 ; [#uses=1]
- %17 = load i16* %16, align 2 ; [#uses=1]
- store i16 %17, i16* %15, align 2
- %18 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %internalNode, i32 1, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %5, i32 %leafNodeIndex, i32 1, i32 1 ; [#uses=1]
- %20 = load i16* %19, align 2 ; [#uses=1]
- store i16 %20, i16* %18, align 2
- %21 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %internalNode, i32 1, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %5, i32 %leafNodeIndex, i32 1, i32 2 ; [#uses=1]
- %23 = load i16* %22, align 2 ; [#uses=1]
- store i16 %23, i16* %21, align 2
- %24 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %internalNode, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %5, i32 %leafNodeIndex, i32 2 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=1]
- store i32 %26, i32* %24, align 4
- ret void
-
-bb1: ; preds = %entry
- %27 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %28 = load %struct.btOptimizedBvhNode** %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btOptimizedBvhNode* %28, i32 %internalNode ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=1]
- %31 = load %struct.btOptimizedBvhNode** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btOptimizedBvhNode* %31, i32 %leafNodeIndex ; [#uses=1]
- %33 = bitcast %struct.btOptimizedBvhNode* %29 to i8* ; [#uses=1]
- %34 = bitcast %struct.btOptimizedBvhNode* %32 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %33, i8* %34, i32 64, i32 4, i1 false)
- ret void
-}
-
-; [#uses=44]
-declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvh13swapLeafNodesEii(%struct.btQuantizedBvh* nocapture %this, i32 %i, i32 %splitIndex) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=2]
- %3 = load %struct.BT_QUANTIZED_BVH_NODE** %2, align 4 ; [#uses=14]
- %4 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %i, i32 0, i32 0 ; [#uses=2]
- %5 = load i16* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %i, i32 0, i32 1 ; [#uses=2]
- %7 = load i16* %6, align 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %i, i32 0, i32 2 ; [#uses=2]
- %9 = load i16* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %i, i32 1, i32 0 ; [#uses=2]
- %11 = load i16* %10, align 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %i, i32 1, i32 1 ; [#uses=2]
- %13 = load i16* %12, align 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %i, i32 1, i32 2 ; [#uses=2]
- %15 = load i16* %14, align 2 ; [#uses=1]
- %16 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %i, i32 2 ; [#uses=2]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %splitIndex, i32 0, i32 0 ; [#uses=1]
- %19 = load i16* %18, align 4 ; [#uses=1]
- store i16 %19, i16* %4, align 4
- %20 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %splitIndex, i32 0, i32 1 ; [#uses=1]
- %21 = load i16* %20, align 2 ; [#uses=1]
- store i16 %21, i16* %6, align 2
- %22 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %splitIndex, i32 0, i32 2 ; [#uses=1]
- %23 = load i16* %22, align 4 ; [#uses=1]
- store i16 %23, i16* %8, align 4
- %24 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %splitIndex, i32 1, i32 0 ; [#uses=1]
- %25 = load i16* %24, align 2 ; [#uses=1]
- store i16 %25, i16* %10, align 2
- %26 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %splitIndex, i32 1, i32 1 ; [#uses=1]
- %27 = load i16* %26, align 2 ; [#uses=1]
- store i16 %27, i16* %12, align 2
- %28 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %splitIndex, i32 1, i32 2 ; [#uses=1]
- %29 = load i16* %28, align 2 ; [#uses=1]
- store i16 %29, i16* %14, align 2
- %30 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %3, i32 %splitIndex, i32 2 ; [#uses=1]
- %31 = load i32* %30, align 4 ; [#uses=1]
- store i32 %31, i32* %16, align 4
- %32 = load %struct.BT_QUANTIZED_BVH_NODE** %2, align 4 ; [#uses=7]
- %33 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %splitIndex, i32 0, i32 0 ; [#uses=1]
- store i16 %5, i16* %33, align 4
- %34 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %splitIndex, i32 0, i32 1 ; [#uses=1]
- store i16 %7, i16* %34, align 2
- %35 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %splitIndex, i32 0, i32 2 ; [#uses=1]
- store i16 %9, i16* %35, align 4
- %36 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %splitIndex, i32 1, i32 0 ; [#uses=1]
- store i16 %11, i16* %36, align 2
- %37 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %splitIndex, i32 1, i32 1 ; [#uses=1]
- store i16 %13, i16* %37, align 2
- %38 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %splitIndex, i32 1, i32 2 ; [#uses=1]
- store i16 %15, i16* %38, align 2
- %39 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %splitIndex, i32 2 ; [#uses=1]
- store i32 %17, i32* %39, align 4
- ret void
-
-bb1: ; preds = %entry
- %40 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=2]
- %41 = load %struct.btOptimizedBvhNode** %40, align 4 ; [#uses=18]
- %.068 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 0, i32 0, i32 0 ; [#uses=1]
- %tmp69 = load float* %.068, align 4 ; [#uses=1]
- %.170 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 0, i32 0, i32 1 ; [#uses=1]
- %tmp71 = load float* %.170, align 4 ; [#uses=1]
- %.272 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 0, i32 0, i32 2 ; [#uses=1]
- %tmp73 = load float* %.272, align 4 ; [#uses=1]
- %.374 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp75 = load float* %.374, align 4 ; [#uses=1]
- %.11850.0 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 1, i32 0, i32 0 ; [#uses=1]
- %tmp51 = load float* %.11850.0, align 4 ; [#uses=1]
- %.11850.1 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 1, i32 0, i32 1 ; [#uses=1]
- %tmp52 = load float* %.11850.1, align 4 ; [#uses=1]
- %.11850.2 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 1, i32 0, i32 2 ; [#uses=1]
- %tmp53 = load float* %.11850.2, align 4 ; [#uses=1]
- %.11850.3 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 1, i32 0, i32 3 ; [#uses=1]
- %tmp54 = load float* %.11850.3, align 4 ; [#uses=1]
- %.221 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 2 ; [#uses=1]
- %tmp22 = load i32* %.221, align 4 ; [#uses=1]
- %.323 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 3 ; [#uses=1]
- %tmp25 = load i32* %.323, align 4 ; [#uses=1]
- %.426 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 4 ; [#uses=1]
- %tmp27 = load i32* %.426, align 4 ; [#uses=1]
- %.528.0 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 5, i32 0 ; [#uses=1]
- %tmp31 = load i32* %.528.0, align 4 ; [#uses=1]
- %.528.1 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 5, i32 1 ; [#uses=1]
- %tmp32 = load i32* %.528.1, align 4 ; [#uses=1]
- %.528.2 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 5, i32 2 ; [#uses=1]
- %tmp33 = load i32* %.528.2, align 4 ; [#uses=1]
- %.528.3 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 5, i32 3 ; [#uses=1]
- %tmp34 = load i32* %.528.3, align 4 ; [#uses=1]
- %.528.4 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i, i32 5, i32 4 ; [#uses=1]
- %tmp35 = load i32* %.528.4, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %i ; [#uses=1]
- %43 = getelementptr inbounds %struct.btOptimizedBvhNode* %41, i32 %splitIndex ; [#uses=1]
- %44 = bitcast %struct.btOptimizedBvhNode* %42 to i8* ; [#uses=1]
- %45 = bitcast %struct.btOptimizedBvhNode* %43 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %44, i8* %45, i32 64, i32 4, i1 false)
- %46 = load %struct.btOptimizedBvhNode** %40, align 4 ; [#uses=16]
- %.0 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %tmp69, float* %.0, align 4
- %.162 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %tmp71, float* %.162, align 4
- %.264 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %tmp73, float* %.264, align 4
- %.366 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %tmp75, float* %.366, align 4
- %.145.0 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %tmp51, float* %.145.0, align 4
- %.145.1 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %tmp52, float* %.145.1, align 4
- %.145.2 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %tmp53, float* %.145.2, align 4
- %.145.3 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %tmp54, float* %.145.3, align 4
- %.2 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 2 ; [#uses=1]
- store i32 %tmp22, i32* %.2, align 4
- %.3 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 3 ; [#uses=1]
- store i32 %tmp25, i32* %.3, align 4
- %.4 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 4 ; [#uses=1]
- store i32 %tmp27, i32* %.4, align 4
- %.5.0 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 5, i32 0 ; [#uses=1]
- store i32 %tmp31, i32* %.5.0, align 4
- %.5.1 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 5, i32 1 ; [#uses=1]
- store i32 %tmp32, i32* %.5.1, align 4
- %.5.2 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 5, i32 2 ; [#uses=1]
- store i32 %tmp33, i32* %.5.2, align 4
- %.5.3 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 5, i32 3 ; [#uses=1]
- store i32 %tmp34, i32* %.5.3, align 4
- %.5.4 = getelementptr inbounds %struct.btOptimizedBvhNode* %46, i32 %splitIndex, i32 5, i32 4 ; [#uses=1]
- store i32 %tmp35, i32* %.5.4, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btQuantizedBvh21mergeInternalNodeAabbEiRK9btVector3S2_(%struct.btQuantizedBvh* nocapture %this, i32 %nodeIndex, %struct.btQuadWord* nocapture %newAabbMin, %struct.btQuadWord* nocapture %newAabbMax) nounwind align 2 {
-entry:
- %quantizedAabbMin = alloca [3 x i16], align 2 ; [#uses=3]
- %quantizedAabbMax = alloca [3 x i16], align 2 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb9, label %bb.nph
-
-bb.nph: ; preds = %entry
- %2 = getelementptr inbounds [3 x i16]* %quantizedAabbMin, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %newAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = fsub float %4, %6 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %newAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fsub float %9, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %newAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fsub float %14, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fmul float %7, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fmul float %12, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = fmul float %17, %25 ; [#uses=1]
- %27 = fptoui float %26 to i16 ; [#uses=1]
- %28 = and i16 %27, -2 ; [#uses=3]
- store i16 %28, i16* %2, align 2
- %29 = fptoui float %23 to i16 ; [#uses=1]
- %30 = and i16 %29, -2 ; [#uses=3]
- %31 = getelementptr inbounds [3 x i16]* %quantizedAabbMin, i32 0, i32 1 ; [#uses=1]
- store i16 %30, i16* %31, align 2
- %32 = fptoui float %20 to i16 ; [#uses=1]
- %33 = and i16 %32, -2 ; [#uses=1]
- %34 = getelementptr inbounds [3 x i16]* %quantizedAabbMin, i32 0, i32 2 ; [#uses=2]
- store i16 %33, i16* %34, align 2
- %35 = getelementptr inbounds [3 x i16]* %quantizedAabbMax, i32 0, i32 0 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %newAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fsub float %37, %6 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %newAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fsub float %40, %11 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %newAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fsub float %43, %16 ; [#uses=1]
- %45 = fmul float %38, %19 ; [#uses=1]
- %46 = fmul float %41, %22 ; [#uses=1]
- %47 = fmul float %44, %25 ; [#uses=1]
- %48 = fadd float %47, 1.000000e+00 ; [#uses=1]
- %49 = fptoui float %48 to i16 ; [#uses=1]
- %50 = or i16 %49, 1 ; [#uses=3]
- store i16 %50, i16* %35, align 2
- %51 = fadd float %46, 1.000000e+00 ; [#uses=1]
- %52 = fptoui float %51 to i16 ; [#uses=1]
- %53 = or i16 %52, 1 ; [#uses=2]
- %54 = getelementptr inbounds [3 x i16]* %quantizedAabbMax, i32 0, i32 1 ; [#uses=2]
- store i16 %53, i16* %54, align 2
- %55 = fadd float %45, 1.000000e+00 ; [#uses=1]
- %56 = fptoui float %55 to i16 ; [#uses=1]
- %57 = or i16 %56, 1 ; [#uses=1]
- %58 = getelementptr inbounds [3 x i16]* %quantizedAabbMax, i32 0, i32 2 ; [#uses=2]
- store i16 %57, i16* %58, align 2
- %59 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=6]
- %60 = load %struct.BT_QUANTIZED_BVH_NODE** %59, align 4 ; [#uses=2]
- %scevgep17 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %60, i32 %nodeIndex, i32 0, i32 0 ; [#uses=2]
- %61 = load i16* %scevgep17, align 2 ; [#uses=1]
- %62 = icmp ugt i16 %61, %28 ; [#uses=1]
- br i1 %62, label %bb3, label %bb4
-
-bb3: ; preds = %bb.nph
- store i16 %28, i16* %scevgep17, align 2
- %.pre = load %struct.BT_QUANTIZED_BVH_NODE** %59, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb.nph
- %63 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %.pre, %bb3 ], [ %60, %bb.nph ] ; [#uses=2]
- %scevgep18 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %63, i32 %nodeIndex, i32 1, i32 0 ; [#uses=2]
- %64 = load i16* %scevgep18, align 2 ; [#uses=1]
- %65 = icmp ult i16 %64, %50 ; [#uses=1]
- br i1 %65, label %bb6, label %bb7
-
-bb6: ; preds = %bb4
- store i16 %50, i16* %scevgep18, align 2
- %.pre21 = load %struct.BT_QUANTIZED_BVH_NODE** %59, align 4 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb4
- %66 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %.pre21, %bb6 ], [ %63, %bb4 ] ; [#uses=2]
- %scevgep17.1 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %66, i32 %nodeIndex, i32 0, i32 1 ; [#uses=2]
- %67 = load i16* %scevgep17.1, align 2 ; [#uses=1]
- %68 = icmp ugt i16 %67, %30 ; [#uses=1]
- br i1 %68, label %bb3.1, label %bb4.1
-
-bb9: ; preds = %entry
- %69 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=2]
- %70 = load %struct.btOptimizedBvhNode** %69, align 4 ; [#uses=4]
- %71 = getelementptr inbounds %struct.btQuadWord* %newAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btOptimizedBvhNode* %70, i32 %nodeIndex, i32 0, i32 0, i32 0 ; [#uses=2]
- %73 = load float* %71, align 4 ; [#uses=2]
- %74 = load float* %72, align 4 ; [#uses=1]
- %75 = fcmp olt float %73, %74 ; [#uses=1]
- br i1 %75, label %bb.i.i11, label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-bb.i.i11: ; preds = %bb9
- store float %73, float* %72, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i11, %bb9
- %76 = getelementptr inbounds %struct.btQuadWord* %newAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btOptimizedBvhNode* %70, i32 %nodeIndex, i32 0, i32 0, i32 1 ; [#uses=2]
- %78 = load float* %76, align 4 ; [#uses=2]
- %79 = load float* %77, align 4 ; [#uses=1]
- %80 = fcmp olt float %78, %79 ; [#uses=1]
- br i1 %80, label %bb.i7.i12, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-bb.i7.i12: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i
- store float %78, float* %77, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i12, %_Z8btSetMinIfEvRT_RKS0_.exit.i
- %81 = getelementptr inbounds %struct.btQuadWord* %newAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btOptimizedBvhNode* %70, i32 %nodeIndex, i32 0, i32 0, i32 2 ; [#uses=2]
- %83 = load float* %81, align 4 ; [#uses=2]
- %84 = load float* %82, align 4 ; [#uses=1]
- %85 = fcmp olt float %83, %84 ; [#uses=1]
- br i1 %85, label %bb.i4.i13, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-bb.i4.i13: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- store float %83, float* %82, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i13, %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- %86 = getelementptr inbounds %struct.btQuadWord* %newAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btOptimizedBvhNode* %70, i32 %nodeIndex, i32 0, i32 0, i32 3 ; [#uses=2]
- %88 = load float* %86, align 4 ; [#uses=2]
- %89 = load float* %87, align 4 ; [#uses=1]
- %90 = fcmp olt float %88, %89 ; [#uses=1]
- br i1 %90, label %bb.i1.i14, label %_ZN9btVector36setMinERKS_.exit
-
-bb.i1.i14: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- store float %88, float* %87, align 4
- br label %_ZN9btVector36setMinERKS_.exit
-
-_ZN9btVector36setMinERKS_.exit: ; preds = %bb.i1.i14, %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- %91 = load %struct.btOptimizedBvhNode** %69, align 4 ; [#uses=4]
- %92 = getelementptr inbounds %struct.btQuadWord* %newAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btOptimizedBvhNode* %91, i32 %nodeIndex, i32 1, i32 0, i32 0 ; [#uses=2]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = load float* %92, align 4 ; [#uses=2]
- %96 = fcmp olt float %94, %95 ; [#uses=1]
- br i1 %96, label %bb.i.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-bb.i.i: ; preds = %_ZN9btVector36setMinERKS_.exit
- store float %95, float* %93, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i, %_ZN9btVector36setMinERKS_.exit
- %97 = getelementptr inbounds %struct.btQuadWord* %newAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btOptimizedBvhNode* %91, i32 %nodeIndex, i32 1, i32 0, i32 1 ; [#uses=2]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = load float* %97, align 4 ; [#uses=2]
- %101 = fcmp olt float %99, %100 ; [#uses=1]
- br i1 %101, label %bb.i7.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-bb.i7.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- store float %100, float* %98, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i, %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- %102 = getelementptr inbounds %struct.btQuadWord* %newAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btOptimizedBvhNode* %91, i32 %nodeIndex, i32 1, i32 0, i32 2 ; [#uses=2]
- %104 = load float* %103, align 4 ; [#uses=1]
- %105 = load float* %102, align 4 ; [#uses=2]
- %106 = fcmp olt float %104, %105 ; [#uses=1]
- br i1 %106, label %bb.i4.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-bb.i4.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- store float %105, float* %103, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- %107 = getelementptr inbounds %struct.btQuadWord* %newAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btOptimizedBvhNode* %91, i32 %nodeIndex, i32 1, i32 0, i32 3 ; [#uses=2]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = load float* %107, align 4 ; [#uses=2]
- %111 = fcmp olt float %109, %110 ; [#uses=1]
- br i1 %111, label %bb.i1.i, label %_ZN9btVector36setMaxERKS_.exit
-
-bb.i1.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- store float %110, float* %108, align 4
- ret void
-
-_ZN9btVector36setMaxERKS_.exit: ; preds = %bb4.2, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- ret void
-
-bb7.1: ; preds = %bb6.1, %bb4.1
- %112 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %.pre24, %bb6.1 ], [ %117, %bb4.1 ] ; [#uses=2]
- %scevgep17.2 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %112, i32 %nodeIndex, i32 0, i32 2 ; [#uses=2]
- %113 = load i16* %scevgep17.2, align 2 ; [#uses=1]
- %114 = load i16* %34, align 2 ; [#uses=2]
- %115 = icmp ugt i16 %113, %114 ; [#uses=1]
- br i1 %115, label %bb3.2, label %bb4.2
-
-bb4.1: ; preds = %bb3.1, %bb7
- %116 = phi i16 [ %.pre23, %bb3.1 ], [ %53, %bb7 ] ; [#uses=2]
- %117 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %.pre22, %bb3.1 ], [ %66, %bb7 ] ; [#uses=2]
- %scevgep18.1 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %117, i32 %nodeIndex, i32 1, i32 1 ; [#uses=2]
- %118 = load i16* %scevgep18.1, align 2 ; [#uses=1]
- %119 = icmp ult i16 %118, %116 ; [#uses=1]
- br i1 %119, label %bb6.1, label %bb7.1
-
-bb3.1: ; preds = %bb7
- store i16 %30, i16* %scevgep17.1, align 2
- %.pre22 = load %struct.BT_QUANTIZED_BVH_NODE** %59, align 4 ; [#uses=1]
- %.pre23 = load i16* %54, align 2 ; [#uses=1]
- br label %bb4.1
-
-bb6.1: ; preds = %bb4.1
- store i16 %116, i16* %scevgep18.1, align 2
- %.pre24 = load %struct.BT_QUANTIZED_BVH_NODE** %59, align 4 ; [#uses=1]
- br label %bb7.1
-
-bb4.2: ; preds = %bb3.2, %bb7.1
- %120 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %.pre25, %bb3.2 ], [ %112, %bb7.1 ] ; [#uses=1]
- %scevgep18.2 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %120, i32 %nodeIndex, i32 1, i32 2 ; [#uses=2]
- %121 = load i16* %scevgep18.2, align 2 ; [#uses=1]
- %122 = load i16* %58, align 2 ; [#uses=2]
- %123 = icmp ult i16 %121, %122 ; [#uses=1]
- br i1 %123, label %bb6.2, label %_ZN9btVector36setMaxERKS_.exit
-
-bb3.2: ; preds = %bb7.1
- store i16 %114, i16* %scevgep17.2, align 2
- %.pre25 = load %struct.BT_QUANTIZED_BVH_NODE** %59, align 4 ; [#uses=1]
- br label %bb4.2
-
-bb6.2: ; preds = %bb4.2
- store i16 %122, i16* %scevgep18.2, align 2
- ret void
-}
-
-; [#uses=3]
-define void @_ZNK14btQuantizedBvh26walkStacklessQuantizedTreeEP21btNodeOverlapCallbackPtS2_ii(%struct.btQuantizedBvh* nocapture %this, %struct.btActionInterface* %nodeCallback, i16* nocapture %quantizedQueryAabbMin, i16* nocapture %quantizedQueryAabbMax, i32 %startNodeIndex, i32 %endNodeIndex) align 2 {
-entry:
- %0 = icmp slt i32 %startNodeIndex, %endNodeIndex ; [#uses=1]
- br i1 %0, label %bb.nph, label %bb9
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %2 = load %struct.BT_QUANTIZED_BVH_NODE** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %startNodeIndex ; [#uses=1]
- %4 = getelementptr inbounds i16* %quantizedQueryAabbMin, i32 2 ; [#uses=1]
- %5 = getelementptr inbounds i16* %quantizedQueryAabbMax, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds i16* %quantizedQueryAabbMin, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds i16* %quantizedQueryAabbMax, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btActionInterface* %nodeCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb8.backedge, %bb.nph
- %rootNode.015 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %3, %bb.nph ], [ %rootNode.0.be, %bb8.backedge ] ; [#uses=9]
- %walkIterations.014 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb8.backedge ] ; [#uses=1]
- %curIndex.013 = phi i32 [ %startNodeIndex, %bb.nph ], [ %curIndex.0.be, %bb8.backedge ] ; [#uses=2]
- %tmp = add i32 %walkIterations.014, 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 0, i32 1, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load i16* %quantizedQueryAabbMin, align 2 ; [#uses=1]
- %12 = load i16* %9, align 2 ; [#uses=1]
- %13 = icmp ule i16 %11, %12 ; [#uses=1]
- %14 = load i16* %quantizedQueryAabbMax, align 2 ; [#uses=1]
- %15 = load i16* %10, align 2 ; [#uses=1]
- %16 = icmp uge i16 %14, %15 ; [#uses=1]
- %17 = and i1 %13, %16 ; [#uses=1]
- %18 = load i16* %4, align 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 0, i32 1, i32 2 ; [#uses=1]
- %20 = load i16* %19, align 2 ; [#uses=1]
- %21 = icmp ule i16 %18, %20 ; [#uses=1]
- %22 = and i1 %17, %21 ; [#uses=1]
- %23 = load i16* %5, align 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load i16* %24, align 2 ; [#uses=1]
- %26 = icmp uge i16 %23, %25 ; [#uses=1]
- %27 = and i1 %22, %26 ; [#uses=1]
- %28 = load i16* %6, align 2 ; [#uses=1]
- %29 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 0, i32 1, i32 1 ; [#uses=1]
- %30 = load i16* %29, align 2 ; [#uses=1]
- %31 = icmp ule i16 %28, %30 ; [#uses=1]
- %32 = and i1 %27, %31 ; [#uses=1]
- %33 = load i16* %7, align 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load i16* %34, align 2 ; [#uses=1]
- %36 = icmp uge i16 %33, %35 ; [#uses=1]
- %37 = and i1 %32, %36 ; [#uses=1]
- %38 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 0, i32 2 ; [#uses=2]
- %39 = load i32* %38, align 4 ; [#uses=3]
- %toBool = icmp slt i32 %39, 0 ; [#uses=2]
- %40 = xor i1 %37, true ; [#uses=2]
- %or.cond = or i1 %toBool, %40 ; [#uses=1]
- br i1 %or.cond, label %bb3, label %bb2
-
-bb2: ; preds = %bb
- %41 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 2 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = and i32 %39, 2097151 ; [#uses=1]
- %45 = ashr i32 %39, 21 ; [#uses=1]
- %46 = bitcast i32 (...)* %43 to void (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- tail call void %46(%struct.btActionInterface* %nodeCallback, i32 %45, i32 %44)
- br label %bb3
-
-bb3: ; preds = %bb2, %bb
- %or.cond12 = and i1 %toBool, %40 ; [#uses=1]
- br i1 %or.cond12, label %bb7, label %bb6
-
-bb6: ; preds = %bb3
- %47 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 1 ; [#uses=1]
- %48 = add nsw i32 %curIndex.013, 1 ; [#uses=1]
- br label %bb8.backedge
-
-bb8.backedge: ; preds = %bb7, %bb6
- %curIndex.0.be = phi i32 [ %48, %bb6 ], [ %53, %bb7 ] ; [#uses=2]
- %rootNode.0.be = phi %struct.BT_QUANTIZED_BVH_NODE* [ %47, %bb6 ], [ %52, %bb7 ] ; [#uses=1]
- %49 = icmp slt i32 %curIndex.0.be, %endNodeIndex ; [#uses=1]
- br i1 %49, label %bb, label %bb9
-
-bb7: ; preds = %bb3
- %50 = load i32* %38, align 4 ; [#uses=2]
- %51 = sub nsw i32 0, %50 ; [#uses=1]
- %52 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.015, i32 %51 ; [#uses=1]
- %53 = sub i32 %curIndex.013, %50 ; [#uses=1]
- br label %bb8.backedge
-
-bb9: ; preds = %bb8.backedge, %entry
- %walkIterations.0.lcssa = phi i32 [ 0, %entry ], [ %tmp, %bb8.backedge ] ; [#uses=2]
- %54 = load i32* @maxIterations, align 4 ; [#uses=1]
- %55 = icmp slt i32 %54, %walkIterations.0.lcssa ; [#uses=1]
- br i1 %55, label %bb10, label %return
-
-bb10: ; preds = %bb9
- store i32 %walkIterations.0.lcssa, i32* @maxIterations, align 4
- ret void
-
-return: ; preds = %bb9
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK14btQuantizedBvh17walkStacklessTreeEP21btNodeOverlapCallbackRK9btVector3S4_(%struct.btQuantizedBvh* nocapture %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb9
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %4 = load %struct.btOptimizedBvhNode** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btActionInterface* %nodeCallback, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb8.backedge, %bb.nph
- %walkIterations.017 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb8.backedge ] ; [#uses=1]
- %curIndex.016 = phi i32 [ 0, %bb.nph ], [ %curIndex.0.be, %bb8.backedge ] ; [#uses=2]
- %rootNode.015 = phi %struct.btOptimizedBvhNode* [ %4, %bb.nph ], [ %rootNode.0.be, %bb8.backedge ] ; [#uses=13]
- %tmp = add i32 %walkIterations.017, 1 ; [#uses=2]
- %12 = load float* %5, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fcmp ogt float %12, %14 ; [#uses=1]
- br i1 %15, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %bb
- %16 = load float* %11, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp olt float %16, %18 ; [#uses=1]
- br i1 %19, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb.i, %bb
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb.i
- %iftmp.116.0.i = phi i8 [ 0, %bb2.i ], [ 1, %bb.i ] ; [#uses=1]
- %20 = load float* %6, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fcmp ogt float %20, %22 ; [#uses=1]
- br i1 %23, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %24 = load float* %10, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fcmp olt float %24, %26 ; [#uses=1]
- br i1 %27, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i
- %iftmp.117.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.116.0.i, %bb4.i ] ; [#uses=1]
- %28 = load float* %7, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fcmp ogt float %28, %30 ; [#uses=1]
- br i1 %31, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit.thread, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit.thread: ; preds = %bb7.i
- %32 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 2 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = icmp eq i32 %33, -1 ; [#uses=1]
- br label %bb3
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- %35 = load float* %8, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fcmp olt float %35, %37 ; [#uses=1]
- %retval.i = select i1 %38, i8 0, i8 %iftmp.117.0.i ; [#uses=3]
- %39 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 2 ; [#uses=1]
- %40 = load i32* %39, align 4 ; [#uses=1]
- %41 = icmp eq i32 %40, -1 ; [#uses=3]
- %.not = xor i1 %41, true ; [#uses=1]
- %42 = icmp eq i8 %retval.i, 0 ; [#uses=1]
- %or.cond = or i1 %42, %.not ; [#uses=1]
- br i1 %or.cond, label %bb3, label %bb2
-
-bb2: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
- %43 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %44 = getelementptr inbounds i32 (...)** %43, i32 2 ; [#uses=1]
- %45 = load i32 (...)** %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 4 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 3 ; [#uses=1]
- %49 = load i32* %48, align 4 ; [#uses=1]
- %50 = bitcast i32 (...)* %45 to void (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- tail call void %50(%struct.btActionInterface* %nodeCallback, i32 %49, i32 %47)
- br label %bb3
-
-bb3: ; preds = %bb2, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit.thread
- %51 = phi i1 [ %34, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit.thread ], [ %41, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit ], [ %41, %bb2 ] ; [#uses=1]
- %52 = phi i8 [ 0, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit.thread ], [ %retval.i, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit ], [ %retval.i, %bb2 ] ; [#uses=1]
- %.not12 = icmp ne i8 %52, 0 ; [#uses=1]
- %brmerge = or i1 %.not12, %51 ; [#uses=1]
- br i1 %brmerge, label %bb6, label %bb7
-
-bb6: ; preds = %bb3
- %53 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 1 ; [#uses=1]
- %54 = add nsw i32 %curIndex.016, 1 ; [#uses=1]
- br label %bb8.backedge
-
-bb8.backedge: ; preds = %bb7, %bb6
- %rootNode.0.be = phi %struct.btOptimizedBvhNode* [ %53, %bb6 ], [ %59, %bb7 ] ; [#uses=1]
- %curIndex.0.be = phi i32 [ %54, %bb6 ], [ %60, %bb7 ] ; [#uses=2]
- %55 = load i32* %0, align 4 ; [#uses=1]
- %56 = icmp sgt i32 %55, %curIndex.0.be ; [#uses=1]
- br i1 %56, label %bb, label %bb9
-
-bb7: ; preds = %bb3
- %57 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 0, i32 2 ; [#uses=1]
- %58 = load i32* %57, align 4 ; [#uses=2]
- %59 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.015, i32 %58 ; [#uses=1]
- %60 = add nsw i32 %58, %curIndex.016 ; [#uses=1]
- br label %bb8.backedge
-
-bb9: ; preds = %bb8.backedge, %entry
- %walkIterations.0.lcssa = phi i32 [ 0, %entry ], [ %tmp, %bb8.backedge ] ; [#uses=2]
- %61 = load i32* @maxIterations, align 4 ; [#uses=1]
- %62 = icmp slt i32 %61, %walkIterations.0.lcssa ; [#uses=1]
- br i1 %62, label %bb10, label %return
-
-bb10: ; preds = %bb9
- store i32 %walkIterations.0.lcssa, i32* @maxIterations, align 4
- ret void
-
-return: ; preds = %bb9
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN14btQuantizedBvh17calcSplittingAxisEii(%struct.btQuantizedBvh* %this, i32 %startIndex, i32 %endIndex) nounwind readonly align 2 {
-entry:
- %0 = sub nsw i32 %endIndex, %startIndex ; [#uses=4]
- %1 = icmp slt i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %1, label %bb.nph85, label %bb2.thread
-
-bb2.thread: ; preds = %entry
- %2 = sitofp i32 %0 to float ; [#uses=1]
- br label %bb6
-
-bb.nph85: ; preds = %entry
- %3 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i16 = icmp eq i8 %4, 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15, %bb.nph85
- %indvar108 = phi i32 [ 0, %bb.nph85 ], [ %indvar.next109, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15 ] ; [#uses=2]
- %means.0.2.083 = phi float [ 0.000000e+00, %bb.nph85 ], [ %67, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15 ] ; [#uses=1]
- %means.0.1.082 = phi float [ 0.000000e+00, %bb.nph85 ], [ %66, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15 ] ; [#uses=1]
- %means.0.0.081 = phi float [ 0.000000e+00, %bb.nph85 ], [ %65, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15 ] ; [#uses=1]
- %tmp112 = add i32 %indvar108, %startIndex ; [#uses=12]
- br i1 %toBool.i16, label %bb1.i14, label %bb.i13
-
-bb.i13: ; preds = %bb
- %13 = load %struct.BT_QUANTIZED_BVH_NODE** %6, align 4 ; [#uses=3]
- %scevgep121 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %13, i32 %tmp112, i32 0, i32 2 ; [#uses=1]
- %14 = load i16* %scevgep121, align 2 ; [#uses=1]
- %15 = uitofp i16 %14 to float ; [#uses=1]
- %16 = load float* %7, align 4 ; [#uses=1]
- %17 = fdiv float %15, %16 ; [#uses=1]
- %scevgep122 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %13, i32 %tmp112, i32 0, i32 1 ; [#uses=1]
- %18 = load i16* %scevgep122, align 2 ; [#uses=1]
- %19 = uitofp i16 %18 to float ; [#uses=1]
- %20 = load float* %8, align 4 ; [#uses=1]
- %21 = fdiv float %19, %20 ; [#uses=1]
- %scevgep119120 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %13, i32 %tmp112, i32 0, i32 0 ; [#uses=1]
- %22 = load i16* %scevgep119120, align 2 ; [#uses=1]
- %23 = uitofp i16 %22 to float ; [#uses=1]
- %24 = load float* %9, align 4 ; [#uses=1]
- %25 = fdiv float %23, %24 ; [#uses=1]
- %26 = load float* %10, align 4 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = load float* %11, align 4 ; [#uses=1]
- %29 = fadd float %21, %28 ; [#uses=1]
- %30 = load float* %12, align 4 ; [#uses=1]
- %31 = fadd float %17, %30 ; [#uses=1]
- %32 = load %struct.BT_QUANTIZED_BVH_NODE** %6, align 4 ; [#uses=3]
- %scevgep114 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %tmp112, i32 1, i32 2 ; [#uses=1]
- %33 = load i16* %scevgep114, align 2 ; [#uses=1]
- %34 = uitofp i16 %33 to float ; [#uses=1]
- %35 = load float* %7, align 4 ; [#uses=1]
- %36 = fdiv float %34, %35 ; [#uses=1]
- %scevgep115 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %tmp112, i32 1, i32 1 ; [#uses=1]
- %37 = load i16* %scevgep115, align 2 ; [#uses=1]
- %38 = uitofp i16 %37 to float ; [#uses=1]
- %39 = load float* %8, align 4 ; [#uses=1]
- %40 = fdiv float %38, %39 ; [#uses=1]
- %scevgep113 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %32, i32 %tmp112, i32 1, i32 0 ; [#uses=1]
- %41 = load i16* %scevgep113, align 2 ; [#uses=1]
- %42 = uitofp i16 %41 to float ; [#uses=1]
- %43 = load float* %9, align 4 ; [#uses=1]
- %44 = fdiv float %42, %43 ; [#uses=1]
- %45 = load float* %10, align 4 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=1]
- %47 = load float* %11, align 4 ; [#uses=1]
- %48 = fadd float %40, %47 ; [#uses=1]
- %49 = load float* %12, align 4 ; [#uses=1]
- %50 = fadd float %36, %49 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15
-
-bb1.i14: ; preds = %bb
- %51 = load %struct.btOptimizedBvhNode** %5, align 4 ; [#uses=3]
- %scevgep123124 = getelementptr inbounds %struct.btOptimizedBvhNode* %51, i32 %tmp112, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %scevgep123124, align 4 ; [#uses=1]
- %scevgep125 = getelementptr %struct.btOptimizedBvhNode* %51, i32 %tmp112, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %scevgep125, align 4 ; [#uses=1]
- %scevgep126 = getelementptr %struct.btOptimizedBvhNode* %51, i32 %tmp112, i32 0, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %scevgep126, align 4 ; [#uses=1]
- %55 = load %struct.btOptimizedBvhNode** %5, align 4 ; [#uses=3]
- %scevgep116 = getelementptr %struct.btOptimizedBvhNode* %55, i32 %tmp112, i32 1, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %scevgep116, align 4 ; [#uses=1]
- %scevgep117 = getelementptr %struct.btOptimizedBvhNode* %55, i32 %tmp112, i32 1, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %scevgep117, align 4 ; [#uses=1]
- %scevgep118 = getelementptr %struct.btOptimizedBvhNode* %55, i32 %tmp112, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %scevgep118, align 4 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15
-
-_ZNK14btQuantizedBvh10getAabbMaxEi.exit15: ; preds = %bb1.i14, %bb.i13
- %.0.044.0131 = phi float [ %52, %bb1.i14 ], [ %27, %bb.i13 ] ; [#uses=1]
- %.0.145.0129 = phi float [ %53, %bb1.i14 ], [ %29, %bb.i13 ] ; [#uses=1]
- %.0.246.0127 = phi float [ %54, %bb1.i14 ], [ %31, %bb.i13 ] ; [#uses=1]
- %.0.253.0 = phi float [ %58, %bb1.i14 ], [ %50, %bb.i13 ] ; [#uses=1]
- %.0.152.0 = phi float [ %57, %bb1.i14 ], [ %48, %bb.i13 ] ; [#uses=1]
- %.0.051.0 = phi float [ %56, %bb1.i14 ], [ %46, %bb.i13 ] ; [#uses=1]
- %59 = fadd float %.0.253.0, %.0.246.0127 ; [#uses=1]
- %60 = fadd float %.0.152.0, %.0.145.0129 ; [#uses=1]
- %61 = fadd float %.0.051.0, %.0.044.0131 ; [#uses=1]
- %62 = fmul float %59, 5.000000e-01 ; [#uses=1]
- %63 = fmul float %60, 5.000000e-01 ; [#uses=1]
- %64 = fmul float %61, 5.000000e-01 ; [#uses=1]
- %65 = fadd float %means.0.0.081, %64 ; [#uses=2]
- %66 = fadd float %means.0.1.082, %63 ; [#uses=2]
- %67 = fadd float %means.0.2.083, %62 ; [#uses=2]
- %indvar.next109 = add i32 %indvar108, 1 ; [#uses=2]
- %exitcond111 = icmp eq i32 %indvar.next109, %0 ; [#uses=1]
- br i1 %exitcond111, label %bb2, label %bb
-
-bb2: ; preds = %_ZNK14btQuantizedBvh10getAabbMaxEi.exit15
- %68 = sitofp i32 %0 to float ; [#uses=3]
- %69 = fdiv float 1.000000e+00, %68 ; [#uses=3]
- %70 = fmul float %65, %69 ; [#uses=1]
- %71 = fmul float %66, %69 ; [#uses=1]
- %72 = fmul float %67, %69 ; [#uses=1]
- br i1 %1, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb2
- %73 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %74 = load i8* %73, align 4 ; [#uses=1]
- %toBool.i9 = icmp eq i8 %74, 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=2]
- %77 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %78 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %79 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %80 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %81 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- br label %bb3
-
-bb3: ; preds = %_ZNK14btQuantizedBvh10getAabbMaxEi.exit, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=2]
- %variance.0.2.077 = phi float [ 0.000000e+00, %bb.nph ], [ %143, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=1]
- %variance.0.1.076 = phi float [ 0.000000e+00, %bb.nph ], [ %142, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=1]
- %variance.0.0.075 = phi float [ 0.000000e+00, %bb.nph ], [ %141, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=1]
- %tmp91 = add i32 %indvar, %startIndex ; [#uses=12]
- br i1 %toBool.i9, label %bb1.i, label %bb.i8
-
-bb.i8: ; preds = %bb3
- %83 = load %struct.BT_QUANTIZED_BVH_NODE** %76, align 4 ; [#uses=3]
- %scevgep99 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %83, i32 %tmp91, i32 0, i32 2 ; [#uses=1]
- %84 = load i16* %scevgep99, align 2 ; [#uses=1]
- %85 = uitofp i16 %84 to float ; [#uses=1]
- %86 = load float* %77, align 4 ; [#uses=1]
- %87 = fdiv float %85, %86 ; [#uses=1]
- %scevgep100 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %83, i32 %tmp91, i32 0, i32 1 ; [#uses=1]
- %88 = load i16* %scevgep100, align 2 ; [#uses=1]
- %89 = uitofp i16 %88 to float ; [#uses=1]
- %90 = load float* %78, align 4 ; [#uses=1]
- %91 = fdiv float %89, %90 ; [#uses=1]
- %scevgep9798 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %83, i32 %tmp91, i32 0, i32 0 ; [#uses=1]
- %92 = load i16* %scevgep9798, align 2 ; [#uses=1]
- %93 = uitofp i16 %92 to float ; [#uses=1]
- %94 = load float* %79, align 4 ; [#uses=1]
- %95 = fdiv float %93, %94 ; [#uses=1]
- %96 = load float* %80, align 4 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = load float* %81, align 4 ; [#uses=1]
- %99 = fadd float %91, %98 ; [#uses=1]
- %100 = load float* %82, align 4 ; [#uses=1]
- %101 = fadd float %87, %100 ; [#uses=1]
- %102 = load %struct.BT_QUANTIZED_BVH_NODE** %76, align 4 ; [#uses=3]
- %scevgep92 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %tmp91, i32 1, i32 2 ; [#uses=1]
- %103 = load i16* %scevgep92, align 2 ; [#uses=1]
- %104 = uitofp i16 %103 to float ; [#uses=1]
- %105 = load float* %77, align 4 ; [#uses=1]
- %106 = fdiv float %104, %105 ; [#uses=1]
- %scevgep93 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %tmp91, i32 1, i32 1 ; [#uses=1]
- %107 = load i16* %scevgep93, align 2 ; [#uses=1]
- %108 = uitofp i16 %107 to float ; [#uses=1]
- %109 = load float* %78, align 4 ; [#uses=1]
- %110 = fdiv float %108, %109 ; [#uses=1]
- %scevgep = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %tmp91, i32 1, i32 0 ; [#uses=1]
- %111 = load i16* %scevgep, align 2 ; [#uses=1]
- %112 = uitofp i16 %111 to float ; [#uses=1]
- %113 = load float* %79, align 4 ; [#uses=1]
- %114 = fdiv float %112, %113 ; [#uses=1]
- %115 = load float* %80, align 4 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=1]
- %117 = load float* %81, align 4 ; [#uses=1]
- %118 = fadd float %110, %117 ; [#uses=1]
- %119 = load float* %82, align 4 ; [#uses=1]
- %120 = fadd float %106, %119 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit
-
-bb1.i: ; preds = %bb3
- %121 = load %struct.btOptimizedBvhNode** %75, align 4 ; [#uses=3]
- %scevgep101102 = getelementptr inbounds %struct.btOptimizedBvhNode* %121, i32 %tmp91, i32 0, i32 0, i32 0 ; [#uses=1]
- %122 = load float* %scevgep101102, align 4 ; [#uses=1]
- %scevgep103 = getelementptr %struct.btOptimizedBvhNode* %121, i32 %tmp91, i32 0, i32 0, i32 1 ; [#uses=1]
- %123 = load float* %scevgep103, align 4 ; [#uses=1]
- %scevgep104 = getelementptr %struct.btOptimizedBvhNode* %121, i32 %tmp91, i32 0, i32 0, i32 2 ; [#uses=1]
- %124 = load float* %scevgep104, align 4 ; [#uses=1]
- %125 = load %struct.btOptimizedBvhNode** %75, align 4 ; [#uses=3]
- %scevgep94 = getelementptr %struct.btOptimizedBvhNode* %125, i32 %tmp91, i32 1, i32 0, i32 0 ; [#uses=1]
- %126 = load float* %scevgep94, align 4 ; [#uses=1]
- %scevgep95 = getelementptr %struct.btOptimizedBvhNode* %125, i32 %tmp91, i32 1, i32 0, i32 1 ; [#uses=1]
- %127 = load float* %scevgep95, align 4 ; [#uses=1]
- %scevgep96 = getelementptr %struct.btOptimizedBvhNode* %125, i32 %tmp91, i32 1, i32 0, i32 2 ; [#uses=1]
- %128 = load float* %scevgep96, align 4 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit
-
-_ZNK14btQuantizedBvh10getAabbMaxEi.exit: ; preds = %bb1.i, %bb.i8
- %.0.064.0137 = phi float [ %122, %bb1.i ], [ %97, %bb.i8 ] ; [#uses=1]
- %.0.165.0135 = phi float [ %123, %bb1.i ], [ %99, %bb.i8 ] ; [#uses=1]
- %.0.266.0133 = phi float [ %124, %bb1.i ], [ %101, %bb.i8 ] ; [#uses=1]
- %.0.273.0 = phi float [ %128, %bb1.i ], [ %120, %bb.i8 ] ; [#uses=1]
- %.0.172.0 = phi float [ %127, %bb1.i ], [ %118, %bb.i8 ] ; [#uses=1]
- %.0.071.0 = phi float [ %126, %bb1.i ], [ %116, %bb.i8 ] ; [#uses=1]
- %129 = fadd float %.0.273.0, %.0.266.0133 ; [#uses=1]
- %130 = fadd float %.0.172.0, %.0.165.0135 ; [#uses=1]
- %131 = fadd float %.0.071.0, %.0.064.0137 ; [#uses=1]
- %132 = fmul float %129, 5.000000e-01 ; [#uses=1]
- %133 = fmul float %130, 5.000000e-01 ; [#uses=1]
- %134 = fmul float %131, 5.000000e-01 ; [#uses=1]
- %135 = fsub float %132, %72 ; [#uses=2]
- %136 = fsub float %133, %71 ; [#uses=2]
- %137 = fsub float %134, %70 ; [#uses=2]
- %138 = fmul float %135, %135 ; [#uses=1]
- %139 = fmul float %136, %136 ; [#uses=1]
- %140 = fmul float %137, %137 ; [#uses=1]
- %141 = fadd float %variance.0.0.075, %140 ; [#uses=2]
- %142 = fadd float %variance.0.1.076, %139 ; [#uses=2]
- %143 = fadd float %variance.0.2.077, %138 ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb3
-
-bb6: ; preds = %_ZNK14btQuantizedBvh10getAabbMaxEi.exit, %bb2, %bb2.thread
- %144 = phi float [ %68, %bb2 ], [ %2, %bb2.thread ], [ %68, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=1]
- %variance.0.2.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %143, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=1]
- %variance.0.1.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %142, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=1]
- %variance.0.0.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %141, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=1]
- %145 = fadd float %144, -1.000000e+00 ; [#uses=1]
- %146 = fdiv float 1.000000e+00, %145 ; [#uses=3]
- %147 = fmul float %variance.0.0.0.lcssa, %146 ; [#uses=2]
- %148 = fmul float %variance.0.1.0.lcssa, %146 ; [#uses=2]
- %149 = fmul float %variance.0.2.0.lcssa, %146 ; [#uses=2]
- %150 = fcmp olt float %147, %148 ; [#uses=1]
- br i1 %150, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb6
- %151 = fcmp olt float %148, %149 ; [#uses=1]
- %iftmp.18.0.i = select i1 %151, i32 2, i32 1 ; [#uses=1]
- ret i32 %iftmp.18.0.i
-
-bb4.i: ; preds = %bb6
- %152 = fcmp olt float %147, %149 ; [#uses=1]
- %iftmp.19.0.i = select i1 %152, i32 2, i32 0 ; [#uses=1]
- ret i32 %iftmp.19.0.i
-}
-
-; [#uses=1]
-define i32 @_ZN14btQuantizedBvh25sortAndCalcSplittingIndexEiii(%struct.btQuantizedBvh* %this, i32 %startIndex, i32 %endIndex, i32 %splitAxis) nounwind align 2 {
-entry:
- %means = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %center4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = sub nsw i32 %endIndex, %startIndex ; [#uses=5]
- %1 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %1, align 8
- %2 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %3, align 8
- %4 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = icmp slt i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %5, label %bb.nph71, label %bb2
-
-bb.nph71: ; preds = %entry
- %6 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %7 = load i8* %6, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %7, 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29, %bb.nph71
- %indvar92 = phi i32 [ 0, %bb.nph71 ], [ %indvar.next93, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29 ] ; [#uses=2]
- %16 = phi float [ 0.000000e+00, %bb.nph71 ], [ %73, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29 ] ; [#uses=1]
- %17 = phi float [ 0.000000e+00, %bb.nph71 ], [ %72, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29 ] ; [#uses=1]
- %18 = phi float [ 0.000000e+00, %bb.nph71 ], [ %71, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29 ] ; [#uses=1]
- %tmp96 = add i32 %indvar92, %startIndex ; [#uses=12]
- br i1 %toBool.i, label %bb1.i28, label %bb.i27
-
-bb.i27: ; preds = %bb
- %19 = load %struct.BT_QUANTIZED_BVH_NODE** %9, align 4 ; [#uses=3]
- %scevgep99 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %19, i32 %tmp96, i32 0, i32 2 ; [#uses=1]
- %20 = load i16* %scevgep99, align 2 ; [#uses=1]
- %21 = uitofp i16 %20 to float ; [#uses=1]
- %22 = load float* %10, align 4 ; [#uses=1]
- %23 = fdiv float %21, %22 ; [#uses=1]
- %scevgep100 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %19, i32 %tmp96, i32 0, i32 1 ; [#uses=1]
- %24 = load i16* %scevgep100, align 2 ; [#uses=1]
- %25 = uitofp i16 %24 to float ; [#uses=1]
- %26 = load float* %11, align 4 ; [#uses=1]
- %27 = fdiv float %25, %26 ; [#uses=1]
- %scevgep9798 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %19, i32 %tmp96, i32 0, i32 0 ; [#uses=1]
- %28 = load i16* %scevgep9798, align 2 ; [#uses=1]
- %29 = uitofp i16 %28 to float ; [#uses=1]
- %30 = load float* %12, align 4 ; [#uses=1]
- %31 = fdiv float %29, %30 ; [#uses=1]
- %32 = load float* %13, align 4 ; [#uses=1]
- %33 = fadd float %31, %32 ; [#uses=1]
- %34 = load float* %14, align 4 ; [#uses=1]
- %35 = fadd float %27, %34 ; [#uses=1]
- %36 = load float* %15, align 4 ; [#uses=1]
- %37 = fadd float %23, %36 ; [#uses=1]
- %38 = load %struct.BT_QUANTIZED_BVH_NODE** %9, align 4 ; [#uses=3]
- %scevgep106 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %38, i32 %tmp96, i32 1, i32 2 ; [#uses=1]
- %39 = load i16* %scevgep106, align 2 ; [#uses=1]
- %40 = uitofp i16 %39 to float ; [#uses=1]
- %41 = load float* %10, align 4 ; [#uses=1]
- %42 = fdiv float %40, %41 ; [#uses=1]
- %scevgep107 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %38, i32 %tmp96, i32 1, i32 1 ; [#uses=1]
- %43 = load i16* %scevgep107, align 2 ; [#uses=1]
- %44 = uitofp i16 %43 to float ; [#uses=1]
- %45 = load float* %11, align 4 ; [#uses=1]
- %46 = fdiv float %44, %45 ; [#uses=1]
- %scevgep105 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %38, i32 %tmp96, i32 1, i32 0 ; [#uses=1]
- %47 = load i16* %scevgep105, align 2 ; [#uses=1]
- %48 = uitofp i16 %47 to float ; [#uses=1]
- %49 = load float* %12, align 4 ; [#uses=1]
- %50 = fdiv float %48, %49 ; [#uses=1]
- %51 = load float* %13, align 4 ; [#uses=1]
- %52 = fadd float %50, %51 ; [#uses=1]
- %53 = load float* %14, align 4 ; [#uses=1]
- %54 = fadd float %46, %53 ; [#uses=1]
- %55 = load float* %15, align 4 ; [#uses=1]
- %56 = fadd float %42, %55 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29
-
-bb1.i28: ; preds = %bb
- %57 = load %struct.btOptimizedBvhNode** %8, align 4 ; [#uses=3]
- %scevgep101102 = getelementptr inbounds %struct.btOptimizedBvhNode* %57, i32 %tmp96, i32 0, i32 0, i32 0 ; [#uses=1]
- %58 = load float* %scevgep101102, align 4 ; [#uses=1]
- %scevgep103 = getelementptr %struct.btOptimizedBvhNode* %57, i32 %tmp96, i32 0, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %scevgep103, align 4 ; [#uses=1]
- %scevgep104 = getelementptr %struct.btOptimizedBvhNode* %57, i32 %tmp96, i32 0, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %scevgep104, align 4 ; [#uses=1]
- %61 = load %struct.btOptimizedBvhNode** %8, align 4 ; [#uses=3]
- %scevgep108 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %tmp96, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %scevgep108, align 4 ; [#uses=1]
- %scevgep109 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %tmp96, i32 1, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %scevgep109, align 4 ; [#uses=1]
- %scevgep110 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %tmp96, i32 1, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %scevgep110, align 4 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29
-
-_ZNK14btQuantizedBvh10getAabbMaxEi.exit29: ; preds = %bb1.i28, %bb.i27
- %.0.239.0115 = phi float [ %60, %bb1.i28 ], [ %37, %bb.i27 ] ; [#uses=1]
- %.0.138.0113 = phi float [ %59, %bb1.i28 ], [ %35, %bb.i27 ] ; [#uses=1]
- %.0.037.0111 = phi float [ %58, %bb1.i28 ], [ %33, %bb.i27 ] ; [#uses=1]
- %.0.246.0 = phi float [ %64, %bb1.i28 ], [ %56, %bb.i27 ] ; [#uses=1]
- %.0.145.0 = phi float [ %63, %bb1.i28 ], [ %54, %bb.i27 ] ; [#uses=1]
- %.0.044.0 = phi float [ %62, %bb1.i28 ], [ %52, %bb.i27 ] ; [#uses=1]
- %65 = fadd float %.0.246.0, %.0.239.0115 ; [#uses=1]
- %66 = fadd float %.0.145.0, %.0.138.0113 ; [#uses=1]
- %67 = fadd float %.0.044.0, %.0.037.0111 ; [#uses=1]
- %68 = fmul float %65, 5.000000e-01 ; [#uses=1]
- %69 = fmul float %66, 5.000000e-01 ; [#uses=1]
- %70 = fmul float %67, 5.000000e-01 ; [#uses=1]
- %71 = fadd float %18, %70 ; [#uses=3]
- %72 = fadd float %17, %69 ; [#uses=3]
- %73 = fadd float %16, %68 ; [#uses=3]
- %indvar.next93 = add i32 %indvar92, 1 ; [#uses=2]
- %exitcond95 = icmp eq i32 %indvar.next93, %0 ; [#uses=1]
- br i1 %exitcond95, label %bb1.bb2_crit_edge, label %bb
-
-bb1.bb2_crit_edge: ; preds = %_ZNK14btQuantizedBvh10getAabbMaxEi.exit29
- store float %73, float* %3, align 8
- store float %72, float* %2, align 4
- store float %71, float* %1, align 8
- br label %bb2
-
-bb2: ; preds = %bb1.bb2_crit_edge, %entry
- %74 = phi float [ %73, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %75 = phi float [ %72, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %76 = phi float [ %71, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %77 = sitofp i32 %0 to float ; [#uses=1]
- %78 = fdiv float 1.000000e+00, %77 ; [#uses=3]
- %79 = fmul float %76, %78 ; [#uses=1]
- store float %79, float* %1, align 8
- %80 = fmul float %75, %78 ; [#uses=1]
- store float %80, float* %2, align 4
- %81 = fmul float %74, %78 ; [#uses=1]
- store float %81, float* %3, align 8
- %82 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- br i1 %5, label %bb.nph, label %bb8
-
-bb.nph: ; preds = %bb2
- %84 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=2]
- %86 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 1 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 2 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 3 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- %91 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=2]
- %92 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %94 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %95 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %96 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %97 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- br label %bb3
-
-bb3: ; preds = %bb6, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb6 ] ; [#uses=2]
- %splitIndex.169 = phi i32 [ %startIndex, %bb.nph ], [ %splitIndex.0, %bb6 ] ; [#uses=3]
- %i.168 = add i32 %indvar, %startIndex ; [#uses=13]
- %98 = load i8* %84, align 4 ; [#uses=1]
- %toBool.i22 = icmp eq i8 %98, 0 ; [#uses=1]
- br i1 %toBool.i22, label %bb1.i21, label %bb.i20
-
-bb.i20: ; preds = %bb3
- %99 = load %struct.BT_QUANTIZED_BVH_NODE** %91, align 4 ; [#uses=3]
- %scevgep84 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %99, i32 %i.168, i32 0, i32 2 ; [#uses=1]
- %100 = load i16* %scevgep84, align 2 ; [#uses=1]
- %101 = uitofp i16 %100 to float ; [#uses=1]
- %102 = load float* %92, align 4 ; [#uses=1]
- %103 = fdiv float %101, %102 ; [#uses=1]
- %scevgep85 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %99, i32 %i.168, i32 0, i32 1 ; [#uses=1]
- %104 = load i16* %scevgep85, align 2 ; [#uses=1]
- %105 = uitofp i16 %104 to float ; [#uses=1]
- %106 = load float* %93, align 4 ; [#uses=1]
- %107 = fdiv float %105, %106 ; [#uses=1]
- %scevgep8283 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %99, i32 %i.168, i32 0, i32 0 ; [#uses=1]
- %108 = load i16* %scevgep8283, align 2 ; [#uses=1]
- %109 = uitofp i16 %108 to float ; [#uses=1]
- %110 = load float* %94, align 4 ; [#uses=1]
- %111 = fdiv float %109, %110 ; [#uses=1]
- %112 = load float* %95, align 4 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = load float* %96, align 4 ; [#uses=1]
- %115 = fadd float %107, %114 ; [#uses=1]
- %116 = load float* %97, align 4 ; [#uses=1]
- %117 = fadd float %103, %116 ; [#uses=1]
- %118 = load %struct.BT_QUANTIZED_BVH_NODE** %91, align 4 ; [#uses=3]
- %scevgep77 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %118, i32 %i.168, i32 1, i32 2 ; [#uses=1]
- %119 = load i16* %scevgep77, align 2 ; [#uses=1]
- %120 = uitofp i16 %119 to float ; [#uses=1]
- %121 = load float* %92, align 4 ; [#uses=1]
- %122 = fdiv float %120, %121 ; [#uses=1]
- %scevgep78 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %118, i32 %i.168, i32 1, i32 1 ; [#uses=1]
- %123 = load i16* %scevgep78, align 2 ; [#uses=1]
- %124 = uitofp i16 %123 to float ; [#uses=1]
- %125 = load float* %93, align 4 ; [#uses=1]
- %126 = fdiv float %124, %125 ; [#uses=1]
- %scevgep = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %118, i32 %i.168, i32 1, i32 0 ; [#uses=1]
- %127 = load i16* %scevgep, align 2 ; [#uses=1]
- %128 = uitofp i16 %127 to float ; [#uses=1]
- %129 = load float* %94, align 4 ; [#uses=1]
- %130 = fdiv float %128, %129 ; [#uses=1]
- %131 = load float* %95, align 4 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = load float* %96, align 4 ; [#uses=1]
- %134 = fadd float %126, %133 ; [#uses=1]
- %135 = load float* %97, align 4 ; [#uses=1]
- %136 = fadd float %122, %135 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit
-
-bb1.i21: ; preds = %bb3
- %137 = load %struct.btOptimizedBvhNode** %85, align 4 ; [#uses=3]
- %scevgep8687 = getelementptr inbounds %struct.btOptimizedBvhNode* %137, i32 %i.168, i32 0, i32 0, i32 0 ; [#uses=1]
- %138 = load float* %scevgep8687, align 4 ; [#uses=1]
- %scevgep88 = getelementptr %struct.btOptimizedBvhNode* %137, i32 %i.168, i32 0, i32 0, i32 1 ; [#uses=1]
- %139 = load float* %scevgep88, align 4 ; [#uses=1]
- %scevgep89 = getelementptr %struct.btOptimizedBvhNode* %137, i32 %i.168, i32 0, i32 0, i32 2 ; [#uses=1]
- %140 = load float* %scevgep89, align 4 ; [#uses=1]
- %141 = load %struct.btOptimizedBvhNode** %85, align 4 ; [#uses=3]
- %scevgep79 = getelementptr %struct.btOptimizedBvhNode* %141, i32 %i.168, i32 1, i32 0, i32 0 ; [#uses=1]
- %142 = load float* %scevgep79, align 4 ; [#uses=1]
- %scevgep80 = getelementptr %struct.btOptimizedBvhNode* %141, i32 %i.168, i32 1, i32 0, i32 1 ; [#uses=1]
- %143 = load float* %scevgep80, align 4 ; [#uses=1]
- %scevgep81 = getelementptr %struct.btOptimizedBvhNode* %141, i32 %i.168, i32 1, i32 0, i32 2 ; [#uses=1]
- %144 = load float* %scevgep81, align 4 ; [#uses=1]
- br label %_ZNK14btQuantizedBvh10getAabbMaxEi.exit
-
-_ZNK14btQuantizedBvh10getAabbMaxEi.exit: ; preds = %bb1.i21, %bb.i20
- %.0.057.0121 = phi float [ %138, %bb1.i21 ], [ %113, %bb.i20 ] ; [#uses=1]
- %.0.158.0119 = phi float [ %139, %bb1.i21 ], [ %115, %bb.i20 ] ; [#uses=1]
- %.0.259.0117 = phi float [ %140, %bb1.i21 ], [ %117, %bb.i20 ] ; [#uses=1]
- %.0.266.0 = phi float [ %144, %bb1.i21 ], [ %136, %bb.i20 ] ; [#uses=1]
- %.0.165.0 = phi float [ %143, %bb1.i21 ], [ %134, %bb.i20 ] ; [#uses=1]
- %.0.064.0 = phi float [ %142, %bb1.i21 ], [ %132, %bb.i20 ] ; [#uses=1]
- %145 = fadd float %.0.266.0, %.0.259.0117 ; [#uses=1]
- %146 = fadd float %.0.165.0, %.0.158.0119 ; [#uses=1]
- %147 = fadd float %.0.064.0, %.0.057.0121 ; [#uses=1]
- %148 = fmul float %145, 5.000000e-01 ; [#uses=1]
- %149 = fmul float %146, 5.000000e-01 ; [#uses=1]
- %150 = fmul float %147, 5.000000e-01 ; [#uses=1]
- store float %150, float* %86, align 8
- store float %149, float* %87, align 4
- store float %148, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- %151 = load float* %90, align 4 ; [#uses=1]
- %152 = fcmp ogt float %151, %83 ; [#uses=1]
- br i1 %152, label %bb5, label %bb6
-
-bb5: ; preds = %_ZNK14btQuantizedBvh10getAabbMaxEi.exit
- call void @_ZN14btQuantizedBvh13swapLeafNodesEii(%struct.btQuantizedBvh* %this, i32 %i.168, i32 %splitIndex.169)
- %153 = add nsw i32 %splitIndex.169, 1 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit
- %splitIndex.0 = phi i32 [ %153, %bb5 ], [ %splitIndex.169, %_ZNK14btQuantizedBvh10getAabbMaxEi.exit ] ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb8, label %bb3
-
-bb8: ; preds = %bb6, %bb2
- %splitIndex.1.lcssa = phi i32 [ %startIndex, %bb2 ], [ %splitIndex.0, %bb6 ] ; [#uses=3]
- %154 = sdiv i32 %0, 3 ; [#uses=2]
- %155 = add nsw i32 %154, %startIndex ; [#uses=1]
- %156 = icmp slt i32 %155, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %156, label %bb9, label %bb14
-
-bb9: ; preds = %bb8
- %157 = add nsw i32 %endIndex, -1 ; [#uses=1]
- %158 = sub i32 %157, %154 ; [#uses=1]
- %159 = icmp sgt i32 %158, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %159, label %bb11, label %bb14
-
-bb11: ; preds = %bb9
- ret i32 %splitIndex.1.lcssa
-
-bb14: ; preds = %bb9, %bb8
- %160 = ashr i32 %0, 1 ; [#uses=1]
- %161 = add nsw i32 %160, %startIndex ; [#uses=1]
- ret i32 %161
-}
-
-; [#uses=0]
-define void @_ZNK14btQuantizedBvh39walkStacklessQuantizedTreeCacheFriendlyEP21btNodeOverlapCallbackPtS2_(%struct.btQuantizedBvh* nocapture %this, %struct.btActionInterface* %nodeCallback, i16* nocapture %quantizedQueryAabbMin, i16* nocapture %quantizedQueryAabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds i16* %quantizedQueryAabbMin, i32 2 ; [#uses=1]
- %5 = getelementptr inbounds i16* %quantizedQueryAabbMax, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds i16* %quantizedQueryAabbMin, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds i16* %quantizedQueryAabbMax, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=9]
- %tmp = add i32 %i.05, 1 ; [#uses=2]
- %8 = load %struct.btBvhSubtreeInfo** %3, align 4 ; [#uses=8]
- %9 = load i16* %quantizedQueryAabbMin, align 2 ; [#uses=1]
- %scevgep = getelementptr %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 1, i32 0 ; [#uses=1]
- %10 = load i16* %scevgep, align 2 ; [#uses=1]
- %11 = icmp ule i16 %9, %10 ; [#uses=1]
- %12 = load i16* %quantizedQueryAabbMax, align 2 ; [#uses=1]
- %scevgep67 = getelementptr inbounds %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %13 = load i16* %scevgep67, align 2 ; [#uses=1]
- %14 = icmp uge i16 %12, %13 ; [#uses=1]
- %15 = and i1 %11, %14 ; [#uses=1]
- %16 = load i16* %4, align 2 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 1, i32 2 ; [#uses=1]
- %17 = load i16* %scevgep8, align 2 ; [#uses=1]
- %18 = icmp ule i16 %16, %17 ; [#uses=1]
- %19 = and i1 %15, %18 ; [#uses=1]
- %20 = load i16* %5, align 2 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %21 = load i16* %scevgep9, align 2 ; [#uses=1]
- %22 = icmp uge i16 %20, %21 ; [#uses=1]
- %23 = and i1 %19, %22 ; [#uses=1]
- %24 = load i16* %6, align 2 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 1, i32 1 ; [#uses=1]
- %25 = load i16* %scevgep10, align 2 ; [#uses=1]
- %26 = icmp ule i16 %24, %25 ; [#uses=1]
- %27 = and i1 %23, %26 ; [#uses=1]
- %28 = load i16* %7, align 2 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %29 = load i16* %scevgep11, align 2 ; [#uses=1]
- %30 = icmp uge i16 %28, %29 ; [#uses=1]
- %31 = and i1 %27, %30 ; [#uses=1]
- br i1 %31, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %scevgep12 = getelementptr %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 2 ; [#uses=1]
- %32 = load i32* %scevgep12, align 4 ; [#uses=2]
- %scevgep13 = getelementptr %struct.btBvhSubtreeInfo* %8, i32 %i.05, i32 3 ; [#uses=1]
- %33 = load i32* %scevgep13, align 4 ; [#uses=1]
- %34 = add nsw i32 %33, %32 ; [#uses=1]
- tail call void @_ZNK14btQuantizedBvh26walkStacklessQuantizedTreeEP21btNodeOverlapCallbackPtS2_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, i16* %quantizedQueryAabbMin, i16* %quantizedQueryAabbMax, i32 %32, i32 %34)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %35 = load i32* %0, align 4 ; [#uses=1]
- %36 = icmp sgt i32 %35, %tmp ; [#uses=1]
- br i1 %36, label %bb, label %return
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=2]
-define void @_ZNK14btQuantizedBvh26reportAabbOverlappingNodexEP21btNodeOverlapCallbackRK9btVector3S4_(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %quantizedQueryAabbMin = alloca [3 x i16], align 2 ; [#uses=3]
- %quantizedQueryAabbMax = alloca [3 x i16], align 2 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds [3 x i16]* %quantizedQueryAabbMin, i32 0, i32 0 ; [#uses=5]
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=6]
- %11 = fcmp olt float %4, %10 ; [#uses=1]
- %clampedPoint.0.0.0.i = select i1 %11, float %10, float %4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=6]
- %14 = fcmp olt float %6, %13 ; [#uses=1]
- %clampedPoint.0.1.0.i = select i1 %14, float %13, float %6 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=6]
- %17 = fcmp olt float %8, %16 ; [#uses=1]
- %clampedPoint.0.2.0.i = select i1 %17, float %16, float %8 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=4]
- %20 = fcmp olt float %19, %clampedPoint.0.0.0.i ; [#uses=1]
- %clampedPoint.0.0.1.i = select i1 %20, float %19, float %clampedPoint.0.0.0.i ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=4]
- %23 = fcmp olt float %22, %clampedPoint.0.1.0.i ; [#uses=1]
- %clampedPoint.0.1.1.i = select i1 %23, float %22, float %clampedPoint.0.1.0.i ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = fcmp olt float %25, %clampedPoint.0.2.0.i ; [#uses=1]
- %clampedPoint.0.2.1.i = select i1 %26, float %25, float %clampedPoint.0.2.0.i ; [#uses=1]
- %27 = fsub float %clampedPoint.0.2.1.i, %16 ; [#uses=1]
- %28 = fsub float %clampedPoint.0.1.1.i, %13 ; [#uses=1]
- %29 = fsub float %clampedPoint.0.0.1.i, %10 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fmul float %27, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fmul float %28, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = fmul float %29, %37 ; [#uses=1]
- %39 = fptoui float %38 to i16 ; [#uses=1]
- %40 = and i16 %39, -2 ; [#uses=1]
- store i16 %40, i16* %2, align 2
- %41 = fptoui float %35 to i16 ; [#uses=1]
- %42 = and i16 %41, -2 ; [#uses=1]
- %43 = getelementptr inbounds [3 x i16]* %quantizedQueryAabbMin, i32 0, i32 1 ; [#uses=2]
- store i16 %42, i16* %43, align 2
- %44 = fptoui float %32 to i16 ; [#uses=1]
- %45 = and i16 %44, -2 ; [#uses=1]
- %46 = getelementptr inbounds [3 x i16]* %quantizedQueryAabbMin, i32 0, i32 2 ; [#uses=2]
- store i16 %45, i16* %46, align 2
- %47 = getelementptr inbounds [3 x i16]* %quantizedQueryAabbMax, i32 0, i32 0 ; [#uses=5]
- %48 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- %52 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = fcmp olt float %49, %10 ; [#uses=1]
- %clampedPoint.0.0.0.i6 = select i1 %54, float %10, float %49 ; [#uses=2]
- %55 = fcmp olt float %51, %13 ; [#uses=1]
- %clampedPoint.0.1.0.i7 = select i1 %55, float %13, float %51 ; [#uses=2]
- %56 = fcmp olt float %53, %16 ; [#uses=1]
- %clampedPoint.0.2.0.i8 = select i1 %56, float %16, float %53 ; [#uses=2]
- %57 = fcmp olt float %19, %clampedPoint.0.0.0.i6 ; [#uses=1]
- %clampedPoint.0.0.1.i9 = select i1 %57, float %19, float %clampedPoint.0.0.0.i6 ; [#uses=1]
- %58 = fcmp olt float %22, %clampedPoint.0.1.0.i7 ; [#uses=1]
- %clampedPoint.0.1.1.i10 = select i1 %58, float %22, float %clampedPoint.0.1.0.i7 ; [#uses=1]
- %59 = fcmp olt float %25, %clampedPoint.0.2.0.i8 ; [#uses=1]
- %clampedPoint.0.2.1.i11 = select i1 %59, float %25, float %clampedPoint.0.2.0.i8 ; [#uses=1]
- %60 = fsub float %clampedPoint.0.2.1.i11, %16 ; [#uses=1]
- %61 = fsub float %clampedPoint.0.1.1.i10, %13 ; [#uses=1]
- %62 = fsub float %clampedPoint.0.0.1.i9, %10 ; [#uses=1]
- %63 = fmul float %60, %31 ; [#uses=1]
- %64 = fmul float %61, %34 ; [#uses=1]
- %65 = fmul float %62, %37 ; [#uses=1]
- %66 = fadd float %65, 1.000000e+00 ; [#uses=1]
- %67 = fptoui float %66 to i16 ; [#uses=1]
- %68 = or i16 %67, 1 ; [#uses=1]
- store i16 %68, i16* %47, align 2
- %69 = fadd float %64, 1.000000e+00 ; [#uses=1]
- %70 = fptoui float %69 to i16 ; [#uses=1]
- %71 = or i16 %70, 1 ; [#uses=1]
- %72 = getelementptr inbounds [3 x i16]* %quantizedQueryAabbMax, i32 0, i32 1 ; [#uses=2]
- store i16 %71, i16* %72, align 2
- %73 = fadd float %63, 1.000000e+00 ; [#uses=1]
- %74 = fptoui float %73 to i16 ; [#uses=1]
- %75 = or i16 %74, 1 ; [#uses=1]
- %76 = getelementptr inbounds [3 x i16]* %quantizedQueryAabbMax, i32 0, i32 2 ; [#uses=2]
- store i16 %75, i16* %76, align 2
- %77 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- %78 = load i32* %77, align 4 ; [#uses=1]
- switch i32 %78, label %_ZNK14btQuantizedBvh39walkStacklessQuantizedTreeCacheFriendlyEP21btNodeOverlapCallbackPtS2_.exit [
- i32 0, label %bb1
- i32 1, label %bb2
- i32 2, label %bb3
- ]
-
-bb1: ; preds = %bb
- %79 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- %80 = load i32* %79, align 4 ; [#uses=1]
- call void @_ZNK14btQuantizedBvh26walkStacklessQuantizedTreeEP21btNodeOverlapCallbackPtS2_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, i16* %2, i16* %47, i32 0, i32 %80)
- ret void
-
-bb2: ; preds = %bb
- %81 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=2]
- %82 = load i32* %81, align 4 ; [#uses=1]
- %83 = icmp sgt i32 %82, 0 ; [#uses=1]
- br i1 %83, label %bb.nph.i, label %_ZNK14btQuantizedBvh39walkStacklessQuantizedTreeCacheFriendlyEP21btNodeOverlapCallbackPtS2_.exit
-
-bb.nph.i: ; preds = %bb2
- %84 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb2.i, %bb.nph.i
- %i.05.i = phi i32 [ 0, %bb.nph.i ], [ %tmp.i, %bb2.i ] ; [#uses=9]
- %tmp.i = add i32 %i.05.i, 1 ; [#uses=2]
- %85 = load %struct.btBvhSubtreeInfo** %84, align 4 ; [#uses=8]
- %86 = load i16* %2, align 2 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 1, i32 0 ; [#uses=1]
- %87 = load i16* %scevgep.i, align 2 ; [#uses=1]
- %88 = icmp ule i16 %86, %87 ; [#uses=1]
- %89 = load i16* %47, align 2 ; [#uses=1]
- %scevgep67.i = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 0, i32 0 ; [#uses=1]
- %90 = load i16* %scevgep67.i, align 2 ; [#uses=1]
- %91 = icmp uge i16 %89, %90 ; [#uses=1]
- %92 = and i1 %88, %91 ; [#uses=1]
- %93 = load i16* %46, align 2 ; [#uses=1]
- %scevgep8.i = getelementptr %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 1, i32 2 ; [#uses=1]
- %94 = load i16* %scevgep8.i, align 2 ; [#uses=1]
- %95 = icmp ule i16 %93, %94 ; [#uses=1]
- %96 = and i1 %92, %95 ; [#uses=1]
- %97 = load i16* %76, align 2 ; [#uses=1]
- %scevgep9.i = getelementptr %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 0, i32 2 ; [#uses=1]
- %98 = load i16* %scevgep9.i, align 2 ; [#uses=1]
- %99 = icmp uge i16 %97, %98 ; [#uses=1]
- %100 = and i1 %96, %99 ; [#uses=1]
- %101 = load i16* %43, align 2 ; [#uses=1]
- %scevgep10.i = getelementptr %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 1, i32 1 ; [#uses=1]
- %102 = load i16* %scevgep10.i, align 2 ; [#uses=1]
- %103 = icmp ule i16 %101, %102 ; [#uses=1]
- %104 = and i1 %100, %103 ; [#uses=1]
- %105 = load i16* %72, align 2 ; [#uses=1]
- %scevgep11.i = getelementptr %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 0, i32 1 ; [#uses=1]
- %106 = load i16* %scevgep11.i, align 2 ; [#uses=1]
- %107 = icmp uge i16 %105, %106 ; [#uses=1]
- %108 = and i1 %104, %107 ; [#uses=1]
- br i1 %108, label %bb1.i, label %bb2.i
-
-bb1.i: ; preds = %bb.i
- %scevgep12.i = getelementptr %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 2 ; [#uses=1]
- %109 = load i32* %scevgep12.i, align 4 ; [#uses=2]
- %scevgep13.i = getelementptr %struct.btBvhSubtreeInfo* %85, i32 %i.05.i, i32 3 ; [#uses=1]
- %110 = load i32* %scevgep13.i, align 4 ; [#uses=1]
- %111 = add nsw i32 %110, %109 ; [#uses=1]
- call void @_ZNK14btQuantizedBvh26walkStacklessQuantizedTreeEP21btNodeOverlapCallbackPtS2_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, i16* %2, i16* %47, i32 %109, i32 %111)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- %112 = load i32* %81, align 4 ; [#uses=1]
- %113 = icmp sgt i32 %112, %tmp.i ; [#uses=1]
- br i1 %113, label %bb.i, label %_ZNK14btQuantizedBvh39walkStacklessQuantizedTreeCacheFriendlyEP21btNodeOverlapCallbackPtS2_.exit
-
-_ZNK14btQuantizedBvh39walkStacklessQuantizedTreeCacheFriendlyEP21btNodeOverlapCallbackPtS2_.exit: ; preds = %bb2.i, %bb2, %bb
- ret void
-
-bb3: ; preds = %bb
- %114 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %115 = load %struct.BT_QUANTIZED_BVH_NODE** %114, align 4 ; [#uses=1]
- call void @_ZNK14btQuantizedBvh42walkRecursiveQuantizedTreeAgainstQueryAabbEPK18btQuantizedBvhNodeP21btNodeOverlapCallbackPtS5_(%struct.btQuantizedBvh* %this, %struct.BT_QUANTIZED_BVH_NODE* %115, %struct.btActionInterface* %nodeCallback, i16* %2, i16* %47)
- ret void
-
-bb4: ; preds = %entry
- call void @_ZNK14btQuantizedBvh17walkStacklessTreeEP21btNodeOverlapCallbackRK9btVector3S4_(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZNK14btQuantizedBvh9serializeEPvP12btSerializer(%struct.btQuantizedBvh* %this, i8* nocapture %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds i8* %dataBuffer, i32 16 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %0 to float* ; [#uses=1]
- %1 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %1, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %2 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %3 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %3, float* %2, align 4
- %scevgep.2.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %5 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.3.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 28 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %7 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.i37 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i38 = bitcast i8* %dataBuffer to float* ; [#uses=1]
- %8 = load float* %scevgep.i37, align 4 ; [#uses=1]
- store float %8, float* %scevgep4.i38, align 4
- %scevgep.1.i39 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i40 = getelementptr i8* %dataBuffer, i32 4 ; [#uses=1]
- %9 = bitcast i8* %scevgep4.1.i40 to float* ; [#uses=1]
- %10 = load float* %scevgep.1.i39, align 4 ; [#uses=1]
- store float %10, float* %9, align 4
- %scevgep.2.i41 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i42 = getelementptr i8* %dataBuffer, i32 8 ; [#uses=1]
- %11 = bitcast i8* %scevgep4.2.i42 to float* ; [#uses=1]
- %12 = load float* %scevgep.2.i41, align 4 ; [#uses=1]
- store float %12, float* %11, align 4
- %scevgep.3.i43 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i44 = getelementptr i8* %dataBuffer, i32 12 ; [#uses=1]
- %13 = bitcast i8* %scevgep4.3.i44 to float* ; [#uses=1]
- %14 = load float* %scevgep.3.i43, align 4 ; [#uses=1]
- store float %14, float* %13, align 4
- %15 = getelementptr inbounds i8* %dataBuffer, i32 32 ; [#uses=1]
- %scevgep.i45 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i46 = bitcast i8* %15 to float* ; [#uses=1]
- %16 = load float* %scevgep.i45, align 4 ; [#uses=1]
- store float %16, float* %scevgep4.i46, align 4
- %scevgep.1.i47 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i48 = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %17 = bitcast i8* %scevgep4.1.i48 to float* ; [#uses=1]
- %18 = load float* %scevgep.1.i47, align 4 ; [#uses=1]
- store float %18, float* %17, align 4
- %scevgep.2.i49 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i50 = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.2.i50 to float* ; [#uses=1]
- %20 = load float* %scevgep.2.i49, align 4 ; [#uses=1]
- store float %20, float* %19, align 4
- %scevgep.3.i51 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i52 = getelementptr i8* %dataBuffer, i32 44 ; [#uses=1]
- %21 = bitcast i8* %scevgep4.3.i52 to float* ; [#uses=1]
- %22 = load float* %scevgep.3.i51, align 4 ; [#uses=1]
- store float %22, float* %21, align 4
- %23 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- %24 = load i32* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i8* %dataBuffer, i32 48 ; [#uses=1]
- %26 = bitcast i8* %25 to i32* ; [#uses=1]
- store i32 %24, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %28 = load i8* %27, align 4 ; [#uses=1]
- %29 = zext i8 %28 to i32 ; [#uses=1]
- %30 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %31 = bitcast i8* %30 to i32* ; [#uses=1]
- store i32 %29, i32* %31, align 4
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=3]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i8* %dataBuffer, i32 56 ; [#uses=1]
- %35 = bitcast i8* %34 to i32* ; [#uses=1]
- store i32 %33, i32* %35, align 4
- %36 = load i32* %32, align 4 ; [#uses=1]
- %37 = icmp eq i32 %36, 0 ; [#uses=1]
- br i1 %37, label %bb2.thread, label %bb2
-
-bb2.thread: ; preds = %entry
- %38 = getelementptr inbounds i8* %dataBuffer, i32 64 ; [#uses=1]
- %39 = bitcast i8* %38 to %struct.btOptimizedBvhNodeFloatData** ; [#uses=1]
- store %struct.btOptimizedBvhNodeFloatData* null, %struct.btOptimizedBvhNodeFloatData** %39, align 4
- br label %bb7
-
-bb2: ; preds = %entry
- %40 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=1]
- %41 = load i32 (...)*** %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 7 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %45 = load %struct.btOptimizedBvhNode** %44, align 4 ; [#uses=1]
- %46 = bitcast %struct.btOptimizedBvhNode* %45 to i8* ; [#uses=1]
- %47 = bitcast i32 (...)* %43 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %48 = tail call i8* %47(%struct.btActionInterface* %serializer, i8* %46) ; [#uses=1]
- %phitmp = bitcast i8* %48 to %struct.btOptimizedBvhNodeFloatData* ; [#uses=2]
- %49 = getelementptr inbounds i8* %dataBuffer, i32 64 ; [#uses=1]
- %50 = bitcast i8* %49 to %struct.btOptimizedBvhNodeFloatData** ; [#uses=1]
- store %struct.btOptimizedBvhNodeFloatData* %phitmp, %struct.btOptimizedBvhNodeFloatData** %50, align 4
- %51 = icmp eq %struct.btOptimizedBvhNodeFloatData* %phitmp, null ; [#uses=1]
- br i1 %51, label %bb7, label %bb3
-
-bb3: ; preds = %bb2
- %52 = load i32* %32, align 4 ; [#uses=3]
- %53 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %54 = load i32 (...)*** %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds i32 (...)** %54, i32 4 ; [#uses=1]
- %56 = load i32 (...)** %55, align 4 ; [#uses=1]
- %57 = bitcast i32 (...)* %56 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %58 = tail call %struct.btChunk* %57(%struct.btActionInterface* %serializer, i32 48, i32 %52) ; [#uses=2]
- %59 = icmp sgt i32 %52, 0 ; [#uses=1]
- br i1 %59, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb3
- %60 = getelementptr inbounds %struct.btChunk* %58, i32 0, i32 2 ; [#uses=1]
- %61 = load i8** %60, align 4 ; [#uses=11]
- %62 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=5]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb.nph
- %i.070 = phi i32 [ 0, %bb.nph ], [ %79, %bb4 ] ; [#uses=13]
- %tmp = mul i32 %i.070, 48 ; [#uses=11]
- %tmp84 = add i32 %tmp, 32 ; [#uses=1]
- %scevgep85 = getelementptr i8* %61, i32 %tmp84 ; [#uses=1]
- %scevgep8586 = bitcast i8* %scevgep85 to i32* ; [#uses=1]
- %tmp87 = add i32 %tmp, 36 ; [#uses=1]
- %scevgep88 = getelementptr i8* %61, i32 %tmp87 ; [#uses=1]
- %scevgep8889 = bitcast i8* %scevgep88 to i32* ; [#uses=1]
- %tmp90 = add i32 %tmp, 40 ; [#uses=1]
- %scevgep91 = getelementptr i8* %61, i32 %tmp90 ; [#uses=1]
- %scevgep9192 = bitcast i8* %scevgep91 to i32* ; [#uses=1]
- %tmp93 = add i32 %tmp, 16 ; [#uses=1]
- %scevgep94 = getelementptr i8* %61, i32 %tmp93 ; [#uses=1]
- %scevgep4.i62 = bitcast i8* %scevgep94 to float* ; [#uses=1]
- %tmp96 = add i32 %tmp, 20 ; [#uses=1]
- %scevgep97 = getelementptr i8* %61, i32 %tmp96 ; [#uses=1]
- %scevgep4.1.i64 = bitcast i8* %scevgep97 to float* ; [#uses=1]
- %tmp99 = add i32 %tmp, 24 ; [#uses=1]
- %scevgep100 = getelementptr i8* %61, i32 %tmp99 ; [#uses=1]
- %scevgep4.2.i66 = bitcast i8* %scevgep100 to float* ; [#uses=1]
- %tmp102 = add i32 %tmp, 28 ; [#uses=1]
- %scevgep103 = getelementptr i8* %61, i32 %tmp102 ; [#uses=1]
- %scevgep4.3.i68 = bitcast i8* %scevgep103 to float* ; [#uses=1]
- %scevgep105 = getelementptr i8* %61, i32 %tmp ; [#uses=1]
- %scevgep4.i54 = bitcast i8* %scevgep105 to float* ; [#uses=1]
- %tmp107186 = or i32 %tmp, 4 ; [#uses=1]
- %scevgep108 = getelementptr i8* %61, i32 %tmp107186 ; [#uses=1]
- %scevgep4.1.i56 = bitcast i8* %scevgep108 to float* ; [#uses=1]
- %tmp110187 = or i32 %tmp, 8 ; [#uses=1]
- %scevgep111 = getelementptr i8* %61, i32 %tmp110187 ; [#uses=1]
- %scevgep4.2.i58 = bitcast i8* %scevgep111 to float* ; [#uses=1]
- %tmp113188 = or i32 %tmp, 12 ; [#uses=1]
- %scevgep114 = getelementptr i8* %61, i32 %tmp113188 ; [#uses=1]
- %scevgep4.3.i60 = bitcast i8* %scevgep114 to float* ; [#uses=1]
- %63 = load %struct.btOptimizedBvhNode** %62, align 4 ; [#uses=4]
- %scevgep.i61 = getelementptr %struct.btOptimizedBvhNode* %63, i32 %i.070, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %scevgep.i61, align 4 ; [#uses=1]
- store float %64, float* %scevgep4.i62, align 4
- %scevgep.1.i63 = getelementptr %struct.btOptimizedBvhNode* %63, i32 %i.070, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %scevgep.1.i63, align 4 ; [#uses=1]
- store float %65, float* %scevgep4.1.i64, align 4
- %scevgep.2.i65 = getelementptr %struct.btOptimizedBvhNode* %63, i32 %i.070, i32 1, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %scevgep.2.i65, align 4 ; [#uses=1]
- store float %66, float* %scevgep4.2.i66, align 4
- %scevgep.3.i67 = getelementptr %struct.btOptimizedBvhNode* %63, i32 %i.070, i32 1, i32 0, i32 3 ; [#uses=1]
- %67 = load float* %scevgep.3.i67, align 4 ; [#uses=1]
- store float %67, float* %scevgep4.3.i68, align 4
- %68 = load %struct.btOptimizedBvhNode** %62, align 4 ; [#uses=4]
- %scevgep.i53 = getelementptr inbounds %struct.btOptimizedBvhNode* %68, i32 %i.070, i32 0, i32 0, i32 0 ; [#uses=1]
- %69 = load float* %scevgep.i53, align 4 ; [#uses=1]
- store float %69, float* %scevgep4.i54, align 4
- %scevgep.1.i55 = getelementptr %struct.btOptimizedBvhNode* %68, i32 %i.070, i32 0, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %scevgep.1.i55, align 4 ; [#uses=1]
- store float %70, float* %scevgep4.1.i56, align 4
- %scevgep.2.i57 = getelementptr %struct.btOptimizedBvhNode* %68, i32 %i.070, i32 0, i32 0, i32 2 ; [#uses=1]
- %71 = load float* %scevgep.2.i57, align 4 ; [#uses=1]
- store float %71, float* %scevgep4.2.i58, align 4
- %scevgep.3.i59 = getelementptr %struct.btOptimizedBvhNode* %68, i32 %i.070, i32 0, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %scevgep.3.i59, align 4 ; [#uses=1]
- store float %72, float* %scevgep4.3.i60, align 4
- %73 = load %struct.btOptimizedBvhNode** %62, align 4 ; [#uses=1]
- %scevgep81 = getelementptr %struct.btOptimizedBvhNode* %73, i32 %i.070, i32 2 ; [#uses=1]
- %74 = load i32* %scevgep81, align 4 ; [#uses=1]
- store i32 %74, i32* %scevgep8586, align 4
- %75 = load %struct.btOptimizedBvhNode** %62, align 4 ; [#uses=1]
- %scevgep82 = getelementptr %struct.btOptimizedBvhNode* %75, i32 %i.070, i32 3 ; [#uses=1]
- %76 = load i32* %scevgep82, align 4 ; [#uses=1]
- store i32 %76, i32* %scevgep8889, align 4
- %77 = load %struct.btOptimizedBvhNode** %62, align 4 ; [#uses=1]
- %scevgep83 = getelementptr %struct.btOptimizedBvhNode* %77, i32 %i.070, i32 4 ; [#uses=1]
- %78 = load i32* %scevgep83, align 4 ; [#uses=1]
- store i32 %78, i32* %scevgep9192, align 4
- %79 = add nsw i32 %i.070, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %79, %52 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb4
-
-bb6: ; preds = %bb4, %bb3
- %80 = load i32 (...)*** %53, align 4 ; [#uses=1]
- %81 = getelementptr inbounds i32 (...)** %80, i32 5 ; [#uses=1]
- %82 = load i32 (...)** %81, align 4 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %84 = load %struct.btOptimizedBvhNode** %83, align 4 ; [#uses=1]
- %85 = bitcast %struct.btOptimizedBvhNode* %84 to i8* ; [#uses=1]
- %86 = bitcast i32 (...)* %82 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %86(%struct.btActionInterface* %serializer, %struct.btChunk* %58, i8* getelementptr inbounds ([23 x i8]* @.str4, i32 0, i32 0), i32 1497453121, i8* %85)
- br label %bb7
-
-bb7: ; preds = %bb6, %bb2, %bb2.thread
- %87 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=3]
- %88 = load i32* %87, align 4 ; [#uses=1]
- %89 = getelementptr inbounds i8* %dataBuffer, i32 60 ; [#uses=1]
- %90 = bitcast i8* %89 to i32* ; [#uses=1]
- store i32 %88, i32* %90, align 4
- %91 = load i32* %87, align 4 ; [#uses=1]
- %92 = icmp eq i32 %91, 0 ; [#uses=1]
- br i1 %92, label %bb10.thread, label %bb10
-
-bb10.thread: ; preds = %bb7
- %93 = getelementptr inbounds i8* %dataBuffer, i32 68 ; [#uses=1]
- %94 = bitcast i8* %93 to %struct.BT_QUANTIZED_BVH_NODE** ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %94, align 4
- br label %bb20
-
-bb10: ; preds = %bb7
- %95 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=1]
- %96 = load i32 (...)*** %95, align 4 ; [#uses=1]
- %97 = getelementptr inbounds i32 (...)** %96, i32 7 ; [#uses=1]
- %98 = load i32 (...)** %97, align 4 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %100 = load %struct.BT_QUANTIZED_BVH_NODE** %99, align 4 ; [#uses=1]
- %101 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %100 to i8* ; [#uses=1]
- %102 = bitcast i32 (...)* %98 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %103 = tail call i8* %102(%struct.btActionInterface* %serializer, i8* %101) ; [#uses=1]
- %phitmp35 = bitcast i8* %103 to %struct.BT_QUANTIZED_BVH_NODE* ; [#uses=2]
- %104 = getelementptr inbounds i8* %dataBuffer, i32 68 ; [#uses=1]
- %105 = bitcast i8* %104 to %struct.BT_QUANTIZED_BVH_NODE** ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* %phitmp35, %struct.BT_QUANTIZED_BVH_NODE** %105, align 4
- %106 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %phitmp35, null ; [#uses=1]
- br i1 %106, label %bb20, label %bb11
-
-bb11: ; preds = %bb10
- %107 = load i32* %87, align 4 ; [#uses=3]
- %108 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %109 = load i32 (...)*** %108, align 4 ; [#uses=1]
- %110 = getelementptr inbounds i32 (...)** %109, i32 4 ; [#uses=1]
- %111 = load i32 (...)** %110, align 4 ; [#uses=1]
- %112 = bitcast i32 (...)* %111 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %113 = tail call %struct.btChunk* %112(%struct.btActionInterface* %serializer, i32 16, i32 %107) ; [#uses=2]
- %114 = icmp sgt i32 %107, 0 ; [#uses=1]
- br i1 %114, label %bb.nph73, label %bb19
-
-bb.nph73: ; preds = %bb11
- %115 = getelementptr inbounds %struct.btChunk* %113, i32 0, i32 2 ; [#uses=1]
- %116 = load i8** %115, align 4 ; [#uses=7]
- %117 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=7]
- br label %bb17
-
-bb17: ; preds = %bb17, %bb.nph73
- %i16.072 = phi i32 [ 0, %bb.nph73 ], [ %132, %bb17 ] ; [#uses=9]
- %tmp125 = shl i32 %i16.072, 4 ; [#uses=7]
- %tmp126180 = or i32 %tmp125, 12 ; [#uses=1]
- %scevgep127 = getelementptr i8* %116, i32 %tmp126180 ; [#uses=1]
- %scevgep127128 = bitcast i8* %scevgep127 to i32* ; [#uses=1]
- %tmp129181 = or i32 %tmp125, 6 ; [#uses=1]
- %scevgep130 = getelementptr i8* %116, i32 %tmp129181 ; [#uses=1]
- %scevgep130131 = bitcast i8* %scevgep130 to i16* ; [#uses=1]
- %tmp132182 = or i32 %tmp125, 8 ; [#uses=1]
- %scevgep133 = getelementptr i8* %116, i32 %tmp132182 ; [#uses=1]
- %scevgep133134 = bitcast i8* %scevgep133 to i16* ; [#uses=1]
- %tmp135183 = or i32 %tmp125, 10 ; [#uses=1]
- %scevgep136 = getelementptr i8* %116, i32 %tmp135183 ; [#uses=1]
- %scevgep136137 = bitcast i8* %scevgep136 to i16* ; [#uses=1]
- %scevgep138 = getelementptr i8* %116, i32 %tmp125 ; [#uses=1]
- %scevgep138139 = bitcast i8* %scevgep138 to i16* ; [#uses=1]
- %tmp140184 = or i32 %tmp125, 2 ; [#uses=1]
- %scevgep141 = getelementptr i8* %116, i32 %tmp140184 ; [#uses=1]
- %scevgep141142 = bitcast i8* %scevgep141 to i16* ; [#uses=1]
- %tmp143185 = or i32 %tmp125, 4 ; [#uses=1]
- %scevgep144 = getelementptr i8* %116, i32 %tmp143185 ; [#uses=1]
- %scevgep144145 = bitcast i8* %scevgep144 to i16* ; [#uses=1]
- %118 = load %struct.BT_QUANTIZED_BVH_NODE** %117, align 4 ; [#uses=1]
- %scevgep117 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %118, i32 %i16.072, i32 2 ; [#uses=1]
- %119 = load i32* %scevgep117, align 4 ; [#uses=1]
- store i32 %119, i32* %scevgep127128, align 4
- %120 = load %struct.BT_QUANTIZED_BVH_NODE** %117, align 4 ; [#uses=1]
- %scevgep118 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %120, i32 %i16.072, i32 1, i32 0 ; [#uses=1]
- %121 = load i16* %scevgep118, align 2 ; [#uses=1]
- store i16 %121, i16* %scevgep130131, align 2
- %122 = load %struct.BT_QUANTIZED_BVH_NODE** %117, align 4 ; [#uses=1]
- %scevgep119 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %122, i32 %i16.072, i32 1, i32 1 ; [#uses=1]
- %123 = load i16* %scevgep119, align 2 ; [#uses=1]
- store i16 %123, i16* %scevgep133134, align 2
- %124 = load %struct.BT_QUANTIZED_BVH_NODE** %117, align 4 ; [#uses=1]
- %scevgep120 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %124, i32 %i16.072, i32 1, i32 2 ; [#uses=1]
- %125 = load i16* %scevgep120, align 2 ; [#uses=1]
- store i16 %125, i16* %scevgep136137, align 2
- %126 = load %struct.BT_QUANTIZED_BVH_NODE** %117, align 4 ; [#uses=1]
- %scevgep121122 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %126, i32 %i16.072, i32 0, i32 0 ; [#uses=1]
- %127 = load i16* %scevgep121122, align 2 ; [#uses=1]
- store i16 %127, i16* %scevgep138139, align 2
- %128 = load %struct.BT_QUANTIZED_BVH_NODE** %117, align 4 ; [#uses=1]
- %scevgep123 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %128, i32 %i16.072, i32 0, i32 1 ; [#uses=1]
- %129 = load i16* %scevgep123, align 2 ; [#uses=1]
- store i16 %129, i16* %scevgep141142, align 2
- %130 = load %struct.BT_QUANTIZED_BVH_NODE** %117, align 4 ; [#uses=1]
- %scevgep124 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %130, i32 %i16.072, i32 0, i32 2 ; [#uses=1]
- %131 = load i16* %scevgep124, align 2 ; [#uses=1]
- store i16 %131, i16* %scevgep144145, align 2
- %132 = add nsw i32 %i16.072, 1 ; [#uses=2]
- %exitcond116 = icmp eq i32 %132, %107 ; [#uses=1]
- br i1 %exitcond116, label %bb19, label %bb17
-
-bb19: ; preds = %bb17, %bb11
- %133 = load i32 (...)*** %108, align 4 ; [#uses=1]
- %134 = getelementptr inbounds i32 (...)** %133, i32 5 ; [#uses=1]
- %135 = load i32 (...)** %134, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %137 = load %struct.BT_QUANTIZED_BVH_NODE** %136, align 4 ; [#uses=1]
- %138 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %137 to i8* ; [#uses=1]
- %139 = bitcast i32 (...)* %135 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %139(%struct.btActionInterface* %serializer, %struct.btChunk* %113, i8* getelementptr inbounds ([23 x i8]* @.str15, i32 0, i32 0), i32 1497453121, i8* %138)
- br label %bb20
-
-bb20: ; preds = %bb19, %bb10, %bb10.thread
- %140 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- %141 = load i32* %140, align 4 ; [#uses=1]
- %142 = getelementptr inbounds i8* %dataBuffer, i32 76 ; [#uses=1]
- %143 = bitcast i8* %142 to i32* ; [#uses=1]
- store i32 %141, i32* %143, align 4
- %144 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=3]
- %145 = load i32* %144, align 4 ; [#uses=1]
- %146 = getelementptr inbounds i8* %dataBuffer, i32 80 ; [#uses=1]
- %147 = bitcast i8* %146 to i32* ; [#uses=1]
- store i32 %145, i32* %147, align 4
- %148 = load i32* %144, align 4 ; [#uses=1]
- %149 = icmp eq i32 %148, 0 ; [#uses=1]
- br i1 %149, label %bb23.thread, label %bb23
-
-bb23.thread: ; preds = %bb20
- %150 = getelementptr inbounds i8* %dataBuffer, i32 72 ; [#uses=1]
- %151 = bitcast i8* %150 to %struct.btBvhSubtreeInfoData** ; [#uses=1]
- store %struct.btBvhSubtreeInfoData* null, %struct.btBvhSubtreeInfoData** %151, align 4
- ret i8* getelementptr inbounds ([24 x i8]* @.str37, i32 0, i32 0)
-
-bb23: ; preds = %bb20
- %152 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=1]
- %153 = load i32 (...)*** %152, align 4 ; [#uses=1]
- %154 = getelementptr inbounds i32 (...)** %153, i32 7 ; [#uses=1]
- %155 = load i32 (...)** %154, align 4 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- %157 = load %struct.btBvhSubtreeInfo** %156, align 4 ; [#uses=1]
- %158 = bitcast %struct.btBvhSubtreeInfo* %157 to i8* ; [#uses=1]
- %159 = bitcast i32 (...)* %155 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %160 = tail call i8* %159(%struct.btActionInterface* %serializer, i8* %158) ; [#uses=1]
- %phitmp36 = bitcast i8* %160 to %struct.btBvhSubtreeInfoData* ; [#uses=2]
- %161 = getelementptr inbounds i8* %dataBuffer, i32 72 ; [#uses=1]
- %162 = bitcast i8* %161 to %struct.btBvhSubtreeInfoData** ; [#uses=1]
- store %struct.btBvhSubtreeInfoData* %phitmp36, %struct.btBvhSubtreeInfoData** %162, align 4
- %163 = icmp eq %struct.btBvhSubtreeInfoData* %phitmp36, null ; [#uses=1]
- br i1 %163, label %bb33, label %bb24
-
-bb24: ; preds = %bb23
- %164 = load i32* %144, align 4 ; [#uses=3]
- %165 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %166 = load i32 (...)*** %165, align 4 ; [#uses=1]
- %167 = getelementptr inbounds i32 (...)** %166, i32 4 ; [#uses=1]
- %168 = load i32 (...)** %167, align 4 ; [#uses=1]
- %169 = bitcast i32 (...)* %168 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %170 = tail call %struct.btChunk* %169(%struct.btActionInterface* %serializer, i32 20, i32 %164) ; [#uses=2]
- %171 = icmp sgt i32 %164, 0 ; [#uses=1]
- br i1 %171, label %bb.nph76, label %bb32
-
-bb.nph76: ; preds = %bb24
- %172 = getelementptr inbounds %struct.btChunk* %170, i32 0, i32 2 ; [#uses=1]
- %173 = load i8** %172, align 4 ; [#uses=8]
- %174 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=8]
- br label %bb30
-
-bb30: ; preds = %bb30, %bb.nph76
- %i29.075 = phi i32 [ 0, %bb.nph76 ], [ %191, %bb30 ] ; [#uses=10]
- %tmp156 = mul i32 %i29.075, 20 ; [#uses=8]
- %scevgep157 = getelementptr i8* %173, i32 %tmp156 ; [#uses=1]
- %scevgep157158 = bitcast i8* %scevgep157 to i32* ; [#uses=1]
- %tmp159 = add i32 %tmp156, 4 ; [#uses=1]
- %scevgep160 = getelementptr i8* %173, i32 %tmp159 ; [#uses=1]
- %scevgep160161 = bitcast i8* %scevgep160 to i32* ; [#uses=1]
- %tmp162 = add i32 %tmp156, 14 ; [#uses=1]
- %scevgep163 = getelementptr i8* %173, i32 %tmp162 ; [#uses=1]
- %scevgep163164 = bitcast i8* %scevgep163 to i16* ; [#uses=1]
- %tmp165 = add i32 %tmp156, 16 ; [#uses=1]
- %scevgep166 = getelementptr i8* %173, i32 %tmp165 ; [#uses=1]
- %scevgep166167 = bitcast i8* %scevgep166 to i16* ; [#uses=1]
- %tmp168 = add i32 %tmp156, 18 ; [#uses=1]
- %scevgep169 = getelementptr i8* %173, i32 %tmp168 ; [#uses=1]
- %scevgep169170 = bitcast i8* %scevgep169 to i16* ; [#uses=1]
- %tmp171 = add i32 %tmp156, 8 ; [#uses=1]
- %scevgep172 = getelementptr i8* %173, i32 %tmp171 ; [#uses=1]
- %scevgep172173 = bitcast i8* %scevgep172 to i16* ; [#uses=1]
- %tmp174 = add i32 %tmp156, 10 ; [#uses=1]
- %scevgep175 = getelementptr i8* %173, i32 %tmp174 ; [#uses=1]
- %scevgep175176 = bitcast i8* %scevgep175 to i16* ; [#uses=1]
- %tmp177 = add i32 %tmp156, 12 ; [#uses=1]
- %scevgep178 = getelementptr i8* %173, i32 %tmp177 ; [#uses=1]
- %scevgep178179 = bitcast i8* %scevgep178 to i16* ; [#uses=1]
- %175 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep147 = getelementptr %struct.btBvhSubtreeInfo* %175, i32 %i29.075, i32 1, i32 0 ; [#uses=1]
- %176 = load i16* %scevgep147, align 2 ; [#uses=1]
- store i16 %176, i16* %scevgep163164, align 2
- %177 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep148 = getelementptr %struct.btBvhSubtreeInfo* %177, i32 %i29.075, i32 1, i32 1 ; [#uses=1]
- %178 = load i16* %scevgep148, align 2 ; [#uses=1]
- store i16 %178, i16* %scevgep166167, align 2
- %179 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep149 = getelementptr %struct.btBvhSubtreeInfo* %179, i32 %i29.075, i32 1, i32 2 ; [#uses=1]
- %180 = load i16* %scevgep149, align 2 ; [#uses=1]
- store i16 %180, i16* %scevgep169170, align 2
- %181 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep150151 = getelementptr inbounds %struct.btBvhSubtreeInfo* %181, i32 %i29.075, i32 0, i32 0 ; [#uses=1]
- %182 = load i16* %scevgep150151, align 2 ; [#uses=1]
- store i16 %182, i16* %scevgep172173, align 2
- %183 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep152 = getelementptr %struct.btBvhSubtreeInfo* %183, i32 %i29.075, i32 0, i32 1 ; [#uses=1]
- %184 = load i16* %scevgep152, align 2 ; [#uses=1]
- store i16 %184, i16* %scevgep175176, align 2
- %185 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep153 = getelementptr %struct.btBvhSubtreeInfo* %185, i32 %i29.075, i32 0, i32 2 ; [#uses=1]
- %186 = load i16* %scevgep153, align 2 ; [#uses=1]
- store i16 %186, i16* %scevgep178179, align 2
- %187 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep154 = getelementptr %struct.btBvhSubtreeInfo* %187, i32 %i29.075, i32 2 ; [#uses=1]
- %188 = load i32* %scevgep154, align 4 ; [#uses=1]
- store i32 %188, i32* %scevgep157158, align 4
- %189 = load %struct.btBvhSubtreeInfo** %174, align 4 ; [#uses=1]
- %scevgep155 = getelementptr %struct.btBvhSubtreeInfo* %189, i32 %i29.075, i32 3 ; [#uses=1]
- %190 = load i32* %scevgep155, align 4 ; [#uses=1]
- store i32 %190, i32* %scevgep160161, align 4
- %191 = add nsw i32 %i29.075, 1 ; [#uses=2]
- %exitcond146 = icmp eq i32 %191, %164 ; [#uses=1]
- br i1 %exitcond146, label %bb32, label %bb30
-
-bb32: ; preds = %bb30, %bb24
- %192 = load i32 (...)*** %165, align 4 ; [#uses=1]
- %193 = getelementptr inbounds i32 (...)** %192, i32 5 ; [#uses=1]
- %194 = load i32 (...)** %193, align 4 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- %196 = load %struct.btBvhSubtreeInfo** %195, align 4 ; [#uses=1]
- %197 = bitcast %struct.btBvhSubtreeInfo* %196 to i8* ; [#uses=1]
- %198 = bitcast i32 (...)* %194 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %198(%struct.btActionInterface* %serializer, %struct.btChunk* %170, i8* getelementptr inbounds ([21 x i8]* @.str26, i32 0, i32 0), i32 1497453121, i8* %197)
- ret i8* getelementptr inbounds ([24 x i8]* @.str37, i32 0, i32 0)
-
-bb33: ; preds = %bb23
- ret i8* getelementptr inbounds ([24 x i8]* @.str37, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvh17deSerializeDoubleER24btQuantizedBvhDoubleData(%struct.btQuantizedBvh* %this, %struct.btQuantizedBvhDoubleData* nocapture %quantizedBvhDoubleData) align 2 {
-entry:
- %scevgep.i = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %0 = load double* %scevgep.i, align 4 ; [#uses=1]
- %1 = fptrunc double %0 to float ; [#uses=1]
- store float %1, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %2 = load double* %scevgep.1.i, align 4 ; [#uses=1]
- %3 = fptrunc double %2 to float ; [#uses=1]
- store float %3, float* %scevgep4.1.i, align 4
- %scevgep.2.i = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %4 = load double* %scevgep.2.i, align 4 ; [#uses=1]
- %5 = fptrunc double %4 to float ; [#uses=1]
- store float %5, float* %scevgep4.2.i, align 4
- %scevgep.3.i = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %6 = load double* %scevgep.3.i, align 4 ; [#uses=1]
- %7 = fptrunc double %6 to float ; [#uses=1]
- store float %7, float* %scevgep4.3.i, align 4
- %scevgep.i19 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i20 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %8 = load double* %scevgep.i19, align 4 ; [#uses=1]
- %9 = fptrunc double %8 to float ; [#uses=1]
- store float %9, float* %scevgep4.i20, align 4
- %scevgep.1.i21 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i22 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load double* %scevgep.1.i21, align 4 ; [#uses=1]
- %11 = fptrunc double %10 to float ; [#uses=1]
- store float %11, float* %scevgep4.1.i22, align 4
- %scevgep.2.i23 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i24 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %12 = load double* %scevgep.2.i23, align 4 ; [#uses=1]
- %13 = fptrunc double %12 to float ; [#uses=1]
- store float %13, float* %scevgep4.2.i24, align 4
- %scevgep.3.i25 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i26 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %14 = load double* %scevgep.3.i25, align 4 ; [#uses=1]
- %15 = fptrunc double %14 to float ; [#uses=1]
- store float %15, float* %scevgep4.3.i26, align 4
- %scevgep.i27 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i28 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %16 = load double* %scevgep.i27, align 4 ; [#uses=1]
- %17 = fptrunc double %16 to float ; [#uses=1]
- store float %17, float* %scevgep4.i28, align 4
- %scevgep.1.i29 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i30 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %18 = load double* %scevgep.1.i29, align 4 ; [#uses=1]
- %19 = fptrunc double %18 to float ; [#uses=1]
- store float %19, float* %scevgep4.1.i30, align 4
- %scevgep.2.i31 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i32 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %20 = load double* %scevgep.2.i31, align 4 ; [#uses=1]
- %21 = fptrunc double %20 to float ; [#uses=1]
- store float %21, float* %scevgep4.2.i32, align 4
- %scevgep.3.i33 = getelementptr %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i34 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %22 = load double* %scevgep.3.i33, align 4 ; [#uses=1]
- %23 = fptrunc double %22 to float ; [#uses=1]
- store float %23, float* %scevgep4.3.i34, align 4
- %24 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 3 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- store i32 %25, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 4 ; [#uses=1]
- %28 = load i32* %27, align 4 ; [#uses=1]
- %29 = icmp ne i32 %28, 0 ; [#uses=1]
- %30 = zext i1 %29 to i8 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- store i8 %30, i8* %31, align 4
- %32 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 5 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=10]
- %34 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=3]
- %35 = load i32* %34, align 4 ; [#uses=3]
- %36 = icmp sgt i32 %35, %33 ; [#uses=1]
- %.not = xor i1 %36, true ; [#uses=1]
- %37 = icmp slt i32 %35, %33 ; [#uses=1]
- %or.cond = and i1 %.not, %37 ; [#uses=1]
- br i1 %or.cond, label %bb4.i36, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
-
-bb4.i36: ; preds = %entry
- %38 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=2]
- %39 = load i32* %38, align 4 ; [#uses=1]
- %40 = icmp slt i32 %39, %33 ; [#uses=1]
- br i1 %40, label %bb.i.i37, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
-
-bb.i.i37: ; preds = %bb4.i36
- %41 = icmp eq i32 %33, 0 ; [#uses=1]
- br i1 %41, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i, label %bb.i2.i.i40
-
-bb.i2.i.i40: ; preds = %bb.i.i37
- %42 = shl i32 %33, 6 ; [#uses=1]
- %43 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %42, i32 16) ; [#uses=1]
- %phitmp.i.i38 = bitcast i8* %43 to %struct.btOptimizedBvhNode* ; [#uses=1]
- %.pre.i39 = load i32* %34, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i40, %bb.i.i37
- %44 = phi i32 [ %.pre.i39, %bb.i2.i.i40 ], [ %35, %bb.i.i37 ] ; [#uses=2]
- %45 = phi %struct.btOptimizedBvhNode* [ %phitmp.i.i38, %bb.i2.i.i40 ], [ null, %bb.i.i37 ] ; [#uses=2]
- %46 = icmp sgt i32 %44, 0 ; [#uses=1]
- br i1 %46, label %bb.nph.i.i.i41, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i41: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %47 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- br label %bb.i4.i.i49
-
-bb.i4.i.i49: ; preds = %bb.i4.i.i49, %bb.nph.i.i.i41
- %indvar.i.i.i42 = phi i32 [ 0, %bb.nph.i.i.i41 ], [ %indvar.next.i.i.i47, %bb.i4.i.i49 ] ; [#uses=3]
- %scevgep159 = getelementptr %struct.btOptimizedBvhNode* %45, i32 %indvar.i.i.i42 ; [#uses=1]
- %scevgep5.i.i.i44 = bitcast %struct.btOptimizedBvhNode* %scevgep159 to i8* ; [#uses=1]
- %48 = load %struct.btOptimizedBvhNode** %47, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btOptimizedBvhNode* %48, i32 %indvar.i.i.i42 ; [#uses=1]
- %scevgep67.i.i.i46 = bitcast %struct.btOptimizedBvhNode* %scevgep to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i44, i8* %scevgep67.i.i.i46, i32 64, i32 4, i1 false) nounwind
- %indvar.next.i.i.i47 = add i32 %indvar.i.i.i42, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i47, %44 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i49
-
-_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i49, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %49 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %50 = load %struct.btOptimizedBvhNode** %49, align 4 ; [#uses=2]
- %51 = icmp eq %struct.btOptimizedBvhNode* %50, null ; [#uses=1]
- br i1 %51, label %bb8.preheader.i54, label %bb.i.i.i51
-
-bb.i.i.i51: ; preds = %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %52 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %53 = load i8* %52, align 4 ; [#uses=1]
- %toBool.i.i.i50 = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i50, label %bb2.i.i.i53, label %bb1.i.i.i52
-
-bb1.i.i.i52: ; preds = %bb.i.i.i51
- %54 = bitcast %struct.btOptimizedBvhNode* %50 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %54)
- br label %bb2.i.i.i53
-
-bb2.i.i.i53: ; preds = %bb1.i.i.i52, %bb.i.i.i51
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %49, align 4
- br label %bb8.preheader.i54
-
-bb8.preheader.i54: ; preds = %bb2.i.i.i53, %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %55 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 4
- store %struct.btOptimizedBvhNode* %45, %struct.btOptimizedBvhNode** %49, align 4
- store i32 %33, i32* %38, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit: ; preds = %bb8.preheader.i54, %bb4.i36, %entry
- store i32 %33, i32* %34, align 4
- %56 = icmp eq i32 %33, 0 ; [#uses=1]
- %.not238 = xor i1 %56, true ; [#uses=1]
- %57 = icmp sgt i32 %33, 0 ; [#uses=1]
- %or.cond239 = and i1 %.not238, %57 ; [#uses=1]
- br i1 %or.cond239, label %bb.nph, label %bb3
-
-bb.nph: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
- %58 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 7 ; [#uses=1]
- %59 = load %struct.btOptimizedBvhNodeDoubleData** %58, align 4 ; [#uses=11]
- %60 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=5]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph
- %i.0150 = phi i32 [ 0, %bb.nph ], [ %85, %bb1 ] ; [#uses=23]
- %scevgep162 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 2 ; [#uses=1]
- %scevgep163 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 3 ; [#uses=1]
- %scevgep164 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 4 ; [#uses=1]
- %scevgep.i64 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep.1.i66 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep.2.i68 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep.3.i70 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep.i72 = getelementptr inbounds %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep.1.i74 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep.2.i76 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep.3.i78 = getelementptr %struct.btOptimizedBvhNodeDoubleData* %59, i32 %i.0150, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = load %struct.btOptimizedBvhNode** %60, align 4 ; [#uses=4]
- %62 = load double* %scevgep.i64, align 4 ; [#uses=1]
- %63 = fptrunc double %62 to float ; [#uses=1]
- %scevgep4.i65 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %i.0150, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %63, float* %scevgep4.i65, align 4
- %64 = load double* %scevgep.1.i66, align 4 ; [#uses=1]
- %65 = fptrunc double %64 to float ; [#uses=1]
- %scevgep4.1.i67 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %i.0150, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %65, float* %scevgep4.1.i67, align 4
- %66 = load double* %scevgep.2.i68, align 4 ; [#uses=1]
- %67 = fptrunc double %66 to float ; [#uses=1]
- %scevgep4.2.i69 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %i.0150, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %67, float* %scevgep4.2.i69, align 4
- %68 = load double* %scevgep.3.i70, align 4 ; [#uses=1]
- %69 = fptrunc double %68 to float ; [#uses=1]
- %scevgep4.3.i71 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %i.0150, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %69, float* %scevgep4.3.i71, align 4
- %70 = load %struct.btOptimizedBvhNode** %60, align 4 ; [#uses=4]
- %71 = load double* %scevgep.i72, align 4 ; [#uses=1]
- %72 = fptrunc double %71 to float ; [#uses=1]
- %scevgep4.i73 = getelementptr inbounds %struct.btOptimizedBvhNode* %70, i32 %i.0150, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %72, float* %scevgep4.i73, align 4
- %73 = load double* %scevgep.1.i74, align 4 ; [#uses=1]
- %74 = fptrunc double %73 to float ; [#uses=1]
- %scevgep4.1.i75 = getelementptr %struct.btOptimizedBvhNode* %70, i32 %i.0150, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %74, float* %scevgep4.1.i75, align 4
- %75 = load double* %scevgep.2.i76, align 4 ; [#uses=1]
- %76 = fptrunc double %75 to float ; [#uses=1]
- %scevgep4.2.i77 = getelementptr %struct.btOptimizedBvhNode* %70, i32 %i.0150, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %76, float* %scevgep4.2.i77, align 4
- %77 = load double* %scevgep.3.i78, align 4 ; [#uses=1]
- %78 = fptrunc double %77 to float ; [#uses=1]
- %scevgep4.3.i79 = getelementptr %struct.btOptimizedBvhNode* %70, i32 %i.0150, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %78, float* %scevgep4.3.i79, align 4
- %79 = load %struct.btOptimizedBvhNode** %60, align 4 ; [#uses=1]
- %80 = load i32* %scevgep162, align 4 ; [#uses=1]
- %scevgep183 = getelementptr %struct.btOptimizedBvhNode* %79, i32 %i.0150, i32 2 ; [#uses=1]
- store i32 %80, i32* %scevgep183, align 4
- %81 = load %struct.btOptimizedBvhNode** %60, align 4 ; [#uses=1]
- %82 = load i32* %scevgep163, align 4 ; [#uses=1]
- %scevgep184 = getelementptr %struct.btOptimizedBvhNode* %81, i32 %i.0150, i32 3 ; [#uses=1]
- store i32 %82, i32* %scevgep184, align 4
- %83 = load %struct.btOptimizedBvhNode** %60, align 4 ; [#uses=1]
- %84 = load i32* %scevgep164, align 4 ; [#uses=1]
- %scevgep185 = getelementptr %struct.btOptimizedBvhNode* %83, i32 %i.0150, i32 4 ; [#uses=1]
- store i32 %84, i32* %scevgep185, align 4
- %85 = add nsw i32 %i.0150, 1 ; [#uses=2]
- %exitcond161 = icmp eq i32 %85, %33 ; [#uses=1]
- br i1 %exitcond161, label %bb3, label %bb1
-
-bb3: ; preds = %bb1, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
- %86 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 6 ; [#uses=1]
- %87 = load i32* %86, align 4 ; [#uses=7]
- %88 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=2]
- %89 = load i32* %88, align 4 ; [#uses=3]
- %90 = icmp slt i32 %89, %87 ; [#uses=1]
- br i1 %90, label %bb.nph.i81, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
-
-bb.nph.i81: ; preds = %bb3
- %91 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE7reserveEi(%struct.QuantizedNodeArray* %91, i32 %87) inlinehint
- %92 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %tmp.i80 = sub i32 %87, %89 ; [#uses=1]
- br label %bb7.i89
-
-bb7.i89: ; preds = %bb7.i89, %bb.nph.i81
- %indvar.i82 = phi i32 [ 0, %bb.nph.i81 ], [ %indvar.next.i87, %bb7.i89 ] ; [#uses=2]
- %tmp = add i32 %89, %indvar.i82 ; [#uses=1]
- %93 = load %struct.BT_QUANTIZED_BVH_NODE** %92, align 4 ; [#uses=1]
- %scevgep15.i84 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %93, i32 %tmp, i32 0, i32 0 ; [#uses=1]
- %indvar.next.i87 = add i32 %indvar.i82, 1 ; [#uses=2]
- %exitcond228 = icmp eq i32 %indvar.next.i87, %tmp.i80 ; [#uses=1]
- %scevgep15.i84237 = bitcast i16* %scevgep15.i84 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %scevgep15.i84237, i8 0, i64 16, i32 4, i1 false)
- br i1 %exitcond228, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit, label %bb7.i89
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit: ; preds = %bb7.i89, %bb3
- store i32 %87, i32* %88, align 4
- %94 = icmp eq i32 %87, 0 ; [#uses=1]
- %.not240 = xor i1 %94, true ; [#uses=1]
- %95 = icmp sgt i32 %87, 0 ; [#uses=1]
- %or.cond241 = and i1 %.not240, %95 ; [#uses=1]
- br i1 %or.cond241, label %bb.nph154, label %bb10
-
-bb.nph154: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
- %96 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 8 ; [#uses=1]
- %97 = load %struct.BT_QUANTIZED_BVH_NODE** %96, align 4 ; [#uses=7]
- %98 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=7]
- br label %bb8
-
-bb8: ; preds = %bb8, %bb.nph154
- %i7.0153 = phi i32 [ 0, %bb.nph154 ], [ %113, %bb8 ] ; [#uses=15]
- %scevgep195 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %97, i32 %i7.0153, i32 2 ; [#uses=1]
- %scevgep196 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %97, i32 %i7.0153, i32 1, i32 0 ; [#uses=1]
- %scevgep197 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %97, i32 %i7.0153, i32 1, i32 1 ; [#uses=1]
- %scevgep198 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %97, i32 %i7.0153, i32 1, i32 2 ; [#uses=1]
- %scevgep199200 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %97, i32 %i7.0153, i32 0, i32 0 ; [#uses=1]
- %scevgep201 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %97, i32 %i7.0153, i32 0, i32 1 ; [#uses=1]
- %scevgep202 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %97, i32 %i7.0153, i32 0, i32 2 ; [#uses=1]
- %99 = load %struct.BT_QUANTIZED_BVH_NODE** %98, align 4 ; [#uses=1]
- %100 = load i32* %scevgep195, align 4 ; [#uses=1]
- %scevgep187 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %99, i32 %i7.0153, i32 2 ; [#uses=1]
- store i32 %100, i32* %scevgep187, align 4
- %101 = load %struct.BT_QUANTIZED_BVH_NODE** %98, align 4 ; [#uses=1]
- %102 = load i16* %scevgep196, align 2 ; [#uses=1]
- %scevgep188 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %101, i32 %i7.0153, i32 1, i32 0 ; [#uses=1]
- store i16 %102, i16* %scevgep188, align 2
- %103 = load %struct.BT_QUANTIZED_BVH_NODE** %98, align 4 ; [#uses=1]
- %104 = load i16* %scevgep197, align 2 ; [#uses=1]
- %scevgep189 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %103, i32 %i7.0153, i32 1, i32 1 ; [#uses=1]
- store i16 %104, i16* %scevgep189, align 2
- %105 = load %struct.BT_QUANTIZED_BVH_NODE** %98, align 4 ; [#uses=1]
- %106 = load i16* %scevgep198, align 2 ; [#uses=1]
- %scevgep190 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %105, i32 %i7.0153, i32 1, i32 2 ; [#uses=1]
- store i16 %106, i16* %scevgep190, align 2
- %107 = load %struct.BT_QUANTIZED_BVH_NODE** %98, align 4 ; [#uses=1]
- %108 = load i16* %scevgep199200, align 2 ; [#uses=1]
- %scevgep191192 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %107, i32 %i7.0153, i32 0, i32 0 ; [#uses=1]
- store i16 %108, i16* %scevgep191192, align 2
- %109 = load %struct.BT_QUANTIZED_BVH_NODE** %98, align 4 ; [#uses=1]
- %110 = load i16* %scevgep201, align 2 ; [#uses=1]
- %scevgep193 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %109, i32 %i7.0153, i32 0, i32 1 ; [#uses=1]
- store i16 %110, i16* %scevgep193, align 2
- %111 = load %struct.BT_QUANTIZED_BVH_NODE** %98, align 4 ; [#uses=1]
- %112 = load i16* %scevgep202, align 2 ; [#uses=1]
- %scevgep194 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %111, i32 %i7.0153, i32 0, i32 2 ; [#uses=1]
- store i16 %112, i16* %scevgep194, align 2
- %113 = add nsw i32 %i7.0153, 1 ; [#uses=2]
- %exitcond186 = icmp eq i32 %113, %87 ; [#uses=1]
- br i1 %exitcond186, label %bb10, label %bb8
-
-bb10: ; preds = %bb8, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
- %114 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 9 ; [#uses=1]
- %115 = load i32* %114, align 4 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- store i32 %115, i32* %116, align 4
- %117 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 10 ; [#uses=1]
- %118 = load i32* %117, align 4 ; [#uses=10]
- %119 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=3]
- %120 = load i32* %119, align 4 ; [#uses=3]
- %121 = icmp sgt i32 %120, %118 ; [#uses=1]
- %.not242 = xor i1 %121, true ; [#uses=1]
- %122 = icmp slt i32 %120, %118 ; [#uses=1]
- %or.cond243 = and i1 %.not242, %122 ; [#uses=1]
- br i1 %or.cond243, label %bb4.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
-
-bb4.i: ; preds = %bb10
- %123 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=2]
- %124 = load i32* %123, align 4 ; [#uses=1]
- %125 = icmp slt i32 %124, %118 ; [#uses=1]
- br i1 %125, label %bb.i.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
-
-bb.i.i: ; preds = %bb4.i
- %126 = icmp eq i32 %118, 0 ; [#uses=1]
- br i1 %126, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %127 = shl i32 %118, 5 ; [#uses=1]
- %128 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %127, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %128 to %struct.btBvhSubtreeInfo* ; [#uses=1]
- %.pre.i = load i32* %119, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %129 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %120, %bb.i.i ] ; [#uses=2]
- %130 = phi %struct.btBvhSubtreeInfo* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %131 = icmp sgt i32 %129, 0 ; [#uses=1]
- br i1 %131, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %132 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep207 = getelementptr %struct.btBvhSubtreeInfo* %130, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep207 to i8* ; [#uses=1]
- %133 = load %struct.btBvhSubtreeInfo** %132, align 4 ; [#uses=1]
- %scevgep205 = getelementptr %struct.btBvhSubtreeInfo* %133, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep205 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 32, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond204 = icmp eq i32 %indvar.next.i.i.i, %129 ; [#uses=1]
- br i1 %exitcond204, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %134 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=3]
- %135 = load %struct.btBvhSubtreeInfo** %134, align 4 ; [#uses=2]
- %136 = icmp eq %struct.btBvhSubtreeInfo* %135, null ; [#uses=1]
- br i1 %136, label %bb8.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %137 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- %138 = load i8* %137, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %138, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %139 = bitcast %struct.btBvhSubtreeInfo* %135 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %139)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %134, align 4
- br label %bb8.preheader.i
-
-bb8.preheader.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %140 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %140, align 4
- store %struct.btBvhSubtreeInfo* %130, %struct.btBvhSubtreeInfo** %134, align 4
- store i32 %118, i32* %123, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit: ; preds = %bb8.preheader.i, %bb4.i, %bb10
- store i32 %118, i32* %119, align 4
- %141 = icmp eq i32 %118, 0 ; [#uses=1]
- %.not244 = xor i1 %141, true ; [#uses=1]
- %142 = icmp sgt i32 %118, 0 ; [#uses=1]
- %or.cond245 = and i1 %.not244, %142 ; [#uses=1]
- br i1 %or.cond245, label %bb.nph157, label %return
-
-bb.nph157: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
- %143 = getelementptr inbounds %struct.btQuantizedBvhDoubleData* %quantizedBvhDoubleData, i32 0, i32 11 ; [#uses=1]
- %144 = load %struct.btBvhSubtreeInfoData** %143, align 4 ; [#uses=8]
- %145 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=8]
- br label %bb15
-
-bb15: ; preds = %bb15, %bb.nph157
- %i14.0156 = phi i32 [ 0, %bb.nph157 ], [ %162, %bb15 ] ; [#uses=17]
- %scevgep219220 = getelementptr inbounds %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 0 ; [#uses=1]
- %scevgep221 = getelementptr %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 1 ; [#uses=1]
- %scevgep222 = getelementptr %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 3, i32 0 ; [#uses=1]
- %scevgep223 = getelementptr %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 3, i32 1 ; [#uses=1]
- %scevgep224 = getelementptr %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 3, i32 2 ; [#uses=1]
- %scevgep225 = getelementptr %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 2, i32 0 ; [#uses=1]
- %scevgep226 = getelementptr %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 2, i32 1 ; [#uses=1]
- %scevgep227 = getelementptr %struct.btBvhSubtreeInfoData* %144, i32 %i14.0156, i32 2, i32 2 ; [#uses=1]
- %146 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %147 = load i16* %scevgep222, align 2 ; [#uses=1]
- %scevgep210 = getelementptr %struct.btBvhSubtreeInfo* %146, i32 %i14.0156, i32 1, i32 0 ; [#uses=1]
- store i16 %147, i16* %scevgep210, align 2
- %148 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %149 = load i16* %scevgep223, align 2 ; [#uses=1]
- %scevgep211 = getelementptr %struct.btBvhSubtreeInfo* %148, i32 %i14.0156, i32 1, i32 1 ; [#uses=1]
- store i16 %149, i16* %scevgep211, align 2
- %150 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %151 = load i16* %scevgep224, align 2 ; [#uses=1]
- %scevgep212 = getelementptr %struct.btBvhSubtreeInfo* %150, i32 %i14.0156, i32 1, i32 2 ; [#uses=1]
- store i16 %151, i16* %scevgep212, align 2
- %152 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %153 = load i16* %scevgep225, align 2 ; [#uses=1]
- %scevgep213214 = getelementptr inbounds %struct.btBvhSubtreeInfo* %152, i32 %i14.0156, i32 0, i32 0 ; [#uses=1]
- store i16 %153, i16* %scevgep213214, align 2
- %154 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %155 = load i16* %scevgep226, align 2 ; [#uses=1]
- %scevgep215 = getelementptr %struct.btBvhSubtreeInfo* %154, i32 %i14.0156, i32 0, i32 1 ; [#uses=1]
- store i16 %155, i16* %scevgep215, align 2
- %156 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %157 = load i16* %scevgep227, align 2 ; [#uses=1]
- %scevgep216 = getelementptr %struct.btBvhSubtreeInfo* %156, i32 %i14.0156, i32 0, i32 2 ; [#uses=1]
- store i16 %157, i16* %scevgep216, align 2
- %158 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %159 = load i32* %scevgep219220, align 4 ; [#uses=1]
- %scevgep217 = getelementptr %struct.btBvhSubtreeInfo* %158, i32 %i14.0156, i32 2 ; [#uses=1]
- store i32 %159, i32* %scevgep217, align 4
- %160 = load %struct.btBvhSubtreeInfo** %145, align 4 ; [#uses=1]
- %161 = load i32* %scevgep221, align 4 ; [#uses=1]
- %scevgep218 = getelementptr %struct.btBvhSubtreeInfo* %160, i32 %i14.0156, i32 3 ; [#uses=1]
- store i32 %161, i32* %scevgep218, align 4
- %162 = add nsw i32 %i14.0156, 1 ; [#uses=2]
- %exitcond209 = icmp eq i32 %162, %118 ; [#uses=1]
- br i1 %exitcond209, label %return, label %bb15
-
-return: ; preds = %bb15, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvh16deSerializeFloatER23btQuantizedBvhFloatData(%struct.btQuantizedBvh* %this, %struct.btQuantizedBvhFloatData* nocapture %quantizedBvhFloatData) align 2 {
-entry:
- %scevgep.i = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %0 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %0, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %1, float* %scevgep4.1.i, align 4
- %scevgep.2.i = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %2 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %2, float* %scevgep4.2.i, align 4
- %scevgep.3.i = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %3 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.3.i, align 4
- %scevgep.i19 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i20 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %scevgep.i19, align 4 ; [#uses=1]
- store float %4, float* %scevgep4.i20, align 4
- %scevgep.1.i21 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i22 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %scevgep.1.i21, align 4 ; [#uses=1]
- store float %5, float* %scevgep4.1.i22, align 4
- %scevgep.2.i23 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i24 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %scevgep.2.i23, align 4 ; [#uses=1]
- store float %6, float* %scevgep4.2.i24, align 4
- %scevgep.3.i25 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i26 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %7 = load float* %scevgep.3.i25, align 4 ; [#uses=1]
- store float %7, float* %scevgep4.3.i26, align 4
- %scevgep.i27 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i28 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %scevgep.i27, align 4 ; [#uses=1]
- store float %8, float* %scevgep4.i28, align 4
- %scevgep.1.i29 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i30 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %scevgep.1.i29, align 4 ; [#uses=1]
- store float %9, float* %scevgep4.1.i30, align 4
- %scevgep.2.i31 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i32 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %scevgep.2.i31, align 4 ; [#uses=1]
- store float %10, float* %scevgep4.2.i32, align 4
- %scevgep.3.i33 = getelementptr %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i34 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %scevgep.3.i33, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.3.i34, align 4
- %12 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 3 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- store i32 %13, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 4 ; [#uses=1]
- %16 = load i32* %15, align 4 ; [#uses=1]
- %17 = icmp ne i32 %16, 0 ; [#uses=1]
- %18 = zext i1 %17 to i8 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- store i8 %18, i8* %19, align 4
- %20 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 5 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=10]
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=3]
- %23 = load i32* %22, align 4 ; [#uses=3]
- %24 = icmp sgt i32 %23, %21 ; [#uses=1]
- %.not = xor i1 %24, true ; [#uses=1]
- %25 = icmp slt i32 %23, %21 ; [#uses=1]
- %or.cond = and i1 %.not, %25 ; [#uses=1]
- br i1 %or.cond, label %bb4.i36, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
-
-bb4.i36: ; preds = %entry
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=2]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = icmp slt i32 %27, %21 ; [#uses=1]
- br i1 %28, label %bb.i.i37, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
-
-bb.i.i37: ; preds = %bb4.i36
- %29 = icmp eq i32 %21, 0 ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i, label %bb.i2.i.i40
-
-bb.i2.i.i40: ; preds = %bb.i.i37
- %30 = shl i32 %21, 6 ; [#uses=1]
- %31 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %30, i32 16) ; [#uses=1]
- %phitmp.i.i38 = bitcast i8* %31 to %struct.btOptimizedBvhNode* ; [#uses=1]
- %.pre.i39 = load i32* %22, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i40, %bb.i.i37
- %32 = phi i32 [ %.pre.i39, %bb.i2.i.i40 ], [ %23, %bb.i.i37 ] ; [#uses=2]
- %33 = phi %struct.btOptimizedBvhNode* [ %phitmp.i.i38, %bb.i2.i.i40 ], [ null, %bb.i.i37 ] ; [#uses=2]
- %34 = icmp sgt i32 %32, 0 ; [#uses=1]
- br i1 %34, label %bb.nph.i.i.i41, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i41: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %35 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- br label %bb.i4.i.i49
-
-bb.i4.i.i49: ; preds = %bb.i4.i.i49, %bb.nph.i.i.i41
- %indvar.i.i.i42 = phi i32 [ 0, %bb.nph.i.i.i41 ], [ %indvar.next.i.i.i47, %bb.i4.i.i49 ] ; [#uses=3]
- %scevgep159 = getelementptr %struct.btOptimizedBvhNode* %33, i32 %indvar.i.i.i42 ; [#uses=1]
- %scevgep5.i.i.i44 = bitcast %struct.btOptimizedBvhNode* %scevgep159 to i8* ; [#uses=1]
- %36 = load %struct.btOptimizedBvhNode** %35, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btOptimizedBvhNode* %36, i32 %indvar.i.i.i42 ; [#uses=1]
- %scevgep67.i.i.i46 = bitcast %struct.btOptimizedBvhNode* %scevgep to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i44, i8* %scevgep67.i.i.i46, i32 64, i32 4, i1 false) nounwind
- %indvar.next.i.i.i47 = add i32 %indvar.i.i.i42, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i47, %32 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i49
-
-_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i49, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %37 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %38 = load %struct.btOptimizedBvhNode** %37, align 4 ; [#uses=2]
- %39 = icmp eq %struct.btOptimizedBvhNode* %38, null ; [#uses=1]
- br i1 %39, label %bb8.preheader.i54, label %bb.i.i.i51
-
-bb.i.i.i51: ; preds = %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %40 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %41 = load i8* %40, align 4 ; [#uses=1]
- %toBool.i.i.i50 = icmp eq i8 %41, 0 ; [#uses=1]
- br i1 %toBool.i.i.i50, label %bb2.i.i.i53, label %bb1.i.i.i52
-
-bb1.i.i.i52: ; preds = %bb.i.i.i51
- %42 = bitcast %struct.btOptimizedBvhNode* %38 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %42)
- br label %bb2.i.i.i53
-
-bb2.i.i.i53: ; preds = %bb1.i.i.i52, %bb.i.i.i51
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %37, align 4
- br label %bb8.preheader.i54
-
-bb8.preheader.i54: ; preds = %bb2.i.i.i53, %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %43 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %43, align 4
- store %struct.btOptimizedBvhNode* %33, %struct.btOptimizedBvhNode** %37, align 4
- store i32 %21, i32* %26, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit: ; preds = %bb8.preheader.i54, %bb4.i36, %entry
- store i32 %21, i32* %22, align 4
- %44 = icmp eq i32 %21, 0 ; [#uses=1]
- %.not238 = xor i1 %44, true ; [#uses=1]
- %45 = icmp sgt i32 %21, 0 ; [#uses=1]
- %or.cond239 = and i1 %.not238, %45 ; [#uses=1]
- br i1 %or.cond239, label %bb.nph, label %bb3
-
-bb.nph: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
- %46 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 7 ; [#uses=1]
- %47 = load %struct.btOptimizedBvhNodeFloatData** %46, align 4 ; [#uses=11]
- %48 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=5]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph
- %i.0150 = phi i32 [ 0, %bb.nph ], [ %65, %bb1 ] ; [#uses=23]
- %scevgep162 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 2 ; [#uses=1]
- %scevgep163 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 3 ; [#uses=1]
- %scevgep164 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 4 ; [#uses=1]
- %scevgep.i64 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep.1.i66 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep.2.i68 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep.3.i70 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep.i72 = getelementptr inbounds %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep.1.i74 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep.2.i76 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep.3.i78 = getelementptr %struct.btOptimizedBvhNodeFloatData* %47, i32 %i.0150, i32 0, i32 0, i32 3 ; [#uses=1]
- %49 = load %struct.btOptimizedBvhNode** %48, align 4 ; [#uses=4]
- %50 = load float* %scevgep.i64, align 4 ; [#uses=1]
- %scevgep4.i65 = getelementptr %struct.btOptimizedBvhNode* %49, i32 %i.0150, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %50, float* %scevgep4.i65, align 4
- %51 = load float* %scevgep.1.i66, align 4 ; [#uses=1]
- %scevgep4.1.i67 = getelementptr %struct.btOptimizedBvhNode* %49, i32 %i.0150, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %51, float* %scevgep4.1.i67, align 4
- %52 = load float* %scevgep.2.i68, align 4 ; [#uses=1]
- %scevgep4.2.i69 = getelementptr %struct.btOptimizedBvhNode* %49, i32 %i.0150, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %52, float* %scevgep4.2.i69, align 4
- %53 = load float* %scevgep.3.i70, align 4 ; [#uses=1]
- %scevgep4.3.i71 = getelementptr %struct.btOptimizedBvhNode* %49, i32 %i.0150, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %53, float* %scevgep4.3.i71, align 4
- %54 = load %struct.btOptimizedBvhNode** %48, align 4 ; [#uses=4]
- %55 = load float* %scevgep.i72, align 4 ; [#uses=1]
- %scevgep4.i73 = getelementptr inbounds %struct.btOptimizedBvhNode* %54, i32 %i.0150, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %55, float* %scevgep4.i73, align 4
- %56 = load float* %scevgep.1.i74, align 4 ; [#uses=1]
- %scevgep4.1.i75 = getelementptr %struct.btOptimizedBvhNode* %54, i32 %i.0150, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %56, float* %scevgep4.1.i75, align 4
- %57 = load float* %scevgep.2.i76, align 4 ; [#uses=1]
- %scevgep4.2.i77 = getelementptr %struct.btOptimizedBvhNode* %54, i32 %i.0150, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %57, float* %scevgep4.2.i77, align 4
- %58 = load float* %scevgep.3.i78, align 4 ; [#uses=1]
- %scevgep4.3.i79 = getelementptr %struct.btOptimizedBvhNode* %54, i32 %i.0150, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %58, float* %scevgep4.3.i79, align 4
- %59 = load %struct.btOptimizedBvhNode** %48, align 4 ; [#uses=1]
- %60 = load i32* %scevgep162, align 4 ; [#uses=1]
- %scevgep183 = getelementptr %struct.btOptimizedBvhNode* %59, i32 %i.0150, i32 2 ; [#uses=1]
- store i32 %60, i32* %scevgep183, align 4
- %61 = load %struct.btOptimizedBvhNode** %48, align 4 ; [#uses=1]
- %62 = load i32* %scevgep163, align 4 ; [#uses=1]
- %scevgep184 = getelementptr %struct.btOptimizedBvhNode* %61, i32 %i.0150, i32 3 ; [#uses=1]
- store i32 %62, i32* %scevgep184, align 4
- %63 = load %struct.btOptimizedBvhNode** %48, align 4 ; [#uses=1]
- %64 = load i32* %scevgep164, align 4 ; [#uses=1]
- %scevgep185 = getelementptr %struct.btOptimizedBvhNode* %63, i32 %i.0150, i32 4 ; [#uses=1]
- store i32 %64, i32* %scevgep185, align 4
- %65 = add nsw i32 %i.0150, 1 ; [#uses=2]
- %exitcond161 = icmp eq i32 %65, %21 ; [#uses=1]
- br i1 %exitcond161, label %bb3, label %bb1
-
-bb3: ; preds = %bb1, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE6resizeEiRKS0_.exit
- %66 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 6 ; [#uses=1]
- %67 = load i32* %66, align 4 ; [#uses=7]
- %68 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=2]
- %69 = load i32* %68, align 4 ; [#uses=3]
- %70 = icmp slt i32 %69, %67 ; [#uses=1]
- br i1 %70, label %bb.nph.i81, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
-
-bb.nph.i81: ; preds = %bb3
- %71 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE7reserveEi(%struct.QuantizedNodeArray* %71, i32 %67) inlinehint
- %72 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %tmp.i80 = sub i32 %67, %69 ; [#uses=1]
- br label %bb7.i89
-
-bb7.i89: ; preds = %bb7.i89, %bb.nph.i81
- %indvar.i82 = phi i32 [ 0, %bb.nph.i81 ], [ %indvar.next.i87, %bb7.i89 ] ; [#uses=2]
- %tmp = add i32 %69, %indvar.i82 ; [#uses=1]
- %73 = load %struct.BT_QUANTIZED_BVH_NODE** %72, align 4 ; [#uses=1]
- %scevgep15.i84 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %73, i32 %tmp, i32 0, i32 0 ; [#uses=1]
- %indvar.next.i87 = add i32 %indvar.i82, 1 ; [#uses=2]
- %exitcond228 = icmp eq i32 %indvar.next.i87, %tmp.i80 ; [#uses=1]
- %scevgep15.i84237 = bitcast i16* %scevgep15.i84 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %scevgep15.i84237, i8 0, i64 16, i32 4, i1 false)
- br i1 %exitcond228, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit, label %bb7.i89
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit: ; preds = %bb7.i89, %bb3
- store i32 %67, i32* %68, align 4
- %74 = icmp eq i32 %67, 0 ; [#uses=1]
- %.not240 = xor i1 %74, true ; [#uses=1]
- %75 = icmp sgt i32 %67, 0 ; [#uses=1]
- %or.cond241 = and i1 %.not240, %75 ; [#uses=1]
- br i1 %or.cond241, label %bb.nph154, label %bb10
-
-bb.nph154: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
- %76 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 8 ; [#uses=1]
- %77 = load %struct.BT_QUANTIZED_BVH_NODE** %76, align 4 ; [#uses=7]
- %78 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=7]
- br label %bb8
-
-bb8: ; preds = %bb8, %bb.nph154
- %i7.0153 = phi i32 [ 0, %bb.nph154 ], [ %93, %bb8 ] ; [#uses=15]
- %scevgep195 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %77, i32 %i7.0153, i32 2 ; [#uses=1]
- %scevgep196 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %77, i32 %i7.0153, i32 1, i32 0 ; [#uses=1]
- %scevgep197 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %77, i32 %i7.0153, i32 1, i32 1 ; [#uses=1]
- %scevgep198 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %77, i32 %i7.0153, i32 1, i32 2 ; [#uses=1]
- %scevgep199200 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %77, i32 %i7.0153, i32 0, i32 0 ; [#uses=1]
- %scevgep201 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %77, i32 %i7.0153, i32 0, i32 1 ; [#uses=1]
- %scevgep202 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %77, i32 %i7.0153, i32 0, i32 2 ; [#uses=1]
- %79 = load %struct.BT_QUANTIZED_BVH_NODE** %78, align 4 ; [#uses=1]
- %80 = load i32* %scevgep195, align 4 ; [#uses=1]
- %scevgep187 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %79, i32 %i7.0153, i32 2 ; [#uses=1]
- store i32 %80, i32* %scevgep187, align 4
- %81 = load %struct.BT_QUANTIZED_BVH_NODE** %78, align 4 ; [#uses=1]
- %82 = load i16* %scevgep196, align 2 ; [#uses=1]
- %scevgep188 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %81, i32 %i7.0153, i32 1, i32 0 ; [#uses=1]
- store i16 %82, i16* %scevgep188, align 2
- %83 = load %struct.BT_QUANTIZED_BVH_NODE** %78, align 4 ; [#uses=1]
- %84 = load i16* %scevgep197, align 2 ; [#uses=1]
- %scevgep189 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %83, i32 %i7.0153, i32 1, i32 1 ; [#uses=1]
- store i16 %84, i16* %scevgep189, align 2
- %85 = load %struct.BT_QUANTIZED_BVH_NODE** %78, align 4 ; [#uses=1]
- %86 = load i16* %scevgep198, align 2 ; [#uses=1]
- %scevgep190 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %85, i32 %i7.0153, i32 1, i32 2 ; [#uses=1]
- store i16 %86, i16* %scevgep190, align 2
- %87 = load %struct.BT_QUANTIZED_BVH_NODE** %78, align 4 ; [#uses=1]
- %88 = load i16* %scevgep199200, align 2 ; [#uses=1]
- %scevgep191192 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %87, i32 %i7.0153, i32 0, i32 0 ; [#uses=1]
- store i16 %88, i16* %scevgep191192, align 2
- %89 = load %struct.BT_QUANTIZED_BVH_NODE** %78, align 4 ; [#uses=1]
- %90 = load i16* %scevgep201, align 2 ; [#uses=1]
- %scevgep193 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %89, i32 %i7.0153, i32 0, i32 1 ; [#uses=1]
- store i16 %90, i16* %scevgep193, align 2
- %91 = load %struct.BT_QUANTIZED_BVH_NODE** %78, align 4 ; [#uses=1]
- %92 = load i16* %scevgep202, align 2 ; [#uses=1]
- %scevgep194 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %91, i32 %i7.0153, i32 0, i32 2 ; [#uses=1]
- store i16 %92, i16* %scevgep194, align 2
- %93 = add nsw i32 %i7.0153, 1 ; [#uses=2]
- %exitcond186 = icmp eq i32 %93, %67 ; [#uses=1]
- br i1 %exitcond186, label %bb10, label %bb8
-
-bb10: ; preds = %bb8, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
- %94 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 10 ; [#uses=1]
- %95 = load i32* %94, align 4 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- store i32 %95, i32* %96, align 4
- %97 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 11 ; [#uses=1]
- %98 = load i32* %97, align 4 ; [#uses=10]
- %99 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=3]
- %100 = load i32* %99, align 4 ; [#uses=3]
- %101 = icmp sgt i32 %100, %98 ; [#uses=1]
- %.not242 = xor i1 %101, true ; [#uses=1]
- %102 = icmp slt i32 %100, %98 ; [#uses=1]
- %or.cond243 = and i1 %.not242, %102 ; [#uses=1]
- br i1 %or.cond243, label %bb4.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
-
-bb4.i: ; preds = %bb10
- %103 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=2]
- %104 = load i32* %103, align 4 ; [#uses=1]
- %105 = icmp slt i32 %104, %98 ; [#uses=1]
- br i1 %105, label %bb.i.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
-
-bb.i.i: ; preds = %bb4.i
- %106 = icmp eq i32 %98, 0 ; [#uses=1]
- br i1 %106, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %107 = shl i32 %98, 5 ; [#uses=1]
- %108 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %107, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %108 to %struct.btBvhSubtreeInfo* ; [#uses=1]
- %.pre.i = load i32* %99, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %109 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %100, %bb.i.i ] ; [#uses=2]
- %110 = phi %struct.btBvhSubtreeInfo* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %111 = icmp sgt i32 %109, 0 ; [#uses=1]
- br i1 %111, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %112 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep207 = getelementptr %struct.btBvhSubtreeInfo* %110, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep207 to i8* ; [#uses=1]
- %113 = load %struct.btBvhSubtreeInfo** %112, align 4 ; [#uses=1]
- %scevgep205 = getelementptr %struct.btBvhSubtreeInfo* %113, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep205 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 32, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond204 = icmp eq i32 %indvar.next.i.i.i, %109 ; [#uses=1]
- br i1 %exitcond204, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %114 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=3]
- %115 = load %struct.btBvhSubtreeInfo** %114, align 4 ; [#uses=2]
- %116 = icmp eq %struct.btBvhSubtreeInfo* %115, null ; [#uses=1]
- br i1 %116, label %bb8.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %117 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- %118 = load i8* %117, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %118, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %119 = bitcast %struct.btBvhSubtreeInfo* %115 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %119)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %114, align 4
- br label %bb8.preheader.i
-
-bb8.preheader.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %120 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %120, align 4
- store %struct.btBvhSubtreeInfo* %110, %struct.btBvhSubtreeInfo** %114, align 4
- store i32 %98, i32* %103, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit: ; preds = %bb8.preheader.i, %bb4.i, %bb10
- store i32 %98, i32* %99, align 4
- %121 = icmp eq i32 %98, 0 ; [#uses=1]
- %.not244 = xor i1 %121, true ; [#uses=1]
- %122 = icmp sgt i32 %98, 0 ; [#uses=1]
- %or.cond245 = and i1 %.not244, %122 ; [#uses=1]
- br i1 %or.cond245, label %bb.nph157, label %return
-
-bb.nph157: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
- %123 = getelementptr inbounds %struct.btQuantizedBvhFloatData* %quantizedBvhFloatData, i32 0, i32 9 ; [#uses=1]
- %124 = load %struct.btBvhSubtreeInfoData** %123, align 4 ; [#uses=8]
- %125 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=8]
- br label %bb15
-
-bb15: ; preds = %bb15, %bb.nph157
- %i14.0156 = phi i32 [ 0, %bb.nph157 ], [ %142, %bb15 ] ; [#uses=17]
- %scevgep219220 = getelementptr inbounds %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 0 ; [#uses=1]
- %scevgep221 = getelementptr %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 1 ; [#uses=1]
- %scevgep222 = getelementptr %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 3, i32 0 ; [#uses=1]
- %scevgep223 = getelementptr %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 3, i32 1 ; [#uses=1]
- %scevgep224 = getelementptr %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 3, i32 2 ; [#uses=1]
- %scevgep225 = getelementptr %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 2, i32 0 ; [#uses=1]
- %scevgep226 = getelementptr %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 2, i32 1 ; [#uses=1]
- %scevgep227 = getelementptr %struct.btBvhSubtreeInfoData* %124, i32 %i14.0156, i32 2, i32 2 ; [#uses=1]
- %126 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %127 = load i16* %scevgep222, align 2 ; [#uses=1]
- %scevgep210 = getelementptr %struct.btBvhSubtreeInfo* %126, i32 %i14.0156, i32 1, i32 0 ; [#uses=1]
- store i16 %127, i16* %scevgep210, align 2
- %128 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %129 = load i16* %scevgep223, align 2 ; [#uses=1]
- %scevgep211 = getelementptr %struct.btBvhSubtreeInfo* %128, i32 %i14.0156, i32 1, i32 1 ; [#uses=1]
- store i16 %129, i16* %scevgep211, align 2
- %130 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %131 = load i16* %scevgep224, align 2 ; [#uses=1]
- %scevgep212 = getelementptr %struct.btBvhSubtreeInfo* %130, i32 %i14.0156, i32 1, i32 2 ; [#uses=1]
- store i16 %131, i16* %scevgep212, align 2
- %132 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %133 = load i16* %scevgep225, align 2 ; [#uses=1]
- %scevgep213214 = getelementptr inbounds %struct.btBvhSubtreeInfo* %132, i32 %i14.0156, i32 0, i32 0 ; [#uses=1]
- store i16 %133, i16* %scevgep213214, align 2
- %134 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %135 = load i16* %scevgep226, align 2 ; [#uses=1]
- %scevgep215 = getelementptr %struct.btBvhSubtreeInfo* %134, i32 %i14.0156, i32 0, i32 1 ; [#uses=1]
- store i16 %135, i16* %scevgep215, align 2
- %136 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %137 = load i16* %scevgep227, align 2 ; [#uses=1]
- %scevgep216 = getelementptr %struct.btBvhSubtreeInfo* %136, i32 %i14.0156, i32 0, i32 2 ; [#uses=1]
- store i16 %137, i16* %scevgep216, align 2
- %138 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %139 = load i32* %scevgep219220, align 4 ; [#uses=1]
- %scevgep217 = getelementptr %struct.btBvhSubtreeInfo* %138, i32 %i14.0156, i32 2 ; [#uses=1]
- store i32 %139, i32* %scevgep217, align 4
- %140 = load %struct.btBvhSubtreeInfo** %125, align 4 ; [#uses=1]
- %141 = load i32* %scevgep221, align 4 ; [#uses=1]
- %scevgep218 = getelementptr %struct.btBvhSubtreeInfo* %140, i32 %i14.0156, i32 3 ; [#uses=1]
- store i32 %141, i32* %scevgep218, align 4
- %142 = add nsw i32 %i14.0156, 1 ; [#uses=2]
- %exitcond209 = icmp eq i32 %142, %98 ; [#uses=1]
- br i1 %exitcond209, label %return, label %bb15
-
-return: ; preds = %bb15, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6resizeEiRKS0_.exit
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvh20updateSubtreeHeadersEii(%struct.btQuantizedBvh* nocapture %this, i32 %leftChildNodexIndex, i32 %rightChildNodexIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %1 = load %struct.BT_QUANTIZED_BVH_NODE** %0, align 4 ; [#uses=14]
- %2 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %leftChildNodexIndex, i32 2 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = sub nsw i32 0, %3 ; [#uses=1]
- %toBool = icmp slt i32 %3, 0 ; [#uses=2]
- %. = select i1 %toBool, i32 %4, i32 1 ; [#uses=4]
- %iftmp.222.0 = select i1 %toBool, i32 %., i32 %. ; [#uses=0]
- %5 = shl i32 %., 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %rightChildNodexIndex, i32 2 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=2]
- %8 = sub nsw i32 0, %7 ; [#uses=1]
- %toBool3 = icmp slt i32 %7, 0 ; [#uses=2]
- %.104 = select i1 %toBool3, i32 %8, i32 1 ; [#uses=4]
- %iftmp.223.0 = select i1 %toBool3, i32 %.104, i32 %.104 ; [#uses=0]
- %9 = shl i32 %.104, 4 ; [#uses=1]
- %10 = icmp slt i32 %5, 2049 ; [#uses=1]
- br i1 %10, label %bb7, label %bb8
-
-bb7: ; preds = %entry
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=4]
- %12 = load i32* %11, align 4 ; [#uses=14]
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=2]
- %14 = load i32* %13, align 4 ; [#uses=2]
- %15 = icmp eq i32 %14, %12 ; [#uses=1]
- br i1 %15, label %bb.i16, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit38
-
-bb.i16: ; preds = %bb7
- %16 = icmp eq i32 %12, 0 ; [#uses=1]
- %17 = shl i32 %12, 1 ; [#uses=1]
- %iftmp.322.0.i.i15 = select i1 %16, i32 1, i32 %17 ; [#uses=4]
- %18 = icmp slt i32 %14, %iftmp.322.0.i.i15 ; [#uses=1]
- br i1 %18, label %bb.i.i17, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit38
-
-bb.i.i17: ; preds = %bb.i16
- %19 = icmp eq i32 %iftmp.322.0.i.i15, 0 ; [#uses=1]
- br i1 %19, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i21, label %bb.i2.i.i20
-
-bb.i2.i.i20: ; preds = %bb.i.i17
- %20 = shl i32 %iftmp.322.0.i.i15, 5 ; [#uses=1]
- %21 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %20, i32 16) ; [#uses=1]
- %phitmp.i.i18 = bitcast i8* %21 to %struct.btBvhSubtreeInfo* ; [#uses=1]
- %.pre.i19 = load i32* %11, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i21
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i21: ; preds = %bb.i2.i.i20, %bb.i.i17
- %22 = phi i32 [ %.pre.i19, %bb.i2.i.i20 ], [ %12, %bb.i.i17 ] ; [#uses=2]
- %23 = phi %struct.btBvhSubtreeInfo* [ %phitmp.i.i18, %bb.i2.i.i20 ], [ null, %bb.i.i17 ] ; [#uses=2]
- %24 = icmp sgt i32 %22, 0 ; [#uses=1]
- br i1 %24, label %bb.nph.i.i.i22, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i31
-
-bb.nph.i.i.i22: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i21
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- br label %bb.i4.i.i30
-
-bb.i4.i.i30: ; preds = %bb.i4.i.i30, %bb.nph.i.i.i22
- %indvar.i.i.i23 = phi i32 [ 0, %bb.nph.i.i.i22 ], [ %indvar.next.i.i.i28, %bb.i4.i.i30 ] ; [#uses=3]
- %scevgep102 = getelementptr %struct.btBvhSubtreeInfo* %23, i32 %indvar.i.i.i23 ; [#uses=1]
- %scevgep5.i.i.i25 = bitcast %struct.btBvhSubtreeInfo* %scevgep102 to i8* ; [#uses=1]
- %26 = load %struct.btBvhSubtreeInfo** %25, align 4 ; [#uses=1]
- %scevgep100 = getelementptr %struct.btBvhSubtreeInfo* %26, i32 %indvar.i.i.i23 ; [#uses=1]
- %scevgep67.i.i.i27 = bitcast %struct.btBvhSubtreeInfo* %scevgep100 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i25, i8* %scevgep67.i.i.i27, i32 32, i32 4, i1 false) nounwind
- %indvar.next.i.i.i28 = add i32 %indvar.i.i.i23, 1 ; [#uses=2]
- %exitcond99 = icmp eq i32 %indvar.next.i.i.i28, %22 ; [#uses=1]
- br i1 %exitcond99, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i31, label %bb.i4.i.i30
-
-_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i31: ; preds = %bb.i4.i.i30, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i21
- %27 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=3]
- %28 = load %struct.btBvhSubtreeInfo** %27, align 4 ; [#uses=2]
- %29 = icmp eq %struct.btBvhSubtreeInfo* %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i37, label %bb.i.i.i33
-
-bb.i.i.i33: ; preds = %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i31
- %30 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- %31 = load i8* %30, align 4 ; [#uses=1]
- %toBool.i.i.i32 = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i32, label %bb2.i.i.i35, label %bb1.i.i.i34
-
-bb1.i.i.i34: ; preds = %bb.i.i.i33
- %32 = bitcast %struct.btBvhSubtreeInfo* %28 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %32)
- br label %bb2.i.i.i35
-
-bb2.i.i.i35: ; preds = %bb1.i.i.i34, %bb.i.i.i33
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %27, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i37
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i37: ; preds = %bb2.i.i.i35, %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i31
- %33 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %33, align 4
- store %struct.btBvhSubtreeInfo* %23, %struct.btBvhSubtreeInfo** %27, align 4
- store i32 %iftmp.322.0.i.i15, i32* %13, align 4
- %.pre6.i36 = load i32* %11, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit38
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit38: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i37, %bb.i16, %bb7
- %34 = phi i32 [ %.pre6.i36, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i37 ], [ %12, %bb7 ], [ %12, %bb.i16 ] ; [#uses=1]
- %35 = add nsw i32 %34, 1 ; [#uses=1]
- store i32 %35, i32* %11, align 4
- %36 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- %37 = load %struct.btBvhSubtreeInfo** %36, align 4 ; [#uses=8]
- %38 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %leftChildNodexIndex, i32 0, i32 0 ; [#uses=1]
- %39 = load i16* %38, align 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 0, i32 0 ; [#uses=1]
- store i16 %39, i16* %40, align 2
- %41 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %leftChildNodexIndex, i32 0, i32 1 ; [#uses=1]
- %42 = load i16* %41, align 2 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 0, i32 1 ; [#uses=1]
- store i16 %42, i16* %43, align 2
- %44 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %leftChildNodexIndex, i32 0, i32 2 ; [#uses=1]
- %45 = load i16* %44, align 2 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 0, i32 2 ; [#uses=1]
- store i16 %45, i16* %46, align 2
- %47 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %leftChildNodexIndex, i32 1, i32 0 ; [#uses=1]
- %48 = load i16* %47, align 2 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 1, i32 0 ; [#uses=1]
- store i16 %48, i16* %49, align 2
- %50 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %leftChildNodexIndex, i32 1, i32 1 ; [#uses=1]
- %51 = load i16* %50, align 2 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 1, i32 1 ; [#uses=1]
- store i16 %51, i16* %52, align 2
- %53 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %leftChildNodexIndex, i32 1, i32 2 ; [#uses=1]
- %54 = load i16* %53, align 2 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 1, i32 2 ; [#uses=1]
- store i16 %54, i16* %55, align 2
- %56 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 2 ; [#uses=1]
- store i32 %leftChildNodexIndex, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btBvhSubtreeInfo* %37, i32 %12, i32 3 ; [#uses=1]
- store i32 %., i32* %57, align 4
- br label %bb8
-
-bb8: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit38, %entry
- %58 = icmp slt i32 %9, 2049 ; [#uses=1]
- br i1 %58, label %bb9, label %bb11
-
-bb9: ; preds = %bb8
- %59 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=4]
- %60 = load i32* %59, align 4 ; [#uses=14]
- %61 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=2]
- %62 = load i32* %61, align 4 ; [#uses=2]
- %63 = icmp eq i32 %62, %60 ; [#uses=1]
- br i1 %63, label %bb.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit
-
-bb.i: ; preds = %bb9
- %64 = icmp eq i32 %60, 0 ; [#uses=1]
- %65 = shl i32 %60, 1 ; [#uses=1]
- %iftmp.322.0.i.i = select i1 %64, i32 1, i32 %65 ; [#uses=4]
- %66 = icmp slt i32 %62, %iftmp.322.0.i.i ; [#uses=1]
- br i1 %66, label %bb.i.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit
-
-bb.i.i: ; preds = %bb.i
- %67 = icmp eq i32 %iftmp.322.0.i.i, 0 ; [#uses=1]
- br i1 %67, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %68 = shl i32 %iftmp.322.0.i.i, 5 ; [#uses=1]
- %69 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %68, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %69 to %struct.btBvhSubtreeInfo* ; [#uses=1]
- %.pre.i = load i32* %59, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %70 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %60, %bb.i.i ] ; [#uses=2]
- %71 = phi %struct.btBvhSubtreeInfo* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %72 = icmp sgt i32 %70, 0 ; [#uses=1]
- br i1 %72, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %73 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep97 = getelementptr %struct.btBvhSubtreeInfo* %71, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep97 to i8* ; [#uses=1]
- %74 = load %struct.btBvhSubtreeInfo** %73, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btBvhSubtreeInfo* %74, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 32, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %70 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %75 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=3]
- %76 = load %struct.btBvhSubtreeInfo** %75, align 4 ; [#uses=2]
- %77 = icmp eq %struct.btBvhSubtreeInfo* %76, null ; [#uses=1]
- br i1 %77, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %78 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- %79 = load i8* %78, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %79, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %80 = bitcast %struct.btBvhSubtreeInfo* %76 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %80)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %75, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %81 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %81, align 4
- store %struct.btBvhSubtreeInfo* %71, %struct.btBvhSubtreeInfo** %75, align 4
- store i32 %iftmp.322.0.i.i, i32* %61, align 4
- %.pre6.i = load i32* %59, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i, %bb.i, %bb9
- %82 = phi i32 [ %.pre6.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i ], [ %60, %bb9 ], [ %60, %bb.i ] ; [#uses=1]
- %83 = add nsw i32 %82, 1 ; [#uses=1]
- store i32 %83, i32* %59, align 4
- %84 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- %85 = load %struct.btBvhSubtreeInfo** %84, align 4 ; [#uses=8]
- %86 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %rightChildNodexIndex, i32 0, i32 0 ; [#uses=1]
- %87 = load i16* %86, align 2 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 0, i32 0 ; [#uses=1]
- store i16 %87, i16* %88, align 2
- %89 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %rightChildNodexIndex, i32 0, i32 1 ; [#uses=1]
- %90 = load i16* %89, align 2 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 0, i32 1 ; [#uses=1]
- store i16 %90, i16* %91, align 2
- %92 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %rightChildNodexIndex, i32 0, i32 2 ; [#uses=1]
- %93 = load i16* %92, align 2 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 0, i32 2 ; [#uses=1]
- store i16 %93, i16* %94, align 2
- %95 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %rightChildNodexIndex, i32 1, i32 0 ; [#uses=1]
- %96 = load i16* %95, align 2 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 1, i32 0 ; [#uses=1]
- store i16 %96, i16* %97, align 2
- %98 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %rightChildNodexIndex, i32 1, i32 1 ; [#uses=1]
- %99 = load i16* %98, align 2 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 1, i32 1 ; [#uses=1]
- store i16 %99, i16* %100, align 2
- %101 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %rightChildNodexIndex, i32 1, i32 2 ; [#uses=1]
- %102 = load i16* %101, align 2 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 1, i32 2 ; [#uses=1]
- store i16 %102, i16* %103, align 2
- %104 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 2 ; [#uses=1]
- store i32 %rightChildNodexIndex, i32* %104, align 4
- %105 = getelementptr inbounds %struct.btBvhSubtreeInfo* %85, i32 %60, i32 3 ; [#uses=1]
- store i32 %.104, i32* %105, align 4
- br label %bb11
-
-bb11: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit, %bb8
- %106 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- %107 = load i32* %106, align 4 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 13 ; [#uses=1]
- store i32 %107, i32* %108, align 4
- ret void
-}
-
-; [#uses=4]
-define void @_ZN14btQuantizedBvh9buildTreeEii(%struct.btQuantizedBvh* %this, i32 %startIndex, i32 %endIndex) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = sub nsw i32 %endIndex, %startIndex ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=10]
- %4 = load i32* %3, align 4 ; [#uses=9]
- %5 = icmp eq i32 %2, 1 ; [#uses=1]
- br i1 %5, label %bb, label %bb1
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %7 = load i8* %6, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %7, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %9 = load %struct.BT_QUANTIZED_BVH_NODE** %8, align 4 ; [#uses=7]
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- %11 = load %struct.BT_QUANTIZED_BVH_NODE** %10, align 4 ; [#uses=7]
- %12 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %4, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %startIndex, i32 0, i32 0 ; [#uses=1]
- %14 = load i16* %13, align 4 ; [#uses=1]
- store i16 %14, i16* %12, align 4
- %15 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %4, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %startIndex, i32 0, i32 1 ; [#uses=1]
- %17 = load i16* %16, align 2 ; [#uses=1]
- store i16 %17, i16* %15, align 2
- %18 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %4, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %startIndex, i32 0, i32 2 ; [#uses=1]
- %20 = load i16* %19, align 4 ; [#uses=1]
- store i16 %20, i16* %18, align 4
- %21 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %4, i32 1, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %startIndex, i32 1, i32 0 ; [#uses=1]
- %23 = load i16* %22, align 2 ; [#uses=1]
- store i16 %23, i16* %21, align 2
- %24 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %4, i32 1, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %startIndex, i32 1, i32 1 ; [#uses=1]
- %26 = load i16* %25, align 2 ; [#uses=1]
- store i16 %26, i16* %24, align 2
- %27 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %4, i32 1, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %startIndex, i32 1, i32 2 ; [#uses=1]
- %29 = load i16* %28, align 2 ; [#uses=1]
- store i16 %29, i16* %27, align 2
- %30 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %4, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %11, i32 %startIndex, i32 2 ; [#uses=1]
- %32 = load i32* %31, align 4 ; [#uses=1]
- store i32 %32, i32* %30, align 4
- br label %_ZN14btQuantizedBvh30assignInternalNodeFromLeafNodeEii.exit
-
-bb1.i: ; preds = %bb
- %33 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %34 = load %struct.btOptimizedBvhNode** %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btOptimizedBvhNode* %34, i32 %4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=1]
- %37 = load %struct.btOptimizedBvhNode** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btOptimizedBvhNode* %37, i32 %startIndex ; [#uses=1]
- %39 = bitcast %struct.btOptimizedBvhNode* %35 to i8* ; [#uses=1]
- %40 = bitcast %struct.btOptimizedBvhNode* %38 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %39, i8* %40, i32 64, i32 4, i1 false) nounwind
- br label %_ZN14btQuantizedBvh30assignInternalNodeFromLeafNodeEii.exit
-
-_ZN14btQuantizedBvh30assignInternalNodeFromLeafNodeEii.exit: ; preds = %bb1.i, %bb.i
- %41 = load i32* %3, align 4 ; [#uses=1]
- %42 = add nsw i32 %41, 1 ; [#uses=1]
- store i32 %42, i32* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- %43 = call i32 @_ZN14btQuantizedBvh17calcSplittingAxisEii(%struct.btQuantizedBvh* %this, i32 %startIndex, i32 %endIndex) ; [#uses=1]
- %44 = call i32 @_ZN14btQuantizedBvh25sortAndCalcSplittingIndexEiii(%struct.btQuantizedBvh* %this, i32 %startIndex, i32 %endIndex, i32 %43) ; [#uses=2]
- %45 = load i32* %3, align 4 ; [#uses=9]
- %46 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=5]
- %47 = load i8* %46, align 4 ; [#uses=1]
- %toBool.i9 = icmp eq i8 %47, 0 ; [#uses=1]
- br i1 %toBool.i9, label %bb1.i11, label %bb.i10
-
-bb.i10: ; preds = %bb1
- %48 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %49 = load %struct.BT_QUANTIZED_BVH_NODE** %48, align 4 ; [#uses=3]
- %50 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %49, i32 %45, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fsub float %52, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = fsub float %57, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fsub float %62, %64 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fmul float %55, %67 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %71 = fmul float %60, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fmul float %65, %73 ; [#uses=1]
- %75 = fptoui float %74 to i16 ; [#uses=1]
- %76 = and i16 %75, -2 ; [#uses=1]
- store i16 %76, i16* %50, align 2
- %77 = fptoui float %71 to i16 ; [#uses=1]
- %78 = and i16 %77, -2 ; [#uses=1]
- %79 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %49, i32 %45, i32 0, i32 1 ; [#uses=1]
- store i16 %78, i16* %79, align 2
- %80 = fptoui float %68 to i16 ; [#uses=1]
- %81 = and i16 %80, -2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %49, i32 %45, i32 0, i32 2 ; [#uses=1]
- store i16 %81, i16* %82, align 2
- br label %_ZN14btQuantizedBvh22setInternalNodeAabbMinEiRK9btVector3.exit
-
-bb1.i11: ; preds = %bb1
- %83 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %84 = load %struct.btOptimizedBvhNode** %83, align 4 ; [#uses=4]
- %85 = getelementptr inbounds %struct.btOptimizedBvhNode* %84, i32 %45, i32 0, i32 0, i32 0 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 4
- %88 = getelementptr inbounds %struct.btOptimizedBvhNode* %84, i32 %45, i32 0, i32 0, i32 1 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.btOptimizedBvhNode* %84, i32 %45, i32 0, i32 0, i32 2 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %struct.btOptimizedBvhNode* %84, i32 %45, i32 0, i32 0, i32 3 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- br label %_ZN14btQuantizedBvh22setInternalNodeAabbMinEiRK9btVector3.exit
-
-_ZN14btQuantizedBvh22setInternalNodeAabbMinEiRK9btVector3.exit: ; preds = %bb1.i11, %bb.i10
- %97 = load i32* %3, align 4 ; [#uses=7]
- %98 = load i8* %46, align 4 ; [#uses=1]
- %toBool.i12 = icmp eq i8 %98, 0 ; [#uses=1]
- br i1 %toBool.i12, label %bb1.i14, label %bb.i13
-
-bb.i13: ; preds = %_ZN14btQuantizedBvh22setInternalNodeAabbMinEiRK9btVector3.exit
- %99 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %100 = load %struct.BT_QUANTIZED_BVH_NODE** %99, align 4 ; [#uses=3]
- %101 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %100, i32 %97, i32 1, i32 0 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=2]
- %104 = fsub float %103, %103 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=2]
- %107 = fsub float %106, %106 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=2]
- %110 = fsub float %109, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fmul float %104, %112 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = fmul float %107, %115 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fmul float %110, %118 ; [#uses=1]
- %120 = fadd float %119, 1.000000e+00 ; [#uses=1]
- %121 = fptoui float %120 to i16 ; [#uses=1]
- %122 = or i16 %121, 1 ; [#uses=1]
- store i16 %122, i16* %101, align 2
- %123 = fadd float %116, 1.000000e+00 ; [#uses=1]
- %124 = fptoui float %123 to i16 ; [#uses=1]
- %125 = or i16 %124, 1 ; [#uses=1]
- %126 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %100, i32 %97, i32 1, i32 1 ; [#uses=1]
- store i16 %125, i16* %126, align 2
- %127 = fadd float %113, 1.000000e+00 ; [#uses=1]
- %128 = fptoui float %127 to i16 ; [#uses=1]
- %129 = or i16 %128, 1 ; [#uses=1]
- %130 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %100, i32 %97, i32 1, i32 2 ; [#uses=1]
- store i16 %129, i16* %130, align 2
- br label %bb3.preheader
-
-bb1.i14: ; preds = %_ZN14btQuantizedBvh22setInternalNodeAabbMinEiRK9btVector3.exit
- %131 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %132 = load %struct.btOptimizedBvhNode** %131, align 4 ; [#uses=4]
- %133 = getelementptr inbounds %struct.btOptimizedBvhNode* %132, i32 %97, i32 1, i32 0, i32 0 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- store float %135, float* %133, align 4
- %136 = getelementptr inbounds %struct.btOptimizedBvhNode* %132, i32 %97, i32 1, i32 0, i32 1 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- store float %138, float* %136, align 4
- %139 = getelementptr inbounds %struct.btOptimizedBvhNode* %132, i32 %97, i32 1, i32 0, i32 2 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- store float %141, float* %139, align 4
- %142 = getelementptr inbounds %struct.btOptimizedBvhNode* %132, i32 %97, i32 1, i32 0, i32 3 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=1]
- store float %144, float* %142, align 4
- br label %bb3.preheader
-
-bb3.preheader: ; preds = %bb1.i14, %bb.i13
- %145 = icmp slt i32 %startIndex, %endIndex ; [#uses=1]
- br i1 %145, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %bb3.preheader
- %146 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=2]
- %147 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=2]
- %148 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=2]
- %149 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=2]
- %150 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=2]
- %151 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=2]
- %152 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=2]
- %153 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=2]
- %154 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=2]
- %155 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=2]
- %156 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %157 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %158 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %159 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %160 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %161 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- br label %bb2
-
-bb2: ; preds = %_ZNK14btQuantizedBvh10getAabbMinEi.exit, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %_ZNK14btQuantizedBvh10getAabbMinEi.exit ] ; [#uses=2]
- %tmp25 = add i32 %indvar, %startIndex ; [#uses=14]
- %162 = load i8* %46, align 4 ; [#uses=1]
- %toBool.i15 = icmp eq i8 %162, 0 ; [#uses=1]
- br i1 %toBool.i15, label %bb1.i20, label %bb.i19
-
-bb.i19: ; preds = %bb2
- %163 = load %struct.BT_QUANTIZED_BVH_NODE** %155, align 4 ; [#uses=3]
- %scevgep26 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %163, i32 %tmp25, i32 1, i32 2 ; [#uses=1]
- %164 = load i16* %scevgep26, align 2 ; [#uses=1]
- %165 = uitofp i16 %164 to float ; [#uses=1]
- %166 = load float* %156, align 4 ; [#uses=1]
- %167 = fdiv float %165, %166 ; [#uses=1]
- %scevgep27 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %163, i32 %tmp25, i32 1, i32 1 ; [#uses=1]
- %168 = load i16* %scevgep27, align 2 ; [#uses=1]
- %169 = uitofp i16 %168 to float ; [#uses=1]
- %170 = load float* %157, align 4 ; [#uses=1]
- %171 = fdiv float %169, %170 ; [#uses=1]
- %scevgep = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %163, i32 %tmp25, i32 1, i32 0 ; [#uses=1]
- %172 = load i16* %scevgep, align 2 ; [#uses=1]
- %173 = uitofp i16 %172 to float ; [#uses=1]
- %174 = load float* %158, align 4 ; [#uses=1]
- %175 = fdiv float %173, %174 ; [#uses=1]
- store float 0.000000e+00, float* %150, align 4
- %176 = load float* %159, align 4 ; [#uses=1]
- %177 = fadd float %175, %176 ; [#uses=1]
- store float %177, float* %147, align 8
- %178 = load float* %160, align 4 ; [#uses=1]
- %179 = fadd float %171, %178 ; [#uses=1]
- store float %179, float* %148, align 4
- %180 = load float* %161, align 4 ; [#uses=1]
- %181 = fadd float %167, %180 ; [#uses=1]
- store float %181, float* %149, align 8
- %182 = load %struct.BT_QUANTIZED_BVH_NODE** %155, align 4 ; [#uses=3]
- %scevgep34 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %182, i32 %tmp25, i32 0, i32 2 ; [#uses=1]
- %183 = load i16* %scevgep34, align 2 ; [#uses=1]
- %184 = uitofp i16 %183 to float ; [#uses=1]
- %185 = load float* %156, align 4 ; [#uses=1]
- %186 = fdiv float %184, %185 ; [#uses=1]
- %scevgep35 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %182, i32 %tmp25, i32 0, i32 1 ; [#uses=1]
- %187 = load i16* %scevgep35, align 2 ; [#uses=1]
- %188 = uitofp i16 %187 to float ; [#uses=1]
- %189 = load float* %157, align 4 ; [#uses=1]
- %190 = fdiv float %188, %189 ; [#uses=1]
- %scevgep3233 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %182, i32 %tmp25, i32 0, i32 0 ; [#uses=1]
- %191 = load i16* %scevgep3233, align 2 ; [#uses=1]
- %192 = uitofp i16 %191 to float ; [#uses=1]
- %193 = load float* %158, align 4 ; [#uses=1]
- %194 = fdiv float %192, %193 ; [#uses=1]
- store float 0.000000e+00, float* %154, align 4
- %195 = load float* %159, align 4 ; [#uses=1]
- %196 = fadd float %194, %195 ; [#uses=1]
- store float %196, float* %151, align 8
- %197 = load float* %160, align 4 ; [#uses=1]
- %198 = fadd float %190, %197 ; [#uses=1]
- store float %198, float* %152, align 4
- %199 = load float* %161, align 4 ; [#uses=1]
- %200 = fadd float %186, %199 ; [#uses=1]
- store float %200, float* %153, align 8
- br label %_ZNK14btQuantizedBvh10getAabbMinEi.exit
-
-bb1.i20: ; preds = %bb2
- %201 = load %struct.btOptimizedBvhNode** %146, align 4 ; [#uses=4]
- %scevgep28 = getelementptr %struct.btOptimizedBvhNode* %201, i32 %tmp25, i32 1, i32 0, i32 0 ; [#uses=1]
- %202 = load float* %scevgep28, align 4 ; [#uses=1]
- store float %202, float* %147, align 8
- %scevgep29 = getelementptr %struct.btOptimizedBvhNode* %201, i32 %tmp25, i32 1, i32 0, i32 1 ; [#uses=1]
- %203 = load float* %scevgep29, align 4 ; [#uses=1]
- store float %203, float* %148, align 4
- %scevgep30 = getelementptr %struct.btOptimizedBvhNode* %201, i32 %tmp25, i32 1, i32 0, i32 2 ; [#uses=1]
- %204 = load float* %scevgep30, align 4 ; [#uses=1]
- store float %204, float* %149, align 8
- %scevgep31 = getelementptr %struct.btOptimizedBvhNode* %201, i32 %tmp25, i32 1, i32 0, i32 3 ; [#uses=1]
- %205 = load float* %scevgep31, align 4 ; [#uses=1]
- store float %205, float* %150, align 4
- %206 = load %struct.btOptimizedBvhNode** %146, align 4 ; [#uses=4]
- %scevgep3637 = getelementptr inbounds %struct.btOptimizedBvhNode* %206, i32 %tmp25, i32 0, i32 0, i32 0 ; [#uses=1]
- %207 = load float* %scevgep3637, align 4 ; [#uses=1]
- store float %207, float* %151, align 8
- %scevgep38 = getelementptr %struct.btOptimizedBvhNode* %206, i32 %tmp25, i32 0, i32 0, i32 1 ; [#uses=1]
- %208 = load float* %scevgep38, align 4 ; [#uses=1]
- store float %208, float* %152, align 4
- %scevgep39 = getelementptr %struct.btOptimizedBvhNode* %206, i32 %tmp25, i32 0, i32 0, i32 2 ; [#uses=1]
- %209 = load float* %scevgep39, align 4 ; [#uses=1]
- store float %209, float* %153, align 8
- %scevgep40 = getelementptr %struct.btOptimizedBvhNode* %206, i32 %tmp25, i32 0, i32 0, i32 3 ; [#uses=1]
- %210 = load float* %scevgep40, align 4 ; [#uses=1]
- store float %210, float* %154, align 4
- br label %_ZNK14btQuantizedBvh10getAabbMinEi.exit
-
-_ZNK14btQuantizedBvh10getAabbMinEi.exit: ; preds = %bb1.i20, %bb.i19
- %211 = load i32* %3, align 4 ; [#uses=1]
- call void @_ZN14btQuantizedBvh21mergeInternalNodeAabbEiRK9btVector3S2_(%struct.btQuantizedBvh* %this, i32 %211, %struct.btQuadWord* %0, %struct.btQuadWord* %1)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %2 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %_ZNK14btQuantizedBvh10getAabbMinEi.exit, %bb3.preheader
- %212 = load i32* %3, align 4 ; [#uses=1]
- %213 = add nsw i32 %212, 1 ; [#uses=2]
- store i32 %213, i32* %3, align 4
- call void @_ZN14btQuantizedBvh9buildTreeEii(%struct.btQuantizedBvh* %this, i32 %startIndex, i32 %44)
- %214 = load i32* %3, align 4 ; [#uses=1]
- call void @_ZN14btQuantizedBvh9buildTreeEii(%struct.btQuantizedBvh* %this, i32 %44, i32 %endIndex)
- %215 = load i32* %3, align 4 ; [#uses=1]
- %216 = sub nsw i32 %215, %4 ; [#uses=3]
- %217 = load i8* %46, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %217, 0 ; [#uses=1]
- br i1 %toBool, label %bb1.i23, label %bb5
-
-bb5: ; preds = %bb4
- %218 = shl i32 %216, 4 ; [#uses=1]
- %219 = icmp sgt i32 %218, 2048 ; [#uses=1]
- br i1 %219, label %bb7, label %bb.i22
-
-bb7: ; preds = %bb5
- call void @_ZN14btQuantizedBvh20updateSubtreeHeadersEii(%struct.btQuantizedBvh* %this, i32 %213, i32 %214)
- %.pre = load i8* %46, align 4 ; [#uses=1]
- %toBool.i21 = icmp eq i8 %.pre, 0 ; [#uses=1]
- br i1 %toBool.i21, label %bb1.i23, label %bb.i22
-
-bb.i22: ; preds = %bb7, %bb5
- %220 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %221 = load %struct.BT_QUANTIZED_BVH_NODE** %220, align 4 ; [#uses=1]
- %222 = sub nsw i32 0, %216 ; [#uses=1]
- %223 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %221, i32 %45, i32 2 ; [#uses=1]
- store i32 %222, i32* %223, align 4
- ret void
-
-bb1.i23: ; preds = %bb7, %bb4
- %224 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %225 = load %struct.btOptimizedBvhNode** %224, align 4 ; [#uses=1]
- %226 = getelementptr inbounds %struct.btOptimizedBvhNode* %225, i32 %45, i32 2 ; [#uses=1]
- store i32 %216, i32* %226, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvh13buildInternalEv(%struct.btQuantizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=2]
- store i8 1, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=2]
- %3 = shl i32 %2, 1 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = icmp slt i32 %5, %3 ; [#uses=1]
- br i1 %6, label %bb.nph.i, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
-
-bb.nph.i: ; preds = %entry
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE7reserveEi(%struct.QuantizedNodeArray* %7, i32 %3) inlinehint
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %tmp61 = sub i32 %3, %5 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb7.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb7.i ] ; [#uses=2]
- %tmp63 = add i32 %5, %indvar.i ; [#uses=1]
- %9 = load %struct.BT_QUANTIZED_BVH_NODE** %8, align 4 ; [#uses=1]
- %scevgep15.i = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %tmp63, i32 0, i32 0 ; [#uses=1]
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond62 = icmp eq i32 %indvar.next.i, %tmp61 ; [#uses=1]
- %scevgep15.i72 = bitcast i16* %scevgep15.i to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %scevgep15.i72, i8 0, i64 16, i32 4, i1 false)
- br i1 %exitcond62, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit: ; preds = %bb7.i, %entry
- store i32 %3, i32* %4, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- store i32 0, i32* %10, align 4
- tail call void @_ZN14btQuantizedBvh9buildTreeEii(%struct.btQuantizedBvh* %this, i32 0, i32 %2)
- %11 = load i8* %0, align 4 ; [#uses=1]
- %toBool2not = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool2not, label %bb16, label %bb6
-
-bb6: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=4]
- %13 = load i32* %12, align 4 ; [#uses=10]
- %14 = icmp eq i32 %13, 0 ; [#uses=1]
- br i1 %14, label %bb11, label %bb16
-
-bb11: ; preds = %bb6
- %15 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=2]
- %16 = load i32* %15, align 4 ; [#uses=2]
- %17 = icmp eq i32 %16, %13 ; [#uses=1]
- %18 = icmp slt i32 %16, 1 ; [#uses=1]
- %or.cond = and i1 %17, %18 ; [#uses=1]
- br i1 %or.cond, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i: ; preds = %bb11
- %19 = tail call i8* @_Z22btAlignedAllocInternalji(i32 32, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %19 to %struct.btBvhSubtreeInfo* ; [#uses=2]
- %.pre.i = load i32* %12, align 4 ; [#uses=2]
- %20 = icmp sgt i32 %.pre.i, 0 ; [#uses=1]
- br i1 %20, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %21 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep59 = getelementptr %struct.btBvhSubtreeInfo* %phitmp.i.i, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep59 to i8* ; [#uses=1]
- %22 = load %struct.btBvhSubtreeInfo** %21, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btBvhSubtreeInfo* %22, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 32, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %.pre.i ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %23 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=3]
- %24 = load %struct.btBvhSubtreeInfo** %23, align 4 ; [#uses=2]
- %25 = icmp eq %struct.btBvhSubtreeInfo* %24, null ; [#uses=1]
- br i1 %25, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- %27 = load i8* %26, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %28 = bitcast %struct.btBvhSubtreeInfo* %24 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %28)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %23, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %29 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %29, align 4
- store %struct.btBvhSubtreeInfo* %phitmp.i.i, %struct.btBvhSubtreeInfo** %23, align 4
- store i32 1, i32* %15, align 4
- %.pre6.i = load i32* %12, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i, %bb11
- %30 = phi i32 [ %.pre6.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i ], [ 0, %bb11 ] ; [#uses=1]
- %31 = add nsw i32 %30, 1 ; [#uses=1]
- store i32 %31, i32* %12, align 4
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- %33 = load %struct.btBvhSubtreeInfo** %32, align 4 ; [#uses=8]
- %34 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=2]
- %35 = load %struct.BT_QUANTIZED_BVH_NODE** %34, align 4 ; [#uses=6]
- %36 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %35, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = load i16* %36, align 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 0, i32 0 ; [#uses=1]
- store i16 %37, i16* %38, align 2
- %39 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %35, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = load i16* %39, align 2 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 0, i32 1 ; [#uses=1]
- store i16 %40, i16* %41, align 2
- %42 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %35, i32 0, i32 0, i32 2 ; [#uses=1]
- %43 = load i16* %42, align 2 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 0, i32 2 ; [#uses=1]
- store i16 %43, i16* %44, align 2
- %45 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %35, i32 0, i32 1, i32 0 ; [#uses=1]
- %46 = load i16* %45, align 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 1, i32 0 ; [#uses=1]
- store i16 %46, i16* %47, align 2
- %48 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %35, i32 0, i32 1, i32 1 ; [#uses=1]
- %49 = load i16* %48, align 2 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 1, i32 1 ; [#uses=1]
- store i16 %49, i16* %50, align 2
- %51 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %35, i32 0, i32 1, i32 2 ; [#uses=1]
- %52 = load i16* %51, align 2 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 1, i32 2 ; [#uses=1]
- store i16 %52, i16* %53, align 2
- %54 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 2 ; [#uses=1]
- store i32 0, i32* %54, align 4
- %55 = load %struct.BT_QUANTIZED_BVH_NODE** %34, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %55, i32 0, i32 2 ; [#uses=1]
- %57 = load i32* %56, align 4 ; [#uses=2]
- %58 = sub nsw i32 0, %57 ; [#uses=1]
- %toBool12 = icmp slt i32 %57, 0 ; [#uses=2]
- %. = select i1 %toBool12, i32 %58, i32 1 ; [#uses=3]
- %iftmp.221.0 = select i1 %toBool12, i32 %., i32 %. ; [#uses=0]
- %59 = getelementptr inbounds %struct.btBvhSubtreeInfo* %33, i32 %13, i32 3 ; [#uses=1]
- store i32 %., i32* %59, align 4
- br label %bb16
-
-bb16: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit, %bb6, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE6resizeEiRKS0_.exit
- %60 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- %61 = load i32* %60, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 13 ; [#uses=1]
- store i32 %61, i32* %62, align 4
- %63 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %64 = load %struct.BT_QUANTIZED_BVH_NODE** %63, align 4 ; [#uses=2]
- %65 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %64, null ; [#uses=1]
- br i1 %65, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit, label %bb.i.i18
-
-bb.i.i18: ; preds = %bb16
- %66 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %67 = load i8* %66, align 4 ; [#uses=1]
- %toBool.i.i17 = icmp eq i8 %67, 0 ; [#uses=1]
- br i1 %toBool.i.i17, label %bb2.i.i20, label %bb1.i.i19
-
-bb1.i.i19: ; preds = %bb.i.i18
- %68 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %64 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %68)
- br label %bb2.i.i20
-
-bb2.i.i20: ; preds = %bb1.i.i19, %bb.i.i18
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %63, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit: ; preds = %bb2.i.i20, %bb16
- %69 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %69, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %63, align 4
- store i32 0, i32* %1, align 4
- %70 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %70, align 4
- %71 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=3]
- %72 = load %struct.btOptimizedBvhNode** %71, align 4 ; [#uses=2]
- %73 = icmp eq %struct.btOptimizedBvhNode* %72, null ; [#uses=1]
- br i1 %73, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit
- %74 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- %75 = load i8* %74, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %75, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %76 = bitcast %struct.btOptimizedBvhNode* %72 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %76)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %71, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE5clearEv.exit
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE5clearEv.exit: ; preds = %bb2.i.i, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit
- %77 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %77, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %71, align 4
- %78 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %78, align 4
- %79 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %79, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btQuantizedBvhC2ERS_b(%struct.btQuantizedBvh* %this, %struct.btQuantizedBvh* nocapture %self, i8 zeroext %unnamed_arg) align 2 {
-return:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 4 ; [#uses=1]
- store i32 277, i32* %37, align 4
- %38 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %38, align 4
- %39 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %39, align 4
- %40 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %40, align 4
- %41 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %41, align 4
- %42 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %42, align 4
- %43 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %43, align 4
- %44 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %44, align 4
- %45 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- %47 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %47, align 4
- %48 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %48, align 4
- %49 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %49, align 4
- %50 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %50, align 4
- %51 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %51, align 4
- %52 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %52, align 4
- %53 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %53, align 4
- %54 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %54, align 4
- %55 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %55, align 4
- %56 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvhD1Ev(%struct.btQuantizedBvh* nocapture %this) align 2 {
-entry:
- tail call void @_ZN14btQuantizedBvhD2Ev(%struct.btQuantizedBvh* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvhD0Ev(%struct.btQuantizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=3]
- %2 = load %struct.btBvhSubtreeInfo** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btBvhSubtreeInfo* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btBvhSubtreeInfo* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad44
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %1, align 4
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %11 = load %struct.BT_QUANTIZED_BVH_NODE** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i73
-
-bb.i.i.i73: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i72 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i72, label %bb2.i.i.i75, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %bb.i.i.i73
- %15 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i75 unwind label %lpad40
-
-bb2.i.i.i75: ; preds = %bb1.i.i.i74, %bb.i.i.i73
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i75, %bb3
- %16 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %10, align 4
- %17 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %20 = load %struct.BT_QUANTIZED_BVH_NODE** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i78
-
-bb.i.i.i78: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i77 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i77, label %bb2.i.i.i80, label %bb1.i.i.i79
-
-bb1.i.i.i79: ; preds = %bb.i.i.i78
- %24 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i80 unwind label %lpad36
-
-bb2.i.i.i80: ; preds = %bb1.i.i.i79, %bb.i.i.i78
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i80, %bb10
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %29 = load %struct.btOptimizedBvhNode** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btOptimizedBvhNode* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i84
-
-bb.i.i.i84: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i83 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i83, label %bb2.i.i.i86, label %bb1.i.i.i85
-
-bb1.i.i.i85: ; preds = %bb.i.i.i84
- %33 = bitcast %struct.btOptimizedBvhNode* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i86 unwind label %lpad
-
-bb2.i.i.i86: ; preds = %bb1.i.i.i85, %bb.i.i.i84
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %28, align 4
- br label %bb28
-
-invcont26: ; preds = %bb2.i.i.i102, %ppad
- %34 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %59, align 4
- %35 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb28: ; preds = %bb2.i.i.i86, %bb19
- %37 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %28, align 4
- %38 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=3]
- %41 = load %struct.btOptimizedBvhNode** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btOptimizedBvhNode* %41, null ; [#uses=1]
- br i1 %42, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit92, label %bb.i.i.i89
-
-bb.i.i.i89: ; preds = %bb28
- %43 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i88 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i88, label %bb2.i.i.i91, label %bb1.i.i.i90
-
-bb1.i.i.i90: ; preds = %bb.i.i.i89
- %45 = bitcast %struct.btOptimizedBvhNode* %41 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %45)
- br label %bb2.i.i.i91
-
-bb2.i.i.i91: ; preds = %bb1.i.i.i90, %bb.i.i.i89
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %40, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit92
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit92: ; preds = %bb2.i.i.i91, %bb28
- %46 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %40, align 4
- %47 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %48, align 4
- %49 = bitcast %struct.btQuantizedBvh* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %49)
- ret void
-
-lpad: ; preds = %bb1.i.i.i85
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad36: ; preds = %bb1.i.i.i79
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad64
-
-lpad40: ; preds = %bb1.i.i.i74
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad65
-
-lpad44: ; preds = %bb1.i.i.i
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %50 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %51 = load %struct.BT_QUANTIZED_BVH_NODE** %50, align 4 ; [#uses=2]
- %52 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %51, null ; [#uses=1]
- br i1 %52, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98, label %bb.i.i.i94
-
-bb.i.i.i94: ; preds = %lpad44
- %53 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %54 = load i8* %53, align 4 ; [#uses=1]
- %toBool.i.i.i93 = icmp eq i8 %54, 0 ; [#uses=1]
- br i1 %toBool.i.i.i93, label %bb2.i.i.i96, label %bb1.i.i.i95
-
-bb1.i.i.i95: ; preds = %bb.i.i.i94
- %55 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %51 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %55)
- to label %bb2.i.i.i96 unwind label %lpad48
-
-bb2.i.i.i96: ; preds = %bb1.i.i.i95, %bb.i.i.i94
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %50, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98: ; preds = %bb2.i.i.i96, %lpad44
- %56 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %56, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %50, align 4
- %57 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %57, align 4
- %58 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %58, align 4
- br label %ppad65
-
-lpad48: ; preds = %bb1.i.i.i95
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad52: ; preds = %bb1.i.i.i113
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad56: ; preds = %bb1.i.i.i107
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %bb1.i.i.i101
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110 ] ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=3]
- %60 = load %struct.btOptimizedBvhNode** %59, align 4 ; [#uses=2]
- %61 = icmp eq %struct.btOptimizedBvhNode* %60, null ; [#uses=1]
- br i1 %61, label %invcont26, label %bb.i.i.i100
-
-bb.i.i.i100: ; preds = %ppad
- %62 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- %63 = load i8* %62, align 4 ; [#uses=1]
- %toBool.i.i.i99 = icmp eq i8 %63, 0 ; [#uses=1]
- br i1 %toBool.i.i.i99, label %bb2.i.i.i102, label %bb1.i.i.i101
-
-bb1.i.i.i101: ; preds = %bb.i.i.i100
- %64 = bitcast %struct.btOptimizedBvhNode* %60 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %64)
- to label %bb2.i.i.i102 unwind label %lpad60
-
-bb2.i.i.i102: ; preds = %bb1.i.i.i101, %bb.i.i.i100
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %59, align 4
- br label %invcont26
-
-ppad64: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116, %lpad36
- %eh_exception.1 = phi i8* [ %eh_ptr37, %lpad36 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116 ] ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %66 = load %struct.btOptimizedBvhNode** %65, align 4 ; [#uses=2]
- %67 = icmp eq %struct.btOptimizedBvhNode* %66, null ; [#uses=1]
- br i1 %67, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110, label %bb.i.i.i106
-
-bb.i.i.i106: ; preds = %ppad64
- %68 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %69 = load i8* %68, align 4 ; [#uses=1]
- %toBool.i.i.i105 = icmp eq i8 %69, 0 ; [#uses=1]
- br i1 %toBool.i.i.i105, label %bb2.i.i.i108, label %bb1.i.i.i107
-
-bb1.i.i.i107: ; preds = %bb.i.i.i106
- %70 = bitcast %struct.btOptimizedBvhNode* %66 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %70)
- to label %bb2.i.i.i108 unwind label %lpad56
-
-bb2.i.i.i108: ; preds = %bb1.i.i.i107, %bb.i.i.i106
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %65, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110: ; preds = %bb2.i.i.i108, %ppad64
- %71 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %71, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %65, align 4
- %72 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %72, align 4
- %73 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %73, align 4
- br label %ppad
-
-ppad65: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98, %lpad40
- %eh_exception.0 = phi i8* [ %eh_ptr41, %lpad40 ], [ %eh_ptr45, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98 ] ; [#uses=1]
- %74 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %75 = load %struct.BT_QUANTIZED_BVH_NODE** %74, align 4 ; [#uses=2]
- %76 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %75, null ; [#uses=1]
- br i1 %76, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116, label %bb.i.i.i112
-
-bb.i.i.i112: ; preds = %ppad65
- %77 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %78 = load i8* %77, align 4 ; [#uses=1]
- %toBool.i.i.i111 = icmp eq i8 %78, 0 ; [#uses=1]
- br i1 %toBool.i.i.i111, label %bb2.i.i.i114, label %bb1.i.i.i113
-
-bb1.i.i.i113: ; preds = %bb.i.i.i112
- %79 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %75 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %79)
- to label %bb2.i.i.i114 unwind label %lpad52
-
-bb2.i.i.i114: ; preds = %bb1.i.i.i113, %bb.i.i.i112
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %74, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116: ; preds = %bb2.i.i.i114, %ppad65
- %80 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %80, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %74, align 4
- %81 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %81, align 4
- %82 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %82, align 4
- br label %ppad64
-}
-
-; [#uses=2]
-define zeroext i8 @_ZNK14btQuantizedBvh9serializeEPvjb(%struct.btQuantizedBvh* %this, i8* %o_alignedDataBuffer, i32 %unnamed_arg, i8 zeroext %i_swapEndian) align 2 {
-bb1:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 13 ; [#uses=7]
- store i32 %1, i32* %2, align 4
- %3 = bitcast i8* %o_alignedDataBuffer to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %3, align 4
- %4 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 52 ; [#uses=1]
- %5 = bitcast i8* %4 to i32* ; [#uses=1]
- store i32 277, i32* %5, align 4
- %6 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 60 ; [#uses=2]
- store i8 0, i8* %6, align 4
- %7 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 80 ; [#uses=1]
- store i8 1, i8* %7, align 4
- %8 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 76 ; [#uses=1]
- %9 = bitcast i8* %8 to %struct.btOptimizedBvhNode** ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %9, align 4
- %10 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 68 ; [#uses=1]
- %11 = bitcast i8* %10 to i32* ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 72 ; [#uses=1]
- %13 = bitcast i8* %12 to i32* ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 100 ; [#uses=4]
- store i8 1, i8* %14, align 4
- %15 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 96 ; [#uses=1]
- %16 = bitcast i8* %15 to %struct.btOptimizedBvhNode** ; [#uses=15]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %16, align 4
- %17 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 88 ; [#uses=1]
- %18 = bitcast i8* %17 to i32* ; [#uses=3]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 92 ; [#uses=1]
- %20 = bitcast i8* %19 to i32* ; [#uses=3]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 120 ; [#uses=1]
- store i8 1, i8* %21, align 4
- %22 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 116 ; [#uses=1]
- %23 = bitcast i8* %22 to %struct.BT_QUANTIZED_BVH_NODE** ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %23, align 4
- %24 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 108 ; [#uses=1]
- %25 = bitcast i8* %24 to i32* ; [#uses=1]
- store i32 0, i32* %25, align 4
- %26 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 112 ; [#uses=1]
- %27 = bitcast i8* %26 to i32* ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 140 ; [#uses=4]
- store i8 1, i8* %28, align 4
- %29 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 136 ; [#uses=1]
- %30 = bitcast i8* %29 to %struct.BT_QUANTIZED_BVH_NODE** ; [#uses=19]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %30, align 4
- %31 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 128 ; [#uses=1]
- %32 = bitcast i8* %31 to i32* ; [#uses=3]
- store i32 0, i32* %32, align 4
- %33 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 132 ; [#uses=1]
- %34 = bitcast i8* %33 to i32* ; [#uses=3]
- store i32 0, i32* %34, align 4
- %35 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 144 ; [#uses=1]
- %36 = bitcast i8* %35 to i32* ; [#uses=3]
- store i32 0, i32* %36, align 4
- %37 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 164 ; [#uses=5]
- store i8 1, i8* %37, align 4
- %38 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 160 ; [#uses=1]
- %39 = bitcast i8* %38 to %struct.btBvhSubtreeInfo** ; [#uses=26]
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %39, align 4
- %40 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 152 ; [#uses=1]
- %41 = bitcast i8* %40 to i32* ; [#uses=3]
- store i32 0, i32* %41, align 4
- %42 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 156 ; [#uses=1]
- %43 = bitcast i8* %42 to i32* ; [#uses=3]
- store i32 0, i32* %43, align 4
- %44 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 168 ; [#uses=1]
- %45 = bitcast i8* %44 to i32* ; [#uses=2]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 4 ; [#uses=2]
- %47 = bitcast i8* %46 to float* ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %47, align 4
- %48 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 8 ; [#uses=2]
- %49 = bitcast i8* %48 to float* ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %49, align 4
- %50 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 12 ; [#uses=2]
- %51 = bitcast i8* %50 to float* ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %51, align 4
- %52 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 16 ; [#uses=2]
- %53 = bitcast i8* %52 to float* ; [#uses=2]
- store float 0.000000e+00, float* %53, align 4
- %54 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 20 ; [#uses=2]
- %55 = bitcast i8* %54 to float* ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %55, align 4
- %56 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 24 ; [#uses=2]
- %57 = bitcast i8* %56 to float* ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %57, align 4
- %58 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 28 ; [#uses=2]
- %59 = bitcast i8* %58 to float* ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %59, align 4
- %60 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 32 ; [#uses=2]
- %61 = bitcast i8* %60 to float* ; [#uses=2]
- store float 0.000000e+00, float* %61, align 4
- %toBool = icmp eq i8 %i_swapEndian, 0 ; [#uses=4]
- %62 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=2]
- %63 = load i32* %62, align 4 ; [#uses=2]
- br i1 %toBool, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %64 = tail call i32 @llvm.bswap.i32(i32 %63) nounwind ; [#uses=1]
- %65 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 56 ; [#uses=1]
- %66 = bitcast i8* %65 to i32* ; [#uses=1]
- store i32 %64, i32* %66, align 4
- %67 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1 ; [#uses=1]
- %uglygep.i = getelementptr i8* %o_alignedDataBuffer, i32 7 ; [#uses=1]
- %uglygep7.i = getelementptr i8* %o_alignedDataBuffer, i32 6 ; [#uses=1]
- %uglygep10.i = getelementptr i8* %o_alignedDataBuffer, i32 5 ; [#uses=1]
- %scevgep1314.i = bitcast %struct.btQuadWord* %67 to i8* ; [#uses=4]
- %uglygep17.i = getelementptr i8* %scevgep1314.i, i32 1 ; [#uses=1]
- %uglygep20.i = getelementptr i8* %scevgep1314.i, i32 2 ; [#uses=1]
- %uglygep23.i = getelementptr i8* %scevgep1314.i, i32 3 ; [#uses=1]
- %68 = load i8* %uglygep23.i, align 1 ; [#uses=1]
- store i8 %68, i8* %46, align 1
- %69 = load i8* %uglygep20.i, align 1 ; [#uses=1]
- store i8 %69, i8* %uglygep10.i, align 1
- %70 = load i8* %uglygep17.i, align 1 ; [#uses=1]
- store i8 %70, i8* %uglygep7.i, align 1
- %71 = load i8* %scevgep1314.i, align 1 ; [#uses=1]
- store i8 %71, i8* %uglygep.i, align 1
- %uglygep.1.i = getelementptr i8* %o_alignedDataBuffer, i32 11 ; [#uses=1]
- %uglygep7.1.i = getelementptr i8* %o_alignedDataBuffer, i32 10 ; [#uses=1]
- %uglygep10.1.i = getelementptr i8* %o_alignedDataBuffer, i32 9 ; [#uses=1]
- %scevgep13.1.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep1314.1.i = bitcast float* %scevgep13.1.i to i8* ; [#uses=4]
- %uglygep17.1.i = getelementptr i8* %scevgep1314.1.i, i32 1 ; [#uses=1]
- %uglygep20.1.i = getelementptr i8* %scevgep1314.1.i, i32 2 ; [#uses=1]
- %uglygep23.1.i = getelementptr i8* %scevgep1314.1.i, i32 3 ; [#uses=1]
- %72 = load i8* %uglygep23.1.i, align 1 ; [#uses=1]
- store i8 %72, i8* %48, align 1
- %73 = load i8* %uglygep20.1.i, align 1 ; [#uses=1]
- store i8 %73, i8* %uglygep10.1.i, align 1
- %74 = load i8* %uglygep17.1.i, align 1 ; [#uses=1]
- store i8 %74, i8* %uglygep7.1.i, align 1
- %75 = load i8* %scevgep1314.1.i, align 1 ; [#uses=1]
- store i8 %75, i8* %uglygep.1.i, align 1
- %uglygep.2.i = getelementptr i8* %o_alignedDataBuffer, i32 15 ; [#uses=1]
- %uglygep7.2.i = getelementptr i8* %o_alignedDataBuffer, i32 14 ; [#uses=1]
- %uglygep10.2.i = getelementptr i8* %o_alignedDataBuffer, i32 13 ; [#uses=1]
- %scevgep13.2.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep1314.2.i = bitcast float* %scevgep13.2.i to i8* ; [#uses=4]
- %uglygep17.2.i = getelementptr i8* %scevgep1314.2.i, i32 1 ; [#uses=1]
- %uglygep20.2.i = getelementptr i8* %scevgep1314.2.i, i32 2 ; [#uses=1]
- %uglygep23.2.i = getelementptr i8* %scevgep1314.2.i, i32 3 ; [#uses=1]
- %76 = load i8* %uglygep23.2.i, align 1 ; [#uses=1]
- store i8 %76, i8* %50, align 1
- %77 = load i8* %uglygep20.2.i, align 1 ; [#uses=1]
- store i8 %77, i8* %uglygep10.2.i, align 1
- %78 = load i8* %uglygep17.2.i, align 1 ; [#uses=1]
- store i8 %78, i8* %uglygep7.2.i, align 1
- %79 = load i8* %scevgep1314.2.i, align 1 ; [#uses=1]
- store i8 %79, i8* %uglygep.2.i, align 1
- %uglygep.3.i = getelementptr i8* %o_alignedDataBuffer, i32 19 ; [#uses=1]
- %uglygep7.3.i = getelementptr i8* %o_alignedDataBuffer, i32 18 ; [#uses=1]
- %uglygep10.3.i = getelementptr i8* %o_alignedDataBuffer, i32 17 ; [#uses=1]
- %scevgep13.3.i = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep1314.3.i = bitcast float* %scevgep13.3.i to i8* ; [#uses=4]
- %uglygep17.3.i = getelementptr i8* %scevgep1314.3.i, i32 1 ; [#uses=1]
- %uglygep20.3.i = getelementptr i8* %scevgep1314.3.i, i32 2 ; [#uses=1]
- %uglygep23.3.i = getelementptr i8* %scevgep1314.3.i, i32 3 ; [#uses=1]
- %80 = load i8* %uglygep23.3.i, align 1 ; [#uses=1]
- store i8 %80, i8* %52, align 1
- %81 = load i8* %uglygep20.3.i, align 1 ; [#uses=1]
- store i8 %81, i8* %uglygep10.3.i, align 1
- %82 = load i8* %uglygep17.3.i, align 1 ; [#uses=1]
- store i8 %82, i8* %uglygep7.3.i, align 1
- %83 = load i8* %scevgep1314.3.i, align 1 ; [#uses=1]
- store i8 %83, i8* %uglygep.3.i, align 1
- %84 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2 ; [#uses=1]
- %uglygep.i44 = getelementptr i8* %o_alignedDataBuffer, i32 23 ; [#uses=1]
- %uglygep7.i45 = getelementptr i8* %o_alignedDataBuffer, i32 22 ; [#uses=1]
- %uglygep10.i46 = getelementptr i8* %o_alignedDataBuffer, i32 21 ; [#uses=1]
- %scevgep1314.i47 = bitcast %struct.btQuadWord* %84 to i8* ; [#uses=4]
- %uglygep17.i48 = getelementptr i8* %scevgep1314.i47, i32 1 ; [#uses=1]
- %uglygep20.i49 = getelementptr i8* %scevgep1314.i47, i32 2 ; [#uses=1]
- %uglygep23.i50 = getelementptr i8* %scevgep1314.i47, i32 3 ; [#uses=1]
- %85 = load i8* %uglygep23.i50, align 1 ; [#uses=1]
- store i8 %85, i8* %54, align 1
- %86 = load i8* %uglygep20.i49, align 1 ; [#uses=1]
- store i8 %86, i8* %uglygep10.i46, align 1
- %87 = load i8* %uglygep17.i48, align 1 ; [#uses=1]
- store i8 %87, i8* %uglygep7.i45, align 1
- %88 = load i8* %scevgep1314.i47, align 1 ; [#uses=1]
- store i8 %88, i8* %uglygep.i44, align 1
- %uglygep.1.i53 = getelementptr i8* %o_alignedDataBuffer, i32 27 ; [#uses=1]
- %uglygep7.1.i54 = getelementptr i8* %o_alignedDataBuffer, i32 26 ; [#uses=1]
- %uglygep10.1.i55 = getelementptr i8* %o_alignedDataBuffer, i32 25 ; [#uses=1]
- %scevgep13.1.i56 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep1314.1.i57 = bitcast float* %scevgep13.1.i56 to i8* ; [#uses=4]
- %uglygep17.1.i58 = getelementptr i8* %scevgep1314.1.i57, i32 1 ; [#uses=1]
- %uglygep20.1.i59 = getelementptr i8* %scevgep1314.1.i57, i32 2 ; [#uses=1]
- %uglygep23.1.i60 = getelementptr i8* %scevgep1314.1.i57, i32 3 ; [#uses=1]
- %89 = load i8* %uglygep23.1.i60, align 1 ; [#uses=1]
- store i8 %89, i8* %56, align 1
- %90 = load i8* %uglygep20.1.i59, align 1 ; [#uses=1]
- store i8 %90, i8* %uglygep10.1.i55, align 1
- %91 = load i8* %uglygep17.1.i58, align 1 ; [#uses=1]
- store i8 %91, i8* %uglygep7.1.i54, align 1
- %92 = load i8* %scevgep1314.1.i57, align 1 ; [#uses=1]
- store i8 %92, i8* %uglygep.1.i53, align 1
- %uglygep.2.i63 = getelementptr i8* %o_alignedDataBuffer, i32 31 ; [#uses=1]
- %uglygep7.2.i64 = getelementptr i8* %o_alignedDataBuffer, i32 30 ; [#uses=1]
- %uglygep10.2.i65 = getelementptr i8* %o_alignedDataBuffer, i32 29 ; [#uses=1]
- %scevgep13.2.i66 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep1314.2.i67 = bitcast float* %scevgep13.2.i66 to i8* ; [#uses=4]
- %uglygep17.2.i68 = getelementptr i8* %scevgep1314.2.i67, i32 1 ; [#uses=1]
- %uglygep20.2.i69 = getelementptr i8* %scevgep1314.2.i67, i32 2 ; [#uses=1]
- %uglygep23.2.i70 = getelementptr i8* %scevgep1314.2.i67, i32 3 ; [#uses=1]
- %93 = load i8* %uglygep23.2.i70, align 1 ; [#uses=1]
- store i8 %93, i8* %58, align 1
- %94 = load i8* %uglygep20.2.i69, align 1 ; [#uses=1]
- store i8 %94, i8* %uglygep10.2.i65, align 1
- %95 = load i8* %uglygep17.2.i68, align 1 ; [#uses=1]
- store i8 %95, i8* %uglygep7.2.i64, align 1
- %96 = load i8* %scevgep1314.2.i67, align 1 ; [#uses=1]
- store i8 %96, i8* %uglygep.2.i63, align 1
- %uglygep.3.i73 = getelementptr i8* %o_alignedDataBuffer, i32 35 ; [#uses=1]
- %uglygep7.3.i74 = getelementptr i8* %o_alignedDataBuffer, i32 34 ; [#uses=1]
- %uglygep10.3.i75 = getelementptr i8* %o_alignedDataBuffer, i32 33 ; [#uses=1]
- %scevgep13.3.i76 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep1314.3.i77 = bitcast float* %scevgep13.3.i76 to i8* ; [#uses=4]
- %uglygep17.3.i78 = getelementptr i8* %scevgep1314.3.i77, i32 1 ; [#uses=1]
- %uglygep20.3.i79 = getelementptr i8* %scevgep1314.3.i77, i32 2 ; [#uses=1]
- %uglygep23.3.i80 = getelementptr i8* %scevgep1314.3.i77, i32 3 ; [#uses=1]
- %97 = load i8* %uglygep23.3.i80, align 1 ; [#uses=1]
- store i8 %97, i8* %60, align 1
- %98 = load i8* %uglygep20.3.i79, align 1 ; [#uses=1]
- store i8 %98, i8* %uglygep10.3.i75, align 1
- %99 = load i8* %uglygep17.3.i78, align 1 ; [#uses=1]
- store i8 %99, i8* %uglygep7.3.i74, align 1
- %100 = load i8* %scevgep1314.3.i77, align 1 ; [#uses=1]
- store i8 %100, i8* %uglygep.3.i73, align 1
- %101 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 36 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3 ; [#uses=1]
- %uglygep.i82 = getelementptr i8* %o_alignedDataBuffer, i32 39 ; [#uses=1]
- %uglygep7.i83 = getelementptr i8* %o_alignedDataBuffer, i32 38 ; [#uses=1]
- %uglygep10.i84 = getelementptr i8* %o_alignedDataBuffer, i32 37 ; [#uses=1]
- %scevgep1314.i85 = bitcast %struct.btQuadWord* %102 to i8* ; [#uses=4]
- %uglygep17.i86 = getelementptr i8* %scevgep1314.i85, i32 1 ; [#uses=1]
- %uglygep20.i87 = getelementptr i8* %scevgep1314.i85, i32 2 ; [#uses=1]
- %uglygep23.i88 = getelementptr i8* %scevgep1314.i85, i32 3 ; [#uses=1]
- %103 = load i8* %uglygep23.i88, align 1 ; [#uses=1]
- store i8 %103, i8* %101, align 1
- %104 = load i8* %uglygep20.i87, align 1 ; [#uses=1]
- store i8 %104, i8* %uglygep10.i84, align 1
- %105 = load i8* %uglygep17.i86, align 1 ; [#uses=1]
- store i8 %105, i8* %uglygep7.i83, align 1
- %106 = load i8* %scevgep1314.i85, align 1 ; [#uses=1]
- store i8 %106, i8* %uglygep.i82, align 1
- %scevgep.1.i89 = getelementptr i8* %o_alignedDataBuffer, i32 40 ; [#uses=1]
- %uglygep.1.i91 = getelementptr i8* %o_alignedDataBuffer, i32 43 ; [#uses=1]
- %uglygep7.1.i92 = getelementptr i8* %o_alignedDataBuffer, i32 42 ; [#uses=1]
- %uglygep10.1.i93 = getelementptr i8* %o_alignedDataBuffer, i32 41 ; [#uses=1]
- %scevgep13.1.i94 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep1314.1.i95 = bitcast float* %scevgep13.1.i94 to i8* ; [#uses=4]
- %uglygep17.1.i96 = getelementptr i8* %scevgep1314.1.i95, i32 1 ; [#uses=1]
- %uglygep20.1.i97 = getelementptr i8* %scevgep1314.1.i95, i32 2 ; [#uses=1]
- %uglygep23.1.i98 = getelementptr i8* %scevgep1314.1.i95, i32 3 ; [#uses=1]
- %107 = load i8* %uglygep23.1.i98, align 1 ; [#uses=1]
- store i8 %107, i8* %scevgep.1.i89, align 1
- %108 = load i8* %uglygep20.1.i97, align 1 ; [#uses=1]
- store i8 %108, i8* %uglygep10.1.i93, align 1
- %109 = load i8* %uglygep17.1.i96, align 1 ; [#uses=1]
- store i8 %109, i8* %uglygep7.1.i92, align 1
- %110 = load i8* %scevgep1314.1.i95, align 1 ; [#uses=1]
- store i8 %110, i8* %uglygep.1.i91, align 1
- %scevgep.2.i99 = getelementptr i8* %o_alignedDataBuffer, i32 44 ; [#uses=1]
- %uglygep.2.i101 = getelementptr i8* %o_alignedDataBuffer, i32 47 ; [#uses=1]
- %uglygep7.2.i102 = getelementptr i8* %o_alignedDataBuffer, i32 46 ; [#uses=1]
- %uglygep10.2.i103 = getelementptr i8* %o_alignedDataBuffer, i32 45 ; [#uses=1]
- %scevgep13.2.i104 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep1314.2.i105 = bitcast float* %scevgep13.2.i104 to i8* ; [#uses=4]
- %uglygep17.2.i106 = getelementptr i8* %scevgep1314.2.i105, i32 1 ; [#uses=1]
- %uglygep20.2.i107 = getelementptr i8* %scevgep1314.2.i105, i32 2 ; [#uses=1]
- %uglygep23.2.i108 = getelementptr i8* %scevgep1314.2.i105, i32 3 ; [#uses=1]
- %111 = load i8* %uglygep23.2.i108, align 1 ; [#uses=1]
- store i8 %111, i8* %scevgep.2.i99, align 1
- %112 = load i8* %uglygep20.2.i107, align 1 ; [#uses=1]
- store i8 %112, i8* %uglygep10.2.i103, align 1
- %113 = load i8* %uglygep17.2.i106, align 1 ; [#uses=1]
- store i8 %113, i8* %uglygep7.2.i102, align 1
- %114 = load i8* %scevgep1314.2.i105, align 1 ; [#uses=1]
- store i8 %114, i8* %uglygep.2.i101, align 1
- %scevgep.3.i109 = getelementptr i8* %o_alignedDataBuffer, i32 48 ; [#uses=1]
- %uglygep.3.i111 = getelementptr i8* %o_alignedDataBuffer, i32 51 ; [#uses=1]
- %uglygep7.3.i112 = getelementptr i8* %o_alignedDataBuffer, i32 50 ; [#uses=1]
- %uglygep10.3.i113 = getelementptr i8* %o_alignedDataBuffer, i32 49 ; [#uses=1]
- %scevgep13.3.i114 = getelementptr %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep1314.3.i115 = bitcast float* %scevgep13.3.i114 to i8* ; [#uses=4]
- %uglygep17.3.i116 = getelementptr i8* %scevgep1314.3.i115, i32 1 ; [#uses=1]
- %uglygep20.3.i117 = getelementptr i8* %scevgep1314.3.i115, i32 2 ; [#uses=1]
- %uglygep23.3.i118 = getelementptr i8* %scevgep1314.3.i115, i32 3 ; [#uses=1]
- %115 = load i8* %uglygep23.3.i118, align 1 ; [#uses=1]
- store i8 %115, i8* %scevgep.3.i109, align 1
- %116 = load i8* %uglygep20.3.i117, align 1 ; [#uses=1]
- store i8 %116, i8* %uglygep10.3.i113, align 1
- %117 = load i8* %uglygep17.3.i116, align 1 ; [#uses=1]
- store i8 %117, i8* %uglygep7.3.i112, align 1
- %118 = load i8* %scevgep1314.3.i115, align 1 ; [#uses=1]
- store i8 %118, i8* %uglygep.3.i111, align 1
- %119 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- %120 = load i32* %119, align 4 ; [#uses=1]
- %121 = tail call i32 @llvm.bswap.i32(i32 %120) nounwind ; [#uses=1]
- store i32 %121, i32* %36, align 4
- %122 = load i32* %2, align 4 ; [#uses=1]
- %123 = tail call i32 @llvm.bswap.i32(i32 %122) nounwind ; [#uses=1]
- br label %bb4
-
-bb3: ; preds = %bb1
- %124 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 56 ; [#uses=1]
- %125 = bitcast i8* %124 to i32* ; [#uses=1]
- store i32 %63, i32* %125, align 4
- %126 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=1]
- store float %127, float* %47, align 4
- %128 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=1]
- store float %129, float* %49, align 4
- %130 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %131 = load float* %130, align 4 ; [#uses=1]
- store float %131, float* %51, align 4
- %132 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- store float %133, float* %53, align 4
- %134 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- store float %135, float* %55, align 4
- %136 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=1]
- store float %137, float* %57, align 4
- %138 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=1]
- store float %139, float* %59, align 4
- %140 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- store float %141, float* %61, align 4
- %142 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 36 ; [#uses=1]
- %143 = bitcast i8* %142 to float* ; [#uses=1]
- %144 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- store float %145, float* %143, align 4
- %146 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 40 ; [#uses=1]
- %147 = bitcast i8* %146 to float* ; [#uses=1]
- %148 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=1]
- store float %149, float* %147, align 4
- %150 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 44 ; [#uses=1]
- %151 = bitcast i8* %150 to float* ; [#uses=1]
- %152 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- store float %153, float* %151, align 4
- %154 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 48 ; [#uses=1]
- %155 = bitcast i8* %154 to float* ; [#uses=1]
- %156 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %157 = load float* %156, align 4 ; [#uses=1]
- store float %157, float* %155, align 4
- %158 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- %159 = load i32* %158, align 4 ; [#uses=1]
- store i32 %159, i32* %36, align 4
- %160 = load i32* %2, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %storemerge = phi i32 [ %123, %bb2 ], [ %160, %bb3 ] ; [#uses=1]
- store i32 %storemerge, i32* %45, align 4
- %161 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=2]
- %162 = load i8* %161, align 4 ; [#uses=1]
- store i8 %162, i8* %6, align 4
- %163 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 172 ; [#uses=2]
- %164 = load i32* %62, align 4 ; [#uses=12]
- %165 = load i8* %161, align 4 ; [#uses=1]
- %toBool5 = icmp eq i8 %165, 0 ; [#uses=1]
- br i1 %toBool5, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit212, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit: ; preds = %bb4
- store i8 0, i8* %28, align 4
- %166 = bitcast i8* %163 to %struct.BT_QUANTIZED_BVH_NODE* ; [#uses=3]
- store %struct.BT_QUANTIZED_BVH_NODE* %166, %struct.BT_QUANTIZED_BVH_NODE** %30, align 4
- store i32 %164, i32* %32, align 4
- store i32 %164, i32* %34, align 4
- %167 = icmp sgt i32 %164, 0 ; [#uses=2]
- br i1 %toBool, label %bb14.preheader, label %bb10.preheader
-
-bb14.preheader: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit
- br i1 %167, label %bb.nph221, label %bb15
-
-bb10.preheader: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit
- br i1 %167, label %bb.nph, label %bb15
-
-bb.nph: ; preds = %bb10.preheader
- %168 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=7]
- br label %bb9
-
-bb9: ; preds = %bb9.bb9_crit_edge, %bb.nph
- %169 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %166, %bb.nph ], [ %.pre467, %bb9.bb9_crit_edge ] ; [#uses=1]
- %nodeIndex.0218 = phi i32 [ 0, %bb.nph ], [ %197, %bb9.bb9_crit_edge ] ; [#uses=15]
- %170 = load %struct.BT_QUANTIZED_BVH_NODE** %168, align 4 ; [#uses=1]
- %scevgep232 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %170, i32 %nodeIndex.0218, i32 0, i32 0 ; [#uses=1]
- %171 = load i16* %scevgep232, align 2 ; [#uses=1]
- %172 = tail call i16 @llvm.bswap.i16(i16 %171) nounwind ; [#uses=1]
- %scevgep233234 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %169, i32 %nodeIndex.0218, i32 0, i32 0 ; [#uses=1]
- store i16 %172, i16* %scevgep233234, align 2
- %173 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %174 = load %struct.BT_QUANTIZED_BVH_NODE** %168, align 4 ; [#uses=1]
- %scevgep235 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %174, i32 %nodeIndex.0218, i32 0, i32 1 ; [#uses=1]
- %175 = load i16* %scevgep235, align 2 ; [#uses=1]
- %176 = tail call i16 @llvm.bswap.i16(i16 %175) nounwind ; [#uses=1]
- %scevgep236 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %173, i32 %nodeIndex.0218, i32 0, i32 1 ; [#uses=1]
- store i16 %176, i16* %scevgep236, align 2
- %177 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %178 = load %struct.BT_QUANTIZED_BVH_NODE** %168, align 4 ; [#uses=1]
- %scevgep237 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %178, i32 %nodeIndex.0218, i32 0, i32 2 ; [#uses=1]
- %179 = load i16* %scevgep237, align 2 ; [#uses=1]
- %180 = tail call i16 @llvm.bswap.i16(i16 %179) nounwind ; [#uses=1]
- %scevgep238 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %177, i32 %nodeIndex.0218, i32 0, i32 2 ; [#uses=1]
- store i16 %180, i16* %scevgep238, align 2
- %181 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %182 = load %struct.BT_QUANTIZED_BVH_NODE** %168, align 4 ; [#uses=1]
- %scevgep239 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %182, i32 %nodeIndex.0218, i32 1, i32 0 ; [#uses=1]
- %183 = load i16* %scevgep239, align 2 ; [#uses=1]
- %184 = tail call i16 @llvm.bswap.i16(i16 %183) nounwind ; [#uses=1]
- %scevgep240 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %181, i32 %nodeIndex.0218, i32 1, i32 0 ; [#uses=1]
- store i16 %184, i16* %scevgep240, align 2
- %185 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %186 = load %struct.BT_QUANTIZED_BVH_NODE** %168, align 4 ; [#uses=1]
- %scevgep241 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %186, i32 %nodeIndex.0218, i32 1, i32 1 ; [#uses=1]
- %187 = load i16* %scevgep241, align 2 ; [#uses=1]
- %188 = tail call i16 @llvm.bswap.i16(i16 %187) nounwind ; [#uses=1]
- %scevgep242 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %185, i32 %nodeIndex.0218, i32 1, i32 1 ; [#uses=1]
- store i16 %188, i16* %scevgep242, align 2
- %189 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %190 = load %struct.BT_QUANTIZED_BVH_NODE** %168, align 4 ; [#uses=1]
- %scevgep243 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %190, i32 %nodeIndex.0218, i32 1, i32 2 ; [#uses=1]
- %191 = load i16* %scevgep243, align 2 ; [#uses=1]
- %192 = tail call i16 @llvm.bswap.i16(i16 %191) nounwind ; [#uses=1]
- %scevgep244 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %189, i32 %nodeIndex.0218, i32 1, i32 2 ; [#uses=1]
- store i16 %192, i16* %scevgep244, align 2
- %193 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %194 = load %struct.BT_QUANTIZED_BVH_NODE** %168, align 4 ; [#uses=1]
- %scevgep245 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %194, i32 %nodeIndex.0218, i32 2 ; [#uses=1]
- %195 = load i32* %scevgep245, align 4 ; [#uses=1]
- %196 = tail call i32 @llvm.bswap.i32(i32 %195) nounwind ; [#uses=1]
- %scevgep246 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %193, i32 %nodeIndex.0218, i32 2 ; [#uses=1]
- store i32 %196, i32* %scevgep246, align 4
- %197 = add nsw i32 %nodeIndex.0218, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %197, %164 ; [#uses=1]
- br i1 %exitcond, label %bb15, label %bb9.bb9_crit_edge
-
-bb9.bb9_crit_edge: ; preds = %bb9
- %.pre467 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- br label %bb9
-
-bb.nph221: ; preds = %bb14.preheader
- %198 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=7]
- br label %bb13
-
-bb13: ; preds = %bb13.bb13_crit_edge, %bb.nph221
- %199 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %166, %bb.nph221 ], [ %.pre468, %bb13.bb13_crit_edge ] ; [#uses=1]
- %nodeIndex12.0220 = phi i32 [ 0, %bb.nph221 ], [ %220, %bb13.bb13_crit_edge ] ; [#uses=15]
- %200 = load %struct.BT_QUANTIZED_BVH_NODE** %198, align 4 ; [#uses=1]
- %scevgep248249 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %200, i32 %nodeIndex12.0220, i32 0, i32 0 ; [#uses=1]
- %201 = load i16* %scevgep248249, align 2 ; [#uses=1]
- %scevgep250251 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %199, i32 %nodeIndex12.0220, i32 0, i32 0 ; [#uses=1]
- store i16 %201, i16* %scevgep250251, align 2
- %202 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %203 = load %struct.BT_QUANTIZED_BVH_NODE** %198, align 4 ; [#uses=1]
- %scevgep252 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %203, i32 %nodeIndex12.0220, i32 0, i32 1 ; [#uses=1]
- %204 = load i16* %scevgep252, align 2 ; [#uses=1]
- %scevgep253 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %202, i32 %nodeIndex12.0220, i32 0, i32 1 ; [#uses=1]
- store i16 %204, i16* %scevgep253, align 2
- %205 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %206 = load %struct.BT_QUANTIZED_BVH_NODE** %198, align 4 ; [#uses=1]
- %scevgep254 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %206, i32 %nodeIndex12.0220, i32 0, i32 2 ; [#uses=1]
- %207 = load i16* %scevgep254, align 2 ; [#uses=1]
- %scevgep255 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %205, i32 %nodeIndex12.0220, i32 0, i32 2 ; [#uses=1]
- store i16 %207, i16* %scevgep255, align 2
- %208 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %209 = load %struct.BT_QUANTIZED_BVH_NODE** %198, align 4 ; [#uses=1]
- %scevgep256 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %209, i32 %nodeIndex12.0220, i32 1, i32 0 ; [#uses=1]
- %210 = load i16* %scevgep256, align 2 ; [#uses=1]
- %scevgep257 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %208, i32 %nodeIndex12.0220, i32 1, i32 0 ; [#uses=1]
- store i16 %210, i16* %scevgep257, align 2
- %211 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %212 = load %struct.BT_QUANTIZED_BVH_NODE** %198, align 4 ; [#uses=1]
- %scevgep258 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %212, i32 %nodeIndex12.0220, i32 1, i32 1 ; [#uses=1]
- %213 = load i16* %scevgep258, align 2 ; [#uses=1]
- %scevgep259 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %211, i32 %nodeIndex12.0220, i32 1, i32 1 ; [#uses=1]
- store i16 %213, i16* %scevgep259, align 2
- %214 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %215 = load %struct.BT_QUANTIZED_BVH_NODE** %198, align 4 ; [#uses=1]
- %scevgep260 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %215, i32 %nodeIndex12.0220, i32 1, i32 2 ; [#uses=1]
- %216 = load i16* %scevgep260, align 2 ; [#uses=1]
- %scevgep261 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %214, i32 %nodeIndex12.0220, i32 1, i32 2 ; [#uses=1]
- store i16 %216, i16* %scevgep261, align 2
- %217 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- %218 = load %struct.BT_QUANTIZED_BVH_NODE** %198, align 4 ; [#uses=1]
- %scevgep262 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %218, i32 %nodeIndex12.0220, i32 2 ; [#uses=1]
- %219 = load i32* %scevgep262, align 4 ; [#uses=1]
- %scevgep263 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %217, i32 %nodeIndex12.0220, i32 2 ; [#uses=1]
- store i32 %219, i32* %scevgep263, align 4
- %220 = add nsw i32 %nodeIndex12.0220, 1 ; [#uses=2]
- %exitcond247 = icmp eq i32 %220, %164 ; [#uses=1]
- br i1 %exitcond247, label %bb15, label %bb13.bb13_crit_edge
-
-bb13.bb13_crit_edge: ; preds = %bb13
- %.pre468 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=1]
- br label %bb13
-
-bb15: ; preds = %bb13, %bb9, %bb10.preheader, %bb14.preheader
- %221 = shl i32 %164, 4 ; [#uses=1]
- %222 = load %struct.BT_QUANTIZED_BVH_NODE** %30, align 4 ; [#uses=2]
- %223 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %222, null ; [#uses=1]
- br i1 %223, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit217, label %bb.i.i.i214
-
-bb.i.i.i214: ; preds = %bb15
- %224 = load i8* %28, align 4 ; [#uses=1]
- %toBool.i.i.i213 = icmp eq i8 %224, 0 ; [#uses=1]
- br i1 %toBool.i.i.i213, label %bb2.i.i.i216, label %bb1.i.i.i215
-
-bb1.i.i.i215: ; preds = %bb.i.i.i214
- %225 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %222 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %225)
- br label %bb2.i.i.i216
-
-bb2.i.i.i216: ; preds = %bb1.i.i.i215, %bb.i.i.i214
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %30, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit217
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit217: ; preds = %bb2.i.i.i216, %bb15
- store i8 0, i8* %28, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %30, align 4
- store i32 0, i32* %32, align 4
- store i32 0, i32* %34, align 4
- br label %bb27
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit212: ; preds = %bb4
- store i8 0, i8* %14, align 4
- %226 = bitcast i8* %163 to %struct.btOptimizedBvhNode* ; [#uses=3]
- store %struct.btOptimizedBvhNode* %226, %struct.btOptimizedBvhNode** %16, align 4
- store i32 %164, i32* %18, align 4
- store i32 %164, i32* %20, align 4
- %227 = icmp sgt i32 %164, 0 ; [#uses=2]
- br i1 %toBool, label %bb25.preheader, label %bb21.preheader
-
-bb25.preheader: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit212
- br i1 %227, label %bb.nph231, label %bb26
-
-bb21.preheader: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit212
- br i1 %227, label %bb.nph223, label %bb26
-
-bb.nph223: ; preds = %bb21.preheader
- %228 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=5]
- br label %bb20
-
-bb20: ; preds = %bb20.bb20_crit_edge, %bb.nph223
- %229 = phi %struct.btOptimizedBvhNode* [ %226, %bb.nph223 ], [ %.pre, %bb20.bb20_crit_edge ] ; [#uses=5]
- %nodeIndex19.0222 = phi i32 [ 0, %bb.nph223 ], [ %277, %bb20.bb20_crit_edge ] ; [#uses=25]
- %230 = load %struct.btOptimizedBvhNode** %228, align 4 ; [#uses=5]
- %scevgep275 = getelementptr %struct.btOptimizedBvhNode* %230, i32 %nodeIndex19.0222, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep275276 = bitcast float* %scevgep275 to i8* ; [#uses=3]
- %uglygep23.i177 = getelementptr i8* %scevgep275276, i32 3 ; [#uses=1]
- %231 = load i8* %uglygep23.i177, align 1 ; [#uses=1]
- %scevgep265 = getelementptr %struct.btOptimizedBvhNode* %229, i32 %nodeIndex19.0222 ; [#uses=1]
- %scevgep4.i170 = bitcast %struct.btOptimizedBvhNode* %scevgep265 to i8* ; [#uses=1]
- store i8 %231, i8* %scevgep4.i170, align 1
- %uglygep20.i176 = getelementptr i8* %scevgep275276, i32 2 ; [#uses=1]
- %232 = load i8* %uglygep20.i176, align 1 ; [#uses=1]
- %scevgep267 = getelementptr %struct.btOptimizedBvhNode* %229, i32 %nodeIndex19.0222, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep267268 = bitcast float* %scevgep267 to i8* ; [#uses=3]
- %uglygep10.i173 = getelementptr i8* %scevgep267268, i32 1 ; [#uses=1]
- store i8 %232, i8* %uglygep10.i173, align 1
- %uglygep17.i175 = getelementptr i8* %scevgep275276, i32 1 ; [#uses=1]
- %233 = load i8* %uglygep17.i175, align 1 ; [#uses=1]
- %uglygep7.i172 = getelementptr i8* %scevgep267268, i32 2 ; [#uses=1]
- store i8 %233, i8* %uglygep7.i172, align 1
- %scevgep273 = getelementptr %struct.btOptimizedBvhNode* %230, i32 %nodeIndex19.0222 ; [#uses=1]
- %scevgep1314.i174 = bitcast %struct.btOptimizedBvhNode* %scevgep273 to i8* ; [#uses=1]
- %234 = load i8* %scevgep1314.i174, align 1 ; [#uses=1]
- %uglygep.i171 = getelementptr i8* %scevgep267268, i32 3 ; [#uses=1]
- store i8 %234, i8* %uglygep.i171, align 1
- %scevgep291 = getelementptr %struct.btOptimizedBvhNode* %230, i32 %nodeIndex19.0222, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep291292 = bitcast float* %scevgep291 to i8* ; [#uses=4]
- %uglygep23.1.i187 = getelementptr i8* %scevgep291292, i32 3 ; [#uses=1]
- %235 = load i8* %uglygep23.1.i187, align 1 ; [#uses=1]
- %scevgep281 = getelementptr %struct.btOptimizedBvhNode* %229, i32 %nodeIndex19.0222, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i179 = bitcast float* %scevgep281 to i8* ; [#uses=4]
- store i8 %235, i8* %scevgep4.1.i179, align 1
- %uglygep20.1.i186 = getelementptr i8* %scevgep291292, i32 2 ; [#uses=1]
- %236 = load i8* %uglygep20.1.i186, align 1 ; [#uses=1]
- %uglygep10.1.i182 = getelementptr i8* %scevgep4.1.i179, i32 1 ; [#uses=1]
- store i8 %236, i8* %uglygep10.1.i182, align 1
- %uglygep17.1.i185 = getelementptr i8* %scevgep291292, i32 1 ; [#uses=1]
- %237 = load i8* %uglygep17.1.i185, align 1 ; [#uses=1]
- %uglygep7.1.i181 = getelementptr i8* %scevgep4.1.i179, i32 2 ; [#uses=1]
- store i8 %237, i8* %uglygep7.1.i181, align 1
- %238 = load i8* %scevgep291292, align 1 ; [#uses=1]
- %uglygep.1.i180 = getelementptr i8* %scevgep4.1.i179, i32 3 ; [#uses=1]
- store i8 %238, i8* %uglygep.1.i180, align 1
- %scevgep307 = getelementptr %struct.btOptimizedBvhNode* %230, i32 %nodeIndex19.0222, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep307308 = bitcast float* %scevgep307 to i8* ; [#uses=4]
- %uglygep23.2.i197 = getelementptr i8* %scevgep307308, i32 3 ; [#uses=1]
- %239 = load i8* %uglygep23.2.i197, align 1 ; [#uses=1]
- %scevgep297 = getelementptr %struct.btOptimizedBvhNode* %229, i32 %nodeIndex19.0222, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i189 = bitcast float* %scevgep297 to i8* ; [#uses=4]
- store i8 %239, i8* %scevgep4.2.i189, align 1
- %uglygep20.2.i196 = getelementptr i8* %scevgep307308, i32 2 ; [#uses=1]
- %240 = load i8* %uglygep20.2.i196, align 1 ; [#uses=1]
- %uglygep10.2.i192 = getelementptr i8* %scevgep4.2.i189, i32 1 ; [#uses=1]
- store i8 %240, i8* %uglygep10.2.i192, align 1
- %uglygep17.2.i195 = getelementptr i8* %scevgep307308, i32 1 ; [#uses=1]
- %241 = load i8* %uglygep17.2.i195, align 1 ; [#uses=1]
- %uglygep7.2.i191 = getelementptr i8* %scevgep4.2.i189, i32 2 ; [#uses=1]
- store i8 %241, i8* %uglygep7.2.i191, align 1
- %242 = load i8* %scevgep307308, align 1 ; [#uses=1]
- %uglygep.2.i190 = getelementptr i8* %scevgep4.2.i189, i32 3 ; [#uses=1]
- store i8 %242, i8* %uglygep.2.i190, align 1
- %scevgep323 = getelementptr %struct.btOptimizedBvhNode* %230, i32 %nodeIndex19.0222, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep323324 = bitcast float* %scevgep323 to i8* ; [#uses=4]
- %uglygep23.3.i207 = getelementptr i8* %scevgep323324, i32 3 ; [#uses=1]
- %243 = load i8* %uglygep23.3.i207, align 1 ; [#uses=1]
- %scevgep313 = getelementptr %struct.btOptimizedBvhNode* %229, i32 %nodeIndex19.0222, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i199 = bitcast float* %scevgep313 to i8* ; [#uses=4]
- store i8 %243, i8* %scevgep4.3.i199, align 1
- %uglygep20.3.i206 = getelementptr i8* %scevgep323324, i32 2 ; [#uses=1]
- %244 = load i8* %uglygep20.3.i206, align 1 ; [#uses=1]
- %uglygep10.3.i202 = getelementptr i8* %scevgep4.3.i199, i32 1 ; [#uses=1]
- store i8 %244, i8* %uglygep10.3.i202, align 1
- %uglygep17.3.i205 = getelementptr i8* %scevgep323324, i32 1 ; [#uses=1]
- %245 = load i8* %uglygep17.3.i205, align 1 ; [#uses=1]
- %uglygep7.3.i201 = getelementptr i8* %scevgep4.3.i199, i32 2 ; [#uses=1]
- store i8 %245, i8* %uglygep7.3.i201, align 1
- %246 = load i8* %scevgep323324, align 1 ; [#uses=1]
- %uglygep.3.i200 = getelementptr i8* %scevgep4.3.i199, i32 3 ; [#uses=1]
- store i8 %246, i8* %uglygep.3.i200, align 1
- %247 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=4]
- %248 = load %struct.btOptimizedBvhNode** %228, align 4 ; [#uses=4]
- %scevgep339 = getelementptr %struct.btOptimizedBvhNode* %248, i32 %nodeIndex19.0222, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep339340 = bitcast float* %scevgep339 to i8* ; [#uses=4]
- %uglygep23.i139 = getelementptr i8* %scevgep339340, i32 3 ; [#uses=1]
- %249 = load i8* %uglygep23.i139, align 1 ; [#uses=1]
- %scevgep329 = getelementptr %struct.btOptimizedBvhNode* %247, i32 %nodeIndex19.0222, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i132 = bitcast float* %scevgep329 to i8* ; [#uses=4]
- store i8 %249, i8* %scevgep4.i132, align 1
- %uglygep20.i138 = getelementptr i8* %scevgep339340, i32 2 ; [#uses=1]
- %250 = load i8* %uglygep20.i138, align 1 ; [#uses=1]
- %uglygep10.i135 = getelementptr i8* %scevgep4.i132, i32 1 ; [#uses=1]
- store i8 %250, i8* %uglygep10.i135, align 1
- %uglygep17.i137 = getelementptr i8* %scevgep339340, i32 1 ; [#uses=1]
- %251 = load i8* %uglygep17.i137, align 1 ; [#uses=1]
- %uglygep7.i134 = getelementptr i8* %scevgep4.i132, i32 2 ; [#uses=1]
- store i8 %251, i8* %uglygep7.i134, align 1
- %252 = load i8* %scevgep339340, align 1 ; [#uses=1]
- %uglygep.i133 = getelementptr i8* %scevgep4.i132, i32 3 ; [#uses=1]
- store i8 %252, i8* %uglygep.i133, align 1
- %scevgep355 = getelementptr %struct.btOptimizedBvhNode* %248, i32 %nodeIndex19.0222, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep355356 = bitcast float* %scevgep355 to i8* ; [#uses=4]
- %uglygep23.1.i149 = getelementptr i8* %scevgep355356, i32 3 ; [#uses=1]
- %253 = load i8* %uglygep23.1.i149, align 1 ; [#uses=1]
- %scevgep345 = getelementptr %struct.btOptimizedBvhNode* %247, i32 %nodeIndex19.0222, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i141 = bitcast float* %scevgep345 to i8* ; [#uses=4]
- store i8 %253, i8* %scevgep4.1.i141, align 1
- %uglygep20.1.i148 = getelementptr i8* %scevgep355356, i32 2 ; [#uses=1]
- %254 = load i8* %uglygep20.1.i148, align 1 ; [#uses=1]
- %uglygep10.1.i144 = getelementptr i8* %scevgep4.1.i141, i32 1 ; [#uses=1]
- store i8 %254, i8* %uglygep10.1.i144, align 1
- %uglygep17.1.i147 = getelementptr i8* %scevgep355356, i32 1 ; [#uses=1]
- %255 = load i8* %uglygep17.1.i147, align 1 ; [#uses=1]
- %uglygep7.1.i143 = getelementptr i8* %scevgep4.1.i141, i32 2 ; [#uses=1]
- store i8 %255, i8* %uglygep7.1.i143, align 1
- %256 = load i8* %scevgep355356, align 1 ; [#uses=1]
- %uglygep.1.i142 = getelementptr i8* %scevgep4.1.i141, i32 3 ; [#uses=1]
- store i8 %256, i8* %uglygep.1.i142, align 1
- %scevgep371 = getelementptr %struct.btOptimizedBvhNode* %248, i32 %nodeIndex19.0222, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep371372 = bitcast float* %scevgep371 to i8* ; [#uses=4]
- %uglygep23.2.i159 = getelementptr i8* %scevgep371372, i32 3 ; [#uses=1]
- %257 = load i8* %uglygep23.2.i159, align 1 ; [#uses=1]
- %scevgep361 = getelementptr %struct.btOptimizedBvhNode* %247, i32 %nodeIndex19.0222, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i151 = bitcast float* %scevgep361 to i8* ; [#uses=4]
- store i8 %257, i8* %scevgep4.2.i151, align 1
- %uglygep20.2.i158 = getelementptr i8* %scevgep371372, i32 2 ; [#uses=1]
- %258 = load i8* %uglygep20.2.i158, align 1 ; [#uses=1]
- %uglygep10.2.i154 = getelementptr i8* %scevgep4.2.i151, i32 1 ; [#uses=1]
- store i8 %258, i8* %uglygep10.2.i154, align 1
- %uglygep17.2.i157 = getelementptr i8* %scevgep371372, i32 1 ; [#uses=1]
- %259 = load i8* %uglygep17.2.i157, align 1 ; [#uses=1]
- %uglygep7.2.i153 = getelementptr i8* %scevgep4.2.i151, i32 2 ; [#uses=1]
- store i8 %259, i8* %uglygep7.2.i153, align 1
- %260 = load i8* %scevgep371372, align 1 ; [#uses=1]
- %uglygep.2.i152 = getelementptr i8* %scevgep4.2.i151, i32 3 ; [#uses=1]
- store i8 %260, i8* %uglygep.2.i152, align 1
- %scevgep387 = getelementptr %struct.btOptimizedBvhNode* %248, i32 %nodeIndex19.0222, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep387388 = bitcast float* %scevgep387 to i8* ; [#uses=4]
- %uglygep23.3.i169 = getelementptr i8* %scevgep387388, i32 3 ; [#uses=1]
- %261 = load i8* %uglygep23.3.i169, align 1 ; [#uses=1]
- %scevgep377 = getelementptr %struct.btOptimizedBvhNode* %247, i32 %nodeIndex19.0222, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i161 = bitcast float* %scevgep377 to i8* ; [#uses=4]
- store i8 %261, i8* %scevgep4.3.i161, align 1
- %uglygep20.3.i168 = getelementptr i8* %scevgep387388, i32 2 ; [#uses=1]
- %262 = load i8* %uglygep20.3.i168, align 1 ; [#uses=1]
- %uglygep10.3.i164 = getelementptr i8* %scevgep4.3.i161, i32 1 ; [#uses=1]
- store i8 %262, i8* %uglygep10.3.i164, align 1
- %uglygep17.3.i167 = getelementptr i8* %scevgep387388, i32 1 ; [#uses=1]
- %263 = load i8* %uglygep17.3.i167, align 1 ; [#uses=1]
- %uglygep7.3.i163 = getelementptr i8* %scevgep4.3.i161, i32 2 ; [#uses=1]
- store i8 %263, i8* %uglygep7.3.i163, align 1
- %264 = load i8* %scevgep387388, align 1 ; [#uses=1]
- %uglygep.3.i162 = getelementptr i8* %scevgep4.3.i161, i32 3 ; [#uses=1]
- store i8 %264, i8* %uglygep.3.i162, align 1
- %265 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- %266 = load %struct.btOptimizedBvhNode** %228, align 4 ; [#uses=1]
- %scevgep393 = getelementptr %struct.btOptimizedBvhNode* %266, i32 %nodeIndex19.0222, i32 2 ; [#uses=1]
- %267 = load i32* %scevgep393, align 4 ; [#uses=1]
- %268 = tail call i32 @llvm.bswap.i32(i32 %267) nounwind ; [#uses=1]
- %scevgep394 = getelementptr %struct.btOptimizedBvhNode* %265, i32 %nodeIndex19.0222, i32 2 ; [#uses=1]
- store i32 %268, i32* %scevgep394, align 4
- %269 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- %270 = load %struct.btOptimizedBvhNode** %228, align 4 ; [#uses=1]
- %scevgep395 = getelementptr %struct.btOptimizedBvhNode* %270, i32 %nodeIndex19.0222, i32 3 ; [#uses=1]
- %271 = load i32* %scevgep395, align 4 ; [#uses=1]
- %272 = tail call i32 @llvm.bswap.i32(i32 %271) nounwind ; [#uses=1]
- %scevgep396 = getelementptr %struct.btOptimizedBvhNode* %269, i32 %nodeIndex19.0222, i32 3 ; [#uses=1]
- store i32 %272, i32* %scevgep396, align 4
- %273 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- %274 = load %struct.btOptimizedBvhNode** %228, align 4 ; [#uses=1]
- %scevgep397 = getelementptr %struct.btOptimizedBvhNode* %274, i32 %nodeIndex19.0222, i32 4 ; [#uses=1]
- %275 = load i32* %scevgep397, align 4 ; [#uses=1]
- %276 = tail call i32 @llvm.bswap.i32(i32 %275) nounwind ; [#uses=1]
- %scevgep398 = getelementptr %struct.btOptimizedBvhNode* %273, i32 %nodeIndex19.0222, i32 4 ; [#uses=1]
- store i32 %276, i32* %scevgep398, align 4
- %277 = add nsw i32 %nodeIndex19.0222, 1 ; [#uses=2]
- %exitcond264 = icmp eq i32 %277, %164 ; [#uses=1]
- br i1 %exitcond264, label %bb26, label %bb20.bb20_crit_edge
-
-bb20.bb20_crit_edge: ; preds = %bb20
- %.pre = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- br label %bb20
-
-bb.nph231: ; preds = %bb25.preheader
- %278 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=5]
- br label %bb24
-
-bb24: ; preds = %bb24.bb24_crit_edge, %bb.nph231
- %279 = phi %struct.btOptimizedBvhNode* [ %226, %bb.nph231 ], [ %.pre464, %bb24.bb24_crit_edge ] ; [#uses=4]
- %nodeIndex23.0230 = phi i32 [ 0, %bb.nph231 ], [ %300, %bb24.bb24_crit_edge ] ; [#uses=23]
- %280 = load %struct.btOptimizedBvhNode** %278, align 4 ; [#uses=4]
- %scevgep442443 = getelementptr inbounds %struct.btOptimizedBvhNode* %280, i32 %nodeIndex23.0230, i32 0, i32 0, i32 0 ; [#uses=1]
- %281 = load float* %scevgep442443, align 4 ; [#uses=1]
- %scevgep440441 = getelementptr inbounds %struct.btOptimizedBvhNode* %279, i32 %nodeIndex23.0230, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %281, float* %scevgep440441, align 4
- %scevgep445 = getelementptr %struct.btOptimizedBvhNode* %280, i32 %nodeIndex23.0230, i32 0, i32 0, i32 1 ; [#uses=1]
- %282 = load float* %scevgep445, align 4 ; [#uses=1]
- %scevgep444 = getelementptr %struct.btOptimizedBvhNode* %279, i32 %nodeIndex23.0230, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %282, float* %scevgep444, align 4
- %scevgep447 = getelementptr %struct.btOptimizedBvhNode* %280, i32 %nodeIndex23.0230, i32 0, i32 0, i32 2 ; [#uses=1]
- %283 = load float* %scevgep447, align 4 ; [#uses=1]
- %scevgep446 = getelementptr %struct.btOptimizedBvhNode* %279, i32 %nodeIndex23.0230, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %283, float* %scevgep446, align 4
- %scevgep449 = getelementptr %struct.btOptimizedBvhNode* %280, i32 %nodeIndex23.0230, i32 0, i32 0, i32 3 ; [#uses=1]
- %284 = load float* %scevgep449, align 4 ; [#uses=1]
- %scevgep448 = getelementptr %struct.btOptimizedBvhNode* %279, i32 %nodeIndex23.0230, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %284, float* %scevgep448, align 4
- %285 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=4]
- %286 = load %struct.btOptimizedBvhNode** %278, align 4 ; [#uses=4]
- %scevgep451 = getelementptr %struct.btOptimizedBvhNode* %286, i32 %nodeIndex23.0230, i32 1, i32 0, i32 0 ; [#uses=1]
- %287 = load float* %scevgep451, align 4 ; [#uses=1]
- %scevgep450 = getelementptr %struct.btOptimizedBvhNode* %285, i32 %nodeIndex23.0230, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %287, float* %scevgep450, align 4
- %scevgep453 = getelementptr %struct.btOptimizedBvhNode* %286, i32 %nodeIndex23.0230, i32 1, i32 0, i32 1 ; [#uses=1]
- %288 = load float* %scevgep453, align 4 ; [#uses=1]
- %scevgep452 = getelementptr %struct.btOptimizedBvhNode* %285, i32 %nodeIndex23.0230, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %288, float* %scevgep452, align 4
- %scevgep455 = getelementptr %struct.btOptimizedBvhNode* %286, i32 %nodeIndex23.0230, i32 1, i32 0, i32 2 ; [#uses=1]
- %289 = load float* %scevgep455, align 4 ; [#uses=1]
- %scevgep454 = getelementptr %struct.btOptimizedBvhNode* %285, i32 %nodeIndex23.0230, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %289, float* %scevgep454, align 4
- %scevgep457 = getelementptr %struct.btOptimizedBvhNode* %286, i32 %nodeIndex23.0230, i32 1, i32 0, i32 3 ; [#uses=1]
- %290 = load float* %scevgep457, align 4 ; [#uses=1]
- %scevgep456 = getelementptr %struct.btOptimizedBvhNode* %285, i32 %nodeIndex23.0230, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %290, float* %scevgep456, align 4
- %291 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- %292 = load %struct.btOptimizedBvhNode** %278, align 4 ; [#uses=1]
- %scevgep458 = getelementptr %struct.btOptimizedBvhNode* %292, i32 %nodeIndex23.0230, i32 2 ; [#uses=1]
- %293 = load i32* %scevgep458, align 4 ; [#uses=1]
- %scevgep459 = getelementptr %struct.btOptimizedBvhNode* %291, i32 %nodeIndex23.0230, i32 2 ; [#uses=1]
- store i32 %293, i32* %scevgep459, align 4
- %294 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- %295 = load %struct.btOptimizedBvhNode** %278, align 4 ; [#uses=1]
- %scevgep460 = getelementptr %struct.btOptimizedBvhNode* %295, i32 %nodeIndex23.0230, i32 3 ; [#uses=1]
- %296 = load i32* %scevgep460, align 4 ; [#uses=1]
- %scevgep461 = getelementptr %struct.btOptimizedBvhNode* %294, i32 %nodeIndex23.0230, i32 3 ; [#uses=1]
- store i32 %296, i32* %scevgep461, align 4
- %297 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- %298 = load %struct.btOptimizedBvhNode** %278, align 4 ; [#uses=1]
- %scevgep462 = getelementptr %struct.btOptimizedBvhNode* %298, i32 %nodeIndex23.0230, i32 4 ; [#uses=1]
- %299 = load i32* %scevgep462, align 4 ; [#uses=1]
- %scevgep463 = getelementptr %struct.btOptimizedBvhNode* %297, i32 %nodeIndex23.0230, i32 4 ; [#uses=1]
- store i32 %299, i32* %scevgep463, align 4
- %300 = add nsw i32 %nodeIndex23.0230, 1 ; [#uses=2]
- %exitcond439 = icmp eq i32 %300, %164 ; [#uses=1]
- br i1 %exitcond439, label %bb26, label %bb24.bb24_crit_edge
-
-bb24.bb24_crit_edge: ; preds = %bb24
- %.pre464 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=1]
- br label %bb24
-
-bb26: ; preds = %bb24, %bb20, %bb21.preheader, %bb25.preheader
- %301 = shl i32 %164, 6 ; [#uses=1]
- %302 = load %struct.btOptimizedBvhNode** %16, align 4 ; [#uses=2]
- %303 = icmp eq %struct.btOptimizedBvhNode* %302, null ; [#uses=1]
- br i1 %303, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit, label %bb.i.i.i129
-
-bb.i.i.i129: ; preds = %bb26
- %304 = load i8* %14, align 4 ; [#uses=1]
- %toBool.i.i.i128 = icmp eq i8 %304, 0 ; [#uses=1]
- br i1 %toBool.i.i.i128, label %bb2.i.i.i131, label %bb1.i.i.i130
-
-bb1.i.i.i130: ; preds = %bb.i.i.i129
- %305 = bitcast %struct.btOptimizedBvhNode* %302 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %305)
- br label %bb2.i.i.i131
-
-bb2.i.i.i131: ; preds = %bb1.i.i.i130, %bb.i.i.i129
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %16, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit: ; preds = %bb2.i.i.i131, %bb26
- store i8 0, i8* %14, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %16, align 4
- store i32 0, i32* %18, align 4
- store i32 0, i32* %20, align 4
- br label %bb27
-
-bb27: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit217
- %.sum42.pn.in = phi i32 [ %221, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit217 ], [ %301, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit ] ; [#uses=1]
- %.sum42.pn = add i32 %.sum42.pn.in, 172 ; [#uses=1]
- %nodeData.0 = getelementptr inbounds i8* %o_alignedDataBuffer, i32 %.sum42.pn ; [#uses=1]
- %306 = load i32* %2, align 4 ; [#uses=2]
- %307 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=2]
- %308 = icmp eq %struct.btBvhSubtreeInfo* %307, null ; [#uses=1]
- br i1 %308, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit127, label %bb.i.i.i124
-
-bb.i.i.i124: ; preds = %bb27
- %309 = load i8* %37, align 4 ; [#uses=1]
- %toBool.i.i.i123 = icmp eq i8 %309, 0 ; [#uses=1]
- br i1 %toBool.i.i.i123, label %bb2.i.i.i126, label %bb1.i.i.i125
-
-bb1.i.i.i125: ; preds = %bb.i.i.i124
- %310 = bitcast %struct.btBvhSubtreeInfo* %307 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %310)
- br label %bb2.i.i.i126
-
-bb2.i.i.i126: ; preds = %bb1.i.i.i125, %bb.i.i.i124
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %39, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit127
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit127: ; preds = %bb2.i.i.i126, %bb27
- store i8 0, i8* %37, align 4
- %311 = bitcast i8* %nodeData.0 to %struct.btBvhSubtreeInfo* ; [#uses=3]
- store %struct.btBvhSubtreeInfo* %311, %struct.btBvhSubtreeInfo** %39, align 4
- store i32 %306, i32* %41, align 4
- store i32 %306, i32* %43, align 4
- %312 = load i32* %2, align 4 ; [#uses=1]
- %313 = icmp sgt i32 %312, 0 ; [#uses=2]
- br i1 %toBool, label %bb35.preheader, label %bb31.preheader
-
-bb35.preheader: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit127
- br i1 %313, label %bb.nph228, label %bb36
-
-bb31.preheader: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit127
- br i1 %313, label %bb.nph225, label %bb36
-
-bb.nph225: ; preds = %bb31.preheader
- %314 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=8]
- br label %bb30
-
-bb30: ; preds = %bb30.bb30_crit_edge, %bb.nph225
- %315 = phi %struct.btBvhSubtreeInfo* [ %311, %bb.nph225 ], [ %.pre465, %bb30.bb30_crit_edge ] ; [#uses=1]
- %i.0224 = phi i32 [ 0, %bb.nph225 ], [ %347, %bb30.bb30_crit_edge ] ; [#uses=17]
- %316 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep399400 = getelementptr inbounds %struct.btBvhSubtreeInfo* %316, i32 %i.0224, i32 0, i32 0 ; [#uses=1]
- %317 = load i16* %scevgep399400, align 2 ; [#uses=1]
- %318 = tail call i16 @llvm.bswap.i16(i16 %317) nounwind ; [#uses=1]
- %scevgep401402 = getelementptr inbounds %struct.btBvhSubtreeInfo* %315, i32 %i.0224, i32 0, i32 0 ; [#uses=1]
- store i16 %318, i16* %scevgep401402, align 2
- %319 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %320 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep403 = getelementptr %struct.btBvhSubtreeInfo* %320, i32 %i.0224, i32 0, i32 1 ; [#uses=1]
- %321 = load i16* %scevgep403, align 2 ; [#uses=1]
- %322 = tail call i16 @llvm.bswap.i16(i16 %321) nounwind ; [#uses=1]
- %scevgep404 = getelementptr %struct.btBvhSubtreeInfo* %319, i32 %i.0224, i32 0, i32 1 ; [#uses=1]
- store i16 %322, i16* %scevgep404, align 2
- %323 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %324 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep405 = getelementptr %struct.btBvhSubtreeInfo* %324, i32 %i.0224, i32 0, i32 2 ; [#uses=1]
- %325 = load i16* %scevgep405, align 2 ; [#uses=1]
- %326 = tail call i16 @llvm.bswap.i16(i16 %325) nounwind ; [#uses=1]
- %scevgep406 = getelementptr %struct.btBvhSubtreeInfo* %323, i32 %i.0224, i32 0, i32 2 ; [#uses=1]
- store i16 %326, i16* %scevgep406, align 2
- %327 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %328 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep407 = getelementptr %struct.btBvhSubtreeInfo* %328, i32 %i.0224, i32 1, i32 0 ; [#uses=1]
- %329 = load i16* %scevgep407, align 2 ; [#uses=1]
- %330 = tail call i16 @llvm.bswap.i16(i16 %329) nounwind ; [#uses=1]
- %scevgep408 = getelementptr %struct.btBvhSubtreeInfo* %327, i32 %i.0224, i32 1, i32 0 ; [#uses=1]
- store i16 %330, i16* %scevgep408, align 2
- %331 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %332 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep409 = getelementptr %struct.btBvhSubtreeInfo* %332, i32 %i.0224, i32 1, i32 1 ; [#uses=1]
- %333 = load i16* %scevgep409, align 2 ; [#uses=1]
- %334 = tail call i16 @llvm.bswap.i16(i16 %333) nounwind ; [#uses=1]
- %scevgep410 = getelementptr %struct.btBvhSubtreeInfo* %331, i32 %i.0224, i32 1, i32 1 ; [#uses=1]
- store i16 %334, i16* %scevgep410, align 2
- %335 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %336 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep411 = getelementptr %struct.btBvhSubtreeInfo* %336, i32 %i.0224, i32 1, i32 2 ; [#uses=1]
- %337 = load i16* %scevgep411, align 2 ; [#uses=1]
- %338 = tail call i16 @llvm.bswap.i16(i16 %337) nounwind ; [#uses=1]
- %scevgep412 = getelementptr %struct.btBvhSubtreeInfo* %335, i32 %i.0224, i32 1, i32 2 ; [#uses=1]
- store i16 %338, i16* %scevgep412, align 2
- %339 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %340 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep413 = getelementptr %struct.btBvhSubtreeInfo* %340, i32 %i.0224, i32 2 ; [#uses=1]
- %341 = load i32* %scevgep413, align 4 ; [#uses=1]
- %342 = tail call i32 @llvm.bswap.i32(i32 %341) nounwind ; [#uses=1]
- %scevgep414 = getelementptr %struct.btBvhSubtreeInfo* %339, i32 %i.0224, i32 2 ; [#uses=1]
- store i32 %342, i32* %scevgep414, align 4
- %343 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %344 = load %struct.btBvhSubtreeInfo** %314, align 4 ; [#uses=1]
- %scevgep415 = getelementptr %struct.btBvhSubtreeInfo* %344, i32 %i.0224, i32 3 ; [#uses=1]
- %345 = load i32* %scevgep415, align 4 ; [#uses=1]
- %346 = tail call i32 @llvm.bswap.i32(i32 %345) nounwind ; [#uses=1]
- %scevgep416 = getelementptr %struct.btBvhSubtreeInfo* %343, i32 %i.0224, i32 3 ; [#uses=1]
- store i32 %346, i32* %scevgep416, align 4
- %347 = add nsw i32 %i.0224, 1 ; [#uses=2]
- %348 = load i32* %2, align 4 ; [#uses=1]
- %349 = icmp sgt i32 %348, %347 ; [#uses=1]
- br i1 %349, label %bb30.bb30_crit_edge, label %bb36
-
-bb30.bb30_crit_edge: ; preds = %bb30
- %.pre465 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- br label %bb30
-
-bb.nph228: ; preds = %bb35.preheader
- %350 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=8]
- br label %bb34
-
-bb34: ; preds = %bb34.bb34_crit_edge, %bb.nph228
- %351 = phi %struct.btBvhSubtreeInfo* [ %311, %bb.nph228 ], [ %.pre466, %bb34.bb34_crit_edge ] ; [#uses=1]
- %i33.0227 = phi i32 [ 0, %bb.nph228 ], [ %378, %bb34.bb34_crit_edge ] ; [#uses=20]
- %352 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep417418 = getelementptr inbounds %struct.btBvhSubtreeInfo* %352, i32 %i33.0227, i32 0, i32 0 ; [#uses=1]
- %353 = load i16* %scevgep417418, align 2 ; [#uses=1]
- %scevgep419420 = getelementptr inbounds %struct.btBvhSubtreeInfo* %351, i32 %i33.0227, i32 0, i32 0 ; [#uses=1]
- store i16 %353, i16* %scevgep419420, align 2
- %354 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %355 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep421 = getelementptr %struct.btBvhSubtreeInfo* %355, i32 %i33.0227, i32 0, i32 1 ; [#uses=1]
- %356 = load i16* %scevgep421, align 2 ; [#uses=1]
- %scevgep422 = getelementptr %struct.btBvhSubtreeInfo* %354, i32 %i33.0227, i32 0, i32 1 ; [#uses=1]
- store i16 %356, i16* %scevgep422, align 2
- %357 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %358 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep423 = getelementptr %struct.btBvhSubtreeInfo* %358, i32 %i33.0227, i32 0, i32 2 ; [#uses=1]
- %359 = load i16* %scevgep423, align 2 ; [#uses=1]
- %scevgep424 = getelementptr %struct.btBvhSubtreeInfo* %357, i32 %i33.0227, i32 0, i32 2 ; [#uses=1]
- store i16 %359, i16* %scevgep424, align 2
- %360 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %361 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep425 = getelementptr %struct.btBvhSubtreeInfo* %361, i32 %i33.0227, i32 1, i32 0 ; [#uses=1]
- %362 = load i16* %scevgep425, align 2 ; [#uses=1]
- %scevgep426 = getelementptr %struct.btBvhSubtreeInfo* %360, i32 %i33.0227, i32 1, i32 0 ; [#uses=1]
- store i16 %362, i16* %scevgep426, align 2
- %363 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %364 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep427 = getelementptr %struct.btBvhSubtreeInfo* %364, i32 %i33.0227, i32 1, i32 1 ; [#uses=1]
- %365 = load i16* %scevgep427, align 2 ; [#uses=1]
- %scevgep428 = getelementptr %struct.btBvhSubtreeInfo* %363, i32 %i33.0227, i32 1, i32 1 ; [#uses=1]
- store i16 %365, i16* %scevgep428, align 2
- %366 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %367 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep429 = getelementptr %struct.btBvhSubtreeInfo* %367, i32 %i33.0227, i32 1, i32 2 ; [#uses=1]
- %368 = load i16* %scevgep429, align 2 ; [#uses=1]
- %scevgep430 = getelementptr %struct.btBvhSubtreeInfo* %366, i32 %i33.0227, i32 1, i32 2 ; [#uses=1]
- store i16 %368, i16* %scevgep430, align 2
- %369 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %370 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep431 = getelementptr %struct.btBvhSubtreeInfo* %370, i32 %i33.0227, i32 2 ; [#uses=1]
- %371 = load i32* %scevgep431, align 4 ; [#uses=1]
- %scevgep432 = getelementptr %struct.btBvhSubtreeInfo* %369, i32 %i33.0227, i32 2 ; [#uses=1]
- store i32 %371, i32* %scevgep432, align 4
- %372 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %373 = load %struct.btBvhSubtreeInfo** %350, align 4 ; [#uses=1]
- %scevgep433 = getelementptr %struct.btBvhSubtreeInfo* %373, i32 %i33.0227, i32 3 ; [#uses=1]
- %374 = load i32* %scevgep433, align 4 ; [#uses=1]
- %scevgep434 = getelementptr %struct.btBvhSubtreeInfo* %372, i32 %i33.0227, i32 3 ; [#uses=1]
- store i32 %374, i32* %scevgep434, align 4
- %375 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %scevgep435 = getelementptr %struct.btBvhSubtreeInfo* %375, i32 %i33.0227, i32 4, i32 0 ; [#uses=1]
- store i32 0, i32* %scevgep435, align 4
- %376 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %scevgep436 = getelementptr %struct.btBvhSubtreeInfo* %376, i32 %i33.0227, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %scevgep436, align 4
- %377 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- %scevgep437 = getelementptr %struct.btBvhSubtreeInfo* %377, i32 %i33.0227, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %scevgep437, align 4
- %378 = add nsw i32 %i33.0227, 1 ; [#uses=2]
- %379 = load i32* %2, align 4 ; [#uses=1]
- %380 = icmp sgt i32 %379, %378 ; [#uses=1]
- br i1 %380, label %bb34.bb34_crit_edge, label %bb36
-
-bb34.bb34_crit_edge: ; preds = %bb34
- %.pre466 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=1]
- br label %bb34
-
-bb36: ; preds = %bb34, %bb30, %bb31.preheader, %bb35.preheader
- %381 = load %struct.btBvhSubtreeInfo** %39, align 4 ; [#uses=2]
- %382 = icmp eq %struct.btBvhSubtreeInfo* %381, null ; [#uses=1]
- br i1 %382, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb36
- %383 = load i8* %37, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %383, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %384 = bitcast %struct.btBvhSubtreeInfo* %381 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %384)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %39, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit: ; preds = %bb2.i.i.i, %bb36
- store i8 0, i8* %37, align 4
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %39, align 4
- store i32 0, i32* %41, align 4
- store i32 0, i32* %43, align 4
- %385 = bitcast i8* %o_alignedDataBuffer to i8** ; [#uses=1]
- store i8* null, i8** %385, align 4
- ret i8 1
-}
-
-; [#uses=0]
-define void @_ZN14btQuantizedBvhC1ERS_b(%struct.btQuantizedBvh* %this, %struct.btQuantizedBvh* nocapture %self, i8 zeroext %unnamed_arg) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuantizedBvh* %self, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 4 ; [#uses=1]
- store i32 277, i32* %37, align 4
- %38 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %38, align 4
- %39 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %39, align 4
- %40 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %40, align 4
- %41 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %41, align 4
- %42 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %42, align 4
- %43 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %43, align 4
- %44 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %44, align 4
- %45 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- %47 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %47, align 4
- %48 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %48, align 4
- %49 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %49, align 4
- %50 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %50, align 4
- %51 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %51, align 4
- %52 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %52, align 4
- %53 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %53, align 4
- %54 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %54, align 4
- %55 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %55, align 4
- %56 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btQuantizedBvh* @_ZN14btQuantizedBvh18deSerializeInPlaceEPvjb(i8* %i_alignedDataBuffer, i32 %i_dataBufferSize, i8 zeroext %i_swapEndian) align 2 {
-entry:
- %0 = icmp eq i8* %i_alignedDataBuffer, null ; [#uses=1]
- br i1 %0, label %bb28, label %bb1
-
-bb1: ; preds = %entry
- %1 = bitcast i8* %i_alignedDataBuffer to %struct.btQuantizedBvh* ; [#uses=3]
- %toBool = icmp eq i8 %i_swapEndian, 0 ; [#uses=4]
- br i1 %toBool, label %bb1.bb3_crit_edge, label %bb2
-
-bb1.bb3_crit_edge: ; preds = %bb1
- %.phi.trans.insert = getelementptr inbounds i8* %i_alignedDataBuffer, i32 168 ; [#uses=1]
- %.phi.trans.insert802 = bitcast i8* %.phi.trans.insert to i32* ; [#uses=1]
- %.pre = load i32* %.phi.trans.insert802, align 4 ; [#uses=1]
- %.phi.trans.insert803 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 56 ; [#uses=1]
- %.phi.trans.insert804 = bitcast i8* %.phi.trans.insert803 to i32* ; [#uses=1]
- %.pre805 = load i32* %.phi.trans.insert804, align 4 ; [#uses=1]
- br label %bb3
-
-bb2: ; preds = %bb1
- %2 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 56 ; [#uses=1]
- %3 = bitcast i8* %2 to i32* ; [#uses=2]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = tail call i32 @llvm.bswap.i32(i32 %4) nounwind ; [#uses=2]
- store i32 %5, i32* %3, align 4
- %6 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 4 ; [#uses=2]
- %uglygep17.i = getelementptr i8* %i_alignedDataBuffer, i32 5 ; [#uses=1]
- %uglygep20.i = getelementptr i8* %i_alignedDataBuffer, i32 6 ; [#uses=1]
- %uglygep23.i = getelementptr i8* %i_alignedDataBuffer, i32 7 ; [#uses=1]
- %7 = load i8* %uglygep23.i, align 1 ; [#uses=1]
- %tmp290 = zext i8 %7 to i128 ; [#uses=1]
- %8 = load i8* %uglygep20.i, align 1 ; [#uses=1]
- %tmp294 = zext i8 %8 to i128 ; [#uses=1]
- %tmp295 = shl i128 %tmp294, 8 ; [#uses=1]
- %9 = load i8* %uglygep17.i, align 1 ; [#uses=1]
- %tmp299 = zext i8 %9 to i128 ; [#uses=1]
- %tmp300 = shl i128 %tmp299, 16 ; [#uses=1]
- %10 = load i8* %6, align 1 ; [#uses=1]
- %tmp304 = zext i8 %10 to i128 ; [#uses=1]
- %tmp305 = shl i128 %tmp304, 24 ; [#uses=1]
- %ins297 = or i128 %tmp295, %tmp290 ; [#uses=1]
- %ins302 = or i128 %ins297, %tmp300 ; [#uses=1]
- %ins307 = or i128 %ins302, %tmp305 ; [#uses=2]
- %scevgep13.1.i = getelementptr i8* %i_alignedDataBuffer, i32 8 ; [#uses=2]
- %uglygep17.1.i = getelementptr i8* %i_alignedDataBuffer, i32 9 ; [#uses=1]
- %uglygep20.1.i = getelementptr i8* %i_alignedDataBuffer, i32 10 ; [#uses=1]
- %uglygep23.1.i = getelementptr i8* %i_alignedDataBuffer, i32 11 ; [#uses=1]
- %11 = load i8* %uglygep23.1.i, align 1 ; [#uses=1]
- %tmp270 = zext i8 %11 to i128 ; [#uses=1]
- %tmp271 = shl i128 %tmp270, 32 ; [#uses=1]
- %12 = load i8* %uglygep20.1.i, align 1 ; [#uses=1]
- %tmp275 = zext i8 %12 to i128 ; [#uses=1]
- %tmp276 = shl i128 %tmp275, 40 ; [#uses=1]
- %13 = load i8* %uglygep17.1.i, align 1 ; [#uses=1]
- %tmp280 = zext i8 %13 to i128 ; [#uses=1]
- %tmp281 = shl i128 %tmp280, 48 ; [#uses=1]
- %14 = load i8* %scevgep13.1.i, align 1 ; [#uses=1]
- %tmp285 = zext i8 %14 to i128 ; [#uses=1]
- %tmp286 = shl i128 %tmp285, 56 ; [#uses=1]
- %scevgep13.2.i = getelementptr i8* %i_alignedDataBuffer, i32 12 ; [#uses=2]
- %uglygep17.2.i = getelementptr i8* %i_alignedDataBuffer, i32 13 ; [#uses=1]
- %uglygep20.2.i = getelementptr i8* %i_alignedDataBuffer, i32 14 ; [#uses=1]
- %uglygep23.2.i = getelementptr i8* %i_alignedDataBuffer, i32 15 ; [#uses=1]
- %15 = load i8* %uglygep23.2.i, align 1 ; [#uses=1]
- %tmp246 = zext i8 %15 to i128 ; [#uses=1]
- %tmp247 = shl i128 %tmp246, 64 ; [#uses=1]
- %16 = load i8* %uglygep20.2.i, align 1 ; [#uses=1]
- %tmp251 = zext i8 %16 to i128 ; [#uses=1]
- %tmp252 = shl i128 %tmp251, 72 ; [#uses=1]
- %17 = load i8* %uglygep17.2.i, align 1 ; [#uses=1]
- %tmp256 = zext i8 %17 to i128 ; [#uses=1]
- %tmp257 = shl i128 %tmp256, 80 ; [#uses=1]
- %18 = load i8* %scevgep13.2.i, align 1 ; [#uses=1]
- %tmp261 = zext i8 %18 to i128 ; [#uses=1]
- %tmp262 = shl i128 %tmp261, 88 ; [#uses=1]
- %scevgep13.3.i = getelementptr i8* %i_alignedDataBuffer, i32 16 ; [#uses=2]
- %uglygep17.3.i = getelementptr i8* %i_alignedDataBuffer, i32 17 ; [#uses=1]
- %uglygep20.3.i = getelementptr i8* %i_alignedDataBuffer, i32 18 ; [#uses=1]
- %uglygep23.3.i = getelementptr i8* %i_alignedDataBuffer, i32 19 ; [#uses=1]
- %19 = load i8* %uglygep23.3.i, align 1 ; [#uses=1]
- %tmp224 = zext i8 %19 to i128 ; [#uses=1]
- %tmp225 = shl i128 %tmp224, 96 ; [#uses=1]
- %20 = load i8* %uglygep20.3.i, align 1 ; [#uses=1]
- %tmp227 = zext i8 %20 to i128 ; [#uses=1]
- %tmp228 = shl i128 %tmp227, 104 ; [#uses=1]
- %21 = load i8* %uglygep17.3.i, align 1 ; [#uses=1]
- %tmp232 = zext i8 %21 to i128 ; [#uses=1]
- %tmp233 = shl i128 %tmp232, 112 ; [#uses=1]
- %22 = load i8* %scevgep13.3.i, align 1 ; [#uses=1]
- %tmp237 = zext i8 %22 to i128 ; [#uses=1]
- %tmp238 = shl i128 %tmp237, 120 ; [#uses=1]
- %mask277 = or i128 %ins307, %tmp271 ; [#uses=1]
- %mask282.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask277, %tmp276 ; [#uses=1]
- %mask287.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask282.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp281 ; [#uses=1]
- %mask248.masked.masked.masked.masked.masked.masked.masked = or i128 %mask287.masked.masked.masked.masked.masked.masked.masked.masked, %tmp286 ; [#uses=2]
- %mask253.masked.masked.masked.masked.masked.masked = or i128 %mask248.masked.masked.masked.masked.masked.masked.masked, %tmp247 ; [#uses=1]
- %mask258.masked.masked.masked.masked.masked = or i128 %mask253.masked.masked.masked.masked.masked.masked, %tmp252 ; [#uses=1]
- %mask263.masked.masked.masked.masked = or i128 %mask258.masked.masked.masked.masked.masked, %tmp257 ; [#uses=1]
- %mask.masked.masked.masked = or i128 %mask263.masked.masked.masked.masked, %tmp262 ; [#uses=2]
- %mask229.masked.masked = or i128 %mask.masked.masked.masked, %tmp225 ; [#uses=1]
- %mask234.masked = or i128 %mask229.masked.masked, %tmp228 ; [#uses=1]
- %mask239 = or i128 %mask234.masked, %tmp233 ; [#uses=1]
- %ins240 = or i128 %mask239, %tmp238 ; [#uses=1]
- %tmp218 = trunc i128 %ins307 to i32 ; [#uses=1]
- %tmp219 = bitcast i32 %tmp218 to float ; [#uses=1]
- %tmp266 = lshr i128 %mask248.masked.masked.masked.masked.masked.masked.masked, 32 ; [#uses=1]
- %tmp267 = trunc i128 %tmp266 to i32 ; [#uses=1]
- %tmp268 = bitcast i32 %tmp267 to float ; [#uses=1]
- %tmp242 = lshr i128 %mask.masked.masked.masked, 64 ; [#uses=1]
- %tmp243 = trunc i128 %tmp242 to i32 ; [#uses=1]
- %tmp244 = bitcast i32 %tmp243 to float ; [#uses=1]
- %tmp221 = lshr i128 %ins240, 96 ; [#uses=1]
- %tmp222 = trunc i128 %tmp221 to i32 ; [#uses=1]
- %tmp223 = bitcast i32 %tmp222 to float ; [#uses=1]
- %23 = bitcast i8* %6 to float* ; [#uses=1]
- store float %tmp219, float* %23, align 4
- %24 = bitcast i8* %scevgep13.1.i to float* ; [#uses=1]
- store float %tmp268, float* %24, align 4
- %25 = bitcast i8* %scevgep13.2.i to float* ; [#uses=1]
- store float %tmp244, float* %25, align 4
- %26 = bitcast i8* %scevgep13.3.i to float* ; [#uses=1]
- store float %tmp223, float* %26, align 4
- %27 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 20 ; [#uses=2]
- %uglygep17.i40 = getelementptr i8* %i_alignedDataBuffer, i32 21 ; [#uses=1]
- %uglygep20.i41 = getelementptr i8* %i_alignedDataBuffer, i32 22 ; [#uses=1]
- %uglygep23.i42 = getelementptr i8* %i_alignedDataBuffer, i32 23 ; [#uses=1]
- %28 = load i8* %uglygep23.i42, align 1 ; [#uses=1]
- %tmp384 = zext i8 %28 to i128 ; [#uses=1]
- %29 = load i8* %uglygep20.i41, align 1 ; [#uses=1]
- %tmp388 = zext i8 %29 to i128 ; [#uses=1]
- %tmp389 = shl i128 %tmp388, 8 ; [#uses=1]
- %30 = load i8* %uglygep17.i40, align 1 ; [#uses=1]
- %tmp393 = zext i8 %30 to i128 ; [#uses=1]
- %tmp394 = shl i128 %tmp393, 16 ; [#uses=1]
- %31 = load i8* %27, align 1 ; [#uses=1]
- %tmp398 = zext i8 %31 to i128 ; [#uses=1]
- %tmp399 = shl i128 %tmp398, 24 ; [#uses=1]
- %ins391 = or i128 %tmp389, %tmp384 ; [#uses=1]
- %ins396 = or i128 %ins391, %tmp394 ; [#uses=1]
- %ins401 = or i128 %ins396, %tmp399 ; [#uses=2]
- %scevgep13.1.i48 = getelementptr i8* %i_alignedDataBuffer, i32 24 ; [#uses=2]
- %uglygep17.1.i50 = getelementptr i8* %i_alignedDataBuffer, i32 25 ; [#uses=1]
- %uglygep20.1.i51 = getelementptr i8* %i_alignedDataBuffer, i32 26 ; [#uses=1]
- %uglygep23.1.i52 = getelementptr i8* %i_alignedDataBuffer, i32 27 ; [#uses=1]
- %32 = load i8* %uglygep23.1.i52, align 1 ; [#uses=1]
- %tmp364 = zext i8 %32 to i128 ; [#uses=1]
- %tmp365 = shl i128 %tmp364, 32 ; [#uses=1]
- %33 = load i8* %uglygep20.1.i51, align 1 ; [#uses=1]
- %tmp369 = zext i8 %33 to i128 ; [#uses=1]
- %tmp370 = shl i128 %tmp369, 40 ; [#uses=1]
- %34 = load i8* %uglygep17.1.i50, align 1 ; [#uses=1]
- %tmp374 = zext i8 %34 to i128 ; [#uses=1]
- %tmp375 = shl i128 %tmp374, 48 ; [#uses=1]
- %35 = load i8* %scevgep13.1.i48, align 1 ; [#uses=1]
- %tmp379 = zext i8 %35 to i128 ; [#uses=1]
- %tmp380 = shl i128 %tmp379, 56 ; [#uses=1]
- %scevgep13.2.i58 = getelementptr i8* %i_alignedDataBuffer, i32 28 ; [#uses=2]
- %uglygep17.2.i60 = getelementptr i8* %i_alignedDataBuffer, i32 29 ; [#uses=1]
- %uglygep20.2.i61 = getelementptr i8* %i_alignedDataBuffer, i32 30 ; [#uses=1]
- %uglygep23.2.i62 = getelementptr i8* %i_alignedDataBuffer, i32 31 ; [#uses=1]
- %36 = load i8* %uglygep23.2.i62, align 1 ; [#uses=1]
- %tmp340 = zext i8 %36 to i128 ; [#uses=1]
- %tmp341 = shl i128 %tmp340, 64 ; [#uses=1]
- %37 = load i8* %uglygep20.2.i61, align 1 ; [#uses=1]
- %tmp345 = zext i8 %37 to i128 ; [#uses=1]
- %tmp346 = shl i128 %tmp345, 72 ; [#uses=1]
- %38 = load i8* %uglygep17.2.i60, align 1 ; [#uses=1]
- %tmp350 = zext i8 %38 to i128 ; [#uses=1]
- %tmp351 = shl i128 %tmp350, 80 ; [#uses=1]
- %39 = load i8* %scevgep13.2.i58, align 1 ; [#uses=1]
- %tmp355 = zext i8 %39 to i128 ; [#uses=1]
- %tmp356 = shl i128 %tmp355, 88 ; [#uses=1]
- %scevgep13.3.i68 = getelementptr i8* %i_alignedDataBuffer, i32 32 ; [#uses=2]
- %uglygep17.3.i70 = getelementptr i8* %i_alignedDataBuffer, i32 33 ; [#uses=1]
- %uglygep20.3.i71 = getelementptr i8* %i_alignedDataBuffer, i32 34 ; [#uses=1]
- %uglygep23.3.i72 = getelementptr i8* %i_alignedDataBuffer, i32 35 ; [#uses=1]
- %40 = load i8* %uglygep23.3.i72, align 1 ; [#uses=1]
- %tmp316 = zext i8 %40 to i128 ; [#uses=1]
- %tmp317 = shl i128 %tmp316, 96 ; [#uses=1]
- %41 = load i8* %uglygep20.3.i71, align 1 ; [#uses=1]
- %tmp321 = zext i8 %41 to i128 ; [#uses=1]
- %tmp322 = shl i128 %tmp321, 104 ; [#uses=1]
- %42 = load i8* %uglygep17.3.i70, align 1 ; [#uses=1]
- %tmp326 = zext i8 %42 to i128 ; [#uses=1]
- %tmp327 = shl i128 %tmp326, 112 ; [#uses=1]
- %43 = load i8* %scevgep13.3.i68, align 1 ; [#uses=1]
- %tmp331 = zext i8 %43 to i128 ; [#uses=1]
- %tmp332 = shl i128 %tmp331, 120 ; [#uses=1]
- %mask371 = or i128 %ins401, %tmp365 ; [#uses=1]
- %mask376.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask371, %tmp370 ; [#uses=1]
- %mask381.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask376.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp375 ; [#uses=1]
- %mask342.masked.masked.masked.masked.masked.masked.masked = or i128 %mask381.masked.masked.masked.masked.masked.masked.masked.masked, %tmp380 ; [#uses=2]
- %mask347.masked.masked.masked.masked.masked.masked = or i128 %mask342.masked.masked.masked.masked.masked.masked.masked, %tmp341 ; [#uses=1]
- %mask352.masked.masked.masked.masked.masked = or i128 %mask347.masked.masked.masked.masked.masked.masked, %tmp346 ; [#uses=1]
- %mask357.masked.masked.masked.masked = or i128 %mask352.masked.masked.masked.masked.masked, %tmp351 ; [#uses=1]
- %mask318.masked.masked.masked = or i128 %mask357.masked.masked.masked.masked, %tmp356 ; [#uses=2]
- %mask323.masked.masked = or i128 %mask318.masked.masked.masked, %tmp317 ; [#uses=1]
- %mask328.masked = or i128 %mask323.masked.masked, %tmp322 ; [#uses=1]
- %mask333 = or i128 %mask328.masked, %tmp327 ; [#uses=1]
- %ins334 = or i128 %mask333, %tmp332 ; [#uses=1]
- %tmp309 = trunc i128 %ins401 to i32 ; [#uses=1]
- %tmp310 = bitcast i32 %tmp309 to float ; [#uses=1]
- %tmp360 = lshr i128 %mask342.masked.masked.masked.masked.masked.masked.masked, 32 ; [#uses=1]
- %tmp361 = trunc i128 %tmp360 to i32 ; [#uses=1]
- %tmp362 = bitcast i32 %tmp361 to float ; [#uses=1]
- %tmp336 = lshr i128 %mask318.masked.masked.masked, 64 ; [#uses=1]
- %tmp337 = trunc i128 %tmp336 to i32 ; [#uses=1]
- %tmp338 = bitcast i32 %tmp337 to float ; [#uses=1]
- %tmp312 = lshr i128 %ins334, 96 ; [#uses=1]
- %tmp313 = trunc i128 %tmp312 to i32 ; [#uses=1]
- %tmp314 = bitcast i32 %tmp313 to float ; [#uses=1]
- %44 = bitcast i8* %27 to float* ; [#uses=1]
- store float %tmp310, float* %44, align 4
- %45 = bitcast i8* %scevgep13.1.i48 to float* ; [#uses=1]
- store float %tmp362, float* %45, align 4
- %46 = bitcast i8* %scevgep13.2.i58 to float* ; [#uses=1]
- store float %tmp338, float* %46, align 4
- %47 = bitcast i8* %scevgep13.3.i68 to float* ; [#uses=1]
- store float %tmp314, float* %47, align 4
- %48 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 36 ; [#uses=2]
- %uglygep17.i84 = getelementptr i8* %i_alignedDataBuffer, i32 37 ; [#uses=1]
- %uglygep20.i85 = getelementptr i8* %i_alignedDataBuffer, i32 38 ; [#uses=1]
- %uglygep23.i86 = getelementptr i8* %i_alignedDataBuffer, i32 39 ; [#uses=1]
- %49 = load i8* %uglygep23.i86, align 1 ; [#uses=1]
- %tmp478 = zext i8 %49 to i128 ; [#uses=1]
- %50 = load i8* %uglygep20.i85, align 1 ; [#uses=1]
- %tmp482 = zext i8 %50 to i128 ; [#uses=1]
- %tmp483 = shl i128 %tmp482, 8 ; [#uses=1]
- %51 = load i8* %uglygep17.i84, align 1 ; [#uses=1]
- %tmp487 = zext i8 %51 to i128 ; [#uses=1]
- %tmp488 = shl i128 %tmp487, 16 ; [#uses=1]
- %52 = load i8* %48, align 1 ; [#uses=1]
- %tmp492 = zext i8 %52 to i128 ; [#uses=1]
- %tmp493 = shl i128 %tmp492, 24 ; [#uses=1]
- %ins485 = or i128 %tmp483, %tmp478 ; [#uses=1]
- %ins490 = or i128 %ins485, %tmp488 ; [#uses=1]
- %ins495 = or i128 %ins490, %tmp493 ; [#uses=2]
- %scevgep13.1.i92 = getelementptr i8* %i_alignedDataBuffer, i32 40 ; [#uses=2]
- %uglygep17.1.i94 = getelementptr i8* %i_alignedDataBuffer, i32 41 ; [#uses=1]
- %uglygep20.1.i95 = getelementptr i8* %i_alignedDataBuffer, i32 42 ; [#uses=1]
- %uglygep23.1.i96 = getelementptr i8* %i_alignedDataBuffer, i32 43 ; [#uses=1]
- %53 = load i8* %uglygep23.1.i96, align 1 ; [#uses=1]
- %tmp458 = zext i8 %53 to i128 ; [#uses=1]
- %tmp459 = shl i128 %tmp458, 32 ; [#uses=1]
- %54 = load i8* %uglygep20.1.i95, align 1 ; [#uses=1]
- %tmp463 = zext i8 %54 to i128 ; [#uses=1]
- %tmp464 = shl i128 %tmp463, 40 ; [#uses=1]
- %55 = load i8* %uglygep17.1.i94, align 1 ; [#uses=1]
- %tmp468 = zext i8 %55 to i128 ; [#uses=1]
- %tmp469 = shl i128 %tmp468, 48 ; [#uses=1]
- %56 = load i8* %scevgep13.1.i92, align 1 ; [#uses=1]
- %tmp473 = zext i8 %56 to i128 ; [#uses=1]
- %tmp474 = shl i128 %tmp473, 56 ; [#uses=1]
- %scevgep13.2.i102 = getelementptr i8* %i_alignedDataBuffer, i32 44 ; [#uses=2]
- %uglygep17.2.i104 = getelementptr i8* %i_alignedDataBuffer, i32 45 ; [#uses=1]
- %uglygep20.2.i105 = getelementptr i8* %i_alignedDataBuffer, i32 46 ; [#uses=1]
- %uglygep23.2.i106 = getelementptr i8* %i_alignedDataBuffer, i32 47 ; [#uses=1]
- %57 = load i8* %uglygep23.2.i106, align 1 ; [#uses=1]
- %tmp434 = zext i8 %57 to i128 ; [#uses=1]
- %tmp435 = shl i128 %tmp434, 64 ; [#uses=1]
- %58 = load i8* %uglygep20.2.i105, align 1 ; [#uses=1]
- %tmp439 = zext i8 %58 to i128 ; [#uses=1]
- %tmp440 = shl i128 %tmp439, 72 ; [#uses=1]
- %59 = load i8* %uglygep17.2.i104, align 1 ; [#uses=1]
- %tmp444 = zext i8 %59 to i128 ; [#uses=1]
- %tmp445 = shl i128 %tmp444, 80 ; [#uses=1]
- %60 = load i8* %scevgep13.2.i102, align 1 ; [#uses=1]
- %tmp449 = zext i8 %60 to i128 ; [#uses=1]
- %tmp450 = shl i128 %tmp449, 88 ; [#uses=1]
- %scevgep13.3.i112 = getelementptr i8* %i_alignedDataBuffer, i32 48 ; [#uses=2]
- %uglygep17.3.i114 = getelementptr i8* %i_alignedDataBuffer, i32 49 ; [#uses=1]
- %uglygep20.3.i115 = getelementptr i8* %i_alignedDataBuffer, i32 50 ; [#uses=1]
- %uglygep23.3.i116 = getelementptr i8* %i_alignedDataBuffer, i32 51 ; [#uses=1]
- %61 = load i8* %uglygep23.3.i116, align 1 ; [#uses=1]
- %tmp410 = zext i8 %61 to i128 ; [#uses=1]
- %tmp411 = shl i128 %tmp410, 96 ; [#uses=1]
- %62 = load i8* %uglygep20.3.i115, align 1 ; [#uses=1]
- %tmp415 = zext i8 %62 to i128 ; [#uses=1]
- %tmp416 = shl i128 %tmp415, 104 ; [#uses=1]
- %63 = load i8* %uglygep17.3.i114, align 1 ; [#uses=1]
- %tmp420 = zext i8 %63 to i128 ; [#uses=1]
- %tmp421 = shl i128 %tmp420, 112 ; [#uses=1]
- %64 = load i8* %scevgep13.3.i112, align 1 ; [#uses=1]
- %tmp425 = zext i8 %64 to i128 ; [#uses=1]
- %tmp426 = shl i128 %tmp425, 120 ; [#uses=1]
- %mask465 = or i128 %ins495, %tmp459 ; [#uses=1]
- %mask470.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask465, %tmp464 ; [#uses=1]
- %mask475.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask470.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp469 ; [#uses=1]
- %mask436.masked.masked.masked.masked.masked.masked.masked = or i128 %mask475.masked.masked.masked.masked.masked.masked.masked.masked, %tmp474 ; [#uses=2]
- %mask441.masked.masked.masked.masked.masked.masked = or i128 %mask436.masked.masked.masked.masked.masked.masked.masked, %tmp435 ; [#uses=1]
- %mask446.masked.masked.masked.masked.masked = or i128 %mask441.masked.masked.masked.masked.masked.masked, %tmp440 ; [#uses=1]
- %mask451.masked.masked.masked.masked = or i128 %mask446.masked.masked.masked.masked.masked, %tmp445 ; [#uses=1]
- %mask412.masked.masked.masked = or i128 %mask451.masked.masked.masked.masked, %tmp450 ; [#uses=2]
- %mask417.masked.masked = or i128 %mask412.masked.masked.masked, %tmp411 ; [#uses=1]
- %mask422.masked = or i128 %mask417.masked.masked, %tmp416 ; [#uses=1]
- %mask427 = or i128 %mask422.masked, %tmp421 ; [#uses=1]
- %ins428 = or i128 %mask427, %tmp426 ; [#uses=1]
- %tmp403 = trunc i128 %ins495 to i32 ; [#uses=1]
- %tmp404 = bitcast i32 %tmp403 to float ; [#uses=1]
- %tmp454 = lshr i128 %mask436.masked.masked.masked.masked.masked.masked.masked, 32 ; [#uses=1]
- %tmp455 = trunc i128 %tmp454 to i32 ; [#uses=1]
- %tmp456 = bitcast i32 %tmp455 to float ; [#uses=1]
- %tmp430 = lshr i128 %mask412.masked.masked.masked, 64 ; [#uses=1]
- %tmp431 = trunc i128 %tmp430 to i32 ; [#uses=1]
- %tmp432 = bitcast i32 %tmp431 to float ; [#uses=1]
- %tmp406 = lshr i128 %ins428, 96 ; [#uses=1]
- %tmp407 = trunc i128 %tmp406 to i32 ; [#uses=1]
- %tmp408 = bitcast i32 %tmp407 to float ; [#uses=1]
- %65 = bitcast i8* %48 to float* ; [#uses=1]
- store float %tmp404, float* %65, align 4
- %66 = bitcast i8* %scevgep13.1.i92 to float* ; [#uses=1]
- store float %tmp456, float* %66, align 4
- %67 = bitcast i8* %scevgep13.2.i102 to float* ; [#uses=1]
- store float %tmp432, float* %67, align 4
- %68 = bitcast i8* %scevgep13.3.i112 to float* ; [#uses=1]
- store float %tmp408, float* %68, align 4
- %69 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 144 ; [#uses=1]
- %70 = bitcast i8* %69 to i32* ; [#uses=2]
- %71 = load i32* %70, align 4 ; [#uses=1]
- %72 = tail call i32 @llvm.bswap.i32(i32 %71) nounwind ; [#uses=1]
- store i32 %72, i32* %70, align 4
- %73 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 168 ; [#uses=1]
- %74 = bitcast i8* %73 to i32* ; [#uses=2]
- %75 = load i32* %74, align 4 ; [#uses=1]
- %76 = tail call i32 @llvm.bswap.i32(i32 %75) nounwind ; [#uses=2]
- store i32 %76, i32* %74, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1.bb3_crit_edge
- %77 = phi i32 [ %.pre805, %bb1.bb3_crit_edge ], [ %5, %bb2 ] ; [#uses=11]
- %78 = phi i32 [ %.pre, %bb1.bb3_crit_edge ], [ %76, %bb2 ] ; [#uses=1]
- %79 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 168 ; [#uses=1]
- %80 = bitcast i8* %79 to i32* ; [#uses=3]
- %81 = shl i32 %78, 5 ; [#uses=1]
- %82 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 60 ; [#uses=1]
- %83 = load i8* %82, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %83, 0 ; [#uses=2]
- %.pn.v.i = select i1 %toBool.i, i32 6, i32 4 ; [#uses=1]
- %.pn.i = shl i32 %77, %.pn.v.i ; [#uses=1]
- %84 = add i32 %81, 172 ; [#uses=1]
- %.0.i = add i32 %84, %.pn.i ; [#uses=1]
- %85 = icmp ugt i32 %.0.i, %i_dataBufferSize ; [#uses=1]
- br i1 %85, label %bb28, label %bb7
-
-bb7: ; preds = %bb3
- %86 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 172 ; [#uses=2]
- %87 = bitcast i8* %i_alignedDataBuffer to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %87, align 4
- %88 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 52 ; [#uses=1]
- %89 = bitcast i8* %88 to i32* ; [#uses=1]
- store i32 277, i32* %89, align 4
- %90 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 80 ; [#uses=1]
- store i8 1, i8* %90, align 4
- %91 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 76 ; [#uses=1]
- %92 = bitcast i8* %91 to %struct.btOptimizedBvhNode** ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %92, align 4
- %93 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 68 ; [#uses=1]
- %94 = bitcast i8* %93 to i32* ; [#uses=1]
- store i32 0, i32* %94, align 4
- %95 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 72 ; [#uses=1]
- %96 = bitcast i8* %95 to i32* ; [#uses=1]
- store i32 0, i32* %96, align 4
- %97 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 100 ; [#uses=2]
- store i8 1, i8* %97, align 4
- %98 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 96 ; [#uses=1]
- %99 = bitcast i8* %98 to %struct.btOptimizedBvhNode** ; [#uses=7]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %99, align 4
- %100 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 88 ; [#uses=1]
- %101 = bitcast i8* %100 to i32* ; [#uses=2]
- store i32 0, i32* %101, align 4
- %102 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 92 ; [#uses=1]
- %103 = bitcast i8* %102 to i32* ; [#uses=2]
- store i32 0, i32* %103, align 4
- %104 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 120 ; [#uses=1]
- store i8 1, i8* %104, align 4
- %105 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 116 ; [#uses=1]
- %106 = bitcast i8* %105 to %struct.BT_QUANTIZED_BVH_NODE** ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %106, align 4
- %107 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 108 ; [#uses=1]
- %108 = bitcast i8* %107 to i32* ; [#uses=1]
- store i32 0, i32* %108, align 4
- %109 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 112 ; [#uses=1]
- %110 = bitcast i8* %109 to i32* ; [#uses=1]
- store i32 0, i32* %110, align 4
- %111 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 140 ; [#uses=2]
- store i8 1, i8* %111, align 4
- %112 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 136 ; [#uses=1]
- %113 = bitcast i8* %112 to %struct.BT_QUANTIZED_BVH_NODE** ; [#uses=9]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %113, align 4
- %114 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 128 ; [#uses=1]
- %115 = bitcast i8* %114 to i32* ; [#uses=2]
- store i32 0, i32* %115, align 4
- %116 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 132 ; [#uses=1]
- %117 = bitcast i8* %116 to i32* ; [#uses=2]
- store i32 0, i32* %117, align 4
- %118 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 164 ; [#uses=3]
- store i8 1, i8* %118, align 4
- %119 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 160 ; [#uses=1]
- %120 = bitcast i8* %119 to %struct.btBvhSubtreeInfo** ; [#uses=12]
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %120, align 4
- %121 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 152 ; [#uses=1]
- %122 = bitcast i8* %121 to i32* ; [#uses=2]
- store i32 0, i32* %122, align 4
- %123 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 156 ; [#uses=1]
- %124 = bitcast i8* %123 to i32* ; [#uses=2]
- store i32 0, i32* %124, align 4
- br i1 %toBool.i, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit: ; preds = %bb7
- store i8 0, i8* %111, align 4
- %125 = bitcast i8* %86 to %struct.BT_QUANTIZED_BVH_NODE* ; [#uses=2]
- store %struct.BT_QUANTIZED_BVH_NODE* %125, %struct.BT_QUANTIZED_BVH_NODE** %113, align 4
- store i32 %77, i32* %115, align 4
- store i32 %77, i32* %117, align 4
- %toBool.not = xor i1 %toBool, true ; [#uses=1]
- %126 = icmp sgt i32 %77, 0 ; [#uses=1]
- %or.cond = and i1 %toBool.not, %126 ; [#uses=1]
- br i1 %or.cond, label %bb12, label %bb14
-
-bb12: ; preds = %bb12.bb12_crit_edge, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit
- %127 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %.pre808, %bb12.bb12_crit_edge ], [ %125, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit ] ; [#uses=1]
- %nodeIndex.0684 = phi i32 [ %148, %bb12.bb12_crit_edge ], [ 0, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit ] ; [#uses=8]
- %scevgep689 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %127, i32 %nodeIndex.0684, i32 0, i32 0 ; [#uses=2]
- %128 = load i16* %scevgep689, align 2 ; [#uses=1]
- %129 = tail call i16 @llvm.bswap.i16(i16 %128) nounwind ; [#uses=1]
- store i16 %129, i16* %scevgep689, align 2
- %130 = load %struct.BT_QUANTIZED_BVH_NODE** %113, align 4 ; [#uses=1]
- %scevgep692 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %130, i32 %nodeIndex.0684, i32 0, i32 1 ; [#uses=2]
- %131 = load i16* %scevgep692, align 2 ; [#uses=1]
- %132 = tail call i16 @llvm.bswap.i16(i16 %131) nounwind ; [#uses=1]
- store i16 %132, i16* %scevgep692, align 2
- %133 = load %struct.BT_QUANTIZED_BVH_NODE** %113, align 4 ; [#uses=1]
- %scevgep694 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %133, i32 %nodeIndex.0684, i32 0, i32 2 ; [#uses=2]
- %134 = load i16* %scevgep694, align 2 ; [#uses=1]
- %135 = tail call i16 @llvm.bswap.i16(i16 %134) nounwind ; [#uses=1]
- store i16 %135, i16* %scevgep694, align 2
- %136 = load %struct.BT_QUANTIZED_BVH_NODE** %113, align 4 ; [#uses=1]
- %scevgep696 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %136, i32 %nodeIndex.0684, i32 1, i32 0 ; [#uses=2]
- %137 = load i16* %scevgep696, align 2 ; [#uses=1]
- %138 = tail call i16 @llvm.bswap.i16(i16 %137) nounwind ; [#uses=1]
- store i16 %138, i16* %scevgep696, align 2
- %139 = load %struct.BT_QUANTIZED_BVH_NODE** %113, align 4 ; [#uses=1]
- %scevgep698 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %139, i32 %nodeIndex.0684, i32 1, i32 1 ; [#uses=2]
- %140 = load i16* %scevgep698, align 2 ; [#uses=1]
- %141 = tail call i16 @llvm.bswap.i16(i16 %140) nounwind ; [#uses=1]
- store i16 %141, i16* %scevgep698, align 2
- %142 = load %struct.BT_QUANTIZED_BVH_NODE** %113, align 4 ; [#uses=1]
- %scevgep700 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %142, i32 %nodeIndex.0684, i32 1, i32 2 ; [#uses=2]
- %143 = load i16* %scevgep700, align 2 ; [#uses=1]
- %144 = tail call i16 @llvm.bswap.i16(i16 %143) nounwind ; [#uses=1]
- store i16 %144, i16* %scevgep700, align 2
- %145 = load %struct.BT_QUANTIZED_BVH_NODE** %113, align 4 ; [#uses=1]
- %scevgep702 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %145, i32 %nodeIndex.0684, i32 2 ; [#uses=2]
- %146 = load i32* %scevgep702, align 4 ; [#uses=1]
- %147 = tail call i32 @llvm.bswap.i32(i32 %146) nounwind ; [#uses=1]
- store i32 %147, i32* %scevgep702, align 4
- %148 = add nsw i32 %nodeIndex.0684, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %148, %77 ; [#uses=1]
- br i1 %exitcond, label %bb14, label %bb12.bb12_crit_edge
-
-bb12.bb12_crit_edge: ; preds = %bb12
- %.pre808 = load %struct.BT_QUANTIZED_BVH_NODE** %113, align 4 ; [#uses=1]
- br label %bb12
-
-bb14: ; preds = %bb12, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE20initializeFromBufferEPvii.exit
- %149 = shl i32 %77, 4 ; [#uses=1]
- br label %bb22
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit: ; preds = %bb7
- store i8 0, i8* %97, align 4
- %150 = bitcast i8* %86 to %struct.btOptimizedBvhNode* ; [#uses=2]
- store %struct.btOptimizedBvhNode* %150, %struct.btOptimizedBvhNode** %99, align 4
- store i32 %77, i32* %101, align 4
- store i32 %77, i32* %103, align 4
- %toBool.not809 = xor i1 %toBool, true ; [#uses=1]
- %151 = icmp sgt i32 %77, 0 ; [#uses=1]
- %or.cond810 = and i1 %toBool.not809, %151 ; [#uses=1]
- br i1 %or.cond810, label %bb19, label %bb21
-
-bb19: ; preds = %bb19.bb19_crit_edge, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit
- %152 = phi %struct.btOptimizedBvhNode* [ %.pre806, %bb19.bb19_crit_edge ], [ %150, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit ] ; [#uses=5]
- %nodeIndex18.0685 = phi i32 [ %195, %bb19.bb19_crit_edge ], [ 0, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit ] ; [#uses=13]
- %scevgep707 = getelementptr %struct.btOptimizedBvhNode* %152, i32 %nodeIndex18.0685, i32 0, i32 0, i32 0 ; [#uses=2]
- %scevgep707708 = bitcast float* %scevgep707 to i8* ; [#uses=3]
- %uglygep23.i178 = getelementptr i8* %scevgep707708, i32 3 ; [#uses=1]
- %153 = load i8* %uglygep23.i178, align 1 ; [#uses=1]
- %tmp666 = zext i8 %153 to i128 ; [#uses=1]
- %uglygep20.i177 = getelementptr i8* %scevgep707708, i32 2 ; [#uses=1]
- %154 = load i8* %uglygep20.i177, align 1 ; [#uses=1]
- %tmp670 = zext i8 %154 to i128 ; [#uses=1]
- %tmp671 = shl i128 %tmp670, 8 ; [#uses=1]
- %uglygep17.i176 = getelementptr i8* %scevgep707708, i32 1 ; [#uses=1]
- %155 = load i8* %uglygep17.i176, align 1 ; [#uses=1]
- %tmp675 = zext i8 %155 to i128 ; [#uses=1]
- %tmp676 = shl i128 %tmp675, 16 ; [#uses=1]
- %scevgep705 = getelementptr %struct.btOptimizedBvhNode* %152, i32 %nodeIndex18.0685 ; [#uses=1]
- %scevgep1314.i175 = bitcast %struct.btOptimizedBvhNode* %scevgep705 to i8* ; [#uses=1]
- %156 = load i8* %scevgep1314.i175, align 1 ; [#uses=1]
- %tmp680 = zext i8 %156 to i128 ; [#uses=1]
- %tmp681 = shl i128 %tmp680, 24 ; [#uses=1]
- %scevgep715 = getelementptr %struct.btOptimizedBvhNode* %152, i32 %nodeIndex18.0685, i32 0, i32 0, i32 1 ; [#uses=2]
- %scevgep715716 = bitcast float* %scevgep715 to i8* ; [#uses=4]
- %uglygep23.1.i188 = getelementptr i8* %scevgep715716, i32 3 ; [#uses=1]
- %157 = load i8* %uglygep23.1.i188, align 1 ; [#uses=1]
- %tmp646 = zext i8 %157 to i128 ; [#uses=1]
- %tmp647 = shl i128 %tmp646, 32 ; [#uses=1]
- %uglygep20.1.i187 = getelementptr i8* %scevgep715716, i32 2 ; [#uses=1]
- %158 = load i8* %uglygep20.1.i187, align 1 ; [#uses=1]
- %tmp651 = zext i8 %158 to i128 ; [#uses=1]
- %tmp652 = shl i128 %tmp651, 40 ; [#uses=1]
- %uglygep17.1.i186 = getelementptr i8* %scevgep715716, i32 1 ; [#uses=1]
- %159 = load i8* %uglygep17.1.i186, align 1 ; [#uses=1]
- %tmp656 = zext i8 %159 to i128 ; [#uses=1]
- %tmp657 = shl i128 %tmp656, 48 ; [#uses=1]
- %160 = load i8* %scevgep715716, align 1 ; [#uses=1]
- %tmp661 = zext i8 %160 to i128 ; [#uses=1]
- %tmp662 = shl i128 %tmp661, 56 ; [#uses=1]
- %scevgep723 = getelementptr %struct.btOptimizedBvhNode* %152, i32 %nodeIndex18.0685, i32 0, i32 0, i32 2 ; [#uses=2]
- %scevgep723724 = bitcast float* %scevgep723 to i8* ; [#uses=4]
- %uglygep23.2.i198 = getelementptr i8* %scevgep723724, i32 3 ; [#uses=1]
- %161 = load i8* %uglygep23.2.i198, align 1 ; [#uses=1]
- %tmp622 = zext i8 %161 to i128 ; [#uses=1]
- %tmp623 = shl i128 %tmp622, 64 ; [#uses=1]
- %uglygep20.2.i197 = getelementptr i8* %scevgep723724, i32 2 ; [#uses=1]
- %162 = load i8* %uglygep20.2.i197, align 1 ; [#uses=1]
- %tmp627 = zext i8 %162 to i128 ; [#uses=1]
- %tmp628 = shl i128 %tmp627, 72 ; [#uses=1]
- %uglygep17.2.i196 = getelementptr i8* %scevgep723724, i32 1 ; [#uses=1]
- %163 = load i8* %uglygep17.2.i196, align 1 ; [#uses=1]
- %tmp632 = zext i8 %163 to i128 ; [#uses=1]
- %tmp633 = shl i128 %tmp632, 80 ; [#uses=1]
- %164 = load i8* %scevgep723724, align 1 ; [#uses=1]
- %tmp637 = zext i8 %164 to i128 ; [#uses=1]
- %tmp638 = shl i128 %tmp637, 88 ; [#uses=1]
- %scevgep731 = getelementptr %struct.btOptimizedBvhNode* %152, i32 %nodeIndex18.0685, i32 0, i32 0, i32 3 ; [#uses=2]
- %scevgep731732 = bitcast float* %scevgep731 to i8* ; [#uses=4]
- %uglygep23.3.i208 = getelementptr i8* %scevgep731732, i32 3 ; [#uses=1]
- %165 = load i8* %uglygep23.3.i208, align 1 ; [#uses=1]
- %tmp598 = zext i8 %165 to i128 ; [#uses=1]
- %tmp599 = shl i128 %tmp598, 96 ; [#uses=1]
- %uglygep20.3.i207 = getelementptr i8* %scevgep731732, i32 2 ; [#uses=1]
- %166 = load i8* %uglygep20.3.i207, align 1 ; [#uses=1]
- %tmp603 = zext i8 %166 to i128 ; [#uses=1]
- %tmp604 = shl i128 %tmp603, 104 ; [#uses=1]
- %uglygep17.3.i206 = getelementptr i8* %scevgep731732, i32 1 ; [#uses=1]
- %167 = load i8* %uglygep17.3.i206, align 1 ; [#uses=1]
- %tmp608 = zext i8 %167 to i128 ; [#uses=1]
- %tmp609 = shl i128 %tmp608, 112 ; [#uses=1]
- %mask677 = or i128 %tmp671, %tmp666 ; [#uses=1]
- %mask682 = or i128 %mask677, %tmp676 ; [#uses=1]
- %mask648.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask682, %tmp681 ; [#uses=2]
- %168 = load i8* %scevgep731732, align 1 ; [#uses=1]
- %tmp613 = zext i8 %168 to i128 ; [#uses=1]
- %tmp614 = shl i128 %tmp613, 120 ; [#uses=1]
- %mask653.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask648.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp647 ; [#uses=1]
- %mask658.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask653.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp652 ; [#uses=1]
- %mask663.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask658.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp657 ; [#uses=1]
- %mask624.masked.masked.masked.masked.masked.masked.masked = or i128 %mask663.masked.masked.masked.masked.masked.masked.masked.masked, %tmp662 ; [#uses=2]
- %mask629.masked.masked.masked.masked.masked.masked = or i128 %mask624.masked.masked.masked.masked.masked.masked.masked, %tmp623 ; [#uses=1]
- %mask634.masked.masked.masked.masked.masked = or i128 %mask629.masked.masked.masked.masked.masked.masked, %tmp628 ; [#uses=1]
- %mask639.masked.masked.masked.masked = or i128 %mask634.masked.masked.masked.masked.masked, %tmp633 ; [#uses=1]
- %mask600.masked.masked.masked = or i128 %mask639.masked.masked.masked.masked, %tmp638 ; [#uses=2]
- %mask605.masked.masked = or i128 %mask600.masked.masked.masked, %tmp599 ; [#uses=1]
- %mask610.masked = or i128 %mask605.masked.masked, %tmp604 ; [#uses=1]
- %mask615 = or i128 %mask610.masked, %tmp609 ; [#uses=1]
- %ins616 = or i128 %mask615, %tmp614 ; [#uses=1]
- %tmp591 = trunc i128 %mask648.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked to i32 ; [#uses=1]
- %tmp592 = bitcast i32 %tmp591 to float ; [#uses=1]
- %tmp642 = lshr i128 %mask624.masked.masked.masked.masked.masked.masked.masked, 32 ; [#uses=1]
- %tmp643 = trunc i128 %tmp642 to i32 ; [#uses=1]
- %tmp644 = bitcast i32 %tmp643 to float ; [#uses=1]
- %tmp618 = lshr i128 %mask600.masked.masked.masked, 64 ; [#uses=1]
- %tmp619 = trunc i128 %tmp618 to i32 ; [#uses=1]
- %tmp620 = bitcast i32 %tmp619 to float ; [#uses=1]
- %tmp594 = lshr i128 %ins616, 96 ; [#uses=1]
- %tmp595 = trunc i128 %tmp594 to i32 ; [#uses=1]
- %tmp596 = bitcast i32 %tmp595 to float ; [#uses=1]
- store float %tmp592, float* %scevgep707, align 4
- store float %tmp644, float* %scevgep715, align 4
- store float %tmp620, float* %scevgep723, align 4
- store float %tmp596, float* %scevgep731, align 4
- %169 = load %struct.btOptimizedBvhNode** %99, align 4 ; [#uses=4]
- %scevgep744 = getelementptr %struct.btOptimizedBvhNode* %169, i32 %nodeIndex18.0685, i32 1, i32 0, i32 0 ; [#uses=2]
- %scevgep744745 = bitcast float* %scevgep744 to i8* ; [#uses=4]
- %uglygep23.i134 = getelementptr i8* %scevgep744745, i32 3 ; [#uses=1]
- %170 = load i8* %uglygep23.i134, align 1 ; [#uses=1]
- %tmp572 = zext i8 %170 to i128 ; [#uses=1]
- %uglygep20.i133 = getelementptr i8* %scevgep744745, i32 2 ; [#uses=1]
- %171 = load i8* %uglygep20.i133, align 1 ; [#uses=1]
- %tmp576 = zext i8 %171 to i128 ; [#uses=1]
- %tmp577 = shl i128 %tmp576, 8 ; [#uses=1]
- %uglygep17.i132 = getelementptr i8* %scevgep744745, i32 1 ; [#uses=1]
- %172 = load i8* %uglygep17.i132, align 1 ; [#uses=1]
- %tmp581 = zext i8 %172 to i128 ; [#uses=1]
- %tmp582 = shl i128 %tmp581, 16 ; [#uses=1]
- %173 = load i8* %scevgep744745, align 1 ; [#uses=1]
- %tmp586 = zext i8 %173 to i128 ; [#uses=1]
- %tmp587 = shl i128 %tmp586, 24 ; [#uses=1]
- %scevgep752 = getelementptr %struct.btOptimizedBvhNode* %169, i32 %nodeIndex18.0685, i32 1, i32 0, i32 1 ; [#uses=2]
- %scevgep752753 = bitcast float* %scevgep752 to i8* ; [#uses=4]
- %uglygep23.1.i144 = getelementptr i8* %scevgep752753, i32 3 ; [#uses=1]
- %174 = load i8* %uglygep23.1.i144, align 1 ; [#uses=1]
- %tmp552 = zext i8 %174 to i128 ; [#uses=1]
- %tmp553 = shl i128 %tmp552, 32 ; [#uses=1]
- %uglygep20.1.i143 = getelementptr i8* %scevgep752753, i32 2 ; [#uses=1]
- %175 = load i8* %uglygep20.1.i143, align 1 ; [#uses=1]
- %tmp557 = zext i8 %175 to i128 ; [#uses=1]
- %tmp558 = shl i128 %tmp557, 40 ; [#uses=1]
- %uglygep17.1.i142 = getelementptr i8* %scevgep752753, i32 1 ; [#uses=1]
- %176 = load i8* %uglygep17.1.i142, align 1 ; [#uses=1]
- %tmp562 = zext i8 %176 to i128 ; [#uses=1]
- %tmp563 = shl i128 %tmp562, 48 ; [#uses=1]
- %177 = load i8* %scevgep752753, align 1 ; [#uses=1]
- %tmp567 = zext i8 %177 to i128 ; [#uses=1]
- %tmp568 = shl i128 %tmp567, 56 ; [#uses=1]
- %scevgep760 = getelementptr %struct.btOptimizedBvhNode* %169, i32 %nodeIndex18.0685, i32 1, i32 0, i32 2 ; [#uses=2]
- %scevgep760761 = bitcast float* %scevgep760 to i8* ; [#uses=4]
- %uglygep23.2.i154 = getelementptr i8* %scevgep760761, i32 3 ; [#uses=1]
- %178 = load i8* %uglygep23.2.i154, align 1 ; [#uses=1]
- %tmp528 = zext i8 %178 to i128 ; [#uses=1]
- %tmp529 = shl i128 %tmp528, 64 ; [#uses=1]
- %uglygep20.2.i153 = getelementptr i8* %scevgep760761, i32 2 ; [#uses=1]
- %179 = load i8* %uglygep20.2.i153, align 1 ; [#uses=1]
- %tmp533 = zext i8 %179 to i128 ; [#uses=1]
- %tmp534 = shl i128 %tmp533, 72 ; [#uses=1]
- %uglygep17.2.i152 = getelementptr i8* %scevgep760761, i32 1 ; [#uses=1]
- %180 = load i8* %uglygep17.2.i152, align 1 ; [#uses=1]
- %tmp538 = zext i8 %180 to i128 ; [#uses=1]
- %tmp539 = shl i128 %tmp538, 80 ; [#uses=1]
- %181 = load i8* %scevgep760761, align 1 ; [#uses=1]
- %tmp543 = zext i8 %181 to i128 ; [#uses=1]
- %tmp544 = shl i128 %tmp543, 88 ; [#uses=1]
- %scevgep768 = getelementptr %struct.btOptimizedBvhNode* %169, i32 %nodeIndex18.0685, i32 1, i32 0, i32 3 ; [#uses=2]
- %scevgep768769 = bitcast float* %scevgep768 to i8* ; [#uses=4]
- %uglygep23.3.i164 = getelementptr i8* %scevgep768769, i32 3 ; [#uses=1]
- %182 = load i8* %uglygep23.3.i164, align 1 ; [#uses=1]
- %tmp504 = zext i8 %182 to i128 ; [#uses=1]
- %tmp505 = shl i128 %tmp504, 96 ; [#uses=1]
- %uglygep20.3.i163 = getelementptr i8* %scevgep768769, i32 2 ; [#uses=1]
- %183 = load i8* %uglygep20.3.i163, align 1 ; [#uses=1]
- %tmp509 = zext i8 %183 to i128 ; [#uses=1]
- %tmp510 = shl i128 %tmp509, 104 ; [#uses=1]
- %uglygep17.3.i162 = getelementptr i8* %scevgep768769, i32 1 ; [#uses=1]
- %184 = load i8* %uglygep17.3.i162, align 1 ; [#uses=1]
- %tmp514 = zext i8 %184 to i128 ; [#uses=1]
- %tmp515 = shl i128 %tmp514, 112 ; [#uses=1]
- %mask583 = or i128 %tmp577, %tmp572 ; [#uses=1]
- %mask588 = or i128 %mask583, %tmp582 ; [#uses=1]
- %mask554.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask588, %tmp587 ; [#uses=2]
- %185 = load i8* %scevgep768769, align 1 ; [#uses=1]
- %tmp519 = zext i8 %185 to i128 ; [#uses=1]
- %tmp520 = shl i128 %tmp519, 120 ; [#uses=1]
- %mask559.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask554.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp553 ; [#uses=1]
- %mask564.masked.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask559.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp558 ; [#uses=1]
- %mask569.masked.masked.masked.masked.masked.masked.masked.masked = or i128 %mask564.masked.masked.masked.masked.masked.masked.masked.masked.masked, %tmp563 ; [#uses=1]
- %mask530.masked.masked.masked.masked.masked.masked.masked = or i128 %mask569.masked.masked.masked.masked.masked.masked.masked.masked, %tmp568 ; [#uses=2]
- %mask535.masked.masked.masked.masked.masked.masked = or i128 %mask530.masked.masked.masked.masked.masked.masked.masked, %tmp529 ; [#uses=1]
- %mask540.masked.masked.masked.masked.masked = or i128 %mask535.masked.masked.masked.masked.masked.masked, %tmp534 ; [#uses=1]
- %mask545.masked.masked.masked.masked = or i128 %mask540.masked.masked.masked.masked.masked, %tmp539 ; [#uses=1]
- %mask506.masked.masked.masked = or i128 %mask545.masked.masked.masked.masked, %tmp544 ; [#uses=2]
- %mask511.masked.masked = or i128 %mask506.masked.masked.masked, %tmp505 ; [#uses=1]
- %mask516.masked = or i128 %mask511.masked.masked, %tmp510 ; [#uses=1]
- %mask521 = or i128 %mask516.masked, %tmp515 ; [#uses=1]
- %ins522 = or i128 %mask521, %tmp520 ; [#uses=1]
- %tmp497 = trunc i128 %mask554.masked.masked.masked.masked.masked.masked.masked.masked.masked.masked to i32 ; [#uses=1]
- %tmp498 = bitcast i32 %tmp497 to float ; [#uses=1]
- %tmp548 = lshr i128 %mask530.masked.masked.masked.masked.masked.masked.masked, 32 ; [#uses=1]
- %tmp549 = trunc i128 %tmp548 to i32 ; [#uses=1]
- %tmp550 = bitcast i32 %tmp549 to float ; [#uses=1]
- %tmp524 = lshr i128 %mask506.masked.masked.masked, 64 ; [#uses=1]
- %tmp525 = trunc i128 %tmp524 to i32 ; [#uses=1]
- %tmp526 = bitcast i32 %tmp525 to float ; [#uses=1]
- %tmp500 = lshr i128 %ins522, 96 ; [#uses=1]
- %tmp501 = trunc i128 %tmp500 to i32 ; [#uses=1]
- %tmp502 = bitcast i32 %tmp501 to float ; [#uses=1]
- store float %tmp498, float* %scevgep744, align 4
- store float %tmp550, float* %scevgep752, align 4
- store float %tmp526, float* %scevgep760, align 4
- store float %tmp502, float* %scevgep768, align 4
- %186 = load %struct.btOptimizedBvhNode** %99, align 4 ; [#uses=1]
- %scevgep778 = getelementptr %struct.btOptimizedBvhNode* %186, i32 %nodeIndex18.0685, i32 2 ; [#uses=2]
- %187 = load i32* %scevgep778, align 4 ; [#uses=1]
- %188 = tail call i32 @llvm.bswap.i32(i32 %187) nounwind ; [#uses=1]
- store i32 %188, i32* %scevgep778, align 4
- %189 = load %struct.btOptimizedBvhNode** %99, align 4 ; [#uses=1]
- %scevgep780 = getelementptr %struct.btOptimizedBvhNode* %189, i32 %nodeIndex18.0685, i32 3 ; [#uses=2]
- %190 = load i32* %scevgep780, align 4 ; [#uses=1]
- %191 = tail call i32 @llvm.bswap.i32(i32 %190) nounwind ; [#uses=1]
- store i32 %191, i32* %scevgep780, align 4
- %192 = load %struct.btOptimizedBvhNode** %99, align 4 ; [#uses=1]
- %scevgep782 = getelementptr %struct.btOptimizedBvhNode* %192, i32 %nodeIndex18.0685, i32 4 ; [#uses=2]
- %193 = load i32* %scevgep782, align 4 ; [#uses=1]
- %194 = tail call i32 @llvm.bswap.i32(i32 %193) nounwind ; [#uses=1]
- store i32 %194, i32* %scevgep782, align 4
- %195 = add nsw i32 %nodeIndex18.0685, 1 ; [#uses=2]
- %exitcond704 = icmp eq i32 %195, %77 ; [#uses=1]
- br i1 %exitcond704, label %bb21, label %bb19.bb19_crit_edge
-
-bb19.bb19_crit_edge: ; preds = %bb19
- %.pre806 = load %struct.btOptimizedBvhNode** %99, align 4 ; [#uses=1]
- br label %bb19
-
-bb21: ; preds = %bb19, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE20initializeFromBufferEPvii.exit
- %196 = shl i32 %77, 6 ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %bb21, %bb14
- %.sum33.pn.in = phi i32 [ %149, %bb14 ], [ %196, %bb21 ] ; [#uses=1]
- %.sum33.pn = add i32 %.sum33.pn.in, 172 ; [#uses=1]
- %nodeData.0 = getelementptr inbounds i8* %i_alignedDataBuffer, i32 %.sum33.pn ; [#uses=1]
- %197 = load i32* %80, align 4 ; [#uses=2]
- %198 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=2]
- %199 = icmp eq %struct.btBvhSubtreeInfo* %198, null ; [#uses=1]
- br i1 %199, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit, label %bb.i.i.i123
-
-bb.i.i.i123: ; preds = %bb22
- %200 = load i8* %118, align 4 ; [#uses=1]
- %toBool.i.i.i122 = icmp eq i8 %200, 0 ; [#uses=1]
- br i1 %toBool.i.i.i122, label %bb2.i.i.i125, label %bb1.i.i.i124
-
-bb1.i.i.i124: ; preds = %bb.i.i.i123
- %201 = bitcast %struct.btBvhSubtreeInfo* %198 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %201)
- br label %bb2.i.i.i125
-
-bb2.i.i.i125: ; preds = %bb1.i.i.i124, %bb.i.i.i123
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %120, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit: ; preds = %bb2.i.i.i125, %bb22
- store i8 0, i8* %118, align 4
- %202 = bitcast i8* %nodeData.0 to %struct.btBvhSubtreeInfo* ; [#uses=2]
- store %struct.btBvhSubtreeInfo* %202, %struct.btBvhSubtreeInfo** %120, align 4
- store i32 %197, i32* %122, align 4
- store i32 %197, i32* %124, align 4
- br i1 %toBool, label %bb28, label %bb26.preheader
-
-bb26.preheader: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit
- %203 = load i32* %80, align 4 ; [#uses=1]
- %204 = icmp sgt i32 %203, 0 ; [#uses=1]
- br i1 %204, label %bb25, label %bb28
-
-bb25: ; preds = %bb25.bb25_crit_edge, %bb26.preheader
- %205 = phi %struct.btBvhSubtreeInfo* [ %.pre807, %bb25.bb25_crit_edge ], [ %202, %bb26.preheader ] ; [#uses=1]
- %i.0687 = phi i32 [ %229, %bb25.bb25_crit_edge ], [ 0, %bb26.preheader ] ; [#uses=9]
- %scevgep784785 = getelementptr inbounds %struct.btBvhSubtreeInfo* %205, i32 %i.0687, i32 0, i32 0 ; [#uses=2]
- %206 = load i16* %scevgep784785, align 2 ; [#uses=1]
- %207 = tail call i16 @llvm.bswap.i16(i16 %206) nounwind ; [#uses=1]
- store i16 %207, i16* %scevgep784785, align 2
- %208 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- %scevgep788 = getelementptr %struct.btBvhSubtreeInfo* %208, i32 %i.0687, i32 0, i32 1 ; [#uses=2]
- %209 = load i16* %scevgep788, align 2 ; [#uses=1]
- %210 = tail call i16 @llvm.bswap.i16(i16 %209) nounwind ; [#uses=1]
- store i16 %210, i16* %scevgep788, align 2
- %211 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- %scevgep790 = getelementptr %struct.btBvhSubtreeInfo* %211, i32 %i.0687, i32 0, i32 2 ; [#uses=2]
- %212 = load i16* %scevgep790, align 2 ; [#uses=1]
- %213 = tail call i16 @llvm.bswap.i16(i16 %212) nounwind ; [#uses=1]
- store i16 %213, i16* %scevgep790, align 2
- %214 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- %scevgep792 = getelementptr %struct.btBvhSubtreeInfo* %214, i32 %i.0687, i32 1, i32 0 ; [#uses=2]
- %215 = load i16* %scevgep792, align 2 ; [#uses=1]
- %216 = tail call i16 @llvm.bswap.i16(i16 %215) nounwind ; [#uses=1]
- store i16 %216, i16* %scevgep792, align 2
- %217 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- %scevgep794 = getelementptr %struct.btBvhSubtreeInfo* %217, i32 %i.0687, i32 1, i32 1 ; [#uses=2]
- %218 = load i16* %scevgep794, align 2 ; [#uses=1]
- %219 = tail call i16 @llvm.bswap.i16(i16 %218) nounwind ; [#uses=1]
- store i16 %219, i16* %scevgep794, align 2
- %220 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- %scevgep796 = getelementptr %struct.btBvhSubtreeInfo* %220, i32 %i.0687, i32 1, i32 2 ; [#uses=2]
- %221 = load i16* %scevgep796, align 2 ; [#uses=1]
- %222 = tail call i16 @llvm.bswap.i16(i16 %221) nounwind ; [#uses=1]
- store i16 %222, i16* %scevgep796, align 2
- %223 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- %scevgep798 = getelementptr %struct.btBvhSubtreeInfo* %223, i32 %i.0687, i32 2 ; [#uses=2]
- %224 = load i32* %scevgep798, align 4 ; [#uses=1]
- %225 = tail call i32 @llvm.bswap.i32(i32 %224) nounwind ; [#uses=1]
- store i32 %225, i32* %scevgep798, align 4
- %226 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- %scevgep800 = getelementptr %struct.btBvhSubtreeInfo* %226, i32 %i.0687, i32 3 ; [#uses=2]
- %227 = load i32* %scevgep800, align 4 ; [#uses=1]
- %228 = tail call i32 @llvm.bswap.i32(i32 %227) nounwind ; [#uses=1]
- store i32 %228, i32* %scevgep800, align 4
- %229 = add nsw i32 %i.0687, 1 ; [#uses=2]
- %230 = load i32* %80, align 4 ; [#uses=1]
- %231 = icmp sgt i32 %230, %229 ; [#uses=1]
- br i1 %231, label %bb25.bb25_crit_edge, label %bb28
-
-bb25.bb25_crit_edge: ; preds = %bb25
- %.pre807 = load %struct.btBvhSubtreeInfo** %120, align 4 ; [#uses=1]
- br label %bb25
-
-bb28: ; preds = %bb25, %bb26.preheader, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit, %bb3, %entry
- %.0 = phi %struct.btQuantizedBvh* [ null, %entry ], [ null, %bb3 ], [ %1, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE20initializeFromBufferEPvii.exit ], [ %1, %bb25 ], [ %1, %bb26.preheader ] ; [#uses=1]
- ret %struct.btQuantizedBvh* %.0
-}
-
-; [#uses=4]
-define void @_ZN14btQuantizedBvhD2Ev(%struct.btQuantizedBvh* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=3]
- %2 = load %struct.btBvhSubtreeInfo** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btBvhSubtreeInfo* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btBvhSubtreeInfo* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad44
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %1, align 4
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %11 = load %struct.BT_QUANTIZED_BVH_NODE** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i73
-
-bb.i.i.i73: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i72 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i72, label %bb2.i.i.i75, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %bb.i.i.i73
- %15 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i75 unwind label %lpad40
-
-bb2.i.i.i75: ; preds = %bb1.i.i.i74, %bb.i.i.i73
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i75, %bb3
- %16 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %10, align 4
- %17 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %20 = load %struct.BT_QUANTIZED_BVH_NODE** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i78
-
-bb.i.i.i78: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i77 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i77, label %bb2.i.i.i80, label %bb1.i.i.i79
-
-bb1.i.i.i79: ; preds = %bb.i.i.i78
- %24 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i80 unwind label %lpad36
-
-bb2.i.i.i80: ; preds = %bb1.i.i.i79, %bb.i.i.i78
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i80, %bb10
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %29 = load %struct.btOptimizedBvhNode** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btOptimizedBvhNode* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i84
-
-bb.i.i.i84: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i83 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i83, label %bb2.i.i.i86, label %bb1.i.i.i85
-
-bb1.i.i.i85: ; preds = %bb.i.i.i84
- %33 = bitcast %struct.btOptimizedBvhNode* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i86 unwind label %lpad
-
-bb2.i.i.i86: ; preds = %bb1.i.i.i85, %bb.i.i.i84
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %28, align 4
- br label %bb28
-
-invcont26: ; preds = %bb2.i.i.i102, %ppad
- %34 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %58, align 4
- %35 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb28: ; preds = %bb2.i.i.i86, %bb19
- %37 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %28, align 4
- %38 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=3]
- %41 = load %struct.btOptimizedBvhNode** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btOptimizedBvhNode* %41, null ; [#uses=1]
- br i1 %42, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit92, label %bb.i.i.i89
-
-bb.i.i.i89: ; preds = %bb28
- %43 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i88 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i88, label %bb2.i.i.i91, label %bb1.i.i.i90
-
-bb1.i.i.i90: ; preds = %bb.i.i.i89
- %45 = bitcast %struct.btOptimizedBvhNode* %41 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %45)
- br label %bb2.i.i.i91
-
-bb2.i.i.i91: ; preds = %bb1.i.i.i90, %bb.i.i.i89
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %40, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit92
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit92: ; preds = %bb2.i.i.i91, %bb28
- %46 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %40, align 4
- %47 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %48, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i85
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad36: ; preds = %bb1.i.i.i79
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad64
-
-lpad40: ; preds = %bb1.i.i.i74
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad65
-
-lpad44: ; preds = %bb1.i.i.i
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %49 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %50 = load %struct.BT_QUANTIZED_BVH_NODE** %49, align 4 ; [#uses=2]
- %51 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %50, null ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98, label %bb.i.i.i94
-
-bb.i.i.i94: ; preds = %lpad44
- %52 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %53 = load i8* %52, align 4 ; [#uses=1]
- %toBool.i.i.i93 = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i93, label %bb2.i.i.i96, label %bb1.i.i.i95
-
-bb1.i.i.i95: ; preds = %bb.i.i.i94
- %54 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %50 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %54)
- to label %bb2.i.i.i96 unwind label %lpad48
-
-bb2.i.i.i96: ; preds = %bb1.i.i.i95, %bb.i.i.i94
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %49, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98: ; preds = %bb2.i.i.i96, %lpad44
- %55 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %49, align 4
- %56 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- br label %ppad65
-
-lpad48: ; preds = %bb1.i.i.i95
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad52: ; preds = %bb1.i.i.i113
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad56: ; preds = %bb1.i.i.i107
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %bb1.i.i.i101
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110 ] ; [#uses=1]
- %58 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=3]
- %59 = load %struct.btOptimizedBvhNode** %58, align 4 ; [#uses=2]
- %60 = icmp eq %struct.btOptimizedBvhNode* %59, null ; [#uses=1]
- br i1 %60, label %invcont26, label %bb.i.i.i100
-
-bb.i.i.i100: ; preds = %ppad
- %61 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- %62 = load i8* %61, align 4 ; [#uses=1]
- %toBool.i.i.i99 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool.i.i.i99, label %bb2.i.i.i102, label %bb1.i.i.i101
-
-bb1.i.i.i101: ; preds = %bb.i.i.i100
- %63 = bitcast %struct.btOptimizedBvhNode* %59 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %63)
- to label %bb2.i.i.i102 unwind label %lpad60
-
-bb2.i.i.i102: ; preds = %bb1.i.i.i101, %bb.i.i.i100
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %58, align 4
- br label %invcont26
-
-ppad64: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116, %lpad36
- %eh_exception.1 = phi i8* [ %eh_ptr37, %lpad36 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116 ] ; [#uses=1]
- %64 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %65 = load %struct.btOptimizedBvhNode** %64, align 4 ; [#uses=2]
- %66 = icmp eq %struct.btOptimizedBvhNode* %65, null ; [#uses=1]
- br i1 %66, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110, label %bb.i.i.i106
-
-bb.i.i.i106: ; preds = %ppad64
- %67 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %68 = load i8* %67, align 4 ; [#uses=1]
- %toBool.i.i.i105 = icmp eq i8 %68, 0 ; [#uses=1]
- br i1 %toBool.i.i.i105, label %bb2.i.i.i108, label %bb1.i.i.i107
-
-bb1.i.i.i107: ; preds = %bb.i.i.i106
- %69 = bitcast %struct.btOptimizedBvhNode* %65 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %69)
- to label %bb2.i.i.i108 unwind label %lpad56
-
-bb2.i.i.i108: ; preds = %bb1.i.i.i107, %bb.i.i.i106
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %64, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeED1Ev.exit110: ; preds = %bb2.i.i.i108, %ppad64
- %70 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %70, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %64, align 4
- %71 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %71, align 4
- %72 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %72, align 4
- br label %ppad
-
-ppad65: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98, %lpad40
- %eh_exception.0 = phi i8* [ %eh_ptr41, %lpad40 ], [ %eh_ptr45, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit98 ] ; [#uses=1]
- %73 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %74 = load %struct.BT_QUANTIZED_BVH_NODE** %73, align 4 ; [#uses=2]
- %75 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %74, null ; [#uses=1]
- br i1 %75, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116, label %bb.i.i.i112
-
-bb.i.i.i112: ; preds = %ppad65
- %76 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %77 = load i8* %76, align 4 ; [#uses=1]
- %toBool.i.i.i111 = icmp eq i8 %77, 0 ; [#uses=1]
- br i1 %toBool.i.i.i111, label %bb2.i.i.i114, label %bb1.i.i.i113
-
-bb1.i.i.i113: ; preds = %bb.i.i.i112
- %78 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %74 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %78)
- to label %bb2.i.i.i114 unwind label %lpad52
-
-bb2.i.i.i114: ; preds = %bb1.i.i.i113, %bb.i.i.i112
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %73, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeED1Ev.exit116: ; preds = %bb2.i.i.i114, %ppad65
- %79 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %79, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %73, align 4
- %80 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %80, align 4
- %81 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %81, align 4
- br label %ppad64
-}
-
-; [#uses=1]
-define void @_ZN14btQuantizedBvhC1Ev(%struct.btQuantizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV14btQuantizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 4 ; [#uses=1]
- store i32 277, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %3, align 4
- %4 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %4, align 4
- %5 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- %8 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %8, align 4
- %9 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %11, align 4
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %12, align 4
- %13 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %15, align 4
- %16 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %16, align 4
- %17 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %20, align 4
- %21 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 3 ; [#uses=1]
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %21, align 4
- %22 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 1 ; [#uses=1]
- store i32 0, i32* %22, align 4
- %23 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 12, i32 2 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 13 ; [#uses=1]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %25, align 4
- %26 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %30, align 4
- %31 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- ret void
-}
-
-; [#uses=263]
-declare float @sqrtf(float) nounwind readonly
-
-; [#uses=2]
-define void @_ZNK14btQuantizedBvh36walkStacklessQuantizedTreeAgainstRayEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* nocapture %raySource, %struct.btQuadWord* nocapture %rayTarget, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, i32 %startNodeIndex, i32 %endNodeIndex) align 2 {
-entry:
- %bounds = alloca [2 x %struct.btQuadWord], align 8 ; [#uses=14]
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %1 = load %struct.BT_QUANTIZED_BVH_NODE** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %1, i32 %startNodeIndex ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %rayTarget, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btQuadWord* %raySource, i32 0, i32 0, i32 2 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=5]
- %7 = fsub float %4, %6 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btQuadWord* %rayTarget, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=5]
- %10 = getelementptr inbounds %struct.btQuadWord* %raySource, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=5]
- %12 = fsub float %9, %11 ; [#uses=4]
- %13 = getelementptr inbounds %struct.btQuadWord* %rayTarget, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=5]
- %15 = getelementptr inbounds %struct.btQuadWord* %raySource, i32 0, i32 0, i32 0 ; [#uses=2]
- %16 = load float* %15, align 4 ; [#uses=5]
- %17 = fsub float %14, %16 ; [#uses=4]
- %18 = fmul float %17, %17 ; [#uses=1]
- %19 = fmul float %12, %12 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- %21 = fmul float %7, %7 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- %23 = call float @sqrtf(float %22) nounwind readonly ; [#uses=1]
- %24 = fdiv float 1.000000e+00, %23 ; [#uses=3]
- %25 = fmul float %17, %24 ; [#uses=3]
- %26 = fmul float %12, %24 ; [#uses=3]
- %27 = fmul float %7, %24 ; [#uses=3]
- %28 = fmul float %25, %17 ; [#uses=1]
- %29 = fmul float %26, %12 ; [#uses=1]
- %30 = fadd float %28, %29 ; [#uses=1]
- %31 = fmul float %27, %7 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fcmp une float %25, 0.000000e+00 ; [#uses=1]
- br i1 %33, label %bb, label %bb2
-
-bb: ; preds = %entry
- %34 = fdiv float 1.000000e+00, %25 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %iftmp.234.0 = phi float [ %34, %bb ], [ 0x43ABC16D60000000, %entry ] ; [#uses=3]
- %35 = fcmp une float %26, 0.000000e+00 ; [#uses=1]
- br i1 %35, label %bb3, label %bb5
-
-bb3: ; preds = %bb2
- %36 = fdiv float 1.000000e+00, %26 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb2
- %iftmp.235.0 = phi float [ %36, %bb3 ], [ 0x43ABC16D60000000, %bb2 ] ; [#uses=3]
- %37 = fcmp une float %27, 0.000000e+00 ; [#uses=1]
- br i1 %37, label %bb6, label %bb8
-
-bb6: ; preds = %bb5
- %38 = fdiv float 1.000000e+00, %27 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb6, %bb5
- %iftmp.236.0 = phi float [ %38, %bb6 ], [ 0x43ABC16D60000000, %bb5 ] ; [#uses=3]
- %39 = fcmp olt float %14, %16 ; [#uses=1]
- %rayAabbMin.0.0.0 = select i1 %39, float %14, float %16 ; [#uses=1]
- %40 = fcmp olt float %9, %11 ; [#uses=1]
- %rayAabbMin.0.1.0 = select i1 %40, float %9, float %11 ; [#uses=1]
- %41 = fcmp olt float %4, %6 ; [#uses=1]
- %rayAabbMin.0.2.0 = select i1 %41, float %4, float %6 ; [#uses=1]
- %42 = fcmp olt float %16, %14 ; [#uses=1]
- %rayAabbMax.0.0.0 = select i1 %42, float %14, float %16 ; [#uses=1]
- %43 = fcmp olt float %11, %9 ; [#uses=1]
- %rayAabbMax.0.1.0 = select i1 %43, float %9, float %11 ; [#uses=1]
- %44 = fcmp olt float %6, %4 ; [#uses=1]
- %rayAabbMax.0.2.0 = select i1 %44, float %4, float %6 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %rayAabbMin.0.0.0, %46 ; [#uses=2]
- %48 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %rayAabbMin.0.1.0, %49 ; [#uses=2]
- %51 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fadd float %rayAabbMin.0.2.0, %52 ; [#uses=2]
- %54 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fadd float %rayAabbMax.0.0.0, %55 ; [#uses=2]
- %57 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fadd float %rayAabbMax.0.1.0, %58 ; [#uses=2]
- %60 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fadd float %rayAabbMax.0.2.0, %61 ; [#uses=2]
- %63 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %64 = load float* %63, align 4 ; [#uses=6]
- %65 = fcmp olt float %47, %64 ; [#uses=1]
- %clampedPoint.0.0.0.i29 = select i1 %65, float %64, float %47 ; [#uses=2]
- %66 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %67 = load float* %66, align 4 ; [#uses=6]
- %68 = fcmp olt float %50, %67 ; [#uses=1]
- %clampedPoint.0.1.0.i30 = select i1 %68, float %67, float %50 ; [#uses=2]
- %69 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %70 = load float* %69, align 4 ; [#uses=6]
- %71 = fcmp olt float %53, %70 ; [#uses=1]
- %clampedPoint.0.2.0.i31 = select i1 %71, float %70, float %53 ; [#uses=2]
- %72 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=4]
- %74 = fcmp olt float %73, %clampedPoint.0.0.0.i29 ; [#uses=1]
- %clampedPoint.0.0.1.i32 = select i1 %74, float %73, float %clampedPoint.0.0.0.i29 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=4]
- %77 = fcmp olt float %76, %clampedPoint.0.1.0.i30 ; [#uses=1]
- %clampedPoint.0.1.1.i33 = select i1 %77, float %76, float %clampedPoint.0.1.0.i30 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=4]
- %80 = fcmp olt float %79, %clampedPoint.0.2.0.i31 ; [#uses=1]
- %clampedPoint.0.2.1.i34 = select i1 %80, float %79, float %clampedPoint.0.2.0.i31 ; [#uses=1]
- %81 = fsub float %clampedPoint.0.2.1.i34, %70 ; [#uses=1]
- %82 = fsub float %clampedPoint.0.1.1.i33, %67 ; [#uses=1]
- %83 = fsub float %clampedPoint.0.0.1.i32, %64 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %85 = load float* %84, align 4 ; [#uses=2]
- %86 = fmul float %81, %85 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %88 = load float* %87, align 4 ; [#uses=2]
- %89 = fmul float %82, %88 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %91 = load float* %90, align 4 ; [#uses=2]
- %92 = fmul float %83, %91 ; [#uses=1]
- %93 = fptoui float %92 to i16 ; [#uses=1]
- %94 = and i16 %93, -2 ; [#uses=1]
- %95 = fptoui float %89 to i16 ; [#uses=1]
- %96 = and i16 %95, -2 ; [#uses=1]
- %97 = fptoui float %86 to i16 ; [#uses=1]
- %98 = and i16 %97, -2 ; [#uses=1]
- %99 = fcmp olt float %56, %64 ; [#uses=1]
- %clampedPoint.0.0.0.i = select i1 %99, float %64, float %56 ; [#uses=2]
- %100 = fcmp olt float %59, %67 ; [#uses=1]
- %clampedPoint.0.1.0.i = select i1 %100, float %67, float %59 ; [#uses=2]
- %101 = fcmp olt float %62, %70 ; [#uses=1]
- %clampedPoint.0.2.0.i = select i1 %101, float %70, float %62 ; [#uses=2]
- %102 = fcmp olt float %73, %clampedPoint.0.0.0.i ; [#uses=1]
- %clampedPoint.0.0.1.i = select i1 %102, float %73, float %clampedPoint.0.0.0.i ; [#uses=1]
- %103 = fcmp olt float %76, %clampedPoint.0.1.0.i ; [#uses=1]
- %clampedPoint.0.1.1.i = select i1 %103, float %76, float %clampedPoint.0.1.0.i ; [#uses=1]
- %104 = fcmp olt float %79, %clampedPoint.0.2.0.i ; [#uses=1]
- %clampedPoint.0.2.1.i = select i1 %104, float %79, float %clampedPoint.0.2.0.i ; [#uses=1]
- %105 = fsub float %clampedPoint.0.2.1.i, %70 ; [#uses=1]
- %106 = fsub float %clampedPoint.0.1.1.i, %67 ; [#uses=1]
- %107 = fsub float %clampedPoint.0.0.1.i, %64 ; [#uses=1]
- %108 = fmul float %105, %85 ; [#uses=1]
- %109 = fmul float %106, %88 ; [#uses=1]
- %110 = fmul float %107, %91 ; [#uses=1]
- %111 = fadd float %110, 1.000000e+00 ; [#uses=1]
- %112 = fptoui float %111 to i16 ; [#uses=1]
- %113 = or i16 %112, 1 ; [#uses=1]
- %114 = fadd float %109, 1.000000e+00 ; [#uses=1]
- %115 = fptoui float %114 to i16 ; [#uses=1]
- %116 = or i16 %115, 1 ; [#uses=1]
- %117 = fadd float %108, 1.000000e+00 ; [#uses=1]
- %118 = fptoui float %117 to i16 ; [#uses=1]
- %119 = or i16 %118, 1 ; [#uses=1]
- %120 = icmp slt i32 %startNodeIndex, %endNodeIndex ; [#uses=1]
- br i1 %120, label %bb.nph78, label %bb24
-
-bb.nph78: ; preds = %bb8
- %121 = fcmp olt float %iftmp.236.0, 0.000000e+00 ; [#uses=1]
- %122 = fcmp olt float %iftmp.235.0, 0.000000e+00 ; [#uses=1]
- %123 = fcmp olt float %iftmp.234.0, 0.000000e+00 ; [#uses=1]
- %124 = zext i1 %121 to i32 ; [#uses=2]
- %125 = zext i1 %122 to i32 ; [#uses=2]
- %126 = zext i1 %123 to i32 ; [#uses=2]
- %127 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %128 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %129 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %130 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %131 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %132 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %133 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %134 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %135 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %126, i32 0, i32 0 ; [#uses=1]
- %136 = xor i32 %126, 1 ; [#uses=1]
- %137 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %136, i32 0, i32 0 ; [#uses=1]
- %138 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %125, i32 0, i32 1 ; [#uses=1]
- %139 = xor i32 %125, 1 ; [#uses=1]
- %140 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %139, i32 0, i32 1 ; [#uses=1]
- %141 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %124, i32 0, i32 2 ; [#uses=1]
- %142 = xor i32 %124, 1 ; [#uses=1]
- %143 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %142, i32 0, i32 2 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btActionInterface* %nodeCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb23.backedge, %bb.nph78
- %rootNode.076 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %2, %bb.nph78 ], [ %rootNode.0.be, %bb23.backedge ] ; [#uses=9]
- %walkIterations.075 = phi i32 [ 0, %bb.nph78 ], [ %tmp, %bb23.backedge ] ; [#uses=1]
- %curIndex.074 = phi i32 [ %startNodeIndex, %bb.nph78 ], [ %curIndex.0.be, %bb23.backedge ] ; [#uses=2]
- %tmp = add i32 %walkIterations.075, 1 ; [#uses=2]
- %145 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 0, i32 1, i32 0 ; [#uses=2]
- %146 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 0, i32 0, i32 0 ; [#uses=1]
- %147 = load i16* %145, align 2 ; [#uses=1]
- %148 = icmp ule i16 %94, %147 ; [#uses=1]
- %149 = load i16* %146, align 2 ; [#uses=2]
- %150 = icmp uge i16 %113, %149 ; [#uses=1]
- %151 = and i1 %148, %150 ; [#uses=1]
- %152 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 0, i32 1, i32 2 ; [#uses=2]
- %153 = load i16* %152, align 2 ; [#uses=1]
- %154 = icmp ule i16 %98, %153 ; [#uses=1]
- %155 = and i1 %151, %154 ; [#uses=1]
- %156 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 0, i32 0, i32 2 ; [#uses=1]
- %157 = load i16* %156, align 2 ; [#uses=2]
- %158 = icmp uge i16 %119, %157 ; [#uses=1]
- %159 = and i1 %155, %158 ; [#uses=1]
- %160 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 0, i32 1, i32 1 ; [#uses=2]
- %161 = load i16* %160, align 2 ; [#uses=1]
- %162 = icmp ule i16 %96, %161 ; [#uses=1]
- %163 = and i1 %159, %162 ; [#uses=1]
- %164 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 0, i32 0, i32 1 ; [#uses=1]
- %165 = load i16* %164, align 2 ; [#uses=2]
- %166 = icmp uge i16 %116, %165 ; [#uses=1]
- %167 = and i1 %163, %166 ; [#uses=1]
- %168 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 0, i32 2 ; [#uses=3]
- %169 = load i32* %168, align 4 ; [#uses=1]
- %.lobit.i = lshr i32 %169, 31 ; [#uses=1]
- %tmp.i = trunc i32 %.lobit.i to i8 ; [#uses=2]
- br i1 %167, label %bb13, label %bb18
-
-bb13: ; preds = %bb9
- %170 = uitofp i16 %157 to float ; [#uses=1]
- %171 = load float* %84, align 4 ; [#uses=2]
- %172 = fdiv float %170, %171 ; [#uses=1]
- %173 = uitofp i16 %165 to float ; [#uses=1]
- %174 = load float* %87, align 4 ; [#uses=2]
- %175 = fdiv float %173, %174 ; [#uses=1]
- %176 = uitofp i16 %149 to float ; [#uses=1]
- %177 = load float* %90, align 4 ; [#uses=2]
- %178 = fdiv float %176, %177 ; [#uses=1]
- %179 = load float* %63, align 4 ; [#uses=2]
- %180 = fadd float %178, %179 ; [#uses=2]
- %181 = load float* %66, align 4 ; [#uses=2]
- %182 = fadd float %175, %181 ; [#uses=2]
- %183 = load float* %69, align 4 ; [#uses=2]
- %184 = fadd float %172, %183 ; [#uses=2]
- store float %180, float* %127, align 8
- store float %182, float* %128, align 4
- store float %184, float* %129, align 8
- store float 0.000000e+00, float* %130, align 4
- %185 = load i16* %152, align 2 ; [#uses=1]
- %186 = uitofp i16 %185 to float ; [#uses=1]
- %187 = fdiv float %186, %171 ; [#uses=1]
- %188 = load i16* %160, align 2 ; [#uses=1]
- %189 = uitofp i16 %188 to float ; [#uses=1]
- %190 = fdiv float %189, %174 ; [#uses=1]
- %191 = load i16* %145, align 2 ; [#uses=1]
- %192 = uitofp i16 %191 to float ; [#uses=1]
- %193 = fdiv float %192, %177 ; [#uses=1]
- %194 = fadd float %193, %179 ; [#uses=1]
- %195 = fadd float %190, %181 ; [#uses=1]
- %196 = fadd float %187, %183 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- %197 = load float* %54, align 4 ; [#uses=1]
- %198 = fsub float %180, %197 ; [#uses=1]
- store float %198, float* %127, align 8
- %199 = load float* %57, align 4 ; [#uses=1]
- %200 = fsub float %182, %199 ; [#uses=1]
- store float %200, float* %128, align 4
- %201 = load float* %60, align 4 ; [#uses=1]
- %202 = fsub float %184, %201 ; [#uses=1]
- store float %202, float* %129, align 8
- %203 = load float* %45, align 4 ; [#uses=1]
- %204 = fsub float %194, %203 ; [#uses=1]
- store float %204, float* %131, align 8
- %205 = load float* %48, align 4 ; [#uses=1]
- %206 = fsub float %195, %205 ; [#uses=1]
- store float %206, float* %132, align 4
- %207 = load float* %51, align 4 ; [#uses=1]
- %208 = fsub float %196, %207 ; [#uses=1]
- store float %208, float* %133, align 8
- %209 = load float* %135, align 8 ; [#uses=1]
- %210 = load float* %15, align 4 ; [#uses=2]
- %211 = fsub float %209, %210 ; [#uses=1]
- %212 = fmul float %211, %iftmp.234.0 ; [#uses=3]
- %213 = load float* %137, align 8 ; [#uses=1]
- %214 = fsub float %213, %210 ; [#uses=1]
- %215 = fmul float %214, %iftmp.234.0 ; [#uses=3]
- %216 = load float* %138, align 4 ; [#uses=1]
- %217 = load float* %10, align 4 ; [#uses=2]
- %218 = fsub float %216, %217 ; [#uses=1]
- %219 = fmul float %218, %iftmp.235.0 ; [#uses=3]
- %220 = load float* %140, align 4 ; [#uses=1]
- %221 = fsub float %220, %217 ; [#uses=1]
- %222 = fmul float %221, %iftmp.235.0 ; [#uses=3]
- %223 = fcmp ogt float %212, %222 ; [#uses=1]
- %224 = fcmp ogt float %219, %215 ; [#uses=1]
- %or.cond.i = or i1 %223, %224 ; [#uses=1]
- br i1 %or.cond.i, label %bb18, label %bb2.i
-
-bb2.i: ; preds = %bb13
- %225 = fcmp olt float %212, %219 ; [#uses=1]
- %226 = select i1 %225, float %219, float %212 ; [#uses=3]
- %227 = fcmp olt float %222, %215 ; [#uses=1]
- %tmax.0.i = select i1 %227, float %222, float %215 ; [#uses=3]
- %228 = load float* %141, align 8 ; [#uses=1]
- %229 = load float* %5, align 4 ; [#uses=2]
- %230 = fsub float %228, %229 ; [#uses=1]
- %231 = fmul float %230, %iftmp.236.0 ; [#uses=3]
- %232 = load float* %143, align 8 ; [#uses=1]
- %233 = fsub float %232, %229 ; [#uses=1]
- %234 = fmul float %233, %iftmp.236.0 ; [#uses=3]
- %235 = fcmp ogt float %226, %234 ; [#uses=1]
- %236 = fcmp ogt float %231, %tmax.0.i ; [#uses=1]
- %or.cond21.i = or i1 %235, %236 ; [#uses=1]
- br i1 %or.cond21.i, label %bb18, label %bb9.i
-
-bb9.i: ; preds = %bb2.i
- %237 = fcmp olt float %226, %231 ; [#uses=1]
- %238 = select i1 %237, float %231, float %226 ; [#uses=1]
- %239 = fcmp olt float %234, %tmax.0.i ; [#uses=1]
- %tmax.1.i = select i1 %239, float %234, float %tmax.0.i ; [#uses=1]
- %240 = fcmp uge float %238, %32 ; [#uses=1]
- %241 = fcmp ule float %tmax.1.i, 0.000000e+00 ; [#uses=1]
- %or.cond22.i = or i1 %240, %241 ; [#uses=2]
- %242 = zext i1 %or.cond22.i to i32 ; [#uses=1]
- %iftmp.131.0.i = xor i32 %242, 1 ; [#uses=2]
- %toBool = icmp eq i8 %tmp.i, 1 ; [#uses=1]
- %or.cond = or i1 %toBool, %or.cond22.i ; [#uses=1]
- br i1 %or.cond, label %bb18, label %bb17
-
-bb17: ; preds = %bb9.i
- %243 = load i32 (...)*** %144, align 4 ; [#uses=1]
- %244 = getelementptr inbounds i32 (...)** %243, i32 2 ; [#uses=1]
- %245 = load i32 (...)** %244, align 4 ; [#uses=1]
- %246 = load i32* %168, align 4 ; [#uses=2]
- %247 = and i32 %246, 2097151 ; [#uses=1]
- %248 = ashr i32 %246, 21 ; [#uses=1]
- %249 = bitcast i32 (...)* %245 to void (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- call void %249(%struct.btActionInterface* %nodeCallback, i32 %248, i32 %247)
- br label %bb18
-
-bb18: ; preds = %bb17, %bb9.i, %bb2.i, %bb13, %bb9
- %rayBoxOverlap.072 = phi i32 [ %iftmp.131.0.i, %bb9.i ], [ %iftmp.131.0.i, %bb17 ], [ 0, %bb9 ], [ 0, %bb2.i ], [ 0, %bb13 ] ; [#uses=1]
- %250 = icmp eq i32 %rayBoxOverlap.072, 0 ; [#uses=1]
- %toBool20 = icmp eq i8 %tmp.i, 1 ; [#uses=1]
- %or.cond28 = and i1 %250, %toBool20 ; [#uses=1]
- br i1 %or.cond28, label %bb22, label %bb21
-
-bb21: ; preds = %bb18
- %251 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 1 ; [#uses=1]
- %252 = add nsw i32 %curIndex.074, 1 ; [#uses=1]
- br label %bb23.backedge
-
-bb23.backedge: ; preds = %bb22, %bb21
- %curIndex.0.be = phi i32 [ %252, %bb21 ], [ %257, %bb22 ] ; [#uses=2]
- %rootNode.0.be = phi %struct.BT_QUANTIZED_BVH_NODE* [ %251, %bb21 ], [ %256, %bb22 ] ; [#uses=1]
- %253 = icmp slt i32 %curIndex.0.be, %endNodeIndex ; [#uses=1]
- br i1 %253, label %bb9, label %bb24
-
-bb22: ; preds = %bb18
- %254 = load i32* %168, align 4 ; [#uses=2]
- %255 = sub nsw i32 0, %254 ; [#uses=1]
- %256 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %rootNode.076, i32 %255 ; [#uses=1]
- %257 = sub i32 %curIndex.074, %254 ; [#uses=1]
- br label %bb23.backedge
-
-bb24: ; preds = %bb23.backedge, %bb8
- %walkIterations.0.lcssa = phi i32 [ 0, %bb8 ], [ %tmp, %bb23.backedge ] ; [#uses=2]
- %258 = load i32* @maxIterations, align 4 ; [#uses=1]
- %259 = icmp slt i32 %258, %walkIterations.0.lcssa ; [#uses=1]
- br i1 %259, label %bb25, label %return
-
-bb25: ; preds = %bb24
- store i32 %walkIterations.0.lcssa, i32* @maxIterations, align 4
- ret void
-
-return: ; preds = %bb24
- ret void
-}
-
-; [#uses=2]
-define void @_ZNK14btQuantizedBvh27walkStacklessTreeAgainstRayEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_ii(%struct.btQuantizedBvh* nocapture %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* nocapture %raySource, %struct.btQuadWord* nocapture %rayTarget, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, i32 %startNodeIndex, i32 %endNodeIndex) align 2 {
-entry:
- %bounds = alloca [2 x %struct.btQuadWord], align 8 ; [#uses=14]
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %1 = load %struct.btOptimizedBvhNode** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %raySource, i32 0, i32 0, i32 0 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btQuadWord* %raySource, i32 0, i32 0, i32 1 ; [#uses=2]
- %5 = load float* %4, align 4 ; [#uses=5]
- %6 = getelementptr inbounds %struct.btQuadWord* %raySource, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=5]
- %8 = getelementptr inbounds %struct.btQuadWord* %rayTarget, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=5]
- %10 = fcmp olt float %9, %3 ; [#uses=1]
- %rayAabbMin.0.0.0 = select i1 %10, float %9, float %3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %rayTarget, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=5]
- %13 = fcmp olt float %12, %5 ; [#uses=1]
- %rayAabbMin.0.1.0 = select i1 %13, float %12, float %5 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %rayTarget, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=5]
- %16 = fcmp olt float %15, %7 ; [#uses=1]
- %rayAabbMin.0.2.0 = select i1 %16, float %15, float %7 ; [#uses=1]
- %17 = fcmp olt float %3, %9 ; [#uses=1]
- %rayAabbMax.0.0.0 = select i1 %17, float %9, float %3 ; [#uses=1]
- %18 = fcmp olt float %5, %12 ; [#uses=1]
- %rayAabbMax.0.1.0 = select i1 %18, float %12, float %5 ; [#uses=1]
- %19 = fcmp olt float %7, %15 ; [#uses=1]
- %rayAabbMax.0.2.0 = select i1 %19, float %15, float %7 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %rayAabbMin.0.0.0, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %rayAabbMin.0.1.0, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fadd float %rayAabbMin.0.2.0, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fadd float %rayAabbMax.0.0.0, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fadd float %rayAabbMax.0.1.0, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fadd float %rayAabbMax.0.2.0, %36 ; [#uses=1]
- %38 = fsub float %15, %7 ; [#uses=4]
- %39 = fsub float %12, %5 ; [#uses=4]
- %40 = fsub float %9, %3 ; [#uses=4]
- %41 = fmul float %40, %40 ; [#uses=1]
- %42 = fmul float %39, %39 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=1]
- %44 = fmul float %38, %38 ; [#uses=1]
- %45 = fadd float %43, %44 ; [#uses=1]
- %46 = call float @sqrtf(float %45) nounwind readonly ; [#uses=1]
- %47 = fdiv float 1.000000e+00, %46 ; [#uses=3]
- %48 = fmul float %40, %47 ; [#uses=3]
- %49 = fmul float %39, %47 ; [#uses=3]
- %50 = fmul float %38, %47 ; [#uses=3]
- %51 = fmul float %48, %40 ; [#uses=1]
- %52 = fmul float %49, %39 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=1]
- %54 = fmul float %50, %38 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fcmp une float %48, 0.000000e+00 ; [#uses=1]
- br i1 %56, label %bb, label %bb2
-
-bb: ; preds = %entry
- %57 = fdiv float 1.000000e+00, %48 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %iftmp.228.0 = phi float [ %57, %bb ], [ 0x43ABC16D60000000, %entry ] ; [#uses=3]
- %58 = fcmp une float %49, 0.000000e+00 ; [#uses=1]
- br i1 %58, label %bb3, label %bb5
-
-bb3: ; preds = %bb2
- %59 = fdiv float 1.000000e+00, %49 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb2
- %iftmp.229.0 = phi float [ %59, %bb3 ], [ 0x43ABC16D60000000, %bb2 ] ; [#uses=3]
- %60 = fcmp une float %50, 0.000000e+00 ; [#uses=1]
- br i1 %60, label %bb6, label %bb23.preheader
-
-bb6: ; preds = %bb5
- %61 = fdiv float 1.000000e+00, %50 ; [#uses=1]
- br label %bb23.preheader
-
-bb23.preheader: ; preds = %bb6, %bb5
- %iftmp.230.0 = phi float [ %61, %bb6 ], [ 0x43ABC16D60000000, %bb5 ] ; [#uses=3]
- %62 = fcmp olt float %iftmp.228.0, 0.000000e+00 ; [#uses=1]
- %63 = zext i1 %62 to i32 ; [#uses=2]
- %64 = fcmp olt float %iftmp.229.0, 0.000000e+00 ; [#uses=1]
- %65 = zext i1 %64 to i32 ; [#uses=2]
- %66 = fcmp olt float %iftmp.230.0, 0.000000e+00 ; [#uses=1]
- %67 = zext i1 %66 to i32 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=2]
- %69 = load i32* %68, align 4 ; [#uses=1]
- %70 = icmp sgt i32 %69, 0 ; [#uses=1]
- br i1 %70, label %bb.nph, label %bb24
-
-bb.nph: ; preds = %bb23.preheader
- %71 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %72 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %73 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %74 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %75 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %76 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %77 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %78 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %79 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %63, i32 0, i32 0 ; [#uses=1]
- %80 = xor i32 %63, 1 ; [#uses=1]
- %81 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %80, i32 0, i32 0 ; [#uses=1]
- %82 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %65, i32 0, i32 1 ; [#uses=1]
- %83 = xor i32 %65, 1 ; [#uses=1]
- %84 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %83, i32 0, i32 1 ; [#uses=1]
- %85 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %67, i32 0, i32 2 ; [#uses=1]
- %86 = xor i32 %67, 1 ; [#uses=1]
- %87 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %86, i32 0, i32 2 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btActionInterface* %nodeCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb23.backedge, %bb.nph
- %walkIterations.072 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb23.backedge ] ; [#uses=1]
- %curIndex.071 = phi i32 [ 0, %bb.nph ], [ %curIndex.0.be, %bb23.backedge ] ; [#uses=2]
- %rootNode.069 = phi %struct.btOptimizedBvhNode* [ %1, %bb.nph ], [ %rootNode.0.be, %bb23.backedge ] ; [#uses=15]
- %tmp = add i32 %walkIterations.072, 1 ; [#uses=2]
- %89 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %90 = load float* %89, align 4 ; [#uses=2]
- store float %90, float* %71, align 8
- %91 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %92 = load float* %91, align 4 ; [#uses=2]
- store float %92, float* %72, align 4
- %93 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %94 = load float* %93, align 4 ; [#uses=2]
- store float %94, float* %73, align 8
- %95 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %74, align 4
- %97 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %98 = load float* %97, align 4 ; [#uses=2]
- store float %98, float* %75, align 8
- %99 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %100 = load float* %99, align 4 ; [#uses=2]
- store float %100, float* %76, align 4
- %101 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %102 = load float* %101, align 4 ; [#uses=2]
- store float %102, float* %77, align 8
- %103 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- store float %104, float* %78, align 4
- %105 = load float* %29, align 4 ; [#uses=1]
- %106 = fsub float %90, %105 ; [#uses=1]
- store float %106, float* %71, align 8
- %107 = load float* %32, align 4 ; [#uses=1]
- %108 = fsub float %92, %107 ; [#uses=1]
- store float %108, float* %72, align 4
- %109 = load float* %35, align 4 ; [#uses=1]
- %110 = fsub float %94, %109 ; [#uses=1]
- store float %110, float* %73, align 8
- %111 = load float* %20, align 4 ; [#uses=1]
- %112 = fsub float %98, %111 ; [#uses=1]
- store float %112, float* %75, align 8
- %113 = load float* %23, align 4 ; [#uses=1]
- %114 = fsub float %100, %113 ; [#uses=1]
- store float %114, float* %76, align 4
- %115 = load float* %26, align 4 ; [#uses=1]
- %116 = fsub float %102, %115 ; [#uses=1]
- store float %116, float* %77, align 8
- %117 = load float* %97, align 4 ; [#uses=1]
- %118 = fcmp ogt float %22, %117 ; [#uses=1]
- br i1 %118, label %bb2.i29, label %bb.i
-
-bb.i: ; preds = %bb12
- %119 = load float* %89, align 4 ; [#uses=1]
- %120 = fcmp olt float %31, %119 ; [#uses=1]
- br i1 %120, label %bb2.i29, label %bb3.i30
-
-bb2.i29: ; preds = %bb.i, %bb12
- br label %bb3.i30
-
-bb3.i30: ; preds = %bb2.i29, %bb.i
- %iftmp.116.0.i = phi i8 [ 0, %bb2.i29 ], [ 1, %bb.i ] ; [#uses=1]
- %121 = load float* %101, align 4 ; [#uses=1]
- %122 = fcmp ogt float %28, %121 ; [#uses=1]
- br i1 %122, label %bb6.i, label %bb4.i31
-
-bb4.i31: ; preds = %bb3.i30
- %123 = load float* %93, align 4 ; [#uses=1]
- %124 = fcmp olt float %37, %123 ; [#uses=1]
- br i1 %124, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i31, %bb3.i30
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i31
- %iftmp.117.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.116.0.i, %bb4.i31 ] ; [#uses=1]
- %125 = load float* %99, align 4 ; [#uses=1]
- %126 = fcmp ogt float %25, %125 ; [#uses=1]
- br i1 %126, label %bb15.thread, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- %127 = load float* %91, align 4 ; [#uses=1]
- %128 = fcmp olt float %34, %127 ; [#uses=1]
- %phitmp64 = icmp eq i8 %iftmp.117.0.i, 0 ; [#uses=1]
- %phitmp = or i1 %128, %phitmp64 ; [#uses=1]
- br i1 %phitmp, label %bb15.thread, label %bb13
-
-bb13: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
- %129 = load float* %79, align 8 ; [#uses=1]
- %130 = load float* %2, align 4 ; [#uses=2]
- %131 = fsub float %129, %130 ; [#uses=1]
- %132 = fmul float %131, %iftmp.228.0 ; [#uses=3]
- %133 = load float* %81, align 8 ; [#uses=1]
- %134 = fsub float %133, %130 ; [#uses=1]
- %135 = fmul float %134, %iftmp.228.0 ; [#uses=3]
- %136 = load float* %82, align 4 ; [#uses=1]
- %137 = load float* %4, align 4 ; [#uses=2]
- %138 = fsub float %136, %137 ; [#uses=1]
- %139 = fmul float %138, %iftmp.229.0 ; [#uses=3]
- %140 = load float* %84, align 4 ; [#uses=1]
- %141 = fsub float %140, %137 ; [#uses=1]
- %142 = fmul float %141, %iftmp.229.0 ; [#uses=3]
- %143 = fcmp ogt float %132, %142 ; [#uses=1]
- %144 = fcmp ogt float %139, %135 ; [#uses=1]
- %or.cond.i = or i1 %143, %144 ; [#uses=1]
- br i1 %or.cond.i, label %bb15.thread, label %bb2.i
-
-bb2.i: ; preds = %bb13
- %145 = fcmp olt float %132, %139 ; [#uses=1]
- %146 = select i1 %145, float %139, float %132 ; [#uses=3]
- %147 = fcmp olt float %142, %135 ; [#uses=1]
- %tmax.0.i = select i1 %147, float %142, float %135 ; [#uses=3]
- %148 = load float* %85, align 8 ; [#uses=1]
- %149 = load float* %6, align 4 ; [#uses=2]
- %150 = fsub float %148, %149 ; [#uses=1]
- %151 = fmul float %150, %iftmp.230.0 ; [#uses=3]
- %152 = load float* %87, align 8 ; [#uses=1]
- %153 = fsub float %152, %149 ; [#uses=1]
- %154 = fmul float %153, %iftmp.230.0 ; [#uses=3]
- %155 = fcmp ogt float %146, %154 ; [#uses=1]
- %156 = fcmp ogt float %151, %tmax.0.i ; [#uses=1]
- %or.cond21.i = or i1 %155, %156 ; [#uses=1]
- br i1 %or.cond21.i, label %bb15.thread, label %bb9.i
-
-bb9.i: ; preds = %bb2.i
- %157 = fcmp olt float %146, %151 ; [#uses=1]
- %158 = select i1 %157, float %151, float %146 ; [#uses=1]
- %159 = fcmp olt float %154, %tmax.0.i ; [#uses=1]
- %tmax.1.i = select i1 %159, float %154, float %tmax.0.i ; [#uses=1]
- %160 = fcmp uge float %158, %55 ; [#uses=1]
- %161 = fcmp ule float %tmax.1.i, 0.000000e+00 ; [#uses=1]
- %or.cond22.i = or i1 %160, %161 ; [#uses=2]
- %162 = zext i1 %or.cond22.i to i32 ; [#uses=1]
- %iftmp.131.0.i = xor i32 %162, 1 ; [#uses=2]
- %163 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 2 ; [#uses=1]
- %164 = load i32* %163, align 4 ; [#uses=1]
- %165 = icmp eq i32 %164, -1 ; [#uses=3]
- %.not = xor i1 %165, true ; [#uses=1]
- %or.cond = or i1 %or.cond22.i, %.not ; [#uses=1]
- br i1 %or.cond, label %bb18, label %bb17
-
-bb15.thread: ; preds = %bb2.i, %bb13, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb7.i
- %166 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 2 ; [#uses=1]
- %167 = load i32* %166, align 4 ; [#uses=1]
- %168 = icmp eq i32 %167, -1 ; [#uses=1]
- br label %bb18
-
-bb17: ; preds = %bb9.i
- %169 = load i32 (...)*** %88, align 4 ; [#uses=1]
- %170 = getelementptr inbounds i32 (...)** %169, i32 2 ; [#uses=1]
- %171 = load i32 (...)** %170, align 4 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 4 ; [#uses=1]
- %173 = load i32* %172, align 4 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 3 ; [#uses=1]
- %175 = load i32* %174, align 4 ; [#uses=1]
- %176 = bitcast i32 (...)* %171 to void (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- call void %176(%struct.btActionInterface* %nodeCallback, i32 %175, i32 %173)
- br label %bb18
-
-bb18: ; preds = %bb17, %bb15.thread, %bb9.i
- %177 = phi i1 [ %168, %bb15.thread ], [ %165, %bb9.i ], [ %165, %bb17 ] ; [#uses=1]
- %iftmp.232.068 = phi i32 [ 0, %bb15.thread ], [ %iftmp.131.0.i, %bb9.i ], [ %iftmp.131.0.i, %bb17 ] ; [#uses=1]
- %.not28 = icmp ne i32 %iftmp.232.068, 0 ; [#uses=1]
- %brmerge = or i1 %.not28, %177 ; [#uses=1]
- br i1 %brmerge, label %bb21, label %bb22
-
-bb21: ; preds = %bb18
- %178 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 1 ; [#uses=1]
- %179 = add nsw i32 %curIndex.071, 1 ; [#uses=1]
- br label %bb23.backedge
-
-bb23.backedge: ; preds = %bb22, %bb21
- %rootNode.0.be = phi %struct.btOptimizedBvhNode* [ %178, %bb21 ], [ %184, %bb22 ] ; [#uses=1]
- %curIndex.0.be = phi i32 [ %179, %bb21 ], [ %185, %bb22 ] ; [#uses=2]
- %180 = load i32* %68, align 4 ; [#uses=1]
- %181 = icmp sgt i32 %180, %curIndex.0.be ; [#uses=1]
- br i1 %181, label %bb12, label %bb24
-
-bb22: ; preds = %bb18
- %182 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 0, i32 2 ; [#uses=1]
- %183 = load i32* %182, align 4 ; [#uses=2]
- %184 = getelementptr inbounds %struct.btOptimizedBvhNode* %rootNode.069, i32 %183 ; [#uses=1]
- %185 = add nsw i32 %183, %curIndex.071 ; [#uses=1]
- br label %bb23.backedge
-
-bb24: ; preds = %bb23.backedge, %bb23.preheader
- %walkIterations.0.lcssa = phi i32 [ 0, %bb23.preheader ], [ %tmp, %bb23.backedge ] ; [#uses=2]
- %186 = load i32* @maxIterations, align 4 ; [#uses=1]
- %187 = icmp slt i32 %186, %walkIterations.0.lcssa ; [#uses=1]
- br i1 %187, label %bb25, label %return
-
-bb25: ; preds = %bb24
- store i32 %walkIterations.0.lcssa, i32* @maxIterations, align 4
- ret void
-
-return: ; preds = %bb24
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK14btQuantizedBvh29reportBoxCastOverlappingNodexEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* nocapture %raySource, %struct.btQuadWord* nocapture %rayTarget, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=2]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- tail call void @_ZNK14btQuantizedBvh36walkStacklessQuantizedTreeAgainstRayEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i32 0, i32 %3)
- ret void
-
-bb1: ; preds = %entry
- tail call void @_ZNK14btQuantizedBvh27walkStacklessTreeAgainstRayEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, i32 0, i32 %3)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK14btQuantizedBvh25reportRayOverlappingNodexEP21btNodeOverlapCallbackRK9btVector3S4_(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* nocapture %raySource, %struct.btQuadWord* nocapture %rayTarget) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 6 ; [#uses=1]
- %11 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %11, 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuantizedBvh* %this, i32 0, i32 5 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=2]
- br i1 %toBool.i, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- call void @_ZNK14btQuantizedBvh36walkStacklessQuantizedTreeAgainstRayEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget, %struct.btQuadWord* %0, %struct.btQuadWord* %1, i32 0, i32 %13)
- ret void
-
-bb1.i: ; preds = %entry
- call void @_ZNK14btQuantizedBvh27walkStacklessTreeAgainstRayEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_ii(%struct.btQuantizedBvh* %this, %struct.btActionInterface* %nodeCallback, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget, %struct.btQuadWord* %0, %struct.btQuadWord* %1, i32 0, i32 %13)
- ret void
-}
-
-; [#uses=31]
-declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
-
-; [#uses=0]
-define void @_ZN18btSimpleBroadphase8validateEv(%struct.btSimpleBroadphase* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZN18btSimpleBroadphase23getOverlappingPairCacheEv(%struct.btSimpleBroadphase* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct..0btMultiSapOverlapFilterCallback* @_ZNK18btSimpleBroadphase23getOverlappingPairCacheEv(%struct.btSimpleBroadphase* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=1]
- %1 = load %struct..0btMultiSapOverlapFilterCallback** %0, align 4 ; [#uses=1]
- ret %struct..0btMultiSapOverlapFilterCallback* %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK18btSimpleBroadphase17getBroadphaseAabbER9btVector3S1_(%struct.btSimpleBroadphase* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btSimpleBroadphase10printStatsEv(%struct.btSimpleBroadphase* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define %struct.btBroadphaseProxy* @_ZN18btSimpleBroadphase11createProxyERK9btVector3S2_iPvssP12btDispatcherS3_(%struct.btSimpleBroadphase* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, i32 %shapeType, i8* %userPtr, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* nocapture %unnamed_arg, i8* %multiSapProxy) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 2 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = icmp slt i32 %1, %3 ; [#uses=1]
- br i1 %4, label %bb1, label %bb2
-
-bb1: ; preds = %entry
- %5 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 6 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=16]
- %7 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- %8 = load %struct.btSimpleBroadphaseProxy** %7, align 4 ; [#uses=14]
- %9 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- store i32 %10, i32* %5, align 4
- %11 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %11, i32* %0, align 4
- %12 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = icmp slt i32 %13, %6 ; [#uses=1]
- br i1 %14, label %bb.i, label %_ZN18btSimpleBroadphase11allocHandleEv.exit
-
-bb.i: ; preds = %bb1
- store i32 %6, i32* %12, align 4
- br label %_ZN18btSimpleBroadphase11allocHandleEv.exit
-
-_ZN18btSimpleBroadphase11allocHandleEv.exit: ; preds = %bb.i, %bb1
- %15 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 0 ; [#uses=1]
- store i8* %userPtr, i8** %15, align 4
- %16 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 1 ; [#uses=1]
- store i16 %collisionFilterGroup, i16* %16, align 4
- %17 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 2 ; [#uses=1]
- store i16 %collisionFilterMask, i16* %17, align 2
- %18 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0, i32 3 ; [#uses=1]
- store i8* %multiSapProxy, i8** %42, align 4
- %43 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %8, i32 %6, i32 0 ; [#uses=1]
- ret %struct.btBroadphaseProxy* %43
-
-bb2: ; preds = %entry
- ret %struct.btBroadphaseProxy* null
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphase12destroyProxyEP17btBroadphaseProxyP12btDispatcher(%struct.btSimpleBroadphase* nocapture %this, %struct.btBroadphaseProxy* %proxyOrg, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = ptrtoint %struct.btBroadphaseProxy* %proxyOrg to i32 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- %2 = load %struct.btSimpleBroadphaseProxy** %1, align 4 ; [#uses=1]
- %3 = ptrtoint %struct.btSimpleBroadphaseProxy* %2 to i32 ; [#uses=1]
- %4 = sub nsw i32 %0, %3 ; [#uses=1]
- %5 = sdiv exact i32 %4, 52 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %7 = load i32* %6, align 4 ; [#uses=2]
- %8 = icmp eq i32 %7, %5 ; [#uses=1]
- br i1 %8, label %bb.i, label %_ZN18btSimpleBroadphase10freeHandleEP23btSimpleBroadphaseProxy.exit
-
-bb.i: ; preds = %entry
- %9 = add nsw i32 %7, -1 ; [#uses=1]
- store i32 %9, i32* %6, align 4
- br label %_ZN18btSimpleBroadphase10freeHandleEP23btSimpleBroadphaseProxy.exit
-
-_ZN18btSimpleBroadphase10freeHandleEP23btSimpleBroadphaseProxy.exit: ; preds = %bb.i, %entry
- %10 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 6 ; [#uses=2]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btBroadphaseProxy* %proxyOrg, i32 1, i32 0 ; [#uses=1]
- %.c = inttoptr i32 %11 to i8* ; [#uses=1]
- store i8* %.c, i8** %12, align 4
- store i32 %5, i32* %10, align 4
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %proxyOrg, i32 0, i32 0 ; [#uses=1]
- store i8* null, i8** %13, align 4
- %14 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 1 ; [#uses=2]
- %15 = load i32* %14, align 4 ; [#uses=1]
- %16 = add nsw i32 %15, -1 ; [#uses=1]
- store i32 %16, i32* %14, align 4
- %17 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=1]
- %18 = load %struct..0btMultiSapOverlapFilterCallback** %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %18, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32 (...)** %20, i32 4 ; [#uses=1]
- %22 = load i32 (...)** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %18, i32 0, i32 0 ; [#uses=1]
- %24 = bitcast i32 (...)* %22 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %24(%struct.btActionInterface* %23, %struct.btBroadphaseProxy* %proxyOrg, %struct.btActionInterface* %dispatcher)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK18btSimpleBroadphase7getAabbEP17btBroadphaseProxyR9btVector3S3_(%struct.btSimpleBroadphase* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphase7setAabbEP17btBroadphaseProxyRK9btVector3S4_P12btDispatcher(%struct.btSimpleBroadphase* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* nocapture %unnamed_arg) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphase7rayTestERK9btVector3S2_R23btBroadphaseRayCallbackS2_S2_(%struct.btSimpleBroadphase* nocapture %this, %struct.btQuadWord* nocapture %rayFrom, %struct.btQuadWord* nocapture %rayTo, %struct.btBroadphaseRayCallback* %rayCallback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btBroadphaseRayCallback* %rayCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=3]
- %tmp = add i32 %i.05, 1 ; [#uses=2]
- %6 = load %struct.btSimpleBroadphaseProxy** %3, align 4 ; [#uses=2]
- %scevgep6 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %6, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %7 = load i8** %scevgep6, align 4 ; [#uses=1]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %9 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 2 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %scevgep78 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %6, i32 %i.05, i32 0 ; [#uses=1]
- %13 = tail call zeroext i8 %12(%struct.btActionInterface* %5, %struct.btBroadphaseProxy* %scevgep78) ; [#uses=0]
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %14 = load i32* %0, align 4 ; [#uses=1]
- %15 = icmp slt i32 %14, %tmp ; [#uses=1]
- br i1 %15, label %return, label %bb
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphase8aabbTestERK9btVector3S2_R24btBroadphaseAabbCallback(%struct.btSimpleBroadphase* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, %struct.btActionInterface* %callback) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 3 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb3, %bb.nph
- %i.07 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb3 ] ; [#uses=9]
- %tmp = add i32 %i.07, 1 ; [#uses=2]
- %11 = load %struct.btSimpleBroadphaseProxy** %3, align 4 ; [#uses=8]
- %scevgep8 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0, i32 0 ; [#uses=1]
- %12 = load i8** %scevgep8, align 4 ; [#uses=1]
- %13 = icmp eq i8* %12, null ; [#uses=1]
- br i1 %13, label %bb3, label %bb1
-
-bb1: ; preds = %bb
- %14 = load float* %4, align 4 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %scevgep11, align 4 ; [#uses=1]
- %16 = fcmp ogt float %14, %15 ; [#uses=1]
- br i1 %16, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %bb1
- %17 = load float* %10, align 4 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %scevgep12, align 4 ; [#uses=1]
- %19 = fcmp olt float %17, %18 ; [#uses=1]
- br i1 %19, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb.i, %bb1
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb.i
- %iftmp.123.0.i = phi i8 [ 0, %bb2.i ], [ 1, %bb.i ] ; [#uses=1]
- %20 = load float* %5, align 4 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %scevgep13, align 4 ; [#uses=1]
- %22 = fcmp ogt float %20, %21 ; [#uses=1]
- br i1 %22, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %23 = load float* %9, align 4 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %scevgep14, align 4 ; [#uses=1]
- %25 = fcmp olt float %23, %24 ; [#uses=1]
- br i1 %25, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i
- %iftmp.124.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.123.0.i, %bb4.i ] ; [#uses=1]
- %26 = load float* %6, align 4 ; [#uses=1]
- %scevgep15 = getelementptr %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %scevgep15, align 4 ; [#uses=1]
- %28 = fcmp ogt float %26, %27 ; [#uses=1]
- br i1 %28, label %bb3, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- %29 = load float* %7, align 4 ; [#uses=1]
- %scevgep16 = getelementptr %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %scevgep16, align 4 ; [#uses=1]
- %31 = fcmp olt float %29, %30 ; [#uses=1]
- %phitmp6 = icmp eq i8 %iftmp.124.0.i, 0 ; [#uses=1]
- %phitmp = or i1 %31, %phitmp6 ; [#uses=1]
- br i1 %phitmp, label %bb3, label %bb2
-
-bb2: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
- %32 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 2 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to i8 (%struct.btActionInterface*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %scevgep910 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %11, i32 %i.07, i32 0 ; [#uses=1]
- %36 = tail call zeroext i8 %35(%struct.btActionInterface* %callback, %struct.btBroadphaseProxy* %scevgep910) ; [#uses=0]
- br label %bb3
-
-bb3: ; preds = %bb2, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb7.i, %bb
- %37 = load i32* %0, align 4 ; [#uses=1]
- %38 = icmp slt i32 %37, %tmp ; [#uses=1]
- br i1 %38, label %return, label %bb
-
-return: ; preds = %bb3, %entry
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_(%struct.btSimpleBroadphaseProxy* nocapture %proxy0, %struct.btSimpleBroadphaseProxy* nocapture %proxy1) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy0, i32 0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy1, i32 0, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fcmp ugt float %1, %3 ; [#uses=1]
- br i1 %4, label %bb6, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy1, i32 0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy0, i32 0, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %bb6, label %bb1
-
-bb1: ; preds = %bb
- %10 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy0, i32 0, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy1, i32 0, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fcmp ugt float %11, %13 ; [#uses=1]
- br i1 %14, label %bb6, label %bb2
-
-bb2: ; preds = %bb1
- %15 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy1, i32 0, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy0, i32 0, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp ugt float %16, %18 ; [#uses=1]
- br i1 %19, label %bb6, label %bb3
-
-bb3: ; preds = %bb2
- %20 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy0, i32 0, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy1, i32 0, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ugt float %21, %23 ; [#uses=1]
- br i1 %24, label %bb6, label %bb4
-
-bb4: ; preds = %bb3
- %25 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy1, i32 0, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %proxy0, i32 0, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %not. = fcmp ole float %26, %28 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb6: ; preds = %bb3, %bb2, %bb1, %bb, %entry
- ret i8 0
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN18btSimpleBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_(%struct.btSimpleBroadphase* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy0, %struct.btBroadphaseProxy* nocapture %proxy1) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fcmp ugt float %1, %3 ; [#uses=1]
- br i1 %4, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit, label %bb.i
-
-bb.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %10 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fcmp ugt float %11, %13 ; [#uses=1]
- br i1 %14, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %15 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp ugt float %16, %18 ; [#uses=1]
- br i1 %19, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %20 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fcmp ugt float %21, %23 ; [#uses=1]
- br i1 %24, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %25 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy1, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %not..i = fcmp ole float %26, %28 ; [#uses=1]
- %retval.i = zext i1 %not..i to i8 ; [#uses=1]
- ret i8 %retval.i
-
-_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit: ; preds = %bb3.i, %bb2.i, %bb1.i, %bb.i, %entry
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphase9resetPoolEP12btDispatcher(%struct.btSimpleBroadphase* nocapture %this, %struct.btActionInterface* nocapture %dispatcher) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphase25calculateOverlappingPairsEP12btDispatcher(%struct.btSimpleBroadphase* %this, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %3 = alloca %struct.btBroadphasePair, align 8 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp sgt i32 %5, -1 ; [#uses=1]
- br i1 %6, label %bb18.preheader, label %bb30
-
-bb18.preheader: ; preds = %entry
- %7 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 3 ; [#uses=3]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp slt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb19, label %bb.nph82
-
-bb.nph82: ; preds = %bb18.preheader
- %10 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=5]
- br label %bb1
-
-bb1: ; preds = %bb17, %bb.nph82
- %12 = phi i32 [ %8, %bb.nph82 ], [ %81, %bb17 ] ; [#uses=3]
- %new_largest_index.181 = phi i32 [ -1, %bb.nph82 ], [ %new_largest_index.0, %bb17 ] ; [#uses=1]
- %13 = phi i32 [ 0, %bb.nph82 ], [ %j.076, %bb17 ] ; [#uses=12]
- %j.076 = add i32 %13, 1 ; [#uses=4]
- %tmp135 = add i32 %13, 2 ; [#uses=1]
- %14 = load %struct.btSimpleBroadphaseProxy** %10, align 4 ; [#uses=8]
- %scevgep137138 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i8** %scevgep137138, align 4 ; [#uses=1]
- %16 = icmp eq i8* %15, null ; [#uses=1]
- br i1 %16, label %bb17, label %bb16.preheader
-
-bb16.preheader: ; preds = %bb1
- %17 = icmp slt i32 %12, %j.076 ; [#uses=1]
- br i1 %17, label %bb17, label %bb.nph78
-
-bb.nph78: ; preds = %bb16.preheader
- %scevgep139140 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0 ; [#uses=4]
- %scevgep141 = getelementptr %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %scevgep142 = getelementptr %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %scevgep143 = getelementptr %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %scevgep144 = getelementptr %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %scevgep145 = getelementptr %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %scevgep146 = getelementptr %struct.btSimpleBroadphaseProxy* %14, i32 %13, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb16.backedge, %bb.nph78
- %indvar = phi i32 [ 0, %bb.nph78 ], [ %indvar.next, %bb16.backedge ] ; [#uses=3]
- %tmp118 = add i32 %j.076, %indvar ; [#uses=9]
- %j.0 = add i32 %tmp135, %indvar ; [#uses=1]
- %18 = load %struct.btSimpleBroadphaseProxy** %10, align 4 ; [#uses=9]
- %scevgep101102 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0, i32 0 ; [#uses=1]
- %19 = load i8** %scevgep101102, align 4 ; [#uses=1]
- %20 = icmp eq i8* %19, null ; [#uses=1]
- br i1 %20, label %bb16.backedge, label %bb4
-
-bb4: ; preds = %bb3
- %21 = load float* %scevgep141, align 4 ; [#uses=1]
- %scevgep111 = getelementptr %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %scevgep111, align 4 ; [#uses=1]
- %23 = fcmp ugt float %21, %22 ; [#uses=1]
- br i1 %23, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread, label %bb.i54
-
-bb.i54: ; preds = %bb4
- %scevgep112 = getelementptr %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %scevgep112, align 4 ; [#uses=1]
- %25 = load float* %scevgep142, align 4 ; [#uses=1]
- %26 = fcmp ugt float %24, %25 ; [#uses=1]
- br i1 %26, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread, label %bb1.i
-
-bb1.i: ; preds = %bb.i54
- %27 = load float* %scevgep143, align 4 ; [#uses=1]
- %scevgep113 = getelementptr %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %scevgep113, align 4 ; [#uses=1]
- %29 = fcmp ugt float %27, %28 ; [#uses=1]
- br i1 %29, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %scevgep114 = getelementptr %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %scevgep114, align 4 ; [#uses=1]
- %31 = load float* %scevgep144, align 4 ; [#uses=1]
- %32 = fcmp ugt float %30, %31 ; [#uses=1]
- br i1 %32, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %33 = load float* %scevgep145, align 4 ; [#uses=1]
- %scevgep115 = getelementptr %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %scevgep115, align 4 ; [#uses=1]
- %35 = fcmp ugt float %33, %34 ; [#uses=1]
- br i1 %35, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread, label %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit
-
-_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread: ; preds = %bb3.i, %bb2.i, %bb1.i, %bb.i54, %bb4
- %36 = load %struct..0btMultiSapOverlapFilterCallback** %11, align 4 ; [#uses=2]
- %37 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %36, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load i32 (...)*** %37, align 4 ; [#uses=1]
- br label %bb8
-
-_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit: ; preds = %bb3.i
- %scevgep116 = getelementptr %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %scevgep116, align 4 ; [#uses=1]
- %40 = load float* %scevgep146, align 4 ; [#uses=1]
- %phitmp = fcmp ugt float %39, %40 ; [#uses=1]
- %41 = load %struct..0btMultiSapOverlapFilterCallback** %11, align 4 ; [#uses=3]
- %42 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %41, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load i32 (...)*** %42, align 4 ; [#uses=2]
- br i1 %phitmp, label %bb8, label %bb5
-
-bb5: ; preds = %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit
- %44 = getelementptr inbounds i32 (...)** %43, i32 13 ; [#uses=1]
- %45 = load i32 (...)** %44, align 4 ; [#uses=1]
- %46 = bitcast i32 (...)* %45 to %struct.btBroadphasePair* (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %scevgep107108 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0 ; [#uses=2]
- %47 = call %struct.btBroadphasePair* %46(%struct..0btMultiSapOverlapFilterCallback* %41, %struct.btBroadphaseProxy* %scevgep139140, %struct.btBroadphaseProxy* %scevgep107108) ; [#uses=1]
- %48 = icmp eq %struct.btBroadphasePair* %47, null ; [#uses=1]
- br i1 %48, label %bb7, label %bb16.backedge
-
-bb7: ; preds = %bb5
- %49 = load %struct..0btMultiSapOverlapFilterCallback** %11, align 4 ; [#uses=2]
- %50 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %49, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds i32 (...)** %51, i32 2 ; [#uses=1]
- %53 = load i32 (...)** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %49, i32 0, i32 0 ; [#uses=1]
- %55 = bitcast i32 (...)* %53 to %struct.btBroadphasePair* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %56 = call %struct.btBroadphasePair* %55(%struct.btActionInterface* %54, %struct.btBroadphaseProxy* %scevgep139140, %struct.btBroadphaseProxy* %scevgep107108) ; [#uses=0]
- br label %bb16.backedge
-
-bb8: ; preds = %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit, %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread
- %57 = phi %struct..0btMultiSapOverlapFilterCallback* [ %36, %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread ], [ %41, %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit ] ; [#uses=1]
- %58 = phi i32 (...)** [ %38, %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit.thread ], [ %43, %_ZN18btSimpleBroadphase11aabbOverlapEP23btSimpleBroadphaseProxyS1_.exit ] ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 14 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %62 = call zeroext i8 %61(%struct..0btMultiSapOverlapFilterCallback* %57) ; [#uses=1]
- %toBool9not = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool9not, label %bb12, label %bb16.backedge
-
-bb12: ; preds = %bb8
- %63 = load %struct..0btMultiSapOverlapFilterCallback** %11, align 4 ; [#uses=2]
- %64 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %63, i32 0, i32 0, i32 0 ; [#uses=1]
- %65 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds i32 (...)** %65, i32 13 ; [#uses=1]
- %67 = load i32 (...)** %66, align 4 ; [#uses=1]
- %68 = bitcast i32 (...)* %67 to %struct.btBroadphasePair* (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %scevgep103104 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %18, i32 %tmp118, i32 0 ; [#uses=2]
- %69 = call %struct.btBroadphasePair* %68(%struct..0btMultiSapOverlapFilterCallback* %63, %struct.btBroadphaseProxy* %scevgep139140, %struct.btBroadphaseProxy* %scevgep103104) ; [#uses=1]
- %70 = icmp eq %struct.btBroadphasePair* %69, null ; [#uses=1]
- br i1 %70, label %bb16.backedge, label %bb14
-
-bb16.backedge: ; preds = %bb14, %bb12, %bb8, %bb7, %bb5, %bb3
- %71 = load i32* %7, align 4 ; [#uses=2]
- %72 = icmp slt i32 %71, %j.0 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br i1 %72, label %bb17, label %bb3
-
-bb14: ; preds = %bb12
- %73 = load %struct..0btMultiSapOverlapFilterCallback** %11, align 4 ; [#uses=2]
- %74 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %73, i32 0, i32 0, i32 0 ; [#uses=1]
- %75 = load i32 (...)*** %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds i32 (...)** %75, i32 3 ; [#uses=1]
- %77 = load i32 (...)** %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %73, i32 0, i32 0 ; [#uses=1]
- %79 = bitcast i32 (...)* %77 to i8* (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %80 = call i8* %79(%struct.btActionInterface* %78, %struct.btBroadphaseProxy* %scevgep139140, %struct.btBroadphaseProxy* %scevgep103104, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- br label %bb16.backedge
-
-bb17: ; preds = %bb16.backedge, %bb16.preheader, %bb1
- %81 = phi i32 [ %12, %bb1 ], [ %12, %bb16.preheader ], [ %71, %bb16.backedge ] ; [#uses=2]
- %new_largest_index.0 = phi i32 [ %new_largest_index.181, %bb1 ], [ %13, %bb16.backedge ], [ %13, %bb16.preheader ] ; [#uses=2]
- %82 = icmp slt i32 %81, %j.076 ; [#uses=1]
- br i1 %82, label %bb19, label %bb1
-
-bb19: ; preds = %bb17, %bb18.preheader
- %new_largest_index.1.lcssa = phi i32 [ -1, %bb18.preheader ], [ %new_largest_index.0, %bb17 ] ; [#uses=1]
- store i32 %new_largest_index.1.lcssa, i32* %7, align 4
- %83 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 8 ; [#uses=1]
- %84 = load i8* %83, align 4 ; [#uses=1]
- %toBool20not = icmp eq i8 %84, 0 ; [#uses=1]
- br i1 %toBool20not, label %bb30, label %bb24
-
-bb24: ; preds = %bb19
- %85 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=3]
- %86 = load %struct..0btMultiSapOverlapFilterCallback** %85, align 4 ; [#uses=2]
- %87 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %86, i32 0, i32 0, i32 0 ; [#uses=1]
- %88 = load i32 (...)*** %87, align 4 ; [#uses=1]
- %89 = getelementptr inbounds i32 (...)** %88, i32 14 ; [#uses=1]
- %90 = load i32 (...)** %89, align 4 ; [#uses=1]
- %91 = bitcast i32 (...)* %90 to i8 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %92 = call zeroext i8 %91(%struct..0btMultiSapOverlapFilterCallback* %86) ; [#uses=1]
- %toBool25not = icmp eq i8 %92, 0 ; [#uses=1]
- br i1 %toBool25not, label %bb30, label %bb33
-
-bb30: ; preds = %bb24, %bb19, %entry
- ret void
-
-bb33: ; preds = %bb24
- %93 = load %struct..0btMultiSapOverlapFilterCallback** %85, align 4 ; [#uses=2]
- %94 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %93, i32 0, i32 0, i32 0 ; [#uses=1]
- %95 = load i32 (...)*** %94, align 4 ; [#uses=1]
- %96 = getelementptr inbounds i32 (...)** %95, i32 7 ; [#uses=1]
- %97 = load i32 (...)** %96, align 4 ; [#uses=1]
- %98 = bitcast i32 (...)* %97 to %"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %99 = call %"struct.btAlignedObjectArray<btBroadphasePair>"* %98(%struct..0btMultiSapOverlapFilterCallback* %93) ; [#uses=6]
- %100 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %99, i32 0, i32 1 ; [#uses=5]
- %101 = load i32* %100, align 4 ; [#uses=3]
- %102 = icmp sgt i32 %101, 1 ; [#uses=1]
- br i1 %102, label %bb.i58, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit60
-
-bb.i58: ; preds = %bb33
- %103 = add nsw i32 %101, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %99, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %103) nounwind
- %.pre = load i32* %100, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit60
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit60: ; preds = %bb.i58, %bb33
- %104 = phi i32 [ %101, %bb33 ], [ %.pre, %bb.i58 ] ; [#uses=1]
- %105 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %105, align 8
- %106 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %106, align 4
- %107 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %107, align 8
- %108 = getelementptr inbounds %struct.btBroadphasePair* %3, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %108, align 4
- %109 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 9 ; [#uses=6]
- %110 = load i32* %109, align 4 ; [#uses=1]
- %111 = sub nsw i32 %104, %110 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %99, i32 %111, %struct.btBroadphasePair* %3) inlinehint
- store i32 0, i32* %109, align 4
- %112 = load i32* %100, align 4 ; [#uses=2]
- %113 = icmp sgt i32 %112, 0 ; [#uses=1]
- br i1 %113, label %bb.nph, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
-
-bb.nph: ; preds = %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit60
- %114 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %99, i32 0, i32 3 ; [#uses=1]
- br label %bb34
-
-bb34: ; preds = %bb47, %bb.nph
- %i.175 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb47 ] ; [#uses=5]
- %previousPair.1.074 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %159, %bb47 ] ; [#uses=1]
- %previousPair.0.073 = phi %struct.btBroadphaseProxy* [ null, %bb.nph ], [ %116, %bb47 ] ; [#uses=1]
- %tmp = add i32 %i.175, 1 ; [#uses=2]
- %115 = load %struct.btBroadphasePair** %114, align 4 ; [#uses=4]
- %scevgep8384 = getelementptr inbounds %struct.btBroadphasePair* %115, i32 %i.175, i32 0 ; [#uses=2]
- %116 = load %struct.btBroadphaseProxy** %scevgep8384, align 4 ; [#uses=8]
- %117 = icmp eq %struct.btBroadphaseProxy* %116, %previousPair.0.073 ; [#uses=1]
- %scevgep93 = getelementptr %struct.btBroadphasePair* %115, i32 %i.175, i32 1 ; [#uses=1]
- %118 = load %struct.btBroadphaseProxy** %scevgep93, align 4 ; [#uses=15]
- %phitmp71 = icmp eq %struct.btBroadphaseProxy* %118, %previousPair.1.074 ; [#uses=1]
- %or.cond = and i1 %117, %phitmp71 ; [#uses=1]
- br i1 %or.cond, label %bb46, label %bb39
-
-bb39: ; preds = %bb34
- %119 = getelementptr inbounds %struct.btBroadphaseProxy* %116, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btBroadphaseProxy* %118, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- %123 = fcmp ugt float %120, %122 ; [#uses=1]
- br i1 %123, label %bb46, label %bb.i.i
-
-bb.i.i: ; preds = %bb39
- %124 = getelementptr inbounds %struct.btBroadphaseProxy* %118, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btBroadphaseProxy* %116, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=1]
- %128 = fcmp ugt float %125, %127 ; [#uses=1]
- br i1 %128, label %bb46, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %129 = getelementptr inbounds %struct.btBroadphaseProxy* %116, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btBroadphaseProxy* %118, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = fcmp ugt float %130, %132 ; [#uses=1]
- br i1 %133, label %bb46, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i
- %134 = getelementptr inbounds %struct.btBroadphaseProxy* %118, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btBroadphaseProxy* %116, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=1]
- %138 = fcmp ugt float %135, %137 ; [#uses=1]
- br i1 %138, label %bb46, label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i
- %139 = getelementptr inbounds %struct.btBroadphaseProxy* %116, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %140 = load float* %139, align 4 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btBroadphaseProxy* %118, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=1]
- %143 = fcmp ugt float %140, %142 ; [#uses=1]
- br i1 %143, label %bb46, label %_ZN18btSimpleBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit
-
-_ZN18btSimpleBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit: ; preds = %bb3.i.i
- %144 = getelementptr inbounds %struct.btBroadphaseProxy* %118, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btBroadphaseProxy* %116, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %147 = load float* %146, align 4 ; [#uses=1]
- %phitmp72 = fcmp ugt float %145, %147 ; [#uses=1]
- br i1 %phitmp72, label %bb46, label %bb47
-
-bb46: ; preds = %_ZN18btSimpleBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit, %bb3.i.i, %bb2.i.i, %bb1.i.i, %bb.i.i, %bb39, %bb34
- %148 = phi %struct.btBroadphaseProxy* [ %118, %_ZN18btSimpleBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit ], [ %118, %bb3.i.i ], [ %118, %bb2.i.i ], [ %118, %bb1.i.i ], [ %118, %bb.i.i ], [ %118, %bb39 ], [ %118, %bb34 ] ; [#uses=1]
- %149 = load %struct..0btMultiSapOverlapFilterCallback** %85, align 4 ; [#uses=2]
- %150 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %149, i32 0, i32 0, i32 0 ; [#uses=1]
- %151 = load i32 (...)*** %150, align 4 ; [#uses=1]
- %152 = getelementptr inbounds i32 (...)** %151, i32 8 ; [#uses=1]
- %153 = load i32 (...)** %152, align 4 ; [#uses=1]
- %154 = bitcast i32 (...)* %153 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphasePair*, %struct.btActionInterface*)* ; [#uses=1]
- %scevgep = getelementptr %struct.btBroadphasePair* %115, i32 %i.175 ; [#uses=1]
- call void %154(%struct..0btMultiSapOverlapFilterCallback* %149, %struct.btBroadphasePair* %scevgep, %struct.btActionInterface* %dispatcher)
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep8384, align 4
- %scevgep89 = getelementptr %struct.btBroadphasePair* %115, i32 %i.175, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %scevgep89, align 4
- %155 = load i32* %109, align 4 ; [#uses=1]
- %156 = add nsw i32 %155, 1 ; [#uses=1]
- store i32 %156, i32* %109, align 4
- %157 = load i32* @gOverlappingPairs, align 4 ; [#uses=1]
- %158 = add nsw i32 %157, -1 ; [#uses=1]
- store i32 %158, i32* @gOverlappingPairs, align 4
- br label %bb47
-
-bb47: ; preds = %bb46, %_ZN18btSimpleBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit
- %159 = phi %struct.btBroadphaseProxy* [ %118, %_ZN18btSimpleBroadphase15testAabbOverlapEP17btBroadphaseProxyS1_.exit ], [ %148, %bb46 ] ; [#uses=1]
- %160 = load i32* %100, align 4 ; [#uses=4]
- %161 = icmp sgt i32 %160, %tmp ; [#uses=1]
- br i1 %161, label %bb34, label %bb50
-
-bb50: ; preds = %bb47
- %162 = icmp sgt i32 %160, 1 ; [#uses=1]
- br i1 %162, label %bb.i, label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
-
-bb.i: ; preds = %bb50
- %163 = add nsw i32 %160, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE17quickSortInternalI29btBroadphasePairSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btBroadphasePair>"* %99, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 0, i32 %163) nounwind
- %.pre147 = load i32* %100, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit
-
-_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit: ; preds = %bb.i, %bb50, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit60
- %164 = phi i32 [ %.pre147, %bb.i ], [ %160, %bb50 ], [ %112, %_ZN20btAlignedObjectArrayI16btBroadphasePairE9quickSortI29btBroadphasePairSortPredicateEEvT_.exit60 ] ; [#uses=1]
- %165 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 0 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %165, align 8
- %166 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 1 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %166, align 4
- %167 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %167, align 8
- %168 = getelementptr inbounds %struct.btBroadphasePair* %2, i32 0, i32 3, i32 0 ; [#uses=1]
- store i8* null, i8** %168, align 4
- %169 = load i32* %109, align 4 ; [#uses=1]
- %170 = sub nsw i32 %164, %169 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI16btBroadphasePairE6resizeEiRKS0_(%"struct.btAlignedObjectArray<btBroadphasePair>"* %99, i32 %170, %struct.btBroadphasePair* %2) inlinehint
- store i32 0, i32* %109, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphaseD0Ev(%struct.btSimpleBroadphase* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV18btSimpleBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- %2 = load i8** %1, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- %3 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 8 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %bb3, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=2]
- %6 = load %struct..0btMultiSapOverlapFilterCallback** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %6, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %10(%struct..0btMultiSapOverlapFilterCallback* %6)
- %11 = load %struct..0btMultiSapOverlapFilterCallback** %5, align 4 ; [#uses=1]
- %12 = bitcast %struct..0btMultiSapOverlapFilterCallback* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- br label %bb3
-
-bb3: ; preds = %bb, %entry
- %13 = bitcast %struct.btSimpleBroadphase* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %13) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphaseD1Ev(%struct.btSimpleBroadphase* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV18btSimpleBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- %2 = load i8** %1, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- %3 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 8 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=2]
- %6 = load %struct..0btMultiSapOverlapFilterCallback** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %6, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %10(%struct..0btMultiSapOverlapFilterCallback* %6)
- %11 = load %struct..0btMultiSapOverlapFilterCallback** %5, align 4 ; [#uses=1]
- %12 = bitcast %struct..0btMultiSapOverlapFilterCallback* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btSimpleBroadphaseD2Ev(%struct.btSimpleBroadphase* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV18btSimpleBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- %2 = load i8** %1, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- %3 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 8 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=2]
- %6 = load %struct..0btMultiSapOverlapFilterCallback** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %6, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- tail call void %10(%struct..0btMultiSapOverlapFilterCallback* %6)
- %11 = load %struct..0btMultiSapOverlapFilterCallback** %5, align 4 ; [#uses=1]
- %12 = bitcast %struct..0btMultiSapOverlapFilterCallback* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSimpleBroadphaseC2EiP22btOverlappingPairCache(%struct.btSimpleBroadphase* nocapture %this, i32 %maxProxies, %struct..0btMultiSapOverlapFilterCallback* %overlappingPairCache) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV18btSimpleBroadphase, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 7 ; [#uses=2]
- store %struct..0btMultiSapOverlapFilterCallback* %overlappingPairCache, %struct..0btMultiSapOverlapFilterCallback** %1, align 4
- %2 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 8 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 9 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = icmp eq %struct..0btMultiSapOverlapFilterCallback* %overlappingPairCache, null ; [#uses=1]
- br i1 %4, label %bb, label %bb7
-
-bb: ; preds = %entry
- %5 = invoke i8* @_Z22btAlignedAllocInternalji(i32 76, i32 16)
- to label %invcont unwind label %lpad ; [#uses=3]
-
-invcont: ; preds = %bb
- %6 = icmp eq i8* %5, null ; [#uses=1]
- br i1 %6, label %bb6, label %bb1
-
-bb1: ; preds = %invcont
- %7 = bitcast i8* %5 to %struct.btHashedOverlappingPairCache* ; [#uses=1]
- invoke void @_ZN28btHashedOverlappingPairCacheC1Ev(%struct.btHashedOverlappingPairCache* %7)
- to label %bb6 unwind label %lpad20
-
-bb6: ; preds = %bb1, %invcont
- %8 = bitcast i8* %5 to %struct..0btMultiSapOverlapFilterCallback* ; [#uses=1]
- store %struct..0btMultiSapOverlapFilterCallback* %8, %struct..0btMultiSapOverlapFilterCallback** %1, align 4
- store i8 1, i8* %2, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %entry
- %9 = mul i32 %maxProxies, 52 ; [#uses=1]
- %10 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16)
- to label %invcont8 unwind label %lpad ; [#uses=4]
-
-invcont8: ; preds = %bb7
- %11 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 5 ; [#uses=1]
- store i8* %10, i8** %11, align 4
- %12 = icmp eq i32 %maxProxies, 0 ; [#uses=1]
- br i1 %12, label %bb11, label %bb9
-
-bb9: ; preds = %bb9, %invcont8
- %indvar38 = phi i32 [ %indvar.next39, %bb9 ], [ 0, %invcont8 ] ; [#uses=2]
- %tmp41 = mul i32 %indvar38, 52 ; [#uses=2]
- %scevgep42 = getelementptr i8* %10, i32 %tmp41 ; [#uses=1]
- %scevgep4243 = bitcast i8* %scevgep42 to i8** ; [#uses=1]
- %tmp44 = add i32 %tmp41, 8 ; [#uses=1]
- %scevgep45 = getelementptr i8* %10, i32 %tmp44 ; [#uses=1]
- %scevgep4546 = bitcast i8* %scevgep45 to i8** ; [#uses=1]
- store i8* null, i8** %scevgep4243, align 4
- store i8* null, i8** %scevgep4546, align 4
- %indvar.next39 = add i32 %indvar38, 1 ; [#uses=2]
- %exitcond40 = icmp eq i32 %indvar.next39, %maxProxies ; [#uses=1]
- br i1 %exitcond40, label %bb11, label %bb9
-
-bb11: ; preds = %bb9, %invcont8
- %13 = bitcast i8* %10 to %struct.btSimpleBroadphaseProxy* ; [#uses=3]
- %14 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 4 ; [#uses=3]
- store %struct.btSimpleBroadphaseProxy* %13, %struct.btSimpleBroadphaseProxy** %14, align 4
- %15 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 2 ; [#uses=1]
- store i32 %maxProxies, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btSimpleBroadphase* %this, i32 0, i32 3 ; [#uses=1]
- store i32 -1, i32* %18, align 4
- %19 = icmp sgt i32 %maxProxies, 0 ; [#uses=1]
- br i1 %19, label %bb12, label %bb14
-
-bb12: ; preds = %bb12, %bb11
- %20 = phi %struct.btSimpleBroadphaseProxy* [ %13, %bb11 ], [ %.pre, %bb12 ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb11 ], [ %indvar.next, %bb12 ] ; [#uses=5]
- %tmp35 = add i32 %indvar, 1 ; [#uses=1]
- %tmp37 = add i32 %indvar, 2 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btSimpleBroadphaseProxy* %20, i32 %indvar, i32 1 ; [#uses=1]
- store i32 %tmp35, i32* %scevgep33, align 4
- %21 = load %struct.btSimpleBroadphaseProxy** %14, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btSimpleBroadphaseProxy* %21, i32 %indvar, i32 0, i32 4 ; [#uses=1]
- store i32 %tmp37, i32* %scevgep, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %maxProxies ; [#uses=1]
- %.pre = load %struct.btSimpleBroadphaseProxy** %14, align 4 ; [#uses=2]
- br i1 %exitcond, label %bb14, label %bb12
-
-bb14: ; preds = %bb12, %bb11
- %22 = phi %struct.btSimpleBroadphaseProxy* [ %13, %bb11 ], [ %.pre, %bb12 ] ; [#uses=1]
- %23 = add nsw i32 %maxProxies, -1 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btSimpleBroadphaseProxy* %22, i32 %23, i32 1 ; [#uses=1]
- store i32 0, i32* %24, align 4
- ret void
-
-lpad: ; preds = %bb7, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad20: ; preds = %bb1
- %eh_ptr21 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select23 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-ppad: ; preds = %lpad20, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr21, %lpad20 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btBroadphaseInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN18btSimpleBroadphaseC1EiP22btOverlappingPairCache(%struct.btSimpleBroadphase* nocapture %this, i32 %maxProxies, %struct..0btMultiSapOverlapFilterCallback* %overlappingPairCache) align 2 {
-entry:
- tail call void @_ZN18btSimpleBroadphaseC2EiP22btOverlappingPairCache(%struct.btSimpleBroadphase* %this, i32 %maxProxies, %struct..0btMultiSapOverlapFilterCallback* %overlappingPairCache)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btActivatingCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btActivatingCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btActivatingCollisionAlgorithmD0Ev(%struct.btActivatingCollisionAlgorithm* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btActivatingCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActivatingCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btActivatingCollisionAlgorithmD1Ev(%struct.btActivatingCollisionAlgorithm* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btActivatingCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=73]
-define void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btActivatingCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btActivatingCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* nocapture %colObj0, %struct.btCollisionObject* nocapture %colObj1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btActivatingCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=22]
-define void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* nocapture %colObj0, %struct.btCollisionObject* nocapture %colObj1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btActivatingCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btActivatingCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfo(%struct.btActivatingCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btActivatingCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN26btBoxBoxCollisionAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV26btBoxBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %4, label %bb, label %bb5
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btActionInterface* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 6 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %12 = invoke zeroext i8 %11(%struct.btActionInterface* %6, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- %toBoolnot = icmp eq i8 %12, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb8
-
-bb5: ; preds = %invcont, %entry
- ret void
-
-bb8: ; preds = %invcont
- %13 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 3 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %19 = bitcast %struct.btCollisionObject* %obj0 to i8* ; [#uses=1]
- %20 = bitcast %struct.btCollisionObject* %obj1 to i8* ; [#uses=1]
- %21 = invoke %struct.btPersistentManifold* %18(%struct.btActionInterface* %13, i8* %19, i8* %20)
- to label %invcont9 unwind label %lpad ; [#uses=1]
-
-invcont9: ; preds = %bb8
- store %struct.btPersistentManifold* %21, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont11: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb8, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont11 unwind label %lpad16
-
-lpad16: ; preds = %lpad
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN26btBoxBoxCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %unnamed_arg, %struct.btCollisionObject* nocapture %unnamed_arg2, %struct.btDispatcherInfo* nocapture %unnamed_arg4, %struct.btManifoldResult* nocapture %unnamed_arg6) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=11]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %this, %struct.btPersistentManifold** nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.196.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.196.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.196.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.196.0.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btPersistentManifold** ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btPersistentManifold** [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr %struct.btPersistentManifold** %12, i32 %indvar.i.i ; [#uses=2]
- %15 = icmp eq %struct.btPersistentManifold** %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %16 = load %struct.btPersistentManifold*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btPersistentManifold** %16, i32 %indvar.i.i ; [#uses=1]
- %17 = load %struct.btPersistentManifold** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btPersistentManifold* %17, %struct.btPersistentManifold** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.btPersistentManifold*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btPersistentManifold** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %struct.btPersistentManifold** %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btPersistentManifold** %12, %struct.btPersistentManifold*** %18, align 4
- store i32 %iftmp.196.0.i, i32* %2, align 4
- %.pre5 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i, %bb, %entry
- %25 = phi i32 [ %.pre5, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=2]
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 3 ; [#uses=1]
- %27 = load %struct.btPersistentManifold*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btPersistentManifold** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btPersistentManifold** %28, null ; [#uses=1]
- br i1 %29, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %30 = load %struct.btPersistentManifold** %_Val, align 4 ; [#uses=1]
- store %struct.btPersistentManifold* %30, %struct.btPersistentManifold** %28, align 4
- %.pre6 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %31 = phi i32 [ %25, %bb1 ], [ %.pre6, %bb2 ] ; [#uses=1]
- %32 = add nsw i32 %31, 1 ; [#uses=1]
- store i32 %32, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26btBoxBoxCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN26btBoxBoxCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=35]
- %detector = alloca %struct.btBoxBoxDetector, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=1]
- %4 = load %struct.btCollisionShape** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btCollisionShape* %4 to %struct.btBoxShape* ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=1]
- %7 = load %struct.btCollisionShape** %6, align 4 ; [#uses=1]
- %8 = bitcast %struct.btCollisionShape* %7 to %struct.btBoxShape* ; [#uses=1]
- %9 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- store %struct.btPersistentManifold* %1, %struct.btPersistentManifold** %9, align 4
- %10 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %11, align 4
- store float 0x43ABC16D60000000, float* %10, align 8
- %12 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 8
- %15 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 8
- %21 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 8
- %27 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 8
- %33 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 8
- %39 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- store float %44, float* %42, align 8
- %45 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 8
- %51 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 4
- %54 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 8
- %57 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 8
- %63 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 8
- %69 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 8
- %75 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 8
- %81 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- store float %86, float* %84, align 8
- %87 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- store float %92, float* %90, align 8
- %93 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- store float %95, float* %93, align 4
- %96 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- store float %98, float* %96, align 8
- %99 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- store float %101, float* %99, align 4
- %102 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- store float %104, float* %102, align 8
- %105 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=1]
- store float %107, float* %105, align 4
- call void @_ZN16btBoxBoxDetectorC1EP10btBoxShapeS1_(%struct.btBoxBoxDetector* %detector, %struct.btBoxShape* %5, %struct.btBoxShape* %8)
- %108 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 5 ; [#uses=1]
- %109 = load %struct.btActionInterface** %108, align 4 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0 ; [#uses=1]
- call void @_ZN16btBoxBoxDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btBoxBoxDetector* %detector, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %110, %struct.btActionInterface* %109, i8 zeroext 0)
- %111 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %112 = load i8* %111, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %112, 0 ; [#uses=1]
- br i1 %toBool, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb1
-
-bb1: ; preds = %bb
- %113 = load %struct.btPersistentManifold** %9, align 4 ; [#uses=4]
- %114 = getelementptr inbounds %struct.btPersistentManifold* %113, i32 0, i32 4 ; [#uses=1]
- %115 = load i32* %114, align 4 ; [#uses=1]
- %116 = icmp eq i32 %115, 0 ; [#uses=1]
- br i1 %116, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb.i
-
-bb.i: ; preds = %bb1
- %117 = getelementptr inbounds %struct.btPersistentManifold* %113, i32 0, i32 2 ; [#uses=1]
- %118 = load i8** %117, align 4 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %120 = load %struct.btCollisionObject** %119, align 4 ; [#uses=1]
- %121 = bitcast %struct.btCollisionObject* %120 to i8* ; [#uses=1]
- %122 = icmp eq i8* %118, %121 ; [#uses=1]
- br i1 %122, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %123 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %113, %struct.btTransform* %124, %struct.btTransform* %123)
- ret void
-
-bb3.i: ; preds = %bb.i
- %125 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %113, %struct.btTransform* %126, %struct.btTransform* %125)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit: ; preds = %bb1, %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN26btBoxBoxCollisionAlgorithmD0Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV26btBoxBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- %14 = bitcast %struct.btBox2dBox2dCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %14) nounwind
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %15)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN26btBoxBoxCollisionAlgorithmD1Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV26btBoxBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN26btBoxBoxCollisionAlgorithmD2Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV26btBoxBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN26btBoxBoxCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV26btBoxBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %4, label %bb, label %bb5
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btActionInterface* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 6 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %12 = invoke zeroext i8 %11(%struct.btActionInterface* %6, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- %toBoolnot = icmp eq i8 %12, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb8
-
-bb5: ; preds = %invcont, %entry
- ret void
-
-bb8: ; preds = %invcont
- %13 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 3 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %19 = bitcast %struct.btCollisionObject* %obj0 to i8* ; [#uses=1]
- %20 = bitcast %struct.btCollisionObject* %obj1 to i8* ; [#uses=1]
- %21 = invoke %struct.btPersistentManifold* %18(%struct.btActionInterface* %13, i8* %19, i8* %20)
- to label %invcont9 unwind label %lpad ; [#uses=1]
-
-invcont9: ; preds = %bb8
- store %struct.btPersistentManifold* %21, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont11: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb8, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont11 unwind label %lpad16
-
-lpad16: ; preds = %lpad
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN30btBox2dBox2dCollisionAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btBox2dBox2dCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %4, label %bb, label %bb5
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btActionInterface* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 6 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %12 = invoke zeroext i8 %11(%struct.btActionInterface* %6, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- %toBoolnot = icmp eq i8 %12, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb8
-
-bb5: ; preds = %invcont, %entry
- ret void
-
-bb8: ; preds = %invcont
- %13 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 3 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %19 = bitcast %struct.btCollisionObject* %obj0 to i8* ; [#uses=1]
- %20 = bitcast %struct.btCollisionObject* %obj1 to i8* ; [#uses=1]
- %21 = invoke %struct.btPersistentManifold* %18(%struct.btActionInterface* %13, i8* %19, i8* %20)
- to label %invcont9 unwind label %lpad ; [#uses=1]
-
-invcont9: ; preds = %bb8
- store %struct.btPersistentManifold* %21, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont11: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb8, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont11 unwind label %lpad16
-
-lpad16: ; preds = %lpad
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN30btBox2dBox2dCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %unnamed_arg, %struct.btCollisionObject* nocapture %unnamed_arg2, %struct.btDispatcherInfo* nocapture %unnamed_arg4, %struct.btManifoldResult* nocapture %unnamed_arg6) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=2]
-define internal fastcc i32 @_ZL17ClipSegmentToLineP10ClipVertexS0_RK9btVector3f(%struct.ClipVertex* nocapture %vOut, %struct.ClipVertex* nocapture %vIn, float %normal.0.0.0.val, float %normal.0.0.1.val, float %normal.0.0.2.val, float %offset) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fmul float %1, %normal.0.0.0.val ; [#uses=1]
- %3 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = fmul float %4, %normal.0.0.1.val ; [#uses=1]
- %6 = fadd float %2, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %8, %normal.0.0.2.val ; [#uses=1]
- %10 = fadd float %6, %9 ; [#uses=1]
- %11 = fsub float %10, %offset ; [#uses=5]
- %12 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 1, i32 0, i32 0, i32 0 ; [#uses=3]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %13, %normal.0.0.0.val ; [#uses=1]
- %15 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 1, i32 0, i32 0, i32 1 ; [#uses=3]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %16, %normal.0.0.1.val ; [#uses=1]
- %18 = fadd float %14, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 1, i32 0, i32 0, i32 2 ; [#uses=3]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %20, %normal.0.0.2.val ; [#uses=1]
- %22 = fadd float %18, %21 ; [#uses=1]
- %23 = fsub float %22, %offset ; [#uses=3]
- %24 = fcmp ugt float %11, 0.000000e+00 ; [#uses=1]
- br i1 %24, label %bb1, label %bb
-
-bb: ; preds = %entry
- %25 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %25, align 4
- %26 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %3, align 4 ; [#uses=1]
- store float %27, float* %26, align 4
- %28 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %7, align 4 ; [#uses=1]
- store float %29, float* %28, align 4
- %30 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %31 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 0, i32 1 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- store i32 %35, i32* %33, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %numOut.0 = phi i32 [ 1, %bb ], [ 0, %entry ] ; [#uses=7]
- %36 = fcmp ugt float %23, 0.000000e+00 ; [#uses=1]
- br i1 %36, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %37 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.0, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %12, align 4 ; [#uses=1]
- store float %38, float* %37, align 4
- %39 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.0, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %15, align 4 ; [#uses=1]
- store float %40, float* %39, align 4
- %41 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.0, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %19, align 4 ; [#uses=1]
- store float %42, float* %41, align 4
- %43 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.0, i32 0, i32 0, i32 3 ; [#uses=1]
- %44 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 1, i32 1 ; [#uses=1]
- %48 = load i32* %47, align 4 ; [#uses=1]
- store i32 %48, i32* %46, align 4
- %49 = add nsw i32 %numOut.0, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %numOut.1 = phi i32 [ %49, %bb2 ], [ %numOut.0, %bb1 ] ; [#uses=8]
- %50 = fmul float %11, %23 ; [#uses=1]
- %51 = fcmp olt float %50, 0.000000e+00 ; [#uses=1]
- br i1 %51, label %bb4, label %bb8
-
-bb4: ; preds = %bb3
- %52 = fsub float %11, %23 ; [#uses=1]
- %53 = fdiv float %11, %52 ; [#uses=3]
- %54 = load float* %19, align 4 ; [#uses=1]
- %55 = load float* %7, align 4 ; [#uses=2]
- %56 = fsub float %54, %55 ; [#uses=1]
- %57 = load float* %15, align 4 ; [#uses=1]
- %58 = load float* %3, align 4 ; [#uses=2]
- %59 = fsub float %57, %58 ; [#uses=1]
- %60 = load float* %12, align 4 ; [#uses=1]
- %61 = load float* %0, align 4 ; [#uses=2]
- %62 = fsub float %60, %61 ; [#uses=1]
- %63 = fmul float %56, %53 ; [#uses=1]
- %64 = fmul float %59, %53 ; [#uses=1]
- %65 = fmul float %62, %53 ; [#uses=1]
- %66 = fadd float %55, %63 ; [#uses=1]
- %67 = fadd float %58, %64 ; [#uses=1]
- %68 = fadd float %61, %65 ; [#uses=1]
- %69 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %68, float* %69, align 4
- %70 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %67, float* %70, align 4
- %71 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %66, float* %71, align 4
- %72 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %72, align 4
- %73 = fcmp ogt float %11, 0.000000e+00 ; [#uses=1]
- br i1 %73, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- %74 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 0, i32 1 ; [#uses=1]
- %75 = load i32* %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.1, i32 1 ; [#uses=1]
- store i32 %75, i32* %76, align 4
- br label %bb7
-
-bb6: ; preds = %bb4
- %77 = getelementptr inbounds %struct.ClipVertex* %vIn, i32 1, i32 1 ; [#uses=1]
- %78 = load i32* %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %struct.ClipVertex* %vOut, i32 %numOut.1, i32 1 ; [#uses=1]
- store i32 %78, i32* %79, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %80 = add nsw i32 %numOut.1, 1 ; [#uses=1]
- ret i32 %80
-
-bb8: ; preds = %bb3
- ret i32 %numOut.1
-}
-
-; [#uses=5]
-define internal fastcc float @_ZL14EdgeSeparationPK12btBox2dShapeRK11btTransformiS1_S4_(%struct.btBox2dShape* nocapture %poly1, %struct.btTransform* nocapture %xf1, i32 %edge1, %struct.btBox2dShape* nocapture %poly2, %struct.btTransform* nocapture %xf2) nounwind readonly {
-bb4:
- %0 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 %edge1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 %edge1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 %edge1, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=4]
- %17 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fmul float %18, %3 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = fmul float %21, %8 ; [#uses=1]
- %23 = fadd float %19, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = fmul float %25, %14 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=4]
- %28 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fmul float %29, %3 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=2]
- %33 = fmul float %32, %8 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %14 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=4]
- %39 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=2]
- %49 = load float* %46, align 4 ; [#uses=2]
- %50 = load float* %45, align 4 ; [#uses=2]
- %51 = load float* %44, align 4 ; [#uses=2]
- %52 = load float* %43, align 4 ; [#uses=2]
- %53 = load float* %42, align 4 ; [#uses=2]
- %54 = load float* %41, align 4 ; [#uses=2]
- %55 = load float* %40, align 4 ; [#uses=2]
- %56 = load float* %39, align 4 ; [#uses=2]
- %57 = fmul float %54, %38 ; [#uses=1]
- %58 = fmul float %55, %27 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = fmul float %56, %16 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=4]
- %62 = fmul float %51, %38 ; [#uses=1]
- %63 = fmul float %52, %27 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %53, %16 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=4]
- %67 = fmul float %48, %38 ; [#uses=1]
- %68 = fmul float %49, %27 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %50, %16 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=4]
- %scevgep22 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep23 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep24 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %scevgep22, align 4 ; [#uses=1]
- %73 = fmul float %72, %71 ; [#uses=1]
- %74 = load float* %scevgep23, align 4 ; [#uses=1]
- %75 = fmul float %74, %66 ; [#uses=1]
- %76 = fadd float %73, %75 ; [#uses=1]
- %77 = load float* %scevgep24, align 4 ; [#uses=1]
- %78 = fmul float %77, %61 ; [#uses=1]
- %79 = fadd float %76, %78 ; [#uses=2]
- %80 = fcmp olt float %79, 0x43ABC16D60000000 ; [#uses=1]
- %minDot.0 = select i1 %80, float %79, float 0x43ABC16D60000000 ; [#uses=2]
- %scevgep22.1 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep23.1 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep24.1 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %scevgep22.1, align 4 ; [#uses=1]
- %82 = fmul float %81, %71 ; [#uses=1]
- %83 = load float* %scevgep23.1, align 4 ; [#uses=1]
- %84 = fmul float %83, %66 ; [#uses=1]
- %85 = fadd float %82, %84 ; [#uses=1]
- %86 = load float* %scevgep24.1, align 4 ; [#uses=1]
- %87 = fmul float %86, %61 ; [#uses=1]
- %88 = fadd float %85, %87 ; [#uses=2]
- %89 = fcmp olt float %88, %minDot.0 ; [#uses=2]
- %minDot.0.1 = select i1 %89, float %88, float %minDot.0 ; [#uses=2]
- %scevgep22.2 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep23.2 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep24.2 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %scevgep22.2, align 4 ; [#uses=1]
- %91 = fmul float %90, %71 ; [#uses=1]
- %92 = load float* %scevgep23.2, align 4 ; [#uses=1]
- %93 = fmul float %92, %66 ; [#uses=1]
- %94 = fadd float %91, %93 ; [#uses=1]
- %95 = load float* %scevgep24.2, align 4 ; [#uses=1]
- %96 = fmul float %95, %61 ; [#uses=1]
- %97 = fadd float %94, %96 ; [#uses=2]
- %98 = fcmp olt float %97, %minDot.0.1 ; [#uses=2]
- %scevgep23.3 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep22.3 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 3, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %scevgep23.3, align 4 ; [#uses=1]
- %100 = load float* %scevgep22.3, align 4 ; [#uses=1]
- %scevgep24.3 = getelementptr %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 3, i32 0, i32 2 ; [#uses=1]
- %101 = load float* %scevgep24.3, align 4 ; [#uses=1]
- %102 = fmul float %99, %66 ; [#uses=1]
- %103 = fmul float %100, %71 ; [#uses=1]
- %104 = fmul float %101, %61 ; [#uses=1]
- %105 = fadd float %103, %102 ; [#uses=1]
- %106 = fadd float %105, %104 ; [#uses=1]
- %minDot.0.2 = select i1 %98, float %97, float %minDot.0.1 ; [#uses=1]
- %index.0.1 = zext i1 %89 to i32 ; [#uses=1]
- %107 = fcmp olt float %106, %minDot.0.2 ; [#uses=1]
- %index.0.2 = select i1 %98, i32 2, i32 %index.0.1 ; [#uses=1]
- %index.0.3 = select i1 %107, i32 3, i32 %index.0.2 ; [#uses=3]
- %108 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 2, i32 %edge1, i32 0, i32 0 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=3]
- %110 = fmul float %1, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 2, i32 %edge1, i32 0, i32 1 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=3]
- %113 = fmul float %6, %112 ; [#uses=1]
- %114 = fadd float %110, %113 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 2, i32 %edge1, i32 0, i32 2 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=3]
- %117 = fmul float %12, %116 ; [#uses=1]
- %118 = fadd float %114, %117 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fadd float %118, %120 ; [#uses=1]
- %122 = fmul float %18, %109 ; [#uses=1]
- %123 = fmul float %21, %112 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=1]
- %125 = fmul float %25, %116 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=1]
- %129 = fadd float %126, %128 ; [#uses=1]
- %130 = fmul float %29, %109 ; [#uses=1]
- %131 = fmul float %32, %112 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %36, %116 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- %137 = fadd float %134, %136 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 %index.0.3, i32 0, i32 0 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=3]
- %140 = fmul float %50, %139 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 %index.0.3, i32 0, i32 1 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=3]
- %143 = fmul float %53, %142 ; [#uses=1]
- %144 = fadd float %140, %143 ; [#uses=1]
- %145 = getelementptr inbounds %struct.btBox2dShape* %poly2, i32 0, i32 2, i32 %index.0.3, i32 0, i32 2 ; [#uses=1]
- %146 = load float* %145, align 4 ; [#uses=3]
- %147 = fmul float %56, %146 ; [#uses=1]
- %148 = fadd float %144, %147 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %150 = load float* %149, align 4 ; [#uses=1]
- %151 = fadd float %148, %150 ; [#uses=1]
- %152 = fmul float %49, %139 ; [#uses=1]
- %153 = fmul float %52, %142 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %55, %146 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- %159 = fadd float %156, %158 ; [#uses=1]
- %160 = fmul float %48, %139 ; [#uses=1]
- %161 = fmul float %51, %142 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fmul float %54, %146 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = fadd float %164, %166 ; [#uses=1]
- %168 = fsub float %151, %121 ; [#uses=1]
- %169 = fsub float %159, %129 ; [#uses=1]
- %170 = fsub float %167, %137 ; [#uses=1]
- %171 = fmul float %170, %38 ; [#uses=1]
- %172 = fmul float %169, %27 ; [#uses=1]
- %173 = fadd float %171, %172 ; [#uses=1]
- %174 = fmul float %168, %16 ; [#uses=1]
- %175 = fadd float %173, %174 ; [#uses=1]
- ret float %175
-}
-
-; [#uses=2]
-define internal fastcc float @_ZL17FindMaxSeparationPiPK12btBox2dShapeRK11btTransformS2_S5_(i32* nocapture %edgeIndex, %struct.btBox2dShape* nocapture %poly1, %struct.btTransform* nocapture %xf1, %struct.btBox2dShape* nocapture %poly2, %struct.btTransform* nocapture %xf2) nounwind {
-bb4:
- %0 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btBox2dShape* %poly1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %16, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = fmul float %21, %3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=2]
- %25 = fmul float %24, %8 ; [#uses=1]
- %26 = fadd float %22, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- %29 = fmul float %28, %14 ; [#uses=1]
- %30 = fadd float %26, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = fmul float %35, %3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = fmul float %38, %8 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=2]
- %43 = fmul float %42, %14 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %xf1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %44, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btBox2dShape* %poly2, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = fmul float %49, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btBox2dShape* %poly2, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=3]
- %57 = fmul float %54, %56 ; [#uses=1]
- %58 = fadd float %52, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btBox2dShape* %poly2, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=3]
- %63 = fmul float %60, %62 ; [#uses=1]
- %64 = fadd float %58, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fadd float %64, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fmul float %69, %51 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %72, %56 ; [#uses=1]
- %74 = fadd float %70, %73 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fmul float %76, %62 ; [#uses=1]
- %78 = fadd float %74, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fadd float %78, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fmul float %83, %51 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = fmul float %86, %56 ; [#uses=1]
- %88 = fadd float %84, %87 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = fmul float %90, %62 ; [#uses=1]
- %92 = fadd float %88, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %xf2, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fadd float %92, %94 ; [#uses=1]
- %96 = fsub float %67, %19 ; [#uses=3]
- %97 = fsub float %81, %33 ; [#uses=3]
- %98 = fsub float %95, %47 ; [#uses=3]
- %99 = fmul float %42, %98 ; [#uses=1]
- %100 = fmul float %28, %97 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %12, %96 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=4]
- %104 = fmul float %38, %98 ; [#uses=1]
- %105 = fmul float %24, %97 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %6, %96 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=4]
- %109 = fmul float %35, %98 ; [#uses=1]
- %110 = fmul float %21, %97 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = fmul float %1, %96 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=4]
- %scevgep66 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep67 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep68 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %114 = load float* %scevgep66, align 4 ; [#uses=1]
- %115 = fmul float %114, %113 ; [#uses=1]
- %116 = load float* %scevgep67, align 4 ; [#uses=1]
- %117 = fmul float %116, %108 ; [#uses=1]
- %118 = fadd float %115, %117 ; [#uses=1]
- %119 = load float* %scevgep68, align 4 ; [#uses=1]
- %120 = fmul float %119, %103 ; [#uses=1]
- %121 = fadd float %118, %120 ; [#uses=2]
- %122 = fcmp ogt float %121, 0xC3ABC16D60000000 ; [#uses=1]
- %maxDot.0 = select i1 %122, float %121, float 0xC3ABC16D60000000 ; [#uses=2]
- %scevgep66.1 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep67.1 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep68.1 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %123 = load float* %scevgep66.1, align 4 ; [#uses=1]
- %124 = fmul float %123, %113 ; [#uses=1]
- %125 = load float* %scevgep67.1, align 4 ; [#uses=1]
- %126 = fmul float %125, %108 ; [#uses=1]
- %127 = fadd float %124, %126 ; [#uses=1]
- %128 = load float* %scevgep68.1, align 4 ; [#uses=1]
- %129 = fmul float %128, %103 ; [#uses=1]
- %130 = fadd float %127, %129 ; [#uses=2]
- %131 = fcmp ogt float %130, %maxDot.0 ; [#uses=2]
- %maxDot.0.1 = select i1 %131, float %130, float %maxDot.0 ; [#uses=2]
- %scevgep66.2 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep67.2 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep68.2 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 2, i32 0, i32 2 ; [#uses=1]
- %132 = load float* %scevgep66.2, align 4 ; [#uses=1]
- %133 = fmul float %132, %113 ; [#uses=1]
- %134 = load float* %scevgep67.2, align 4 ; [#uses=1]
- %135 = fmul float %134, %108 ; [#uses=1]
- %136 = fadd float %133, %135 ; [#uses=1]
- %137 = load float* %scevgep68.2, align 4 ; [#uses=1]
- %138 = fmul float %137, %103 ; [#uses=1]
- %139 = fadd float %136, %138 ; [#uses=2]
- %140 = fcmp ogt float %139, %maxDot.0.1 ; [#uses=2]
- %scevgep67.3 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep66.3 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 3, i32 0, i32 0 ; [#uses=1]
- %141 = load float* %scevgep67.3, align 4 ; [#uses=1]
- %142 = load float* %scevgep66.3, align 4 ; [#uses=1]
- %scevgep68.3 = getelementptr %struct.btBox2dShape* %poly1, i32 0, i32 3, i32 3, i32 0, i32 2 ; [#uses=1]
- %143 = load float* %scevgep68.3, align 4 ; [#uses=1]
- %144 = fmul float %141, %108 ; [#uses=1]
- %145 = fmul float %142, %113 ; [#uses=1]
- %146 = fmul float %143, %103 ; [#uses=1]
- %147 = fadd float %145, %144 ; [#uses=1]
- %148 = fadd float %147, %146 ; [#uses=1]
- %maxDot.0.2 = select i1 %140, float %139, float %maxDot.0.1 ; [#uses=1]
- %edge.0.1 = zext i1 %131 to i32 ; [#uses=1]
- %149 = fcmp ogt float %148, %maxDot.0.2 ; [#uses=1]
- %edge.0.2 = select i1 %140, i32 2, i32 %edge.0.1 ; [#uses=1]
- %edge.0.3 = select i1 %149, i32 3, i32 %edge.0.2 ; [#uses=5]
- %150 = tail call fastcc float @_ZL14EdgeSeparationPK12btBox2dShapeRK11btTransformiS1_S4_(%struct.btBox2dShape* %poly1, %struct.btTransform* %xf1, i32 %edge.0.3, %struct.btBox2dShape* %poly2, %struct.btTransform* %xf2) ; [#uses=5]
- %151 = fcmp ogt float %150, 0.000000e+00 ; [#uses=1]
- br i1 %151, label %bb36, label %bb6
-
-bb6: ; preds = %bb4
- %152 = icmp sgt i32 %edge.0.3, 0 ; [#uses=1]
- %edge.1.op = add i32 %edge.0.3, -1 ; [#uses=1]
- %iftmp.197.0 = select i1 %152, i32 %edge.1.op, i32 3 ; [#uses=2]
- %153 = tail call fastcc float @_ZL14EdgeSeparationPK12btBox2dShapeRK11btTransformiS1_S4_(%struct.btBox2dShape* %poly1, %struct.btTransform* %xf1, i32 %iftmp.197.0, %struct.btBox2dShape* %poly2, %struct.btTransform* %xf2) ; [#uses=5]
- %154 = fcmp ogt float %153, 0.000000e+00 ; [#uses=1]
- br i1 %154, label %bb36, label %bb11
-
-bb11: ; preds = %bb6
- %155 = add nsw i32 %edge.0.3, 1 ; [#uses=2]
- %156 = icmp slt i32 %155, 4 ; [#uses=1]
- %iftmp.198.0 = select i1 %156, i32 %155, i32 0 ; [#uses=2]
- %157 = tail call fastcc float @_ZL14EdgeSeparationPK12btBox2dShapeRK11btTransformiS1_S4_(%struct.btBox2dShape* %poly1, %struct.btTransform* %xf1, i32 %iftmp.198.0, %struct.btBox2dShape* %poly2, %struct.btTransform* %xf2) ; [#uses=5]
- %158 = fcmp ogt float %157, 0.000000e+00 ; [#uses=1]
- br i1 %158, label %bb36, label %bb16
-
-bb16: ; preds = %bb11
- %159 = fcmp ule float %153, %150 ; [#uses=1]
- %160 = fcmp ule float %153, %157 ; [#uses=1]
- %or.cond = or i1 %159, %160 ; [#uses=1]
- br i1 %or.cond, label %bb19, label %bb31.us
-
-bb19: ; preds = %bb16
- %161 = fcmp ogt float %157, %150 ; [#uses=1]
- br i1 %161, label %bb31, label %bb21
-
-bb33.us: ; preds = %bb31.us
- %162 = fcmp ogt float %164, %bestSeparation.0.us ; [#uses=1]
- br i1 %162, label %bb31.us, label %bb35
-
-bb31.us: ; preds = %bb33.us, %bb16
- %bestSeparation.0.us = phi float [ %164, %bb33.us ], [ %153, %bb16 ] ; [#uses=2]
- %bestEdge.0.us = phi i32 [ %iftmp.199.0.us, %bb33.us ], [ %iftmp.197.0, %bb16 ] ; [#uses=3]
- %163 = icmp sgt i32 %bestEdge.0.us, 0 ; [#uses=1]
- %bestEdge.0.op.us = add i32 %bestEdge.0.us, -1 ; [#uses=1]
- %iftmp.199.0.us = select i1 %163, i32 %bestEdge.0.op.us, i32 3 ; [#uses=2]
- %164 = tail call fastcc float @_ZL14EdgeSeparationPK12btBox2dShapeRK11btTransformiS1_S4_(%struct.btBox2dShape* %poly1, %struct.btTransform* %xf1, i32 %iftmp.199.0.us, %struct.btBox2dShape* %poly2, %struct.btTransform* %xf2) ; [#uses=4]
- %165 = fcmp ogt float %164, 0.000000e+00 ; [#uses=1]
- br i1 %165, label %bb36, label %bb33.us
-
-bb21: ; preds = %bb19
- store i32 %edge.0.3, i32* %edgeIndex, align 4
- ret float %150
-
-bb31: ; preds = %bb33, %bb19
- %bestSeparation.0 = phi float [ %168, %bb33 ], [ %157, %bb19 ] ; [#uses=2]
- %bestEdge.0 = phi i32 [ %iftmp.200.0, %bb33 ], [ %iftmp.198.0, %bb19 ] ; [#uses=2]
- %166 = add nsw i32 %bestEdge.0, 1 ; [#uses=2]
- %167 = icmp slt i32 %166, 4 ; [#uses=1]
- %iftmp.200.0 = select i1 %167, i32 %166, i32 0 ; [#uses=2]
- %168 = tail call fastcc float @_ZL14EdgeSeparationPK12btBox2dShapeRK11btTransformiS1_S4_(%struct.btBox2dShape* %poly1, %struct.btTransform* %xf1, i32 %iftmp.200.0, %struct.btBox2dShape* %poly2, %struct.btTransform* %xf2) ; [#uses=4]
- %169 = fcmp ogt float %168, 0.000000e+00 ; [#uses=1]
- br i1 %169, label %bb36, label %bb33
-
-bb33: ; preds = %bb31
- %170 = fcmp ogt float %168, %bestSeparation.0 ; [#uses=1]
- br i1 %170, label %bb31, label %bb35
-
-bb35: ; preds = %bb33, %bb33.us
- %bestSeparation.0.lcssa = phi float [ %bestSeparation.0.us, %bb33.us ], [ %bestSeparation.0, %bb33 ] ; [#uses=1]
- %bestEdge.0.lcssa = phi i32 [ %bestEdge.0.us, %bb33.us ], [ %bestEdge.0, %bb33 ] ; [#uses=1]
- store i32 %bestEdge.0.lcssa, i32* %edgeIndex, align 4
- ret float %bestSeparation.0.lcssa
-
-bb36: ; preds = %bb31, %bb31.us, %bb11, %bb6, %bb4
- %.0 = phi float [ %150, %bb4 ], [ %153, %bb6 ], [ %157, %bb11 ], [ %164, %bb31.us ], [ %168, %bb31 ] ; [#uses=1]
- ret float %.0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btBox2dBox2dCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_Z17b2CollidePolygonsP16btManifoldResultPK12btBox2dShapeRK11btTransformS3_S6_(%struct.btManifoldResult* %manifold, %struct.btBox2dShape* nocapture %polyA, %struct.btTransform* %xfA, %struct.btBox2dShape* nocapture %polyB, %struct.btTransform* %xfB) {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %edgeA = alloca i32, align 4 ; [#uses=3]
- %edgeB = alloca i32, align 4 ; [#uses=3]
- %incidentEdge = alloca [2 x %struct.ClipVertex], align 8 ; [#uses=9]
- %clipPoints1 = alloca [2 x %struct.ClipVertex], align 8 ; [#uses=9]
- %clipPoints2 = alloca [2 x %struct.ClipVertex], align 8 ; [#uses=13]
- store i32 0, i32* %edgeA, align 4
- %1 = call fastcc float @_ZL17FindMaxSeparationPiPK12btBox2dShapeRK11btTransformS2_S5_(i32* %edgeA, %struct.btBox2dShape* %polyA, %struct.btTransform* %xfA, %struct.btBox2dShape* %polyB, %struct.btTransform* %xfB) ; [#uses=2]
- %2 = fcmp ogt float %1, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- store i32 0, i32* %edgeB, align 4
- %3 = call fastcc float @_ZL17FindMaxSeparationPiPK12btBox2dShapeRK11btTransformS2_S5_(i32* %edgeB, %struct.btBox2dShape* %polyB, %struct.btTransform* %xfB, %struct.btBox2dShape* %polyA, %struct.btTransform* %xfA) ; [#uses=2]
- %4 = fcmp ogt float %3, 0.000000e+00 ; [#uses=1]
- br i1 %4, label %return, label %bb1
-
-bb1: ; preds = %bb
- %5 = fmul float %1, 0x3FEF5C2900000000 ; [#uses=1]
- %6 = fadd float %5, 0x3F50624DE0000000 ; [#uses=1]
- %7 = fcmp olt float %6, %3 ; [#uses=1]
- br i1 %7, label %bb7, label %bb3
-
-bb3: ; preds = %bb1
- br label %bb7
-
-bb7: ; preds = %bb3, %bb1
- %xfA.pn = phi %struct.btTransform* [ %xfB, %bb3 ], [ %xfA, %bb1 ] ; [#uses=12]
- %xfB.pn = phi %struct.btTransform* [ %xfA, %bb3 ], [ %xfB, %bb1 ] ; [#uses=12]
- %poly1.0 = phi %struct.btBox2dShape* [ %polyA, %bb3 ], [ %polyB, %bb1 ] ; [#uses=8]
- %poly2.0 = phi %struct.btBox2dShape* [ %polyB, %bb3 ], [ %polyA, %bb1 ] ; [#uses=18]
- %edge1.0.in = phi i32* [ %edgeA, %bb3 ], [ %edgeB, %bb1 ] ; [#uses=1]
- %flip.0 = phi i8 [ 0, %bb3 ], [ 1, %bb1 ] ; [#uses=1]
- %xf1.0.0.0.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %xf1.0.0.0.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %xf1.0.0.0.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %xf1.0.0.1.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %xf1.0.0.1.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %xf1.0.0.1.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %xf1.0.0.2.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %xf1.0.0.2.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %xf1.0.0.2.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %xf1.1.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %xf1.1.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %xf1.1.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfB.pn, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %xf2.0.0.0.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %xf2.0.0.0.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %xf2.0.0.0.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %xf2.0.0.1.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %xf2.0.0.1.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %xf2.0.0.1.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %xf2.0.0.2.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %xf2.0.0.2.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %xf2.0.0.2.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %xf2.1.0.0.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %xf2.1.0.1.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %xf2.1.0.2.0.in = getelementptr inbounds %struct.btTransform* %xfA.pn, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %xf1.0.0.0.0.0.0 = load float* %xf1.0.0.0.0.0.0.in, align 4 ; [#uses=4]
- %xf1.0.0.0.0.1.0 = load float* %xf1.0.0.0.0.1.0.in, align 4 ; [#uses=4]
- %xf1.0.0.0.0.2.0 = load float* %xf1.0.0.0.0.2.0.in, align 4 ; [#uses=4]
- %xf1.0.0.1.0.0.0 = load float* %xf1.0.0.1.0.0.0.in, align 4 ; [#uses=4]
- %xf1.0.0.1.0.1.0 = load float* %xf1.0.0.1.0.1.0.in, align 4 ; [#uses=4]
- %xf1.0.0.1.0.2.0 = load float* %xf1.0.0.1.0.2.0.in, align 4 ; [#uses=4]
- %xf1.0.0.2.0.0.0 = load float* %xf1.0.0.2.0.0.0.in, align 4 ; [#uses=4]
- %xf1.0.0.2.0.1.0 = load float* %xf1.0.0.2.0.1.0.in, align 4 ; [#uses=4]
- %xf1.0.0.2.0.2.0 = load float* %xf1.0.0.2.0.2.0.in, align 4 ; [#uses=4]
- %xf1.1.0.0.0 = load float* %xf1.1.0.0.0.in, align 4 ; [#uses=2]
- %xf1.1.0.1.0 = load float* %xf1.1.0.1.0.in, align 4 ; [#uses=2]
- %xf1.1.0.2.0 = load float* %xf1.1.0.2.0.in, align 4 ; [#uses=2]
- %xf2.0.0.0.0.0.0 = load float* %xf2.0.0.0.0.0.0.in, align 4 ; [#uses=3]
- %xf2.0.0.0.0.1.0 = load float* %xf2.0.0.0.0.1.0.in, align 4 ; [#uses=3]
- %xf2.0.0.0.0.2.0 = load float* %xf2.0.0.0.0.2.0.in, align 4 ; [#uses=3]
- %xf2.0.0.1.0.0.0 = load float* %xf2.0.0.1.0.0.0.in, align 4 ; [#uses=3]
- %xf2.0.0.1.0.1.0 = load float* %xf2.0.0.1.0.1.0.in, align 4 ; [#uses=3]
- %xf2.0.0.1.0.2.0 = load float* %xf2.0.0.1.0.2.0.in, align 4 ; [#uses=3]
- %xf2.0.0.2.0.0.0 = load float* %xf2.0.0.2.0.0.0.in, align 4 ; [#uses=3]
- %xf2.0.0.2.0.1.0 = load float* %xf2.0.0.2.0.1.0.in, align 4 ; [#uses=3]
- %xf2.0.0.2.0.2.0 = load float* %xf2.0.0.2.0.2.0.in, align 4 ; [#uses=3]
- %xf2.1.0.0.0 = load float* %xf2.1.0.0.0.in, align 4 ; [#uses=2]
- %xf2.1.0.1.0 = load float* %xf2.1.0.1.0.in, align 4 ; [#uses=2]
- %xf2.1.0.2.0 = load float* %xf2.1.0.2.0.in, align 4 ; [#uses=2]
- %edge1.0 = load i32* %edge1.0.in, align 4 ; [#uses=7]
- %8 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 3, i32 %edge1.0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = fmul float %xf1.0.0.2.0.0.0, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 3, i32 %edge1.0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=3]
- %13 = fmul float %xf1.0.0.2.0.1.0, %12 ; [#uses=1]
- %14 = fadd float %10, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 3, i32 %edge1.0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fmul float %xf1.0.0.2.0.2.0, %16 ; [#uses=1]
- %18 = fadd float %14, %17 ; [#uses=3]
- %19 = fmul float %xf1.0.0.1.0.0.0, %9 ; [#uses=1]
- %20 = fmul float %xf1.0.0.1.0.1.0, %12 ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=1]
- %22 = fmul float %xf1.0.0.1.0.2.0, %16 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=3]
- %24 = fmul float %xf1.0.0.0.0.0.0, %9 ; [#uses=1]
- %25 = fmul float %xf1.0.0.0.0.1.0, %12 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fmul float %xf1.0.0.0.0.2.0, %16 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=3]
- %29 = fmul float %xf2.0.0.0.0.2.0, %28 ; [#uses=1]
- %30 = fmul float %xf2.0.0.1.0.2.0, %23 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=1]
- %32 = fmul float %xf2.0.0.2.0.2.0, %18 ; [#uses=1]
- %33 = fadd float %31, %32 ; [#uses=4]
- %34 = fmul float %xf2.0.0.0.0.1.0, %28 ; [#uses=1]
- %35 = fmul float %xf2.0.0.1.0.1.0, %23 ; [#uses=1]
- %36 = fadd float %34, %35 ; [#uses=1]
- %37 = fmul float %xf2.0.0.2.0.1.0, %18 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=4]
- %39 = fmul float %xf2.0.0.0.0.0.0, %28 ; [#uses=1]
- %40 = fmul float %xf2.0.0.1.0.0.0, %23 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = fmul float %xf2.0.0.2.0.0.0, %18 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=4]
- %scevgep25.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep26.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep27.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %scevgep25.i, align 4 ; [#uses=1]
- %45 = fmul float %43, %44 ; [#uses=1]
- %46 = load float* %scevgep26.i, align 4 ; [#uses=1]
- %47 = fmul float %38, %46 ; [#uses=1]
- %48 = fadd float %45, %47 ; [#uses=1]
- %49 = load float* %scevgep27.i, align 4 ; [#uses=1]
- %50 = fmul float %33, %49 ; [#uses=1]
- %51 = fadd float %48, %50 ; [#uses=2]
- %52 = fcmp olt float %51, 0x43ABC16D60000000 ; [#uses=1]
- %minDot.0.i = select i1 %52, float %51, float 0x43ABC16D60000000 ; [#uses=2]
- %scevgep25.1.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep26.1.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep27.1.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %scevgep25.1.i, align 4 ; [#uses=1]
- %54 = fmul float %43, %53 ; [#uses=1]
- %55 = load float* %scevgep26.1.i, align 4 ; [#uses=1]
- %56 = fmul float %38, %55 ; [#uses=1]
- %57 = fadd float %54, %56 ; [#uses=1]
- %58 = load float* %scevgep27.1.i, align 4 ; [#uses=1]
- %59 = fmul float %33, %58 ; [#uses=1]
- %60 = fadd float %57, %59 ; [#uses=2]
- %61 = fcmp olt float %60, %minDot.0.i ; [#uses=2]
- %minDot.0.1.i = select i1 %61, float %60, float %minDot.0.i ; [#uses=2]
- %scevgep25.2.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep26.2.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep27.2.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 2, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %scevgep25.2.i, align 4 ; [#uses=1]
- %63 = fmul float %43, %62 ; [#uses=1]
- %64 = load float* %scevgep26.2.i, align 4 ; [#uses=1]
- %65 = fmul float %38, %64 ; [#uses=1]
- %66 = fadd float %63, %65 ; [#uses=1]
- %67 = load float* %scevgep27.2.i, align 4 ; [#uses=1]
- %68 = fmul float %33, %67 ; [#uses=1]
- %69 = fadd float %66, %68 ; [#uses=2]
- %70 = fcmp olt float %69, %minDot.0.1.i ; [#uses=2]
- %scevgep26.3.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep25.3.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 3, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %scevgep26.3.i, align 4 ; [#uses=1]
- %72 = load float* %scevgep25.3.i, align 4 ; [#uses=1]
- %scevgep27.3.i = getelementptr %struct.btBox2dShape* %poly2.0, i32 0, i32 3, i32 3, i32 0, i32 2 ; [#uses=1]
- %73 = load float* %scevgep27.3.i, align 4 ; [#uses=1]
- %74 = fmul float %38, %71 ; [#uses=1]
- %75 = fmul float %43, %72 ; [#uses=1]
- %76 = fmul float %33, %73 ; [#uses=1]
- %77 = fadd float %75, %74 ; [#uses=1]
- %78 = fadd float %77, %76 ; [#uses=1]
- %minDot.0.2.i = select i1 %70, float %69, float %minDot.0.1.i ; [#uses=1]
- %index.0.1.i = zext i1 %61 to i32 ; [#uses=1]
- %79 = fcmp olt float %78, %minDot.0.2.i ; [#uses=1]
- %index.0.2.i = select i1 %70, i32 2, i32 %index.0.1.i ; [#uses=1]
- %index.0.3.i = select i1 %79, i32 3, i32 %index.0.2.i ; [#uses=4]
- %80 = add nsw i32 %index.0.3.i, 1 ; [#uses=2]
- %81 = icmp ult i32 %80, 4 ; [#uses=1]
- %iftmp.201.0.i = select i1 %81, i32 %80, i32 0 ; [#uses=3]
- %82 = getelementptr inbounds %struct.btBox2dShape* %poly2.0, i32 0, i32 2, i32 %index.0.3.i, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=3]
- %84 = fmul float %xf2.0.0.2.0.0.0, %83 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btBox2dShape* %poly2.0, i32 0, i32 2, i32 %index.0.3.i, i32 0, i32 1 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=3]
- %87 = fmul float %xf2.0.0.2.0.1.0, %86 ; [#uses=1]
- %88 = fadd float %84, %87 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btBox2dShape* %poly2.0, i32 0, i32 2, i32 %index.0.3.i, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=3]
- %91 = fmul float %xf2.0.0.2.0.2.0, %90 ; [#uses=1]
- %92 = fadd float %88, %91 ; [#uses=1]
- %93 = fadd float %92, %xf2.1.0.2.0 ; [#uses=1]
- %94 = fmul float %xf2.0.0.1.0.0.0, %83 ; [#uses=1]
- %95 = fmul float %xf2.0.0.1.0.1.0, %86 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = fmul float %xf2.0.0.1.0.2.0, %90 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=1]
- %99 = fadd float %98, %xf2.1.0.1.0 ; [#uses=1]
- %100 = fmul float %xf2.0.0.0.0.0.0, %83 ; [#uses=1]
- %101 = fmul float %xf2.0.0.0.0.1.0, %86 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %xf2.0.0.0.0.2.0, %90 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fadd float %104, %xf2.1.0.0.0 ; [#uses=1]
- %106 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %105, float* %106, align 8
- %107 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %99, float* %107, align 4
- %108 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %93, float* %108, align 8
- %109 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %109, align 4
- %110 = getelementptr inbounds %struct.btBox2dShape* %poly2.0, i32 0, i32 2, i32 %iftmp.201.0.i, i32 0, i32 0 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=3]
- %112 = fmul float %xf2.0.0.2.0.0.0, %111 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btBox2dShape* %poly2.0, i32 0, i32 2, i32 %iftmp.201.0.i, i32 0, i32 1 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=3]
- %115 = fmul float %xf2.0.0.2.0.1.0, %114 ; [#uses=1]
- %116 = fadd float %112, %115 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btBox2dShape* %poly2.0, i32 0, i32 2, i32 %iftmp.201.0.i, i32 0, i32 2 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=3]
- %119 = fmul float %xf2.0.0.2.0.2.0, %118 ; [#uses=1]
- %120 = fadd float %116, %119 ; [#uses=1]
- %121 = fadd float %120, %xf2.1.0.2.0 ; [#uses=1]
- %122 = fmul float %xf2.0.0.1.0.0.0, %111 ; [#uses=1]
- %123 = fmul float %xf2.0.0.1.0.1.0, %114 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=1]
- %125 = fmul float %xf2.0.0.1.0.2.0, %118 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = fadd float %126, %xf2.1.0.1.0 ; [#uses=1]
- %128 = fmul float %xf2.0.0.0.0.0.0, %111 ; [#uses=1]
- %129 = fmul float %xf2.0.0.0.0.1.0, %114 ; [#uses=1]
- %130 = fadd float %128, %129 ; [#uses=1]
- %131 = fmul float %xf2.0.0.0.0.2.0, %118 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fadd float %132, %xf2.1.0.0.0 ; [#uses=1]
- %134 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %133, float* %134, align 4
- %135 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %127, float* %135, align 4
- %136 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %121, float* %136, align 4
- %137 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %137, align 4
- %138 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 2, i32 0 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 2, i32 %edge1.0, i32 0, i32 0 ; [#uses=1]
- %140 = load float* %139, align 4 ; [#uses=4]
- %141 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 2, i32 %edge1.0, i32 0, i32 1 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=4]
- %143 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 2, i32 %edge1.0, i32 0, i32 2 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=4]
- %145 = add nsw i32 %edge1.0, 1 ; [#uses=2]
- %146 = icmp slt i32 %145, 4 ; [#uses=1]
- br i1 %146, label %bb8, label %bb17
-
-bb8: ; preds = %bb7
- %147 = getelementptr inbounds %struct.btBox2dShape* %poly1.0, i32 0, i32 2, i32 %145 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb8, %bb7
- %iftmp.203.0 = phi %struct.btQuadWord* [ %147, %bb8 ], [ %138, %bb7 ] ; [#uses=3]
- %148 = getelementptr inbounds %struct.btQuadWord* %iftmp.203.0, i32 0, i32 0, i32 0 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=4]
- %150 = getelementptr inbounds %struct.btQuadWord* %iftmp.203.0, i32 0, i32 0, i32 1 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=4]
- %152 = getelementptr inbounds %struct.btQuadWord* %iftmp.203.0, i32 0, i32 0, i32 2 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=4]
- %154 = fsub float %153, %144 ; [#uses=3]
- %155 = fsub float %151, %142 ; [#uses=3]
- %156 = fsub float %149, %140 ; [#uses=3]
- %157 = fmul float %xf1.0.0.2.0.0.0, %156 ; [#uses=1]
- %158 = fmul float %xf1.0.0.2.0.1.0, %155 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fmul float %xf1.0.0.2.0.2.0, %154 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=3]
- %162 = fmul float %xf1.0.0.1.0.0.0, %156 ; [#uses=1]
- %163 = fmul float %xf1.0.0.1.0.1.0, %155 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- %165 = fmul float %xf1.0.0.1.0.2.0, %154 ; [#uses=1]
- %166 = fadd float %164, %165 ; [#uses=3]
- %167 = fmul float %xf1.0.0.0.0.0.0, %156 ; [#uses=1]
- %168 = fmul float %xf1.0.0.0.0.1.0, %155 ; [#uses=1]
- %169 = fadd float %167, %168 ; [#uses=1]
- %170 = fmul float %xf1.0.0.0.0.2.0, %154 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=3]
- %172 = fmul float %171, %171 ; [#uses=1]
- %173 = fmul float %166, %166 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=1]
- %175 = fmul float %161, %161 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=1]
- %177 = call float @sqrtf(float %176) nounwind readonly ; [#uses=1]
- %178 = fdiv float 1.000000e+00, %177 ; [#uses=3]
- %179 = fmul float %171, %178 ; [#uses=5]
- %180 = fmul float %166, %178 ; [#uses=7]
- %181 = fmul float %161, %178 ; [#uses=4]
- %182 = fsub float -0.000000e+00, %179 ; [#uses=4]
- %183 = fmul float %xf1.0.0.2.0.0.0, %140 ; [#uses=1]
- %184 = fmul float %xf1.0.0.2.0.1.0, %142 ; [#uses=1]
- %185 = fadd float %183, %184 ; [#uses=1]
- %186 = fmul float %xf1.0.0.2.0.2.0, %144 ; [#uses=1]
- %187 = fadd float %185, %186 ; [#uses=1]
- %188 = fadd float %187, %xf1.1.0.2.0 ; [#uses=2]
- %189 = fmul float %xf1.0.0.1.0.0.0, %140 ; [#uses=1]
- %190 = fmul float %xf1.0.0.1.0.1.0, %142 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = fmul float %xf1.0.0.1.0.2.0, %144 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- %194 = fadd float %193, %xf1.1.0.1.0 ; [#uses=2]
- %195 = fmul float %xf1.0.0.0.0.0.0, %140 ; [#uses=1]
- %196 = fmul float %xf1.0.0.0.0.1.0, %142 ; [#uses=1]
- %197 = fadd float %195, %196 ; [#uses=1]
- %198 = fmul float %xf1.0.0.0.0.2.0, %144 ; [#uses=1]
- %199 = fadd float %197, %198 ; [#uses=1]
- %200 = fadd float %199, %xf1.1.0.0.0 ; [#uses=2]
- %201 = fmul float %xf1.0.0.2.0.0.0, %149 ; [#uses=1]
- %202 = fmul float %xf1.0.0.2.0.1.0, %151 ; [#uses=1]
- %203 = fadd float %201, %202 ; [#uses=1]
- %204 = fmul float %xf1.0.0.2.0.2.0, %153 ; [#uses=1]
- %205 = fadd float %203, %204 ; [#uses=1]
- %206 = fadd float %205, %xf1.1.0.2.0 ; [#uses=1]
- %207 = fmul float %xf1.0.0.1.0.0.0, %149 ; [#uses=1]
- %208 = fmul float %xf1.0.0.1.0.1.0, %151 ; [#uses=1]
- %209 = fadd float %207, %208 ; [#uses=1]
- %210 = fmul float %xf1.0.0.1.0.2.0, %153 ; [#uses=1]
- %211 = fadd float %209, %210 ; [#uses=1]
- %212 = fadd float %211, %xf1.1.0.1.0 ; [#uses=1]
- %213 = fmul float %xf1.0.0.0.0.0.0, %149 ; [#uses=1]
- %214 = fmul float %xf1.0.0.0.0.1.0, %151 ; [#uses=1]
- %215 = fadd float %213, %214 ; [#uses=1]
- %216 = fmul float %xf1.0.0.0.0.2.0, %153 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=1]
- %218 = fadd float %217, %xf1.1.0.0.0 ; [#uses=1]
- %219 = fmul float %180, %200 ; [#uses=1]
- %220 = fmul float %194, %182 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=1]
- %222 = fmul float %188, 0.000000e+00 ; [#uses=1]
- %223 = fadd float %221, %222 ; [#uses=1]
- %224 = fmul float %179, %200 ; [#uses=1]
- %225 = fmul float %180, %194 ; [#uses=1]
- %226 = fadd float %224, %225 ; [#uses=1]
- %227 = fmul float %181, %188 ; [#uses=1]
- %228 = fadd float %226, %227 ; [#uses=1]
- %229 = fsub float -0.000000e+00, %228 ; [#uses=1]
- %230 = fmul float %179, %218 ; [#uses=1]
- %231 = fmul float %180, %212 ; [#uses=1]
- %232 = fadd float %230, %231 ; [#uses=1]
- %233 = fmul float %181, %206 ; [#uses=1]
- %234 = fadd float %232, %233 ; [#uses=1]
- %235 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %235, align 8
- %236 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %236, align 4
- %237 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %237, align 8
- %238 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %238, align 4
- %239 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %239, align 4
- %240 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %240, align 4
- %241 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %241, align 4
- %242 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %242, align 4
- %243 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %243, align 8
- %244 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %244, align 4
- %245 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %245, align 8
- %246 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %246, align 4
- %247 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %247, align 4
- %248 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %248, align 4
- %249 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %249, align 4
- %250 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %250, align 4
- %251 = fsub float -0.000000e+00, %181 ; [#uses=1]
- %252 = fsub float -0.000000e+00, %180 ; [#uses=2]
- %253 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints1, i32 0, i32 0 ; [#uses=2]
- %254 = getelementptr inbounds [2 x %struct.ClipVertex]* %incidentEdge, i32 0, i32 0 ; [#uses=1]
- %255 = call fastcc i32 @_ZL17ClipSegmentToLineP10ClipVertexS0_RK9btVector3f(%struct.ClipVertex* %253, %struct.ClipVertex* %254, float %182, float %252, float %251, float %229) nounwind ; [#uses=1]
- %256 = icmp slt i32 %255, 2 ; [#uses=1]
- br i1 %256, label %return, label %bb18
-
-bb18: ; preds = %bb17
- %257 = getelementptr inbounds [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 0 ; [#uses=1]
- %258 = call fastcc i32 @_ZL17ClipSegmentToLineP10ClipVertexS0_RK9btVector3f(%struct.ClipVertex* %257, %struct.ClipVertex* %253, float %179, float %180, float %181, float %234) nounwind ; [#uses=1]
- %259 = icmp slt i32 %258, 2 ; [#uses=1]
- br i1 %259, label %return, label %bb19
-
-bb19: ; preds = %bb18
- %260 = icmp eq i8 %flip.0, 0 ; [#uses=3]
- %manifoldNormal.0.0.0.ph = select i1 %260, float %180, float %252 ; [#uses=1]
- %manifoldNormal.0.1.0.ph = select i1 %260, float %182, float %179 ; [#uses=1]
- %manifoldNormal.0.2.0.ph = select i1 %260, float 0.000000e+00, float -0.000000e+00 ; [#uses=1]
- %261 = load i32* @b2_maxManifoldPoints, align 4 ; [#uses=1]
- %262 = icmp sgt i32 %261, 0 ; [#uses=1]
- br i1 %262, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb19
- %263 = getelementptr inbounds %struct.btManifoldResult* %manifold, i32 0, i32 0, i32 0 ; [#uses=1]
- %264 = fsub float -0.000000e+00, %manifoldNormal.0.2.0.ph ; [#uses=1]
- %265 = fsub float -0.000000e+00, %manifoldNormal.0.1.0.ph ; [#uses=1]
- %266 = fsub float -0.000000e+00, %manifoldNormal.0.0.0.ph ; [#uses=1]
- %267 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %268 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %269 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb24
-
-bb24: ; preds = %bb27, %bb.nph
- %i.0117 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb27 ] ; [#uses=5]
- %scevgep125 = getelementptr [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 %i.0117, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep126 = getelementptr [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 %i.0117, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep127 = getelementptr [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 %i.0117, i32 0, i32 0, i32 2 ; [#uses=1]
- %tmp = add i32 %i.0117, 1 ; [#uses=2]
- %271 = load float* %scevgep125, align 4 ; [#uses=1]
- %272 = fmul float %180, %271 ; [#uses=1]
- %273 = load float* %scevgep126, align 4 ; [#uses=1]
- %274 = fmul float %273, %182 ; [#uses=1]
- %275 = fadd float %272, %274 ; [#uses=1]
- %276 = load float* %scevgep127, align 4 ; [#uses=1]
- %277 = fmul float %276, 0.000000e+00 ; [#uses=1]
- %278 = fadd float %275, %277 ; [#uses=1]
- %279 = fsub float %278, %223 ; [#uses=2]
- %280 = fcmp ugt float %279, 0.000000e+00 ; [#uses=1]
- br i1 %280, label %bb27, label %bb26
-
-bb26: ; preds = %bb24
- %scevgep124 = getelementptr [2 x %struct.ClipVertex]* %clipPoints2, i32 0, i32 %i.0117, i32 0 ; [#uses=1]
- %281 = load i32 (...)*** %263, align 4 ; [#uses=1]
- %282 = getelementptr inbounds i32 (...)** %281, i32 4 ; [#uses=1]
- %283 = load i32 (...)** %282, align 4 ; [#uses=1]
- store float %266, float* %267, align 8
- store float %265, float* %268, align 4
- store float %264, float* %269, align 8
- store float 0.000000e+00, float* %270, align 4
- %284 = bitcast i32 (...)* %283 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %284(%struct.btManifoldResult* %manifold, %struct.btQuadWord* %0, %struct.btQuadWord* %scevgep124, float %279)
- br label %bb27
-
-bb27: ; preds = %bb26, %bb24
- %285 = load i32* @b2_maxManifoldPoints, align 4 ; [#uses=1]
- %286 = icmp slt i32 %tmp, %285 ; [#uses=1]
- br i1 %286, label %bb24, label %return
-
-return: ; preds = %bb27, %bb19, %bb18, %bb17, %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btBox2dBox2dCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=1]
- %4 = load %struct.btCollisionShape** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btCollisionShape* %4 to %struct.btBox2dShape* ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=1]
- %7 = load %struct.btCollisionShape** %6, align 4 ; [#uses=1]
- %8 = bitcast %struct.btCollisionShape* %7 to %struct.btBox2dShape* ; [#uses=1]
- %9 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- store %struct.btPersistentManifold* %1, %struct.btPersistentManifold** %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1 ; [#uses=1]
- tail call void @_Z17b2CollidePolygonsP16btManifoldResultPK12btBox2dShapeRK11btTransformS3_S6_(%struct.btManifoldResult* %resultOut, %struct.btBox2dShape* %5, %struct.btTransform* %11, %struct.btBox2dShape* %8, %struct.btTransform* %10)
- %12 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb1
-
-bb1: ; preds = %bb
- %14 = load %struct.btPersistentManifold** %9, align 4 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btPersistentManifold* %14, i32 0, i32 4 ; [#uses=1]
- %16 = load i32* %15, align 4 ; [#uses=1]
- %17 = icmp eq i32 %16, 0 ; [#uses=1]
- br i1 %17, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb.i
-
-bb.i: ; preds = %bb1
- %18 = getelementptr inbounds %struct.btPersistentManifold* %14, i32 0, i32 2 ; [#uses=1]
- %19 = load i8** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %21 = load %struct.btCollisionObject** %20, align 4 ; [#uses=1]
- %22 = bitcast %struct.btCollisionObject* %21 to i8* ; [#uses=1]
- %23 = icmp eq i8* %19, %22 ; [#uses=1]
- br i1 %23, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %24 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- tail call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %14, %struct.btTransform* %25, %struct.btTransform* %24)
- ret void
-
-bb3.i: ; preds = %bb.i
- %26 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- tail call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %14, %struct.btTransform* %27, %struct.btTransform* %26)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit: ; preds = %bb1, %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btBox2dBox2dCollisionAlgorithmD0Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btBox2dBox2dCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- %14 = bitcast %struct.btBox2dBox2dCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %14) nounwind
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %15)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN30btBox2dBox2dCollisionAlgorithmD1Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btBox2dBox2dCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN30btBox2dBox2dCollisionAlgorithmD2Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btBox2dBox2dCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN30btBox2dBox2dCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV30btBox2dBox2dCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %4, label %bb, label %bb5
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btActionInterface* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 6 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %12 = invoke zeroext i8 %11(%struct.btActionInterface* %6, %struct.btCollisionObject* %obj0, %struct.btCollisionObject* %obj1)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- %toBoolnot = icmp eq i8 %12, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb8
-
-bb5: ; preds = %invcont, %entry
- ret void
-
-bb8: ; preds = %invcont
- %13 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 3 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %19 = bitcast %struct.btCollisionObject* %obj0 to i8* ; [#uses=1]
- %20 = bitcast %struct.btCollisionObject* %obj1 to i8* ; [#uses=1]
- %21 = invoke %struct.btPersistentManifold* %18(%struct.btActionInterface* %13, i8* %19, i8* %20)
- to label %invcont9 unwind label %lpad ; [#uses=1]
-
-invcont9: ; preds = %bb8
- store %struct.btPersistentManifold* %21, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont11: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb8, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont11 unwind label %lpad16
-
-lpad16: ; preds = %lpad
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN16btBoxBoxDetectorC2EP10btBoxShapeS1_(%struct.btBoxBoxDetector* nocapture %this, %struct.btBoxShape* %box1, %struct.btBoxShape* %box2) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV16btBoxBoxDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btBoxShape* %box1, %struct.btBoxShape** %1, align 4
- %2 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btBoxShape* %box2, %struct.btBoxShape** %2, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN36btDiscreteCollisionDetectorInterfaceD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV36btDiscreteCollisionDetectorInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN36btDiscreteCollisionDetectorInterfaceD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV36btDiscreteCollisionDetectorInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btBoxBoxDetectorD1Ev(%struct.btBoxBoxDetector* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV16btBoxBoxDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btBoxBoxDetectorD0Ev(%struct.btBoxBoxDetector* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV16btBoxBoxDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btBoxBoxDetector* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=2]
-define void @_ZN16btBoxBoxDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btBoxBoxDetector* nocapture %this, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* nocapture %input, %struct.btActionInterface* %output, %struct.btActionInterface* nocapture %unnamed_arg, i8 zeroext %unnamed_arg2) align 2 {
-bb4:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %R1 = alloca [12 x float], align 4 ; [#uses=10]
- %R2 = alloca [12 x float], align 4 ; [#uses=10]
- %normal = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %depth = alloca float, align 4 ; [#uses=1]
- %return_code = alloca i32, align 4 ; [#uses=1]
- %scevgep = getelementptr [12 x float]* %R1, i32 0, i32 0 ; [#uses=1]
- %scevgep14 = getelementptr [12 x float]* %R2, i32 0, i32 0 ; [#uses=1]
- %scevgep16 = getelementptr [12 x float]* %R1, i32 0, i32 1 ; [#uses=1]
- %scevgep17 = getelementptr [12 x float]* %R2, i32 0, i32 1 ; [#uses=1]
- %scevgep19 = getelementptr [12 x float]* %R1, i32 0, i32 2 ; [#uses=1]
- %scevgep20 = getelementptr [12 x float]* %R2, i32 0, i32 2 ; [#uses=1]
- %scevgep2122 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep2324 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep25 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep26 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep27 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep28 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %2 = load float* %scevgep2122, align 4 ; [#uses=1]
- store float %2, float* %scevgep, align 4
- %3 = load float* %scevgep2324, align 4 ; [#uses=1]
- store float %3, float* %scevgep14, align 4
- %4 = load float* %scevgep25, align 4 ; [#uses=1]
- store float %4, float* %scevgep16, align 4
- %5 = load float* %scevgep26, align 4 ; [#uses=1]
- store float %5, float* %scevgep17, align 4
- %6 = load float* %scevgep27, align 4 ; [#uses=1]
- store float %6, float* %scevgep19, align 4
- %7 = load float* %scevgep28, align 4 ; [#uses=1]
- store float %7, float* %scevgep20, align 4
- %scevgep.1 = getelementptr [12 x float]* %R1, i32 0, i32 4 ; [#uses=1]
- %scevgep14.1 = getelementptr [12 x float]* %R2, i32 0, i32 4 ; [#uses=1]
- %scevgep16.1 = getelementptr [12 x float]* %R1, i32 0, i32 5 ; [#uses=1]
- %scevgep17.1 = getelementptr [12 x float]* %R2, i32 0, i32 5 ; [#uses=1]
- %scevgep19.1 = getelementptr [12 x float]* %R1, i32 0, i32 6 ; [#uses=1]
- %scevgep20.1 = getelementptr [12 x float]* %R2, i32 0, i32 6 ; [#uses=1]
- %scevgep2122.1 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep2324.1 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep25.1 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep26.1 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep27.1 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep28.1 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %scevgep2122.1, align 4 ; [#uses=1]
- store float %8, float* %scevgep.1, align 4
- %9 = load float* %scevgep2324.1, align 4 ; [#uses=1]
- store float %9, float* %scevgep14.1, align 4
- %10 = load float* %scevgep25.1, align 4 ; [#uses=1]
- store float %10, float* %scevgep16.1, align 4
- %11 = load float* %scevgep26.1, align 4 ; [#uses=1]
- store float %11, float* %scevgep17.1, align 4
- %12 = load float* %scevgep27.1, align 4 ; [#uses=1]
- store float %12, float* %scevgep19.1, align 4
- %13 = load float* %scevgep28.1, align 4 ; [#uses=1]
- store float %13, float* %scevgep20.1, align 4
- %scevgep.2 = getelementptr [12 x float]* %R1, i32 0, i32 8 ; [#uses=1]
- %scevgep14.2 = getelementptr [12 x float]* %R2, i32 0, i32 8 ; [#uses=1]
- %scevgep16.2 = getelementptr [12 x float]* %R1, i32 0, i32 9 ; [#uses=1]
- %scevgep17.2 = getelementptr [12 x float]* %R2, i32 0, i32 9 ; [#uses=1]
- %scevgep19.2 = getelementptr [12 x float]* %R1, i32 0, i32 10 ; [#uses=1]
- %scevgep20.2 = getelementptr [12 x float]* %R2, i32 0, i32 10 ; [#uses=1]
- %scevgep2122.2 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep2324.2 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep25.2 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep26.2 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep27.2 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep28.2 = getelementptr %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %scevgep2122.2, align 4 ; [#uses=1]
- store float %14, float* %scevgep.2, align 4
- %15 = load float* %scevgep2324.2, align 4 ; [#uses=1]
- store float %15, float* %scevgep14.2, align 4
- %16 = load float* %scevgep25.2, align 4 ; [#uses=1]
- store float %16, float* %scevgep16.2, align 4
- %17 = load float* %scevgep26.2, align 4 ; [#uses=1]
- store float %17, float* %scevgep17.2, align 4
- %18 = load float* %scevgep27.2, align 4 ; [#uses=1]
- store float %18, float* %scevgep19.2, align 4
- %19 = load float* %scevgep28.2, align 4 ; [#uses=1]
- store float %19, float* %scevgep20.2, align 4
- %20 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 2 ; [#uses=1]
- %21 = load %struct.btBoxShape** %20, align 4 ; [#uses=5]
- %22 = getelementptr inbounds %struct.btBoxShape* %21, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btBoxShape* %21, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btBoxShape* %21, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btBoxShape* %21, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 11 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btBoxShape* %21, i32 0, i32 0, i32 0 ; [#uses=3]
- %33 = bitcast i32 (...)* %31 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %34 = call float %33(%struct.btConvexInternalShape* %32) ; [#uses=1]
- %35 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32 (...)** %35, i32 11 ; [#uses=1]
- %37 = load i32 (...)** %36, align 4 ; [#uses=1]
- %38 = bitcast i32 (...)* %37 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %39 = call float %38(%struct.btConvexInternalShape* %32) ; [#uses=1]
- %40 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %41 = getelementptr inbounds i32 (...)** %40, i32 11 ; [#uses=1]
- %42 = load i32 (...)** %41, align 4 ; [#uses=1]
- %43 = bitcast i32 (...)* %42 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %44 = call float %43(%struct.btConvexInternalShape* %32) ; [#uses=1]
- %45 = fadd float %23, %44 ; [#uses=1]
- %46 = fadd float %25, %39 ; [#uses=1]
- %47 = fadd float %27, %34 ; [#uses=1]
- %48 = fmul float %47, 2.000000e+00 ; [#uses=1]
- %49 = fmul float %46, 2.000000e+00 ; [#uses=1]
- %50 = fmul float %45, 2.000000e+00 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %50, float* %51, align 8
- %52 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %49, float* %52, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %48, float* %53, align 8
- %54 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 1 ; [#uses=1]
- %57 = load %struct.btBoxShape** %56, align 4 ; [#uses=5]
- %58 = getelementptr inbounds %struct.btBoxShape* %57, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btBoxShape* %57, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btBoxShape* %57, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btBoxShape* %57, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %65 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds i32 (...)** %65, i32 11 ; [#uses=1]
- %67 = load i32 (...)** %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btBoxShape* %57, i32 0, i32 0, i32 0 ; [#uses=3]
- %69 = bitcast i32 (...)* %67 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %70 = call float %69(%struct.btConvexInternalShape* %68) ; [#uses=1]
- %71 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %72 = getelementptr inbounds i32 (...)** %71, i32 11 ; [#uses=1]
- %73 = load i32 (...)** %72, align 4 ; [#uses=1]
- %74 = bitcast i32 (...)* %73 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %75 = call float %74(%struct.btConvexInternalShape* %68) ; [#uses=1]
- %76 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %77 = getelementptr inbounds i32 (...)** %76, i32 11 ; [#uses=1]
- %78 = load i32 (...)** %77, align 4 ; [#uses=1]
- %79 = bitcast i32 (...)* %78 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %80 = call float %79(%struct.btConvexInternalShape* %68) ; [#uses=1]
- %81 = fadd float %59, %80 ; [#uses=1]
- %82 = fadd float %61, %75 ; [#uses=1]
- %83 = fadd float %63, %70 ; [#uses=1]
- %84 = fmul float %83, 2.000000e+00 ; [#uses=1]
- %85 = fmul float %82, 2.000000e+00 ; [#uses=1]
- %86 = fmul float %81, 2.000000e+00 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %86, float* %87, align 8
- %88 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %85, float* %88, align 4
- %89 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %84, float* %89, align 8
- %90 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %90, align 4
- %91 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds [12 x float]* %R1, i32 0, i32 0 ; [#uses=1]
- %93 = getelementptr inbounds [12 x float]* %R2, i32 0, i32 0 ; [#uses=1]
- %94 = call i32 @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE(%struct.btQuadWord* %91, float* %92, %struct.btQuadWord* %0, %struct.btQuadWord* %55, float* %93, %struct.btQuadWord* %1, %struct.btQuadWord* %normal, float* %depth, i32* %return_code, i32 4, %struct.dContactGeom* null, i32 0, %struct.btActionInterface* %output) ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btBoxBoxDetectorC1EP10btBoxShapeS1_(%struct.btBoxBoxDetector* nocapture %this, %struct.btBoxShape* %box1, %struct.btBoxShape* %box2) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV16btBoxBoxDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btBoxShape* %box1, %struct.btBoxShape** %1, align 4
- %2 = getelementptr inbounds %struct.btBoxBoxDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btBoxShape* %box2, %struct.btBoxShape** %2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z20dLineClosestApproachRK9btVector3S1_S1_S1_PfS2_(%struct.btQuadWord* nocapture %pa, %struct.btQuadWord* nocapture %ua, %struct.btQuadWord* nocapture %pb, %struct.btQuadWord* nocapture %ub, float* nocapture %alpha, float* nocapture %beta) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %ub, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %ua, i32 0, i32 0, i32 0 ; [#uses=1]
- %.val13 = load float* %16, align 4 ; [#uses=2]
- %.idx14 = getelementptr %struct.btQuadWord* %ua, i32 0, i32 0, i32 1 ; [#uses=1]
- %.idx14.val = load float* %.idx14, align 4 ; [#uses=2]
- %.idx15 = getelementptr %struct.btQuadWord* %ua, i32 0, i32 0, i32 2 ; [#uses=1]
- %.idx15.val = load float* %.idx15, align 4 ; [#uses=2]
- %.val16 = load float* %15, align 4 ; [#uses=2]
- %.idx17 = getelementptr %struct.btQuadWord* %ub, i32 0, i32 0, i32 1 ; [#uses=1]
- %.idx17.val = load float* %.idx17, align 4 ; [#uses=2]
- %.idx18 = getelementptr %struct.btQuadWord* %ub, i32 0, i32 0, i32 2 ; [#uses=1]
- %.idx18.val = load float* %.idx18, align 4 ; [#uses=2]
- %17 = fmul float %.val13, %.val16 ; [#uses=1]
- %18 = fmul float %.idx14.val, %.idx17.val ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fmul float %.idx15.val, %.idx18.val ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=4]
- %22 = fmul float %.val13, %4 ; [#uses=1]
- %23 = fmul float %.idx14.val, %9 ; [#uses=1]
- %24 = fadd float %22, %23 ; [#uses=1]
- %25 = fmul float %.idx15.val, %14 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=2]
- %27 = fmul float %.val16, %4 ; [#uses=1]
- %28 = fmul float %.idx17.val, %9 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = fmul float %.idx18.val, %14 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=2]
- %32 = fmul float %21, %21 ; [#uses=1]
- %33 = fsub float 1.000000e+00, %32 ; [#uses=2]
- %34 = fcmp ugt float %33, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %34, label %bb1, label %bb
-
-bb: ; preds = %entry
- store float 0.000000e+00, float* %alpha, align 4
- store float 0.000000e+00, float* %beta, align 4
- ret void
-
-bb1: ; preds = %entry
- %35 = fsub float -0.000000e+00, %31 ; [#uses=1]
- %36 = fdiv float 1.000000e+00, %33 ; [#uses=2]
- %37 = fmul float %21, %35 ; [#uses=1]
- %38 = fadd float %37, %26 ; [#uses=1]
- %39 = fmul float %38, %36 ; [#uses=1]
- store float %39, float* %alpha, align 4
- %40 = fmul float %21, %26 ; [#uses=1]
- %41 = fsub float %40, %31 ; [#uses=1]
- %42 = fmul float %41, %36 ; [#uses=1]
- store float %42, float* %beta, align 4
- ret void
-}
-
-; [#uses=11]
-declare float @atan2f(float, float) nounwind readonly
-
-; [#uses=1]
-define void @_Z11cullPoints2iPfiiPi(i32 %n, float* %p, i32 %m, i32 %i0, i32* nocapture %iret) nounwind {
-entry:
- %A = alloca [8 x float], align 4 ; [#uses=3]
- %avail = alloca [8 x i32], align 4 ; [#uses=4]
- switch i32 %n, label %bb5.preheader [
- i32 1, label %bb
- i32 2, label %bb2
- ]
-
-bb5.preheader: ; preds = %entry
- %0 = add nsw i32 %n, -1 ; [#uses=2]
- %1 = icmp sgt i32 %0, 0 ; [#uses=1]
- br i1 %1, label %bb4, label %bb6
-
-bb: ; preds = %entry
- %2 = load float* %p, align 4 ; [#uses=1]
- %3 = getelementptr inbounds float* %p, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- br label %bb.nph39
-
-bb2: ; preds = %entry
- %5 = load float* %p, align 4 ; [#uses=1]
- %6 = getelementptr inbounds float* %p, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fadd float %5, %7 ; [#uses=1]
- %9 = fmul float %8, 5.000000e-01 ; [#uses=1]
- %10 = getelementptr inbounds float* %p, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds float* %p, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fadd float %11, %13 ; [#uses=1]
- %15 = fmul float %14, 5.000000e-01 ; [#uses=1]
- br label %bb.nph39
-
-bb4: ; preds = %bb4, %bb5.preheader
- %cy.143 = phi float [ %29, %bb4 ], [ 0.000000e+00, %bb5.preheader ] ; [#uses=1]
- %cx.142 = phi float [ %26, %bb4 ], [ 0.000000e+00, %bb5.preheader ] ; [#uses=1]
- %i.041 = phi i32 [ %30, %bb4 ], [ 0, %bb5.preheader ] ; [#uses=2]
- %a.040 = phi float [ %23, %bb4 ], [ 0.000000e+00, %bb5.preheader ] ; [#uses=1]
- %tmp62 = shl i32 %i.041, 1 ; [#uses=4]
- %tmp63 = add i32 %tmp62, 3 ; [#uses=1]
- %scevgep64 = getelementptr float* %p, i32 %tmp63 ; [#uses=1]
- %tmp65 = add i32 %tmp62, 2 ; [#uses=1]
- %scevgep66 = getelementptr float* %p, i32 %tmp65 ; [#uses=1]
- %scevgep67 = getelementptr float* %p, i32 %tmp62 ; [#uses=1]
- %tmp6871 = or i32 %tmp62, 1 ; [#uses=1]
- %scevgep69 = getelementptr float* %p, i32 %tmp6871 ; [#uses=1]
- %16 = load float* %scevgep67, align 4 ; [#uses=2]
- %17 = load float* %scevgep64, align 4 ; [#uses=2]
- %18 = fmul float %16, %17 ; [#uses=1]
- %19 = load float* %scevgep66, align 4 ; [#uses=2]
- %20 = load float* %scevgep69, align 4 ; [#uses=2]
- %21 = fmul float %19, %20 ; [#uses=1]
- %22 = fsub float %18, %21 ; [#uses=3]
- %23 = fadd float %a.040, %22 ; [#uses=2]
- %24 = fadd float %16, %19 ; [#uses=1]
- %25 = fmul float %24, %22 ; [#uses=1]
- %26 = fadd float %25, %cx.142 ; [#uses=2]
- %27 = fadd float %20, %17 ; [#uses=1]
- %28 = fmul float %27, %22 ; [#uses=1]
- %29 = fadd float %28, %cy.143 ; [#uses=2]
- %30 = add nsw i32 %i.041, 1 ; [#uses=2]
- %exitcond61 = icmp eq i32 %30, %0 ; [#uses=1]
- br i1 %exitcond61, label %bb6, label %bb4
-
-bb6: ; preds = %bb4, %bb5.preheader
- %cy.1.lcssa = phi float [ 0.000000e+00, %bb5.preheader ], [ %29, %bb4 ] ; [#uses=1]
- %cx.1.lcssa = phi float [ 0.000000e+00, %bb5.preheader ], [ %26, %bb4 ] ; [#uses=1]
- %a.0.lcssa = phi float [ 0.000000e+00, %bb5.preheader ], [ %23, %bb4 ] ; [#uses=1]
- %31 = shl i32 %n, 1 ; [#uses=2]
- %32 = add nsw i32 %31, -2 ; [#uses=1]
- %33 = getelementptr inbounds float* %p, i32 %32 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = getelementptr inbounds float* %p, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %34, %36 ; [#uses=1]
- %38 = load float* %p, align 4 ; [#uses=2]
- %39 = add nsw i32 %31, -1 ; [#uses=1]
- %40 = getelementptr inbounds float* %p, i32 %39 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=2]
- %42 = fmul float %38, %41 ; [#uses=1]
- %43 = fsub float %37, %42 ; [#uses=3]
- %44 = fadd float %a.0.lcssa, %43 ; [#uses=2]
- %45 = call float @fabsf(float %44) nounwind readnone ; [#uses=1]
- %46 = fcmp ogt float %45, 0x3E80000000000000 ; [#uses=1]
- br i1 %46, label %bb7, label %bb10
-
-bb7: ; preds = %bb6
- %47 = fmul float %44, 3.000000e+00 ; [#uses=1]
- %48 = fdiv float 1.000000e+00, %47 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb7, %bb6
- %a.1 = phi float [ %48, %bb7 ], [ 0x43ABC16D60000000, %bb6 ] ; [#uses=2]
- %49 = fadd float %34, %38 ; [#uses=1]
- %50 = fmul float %49, %43 ; [#uses=1]
- %51 = fadd float %50, %cx.1.lcssa ; [#uses=1]
- %52 = fmul float %51, %a.1 ; [#uses=1]
- %53 = fadd float %41, %36 ; [#uses=1]
- %54 = fmul float %53, %43 ; [#uses=1]
- %55 = fadd float %54, %cy.1.lcssa ; [#uses=1]
- %56 = fmul float %55, %a.1 ; [#uses=1]
- %57 = icmp sgt i32 %n, 0 ; [#uses=1]
- br i1 %57, label %bb.nph39, label %bb16
-
-bb.nph39: ; preds = %bb10, %bb2, %bb
- %cy.073 = phi float [ %56, %bb10 ], [ %15, %bb2 ], [ %4, %bb ] ; [#uses=1]
- %cx.072 = phi float [ %52, %bb10 ], [ %9, %bb2 ], [ %2, %bb ] ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb11, %bb.nph39
- %i.138 = phi i32 [ 0, %bb.nph39 ], [ %63, %bb11 ] ; [#uses=3]
- %scevgep54 = getelementptr [8 x float]* %A, i32 0, i32 %i.138 ; [#uses=1]
- %tmp55 = shl i32 %i.138, 1 ; [#uses=2]
- %scevgep56 = getelementptr float* %p, i32 %tmp55 ; [#uses=1]
- %tmp5770 = or i32 %tmp55, 1 ; [#uses=1]
- %scevgep58 = getelementptr float* %p, i32 %tmp5770 ; [#uses=1]
- %58 = load float* %scevgep56, align 4 ; [#uses=1]
- %59 = fsub float %58, %cx.072 ; [#uses=1]
- %60 = load float* %scevgep58, align 4 ; [#uses=1]
- %61 = fsub float %60, %cy.073 ; [#uses=1]
- %62 = call float @atan2f(float %61, float %59) nounwind readonly ; [#uses=1]
- store float %62, float* %scevgep54, align 4
- %63 = add nsw i32 %i.138, 1 ; [#uses=2]
- %exitcond53 = icmp eq i32 %63, %n ; [#uses=1]
- br i1 %exitcond53, label %bb14, label %bb11
-
-bb14: ; preds = %bb14, %bb11
- %i.236 = phi i32 [ %64, %bb14 ], [ 0, %bb11 ] ; [#uses=2]
- %scevgep52 = getelementptr [8 x i32]* %avail, i32 0, i32 %i.236 ; [#uses=1]
- store i32 1, i32* %scevgep52, align 4
- %64 = add nsw i32 %i.236, 1 ; [#uses=2]
- %exitcond51 = icmp eq i32 %64, %n ; [#uses=1]
- br i1 %exitcond51, label %bb16, label %bb14
-
-bb16: ; preds = %bb14, %bb10
- %65 = phi i1 [ true, %bb14 ], [ false, %bb10 ] ; [#uses=1]
- %66 = getelementptr inbounds [8 x i32]* %avail, i32 0, i32 %i0 ; [#uses=1]
- store i32 0, i32* %66, align 4
- store i32 %i0, i32* %iret, align 4
- %67 = icmp sgt i32 %m, 1 ; [#uses=1]
- br i1 %67, label %bb.nph35, label %return
-
-bb.nph35: ; preds = %bb16
- %68 = sitofp i32 %m to float ; [#uses=1]
- %69 = fdiv float 0x401921FB60000000, %68 ; [#uses=1]
- %70 = getelementptr inbounds [8 x float]* %A, i32 0, i32 %i0 ; [#uses=1]
- %tmp = add i32 %m, -1 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb27, %bb.nph35
- %indvar = phi i32 [ 0, %bb.nph35 ], [ %j.033, %bb27 ] ; [#uses=1]
- %j.033 = add i32 %indvar, 1 ; [#uses=4]
- %iret_addr.034 = getelementptr i32* %iret, i32 %j.033 ; [#uses=2]
- %71 = sitofp i32 %j.033 to float ; [#uses=1]
- %72 = fmul float %71, %69 ; [#uses=1]
- %73 = load float* %70, align 4 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=3]
- %75 = fcmp ogt float %74, 0x400921FB60000000 ; [#uses=1]
- br i1 %75, label %bb18, label %bb19
-
-bb18: ; preds = %bb17
- %76 = fadd float %74, 0xC01921FB60000000 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb18, %bb17
- %a.2 = phi float [ %76, %bb18 ], [ %74, %bb17 ] ; [#uses=1]
- store i32 %i0, i32* %iret_addr.034, align 4
- br i1 %65, label %bb20, label %bb27
-
-bb20: ; preds = %bb25, %bb19
- %77 = phi i32 [ %87, %bb25 ], [ %i0, %bb19 ] ; [#uses=2]
- %maxdiff.131 = phi float [ %maxdiff.0, %bb25 ], [ 1.000000e+09, %bb19 ] ; [#uses=3]
- %78 = phi i32 [ %88, %bb25 ], [ 0, %bb19 ] ; [#uses=5]
- %scevgep = getelementptr [8 x i32]* %avail, i32 0, i32 %78 ; [#uses=1]
- %79 = load i32* %scevgep, align 4 ; [#uses=1]
- %80 = icmp eq i32 %79, 0 ; [#uses=1]
- br i1 %80, label %bb25, label %bb21
-
-bb21: ; preds = %bb20
- %scevgep47 = getelementptr [8 x float]* %A, i32 0, i32 %78 ; [#uses=1]
- %81 = load float* %scevgep47, align 4 ; [#uses=1]
- %82 = fsub float %81, %a.2 ; [#uses=1]
- %83 = call float @fabsf(float %82) nounwind readnone ; [#uses=3]
- %84 = fcmp ogt float %83, 0x400921FB60000000 ; [#uses=1]
- br i1 %84, label %bb22, label %bb23
-
-bb22: ; preds = %bb21
- %85 = fsub float 0x401921FB60000000, %83 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb22, %bb21
- %diff.0 = phi float [ %85, %bb22 ], [ %83, %bb21 ] ; [#uses=2]
- %86 = fcmp olt float %diff.0, %maxdiff.131 ; [#uses=1]
- br i1 %86, label %bb24, label %bb25
-
-bb24: ; preds = %bb23
- store i32 %78, i32* %iret_addr.034, align 4
- br label %bb25
-
-bb25: ; preds = %bb24, %bb23, %bb20
- %87 = phi i32 [ %78, %bb24 ], [ %77, %bb23 ], [ %77, %bb20 ] ; [#uses=2]
- %maxdiff.0 = phi float [ %diff.0, %bb24 ], [ %maxdiff.131, %bb23 ], [ %maxdiff.131, %bb20 ] ; [#uses=1]
- %88 = add nsw i32 %78, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %88, %n ; [#uses=1]
- br i1 %exitcond, label %bb27, label %bb20
-
-bb27: ; preds = %bb25, %bb19
- %89 = phi i32 [ %i0, %bb19 ], [ %87, %bb25 ] ; [#uses=1]
- %90 = getelementptr inbounds [8 x i32]* %avail, i32 0, i32 %89 ; [#uses=1]
- store i32 0, i32* %90, align 4
- %exitcond48 = icmp eq i32 %j.033, %tmp ; [#uses=1]
- br i1 %exitcond48, label %return, label %bb17
-
-return: ; preds = %bb27, %bb16
- ret void
-}
-
-; [#uses=1]
-define i32 @_Z8dBoxBox2RK9btVector3PKfS1_S1_S3_S1_RS_PfPiiP12dContactGeomiRN36btDiscreteCollisionDetectorInterface6ResultE(%struct.btQuadWord* nocapture %p1, float* %R1, %struct.btQuadWord* nocapture %side1, %struct.btQuadWord* nocapture %p2, float* %R2, %struct.btQuadWord* nocapture %side2, %struct.btQuadWord* %normal, float* nocapture %depth, i32* nocapture %return_code, i32 %maxc, %struct.dContactGeom* nocapture %unnamed_arg, i32 %unnamed_arg2, %struct.btActionInterface* %output) {
-entry:
- %buffer.i = alloca [16 x float], align 4 ; [#uses=1]
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %5 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %A = alloca [3 x float], align 4 ; [#uses=3]
- %B = alloca [3 x float], align 4 ; [#uses=3]
- %nr = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %center = alloca %struct.btQuadWord, align 8 ; [#uses=8]
- %quad = alloca [8 x float], align 4 ; [#uses=8]
- %rect = alloca [2 x float], align 4 ; [#uses=3]
- %ret = alloca [16 x float], align 4 ; [#uses=6]
- %point = alloca [24 x float], align 4 ; [#uses=15]
- %dep = alloca [8 x float], align 4 ; [#uses=6]
- %pa80 = alloca %struct.btQuadWord, align 8 ; [#uses=3]
- %pb83 = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %ua = alloca %struct.btQuadWord, align 8 ; [#uses=3]
- %ub = alloca %struct.btQuadWord, align 8 ; [#uses=3]
- %pointInWorld185 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %pointInWorld193 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %iret = alloca [8 x i32], align 4 ; [#uses=2]
- %posInWorld = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %6 = getelementptr inbounds %struct.btQuadWord* %p2, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 2 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fsub float %7, %9 ; [#uses=6]
- %11 = getelementptr inbounds %struct.btQuadWord* %p2, i32 0, i32 0, i32 1 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 1 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fsub float %12, %14 ; [#uses=6]
- %16 = getelementptr inbounds %struct.btQuadWord* %p2, i32 0, i32 0, i32 0 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 0 ; [#uses=2]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %17, %19 ; [#uses=6]
- %R1.val = load float* %R1, align 4 ; [#uses=5]
- %R1.idx = getelementptr float* %R1, i32 4 ; [#uses=3]
- %R1.idx.val = load float* %R1.idx, align 4 ; [#uses=4]
- %R1.idx280 = getelementptr float* %R1, i32 8 ; [#uses=3]
- %R1.idx280.val = load float* %R1.idx280, align 4 ; [#uses=4]
- %21 = fmul float %R1.val, %20 ; [#uses=1]
- %22 = fmul float %R1.idx.val, %15 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = fmul float %R1.idx280.val, %10 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=8]
- %26 = getelementptr inbounds float* %R1, i32 1 ; [#uses=3]
- %.val274 = load float* %26, align 4 ; [#uses=5]
- %.idx275 = getelementptr float* %R1, i32 5 ; [#uses=3]
- %.idx275.val = load float* %.idx275, align 4 ; [#uses=4]
- %.idx276 = getelementptr float* %R1, i32 9 ; [#uses=3]
- %.idx276.val = load float* %.idx276, align 4 ; [#uses=4]
- %27 = fmul float %.val274, %20 ; [#uses=1]
- %28 = fmul float %.idx275.val, %15 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = fmul float %.idx276.val, %10 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=8]
- %32 = getelementptr inbounds float* %R1, i32 2 ; [#uses=3]
- %.val268 = load float* %32, align 4 ; [#uses=5]
- %.idx269 = getelementptr float* %R1, i32 6 ; [#uses=3]
- %.idx269.val = load float* %.idx269, align 4 ; [#uses=4]
- %.idx270 = getelementptr float* %R1, i32 10 ; [#uses=3]
- %.idx270.val = load float* %.idx270, align 4 ; [#uses=4]
- %33 = fmul float %.val268, %20 ; [#uses=1]
- %34 = fmul float %.idx269.val, %15 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fmul float %.idx270.val, %10 ; [#uses=1]
- %37 = fadd float %35, %36 ; [#uses=8]
- %38 = getelementptr inbounds %struct.btQuadWord* %side1, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, 5.000000e-01 ; [#uses=12]
- %41 = getelementptr inbounds [3 x float]* %A, i32 0, i32 0 ; [#uses=3]
- store float %40, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %side1, i32 0, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fmul float %43, 5.000000e-01 ; [#uses=12]
- %45 = getelementptr inbounds [3 x float]* %A, i32 0, i32 1 ; [#uses=1]
- store float %44, float* %45, align 4
- %46 = getelementptr inbounds %struct.btQuadWord* %side1, i32 0, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fmul float %47, 5.000000e-01 ; [#uses=12]
- %49 = getelementptr inbounds [3 x float]* %A, i32 0, i32 2 ; [#uses=1]
- store float %48, float* %49, align 4
- %50 = getelementptr inbounds %struct.btQuadWord* %side2, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %51, 5.000000e-01 ; [#uses=12]
- %53 = getelementptr inbounds [3 x float]* %B, i32 0, i32 0 ; [#uses=3]
- store float %52, float* %53, align 4
- %54 = getelementptr inbounds %struct.btQuadWord* %side2, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %55, 5.000000e-01 ; [#uses=12]
- %57 = getelementptr inbounds [3 x float]* %B, i32 0, i32 1 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = getelementptr inbounds %struct.btQuadWord* %side2, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = fmul float %59, 5.000000e-01 ; [#uses=12]
- %61 = getelementptr inbounds [3 x float]* %B, i32 0, i32 2 ; [#uses=1]
- store float %60, float* %61, align 4
- %R2.val359 = load float* %R2, align 4 ; [#uses=4]
- %R2.idx360 = getelementptr float* %R2, i32 4 ; [#uses=2]
- %R2.idx360.val = load float* %R2.idx360, align 4 ; [#uses=4]
- %R2.idx361 = getelementptr float* %R2, i32 8 ; [#uses=2]
- %R2.idx361.val = load float* %R2.idx361, align 4 ; [#uses=4]
- %62 = fmul float %R1.val, %R2.val359 ; [#uses=1]
- %63 = fmul float %R1.idx.val, %R2.idx360.val ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %R1.idx280.val, %R2.idx361.val ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=7]
- %67 = getelementptr inbounds float* %R2, i32 1 ; [#uses=3]
- %.val353 = load float* %67, align 4 ; [#uses=4]
- %.idx354 = getelementptr float* %R2, i32 5 ; [#uses=2]
- %.idx354.val = load float* %.idx354, align 4 ; [#uses=4]
- %.idx355 = getelementptr float* %R2, i32 9 ; [#uses=2]
- %.idx355.val = load float* %.idx355, align 4 ; [#uses=4]
- %68 = fmul float %R1.val, %.val353 ; [#uses=1]
- %69 = fmul float %R1.idx.val, %.idx354.val ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fmul float %R1.idx280.val, %.idx355.val ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=7]
- %73 = getelementptr inbounds float* %R2, i32 2 ; [#uses=3]
- %.val347 = load float* %73, align 4 ; [#uses=4]
- %.idx348 = getelementptr float* %R2, i32 6 ; [#uses=2]
- %.idx348.val = load float* %.idx348, align 4 ; [#uses=4]
- %.idx349 = getelementptr float* %R2, i32 10 ; [#uses=2]
- %.idx349.val = load float* %.idx349, align 4 ; [#uses=4]
- %74 = fmul float %R1.val, %.val347 ; [#uses=1]
- %75 = fmul float %R1.idx.val, %.idx348.val ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = fmul float %R1.idx280.val, %.idx349.val ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=7]
- %79 = fmul float %.val274, %R2.val359 ; [#uses=1]
- %80 = fmul float %.idx275.val, %R2.idx360.val ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = fmul float %.idx276.val, %R2.idx361.val ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=7]
- %84 = fmul float %.val274, %.val353 ; [#uses=1]
- %85 = fmul float %.idx275.val, %.idx354.val ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = fmul float %.idx276.val, %.idx355.val ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=7]
- %89 = fmul float %.val274, %.val347 ; [#uses=1]
- %90 = fmul float %.idx275.val, %.idx348.val ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %.idx276.val, %.idx349.val ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=7]
- %94 = fmul float %.val268, %R2.val359 ; [#uses=1]
- %95 = fmul float %.idx269.val, %R2.idx360.val ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = fmul float %.idx270.val, %R2.idx361.val ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=7]
- %99 = fmul float %.val268, %.val353 ; [#uses=1]
- %100 = fmul float %.idx269.val, %.idx354.val ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %.idx270.val, %.idx355.val ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=7]
- %104 = fmul float %.val268, %.val347 ; [#uses=1]
- %105 = fmul float %.idx269.val, %.idx348.val ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %.idx270.val, %.idx349.val ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=7]
- %109 = call float @fabsf(float %66) nounwind readnone ; [#uses=3]
- %110 = call float @fabsf(float %72) nounwind readnone ; [#uses=3]
- %111 = call float @fabsf(float %78) nounwind readnone ; [#uses=3]
- %112 = call float @fabsf(float %83) nounwind readnone ; [#uses=3]
- %113 = call float @fabsf(float %88) nounwind readnone ; [#uses=3]
- %114 = call float @fabsf(float %93) nounwind readnone ; [#uses=3]
- %115 = call float @fabsf(float %98) nounwind readnone ; [#uses=3]
- %116 = call float @fabsf(float %103) nounwind readnone ; [#uses=3]
- %117 = call float @fabsf(float %108) nounwind readnone ; [#uses=3]
- %118 = call float @fabsf(float %25) nounwind readnone ; [#uses=1]
- %119 = fmul float %52, %109 ; [#uses=1]
- %120 = fadd float %40, %119 ; [#uses=1]
- %121 = fmul float %56, %110 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = fmul float %60, %111 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=1]
- %125 = fsub float %118, %124 ; [#uses=3]
- %126 = fcmp ogt float %125, 0.000000e+00 ; [#uses=1]
- br i1 %126, label %bb218, label %bb3
-
-bb3: ; preds = %entry
- %127 = fcmp ogt float %125, 0xC7EFFFFFE0000000 ; [#uses=1]
- br i1 %127, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %128 = fcmp olt float %25, 0.000000e+00 ; [#uses=1]
- %129 = zext i1 %128 to i32 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %s.0 = phi float [ %125, %bb4 ], [ 0xC7EFFFFFE0000000, %bb3 ] ; [#uses=2]
- %invert_normal.0 = phi i32 [ %129, %bb4 ], [ 0, %bb3 ] ; [#uses=1]
- %code.0 = phi i32 [ 1, %bb4 ], [ 0, %bb3 ] ; [#uses=1]
- %normalR.0 = phi float* [ %R1, %bb4 ], [ null, %bb3 ] ; [#uses=1]
- %130 = call float @fabsf(float %31) nounwind readnone ; [#uses=1]
- %131 = fmul float %52, %112 ; [#uses=1]
- %132 = fadd float %44, %131 ; [#uses=1]
- %133 = fmul float %56, %113 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = fmul float %60, %114 ; [#uses=1]
- %136 = fadd float %134, %135 ; [#uses=1]
- %137 = fsub float %130, %136 ; [#uses=3]
- %138 = fcmp ogt float %137, 0.000000e+00 ; [#uses=1]
- br i1 %138, label %bb218, label %bb7
-
-bb7: ; preds = %bb5
- %139 = fcmp ogt float %137, %s.0 ; [#uses=1]
- br i1 %139, label %bb8, label %bb9
-
-bb8: ; preds = %bb7
- %140 = fcmp olt float %31, 0.000000e+00 ; [#uses=1]
- %141 = zext i1 %140 to i32 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb8, %bb7
- %s.1 = phi float [ %137, %bb8 ], [ %s.0, %bb7 ] ; [#uses=2]
- %invert_normal.1 = phi i32 [ %141, %bb8 ], [ %invert_normal.0, %bb7 ] ; [#uses=1]
- %code.1 = phi i32 [ 2, %bb8 ], [ %code.0, %bb7 ] ; [#uses=1]
- %normalR.1 = phi float* [ %26, %bb8 ], [ %normalR.0, %bb7 ] ; [#uses=1]
- %142 = call float @fabsf(float %37) nounwind readnone ; [#uses=1]
- %143 = fmul float %52, %115 ; [#uses=1]
- %144 = fadd float %48, %143 ; [#uses=1]
- %145 = fmul float %56, %116 ; [#uses=1]
- %146 = fadd float %144, %145 ; [#uses=1]
- %147 = fmul float %60, %117 ; [#uses=1]
- %148 = fadd float %146, %147 ; [#uses=1]
- %149 = fsub float %142, %148 ; [#uses=3]
- %150 = fcmp ogt float %149, 0.000000e+00 ; [#uses=1]
- br i1 %150, label %bb218, label %bb11
-
-bb11: ; preds = %bb9
- %151 = fcmp ogt float %149, %s.1 ; [#uses=1]
- br i1 %151, label %bb12, label %bb13
-
-bb12: ; preds = %bb11
- %152 = fcmp olt float %37, 0.000000e+00 ; [#uses=1]
- %153 = zext i1 %152 to i32 ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb12, %bb11
- %s.2 = phi float [ %149, %bb12 ], [ %s.1, %bb11 ] ; [#uses=2]
- %invert_normal.2 = phi i32 [ %153, %bb12 ], [ %invert_normal.1, %bb11 ] ; [#uses=1]
- %code.2 = phi i32 [ 3, %bb12 ], [ %code.1, %bb11 ] ; [#uses=1]
- %normalR.2 = phi float* [ %32, %bb12 ], [ %normalR.1, %bb11 ] ; [#uses=1]
- %154 = fmul float %R2.val359, %20 ; [#uses=1]
- %155 = fmul float %R2.idx360.val, %15 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- %157 = fmul float %R2.idx361.val, %10 ; [#uses=1]
- %158 = fadd float %156, %157 ; [#uses=2]
- %159 = call float @fabsf(float %158) nounwind readnone ; [#uses=1]
- %160 = fmul float %40, %109 ; [#uses=1]
- %161 = fmul float %44, %112 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fmul float %48, %115 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- %165 = fadd float %164, %52 ; [#uses=1]
- %166 = fsub float %159, %165 ; [#uses=3]
- %167 = fcmp ogt float %166, 0.000000e+00 ; [#uses=1]
- br i1 %167, label %bb218, label %bb15
-
-bb15: ; preds = %bb13
- %168 = fcmp ogt float %166, %s.2 ; [#uses=1]
- br i1 %168, label %bb16, label %bb17
-
-bb16: ; preds = %bb15
- %169 = fcmp olt float %158, 0.000000e+00 ; [#uses=1]
- %170 = zext i1 %169 to i32 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb16, %bb15
- %s.3 = phi float [ %166, %bb16 ], [ %s.2, %bb15 ] ; [#uses=2]
- %invert_normal.3 = phi i32 [ %170, %bb16 ], [ %invert_normal.2, %bb15 ] ; [#uses=1]
- %code.3 = phi i32 [ 4, %bb16 ], [ %code.2, %bb15 ] ; [#uses=1]
- %normalR.3 = phi float* [ %R2, %bb16 ], [ %normalR.2, %bb15 ] ; [#uses=1]
- %171 = fmul float %.val353, %20 ; [#uses=1]
- %172 = fmul float %.idx354.val, %15 ; [#uses=1]
- %173 = fadd float %171, %172 ; [#uses=1]
- %174 = fmul float %.idx355.val, %10 ; [#uses=1]
- %175 = fadd float %173, %174 ; [#uses=2]
- %176 = call float @fabsf(float %175) nounwind readnone ; [#uses=1]
- %177 = fmul float %40, %110 ; [#uses=1]
- %178 = fmul float %44, %113 ; [#uses=1]
- %179 = fadd float %177, %178 ; [#uses=1]
- %180 = fmul float %48, %116 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=1]
- %182 = fadd float %181, %56 ; [#uses=1]
- %183 = fsub float %176, %182 ; [#uses=3]
- %184 = fcmp ogt float %183, 0.000000e+00 ; [#uses=1]
- br i1 %184, label %bb218, label %bb19
-
-bb19: ; preds = %bb17
- %185 = fcmp ogt float %183, %s.3 ; [#uses=1]
- br i1 %185, label %bb20, label %bb21
-
-bb20: ; preds = %bb19
- %186 = fcmp olt float %175, 0.000000e+00 ; [#uses=1]
- %187 = zext i1 %186 to i32 ; [#uses=1]
- br label %bb21
-
-bb21: ; preds = %bb20, %bb19
- %s.4 = phi float [ %183, %bb20 ], [ %s.3, %bb19 ] ; [#uses=2]
- %invert_normal.4 = phi i32 [ %187, %bb20 ], [ %invert_normal.3, %bb19 ] ; [#uses=1]
- %code.4 = phi i32 [ 5, %bb20 ], [ %code.3, %bb19 ] ; [#uses=1]
- %normalR.4 = phi float* [ %67, %bb20 ], [ %normalR.3, %bb19 ] ; [#uses=1]
- %188 = fmul float %.val347, %20 ; [#uses=1]
- %189 = fmul float %.idx348.val, %15 ; [#uses=1]
- %190 = fadd float %188, %189 ; [#uses=1]
- %191 = fmul float %.idx349.val, %10 ; [#uses=1]
- %192 = fadd float %190, %191 ; [#uses=2]
- %193 = call float @fabsf(float %192) nounwind readnone ; [#uses=1]
- %194 = fmul float %40, %111 ; [#uses=1]
- %195 = fmul float %44, %114 ; [#uses=1]
- %196 = fadd float %194, %195 ; [#uses=1]
- %197 = fmul float %48, %117 ; [#uses=1]
- %198 = fadd float %196, %197 ; [#uses=1]
- %199 = fadd float %198, %60 ; [#uses=1]
- %200 = fsub float %193, %199 ; [#uses=3]
- %201 = fcmp ogt float %200, 0.000000e+00 ; [#uses=1]
- br i1 %201, label %bb218, label %bb23
-
-bb23: ; preds = %bb21
- %202 = fcmp ogt float %200, %s.4 ; [#uses=1]
- br i1 %202, label %bb24, label %bb25
-
-bb24: ; preds = %bb23
- %203 = fcmp olt float %192, 0.000000e+00 ; [#uses=1]
- %204 = zext i1 %203 to i32 ; [#uses=1]
- br label %bb25
-
-bb25: ; preds = %bb24, %bb23
- %s.5 = phi float [ %200, %bb24 ], [ %s.4, %bb23 ] ; [#uses=3]
- %invert_normal.5 = phi i32 [ %204, %bb24 ], [ %invert_normal.4, %bb23 ] ; [#uses=2]
- %code.5 = phi i32 [ 6, %bb24 ], [ %code.4, %bb23 ] ; [#uses=2]
- %normalR.5 = phi float* [ %73, %bb24 ], [ %normalR.4, %bb23 ] ; [#uses=2]
- %205 = fadd float %109, 0x3EE4F8B580000000 ; [#uses=4]
- %206 = fadd float %110, 0x3EE4F8B580000000 ; [#uses=4]
- %207 = fadd float %111, 0x3EE4F8B580000000 ; [#uses=4]
- %208 = fadd float %112, 0x3EE4F8B580000000 ; [#uses=4]
- %209 = fadd float %113, 0x3EE4F8B580000000 ; [#uses=4]
- %210 = fadd float %114, 0x3EE4F8B580000000 ; [#uses=4]
- %211 = fadd float %115, 0x3EE4F8B580000000 ; [#uses=4]
- %212 = fadd float %116, 0x3EE4F8B580000000 ; [#uses=4]
- %213 = fadd float %117, 0x3EE4F8B580000000 ; [#uses=4]
- %214 = fmul float %37, %83 ; [#uses=1]
- %215 = fmul float %31, %98 ; [#uses=1]
- %216 = fsub float %214, %215 ; [#uses=2]
- %217 = call float @fabsf(float %216) nounwind readnone ; [#uses=1]
- %218 = fmul float %44, %211 ; [#uses=1]
- %219 = fmul float %48, %208 ; [#uses=1]
- %220 = fadd float %218, %219 ; [#uses=1]
- %221 = fmul float %56, %207 ; [#uses=1]
- %222 = fadd float %220, %221 ; [#uses=1]
- %223 = fmul float %60, %206 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=1]
- %225 = fsub float %217, %224 ; [#uses=2]
- %226 = fcmp ogt float %225, 0x3E80000000000000 ; [#uses=1]
- br i1 %226, label %bb218, label %bb27
-
-bb27: ; preds = %bb25
- %227 = fmul float %98, %98 ; [#uses=1]
- %228 = fadd float %227, 0.000000e+00 ; [#uses=2]
- %229 = fmul float %83, %83 ; [#uses=2]
- %230 = fadd float %228, %229 ; [#uses=1]
- %231 = call float @sqrtf(float %230) nounwind readonly ; [#uses=5]
- %232 = fcmp ogt float %231, 0x3E80000000000000 ; [#uses=1]
- br i1 %232, label %bb28, label %bb30
-
-bb28: ; preds = %bb27
- %233 = fdiv float %225, %231 ; [#uses=2]
- %234 = fmul float %233, 0x3FF0CCCCC0000000 ; [#uses=1]
- %235 = fcmp ogt float %234, %s.5 ; [#uses=1]
- br i1 %235, label %bb29, label %bb30
-
-bb29: ; preds = %bb28
- %236 = fdiv float 0.000000e+00, %231 ; [#uses=1]
- %237 = fsub float -0.000000e+00, %98 ; [#uses=1]
- %238 = fdiv float %237, %231 ; [#uses=1]
- %239 = fdiv float %83, %231 ; [#uses=1]
- %240 = fcmp olt float %216, 0.000000e+00 ; [#uses=1]
- %241 = zext i1 %240 to i32 ; [#uses=1]
- br label %bb30
-
-bb30: ; preds = %bb29, %bb28, %bb27
- %normalC.0.0.8 = phi float [ %236, %bb29 ], [ 0.000000e+00, %bb28 ], [ 0.000000e+00, %bb27 ] ; [#uses=2]
- %normalC.0.1.8 = phi float [ %238, %bb29 ], [ 0.000000e+00, %bb28 ], [ 0.000000e+00, %bb27 ] ; [#uses=2]
- %normalC.0.2.8 = phi float [ %239, %bb29 ], [ 0.000000e+00, %bb28 ], [ 0.000000e+00, %bb27 ] ; [#uses=2]
- %s.6 = phi float [ %233, %bb29 ], [ %s.5, %bb28 ], [ %s.5, %bb27 ] ; [#uses=3]
- %invert_normal.6 = phi i32 [ %241, %bb29 ], [ %invert_normal.5, %bb28 ], [ %invert_normal.5, %bb27 ] ; [#uses=2]
- %code.6 = phi i32 [ 7, %bb29 ], [ %code.5, %bb28 ], [ %code.5, %bb27 ] ; [#uses=2]
- %normalR.6 = phi float* [ null, %bb29 ], [ %normalR.5, %bb28 ], [ %normalR.5, %bb27 ] ; [#uses=2]
- %242 = fmul float %37, %88 ; [#uses=1]
- %243 = fmul float %31, %103 ; [#uses=1]
- %244 = fsub float %242, %243 ; [#uses=2]
- %245 = call float @fabsf(float %244) nounwind readnone ; [#uses=1]
- %246 = fmul float %44, %212 ; [#uses=1]
- %247 = fmul float %48, %209 ; [#uses=1]
- %248 = fadd float %246, %247 ; [#uses=1]
- %249 = fmul float %52, %207 ; [#uses=1]
- %250 = fadd float %248, %249 ; [#uses=1]
- %251 = fmul float %60, %205 ; [#uses=1]
- %252 = fadd float %250, %251 ; [#uses=1]
- %253 = fsub float %245, %252 ; [#uses=2]
- %254 = fcmp ogt float %253, 0x3E80000000000000 ; [#uses=1]
- br i1 %254, label %bb218, label %bb32
-
-bb32: ; preds = %bb30
- %255 = fmul float %103, %103 ; [#uses=1]
- %256 = fadd float %255, 0.000000e+00 ; [#uses=2]
- %257 = fmul float %88, %88 ; [#uses=2]
- %258 = fadd float %256, %257 ; [#uses=1]
- %259 = call float @sqrtf(float %258) nounwind readonly ; [#uses=5]
- %260 = fcmp ogt float %259, 0x3E80000000000000 ; [#uses=1]
- br i1 %260, label %bb33, label %bb35
-
-bb33: ; preds = %bb32
- %261 = fdiv float %253, %259 ; [#uses=2]
- %262 = fmul float %261, 0x3FF0CCCCC0000000 ; [#uses=1]
- %263 = fcmp ogt float %262, %s.6 ; [#uses=1]
- br i1 %263, label %bb34, label %bb35
-
-bb34: ; preds = %bb33
- %264 = fdiv float 0.000000e+00, %259 ; [#uses=1]
- %265 = fsub float -0.000000e+00, %103 ; [#uses=1]
- %266 = fdiv float %265, %259 ; [#uses=1]
- %267 = fdiv float %88, %259 ; [#uses=1]
- %268 = fcmp olt float %244, 0.000000e+00 ; [#uses=1]
- %269 = zext i1 %268 to i32 ; [#uses=1]
- br label %bb35
-
-bb35: ; preds = %bb34, %bb33, %bb32
- %normalC.0.0.7 = phi float [ %264, %bb34 ], [ %normalC.0.0.8, %bb33 ], [ %normalC.0.0.8, %bb32 ] ; [#uses=2]
- %normalC.0.1.7 = phi float [ %266, %bb34 ], [ %normalC.0.1.8, %bb33 ], [ %normalC.0.1.8, %bb32 ] ; [#uses=2]
- %normalC.0.2.7 = phi float [ %267, %bb34 ], [ %normalC.0.2.8, %bb33 ], [ %normalC.0.2.8, %bb32 ] ; [#uses=2]
- %s.7 = phi float [ %261, %bb34 ], [ %s.6, %bb33 ], [ %s.6, %bb32 ] ; [#uses=3]
- %invert_normal.7 = phi i32 [ %269, %bb34 ], [ %invert_normal.6, %bb33 ], [ %invert_normal.6, %bb32 ] ; [#uses=2]
- %code.7 = phi i32 [ 8, %bb34 ], [ %code.6, %bb33 ], [ %code.6, %bb32 ] ; [#uses=2]
- %normalR.7 = phi float* [ null, %bb34 ], [ %normalR.6, %bb33 ], [ %normalR.6, %bb32 ] ; [#uses=2]
- %270 = fmul float %37, %93 ; [#uses=1]
- %271 = fmul float %31, %108 ; [#uses=1]
- %272 = fsub float %270, %271 ; [#uses=2]
- %273 = call float @fabsf(float %272) nounwind readnone ; [#uses=1]
- %274 = fmul float %44, %213 ; [#uses=1]
- %275 = fmul float %48, %210 ; [#uses=1]
- %276 = fadd float %274, %275 ; [#uses=1]
- %277 = fmul float %52, %206 ; [#uses=1]
- %278 = fadd float %276, %277 ; [#uses=1]
- %279 = fmul float %56, %205 ; [#uses=1]
- %280 = fadd float %278, %279 ; [#uses=1]
- %281 = fsub float %273, %280 ; [#uses=2]
- %282 = fcmp ogt float %281, 0x3E80000000000000 ; [#uses=1]
- br i1 %282, label %bb218, label %bb37
-
-bb37: ; preds = %bb35
- %283 = fmul float %108, %108 ; [#uses=1]
- %284 = fadd float %283, 0.000000e+00 ; [#uses=2]
- %285 = fmul float %93, %93 ; [#uses=2]
- %286 = fadd float %284, %285 ; [#uses=1]
- %287 = call float @sqrtf(float %286) nounwind readonly ; [#uses=5]
- %288 = fcmp ogt float %287, 0x3E80000000000000 ; [#uses=1]
- br i1 %288, label %bb38, label %bb40
-
-bb38: ; preds = %bb37
- %289 = fdiv float %281, %287 ; [#uses=2]
- %290 = fmul float %289, 0x3FF0CCCCC0000000 ; [#uses=1]
- %291 = fcmp ogt float %290, %s.7 ; [#uses=1]
- br i1 %291, label %bb39, label %bb40
-
-bb39: ; preds = %bb38
- %292 = fdiv float 0.000000e+00, %287 ; [#uses=1]
- %293 = fsub float -0.000000e+00, %108 ; [#uses=1]
- %294 = fdiv float %293, %287 ; [#uses=1]
- %295 = fdiv float %93, %287 ; [#uses=1]
- %296 = fcmp olt float %272, 0.000000e+00 ; [#uses=1]
- %297 = zext i1 %296 to i32 ; [#uses=1]
- br label %bb40
-
-bb40: ; preds = %bb39, %bb38, %bb37
- %normalC.0.0.6 = phi float [ %292, %bb39 ], [ %normalC.0.0.7, %bb38 ], [ %normalC.0.0.7, %bb37 ] ; [#uses=2]
- %normalC.0.1.6 = phi float [ %294, %bb39 ], [ %normalC.0.1.7, %bb38 ], [ %normalC.0.1.7, %bb37 ] ; [#uses=2]
- %normalC.0.2.6 = phi float [ %295, %bb39 ], [ %normalC.0.2.7, %bb38 ], [ %normalC.0.2.7, %bb37 ] ; [#uses=2]
- %s.8 = phi float [ %289, %bb39 ], [ %s.7, %bb38 ], [ %s.7, %bb37 ] ; [#uses=3]
- %invert_normal.8 = phi i32 [ %297, %bb39 ], [ %invert_normal.7, %bb38 ], [ %invert_normal.7, %bb37 ] ; [#uses=2]
- %code.8 = phi i32 [ 9, %bb39 ], [ %code.7, %bb38 ], [ %code.7, %bb37 ] ; [#uses=2]
- %normalR.8 = phi float* [ null, %bb39 ], [ %normalR.7, %bb38 ], [ %normalR.7, %bb37 ] ; [#uses=2]
- %298 = fmul float %25, %98 ; [#uses=1]
- %299 = fmul float %37, %66 ; [#uses=1]
- %300 = fsub float %298, %299 ; [#uses=2]
- %301 = call float @fabsf(float %300) nounwind readnone ; [#uses=1]
- %302 = fmul float %40, %211 ; [#uses=1]
- %303 = fmul float %48, %205 ; [#uses=1]
- %304 = fadd float %302, %303 ; [#uses=1]
- %305 = fmul float %56, %210 ; [#uses=1]
- %306 = fadd float %304, %305 ; [#uses=1]
- %307 = fmul float %60, %209 ; [#uses=1]
- %308 = fadd float %306, %307 ; [#uses=1]
- %309 = fsub float %301, %308 ; [#uses=2]
- %310 = fcmp ogt float %309, 0x3E80000000000000 ; [#uses=1]
- br i1 %310, label %bb218, label %bb42
-
-bb42: ; preds = %bb40
- %311 = fmul float %66, %66 ; [#uses=2]
- %312 = fadd float %228, %311 ; [#uses=1]
- %313 = call float @sqrtf(float %312) nounwind readonly ; [#uses=5]
- %314 = fcmp ogt float %313, 0x3E80000000000000 ; [#uses=1]
- br i1 %314, label %bb43, label %bb45
-
-bb43: ; preds = %bb42
- %315 = fdiv float %309, %313 ; [#uses=2]
- %316 = fmul float %315, 0x3FF0CCCCC0000000 ; [#uses=1]
- %317 = fcmp ogt float %316, %s.8 ; [#uses=1]
- br i1 %317, label %bb44, label %bb45
-
-bb44: ; preds = %bb43
- %318 = fdiv float %98, %313 ; [#uses=1]
- %319 = fdiv float 0.000000e+00, %313 ; [#uses=1]
- %320 = fsub float -0.000000e+00, %66 ; [#uses=1]
- %321 = fdiv float %320, %313 ; [#uses=1]
- %322 = fcmp olt float %300, 0.000000e+00 ; [#uses=1]
- %323 = zext i1 %322 to i32 ; [#uses=1]
- br label %bb45
-
-bb45: ; preds = %bb44, %bb43, %bb42
- %normalC.0.0.5 = phi float [ %318, %bb44 ], [ %normalC.0.0.6, %bb43 ], [ %normalC.0.0.6, %bb42 ] ; [#uses=2]
- %normalC.0.1.5 = phi float [ %319, %bb44 ], [ %normalC.0.1.6, %bb43 ], [ %normalC.0.1.6, %bb42 ] ; [#uses=2]
- %normalC.0.2.5 = phi float [ %321, %bb44 ], [ %normalC.0.2.6, %bb43 ], [ %normalC.0.2.6, %bb42 ] ; [#uses=2]
- %s.9 = phi float [ %315, %bb44 ], [ %s.8, %bb43 ], [ %s.8, %bb42 ] ; [#uses=3]
- %invert_normal.9 = phi i32 [ %323, %bb44 ], [ %invert_normal.8, %bb43 ], [ %invert_normal.8, %bb42 ] ; [#uses=2]
- %code.9 = phi i32 [ 10, %bb44 ], [ %code.8, %bb43 ], [ %code.8, %bb42 ] ; [#uses=2]
- %normalR.9 = phi float* [ null, %bb44 ], [ %normalR.8, %bb43 ], [ %normalR.8, %bb42 ] ; [#uses=2]
- %324 = fmul float %25, %103 ; [#uses=1]
- %325 = fmul float %37, %72 ; [#uses=1]
- %326 = fsub float %324, %325 ; [#uses=2]
- %327 = call float @fabsf(float %326) nounwind readnone ; [#uses=1]
- %328 = fmul float %40, %212 ; [#uses=1]
- %329 = fmul float %48, %206 ; [#uses=1]
- %330 = fadd float %328, %329 ; [#uses=1]
- %331 = fmul float %52, %210 ; [#uses=1]
- %332 = fadd float %330, %331 ; [#uses=1]
- %333 = fmul float %60, %208 ; [#uses=1]
- %334 = fadd float %332, %333 ; [#uses=1]
- %335 = fsub float %327, %334 ; [#uses=2]
- %336 = fcmp ogt float %335, 0x3E80000000000000 ; [#uses=1]
- br i1 %336, label %bb218, label %bb47
-
-bb47: ; preds = %bb45
- %337 = fmul float %72, %72 ; [#uses=2]
- %338 = fadd float %256, %337 ; [#uses=1]
- %339 = call float @sqrtf(float %338) nounwind readonly ; [#uses=5]
- %340 = fcmp ogt float %339, 0x3E80000000000000 ; [#uses=1]
- br i1 %340, label %bb48, label %bb50
-
-bb48: ; preds = %bb47
- %341 = fdiv float %335, %339 ; [#uses=2]
- %342 = fmul float %341, 0x3FF0CCCCC0000000 ; [#uses=1]
- %343 = fcmp ogt float %342, %s.9 ; [#uses=1]
- br i1 %343, label %bb49, label %bb50
-
-bb49: ; preds = %bb48
- %344 = fdiv float %103, %339 ; [#uses=1]
- %345 = fdiv float 0.000000e+00, %339 ; [#uses=1]
- %346 = fsub float -0.000000e+00, %72 ; [#uses=1]
- %347 = fdiv float %346, %339 ; [#uses=1]
- %348 = fcmp olt float %326, 0.000000e+00 ; [#uses=1]
- %349 = zext i1 %348 to i32 ; [#uses=1]
- br label %bb50
-
-bb50: ; preds = %bb49, %bb48, %bb47
- %normalC.0.0.4 = phi float [ %344, %bb49 ], [ %normalC.0.0.5, %bb48 ], [ %normalC.0.0.5, %bb47 ] ; [#uses=2]
- %normalC.0.1.4 = phi float [ %345, %bb49 ], [ %normalC.0.1.5, %bb48 ], [ %normalC.0.1.5, %bb47 ] ; [#uses=2]
- %normalC.0.2.4 = phi float [ %347, %bb49 ], [ %normalC.0.2.5, %bb48 ], [ %normalC.0.2.5, %bb47 ] ; [#uses=2]
- %s.10 = phi float [ %341, %bb49 ], [ %s.9, %bb48 ], [ %s.9, %bb47 ] ; [#uses=3]
- %invert_normal.10 = phi i32 [ %349, %bb49 ], [ %invert_normal.9, %bb48 ], [ %invert_normal.9, %bb47 ] ; [#uses=2]
- %code.10 = phi i32 [ 11, %bb49 ], [ %code.9, %bb48 ], [ %code.9, %bb47 ] ; [#uses=2]
- %normalR.10 = phi float* [ null, %bb49 ], [ %normalR.9, %bb48 ], [ %normalR.9, %bb47 ] ; [#uses=2]
- %350 = fmul float %25, %108 ; [#uses=1]
- %351 = fmul float %37, %78 ; [#uses=1]
- %352 = fsub float %350, %351 ; [#uses=2]
- %353 = call float @fabsf(float %352) nounwind readnone ; [#uses=1]
- %354 = fmul float %40, %213 ; [#uses=1]
- %355 = fmul float %48, %207 ; [#uses=1]
- %356 = fadd float %354, %355 ; [#uses=1]
- %357 = fmul float %52, %209 ; [#uses=1]
- %358 = fadd float %356, %357 ; [#uses=1]
- %359 = fmul float %56, %208 ; [#uses=1]
- %360 = fadd float %358, %359 ; [#uses=1]
- %361 = fsub float %353, %360 ; [#uses=2]
- %362 = fcmp ogt float %361, 0x3E80000000000000 ; [#uses=1]
- br i1 %362, label %bb218, label %bb52
-
-bb52: ; preds = %bb50
- %363 = fmul float %78, %78 ; [#uses=2]
- %364 = fadd float %284, %363 ; [#uses=1]
- %365 = call float @sqrtf(float %364) nounwind readonly ; [#uses=5]
- %366 = fcmp ogt float %365, 0x3E80000000000000 ; [#uses=1]
- br i1 %366, label %bb53, label %bb55
-
-bb53: ; preds = %bb52
- %367 = fdiv float %361, %365 ; [#uses=2]
- %368 = fmul float %367, 0x3FF0CCCCC0000000 ; [#uses=1]
- %369 = fcmp ogt float %368, %s.10 ; [#uses=1]
- br i1 %369, label %bb54, label %bb55
-
-bb54: ; preds = %bb53
- %370 = fdiv float %108, %365 ; [#uses=1]
- %371 = fdiv float 0.000000e+00, %365 ; [#uses=1]
- %372 = fsub float -0.000000e+00, %78 ; [#uses=1]
- %373 = fdiv float %372, %365 ; [#uses=1]
- %374 = fcmp olt float %352, 0.000000e+00 ; [#uses=1]
- %375 = zext i1 %374 to i32 ; [#uses=1]
- br label %bb55
-
-bb55: ; preds = %bb54, %bb53, %bb52
- %normalC.0.0.3 = phi float [ %370, %bb54 ], [ %normalC.0.0.4, %bb53 ], [ %normalC.0.0.4, %bb52 ] ; [#uses=2]
- %normalC.0.1.3 = phi float [ %371, %bb54 ], [ %normalC.0.1.4, %bb53 ], [ %normalC.0.1.4, %bb52 ] ; [#uses=2]
- %normalC.0.2.3 = phi float [ %373, %bb54 ], [ %normalC.0.2.4, %bb53 ], [ %normalC.0.2.4, %bb52 ] ; [#uses=2]
- %s.11 = phi float [ %367, %bb54 ], [ %s.10, %bb53 ], [ %s.10, %bb52 ] ; [#uses=3]
- %invert_normal.11 = phi i32 [ %375, %bb54 ], [ %invert_normal.10, %bb53 ], [ %invert_normal.10, %bb52 ] ; [#uses=2]
- %code.11 = phi i32 [ 12, %bb54 ], [ %code.10, %bb53 ], [ %code.10, %bb52 ] ; [#uses=2]
- %normalR.11 = phi float* [ null, %bb54 ], [ %normalR.10, %bb53 ], [ %normalR.10, %bb52 ] ; [#uses=2]
- %376 = fmul float %31, %66 ; [#uses=1]
- %377 = fmul float %25, %83 ; [#uses=1]
- %378 = fsub float %376, %377 ; [#uses=2]
- %379 = call float @fabsf(float %378) nounwind readnone ; [#uses=1]
- %380 = fmul float %40, %208 ; [#uses=1]
- %381 = fmul float %44, %205 ; [#uses=1]
- %382 = fadd float %380, %381 ; [#uses=1]
- %383 = fmul float %56, %213 ; [#uses=1]
- %384 = fadd float %382, %383 ; [#uses=1]
- %385 = fmul float %60, %212 ; [#uses=1]
- %386 = fadd float %384, %385 ; [#uses=1]
- %387 = fsub float %379, %386 ; [#uses=2]
- %388 = fcmp ogt float %387, 0x3E80000000000000 ; [#uses=1]
- br i1 %388, label %bb218, label %bb57
-
-bb57: ; preds = %bb55
- %389 = fadd float %229, %311 ; [#uses=1]
- %390 = fadd float %389, 0.000000e+00 ; [#uses=1]
- %391 = call float @sqrtf(float %390) nounwind readonly ; [#uses=5]
- %392 = fcmp ogt float %391, 0x3E80000000000000 ; [#uses=1]
- br i1 %392, label %bb58, label %bb60
-
-bb58: ; preds = %bb57
- %393 = fdiv float %387, %391 ; [#uses=2]
- %394 = fmul float %393, 0x3FF0CCCCC0000000 ; [#uses=1]
- %395 = fcmp ogt float %394, %s.11 ; [#uses=1]
- br i1 %395, label %bb59, label %bb60
-
-bb59: ; preds = %bb58
- %396 = fsub float -0.000000e+00, %83 ; [#uses=1]
- %397 = fdiv float %396, %391 ; [#uses=1]
- %398 = fdiv float %66, %391 ; [#uses=1]
- %399 = fdiv float 0.000000e+00, %391 ; [#uses=1]
- %400 = fcmp olt float %378, 0.000000e+00 ; [#uses=1]
- %401 = zext i1 %400 to i32 ; [#uses=1]
- br label %bb60
-
-bb60: ; preds = %bb59, %bb58, %bb57
- %normalC.0.0.2 = phi float [ %397, %bb59 ], [ %normalC.0.0.3, %bb58 ], [ %normalC.0.0.3, %bb57 ] ; [#uses=2]
- %normalC.0.1.2 = phi float [ %398, %bb59 ], [ %normalC.0.1.3, %bb58 ], [ %normalC.0.1.3, %bb57 ] ; [#uses=2]
- %normalC.0.2.2 = phi float [ %399, %bb59 ], [ %normalC.0.2.3, %bb58 ], [ %normalC.0.2.3, %bb57 ] ; [#uses=2]
- %s.12 = phi float [ %393, %bb59 ], [ %s.11, %bb58 ], [ %s.11, %bb57 ] ; [#uses=3]
- %invert_normal.12 = phi i32 [ %401, %bb59 ], [ %invert_normal.11, %bb58 ], [ %invert_normal.11, %bb57 ] ; [#uses=2]
- %code.12 = phi i32 [ 13, %bb59 ], [ %code.11, %bb58 ], [ %code.11, %bb57 ] ; [#uses=2]
- %normalR.12 = phi float* [ null, %bb59 ], [ %normalR.11, %bb58 ], [ %normalR.11, %bb57 ] ; [#uses=2]
- %402 = fmul float %31, %72 ; [#uses=1]
- %403 = fmul float %25, %88 ; [#uses=1]
- %404 = fsub float %402, %403 ; [#uses=2]
- %405 = call float @fabsf(float %404) nounwind readnone ; [#uses=1]
- %406 = fmul float %40, %209 ; [#uses=1]
- %407 = fmul float %44, %206 ; [#uses=1]
- %408 = fadd float %406, %407 ; [#uses=1]
- %409 = fmul float %52, %213 ; [#uses=1]
- %410 = fadd float %408, %409 ; [#uses=1]
- %411 = fmul float %60, %211 ; [#uses=1]
- %412 = fadd float %410, %411 ; [#uses=1]
- %413 = fsub float %405, %412 ; [#uses=2]
- %414 = fcmp ogt float %413, 0x3E80000000000000 ; [#uses=1]
- br i1 %414, label %bb218, label %bb62
-
-bb62: ; preds = %bb60
- %415 = fadd float %257, %337 ; [#uses=1]
- %416 = fadd float %415, 0.000000e+00 ; [#uses=1]
- %417 = call float @sqrtf(float %416) nounwind readonly ; [#uses=5]
- %418 = fcmp ogt float %417, 0x3E80000000000000 ; [#uses=1]
- br i1 %418, label %bb63, label %bb65
-
-bb63: ; preds = %bb62
- %419 = fdiv float %413, %417 ; [#uses=2]
- %420 = fmul float %419, 0x3FF0CCCCC0000000 ; [#uses=1]
- %421 = fcmp ogt float %420, %s.12 ; [#uses=1]
- br i1 %421, label %bb64, label %bb65
-
-bb64: ; preds = %bb63
- %422 = fsub float -0.000000e+00, %88 ; [#uses=1]
- %423 = fdiv float %422, %417 ; [#uses=1]
- %424 = fdiv float %72, %417 ; [#uses=1]
- %425 = fdiv float 0.000000e+00, %417 ; [#uses=1]
- %426 = fcmp olt float %404, 0.000000e+00 ; [#uses=1]
- %427 = zext i1 %426 to i32 ; [#uses=1]
- br label %bb65
-
-bb65: ; preds = %bb64, %bb63, %bb62
- %normalC.0.0.1 = phi float [ %423, %bb64 ], [ %normalC.0.0.2, %bb63 ], [ %normalC.0.0.2, %bb62 ] ; [#uses=1]
- %normalC.0.1.1 = phi float [ %424, %bb64 ], [ %normalC.0.1.2, %bb63 ], [ %normalC.0.1.2, %bb62 ] ; [#uses=1]
- %normalC.0.2.1 = phi float [ %425, %bb64 ], [ %normalC.0.2.2, %bb63 ], [ %normalC.0.2.2, %bb62 ] ; [#uses=1]
- %s.13 = phi float [ %419, %bb64 ], [ %s.12, %bb63 ], [ %s.12, %bb62 ] ; [#uses=3]
- %invert_normal.13 = phi i32 [ %427, %bb64 ], [ %invert_normal.12, %bb63 ], [ %invert_normal.12, %bb62 ] ; [#uses=2]
- %code.13 = phi i32 [ 14, %bb64 ], [ %code.12, %bb63 ], [ %code.12, %bb62 ] ; [#uses=3]
- %normalR.13 = phi float* [ null, %bb64 ], [ %normalR.12, %bb63 ], [ %normalR.12, %bb62 ] ; [#uses=4]
- %428 = fmul float %31, %78 ; [#uses=1]
- %429 = fmul float %25, %93 ; [#uses=1]
- %430 = fsub float %428, %429 ; [#uses=2]
- %431 = call float @fabsf(float %430) nounwind readnone ; [#uses=1]
- %432 = fmul float %40, %210 ; [#uses=1]
- %433 = fmul float %44, %207 ; [#uses=1]
- %434 = fadd float %432, %433 ; [#uses=1]
- %435 = fmul float %52, %212 ; [#uses=1]
- %436 = fadd float %434, %435 ; [#uses=1]
- %437 = fmul float %56, %211 ; [#uses=1]
- %438 = fadd float %436, %437 ; [#uses=1]
- %439 = fsub float %431, %438 ; [#uses=2]
- %440 = fcmp ogt float %439, 0x3E80000000000000 ; [#uses=1]
- br i1 %440, label %bb218, label %bb67
-
-bb67: ; preds = %bb65
- %441 = fadd float %285, %363 ; [#uses=1]
- %442 = fadd float %441, 0.000000e+00 ; [#uses=1]
- %443 = call float @sqrtf(float %442) nounwind readonly ; [#uses=5]
- %444 = fcmp ogt float %443, 0x3E80000000000000 ; [#uses=1]
- br i1 %444, label %bb68, label %bb70
-
-bb68: ; preds = %bb67
- %445 = fdiv float %439, %443 ; [#uses=2]
- %446 = fmul float %445, 0x3FF0CCCCC0000000 ; [#uses=1]
- %447 = fcmp ogt float %446, %s.13 ; [#uses=1]
- br i1 %447, label %bb72.thread, label %bb70
-
-bb72.thread: ; preds = %bb68
- %448 = fsub float -0.000000e+00, %93 ; [#uses=1]
- %449 = fdiv float %448, %443 ; [#uses=1]
- %450 = fdiv float %78, %443 ; [#uses=1]
- %451 = fdiv float 0.000000e+00, %443 ; [#uses=1]
- %452 = fcmp olt float %430, 0.000000e+00 ; [#uses=1]
- %453 = zext i1 %452 to i32 ; [#uses=1]
- %454 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb74
-
-bb70: ; preds = %bb68, %bb67
- %455 = icmp eq i32 %code.13, 0 ; [#uses=1]
- br i1 %455, label %bb218, label %bb72
-
-bb72: ; preds = %bb70
- %456 = icmp eq float* %normalR.13, null ; [#uses=1]
- %457 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=2]
- br i1 %456, label %bb74, label %bb73
-
-bb73: ; preds = %bb72
- %458 = load float* %normalR.13, align 4 ; [#uses=2]
- store float %458, float* %457, align 4
- %459 = getelementptr inbounds float* %normalR.13, i32 4 ; [#uses=1]
- %460 = load float* %459, align 4 ; [#uses=2]
- %461 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %460, float* %461, align 4
- %462 = getelementptr inbounds float* %normalR.13, i32 8 ; [#uses=1]
- %463 = load float* %462, align 4 ; [#uses=2]
- %464 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %463, float* %464, align 4
- br label %bb75
-
-bb74: ; preds = %bb72, %bb72.thread
- %465 = phi float* [ %454, %bb72.thread ], [ %457, %bb72 ] ; [#uses=1]
- %normalC.0.0.0542557 = phi float [ %449, %bb72.thread ], [ %normalC.0.0.1, %bb72 ] ; [#uses=3]
- %normalC.0.1.0543556 = phi float [ %450, %bb72.thread ], [ %normalC.0.1.1, %bb72 ] ; [#uses=3]
- %normalC.0.2.0544555 = phi float [ %451, %bb72.thread ], [ %normalC.0.2.1, %bb72 ] ; [#uses=3]
- %s.14545554 = phi float [ %445, %bb72.thread ], [ %s.13, %bb72 ] ; [#uses=1]
- %invert_normal.14546552 = phi i32 [ %453, %bb72.thread ], [ %invert_normal.13, %bb72 ] ; [#uses=1]
- %code.14547550 = phi i32 [ 15, %bb72.thread ], [ %code.13, %bb72 ] ; [#uses=1]
- %466 = fmul float %R1.val, %normalC.0.0.0542557 ; [#uses=1]
- %467 = fmul float %.val274, %normalC.0.1.0543556 ; [#uses=1]
- %468 = fadd float %466, %467 ; [#uses=1]
- %469 = fmul float %.val268, %normalC.0.2.0544555 ; [#uses=1]
- %470 = fadd float %468, %469 ; [#uses=2]
- store float %470, float* %465, align 4
- %.val374 = load float* %R1.idx, align 4 ; [#uses=1]
- %.idx375.val = load float* %.idx275, align 4 ; [#uses=1]
- %.idx376.val = load float* %.idx269, align 4 ; [#uses=1]
- %471 = fmul float %.val374, %normalC.0.0.0542557 ; [#uses=1]
- %472 = fmul float %.idx375.val, %normalC.0.1.0543556 ; [#uses=1]
- %473 = fadd float %471, %472 ; [#uses=1]
- %474 = fmul float %.idx376.val, %normalC.0.2.0544555 ; [#uses=1]
- %475 = fadd float %473, %474 ; [#uses=2]
- %476 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %475, float* %476, align 4
- %.val368 = load float* %R1.idx280, align 4 ; [#uses=1]
- %.idx369.val = load float* %.idx276, align 4 ; [#uses=1]
- %.idx370.val = load float* %.idx270, align 4 ; [#uses=1]
- %477 = fmul float %.val368, %normalC.0.0.0542557 ; [#uses=1]
- %478 = fmul float %.idx369.val, %normalC.0.1.0543556 ; [#uses=1]
- %479 = fadd float %477, %478 ; [#uses=1]
- %480 = fmul float %.idx370.val, %normalC.0.2.0544555 ; [#uses=1]
- %481 = fadd float %479, %480 ; [#uses=2]
- %482 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %481, float* %482, align 4
- br label %bb75
-
-bb75: ; preds = %bb74, %bb73
- %483 = phi float [ %481, %bb74 ], [ %463, %bb73 ] ; [#uses=1]
- %484 = phi float [ %475, %bb74 ], [ %460, %bb73 ] ; [#uses=1]
- %485 = phi float [ %470, %bb74 ], [ %458, %bb73 ] ; [#uses=1]
- %s.14545553 = phi float [ %s.14545554, %bb74 ], [ %s.13, %bb73 ] ; [#uses=2]
- %invert_normal.14546551 = phi i32 [ %invert_normal.14546552, %bb74 ], [ %invert_normal.13, %bb73 ] ; [#uses=1]
- %code.14547549 = phi i32 [ %code.14547550, %bb74 ], [ %code.13, %bb73 ] ; [#uses=7]
- %486 = icmp eq i32 %invert_normal.14546551, 0 ; [#uses=1]
- br i1 %486, label %bb77, label %bb76
-
-bb76: ; preds = %bb75
- %487 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %488 = fsub float -0.000000e+00, %485 ; [#uses=1]
- store float %488, float* %487, align 4
- %489 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %490 = fsub float -0.000000e+00, %484 ; [#uses=1]
- store float %490, float* %489, align 4
- %491 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %492 = fsub float -0.000000e+00, %483 ; [#uses=1]
- store float %492, float* %491, align 4
- br label %bb77
-
-bb77: ; preds = %bb76, %bb75
- %493 = fsub float -0.000000e+00, %s.14545553 ; [#uses=1]
- store float %493, float* %depth, align 4
- %494 = icmp sgt i32 %code.14547549, 6 ; [#uses=1]
- br i1 %494, label %bb117, label %bb125
-
-bb117: ; preds = %bb77
- %495 = load float* %18, align 4 ; [#uses=1]
- %496 = load float* %13, align 4 ; [#uses=1]
- %497 = load float* %8, align 4 ; [#uses=1]
- %498 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %.val404 = load float* %498, align 4 ; [#uses=3]
- %.idx405 = getelementptr %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %.idx405.val = load float* %.idx405, align 4 ; [#uses=3]
- %.idx406 = getelementptr %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %.idx406.val = load float* %.idx406, align 4 ; [#uses=3]
- %.idx408.val = load float* %R1.idx, align 4 ; [#uses=2]
- %.val407 = load float* %R1, align 4 ; [#uses=2]
- %499 = fmul float %.idx405.val, %.idx408.val ; [#uses=1]
- %500 = fmul float %.val404, %.val407 ; [#uses=1]
- %.idx409.val = load float* %R1.idx280, align 4 ; [#uses=2]
- %501 = fmul float %.idx406.val, %.idx409.val ; [#uses=1]
- %502 = fadd float %500, %499 ; [#uses=1]
- %503 = fadd float %502, %501 ; [#uses=1]
- %504 = fcmp ogt float %503, 0.000000e+00 ; [#uses=1]
- %iftmp.146.0 = select i1 %504, float 1.000000e+00, float -1.000000e+00 ; [#uses=1]
- %505 = fmul float %40, %iftmp.146.0 ; [#uses=3]
- %506 = fmul float %505, %.val407 ; [#uses=1]
- %507 = fadd float %495, %506 ; [#uses=1]
- %508 = fmul float %505, %.idx408.val ; [#uses=1]
- %509 = fadd float %496, %508 ; [#uses=1]
- %510 = fmul float %505, %.idx409.val ; [#uses=1]
- %511 = fadd float %497, %510 ; [#uses=1]
- %.idx408.val.1 = load float* %.idx275, align 4 ; [#uses=2]
- %.val407.1 = load float* %26, align 4 ; [#uses=2]
- %512 = fmul float %.idx405.val, %.idx408.val.1 ; [#uses=1]
- %513 = fmul float %.val404, %.val407.1 ; [#uses=1]
- %.idx409.val.1 = load float* %.idx276, align 4 ; [#uses=2]
- %514 = fmul float %.idx406.val, %.idx409.val.1 ; [#uses=1]
- %515 = fadd float %513, %512 ; [#uses=1]
- %516 = fadd float %515, %514 ; [#uses=1]
- %517 = fcmp ogt float %516, 0.000000e+00 ; [#uses=1]
- %iftmp.146.0.1 = select i1 %517, float 1.000000e+00, float -1.000000e+00 ; [#uses=1]
- %518 = fmul float %44, %iftmp.146.0.1 ; [#uses=3]
- %519 = fmul float %518, %.val407.1 ; [#uses=1]
- %520 = fadd float %507, %519 ; [#uses=1]
- %521 = fmul float %518, %.idx408.val.1 ; [#uses=1]
- %522 = fadd float %509, %521 ; [#uses=1]
- %523 = fmul float %518, %.idx409.val.1 ; [#uses=1]
- %524 = fadd float %511, %523 ; [#uses=1]
- %.idx408.val.2 = load float* %.idx269, align 4 ; [#uses=2]
- %.val407.2 = load float* %32, align 4 ; [#uses=2]
- %525 = fmul float %.idx405.val, %.idx408.val.2 ; [#uses=1]
- %526 = fmul float %.val404, %.val407.2 ; [#uses=1]
- %.idx409.val.2 = load float* %.idx270, align 4 ; [#uses=2]
- %527 = fmul float %.idx406.val, %.idx409.val.2 ; [#uses=1]
- %528 = fadd float %526, %525 ; [#uses=1]
- %529 = fadd float %528, %527 ; [#uses=1]
- %530 = fcmp ogt float %529, 0.000000e+00 ; [#uses=1]
- %iftmp.146.0.2 = select i1 %530, float 1.000000e+00, float -1.000000e+00 ; [#uses=1]
- %531 = fmul float %48, %iftmp.146.0.2 ; [#uses=3]
- %scevgep760.2771 = getelementptr %struct.btQuadWord* %pa80, i32 0, i32 0, i32 0 ; [#uses=1]
- %532 = fmul float %531, %.val407.2 ; [#uses=1]
- %533 = fadd float %520, %532 ; [#uses=2]
- store float %533, float* %scevgep760.2771, align 8
- %scevgep760.1.2 = getelementptr %struct.btQuadWord* %pa80, i32 0, i32 0, i32 1 ; [#uses=1]
- %534 = fmul float %531, %.idx408.val.2 ; [#uses=1]
- %535 = fadd float %522, %534 ; [#uses=2]
- store float %535, float* %scevgep760.1.2, align 4
- %scevgep760.2.2 = getelementptr %struct.btQuadWord* %pa80, i32 0, i32 0, i32 2 ; [#uses=1]
- %536 = fmul float %531, %.idx409.val.2 ; [#uses=1]
- %537 = fadd float %524, %536 ; [#uses=2]
- store float %537, float* %scevgep760.2.2, align 8
- %538 = load float* %16, align 4 ; [#uses=1]
- %539 = load float* %11, align 4 ; [#uses=1]
- %540 = load float* %6, align 4 ; [#uses=1]
- %541 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %.val398 = load float* %541, align 4 ; [#uses=3]
- %.idx399 = getelementptr %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %.idx399.val = load float* %.idx399, align 4 ; [#uses=3]
- %.idx400 = getelementptr %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %.idx400.val = load float* %.idx400, align 4 ; [#uses=3]
- %.idx402.val = load float* %R2.idx360, align 4 ; [#uses=2]
- %.val401 = load float* %R2, align 4 ; [#uses=2]
- %542 = fmul float %.idx399.val, %.idx402.val ; [#uses=1]
- %543 = fmul float %.val398, %.val401 ; [#uses=1]
- %.idx403.val = load float* %R2.idx361, align 4 ; [#uses=2]
- %544 = fmul float %.idx400.val, %.idx403.val ; [#uses=1]
- %545 = fadd float %543, %542 ; [#uses=1]
- %546 = fadd float %545, %544 ; [#uses=1]
- %547 = fcmp ogt float %546, 0.000000e+00 ; [#uses=1]
- %iftmp.148.0 = select i1 %547, float -1.000000e+00, float 1.000000e+00 ; [#uses=1]
- %548 = fmul float %52, %iftmp.148.0 ; [#uses=3]
- %549 = fmul float %548, %.val401 ; [#uses=1]
- %550 = fadd float %538, %549 ; [#uses=1]
- %551 = fmul float %548, %.idx402.val ; [#uses=1]
- %552 = fadd float %539, %551 ; [#uses=1]
- %553 = fmul float %548, %.idx403.val ; [#uses=1]
- %554 = fadd float %540, %553 ; [#uses=1]
- %.idx402.val.1 = load float* %.idx354, align 4 ; [#uses=2]
- %.val401.1 = load float* %67, align 4 ; [#uses=2]
- %555 = fmul float %.idx399.val, %.idx402.val.1 ; [#uses=1]
- %556 = fmul float %.val398, %.val401.1 ; [#uses=1]
- %.idx403.val.1 = load float* %.idx355, align 4 ; [#uses=2]
- %557 = fmul float %.idx400.val, %.idx403.val.1 ; [#uses=1]
- %558 = fadd float %556, %555 ; [#uses=1]
- %559 = fadd float %558, %557 ; [#uses=1]
- %560 = fcmp ogt float %559, 0.000000e+00 ; [#uses=1]
- %iftmp.148.0.1 = select i1 %560, float -1.000000e+00, float 1.000000e+00 ; [#uses=1]
- %561 = fmul float %56, %iftmp.148.0.1 ; [#uses=3]
- %562 = fmul float %561, %.val401.1 ; [#uses=1]
- %563 = fadd float %550, %562 ; [#uses=1]
- %564 = fmul float %561, %.idx402.val.1 ; [#uses=1]
- %565 = fadd float %552, %564 ; [#uses=1]
- %566 = fmul float %561, %.idx403.val.1 ; [#uses=1]
- %567 = fadd float %554, %566 ; [#uses=1]
- %.idx402.val.2 = load float* %.idx348, align 4 ; [#uses=2]
- %.val401.2 = load float* %73, align 4 ; [#uses=2]
- %568 = fmul float %.idx399.val, %.idx402.val.2 ; [#uses=1]
- %569 = fmul float %.val398, %.val401.2 ; [#uses=1]
- %.idx403.val.2 = load float* %.idx349, align 4 ; [#uses=2]
- %570 = fmul float %.idx400.val, %.idx403.val.2 ; [#uses=1]
- %571 = fadd float %569, %568 ; [#uses=1]
- %572 = fadd float %571, %570 ; [#uses=1]
- %573 = fcmp ogt float %572, 0.000000e+00 ; [#uses=1]
- %iftmp.148.0.2 = select i1 %573, float -1.000000e+00, float 1.000000e+00 ; [#uses=1]
- %574 = fmul float %60, %iftmp.148.0.2 ; [#uses=3]
- %scevgep741.2752 = getelementptr %struct.btQuadWord* %pb83, i32 0, i32 0, i32 0 ; [#uses=1]
- %575 = fmul float %574, %.val401.2 ; [#uses=1]
- %576 = fadd float %563, %575 ; [#uses=3]
- store float %576, float* %scevgep741.2752, align 8
- %scevgep741.1.2 = getelementptr %struct.btQuadWord* %pb83, i32 0, i32 0, i32 1 ; [#uses=1]
- %577 = fmul float %574, %.idx402.val.2 ; [#uses=1]
- %578 = fadd float %565, %577 ; [#uses=3]
- store float %578, float* %scevgep741.1.2, align 4
- %scevgep741.2.2 = getelementptr %struct.btQuadWord* %pb83, i32 0, i32 0, i32 2 ; [#uses=1]
- %579 = fmul float %574, %.idx403.val.2 ; [#uses=1]
- %580 = fadd float %567, %579 ; [#uses=3]
- store float %580, float* %scevgep741.2.2, align 8
- %581 = add nsw i32 %code.14547549, -7 ; [#uses=1]
- %582 = sdiv i32 %581, 3 ; [#uses=3]
- %scevgep735 = getelementptr float* %R1, i32 %582 ; [#uses=1]
- %scevgep736 = getelementptr %struct.btQuadWord* %ua, i32 0, i32 0, i32 0 ; [#uses=1]
- %583 = load float* %scevgep735, align 4 ; [#uses=3]
- store float %583, float* %scevgep736, align 8
- %tmp734.1 = add i32 %582, 4 ; [#uses=1]
- %scevgep735.1 = getelementptr float* %R1, i32 %tmp734.1 ; [#uses=1]
- %scevgep736.1 = getelementptr %struct.btQuadWord* %ua, i32 0, i32 0, i32 1 ; [#uses=1]
- %584 = load float* %scevgep735.1, align 4 ; [#uses=3]
- store float %584, float* %scevgep736.1, align 4
- %tmp734.2 = add i32 %582, 8 ; [#uses=1]
- %scevgep735.2 = getelementptr float* %R1, i32 %tmp734.2 ; [#uses=1]
- %scevgep736.2 = getelementptr %struct.btQuadWord* %ua, i32 0, i32 0, i32 2 ; [#uses=1]
- %585 = load float* %scevgep735.2, align 4 ; [#uses=3]
- store float %585, float* %scevgep736.2, align 8
- %586 = add nsw i32 %code.14547549, -7 ; [#uses=1]
- %587 = srem i32 %586, 3 ; [#uses=3]
- %scevgep730 = getelementptr float* %R2, i32 %587 ; [#uses=1]
- %scevgep731 = getelementptr %struct.btQuadWord* %ub, i32 0, i32 0, i32 0 ; [#uses=1]
- %588 = load float* %scevgep730, align 4 ; [#uses=4]
- store float %588, float* %scevgep731, align 8
- %tmp729.1 = add i32 %587, 4 ; [#uses=1]
- %scevgep730.1 = getelementptr float* %R2, i32 %tmp729.1 ; [#uses=1]
- %scevgep731.1 = getelementptr %struct.btQuadWord* %ub, i32 0, i32 0, i32 1 ; [#uses=1]
- %589 = load float* %scevgep730.1, align 4 ; [#uses=4]
- store float %589, float* %scevgep731.1, align 4
- %tmp729.2 = add i32 %587, 8 ; [#uses=1]
- %scevgep730.2 = getelementptr float* %R2, i32 %tmp729.2 ; [#uses=1]
- %scevgep731.2 = getelementptr %struct.btQuadWord* %ub, i32 0, i32 0, i32 2 ; [#uses=1]
- %590 = load float* %scevgep730.2, align 4 ; [#uses=4]
- store float %590, float* %scevgep731.2, align 8
- %591 = getelementptr inbounds %struct.btQuadWord* %pb83, i32 0, i32 0, i32 0 ; [#uses=1]
- %592 = fsub float %576, %533 ; [#uses=2]
- %593 = getelementptr inbounds %struct.btQuadWord* %pb83, i32 0, i32 0, i32 1 ; [#uses=1]
- %594 = fsub float %578, %535 ; [#uses=2]
- %595 = getelementptr inbounds %struct.btQuadWord* %pb83, i32 0, i32 0, i32 2 ; [#uses=1]
- %596 = fsub float %580, %537 ; [#uses=2]
- %597 = fmul float %583, %588 ; [#uses=1]
- %598 = fmul float %584, %589 ; [#uses=1]
- %599 = fadd float %597, %598 ; [#uses=1]
- %600 = fmul float %585, %590 ; [#uses=1]
- %601 = fadd float %599, %600 ; [#uses=3]
- %602 = fmul float %583, %592 ; [#uses=1]
- %603 = fmul float %584, %594 ; [#uses=1]
- %604 = fadd float %602, %603 ; [#uses=1]
- %605 = fmul float %585, %596 ; [#uses=1]
- %606 = fadd float %604, %605 ; [#uses=1]
- %607 = fmul float %588, %592 ; [#uses=1]
- %608 = fmul float %589, %594 ; [#uses=1]
- %609 = fadd float %607, %608 ; [#uses=1]
- %610 = fmul float %590, %596 ; [#uses=1]
- %611 = fadd float %609, %610 ; [#uses=1]
- %612 = fmul float %601, %601 ; [#uses=1]
- %613 = fsub float 1.000000e+00, %612 ; [#uses=2]
- %614 = fcmp ugt float %613, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %614, label %bb1.i, label %bb123
-
-bb1.i: ; preds = %bb117
- %615 = fdiv float 1.000000e+00, %613 ; [#uses=1]
- %616 = fmul float %601, %606 ; [#uses=1]
- %617 = fsub float %616, %611 ; [#uses=1]
- %618 = fmul float %617, %615 ; [#uses=1]
- br label %bb123
-
-bb123: ; preds = %bb1.i, %bb117
- %beta.0 = phi float [ %618, %bb1.i ], [ 0.000000e+00, %bb117 ] ; [#uses=3]
- %619 = fmul float %588, %beta.0 ; [#uses=1]
- %620 = fadd float %576, %619 ; [#uses=1]
- store float %620, float* %591, align 8
- %621 = fmul float %589, %beta.0 ; [#uses=1]
- %622 = fadd float %578, %621 ; [#uses=1]
- store float %622, float* %593, align 4
- %623 = fmul float %590, %beta.0 ; [#uses=1]
- %624 = fadd float %580, %623 ; [#uses=1]
- store float %624, float* %595, align 8
- %625 = getelementptr inbounds %struct.btActionInterface* %output, i32 0, i32 0 ; [#uses=1]
- %626 = load i32 (...)*** %625, align 4 ; [#uses=1]
- %627 = getelementptr inbounds i32 (...)** %626, i32 4 ; [#uses=1]
- %628 = load i32 (...)** %627, align 4 ; [#uses=1]
- %629 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %630 = load float* %629, align 4 ; [#uses=1]
- %631 = fsub float -0.000000e+00, %630 ; [#uses=1]
- %632 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %633 = load float* %632, align 4 ; [#uses=1]
- %634 = fsub float -0.000000e+00, %633 ; [#uses=1]
- %635 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %636 = load float* %635, align 4 ; [#uses=1]
- %637 = fsub float -0.000000e+00, %636 ; [#uses=1]
- %638 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %637, float* %638, align 8
- %639 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %634, float* %639, align 4
- %640 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %631, float* %640, align 8
- %641 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %641, align 4
- %642 = bitcast i32 (...)* %628 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %642(%struct.btActionInterface* %output, %struct.btQuadWord* %5, %struct.btQuadWord* %pb83, float %s.14545553)
- store i32 %code.14547549, i32* %return_code, align 4
- ret i32 1
-
-bb125: ; preds = %bb77
- %643 = icmp slt i32 %code.14547549, 4 ; [#uses=4]
- %644 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %645 = load float* %644, align 4 ; [#uses=2]
- br i1 %643, label %bb129, label %bb130
-
-bb129: ; preds = %bb125
- %646 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %647 = load float* %646, align 4 ; [#uses=1]
- %648 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %649 = load float* %648, align 4 ; [#uses=1]
- br label %bb131
-
-bb130: ; preds = %bb125
- %650 = fsub float -0.000000e+00, %645 ; [#uses=1]
- %651 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %652 = load float* %651, align 4 ; [#uses=1]
- %653 = fsub float -0.000000e+00, %652 ; [#uses=1]
- %654 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %655 = load float* %654, align 4 ; [#uses=1]
- %656 = fsub float -0.000000e+00, %655 ; [#uses=1]
- br label %bb131
-
-bb131: ; preds = %bb130, %bb129
- %Sb.0569 = phi float* [ %53, %bb129 ], [ %41, %bb130 ] ; [#uses=3]
- %Sa.0567 = phi float* [ %41, %bb129 ], [ %53, %bb130 ] ; [#uses=3]
- %p2.pn565 = phi %struct.btQuadWord* [ %p2, %bb129 ], [ %p1, %bb130 ] ; [#uses=5]
- %p1.pn563 = phi %struct.btQuadWord* [ %p1, %bb129 ], [ %p2, %bb130 ] ; [#uses=14]
- %Rb.0560 = phi float* [ %R2, %bb129 ], [ %R1, %bb130 ] ; [#uses=20]
- %Ra.0558 = phi float* [ %R1, %bb129 ], [ %R2, %bb130 ] ; [#uses=6]
- %normal2.0.0.0 = phi float [ %645, %bb129 ], [ %650, %bb130 ] ; [#uses=4]
- %normal2.0.1.0 = phi float [ %647, %bb129 ], [ %653, %bb130 ] ; [#uses=4]
- %normal2.0.2.0 = phi float [ %649, %bb129 ], [ %656, %bb130 ] ; [#uses=4]
- %657 = getelementptr inbounds %struct.btQuadWord* %nr, i32 0, i32 0, i32 0 ; [#uses=1]
- %Rb.0.val = load float* %Rb.0560, align 4 ; [#uses=1]
- %Rb.0.idx = getelementptr float* %Rb.0560, i32 4 ; [#uses=1]
- %Rb.0.idx.val = load float* %Rb.0.idx, align 4 ; [#uses=1]
- %Rb.0.idx230 = getelementptr float* %Rb.0560, i32 8 ; [#uses=1]
- %Rb.0.idx230.val = load float* %Rb.0.idx230, align 4 ; [#uses=1]
- %658 = fmul float %Rb.0.val, %normal2.0.0.0 ; [#uses=1]
- %659 = fmul float %Rb.0.idx.val, %normal2.0.1.0 ; [#uses=1]
- %660 = fadd float %658, %659 ; [#uses=1]
- %661 = fmul float %Rb.0.idx230.val, %normal2.0.2.0 ; [#uses=1]
- %662 = fadd float %660, %661 ; [#uses=2]
- store float %662, float* %657, align 8
- %663 = getelementptr inbounds float* %Rb.0560, i32 1 ; [#uses=1]
- %.val224 = load float* %663, align 4 ; [#uses=1]
- %.idx225 = getelementptr float* %Rb.0560, i32 5 ; [#uses=1]
- %.idx225.val = load float* %.idx225, align 4 ; [#uses=1]
- %.idx226 = getelementptr float* %Rb.0560, i32 9 ; [#uses=1]
- %.idx226.val = load float* %.idx226, align 4 ; [#uses=1]
- %664 = fmul float %.val224, %normal2.0.0.0 ; [#uses=1]
- %665 = fmul float %.idx225.val, %normal2.0.1.0 ; [#uses=1]
- %666 = fadd float %664, %665 ; [#uses=1]
- %667 = fmul float %.idx226.val, %normal2.0.2.0 ; [#uses=1]
- %668 = fadd float %666, %667 ; [#uses=2]
- %669 = getelementptr inbounds %struct.btQuadWord* %nr, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %668, float* %669, align 4
- %670 = getelementptr inbounds float* %Rb.0560, i32 2 ; [#uses=1]
- %.val = load float* %670, align 4 ; [#uses=1]
- %.idx = getelementptr float* %Rb.0560, i32 6 ; [#uses=1]
- %.idx.val = load float* %.idx, align 4 ; [#uses=1]
- %.idx220 = getelementptr float* %Rb.0560, i32 10 ; [#uses=1]
- %.idx220.val = load float* %.idx220, align 4 ; [#uses=1]
- %671 = fmul float %.val, %normal2.0.0.0 ; [#uses=1]
- %672 = fmul float %.idx.val, %normal2.0.1.0 ; [#uses=1]
- %673 = fadd float %671, %672 ; [#uses=1]
- %674 = fmul float %.idx220.val, %normal2.0.2.0 ; [#uses=1]
- %675 = fadd float %673, %674 ; [#uses=2]
- %676 = getelementptr inbounds %struct.btQuadWord* %nr, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %675, float* %676, align 8
- %677 = call float @fabsf(float %662) nounwind readnone ; [#uses=2]
- %678 = call float @fabsf(float %668) nounwind readnone ; [#uses=2]
- %679 = call float @fabsf(float %675) nounwind readnone ; [#uses=2]
- %680 = fcmp ogt float %678, %677 ; [#uses=1]
- br i1 %680, label %bb132, label %bb136
-
-bb132: ; preds = %bb131
- %681 = fcmp ogt float %678, %679 ; [#uses=1]
- br i1 %681, label %bb140, label %bb135
-
-bb135: ; preds = %bb132
- br label %bb140
-
-bb136: ; preds = %bb131
- %682 = fcmp ogt float %677, %679 ; [#uses=1]
- br i1 %682, label %bb140, label %bb139
-
-bb139: ; preds = %bb136
- br label %bb140
-
-bb140: ; preds = %bb139, %bb136, %bb135, %bb132
- %lanr.0 = phi i32 [ 2, %bb135 ], [ 2, %bb139 ], [ 0, %bb136 ], [ 1, %bb132 ] ; [#uses=7]
- %a1.0 = phi i32 [ 0, %bb135 ], [ 0, %bb139 ], [ 1, %bb136 ], [ 0, %bb132 ] ; [#uses=4]
- %a2.0 = phi i32 [ 1, %bb135 ], [ 1, %bb139 ], [ 2, %bb136 ], [ 2, %bb132 ] ; [#uses=4]
- %683 = getelementptr inbounds %struct.btQuadWord* %nr, i32 0, i32 0, i32 %lanr.0 ; [#uses=1]
- %684 = load float* %683, align 4 ; [#uses=1]
- %685 = fcmp olt float %684, 0.000000e+00 ; [#uses=1]
- %686 = getelementptr inbounds float* %Sb.0569, i32 %lanr.0 ; [#uses=1]
- %687 = load float* %686, align 4 ; [#uses=5]
- %scevgep718 = getelementptr %struct.btQuadWord* %p2.pn565, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep719 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep720 = getelementptr %struct.btQuadWord* %center, i32 0, i32 0, i32 0 ; [#uses=2]
- %688 = load float* %scevgep718, align 4 ; [#uses=1]
- %689 = load float* %scevgep719, align 4 ; [#uses=1]
- %690 = fsub float %688, %689 ; [#uses=2]
- %691 = getelementptr inbounds float* %Rb.0560, i32 %lanr.0 ; [#uses=1]
- %692 = load float* %691, align 4 ; [#uses=1]
- %693 = fmul float %687, %692 ; [#uses=2]
- br i1 %685, label %bb148.loopexit605, label %bb148.loopexit
-
-bb148.loopexit: ; preds = %bb140
- %694 = fsub float %690, %693 ; [#uses=2]
- store float %694, float* %scevgep720, align 8
- %scevgep.1 = getelementptr %struct.btQuadWord* %p2.pn565, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep628.1 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep629.1 = getelementptr %struct.btQuadWord* %center, i32 0, i32 0, i32 1 ; [#uses=1]
- %695 = load float* %scevgep.1, align 4 ; [#uses=1]
- %696 = load float* %scevgep628.1, align 4 ; [#uses=1]
- %697 = fsub float %695, %696 ; [#uses=1]
- %698 = or i32 %lanr.0, 4 ; [#uses=1]
- %699 = getelementptr inbounds float* %Rb.0560, i32 %698 ; [#uses=1]
- %700 = load float* %699, align 4 ; [#uses=1]
- %701 = fmul float %687, %700 ; [#uses=1]
- %702 = fsub float %697, %701 ; [#uses=2]
- store float %702, float* %scevgep629.1, align 4
- %scevgep.2 = getelementptr %struct.btQuadWord* %p2.pn565, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep628.2 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep629.2 = getelementptr %struct.btQuadWord* %center, i32 0, i32 0, i32 2 ; [#uses=1]
- %703 = load float* %scevgep.2, align 4 ; [#uses=1]
- %704 = load float* %scevgep628.2, align 4 ; [#uses=1]
- %705 = fsub float %703, %704 ; [#uses=1]
- %706 = or i32 %lanr.0, 8 ; [#uses=1]
- %707 = getelementptr inbounds float* %Rb.0560, i32 %706 ; [#uses=1]
- %708 = load float* %707, align 4 ; [#uses=1]
- %709 = fmul float %687, %708 ; [#uses=1]
- %710 = fsub float %705, %709 ; [#uses=2]
- store float %710, float* %scevgep629.2, align 8
- br label %bb148
-
-bb148.loopexit605: ; preds = %bb140
- %711 = fadd float %690, %693 ; [#uses=2]
- store float %711, float* %scevgep720, align 8
- %scevgep718.1 = getelementptr %struct.btQuadWord* %p2.pn565, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep719.1 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep720.1 = getelementptr %struct.btQuadWord* %center, i32 0, i32 0, i32 1 ; [#uses=1]
- %712 = load float* %scevgep718.1, align 4 ; [#uses=1]
- %713 = load float* %scevgep719.1, align 4 ; [#uses=1]
- %714 = fsub float %712, %713 ; [#uses=1]
- %715 = or i32 %lanr.0, 4 ; [#uses=1]
- %716 = getelementptr inbounds float* %Rb.0560, i32 %715 ; [#uses=1]
- %717 = load float* %716, align 4 ; [#uses=1]
- %718 = fmul float %687, %717 ; [#uses=1]
- %719 = fadd float %714, %718 ; [#uses=2]
- store float %719, float* %scevgep720.1, align 4
- %scevgep718.2 = getelementptr %struct.btQuadWord* %p2.pn565, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep719.2 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep720.2 = getelementptr %struct.btQuadWord* %center, i32 0, i32 0, i32 2 ; [#uses=1]
- %720 = load float* %scevgep718.2, align 4 ; [#uses=1]
- %721 = load float* %scevgep719.2, align 4 ; [#uses=1]
- %722 = fsub float %720, %721 ; [#uses=1]
- %723 = or i32 %lanr.0, 8 ; [#uses=1]
- %724 = getelementptr inbounds float* %Rb.0560, i32 %723 ; [#uses=1]
- %725 = load float* %724, align 4 ; [#uses=1]
- %726 = fmul float %687, %725 ; [#uses=1]
- %727 = fadd float %722, %726 ; [#uses=2]
- store float %727, float* %scevgep720.2, align 8
- br label %bb148
-
-bb148: ; preds = %bb148.loopexit605, %bb148.loopexit
- %.idx388.val = phi float [ %727, %bb148.loopexit605 ], [ %710, %bb148.loopexit ] ; [#uses=2]
- %.idx387.val = phi float [ %719, %bb148.loopexit605 ], [ %702, %bb148.loopexit ] ; [#uses=2]
- %.val386 = phi float [ %711, %bb148.loopexit605 ], [ %694, %bb148.loopexit ] ; [#uses=2]
- %codeN.0.v = select i1 %643, i32 -1, i32 -4 ; [#uses=1]
- %codeN.0 = add i32 %codeN.0.v, %code.14547549 ; [#uses=2]
- switch i32 %codeN.0, label %bb155 [
- i32 0, label %bb156
- i32 1, label %bb154
- ]
-
-bb154: ; preds = %bb148
- br label %bb156
-
-bb155: ; preds = %bb148
- br label %bb156
-
-bb156: ; preds = %bb155, %bb154, %bb148
- %code1.0 = phi i32 [ 0, %bb154 ], [ 0, %bb155 ], [ 1, %bb148 ] ; [#uses=4]
- %code2.0 = phi i32 [ 2, %bb154 ], [ 1, %bb155 ], [ 2, %bb148 ] ; [#uses=4]
- %728 = getelementptr inbounds float* %Ra.0558, i32 %code1.0 ; [#uses=1]
- %729 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 0 ; [#uses=1]
- %.idx393 = getelementptr %struct.btQuadWord* %center, i32 0, i32 0, i32 1 ; [#uses=1]
- %.idx394 = getelementptr %struct.btQuadWord* %center, i32 0, i32 0, i32 2 ; [#uses=1]
- %.val395 = load float* %728, align 4 ; [#uses=3]
- %.sum517 = or i32 %code1.0, 4 ; [#uses=1]
- %.idx396 = getelementptr float* %Ra.0558, i32 %.sum517 ; [#uses=1]
- %.idx396.val = load float* %.idx396, align 4 ; [#uses=3]
- %.sum518 = or i32 %code1.0, 8 ; [#uses=1]
- %.idx397 = getelementptr float* %Ra.0558, i32 %.sum518 ; [#uses=1]
- %.idx397.val = load float* %.idx397, align 4 ; [#uses=3]
- %730 = fmul float %.val386, %.val395 ; [#uses=1]
- %731 = fmul float %.idx387.val, %.idx396.val ; [#uses=1]
- %732 = fadd float %730, %731 ; [#uses=1]
- %733 = fmul float %.idx388.val, %.idx397.val ; [#uses=1]
- %734 = fadd float %732, %733 ; [#uses=3]
- %735 = getelementptr inbounds float* %Ra.0558, i32 %code2.0 ; [#uses=1]
- %.val389 = load float* %735, align 4 ; [#uses=3]
- %.sum519 = or i32 %code2.0, 4 ; [#uses=1]
- %.idx390 = getelementptr float* %Ra.0558, i32 %.sum519 ; [#uses=1]
- %.idx390.val = load float* %.idx390, align 4 ; [#uses=3]
- %.sum520 = or i32 %code2.0, 8 ; [#uses=1]
- %.idx391 = getelementptr float* %Ra.0558, i32 %.sum520 ; [#uses=1]
- %.idx391.val = load float* %.idx391, align 4 ; [#uses=3]
- %736 = fmul float %.val386, %.val389 ; [#uses=1]
- %737 = fmul float %.idx387.val, %.idx390.val ; [#uses=1]
- %738 = fadd float %736, %737 ; [#uses=1]
- %739 = fmul float %.idx388.val, %.idx391.val ; [#uses=1]
- %740 = fadd float %738, %739 ; [#uses=3]
- %741 = getelementptr inbounds float* %Rb.0560, i32 %a1.0 ; [#uses=2]
- %.val305 = load float* %741, align 4 ; [#uses=2]
- %.sum523 = or i32 %a1.0, 4 ; [#uses=1]
- %.idx306 = getelementptr float* %Rb.0560, i32 %.sum523 ; [#uses=2]
- %.idx306.val = load float* %.idx306, align 4 ; [#uses=2]
- %.sum524 = or i32 %a1.0, 8 ; [#uses=1]
- %.idx307 = getelementptr float* %Rb.0560, i32 %.sum524 ; [#uses=2]
- %.idx307.val = load float* %.idx307, align 4 ; [#uses=2]
- %742 = fmul float %.val395, %.val305 ; [#uses=1]
- %743 = fmul float %.idx396.val, %.idx306.val ; [#uses=1]
- %744 = fadd float %742, %743 ; [#uses=1]
- %745 = fmul float %.idx397.val, %.idx307.val ; [#uses=1]
- %746 = fadd float %744, %745 ; [#uses=3]
- %747 = getelementptr inbounds float* %Rb.0560, i32 %a2.0 ; [#uses=2]
- %.val299 = load float* %747, align 4 ; [#uses=2]
- %.sum527 = or i32 %a2.0, 4 ; [#uses=1]
- %.idx300 = getelementptr float* %Rb.0560, i32 %.sum527 ; [#uses=2]
- %.idx300.val = load float* %.idx300, align 4 ; [#uses=2]
- %.sum528 = or i32 %a2.0, 8 ; [#uses=1]
- %.idx301 = getelementptr float* %Rb.0560, i32 %.sum528 ; [#uses=2]
- %.idx301.val = load float* %.idx301, align 4 ; [#uses=2]
- %748 = fmul float %.val395, %.val299 ; [#uses=1]
- %749 = fmul float %.idx396.val, %.idx300.val ; [#uses=1]
- %750 = fadd float %748, %749 ; [#uses=1]
- %751 = fmul float %.idx397.val, %.idx301.val ; [#uses=1]
- %752 = fadd float %750, %751 ; [#uses=3]
- %753 = fmul float %.val389, %.val305 ; [#uses=1]
- %754 = fmul float %.idx390.val, %.idx306.val ; [#uses=1]
- %755 = fadd float %753, %754 ; [#uses=1]
- %756 = fmul float %.idx391.val, %.idx307.val ; [#uses=1]
- %757 = fadd float %755, %756 ; [#uses=3]
- %758 = fmul float %.val389, %.val299 ; [#uses=1]
- %759 = fmul float %.idx390.val, %.idx300.val ; [#uses=1]
- %760 = fadd float %758, %759 ; [#uses=1]
- %761 = fmul float %.idx391.val, %.idx301.val ; [#uses=1]
- %762 = fadd float %760, %761 ; [#uses=3]
- %763 = getelementptr inbounds float* %Sb.0569, i32 %a1.0 ; [#uses=1]
- %764 = load float* %763, align 4 ; [#uses=2]
- %765 = fmul float %764, %746 ; [#uses=2]
- %766 = fmul float %764, %757 ; [#uses=2]
- %767 = getelementptr inbounds float* %Sb.0569, i32 %a2.0 ; [#uses=1]
- %768 = load float* %767, align 4 ; [#uses=2]
- %769 = fmul float %768, %752 ; [#uses=4]
- %770 = fmul float %768, %762 ; [#uses=4]
- %771 = fsub float %734, %765 ; [#uses=2]
- %772 = fsub float %771, %769 ; [#uses=1]
- %773 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 0 ; [#uses=2]
- store float %772, float* %773, align 4
- %774 = fsub float %740, %766 ; [#uses=2]
- %775 = fsub float %774, %770 ; [#uses=1]
- %776 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 1 ; [#uses=1]
- store float %775, float* %776, align 4
- %777 = fadd float %771, %769 ; [#uses=1]
- %778 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 2 ; [#uses=1]
- store float %777, float* %778, align 4
- %779 = fadd float %774, %770 ; [#uses=1]
- %780 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 3 ; [#uses=1]
- store float %779, float* %780, align 4
- %781 = fadd float %734, %765 ; [#uses=2]
- %782 = fadd float %781, %769 ; [#uses=1]
- %783 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 4 ; [#uses=1]
- store float %782, float* %783, align 4
- %784 = fadd float %740, %766 ; [#uses=2]
- %785 = fadd float %784, %770 ; [#uses=1]
- %786 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 5 ; [#uses=1]
- store float %785, float* %786, align 4
- %787 = fsub float %781, %769 ; [#uses=1]
- %788 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 6 ; [#uses=1]
- store float %787, float* %788, align 4
- %789 = fsub float %784, %770 ; [#uses=1]
- %790 = getelementptr inbounds [8 x float]* %quad, i32 0, i32 7 ; [#uses=1]
- store float %789, float* %790, align 4
- %791 = getelementptr inbounds float* %Sa.0567, i32 %code1.0 ; [#uses=1]
- %792 = load float* %791, align 4 ; [#uses=1]
- %793 = getelementptr inbounds [2 x float]* %rect, i32 0, i32 0 ; [#uses=1]
- store float %792, float* %793, align 4
- %794 = getelementptr inbounds float* %Sa.0567, i32 %code2.0 ; [#uses=1]
- %795 = load float* %794, align 4 ; [#uses=1]
- %796 = getelementptr inbounds [2 x float]* %rect, i32 0, i32 1 ; [#uses=1]
- store float %795, float* %796, align 4
- %797 = getelementptr inbounds [16 x float]* %ret, i32 0, i32 0 ; [#uses=5]
- %798 = getelementptr inbounds [16 x float]* %buffer.i, i32 0, i32 0 ; [#uses=1]
- br label %bb21.i
-
-bb2.i: ; preds = %bb14.i
- %799 = load float* %scevgep.i, align 4 ; [#uses=2]
- %800 = fmul float %837, %799 ; [#uses=1]
- %801 = load float* %scevgep63.i, align 4 ; [#uses=2]
- %802 = fcmp olt float %800, %801 ; [#uses=1]
- br i1 %802, label %bb3.i, label %bb5.i
-
-bb3.i: ; preds = %bb2.i
- %803 = load float* %pq.0.i, align 4 ; [#uses=1]
- store float %803, float* %pr.1.i, align 4
- %804 = load float* %scevgep42.i, align 4 ; [#uses=1]
- %805 = getelementptr inbounds float* %pr.1.i, i32 1 ; [#uses=1]
- store float %804, float* %805, align 4
- %806 = add nsw i32 %nr.4.i, 1 ; [#uses=3]
- %807 = and i32 %806, 8 ; [#uses=1]
- %808 = icmp eq i32 %807, 0 ; [#uses=1]
- br i1 %808, label %bb3.i.bb5.i_crit_edge, label %done.i
-
-bb3.i.bb5.i_crit_edge: ; preds = %bb3.i
- %809 = getelementptr inbounds float* %pr.1.i, i32 2 ; [#uses=1]
- %.pre = load float* %scevgep.i, align 4 ; [#uses=1]
- %.pre792 = load float* %scevgep63.i, align 4 ; [#uses=1]
- br label %bb5.i
-
-bb5.i: ; preds = %bb3.i.bb5.i_crit_edge, %bb2.i
- %810 = phi float [ %.pre792, %bb3.i.bb5.i_crit_edge ], [ %801, %bb2.i ] ; [#uses=3]
- %811 = phi float [ %.pre, %bb3.i.bb5.i_crit_edge ], [ %799, %bb2.i ] ; [#uses=3]
- %nr.3.i = phi i32 [ %806, %bb3.i.bb5.i_crit_edge ], [ %nr.4.i, %bb2.i ] ; [#uses=2]
- %pr.0.i = phi float* [ %809, %bb3.i.bb5.i_crit_edge ], [ %pr.1.i, %bb2.i ] ; [#uses=4]
- %812 = icmp sgt i32 %i.0.i, 1 ; [#uses=1]
- %iftmp.137.0.i = select i1 %812, float* %scevgep40.i, float* %q.1.i ; [#uses=2]
- %813 = fmul float %837, %811 ; [#uses=1]
- %814 = fcmp olt float %813, %810 ; [#uses=1]
- %scevgep67.i = getelementptr float* %iftmp.137.0.i, i32 %839 ; [#uses=1]
- %815 = load float* %scevgep67.i, align 4 ; [#uses=2]
- %816 = fmul float %837, %815 ; [#uses=1]
- %817 = fcmp olt float %816, %810 ; [#uses=1]
- %818 = xor i1 %814, %817 ; [#uses=1]
- br i1 %818, label %bb11.i, label %bb13.i
-
-bb11.i: ; preds = %bb5.i
- %819 = load float* %scevgep38.i, align 4 ; [#uses=2]
- %scevgep65.i = getelementptr float* %iftmp.137.0.i, i32 %tmp706 ; [#uses=1]
- %820 = load float* %scevgep65.i, align 4 ; [#uses=1]
- %821 = fsub float %820, %819 ; [#uses=1]
- %822 = fsub float %815, %811 ; [#uses=1]
- %823 = fdiv float %821, %822 ; [#uses=1]
- %824 = fmul float %837, %810 ; [#uses=1]
- %825 = fsub float %824, %811 ; [#uses=1]
- %826 = fmul float %823, %825 ; [#uses=1]
- %827 = fadd float %819, %826 ; [#uses=1]
- %scevgep66.i = getelementptr float* %pr.0.i, i32 %tmp706 ; [#uses=1]
- store float %827, float* %scevgep66.i, align 4
- %828 = load float* %scevgep63.i, align 4 ; [#uses=1]
- %829 = fmul float %837, %828 ; [#uses=1]
- %scevgep62.i = getelementptr float* %pr.0.i, i32 %839 ; [#uses=1]
- store float %829, float* %scevgep62.i, align 4
- %830 = getelementptr inbounds float* %pr.0.i, i32 2 ; [#uses=1]
- %831 = add nsw i32 %nr.3.i, 1 ; [#uses=3]
- %832 = and i32 %831, 8 ; [#uses=1]
- %833 = icmp eq i32 %832, 0 ; [#uses=1]
- br i1 %833, label %bb13.i, label %done.i
-
-bb13.i: ; preds = %bb11.i, %bb5.i
- %nr.5.i = phi i32 [ %831, %bb11.i ], [ %nr.3.i, %bb5.i ] ; [#uses=1]
- %pr.2.i = phi float* [ %830, %bb11.i ], [ %pr.0.i, %bb5.i ] ; [#uses=1]
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=1]
- br label %bb14.i
-
-bb14.i: ; preds = %bb14.preheader.i, %bb13.i
- %indvar.i = phi i32 [ 0, %bb14.preheader.i ], [ %indvar.next.i, %bb13.i ] ; [#uses=3]
- %nr.4.i = phi i32 [ 0, %bb14.preheader.i ], [ %nr.5.i, %bb13.i ] ; [#uses=4]
- %pr.1.i = phi float* [ %r.0.i, %bb14.preheader.i ], [ %pr.2.i, %bb13.i ] ; [#uses=4]
- %tmp704 = shl i32 %indvar.i, 1 ; [#uses=5]
- %tmp707 = add i32 %tmp706, %tmp704 ; [#uses=1]
- %scevgep38.i = getelementptr float* %q.1.i, i32 %tmp707 ; [#uses=1]
- %tmp709 = add i32 %839, %tmp704 ; [#uses=1]
- %scevgep.i = getelementptr float* %q.1.i, i32 %tmp709 ; [#uses=2]
- %i.0.i = sub i32 %nq.0.i, %indvar.i ; [#uses=2]
- %tmp685776 = or i32 %tmp704, 1 ; [#uses=1]
- %scevgep42.i = getelementptr float* %q.1.i, i32 %tmp685776 ; [#uses=1]
- %tmp687 = add i32 %tmp704, 2 ; [#uses=1]
- %scevgep40.i = getelementptr float* %q.1.i, i32 %tmp687 ; [#uses=1]
- %pq.0.i = getelementptr float* %q.1.i, i32 %tmp704 ; [#uses=1]
- %834 = icmp sgt i32 %i.0.i, 0 ; [#uses=1]
- br i1 %834, label %bb2.i, label %bb15.i
-
-bb15.i: ; preds = %bb14.i
- %835 = icmp eq float* %r.0.i, %797 ; [#uses=1]
- %iftmp.138.0.i = select i1 %835, float* %798, float* %797 ; [#uses=1]
- %indvar.next50.i = add i32 %indvar49.i, 1 ; [#uses=1]
- br label %bb19.i
-
-bb19.i: ; preds = %bb21.i, %bb15.i
- %indvar49.i = phi i32 [ %indvar.next50.i, %bb15.i ], [ 0, %bb21.i ] ; [#uses=2]
- %r.0.i = phi float* [ %iftmp.138.0.i, %bb15.i ], [ %r.1.i, %bb21.i ] ; [#uses=6]
- %q.1.i = phi float* [ %r.0.i, %bb15.i ], [ %q.2.i, %bb21.i ] ; [#uses=7]
- %nr.0.i = phi i32 [ %nr.4.i, %bb15.i ], [ %nr.2.i, %bb21.i ] ; [#uses=1]
- %nq.0.i = phi i32 [ %nr.4.i, %bb15.i ], [ %nq.1.i, %bb21.i ] ; [#uses=2]
- %tmp700 = shl i32 %indvar49.i, 1 ; [#uses=1]
- %sign.0.i = add i32 %tmp700, -1 ; [#uses=2]
- %836 = icmp slt i32 %sign.0.i, 2 ; [#uses=1]
- br i1 %836, label %bb14.preheader.i, label %bb20.i
-
-bb14.preheader.i: ; preds = %bb19.i
- %837 = sitofp i32 %sign.0.i to float ; [#uses=5]
- br label %bb14.i
-
-bb20.i: ; preds = %bb19.i
- %838 = add nsw i32 %839, 1 ; [#uses=1]
- br label %bb21.i
-
-bb21.i: ; preds = %bb20.i, %bb156
- %r.1.i = phi float* [ %797, %bb156 ], [ %r.0.i, %bb20.i ] ; [#uses=1]
- %q.2.i = phi float* [ %773, %bb156 ], [ %q.1.i, %bb20.i ] ; [#uses=2]
- %nr.2.i = phi i32 [ 0, %bb156 ], [ %nr.0.i, %bb20.i ] ; [#uses=2]
- %nq.1.i = phi i32 [ 4, %bb156 ], [ %nq.0.i, %bb20.i ] ; [#uses=1]
- %839 = phi i32 [ 0, %bb156 ], [ %838, %bb20.i ] ; [#uses=7]
- %tmp706 = sub i32 1, %839 ; [#uses=3]
- %scevgep63.i = getelementptr [2 x float]* %rect, i32 0, i32 %839 ; [#uses=3]
- %840 = icmp slt i32 %839, 2 ; [#uses=1]
- br i1 %840, label %bb19.i, label %done.i
-
-done.i: ; preds = %bb21.i, %bb11.i, %bb3.i
- %q.0.i = phi float* [ %r.0.i, %bb3.i ], [ %r.0.i, %bb11.i ], [ %q.2.i, %bb21.i ] ; [#uses=2]
- %nr.1.i = phi i32 [ %831, %bb11.i ], [ %806, %bb3.i ], [ %nr.2.i, %bb21.i ] ; [#uses=3]
- %841 = icmp eq float* %q.0.i, %797 ; [#uses=1]
- br i1 %841, label %_ZL18intersectRectQuad2PfS_S_.exit, label %bb22.i
-
-bb22.i: ; preds = %done.i
- %842 = shl i32 %nr.1.i, 3 ; [#uses=1]
- %843 = bitcast [16 x float]* %ret to i8* ; [#uses=1]
- %844 = bitcast float* %q.0.i to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %843, i8* %844, i32 %842, i32 4, i1 false) nounwind
- br label %_ZL18intersectRectQuad2PfS_S_.exit
-
-_ZL18intersectRectQuad2PfS_S_.exit: ; preds = %bb22.i, %done.i
- %845 = icmp slt i32 %nr.1.i, 1 ; [#uses=1]
- br i1 %845, label %bb218, label %bb.nph595
-
-bb.nph595: ; preds = %_ZL18intersectRectQuad2PfS_S_.exit
- %846 = fmul float %746, %762 ; [#uses=1]
- %847 = fmul float %752, %757 ; [#uses=1]
- %848 = fsub float %846, %847 ; [#uses=1]
- %849 = fdiv float 1.000000e+00, %848 ; [#uses=4]
- %850 = fmul float %746, %849 ; [#uses=1]
- %851 = fmul float %752, %849 ; [#uses=1]
- %852 = fmul float %762, %849 ; [#uses=1]
- %853 = fmul float %757, %849 ; [#uses=1]
- %854 = fsub float -0.000000e+00, %853 ; [#uses=1]
- %855 = getelementptr inbounds float* %Sa.0567, i32 %codeN.0 ; [#uses=1]
- %856 = load float* %855, align 4 ; [#uses=1]
- br label %bb170
-
-bb170: ; preds = %bb172, %bb.nph595
- %cnum.1594 = phi i32 [ 0, %bb.nph595 ], [ %cnum.0, %bb172 ] ; [#uses=6]
- %j.2593 = phi i32 [ 0, %bb.nph595 ], [ %904, %bb172 ] ; [#uses=2]
- %tmp677 = shl i32 %j.2593, 1 ; [#uses=2]
- %scevgep678 = getelementptr [16 x float]* %ret, i32 0, i32 %tmp677 ; [#uses=1]
- %tmp679775 = or i32 %tmp677, 1 ; [#uses=1]
- %scevgep680 = getelementptr [16 x float]* %ret, i32 0, i32 %tmp679775 ; [#uses=1]
- %857 = load float* %scevgep678, align 4 ; [#uses=2]
- %858 = fsub float %857, %734 ; [#uses=2]
- %859 = fmul float %858, %852 ; [#uses=1]
- %860 = load float* %scevgep680, align 4 ; [#uses=2]
- %861 = fsub float %860, %740 ; [#uses=2]
- %862 = fmul float %861, %851 ; [#uses=1]
- %863 = fsub float %859, %862 ; [#uses=3]
- %864 = fmul float %858, %854 ; [#uses=1]
- %865 = fmul float %861, %850 ; [#uses=1]
- %866 = fadd float %864, %865 ; [#uses=3]
- %867 = mul nsw i32 %cnum.1594, 3 ; [#uses=3]
- %scevgep675 = getelementptr [24 x float]* %point, i32 0, i32 %867 ; [#uses=1]
- %868 = load float* %729, align 8 ; [#uses=1]
- %869 = load float* %741, align 4 ; [#uses=1]
- %870 = fmul float %869, %863 ; [#uses=1]
- %871 = fadd float %868, %870 ; [#uses=1]
- %872 = load float* %747, align 4 ; [#uses=1]
- %873 = fmul float %872, %866 ; [#uses=1]
- %874 = fadd float %871, %873 ; [#uses=1]
- store float %874, float* %scevgep675, align 4
- %tmp674.1 = add i32 %867, 1 ; [#uses=1]
- %scevgep675.1 = getelementptr [24 x float]* %point, i32 0, i32 %tmp674.1 ; [#uses=1]
- %875 = load float* %.idx393, align 4 ; [#uses=1]
- %876 = load float* %.idx306, align 4 ; [#uses=1]
- %877 = fmul float %876, %863 ; [#uses=1]
- %878 = fadd float %875, %877 ; [#uses=1]
- %879 = load float* %.idx300, align 4 ; [#uses=1]
- %880 = fmul float %879, %866 ; [#uses=1]
- %881 = fadd float %878, %880 ; [#uses=1]
- store float %881, float* %scevgep675.1, align 4
- %tmp674.2 = add i32 %867, 2 ; [#uses=1]
- %scevgep675.2 = getelementptr [24 x float]* %point, i32 0, i32 %tmp674.2 ; [#uses=1]
- %882 = load float* %.idx394, align 8 ; [#uses=1]
- %883 = load float* %.idx307, align 4 ; [#uses=1]
- %884 = fmul float %883, %863 ; [#uses=1]
- %885 = fadd float %882, %884 ; [#uses=1]
- %886 = load float* %.idx301, align 4 ; [#uses=1]
- %887 = fmul float %886, %866 ; [#uses=1]
- %888 = fadd float %885, %887 ; [#uses=1]
- store float %888, float* %scevgep675.2, align 4
- %889 = mul nsw i32 %cnum.1594, 3 ; [#uses=3]
- %890 = getelementptr inbounds [24 x float]* %point, i32 0, i32 %889 ; [#uses=1]
- %.val365 = load float* %890, align 4 ; [#uses=1]
- %.sum = add i32 %889, 1 ; [#uses=1]
- %.idx366 = getelementptr [24 x float]* %point, i32 0, i32 %.sum ; [#uses=1]
- %.idx366.val = load float* %.idx366, align 4 ; [#uses=1]
- %.sum537 = add i32 %889, 2 ; [#uses=1]
- %.idx367 = getelementptr [24 x float]* %point, i32 0, i32 %.sum537 ; [#uses=1]
- %.idx367.val = load float* %.idx367, align 4 ; [#uses=1]
- %891 = fmul float %normal2.0.0.0, %.val365 ; [#uses=1]
- %892 = fmul float %normal2.0.1.0, %.idx366.val ; [#uses=1]
- %893 = fadd float %891, %892 ; [#uses=1]
- %894 = fmul float %normal2.0.2.0, %.idx367.val ; [#uses=1]
- %895 = fadd float %893, %894 ; [#uses=1]
- %896 = fsub float %856, %895 ; [#uses=2]
- %897 = getelementptr inbounds [8 x float]* %dep, i32 0, i32 %cnum.1594 ; [#uses=1]
- store float %896, float* %897, align 4
- %898 = fcmp ult float %896, 0.000000e+00 ; [#uses=1]
- br i1 %898, label %bb172, label %bb171
-
-bb171: ; preds = %bb170
- %899 = shl i32 %cnum.1594, 1 ; [#uses=2]
- %900 = getelementptr inbounds [16 x float]* %ret, i32 0, i32 %899 ; [#uses=1]
- store float %857, float* %900, align 4
- %901 = or i32 %899, 1 ; [#uses=1]
- %902 = getelementptr inbounds [16 x float]* %ret, i32 0, i32 %901 ; [#uses=1]
- store float %860, float* %902, align 4
- %903 = add nsw i32 %cnum.1594, 1 ; [#uses=1]
- br label %bb172
-
-bb172: ; preds = %bb171, %bb170
- %cnum.0 = phi i32 [ %903, %bb171 ], [ %cnum.1594, %bb170 ] ; [#uses=13]
- %904 = add nsw i32 %j.2593, 1 ; [#uses=2]
- %exitcond676 = icmp eq i32 %904, %nr.1.i ; [#uses=1]
- br i1 %exitcond676, label %bb174, label %bb170
-
-bb174: ; preds = %bb172
- %905 = icmp slt i32 %cnum.0, 1 ; [#uses=1]
- br i1 %905, label %bb218, label %bb176
-
-bb176: ; preds = %bb174
- %906 = icmp slt i32 %cnum.0, %maxc ; [#uses=1]
- %maxc_addr.0 = select i1 %906, i32 %cnum.0, i32 %maxc ; [#uses=2]
- %907 = icmp slt i32 %maxc_addr.0, 1 ; [#uses=1]
- %maxc_addr.1 = select i1 %907, i32 1, i32 %maxc_addr.0 ; [#uses=5]
- %908 = icmp sgt i32 %cnum.0, %maxc_addr.1 ; [#uses=1]
- br i1 %908, label %bb198, label %bb181
-
-bb181: ; preds = %bb176
- %909 = getelementptr inbounds %struct.btActionInterface* %output, i32 0, i32 0 ; [#uses=2]
- %910 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=2]
- %911 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=2]
- %912 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=2]
- br i1 %643, label %bb.nph581, label %bb.nph576
-
-bb188: ; preds = %bb.nph581, %bb188
- %j.3580 = phi i32 [ 0, %bb.nph581 ], [ %934, %bb188 ] ; [#uses=3]
- %tmp648 = mul i32 %j.3580, 3 ; [#uses=3]
- %scevgep654 = getelementptr [8 x float]* %dep, i32 0, i32 %j.3580 ; [#uses=1]
- %tmp651 = add i32 %tmp648, 1 ; [#uses=1]
- %tmp649 = add i32 %tmp648, 2 ; [#uses=1]
- %scevgep646 = getelementptr [24 x float]* %point, i32 0, i32 %tmp648 ; [#uses=1]
- %scevgep646.1 = getelementptr [24 x float]* %point, i32 0, i32 %tmp651 ; [#uses=1]
- %scevgep646.2 = getelementptr [24 x float]* %point, i32 0, i32 %tmp649 ; [#uses=1]
- %scevgep643 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep644 = getelementptr %struct.btQuadWord* %pointInWorld185, i32 0, i32 0, i32 0 ; [#uses=1]
- %913 = load float* %scevgep646, align 4 ; [#uses=1]
- %914 = load float* %scevgep643, align 4 ; [#uses=1]
- %915 = fadd float %913, %914 ; [#uses=1]
- store float %915, float* %scevgep644, align 8
- %scevgep643.1 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep644.1 = getelementptr %struct.btQuadWord* %pointInWorld185, i32 0, i32 0, i32 1 ; [#uses=1]
- %916 = load float* %scevgep646.1, align 4 ; [#uses=1]
- %917 = load float* %scevgep643.1, align 4 ; [#uses=1]
- %918 = fadd float %916, %917 ; [#uses=1]
- store float %918, float* %scevgep644.1, align 4
- %scevgep643.2 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep644.2 = getelementptr %struct.btQuadWord* %pointInWorld185, i32 0, i32 0, i32 2 ; [#uses=1]
- %919 = load float* %scevgep646.2, align 4 ; [#uses=1]
- %920 = load float* %scevgep643.2, align 4 ; [#uses=1]
- %921 = fadd float %919, %920 ; [#uses=1]
- store float %921, float* %scevgep644.2, align 8
- %922 = load i32 (...)*** %909, align 4 ; [#uses=1]
- %923 = getelementptr inbounds i32 (...)** %922, i32 4 ; [#uses=1]
- %924 = load i32 (...)** %923, align 4 ; [#uses=1]
- %925 = load float* %scevgep654, align 4 ; [#uses=1]
- %926 = fsub float -0.000000e+00, %925 ; [#uses=1]
- %927 = load float* %910, align 4 ; [#uses=1]
- %928 = fsub float -0.000000e+00, %927 ; [#uses=1]
- %929 = load float* %911, align 4 ; [#uses=1]
- %930 = fsub float -0.000000e+00, %929 ; [#uses=1]
- %931 = load float* %912, align 4 ; [#uses=1]
- %932 = fsub float -0.000000e+00, %931 ; [#uses=1]
- store float %932, float* %935, align 8
- store float %930, float* %936, align 4
- store float %928, float* %937, align 8
- store float 0.000000e+00, float* %938, align 4
- %933 = bitcast i32 (...)* %924 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %933(%struct.btActionInterface* %output, %struct.btQuadWord* %4, %struct.btQuadWord* %pointInWorld185, float %926)
- %934 = add nsw i32 %j.3580, 1 ; [#uses=2]
- %exitcond647 = icmp eq i32 %934, %cnum.0 ; [#uses=1]
- br i1 %exitcond647, label %bb217, label %bb188
-
-bb.nph581: ; preds = %bb181
- %935 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %936 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %937 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 2 ; [#uses=1]
- %938 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb188
-
-bb196: ; preds = %bb.nph576, %bb196
- %j.4575 = phi i32 [ 0, %bb.nph576 ], [ %966, %bb196 ] ; [#uses=3]
- %tmp635 = mul i32 %j.4575, 3 ; [#uses=3]
- %tmp638 = add i32 %tmp635, 1 ; [#uses=1]
- %tmp636 = add i32 %tmp635, 2 ; [#uses=1]
- %scevgep641 = getelementptr [8 x float]* %dep, i32 0, i32 %j.4575 ; [#uses=1]
- %scevgep634 = getelementptr [24 x float]* %point, i32 0, i32 %tmp635 ; [#uses=1]
- %scevgep634.1 = getelementptr [24 x float]* %point, i32 0, i32 %tmp638 ; [#uses=1]
- %scevgep634.2 = getelementptr [24 x float]* %point, i32 0, i32 %tmp636 ; [#uses=1]
- %939 = load float* %scevgep641, align 4 ; [#uses=4]
- %scevgep630 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep632 = getelementptr %struct.btQuadWord* %pointInWorld193, i32 0, i32 0, i32 0 ; [#uses=1]
- %940 = load float* %scevgep634, align 4 ; [#uses=1]
- %941 = load float* %scevgep630, align 4 ; [#uses=1]
- %942 = fadd float %940, %941 ; [#uses=1]
- %943 = load float* %912, align 4 ; [#uses=2]
- %944 = fmul float %943, %939 ; [#uses=1]
- %945 = fsub float %942, %944 ; [#uses=1]
- store float %945, float* %scevgep632, align 8
- %scevgep630.1 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep632.1 = getelementptr %struct.btQuadWord* %pointInWorld193, i32 0, i32 0, i32 1 ; [#uses=1]
- %946 = load float* %scevgep634.1, align 4 ; [#uses=1]
- %947 = load float* %scevgep630.1, align 4 ; [#uses=1]
- %948 = fadd float %946, %947 ; [#uses=1]
- %949 = load float* %911, align 4 ; [#uses=2]
- %950 = fmul float %949, %939 ; [#uses=1]
- %951 = fsub float %948, %950 ; [#uses=1]
- store float %951, float* %scevgep632.1, align 4
- %scevgep630.2 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep632.2 = getelementptr %struct.btQuadWord* %pointInWorld193, i32 0, i32 0, i32 2 ; [#uses=1]
- %952 = load float* %scevgep634.2, align 4 ; [#uses=1]
- %953 = load float* %scevgep630.2, align 4 ; [#uses=1]
- %954 = fadd float %952, %953 ; [#uses=1]
- %955 = load float* %910, align 4 ; [#uses=2]
- %956 = fmul float %955, %939 ; [#uses=1]
- %957 = fsub float %954, %956 ; [#uses=1]
- store float %957, float* %scevgep632.2, align 8
- %958 = load i32 (...)*** %909, align 4 ; [#uses=1]
- %959 = getelementptr inbounds i32 (...)** %958, i32 4 ; [#uses=1]
- %960 = load i32 (...)** %959, align 4 ; [#uses=1]
- %961 = fsub float -0.000000e+00, %939 ; [#uses=1]
- %962 = fsub float -0.000000e+00, %955 ; [#uses=1]
- %963 = fsub float -0.000000e+00, %949 ; [#uses=1]
- %964 = fsub float -0.000000e+00, %943 ; [#uses=1]
- store float %964, float* %967, align 8
- store float %963, float* %968, align 4
- store float %962, float* %969, align 8
- store float 0.000000e+00, float* %970, align 4
- %965 = bitcast i32 (...)* %960 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %965(%struct.btActionInterface* %output, %struct.btQuadWord* %3, %struct.btQuadWord* %pointInWorld193, float %961)
- %966 = add nsw i32 %j.4575, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %966, %cnum.0 ; [#uses=1]
- br i1 %exitcond, label %bb217, label %bb196
-
-bb.nph576: ; preds = %bb181
- %967 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %968 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- %969 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- %970 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb196
-
-bb198: ; preds = %bb176
- %971 = icmp sgt i32 %cnum.0, 1 ; [#uses=1]
- br i1 %971, label %bb.nph590, label %bb206
-
-bb.nph590: ; preds = %bb198
- %972 = getelementptr inbounds [8 x float]* %dep, i32 0, i32 0 ; [#uses=1]
- %973 = load float* %972, align 4 ; [#uses=1]
- %tmp667 = add i32 %cnum.0, -1 ; [#uses=1]
- br label %bb202
-
-bb202: ; preds = %bb202, %bb.nph590
- %indvar = phi i32 [ 0, %bb.nph590 ], [ %i.13587, %bb202 ] ; [#uses=1]
- %maxdepth.1589 = phi float [ %973, %bb.nph590 ], [ %maxdepth.0, %bb202 ] ; [#uses=2]
- %i1.1588 = phi i32 [ 0, %bb.nph590 ], [ %i1.0, %bb202 ] ; [#uses=1]
- %i.13587 = add i32 %indvar, 1 ; [#uses=4]
- %scevgep670 = getelementptr [8 x float]* %dep, i32 0, i32 %i.13587 ; [#uses=1]
- %974 = load float* %scevgep670, align 4 ; [#uses=2]
- %975 = fcmp ogt float %974, %maxdepth.1589 ; [#uses=2]
- %i1.0 = select i1 %975, i32 %i.13587, i32 %i1.1588 ; [#uses=2]
- %maxdepth.0 = select i1 %975, float %974, float %maxdepth.1589 ; [#uses=1]
- %exitcond668 = icmp eq i32 %i.13587, %tmp667 ; [#uses=1]
- br i1 %exitcond668, label %bb206, label %bb202
-
-bb206: ; preds = %bb202, %bb198
- %i1.1.lcssa = phi i32 [ 0, %bb198 ], [ %i1.0, %bb202 ] ; [#uses=1]
- %976 = getelementptr inbounds [8 x i32]* %iret, i32 0, i32 0 ; [#uses=1]
- call void @_Z11cullPoints2iPfiiPi(i32 %cnum.0, float* %797, i32 %maxc_addr.1, i32 %i1.1.lcssa, i32* %976) nounwind
- %977 = icmp sgt i32 %maxc_addr.1, 0 ; [#uses=1]
- br i1 %977, label %bb.nph586, label %bb217
-
-bb211: ; preds = %bb.nph586, %bb214
- %j.5585 = phi i32 [ 0, %bb.nph586 ], [ %1017, %bb214 ] ; [#uses=2]
- %scevgep666 = getelementptr [8 x i32]* %iret, i32 0, i32 %j.5585 ; [#uses=1]
- %978 = load i32* %scevgep666, align 4 ; [#uses=2]
- %979 = mul nsw i32 %978, 3 ; [#uses=3]
- %scevgep656 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep658 = getelementptr [24 x float]* %point, i32 0, i32 %979 ; [#uses=1]
- %980 = load float* %scevgep658, align 4 ; [#uses=1]
- %981 = load float* %scevgep656, align 4 ; [#uses=1]
- %982 = fadd float %980, %981 ; [#uses=1]
- store float %982, float* %1028, align 8
- %scevgep656.1 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 1 ; [#uses=1]
- %tmp.1 = add i32 %979, 1 ; [#uses=1]
- %scevgep658.1 = getelementptr [24 x float]* %point, i32 0, i32 %tmp.1 ; [#uses=1]
- %983 = load float* %scevgep658.1, align 4 ; [#uses=1]
- %984 = load float* %scevgep656.1, align 4 ; [#uses=1]
- %985 = fadd float %983, %984 ; [#uses=1]
- store float %985, float* %1027, align 4
- %scevgep656.2 = getelementptr %struct.btQuadWord* %p1.pn563, i32 0, i32 0, i32 2 ; [#uses=1]
- %tmp.2 = add i32 %979, 2 ; [#uses=1]
- %scevgep658.2 = getelementptr [24 x float]* %point, i32 0, i32 %tmp.2 ; [#uses=1]
- %986 = load float* %scevgep658.2, align 4 ; [#uses=1]
- %987 = load float* %scevgep656.2, align 4 ; [#uses=1]
- %988 = fadd float %986, %987 ; [#uses=1]
- store float %988, float* %1026, align 8
- %989 = load i32 (...)*** %1018, align 4 ; [#uses=1]
- %990 = getelementptr inbounds i32 (...)** %989, i32 4 ; [#uses=1]
- %991 = load i32 (...)** %990, align 4 ; [#uses=2]
- %992 = getelementptr inbounds [8 x float]* %dep, i32 0, i32 %978 ; [#uses=1]
- %993 = load float* %992, align 4 ; [#uses=4]
- %994 = fsub float -0.000000e+00, %993 ; [#uses=2]
- %995 = load float* %1019, align 4 ; [#uses=3]
- br i1 %643, label %bb212, label %bb213
-
-bb212: ; preds = %bb211
- %996 = fsub float -0.000000e+00, %995 ; [#uses=1]
- %997 = load float* %1020, align 4 ; [#uses=1]
- %998 = fsub float -0.000000e+00, %997 ; [#uses=1]
- %999 = load float* %1021, align 4 ; [#uses=1]
- %1000 = fsub float -0.000000e+00, %999 ; [#uses=1]
- store float %1000, float* %1022, align 8
- store float %998, float* %1023, align 4
- store float %996, float* %1024, align 8
- store float 0.000000e+00, float* %1025, align 4
- %1001 = bitcast i32 (...)* %991 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %1001(%struct.btActionInterface* %output, %struct.btQuadWord* %2, %struct.btQuadWord* %posInWorld, float %994)
- br label %bb214
-
-bb213: ; preds = %bb211
- %1002 = fmul float %995, %993 ; [#uses=1]
- %1003 = load float* %1020, align 4 ; [#uses=2]
- %1004 = fmul float %1003, %993 ; [#uses=1]
- %1005 = load float* %1021, align 4 ; [#uses=2]
- %1006 = fmul float %1005, %993 ; [#uses=1]
- %1007 = load float* %1026, align 8 ; [#uses=1]
- %1008 = fsub float %1007, %1002 ; [#uses=1]
- %1009 = load float* %1027, align 4 ; [#uses=1]
- %1010 = fsub float %1009, %1004 ; [#uses=1]
- %1011 = load float* %1028, align 8 ; [#uses=1]
- %1012 = fsub float %1011, %1006 ; [#uses=1]
- store float %1012, float* %1029, align 8
- store float %1010, float* %1030, align 4
- store float %1008, float* %1031, align 8
- store float 0.000000e+00, float* %1032, align 4
- %1013 = fsub float -0.000000e+00, %995 ; [#uses=1]
- %1014 = fsub float -0.000000e+00, %1003 ; [#uses=1]
- %1015 = fsub float -0.000000e+00, %1005 ; [#uses=1]
- store float %1015, float* %1033, align 8
- store float %1014, float* %1034, align 4
- store float %1013, float* %1035, align 8
- store float 0.000000e+00, float* %1036, align 4
- %1016 = bitcast i32 (...)* %991 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %1016(%struct.btActionInterface* %output, %struct.btQuadWord* %0, %struct.btQuadWord* %1, float %994)
- br label %bb214
-
-bb214: ; preds = %bb213, %bb212
- %1017 = add nsw i32 %j.5585, 1 ; [#uses=2]
- %exitcond665 = icmp eq i32 %1017, %smax664 ; [#uses=1]
- br i1 %exitcond665, label %bb217, label %bb211
-
-bb.nph586: ; preds = %bb206
- %1018 = getelementptr inbounds %struct.btActionInterface* %output, i32 0, i32 0 ; [#uses=1]
- %1019 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %1020 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=2]
- %1021 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=2]
- %1022 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %1023 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %1024 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %1025 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- %1026 = getelementptr inbounds %struct.btQuadWord* %posInWorld, i32 0, i32 0, i32 2 ; [#uses=2]
- %1027 = getelementptr inbounds %struct.btQuadWord* %posInWorld, i32 0, i32 0, i32 1 ; [#uses=2]
- %1028 = getelementptr inbounds %struct.btQuadWord* %posInWorld, i32 0, i32 0, i32 0 ; [#uses=2]
- %1029 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %1030 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %1031 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %1032 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- %1033 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1034 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1035 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1036 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp659 = xor i32 %cnum.0, -1 ; [#uses=2]
- %tmp660 = xor i32 %maxc, -1 ; [#uses=2]
- %tmp661 = icmp sgt i32 %tmp659, %tmp660 ; [#uses=1]
- %smax = select i1 %tmp661, i32 %tmp659, i32 %tmp660 ; [#uses=1]
- %tmp662 = xor i32 %smax, -1 ; [#uses=2]
- %tmp663 = icmp sgt i32 %tmp662, 1 ; [#uses=1]
- %smax664 = select i1 %tmp663, i32 %tmp662, i32 1 ; [#uses=1]
- br label %bb211
-
-bb217: ; preds = %bb214, %bb206, %bb196, %bb188
- %cnum.2 = phi i32 [ %cnum.0, %bb196 ], [ %cnum.0, %bb188 ], [ %maxc_addr.1, %bb214 ], [ %maxc_addr.1, %bb206 ] ; [#uses=1]
- store i32 %code.14547549, i32* %return_code, align 4
- ret i32 %cnum.2
-
-bb218: ; preds = %bb174, %_ZL18intersectRectQuad2PfS_S_.exit, %bb70, %bb65, %bb60, %bb55, %bb50, %bb45, %bb40, %bb35, %bb30, %bb25, %bb21, %bb17, %bb13, %bb9, %bb5, %entry
- ret i32 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN36btDiscreteCollisionDetectorInterface6ResultD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTVN36btDiscreteCollisionDetectorInterface6ResultE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN36btDiscreteCollisionDetectorInterface6ResultD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTVN36btDiscreteCollisionDetectorInterface6ResultE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=2]
-define void @_ZN21btCollisionDispatcher27registerCollisionCreateFuncEiiP30btCollisionAlgorithmCreateFunc(%struct.btCollisionDispatcher* nocapture %this, i32 %proxyType0, i32 %proxyType1, %struct.btCollisionAlgorithmCreateFunc* %createFunc) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 7, i32 %proxyType0, i32 %proxyType1 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %createFunc, %struct.btCollisionAlgorithmCreateFunc** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btCollisionAlgorithm* @_ZN21btCollisionDispatcher13findAlgorithmEP17btCollisionObjectS1_P20btPersistentManifold(%struct.btCollisionDispatcher* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btPersistentManifold* %sharedManifold) align 2 {
-entry:
- %ci = alloca %struct.btCollisionAlgorithmConstructionInfo, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btActionInterface* %2, %struct.btActionInterface** %0, align 8
- store %struct.btPersistentManifold* %sharedManifold, %struct.btPersistentManifold** %1, align 4
- %3 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=1]
- %4 = load %struct.btCollisionShape** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCollisionShape* %4, i32 0, i32 1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=1]
- %8 = load %struct.btCollisionShape** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btCollisionShape* %8, i32 0, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 7, i32 %6, i32 %10 ; [#uses=1]
- %12 = load %struct.btCollisionAlgorithmCreateFunc** %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %12, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 2 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to %struct.btCollisionAlgorithm* (%struct.btCollisionAlgorithmCreateFunc*, %struct.btCollisionAlgorithmConstructionInfo*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %18 = call %struct.btCollisionAlgorithm* %17(%struct.btCollisionAlgorithmCreateFunc* %12, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %18
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN21btCollisionDispatcher13needsResponseEP17btCollisionObjectS1_(%struct.btCollisionDispatcher* nocapture %this, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %.lobit.i = and i32 %1, 4 ; [#uses=1]
- %toBoolnot = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb26
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 12 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %.lobit.i32 = and i32 %3, 4 ; [#uses=1]
- %toBool4not = icmp eq i32 %.lobit.i32, 0 ; [#uses=1]
- br i1 %toBool4not, label %bb15, label %bb26
-
-bb15: ; preds = %bb
- %4 = and i32 %1, 3 ; [#uses=1]
- %5 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %5, label %bb27, label %bb20
-
-bb20: ; preds = %bb15
- %6 = and i32 %3, 3 ; [#uses=1]
- %toBool21not = icmp eq i32 %6, 0 ; [#uses=1]
- %retval = zext i1 %toBool21not to i8 ; [#uses=1]
- ret i8 %retval
-
-bb26: ; preds = %bb, %entry
- ret i8 0
-
-bb27: ; preds = %bb15
- ret i8 1
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN21btCollisionDispatcher14needsCollisionEP17btCollisionObjectS1_(%struct.btCollisionDispatcher* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 15 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- switch i32 %1, label %bb15 [
- i32 2, label %bb
- i32 5, label %bb
- ]
-
-bb: ; preds = %entry, %entry
- %2 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 15 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- switch i32 %3, label %bb15 [
- i32 2, label %bb24
- i32 5, label %bb24
- ]
-
-bb15: ; preds = %bb, %entry
- %4 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 24 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp eq i32 %5, 0 ; [#uses=1]
- br i1 %6, label %_ZN17btCollisionObject16checkCollideWithEPS_.exit, label %bb.i27
-
-bb.i27: ; preds = %bb15
- %7 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to i8 (%struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %11 = tail call zeroext i8 %10(%struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) ; [#uses=1]
- %phitmp34 = icmp eq i8 %11, 0 ; [#uses=1]
- br label %_ZN17btCollisionObject16checkCollideWithEPS_.exit
-
-_ZN17btCollisionObject16checkCollideWithEPS_.exit: ; preds = %bb.i27, %bb15
- %12 = phi i1 [ %phitmp34, %bb.i27 ], [ false, %bb15 ] ; [#uses=1]
- %13 = zext i1 %12 to i8 ; [#uses=1]
- %retval = xor i8 %13, 1 ; [#uses=1]
- ret i8 %retval
-
-bb24: ; preds = %bb, %bb
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btCollisionPairCallbackD1Ev(%struct.btCollisionPairCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btCollisionPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btCollisionPairCallbackD0Ev(%struct.btCollisionPairCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionPairCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btCollisionPairCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btCollisionPairCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN23btCollisionPairCallback14processOverlapER16btBroadphasePair(%struct.btCollisionPairCallback* nocapture %this, %struct.btBroadphasePair* %pair) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionPairCallback* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btCollisionDispatcher** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCollisionDispatcher* %1, i32 0, i32 4 ; [#uses=1]
- %3 = load void (%struct.btBroadphasePair*, %struct.btCollisionDispatcher*, %struct.btDispatcherInfo*)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCollisionPairCallback* %this, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btDispatcherInfo** %4, align 4 ; [#uses=1]
- tail call void %3(%struct.btBroadphasePair* %pair, %struct.btCollisionDispatcher* %1, %struct.btDispatcherInfo* %5)
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcher25dispatchAllCollisionPairsEP22btOverlappingPairCacheRK16btDispatcherInfoP12btDispatcher(%struct.btCollisionDispatcher* %this, %struct..0btMultiSapOverlapFilterCallback* %pairCache, %struct.btDispatcherInfo* %dispatchInfo, %struct.btActionInterface* %dispatcher) align 2 {
-entry:
- %collisionCallback = alloca %struct.btCollisionPairCallback, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btCollisionPairCallback* %collisionCallback, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btCollisionPairCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct.btCollisionPairCallback* %collisionCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btDispatcherInfo* %dispatchInfo, %struct.btDispatcherInfo** %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionPairCallback* %collisionCallback, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionDispatcher* %this, %struct.btCollisionDispatcher** %2, align 8
- %3 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %pairCache, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 12 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionPairCallback* %collisionCallback, i32 0, i32 0 ; [#uses=1]
- call void %7(%struct..0btMultiSapOverlapFilterCallback* %pairCache, %struct.btActionInterface* %8, %struct.btActionInterface* %dispatcher)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK21btCollisionDispatcher15getNumManifoldsEv(%struct.btCollisionDispatcher* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btPersistentManifold** @_ZN21btCollisionDispatcher26getInternalManifoldPointerEv(%struct.btCollisionDispatcher* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %1 = load %struct.btPersistentManifold*** %0, align 4 ; [#uses=1]
- ret %struct.btPersistentManifold** %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btPersistentManifold* @_ZN21btCollisionDispatcher26getManifoldByIndexInternalEi(%struct.btCollisionDispatcher* nocapture %this, i32 %index) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %1 = load %struct.btPersistentManifold*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btPersistentManifold** %1, i32 %index ; [#uses=1]
- %3 = load %struct.btPersistentManifold** %2, align 4 ; [#uses=1]
- ret %struct.btPersistentManifold* %3
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcher22freeCollisionAlgorithmEPv(%struct.btCollisionDispatcher* nocapture %this, i8* %ptr) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load %struct.btPoolAllocator** %0, align 4 ; [#uses=5]
- %2 = icmp eq i8* %ptr, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb.i
-
-bb.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btPoolAllocator* %1, i32 0, i32 4 ; [#uses=1]
- %4 = load i8** %3, align 4 ; [#uses=2]
- %5 = icmp ugt i8* %4, %ptr ; [#uses=1]
- br i1 %5, label %bb1, label %_ZN15btPoolAllocator8validPtrEPv.exit
-
-_ZN15btPoolAllocator8validPtrEPv.exit: ; preds = %bb.i
- %6 = getelementptr inbounds %struct.btPoolAllocator* %1, i32 0, i32 1 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btPoolAllocator* %1, i32 0, i32 0 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = mul nsw i32 %9, %7 ; [#uses=1]
- %11 = getelementptr inbounds i8* %4, i32 %10 ; [#uses=1]
- %phitmp = icmp ugt i8* %11, %ptr ; [#uses=1]
- br i1 %phitmp, label %_ZN15btPoolAllocator10freeMemoryEPv.exit, label %bb1
-
-_ZN15btPoolAllocator10freeMemoryEPv.exit: ; preds = %_ZN15btPoolAllocator8validPtrEPv.exit
- %12 = bitcast i8* %ptr to i8** ; [#uses=1]
- %13 = getelementptr inbounds %struct.btPoolAllocator* %1, i32 0, i32 3 ; [#uses=2]
- %14 = load i8** %13, align 4 ; [#uses=1]
- store i8* %14, i8** %12, align 4
- store i8* %ptr, i8** %13, align 4
- %15 = getelementptr inbounds %struct.btPoolAllocator* %1, i32 0, i32 2 ; [#uses=2]
- %16 = load i32* %15, align 4 ; [#uses=1]
- %17 = add nsw i32 %16, 1 ; [#uses=1]
- store i32 %17, i32* %15, align 4
- ret void
-
-bb1: ; preds = %_ZN15btPoolAllocator8validPtrEPv.exit, %bb.i, %entry
- tail call void @_Z21btAlignedFreeInternalPv(i8* %ptr)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcher15releaseManifoldEP20btPersistentManifold(%struct.btCollisionDispatcher* %this, %struct.btPersistentManifold* %manifold) align 2 {
-entry:
- %0 = load i32* @gNumManifold, align 4 ; [#uses=1]
- %1 = add nsw i32 %0, -1 ; [#uses=1]
- store i32 %1, i32* @gNumManifold, align 4
- %2 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 5 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btCollisionDispatcher*, %struct.btPersistentManifold*)* ; [#uses=1]
- tail call void %6(%struct.btCollisionDispatcher* %this, %struct.btPersistentManifold* %manifold)
- %7 = getelementptr inbounds %struct.btPersistentManifold* %manifold, i32 0, i32 9 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 1 ; [#uses=3]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = add nsw i32 %10, -1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %13 = load %struct.btPersistentManifold*** %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btPersistentManifold** %13, i32 %8 ; [#uses=2]
- %15 = load %struct.btPersistentManifold** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btPersistentManifold** %13, i32 %11 ; [#uses=1]
- %17 = load %struct.btPersistentManifold** %16, align 4 ; [#uses=1]
- store %struct.btPersistentManifold* %17, %struct.btPersistentManifold** %14, align 4
- %18 = load %struct.btPersistentManifold*** %12, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btPersistentManifold** %18, i32 %11 ; [#uses=1]
- store %struct.btPersistentManifold* %15, %struct.btPersistentManifold** %19, align 4
- %20 = load %struct.btPersistentManifold*** %12, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btPersistentManifold** %20, i32 %8 ; [#uses=1]
- %22 = load %struct.btPersistentManifold** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btPersistentManifold* %22, i32 0, i32 9 ; [#uses=1]
- store i32 %8, i32* %23, align 4
- %24 = load i32* %9, align 4 ; [#uses=1]
- %25 = add nsw i32 %24, -1 ; [#uses=1]
- store i32 %25, i32* %9, align 4
- %26 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 6 ; [#uses=1]
- %27 = load %struct.btPoolAllocator** %26, align 4 ; [#uses=5]
- %28 = bitcast %struct.btPersistentManifold* %manifold to i8* ; [#uses=4]
- %29 = icmp eq %struct.btPersistentManifold* %manifold, null ; [#uses=1]
- br i1 %29, label %bb1, label %bb.i3
-
-bb.i3: ; preds = %entry
- %30 = getelementptr inbounds %struct.btPoolAllocator* %27, i32 0, i32 4 ; [#uses=1]
- %31 = load i8** %30, align 4 ; [#uses=2]
- %32 = icmp ugt i8* %31, %28 ; [#uses=1]
- br i1 %32, label %bb1, label %_ZN15btPoolAllocator8validPtrEPv.exit
-
-_ZN15btPoolAllocator8validPtrEPv.exit: ; preds = %bb.i3
- %33 = getelementptr inbounds %struct.btPoolAllocator* %27, i32 0, i32 1 ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btPoolAllocator* %27, i32 0, i32 0 ; [#uses=1]
- %36 = load i32* %35, align 4 ; [#uses=1]
- %37 = mul nsw i32 %36, %34 ; [#uses=1]
- %38 = getelementptr inbounds i8* %31, i32 %37 ; [#uses=1]
- %phitmp = icmp ugt i8* %38, %28 ; [#uses=1]
- br i1 %phitmp, label %_ZN15btPoolAllocator10freeMemoryEPv.exit, label %bb1
-
-_ZN15btPoolAllocator10freeMemoryEPv.exit: ; preds = %_ZN15btPoolAllocator8validPtrEPv.exit
- %39 = getelementptr inbounds %struct.btPoolAllocator* %27, i32 0, i32 3 ; [#uses=2]
- %40 = load i8** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btPersistentManifold* %manifold, i32 0, i32 0, i32 0 ; [#uses=1]
- %.c = ptrtoint i8* %40 to i32 ; [#uses=1]
- store i32 %.c, i32* %41, align 4
- store i8* %28, i8** %39, align 4
- %42 = getelementptr inbounds %struct.btPoolAllocator* %27, i32 0, i32 2 ; [#uses=2]
- %43 = load i32* %42, align 4 ; [#uses=1]
- %44 = add nsw i32 %43, 1 ; [#uses=1]
- store i32 %44, i32* %42, align 4
- ret void
-
-bb1: ; preds = %_ZN15btPoolAllocator8validPtrEPv.exit, %bb.i3, %entry
- tail call void @_Z21btAlignedFreeInternalPv(i8* %28)
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZN21btCollisionDispatcher26allocateCollisionAlgorithmEi(%struct.btCollisionDispatcher* nocapture %this, i32 %size) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load %struct.btPoolAllocator** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btPoolAllocator* %1, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, 0 ; [#uses=1]
- br i1 %4, label %bb1, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btPoolAllocator* %1, i32 0, i32 3 ; [#uses=2]
- %6 = load i8** %5, align 4 ; [#uses=2]
- %7 = bitcast i8* %6 to i8** ; [#uses=1]
- %8 = load i8** %7, align 4 ; [#uses=1]
- store i8* %8, i8** %5, align 4
- %9 = add nsw i32 %3, -1 ; [#uses=1]
- store i32 %9, i32* %2, align 4
- ret i8* %6
-
-bb1: ; preds = %entry
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %size, i32 16) ; [#uses=1]
- ret i8* %10
-}
-
-; [#uses=1]
-define %struct.btPersistentManifold* @_ZN21btCollisionDispatcher14getNewManifoldEPvS0_(%struct.btCollisionDispatcher* nocapture %this, i8* %b0, i8* %b1) align 2 {
-entry:
- %0 = alloca float, align 4 ; [#uses=2]
- %1 = alloca float, align 4 ; [#uses=2]
- %2 = load i32* @gNumManifold, align 4 ; [#uses=1]
- %3 = add nsw i32 %2, 1 ; [#uses=1]
- store i32 %3, i32* @gNumManifold, align 4
- %4 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = and i32 %5, 2 ; [#uses=1]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb2, label %bb
-
-bb: ; preds = %entry
- %8 = getelementptr inbounds i8* %b1, i32 192 ; [#uses=1]
- %9 = bitcast i8* %8 to %struct.btCollisionShape** ; [#uses=1]
- %10 = load %struct.btCollisionShape** %9, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btCollisionShape* %10, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 5 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = load float* @gContactBreakingThreshold, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %14 to float (%struct.btCollisionShape*, float)* ; [#uses=1]
- %17 = call float %16(%struct.btCollisionShape* %10, float %15) ; [#uses=2]
- store float %17, float* %1, align 4
- %18 = getelementptr inbounds i8* %b0, i32 192 ; [#uses=1]
- %19 = bitcast i8* %18 to %struct.btCollisionShape** ; [#uses=1]
- %20 = load %struct.btCollisionShape** %19, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btCollisionShape* %20, i32 0, i32 0 ; [#uses=1]
- %22 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 5 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = load float* @gContactBreakingThreshold, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %24 to float (%struct.btCollisionShape*, float)* ; [#uses=1]
- %27 = call float %26(%struct.btCollisionShape* %20, float %25) ; [#uses=2]
- store float %27, float* %0, align 4
- %28 = fcmp olt float %27, %17 ; [#uses=1]
- %iftmp.197.0.i = select i1 %28, float* %0, float* %1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %iftmp.179.0.in = phi float* [ %iftmp.197.0.i, %bb ], [ @gContactBreakingThreshold, %entry ] ; [#uses=1]
- %iftmp.179.0 = load float* %iftmp.179.0.in, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i8* %b1, i32 184 ; [#uses=1]
- %30 = bitcast i8* %29 to float* ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = getelementptr inbounds i8* %b0, i32 184 ; [#uses=1]
- %33 = bitcast i8* %32 to float* ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fcmp olt float %34, %31 ; [#uses=1]
- %36 = select i1 %35, float %34, float %31 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 6 ; [#uses=1]
- %38 = load %struct.btPoolAllocator** %37, align 4 ; [#uses=2]
- %39 = getelementptr inbounds %struct.btPoolAllocator* %38, i32 0, i32 2 ; [#uses=2]
- %40 = load i32* %39, align 4 ; [#uses=2]
- %41 = icmp eq i32 %40, 0 ; [#uses=1]
- br i1 %41, label %bb4, label %bb3
-
-bb3: ; preds = %bb2
- %42 = getelementptr inbounds %struct.btPoolAllocator* %38, i32 0, i32 3 ; [#uses=2]
- %43 = load i8** %42, align 4 ; [#uses=2]
- %44 = bitcast i8* %43 to i8** ; [#uses=1]
- %45 = load i8** %44, align 4 ; [#uses=1]
- store i8* %45, i8** %42, align 4
- %46 = add nsw i32 %40, -1 ; [#uses=1]
- store i32 %46, i32* %39, align 4
- br label %bb5
-
-bb4: ; preds = %bb2
- %47 = call i8* @_Z22btAlignedAllocInternalji(i32 1140, i32 16) ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %mem.0 = phi i8* [ %43, %bb3 ], [ %47, %bb4 ] ; [#uses=48]
- %48 = bitcast i8* %mem.0 to %struct.btPersistentManifold* ; [#uses=2]
- %49 = bitcast i8* %mem.0 to i32* ; [#uses=1]
- store i32 1, i32* %49, align 4
- %scevgep.i = getelementptr i8* %mem.0, i32 112 ; [#uses=1]
- %50 = bitcast i8* %scevgep.i to i8** ; [#uses=1]
- %scevgep6.i = getelementptr i8* %mem.0, i32 116 ; [#uses=1]
- %51 = bitcast i8* %scevgep6.i to float* ; [#uses=1]
- %52 = getelementptr i8* %mem.0, i32 120 ; [#uses=1]
- %scevgep8.i = getelementptr i8* %mem.0, i32 124 ; [#uses=1]
- %53 = bitcast i8* %scevgep8.i to float* ; [#uses=1]
- %scevgep9.i = getelementptr i8* %mem.0, i32 128 ; [#uses=1]
- %54 = bitcast i8* %scevgep9.i to float* ; [#uses=1]
- %scevgep10.i = getelementptr i8* %mem.0, i32 132 ; [#uses=1]
- %55 = bitcast i8* %scevgep10.i to float* ; [#uses=1]
- %scevgep11.i = getelementptr i8* %mem.0, i32 136 ; [#uses=1]
- %56 = bitcast i8* %scevgep11.i to float* ; [#uses=1]
- %scevgep12.i = getelementptr i8* %mem.0, i32 140 ; [#uses=1]
- %57 = bitcast i8* %scevgep12.i to float* ; [#uses=1]
- %scevgep13.i = getelementptr i8* %mem.0, i32 144 ; [#uses=1]
- %58 = bitcast i8* %scevgep13.i to float* ; [#uses=1]
- %scevgep14.i = getelementptr i8* %mem.0, i32 148 ; [#uses=1]
- %59 = bitcast i8* %scevgep14.i to i32* ; [#uses=1]
- store i8* null, i8** %50, align 4
- store float 0.000000e+00, float* %51, align 4
- store i8 0, i8* %52, align 4
- store float 0.000000e+00, float* %53, align 4
- store float 0.000000e+00, float* %54, align 4
- store float 0.000000e+00, float* %55, align 4
- store float 0.000000e+00, float* %56, align 4
- store float 0.000000e+00, float* %57, align 4
- store float 0.000000e+00, float* %58, align 4
- store i32 0, i32* %59, align 4
- %scevgep.1.i = getelementptr i8* %mem.0, i32 388 ; [#uses=1]
- %60 = bitcast i8* %scevgep.1.i to i8** ; [#uses=1]
- %scevgep6.1.i = getelementptr i8* %mem.0, i32 392 ; [#uses=1]
- %61 = bitcast i8* %scevgep6.1.i to float* ; [#uses=1]
- %62 = getelementptr i8* %mem.0, i32 396 ; [#uses=1]
- %scevgep8.1.i = getelementptr i8* %mem.0, i32 400 ; [#uses=1]
- %63 = bitcast i8* %scevgep8.1.i to float* ; [#uses=1]
- %scevgep9.1.i = getelementptr i8* %mem.0, i32 404 ; [#uses=1]
- %64 = bitcast i8* %scevgep9.1.i to float* ; [#uses=1]
- %scevgep10.1.i = getelementptr i8* %mem.0, i32 408 ; [#uses=1]
- %65 = bitcast i8* %scevgep10.1.i to float* ; [#uses=1]
- %scevgep11.1.i = getelementptr i8* %mem.0, i32 412 ; [#uses=1]
- %66 = bitcast i8* %scevgep11.1.i to float* ; [#uses=1]
- %scevgep12.1.i = getelementptr i8* %mem.0, i32 416 ; [#uses=1]
- %67 = bitcast i8* %scevgep12.1.i to float* ; [#uses=1]
- %scevgep13.1.i = getelementptr i8* %mem.0, i32 420 ; [#uses=1]
- %68 = bitcast i8* %scevgep13.1.i to float* ; [#uses=1]
- %scevgep14.1.i = getelementptr i8* %mem.0, i32 424 ; [#uses=1]
- %69 = bitcast i8* %scevgep14.1.i to i32* ; [#uses=1]
- store i8* null, i8** %60, align 4
- store float 0.000000e+00, float* %61, align 4
- store i8 0, i8* %62, align 4
- store float 0.000000e+00, float* %63, align 4
- store float 0.000000e+00, float* %64, align 4
- store float 0.000000e+00, float* %65, align 4
- store float 0.000000e+00, float* %66, align 4
- store float 0.000000e+00, float* %67, align 4
- store float 0.000000e+00, float* %68, align 4
- store i32 0, i32* %69, align 4
- %scevgep.2.i = getelementptr i8* %mem.0, i32 664 ; [#uses=1]
- %70 = bitcast i8* %scevgep.2.i to i8** ; [#uses=1]
- %scevgep6.2.i = getelementptr i8* %mem.0, i32 668 ; [#uses=1]
- %71 = bitcast i8* %scevgep6.2.i to float* ; [#uses=1]
- %72 = getelementptr i8* %mem.0, i32 672 ; [#uses=1]
- %scevgep8.2.i = getelementptr i8* %mem.0, i32 676 ; [#uses=1]
- %73 = bitcast i8* %scevgep8.2.i to float* ; [#uses=1]
- %scevgep9.2.i = getelementptr i8* %mem.0, i32 680 ; [#uses=1]
- %74 = bitcast i8* %scevgep9.2.i to float* ; [#uses=1]
- %scevgep10.2.i = getelementptr i8* %mem.0, i32 684 ; [#uses=1]
- %75 = bitcast i8* %scevgep10.2.i to float* ; [#uses=1]
- %scevgep11.2.i = getelementptr i8* %mem.0, i32 688 ; [#uses=1]
- %76 = bitcast i8* %scevgep11.2.i to float* ; [#uses=1]
- %scevgep12.2.i = getelementptr i8* %mem.0, i32 692 ; [#uses=1]
- %77 = bitcast i8* %scevgep12.2.i to float* ; [#uses=1]
- %scevgep13.2.i = getelementptr i8* %mem.0, i32 696 ; [#uses=1]
- %78 = bitcast i8* %scevgep13.2.i to float* ; [#uses=1]
- %scevgep14.2.i = getelementptr i8* %mem.0, i32 700 ; [#uses=1]
- %79 = bitcast i8* %scevgep14.2.i to i32* ; [#uses=1]
- store i8* null, i8** %70, align 4
- store float 0.000000e+00, float* %71, align 4
- store i8 0, i8* %72, align 4
- store float 0.000000e+00, float* %73, align 4
- store float 0.000000e+00, float* %74, align 4
- store float 0.000000e+00, float* %75, align 4
- store float 0.000000e+00, float* %76, align 4
- store float 0.000000e+00, float* %77, align 4
- store float 0.000000e+00, float* %78, align 4
- store i32 0, i32* %79, align 4
- %scevgep.3.i = getelementptr i8* %mem.0, i32 940 ; [#uses=1]
- %80 = bitcast i8* %scevgep.3.i to i8** ; [#uses=1]
- %scevgep6.3.i = getelementptr i8* %mem.0, i32 944 ; [#uses=1]
- %81 = bitcast i8* %scevgep6.3.i to float* ; [#uses=1]
- %82 = getelementptr i8* %mem.0, i32 948 ; [#uses=1]
- %scevgep8.3.i = getelementptr i8* %mem.0, i32 952 ; [#uses=1]
- %83 = bitcast i8* %scevgep8.3.i to float* ; [#uses=1]
- %scevgep9.3.i = getelementptr i8* %mem.0, i32 956 ; [#uses=1]
- %84 = bitcast i8* %scevgep9.3.i to float* ; [#uses=1]
- %scevgep10.3.i = getelementptr i8* %mem.0, i32 960 ; [#uses=1]
- %85 = bitcast i8* %scevgep10.3.i to float* ; [#uses=1]
- %scevgep11.3.i = getelementptr i8* %mem.0, i32 964 ; [#uses=1]
- %86 = bitcast i8* %scevgep11.3.i to float* ; [#uses=1]
- %scevgep12.3.i = getelementptr i8* %mem.0, i32 968 ; [#uses=1]
- %87 = bitcast i8* %scevgep12.3.i to float* ; [#uses=1]
- %scevgep13.3.i = getelementptr i8* %mem.0, i32 972 ; [#uses=1]
- %88 = bitcast i8* %scevgep13.3.i to float* ; [#uses=1]
- %scevgep14.3.i = getelementptr i8* %mem.0, i32 976 ; [#uses=1]
- %89 = bitcast i8* %scevgep14.3.i to i32* ; [#uses=1]
- store i8* null, i8** %80, align 4
- store float 0.000000e+00, float* %81, align 4
- store i8 0, i8* %82, align 4
- store float 0.000000e+00, float* %83, align 4
- store float 0.000000e+00, float* %84, align 4
- store float 0.000000e+00, float* %85, align 4
- store float 0.000000e+00, float* %86, align 4
- store float 0.000000e+00, float* %87, align 4
- store float 0.000000e+00, float* %88, align 4
- store i32 0, i32* %89, align 4
- %90 = getelementptr inbounds i8* %mem.0, i32 1108 ; [#uses=1]
- %91 = bitcast i8* %90 to i8** ; [#uses=1]
- store i8* %b0, i8** %91, align 4
- %92 = getelementptr inbounds i8* %mem.0, i32 1112 ; [#uses=1]
- %93 = bitcast i8* %92 to i8** ; [#uses=1]
- store i8* %b1, i8** %93, align 4
- %94 = getelementptr inbounds i8* %mem.0, i32 1116 ; [#uses=1]
- %95 = bitcast i8* %94 to i32* ; [#uses=1]
- store i32 0, i32* %95, align 4
- %96 = getelementptr inbounds i8* %mem.0, i32 1120 ; [#uses=1]
- %97 = bitcast i8* %96 to float* ; [#uses=1]
- store float %iftmp.179.0, float* %97, align 4
- %98 = getelementptr inbounds i8* %mem.0, i32 1124 ; [#uses=1]
- %99 = bitcast i8* %98 to float* ; [#uses=1]
- store float %36, float* %99, align 4
- %100 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 1 ; [#uses=6]
- %101 = load i32* %100, align 4 ; [#uses=1]
- %102 = getelementptr inbounds i8* %mem.0, i32 1136 ; [#uses=1]
- %103 = bitcast i8* %102 to i32* ; [#uses=1]
- store i32 %101, i32* %103, align 4
- %104 = load i32* %100, align 4 ; [#uses=6]
- %105 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- %106 = load i32* %105, align 4 ; [#uses=2]
- %107 = icmp eq i32 %106, %104 ; [#uses=1]
- br i1 %107, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb5
- %108 = icmp eq i32 %104, 0 ; [#uses=1]
- %109 = shl i32 %104, 1 ; [#uses=1]
- %iftmp.201.0.i.i = select i1 %108, i32 1, i32 %109 ; [#uses=4]
- %110 = icmp slt i32 %106, %iftmp.201.0.i.i ; [#uses=1]
- br i1 %110, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %111 = icmp eq i32 %iftmp.201.0.i.i, 0 ; [#uses=1]
- br i1 %111, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %112 = shl i32 %iftmp.201.0.i.i, 2 ; [#uses=1]
- %113 = call i8* @_Z22btAlignedAllocInternalji(i32 %112, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %113 to %struct.btPersistentManifold** ; [#uses=1]
- %.pre.i = load i32* %100, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %114 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %104, %bb.i.i ] ; [#uses=2]
- %115 = phi %struct.btPersistentManifold** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %116 = icmp sgt i32 %114, 0 ; [#uses=1]
- br i1 %116, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %117 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btPersistentManifold** %115, i32 %indvar.i.i.i ; [#uses=2]
- %118 = icmp eq %struct.btPersistentManifold** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %118, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %119 = load %struct.btPersistentManifold*** %117, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btPersistentManifold** %119, i32 %indvar.i.i.i ; [#uses=1]
- %120 = load %struct.btPersistentManifold** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btPersistentManifold* %120, %struct.btPersistentManifold** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %114 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %121 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %122 = load %struct.btPersistentManifold*** %121, align 4 ; [#uses=2]
- %123 = icmp eq %struct.btPersistentManifold** %122, null ; [#uses=1]
- br i1 %123, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i
- %124 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %125 = load i8* %124, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %125, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %126 = bitcast %struct.btPersistentManifold** %122 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %126)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %121, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i
- %127 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %127, align 4
- store %struct.btPersistentManifold** %115, %struct.btPersistentManifold*** %121, align 4
- store i32 %iftmp.201.0.i.i, i32* %105, align 4
- %.pre5.i = load i32* %100, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i, %bb.i, %bb5
- %128 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i ], [ %104, %bb5 ], [ %104, %bb.i ] ; [#uses=2]
- %129 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %130 = load %struct.btPersistentManifold*** %129, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btPersistentManifold** %130, i32 %128 ; [#uses=2]
- %132 = icmp eq %struct.btPersistentManifold** %131, null ; [#uses=1]
- br i1 %132, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btPersistentManifold* %48, %struct.btPersistentManifold** %131, align 4
- %.pre6.i = load i32* %100, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %133 = phi i32 [ %128, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %134 = add nsw i32 %133, 1 ; [#uses=1]
- store i32 %134, i32* %100, align 4
- ret %struct.btPersistentManifold* %48
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcher19defaultNearCallbackER16btBroadphasePairRS_RK16btDispatcherInfo(%struct.btBroadphasePair* nocapture %collisionPair, %struct.btCollisionDispatcher* %dispatcher, %struct.btDispatcherInfo* %dispatchInfo) align 2 {
-entry:
- %contactPointResult = alloca %struct.btManifoldResult, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btBroadphasePair* %collisionPair, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btBroadphaseProxy** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBroadphaseProxy* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i8** %2, align 4 ; [#uses=1]
- %4 = bitcast i8* %3 to %struct.btCollisionObject* ; [#uses=5]
- %5 = getelementptr inbounds %struct.btBroadphasePair* %collisionPair, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btBroadphaseProxy** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load i8** %7, align 4 ; [#uses=1]
- %9 = bitcast i8* %8 to %struct.btCollisionObject* ; [#uses=5]
- %10 = getelementptr inbounds %struct.btCollisionDispatcher* %dispatcher, i32 0, i32 0, i32 0 ; [#uses=2]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 6 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to i8 (%struct.btCollisionDispatcher*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %15 = call zeroext i8 %14(%struct.btCollisionDispatcher* %dispatcher, %struct.btCollisionObject* %4, %struct.btCollisionObject* %9) ; [#uses=1]
- %toBool = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %16 = getelementptr inbounds %struct.btBroadphasePair* %collisionPair, i32 0, i32 2 ; [#uses=3]
- %17 = load %struct.btCollisionAlgorithm** %16, align 4 ; [#uses=1]
- %18 = icmp eq %struct.btCollisionAlgorithm* %17, null ; [#uses=1]
- br i1 %18, label %bb2, label %bb3
-
-bb2: ; preds = %bb
- %19 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 2 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %21 to %struct.btCollisionAlgorithm* (%struct.btCollisionDispatcher*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %23 = call %struct.btCollisionAlgorithm* %22(%struct.btCollisionDispatcher* %dispatcher, %struct.btCollisionObject* %4, %struct.btCollisionObject* %9, %struct.btPersistentManifold* null) ; [#uses=2]
- store %struct.btCollisionAlgorithm* %23, %struct.btCollisionAlgorithm** %16, align 4
- %24 = icmp eq %struct.btCollisionAlgorithm* %23, null ; [#uses=1]
- br i1 %24, label %return, label %bb3
-
-bb3: ; preds = %bb2, %bb
- call void @_ZN16btManifoldResultC1EP17btCollisionObjectS1_(%struct.btManifoldResult* %contactPointResult, %struct.btCollisionObject* %4, %struct.btCollisionObject* %9)
- %25 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 2 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=1]
- %27 = icmp eq i32 %26, 1 ; [#uses=1]
- %28 = load %struct.btCollisionAlgorithm** %16, align 4 ; [#uses=3]
- %29 = getelementptr inbounds %struct.btCollisionAlgorithm* %28, i32 0, i32 0 ; [#uses=1]
- %30 = load i32 (...)*** %29, align 4 ; [#uses=2]
- br i1 %27, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %31 = getelementptr inbounds i32 (...)** %30, i32 2 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = bitcast i32 (...)* %32 to void (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- call void %33(%struct.btCollisionAlgorithm* %28, %struct.btCollisionObject* %4, %struct.btCollisionObject* %9, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %contactPointResult)
- ret void
-
-bb5: ; preds = %bb3
- %34 = getelementptr inbounds i32 (...)** %30, i32 3 ; [#uses=1]
- %35 = load i32 (...)** %34, align 4 ; [#uses=1]
- %36 = bitcast i32 (...)* %35 to float (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- %37 = call float %36(%struct.btCollisionAlgorithm* %28, %struct.btCollisionObject* %4, %struct.btCollisionObject* %9, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %contactPointResult) ; [#uses=2]
- %38 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 3 ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fcmp ogt float %39, %37 ; [#uses=1]
- br i1 %40, label %bb6, label %return
-
-bb6: ; preds = %bb5
- store float %37, float* %38, align 4
- ret void
-
-return: ; preds = %bb5, %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcher13clearManifoldEP20btPersistentManifold(%struct.btCollisionDispatcher* nocapture %this, %struct.btPersistentManifold* %manifold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPersistentManifold* %manifold, i32 0, i32 4 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.i, label %_ZN20btPersistentManifold13clearManifoldEv.exit
-
-bb.i: ; preds = %bb.i, %entry
- %i.03.i = phi i32 [ %tmp, %bb.i ], [ 0, %entry ] ; [#uses=2]
- %tmp = add i32 %i.03.i, 1 ; [#uses=2]
- %scevgep.i = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %i.03.i ; [#uses=1]
- tail call void @_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint(%struct.btPersistentManifold* %manifold, %struct.btManifoldPoint* %scevgep.i)
- %3 = load i32* %0, align 4 ; [#uses=1]
- %4 = icmp sgt i32 %3, %tmp ; [#uses=1]
- br i1 %4, label %bb.i, label %_ZN20btPersistentManifold13clearManifoldEv.exit
-
-_ZN20btPersistentManifold13clearManifoldEv.exit: ; preds = %bb.i, %entry
- store i32 0, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcherD0Ev(%struct.btCollisionDispatcher* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btCollisionDispatcher, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %3 = load %struct.btPersistentManifold*** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.btPersistentManifold** %3, null ; [#uses=1]
- br i1 %4, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %6, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %7 = bitcast %struct.btPersistentManifold** %3 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %7)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %8 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %8, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- %9 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* %11)
- %12 = bitcast %struct.btCollisionDispatcher* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %12) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %13 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* %13)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcherD1Ev(%struct.btCollisionDispatcher* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btCollisionDispatcher, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %3 = load %struct.btPersistentManifold*** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.btPersistentManifold** %3, null ; [#uses=1]
- br i1 %4, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %6, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %7 = bitcast %struct.btPersistentManifold** %3 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %7)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %8 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %8, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- %9 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* %11)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN21btCollisionDispatcherD2Ev(%struct.btCollisionDispatcher* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btCollisionDispatcher, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %3 = load %struct.btPersistentManifold*** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.btPersistentManifold** %3, null ; [#uses=1]
- br i1 %4, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %6, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %7 = bitcast %struct.btPersistentManifold** %3 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %7)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %8 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %8, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- %9 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* %11)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN21btCollisionDispatcherC2EP24btCollisionConfiguration(%struct.btCollisionDispatcher* %this, %struct.btActionInterface* %collisionConfiguration) align 2 {
-invcont:
- %0 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([16 x i32 (...)*]* @_ZTV21btCollisionDispatcher, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 4 ; [#uses=3]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 3 ; [#uses=4]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %3, align 4
- %4 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 1 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %6, align 4
- %7 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 8 ; [#uses=2]
- store %struct.btActionInterface* %collisionConfiguration, %struct.btActionInterface** %7, align 4
- %8 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 4 ; [#uses=1]
- store void (%struct.btBroadphasePair*, %struct.btCollisionDispatcher*, %struct.btDispatcherInfo*)* @_ZN21btCollisionDispatcher19defaultNearCallbackER16btBroadphasePairRS_RK16btDispatcherInfo, void (%struct.btBroadphasePair*, %struct.btCollisionDispatcher*, %struct.btDispatcherInfo*)** %8, align 4
- %9 = getelementptr inbounds %struct.btActionInterface* %collisionConfiguration, i32 0, i32 0 ; [#uses=2]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 3 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to %struct.btPoolAllocator* (%struct.btActionInterface*)* ; [#uses=1]
- %14 = invoke %struct.btPoolAllocator* %13(%struct.btActionInterface* %collisionConfiguration)
- to label %invcont1 unwind label %lpad22 ; [#uses=1]
-
-invcont1: ; preds = %invcont
- %15 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btPoolAllocator* %14, %struct.btPoolAllocator** %15, align 4
- %16 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 2 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to %struct.btPoolAllocator* (%struct.btActionInterface*)* ; [#uses=1]
- %20 = invoke %struct.btPoolAllocator* %19(%struct.btActionInterface* %collisionConfiguration)
- to label %invcont2 unwind label %lpad22 ; [#uses=1]
-
-invcont2: ; preds = %invcont1
- %21 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btPoolAllocator* %20, %struct.btPoolAllocator** %21, align 4
- br label %bb7
-
-bb3: ; preds = %bb5
- %22 = load %struct.btActionInterface** %7, align 4 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btActionInterface* %22, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 5 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = bitcast i32 (...)* %26 to %struct.btCollisionAlgorithmCreateFunc* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %28 = invoke %struct.btCollisionAlgorithmCreateFunc* %27(%struct.btActionInterface* %22, i32 %33, i32 %30)
- to label %invcont4 unwind label %lpad22 ; [#uses=1]
-
-invcont4: ; preds = %bb3
- store %struct.btCollisionAlgorithmCreateFunc* %28, %struct.btCollisionAlgorithmCreateFunc** %scevgep, align 4
- %29 = add nsw i32 %30, 1 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb7, %invcont4
- %30 = phi i32 [ %29, %invcont4 ], [ 0, %bb7 ] ; [#uses=4]
- %scevgep = getelementptr %struct.btCollisionDispatcher* %this, i32 0, i32 7, i32 %33, i32 %30 ; [#uses=1]
- %31 = icmp slt i32 %30, 36 ; [#uses=1]
- br i1 %31, label %bb3, label %bb6
-
-bb6: ; preds = %bb5
- %32 = add nsw i32 %33, 1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %invcont2
- %33 = phi i32 [ 0, %invcont2 ], [ %32, %bb6 ] ; [#uses=4]
- %34 = icmp slt i32 %33, 36 ; [#uses=1]
- br i1 %34, label %bb5, label %return
-
-invcont17: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr23)
- unreachable
-
-return: ; preds = %bb7
- ret void
-
-lpad22: ; preds = %bb3, %invcont1, %invcont
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %6, align 4
- %35 = load %struct.btPersistentManifold*** %3, align 4 ; [#uses=2]
- %36 = icmp eq %struct.btPersistentManifold** %35, null ; [#uses=1]
- br i1 %36, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad22
- %37 = load i8* %2, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %37, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %38 = bitcast %struct.btPersistentManifold** %35 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %38)
- to label %bb2.i.i.i unwind label %lpad26
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %3, align 4
- br label %ppad
-
-lpad26: ; preds = %bb1.i.i.i
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad30: ; preds = %ppad
- %eh_ptr31 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select33 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr31, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad22
- store i8 1, i8* %2, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %3, align 4
- store i32 0, i32* %4, align 4
- store i32 0, i32* %5, align 4
- %39 = getelementptr inbounds %struct.btCollisionDispatcher* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btDispatcherD2Ev(%struct.btActionInterface* %39)
- to label %invcont17 unwind label %lpad30
-}
-
-; [#uses=2]
-define void @_ZN21btCollisionDispatcherC1EP24btCollisionConfiguration(%struct.btCollisionDispatcher* %this, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- tail call void @_ZN21btCollisionDispatcherC2EP24btCollisionConfiguration(%struct.btCollisionDispatcher* %this, %struct.btActionInterface* %collisionConfiguration)
- ret void
-}
-
-; [#uses=5]
-define void @_ZN17btCollisionObjectC2Ev(%struct.btCollisionObject* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV17btCollisionObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 8 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %7, align 4
- %8 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 9 ; [#uses=1]
- store %struct.btCollisionShape* null, %struct.btCollisionShape** %8, align 4
- %9 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 10 ; [#uses=1]
- store i8* null, i8** %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 11 ; [#uses=1]
- store %struct.btCollisionShape* null, %struct.btCollisionShape** %10, align 4
- %11 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 12 ; [#uses=1]
- store i32 1, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 13 ; [#uses=1]
- store i32 -1, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 14 ; [#uses=1]
- store i32 -1, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 15 ; [#uses=1]
- store i32 1, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 17 ; [#uses=1]
- store float 5.000000e-01, float* %16, align 4
- %17 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 18 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 19 ; [#uses=1]
- store i32 1, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 20 ; [#uses=1]
- store i8* null, i8** %19, align 4
- %20 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 21 ; [#uses=1]
- store float 1.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 22 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 23 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 24 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- %39 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN17btCollisionObject24checkCollideWithOverrideEPS_(%struct.btCollisionObject* nocapture %this, %struct.btCollisionObject* nocapture %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret i8 1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btCollisionObject17setCollisionShapeEP16btCollisionShape(%struct.btCollisionObject* nocapture %this, %struct.btCollisionShape* %collisionShape) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 9 ; [#uses=1]
- store %struct.btCollisionShape* %collisionShape, %struct.btCollisionShape** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 11 ; [#uses=1]
- store %struct.btCollisionShape* %collisionShape, %struct.btCollisionShape** %1, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK17btCollisionObject28calculateSerializeBufferSizeEv(%struct.btCollisionObject* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 248
-}
-
-; [#uses=1]
-define void @_ZN17btCollisionObjectD1Ev(%struct.btCollisionObject* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV17btCollisionObject, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btCollisionObjectD0Ev(%struct.btCollisionObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV17btCollisionObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btCollisionObject* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %1)
- ret void
-}
-
-; [#uses=2]
-define i8* @_ZNK17btCollisionObject9serializeEPvP12btSerializer(%struct.btCollisionObject* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds i8* %dataBuffer, i32 16 ; [#uses=1]
- %scevgep.i.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i = bitcast i8* %0 to float* ; [#uses=1]
- %scevgep.1.i.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %1 = bitcast i8* %scevgep4.1.i.i.i to float* ; [#uses=1]
- %scevgep.2.i.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %2 = bitcast i8* %scevgep4.2.i.i.i to float* ; [#uses=1]
- %scevgep.3.i.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i = getelementptr i8* %dataBuffer, i32 28 ; [#uses=1]
- %3 = bitcast i8* %scevgep4.3.i.i.i to float* ; [#uses=1]
- %4 = load float* %scevgep.i.i.i, align 4 ; [#uses=1]
- store float %4, float* %scevgep4.i.i.i, align 4
- %5 = load float* %scevgep.1.i.i.i, align 4 ; [#uses=1]
- store float %5, float* %1, align 4
- %6 = load float* %scevgep.2.i.i.i, align 4 ; [#uses=1]
- store float %6, float* %2, align 4
- %7 = load float* %scevgep.3.i.i.i, align 4 ; [#uses=1]
- store float %7, float* %3, align 4
- %scevgep.i.1.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i = getelementptr i8* %dataBuffer, i32 32 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.i.1.i.i to float* ; [#uses=1]
- %scevgep.1.i.1.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %9 = bitcast i8* %scevgep4.1.i.1.i.i to float* ; [#uses=1]
- %scevgep.2.i.1.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %10 = bitcast i8* %scevgep4.2.i.1.i.i to float* ; [#uses=1]
- %scevgep.3.i.1.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i = getelementptr i8* %dataBuffer, i32 44 ; [#uses=1]
- %11 = bitcast i8* %scevgep4.3.i.1.i.i to float* ; [#uses=1]
- %12 = load float* %scevgep.i.1.i.i, align 4 ; [#uses=1]
- store float %12, float* %8, align 4
- %13 = load float* %scevgep.1.i.1.i.i, align 4 ; [#uses=1]
- store float %13, float* %9, align 4
- %14 = load float* %scevgep.2.i.1.i.i, align 4 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = load float* %scevgep.3.i.1.i.i, align 4 ; [#uses=1]
- store float %15, float* %11, align 4
- %scevgep.i.2.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i = getelementptr i8* %dataBuffer, i32 48 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.i.2.i.i to float* ; [#uses=1]
- %scevgep.1.i.2.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i = getelementptr i8* %dataBuffer, i32 52 ; [#uses=1]
- %17 = bitcast i8* %scevgep4.1.i.2.i.i to float* ; [#uses=1]
- %scevgep.2.i.2.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i = getelementptr i8* %dataBuffer, i32 56 ; [#uses=1]
- %18 = bitcast i8* %scevgep4.2.i.2.i.i to float* ; [#uses=1]
- %scevgep.3.i.2.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i = getelementptr i8* %dataBuffer, i32 60 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.3.i.2.i.i to float* ; [#uses=1]
- %20 = load float* %scevgep.i.2.i.i, align 4 ; [#uses=1]
- store float %20, float* %16, align 4
- %21 = load float* %scevgep.1.i.2.i.i, align 4 ; [#uses=1]
- store float %21, float* %17, align 4
- %22 = load float* %scevgep.2.i.2.i.i, align 4 ; [#uses=1]
- store float %22, float* %18, align 4
- %23 = load float* %scevgep.3.i.2.i.i, align 4 ; [#uses=1]
- store float %23, float* %19, align 4
- %scevgep.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = getelementptr i8* %dataBuffer, i32 64 ; [#uses=1]
- %24 = bitcast i8* %scevgep4.i.i to float* ; [#uses=1]
- %25 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %25, float* %24, align 4
- %scevgep.1.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 68 ; [#uses=1]
- %26 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %27 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %27, float* %26, align 4
- %scevgep.2.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 72 ; [#uses=1]
- %28 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %29 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %29, float* %28, align 4
- %scevgep.3.i.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 76 ; [#uses=1]
- %30 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %31 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %31, float* %30, align 4
- %32 = getelementptr inbounds i8* %dataBuffer, i32 80 ; [#uses=1]
- %scevgep.i.i.i3 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i4 = bitcast i8* %32 to float* ; [#uses=1]
- %scevgep.1.i.i.i5 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i6 = getelementptr i8* %dataBuffer, i32 84 ; [#uses=1]
- %33 = bitcast i8* %scevgep4.1.i.i.i6 to float* ; [#uses=1]
- %scevgep.2.i.i.i7 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i8 = getelementptr i8* %dataBuffer, i32 88 ; [#uses=1]
- %34 = bitcast i8* %scevgep4.2.i.i.i8 to float* ; [#uses=1]
- %scevgep.3.i.i.i9 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i10 = getelementptr i8* %dataBuffer, i32 92 ; [#uses=1]
- %35 = bitcast i8* %scevgep4.3.i.i.i10 to float* ; [#uses=1]
- %36 = load float* %scevgep.i.i.i3, align 4 ; [#uses=1]
- store float %36, float* %scevgep4.i.i.i4, align 4
- %37 = load float* %scevgep.1.i.i.i5, align 4 ; [#uses=1]
- store float %37, float* %33, align 4
- %38 = load float* %scevgep.2.i.i.i7, align 4 ; [#uses=1]
- store float %38, float* %34, align 4
- %39 = load float* %scevgep.3.i.i.i9, align 4 ; [#uses=1]
- store float %39, float* %35, align 4
- %scevgep.i.1.i.i11 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i12 = getelementptr i8* %dataBuffer, i32 96 ; [#uses=1]
- %40 = bitcast i8* %scevgep4.i.1.i.i12 to float* ; [#uses=1]
- %scevgep.1.i.1.i.i13 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i14 = getelementptr i8* %dataBuffer, i32 100 ; [#uses=1]
- %41 = bitcast i8* %scevgep4.1.i.1.i.i14 to float* ; [#uses=1]
- %scevgep.2.i.1.i.i15 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i16 = getelementptr i8* %dataBuffer, i32 104 ; [#uses=1]
- %42 = bitcast i8* %scevgep4.2.i.1.i.i16 to float* ; [#uses=1]
- %scevgep.3.i.1.i.i17 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i18 = getelementptr i8* %dataBuffer, i32 108 ; [#uses=1]
- %43 = bitcast i8* %scevgep4.3.i.1.i.i18 to float* ; [#uses=1]
- %44 = load float* %scevgep.i.1.i.i11, align 4 ; [#uses=1]
- store float %44, float* %40, align 4
- %45 = load float* %scevgep.1.i.1.i.i13, align 4 ; [#uses=1]
- store float %45, float* %41, align 4
- %46 = load float* %scevgep.2.i.1.i.i15, align 4 ; [#uses=1]
- store float %46, float* %42, align 4
- %47 = load float* %scevgep.3.i.1.i.i17, align 4 ; [#uses=1]
- store float %47, float* %43, align 4
- %scevgep.i.2.i.i19 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i20 = getelementptr i8* %dataBuffer, i32 112 ; [#uses=1]
- %48 = bitcast i8* %scevgep4.i.2.i.i20 to float* ; [#uses=1]
- %scevgep.1.i.2.i.i21 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i22 = getelementptr i8* %dataBuffer, i32 116 ; [#uses=1]
- %49 = bitcast i8* %scevgep4.1.i.2.i.i22 to float* ; [#uses=1]
- %scevgep.2.i.2.i.i23 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i24 = getelementptr i8* %dataBuffer, i32 120 ; [#uses=1]
- %50 = bitcast i8* %scevgep4.2.i.2.i.i24 to float* ; [#uses=1]
- %scevgep.3.i.2.i.i25 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i26 = getelementptr i8* %dataBuffer, i32 124 ; [#uses=1]
- %51 = bitcast i8* %scevgep4.3.i.2.i.i26 to float* ; [#uses=1]
- %52 = load float* %scevgep.i.2.i.i19, align 4 ; [#uses=1]
- store float %52, float* %48, align 4
- %53 = load float* %scevgep.1.i.2.i.i21, align 4 ; [#uses=1]
- store float %53, float* %49, align 4
- %54 = load float* %scevgep.2.i.2.i.i23, align 4 ; [#uses=1]
- store float %54, float* %50, align 4
- %55 = load float* %scevgep.3.i.2.i.i25, align 4 ; [#uses=1]
- store float %55, float* %51, align 4
- %scevgep.i.i27 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i28 = getelementptr i8* %dataBuffer, i32 128 ; [#uses=1]
- %56 = bitcast i8* %scevgep4.i.i28 to float* ; [#uses=1]
- %57 = load float* %scevgep.i.i27, align 4 ; [#uses=1]
- store float %57, float* %56, align 4
- %scevgep.1.i.i29 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i30 = getelementptr i8* %dataBuffer, i32 132 ; [#uses=1]
- %58 = bitcast i8* %scevgep4.1.i.i30 to float* ; [#uses=1]
- %59 = load float* %scevgep.1.i.i29, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %scevgep.2.i.i31 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i32 = getelementptr i8* %dataBuffer, i32 136 ; [#uses=1]
- %60 = bitcast i8* %scevgep4.2.i.i32 to float* ; [#uses=1]
- %61 = load float* %scevgep.2.i.i31, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %scevgep.3.i.i33 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i34 = getelementptr i8* %dataBuffer, i32 140 ; [#uses=1]
- %62 = bitcast i8* %scevgep4.3.i.i34 to float* ; [#uses=1]
- %63 = load float* %scevgep.3.i.i33, align 4 ; [#uses=1]
- store float %63, float* %62, align 4
- %64 = getelementptr inbounds i8* %dataBuffer, i32 144 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %64 to float* ; [#uses=1]
- %65 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %65, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 148 ; [#uses=1]
- %66 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %67 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %67, float* %66, align 4
- %scevgep.2.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 152 ; [#uses=1]
- %68 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %69 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %69, float* %68, align 4
- %scevgep.3.i = getelementptr %struct.btCollisionObject* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 156 ; [#uses=1]
- %70 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %71 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %71, float* %70, align 4
- %72 = getelementptr inbounds i8* %dataBuffer, i32 160 ; [#uses=1]
- %scevgep.i35 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i36 = bitcast i8* %72 to float* ; [#uses=1]
- %73 = load float* %scevgep.i35, align 4 ; [#uses=1]
- store float %73, float* %scevgep4.i36, align 4
- %scevgep.1.i37 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i38 = getelementptr i8* %dataBuffer, i32 164 ; [#uses=1]
- %74 = bitcast i8* %scevgep4.1.i38 to float* ; [#uses=1]
- %75 = load float* %scevgep.1.i37, align 4 ; [#uses=1]
- store float %75, float* %74, align 4
- %scevgep.2.i39 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i40 = getelementptr i8* %dataBuffer, i32 168 ; [#uses=1]
- %76 = bitcast i8* %scevgep4.2.i40 to float* ; [#uses=1]
- %77 = load float* %scevgep.2.i39, align 4 ; [#uses=1]
- store float %77, float* %76, align 4
- %scevgep.3.i41 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i42 = getelementptr i8* %dataBuffer, i32 172 ; [#uses=1]
- %78 = bitcast i8* %scevgep4.3.i42 to float* ; [#uses=1]
- %79 = load float* %scevgep.3.i41, align 4 ; [#uses=1]
- store float %79, float* %78, align 4
- %80 = getelementptr inbounds i8* %dataBuffer, i32 176 ; [#uses=1]
- %scevgep.i43 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i44 = bitcast i8* %80 to float* ; [#uses=1]
- %81 = load float* %scevgep.i43, align 4 ; [#uses=1]
- store float %81, float* %scevgep4.i44, align 4
- %scevgep.1.i45 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i46 = getelementptr i8* %dataBuffer, i32 180 ; [#uses=1]
- %82 = bitcast i8* %scevgep4.1.i46 to float* ; [#uses=1]
- %83 = load float* %scevgep.1.i45, align 4 ; [#uses=1]
- store float %83, float* %82, align 4
- %scevgep.2.i47 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i48 = getelementptr i8* %dataBuffer, i32 184 ; [#uses=1]
- %84 = bitcast i8* %scevgep4.2.i48 to float* ; [#uses=1]
- %85 = load float* %scevgep.2.i47, align 4 ; [#uses=1]
- store float %85, float* %84, align 4
- %scevgep.3.i49 = getelementptr %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i50 = getelementptr i8* %dataBuffer, i32 188 ; [#uses=1]
- %86 = bitcast i8* %scevgep4.3.i50 to float* ; [#uses=1]
- %87 = load float* %scevgep.3.i49, align 4 ; [#uses=1]
- store float %87, float* %86, align 4
- %88 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 6 ; [#uses=1]
- %89 = load i32* %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds i8* %dataBuffer, i32 220 ; [#uses=1]
- %91 = bitcast i8* %90 to i32* ; [#uses=1]
- store i32 %89, i32* %91, align 4
- %92 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 7 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = getelementptr inbounds i8* %dataBuffer, i32 192 ; [#uses=1]
- %95 = bitcast i8* %94 to float* ; [#uses=1]
- store float %93, float* %95, align 4
- %96 = bitcast i8* %dataBuffer to i8** ; [#uses=1]
- store i8* null, i8** %96, align 4
- %97 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=4]
- %98 = load i32 (...)*** %97, align 4 ; [#uses=1]
- %99 = getelementptr inbounds i32 (...)** %98, i32 7 ; [#uses=1]
- %100 = load i32 (...)** %99, align 4 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 9 ; [#uses=1]
- %102 = load %struct.btCollisionShape** %101, align 4 ; [#uses=1]
- %103 = bitcast i32 (...)* %100 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %104 = bitcast %struct.btCollisionShape* %102 to i8* ; [#uses=1]
- %105 = tail call i8* %103(%struct.btActionInterface* %serializer, i8* %104) ; [#uses=1]
- %106 = getelementptr inbounds i8* %dataBuffer, i32 4 ; [#uses=1]
- %107 = bitcast i8* %106 to i8** ; [#uses=1]
- store i8* %105, i8** %107, align 4
- %108 = getelementptr inbounds i8* %dataBuffer, i32 8 ; [#uses=1]
- %109 = bitcast i8* %108 to %struct.btCollisionShapeData** ; [#uses=1]
- store %struct.btCollisionShapeData* null, %struct.btCollisionShapeData** %109, align 4
- %110 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 12 ; [#uses=1]
- %111 = load i32* %110, align 4 ; [#uses=1]
- %112 = getelementptr inbounds i8* %dataBuffer, i32 224 ; [#uses=1]
- %113 = bitcast i8* %112 to i32* ; [#uses=1]
- store i32 %111, i32* %113, align 4
- %114 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 13 ; [#uses=1]
- %115 = load i32* %114, align 4 ; [#uses=1]
- %116 = getelementptr inbounds i8* %dataBuffer, i32 228 ; [#uses=1]
- %117 = bitcast i8* %116 to i32* ; [#uses=1]
- store i32 %115, i32* %117, align 4
- %118 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 14 ; [#uses=1]
- %119 = load i32* %118, align 4 ; [#uses=1]
- %120 = getelementptr inbounds i8* %dataBuffer, i32 232 ; [#uses=1]
- %121 = bitcast i8* %120 to i32* ; [#uses=1]
- store i32 %119, i32* %121, align 4
- %122 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 15 ; [#uses=2]
- %123 = load i32* %122, align 4 ; [#uses=1]
- %124 = getelementptr inbounds i8* %dataBuffer, i32 236 ; [#uses=1]
- %125 = bitcast i8* %124 to i32* ; [#uses=2]
- store i32 %123, i32* %125, align 4
- %126 = load i32* %122, align 4 ; [#uses=1]
- store i32 %126, i32* %125, align 4
- %127 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 16 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=1]
- %129 = getelementptr inbounds i8* %dataBuffer, i32 196 ; [#uses=1]
- %130 = bitcast i8* %129 to float* ; [#uses=1]
- store float %128, float* %130, align 4
- %131 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 17 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = getelementptr inbounds i8* %dataBuffer, i32 200 ; [#uses=1]
- %134 = bitcast i8* %133 to float* ; [#uses=1]
- store float %132, float* %134, align 4
- %135 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 18 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- %137 = getelementptr inbounds i8* %dataBuffer, i32 204 ; [#uses=1]
- %138 = bitcast i8* %137 to float* ; [#uses=1]
- store float %136, float* %138, align 4
- %139 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 19 ; [#uses=1]
- %140 = load i32* %139, align 4 ; [#uses=1]
- %141 = getelementptr inbounds i8* %dataBuffer, i32 240 ; [#uses=1]
- %142 = bitcast i8* %141 to i32* ; [#uses=1]
- store i32 %140, i32* %142, align 4
- %143 = load i32 (...)*** %97, align 4 ; [#uses=1]
- %144 = getelementptr inbounds i32 (...)** %143, i32 10 ; [#uses=1]
- %145 = load i32 (...)** %144, align 4 ; [#uses=1]
- %146 = bitcast i32 (...)* %145 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %147 = bitcast %struct.btCollisionObject* %this to i8* ; [#uses=1]
- %148 = tail call i8* %146(%struct.btActionInterface* %serializer, i8* %147) ; [#uses=2]
- %149 = load i32 (...)*** %97, align 4 ; [#uses=1]
- %150 = getelementptr inbounds i32 (...)** %149, i32 7 ; [#uses=1]
- %151 = load i32 (...)** %150, align 4 ; [#uses=1]
- %152 = bitcast i32 (...)* %151 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %153 = tail call i8* %152(%struct.btActionInterface* %serializer, i8* %148) ; [#uses=2]
- %154 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %155 = bitcast i8* %154 to i8** ; [#uses=1]
- store i8* %153, i8** %155, align 4
- %156 = icmp eq i8* %153, null ; [#uses=1]
- br i1 %156, label %bb1, label %bb
-
-bb: ; preds = %entry
- %157 = load i32 (...)*** %97, align 4 ; [#uses=1]
- %158 = getelementptr inbounds i32 (...)** %157, i32 12 ; [#uses=1]
- %159 = load i32 (...)** %158, align 4 ; [#uses=1]
- %160 = bitcast i32 (...)* %159 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- tail call void %160(%struct.btActionInterface* %serializer, i8* %148)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %161 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 21 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = getelementptr inbounds i8* %dataBuffer, i32 208 ; [#uses=1]
- %164 = bitcast i8* %163 to float* ; [#uses=1]
- store float %162, float* %164, align 4
- %165 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 22 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = getelementptr inbounds i8* %dataBuffer, i32 212 ; [#uses=1]
- %168 = bitcast i8* %167 to float* ; [#uses=1]
- store float %166, float* %168, align 4
- %169 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 23 ; [#uses=2]
- %170 = load float* %169, align 4 ; [#uses=1]
- %171 = getelementptr inbounds i8* %dataBuffer, i32 216 ; [#uses=1]
- %172 = bitcast i8* %171 to float* ; [#uses=2]
- store float %170, float* %172, align 4
- %173 = load float* %169, align 4 ; [#uses=1]
- store float %173, float* %172, align 4
- %174 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 24 ; [#uses=1]
- %175 = load i32* %174, align 4 ; [#uses=1]
- %176 = getelementptr inbounds i8* %dataBuffer, i32 244 ; [#uses=1]
- %177 = bitcast i8* %176 to i32* ; [#uses=1]
- store i32 %175, i32* %177, align 4
- ret i8* getelementptr inbounds ([27 x i8]* @.str11, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK17btCollisionObject21serializeSingleObjectEP12btSerializer(%struct.btCollisionObject* %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 4 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i32 (%struct.btCollisionObject*)* ; [#uses=1]
- %5 = tail call i32 %4(%struct.btCollisionObject* %this) ; [#uses=1]
- %6 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %11 = tail call %struct.btChunk* %10(%struct.btActionInterface* %serializer, i32 %5, i32 1) ; [#uses=2]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 5 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btChunk* %11, i32 0, i32 2 ; [#uses=1]
- %16 = load i8** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %14 to i8* (%struct.btCollisionObject*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %18 = tail call i8* %17(%struct.btCollisionObject* %this, i8* %16, %struct.btActionInterface* %serializer) ; [#uses=1]
- %19 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 5 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast %struct.btCollisionObject* %this to i8* ; [#uses=1]
- %23 = bitcast i32 (...)* %21 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %23(%struct.btActionInterface* %serializer, %struct.btChunk* %11, i8* %18, i32 1245859651, i8* %22)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btCollisionObjectC1Ev(%struct.btCollisionObject* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV17btCollisionObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 8 ; [#uses=1]
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %7, align 4
- %8 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 9 ; [#uses=1]
- store %struct.btCollisionShape* null, %struct.btCollisionShape** %8, align 4
- %9 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 10 ; [#uses=1]
- store i8* null, i8** %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 11 ; [#uses=1]
- store %struct.btCollisionShape* null, %struct.btCollisionShape** %10, align 4
- %11 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 12 ; [#uses=1]
- store i32 1, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 13 ; [#uses=1]
- store i32 -1, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 14 ; [#uses=1]
- store i32 -1, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 15 ; [#uses=1]
- store i32 1, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 17 ; [#uses=1]
- store float 5.000000e-01, float* %16, align 4
- %17 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 18 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 19 ; [#uses=1]
- store i32 1, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 20 ; [#uses=1]
- store i8* null, i8** %19, align 4
- %20 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 21 ; [#uses=1]
- store float 1.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 22 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 23 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 24 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- %39 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- ret void
-}
-
-; [#uses=9]
-define void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* nocapture %this, i32 %newState) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 15 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add i32 %1, -4 ; [#uses=1]
- %3 = icmp ugt i32 %2, 1 ; [#uses=1]
- br i1 %3, label %bb, label %return
-
-bb: ; preds = %entry
- store i32 %newState, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btCollisionObject20forceActivationStateEi(%struct.btCollisionObject* nocapture %this, i32 %newState) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 15 ; [#uses=1]
- store i32 %newState, i32* %0, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN17btCollisionObject8activateEb(%struct.btCollisionObject* nocapture %this, i8 zeroext %forceActivation) nounwind align 2 {
-entry:
- %toBool = icmp eq i8 %forceActivation, 0 ; [#uses=1]
- br i1 %toBool, label %bb, label %bb1
-
-bb: ; preds = %entry
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = and i32 %1, 3 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb1, label %return
-
-bb1: ; preds = %bb, %entry
- %4 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 15 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = add i32 %5, -4 ; [#uses=1]
- %7 = icmp ugt i32 %6, 1 ; [#uses=1]
- br i1 %7, label %bb.i, label %_ZN17btCollisionObject18setActivationStateEi.exit
-
-bb.i: ; preds = %bb1
- store i32 1, i32* %4, align 4
- br label %_ZN17btCollisionObject18setActivationStateEi.exit
-
-_ZN17btCollisionObject18setActivationStateEi.exit: ; preds = %bb.i, %bb1
- %8 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- ret void
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=32]
-define void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV17btCollisionObject, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN16btCollisionWorldC2EP12btDispatcherP21btBroadphaseInterfaceP24btCollisionConfiguration(%struct.btCollisionWorld* nocapture %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV16btCollisionWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %dispatcher, %struct.btActionInterface** %5, align 4
- %6 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 1, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store float 1.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 0, i8* %10, align 4
- %11 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 5 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %11, align 4
- %12 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 6 ; [#uses=1]
- store i8 0, i8* %12, align 4
- %13 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 7 ; [#uses=1]
- store i8 1, i8* %13, align 1
- %14 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 8 ; [#uses=1]
- store i8 1, i8* %14, align 2
- %15 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 9 ; [#uses=1]
- store float 0x3FA47AE140000000, float* %15, align 4
- %16 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 10 ; [#uses=1]
- store i8 0, i8* %16, align 4
- %17 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 12 ; [#uses=1]
- store i8 0, i8* %18, align 4
- %19 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 13 ; [#uses=2]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %19, align 4
- %20 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btActionInterface* %pairCache, %struct.btActionInterface** %20, align 4
- %21 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %21, align 4
- %22 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 7 ; [#uses=1]
- store i8 1, i8* %22, align 4
- %23 = getelementptr inbounds %struct.btActionInterface* %collisionConfiguration, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 4 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = bitcast i32 (...)* %26 to %struct.btStackAlloc* (%struct.btActionInterface*)* ; [#uses=1]
- %28 = invoke %struct.btStackAlloc* %27(%struct.btActionInterface* %collisionConfiguration)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %entry
- %29 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btStackAlloc* %28, %struct.btStackAlloc** %29, align 4
- store %struct.btStackAlloc* %28, %struct.btStackAlloc** %19, align 4
- ret void
-
-invcont1: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %1, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %30 = load %struct.btCollisionObject*** %2, align 4 ; [#uses=2]
- %31 = icmp eq %struct.btCollisionObject** %30, null ; [#uses=1]
- br i1 %31, label %invcont1, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %32 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %33 = bitcast %struct.btCollisionObject** %30 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i unwind label %lpad5
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- br label %invcont1
-
-lpad5: ; preds = %bb1.i.i.i
- %eh_ptr6 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr6, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btManifoldResult20setShapeIdentifiersAEii(%struct.btManifoldResult* nocapture %this, i32 %partId0, i32 %index0) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %partId0, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 8 ; [#uses=1]
- store i32 %index0, i32* %1, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btManifoldResult20setShapeIdentifiersBEii(%struct.btManifoldResult* nocapture %this, i32 %partId1, i32 %index1) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %partId1, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 9 ; [#uses=1]
- store i32 %index1, i32* %1, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld14setDebugDrawerEP12btIDebugDraw(%struct.btCollisionWorld* nocapture %this, %struct.btActionInterface* %debugDrawer) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* %debugDrawer, %struct.btActionInterface** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btActionInterface* @_ZN16btCollisionWorld14getDebugDrawerEv(%struct.btCollisionWorld* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=1]
- ret %struct.btActionInterface* %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld17RayResultCallbackD1Ev(%"struct.btCollisionWorld::RayResultCallback"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld17RayResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld17RayResultCallbackD0Ev(%"struct.btCollisionWorld::RayResultCallback"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld17RayResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btCollisionWorld::RayResultCallback"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK16btCollisionWorld17RayResultCallback14needsCollisionEP17btBroadphaseProxy(%"struct.btCollisionWorld::RayResultCallback"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy0) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 1 ; [#uses=1]
- %1 = load i16* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %this, i32 0, i32 4 ; [#uses=1]
- %3 = load i16* %2, align 2 ; [#uses=1]
- %4 = and i16 %3, %1 ; [#uses=1]
- %toBoolnot = icmp eq i16 %4, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %this, i32 0, i32 3 ; [#uses=1]
- %6 = load i16* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 2 ; [#uses=1]
- %8 = load i16* %7, align 2 ; [#uses=1]
- %9 = and i16 %8, %6 ; [#uses=1]
- %not. = icmp ne i16 %9, 0 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb5: ; preds = %entry
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld20ConvexResultCallbackD1Ev(%"struct.btCollisionWorld::ConvexResultCallback"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld20ConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld20ConvexResultCallbackD0Ev(%"struct.btCollisionWorld::ConvexResultCallback"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld20ConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btCollisionWorld::ConvexResultCallback"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy(%"struct.btCollisionWorld::ConvexResultCallback"* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy0) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 1 ; [#uses=1]
- %1 = load i16* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %this, i32 0, i32 3 ; [#uses=1]
- %3 = load i16* %2, align 2 ; [#uses=1]
- %4 = and i16 %3, %1 ; [#uses=1]
- %toBoolnot = icmp eq i16 %4, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %this, i32 0, i32 2 ; [#uses=1]
- %6 = load i16* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 2 ; [#uses=1]
- %8 = load i16* %7, align 2 ; [#uses=1]
- %9 = and i16 %8, %6 ; [#uses=1]
- %not. = icmp ne i16 %9, 0 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb5: ; preds = %entry
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btConvexPenetrationDepthSolverD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btConvexPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btConvexPenetrationDepthSolverD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btConvexPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConvexCast10CastResult9DebugDrawEf(%"struct.btConvexCast::CastResult"* nocapture %this, float %fraction) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConvexCast10CastResult15drawCoordSystemERK11btTransform(%"struct.btConvexCast::CastResult"* nocapture %this, %struct.btTransform* nocapture %trans) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConvexCast10CastResultD1Ev(%"struct.btConvexCast::CastResult"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConvexCast10CastResultD0Ev(%"struct.btConvexCast::CastResult"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btConvexCast::CastResult"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal float @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallback9reportHitERK9btVector3fii(%struct..0BridgeTriangleRaycastCallback* nocapture %this, %struct.btQuadWord* nocapture %hitNormalLocal, float %hitFraction, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %shapeInfo = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %rayResult = alloca %"struct.btCollisionWorld::LocalRayResult", align 8 ; [#uses=8]
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 0 ; [#uses=1]
- store i32 %partId, i32* %0, align 8
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 1 ; [#uses=1]
- store i32 %triangleIndex, i32* %1, align 4
- %2 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = fadd float %6, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fadd float %12, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %20, %5 ; [#uses=1]
- %22 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fmul float %23, %10 ; [#uses=1]
- %25 = fadd float %21, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fmul float %27, %16 ; [#uses=1]
- %29 = fadd float %25, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fmul float %31, %5 ; [#uses=1]
- %33 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fmul float %34, %10 ; [#uses=1]
- %36 = fadd float %32, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %38, %16 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 2 ; [#uses=1]
- %42 = load %struct.btCollisionObject** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 0 ; [#uses=1]
- store %struct.btCollisionObject* %42, %struct.btCollisionObject** %43, align 8
- %44 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 1 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* %shapeInfo, %struct.CONTACT_KEY_TOKEN** %44, align 4
- %45 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %40, float* %45, align 8
- %46 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %29, float* %46, align 4
- %47 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %18, float* %47, align 8
- %48 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %48, align 4
- %49 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 3 ; [#uses=1]
- store float %hitFraction, float* %49, align 8
- %50 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 1 ; [#uses=1]
- %51 = load %"struct.btCollisionWorld::RayResultCallback"** %50, align 4 ; [#uses=2]
- %52 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %51, i32 0, i32 0 ; [#uses=1]
- %53 = load i32 (...)*** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds i32 (...)** %53, i32 3 ; [#uses=1]
- %55 = load i32 (...)** %54, align 4 ; [#uses=1]
- %56 = bitcast i32 (...)* %55 to float (%"struct.btCollisionWorld::RayResultCallback"*, %"struct.btCollisionWorld::LocalRayResult"*, i8)* ; [#uses=1]
- %57 = call float %56(%"struct.btCollisionWorld::RayResultCallback"* %51, %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i8 zeroext 1) ; [#uses=1]
- ret float %57
-}
-
-; [#uses=1]
-define internal float @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallback9reportHitE_0RK9btVector3fii(%struct..1BridgeTriangleRaycastCallback* nocapture %this, %struct.btQuadWord* nocapture %hitNormalLocal, float %hitFraction, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %shapeInfo = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %rayResult = alloca %"struct.btCollisionWorld::LocalRayResult", align 8 ; [#uses=8]
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 0 ; [#uses=1]
- store i32 %partId, i32* %0, align 8
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 1 ; [#uses=1]
- store i32 %triangleIndex, i32* %1, align 4
- %2 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = fadd float %6, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fadd float %12, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %20, %5 ; [#uses=1]
- %22 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fmul float %23, %10 ; [#uses=1]
- %25 = fadd float %21, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fmul float %27, %16 ; [#uses=1]
- %29 = fadd float %25, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fmul float %31, %5 ; [#uses=1]
- %33 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fmul float %34, %10 ; [#uses=1]
- %36 = fadd float %32, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %38, %16 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 2 ; [#uses=1]
- %42 = load %struct.btCollisionObject** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 0 ; [#uses=1]
- store %struct.btCollisionObject* %42, %struct.btCollisionObject** %43, align 8
- %44 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 1 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* %shapeInfo, %struct.CONTACT_KEY_TOKEN** %44, align 4
- %45 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %40, float* %45, align 8
- %46 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %29, float* %46, align 4
- %47 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %18, float* %47, align 8
- %48 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %48, align 4
- %49 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 3 ; [#uses=1]
- store float %hitFraction, float* %49, align 8
- %50 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 1 ; [#uses=1]
- %51 = load %"struct.btCollisionWorld::RayResultCallback"** %50, align 4 ; [#uses=2]
- %52 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %51, i32 0, i32 0 ; [#uses=1]
- %53 = load i32 (...)*** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds i32 (...)** %53, i32 3 ; [#uses=1]
- %55 = load i32 (...)** %54, align 4 ; [#uses=1]
- %56 = bitcast i32 (...)* %55 to float (%"struct.btCollisionWorld::RayResultCallback"*, %"struct.btCollisionWorld::LocalRayResult"*, i8)* ; [#uses=1]
- %57 = call float %56(%"struct.btCollisionWorld::RayResultCallback"* %51, %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i8 zeroext 1) ; [#uses=1]
- ret float %57
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN15LocalInfoAdder2D1Ev(%struct..2LocalInfoAdder2* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..2LocalInfoAdder2* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN15LocalInfoAdder2D0Ev(%struct..2LocalInfoAdder2* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..2LocalInfoAdder2* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..2LocalInfoAdder2* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal float @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN15LocalInfoAdder215addSingleResultERNS_14LocalRayResultEb(%struct..2LocalInfoAdder2* nocapture %this, %"struct.btCollisionWorld::LocalRayResult"* %r, i8 zeroext %b) align 2 {
-entry:
- %shapeInfo = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 0 ; [#uses=1]
- store i32 -1, i32* %0, align 8
- %1 = getelementptr inbounds %struct..2LocalInfoAdder2* %this, i32 0, i32 2 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 1 ; [#uses=1]
- store i32 %2, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %r, i32 0, i32 1 ; [#uses=2]
- %5 = load %struct.CONTACT_KEY_TOKEN** %4, align 4 ; [#uses=1]
- %6 = icmp eq %struct.CONTACT_KEY_TOKEN* %5, null ; [#uses=1]
- br i1 %6, label %bb, label %bb1
-
-bb: ; preds = %entry
- store %struct.CONTACT_KEY_TOKEN* %shapeInfo, %struct.CONTACT_KEY_TOKEN** %4, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %7 = getelementptr inbounds %struct..2LocalInfoAdder2* %this, i32 0, i32 1 ; [#uses=2]
- %8 = load %"struct.btCollisionWorld::RayResultCallback"** %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %8, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 3 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to float (%"struct.btCollisionWorld::RayResultCallback"*, %"struct.btCollisionWorld::LocalRayResult"*, i8)* ; [#uses=1]
- %14 = call float %13(%"struct.btCollisionWorld::RayResultCallback"* %8, %"struct.btCollisionWorld::LocalRayResult"* %r, i8 zeroext %b) ; [#uses=1]
- %15 = load %"struct.btCollisionWorld::RayResultCallback"** %7, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %15, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct..2LocalInfoAdder2* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %17, float* %18, align 4
- ret float %14
-}
-
-; [#uses=1]
-define internal float @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallback9reportHitERK9btVector3SG_fii(%struct..3BridgeTriangleConvexcastCallback* nocapture %this, %struct.btQuadWord* nocapture %hitNormalLocal, %struct.btQuadWord* nocapture %hitPointLocal, float %hitFraction, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %shapeInfo = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %convexResult = alloca %"struct.btCollisionWorld::LocalConvexResult", align 8 ; [#uses=12]
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 0 ; [#uses=1]
- store i32 %partId, i32* %0, align 8
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 1 ; [#uses=1]
- store i32 %triangleIndex, i32* %1, align 4
- %2 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %"struct.btCollisionWorld::ConvexResultCallback"** %2, align 4 ; [#uses=3]
- %4 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %3, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fcmp ult float %5, %hitFraction ; [#uses=1]
- br i1 %6, label %bb2, label %bb
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 2 ; [#uses=1]
- %8 = load %struct.btCollisionObject** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 0 ; [#uses=1]
- store %struct.btCollisionObject* %8, %struct.btCollisionObject** %9, align 8
- %10 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 1 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* %shapeInfo, %struct.CONTACT_KEY_TOKEN** %10, align 4
- %11 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 8
- %14 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 8
- %20 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 8
- %26 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 8
- %32 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 4 ; [#uses=1]
- store float %hitFraction, float* %35, align 8
- %36 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %3, i32 0, i32 0 ; [#uses=1]
- %37 = load i32 (...)*** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 3 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to float (%"struct.btCollisionWorld::ConvexResultCallback"*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* ; [#uses=1]
- %41 = call float %40(%"struct.btCollisionWorld::ConvexResultCallback"* %3, %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i8 zeroext 1) ; [#uses=1]
- ret float %41
-
-bb2: ; preds = %entry
- ret float %hitFraction
-}
-
-; [#uses=1]
-define internal float @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallback9reportHitE_0RK9btVector3SG_fii(%struct..4BridgeTriangleConvexcastCallback* nocapture %this, %struct.btQuadWord* nocapture %hitNormalLocal, %struct.btQuadWord* nocapture %hitPointLocal, float %hitFraction, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %shapeInfo = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %convexResult = alloca %"struct.btCollisionWorld::LocalConvexResult", align 8 ; [#uses=12]
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 0 ; [#uses=1]
- store i32 %partId, i32* %0, align 8
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 1 ; [#uses=1]
- store i32 %triangleIndex, i32* %1, align 4
- %2 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %"struct.btCollisionWorld::ConvexResultCallback"** %2, align 4 ; [#uses=3]
- %4 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %3, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fcmp ult float %5, %hitFraction ; [#uses=1]
- br i1 %6, label %bb2, label %bb
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 2 ; [#uses=1]
- %8 = load %struct.btCollisionObject** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 0 ; [#uses=1]
- store %struct.btCollisionObject* %8, %struct.btCollisionObject** %9, align 8
- %10 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 1 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* %shapeInfo, %struct.CONTACT_KEY_TOKEN** %10, align 4
- %11 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 8
- %14 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 8
- %20 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %hitNormalLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 8
- %26 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 8
- %32 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %hitPointLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 4 ; [#uses=1]
- store float %hitFraction, float* %35, align 8
- %36 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %3, i32 0, i32 0 ; [#uses=1]
- %37 = load i32 (...)*** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 3 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to float (%"struct.btCollisionWorld::ConvexResultCallback"*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* ; [#uses=1]
- %41 = call float %40(%"struct.btCollisionWorld::ConvexResultCallback"* %3, %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i8 zeroext 0) ; [#uses=1]
- ret float %41
-
-bb2: ; preds = %entry
- ret float %hitFraction
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN14LocalInfoAdderD1Ev(%struct..5LocalInfoAdder* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..5LocalInfoAdder* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN14LocalInfoAdderD0Ev(%struct..5LocalInfoAdder* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..5LocalInfoAdder* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..5LocalInfoAdder* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal float @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN14LocalInfoAdder15addSingleResultERNS_17LocalConvexResultEb(%struct..5LocalInfoAdder* nocapture %this, %"struct.btCollisionWorld::LocalConvexResult"* %r, i8 zeroext %b) align 2 {
-entry:
- %shapeInfo = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 0 ; [#uses=1]
- store i32 -1, i32* %0, align 8
- %1 = getelementptr inbounds %struct..5LocalInfoAdder* %this, i32 0, i32 2 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %shapeInfo, i32 0, i32 1 ; [#uses=1]
- store i32 %2, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %r, i32 0, i32 1 ; [#uses=2]
- %5 = load %struct.CONTACT_KEY_TOKEN** %4, align 4 ; [#uses=1]
- %6 = icmp eq %struct.CONTACT_KEY_TOKEN* %5, null ; [#uses=1]
- br i1 %6, label %bb, label %bb1
-
-bb: ; preds = %entry
- store %struct.CONTACT_KEY_TOKEN* %shapeInfo, %struct.CONTACT_KEY_TOKEN** %4, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %7 = getelementptr inbounds %struct..5LocalInfoAdder* %this, i32 0, i32 1 ; [#uses=2]
- %8 = load %"struct.btCollisionWorld::ConvexResultCallback"** %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %8, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 3 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to float (%"struct.btCollisionWorld::ConvexResultCallback"*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* ; [#uses=1]
- %14 = call float %13(%"struct.btCollisionWorld::ConvexResultCallback"* %8, %"struct.btCollisionWorld::LocalConvexResult"* %r, i8 zeroext %b) ; [#uses=1]
- %15 = load %"struct.btCollisionWorld::ConvexResultCallback"** %7, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %15, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct..5LocalInfoAdder* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %17, float* %18, align 4
- ret float %14
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btBroadphaseAabbCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btBroadphaseAabbCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btBroadphaseAabbCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btBroadphaseAabbCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btBroadphaseRayCallbackD1Ev(%struct.btBroadphaseRayCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseRayCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btBroadphaseRayCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btBroadphaseRayCallbackD0Ev(%struct.btBroadphaseRayCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseRayCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btBroadphaseRayCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btBroadphaseRayCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btBridgedManifoldResult15addContactPointERK9btVector3S2_f(%struct.btBridgedManifoldResult* nocapture %this, %struct.btQuadWord* nocapture %normalOnBInWorld, %struct.btQuadWord* nocapture %pointInWorld, float %depth) align 2 {
-entry:
- %newPt = alloca %struct.btManifoldPoint, align 8 ; [#uses=45]
- %0 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btPersistentManifold* %1, i32 0, i32 2 ; [#uses=1]
- %3 = load i8** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 4 ; [#uses=2]
- %5 = load %struct.btCollisionObject** %4, align 4 ; [#uses=2]
- %6 = bitcast %struct.btCollisionObject* %5 to i8* ; [#uses=1]
- %7 = icmp ne i8* %3, %6 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=2]
- %10 = fmul float %9, %depth ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = fmul float %12, %depth ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fmul float %15, %depth ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = fadd float %18, %10 ; [#uses=3]
- %20 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=4]
- %22 = fadd float %21, %13 ; [#uses=3]
- %23 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=4]
- %25 = fadd float %24, %16 ; [#uses=3]
- br i1 %7, label %bb, label %bb2
-
-bb: ; preds = %entry
- %26 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fsub float %19, %27 ; [#uses=3]
- %29 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fsub float %22, %30 ; [#uses=3]
- %32 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %25, %33 ; [#uses=3]
- %35 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = load float* %42, align 4 ; [#uses=1]
- %46 = load float* %41, align 4 ; [#uses=1]
- %47 = load float* %40, align 4 ; [#uses=1]
- %48 = load float* %39, align 4 ; [#uses=1]
- %49 = load float* %38, align 4 ; [#uses=1]
- %50 = load float* %37, align 4 ; [#uses=1]
- %51 = load float* %36, align 4 ; [#uses=1]
- %52 = load float* %35, align 4 ; [#uses=1]
- %53 = fmul float %50, %34 ; [#uses=1]
- %54 = fmul float %51, %31 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %52, %28 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=1]
- %58 = fmul float %47, %34 ; [#uses=1]
- %59 = fmul float %48, %31 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %49, %28 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %44, %34 ; [#uses=1]
- %64 = fmul float %45, %31 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fmul float %46, %28 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fsub float %18, %69 ; [#uses=3]
- %71 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fsub float %21, %72 ; [#uses=3]
- %74 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fsub float %24, %75 ; [#uses=3]
- %77 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = load float* %84, align 4 ; [#uses=1]
- %88 = load float* %83, align 4 ; [#uses=1]
- %89 = load float* %82, align 4 ; [#uses=1]
- %90 = load float* %81, align 4 ; [#uses=1]
- %91 = load float* %80, align 4 ; [#uses=1]
- %92 = load float* %79, align 4 ; [#uses=1]
- %93 = load float* %78, align 4 ; [#uses=1]
- %94 = load float* %77, align 4 ; [#uses=1]
- %95 = fmul float %92, %76 ; [#uses=1]
- %96 = fmul float %93, %73 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %94, %70 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %89, %76 ; [#uses=1]
- %101 = fmul float %90, %73 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %91, %70 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fmul float %86, %76 ; [#uses=1]
- %106 = fmul float %87, %73 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %88, %70 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- br label %bb5
-
-bb2: ; preds = %entry
- %110 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- %112 = fsub float %19, %111 ; [#uses=3]
- %113 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=1]
- %115 = fsub float %22, %114 ; [#uses=3]
- %116 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = fsub float %25, %117 ; [#uses=3]
- %119 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=1]
- %129 = load float* %126, align 4 ; [#uses=1]
- %130 = load float* %125, align 4 ; [#uses=1]
- %131 = load float* %124, align 4 ; [#uses=1]
- %132 = load float* %123, align 4 ; [#uses=1]
- %133 = load float* %122, align 4 ; [#uses=1]
- %134 = load float* %121, align 4 ; [#uses=1]
- %135 = load float* %120, align 4 ; [#uses=1]
- %136 = load float* %119, align 4 ; [#uses=1]
- %137 = fmul float %134, %118 ; [#uses=1]
- %138 = fmul float %135, %115 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %136, %112 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = fmul float %131, %118 ; [#uses=1]
- %143 = fmul float %132, %115 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = fmul float %133, %112 ; [#uses=1]
- %146 = fadd float %144, %145 ; [#uses=1]
- %147 = fmul float %128, %118 ; [#uses=1]
- %148 = fmul float %129, %115 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fmul float %130, %112 ; [#uses=1]
- %151 = fadd float %149, %150 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = fsub float %18, %153 ; [#uses=3]
- %155 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- %157 = fsub float %21, %156 ; [#uses=3]
- %158 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fsub float %24, %159 ; [#uses=3]
- %161 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %169 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %170 = load float* %169, align 4 ; [#uses=1]
- %171 = load float* %168, align 4 ; [#uses=1]
- %172 = load float* %167, align 4 ; [#uses=1]
- %173 = load float* %166, align 4 ; [#uses=1]
- %174 = load float* %165, align 4 ; [#uses=1]
- %175 = load float* %164, align 4 ; [#uses=1]
- %176 = load float* %163, align 4 ; [#uses=1]
- %177 = load float* %162, align 4 ; [#uses=1]
- %178 = load float* %161, align 4 ; [#uses=1]
- %179 = fmul float %176, %160 ; [#uses=1]
- %180 = fmul float %177, %157 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=1]
- %182 = fmul float %178, %154 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=1]
- %184 = fmul float %173, %160 ; [#uses=1]
- %185 = fmul float %174, %157 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = fmul float %175, %154 ; [#uses=1]
- %188 = fadd float %186, %187 ; [#uses=1]
- %189 = fmul float %170, %160 ; [#uses=1]
- %190 = fmul float %171, %157 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = fmul float %172, %154 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb2, %bb
- %localA.0.0.0 = phi float [ %67, %bb ], [ %151, %bb2 ] ; [#uses=1]
- %localA.0.1.0 = phi float [ %62, %bb ], [ %146, %bb2 ] ; [#uses=1]
- %localA.0.2.0 = phi float [ %57, %bb ], [ %141, %bb2 ] ; [#uses=1]
- %localB.0.0.0 = phi float [ %109, %bb ], [ %193, %bb2 ] ; [#uses=1]
- %localB.0.1.0 = phi float [ %104, %bb ], [ %188, %bb2 ] ; [#uses=1]
- %localB.0.2.0 = phi float [ %99, %bb ], [ %183, %bb2 ] ; [#uses=1]
- %194 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %localA.0.0.0, float* %194, align 8
- %195 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %localA.0.1.0, float* %195, align 4
- %196 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %localA.0.2.0, float* %196, align 8
- %197 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %197, align 4
- %198 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %localB.0.0.0, float* %198, align 8
- %199 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %localB.0.1.0, float* %199, align 4
- %200 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %localB.0.2.0, float* %200, align 8
- %201 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %201, align 4
- %202 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %15, float* %202, align 8
- %203 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %203, align 4
- %204 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %9, float* %204, align 8
- %205 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %207 = load float* %206, align 4 ; [#uses=1]
- store float %207, float* %205, align 4
- %208 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 5 ; [#uses=1]
- store float %depth, float* %208, align 8
- %209 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %209, align 4
- %210 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %210, align 8
- %211 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 12 ; [#uses=1]
- store i8* null, i8** %211, align 4
- %212 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %212, align 8
- %213 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 14 ; [#uses=1]
- store i8 0, i8* %213, align 4
- %214 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %214, align 8
- %215 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %215, align 4
- %216 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 17 ; [#uses=1]
- store float 0.000000e+00, float* %216, align 8
- %217 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 18 ; [#uses=1]
- store float 0.000000e+00, float* %217, align 4
- %218 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 19 ; [#uses=1]
- store float 0.000000e+00, float* %218, align 8
- %219 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 20 ; [#uses=1]
- store float 0.000000e+00, float* %219, align 4
- %220 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 21 ; [#uses=1]
- store i32 0, i32* %220, align 8
- %221 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 24, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %221, align 4
- %222 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 24, i32 1, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %222, align 4
- %223 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 24, i32 2, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %223, align 4
- %224 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %25, float* %224, align 8
- %225 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %22, float* %225, align 4
- %226 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %226, align 8
- %227 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %227, align 4
- %228 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %24, float* %228, align 8
- %229 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %229, align 4
- %230 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %18, float* %230, align 8
- %231 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %232 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %233 = load float* %232, align 4 ; [#uses=1]
- store float %233, float* %231, align 4
- br i1 %7, label %bb9.thread, label %bb9
-
-bb9.thread: ; preds = %bb5
- %234 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 7 ; [#uses=1]
- %235 = load i32* %234, align 4 ; [#uses=2]
- %236 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 8 ; [#uses=1]
- store i32 %235, i32* %236, align 4
- %237 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %238 = load i32* %237, align 4 ; [#uses=2]
- %239 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 9 ; [#uses=1]
- store i32 %238, i32* %239, align 8
- %240 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 9 ; [#uses=1]
- %241 = load i32* %240, align 4 ; [#uses=2]
- %242 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 10 ; [#uses=1]
- store i32 %241, i32* %242, align 4
- %243 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 8 ; [#uses=1]
- %244 = load i32* %243, align 4 ; [#uses=2]
- %245 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 11 ; [#uses=1]
- store i32 %244, i32* %245, align 8
- %246 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %iftmp.373.039.pre = load %struct.btCollisionObject** %246, align 4 ; [#uses=1]
- br label %bb17
-
-bb9: ; preds = %bb5
- %247 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %248 = load i32* %247, align 4 ; [#uses=2]
- %249 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 8 ; [#uses=1]
- store i32 %248, i32* %249, align 4
- %250 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 7 ; [#uses=1]
- %251 = load i32* %250, align 4 ; [#uses=2]
- %252 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 9 ; [#uses=1]
- store i32 %251, i32* %252, align 8
- %253 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 8 ; [#uses=1]
- %254 = load i32* %253, align 4 ; [#uses=2]
- %255 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 10 ; [#uses=1]
- store i32 %254, i32* %255, align 4
- %256 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 9 ; [#uses=1]
- %257 = load i32* %256, align 4 ; [#uses=2]
- %258 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 11 ; [#uses=1]
- store i32 %257, i32* %258, align 8
- %259 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb9, %bb9.thread
- %260 = phi i32 [ %235, %bb9.thread ], [ %248, %bb9 ] ; [#uses=1]
- %261 = phi i32 [ %241, %bb9.thread ], [ %254, %bb9 ] ; [#uses=1]
- %262 = phi i32 [ %238, %bb9.thread ], [ %251, %bb9 ] ; [#uses=1]
- %263 = phi i32 [ %244, %bb9.thread ], [ %257, %bb9 ] ; [#uses=1]
- %iftmp.373.039 = phi %struct.btCollisionObject* [ %iftmp.373.039.pre, %bb9.thread ], [ %5, %bb9 ] ; [#uses=1]
- %iftmp.374.0.in = phi %struct.btCollisionObject** [ %4, %bb9.thread ], [ %259, %bb9 ] ; [#uses=1]
- %iftmp.374.0 = load %struct.btCollisionObject** %iftmp.374.0.in, align 4 ; [#uses=1]
- %264 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 1 ; [#uses=1]
- %265 = load %"struct.btCollisionWorld::ContactResultCallback"** %264, align 4 ; [#uses=2]
- %266 = getelementptr inbounds %"struct.btCollisionWorld::ContactResultCallback"* %265, i32 0, i32 0 ; [#uses=1]
- %267 = load i32 (...)*** %266, align 4 ; [#uses=1]
- %268 = getelementptr inbounds i32 (...)** %267, i32 3 ; [#uses=1]
- %269 = load i32 (...)** %268, align 4 ; [#uses=1]
- %270 = bitcast i32 (...)* %269 to float (%"struct.btCollisionWorld::ContactResultCallback"*, %struct.btManifoldPoint*, %struct.btCollisionObject*, i32, i32, %struct.btCollisionObject*, i32, i32)* ; [#uses=1]
- %271 = call float %270(%"struct.btCollisionWorld::ContactResultCallback"* %265, %struct.btManifoldPoint* %newPt, %struct.btCollisionObject* %iftmp.373.039, i32 %260, i32 %261, %struct.btCollisionObject* %iftmp.374.0, i32 %262, i32 %263) ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btSingleContactCallbackD1Ev(%struct.btSingleContactCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleContactCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btSingleContactCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btSingleContactCallbackD0Ev(%struct.btSingleContactCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleContactCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btSingleContactCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btSingleContactCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN23btSingleContactCallback7processEPK17btBroadphaseProxy(%struct.btSingleContactCallback* nocapture %this, %struct.btBroadphaseProxy* nocapture %proxy) align 2 {
-entry:
- %contactPointResult = alloca %struct.btBridgedManifoldResult, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 0 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=2]
- %2 = bitcast i8* %1 to %struct.btCollisionObject* ; [#uses=4]
- %3 = getelementptr inbounds %struct.btSingleContactCallback* %this, i32 0, i32 1 ; [#uses=4]
- %4 = load %struct.btCollisionObject** %3, align 4 ; [#uses=1]
- %5 = icmp eq %struct.btCollisionObject* %4, %2 ; [#uses=1]
- br i1 %5, label %bb7, label %bb1
-
-bb1: ; preds = %entry
- %6 = getelementptr inbounds %struct.btSingleContactCallback* %this, i32 0, i32 3 ; [#uses=2]
- %7 = load %"struct.btCollisionWorld::ContactResultCallback"** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %"struct.btCollisionWorld::ContactResultCallback"* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 2 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i8* %1, i32 188 ; [#uses=1]
- %13 = bitcast i8* %12 to %struct.btBroadphaseProxy** ; [#uses=1]
- %14 = load %struct.btBroadphaseProxy** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %11 to i8 (%"struct.btCollisionWorld::ContactResultCallback"*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %16 = call zeroext i8 %15(%"struct.btCollisionWorld::ContactResultCallback"* %7, %struct.btBroadphaseProxy* %14) ; [#uses=1]
- %toBool = icmp eq i8 %16, 0 ; [#uses=1]
- br i1 %toBool, label %bb7, label %bb2
-
-bb2: ; preds = %bb1
- %17 = getelementptr inbounds %struct.btSingleContactCallback* %this, i32 0, i32 2 ; [#uses=3]
- %18 = load %struct.btCollisionWorld** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btCollisionWorld* %18, i32 0, i32 2 ; [#uses=1]
- %20 = load %struct.btActionInterface** %19, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btActionInterface* %20, i32 0, i32 0 ; [#uses=1]
- %22 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 2 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = load %struct.btCollisionObject** %3, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %24 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %27 = call %struct.btCollisionAlgorithm* %26(%struct.btActionInterface* %20, %struct.btCollisionObject* %25, %struct.btCollisionObject* %2, %struct.btPersistentManifold* null) ; [#uses=5]
- %28 = icmp eq %struct.btCollisionAlgorithm* %27, null ; [#uses=1]
- br i1 %28, label %bb7, label %bb3
-
-bb3: ; preds = %bb2
- %29 = load %"struct.btCollisionWorld::ContactResultCallback"** %6, align 4 ; [#uses=1]
- %30 = load %struct.btCollisionObject** %3, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btBridgedManifoldResult* %contactPointResult, i32 0, i32 0 ; [#uses=2]
- call void @_ZN16btManifoldResultC2EP17btCollisionObjectS1_(%struct.btManifoldResult* %31, %struct.btCollisionObject* %30, %struct.btCollisionObject* %2)
- %32 = getelementptr inbounds %struct.btBridgedManifoldResult* %contactPointResult, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btBridgedManifoldResult, i32 0, i32 2), i32 (...)*** %32, align 8
- %33 = getelementptr inbounds %struct.btBridgedManifoldResult* %contactPointResult, i32 0, i32 1 ; [#uses=1]
- store %"struct.btCollisionWorld::ContactResultCallback"* %29, %"struct.btCollisionWorld::ContactResultCallback"** %33, align 8
- %34 = getelementptr inbounds %struct.btCollisionAlgorithm* %27, i32 0, i32 0 ; [#uses=2]
- %35 = load i32 (...)*** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32 (...)** %35, i32 2 ; [#uses=1]
- %37 = load i32 (...)** %36, align 4 ; [#uses=1]
- %38 = load %struct.btCollisionWorld** %17, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionWorld* %38, i32 0, i32 3 ; [#uses=1]
- %40 = load %struct.btCollisionObject** %3, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %37 to void (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- invoke void %41(%struct.btCollisionAlgorithm* %27, %struct.btCollisionObject* %40, %struct.btCollisionObject* %2, %struct.btDispatcherInfo* %39, %struct.btManifoldResult* %31)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb3
- %42 = load i32 (...)*** %34, align 4 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = bitcast i32 (...)* %43 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %44(%struct.btCollisionAlgorithm* %27)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %invcont
- %45 = load %struct.btCollisionWorld** %17, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btCollisionWorld* %45, i32 0, i32 2 ; [#uses=1]
- %47 = load %struct.btActionInterface** %46, align 4 ; [#uses=2]
- %48 = getelementptr inbounds %struct.btActionInterface* %47, i32 0, i32 0 ; [#uses=1]
- %49 = load i32 (...)*** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds i32 (...)** %49, i32 13 ; [#uses=1]
- %51 = load i32 (...)** %50, align 4 ; [#uses=1]
- %52 = bitcast i32 (...)* %51 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %53 = bitcast %struct.btCollisionAlgorithm* %27 to i8* ; [#uses=1]
- invoke void %52(%struct.btActionInterface* %47, i8* %53)
- to label %bb7 unwind label %lpad
-
-bb7: ; preds = %invcont4, %bb2, %bb1, %entry
- ret i8 1
-
-lpad: ; preds = %invcont4, %invcont, %bb3
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select13 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btBridgedManifoldResult, i32 0, i32 2), i32 (...)*** %32, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17DebugDrawcallbackD1Ev(%struct.DebugDrawcallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1, align 4
- %2 = ptrtoint %struct.DebugDrawcallback* %this to i32 ; [#uses=1]
- %3 = add i32 %2, 4 ; [#uses=1]
- %4 = inttoptr i32 %3 to %struct.DebugDrawcallback* ; [#uses=1]
- %5 = getelementptr inbounds %struct.DebugDrawcallback* %4, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %5)
- to label %bb3 unwind label %lpad
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %entry
- %6 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %6)
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %7 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %7)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17DebugDrawcallbackD0Ev(%struct.DebugDrawcallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1, align 4
- %2 = ptrtoint %struct.DebugDrawcallback* %this to i32 ; [#uses=1]
- %3 = add i32 %2, 4 ; [#uses=1]
- %4 = inttoptr i32 %3 to %struct.DebugDrawcallback* ; [#uses=1]
- %5 = getelementptr inbounds %struct.DebugDrawcallback* %4, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %5)
- to label %bb3 unwind label %lpad
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %entry
- %6 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %6)
- %7 = bitcast %struct.DebugDrawcallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %7) nounwind
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %8 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %8)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17DebugDrawcallback15processTriangleEP9btVector3ii(%struct.DebugDrawcallback* %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %wv0 = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %wv1 = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %wv2 = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %center = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %normalColor = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=3]
- %3 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = fmul float %2, %4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = fmul float %7, %9 ; [#uses=1]
- %11 = fadd float %5, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = fadd float %11, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=3]
- %20 = fadd float %17, %19 ; [#uses=4]
- %21 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=3]
- %23 = fmul float %22, %4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = fmul float %25, %9 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=3]
- %30 = fmul float %29, %15 ; [#uses=1]
- %31 = fadd float %27, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=3]
- %34 = fadd float %31, %33 ; [#uses=4]
- %35 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=3]
- %37 = fmul float %36, %4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=3]
- %40 = fmul float %39, %9 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = fmul float %43, %15 ; [#uses=1]
- %45 = fadd float %41, %44 ; [#uses=1]
- %46 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=3]
- %48 = fadd float %45, %47 ; [#uses=4]
- %49 = getelementptr inbounds %struct.btQuadWord* %wv0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %48, float* %49, align 8
- %50 = getelementptr inbounds %struct.btQuadWord* %wv0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %34, float* %50, align 4
- %51 = getelementptr inbounds %struct.btQuadWord* %wv0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %51, align 8
- %52 = getelementptr inbounds %struct.btQuadWord* %wv0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=3]
- %55 = fmul float %2, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=3]
- %58 = fmul float %7, %57 ; [#uses=1]
- %59 = fadd float %55, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=3]
- %62 = fmul float %13, %61 ; [#uses=1]
- %63 = fadd float %59, %62 ; [#uses=1]
- %64 = fadd float %63, %19 ; [#uses=3]
- %65 = fmul float %22, %54 ; [#uses=1]
- %66 = fmul float %25, %57 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=1]
- %68 = fmul float %29, %61 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fadd float %69, %33 ; [#uses=3]
- %71 = fmul float %36, %54 ; [#uses=1]
- %72 = fmul float %39, %57 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=1]
- %74 = fmul float %43, %61 ; [#uses=1]
- %75 = fadd float %73, %74 ; [#uses=1]
- %76 = fadd float %75, %47 ; [#uses=3]
- %77 = getelementptr inbounds %struct.btQuadWord* %wv1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %76, float* %77, align 8
- %78 = getelementptr inbounds %struct.btQuadWord* %wv1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %70, float* %78, align 4
- %79 = getelementptr inbounds %struct.btQuadWord* %wv1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %64, float* %79, align 8
- %80 = getelementptr inbounds %struct.btQuadWord* %wv1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %80, align 4
- %81 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=3]
- %83 = fmul float %2, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=3]
- %86 = fmul float %7, %85 ; [#uses=1]
- %87 = fadd float %83, %86 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=3]
- %90 = fmul float %13, %89 ; [#uses=1]
- %91 = fadd float %87, %90 ; [#uses=1]
- %92 = fadd float %91, %19 ; [#uses=3]
- %93 = fmul float %22, %82 ; [#uses=1]
- %94 = fmul float %25, %85 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %29, %89 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fadd float %97, %33 ; [#uses=3]
- %99 = fmul float %36, %82 ; [#uses=1]
- %100 = fmul float %39, %85 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %43, %89 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fadd float %103, %47 ; [#uses=3]
- %105 = getelementptr inbounds %struct.btQuadWord* %wv2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %104, float* %105, align 8
- %106 = getelementptr inbounds %struct.btQuadWord* %wv2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %98, float* %106, align 4
- %107 = getelementptr inbounds %struct.btQuadWord* %wv2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %92, float* %107, align 8
- %108 = getelementptr inbounds %struct.btQuadWord* %wv2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %108, align 4
- %109 = fadd float %20, %64 ; [#uses=1]
- %110 = fadd float %34, %70 ; [#uses=1]
- %111 = fadd float %48, %76 ; [#uses=1]
- %112 = fadd float %109, %92 ; [#uses=1]
- %113 = fadd float %110, %98 ; [#uses=1]
- %114 = fadd float %111, %104 ; [#uses=1]
- %115 = fmul float %112, 0x3FD5555560000000 ; [#uses=2]
- %116 = fmul float %113, 0x3FD5555560000000 ; [#uses=2]
- %117 = fmul float %114, 0x3FD5555560000000 ; [#uses=2]
- %118 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %117, float* %118, align 8
- %119 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %116, float* %119, align 4
- %120 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %115, float* %120, align 8
- %121 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %121, align 4
- %122 = fsub float %92, %20 ; [#uses=2]
- %123 = fsub float %98, %34 ; [#uses=2]
- %124 = fsub float %104, %48 ; [#uses=2]
- %125 = fsub float %64, %20 ; [#uses=2]
- %126 = fsub float %70, %34 ; [#uses=2]
- %127 = fsub float %76, %48 ; [#uses=2]
- %128 = fmul float %127, %123 ; [#uses=1]
- %129 = fmul float %126, %124 ; [#uses=1]
- %130 = fsub float %128, %129 ; [#uses=3]
- %131 = fmul float %125, %124 ; [#uses=1]
- %132 = fmul float %127, %122 ; [#uses=1]
- %133 = fsub float %131, %132 ; [#uses=3]
- %134 = fmul float %126, %122 ; [#uses=1]
- %135 = fmul float %125, %123 ; [#uses=1]
- %136 = fsub float %134, %135 ; [#uses=3]
- %137 = fmul float %136, %136 ; [#uses=1]
- %138 = fmul float %133, %133 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %130, %130 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = call float @sqrtf(float %141) nounwind readonly ; [#uses=1]
- %143 = fdiv float 1.000000e+00, %142 ; [#uses=3]
- %144 = fmul float %136, %143 ; [#uses=1]
- %145 = fmul float %133, %143 ; [#uses=1]
- %146 = fmul float %130, %143 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btQuadWord* %normalColor, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %147, align 8
- %148 = getelementptr inbounds %struct.btQuadWord* %normalColor, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %148, align 4
- %149 = getelementptr inbounds %struct.btQuadWord* %normalColor, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %149, align 8
- %150 = getelementptr inbounds %struct.btQuadWord* %normalColor, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %150, align 4
- %151 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 2 ; [#uses=4]
- %152 = load %struct.btActionInterface** %151, align 4 ; [#uses=2]
- %153 = getelementptr inbounds %struct.btActionInterface* %152, i32 0, i32 0 ; [#uses=1]
- %154 = load i32 (...)*** %153, align 4 ; [#uses=1]
- %155 = getelementptr inbounds i32 (...)** %154, i32 2 ; [#uses=1]
- %156 = load i32 (...)** %155, align 4 ; [#uses=1]
- %157 = fadd float %115, %146 ; [#uses=1]
- %158 = fadd float %116, %145 ; [#uses=1]
- %159 = fadd float %117, %144 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %159, float* %160, align 8
- %161 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %158, float* %161, align 4
- %162 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %157, float* %162, align 8
- %163 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %163, align 4
- %164 = bitcast i32 (...)* %156 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %164(%struct.btActionInterface* %152, %struct.btQuadWord* %center, %struct.btQuadWord* %0, %struct.btQuadWord* %normalColor)
- %165 = load %struct.btActionInterface** %151, align 4 ; [#uses=2]
- %166 = getelementptr inbounds %struct.btActionInterface* %165, i32 0, i32 0 ; [#uses=1]
- %167 = load i32 (...)*** %166, align 4 ; [#uses=1]
- %168 = getelementptr inbounds i32 (...)** %167, i32 2 ; [#uses=1]
- %169 = load i32 (...)** %168, align 4 ; [#uses=1]
- %170 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 3 ; [#uses=3]
- %171 = bitcast i32 (...)* %169 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %171(%struct.btActionInterface* %165, %struct.btQuadWord* %wv0, %struct.btQuadWord* %wv1, %struct.btQuadWord* %170)
- %172 = load %struct.btActionInterface** %151, align 4 ; [#uses=2]
- %173 = getelementptr inbounds %struct.btActionInterface* %172, i32 0, i32 0 ; [#uses=1]
- %174 = load i32 (...)*** %173, align 4 ; [#uses=1]
- %175 = getelementptr inbounds i32 (...)** %174, i32 2 ; [#uses=1]
- %176 = load i32 (...)** %175, align 4 ; [#uses=1]
- %177 = bitcast i32 (...)* %176 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %177(%struct.btActionInterface* %172, %struct.btQuadWord* %wv1, %struct.btQuadWord* %wv2, %struct.btQuadWord* %170)
- %178 = load %struct.btActionInterface** %151, align 4 ; [#uses=2]
- %179 = getelementptr inbounds %struct.btActionInterface* %178, i32 0, i32 0 ; [#uses=1]
- %180 = load i32 (...)*** %179, align 4 ; [#uses=1]
- %181 = getelementptr inbounds i32 (...)** %180, i32 2 ; [#uses=1]
- %182 = load i32 (...)** %181, align 4 ; [#uses=1]
- %183 = bitcast i32 (...)* %182 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %183(%struct.btActionInterface* %178, %struct.btQuadWord* %wv2, %struct.btQuadWord* %wv0, %struct.btQuadWord* %170)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17DebugDrawcallback28internalProcessTriangleIndexEP9btVector3ii(%struct.DebugDrawcallback* %this, %struct.btQuadWord* %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 2 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.DebugDrawcallback*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- tail call void %4(%struct.DebugDrawcallback* %this, %struct.btQuadWord* %triangle, i32 %partId, i32 %triangleIndex)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZThn4_N17DebugDrawcallbackD1Ev(%struct.DebugDrawcallback* %this) {
-entry:
- %0 = ptrtoint %struct.DebugDrawcallback* %this to i32 ; [#uses=1]
- %1 = add i32 %0, -4 ; [#uses=1]
- %2 = inttoptr i32 %1 to %struct.DebugDrawcallback* ; [#uses=4]
- %3 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %3, align 4
- %4 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %4, align 4
- %5 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %5)
- to label %_ZN17DebugDrawcallbackD1Ev.exit unwind label %lpad.i
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %entry
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %6 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %6)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN17DebugDrawcallbackD1Ev.exit: ; preds = %entry
- %7 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %7)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZThn4_N17DebugDrawcallbackD0Ev(%struct.DebugDrawcallback* %this) {
-entry:
- %0 = ptrtoint %struct.DebugDrawcallback* %this to i32 ; [#uses=1]
- %1 = add i32 %0, -4 ; [#uses=2]
- %2 = inttoptr i32 %1 to %struct.DebugDrawcallback* ; [#uses=4]
- %3 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %3, align 4
- %4 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %4, align 4
- %5 = getelementptr inbounds %struct.DebugDrawcallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %5)
- to label %_ZN17DebugDrawcallbackD0Ev.exit unwind label %lpad.i
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %entry
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %6 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %6)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN17DebugDrawcallbackD0Ev.exit: ; preds = %entry
- %7 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %7)
- %8 = inttoptr i32 %1 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %8) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZThn4_N17DebugDrawcallback28internalProcessTriangleIndexEP9btVector3ii(%struct.DebugDrawcallback* %this, %struct.btQuadWord* %triangle, i32 %partId, i32 %triangleIndex) {
-entry:
- %0 = ptrtoint %struct.DebugDrawcallback* %this to i32 ; [#uses=1]
- %1 = add i32 %0, -4 ; [#uses=1]
- %2 = inttoptr i32 %1 to %struct.DebugDrawcallback* ; [#uses=2]
- %3 = getelementptr inbounds %struct.DebugDrawcallback* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 2 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to void (%struct.DebugDrawcallback*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- tail call void %7(%struct.DebugDrawcallback* %2, %struct.btQuadWord* %triangle, i32 %partId, i32 %triangleIndex)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN16btCollisionWorld14debugDrawWorldEv(%struct.btCollisionWorld* %this) align 2 {
-entry:
- %color = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %color31 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %minAabb = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %maxAabb = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %colorvec = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 0 ; [#uses=8]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 4 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %5 = call %struct.btActionInterface* %4(%struct.btCollisionWorld* %this) ; [#uses=1]
- %6 = icmp eq %struct.btActionInterface* %5, null ; [#uses=1]
- br i1 %6, label %bb10, label %bb
-
-bb: ; preds = %entry
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %11 = call %struct.btActionInterface* %10(%struct.btCollisionWorld* %this) ; [#uses=2]
- %12 = getelementptr inbounds %struct.btActionInterface* %11, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 12 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %17 = call i32 %16(%struct.btActionInterface* %11) ; [#uses=1]
- %18 = and i32 %17, 8 ; [#uses=1]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- br i1 %19, label %bb10, label %bb4
-
-bb4: ; preds = %bb
- %20 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=2]
- %21 = load %struct.btActionInterface** %20, align 4 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btActionInterface* %21, i32 0, i32 0 ; [#uses=1]
- %23 = load i32 (...)*** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 9 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %27 = call i32 %26(%struct.btActionInterface* %21) ; [#uses=2]
- %28 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 8
- %29 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 8
- %31 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = icmp sgt i32 %27, 0 ; [#uses=1]
- br i1 %32, label %bb5, label %bb10
-
-bb5: ; preds = %bb8, %bb4
- %33 = phi i32 [ %57, %bb8 ], [ 0, %bb4 ] ; [#uses=2]
- %34 = load %struct.btActionInterface** %20, align 4 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btActionInterface* %34, i32 0, i32 0 ; [#uses=1]
- %36 = load i32 (...)*** %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 10 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = bitcast i32 (...)* %38 to %struct.btPersistentManifold* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %40 = call %struct.btPersistentManifold* %39(%struct.btActionInterface* %34, i32 %33) ; [#uses=5]
- %41 = getelementptr inbounds %struct.btPersistentManifold* %40, i32 0, i32 4 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=2]
- %43 = icmp sgt i32 %42, 0 ; [#uses=1]
- br i1 %43, label %bb6, label %bb8
-
-bb6: ; preds = %bb6, %bb5
- %j.082 = phi i32 [ %56, %bb6 ], [ 0, %bb5 ] ; [#uses=5]
- %scevgep = getelementptr %struct.btPersistentManifold* %40, i32 0, i32 1, i32 %j.082, i32 21 ; [#uses=1]
- %scevgep87 = getelementptr %struct.btPersistentManifold* %40, i32 0, i32 1, i32 %j.082, i32 5 ; [#uses=1]
- %scevgep88 = getelementptr %struct.btPersistentManifold* %40, i32 0, i32 1, i32 %j.082, i32 4, i32 0, i32 0 ; [#uses=1]
- %scevgep8889 = bitcast float* %scevgep88 to %struct.btQuadWord* ; [#uses=1]
- %scevgep90 = getelementptr %struct.btPersistentManifold* %40, i32 0, i32 1, i32 %j.082, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep9091 = bitcast float* %scevgep90 to %struct.btQuadWord* ; [#uses=1]
- %44 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %45 = getelementptr inbounds i32 (...)** %44, i32 4 ; [#uses=1]
- %46 = load i32 (...)** %45, align 4 ; [#uses=1]
- %47 = bitcast i32 (...)* %46 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %48 = call %struct.btActionInterface* %47(%struct.btCollisionWorld* %this) ; [#uses=2]
- %49 = getelementptr inbounds %struct.btActionInterface* %48, i32 0, i32 0 ; [#uses=1]
- %50 = load i32 (...)*** %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds i32 (...)** %50, i32 8 ; [#uses=1]
- %52 = load i32 (...)** %51, align 4 ; [#uses=1]
- %53 = load i32* %scevgep, align 4 ; [#uses=1]
- %54 = load float* %scevgep87, align 4 ; [#uses=1]
- %55 = bitcast i32 (...)* %52 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %55(%struct.btActionInterface* %48, %struct.btQuadWord* %scevgep9091, %struct.btQuadWord* %scevgep8889, float %54, i32 %53, %struct.btQuadWord* %color)
- %56 = add nsw i32 %j.082, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %56, %42 ; [#uses=1]
- br i1 %exitcond, label %bb8, label %bb6
-
-bb8: ; preds = %bb6, %bb5
- %57 = add nsw i32 %33, 1 ; [#uses=2]
- %exitcond92 = icmp eq i32 %57, %27 ; [#uses=1]
- br i1 %exitcond92, label %bb10, label %bb5
-
-bb10: ; preds = %bb8, %bb4, %bb, %entry
- %58 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 4 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %62 = call %struct.btActionInterface* %61(%struct.btCollisionWorld* %this) ; [#uses=1]
- %63 = icmp eq %struct.btActionInterface* %62, null ; [#uses=1]
- br i1 %63, label %bb13, label %bb11
-
-bb11: ; preds = %bb10
- %64 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %65 = getelementptr inbounds i32 (...)** %64, i32 4 ; [#uses=1]
- %66 = load i32 (...)** %65, align 4 ; [#uses=1]
- %67 = bitcast i32 (...)* %66 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %68 = call %struct.btActionInterface* %67(%struct.btCollisionWorld* %this) ; [#uses=2]
- %69 = getelementptr inbounds %struct.btActionInterface* %68, i32 0, i32 0 ; [#uses=1]
- %70 = load i32 (...)*** %69, align 4 ; [#uses=1]
- %71 = getelementptr inbounds i32 (...)** %70, i32 12 ; [#uses=1]
- %72 = load i32 (...)** %71, align 4 ; [#uses=1]
- %73 = bitcast i32 (...)* %72 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %74 = call i32 %73(%struct.btActionInterface* %68) ; [#uses=1]
- %75 = and i32 %74, 3 ; [#uses=1]
- %76 = icmp eq i32 %75, 0 ; [#uses=1]
- br i1 %76, label %bb13, label %bb47.preheader
-
-bb47.preheader: ; preds = %bb11
- %77 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %78 = load i32* %77, align 4 ; [#uses=1]
- %79 = icmp sgt i32 %78, 0 ; [#uses=1]
- br i1 %79, label %bb.nph86, label %bb13
-
-bb13: ; preds = %bb46, %bb47.preheader, %bb11, %bb10
- ret void
-
-bb.nph86: ; preds = %bb47.preheader
- %80 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 6 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btQuadWord* %colorvec, i32 0, i32 0, i32 0 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btQuadWord* %colorvec, i32 0, i32 0, i32 1 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %colorvec, i32 0, i32 0, i32 2 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btQuadWord* %colorvec, i32 0, i32 0, i32 3 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btQuadWord* %color31, i32 0, i32 0, i32 0 ; [#uses=7]
- %87 = getelementptr inbounds %struct.btQuadWord* %color31, i32 0, i32 0, i32 1 ; [#uses=7]
- %88 = getelementptr inbounds %struct.btQuadWord* %color31, i32 0, i32 0, i32 2 ; [#uses=7]
- %89 = getelementptr inbounds %struct.btQuadWord* %color31, i32 0, i32 0, i32 3 ; [#uses=7]
- br label %bb18
-
-bb18: ; preds = %bb46, %bb.nph86
- %i17.085 = phi i32 [ 0, %bb.nph86 ], [ %tmp, %bb46 ] ; [#uses=2]
- %tmp = add i32 %i17.085, 1 ; [#uses=2]
- %90 = load %struct.btCollisionObject*** %80, align 4 ; [#uses=1]
- %scevgep93 = getelementptr %struct.btCollisionObject** %90, i32 %i17.085 ; [#uses=1]
- %91 = load %struct.btCollisionObject** %scevgep93, align 4 ; [#uses=6]
- %92 = getelementptr inbounds %struct.btCollisionObject* %91, i32 0, i32 12 ; [#uses=1]
- %93 = load i32* %92, align 4 ; [#uses=1]
- %.lobit = and i32 %93, 32 ; [#uses=1]
- %toBool19 = icmp eq i32 %.lobit, 0 ; [#uses=1]
- br i1 %toBool19, label %bb20, label %bb46
-
-bb20: ; preds = %bb18
- %94 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %95 = getelementptr inbounds i32 (...)** %94, i32 4 ; [#uses=1]
- %96 = load i32 (...)** %95, align 4 ; [#uses=1]
- %97 = bitcast i32 (...)* %96 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %98 = call %struct.btActionInterface* %97(%struct.btCollisionWorld* %this) ; [#uses=1]
- %99 = icmp eq %struct.btActionInterface* %98, null ; [#uses=1]
- br i1 %99, label %bb39, label %bb21
-
-bb21: ; preds = %bb20
- %100 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %101 = getelementptr inbounds i32 (...)** %100, i32 4 ; [#uses=1]
- %102 = load i32 (...)** %101, align 4 ; [#uses=1]
- %103 = bitcast i32 (...)* %102 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %104 = call %struct.btActionInterface* %103(%struct.btCollisionWorld* %this) ; [#uses=2]
- %105 = getelementptr inbounds %struct.btActionInterface* %104, i32 0, i32 0 ; [#uses=1]
- %106 = load i32 (...)*** %105, align 4 ; [#uses=1]
- %107 = getelementptr inbounds i32 (...)** %106, i32 12 ; [#uses=1]
- %108 = load i32 (...)** %107, align 4 ; [#uses=1]
- %109 = bitcast i32 (...)* %108 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %110 = call i32 %109(%struct.btActionInterface* %104) ; [#uses=1]
- %111 = and i32 %110, 1 ; [#uses=1]
- %toBool25 = icmp eq i32 %111, 0 ; [#uses=1]
- br i1 %toBool25, label %bb39, label %bb30
-
-bb30: ; preds = %bb21
- store float 1.000000e+00, float* %86, align 8
- store float 1.000000e+00, float* %87, align 4
- store float 1.000000e+00, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- %112 = getelementptr inbounds %struct.btCollisionObject* %91, i32 0, i32 15 ; [#uses=1]
- %113 = load i32* %112, align 4 ; [#uses=1]
- switch i32 %113, label %bb37 [
- i32 1, label %bb32
- i32 2, label %bb33
- i32 3, label %bb34
- i32 4, label %bb35
- i32 5, label %bb36
- ]
-
-bb32: ; preds = %bb30
- store float 1.000000e+00, float* %86, align 8
- store float 1.000000e+00, float* %87, align 4
- store float 1.000000e+00, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- br label %bb38
-
-bb33: ; preds = %bb30
- store float 0.000000e+00, float* %86, align 8
- store float 1.000000e+00, float* %87, align 4
- store float 0.000000e+00, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- br label %bb38
-
-bb34: ; preds = %bb30
- store float 0.000000e+00, float* %86, align 8
- store float 1.000000e+00, float* %87, align 4
- store float 1.000000e+00, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- br label %bb38
-
-bb35: ; preds = %bb30
- store float 1.000000e+00, float* %86, align 8
- store float 0.000000e+00, float* %87, align 4
- store float 0.000000e+00, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- br label %bb38
-
-bb36: ; preds = %bb30
- store float 1.000000e+00, float* %86, align 8
- store float 1.000000e+00, float* %87, align 4
- store float 0.000000e+00, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- br label %bb38
-
-bb37: ; preds = %bb30
- store float 1.000000e+00, float* %86, align 8
- store float 0.000000e+00, float* %87, align 4
- store float 0.000000e+00, float* %88, align 8
- store float 0.000000e+00, float* %89, align 4
- br label %bb38
-
-bb38: ; preds = %bb37, %bb36, %bb35, %bb34, %bb33, %bb32
- %114 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %115 = getelementptr inbounds i32 (...)** %114, i32 6 ; [#uses=1]
- %116 = load i32 (...)** %115, align 4 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btCollisionObject* %91, i32 0, i32 9 ; [#uses=1]
- %118 = load %struct.btCollisionShape** %117, align 4 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btCollisionObject* %91, i32 0, i32 1 ; [#uses=1]
- %120 = bitcast i32 (...)* %116 to void (%struct.btCollisionWorld*, %struct.btTransform*, %struct.btCollisionShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %120(%struct.btCollisionWorld* %this, %struct.btTransform* %119, %struct.btCollisionShape* %118, %struct.btQuadWord* %color31)
- br label %bb39
-
-bb39: ; preds = %bb38, %bb21, %bb20
- %121 = load %struct.btActionInterface** %81, align 4 ; [#uses=3]
- %122 = icmp eq %struct.btActionInterface* %121, null ; [#uses=1]
- br i1 %122, label %bb46, label %bb40
-
-bb40: ; preds = %bb39
- %123 = getelementptr inbounds %struct.btActionInterface* %121, i32 0, i32 0 ; [#uses=1]
- %124 = load i32 (...)*** %123, align 4 ; [#uses=1]
- %125 = getelementptr inbounds i32 (...)** %124, i32 12 ; [#uses=1]
- %126 = load i32 (...)** %125, align 4 ; [#uses=1]
- %127 = bitcast i32 (...)* %126 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %128 = call i32 %127(%struct.btActionInterface* %121) ; [#uses=1]
- %129 = and i32 %128, 2 ; [#uses=1]
- %130 = icmp eq i32 %129, 0 ; [#uses=1]
- br i1 %130, label %bb46, label %bb45
-
-bb45: ; preds = %bb40
- store float 1.000000e+00, float* %82, align 8
- store float 0.000000e+00, float* %83, align 4
- store float 0.000000e+00, float* %84, align 8
- store float 0.000000e+00, float* %85, align 4
- %131 = getelementptr inbounds %struct.btCollisionObject* %91, i32 0, i32 9 ; [#uses=1]
- %132 = load %struct.btCollisionShape** %131, align 4 ; [#uses=2]
- %133 = getelementptr inbounds %struct.btCollisionShape* %132, i32 0, i32 0 ; [#uses=1]
- %134 = load i32 (...)*** %133, align 4 ; [#uses=1]
- %135 = getelementptr inbounds i32 (...)** %134, i32 2 ; [#uses=1]
- %136 = load i32 (...)** %135, align 4 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btCollisionObject* %91, i32 0, i32 1 ; [#uses=1]
- %138 = bitcast i32 (...)* %136 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %138(%struct.btCollisionShape* %132, %struct.btTransform* %137, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb)
- %139 = load %struct.btActionInterface** %81, align 4 ; [#uses=2]
- %140 = getelementptr inbounds %struct.btActionInterface* %139, i32 0, i32 0 ; [#uses=1]
- %141 = load i32 (...)*** %140, align 4 ; [#uses=1]
- %142 = getelementptr inbounds i32 (...)** %141, i32 13 ; [#uses=1]
- %143 = load i32 (...)** %142, align 4 ; [#uses=1]
- %144 = bitcast i32 (...)* %143 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %144(%struct.btActionInterface* %139, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb, %struct.btQuadWord* %colorvec)
- br label %bb46
-
-bb46: ; preds = %bb45, %bb40, %bb39, %bb18
- %145 = load i32* %77, align 4 ; [#uses=1]
- %146 = icmp sgt i32 %145, %tmp ; [#uses=1]
- br i1 %146, label %bb18, label %bb13
-}
-
-; [#uses=5]
-define void @_ZN16btCollisionWorld21removeCollisionObjectEP17btCollisionObject(%struct.btCollisionWorld* nocapture %this, %struct.btCollisionObject* %collisionObject) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 8 ; [#uses=2]
- %1 = load %struct.btBroadphaseProxy** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btBroadphaseProxy* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=2]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 9 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btActionInterface*)* ; [#uses=1]
- %10 = tail call %struct..0btMultiSapOverlapFilterCallback* %9(%struct.btActionInterface* %4) ; [#uses=2]
- %11 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %10, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 10 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=2]
- %16 = load %struct.btActionInterface** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %14 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %17(%struct..0btMultiSapOverlapFilterCallback* %10, %struct.btBroadphaseProxy* %1, %struct.btActionInterface* %16)
- %18 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btActionInterface* %18, i32 0, i32 0 ; [#uses=1]
- %20 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32 (...)** %20, i32 3 ; [#uses=1]
- %22 = load i32 (...)** %21, align 4 ; [#uses=1]
- %23 = load %struct.btActionInterface** %15, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %22 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %24(%struct.btActionInterface* %18, %struct.btBroadphaseProxy* %1, %struct.btActionInterface* %23)
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %0, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %25 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %26 = load i32* %25, align 4 ; [#uses=4]
- %27 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- br label %bb3.i.i
-
-bb.i.i: ; preds = %bb3.i.i
- %28 = load %struct.btCollisionObject*** %27, align 4 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btCollisionObject** %28, i32 %32 ; [#uses=1]
- %29 = load %struct.btCollisionObject** %scevgep.i.i, align 4 ; [#uses=1]
- %30 = icmp eq %struct.btCollisionObject* %29, %collisionObject ; [#uses=1]
- br i1 %30, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit.i, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb.i.i
- %31 = add nsw i32 %32, 1 ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %bb1
- %32 = phi i32 [ 0, %bb1 ], [ %31, %bb2.i.i ] ; [#uses=4]
- %33 = icmp sgt i32 %26, %32 ; [#uses=1]
- br i1 %33, label %bb.i.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit.i
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit.i: ; preds = %bb3.i.i, %bb.i.i
- %index.0.i.i = phi i32 [ %26, %bb3.i.i ], [ %32, %bb.i.i ] ; [#uses=2]
- %34 = icmp sgt i32 %26, %index.0.i.i ; [#uses=1]
- br i1 %34, label %bb.i, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6removeERKS1_.exit
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit.i
- %35 = add nsw i32 %26, -1 ; [#uses=2]
- %36 = load %struct.btCollisionObject*** %27, align 4 ; [#uses=2]
- %37 = getelementptr inbounds %struct.btCollisionObject** %36, i32 %index.0.i.i ; [#uses=2]
- %38 = load %struct.btCollisionObject** %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionObject** %36, i32 %35 ; [#uses=1]
- %40 = load %struct.btCollisionObject** %39, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %40, %struct.btCollisionObject** %37, align 4
- %41 = load %struct.btCollisionObject*** %27, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCollisionObject** %41, i32 %35 ; [#uses=1]
- store %struct.btCollisionObject* %38, %struct.btCollisionObject** %42, align 4
- %43 = load i32* %25, align 4 ; [#uses=1]
- %44 = add nsw i32 %43, -1 ; [#uses=1]
- store i32 %44, i32* %25, align 4
- ret void
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE6removeERKS1_.exit: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit.i
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btBridgedManifoldResultD0Ev(%struct.btBridgedManifoldResult* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btBridgedManifoldResult, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btBridgedManifoldResult* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btBridgedManifoldResultD1Ev(%struct.btBridgedManifoldResult* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBridgedManifoldResult* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btBridgedManifoldResult, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btCollisionWorld11contactTestEP17btCollisionObjectRNS_21ContactResultCallbackE(%struct.btCollisionWorld* %this, %struct.btCollisionObject* %colObj, %"struct.btCollisionWorld::ContactResultCallback"* %resultCallback) align 2 {
-entry:
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %contactCB = alloca %struct.btSingleContactCallback, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 9 ; [#uses=1]
- %1 = load %struct.btCollisionShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCollisionShape* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1 ; [#uses=1]
- %7 = bitcast i32 (...)* %5 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %7(%struct.btCollisionShape* %1, %struct.btTransform* %6, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %8 = getelementptr inbounds %struct.btSingleContactCallback* %contactCB, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btSingleContactCallback, i32 0, i32 2), i32 (...)*** %8, align 8
- %9 = getelementptr inbounds %struct.btSingleContactCallback* %contactCB, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %colObj, %struct.btCollisionObject** %9, align 4
- %10 = getelementptr inbounds %struct.btSingleContactCallback* %contactCB, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionWorld* %this, %struct.btCollisionWorld** %10, align 8
- %11 = getelementptr inbounds %struct.btSingleContactCallback* %contactCB, i32 0, i32 3 ; [#uses=1]
- store %"struct.btCollisionWorld::ContactResultCallback"* %resultCallback, %"struct.btCollisionWorld::ContactResultCallback"** %11, align 4
- %12 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=1]
- %13 = load %struct.btActionInterface** %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 7 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- %19 = getelementptr inbounds %struct.btSingleContactCallback* %contactCB, i32 0, i32 0 ; [#uses=1]
- invoke void %18(%struct.btActionInterface* %13, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, %struct.btActionInterface* %19)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btSingleContactCallback, i32 0, i32 2), i32 (...)*** %8, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btSingleSweepCallbackD0Ev(%struct.btSingleSweepCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21btSingleSweepCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btSingleSweepCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btSingleSweepCallbackD1Ev(%struct.btSingleSweepCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21btSingleSweepCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN21btSingleSweepCallback7processEPK17btBroadphaseProxy(%struct.btSingleSweepCallback* %this, %struct.btBroadphaseProxy* nocapture %proxy) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 5 ; [#uses=2]
- %1 = load %"struct.btCollisionWorld::ConvexResultCallback"** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %1, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fcmp oeq float %3, 0.000000e+00 ; [#uses=1]
- br i1 %4, label %bb4, label %bb1
-
-bb1: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %1, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 2 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i8* %6, i32 188 ; [#uses=1]
- %12 = bitcast i8* %11 to %struct.btBroadphaseProxy** ; [#uses=1]
- %13 = load %struct.btBroadphaseProxy** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %10 to i8 (%"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %15 = tail call zeroext i8 %14(%"struct.btCollisionWorld::ConvexResultCallback"* %1, %struct.btBroadphaseProxy* %13) ; [#uses=1]
- %toBool = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %16 = bitcast i8* %6 to %struct.btCollisionObject* ; [#uses=1]
- %17 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 6 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = load %"struct.btCollisionWorld::ConvexResultCallback"** %0, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %6, i32 4 ; [#uses=1]
- %21 = bitcast i8* %20 to %struct.btTransform* ; [#uses=1]
- %22 = getelementptr inbounds i8* %6, i32 192 ; [#uses=1]
- %23 = bitcast i8* %22 to %struct.btCollisionShape** ; [#uses=1]
- %24 = load %struct.btCollisionShape** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 7 ; [#uses=1]
- %28 = load %struct.btConvexShape** %27, align 4 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEf(%struct.btConvexShape* %28, %struct.btTransform* %26, %struct.btTransform* %25, %struct.btCollisionObject* %16, %struct.btCollisionShape* %24, %struct.btTransform* %21, %"struct.btCollisionWorld::ConvexResultCallback"* %19, float %18)
- ret i8 1
-
-bb4: ; preds = %bb1, %entry
- %.0 = phi i8 [ 0, %entry ], [ 1, %bb1 ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19btSingleRayCallbackD0Ev(%struct.btSingleRayCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleRayCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV19btSingleRayCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btSingleRayCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19btSingleRayCallbackD1Ev(%struct.btSingleRayCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleRayCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV19btSingleRayCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN19btSingleRayCallback7processEPK17btBroadphaseProxy(%struct.btSingleRayCallback* %this, %struct.btBroadphaseProxy* nocapture %proxy) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleRayCallback* %this, i32 0, i32 7 ; [#uses=2]
- %1 = load %"struct.btCollisionWorld::RayResultCallback"** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %1, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fcmp oeq float %3, 0.000000e+00 ; [#uses=1]
- br i1 %4, label %bb4, label %bb1
-
-bb1: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %1, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 2 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i8* %6, i32 188 ; [#uses=1]
- %12 = bitcast i8* %11 to %struct.btBroadphaseProxy** ; [#uses=1]
- %13 = load %struct.btBroadphaseProxy** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %10 to i8 (%"struct.btCollisionWorld::RayResultCallback"*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %15 = tail call zeroext i8 %14(%"struct.btCollisionWorld::RayResultCallback"* %1, %struct.btBroadphaseProxy* %13) ; [#uses=1]
- %toBool = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %16 = bitcast i8* %6 to %struct.btCollisionObject* ; [#uses=1]
- %17 = load %"struct.btCollisionWorld::RayResultCallback"** %0, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i8* %6, i32 4 ; [#uses=1]
- %19 = bitcast i8* %18 to %struct.btTransform* ; [#uses=1]
- %20 = getelementptr inbounds i8* %6, i32 192 ; [#uses=1]
- %21 = bitcast i8* %20 to %struct.btCollisionShape** ; [#uses=1]
- %22 = load %struct.btCollisionShape** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btSingleRayCallback* %this, i32 0, i32 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btSingleRayCallback* %this, i32 0, i32 3 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackE(%struct.btTransform* %24, %struct.btTransform* %23, %struct.btCollisionObject* %16, %struct.btCollisionShape* %22, %struct.btTransform* %19, %"struct.btCollisionWorld::RayResultCallback"* %17)
- ret i8 1
-
-bb4: ; preds = %bb1, %entry
- %.0 = phi i8 [ 0, %entry ], [ 1, %bb1 ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=0]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN14LocalInfoAdderD2Ev(%struct..5LocalInfoAdder* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..5LocalInfoAdder* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN15LocalInfoAdder2D2Ev(%struct..2LocalInfoAdder2* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..2LocalInfoAdder2* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN9btHashMapI9btHashPtrP16btCollisionShapeED1Ev(%"struct.btHashMap<btHashPtr,btCollisionShape*>"* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %1 = load %struct.btHashPtr** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btHashPtr* %1, null ; [#uses=1]
- br i1 %2, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %5 = bitcast %struct.btHashPtr* %1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb2.i.i.i unwind label %lpad29
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btHashPtr* null, %struct.btHashPtr** %0, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %6 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.btHashPtr* null, %struct.btHashPtr** %0, align 4
- %7 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %10 = load %struct.btCollisionShape*** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btCollisionShape** %10, null ; [#uses=1]
- br i1 %11, label %bb10, label %bb.i.i.i52
-
-bb.i.i.i52: ; preds = %bb3
- %12 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i51 = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i51, label %bb2.i.i.i54, label %bb1.i.i.i53
-
-bb1.i.i.i53: ; preds = %bb.i.i.i52
- %14 = bitcast %struct.btCollisionShape** %10 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i.i54 unwind label %lpad25
-
-bb2.i.i.i54: ; preds = %bb1.i.i.i53, %bb.i.i.i52
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %9, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i54, %bb3
- %15 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %15, align 4
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %9, align 4
- %16 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %19 = load i32** %18, align 4 ; [#uses=2]
- %20 = icmp eq i32* %19, null ; [#uses=1]
- br i1 %20, label %bb19, label %bb.i.i.i57
-
-bb.i.i.i57: ; preds = %bb10
- %21 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i56 = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i.i56, label %bb2.i.i.i59, label %bb1.i.i.i58
-
-bb1.i.i.i58: ; preds = %bb.i.i.i57
- %23 = bitcast i32* %19 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %23)
- to label %bb2.i.i.i59 unwind label %lpad
-
-bb2.i.i.i59: ; preds = %bb1.i.i.i58, %bb.i.i.i57
- store i32* null, i32** %18, align 4
- br label %bb19
-
-invcont17: ; preds = %bb2.i.i.i75, %ppad
- %24 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store i32* null, i32** %48, align 4
- %25 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %25, align 4
- %26 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %26, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-
-bb19: ; preds = %bb2.i.i.i59, %bb10
- %27 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store i32* null, i32** %18, align 4
- %28 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %31 = load i32** %30, align 4 ; [#uses=2]
- %32 = icmp eq i32* %31, null ; [#uses=1]
- br i1 %32, label %_ZN20btAlignedObjectArrayIiED1Ev.exit65, label %bb.i.i.i62
-
-bb.i.i.i62: ; preds = %bb19
- %33 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %34 = load i8* %33, align 4 ; [#uses=1]
- %toBool.i.i.i61 = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i61, label %bb2.i.i.i64, label %bb1.i.i.i63
-
-bb1.i.i.i63: ; preds = %bb.i.i.i62
- %35 = bitcast i32* %31 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %35)
- br label %bb2.i.i.i64
-
-bb2.i.i.i64: ; preds = %bb1.i.i.i63, %bb.i.i.i62
- store i32* null, i32** %30, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit65
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit65: ; preds = %bb2.i.i.i64, %bb19
- %36 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %36, align 4
- store i32* null, i32** %30, align 4
- %37 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %37, align 4
- %38 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %38, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i58
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select24 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad25: ; preds = %bb1.i.i.i53
- %eh_ptr26 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad45
-
-lpad29: ; preds = %bb1.i.i.i
- %eh_ptr30 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select32 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr30, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %39 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %40 = load %struct.btCollisionShape*** %39, align 4 ; [#uses=2]
- %41 = icmp eq %struct.btCollisionShape** %40, null ; [#uses=1]
- br i1 %41, label %_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev.exit71, label %bb.i.i.i67
-
-bb.i.i.i67: ; preds = %lpad29
- %42 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %43 = load i8* %42, align 4 ; [#uses=1]
- %toBool.i.i.i66 = icmp eq i8 %43, 0 ; [#uses=1]
- br i1 %toBool.i.i.i66, label %bb2.i.i.i69, label %bb1.i.i.i68
-
-bb1.i.i.i68: ; preds = %bb.i.i.i67
- %44 = bitcast %struct.btCollisionShape** %40 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %44)
- to label %bb2.i.i.i69 unwind label %lpad33
-
-bb2.i.i.i69: ; preds = %bb1.i.i.i68, %bb.i.i.i67
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %39, align 4
- br label %_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev.exit71
-
-_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev.exit71: ; preds = %bb2.i.i.i69, %lpad29
- %45 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %45, align 4
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %39, align 4
- %46 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %46, align 4
- %47 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %47, align 4
- br label %ppad45
-
-lpad33: ; preds = %bb1.i.i.i68
- %eh_ptr34 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select36 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr34, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad37: ; preds = %bb1.i.i.i80
- %eh_ptr38 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select40 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr38, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad41: ; preds = %bb1.i.i.i74
- %eh_ptr42 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select44 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr42, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit83, %lpad
- %eh_exception.1 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIiED1Ev.exit83 ] ; [#uses=1]
- %48 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %49 = load i32** %48, align 4 ; [#uses=2]
- %50 = icmp eq i32* %49, null ; [#uses=1]
- br i1 %50, label %invcont17, label %bb.i.i.i73
-
-bb.i.i.i73: ; preds = %ppad
- %51 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %52 = load i8* %51, align 4 ; [#uses=1]
- %toBool.i.i.i72 = icmp eq i8 %52, 0 ; [#uses=1]
- br i1 %toBool.i.i.i72, label %bb2.i.i.i75, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %bb.i.i.i73
- %53 = bitcast i32* %49 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %53)
- to label %bb2.i.i.i75 unwind label %lpad41
-
-bb2.i.i.i75: ; preds = %bb1.i.i.i74, %bb.i.i.i73
- store i32* null, i32** %48, align 4
- br label %invcont17
-
-ppad45: ; preds = %_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev.exit71, %lpad25
- %eh_exception.0 = phi i8* [ %eh_ptr26, %lpad25 ], [ %eh_ptr30, %_ZN20btAlignedObjectArrayIP16btCollisionShapeED1Ev.exit71 ] ; [#uses=1]
- %54 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %55 = load i32** %54, align 4 ; [#uses=2]
- %56 = icmp eq i32* %55, null ; [#uses=1]
- br i1 %56, label %_ZN20btAlignedObjectArrayIiED1Ev.exit83, label %bb.i.i.i79
-
-bb.i.i.i79: ; preds = %ppad45
- %57 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %58 = load i8* %57, align 4 ; [#uses=1]
- %toBool.i.i.i78 = icmp eq i8 %58, 0 ; [#uses=1]
- br i1 %toBool.i.i.i78, label %bb2.i.i.i81, label %bb1.i.i.i80
-
-bb1.i.i.i80: ; preds = %bb.i.i.i79
- %59 = bitcast i32* %55 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %59)
- to label %bb2.i.i.i81 unwind label %lpad37
-
-bb2.i.i.i81: ; preds = %bb1.i.i.i80, %bb.i.i.i79
- store i32* null, i32** %54, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit83
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit83: ; preds = %bb2.i.i.i81, %ppad45
- %60 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %60, align 4
- store i32* null, i32** %54, align 4
- %61 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %61, align 4
- %62 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %62, align 4
- br label %ppad
-}
-
-; [#uses=1]
-define void @_ZN16btCollisionWorldD0Ev(%struct.btCollisionWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV16btCollisionWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=6]
- %3 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=2]
- br label %bb5
-
-bb: ; preds = %bb5
- %scevgep = getelementptr %struct.btCollisionObject** %33, i32 %30 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 8 ; [#uses=2]
- %7 = load %struct.btBroadphaseProxy** %6, align 4 ; [#uses=3]
- %8 = icmp eq %struct.btBroadphaseProxy* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb1
-
-bb1: ; preds = %bb
- %9 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btActionInterface* %9, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 9 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btActionInterface*)* ; [#uses=1]
- %15 = invoke %struct..0btMultiSapOverlapFilterCallback* %14(%struct.btActionInterface* %9)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %bb1
- %16 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %15, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 10 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = load %struct.btActionInterface** %4, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %19 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %21(%struct..0btMultiSapOverlapFilterCallback* %15, %struct.btBroadphaseProxy* %7, %struct.btActionInterface* %20)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %invcont
- %22 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btActionInterface* %22, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 3 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = load %struct.btActionInterface** %4, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %26 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %28(%struct.btActionInterface* %22, %struct.btBroadphaseProxy* %7, %struct.btActionInterface* %27)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %invcont2
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %6, align 4
- br label %bb4
-
-bb4: ; preds = %invcont3, %bb
- %29 = add nsw i32 %30, 1 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %entry
- %30 = phi i32 [ 0, %entry ], [ %29, %bb4 ] ; [#uses=3]
- %31 = load i32* %1, align 4 ; [#uses=1]
- %32 = icmp sgt i32 %31, %30 ; [#uses=1]
- %33 = load %struct.btCollisionObject*** %2, align 4 ; [#uses=3]
- br i1 %32, label %bb, label %bb9
-
-invcont7: ; preds = %bb2.i.i.i, %lpad
- %34 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- store i32 0, i32* %1, align 4
- %35 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %35, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9: ; preds = %bb5
- %36 = icmp eq %struct.btCollisionObject** %33, null ; [#uses=1]
- br i1 %36, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit26, label %bb.i.i.i23
-
-bb.i.i.i23: ; preds = %bb9
- %37 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %38 = load i8* %37, align 4 ; [#uses=1]
- %toBool.i.i.i22 = icmp eq i8 %38, 0 ; [#uses=1]
- br i1 %toBool.i.i.i22, label %bb2.i.i.i25, label %bb1.i.i.i24
-
-bb1.i.i.i24: ; preds = %bb.i.i.i23
- %39 = bitcast %struct.btCollisionObject** %33 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %39)
- br label %bb2.i.i.i25
-
-bb2.i.i.i25: ; preds = %bb1.i.i.i24, %bb.i.i.i23
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit26
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit26: ; preds = %bb2.i.i.i25, %bb9
- %40 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %40, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- store i32 0, i32* %1, align 4
- %41 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %41, align 4
- %42 = bitcast %struct.btCollisionWorld* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %42) nounwind
- ret void
-
-lpad: ; preds = %invcont2, %invcont, %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %43 = load %struct.btCollisionObject*** %2, align 4 ; [#uses=2]
- %44 = icmp eq %struct.btCollisionObject** %43, null ; [#uses=1]
- br i1 %44, label %invcont7, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %45 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %46 = load i8* %45, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %46, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %47 = bitcast %struct.btCollisionObject** %43 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %47)
- to label %bb2.i.i.i unwind label %lpad16
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- br label %invcont7
-
-lpad16: ; preds = %bb1.i.i.i
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btCollisionWorldD1Ev(%struct.btCollisionWorld* nocapture %this) align 2 {
-entry:
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btCollisionWorld11updateAabbsEv(%struct.btCollisionWorld* nocapture %this) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([12 x i8]* @.str1217, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 7 ; [#uses=1]
- br label %bb9
-
-bb: ; preds = %bb9
- %3 = load %struct.btCollisionObject*** %1, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %3, i32 %9 ; [#uses=1]
- %4 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=2]
- %5 = load i8* %2, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb7
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 15 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- switch i32 %7, label %bb7 [
- i32 2, label %bb8
- i32 5, label %bb8
- ]
-
-bb7: ; preds = %bb1, %bb
- invoke void @_ZN16btCollisionWorld16updateSingleAabbEP17btCollisionObject(%struct.btCollisionWorld* %this, %struct.btCollisionObject* %4)
- to label %bb8 unwind label %lpad
-
-bb8: ; preds = %bb7, %bb1, %bb1
- %8 = add nsw i32 %9, 1 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb8, %entry
- %9 = phi i32 [ 0, %entry ], [ %8, %bb8 ] ; [#uses=3]
- %10 = load i32* %0, align 4 ; [#uses=1]
- %11 = icmp sgt i32 %10, %9 ; [#uses=1]
- br i1 %11, label %bb, label %bb14
-
-invcont12: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb14: ; preds = %bb9
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb7
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select16 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont12 unwind label %lpad17
-
-lpad17: ; preds = %lpad
- %eh_ptr18 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr18, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btCollisionWorld15debugDrawObjectERK11btTransformPK16btCollisionShapeRK9btVector3(%struct.btCollisionWorld* %this, %struct.btTransform* %worldTransform, %struct.btCollisionShape* %shape, %struct.btQuadWord* %color) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %5 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %6 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %7 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %8 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %9 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %10 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %11 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %12 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %13 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %14 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %15 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %16 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %17 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %18 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %19 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %20 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %21 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %22 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %23 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %24 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %25 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %26 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %27 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %28 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %29 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %30 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %31 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %32 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %33 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %34 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %35 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %36 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %halfExtents = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %capStart = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %capEnd = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %childTransform12 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %childTransform14 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %offsetHeight = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %offsetRadius = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %offset2Radius = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %yaxis = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %xaxis = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %offsetHeight41 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %offsetRadius43 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %yaxis45 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %xaxis47 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %drawCallback = alloca %struct.DebugDrawcallback, align 8 ; [#uses=26]
- %aabbMax78 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMin80 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %drawCallback82 = alloca %struct.DebugDrawcallback, align 8 ; [#uses=30]
- %a = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %b = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %wa = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %wb = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %37 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 0 ; [#uses=25]
- %38 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32 (...)** %38, i32 4 ; [#uses=1]
- %40 = load i32 (...)** %39, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %40 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %42 = call %struct.btActionInterface* %41(%struct.btCollisionWorld* %this) ; [#uses=2]
- %43 = getelementptr inbounds %struct.btActionInterface* %42, i32 0, i32 0 ; [#uses=1]
- %44 = load i32 (...)*** %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds i32 (...)** %44, i32 14 ; [#uses=1]
- %46 = load i32 (...)** %45, align 4 ; [#uses=1]
- %47 = bitcast i32 (...)* %46 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %47(%struct.btActionInterface* %42, %struct.btTransform* %worldTransform, float 1.000000e+00)
- %48 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 1 ; [#uses=3]
- %49 = load i32* %48, align 4 ; [#uses=3]
- switch i32 %49, label %bb60 [
- i32 31, label %bb
- i32 0, label %bb4
- i32 8, label %bb5
- i32 9, label %bb6
- i32 10, label %bb10
- i32 11, label %bb16
- i32 13, label %bb30
- i32 28, label %bb48
- ]
-
-bb: ; preds = %entry
- %50 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 1, i32 1 ; [#uses=1]
- %51 = load i32* %50, align 4 ; [#uses=3]
- %i.0461 = add i32 %51, -1 ; [#uses=2]
- %52 = icmp sgt i32 %i.0461, -1 ; [#uses=1]
- br i1 %52, label %bb.nph463, label %return
-
-bb.nph463: ; preds = %bb
- %53 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 2 ; [#uses=1]
- %54 = bitcast %struct.btCollisionShape* %53 to %struct.btCompoundShapeChild** ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %36, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph463
- %indvar472 = phi i32 [ 0, %bb.nph463 ], [ %indvar.next473, %bb1 ] ; [#uses=3]
- %tmp476 = sub i32 %51, %indvar472 ; [#uses=12]
- %tmp480 = sub i32 %i.0461, %indvar472 ; [#uses=1]
- %83 = load %struct.btCompoundShapeChild** %54, align 4 ; [#uses=13]
- %scevgep481482 = getelementptr inbounds %struct.btCompoundShapeChild* %83, i32 %tmp480, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %84 = load float* %scevgep481482, align 4 ; [#uses=3]
- %scevgep483 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -4, i32 0, i32 -3 ; [#uses=1]
- %85 = load float* %scevgep483, align 4 ; [#uses=3]
- %scevgep484 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -4, i32 0, i32 -2 ; [#uses=1]
- %86 = load float* %scevgep484, align 4 ; [#uses=3]
- %scevgep485486 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -4, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %scevgep485486, align 4 ; [#uses=3]
- %scevgep487 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -3, i32 0, i32 -3 ; [#uses=1]
- %88 = load float* %scevgep487, align 4 ; [#uses=3]
- %scevgep488 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -3, i32 0, i32 -2 ; [#uses=1]
- %89 = load float* %scevgep488, align 4 ; [#uses=3]
- %scevgep489490 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -3, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %scevgep489490, align 4 ; [#uses=3]
- %scevgep491 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -2, i32 0, i32 -3 ; [#uses=1]
- %91 = load float* %scevgep491, align 4 ; [#uses=3]
- %scevgep492 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -2, i32 0, i32 -2 ; [#uses=1]
- %92 = load float* %scevgep492, align 4 ; [#uses=3]
- %scevgep493494 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -2, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %scevgep493494, align 4 ; [#uses=3]
- %scevgep495 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -1, i32 0, i32 -3 ; [#uses=1]
- %94 = load float* %scevgep495, align 4 ; [#uses=3]
- %scevgep496 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -1, i32 0, i32 -2 ; [#uses=1]
- %95 = load float* %scevgep496, align 4 ; [#uses=3]
- %scevgep477 = getelementptr %struct.btCompoundShapeChild* %83, i32 %tmp476, i32 0, i32 0, i32 0, i32 -1 ; [#uses=1]
- %scevgep477478 = bitcast %struct.btQuadWord* %scevgep477 to %struct.btCollisionShape** ; [#uses=1]
- %96 = load %struct.btCollisionShape** %scevgep477478, align 4 ; [#uses=1]
- %97 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %98 = getelementptr inbounds i32 (...)** %97, i32 6 ; [#uses=1]
- %99 = load i32 (...)** %98, align 4 ; [#uses=1]
- %100 = load float* %55, align 4 ; [#uses=4]
- %101 = fmul float %100, %93 ; [#uses=1]
- %102 = load float* %56, align 4 ; [#uses=4]
- %103 = fmul float %102, %94 ; [#uses=1]
- %104 = fadd float %101, %103 ; [#uses=1]
- %105 = load float* %57, align 4 ; [#uses=4]
- %106 = fmul float %105, %95 ; [#uses=1]
- %107 = fadd float %104, %106 ; [#uses=1]
- %108 = load float* %58, align 4 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- %110 = load float* %59, align 4 ; [#uses=4]
- %111 = fmul float %110, %93 ; [#uses=1]
- %112 = load float* %60, align 4 ; [#uses=4]
- %113 = fmul float %112, %94 ; [#uses=1]
- %114 = fadd float %111, %113 ; [#uses=1]
- %115 = load float* %61, align 4 ; [#uses=4]
- %116 = fmul float %115, %95 ; [#uses=1]
- %117 = fadd float %114, %116 ; [#uses=1]
- %118 = load float* %62, align 4 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = load float* %63, align 4 ; [#uses=4]
- %121 = fmul float %120, %93 ; [#uses=1]
- %122 = load float* %64, align 4 ; [#uses=4]
- %123 = fmul float %122, %94 ; [#uses=1]
- %124 = fadd float %121, %123 ; [#uses=1]
- %125 = load float* %65, align 4 ; [#uses=4]
- %126 = fmul float %125, %95 ; [#uses=1]
- %127 = fadd float %124, %126 ; [#uses=1]
- %128 = load float* %66, align 4 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=1]
- %130 = fmul float %86, %100 ; [#uses=1]
- %131 = fmul float %89, %102 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %92, %105 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = fmul float %85, %100 ; [#uses=1]
- %136 = fmul float %88, %102 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %91, %105 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %84, %100 ; [#uses=1]
- %141 = fmul float %87, %102 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=1]
- %143 = fmul float %90, %105 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = fmul float %86, %110 ; [#uses=1]
- %146 = fmul float %89, %112 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=1]
- %148 = fmul float %92, %115 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fmul float %85, %110 ; [#uses=1]
- %151 = fmul float %88, %112 ; [#uses=1]
- %152 = fadd float %150, %151 ; [#uses=1]
- %153 = fmul float %91, %115 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %84, %110 ; [#uses=1]
- %156 = fmul float %87, %112 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fmul float %90, %115 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fmul float %86, %120 ; [#uses=1]
- %161 = fmul float %89, %122 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fmul float %92, %125 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- %165 = fmul float %85, %120 ; [#uses=1]
- %166 = fmul float %88, %122 ; [#uses=1]
- %167 = fadd float %165, %166 ; [#uses=1]
- %168 = fmul float %91, %125 ; [#uses=1]
- %169 = fadd float %167, %168 ; [#uses=1]
- %170 = fmul float %84, %120 ; [#uses=1]
- %171 = fmul float %87, %122 ; [#uses=1]
- %172 = fadd float %170, %171 ; [#uses=1]
- %173 = fmul float %90, %125 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=1]
- store float %174, float* %67, align 8
- store float %169, float* %68, align 4
- store float %164, float* %69, align 8
- store float 0.000000e+00, float* %70, align 4
- store float %159, float* %71, align 8
- store float %154, float* %72, align 4
- store float %149, float* %73, align 8
- store float 0.000000e+00, float* %74, align 4
- store float %144, float* %75, align 8
- store float %139, float* %76, align 4
- store float %134, float* %77, align 8
- store float 0.000000e+00, float* %78, align 4
- store float %129, float* %79, align 8
- store float %119, float* %80, align 4
- store float %109, float* %81, align 8
- store float 0.000000e+00, float* %82, align 4
- %175 = bitcast i32 (...)* %99 to void (%struct.btCollisionWorld*, %struct.btTransform*, %struct.btCollisionShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %175(%struct.btCollisionWorld* %this, %struct.btTransform* %36, %struct.btCollisionShape* %96, %struct.btQuadWord* %color)
- %indvar.next473 = add i32 %indvar472, 1 ; [#uses=2]
- %exitcond474 = icmp eq i32 %indvar.next473, %51 ; [#uses=1]
- br i1 %exitcond474, label %return, label %bb1
-
-bb4: ; preds = %entry
- %176 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=2]
- %177 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 2, i32 1 ; [#uses=1]
- %178 = bitcast i32* %177 to float* ; [#uses=1]
- %179 = load float* %178, align 4 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=2]
- %181 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 2, i32 2 ; [#uses=1]
- %182 = bitcast i8** %181 to float* ; [#uses=1]
- %183 = load float* %182, align 4 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=2]
- %185 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 3 ; [#uses=1]
- %186 = bitcast %struct.btCollisionShape* %185 to float* ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 3 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 3, i32 1 ; [#uses=1]
- %190 = bitcast i32* %189 to float* ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=1]
- store float %191, float* %188, align 4
- %192 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 0 ; [#uses=3]
- %193 = load i32 (...)*** %192, align 4 ; [#uses=1]
- %194 = getelementptr inbounds i32 (...)** %193, i32 11 ; [#uses=1]
- %195 = load i32 (...)** %194, align 4 ; [#uses=1]
- %196 = bitcast %struct.btCollisionShape* %shape to %struct.btConvexInternalShape* ; [#uses=3]
- %197 = bitcast i32 (...)* %195 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %198 = call float %197(%struct.btConvexInternalShape* %196) ; [#uses=1]
- %199 = load i32 (...)*** %192, align 4 ; [#uses=1]
- %200 = getelementptr inbounds i32 (...)** %199, i32 11 ; [#uses=1]
- %201 = load i32 (...)** %200, align 4 ; [#uses=1]
- %202 = bitcast i32 (...)* %201 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %203 = call float %202(%struct.btConvexInternalShape* %196) ; [#uses=1]
- %204 = load i32 (...)*** %192, align 4 ; [#uses=1]
- %205 = getelementptr inbounds i32 (...)** %204, i32 11 ; [#uses=1]
- %206 = load i32 (...)** %205, align 4 ; [#uses=1]
- %207 = bitcast i32 (...)* %206 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %208 = call float %207(%struct.btConvexInternalShape* %196) ; [#uses=1]
- %209 = fadd float %179, %208 ; [#uses=1]
- store float %209, float* %176, align 8
- %210 = fadd float %183, %203 ; [#uses=1]
- store float %210, float* %180, align 4
- %211 = fadd float %187, %198 ; [#uses=1]
- store float %211, float* %184, align 8
- %212 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %213 = getelementptr inbounds i32 (...)** %212, i32 4 ; [#uses=1]
- %214 = load i32 (...)** %213, align 4 ; [#uses=1]
- %215 = bitcast i32 (...)* %214 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %216 = call %struct.btActionInterface* %215(%struct.btCollisionWorld* %this) ; [#uses=2]
- %217 = getelementptr inbounds %struct.btActionInterface* %216, i32 0, i32 0 ; [#uses=1]
- %218 = load i32 (...)*** %217, align 4 ; [#uses=1]
- %219 = getelementptr inbounds i32 (...)** %218, i32 18 ; [#uses=1]
- %220 = load i32 (...)** %219, align 4 ; [#uses=1]
- %221 = load float* %184, align 8 ; [#uses=1]
- %222 = fsub float -0.000000e+00, %221 ; [#uses=1]
- %223 = load float* %180, align 4 ; [#uses=1]
- %224 = fsub float -0.000000e+00, %223 ; [#uses=1]
- %225 = load float* %176, align 8 ; [#uses=1]
- %226 = fsub float -0.000000e+00, %225 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btQuadWord* %35, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %226, float* %227, align 8
- %228 = getelementptr inbounds %struct.btQuadWord* %35, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %224, float* %228, align 4
- %229 = getelementptr inbounds %struct.btQuadWord* %35, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %222, float* %229, align 8
- %230 = getelementptr inbounds %struct.btQuadWord* %35, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %230, align 4
- %231 = bitcast i32 (...)* %220 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btTransform*, %struct.btQuadWord*)* ; [#uses=1]
- call void %231(%struct.btActionInterface* %216, %struct.btQuadWord* %35, %struct.btQuadWord* %halfExtents, %struct.btTransform* %worldTransform, %struct.btQuadWord* %color)
- ret void
-
-bb5: ; preds = %entry
- %232 = bitcast %struct.btCollisionShape* %shape to %struct.btPolyhedralConvexShape* ; [#uses=1]
- %233 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 0 ; [#uses=1]
- %234 = load i32 (...)*** %233, align 4 ; [#uses=1]
- %235 = getelementptr inbounds i32 (...)** %234, i32 11 ; [#uses=1]
- %236 = load i32 (...)** %235, align 4 ; [#uses=1]
- %237 = bitcast i32 (...)* %236 to float (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %238 = call float %237(%struct.btPolyhedralConvexShape* %232) ; [#uses=1]
- %239 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %240 = getelementptr inbounds i32 (...)** %239, i32 4 ; [#uses=1]
- %241 = load i32 (...)** %240, align 4 ; [#uses=1]
- %242 = bitcast i32 (...)* %241 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %243 = call %struct.btActionInterface* %242(%struct.btCollisionWorld* %this) ; [#uses=2]
- %244 = getelementptr inbounds %struct.btActionInterface* %243, i32 0, i32 0 ; [#uses=1]
- %245 = load i32 (...)*** %244, align 4 ; [#uses=1]
- %246 = getelementptr inbounds i32 (...)** %245, i32 4 ; [#uses=1]
- %247 = load i32 (...)** %246, align 4 ; [#uses=1]
- %248 = bitcast i32 (...)* %247 to void (%struct.btActionInterface*, float, %struct.btTransform*, %struct.btQuadWord*)* ; [#uses=1]
- call void %248(%struct.btActionInterface* %243, float %238, %struct.btTransform* %worldTransform, %struct.btQuadWord* %color)
- ret void
-
-bb6: ; preds = %entry
- %249 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 7, i32 2 ; [#uses=1]
- %250 = bitcast i8** %249 to i32* ; [#uses=1]
- %251 = load i32* %250, align 4 ; [#uses=3]
- %i7.0455 = add i32 %251, -1 ; [#uses=2]
- %252 = icmp sgt i32 %i7.0455, -1 ; [#uses=1]
- br i1 %252, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb6
- %253 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 8, i32 1 ; [#uses=1]
- %254 = bitcast i32* %253 to %struct.btQuadWord** ; [#uses=1]
- %255 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %256 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %257 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %259 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %260 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %261 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %262 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %264 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %267 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %268 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %269 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %271 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %272 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %273 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %274 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %276 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %277 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %278 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %279 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %280 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %282 = getelementptr inbounds %struct.btTransform* %34, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %283 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 10 ; [#uses=1]
- %284 = bitcast %struct.btCollisionShape* %283 to float** ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb8, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb8 ] ; [#uses=3]
- %tmp465 = sub i32 %i7.0455, %indvar ; [#uses=2]
- %tmp468 = sub i32 %251, %indvar ; [#uses=2]
- %285 = load %struct.btQuadWord** %254, align 4 ; [#uses=3]
- %scevgep466467 = getelementptr inbounds %struct.btQuadWord* %285, i32 %tmp465, i32 0, i32 0 ; [#uses=1]
- %286 = load float* %scevgep466467, align 4 ; [#uses=3]
- %scevgep469 = getelementptr %struct.btQuadWord* %285, i32 %tmp468, i32 0, i32 -3 ; [#uses=1]
- %287 = load float* %scevgep469, align 4 ; [#uses=3]
- %scevgep470 = getelementptr %struct.btQuadWord* %285, i32 %tmp468, i32 0, i32 -2 ; [#uses=1]
- %288 = load float* %scevgep470, align 4 ; [#uses=3]
- %289 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %290 = getelementptr inbounds i32 (...)** %289, i32 4 ; [#uses=1]
- %291 = load i32 (...)** %290, align 4 ; [#uses=1]
- %292 = bitcast i32 (...)* %291 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %293 = call %struct.btActionInterface* %292(%struct.btCollisionWorld* %this) ; [#uses=2]
- %294 = getelementptr inbounds %struct.btActionInterface* %293, i32 0, i32 0 ; [#uses=1]
- %295 = load i32 (...)*** %294, align 4 ; [#uses=1]
- %296 = getelementptr inbounds i32 (...)** %295, i32 4 ; [#uses=1]
- %297 = load i32 (...)** %296, align 4 ; [#uses=1]
- %298 = load float* %255, align 4 ; [#uses=3]
- %299 = fmul float %298, %286 ; [#uses=1]
- %300 = load float* %256, align 4 ; [#uses=3]
- %301 = fmul float %300, %287 ; [#uses=1]
- %302 = fadd float %299, %301 ; [#uses=1]
- %303 = load float* %257, align 4 ; [#uses=3]
- %304 = fmul float %303, %288 ; [#uses=1]
- %305 = fadd float %302, %304 ; [#uses=1]
- %306 = load float* %258, align 4 ; [#uses=1]
- %307 = fadd float %305, %306 ; [#uses=1]
- %308 = load float* %259, align 4 ; [#uses=3]
- %309 = fmul float %308, %286 ; [#uses=1]
- %310 = load float* %260, align 4 ; [#uses=3]
- %311 = fmul float %310, %287 ; [#uses=1]
- %312 = fadd float %309, %311 ; [#uses=1]
- %313 = load float* %261, align 4 ; [#uses=3]
- %314 = fmul float %313, %288 ; [#uses=1]
- %315 = fadd float %312, %314 ; [#uses=1]
- %316 = load float* %262, align 4 ; [#uses=1]
- %317 = fadd float %315, %316 ; [#uses=1]
- %318 = load float* %263, align 4 ; [#uses=3]
- %319 = fmul float %318, %286 ; [#uses=1]
- %320 = load float* %264, align 4 ; [#uses=3]
- %321 = fmul float %320, %287 ; [#uses=1]
- %322 = fadd float %319, %321 ; [#uses=1]
- %323 = load float* %265, align 4 ; [#uses=3]
- %324 = fmul float %323, %288 ; [#uses=1]
- %325 = fadd float %322, %324 ; [#uses=1]
- %326 = load float* %266, align 4 ; [#uses=1]
- %327 = fadd float %325, %326 ; [#uses=1]
- %328 = fmul float %298, 0.000000e+00 ; [#uses=2]
- %329 = fmul float %300, 0.000000e+00 ; [#uses=2]
- %330 = fadd float %328, %329 ; [#uses=1]
- %331 = fadd float %330, %303 ; [#uses=1]
- %332 = fadd float %328, %300 ; [#uses=1]
- %333 = fmul float %303, 0.000000e+00 ; [#uses=2]
- %334 = fadd float %332, %333 ; [#uses=1]
- %335 = fadd float %298, %329 ; [#uses=1]
- %336 = fadd float %335, %333 ; [#uses=1]
- %337 = fmul float %308, 0.000000e+00 ; [#uses=2]
- %338 = fmul float %310, 0.000000e+00 ; [#uses=2]
- %339 = fadd float %337, %338 ; [#uses=1]
- %340 = fadd float %339, %313 ; [#uses=1]
- %341 = fadd float %337, %310 ; [#uses=1]
- %342 = fmul float %313, 0.000000e+00 ; [#uses=2]
- %343 = fadd float %341, %342 ; [#uses=1]
- %344 = fadd float %308, %338 ; [#uses=1]
- %345 = fadd float %344, %342 ; [#uses=1]
- %346 = fmul float %318, 0.000000e+00 ; [#uses=2]
- %347 = fmul float %320, 0.000000e+00 ; [#uses=2]
- %348 = fadd float %346, %347 ; [#uses=1]
- %349 = fadd float %348, %323 ; [#uses=1]
- %350 = fadd float %346, %320 ; [#uses=1]
- %351 = fmul float %323, 0.000000e+00 ; [#uses=2]
- %352 = fadd float %350, %351 ; [#uses=1]
- %353 = fadd float %318, %347 ; [#uses=1]
- %354 = fadd float %353, %351 ; [#uses=1]
- store float %354, float* %267, align 8
- store float %352, float* %268, align 4
- store float %349, float* %269, align 8
- store float 0.000000e+00, float* %270, align 4
- store float %345, float* %271, align 8
- store float %343, float* %272, align 4
- store float %340, float* %273, align 8
- store float 0.000000e+00, float* %274, align 4
- store float %336, float* %275, align 8
- store float %334, float* %276, align 4
- store float %331, float* %277, align 8
- store float 0.000000e+00, float* %278, align 4
- store float %327, float* %279, align 8
- store float %317, float* %280, align 4
- store float %307, float* %281, align 8
- store float 0.000000e+00, float* %282, align 4
- %355 = load float** %284, align 4 ; [#uses=1]
- %scevgep = getelementptr float* %355, i32 %tmp465 ; [#uses=1]
- %356 = load float* %scevgep, align 4 ; [#uses=1]
- %357 = bitcast i32 (...)* %297 to void (%struct.btActionInterface*, float, %struct.btTransform*, %struct.btQuadWord*)* ; [#uses=1]
- call void %357(%struct.btActionInterface* %293, float %356, %struct.btTransform* %34, %struct.btQuadWord* %color)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %251 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb8
-
-bb10: ; preds = %entry
- %358 = bitcast %struct.btCollisionShape* %shape to %struct.btCapsuleShape* ; [#uses=2]
- %359 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 4, i32 1 ; [#uses=1]
- %360 = load i32* %359, align 4 ; [#uses=5]
- %361 = add nsw i32 %360, 2 ; [#uses=1]
- %362 = srem i32 %361, 3 ; [#uses=3]
- %363 = getelementptr inbounds %struct.btCapsuleShape* %358, i32 0, i32 0, i32 2, i32 0, i32 %362 ; [#uses=1]
- %364 = load float* %363, align 4 ; [#uses=7]
- %365 = getelementptr inbounds %struct.btCapsuleShape* %358, i32 0, i32 0, i32 2, i32 0, i32 %360 ; [#uses=1]
- %366 = load float* %365, align 4 ; [#uses=2]
- %367 = getelementptr inbounds %struct.btQuadWord* %capStart, i32 0, i32 0, i32 0 ; [#uses=6]
- store float 0.000000e+00, float* %367, align 8
- %368 = getelementptr inbounds %struct.btQuadWord* %capStart, i32 0, i32 0, i32 1 ; [#uses=6]
- store float 0.000000e+00, float* %368, align 4
- %369 = getelementptr inbounds %struct.btQuadWord* %capStart, i32 0, i32 0, i32 2 ; [#uses=6]
- store float 0.000000e+00, float* %369, align 8
- %370 = getelementptr inbounds %struct.btQuadWord* %capStart, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %370, align 4
- %371 = fsub float -0.000000e+00, %366 ; [#uses=1]
- %372 = getelementptr inbounds %struct.btQuadWord* %capStart, i32 0, i32 0, i32 %360 ; [#uses=1]
- store float %371, float* %372, align 4
- %373 = getelementptr inbounds %struct.btQuadWord* %capEnd, i32 0, i32 0, i32 0 ; [#uses=6]
- store float 0.000000e+00, float* %373, align 8
- %374 = getelementptr inbounds %struct.btQuadWord* %capEnd, i32 0, i32 0, i32 1 ; [#uses=6]
- store float 0.000000e+00, float* %374, align 4
- %375 = getelementptr inbounds %struct.btQuadWord* %capEnd, i32 0, i32 0, i32 2 ; [#uses=6]
- store float 0.000000e+00, float* %375, align 8
- %376 = getelementptr inbounds %struct.btQuadWord* %capEnd, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %376, align 4
- %377 = getelementptr inbounds %struct.btQuadWord* %capEnd, i32 0, i32 0, i32 %360 ; [#uses=1]
- store float %366, float* %377, align 4
- %378 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %379 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %380 = load float* %379, align 4 ; [#uses=2]
- store float %380, float* %378, align 8
- %381 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %382 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=6]
- %383 = load float* %382, align 4 ; [#uses=2]
- store float %383, float* %381, align 4
- %384 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %385 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=6]
- %386 = load float* %385, align 4 ; [#uses=2]
- store float %386, float* %384, align 8
- %387 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %388 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %389 = load float* %388, align 4 ; [#uses=1]
- store float %389, float* %387, align 4
- %390 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %391 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=6]
- %392 = load float* %391, align 4 ; [#uses=2]
- store float %392, float* %390, align 8
- %393 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %394 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=6]
- %395 = load float* %394, align 4 ; [#uses=2]
- store float %395, float* %393, align 4
- %396 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %397 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=6]
- %398 = load float* %397, align 4 ; [#uses=2]
- store float %398, float* %396, align 8
- %399 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %400 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %401 = load float* %400, align 4 ; [#uses=1]
- store float %401, float* %399, align 4
- %402 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %403 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=6]
- %404 = load float* %403, align 4 ; [#uses=2]
- store float %404, float* %402, align 8
- %405 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %406 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=6]
- %407 = load float* %406, align 4 ; [#uses=2]
- store float %407, float* %405, align 4
- %408 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %409 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=6]
- %410 = load float* %409, align 4 ; [#uses=2]
- store float %410, float* %408, align 8
- %411 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %412 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %413 = load float* %412, align 4 ; [#uses=1]
- store float %413, float* %411, align 4
- %414 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %415 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %416 = load float* %415, align 4 ; [#uses=1]
- %417 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %418 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %419 = load float* %418, align 4 ; [#uses=1]
- %420 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %421 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %422 = load float* %421, align 4 ; [#uses=1]
- %423 = getelementptr inbounds %struct.btTransform* %childTransform12, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %424 = load float* %367, align 8 ; [#uses=3]
- %425 = fmul float %404, %424 ; [#uses=1]
- %426 = load float* %368, align 4 ; [#uses=3]
- %427 = fmul float %407, %426 ; [#uses=1]
- %428 = fadd float %425, %427 ; [#uses=1]
- %429 = load float* %369, align 8 ; [#uses=3]
- %430 = fmul float %410, %429 ; [#uses=1]
- %431 = fadd float %428, %430 ; [#uses=1]
- %432 = fadd float %431, %422 ; [#uses=1]
- %433 = fmul float %392, %424 ; [#uses=1]
- %434 = fmul float %395, %426 ; [#uses=1]
- %435 = fadd float %433, %434 ; [#uses=1]
- %436 = fmul float %398, %429 ; [#uses=1]
- %437 = fadd float %435, %436 ; [#uses=1]
- %438 = fadd float %437, %419 ; [#uses=1]
- %439 = fmul float %380, %424 ; [#uses=1]
- %440 = fmul float %383, %426 ; [#uses=1]
- %441 = fadd float %439, %440 ; [#uses=1]
- %442 = fmul float %386, %429 ; [#uses=1]
- %443 = fadd float %441, %442 ; [#uses=1]
- %444 = fadd float %443, %416 ; [#uses=1]
- store float %444, float* %414, align 8
- store float %438, float* %417, align 4
- store float %432, float* %420, align 8
- store float 0.000000e+00, float* %423, align 4
- %445 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %446 = getelementptr inbounds i32 (...)** %445, i32 4 ; [#uses=1]
- %447 = load i32 (...)** %446, align 4 ; [#uses=1]
- %448 = bitcast i32 (...)* %447 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %449 = call %struct.btActionInterface* %448(%struct.btCollisionWorld* %this) ; [#uses=2]
- %450 = getelementptr inbounds %struct.btActionInterface* %449, i32 0, i32 0 ; [#uses=1]
- %451 = load i32 (...)*** %450, align 4 ; [#uses=1]
- %452 = getelementptr inbounds i32 (...)** %451, i32 4 ; [#uses=1]
- %453 = load i32 (...)** %452, align 4 ; [#uses=1]
- %454 = bitcast i32 (...)* %453 to void (%struct.btActionInterface*, float, %struct.btTransform*, %struct.btQuadWord*)* ; [#uses=1]
- call void %454(%struct.btActionInterface* %449, float %364, %struct.btTransform* %childTransform12, %struct.btQuadWord* %color)
- %455 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %456 = load float* %379, align 4 ; [#uses=2]
- store float %456, float* %455, align 8
- %457 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %458 = load float* %382, align 4 ; [#uses=2]
- store float %458, float* %457, align 4
- %459 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %460 = load float* %385, align 4 ; [#uses=2]
- store float %460, float* %459, align 8
- %461 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %462 = load float* %388, align 4 ; [#uses=1]
- store float %462, float* %461, align 4
- %463 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %464 = load float* %391, align 4 ; [#uses=2]
- store float %464, float* %463, align 8
- %465 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %466 = load float* %394, align 4 ; [#uses=2]
- store float %466, float* %465, align 4
- %467 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %468 = load float* %397, align 4 ; [#uses=2]
- store float %468, float* %467, align 8
- %469 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %470 = load float* %400, align 4 ; [#uses=1]
- store float %470, float* %469, align 4
- %471 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %472 = load float* %403, align 4 ; [#uses=2]
- store float %472, float* %471, align 8
- %473 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %474 = load float* %406, align 4 ; [#uses=2]
- store float %474, float* %473, align 4
- %475 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %476 = load float* %409, align 4 ; [#uses=2]
- store float %476, float* %475, align 8
- %477 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %478 = load float* %412, align 4 ; [#uses=1]
- store float %478, float* %477, align 4
- %479 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %480 = load float* %415, align 4 ; [#uses=1]
- %481 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %482 = load float* %418, align 4 ; [#uses=1]
- %483 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %484 = load float* %421, align 4 ; [#uses=1]
- %485 = getelementptr inbounds %struct.btTransform* %childTransform14, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %486 = load float* %373, align 8 ; [#uses=3]
- %487 = fmul float %472, %486 ; [#uses=1]
- %488 = load float* %374, align 4 ; [#uses=3]
- %489 = fmul float %474, %488 ; [#uses=1]
- %490 = fadd float %487, %489 ; [#uses=1]
- %491 = load float* %375, align 8 ; [#uses=3]
- %492 = fmul float %476, %491 ; [#uses=1]
- %493 = fadd float %490, %492 ; [#uses=1]
- %494 = fadd float %493, %484 ; [#uses=1]
- %495 = fmul float %464, %486 ; [#uses=1]
- %496 = fmul float %466, %488 ; [#uses=1]
- %497 = fadd float %495, %496 ; [#uses=1]
- %498 = fmul float %468, %491 ; [#uses=1]
- %499 = fadd float %497, %498 ; [#uses=1]
- %500 = fadd float %499, %482 ; [#uses=1]
- %501 = fmul float %456, %486 ; [#uses=1]
- %502 = fmul float %458, %488 ; [#uses=1]
- %503 = fadd float %501, %502 ; [#uses=1]
- %504 = fmul float %460, %491 ; [#uses=1]
- %505 = fadd float %503, %504 ; [#uses=1]
- %506 = fadd float %505, %480 ; [#uses=1]
- store float %506, float* %479, align 8
- store float %500, float* %481, align 4
- store float %494, float* %483, align 8
- store float 0.000000e+00, float* %485, align 4
- %507 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %508 = getelementptr inbounds i32 (...)** %507, i32 4 ; [#uses=1]
- %509 = load i32 (...)** %508, align 4 ; [#uses=1]
- %510 = bitcast i32 (...)* %509 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %511 = call %struct.btActionInterface* %510(%struct.btCollisionWorld* %this) ; [#uses=2]
- %512 = getelementptr inbounds %struct.btActionInterface* %511, i32 0, i32 0 ; [#uses=1]
- %513 = load i32 (...)*** %512, align 4 ; [#uses=1]
- %514 = getelementptr inbounds i32 (...)** %513, i32 4 ; [#uses=1]
- %515 = load i32 (...)** %514, align 4 ; [#uses=1]
- %516 = bitcast i32 (...)* %515 to void (%struct.btActionInterface*, float, %struct.btTransform*, %struct.btQuadWord*)* ; [#uses=1]
- call void %516(%struct.btActionInterface* %511, float %364, %struct.btTransform* %childTransform14, %struct.btQuadWord* %color)
- %517 = load float* %415, align 4 ; [#uses=8]
- %518 = load float* %418, align 4 ; [#uses=8]
- %519 = load float* %421, align 4 ; [#uses=8]
- %520 = add nsw i32 %360, 1 ; [#uses=1]
- %521 = srem i32 %520, 3 ; [#uses=2]
- %522 = getelementptr inbounds %struct.btQuadWord* %capStart, i32 0, i32 0, i32 %521 ; [#uses=3]
- store float %364, float* %522, align 4
- %523 = getelementptr inbounds %struct.btQuadWord* %capEnd, i32 0, i32 0, i32 %521 ; [#uses=3]
- store float %364, float* %523, align 4
- %524 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %525 = getelementptr inbounds i32 (...)** %524, i32 4 ; [#uses=1]
- %526 = load i32 (...)** %525, align 4 ; [#uses=1]
- %527 = bitcast i32 (...)* %526 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %528 = call %struct.btActionInterface* %527(%struct.btCollisionWorld* %this) ; [#uses=2]
- %529 = getelementptr inbounds %struct.btActionInterface* %528, i32 0, i32 0 ; [#uses=1]
- %530 = load i32 (...)*** %529, align 4 ; [#uses=1]
- %531 = getelementptr inbounds i32 (...)** %530, i32 2 ; [#uses=1]
- %532 = load i32 (...)** %531, align 4 ; [#uses=1]
- %533 = load float* %403, align 4 ; [#uses=2]
- %534 = load float* %373, align 8 ; [#uses=3]
- %535 = fmul float %533, %534 ; [#uses=1]
- %536 = load float* %406, align 4 ; [#uses=2]
- %537 = load float* %374, align 4 ; [#uses=3]
- %538 = fmul float %536, %537 ; [#uses=1]
- %539 = fadd float %535, %538 ; [#uses=1]
- %540 = load float* %409, align 4 ; [#uses=2]
- %541 = load float* %375, align 8 ; [#uses=3]
- %542 = fmul float %540, %541 ; [#uses=1]
- %543 = fadd float %539, %542 ; [#uses=1]
- %544 = load float* %391, align 4 ; [#uses=2]
- %545 = fmul float %544, %534 ; [#uses=1]
- %546 = load float* %394, align 4 ; [#uses=2]
- %547 = fmul float %546, %537 ; [#uses=1]
- %548 = fadd float %545, %547 ; [#uses=1]
- %549 = load float* %397, align 4 ; [#uses=2]
- %550 = fmul float %549, %541 ; [#uses=1]
- %551 = fadd float %548, %550 ; [#uses=1]
- %552 = load float* %379, align 4 ; [#uses=2]
- %553 = fmul float %552, %534 ; [#uses=1]
- %554 = load float* %382, align 4 ; [#uses=2]
- %555 = fmul float %554, %537 ; [#uses=1]
- %556 = fadd float %553, %555 ; [#uses=1]
- %557 = load float* %385, align 4 ; [#uses=2]
- %558 = fmul float %557, %541 ; [#uses=1]
- %559 = fadd float %556, %558 ; [#uses=1]
- %560 = fadd float %519, %543 ; [#uses=1]
- %561 = fadd float %518, %551 ; [#uses=1]
- %562 = fadd float %517, %559 ; [#uses=1]
- %563 = getelementptr inbounds %struct.btQuadWord* %33, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %562, float* %563, align 8
- %564 = getelementptr inbounds %struct.btQuadWord* %33, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %561, float* %564, align 4
- %565 = getelementptr inbounds %struct.btQuadWord* %33, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %560, float* %565, align 8
- %566 = getelementptr inbounds %struct.btQuadWord* %33, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %566, align 4
- %567 = load float* %367, align 8 ; [#uses=3]
- %568 = fmul float %533, %567 ; [#uses=1]
- %569 = load float* %368, align 4 ; [#uses=3]
- %570 = fmul float %536, %569 ; [#uses=1]
- %571 = fadd float %568, %570 ; [#uses=1]
- %572 = load float* %369, align 8 ; [#uses=3]
- %573 = fmul float %540, %572 ; [#uses=1]
- %574 = fadd float %571, %573 ; [#uses=1]
- %575 = fmul float %544, %567 ; [#uses=1]
- %576 = fmul float %546, %569 ; [#uses=1]
- %577 = fadd float %575, %576 ; [#uses=1]
- %578 = fmul float %549, %572 ; [#uses=1]
- %579 = fadd float %577, %578 ; [#uses=1]
- %580 = fmul float %552, %567 ; [#uses=1]
- %581 = fmul float %554, %569 ; [#uses=1]
- %582 = fadd float %580, %581 ; [#uses=1]
- %583 = fmul float %557, %572 ; [#uses=1]
- %584 = fadd float %582, %583 ; [#uses=1]
- %585 = fadd float %519, %574 ; [#uses=1]
- %586 = fadd float %518, %579 ; [#uses=1]
- %587 = fadd float %517, %584 ; [#uses=1]
- %588 = getelementptr inbounds %struct.btQuadWord* %32, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %587, float* %588, align 8
- %589 = getelementptr inbounds %struct.btQuadWord* %32, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %586, float* %589, align 4
- %590 = getelementptr inbounds %struct.btQuadWord* %32, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %585, float* %590, align 8
- %591 = getelementptr inbounds %struct.btQuadWord* %32, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %591, align 4
- %592 = bitcast i32 (...)* %532 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %592(%struct.btActionInterface* %528, %struct.btQuadWord* %32, %struct.btQuadWord* %33, %struct.btQuadWord* %color)
- %593 = fsub float -0.000000e+00, %364 ; [#uses=4]
- store float %593, float* %522, align 4
- store float %593, float* %523, align 4
- %594 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %595 = getelementptr inbounds i32 (...)** %594, i32 4 ; [#uses=1]
- %596 = load i32 (...)** %595, align 4 ; [#uses=1]
- %597 = bitcast i32 (...)* %596 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %598 = call %struct.btActionInterface* %597(%struct.btCollisionWorld* %this) ; [#uses=2]
- %599 = getelementptr inbounds %struct.btActionInterface* %598, i32 0, i32 0 ; [#uses=1]
- %600 = load i32 (...)*** %599, align 4 ; [#uses=1]
- %601 = getelementptr inbounds i32 (...)** %600, i32 2 ; [#uses=1]
- %602 = load i32 (...)** %601, align 4 ; [#uses=1]
- %603 = load float* %403, align 4 ; [#uses=2]
- %604 = load float* %373, align 8 ; [#uses=3]
- %605 = fmul float %603, %604 ; [#uses=1]
- %606 = load float* %406, align 4 ; [#uses=2]
- %607 = load float* %374, align 4 ; [#uses=3]
- %608 = fmul float %606, %607 ; [#uses=1]
- %609 = fadd float %605, %608 ; [#uses=1]
- %610 = load float* %409, align 4 ; [#uses=2]
- %611 = load float* %375, align 8 ; [#uses=3]
- %612 = fmul float %610, %611 ; [#uses=1]
- %613 = fadd float %609, %612 ; [#uses=1]
- %614 = load float* %391, align 4 ; [#uses=2]
- %615 = fmul float %614, %604 ; [#uses=1]
- %616 = load float* %394, align 4 ; [#uses=2]
- %617 = fmul float %616, %607 ; [#uses=1]
- %618 = fadd float %615, %617 ; [#uses=1]
- %619 = load float* %397, align 4 ; [#uses=2]
- %620 = fmul float %619, %611 ; [#uses=1]
- %621 = fadd float %618, %620 ; [#uses=1]
- %622 = load float* %379, align 4 ; [#uses=2]
- %623 = fmul float %622, %604 ; [#uses=1]
- %624 = load float* %382, align 4 ; [#uses=2]
- %625 = fmul float %624, %607 ; [#uses=1]
- %626 = fadd float %623, %625 ; [#uses=1]
- %627 = load float* %385, align 4 ; [#uses=2]
- %628 = fmul float %627, %611 ; [#uses=1]
- %629 = fadd float %626, %628 ; [#uses=1]
- %630 = fadd float %519, %613 ; [#uses=1]
- %631 = fadd float %518, %621 ; [#uses=1]
- %632 = fadd float %517, %629 ; [#uses=1]
- %633 = getelementptr inbounds %struct.btQuadWord* %31, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %632, float* %633, align 8
- %634 = getelementptr inbounds %struct.btQuadWord* %31, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %631, float* %634, align 4
- %635 = getelementptr inbounds %struct.btQuadWord* %31, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %630, float* %635, align 8
- %636 = getelementptr inbounds %struct.btQuadWord* %31, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %636, align 4
- %637 = load float* %367, align 8 ; [#uses=3]
- %638 = fmul float %603, %637 ; [#uses=1]
- %639 = load float* %368, align 4 ; [#uses=3]
- %640 = fmul float %606, %639 ; [#uses=1]
- %641 = fadd float %638, %640 ; [#uses=1]
- %642 = load float* %369, align 8 ; [#uses=3]
- %643 = fmul float %610, %642 ; [#uses=1]
- %644 = fadd float %641, %643 ; [#uses=1]
- %645 = fmul float %614, %637 ; [#uses=1]
- %646 = fmul float %616, %639 ; [#uses=1]
- %647 = fadd float %645, %646 ; [#uses=1]
- %648 = fmul float %619, %642 ; [#uses=1]
- %649 = fadd float %647, %648 ; [#uses=1]
- %650 = fmul float %622, %637 ; [#uses=1]
- %651 = fmul float %624, %639 ; [#uses=1]
- %652 = fadd float %650, %651 ; [#uses=1]
- %653 = fmul float %627, %642 ; [#uses=1]
- %654 = fadd float %652, %653 ; [#uses=1]
- %655 = fadd float %519, %644 ; [#uses=1]
- %656 = fadd float %518, %649 ; [#uses=1]
- %657 = fadd float %517, %654 ; [#uses=1]
- %658 = getelementptr inbounds %struct.btQuadWord* %30, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %657, float* %658, align 8
- %659 = getelementptr inbounds %struct.btQuadWord* %30, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %656, float* %659, align 4
- %660 = getelementptr inbounds %struct.btQuadWord* %30, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %655, float* %660, align 8
- %661 = getelementptr inbounds %struct.btQuadWord* %30, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %661, align 4
- %662 = bitcast i32 (...)* %602 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %662(%struct.btActionInterface* %598, %struct.btQuadWord* %30, %struct.btQuadWord* %31, %struct.btQuadWord* %color)
- store float 0.000000e+00, float* %522, align 4
- store float 0.000000e+00, float* %523, align 4
- %663 = getelementptr inbounds %struct.btQuadWord* %capStart, i32 0, i32 0, i32 %362 ; [#uses=2]
- store float %364, float* %663, align 4
- %664 = getelementptr inbounds %struct.btQuadWord* %capEnd, i32 0, i32 0, i32 %362 ; [#uses=2]
- store float %364, float* %664, align 4
- %665 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %666 = getelementptr inbounds i32 (...)** %665, i32 4 ; [#uses=1]
- %667 = load i32 (...)** %666, align 4 ; [#uses=1]
- %668 = bitcast i32 (...)* %667 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %669 = call %struct.btActionInterface* %668(%struct.btCollisionWorld* %this) ; [#uses=2]
- %670 = getelementptr inbounds %struct.btActionInterface* %669, i32 0, i32 0 ; [#uses=1]
- %671 = load i32 (...)*** %670, align 4 ; [#uses=1]
- %672 = getelementptr inbounds i32 (...)** %671, i32 2 ; [#uses=1]
- %673 = load i32 (...)** %672, align 4 ; [#uses=1]
- %674 = load float* %403, align 4 ; [#uses=2]
- %675 = load float* %373, align 8 ; [#uses=3]
- %676 = fmul float %674, %675 ; [#uses=1]
- %677 = load float* %406, align 4 ; [#uses=2]
- %678 = load float* %374, align 4 ; [#uses=3]
- %679 = fmul float %677, %678 ; [#uses=1]
- %680 = fadd float %676, %679 ; [#uses=1]
- %681 = load float* %409, align 4 ; [#uses=2]
- %682 = load float* %375, align 8 ; [#uses=3]
- %683 = fmul float %681, %682 ; [#uses=1]
- %684 = fadd float %680, %683 ; [#uses=1]
- %685 = load float* %391, align 4 ; [#uses=2]
- %686 = fmul float %685, %675 ; [#uses=1]
- %687 = load float* %394, align 4 ; [#uses=2]
- %688 = fmul float %687, %678 ; [#uses=1]
- %689 = fadd float %686, %688 ; [#uses=1]
- %690 = load float* %397, align 4 ; [#uses=2]
- %691 = fmul float %690, %682 ; [#uses=1]
- %692 = fadd float %689, %691 ; [#uses=1]
- %693 = load float* %379, align 4 ; [#uses=2]
- %694 = fmul float %693, %675 ; [#uses=1]
- %695 = load float* %382, align 4 ; [#uses=2]
- %696 = fmul float %695, %678 ; [#uses=1]
- %697 = fadd float %694, %696 ; [#uses=1]
- %698 = load float* %385, align 4 ; [#uses=2]
- %699 = fmul float %698, %682 ; [#uses=1]
- %700 = fadd float %697, %699 ; [#uses=1]
- %701 = fadd float %519, %684 ; [#uses=1]
- %702 = fadd float %518, %692 ; [#uses=1]
- %703 = fadd float %517, %700 ; [#uses=1]
- %704 = getelementptr inbounds %struct.btQuadWord* %29, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %703, float* %704, align 8
- %705 = getelementptr inbounds %struct.btQuadWord* %29, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %702, float* %705, align 4
- %706 = getelementptr inbounds %struct.btQuadWord* %29, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %701, float* %706, align 8
- %707 = getelementptr inbounds %struct.btQuadWord* %29, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %707, align 4
- %708 = load float* %367, align 8 ; [#uses=3]
- %709 = fmul float %674, %708 ; [#uses=1]
- %710 = load float* %368, align 4 ; [#uses=3]
- %711 = fmul float %677, %710 ; [#uses=1]
- %712 = fadd float %709, %711 ; [#uses=1]
- %713 = load float* %369, align 8 ; [#uses=3]
- %714 = fmul float %681, %713 ; [#uses=1]
- %715 = fadd float %712, %714 ; [#uses=1]
- %716 = fmul float %685, %708 ; [#uses=1]
- %717 = fmul float %687, %710 ; [#uses=1]
- %718 = fadd float %716, %717 ; [#uses=1]
- %719 = fmul float %690, %713 ; [#uses=1]
- %720 = fadd float %718, %719 ; [#uses=1]
- %721 = fmul float %693, %708 ; [#uses=1]
- %722 = fmul float %695, %710 ; [#uses=1]
- %723 = fadd float %721, %722 ; [#uses=1]
- %724 = fmul float %698, %713 ; [#uses=1]
- %725 = fadd float %723, %724 ; [#uses=1]
- %726 = fadd float %519, %715 ; [#uses=1]
- %727 = fadd float %518, %720 ; [#uses=1]
- %728 = fadd float %517, %725 ; [#uses=1]
- %729 = getelementptr inbounds %struct.btQuadWord* %28, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %728, float* %729, align 8
- %730 = getelementptr inbounds %struct.btQuadWord* %28, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %727, float* %730, align 4
- %731 = getelementptr inbounds %struct.btQuadWord* %28, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %726, float* %731, align 8
- %732 = getelementptr inbounds %struct.btQuadWord* %28, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %732, align 4
- %733 = bitcast i32 (...)* %673 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %733(%struct.btActionInterface* %669, %struct.btQuadWord* %28, %struct.btQuadWord* %29, %struct.btQuadWord* %color)
- store float %593, float* %663, align 4
- store float %593, float* %664, align 4
- %734 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %735 = getelementptr inbounds i32 (...)** %734, i32 4 ; [#uses=1]
- %736 = load i32 (...)** %735, align 4 ; [#uses=1]
- %737 = bitcast i32 (...)* %736 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %738 = call %struct.btActionInterface* %737(%struct.btCollisionWorld* %this) ; [#uses=2]
- %739 = getelementptr inbounds %struct.btActionInterface* %738, i32 0, i32 0 ; [#uses=1]
- %740 = load i32 (...)*** %739, align 4 ; [#uses=1]
- %741 = getelementptr inbounds i32 (...)** %740, i32 2 ; [#uses=1]
- %742 = load i32 (...)** %741, align 4 ; [#uses=1]
- %743 = load float* %403, align 4 ; [#uses=2]
- %744 = load float* %373, align 8 ; [#uses=3]
- %745 = fmul float %743, %744 ; [#uses=1]
- %746 = load float* %406, align 4 ; [#uses=2]
- %747 = load float* %374, align 4 ; [#uses=3]
- %748 = fmul float %746, %747 ; [#uses=1]
- %749 = fadd float %745, %748 ; [#uses=1]
- %750 = load float* %409, align 4 ; [#uses=2]
- %751 = load float* %375, align 8 ; [#uses=3]
- %752 = fmul float %750, %751 ; [#uses=1]
- %753 = fadd float %749, %752 ; [#uses=1]
- %754 = load float* %391, align 4 ; [#uses=2]
- %755 = fmul float %754, %744 ; [#uses=1]
- %756 = load float* %394, align 4 ; [#uses=2]
- %757 = fmul float %756, %747 ; [#uses=1]
- %758 = fadd float %755, %757 ; [#uses=1]
- %759 = load float* %397, align 4 ; [#uses=2]
- %760 = fmul float %759, %751 ; [#uses=1]
- %761 = fadd float %758, %760 ; [#uses=1]
- %762 = load float* %379, align 4 ; [#uses=2]
- %763 = fmul float %762, %744 ; [#uses=1]
- %764 = load float* %382, align 4 ; [#uses=2]
- %765 = fmul float %764, %747 ; [#uses=1]
- %766 = fadd float %763, %765 ; [#uses=1]
- %767 = load float* %385, align 4 ; [#uses=2]
- %768 = fmul float %767, %751 ; [#uses=1]
- %769 = fadd float %766, %768 ; [#uses=1]
- %770 = fadd float %519, %753 ; [#uses=1]
- %771 = fadd float %518, %761 ; [#uses=1]
- %772 = fadd float %517, %769 ; [#uses=1]
- %773 = getelementptr inbounds %struct.btQuadWord* %27, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %772, float* %773, align 8
- %774 = getelementptr inbounds %struct.btQuadWord* %27, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %771, float* %774, align 4
- %775 = getelementptr inbounds %struct.btQuadWord* %27, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %770, float* %775, align 8
- %776 = getelementptr inbounds %struct.btQuadWord* %27, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %776, align 4
- %777 = load float* %367, align 8 ; [#uses=3]
- %778 = fmul float %743, %777 ; [#uses=1]
- %779 = load float* %368, align 4 ; [#uses=3]
- %780 = fmul float %746, %779 ; [#uses=1]
- %781 = fadd float %778, %780 ; [#uses=1]
- %782 = load float* %369, align 8 ; [#uses=3]
- %783 = fmul float %750, %782 ; [#uses=1]
- %784 = fadd float %781, %783 ; [#uses=1]
- %785 = fmul float %754, %777 ; [#uses=1]
- %786 = fmul float %756, %779 ; [#uses=1]
- %787 = fadd float %785, %786 ; [#uses=1]
- %788 = fmul float %759, %782 ; [#uses=1]
- %789 = fadd float %787, %788 ; [#uses=1]
- %790 = fmul float %762, %777 ; [#uses=1]
- %791 = fmul float %764, %779 ; [#uses=1]
- %792 = fadd float %790, %791 ; [#uses=1]
- %793 = fmul float %767, %782 ; [#uses=1]
- %794 = fadd float %792, %793 ; [#uses=1]
- %795 = fadd float %519, %784 ; [#uses=1]
- %796 = fadd float %518, %789 ; [#uses=1]
- %797 = fadd float %517, %794 ; [#uses=1]
- %798 = getelementptr inbounds %struct.btQuadWord* %26, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %797, float* %798, align 8
- %799 = getelementptr inbounds %struct.btQuadWord* %26, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %796, float* %799, align 4
- %800 = getelementptr inbounds %struct.btQuadWord* %26, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %795, float* %800, align 8
- %801 = getelementptr inbounds %struct.btQuadWord* %26, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %801, align 4
- %802 = bitcast i32 (...)* %742 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %802(%struct.btActionInterface* %738, %struct.btQuadWord* %26, %struct.btQuadWord* %27, %struct.btQuadWord* %color)
- ret void
-
-bb16: ; preds = %entry
- %803 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 4, i32 2 ; [#uses=1]
- %804 = bitcast i8** %803 to float* ; [#uses=1]
- %805 = load float* %804, align 4 ; [#uses=4]
- %806 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 5 ; [#uses=1]
- %807 = bitcast %struct.btCollisionShape* %806 to float* ; [#uses=1]
- %808 = load float* %807, align 4 ; [#uses=1]
- %809 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %810 = load float* %809, align 4 ; [#uses=9]
- %811 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %812 = load float* %811, align 4 ; [#uses=9]
- %813 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %814 = load float* %813, align 4 ; [#uses=9]
- %815 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 5, i32 2 ; [#uses=1]
- %816 = bitcast i8** %815 to i32* ; [#uses=1]
- %817 = load i32* %816, align 4 ; [#uses=4]
- %818 = getelementptr inbounds %struct.btQuadWord* %offsetHeight, i32 0, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %818, align 8
- %819 = getelementptr inbounds %struct.btQuadWord* %offsetHeight, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 0.000000e+00, float* %819, align 4
- %820 = getelementptr inbounds %struct.btQuadWord* %offsetHeight, i32 0, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %820, align 8
- %821 = getelementptr inbounds %struct.btQuadWord* %offsetHeight, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %821, align 4
- %822 = fmul float %808, 5.000000e-01 ; [#uses=1]
- %823 = getelementptr inbounds %struct.btQuadWord* %offsetHeight, i32 0, i32 0, i32 %817 ; [#uses=1]
- store float %822, float* %823, align 4
- %824 = getelementptr inbounds %struct.btQuadWord* %offsetRadius, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %824, align 8
- %825 = getelementptr inbounds %struct.btQuadWord* %offsetRadius, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %825, align 4
- %826 = getelementptr inbounds %struct.btQuadWord* %offsetRadius, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %826, align 8
- %827 = getelementptr inbounds %struct.btQuadWord* %offsetRadius, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %827, align 4
- %828 = add nsw i32 %817, 1 ; [#uses=1]
- %829 = srem i32 %828, 3 ; [#uses=2]
- %830 = getelementptr inbounds %struct.btQuadWord* %offsetRadius, i32 0, i32 0, i32 %829 ; [#uses=1]
- store float %805, float* %830, align 4
- %831 = getelementptr inbounds %struct.btQuadWord* %offset2Radius, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %831, align 8
- %832 = getelementptr inbounds %struct.btQuadWord* %offset2Radius, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %832, align 4
- %833 = getelementptr inbounds %struct.btQuadWord* %offset2Radius, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %833, align 8
- %834 = getelementptr inbounds %struct.btQuadWord* %offset2Radius, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %834, align 4
- %835 = add nsw i32 %817, 2 ; [#uses=1]
- %836 = srem i32 %835, 3 ; [#uses=1]
- %837 = getelementptr inbounds %struct.btQuadWord* %offset2Radius, i32 0, i32 0, i32 %836 ; [#uses=1]
- store float %805, float* %837, align 4
- %838 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %839 = getelementptr inbounds i32 (...)** %838, i32 4 ; [#uses=1]
- %840 = load i32 (...)** %839, align 4 ; [#uses=1]
- %841 = bitcast i32 (...)* %840 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %842 = call %struct.btActionInterface* %841(%struct.btCollisionWorld* %this) ; [#uses=2]
- %843 = getelementptr inbounds %struct.btActionInterface* %842, i32 0, i32 0 ; [#uses=1]
- %844 = load i32 (...)*** %843, align 4 ; [#uses=1]
- %845 = getelementptr inbounds i32 (...)** %844, i32 2 ; [#uses=1]
- %846 = load i32 (...)** %845, align 4 ; [#uses=1]
- %847 = load float* %820, align 8 ; [#uses=4]
- %848 = load float* %819, align 4 ; [#uses=4]
- %849 = load float* %818, align 8 ; [#uses=4]
- %850 = load float* %826, align 8 ; [#uses=2]
- %851 = fsub float %850, %847 ; [#uses=3]
- %852 = load float* %825, align 4 ; [#uses=2]
- %853 = fsub float %852, %848 ; [#uses=3]
- %854 = load float* %824, align 8 ; [#uses=2]
- %855 = fsub float %854, %849 ; [#uses=3]
- %856 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=5]
- %857 = load float* %856, align 4 ; [#uses=2]
- %858 = fmul float %857, %855 ; [#uses=1]
- %859 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=5]
- %860 = load float* %859, align 4 ; [#uses=2]
- %861 = fmul float %860, %853 ; [#uses=1]
- %862 = fadd float %858, %861 ; [#uses=1]
- %863 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=5]
- %864 = load float* %863, align 4 ; [#uses=2]
- %865 = fmul float %864, %851 ; [#uses=1]
- %866 = fadd float %862, %865 ; [#uses=1]
- %867 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=5]
- %868 = load float* %867, align 4 ; [#uses=2]
- %869 = fmul float %868, %855 ; [#uses=1]
- %870 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=5]
- %871 = load float* %870, align 4 ; [#uses=2]
- %872 = fmul float %871, %853 ; [#uses=1]
- %873 = fadd float %869, %872 ; [#uses=1]
- %874 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=5]
- %875 = load float* %874, align 4 ; [#uses=2]
- %876 = fmul float %875, %851 ; [#uses=1]
- %877 = fadd float %873, %876 ; [#uses=1]
- %878 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=5]
- %879 = load float* %878, align 4 ; [#uses=2]
- %880 = fmul float %879, %855 ; [#uses=1]
- %881 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=5]
- %882 = load float* %881, align 4 ; [#uses=2]
- %883 = fmul float %882, %853 ; [#uses=1]
- %884 = fadd float %880, %883 ; [#uses=1]
- %885 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=5]
- %886 = load float* %885, align 4 ; [#uses=2]
- %887 = fmul float %886, %851 ; [#uses=1]
- %888 = fadd float %884, %887 ; [#uses=1]
- %889 = fadd float %814, %866 ; [#uses=1]
- %890 = fadd float %812, %877 ; [#uses=1]
- %891 = fadd float %810, %888 ; [#uses=1]
- %892 = getelementptr inbounds %struct.btQuadWord* %25, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %891, float* %892, align 8
- %893 = getelementptr inbounds %struct.btQuadWord* %25, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %890, float* %893, align 4
- %894 = getelementptr inbounds %struct.btQuadWord* %25, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %889, float* %894, align 8
- %895 = getelementptr inbounds %struct.btQuadWord* %25, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %895, align 4
- %896 = fmul float %857, %849 ; [#uses=1]
- %897 = fmul float %860, %848 ; [#uses=1]
- %898 = fadd float %896, %897 ; [#uses=1]
- %899 = fmul float %864, %847 ; [#uses=1]
- %900 = fadd float %898, %899 ; [#uses=1]
- %901 = fmul float %868, %849 ; [#uses=1]
- %902 = fmul float %871, %848 ; [#uses=1]
- %903 = fadd float %901, %902 ; [#uses=1]
- %904 = fmul float %875, %847 ; [#uses=1]
- %905 = fadd float %903, %904 ; [#uses=1]
- %906 = fmul float %879, %849 ; [#uses=1]
- %907 = fmul float %882, %848 ; [#uses=1]
- %908 = fadd float %906, %907 ; [#uses=1]
- %909 = fmul float %886, %847 ; [#uses=1]
- %910 = fadd float %908, %909 ; [#uses=1]
- %911 = fadd float %814, %900 ; [#uses=1]
- %912 = fadd float %812, %905 ; [#uses=1]
- %913 = fadd float %810, %910 ; [#uses=1]
- %914 = getelementptr inbounds %struct.btQuadWord* %24, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %913, float* %914, align 8
- %915 = getelementptr inbounds %struct.btQuadWord* %24, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %912, float* %915, align 4
- %916 = getelementptr inbounds %struct.btQuadWord* %24, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %911, float* %916, align 8
- %917 = getelementptr inbounds %struct.btQuadWord* %24, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %917, align 4
- %918 = bitcast i32 (...)* %846 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %918(%struct.btActionInterface* %842, %struct.btQuadWord* %24, %struct.btQuadWord* %25, %struct.btQuadWord* %color)
- %919 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %920 = getelementptr inbounds i32 (...)** %919, i32 4 ; [#uses=1]
- %921 = load i32 (...)** %920, align 4 ; [#uses=1]
- %922 = bitcast i32 (...)* %921 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %923 = call %struct.btActionInterface* %922(%struct.btCollisionWorld* %this) ; [#uses=2]
- %924 = getelementptr inbounds %struct.btActionInterface* %923, i32 0, i32 0 ; [#uses=1]
- %925 = load i32 (...)*** %924, align 4 ; [#uses=1]
- %926 = getelementptr inbounds i32 (...)** %925, i32 2 ; [#uses=1]
- %927 = load i32 (...)** %926, align 4 ; [#uses=1]
- %928 = load float* %820, align 8 ; [#uses=14]
- %929 = fsub float -0.000000e+00, %928 ; [#uses=2]
- %930 = load float* %819, align 4 ; [#uses=14]
- %931 = fsub float -0.000000e+00, %930 ; [#uses=2]
- %932 = load float* %818, align 8 ; [#uses=14]
- %933 = fsub float -0.000000e+00, %932 ; [#uses=2]
- %934 = fsub float %929, %850 ; [#uses=3]
- %935 = fsub float %931, %852 ; [#uses=3]
- %936 = fsub float %933, %854 ; [#uses=3]
- %937 = load float* %856, align 4 ; [#uses=2]
- %938 = fmul float %937, %936 ; [#uses=1]
- %939 = load float* %859, align 4 ; [#uses=2]
- %940 = fmul float %939, %935 ; [#uses=1]
- %941 = fadd float %938, %940 ; [#uses=1]
- %942 = load float* %863, align 4 ; [#uses=2]
- %943 = fmul float %942, %934 ; [#uses=1]
- %944 = fadd float %941, %943 ; [#uses=1]
- %945 = load float* %867, align 4 ; [#uses=2]
- %946 = fmul float %945, %936 ; [#uses=1]
- %947 = load float* %870, align 4 ; [#uses=2]
- %948 = fmul float %947, %935 ; [#uses=1]
- %949 = fadd float %946, %948 ; [#uses=1]
- %950 = load float* %874, align 4 ; [#uses=2]
- %951 = fmul float %950, %934 ; [#uses=1]
- %952 = fadd float %949, %951 ; [#uses=1]
- %953 = load float* %878, align 4 ; [#uses=2]
- %954 = fmul float %953, %936 ; [#uses=1]
- %955 = load float* %881, align 4 ; [#uses=2]
- %956 = fmul float %955, %935 ; [#uses=1]
- %957 = fadd float %954, %956 ; [#uses=1]
- %958 = load float* %885, align 4 ; [#uses=2]
- %959 = fmul float %958, %934 ; [#uses=1]
- %960 = fadd float %957, %959 ; [#uses=1]
- %961 = fadd float %814, %944 ; [#uses=1]
- %962 = fadd float %812, %952 ; [#uses=1]
- %963 = fadd float %810, %960 ; [#uses=1]
- %964 = getelementptr inbounds %struct.btQuadWord* %23, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %963, float* %964, align 8
- %965 = getelementptr inbounds %struct.btQuadWord* %23, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %962, float* %965, align 4
- %966 = getelementptr inbounds %struct.btQuadWord* %23, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %961, float* %966, align 8
- %967 = getelementptr inbounds %struct.btQuadWord* %23, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %967, align 4
- %968 = fmul float %937, %932 ; [#uses=1]
- %969 = fmul float %939, %930 ; [#uses=1]
- %970 = fadd float %968, %969 ; [#uses=1]
- %971 = fmul float %942, %928 ; [#uses=1]
- %972 = fadd float %970, %971 ; [#uses=1]
- %973 = fmul float %945, %932 ; [#uses=1]
- %974 = fmul float %947, %930 ; [#uses=1]
- %975 = fadd float %973, %974 ; [#uses=1]
- %976 = fmul float %950, %928 ; [#uses=1]
- %977 = fadd float %975, %976 ; [#uses=1]
- %978 = fmul float %953, %932 ; [#uses=1]
- %979 = fmul float %955, %930 ; [#uses=1]
- %980 = fadd float %978, %979 ; [#uses=1]
- %981 = fmul float %958, %928 ; [#uses=1]
- %982 = fadd float %980, %981 ; [#uses=1]
- %983 = fadd float %814, %972 ; [#uses=1]
- %984 = fadd float %812, %977 ; [#uses=1]
- %985 = fadd float %810, %982 ; [#uses=1]
- %986 = getelementptr inbounds %struct.btQuadWord* %22, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %985, float* %986, align 8
- %987 = getelementptr inbounds %struct.btQuadWord* %22, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %984, float* %987, align 4
- %988 = getelementptr inbounds %struct.btQuadWord* %22, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %983, float* %988, align 8
- %989 = getelementptr inbounds %struct.btQuadWord* %22, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %989, align 4
- %990 = bitcast i32 (...)* %927 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %990(%struct.btActionInterface* %923, %struct.btQuadWord* %22, %struct.btQuadWord* %23, %struct.btQuadWord* %color)
- %991 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %992 = getelementptr inbounds i32 (...)** %991, i32 4 ; [#uses=1]
- %993 = load i32 (...)** %992, align 4 ; [#uses=1]
- %994 = bitcast i32 (...)* %993 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %995 = call %struct.btActionInterface* %994(%struct.btCollisionWorld* %this) ; [#uses=2]
- %996 = getelementptr inbounds %struct.btActionInterface* %995, i32 0, i32 0 ; [#uses=1]
- %997 = load i32 (...)*** %996, align 4 ; [#uses=1]
- %998 = getelementptr inbounds i32 (...)** %997, i32 2 ; [#uses=1]
- %999 = load i32 (...)** %998, align 4 ; [#uses=1]
- %1000 = load float* %833, align 8 ; [#uses=2]
- %1001 = fsub float %1000, %928 ; [#uses=3]
- %1002 = load float* %832, align 4 ; [#uses=2]
- %1003 = fsub float %1002, %930 ; [#uses=3]
- %1004 = load float* %831, align 8 ; [#uses=2]
- %1005 = fsub float %1004, %932 ; [#uses=3]
- %1006 = load float* %856, align 4 ; [#uses=2]
- %1007 = fmul float %1006, %1005 ; [#uses=1]
- %1008 = load float* %859, align 4 ; [#uses=2]
- %1009 = fmul float %1008, %1003 ; [#uses=1]
- %1010 = fadd float %1007, %1009 ; [#uses=1]
- %1011 = load float* %863, align 4 ; [#uses=2]
- %1012 = fmul float %1011, %1001 ; [#uses=1]
- %1013 = fadd float %1010, %1012 ; [#uses=1]
- %1014 = load float* %867, align 4 ; [#uses=2]
- %1015 = fmul float %1014, %1005 ; [#uses=1]
- %1016 = load float* %870, align 4 ; [#uses=2]
- %1017 = fmul float %1016, %1003 ; [#uses=1]
- %1018 = fadd float %1015, %1017 ; [#uses=1]
- %1019 = load float* %874, align 4 ; [#uses=2]
- %1020 = fmul float %1019, %1001 ; [#uses=1]
- %1021 = fadd float %1018, %1020 ; [#uses=1]
- %1022 = load float* %878, align 4 ; [#uses=2]
- %1023 = fmul float %1022, %1005 ; [#uses=1]
- %1024 = load float* %881, align 4 ; [#uses=2]
- %1025 = fmul float %1024, %1003 ; [#uses=1]
- %1026 = fadd float %1023, %1025 ; [#uses=1]
- %1027 = load float* %885, align 4 ; [#uses=2]
- %1028 = fmul float %1027, %1001 ; [#uses=1]
- %1029 = fadd float %1026, %1028 ; [#uses=1]
- %1030 = fadd float %814, %1013 ; [#uses=1]
- %1031 = fadd float %812, %1021 ; [#uses=1]
- %1032 = fadd float %810, %1029 ; [#uses=1]
- %1033 = getelementptr inbounds %struct.btQuadWord* %21, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1032, float* %1033, align 8
- %1034 = getelementptr inbounds %struct.btQuadWord* %21, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1031, float* %1034, align 4
- %1035 = getelementptr inbounds %struct.btQuadWord* %21, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1030, float* %1035, align 8
- %1036 = getelementptr inbounds %struct.btQuadWord* %21, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1036, align 4
- %1037 = fmul float %1006, %932 ; [#uses=1]
- %1038 = fmul float %1008, %930 ; [#uses=1]
- %1039 = fadd float %1037, %1038 ; [#uses=1]
- %1040 = fmul float %1011, %928 ; [#uses=1]
- %1041 = fadd float %1039, %1040 ; [#uses=1]
- %1042 = fmul float %1014, %932 ; [#uses=1]
- %1043 = fmul float %1016, %930 ; [#uses=1]
- %1044 = fadd float %1042, %1043 ; [#uses=1]
- %1045 = fmul float %1019, %928 ; [#uses=1]
- %1046 = fadd float %1044, %1045 ; [#uses=1]
- %1047 = fmul float %1022, %932 ; [#uses=1]
- %1048 = fmul float %1024, %930 ; [#uses=1]
- %1049 = fadd float %1047, %1048 ; [#uses=1]
- %1050 = fmul float %1027, %928 ; [#uses=1]
- %1051 = fadd float %1049, %1050 ; [#uses=1]
- %1052 = fadd float %814, %1041 ; [#uses=1]
- %1053 = fadd float %812, %1046 ; [#uses=1]
- %1054 = fadd float %810, %1051 ; [#uses=1]
- %1055 = getelementptr inbounds %struct.btQuadWord* %20, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1054, float* %1055, align 8
- %1056 = getelementptr inbounds %struct.btQuadWord* %20, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1053, float* %1056, align 4
- %1057 = getelementptr inbounds %struct.btQuadWord* %20, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1052, float* %1057, align 8
- %1058 = getelementptr inbounds %struct.btQuadWord* %20, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1058, align 4
- %1059 = bitcast i32 (...)* %999 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1059(%struct.btActionInterface* %995, %struct.btQuadWord* %20, %struct.btQuadWord* %21, %struct.btQuadWord* %color)
- %1060 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1061 = getelementptr inbounds i32 (...)** %1060, i32 4 ; [#uses=1]
- %1062 = load i32 (...)** %1061, align 4 ; [#uses=1]
- %1063 = bitcast i32 (...)* %1062 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1064 = call %struct.btActionInterface* %1063(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1065 = getelementptr inbounds %struct.btActionInterface* %1064, i32 0, i32 0 ; [#uses=1]
- %1066 = load i32 (...)*** %1065, align 4 ; [#uses=1]
- %1067 = getelementptr inbounds i32 (...)** %1066, i32 2 ; [#uses=1]
- %1068 = load i32 (...)** %1067, align 4 ; [#uses=1]
- %1069 = fsub float %929, %1000 ; [#uses=3]
- %1070 = fsub float %931, %1002 ; [#uses=3]
- %1071 = fsub float %933, %1004 ; [#uses=3]
- %1072 = load float* %856, align 4 ; [#uses=2]
- %1073 = fmul float %1072, %1071 ; [#uses=1]
- %1074 = load float* %859, align 4 ; [#uses=2]
- %1075 = fmul float %1074, %1070 ; [#uses=1]
- %1076 = fadd float %1073, %1075 ; [#uses=1]
- %1077 = load float* %863, align 4 ; [#uses=2]
- %1078 = fmul float %1077, %1069 ; [#uses=1]
- %1079 = fadd float %1076, %1078 ; [#uses=1]
- %1080 = load float* %867, align 4 ; [#uses=2]
- %1081 = fmul float %1080, %1071 ; [#uses=1]
- %1082 = load float* %870, align 4 ; [#uses=2]
- %1083 = fmul float %1082, %1070 ; [#uses=1]
- %1084 = fadd float %1081, %1083 ; [#uses=1]
- %1085 = load float* %874, align 4 ; [#uses=2]
- %1086 = fmul float %1085, %1069 ; [#uses=1]
- %1087 = fadd float %1084, %1086 ; [#uses=1]
- %1088 = load float* %878, align 4 ; [#uses=2]
- %1089 = fmul float %1088, %1071 ; [#uses=1]
- %1090 = load float* %881, align 4 ; [#uses=2]
- %1091 = fmul float %1090, %1070 ; [#uses=1]
- %1092 = fadd float %1089, %1091 ; [#uses=1]
- %1093 = load float* %885, align 4 ; [#uses=2]
- %1094 = fmul float %1093, %1069 ; [#uses=1]
- %1095 = fadd float %1092, %1094 ; [#uses=1]
- %1096 = fadd float %814, %1079 ; [#uses=1]
- %1097 = fadd float %812, %1087 ; [#uses=1]
- %1098 = fadd float %810, %1095 ; [#uses=1]
- %1099 = getelementptr inbounds %struct.btQuadWord* %19, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1098, float* %1099, align 8
- %1100 = getelementptr inbounds %struct.btQuadWord* %19, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1097, float* %1100, align 4
- %1101 = getelementptr inbounds %struct.btQuadWord* %19, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1096, float* %1101, align 8
- %1102 = getelementptr inbounds %struct.btQuadWord* %19, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1102, align 4
- %1103 = fmul float %1072, %932 ; [#uses=1]
- %1104 = fmul float %1074, %930 ; [#uses=1]
- %1105 = fadd float %1103, %1104 ; [#uses=1]
- %1106 = fmul float %1077, %928 ; [#uses=1]
- %1107 = fadd float %1105, %1106 ; [#uses=1]
- %1108 = fmul float %1080, %932 ; [#uses=1]
- %1109 = fmul float %1082, %930 ; [#uses=1]
- %1110 = fadd float %1108, %1109 ; [#uses=1]
- %1111 = fmul float %1085, %928 ; [#uses=1]
- %1112 = fadd float %1110, %1111 ; [#uses=1]
- %1113 = fmul float %1088, %932 ; [#uses=1]
- %1114 = fmul float %1090, %930 ; [#uses=1]
- %1115 = fadd float %1113, %1114 ; [#uses=1]
- %1116 = fmul float %1093, %928 ; [#uses=1]
- %1117 = fadd float %1115, %1116 ; [#uses=1]
- %1118 = fadd float %814, %1107 ; [#uses=1]
- %1119 = fadd float %812, %1112 ; [#uses=1]
- %1120 = fadd float %810, %1117 ; [#uses=1]
- %1121 = getelementptr inbounds %struct.btQuadWord* %18, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1120, float* %1121, align 8
- %1122 = getelementptr inbounds %struct.btQuadWord* %18, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1119, float* %1122, align 4
- %1123 = getelementptr inbounds %struct.btQuadWord* %18, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1118, float* %1123, align 8
- %1124 = getelementptr inbounds %struct.btQuadWord* %18, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1124, align 4
- %1125 = bitcast i32 (...)* %1068 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1125(%struct.btActionInterface* %1064, %struct.btQuadWord* %18, %struct.btQuadWord* %19, %struct.btQuadWord* %color)
- %1126 = getelementptr inbounds %struct.btQuadWord* %yaxis, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %1126, align 8
- %1127 = getelementptr inbounds %struct.btQuadWord* %yaxis, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1127, align 4
- %1128 = getelementptr inbounds %struct.btQuadWord* %yaxis, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %1128, align 8
- %1129 = getelementptr inbounds %struct.btQuadWord* %yaxis, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1129, align 4
- %1130 = getelementptr inbounds %struct.btQuadWord* %yaxis, i32 0, i32 0, i32 %817 ; [#uses=1]
- store float 1.000000e+00, float* %1130, align 4
- %1131 = getelementptr inbounds %struct.btQuadWord* %xaxis, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %1131, align 8
- %1132 = getelementptr inbounds %struct.btQuadWord* %xaxis, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1132, align 4
- %1133 = getelementptr inbounds %struct.btQuadWord* %xaxis, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %1133, align 8
- %1134 = getelementptr inbounds %struct.btQuadWord* %xaxis, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1134, align 4
- %1135 = getelementptr inbounds %struct.btQuadWord* %xaxis, i32 0, i32 0, i32 %829 ; [#uses=1]
- store float 1.000000e+00, float* %1135, align 4
- %1136 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1137 = getelementptr inbounds i32 (...)** %1136, i32 4 ; [#uses=1]
- %1138 = load i32 (...)** %1137, align 4 ; [#uses=1]
- %1139 = bitcast i32 (...)* %1138 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1140 = call %struct.btActionInterface* %1139(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1141 = getelementptr inbounds %struct.btActionInterface* %1140, i32 0, i32 0 ; [#uses=1]
- %1142 = load i32 (...)*** %1141, align 4 ; [#uses=1]
- %1143 = getelementptr inbounds i32 (...)** %1142, i32 15 ; [#uses=1]
- %1144 = load i32 (...)** %1143, align 4 ; [#uses=1]
- %1145 = load float* %856, align 4 ; [#uses=3]
- %1146 = load float* %1131, align 8 ; [#uses=3]
- %1147 = fmul float %1145, %1146 ; [#uses=1]
- %1148 = load float* %859, align 4 ; [#uses=3]
- %1149 = load float* %1132, align 4 ; [#uses=3]
- %1150 = fmul float %1148, %1149 ; [#uses=1]
- %1151 = fadd float %1147, %1150 ; [#uses=1]
- %1152 = load float* %863, align 4 ; [#uses=3]
- %1153 = load float* %1133, align 8 ; [#uses=3]
- %1154 = fmul float %1152, %1153 ; [#uses=1]
- %1155 = fadd float %1151, %1154 ; [#uses=1]
- %1156 = load float* %867, align 4 ; [#uses=3]
- %1157 = fmul float %1156, %1146 ; [#uses=1]
- %1158 = load float* %870, align 4 ; [#uses=3]
- %1159 = fmul float %1158, %1149 ; [#uses=1]
- %1160 = fadd float %1157, %1159 ; [#uses=1]
- %1161 = load float* %874, align 4 ; [#uses=3]
- %1162 = fmul float %1161, %1153 ; [#uses=1]
- %1163 = fadd float %1160, %1162 ; [#uses=1]
- %1164 = load float* %878, align 4 ; [#uses=3]
- %1165 = fmul float %1164, %1146 ; [#uses=1]
- %1166 = load float* %881, align 4 ; [#uses=3]
- %1167 = fmul float %1166, %1149 ; [#uses=1]
- %1168 = fadd float %1165, %1167 ; [#uses=1]
- %1169 = load float* %885, align 4 ; [#uses=3]
- %1170 = fmul float %1169, %1153 ; [#uses=1]
- %1171 = fadd float %1168, %1170 ; [#uses=1]
- %1172 = getelementptr inbounds %struct.btQuadWord* %17, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1171, float* %1172, align 8
- %1173 = getelementptr inbounds %struct.btQuadWord* %17, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1163, float* %1173, align 4
- %1174 = getelementptr inbounds %struct.btQuadWord* %17, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1155, float* %1174, align 8
- %1175 = getelementptr inbounds %struct.btQuadWord* %17, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1175, align 4
- %1176 = load float* %1126, align 8 ; [#uses=3]
- %1177 = fmul float %1145, %1176 ; [#uses=1]
- %1178 = load float* %1127, align 4 ; [#uses=3]
- %1179 = fmul float %1148, %1178 ; [#uses=1]
- %1180 = fadd float %1177, %1179 ; [#uses=1]
- %1181 = load float* %1128, align 8 ; [#uses=3]
- %1182 = fmul float %1152, %1181 ; [#uses=1]
- %1183 = fadd float %1180, %1182 ; [#uses=1]
- %1184 = fmul float %1156, %1176 ; [#uses=1]
- %1185 = fmul float %1158, %1178 ; [#uses=1]
- %1186 = fadd float %1184, %1185 ; [#uses=1]
- %1187 = fmul float %1161, %1181 ; [#uses=1]
- %1188 = fadd float %1186, %1187 ; [#uses=1]
- %1189 = fmul float %1164, %1176 ; [#uses=1]
- %1190 = fmul float %1166, %1178 ; [#uses=1]
- %1191 = fadd float %1189, %1190 ; [#uses=1]
- %1192 = fmul float %1169, %1181 ; [#uses=1]
- %1193 = fadd float %1191, %1192 ; [#uses=1]
- %1194 = getelementptr inbounds %struct.btQuadWord* %16, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1193, float* %1194, align 8
- %1195 = getelementptr inbounds %struct.btQuadWord* %16, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1188, float* %1195, align 4
- %1196 = getelementptr inbounds %struct.btQuadWord* %16, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1183, float* %1196, align 8
- %1197 = getelementptr inbounds %struct.btQuadWord* %16, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1197, align 4
- %1198 = fmul float %1145, %932 ; [#uses=1]
- %1199 = fmul float %1148, %930 ; [#uses=1]
- %1200 = fadd float %1198, %1199 ; [#uses=1]
- %1201 = fmul float %1152, %928 ; [#uses=1]
- %1202 = fadd float %1200, %1201 ; [#uses=1]
- %1203 = fmul float %1156, %932 ; [#uses=1]
- %1204 = fmul float %1158, %930 ; [#uses=1]
- %1205 = fadd float %1203, %1204 ; [#uses=1]
- %1206 = fmul float %1161, %928 ; [#uses=1]
- %1207 = fadd float %1205, %1206 ; [#uses=1]
- %1208 = fmul float %1164, %932 ; [#uses=1]
- %1209 = fmul float %1166, %930 ; [#uses=1]
- %1210 = fadd float %1208, %1209 ; [#uses=1]
- %1211 = fmul float %1169, %928 ; [#uses=1]
- %1212 = fadd float %1210, %1211 ; [#uses=1]
- %1213 = fsub float %814, %1202 ; [#uses=1]
- %1214 = fsub float %812, %1207 ; [#uses=1]
- %1215 = fsub float %810, %1212 ; [#uses=1]
- %1216 = getelementptr inbounds %struct.btQuadWord* %15, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1215, float* %1216, align 8
- %1217 = getelementptr inbounds %struct.btQuadWord* %15, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1214, float* %1217, align 4
- %1218 = getelementptr inbounds %struct.btQuadWord* %15, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1213, float* %1218, align 8
- %1219 = getelementptr inbounds %struct.btQuadWord* %15, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1219, align 4
- %1220 = bitcast i32 (...)* %1144 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %1220(%struct.btActionInterface* %1140, %struct.btQuadWord* %15, %struct.btQuadWord* %16, %struct.btQuadWord* %17, float %805, float %805, float 0.000000e+00, float 0x401921FB60000000, %struct.btQuadWord* %color, i8 zeroext 0, float 1.000000e+01)
- ret void
-
-bb30: ; preds = %entry
- %1221 = bitcast %struct.btCollisionShape* %shape to %struct.btCapsuleShape* ; [#uses=1]
- %1222 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 4, i32 1 ; [#uses=1]
- %1223 = load i32* %1222, align 4 ; [#uses=4]
- %1224 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 0 ; [#uses=4]
- %1225 = load i32 (...)*** %1224, align 4 ; [#uses=1]
- %1226 = getelementptr inbounds i32 (...)** %1225, i32 21 ; [#uses=1]
- %1227 = load i32 (...)** %1226, align 4 ; [#uses=1]
- %1228 = bitcast i32 (...)* %1227 to float (%struct.btCapsuleShape*)* ; [#uses=1]
- %1229 = call float %1228(%struct.btCapsuleShape* %1221) ; [#uses=5]
- %1230 = getelementptr inbounds %struct.btQuadWord* %14, i32 0, i32 0, i32 0 ; [#uses=1]
- %1231 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 2, i32 1 ; [#uses=1]
- %1232 = bitcast i32* %1231 to float* ; [#uses=1]
- %1233 = load float* %1232, align 4 ; [#uses=1]
- %1234 = getelementptr inbounds %struct.btQuadWord* %14, i32 0, i32 0, i32 1 ; [#uses=1]
- %1235 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 2, i32 2 ; [#uses=1]
- %1236 = bitcast i8** %1235 to float* ; [#uses=1]
- %1237 = load float* %1236, align 4 ; [#uses=1]
- %1238 = getelementptr inbounds %struct.btQuadWord* %14, i32 0, i32 0, i32 2 ; [#uses=1]
- %1239 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 3 ; [#uses=1]
- %1240 = bitcast %struct.btCollisionShape* %1239 to float* ; [#uses=1]
- %1241 = load float* %1240, align 4 ; [#uses=1]
- %1242 = getelementptr inbounds %struct.btQuadWord* %14, i32 0, i32 0, i32 3 ; [#uses=1]
- %1243 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 3, i32 1 ; [#uses=1]
- %1244 = bitcast i32* %1243 to float* ; [#uses=1]
- %1245 = load float* %1244, align 4 ; [#uses=1]
- store float %1245, float* %1242, align 4
- %1246 = load i32 (...)*** %1224, align 4 ; [#uses=1]
- %1247 = getelementptr inbounds i32 (...)** %1246, i32 11 ; [#uses=1]
- %1248 = load i32 (...)** %1247, align 4 ; [#uses=1]
- %1249 = bitcast %struct.btCollisionShape* %shape to %struct.btConvexInternalShape* ; [#uses=3]
- %1250 = bitcast i32 (...)* %1248 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %1251 = call float %1250(%struct.btConvexInternalShape* %1249) ; [#uses=1]
- %1252 = load i32 (...)*** %1224, align 4 ; [#uses=1]
- %1253 = getelementptr inbounds i32 (...)** %1252, i32 11 ; [#uses=1]
- %1254 = load i32 (...)** %1253, align 4 ; [#uses=1]
- %1255 = bitcast i32 (...)* %1254 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %1256 = call float %1255(%struct.btConvexInternalShape* %1249) ; [#uses=1]
- %1257 = load i32 (...)*** %1224, align 4 ; [#uses=1]
- %1258 = getelementptr inbounds i32 (...)** %1257, i32 11 ; [#uses=1]
- %1259 = load i32 (...)** %1258, align 4 ; [#uses=1]
- %1260 = bitcast i32 (...)* %1259 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %1261 = call float %1260(%struct.btConvexInternalShape* %1249) ; [#uses=1]
- %1262 = fadd float %1233, %1261 ; [#uses=1]
- store float %1262, float* %1230, align 8
- %1263 = fadd float %1237, %1256 ; [#uses=1]
- store float %1263, float* %1234, align 4
- %1264 = fadd float %1241, %1251 ; [#uses=1]
- store float %1264, float* %1238, align 8
- %1265 = getelementptr inbounds %struct.btQuadWord* %14, i32 0, i32 0, i32 %1223 ; [#uses=1]
- %1266 = load float* %1265, align 4 ; [#uses=1]
- %1267 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1268 = load float* %1267, align 4 ; [#uses=6]
- %1269 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1270 = load float* %1269, align 4 ; [#uses=6]
- %1271 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1272 = load float* %1271, align 4 ; [#uses=6]
- %1273 = getelementptr inbounds %struct.btQuadWord* %offsetHeight41, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %1273, align 8
- %1274 = getelementptr inbounds %struct.btQuadWord* %offsetHeight41, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1274, align 4
- %1275 = getelementptr inbounds %struct.btQuadWord* %offsetHeight41, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %1275, align 8
- %1276 = getelementptr inbounds %struct.btQuadWord* %offsetHeight41, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1276, align 4
- %1277 = getelementptr inbounds %struct.btQuadWord* %offsetHeight41, i32 0, i32 0, i32 %1223 ; [#uses=1]
- store float %1266, float* %1277, align 4
- %1278 = getelementptr inbounds %struct.btQuadWord* %offsetRadius43, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %1278, align 8
- %1279 = getelementptr inbounds %struct.btQuadWord* %offsetRadius43, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1279, align 4
- %1280 = getelementptr inbounds %struct.btQuadWord* %offsetRadius43, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %1280, align 8
- %1281 = getelementptr inbounds %struct.btQuadWord* %offsetRadius43, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1281, align 4
- %1282 = add nsw i32 %1223, 1 ; [#uses=1]
- %1283 = srem i32 %1282, 3 ; [#uses=2]
- %1284 = getelementptr inbounds %struct.btQuadWord* %offsetRadius43, i32 0, i32 0, i32 %1283 ; [#uses=1]
- store float %1229, float* %1284, align 4
- %1285 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1286 = getelementptr inbounds i32 (...)** %1285, i32 4 ; [#uses=1]
- %1287 = load i32 (...)** %1286, align 4 ; [#uses=1]
- %1288 = bitcast i32 (...)* %1287 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1289 = call %struct.btActionInterface* %1288(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1290 = getelementptr inbounds %struct.btActionInterface* %1289, i32 0, i32 0 ; [#uses=1]
- %1291 = load i32 (...)*** %1290, align 4 ; [#uses=1]
- %1292 = getelementptr inbounds i32 (...)** %1291, i32 2 ; [#uses=1]
- %1293 = load i32 (...)** %1292, align 4 ; [#uses=1]
- %1294 = load float* %1275, align 8 ; [#uses=10]
- %1295 = load float* %1274, align 4 ; [#uses=10]
- %1296 = load float* %1273, align 8 ; [#uses=10]
- %1297 = load float* %1280, align 8 ; [#uses=4]
- %1298 = fsub float %1297, %1294 ; [#uses=3]
- %1299 = load float* %1279, align 4 ; [#uses=4]
- %1300 = fsub float %1299, %1295 ; [#uses=3]
- %1301 = load float* %1278, align 8 ; [#uses=4]
- %1302 = fsub float %1301, %1296 ; [#uses=3]
- %1303 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %1304 = load float* %1303, align 4 ; [#uses=2]
- %1305 = fmul float %1304, %1302 ; [#uses=1]
- %1306 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %1307 = load float* %1306, align 4 ; [#uses=2]
- %1308 = fmul float %1307, %1300 ; [#uses=1]
- %1309 = fadd float %1305, %1308 ; [#uses=1]
- %1310 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %1311 = load float* %1310, align 4 ; [#uses=2]
- %1312 = fmul float %1311, %1298 ; [#uses=1]
- %1313 = fadd float %1309, %1312 ; [#uses=1]
- %1314 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %1315 = load float* %1314, align 4 ; [#uses=2]
- %1316 = fmul float %1315, %1302 ; [#uses=1]
- %1317 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %1318 = load float* %1317, align 4 ; [#uses=2]
- %1319 = fmul float %1318, %1300 ; [#uses=1]
- %1320 = fadd float %1316, %1319 ; [#uses=1]
- %1321 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %1322 = load float* %1321, align 4 ; [#uses=2]
- %1323 = fmul float %1322, %1298 ; [#uses=1]
- %1324 = fadd float %1320, %1323 ; [#uses=1]
- %1325 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %1326 = load float* %1325, align 4 ; [#uses=2]
- %1327 = fmul float %1326, %1302 ; [#uses=1]
- %1328 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %1329 = load float* %1328, align 4 ; [#uses=2]
- %1330 = fmul float %1329, %1300 ; [#uses=1]
- %1331 = fadd float %1327, %1330 ; [#uses=1]
- %1332 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %1333 = load float* %1332, align 4 ; [#uses=2]
- %1334 = fmul float %1333, %1298 ; [#uses=1]
- %1335 = fadd float %1331, %1334 ; [#uses=1]
- %1336 = fadd float %1272, %1313 ; [#uses=1]
- %1337 = fadd float %1270, %1324 ; [#uses=1]
- %1338 = fadd float %1268, %1335 ; [#uses=1]
- %1339 = getelementptr inbounds %struct.btQuadWord* %13, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1338, float* %1339, align 8
- %1340 = getelementptr inbounds %struct.btQuadWord* %13, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1337, float* %1340, align 4
- %1341 = getelementptr inbounds %struct.btQuadWord* %13, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1336, float* %1341, align 8
- %1342 = getelementptr inbounds %struct.btQuadWord* %13, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1342, align 4
- %1343 = fadd float %1294, %1297 ; [#uses=3]
- %1344 = fadd float %1295, %1299 ; [#uses=3]
- %1345 = fadd float %1296, %1301 ; [#uses=3]
- %1346 = fmul float %1304, %1345 ; [#uses=1]
- %1347 = fmul float %1307, %1344 ; [#uses=1]
- %1348 = fadd float %1346, %1347 ; [#uses=1]
- %1349 = fmul float %1311, %1343 ; [#uses=1]
- %1350 = fadd float %1348, %1349 ; [#uses=1]
- %1351 = fmul float %1315, %1345 ; [#uses=1]
- %1352 = fmul float %1318, %1344 ; [#uses=1]
- %1353 = fadd float %1351, %1352 ; [#uses=1]
- %1354 = fmul float %1322, %1343 ; [#uses=1]
- %1355 = fadd float %1353, %1354 ; [#uses=1]
- %1356 = fmul float %1326, %1345 ; [#uses=1]
- %1357 = fmul float %1329, %1344 ; [#uses=1]
- %1358 = fadd float %1356, %1357 ; [#uses=1]
- %1359 = fmul float %1333, %1343 ; [#uses=1]
- %1360 = fadd float %1358, %1359 ; [#uses=1]
- %1361 = fadd float %1272, %1350 ; [#uses=1]
- %1362 = fadd float %1270, %1355 ; [#uses=1]
- %1363 = fadd float %1268, %1360 ; [#uses=1]
- %1364 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1363, float* %1364, align 8
- %1365 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1362, float* %1365, align 4
- %1366 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1361, float* %1366, align 8
- %1367 = getelementptr inbounds %struct.btQuadWord* %12, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1367, align 4
- %1368 = bitcast i32 (...)* %1293 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1368(%struct.btActionInterface* %1289, %struct.btQuadWord* %12, %struct.btQuadWord* %13, %struct.btQuadWord* %color)
- %1369 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1370 = getelementptr inbounds i32 (...)** %1369, i32 4 ; [#uses=1]
- %1371 = load i32 (...)** %1370, align 4 ; [#uses=1]
- %1372 = bitcast i32 (...)* %1371 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1373 = call %struct.btActionInterface* %1372(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1374 = getelementptr inbounds %struct.btActionInterface* %1373, i32 0, i32 0 ; [#uses=1]
- %1375 = load i32 (...)*** %1374, align 4 ; [#uses=1]
- %1376 = getelementptr inbounds i32 (...)** %1375, i32 2 ; [#uses=1]
- %1377 = load i32 (...)** %1376, align 4 ; [#uses=1]
- %1378 = fsub float -0.000000e+00, %1294 ; [#uses=1]
- %1379 = fsub float -0.000000e+00, %1295 ; [#uses=1]
- %1380 = fsub float -0.000000e+00, %1296 ; [#uses=1]
- %1381 = fsub float %1378, %1297 ; [#uses=3]
- %1382 = fsub float %1379, %1299 ; [#uses=3]
- %1383 = fsub float %1380, %1301 ; [#uses=3]
- %1384 = load float* %1303, align 4 ; [#uses=2]
- %1385 = fmul float %1384, %1383 ; [#uses=1]
- %1386 = load float* %1306, align 4 ; [#uses=2]
- %1387 = fmul float %1386, %1382 ; [#uses=1]
- %1388 = fadd float %1385, %1387 ; [#uses=1]
- %1389 = load float* %1310, align 4 ; [#uses=2]
- %1390 = fmul float %1389, %1381 ; [#uses=1]
- %1391 = fadd float %1388, %1390 ; [#uses=1]
- %1392 = load float* %1314, align 4 ; [#uses=2]
- %1393 = fmul float %1392, %1383 ; [#uses=1]
- %1394 = load float* %1317, align 4 ; [#uses=2]
- %1395 = fmul float %1394, %1382 ; [#uses=1]
- %1396 = fadd float %1393, %1395 ; [#uses=1]
- %1397 = load float* %1321, align 4 ; [#uses=2]
- %1398 = fmul float %1397, %1381 ; [#uses=1]
- %1399 = fadd float %1396, %1398 ; [#uses=1]
- %1400 = load float* %1325, align 4 ; [#uses=2]
- %1401 = fmul float %1400, %1383 ; [#uses=1]
- %1402 = load float* %1328, align 4 ; [#uses=2]
- %1403 = fmul float %1402, %1382 ; [#uses=1]
- %1404 = fadd float %1401, %1403 ; [#uses=1]
- %1405 = load float* %1332, align 4 ; [#uses=2]
- %1406 = fmul float %1405, %1381 ; [#uses=1]
- %1407 = fadd float %1404, %1406 ; [#uses=1]
- %1408 = fadd float %1272, %1391 ; [#uses=1]
- %1409 = fadd float %1270, %1399 ; [#uses=1]
- %1410 = fadd float %1268, %1407 ; [#uses=1]
- %1411 = getelementptr inbounds %struct.btQuadWord* %11, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1410, float* %1411, align 8
- %1412 = getelementptr inbounds %struct.btQuadWord* %11, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1409, float* %1412, align 4
- %1413 = getelementptr inbounds %struct.btQuadWord* %11, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1408, float* %1413, align 8
- %1414 = getelementptr inbounds %struct.btQuadWord* %11, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1414, align 4
- %1415 = fsub float %1294, %1297 ; [#uses=3]
- %1416 = fsub float %1295, %1299 ; [#uses=3]
- %1417 = fsub float %1296, %1301 ; [#uses=3]
- %1418 = fmul float %1384, %1417 ; [#uses=1]
- %1419 = fmul float %1386, %1416 ; [#uses=1]
- %1420 = fadd float %1418, %1419 ; [#uses=1]
- %1421 = fmul float %1389, %1415 ; [#uses=1]
- %1422 = fadd float %1420, %1421 ; [#uses=1]
- %1423 = fmul float %1392, %1417 ; [#uses=1]
- %1424 = fmul float %1394, %1416 ; [#uses=1]
- %1425 = fadd float %1423, %1424 ; [#uses=1]
- %1426 = fmul float %1397, %1415 ; [#uses=1]
- %1427 = fadd float %1425, %1426 ; [#uses=1]
- %1428 = fmul float %1400, %1417 ; [#uses=1]
- %1429 = fmul float %1402, %1416 ; [#uses=1]
- %1430 = fadd float %1428, %1429 ; [#uses=1]
- %1431 = fmul float %1405, %1415 ; [#uses=1]
- %1432 = fadd float %1430, %1431 ; [#uses=1]
- %1433 = fadd float %1272, %1422 ; [#uses=1]
- %1434 = fadd float %1270, %1427 ; [#uses=1]
- %1435 = fadd float %1268, %1432 ; [#uses=1]
- %1436 = getelementptr inbounds %struct.btQuadWord* %10, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1435, float* %1436, align 8
- %1437 = getelementptr inbounds %struct.btQuadWord* %10, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1434, float* %1437, align 4
- %1438 = getelementptr inbounds %struct.btQuadWord* %10, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1433, float* %1438, align 8
- %1439 = getelementptr inbounds %struct.btQuadWord* %10, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1439, align 4
- %1440 = bitcast i32 (...)* %1377 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1440(%struct.btActionInterface* %1373, %struct.btQuadWord* %10, %struct.btQuadWord* %11, %struct.btQuadWord* %color)
- %1441 = getelementptr inbounds %struct.btQuadWord* %yaxis45, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %1441, align 8
- %1442 = getelementptr inbounds %struct.btQuadWord* %yaxis45, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1442, align 4
- %1443 = getelementptr inbounds %struct.btQuadWord* %yaxis45, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %1443, align 8
- %1444 = getelementptr inbounds %struct.btQuadWord* %yaxis45, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1444, align 4
- %1445 = getelementptr inbounds %struct.btQuadWord* %yaxis45, i32 0, i32 0, i32 %1223 ; [#uses=1]
- store float 1.000000e+00, float* %1445, align 4
- %1446 = getelementptr inbounds %struct.btQuadWord* %xaxis47, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %1446, align 8
- %1447 = getelementptr inbounds %struct.btQuadWord* %xaxis47, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1447, align 4
- %1448 = getelementptr inbounds %struct.btQuadWord* %xaxis47, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %1448, align 8
- %1449 = getelementptr inbounds %struct.btQuadWord* %xaxis47, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1449, align 4
- %1450 = getelementptr inbounds %struct.btQuadWord* %xaxis47, i32 0, i32 0, i32 %1283 ; [#uses=1]
- store float 1.000000e+00, float* %1450, align 4
- %1451 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1452 = getelementptr inbounds i32 (...)** %1451, i32 4 ; [#uses=1]
- %1453 = load i32 (...)** %1452, align 4 ; [#uses=1]
- %1454 = bitcast i32 (...)* %1453 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1455 = call %struct.btActionInterface* %1454(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1456 = getelementptr inbounds %struct.btActionInterface* %1455, i32 0, i32 0 ; [#uses=1]
- %1457 = load i32 (...)*** %1456, align 4 ; [#uses=1]
- %1458 = getelementptr inbounds i32 (...)** %1457, i32 15 ; [#uses=1]
- %1459 = load i32 (...)** %1458, align 4 ; [#uses=1]
- %1460 = load float* %1303, align 4 ; [#uses=3]
- %1461 = load float* %1446, align 8 ; [#uses=6]
- %1462 = fmul float %1460, %1461 ; [#uses=1]
- %1463 = load float* %1306, align 4 ; [#uses=3]
- %1464 = load float* %1447, align 4 ; [#uses=6]
- %1465 = fmul float %1463, %1464 ; [#uses=1]
- %1466 = fadd float %1462, %1465 ; [#uses=1]
- %1467 = load float* %1310, align 4 ; [#uses=3]
- %1468 = load float* %1448, align 8 ; [#uses=6]
- %1469 = fmul float %1467, %1468 ; [#uses=1]
- %1470 = fadd float %1466, %1469 ; [#uses=1]
- %1471 = load float* %1314, align 4 ; [#uses=3]
- %1472 = fmul float %1471, %1461 ; [#uses=1]
- %1473 = load float* %1317, align 4 ; [#uses=3]
- %1474 = fmul float %1473, %1464 ; [#uses=1]
- %1475 = fadd float %1472, %1474 ; [#uses=1]
- %1476 = load float* %1321, align 4 ; [#uses=3]
- %1477 = fmul float %1476, %1468 ; [#uses=1]
- %1478 = fadd float %1475, %1477 ; [#uses=1]
- %1479 = load float* %1325, align 4 ; [#uses=3]
- %1480 = fmul float %1479, %1461 ; [#uses=1]
- %1481 = load float* %1328, align 4 ; [#uses=3]
- %1482 = fmul float %1481, %1464 ; [#uses=1]
- %1483 = fadd float %1480, %1482 ; [#uses=1]
- %1484 = load float* %1332, align 4 ; [#uses=3]
- %1485 = fmul float %1484, %1468 ; [#uses=1]
- %1486 = fadd float %1483, %1485 ; [#uses=1]
- %1487 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1486, float* %1487, align 8
- %1488 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1478, float* %1488, align 4
- %1489 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1470, float* %1489, align 8
- %1490 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1490, align 4
- %1491 = load float* %1441, align 8 ; [#uses=6]
- %1492 = fmul float %1460, %1491 ; [#uses=1]
- %1493 = load float* %1442, align 4 ; [#uses=6]
- %1494 = fmul float %1463, %1493 ; [#uses=1]
- %1495 = fadd float %1492, %1494 ; [#uses=1]
- %1496 = load float* %1443, align 8 ; [#uses=6]
- %1497 = fmul float %1467, %1496 ; [#uses=1]
- %1498 = fadd float %1495, %1497 ; [#uses=1]
- %1499 = fmul float %1471, %1491 ; [#uses=1]
- %1500 = fmul float %1473, %1493 ; [#uses=1]
- %1501 = fadd float %1499, %1500 ; [#uses=1]
- %1502 = fmul float %1476, %1496 ; [#uses=1]
- %1503 = fadd float %1501, %1502 ; [#uses=1]
- %1504 = fmul float %1479, %1491 ; [#uses=1]
- %1505 = fmul float %1481, %1493 ; [#uses=1]
- %1506 = fadd float %1504, %1505 ; [#uses=1]
- %1507 = fmul float %1484, %1496 ; [#uses=1]
- %1508 = fadd float %1506, %1507 ; [#uses=1]
- %1509 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1508, float* %1509, align 8
- %1510 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1503, float* %1510, align 4
- %1511 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1498, float* %1511, align 8
- %1512 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1512, align 4
- %1513 = fmul float %1460, %1296 ; [#uses=1]
- %1514 = fmul float %1463, %1295 ; [#uses=1]
- %1515 = fadd float %1513, %1514 ; [#uses=1]
- %1516 = fmul float %1467, %1294 ; [#uses=1]
- %1517 = fadd float %1515, %1516 ; [#uses=1]
- %1518 = fmul float %1471, %1296 ; [#uses=1]
- %1519 = fmul float %1473, %1295 ; [#uses=1]
- %1520 = fadd float %1518, %1519 ; [#uses=1]
- %1521 = fmul float %1476, %1294 ; [#uses=1]
- %1522 = fadd float %1520, %1521 ; [#uses=1]
- %1523 = fmul float %1479, %1296 ; [#uses=1]
- %1524 = fmul float %1481, %1295 ; [#uses=1]
- %1525 = fadd float %1523, %1524 ; [#uses=1]
- %1526 = fmul float %1484, %1294 ; [#uses=1]
- %1527 = fadd float %1525, %1526 ; [#uses=1]
- %1528 = fsub float %1272, %1517 ; [#uses=1]
- %1529 = fsub float %1270, %1522 ; [#uses=1]
- %1530 = fsub float %1268, %1527 ; [#uses=1]
- %1531 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1530, float* %1531, align 8
- %1532 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1529, float* %1532, align 4
- %1533 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1528, float* %1533, align 8
- %1534 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1534, align 4
- %1535 = bitcast i32 (...)* %1459 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %1535(%struct.btActionInterface* %1455, %struct.btQuadWord* %7, %struct.btQuadWord* %8, %struct.btQuadWord* %9, float %1229, float %1229, float 0.000000e+00, float 0x401921FB60000000, %struct.btQuadWord* %color, i8 zeroext 0, float 1.000000e+01)
- %1536 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1537 = getelementptr inbounds i32 (...)** %1536, i32 4 ; [#uses=1]
- %1538 = load i32 (...)** %1537, align 4 ; [#uses=1]
- %1539 = bitcast i32 (...)* %1538 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1540 = call %struct.btActionInterface* %1539(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1541 = getelementptr inbounds %struct.btActionInterface* %1540, i32 0, i32 0 ; [#uses=1]
- %1542 = load i32 (...)*** %1541, align 4 ; [#uses=1]
- %1543 = getelementptr inbounds i32 (...)** %1542, i32 15 ; [#uses=1]
- %1544 = load i32 (...)** %1543, align 4 ; [#uses=1]
- %1545 = load float* %1303, align 4 ; [#uses=3]
- %1546 = fmul float %1545, %1461 ; [#uses=1]
- %1547 = load float* %1306, align 4 ; [#uses=3]
- %1548 = fmul float %1547, %1464 ; [#uses=1]
- %1549 = fadd float %1546, %1548 ; [#uses=1]
- %1550 = load float* %1310, align 4 ; [#uses=3]
- %1551 = fmul float %1550, %1468 ; [#uses=1]
- %1552 = fadd float %1549, %1551 ; [#uses=1]
- %1553 = load float* %1314, align 4 ; [#uses=3]
- %1554 = fmul float %1553, %1461 ; [#uses=1]
- %1555 = load float* %1317, align 4 ; [#uses=3]
- %1556 = fmul float %1555, %1464 ; [#uses=1]
- %1557 = fadd float %1554, %1556 ; [#uses=1]
- %1558 = load float* %1321, align 4 ; [#uses=3]
- %1559 = fmul float %1558, %1468 ; [#uses=1]
- %1560 = fadd float %1557, %1559 ; [#uses=1]
- %1561 = load float* %1325, align 4 ; [#uses=3]
- %1562 = fmul float %1561, %1461 ; [#uses=1]
- %1563 = load float* %1328, align 4 ; [#uses=3]
- %1564 = fmul float %1563, %1464 ; [#uses=1]
- %1565 = fadd float %1562, %1564 ; [#uses=1]
- %1566 = load float* %1332, align 4 ; [#uses=3]
- %1567 = fmul float %1566, %1468 ; [#uses=1]
- %1568 = fadd float %1565, %1567 ; [#uses=1]
- %1569 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1568, float* %1569, align 8
- %1570 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1560, float* %1570, align 4
- %1571 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1552, float* %1571, align 8
- %1572 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1572, align 4
- %1573 = fmul float %1545, %1491 ; [#uses=1]
- %1574 = fmul float %1547, %1493 ; [#uses=1]
- %1575 = fadd float %1573, %1574 ; [#uses=1]
- %1576 = fmul float %1550, %1496 ; [#uses=1]
- %1577 = fadd float %1575, %1576 ; [#uses=1]
- %1578 = fmul float %1553, %1491 ; [#uses=1]
- %1579 = fmul float %1555, %1493 ; [#uses=1]
- %1580 = fadd float %1578, %1579 ; [#uses=1]
- %1581 = fmul float %1558, %1496 ; [#uses=1]
- %1582 = fadd float %1580, %1581 ; [#uses=1]
- %1583 = fmul float %1561, %1491 ; [#uses=1]
- %1584 = fmul float %1563, %1493 ; [#uses=1]
- %1585 = fadd float %1583, %1584 ; [#uses=1]
- %1586 = fmul float %1566, %1496 ; [#uses=1]
- %1587 = fadd float %1585, %1586 ; [#uses=1]
- %1588 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1587, float* %1588, align 8
- %1589 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1582, float* %1589, align 4
- %1590 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1577, float* %1590, align 8
- %1591 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1591, align 4
- %1592 = fmul float %1545, %1296 ; [#uses=1]
- %1593 = fmul float %1547, %1295 ; [#uses=1]
- %1594 = fadd float %1592, %1593 ; [#uses=1]
- %1595 = fmul float %1550, %1294 ; [#uses=1]
- %1596 = fadd float %1594, %1595 ; [#uses=1]
- %1597 = fmul float %1553, %1296 ; [#uses=1]
- %1598 = fmul float %1555, %1295 ; [#uses=1]
- %1599 = fadd float %1597, %1598 ; [#uses=1]
- %1600 = fmul float %1558, %1294 ; [#uses=1]
- %1601 = fadd float %1599, %1600 ; [#uses=1]
- %1602 = fmul float %1561, %1296 ; [#uses=1]
- %1603 = fmul float %1563, %1295 ; [#uses=1]
- %1604 = fadd float %1602, %1603 ; [#uses=1]
- %1605 = fmul float %1566, %1294 ; [#uses=1]
- %1606 = fadd float %1604, %1605 ; [#uses=1]
- %1607 = fadd float %1272, %1596 ; [#uses=1]
- %1608 = fadd float %1270, %1601 ; [#uses=1]
- %1609 = fadd float %1268, %1606 ; [#uses=1]
- %1610 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1609, float* %1610, align 8
- %1611 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1608, float* %1611, align 4
- %1612 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1607, float* %1612, align 8
- %1613 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1613, align 4
- %1614 = bitcast i32 (...)* %1544 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %1614(%struct.btActionInterface* %1540, %struct.btQuadWord* %4, %struct.btQuadWord* %5, %struct.btQuadWord* %6, float %1229, float %1229, float 0.000000e+00, float 0x401921FB60000000, %struct.btQuadWord* %color, i8 zeroext 0, float 1.000000e+01)
- ret void
-
-bb48: ; preds = %entry
- %1615 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 5, i32 1 ; [#uses=1]
- %1616 = bitcast i32* %1615 to float* ; [#uses=1]
- %1617 = load float* %1616, align 4 ; [#uses=3]
- %1618 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 4 ; [#uses=1]
- %1619 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 4, i32 2 ; [#uses=1]
- %1620 = bitcast i8** %1619 to float* ; [#uses=1]
- %1621 = load float* %1620, align 4 ; [#uses=7]
- %1622 = fmul float %1621, %1617 ; [#uses=4]
- %1623 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 4, i32 1 ; [#uses=1]
- %1624 = bitcast i32* %1623 to float* ; [#uses=1]
- %1625 = load float* %1624, align 4 ; [#uses=7]
- %1626 = fmul float %1625, %1617 ; [#uses=4]
- %1627 = bitcast %struct.btCollisionShape* %1618 to float* ; [#uses=1]
- %1628 = load float* %1627, align 4 ; [#uses=6]
- %1629 = fmul float %1628, %1617 ; [#uses=4]
- %1630 = call float @fabsf(float %1621) nounwind readnone ; [#uses=1]
- %1631 = fcmp ogt float %1630, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %1631, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb48
- %1632 = fmul float %1625, %1625 ; [#uses=1]
- %1633 = fmul float %1621, %1621 ; [#uses=1]
- %1634 = fadd float %1632, %1633 ; [#uses=2]
- %1635 = call float @sqrtf(float %1634) nounwind readonly ; [#uses=1]
- %1636 = fdiv float 1.000000e+00, %1635 ; [#uses=3]
- %1637 = fsub float -0.000000e+00, %1621 ; [#uses=1]
- %1638 = fmul float %1636, %1637 ; [#uses=2]
- %1639 = fmul float %1625, %1636 ; [#uses=2]
- %1640 = fmul float %1634, %1636 ; [#uses=1]
- %1641 = fsub float -0.000000e+00, %1628 ; [#uses=1]
- %1642 = fmul float %1639, %1641 ; [#uses=1]
- %1643 = fmul float %1628, %1638 ; [#uses=1]
- %phitmp = fmul float %1639, 1.000000e+02 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-bb1.i: ; preds = %bb48
- %1644 = fmul float %1628, %1628 ; [#uses=1]
- %1645 = fmul float %1625, %1625 ; [#uses=1]
- %1646 = fadd float %1644, %1645 ; [#uses=2]
- %1647 = call float @sqrtf(float %1646) nounwind readonly ; [#uses=1]
- %1648 = fdiv float 1.000000e+00, %1647 ; [#uses=3]
- %1649 = fsub float -0.000000e+00, %1625 ; [#uses=1]
- %1650 = fmul float %1648, %1649 ; [#uses=2]
- %1651 = fmul float %1628, %1648 ; [#uses=2]
- %1652 = fsub float -0.000000e+00, %1621 ; [#uses=1]
- %1653 = fmul float %1651, %1652 ; [#uses=1]
- %1654 = fmul float %1621, %1650 ; [#uses=1]
- %1655 = fmul float %1646, %1648 ; [#uses=1]
- %phitmp498 = fmul float %1650, 1.000000e+02 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit: ; preds = %bb1.i, %bb.i
- %vec0.0.0.0 = phi float [ 0.000000e+00, %bb.i ], [ %phitmp498, %bb1.i ] ; [#uses=2]
- %vec0.0.1.0 = phi float [ %1638, %bb.i ], [ %1651, %bb1.i ] ; [#uses=1]
- %vec0.0.2.0 = phi float [ %phitmp, %bb.i ], [ 0.000000e+00, %bb1.i ] ; [#uses=2]
- %vec1.0.0.0 = phi float [ %1640, %bb.i ], [ %1653, %bb1.i ] ; [#uses=1]
- %vec1.0.1.0 = phi float [ %1642, %bb.i ], [ %1654, %bb1.i ] ; [#uses=1]
- %vec1.0.2.0 = phi float [ %1643, %bb.i ], [ %1655, %bb1.i ] ; [#uses=1]
- %1656 = fmul float %vec0.0.1.0, 1.000000e+02 ; [#uses=2]
- %1657 = fadd float %1622, %vec0.0.2.0 ; [#uses=3]
- %1658 = fadd float %1626, %1656 ; [#uses=3]
- %1659 = fadd float %1629, %vec0.0.0.0 ; [#uses=3]
- %1660 = fsub float %1622, %vec0.0.2.0 ; [#uses=3]
- %1661 = fsub float %1626, %1656 ; [#uses=3]
- %1662 = fsub float %1629, %vec0.0.0.0 ; [#uses=3]
- %1663 = fmul float %vec1.0.2.0, 1.000000e+02 ; [#uses=2]
- %1664 = fmul float %vec1.0.1.0, 1.000000e+02 ; [#uses=2]
- %1665 = fmul float %vec1.0.0.0, 1.000000e+02 ; [#uses=2]
- %1666 = fadd float %1622, %1663 ; [#uses=3]
- %1667 = fadd float %1626, %1664 ; [#uses=3]
- %1668 = fadd float %1629, %1665 ; [#uses=3]
- %1669 = fsub float %1622, %1663 ; [#uses=3]
- %1670 = fsub float %1626, %1664 ; [#uses=3]
- %1671 = fsub float %1629, %1665 ; [#uses=3]
- %1672 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1673 = getelementptr inbounds i32 (...)** %1672, i32 4 ; [#uses=1]
- %1674 = load i32 (...)** %1673, align 4 ; [#uses=1]
- %1675 = bitcast i32 (...)* %1674 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1676 = call %struct.btActionInterface* %1675(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1677 = getelementptr inbounds %struct.btActionInterface* %1676, i32 0, i32 0 ; [#uses=1]
- %1678 = load i32 (...)*** %1677, align 4 ; [#uses=1]
- %1679 = getelementptr inbounds i32 (...)** %1678, i32 2 ; [#uses=1]
- %1680 = load i32 (...)** %1679, align 4 ; [#uses=1]
- %1681 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %1682 = load float* %1681, align 4 ; [#uses=2]
- %1683 = fmul float %1682, %1662 ; [#uses=1]
- %1684 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %1685 = load float* %1684, align 4 ; [#uses=2]
- %1686 = fmul float %1685, %1661 ; [#uses=1]
- %1687 = fadd float %1683, %1686 ; [#uses=1]
- %1688 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %1689 = load float* %1688, align 4 ; [#uses=2]
- %1690 = fmul float %1689, %1660 ; [#uses=1]
- %1691 = fadd float %1687, %1690 ; [#uses=1]
- %1692 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %1693 = load float* %1692, align 4 ; [#uses=2]
- %1694 = fadd float %1691, %1693 ; [#uses=1]
- %1695 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %1696 = load float* %1695, align 4 ; [#uses=2]
- %1697 = fmul float %1696, %1662 ; [#uses=1]
- %1698 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %1699 = load float* %1698, align 4 ; [#uses=2]
- %1700 = fmul float %1699, %1661 ; [#uses=1]
- %1701 = fadd float %1697, %1700 ; [#uses=1]
- %1702 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %1703 = load float* %1702, align 4 ; [#uses=2]
- %1704 = fmul float %1703, %1660 ; [#uses=1]
- %1705 = fadd float %1701, %1704 ; [#uses=1]
- %1706 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %1707 = load float* %1706, align 4 ; [#uses=2]
- %1708 = fadd float %1705, %1707 ; [#uses=1]
- %1709 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1710 = load float* %1709, align 4 ; [#uses=2]
- %1711 = fmul float %1710, %1662 ; [#uses=1]
- %1712 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %1713 = load float* %1712, align 4 ; [#uses=2]
- %1714 = fmul float %1713, %1661 ; [#uses=1]
- %1715 = fadd float %1711, %1714 ; [#uses=1]
- %1716 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %1717 = load float* %1716, align 4 ; [#uses=2]
- %1718 = fmul float %1717, %1660 ; [#uses=1]
- %1719 = fadd float %1715, %1718 ; [#uses=1]
- %1720 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %1721 = load float* %1720, align 4 ; [#uses=2]
- %1722 = fadd float %1719, %1721 ; [#uses=1]
- %1723 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1722, float* %1723, align 8
- %1724 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1708, float* %1724, align 4
- %1725 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1694, float* %1725, align 8
- %1726 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1726, align 4
- %1727 = fmul float %1682, %1659 ; [#uses=1]
- %1728 = fmul float %1685, %1658 ; [#uses=1]
- %1729 = fadd float %1727, %1728 ; [#uses=1]
- %1730 = fmul float %1689, %1657 ; [#uses=1]
- %1731 = fadd float %1729, %1730 ; [#uses=1]
- %1732 = fadd float %1731, %1693 ; [#uses=1]
- %1733 = fmul float %1696, %1659 ; [#uses=1]
- %1734 = fmul float %1699, %1658 ; [#uses=1]
- %1735 = fadd float %1733, %1734 ; [#uses=1]
- %1736 = fmul float %1703, %1657 ; [#uses=1]
- %1737 = fadd float %1735, %1736 ; [#uses=1]
- %1738 = fadd float %1737, %1707 ; [#uses=1]
- %1739 = fmul float %1710, %1659 ; [#uses=1]
- %1740 = fmul float %1713, %1658 ; [#uses=1]
- %1741 = fadd float %1739, %1740 ; [#uses=1]
- %1742 = fmul float %1717, %1657 ; [#uses=1]
- %1743 = fadd float %1741, %1742 ; [#uses=1]
- %1744 = fadd float %1743, %1721 ; [#uses=1]
- %1745 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1744, float* %1745, align 8
- %1746 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1738, float* %1746, align 4
- %1747 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1732, float* %1747, align 8
- %1748 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1748, align 4
- %1749 = bitcast i32 (...)* %1680 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1749(%struct.btActionInterface* %1676, %struct.btQuadWord* %2, %struct.btQuadWord* %3, %struct.btQuadWord* %color)
- %1750 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1751 = getelementptr inbounds i32 (...)** %1750, i32 4 ; [#uses=1]
- %1752 = load i32 (...)** %1751, align 4 ; [#uses=1]
- %1753 = bitcast i32 (...)* %1752 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1754 = call %struct.btActionInterface* %1753(%struct.btCollisionWorld* %this) ; [#uses=2]
- %1755 = getelementptr inbounds %struct.btActionInterface* %1754, i32 0, i32 0 ; [#uses=1]
- %1756 = load i32 (...)*** %1755, align 4 ; [#uses=1]
- %1757 = getelementptr inbounds i32 (...)** %1756, i32 2 ; [#uses=1]
- %1758 = load i32 (...)** %1757, align 4 ; [#uses=1]
- %1759 = load float* %1681, align 4 ; [#uses=2]
- %1760 = fmul float %1759, %1671 ; [#uses=1]
- %1761 = load float* %1684, align 4 ; [#uses=2]
- %1762 = fmul float %1761, %1670 ; [#uses=1]
- %1763 = fadd float %1760, %1762 ; [#uses=1]
- %1764 = load float* %1688, align 4 ; [#uses=2]
- %1765 = fmul float %1764, %1669 ; [#uses=1]
- %1766 = fadd float %1763, %1765 ; [#uses=1]
- %1767 = load float* %1692, align 4 ; [#uses=2]
- %1768 = fadd float %1766, %1767 ; [#uses=1]
- %1769 = load float* %1695, align 4 ; [#uses=2]
- %1770 = fmul float %1769, %1671 ; [#uses=1]
- %1771 = load float* %1698, align 4 ; [#uses=2]
- %1772 = fmul float %1771, %1670 ; [#uses=1]
- %1773 = fadd float %1770, %1772 ; [#uses=1]
- %1774 = load float* %1702, align 4 ; [#uses=2]
- %1775 = fmul float %1774, %1669 ; [#uses=1]
- %1776 = fadd float %1773, %1775 ; [#uses=1]
- %1777 = load float* %1706, align 4 ; [#uses=2]
- %1778 = fadd float %1776, %1777 ; [#uses=1]
- %1779 = load float* %1709, align 4 ; [#uses=2]
- %1780 = fmul float %1779, %1671 ; [#uses=1]
- %1781 = load float* %1712, align 4 ; [#uses=2]
- %1782 = fmul float %1781, %1670 ; [#uses=1]
- %1783 = fadd float %1780, %1782 ; [#uses=1]
- %1784 = load float* %1716, align 4 ; [#uses=2]
- %1785 = fmul float %1784, %1669 ; [#uses=1]
- %1786 = fadd float %1783, %1785 ; [#uses=1]
- %1787 = load float* %1720, align 4 ; [#uses=2]
- %1788 = fadd float %1786, %1787 ; [#uses=1]
- %1789 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1788, float* %1789, align 8
- %1790 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1778, float* %1790, align 4
- %1791 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1768, float* %1791, align 8
- %1792 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1792, align 4
- %1793 = fmul float %1759, %1668 ; [#uses=1]
- %1794 = fmul float %1761, %1667 ; [#uses=1]
- %1795 = fadd float %1793, %1794 ; [#uses=1]
- %1796 = fmul float %1764, %1666 ; [#uses=1]
- %1797 = fadd float %1795, %1796 ; [#uses=1]
- %1798 = fadd float %1797, %1767 ; [#uses=1]
- %1799 = fmul float %1769, %1668 ; [#uses=1]
- %1800 = fmul float %1771, %1667 ; [#uses=1]
- %1801 = fadd float %1799, %1800 ; [#uses=1]
- %1802 = fmul float %1774, %1666 ; [#uses=1]
- %1803 = fadd float %1801, %1802 ; [#uses=1]
- %1804 = fadd float %1803, %1777 ; [#uses=1]
- %1805 = fmul float %1779, %1668 ; [#uses=1]
- %1806 = fmul float %1781, %1667 ; [#uses=1]
- %1807 = fadd float %1805, %1806 ; [#uses=1]
- %1808 = fmul float %1784, %1666 ; [#uses=1]
- %1809 = fadd float %1807, %1808 ; [#uses=1]
- %1810 = fadd float %1809, %1787 ; [#uses=1]
- %1811 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1810, float* %1811, align 8
- %1812 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1804, float* %1812, align 4
- %1813 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1798, float* %1813, align 8
- %1814 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1814, align 4
- %1815 = bitcast i32 (...)* %1758 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1815(%struct.btActionInterface* %1754, %struct.btQuadWord* %0, %struct.btQuadWord* %1, %struct.btQuadWord* %color)
- ret void
-
-bb60: ; preds = %entry
- %1816 = add i32 %49, -21 ; [#uses=1]
- %1817 = icmp ult i32 %1816, 9 ; [#uses=1]
- br i1 %1817, label %bb62, label %bb73
-
-bb62: ; preds = %bb60
- %1818 = bitcast %struct.btCollisionShape* %shape to %struct.btConcaveShape* ; [#uses=1]
- %1819 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %1819, align 8
- %1820 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %1820, align 4
- %1821 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %1821, align 8
- %1822 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1822, align 4
- %1823 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1823, align 8
- %1824 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1824, align 4
- %1825 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1825, align 8
- %1826 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1826, align 4
- %1827 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1828 = getelementptr inbounds i32 (...)** %1827, i32 4 ; [#uses=1]
- %1829 = load i32 (...)** %1828, align 4 ; [#uses=1]
- %1830 = bitcast i32 (...)* %1829 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1831 = call %struct.btActionInterface* %1830(%struct.btCollisionWorld* %this) ; [#uses=1]
- %1832 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- %1833 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 1, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %1832, align 8
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1833, align 4
- %1834 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %1831, %struct.btActionInterface** %1834, align 8
- %1835 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1836 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 0 ; [#uses=1]
- %1837 = load float* %1836, align 4 ; [#uses=1]
- store float %1837, float* %1835, align 4
- %1838 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %1839 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 1 ; [#uses=1]
- %1840 = load float* %1839, align 4 ; [#uses=1]
- store float %1840, float* %1838, align 4
- %1841 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1842 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 2 ; [#uses=1]
- %1843 = load float* %1842, align 4 ; [#uses=1]
- store float %1843, float* %1841, align 4
- %1844 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %1845 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 3 ; [#uses=1]
- %1846 = load float* %1845, align 4 ; [#uses=1]
- store float %1846, float* %1844, align 4
- %1847 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1848 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1849 = load float* %1848, align 4 ; [#uses=1]
- store float %1849, float* %1847, align 4
- %1850 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1851 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1852 = load float* %1851, align 4 ; [#uses=1]
- store float %1852, float* %1850, align 4
- %1853 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1854 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1855 = load float* %1854, align 4 ; [#uses=1]
- store float %1855, float* %1853, align 4
- %1856 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %1857 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %1858 = load float* %1857, align 4 ; [#uses=1]
- store float %1858, float* %1856, align 4
- %1859 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1860 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1861 = load float* %1860, align 4 ; [#uses=1]
- store float %1861, float* %1859, align 4
- %1862 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1863 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1864 = load float* %1863, align 4 ; [#uses=1]
- store float %1864, float* %1862, align 4
- %1865 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1866 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1867 = load float* %1866, align 4 ; [#uses=1]
- store float %1867, float* %1865, align 4
- %1868 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1869 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1870 = load float* %1869, align 4 ; [#uses=1]
- store float %1870, float* %1868, align 4
- %1871 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1872 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1873 = load float* %1872, align 4 ; [#uses=1]
- store float %1873, float* %1871, align 4
- %1874 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1875 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1876 = load float* %1875, align 4 ; [#uses=1]
- store float %1876, float* %1874, align 4
- %1877 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1878 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1879 = load float* %1878, align 4 ; [#uses=1]
- store float %1879, float* %1877, align 4
- %1880 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %1881 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %1882 = load float* %1881, align 4 ; [#uses=1]
- store float %1882, float* %1880, align 4
- %1883 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %1884 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1885 = load float* %1884, align 4 ; [#uses=1]
- store float %1885, float* %1883, align 4
- %1886 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %1887 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1888 = load float* %1887, align 4 ; [#uses=1]
- store float %1888, float* %1886, align 4
- %1889 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %1890 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1891 = load float* %1890, align 4 ; [#uses=1]
- store float %1891, float* %1889, align 4
- %1892 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %1893 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1894 = load float* %1893, align 4 ; [#uses=1]
- store float %1894, float* %1892, align 4
- %1895 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 0 ; [#uses=1]
- %1896 = load i32 (...)*** %1895, align 4 ; [#uses=1]
- %1897 = getelementptr inbounds i32 (...)** %1896, i32 15 ; [#uses=1]
- %1898 = load i32 (...)** %1897, align 4 ; [#uses=1]
- %1899 = bitcast i32 (...)* %1898 to void (%struct.btConcaveShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %1900 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback, i32 0, i32 0 ; [#uses=5]
- invoke void %1899(%struct.btConcaveShape* %1818, %struct.btActionInterface* %1900, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %bb72 unwind label %lpad
-
-bb72: ; preds = %bb62
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %1832, align 8
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1833, align 4
- %1901 = ptrtoint %struct.DebugDrawcallback* %drawCallback to i32 ; [#uses=1]
- %1902 = or i32 %1901, 4 ; [#uses=1]
- %1903 = inttoptr i32 %1902 to %struct.DebugDrawcallback* ; [#uses=1]
- %1904 = getelementptr inbounds %struct.DebugDrawcallback* %1903, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1904)
- to label %_ZN17DebugDrawcallbackD1Ev.exit151 unwind label %lpad.i147
-
-invcont1.i143: ; preds = %lpad.i147
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i145)
- unreachable
-
-lpad.i147: ; preds = %bb72
- %eh_ptr.i145 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i146 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i145, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1900)
- to label %invcont1.i143 unwind label %lpad9.i150
-
-lpad9.i150: ; preds = %lpad.i147
- %eh_ptr10.i148 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i149 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i148, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN17DebugDrawcallbackD1Ev.exit151: ; preds = %bb72
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1900)
- %.pre = load i32* %48, align 4 ; [#uses=1]
- br label %bb73
-
-bb73: ; preds = %_ZN17DebugDrawcallbackD1Ev.exit151, %bb60
- %1905 = phi i32 [ %49, %bb60 ], [ %.pre, %_ZN17DebugDrawcallbackD1Ev.exit151 ] ; [#uses=2]
- %1906 = icmp eq i32 %1905, 3 ; [#uses=1]
- br i1 %1906, label %bb75, label %bb90
-
-bb75: ; preds = %bb73
- %1907 = getelementptr inbounds %struct.btQuadWord* %aabbMax78, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %1907, align 8
- %1908 = getelementptr inbounds %struct.btQuadWord* %aabbMax78, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %1908, align 4
- %1909 = getelementptr inbounds %struct.btQuadWord* %aabbMax78, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %1909, align 8
- %1910 = getelementptr inbounds %struct.btQuadWord* %aabbMax78, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1910, align 4
- %1911 = getelementptr inbounds %struct.btQuadWord* %aabbMin80, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1911, align 8
- %1912 = getelementptr inbounds %struct.btQuadWord* %aabbMin80, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1912, align 4
- %1913 = getelementptr inbounds %struct.btQuadWord* %aabbMin80, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1913, align 8
- %1914 = getelementptr inbounds %struct.btQuadWord* %aabbMin80, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1914, align 4
- %1915 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %1916 = getelementptr inbounds i32 (...)** %1915, i32 4 ; [#uses=1]
- %1917 = load i32 (...)** %1916, align 4 ; [#uses=1]
- %1918 = bitcast i32 (...)* %1917 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1919 = call %struct.btActionInterface* %1918(%struct.btCollisionWorld* %this) ; [#uses=1]
- %1920 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 0, i32 0 ; [#uses=3]
- %1921 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 1, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %1920, align 8
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1921, align 4
- %1922 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %1919, %struct.btActionInterface** %1922, align 8
- %1923 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1924 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 0 ; [#uses=1]
- %1925 = load float* %1924, align 4 ; [#uses=1]
- store float %1925, float* %1923, align 4
- %1926 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %1927 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 1 ; [#uses=1]
- %1928 = load float* %1927, align 4 ; [#uses=1]
- store float %1928, float* %1926, align 4
- %1929 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1930 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 2 ; [#uses=1]
- %1931 = load float* %1930, align 4 ; [#uses=1]
- store float %1931, float* %1929, align 4
- %1932 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %1933 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 3 ; [#uses=1]
- %1934 = load float* %1933, align 4 ; [#uses=1]
- store float %1934, float* %1932, align 4
- %1935 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1936 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1937 = load float* %1936, align 4 ; [#uses=1]
- store float %1937, float* %1935, align 4
- %1938 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1939 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1940 = load float* %1939, align 4 ; [#uses=1]
- store float %1940, float* %1938, align 4
- %1941 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1942 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1943 = load float* %1942, align 4 ; [#uses=1]
- store float %1943, float* %1941, align 4
- %1944 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %1945 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %1946 = load float* %1945, align 4 ; [#uses=1]
- store float %1946, float* %1944, align 4
- %1947 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1948 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1949 = load float* %1948, align 4 ; [#uses=1]
- store float %1949, float* %1947, align 4
- %1950 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1951 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1952 = load float* %1951, align 4 ; [#uses=1]
- store float %1952, float* %1950, align 4
- %1953 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1954 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1955 = load float* %1954, align 4 ; [#uses=1]
- store float %1955, float* %1953, align 4
- %1956 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1957 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1958 = load float* %1957, align 4 ; [#uses=1]
- store float %1958, float* %1956, align 4
- %1959 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1960 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1961 = load float* %1960, align 4 ; [#uses=1]
- store float %1961, float* %1959, align 4
- %1962 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1963 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1964 = load float* %1963, align 4 ; [#uses=1]
- store float %1964, float* %1962, align 4
- %1965 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1966 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1967 = load float* %1966, align 4 ; [#uses=1]
- store float %1967, float* %1965, align 4
- %1968 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %1969 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %1970 = load float* %1969, align 4 ; [#uses=1]
- store float %1970, float* %1968, align 4
- %1971 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %1972 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1973 = load float* %1972, align 4 ; [#uses=1]
- store float %1973, float* %1971, align 4
- %1974 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %1975 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1976 = load float* %1975, align 4 ; [#uses=1]
- store float %1976, float* %1974, align 4
- %1977 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %1978 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1979 = load float* %1978, align 4 ; [#uses=1]
- store float %1979, float* %1977, align 4
- %1980 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %1981 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %1982 = load float* %1981, align 4 ; [#uses=1]
- store float %1982, float* %1980, align 4
- %1983 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 7, i32 1 ; [#uses=1]
- %1984 = bitcast i32* %1983 to %struct.btStridingMeshInterface** ; [#uses=1]
- %1985 = load %struct.btStridingMeshInterface** %1984, align 4 ; [#uses=2]
- %1986 = getelementptr inbounds %struct.btStridingMeshInterface* %1985, i32 0, i32 0 ; [#uses=1]
- %1987 = load i32 (...)*** %1986, align 4 ; [#uses=1]
- %1988 = getelementptr inbounds i32 (...)** %1987, i32 2 ; [#uses=1]
- %1989 = load i32 (...)** %1988, align 4 ; [#uses=1]
- %1990 = bitcast i32 (...)* %1989 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %1991 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 1 ; [#uses=1]
- invoke void %1990(%struct.btStridingMeshInterface* %1985, %struct.btActionInterface* %1991, %struct.btQuadWord* %aabbMin80, %struct.btQuadWord* %aabbMax78)
- to label %bb89 unwind label %lpad110
-
-bb89: ; preds = %bb75
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %1920, align 8
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1921, align 4
- %1992 = ptrtoint %struct.DebugDrawcallback* %drawCallback82 to i32 ; [#uses=1]
- %1993 = or i32 %1992, 4 ; [#uses=1]
- %1994 = inttoptr i32 %1993 to %struct.DebugDrawcallback* ; [#uses=1]
- %1995 = getelementptr inbounds %struct.DebugDrawcallback* %1994, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1995)
- to label %_ZN17DebugDrawcallbackD1Ev.exit142 unwind label %lpad.i138
-
-invcont1.i134: ; preds = %lpad.i138
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i136)
- unreachable
-
-lpad.i138: ; preds = %bb89
- %eh_ptr.i136 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i137 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i136, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %1996 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1996)
- to label %invcont1.i134 unwind label %lpad9.i141
-
-lpad9.i141: ; preds = %lpad.i138
- %eh_ptr10.i139 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i140 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i139, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN17DebugDrawcallbackD1Ev.exit142: ; preds = %bb89
- %1997 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 0 ; [#uses=1]
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1997)
- %.pre497 = load i32* %48, align 4 ; [#uses=1]
- br label %bb90
-
-bb90: ; preds = %_ZN17DebugDrawcallbackD1Ev.exit142, %bb73
- %1998 = phi i32 [ %.pre497, %_ZN17DebugDrawcallbackD1Ev.exit142 ], [ %1905, %bb73 ] ; [#uses=1]
- %1999 = icmp slt i32 %1998, 7 ; [#uses=1]
- br i1 %1999, label %bb92, label %return
-
-bb92: ; preds = %bb90
- %2000 = bitcast %struct.btCollisionShape* %shape to %struct.btPolyhedralConvexShape* ; [#uses=3]
- %2001 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 0 ; [#uses=3]
- %2002 = load i32 (...)*** %2001, align 4 ; [#uses=1]
- %2003 = getelementptr inbounds i32 (...)** %2002, i32 22 ; [#uses=1]
- %2004 = load i32 (...)** %2003, align 4 ; [#uses=1]
- %2005 = bitcast i32 (...)* %2004 to i32 (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %2006 = call i32 %2005(%struct.btPolyhedralConvexShape* %2000) ; [#uses=1]
- %2007 = icmp sgt i32 %2006, 0 ; [#uses=1]
- br i1 %2007, label %bb.nph459, label %return
-
-bb.nph459: ; preds = %bb92
- %2008 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %2009 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=1]
- %2010 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %2011 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=1]
- %2012 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %2013 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=1]
- %2014 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %2015 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2016 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %2017 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %2018 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %2019 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2020 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %2021 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %2022 = getelementptr inbounds %struct.btTransform* %worldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2023 = getelementptr inbounds %struct.btQuadWord* %wa, i32 0, i32 0, i32 0 ; [#uses=1]
- %2024 = getelementptr inbounds %struct.btQuadWord* %wa, i32 0, i32 0, i32 1 ; [#uses=1]
- %2025 = getelementptr inbounds %struct.btQuadWord* %wa, i32 0, i32 0, i32 2 ; [#uses=1]
- %2026 = getelementptr inbounds %struct.btQuadWord* %wa, i32 0, i32 0, i32 3 ; [#uses=1]
- %2027 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=1]
- %2028 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=1]
- %2029 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=1]
- %2030 = getelementptr inbounds %struct.btQuadWord* %wb, i32 0, i32 0, i32 0 ; [#uses=1]
- %2031 = getelementptr inbounds %struct.btQuadWord* %wb, i32 0, i32 0, i32 1 ; [#uses=1]
- %2032 = getelementptr inbounds %struct.btQuadWord* %wb, i32 0, i32 0, i32 2 ; [#uses=1]
- %2033 = getelementptr inbounds %struct.btQuadWord* %wb, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb96
-
-bb96: ; preds = %bb96, %bb.nph459
- %2034 = phi i32 [ 0, %bb.nph459 ], [ %2103, %bb96 ] ; [#uses=2]
- %2035 = load i32 (...)*** %2001, align 4 ; [#uses=1]
- %2036 = getelementptr inbounds i32 (...)** %2035, i32 23 ; [#uses=1]
- %2037 = load i32 (...)** %2036, align 4 ; [#uses=1]
- %2038 = bitcast i32 (...)* %2037 to void (%struct.btPolyhedralConvexShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %2038(%struct.btPolyhedralConvexShape* %2000, i32 %2034, %struct.btQuadWord* %a, %struct.btQuadWord* %b)
- %2039 = load float* %2008, align 4 ; [#uses=2]
- %2040 = load float* %2009, align 8 ; [#uses=3]
- %2041 = fmul float %2039, %2040 ; [#uses=1]
- %2042 = load float* %2010, align 4 ; [#uses=2]
- %2043 = load float* %2011, align 4 ; [#uses=3]
- %2044 = fmul float %2042, %2043 ; [#uses=1]
- %2045 = fadd float %2041, %2044 ; [#uses=1]
- %2046 = load float* %2012, align 4 ; [#uses=2]
- %2047 = load float* %2013, align 8 ; [#uses=3]
- %2048 = fmul float %2046, %2047 ; [#uses=1]
- %2049 = fadd float %2045, %2048 ; [#uses=1]
- %2050 = load float* %2014, align 4 ; [#uses=2]
- %2051 = fadd float %2049, %2050 ; [#uses=1]
- %2052 = load float* %2015, align 4 ; [#uses=2]
- %2053 = fmul float %2052, %2040 ; [#uses=1]
- %2054 = load float* %2016, align 4 ; [#uses=2]
- %2055 = fmul float %2054, %2043 ; [#uses=1]
- %2056 = fadd float %2053, %2055 ; [#uses=1]
- %2057 = load float* %2017, align 4 ; [#uses=2]
- %2058 = fmul float %2057, %2047 ; [#uses=1]
- %2059 = fadd float %2056, %2058 ; [#uses=1]
- %2060 = load float* %2018, align 4 ; [#uses=2]
- %2061 = fadd float %2059, %2060 ; [#uses=1]
- %2062 = load float* %2019, align 4 ; [#uses=2]
- %2063 = fmul float %2062, %2040 ; [#uses=1]
- %2064 = load float* %2020, align 4 ; [#uses=2]
- %2065 = fmul float %2064, %2043 ; [#uses=1]
- %2066 = fadd float %2063, %2065 ; [#uses=1]
- %2067 = load float* %2021, align 4 ; [#uses=2]
- %2068 = fmul float %2067, %2047 ; [#uses=1]
- %2069 = fadd float %2066, %2068 ; [#uses=1]
- %2070 = load float* %2022, align 4 ; [#uses=2]
- %2071 = fadd float %2069, %2070 ; [#uses=1]
- store float %2071, float* %2023, align 8
- store float %2061, float* %2024, align 4
- store float %2051, float* %2025, align 8
- store float 0.000000e+00, float* %2026, align 4
- %2072 = load float* %2027, align 8 ; [#uses=3]
- %2073 = fmul float %2039, %2072 ; [#uses=1]
- %2074 = load float* %2028, align 4 ; [#uses=3]
- %2075 = fmul float %2042, %2074 ; [#uses=1]
- %2076 = fadd float %2073, %2075 ; [#uses=1]
- %2077 = load float* %2029, align 8 ; [#uses=3]
- %2078 = fmul float %2046, %2077 ; [#uses=1]
- %2079 = fadd float %2076, %2078 ; [#uses=1]
- %2080 = fadd float %2079, %2050 ; [#uses=1]
- %2081 = fmul float %2052, %2072 ; [#uses=1]
- %2082 = fmul float %2054, %2074 ; [#uses=1]
- %2083 = fadd float %2081, %2082 ; [#uses=1]
- %2084 = fmul float %2057, %2077 ; [#uses=1]
- %2085 = fadd float %2083, %2084 ; [#uses=1]
- %2086 = fadd float %2085, %2060 ; [#uses=1]
- %2087 = fmul float %2062, %2072 ; [#uses=1]
- %2088 = fmul float %2064, %2074 ; [#uses=1]
- %2089 = fadd float %2087, %2088 ; [#uses=1]
- %2090 = fmul float %2067, %2077 ; [#uses=1]
- %2091 = fadd float %2089, %2090 ; [#uses=1]
- %2092 = fadd float %2091, %2070 ; [#uses=1]
- store float %2092, float* %2030, align 8
- store float %2086, float* %2031, align 4
- store float %2080, float* %2032, align 8
- store float 0.000000e+00, float* %2033, align 4
- %2093 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %2094 = getelementptr inbounds i32 (...)** %2093, i32 4 ; [#uses=1]
- %2095 = load i32 (...)** %2094, align 4 ; [#uses=1]
- %2096 = bitcast i32 (...)* %2095 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %2097 = call %struct.btActionInterface* %2096(%struct.btCollisionWorld* %this) ; [#uses=2]
- %2098 = getelementptr inbounds %struct.btActionInterface* %2097, i32 0, i32 0 ; [#uses=1]
- %2099 = load i32 (...)*** %2098, align 4 ; [#uses=1]
- %2100 = getelementptr inbounds i32 (...)** %2099, i32 2 ; [#uses=1]
- %2101 = load i32 (...)** %2100, align 4 ; [#uses=1]
- %2102 = bitcast i32 (...)* %2101 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %2102(%struct.btActionInterface* %2097, %struct.btQuadWord* %wa, %struct.btQuadWord* %wb, %struct.btQuadWord* %color)
- %2103 = add nsw i32 %2034, 1 ; [#uses=2]
- %2104 = load i32 (...)*** %2001, align 4 ; [#uses=1]
- %2105 = getelementptr inbounds i32 (...)** %2104, i32 22 ; [#uses=1]
- %2106 = load i32 (...)** %2105, align 4 ; [#uses=1]
- %2107 = bitcast i32 (...)* %2106 to i32 (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %2108 = call i32 %2107(%struct.btPolyhedralConvexShape* %2000) ; [#uses=1]
- %2109 = icmp sgt i32 %2108, %2103 ; [#uses=1]
- br i1 %2109, label %bb96, label %return
-
-return: ; preds = %bb96, %bb92, %bb90, %bb8, %bb6, %bb1, %bb
- ret void
-
-lpad: ; preds = %bb62
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select105 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %1832, align 8
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1833, align 4
- %2110 = ptrtoint %struct.DebugDrawcallback* %drawCallback to i32 ; [#uses=1]
- %2111 = or i32 %2110, 4 ; [#uses=1]
- %2112 = inttoptr i32 %2111 to %struct.DebugDrawcallback* ; [#uses=1]
- %2113 = getelementptr inbounds %struct.DebugDrawcallback* %2112, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %2113)
- to label %bb3.i124 unwind label %lpad.i127
-
-invcont1.i123: ; preds = %lpad.i127
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i125)
- to label %.noexc131 unwind label %lpad106
-
-.noexc131: ; preds = %invcont1.i123
- unreachable
-
-bb3.i124: ; preds = %lpad
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1900)
- to label %Unwind unwind label %lpad106
-
-lpad.i127: ; preds = %lpad
- %eh_ptr.i125 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i126 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i125, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1900)
- to label %invcont1.i123 unwind label %lpad9.i130
-
-lpad9.i130: ; preds = %lpad.i127
- %eh_ptr10.i128 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i129 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i128, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad106: ; preds = %bb3.i124, %invcont1.i123
- %eh_ptr107 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select109 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr107, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad110: ; preds = %bb75
- %eh_ptr111 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select113 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr111, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 2), i32 (...)*** %1920, align 8
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV17DebugDrawcallback, i32 0, i32 8), i32 (...)*** %1921, align 4
- %2114 = ptrtoint %struct.DebugDrawcallback* %drawCallback82 to i32 ; [#uses=1]
- %2115 = or i32 %2114, 4 ; [#uses=1]
- %2116 = inttoptr i32 %2115 to %struct.DebugDrawcallback* ; [#uses=1]
- %2117 = getelementptr inbounds %struct.DebugDrawcallback* %2116, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %2117)
- to label %bb3.i unwind label %lpad.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc unwind label %lpad114
-
-.noexc: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %lpad110
- %2118 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %2118)
- to label %Unwind unwind label %lpad114
-
-lpad.i: ; preds = %lpad110
- %eh_ptr.i = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %2119 = getelementptr inbounds %struct.DebugDrawcallback* %drawCallback82, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %2119)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad114: ; preds = %bb3.i, %invcont1.i
- %eh_ptr115 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select117 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr115, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-Unwind: ; preds = %bb3.i, %bb3.i124
- %eh_exception.0 = phi i8* [ %eh_ptr, %bb3.i124 ], [ %eh_ptr111, %bb3.i ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZNK16btCollisionWorld7rayTestERK9btVector3S2_RNS_17RayResultCallbackE(%struct.btCollisionWorld* %this, %struct.btQuadWord* %rayFromWorld, %struct.btQuadWord* %rayToWorld, %"struct.btCollisionWorld::RayResultCallback"* %resultCallback) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rayCB = alloca %struct.btSingleRayCallback, align 8 ; [#uses=51]
- %2 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV19btSingleRayCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- %3 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=3]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=3]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=2]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 6 ; [#uses=1]
- store %struct.btCollisionWorld* %this, %struct.btCollisionWorld** %27, align 4
- %28 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 7 ; [#uses=1]
- store %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, %"struct.btCollisionWorld::RayResultCallback"** %28, align 8
- %29 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- %39 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %39, align 4
- %40 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 4
- %41 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %5, float* %41, align 4
- store float %8, float* %42, align 4
- store float %11, float* %43, align 4
- store float %14, float* %44, align 4
- %45 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %45, align 4
- %46 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %46, align 4
- %47 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 4
- %48 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %48, align 4
- %49 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %49, align 4
- %50 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %50, align 4
- %51 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 4
- %52 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 4
- %54 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %55, align 4
- %56 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %56, align 4
- %57 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %17, float* %57, align 4
- store float %20, float* %58, align 4
- store float %23, float* %59, align 4
- store float %26, float* %60, align 4
- %61 = fsub float %23, %11 ; [#uses=4]
- %62 = fsub float %20, %8 ; [#uses=4]
- %63 = fsub float %17, %5 ; [#uses=4]
- %64 = fmul float %63, %63 ; [#uses=1]
- %65 = fmul float %62, %62 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %61, %61 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = call float @sqrtf(float %68) nounwind readonly ; [#uses=1]
- %70 = fdiv float 1.000000e+00, %69 ; [#uses=3]
- %71 = fmul float %63, %70 ; [#uses=3]
- %72 = fmul float %62, %70 ; [#uses=3]
- %73 = fmul float %61, %70 ; [#uses=3]
- %74 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %75 = fcmp une float %71, 0.000000e+00 ; [#uses=1]
- br i1 %75, label %bb.i, label %bb2.i
-
-bb.i: ; preds = %entry
- %76 = fdiv float 1.000000e+00, %71 ; [#uses=1]
- br label %bb2.i
-
-bb2.i: ; preds = %bb.i, %entry
- %77 = phi float [ %76, %bb.i ], [ 0x43ABC16D60000000, %entry ] ; [#uses=2]
- store float %77, float* %74, align 4
- %78 = fcmp une float %72, 0.000000e+00 ; [#uses=1]
- br i1 %78, label %bb3.i, label %bb5.i
-
-bb3.i: ; preds = %bb2.i
- %79 = fdiv float 1.000000e+00, %72 ; [#uses=1]
- br label %bb5.i
-
-bb5.i: ; preds = %bb3.i, %bb2.i
- %80 = phi float [ %79, %bb3.i ], [ 0x43ABC16D60000000, %bb2.i ] ; [#uses=2]
- %81 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %80, float* %81, align 4
- %82 = fcmp une float %73, 0.000000e+00 ; [#uses=1]
- br i1 %82, label %bb6.i, label %_ZN19btSingleRayCallbackC2ERK9btVector3S2_PK16btCollisionWorldRNS3_17RayResultCallbackE.exit
-
-bb6.i: ; preds = %bb5.i
- %83 = fdiv float 1.000000e+00, %73 ; [#uses=1]
- br label %_ZN19btSingleRayCallbackC2ERK9btVector3S2_PK16btCollisionWorldRNS3_17RayResultCallbackE.exit
-
-_ZN19btSingleRayCallbackC2ERK9btVector3S2_PK16btCollisionWorldRNS3_17RayResultCallbackE.exit: ; preds = %bb6.i, %bb5.i
- %iftmp.363.0.i = phi float [ %83, %bb6.i ], [ 0x43ABC16D60000000, %bb5.i ] ; [#uses=2]
- %84 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.363.0.i, float* %84, align 4
- %85 = fcmp olt float %77, 0.000000e+00 ; [#uses=1]
- %86 = zext i1 %85 to i32 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 2, i32 0 ; [#uses=1]
- store i32 %86, i32* %87, align 4
- %88 = fcmp olt float %80, 0.000000e+00 ; [#uses=1]
- %89 = zext i1 %88 to i32 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 %89, i32* %90, align 4
- %91 = fcmp olt float %iftmp.363.0.i, 0.000000e+00 ; [#uses=1]
- %92 = zext i1 %91 to i32 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 %92, i32* %93, align 4
- %94 = fmul float %71, %63 ; [#uses=1]
- %95 = fmul float %72, %62 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = fmul float %73, %61 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %98, float* %99, align 8
- %100 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=1]
- %101 = load %struct.btActionInterface** %100, align 4 ; [#uses=2]
- %102 = getelementptr inbounds %struct.btActionInterface* %101, i32 0, i32 0 ; [#uses=1]
- %103 = load i32 (...)*** %102, align 4 ; [#uses=1]
- %104 = getelementptr inbounds i32 (...)** %103, i32 6 ; [#uses=1]
- %105 = load i32 (...)** %104, align 4 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %106, align 8
- %107 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %108, align 8
- %109 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %109, align 4
- %110 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %110, align 8
- %111 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- %112 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %112, align 8
- %113 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 4
- %114 = bitcast i32 (...)* %105 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %115 = getelementptr inbounds %struct.btSingleRayCallback* %rayCB, i32 0, i32 0 ; [#uses=1]
- invoke void %114(%struct.btActionInterface* %101, %struct.btQuadWord* %rayFromWorld, %struct.btQuadWord* %rayToWorld, %struct.btBroadphaseRayCallback* %115, %struct.btQuadWord* %0, %struct.btQuadWord* %1)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %_ZN19btSingleRayCallbackC2ERK9btVector3S2_PK16btCollisionWorldRNS3_17RayResultCallbackE.exit
- ret void
-
-lpad: ; preds = %_ZN19btSingleRayCallbackC2ERK9btVector3S2_PK16btCollisionWorldRNS3_17RayResultCallbackE.exit
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV19btSingleRayCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=2]
-define void @_ZN16btCollisionWorld18addCollisionObjectEP17btCollisionObjectss(%struct.btCollisionWorld* nocapture %this, %struct.btCollisionObject* %collisionObject, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask) align 2 {
-entry:
- %trans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %minAabb = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %maxAabb = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.430.0.i.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.430.0.i.i ; [#uses=1]
- br i1 %7, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %8 = icmp eq i32 %iftmp.430.0.i.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %9 = shl i32 %iftmp.430.0.i.i, 2 ; [#uses=1]
- %10 = call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %10 to %struct.btCollisionObject** ; [#uses=1]
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %11 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %1, %bb.i.i ] ; [#uses=2]
- %12 = phi %struct.btCollisionObject** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %14 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btCollisionObject** %12, i32 %indvar.i.i.i ; [#uses=2]
- %15 = icmp eq %struct.btCollisionObject** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %16 = load %struct.btCollisionObject*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btCollisionObject** %16, i32 %indvar.i.i.i ; [#uses=1]
- %17 = load %struct.btCollisionObject** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %17, %struct.btCollisionObject** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %18 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %19 = load %struct.btCollisionObject*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btCollisionObject** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
- %21 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %23 = bitcast %struct.btCollisionObject** %19 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
- %24 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btCollisionObject** %12, %struct.btCollisionObject*** %18, align 4
- store i32 %iftmp.430.0.i.i, i32* %2, align 4
- %.pre5.i = load i32* %0, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, %bb.i, %entry
- %25 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i ], [ %1, %entry ], [ %1, %bb.i ] ; [#uses=2]
- %26 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %27 = load %struct.btCollisionObject*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btCollisionObject** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btCollisionObject** %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btCollisionObject* %collisionObject, %struct.btCollisionObject** %28, align 4
- %.pre6.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %30 = phi i32 [ %25, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %31 = add nsw i32 %30, 1 ; [#uses=1]
- store i32 %31, i32* %0, align 4
- %32 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 8
- %35 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 8
- %41 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 8
- %47 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 8
- %53 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 8
- %59 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 8
- %65 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 8
- %71 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 8
- %77 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 9 ; [#uses=2]
- %81 = load %struct.btCollisionShape** %80, align 4 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btCollisionShape* %81, i32 0, i32 0 ; [#uses=1]
- %83 = load i32 (...)*** %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds i32 (...)** %83, i32 2 ; [#uses=1]
- %85 = load i32 (...)** %84, align 4 ; [#uses=1]
- %86 = bitcast i32 (...)* %85 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %86(%struct.btCollisionShape* %81, %struct.btTransform* %trans, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb)
- %87 = load %struct.btCollisionShape** %80, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btCollisionShape* %87, i32 0, i32 1 ; [#uses=1]
- %89 = load i32* %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=1]
- %91 = load %struct.btActionInterface** %90, align 4 ; [#uses=2]
- %92 = getelementptr inbounds %struct.btActionInterface* %91, i32 0, i32 0 ; [#uses=1]
- %93 = load i32 (...)*** %92, align 4 ; [#uses=1]
- %94 = getelementptr inbounds i32 (...)** %93, i32 2 ; [#uses=1]
- %95 = load i32 (...)** %94, align 4 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=1]
- %97 = load %struct.btActionInterface** %96, align 4 ; [#uses=1]
- %98 = bitcast i32 (...)* %95 to %struct.btBroadphaseProxy* (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, i32, i8*, i16, i16, %struct.btActionInterface*, i8*)* ; [#uses=1]
- %99 = bitcast %struct.btCollisionObject* %collisionObject to i8* ; [#uses=1]
- %100 = call %struct.btBroadphaseProxy* %98(%struct.btActionInterface* %91, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb, i32 %89, i8* %99, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask, %struct.btActionInterface* %97, i8* null) ; [#uses=1]
- %101 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 8 ; [#uses=1]
- store %struct.btBroadphaseProxy* %100, %struct.btBroadphaseProxy** %101, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btCollisionWorld33performDiscreteCollisionDetectionEv(%struct.btCollisionWorld* %this) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([34 x i8]* @.str48, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 0 ; [#uses=1]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 2 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to void (%struct.btCollisionWorld*)* ; [#uses=1]
- invoke void %5(%struct.btCollisionWorld* %this)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- invoke void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([26 x i8]* @.str5, i32 0, i32 0))
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %invcont
- %6 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=2]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 8 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=3]
- %13 = load %struct.btActionInterface** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %14(%struct.btActionInterface* %7, %struct.btActionInterface* %13)
- to label %bb6 unwind label %lpad28
-
-bb6: ; preds = %invcont2
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont7 unwind label %lpad
-
-invcont7: ; preds = %bb6
- %15 = load %struct.btActionInterface** %12, align 4 ; [#uses=3]
- invoke void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([26 x i8]* @.str6, i32 0, i32 0))
- to label %invcont9 unwind label %lpad
-
-invcont9: ; preds = %invcont7
- %16 = icmp eq %struct.btActionInterface* %15, null ; [#uses=1]
- br i1 %16, label %bb18, label %bb10
-
-bb10: ; preds = %invcont9
- %17 = getelementptr inbounds %struct.btActionInterface* %15, i32 0, i32 0 ; [#uses=1]
- %18 = load i32 (...)*** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 8 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = load %struct.btActionInterface** %12, align 4 ; [#uses=1]
- %22 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btActionInterface* %22, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 9 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = bitcast i32 (...)* %26 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btActionInterface*)* ; [#uses=1]
- %28 = invoke %struct..0btMultiSapOverlapFilterCallback* %27(%struct.btActionInterface* %22)
- to label %invcont11 unwind label %lpad36 ; [#uses=1]
-
-invcont11: ; preds = %bb10
- %29 = bitcast i32 (...)* %20 to void (%struct.btActionInterface*, %struct..0btMultiSapOverlapFilterCallback*, %struct.btDispatcherInfo*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %29(%struct.btActionInterface* %15, %struct..0btMultiSapOverlapFilterCallback* %28, %struct.btDispatcherInfo* %0, %struct.btActionInterface* %21)
- to label %bb18 unwind label %lpad36
-
-bb18: ; preds = %invcont11, %invcont9
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %bb25 unwind label %lpad
-
-invcont23: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb25: ; preds = %bb18
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb18, %invcont7, %bb6, %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select27 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad28: ; preds = %invcont2
- %eh_ptr29 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select31 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr29, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %ppad unwind label %lpad32
-
-lpad32: ; preds = %lpad28
- %eh_ptr33 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr33, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad36: ; preds = %invcont11, %bb10
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %ppad unwind label %lpad40
-
-lpad40: ; preds = %lpad36
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad44: ; preds = %ppad
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad36, %lpad28, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr29, %lpad28 ], [ %eh_ptr37, %lpad36 ] ; [#uses=1]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont23 unwind label %lpad44
-}
-
-; [#uses=1]
-define void @_ZN16btCollisionWorld9serializeEP12btSerializer(%struct.btCollisionWorld* nocapture %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 8 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btActionInterface*)* ; [#uses=1]
- tail call void %4(%struct.btActionInterface* %serializer)
- tail call void @_ZN16btCollisionWorld25serializeCollisionObjectsEP12btSerializer(%struct.btCollisionWorld* %this, %struct.btActionInterface* %serializer)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 9 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btActionInterface*)* ; [#uses=1]
- tail call void %8(%struct.btActionInterface* %serializer)
- ret void
-}
-
-; [#uses=14]
-define void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV16btCollisionWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=6]
- %3 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=2]
- br label %bb5
-
-bb: ; preds = %bb5
- %scevgep = getelementptr %struct.btCollisionObject** %33, i32 %30 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 8 ; [#uses=2]
- %7 = load %struct.btBroadphaseProxy** %6, align 4 ; [#uses=3]
- %8 = icmp eq %struct.btBroadphaseProxy* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb1
-
-bb1: ; preds = %bb
- %9 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btActionInterface* %9, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 9 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btActionInterface*)* ; [#uses=1]
- %15 = invoke %struct..0btMultiSapOverlapFilterCallback* %14(%struct.btActionInterface* %9)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %bb1
- %16 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %15, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 10 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = load %struct.btActionInterface** %4, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %19 to void (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %21(%struct..0btMultiSapOverlapFilterCallback* %15, %struct.btBroadphaseProxy* %7, %struct.btActionInterface* %20)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %invcont
- %22 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btActionInterface* %22, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 3 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = load %struct.btActionInterface** %4, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %26 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %28(%struct.btActionInterface* %22, %struct.btBroadphaseProxy* %7, %struct.btActionInterface* %27)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %invcont2
- store %struct.btBroadphaseProxy* null, %struct.btBroadphaseProxy** %6, align 4
- br label %bb4
-
-bb4: ; preds = %invcont3, %bb
- %29 = add nsw i32 %30, 1 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %entry
- %30 = phi i32 [ 0, %entry ], [ %29, %bb4 ] ; [#uses=3]
- %31 = load i32* %1, align 4 ; [#uses=1]
- %32 = icmp sgt i32 %31, %30 ; [#uses=1]
- %33 = load %struct.btCollisionObject*** %2, align 4 ; [#uses=3]
- br i1 %32, label %bb, label %bb9
-
-invcont7: ; preds = %bb2.i.i.i, %lpad
- %34 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- store i32 0, i32* %1, align 4
- %35 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %35, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9: ; preds = %bb5
- %36 = icmp eq %struct.btCollisionObject** %33, null ; [#uses=1]
- br i1 %36, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit26, label %bb.i.i.i23
-
-bb.i.i.i23: ; preds = %bb9
- %37 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %38 = load i8* %37, align 4 ; [#uses=1]
- %toBool.i.i.i22 = icmp eq i8 %38, 0 ; [#uses=1]
- br i1 %toBool.i.i.i22, label %bb2.i.i.i25, label %bb1.i.i.i24
-
-bb1.i.i.i24: ; preds = %bb.i.i.i23
- %39 = bitcast %struct.btCollisionObject** %33 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %39)
- br label %bb2.i.i.i25
-
-bb2.i.i.i25: ; preds = %bb1.i.i.i24, %bb.i.i.i23
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit26
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit26: ; preds = %bb2.i.i.i25, %bb9
- %40 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %40, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- store i32 0, i32* %1, align 4
- %41 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %41, align 4
- ret void
-
-lpad: ; preds = %invcont2, %invcont, %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %42 = load %struct.btCollisionObject*** %2, align 4 ; [#uses=2]
- %43 = icmp eq %struct.btCollisionObject** %42, null ; [#uses=1]
- br i1 %43, label %invcont7, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %44 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %45 = load i8* %44, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %46 = bitcast %struct.btCollisionObject** %42 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %46)
- to label %bb2.i.i.i unwind label %lpad16
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- br label %invcont7
-
-lpad16: ; preds = %bb1.i.i.i
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN16btCollisionWorldC1EP12btDispatcherP21btBroadphaseInterfaceP24btCollisionConfiguration(%struct.btCollisionWorld* nocapture %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV16btCollisionWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %dispatcher, %struct.btActionInterface** %5, align 4
- %6 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 1, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store float 1.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 0, i8* %10, align 4
- %11 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 5 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %11, align 4
- %12 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 6 ; [#uses=1]
- store i8 0, i8* %12, align 4
- %13 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 7 ; [#uses=1]
- store i8 1, i8* %13, align 1
- %14 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 8 ; [#uses=1]
- store i8 1, i8* %14, align 2
- %15 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 9 ; [#uses=1]
- store float 0x3FA47AE140000000, float* %15, align 4
- %16 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 10 ; [#uses=1]
- store i8 0, i8* %16, align 4
- %17 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 12 ; [#uses=1]
- store i8 0, i8* %18, align 4
- %19 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3, i32 13 ; [#uses=2]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %19, align 4
- %20 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btActionInterface* %pairCache, %struct.btActionInterface** %20, align 4
- %21 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %21, align 4
- %22 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 7 ; [#uses=1]
- store i8 1, i8* %22, align 4
- %23 = getelementptr inbounds %struct.btActionInterface* %collisionConfiguration, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 4 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = bitcast i32 (...)* %26 to %struct.btStackAlloc* (%struct.btActionInterface*)* ; [#uses=1]
- %28 = invoke %struct.btStackAlloc* %27(%struct.btActionInterface* %collisionConfiguration)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %entry
- %29 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btStackAlloc* %28, %struct.btStackAlloc** %29, align 4
- store %struct.btStackAlloc* %28, %struct.btStackAlloc** %19, align 4
- ret void
-
-invcont1: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %1, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %30 = load %struct.btCollisionObject*** %2, align 4 ; [#uses=2]
- %31 = icmp eq %struct.btCollisionObject** %30, null ; [#uses=1]
- br i1 %31, label %invcont1, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %32 = load i8* %1, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %33 = bitcast %struct.btCollisionObject** %30 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i unwind label %lpad5
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %2, align 4
- br label %invcont1
-
-lpad5: ; preds = %bb1.i.i.i
- %eh_ptr6 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr6, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btHashPtrE9push_backERKS0_(%"struct.btAlignedObjectArray<btHashPtr>"* nocapture %this, %struct.btHashPtr* nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashPtr>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashPtr>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.506.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.506.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.506.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI9btHashPtrE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.506.0.i, 3 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btHashPtr* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI9btHashPtrE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI9btHashPtrE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btHashPtr* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=4]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI9btHashPtrE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI9btHashPtrE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashPtr>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=6]
- %scevgep.i.i = getelementptr %struct.btHashPtr* %12, i32 %indvar.i.i ; [#uses=1]
- %15 = icmp eq %struct.btHashPtr* %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep12.i.i = getelementptr %struct.btHashPtr* %12, i32 %indvar.i.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep11.i.i = getelementptr inbounds %struct.btHashPtr* %12, i32 %indvar.i.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load %struct.btHashPtr** %14, align 4 ; [#uses=2]
- %scevgep89.i.i = getelementptr inbounds %struct.btHashPtr* %16, i32 %indvar.i.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- %scevgep10.i.i = getelementptr %struct.btHashPtr* %16, i32 %indvar.i.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load i32* %scevgep10.i.i, align 4 ; [#uses=1]
- store i32 %17, i32* %scevgep11.i.i, align 4
- store i32 %18, i32* %scevgep12.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI9btHashPtrE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI9btHashPtrE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI9btHashPtrE8allocateEi.exit.i
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashPtr>"* %this, i32 0, i32 3 ; [#uses=3]
- %20 = load %struct.btHashPtr** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.btHashPtr* %20, null ; [#uses=1]
- br i1 %21, label %_ZN20btAlignedObjectArrayI9btHashPtrE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI9btHashPtrE4copyEiiPS0_.exit.i
- %22 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashPtr>"* %this, i32 0, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %24 = bitcast %struct.btHashPtr* %20 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %24)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btHashPtr* null, %struct.btHashPtr** %19, align 4
- br label %_ZN20btAlignedObjectArrayI9btHashPtrE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI9btHashPtrE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI9btHashPtrE4copyEiiPS0_.exit.i
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashPtr>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store %struct.btHashPtr* %12, %struct.btHashPtr** %19, align 4
- store i32 %iftmp.506.0.i, i32* %2, align 4
- %.pre9 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI9btHashPtrE10deallocateEv.exit.i, %bb, %entry
- %26 = phi i32 [ %.pre9, %_ZN20btAlignedObjectArrayI9btHashPtrE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=4]
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashPtr>"* %this, i32 0, i32 3 ; [#uses=1]
- %28 = load %struct.btHashPtr** %27, align 4 ; [#uses=3]
- %29 = getelementptr inbounds %struct.btHashPtr* %28, i32 %26 ; [#uses=1]
- %30 = icmp eq %struct.btHashPtr* %29, null ; [#uses=1]
- br i1 %30, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %31 = getelementptr inbounds %struct.btHashPtr* %_Val, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load i32* %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btHashPtr* %_Val, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btHashPtr* %28, i32 %26, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 %32, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btHashPtr* %28, i32 %26, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 %34, i32* %36, align 4
- %.pre10 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %37 = phi i32 [ %26, %bb1 ], [ %.pre10, %bb2 ] ; [#uses=1]
- %38 = add nsw i32 %37, 1 ; [#uses=1]
- store i32 %38, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9btHashMapI9btHashPtrP16btCollisionShapeE10growTablesERKS0_(%"struct.btHashMap<btHashPtr,btCollisionShape*>"* nocapture %this, %struct.btHashPtr* nocapture %unnamed_arg) align 2 {
-entry:
- %0 = alloca i32, align 4 ; [#uses=2]
- %1 = alloca i32, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=6]
- %4 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = icmp slt i32 %5, %3 ; [#uses=1]
- br i1 %6, label %bb, label %return
-
-bb: ; preds = %entry
- store i32 0, i32* %1, align 4
- %7 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %7, i32 %3, i32* %1) inlinehint
- store i32 0, i32* %0, align 4
- %8 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %8, i32 %3, i32* %0) inlinehint
- %9 = icmp sgt i32 %3, 0 ; [#uses=2]
- br i1 %9, label %bb.nph14, label %bb8.preheader
-
-bb.nph14: ; preds = %bb
- %10 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph14
- %i.013 = phi i32 [ 0, %bb.nph14 ], [ %12, %bb1 ] ; [#uses=2]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %scevgep20 = getelementptr i32* %11, i32 %i.013 ; [#uses=1]
- store i32 -1, i32* %scevgep20, align 4
- %12 = add nsw i32 %i.013, 1 ; [#uses=2]
- %exitcond19 = icmp eq i32 %12, %3 ; [#uses=1]
- br i1 %exitcond19, label %bb5.preheader, label %bb1
-
-bb5.preheader: ; preds = %bb1
- br i1 %9, label %bb.nph12, label %bb8.preheader
-
-bb.nph12: ; preds = %bb5.preheader
- %13 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb.nph12
- %i.111 = phi i32 [ 0, %bb.nph12 ], [ %15, %bb4 ] ; [#uses=2]
- %14 = load i32** %13, align 4 ; [#uses=1]
- %scevgep18 = getelementptr i32* %14, i32 %i.111 ; [#uses=1]
- store i32 -1, i32* %scevgep18, align 4
- %15 = add nsw i32 %i.111, 1 ; [#uses=2]
- %exitcond17 = icmp eq i32 %15, %3 ; [#uses=1]
- br i1 %exitcond17, label %bb8.preheader, label %bb4
-
-bb8.preheader: ; preds = %bb4, %bb5.preheader, %bb
- %16 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %16, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb8.preheader
- %17 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %20 = phi i32 [ 0, %bb.nph ], [ %43, %bb7 ] ; [#uses=4]
- %21 = load %struct.btHashPtr** %17, align 4 ; [#uses=1]
- %scevgep1516 = getelementptr inbounds %struct.btHashPtr* %21, i32 %20, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load i32* %scevgep1516, align 4 ; [#uses=2]
- %23 = shl i32 %22, 15 ; [#uses=1]
- %not.i = xor i32 %23, -1 ; [#uses=1]
- %24 = add nsw i32 %22, %not.i ; [#uses=2]
- %25 = ashr i32 %24, 10 ; [#uses=1]
- %26 = xor i32 %25, %24 ; [#uses=1]
- %27 = mul i32 %26, 9 ; [#uses=2]
- %28 = ashr i32 %27, 6 ; [#uses=1]
- %29 = xor i32 %28, %27 ; [#uses=2]
- %30 = shl i32 %29, 11 ; [#uses=1]
- %not2.i = xor i32 %30, -1 ; [#uses=1]
- %31 = add nsw i32 %29, %not2.i ; [#uses=2]
- %32 = ashr i32 %31, 16 ; [#uses=1]
- %33 = xor i32 %32, %31 ; [#uses=1]
- %34 = load i32* %2, align 4 ; [#uses=1]
- %35 = add nsw i32 %34, -1 ; [#uses=1]
- %36 = and i32 %33, %35 ; [#uses=2]
- %37 = load i32** %18, align 4 ; [#uses=1]
- %38 = load i32** %19, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32* %38, i32 %36 ; [#uses=1]
- %40 = load i32* %39, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %37, i32 %20 ; [#uses=1]
- store i32 %40, i32* %scevgep, align 4
- %41 = load i32** %19, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32* %41, i32 %36 ; [#uses=1]
- store i32 %20, i32* %42, align 4
- %43 = add nsw i32 %20, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %43, %5 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb7
-
-return: ; preds = %bb7, %bb8.preheader, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9btHashMapI9btHashPtrP16btCollisionShapeE6insertERKS0_RKS2_(%"struct.btHashMap<btHashPtr,btCollisionShape*>"* nocapture %this, %struct.btHashPtr* nocapture %key, %struct.btCollisionShape** nocapture %value) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashPtr* %key, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = shl i32 %1, 15 ; [#uses=1]
- %not.i = xor i32 %2, -1 ; [#uses=1]
- %3 = add nsw i32 %1, %not.i ; [#uses=2]
- %4 = ashr i32 %3, 10 ; [#uses=1]
- %5 = xor i32 %4, %3 ; [#uses=1]
- %6 = mul i32 %5, 9 ; [#uses=2]
- %7 = ashr i32 %6, 6 ; [#uses=1]
- %8 = xor i32 %7, %6 ; [#uses=2]
- %9 = shl i32 %8, 11 ; [#uses=1]
- %not2.i = xor i32 %9, -1 ; [#uses=1]
- %10 = add nsw i32 %8, %not2.i ; [#uses=2]
- %11 = ashr i32 %10, 16 ; [#uses=1]
- %12 = xor i32 %11, %10 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 2 ; [#uses=3]
- %14 = load i32* %13, align 4 ; [#uses=2]
- %15 = add nsw i32 %14, -1 ; [#uses=1]
- %16 = and i32 %12, %15 ; [#uses=3]
- %17 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = icmp ugt i32 %18, %16 ; [#uses=1]
- %20 = inttoptr i32 %1 to i8* ; [#uses=1]
- br i1 %19, label %bb1.i, label %bb1
-
-bb1.i: ; preds = %entry
- %21 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = load i32** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32* %22, i32 %16 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb3.i
-
-bb2.i: ; preds = %bb4.i
- %26 = load i32** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32* %26, i32 %index.0.i ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb1.i
- %index.0.in.i = phi i32* [ %23, %bb1.i ], [ %27, %bb2.i ] ; [#uses=1]
- %index.0.i = load i32* %index.0.in.i, align 4 ; [#uses=4]
- %28 = icmp eq i32 %index.0.i, -1 ; [#uses=1]
- br i1 %28, label %bb1, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %29 = load %struct.btHashPtr** %24, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btHashPtr* %29, i32 %index.0.i ; [#uses=1]
- %31 = bitcast %struct.btHashPtr* %30 to i8** ; [#uses=1]
- %32 = load i8** %31, align 4 ; [#uses=1]
- %33 = icmp eq i8* %20, %32 ; [#uses=1]
- br i1 %33, label %bb, label %bb2.i
-
-bb: ; preds = %bb4.i
- %34 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %35 = load %struct.btCollisionShape*** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCollisionShape** %35, i32 %index.0.i ; [#uses=1]
- %37 = load %struct.btCollisionShape** %value, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %37, %struct.btCollisionShape** %36, align 4
- ret void
-
-bb1: ; preds = %bb3.i, %entry
- %38 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %39 = load i32* %38, align 4 ; [#uses=2]
- %40 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 2 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayIP16btCollisionShapeE9push_backERKS1_(%"struct.btAlignedObjectArray<btCollisionShape*>"* %40, %struct.btCollisionShape** %value) inlinehint
- %41 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 3 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI9btHashPtrE9push_backERKS0_(%"struct.btAlignedObjectArray<btHashPtr>"* %41, %struct.btHashPtr* %key) inlinehint
- %42 = load i32* %13, align 4 ; [#uses=1]
- %43 = icmp slt i32 %14, %42 ; [#uses=1]
- br i1 %43, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- tail call void @_ZN9btHashMapI9btHashPtrP16btCollisionShapeE10growTablesERKS0_(%"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, %struct.btHashPtr* %key)
- %44 = load i32* %0, align 4 ; [#uses=2]
- %45 = shl i32 %44, 15 ; [#uses=1]
- %not.i5 = xor i32 %45, -1 ; [#uses=1]
- %46 = add nsw i32 %44, %not.i5 ; [#uses=2]
- %47 = ashr i32 %46, 10 ; [#uses=1]
- %48 = xor i32 %47, %46 ; [#uses=1]
- %49 = mul i32 %48, 9 ; [#uses=2]
- %50 = ashr i32 %49, 6 ; [#uses=1]
- %51 = xor i32 %50, %49 ; [#uses=2]
- %52 = shl i32 %51, 11 ; [#uses=1]
- %not2.i6 = xor i32 %52, -1 ; [#uses=1]
- %53 = add nsw i32 %51, %not2.i6 ; [#uses=2]
- %54 = ashr i32 %53, 16 ; [#uses=1]
- %55 = xor i32 %54, %53 ; [#uses=1]
- %56 = load i32* %13, align 4 ; [#uses=1]
- %57 = add nsw i32 %56, -1 ; [#uses=1]
- %58 = and i32 %55, %57 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %hash.0 = phi i32 [ %58, %bb2 ], [ %16, %bb1 ] ; [#uses=2]
- %59 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %60 = load i32** %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds i32* %60, i32 %39 ; [#uses=1]
- %62 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- %63 = load i32** %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds i32* %63, i32 %hash.0 ; [#uses=1]
- %65 = load i32* %64, align 4 ; [#uses=1]
- store i32 %65, i32* %61, align 4
- %66 = load i32** %62, align 4 ; [#uses=1]
- %67 = getelementptr inbounds i32* %66, i32 %hash.0 ; [#uses=1]
- store i32 %39, i32* %67, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN16btCollisionWorld25serializeCollisionObjectsEP12btSerializer(%struct.btCollisionWorld* nocapture %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = alloca %struct.btHashPtr, align 8 ; [#uses=2]
- %serializedShapes = alloca %"struct.btHashMap<btHashPtr,btCollisionShape*>", align 8 ; [#uses=19]
- %shape = alloca %struct.btCollisionShape*, align 4 ; [#uses=3]
- %1 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp sgt i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb.nph, label %bb5
-
-bb.nph: ; preds = %entry
- %4 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.031 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=2]
- %tmp = add i32 %i.031, 1 ; [#uses=2]
- %5 = load %struct.btCollisionObject*** %4, align 4 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btCollisionObject** %5, i32 %i.031 ; [#uses=1]
- %6 = load %struct.btCollisionObject** %scevgep33, align 4 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 19 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %9 = icmp eq i32 %8, 1 ; [#uses=1]
- br i1 %9, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %10 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 6 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to void (%struct.btCollisionObject*, %struct.btActionInterface*)* ; [#uses=1]
- call void %14(%struct.btCollisionObject* %6, %struct.btActionInterface* %serializer)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %15 = load i32* %1, align 4 ; [#uses=1]
- %16 = icmp sgt i32 %15, %tmp ; [#uses=1]
- br i1 %16, label %bb, label %bb5
-
-bb5: ; preds = %bb2, %entry
- %17 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %17, align 8
- %18 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 0, i32 3 ; [#uses=2]
- store i32* null, i32** %18, align 4
- %19 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %20, align 8
- %21 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %21, align 4
- %22 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 1, i32 3 ; [#uses=2]
- store i32* null, i32** %22, align 4
- %23 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 8
- %26 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 2, i32 3 ; [#uses=2]
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %26, align 4
- %27 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 2, i32 2 ; [#uses=2]
- store i32 0, i32* %28, align 8
- %29 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %29, align 4
- %30 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 3, i32 3 ; [#uses=2]
- store %struct.btHashPtr* null, %struct.btHashPtr** %30, align 4
- %31 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %31, align 4
- %32 = getelementptr inbounds %"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %32, align 4
- %33 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btHashPtr* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb13
-
-bb6: ; preds = %bb13
- %35 = load %struct.btCollisionObject*** %33, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %35, i32 %76 ; [#uses=1]
- %36 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btCollisionObject* %36, i32 0, i32 9 ; [#uses=1]
- %38 = load %struct.btCollisionShape** %37, align 4 ; [#uses=3]
- store %struct.btCollisionShape* %38, %struct.btCollisionShape** %shape, align 4
- %ptr.c.i27 = ptrtoint %struct.btCollisionShape* %38 to i32 ; [#uses=3]
- %39 = shl i32 %ptr.c.i27, 15 ; [#uses=1]
- %not.i.i.i = xor i32 %39, -1 ; [#uses=1]
- %40 = add nsw i32 %ptr.c.i27, %not.i.i.i ; [#uses=2]
- %41 = ashr i32 %40, 10 ; [#uses=1]
- %42 = xor i32 %41, %40 ; [#uses=1]
- %43 = mul i32 %42, 9 ; [#uses=2]
- %44 = ashr i32 %43, 6 ; [#uses=1]
- %45 = xor i32 %44, %43 ; [#uses=2]
- %46 = shl i32 %45, 11 ; [#uses=1]
- %not2.i.i.i = xor i32 %46, -1 ; [#uses=1]
- %47 = add nsw i32 %45, %not2.i.i.i ; [#uses=2]
- %48 = ashr i32 %47, 16 ; [#uses=1]
- %49 = xor i32 %48, %47 ; [#uses=1]
- %50 = load i32* %28, align 8 ; [#uses=1]
- %51 = add nsw i32 %50, -1 ; [#uses=1]
- %52 = and i32 %49, %51 ; [#uses=2]
- %53 = load i32* %19, align 4 ; [#uses=1]
- %54 = icmp ugt i32 %53, %52 ; [#uses=1]
- %55 = bitcast %struct.btCollisionShape* %38 to i8* ; [#uses=1]
- br i1 %54, label %bb1.i.i, label %bb9
-
-bb1.i.i: ; preds = %bb6
- %56 = load i32** %18, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32* %56, i32 %52 ; [#uses=1]
- br label %bb3.i.i
-
-bb2.i.i: ; preds = %bb4.i.i
- %58 = load i32** %22, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32* %58, i32 %index.0.i.i ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %bb1.i.i
- %index.0.in.i.i = phi i32* [ %57, %bb1.i.i ], [ %59, %bb2.i.i ] ; [#uses=1]
- %index.0.i.i = load i32* %index.0.in.i.i, align 4 ; [#uses=4]
- %60 = icmp eq i32 %index.0.i.i, -1 ; [#uses=1]
- br i1 %60, label %bb9, label %bb4.i.i
-
-bb4.i.i: ; preds = %bb3.i.i
- %61 = load %struct.btHashPtr** %30, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btHashPtr* %61, i32 %index.0.i.i ; [#uses=1]
- %63 = bitcast %struct.btHashPtr* %62 to i8** ; [#uses=1]
- %64 = load i8** %63, align 4 ; [#uses=1]
- %65 = icmp eq i8* %55, %64 ; [#uses=1]
- br i1 %65, label %invcont, label %bb2.i.i
-
-invcont: ; preds = %bb4.i.i
- %66 = load %struct.btCollisionShape*** %26, align 4 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btCollisionShape** %66, i32 %index.0.i.i ; [#uses=1]
- %68 = icmp eq %struct.btCollisionShape** %67, null ; [#uses=1]
- br i1 %68, label %bb9, label %bb12
-
-bb9: ; preds = %invcont, %bb3.i.i, %bb6
- store i32 %ptr.c.i27, i32* %34, align 8
- invoke void @_ZN9btHashMapI9btHashPtrP16btCollisionShapeE6insertERKS0_RKS2_(%"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes, %struct.btHashPtr* %0, %struct.btCollisionShape** %shape)
- to label %invcont10 unwind label %lpad
-
-invcont10: ; preds = %bb9
- %69 = load %struct.btCollisionShape** %shape, align 4 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btCollisionShape* %69, i32 0, i32 0 ; [#uses=1]
- %71 = load i32 (...)*** %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds i32 (...)** %71, i32 14 ; [#uses=1]
- %73 = load i32 (...)** %72, align 4 ; [#uses=1]
- %74 = bitcast i32 (...)* %73 to void (%struct.btCollisionShape*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %74(%struct.btCollisionShape* %69, %struct.btActionInterface* %serializer)
- to label %bb12 unwind label %lpad
-
-bb12: ; preds = %invcont10, %invcont
- %75 = add nsw i32 %76, 1 ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb12, %bb5
- %76 = phi i32 [ 0, %bb5 ], [ %75, %bb12 ] ; [#uses=3]
- %77 = load i32* %1, align 4 ; [#uses=1]
- %78 = icmp sgt i32 %77, %76 ; [#uses=1]
- br i1 %78, label %bb6, label %bb18
-
-invcont16: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb18: ; preds = %bb13
- call void @_ZN9btHashMapI9btHashPtrP16btCollisionShapeED1Ev(%"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes)
- ret void
-
-lpad: ; preds = %invcont10, %bb9
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN9btHashMapI9btHashPtrP16btCollisionShapeED1Ev(%"struct.btHashMap<btHashPtr,btCollisionShape*>"* %serializedShapes)
- to label %invcont16 unwind label %lpad21
-
-lpad21: ; preds = %lpad
- %eh_ptr22 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select24 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr22, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btSingleSweepCallbackC2EPK13btConvexShapeRK11btTransformS5_PK16btCollisionWorldRNS6_20ConvexResultCallbackEf(%struct.btSingleSweepCallback* %this, %struct.btConvexShape* %castShape, %struct.btTransform* nocapture %convexFromTrans, %struct.btTransform* nocapture %convexToTrans, %struct.btCollisionWorld* %world, %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, float %allowedPenetration) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21btSingleSweepCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=2]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 4
- %58 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 4
- %64 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 4
- %76 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 4
- %82 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=2]
- store float %87, float* %85, align 4
- %88 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=2]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=2]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btCollisionWorld* %world, %struct.btCollisionWorld** %97, align 4
- %98 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 5 ; [#uses=1]
- store %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, %"struct.btCollisionWorld::ConvexResultCallback"** %98, align 4
- %99 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 6 ; [#uses=1]
- store float %allowedPenetration, float* %99, align 4
- %100 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 7 ; [#uses=1]
- store %struct.btConvexShape* %castShape, %struct.btConvexShape** %100, align 4
- %101 = fsub float %93, %45 ; [#uses=4]
- %102 = fsub float %90, %42 ; [#uses=4]
- %103 = fsub float %87, %39 ; [#uses=4]
- %104 = fmul float %103, %103 ; [#uses=1]
- %105 = fmul float %102, %102 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %101, %101 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = tail call float @sqrtf(float %108) nounwind readonly ; [#uses=1]
- %110 = fdiv float 1.000000e+00, %109 ; [#uses=3]
- %111 = fmul float %101, %110 ; [#uses=3]
- %112 = fmul float %102, %110 ; [#uses=3]
- %113 = fmul float %103, %110 ; [#uses=3]
- %114 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %115 = fcmp une float %113, 0.000000e+00 ; [#uses=1]
- br i1 %115, label %bb, label %bb2
-
-bb: ; preds = %entry
- %116 = fdiv float 1.000000e+00, %113 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %117 = phi float [ %116, %bb ], [ 0x43ABC16D60000000, %entry ] ; [#uses=2]
- store float %117, float* %114, align 4
- %118 = fcmp une float %112, 0.000000e+00 ; [#uses=1]
- br i1 %118, label %bb3, label %bb5
-
-bb3: ; preds = %bb2
- %119 = fdiv float 1.000000e+00, %112 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb2
- %120 = phi float [ %119, %bb3 ], [ 0x43ABC16D60000000, %bb2 ] ; [#uses=2]
- %121 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %120, float* %121, align 4
- %122 = fcmp une float %111, 0.000000e+00 ; [#uses=1]
- br i1 %122, label %bb6, label %bb8
-
-bb6: ; preds = %bb5
- %123 = fdiv float 1.000000e+00, %111 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb6, %bb5
- %iftmp.368.0 = phi float [ %123, %bb6 ], [ 0x43ABC16D60000000, %bb5 ] ; [#uses=2]
- %124 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.368.0, float* %124, align 4
- %125 = fcmp olt float %117, 0.000000e+00 ; [#uses=1]
- %126 = zext i1 %125 to i32 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 2, i32 0 ; [#uses=1]
- store i32 %126, i32* %127, align 4
- %128 = fcmp olt float %120, 0.000000e+00 ; [#uses=1]
- %129 = zext i1 %128 to i32 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 %129, i32* %130, align 4
- %131 = fcmp olt float %iftmp.368.0, 0.000000e+00 ; [#uses=1]
- %132 = zext i1 %131 to i32 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 %132, i32* %133, align 4
- %134 = fmul float %113, %103 ; [#uses=1]
- %135 = fmul float %112, %102 ; [#uses=1]
- %136 = fadd float %134, %135 ; [#uses=1]
- %137 = fmul float %111, %101 ; [#uses=1]
- %138 = fadd float %136, %137 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btSingleSweepCallback* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %138, float* %139, align 4
- ret void
-}
-
-; [#uses=17]
-define linkonce_odr void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %this, %struct.btQuaternion* nocapture %q) nounwind align 2 {
-entry:
- %temp = alloca [4 x float], align 4 ; [#uses=11]
- %0 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fadd float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = fadd float %4, %6 ; [#uses=2]
- %8 = fcmp ogt float %7, 0.000000e+00 ; [#uses=1]
- br i1 %8, label %bb, label %bb1
-
-bb: ; preds = %entry
- %9 = fadd float %7, 1.000000e+00 ; [#uses=1]
- %10 = call float @sqrtf(float %9) nounwind readonly ; [#uses=2]
- %11 = fmul float %10, 5.000000e-01 ; [#uses=2]
- %12 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 3 ; [#uses=1]
- store float %11, float* %12, align 4
- %13 = fdiv float 5.000000e-01, %10 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fsub float %15, %17 ; [#uses=1]
- %19 = fmul float %18, %13 ; [#uses=2]
- %20 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 0 ; [#uses=1]
- store float %19, float* %20, align 4
- %21 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fsub float %22, %24 ; [#uses=1]
- %26 = fmul float %25, %13 ; [#uses=2]
- %27 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 1 ; [#uses=1]
- store float %26, float* %27, align 4
- %28 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fsub float %29, %31 ; [#uses=1]
- %33 = fmul float %32, %13 ; [#uses=2]
- %34 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 2 ; [#uses=1]
- store float %33, float* %34, align 4
- br label %bb12
-
-bb1: ; preds = %entry
- %35 = fcmp olt float %1, %3 ; [#uses=1]
- br i1 %35, label %bb3, label %bb7
-
-bb3: ; preds = %bb1
- %36 = fcmp olt float %3, %6 ; [#uses=1]
- %iftmp.50.0 = select i1 %36, i32 2, i32 1 ; [#uses=1]
- br label %bb11
-
-bb7: ; preds = %bb1
- %37 = fcmp olt float %1, %6 ; [#uses=1]
- %iftmp.51.0 = select i1 %37, i32 2, i32 0 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb7, %bb3
- %iftmp.49.0 = phi i32 [ %iftmp.50.0, %bb3 ], [ %iftmp.51.0, %bb7 ] ; [#uses=9]
- %38 = add nsw i32 %iftmp.49.0, 1 ; [#uses=1]
- %39 = srem i32 %38, 3 ; [#uses=7]
- %40 = add nsw i32 %iftmp.49.0, 2 ; [#uses=1]
- %41 = srem i32 %40, 3 ; [#uses=7]
- %42 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %iftmp.49.0, i32 0, i32 %iftmp.49.0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %39, i32 0, i32 %39 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fsub float %43, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %41, i32 0, i32 %41 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fsub float %46, %48 ; [#uses=1]
- %50 = fadd float %49, 1.000000e+00 ; [#uses=1]
- %51 = call float @sqrtf(float %50) nounwind readonly ; [#uses=2]
- %52 = fmul float %51, 5.000000e-01 ; [#uses=1]
- %53 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 %iftmp.49.0 ; [#uses=1]
- store float %52, float* %53, align 4
- %54 = fdiv float 5.000000e-01, %51 ; [#uses=3]
- %55 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %41, i32 0, i32 %39 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %39, i32 0, i32 %41 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fsub float %56, %58 ; [#uses=1]
- %60 = fmul float %59, %54 ; [#uses=1]
- %61 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 3 ; [#uses=2]
- store float %60, float* %61, align 4
- %62 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %39, i32 0, i32 %iftmp.49.0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %iftmp.49.0, i32 0, i32 %39 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = fadd float %63, %65 ; [#uses=1]
- %67 = fmul float %66, %54 ; [#uses=1]
- %68 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 %39 ; [#uses=1]
- store float %67, float* %68, align 4
- %69 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %41, i32 0, i32 %iftmp.49.0 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %iftmp.49.0, i32 0, i32 %41 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fadd float %70, %72 ; [#uses=1]
- %74 = fmul float %73, %54 ; [#uses=1]
- %75 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 %41 ; [#uses=1]
- store float %74, float* %75, align 4
- %.phi.trans.insert = getelementptr inbounds [4 x float]* %temp, i32 0, i32 0 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- %.phi.trans.insert13 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 1 ; [#uses=1]
- %.pre14 = load float* %.phi.trans.insert13, align 4 ; [#uses=1]
- %.phi.trans.insert15 = getelementptr inbounds [4 x float]* %temp, i32 0, i32 2 ; [#uses=1]
- %.pre16 = load float* %.phi.trans.insert15, align 4 ; [#uses=1]
- %.pre18 = load float* %61, align 4 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb11, %bb
- %76 = phi float [ %.pre18, %bb11 ], [ %11, %bb ] ; [#uses=1]
- %77 = phi float [ %.pre16, %bb11 ], [ %33, %bb ] ; [#uses=1]
- %78 = phi float [ %.pre14, %bb11 ], [ %26, %bb ] ; [#uses=1]
- %79 = phi float [ %.pre, %bb11 ], [ %19, %bb ] ; [#uses=1]
- %80 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %79, float* %80, align 4
- %81 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %78, float* %81, align 4
- %82 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %77, float* %82, align 4
- %83 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %76, float* %83, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD0E_0v(%struct..4BridgeTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..4BridgeTriangleConvexcastCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD1E_0v(%struct..4BridgeTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD2E_0v(%struct..4BridgeTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD0Ev(%struct..3BridgeTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..3BridgeTriangleConvexcastCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD1Ev(%struct..3BridgeTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfEN32BridgeTriangleConvexcastCallbackD2Ev(%struct..3BridgeTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD0E_0v(%struct..1BridgeTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..1BridgeTriangleRaycastCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD1E_0v(%struct..1BridgeTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD2E_0v(%struct..1BridgeTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD0Ev(%struct..0BridgeTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..0BridgeTriangleRaycastCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD1Ev(%struct..0BridgeTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEEN29BridgeTriangleRaycastCallbackD2Ev(%struct..0BridgeTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btCollisionWorld15contactPairTestEP17btCollisionObjectS1_RNS_21ContactResultCallbackE(%struct.btCollisionWorld* %this, %struct.btCollisionObject* %colObjA, %struct.btCollisionObject* %colObjB, %"struct.btCollisionWorld::ContactResultCallback"* %resultCallback) align 2 {
-entry:
- %contactPointResult = alloca %struct.btBridgedManifoldResult, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %7 = call %struct.btCollisionAlgorithm* %6(%struct.btActionInterface* %1, %struct.btCollisionObject* %colObjA, %struct.btCollisionObject* %colObjB, %struct.btPersistentManifold* null) ; [#uses=5]
- %8 = icmp eq %struct.btCollisionAlgorithm* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = getelementptr inbounds %struct.btBridgedManifoldResult* %contactPointResult, i32 0, i32 0 ; [#uses=2]
- call void @_ZN16btManifoldResultC2EP17btCollisionObjectS1_(%struct.btManifoldResult* %9, %struct.btCollisionObject* %colObjA, %struct.btCollisionObject* %colObjB)
- %10 = getelementptr inbounds %struct.btBridgedManifoldResult* %contactPointResult, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btBridgedManifoldResult, i32 0, i32 2), i32 (...)*** %10, align 8
- %11 = getelementptr inbounds %struct.btBridgedManifoldResult* %contactPointResult, i32 0, i32 1 ; [#uses=1]
- store %"struct.btCollisionWorld::ContactResultCallback"* %resultCallback, %"struct.btCollisionWorld::ContactResultCallback"** %11, align 8
- %12 = getelementptr inbounds %struct.btCollisionAlgorithm* %7, i32 0, i32 0 ; [#uses=2]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 2 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 3 ; [#uses=1]
- %17 = bitcast i32 (...)* %15 to void (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- invoke void %17(%struct.btCollisionAlgorithm* %7, %struct.btCollisionObject* %colObjA, %struct.btCollisionObject* %colObjB, %struct.btDispatcherInfo* %16, %struct.btManifoldResult* %9)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %18 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %19 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %20(%struct.btCollisionAlgorithm* %7)
- to label %invcont1 unwind label %lpad
-
-invcont1: ; preds = %invcont
- %21 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btActionInterface* %21, i32 0, i32 0 ; [#uses=1]
- %23 = load i32 (...)*** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 13 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %27 = bitcast %struct.btCollisionAlgorithm* %7 to i8* ; [#uses=1]
- invoke void %26(%struct.btActionInterface* %21, i8* %27)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %invcont1, %entry
- ret void
-
-lpad: ; preds = %invcont1, %invcont, %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btBridgedManifoldResult, i32 0, i32 2), i32 (...)*** %10, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=13]
-declare float @acosf(float) nounwind readonly
-
-; [#uses=7]
-define linkonce_odr void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* nocapture %transform0, %struct.btTransform* nocapture %transform1, %struct.btQuadWord* nocapture %axis, float* nocapture %angle) nounwind {
-entry:
- %dmat = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %dorn = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fsub float %4, %9 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=4]
- %13 = fmul float %12, %8 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=4]
- %16 = fmul float %1, %15 ; [#uses=1]
- %17 = fsub float %13, %16 ; [#uses=2]
- %18 = fmul float %6, %15 ; [#uses=1]
- %19 = fmul float %12, %3 ; [#uses=1]
- %20 = fsub float %18, %19 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=5]
- %23 = fmul float %22, %20 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=5]
- %26 = fmul float %25, %17 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %transform0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=5]
- %30 = fmul float %29, %10 ; [#uses=1]
- %31 = fadd float %27, %30 ; [#uses=1]
- %32 = fdiv float 1.000000e+00, %31 ; [#uses=9]
- %33 = fmul float %22, %6 ; [#uses=1]
- %34 = fmul float %25, %1 ; [#uses=1]
- %35 = fsub float %33, %34 ; [#uses=1]
- %36 = fmul float %35, %32 ; [#uses=3]
- %37 = fmul float %25, %8 ; [#uses=1]
- %38 = fmul float %22, %3 ; [#uses=1]
- %39 = fsub float %37, %38 ; [#uses=1]
- %40 = fmul float %39, %32 ; [#uses=3]
- %41 = fmul float %10, %32 ; [#uses=3]
- %42 = fmul float %29, %1 ; [#uses=1]
- %43 = fmul float %22, %12 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=1]
- %45 = fmul float %44, %32 ; [#uses=3]
- %46 = fmul float %22, %15 ; [#uses=1]
- %47 = fmul float %29, %8 ; [#uses=1]
- %48 = fsub float %46, %47 ; [#uses=1]
- %49 = fmul float %48, %32 ; [#uses=3]
- %50 = fmul float %17, %32 ; [#uses=3]
- %51 = fmul float %25, %12 ; [#uses=1]
- %52 = fmul float %29, %6 ; [#uses=1]
- %53 = fsub float %51, %52 ; [#uses=1]
- %54 = fmul float %53, %32 ; [#uses=3]
- %55 = fmul float %29, %3 ; [#uses=1]
- %56 = fmul float %25, %15 ; [#uses=1]
- %57 = fsub float %55, %56 ; [#uses=1]
- %58 = fmul float %57, %32 ; [#uses=3]
- %59 = fmul float %20, %32 ; [#uses=3]
- %60 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=3]
- %62 = fmul float %54, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=3]
- %65 = fmul float %45, %64 ; [#uses=1]
- %66 = fadd float %62, %65 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=3]
- %69 = fmul float %36, %68 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = fmul float %58, %61 ; [#uses=1]
- %72 = fmul float %49, %64 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=1]
- %74 = fmul float %40, %68 ; [#uses=1]
- %75 = fadd float %73, %74 ; [#uses=1]
- %76 = fmul float %59, %61 ; [#uses=1]
- %77 = fmul float %50, %64 ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=1]
- %79 = fmul float %41, %68 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=3]
- %83 = fmul float %54, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=3]
- %86 = fmul float %45, %85 ; [#uses=1]
- %87 = fadd float %83, %86 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=3]
- %90 = fmul float %36, %89 ; [#uses=1]
- %91 = fadd float %87, %90 ; [#uses=1]
- %92 = fmul float %58, %82 ; [#uses=1]
- %93 = fmul float %49, %85 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=1]
- %95 = fmul float %40, %89 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = fmul float %59, %82 ; [#uses=1]
- %98 = fmul float %50, %85 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %41, %89 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=3]
- %104 = fmul float %54, %103 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=3]
- %107 = fmul float %45, %106 ; [#uses=1]
- %108 = fadd float %104, %107 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btTransform* %transform1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=3]
- %111 = fmul float %36, %110 ; [#uses=1]
- %112 = fadd float %108, %111 ; [#uses=1]
- %113 = fmul float %58, %103 ; [#uses=1]
- %114 = fmul float %49, %106 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %40, %110 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %59, %103 ; [#uses=1]
- %119 = fmul float %50, %106 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %41, %110 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %122, float* %123, align 8
- %124 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %117, float* %124, align 4
- %125 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %112, float* %125, align 8
- %126 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %126, align 4
- %127 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %101, float* %127, align 8
- %128 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %96, float* %128, align 4
- %129 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %91, float* %129, align 8
- %130 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 4
- %131 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %80, float* %131, align 8
- %132 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %75, float* %132, align 4
- %133 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %70, float* %133, align 8
- %134 = getelementptr inbounds %struct.btMatrix3x3* %dmat, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %dmat, %struct.btQuaternion* %dorn) nounwind
- %135 = getelementptr inbounds %struct.btQuaternion* %dorn, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %136 = load float* %135, align 8 ; [#uses=3]
- %137 = fmul float %136, %136 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btQuaternion* %dorn, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %139 = load float* %138, align 4 ; [#uses=3]
- %140 = fmul float %139, %139 ; [#uses=1]
- %141 = fadd float %137, %140 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btQuaternion* %dorn, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %143 = load float* %142, align 8 ; [#uses=3]
- %144 = fmul float %143, %143 ; [#uses=1]
- %145 = fadd float %141, %144 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btQuaternion* %dorn, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %147 = load float* %146, align 4 ; [#uses=3]
- %148 = fmul float %147, %147 ; [#uses=1]
- %149 = fadd float %145, %148 ; [#uses=1]
- %150 = call float @sqrtf(float %149) nounwind readonly ; [#uses=1]
- %151 = fdiv float 1.000000e+00, %150 ; [#uses=4]
- %152 = fmul float %136, %151 ; [#uses=5]
- store float %152, float* %135, align 8
- %153 = fmul float %139, %151 ; [#uses=5]
- store float %153, float* %138, align 4
- %154 = fmul float %143, %151 ; [#uses=5]
- store float %154, float* %142, align 8
- %155 = fmul float %147, %151 ; [#uses=3]
- store float %155, float* %146, align 4
- %156 = fcmp olt float %155, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i = select i1 %156, float -1.000000e+00, float %155 ; [#uses=2]
- %157 = fcmp ogt float %x_addr.0.i.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i = select i1 %157, float 1.000000e+00, float %x_addr.0.i.i ; [#uses=1]
- %158 = call float @acosf(float %x_addr.1.i.i) nounwind readonly ; [#uses=1]
- %159 = fmul float %158, 2.000000e+00 ; [#uses=1]
- store float %159, float* %angle, align 4
- %160 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %152, float* %160, align 4
- %161 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %153, float* %161, align 4
- %162 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %154, float* %162, align 4
- %163 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %163, align 4
- %164 = fmul float %152, %152 ; [#uses=1]
- %165 = fmul float %153, %153 ; [#uses=1]
- %166 = fadd float %164, %165 ; [#uses=1]
- %167 = fmul float %154, %154 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=2]
- %169 = fcmp olt float %168, 0x3D10000000000000 ; [#uses=1]
- br i1 %169, label %bb, label %bb1
-
-bb: ; preds = %entry
- store float 1.000000e+00, float* %160, align 4
- store float 0.000000e+00, float* %161, align 4
- store float 0.000000e+00, float* %162, align 4
- store float 0.000000e+00, float* %163, align 4
- ret void
-
-bb1: ; preds = %entry
- %170 = call float @sqrtf(float %168) nounwind readonly ; [#uses=1]
- %171 = fdiv float 1.000000e+00, %170 ; [#uses=3]
- %172 = fmul float %152, %171 ; [#uses=1]
- store float %172, float* %160, align 4
- %173 = fmul float %153, %171 ; [#uses=1]
- store float %173, float* %161, align 4
- %174 = fmul float %154, %171 ; [#uses=1]
- store float %174, float* %162, align 4
- ret void
-}
-
-; [#uses=4]
-define void @_ZNK16btCollisionWorld15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RNS_20ConvexResultCallbackEf(%struct.btCollisionWorld* %this, %struct.btConvexShape* %castShape, %struct.btTransform* nocapture %convexFromWorld, %struct.btTransform* nocapture %convexToWorld, %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, float %allowedCcdPenetration) align 2 {
-invcont:
- %axis.i = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %angle.i = alloca float, align 4 ; [#uses=2]
- %0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %convexFromTrans = alloca %struct.btTransform, align 8 ; [#uses=19]
- %convexToTrans = alloca %struct.btTransform, align 8 ; [#uses=18]
- %castShapeAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %castShapeAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %convexCB = alloca %struct.btSingleSweepCallback, align 8 ; [#uses=4]
- %angVel = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %zeroLinVel = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %R = alloca %struct.btTransform, align 8 ; [#uses=17]
- call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([16 x i8]* @.str315, i32 0, i32 0))
- %1 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 8
- %4 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 8
- %10 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 8
- %16 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 8
- %22 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 8
- %28 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 8
- %34 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 8
- %40 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 8
- %46 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 8
- %52 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 8
- %58 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 8
- %64 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 8
- %70 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 8
- %76 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 8
- %82 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 8
- %88 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 8
- %94 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- call void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btQuadWord* %axis.i, float* %angle.i) nounwind
- %97 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 8 ; [#uses=1]
- %99 = load float* %angle.i, align 4 ; [#uses=3]
- %100 = fmul float %98, %99 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fmul float %102, %99 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 8 ; [#uses=1]
- %106 = fmul float %105, %99 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %106, float* %107, align 8
- %108 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %103, float* %108, align 4
- %109 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %109, align 8
- %110 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %110, align 4
- %111 = getelementptr inbounds %struct.btQuadWord* %zeroLinVel, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 8
- %112 = getelementptr inbounds %struct.btQuadWord* %zeroLinVel, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %112, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %zeroLinVel, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 8
- %114 = getelementptr inbounds %struct.btQuadWord* %zeroLinVel, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %114, align 4
- %115 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 1.000000e+00, float* %115, align 8
- %116 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %116, align 4
- %117 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %117, align 8
- %118 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %118, align 4
- %119 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %119, align 8
- %120 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 1.000000e+00, float* %120, align 4
- %121 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %121, align 8
- %122 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %122, align 4
- %123 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %123, align 8
- %124 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %124, align 4
- %125 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float 1.000000e+00, float* %125, align 8
- %126 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %126, align 4
- %127 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %127, align 8
- %128 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %128, align 4
- %129 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %129, align 8
- %130 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 4
- %131 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %131, %struct.btQuaternion* %0) nounwind
- %132 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %133 = load float* %132, align 8 ; [#uses=6]
- %134 = fmul float %133, %133 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=5]
- %137 = fmul float %136, %136 ; [#uses=1]
- %138 = fadd float %134, %137 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %140 = load float* %139, align 8 ; [#uses=4]
- %141 = fmul float %140, %140 ; [#uses=1]
- %142 = fadd float %138, %141 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=5]
- %145 = fmul float %144, %144 ; [#uses=1]
- %146 = fadd float %142, %145 ; [#uses=1]
- %147 = fdiv float 2.000000e+00, %146 ; [#uses=3]
- %148 = fmul float %133, %147 ; [#uses=2]
- %149 = fmul float %136, %147 ; [#uses=3]
- %150 = fmul float %140, %147 ; [#uses=4]
- %151 = fmul float %144, %148 ; [#uses=2]
- %152 = fmul float %144, %149 ; [#uses=2]
- %153 = fmul float %144, %150 ; [#uses=2]
- %154 = fmul float %133, %148 ; [#uses=2]
- %155 = fmul float %133, %149 ; [#uses=2]
- %156 = fmul float %133, %150 ; [#uses=2]
- %157 = fmul float %136, %149 ; [#uses=2]
- %158 = fmul float %136, %150 ; [#uses=2]
- %159 = fmul float %140, %150 ; [#uses=2]
- %160 = fadd float %154, %157 ; [#uses=1]
- %161 = fsub float 1.000000e+00, %160 ; [#uses=1]
- %162 = fadd float %158, %151 ; [#uses=1]
- %163 = fsub float %156, %152 ; [#uses=1]
- %164 = fsub float %158, %151 ; [#uses=1]
- %165 = fadd float %154, %159 ; [#uses=1]
- %166 = fsub float 1.000000e+00, %165 ; [#uses=1]
- %167 = fadd float %155, %153 ; [#uses=1]
- %168 = fadd float %156, %152 ; [#uses=1]
- %169 = fsub float %155, %153 ; [#uses=1]
- %170 = fadd float %157, %159 ; [#uses=1]
- %171 = fsub float 1.000000e+00, %170 ; [#uses=1]
- store float %171, float* %115, align 8
- store float %169, float* %116, align 4
- store float %168, float* %117, align 8
- store float 0.000000e+00, float* %118, align 4
- store float %167, float* %119, align 8
- store float %166, float* %120, align 4
- store float %164, float* %121, align 8
- store float 0.000000e+00, float* %122, align 4
- store float %163, float* %123, align 8
- store float %162, float* %124, align 4
- store float %161, float* %125, align 8
- store float 0.000000e+00, float* %126, align 4
- %172 = getelementptr inbounds %struct.btConvexShape* %castShape, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK16btCollisionShape21calculateTemporalAabbERK11btTransformRK9btVector3S5_fRS3_S6_(%struct.btCollisionShape* %172, %struct.btTransform* %R, %struct.btQuadWord* %zeroLinVel, %struct.btQuadWord* %angVel, float 1.000000e+00, %struct.btQuadWord* %castShapeAabbMin, %struct.btQuadWord* %castShapeAabbMax)
- to label %invcont1 unwind label %lpad
-
-invcont1: ; preds = %invcont
- call void @_ZN21btSingleSweepCallbackC2EPK13btConvexShapeRK11btTransformS5_PK16btCollisionWorldRNS6_20ConvexResultCallbackEf(%struct.btSingleSweepCallback* %convexCB, %struct.btConvexShape* %castShape, %struct.btTransform* %convexFromWorld, %struct.btTransform* %convexToWorld, %struct.btCollisionWorld* %this, %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, float %allowedCcdPenetration) nounwind
- %173 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=1]
- %174 = load %struct.btActionInterface** %173, align 4 ; [#uses=2]
- %175 = getelementptr inbounds %struct.btActionInterface* %174, i32 0, i32 0 ; [#uses=1]
- %176 = load i32 (...)*** %175, align 4 ; [#uses=1]
- %177 = getelementptr inbounds i32 (...)** %176, i32 6 ; [#uses=1]
- %178 = load i32 (...)** %177, align 4 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1 ; [#uses=1]
- %181 = bitcast i32 (...)* %178 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btBroadphaseRayCallback*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %182 = getelementptr inbounds %struct.btSingleSweepCallback* %convexCB, i32 0, i32 0 ; [#uses=1]
- invoke void %181(%struct.btActionInterface* %174, %struct.btQuadWord* %180, %struct.btQuadWord* %179, %struct.btBroadphaseRayCallback* %182, %struct.btQuadWord* %castShapeAabbMin, %struct.btQuadWord* %castShapeAabbMax)
- to label %bb3 unwind label %lpad11
-
-bb3: ; preds = %invcont1
- %183 = getelementptr inbounds %struct.btSingleSweepCallback* %convexCB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21btSingleSweepCallback, i32 0, i32 2), i32 (...)*** %183, align 8
- call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-invcont7: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-lpad: ; preds = %invcont
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad11: ; preds = %invcont1
- %eh_ptr12 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select14 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %184 = getelementptr inbounds %struct.btSingleSweepCallback* %convexCB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21btSingleSweepCallback, i32 0, i32 2), i32 (...)*** %184, align 8
- br label %ppad
-
-lpad15: ; preds = %ppad
- %eh_ptr16 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select18 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr16, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad11, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr12, %lpad11 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont7 unwind label %lpad15
-}
-
-; [#uses=3]
-define void @_ZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEf(%struct.btConvexShape* %castShape, %struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btCollisionObject* %collisionObject, %struct.btCollisionShape* %collisionShape, %struct.btTransform* %colObjWorldTransform, %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, float %allowedPenetration) align 2 {
-entry:
- %castResult = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=13]
- %simplexSolver = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %gjkEpaPenetrationSolver = alloca %struct..0btMultiSapOverlapFilterCallback, align 8 ; [#uses=2]
- %convexCaster1 = alloca %struct.btContinuousConvexCollision, align 8 ; [#uses=3]
- %localConvexResult = alloca %"struct.btCollisionWorld::LocalConvexResult", align 8 ; [#uses=12]
- %convexFromLocal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %convexToLocal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rotationXform = alloca %struct.btTransform, align 8 ; [#uses=17]
- %tccb = alloca %struct..3BridgeTriangleConvexcastCallback, align 8 ; [#uses=8]
- %boxMinLocal = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %boxMaxLocal = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %rotationXform34 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %tccb35 = alloca %struct..4BridgeTriangleConvexcastCallback, align 8 ; [#uses=8]
- %boxMinLocal36 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %boxMaxLocal37 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %rayAabbMinLocal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rayAabbMaxLocal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %childWorldTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %my_cb = alloca %struct..5LocalInfoAdder, align 8 ; [#uses=7]
- %0 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=4]
- %2 = icmp slt i32 %1, 20 ; [#uses=1]
- br i1 %2, label %bb, label %bb17
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %3, align 8
- %4 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 5 ; [#uses=2]
- %5 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %5, align 8
- %6 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 7 ; [#uses=1]
- store float %allowedPenetration, float* %6, align 4
- %7 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %4, align 4
- %9 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btConvexShape* ; [#uses=1]
- %10 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %10, align 4
- %11 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 10, i32 1, i32 0 ; [#uses=1]
- store i8 0, i8* %11, align 4
- %12 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %gjkEpaPenetrationSolver, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %12, align 8
- %13 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %gjkEpaPenetrationSolver, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN27btContinuousConvexCollisionC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btContinuousConvexCollision* %convexCaster1, %struct.btConvexShape* %castShape, %struct.btConvexShape* %9, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %13)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %14 = getelementptr inbounds %struct.btContinuousConvexCollision* %convexCaster1, i32 0, i32 0 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btContinuousConvexCollision* %convexCaster1, i32 0, i32 0, i32 0 ; [#uses=3]
- %16 = load i32 (...)*** %15, align 8 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 2 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to i8 (%struct.btActionInterface*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %struct.btTransform*, %"struct.btConvexCast::CastResult"*)* ; [#uses=1]
- %20 = invoke zeroext i8 %19(%struct.btActionInterface* %14, %struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btTransform* %colObjWorldTransform, %struct.btTransform* %colObjWorldTransform, %"struct.btConvexCast::CastResult"* %castResult)
- to label %invcont1 unwind label %lpad71 ; [#uses=1]
-
-invcont1: ; preds = %invcont
- %toBool2 = icmp eq i8 %20, 0 ; [#uses=1]
- br i1 %toBool2, label %bb11, label %bb3
-
-bb3: ; preds = %invcont1
- %21 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=3]
- %23 = fmul float %22, %22 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = fmul float %25, %25 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %29 = load float* %28, align 4 ; [#uses=3]
- %30 = fmul float %29, %29 ; [#uses=1]
- %31 = fadd float %27, %30 ; [#uses=2]
- %32 = fcmp ogt float %31, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %32, label %bb5, label %bb11
-
-bb5: ; preds = %bb3
- %33 = load float* %4, align 4 ; [#uses=2]
- %34 = load float* %7, align 4 ; [#uses=1]
- %35 = fcmp olt float %33, %34 ; [#uses=1]
- br i1 %35, label %bb6, label %bb11
-
-bb6: ; preds = %bb5
- %36 = call float @sqrtf(float %31) nounwind readonly ; [#uses=1]
- %37 = fdiv float 1.000000e+00, %36 ; [#uses=3]
- %38 = fmul float %22, %37 ; [#uses=2]
- store float %38, float* %21, align 4
- %39 = fmul float %25, %37 ; [#uses=2]
- store float %39, float* %24, align 4
- %40 = fmul float %29, %37 ; [#uses=2]
- store float %40, float* %28, align 4
- %41 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 0 ; [#uses=1]
- store %struct.btCollisionObject* %collisionObject, %struct.btCollisionObject** %41, align 8
- %42 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 1 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %42, align 4
- %43 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %38, float* %43, align 8
- %44 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %39, float* %44, align 4
- %45 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %40, float* %45, align 8
- %46 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %47 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 8
- %52 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %53 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 8
- %58 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %59 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i32 0, i32 4 ; [#uses=1]
- store float %33, float* %61, align 8
- %62 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, i32 0, i32 0 ; [#uses=1]
- %63 = load i32 (...)*** %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds i32 (...)** %63, i32 3 ; [#uses=1]
- %65 = load i32 (...)** %64, align 4 ; [#uses=1]
- %66 = bitcast i32 (...)* %65 to float (%"struct.btCollisionWorld::ConvexResultCallback"*, %"struct.btCollisionWorld::LocalConvexResult"*, i8)* ; [#uses=1]
- %67 = invoke float %66(%"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, %"struct.btCollisionWorld::LocalConvexResult"* %localConvexResult, i8 zeroext 1)
- to label %bb11 unwind label %lpad71 ; [#uses=0]
-
-bb11: ; preds = %bb6, %bb5, %bb3, %invcont1
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %15, align 8
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %14)
- to label %bb16 unwind label %lpad
-
-bb16: ; preds = %bb48, %bb11
- ret void
-
-bb17: ; preds = %entry
- %68 = add i32 %1, -21 ; [#uses=1]
- %69 = icmp ult i32 %68, 9 ; [#uses=1]
- br i1 %69, label %bb19, label %bb48
-
-bb19: ; preds = %bb17
- %70 = icmp eq i32 %1, 21 ; [#uses=1]
- br i1 %70, label %bb21, label %bb30
-
-bb21: ; preds = %bb19
- %71 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=6]
- %81 = load float* %78, align 4 ; [#uses=6]
- %82 = load float* %77, align 4 ; [#uses=6]
- %83 = load float* %76, align 4 ; [#uses=6]
- %84 = load float* %75, align 4 ; [#uses=6]
- %85 = load float* %74, align 4 ; [#uses=6]
- %86 = load float* %73, align 4 ; [#uses=6]
- %87 = load float* %72, align 4 ; [#uses=6]
- %88 = load float* %71, align 4 ; [#uses=6]
- %89 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = fsub float -0.000000e+00, %90 ; [#uses=3]
- %92 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = fsub float -0.000000e+00, %93 ; [#uses=3]
- %95 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = fsub float -0.000000e+00, %96 ; [#uses=3]
- %98 = fmul float %86, %97 ; [#uses=1]
- %99 = fmul float %87, %94 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %88, %91 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=2]
- %103 = fmul float %83, %97 ; [#uses=1]
- %104 = fmul float %84, %94 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %85, %91 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=2]
- %108 = fmul float %80, %97 ; [#uses=1]
- %109 = fmul float %81, %94 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %82, %91 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=2]
- %113 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=3]
- %115 = fmul float %86, %114 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=3]
- %118 = fmul float %87, %117 ; [#uses=1]
- %119 = fadd float %115, %118 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=3]
- %122 = fmul float %88, %121 ; [#uses=1]
- %123 = fadd float %119, %122 ; [#uses=1]
- %124 = fadd float %123, %102 ; [#uses=1]
- %125 = fmul float %83, %114 ; [#uses=1]
- %126 = fmul float %84, %117 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = fmul float %85, %121 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=1]
- %130 = fadd float %129, %107 ; [#uses=1]
- %131 = fmul float %80, %114 ; [#uses=1]
- %132 = fmul float %81, %117 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %82, %121 ; [#uses=1]
- %135 = fadd float %133, %134 ; [#uses=1]
- %136 = fadd float %135, %112 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btQuadWord* %convexFromLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %136, float* %137, align 8
- %138 = getelementptr inbounds %struct.btQuadWord* %convexFromLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %130, float* %138, align 4
- %139 = getelementptr inbounds %struct.btQuadWord* %convexFromLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %124, float* %139, align 8
- %140 = getelementptr inbounds %struct.btQuadWord* %convexFromLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %140, align 4
- %141 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=3]
- %143 = fmul float %86, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=3]
- %146 = fmul float %87, %145 ; [#uses=1]
- %147 = fadd float %143, %146 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=3]
- %150 = fmul float %88, %149 ; [#uses=1]
- %151 = fadd float %147, %150 ; [#uses=1]
- %152 = fadd float %151, %102 ; [#uses=1]
- %153 = fmul float %83, %142 ; [#uses=1]
- %154 = fmul float %84, %145 ; [#uses=1]
- %155 = fadd float %153, %154 ; [#uses=1]
- %156 = fmul float %85, %149 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fadd float %157, %107 ; [#uses=1]
- %159 = fmul float %80, %142 ; [#uses=1]
- %160 = fmul float %81, %145 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=1]
- %162 = fmul float %82, %149 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fadd float %163, %112 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btQuadWord* %convexToLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %164, float* %165, align 8
- %166 = getelementptr inbounds %struct.btQuadWord* %convexToLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %158, float* %166, align 4
- %167 = getelementptr inbounds %struct.btQuadWord* %convexToLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %152, float* %167, align 8
- %168 = getelementptr inbounds %struct.btQuadWord* %convexToLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %168, align 4
- %169 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %170 = load float* %169, align 4 ; [#uses=3]
- %171 = fmul float %170, %86 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=3]
- %174 = fmul float %173, %87 ; [#uses=1]
- %175 = fadd float %171, %174 ; [#uses=1]
- %176 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=3]
- %178 = fmul float %177, %88 ; [#uses=1]
- %179 = fadd float %175, %178 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %181 = load float* %180, align 4 ; [#uses=3]
- %182 = fmul float %181, %86 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=3]
- %185 = fmul float %184, %87 ; [#uses=1]
- %186 = fadd float %182, %185 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %188 = load float* %187, align 4 ; [#uses=3]
- %189 = fmul float %188, %88 ; [#uses=1]
- %190 = fadd float %186, %189 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=3]
- %193 = fmul float %192, %86 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=3]
- %196 = fmul float %195, %87 ; [#uses=1]
- %197 = fadd float %193, %196 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %199 = load float* %198, align 4 ; [#uses=3]
- %200 = fmul float %199, %88 ; [#uses=1]
- %201 = fadd float %197, %200 ; [#uses=1]
- %202 = fmul float %170, %83 ; [#uses=1]
- %203 = fmul float %173, %84 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=1]
- %205 = fmul float %177, %85 ; [#uses=1]
- %206 = fadd float %204, %205 ; [#uses=1]
- %207 = fmul float %181, %83 ; [#uses=1]
- %208 = fmul float %184, %84 ; [#uses=1]
- %209 = fadd float %207, %208 ; [#uses=1]
- %210 = fmul float %188, %85 ; [#uses=1]
- %211 = fadd float %209, %210 ; [#uses=1]
- %212 = fmul float %192, %83 ; [#uses=1]
- %213 = fmul float %195, %84 ; [#uses=1]
- %214 = fadd float %212, %213 ; [#uses=1]
- %215 = fmul float %199, %85 ; [#uses=1]
- %216 = fadd float %214, %215 ; [#uses=1]
- %217 = fmul float %170, %80 ; [#uses=1]
- %218 = fmul float %173, %81 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=1]
- %220 = fmul float %177, %82 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=1]
- %222 = fmul float %181, %80 ; [#uses=1]
- %223 = fmul float %184, %81 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=1]
- %225 = fmul float %188, %82 ; [#uses=1]
- %226 = fadd float %224, %225 ; [#uses=1]
- %227 = fmul float %192, %80 ; [#uses=1]
- %228 = fmul float %195, %81 ; [#uses=1]
- %229 = fadd float %227, %228 ; [#uses=1]
- %230 = fmul float %199, %82 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %231, float* %232, align 8
- %233 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %226, float* %233, align 4
- %234 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %221, float* %234, align 8
- %235 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %235, align 4
- %236 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %216, float* %236, align 8
- %237 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %211, float* %237, align 4
- %238 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %206, float* %238, align 8
- %239 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %239, align 4
- %240 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %201, float* %240, align 8
- %241 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %190, float* %241, align 4
- %242 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %179, float* %242, align 8
- %243 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %243, align 4
- %244 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %244, align 8
- %245 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %245, align 4
- %246 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %246, align 8
- %247 = getelementptr inbounds %struct.btTransform* %rotationXform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %247, align 4
- %248 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btTriangleMeshShape* ; [#uses=1]
- %249 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 0, i32 0 ; [#uses=1]
- %250 = load i32 (...)*** %249, align 4 ; [#uses=1]
- %251 = getelementptr inbounds i32 (...)** %250, i32 11 ; [#uses=1]
- %252 = load i32 (...)** %251, align 4 ; [#uses=1]
- %253 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btConcaveShape* ; [#uses=1]
- %254 = bitcast i32 (...)* %252 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %255 = call float %254(%struct.btConcaveShape* %253) ; [#uses=1]
- %256 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 0 ; [#uses=1]
- call void @_ZN28btTriangleConvexcastCallbackC2EPK13btConvexShapeRK11btTransformS5_S5_f(%struct.btTriangleConvexcastCallback* %256, %struct.btConvexShape* %castShape, %struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btTransform* %colObjWorldTransform, float %255)
- %257 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %257, align 8
- %258 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 1 ; [#uses=1]
- store %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, %"struct.btCollisionWorld::ConvexResultCallback"** %258, align 8
- %259 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %collisionObject, %struct.btCollisionObject** %259, align 4
- %260 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 3 ; [#uses=1]
- store %struct.btTriangleMeshShape* %248, %struct.btTriangleMeshShape** %260, align 8
- %261 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=1]
- %262 = load float* %261, align 4 ; [#uses=1]
- %263 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 0, i32 5 ; [#uses=1]
- store float %262, float* %263, align 8
- %264 = getelementptr inbounds %struct.btConvexShape* %castShape, i32 0, i32 0, i32 0 ; [#uses=1]
- %265 = load i32 (...)*** %264, align 4 ; [#uses=1]
- %266 = getelementptr inbounds i32 (...)** %265, i32 2 ; [#uses=1]
- %267 = load i32 (...)** %266, align 4 ; [#uses=1]
- %268 = bitcast i32 (...)* %267 to void (%struct.btConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %268(%struct.btConvexShape* %castShape, %struct.btTransform* %rotationXform, %struct.btQuadWord* %boxMinLocal, %struct.btQuadWord* %boxMaxLocal)
- to label %invcont22 unwind label %lpad79
-
-invcont22: ; preds = %bb21
- %269 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btBvhTriangleMeshShape* ; [#uses=1]
- %270 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_(%struct.btBvhTriangleMeshShape* %269, %struct.btActionInterface* %270, %struct.btQuadWord* %convexFromLocal, %struct.btQuadWord* %convexToLocal, %struct.btQuadWord* %boxMinLocal, %struct.btQuadWord* %boxMaxLocal)
- to label %bb29 unwind label %lpad79
-
-bb29: ; preds = %invcont22
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %257, align 8
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %270)
- ret void
-
-bb30: ; preds = %bb19
- %271 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btConcaveShape* ; [#uses=3]
- %272 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %273 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %274 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %276 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %277 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %278 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %279 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %280 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %281 = load float* %280, align 4 ; [#uses=6]
- %282 = load float* %279, align 4 ; [#uses=6]
- %283 = load float* %278, align 4 ; [#uses=6]
- %284 = load float* %277, align 4 ; [#uses=6]
- %285 = load float* %276, align 4 ; [#uses=6]
- %286 = load float* %275, align 4 ; [#uses=6]
- %287 = load float* %274, align 4 ; [#uses=6]
- %288 = load float* %273, align 4 ; [#uses=6]
- %289 = load float* %272, align 4 ; [#uses=6]
- %290 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %291 = load float* %290, align 4 ; [#uses=1]
- %292 = fsub float -0.000000e+00, %291 ; [#uses=3]
- %293 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %294 = load float* %293, align 4 ; [#uses=1]
- %295 = fsub float -0.000000e+00, %294 ; [#uses=3]
- %296 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %297 = load float* %296, align 4 ; [#uses=1]
- %298 = fsub float -0.000000e+00, %297 ; [#uses=3]
- %299 = fmul float %287, %298 ; [#uses=1]
- %300 = fmul float %288, %295 ; [#uses=1]
- %301 = fadd float %299, %300 ; [#uses=1]
- %302 = fmul float %289, %292 ; [#uses=1]
- %303 = fadd float %301, %302 ; [#uses=2]
- %304 = fmul float %284, %298 ; [#uses=1]
- %305 = fmul float %285, %295 ; [#uses=1]
- %306 = fadd float %304, %305 ; [#uses=1]
- %307 = fmul float %286, %292 ; [#uses=1]
- %308 = fadd float %306, %307 ; [#uses=2]
- %309 = fmul float %281, %298 ; [#uses=1]
- %310 = fmul float %282, %295 ; [#uses=1]
- %311 = fadd float %309, %310 ; [#uses=1]
- %312 = fmul float %283, %292 ; [#uses=1]
- %313 = fadd float %311, %312 ; [#uses=2]
- %314 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %315 = load float* %314, align 4 ; [#uses=3]
- %316 = fmul float %287, %315 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %318 = load float* %317, align 4 ; [#uses=3]
- %319 = fmul float %288, %318 ; [#uses=1]
- %320 = fadd float %316, %319 ; [#uses=1]
- %321 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %322 = load float* %321, align 4 ; [#uses=3]
- %323 = fmul float %289, %322 ; [#uses=1]
- %324 = fadd float %320, %323 ; [#uses=1]
- %325 = fadd float %324, %303 ; [#uses=6]
- %326 = fmul float %284, %315 ; [#uses=1]
- %327 = fmul float %285, %318 ; [#uses=1]
- %328 = fadd float %326, %327 ; [#uses=1]
- %329 = fmul float %286, %322 ; [#uses=1]
- %330 = fadd float %328, %329 ; [#uses=1]
- %331 = fadd float %330, %308 ; [#uses=6]
- %332 = fmul float %281, %315 ; [#uses=1]
- %333 = fmul float %282, %318 ; [#uses=1]
- %334 = fadd float %332, %333 ; [#uses=1]
- %335 = fmul float %283, %322 ; [#uses=1]
- %336 = fadd float %334, %335 ; [#uses=1]
- %337 = fadd float %336, %313 ; [#uses=6]
- %338 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=3]
- %340 = fmul float %287, %339 ; [#uses=1]
- %341 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %342 = load float* %341, align 4 ; [#uses=3]
- %343 = fmul float %288, %342 ; [#uses=1]
- %344 = fadd float %340, %343 ; [#uses=1]
- %345 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %346 = load float* %345, align 4 ; [#uses=3]
- %347 = fmul float %289, %346 ; [#uses=1]
- %348 = fadd float %344, %347 ; [#uses=1]
- %349 = fadd float %348, %303 ; [#uses=6]
- %350 = fmul float %284, %339 ; [#uses=1]
- %351 = fmul float %285, %342 ; [#uses=1]
- %352 = fadd float %350, %351 ; [#uses=1]
- %353 = fmul float %286, %346 ; [#uses=1]
- %354 = fadd float %352, %353 ; [#uses=1]
- %355 = fadd float %354, %308 ; [#uses=6]
- %356 = fmul float %281, %339 ; [#uses=1]
- %357 = fmul float %282, %342 ; [#uses=1]
- %358 = fadd float %356, %357 ; [#uses=1]
- %359 = fmul float %283, %346 ; [#uses=1]
- %360 = fadd float %358, %359 ; [#uses=1]
- %361 = fadd float %360, %313 ; [#uses=6]
- %362 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %363 = load float* %362, align 4 ; [#uses=3]
- %364 = fmul float %363, %287 ; [#uses=1]
- %365 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %366 = load float* %365, align 4 ; [#uses=3]
- %367 = fmul float %366, %288 ; [#uses=1]
- %368 = fadd float %364, %367 ; [#uses=1]
- %369 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %370 = load float* %369, align 4 ; [#uses=3]
- %371 = fmul float %370, %289 ; [#uses=1]
- %372 = fadd float %368, %371 ; [#uses=1]
- %373 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %374 = load float* %373, align 4 ; [#uses=3]
- %375 = fmul float %374, %287 ; [#uses=1]
- %376 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %377 = load float* %376, align 4 ; [#uses=3]
- %378 = fmul float %377, %288 ; [#uses=1]
- %379 = fadd float %375, %378 ; [#uses=1]
- %380 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %381 = load float* %380, align 4 ; [#uses=3]
- %382 = fmul float %381, %289 ; [#uses=1]
- %383 = fadd float %379, %382 ; [#uses=1]
- %384 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %385 = load float* %384, align 4 ; [#uses=3]
- %386 = fmul float %385, %287 ; [#uses=1]
- %387 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %388 = load float* %387, align 4 ; [#uses=3]
- %389 = fmul float %388, %288 ; [#uses=1]
- %390 = fadd float %386, %389 ; [#uses=1]
- %391 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %392 = load float* %391, align 4 ; [#uses=3]
- %393 = fmul float %392, %289 ; [#uses=1]
- %394 = fadd float %390, %393 ; [#uses=1]
- %395 = fmul float %363, %284 ; [#uses=1]
- %396 = fmul float %366, %285 ; [#uses=1]
- %397 = fadd float %395, %396 ; [#uses=1]
- %398 = fmul float %370, %286 ; [#uses=1]
- %399 = fadd float %397, %398 ; [#uses=1]
- %400 = fmul float %374, %284 ; [#uses=1]
- %401 = fmul float %377, %285 ; [#uses=1]
- %402 = fadd float %400, %401 ; [#uses=1]
- %403 = fmul float %381, %286 ; [#uses=1]
- %404 = fadd float %402, %403 ; [#uses=1]
- %405 = fmul float %385, %284 ; [#uses=1]
- %406 = fmul float %388, %285 ; [#uses=1]
- %407 = fadd float %405, %406 ; [#uses=1]
- %408 = fmul float %392, %286 ; [#uses=1]
- %409 = fadd float %407, %408 ; [#uses=1]
- %410 = fmul float %363, %281 ; [#uses=1]
- %411 = fmul float %366, %282 ; [#uses=1]
- %412 = fadd float %410, %411 ; [#uses=1]
- %413 = fmul float %370, %283 ; [#uses=1]
- %414 = fadd float %412, %413 ; [#uses=1]
- %415 = fmul float %374, %281 ; [#uses=1]
- %416 = fmul float %377, %282 ; [#uses=1]
- %417 = fadd float %415, %416 ; [#uses=1]
- %418 = fmul float %381, %283 ; [#uses=1]
- %419 = fadd float %417, %418 ; [#uses=1]
- %420 = fmul float %385, %281 ; [#uses=1]
- %421 = fmul float %388, %282 ; [#uses=1]
- %422 = fadd float %420, %421 ; [#uses=1]
- %423 = fmul float %392, %283 ; [#uses=1]
- %424 = fadd float %422, %423 ; [#uses=1]
- %425 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %424, float* %425, align 8
- %426 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %419, float* %426, align 4
- %427 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %414, float* %427, align 8
- %428 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %428, align 4
- %429 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %409, float* %429, align 8
- %430 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %404, float* %430, align 4
- %431 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %399, float* %431, align 8
- %432 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %432, align 4
- %433 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %394, float* %433, align 8
- %434 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %383, float* %434, align 4
- %435 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %372, float* %435, align 8
- %436 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %436, align 4
- %437 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %437, align 8
- %438 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %438, align 4
- %439 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %439, align 8
- %440 = getelementptr inbounds %struct.btTransform* %rotationXform34, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %440, align 4
- %441 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 0, i32 0 ; [#uses=2]
- %442 = load i32 (...)*** %441, align 4 ; [#uses=1]
- %443 = getelementptr inbounds i32 (...)** %442, i32 11 ; [#uses=1]
- %444 = load i32 (...)** %443, align 4 ; [#uses=1]
- %445 = bitcast i32 (...)* %444 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %446 = call float %445(%struct.btConcaveShape* %271) ; [#uses=1]
- %447 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 0 ; [#uses=1]
- call void @_ZN28btTriangleConvexcastCallbackC2EPK13btConvexShapeRK11btTransformS5_S5_f(%struct.btTriangleConvexcastCallback* %447, %struct.btConvexShape* %castShape, %struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btTransform* %colObjWorldTransform, float %446)
- %448 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE32BridgeTriangleConvexcastCallback_0, i32 0, i32 2), i32 (...)*** %448, align 8
- %449 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 1 ; [#uses=1]
- store %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, %"struct.btCollisionWorld::ConvexResultCallback"** %449, align 8
- %450 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %collisionObject, %struct.btCollisionObject** %450, align 4
- %451 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 3 ; [#uses=1]
- store %struct.btConcaveShape* %271, %struct.btConcaveShape** %451, align 8
- %452 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=1]
- %453 = load float* %452, align 4 ; [#uses=1]
- %454 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 0, i32 5 ; [#uses=1]
- store float %453, float* %454, align 8
- %455 = getelementptr inbounds %struct.btConvexShape* %castShape, i32 0, i32 0, i32 0 ; [#uses=1]
- %456 = load i32 (...)*** %455, align 4 ; [#uses=1]
- %457 = getelementptr inbounds i32 (...)** %456, i32 2 ; [#uses=1]
- %458 = load i32 (...)** %457, align 4 ; [#uses=1]
- %459 = bitcast i32 (...)* %458 to void (%struct.btConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %459(%struct.btConvexShape* %castShape, %struct.btTransform* %rotationXform34, %struct.btQuadWord* %boxMinLocal36, %struct.btQuadWord* %boxMaxLocal37)
- to label %invcont38 unwind label %lpad87
-
-invcont38: ; preds = %bb30
- %460 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %337, float* %460, align 8
- %461 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %331, float* %461, align 4
- %462 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %325, float* %462, align 8
- %463 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %463, align 4
- %464 = fcmp olt float %361, %337 ; [#uses=1]
- br i1 %464, label %bb.i.i120, label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-bb.i.i120: ; preds = %invcont38
- store float %361, float* %460, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i120, %invcont38
- %465 = phi float [ %361, %bb.i.i120 ], [ %337, %invcont38 ] ; [#uses=1]
- %466 = fcmp olt float %355, %331 ; [#uses=1]
- br i1 %466, label %bb.i7.i121, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-bb.i7.i121: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i
- store float %355, float* %461, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i121, %_Z8btSetMinIfEvRT_RKS0_.exit.i
- %467 = phi float [ %355, %bb.i7.i121 ], [ %331, %_Z8btSetMinIfEvRT_RKS0_.exit.i ] ; [#uses=1]
- %468 = fcmp olt float %349, %325 ; [#uses=1]
- br i1 %468, label %bb.i4.i122, label %invcont39
-
-bb.i4.i122: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- store float %349, float* %462, align 8
- br label %invcont39
-
-invcont39: ; preds = %bb.i4.i122, %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- %469 = phi float [ %349, %bb.i4.i122 ], [ %325, %_Z8btSetMinIfEvRT_RKS0_.exit9.i ] ; [#uses=1]
- %470 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %337, float* %470, align 8
- %471 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %331, float* %471, align 4
- %472 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %325, float* %472, align 8
- %473 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %473, align 4
- %474 = fcmp olt float %337, %361 ; [#uses=1]
- br i1 %474, label %bb.i.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-bb.i.i: ; preds = %invcont39
- store float %361, float* %470, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i, %invcont39
- %475 = phi float [ %361, %bb.i.i ], [ %337, %invcont39 ] ; [#uses=1]
- %476 = fcmp olt float %331, %355 ; [#uses=1]
- br i1 %476, label %bb.i7.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-bb.i7.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- store float %355, float* %471, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i, %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- %477 = phi float [ %355, %bb.i7.i ], [ %331, %_Z8btSetMaxIfEvRT_RKS0_.exit.i ] ; [#uses=1]
- %478 = fcmp olt float %325, %349 ; [#uses=1]
- br i1 %478, label %bb.i4.i, label %invcont40
-
-bb.i4.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- store float %349, float* %472, align 8
- br label %invcont40
-
-invcont40: ; preds = %bb.i4.i, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- %479 = phi float [ %349, %bb.i4.i ], [ %325, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i ] ; [#uses=1]
- %480 = getelementptr inbounds %struct.btQuadWord* %boxMinLocal36, i32 0, i32 0, i32 0 ; [#uses=1]
- %481 = load float* %480, align 8 ; [#uses=1]
- %482 = fadd float %465, %481 ; [#uses=1]
- store float %482, float* %460, align 8
- %483 = getelementptr inbounds %struct.btQuadWord* %boxMinLocal36, i32 0, i32 0, i32 1 ; [#uses=1]
- %484 = load float* %483, align 4 ; [#uses=1]
- %485 = fadd float %467, %484 ; [#uses=1]
- store float %485, float* %461, align 4
- %486 = getelementptr inbounds %struct.btQuadWord* %boxMinLocal36, i32 0, i32 0, i32 2 ; [#uses=1]
- %487 = load float* %486, align 8 ; [#uses=1]
- %488 = fadd float %469, %487 ; [#uses=1]
- store float %488, float* %462, align 8
- %489 = getelementptr inbounds %struct.btQuadWord* %boxMaxLocal37, i32 0, i32 0, i32 0 ; [#uses=1]
- %490 = load float* %489, align 8 ; [#uses=1]
- %491 = fadd float %475, %490 ; [#uses=1]
- store float %491, float* %470, align 8
- %492 = getelementptr inbounds %struct.btQuadWord* %boxMaxLocal37, i32 0, i32 0, i32 1 ; [#uses=1]
- %493 = load float* %492, align 4 ; [#uses=1]
- %494 = fadd float %477, %493 ; [#uses=1]
- store float %494, float* %471, align 4
- %495 = getelementptr inbounds %struct.btQuadWord* %boxMaxLocal37, i32 0, i32 0, i32 2 ; [#uses=1]
- %496 = load float* %495, align 8 ; [#uses=1]
- %497 = fadd float %479, %496 ; [#uses=1]
- store float %497, float* %472, align 8
- %498 = load i32 (...)*** %441, align 4 ; [#uses=1]
- %499 = getelementptr inbounds i32 (...)** %498, i32 15 ; [#uses=1]
- %500 = load i32 (...)** %499, align 4 ; [#uses=1]
- %501 = bitcast i32 (...)* %500 to void (%struct.btConcaveShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %502 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 0, i32 0 ; [#uses=2]
- invoke void %501(%struct.btConcaveShape* %271, %struct.btActionInterface* %502, %struct.btQuadWord* %rayAabbMinLocal, %struct.btQuadWord* %rayAabbMaxLocal)
- to label %bb47 unwind label %lpad87
-
-bb47: ; preds = %invcont40
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %448, align 8
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %502)
- ret void
-
-bb48: ; preds = %bb17
- %503 = icmp eq i32 %1, 31 ; [#uses=1]
- br i1 %503, label %bb50, label %bb16
-
-bb50: ; preds = %bb48
- call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([20 x i8]* @.str7, i32 0, i32 0))
- %504 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 1, i32 1 ; [#uses=1]
- %505 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 2 ; [#uses=1]
- %506 = bitcast %struct.btCollisionShape* %505 to %struct.btCompoundShapeChild** ; [#uses=1]
- %507 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %508 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %509 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %510 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %511 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %512 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %513 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %514 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %515 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %516 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %517 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %518 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %519 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %520 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %521 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %522 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %523 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %524 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %525 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %526 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %527 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %528 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %529 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %530 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %531 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %532 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %533 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %534 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %535 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 9 ; [#uses=3]
- %536 = getelementptr inbounds %struct..5LocalInfoAdder* %my_cb, i32 0, i32 0, i32 0 ; [#uses=3]
- %537 = getelementptr inbounds %struct..5LocalInfoAdder* %my_cb, i32 0, i32 0, i32 1 ; [#uses=1]
- %538 = getelementptr inbounds %struct..5LocalInfoAdder* %my_cb, i32 0, i32 0, i32 2 ; [#uses=1]
- %539 = getelementptr inbounds %struct..5LocalInfoAdder* %my_cb, i32 0, i32 0, i32 3 ; [#uses=1]
- %540 = getelementptr inbounds %struct..5LocalInfoAdder* %my_cb, i32 0, i32 1 ; [#uses=1]
- %541 = getelementptr inbounds %struct..5LocalInfoAdder* %my_cb, i32 0, i32 2 ; [#uses=1]
- %542 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=1]
- %543 = getelementptr inbounds %struct..5LocalInfoAdder* %my_cb, i32 0, i32 0 ; [#uses=1]
- br label %invcont60
-
-invcont54: ; preds = %invcont60
- %544 = load %struct.btCompoundShapeChild** %506, align 4 ; [#uses=13]
- %scevgep178179 = getelementptr inbounds %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %545 = load float* %scevgep178179, align 4 ; [#uses=3]
- %scevgep177 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %546 = load float* %scevgep177, align 4 ; [#uses=3]
- %scevgep176 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %547 = load float* %scevgep176, align 4 ; [#uses=3]
- %scevgep174175 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %548 = load float* %scevgep174175, align 4 ; [#uses=3]
- %scevgep173 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %549 = load float* %scevgep173, align 4 ; [#uses=3]
- %scevgep172 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %550 = load float* %scevgep172, align 4 ; [#uses=3]
- %scevgep170171 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %551 = load float* %scevgep170171, align 4 ; [#uses=3]
- %scevgep169 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %552 = load float* %scevgep169, align 4 ; [#uses=3]
- %scevgep168 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %553 = load float* %scevgep168, align 4 ; [#uses=3]
- %scevgep167 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %554 = load float* %scevgep167, align 4 ; [#uses=3]
- %scevgep166 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %555 = load float* %scevgep166, align 4 ; [#uses=3]
- %scevgep = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %556 = load float* %scevgep, align 4 ; [#uses=3]
- %scevgep180 = getelementptr %struct.btCompoundShapeChild* %544, i32 %636, i32 1 ; [#uses=1]
- %557 = load %struct.btCollisionShape** %scevgep180, align 4 ; [#uses=2]
- %558 = load float* %507, align 4 ; [#uses=4]
- %559 = fmul float %558, %554 ; [#uses=1]
- %560 = load float* %508, align 4 ; [#uses=4]
- %561 = fmul float %560, %555 ; [#uses=1]
- %562 = fadd float %559, %561 ; [#uses=1]
- %563 = load float* %509, align 4 ; [#uses=4]
- %564 = fmul float %563, %556 ; [#uses=1]
- %565 = fadd float %562, %564 ; [#uses=1]
- %566 = load float* %510, align 4 ; [#uses=1]
- %567 = fadd float %565, %566 ; [#uses=1]
- %568 = load float* %511, align 4 ; [#uses=4]
- %569 = fmul float %568, %554 ; [#uses=1]
- %570 = load float* %512, align 4 ; [#uses=4]
- %571 = fmul float %570, %555 ; [#uses=1]
- %572 = fadd float %569, %571 ; [#uses=1]
- %573 = load float* %513, align 4 ; [#uses=4]
- %574 = fmul float %573, %556 ; [#uses=1]
- %575 = fadd float %572, %574 ; [#uses=1]
- %576 = load float* %514, align 4 ; [#uses=1]
- %577 = fadd float %575, %576 ; [#uses=1]
- %578 = load float* %515, align 4 ; [#uses=4]
- %579 = fmul float %578, %554 ; [#uses=1]
- %580 = load float* %516, align 4 ; [#uses=4]
- %581 = fmul float %580, %555 ; [#uses=1]
- %582 = fadd float %579, %581 ; [#uses=1]
- %583 = load float* %517, align 4 ; [#uses=4]
- %584 = fmul float %583, %556 ; [#uses=1]
- %585 = fadd float %582, %584 ; [#uses=1]
- %586 = load float* %518, align 4 ; [#uses=1]
- %587 = fadd float %585, %586 ; [#uses=1]
- %588 = fmul float %547, %558 ; [#uses=1]
- %589 = fmul float %550, %560 ; [#uses=1]
- %590 = fadd float %588, %589 ; [#uses=1]
- %591 = fmul float %553, %563 ; [#uses=1]
- %592 = fadd float %590, %591 ; [#uses=1]
- %593 = fmul float %546, %558 ; [#uses=1]
- %594 = fmul float %549, %560 ; [#uses=1]
- %595 = fadd float %593, %594 ; [#uses=1]
- %596 = fmul float %552, %563 ; [#uses=1]
- %597 = fadd float %595, %596 ; [#uses=1]
- %598 = fmul float %545, %558 ; [#uses=1]
- %599 = fmul float %548, %560 ; [#uses=1]
- %600 = fadd float %598, %599 ; [#uses=1]
- %601 = fmul float %551, %563 ; [#uses=1]
- %602 = fadd float %600, %601 ; [#uses=1]
- %603 = fmul float %547, %568 ; [#uses=1]
- %604 = fmul float %550, %570 ; [#uses=1]
- %605 = fadd float %603, %604 ; [#uses=1]
- %606 = fmul float %553, %573 ; [#uses=1]
- %607 = fadd float %605, %606 ; [#uses=1]
- %608 = fmul float %546, %568 ; [#uses=1]
- %609 = fmul float %549, %570 ; [#uses=1]
- %610 = fadd float %608, %609 ; [#uses=1]
- %611 = fmul float %552, %573 ; [#uses=1]
- %612 = fadd float %610, %611 ; [#uses=1]
- %613 = fmul float %545, %568 ; [#uses=1]
- %614 = fmul float %548, %570 ; [#uses=1]
- %615 = fadd float %613, %614 ; [#uses=1]
- %616 = fmul float %551, %573 ; [#uses=1]
- %617 = fadd float %615, %616 ; [#uses=1]
- %618 = fmul float %547, %578 ; [#uses=1]
- %619 = fmul float %550, %580 ; [#uses=1]
- %620 = fadd float %618, %619 ; [#uses=1]
- %621 = fmul float %553, %583 ; [#uses=1]
- %622 = fadd float %620, %621 ; [#uses=1]
- %623 = fmul float %546, %578 ; [#uses=1]
- %624 = fmul float %549, %580 ; [#uses=1]
- %625 = fadd float %623, %624 ; [#uses=1]
- %626 = fmul float %552, %583 ; [#uses=1]
- %627 = fadd float %625, %626 ; [#uses=1]
- %628 = fmul float %545, %578 ; [#uses=1]
- %629 = fmul float %548, %580 ; [#uses=1]
- %630 = fadd float %628, %629 ; [#uses=1]
- %631 = fmul float %551, %583 ; [#uses=1]
- %632 = fadd float %630, %631 ; [#uses=1]
- store float %632, float* %519, align 8
- store float %627, float* %520, align 4
- store float %622, float* %521, align 8
- store float 0.000000e+00, float* %522, align 4
- store float %617, float* %523, align 8
- store float %612, float* %524, align 4
- store float %607, float* %525, align 8
- store float 0.000000e+00, float* %526, align 4
- store float %602, float* %527, align 8
- store float %597, float* %528, align 4
- store float %592, float* %529, align 8
- store float 0.000000e+00, float* %530, align 4
- store float %587, float* %531, align 8
- store float %577, float* %532, align 4
- store float %567, float* %533, align 8
- store float 0.000000e+00, float* %534, align 4
- %633 = load %struct.btCollisionShape** %535, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %557, %struct.btCollisionShape** %535, align 4
- store i16 1, i16* %538, align 8
- store i16 -1, i16* %539, align 2
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder, i32 0, i32 2), i32 (...)*** %536, align 8
- store %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, %"struct.btCollisionWorld::ConvexResultCallback"** %540, align 4
- store i32 %636, i32* %541, align 8
- %634 = load float* %542, align 4 ; [#uses=1]
- store float %634, float* %537, align 4
- invoke void @_ZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEf(%struct.btConvexShape* %castShape, %struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btCollisionObject* %collisionObject, %struct.btCollisionShape* %557, %struct.btTransform* %childWorldTrans, %"struct.btCollisionWorld::ConvexResultCallback"* %543, float %allowedPenetration)
- to label %invcont55 unwind label %ppad113
-
-invcont55: ; preds = %invcont54
- store %struct.btCollisionShape* %633, %struct.btCollisionShape** %535, align 4
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder, i32 0, i32 2), i32 (...)*** %536, align 8
- %635 = add nsw i32 %636, 1 ; [#uses=1]
- br label %invcont60
-
-invcont60: ; preds = %invcont55, %bb50
- %636 = phi i32 [ 0, %bb50 ], [ %635, %invcont55 ] ; [#uses=16]
- %637 = load i32* %504, align 4 ; [#uses=1]
- %638 = icmp sgt i32 %637, %636 ; [#uses=1]
- br i1 %638, label %invcont54, label %bb67
-
-bb67: ; preds = %invcont60
- call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb11, %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select70 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad71: ; preds = %bb6, %invcont
- %eh_ptr72 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select74 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr72, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %15, align 8
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %14)
- to label %ppad unwind label %lpad75
-
-lpad75: ; preds = %lpad71
- %eh_ptr76 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select78 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr76, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad79: ; preds = %invcont22, %bb21
- %eh_ptr80 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select82 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr80, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %257, align 8
- %639 = getelementptr inbounds %struct..3BridgeTriangleConvexcastCallback* %tccb, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %639)
- to label %Unwind unwind label %lpad83
-
-lpad83: ; preds = %lpad79
- %eh_ptr84 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select86 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr84, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad87: ; preds = %invcont40, %bb30
- %eh_ptr88 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select90 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr88, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %448, align 8
- %640 = getelementptr inbounds %struct..4BridgeTriangleConvexcastCallback* %tccb35, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %640)
- to label %Unwind unwind label %lpad91
-
-lpad91: ; preds = %lpad87
- %eh_ptr92 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select94 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr92, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad103: ; preds = %ppad113
- %eh_ptr104 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select106 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr104, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad71, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr72, %lpad71 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %12, align 8
- br label %Unwind
-
-ppad113: ; preds = %invcont54
- %eh_ptr100 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select102 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr100, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEfE14LocalInfoAdder, i32 0, i32 2), i32 (...)*** %536, align 8
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %Unwind unwind label %lpad103
-
-Unwind: ; preds = %ppad113, %ppad, %lpad87, %lpad79
- %eh_exception.1 = phi i8* [ %eh_exception.0, %ppad ], [ %eh_ptr80, %lpad79 ], [ %eh_ptr88, %lpad87 ], [ %eh_ptr100, %ppad113 ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-}
-
-; [#uses=3]
-define void @_ZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackE(%struct.btTransform* %rayFromTrans, %struct.btTransform* %rayToTrans, %struct.btCollisionObject* %collisionObject, %struct.btCollisionShape* %collisionShape, %struct.btTransform* %colObjWorldTransform, %"struct.btCollisionWorld::RayResultCallback"* %resultCallback) align 2 {
-invcont:
- %pointShape = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=8]
- %castResult = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=9]
- %simplexSolver = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %convexCaster = alloca %struct.btGjkConvexCast, align 8 ; [#uses=6]
- %localRayResult = alloca %"struct.btCollisionWorld::LocalRayResult", align 8 ; [#uses=8]
- %rayFromLocal = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %rayToLocal = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %rcb = alloca %struct..0BridgeTriangleRaycastCallback, align 8 ; [#uses=23]
- %rayFromLocal43 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rayToLocal45 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rcb47 = alloca %struct..1BridgeTriangleRaycastCallback, align 8 ; [#uses=23]
- %rayAabbMinLocal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rayAabbMaxLocal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %childWorldTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %my_cb = alloca %struct..2LocalInfoAdder2, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %2 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 0, i32 1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=4]
- %7 = icmp slt i32 %6, 20 ; [#uses=1]
- br i1 %7, label %invcont1, label %invcont18
-
-invcont1: ; preds = %invcont
- %8 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %9, align 8
- %10 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 5 ; [#uses=2]
- %11 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %11, align 8
- %12 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %15, align 4
- %16 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %17 = load i8* %16, align 4 ; [#uses=1]
- %18 = and i8 %17, -16 ; [#uses=1]
- store i8 %18, i8* %16, align 4
- %19 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btConvexShape* ; [#uses=1]
- invoke void @_ZN22btSubsimplexConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* %convexCaster, %struct.btConvexShape* %8, %struct.btConvexShape* %19, %struct.btVoronoiSimplexSolver* %simplexSolver)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %invcont1
- %20 = invoke zeroext i8 @_ZN22btSubsimplexConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* %convexCaster, %struct.btTransform* %rayFromTrans, %struct.btTransform* %rayToTrans, %struct.btTransform* %colObjWorldTransform, %struct.btTransform* %colObjWorldTransform, %"struct.btConvexCast::CastResult"* %castResult)
- to label %invcont3 unwind label %lpad92 ; [#uses=1]
-
-invcont3: ; preds = %invcont2
- %toBool4 = icmp eq i8 %20, 0 ; [#uses=1]
- br i1 %toBool4, label %bb15, label %bb5
-
-bb5: ; preds = %invcont3
- %21 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=3]
- %22 = load float* %21, align 4 ; [#uses=5]
- %23 = fmul float %22, %22 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=3]
- %25 = load float* %24, align 4 ; [#uses=5]
- %26 = fmul float %25, %25 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=3]
- %29 = load float* %28, align 4 ; [#uses=5]
- %30 = fmul float %29, %29 ; [#uses=1]
- %31 = fadd float %27, %30 ; [#uses=1]
- %32 = fcmp ogt float %31, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %32, label %bb7, label %bb15
-
-bb7: ; preds = %bb5
- %33 = load float* %10, align 4 ; [#uses=2]
- %34 = load float* %13, align 4 ; [#uses=1]
- %35 = fcmp olt float %33, %34 ; [#uses=1]
- br i1 %35, label %bb8, label %bb15
-
-bb8: ; preds = %bb7
- %36 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fmul float %37, %22 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fmul float %40, %25 ; [#uses=1]
- %42 = fadd float %38, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fmul float %44, %29 ; [#uses=1]
- %46 = fadd float %42, %45 ; [#uses=4]
- %47 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fmul float %48, %22 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %51, %25 ; [#uses=1]
- %53 = fadd float %49, %52 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %55, %29 ; [#uses=1]
- %57 = fadd float %53, %56 ; [#uses=4]
- %58 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = fmul float %59, %22 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = fmul float %62, %25 ; [#uses=1]
- %64 = fadd float %60, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fmul float %66, %29 ; [#uses=1]
- %68 = fadd float %64, %67 ; [#uses=4]
- store float %68, float* %21, align 4
- store float %57, float* %24, align 4
- store float %46, float* %28, align 4
- %69 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %69, align 4
- %70 = fmul float %68, %68 ; [#uses=1]
- %71 = fmul float %57, %57 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fmul float %46, %46 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = call float @sqrtf(float %74) nounwind readonly ; [#uses=1]
- %76 = fdiv float 1.000000e+00, %75 ; [#uses=3]
- %77 = fmul float %68, %76 ; [#uses=2]
- store float %77, float* %21, align 4
- %78 = fmul float %57, %76 ; [#uses=2]
- store float %78, float* %24, align 4
- %79 = fmul float %46, %76 ; [#uses=2]
- store float %79, float* %28, align 4
- %80 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i32 0, i32 0 ; [#uses=1]
- store %struct.btCollisionObject* %collisionObject, %struct.btCollisionObject** %80, align 8
- %81 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i32 0, i32 1 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %81, align 4
- %82 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %77, float* %82, align 8
- %83 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %78, float* %83, align 4
- %84 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %79, float* %84, align 8
- %85 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %85, align 4
- %86 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i32 0, i32 3 ; [#uses=1]
- store float %33, float* %86, align 8
- %87 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 0 ; [#uses=1]
- %88 = load i32 (...)*** %87, align 4 ; [#uses=1]
- %89 = getelementptr inbounds i32 (...)** %88, i32 3 ; [#uses=1]
- %90 = load i32 (...)** %89, align 4 ; [#uses=1]
- %91 = bitcast i32 (...)* %90 to float (%"struct.btCollisionWorld::RayResultCallback"*, %"struct.btCollisionWorld::LocalRayResult"*, i8)* ; [#uses=1]
- %92 = invoke float %91(%"struct.btCollisionWorld::RayResultCallback"* %resultCallback, %"struct.btCollisionWorld::LocalRayResult"* %localRayResult, i8 zeroext 1)
- to label %bb15 unwind label %lpad92 ; [#uses=0]
-
-bb15: ; preds = %bb8, %bb7, %bb5, %invcont3
- %93 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %93, align 8
- %94 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %94)
- to label %bb89 unwind label %lpad
-
-invcont18: ; preds = %invcont
- %95 = add i32 %6, -21 ; [#uses=1]
- %96 = icmp ult i32 %95, 9 ; [#uses=1]
- br i1 %96, label %bb20, label %invcont63
-
-bb20: ; preds = %invcont18
- %97 = icmp eq i32 %6, 21 ; [#uses=1]
- br i1 %97, label %invcont28, label %invcont50
-
-invcont28: ; preds = %bb20
- %98 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %99 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %100 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %101 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %102 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %103 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %104 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %105 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %106 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %107 = load float* %106, align 4 ; [#uses=3]
- %108 = load float* %105, align 4 ; [#uses=3]
- %109 = load float* %104, align 4 ; [#uses=3]
- %110 = load float* %103, align 4 ; [#uses=3]
- %111 = load float* %102, align 4 ; [#uses=3]
- %112 = load float* %101, align 4 ; [#uses=3]
- %113 = load float* %100, align 4 ; [#uses=3]
- %114 = load float* %99, align 4 ; [#uses=3]
- %115 = load float* %98, align 4 ; [#uses=3]
- %116 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = fsub float -0.000000e+00, %117 ; [#uses=3]
- %119 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fsub float -0.000000e+00, %120 ; [#uses=3]
- %122 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = fsub float -0.000000e+00, %123 ; [#uses=3]
- %125 = fmul float %113, %124 ; [#uses=1]
- %126 = fmul float %114, %121 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = fmul float %115, %118 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=2]
- %130 = fmul float %110, %124 ; [#uses=1]
- %131 = fmul float %111, %121 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %112, %118 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=2]
- %135 = fmul float %107, %124 ; [#uses=1]
- %136 = fmul float %108, %121 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %109, %118 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=2]
- %140 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=3]
- %142 = fmul float %113, %141 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=3]
- %145 = fmul float %114, %144 ; [#uses=1]
- %146 = fadd float %142, %145 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=3]
- %149 = fmul float %115, %148 ; [#uses=1]
- %150 = fadd float %146, %149 ; [#uses=1]
- %151 = fadd float %150, %129 ; [#uses=1]
- %152 = fmul float %110, %141 ; [#uses=1]
- %153 = fmul float %111, %144 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %112, %148 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- %157 = fadd float %156, %134 ; [#uses=1]
- %158 = fmul float %107, %141 ; [#uses=1]
- %159 = fmul float %108, %144 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=1]
- %161 = fmul float %109, %148 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fadd float %162, %139 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %163, float* %164, align 8
- %165 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %157, float* %165, align 4
- %166 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %151, float* %166, align 8
- %167 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %167, align 4
- %168 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=3]
- %170 = fmul float %113, %169 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %172 = load float* %171, align 4 ; [#uses=3]
- %173 = fmul float %114, %172 ; [#uses=1]
- %174 = fadd float %170, %173 ; [#uses=1]
- %175 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %176 = load float* %175, align 4 ; [#uses=3]
- %177 = fmul float %115, %176 ; [#uses=1]
- %178 = fadd float %174, %177 ; [#uses=1]
- %179 = fadd float %178, %129 ; [#uses=1]
- %180 = fmul float %110, %169 ; [#uses=1]
- %181 = fmul float %111, %172 ; [#uses=1]
- %182 = fadd float %180, %181 ; [#uses=1]
- %183 = fmul float %112, %176 ; [#uses=1]
- %184 = fadd float %182, %183 ; [#uses=1]
- %185 = fadd float %184, %134 ; [#uses=1]
- %186 = fmul float %107, %169 ; [#uses=1]
- %187 = fmul float %108, %172 ; [#uses=1]
- %188 = fadd float %186, %187 ; [#uses=1]
- %189 = fmul float %109, %176 ; [#uses=1]
- %190 = fadd float %188, %189 ; [#uses=1]
- %191 = fadd float %190, %139 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btQuadWord* %rayToLocal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %191, float* %192, align 8
- %193 = getelementptr inbounds %struct.btQuadWord* %rayToLocal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %185, float* %193, align 4
- %194 = getelementptr inbounds %struct.btQuadWord* %rayToLocal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %179, float* %194, align 8
- %195 = getelementptr inbounds %struct.btQuadWord* %rayToLocal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %195, align 4
- %196 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 5 ; [#uses=1]
- %197 = load i32* %196, align 4 ; [#uses=1]
- %198 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN25btTriangleRaycastCallbackC2ERK9btVector3S2_j(%struct.btTriangleRaycastCallback* %198, %struct.btQuadWord* %rayFromLocal, %struct.btQuadWord* %rayToLocal, i32 %197)
- to label %invcont29 unwind label %lpad
-
-invcont29: ; preds = %invcont28
- %199 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btBvhTriangleMeshShape* ; [#uses=1]
- %200 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btTriangleMeshShape* ; [#uses=1]
- %201 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %201, align 8
- %202 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 1 ; [#uses=1]
- store %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, %"struct.btCollisionWorld::RayResultCallback"** %202, align 4
- %203 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %collisionObject, %struct.btCollisionObject** %203, align 8
- %204 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 3 ; [#uses=1]
- store %struct.btTriangleMeshShape* %200, %struct.btTriangleMeshShape** %204, align 4
- %205 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %206 = load float* %106, align 4 ; [#uses=1]
- store float %206, float* %205, align 8
- %207 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %208 = load float* %103, align 4 ; [#uses=1]
- store float %208, float* %207, align 4
- %209 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %210 = load float* %100, align 4 ; [#uses=1]
- store float %210, float* %209, align 8
- %211 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %213 = load float* %212, align 4 ; [#uses=1]
- store float %213, float* %211, align 4
- %214 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %215 = load float* %105, align 4 ; [#uses=1]
- store float %215, float* %214, align 8
- %216 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %217 = load float* %102, align 4 ; [#uses=1]
- store float %217, float* %216, align 4
- %218 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %219 = load float* %99, align 4 ; [#uses=1]
- store float %219, float* %218, align 8
- %220 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %221 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %222 = load float* %221, align 4 ; [#uses=1]
- store float %222, float* %220, align 4
- %223 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %224 = load float* %104, align 4 ; [#uses=1]
- store float %224, float* %223, align 8
- %225 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %226 = load float* %101, align 4 ; [#uses=1]
- store float %226, float* %225, align 4
- %227 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %228 = load float* %98, align 4 ; [#uses=1]
- store float %228, float* %227, align 8
- %229 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %231 = load float* %230, align 4 ; [#uses=1]
- store float %231, float* %229, align 4
- %232 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %233 = load float* %122, align 4 ; [#uses=1]
- store float %233, float* %232, align 8
- %234 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %235 = load float* %119, align 4 ; [#uses=1]
- store float %235, float* %234, align 4
- %236 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %237 = load float* %116, align 4 ; [#uses=1]
- store float %237, float* %236, align 8
- %238 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %239 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %240 = load float* %239, align 4 ; [#uses=1]
- store float %240, float* %238, align 4
- %241 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=1]
- %242 = load float* %241, align 4 ; [#uses=1]
- %243 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 0, i32 4 ; [#uses=1]
- store float %242, float* %243, align 8
- %244 = getelementptr inbounds %struct..0BridgeTriangleRaycastCallback* %rcb, i32 0, i32 0, i32 0 ; [#uses=3]
- invoke void @_ZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_(%struct.btBvhTriangleMeshShape* %199, %struct.btActionInterface* %244, %struct.btQuadWord* %rayFromLocal, %struct.btQuadWord* %rayToLocal)
- to label %bb36 unwind label %lpad100
-
-bb36: ; preds = %invcont29
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %201, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %244)
- to label %bb89 unwind label %lpad
-
-invcont50: ; preds = %bb20
- %245 = bitcast %struct.btCollisionShape* %collisionShape to %struct.btConcaveShape* ; [#uses=2]
- %246 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %247 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %248 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %249 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %250 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %251 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %252 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %253 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %254 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %255 = load float* %254, align 4 ; [#uses=3]
- %256 = load float* %253, align 4 ; [#uses=3]
- %257 = load float* %252, align 4 ; [#uses=3]
- %258 = load float* %251, align 4 ; [#uses=3]
- %259 = load float* %250, align 4 ; [#uses=3]
- %260 = load float* %249, align 4 ; [#uses=3]
- %261 = load float* %248, align 4 ; [#uses=3]
- %262 = load float* %247, align 4 ; [#uses=3]
- %263 = load float* %246, align 4 ; [#uses=3]
- %264 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %265 = load float* %264, align 4 ; [#uses=1]
- %266 = fsub float -0.000000e+00, %265 ; [#uses=3]
- %267 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %268 = load float* %267, align 4 ; [#uses=1]
- %269 = fsub float -0.000000e+00, %268 ; [#uses=3]
- %270 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %271 = load float* %270, align 4 ; [#uses=1]
- %272 = fsub float -0.000000e+00, %271 ; [#uses=3]
- %273 = fmul float %261, %272 ; [#uses=1]
- %274 = fmul float %262, %269 ; [#uses=1]
- %275 = fadd float %273, %274 ; [#uses=1]
- %276 = fmul float %263, %266 ; [#uses=1]
- %277 = fadd float %275, %276 ; [#uses=2]
- %278 = fmul float %258, %272 ; [#uses=1]
- %279 = fmul float %259, %269 ; [#uses=1]
- %280 = fadd float %278, %279 ; [#uses=1]
- %281 = fmul float %260, %266 ; [#uses=1]
- %282 = fadd float %280, %281 ; [#uses=2]
- %283 = fmul float %255, %272 ; [#uses=1]
- %284 = fmul float %256, %269 ; [#uses=1]
- %285 = fadd float %283, %284 ; [#uses=1]
- %286 = fmul float %257, %266 ; [#uses=1]
- %287 = fadd float %285, %286 ; [#uses=2]
- %288 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %289 = load float* %288, align 4 ; [#uses=3]
- %290 = fmul float %261, %289 ; [#uses=1]
- %291 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %292 = load float* %291, align 4 ; [#uses=3]
- %293 = fmul float %262, %292 ; [#uses=1]
- %294 = fadd float %290, %293 ; [#uses=1]
- %295 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %296 = load float* %295, align 4 ; [#uses=3]
- %297 = fmul float %263, %296 ; [#uses=1]
- %298 = fadd float %294, %297 ; [#uses=1]
- %299 = fadd float %298, %277 ; [#uses=1]
- %300 = fmul float %258, %289 ; [#uses=1]
- %301 = fmul float %259, %292 ; [#uses=1]
- %302 = fadd float %300, %301 ; [#uses=1]
- %303 = fmul float %260, %296 ; [#uses=1]
- %304 = fadd float %302, %303 ; [#uses=1]
- %305 = fadd float %304, %282 ; [#uses=1]
- %306 = fmul float %255, %289 ; [#uses=1]
- %307 = fmul float %256, %292 ; [#uses=1]
- %308 = fadd float %306, %307 ; [#uses=1]
- %309 = fmul float %257, %296 ; [#uses=1]
- %310 = fadd float %308, %309 ; [#uses=1]
- %311 = fadd float %310, %287 ; [#uses=1]
- %312 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal43, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %311, float* %312, align 8
- %313 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal43, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %305, float* %313, align 4
- %314 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal43, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %299, float* %314, align 8
- %315 = getelementptr inbounds %struct.btQuadWord* %rayFromLocal43, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %315, align 4
- %316 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %317 = load float* %316, align 4 ; [#uses=3]
- %318 = fmul float %261, %317 ; [#uses=1]
- %319 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %320 = load float* %319, align 4 ; [#uses=3]
- %321 = fmul float %262, %320 ; [#uses=1]
- %322 = fadd float %318, %321 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %324 = load float* %323, align 4 ; [#uses=3]
- %325 = fmul float %263, %324 ; [#uses=1]
- %326 = fadd float %322, %325 ; [#uses=1]
- %327 = fadd float %326, %277 ; [#uses=1]
- %328 = fmul float %258, %317 ; [#uses=1]
- %329 = fmul float %259, %320 ; [#uses=1]
- %330 = fadd float %328, %329 ; [#uses=1]
- %331 = fmul float %260, %324 ; [#uses=1]
- %332 = fadd float %330, %331 ; [#uses=1]
- %333 = fadd float %332, %282 ; [#uses=1]
- %334 = fmul float %255, %317 ; [#uses=1]
- %335 = fmul float %256, %320 ; [#uses=1]
- %336 = fadd float %334, %335 ; [#uses=1]
- %337 = fmul float %257, %324 ; [#uses=1]
- %338 = fadd float %336, %337 ; [#uses=1]
- %339 = fadd float %338, %287 ; [#uses=1]
- %340 = getelementptr inbounds %struct.btQuadWord* %rayToLocal45, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %339, float* %340, align 8
- %341 = getelementptr inbounds %struct.btQuadWord* %rayToLocal45, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %333, float* %341, align 4
- %342 = getelementptr inbounds %struct.btQuadWord* %rayToLocal45, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %327, float* %342, align 8
- %343 = getelementptr inbounds %struct.btQuadWord* %rayToLocal45, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %343, align 4
- %344 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 5 ; [#uses=1]
- %345 = load i32* %344, align 4 ; [#uses=1]
- %346 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN25btTriangleRaycastCallbackC2ERK9btVector3S2_j(%struct.btTriangleRaycastCallback* %346, %struct.btQuadWord* %rayFromLocal43, %struct.btQuadWord* %rayToLocal45, i32 %345)
- to label %invcont51 unwind label %lpad
-
-invcont51: ; preds = %invcont50
- %347 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE29BridgeTriangleRaycastCallback_0, i32 0, i32 2), i32 (...)*** %347, align 8
- %348 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 1 ; [#uses=1]
- store %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, %"struct.btCollisionWorld::RayResultCallback"** %348, align 4
- %349 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %collisionObject, %struct.btCollisionObject** %349, align 8
- %350 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 3 ; [#uses=1]
- store %struct.btConcaveShape* %245, %struct.btConcaveShape** %350, align 4
- %351 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %352 = load float* %254, align 4 ; [#uses=1]
- store float %352, float* %351, align 8
- %353 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %354 = load float* %251, align 4 ; [#uses=1]
- store float %354, float* %353, align 4
- %355 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %356 = load float* %248, align 4 ; [#uses=1]
- store float %356, float* %355, align 8
- %357 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %358 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %359 = load float* %358, align 4 ; [#uses=1]
- store float %359, float* %357, align 4
- %360 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %361 = load float* %253, align 4 ; [#uses=1]
- store float %361, float* %360, align 8
- %362 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %363 = load float* %250, align 4 ; [#uses=1]
- store float %363, float* %362, align 4
- %364 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %365 = load float* %247, align 4 ; [#uses=1]
- store float %365, float* %364, align 8
- %366 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %367 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %368 = load float* %367, align 4 ; [#uses=1]
- store float %368, float* %366, align 4
- %369 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %370 = load float* %252, align 4 ; [#uses=1]
- store float %370, float* %369, align 8
- %371 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %372 = load float* %249, align 4 ; [#uses=1]
- store float %372, float* %371, align 4
- %373 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %374 = load float* %246, align 4 ; [#uses=1]
- store float %374, float* %373, align 8
- %375 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %376 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %377 = load float* %376, align 4 ; [#uses=1]
- store float %377, float* %375, align 4
- %378 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %379 = load float* %270, align 4 ; [#uses=1]
- store float %379, float* %378, align 8
- %380 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %381 = load float* %267, align 4 ; [#uses=1]
- store float %381, float* %380, align 4
- %382 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %383 = load float* %264, align 4 ; [#uses=1]
- store float %383, float* %382, align 8
- %384 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %385 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %386 = load float* %385, align 4 ; [#uses=1]
- store float %386, float* %384, align 4
- %387 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=1]
- %388 = load float* %387, align 4 ; [#uses=1]
- %389 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 0, i32 4 ; [#uses=1]
- store float %388, float* %389, align 8
- %390 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 0 ; [#uses=2]
- %391 = load float* %312, align 8 ; [#uses=4]
- store float %391, float* %390, align 8
- %392 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 1 ; [#uses=2]
- %393 = load float* %313, align 4 ; [#uses=4]
- store float %393, float* %392, align 4
- %394 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 2 ; [#uses=2]
- %395 = load float* %314, align 8 ; [#uses=4]
- store float %395, float* %394, align 8
- %396 = getelementptr inbounds %struct.btQuadWord* %rayAabbMinLocal, i32 0, i32 0, i32 3 ; [#uses=2]
- %397 = load float* %315, align 4 ; [#uses=4]
- store float %397, float* %396, align 4
- %398 = load float* %340, align 8 ; [#uses=4]
- %399 = fcmp olt float %398, %391 ; [#uses=1]
- br i1 %399, label %bb.i.i137, label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-bb.i.i137: ; preds = %invcont51
- store float %398, float* %390, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i137, %invcont51
- %400 = load float* %341, align 4 ; [#uses=4]
- %401 = fcmp olt float %400, %393 ; [#uses=1]
- br i1 %401, label %bb.i7.i138, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-bb.i7.i138: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i
- store float %400, float* %392, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i138, %_Z8btSetMinIfEvRT_RKS0_.exit.i
- %402 = load float* %342, align 8 ; [#uses=4]
- %403 = fcmp olt float %402, %395 ; [#uses=1]
- br i1 %403, label %bb.i4.i139, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-bb.i4.i139: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- store float %402, float* %394, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i139, %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- %404 = load float* %343, align 4 ; [#uses=4]
- %405 = fcmp olt float %404, %397 ; [#uses=1]
- br i1 %405, label %bb.i1.i140, label %invcont52
-
-bb.i1.i140: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- store float %404, float* %396, align 4
- br label %invcont52
-
-invcont52: ; preds = %bb.i1.i140, %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- %406 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %391, float* %406, align 8
- %407 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %393, float* %407, align 4
- %408 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %395, float* %408, align 8
- %409 = getelementptr inbounds %struct.btQuadWord* %rayAabbMaxLocal, i32 0, i32 0, i32 3 ; [#uses=2]
- store float %397, float* %409, align 4
- %410 = fcmp olt float %391, %398 ; [#uses=1]
- br i1 %410, label %bb.i.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-bb.i.i: ; preds = %invcont52
- store float %398, float* %406, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i, %invcont52
- %411 = fcmp olt float %393, %400 ; [#uses=1]
- br i1 %411, label %bb.i7.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-bb.i7.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- store float %400, float* %407, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i, %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- %412 = fcmp olt float %395, %402 ; [#uses=1]
- br i1 %412, label %bb.i4.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-bb.i4.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- store float %402, float* %408, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- %413 = fcmp olt float %397, %404 ; [#uses=1]
- br i1 %413, label %bb.i1.i, label %invcont53
-
-bb.i1.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- store float %404, float* %409, align 4
- br label %invcont53
-
-invcont53: ; preds = %bb.i1.i, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- %414 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 0, i32 0 ; [#uses=1]
- %415 = load i32 (...)*** %414, align 4 ; [#uses=1]
- %416 = getelementptr inbounds i32 (...)** %415, i32 15 ; [#uses=1]
- %417 = load i32 (...)** %416, align 4 ; [#uses=1]
- %418 = bitcast i32 (...)* %417 to void (%struct.btConcaveShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %419 = getelementptr inbounds %struct..1BridgeTriangleRaycastCallback* %rcb47, i32 0, i32 0, i32 0 ; [#uses=3]
- invoke void %418(%struct.btConcaveShape* %245, %struct.btActionInterface* %419, %struct.btQuadWord* %rayAabbMinLocal, %struct.btQuadWord* %rayAabbMaxLocal)
- to label %bb60 unwind label %lpad108
-
-bb60: ; preds = %invcont53
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %347, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %419)
- to label %bb89 unwind label %lpad
-
-invcont63: ; preds = %invcont18
- %420 = icmp eq i32 %6, 31 ; [#uses=1]
- br i1 %420, label %invcont82.preheader, label %bb89
-
-invcont82.preheader: ; preds = %invcont63
- %421 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 1, i32 1 ; [#uses=1]
- %422 = getelementptr inbounds %struct.btCollisionShape* %collisionShape, i32 2 ; [#uses=1]
- %423 = bitcast %struct.btCollisionShape* %422 to %struct.btCompoundShapeChild** ; [#uses=1]
- %424 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %425 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %426 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %427 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %428 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %429 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %430 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %431 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %432 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %433 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %434 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %435 = getelementptr inbounds %struct.btTransform* %colObjWorldTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %436 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %437 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %438 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %439 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %440 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %441 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %442 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %443 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %444 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %445 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %446 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %447 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %448 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %449 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %450 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %451 = getelementptr inbounds %struct.btTransform* %childWorldTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %452 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 9 ; [#uses=3]
- %453 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 0, i32 0 ; [#uses=3]
- %454 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 0, i32 1 ; [#uses=1]
- %455 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 0, i32 2 ; [#uses=1]
- %456 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 0, i32 3 ; [#uses=1]
- %457 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 0, i32 4 ; [#uses=1]
- %458 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 0, i32 5 ; [#uses=1]
- %459 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 1 ; [#uses=1]
- %460 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 2 ; [#uses=1]
- %461 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 1 ; [#uses=1]
- %462 = getelementptr inbounds %struct..2LocalInfoAdder2* %my_cb, i32 0, i32 0 ; [#uses=1]
- br label %invcont82
-
-invcont76: ; preds = %invcont82
- %463 = load %struct.btCompoundShapeChild** %423, align 4 ; [#uses=13]
- %scevgep172173 = getelementptr inbounds %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %464 = load float* %scevgep172173, align 4 ; [#uses=3]
- %scevgep171 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %465 = load float* %scevgep171, align 4 ; [#uses=3]
- %scevgep170 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %466 = load float* %scevgep170, align 4 ; [#uses=3]
- %scevgep168169 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %467 = load float* %scevgep168169, align 4 ; [#uses=3]
- %scevgep167 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %468 = load float* %scevgep167, align 4 ; [#uses=3]
- %scevgep166 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %469 = load float* %scevgep166, align 4 ; [#uses=3]
- %scevgep164165 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %470 = load float* %scevgep164165, align 4 ; [#uses=3]
- %scevgep163 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %471 = load float* %scevgep163, align 4 ; [#uses=3]
- %scevgep162 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %472 = load float* %scevgep162, align 4 ; [#uses=3]
- %scevgep161 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %473 = load float* %scevgep161, align 4 ; [#uses=3]
- %scevgep160 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %474 = load float* %scevgep160, align 4 ; [#uses=3]
- %scevgep = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %475 = load float* %scevgep, align 4 ; [#uses=3]
- %scevgep174 = getelementptr %struct.btCompoundShapeChild* %463, i32 %555, i32 1 ; [#uses=1]
- %476 = load %struct.btCollisionShape** %scevgep174, align 4 ; [#uses=2]
- %477 = load float* %424, align 4 ; [#uses=4]
- %478 = fmul float %477, %473 ; [#uses=1]
- %479 = load float* %425, align 4 ; [#uses=4]
- %480 = fmul float %479, %474 ; [#uses=1]
- %481 = fadd float %478, %480 ; [#uses=1]
- %482 = load float* %426, align 4 ; [#uses=4]
- %483 = fmul float %482, %475 ; [#uses=1]
- %484 = fadd float %481, %483 ; [#uses=1]
- %485 = load float* %427, align 4 ; [#uses=1]
- %486 = fadd float %484, %485 ; [#uses=1]
- %487 = load float* %428, align 4 ; [#uses=4]
- %488 = fmul float %487, %473 ; [#uses=1]
- %489 = load float* %429, align 4 ; [#uses=4]
- %490 = fmul float %489, %474 ; [#uses=1]
- %491 = fadd float %488, %490 ; [#uses=1]
- %492 = load float* %430, align 4 ; [#uses=4]
- %493 = fmul float %492, %475 ; [#uses=1]
- %494 = fadd float %491, %493 ; [#uses=1]
- %495 = load float* %431, align 4 ; [#uses=1]
- %496 = fadd float %494, %495 ; [#uses=1]
- %497 = load float* %432, align 4 ; [#uses=4]
- %498 = fmul float %497, %473 ; [#uses=1]
- %499 = load float* %433, align 4 ; [#uses=4]
- %500 = fmul float %499, %474 ; [#uses=1]
- %501 = fadd float %498, %500 ; [#uses=1]
- %502 = load float* %434, align 4 ; [#uses=4]
- %503 = fmul float %502, %475 ; [#uses=1]
- %504 = fadd float %501, %503 ; [#uses=1]
- %505 = load float* %435, align 4 ; [#uses=1]
- %506 = fadd float %504, %505 ; [#uses=1]
- %507 = fmul float %466, %477 ; [#uses=1]
- %508 = fmul float %469, %479 ; [#uses=1]
- %509 = fadd float %507, %508 ; [#uses=1]
- %510 = fmul float %472, %482 ; [#uses=1]
- %511 = fadd float %509, %510 ; [#uses=1]
- %512 = fmul float %465, %477 ; [#uses=1]
- %513 = fmul float %468, %479 ; [#uses=1]
- %514 = fadd float %512, %513 ; [#uses=1]
- %515 = fmul float %471, %482 ; [#uses=1]
- %516 = fadd float %514, %515 ; [#uses=1]
- %517 = fmul float %464, %477 ; [#uses=1]
- %518 = fmul float %467, %479 ; [#uses=1]
- %519 = fadd float %517, %518 ; [#uses=1]
- %520 = fmul float %470, %482 ; [#uses=1]
- %521 = fadd float %519, %520 ; [#uses=1]
- %522 = fmul float %466, %487 ; [#uses=1]
- %523 = fmul float %469, %489 ; [#uses=1]
- %524 = fadd float %522, %523 ; [#uses=1]
- %525 = fmul float %472, %492 ; [#uses=1]
- %526 = fadd float %524, %525 ; [#uses=1]
- %527 = fmul float %465, %487 ; [#uses=1]
- %528 = fmul float %468, %489 ; [#uses=1]
- %529 = fadd float %527, %528 ; [#uses=1]
- %530 = fmul float %471, %492 ; [#uses=1]
- %531 = fadd float %529, %530 ; [#uses=1]
- %532 = fmul float %464, %487 ; [#uses=1]
- %533 = fmul float %467, %489 ; [#uses=1]
- %534 = fadd float %532, %533 ; [#uses=1]
- %535 = fmul float %470, %492 ; [#uses=1]
- %536 = fadd float %534, %535 ; [#uses=1]
- %537 = fmul float %466, %497 ; [#uses=1]
- %538 = fmul float %469, %499 ; [#uses=1]
- %539 = fadd float %537, %538 ; [#uses=1]
- %540 = fmul float %472, %502 ; [#uses=1]
- %541 = fadd float %539, %540 ; [#uses=1]
- %542 = fmul float %465, %497 ; [#uses=1]
- %543 = fmul float %468, %499 ; [#uses=1]
- %544 = fadd float %542, %543 ; [#uses=1]
- %545 = fmul float %471, %502 ; [#uses=1]
- %546 = fadd float %544, %545 ; [#uses=1]
- %547 = fmul float %464, %497 ; [#uses=1]
- %548 = fmul float %467, %499 ; [#uses=1]
- %549 = fadd float %547, %548 ; [#uses=1]
- %550 = fmul float %470, %502 ; [#uses=1]
- %551 = fadd float %549, %550 ; [#uses=1]
- store float %551, float* %436, align 8
- store float %546, float* %437, align 4
- store float %541, float* %438, align 8
- store float 0.000000e+00, float* %439, align 4
- store float %536, float* %440, align 8
- store float %531, float* %441, align 4
- store float %526, float* %442, align 8
- store float 0.000000e+00, float* %443, align 4
- store float %521, float* %444, align 8
- store float %516, float* %445, align 4
- store float %511, float* %446, align 8
- store float 0.000000e+00, float* %447, align 4
- store float %506, float* %448, align 8
- store float %496, float* %449, align 4
- store float %486, float* %450, align 8
- store float 0.000000e+00, float* %451, align 4
- %552 = load %struct.btCollisionShape** %452, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %476, %struct.btCollisionShape** %452, align 4
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %455, align 8
- store i16 1, i16* %456, align 4
- store i16 -1, i16* %457, align 2
- store i32 0, i32* %458, align 8
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2, i32 0, i32 2), i32 (...)*** %453, align 8
- store %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, %"struct.btCollisionWorld::RayResultCallback"** %459, align 4
- store i32 %555, i32* %460, align 8
- %553 = load float* %461, align 4 ; [#uses=1]
- store float %553, float* %454, align 4
- invoke void @_ZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackE(%struct.btTransform* %rayFromTrans, %struct.btTransform* %rayToTrans, %struct.btCollisionObject* %collisionObject, %struct.btCollisionShape* %476, %struct.btTransform* %childWorldTrans, %"struct.btCollisionWorld::RayResultCallback"* %462)
- to label %invcont77 unwind label %lpad116
-
-invcont77: ; preds = %invcont76
- store %struct.btCollisionShape* %552, %struct.btCollisionShape** %452, align 4
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2, i32 0, i32 2), i32 (...)*** %453, align 8
- %554 = add nsw i32 %555, 1 ; [#uses=1]
- br label %invcont82
-
-invcont82: ; preds = %invcont77, %invcont82.preheader
- %555 = phi i32 [ %554, %invcont77 ], [ 0, %invcont82.preheader ] ; [#uses=16]
- %556 = load i32* %421, align 4 ; [#uses=1]
- %557 = icmp sgt i32 %556, %555 ; [#uses=1]
- br i1 %557, label %invcont76, label %bb89
-
-invcont87: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb89: ; preds = %invcont82, %invcont63, %bb60, %bb36, %bb15
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %558 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %558)
- ret void
-
-lpad: ; preds = %bb60, %invcont50, %bb36, %invcont28, %bb15, %invcont1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select91 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad92: ; preds = %bb8, %invcont2
- %eh_ptr93 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select95 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr93, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %559 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %559, align 8
- %560 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %560)
- to label %ppad unwind label %lpad96
-
-lpad96: ; preds = %lpad92
- %eh_ptr97 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select99 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr97, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad100: ; preds = %invcont29
- %eh_ptr101 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select103 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr101, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %201, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %244)
- to label %ppad unwind label %lpad104
-
-lpad104: ; preds = %lpad100
- %eh_ptr105 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select107 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr105, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad108: ; preds = %invcont53
- %eh_ptr109 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select111 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr109, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %347, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %419)
- to label %ppad unwind label %lpad112
-
-lpad112: ; preds = %lpad108
- %eh_ptr113 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select115 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr113, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad116: ; preds = %invcont76
- %eh_ptr117 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select119 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr117, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackEE15LocalInfoAdder2, i32 0, i32 2), i32 (...)*** %453, align 8
- br label %ppad
-
-lpad120: ; preds = %ppad
- %eh_ptr121 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select123 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr121, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad116, %lpad108, %lpad100, %lpad92, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr117, %lpad116 ], [ %eh_ptr93, %lpad92 ], [ %eh_ptr101, %lpad100 ], [ %eh_ptr109, %lpad108 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %561 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %561)
- to label %invcont87 unwind label %lpad120
-}
-
-; [#uses=1]
-define void @_ZN16btCollisionWorld16updateSingleAabbEP17btCollisionObject(%struct.btCollisionWorld* nocapture %this, %struct.btCollisionObject* %colObj) align 2 {
-entry:
- %minAabb = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %maxAabb = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 9 ; [#uses=1]
- %1 = load %struct.btCollisionShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCollisionShape* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1 ; [#uses=1]
- %7 = bitcast i32 (...)* %5 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %7(%struct.btCollisionShape* %1, %struct.btTransform* %6, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb)
- %8 = load float* @gContactBreakingThreshold, align 4 ; [#uses=6]
- %9 = getelementptr inbounds %struct.btQuadWord* %minAabb, i32 0, i32 0, i32 0 ; [#uses=2]
- %10 = load float* %9, align 8 ; [#uses=1]
- %11 = fsub float %10, %8 ; [#uses=2]
- store float %11, float* %9, align 8
- %12 = getelementptr inbounds %struct.btQuadWord* %minAabb, i32 0, i32 0, i32 1 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %13, %8 ; [#uses=2]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %minAabb, i32 0, i32 0, i32 2 ; [#uses=2]
- %16 = load float* %15, align 8 ; [#uses=1]
- %17 = fsub float %16, %8 ; [#uses=2]
- store float %17, float* %15, align 8
- %18 = getelementptr inbounds %struct.btQuadWord* %maxAabb, i32 0, i32 0, i32 0 ; [#uses=2]
- %19 = load float* %18, align 8 ; [#uses=1]
- %20 = fadd float %19, %8 ; [#uses=2]
- store float %20, float* %18, align 8
- %21 = getelementptr inbounds %struct.btQuadWord* %maxAabb, i32 0, i32 0, i32 1 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fadd float %22, %8 ; [#uses=2]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %maxAabb, i32 0, i32 0, i32 2 ; [#uses=2]
- %25 = load float* %24, align 8 ; [#uses=1]
- %26 = fadd float %25, %8 ; [#uses=2]
- store float %26, float* %24, align 8
- %27 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 5 ; [#uses=1]
- %28 = load %struct.btActionInterface** %27, align 4 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 12 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = and i32 %30, 1 ; [#uses=1]
- %toBool = icmp eq i32 %31, 0 ; [#uses=1]
- br i1 %toBool, label %bb, label %bb5
-
-bb: ; preds = %entry
- %32 = fsub float %26, %17 ; [#uses=2]
- %33 = fsub float %23, %14 ; [#uses=2]
- %34 = fsub float %20, %11 ; [#uses=2]
- %35 = fmul float %34, %34 ; [#uses=1]
- %36 = fmul float %33, %33 ; [#uses=1]
- %37 = fadd float %35, %36 ; [#uses=1]
- %38 = fmul float %32, %32 ; [#uses=1]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = fcmp olt float %39, 0x426D1A94A0000000 ; [#uses=1]
- br i1 %40, label %bb5, label %bb2
-
-bb2: ; preds = %bb
- call void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %colObj, i32 5)
- %.b = load i1* @_ZZN16btCollisionWorld16updateSingleAabbEP17btCollisionObjectE8reportMe.b, align 1 ; [#uses=1]
- br i1 %.b, label %return, label %bb8
-
-bb5: ; preds = %bb, %entry
- %41 = getelementptr inbounds %struct.btActionInterface* %28, i32 0, i32 0 ; [#uses=1]
- %42 = load i32 (...)*** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds i32 (...)** %42, i32 4 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 2 ; [#uses=1]
- %46 = load %struct.btActionInterface** %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 8 ; [#uses=1]
- %48 = load %struct.btBroadphaseProxy** %47, align 4 ; [#uses=1]
- %49 = bitcast i32 (...)* %44 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- call void %49(%struct.btActionInterface* %28, %struct.btBroadphaseProxy* %48, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb, %struct.btActionInterface* %46)
- ret void
-
-bb8: ; preds = %bb2
- %50 = getelementptr inbounds %struct.btCollisionWorld* %this, i32 0, i32 6 ; [#uses=4]
- %51 = load %struct.btActionInterface** %50, align 4 ; [#uses=3]
- %52 = icmp eq %struct.btActionInterface* %51, null ; [#uses=1]
- br i1 %52, label %return, label %bb9
-
-bb9: ; preds = %bb8
- store i1 true, i1* @_ZZN16btCollisionWorld16updateSingleAabbEP17btCollisionObjectE8reportMe.b, align 1
- %53 = getelementptr inbounds %struct.btActionInterface* %51, i32 0, i32 0 ; [#uses=1]
- %54 = load i32 (...)*** %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds i32 (...)** %54, i32 9 ; [#uses=1]
- %56 = load i32 (...)** %55, align 4 ; [#uses=1]
- %57 = bitcast i32 (...)* %56 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- call void %57(%struct.btActionInterface* %51, i8* getelementptr inbounds ([49 x i8]* @.str8, i32 0, i32 0))
- %58 = load %struct.btActionInterface** %50, align 4 ; [#uses=2]
- %59 = getelementptr inbounds %struct.btActionInterface* %58, i32 0, i32 0 ; [#uses=1]
- %60 = load i32 (...)*** %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds i32 (...)** %60, i32 9 ; [#uses=1]
- %62 = load i32 (...)** %61, align 4 ; [#uses=1]
- %63 = bitcast i32 (...)* %62 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- call void %63(%struct.btActionInterface* %58, i8* getelementptr inbounds ([68 x i8]* @.str9, i32 0, i32 0))
- %64 = load %struct.btActionInterface** %50, align 4 ; [#uses=2]
- %65 = getelementptr inbounds %struct.btActionInterface* %64, i32 0, i32 0 ; [#uses=1]
- %66 = load i32 (...)*** %65, align 4 ; [#uses=1]
- %67 = getelementptr inbounds i32 (...)** %66, i32 9 ; [#uses=1]
- %68 = load i32 (...)** %67, align 4 ; [#uses=1]
- %69 = bitcast i32 (...)* %68 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- call void %69(%struct.btActionInterface* %64, i8* getelementptr inbounds ([65 x i8]* @.str10, i32 0, i32 0))
- %70 = load %struct.btActionInterface** %50, align 4 ; [#uses=2]
- %71 = getelementptr inbounds %struct.btActionInterface* %70, i32 0, i32 0 ; [#uses=1]
- %72 = load i32 (...)*** %71, align 4 ; [#uses=1]
- %73 = getelementptr inbounds i32 (...)** %72, i32 9 ; [#uses=1]
- %74 = load i32 (...)** %73, align 4 ; [#uses=1]
- %75 = bitcast i32 (...)* %74 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- call void %75(%struct.btActionInterface* %70, i8* getelementptr inbounds ([9 x i8]* @.str1116, i32 0, i32 0))
- ret void
-
-return: ; preds = %bb8, %bb2
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btCompoundCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btCompoundCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %isSwapped) align 2 {
-invcont:
- %0 = alloca %struct.btCollisionAlgorithm*, align 4 ; [#uses=2]
- %1 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %1, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %2 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV28btCompoundCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %2, align 4
- %3 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %3, align 4
- %4 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=6]
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- %5 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- store i8 %isSwapped, i8* %7, align 4
- %8 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 1 ; [#uses=1]
- %9 = load %struct.btPersistentManifold** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=2]
- store %struct.btPersistentManifold* %9, %struct.btPersistentManifold** %10, align 4
- %11 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %11, align 4
- %toBool = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.282.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btCollisionObject* %iftmp.282.0, i32 0, i32 9 ; [#uses=5]
- %13 = load %struct.btCollisionShape** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionShape* %13, i32 5, i32 2 ; [#uses=1]
- %15 = bitcast i8** %14 to i32* ; [#uses=1]
- %16 = load i32* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i32 %16, i32* %17, align 4
- %iftmp.285.0.i = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=1]
- %18 = load %struct.btCollisionShape** %12, align 4 ; [#uses=3]
- %19 = getelementptr inbounds %struct.btCollisionShape* %18, i32 1, i32 1 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=3]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %0, align 4
- %21 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE6resizeEiRKS1_(%"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %21, i32 %20, %struct.btCollisionAlgorithm** %0) inlinehint
- to label %.noexc31 unwind label %lpad15
-
-.noexc31: ; preds = %invcont
- %22 = icmp sgt i32 %20, 0 ; [#uses=1]
- br i1 %22, label %bb.nph.i, label %return
-
-bb.nph.i: ; preds = %.noexc31
- %23 = getelementptr inbounds %struct.btCollisionShape* %18, i32 5, i32 1 ; [#uses=1]
- %24 = bitcast i32* %23 to %struct.btDbvt** ; [#uses=1]
- %25 = getelementptr inbounds %struct.btCollisionShape* %18, i32 2 ; [#uses=1]
- %26 = bitcast %struct.btCollisionShape* %25 to %struct.btCompoundShapeChild** ; [#uses=1]
- %27 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb11.i, %bb.nph.i
- %i.014.i = phi i32 [ 0, %bb.nph.i ], [ %tmp, %bb11.i ] ; [#uses=4]
- %tmp = add i32 %i.014.i, 1 ; [#uses=2]
- %28 = load %struct.btDbvt** %24, align 4 ; [#uses=1]
- %29 = icmp eq %struct.btDbvt* %28, null ; [#uses=1]
- br i1 %29, label %bb10.i, label %bb9.i
-
-bb9.i: ; preds = %bb7.i
- %30 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.btCollisionAlgorithm** %30, i32 %i.014.i ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %scevgep16.i, align 4
- br label %bb11.i
-
-bb10.i: ; preds = %bb7.i
- %31 = load %struct.btCollisionShape** %12, align 4 ; [#uses=1]
- %32 = load %struct.btCompoundShapeChild** %26, align 4 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.btCompoundShapeChild* %32, i32 %i.014.i, i32 1 ; [#uses=1]
- %33 = load %struct.btCollisionShape** %scevgep15.i, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %33, %struct.btCollisionShape** %12, align 4
- %34 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %35 = load %struct.btActionInterface** %27, align 4 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btActionInterface* %35, i32 0, i32 0 ; [#uses=1]
- %37 = load i32 (...)*** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 2 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = load %struct.btPersistentManifold** %10, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %39 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %42 = invoke %struct.btCollisionAlgorithm* %41(%struct.btActionInterface* %35, %struct.btCollisionObject* %iftmp.282.0, %struct.btCollisionObject* %iftmp.285.0.i, %struct.btPersistentManifold* %40)
- to label %.noexc32 unwind label %lpad15 ; [#uses=1]
-
-.noexc32: ; preds = %bb10.i
- %scevgep.i = getelementptr %struct.btCollisionAlgorithm** %34, i32 %i.014.i ; [#uses=1]
- store %struct.btCollisionAlgorithm* %42, %struct.btCollisionAlgorithm** %scevgep.i, align 4
- store %struct.btCollisionShape* %31, %struct.btCollisionShape** %12, align 4
- br label %bb11.i
-
-bb11.i: ; preds = %.noexc32, %bb9.i
- %exitcond.i = icmp eq i32 %tmp, %20 ; [#uses=1]
- br i1 %exitcond.i, label %return, label %bb7.i
-
-invcont10: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr16)
- unreachable
-
-return: ; preds = %bb11.i, %.noexc31
- ret void
-
-lpad15: ; preds = %bb10.i, %invcont
- %eh_ptr16 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select18 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr16, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %43 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=2]
- %44 = icmp eq %struct.btCollisionAlgorithm** %43, null ; [#uses=1]
- br i1 %44, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad15
- %45 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %46 = bitcast %struct.btCollisionAlgorithm** %43 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %46)
- to label %bb2.i.i.i unwind label %lpad19
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- br label %ppad
-
-lpad19: ; preds = %bb1.i.i.i
- %eh_ptr20 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select22 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr20, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad23: ; preds = %ppad
- %eh_ptr24 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select26 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad15
- store i8 1, i8* %3, align 4
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- store i32 0, i32* %5, align 4
- store i32 0, i32* %6, align 4
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %1)
- to label %invcont10 unwind label %lpad23
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btCompoundLeafCallbackD1Ev(%struct.btCompoundLeafCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV22btCompoundLeafCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btCompoundLeafCallbackD0Ev(%struct.btCompoundLeafCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV22btCompoundLeafCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btCompoundLeafCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btCompoundLeafCallback7ProcessEPK10btDbvtNode(%struct.btCompoundLeafCallback* %this, %struct.btDbvtNode* nocapture %leaf) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %worldAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %worldAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 2, i32 0 ; [#uses=1]
- %2 = bitcast [2 x %struct.btDbvtNode*]* %1 to i32* ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 1 ; [#uses=2]
- %5 = load %struct.btCollisionObject** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 9 ; [#uses=1]
- %7 = load %struct.btCollisionShape** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionShape* %7, i32 2 ; [#uses=1]
- %9 = bitcast %struct.btCollisionShape* %8 to %struct.btCompoundShapeChild** ; [#uses=1]
- %10 = load %struct.btCompoundShapeChild** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCompoundShapeChild* %10, i32 %3, i32 1 ; [#uses=1]
- %12 = load %struct.btCollisionShape** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 4 ; [#uses=2]
- %14 = load %struct.btDispatcherInfo** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btDispatcherInfo* %14, i32 0, i32 5 ; [#uses=1]
- %16 = load %struct.btActionInterface** %15, align 4 ; [#uses=3]
- %17 = icmp eq %struct.btActionInterface* %16, null ; [#uses=1]
- br i1 %17, label %bb5, label %bb
-
-bb: ; preds = %entry
- %18 = getelementptr inbounds %struct.btActionInterface* %16, i32 0, i32 0 ; [#uses=1]
- %19 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 12 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %21 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %23 = call i32 %22(%struct.btActionInterface* %16) ; [#uses=1]
- %24 = and i32 %23, 2 ; [#uses=1]
- %25 = icmp eq i32 %24, 0 ; [#uses=1]
- br i1 %25, label %bb5, label %bb4
-
-bb4: ; preds = %bb
- %26 = load %struct.btCollisionObject** %4, align 4 ; [#uses=12]
- %27 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=2]
- %43 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btCollisionObject* %26, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=2]
- %53 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=2]
- %55 = fsub float %52, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=2]
- %58 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = fsub float %57, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=2]
- %63 = getelementptr inbounds %struct.btDbvtNode* %leaf, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=2]
- %65 = fsub float %62, %64 ; [#uses=1]
- %66 = fmul float %55, 5.000000e-01 ; [#uses=1]
- %67 = fmul float %60, 5.000000e-01 ; [#uses=1]
- %68 = fmul float %65, 5.000000e-01 ; [#uses=1]
- %69 = fadd float %68, 0.000000e+00 ; [#uses=3]
- %70 = fadd float %67, 0.000000e+00 ; [#uses=3]
- %71 = fadd float %66, 0.000000e+00 ; [#uses=3]
- %72 = fadd float %52, %54 ; [#uses=1]
- %73 = fadd float %57, %59 ; [#uses=1]
- %74 = fadd float %62, %64 ; [#uses=1]
- %75 = fmul float %72, 5.000000e-01 ; [#uses=3]
- %76 = fmul float %73, 5.000000e-01 ; [#uses=3]
- %77 = fmul float %74, 5.000000e-01 ; [#uses=3]
- %78 = call float @fabsf(float %44) nounwind readnone ; [#uses=1]
- %79 = call float @fabsf(float %42) nounwind readnone ; [#uses=1]
- %80 = call float @fabsf(float %40) nounwind readnone ; [#uses=1]
- %81 = call float @fabsf(float %38) nounwind readnone ; [#uses=1]
- %82 = call float @fabsf(float %36) nounwind readnone ; [#uses=1]
- %83 = call float @fabsf(float %34) nounwind readnone ; [#uses=1]
- %84 = call float @fabsf(float %32) nounwind readnone ; [#uses=1]
- %85 = call float @fabsf(float %30) nounwind readnone ; [#uses=1]
- %86 = call float @fabsf(float %28) nounwind readnone ; [#uses=1]
- %87 = fmul float %40, %77 ; [#uses=1]
- %88 = fmul float %42, %76 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=1]
- %90 = fmul float %44, %75 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fadd float %91, %50 ; [#uses=2]
- %93 = fmul float %34, %77 ; [#uses=1]
- %94 = fmul float %36, %76 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %38, %75 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fadd float %97, %48 ; [#uses=2]
- %99 = fmul float %28, %77 ; [#uses=1]
- %100 = fmul float %30, %76 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %32, %75 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fadd float %103, %46 ; [#uses=2]
- %105 = fmul float %80, %69 ; [#uses=1]
- %106 = fmul float %79, %70 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %78, %71 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=2]
- %110 = fmul float %83, %69 ; [#uses=1]
- %111 = fmul float %82, %70 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %81, %71 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=2]
- %115 = fmul float %86, %69 ; [#uses=1]
- %116 = fmul float %85, %70 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %84, %71 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=2]
- %120 = fsub float %92, %109 ; [#uses=1]
- %121 = fsub float %98, %114 ; [#uses=1]
- %122 = fsub float %104, %119 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %122, float* %123, align 8
- %124 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %121, float* %124, align 4
- %125 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %120, float* %125, align 8
- %126 = getelementptr inbounds %struct.btQuadWord* %worldAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %126, align 4
- %127 = fadd float %92, %109 ; [#uses=1]
- %128 = fadd float %98, %114 ; [#uses=1]
- %129 = fadd float %104, %119 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %129, float* %130, align 8
- %131 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %128, float* %131, align 4
- %132 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %127, float* %132, align 8
- %133 = getelementptr inbounds %struct.btQuadWord* %worldAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %133, align 4
- %134 = load %struct.btDispatcherInfo** %13, align 4 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btDispatcherInfo* %134, i32 0, i32 5 ; [#uses=2]
- %136 = load %struct.btActionInterface** %135, align 4 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btActionInterface* %136, i32 0, i32 0 ; [#uses=1]
- %138 = load i32 (...)*** %137, align 4 ; [#uses=1]
- %139 = getelementptr inbounds i32 (...)** %138, i32 13 ; [#uses=1]
- %140 = load i32 (...)** %139, align 4 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %141, align 8
- %142 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %142, align 4
- %143 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %143, align 8
- %144 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %144, align 4
- %145 = load %struct.btActionInterface** %135, align 4 ; [#uses=1]
- %146 = bitcast i32 (...)* %140 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %146(%struct.btActionInterface* %145, %struct.btQuadWord* %worldAabbMin, %struct.btQuadWord* %worldAabbMax, %struct.btQuadWord* %0)
- br label %bb5
-
-bb5: ; preds = %bb4, %bb, %entry
- call void @_ZN22btCompoundLeafCallback17ProcessChildShapeEP16btCollisionShapei(%struct.btCompoundLeafCallback* %this, %struct.btCollisionShape* %12, i32 %3)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btCompoundCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btCompoundCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.06 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=2]
- %tmp = add i32 %i.06, 1 ; [#uses=2]
- %4 = load %struct.btCollisionAlgorithm*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionAlgorithm** %4, i32 %i.06 ; [#uses=1]
- %5 = load %struct.btCollisionAlgorithm** %scevgep, align 4 ; [#uses=3]
- %6 = icmp eq %struct.btCollisionAlgorithm* %5, null ; [#uses=1]
- br i1 %6, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %7 = getelementptr inbounds %struct.btCollisionAlgorithm* %5, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 4 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to void (%struct.btCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* ; [#uses=1]
- tail call void %11(%struct.btCollisionAlgorithm* %5, %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %12 = load i32* %0, align 4 ; [#uses=1]
- %13 = icmp sgt i32 %12, %tmp ; [#uses=1]
- br i1 %13, label %bb, label %return
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv(%struct.btCompoundCollisionAlgorithm* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %21, %bb2 ] ; [#uses=3]
- %5 = load %struct.btCollisionAlgorithm*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionAlgorithm** %5, i32 %i.05 ; [#uses=1]
- %6 = load %struct.btCollisionAlgorithm** %scevgep, align 4 ; [#uses=3]
- %7 = icmp eq %struct.btCollisionAlgorithm* %6, null ; [#uses=1]
- br i1 %7, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %8 = getelementptr inbounds %struct.btCollisionAlgorithm* %6, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- tail call void %11(%struct.btCollisionAlgorithm* %6)
- %12 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btActionInterface* %12, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 13 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = load %struct.btCollisionAlgorithm*** %3, align 4 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btCollisionAlgorithm** %17, i32 %i.05 ; [#uses=1]
- %18 = load %struct.btCollisionAlgorithm** %scevgep6, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %16 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %20 = bitcast %struct.btCollisionAlgorithm* %18 to i8* ; [#uses=1]
- tail call void %19(%struct.btActionInterface* %12, i8* %20)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %21 = add nsw i32 %i.05, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %21, %1 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZN28btCompoundCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btCompoundCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=2]
- %iftmp.305.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=18]
- %iftmp.306.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 9 ; [#uses=3]
- %3 = load %struct.btCollisionShape** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=2]
- %6 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %6, label %bb.nph, label %bb11
-
-bb.nph: ; preds = %entry
- %7 = getelementptr inbounds %struct.btCollisionShape* %3, i32 2 ; [#uses=1]
- %8 = bitcast %struct.btCollisionShape* %7 to %struct.btCompoundShapeChild** ; [#uses=1]
- %9 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %11 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %12 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %17 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %19 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %20 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %22 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %23 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %24 = getelementptr inbounds %struct.btCollisionObject* %iftmp.305.0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=3]
- %25 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %i.024 = phi i32 [ 0, %bb.nph ], [ %128, %bb7 ] ; [#uses=15]
- %hitFraction.123 = phi float [ 1.000000e+00, %bb.nph ], [ %hitFraction.0, %bb7 ] ; [#uses=2]
- %26 = load %struct.btCompoundShapeChild** %8, align 4 ; [#uses=13]
- %scevgep25 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 1 ; [#uses=1]
- %27 = load %struct.btCollisionShape** %scevgep25, align 4 ; [#uses=1]
- %28 = load float* %9, align 4 ; [#uses=5]
- %29 = load float* %10, align 4 ; [#uses=5]
- %30 = load float* %11, align 4 ; [#uses=5]
- %31 = load float* %12, align 4 ; [#uses=1]
- %32 = load float* %13, align 4 ; [#uses=5]
- %33 = load float* %14, align 4 ; [#uses=5]
- %34 = load float* %15, align 4 ; [#uses=5]
- %35 = load float* %16, align 4 ; [#uses=1]
- %36 = load float* %17, align 4 ; [#uses=5]
- %37 = load float* %18, align 4 ; [#uses=5]
- %38 = load float* %19, align 4 ; [#uses=5]
- %39 = load float* %20, align 4 ; [#uses=1]
- %40 = load float* %21, align 4 ; [#uses=2]
- %41 = load float* %22, align 4 ; [#uses=2]
- %42 = load float* %23, align 4 ; [#uses=2]
- %43 = load float* %24, align 4 ; [#uses=1]
- %scevgep26 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %scevgep26, align 4 ; [#uses=3]
- %45 = fmul float %36, %44 ; [#uses=1]
- %scevgep27 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %scevgep27, align 4 ; [#uses=3]
- %47 = fmul float %37, %46 ; [#uses=1]
- %48 = fadd float %45, %47 ; [#uses=1]
- %scevgep28 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %scevgep28, align 4 ; [#uses=3]
- %50 = fmul float %38, %49 ; [#uses=1]
- %51 = fadd float %48, %50 ; [#uses=1]
- %52 = fadd float %51, %42 ; [#uses=1]
- %53 = fmul float %32, %44 ; [#uses=1]
- %54 = fmul float %33, %46 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %34, %49 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=1]
- %58 = fadd float %57, %41 ; [#uses=1]
- %59 = fmul float %28, %44 ; [#uses=1]
- %60 = fmul float %29, %46 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %30, %49 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fadd float %63, %40 ; [#uses=1]
- %scevgep29 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %scevgep29, align 4 ; [#uses=3]
- %66 = fmul float %65, %36 ; [#uses=1]
- %scevgep30 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %scevgep30, align 4 ; [#uses=3]
- %68 = fmul float %67, %37 ; [#uses=1]
- %69 = fadd float %66, %68 ; [#uses=1]
- %scevgep31 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %scevgep31, align 4 ; [#uses=3]
- %71 = fmul float %70, %38 ; [#uses=1]
- %72 = fadd float %69, %71 ; [#uses=1]
- %scevgep32 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %scevgep32, align 4 ; [#uses=3]
- %74 = fmul float %73, %36 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %scevgep33, align 4 ; [#uses=3]
- %76 = fmul float %75, %37 ; [#uses=1]
- %77 = fadd float %74, %76 ; [#uses=1]
- %scevgep34 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %scevgep34, align 4 ; [#uses=3]
- %79 = fmul float %78, %38 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=1]
- %scevgep3536 = getelementptr inbounds %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %81 = load float* %scevgep3536, align 4 ; [#uses=3]
- %82 = fmul float %81, %36 ; [#uses=1]
- %scevgep3738 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %scevgep3738, align 4 ; [#uses=3]
- %84 = fmul float %83, %37 ; [#uses=1]
- %85 = fadd float %82, %84 ; [#uses=1]
- %scevgep3940 = getelementptr %struct.btCompoundShapeChild* %26, i32 %i.024, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %86 = load float* %scevgep3940, align 4 ; [#uses=3]
- %87 = fmul float %86, %38 ; [#uses=1]
- %88 = fadd float %85, %87 ; [#uses=1]
- %89 = fmul float %65, %32 ; [#uses=1]
- %90 = fmul float %67, %33 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %70, %34 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %73, %32 ; [#uses=1]
- %95 = fmul float %75, %33 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = fmul float %78, %34 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=1]
- %99 = fmul float %81, %32 ; [#uses=1]
- %100 = fmul float %83, %33 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %86, %34 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fmul float %65, %28 ; [#uses=1]
- %105 = fmul float %67, %29 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %70, %30 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %73, %28 ; [#uses=1]
- %110 = fmul float %75, %29 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = fmul float %78, %30 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fmul float %81, %28 ; [#uses=1]
- %115 = fmul float %83, %29 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=1]
- %117 = fmul float %86, %30 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=1]
- store float %118, float* %9, align 4
- store float %113, float* %10, align 4
- store float %108, float* %11, align 4
- store float 0.000000e+00, float* %12, align 4
- store float %103, float* %13, align 4
- store float %98, float* %14, align 4
- store float %93, float* %15, align 4
- store float 0.000000e+00, float* %16, align 4
- store float %88, float* %17, align 4
- store float %80, float* %18, align 4
- store float %72, float* %19, align 4
- store float 0.000000e+00, float* %20, align 4
- store float %64, float* %21, align 4
- store float %58, float* %22, align 4
- store float %52, float* %23, align 4
- store float 0.000000e+00, float* %24, align 4
- store %struct.btCollisionShape* %27, %struct.btCollisionShape** %2, align 4
- %119 = load %struct.btCollisionAlgorithm*** %25, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionAlgorithm** %119, i32 %i.024 ; [#uses=1]
- %120 = load %struct.btCollisionAlgorithm** %scevgep, align 4 ; [#uses=2]
- %121 = getelementptr inbounds %struct.btCollisionAlgorithm* %120, i32 0, i32 0 ; [#uses=1]
- %122 = load i32 (...)*** %121, align 4 ; [#uses=1]
- %123 = getelementptr inbounds i32 (...)** %122, i32 3 ; [#uses=1]
- %124 = load i32 (...)** %123, align 4 ; [#uses=1]
- %125 = bitcast i32 (...)* %124 to float (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- %126 = tail call float %125(%struct.btCollisionAlgorithm* %120, %struct.btCollisionObject* %iftmp.305.0, %struct.btCollisionObject* %iftmp.306.0, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut) ; [#uses=2]
- %127 = fcmp olt float %126, %hitFraction.123 ; [#uses=1]
- %hitFraction.0 = select i1 %127, float %126, float %hitFraction.123 ; [#uses=2]
- store %struct.btCollisionShape* %3, %struct.btCollisionShape** %2, align 4
- store float %28, float* %9, align 4
- store float %29, float* %10, align 4
- store float %30, float* %11, align 4
- store float %31, float* %12, align 4
- store float %32, float* %13, align 4
- store float %33, float* %14, align 4
- store float %34, float* %15, align 4
- store float %35, float* %16, align 4
- store float %36, float* %17, align 4
- store float %37, float* %18, align 4
- store float %38, float* %19, align 4
- store float %39, float* %20, align 4
- store float %40, float* %21, align 4
- store float %41, float* %22, align 4
- store float %42, float* %23, align 4
- store float %43, float* %24, align 4
- %128 = add nsw i32 %i.024, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %128, %5 ; [#uses=1]
- br i1 %exitcond, label %bb11, label %bb7
-
-bb11: ; preds = %bb7, %entry
- %hitFraction.1.lcssa = phi float [ 1.000000e+00, %entry ], [ %hitFraction.0, %bb7 ] ; [#uses=1]
- ret float %hitFraction.1.lcssa
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN22btCompoundLeafCallback17ProcessChildShapeEP16btCollisionShapei(%struct.btCompoundLeafCallback* %this, %struct.btCollisionShape* %childShape, i32 %index) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %newChildWorldTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %aabbMin0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMax0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMin1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMax1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 1 ; [#uses=10]
- %3 = load %struct.btCollisionObject** %2, align 4 ; [#uses=33]
- %4 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 9 ; [#uses=1]
- %5 = load %struct.btCollisionShape** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=5]
- %8 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=5]
- %10 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=5]
- %12 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=5]
- %16 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=5]
- %18 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=5]
- %20 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=5]
- %24 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=5]
- %26 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=5]
- %28 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %3, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btCollisionShape* %5, i32 2 ; [#uses=1]
- %71 = bitcast %struct.btCollisionShape* %70 to %struct.btCompoundShapeChild** ; [#uses=1]
- %72 = load %struct.btCompoundShapeChild** %71, align 4 ; [#uses=12]
- %73 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=3]
- %75 = fmul float %23, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=3]
- %78 = fmul float %25, %77 ; [#uses=1]
- %79 = fadd float %75, %78 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=3]
- %82 = fmul float %27, %81 ; [#uses=1]
- %83 = fadd float %79, %82 ; [#uses=1]
- %84 = fadd float %83, %35 ; [#uses=1]
- %85 = fmul float %15, %74 ; [#uses=1]
- %86 = fmul float %17, %77 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %19, %81 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=1]
- %90 = fadd float %89, %33 ; [#uses=1]
- %91 = fmul float %7, %74 ; [#uses=1]
- %92 = fmul float %9, %77 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %11, %81 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fadd float %95, %31 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=3]
- %99 = fmul float %98, %23 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=3]
- %102 = fmul float %101, %25 ; [#uses=1]
- %103 = fadd float %99, %102 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=3]
- %106 = fmul float %105, %27 ; [#uses=1]
- %107 = fadd float %103, %106 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=3]
- %110 = fmul float %109, %23 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=3]
- %113 = fmul float %112, %25 ; [#uses=1]
- %114 = fadd float %110, %113 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=3]
- %117 = fmul float %116, %27 ; [#uses=1]
- %118 = fadd float %114, %117 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=3]
- %121 = fmul float %120, %23 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=3]
- %124 = fmul float %123, %25 ; [#uses=1]
- %125 = fadd float %121, %124 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btCompoundShapeChild* %72, i32 %index, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=3]
- %128 = fmul float %127, %27 ; [#uses=1]
- %129 = fadd float %125, %128 ; [#uses=1]
- %130 = fmul float %98, %15 ; [#uses=1]
- %131 = fmul float %101, %17 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %105, %19 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = fmul float %109, %15 ; [#uses=1]
- %136 = fmul float %112, %17 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %116, %19 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %120, %15 ; [#uses=1]
- %141 = fmul float %123, %17 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=1]
- %143 = fmul float %127, %19 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = fmul float %98, %7 ; [#uses=1]
- %146 = fmul float %101, %9 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=1]
- %148 = fmul float %105, %11 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fmul float %109, %7 ; [#uses=1]
- %151 = fmul float %112, %9 ; [#uses=1]
- %152 = fadd float %150, %151 ; [#uses=1]
- %153 = fmul float %116, %11 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %120, %7 ; [#uses=1]
- %156 = fmul float %123, %9 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fmul float %127, %11 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %159, float* %160, align 8
- %161 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %154, float* %161, align 4
- %162 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %149, float* %162, align 8
- %163 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %163, align 4
- %164 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- store float %144, float* %164, align 8
- %165 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- store float %139, float* %165, align 4
- %166 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- store float %134, float* %166, align 8
- %167 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %167, align 4
- %168 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- store float %129, float* %168, align 8
- %169 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- store float %118, float* %169, align 4
- %170 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- store float %107, float* %170, align 8
- %171 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %171, align 4
- %172 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- store float %96, float* %172, align 8
- %173 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- store float %90, float* %173, align 4
- %174 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- store float %84, float* %174, align 8
- %175 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %175, align 4
- %176 = getelementptr inbounds %struct.btCollisionShape* %childShape, i32 0, i32 0 ; [#uses=1]
- %177 = load i32 (...)*** %176, align 4 ; [#uses=1]
- %178 = getelementptr inbounds i32 (...)** %177, i32 2 ; [#uses=1]
- %179 = load i32 (...)** %178, align 4 ; [#uses=1]
- %180 = bitcast i32 (...)* %179 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %180(%struct.btCollisionShape* %childShape, %struct.btTransform* %newChildWorldTrans, %struct.btQuadWord* %aabbMin0, %struct.btQuadWord* %aabbMax0)
- %181 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 2 ; [#uses=3]
- %182 = load %struct.btCollisionObject** %181, align 4 ; [#uses=2]
- %183 = getelementptr inbounds %struct.btCollisionObject* %182, i32 0, i32 9 ; [#uses=1]
- %184 = load %struct.btCollisionShape** %183, align 4 ; [#uses=2]
- %185 = getelementptr inbounds %struct.btCollisionShape* %184, i32 0, i32 0 ; [#uses=1]
- %186 = load i32 (...)*** %185, align 4 ; [#uses=1]
- %187 = getelementptr inbounds i32 (...)** %186, i32 2 ; [#uses=1]
- %188 = load i32 (...)** %187, align 4 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btCollisionObject* %182, i32 0, i32 1 ; [#uses=1]
- %190 = bitcast i32 (...)* %188 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %190(%struct.btCollisionShape* %184, %struct.btTransform* %189, %struct.btQuadWord* %aabbMin1, %struct.btQuadWord* %aabbMax1)
- %191 = getelementptr inbounds %struct.btQuadWord* %aabbMin0, i32 0, i32 0, i32 0 ; [#uses=1]
- %192 = load float* %191, align 8 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btQuadWord* %aabbMax1, i32 0, i32 0, i32 0 ; [#uses=1]
- %194 = load float* %193, align 8 ; [#uses=1]
- %195 = fcmp ogt float %192, %194 ; [#uses=1]
- br i1 %195, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %entry
- %196 = getelementptr inbounds %struct.btQuadWord* %aabbMax0, i32 0, i32 0, i32 0 ; [#uses=1]
- %197 = load float* %196, align 8 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btQuadWord* %aabbMin1, i32 0, i32 0, i32 0 ; [#uses=1]
- %199 = load float* %198, align 8 ; [#uses=1]
- %200 = fcmp olt float %197, %199 ; [#uses=1]
- br i1 %200, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb.i, %entry
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb.i
- %iftmp.164.0.i = phi i8 [ 0, %bb2.i ], [ 1, %bb.i ] ; [#uses=1]
- %201 = getelementptr inbounds %struct.btQuadWord* %aabbMin0, i32 0, i32 0, i32 2 ; [#uses=1]
- %202 = load float* %201, align 8 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btQuadWord* %aabbMax1, i32 0, i32 0, i32 2 ; [#uses=1]
- %204 = load float* %203, align 8 ; [#uses=1]
- %205 = fcmp ogt float %202, %204 ; [#uses=1]
- br i1 %205, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %206 = getelementptr inbounds %struct.btQuadWord* %aabbMax0, i32 0, i32 0, i32 2 ; [#uses=1]
- %207 = load float* %206, align 8 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btQuadWord* %aabbMin1, i32 0, i32 0, i32 2 ; [#uses=1]
- %209 = load float* %208, align 8 ; [#uses=1]
- %210 = fcmp olt float %207, %209 ; [#uses=1]
- br i1 %210, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i
- %iftmp.165.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.164.0.i, %bb4.i ] ; [#uses=1]
- %211 = getelementptr inbounds %struct.btQuadWord* %aabbMin0, i32 0, i32 0, i32 1 ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=1]
- %213 = getelementptr inbounds %struct.btQuadWord* %aabbMax1, i32 0, i32 0, i32 1 ; [#uses=1]
- %214 = load float* %213, align 4 ; [#uses=1]
- %215 = fcmp ogt float %212, %214 ; [#uses=1]
- br i1 %215, label %return, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i
- %216 = getelementptr inbounds %struct.btQuadWord* %aabbMax0, i32 0, i32 0, i32 1 ; [#uses=1]
- %217 = load float* %216, align 4 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btQuadWord* %aabbMin1, i32 0, i32 0, i32 1 ; [#uses=1]
- %219 = load float* %218, align 4 ; [#uses=1]
- %220 = fcmp olt float %217, %219 ; [#uses=1]
- %phitmp25 = icmp eq i8 %iftmp.165.0.i, 0 ; [#uses=1]
- %phitmp = or i1 %220, %phitmp25 ; [#uses=1]
- br i1 %phitmp, label %return, label %bb
-
-bb: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
- %221 = load %struct.btCollisionObject** %2, align 4 ; [#uses=16]
- %222 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %223 = load float* %160, align 8 ; [#uses=1]
- store float %223, float* %222, align 4
- %224 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %225 = load float* %161, align 4 ; [#uses=1]
- store float %225, float* %224, align 4
- %226 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %227 = load float* %162, align 8 ; [#uses=1]
- store float %227, float* %226, align 4
- %228 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %229 = load float* %163, align 4 ; [#uses=1]
- store float %229, float* %228, align 4
- %230 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %231 = load float* %164, align 8 ; [#uses=1]
- store float %231, float* %230, align 4
- %232 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %233 = load float* %165, align 4 ; [#uses=1]
- store float %233, float* %232, align 4
- %234 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %235 = load float* %166, align 8 ; [#uses=1]
- store float %235, float* %234, align 4
- %236 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %237 = load float* %167, align 4 ; [#uses=1]
- store float %237, float* %236, align 4
- %238 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %239 = load float* %168, align 8 ; [#uses=1]
- store float %239, float* %238, align 4
- %240 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %241 = load float* %169, align 4 ; [#uses=1]
- store float %241, float* %240, align 4
- %242 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %243 = load float* %170, align 8 ; [#uses=1]
- store float %243, float* %242, align 4
- %244 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %245 = load float* %171, align 4 ; [#uses=1]
- store float %245, float* %244, align 4
- %246 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %247 = load float* %172, align 8 ; [#uses=1]
- store float %247, float* %246, align 4
- %248 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %249 = load float* %173, align 4 ; [#uses=1]
- store float %249, float* %248, align 4
- %250 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %251 = load float* %174, align 8 ; [#uses=1]
- store float %251, float* %250, align 4
- %252 = getelementptr inbounds %struct.btCollisionObject* %221, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %253 = load float* %175, align 4 ; [#uses=1]
- store float %253, float* %252, align 4
- %254 = load %struct.btCollisionObject** %2, align 4 ; [#uses=16]
- %255 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %256 = load float* %160, align 8 ; [#uses=1]
- store float %256, float* %255, align 4
- %257 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %258 = load float* %161, align 4 ; [#uses=1]
- store float %258, float* %257, align 4
- %259 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %260 = load float* %162, align 8 ; [#uses=1]
- store float %260, float* %259, align 4
- %261 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %262 = load float* %163, align 4 ; [#uses=1]
- store float %262, float* %261, align 4
- %263 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %264 = load float* %164, align 8 ; [#uses=1]
- store float %264, float* %263, align 4
- %265 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %266 = load float* %165, align 4 ; [#uses=1]
- store float %266, float* %265, align 4
- %267 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %268 = load float* %166, align 8 ; [#uses=1]
- store float %268, float* %267, align 4
- %269 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %270 = load float* %167, align 4 ; [#uses=1]
- store float %270, float* %269, align 4
- %271 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %272 = load float* %168, align 8 ; [#uses=1]
- store float %272, float* %271, align 4
- %273 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %274 = load float* %169, align 4 ; [#uses=1]
- store float %274, float* %273, align 4
- %275 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %276 = load float* %170, align 8 ; [#uses=1]
- store float %276, float* %275, align 4
- %277 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %278 = load float* %171, align 4 ; [#uses=1]
- store float %278, float* %277, align 4
- %279 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %280 = load float* %172, align 8 ; [#uses=1]
- store float %280, float* %279, align 4
- %281 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %282 = load float* %173, align 4 ; [#uses=1]
- store float %282, float* %281, align 4
- %283 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %284 = load float* %174, align 8 ; [#uses=1]
- store float %284, float* %283, align 4
- %285 = getelementptr inbounds %struct.btCollisionObject* %254, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %286 = load float* %175, align 4 ; [#uses=1]
- store float %286, float* %285, align 4
- %287 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %288 = getelementptr inbounds %struct.btCollisionObject* %287, i32 0, i32 9 ; [#uses=2]
- %289 = load %struct.btCollisionShape** %288, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %childShape, %struct.btCollisionShape** %288, align 4
- %290 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 6 ; [#uses=2]
- %291 = load %struct.btCollisionAlgorithm*** %290, align 4 ; [#uses=1]
- %292 = getelementptr inbounds %struct.btCollisionAlgorithm** %291, i32 %index ; [#uses=2]
- %293 = load %struct.btCollisionAlgorithm** %292, align 4 ; [#uses=1]
- %294 = icmp eq %struct.btCollisionAlgorithm* %293, null ; [#uses=1]
- br i1 %294, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %295 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 3 ; [#uses=1]
- %296 = load %struct.btActionInterface** %295, align 4 ; [#uses=2]
- %297 = getelementptr inbounds %struct.btActionInterface* %296, i32 0, i32 0 ; [#uses=1]
- %298 = load i32 (...)*** %297, align 4 ; [#uses=1]
- %299 = getelementptr inbounds i32 (...)** %298, i32 2 ; [#uses=1]
- %300 = load i32 (...)** %299, align 4 ; [#uses=1]
- %301 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 7 ; [#uses=1]
- %302 = load %struct.btPersistentManifold** %301, align 4 ; [#uses=1]
- %303 = load %struct.btCollisionObject** %181, align 4 ; [#uses=1]
- %304 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %305 = bitcast i32 (...)* %300 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %306 = call %struct.btCollisionAlgorithm* %305(%struct.btActionInterface* %296, %struct.btCollisionObject* %304, %struct.btCollisionObject* %303, %struct.btPersistentManifold* %302) ; [#uses=1]
- store %struct.btCollisionAlgorithm* %306, %struct.btCollisionAlgorithm** %292, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %307 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 5 ; [#uses=2]
- %308 = load %struct.btManifoldResult** %307, align 4 ; [#uses=4]
- %309 = getelementptr inbounds %struct.btManifoldResult* %308, i32 0, i32 4 ; [#uses=1]
- %310 = load %struct.btCollisionObject** %309, align 4 ; [#uses=1]
- %311 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %312 = icmp eq %struct.btCollisionObject* %310, %311 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btManifoldResult* %308, i32 0, i32 0, i32 0 ; [#uses=1]
- %314 = load i32 (...)*** %313, align 4 ; [#uses=2]
- br i1 %312, label %bb4, label %bb5
-
-bb4: ; preds = %bb2
- %315 = getelementptr inbounds i32 (...)** %314, i32 2 ; [#uses=1]
- %316 = load i32 (...)** %315, align 4 ; [#uses=1]
- %317 = bitcast i32 (...)* %316 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %317(%struct.btManifoldResult* %308, i32 -1, i32 %index)
- br label %bb6
-
-bb5: ; preds = %bb2
- %318 = getelementptr inbounds i32 (...)** %314, i32 3 ; [#uses=1]
- %319 = load i32 (...)** %318, align 4 ; [#uses=1]
- %320 = bitcast i32 (...)* %319 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %320(%struct.btManifoldResult* %308, i32 -1, i32 %index)
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %321 = load %struct.btCollisionAlgorithm*** %290, align 4 ; [#uses=1]
- %322 = getelementptr inbounds %struct.btCollisionAlgorithm** %321, i32 %index ; [#uses=1]
- %323 = load %struct.btCollisionAlgorithm** %322, align 4 ; [#uses=2]
- %324 = getelementptr inbounds %struct.btCollisionAlgorithm* %323, i32 0, i32 0 ; [#uses=1]
- %325 = load i32 (...)*** %324, align 4 ; [#uses=1]
- %326 = getelementptr inbounds i32 (...)** %325, i32 2 ; [#uses=1]
- %327 = load i32 (...)** %326, align 4 ; [#uses=1]
- %328 = load %struct.btManifoldResult** %307, align 4 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btCompoundLeafCallback* %this, i32 0, i32 4 ; [#uses=4]
- %330 = load %struct.btDispatcherInfo** %329, align 4 ; [#uses=1]
- %331 = load %struct.btCollisionObject** %181, align 4 ; [#uses=1]
- %332 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %333 = bitcast i32 (...)* %327 to void (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- call void %333(%struct.btCollisionAlgorithm* %323, %struct.btCollisionObject* %332, %struct.btCollisionObject* %331, %struct.btDispatcherInfo* %330, %struct.btManifoldResult* %328)
- %334 = load %struct.btDispatcherInfo** %329, align 4 ; [#uses=1]
- %335 = getelementptr inbounds %struct.btDispatcherInfo* %334, i32 0, i32 5 ; [#uses=1]
- %336 = load %struct.btActionInterface** %335, align 4 ; [#uses=3]
- %337 = icmp eq %struct.btActionInterface* %336, null ; [#uses=1]
- br i1 %337, label %bb13, label %bb7
-
-bb7: ; preds = %bb6
- %338 = getelementptr inbounds %struct.btActionInterface* %336, i32 0, i32 0 ; [#uses=1]
- %339 = load i32 (...)*** %338, align 4 ; [#uses=1]
- %340 = getelementptr inbounds i32 (...)** %339, i32 12 ; [#uses=1]
- %341 = load i32 (...)** %340, align 4 ; [#uses=1]
- %342 = bitcast i32 (...)* %341 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %343 = call i32 %342(%struct.btActionInterface* %336) ; [#uses=1]
- %344 = and i32 %343, 2 ; [#uses=1]
- %345 = icmp eq i32 %344, 0 ; [#uses=1]
- br i1 %345, label %bb13, label %bb12
-
-bb12: ; preds = %bb7
- %346 = load %struct.btDispatcherInfo** %329, align 4 ; [#uses=1]
- %347 = getelementptr inbounds %struct.btDispatcherInfo* %346, i32 0, i32 5 ; [#uses=2]
- %348 = load %struct.btActionInterface** %347, align 4 ; [#uses=1]
- %349 = getelementptr inbounds %struct.btActionInterface* %348, i32 0, i32 0 ; [#uses=1]
- %350 = load i32 (...)*** %349, align 4 ; [#uses=1]
- %351 = getelementptr inbounds i32 (...)** %350, i32 13 ; [#uses=1]
- %352 = load i32 (...)** %351, align 4 ; [#uses=1]
- %353 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %353, align 8
- %354 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %354, align 4
- %355 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %355, align 8
- %356 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %356, align 4
- %357 = load %struct.btActionInterface** %347, align 4 ; [#uses=1]
- %358 = bitcast i32 (...)* %352 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %358(%struct.btActionInterface* %357, %struct.btQuadWord* %aabbMin0, %struct.btQuadWord* %aabbMax0, %struct.btQuadWord* %1)
- %359 = load %struct.btDispatcherInfo** %329, align 4 ; [#uses=1]
- %360 = getelementptr inbounds %struct.btDispatcherInfo* %359, i32 0, i32 5 ; [#uses=2]
- %361 = load %struct.btActionInterface** %360, align 4 ; [#uses=1]
- %362 = getelementptr inbounds %struct.btActionInterface* %361, i32 0, i32 0 ; [#uses=1]
- %363 = load i32 (...)*** %362, align 4 ; [#uses=1]
- %364 = getelementptr inbounds i32 (...)** %363, i32 13 ; [#uses=1]
- %365 = load i32 (...)** %364, align 4 ; [#uses=1]
- %366 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %366, align 8
- %367 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %367, align 4
- %368 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %368, align 8
- %369 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %369, align 4
- %370 = load %struct.btActionInterface** %360, align 4 ; [#uses=1]
- %371 = bitcast i32 (...)* %365 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %371(%struct.btActionInterface* %370, %struct.btQuadWord* %aabbMin1, %struct.btQuadWord* %aabbMax1, %struct.btQuadWord* %0)
- br label %bb13
-
-bb13: ; preds = %bb12, %bb7, %bb6
- %372 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %373 = getelementptr inbounds %struct.btCollisionObject* %372, i32 0, i32 9 ; [#uses=1]
- store %struct.btCollisionShape* %289, %struct.btCollisionShape** %373, align 4
- %374 = load %struct.btCollisionObject** %2, align 4 ; [#uses=16]
- %375 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %7, float* %375, align 4
- %376 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %9, float* %376, align 4
- %377 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %377, align 4
- %378 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %13, float* %378, align 4
- %379 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %15, float* %379, align 4
- %380 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %17, float* %380, align 4
- %381 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %381, align 4
- %382 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %21, float* %382, align 4
- %383 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %23, float* %383, align 4
- %384 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %25, float* %384, align 4
- %385 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %27, float* %385, align 4
- %386 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %29, float* %386, align 4
- %387 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %31, float* %387, align 4
- %388 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %33, float* %388, align 4
- %389 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %35, float* %389, align 4
- %390 = getelementptr inbounds %struct.btCollisionObject* %374, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %37, float* %390, align 4
- %391 = load %struct.btCollisionObject** %2, align 4 ; [#uses=16]
- %392 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %39, float* %392, align 4
- %393 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %41, float* %393, align 4
- %394 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %43, float* %394, align 4
- %395 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %45, float* %395, align 4
- %396 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %47, float* %396, align 4
- %397 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %49, float* %397, align 4
- %398 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %51, float* %398, align 4
- %399 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %53, float* %399, align 4
- %400 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %55, float* %400, align 4
- %401 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %57, float* %401, align 4
- %402 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %59, float* %402, align 4
- %403 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %61, float* %403, align 4
- %404 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %63, float* %404, align 4
- %405 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %65, float* %405, align 4
- %406 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %67, float* %406, align 4
- %407 = getelementptr inbounds %struct.btCollisionObject* %391, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %69, float* %407, align 4
- ret void
-
-return: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb7.i
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE6resizeEiRKS1_(%"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* nocapture %this, i32 %newsize, %struct.btCollisionAlgorithm** nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 2 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to %struct.btCollisionAlgorithm** ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi %struct.btCollisionAlgorithm** [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIP20btCollisionAlgorithmE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr %struct.btCollisionAlgorithm** %11, i32 %indvar.i.i ; [#uses=2]
- %14 = icmp eq %struct.btCollisionAlgorithm** %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %15 = load %struct.btCollisionAlgorithm*** %13, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btCollisionAlgorithm** %15, i32 %indvar.i.i ; [#uses=1]
- %16 = load %struct.btCollisionAlgorithm** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %16, %struct.btCollisionAlgorithm** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond19 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond19, label %_ZNK20btAlignedObjectArrayIP20btCollisionAlgorithmE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP20btCollisionAlgorithmE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE8allocateEi.exit.i
- %17 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %this, i32 0, i32 3 ; [#uses=3]
- %18 = load %struct.btCollisionAlgorithm*** %17, align 4 ; [#uses=2]
- %19 = icmp eq %struct.btCollisionAlgorithm** %18, null ; [#uses=1]
- br i1 %19, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP20btCollisionAlgorithmE4copyEiiPS1_.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %this, i32 0, i32 4 ; [#uses=1]
- %21 = load i8* %20, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %21, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %22 = bitcast %struct.btCollisionAlgorithm** %18 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %22)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %17, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP20btCollisionAlgorithmE4copyEiiPS1_.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %23, align 4
- store %struct.btCollisionAlgorithm** %11, %struct.btCollisionAlgorithm*** %17, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %this, i32 0, i32 3 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=1]
- %25 = load %struct.btCollisionAlgorithm*** %24, align 4 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btCollisionAlgorithm** %25, i32 %tmp17 ; [#uses=2]
- %26 = icmp eq %struct.btCollisionAlgorithm** %scevgep18, null ; [#uses=1]
- br i1 %26, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %27 = load %struct.btCollisionAlgorithm** %fillData, align 4 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %27, %struct.btCollisionAlgorithm** %scevgep18, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN28btCompoundCollisionAlgorithm26preallocateChildAlgorithmsEP17btCollisionObjectS1_(%struct.btCompoundCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = alloca %struct.btCollisionAlgorithm*, align 4 ; [#uses=2]
- %1 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=2]
- %iftmp.284.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %iftmp.285.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btCollisionObject* %iftmp.284.0, i32 0, i32 9 ; [#uses=4]
- %4 = load %struct.btCollisionShape** %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btCollisionShape* %4, i32 1, i32 1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=3]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %0, align 4
- %7 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE6resizeEiRKS1_(%"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %7, i32 %6, %struct.btCollisionAlgorithm** %0) inlinehint
- %8 = icmp sgt i32 %6, 0 ; [#uses=1]
- br i1 %8, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %9 = getelementptr inbounds %struct.btCollisionShape* %4, i32 5, i32 1 ; [#uses=1]
- %10 = bitcast i32* %9 to %struct.btDbvt** ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionShape* %4, i32 2 ; [#uses=1]
- %12 = bitcast %struct.btCollisionShape* %11 to %struct.btCompoundShapeChild** ; [#uses=1]
- %13 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb11, %bb.nph
- %i.014 = phi i32 [ 0, %bb.nph ], [ %31, %bb11 ] ; [#uses=4]
- %16 = load %struct.btDbvt** %10, align 4 ; [#uses=1]
- %17 = icmp eq %struct.btDbvt* %16, null ; [#uses=1]
- br i1 %17, label %bb10, label %bb9
-
-bb9: ; preds = %bb7
- %18 = load %struct.btCollisionAlgorithm*** %13, align 4 ; [#uses=1]
- %scevgep16 = getelementptr %struct.btCollisionAlgorithm** %18, i32 %i.014 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %scevgep16, align 4
- br label %bb11
-
-bb10: ; preds = %bb7
- %19 = load %struct.btCollisionShape** %3, align 4 ; [#uses=1]
- %20 = load %struct.btCompoundShapeChild** %12, align 4 ; [#uses=1]
- %scevgep15 = getelementptr %struct.btCompoundShapeChild* %20, i32 %i.014, i32 1 ; [#uses=1]
- %21 = load %struct.btCollisionShape** %scevgep15, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %21, %struct.btCollisionShape** %3, align 4
- %22 = load %struct.btCollisionAlgorithm*** %13, align 4 ; [#uses=1]
- %23 = load %struct.btActionInterface** %14, align 4 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btActionInterface* %23, i32 0, i32 0 ; [#uses=1]
- %25 = load i32 (...)*** %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32 (...)** %25, i32 2 ; [#uses=1]
- %27 = load i32 (...)** %26, align 4 ; [#uses=1]
- %28 = load %struct.btPersistentManifold** %15, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %27 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %30 = call %struct.btCollisionAlgorithm* %29(%struct.btActionInterface* %23, %struct.btCollisionObject* %iftmp.284.0, %struct.btCollisionObject* %iftmp.285.0, %struct.btPersistentManifold* %28) ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionAlgorithm** %22, i32 %i.014 ; [#uses=1]
- store %struct.btCollisionAlgorithm* %30, %struct.btCollisionAlgorithm** %scevgep, align 4
- store %struct.btCollisionShape* %19, %struct.btCollisionShape** %3, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9
- %31 = add nsw i32 %i.014, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %31, %6 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb7
-
-return: ; preds = %bb11, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btCompoundCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btCompoundCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %0 = alloca %struct.btCollisionAlgorithm*, align 4 ; [#uses=2]
- %callback = alloca %struct.btCompoundLeafCallback, align 8 ; [#uses=10]
- %manifoldArray = alloca %"struct.btAlignedObjectArray<btPersistentManifold*>", align 8 ; [#uses=5]
- %localAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %localAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %otherInCompoundSpace = alloca %struct.btTransform, align 8 ; [#uses=17]
- %bounds = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %newChildWorldTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %aabbMin0 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMax0 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMin1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMax1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %1 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %2 = load i8* %1, align 4 ; [#uses=2]
- %toBool = icmp eq i8 %2, 0 ; [#uses=2]
- %iftmp.296.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=26]
- %iftmp.297.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=16]
- %3 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 9 ; [#uses=1]
- %4 = load %struct.btCollisionShape** %3, align 4 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btCollisionShape* %4, i32 5, i32 2 ; [#uses=1]
- %6 = bitcast i8** %5 to i32* ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = icmp eq i32 %7, %9 ; [#uses=1]
- br i1 %10, label %bb9, label %bb8
-
-bb8: ; preds = %entry
- %11 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=2]
- %13 = icmp sgt i32 %12, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i, label %_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit
-
-bb.nph.i: ; preds = %bb8
- %14 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb2.i, %bb.nph.i
- %i.05.i = phi i32 [ 0, %bb.nph.i ], [ %32, %bb2.i ] ; [#uses=3]
- %16 = load %struct.btCollisionAlgorithm*** %14, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionAlgorithm** %16, i32 %i.05.i ; [#uses=1]
- %17 = load %struct.btCollisionAlgorithm** %scevgep.i, align 4 ; [#uses=3]
- %18 = icmp eq %struct.btCollisionAlgorithm* %17, null ; [#uses=1]
- br i1 %18, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %19 = getelementptr inbounds %struct.btCollisionAlgorithm* %17, i32 0, i32 0 ; [#uses=1]
- %20 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %21 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- call void %22(%struct.btCollisionAlgorithm* %17)
- %23 = load %struct.btActionInterface** %15, align 4 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btActionInterface* %23, i32 0, i32 0 ; [#uses=1]
- %25 = load i32 (...)*** %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32 (...)** %25, i32 13 ; [#uses=1]
- %27 = load i32 (...)** %26, align 4 ; [#uses=1]
- %28 = load %struct.btCollisionAlgorithm*** %14, align 4 ; [#uses=1]
- %scevgep6.i = getelementptr %struct.btCollisionAlgorithm** %28, i32 %i.05.i ; [#uses=1]
- %29 = load %struct.btCollisionAlgorithm** %scevgep6.i, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %27 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %31 = bitcast %struct.btCollisionAlgorithm* %29 to i8* ; [#uses=1]
- call void %30(%struct.btActionInterface* %23, i8* %31)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- %32 = add nsw i32 %i.05.i, 1 ; [#uses=2]
- %exitcond183 = icmp eq i32 %32, %12 ; [#uses=1]
- br i1 %exitcond183, label %_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit.loopexit, label %bb.i
-
-_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit.loopexit: ; preds = %bb2.i
- %.pre = load i8* %1, align 4 ; [#uses=1]
- br label %_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit
-
-_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit: ; preds = %_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit.loopexit, %bb8
- %33 = phi i8 [ %.pre, %_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit.loopexit ], [ %2, %bb8 ] ; [#uses=1]
- %toBool.i = icmp eq i8 %33, 0 ; [#uses=2]
- %iftmp.284.0.i = select i1 %toBool.i, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %iftmp.285.0.i = select i1 %toBool.i, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btCollisionObject* %iftmp.284.0.i, i32 0, i32 9 ; [#uses=4]
- %35 = load %struct.btCollisionShape** %34, align 4 ; [#uses=3]
- %36 = getelementptr inbounds %struct.btCollisionShape* %35, i32 1, i32 1 ; [#uses=1]
- %37 = load i32* %36, align 4 ; [#uses=3]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %0, align 4
- %38 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmE6resizeEiRKS1_(%"struct.btAlignedObjectArray<btCollisionAlgorithm*>"* %38, i32 %37, %struct.btCollisionAlgorithm** %0) inlinehint
- %39 = icmp sgt i32 %37, 0 ; [#uses=1]
- br i1 %39, label %bb.nph.i103, label %bb9
-
-bb.nph.i103: ; preds = %_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit
- %40 = getelementptr inbounds %struct.btCollisionShape* %35, i32 5, i32 1 ; [#uses=1]
- %41 = bitcast i32* %40 to %struct.btDbvt** ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCollisionShape* %35, i32 2 ; [#uses=1]
- %43 = bitcast %struct.btCollisionShape* %42 to %struct.btCompoundShapeChild** ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb11.i, %bb.nph.i103
- %i.014.i = phi i32 [ 0, %bb.nph.i103 ], [ %62, %bb11.i ] ; [#uses=4]
- %47 = load %struct.btDbvt** %41, align 4 ; [#uses=1]
- %48 = icmp eq %struct.btDbvt* %47, null ; [#uses=1]
- br i1 %48, label %bb10.i, label %bb9.i
-
-bb9.i: ; preds = %bb7.i
- %49 = load %struct.btCollisionAlgorithm*** %44, align 4 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.btCollisionAlgorithm** %49, i32 %i.014.i ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %scevgep16.i, align 4
- br label %bb11.i
-
-bb10.i: ; preds = %bb7.i
- %50 = load %struct.btCollisionShape** %34, align 4 ; [#uses=1]
- %51 = load %struct.btCompoundShapeChild** %43, align 4 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.btCompoundShapeChild* %51, i32 %i.014.i, i32 1 ; [#uses=1]
- %52 = load %struct.btCollisionShape** %scevgep15.i, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %52, %struct.btCollisionShape** %34, align 4
- %53 = load %struct.btCollisionAlgorithm*** %44, align 4 ; [#uses=1]
- %54 = load %struct.btActionInterface** %45, align 4 ; [#uses=2]
- %55 = getelementptr inbounds %struct.btActionInterface* %54, i32 0, i32 0 ; [#uses=1]
- %56 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 2 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = load %struct.btPersistentManifold** %46, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %58 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %61 = call %struct.btCollisionAlgorithm* %60(%struct.btActionInterface* %54, %struct.btCollisionObject* %iftmp.284.0.i, %struct.btCollisionObject* %iftmp.285.0.i, %struct.btPersistentManifold* %59) ; [#uses=1]
- %scevgep.i104 = getelementptr %struct.btCollisionAlgorithm** %53, i32 %i.014.i ; [#uses=1]
- store %struct.btCollisionAlgorithm* %61, %struct.btCollisionAlgorithm** %scevgep.i104, align 4
- store %struct.btCollisionShape* %50, %struct.btCollisionShape** %34, align 4
- br label %bb11.i
-
-bb11.i: ; preds = %bb10.i, %bb9.i
- %62 = add nsw i32 %i.014.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %62, %37 ; [#uses=1]
- br i1 %exitcond, label %bb9, label %bb7.i
-
-bb9: ; preds = %bb11.i, %_ZN28btCompoundCollisionAlgorithm21removeChildAlgorithmsEv.exit, %entry
- %63 = getelementptr inbounds %struct.btCollisionShape* %4, i32 5, i32 1 ; [#uses=1]
- %64 = bitcast i32* %63 to %struct.btDbvt** ; [#uses=1]
- %65 = load %struct.btDbvt** %64, align 4 ; [#uses=3]
- %66 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %67 = load %struct.btPersistentManifold** %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=6]
- %69 = load %struct.btCollisionAlgorithm*** %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %71 = load %struct.btActionInterface** %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV22btCompoundLeafCallback, i32 0, i32 2), i32 (...)*** %72, align 8
- %73 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.296.0, %struct.btCollisionObject** %73, align 4
- %74 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.297.0, %struct.btCollisionObject** %74, align 8
- %75 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 3 ; [#uses=1]
- store %struct.btActionInterface* %71, %struct.btActionInterface** %75, align 4
- %76 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 4 ; [#uses=1]
- store %struct.btDispatcherInfo* %dispatchInfo, %struct.btDispatcherInfo** %76, align 8
- %77 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 5 ; [#uses=1]
- store %struct.btManifoldResult* %resultOut, %struct.btManifoldResult** %77, align 4
- %78 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 6 ; [#uses=1]
- store %struct.btCollisionAlgorithm** %69, %struct.btCollisionAlgorithm*** %78, align 8
- %79 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 7 ; [#uses=1]
- store %struct.btPersistentManifold* %67, %struct.btPersistentManifold** %79, align 4
- %80 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 4 ; [#uses=6]
- store i8 1, i8* %80, align 8
- %81 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 3 ; [#uses=8]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %81, align 4
- %82 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 1 ; [#uses=5]
- store i32 0, i32* %82, align 4
- %83 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 2 ; [#uses=4]
- store i32 0, i32* %83, align 8
- %84 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %85 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- %86 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=2]
- %88 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=2]
- br label %bb24
-
-bb10: ; preds = %bb24
- %89 = load %struct.btCollisionAlgorithm*** %68, align 4 ; [#uses=1]
- %scevgep208 = getelementptr %struct.btCollisionAlgorithm** %89, i32 %117 ; [#uses=1]
- %90 = load %struct.btCollisionAlgorithm** %scevgep208, align 4 ; [#uses=3]
- %91 = icmp eq %struct.btCollisionAlgorithm* %90, null ; [#uses=1]
- br i1 %91, label %bb23, label %bb12
-
-bb12: ; preds = %bb10
- %92 = getelementptr inbounds %struct.btCollisionAlgorithm* %90, i32 0, i32 0 ; [#uses=1]
- %93 = load i32 (...)*** %92, align 4 ; [#uses=1]
- %94 = getelementptr inbounds i32 (...)** %93, i32 4 ; [#uses=1]
- %95 = load i32 (...)** %94, align 4 ; [#uses=1]
- %96 = bitcast i32 (...)* %95 to void (%struct.btCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* ; [#uses=1]
- invoke void %96(%struct.btCollisionAlgorithm* %90, %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray)
- to label %bb19 unwind label %lpad76
-
-bb14: ; preds = %bb19
- %scevgep206 = getelementptr %struct.btPersistentManifold** %112, i32 %109 ; [#uses=1]
- %97 = load %struct.btPersistentManifold** %scevgep206, align 4 ; [#uses=5]
- %98 = getelementptr inbounds %struct.btPersistentManifold* %97, i32 0, i32 4 ; [#uses=2]
- %99 = load i32* %98, align 4 ; [#uses=1]
- %100 = icmp eq i32 %99, 0 ; [#uses=1]
- br i1 %100, label %bb18, label %bb16
-
-bb16: ; preds = %bb14
- store %struct.btPersistentManifold* %97, %struct.btPersistentManifold** %85, align 4
- %101 = load i32* %98, align 4 ; [#uses=1]
- %102 = icmp eq i32 %101, 0 ; [#uses=1]
- br i1 %102, label %invcont17, label %bb.i116
-
-bb.i116: ; preds = %bb16
- %103 = getelementptr inbounds %struct.btPersistentManifold* %97, i32 0, i32 2 ; [#uses=1]
- %104 = load i8** %103, align 4 ; [#uses=1]
- %105 = load %struct.btCollisionObject** %86, align 4 ; [#uses=1]
- %106 = bitcast %struct.btCollisionObject* %105 to i8* ; [#uses=1]
- %107 = icmp eq i8* %104, %106 ; [#uses=1]
- br i1 %107, label %bb3.i118, label %bb2.i117
-
-bb2.i117: ; preds = %bb.i116
- invoke void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %97, %struct.btTransform* %87, %struct.btTransform* %88)
- to label %invcont17 unwind label %lpad76
-
-bb3.i118: ; preds = %bb.i116
- invoke void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %97, %struct.btTransform* %88, %struct.btTransform* %87)
- to label %invcont17 unwind label %lpad76
-
-invcont17: ; preds = %bb3.i118, %bb2.i117, %bb16
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %85, align 4
- br label %bb18
-
-bb18: ; preds = %invcont17, %bb14
- %108 = add nsw i32 %109, 1 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb18, %bb12
- %109 = phi i32 [ %108, %bb18 ], [ 0, %bb12 ] ; [#uses=3]
- %110 = load i32* %82, align 4 ; [#uses=1]
- %111 = icmp sgt i32 %110, %109 ; [#uses=1]
- %112 = load %struct.btPersistentManifold*** %81, align 4 ; [#uses=3]
- br i1 %111, label %bb14, label %bb21
-
-bb21: ; preds = %bb19
- %113 = icmp eq %struct.btPersistentManifold** %112, null ; [#uses=1]
- br i1 %113, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %bb21
- %114 = load i8* %80, align 8 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %114, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %115 = bitcast %struct.btPersistentManifold** %112 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %115)
- to label %bb2.i.i unwind label %lpad76
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %81, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE5clearEv.exit
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE5clearEv.exit: ; preds = %bb2.i.i, %bb21
- store i8 1, i8* %80, align 8
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %81, align 4
- store i32 0, i32* %82, align 4
- store i32 0, i32* %83, align 8
- br label %bb23
-
-bb23: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE5clearEv.exit, %bb10
- %116 = add nsw i32 %117, 1 ; [#uses=1]
- br label %bb24
-
-bb24: ; preds = %bb23, %bb9
- %117 = phi i32 [ %116, %bb23 ], [ 0, %bb9 ] ; [#uses=3]
- %118 = load i32* %84, align 4 ; [#uses=1]
- %119 = icmp sgt i32 %118, %117 ; [#uses=1]
- br i1 %119, label %bb10, label %invcont30
-
-invcont30: ; preds = %bb24
- store i8 1, i8* %80, align 8
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %81, align 4
- store i32 0, i32* %82, align 4
- store i32 0, i32* %83, align 8
- %120 = icmp eq %struct.btDbvt* %65, null ; [#uses=1]
- br i1 %120, label %bb36, label %invcont33
-
-invcont33: ; preds = %invcont30
- %121 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=5]
- %131 = load float* %128, align 4 ; [#uses=5]
- %132 = load float* %127, align 4 ; [#uses=5]
- %133 = load float* %126, align 4 ; [#uses=5]
- %134 = load float* %125, align 4 ; [#uses=5]
- %135 = load float* %124, align 4 ; [#uses=5]
- %136 = load float* %123, align 4 ; [#uses=5]
- %137 = load float* %122, align 4 ; [#uses=5]
- %138 = load float* %121, align 4 ; [#uses=5]
- %139 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %140 = load float* %139, align 4 ; [#uses=1]
- %141 = fsub float -0.000000e+00, %140 ; [#uses=3]
- %142 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %143 = load float* %142, align 4 ; [#uses=1]
- %144 = fsub float -0.000000e+00, %143 ; [#uses=3]
- %145 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %146 = load float* %145, align 4 ; [#uses=1]
- %147 = fsub float -0.000000e+00, %146 ; [#uses=3]
- %148 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=3]
- %150 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=3]
- %152 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=3]
- %154 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=3]
- %156 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %157 = load float* %156, align 4 ; [#uses=3]
- %158 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=3]
- %160 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %161 = load float* %160, align 4 ; [#uses=3]
- %162 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=3]
- %164 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=3]
- %166 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %167 = load float* %166, align 4 ; [#uses=3]
- %168 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=3]
- %170 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=3]
- %172 = fmul float %131, %151 ; [#uses=1]
- %173 = fmul float %130, %149 ; [#uses=1]
- %174 = fmul float %134, %151 ; [#uses=1]
- %175 = fmul float %133, %149 ; [#uses=1]
- %176 = fmul float %137, %151 ; [#uses=1]
- %177 = fmul float %136, %149 ; [#uses=1]
- %178 = fmul float %136, %147 ; [#uses=1]
- %179 = fmul float %137, %144 ; [#uses=1]
- %180 = fmul float %133, %147 ; [#uses=1]
- %181 = fmul float %134, %144 ; [#uses=1]
- %182 = fmul float %130, %147 ; [#uses=1]
- %183 = fmul float %131, %144 ; [#uses=1]
- %184 = fmul float %169, %131 ; [#uses=1]
- %185 = fmul float %167, %130 ; [#uses=1]
- %186 = fmul float %163, %131 ; [#uses=1]
- %187 = fmul float %161, %130 ; [#uses=1]
- %188 = fmul float %157, %131 ; [#uses=1]
- %189 = fmul float %155, %130 ; [#uses=1]
- %190 = fmul float %169, %134 ; [#uses=1]
- %191 = fmul float %167, %133 ; [#uses=1]
- %192 = fmul float %163, %134 ; [#uses=1]
- %193 = fmul float %161, %133 ; [#uses=1]
- %194 = fmul float %157, %134 ; [#uses=1]
- %195 = fmul float %155, %133 ; [#uses=1]
- %196 = fmul float %169, %137 ; [#uses=1]
- %197 = fmul float %167, %136 ; [#uses=1]
- %198 = fmul float %163, %137 ; [#uses=1]
- %199 = fmul float %161, %136 ; [#uses=1]
- %200 = fmul float %157, %137 ; [#uses=1]
- %201 = fmul float %155, %136 ; [#uses=1]
- %202 = fmul float %132, %153 ; [#uses=1]
- %203 = fadd float %173, %172 ; [#uses=1]
- %204 = fmul float %135, %153 ; [#uses=1]
- %205 = fadd float %175, %174 ; [#uses=1]
- %206 = fmul float %138, %153 ; [#uses=1]
- %207 = fadd float %177, %176 ; [#uses=1]
- %208 = fadd float %178, %179 ; [#uses=1]
- %209 = fmul float %138, %141 ; [#uses=1]
- %210 = fadd float %180, %181 ; [#uses=1]
- %211 = fmul float %135, %141 ; [#uses=1]
- %212 = fadd float %182, %183 ; [#uses=1]
- %213 = fmul float %132, %141 ; [#uses=1]
- %214 = fmul float %171, %132 ; [#uses=1]
- %215 = fadd float %185, %184 ; [#uses=1]
- %216 = fmul float %165, %132 ; [#uses=1]
- %217 = fadd float %187, %186 ; [#uses=1]
- %218 = fmul float %159, %132 ; [#uses=1]
- %219 = fadd float %189, %188 ; [#uses=1]
- %220 = fmul float %171, %135 ; [#uses=1]
- %221 = fadd float %191, %190 ; [#uses=1]
- %222 = fmul float %165, %135 ; [#uses=1]
- %223 = fadd float %193, %192 ; [#uses=1]
- %224 = fmul float %159, %135 ; [#uses=1]
- %225 = fadd float %195, %194 ; [#uses=1]
- %226 = fmul float %171, %138 ; [#uses=1]
- %227 = fadd float %197, %196 ; [#uses=1]
- %228 = fmul float %165, %138 ; [#uses=1]
- %229 = fadd float %199, %198 ; [#uses=1]
- %230 = fmul float %159, %138 ; [#uses=1]
- %231 = fadd float %201, %200 ; [#uses=1]
- %232 = fadd float %203, %202 ; [#uses=1]
- %233 = fadd float %205, %204 ; [#uses=1]
- %234 = fadd float %207, %206 ; [#uses=1]
- %235 = fadd float %208, %209 ; [#uses=1]
- %236 = fadd float %210, %211 ; [#uses=1]
- %237 = fadd float %212, %213 ; [#uses=1]
- %238 = fadd float %215, %214 ; [#uses=1]
- %239 = fadd float %217, %216 ; [#uses=1]
- %240 = fadd float %219, %218 ; [#uses=1]
- %241 = fadd float %221, %220 ; [#uses=1]
- %242 = fadd float %223, %222 ; [#uses=1]
- %243 = fadd float %225, %224 ; [#uses=1]
- %244 = fadd float %227, %226 ; [#uses=1]
- %245 = fadd float %229, %228 ; [#uses=1]
- %246 = fadd float %231, %230 ; [#uses=1]
- %247 = fadd float %232, %237 ; [#uses=1]
- %248 = fadd float %233, %236 ; [#uses=1]
- %249 = fadd float %234, %235 ; [#uses=1]
- %250 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %238, float* %250, align 8
- %251 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %239, float* %251, align 4
- %252 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %240, float* %252, align 8
- %253 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %253, align 4
- %254 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %241, float* %254, align 8
- %255 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %242, float* %255, align 4
- %256 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %243, float* %256, align 8
- %257 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %257, align 4
- %258 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %244, float* %258, align 8
- %259 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %245, float* %259, align 4
- %260 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %246, float* %260, align 8
- %261 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %261, align 4
- %262 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %247, float* %262, align 8
- %263 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %248, float* %263, align 4
- %264 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %249, float* %264, align 8
- %265 = getelementptr inbounds %struct.btTransform* %otherInCompoundSpace, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %265, align 4
- %266 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 9 ; [#uses=1]
- %267 = load %struct.btCollisionShape** %266, align 4 ; [#uses=2]
- %268 = getelementptr inbounds %struct.btCollisionShape* %267, i32 0, i32 0 ; [#uses=1]
- %269 = load i32 (...)*** %268, align 4 ; [#uses=1]
- %270 = getelementptr inbounds i32 (...)** %269, i32 2 ; [#uses=1]
- %271 = load i32 (...)** %270, align 4 ; [#uses=1]
- %272 = bitcast i32 (...)* %271 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %272(%struct.btCollisionShape* %267, %struct.btTransform* %otherInCompoundSpace, %struct.btQuadWord* %localAabbMin, %struct.btQuadWord* %localAabbMax)
- to label %invcont34 unwind label %lpad
-
-invcont34: ; preds = %invcont33
- %273 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %274 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %275 = load float* %274, align 8 ; [#uses=1]
- store float %275, float* %273, align 8
- %276 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %277 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %278 = load float* %277, align 4 ; [#uses=1]
- store float %278, float* %276, align 4
- %279 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %280 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %281 = load float* %280, align 8 ; [#uses=1]
- store float %281, float* %279, align 8
- %282 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %283 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %284 = load float* %283, align 4 ; [#uses=1]
- store float %284, float* %282, align 4
- %285 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %286 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %287 = load float* %286, align 8 ; [#uses=1]
- store float %287, float* %285, align 8
- %288 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %289 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %290 = load float* %289, align 4 ; [#uses=1]
- store float %290, float* %288, align 4
- %291 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %292 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %293 = load float* %292, align 8 ; [#uses=1]
- store float %293, float* %291, align 8
- %294 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %295 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %296 = load float* %295, align 4 ; [#uses=1]
- store float %296, float* %294, align 4
- %297 = getelementptr inbounds %struct.btDbvt* %65, i32 0, i32 0 ; [#uses=1]
- %298 = load %struct.btDbvtNode** %297, align 4 ; [#uses=1]
- %299 = getelementptr inbounds %struct.btCompoundLeafCallback* %callback, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN6btDbvt9collideTVEPK10btDbvtNodeRK12btDbvtAabbMmRNS_8ICollideE(%struct.btDbvt* %65, %struct.btDbvtNode* %298, %struct.GIM_AABB* %bounds, %struct.btActionInterface* %299) inlinehint
- to label %invcont46 unwind label %lpad
-
-bb36: ; preds = %invcont30
- %300 = load i32* %84, align 4 ; [#uses=1]
- %301 = getelementptr inbounds %struct.btCollisionShape* %4, i32 2 ; [#uses=1]
- %302 = bitcast %struct.btCollisionShape* %301 to %struct.btCompoundShapeChild** ; [#uses=1]
- br label %bb41
-
-invcont39: ; preds = %bb41
- %303 = load %struct.btCompoundShapeChild** %302, align 4 ; [#uses=1]
- %scevgep203 = getelementptr %struct.btCompoundShapeChild* %303, i32 %306, i32 1 ; [#uses=1]
- %304 = load %struct.btCollisionShape** %scevgep203, align 4 ; [#uses=1]
- invoke void @_ZN22btCompoundLeafCallback17ProcessChildShapeEP16btCollisionShapei(%struct.btCompoundLeafCallback* %callback, %struct.btCollisionShape* %304, i32 %306)
- to label %invcont40 unwind label %lpad
-
-invcont40: ; preds = %invcont39
- %305 = add nsw i32 %306, 1 ; [#uses=1]
- br label %bb41
-
-bb41: ; preds = %invcont40, %bb36
- %306 = phi i32 [ 0, %bb36 ], [ %305, %invcont40 ] ; [#uses=4]
- %307 = icmp slt i32 %306, %300 ; [#uses=1]
- br i1 %307, label %invcont39, label %invcont46
-
-invcont46: ; preds = %bb41, %invcont34
- %308 = load i32* %84, align 4 ; [#uses=1]
- %309 = getelementptr inbounds %struct.btCollisionShape* %4, i32 2 ; [#uses=1]
- %310 = bitcast %struct.btCollisionShape* %309 to %struct.btCompoundShapeChild** ; [#uses=1]
- %311 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %312 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %314 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %315 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %316 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %318 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %319 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %320 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %321 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %322 = getelementptr inbounds %struct.btCollisionObject* %iftmp.296.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %324 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %325 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %326 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %327 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %328 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %330 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %331 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %332 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %333 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %334 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %335 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %336 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %337 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %338 = getelementptr inbounds %struct.btTransform* %newChildWorldTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %339 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 9 ; [#uses=1]
- %340 = getelementptr inbounds %struct.btCollisionObject* %iftmp.297.0, i32 0, i32 1 ; [#uses=1]
- %341 = getelementptr inbounds %struct.btQuadWord* %aabbMin0, i32 0, i32 0, i32 0 ; [#uses=1]
- %342 = getelementptr inbounds %struct.btQuadWord* %aabbMax1, i32 0, i32 0, i32 0 ; [#uses=1]
- %343 = getelementptr inbounds %struct.btQuadWord* %aabbMin0, i32 0, i32 0, i32 2 ; [#uses=1]
- %344 = getelementptr inbounds %struct.btQuadWord* %aabbMax1, i32 0, i32 0, i32 2 ; [#uses=1]
- %345 = getelementptr inbounds %struct.btQuadWord* %aabbMin0, i32 0, i32 0, i32 1 ; [#uses=1]
- %346 = getelementptr inbounds %struct.btQuadWord* %aabbMax1, i32 0, i32 0, i32 1 ; [#uses=1]
- %347 = getelementptr inbounds %struct.btQuadWord* %aabbMax0, i32 0, i32 0, i32 1 ; [#uses=1]
- %348 = getelementptr inbounds %struct.btQuadWord* %aabbMin1, i32 0, i32 0, i32 1 ; [#uses=1]
- %349 = getelementptr inbounds %struct.btQuadWord* %aabbMax0, i32 0, i32 0, i32 2 ; [#uses=1]
- %350 = getelementptr inbounds %struct.btQuadWord* %aabbMin1, i32 0, i32 0, i32 2 ; [#uses=1]
- %351 = getelementptr inbounds %struct.btQuadWord* %aabbMax0, i32 0, i32 0, i32 0 ; [#uses=1]
- %352 = getelementptr inbounds %struct.btQuadWord* %aabbMin1, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb62
-
-bb47: ; preds = %bb62
- %353 = load %struct.btCollisionAlgorithm*** %68, align 4 ; [#uses=1]
- %scevgep198 = getelementptr %struct.btCollisionAlgorithm** %353, i32 %491 ; [#uses=1]
- %354 = load %struct.btCollisionAlgorithm** %scevgep198, align 4 ; [#uses=1]
- %355 = icmp eq %struct.btCollisionAlgorithm* %354, null ; [#uses=1]
- br i1 %355, label %bb61, label %invcont52
-
-invcont52: ; preds = %bb47
- %356 = load %struct.btCompoundShapeChild** %310, align 4 ; [#uses=13]
- %scevgep199 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 1 ; [#uses=1]
- %357 = load %struct.btCollisionShape** %scevgep199, align 4 ; [#uses=2]
- %358 = load float* %311, align 4 ; [#uses=4]
- %359 = load float* %312, align 4 ; [#uses=4]
- %360 = load float* %313, align 4 ; [#uses=4]
- %361 = load float* %314, align 4 ; [#uses=4]
- %362 = load float* %315, align 4 ; [#uses=4]
- %363 = load float* %316, align 4 ; [#uses=4]
- %364 = load float* %317, align 4 ; [#uses=4]
- %365 = load float* %318, align 4 ; [#uses=4]
- %366 = load float* %319, align 4 ; [#uses=4]
- %scevgep197 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %367 = load float* %scevgep197, align 4 ; [#uses=3]
- %scevgep196 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %368 = load float* %scevgep196, align 4 ; [#uses=3]
- %scevgep195 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %369 = load float* %scevgep195, align 4 ; [#uses=3]
- %scevgep194 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %370 = load float* %scevgep194, align 4 ; [#uses=3]
- %scevgep193 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %371 = load float* %scevgep193, align 4 ; [#uses=3]
- %scevgep192 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %372 = load float* %scevgep192, align 4 ; [#uses=3]
- %scevgep191 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %373 = load float* %scevgep191, align 4 ; [#uses=3]
- %scevgep190 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %374 = load float* %scevgep190, align 4 ; [#uses=3]
- %scevgep189 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %375 = load float* %scevgep189, align 4 ; [#uses=3]
- %scevgep187188 = getelementptr inbounds %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %376 = load float* %scevgep187188, align 4 ; [#uses=3]
- %scevgep185186 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %377 = load float* %scevgep185186, align 4 ; [#uses=3]
- %scevgep184 = getelementptr %struct.btCompoundShapeChild* %356, i32 %491, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %378 = load float* %scevgep184, align 4 ; [#uses=3]
- %379 = fmul float %359, %368 ; [#uses=1]
- %380 = fmul float %358, %367 ; [#uses=1]
- %381 = fmul float %362, %368 ; [#uses=1]
- %382 = fmul float %361, %367 ; [#uses=1]
- %383 = fmul float %365, %368 ; [#uses=1]
- %384 = fmul float %364, %367 ; [#uses=1]
- %385 = fmul float %377, %359 ; [#uses=1]
- %386 = fmul float %376, %358 ; [#uses=1]
- %387 = fmul float %374, %359 ; [#uses=1]
- %388 = fmul float %373, %358 ; [#uses=1]
- %389 = fmul float %371, %359 ; [#uses=1]
- %390 = fmul float %370, %358 ; [#uses=1]
- %391 = fmul float %377, %362 ; [#uses=1]
- %392 = fmul float %376, %361 ; [#uses=1]
- %393 = fmul float %374, %362 ; [#uses=1]
- %394 = fmul float %373, %361 ; [#uses=1]
- %395 = fmul float %371, %362 ; [#uses=1]
- %396 = fmul float %370, %361 ; [#uses=1]
- %397 = fmul float %377, %365 ; [#uses=1]
- %398 = fmul float %376, %364 ; [#uses=1]
- %399 = fmul float %374, %365 ; [#uses=1]
- %400 = fmul float %373, %364 ; [#uses=1]
- %401 = fmul float %371, %365 ; [#uses=1]
- %402 = fmul float %370, %364 ; [#uses=1]
- %403 = fmul float %360, %369 ; [#uses=1]
- %404 = fadd float %380, %379 ; [#uses=1]
- %405 = fmul float %363, %369 ; [#uses=1]
- %406 = fadd float %382, %381 ; [#uses=1]
- %407 = fmul float %366, %369 ; [#uses=1]
- %408 = fadd float %384, %383 ; [#uses=1]
- %409 = fmul float %378, %360 ; [#uses=1]
- %410 = fadd float %386, %385 ; [#uses=1]
- %411 = fmul float %375, %360 ; [#uses=1]
- %412 = fadd float %388, %387 ; [#uses=1]
- %413 = fmul float %372, %360 ; [#uses=1]
- %414 = fadd float %390, %389 ; [#uses=1]
- %415 = fmul float %378, %363 ; [#uses=1]
- %416 = fadd float %392, %391 ; [#uses=1]
- %417 = fmul float %375, %363 ; [#uses=1]
- %418 = fadd float %394, %393 ; [#uses=1]
- %419 = fmul float %372, %363 ; [#uses=1]
- %420 = fadd float %396, %395 ; [#uses=1]
- %421 = fmul float %378, %366 ; [#uses=1]
- %422 = fadd float %398, %397 ; [#uses=1]
- %423 = fmul float %375, %366 ; [#uses=1]
- %424 = fadd float %400, %399 ; [#uses=1]
- %425 = fmul float %372, %366 ; [#uses=1]
- %426 = fadd float %402, %401 ; [#uses=1]
- %427 = fadd float %404, %403 ; [#uses=1]
- %428 = fadd float %406, %405 ; [#uses=1]
- %429 = fadd float %408, %407 ; [#uses=1]
- %430 = load float* %320, align 4 ; [#uses=1]
- %431 = load float* %321, align 4 ; [#uses=1]
- %432 = load float* %322, align 4 ; [#uses=1]
- %433 = fadd float %410, %409 ; [#uses=1]
- %434 = fadd float %412, %411 ; [#uses=1]
- %435 = fadd float %414, %413 ; [#uses=1]
- %436 = fadd float %416, %415 ; [#uses=1]
- %437 = fadd float %418, %417 ; [#uses=1]
- %438 = fadd float %420, %419 ; [#uses=1]
- %439 = fadd float %422, %421 ; [#uses=1]
- %440 = fadd float %424, %423 ; [#uses=1]
- %441 = fadd float %426, %425 ; [#uses=1]
- %442 = fadd float %427, %430 ; [#uses=1]
- %443 = fadd float %428, %431 ; [#uses=1]
- %444 = fadd float %429, %432 ; [#uses=1]
- store float %433, float* %323, align 8
- store float %434, float* %324, align 4
- store float %435, float* %325, align 8
- store float 0.000000e+00, float* %326, align 4
- store float %436, float* %327, align 8
- store float %437, float* %328, align 4
- store float %438, float* %329, align 8
- store float 0.000000e+00, float* %330, align 4
- store float %439, float* %331, align 8
- store float %440, float* %332, align 4
- store float %441, float* %333, align 8
- store float 0.000000e+00, float* %334, align 4
- store float %442, float* %335, align 8
- store float %443, float* %336, align 4
- store float %444, float* %337, align 8
- store float 0.000000e+00, float* %338, align 4
- %445 = getelementptr inbounds %struct.btCollisionShape* %357, i32 0, i32 0 ; [#uses=1]
- %446 = load i32 (...)*** %445, align 4 ; [#uses=1]
- %447 = getelementptr inbounds i32 (...)** %446, i32 2 ; [#uses=1]
- %448 = load i32 (...)** %447, align 4 ; [#uses=1]
- %449 = bitcast i32 (...)* %448 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %449(%struct.btCollisionShape* %357, %struct.btTransform* %newChildWorldTrans, %struct.btQuadWord* %aabbMin0, %struct.btQuadWord* %aabbMax0)
- to label %invcont53 unwind label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit
-
-invcont53: ; preds = %invcont52
- %450 = load %struct.btCollisionShape** %339, align 4 ; [#uses=2]
- %451 = getelementptr inbounds %struct.btCollisionShape* %450, i32 0, i32 0 ; [#uses=1]
- %452 = load i32 (...)*** %451, align 4 ; [#uses=1]
- %453 = getelementptr inbounds i32 (...)** %452, i32 2 ; [#uses=1]
- %454 = load i32 (...)** %453, align 4 ; [#uses=1]
- %455 = bitcast i32 (...)* %454 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %455(%struct.btCollisionShape* %450, %struct.btTransform* %340, %struct.btQuadWord* %aabbMin1, %struct.btQuadWord* %aabbMax1)
- to label %invcont54 unwind label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit
-
-invcont54: ; preds = %invcont53
- %456 = load float* %341, align 8 ; [#uses=1]
- %457 = load float* %342, align 8 ; [#uses=1]
- %458 = fcmp ogt float %456, %457 ; [#uses=1]
- br i1 %458, label %bb2.i113, label %bb.i112
-
-bb.i112: ; preds = %invcont54
- %459 = load float* %351, align 8 ; [#uses=1]
- %460 = load float* %352, align 8 ; [#uses=1]
- %461 = fcmp olt float %459, %460 ; [#uses=1]
- br i1 %461, label %bb2.i113, label %bb3.i
-
-bb2.i113: ; preds = %bb.i112, %invcont54
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i113, %bb.i112
- %iftmp.164.0.i = phi i8 [ 0, %bb2.i113 ], [ 1, %bb.i112 ] ; [#uses=1]
- %462 = load float* %343, align 8 ; [#uses=1]
- %463 = load float* %344, align 8 ; [#uses=1]
- %464 = fcmp ogt float %462, %463 ; [#uses=1]
- br i1 %464, label %bb6.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %465 = load float* %349, align 8 ; [#uses=1]
- %466 = load float* %350, align 8 ; [#uses=1]
- %467 = fcmp olt float %465, %466 ; [#uses=1]
- br i1 %467, label %bb6.i, label %bb7.i114
-
-bb6.i: ; preds = %bb4.i, %bb3.i
- br label %bb7.i114
-
-bb7.i114: ; preds = %bb6.i, %bb4.i
- %iftmp.165.0.i = phi i8 [ 0, %bb6.i ], [ %iftmp.164.0.i, %bb4.i ] ; [#uses=1]
- %468 = load float* %345, align 4 ; [#uses=1]
- %469 = load float* %346, align 4 ; [#uses=1]
- %470 = fcmp ogt float %468, %469 ; [#uses=1]
- br i1 %470, label %bb58, label %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit
-
-_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit: ; preds = %bb7.i114
- %471 = load float* %347, align 4 ; [#uses=1]
- %472 = load float* %348, align 4 ; [#uses=1]
- %473 = fcmp olt float %471, %472 ; [#uses=1]
- %phitmp178 = icmp eq i8 %iftmp.165.0.i, 0 ; [#uses=1]
- %phitmp = or i1 %473, %phitmp178 ; [#uses=1]
- br i1 %phitmp, label %bb58, label %bb61
-
-bb58: ; preds = %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb7.i114
- %474 = load %struct.btCollisionAlgorithm*** %68, align 4 ; [#uses=1]
- %scevgep200 = getelementptr %struct.btCollisionAlgorithm** %474, i32 %491 ; [#uses=1]
- %475 = load %struct.btCollisionAlgorithm** %scevgep200, align 4 ; [#uses=2]
- %476 = getelementptr inbounds %struct.btCollisionAlgorithm* %475, i32 0, i32 0 ; [#uses=1]
- %477 = load i32 (...)*** %476, align 4 ; [#uses=1]
- %478 = load i32 (...)** %477, align 4 ; [#uses=1]
- %479 = bitcast i32 (...)* %478 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %479(%struct.btCollisionAlgorithm* %475)
- to label %invcont59 unwind label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit
-
-invcont59: ; preds = %bb58
- %480 = load %struct.btActionInterface** %70, align 4 ; [#uses=2]
- %481 = getelementptr inbounds %struct.btActionInterface* %480, i32 0, i32 0 ; [#uses=1]
- %482 = load i32 (...)*** %481, align 4 ; [#uses=1]
- %483 = getelementptr inbounds i32 (...)** %482, i32 13 ; [#uses=1]
- %484 = load i32 (...)** %483, align 4 ; [#uses=1]
- %485 = load %struct.btCollisionAlgorithm*** %68, align 4 ; [#uses=1]
- %scevgep201 = getelementptr %struct.btCollisionAlgorithm** %485, i32 %491 ; [#uses=1]
- %486 = load %struct.btCollisionAlgorithm** %scevgep201, align 4 ; [#uses=1]
- %487 = bitcast i32 (...)* %484 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %488 = bitcast %struct.btCollisionAlgorithm* %486 to i8* ; [#uses=1]
- invoke void %487(%struct.btActionInterface* %480, i8* %488)
- to label %invcont60 unwind label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit
-
-invcont60: ; preds = %invcont59
- %489 = load %struct.btCollisionAlgorithm*** %68, align 4 ; [#uses=1]
- %scevgep202 = getelementptr %struct.btCollisionAlgorithm** %489, i32 %491 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %scevgep202, align 4
- br label %bb61
-
-bb61: ; preds = %invcont60, %_Z20TestAabbAgainstAabb2RK9btVector3S1_S1_S1_.exit, %bb47
- %490 = add nsw i32 %491, 1 ; [#uses=1]
- br label %bb62
-
-bb62: ; preds = %bb61, %invcont46
- %491 = phi i32 [ 0, %invcont46 ], [ %490, %bb61 ] ; [#uses=19]
- %492 = icmp slt i32 %491, %308 ; [#uses=1]
- br i1 %492, label %bb47, label %bb73
-
-bb73: ; preds = %bb62
- ret void
-
-lpad: ; preds = %invcont39, %invcont34, %invcont33
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select75 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad76: ; preds = %bb1.i.i, %bb3.i118, %bb2.i117, %bb12
- %eh_ptr77 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select79 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr77, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %493 = load %struct.btPersistentManifold*** %81, align 4 ; [#uses=2]
- %494 = icmp eq %struct.btPersistentManifold** %493, null ; [#uses=1]
- br i1 %494, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit102, label %bb.i.i.i98
-
-bb.i.i.i98: ; preds = %lpad76
- %495 = load i8* %80, align 8 ; [#uses=1]
- %toBool.i.i.i97 = icmp eq i8 %495, 0 ; [#uses=1]
- br i1 %toBool.i.i.i97, label %bb2.i.i.i100, label %bb1.i.i.i99
-
-bb1.i.i.i99: ; preds = %bb.i.i.i98
- %496 = bitcast %struct.btPersistentManifold** %493 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %496)
- to label %bb2.i.i.i100 unwind label %lpad80
-
-bb2.i.i.i100: ; preds = %bb1.i.i.i99, %bb.i.i.i98
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %81, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit102
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit102: ; preds = %bb2.i.i.i100, %lpad76
- store i8 1, i8* %80, align 8
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %81, align 4
- store i32 0, i32* %82, align 4
- store i32 0, i32* %83, align 8
- br label %ppad
-
-lpad80: ; preds = %bb1.i.i.i99
- %eh_ptr81 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select83 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr81, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit: ; preds = %invcont59, %bb58, %invcont53, %invcont52
- %eh_ptr85 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select87 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr85, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit102, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr77, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit102 ], [ %eh_ptr85, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV22btCompoundLeafCallback, i32 0, i32 2), i32 (...)*** %72, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN28btCompoundCollisionAlgorithmD0Ev(%struct.btCompoundCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV28btCompoundCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=2]
- %3 = icmp sgt i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb.nph.i, label %bb3
-
-bb.nph.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb2.i, %bb.nph.i
- %i.05.i = phi i32 [ 0, %bb.nph.i ], [ %tmp, %bb2.i ] ; [#uses=3]
- %tmp = add i32 %i.05.i, 1 ; [#uses=2]
- %6 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionAlgorithm** %6, i32 %i.05.i ; [#uses=1]
- %7 = load %struct.btCollisionAlgorithm** %scevgep.i, align 4 ; [#uses=3]
- %8 = icmp eq %struct.btCollisionAlgorithm* %7, null ; [#uses=1]
- br i1 %8, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %9 = getelementptr inbounds %struct.btCollisionAlgorithm* %7, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %12(%struct.btCollisionAlgorithm* %7)
- to label %.noexc unwind label %lpad18
-
-.noexc: ; preds = %bb1.i
- %13 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 13 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %scevgep6.i = getelementptr %struct.btCollisionAlgorithm** %18, i32 %i.05.i ; [#uses=1]
- %19 = load %struct.btCollisionAlgorithm** %scevgep6.i, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %17 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %21 = bitcast %struct.btCollisionAlgorithm* %19 to i8* ; [#uses=1]
- invoke void %20(%struct.btActionInterface* %13, i8* %21)
- to label %bb2.i unwind label %lpad18
-
-bb2.i: ; preds = %.noexc, %bb.i
- %exitcond.i = icmp eq i32 %tmp, %2 ; [#uses=1]
- br i1 %exitcond.i, label %bb3, label %bb.i
-
-bb3: ; preds = %bb2.i, %entry
- %22 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %23 = load %struct.btCollisionAlgorithm*** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btCollisionAlgorithm** %23, null ; [#uses=1]
- br i1 %24, label %bb10, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb3
- %25 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %27 = bitcast %struct.btCollisionAlgorithm** %23 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %27)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %22, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i, %bb3
- %28 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %22, align 4
- store i32 0, i32* %1, align 4
- %29 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %30)
- %31 = bitcast %struct.btCompoundCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %31) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %.noexc, %bb1.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %32 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=2]
- %33 = icmp eq %struct.btCollisionAlgorithm** %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41, label %bb.i.i.i37
-
-bb.i.i.i37: ; preds = %lpad18
- %34 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i36 = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i36, label %bb2.i.i.i39, label %bb1.i.i.i38
-
-bb1.i.i.i38: ; preds = %bb.i.i.i37
- %36 = bitcast %struct.btCollisionAlgorithm** %32 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %36)
- to label %bb2.i.i.i39 unwind label %lpad22
-
-bb2.i.i.i39: ; preds = %bb1.i.i.i38, %bb.i.i.i37
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- br label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41
-
-_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41: ; preds = %bb2.i.i.i39, %lpad18
- %37 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- store i32 0, i32* %1, align 4
- %38 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %38, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i38
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41 ] ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %39)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=1]
-define void @_ZN28btCompoundCollisionAlgorithmD1Ev(%struct.btCompoundCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV28btCompoundCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=2]
- %3 = icmp sgt i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb.nph.i, label %bb3
-
-bb.nph.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb2.i, %bb.nph.i
- %i.05.i = phi i32 [ 0, %bb.nph.i ], [ %tmp, %bb2.i ] ; [#uses=3]
- %tmp = add i32 %i.05.i, 1 ; [#uses=2]
- %6 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionAlgorithm** %6, i32 %i.05.i ; [#uses=1]
- %7 = load %struct.btCollisionAlgorithm** %scevgep.i, align 4 ; [#uses=3]
- %8 = icmp eq %struct.btCollisionAlgorithm* %7, null ; [#uses=1]
- br i1 %8, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %9 = getelementptr inbounds %struct.btCollisionAlgorithm* %7, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %12(%struct.btCollisionAlgorithm* %7)
- to label %.noexc unwind label %lpad18
-
-.noexc: ; preds = %bb1.i
- %13 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 13 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %scevgep6.i = getelementptr %struct.btCollisionAlgorithm** %18, i32 %i.05.i ; [#uses=1]
- %19 = load %struct.btCollisionAlgorithm** %scevgep6.i, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %17 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %21 = bitcast %struct.btCollisionAlgorithm* %19 to i8* ; [#uses=1]
- invoke void %20(%struct.btActionInterface* %13, i8* %21)
- to label %bb2.i unwind label %lpad18
-
-bb2.i: ; preds = %.noexc, %bb.i
- %exitcond.i = icmp eq i32 %tmp, %2 ; [#uses=1]
- br i1 %exitcond.i, label %bb3, label %bb.i
-
-bb3: ; preds = %bb2.i, %entry
- %22 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %23 = load %struct.btCollisionAlgorithm*** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btCollisionAlgorithm** %23, null ; [#uses=1]
- br i1 %24, label %bb10, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb3
- %25 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %27 = bitcast %struct.btCollisionAlgorithm** %23 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %27)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %22, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i, %bb3
- %28 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %22, align 4
- store i32 0, i32* %1, align 4
- %29 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %30)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %.noexc, %bb1.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=2]
- %32 = icmp eq %struct.btCollisionAlgorithm** %31, null ; [#uses=1]
- br i1 %32, label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41, label %bb.i.i.i37
-
-bb.i.i.i37: ; preds = %lpad18
- %33 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %34 = load i8* %33, align 4 ; [#uses=1]
- %toBool.i.i.i36 = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i36, label %bb2.i.i.i39, label %bb1.i.i.i38
-
-bb1.i.i.i38: ; preds = %bb.i.i.i37
- %35 = bitcast %struct.btCollisionAlgorithm** %31 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %35)
- to label %bb2.i.i.i39 unwind label %lpad22
-
-bb2.i.i.i39: ; preds = %bb1.i.i.i38, %bb.i.i.i37
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- br label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41
-
-_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41: ; preds = %bb2.i.i.i39, %lpad18
- %36 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %36, align 4
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- store i32 0, i32* %1, align 4
- %37 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %37, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i38
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41 ] ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %38)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=0]
-define void @_ZN28btCompoundCollisionAlgorithmD2Ev(%struct.btCompoundCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV28btCompoundCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=2]
- %3 = icmp sgt i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb.nph.i, label %bb3
-
-bb.nph.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb2.i, %bb.nph.i
- %i.05.i = phi i32 [ 0, %bb.nph.i ], [ %tmp, %bb2.i ] ; [#uses=3]
- %tmp = add i32 %i.05.i, 1 ; [#uses=2]
- %6 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionAlgorithm** %6, i32 %i.05.i ; [#uses=1]
- %7 = load %struct.btCollisionAlgorithm** %scevgep.i, align 4 ; [#uses=3]
- %8 = icmp eq %struct.btCollisionAlgorithm* %7, null ; [#uses=1]
- br i1 %8, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %9 = getelementptr inbounds %struct.btCollisionAlgorithm* %7, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %12(%struct.btCollisionAlgorithm* %7)
- to label %.noexc unwind label %lpad18
-
-.noexc: ; preds = %bb1.i
- %13 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 13 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=1]
- %scevgep6.i = getelementptr %struct.btCollisionAlgorithm** %18, i32 %i.05.i ; [#uses=1]
- %19 = load %struct.btCollisionAlgorithm** %scevgep6.i, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %17 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %21 = bitcast %struct.btCollisionAlgorithm* %19 to i8* ; [#uses=1]
- invoke void %20(%struct.btActionInterface* %13, i8* %21)
- to label %bb2.i unwind label %lpad18
-
-bb2.i: ; preds = %.noexc, %bb.i
- %exitcond.i = icmp eq i32 %tmp, %2 ; [#uses=1]
- br i1 %exitcond.i, label %bb3, label %bb.i
-
-bb3: ; preds = %bb2.i, %entry
- %22 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %23 = load %struct.btCollisionAlgorithm*** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btCollisionAlgorithm** %23, null ; [#uses=1]
- br i1 %24, label %bb10, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb3
- %25 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %27 = bitcast %struct.btCollisionAlgorithm** %23 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %27)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %22, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i, %bb3
- %28 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %22, align 4
- store i32 0, i32* %1, align 4
- %29 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %30)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %.noexc, %bb1.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = load %struct.btCollisionAlgorithm*** %4, align 4 ; [#uses=2]
- %32 = icmp eq %struct.btCollisionAlgorithm** %31, null ; [#uses=1]
- br i1 %32, label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41, label %bb.i.i.i37
-
-bb.i.i.i37: ; preds = %lpad18
- %33 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %34 = load i8* %33, align 4 ; [#uses=1]
- %toBool.i.i.i36 = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i36, label %bb2.i.i.i39, label %bb1.i.i.i38
-
-bb1.i.i.i38: ; preds = %bb.i.i.i37
- %35 = bitcast %struct.btCollisionAlgorithm** %31 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %35)
- to label %bb2.i.i.i39 unwind label %lpad22
-
-bb2.i.i.i39: ; preds = %bb1.i.i.i38, %bb.i.i.i37
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- br label %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41
-
-_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41: ; preds = %bb2.i.i.i39, %lpad18
- %36 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %36, align 4
- store %struct.btCollisionAlgorithm** null, %struct.btCollisionAlgorithm*** %4, align 4
- store i32 0, i32* %1, align 4
- %37 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %37, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i38
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btCollisionAlgorithmED1Ev.exit41 ] ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCompoundCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %38)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=2]
-define void @_ZN28btCompoundCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btCompoundCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %isSwapped) align 2 {
-entry:
- tail call void @_ZN28btCompoundCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btCompoundCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %isSwapped)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN33btConvexConcaveCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btConvexConcaveCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %isSwapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV33btConvexConcaveCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store i8 %isSwapped, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btConvexTriangleCallback, i32 0, i32 2), i32 (...)*** %5, align 4
- %6 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 6 ; [#uses=2]
- store %struct.btActionInterface* %4, %struct.btActionInterface** %6, align 4
- %7 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 7 ; [#uses=1]
- store %struct.btDispatcherInfo* null, %struct.btDispatcherInfo** %7, align 4
- %toBool.i.i = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.204.0.i.i = select i1 %toBool.i.i, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.204.0.i.i, %struct.btCollisionObject** %8, align 4
- %iftmp.205.0.i.i = select i1 %toBool.i.i, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.205.0.i.i, %struct.btCollisionObject** %9, align 4
- %10 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 3 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %15 = bitcast %struct.btCollisionObject* %iftmp.204.0.i.i to i8* ; [#uses=1]
- %16 = bitcast %struct.btCollisionObject* %iftmp.205.0.i.i to i8* ; [#uses=1]
- %17 = invoke %struct.btPersistentManifold* %14(%struct.btActionInterface* %4, i8* %15, i8* %16)
- to label %invcont.i.i unwind label %lpad.i.i ; [#uses=2]
-
-invcont.i.i: ; preds = %entry
- %18 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 10 ; [#uses=1]
- store %struct.btPersistentManifold* %17, %struct.btPersistentManifold** %18, align 4
- %19 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btActionInterface* %19, i32 0, i32 0 ; [#uses=1]
- %21 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 5 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %23 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %24(%struct.btActionInterface* %19, %struct.btPersistentManifold* %17)
- to label %return unwind label %lpad.i.i
-
-invcont9.i.i: ; preds = %lpad.i.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i.i)
- to label %.noexc unwind label %lpad
-
-.noexc: ; preds = %invcont9.i.i
- unreachable
-
-lpad.i.i: ; preds = %invcont.i.i, %entry
- %eh_ptr.i.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select13.i.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %25 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %25)
- to label %invcont9.i.i unwind label %lpad14.i.i
-
-lpad14.i.i: ; preds = %lpad.i.i
- %eh_ptr15.i.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select17.i.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr15.i.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %invcont.i.i
- ret void
-
-lpad: ; preds = %invcont9.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select5 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont1 unwind label %lpad6
-
-lpad6: ; preds = %lpad
- %eh_ptr7 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr7, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btQuadWord* @_ZNK21btConvexInternalShape15getLocalScalingEv(%struct.btConvexInternalShape* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btConvexInternalShape9setMarginEf(%struct.btConvexInternalShape* nocapture %this, float %margin) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 3 ; [#uses=1]
- store float %margin, float* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK21btConvexInternalShape28calculateSerializeBufferSizeEv(%struct.btConvexInternalShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 52
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btTriangleShape14getNumVerticesEv(%struct.btTriangleShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 3
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape9getVertexEiR9btVector3(%struct.btTriangleShape* nocapture %this, i32 %index, %struct.btQuadWord* nocapture %vert) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %vert, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %index, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %vert, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %index, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %vert, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %index, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %vert, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %index, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btTriangleShape11getNumEdgesEv(%struct.btTriangleShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 3
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape7getEdgeEiR9btVector3S1_(%struct.btTriangleShape* %this, i32 %i, %struct.btQuadWord* %pa, %struct.btQuadWord* %pb) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 24 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btTriangleShape* %this, i32 %i, %struct.btQuadWord* %pa)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 24 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = add nsw i32 %i, 1 ; [#uses=1]
- %9 = srem i32 %8, 3 ; [#uses=1]
- %10 = bitcast i32 (...)* %7 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %10(%struct.btTriangleShape* %this, i32 %9, %struct.btQuadWord* %pb)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape7getAabbERK11btTransformR9btVector3S4_(%struct.btTriangleShape* %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 18 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %5(%struct.btConvexInternalShape* %4, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btTriangleShape* nocapture %this, %struct.btQuadWord* nocapture %dir) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %dir, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %dir, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %dir, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %1, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fmul float %6, %21 ; [#uses=1]
- %23 = fadd float %19, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fmul float %12, %25 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fmul float %1, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fmul float %6, %32 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fmul float %12, %36 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=2]
- %39 = fcmp olt float %38, %27 ; [#uses=1]
- br i1 %39, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %entry
- %40 = fcmp olt float %27, %16 ; [#uses=1]
- %iftmp.20.0.i = select i1 %40, i32 2, i32 1 ; [#uses=1]
- br label %_ZNK9btVector37maxAxisEv.exit
-
-bb4.i: ; preds = %entry
- %41 = fcmp olt float %38, %16 ; [#uses=1]
- %iftmp.21.0.i = select i1 %41, i32 2, i32 0 ; [#uses=1]
- br label %_ZNK9btVector37maxAxisEv.exit
-
-_ZNK9btVector37maxAxisEv.exit: ; preds = %bb4.i, %bb.i
- %42 = phi i32 [ %iftmp.21.0.i, %bb4.i ], [ %iftmp.20.0.i, %bb.i ] ; [#uses=4]
- %43 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %42, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %42, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %42, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %42, i32 0, i32 3 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btTriangleShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_ZNK9btVector37maxAxisEv.exit, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %49, %_ZNK9btVector37maxAxisEv.exit ] ; [#uses=8]
- %scevgep6 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 3 ; [#uses=1]
- %scevgep1011 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %scevgep1011, align 4 ; [#uses=3]
- %11 = load float* %1, align 4 ; [#uses=1]
- %12 = fmul float %10, %11 ; [#uses=1]
- %13 = load float* %scevgep12, align 4 ; [#uses=3]
- %14 = load float* %2, align 4 ; [#uses=1]
- %15 = fmul float %13, %14 ; [#uses=1]
- %16 = fadd float %12, %15 ; [#uses=1]
- %17 = load float* %scevgep13, align 4 ; [#uses=3]
- %18 = load float* %3, align 4 ; [#uses=1]
- %19 = fmul float %17, %18 ; [#uses=1]
- %20 = fadd float %16, %19 ; [#uses=2]
- %21 = load float* %4, align 4 ; [#uses=1]
- %22 = fmul float %10, %21 ; [#uses=1]
- %23 = load float* %5, align 4 ; [#uses=1]
- %24 = fmul float %13, %23 ; [#uses=1]
- %25 = fadd float %22, %24 ; [#uses=1]
- %26 = load float* %6, align 4 ; [#uses=1]
- %27 = fmul float %17, %26 ; [#uses=1]
- %28 = fadd float %25, %27 ; [#uses=2]
- %29 = load float* %7, align 4 ; [#uses=1]
- %30 = fmul float %10, %29 ; [#uses=1]
- %31 = load float* %8, align 4 ; [#uses=1]
- %32 = fmul float %13, %31 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=1]
- %34 = load float* %9, align 4 ; [#uses=1]
- %35 = fmul float %17, %34 ; [#uses=1]
- %36 = fadd float %33, %35 ; [#uses=2]
- %37 = fcmp olt float %36, %28 ; [#uses=1]
- br i1 %37, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb
- %38 = fcmp olt float %28, %20 ; [#uses=1]
- %iftmp.20.0.i = select i1 %38, i32 2, i32 1 ; [#uses=1]
- br label %_ZNK9btVector37maxAxisEv.exit
-
-bb4.i: ; preds = %bb
- %39 = fcmp olt float %36, %20 ; [#uses=1]
- %iftmp.21.0.i = select i1 %39, i32 2, i32 0 ; [#uses=1]
- br label %_ZNK9btVector37maxAxisEv.exit
-
-_ZNK9btVector37maxAxisEv.exit: ; preds = %bb4.i, %bb.i
- %40 = phi i32 [ %iftmp.21.0.i, %bb4.i ], [ %iftmp.20.0.i, %bb.i ] ; [#uses=4]
- %41 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %40, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %scevgep6, align 4
- %43 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %40, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- store float %44, float* %scevgep7, align 4
- %45 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %40, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %scevgep8, align 4
- %47 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 %40, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %scevgep9, align 4
- %49 = add nsw i32 %i.05, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %49, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %_ZNK9btVector37maxAxisEv.exit, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape8getPlaneER9btVector3S1_i(%struct.btTriangleShape* %this, %struct.btQuadWord* %planeNormal, %struct.btQuadWord* %planeSupport, i32 %i) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 28 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btTriangleShape* %this, i32 %i, %struct.btQuadWord* %planeNormal, %struct.btQuadWord* %planeSupport)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btTriangleShape12getNumPlanesEv(%struct.btTriangleShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape21calculateLocalInertiaEfR9btVector3(%struct.btTriangleShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK15btTriangleShape7getNameEv(%struct.btTriangleShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([9 x i8]* @.str18, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btTriangleShape36getNumPreferredPenetrationDirectionsEv(%struct.btTriangleShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 2
-}
-
-; [#uses=0]
-define void @_ZN24btConvexTriangleCallback10clearCacheEv(%struct.btConvexTriangleCallback* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 5 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 10 ; [#uses=1]
- %7 = load %struct.btPersistentManifold** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %5 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- tail call void %8(%struct.btActionInterface* %1, %struct.btPersistentManifold* %7)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN24btConvexTriangleCallback22setTimeStepAndCountersEfRK16btDispatcherInfoP16btManifoldResult(%struct.btConvexTriangleCallback* %this, float %collisionMarginTriangle, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %convexInTriangleSpace = alloca %struct.btTransform, align 8 ; [#uses=17]
- %0 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 7 ; [#uses=1]
- store %struct.btDispatcherInfo* %dispatchInfo, %struct.btDispatcherInfo** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 8 ; [#uses=1]
- store float %collisionMarginTriangle, float* %1, align 4
- %2 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btManifoldResult* %resultOut, %struct.btManifoldResult** %2, align 4
- %3 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btCollisionObject** %3, align 4 ; [#uses=13]
- %5 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 2 ; [#uses=1]
- %6 = load %struct.btCollisionObject** %5, align 4 ; [#uses=12]
- %7 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=5]
- %17 = load float* %14, align 4 ; [#uses=5]
- %18 = load float* %13, align 4 ; [#uses=5]
- %19 = load float* %12, align 4 ; [#uses=5]
- %20 = load float* %11, align 4 ; [#uses=5]
- %21 = load float* %10, align 4 ; [#uses=5]
- %22 = load float* %9, align 4 ; [#uses=5]
- %23 = load float* %8, align 4 ; [#uses=5]
- %24 = load float* %7, align 4 ; [#uses=5]
- %25 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fsub float -0.000000e+00, %26 ; [#uses=3]
- %28 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fsub float -0.000000e+00, %29 ; [#uses=3]
- %31 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fsub float -0.000000e+00, %32 ; [#uses=3]
- %34 = fmul float %22, %33 ; [#uses=1]
- %35 = fmul float %23, %30 ; [#uses=1]
- %36 = fadd float %34, %35 ; [#uses=1]
- %37 = fmul float %24, %27 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = fmul float %19, %33 ; [#uses=1]
- %40 = fmul float %20, %30 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = fmul float %21, %27 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=1]
- %44 = fmul float %16, %33 ; [#uses=1]
- %45 = fmul float %17, %30 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=1]
- %47 = fmul float %18, %27 ; [#uses=1]
- %48 = fadd float %46, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=3]
- %51 = fmul float %22, %50 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=3]
- %54 = fmul float %23, %53 ; [#uses=1]
- %55 = fadd float %51, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=3]
- %58 = fmul float %24, %57 ; [#uses=1]
- %59 = fadd float %55, %58 ; [#uses=1]
- %60 = fadd float %59, %38 ; [#uses=1]
- %61 = fmul float %19, %50 ; [#uses=1]
- %62 = fmul float %20, %53 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fmul float %21, %57 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fadd float %65, %43 ; [#uses=1]
- %67 = fmul float %16, %50 ; [#uses=1]
- %68 = fmul float %17, %53 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %18, %57 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fadd float %71, %48 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=3]
- %75 = fmul float %74, %22 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=3]
- %78 = fmul float %77, %23 ; [#uses=1]
- %79 = fadd float %75, %78 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=3]
- %82 = fmul float %81, %24 ; [#uses=1]
- %83 = fadd float %79, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=3]
- %86 = fmul float %85, %22 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=3]
- %89 = fmul float %88, %23 ; [#uses=1]
- %90 = fadd float %86, %89 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=3]
- %93 = fmul float %92, %24 ; [#uses=1]
- %94 = fadd float %90, %93 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=3]
- %97 = fmul float %96, %22 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=3]
- %100 = fmul float %99, %23 ; [#uses=1]
- %101 = fadd float %97, %100 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=3]
- %104 = fmul float %103, %24 ; [#uses=1]
- %105 = fadd float %101, %104 ; [#uses=1]
- %106 = fmul float %74, %19 ; [#uses=1]
- %107 = fmul float %77, %20 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %81, %21 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %85, %19 ; [#uses=1]
- %112 = fmul float %88, %20 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fmul float %92, %21 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %96, %19 ; [#uses=1]
- %117 = fmul float %99, %20 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=1]
- %119 = fmul float %103, %21 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %74, %16 ; [#uses=1]
- %122 = fmul float %77, %17 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=1]
- %124 = fmul float %81, %18 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %85, %16 ; [#uses=1]
- %127 = fmul float %88, %17 ; [#uses=1]
- %128 = fadd float %126, %127 ; [#uses=1]
- %129 = fmul float %92, %18 ; [#uses=1]
- %130 = fadd float %128, %129 ; [#uses=1]
- %131 = fmul float %96, %16 ; [#uses=1]
- %132 = fmul float %99, %17 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %103, %18 ; [#uses=1]
- %135 = fadd float %133, %134 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %135, float* %136, align 8
- %137 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %130, float* %137, align 4
- %138 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %125, float* %138, align 8
- %139 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %139, align 4
- %140 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %120, float* %140, align 8
- %141 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %115, float* %141, align 4
- %142 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %110, float* %142, align 8
- %143 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %143, align 4
- %144 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %105, float* %144, align 8
- %145 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %94, float* %145, align 4
- %146 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %83, float* %146, align 8
- %147 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %147, align 4
- %148 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %72, float* %148, align 8
- %149 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %66, float* %149, align 4
- %150 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %60, float* %150, align 8
- %151 = getelementptr inbounds %struct.btTransform* %convexInTriangleSpace, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %151, align 4
- %152 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 9 ; [#uses=1]
- %153 = load %struct.btCollisionShape** %152, align 4 ; [#uses=2]
- %154 = getelementptr inbounds %struct.btCollisionShape* %153, i32 0, i32 0 ; [#uses=1]
- %155 = load i32 (...)*** %154, align 4 ; [#uses=1]
- %156 = getelementptr inbounds i32 (...)** %155, i32 2 ; [#uses=1]
- %157 = load i32 (...)** %156, align 4 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 4 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 3 ; [#uses=1]
- %160 = bitcast i32 (...)* %157 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %160(%struct.btCollisionShape* %153, %struct.btTransform* %convexInTriangleSpace, %struct.btQuadWord* %159, %struct.btQuadWord* %158)
- %161 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=2]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fadd float %162, %collisionMarginTriangle ; [#uses=1]
- store float %163, float* %161, align 4
- %164 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=2]
- %165 = load float* %164, align 4 ; [#uses=1]
- %166 = fadd float %165, %collisionMarginTriangle ; [#uses=1]
- store float %166, float* %164, align 4
- %167 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=2]
- %168 = load float* %167, align 4 ; [#uses=1]
- %169 = fadd float %168, %collisionMarginTriangle ; [#uses=1]
- store float %169, float* %167, align 4
- %170 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = fsub float %171, %collisionMarginTriangle ; [#uses=1]
- store float %172, float* %170, align 4
- %173 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %174 = load float* %173, align 4 ; [#uses=1]
- %175 = fsub float %174, %collisionMarginTriangle ; [#uses=1]
- store float %175, float* %173, align 4
- %176 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %177 = load float* %176, align 4 ; [#uses=1]
- %178 = fsub float %177, %collisionMarginTriangle ; [#uses=1]
- store float %178, float* %176, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN33btConvexConcaveCollisionAlgorithm10clearCacheEv(%struct.btConvexConcaveCollisionAlgorithm* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 6 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 5 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 10 ; [#uses=1]
- %7 = load %struct.btPersistentManifold** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %5 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- tail call void %8(%struct.btActionInterface* %1, %struct.btPersistentManifold* %7)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultEN31LocalTriangleSphereCastCallbackD1Ev(%struct..0LocalTriangleSphereCastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultEN31LocalTriangleSphereCastCallbackD0Ev(%struct..0LocalTriangleSphereCastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..0LocalTriangleSphereCastCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultEN31LocalTriangleSphereCastCallback15processTriangleEP9btVector3ii(%struct..0LocalTriangleSphereCastCallback* %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %ident = alloca %struct.btTransform, align 8 ; [#uses=18]
- %castResult = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=5]
- %pointShape = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=7]
- %triShape = alloca %struct.btTriangleShape, align 8 ; [#uses=16]
- %simplexSolver = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %convexCaster = alloca %struct.btGjkConvexCast, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 8
- %1 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 8
- %11 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 8
- %13 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 8
- %15 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %16, align 8
- %17 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 5 ; [#uses=2]
- %18 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %18, align 8
- %19 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 5 ; [#uses=3]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %17, align 4
- %22 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 4 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %24)
- %25 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %25, align 8
- %26 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %23, float* %27, align 4
- %28 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %23, float* %28, align 4
- %29 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %29)
- to label %invcont1 unwind label %lpad
-
-invcont1: ; preds = %entry
- %30 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV15btTriangleShape, i32 0, i32 2), i32 (...)*** %30, align 8
- %31 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %31, align 4
- %32 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %68, align 4
- %69 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %70 = load i8* %69, align 4 ; [#uses=1]
- %71 = and i8 %70, -16 ; [#uses=1]
- store i8 %71, i8* %69, align 4
- %72 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0 ; [#uses=2]
- %73 = getelementptr inbounds %struct.btTriangleShape* %triShape, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- invoke void @_ZN22btSubsimplexConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* %convexCaster, %struct.btConvexShape* %72, %struct.btConvexShape* %73, %struct.btVoronoiSimplexSolver* %simplexSolver)
- to label %invcont2 unwind label %lpad25
-
-invcont2: ; preds = %invcont1
- %74 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 2 ; [#uses=1]
- %75 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 1 ; [#uses=1]
- %76 = invoke zeroext i8 @_ZN22btSubsimplexConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* %convexCaster, %struct.btTransform* %75, %struct.btTransform* %74, %struct.btTransform* %ident, %struct.btTransform* %ident, %"struct.btConvexCast::CastResult"* %castResult)
- to label %invcont3 unwind label %lpad29 ; [#uses=1]
-
-invcont3: ; preds = %invcont2
- %toBool = icmp eq i8 %76, 0 ; [#uses=1]
- br i1 %toBool, label %bb8, label %bb
-
-bb: ; preds = %invcont3
- %77 = load float* %20, align 4 ; [#uses=1]
- %78 = load float* %17, align 4 ; [#uses=2]
- %79 = fcmp ogt float %77, %78 ; [#uses=1]
- br i1 %79, label %bb4, label %bb8
-
-bb4: ; preds = %bb
- store float %78, float* %20, align 4
- br label %bb8
-
-bb8: ; preds = %bb4, %bb, %invcont3
- %80 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %80, align 8
- %81 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %81)
- to label %bb15 unwind label %lpad25
-
-bb15: ; preds = %bb8
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %30, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %73)
- to label %bb22 unwind label %lpad
-
-invcont20: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-
-bb22: ; preds = %bb15
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %25, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %72)
- ret void
-
-lpad: ; preds = %bb15, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select24 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad25: ; preds = %bb8, %invcont1
- %eh_ptr26 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select28 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad45
-
-lpad29: ; preds = %invcont2
- %eh_ptr30 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select32 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr30, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %82 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %82, align 8
- %83 = getelementptr inbounds %struct.btGjkConvexCast* %convexCaster, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %83)
- to label %ppad45 unwind label %lpad33
-
-lpad33: ; preds = %lpad29
- %eh_ptr34 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select36 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr34, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad37: ; preds = %ppad45
- %eh_ptr38 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select40 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr38, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad41: ; preds = %ppad
- %eh_ptr42 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select44 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr42, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %ppad45, %lpad
- %eh_exception.1 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.0, %ppad45 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %25, align 8
- %84 = getelementptr inbounds %struct.btPolyhedralConvexShape* %pointShape, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %84)
- to label %invcont20 unwind label %lpad41
-
-ppad45: ; preds = %lpad29, %lpad25
- %eh_exception.0 = phi i8* [ %eh_ptr26, %lpad25 ], [ %eh_ptr30, %lpad29 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %30, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %73)
- to label %ppad unwind label %lpad37
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btTriangleShapeD1Ev(%struct.btTriangleShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btTriangleShapeD0Ev(%struct.btTriangleShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btTriangleShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK21btConvexInternalShape9serializeEPvP12btSerializer(%struct.btConvexInternalShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 28 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %2 to float* ; [#uses=1]
- %3 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 32 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %5 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.2.i = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %7 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.3.i = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %9 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %9, float* %8, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %scevgep.i2 = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3 = bitcast i8* %10 to float* ; [#uses=1]
- %11 = load float* %scevgep.i2, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.i3, align 4
- %scevgep.1.i4 = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5 = getelementptr i8* %dataBuffer, i32 16 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.1.i5 to float* ; [#uses=1]
- %13 = load float* %scevgep.1.i4, align 4 ; [#uses=1]
- store float %13, float* %12, align 4
- %scevgep.2.i6 = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7 = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %14 = bitcast i8* %scevgep4.2.i7 to float* ; [#uses=1]
- %15 = load float* %scevgep.2.i6, align 4 ; [#uses=1]
- store float %15, float* %14, align 4
- %scevgep.3.i8 = getelementptr %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9 = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.3.i9 to float* ; [#uses=1]
- %17 = load float* %scevgep.3.i8, align 4 ; [#uses=1]
- store float %17, float* %16, align 4
- %18 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %21 = bitcast i8* %20 to float* ; [#uses=1]
- store float %19, float* %21, align 4
- ret i8* getelementptr inbounds ([26 x i8]* @.str119, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape32getPreferredPenetrationDirectionEiR9btVector3(%struct.btTriangleShape* nocapture %this, i32 %index, %struct.btQuadWord* nocapture %penetrationVector) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %16, %3 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %19, %8 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %22, %13 ; [#uses=2]
- %24 = fmul float %23, %9 ; [#uses=1]
- %25 = fmul float %20, %14 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=4]
- %27 = fmul float %17, %14 ; [#uses=1]
- %28 = fmul float %23, %4 ; [#uses=1]
- %29 = fsub float %27, %28 ; [#uses=4]
- %30 = fmul float %20, %4 ; [#uses=1]
- %31 = fmul float %17, %9 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=4]
- %33 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %32, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %29, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %26, float* %35, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = fmul float %32, %32 ; [#uses=1]
- %38 = fmul float %29, %29 ; [#uses=1]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = fmul float %26, %26 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = tail call float @sqrtf(float %41) nounwind readonly ; [#uses=1]
- %43 = fdiv float 1.000000e+00, %42 ; [#uses=3]
- %44 = fmul float %32, %43 ; [#uses=2]
- store float %44, float* %33, align 4
- %45 = fmul float %29, %43 ; [#uses=2]
- store float %45, float* %34, align 4
- %46 = fmul float %26, %43 ; [#uses=2]
- store float %46, float* %35, align 4
- %47 = icmp eq i32 %index, 0 ; [#uses=1]
- br i1 %47, label %return, label %bb
-
-bb: ; preds = %entry
- %48 = fmul float %44, -1.000000e+00 ; [#uses=1]
- store float %48, float* %33, align 4
- %49 = fmul float %45, -1.000000e+00 ; [#uses=1]
- store float %49, float* %34, align 4
- %50 = fmul float %46, -1.000000e+00 ; [#uses=1]
- store float %50, float* %35, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK15btTriangleShape8isInsideERK9btVector3f(%struct.btTriangleShape* %this, %struct.btQuadWord* nocapture %pt, float %tolerance) align 2 {
-entry:
- %pa = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %pb = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %16, %3 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %19, %8 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %22, %13 ; [#uses=2]
- %24 = fmul float %23, %9 ; [#uses=1]
- %25 = fmul float %20, %14 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=3]
- %27 = fmul float %17, %14 ; [#uses=1]
- %28 = fmul float %23, %4 ; [#uses=1]
- %29 = fsub float %27, %28 ; [#uses=3]
- %30 = fmul float %20, %4 ; [#uses=1]
- %31 = fmul float %17, %9 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=3]
- %33 = fmul float %32, %32 ; [#uses=1]
- %34 = fmul float %29, %29 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fmul float %26, %26 ; [#uses=1]
- %37 = fadd float %35, %36 ; [#uses=1]
- %38 = call float @sqrtf(float %37) nounwind readonly ; [#uses=1]
- %39 = fdiv float 1.000000e+00, %38 ; [#uses=3]
- %40 = fmul float %32, %39 ; [#uses=4]
- %41 = fmul float %29, %39 ; [#uses=4]
- %42 = fmul float %26, %39 ; [#uses=4]
- %43 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 0 ; [#uses=2]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fmul float %44, %40 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 1 ; [#uses=2]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fmul float %47, %41 ; [#uses=1]
- %49 = fadd float %45, %48 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 2 ; [#uses=2]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %51, %42 ; [#uses=1]
- %53 = fadd float %49, %52 ; [#uses=1]
- %54 = fmul float %13, %40 ; [#uses=1]
- %55 = fmul float %8, %41 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %3, %42 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=1]
- %59 = fsub float %53, %58 ; [#uses=2]
- %60 = fsub float -0.000000e+00, %tolerance ; [#uses=2]
- %61 = fcmp ult float %59, %60 ; [#uses=1]
- %62 = fcmp ugt float %59, %tolerance ; [#uses=1]
- %or.cond = or i1 %61, %62 ; [#uses=1]
- br i1 %or.cond, label %bb9, label %bb6.preheader
-
-bb6.preheader: ; preds = %entry
- %63 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb6
-
-bb2: ; preds = %bb6
- %70 = load i32 (...)*** %63, align 4 ; [#uses=1]
- %71 = getelementptr inbounds i32 (...)** %70, i32 23 ; [#uses=1]
- %72 = load i32 (...)** %71, align 4 ; [#uses=1]
- %73 = bitcast i32 (...)* %72 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %73(%struct.btTriangleShape* %this, i32 %118, %struct.btQuadWord* %pa, %struct.btQuadWord* %pb)
- %74 = load float* %64, align 8 ; [#uses=1]
- %75 = load float* %65, align 8 ; [#uses=2]
- %76 = fsub float %74, %75 ; [#uses=2]
- %77 = load float* %66, align 4 ; [#uses=1]
- %78 = load float* %67, align 4 ; [#uses=2]
- %79 = fsub float %77, %78 ; [#uses=2]
- %80 = load float* %68, align 8 ; [#uses=1]
- %81 = load float* %69, align 8 ; [#uses=2]
- %82 = fsub float %80, %81 ; [#uses=2]
- %83 = fmul float %82, %41 ; [#uses=1]
- %84 = fmul float %79, %40 ; [#uses=1]
- %85 = fsub float %83, %84 ; [#uses=3]
- %86 = fmul float %76, %40 ; [#uses=1]
- %87 = fmul float %82, %42 ; [#uses=1]
- %88 = fsub float %86, %87 ; [#uses=3]
- %89 = fmul float %79, %42 ; [#uses=1]
- %90 = fmul float %76, %41 ; [#uses=1]
- %91 = fsub float %89, %90 ; [#uses=3]
- %92 = fmul float %91, %91 ; [#uses=1]
- %93 = fmul float %88, %88 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=1]
- %95 = fmul float %85, %85 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = call float @sqrtf(float %96) nounwind readonly ; [#uses=1]
- %98 = fdiv float 1.000000e+00, %97 ; [#uses=3]
- %99 = fmul float %91, %98 ; [#uses=2]
- %100 = fmul float %88, %98 ; [#uses=2]
- %101 = fmul float %85, %98 ; [#uses=2]
- %102 = load float* %43, align 4 ; [#uses=1]
- %103 = fmul float %102, %99 ; [#uses=1]
- %104 = load float* %46, align 4 ; [#uses=1]
- %105 = fmul float %104, %100 ; [#uses=1]
- %106 = fadd float %103, %105 ; [#uses=1]
- %107 = load float* %50, align 4 ; [#uses=1]
- %108 = fmul float %107, %101 ; [#uses=1]
- %109 = fadd float %106, %108 ; [#uses=1]
- %110 = fmul float %81, %99 ; [#uses=1]
- %111 = fmul float %78, %100 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %75, %101 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=1]
- %115 = fsub float %109, %114 ; [#uses=1]
- %116 = fcmp olt float %115, %60 ; [#uses=1]
- br i1 %116, label %bb9, label %bb5
-
-bb5: ; preds = %bb2
- %117 = add nsw i32 %118, 1 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb6.preheader
- %118 = phi i32 [ %117, %bb5 ], [ 0, %bb6.preheader ] ; [#uses=3]
- %119 = icmp slt i32 %118, 3 ; [#uses=1]
- br i1 %119, label %bb2, label %bb9
-
-bb9: ; preds = %bb6, %bb2, %entry
- %.0 = phi i8 [ 0, %entry ], [ 1, %bb6 ], [ 0, %bb2 ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btTriangleShape16getPlaneEquationEiR9btVector3S1_(%struct.btTriangleShape* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %planeNormal, %struct.btQuadWord* nocapture %planeSupport) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %16, %3 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %19, %8 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %22, %13 ; [#uses=2]
- %24 = fmul float %23, %9 ; [#uses=1]
- %25 = fmul float %20, %14 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=4]
- %27 = fmul float %17, %14 ; [#uses=1]
- %28 = fmul float %23, %4 ; [#uses=1]
- %29 = fsub float %27, %28 ; [#uses=4]
- %30 = fmul float %20, %4 ; [#uses=1]
- %31 = fmul float %17, %9 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=4]
- %33 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %32, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %29, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %26, float* %35, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = fmul float %32, %32 ; [#uses=1]
- %38 = fmul float %29, %29 ; [#uses=1]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = fmul float %26, %26 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = tail call float @sqrtf(float %41) nounwind readonly ; [#uses=1]
- %43 = fdiv float 1.000000e+00, %42 ; [#uses=3]
- %44 = fmul float %32, %43 ; [#uses=1]
- store float %44, float* %33, align 4
- %45 = fmul float %29, %43 ; [#uses=1]
- store float %45, float* %34, align 4
- %46 = fmul float %26, %43 ; [#uses=1]
- store float %46, float* %35, align 4
- %47 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %12, align 4 ; [#uses=1]
- store float %48, float* %47, align 4
- %49 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %7, align 4 ; [#uses=1]
- store float %50, float* %49, align 4
- %51 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %2, align 4 ; [#uses=1]
- store float %52, float* %51, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 3 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTriangleShape* %this, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN24btConvexTriangleCallback15processTriangleEP9btVector3ii(%struct.btConvexTriangleCallback* %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %5 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %color = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %tm = alloca %struct.btTriangleShape, align 8 ; [#uses=19]
- %6 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 6 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 2 ; [#uses=4]
- %9 = load %struct.btCollisionObject** %8, align 4 ; [#uses=13]
- %10 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 7 ; [#uses=5]
- %11 = load %struct.btDispatcherInfo** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btDispatcherInfo* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb
-
-bb: ; preds = %entry
- %13 = getelementptr inbounds %struct.btDispatcherInfo* %11, i32 0, i32 5 ; [#uses=1]
- %14 = load %struct.btActionInterface** %13, align 4 ; [#uses=3]
- %15 = icmp eq %struct.btActionInterface* %14, null ; [#uses=1]
- br i1 %15, label %bb10, label %bb1
-
-bb1: ; preds = %bb
- %16 = getelementptr inbounds %struct.btActionInterface* %14, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 12 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %19 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %21 = call i32 %20(%struct.btActionInterface* %14) ; [#uses=1]
- %22 = and i32 %21, 1 ; [#uses=1]
- %toBool4 = icmp eq i32 %22, 0 ; [#uses=1]
- br i1 %toBool4, label %bb10, label %bb9
-
-bb9: ; preds = %bb1
- %23 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %23, align 8
- %24 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 8
- %26 = getelementptr inbounds %struct.btQuadWord* %color, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = load %struct.btDispatcherInfo** %10, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btDispatcherInfo* %27, i32 0, i32 5 ; [#uses=2]
- %29 = load %struct.btActionInterface** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btActionInterface* %29, i32 0, i32 0 ; [#uses=1]
- %31 = load i32 (...)*** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32 (...)** %31, i32 2 ; [#uses=1]
- %33 = load i32 (...)** %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=6]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=2]
- %37 = load float* %36, align 4 ; [#uses=3]
- %38 = fmul float %35, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=6]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=2]
- %42 = load float* %41, align 4 ; [#uses=3]
- %43 = fmul float %40, %42 ; [#uses=1]
- %44 = fadd float %38, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=6]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=3]
- %49 = fmul float %46, %48 ; [#uses=1]
- %50 = fadd float %44, %49 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=6]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fadd float %50, %52 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=6]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %55, %37 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=6]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fmul float %58, %42 ; [#uses=1]
- %60 = fadd float %56, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=6]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = fmul float %62, %48 ; [#uses=1]
- %64 = fadd float %60, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=6]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fadd float %64, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fmul float %69, %37 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=6]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %72, %42 ; [#uses=1]
- %74 = fadd float %70, %73 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=6]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fmul float %76, %48 ; [#uses=1]
- %78 = fadd float %74, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=6]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fadd float %78, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %81, float* %82, align 8
- %83 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %67, float* %83, align 4
- %84 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %53, float* %84, align 8
- %85 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %85, align 4
- %86 = load float* %34, align 4 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=2]
- %88 = load float* %87, align 4 ; [#uses=3]
- %89 = fmul float %86, %88 ; [#uses=1]
- %90 = load float* %39, align 4 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=2]
- %92 = load float* %91, align 4 ; [#uses=3]
- %93 = fmul float %90, %92 ; [#uses=1]
- %94 = fadd float %89, %93 ; [#uses=1]
- %95 = load float* %45, align 4 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=2]
- %97 = load float* %96, align 4 ; [#uses=3]
- %98 = fmul float %95, %97 ; [#uses=1]
- %99 = fadd float %94, %98 ; [#uses=1]
- %100 = load float* %51, align 4 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = load float* %54, align 4 ; [#uses=1]
- %103 = fmul float %102, %88 ; [#uses=1]
- %104 = load float* %57, align 4 ; [#uses=1]
- %105 = fmul float %104, %92 ; [#uses=1]
- %106 = fadd float %103, %105 ; [#uses=1]
- %107 = load float* %61, align 4 ; [#uses=1]
- %108 = fmul float %107, %97 ; [#uses=1]
- %109 = fadd float %106, %108 ; [#uses=1]
- %110 = load float* %65, align 4 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = load float* %68, align 4 ; [#uses=1]
- %113 = fmul float %112, %88 ; [#uses=1]
- %114 = load float* %71, align 4 ; [#uses=1]
- %115 = fmul float %114, %92 ; [#uses=1]
- %116 = fadd float %113, %115 ; [#uses=1]
- %117 = load float* %75, align 4 ; [#uses=1]
- %118 = fmul float %117, %97 ; [#uses=1]
- %119 = fadd float %116, %118 ; [#uses=1]
- %120 = load float* %79, align 4 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %121, float* %122, align 8
- %123 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %111, float* %123, align 4
- %124 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %101, float* %124, align 8
- %125 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %125, align 4
- %126 = load %struct.btActionInterface** %28, align 4 ; [#uses=1]
- %127 = bitcast i32 (...)* %33 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %127(%struct.btActionInterface* %126, %struct.btQuadWord* %4, %struct.btQuadWord* %5, %struct.btQuadWord* %color)
- %128 = load %struct.btDispatcherInfo** %10, align 4 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btDispatcherInfo* %128, i32 0, i32 5 ; [#uses=2]
- %130 = load %struct.btActionInterface** %129, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btActionInterface* %130, i32 0, i32 0 ; [#uses=1]
- %132 = load i32 (...)*** %131, align 4 ; [#uses=1]
- %133 = getelementptr inbounds i32 (...)** %132, i32 2 ; [#uses=1]
- %134 = load i32 (...)** %133, align 4 ; [#uses=1]
- %135 = load float* %34, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=2]
- %137 = load float* %136, align 4 ; [#uses=3]
- %138 = fmul float %135, %137 ; [#uses=1]
- %139 = load float* %39, align 4 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=2]
- %141 = load float* %140, align 4 ; [#uses=3]
- %142 = fmul float %139, %141 ; [#uses=1]
- %143 = fadd float %138, %142 ; [#uses=1]
- %144 = load float* %45, align 4 ; [#uses=1]
- %145 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=2]
- %146 = load float* %145, align 4 ; [#uses=3]
- %147 = fmul float %144, %146 ; [#uses=1]
- %148 = fadd float %143, %147 ; [#uses=1]
- %149 = load float* %51, align 4 ; [#uses=1]
- %150 = fadd float %148, %149 ; [#uses=1]
- %151 = load float* %54, align 4 ; [#uses=1]
- %152 = fmul float %151, %137 ; [#uses=1]
- %153 = load float* %57, align 4 ; [#uses=1]
- %154 = fmul float %153, %141 ; [#uses=1]
- %155 = fadd float %152, %154 ; [#uses=1]
- %156 = load float* %61, align 4 ; [#uses=1]
- %157 = fmul float %156, %146 ; [#uses=1]
- %158 = fadd float %155, %157 ; [#uses=1]
- %159 = load float* %65, align 4 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=1]
- %161 = load float* %68, align 4 ; [#uses=1]
- %162 = fmul float %161, %137 ; [#uses=1]
- %163 = load float* %71, align 4 ; [#uses=1]
- %164 = fmul float %163, %141 ; [#uses=1]
- %165 = fadd float %162, %164 ; [#uses=1]
- %166 = load float* %75, align 4 ; [#uses=1]
- %167 = fmul float %166, %146 ; [#uses=1]
- %168 = fadd float %165, %167 ; [#uses=1]
- %169 = load float* %79, align 4 ; [#uses=1]
- %170 = fadd float %168, %169 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %170, float* %171, align 8
- %172 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %160, float* %172, align 4
- %173 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %150, float* %173, align 8
- %174 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %174, align 4
- %175 = load float* %34, align 4 ; [#uses=1]
- %176 = load float* %36, align 4 ; [#uses=3]
- %177 = fmul float %175, %176 ; [#uses=1]
- %178 = load float* %39, align 4 ; [#uses=1]
- %179 = load float* %41, align 4 ; [#uses=3]
- %180 = fmul float %178, %179 ; [#uses=1]
- %181 = fadd float %177, %180 ; [#uses=1]
- %182 = load float* %45, align 4 ; [#uses=1]
- %183 = load float* %47, align 4 ; [#uses=3]
- %184 = fmul float %182, %183 ; [#uses=1]
- %185 = fadd float %181, %184 ; [#uses=1]
- %186 = load float* %51, align 4 ; [#uses=1]
- %187 = fadd float %185, %186 ; [#uses=1]
- %188 = load float* %54, align 4 ; [#uses=1]
- %189 = fmul float %188, %176 ; [#uses=1]
- %190 = load float* %57, align 4 ; [#uses=1]
- %191 = fmul float %190, %179 ; [#uses=1]
- %192 = fadd float %189, %191 ; [#uses=1]
- %193 = load float* %61, align 4 ; [#uses=1]
- %194 = fmul float %193, %183 ; [#uses=1]
- %195 = fadd float %192, %194 ; [#uses=1]
- %196 = load float* %65, align 4 ; [#uses=1]
- %197 = fadd float %195, %196 ; [#uses=1]
- %198 = load float* %68, align 4 ; [#uses=1]
- %199 = fmul float %198, %176 ; [#uses=1]
- %200 = load float* %71, align 4 ; [#uses=1]
- %201 = fmul float %200, %179 ; [#uses=1]
- %202 = fadd float %199, %201 ; [#uses=1]
- %203 = load float* %75, align 4 ; [#uses=1]
- %204 = fmul float %203, %183 ; [#uses=1]
- %205 = fadd float %202, %204 ; [#uses=1]
- %206 = load float* %79, align 4 ; [#uses=1]
- %207 = fadd float %205, %206 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %207, float* %208, align 8
- %209 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %197, float* %209, align 4
- %210 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %187, float* %210, align 8
- %211 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %211, align 4
- %212 = load %struct.btActionInterface** %129, align 4 ; [#uses=1]
- %213 = bitcast i32 (...)* %134 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %213(%struct.btActionInterface* %212, %struct.btQuadWord* %2, %struct.btQuadWord* %3, %struct.btQuadWord* %color)
- %214 = load %struct.btDispatcherInfo** %10, align 4 ; [#uses=1]
- %215 = getelementptr inbounds %struct.btDispatcherInfo* %214, i32 0, i32 5 ; [#uses=2]
- %216 = load %struct.btActionInterface** %215, align 4 ; [#uses=1]
- %217 = getelementptr inbounds %struct.btActionInterface* %216, i32 0, i32 0 ; [#uses=1]
- %218 = load i32 (...)*** %217, align 4 ; [#uses=1]
- %219 = getelementptr inbounds i32 (...)** %218, i32 2 ; [#uses=1]
- %220 = load i32 (...)** %219, align 4 ; [#uses=1]
- %221 = load float* %34, align 4 ; [#uses=1]
- %222 = load float* %87, align 4 ; [#uses=3]
- %223 = fmul float %221, %222 ; [#uses=1]
- %224 = load float* %39, align 4 ; [#uses=1]
- %225 = load float* %91, align 4 ; [#uses=3]
- %226 = fmul float %224, %225 ; [#uses=1]
- %227 = fadd float %223, %226 ; [#uses=1]
- %228 = load float* %45, align 4 ; [#uses=1]
- %229 = load float* %96, align 4 ; [#uses=3]
- %230 = fmul float %228, %229 ; [#uses=1]
- %231 = fadd float %227, %230 ; [#uses=1]
- %232 = load float* %51, align 4 ; [#uses=1]
- %233 = fadd float %231, %232 ; [#uses=1]
- %234 = load float* %54, align 4 ; [#uses=1]
- %235 = fmul float %234, %222 ; [#uses=1]
- %236 = load float* %57, align 4 ; [#uses=1]
- %237 = fmul float %236, %225 ; [#uses=1]
- %238 = fadd float %235, %237 ; [#uses=1]
- %239 = load float* %61, align 4 ; [#uses=1]
- %240 = fmul float %239, %229 ; [#uses=1]
- %241 = fadd float %238, %240 ; [#uses=1]
- %242 = load float* %65, align 4 ; [#uses=1]
- %243 = fadd float %241, %242 ; [#uses=1]
- %244 = load float* %68, align 4 ; [#uses=1]
- %245 = fmul float %244, %222 ; [#uses=1]
- %246 = load float* %71, align 4 ; [#uses=1]
- %247 = fmul float %246, %225 ; [#uses=1]
- %248 = fadd float %245, %247 ; [#uses=1]
- %249 = load float* %75, align 4 ; [#uses=1]
- %250 = fmul float %249, %229 ; [#uses=1]
- %251 = fadd float %248, %250 ; [#uses=1]
- %252 = load float* %79, align 4 ; [#uses=1]
- %253 = fadd float %251, %252 ; [#uses=1]
- %254 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %253, float* %254, align 8
- %255 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %243, float* %255, align 4
- %256 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %233, float* %256, align 8
- %257 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %257, align 4
- %258 = load float* %34, align 4 ; [#uses=1]
- %259 = load float* %136, align 4 ; [#uses=3]
- %260 = fmul float %258, %259 ; [#uses=1]
- %261 = load float* %39, align 4 ; [#uses=1]
- %262 = load float* %140, align 4 ; [#uses=3]
- %263 = fmul float %261, %262 ; [#uses=1]
- %264 = fadd float %260, %263 ; [#uses=1]
- %265 = load float* %45, align 4 ; [#uses=1]
- %266 = load float* %145, align 4 ; [#uses=3]
- %267 = fmul float %265, %266 ; [#uses=1]
- %268 = fadd float %264, %267 ; [#uses=1]
- %269 = load float* %51, align 4 ; [#uses=1]
- %270 = fadd float %268, %269 ; [#uses=1]
- %271 = load float* %54, align 4 ; [#uses=1]
- %272 = fmul float %271, %259 ; [#uses=1]
- %273 = load float* %57, align 4 ; [#uses=1]
- %274 = fmul float %273, %262 ; [#uses=1]
- %275 = fadd float %272, %274 ; [#uses=1]
- %276 = load float* %61, align 4 ; [#uses=1]
- %277 = fmul float %276, %266 ; [#uses=1]
- %278 = fadd float %275, %277 ; [#uses=1]
- %279 = load float* %65, align 4 ; [#uses=1]
- %280 = fadd float %278, %279 ; [#uses=1]
- %281 = load float* %68, align 4 ; [#uses=1]
- %282 = fmul float %281, %259 ; [#uses=1]
- %283 = load float* %71, align 4 ; [#uses=1]
- %284 = fmul float %283, %262 ; [#uses=1]
- %285 = fadd float %282, %284 ; [#uses=1]
- %286 = load float* %75, align 4 ; [#uses=1]
- %287 = fmul float %286, %266 ; [#uses=1]
- %288 = fadd float %285, %287 ; [#uses=1]
- %289 = load float* %79, align 4 ; [#uses=1]
- %290 = fadd float %288, %289 ; [#uses=1]
- %291 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %290, float* %291, align 8
- %292 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %280, float* %292, align 4
- %293 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %270, float* %293, align 8
- %294 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %294, align 4
- %295 = load %struct.btActionInterface** %215, align 4 ; [#uses=1]
- %296 = bitcast i32 (...)* %220 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %296(%struct.btActionInterface* %295, %struct.btQuadWord* %0, %struct.btQuadWord* %1, %struct.btQuadWord* %color)
- br label %bb10
-
-bb10: ; preds = %bb9, %bb1, %bb, %entry
- %297 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 1 ; [#uses=3]
- %298 = load %struct.btCollisionObject** %297, align 4 ; [#uses=1]
- %299 = getelementptr inbounds %struct.btCollisionObject* %298, i32 0, i32 9 ; [#uses=1]
- %300 = load %struct.btCollisionShape** %299, align 4 ; [#uses=1]
- %301 = getelementptr inbounds %struct.btCollisionShape* %300, i32 0, i32 1 ; [#uses=1]
- %302 = load i32* %301, align 4 ; [#uses=1]
- %303 = icmp slt i32 %302, 20 ; [#uses=1]
- br i1 %303, label %bb12, label %return
-
-bb12: ; preds = %bb10
- %304 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %304)
- %305 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV15btTriangleShape, i32 0, i32 2), i32 (...)*** %305, align 8
- %306 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %306, align 4
- %307 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %308 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %309 = load float* %308, align 4 ; [#uses=1]
- store float %309, float* %307, align 4
- %310 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %311 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %312 = load float* %311, align 4 ; [#uses=1]
- store float %312, float* %310, align 4
- %313 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %314 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %315 = load float* %314, align 4 ; [#uses=1]
- store float %315, float* %313, align 4
- %316 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- %318 = load float* %317, align 4 ; [#uses=1]
- store float %318, float* %316, align 4
- %319 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %320 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %321 = load float* %320, align 4 ; [#uses=1]
- store float %321, float* %319, align 4
- %322 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %324 = load float* %323, align 4 ; [#uses=1]
- store float %324, float* %322, align 4
- %325 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %326 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %327 = load float* %326, align 4 ; [#uses=1]
- store float %327, float* %325, align 4
- %328 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- %330 = load float* %329, align 4 ; [#uses=1]
- store float %330, float* %328, align 4
- %331 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %332 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %333 = load float* %332, align 4 ; [#uses=1]
- store float %333, float* %331, align 4
- %334 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %335 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %336 = load float* %335, align 4 ; [#uses=1]
- store float %336, float* %334, align 4
- %337 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %338 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=1]
- store float %339, float* %337, align 4
- %340 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %341 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- %342 = load float* %341, align 4 ; [#uses=1]
- store float %342, float* %340, align 4
- %343 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 8 ; [#uses=1]
- %344 = load float* %343, align 4 ; [#uses=1]
- %345 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %344, float* %345, align 4
- %346 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 9 ; [#uses=3]
- %347 = load %struct.btCollisionShape** %346, align 4 ; [#uses=1]
- %348 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store %struct.btCollisionShape* %348, %struct.btCollisionShape** %346, align 4
- %349 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=2]
- %350 = load i32 (...)*** %349, align 4 ; [#uses=1]
- %351 = getelementptr inbounds i32 (...)** %350, i32 2 ; [#uses=1]
- %352 = load i32 (...)** %351, align 4 ; [#uses=1]
- %353 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 10 ; [#uses=1]
- %354 = load %struct.btPersistentManifold** %353, align 4 ; [#uses=1]
- %355 = load %struct.btCollisionObject** %8, align 4 ; [#uses=1]
- %356 = load %struct.btCollisionObject** %297, align 4 ; [#uses=1]
- %357 = bitcast i32 (...)* %352 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %358 = invoke %struct.btCollisionAlgorithm* %357(%struct.btActionInterface* %7, %struct.btCollisionObject* %356, %struct.btCollisionObject* %355, %struct.btPersistentManifold* %354)
- to label %invcont unwind label %lpad ; [#uses=4]
-
-invcont: ; preds = %bb12
- %359 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 5 ; [#uses=2]
- %360 = load %struct.btManifoldResult** %359, align 4 ; [#uses=4]
- %361 = getelementptr inbounds %struct.btManifoldResult* %360, i32 0, i32 4 ; [#uses=1]
- %362 = load %struct.btCollisionObject** %361, align 4 ; [#uses=1]
- %363 = load %struct.btCollisionObject** %8, align 4 ; [#uses=1]
- %364 = icmp eq %struct.btCollisionObject* %362, %363 ; [#uses=1]
- %365 = getelementptr inbounds %struct.btManifoldResult* %360, i32 0, i32 0, i32 0 ; [#uses=1]
- %366 = load i32 (...)*** %365, align 4 ; [#uses=2]
- br i1 %364, label %bb14, label %bb16
-
-bb14: ; preds = %invcont
- %367 = getelementptr inbounds i32 (...)** %366, i32 2 ; [#uses=1]
- %368 = load i32 (...)** %367, align 4 ; [#uses=1]
- %369 = bitcast i32 (...)* %368 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- invoke void %369(%struct.btManifoldResult* %360, i32 %partId, i32 %triangleIndex)
- to label %bb18 unwind label %lpad
-
-bb16: ; preds = %invcont
- %370 = getelementptr inbounds i32 (...)** %366, i32 3 ; [#uses=1]
- %371 = load i32 (...)** %370, align 4 ; [#uses=1]
- %372 = bitcast i32 (...)* %371 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- invoke void %372(%struct.btManifoldResult* %360, i32 %partId, i32 %triangleIndex)
- to label %bb18 unwind label %lpad
-
-bb18: ; preds = %bb16, %bb14
- %373 = getelementptr inbounds %struct.btCollisionAlgorithm* %358, i32 0, i32 0 ; [#uses=2]
- %374 = load i32 (...)*** %373, align 4 ; [#uses=1]
- %375 = getelementptr inbounds i32 (...)** %374, i32 2 ; [#uses=1]
- %376 = load i32 (...)** %375, align 4 ; [#uses=1]
- %377 = load %struct.btManifoldResult** %359, align 4 ; [#uses=1]
- %378 = load %struct.btDispatcherInfo** %10, align 4 ; [#uses=1]
- %379 = load %struct.btCollisionObject** %8, align 4 ; [#uses=1]
- %380 = load %struct.btCollisionObject** %297, align 4 ; [#uses=1]
- %381 = bitcast i32 (...)* %376 to void (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- invoke void %381(%struct.btCollisionAlgorithm* %358, %struct.btCollisionObject* %380, %struct.btCollisionObject* %379, %struct.btDispatcherInfo* %378, %struct.btManifoldResult* %377)
- to label %invcont19 unwind label %lpad
-
-invcont19: ; preds = %bb18
- %382 = load i32 (...)*** %373, align 4 ; [#uses=1]
- %383 = load i32 (...)** %382, align 4 ; [#uses=1]
- %384 = bitcast i32 (...)* %383 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %384(%struct.btCollisionAlgorithm* %358)
- to label %invcont20 unwind label %lpad
-
-invcont20: ; preds = %invcont19
- %385 = load i32 (...)*** %349, align 4 ; [#uses=1]
- %386 = getelementptr inbounds i32 (...)** %385, i32 13 ; [#uses=1]
- %387 = load i32 (...)** %386, align 4 ; [#uses=1]
- %388 = bitcast i32 (...)* %387 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %389 = bitcast %struct.btCollisionAlgorithm* %358 to i8* ; [#uses=1]
- invoke void %388(%struct.btActionInterface* %7, i8* %389)
- to label %invcont21 unwind label %lpad
-
-invcont21: ; preds = %invcont20
- store %struct.btCollisionShape* %347, %struct.btCollisionShape** %346, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %305, align 8
- %390 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %390)
- ret void
-
-invcont23: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb10
- ret void
-
-lpad: ; preds = %invcont20, %invcont19, %bb18, %bb16, %bb14, %bb12
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select27 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %305, align 8
- %391 = getelementptr inbounds %struct.btTriangleShape* %tm, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %391)
- to label %invcont23 unwind label %lpad28
-
-lpad28: ; preds = %lpad
- %eh_ptr29 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select31 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr29, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvexConcaveCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) align 2 {
-entry:
- %rayAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rayAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %raycastCallback = alloca %struct..0LocalTriangleSphereCastCallback, align 8 ; [#uses=37]
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=2]
- %iftmp.222.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=27]
- %iftmp.223.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=13]
- %2 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=4]
- %6 = fsub float %3, %5 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- %9 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=4]
- %11 = fsub float %8, %10 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=4]
- %14 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=4]
- %16 = fsub float %13, %15 ; [#uses=2]
- %17 = fmul float %16, %16 ; [#uses=1]
- %18 = fmul float %11, %11 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fmul float %6, %6 ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 23 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fmul float %23, %23 ; [#uses=1]
- %25 = fcmp ogt float %24, %21 ; [#uses=1]
- br i1 %25, label %bb21, label %bb9
-
-bb9: ; preds = %entry
- %26 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=9]
- %36 = load float* %33, align 4 ; [#uses=9]
- %37 = load float* %32, align 4 ; [#uses=9]
- %38 = load float* %31, align 4 ; [#uses=9]
- %39 = load float* %30, align 4 ; [#uses=9]
- %40 = load float* %29, align 4 ; [#uses=9]
- %41 = load float* %28, align 4 ; [#uses=9]
- %42 = load float* %27, align 4 ; [#uses=9]
- %43 = load float* %26, align 4 ; [#uses=9]
- %44 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fsub float -0.000000e+00, %45 ; [#uses=3]
- %47 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fsub float -0.000000e+00, %48 ; [#uses=3]
- %50 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fsub float -0.000000e+00, %51 ; [#uses=3]
- %53 = fmul float %41, %52 ; [#uses=1]
- %54 = fmul float %42, %49 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %43, %46 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=2]
- %58 = fmul float %38, %52 ; [#uses=1]
- %59 = fmul float %39, %49 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %40, %46 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=2]
- %63 = fmul float %35, %52 ; [#uses=1]
- %64 = fmul float %36, %49 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fmul float %37, %46 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=2]
- %68 = fmul float %41, %15 ; [#uses=1]
- %69 = fmul float %42, %10 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fmul float %43, %5 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fadd float %72, %57 ; [#uses=7]
- %74 = fmul float %38, %15 ; [#uses=1]
- %75 = fmul float %39, %10 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = fmul float %40, %5 ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=1]
- %79 = fadd float %78, %62 ; [#uses=7]
- %80 = fmul float %35, %15 ; [#uses=1]
- %81 = fmul float %36, %10 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = fmul float %37, %5 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=1]
- %85 = fadd float %84, %67 ; [#uses=7]
- %86 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=3]
- %88 = fmul float %87, %41 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=3]
- %91 = fmul float %90, %42 ; [#uses=1]
- %92 = fadd float %88, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=3]
- %95 = fmul float %94, %43 ; [#uses=1]
- %96 = fadd float %92, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=3]
- %99 = fmul float %98, %41 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=3]
- %102 = fmul float %101, %42 ; [#uses=1]
- %103 = fadd float %99, %102 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=3]
- %106 = fmul float %105, %43 ; [#uses=1]
- %107 = fadd float %103, %106 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=3]
- %110 = fmul float %109, %41 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=3]
- %113 = fmul float %112, %42 ; [#uses=1]
- %114 = fadd float %110, %113 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=3]
- %117 = fmul float %116, %43 ; [#uses=1]
- %118 = fadd float %114, %117 ; [#uses=1]
- %119 = fmul float %87, %38 ; [#uses=1]
- %120 = fmul float %90, %39 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fmul float %94, %40 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=1]
- %124 = fmul float %98, %38 ; [#uses=1]
- %125 = fmul float %101, %39 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = fmul float %105, %40 ; [#uses=1]
- %128 = fadd float %126, %127 ; [#uses=1]
- %129 = fmul float %109, %38 ; [#uses=1]
- %130 = fmul float %112, %39 ; [#uses=1]
- %131 = fadd float %129, %130 ; [#uses=1]
- %132 = fmul float %116, %40 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %87, %35 ; [#uses=1]
- %135 = fmul float %90, %36 ; [#uses=1]
- %136 = fadd float %134, %135 ; [#uses=1]
- %137 = fmul float %94, %37 ; [#uses=1]
- %138 = fadd float %136, %137 ; [#uses=1]
- %139 = fmul float %98, %35 ; [#uses=1]
- %140 = fmul float %101, %36 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = fmul float %105, %37 ; [#uses=1]
- %143 = fadd float %141, %142 ; [#uses=1]
- %144 = fmul float %109, %35 ; [#uses=1]
- %145 = fmul float %112, %36 ; [#uses=1]
- %146 = fadd float %144, %145 ; [#uses=1]
- %147 = fmul float %116, %37 ; [#uses=1]
- %148 = fadd float %146, %147 ; [#uses=1]
- %149 = fmul float %41, %13 ; [#uses=1]
- %150 = fmul float %42, %8 ; [#uses=1]
- %151 = fadd float %149, %150 ; [#uses=1]
- %152 = fmul float %43, %3 ; [#uses=1]
- %153 = fadd float %151, %152 ; [#uses=1]
- %154 = fadd float %153, %57 ; [#uses=7]
- %155 = fmul float %38, %13 ; [#uses=1]
- %156 = fmul float %39, %8 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fmul float %40, %3 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fadd float %159, %62 ; [#uses=7]
- %161 = fmul float %35, %13 ; [#uses=1]
- %162 = fmul float %36, %8 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fmul float %37, %3 ; [#uses=1]
- %165 = fadd float %163, %164 ; [#uses=1]
- %166 = fadd float %165, %67 ; [#uses=7]
- %167 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %168 = load float* %167, align 4 ; [#uses=3]
- %169 = fmul float %168, %41 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=3]
- %172 = fmul float %171, %42 ; [#uses=1]
- %173 = fadd float %169, %172 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=3]
- %176 = fmul float %175, %43 ; [#uses=1]
- %177 = fadd float %173, %176 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %179 = load float* %178, align 4 ; [#uses=3]
- %180 = fmul float %179, %41 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=3]
- %183 = fmul float %182, %42 ; [#uses=1]
- %184 = fadd float %180, %183 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %186 = load float* %185, align 4 ; [#uses=3]
- %187 = fmul float %186, %43 ; [#uses=1]
- %188 = fadd float %184, %187 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %190 = load float* %189, align 4 ; [#uses=3]
- %191 = fmul float %190, %41 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %193 = load float* %192, align 4 ; [#uses=3]
- %194 = fmul float %193, %42 ; [#uses=1]
- %195 = fadd float %191, %194 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %197 = load float* %196, align 4 ; [#uses=3]
- %198 = fmul float %197, %43 ; [#uses=1]
- %199 = fadd float %195, %198 ; [#uses=1]
- %200 = fmul float %168, %38 ; [#uses=1]
- %201 = fmul float %171, %39 ; [#uses=1]
- %202 = fadd float %200, %201 ; [#uses=1]
- %203 = fmul float %175, %40 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=1]
- %205 = fmul float %179, %38 ; [#uses=1]
- %206 = fmul float %182, %39 ; [#uses=1]
- %207 = fadd float %205, %206 ; [#uses=1]
- %208 = fmul float %186, %40 ; [#uses=1]
- %209 = fadd float %207, %208 ; [#uses=1]
- %210 = fmul float %190, %38 ; [#uses=1]
- %211 = fmul float %193, %39 ; [#uses=1]
- %212 = fadd float %210, %211 ; [#uses=1]
- %213 = fmul float %197, %40 ; [#uses=1]
- %214 = fadd float %212, %213 ; [#uses=1]
- %215 = fmul float %168, %35 ; [#uses=1]
- %216 = fmul float %171, %36 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=1]
- %218 = fmul float %175, %37 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=1]
- %220 = fmul float %179, %35 ; [#uses=1]
- %221 = fmul float %182, %36 ; [#uses=1]
- %222 = fadd float %220, %221 ; [#uses=1]
- %223 = fmul float %186, %37 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=1]
- %225 = fmul float %190, %35 ; [#uses=1]
- %226 = fmul float %193, %36 ; [#uses=1]
- %227 = fadd float %225, %226 ; [#uses=1]
- %228 = fmul float %197, %37 ; [#uses=1]
- %229 = fadd float %227, %228 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btCollisionObject* %iftmp.223.0, i32 0, i32 9 ; [#uses=1]
- %231 = load %struct.btCollisionShape** %230, align 4 ; [#uses=4]
- %232 = getelementptr inbounds %struct.btCollisionShape* %231, i32 0, i32 1 ; [#uses=1]
- %233 = load i32* %232, align 4 ; [#uses=1]
- %234 = add i32 %233, -21 ; [#uses=1]
- %235 = icmp ult i32 %234, 9 ; [#uses=1]
- br i1 %235, label %bb11, label %bb21
-
-bb11: ; preds = %bb9
- %236 = getelementptr inbounds %struct.btQuadWord* %rayAabbMin, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %85, float* %236, align 8
- %237 = getelementptr inbounds %struct.btQuadWord* %rayAabbMin, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %79, float* %237, align 4
- %238 = getelementptr inbounds %struct.btQuadWord* %rayAabbMin, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %73, float* %238, align 8
- %239 = getelementptr inbounds %struct.btQuadWord* %rayAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %239, align 4
- %240 = fcmp olt float %166, %85 ; [#uses=1]
- br i1 %240, label %bb.i.i32, label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-bb.i.i32: ; preds = %bb11
- store float %166, float* %236, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i32, %bb11
- %241 = phi float [ %166, %bb.i.i32 ], [ %85, %bb11 ] ; [#uses=1]
- %242 = fcmp olt float %160, %79 ; [#uses=1]
- br i1 %242, label %bb.i7.i33, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-bb.i7.i33: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i
- store float %160, float* %237, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i33, %_Z8btSetMinIfEvRT_RKS0_.exit.i
- %243 = phi float [ %160, %bb.i7.i33 ], [ %79, %_Z8btSetMinIfEvRT_RKS0_.exit.i ] ; [#uses=1]
- %244 = fcmp olt float %154, %73 ; [#uses=1]
- br i1 %244, label %bb.i4.i34, label %_ZN9btVector36setMinERKS_.exit
-
-bb.i4.i34: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- store float %154, float* %238, align 8
- br label %_ZN9btVector36setMinERKS_.exit
-
-_ZN9btVector36setMinERKS_.exit: ; preds = %bb.i4.i34, %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- %245 = phi float [ %154, %bb.i4.i34 ], [ %73, %_Z8btSetMinIfEvRT_RKS0_.exit9.i ] ; [#uses=1]
- %246 = getelementptr inbounds %struct.btQuadWord* %rayAabbMax, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %85, float* %246, align 8
- %247 = getelementptr inbounds %struct.btQuadWord* %rayAabbMax, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %79, float* %247, align 4
- %248 = getelementptr inbounds %struct.btQuadWord* %rayAabbMax, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %73, float* %248, align 8
- %249 = getelementptr inbounds %struct.btQuadWord* %rayAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %249, align 4
- %250 = fcmp olt float %85, %166 ; [#uses=1]
- br i1 %250, label %bb.i.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-bb.i.i: ; preds = %_ZN9btVector36setMinERKS_.exit
- store float %166, float* %246, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i, %_ZN9btVector36setMinERKS_.exit
- %251 = phi float [ %166, %bb.i.i ], [ %85, %_ZN9btVector36setMinERKS_.exit ] ; [#uses=1]
- %252 = fcmp olt float %79, %160 ; [#uses=1]
- br i1 %252, label %bb.i7.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-bb.i7.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- store float %160, float* %247, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i, %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- %253 = phi float [ %160, %bb.i7.i ], [ %79, %_Z8btSetMaxIfEvRT_RKS0_.exit.i ] ; [#uses=1]
- %254 = fcmp olt float %73, %154 ; [#uses=1]
- br i1 %254, label %bb.i4.i, label %_ZN9btVector36setMaxERKS_.exit
-
-bb.i4.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- store float %154, float* %248, align 8
- br label %_ZN9btVector36setMaxERKS_.exit
-
-_ZN9btVector36setMaxERKS_.exit: ; preds = %bb.i4.i, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- %255 = phi float [ %154, %bb.i4.i ], [ %73, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i ] ; [#uses=1]
- %256 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 22 ; [#uses=1]
- %257 = load float* %256, align 4 ; [#uses=7]
- %258 = fsub float %241, %257 ; [#uses=1]
- store float %258, float* %236, align 8
- %259 = fsub float %243, %257 ; [#uses=1]
- store float %259, float* %237, align 4
- %260 = fsub float %245, %257 ; [#uses=1]
- store float %260, float* %238, align 8
- %261 = fadd float %251, %257 ; [#uses=1]
- store float %261, float* %246, align 8
- %262 = fadd float %253, %257 ; [#uses=1]
- store float %262, float* %247, align 4
- %263 = fadd float %255, %257 ; [#uses=1]
- store float %263, float* %248, align 8
- %264 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback, i32 0, i32 2), i32 (...)*** %264, align 8
- %265 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %148, float* %265, align 4
- %266 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %143, float* %266, align 4
- %267 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %138, float* %267, align 4
- %268 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %268, align 4
- %269 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %133, float* %269, align 4
- %270 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %128, float* %270, align 4
- %271 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %123, float* %271, align 4
- %272 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %272, align 4
- %273 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %118, float* %273, align 4
- %274 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %107, float* %274, align 4
- %275 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %96, float* %275, align 4
- %276 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %276, align 4
- %277 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %85, float* %277, align 4
- %278 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %79, float* %278, align 4
- %279 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %73, float* %279, align 4
- %280 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %280, align 4
- %281 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %229, float* %281, align 4
- %282 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %224, float* %282, align 4
- %283 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %219, float* %283, align 4
- %284 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %284, align 4
- %285 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %214, float* %285, align 4
- %286 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %209, float* %286, align 4
- %287 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %204, float* %287, align 4
- %288 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %288, align 4
- %289 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %199, float* %289, align 4
- %290 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %188, float* %290, align 4
- %291 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %177, float* %291, align 4
- %292 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %292, align 4
- %293 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %166, float* %293, align 4
- %294 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %160, float* %294, align 4
- %295 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %154, float* %295, align 4
- %296 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %296, align 4
- %297 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 4 ; [#uses=1]
- store float %257, float* %297, align 4
- %298 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 5 ; [#uses=2]
- %299 = getelementptr inbounds %struct.btCollisionObject* %iftmp.222.0, i32 0, i32 21 ; [#uses=3]
- %300 = load float* %299, align 4 ; [#uses=1]
- store float %300, float* %298, align 8
- %301 = icmp eq %struct.btCollisionShape* %231, null ; [#uses=1]
- br i1 %301, label %bb20, label %bb12
-
-bb12: ; preds = %_ZN9btVector36setMaxERKS_.exit
- %302 = bitcast %struct.btCollisionShape* %231 to %struct.btConcaveShape* ; [#uses=1]
- %303 = getelementptr inbounds %struct.btCollisionShape* %231, i32 0, i32 0 ; [#uses=1]
- %304 = load i32 (...)*** %303, align 4 ; [#uses=1]
- %305 = getelementptr inbounds i32 (...)** %304, i32 15 ; [#uses=1]
- %306 = load i32 (...)** %305, align 4 ; [#uses=1]
- %307 = bitcast i32 (...)* %306 to void (%struct.btConcaveShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %308 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 0 ; [#uses=2]
- invoke void %307(%struct.btConcaveShape* %302, %struct.btActionInterface* %308, %struct.btQuadWord* %rayAabbMin, %struct.btQuadWord* %rayAabbMax)
- to label %bb13 unwind label %lpad
-
-bb13: ; preds = %bb12
- %.pre = load float* %298, align 8 ; [#uses=3]
- %.pre68 = load float* %299, align 4 ; [#uses=1]
- %309 = fcmp olt float %.pre, %.pre68 ; [#uses=1]
- br i1 %309, label %bb15, label %bb20
-
-bb15: ; preds = %bb13
- store float %.pre, float* %299, align 4
- br label %bb20
-
-invcont18: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb20: ; preds = %bb15, %bb13, %_ZN9btVector36setMaxERKS_.exit
- %finally_tmp.238.0 = phi float [ %.pre, %bb15 ], [ 1.000000e+00, %bb13 ], [ 1.000000e+00, %_ZN9btVector36setMaxERKS_.exit ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback, i32 0, i32 2), i32 (...)*** %264, align 8
- %310 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %raycastCallback, i32 0, i32 0 ; [#uses=1]
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %310)
- ret float %finally_tmp.238.0
-
-bb21: ; preds = %bb9, %entry
- ret float 1.000000e+00
-
-lpad: ; preds = %bb12
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select25 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback, i32 0, i32 2), i32 (...)*** %264, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %308)
- to label %invcont18 unwind label %lpad26
-
-lpad26: ; preds = %lpad
- %eh_ptr27 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultEN31LocalTriangleSphereCastCallbackD2Ev(%struct..0LocalTriangleSphereCastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN33btConvexConcaveCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResultE31LocalTriangleSphereCastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0LocalTriangleSphereCastCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN24btConvexTriangleCallbackD0Ev(%struct.btConvexTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btConvexTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 6 ; [#uses=2]
- %2 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btActionInterface* %2, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 5 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 10 ; [#uses=2]
- %8 = load %struct.btPersistentManifold** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %6 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %9(%struct.btActionInterface* %2, %struct.btPersistentManifold* %8)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %10 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btActionInterface* %10, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 4 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = load %struct.btPersistentManifold** %7, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %14 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %16(%struct.btActionInterface* %10, %struct.btPersistentManifold* %15)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %invcont
- %17 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %17)
- %18 = bitcast %struct.btConvexTriangleCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %18) nounwind
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %19 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %19)
- to label %invcont2 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=4]
-define void @_ZN24btConvexTriangleCallbackD1Ev(%struct.btConvexTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btConvexTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 6 ; [#uses=2]
- %2 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btActionInterface* %2, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 5 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 10 ; [#uses=2]
- %8 = load %struct.btPersistentManifold** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %6 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %9(%struct.btActionInterface* %2, %struct.btPersistentManifold* %8)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %10 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btActionInterface* %10, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 4 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = load %struct.btPersistentManifold** %7, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %14 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %16(%struct.btActionInterface* %10, %struct.btPersistentManifold* %15)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %invcont
- %17 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %17)
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %18 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %18)
- to label %invcont2 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN24btConvexTriangleCallbackD2Ev(%struct.btConvexTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btConvexTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 6 ; [#uses=2]
- %2 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btActionInterface* %2, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 5 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 10 ; [#uses=2]
- %8 = load %struct.btPersistentManifold** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %6 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %9(%struct.btActionInterface* %2, %struct.btPersistentManifold* %8)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %10 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btActionInterface* %10, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 4 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = load %struct.btPersistentManifold** %7, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %14 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %16(%struct.btActionInterface* %10, %struct.btPersistentManifold* %15)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %invcont
- %17 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %17)
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %18 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %18)
- to label %invcont2 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN24btConvexTriangleCallbackC2EP12btDispatcherP17btCollisionObjectS3_b(%struct.btConvexTriangleCallback* %this, %struct.btActionInterface* %dispatcher, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %isSwapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btConvexTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 6 ; [#uses=2]
- store %struct.btActionInterface* %dispatcher, %struct.btActionInterface** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 7 ; [#uses=1]
- store %struct.btDispatcherInfo* null, %struct.btDispatcherInfo** %2, align 4
- %toBool = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.204.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.204.0, %struct.btCollisionObject** %3, align 4
- %iftmp.205.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.205.0, %struct.btCollisionObject** %4, align 4
- %5 = getelementptr inbounds %struct.btActionInterface* %dispatcher, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 3 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %10 = bitcast %struct.btCollisionObject* %iftmp.204.0 to i8* ; [#uses=1]
- %11 = bitcast %struct.btCollisionObject* %iftmp.205.0 to i8* ; [#uses=1]
- %12 = invoke %struct.btPersistentManifold* %9(%struct.btActionInterface* %dispatcher, i8* %10, i8* %11)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %entry
- %13 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 10 ; [#uses=1]
- store %struct.btPersistentManifold* %12, %struct.btPersistentManifold** %13, align 4
- %14 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btActionInterface* %14, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 5 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %19(%struct.btActionInterface* %14, %struct.btPersistentManifold* %12)
- to label %return unwind label %lpad
-
-invcont9: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %invcont
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %20 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %20)
- to label %invcont9 unwind label %lpad14
-
-lpad14: ; preds = %lpad
- %eh_ptr15 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr15, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN24btConvexTriangleCallbackC1EP12btDispatcherP17btCollisionObjectS3_b(%struct.btConvexTriangleCallback* %this, %struct.btActionInterface* %dispatcher, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %isSwapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btConvexTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 6 ; [#uses=2]
- store %struct.btActionInterface* %dispatcher, %struct.btActionInterface** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 7 ; [#uses=1]
- store %struct.btDispatcherInfo* null, %struct.btDispatcherInfo** %2, align 4
- %toBool.i = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.204.0.i = select i1 %toBool.i, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.204.0.i, %struct.btCollisionObject** %3, align 4
- %iftmp.205.0.i = select i1 %toBool.i, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.205.0.i, %struct.btCollisionObject** %4, align 4
- %5 = getelementptr inbounds %struct.btActionInterface* %dispatcher, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 3 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %10 = bitcast %struct.btCollisionObject* %iftmp.204.0.i to i8* ; [#uses=1]
- %11 = bitcast %struct.btCollisionObject* %iftmp.205.0.i to i8* ; [#uses=1]
- %12 = invoke %struct.btPersistentManifold* %9(%struct.btActionInterface* %dispatcher, i8* %10, i8* %11)
- to label %invcont.i unwind label %lpad.i ; [#uses=2]
-
-invcont.i: ; preds = %entry
- %13 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 10 ; [#uses=1]
- store %struct.btPersistentManifold* %12, %struct.btPersistentManifold** %13, align 4
- %14 = load %struct.btActionInterface** %1, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btActionInterface* %14, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 5 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %19(%struct.btActionInterface* %14, %struct.btPersistentManifold* %12)
- to label %_ZN24btConvexTriangleCallbackC2EP12btDispatcherP17btCollisionObjectS3_b.exit unwind label %lpad.i
-
-invcont9.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %invcont.i, %entry
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select13.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %20 = getelementptr inbounds %struct.btConvexTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %20)
- to label %invcont9.i unwind label %lpad14.i
-
-lpad14.i: ; preds = %lpad.i
- %eh_ptr15.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select17.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr15.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN24btConvexTriangleCallbackC2EP12btDispatcherP17btCollisionObjectS3_b.exit: ; preds = %invcont.i
- ret void
-}
-
-; [#uses=1]
-define void @_ZN33btConvexConcaveCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvexConcaveCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=2]
- %iftmp.213.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %iftmp.214.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCollisionObject* %iftmp.214.0, i32 0, i32 9 ; [#uses=1]
- %3 = load %struct.btCollisionShape** %2, align 4 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btCollisionShape* %3, i32 0, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = add i32 %5, -21 ; [#uses=1]
- %7 = icmp ult i32 %6, 9 ; [#uses=1]
- br i1 %7, label %bb8, label %_ZN16btManifoldResult20refreshContactPointsEv.exit
-
-bb8: ; preds = %entry
- %8 = bitcast %struct.btCollisionShape* %3 to %struct.btConcaveShape* ; [#uses=2]
- %9 = getelementptr inbounds %struct.btCollisionObject* %iftmp.213.0, i32 0, i32 9 ; [#uses=1]
- %10 = load %struct.btCollisionShape** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionShape* %10, i32 0, i32 1 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = icmp slt i32 %12, 20 ; [#uses=1]
- br i1 %13, label %bb10, label %_ZN16btManifoldResult20refreshContactPointsEv.exit
-
-bb10: ; preds = %bb8
- %14 = getelementptr inbounds %struct.btCollisionShape* %3, i32 0, i32 0 ; [#uses=2]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 11 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %19 = tail call float %18(%struct.btConcaveShape* %8) ; [#uses=1]
- %20 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 10 ; [#uses=2]
- %21 = load %struct.btPersistentManifold** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- store %struct.btPersistentManifold* %21, %struct.btPersistentManifold** %22, align 4
- %23 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- tail call void @_ZN24btConvexTriangleCallback22setTimeStepAndCountersEfRK16btDispatcherInfoP16btManifoldResult(%struct.btConvexTriangleCallback* %23, float %19, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut)
- %24 = load %struct.btPersistentManifold** %20, align 4 ; [#uses=2]
- %25 = bitcast %struct.btCollisionObject* %iftmp.213.0 to i8* ; [#uses=1]
- %26 = bitcast %struct.btCollisionObject* %iftmp.214.0 to i8* ; [#uses=1]
- %27 = getelementptr inbounds %struct.btPersistentManifold* %24, i32 0, i32 2 ; [#uses=1]
- store i8* %25, i8** %27, align 4
- %28 = getelementptr inbounds %struct.btPersistentManifold* %24, i32 0, i32 3 ; [#uses=1]
- store i8* %26, i8** %28, align 4
- %29 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 15 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %35 = bitcast i32 (...)* %31 to void (%struct.btConcaveShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %35(%struct.btConcaveShape* %8, %struct.btActionInterface* %34, %struct.btQuadWord* %33, %struct.btQuadWord* %32)
- %36 = load %struct.btPersistentManifold** %22, align 4 ; [#uses=4]
- %37 = getelementptr inbounds %struct.btPersistentManifold* %36, i32 0, i32 4 ; [#uses=1]
- %38 = load i32* %37, align 4 ; [#uses=1]
- %39 = icmp eq i32 %38, 0 ; [#uses=1]
- br i1 %39, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb.i
-
-bb.i: ; preds = %bb10
- %40 = getelementptr inbounds %struct.btPersistentManifold* %36, i32 0, i32 2 ; [#uses=1]
- %41 = load i8** %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %43 = load %struct.btCollisionObject** %42, align 4 ; [#uses=1]
- %44 = bitcast %struct.btCollisionObject* %43 to i8* ; [#uses=1]
- %45 = icmp eq i8* %41, %44 ; [#uses=1]
- br i1 %45, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %46 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- tail call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %36, %struct.btTransform* %47, %struct.btTransform* %46)
- ret void
-
-bb3.i: ; preds = %bb.i
- %48 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- tail call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %36, %struct.btTransform* %49, %struct.btTransform* %48)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit: ; preds = %bb10, %bb8, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN33btConvexConcaveCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btConvexConcaveCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 10 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN33btConvexConcaveCollisionAlgorithmD0Ev(%struct.btConvexConcaveCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV33btConvexConcaveCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN24btConvexTriangleCallbackD1Ev(%struct.btConvexTriangleCallback* %1)
- to label %bb3 unwind label %lpad
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %entry
- %2 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %2)
- %3 = bitcast %struct.btConvexConcaveCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %3) nounwind
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %4 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %4)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN33btConvexConcaveCollisionAlgorithmD1Ev(%struct.btConvexConcaveCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV33btConvexConcaveCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN24btConvexTriangleCallbackD1Ev(%struct.btConvexTriangleCallback* %1)
- to label %bb3 unwind label %lpad
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %entry
- %2 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %2)
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %3 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %3)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN33btConvexConcaveCollisionAlgorithmD2Ev(%struct.btConvexConcaveCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV33btConvexConcaveCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN24btConvexTriangleCallbackD1Ev(%struct.btConvexTriangleCallback* %1)
- to label %bb3 unwind label %lpad
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %entry
- %2 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %2)
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %3 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %3)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=2]
-define void @_ZN33btConvexConcaveCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btConvexConcaveCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %isSwapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV33btConvexConcaveCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store i8 %isSwapped, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btConvexTriangleCallback, i32 0, i32 2), i32 (...)*** %5, align 4
- %6 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 6 ; [#uses=2]
- store %struct.btActionInterface* %4, %struct.btActionInterface** %6, align 4
- %7 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 7 ; [#uses=1]
- store %struct.btDispatcherInfo* null, %struct.btDispatcherInfo** %7, align 4
- %toBool.i.i = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.204.0.i.i = select i1 %toBool.i.i, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.204.0.i.i, %struct.btCollisionObject** %8, align 4
- %iftmp.205.0.i.i = select i1 %toBool.i.i, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %iftmp.205.0.i.i, %struct.btCollisionObject** %9, align 4
- %10 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 3 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %15 = bitcast %struct.btCollisionObject* %iftmp.204.0.i.i to i8* ; [#uses=1]
- %16 = bitcast %struct.btCollisionObject* %iftmp.205.0.i.i to i8* ; [#uses=1]
- %17 = invoke %struct.btPersistentManifold* %14(%struct.btActionInterface* %4, i8* %15, i8* %16)
- to label %invcont.i.i unwind label %lpad.i.i ; [#uses=2]
-
-invcont.i.i: ; preds = %entry
- %18 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 10 ; [#uses=1]
- store %struct.btPersistentManifold* %17, %struct.btPersistentManifold** %18, align 4
- %19 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btActionInterface* %19, i32 0, i32 0 ; [#uses=1]
- %21 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 5 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %23 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %24(%struct.btActionInterface* %19, %struct.btPersistentManifold* %17)
- to label %return unwind label %lpad.i.i
-
-invcont9.i.i: ; preds = %lpad.i.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i.i)
- to label %.noexc unwind label %lpad
-
-.noexc: ; preds = %invcont9.i.i
- unreachable
-
-lpad.i.i: ; preds = %invcont.i.i, %entry
- %eh_ptr.i.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select13.i.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %25 = getelementptr inbounds %struct.btConvexConcaveCollisionAlgorithm* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %25)
- to label %invcont9.i.i unwind label %lpad14.i.i
-
-lpad14.i.i: ; preds = %lpad.i.i
- %eh_ptr15.i.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select17.i.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr15.i.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %invcont.i.i
- ret void
-
-lpad: ; preds = %invcont9.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select5 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont1 unwind label %lpad6
-
-lpad6: ; preds = %lpad
- %eh_ptr7 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr7, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN23btConvexConvexAlgorithm10CreateFuncC2EP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %1, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN23btConvexConvexAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %2 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 4 ; [#uses=1]
- store i32 3, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %4, align 4
- %5 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %5, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btCollisionAlgorithmCreateFuncD1Ev(%struct.btCollisionAlgorithmCreateFunc* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btCollisionAlgorithmCreateFunc, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btCollisionAlgorithmCreateFuncD0Ev(%struct.btCollisionAlgorithmCreateFunc* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btCollisionAlgorithmCreateFunc, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btCollisionAlgorithmCreateFunc* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btCollisionAlgorithm* @_ZN30btCollisionAlgorithmCreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS3_(%struct.btCollisionAlgorithmCreateFunc* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* nocapture %unnamed_arg, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1) nounwind readnone align 2 {
-entry:
- ret %struct.btCollisionAlgorithm* null
-}
-
-; [#uses=1]
-define void @_ZN23btConvexConvexAlgorithm10CreateFuncD1Ev(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN23btConvexConvexAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btConvexConvexAlgorithm10CreateFuncD0Ev(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN23btConvexConvexAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN23btConvexConvexAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 36) ; [#uses=11]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 4 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 3 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- %14 = load %struct.btActionInterface** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- %16 = load %struct.btVoronoiSimplexSolver** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 1 ; [#uses=1]
- %18 = load %struct.btPersistentManifold** %17, align 4 ; [#uses=1]
- %19 = bitcast i8* %7 to %struct.btActivatingCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %19, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- to label %_ZN23btConvexConvexAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii.exit unwind label %lpad
-
-_ZN23btConvexConvexAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii.exit: ; preds = %bb
- %20 = bitcast i8* %7 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btConvexConvexAlgorithm, i32 0, i32 2), i32 (...)*** %20, align 4
- %21 = getelementptr inbounds i8* %7, i32 8 ; [#uses=1]
- %22 = bitcast i8* %21 to %struct.btVoronoiSimplexSolver** ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %16, %struct.btVoronoiSimplexSolver** %22, align 4
- %23 = getelementptr inbounds i8* %7, i32 12 ; [#uses=1]
- %24 = bitcast i8* %23 to %struct.btActionInterface** ; [#uses=1]
- store %struct.btActionInterface* %14, %struct.btActionInterface** %24, align 4
- %25 = getelementptr inbounds i8* %7, i32 16 ; [#uses=1]
- store i8 0, i8* %25, align 4
- %26 = getelementptr inbounds i8* %7, i32 20 ; [#uses=1]
- %27 = bitcast i8* %26 to %struct.btPersistentManifold** ; [#uses=1]
- store %struct.btPersistentManifold* %18, %struct.btPersistentManifold** %27, align 4
- %28 = getelementptr inbounds i8* %7, i32 24 ; [#uses=1]
- store i8 0, i8* %28, align 4
- %29 = getelementptr inbounds i8* %7, i32 28 ; [#uses=1]
- %30 = bitcast i8* %29 to i32* ; [#uses=1]
- store i32 %12, i32* %30, align 4
- %31 = getelementptr inbounds i8* %7, i32 32 ; [#uses=1]
- %32 = bitcast i8* %31 to i32* ; [#uses=1]
- store i32 %10, i32* %32, align 4
- br label %bb4
-
-bb4: ; preds = %_ZN23btConvexConvexAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii.exit, %entry
- %iftmp.161.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.161.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN23btConvexConvexAlgorithm10CreateFuncC1EP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %1, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN23btConvexConvexAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %2 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 4 ; [#uses=1]
- store i32 3, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %4, align 4
- %5 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %5, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btConvexConvexAlgorithm19setLowLevelOfDetailEb(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, i8 zeroext %useLowLevel) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i8 %useLowLevel, i8* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btPerturbedContactResultD1Ev(%struct.btPerturbedContactResult* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV24btPerturbedContactResult, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btPerturbedContactResultD0Ev(%struct.btPerturbedContactResult* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV24btPerturbedContactResult, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btPerturbedContactResult* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btPerturbedContactResult15addContactPointERK9btVector3S2_f(%struct.btPerturbedContactResult* nocapture %this, %struct.btQuadWord* %normalOnBInWorld, %struct.btQuadWord* nocapture %pointInWorld, float %orgDepth) align 2 {
-entry:
- %startPt = alloca %struct.btQuadWord, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = fmul float %3, %orgDepth ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- %7 = fmul float %6, %orgDepth ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- %10 = fmul float %9, %orgDepth ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=5]
- %13 = fadd float %12, %4 ; [#uses=4]
- %14 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=5]
- %16 = fadd float %15, %7 ; [#uses=4]
- %17 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=5]
- %19 = fadd float %18, %10 ; [#uses=4]
- br i1 %toBool, label %bb2, label %bb
-
-bb: ; preds = %entry
- %20 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=4]
- %30 = load float* %27, align 4 ; [#uses=4]
- %31 = load float* %26, align 4 ; [#uses=4]
- %32 = load float* %25, align 4 ; [#uses=4]
- %33 = load float* %24, align 4 ; [#uses=4]
- %34 = load float* %23, align 4 ; [#uses=4]
- %35 = load float* %22, align 4 ; [#uses=4]
- %36 = load float* %21, align 4 ; [#uses=4]
- %37 = load float* %20, align 4 ; [#uses=4]
- %38 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fsub float -0.000000e+00, %39 ; [#uses=3]
- %41 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fsub float -0.000000e+00, %42 ; [#uses=3]
- %44 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fsub float -0.000000e+00, %45 ; [#uses=3]
- %47 = fmul float %35, %46 ; [#uses=1]
- %48 = fmul float %36, %43 ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=1]
- %50 = fmul float %37, %40 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=3]
- %52 = fmul float %32, %46 ; [#uses=1]
- %53 = fmul float %33, %43 ; [#uses=1]
- %54 = fadd float %52, %53 ; [#uses=1]
- %55 = fmul float %34, %40 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=3]
- %57 = fmul float %29, %46 ; [#uses=1]
- %58 = fmul float %30, %43 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = fmul float %31, %40 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=3]
- %62 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=4]
- %64 = fmul float %63, %61 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=4]
- %67 = fmul float %66, %56 ; [#uses=1]
- %68 = fadd float %64, %67 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=4]
- %71 = fmul float %70, %51 ; [#uses=1]
- %72 = fadd float %68, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fadd float %72, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=4]
- %78 = fmul float %77, %61 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=4]
- %81 = fmul float %80, %56 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=4]
- %85 = fmul float %84, %51 ; [#uses=1]
- %86 = fadd float %82, %85 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fadd float %86, %88 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=4]
- %92 = fmul float %91, %61 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=4]
- %95 = fmul float %94, %56 ; [#uses=1]
- %96 = fadd float %92, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=4]
- %99 = fmul float %98, %51 ; [#uses=1]
- %100 = fadd float %96, %99 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fadd float %100, %102 ; [#uses=1]
- %104 = fmul float %31, %63 ; [#uses=1]
- %105 = fmul float %34, %66 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %37, %70 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %30, %63 ; [#uses=1]
- %110 = fmul float %33, %66 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = fmul float %36, %70 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fmul float %29, %63 ; [#uses=1]
- %115 = fmul float %32, %66 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=1]
- %117 = fmul float %35, %70 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=1]
- %119 = fmul float %31, %77 ; [#uses=1]
- %120 = fmul float %34, %80 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fmul float %37, %84 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=1]
- %124 = fmul float %30, %77 ; [#uses=1]
- %125 = fmul float %33, %80 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = fmul float %36, %84 ; [#uses=1]
- %128 = fadd float %126, %127 ; [#uses=1]
- %129 = fmul float %29, %77 ; [#uses=1]
- %130 = fmul float %32, %80 ; [#uses=1]
- %131 = fadd float %129, %130 ; [#uses=1]
- %132 = fmul float %35, %84 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %31, %91 ; [#uses=1]
- %135 = fmul float %34, %94 ; [#uses=1]
- %136 = fadd float %134, %135 ; [#uses=1]
- %137 = fmul float %37, %98 ; [#uses=1]
- %138 = fadd float %136, %137 ; [#uses=1]
- %139 = fmul float %30, %91 ; [#uses=1]
- %140 = fmul float %33, %94 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = fmul float %36, %98 ; [#uses=1]
- %143 = fadd float %141, %142 ; [#uses=1]
- %144 = fmul float %29, %91 ; [#uses=1]
- %145 = fmul float %32, %94 ; [#uses=1]
- %146 = fadd float %144, %145 ; [#uses=1]
- %147 = fmul float %35, %98 ; [#uses=1]
- %148 = fadd float %146, %147 ; [#uses=1]
- %149 = fmul float %118, %19 ; [#uses=1]
- %150 = fmul float %113, %16 ; [#uses=1]
- %151 = fadd float %149, %150 ; [#uses=1]
- %152 = fmul float %108, %13 ; [#uses=1]
- %153 = fadd float %151, %152 ; [#uses=1]
- %154 = fadd float %153, %75 ; [#uses=2]
- %155 = fmul float %133, %19 ; [#uses=1]
- %156 = fmul float %128, %16 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fmul float %123, %13 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fadd float %159, %89 ; [#uses=2]
- %161 = fmul float %148, %19 ; [#uses=1]
- %162 = fmul float %143, %16 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fmul float %138, %13 ; [#uses=1]
- %165 = fadd float %163, %164 ; [#uses=1]
- %166 = fadd float %165, %103 ; [#uses=2]
- %167 = fsub float %154, %12 ; [#uses=1]
- %168 = fsub float %160, %15 ; [#uses=1]
- %169 = fsub float %166, %18 ; [#uses=1]
- %170 = fmul float %169, %9 ; [#uses=1]
- %171 = fmul float %168, %6 ; [#uses=1]
- %172 = fadd float %170, %171 ; [#uses=1]
- %173 = fmul float %167, %3 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=4]
- %175 = fmul float %3, %174 ; [#uses=1]
- %176 = fmul float %6, %174 ; [#uses=1]
- %177 = fmul float %9, %174 ; [#uses=1]
- %178 = fadd float %154, %175 ; [#uses=1]
- %179 = fadd float %160, %176 ; [#uses=1]
- %180 = fadd float %166, %177 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %180, float* %181, align 8
- %182 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %179, float* %182, align 4
- %183 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %178, float* %183, align 8
- %184 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %184, align 4
- br label %bb5
-
-bb2: ; preds = %entry
- %185 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %194 = load float* %193, align 4 ; [#uses=4]
- %195 = load float* %192, align 4 ; [#uses=4]
- %196 = load float* %191, align 4 ; [#uses=4]
- %197 = load float* %190, align 4 ; [#uses=4]
- %198 = load float* %189, align 4 ; [#uses=4]
- %199 = load float* %188, align 4 ; [#uses=4]
- %200 = load float* %187, align 4 ; [#uses=4]
- %201 = load float* %186, align 4 ; [#uses=4]
- %202 = load float* %185, align 4 ; [#uses=4]
- %203 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %204 = load float* %203, align 4 ; [#uses=1]
- %205 = fsub float -0.000000e+00, %204 ; [#uses=3]
- %206 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %207 = load float* %206, align 4 ; [#uses=1]
- %208 = fsub float -0.000000e+00, %207 ; [#uses=3]
- %209 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=1]
- %211 = fsub float -0.000000e+00, %210 ; [#uses=3]
- %212 = fmul float %200, %211 ; [#uses=1]
- %213 = fmul float %201, %208 ; [#uses=1]
- %214 = fadd float %212, %213 ; [#uses=1]
- %215 = fmul float %202, %205 ; [#uses=1]
- %216 = fadd float %214, %215 ; [#uses=3]
- %217 = fmul float %197, %211 ; [#uses=1]
- %218 = fmul float %198, %208 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=1]
- %220 = fmul float %199, %205 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=3]
- %222 = fmul float %194, %211 ; [#uses=1]
- %223 = fmul float %195, %208 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=1]
- %225 = fmul float %196, %205 ; [#uses=1]
- %226 = fadd float %224, %225 ; [#uses=3]
- %227 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %228 = load float* %227, align 4 ; [#uses=4]
- %229 = fmul float %228, %226 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %231 = load float* %230, align 4 ; [#uses=4]
- %232 = fmul float %231, %221 ; [#uses=1]
- %233 = fadd float %229, %232 ; [#uses=1]
- %234 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %235 = load float* %234, align 4 ; [#uses=4]
- %236 = fmul float %235, %216 ; [#uses=1]
- %237 = fadd float %233, %236 ; [#uses=1]
- %238 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %239 = load float* %238, align 4 ; [#uses=1]
- %240 = fadd float %237, %239 ; [#uses=1]
- %241 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %242 = load float* %241, align 4 ; [#uses=4]
- %243 = fmul float %242, %226 ; [#uses=1]
- %244 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %245 = load float* %244, align 4 ; [#uses=4]
- %246 = fmul float %245, %221 ; [#uses=1]
- %247 = fadd float %243, %246 ; [#uses=1]
- %248 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %249 = load float* %248, align 4 ; [#uses=4]
- %250 = fmul float %249, %216 ; [#uses=1]
- %251 = fadd float %247, %250 ; [#uses=1]
- %252 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %253 = load float* %252, align 4 ; [#uses=1]
- %254 = fadd float %251, %253 ; [#uses=1]
- %255 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %256 = load float* %255, align 4 ; [#uses=4]
- %257 = fmul float %256, %226 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %259 = load float* %258, align 4 ; [#uses=4]
- %260 = fmul float %259, %221 ; [#uses=1]
- %261 = fadd float %257, %260 ; [#uses=1]
- %262 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %263 = load float* %262, align 4 ; [#uses=4]
- %264 = fmul float %263, %216 ; [#uses=1]
- %265 = fadd float %261, %264 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %267 = load float* %266, align 4 ; [#uses=1]
- %268 = fadd float %265, %267 ; [#uses=1]
- %269 = fmul float %196, %228 ; [#uses=1]
- %270 = fmul float %199, %231 ; [#uses=1]
- %271 = fadd float %269, %270 ; [#uses=1]
- %272 = fmul float %202, %235 ; [#uses=1]
- %273 = fadd float %271, %272 ; [#uses=1]
- %274 = fmul float %195, %228 ; [#uses=1]
- %275 = fmul float %198, %231 ; [#uses=1]
- %276 = fadd float %274, %275 ; [#uses=1]
- %277 = fmul float %201, %235 ; [#uses=1]
- %278 = fadd float %276, %277 ; [#uses=1]
- %279 = fmul float %194, %228 ; [#uses=1]
- %280 = fmul float %197, %231 ; [#uses=1]
- %281 = fadd float %279, %280 ; [#uses=1]
- %282 = fmul float %200, %235 ; [#uses=1]
- %283 = fadd float %281, %282 ; [#uses=1]
- %284 = fmul float %196, %242 ; [#uses=1]
- %285 = fmul float %199, %245 ; [#uses=1]
- %286 = fadd float %284, %285 ; [#uses=1]
- %287 = fmul float %202, %249 ; [#uses=1]
- %288 = fadd float %286, %287 ; [#uses=1]
- %289 = fmul float %195, %242 ; [#uses=1]
- %290 = fmul float %198, %245 ; [#uses=1]
- %291 = fadd float %289, %290 ; [#uses=1]
- %292 = fmul float %201, %249 ; [#uses=1]
- %293 = fadd float %291, %292 ; [#uses=1]
- %294 = fmul float %194, %242 ; [#uses=1]
- %295 = fmul float %197, %245 ; [#uses=1]
- %296 = fadd float %294, %295 ; [#uses=1]
- %297 = fmul float %200, %249 ; [#uses=1]
- %298 = fadd float %296, %297 ; [#uses=1]
- %299 = fmul float %196, %256 ; [#uses=1]
- %300 = fmul float %199, %259 ; [#uses=1]
- %301 = fadd float %299, %300 ; [#uses=1]
- %302 = fmul float %202, %263 ; [#uses=1]
- %303 = fadd float %301, %302 ; [#uses=1]
- %304 = fmul float %195, %256 ; [#uses=1]
- %305 = fmul float %198, %259 ; [#uses=1]
- %306 = fadd float %304, %305 ; [#uses=1]
- %307 = fmul float %201, %263 ; [#uses=1]
- %308 = fadd float %306, %307 ; [#uses=1]
- %309 = fmul float %194, %256 ; [#uses=1]
- %310 = fmul float %197, %259 ; [#uses=1]
- %311 = fadd float %309, %310 ; [#uses=1]
- %312 = fmul float %200, %263 ; [#uses=1]
- %313 = fadd float %311, %312 ; [#uses=1]
- %314 = fmul float %283, %18 ; [#uses=1]
- %315 = fmul float %278, %15 ; [#uses=1]
- %316 = fadd float %314, %315 ; [#uses=1]
- %317 = fmul float %273, %12 ; [#uses=1]
- %318 = fadd float %316, %317 ; [#uses=1]
- %319 = fadd float %318, %240 ; [#uses=2]
- %320 = fmul float %298, %18 ; [#uses=1]
- %321 = fmul float %293, %15 ; [#uses=1]
- %322 = fadd float %320, %321 ; [#uses=1]
- %323 = fmul float %288, %12 ; [#uses=1]
- %324 = fadd float %322, %323 ; [#uses=1]
- %325 = fadd float %324, %254 ; [#uses=2]
- %326 = fmul float %313, %18 ; [#uses=1]
- %327 = fmul float %308, %15 ; [#uses=1]
- %328 = fadd float %326, %327 ; [#uses=1]
- %329 = fmul float %303, %12 ; [#uses=1]
- %330 = fadd float %328, %329 ; [#uses=1]
- %331 = fadd float %330, %268 ; [#uses=2]
- %332 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %331, float* %332, align 8
- %333 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %325, float* %333, align 4
- %334 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %319, float* %334, align 8
- %335 = getelementptr inbounds %struct.btQuadWord* %startPt, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %335, align 4
- %336 = fsub float %13, %319 ; [#uses=1]
- %337 = fsub float %16, %325 ; [#uses=1]
- %338 = fsub float %19, %331 ; [#uses=1]
- %339 = fmul float %338, %9 ; [#uses=1]
- %340 = fmul float %337, %6 ; [#uses=1]
- %341 = fadd float %339, %340 ; [#uses=1]
- %342 = fmul float %336, %3 ; [#uses=1]
- %343 = fadd float %341, %342 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb2, %bb
- %newDepth.0 = phi float [ %343, %bb2 ], [ %174, %bb ] ; [#uses=1]
- %344 = getelementptr inbounds %struct.btPerturbedContactResult* %this, i32 0, i32 1 ; [#uses=1]
- %345 = load %struct.btManifoldResult** %344, align 4 ; [#uses=2]
- %346 = getelementptr inbounds %struct.btManifoldResult* %345, i32 0, i32 0, i32 0 ; [#uses=1]
- %347 = load i32 (...)*** %346, align 4 ; [#uses=1]
- %348 = getelementptr inbounds i32 (...)** %347, i32 4 ; [#uses=1]
- %349 = load i32 (...)** %348, align 4 ; [#uses=1]
- %350 = bitcast i32 (...)* %349 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %350(%struct.btManifoldResult* %345, %struct.btQuadWord* %normalOnBInWorld, %struct.btQuadWord* %startPt, float %newDepth.0)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btConvexConvexAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btConvexConvexAlgorithm10CreateFuncD2Ev(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN23btConvexConvexAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define float @_ZN23btConvexConvexAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) align 2 {
-entry:
- %sphere1 = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=6]
- %result = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=5]
- %voronoiSimplex = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %ccd1 = alloca %struct.btGjkConvexCast, align 8 ; [#uses=6]
- %sphere0 = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=6]
- %result31 = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=5]
- %voronoiSimplex32 = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %ccd133 = alloca %struct.btGjkConvexCast, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = fmul float %14, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = fmul float %4, %4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fsub float %21, %23 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fsub float %26, %28 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %31, %33 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 23 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %36 ; [#uses=1]
- %38 = fcmp ule float %37, %19 ; [#uses=1]
- br i1 %38, label %bb2, label %bb
-
-bb: ; preds = %entry
- %39 = fmul float %29, %29 ; [#uses=1]
- %40 = fmul float %34, %34 ; [#uses=1]
- %41 = fmul float %24, %24 ; [#uses=1]
- %42 = fadd float %40, %39 ; [#uses=1]
- %43 = fadd float %42, %41 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 23 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- %46 = fmul float %45, %45 ; [#uses=1]
- %47 = fcmp ule float %46, %43 ; [#uses=1]
- %48 = load i8* @disableCcd, align 1 ; [#uses=1]
- %toBool6 = icmp eq i8 %48, 0 ; [#uses=1]
- %or.cond = and i1 %47, %toBool6 ; [#uses=1]
- br i1 %or.cond, label %invcont, label %bb59
-
-bb2: ; preds = %entry
- %.old = load i8* @disableCcd, align 1 ; [#uses=1]
- %toBool6.old = icmp eq i8 %.old, 0 ; [#uses=1]
- br i1 %toBool6.old, label %invcont, label %bb59
-
-invcont: ; preds = %bb2, %bb
- %49 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 9 ; [#uses=1]
- %50 = load %struct.btCollisionShape** %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 22 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=2]
- %53 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %53)
- %54 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %54, align 8
- %55 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %55, align 4
- %56 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %52, float* %56, align 4
- %57 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %52, float* %57, align 4
- %58 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %58, align 8
- %59 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 5 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %59, align 4
- %60 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %60, align 8
- %61 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %61, align 4
- %62 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %62, align 4
- %63 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %64 = load i8* %63, align 4 ; [#uses=1]
- %65 = and i8 %64, -16 ; [#uses=1]
- store i8 %65, i8* %63, align 4
- %66 = bitcast %struct.btCollisionShape* %50 to %struct.btConvexShape* ; [#uses=1]
- %67 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 0 ; [#uses=3]
- invoke void @_ZN15btGjkConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* %ccd1, %struct.btConvexShape* %66, %struct.btConvexShape* %67, %struct.btVoronoiSimplexSolver* %voronoiSimplex)
- to label %invcont9 unwind label %lpad
-
-invcont9: ; preds = %invcont
- %68 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2 ; [#uses=2]
- %69 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2 ; [#uses=2]
- %71 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1 ; [#uses=2]
- %72 = invoke zeroext i8 @_ZN15btGjkConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* %ccd1, %struct.btTransform* %71, %struct.btTransform* %70, %struct.btTransform* %69, %struct.btTransform* %68, %"struct.btConvexCast::CastResult"* %result)
- to label %invcont10 unwind label %lpad63 ; [#uses=1]
-
-invcont10: ; preds = %invcont9
- %toBool11 = icmp eq i8 %72, 0 ; [#uses=1]
- br i1 %toBool11, label %bb23, label %bb12
-
-bb12: ; preds = %invcont10
- %73 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 21 ; [#uses=2]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = load float* %59, align 4 ; [#uses=6]
- %76 = fcmp ogt float %74, %75 ; [#uses=1]
- br i1 %76, label %bb14, label %bb15
-
-bb14: ; preds = %bb12
- store float %75, float* %73, align 4
- br label %bb15
-
-bb15: ; preds = %bb14, %bb12
- %77 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 21 ; [#uses=2]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fcmp ogt float %78, %75 ; [#uses=1]
- br i1 %79, label %bb17, label %bb18
-
-bb17: ; preds = %bb15
- store float %75, float* %77, align 4
- br label %bb18
-
-bb18: ; preds = %bb17, %bb15
- %80 = fcmp olt float %75, 1.000000e+00 ; [#uses=1]
- br i1 %80, label %bb19, label %bb23
-
-bb19: ; preds = %bb18
- br label %bb23
-
-bb23: ; preds = %bb19, %bb18, %invcont10
- %resultFraction.0 = phi float [ %75, %bb19 ], [ 1.000000e+00, %bb18 ], [ 1.000000e+00, %invcont10 ] ; [#uses=3]
- %81 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %81, align 8
- %82 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %82)
- to label %invcont34 unwind label %lpad
-
-invcont34: ; preds = %bb23
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %54, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %67)
- %83 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 9 ; [#uses=1]
- %84 = load %struct.btCollisionShape** %83, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 22 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=2]
- %87 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %87)
- %88 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %88, align 8
- %89 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %89, align 4
- %90 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %86, float* %90, align 4
- %91 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %86, float* %91, align 4
- %92 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result31, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %92, align 8
- %93 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result31, i32 0, i32 5 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %93, align 4
- %94 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result31, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %94, align 8
- %95 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result31, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %95, align 4
- %96 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex32, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %96, align 4
- %97 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex32, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %98 = load i8* %97, align 4 ; [#uses=1]
- %99 = and i8 %98, -16 ; [#uses=1]
- store i8 %99, i8* %97, align 4
- %100 = bitcast %struct.btCollisionShape* %84 to %struct.btConvexShape* ; [#uses=1]
- %101 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 0 ; [#uses=3]
- invoke void @_ZN15btGjkConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* %ccd133, %struct.btConvexShape* %101, %struct.btConvexShape* %100, %struct.btVoronoiSimplexSolver* %voronoiSimplex32)
- to label %invcont35 unwind label %lpad75
-
-invcont35: ; preds = %invcont34
- %102 = invoke zeroext i8 @_ZN15btGjkConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* %ccd133, %struct.btTransform* %71, %struct.btTransform* %70, %struct.btTransform* %69, %struct.btTransform* %68, %"struct.btConvexCast::CastResult"* %result31)
- to label %invcont36 unwind label %lpad79 ; [#uses=1]
-
-invcont36: ; preds = %invcont35
- %toBool37 = icmp eq i8 %102, 0 ; [#uses=1]
- br i1 %toBool37, label %bb51, label %bb38
-
-bb38: ; preds = %invcont36
- %103 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 21 ; [#uses=2]
- %104 = load float* %103, align 4 ; [#uses=1]
- %105 = load float* %93, align 4 ; [#uses=6]
- %106 = fcmp ogt float %104, %105 ; [#uses=1]
- br i1 %106, label %bb40, label %bb41
-
-bb40: ; preds = %bb38
- store float %105, float* %103, align 4
- br label %bb41
-
-bb41: ; preds = %bb40, %bb38
- %107 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 21 ; [#uses=2]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = fcmp ogt float %108, %105 ; [#uses=1]
- br i1 %109, label %bb43, label %bb44
-
-bb43: ; preds = %bb41
- store float %105, float* %107, align 4
- br label %bb44
-
-bb44: ; preds = %bb43, %bb41
- %110 = fcmp olt float %105, %resultFraction.0 ; [#uses=1]
- br i1 %110, label %bb45, label %bb51
-
-bb45: ; preds = %bb44
- br label %bb51
-
-bb51: ; preds = %bb45, %bb44, %invcont36
- %resultFraction.1 = phi float [ %105, %bb45 ], [ %resultFraction.0, %bb44 ], [ %resultFraction.0, %invcont36 ] ; [#uses=1]
- %111 = getelementptr inbounds %struct.btGjkConvexCast* %ccd133, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %111, align 8
- %112 = getelementptr inbounds %struct.btGjkConvexCast* %ccd133, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %112)
- to label %bb58 unwind label %lpad75
-
-bb58: ; preds = %bb51
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %88, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %101)
- ret float %resultFraction.1
-
-bb59: ; preds = %bb2, %bb
- ret float 1.000000e+00
-
-lpad: ; preds = %bb23, %invcont
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select62 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad63: ; preds = %invcont9
- %eh_ptr64 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select66 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr64, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %113 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %113, align 8
- %114 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %114)
- to label %ppad unwind label %lpad67
-
-lpad67: ; preds = %lpad63
- %eh_ptr68 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select70 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr68, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad71: ; preds = %ppad
- %eh_ptr72 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select74 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr72, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad75: ; preds = %bb51, %invcont34
- %eh_ptr76 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select78 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr76, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad94
-
-lpad79: ; preds = %invcont35
- %eh_ptr80 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select82 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr80, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %115 = getelementptr inbounds %struct.btGjkConvexCast* %ccd133, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %115, align 8
- %116 = getelementptr inbounds %struct.btGjkConvexCast* %ccd133, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %116)
- to label %ppad94 unwind label %lpad83
-
-lpad83: ; preds = %lpad79
- %eh_ptr84 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select86 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr84, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad87: ; preds = %ppad94
- %eh_ptr88 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select90 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr88, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad63, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr64, %lpad63 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %54, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %67)
- to label %Unwind unwind label %lpad71
-
-ppad94: ; preds = %lpad79, %lpad75
- %eh_exception.2 = phi i8* [ %eh_ptr76, %lpad75 ], [ %eh_ptr80, %lpad79 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %88, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %101)
- to label %Unwind unwind label %lpad87
-
-Unwind: ; preds = %ppad94, %ppad
- %eh_exception.1 = phi i8* [ %eh_exception.0, %ppad ], [ %eh_exception.2, %ppad94 ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-}
-
-; [#uses=30]
-declare float @sinf(float) nounwind readonly
-
-; [#uses=31]
-declare float @cosf(float) nounwind readonly
-
-; [#uses=1]
-define void @_ZN23btConvexConvexAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %normalOnB = alloca %struct.btQuadWord, align 8 ; [#uses=11]
- %pointOnBWorld = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=36]
- %gjkPairDetector = alloca %struct.btGjkPairDetector, align 8 ; [#uses=8]
- %perturbedResultOut = alloca %struct.btPerturbedContactResult, align 8 ; [#uses=53]
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=4]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 3 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %10 = bitcast %struct.btCollisionObject* %body0 to i8* ; [#uses=1]
- %11 = bitcast %struct.btCollisionObject* %body1 to i8* ; [#uses=1]
- %12 = call %struct.btPersistentManifold* %9(%struct.btActionInterface* %4, i8* %10, i8* %11) ; [#uses=2]
- store %struct.btPersistentManifold* %12, %struct.btPersistentManifold** %0, align 4
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 1, i8* %13, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %14 = phi %struct.btPersistentManifold* [ %12, %bb ], [ %1, %entry ] ; [#uses=1]
- %15 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=4]
- store %struct.btPersistentManifold* %14, %struct.btPersistentManifold** %15, align 4
- %16 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=1]
- %17 = load %struct.btCollisionShape** %16, align 4 ; [#uses=8]
- %18 = bitcast %struct.btCollisionShape* %17 to %struct.btConvexShape* ; [#uses=3]
- %19 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=1]
- %20 = load %struct.btCollisionShape** %19, align 4 ; [#uses=8]
- %21 = bitcast %struct.btCollisionShape* %20 to %struct.btConvexShape* ; [#uses=3]
- %22 = getelementptr inbounds %struct.btCollisionShape* %17, i32 0, i32 1 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = icmp eq i32 %23, 10 ; [#uses=1]
- br i1 %24, label %bb2, label %bb4
-
-bb2: ; preds = %bb1
- %25 = getelementptr inbounds %struct.btCollisionShape* %20, i32 0, i32 1 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=1]
- %27 = icmp eq i32 %26, 10 ; [#uses=1]
- br i1 %27, label %bb6, label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %28 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %28, align 8
- %29 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=2]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %29, align 4
- %30 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %31 = load %struct.btActionInterface** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %33 = load %struct.btVoronoiSimplexSolver** %32, align 4 ; [#uses=1]
- call void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* %gjkPairDetector, %struct.btConvexShape* %18, %struct.btConvexShape* %21, %struct.btVoronoiSimplexSolver* %33, %struct.btActionInterface* %31)
- %34 = getelementptr inbounds %struct.btGjkPairDetector* %gjkPairDetector, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %18, %struct.btConvexShape** %34, align 4
- %35 = getelementptr inbounds %struct.btGjkPairDetector* %gjkPairDetector, i32 0, i32 5 ; [#uses=1]
- store %struct.btConvexShape* %21, %struct.btConvexShape** %35, align 8
- %36 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 12 ; [#uses=1]
- %37 = load i8* %36, align 4 ; [#uses=1]
- %toBool10 = icmp eq i8 %37, 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCollisionShape* %17, i32 0, i32 0 ; [#uses=2]
- %39 = load i32 (...)*** %38, align 4 ; [#uses=1]
- %40 = getelementptr inbounds i32 (...)** %39, i32 11 ; [#uses=1]
- %41 = load i32 (...)** %40, align 4 ; [#uses=1]
- %42 = bitcast i32 (...)* %41 to float (%struct.btConvexShape*)* ; [#uses=1]
- %43 = call float %42(%struct.btConvexShape* %18) ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionShape* %20, i32 0, i32 0 ; [#uses=2]
- %45 = load i32 (...)*** %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds i32 (...)** %45, i32 11 ; [#uses=1]
- %47 = load i32 (...)** %46, align 4 ; [#uses=1]
- %48 = bitcast i32 (...)* %47 to float (%struct.btConvexShape*)* ; [#uses=1]
- %49 = call float %48(%struct.btConvexShape* %21) ; [#uses=1]
- %50 = fadd float %43, %49 ; [#uses=1]
- %51 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- br i1 %toBool10, label %bb12, label %bb11
-
-bb6: ; preds = %bb2
- %52 = bitcast %struct.btCollisionShape* %17 to %struct.btCapsuleShape* ; [#uses=2]
- %53 = bitcast %struct.btCollisionShape* %20 to %struct.btCapsuleShape* ; [#uses=2]
- %54 = getelementptr inbounds %struct.btCollisionShape* %17, i32 0, i32 0 ; [#uses=1]
- %55 = load i32 (...)*** %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds i32 (...)** %55, i32 7 ; [#uses=1]
- %57 = load i32 (...)** %56, align 4 ; [#uses=1]
- %58 = bitcast %struct.btCollisionShape* %17 to %struct.btConvexInternalShape* ; [#uses=1]
- %59 = bitcast i32 (...)* %57 to %struct.btQuadWord* (%struct.btConvexInternalShape*)* ; [#uses=1]
- %60 = call %struct.btQuadWord* %59(%struct.btConvexInternalShape* %58) ; [#uses=0]
- %61 = getelementptr inbounds %struct.btCollisionShape* %20, i32 0, i32 0 ; [#uses=1]
- %62 = load i32 (...)*** %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds i32 (...)** %62, i32 7 ; [#uses=1]
- %64 = load i32 (...)** %63, align 4 ; [#uses=1]
- %65 = bitcast %struct.btCollisionShape* %20 to %struct.btConvexInternalShape* ; [#uses=1]
- %66 = bitcast i32 (...)* %64 to %struct.btQuadWord* (%struct.btConvexInternalShape*)* ; [#uses=1]
- %67 = call %struct.btQuadWord* %66(%struct.btConvexInternalShape* %65) ; [#uses=0]
- %68 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %69 = call float @_ZNK20btPersistentManifold27getContactBreakingThresholdEv(%struct.btPersistentManifold* %68) ; [#uses=2]
- %70 = getelementptr inbounds %struct.btCollisionShape* %20, i32 4, i32 1 ; [#uses=1]
- %71 = load i32* %70, align 4 ; [#uses=5]
- %72 = getelementptr inbounds %struct.btCollisionShape* %17, i32 4, i32 1 ; [#uses=1]
- %73 = load i32* %72, align 4 ; [#uses=5]
- %74 = add nsw i32 %71, 2 ; [#uses=1]
- %75 = srem i32 %74, 3 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btCapsuleShape* %53, i32 0, i32 0, i32 2, i32 0, i32 %75 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=4]
- %78 = getelementptr inbounds %struct.btCapsuleShape* %53, i32 0, i32 0, i32 2, i32 0, i32 %71 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=6]
- %80 = add nsw i32 %73, 2 ; [#uses=1]
- %81 = srem i32 %80, 3 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btCapsuleShape* %52, i32 0, i32 0, i32 2, i32 0, i32 %81 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btCapsuleShape* %52, i32 0, i32 0, i32 2, i32 0, i32 %73 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=9]
- %86 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 %73 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 %73 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 %73 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=6]
- %90 = load float* %87, align 4 ; [#uses=9]
- %91 = load float* %86, align 4 ; [#uses=7]
- %92 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 %71 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 %71 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 %71 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=3]
- %102 = load float* %99, align 4 ; [#uses=3]
- %103 = load float* %98, align 4 ; [#uses=3]
- %104 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=2]
- %106 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=2]
- %108 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=2]
- %110 = fsub float %109, %97 ; [#uses=3]
- %111 = fsub float %107, %95 ; [#uses=3]
- %112 = fsub float %105, %93 ; [#uses=3]
- %113 = fmul float %89, %101 ; [#uses=1]
- %114 = fmul float %90, %102 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %91, %103 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=6]
- %118 = fmul float %89, %112 ; [#uses=1]
- %119 = fmul float %90, %111 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %91, %110 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=3]
- %123 = fmul float %101, %112 ; [#uses=1]
- %124 = fmul float %102, %111 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %103, %110 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=2]
- %128 = fmul float %117, %117 ; [#uses=1]
- %129 = fsub float 1.000000e+00, %128 ; [#uses=2]
- %130 = fcmp oeq float %129, 0.000000e+00 ; [#uses=1]
- br i1 %130, label %bb5.i.i, label %bb1.i9.i
-
-bb1.i9.i: ; preds = %bb6
- %131 = fmul float %127, %117 ; [#uses=1]
- %132 = fsub float %122, %131 ; [#uses=1]
- %133 = fdiv float %132, %129 ; [#uses=3]
- %134 = fsub float -0.000000e+00, %85 ; [#uses=2]
- %135 = fcmp olt float %133, %134 ; [#uses=1]
- br i1 %135, label %bb5.i.i, label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i9.i
- %136 = fcmp ogt float %133, %85 ; [#uses=1]
- br i1 %136, label %bb4.i.i, label %bb5.i.i
-
-bb4.i.i: ; preds = %bb3.i.i
- br label %bb5.i.i
-
-bb5.i.i: ; preds = %bb4.i.i, %bb3.i.i, %bb1.i9.i, %bb6
- %tA.0.i = phi float [ %85, %bb4.i.i ], [ %133, %bb3.i.i ], [ 0.000000e+00, %bb6 ], [ %134, %bb1.i9.i ] ; [#uses=2]
- %137 = fmul float %tA.0.i, %117 ; [#uses=1]
- %138 = fsub float %137, %127 ; [#uses=3]
- %139 = fsub float -0.000000e+00, %79 ; [#uses=5]
- %140 = fcmp olt float %138, %139 ; [#uses=1]
- br i1 %140, label %bb6.i.i, label %bb10.i.i
-
-bb6.i.i: ; preds = %bb5.i.i
- %141 = fmul float %117, %139 ; [#uses=1]
- %142 = fadd float %141, %122 ; [#uses=3]
- %143 = fsub float -0.000000e+00, %85 ; [#uses=2]
- %144 = fcmp olt float %142, %143 ; [#uses=1]
- br i1 %144, label %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i, label %bb8.i.i
-
-bb8.i.i: ; preds = %bb6.i.i
- %145 = fcmp ogt float %142, %85 ; [#uses=1]
- br i1 %145, label %bb9.i.i, label %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i
-
-bb9.i.i: ; preds = %bb8.i.i
- br label %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i
-
-bb10.i.i: ; preds = %bb5.i.i
- %146 = fcmp ogt float %138, %79 ; [#uses=1]
- br i1 %146, label %bb11.i.i, label %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i
-
-bb11.i.i: ; preds = %bb10.i.i
- %147 = fmul float %117, %79 ; [#uses=1]
- %148 = fadd float %147, %122 ; [#uses=3]
- %149 = fsub float -0.000000e+00, %85 ; [#uses=2]
- %150 = fcmp olt float %148, %149 ; [#uses=1]
- br i1 %150, label %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i, label %bb13.i.i
-
-bb13.i.i: ; preds = %bb11.i.i
- %151 = fcmp ogt float %148, %85 ; [#uses=1]
- br i1 %151, label %bb14.i.i, label %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i
-
-bb14.i.i: ; preds = %bb13.i.i
- br label %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i
-
-_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i: ; preds = %bb14.i.i, %bb13.i.i, %bb11.i.i, %bb10.i.i, %bb9.i.i, %bb8.i.i, %bb6.i.i
- %tB.0.i = phi float [ %139, %bb9.i.i ], [ %139, %bb8.i.i ], [ %79, %bb14.i.i ], [ %79, %bb13.i.i ], [ %139, %bb6.i.i ], [ %138, %bb10.i.i ], [ %79, %bb11.i.i ] ; [#uses=3]
- %152 = phi float [ %85, %bb9.i.i ], [ %142, %bb8.i.i ], [ %85, %bb14.i.i ], [ %148, %bb13.i.i ], [ %143, %bb6.i.i ], [ %tA.0.i, %bb10.i.i ], [ %149, %bb11.i.i ] ; [#uses=3]
- %153 = fmul float %91, %152 ; [#uses=1]
- %154 = fmul float %90, %152 ; [#uses=1]
- %155 = fmul float %89, %152 ; [#uses=1]
- %156 = fmul float %103, %tB.0.i ; [#uses=2]
- %157 = fmul float %102, %tB.0.i ; [#uses=2]
- %158 = fmul float %101, %tB.0.i ; [#uses=2]
- %159 = fsub float %110, %153 ; [#uses=1]
- %160 = fsub float %111, %154 ; [#uses=1]
- %161 = fsub float %112, %155 ; [#uses=1]
- %162 = fadd float %159, %156 ; [#uses=3]
- %163 = fadd float %160, %157 ; [#uses=3]
- %164 = fadd float %161, %158 ; [#uses=3]
- %165 = fmul float %164, %164 ; [#uses=1]
- %166 = fmul float %163, %163 ; [#uses=1]
- %167 = fadd float %165, %166 ; [#uses=1]
- %168 = fmul float %162, %162 ; [#uses=1]
- %169 = fadd float %167, %168 ; [#uses=2]
- %170 = call float @sqrtf(float %169) nounwind readonly ; [#uses=2]
- %171 = fsub float %170, %83 ; [#uses=1]
- %172 = fsub float %171, %77 ; [#uses=3]
- %173 = fcmp ogt float %172, %69 ; [#uses=1]
- br i1 %173, label %_ZL22capsuleCapsuleDistanceR9btVector3S0_ffffiiRK11btTransformS3_f.exit, label %bb1.i55
-
-bb1.i55: ; preds = %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i
- %174 = fcmp ugt float %169, 0x3D10000000000000 ; [#uses=1]
- br i1 %174, label %bb3.i57, label %bb2.i56
-
-bb2.i56: ; preds = %bb1.i55
- %175 = call float @fabsf(float %91) nounwind readnone ; [#uses=1]
- %176 = fcmp ogt float %175, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %176, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb2.i56
- %177 = fmul float %90, %90 ; [#uses=1]
- %178 = fmul float %91, %91 ; [#uses=1]
- %179 = fadd float %177, %178 ; [#uses=1]
- %180 = call float @sqrtf(float %179) nounwind readonly ; [#uses=1]
- %181 = fdiv float 1.000000e+00, %180 ; [#uses=2]
- %182 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %182, align 8
- %183 = fsub float -0.000000e+00, %91 ; [#uses=1]
- %184 = fmul float %181, %183 ; [#uses=2]
- %185 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %184, float* %185, align 4
- %186 = fmul float %90, %181 ; [#uses=2]
- %187 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %186, float* %187, align 8
- br label %bb4.i
-
-bb1.i.i: ; preds = %bb2.i56
- %188 = fmul float %89, %89 ; [#uses=1]
- %189 = fmul float %90, %90 ; [#uses=1]
- %190 = fadd float %188, %189 ; [#uses=1]
- %191 = call float @sqrtf(float %190) nounwind readonly ; [#uses=1]
- %192 = fdiv float 1.000000e+00, %191 ; [#uses=2]
- %193 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %194 = fsub float -0.000000e+00, %90 ; [#uses=1]
- %195 = fmul float %192, %194 ; [#uses=2]
- store float %195, float* %193, align 8
- %196 = fmul float %89, %192 ; [#uses=2]
- %197 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %196, float* %197, align 4
- %198 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %198, align 8
- br label %bb4.i
-
-bb3.i57: ; preds = %bb1.i55
- %199 = fdiv float -1.000000e+00, %170 ; [#uses=3]
- %200 = fmul float %162, %199 ; [#uses=2]
- %201 = fmul float %163, %199 ; [#uses=2]
- %202 = fmul float %164, %199 ; [#uses=2]
- %203 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %202, float* %203, align 8
- %204 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %201, float* %204, align 4
- %205 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %200, float* %205, align 8
- %206 = getelementptr inbounds %struct.btQuadWord* %normalOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %206, align 4
- br label %bb4.i
-
-bb4.i: ; preds = %bb3.i57, %bb1.i.i, %bb.i.i
- %207 = phi float [ %195, %bb1.i.i ], [ 0.000000e+00, %bb.i.i ], [ %202, %bb3.i57 ] ; [#uses=1]
- %208 = phi float [ %196, %bb1.i.i ], [ %184, %bb.i.i ], [ %201, %bb3.i57 ] ; [#uses=1]
- %209 = phi float [ 0.000000e+00, %bb1.i.i ], [ %186, %bb.i.i ], [ %200, %bb3.i57 ] ; [#uses=1]
- %210 = fmul float %209, %77 ; [#uses=1]
- %211 = fmul float %208, %77 ; [#uses=1]
- %212 = fmul float %207, %77 ; [#uses=1]
- %213 = fadd float %109, %156 ; [#uses=1]
- %214 = fadd float %107, %157 ; [#uses=1]
- %215 = fadd float %105, %158 ; [#uses=1]
- %216 = fadd float %213, %210 ; [#uses=1]
- %217 = fadd float %214, %211 ; [#uses=1]
- %218 = fadd float %215, %212 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btQuadWord* %pointOnBWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %218, float* %219, align 8
- %220 = getelementptr inbounds %struct.btQuadWord* %pointOnBWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %217, float* %220, align 4
- %221 = getelementptr inbounds %struct.btQuadWord* %pointOnBWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %216, float* %221, align 8
- %222 = getelementptr inbounds %struct.btQuadWord* %pointOnBWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %222, align 4
- br label %_ZL22capsuleCapsuleDistanceR9btVector3S0_ffffiiRK11btTransformS3_f.exit
-
-_ZL22capsuleCapsuleDistanceR9btVector3S0_ffffiiRK11btTransformS3_f.exit: ; preds = %bb4.i, %_ZL21segmentsClosestPointsR9btVector3S0_S0_RfS1_RKS_S3_fS3_f.exit.i
- %223 = fcmp olt float %172, %69 ; [#uses=1]
- br i1 %223, label %bb7, label %bb8
-
-bb7: ; preds = %_ZL22capsuleCapsuleDistanceR9btVector3S0_ffffiiRK11btTransformS3_f.exit
- %224 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0, i32 0 ; [#uses=1]
- %225 = load i32 (...)*** %224, align 4 ; [#uses=1]
- %226 = getelementptr inbounds i32 (...)** %225, i32 4 ; [#uses=1]
- %227 = load i32 (...)** %226, align 4 ; [#uses=1]
- %228 = bitcast i32 (...)* %227 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %228(%struct.btManifoldResult* %resultOut, %struct.btQuadWord* %normalOnB, %struct.btQuadWord* %pointOnBWorld, float %172)
- br label %bb8
-
-bb8: ; preds = %bb7, %_ZL22capsuleCapsuleDistanceR9btVector3S0_ffffiiRK11btTransformS3_f.exit
- %229 = load %struct.btPersistentManifold** %15, align 4 ; [#uses=4]
- %230 = getelementptr inbounds %struct.btPersistentManifold* %229, i32 0, i32 4 ; [#uses=1]
- %231 = load i32* %230, align 4 ; [#uses=1]
- %232 = icmp eq i32 %231, 0 ; [#uses=1]
- br i1 %232, label %_ZN16btManifoldResult20refreshContactPointsEv.exit54, label %bb.i50
-
-bb.i50: ; preds = %bb8
- %233 = getelementptr inbounds %struct.btPersistentManifold* %229, i32 0, i32 2 ; [#uses=1]
- %234 = load i8** %233, align 4 ; [#uses=1]
- %235 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %236 = load %struct.btCollisionObject** %235, align 4 ; [#uses=1]
- %237 = bitcast %struct.btCollisionObject* %236 to i8* ; [#uses=1]
- %238 = icmp eq i8* %234, %237 ; [#uses=1]
- br i1 %238, label %bb3.i52, label %bb2.i51
-
-bb2.i51: ; preds = %bb.i50
- %239 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %240 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %229, %struct.btTransform* %240, %struct.btTransform* %239)
- ret void
-
-bb3.i52: ; preds = %bb.i50
- %241 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %242 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %229, %struct.btTransform* %242, %struct.btTransform* %241)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit54: ; preds = %bb44, %bb42, %bb8
- ret void
-
-bb11: ; preds = %bb4
- %243 = getelementptr inbounds %struct.btPersistentManifold* %51, i32 0, i32 6 ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- br label %bb13
-
-bb12: ; preds = %bb4
- %245 = call float @_ZNK20btPersistentManifold27getContactBreakingThresholdEv(%struct.btPersistentManifold* %51) ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb12, %bb11
- %.pn163 = phi float [ %244, %bb11 ], [ %245, %bb12 ] ; [#uses=1]
- %246 = fadd float %50, %.pn163 ; [#uses=2]
- %247 = fmul float %246, %246 ; [#uses=1]
- store float %247, float* %28, align 8
- %248 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 13 ; [#uses=1]
- %249 = load %struct.btStackAlloc** %248, align 4 ; [#uses=1]
- store %struct.btStackAlloc* %249, %struct.btStackAlloc** %29, align 4
- %250 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %251 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %252 = load float* %251, align 4 ; [#uses=1]
- store float %252, float* %250, align 8
- %253 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %254 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %255 = load float* %254, align 4 ; [#uses=1]
- store float %255, float* %253, align 4
- %256 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %257 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %258 = load float* %257, align 4 ; [#uses=1]
- store float %258, float* %256, align 8
- %259 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=4]
- %260 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %261 = load float* %260, align 4 ; [#uses=1]
- store float %261, float* %259, align 4
- %262 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %263 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %264 = load float* %263, align 4 ; [#uses=1]
- store float %264, float* %262, align 8
- %265 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %266 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %267 = load float* %266, align 4 ; [#uses=1]
- store float %267, float* %265, align 4
- %268 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %269 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %270 = load float* %269, align 4 ; [#uses=1]
- store float %270, float* %268, align 8
- %271 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %272 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %273 = load float* %272, align 4 ; [#uses=1]
- store float %273, float* %271, align 4
- %274 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %275 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %276 = load float* %275, align 4 ; [#uses=1]
- store float %276, float* %274, align 8
- %277 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %278 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %279 = load float* %278, align 4 ; [#uses=1]
- store float %279, float* %277, align 4
- %280 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %281 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %282 = load float* %281, align 4 ; [#uses=1]
- store float %282, float* %280, align 8
- %283 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=4]
- %284 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %285 = load float* %284, align 4 ; [#uses=1]
- store float %285, float* %283, align 4
- %286 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %287 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %288 = load float* %287, align 4 ; [#uses=1]
- store float %288, float* %286, align 8
- %289 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %290 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %291 = load float* %290, align 4 ; [#uses=1]
- store float %291, float* %289, align 4
- %292 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %293 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %294 = load float* %293, align 4 ; [#uses=1]
- store float %294, float* %292, align 8
- %295 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %296 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=2]
- %297 = load float* %296, align 4 ; [#uses=1]
- store float %297, float* %295, align 4
- %298 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %299 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %300 = load float* %299, align 4 ; [#uses=1]
- store float %300, float* %298, align 8
- %301 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %302 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %303 = load float* %302, align 4 ; [#uses=1]
- store float %303, float* %301, align 4
- %304 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %305 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %306 = load float* %305, align 4 ; [#uses=1]
- store float %306, float* %304, align 8
- %307 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=4]
- %308 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %309 = load float* %308, align 4 ; [#uses=1]
- store float %309, float* %307, align 4
- %310 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %311 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %312 = load float* %311, align 4 ; [#uses=1]
- store float %312, float* %310, align 8
- %313 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %314 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %315 = load float* %314, align 4 ; [#uses=1]
- store float %315, float* %313, align 4
- %316 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %317 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %318 = load float* %317, align 4 ; [#uses=1]
- store float %318, float* %316, align 8
- %319 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %320 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %321 = load float* %320, align 4 ; [#uses=1]
- store float %321, float* %319, align 4
- %322 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %323 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %324 = load float* %323, align 4 ; [#uses=1]
- store float %324, float* %322, align 8
- %325 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %326 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %327 = load float* %326, align 4 ; [#uses=1]
- store float %327, float* %325, align 4
- %328 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %329 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %330 = load float* %329, align 4 ; [#uses=1]
- store float %330, float* %328, align 8
- %331 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=4]
- %332 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %333 = load float* %332, align 4 ; [#uses=1]
- store float %333, float* %331, align 4
- %334 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=4]
- %335 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %336 = load float* %335, align 4 ; [#uses=1]
- store float %336, float* %334, align 8
- %337 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=4]
- %338 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %339 = load float* %338, align 4 ; [#uses=1]
- store float %339, float* %337, align 4
- %340 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=4]
- %341 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %342 = load float* %341, align 4 ; [#uses=1]
- store float %342, float* %340, align 8
- %343 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=4]
- %344 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=2]
- %345 = load float* %344, align 4 ; [#uses=1]
- store float %345, float* %343, align 4
- %346 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 5 ; [#uses=2]
- %347 = load %struct.btActionInterface** %346, align 4 ; [#uses=1]
- %348 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0 ; [#uses=1]
- call void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjkPairDetector, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %348, %struct.btActionInterface* %347, i8 zeroext 0)
- %349 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 6 ; [#uses=3]
- %350 = load i32* %349, align 4 ; [#uses=1]
- %351 = icmp eq i32 %350, 0 ; [#uses=1]
- br i1 %351, label %bb42, label %bb14
-
-bb14: ; preds = %bb13
- %352 = load %struct.btPersistentManifold** %15, align 4 ; [#uses=1]
- %353 = getelementptr inbounds %struct.btPersistentManifold* %352, i32 0, i32 4 ; [#uses=1]
- %354 = load i32* %353, align 4 ; [#uses=1]
- %355 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- %356 = load i32* %355, align 4 ; [#uses=1]
- %357 = icmp slt i32 %354, %356 ; [#uses=1]
- br i1 %357, label %bb19, label %bb42
-
-bb19: ; preds = %bb14
- %358 = getelementptr inbounds %struct.btGjkPairDetector* %gjkPairDetector, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %359 = load float* %358, align 4 ; [#uses=3]
- %360 = fmul float %359, %359 ; [#uses=1]
- %361 = getelementptr inbounds %struct.btGjkPairDetector* %gjkPairDetector, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %362 = load float* %361, align 4 ; [#uses=3]
- %363 = fmul float %362, %362 ; [#uses=1]
- %364 = fadd float %360, %363 ; [#uses=1]
- %365 = getelementptr inbounds %struct.btGjkPairDetector* %gjkPairDetector, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %366 = load float* %365, align 4 ; [#uses=3]
- %367 = fmul float %366, %366 ; [#uses=1]
- %368 = fadd float %364, %367 ; [#uses=1]
- %369 = call float @sqrtf(float %368) nounwind readonly ; [#uses=1]
- %370 = fdiv float 1.000000e+00, %369 ; [#uses=3]
- %371 = fmul float %366, %370 ; [#uses=7]
- %372 = fmul float %362, %370 ; [#uses=9]
- %373 = fmul float %359, %370 ; [#uses=6]
- %374 = call float @fabsf(float %371) nounwind readnone ; [#uses=1]
- %375 = fcmp ogt float %374, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %375, label %bb.i49, label %bb1.i
-
-bb.i49: ; preds = %bb19
- %376 = fmul float %372, %372 ; [#uses=1]
- %377 = fmul float %371, %371 ; [#uses=1]
- %378 = fadd float %376, %377 ; [#uses=1]
- %379 = call float @sqrtf(float %378) nounwind readonly ; [#uses=1]
- %380 = fdiv float 1.000000e+00, %379 ; [#uses=2]
- %381 = fsub float -0.000000e+00, %371 ; [#uses=1]
- %382 = fmul float %380, %381 ; [#uses=1]
- %383 = fmul float %372, %380 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-bb1.i: ; preds = %bb19
- %384 = fmul float %373, %373 ; [#uses=1]
- %385 = fmul float %372, %372 ; [#uses=1]
- %386 = fadd float %384, %385 ; [#uses=1]
- %387 = call float @sqrtf(float %386) nounwind readonly ; [#uses=1]
- %388 = fdiv float 1.000000e+00, %387 ; [#uses=2]
- %389 = fsub float -0.000000e+00, %372 ; [#uses=1]
- %390 = fmul float %388, %389 ; [#uses=1]
- %391 = fmul float %373, %388 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit: ; preds = %bb1.i, %bb.i49
- %v0.0.0.0 = phi float [ 0.000000e+00, %bb.i49 ], [ %390, %bb1.i ] ; [#uses=3]
- %v0.0.1.0 = phi float [ %382, %bb.i49 ], [ %391, %bb1.i ] ; [#uses=3]
- %v0.0.2.0 = phi float [ %383, %bb.i49 ], [ 0.000000e+00, %bb1.i ] ; [#uses=3]
- %392 = load i32 (...)*** %38, align 4 ; [#uses=1]
- %393 = getelementptr inbounds i32 (...)** %392, i32 4 ; [#uses=1]
- %394 = load i32 (...)** %393, align 4 ; [#uses=1]
- %395 = bitcast i32 (...)* %394 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %396 = call float %395(%struct.btCollisionShape* %17) ; [#uses=2]
- %397 = load i32 (...)*** %44, align 4 ; [#uses=1]
- %398 = getelementptr inbounds i32 (...)** %397, i32 4 ; [#uses=1]
- %399 = load i32 (...)** %398, align 4 ; [#uses=1]
- %400 = bitcast i32 (...)* %399 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %401 = call float %400(%struct.btCollisionShape* %20) ; [#uses=2]
- %402 = fcmp olt float %396, %401 ; [#uses=4]
- %403 = load float* @gContactBreakingThreshold, align 4 ; [#uses=1]
- %.pn = select i1 %402, float %396, float %401 ; [#uses=1]
- %perturbeA.0 = zext i1 %402 to i8 ; [#uses=1]
- %storemerge = fdiv float %403, %.pn ; [#uses=2]
- %404 = fcmp ogt float %storemerge, 0x3FD921FB60000000 ; [#uses=1]
- br i1 %402, label %bb26, label %bb27
-
-bb26: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %405 = load float* %250, align 8 ; [#uses=1]
- %406 = load float* %253, align 4 ; [#uses=1]
- %407 = load float* %256, align 8 ; [#uses=1]
- %408 = load float* %259, align 4 ; [#uses=1]
- %409 = load float* %262, align 8 ; [#uses=1]
- %410 = load float* %265, align 4 ; [#uses=1]
- %411 = load float* %268, align 8 ; [#uses=1]
- %412 = load float* %271, align 4 ; [#uses=1]
- %413 = load float* %274, align 8 ; [#uses=1]
- %414 = load float* %277, align 4 ; [#uses=1]
- %415 = load float* %280, align 8 ; [#uses=1]
- %416 = load float* %283, align 4 ; [#uses=1]
- %417 = load float* %286, align 8 ; [#uses=1]
- %418 = load float* %289, align 4 ; [#uses=1]
- %419 = load float* %292, align 8 ; [#uses=1]
- %420 = load float* %295, align 4 ; [#uses=1]
- br label %bb41.preheader
-
-bb27: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %421 = load float* %298, align 8 ; [#uses=1]
- %422 = load float* %301, align 4 ; [#uses=1]
- %423 = load float* %304, align 8 ; [#uses=1]
- %424 = load float* %307, align 4 ; [#uses=1]
- %425 = load float* %310, align 8 ; [#uses=1]
- %426 = load float* %313, align 4 ; [#uses=1]
- %427 = load float* %316, align 8 ; [#uses=1]
- %428 = load float* %319, align 4 ; [#uses=1]
- %429 = load float* %322, align 8 ; [#uses=1]
- %430 = load float* %325, align 4 ; [#uses=1]
- %431 = load float* %328, align 8 ; [#uses=1]
- %432 = load float* %331, align 4 ; [#uses=1]
- %433 = load float* %334, align 8 ; [#uses=1]
- %434 = load float* %337, align 4 ; [#uses=1]
- %435 = load float* %340, align 8 ; [#uses=1]
- %436 = load float* %343, align 4 ; [#uses=1]
- br label %bb41.preheader
-
-bb41.preheader: ; preds = %bb27, %bb26
- %unPerturbedTransform.0.0.0.0.0.0.ph = phi float [ %405, %bb26 ], [ %421, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.0.0.1.0.ph = phi float [ %406, %bb26 ], [ %422, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.0.0.2.0.ph = phi float [ %407, %bb26 ], [ %423, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.0.0.3.0.ph = phi float [ %408, %bb26 ], [ %424, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.1.0.0.0.ph = phi float [ %409, %bb26 ], [ %425, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.1.0.1.0.ph = phi float [ %410, %bb26 ], [ %426, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.1.0.2.0.ph = phi float [ %411, %bb26 ], [ %427, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.1.0.3.0.ph = phi float [ %412, %bb26 ], [ %428, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.2.0.0.0.ph = phi float [ %413, %bb26 ], [ %429, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.2.0.1.0.ph = phi float [ %414, %bb26 ], [ %430, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.2.0.2.0.ph = phi float [ %415, %bb26 ], [ %431, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.0.0.2.0.3.0.ph = phi float [ %416, %bb26 ], [ %432, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.1.0.0.0.ph = phi float [ %417, %bb26 ], [ %433, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.1.0.1.0.ph = phi float [ %418, %bb26 ], [ %434, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.1.0.2.0.ph = phi float [ %419, %bb26 ], [ %435, %bb27 ] ; [#uses=1]
- %unPerturbedTransform.1.0.3.0.ph = phi float [ %420, %bb26 ], [ %436, %bb27 ] ; [#uses=1]
- %437 = load i32* %349, align 4 ; [#uses=2]
- %438 = icmp sgt i32 %437, 0 ; [#uses=1]
- br i1 %438, label %bb.nph, label %bb42
-
-bb.nph: ; preds = %bb41.preheader
- %439 = fmul float %v0.0.0.0, %v0.0.0.0 ; [#uses=1]
- %440 = fmul float %v0.0.1.0, %v0.0.1.0 ; [#uses=1]
- %441 = fadd float %439, %440 ; [#uses=1]
- %442 = fmul float %v0.0.2.0, %v0.0.2.0 ; [#uses=1]
- %443 = fadd float %441, %442 ; [#uses=2]
- %444 = fcmp ogt float %443, 0x3E80000000000000 ; [#uses=1]
- %storemerge.op = fmul float %storemerge, 5.000000e-01 ; [#uses=1]
- %445 = select i1 %404, float 0x3FC921FB60000000, float %storemerge.op ; [#uses=2]
- %446 = fmul float %373, %373 ; [#uses=1]
- %447 = fmul float %372, %372 ; [#uses=1]
- %448 = fadd float %446, %447 ; [#uses=1]
- %449 = fmul float %371, %371 ; [#uses=1]
- %450 = fadd float %448, %449 ; [#uses=1]
- %451 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %452 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 1 ; [#uses=1]
- %453 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %454 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %455 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %456 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %457 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %458 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %459 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %460 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %461 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %462 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %463 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %464 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %465 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %466 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %467 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %468 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %469 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %470 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %471 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %472 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %473 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %474 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %475 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %476 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %477 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %478 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %479 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %480 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %481 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %482 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %483 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %484 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %485 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %486 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %487 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %488 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %489 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %490 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %491 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %492 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %493 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %494 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %495 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %496 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %497 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %498 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %499 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %500 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %501 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 5 ; [#uses=1]
- %502 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 6 ; [#uses=1]
- %503 = getelementptr inbounds %struct.btPerturbedContactResult* %perturbedResultOut, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb29
-
-bb29: ; preds = %bb40, %bb.nph
- %504 = phi i32 [ %437, %bb.nph ], [ %880, %bb40 ] ; [#uses=1]
- %505 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb40 ] ; [#uses=2]
- %tmp = add i32 %505, 1 ; [#uses=2]
- br i1 %444, label %bb31, label %bb40
-
-bb31: ; preds = %bb29
- %506 = call float @sqrtf(float %443) nounwind readonly ; [#uses=1]
- %507 = call float @sinf(float %445) nounwind readonly ; [#uses=1]
- %508 = fdiv float %507, %506 ; [#uses=3]
- %509 = call float @cosf(float %445) nounwind readonly ; [#uses=8]
- %510 = fmul float %v0.0.2.0, %508 ; [#uses=8]
- %511 = fmul float %v0.0.1.0, %508 ; [#uses=8]
- %512 = fmul float %v0.0.0.0, %508 ; [#uses=8]
- %513 = sitofp i32 %505 to float ; [#uses=1]
- %514 = sitofp i32 %504 to float ; [#uses=1]
- %515 = fdiv float 0x401921FB60000000, %514 ; [#uses=1]
- %516 = fmul float %513, %515 ; [#uses=1]
- %517 = call float @sqrtf(float %450) nounwind readonly ; [#uses=1]
- %518 = fmul float %516, 5.000000e-01 ; [#uses=2]
- %519 = call float @sinf(float %518) nounwind readonly ; [#uses=1]
- %520 = fdiv float %519, %517 ; [#uses=3]
- %521 = call float @cosf(float %518) nounwind readonly ; [#uses=16]
- %522 = fmul float %371, %520 ; [#uses=10]
- %523 = fmul float %372, %520 ; [#uses=10]
- %524 = fmul float %373, %520 ; [#uses=10]
- br i1 %402, label %bb37, label %bb38
-
-bb37: ; preds = %bb31
- %525 = fsub float -0.000000e+00, %522 ; [#uses=4]
- %526 = fsub float -0.000000e+00, %523 ; [#uses=4]
- %527 = fsub float -0.000000e+00, %524 ; [#uses=4]
- %528 = fmul float %521, %509 ; [#uses=1]
- %529 = fmul float %512, %527 ; [#uses=1]
- %530 = fsub float %528, %529 ; [#uses=1]
- %531 = fmul float %511, %526 ; [#uses=1]
- %532 = fsub float %530, %531 ; [#uses=1]
- %533 = fmul float %510, %525 ; [#uses=1]
- %534 = fsub float %532, %533 ; [#uses=4]
- %535 = fmul float %521, %510 ; [#uses=1]
- %536 = fmul float %509, %525 ; [#uses=1]
- %537 = fadd float %535, %536 ; [#uses=1]
- %538 = fmul float %511, %527 ; [#uses=1]
- %539 = fadd float %537, %538 ; [#uses=1]
- %540 = fmul float %512, %526 ; [#uses=1]
- %541 = fsub float %539, %540 ; [#uses=4]
- %542 = fmul float %521, %511 ; [#uses=1]
- %543 = fmul float %509, %526 ; [#uses=1]
- %544 = fadd float %542, %543 ; [#uses=1]
- %545 = fmul float %512, %525 ; [#uses=1]
- %546 = fadd float %544, %545 ; [#uses=1]
- %547 = fmul float %510, %527 ; [#uses=1]
- %548 = fsub float %546, %547 ; [#uses=4]
- %549 = fmul float %521, %512 ; [#uses=1]
- %550 = fmul float %509, %527 ; [#uses=1]
- %551 = fadd float %549, %550 ; [#uses=1]
- %552 = fmul float %510, %526 ; [#uses=1]
- %553 = fadd float %551, %552 ; [#uses=1]
- %554 = fmul float %511, %525 ; [#uses=1]
- %555 = fsub float %553, %554 ; [#uses=4]
- %556 = fmul float %534, %521 ; [#uses=1]
- %557 = fmul float %555, %524 ; [#uses=1]
- %558 = fsub float %556, %557 ; [#uses=1]
- %559 = fmul float %548, %523 ; [#uses=1]
- %560 = fsub float %558, %559 ; [#uses=1]
- %561 = fmul float %541, %522 ; [#uses=1]
- %562 = fsub float %560, %561 ; [#uses=5]
- %563 = fmul float %534, %522 ; [#uses=1]
- %564 = fmul float %541, %521 ; [#uses=1]
- %565 = fadd float %563, %564 ; [#uses=1]
- %566 = fmul float %555, %523 ; [#uses=1]
- %567 = fadd float %565, %566 ; [#uses=1]
- %568 = fmul float %548, %524 ; [#uses=1]
- %569 = fsub float %567, %568 ; [#uses=4]
- %570 = fmul float %534, %523 ; [#uses=1]
- %571 = fmul float %548, %521 ; [#uses=1]
- %572 = fadd float %570, %571 ; [#uses=1]
- %573 = fmul float %541, %524 ; [#uses=1]
- %574 = fadd float %572, %573 ; [#uses=1]
- %575 = fmul float %555, %522 ; [#uses=1]
- %576 = fsub float %574, %575 ; [#uses=5]
- %577 = fmul float %534, %524 ; [#uses=1]
- %578 = fmul float %555, %521 ; [#uses=1]
- %579 = fadd float %577, %578 ; [#uses=1]
- %580 = fmul float %548, %522 ; [#uses=1]
- %581 = fadd float %579, %580 ; [#uses=1]
- %582 = fmul float %541, %523 ; [#uses=1]
- %583 = fsub float %581, %582 ; [#uses=6]
- %584 = fmul float %583, %583 ; [#uses=1]
- %585 = fmul float %576, %576 ; [#uses=1]
- %586 = fadd float %584, %585 ; [#uses=1]
- %587 = fmul float %569, %569 ; [#uses=1]
- %588 = fadd float %586, %587 ; [#uses=1]
- %589 = fmul float %562, %562 ; [#uses=1]
- %590 = fadd float %588, %589 ; [#uses=1]
- %591 = fdiv float 2.000000e+00, %590 ; [#uses=3]
- %592 = fmul float %583, %591 ; [#uses=2]
- %593 = fmul float %576, %591 ; [#uses=3]
- %594 = fmul float %569, %591 ; [#uses=4]
- %595 = fmul float %562, %592 ; [#uses=2]
- %596 = fmul float %562, %593 ; [#uses=2]
- %597 = fmul float %562, %594 ; [#uses=2]
- %598 = fmul float %583, %592 ; [#uses=2]
- %599 = fmul float %583, %593 ; [#uses=2]
- %600 = fmul float %583, %594 ; [#uses=2]
- %601 = fmul float %576, %593 ; [#uses=2]
- %602 = fmul float %576, %594 ; [#uses=2]
- %603 = fmul float %569, %594 ; [#uses=2]
- %604 = fadd float %598, %601 ; [#uses=1]
- %605 = fsub float 1.000000e+00, %604 ; [#uses=3]
- %606 = fadd float %602, %595 ; [#uses=3]
- %607 = fsub float %600, %596 ; [#uses=3]
- %608 = fsub float %602, %595 ; [#uses=3]
- %609 = fadd float %598, %603 ; [#uses=1]
- %610 = fsub float 1.000000e+00, %609 ; [#uses=3]
- %611 = fadd float %599, %597 ; [#uses=3]
- %612 = fadd float %600, %596 ; [#uses=3]
- %613 = fsub float %599, %597 ; [#uses=3]
- %614 = fadd float %601, %603 ; [#uses=1]
- %615 = fsub float 1.000000e+00, %614 ; [#uses=3]
- %616 = load float* %257, align 4 ; [#uses=3]
- %617 = fmul float %616, %607 ; [#uses=1]
- %618 = load float* %269, align 4 ; [#uses=3]
- %619 = fmul float %618, %606 ; [#uses=1]
- %620 = fadd float %617, %619 ; [#uses=1]
- %621 = load float* %281, align 4 ; [#uses=3]
- %622 = fmul float %621, %605 ; [#uses=1]
- %623 = fadd float %620, %622 ; [#uses=2]
- %624 = load float* %254, align 4 ; [#uses=3]
- %625 = fmul float %624, %607 ; [#uses=1]
- %626 = load float* %266, align 4 ; [#uses=3]
- %627 = fmul float %626, %606 ; [#uses=1]
- %628 = fadd float %625, %627 ; [#uses=1]
- %629 = load float* %278, align 4 ; [#uses=3]
- %630 = fmul float %629, %605 ; [#uses=1]
- %631 = fadd float %628, %630 ; [#uses=2]
- %632 = load float* %251, align 4 ; [#uses=3]
- %633 = fmul float %632, %607 ; [#uses=1]
- %634 = load float* %263, align 4 ; [#uses=3]
- %635 = fmul float %634, %606 ; [#uses=1]
- %636 = fadd float %633, %635 ; [#uses=1]
- %637 = load float* %275, align 4 ; [#uses=3]
- %638 = fmul float %637, %605 ; [#uses=1]
- %639 = fadd float %636, %638 ; [#uses=2]
- %640 = fmul float %616, %611 ; [#uses=1]
- %641 = fmul float %618, %610 ; [#uses=1]
- %642 = fadd float %640, %641 ; [#uses=1]
- %643 = fmul float %621, %608 ; [#uses=1]
- %644 = fadd float %642, %643 ; [#uses=2]
- %645 = fmul float %624, %611 ; [#uses=1]
- %646 = fmul float %626, %610 ; [#uses=1]
- %647 = fadd float %645, %646 ; [#uses=1]
- %648 = fmul float %629, %608 ; [#uses=1]
- %649 = fadd float %647, %648 ; [#uses=2]
- %650 = fmul float %632, %611 ; [#uses=1]
- %651 = fmul float %634, %610 ; [#uses=1]
- %652 = fadd float %650, %651 ; [#uses=1]
- %653 = fmul float %637, %608 ; [#uses=1]
- %654 = fadd float %652, %653 ; [#uses=2]
- %655 = fmul float %616, %615 ; [#uses=1]
- %656 = fmul float %618, %613 ; [#uses=1]
- %657 = fadd float %655, %656 ; [#uses=1]
- %658 = fmul float %621, %612 ; [#uses=1]
- %659 = fadd float %657, %658 ; [#uses=2]
- %660 = fmul float %624, %615 ; [#uses=1]
- %661 = fmul float %626, %613 ; [#uses=1]
- %662 = fadd float %660, %661 ; [#uses=1]
- %663 = fmul float %629, %612 ; [#uses=1]
- %664 = fadd float %662, %663 ; [#uses=2]
- %665 = fmul float %632, %615 ; [#uses=1]
- %666 = fmul float %634, %613 ; [#uses=1]
- %667 = fadd float %665, %666 ; [#uses=1]
- %668 = fmul float %637, %612 ; [#uses=1]
- %669 = fadd float %667, %668 ; [#uses=2]
- store float %669, float* %250, align 8
- store float %664, float* %253, align 4
- store float %659, float* %256, align 8
- store float 0.000000e+00, float* %259, align 4
- store float %654, float* %262, align 8
- store float %649, float* %265, align 4
- store float %644, float* %268, align 8
- store float 0.000000e+00, float* %271, align 4
- store float %639, float* %274, align 8
- store float %631, float* %277, align 4
- store float %623, float* %280, align 8
- store float 0.000000e+00, float* %283, align 4
- %670 = load float* %299, align 4 ; [#uses=2]
- store float %670, float* %298, align 8
- %671 = load float* %302, align 4 ; [#uses=2]
- store float %671, float* %301, align 4
- %672 = load float* %305, align 4 ; [#uses=2]
- store float %672, float* %304, align 8
- %673 = load float* %308, align 4 ; [#uses=2]
- store float %673, float* %307, align 4
- %674 = load float* %311, align 4 ; [#uses=2]
- store float %674, float* %310, align 8
- %675 = load float* %314, align 4 ; [#uses=2]
- store float %675, float* %313, align 4
- %676 = load float* %317, align 4 ; [#uses=2]
- store float %676, float* %316, align 8
- %677 = load float* %320, align 4 ; [#uses=2]
- store float %677, float* %319, align 4
- %678 = load float* %323, align 4 ; [#uses=2]
- store float %678, float* %322, align 8
- %679 = load float* %326, align 4 ; [#uses=2]
- store float %679, float* %325, align 4
- %680 = load float* %329, align 4 ; [#uses=2]
- store float %680, float* %328, align 8
- %681 = load float* %332, align 4 ; [#uses=2]
- store float %681, float* %331, align 4
- %682 = load float* %335, align 4 ; [#uses=2]
- store float %682, float* %334, align 8
- %683 = load float* %338, align 4 ; [#uses=2]
- store float %683, float* %337, align 4
- %684 = load float* %341, align 4 ; [#uses=2]
- store float %684, float* %340, align 8
- %685 = load float* %344, align 4 ; [#uses=2]
- store float %685, float* %343, align 4
- %.pre = load float* %286, align 8 ; [#uses=1]
- %.pre155 = load float* %289, align 4 ; [#uses=1]
- %.pre156 = load float* %292, align 8 ; [#uses=1]
- %.pre157 = load float* %295, align 4 ; [#uses=1]
- br label %bb39
-
-bb38: ; preds = %bb31
- %686 = load float* %251, align 4 ; [#uses=2]
- store float %686, float* %250, align 8
- %687 = load float* %254, align 4 ; [#uses=2]
- store float %687, float* %253, align 4
- %688 = load float* %257, align 4 ; [#uses=2]
- store float %688, float* %256, align 8
- %689 = load float* %260, align 4 ; [#uses=2]
- store float %689, float* %259, align 4
- %690 = load float* %263, align 4 ; [#uses=2]
- store float %690, float* %262, align 8
- %691 = load float* %266, align 4 ; [#uses=2]
- store float %691, float* %265, align 4
- %692 = load float* %269, align 4 ; [#uses=2]
- store float %692, float* %268, align 8
- %693 = load float* %272, align 4 ; [#uses=2]
- store float %693, float* %271, align 4
- %694 = load float* %275, align 4 ; [#uses=2]
- store float %694, float* %274, align 8
- %695 = load float* %278, align 4 ; [#uses=2]
- store float %695, float* %277, align 4
- %696 = load float* %281, align 4 ; [#uses=2]
- store float %696, float* %280, align 8
- %697 = load float* %284, align 4 ; [#uses=2]
- store float %697, float* %283, align 4
- %698 = load float* %287, align 4 ; [#uses=2]
- store float %698, float* %286, align 8
- %699 = load float* %290, align 4 ; [#uses=2]
- store float %699, float* %289, align 4
- %700 = load float* %293, align 4 ; [#uses=2]
- store float %700, float* %292, align 8
- %701 = load float* %296, align 4 ; [#uses=2]
- store float %701, float* %295, align 4
- %702 = fsub float -0.000000e+00, %522 ; [#uses=4]
- %703 = fsub float -0.000000e+00, %523 ; [#uses=4]
- %704 = fsub float -0.000000e+00, %524 ; [#uses=4]
- %705 = fmul float %521, %509 ; [#uses=1]
- %706 = fmul float %512, %704 ; [#uses=1]
- %707 = fsub float %705, %706 ; [#uses=1]
- %708 = fmul float %511, %703 ; [#uses=1]
- %709 = fsub float %707, %708 ; [#uses=1]
- %710 = fmul float %510, %702 ; [#uses=1]
- %711 = fsub float %709, %710 ; [#uses=4]
- %712 = fmul float %521, %510 ; [#uses=1]
- %713 = fmul float %509, %702 ; [#uses=1]
- %714 = fadd float %712, %713 ; [#uses=1]
- %715 = fmul float %511, %704 ; [#uses=1]
- %716 = fadd float %714, %715 ; [#uses=1]
- %717 = fmul float %512, %703 ; [#uses=1]
- %718 = fsub float %716, %717 ; [#uses=4]
- %719 = fmul float %521, %511 ; [#uses=1]
- %720 = fmul float %509, %703 ; [#uses=1]
- %721 = fadd float %719, %720 ; [#uses=1]
- %722 = fmul float %512, %702 ; [#uses=1]
- %723 = fadd float %721, %722 ; [#uses=1]
- %724 = fmul float %510, %704 ; [#uses=1]
- %725 = fsub float %723, %724 ; [#uses=4]
- %726 = fmul float %521, %512 ; [#uses=1]
- %727 = fmul float %509, %704 ; [#uses=1]
- %728 = fadd float %726, %727 ; [#uses=1]
- %729 = fmul float %510, %703 ; [#uses=1]
- %730 = fadd float %728, %729 ; [#uses=1]
- %731 = fmul float %511, %702 ; [#uses=1]
- %732 = fsub float %730, %731 ; [#uses=4]
- %733 = fmul float %711, %521 ; [#uses=1]
- %734 = fmul float %732, %524 ; [#uses=1]
- %735 = fsub float %733, %734 ; [#uses=1]
- %736 = fmul float %725, %523 ; [#uses=1]
- %737 = fsub float %735, %736 ; [#uses=1]
- %738 = fmul float %718, %522 ; [#uses=1]
- %739 = fsub float %737, %738 ; [#uses=5]
- %740 = fmul float %711, %522 ; [#uses=1]
- %741 = fmul float %718, %521 ; [#uses=1]
- %742 = fadd float %740, %741 ; [#uses=1]
- %743 = fmul float %732, %523 ; [#uses=1]
- %744 = fadd float %742, %743 ; [#uses=1]
- %745 = fmul float %725, %524 ; [#uses=1]
- %746 = fsub float %744, %745 ; [#uses=4]
- %747 = fmul float %711, %523 ; [#uses=1]
- %748 = fmul float %725, %521 ; [#uses=1]
- %749 = fadd float %747, %748 ; [#uses=1]
- %750 = fmul float %718, %524 ; [#uses=1]
- %751 = fadd float %749, %750 ; [#uses=1]
- %752 = fmul float %732, %522 ; [#uses=1]
- %753 = fsub float %751, %752 ; [#uses=5]
- %754 = fmul float %711, %524 ; [#uses=1]
- %755 = fmul float %732, %521 ; [#uses=1]
- %756 = fadd float %754, %755 ; [#uses=1]
- %757 = fmul float %725, %522 ; [#uses=1]
- %758 = fadd float %756, %757 ; [#uses=1]
- %759 = fmul float %718, %523 ; [#uses=1]
- %760 = fsub float %758, %759 ; [#uses=6]
- %761 = fmul float %760, %760 ; [#uses=1]
- %762 = fmul float %753, %753 ; [#uses=1]
- %763 = fadd float %761, %762 ; [#uses=1]
- %764 = fmul float %746, %746 ; [#uses=1]
- %765 = fadd float %763, %764 ; [#uses=1]
- %766 = fmul float %739, %739 ; [#uses=1]
- %767 = fadd float %765, %766 ; [#uses=1]
- %768 = fdiv float 2.000000e+00, %767 ; [#uses=3]
- %769 = fmul float %760, %768 ; [#uses=2]
- %770 = fmul float %753, %768 ; [#uses=3]
- %771 = fmul float %746, %768 ; [#uses=4]
- %772 = fmul float %739, %769 ; [#uses=2]
- %773 = fmul float %739, %770 ; [#uses=2]
- %774 = fmul float %739, %771 ; [#uses=2]
- %775 = fmul float %760, %769 ; [#uses=2]
- %776 = fmul float %760, %770 ; [#uses=2]
- %777 = fmul float %760, %771 ; [#uses=2]
- %778 = fmul float %753, %770 ; [#uses=2]
- %779 = fmul float %753, %771 ; [#uses=2]
- %780 = fmul float %746, %771 ; [#uses=2]
- %781 = fadd float %775, %778 ; [#uses=1]
- %782 = fsub float 1.000000e+00, %781 ; [#uses=3]
- %783 = fadd float %779, %772 ; [#uses=3]
- %784 = fsub float %777, %773 ; [#uses=3]
- %785 = fsub float %779, %772 ; [#uses=3]
- %786 = fadd float %775, %780 ; [#uses=1]
- %787 = fsub float 1.000000e+00, %786 ; [#uses=3]
- %788 = fadd float %776, %774 ; [#uses=3]
- %789 = fadd float %777, %773 ; [#uses=3]
- %790 = fsub float %776, %774 ; [#uses=3]
- %791 = fadd float %778, %780 ; [#uses=1]
- %792 = fsub float 1.000000e+00, %791 ; [#uses=3]
- %793 = load float* %305, align 4 ; [#uses=3]
- %794 = fmul float %793, %784 ; [#uses=1]
- %795 = load float* %317, align 4 ; [#uses=3]
- %796 = fmul float %795, %783 ; [#uses=1]
- %797 = fadd float %794, %796 ; [#uses=1]
- %798 = load float* %329, align 4 ; [#uses=3]
- %799 = fmul float %798, %782 ; [#uses=1]
- %800 = fadd float %797, %799 ; [#uses=2]
- %801 = load float* %302, align 4 ; [#uses=3]
- %802 = fmul float %801, %784 ; [#uses=1]
- %803 = load float* %314, align 4 ; [#uses=3]
- %804 = fmul float %803, %783 ; [#uses=1]
- %805 = fadd float %802, %804 ; [#uses=1]
- %806 = load float* %326, align 4 ; [#uses=3]
- %807 = fmul float %806, %782 ; [#uses=1]
- %808 = fadd float %805, %807 ; [#uses=2]
- %809 = load float* %299, align 4 ; [#uses=3]
- %810 = fmul float %809, %784 ; [#uses=1]
- %811 = load float* %311, align 4 ; [#uses=3]
- %812 = fmul float %811, %783 ; [#uses=1]
- %813 = fadd float %810, %812 ; [#uses=1]
- %814 = load float* %323, align 4 ; [#uses=3]
- %815 = fmul float %814, %782 ; [#uses=1]
- %816 = fadd float %813, %815 ; [#uses=2]
- %817 = fmul float %793, %788 ; [#uses=1]
- %818 = fmul float %795, %787 ; [#uses=1]
- %819 = fadd float %817, %818 ; [#uses=1]
- %820 = fmul float %798, %785 ; [#uses=1]
- %821 = fadd float %819, %820 ; [#uses=2]
- %822 = fmul float %801, %788 ; [#uses=1]
- %823 = fmul float %803, %787 ; [#uses=1]
- %824 = fadd float %822, %823 ; [#uses=1]
- %825 = fmul float %806, %785 ; [#uses=1]
- %826 = fadd float %824, %825 ; [#uses=2]
- %827 = fmul float %809, %788 ; [#uses=1]
- %828 = fmul float %811, %787 ; [#uses=1]
- %829 = fadd float %827, %828 ; [#uses=1]
- %830 = fmul float %814, %785 ; [#uses=1]
- %831 = fadd float %829, %830 ; [#uses=2]
- %832 = fmul float %793, %792 ; [#uses=1]
- %833 = fmul float %795, %790 ; [#uses=1]
- %834 = fadd float %832, %833 ; [#uses=1]
- %835 = fmul float %798, %789 ; [#uses=1]
- %836 = fadd float %834, %835 ; [#uses=2]
- %837 = fmul float %801, %792 ; [#uses=1]
- %838 = fmul float %803, %790 ; [#uses=1]
- %839 = fadd float %837, %838 ; [#uses=1]
- %840 = fmul float %806, %789 ; [#uses=1]
- %841 = fadd float %839, %840 ; [#uses=2]
- %842 = fmul float %809, %792 ; [#uses=1]
- %843 = fmul float %811, %790 ; [#uses=1]
- %844 = fadd float %842, %843 ; [#uses=1]
- %845 = fmul float %814, %789 ; [#uses=1]
- %846 = fadd float %844, %845 ; [#uses=2]
- store float %846, float* %298, align 8
- store float %841, float* %301, align 4
- store float %836, float* %304, align 8
- store float 0.000000e+00, float* %307, align 4
- store float %831, float* %310, align 8
- store float %826, float* %313, align 4
- store float %821, float* %316, align 8
- store float 0.000000e+00, float* %319, align 4
- store float %816, float* %322, align 8
- store float %808, float* %325, align 4
- store float %800, float* %328, align 8
- store float 0.000000e+00, float* %331, align 4
- %.pre158 = load float* %334, align 8 ; [#uses=1]
- %.pre159 = load float* %337, align 4 ; [#uses=1]
- %.pre160 = load float* %340, align 8 ; [#uses=1]
- %.pre161 = load float* %343, align 4 ; [#uses=1]
- br label %bb39
-
-bb39: ; preds = %bb38, %bb37
- %847 = phi float [ %.pre161, %bb38 ], [ %685, %bb37 ] ; [#uses=1]
- %848 = phi float [ %.pre160, %bb38 ], [ %684, %bb37 ] ; [#uses=1]
- %849 = phi float [ %.pre159, %bb38 ], [ %683, %bb37 ] ; [#uses=1]
- %850 = phi float [ %.pre158, %bb38 ], [ %682, %bb37 ] ; [#uses=1]
- %851 = phi float [ 0.000000e+00, %bb38 ], [ %681, %bb37 ] ; [#uses=1]
- %852 = phi float [ %800, %bb38 ], [ %680, %bb37 ] ; [#uses=1]
- %853 = phi float [ %808, %bb38 ], [ %679, %bb37 ] ; [#uses=1]
- %854 = phi float [ %816, %bb38 ], [ %678, %bb37 ] ; [#uses=1]
- %855 = phi float [ 0.000000e+00, %bb38 ], [ %677, %bb37 ] ; [#uses=1]
- %856 = phi float [ %821, %bb38 ], [ %676, %bb37 ] ; [#uses=1]
- %857 = phi float [ %826, %bb38 ], [ %675, %bb37 ] ; [#uses=1]
- %858 = phi float [ %831, %bb38 ], [ %674, %bb37 ] ; [#uses=1]
- %859 = phi float [ 0.000000e+00, %bb38 ], [ %673, %bb37 ] ; [#uses=1]
- %860 = phi float [ %836, %bb38 ], [ %672, %bb37 ] ; [#uses=1]
- %861 = phi float [ %841, %bb38 ], [ %671, %bb37 ] ; [#uses=1]
- %862 = phi float [ %846, %bb38 ], [ %670, %bb37 ] ; [#uses=1]
- %863 = phi float [ %701, %bb38 ], [ %.pre157, %bb37 ] ; [#uses=1]
- %864 = phi float [ %700, %bb38 ], [ %.pre156, %bb37 ] ; [#uses=1]
- %865 = phi float [ %699, %bb38 ], [ %.pre155, %bb37 ] ; [#uses=1]
- %866 = phi float [ %698, %bb38 ], [ %.pre, %bb37 ] ; [#uses=1]
- %867 = phi float [ %697, %bb38 ], [ 0.000000e+00, %bb37 ] ; [#uses=1]
- %868 = phi float [ %696, %bb38 ], [ %623, %bb37 ] ; [#uses=1]
- %869 = phi float [ %695, %bb38 ], [ %631, %bb37 ] ; [#uses=1]
- %870 = phi float [ %694, %bb38 ], [ %639, %bb37 ] ; [#uses=1]
- %871 = phi float [ %693, %bb38 ], [ 0.000000e+00, %bb37 ] ; [#uses=1]
- %872 = phi float [ %692, %bb38 ], [ %644, %bb37 ] ; [#uses=1]
- %873 = phi float [ %691, %bb38 ], [ %649, %bb37 ] ; [#uses=1]
- %874 = phi float [ %690, %bb38 ], [ %654, %bb37 ] ; [#uses=1]
- %875 = phi float [ %689, %bb38 ], [ 0.000000e+00, %bb37 ] ; [#uses=1]
- %876 = phi float [ %688, %bb38 ], [ %659, %bb37 ] ; [#uses=1]
- %877 = phi float [ %687, %bb38 ], [ %664, %bb37 ] ; [#uses=1]
- %878 = phi float [ %686, %bb38 ], [ %669, %bb37 ] ; [#uses=1]
- %879 = load %struct.btActionInterface** %346, align 4 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV24btPerturbedContactResult, i32 0, i32 2), i32 (...)*** %451, align 8
- store %struct.btManifoldResult* %resultOut, %struct.btManifoldResult** %452, align 8
- store float %878, float* %453, align 4
- store float %877, float* %454, align 4
- store float %876, float* %455, align 4
- store float %875, float* %456, align 4
- store float %874, float* %457, align 4
- store float %873, float* %458, align 4
- store float %872, float* %459, align 4
- store float %871, float* %460, align 4
- store float %870, float* %461, align 4
- store float %869, float* %462, align 4
- store float %868, float* %463, align 4
- store float %867, float* %464, align 4
- store float %866, float* %465, align 4
- store float %865, float* %466, align 4
- store float %864, float* %467, align 4
- store float %863, float* %468, align 4
- store float %862, float* %469, align 4
- store float %861, float* %470, align 4
- store float %860, float* %471, align 4
- store float %859, float* %472, align 4
- store float %858, float* %473, align 4
- store float %857, float* %474, align 4
- store float %856, float* %475, align 4
- store float %855, float* %476, align 4
- store float %854, float* %477, align 4
- store float %853, float* %478, align 4
- store float %852, float* %479, align 4
- store float %851, float* %480, align 4
- store float %850, float* %481, align 4
- store float %849, float* %482, align 4
- store float %848, float* %483, align 4
- store float %847, float* %484, align 4
- store float %unPerturbedTransform.0.0.0.0.0.0.ph, float* %485, align 4
- store float %unPerturbedTransform.0.0.0.0.1.0.ph, float* %486, align 4
- store float %unPerturbedTransform.0.0.0.0.2.0.ph, float* %487, align 4
- store float %unPerturbedTransform.0.0.0.0.3.0.ph, float* %488, align 4
- store float %unPerturbedTransform.0.0.1.0.0.0.ph, float* %489, align 4
- store float %unPerturbedTransform.0.0.1.0.1.0.ph, float* %490, align 4
- store float %unPerturbedTransform.0.0.1.0.2.0.ph, float* %491, align 4
- store float %unPerturbedTransform.0.0.1.0.3.0.ph, float* %492, align 4
- store float %unPerturbedTransform.0.0.2.0.0.0.ph, float* %493, align 4
- store float %unPerturbedTransform.0.0.2.0.1.0.ph, float* %494, align 4
- store float %unPerturbedTransform.0.0.2.0.2.0.ph, float* %495, align 4
- store float %unPerturbedTransform.0.0.2.0.3.0.ph, float* %496, align 4
- store float %unPerturbedTransform.1.0.0.0.ph, float* %497, align 4
- store float %unPerturbedTransform.1.0.1.0.ph, float* %498, align 4
- store float %unPerturbedTransform.1.0.2.0.ph, float* %499, align 4
- store float %unPerturbedTransform.1.0.3.0.ph, float* %500, align 4
- store i8 %perturbeA.0, i8* %501, align 4
- store %struct.btActionInterface* %879, %struct.btActionInterface** %502, align 8
- call void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjkPairDetector, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %503, %struct.btActionInterface* %879, i8 zeroext 0)
- br label %bb40
-
-bb40: ; preds = %bb39, %bb29
- %880 = load i32* %349, align 4 ; [#uses=2]
- %881 = icmp sgt i32 %880, %tmp ; [#uses=1]
- br i1 %881, label %bb29, label %bb42
-
-bb42: ; preds = %bb40, %bb41.preheader, %bb14, %bb13
- %882 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %883 = load i8* %882, align 4 ; [#uses=1]
- %toBool43 = icmp eq i8 %883, 0 ; [#uses=1]
- br i1 %toBool43, label %_ZN16btManifoldResult20refreshContactPointsEv.exit54, label %bb44
-
-bb44: ; preds = %bb42
- %884 = load %struct.btPersistentManifold** %15, align 4 ; [#uses=4]
- %885 = getelementptr inbounds %struct.btPersistentManifold* %884, i32 0, i32 4 ; [#uses=1]
- %886 = load i32* %885, align 4 ; [#uses=1]
- %887 = icmp eq i32 %886, 0 ; [#uses=1]
- br i1 %887, label %_ZN16btManifoldResult20refreshContactPointsEv.exit54, label %bb.i
-
-bb.i: ; preds = %bb44
- %888 = getelementptr inbounds %struct.btPersistentManifold* %884, i32 0, i32 2 ; [#uses=1]
- %889 = load i8** %888, align 4 ; [#uses=1]
- %890 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %891 = load %struct.btCollisionObject** %890, align 4 ; [#uses=1]
- %892 = bitcast %struct.btCollisionObject* %891 to i8* ; [#uses=1]
- %893 = icmp eq i8* %889, %892 ; [#uses=1]
- br i1 %893, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %894 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %895 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %884, %struct.btTransform* %895, %struct.btTransform* %894)
- ret void
-
-bb3.i: ; preds = %bb.i
- %896 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %897 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %884, %struct.btTransform* %897, %struct.btTransform* %896)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btConvexConvexAlgorithmD0Ev(%struct.btConvex2dConvex2dAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btConvexConvexAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- %14 = bitcast %struct.btConvex2dConvex2dAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %14) nounwind
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %15)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN23btConvexConvexAlgorithmD1Ev(%struct.btConvex2dConvex2dAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btConvexConvexAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN23btConvexConvexAlgorithmD2Ev(%struct.btConvex2dConvex2dAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btConvexConvexAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN23btConvexConvexAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii(%struct.btConvex2dConvex2dAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver, i32 %numPerturbationIterations, i32 %minimumPointsPerturbationThreshold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btConvexConvexAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %2, align 4
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %3, align 4
- %4 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %5, align 4
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i8 0, i8* %6, align 4
- %7 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %numPerturbationIterations, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %minimumPointsPerturbationThreshold, i32* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btConvexConvexAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii(%struct.btConvex2dConvex2dAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver, i32 %numPerturbationIterations, i32 %minimumPointsPerturbationThreshold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV23btConvexConvexAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %2, align 4
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %3, align 4
- %4 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %5, align 4
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i8 0, i8* %6, align 4
- %7 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %numPerturbationIterations, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %minimumPointsPerturbationThreshold, i32* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN31btConvexPlaneCollisionAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_bii(%struct.btConvexPlaneCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, i8 zeroext %isSwapped, i32 %numPerturbationIterations, i32 %minimumPointsPerturbationThreshold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV31btConvexPlaneCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %isSwapped, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store i32 %numPerturbationIterations, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i32 %minimumPointsPerturbationThreshold, i32* %6, align 4
- %toBool = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.162.0 = select i1 %toBool, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1 ; [#uses=2]
- %iftmp.163.0 = select i1 %toBool, %struct.btCollisionObject* %col1, %struct.btCollisionObject* %col0 ; [#uses=2]
- %7 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %7, label %bb7, label %bb13
-
-bb7: ; preds = %entry
- %8 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = load %struct.btActionInterface** %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btActionInterface* %9, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 6 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %15 = invoke zeroext i8 %14(%struct.btActionInterface* %9, %struct.btCollisionObject* %iftmp.162.0, %struct.btCollisionObject* %iftmp.163.0)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb7
- %toBool8not = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool8not, label %bb13, label %bb16
-
-bb13: ; preds = %invcont, %entry
- ret void
-
-bb16: ; preds = %invcont
- %16 = load %struct.btActionInterface** %8, align 4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btActionInterface* %16, i32 0, i32 0 ; [#uses=1]
- %18 = load i32 (...)*** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 3 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %22 = bitcast %struct.btCollisionObject* %iftmp.162.0 to i8* ; [#uses=1]
- %23 = bitcast %struct.btCollisionObject* %iftmp.163.0 to i8* ; [#uses=1]
- %24 = invoke %struct.btPersistentManifold* %21(%struct.btActionInterface* %16, i8* %22, i8* %23)
- to label %invcont17 unwind label %lpad ; [#uses=1]
-
-invcont17: ; preds = %bb16
- store %struct.btPersistentManifold* %24, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-lpad: ; preds = %bb16, %bb7
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV20btCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN31btConvexPlaneCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvexPlaneCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %col0, %struct.btCollisionObject* nocapture %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN31btConvexPlaneCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btConvexPlaneCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=2]
-define void @_ZN31btConvexPlaneCollisionAlgorithm20collideSingleContactERK12btQuaternionP17btCollisionObjectS4_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvexPlaneCollisionAlgorithm* nocapture %this, %struct.btQuaternion* nocapture %perturbeRot, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %vtx = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %normalOnSurfaceB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pOnB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=2]
- %iftmp.167.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=13]
- %iftmp.168.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=13]
- %3 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 9 ; [#uses=1]
- %4 = load %struct.btCollisionShape** %3, align 4 ; [#uses=2]
- %5 = bitcast %struct.btCollisionShape* %4 to %struct.btConvexShape* ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 9 ; [#uses=1]
- %7 = load %struct.btCollisionShape** %6, align 4 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btCollisionShape* %7, i32 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btCollisionShape* %7, i32 5, i32 1 ; [#uses=1]
- %10 = bitcast i32* %9 to float* ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=6]
- %13 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=6]
- %15 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=6]
- %17 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=6]
- %19 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=6]
- %21 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=6]
- %23 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=6]
- %25 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=6]
- %27 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=6]
- %29 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=3]
- %31 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=3]
- %33 = getelementptr inbounds %struct.btCollisionObject* %iftmp.167.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=3]
- %35 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %36 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %37 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %38 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %39 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %40 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %41 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %42 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %43 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %44 = load float* %43, align 4 ; [#uses=8]
- %45 = load float* %42, align 4 ; [#uses=8]
- %46 = load float* %41, align 4 ; [#uses=8]
- %47 = load float* %40, align 4 ; [#uses=8]
- %48 = load float* %39, align 4 ; [#uses=8]
- %49 = load float* %38, align 4 ; [#uses=8]
- %50 = load float* %37, align 4 ; [#uses=8]
- %51 = load float* %36, align 4 ; [#uses=8]
- %52 = load float* %35, align 4 ; [#uses=8]
- %53 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fsub float -0.000000e+00, %54 ; [#uses=3]
- %56 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fsub float -0.000000e+00, %57 ; [#uses=3]
- %59 = getelementptr inbounds %struct.btCollisionObject* %iftmp.168.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = fsub float -0.000000e+00, %60 ; [#uses=3]
- %62 = fmul float %50, %61 ; [#uses=1]
- %63 = fmul float %51, %58 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %52, %55 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %47, %61 ; [#uses=1]
- %68 = fmul float %48, %58 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %49, %55 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %44, %61 ; [#uses=1]
- %73 = fmul float %45, %58 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = fmul float %46, %55 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = fmul float %50, %30 ; [#uses=1]
- %78 = fmul float %51, %32 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %52, %34 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = fadd float %81, %66 ; [#uses=1]
- %83 = fmul float %47, %30 ; [#uses=1]
- %84 = fmul float %48, %32 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %49, %34 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fadd float %87, %71 ; [#uses=1]
- %89 = fmul float %44, %30 ; [#uses=1]
- %90 = fmul float %45, %32 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %46, %34 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fadd float %93, %76 ; [#uses=1]
- %95 = fmul float %16, %50 ; [#uses=1]
- %96 = fmul float %22, %51 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %28, %52 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %14, %50 ; [#uses=1]
- %101 = fmul float %20, %51 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %26, %52 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fmul float %12, %50 ; [#uses=1]
- %106 = fmul float %18, %51 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %24, %52 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- %110 = fmul float %16, %47 ; [#uses=1]
- %111 = fmul float %22, %48 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %28, %49 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=1]
- %115 = fmul float %14, %47 ; [#uses=1]
- %116 = fmul float %20, %48 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %26, %49 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = fmul float %12, %47 ; [#uses=1]
- %121 = fmul float %18, %48 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = fmul float %24, %49 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=1]
- %125 = fmul float %16, %44 ; [#uses=1]
- %126 = fmul float %22, %45 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = fmul float %28, %46 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=1]
- %130 = fmul float %14, %44 ; [#uses=1]
- %131 = fmul float %20, %45 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %26, %46 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = fmul float %12, %44 ; [#uses=1]
- %136 = fmul float %18, %45 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %24, %46 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btQuaternion* %perturbeRot, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=6]
- %142 = fmul float %141, %141 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btQuaternion* %perturbeRot, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=5]
- %145 = fmul float %144, %144 ; [#uses=1]
- %146 = fadd float %142, %145 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btQuaternion* %perturbeRot, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=4]
- %149 = fmul float %148, %148 ; [#uses=1]
- %150 = fadd float %146, %149 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btQuaternion* %perturbeRot, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=5]
- %153 = fmul float %152, %152 ; [#uses=1]
- %154 = fadd float %150, %153 ; [#uses=1]
- %155 = fdiv float 2.000000e+00, %154 ; [#uses=3]
- %156 = fmul float %141, %155 ; [#uses=2]
- %157 = fmul float %144, %155 ; [#uses=3]
- %158 = fmul float %148, %155 ; [#uses=4]
- %159 = fmul float %152, %156 ; [#uses=2]
- %160 = fmul float %152, %157 ; [#uses=2]
- %161 = fmul float %152, %158 ; [#uses=2]
- %162 = fmul float %141, %156 ; [#uses=2]
- %163 = fmul float %141, %157 ; [#uses=2]
- %164 = fmul float %141, %158 ; [#uses=2]
- %165 = fmul float %144, %157 ; [#uses=2]
- %166 = fmul float %144, %158 ; [#uses=2]
- %167 = fmul float %148, %158 ; [#uses=2]
- %168 = fadd float %162, %165 ; [#uses=1]
- %169 = fsub float 1.000000e+00, %168 ; [#uses=3]
- %170 = fadd float %166, %159 ; [#uses=3]
- %171 = fsub float %164, %160 ; [#uses=3]
- %172 = fsub float %166, %159 ; [#uses=3]
- %173 = fadd float %162, %167 ; [#uses=1]
- %174 = fsub float 1.000000e+00, %173 ; [#uses=3]
- %175 = fadd float %163, %161 ; [#uses=3]
- %176 = fadd float %164, %160 ; [#uses=3]
- %177 = fsub float %163, %161 ; [#uses=3]
- %178 = fadd float %165, %167 ; [#uses=1]
- %179 = fsub float 1.000000e+00, %178 ; [#uses=3]
- %180 = fmul float %176, %24 ; [#uses=1]
- %181 = fmul float %172, %26 ; [#uses=1]
- %182 = fadd float %180, %181 ; [#uses=1]
- %183 = fmul float %169, %28 ; [#uses=1]
- %184 = fadd float %182, %183 ; [#uses=3]
- %185 = fmul float %177, %24 ; [#uses=1]
- %186 = fmul float %174, %26 ; [#uses=1]
- %187 = fadd float %185, %186 ; [#uses=1]
- %188 = fmul float %170, %28 ; [#uses=1]
- %189 = fadd float %187, %188 ; [#uses=3]
- %190 = fmul float %179, %24 ; [#uses=1]
- %191 = fmul float %175, %26 ; [#uses=1]
- %192 = fadd float %190, %191 ; [#uses=1]
- %193 = fmul float %171, %28 ; [#uses=1]
- %194 = fadd float %192, %193 ; [#uses=3]
- %195 = fmul float %176, %18 ; [#uses=1]
- %196 = fmul float %172, %20 ; [#uses=1]
- %197 = fadd float %195, %196 ; [#uses=1]
- %198 = fmul float %169, %22 ; [#uses=1]
- %199 = fadd float %197, %198 ; [#uses=3]
- %200 = fmul float %177, %18 ; [#uses=1]
- %201 = fmul float %174, %20 ; [#uses=1]
- %202 = fadd float %200, %201 ; [#uses=1]
- %203 = fmul float %170, %22 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=3]
- %205 = fmul float %179, %18 ; [#uses=1]
- %206 = fmul float %175, %20 ; [#uses=1]
- %207 = fadd float %205, %206 ; [#uses=1]
- %208 = fmul float %171, %22 ; [#uses=1]
- %209 = fadd float %207, %208 ; [#uses=3]
- %210 = fmul float %176, %12 ; [#uses=1]
- %211 = fmul float %172, %14 ; [#uses=1]
- %212 = fadd float %210, %211 ; [#uses=1]
- %213 = fmul float %169, %16 ; [#uses=1]
- %214 = fadd float %212, %213 ; [#uses=3]
- %215 = fmul float %177, %12 ; [#uses=1]
- %216 = fmul float %174, %14 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=1]
- %218 = fmul float %170, %16 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=3]
- %220 = fmul float %179, %12 ; [#uses=1]
- %221 = fmul float %175, %14 ; [#uses=1]
- %222 = fadd float %220, %221 ; [#uses=1]
- %223 = fmul float %171, %16 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=3]
- %225 = fmul float %50, %214 ; [#uses=1]
- %226 = fmul float %51, %199 ; [#uses=1]
- %227 = fadd float %225, %226 ; [#uses=1]
- %228 = fmul float %52, %184 ; [#uses=1]
- %229 = fadd float %227, %228 ; [#uses=1]
- %230 = fmul float %47, %214 ; [#uses=1]
- %231 = fmul float %48, %199 ; [#uses=1]
- %232 = fadd float %230, %231 ; [#uses=1]
- %233 = fmul float %49, %184 ; [#uses=1]
- %234 = fadd float %232, %233 ; [#uses=1]
- %235 = fmul float %44, %214 ; [#uses=1]
- %236 = fmul float %45, %199 ; [#uses=1]
- %237 = fadd float %235, %236 ; [#uses=1]
- %238 = fmul float %46, %184 ; [#uses=1]
- %239 = fadd float %237, %238 ; [#uses=1]
- %240 = fmul float %50, %219 ; [#uses=1]
- %241 = fmul float %51, %204 ; [#uses=1]
- %242 = fadd float %240, %241 ; [#uses=1]
- %243 = fmul float %52, %189 ; [#uses=1]
- %244 = fadd float %242, %243 ; [#uses=1]
- %245 = fmul float %47, %219 ; [#uses=1]
- %246 = fmul float %48, %204 ; [#uses=1]
- %247 = fadd float %245, %246 ; [#uses=1]
- %248 = fmul float %49, %189 ; [#uses=1]
- %249 = fadd float %247, %248 ; [#uses=1]
- %250 = fmul float %44, %219 ; [#uses=1]
- %251 = fmul float %45, %204 ; [#uses=1]
- %252 = fadd float %250, %251 ; [#uses=1]
- %253 = fmul float %46, %189 ; [#uses=1]
- %254 = fadd float %252, %253 ; [#uses=1]
- %255 = fmul float %50, %224 ; [#uses=1]
- %256 = fmul float %51, %209 ; [#uses=1]
- %257 = fadd float %255, %256 ; [#uses=1]
- %258 = fmul float %52, %194 ; [#uses=1]
- %259 = fadd float %257, %258 ; [#uses=1]
- %260 = fmul float %47, %224 ; [#uses=1]
- %261 = fmul float %48, %209 ; [#uses=1]
- %262 = fadd float %260, %261 ; [#uses=1]
- %263 = fmul float %49, %194 ; [#uses=1]
- %264 = fadd float %262, %263 ; [#uses=1]
- %265 = fmul float %44, %224 ; [#uses=1]
- %266 = fmul float %45, %209 ; [#uses=1]
- %267 = fadd float %265, %266 ; [#uses=1]
- %268 = fmul float %46, %194 ; [#uses=1]
- %269 = fadd float %267, %268 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btCollisionShape* %4, i32 0, i32 0 ; [#uses=1]
- %271 = load i32 (...)*** %270, align 4 ; [#uses=1]
- %272 = getelementptr inbounds i32 (...)** %271, i32 15 ; [#uses=1]
- %273 = load i32 (...)** %272, align 4 ; [#uses=1]
- %274 = getelementptr inbounds %struct.btCollisionShape* %7, i32 4, i32 2 ; [#uses=1]
- %275 = bitcast i8** %274 to float* ; [#uses=3]
- %276 = load float* %275, align 4 ; [#uses=1]
- %277 = fsub float -0.000000e+00, %276 ; [#uses=3]
- %278 = getelementptr inbounds %struct.btCollisionShape* %7, i32 4, i32 1 ; [#uses=1]
- %279 = bitcast i32* %278 to float* ; [#uses=3]
- %280 = load float* %279, align 4 ; [#uses=1]
- %281 = fsub float -0.000000e+00, %280 ; [#uses=3]
- %282 = bitcast %struct.btCollisionShape* %8 to float* ; [#uses=3]
- %283 = load float* %282, align 4 ; [#uses=1]
- %284 = fsub float -0.000000e+00, %283 ; [#uses=3]
- %285 = fmul float %239, %284 ; [#uses=1]
- %286 = fmul float %234, %281 ; [#uses=1]
- %287 = fadd float %285, %286 ; [#uses=1]
- %288 = fmul float %229, %277 ; [#uses=1]
- %289 = fadd float %287, %288 ; [#uses=1]
- %290 = fmul float %254, %284 ; [#uses=1]
- %291 = fmul float %249, %281 ; [#uses=1]
- %292 = fadd float %290, %291 ; [#uses=1]
- %293 = fmul float %244, %277 ; [#uses=1]
- %294 = fadd float %292, %293 ; [#uses=1]
- %295 = fmul float %269, %284 ; [#uses=1]
- %296 = fmul float %264, %281 ; [#uses=1]
- %297 = fadd float %295, %296 ; [#uses=1]
- %298 = fmul float %259, %277 ; [#uses=1]
- %299 = fadd float %297, %298 ; [#uses=1]
- %300 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %299, float* %300, align 8
- %301 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %294, float* %301, align 4
- %302 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %289, float* %302, align 8
- %303 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %303, align 4
- %304 = bitcast i32 (...)* %273 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %304(%struct.btQuadWord* noalias sret %vtx, %struct.btConvexShape* %5, %struct.btQuadWord* %0)
- %305 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- %306 = load float* %305, align 8 ; [#uses=3]
- %307 = fmul float %109, %306 ; [#uses=1]
- %308 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- %309 = load float* %308, align 4 ; [#uses=3]
- %310 = fmul float %104, %309 ; [#uses=1]
- %311 = fadd float %307, %310 ; [#uses=1]
- %312 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- %313 = load float* %312, align 8 ; [#uses=3]
- %314 = fmul float %99, %313 ; [#uses=1]
- %315 = fadd float %311, %314 ; [#uses=1]
- %316 = fadd float %315, %82 ; [#uses=2]
- %317 = fmul float %124, %306 ; [#uses=1]
- %318 = fmul float %119, %309 ; [#uses=1]
- %319 = fadd float %317, %318 ; [#uses=1]
- %320 = fmul float %114, %313 ; [#uses=1]
- %321 = fadd float %319, %320 ; [#uses=1]
- %322 = fadd float %321, %88 ; [#uses=2]
- %323 = fmul float %139, %306 ; [#uses=1]
- %324 = fmul float %134, %309 ; [#uses=1]
- %325 = fadd float %323, %324 ; [#uses=1]
- %326 = fmul float %129, %313 ; [#uses=1]
- %327 = fadd float %325, %326 ; [#uses=1]
- %328 = fadd float %327, %94 ; [#uses=2]
- %329 = load float* %282, align 4 ; [#uses=2]
- %330 = fmul float %329, %328 ; [#uses=1]
- %331 = load float* %279, align 4 ; [#uses=2]
- %332 = fmul float %331, %322 ; [#uses=1]
- %333 = fadd float %330, %332 ; [#uses=1]
- %334 = load float* %275, align 4 ; [#uses=2]
- %335 = fmul float %334, %316 ; [#uses=1]
- %336 = fadd float %333, %335 ; [#uses=1]
- %337 = load float* %10, align 4 ; [#uses=1]
- %338 = fsub float %336, %337 ; [#uses=5]
- %339 = fmul float %334, %338 ; [#uses=1]
- %340 = fmul float %331, %338 ; [#uses=1]
- %341 = fmul float %329, %338 ; [#uses=1]
- %342 = fsub float %316, %339 ; [#uses=3]
- %343 = fsub float %322, %340 ; [#uses=3]
- %344 = fsub float %328, %341 ; [#uses=3]
- %345 = load float* %41, align 4 ; [#uses=1]
- %346 = load float* %38, align 4 ; [#uses=1]
- %347 = load float* %35, align 4 ; [#uses=1]
- %348 = load float* %53, align 4 ; [#uses=1]
- %349 = load float* %42, align 4 ; [#uses=1]
- %350 = load float* %39, align 4 ; [#uses=1]
- %351 = load float* %36, align 4 ; [#uses=1]
- %352 = load float* %56, align 4 ; [#uses=1]
- %353 = load float* %43, align 4 ; [#uses=1]
- %354 = load float* %40, align 4 ; [#uses=1]
- %355 = load float* %37, align 4 ; [#uses=1]
- %356 = load float* %59, align 4 ; [#uses=1]
- %357 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %358 = load %struct.btPersistentManifold** %357, align 4 ; [#uses=1]
- %359 = call float @_ZNK20btPersistentManifold27getContactBreakingThresholdEv(%struct.btPersistentManifold* %358) ; [#uses=1]
- %360 = fcmp ogt float %359, %338 ; [#uses=1]
- %361 = load %struct.btPersistentManifold** %357, align 4 ; [#uses=1]
- %362 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* %361, %struct.btPersistentManifold** %362, align 4
- br i1 %360, label %bb8, label %return
-
-bb8: ; preds = %entry
- %363 = fmul float %354, %343 ; [#uses=1]
- %364 = fmul float %353, %344 ; [#uses=1]
- %365 = fmul float %350, %343 ; [#uses=1]
- %366 = fmul float %349, %344 ; [#uses=1]
- %367 = fmul float %346, %343 ; [#uses=1]
- %368 = fmul float %345, %344 ; [#uses=1]
- %369 = fmul float %355, %342 ; [#uses=1]
- %370 = fadd float %364, %363 ; [#uses=1]
- %371 = fmul float %351, %342 ; [#uses=1]
- %372 = fadd float %366, %365 ; [#uses=1]
- %373 = fmul float %347, %342 ; [#uses=1]
- %374 = fadd float %368, %367 ; [#uses=1]
- %375 = fadd float %370, %369 ; [#uses=1]
- %376 = fadd float %372, %371 ; [#uses=1]
- %377 = fadd float %374, %373 ; [#uses=1]
- %378 = fadd float %375, %356 ; [#uses=1]
- %379 = fadd float %376, %352 ; [#uses=1]
- %380 = fadd float %377, %348 ; [#uses=1]
- %381 = load float* %41, align 4 ; [#uses=1]
- %382 = load float* %282, align 4 ; [#uses=3]
- %383 = fmul float %381, %382 ; [#uses=1]
- %384 = load float* %38, align 4 ; [#uses=1]
- %385 = load float* %279, align 4 ; [#uses=3]
- %386 = fmul float %384, %385 ; [#uses=1]
- %387 = fadd float %383, %386 ; [#uses=1]
- %388 = load float* %35, align 4 ; [#uses=1]
- %389 = load float* %275, align 4 ; [#uses=3]
- %390 = fmul float %388, %389 ; [#uses=1]
- %391 = fadd float %387, %390 ; [#uses=1]
- %392 = load float* %42, align 4 ; [#uses=1]
- %393 = fmul float %392, %382 ; [#uses=1]
- %394 = load float* %39, align 4 ; [#uses=1]
- %395 = fmul float %394, %385 ; [#uses=1]
- %396 = fadd float %393, %395 ; [#uses=1]
- %397 = load float* %36, align 4 ; [#uses=1]
- %398 = fmul float %397, %389 ; [#uses=1]
- %399 = fadd float %396, %398 ; [#uses=1]
- %400 = load float* %43, align 4 ; [#uses=1]
- %401 = fmul float %400, %382 ; [#uses=1]
- %402 = load float* %40, align 4 ; [#uses=1]
- %403 = fmul float %402, %385 ; [#uses=1]
- %404 = fadd float %401, %403 ; [#uses=1]
- %405 = load float* %37, align 4 ; [#uses=1]
- %406 = fmul float %405, %389 ; [#uses=1]
- %407 = fadd float %404, %406 ; [#uses=1]
- %408 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %407, float* %408, align 8
- %409 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %399, float* %409, align 4
- %410 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %391, float* %410, align 8
- %411 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %411, align 4
- %412 = getelementptr inbounds %struct.btQuadWord* %pOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %378, float* %412, align 8
- %413 = getelementptr inbounds %struct.btQuadWord* %pOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %379, float* %413, align 4
- %414 = getelementptr inbounds %struct.btQuadWord* %pOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %380, float* %414, align 8
- %415 = getelementptr inbounds %struct.btQuadWord* %pOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %415, align 4
- %416 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0, i32 0 ; [#uses=1]
- %417 = load i32 (...)*** %416, align 4 ; [#uses=1]
- %418 = getelementptr inbounds i32 (...)** %417, i32 4 ; [#uses=1]
- %419 = load i32 (...)** %418, align 4 ; [#uses=1]
- %420 = bitcast i32 (...)* %419 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %420(%struct.btManifoldResult* %resultOut, %struct.btQuadWord* %normalOnSurfaceB, %struct.btQuadWord* %pOnB, float %338)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btConvexPlaneCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvexPlaneCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %rotq = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %2 = load %struct.btPersistentManifold** %1, align 4 ; [#uses=1]
- %3 = icmp eq %struct.btPersistentManifold* %2, null ; [#uses=1]
- br i1 %3, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %5, 0 ; [#uses=2]
- %iftmp.171.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=1]
- %iftmp.172.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionObject* %iftmp.171.0, i32 0, i32 9 ; [#uses=1]
- %7 = load %struct.btCollisionShape** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btCollisionObject* %iftmp.172.0, i32 0, i32 9 ; [#uses=1]
- %9 = load %struct.btCollisionShape** %8, align 4 ; [#uses=5]
- %10 = getelementptr inbounds %struct.btCollisionShape* %9, i32 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuaternion* %rotq, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 8
- %12 = getelementptr inbounds %struct.btQuaternion* %rotq, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuaternion* %rotq, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 8
- %14 = getelementptr inbounds %struct.btQuaternion* %rotq, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 1.000000e+00, float* %14, align 4
- call void @_ZN31btConvexPlaneCollisionAlgorithm20collideSingleContactERK12btQuaternionP17btCollisionObjectS4_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvexPlaneCollisionAlgorithm* %this, %struct.btQuaternion* %rotq, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut)
- %15 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- %16 = load %struct.btPersistentManifold** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btPersistentManifold* %16, i32 0, i32 4 ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=1]
- %21 = icmp slt i32 %18, %20 ; [#uses=1]
- br i1 %21, label %bb9, label %bb15
-
-bb9: ; preds = %bb
- %22 = getelementptr inbounds %struct.btCollisionShape* %9, i32 4, i32 2 ; [#uses=1]
- %23 = bitcast i8** %22 to float* ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=4]
- %25 = call float @fabsf(float %24) nounwind readnone ; [#uses=1]
- %26 = fcmp ogt float %25, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %26, label %bb.i21, label %bb1.i
-
-bb.i21: ; preds = %bb9
- %27 = getelementptr inbounds %struct.btCollisionShape* %9, i32 4, i32 1 ; [#uses=1]
- %28 = bitcast i32* %27 to float* ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=3]
- %30 = fmul float %29, %29 ; [#uses=1]
- %31 = fmul float %24, %24 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = call float @sqrtf(float %32) nounwind readonly ; [#uses=1]
- %34 = fdiv float 1.000000e+00, %33 ; [#uses=2]
- %35 = fsub float -0.000000e+00, %24 ; [#uses=1]
- %36 = fmul float %34, %35 ; [#uses=1]
- %37 = fmul float %29, %34 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-bb1.i: ; preds = %bb9
- %38 = bitcast %struct.btCollisionShape* %10 to float* ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=3]
- %40 = fmul float %39, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btCollisionShape* %9, i32 4, i32 1 ; [#uses=1]
- %42 = bitcast i32* %41 to float* ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = fmul float %43, %43 ; [#uses=1]
- %45 = fadd float %40, %44 ; [#uses=1]
- %46 = call float @sqrtf(float %45) nounwind readonly ; [#uses=1]
- %47 = fdiv float 1.000000e+00, %46 ; [#uses=2]
- %48 = fsub float -0.000000e+00, %43 ; [#uses=1]
- %49 = fmul float %47, %48 ; [#uses=1]
- %50 = fmul float %39, %47 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit: ; preds = %bb1.i, %bb.i21
- %v0.0.0.0 = phi float [ 0.000000e+00, %bb.i21 ], [ %49, %bb1.i ] ; [#uses=3]
- %v0.0.1.0 = phi float [ %36, %bb.i21 ], [ %50, %bb1.i ] ; [#uses=3]
- %v0.0.2.0 = phi float [ %37, %bb.i21 ], [ 0.000000e+00, %bb1.i ] ; [#uses=3]
- %51 = getelementptr inbounds %struct.btCollisionShape* %7, i32 0, i32 0 ; [#uses=1]
- %52 = load i32 (...)*** %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds i32 (...)** %52, i32 4 ; [#uses=1]
- %54 = load i32 (...)** %53, align 4 ; [#uses=1]
- %55 = bitcast i32 (...)* %54 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %56 = call float %55(%struct.btCollisionShape* %7) ; [#uses=1]
- %57 = load float* @gContactBreakingThreshold, align 4 ; [#uses=1]
- %58 = fdiv float %57, %56 ; [#uses=2]
- %59 = fcmp ogt float %58, 0x3FD921FB60000000 ; [#uses=1]
- %60 = fmul float %v0.0.0.0, %v0.0.0.0 ; [#uses=1]
- %61 = fmul float %v0.0.1.0, %v0.0.1.0 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %v0.0.2.0, %v0.0.2.0 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = call float @sqrtf(float %64) nounwind readonly ; [#uses=1]
- %.op = fmul float %58, 5.000000e-01 ; [#uses=1]
- %66 = select i1 %59, float 0x3FC921FB60000000, float %.op ; [#uses=2]
- %67 = call float @sinf(float %66) nounwind readonly ; [#uses=1]
- %68 = fdiv float %67, %65 ; [#uses=3]
- %69 = call float @cosf(float %66) nounwind readonly ; [#uses=4]
- %70 = fmul float %v0.0.2.0, %68 ; [#uses=4]
- %71 = fmul float %v0.0.1.0, %68 ; [#uses=4]
- %72 = fmul float %v0.0.0.0, %68 ; [#uses=4]
- %73 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 4 ; [#uses=2]
- %74 = load i32* %73, align 4 ; [#uses=2]
- %75 = icmp sgt i32 %74, 0 ; [#uses=1]
- br i1 %75, label %bb.nph, label %bb15
-
-bb.nph: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %76 = bitcast %struct.btCollisionShape* %10 to float* ; [#uses=1]
- %77 = getelementptr inbounds %struct.btCollisionShape* %9, i32 4, i32 1 ; [#uses=1]
- %78 = bitcast i32* %77 to float* ; [#uses=1]
- %79 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb12, %bb.nph
- %83 = phi i32 [ %74, %bb.nph ], [ %165, %bb12 ] ; [#uses=1]
- %84 = phi i32 [ 0, %bb.nph ], [ %164, %bb12 ] ; [#uses=2]
- %85 = sitofp i32 %84 to float ; [#uses=1]
- %86 = sitofp i32 %83 to float ; [#uses=1]
- %87 = fdiv float 0x401921FB60000000, %86 ; [#uses=1]
- %88 = fmul float %85, %87 ; [#uses=1]
- %89 = load float* %76, align 4 ; [#uses=3]
- %90 = fmul float %89, %89 ; [#uses=1]
- %91 = load float* %78, align 4 ; [#uses=3]
- %92 = fmul float %91, %91 ; [#uses=1]
- %93 = fadd float %90, %92 ; [#uses=1]
- %94 = load float* %23, align 4 ; [#uses=3]
- %95 = fmul float %94, %94 ; [#uses=1]
- %96 = fadd float %93, %95 ; [#uses=1]
- %97 = call float @sqrtf(float %96) nounwind readonly ; [#uses=1]
- %98 = fmul float %88, 5.000000e-01 ; [#uses=2]
- %99 = call float @sinf(float %98) nounwind readonly ; [#uses=1]
- %100 = fdiv float %99, %97 ; [#uses=3]
- %101 = call float @cosf(float %98) nounwind readonly ; [#uses=8]
- %102 = fmul float %94, %100 ; [#uses=5]
- %103 = fmul float %91, %100 ; [#uses=5]
- %104 = fmul float %89, %100 ; [#uses=5]
- %105 = fsub float -0.000000e+00, %102 ; [#uses=4]
- %106 = fsub float -0.000000e+00, %103 ; [#uses=4]
- %107 = fsub float -0.000000e+00, %104 ; [#uses=4]
- %108 = fmul float %101, %69 ; [#uses=1]
- %109 = fmul float %72, %107 ; [#uses=1]
- %110 = fsub float %108, %109 ; [#uses=1]
- %111 = fmul float %71, %106 ; [#uses=1]
- %112 = fsub float %110, %111 ; [#uses=1]
- %113 = fmul float %70, %105 ; [#uses=1]
- %114 = fsub float %112, %113 ; [#uses=4]
- %115 = fmul float %101, %70 ; [#uses=1]
- %116 = fmul float %69, %105 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %71, %107 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = fmul float %72, %106 ; [#uses=1]
- %121 = fsub float %119, %120 ; [#uses=4]
- %122 = fmul float %101, %71 ; [#uses=1]
- %123 = fmul float %69, %106 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=1]
- %125 = fmul float %72, %105 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = fmul float %70, %107 ; [#uses=1]
- %128 = fsub float %126, %127 ; [#uses=4]
- %129 = fmul float %101, %72 ; [#uses=1]
- %130 = fmul float %69, %107 ; [#uses=1]
- %131 = fadd float %129, %130 ; [#uses=1]
- %132 = fmul float %70, %106 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %71, %105 ; [#uses=1]
- %135 = fsub float %133, %134 ; [#uses=4]
- %136 = fmul float %114, %101 ; [#uses=1]
- %137 = fmul float %135, %104 ; [#uses=1]
- %138 = fsub float %136, %137 ; [#uses=1]
- %139 = fmul float %128, %103 ; [#uses=1]
- %140 = fsub float %138, %139 ; [#uses=1]
- %141 = fmul float %121, %102 ; [#uses=1]
- %142 = fsub float %140, %141 ; [#uses=1]
- %143 = fmul float %114, %102 ; [#uses=1]
- %144 = fmul float %121, %101 ; [#uses=1]
- %145 = fadd float %143, %144 ; [#uses=1]
- %146 = fmul float %135, %103 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=1]
- %148 = fmul float %128, %104 ; [#uses=1]
- %149 = fsub float %147, %148 ; [#uses=1]
- %150 = fmul float %114, %103 ; [#uses=1]
- %151 = fmul float %128, %101 ; [#uses=1]
- %152 = fadd float %150, %151 ; [#uses=1]
- %153 = fmul float %121, %104 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %135, %102 ; [#uses=1]
- %156 = fsub float %154, %155 ; [#uses=1]
- %157 = fmul float %114, %104 ; [#uses=1]
- %158 = fmul float %135, %101 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fmul float %128, %102 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=1]
- %162 = fmul float %121, %103 ; [#uses=1]
- %163 = fsub float %161, %162 ; [#uses=1]
- store float %163, float* %79, align 8
- store float %156, float* %80, align 4
- store float %149, float* %81, align 8
- store float %142, float* %82, align 4
- call void @_ZN31btConvexPlaneCollisionAlgorithm20collideSingleContactERK12btQuaternionP17btCollisionObjectS4_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvexPlaneCollisionAlgorithm* %this, %struct.btQuaternion* %0, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut)
- %164 = add nsw i32 %84, 1 ; [#uses=2]
- %165 = load i32* %73, align 4 ; [#uses=2]
- %166 = icmp sgt i32 %165, %164 ; [#uses=1]
- br i1 %166, label %bb12, label %bb15
-
-bb15: ; preds = %bb12, %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit, %bb
- %167 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %168 = load i8* %167, align 4 ; [#uses=1]
- %toBool16 = icmp eq i8 %168, 0 ; [#uses=1]
- br i1 %toBool16, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb17
-
-bb17: ; preds = %bb15
- %169 = load %struct.btPersistentManifold** %1, align 4 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btPersistentManifold* %169, i32 0, i32 4 ; [#uses=1]
- %171 = load i32* %170, align 4 ; [#uses=1]
- %172 = icmp eq i32 %171, 0 ; [#uses=1]
- br i1 %172, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb19
-
-bb19: ; preds = %bb17
- %173 = load %struct.btPersistentManifold** %15, align 4 ; [#uses=4]
- %174 = getelementptr inbounds %struct.btPersistentManifold* %173, i32 0, i32 4 ; [#uses=1]
- %175 = load i32* %174, align 4 ; [#uses=1]
- %176 = icmp eq i32 %175, 0 ; [#uses=1]
- br i1 %176, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb.i
-
-bb.i: ; preds = %bb19
- %177 = getelementptr inbounds %struct.btPersistentManifold* %173, i32 0, i32 2 ; [#uses=1]
- %178 = load i8** %177, align 4 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %180 = load %struct.btCollisionObject** %179, align 4 ; [#uses=1]
- %181 = bitcast %struct.btCollisionObject* %180 to i8* ; [#uses=1]
- %182 = icmp eq i8* %178, %181 ; [#uses=1]
- br i1 %182, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %183 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %173, %struct.btTransform* %184, %struct.btTransform* %183)
- ret void
-
-bb3.i: ; preds = %bb.i
- %185 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %173, %struct.btTransform* %186, %struct.btTransform* %185)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit: ; preds = %bb19, %bb17, %bb15, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btConvexPlaneCollisionAlgorithmD0Ev(%struct.btConvexPlaneCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV31btConvexPlaneCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb4, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- tail call void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- br label %bb4
-
-bb4: ; preds = %bb1, %bb, %entry
- %13 = bitcast %struct.btConvexPlaneCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %13) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btConvexPlaneCollisionAlgorithmD1Ev(%struct.btConvexPlaneCollisionAlgorithm* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV31btConvexPlaneCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %return, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- tail call void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN31btConvexPlaneCollisionAlgorithmD2Ev(%struct.btConvexPlaneCollisionAlgorithm* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV31btConvexPlaneCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %return, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- tail call void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=2]
-define void @_ZN31btConvexPlaneCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_bii(%struct.btConvexPlaneCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, i8 zeroext %isSwapped, i32 %numPerturbationIterations, i32 %minimumPointsPerturbationThreshold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV31btConvexPlaneCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %isSwapped, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store i32 %numPerturbationIterations, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i32 %minimumPointsPerturbationThreshold, i32* %6, align 4
- %toBool = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.162.0 = select i1 %toBool, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1 ; [#uses=2]
- %iftmp.163.0 = select i1 %toBool, %struct.btCollisionObject* %col1, %struct.btCollisionObject* %col0 ; [#uses=2]
- %7 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %7, label %bb7, label %bb13
-
-bb7: ; preds = %entry
- %8 = getelementptr inbounds %struct.btConvexPlaneCollisionAlgorithm* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = load %struct.btActionInterface** %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btActionInterface* %9, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 6 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %15 = invoke zeroext i8 %14(%struct.btActionInterface* %9, %struct.btCollisionObject* %iftmp.162.0, %struct.btCollisionObject* %iftmp.163.0)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb7
- %toBool8not = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool8not, label %bb13, label %bb16
-
-bb13: ; preds = %invcont, %entry
- ret void
-
-bb16: ; preds = %invcont
- %16 = load %struct.btActionInterface** %8, align 4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btActionInterface* %16, i32 0, i32 0 ; [#uses=1]
- %18 = load i32 (...)*** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 3 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %22 = bitcast %struct.btCollisionObject* %iftmp.162.0 to i8* ; [#uses=1]
- %23 = bitcast %struct.btCollisionObject* %iftmp.163.0 to i8* ; [#uses=1]
- %24 = invoke %struct.btPersistentManifold* %21(%struct.btActionInterface* %16, i8* %22, i8* %23)
- to label %invcont17 unwind label %lpad ; [#uses=1]
-
-invcont17: ; preds = %bb16
- store %struct.btPersistentManifold* %24, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-lpad: ; preds = %bb16, %bb7
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV20btCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN27btConvex2dConvex2dAlgorithm10CreateFuncC2EP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %1, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btConvex2dConvex2dAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %2 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 4 ; [#uses=1]
- store i32 3, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %4, align 4
- %5 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %5, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN27btConvex2dConvex2dAlgorithm10CreateFuncD1Ev(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btConvex2dConvex2dAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN27btConvex2dConvex2dAlgorithm10CreateFuncD0Ev(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btConvex2dConvex2dAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN27btConvex2dConvex2dAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 36) ; [#uses=11]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 4 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 3 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- %14 = load %struct.btActionInterface** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- %16 = load %struct.btVoronoiSimplexSolver** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 1 ; [#uses=1]
- %18 = load %struct.btPersistentManifold** %17, align 4 ; [#uses=1]
- %19 = bitcast i8* %7 to %struct.btActivatingCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %19, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- to label %_ZN27btConvex2dConvex2dAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii.exit unwind label %lpad
-
-_ZN27btConvex2dConvex2dAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii.exit: ; preds = %bb
- %20 = bitcast i8* %7 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btConvex2dConvex2dAlgorithm, i32 0, i32 2), i32 (...)*** %20, align 4
- %21 = getelementptr inbounds i8* %7, i32 8 ; [#uses=1]
- %22 = bitcast i8* %21 to %struct.btVoronoiSimplexSolver** ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %16, %struct.btVoronoiSimplexSolver** %22, align 4
- %23 = getelementptr inbounds i8* %7, i32 12 ; [#uses=1]
- %24 = bitcast i8* %23 to %struct.btActionInterface** ; [#uses=1]
- store %struct.btActionInterface* %14, %struct.btActionInterface** %24, align 4
- %25 = getelementptr inbounds i8* %7, i32 16 ; [#uses=1]
- store i8 0, i8* %25, align 4
- %26 = getelementptr inbounds i8* %7, i32 20 ; [#uses=1]
- %27 = bitcast i8* %26 to %struct.btPersistentManifold** ; [#uses=1]
- store %struct.btPersistentManifold* %18, %struct.btPersistentManifold** %27, align 4
- %28 = getelementptr inbounds i8* %7, i32 24 ; [#uses=1]
- store i8 0, i8* %28, align 4
- %29 = getelementptr inbounds i8* %7, i32 28 ; [#uses=1]
- %30 = bitcast i8* %29 to i32* ; [#uses=1]
- store i32 %12, i32* %30, align 4
- %31 = getelementptr inbounds i8* %7, i32 32 ; [#uses=1]
- %32 = bitcast i8* %31 to i32* ; [#uses=1]
- store i32 %10, i32* %32, align 4
- br label %bb4
-
-bb4: ; preds = %_ZN27btConvex2dConvex2dAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii.exit, %entry
- %iftmp.161.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.161.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN27btConvex2dConvex2dAlgorithm10CreateFuncC1EP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %1, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btConvex2dConvex2dAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %2 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 4 ; [#uses=1]
- store i32 3, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %4, align 4
- %5 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %5, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN27btConvex2dConvex2dAlgorithm19setLowLevelOfDetailEb(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, i8 zeroext %useLowLevel) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i8 %useLowLevel, i8* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN27btConvex2dConvex2dAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN27btConvex2dConvex2dAlgorithm10CreateFuncD2Ev(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btConvex2dConvex2dAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define float @_ZN27btConvex2dConvex2dAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) align 2 {
-entry:
- %sphere1 = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=6]
- %result = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=5]
- %voronoiSimplex = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %ccd1 = alloca %struct.btGjkConvexCast, align 8 ; [#uses=6]
- %sphere0 = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=6]
- %result28 = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=5]
- %voronoiSimplex29 = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %ccd130 = alloca %struct.btGjkConvexCast, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = fmul float %14, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = fmul float %4, %4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fsub float %21, %23 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fsub float %26, %28 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %31, %33 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 23 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %36 ; [#uses=1]
- %38 = fcmp ule float %37, %19 ; [#uses=1]
- br i1 %38, label %invcont, label %bb
-
-bb: ; preds = %entry
- %39 = fmul float %29, %29 ; [#uses=1]
- %40 = fmul float %34, %34 ; [#uses=1]
- %41 = fmul float %24, %24 ; [#uses=1]
- %42 = fadd float %40, %39 ; [#uses=1]
- %43 = fadd float %42, %41 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 23 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- %46 = fmul float %45, %45 ; [#uses=1]
- %47 = fcmp ule float %46, %43 ; [#uses=1]
- br i1 %47, label %invcont, label %bb56
-
-invcont: ; preds = %bb, %entry
- %48 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 9 ; [#uses=1]
- %49 = load %struct.btCollisionShape** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 22 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- %52 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %52)
- %53 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %53, align 8
- %54 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %54, align 4
- %55 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %51, float* %55, align 4
- %56 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %51, float* %56, align 4
- %57 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %57, align 8
- %58 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 5 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %58, align 4
- %59 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %59, align 8
- %60 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- %61 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %61, align 4
- %62 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %63 = load i8* %62, align 4 ; [#uses=1]
- %64 = and i8 %63, -16 ; [#uses=1]
- store i8 %64, i8* %62, align 4
- %65 = bitcast %struct.btCollisionShape* %49 to %struct.btConvexShape* ; [#uses=1]
- %66 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere1, i32 0, i32 0, i32 0 ; [#uses=3]
- invoke void @_ZN15btGjkConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* %ccd1, %struct.btConvexShape* %65, %struct.btConvexShape* %66, %struct.btVoronoiSimplexSolver* %voronoiSimplex)
- to label %invcont6 unwind label %lpad
-
-invcont6: ; preds = %invcont
- %67 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 2 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1 ; [#uses=2]
- %69 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 2 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1 ; [#uses=2]
- %71 = invoke zeroext i8 @_ZN15btGjkConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* %ccd1, %struct.btTransform* %70, %struct.btTransform* %69, %struct.btTransform* %68, %struct.btTransform* %67, %"struct.btConvexCast::CastResult"* %result)
- to label %invcont7 unwind label %lpad60 ; [#uses=1]
-
-invcont7: ; preds = %invcont6
- %toBool8 = icmp eq i8 %71, 0 ; [#uses=1]
- br i1 %toBool8, label %bb20, label %bb9
-
-bb9: ; preds = %invcont7
- %72 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 21 ; [#uses=2]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = load float* %58, align 4 ; [#uses=6]
- %75 = fcmp ogt float %73, %74 ; [#uses=1]
- br i1 %75, label %bb11, label %bb12
-
-bb11: ; preds = %bb9
- store float %74, float* %72, align 4
- br label %bb12
-
-bb12: ; preds = %bb11, %bb9
- %76 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 21 ; [#uses=2]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fcmp ogt float %77, %74 ; [#uses=1]
- br i1 %78, label %bb14, label %bb15
-
-bb14: ; preds = %bb12
- store float %74, float* %76, align 4
- br label %bb15
-
-bb15: ; preds = %bb14, %bb12
- %79 = fcmp olt float %74, 1.000000e+00 ; [#uses=1]
- br i1 %79, label %bb16, label %bb20
-
-bb16: ; preds = %bb15
- br label %bb20
-
-bb20: ; preds = %bb16, %bb15, %invcont7
- %resultFraction.0 = phi float [ %74, %bb16 ], [ 1.000000e+00, %bb15 ], [ 1.000000e+00, %invcont7 ] ; [#uses=3]
- %80 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %80, align 8
- %81 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %81)
- to label %invcont31 unwind label %lpad
-
-invcont31: ; preds = %bb20
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %53, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %66)
- %82 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 9 ; [#uses=1]
- %83 = load %struct.btCollisionShape** %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 22 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=2]
- %86 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %86)
- %87 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %87, align 8
- %88 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %88, align 4
- %89 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %85, float* %89, align 4
- %90 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %85, float* %90, align 4
- %91 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result28, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %91, align 8
- %92 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result28, i32 0, i32 5 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %92, align 4
- %93 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result28, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %93, align 8
- %94 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result28, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %94, align 4
- %95 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex29, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %95, align 4
- %96 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %voronoiSimplex29, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %97 = load i8* %96, align 4 ; [#uses=1]
- %98 = and i8 %97, -16 ; [#uses=1]
- store i8 %98, i8* %96, align 4
- %99 = bitcast %struct.btCollisionShape* %83 to %struct.btConvexShape* ; [#uses=1]
- %100 = getelementptr inbounds %struct.btPolyhedralConvexShape* %sphere0, i32 0, i32 0, i32 0 ; [#uses=3]
- invoke void @_ZN15btGjkConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* %ccd130, %struct.btConvexShape* %100, %struct.btConvexShape* %99, %struct.btVoronoiSimplexSolver* %voronoiSimplex29)
- to label %invcont32 unwind label %lpad72
-
-invcont32: ; preds = %invcont31
- %101 = invoke zeroext i8 @_ZN15btGjkConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* %ccd130, %struct.btTransform* %70, %struct.btTransform* %69, %struct.btTransform* %68, %struct.btTransform* %67, %"struct.btConvexCast::CastResult"* %result28)
- to label %invcont33 unwind label %lpad76 ; [#uses=1]
-
-invcont33: ; preds = %invcont32
- %toBool34 = icmp eq i8 %101, 0 ; [#uses=1]
- br i1 %toBool34, label %bb48, label %bb35
-
-bb35: ; preds = %invcont33
- %102 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 21 ; [#uses=2]
- %103 = load float* %102, align 4 ; [#uses=1]
- %104 = load float* %92, align 4 ; [#uses=6]
- %105 = fcmp ogt float %103, %104 ; [#uses=1]
- br i1 %105, label %bb37, label %bb38
-
-bb37: ; preds = %bb35
- store float %104, float* %102, align 4
- br label %bb38
-
-bb38: ; preds = %bb37, %bb35
- %106 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 21 ; [#uses=2]
- %107 = load float* %106, align 4 ; [#uses=1]
- %108 = fcmp ogt float %107, %104 ; [#uses=1]
- br i1 %108, label %bb40, label %bb41
-
-bb40: ; preds = %bb38
- store float %104, float* %106, align 4
- br label %bb41
-
-bb41: ; preds = %bb40, %bb38
- %109 = fcmp olt float %104, %resultFraction.0 ; [#uses=1]
- br i1 %109, label %bb42, label %bb48
-
-bb42: ; preds = %bb41
- br label %bb48
-
-bb48: ; preds = %bb42, %bb41, %invcont33
- %resultFraction.1 = phi float [ %104, %bb42 ], [ %resultFraction.0, %bb41 ], [ %resultFraction.0, %invcont33 ] ; [#uses=1]
- %110 = getelementptr inbounds %struct.btGjkConvexCast* %ccd130, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %110, align 8
- %111 = getelementptr inbounds %struct.btGjkConvexCast* %ccd130, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %111)
- to label %bb55 unwind label %lpad72
-
-bb55: ; preds = %bb48
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %87, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %100)
- ret float %resultFraction.1
-
-bb56: ; preds = %bb
- ret float 1.000000e+00
-
-lpad: ; preds = %bb20, %invcont
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select59 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad60: ; preds = %invcont6
- %eh_ptr61 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select63 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %112 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %112, align 8
- %113 = getelementptr inbounds %struct.btGjkConvexCast* %ccd1, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %113)
- to label %ppad unwind label %lpad64
-
-lpad64: ; preds = %lpad60
- %eh_ptr65 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select67 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr65, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad68: ; preds = %ppad
- %eh_ptr69 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select71 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr69, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad72: ; preds = %bb48, %invcont31
- %eh_ptr73 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select75 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr73, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad91
-
-lpad76: ; preds = %invcont32
- %eh_ptr77 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select79 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr77, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %114 = getelementptr inbounds %struct.btGjkConvexCast* %ccd130, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %114, align 8
- %115 = getelementptr inbounds %struct.btGjkConvexCast* %ccd130, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %115)
- to label %ppad91 unwind label %lpad80
-
-lpad80: ; preds = %lpad76
- %eh_ptr81 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select83 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr81, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad84: ; preds = %ppad91
- %eh_ptr85 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select87 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr85, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad60, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr61, %lpad60 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %53, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %66)
- to label %Unwind unwind label %lpad68
-
-ppad91: ; preds = %lpad76, %lpad72
- %eh_exception.2 = phi i8* [ %eh_ptr73, %lpad72 ], [ %eh_ptr77, %lpad76 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %87, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %100)
- to label %Unwind unwind label %lpad84
-
-Unwind: ; preds = %ppad91, %ppad
- %eh_exception.1 = phi i8* [ %eh_exception.0, %ppad ], [ %eh_exception.2, %ppad91 ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN27btConvex2dConvex2dAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btConvex2dConvex2dAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=35]
- %gjkPairDetector = alloca %struct.btGjkPairDetector, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=3]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 3 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %10 = bitcast %struct.btCollisionObject* %body0 to i8* ; [#uses=1]
- %11 = bitcast %struct.btCollisionObject* %body1 to i8* ; [#uses=1]
- %12 = call %struct.btPersistentManifold* %9(%struct.btActionInterface* %4, i8* %10, i8* %11) ; [#uses=2]
- store %struct.btPersistentManifold* %12, %struct.btPersistentManifold** %0, align 4
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 1, i8* %13, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %14 = phi %struct.btPersistentManifold* [ %12, %bb ], [ %1, %entry ] ; [#uses=1]
- %15 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- store %struct.btPersistentManifold* %14, %struct.btPersistentManifold** %15, align 4
- %16 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=1]
- %17 = load %struct.btCollisionShape** %16, align 4 ; [#uses=2]
- %18 = bitcast %struct.btCollisionShape* %17 to %struct.btConvexShape* ; [#uses=3]
- %19 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=1]
- %20 = load %struct.btCollisionShape** %19, align 4 ; [#uses=2]
- %21 = bitcast %struct.btCollisionShape* %20 to %struct.btConvexShape* ; [#uses=3]
- %22 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %22, align 8
- %23 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=2]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %23, align 4
- %24 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %25 = load %struct.btActionInterface** %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %27 = load %struct.btVoronoiSimplexSolver** %26, align 4 ; [#uses=1]
- call void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* %gjkPairDetector, %struct.btConvexShape* %18, %struct.btConvexShape* %21, %struct.btVoronoiSimplexSolver* %27, %struct.btActionInterface* %25)
- %28 = getelementptr inbounds %struct.btGjkPairDetector* %gjkPairDetector, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %18, %struct.btConvexShape** %28, align 4
- %29 = getelementptr inbounds %struct.btGjkPairDetector* %gjkPairDetector, i32 0, i32 5 ; [#uses=1]
- store %struct.btConvexShape* %21, %struct.btConvexShape** %29, align 8
- %30 = getelementptr inbounds %struct.btCollisionShape* %17, i32 0, i32 0 ; [#uses=1]
- %31 = load i32 (...)*** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32 (...)** %31, i32 11 ; [#uses=1]
- %33 = load i32 (...)** %32, align 4 ; [#uses=1]
- %34 = bitcast i32 (...)* %33 to float (%struct.btConvexShape*)* ; [#uses=1]
- %35 = call float %34(%struct.btConvexShape* %18) ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCollisionShape* %20, i32 0, i32 0 ; [#uses=1]
- %37 = load i32 (...)*** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 11 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to float (%struct.btConvexShape*)* ; [#uses=1]
- %41 = call float %40(%struct.btConvexShape* %21) ; [#uses=1]
- %42 = fadd float %35, %41 ; [#uses=1]
- %43 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %44 = call float @_ZNK20btPersistentManifold27getContactBreakingThresholdEv(%struct.btPersistentManifold* %43) ; [#uses=1]
- %45 = fadd float %42, %44 ; [#uses=2]
- %46 = fmul float %45, %45 ; [#uses=1]
- store float %46, float* %22, align 8
- %47 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 13 ; [#uses=1]
- %48 = load %struct.btStackAlloc** %47, align 4 ; [#uses=1]
- store %struct.btStackAlloc* %48, %struct.btStackAlloc** %23, align 4
- %49 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 8
- %52 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 8
- %58 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 8
- %64 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 8
- %70 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 8
- %76 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 8
- %82 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 8
- %88 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 8
- %94 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 8
- %100 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- store float %102, float* %100, align 4
- %103 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- store float %105, float* %103, align 8
- %106 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- store float %108, float* %106, align 4
- %109 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- store float %111, float* %109, align 8
- %112 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=1]
- store float %114, float* %112, align 4
- %115 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=1]
- store float %117, float* %115, align 8
- %118 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- store float %120, float* %118, align 4
- %121 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- store float %123, float* %121, align 8
- %124 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- store float %126, float* %124, align 4
- %127 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=1]
- store float %129, float* %127, align 8
- %130 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=1]
- store float %132, float* %130, align 4
- %133 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- store float %135, float* %133, align 8
- %136 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- store float %138, float* %136, align 4
- %139 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- store float %141, float* %139, align 8
- %142 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=1]
- store float %144, float* %142, align 4
- %145 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 5 ; [#uses=1]
- %146 = load %struct.btActionInterface** %145, align 4 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0 ; [#uses=1]
- call void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjkPairDetector, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %147, %struct.btActionInterface* %146, i8 zeroext 0)
- %148 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %149 = load i8* %148, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %149, 0 ; [#uses=1]
- br i1 %toBool, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb2
-
-bb2: ; preds = %bb1
- %150 = load %struct.btPersistentManifold** %15, align 4 ; [#uses=4]
- %151 = getelementptr inbounds %struct.btPersistentManifold* %150, i32 0, i32 4 ; [#uses=1]
- %152 = load i32* %151, align 4 ; [#uses=1]
- %153 = icmp eq i32 %152, 0 ; [#uses=1]
- br i1 %153, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb.i
-
-bb.i: ; preds = %bb2
- %154 = getelementptr inbounds %struct.btPersistentManifold* %150, i32 0, i32 2 ; [#uses=1]
- %155 = load i8** %154, align 4 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %157 = load %struct.btCollisionObject** %156, align 4 ; [#uses=1]
- %158 = bitcast %struct.btCollisionObject* %157 to i8* ; [#uses=1]
- %159 = icmp eq i8* %155, %158 ; [#uses=1]
- br i1 %159, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %160 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %150, %struct.btTransform* %161, %struct.btTransform* %160)
- ret void
-
-bb3.i: ; preds = %bb.i
- %162 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %150, %struct.btTransform* %163, %struct.btTransform* %162)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit: ; preds = %bb2, %bb1
- ret void
-}
-
-; [#uses=1]
-define void @_ZN27btConvex2dConvex2dAlgorithmD0Ev(%struct.btConvex2dConvex2dAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btConvex2dConvex2dAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- %14 = bitcast %struct.btConvex2dConvex2dAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %14) nounwind
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %15)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN27btConvex2dConvex2dAlgorithmD1Ev(%struct.btConvex2dConvex2dAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btConvex2dConvex2dAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN27btConvex2dConvex2dAlgorithmD2Ev(%struct.btConvex2dConvex2dAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btConvex2dConvex2dAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN27btConvex2dConvex2dAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii(%struct.btConvex2dConvex2dAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver, i32 %numPerturbationIterations, i32 %minimumPointsPerturbationThreshold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btConvex2dConvex2dAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %2, align 4
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %3, align 4
- %4 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %5, align 4
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i8 0, i8* %6, align 4
- %7 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %numPerturbationIterations, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %minimumPointsPerturbationThreshold, i32* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN27btConvex2dConvex2dAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolverii(%struct.btConvex2dConvex2dAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %pdSolver, i32 %numPerturbationIterations, i32 %minimumPointsPerturbationThreshold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btConvex2dConvex2dAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %2, align 4
- %3 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %pdSolver, %struct.btActionInterface** %3, align 4
- %4 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %5, align 4
- %6 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i8 0, i8* %6, align 4
- %7 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %numPerturbationIterations, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btConvex2dConvex2dAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %minimumPointsPerturbationThreshold, i32* %8, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btDefaultCollisionConfigurationC2ERK34btDefaultCollisionConstructionInfo(%struct.btDefaultCollisionConfiguration* %this, %struct.btDefaultCollisionConstructionInfo* nocapture %constructionInfo) align 2 {
-entry:
- %collisionAlgorithmMaxElementSize = alloca i32, align 4 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV31btDefaultCollisionConfiguration, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = invoke i8* @_Z22btAlignedAllocInternalji(i32 360, i32 16)
- to label %invcont unwind label %lpad ; [#uses=4]
-
-invcont: ; preds = %entry
- %2 = bitcast i8* %1 to %struct.btVoronoiSimplexSolver* ; [#uses=1]
- %3 = icmp eq i8* %1, null ; [#uses=1]
- br i1 %3, label %bb5, label %bb
-
-bb: ; preds = %invcont
- %4 = getelementptr inbounds i8* %1, i32 308 ; [#uses=1]
- %5 = bitcast i8* %4 to float* ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %5, align 4
- %6 = getelementptr inbounds i8* %1, i32 332 ; [#uses=2]
- %7 = load i8* %6, align 2 ; [#uses=1]
- %8 = and i8 %7, -16 ; [#uses=1]
- store i8 %8, i8* %6, align 2
- br label %bb5
-
-bb5: ; preds = %bb, %invcont
- %9 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 8 ; [#uses=2]
- store %struct.btVoronoiSimplexSolver* %2, %struct.btVoronoiSimplexSolver** %9, align 4
- %10 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 7 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = icmp eq i32 %11, 0 ; [#uses=1]
- br i1 %12, label %bb11, label %bb6
-
-bb6: ; preds = %bb5
- %13 = invoke i8* @_Z22btAlignedAllocInternalji(i32 4, i32 16)
- to label %invcont7 unwind label %lpad ; [#uses=3]
-
-invcont7: ; preds = %bb6
- %14 = icmp eq i8* %13, null ; [#uses=1]
- br i1 %14, label %bb10, label %bb8
-
-bb8: ; preds = %invcont7
- %15 = bitcast i8* %13 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %15, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %invcont7
- %16 = bitcast i8* %13 to %struct.btActionInterface* ; [#uses=1]
- %17 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 9 ; [#uses=1]
- store %struct.btActionInterface* %16, %struct.btActionInterface** %17, align 4
- br label %bb16
-
-bb11: ; preds = %bb5
- %18 = invoke i8* @_Z22btAlignedAllocInternalji(i32 4, i32 16)
- to label %invcont12 unwind label %lpad ; [#uses=3]
-
-invcont12: ; preds = %bb11
- %19 = icmp eq i8* %18, null ; [#uses=1]
- br i1 %19, label %bb15, label %bb13
-
-bb13: ; preds = %invcont12
- %20 = bitcast i8* %18 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV33btMinkowskiPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %20, align 4
- br label %bb15
-
-bb15: ; preds = %bb13, %invcont12
- %21 = bitcast i8* %18 to %struct.btActionInterface* ; [#uses=1]
- %22 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 9 ; [#uses=1]
- store %struct.btActionInterface* %21, %struct.btActionInterface** %22, align 4
- br label %bb16
-
-bb16: ; preds = %bb15, %bb10
- %23 = invoke i8* @_Z22btAlignedAllocInternalji(i32 24, i32 16)
- to label %invcont17 unwind label %lpad ; [#uses=3]
-
-invcont17: ; preds = %bb16
- %24 = icmp eq i8* %23, null ; [#uses=1]
- br i1 %24, label %bb25, label %bb18
-
-bb18: ; preds = %invcont17
- %25 = bitcast i8* %23 to %"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* ; [#uses=1]
- %26 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 9 ; [#uses=1]
- %27 = load %struct.btActionInterface** %26, align 4 ; [#uses=1]
- %28 = load %struct.btVoronoiSimplexSolver** %9, align 4 ; [#uses=1]
- invoke void @_ZN23btConvexConvexAlgorithm10CreateFuncC1EP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%"struct.btConvex2dConvex2dAlgorithm::CreateFunc"* %25, %struct.btVoronoiSimplexSolver* %28, %struct.btActionInterface* %27)
- to label %bb25 unwind label %lpad118
-
-bb25: ; preds = %bb18, %invcont17
- %29 = bitcast i8* %23 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %30 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 10 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %29, %struct.btCollisionAlgorithmCreateFunc** %30, align 4
- %31 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont26 unwind label %lpad ; [#uses=4]
-
-invcont26: ; preds = %bb25
- %32 = icmp eq i8* %31, null ; [#uses=1]
- br i1 %32, label %bb29, label %bb27
-
-bb27: ; preds = %invcont26
- %33 = bitcast i8* %31 to i32 (...)*** ; [#uses=1]
- %34 = getelementptr inbounds i8* %31, i32 4 ; [#uses=1]
- store i8 0, i8* %34, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN33btConvexConcaveCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %33, align 4
- br label %bb29
-
-bb29: ; preds = %bb27, %invcont26
- %35 = bitcast i8* %31 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %36 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 11 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %35, %struct.btCollisionAlgorithmCreateFunc** %36, align 4
- %37 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont30 unwind label %lpad ; [#uses=4]
-
-invcont30: ; preds = %bb29
- %38 = icmp eq i8* %37, null ; [#uses=1]
- br i1 %38, label %bb33, label %bb31
-
-bb31: ; preds = %invcont30
- %39 = bitcast i8* %37 to i32 (...)*** ; [#uses=1]
- %40 = getelementptr inbounds i8* %37, i32 4 ; [#uses=1]
- store i8 0, i8* %40, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 2), i32 (...)*** %39, align 4
- br label %bb33
-
-bb33: ; preds = %bb31, %invcont30
- %41 = bitcast i8* %37 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %42 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 12 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %41, %struct.btCollisionAlgorithmCreateFunc** %42, align 4
- %43 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont34 unwind label %lpad ; [#uses=4]
-
-invcont34: ; preds = %bb33
- %44 = icmp eq i8* %43, null ; [#uses=1]
- br i1 %44, label %bb37, label %bb35
-
-bb35: ; preds = %invcont34
- %45 = bitcast i8* %43 to i32 (...)*** ; [#uses=1]
- %46 = getelementptr inbounds i8* %43, i32 4 ; [#uses=1]
- store i8 0, i8* %46, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN28btCompoundCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %45, align 4
- br label %bb37
-
-bb37: ; preds = %bb35, %invcont34
- %47 = bitcast i8* %43 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %48 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 13 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %47, %struct.btCollisionAlgorithmCreateFunc** %48, align 4
- %49 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont38 unwind label %lpad ; [#uses=4]
-
-invcont38: ; preds = %bb37
- %50 = icmp eq i8* %49, null ; [#uses=1]
- br i1 %50, label %bb41, label %bb39
-
-bb39: ; preds = %invcont38
- %51 = bitcast i8* %49 to i32 (...)*** ; [#uses=1]
- %52 = getelementptr inbounds i8* %49, i32 4 ; [#uses=1]
- store i8 0, i8* %52, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN28btCompoundCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 2), i32 (...)*** %51, align 4
- br label %bb41
-
-bb41: ; preds = %bb39, %invcont38
- %53 = bitcast i8* %49 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %54 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 14 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %53, %struct.btCollisionAlgorithmCreateFunc** %54, align 4
- %55 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont42 unwind label %lpad ; [#uses=4]
-
-invcont42: ; preds = %bb41
- %56 = icmp eq i8* %55, null ; [#uses=1]
- br i1 %56, label %bb45, label %bb43
-
-bb43: ; preds = %invcont42
- %57 = bitcast i8* %55 to i32 (...)*** ; [#uses=1]
- %58 = getelementptr inbounds i8* %55, i32 4 ; [#uses=1]
- store i8 0, i8* %58, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN16btEmptyAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %57, align 4
- br label %bb45
-
-bb45: ; preds = %bb43, %invcont42
- %59 = bitcast i8* %55 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %60 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 15 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %59, %struct.btCollisionAlgorithmCreateFunc** %60, align 4
- %61 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont46 unwind label %lpad ; [#uses=4]
-
-invcont46: ; preds = %bb45
- %62 = icmp eq i8* %61, null ; [#uses=1]
- br i1 %62, label %bb49, label %bb47
-
-bb47: ; preds = %invcont46
- %63 = bitcast i8* %61 to i32 (...)*** ; [#uses=1]
- %64 = getelementptr inbounds i8* %61, i32 4 ; [#uses=1]
- store i8 0, i8* %64, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN32btSphereSphereCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %63, align 4
- br label %bb49
-
-bb49: ; preds = %bb47, %invcont46
- %65 = bitcast i8* %61 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %66 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 16 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %65, %struct.btCollisionAlgorithmCreateFunc** %66, align 4
- %67 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont50 unwind label %lpad ; [#uses=4]
-
-invcont50: ; preds = %bb49
- %68 = icmp eq i8* %67, null ; [#uses=1]
- br i1 %68, label %bb53, label %bb51
-
-bb51: ; preds = %invcont50
- %69 = bitcast i8* %67 to i32 (...)*** ; [#uses=1]
- %70 = getelementptr inbounds i8* %67, i32 4 ; [#uses=1]
- store i8 0, i8* %70, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN34btSphereTriangleCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %69, align 4
- br label %bb53
-
-bb53: ; preds = %bb51, %invcont50
- %71 = bitcast i8* %67 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %72 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 18 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %71, %struct.btCollisionAlgorithmCreateFunc** %72, align 4
- %73 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont54 unwind label %lpad ; [#uses=5]
-
-invcont54: ; preds = %bb53
- %74 = icmp eq i8* %73, null ; [#uses=1]
- br i1 %74, label %bb57, label %bb55
-
-bb55: ; preds = %invcont54
- %75 = bitcast i8* %73 to i32 (...)*** ; [#uses=1]
- %76 = getelementptr inbounds i8* %73, i32 4 ; [#uses=1]
- store i8 0, i8* %76, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN34btSphereTriangleCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %75, align 4
- br label %bb57
-
-bb57: ; preds = %bb55, %invcont54
- %77 = bitcast i8* %73 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %78 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 19 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %77, %struct.btCollisionAlgorithmCreateFunc** %78, align 4
- %79 = getelementptr inbounds i8* %73, i32 4 ; [#uses=1]
- store i8 1, i8* %79, align 4
- %80 = invoke i8* @_Z22btAlignedAllocInternalji(i32 8, i32 16)
- to label %invcont58 unwind label %lpad ; [#uses=4]
-
-invcont58: ; preds = %bb57
- %81 = icmp eq i8* %80, null ; [#uses=1]
- br i1 %81, label %bb61, label %bb59
-
-bb59: ; preds = %invcont58
- %82 = bitcast i8* %80 to i32 (...)*** ; [#uses=1]
- %83 = getelementptr inbounds i8* %80, i32 4 ; [#uses=1]
- store i8 0, i8* %83, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN26btBoxBoxCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %82, align 4
- br label %bb61
-
-bb61: ; preds = %bb59, %invcont58
- %84 = bitcast i8* %80 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %85 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 17 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %84, %struct.btCollisionAlgorithmCreateFunc** %85, align 4
- %86 = invoke i8* @_Z22btAlignedAllocInternalji(i32 16, i32 16)
- to label %invcont62 unwind label %lpad ; [#uses=6]
-
-invcont62: ; preds = %bb61
- %87 = icmp eq i8* %86, null ; [#uses=1]
- br i1 %87, label %bb65, label %bb63
-
-bb63: ; preds = %invcont62
- %88 = bitcast i8* %86 to i32 (...)*** ; [#uses=1]
- %89 = getelementptr inbounds i8* %86, i32 4 ; [#uses=1]
- store i8 0, i8* %89, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN31btConvexPlaneCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %88, align 4
- %90 = getelementptr inbounds i8* %86, i32 8 ; [#uses=1]
- %91 = bitcast i8* %90 to i32* ; [#uses=1]
- store i32 1, i32* %91, align 4
- %92 = getelementptr inbounds i8* %86, i32 12 ; [#uses=1]
- %93 = bitcast i8* %92 to i32* ; [#uses=1]
- store i32 1, i32* %93, align 4
- br label %bb65
-
-bb65: ; preds = %bb63, %invcont62
- %94 = bitcast i8* %86 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %95 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 21 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %94, %struct.btCollisionAlgorithmCreateFunc** %95, align 4
- %96 = invoke i8* @_Z22btAlignedAllocInternalji(i32 16, i32 16)
- to label %invcont66 unwind label %lpad ; [#uses=7]
-
-invcont66: ; preds = %bb65
- %97 = icmp eq i8* %96, null ; [#uses=1]
- br i1 %97, label %bb69, label %bb67
-
-bb67: ; preds = %invcont66
- %98 = bitcast i8* %96 to i32 (...)*** ; [#uses=1]
- %99 = getelementptr inbounds i8* %96, i32 4 ; [#uses=1]
- store i8 0, i8* %99, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN31btConvexPlaneCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %98, align 4
- %100 = getelementptr inbounds i8* %96, i32 8 ; [#uses=1]
- %101 = bitcast i8* %100 to i32* ; [#uses=1]
- store i32 1, i32* %101, align 4
- %102 = getelementptr inbounds i8* %96, i32 12 ; [#uses=1]
- %103 = bitcast i8* %102 to i32* ; [#uses=1]
- store i32 1, i32* %103, align 4
- br label %bb69
-
-bb69: ; preds = %bb67, %invcont66
- %104 = bitcast i8* %96 to %struct.btCollisionAlgorithmCreateFunc* ; [#uses=1]
- %105 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 20 ; [#uses=1]
- store %struct.btCollisionAlgorithmCreateFunc* %104, %struct.btCollisionAlgorithmCreateFunc** %105, align 4
- %106 = getelementptr inbounds i8* %96, i32 4 ; [#uses=1]
- store i8 1, i8* %106, align 4
- %107 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 5 ; [#uses=1]
- %108 = load i32* %107, align 4 ; [#uses=2]
- %109 = icmp slt i32 %108, 36 ; [#uses=1]
- %110 = select i1 %109, i32 36, i32 %108 ; [#uses=2]
- %111 = icmp sgt i32 %110, 80 ; [#uses=1]
- %112 = select i1 %111, i32 %110, i32 80 ; [#uses=2]
- %113 = icmp sgt i32 %112, 44 ; [#uses=1]
- %114 = select i1 %113, i32 %112, i32 44 ; [#uses=1]
- store i32 %114, i32* %collisionAlgorithmMaxElementSize, align 4
- %115 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 0 ; [#uses=2]
- %116 = load %struct.btStackAlloc** %115, align 4 ; [#uses=1]
- %117 = icmp eq %struct.btStackAlloc* %116, null ; [#uses=1]
- %118 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 3 ; [#uses=2]
- br i1 %117, label %bb71, label %bb70
-
-bb70: ; preds = %bb69
- store i8 0, i8* %118, align 4
- %119 = load %struct.btStackAlloc** %115, align 4 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btStackAlloc* %119, %struct.btStackAlloc** %120, align 4
- br label %bb82
-
-bb71: ; preds = %bb69
- store i8 1, i8* %118, align 4
- %121 = invoke i8* @_Z22btAlignedAllocInternalji(i32 20, i32 16)
- to label %invcont73 unwind label %lpad ; [#uses=7]
-
-invcont73: ; preds = %bb71
- %122 = bitcast i8* %121 to %struct.btStackAlloc* ; [#uses=1]
- %123 = icmp eq i8* %121, null ; [#uses=1]
- br i1 %123, label %bb81, label %bb74
-
-bb74: ; preds = %invcont73
- %124 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 6 ; [#uses=1]
- %125 = load i32* %124, align 4 ; [#uses=2]
- %126 = bitcast i8* %121 to i8** ; [#uses=2]
- %127 = getelementptr inbounds i8* %121, i32 4 ; [#uses=1]
- %128 = bitcast i8* %127 to i32* ; [#uses=2]
- store i32 0, i32* %128, align 4
- %129 = getelementptr inbounds i8* %121, i32 8 ; [#uses=1]
- %130 = bitcast i8* %129 to i32* ; [#uses=1]
- %131 = getelementptr inbounds i8* %121, i32 12 ; [#uses=1]
- %132 = bitcast i8* %131 to %struct.btBlock** ; [#uses=1]
- store %struct.btBlock* null, %struct.btBlock** %132, align 4
- %133 = getelementptr inbounds i8* %121, i32 16 ; [#uses=1]
- store i8 0, i8* %133, align 4
- store i8* null, i8** %126, align 4
- store i32 0, i32* %130, align 4
- %134 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %125, i32 16)
- to label %_ZN12btStackAllocC1Ej.exit unwind label %lpad122 ; [#uses=1]
-
-_ZN12btStackAllocC1Ej.exit: ; preds = %bb74
- store i8* %134, i8** %126, align 4
- store i32 %125, i32* %128, align 4
- br label %bb81
-
-bb81: ; preds = %_ZN12btStackAllocC1Ej.exit, %invcont73
- %135 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btStackAlloc* %122, %struct.btStackAlloc** %135, align 4
- br label %bb82
-
-bb82: ; preds = %bb81, %bb70
- %136 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 1 ; [#uses=2]
- %137 = load %struct.btPoolAllocator** %136, align 4 ; [#uses=1]
- %138 = icmp eq %struct.btPoolAllocator* %137, null ; [#uses=1]
- %139 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 5 ; [#uses=2]
- br i1 %138, label %bb84, label %bb83
-
-bb83: ; preds = %bb82
- store i8 0, i8* %139, align 4
- %140 = load %struct.btPoolAllocator** %136, align 4 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btPoolAllocator* %140, %struct.btPoolAllocator** %141, align 4
- br label %bb95
-
-bb84: ; preds = %bb82
- store i8 1, i8* %139, align 4
- %142 = invoke i8* @_Z22btAlignedAllocInternalji(i32 20, i32 16)
- to label %invcont86 unwind label %lpad ; [#uses=7]
-
-invcont86: ; preds = %bb84
- %143 = bitcast i8* %142 to %struct.btPoolAllocator* ; [#uses=1]
- %144 = icmp eq i8* %142, null ; [#uses=1]
- br i1 %144, label %bb94, label %bb87
-
-bb87: ; preds = %invcont86
- %145 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 3 ; [#uses=1]
- %146 = load i32* %145, align 4 ; [#uses=2]
- %147 = bitcast i8* %142 to i32* ; [#uses=3]
- store i32 1140, i32* %147, align 4
- %148 = getelementptr inbounds i8* %142, i32 4 ; [#uses=1]
- %149 = bitcast i8* %148 to i32* ; [#uses=2]
- store i32 %146, i32* %149, align 4
- %150 = mul nsw i32 %146, 1140 ; [#uses=1]
- %151 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %150, i32 16)
- to label %.noexc149 unwind label %lpad126 ; [#uses=4]
-
-.noexc149: ; preds = %bb87
- %152 = getelementptr inbounds i8* %142, i32 16 ; [#uses=1]
- %153 = bitcast i8* %152 to i8** ; [#uses=1]
- store i8* %151, i8** %153, align 4
- %154 = getelementptr inbounds i8* %142, i32 12 ; [#uses=1]
- %155 = bitcast i8* %154 to i8** ; [#uses=1]
- store i8* %151, i8** %155, align 4
- %156 = load i32* %149, align 4 ; [#uses=3]
- %157 = getelementptr inbounds i8* %142, i32 8 ; [#uses=1]
- %158 = bitcast i8* %157 to i32* ; [#uses=1]
- store i32 %156, i32* %158, align 4
- %159 = icmp eq i32 %156, 1 ; [#uses=1]
- %160 = bitcast i8* %151 to i8** ; [#uses=2]
- br i1 %159, label %_ZN15btPoolAllocatorC1Eii.exit150, label %bb.nph.i142
-
-bb.nph.i142: ; preds = %.noexc149
- %tmp.i140 = add i32 %156, -1 ; [#uses=1]
- %.pre.i141 = load i32* %147, align 4 ; [#uses=1]
- br label %bb.i147
-
-bb.i147: ; preds = %bb.i147, %bb.nph.i142
- %161 = phi i32 [ %.pre.i141, %bb.nph.i142 ], [ %164, %bb.i147 ] ; [#uses=1]
- %indvar.i143 = phi i32 [ 0, %bb.nph.i142 ], [ %indvar.next.i145, %bb.i147 ] ; [#uses=1]
- %162 = phi i8** [ %160, %bb.nph.i142 ], [ %166, %bb.i147 ] ; [#uses=1]
- %p.03.i144 = phi i8* [ %151, %bb.nph.i142 ], [ %165, %bb.i147 ] ; [#uses=2]
- %163 = getelementptr inbounds i8* %p.03.i144, i32 %161 ; [#uses=1]
- store i8* %163, i8** %162, align 4
- %164 = load i32* %147, align 4 ; [#uses=2]
- %165 = getelementptr inbounds i8* %p.03.i144, i32 %164 ; [#uses=2]
- %166 = bitcast i8* %165 to i8** ; [#uses=2]
- %indvar.next.i145 = add i32 %indvar.i143, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i145, %tmp.i140 ; [#uses=1]
- br i1 %exitcond, label %_ZN15btPoolAllocatorC1Eii.exit150, label %bb.i147
-
-_ZN15btPoolAllocatorC1Eii.exit150: ; preds = %bb.i147, %.noexc149
- %.lcssa.i148 = phi i8** [ %160, %.noexc149 ], [ %166, %bb.i147 ] ; [#uses=1]
- store i8* null, i8** %.lcssa.i148, align 4
- br label %bb94
-
-bb94: ; preds = %_ZN15btPoolAllocatorC1Eii.exit150, %invcont86
- %167 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btPoolAllocator* %143, %struct.btPoolAllocator** %167, align 4
- br label %bb95
-
-bb95: ; preds = %bb94, %bb83
- %168 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 2 ; [#uses=2]
- %169 = load %struct.btPoolAllocator** %168, align 4 ; [#uses=1]
- %170 = icmp eq %struct.btPoolAllocator* %169, null ; [#uses=1]
- %171 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 7 ; [#uses=2]
- br i1 %170, label %bb97, label %bb96
-
-bb96: ; preds = %bb95
- store i8 0, i8* %171, align 4
- %172 = load %struct.btPoolAllocator** %168, align 4 ; [#uses=1]
- %173 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btPoolAllocator* %172, %struct.btPoolAllocator** %173, align 4
- ret void
-
-bb97: ; preds = %bb95
- store i8 1, i8* %171, align 4
- %174 = invoke i8* @_Z22btAlignedAllocInternalji(i32 20, i32 16)
- to label %invcont99 unwind label %lpad ; [#uses=7]
-
-invcont99: ; preds = %bb97
- %175 = bitcast i8* %174 to %struct.btPoolAllocator* ; [#uses=1]
- %176 = icmp eq i8* %174, null ; [#uses=1]
- br i1 %176, label %bb107, label %bb100
-
-bb100: ; preds = %invcont99
- %177 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %constructionInfo, i32 0, i32 4 ; [#uses=1]
- %178 = load i32* %177, align 4 ; [#uses=2]
- %179 = load i32* %collisionAlgorithmMaxElementSize, align 4 ; [#uses=2]
- %180 = bitcast i8* %174 to i32* ; [#uses=3]
- store i32 %179, i32* %180, align 4
- %181 = getelementptr inbounds i8* %174, i32 4 ; [#uses=1]
- %182 = bitcast i8* %181 to i32* ; [#uses=2]
- store i32 %178, i32* %182, align 4
- %183 = mul nsw i32 %179, %178 ; [#uses=1]
- %184 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %183, i32 16)
- to label %.noexc unwind label %lpad130 ; [#uses=4]
-
-.noexc: ; preds = %bb100
- %185 = getelementptr inbounds i8* %174, i32 16 ; [#uses=1]
- %186 = bitcast i8* %185 to i8** ; [#uses=1]
- store i8* %184, i8** %186, align 4
- %187 = getelementptr inbounds i8* %174, i32 12 ; [#uses=1]
- %188 = bitcast i8* %187 to i8** ; [#uses=1]
- store i8* %184, i8** %188, align 4
- %189 = load i32* %182, align 4 ; [#uses=3]
- %190 = getelementptr inbounds i8* %174, i32 8 ; [#uses=1]
- %191 = bitcast i8* %190 to i32* ; [#uses=1]
- store i32 %189, i32* %191, align 4
- %192 = icmp eq i32 %189, 1 ; [#uses=1]
- %193 = bitcast i8* %184 to i8** ; [#uses=2]
- br i1 %192, label %_ZN15btPoolAllocatorC1Eii.exit, label %bb.nph.i
-
-bb.nph.i: ; preds = %.noexc
- %tmp.i = add i32 %189, -1 ; [#uses=1]
- %.pre.i = load i32* %180, align 4 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb.i, %bb.nph.i
- %194 = phi i32 [ %.pre.i, %bb.nph.i ], [ %197, %bb.i ] ; [#uses=1]
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb.i ] ; [#uses=1]
- %195 = phi i8** [ %193, %bb.nph.i ], [ %199, %bb.i ] ; [#uses=1]
- %p.03.i = phi i8* [ %184, %bb.nph.i ], [ %198, %bb.i ] ; [#uses=2]
- %196 = getelementptr inbounds i8* %p.03.i, i32 %194 ; [#uses=1]
- store i8* %196, i8** %195, align 4
- %197 = load i32* %180, align 4 ; [#uses=2]
- %198 = getelementptr inbounds i8* %p.03.i, i32 %197 ; [#uses=2]
- %199 = bitcast i8* %198 to i8** ; [#uses=2]
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond156 = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond156, label %_ZN15btPoolAllocatorC1Eii.exit, label %bb.i
-
-_ZN15btPoolAllocatorC1Eii.exit: ; preds = %bb.i, %.noexc
- %.lcssa.i = phi i8** [ %193, %.noexc ], [ %199, %bb.i ] ; [#uses=1]
- store i8* null, i8** %.lcssa.i, align 4
- br label %bb107
-
-bb107: ; preds = %_ZN15btPoolAllocatorC1Eii.exit, %invcont99
- %200 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btPoolAllocator* %175, %struct.btPoolAllocator** %200, align 4
- ret void
-
-lpad: ; preds = %bb97, %bb84, %bb71, %bb65, %bb61, %bb57, %bb53, %bb49, %bb45, %bb41, %bb37, %bb33, %bb29, %bb25, %bb16, %bb11, %bb6, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select113 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad118: ; preds = %bb18
- %eh_ptr119 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select121 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr119, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad122: ; preds = %bb74
- %eh_ptr123 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select125 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr123, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad126: ; preds = %bb87
- %eh_ptr127 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select129 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr127, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad130: ; preds = %bb100
- %eh_ptr131 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select133 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr131, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-ppad: ; preds = %lpad130, %lpad126, %lpad122, %lpad118, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr131, %lpad130 ], [ %eh_ptr, %lpad ], [ %eh_ptr127, %lpad126 ], [ %eh_ptr123, %lpad122 ], [ %eh_ptr119, %lpad118 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTV24btCollisionConfiguration, i32 0, i32 2), i32 (...)*** %0, align 4
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btPoolAllocator* @_ZN31btDefaultCollisionConfiguration25getPersistentManifoldPoolEv(%struct.btDefaultCollisionConfiguration* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 4 ; [#uses=1]
- %1 = load %struct.btPoolAllocator** %0, align 4 ; [#uses=1]
- ret %struct.btPoolAllocator* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btPoolAllocator* @_ZN31btDefaultCollisionConfiguration25getCollisionAlgorithmPoolEv(%struct.btDefaultCollisionConfiguration* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btPoolAllocator** %0, align 4 ; [#uses=1]
- ret %struct.btPoolAllocator* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btStackAlloc* @_ZN31btDefaultCollisionConfiguration17getStackAllocatorEv(%struct.btDefaultCollisionConfiguration* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btStackAlloc** %0, align 4 ; [#uses=1]
- ret %struct.btStackAlloc* %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btVoronoiSimplexSolver* @_ZN31btDefaultCollisionConfiguration16getSimplexSolverEv(%struct.btDefaultCollisionConfiguration* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 8 ; [#uses=1]
- %1 = load %struct.btVoronoiSimplexSolver** %0, align 4 ; [#uses=1]
- ret %struct.btVoronoiSimplexSolver* %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN31btConvexPlaneCollisionAlgorithm10CreateFuncD1Ev(%"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN31btConvexPlaneCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN31btConvexPlaneCollisionAlgorithm10CreateFuncD0Ev(%"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN31btConvexPlaneCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN31btConvexPlaneCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 28) ; [#uses=3]
- %8 = getelementptr inbounds %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load i8* %8, align 4 ; [#uses=1]
- %toBoolnot = icmp eq i8 %9, 0 ; [#uses=1]
- %10 = bitcast i8* %7 to %struct.btConvexPlaneCollisionAlgorithm* ; [#uses=2]
- %11 = icmp eq i8* %7, null ; [#uses=2]
- br i1 %toBoolnot, label %bb, label %bb9
-
-bb: ; preds = %entry
- br i1 %11, label %bb18, label %bb4
-
-bb4: ; preds = %bb
- %12 = getelementptr inbounds %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=1]
- invoke void @_ZN31btConvexPlaneCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_bii(%struct.btConvexPlaneCollisionAlgorithm* %10, %struct.btPersistentManifold* null, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext 0, i32 %15, i32 %13)
- to label %bb18 unwind label %lpad
-
-bb9: ; preds = %entry
- br i1 %11, label %bb18, label %bb10
-
-bb10: ; preds = %bb9
- %16 = getelementptr inbounds %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 2 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btConvexPlaneCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 1 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- invoke void @_ZN31btConvexPlaneCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_bii(%struct.btConvexPlaneCollisionAlgorithm* %10, %struct.btPersistentManifold* null, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext 1, i32 %19, i32 %17)
- to label %bb18 unwind label %lpad22
-
-bb18: ; preds = %bb10, %bb9, %bb4, %bb
- %.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %.0
-
-lpad: ; preds = %bb4
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-lpad22: ; preds = %bb10
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-Unwind: ; preds = %lpad22, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr23, %lpad22 ] ; [#uses=1]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btCollisionConfigurationD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTV24btCollisionConfiguration, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btCollisionConfigurationD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTV24btCollisionConfiguration, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN33btConvexConcaveCollisionAlgorithm10CreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN33btConvexConcaveCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN33btConvexConcaveCollisionAlgorithm10CreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN33btConvexConcaveCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN33btConvexConcaveCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 80) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btConvexConcaveCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN33btConvexConcaveCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btConvexConcaveCollisionAlgorithm* %9, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext 0)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.163.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.163.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN33btConvexConcaveCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN33btConvexConcaveCollisionAlgorithm17SwappedCreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 80) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btConvexConcaveCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN33btConvexConcaveCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btConvexConcaveCollisionAlgorithm* %9, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext 1)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.164.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.164.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btCompoundCollisionAlgorithm10CreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN28btCompoundCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btCompoundCollisionAlgorithm10CreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN28btCompoundCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN28btCompoundCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 44) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btCompoundCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN28btCompoundCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btCompoundCollisionAlgorithm* %9, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext 0)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.167.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.167.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btCompoundCollisionAlgorithm17SwappedCreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN28btCompoundCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btCompoundCollisionAlgorithm17SwappedCreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN28btCompoundCollisionAlgorithm17SwappedCreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN28btCompoundCollisionAlgorithm17SwappedCreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 44) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btCompoundCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN28btCompoundCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_b(%struct.btCompoundCollisionAlgorithm* %9, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext 1)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.168.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.168.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btEmptyAlgorithm10CreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN16btEmptyAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btEmptyAlgorithm10CreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN16btEmptyAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN16btEmptyAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 8) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btActivatingCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN16btEmptyAlgorithmC1ERK36btCollisionAlgorithmConstructionInfo(%struct.btActivatingCollisionAlgorithm* %9, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.162.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.162.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN32btSphereSphereCollisionAlgorithm10CreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN32btSphereSphereCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN32btSphereSphereCollisionAlgorithm10CreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN32btSphereSphereCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN32btSphereSphereCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 16) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btBox2dBox2dCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN32btSphereSphereCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %9, %struct.btPersistentManifold* null, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.175.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.175.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btSphereTriangleCollisionAlgorithm10CreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN34btSphereTriangleCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btSphereTriangleCollisionAlgorithm10CreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN34btSphereTriangleCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN34btSphereTriangleCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 20) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btSphereBoxCollisionAlgorithm* ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load i8* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 1 ; [#uses=1]
- %13 = load %struct.btPersistentManifold** %12, align 4 ; [#uses=1]
- invoke void @_ZN34btSphereTriangleCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_b(%struct.btSphereBoxCollisionAlgorithm* %9, %struct.btPersistentManifold* %13, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, i8 zeroext %11)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.177.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.177.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26btBoxBoxCollisionAlgorithm10CreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN26btBoxBoxCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26btBoxBoxCollisionAlgorithm10CreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN26btBoxBoxCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN26btBoxBoxCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 16) ; [#uses=3]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btBox2dBox2dCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN26btBoxBoxCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %9, %struct.btPersistentManifold* null, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %iftmp.173.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.173.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define %struct.btCollisionAlgorithmCreateFunc* @_ZN31btDefaultCollisionConfiguration31getCollisionAlgorithmCreateFuncEii(%struct.btDefaultCollisionConfiguration* nocapture %this, i32 %proxyType0, i32 %proxyType1) nounwind readonly align 2 {
-entry:
- %0 = icmp eq i32 %proxyType0, 8 ; [#uses=2]
- %1 = icmp eq i32 %proxyType1, 8 ; [#uses=2]
- %2 = and i1 %0, %1 ; [#uses=1]
- br i1 %2, label %bb, label %bb3
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 16 ; [#uses=1]
- br label %bb89
-
-bb3: ; preds = %entry
- %4 = icmp eq i32 %proxyType1, 1 ; [#uses=1]
- %5 = and i1 %0, %4 ; [#uses=1]
- br i1 %5, label %bb7, label %bb8
-
-bb7: ; preds = %bb3
- %6 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 18 ; [#uses=1]
- br label %bb89
-
-bb8: ; preds = %bb3
- %7 = icmp eq i32 %proxyType0, 1 ; [#uses=1]
- %8 = and i1 %7, %1 ; [#uses=1]
- br i1 %8, label %bb12, label %bb13
-
-bb12: ; preds = %bb8
- %9 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 19 ; [#uses=1]
- br label %bb89
-
-bb13: ; preds = %bb8
- %10 = or i32 %proxyType1, %proxyType0 ; [#uses=1]
- %11 = icmp eq i32 %10, 0 ; [#uses=1]
- br i1 %11, label %bb14, label %bb15
-
-bb14: ; preds = %bb13
- %12 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 17 ; [#uses=1]
- br label %bb89
-
-bb15: ; preds = %bb13
- %13 = icmp slt i32 %proxyType0, 20 ; [#uses=2]
- %14 = icmp eq i32 %proxyType1, 28 ; [#uses=1]
- %or.cond = and i1 %13, %14 ; [#uses=1]
- br i1 %or.cond, label %bb25, label %bb26
-
-bb25: ; preds = %bb15
- %15 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 21 ; [#uses=1]
- br label %bb89
-
-bb26: ; preds = %bb15
- %16 = icmp slt i32 %proxyType1, 20 ; [#uses=3]
- %17 = icmp eq i32 %proxyType0, 28 ; [#uses=1]
- %or.cond91 = and i1 %16, %17 ; [#uses=1]
- br i1 %or.cond91, label %bb36, label %bb37
-
-bb36: ; preds = %bb26
- %18 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 20 ; [#uses=1]
- br label %bb89
-
-bb37: ; preds = %bb26
- br i1 %13, label %bb42, label %bb63
-
-bb42: ; preds = %bb37
- br i1 %16, label %bb51, label %bb57
-
-bb51: ; preds = %bb42
- %19 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 10 ; [#uses=1]
- br label %bb89
-
-bb57: ; preds = %bb42
- %20 = add i32 %proxyType1, -21 ; [#uses=1]
- %21 = icmp ult i32 %20, 9 ; [#uses=1]
- br i1 %21, label %bb66, label %bb85
-
-bb63: ; preds = %bb37
- br i1 %16, label %bb72, label %bb78
-
-bb66: ; preds = %bb57
- %22 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 11 ; [#uses=1]
- br label %bb89
-
-bb72: ; preds = %bb63
- %23 = add i32 %proxyType0, -21 ; [#uses=1]
- %24 = icmp ult i32 %23, 9 ; [#uses=1]
- br i1 %24, label %bb81, label %bb78
-
-bb78: ; preds = %bb72, %bb63
- %25 = icmp eq i32 %proxyType0, 31 ; [#uses=1]
- br i1 %25, label %bb84, label %bb85
-
-bb81: ; preds = %bb72
- %26 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 12 ; [#uses=1]
- br label %bb89
-
-bb84: ; preds = %bb78
- %27 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 13 ; [#uses=1]
- br label %bb89
-
-bb85: ; preds = %bb78, %bb57
- %28 = icmp eq i32 %proxyType1, 31 ; [#uses=1]
- br i1 %28, label %bb87, label %bb88
-
-bb87: ; preds = %bb85
- %29 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 14 ; [#uses=1]
- br label %bb89
-
-bb88: ; preds = %bb85
- %30 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 15 ; [#uses=1]
- br label %bb89
-
-bb89: ; preds = %bb88, %bb87, %bb84, %bb81, %bb66, %bb51, %bb36, %bb25, %bb14, %bb12, %bb7, %bb
- %.0.in = phi %struct.btCollisionAlgorithmCreateFunc** [ %3, %bb ], [ %6, %bb7 ], [ %9, %bb12 ], [ %12, %bb14 ], [ %15, %bb25 ], [ %18, %bb36 ], [ %19, %bb51 ], [ %22, %bb66 ], [ %26, %bb81 ], [ %27, %bb84 ], [ %29, %bb87 ], [ %30, %bb88 ] ; [#uses=1]
- %.0 = load %struct.btCollisionAlgorithmCreateFunc** %.0.in, align 4 ; [#uses=1]
- ret %struct.btCollisionAlgorithmCreateFunc* %.0
-}
-
-; [#uses=0]
-define void @_ZN31btDefaultCollisionConfiguration35setConvexConvexMultipointIterationsEii(%struct.btDefaultCollisionConfiguration* nocapture %this, i32 %numPerturbationIterations, i32 %minimumPointsPerturbationThreshold) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 10 ; [#uses=1]
- %1 = load %struct.btCollisionAlgorithmCreateFunc** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %1, i32 2, i32 0 ; [#uses=1]
- %numPerturbationIterations.c = inttoptr i32 %numPerturbationIterations to i32 (...)** ; [#uses=1]
- store i32 (...)** %numPerturbationIterations.c, i32 (...)*** %2, align 4
- %3 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %1, i32 2, i32 1 ; [#uses=1]
- %4 = bitcast i8* %3 to i32* ; [#uses=1]
- store i32 %minimumPointsPerturbationThreshold, i32* %4, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btDefaultCollisionConfigurationD0Ev(%struct.btDefaultCollisionConfiguration* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV31btDefaultCollisionConfiguration, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 2 ; [#uses=3]
- %4 = load %struct.btStackAlloc** %3, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 2 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb.i, label %_ZN12btStackAllocD1Ev.exit
-
-bb.i: ; preds = %bb
- %8 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 4 ; [#uses=1]
- %9 = load i8* %8, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %bb4.i, label %_ZN12btStackAlloc7destroyEv.exit
-
-bb4.i: ; preds = %bb.i
- %10 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 0 ; [#uses=1]
- %11 = load i8** %10, align 4 ; [#uses=2]
- %12 = icmp eq i8* %11, null ; [#uses=1]
- br i1 %12, label %_ZN12btStackAlloc7destroyEv.exit, label %bb5.i
-
-bb5.i: ; preds = %bb4.i
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- br label %_ZN12btStackAlloc7destroyEv.exit
-
-_ZN12btStackAlloc7destroyEv.exit: ; preds = %bb5.i, %bb4.i, %bb.i
- %13 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 0 ; [#uses=1]
- store i8* null, i8** %13, align 4
- store i32 0, i32* %5, align 4
- %.pre = load %struct.btStackAlloc** %3, align 4 ; [#uses=6]
- %.phi.trans.insert = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 2 ; [#uses=1]
- %.pre12 = load i32* %.phi.trans.insert, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 2 ; [#uses=1]
- %15 = icmp eq i32 %.pre12, 0 ; [#uses=1]
- br i1 %15, label %bb.i.i, label %_ZN12btStackAllocD1Ev.exit
-
-bb.i.i: ; preds = %_ZN12btStackAlloc7destroyEv.exit
- %16 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 4 ; [#uses=1]
- %17 = load i8* %16, align 4 ; [#uses=1]
- %toBoolnot.i.i = icmp eq i8 %17, 0 ; [#uses=1]
- br i1 %toBoolnot.i.i, label %bb4.i.i, label %bb6.i.i
-
-bb4.i.i: ; preds = %bb.i.i
- %18 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 0 ; [#uses=1]
- %19 = load i8** %18, align 4 ; [#uses=2]
- %20 = icmp eq i8* %19, null ; [#uses=1]
- br i1 %20, label %bb6.i.i, label %bb5.i.i
-
-bb5.i.i: ; preds = %bb4.i.i
- tail call void @_Z21btAlignedFreeInternalPv(i8* %19)
- br label %bb6.i.i
-
-bb6.i.i: ; preds = %bb5.i.i, %bb4.i.i, %bb.i.i
- %21 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 0 ; [#uses=1]
- store i8* null, i8** %21, align 4
- store i32 0, i32* %14, align 4
- %.pre13 = load %struct.btStackAlloc** %3, align 4 ; [#uses=1]
- br label %_ZN12btStackAllocD1Ev.exit
-
-_ZN12btStackAllocD1Ev.exit: ; preds = %bb6.i.i, %_ZN12btStackAlloc7destroyEv.exit, %bb
- %22 = phi %struct.btStackAlloc* [ %.pre, %_ZN12btStackAlloc7destroyEv.exit ], [ %.pre13, %bb6.i.i ], [ %4, %bb ] ; [#uses=1]
- %23 = bitcast %struct.btStackAlloc* %22 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb1
-
-bb1: ; preds = %_ZN12btStackAllocD1Ev.exit, %entry
- %24 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 7 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool2 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool2, label %bb4, label %bb3
-
-bb3: ; preds = %bb1
- %26 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 6 ; [#uses=2]
- %27 = load %struct.btPoolAllocator** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btPoolAllocator* %27, i32 0, i32 4 ; [#uses=1]
- %29 = load i8** %28, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %29)
- %30 = load %struct.btPoolAllocator** %26, align 4 ; [#uses=1]
- %31 = bitcast %struct.btPoolAllocator* %30 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %31)
- br label %bb4
-
-bb4: ; preds = %bb3, %bb1
- %32 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 5 ; [#uses=1]
- %33 = load i8* %32, align 4 ; [#uses=1]
- %toBool5 = icmp eq i8 %33, 0 ; [#uses=1]
- br i1 %toBool5, label %bb7, label %bb6
-
-bb6: ; preds = %bb4
- %34 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 4 ; [#uses=2]
- %35 = load %struct.btPoolAllocator** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btPoolAllocator* %35, i32 0, i32 4 ; [#uses=1]
- %37 = load i8** %36, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %37)
- %38 = load %struct.btPoolAllocator** %34, align 4 ; [#uses=1]
- %39 = bitcast %struct.btPoolAllocator* %38 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %39)
- br label %bb7
-
-bb7: ; preds = %bb6, %bb4
- %40 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 10 ; [#uses=2]
- %41 = load %struct.btCollisionAlgorithmCreateFunc** %40, align 4 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %41, i32 0, i32 0 ; [#uses=1]
- %43 = load i32 (...)*** %42, align 4 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = bitcast i32 (...)* %44 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %45(%struct.btCollisionAlgorithmCreateFunc* %41)
- %46 = load %struct.btCollisionAlgorithmCreateFunc** %40, align 4 ; [#uses=1]
- %47 = bitcast %struct.btCollisionAlgorithmCreateFunc* %46 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %47)
- %48 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 11 ; [#uses=2]
- %49 = load %struct.btCollisionAlgorithmCreateFunc** %48, align 4 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %49, i32 0, i32 0 ; [#uses=1]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = load i32 (...)** %51, align 4 ; [#uses=1]
- %53 = bitcast i32 (...)* %52 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %53(%struct.btCollisionAlgorithmCreateFunc* %49)
- %54 = load %struct.btCollisionAlgorithmCreateFunc** %48, align 4 ; [#uses=1]
- %55 = bitcast %struct.btCollisionAlgorithmCreateFunc* %54 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %55)
- %56 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 12 ; [#uses=2]
- %57 = load %struct.btCollisionAlgorithmCreateFunc** %56, align 4 ; [#uses=2]
- %58 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %57, i32 0, i32 0 ; [#uses=1]
- %59 = load i32 (...)*** %58, align 4 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %61(%struct.btCollisionAlgorithmCreateFunc* %57)
- %62 = load %struct.btCollisionAlgorithmCreateFunc** %56, align 4 ; [#uses=1]
- %63 = bitcast %struct.btCollisionAlgorithmCreateFunc* %62 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %63)
- %64 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 13 ; [#uses=2]
- %65 = load %struct.btCollisionAlgorithmCreateFunc** %64, align 4 ; [#uses=2]
- %66 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %65, i32 0, i32 0 ; [#uses=1]
- %67 = load i32 (...)*** %66, align 4 ; [#uses=1]
- %68 = load i32 (...)** %67, align 4 ; [#uses=1]
- %69 = bitcast i32 (...)* %68 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %69(%struct.btCollisionAlgorithmCreateFunc* %65)
- %70 = load %struct.btCollisionAlgorithmCreateFunc** %64, align 4 ; [#uses=1]
- %71 = bitcast %struct.btCollisionAlgorithmCreateFunc* %70 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %71)
- %72 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 14 ; [#uses=2]
- %73 = load %struct.btCollisionAlgorithmCreateFunc** %72, align 4 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %73, i32 0, i32 0 ; [#uses=1]
- %75 = load i32 (...)*** %74, align 4 ; [#uses=1]
- %76 = load i32 (...)** %75, align 4 ; [#uses=1]
- %77 = bitcast i32 (...)* %76 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %77(%struct.btCollisionAlgorithmCreateFunc* %73)
- %78 = load %struct.btCollisionAlgorithmCreateFunc** %72, align 4 ; [#uses=1]
- %79 = bitcast %struct.btCollisionAlgorithmCreateFunc* %78 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %79)
- %80 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 15 ; [#uses=2]
- %81 = load %struct.btCollisionAlgorithmCreateFunc** %80, align 4 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %81, i32 0, i32 0 ; [#uses=1]
- %83 = load i32 (...)*** %82, align 4 ; [#uses=1]
- %84 = load i32 (...)** %83, align 4 ; [#uses=1]
- %85 = bitcast i32 (...)* %84 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %85(%struct.btCollisionAlgorithmCreateFunc* %81)
- %86 = load %struct.btCollisionAlgorithmCreateFunc** %80, align 4 ; [#uses=1]
- %87 = bitcast %struct.btCollisionAlgorithmCreateFunc* %86 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %87)
- %88 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 16 ; [#uses=2]
- %89 = load %struct.btCollisionAlgorithmCreateFunc** %88, align 4 ; [#uses=2]
- %90 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %89, i32 0, i32 0 ; [#uses=1]
- %91 = load i32 (...)*** %90, align 4 ; [#uses=1]
- %92 = load i32 (...)** %91, align 4 ; [#uses=1]
- %93 = bitcast i32 (...)* %92 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %93(%struct.btCollisionAlgorithmCreateFunc* %89)
- %94 = load %struct.btCollisionAlgorithmCreateFunc** %88, align 4 ; [#uses=1]
- %95 = bitcast %struct.btCollisionAlgorithmCreateFunc* %94 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %95)
- %96 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 18 ; [#uses=2]
- %97 = load %struct.btCollisionAlgorithmCreateFunc** %96, align 4 ; [#uses=2]
- %98 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %97, i32 0, i32 0 ; [#uses=1]
- %99 = load i32 (...)*** %98, align 4 ; [#uses=1]
- %100 = load i32 (...)** %99, align 4 ; [#uses=1]
- %101 = bitcast i32 (...)* %100 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %101(%struct.btCollisionAlgorithmCreateFunc* %97)
- %102 = load %struct.btCollisionAlgorithmCreateFunc** %96, align 4 ; [#uses=1]
- %103 = bitcast %struct.btCollisionAlgorithmCreateFunc* %102 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %103)
- %104 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 19 ; [#uses=2]
- %105 = load %struct.btCollisionAlgorithmCreateFunc** %104, align 4 ; [#uses=2]
- %106 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %105, i32 0, i32 0 ; [#uses=1]
- %107 = load i32 (...)*** %106, align 4 ; [#uses=1]
- %108 = load i32 (...)** %107, align 4 ; [#uses=1]
- %109 = bitcast i32 (...)* %108 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %109(%struct.btCollisionAlgorithmCreateFunc* %105)
- %110 = load %struct.btCollisionAlgorithmCreateFunc** %104, align 4 ; [#uses=1]
- %111 = bitcast %struct.btCollisionAlgorithmCreateFunc* %110 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %111)
- %112 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 17 ; [#uses=2]
- %113 = load %struct.btCollisionAlgorithmCreateFunc** %112, align 4 ; [#uses=2]
- %114 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %113, i32 0, i32 0 ; [#uses=1]
- %115 = load i32 (...)*** %114, align 4 ; [#uses=1]
- %116 = load i32 (...)** %115, align 4 ; [#uses=1]
- %117 = bitcast i32 (...)* %116 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %117(%struct.btCollisionAlgorithmCreateFunc* %113)
- %118 = load %struct.btCollisionAlgorithmCreateFunc** %112, align 4 ; [#uses=1]
- %119 = bitcast %struct.btCollisionAlgorithmCreateFunc* %118 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %119)
- %120 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 21 ; [#uses=2]
- %121 = load %struct.btCollisionAlgorithmCreateFunc** %120, align 4 ; [#uses=2]
- %122 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %121, i32 0, i32 0 ; [#uses=1]
- %123 = load i32 (...)*** %122, align 4 ; [#uses=1]
- %124 = load i32 (...)** %123, align 4 ; [#uses=1]
- %125 = bitcast i32 (...)* %124 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %125(%struct.btCollisionAlgorithmCreateFunc* %121)
- %126 = load %struct.btCollisionAlgorithmCreateFunc** %120, align 4 ; [#uses=1]
- %127 = bitcast %struct.btCollisionAlgorithmCreateFunc* %126 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %127)
- %128 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 20 ; [#uses=2]
- %129 = load %struct.btCollisionAlgorithmCreateFunc** %128, align 4 ; [#uses=2]
- %130 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %129, i32 0, i32 0 ; [#uses=1]
- %131 = load i32 (...)*** %130, align 4 ; [#uses=1]
- %132 = load i32 (...)** %131, align 4 ; [#uses=1]
- %133 = bitcast i32 (...)* %132 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %133(%struct.btCollisionAlgorithmCreateFunc* %129)
- %134 = load %struct.btCollisionAlgorithmCreateFunc** %128, align 4 ; [#uses=1]
- %135 = bitcast %struct.btCollisionAlgorithmCreateFunc* %134 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %135)
- %136 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 8 ; [#uses=1]
- %137 = load %struct.btVoronoiSimplexSolver** %136, align 4 ; [#uses=1]
- %138 = bitcast %struct.btVoronoiSimplexSolver* %137 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %138)
- %139 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 9 ; [#uses=2]
- %140 = load %struct.btActionInterface** %139, align 4 ; [#uses=2]
- %141 = getelementptr inbounds %struct.btActionInterface* %140, i32 0, i32 0 ; [#uses=1]
- %142 = load i32 (...)*** %141, align 4 ; [#uses=1]
- %143 = load i32 (...)** %142, align 4 ; [#uses=1]
- %144 = bitcast i32 (...)* %143 to void (%struct.btActionInterface*)* ; [#uses=1]
- tail call void %144(%struct.btActionInterface* %140)
- %145 = load %struct.btActionInterface** %139, align 4 ; [#uses=1]
- %146 = bitcast %struct.btActionInterface* %145 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %146)
- %147 = bitcast %struct.btDefaultCollisionConfiguration* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %147) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btDefaultCollisionConfigurationD1Ev(%struct.btDefaultCollisionConfiguration* %this) align 2 {
-entry:
- tail call void @_ZN31btDefaultCollisionConfigurationD2Ev(%struct.btDefaultCollisionConfiguration* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btDefaultCollisionConfigurationD2Ev(%struct.btDefaultCollisionConfiguration* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV31btDefaultCollisionConfiguration, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 3 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 2 ; [#uses=3]
- %4 = load %struct.btStackAlloc** %3, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 2 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb.i, label %_ZN12btStackAllocD1Ev.exit
-
-bb.i: ; preds = %bb
- %8 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 4 ; [#uses=1]
- %9 = load i8* %8, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %bb4.i, label %_ZN12btStackAlloc7destroyEv.exit
-
-bb4.i: ; preds = %bb.i
- %10 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 0 ; [#uses=1]
- %11 = load i8** %10, align 4 ; [#uses=2]
- %12 = icmp eq i8* %11, null ; [#uses=1]
- br i1 %12, label %_ZN12btStackAlloc7destroyEv.exit, label %bb5.i
-
-bb5.i: ; preds = %bb4.i
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- br label %_ZN12btStackAlloc7destroyEv.exit
-
-_ZN12btStackAlloc7destroyEv.exit: ; preds = %bb5.i, %bb4.i, %bb.i
- %13 = getelementptr inbounds %struct.btStackAlloc* %4, i32 0, i32 0 ; [#uses=1]
- store i8* null, i8** %13, align 4
- store i32 0, i32* %5, align 4
- %.pre = load %struct.btStackAlloc** %3, align 4 ; [#uses=6]
- %.phi.trans.insert = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 2 ; [#uses=1]
- %.pre12 = load i32* %.phi.trans.insert, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 2 ; [#uses=1]
- %15 = icmp eq i32 %.pre12, 0 ; [#uses=1]
- br i1 %15, label %bb.i.i, label %_ZN12btStackAllocD1Ev.exit
-
-bb.i.i: ; preds = %_ZN12btStackAlloc7destroyEv.exit
- %16 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 4 ; [#uses=1]
- %17 = load i8* %16, align 4 ; [#uses=1]
- %toBoolnot.i.i = icmp eq i8 %17, 0 ; [#uses=1]
- br i1 %toBoolnot.i.i, label %bb4.i.i, label %bb6.i.i
-
-bb4.i.i: ; preds = %bb.i.i
- %18 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 0 ; [#uses=1]
- %19 = load i8** %18, align 4 ; [#uses=2]
- %20 = icmp eq i8* %19, null ; [#uses=1]
- br i1 %20, label %bb6.i.i, label %bb5.i.i
-
-bb5.i.i: ; preds = %bb4.i.i
- tail call void @_Z21btAlignedFreeInternalPv(i8* %19)
- br label %bb6.i.i
-
-bb6.i.i: ; preds = %bb5.i.i, %bb4.i.i, %bb.i.i
- %21 = getelementptr inbounds %struct.btStackAlloc* %.pre, i32 0, i32 0 ; [#uses=1]
- store i8* null, i8** %21, align 4
- store i32 0, i32* %14, align 4
- %.pre13 = load %struct.btStackAlloc** %3, align 4 ; [#uses=1]
- br label %_ZN12btStackAllocD1Ev.exit
-
-_ZN12btStackAllocD1Ev.exit: ; preds = %bb6.i.i, %_ZN12btStackAlloc7destroyEv.exit, %bb
- %22 = phi %struct.btStackAlloc* [ %.pre, %_ZN12btStackAlloc7destroyEv.exit ], [ %.pre13, %bb6.i.i ], [ %4, %bb ] ; [#uses=1]
- %23 = bitcast %struct.btStackAlloc* %22 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb1
-
-bb1: ; preds = %_ZN12btStackAllocD1Ev.exit, %entry
- %24 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 7 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool2 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool2, label %bb4, label %bb3
-
-bb3: ; preds = %bb1
- %26 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 6 ; [#uses=2]
- %27 = load %struct.btPoolAllocator** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btPoolAllocator* %27, i32 0, i32 4 ; [#uses=1]
- %29 = load i8** %28, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %29)
- %30 = load %struct.btPoolAllocator** %26, align 4 ; [#uses=1]
- %31 = bitcast %struct.btPoolAllocator* %30 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %31)
- br label %bb4
-
-bb4: ; preds = %bb3, %bb1
- %32 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 5 ; [#uses=1]
- %33 = load i8* %32, align 4 ; [#uses=1]
- %toBool5 = icmp eq i8 %33, 0 ; [#uses=1]
- br i1 %toBool5, label %bb7, label %bb6
-
-bb6: ; preds = %bb4
- %34 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 4 ; [#uses=2]
- %35 = load %struct.btPoolAllocator** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btPoolAllocator* %35, i32 0, i32 4 ; [#uses=1]
- %37 = load i8** %36, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %37)
- %38 = load %struct.btPoolAllocator** %34, align 4 ; [#uses=1]
- %39 = bitcast %struct.btPoolAllocator* %38 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %39)
- br label %bb7
-
-bb7: ; preds = %bb6, %bb4
- %40 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 10 ; [#uses=2]
- %41 = load %struct.btCollisionAlgorithmCreateFunc** %40, align 4 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %41, i32 0, i32 0 ; [#uses=1]
- %43 = load i32 (...)*** %42, align 4 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = bitcast i32 (...)* %44 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %45(%struct.btCollisionAlgorithmCreateFunc* %41)
- %46 = load %struct.btCollisionAlgorithmCreateFunc** %40, align 4 ; [#uses=1]
- %47 = bitcast %struct.btCollisionAlgorithmCreateFunc* %46 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %47)
- %48 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 11 ; [#uses=2]
- %49 = load %struct.btCollisionAlgorithmCreateFunc** %48, align 4 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %49, i32 0, i32 0 ; [#uses=1]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = load i32 (...)** %51, align 4 ; [#uses=1]
- %53 = bitcast i32 (...)* %52 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %53(%struct.btCollisionAlgorithmCreateFunc* %49)
- %54 = load %struct.btCollisionAlgorithmCreateFunc** %48, align 4 ; [#uses=1]
- %55 = bitcast %struct.btCollisionAlgorithmCreateFunc* %54 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %55)
- %56 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 12 ; [#uses=2]
- %57 = load %struct.btCollisionAlgorithmCreateFunc** %56, align 4 ; [#uses=2]
- %58 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %57, i32 0, i32 0 ; [#uses=1]
- %59 = load i32 (...)*** %58, align 4 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %61(%struct.btCollisionAlgorithmCreateFunc* %57)
- %62 = load %struct.btCollisionAlgorithmCreateFunc** %56, align 4 ; [#uses=1]
- %63 = bitcast %struct.btCollisionAlgorithmCreateFunc* %62 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %63)
- %64 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 13 ; [#uses=2]
- %65 = load %struct.btCollisionAlgorithmCreateFunc** %64, align 4 ; [#uses=2]
- %66 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %65, i32 0, i32 0 ; [#uses=1]
- %67 = load i32 (...)*** %66, align 4 ; [#uses=1]
- %68 = load i32 (...)** %67, align 4 ; [#uses=1]
- %69 = bitcast i32 (...)* %68 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %69(%struct.btCollisionAlgorithmCreateFunc* %65)
- %70 = load %struct.btCollisionAlgorithmCreateFunc** %64, align 4 ; [#uses=1]
- %71 = bitcast %struct.btCollisionAlgorithmCreateFunc* %70 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %71)
- %72 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 14 ; [#uses=2]
- %73 = load %struct.btCollisionAlgorithmCreateFunc** %72, align 4 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %73, i32 0, i32 0 ; [#uses=1]
- %75 = load i32 (...)*** %74, align 4 ; [#uses=1]
- %76 = load i32 (...)** %75, align 4 ; [#uses=1]
- %77 = bitcast i32 (...)* %76 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %77(%struct.btCollisionAlgorithmCreateFunc* %73)
- %78 = load %struct.btCollisionAlgorithmCreateFunc** %72, align 4 ; [#uses=1]
- %79 = bitcast %struct.btCollisionAlgorithmCreateFunc* %78 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %79)
- %80 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 15 ; [#uses=2]
- %81 = load %struct.btCollisionAlgorithmCreateFunc** %80, align 4 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %81, i32 0, i32 0 ; [#uses=1]
- %83 = load i32 (...)*** %82, align 4 ; [#uses=1]
- %84 = load i32 (...)** %83, align 4 ; [#uses=1]
- %85 = bitcast i32 (...)* %84 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %85(%struct.btCollisionAlgorithmCreateFunc* %81)
- %86 = load %struct.btCollisionAlgorithmCreateFunc** %80, align 4 ; [#uses=1]
- %87 = bitcast %struct.btCollisionAlgorithmCreateFunc* %86 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %87)
- %88 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 16 ; [#uses=2]
- %89 = load %struct.btCollisionAlgorithmCreateFunc** %88, align 4 ; [#uses=2]
- %90 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %89, i32 0, i32 0 ; [#uses=1]
- %91 = load i32 (...)*** %90, align 4 ; [#uses=1]
- %92 = load i32 (...)** %91, align 4 ; [#uses=1]
- %93 = bitcast i32 (...)* %92 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %93(%struct.btCollisionAlgorithmCreateFunc* %89)
- %94 = load %struct.btCollisionAlgorithmCreateFunc** %88, align 4 ; [#uses=1]
- %95 = bitcast %struct.btCollisionAlgorithmCreateFunc* %94 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %95)
- %96 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 18 ; [#uses=2]
- %97 = load %struct.btCollisionAlgorithmCreateFunc** %96, align 4 ; [#uses=2]
- %98 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %97, i32 0, i32 0 ; [#uses=1]
- %99 = load i32 (...)*** %98, align 4 ; [#uses=1]
- %100 = load i32 (...)** %99, align 4 ; [#uses=1]
- %101 = bitcast i32 (...)* %100 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %101(%struct.btCollisionAlgorithmCreateFunc* %97)
- %102 = load %struct.btCollisionAlgorithmCreateFunc** %96, align 4 ; [#uses=1]
- %103 = bitcast %struct.btCollisionAlgorithmCreateFunc* %102 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %103)
- %104 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 19 ; [#uses=2]
- %105 = load %struct.btCollisionAlgorithmCreateFunc** %104, align 4 ; [#uses=2]
- %106 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %105, i32 0, i32 0 ; [#uses=1]
- %107 = load i32 (...)*** %106, align 4 ; [#uses=1]
- %108 = load i32 (...)** %107, align 4 ; [#uses=1]
- %109 = bitcast i32 (...)* %108 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %109(%struct.btCollisionAlgorithmCreateFunc* %105)
- %110 = load %struct.btCollisionAlgorithmCreateFunc** %104, align 4 ; [#uses=1]
- %111 = bitcast %struct.btCollisionAlgorithmCreateFunc* %110 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %111)
- %112 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 17 ; [#uses=2]
- %113 = load %struct.btCollisionAlgorithmCreateFunc** %112, align 4 ; [#uses=2]
- %114 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %113, i32 0, i32 0 ; [#uses=1]
- %115 = load i32 (...)*** %114, align 4 ; [#uses=1]
- %116 = load i32 (...)** %115, align 4 ; [#uses=1]
- %117 = bitcast i32 (...)* %116 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %117(%struct.btCollisionAlgorithmCreateFunc* %113)
- %118 = load %struct.btCollisionAlgorithmCreateFunc** %112, align 4 ; [#uses=1]
- %119 = bitcast %struct.btCollisionAlgorithmCreateFunc* %118 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %119)
- %120 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 21 ; [#uses=2]
- %121 = load %struct.btCollisionAlgorithmCreateFunc** %120, align 4 ; [#uses=2]
- %122 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %121, i32 0, i32 0 ; [#uses=1]
- %123 = load i32 (...)*** %122, align 4 ; [#uses=1]
- %124 = load i32 (...)** %123, align 4 ; [#uses=1]
- %125 = bitcast i32 (...)* %124 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %125(%struct.btCollisionAlgorithmCreateFunc* %121)
- %126 = load %struct.btCollisionAlgorithmCreateFunc** %120, align 4 ; [#uses=1]
- %127 = bitcast %struct.btCollisionAlgorithmCreateFunc* %126 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %127)
- %128 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 20 ; [#uses=2]
- %129 = load %struct.btCollisionAlgorithmCreateFunc** %128, align 4 ; [#uses=2]
- %130 = getelementptr inbounds %struct.btCollisionAlgorithmCreateFunc* %129, i32 0, i32 0 ; [#uses=1]
- %131 = load i32 (...)*** %130, align 4 ; [#uses=1]
- %132 = load i32 (...)** %131, align 4 ; [#uses=1]
- %133 = bitcast i32 (...)* %132 to void (%struct.btCollisionAlgorithmCreateFunc*)* ; [#uses=1]
- tail call void %133(%struct.btCollisionAlgorithmCreateFunc* %129)
- %134 = load %struct.btCollisionAlgorithmCreateFunc** %128, align 4 ; [#uses=1]
- %135 = bitcast %struct.btCollisionAlgorithmCreateFunc* %134 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %135)
- %136 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 8 ; [#uses=1]
- %137 = load %struct.btVoronoiSimplexSolver** %136, align 4 ; [#uses=1]
- %138 = bitcast %struct.btVoronoiSimplexSolver* %137 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %138)
- %139 = getelementptr inbounds %struct.btDefaultCollisionConfiguration* %this, i32 0, i32 9 ; [#uses=2]
- %140 = load %struct.btActionInterface** %139, align 4 ; [#uses=2]
- %141 = getelementptr inbounds %struct.btActionInterface* %140, i32 0, i32 0 ; [#uses=1]
- %142 = load i32 (...)*** %141, align 4 ; [#uses=1]
- %143 = load i32 (...)** %142, align 4 ; [#uses=1]
- %144 = bitcast i32 (...)* %143 to void (%struct.btActionInterface*)* ; [#uses=1]
- tail call void %144(%struct.btActionInterface* %140)
- %145 = load %struct.btActionInterface** %139, align 4 ; [#uses=1]
- %146 = bitcast %struct.btActionInterface* %145 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %146)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN31btDefaultCollisionConfigurationC1ERK34btDefaultCollisionConstructionInfo(%struct.btDefaultCollisionConfiguration* %this, %struct.btDefaultCollisionConstructionInfo* nocapture %constructionInfo) align 2 {
-entry:
- tail call void @_ZN31btDefaultCollisionConfigurationC2ERK34btDefaultCollisionConstructionInfo(%struct.btDefaultCollisionConfiguration* %this, %struct.btDefaultCollisionConstructionInfo* %constructionInfo)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btEmptyAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btActivatingCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btEmptyAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btEmptyAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btActivatingCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btEmptyAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btActivatingCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %unnamed_arg, %struct.btCollisionObject* nocapture %unnamed_arg2, %struct.btDispatcherInfo* nocapture %unnamed_arg4, %struct.btManifoldResult* nocapture %unnamed_arg6) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define float @_ZN16btEmptyAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btActivatingCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %unnamed_arg, %struct.btCollisionObject* nocapture %unnamed_arg2, %struct.btDispatcherInfo* nocapture %unnamed_arg4, %struct.btManifoldResult* nocapture %unnamed_arg6) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btEmptyAlgorithmD0Ev(%struct.btActivatingCollisionAlgorithm* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btEmptyAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActivatingCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btEmptyAlgorithmD1Ev(%struct.btActivatingCollisionAlgorithm* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btEmptyAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btEmptyAlgorithmC1ERK36btCollisionAlgorithmConstructionInfo(%struct.btActivatingCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfo(%struct.btCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci)
- %1 = getelementptr inbounds %struct.btActivatingCollisionAlgorithm* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btEmptyAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN13btGhostObjectC2Ev(%struct.btGhostObject* %this) align 2 {
-invcont:
- %0 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectC2Ev(%struct.btCollisionObject* %0)
- %1 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %3, align 4
- %4 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0, i32 19 ; [#uses=1]
- store i32 4, i32* %6, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_Z9btRayAabbRK9btVector3S1_S1_S1_RfRS_(%struct.btQuadWord* nocapture %rayFrom, %struct.btQuadWord* nocapture %rayTo, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax, float* nocapture %param, %struct.btQuadWord* nocapture %normal) nounwind inlinehint {
-entry:
- %aabbHalfExtent = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %source = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %r = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %hitNormal = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = fmul float %4, 5.000000e-01 ; [#uses=6]
- %16 = fmul float %9, 5.000000e-01 ; [#uses=6]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=6]
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbHalfExtent, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 8
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbHalfExtent, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %aabbHalfExtent, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %20, align 8
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbHalfExtent, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = fadd float %1, %3 ; [#uses=1]
- %23 = fadd float %6, %8 ; [#uses=1]
- %24 = fadd float %11, %13 ; [#uses=1]
- %25 = fmul float %22, 5.000000e-01 ; [#uses=2]
- %26 = fmul float %23, 5.000000e-01 ; [#uses=2]
- %27 = fmul float %24, 5.000000e-01 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btQuadWord* %rayFrom, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fsub float %29, %25 ; [#uses=6]
- %31 = getelementptr inbounds %struct.btQuadWord* %rayFrom, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fsub float %32, %26 ; [#uses=6]
- %34 = getelementptr inbounds %struct.btQuadWord* %rayFrom, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fsub float %35, %27 ; [#uses=6]
- %37 = getelementptr inbounds %struct.btQuadWord* %source, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %36, float* %37, align 8
- %38 = getelementptr inbounds %struct.btQuadWord* %source, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %33, float* %38, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %source, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %30, float* %39, align 8
- %40 = getelementptr inbounds %struct.btQuadWord* %source, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %rayTo, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fsub float %42, %25 ; [#uses=3]
- %44 = getelementptr inbounds %struct.btQuadWord* %rayTo, i32 0, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fsub float %45, %26 ; [#uses=3]
- %47 = getelementptr inbounds %struct.btQuadWord* %rayTo, i32 0, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fsub float %48, %27 ; [#uses=3]
- %50 = fsub float -0.000000e+00, %17 ; [#uses=2]
- %51 = fcmp olt float %36, %50 ; [#uses=1]
- %iftmp.187.0.i18 = zext i1 %51 to i32 ; [#uses=1]
- %52 = fcmp ogt float %36, %17 ; [#uses=1]
- %iftmp.188.0.i19 = select i1 %52, i32 8, i32 0 ; [#uses=1]
- %53 = fsub float -0.000000e+00, %16 ; [#uses=2]
- %54 = fcmp olt float %33, %53 ; [#uses=1]
- %iftmp.189.0.i20 = select i1 %54, i32 2, i32 0 ; [#uses=1]
- %55 = fcmp ogt float %33, %16 ; [#uses=1]
- %iftmp.190.0.i21 = select i1 %55, i32 16, i32 0 ; [#uses=1]
- %56 = fsub float -0.000000e+00, %15 ; [#uses=2]
- %57 = fcmp olt float %30, %56 ; [#uses=1]
- %iftmp.191.0.i22 = select i1 %57, i32 4, i32 0 ; [#uses=1]
- %58 = fcmp ogt float %30, %15 ; [#uses=1]
- %iftmp.192.0.i23 = select i1 %58, i32 32, i32 0 ; [#uses=1]
- %59 = or i32 %iftmp.187.0.i18, %iftmp.188.0.i19 ; [#uses=1]
- %60 = or i32 %59, %iftmp.190.0.i21 ; [#uses=1]
- %61 = or i32 %60, %iftmp.189.0.i20 ; [#uses=1]
- %62 = or i32 %61, %iftmp.192.0.i23 ; [#uses=1]
- %63 = or i32 %62, %iftmp.191.0.i22 ; [#uses=4]
- %64 = fcmp olt float %49, %50 ; [#uses=1]
- %iftmp.187.0.i = zext i1 %64 to i32 ; [#uses=1]
- %65 = fcmp ogt float %49, %17 ; [#uses=1]
- %iftmp.188.0.i = select i1 %65, i32 8, i32 0 ; [#uses=1]
- %66 = fcmp olt float %46, %53 ; [#uses=1]
- %iftmp.189.0.i = select i1 %66, i32 2, i32 0 ; [#uses=1]
- %67 = fcmp ogt float %46, %16 ; [#uses=1]
- %iftmp.190.0.i = select i1 %67, i32 16, i32 0 ; [#uses=1]
- %68 = fcmp olt float %43, %56 ; [#uses=1]
- %iftmp.191.0.i = select i1 %68, i32 4, i32 0 ; [#uses=1]
- %69 = fcmp ogt float %43, %15 ; [#uses=1]
- %iftmp.192.0.i = select i1 %69, i32 32, i32 0 ; [#uses=1]
- %70 = or i32 %iftmp.187.0.i, %iftmp.188.0.i ; [#uses=1]
- %71 = or i32 %70, %iftmp.190.0.i ; [#uses=1]
- %72 = or i32 %71, %iftmp.192.0.i ; [#uses=1]
- %73 = or i32 %72, %iftmp.189.0.i ; [#uses=1]
- %74 = or i32 %73, %iftmp.191.0.i ; [#uses=4]
- %75 = and i32 %74, %63 ; [#uses=1]
- %76 = icmp eq i32 %75, 0 ; [#uses=1]
- br i1 %76, label %bb.nph49, label %bb15
-
-bb.nph: ; preds = %bb.nph49, %bb10
- %lambda_exit.344 = phi float [ %105, %bb.nph49 ], [ %lambda_exit.1.2, %bb10 ] ; [#uses=5]
- %lambda_enter.245 = phi float [ 0.000000e+00, %bb.nph49 ], [ %lambda_enter.0.2, %bb10 ] ; [#uses=5]
- %normSign.046 = phi float [ 1.000000e+00, %bb.nph49 ], [ -1.000000e+00, %bb10 ] ; [#uses=12]
- %bit.147 = phi i32 [ 1, %bb.nph49 ], [ %103, %bb10 ] ; [#uses=5]
- %j.048 = phi i32 [ 0, %bb.nph49 ], [ %104, %bb10 ] ; [#uses=1]
- %77 = phi float [ 0.000000e+00, %bb.nph49 ], [ %102, %bb10 ] ; [#uses=4]
- %78 = phi float [ 0.000000e+00, %bb.nph49 ], [ %101, %bb10 ] ; [#uses=4]
- %79 = phi float [ 0.000000e+00, %bb.nph49 ], [ %100, %bb10 ] ; [#uses=4]
- %80 = and i32 %bit.147, %63 ; [#uses=1]
- %81 = icmp eq i32 %80, 0 ; [#uses=1]
- br i1 %81, label %bb5, label %bb3
-
-bb3: ; preds = %bb.nph
- %82 = fsub float -0.000000e+00, %36 ; [#uses=1]
- %83 = fmul float %17, %normSign.046 ; [#uses=1]
- %84 = fsub float %82, %83 ; [#uses=1]
- %85 = fdiv float %84, %108 ; [#uses=2]
- %86 = fcmp ugt float %lambda_enter.245, %85 ; [#uses=1]
- br i1 %86, label %bb8, label %bb4
-
-bb4: ; preds = %bb3
- store float 0.000000e+00, float* %114, align 4
- store float 0.000000e+00, float* %115, align 8
- store float 0.000000e+00, float* %116, align 4
- store float %normSign.046, float* %113, align 8
- br label %bb8
-
-bb5: ; preds = %bb.nph
- %87 = and i32 %bit.147, %74 ; [#uses=1]
- %88 = icmp eq i32 %87, 0 ; [#uses=1]
- br i1 %88, label %bb8, label %bb6
-
-bb6: ; preds = %bb5
- %89 = fsub float -0.000000e+00, %36 ; [#uses=1]
- %90 = fmul float %17, %normSign.046 ; [#uses=1]
- %91 = fsub float %89, %90 ; [#uses=1]
- %92 = fdiv float %91, %108 ; [#uses=2]
- %93 = fcmp olt float %92, %lambda_exit.344 ; [#uses=1]
- br i1 %93, label %bb8, label %return.i
-
-return.i: ; preds = %bb6
- br label %bb8
-
-bb8: ; preds = %return.i, %bb6, %bb5, %bb4, %bb3
- %94 = phi float [ %79, %bb5 ], [ %79, %bb3 ], [ 0.000000e+00, %bb4 ], [ %79, %return.i ], [ %79, %bb6 ] ; [#uses=4]
- %95 = phi float [ %78, %bb5 ], [ %78, %bb3 ], [ 0.000000e+00, %bb4 ], [ %78, %return.i ], [ %78, %bb6 ] ; [#uses=4]
- %96 = phi float [ %77, %bb5 ], [ %77, %bb3 ], [ %normSign.046, %bb4 ], [ %77, %return.i ], [ %77, %bb6 ] ; [#uses=4]
- %lambda_exit.1 = phi float [ %lambda_exit.344, %bb5 ], [ %lambda_exit.344, %bb3 ], [ %lambda_exit.344, %bb4 ], [ %lambda_exit.344, %return.i ], [ %92, %bb6 ] ; [#uses=5]
- %lambda_enter.0 = phi float [ %lambda_enter.245, %bb5 ], [ %lambda_enter.245, %bb3 ], [ %85, %bb4 ], [ %lambda_enter.245, %return.i ], [ %lambda_enter.245, %bb6 ] ; [#uses=5]
- %97 = shl i32 %bit.147, 1 ; [#uses=2]
- %98 = and i32 %97, %63 ; [#uses=1]
- %99 = icmp eq i32 %98, 0 ; [#uses=1]
- br i1 %99, label %bb5.1, label %bb3.1
-
-bb10: ; preds = %return.i.2, %bb6.2, %bb5.2, %bb3.2, %bb4.2
- %100 = phi float [ %122, %bb5.2 ], [ %122, %bb3.2 ], [ %normSign.046, %bb4.2 ], [ %122, %return.i.2 ], [ %122, %bb6.2 ] ; [#uses=2]
- %101 = phi float [ %123, %bb5.2 ], [ %123, %bb3.2 ], [ 0.000000e+00, %bb4.2 ], [ %123, %return.i.2 ], [ %123, %bb6.2 ] ; [#uses=2]
- %102 = phi float [ %124, %bb5.2 ], [ %124, %bb3.2 ], [ 0.000000e+00, %bb4.2 ], [ %124, %return.i.2 ], [ %124, %bb6.2 ] ; [#uses=2]
- %lambda_exit.1.2 = phi float [ %lambda_exit.1.1, %bb5.2 ], [ %lambda_exit.1.1, %bb3.2 ], [ %lambda_exit.1.1, %bb4.2 ], [ %lambda_exit.1.1, %return.i.2 ], [ %150, %bb6.2 ] ; [#uses=2]
- %lambda_enter.0.2 = phi float [ %lambda_enter.0.1, %bb5.2 ], [ %lambda_enter.0.1, %bb3.2 ], [ %143, %bb4.2 ], [ %lambda_enter.0.1, %return.i.2 ], [ %lambda_enter.0.1, %bb6.2 ] ; [#uses=3]
- %103 = shl i32 %bit.147, 3 ; [#uses=1]
- %104 = add nsw i32 %j.048, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %104, 2 ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb.nph
-
-bb.nph49: ; preds = %entry
- %105 = load float* %param, align 4 ; [#uses=1]
- %106 = fsub float %43, %30 ; [#uses=3]
- %107 = fsub float %46, %33 ; [#uses=3]
- %108 = fsub float %49, %36 ; [#uses=3]
- %109 = getelementptr inbounds %struct.btQuadWord* %r, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %108, float* %109, align 8
- %110 = getelementptr inbounds %struct.btQuadWord* %r, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %107, float* %110, align 4
- %111 = getelementptr inbounds %struct.btQuadWord* %r, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %106, float* %111, align 8
- %112 = getelementptr inbounds %struct.btQuadWord* %r, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %112, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %hitNormal, i32 0, i32 0, i32 0 ; [#uses=4]
- store float 0.000000e+00, float* %113, align 8
- %114 = getelementptr inbounds %struct.btQuadWord* %hitNormal, i32 0, i32 0, i32 1 ; [#uses=4]
- store float 0.000000e+00, float* %114, align 4
- %115 = getelementptr inbounds %struct.btQuadWord* %hitNormal, i32 0, i32 0, i32 2 ; [#uses=4]
- store float 0.000000e+00, float* %115, align 8
- %116 = getelementptr inbounds %struct.btQuadWord* %hitNormal, i32 0, i32 0, i32 3 ; [#uses=4]
- store float 0.000000e+00, float* %116, align 4
- br label %bb.nph
-
-bb12: ; preds = %bb10
- %117 = fcmp ugt float %lambda_enter.0.2, %lambda_exit.1.2 ; [#uses=1]
- br i1 %117, label %bb15, label %bb13
-
-bb13: ; preds = %bb12
- store float %lambda_enter.0.2, float* %param, align 4
- %118 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %102, float* %118, align 4
- %119 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %101, float* %119, align 4
- %120 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %120, align 4
- %121 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %121, align 4
- ret i8 1
-
-bb15: ; preds = %bb12, %entry
- ret i8 0
-
-bb8.1: ; preds = %return.i.1, %bb6.1, %bb5.1, %bb3.1, %bb4.1
- %122 = phi float [ %94, %bb5.1 ], [ %94, %bb3.1 ], [ 0.000000e+00, %bb4.1 ], [ %94, %return.i.1 ], [ %94, %bb6.1 ] ; [#uses=4]
- %123 = phi float [ %95, %bb5.1 ], [ %95, %bb3.1 ], [ %normSign.046, %bb4.1 ], [ %95, %return.i.1 ], [ %95, %bb6.1 ] ; [#uses=4]
- %124 = phi float [ %96, %bb5.1 ], [ %96, %bb3.1 ], [ 0.000000e+00, %bb4.1 ], [ %96, %return.i.1 ], [ %96, %bb6.1 ] ; [#uses=4]
- %lambda_exit.1.1 = phi float [ %lambda_exit.1, %bb5.1 ], [ %lambda_exit.1, %bb3.1 ], [ %lambda_exit.1, %bb4.1 ], [ %lambda_exit.1, %return.i.1 ], [ %138, %bb6.1 ] ; [#uses=5]
- %lambda_enter.0.1 = phi float [ %lambda_enter.0, %bb5.1 ], [ %lambda_enter.0, %bb3.1 ], [ %131, %bb4.1 ], [ %lambda_enter.0, %return.i.1 ], [ %lambda_enter.0, %bb6.1 ] ; [#uses=5]
- %125 = shl i32 %bit.147, 2 ; [#uses=2]
- %126 = and i32 %125, %63 ; [#uses=1]
- %127 = icmp eq i32 %126, 0 ; [#uses=1]
- br i1 %127, label %bb5.2, label %bb3.2
-
-bb4.1: ; preds = %bb3.1
- store float 0.000000e+00, float* %113, align 8
- store float 0.000000e+00, float* %115, align 8
- store float 0.000000e+00, float* %116, align 4
- store float %normSign.046, float* %114, align 4
- br label %bb8.1
-
-bb3.1: ; preds = %bb8
- %128 = fsub float -0.000000e+00, %33 ; [#uses=1]
- %129 = fmul float %16, %normSign.046 ; [#uses=1]
- %130 = fsub float %128, %129 ; [#uses=1]
- %131 = fdiv float %130, %107 ; [#uses=2]
- %132 = fcmp ugt float %lambda_enter.0, %131 ; [#uses=1]
- br i1 %132, label %bb8.1, label %bb4.1
-
-bb5.1: ; preds = %bb8
- %133 = and i32 %97, %74 ; [#uses=1]
- %134 = icmp eq i32 %133, 0 ; [#uses=1]
- br i1 %134, label %bb8.1, label %bb6.1
-
-bb6.1: ; preds = %bb5.1
- %135 = fsub float -0.000000e+00, %33 ; [#uses=1]
- %136 = fmul float %16, %normSign.046 ; [#uses=1]
- %137 = fsub float %135, %136 ; [#uses=1]
- %138 = fdiv float %137, %107 ; [#uses=2]
- %139 = fcmp olt float %138, %lambda_exit.1 ; [#uses=1]
- br i1 %139, label %bb8.1, label %return.i.1
-
-return.i.1: ; preds = %bb6.1
- br label %bb8.1
-
-bb4.2: ; preds = %bb3.2
- store float 0.000000e+00, float* %113, align 8
- store float 0.000000e+00, float* %114, align 4
- store float 0.000000e+00, float* %116, align 4
- store float %normSign.046, float* %115, align 8
- br label %bb10
-
-bb3.2: ; preds = %bb8.1
- %140 = fsub float -0.000000e+00, %30 ; [#uses=1]
- %141 = fmul float %15, %normSign.046 ; [#uses=1]
- %142 = fsub float %140, %141 ; [#uses=1]
- %143 = fdiv float %142, %106 ; [#uses=2]
- %144 = fcmp ugt float %lambda_enter.0.1, %143 ; [#uses=1]
- br i1 %144, label %bb10, label %bb4.2
-
-bb5.2: ; preds = %bb8.1
- %145 = and i32 %125, %74 ; [#uses=1]
- %146 = icmp eq i32 %145, 0 ; [#uses=1]
- br i1 %146, label %bb10, label %bb6.2
-
-bb6.2: ; preds = %bb5.2
- %147 = fsub float -0.000000e+00, %30 ; [#uses=1]
- %148 = fmul float %15, %normSign.046 ; [#uses=1]
- %149 = fsub float %147, %148 ; [#uses=1]
- %150 = fdiv float %149, %106 ; [#uses=2]
- %151 = fcmp olt float %150, %lambda_exit.1.1 ; [#uses=1]
- br i1 %151, label %bb10, label %return.i.2
-
-return.i.2: ; preds = %bb6.2
- br label %bb10
-}
-
-; [#uses=1]
-define void @_ZN24btPairCachingGhostObject31removeOverlappingObjectInternalEP17btBroadphaseProxyP12btDispatcherS1_(%struct.btPairCachingGhostObject* nocapture %this, %struct.btBroadphaseProxy* %otherProxy, %struct.btActionInterface* %dispatcher, %struct.btBroadphaseProxy* %thisProxy1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %otherProxy, i32 0, i32 0 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=1]
- %2 = bitcast i8* %1 to %struct.btCollisionObject* ; [#uses=1]
- %3 = icmp eq %struct.btBroadphaseProxy* %thisProxy1, null ; [#uses=1]
- br i1 %3, label %bb, label %bb2
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0, i32 8 ; [#uses=1]
- %5 = load %struct.btBroadphaseProxy** %4, align 4 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %iftmp.204.0 = phi %struct.btBroadphaseProxy* [ %5, %bb ], [ %thisProxy1, %entry ] ; [#uses=1]
- %6 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=3]
- %7 = load i32* %6, align 4 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=2]
- br label %bb3.i
-
-bb.i: ; preds = %bb3.i
- %9 = load %struct.btCollisionObject*** %8, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionObject** %9, i32 %13 ; [#uses=1]
- %10 = load %struct.btCollisionObject** %scevgep.i, align 4 ; [#uses=1]
- %11 = icmp eq %struct.btCollisionObject* %10, %2 ; [#uses=1]
- br i1 %11, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %12 = add nsw i32 %13, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb2
- %13 = phi i32 [ 0, %bb2 ], [ %12, %bb2.i ] ; [#uses=4]
- %14 = icmp sgt i32 %7, %13 ; [#uses=1]
- br i1 %14, label %bb.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit: ; preds = %bb3.i, %bb.i
- %index.0.i = phi i32 [ %7, %bb3.i ], [ %13, %bb.i ] ; [#uses=2]
- %15 = icmp sgt i32 %7, %index.0.i ; [#uses=1]
- br i1 %15, label %bb3, label %return
-
-bb3: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- %16 = load %struct.btCollisionObject*** %8, align 4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btCollisionObject** %16, i32 %index.0.i ; [#uses=1]
- %18 = add nsw i32 %7, -1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btCollisionObject** %16, i32 %18 ; [#uses=1]
- %20 = load %struct.btCollisionObject** %19, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %20, %struct.btCollisionObject** %17, align 4
- %21 = load i32* %6, align 4 ; [#uses=1]
- %22 = add nsw i32 %21, -1 ; [#uses=1]
- store i32 %22, i32* %6, align 4
- %23 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 1 ; [#uses=1]
- %24 = load %struct.btHashedOverlappingPairCache** %23, align 4 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %24, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %26 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 3 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %28 to i8* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*, %struct.btActionInterface*)* ; [#uses=1]
- %30 = tail call i8* %29(%struct.btHashedOverlappingPairCache* %24, %struct.btBroadphaseProxy* %iftmp.204.0, %struct.btBroadphaseProxy* %otherProxy, %struct.btActionInterface* %dispatcher) ; [#uses=0]
- ret void
-
-return: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- ret void
-}
-
-; [#uses=1]
-define void @_ZN13btGhostObject31removeOverlappingObjectInternalEP17btBroadphaseProxyP12btDispatcherS1_(%struct.btGhostObject* nocapture %this, %struct.btBroadphaseProxy* nocapture %otherProxy, %struct.btActionInterface* nocapture %dispatcher, %struct.btBroadphaseProxy* nocapture %thisProxy) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %otherProxy, i32 0, i32 0 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=1]
- %2 = bitcast i8* %1 to %struct.btCollisionObject* ; [#uses=1]
- %3 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %4 = load i32* %3, align 4 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- br label %bb3.i
-
-bb.i: ; preds = %bb3.i
- %6 = load %struct.btCollisionObject*** %5, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionObject** %6, i32 %10 ; [#uses=1]
- %7 = load %struct.btCollisionObject** %scevgep.i, align 4 ; [#uses=1]
- %8 = icmp eq %struct.btCollisionObject* %7, %2 ; [#uses=1]
- br i1 %8, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %9 = add nsw i32 %10, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %entry
- %10 = phi i32 [ 0, %entry ], [ %9, %bb2.i ] ; [#uses=4]
- %11 = icmp sgt i32 %4, %10 ; [#uses=1]
- br i1 %11, label %bb.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit: ; preds = %bb3.i, %bb.i
- %index.0.i = phi i32 [ %4, %bb3.i ], [ %10, %bb.i ] ; [#uses=2]
- %12 = icmp sgt i32 %4, %index.0.i ; [#uses=1]
- br i1 %12, label %bb, label %return
-
-bb: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- %13 = load %struct.btCollisionObject*** %5, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btCollisionObject** %13, i32 %index.0.i ; [#uses=1]
- %15 = add nsw i32 %4, -1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btCollisionObject** %13, i32 %15 ; [#uses=1]
- %17 = load %struct.btCollisionObject** %16, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %17, %struct.btCollisionObject** %14, align 4
- %18 = load i32* %3, align 4 ; [#uses=1]
- %19 = add nsw i32 %18, -1 ; [#uses=1]
- store i32 %19, i32* %3, align 4
- ret void
-
-return: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK13btGhostObject7rayTestERK9btVector3S2_RN16btCollisionWorld17RayResultCallbackE(%struct.btGhostObject* nocapture %this, %struct.btQuadWord* nocapture %rayFromWorld, %struct.btQuadWord* nocapture %rayToWorld, %"struct.btCollisionWorld::RayResultCallback"* %resultCallback) align 2 {
-entry:
- %rayFromTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %rayToTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %0 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 8
- %1 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 8
- %11 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %rayFromTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %12, align 8
- %18 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %13, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %14, align 8
- %22 = getelementptr inbounds %struct.btQuadWord* %rayFromWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %15, align 4
- %24 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %24, align 8
- %25 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 8
- %27 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 8
- %29 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 8
- %31 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 8
- %33 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %34, align 8
- %35 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %rayToTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %36, align 8
- %42 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %37, align 4
- %44 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %38, align 8
- %46 = getelementptr inbounds %struct.btQuadWord* %rayToWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %39, align 4
- %48 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %49 = load i32* %48, align 4 ; [#uses=1]
- %50 = icmp sgt i32 %49, 0 ; [#uses=1]
- br i1 %50, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %51 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %52 = getelementptr inbounds %"struct.btCollisionWorld::RayResultCallback"* %resultCallback, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.06 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=2]
- %tmp = add i32 %i.06, 1 ; [#uses=2]
- %53 = load %struct.btCollisionObject*** %51, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %53, i32 %i.06 ; [#uses=1]
- %54 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=4]
- %55 = load i32 (...)*** %52, align 4 ; [#uses=1]
- %56 = getelementptr inbounds i32 (...)** %55, i32 2 ; [#uses=1]
- %57 = load i32 (...)** %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btCollisionObject* %54, i32 0, i32 8 ; [#uses=1]
- %59 = load %struct.btBroadphaseProxy** %58, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %57 to i8 (%"struct.btCollisionWorld::RayResultCallback"*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %61 = call zeroext i8 %60(%"struct.btCollisionWorld::RayResultCallback"* %resultCallback, %struct.btBroadphaseProxy* %59) ; [#uses=1]
- %toBool = icmp eq i8 %61, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %62 = getelementptr inbounds %struct.btCollisionObject* %54, i32 0, i32 1 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btCollisionObject* %54, i32 0, i32 9 ; [#uses=1]
- %64 = load %struct.btCollisionShape** %63, align 4 ; [#uses=1]
- call void @_ZN16btCollisionWorld13rayTestSingleERK11btTransformS2_P17btCollisionObjectPK16btCollisionShapeS2_RNS_17RayResultCallbackE(%struct.btTransform* %rayFromTrans, %struct.btTransform* %rayToTrans, %struct.btCollisionObject* %54, %struct.btCollisionShape* %64, %struct.btTransform* %62, %"struct.btCollisionWorld::RayResultCallback"* %resultCallback)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %65 = load i32* %48, align 4 ; [#uses=1]
- %66 = icmp sgt i32 %65, %tmp ; [#uses=1]
- br i1 %66, label %bb, label %return
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=3]
-define void @_ZNK13btGhostObject15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RN16btCollisionWorld20ConvexResultCallbackEf(%struct.btGhostObject* nocapture %this, %struct.btConvexShape* %castShape, %struct.btTransform* nocapture %convexFromWorld, %struct.btTransform* nocapture %convexToWorld, %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, float %allowedCcdPenetration) align 2 {
-entry:
- %axis.i = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %angle.i = alloca float, align 4 ; [#uses=2]
- %0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %convexFromTrans = alloca %struct.btTransform, align 8 ; [#uses=19]
- %convexToTrans = alloca %struct.btTransform, align 8 ; [#uses=18]
- %castShapeAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %castShapeAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %linVel = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %angVel = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %R = alloca %struct.btTransform, align 8 ; [#uses=17]
- %collisionObjectAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %collisionObjectAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %hitLambda = alloca float, align 4 ; [#uses=2]
- %hitNormal = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 8
- %4 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 8
- %10 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 8
- %16 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 8
- %22 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 8
- %28 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 8
- %34 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- store float %39, float* %37, align 8
- %40 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=2]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- store float %45, float* %43, align 8
- %46 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 8
- %52 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 8
- %58 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 8
- %64 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 8
- %70 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 8
- %76 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 8
- %82 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=2]
- store float %87, float* %85, align 8
- %88 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=2]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=2]
- store float %93, float* %91, align 8
- %94 = getelementptr inbounds %struct.btTransform* %convexToTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = fsub float %93, %45 ; [#uses=1]
- %98 = fsub float %90, %42 ; [#uses=1]
- %99 = fsub float %87, %39 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btQuadWord* %linVel, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %99, float* %100, align 8
- %101 = getelementptr inbounds %struct.btQuadWord* %linVel, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %98, float* %101, align 4
- %102 = getelementptr inbounds %struct.btQuadWord* %linVel, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %97, float* %102, align 8
- %103 = getelementptr inbounds %struct.btQuadWord* %linVel, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %103, align 4
- call void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btQuadWord* %axis.i, float* %angle.i) nounwind
- %104 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %105 = load float* %104, align 8 ; [#uses=1]
- %106 = load float* %angle.i, align 4 ; [#uses=3]
- %107 = fmul float %105, %106 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %106 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %112 = load float* %111, align 8 ; [#uses=1]
- %113 = fmul float %112, %106 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %113, float* %114, align 8
- %115 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %110, float* %115, align 4
- %116 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %107, float* %116, align 8
- %117 = getelementptr inbounds %struct.btQuadWord* %angVel, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %117, align 4
- %118 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 1.000000e+00, float* %118, align 8
- %119 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %119, align 4
- %120 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %120, align 8
- %121 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %121, align 4
- %122 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %122, align 8
- %123 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 1.000000e+00, float* %123, align 4
- %124 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %124, align 8
- %125 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %125, align 4
- %126 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %126, align 8
- %127 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %127, align 4
- %128 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float 1.000000e+00, float* %128, align 8
- %129 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %129, align 4
- %130 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 8
- %131 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %131, align 4
- %132 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %132, align 8
- %133 = getelementptr inbounds %struct.btTransform* %R, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %133, align 4
- %134 = getelementptr inbounds %struct.btTransform* %convexFromTrans, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %134, %struct.btQuaternion* %0) nounwind
- %135 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %136 = load float* %135, align 8 ; [#uses=6]
- %137 = fmul float %136, %136 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=5]
- %140 = fmul float %139, %139 ; [#uses=1]
- %141 = fadd float %137, %140 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %143 = load float* %142, align 8 ; [#uses=4]
- %144 = fmul float %143, %143 ; [#uses=1]
- %145 = fadd float %141, %144 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %147 = load float* %146, align 4 ; [#uses=5]
- %148 = fmul float %147, %147 ; [#uses=1]
- %149 = fadd float %145, %148 ; [#uses=1]
- %150 = fdiv float 2.000000e+00, %149 ; [#uses=3]
- %151 = fmul float %136, %150 ; [#uses=2]
- %152 = fmul float %139, %150 ; [#uses=3]
- %153 = fmul float %143, %150 ; [#uses=4]
- %154 = fmul float %147, %151 ; [#uses=2]
- %155 = fmul float %147, %152 ; [#uses=2]
- %156 = fmul float %147, %153 ; [#uses=2]
- %157 = fmul float %136, %151 ; [#uses=2]
- %158 = fmul float %136, %152 ; [#uses=2]
- %159 = fmul float %136, %153 ; [#uses=2]
- %160 = fmul float %139, %152 ; [#uses=2]
- %161 = fmul float %139, %153 ; [#uses=2]
- %162 = fmul float %143, %153 ; [#uses=2]
- %163 = fadd float %157, %160 ; [#uses=1]
- %164 = fsub float 1.000000e+00, %163 ; [#uses=1]
- %165 = fadd float %161, %154 ; [#uses=1]
- %166 = fsub float %159, %155 ; [#uses=1]
- %167 = fsub float %161, %154 ; [#uses=1]
- %168 = fadd float %157, %162 ; [#uses=1]
- %169 = fsub float 1.000000e+00, %168 ; [#uses=1]
- %170 = fadd float %158, %156 ; [#uses=1]
- %171 = fadd float %159, %155 ; [#uses=1]
- %172 = fsub float %158, %156 ; [#uses=1]
- %173 = fadd float %160, %162 ; [#uses=1]
- %174 = fsub float 1.000000e+00, %173 ; [#uses=1]
- store float %174, float* %118, align 8
- store float %172, float* %119, align 4
- store float %171, float* %120, align 8
- store float 0.000000e+00, float* %121, align 4
- store float %170, float* %122, align 8
- store float %169, float* %123, align 4
- store float %167, float* %124, align 8
- store float 0.000000e+00, float* %125, align 4
- store float %166, float* %126, align 8
- store float %165, float* %127, align 4
- store float %164, float* %128, align 8
- store float 0.000000e+00, float* %129, align 4
- %175 = getelementptr inbounds %struct.btConvexShape* %castShape, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK16btCollisionShape21calculateTemporalAabbERK11btTransformRK9btVector3S5_fRS3_S6_(%struct.btCollisionShape* %175, %struct.btTransform* %R, %struct.btQuadWord* %linVel, %struct.btQuadWord* %angVel, float 1.000000e+00, %struct.btQuadWord* %castShapeAabbMin, %struct.btQuadWord* %castShapeAabbMax)
- %176 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %177 = load i32* %176, align 4 ; [#uses=1]
- %178 = icmp sgt i32 %177, 0 ; [#uses=1]
- br i1 %178, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %179 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %180 = getelementptr inbounds %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, i32 0, i32 0 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %182 = getelementptr inbounds %struct.btQuadWord* %castShapeAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %184 = getelementptr inbounds %struct.btQuadWord* %castShapeAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %186 = getelementptr inbounds %struct.btQuadWord* %castShapeAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %189 = getelementptr inbounds %struct.btQuadWord* %castShapeAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %191 = getelementptr inbounds %struct.btQuadWord* %castShapeAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %193 = getelementptr inbounds %struct.btQuadWord* %castShapeAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btQuadWord* %collisionObjectAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btTransform* %convexToWorld, i32 0, i32 1 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btTransform* %convexFromWorld, i32 0, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb4, %bb.nph
- %i.08 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb4 ] ; [#uses=2]
- %tmp = add i32 %i.08, 1 ; [#uses=2]
- %197 = load %struct.btCollisionObject*** %179, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %197, i32 %i.08 ; [#uses=1]
- %198 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=4]
- %199 = load i32 (...)*** %180, align 4 ; [#uses=1]
- %200 = getelementptr inbounds i32 (...)** %199, i32 2 ; [#uses=1]
- %201 = load i32 (...)** %200, align 4 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btCollisionObject* %198, i32 0, i32 8 ; [#uses=1]
- %203 = load %struct.btBroadphaseProxy** %202, align 4 ; [#uses=1]
- %204 = bitcast i32 (...)* %201 to i8 (%"struct.btCollisionWorld::ConvexResultCallback"*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %205 = call zeroext i8 %204(%"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, %struct.btBroadphaseProxy* %203) ; [#uses=1]
- %toBool = icmp eq i8 %205, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb1
-
-bb1: ; preds = %bb
- %206 = getelementptr inbounds %struct.btCollisionObject* %198, i32 0, i32 9 ; [#uses=2]
- %207 = load %struct.btCollisionShape** %206, align 4 ; [#uses=2]
- %208 = getelementptr inbounds %struct.btCollisionShape* %207, i32 0, i32 0 ; [#uses=1]
- %209 = load i32 (...)*** %208, align 4 ; [#uses=1]
- %210 = getelementptr inbounds i32 (...)** %209, i32 2 ; [#uses=1]
- %211 = load i32 (...)** %210, align 4 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btCollisionObject* %198, i32 0, i32 1 ; [#uses=2]
- %213 = bitcast i32 (...)* %211 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %213(%struct.btCollisionShape* %207, %struct.btTransform* %212, %struct.btQuadWord* %collisionObjectAabbMin, %struct.btQuadWord* %collisionObjectAabbMax)
- %214 = load float* %181, align 8 ; [#uses=1]
- %215 = load float* %182, align 8 ; [#uses=1]
- %216 = fadd float %214, %215 ; [#uses=1]
- %217 = load float* %183, align 4 ; [#uses=1]
- %218 = load float* %184, align 4 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=1]
- %220 = load float* %185, align 8 ; [#uses=1]
- %221 = load float* %186, align 8 ; [#uses=1]
- %222 = fadd float %220, %221 ; [#uses=1]
- store float %222, float* %185, align 8
- store float %219, float* %183, align 4
- store float %216, float* %181, align 8
- store float 0.000000e+00, float* %187, align 4
- %223 = load float* %188, align 8 ; [#uses=1]
- %224 = load float* %189, align 8 ; [#uses=1]
- %225 = fadd float %223, %224 ; [#uses=1]
- %226 = load float* %190, align 4 ; [#uses=1]
- %227 = load float* %191, align 4 ; [#uses=1]
- %228 = fadd float %226, %227 ; [#uses=1]
- %229 = load float* %192, align 8 ; [#uses=1]
- %230 = load float* %193, align 8 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- store float %231, float* %192, align 8
- store float %228, float* %190, align 4
- store float %225, float* %188, align 8
- store float 0.000000e+00, float* %194, align 4
- store float 1.000000e+00, float* %hitLambda, align 4
- %232 = call zeroext i8 @_Z9btRayAabbRK9btVector3S1_S1_S1_RfRS_(%struct.btQuadWord* %196, %struct.btQuadWord* %195, %struct.btQuadWord* %collisionObjectAabbMin, %struct.btQuadWord* %collisionObjectAabbMax, float* %hitLambda, %struct.btQuadWord* %hitNormal) ; [#uses=1]
- %toBool2 = icmp eq i8 %232, 0 ; [#uses=1]
- br i1 %toBool2, label %bb4, label %bb3
-
-bb3: ; preds = %bb1
- %233 = load %struct.btCollisionShape** %206, align 4 ; [#uses=1]
- call void @_ZN16btCollisionWorld17objectQuerySingleEPK13btConvexShapeRK11btTransformS5_P17btCollisionObjectPK16btCollisionShapeS5_RNS_20ConvexResultCallbackEf(%struct.btConvexShape* %castShape, %struct.btTransform* %convexFromTrans, %struct.btTransform* %convexToTrans, %struct.btCollisionObject* %198, %struct.btCollisionShape* %233, %struct.btTransform* %212, %"struct.btCollisionWorld::ConvexResultCallback"* %resultCallback, float %allowedCcdPenetration)
- br label %bb4
-
-bb4: ; preds = %bb3, %bb1, %bb
- %234 = load i32* %176, align 4 ; [#uses=1]
- %235 = icmp sgt i32 %234, %tmp ; [#uses=1]
- br i1 %235, label %bb, label %return
-
-return: ; preds = %bb4, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN24btPairCachingGhostObject28addOverlappingObjectInternalEP17btBroadphaseProxyS1_(%struct.btPairCachingGhostObject* nocapture %this, %struct.btBroadphaseProxy* %otherProxy, %struct.btBroadphaseProxy* %thisProxy) align 2 {
-entry:
- %0 = icmp eq %struct.btBroadphaseProxy* %thisProxy, null ; [#uses=1]
- br i1 %0, label %bb, label %bb2
-
-bb: ; preds = %entry
- %1 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0, i32 8 ; [#uses=1]
- %2 = load %struct.btBroadphaseProxy** %1, align 4 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %iftmp.202.0 = phi %struct.btBroadphaseProxy* [ %2, %bb ], [ %thisProxy, %entry ] ; [#uses=1]
- %3 = getelementptr inbounds %struct.btBroadphaseProxy* %otherProxy, i32 0, i32 0 ; [#uses=1]
- %4 = load i8** %3, align 4 ; [#uses=1]
- %5 = bitcast i8* %4 to %struct.btCollisionObject* ; [#uses=2]
- %6 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=5]
- %7 = load i32* %6, align 4 ; [#uses=9]
- %8 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=6]
- br label %bb3.i
-
-bb.i: ; preds = %bb3.i
- %9 = load %struct.btCollisionObject*** %8, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionObject** %9, i32 %13 ; [#uses=1]
- %10 = load %struct.btCollisionObject** %scevgep.i, align 4 ; [#uses=1]
- %11 = icmp eq %struct.btCollisionObject* %10, %5 ; [#uses=1]
- br i1 %11, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %12 = add nsw i32 %13, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb2
- %13 = phi i32 [ 0, %bb2 ], [ %12, %bb2.i ] ; [#uses=4]
- %14 = icmp sgt i32 %7, %13 ; [#uses=1]
- br i1 %14, label %bb.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit: ; preds = %bb3.i, %bb.i
- %index.0.i = phi i32 [ %7, %bb3.i ], [ %13, %bb.i ] ; [#uses=1]
- %15 = icmp eq i32 %7, %index.0.i ; [#uses=1]
- br i1 %15, label %bb3, label %return
-
-bb3: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- %16 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=2]
- %17 = load i32* %16, align 4 ; [#uses=2]
- %18 = icmp eq i32 %17, %7 ; [#uses=1]
- br i1 %18, label %bb.i5, label %bb1.i
-
-bb.i5: ; preds = %bb3
- %19 = icmp eq i32 %7, 0 ; [#uses=1]
- %20 = shl i32 %7, 1 ; [#uses=1]
- %iftmp.222.0.i.i = select i1 %19, i32 1, i32 %20 ; [#uses=4]
- %21 = icmp slt i32 %17, %iftmp.222.0.i.i ; [#uses=1]
- br i1 %21, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i5
- %22 = icmp eq i32 %iftmp.222.0.i.i, 0 ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %23 = shl i32 %iftmp.222.0.i.i, 2 ; [#uses=1]
- %24 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %23, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %24 to %struct.btCollisionObject** ; [#uses=1]
- %.pre.i = load i32* %6, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %25 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %7, %bb.i.i ] ; [#uses=2]
- %26 = phi %struct.btCollisionObject** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %27 = icmp sgt i32 %25, 0 ; [#uses=1]
- br i1 %27, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btCollisionObject** %26, i32 %indvar.i.i.i ; [#uses=2]
- %28 = icmp eq %struct.btCollisionObject** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %28, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %29 = load %struct.btCollisionObject*** %8, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btCollisionObject** %29, i32 %indvar.i.i.i ; [#uses=1]
- %30 = load %struct.btCollisionObject** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %30, %struct.btCollisionObject** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %25 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %31 = load %struct.btCollisionObject*** %8, align 4 ; [#uses=2]
- %32 = icmp eq %struct.btCollisionObject** %31, null ; [#uses=1]
- br i1 %32, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
- %33 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- %34 = load i8* %33, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %35 = bitcast %struct.btCollisionObject** %31 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %35)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %8, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
- %36 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %36, align 4
- store %struct.btCollisionObject** %26, %struct.btCollisionObject*** %8, align 4
- store i32 %iftmp.222.0.i.i, i32* %16, align 4
- %.pre5.i = load i32* %6, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, %bb.i5, %bb3
- %37 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i ], [ %7, %bb3 ], [ %7, %bb.i5 ] ; [#uses=2]
- %38 = load %struct.btCollisionObject*** %8, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionObject** %38, i32 %37 ; [#uses=2]
- %40 = icmp eq %struct.btCollisionObject** %39, null ; [#uses=1]
- br i1 %40, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit, label %bb2.i6
-
-bb2.i6: ; preds = %bb1.i
- store %struct.btCollisionObject* %5, %struct.btCollisionObject** %39, align 4
- %.pre6.i = load i32* %6, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit: ; preds = %bb2.i6, %bb1.i
- %41 = phi i32 [ %37, %bb1.i ], [ %.pre6.i, %bb2.i6 ] ; [#uses=1]
- %42 = add nsw i32 %41, 1 ; [#uses=1]
- store i32 %42, i32* %6, align 4
- %43 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 1 ; [#uses=1]
- %44 = load %struct.btHashedOverlappingPairCache** %43, align 4 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %44, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = load i32 (...)*** %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds i32 (...)** %46, i32 2 ; [#uses=1]
- %48 = load i32 (...)** %47, align 4 ; [#uses=1]
- %49 = bitcast i32 (...)* %48 to %struct.btBroadphasePair* (%struct.btHashedOverlappingPairCache*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %50 = tail call %struct.btBroadphasePair* %49(%struct.btHashedOverlappingPairCache* %44, %struct.btBroadphaseProxy* %iftmp.202.0, %struct.btBroadphaseProxy* %otherProxy) ; [#uses=0]
- ret void
-
-return: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- ret void
-}
-
-; [#uses=1]
-define void @_ZN13btGhostObject28addOverlappingObjectInternalEP17btBroadphaseProxyS1_(%struct.btGhostObject* nocapture %this, %struct.btBroadphaseProxy* nocapture %otherProxy, %struct.btBroadphaseProxy* nocapture %thisProxy) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %otherProxy, i32 0, i32 0 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=1]
- %2 = bitcast i8* %1 to %struct.btCollisionObject* ; [#uses=2]
- %3 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- %4 = load i32* %3, align 4 ; [#uses=9]
- %5 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=6]
- br label %bb3.i
-
-bb.i: ; preds = %bb3.i
- %6 = load %struct.btCollisionObject*** %5, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionObject** %6, i32 %10 ; [#uses=1]
- %7 = load %struct.btCollisionObject** %scevgep.i, align 4 ; [#uses=1]
- %8 = icmp eq %struct.btCollisionObject* %7, %2 ; [#uses=1]
- br i1 %8, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %9 = add nsw i32 %10, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %entry
- %10 = phi i32 [ 0, %entry ], [ %9, %bb2.i ] ; [#uses=4]
- %11 = icmp sgt i32 %4, %10 ; [#uses=1]
- br i1 %11, label %bb.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit: ; preds = %bb3.i, %bb.i
- %index.0.i = phi i32 [ %4, %bb3.i ], [ %10, %bb.i ] ; [#uses=1]
- %12 = icmp eq i32 %4, %index.0.i ; [#uses=1]
- br i1 %12, label %bb, label %return
-
-bb: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- %13 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %14 = load i32* %13, align 4 ; [#uses=2]
- %15 = icmp eq i32 %14, %4 ; [#uses=1]
- br i1 %15, label %bb.i2, label %bb1.i
-
-bb.i2: ; preds = %bb
- %16 = icmp eq i32 %4, 0 ; [#uses=1]
- %17 = shl i32 %4, 1 ; [#uses=1]
- %iftmp.222.0.i.i = select i1 %16, i32 1, i32 %17 ; [#uses=4]
- %18 = icmp slt i32 %14, %iftmp.222.0.i.i ; [#uses=1]
- br i1 %18, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i2
- %19 = icmp eq i32 %iftmp.222.0.i.i, 0 ; [#uses=1]
- br i1 %19, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %20 = shl i32 %iftmp.222.0.i.i, 2 ; [#uses=1]
- %21 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %20, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %21 to %struct.btCollisionObject** ; [#uses=1]
- %.pre.i = load i32* %3, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %22 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %4, %bb.i.i ] ; [#uses=2]
- %23 = phi %struct.btCollisionObject** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %24 = icmp sgt i32 %22, 0 ; [#uses=1]
- br i1 %24, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btCollisionObject** %23, i32 %indvar.i.i.i ; [#uses=2]
- %25 = icmp eq %struct.btCollisionObject** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %25, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %26 = load %struct.btCollisionObject*** %5, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btCollisionObject** %26, i32 %indvar.i.i.i ; [#uses=1]
- %27 = load %struct.btCollisionObject** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %27, %struct.btCollisionObject** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %22 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %28 = load %struct.btCollisionObject*** %5, align 4 ; [#uses=2]
- %29 = icmp eq %struct.btCollisionObject** %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
- %30 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %31 = load i8* %30, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %32 = bitcast %struct.btCollisionObject** %28 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %32)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %5, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i
- %33 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %33, align 4
- store %struct.btCollisionObject** %23, %struct.btCollisionObject*** %5, align 4
- store i32 %iftmp.222.0.i.i, i32* %13, align 4
- %.pre5.i = load i32* %3, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, %bb.i2, %bb
- %34 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i ], [ %4, %bb ], [ %4, %bb.i2 ] ; [#uses=2]
- %35 = load %struct.btCollisionObject*** %5, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCollisionObject** %35, i32 %34 ; [#uses=2]
- %37 = icmp eq %struct.btCollisionObject** %36, null ; [#uses=1]
- br i1 %37, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit, label %bb2.i3
-
-bb2.i3: ; preds = %bb1.i
- store %struct.btCollisionObject* %2, %struct.btCollisionObject** %36, align 4
- %.pre6.i = load i32* %3, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_.exit: ; preds = %bb2.i3, %bb1.i
- %38 = phi i32 [ %34, %bb1.i ], [ %.pre6.i, %bb2.i3 ] ; [#uses=1]
- %39 = add nsw i32 %38, 1 ; [#uses=1]
- store i32 %39, i32* %3, align 4
- ret void
-
-return: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE16findLinearSearchERKS1_.exit
- ret void
-}
-
-; [#uses=1]
-define void @_ZN13btGhostObjectD0Ev(%struct.btGhostObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionObject*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionObject** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionObject** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- %8 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %10)
- %11 = bitcast %struct.btGhostObject* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN13btGhostObjectD1Ev(%struct.btGhostObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionObject*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionObject** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionObject** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- %8 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN13btGhostObjectD2Ev(%struct.btGhostObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionObject*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionObject** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionObject** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- %8 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN24btPairCachingGhostObjectD0Ev(%struct.btPairCachingGhostObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV24btPairCachingGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 1 ; [#uses=2]
- %2 = load %struct.btHashedOverlappingPairCache** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %2, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btHashedOverlappingPairCache*)* ; [#uses=1]
- invoke void %6(%struct.btHashedOverlappingPairCache* %2)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %7 = load %struct.btHashedOverlappingPairCache** %1, align 4 ; [#uses=1]
- %8 = bitcast %struct.btHashedOverlappingPairCache* %7 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %8)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %invcont
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %9 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=3]
- %10 = load %struct.btCollisionObject*** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btCollisionObject** %10, null ; [#uses=1]
- br i1 %11, label %_ZN13btGhostObjectD2Ev.exit, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %bb4
- %12 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %14 = bitcast %struct.btCollisionObject** %10 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %9, align 4
- br label %_ZN13btGhostObjectD2Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %15)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN13btGhostObjectD2Ev.exit: ; preds = %bb2.i.i.i.i, %bb4
- %16 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %9, align 4
- %17 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %19)
- %20 = bitcast %struct.btPairCachingGhostObject* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %20)
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %21 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=3]
- %22 = load %struct.btCollisionObject*** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btCollisionObject** %22, null ; [#uses=1]
- br i1 %23, label %bb3.i, label %bb.i.i.i.i17
-
-bb.i.i.i.i17: ; preds = %lpad
- %24 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i.i.i16 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i16, label %bb2.i.i.i.i19, label %bb1.i.i.i.i18
-
-bb1.i.i.i.i18: ; preds = %bb.i.i.i.i17
- %26 = bitcast %struct.btCollisionObject** %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %26)
- to label %bb2.i.i.i.i19 unwind label %lpad.i23
-
-bb2.i.i.i.i19: ; preds = %bb1.i.i.i.i18, %bb.i.i.i.i17
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %21, align 4
- br label %bb3.i
-
-invcont1.i20: ; preds = %lpad.i23
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i21)
- to label %.noexc unwind label %lpad10
-
-.noexc: ; preds = %invcont1.i20
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i19, %lpad
- %27 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %21, align 4
- %28 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %30)
- to label %invcont2 unwind label %lpad10
-
-lpad.i23: ; preds = %bb1.i.i.i.i18
- %eh_ptr.i21 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %31)
- to label %invcont1.i20 unwind label %lpad9.i26
-
-lpad9.i26: ; preds = %lpad.i23
- %eh_ptr10.i24 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad10: ; preds = %bb3.i, %invcont1.i20
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN24btPairCachingGhostObjectD1Ev(%struct.btPairCachingGhostObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV24btPairCachingGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 1 ; [#uses=2]
- %2 = load %struct.btHashedOverlappingPairCache** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %2, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btHashedOverlappingPairCache*)* ; [#uses=1]
- invoke void %6(%struct.btHashedOverlappingPairCache* %2)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %7 = load %struct.btHashedOverlappingPairCache** %1, align 4 ; [#uses=1]
- %8 = bitcast %struct.btHashedOverlappingPairCache* %7 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %8)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %invcont
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %9 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=3]
- %10 = load %struct.btCollisionObject*** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btCollisionObject** %10, null ; [#uses=1]
- br i1 %11, label %_ZN13btGhostObjectD2Ev.exit, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %bb4
- %12 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %14 = bitcast %struct.btCollisionObject** %10 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %9, align 4
- br label %_ZN13btGhostObjectD2Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %15)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN13btGhostObjectD2Ev.exit: ; preds = %bb2.i.i.i.i, %bb4
- %16 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %9, align 4
- %17 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %19)
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %20 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=3]
- %21 = load %struct.btCollisionObject*** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btCollisionObject** %21, null ; [#uses=1]
- br i1 %22, label %bb3.i, label %bb.i.i.i.i17
-
-bb.i.i.i.i17: ; preds = %lpad
- %23 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i.i16 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i16, label %bb2.i.i.i.i19, label %bb1.i.i.i.i18
-
-bb1.i.i.i.i18: ; preds = %bb.i.i.i.i17
- %25 = bitcast %struct.btCollisionObject** %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i.i19 unwind label %lpad.i23
-
-bb2.i.i.i.i19: ; preds = %bb1.i.i.i.i18, %bb.i.i.i.i17
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %20, align 4
- br label %bb3.i
-
-invcont1.i20: ; preds = %lpad.i23
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i21)
- to label %.noexc unwind label %lpad10
-
-.noexc: ; preds = %invcont1.i20
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i19, %lpad
- %26 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %20, align 4
- %27 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %29)
- to label %invcont2 unwind label %lpad10
-
-lpad.i23: ; preds = %bb1.i.i.i.i18
- %eh_ptr.i21 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %30 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %30)
- to label %invcont1.i20 unwind label %lpad9.i26
-
-lpad9.i26: ; preds = %lpad.i23
- %eh_ptr10.i24 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad10: ; preds = %bb3.i, %invcont1.i20
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN24btPairCachingGhostObjectD2Ev(%struct.btPairCachingGhostObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV24btPairCachingGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 1 ; [#uses=2]
- %2 = load %struct.btHashedOverlappingPairCache** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %2, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btHashedOverlappingPairCache*)* ; [#uses=1]
- invoke void %6(%struct.btHashedOverlappingPairCache* %2)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %7 = load %struct.btHashedOverlappingPairCache** %1, align 4 ; [#uses=1]
- %8 = bitcast %struct.btHashedOverlappingPairCache* %7 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %8)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %invcont
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %9 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=3]
- %10 = load %struct.btCollisionObject*** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btCollisionObject** %10, null ; [#uses=1]
- br i1 %11, label %_ZN13btGhostObjectD2Ev.exit, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %bb4
- %12 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %14 = bitcast %struct.btCollisionObject** %10 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %9, align 4
- br label %_ZN13btGhostObjectD2Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %15)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN13btGhostObjectD2Ev.exit: ; preds = %bb2.i.i.i.i, %bb4
- %16 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %9, align 4
- %17 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %19)
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %0, align 4
- %20 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=3]
- %21 = load %struct.btCollisionObject*** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btCollisionObject** %21, null ; [#uses=1]
- br i1 %22, label %bb3.i, label %bb.i.i.i.i17
-
-bb.i.i.i.i17: ; preds = %lpad
- %23 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i.i16 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i16, label %bb2.i.i.i.i19, label %bb1.i.i.i.i18
-
-bb1.i.i.i.i18: ; preds = %bb.i.i.i.i17
- %25 = bitcast %struct.btCollisionObject** %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i.i19 unwind label %lpad.i23
-
-bb2.i.i.i.i19: ; preds = %bb1.i.i.i.i18, %bb.i.i.i.i17
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %20, align 4
- br label %bb3.i
-
-invcont1.i20: ; preds = %lpad.i23
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i21)
- to label %.noexc unwind label %lpad10
-
-.noexc: ; preds = %invcont1.i20
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i19, %lpad
- %26 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %20, align 4
- %27 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %29)
- to label %invcont2 unwind label %lpad10
-
-lpad.i23: ; preds = %bb1.i.i.i.i18
- %eh_ptr.i21 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %30 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %30)
- to label %invcont1.i20 unwind label %lpad9.i26
-
-lpad9.i26: ; preds = %lpad.i23
- %eh_ptr10.i24 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad10: ; preds = %bb3.i, %invcont1.i20
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN13btGhostObjectC1Ev(%struct.btGhostObject* %this) align 2 {
-invcont:
- %0 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectC2Ev(%struct.btCollisionObject* %0)
- %1 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %3, align 4
- %4 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btGhostObject* %this, i32 0, i32 0, i32 19 ; [#uses=1]
- store i32 4, i32* %6, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN24btPairCachingGhostObjectC2Ev(%struct.btPairCachingGhostObject* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- tail call void @_ZN17btCollisionObjectC2Ev(%struct.btCollisionObject* %0)
- %1 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=4]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %3, align 4
- %4 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 0, i32 0, i32 19 ; [#uses=1]
- store i32 4, i32* %6, align 4
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV24btPairCachingGhostObject, i32 0, i32 2), i32 (...)*** %1, align 4
- %7 = invoke i8* @_Z22btAlignedAllocInternalji(i32 76, i32 16)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %entry
- %8 = bitcast i8* %7 to %struct.btHashedOverlappingPairCache* ; [#uses=2]
- %9 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %9, label %bb5, label %bb
-
-bb: ; preds = %invcont
- invoke void @_ZN28btHashedOverlappingPairCacheC1Ev(%struct.btHashedOverlappingPairCache* %8)
- to label %bb5 unwind label %lpad13
-
-bb5: ; preds = %bb, %invcont
- %10 = getelementptr inbounds %struct.btPairCachingGhostObject* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btHashedOverlappingPairCache* %8, %struct.btHashedOverlappingPairCache** %10, align 4
- ret void
-
-invcont9: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad13: ; preds = %bb
- %eh_ptr14 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select16 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr14, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad17: ; preds = %bb3.i, %invcont1.i
- %eh_ptr18 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr18, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad13, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr14, %lpad13 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([11 x i32 (...)*]* @_ZTV13btGhostObject, i32 0, i32 2), i32 (...)*** %1, align 4
- %11 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btCollisionObject** %11, null ; [#uses=1]
- br i1 %12, label %bb3.i, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %ppad
- %13 = load i8* %2, align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %14 = bitcast %struct.btCollisionObject** %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %3, align 4
- br label %bb3.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc unwind label %lpad17
-
-.noexc: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i, %ppad
- store i8 1, i8* %2, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %3, align 4
- store i32 0, i32* %4, align 4
- store i32 0, i32* %5, align 4
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %0)
- to label %invcont9 unwind label %lpad17
-
-lpad.i: ; preds = %bb1.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %0)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN24btPairCachingGhostObjectC1Ev(%struct.btPairCachingGhostObject* %this) align 2 {
-entry:
- tail call void @_ZN24btPairCachingGhostObjectC2Ev(%struct.btPairCachingGhostObject* %this)
- ret void
-}
-
-; [#uses=0]
-define void @_Z26btGenerateInternalEdgeInfoP22btBvhTriangleMeshShapeP17btTriangleInfoMap(%struct.btBvhTriangleMeshShape* %trimeshShape, %struct.btTriangleInfoMap* %triangleInfoMap) {
-entry:
- %vertexbase = alloca i8*, align 4 ; [#uses=3]
- %numverts = alloca i32, align 4 ; [#uses=2]
- %type = alloca i32, align 4 ; [#uses=3]
- %stride = alloca i32, align 4 ; [#uses=3]
- %indexbase = alloca i8*, align 4 ; [#uses=3]
- %indexstride = alloca i32, align 4 ; [#uses=3]
- %numfaces = alloca i32, align 4 ; [#uses=3]
- %indicestype = alloca i32, align 4 ; [#uses=3]
- %triangleVerts = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=17]
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %connectivityProcessor = alloca %struct.btConnectivityProcessor, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %trimeshShape, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btTriangleInfoMap** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btTriangleInfoMap* %1, null ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- store %struct.btTriangleInfoMap* %triangleInfoMap, %struct.btTriangleInfoMap** %0, align 4
- %3 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %trimeshShape, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load %struct.btStridingMeshInterface** %3, align 4 ; [#uses=6]
- %5 = getelementptr inbounds %struct.btStridingMeshInterface* %4, i32 0, i32 0 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btStridingMeshInterface* %4, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btStridingMeshInterface* %4, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btStridingMeshInterface* %4, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=4]
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=4]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=4]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=4]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=4]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=4]
- %17 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %21 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btConnectivityProcessor* %connectivityProcessor, i32 0, i32 0, i32 0 ; [#uses=3]
- %30 = getelementptr inbounds %struct.btConnectivityProcessor* %connectivityProcessor, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btConnectivityProcessor* %connectivityProcessor, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btConnectivityProcessor* %connectivityProcessor, i32 0, i32 3 ; [#uses=1]
- %33 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btConnectivityProcessor* %connectivityProcessor, i32 0, i32 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %trimeshShape, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btConnectivityProcessor* %connectivityProcessor, i32 0, i32 0 ; [#uses=3]
- br label %bb22
-
-bb4: ; preds = %bb22
- store i8* null, i8** %vertexbase, align 4
- store i32 0, i32* %numverts, align 4
- store i32 2, i32* %type, align 4
- store i32 0, i32* %stride, align 4
- store i8* null, i8** %indexbase, align 4
- store i32 0, i32* %indexstride, align 4
- store i32 0, i32* %numfaces, align 4
- store i32 2, i32* %indicestype, align 4
- %37 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 4 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %40(%struct.btStridingMeshInterface* %4, i8** %vertexbase, i32* %numverts, i32* %type, i32* %stride, i8** %indexbase, i32* %indexstride, i32* %numfaces, i32* %indicestype, i32 %149)
- br label %bb20
-
-bb.nph85: ; preds = %bb20
- %41 = load i8** %indexbase, align 4 ; [#uses=2]
- %42 = load i32* %indexstride, align 4 ; [#uses=1]
- %tmp86 = mul i32 %42, %145 ; [#uses=2]
- %tmp87 = add i32 %tmp86, 4 ; [#uses=1]
- %tmp91 = add i32 %tmp86, 8 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb13, %bb.nph85
- %indvar = phi i32 [ 0, %bb.nph85 ], [ %indvar.next, %bb13 ] ; [#uses=4]
- %tmp96 = sub i32 2, %indvar ; [#uses=4]
- %scevgep9798 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp96, i32 0, i32 0 ; [#uses=1]
- %scevgep99 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp96, i32 0, i32 1 ; [#uses=1]
- %scevgep100 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp96, i32 0, i32 2 ; [#uses=1]
- %scevgep101 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp96, i32 0, i32 3 ; [#uses=1]
- %43 = load i32* %indicestype, align 4 ; [#uses=1]
- %44 = icmp eq i32 %43, 3 ; [#uses=1]
- br i1 %44, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- %tmp = mul i32 %indvar, -2 ; [#uses=1]
- %tmp88 = add i32 %tmp87, %tmp ; [#uses=1]
- %scevgep = getelementptr i8* %41, i32 %tmp88 ; [#uses=1]
- %scevgep89 = bitcast i8* %scevgep to i16* ; [#uses=1]
- %45 = load i16* %scevgep89, align 2 ; [#uses=1]
- %46 = zext i16 %45 to i32 ; [#uses=1]
- br label %bb9
-
-bb8: ; preds = %bb6
- %tmp90 = mul i32 %indvar, -4 ; [#uses=1]
- %tmp92 = add i32 %tmp91, %tmp90 ; [#uses=1]
- %scevgep93 = getelementptr i8* %41, i32 %tmp92 ; [#uses=1]
- %scevgep9394 = bitcast i8* %scevgep93 to i32* ; [#uses=1]
- %47 = load i32* %scevgep9394, align 4 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb8, %bb7
- %iftmp.282.0 = phi i32 [ %46, %bb7 ], [ %47, %bb8 ] ; [#uses=1]
- %48 = load i32* %type, align 4 ; [#uses=1]
- %49 = icmp eq i32 %48, 0 ; [#uses=1]
- %50 = load i8** %vertexbase, align 4 ; [#uses=5]
- %51 = load i32* %stride, align 4 ; [#uses=1]
- %52 = mul nsw i32 %51, %iftmp.282.0 ; [#uses=5]
- %53 = getelementptr inbounds i8* %50, i32 %52 ; [#uses=2]
- br i1 %49, label %bb10, label %bb11
-
-bb10: ; preds = %bb9
- %54 = bitcast i8* %53 to float* ; [#uses=1]
- %.sum35 = add i32 %52, 8 ; [#uses=1]
- %55 = getelementptr inbounds i8* %50, i32 %.sum35 ; [#uses=1]
- %56 = bitcast i8* %55 to float* ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = load float* %6, align 4 ; [#uses=1]
- %59 = fmul float %57, %58 ; [#uses=1]
- %.sum36 = add i32 %52, 4 ; [#uses=1]
- %60 = getelementptr inbounds i8* %50, i32 %.sum36 ; [#uses=1]
- %61 = bitcast i8* %60 to float* ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = load float* %7, align 4 ; [#uses=1]
- %64 = fmul float %62, %63 ; [#uses=1]
- %65 = load float* %54, align 4 ; [#uses=1]
- %66 = load float* %8, align 4 ; [#uses=1]
- %67 = fmul float %65, %66 ; [#uses=1]
- br label %bb13
-
-bb11: ; preds = %bb9
- %68 = bitcast i8* %53 to double* ; [#uses=1]
- %.sum = add i32 %52, 16 ; [#uses=1]
- %69 = getelementptr inbounds i8* %50, i32 %.sum ; [#uses=1]
- %70 = bitcast i8* %69 to double* ; [#uses=1]
- %71 = load double* %70, align 4 ; [#uses=1]
- %72 = load float* %6, align 4 ; [#uses=1]
- %73 = fpext float %72 to double ; [#uses=1]
- %74 = fmul double %71, %73 ; [#uses=1]
- %75 = fptrunc double %74 to float ; [#uses=1]
- %.sum34 = add i32 %52, 8 ; [#uses=1]
- %76 = getelementptr inbounds i8* %50, i32 %.sum34 ; [#uses=1]
- %77 = bitcast i8* %76 to double* ; [#uses=1]
- %78 = load double* %77, align 4 ; [#uses=1]
- %79 = load float* %7, align 4 ; [#uses=1]
- %80 = fpext float %79 to double ; [#uses=1]
- %81 = fmul double %78, %80 ; [#uses=1]
- %82 = fptrunc double %81 to float ; [#uses=1]
- %83 = load double* %68, align 4 ; [#uses=1]
- %84 = load float* %8, align 4 ; [#uses=1]
- %85 = fpext float %84 to double ; [#uses=1]
- %86 = fmul double %83, %85 ; [#uses=1]
- %87 = fptrunc double %86 to float ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb11, %bb10
- %storemerge103 = phi float [ %67, %bb10 ], [ %87, %bb11 ] ; [#uses=1]
- %storemerge102 = phi float [ %64, %bb10 ], [ %82, %bb11 ] ; [#uses=1]
- %storemerge = phi float [ %59, %bb10 ], [ %75, %bb11 ] ; [#uses=1]
- store float %storemerge103, float* %scevgep9798, align 8
- store float %storemerge102, float* %scevgep99, align 4
- store float %storemerge, float* %scevgep100, align 8
- store float 0.000000e+00, float* %scevgep101, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb15, label %bb6
-
-bb15: ; preds = %bb13
- store float 0x43ABC16D60000000, float* %9, align 8
- store float 0x43ABC16D60000000, float* %10, align 4
- store float 0x43ABC16D60000000, float* %11, align 8
- store float 0.000000e+00, float* %12, align 4
- store float 0xC3ABC16D60000000, float* %13, align 8
- store float 0xC3ABC16D60000000, float* %14, align 4
- store float 0xC3ABC16D60000000, float* %15, align 8
- store float 0.000000e+00, float* %16, align 4
- %88 = load float* %17, align 8 ; [#uses=6]
- %89 = fcmp olt float %88, 0x43ABC16D60000000 ; [#uses=1]
- br i1 %89, label %bb.i.i68, label %_Z8btSetMinIfEvRT_RKS0_.exit.i69
-
-bb.i.i68: ; preds = %bb15
- store float %88, float* %9, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i69
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i69: ; preds = %bb.i.i68, %bb15
- %90 = phi float [ %88, %bb.i.i68 ], [ 0x43ABC16D60000000, %bb15 ] ; [#uses=2]
- %91 = load float* %18, align 4 ; [#uses=6]
- %92 = fcmp olt float %91, 0x43ABC16D60000000 ; [#uses=1]
- br i1 %92, label %bb.i7.i70, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i71
-
-bb.i7.i70: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i69
- store float %91, float* %10, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i71
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i71: ; preds = %bb.i7.i70, %_Z8btSetMinIfEvRT_RKS0_.exit.i69
- %93 = phi float [ %91, %bb.i7.i70 ], [ 0x43ABC16D60000000, %_Z8btSetMinIfEvRT_RKS0_.exit.i69 ] ; [#uses=2]
- %94 = load float* %19, align 8 ; [#uses=6]
- %95 = fcmp olt float %94, 0x43ABC16D60000000 ; [#uses=1]
- br i1 %95, label %bb.i4.i72, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i73
-
-bb.i4.i72: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i71
- store float %94, float* %11, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i73
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i73: ; preds = %bb.i4.i72, %_Z8btSetMinIfEvRT_RKS0_.exit9.i71
- %96 = phi float [ %94, %bb.i4.i72 ], [ 0x43ABC16D60000000, %_Z8btSetMinIfEvRT_RKS0_.exit9.i71 ] ; [#uses=2]
- %97 = load float* %20, align 4 ; [#uses=6]
- %98 = fcmp olt float %97, 0.000000e+00 ; [#uses=1]
- br i1 %98, label %bb.i1.i74, label %_ZN9btVector36setMinERKS_.exit76
-
-bb.i1.i74: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i73
- store float %97, float* %12, align 4
- br label %_ZN9btVector36setMinERKS_.exit76
-
-_ZN9btVector36setMinERKS_.exit76: ; preds = %bb.i1.i74, %_Z8btSetMinIfEvRT_RKS0_.exit6.i73
- %99 = phi float [ 0.000000e+00, %_Z8btSetMinIfEvRT_RKS0_.exit6.i73 ], [ %97, %bb.i1.i74 ] ; [#uses=2]
- %100 = fcmp ogt float %88, 0xC3ABC16D60000000 ; [#uses=1]
- br i1 %100, label %bb.i.i59, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i60
-
-bb.i.i59: ; preds = %_ZN9btVector36setMinERKS_.exit76
- store float %88, float* %13, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i60
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i60: ; preds = %bb.i.i59, %_ZN9btVector36setMinERKS_.exit76
- %101 = phi float [ %88, %bb.i.i59 ], [ 0xC3ABC16D60000000, %_ZN9btVector36setMinERKS_.exit76 ] ; [#uses=2]
- %102 = fcmp ogt float %91, 0xC3ABC16D60000000 ; [#uses=1]
- br i1 %102, label %bb.i7.i61, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i62
-
-bb.i7.i61: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i60
- store float %91, float* %14, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i62
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i62: ; preds = %bb.i7.i61, %_Z8btSetMaxIfEvRT_RKS0_.exit.i60
- %103 = phi float [ %91, %bb.i7.i61 ], [ 0xC3ABC16D60000000, %_Z8btSetMaxIfEvRT_RKS0_.exit.i60 ] ; [#uses=2]
- %104 = fcmp ogt float %94, 0xC3ABC16D60000000 ; [#uses=1]
- br i1 %104, label %bb.i4.i63, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i64
-
-bb.i4.i63: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i62
- store float %94, float* %15, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i64
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i64: ; preds = %bb.i4.i63, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i62
- %105 = phi float [ %94, %bb.i4.i63 ], [ 0xC3ABC16D60000000, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i62 ] ; [#uses=2]
- %106 = fcmp ogt float %97, 0.000000e+00 ; [#uses=1]
- br i1 %106, label %bb.i1.i65, label %_ZN9btVector36setMaxERKS_.exit67
-
-bb.i1.i65: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i64
- store float %97, float* %16, align 4
- br label %_ZN9btVector36setMaxERKS_.exit67
-
-_ZN9btVector36setMaxERKS_.exit67: ; preds = %bb.i1.i65, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i64
- %107 = phi float [ 0.000000e+00, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i64 ], [ %97, %bb.i1.i65 ] ; [#uses=2]
- %108 = load float* %21, align 8 ; [#uses=6]
- %109 = fcmp olt float %108, %90 ; [#uses=1]
- br i1 %109, label %bb.i.i50, label %_Z8btSetMinIfEvRT_RKS0_.exit.i51
-
-bb.i.i50: ; preds = %_ZN9btVector36setMaxERKS_.exit67
- store float %108, float* %9, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i51
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i51: ; preds = %bb.i.i50, %_ZN9btVector36setMaxERKS_.exit67
- %110 = phi float [ %108, %bb.i.i50 ], [ %90, %_ZN9btVector36setMaxERKS_.exit67 ] ; [#uses=1]
- %111 = load float* %22, align 4 ; [#uses=6]
- %112 = fcmp olt float %111, %93 ; [#uses=1]
- br i1 %112, label %bb.i7.i52, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i53
-
-bb.i7.i52: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i51
- store float %111, float* %10, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i53
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i53: ; preds = %bb.i7.i52, %_Z8btSetMinIfEvRT_RKS0_.exit.i51
- %113 = phi float [ %111, %bb.i7.i52 ], [ %93, %_Z8btSetMinIfEvRT_RKS0_.exit.i51 ] ; [#uses=1]
- %114 = load float* %23, align 8 ; [#uses=6]
- %115 = fcmp olt float %114, %96 ; [#uses=1]
- br i1 %115, label %bb.i4.i54, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i55
-
-bb.i4.i54: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i53
- store float %114, float* %11, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i55
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i55: ; preds = %bb.i4.i54, %_Z8btSetMinIfEvRT_RKS0_.exit9.i53
- %116 = phi float [ %114, %bb.i4.i54 ], [ %96, %_Z8btSetMinIfEvRT_RKS0_.exit9.i53 ] ; [#uses=1]
- %117 = load float* %24, align 4 ; [#uses=6]
- %118 = fcmp olt float %117, %99 ; [#uses=1]
- br i1 %118, label %bb.i1.i56, label %_ZN9btVector36setMinERKS_.exit58
-
-bb.i1.i56: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i55
- store float %117, float* %12, align 4
- br label %_ZN9btVector36setMinERKS_.exit58
-
-_ZN9btVector36setMinERKS_.exit58: ; preds = %bb.i1.i56, %_Z8btSetMinIfEvRT_RKS0_.exit6.i55
- %119 = phi float [ %99, %_Z8btSetMinIfEvRT_RKS0_.exit6.i55 ], [ %117, %bb.i1.i56 ] ; [#uses=1]
- %120 = fcmp olt float %101, %108 ; [#uses=1]
- br i1 %120, label %bb.i.i41, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i42
-
-bb.i.i41: ; preds = %_ZN9btVector36setMinERKS_.exit58
- store float %108, float* %13, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i42
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i42: ; preds = %bb.i.i41, %_ZN9btVector36setMinERKS_.exit58
- %121 = phi float [ %108, %bb.i.i41 ], [ %101, %_ZN9btVector36setMinERKS_.exit58 ] ; [#uses=1]
- %122 = fcmp olt float %103, %111 ; [#uses=1]
- br i1 %122, label %bb.i7.i43, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i44
-
-bb.i7.i43: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i42
- store float %111, float* %14, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i44
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i44: ; preds = %bb.i7.i43, %_Z8btSetMaxIfEvRT_RKS0_.exit.i42
- %123 = phi float [ %111, %bb.i7.i43 ], [ %103, %_Z8btSetMaxIfEvRT_RKS0_.exit.i42 ] ; [#uses=1]
- %124 = fcmp olt float %105, %114 ; [#uses=1]
- br i1 %124, label %bb.i4.i45, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i46
-
-bb.i4.i45: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i44
- store float %114, float* %15, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i46
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i46: ; preds = %bb.i4.i45, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i44
- %125 = phi float [ %114, %bb.i4.i45 ], [ %105, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i44 ] ; [#uses=1]
- %126 = fcmp olt float %107, %117 ; [#uses=1]
- br i1 %126, label %bb.i1.i47, label %_ZN9btVector36setMaxERKS_.exit49
-
-bb.i1.i47: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i46
- store float %117, float* %16, align 4
- br label %_ZN9btVector36setMaxERKS_.exit49
-
-_ZN9btVector36setMaxERKS_.exit49: ; preds = %bb.i1.i47, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i46
- %127 = phi float [ %107, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i46 ], [ %117, %bb.i1.i47 ] ; [#uses=1]
- %128 = load float* %25, align 8 ; [#uses=4]
- %129 = fcmp olt float %128, %110 ; [#uses=1]
- br i1 %129, label %bb.i.i37, label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-bb.i.i37: ; preds = %_ZN9btVector36setMaxERKS_.exit49
- store float %128, float* %9, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i37, %_ZN9btVector36setMaxERKS_.exit49
- %130 = load float* %26, align 4 ; [#uses=4]
- %131 = fcmp olt float %130, %113 ; [#uses=1]
- br i1 %131, label %bb.i7.i38, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-bb.i7.i38: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i
- store float %130, float* %10, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i38, %_Z8btSetMinIfEvRT_RKS0_.exit.i
- %132 = load float* %27, align 8 ; [#uses=4]
- %133 = fcmp olt float %132, %116 ; [#uses=1]
- br i1 %133, label %bb.i4.i39, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-bb.i4.i39: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- store float %132, float* %11, align 8
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i39, %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- %134 = load float* %28, align 4 ; [#uses=4]
- %135 = fcmp olt float %134, %119 ; [#uses=1]
- br i1 %135, label %bb.i1.i40, label %_ZN9btVector36setMinERKS_.exit
-
-bb.i1.i40: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- store float %134, float* %12, align 4
- br label %_ZN9btVector36setMinERKS_.exit
-
-_ZN9btVector36setMinERKS_.exit: ; preds = %bb.i1.i40, %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- %136 = fcmp olt float %121, %128 ; [#uses=1]
- br i1 %136, label %bb.i.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-bb.i.i: ; preds = %_ZN9btVector36setMinERKS_.exit
- store float %128, float* %13, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i, %_ZN9btVector36setMinERKS_.exit
- %137 = fcmp olt float %123, %130 ; [#uses=1]
- br i1 %137, label %bb.i7.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-bb.i7.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- store float %130, float* %14, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i, %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- %138 = fcmp olt float %125, %132 ; [#uses=1]
- br i1 %138, label %bb.i4.i, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-bb.i4.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- store float %132, float* %15, align 8
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- %139 = fcmp olt float %127, %134 ; [#uses=1]
- br i1 %139, label %bb.i1.i, label %_ZN9btVector36setMaxERKS_.exit
-
-bb.i1.i: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- store float %134, float* %16, align 4
- br label %_ZN9btVector36setMaxERKS_.exit
-
-_ZN9btVector36setMaxERKS_.exit: ; preds = %bb.i1.i, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btConnectivityProcessor, i32 0, i32 2), i32 (...)*** %29, align 8
- store i32 %149, i32* %30, align 4
- store i32 %145, i32* %31, align 8
- store %struct.btQuadWord* %33, %struct.btQuadWord** %32, align 4
- store %struct.btTriangleInfoMap* %triangleInfoMap, %struct.btTriangleInfoMap** %34, align 8
- %140 = load i32 (...)*** %35, align 4 ; [#uses=1]
- %141 = getelementptr inbounds i32 (...)** %140, i32 15 ; [#uses=1]
- %142 = load i32 (...)** %141, align 4 ; [#uses=1]
- %143 = bitcast i32 (...)* %142 to void (%struct.btBvhTriangleMeshShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %143(%struct.btBvhTriangleMeshShape* %trimeshShape, %struct.btActionInterface* %36, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %bb19 unwind label %lpad
-
-invcont17: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb19: ; preds = %_ZN9btVector36setMaxERKS_.exit
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btConnectivityProcessor, i32 0, i32 2), i32 (...)*** %29, align 8
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %36)
- %144 = add nsw i32 %145, 1 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb19, %bb4
- %145 = phi i32 [ 0, %bb4 ], [ %144, %bb19 ] ; [#uses=4]
- %146 = load i32* %numfaces, align 4 ; [#uses=1]
- %147 = icmp slt i32 %145, %146 ; [#uses=1]
- br i1 %147, label %bb.nph85, label %bb21
-
-bb21: ; preds = %bb20
- %148 = add nsw i32 %149, 1 ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %bb21, %bb
- %149 = phi i32 [ 0, %bb ], [ %148, %bb21 ] ; [#uses=4]
- %150 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %151 = getelementptr inbounds i32 (...)** %150, i32 7 ; [#uses=1]
- %152 = load i32 (...)** %151, align 4 ; [#uses=1]
- %153 = bitcast i32 (...)* %152 to i32 (%struct.btStridingMeshInterface*)* ; [#uses=1]
- %154 = call i32 %153(%struct.btStridingMeshInterface* %4) ; [#uses=1]
- %155 = icmp sgt i32 %154, %149 ; [#uses=1]
- br i1 %155, label %bb4, label %return
-
-return: ; preds = %bb22, %entry
- ret void
-
-lpad: ; preds = %_ZN9btVector36setMaxERKS_.exit
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select26 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btConnectivityProcessor, i32 0, i32 2), i32 (...)*** %29, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %36)
- to label %invcont17 unwind label %lpad27
-
-lpad27: ; preds = %lpad
- %eh_ptr28 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select30 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btConnectivityProcessorD1Ev(%struct.btConnectivityProcessor* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btConnectivityProcessor, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btConnectivityProcessorD0Ev(%struct.btConnectivityProcessor* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV23btConnectivityProcessor, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btConnectivityProcessor* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btConnectivityProcessor15processTriangleEP9btVector3ii(%struct.btConnectivityProcessor* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = alloca %struct.btHashInt, align 8 ; [#uses=2]
- %sharedVertsA = alloca [3 x i32], align 4 ; [#uses=4]
- %sharedVertsB = alloca [3 x i32], align 4 ; [#uses=4]
- %tA = alloca %struct.btTriangleShape, align 8 ; [#uses=17]
- %tB = alloca %struct.btTriangleShape, align 8 ; [#uses=16]
- %tmp18 = alloca %struct.btTriangleInfo, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=2]
- %3 = icmp eq i32 %2, %partId ; [#uses=1]
- br i1 %3, label %bb, label %bb1
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 2 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp eq i32 %5, %triangleIndex ; [#uses=1]
- br i1 %6, label %return, label %bb1
-
-bb1: ; preds = %bb, %entry
- %7 = getelementptr inbounds [3 x i32]* %sharedVertsA, i32 0, i32 0 ; [#uses=4]
- store i32 -1, i32* %7, align 4
- %8 = getelementptr inbounds [3 x i32]* %sharedVertsA, i32 0, i32 1 ; [#uses=4]
- store i32 -1, i32* %8, align 4
- %9 = getelementptr inbounds [3 x i32]* %sharedVertsA, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %9, align 4
- %10 = getelementptr inbounds [3 x i32]* %sharedVertsB, i32 0, i32 0 ; [#uses=4]
- store i32 -1, i32* %10, align 4
- %11 = getelementptr inbounds [3 x i32]* %sharedVertsB, i32 0, i32 1 ; [#uses=4]
- store i32 -1, i32* %11, align 4
- %12 = getelementptr inbounds [3 x i32]* %sharedVertsB, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fsub float %14, %16 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = fsub float %19, %21 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=2]
- %27 = fsub float %24, %26 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fsub float %29, %16 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fsub float %32, %21 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fsub float %35, %26 ; [#uses=2]
- %37 = fmul float %36, %22 ; [#uses=1]
- %38 = fmul float %33, %27 ; [#uses=1]
- %39 = fsub float %37, %38 ; [#uses=2]
- %40 = fmul float %30, %27 ; [#uses=1]
- %41 = fmul float %36, %17 ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=2]
- %43 = fmul float %33, %17 ; [#uses=1]
- %44 = fmul float %30, %22 ; [#uses=1]
- %45 = fsub float %43, %44 ; [#uses=2]
- %46 = fmul float %45, %45 ; [#uses=1]
- %47 = fmul float %42, %42 ; [#uses=1]
- %48 = fadd float %46, %47 ; [#uses=1]
- %49 = fmul float %39, %39 ; [#uses=1]
- %50 = fadd float %48, %49 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 4 ; [#uses=3]
- %52 = load %struct.btTriangleInfoMap** %51, align 4 ; [#uses=9]
- %53 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 4 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=2]
- %55 = fcmp ogt float %54, %50 ; [#uses=1]
- br i1 %55, label %return, label %bb2
-
-bb2: ; preds = %bb1
- %56 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 3 ; [#uses=3]
- %57 = load %struct.btQuadWord** %56, align 4 ; [#uses=12]
- %58 = getelementptr inbounds %struct.btQuadWord* %57, i32 2, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %57, i32 0, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=2]
- %62 = fsub float %59, %61 ; [#uses=2]
- %63 = getelementptr inbounds %struct.btQuadWord* %57, i32 2, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuadWord* %57, i32 0, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=2]
- %67 = fsub float %64, %66 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btQuadWord* %57, i32 2, i32 0, i32 0 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btQuadWord* %57, i32 0, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=2]
- %72 = fsub float %69, %71 ; [#uses=2]
- %73 = getelementptr inbounds %struct.btQuadWord* %57, i32 1, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fsub float %74, %61 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btQuadWord* %57, i32 1, i32 0, i32 1 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fsub float %77, %66 ; [#uses=2]
- %79 = getelementptr inbounds %struct.btQuadWord* %57, i32 1, i32 0, i32 0 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fsub float %80, %71 ; [#uses=2]
- %82 = fmul float %81, %67 ; [#uses=1]
- %83 = fmul float %78, %72 ; [#uses=1]
- %84 = fsub float %82, %83 ; [#uses=2]
- %85 = fmul float %75, %72 ; [#uses=1]
- %86 = fmul float %81, %62 ; [#uses=1]
- %87 = fsub float %85, %86 ; [#uses=2]
- %88 = fmul float %78, %62 ; [#uses=1]
- %89 = fmul float %75, %67 ; [#uses=1]
- %90 = fsub float %88, %89 ; [#uses=2]
- %91 = fmul float %90, %90 ; [#uses=1]
- %92 = fmul float %87, %87 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %84, %84 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fcmp ogt float %54, %95 ; [#uses=1]
- br i1 %96, label %return, label %bb11
-
-bb5: ; preds = %bb8
- %scevgep249 = getelementptr %struct.btQuadWord* %triangle, i32 %119, i32 0, i32 2 ; [#uses=1]
- %scevgep248 = getelementptr %struct.btQuadWord* %triangle, i32 %119, i32 0, i32 1 ; [#uses=1]
- %scevgep247 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %119, i32 0, i32 0 ; [#uses=1]
- %scevgep255 = getelementptr %struct.btQuadWord* %57, i32 %123, i32 0, i32 2 ; [#uses=1]
- %97 = load float* %scevgep255, align 4 ; [#uses=1]
- %98 = load float* %scevgep249, align 4 ; [#uses=1]
- %99 = fsub float %97, %98 ; [#uses=2]
- %scevgep254 = getelementptr %struct.btQuadWord* %57, i32 %123, i32 0, i32 1 ; [#uses=1]
- %100 = load float* %scevgep254, align 4 ; [#uses=1]
- %101 = load float* %scevgep248, align 4 ; [#uses=1]
- %102 = fsub float %100, %101 ; [#uses=2]
- %scevgep252253 = getelementptr inbounds %struct.btQuadWord* %57, i32 %123, i32 0, i32 0 ; [#uses=1]
- %103 = load float* %scevgep252253, align 4 ; [#uses=1]
- %104 = load float* %scevgep247, align 4 ; [#uses=1]
- %105 = fsub float %103, %104 ; [#uses=2]
- %106 = fmul float %105, %105 ; [#uses=1]
- %107 = fmul float %102, %102 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %99, %99 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 4 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fcmp olt float %110, %112 ; [#uses=1]
- br i1 %113, label %bb6, label %bb7
-
-bb6: ; preds = %bb5
- %114 = getelementptr inbounds [3 x i32]* %sharedVertsA, i32 0, i32 %numshared.1 ; [#uses=1]
- store i32 %123, i32* %114, align 4
- %115 = getelementptr inbounds [3 x i32]* %sharedVertsB, i32 0, i32 %numshared.1 ; [#uses=1]
- store i32 %119, i32* %115, align 4
- %116 = add nsw i32 %numshared.1, 1 ; [#uses=2]
- %117 = icmp sgt i32 %116, 2 ; [#uses=1]
- br i1 %117, label %return, label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %numshared.0 = phi i32 [ %116, %bb6 ], [ %numshared.1, %bb5 ] ; [#uses=1]
- %118 = add nsw i32 %119, 1 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb11, %bb7
- %numshared.1 = phi i32 [ %numshared.0, %bb7 ], [ %numshared.2, %bb11 ] ; [#uses=6]
- %119 = phi i32 [ %118, %bb7 ], [ 0, %bb11 ] ; [#uses=6]
- %120 = icmp slt i32 %119, 3 ; [#uses=1]
- br i1 %120, label %bb5, label %bb9
-
-bb9: ; preds = %bb8
- %121 = icmp sgt i32 %numshared.1, 2 ; [#uses=1]
- br i1 %121, label %return, label %bb10
-
-bb10: ; preds = %bb9
- %122 = add nsw i32 %123, 1 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb10, %bb2
- %numshared.2 = phi i32 [ %numshared.1, %bb10 ], [ 0, %bb2 ] ; [#uses=2]
- %123 = phi i32 [ %122, %bb10 ], [ 0, %bb2 ] ; [#uses=6]
- %124 = icmp slt i32 %123, 3 ; [#uses=1]
- br i1 %124, label %bb8, label %bb12
-
-bb12: ; preds = %bb11
- %cond = icmp eq i32 %numshared.2, 2 ; [#uses=1]
- br i1 %cond, label %bb13, label %return
-
-bb13: ; preds = %bb12
- %125 = load i32* %7, align 4 ; [#uses=1]
- %126 = icmp eq i32 %125, 0 ; [#uses=1]
- br i1 %126, label %bb14, label %bb16
-
-bb14: ; preds = %bb13
- %127 = load i32* %8, align 4 ; [#uses=1]
- %128 = icmp eq i32 %127, 2 ; [#uses=1]
- br i1 %128, label %bb15, label %bb16
-
-bb15: ; preds = %bb14
- store i32 2, i32* %7, align 4
- store i32 0, i32* %8, align 4
- %129 = load i32* %11, align 4 ; [#uses=1]
- %130 = load i32* %10, align 4 ; [#uses=1]
- store i32 %130, i32* %11, align 4
- store i32 %129, i32* %10, align 4
- br label %bb16
-
-bb16: ; preds = %bb15, %bb14, %bb13
- %131 = getelementptr inbounds %struct.btConnectivityProcessor* %this, i32 0, i32 2 ; [#uses=1]
- %132 = load i32* %131, align 4 ; [#uses=2]
- %133 = shl i32 %2, 21 ; [#uses=1]
- %134 = or i32 %133, %132 ; [#uses=4]
- %135 = shl i32 %132, 15 ; [#uses=1]
- %not.i.i.i = xor i32 %135, -1 ; [#uses=1]
- %136 = add nsw i32 %134, %not.i.i.i ; [#uses=2]
- %137 = ashr i32 %136, 10 ; [#uses=1]
- %138 = xor i32 %137, %136 ; [#uses=1]
- %139 = mul i32 %138, 9 ; [#uses=2]
- %140 = ashr i32 %139, 6 ; [#uses=1]
- %141 = xor i32 %140, %139 ; [#uses=2]
- %142 = shl i32 %141, 11 ; [#uses=1]
- %not2.i.i.i = xor i32 %142, -1 ; [#uses=1]
- %143 = add nsw i32 %141, %not2.i.i.i ; [#uses=2]
- %144 = ashr i32 %143, 16 ; [#uses=1]
- %145 = xor i32 %144, %143 ; [#uses=2]
- %146 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 1, i32 2, i32 2 ; [#uses=1]
- %147 = load i32* %146, align 4 ; [#uses=1]
- %148 = add nsw i32 %147, -1 ; [#uses=1]
- %149 = and i32 %145, %148 ; [#uses=2]
- %150 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %151 = load i32* %150, align 4 ; [#uses=1]
- %152 = icmp ugt i32 %151, %149 ; [#uses=1]
- br i1 %152, label %bb1.i.i, label %bb17
-
-bb1.i.i: ; preds = %bb16
- %153 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %154 = load i32** %153, align 4 ; [#uses=1]
- %155 = getelementptr inbounds i32* %154, i32 %149 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 1, i32 3, i32 3 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 1, i32 1, i32 3 ; [#uses=1]
- br label %bb3.i.i
-
-bb2.i.i: ; preds = %bb4.i.i
- %158 = load i32** %157, align 4 ; [#uses=1]
- %159 = getelementptr inbounds i32* %158, i32 %index.0.i.i ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %bb1.i.i
- %index.0.in.i.i = phi i32* [ %155, %bb1.i.i ], [ %159, %bb2.i.i ] ; [#uses=1]
- %index.0.i.i = load i32* %index.0.in.i.i, align 4 ; [#uses=4]
- %160 = icmp eq i32 %index.0.i.i, -1 ; [#uses=1]
- br i1 %160, label %bb17, label %bb4.i.i
-
-bb4.i.i: ; preds = %bb3.i.i
- %161 = load %struct.btHashInt** %156, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btHashInt* %161, i32 %index.0.i.i, i32 0 ; [#uses=1]
- %163 = load i32* %162, align 4 ; [#uses=1]
- %164 = icmp eq i32 %134, %163 ; [#uses=1]
- br i1 %164, label %_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit, label %bb2.i.i
-
-_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit: ; preds = %bb4.i.i
- %165 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 1, i32 2, i32 3 ; [#uses=1]
- %166 = load %struct.btTriangleInfo** %165, align 4 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btTriangleInfo* %166, i32 %index.0.i.i ; [#uses=2]
- %168 = icmp eq %struct.btTriangleInfo* %167, null ; [#uses=1]
- br i1 %168, label %bb17, label %bb19
-
-bb17: ; preds = %_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit, %bb3.i.i, %bb16
- %169 = getelementptr inbounds %struct.btTriangleInfo* %tmp18, i32 0, i32 1 ; [#uses=1]
- store float 0x401921FB60000000, float* %169, align 4
- %170 = getelementptr inbounds %struct.btTriangleInfo* %tmp18, i32 0, i32 2 ; [#uses=1]
- store float 0x401921FB60000000, float* %170, align 8
- %171 = getelementptr inbounds %struct.btTriangleInfo* %tmp18, i32 0, i32 3 ; [#uses=1]
- store float 0x401921FB60000000, float* %171, align 4
- %172 = getelementptr inbounds %struct.btTriangleInfo* %tmp18, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %172, align 8
- %173 = getelementptr inbounds %struct.btHashInt* %0, i32 0, i32 0 ; [#uses=1]
- store i32 %134, i32* %173, align 8
- %174 = getelementptr inbounds %struct.btTriangleInfoMap* %52, i32 0, i32 1 ; [#uses=1]
- call void @_ZN9btHashMapI9btHashInt14btTriangleInfoE6insertERKS0_RKS1_(%"struct.btHashMap<btHashInt,btTriangleInfo>"* %174, %struct.btHashInt* %0, %struct.btTriangleInfo* %tmp18)
- %175 = load %struct.btTriangleInfoMap** %51, align 4 ; [#uses=6]
- %176 = getelementptr inbounds %struct.btTriangleInfoMap* %175, i32 0, i32 1, i32 2, i32 2 ; [#uses=1]
- %177 = load i32* %176, align 4 ; [#uses=1]
- %178 = add nsw i32 %177, -1 ; [#uses=1]
- %179 = and i32 %178, %145 ; [#uses=2]
- %180 = getelementptr inbounds %struct.btTriangleInfoMap* %175, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %181 = load i32* %180, align 4 ; [#uses=1]
- %182 = icmp ugt i32 %181, %179 ; [#uses=1]
- br i1 %182, label %bb1.i.i110, label %bb19
-
-bb1.i.i110: ; preds = %bb17
- %183 = getelementptr inbounds %struct.btTriangleInfoMap* %175, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %184 = load i32** %183, align 4 ; [#uses=1]
- %185 = getelementptr inbounds i32* %184, i32 %179 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btTriangleInfoMap* %175, i32 0, i32 1, i32 3, i32 3 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btTriangleInfoMap* %175, i32 0, i32 1, i32 1, i32 3 ; [#uses=1]
- br label %bb3.i.i114
-
-bb2.i.i111: ; preds = %bb4.i.i115
- %188 = load i32** %187, align 4 ; [#uses=1]
- %189 = getelementptr inbounds i32* %188, i32 %index.0.i.i113 ; [#uses=1]
- br label %bb3.i.i114
-
-bb3.i.i114: ; preds = %bb2.i.i111, %bb1.i.i110
- %index.0.in.i.i112 = phi i32* [ %185, %bb1.i.i110 ], [ %189, %bb2.i.i111 ] ; [#uses=1]
- %index.0.i.i113 = load i32* %index.0.in.i.i112, align 4 ; [#uses=4]
- %190 = icmp eq i32 %index.0.i.i113, -1 ; [#uses=1]
- br i1 %190, label %bb19, label %bb4.i.i115
-
-bb4.i.i115: ; preds = %bb3.i.i114
- %191 = load %struct.btHashInt** %186, align 4 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btHashInt* %191, i32 %index.0.i.i113, i32 0 ; [#uses=1]
- %193 = load i32* %192, align 4 ; [#uses=1]
- %194 = icmp eq i32 %134, %193 ; [#uses=1]
- br i1 %194, label %bb1.i116, label %bb2.i.i111
-
-bb1.i116: ; preds = %bb4.i.i115
- %195 = getelementptr inbounds %struct.btTriangleInfoMap* %175, i32 0, i32 1, i32 2, i32 3 ; [#uses=1]
- %196 = load %struct.btTriangleInfo** %195, align 4 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btTriangleInfo* %196, i32 %index.0.i.i113 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb1.i116, %bb3.i.i114, %bb17, %_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit
- %info.0 = phi %struct.btTriangleInfo* [ %197, %bb1.i116 ], [ %167, %_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit ], [ null, %bb17 ], [ null, %bb3.i.i114 ] ; [#uses=9]
- %198 = load i32* %7, align 4 ; [#uses=7]
- %199 = load i32* %8, align 4 ; [#uses=4]
- %200 = add nsw i32 %199, %198 ; [#uses=2]
- %201 = load %struct.btQuadWord** %56, align 4 ; [#uses=18]
- %202 = getelementptr inbounds %struct.btQuadWord* %201, i32 %199, i32 0, i32 2 ; [#uses=1]
- %203 = load float* %202, align 4 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btQuadWord* %201, i32 %198, i32 0, i32 2 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=1]
- %206 = fsub float %203, %205 ; [#uses=3]
- %207 = getelementptr inbounds %struct.btQuadWord* %201, i32 %199, i32 0, i32 1 ; [#uses=1]
- %208 = load float* %207, align 4 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btQuadWord* %201, i32 %198, i32 0, i32 1 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=1]
- %211 = fsub float %208, %210 ; [#uses=3]
- %212 = getelementptr inbounds %struct.btQuadWord* %201, i32 %199, i32 0, i32 0 ; [#uses=1]
- %213 = load float* %212, align 4 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btQuadWord* %201, i32 %198, i32 0, i32 0 ; [#uses=1]
- %215 = load float* %214, align 4 ; [#uses=1]
- %216 = fsub float %213, %215 ; [#uses=3]
- %217 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %217)
- %218 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV15btTriangleShape, i32 0, i32 2), i32 (...)*** %218, align 8
- %219 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %219, align 4
- %220 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=2]
- %221 = getelementptr inbounds %struct.btQuadWord* %201, i32 0, i32 0, i32 0 ; [#uses=1]
- %222 = load float* %221, align 4 ; [#uses=1]
- store float %222, float* %220, align 4
- %223 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=2]
- %224 = getelementptr inbounds %struct.btQuadWord* %201, i32 0, i32 0, i32 1 ; [#uses=1]
- %225 = load float* %224, align 4 ; [#uses=1]
- store float %225, float* %223, align 4
- %226 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=2]
- %227 = getelementptr inbounds %struct.btQuadWord* %201, i32 0, i32 0, i32 2 ; [#uses=1]
- %228 = load float* %227, align 4 ; [#uses=1]
- store float %228, float* %226, align 4
- %229 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btQuadWord* %201, i32 0, i32 0, i32 3 ; [#uses=1]
- %231 = load float* %230, align 4 ; [#uses=1]
- store float %231, float* %229, align 4
- %232 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %233 = getelementptr inbounds %struct.btQuadWord* %201, i32 1, i32 0, i32 0 ; [#uses=1]
- %234 = load float* %233, align 4 ; [#uses=1]
- store float %234, float* %232, align 4
- %235 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %236 = getelementptr inbounds %struct.btQuadWord* %201, i32 1, i32 0, i32 1 ; [#uses=1]
- %237 = load float* %236, align 4 ; [#uses=1]
- store float %237, float* %235, align 4
- %238 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %239 = getelementptr inbounds %struct.btQuadWord* %201, i32 1, i32 0, i32 2 ; [#uses=1]
- %240 = load float* %239, align 4 ; [#uses=1]
- store float %240, float* %238, align 4
- %241 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %242 = getelementptr inbounds %struct.btQuadWord* %201, i32 1, i32 0, i32 3 ; [#uses=1]
- %243 = load float* %242, align 4 ; [#uses=1]
- store float %243, float* %241, align 4
- %244 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=2]
- %245 = getelementptr inbounds %struct.btQuadWord* %201, i32 2, i32 0, i32 0 ; [#uses=1]
- %246 = load float* %245, align 4 ; [#uses=1]
- store float %246, float* %244, align 4
- %247 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=2]
- %248 = getelementptr inbounds %struct.btQuadWord* %201, i32 2, i32 0, i32 1 ; [#uses=1]
- %249 = load float* %248, align 4 ; [#uses=1]
- store float %249, float* %247, align 4
- %250 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=2]
- %251 = getelementptr inbounds %struct.btQuadWord* %201, i32 2, i32 0, i32 2 ; [#uses=1]
- %252 = load float* %251, align 4 ; [#uses=1]
- store float %252, float* %250, align 4
- %253 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %254 = getelementptr inbounds %struct.btQuadWord* %201, i32 2, i32 0, i32 3 ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=1]
- store float %255, float* %253, align 4
- %256 = load i32* %10, align 4 ; [#uses=5]
- %257 = load i32* %11, align 4 ; [#uses=5]
- %.neg237 = sub i32 3, %256 ; [#uses=1]
- %258 = sub i32 %.neg237, %257 ; [#uses=4]
- %259 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %259)
- to label %invcont unwind label %ppad
-
-invcont: ; preds = %bb19
- %260 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV15btTriangleShape, i32 0, i32 2), i32 (...)*** %260, align 8
- %261 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %261, align 4
- %262 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %257, i32 0, i32 0 ; [#uses=1]
- %264 = load float* %263, align 4 ; [#uses=3]
- store float %264, float* %262, align 4
- %265 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %257, i32 0, i32 1 ; [#uses=1]
- %267 = load float* %266, align 4 ; [#uses=3]
- store float %267, float* %265, align 4
- %268 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %269 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %257, i32 0, i32 2 ; [#uses=1]
- %270 = load float* %269, align 4 ; [#uses=3]
- store float %270, float* %268, align 4
- %271 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %272 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %257, i32 0, i32 3 ; [#uses=1]
- %273 = load float* %272, align 4 ; [#uses=1]
- store float %273, float* %271, align 4
- %274 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %256, i32 0, i32 0 ; [#uses=1]
- %276 = load float* %275, align 4 ; [#uses=3]
- store float %276, float* %274, align 4
- %277 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %278 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %256, i32 0, i32 1 ; [#uses=1]
- %279 = load float* %278, align 4 ; [#uses=3]
- store float %279, float* %277, align 4
- %280 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %256, i32 0, i32 2 ; [#uses=1]
- %282 = load float* %281, align 4 ; [#uses=3]
- store float %282, float* %280, align 4
- %283 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %284 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %256, i32 0, i32 3 ; [#uses=1]
- %285 = load float* %284, align 4 ; [#uses=1]
- store float %285, float* %283, align 4
- %286 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %287 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %258, i32 0, i32 0 ; [#uses=1]
- %288 = load float* %287, align 4 ; [#uses=3]
- store float %288, float* %286, align 4
- %289 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %290 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %258, i32 0, i32 1 ; [#uses=1]
- %291 = load float* %290, align 4 ; [#uses=3]
- store float %291, float* %289, align 4
- %292 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %293 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %258, i32 0, i32 2 ; [#uses=1]
- %294 = load float* %293, align 4 ; [#uses=3]
- store float %294, float* %292, align 4
- %295 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %296 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 %258, i32 0, i32 3 ; [#uses=1]
- %297 = load float* %296, align 4 ; [#uses=1]
- store float %297, float* %295, align 4
- %298 = sub nsw i32 3, %200 ; [#uses=3]
- %299 = load float* %250, align 4 ; [#uses=1]
- %300 = load float* %226, align 4 ; [#uses=2]
- %301 = fsub float %299, %300 ; [#uses=2]
- %302 = load float* %247, align 4 ; [#uses=1]
- %303 = load float* %223, align 4 ; [#uses=2]
- %304 = fsub float %302, %303 ; [#uses=2]
- %305 = load float* %244, align 4 ; [#uses=1]
- %306 = load float* %220, align 4 ; [#uses=2]
- %307 = fsub float %305, %306 ; [#uses=2]
- %308 = load float* %238, align 4 ; [#uses=1]
- %309 = fsub float %308, %300 ; [#uses=2]
- %310 = load float* %235, align 4 ; [#uses=1]
- %311 = fsub float %310, %303 ; [#uses=2]
- %312 = load float* %232, align 4 ; [#uses=1]
- %313 = fsub float %312, %306 ; [#uses=2]
- %314 = fmul float %313, %304 ; [#uses=1]
- %315 = fmul float %311, %307 ; [#uses=1]
- %316 = fsub float %314, %315 ; [#uses=3]
- %317 = fmul float %309, %307 ; [#uses=1]
- %318 = fmul float %313, %301 ; [#uses=1]
- %319 = fsub float %317, %318 ; [#uses=3]
- %320 = fmul float %311, %301 ; [#uses=1]
- %321 = fmul float %309, %304 ; [#uses=1]
- %322 = fsub float %320, %321 ; [#uses=3]
- %323 = fmul float %322, %322 ; [#uses=1]
- %324 = fmul float %319, %319 ; [#uses=1]
- %325 = fadd float %323, %324 ; [#uses=1]
- %326 = fmul float %316, %316 ; [#uses=1]
- %327 = fadd float %325, %326 ; [#uses=1]
- %328 = call float @sqrtf(float %327) nounwind readonly ; [#uses=1]
- %329 = fdiv float 1.000000e+00, %328 ; [#uses=3]
- %330 = fmul float %322, %329 ; [#uses=15]
- %331 = fmul float %319, %329 ; [#uses=15]
- %332 = fmul float %316, %329 ; [#uses=15]
- %333 = fsub float %294, %270 ; [#uses=2]
- %334 = fsub float %291, %267 ; [#uses=2]
- %335 = fsub float %288, %264 ; [#uses=2]
- %336 = fsub float %282, %270 ; [#uses=2]
- %337 = fsub float %279, %267 ; [#uses=2]
- %338 = fsub float %276, %264 ; [#uses=2]
- %339 = fmul float %338, %334 ; [#uses=1]
- %340 = fmul float %337, %335 ; [#uses=1]
- %341 = fsub float %339, %340 ; [#uses=3]
- %342 = fmul float %336, %335 ; [#uses=1]
- %343 = fmul float %338, %333 ; [#uses=1]
- %344 = fsub float %342, %343 ; [#uses=3]
- %345 = fmul float %337, %333 ; [#uses=1]
- %346 = fmul float %336, %334 ; [#uses=1]
- %347 = fsub float %345, %346 ; [#uses=3]
- %348 = fmul float %347, %347 ; [#uses=1]
- %349 = fmul float %344, %344 ; [#uses=1]
- %350 = fadd float %348, %349 ; [#uses=1]
- %351 = fmul float %341, %341 ; [#uses=1]
- %352 = fadd float %350, %351 ; [#uses=1]
- %353 = call float @sqrtf(float %352) nounwind readonly ; [#uses=1]
- %354 = fdiv float 1.000000e+00, %353 ; [#uses=3]
- %355 = fmul float %347, %354 ; [#uses=5]
- %356 = fmul float %344, %354 ; [#uses=5]
- %357 = fmul float %341, %354 ; [#uses=5]
- %358 = fmul float %216, %216 ; [#uses=1]
- %359 = fmul float %211, %211 ; [#uses=1]
- %360 = fadd float %358, %359 ; [#uses=1]
- %361 = fmul float %206, %206 ; [#uses=1]
- %362 = fadd float %360, %361 ; [#uses=1]
- %363 = call float @sqrtf(float %362) nounwind readonly ; [#uses=1]
- %364 = fdiv float 1.000000e+00, %363 ; [#uses=3]
- %365 = fmul float %216, %364 ; [#uses=4]
- %366 = fmul float %211, %364 ; [#uses=4]
- %367 = fmul float %206, %364 ; [#uses=4]
- %368 = fmul float %365, %331 ; [#uses=1]
- %369 = fmul float %366, %330 ; [#uses=1]
- %370 = fsub float %368, %369 ; [#uses=3]
- %371 = fmul float %367, %330 ; [#uses=1]
- %372 = fmul float %365, %332 ; [#uses=1]
- %373 = fsub float %371, %372 ; [#uses=3]
- %374 = fmul float %366, %332 ; [#uses=1]
- %375 = fmul float %367, %331 ; [#uses=1]
- %376 = fsub float %374, %375 ; [#uses=3]
- %377 = fmul float %376, %376 ; [#uses=1]
- %378 = fmul float %373, %373 ; [#uses=1]
- %379 = fadd float %377, %378 ; [#uses=1]
- %380 = fmul float %370, %370 ; [#uses=1]
- %381 = fadd float %379, %380 ; [#uses=1]
- %382 = call float @sqrtf(float %381) nounwind readonly ; [#uses=1]
- %383 = fdiv float 1.000000e+00, %382 ; [#uses=3]
- %384 = fmul float %376, %383 ; [#uses=3]
- %385 = fmul float %373, %383 ; [#uses=3]
- %386 = fmul float %370, %383 ; [#uses=3]
- %387 = load %struct.btQuadWord** %56, align 4 ; [#uses=24]
- %388 = getelementptr inbounds %struct.btQuadWord* %387, i32 %298, i32 0, i32 2 ; [#uses=1]
- %389 = load float* %388, align 4 ; [#uses=1]
- %390 = getelementptr inbounds %struct.btQuadWord* %387, i32 %198, i32 0, i32 2 ; [#uses=1]
- %391 = load float* %390, align 4 ; [#uses=1]
- %392 = fsub float %389, %391 ; [#uses=1]
- %393 = getelementptr inbounds %struct.btQuadWord* %387, i32 %298, i32 0, i32 1 ; [#uses=1]
- %394 = load float* %393, align 4 ; [#uses=1]
- %395 = getelementptr inbounds %struct.btQuadWord* %387, i32 %198, i32 0, i32 1 ; [#uses=1]
- %396 = load float* %395, align 4 ; [#uses=1]
- %397 = fsub float %394, %396 ; [#uses=1]
- %398 = getelementptr inbounds %struct.btQuadWord* %387, i32 %298, i32 0, i32 0 ; [#uses=1]
- %399 = load float* %398, align 4 ; [#uses=1]
- %400 = getelementptr inbounds %struct.btQuadWord* %387, i32 %198, i32 0, i32 0 ; [#uses=1]
- %401 = load float* %400, align 4 ; [#uses=1]
- %402 = fsub float %399, %401 ; [#uses=1]
- %403 = fmul float %384, %402 ; [#uses=1]
- %404 = fmul float %385, %397 ; [#uses=1]
- %405 = fadd float %403, %404 ; [#uses=1]
- %406 = fmul float %386, %392 ; [#uses=1]
- %407 = fadd float %405, %406 ; [#uses=1]
- %408 = fcmp olt float %407, 0.000000e+00 ; [#uses=1]
- br i1 %408, label %bb22, label %bb23
-
-bb22: ; preds = %invcont
- %409 = fmul float %384, -1.000000e+00 ; [#uses=1]
- %410 = fmul float %385, -1.000000e+00 ; [#uses=1]
- %411 = fmul float %386, -1.000000e+00 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb22, %invcont
- %edgeCrossA.0.0.0 = phi float [ %409, %bb22 ], [ %384, %invcont ] ; [#uses=5]
- %edgeCrossA.0.1.0 = phi float [ %410, %bb22 ], [ %385, %invcont ] ; [#uses=5]
- %edgeCrossA.0.2.0 = phi float [ %411, %bb22 ], [ %386, %invcont ] ; [#uses=5]
- %412 = fmul float %365, %356 ; [#uses=1]
- %413 = fmul float %366, %355 ; [#uses=1]
- %414 = fsub float %412, %413 ; [#uses=3]
- %415 = fmul float %367, %355 ; [#uses=1]
- %416 = fmul float %365, %357 ; [#uses=1]
- %417 = fsub float %415, %416 ; [#uses=3]
- %418 = fmul float %366, %357 ; [#uses=1]
- %419 = fmul float %367, %356 ; [#uses=1]
- %420 = fsub float %418, %419 ; [#uses=3]
- %421 = fmul float %420, %420 ; [#uses=1]
- %422 = fmul float %417, %417 ; [#uses=1]
- %423 = fadd float %421, %422 ; [#uses=1]
- %424 = fmul float %414, %414 ; [#uses=1]
- %425 = fadd float %423, %424 ; [#uses=1]
- %426 = call float @sqrtf(float %425) nounwind readonly ; [#uses=1]
- %427 = fdiv float 1.000000e+00, %426 ; [#uses=3]
- %428 = fmul float %420, %427 ; [#uses=3]
- %429 = fmul float %417, %427 ; [#uses=3]
- %430 = fmul float %414, %427 ; [#uses=3]
- %431 = fsub float %294, %282 ; [#uses=1]
- %432 = fsub float %291, %279 ; [#uses=1]
- %433 = fsub float %288, %276 ; [#uses=1]
- %434 = fmul float %428, %433 ; [#uses=1]
- %435 = fmul float %429, %432 ; [#uses=1]
- %436 = fadd float %434, %435 ; [#uses=1]
- %437 = fmul float %430, %431 ; [#uses=1]
- %438 = fadd float %436, %437 ; [#uses=1]
- %439 = fcmp olt float %438, 0.000000e+00 ; [#uses=1]
- br i1 %439, label %bb26, label %bb27
-
-bb26: ; preds = %bb23
- %440 = fmul float %428, -1.000000e+00 ; [#uses=1]
- %441 = fmul float %429, -1.000000e+00 ; [#uses=1]
- %442 = fmul float %430, -1.000000e+00 ; [#uses=1]
- br label %bb27
-
-bb27: ; preds = %bb26, %bb23
- %edgeCrossB.0.0.0 = phi float [ %440, %bb26 ], [ %428, %bb23 ] ; [#uses=5]
- %edgeCrossB.0.1.0 = phi float [ %441, %bb26 ], [ %429, %bb23 ] ; [#uses=5]
- %edgeCrossB.0.2.0 = phi float [ %442, %bb26 ], [ %430, %bb23 ] ; [#uses=5]
- %443 = fmul float %edgeCrossA.0.0.0, %edgeCrossB.0.1.0 ; [#uses=1]
- %444 = fmul float %edgeCrossA.0.1.0, %edgeCrossB.0.0.0 ; [#uses=1]
- %445 = fsub float %443, %444 ; [#uses=3]
- %446 = fmul float %edgeCrossA.0.2.0, %edgeCrossB.0.0.0 ; [#uses=1]
- %447 = fmul float %edgeCrossA.0.0.0, %edgeCrossB.0.2.0 ; [#uses=1]
- %448 = fsub float %446, %447 ; [#uses=3]
- %449 = fmul float %edgeCrossA.0.1.0, %edgeCrossB.0.2.0 ; [#uses=1]
- %450 = fmul float %edgeCrossA.0.2.0, %edgeCrossB.0.1.0 ; [#uses=1]
- %451 = fsub float %449, %450 ; [#uses=3]
- %452 = fmul float %451, %451 ; [#uses=1]
- %453 = fmul float %448, %448 ; [#uses=1]
- %454 = fadd float %452, %453 ; [#uses=1]
- %455 = fmul float %445, %445 ; [#uses=1]
- %456 = fadd float %454, %455 ; [#uses=2]
- %457 = load %struct.btTriangleInfoMap** %51, align 4 ; [#uses=1]
- %458 = getelementptr inbounds %struct.btTriangleInfoMap* %457, i32 0, i32 3 ; [#uses=1]
- %459 = load float* %458, align 4 ; [#uses=1]
- %460 = fcmp ogt float %459, %456 ; [#uses=1]
- br i1 %460, label %bb36, label %bb29
-
-bb29: ; preds = %bb27
- %461 = call float @sqrtf(float %456) nounwind readonly ; [#uses=1]
- %462 = fdiv float 1.000000e+00, %461 ; [#uses=3]
- %463 = fmul float %451, %462 ; [#uses=2]
- %464 = fmul float %448, %462 ; [#uses=2]
- %465 = fmul float %445, %462 ; [#uses=2]
- %466 = fmul float %463, %edgeCrossA.0.1.0 ; [#uses=1]
- %467 = fmul float %464, %edgeCrossA.0.0.0 ; [#uses=1]
- %468 = fsub float %466, %467 ; [#uses=3]
- %469 = fmul float %465, %edgeCrossA.0.0.0 ; [#uses=1]
- %470 = fmul float %463, %edgeCrossA.0.2.0 ; [#uses=1]
- %471 = fsub float %469, %470 ; [#uses=3]
- %472 = fmul float %464, %edgeCrossA.0.2.0 ; [#uses=1]
- %473 = fmul float %465, %edgeCrossA.0.1.0 ; [#uses=1]
- %474 = fsub float %472, %473 ; [#uses=3]
- %475 = fmul float %474, %474 ; [#uses=1]
- %476 = fmul float %471, %471 ; [#uses=1]
- %477 = fadd float %475, %476 ; [#uses=1]
- %478 = fmul float %468, %468 ; [#uses=1]
- %479 = fadd float %477, %478 ; [#uses=1]
- %480 = call float @sqrtf(float %479) nounwind readonly ; [#uses=1]
- %481 = fdiv float 1.000000e+00, %480 ; [#uses=3]
- %482 = fmul float %474, %481 ; [#uses=1]
- %483 = fmul float %471, %481 ; [#uses=1]
- %484 = fmul float %468, %481 ; [#uses=1]
- %485 = fmul float %edgeCrossB.0.0.0, %edgeCrossA.0.0.0 ; [#uses=1]
- %486 = fmul float %edgeCrossB.0.1.0, %edgeCrossA.0.1.0 ; [#uses=1]
- %487 = fadd float %485, %486 ; [#uses=1]
- %488 = fmul float %edgeCrossB.0.2.0, %edgeCrossA.0.2.0 ; [#uses=1]
- %489 = fadd float %487, %488 ; [#uses=1]
- %490 = fmul float %edgeCrossB.0.0.0, %482 ; [#uses=1]
- %491 = fmul float %edgeCrossB.0.1.0, %483 ; [#uses=1]
- %492 = fadd float %490, %491 ; [#uses=1]
- %493 = fmul float %edgeCrossB.0.2.0, %484 ; [#uses=1]
- %494 = fadd float %492, %493 ; [#uses=1]
- %495 = call float @atan2f(float %494, float %489) nounwind readonly ; [#uses=1]
- %496 = fsub float 0x400921FB60000000, %495 ; [#uses=2]
- %497 = fmul float %330, %edgeCrossB.0.0.0 ; [#uses=1]
- %498 = fmul float %331, %edgeCrossB.0.1.0 ; [#uses=1]
- %499 = fadd float %497, %498 ; [#uses=1]
- %500 = fmul float %332, %edgeCrossB.0.2.0 ; [#uses=1]
- %501 = fadd float %499, %500 ; [#uses=1]
- %502 = fcmp olt float %501, 0.000000e+00 ; [#uses=2]
- %503 = zext i1 %502 to i8 ; [#uses=2]
- br i1 %502, label %bb36, label %bb32
-
-bb32: ; preds = %bb29
- %504 = fsub float -0.000000e+00, %496 ; [#uses=1]
- br label %bb36
-
-bb36: ; preds = %bb32, %bb29, %bb27
- %correctedAngle.0 = phi float [ 0.000000e+00, %bb27 ], [ %504, %bb32 ], [ %496, %bb29 ] ; [#uses=6]
- %isConvex.0 = phi i8 [ 0, %bb27 ], [ %503, %bb32 ], [ %503, %bb29 ] ; [#uses=3]
- switch i32 %200, label %bb79 [
- i32 1, label %invcont43
- i32 2, label %invcont55
- i32 3, label %invcont68
- ]
-
-invcont43: ; preds = %bb36
- %505 = getelementptr inbounds %struct.btQuadWord* %387, i32 0, i32 0, i32 2 ; [#uses=1]
- %506 = load float* %505, align 4 ; [#uses=1]
- %507 = getelementptr inbounds %struct.btQuadWord* %387, i32 1, i32 0, i32 2 ; [#uses=1]
- %508 = load float* %507, align 4 ; [#uses=1]
- %509 = fsub float %506, %508 ; [#uses=3]
- %510 = getelementptr inbounds %struct.btQuadWord* %387, i32 0, i32 0, i32 1 ; [#uses=1]
- %511 = load float* %510, align 4 ; [#uses=1]
- %512 = getelementptr inbounds %struct.btQuadWord* %387, i32 1, i32 0, i32 1 ; [#uses=1]
- %513 = load float* %512, align 4 ; [#uses=1]
- %514 = fsub float %511, %513 ; [#uses=3]
- %515 = getelementptr inbounds %struct.btQuadWord* %387, i32 0, i32 0, i32 0 ; [#uses=1]
- %516 = load float* %515, align 4 ; [#uses=1]
- %517 = getelementptr inbounds %struct.btQuadWord* %387, i32 1, i32 0, i32 0 ; [#uses=1]
- %518 = load float* %517, align 4 ; [#uses=1]
- %519 = fsub float %516, %518 ; [#uses=3]
- %520 = fmul float %519, %519 ; [#uses=1]
- %521 = fmul float %514, %514 ; [#uses=1]
- %522 = fadd float %520, %521 ; [#uses=1]
- %523 = fmul float %509, %509 ; [#uses=1]
- %524 = fadd float %522, %523 ; [#uses=1]
- %525 = call float @sqrtf(float %524) nounwind readonly ; [#uses=1]
- %526 = fmul float %correctedAngle.0, -5.000000e-01 ; [#uses=2]
- %527 = call float @sinf(float %526) nounwind readonly ; [#uses=1]
- %528 = fdiv float %527, %525 ; [#uses=3]
- %529 = call float @cosf(float %526) nounwind readonly ; [#uses=6]
- %530 = fmul float %509, %528 ; [#uses=4]
- %531 = fmul float %514, %528 ; [#uses=4]
- %532 = fmul float %519, %528 ; [#uses=3]
- %533 = fsub float -0.000000e+00, %532 ; [#uses=4]
- %534 = fmul float %330, %533 ; [#uses=1]
- %535 = fmul float %531, %331 ; [#uses=1]
- %536 = fsub float %534, %535 ; [#uses=1]
- %537 = fmul float %530, %332 ; [#uses=1]
- %538 = fsub float %536, %537 ; [#uses=3]
- %539 = fmul float %529, %332 ; [#uses=1]
- %540 = fmul float %532, %331 ; [#uses=1]
- %541 = fadd float %539, %540 ; [#uses=1]
- %542 = fmul float %531, %330 ; [#uses=1]
- %543 = fsub float %541, %542 ; [#uses=3]
- %544 = fmul float %529, %331 ; [#uses=1]
- %545 = fmul float %530, %330 ; [#uses=1]
- %546 = fadd float %544, %545 ; [#uses=1]
- %547 = fmul float %532, %332 ; [#uses=1]
- %548 = fsub float %546, %547 ; [#uses=3]
- %549 = fmul float %529, %330 ; [#uses=1]
- %550 = fmul float %531, %332 ; [#uses=1]
- %551 = fadd float %549, %550 ; [#uses=1]
- %552 = fmul float %530, %331 ; [#uses=1]
- %553 = fsub float %551, %552 ; [#uses=3]
- %554 = fsub float -0.000000e+00, %530 ; [#uses=3]
- %555 = fsub float -0.000000e+00, %531 ; [#uses=3]
- %556 = fmul float %538, %554 ; [#uses=1]
- %557 = fmul float %543, %529 ; [#uses=1]
- %558 = fadd float %556, %557 ; [#uses=1]
- %559 = fmul float %553, %555 ; [#uses=1]
- %560 = fadd float %558, %559 ; [#uses=1]
- %561 = fmul float %548, %533 ; [#uses=1]
- %562 = fsub float %560, %561 ; [#uses=1]
- %563 = fmul float %538, %555 ; [#uses=1]
- %564 = fmul float %548, %529 ; [#uses=1]
- %565 = fadd float %563, %564 ; [#uses=1]
- %566 = fmul float %543, %533 ; [#uses=1]
- %567 = fadd float %565, %566 ; [#uses=1]
- %568 = fmul float %553, %554 ; [#uses=1]
- %569 = fsub float %567, %568 ; [#uses=1]
- %570 = fmul float %538, %533 ; [#uses=1]
- %571 = fmul float %553, %529 ; [#uses=1]
- %572 = fadd float %570, %571 ; [#uses=1]
- %573 = fmul float %548, %554 ; [#uses=1]
- %574 = fadd float %572, %573 ; [#uses=1]
- %575 = fmul float %543, %555 ; [#uses=1]
- %576 = fsub float %574, %575 ; [#uses=1]
- %577 = fmul float %576, %355 ; [#uses=1]
- %578 = fmul float %569, %356 ; [#uses=1]
- %579 = fadd float %577, %578 ; [#uses=1]
- %580 = fmul float %562, %357 ; [#uses=1]
- %581 = fadd float %579, %580 ; [#uses=1]
- %582 = fcmp olt float %581, 0.000000e+00 ; [#uses=1]
- br i1 %582, label %bb44, label %bb45
-
-bb44: ; preds = %invcont43
- %583 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 0 ; [#uses=2]
- %584 = load i32* %583, align 4 ; [#uses=1]
- %585 = or i32 %584, 8 ; [#uses=1]
- store i32 %585, i32* %583, align 4
- br label %bb45
-
-bb45: ; preds = %bb44, %invcont43
- %586 = fsub float -0.000000e+00, %correctedAngle.0 ; [#uses=1]
- %587 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 1 ; [#uses=1]
- store float %586, float* %587, align 4
- %toBool46 = icmp eq i8 %isConvex.0, 0 ; [#uses=1]
- br i1 %toBool46, label %bb79, label %bb47
-
-bb47: ; preds = %bb45
- %588 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 0 ; [#uses=2]
- %589 = load i32* %588, align 4 ; [#uses=1]
- %590 = or i32 %589, 1 ; [#uses=1]
- store i32 %590, i32* %588, align 4
- br label %bb79
-
-invcont55: ; preds = %bb36
- %591 = getelementptr inbounds %struct.btQuadWord* %387, i32 2, i32 0, i32 2 ; [#uses=1]
- %592 = load float* %591, align 4 ; [#uses=1]
- %593 = getelementptr inbounds %struct.btQuadWord* %387, i32 0, i32 0, i32 2 ; [#uses=1]
- %594 = load float* %593, align 4 ; [#uses=1]
- %595 = fsub float %592, %594 ; [#uses=3]
- %596 = getelementptr inbounds %struct.btQuadWord* %387, i32 2, i32 0, i32 1 ; [#uses=1]
- %597 = load float* %596, align 4 ; [#uses=1]
- %598 = getelementptr inbounds %struct.btQuadWord* %387, i32 0, i32 0, i32 1 ; [#uses=1]
- %599 = load float* %598, align 4 ; [#uses=1]
- %600 = fsub float %597, %599 ; [#uses=3]
- %601 = getelementptr inbounds %struct.btQuadWord* %387, i32 2, i32 0, i32 0 ; [#uses=1]
- %602 = load float* %601, align 4 ; [#uses=1]
- %603 = getelementptr inbounds %struct.btQuadWord* %387, i32 0, i32 0, i32 0 ; [#uses=1]
- %604 = load float* %603, align 4 ; [#uses=1]
- %605 = fsub float %602, %604 ; [#uses=3]
- %606 = fmul float %605, %605 ; [#uses=1]
- %607 = fmul float %600, %600 ; [#uses=1]
- %608 = fadd float %606, %607 ; [#uses=1]
- %609 = fmul float %595, %595 ; [#uses=1]
- %610 = fadd float %608, %609 ; [#uses=1]
- %611 = call float @sqrtf(float %610) nounwind readonly ; [#uses=1]
- %612 = fmul float %correctedAngle.0, -5.000000e-01 ; [#uses=2]
- %613 = call float @sinf(float %612) nounwind readonly ; [#uses=1]
- %614 = fdiv float %613, %611 ; [#uses=3]
- %615 = call float @cosf(float %612) nounwind readonly ; [#uses=6]
- %616 = fmul float %595, %614 ; [#uses=4]
- %617 = fmul float %600, %614 ; [#uses=4]
- %618 = fmul float %605, %614 ; [#uses=3]
- %619 = fsub float -0.000000e+00, %618 ; [#uses=4]
- %620 = fmul float %330, %619 ; [#uses=1]
- %621 = fmul float %617, %331 ; [#uses=1]
- %622 = fsub float %620, %621 ; [#uses=1]
- %623 = fmul float %616, %332 ; [#uses=1]
- %624 = fsub float %622, %623 ; [#uses=3]
- %625 = fmul float %615, %332 ; [#uses=1]
- %626 = fmul float %618, %331 ; [#uses=1]
- %627 = fadd float %625, %626 ; [#uses=1]
- %628 = fmul float %617, %330 ; [#uses=1]
- %629 = fsub float %627, %628 ; [#uses=3]
- %630 = fmul float %615, %331 ; [#uses=1]
- %631 = fmul float %616, %330 ; [#uses=1]
- %632 = fadd float %630, %631 ; [#uses=1]
- %633 = fmul float %618, %332 ; [#uses=1]
- %634 = fsub float %632, %633 ; [#uses=3]
- %635 = fmul float %615, %330 ; [#uses=1]
- %636 = fmul float %617, %332 ; [#uses=1]
- %637 = fadd float %635, %636 ; [#uses=1]
- %638 = fmul float %616, %331 ; [#uses=1]
- %639 = fsub float %637, %638 ; [#uses=3]
- %640 = fsub float -0.000000e+00, %616 ; [#uses=3]
- %641 = fsub float -0.000000e+00, %617 ; [#uses=3]
- %642 = fmul float %624, %640 ; [#uses=1]
- %643 = fmul float %629, %615 ; [#uses=1]
- %644 = fadd float %642, %643 ; [#uses=1]
- %645 = fmul float %639, %641 ; [#uses=1]
- %646 = fadd float %644, %645 ; [#uses=1]
- %647 = fmul float %634, %619 ; [#uses=1]
- %648 = fsub float %646, %647 ; [#uses=1]
- %649 = fmul float %624, %641 ; [#uses=1]
- %650 = fmul float %634, %615 ; [#uses=1]
- %651 = fadd float %649, %650 ; [#uses=1]
- %652 = fmul float %629, %619 ; [#uses=1]
- %653 = fadd float %651, %652 ; [#uses=1]
- %654 = fmul float %639, %640 ; [#uses=1]
- %655 = fsub float %653, %654 ; [#uses=1]
- %656 = fmul float %624, %619 ; [#uses=1]
- %657 = fmul float %639, %615 ; [#uses=1]
- %658 = fadd float %656, %657 ; [#uses=1]
- %659 = fmul float %634, %640 ; [#uses=1]
- %660 = fadd float %658, %659 ; [#uses=1]
- %661 = fmul float %629, %641 ; [#uses=1]
- %662 = fsub float %660, %661 ; [#uses=1]
- %663 = fmul float %662, %355 ; [#uses=1]
- %664 = fmul float %655, %356 ; [#uses=1]
- %665 = fadd float %663, %664 ; [#uses=1]
- %666 = fmul float %648, %357 ; [#uses=1]
- %667 = fadd float %665, %666 ; [#uses=1]
- %668 = fcmp olt float %667, 0.000000e+00 ; [#uses=1]
- br i1 %668, label %bb57, label %bb58
-
-bb57: ; preds = %invcont55
- %669 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 0 ; [#uses=2]
- %670 = load i32* %669, align 4 ; [#uses=1]
- %671 = or i32 %670, 32 ; [#uses=1]
- store i32 %671, i32* %669, align 4
- br label %bb58
-
-bb58: ; preds = %bb57, %invcont55
- %672 = fsub float -0.000000e+00, %correctedAngle.0 ; [#uses=1]
- %673 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 3 ; [#uses=1]
- store float %672, float* %673, align 4
- %toBool59 = icmp eq i8 %isConvex.0, 0 ; [#uses=1]
- br i1 %toBool59, label %bb79, label %bb60
-
-bb60: ; preds = %bb58
- %674 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 0 ; [#uses=2]
- %675 = load i32* %674, align 4 ; [#uses=1]
- %676 = or i32 %675, 4 ; [#uses=1]
- store i32 %676, i32* %674, align 4
- br label %bb79
-
-invcont68: ; preds = %bb36
- %677 = getelementptr inbounds %struct.btQuadWord* %387, i32 1, i32 0, i32 2 ; [#uses=1]
- %678 = load float* %677, align 4 ; [#uses=1]
- %679 = getelementptr inbounds %struct.btQuadWord* %387, i32 2, i32 0, i32 2 ; [#uses=1]
- %680 = load float* %679, align 4 ; [#uses=1]
- %681 = fsub float %678, %680 ; [#uses=3]
- %682 = getelementptr inbounds %struct.btQuadWord* %387, i32 1, i32 0, i32 1 ; [#uses=1]
- %683 = load float* %682, align 4 ; [#uses=1]
- %684 = getelementptr inbounds %struct.btQuadWord* %387, i32 2, i32 0, i32 1 ; [#uses=1]
- %685 = load float* %684, align 4 ; [#uses=1]
- %686 = fsub float %683, %685 ; [#uses=3]
- %687 = getelementptr inbounds %struct.btQuadWord* %387, i32 1, i32 0, i32 0 ; [#uses=1]
- %688 = load float* %687, align 4 ; [#uses=1]
- %689 = getelementptr inbounds %struct.btQuadWord* %387, i32 2, i32 0, i32 0 ; [#uses=1]
- %690 = load float* %689, align 4 ; [#uses=1]
- %691 = fsub float %688, %690 ; [#uses=3]
- %692 = fmul float %691, %691 ; [#uses=1]
- %693 = fmul float %686, %686 ; [#uses=1]
- %694 = fadd float %692, %693 ; [#uses=1]
- %695 = fmul float %681, %681 ; [#uses=1]
- %696 = fadd float %694, %695 ; [#uses=1]
- %697 = call float @sqrtf(float %696) nounwind readonly ; [#uses=1]
- %698 = fmul float %correctedAngle.0, -5.000000e-01 ; [#uses=2]
- %699 = call float @sinf(float %698) nounwind readonly ; [#uses=1]
- %700 = fdiv float %699, %697 ; [#uses=3]
- %701 = call float @cosf(float %698) nounwind readonly ; [#uses=6]
- %702 = fmul float %681, %700 ; [#uses=4]
- %703 = fmul float %686, %700 ; [#uses=4]
- %704 = fmul float %691, %700 ; [#uses=3]
- %705 = fsub float -0.000000e+00, %704 ; [#uses=4]
- %706 = fmul float %330, %705 ; [#uses=1]
- %707 = fmul float %703, %331 ; [#uses=1]
- %708 = fsub float %706, %707 ; [#uses=1]
- %709 = fmul float %702, %332 ; [#uses=1]
- %710 = fsub float %708, %709 ; [#uses=3]
- %711 = fmul float %701, %332 ; [#uses=1]
- %712 = fmul float %704, %331 ; [#uses=1]
- %713 = fadd float %711, %712 ; [#uses=1]
- %714 = fmul float %703, %330 ; [#uses=1]
- %715 = fsub float %713, %714 ; [#uses=3]
- %716 = fmul float %701, %331 ; [#uses=1]
- %717 = fmul float %702, %330 ; [#uses=1]
- %718 = fadd float %716, %717 ; [#uses=1]
- %719 = fmul float %704, %332 ; [#uses=1]
- %720 = fsub float %718, %719 ; [#uses=3]
- %721 = fmul float %701, %330 ; [#uses=1]
- %722 = fmul float %703, %332 ; [#uses=1]
- %723 = fadd float %721, %722 ; [#uses=1]
- %724 = fmul float %702, %331 ; [#uses=1]
- %725 = fsub float %723, %724 ; [#uses=3]
- %726 = fsub float -0.000000e+00, %702 ; [#uses=3]
- %727 = fsub float -0.000000e+00, %703 ; [#uses=3]
- %728 = fmul float %710, %726 ; [#uses=1]
- %729 = fmul float %715, %701 ; [#uses=1]
- %730 = fadd float %728, %729 ; [#uses=1]
- %731 = fmul float %725, %727 ; [#uses=1]
- %732 = fadd float %730, %731 ; [#uses=1]
- %733 = fmul float %720, %705 ; [#uses=1]
- %734 = fsub float %732, %733 ; [#uses=1]
- %735 = fmul float %710, %727 ; [#uses=1]
- %736 = fmul float %720, %701 ; [#uses=1]
- %737 = fadd float %735, %736 ; [#uses=1]
- %738 = fmul float %715, %705 ; [#uses=1]
- %739 = fadd float %737, %738 ; [#uses=1]
- %740 = fmul float %725, %726 ; [#uses=1]
- %741 = fsub float %739, %740 ; [#uses=1]
- %742 = fmul float %710, %705 ; [#uses=1]
- %743 = fmul float %725, %701 ; [#uses=1]
- %744 = fadd float %742, %743 ; [#uses=1]
- %745 = fmul float %720, %726 ; [#uses=1]
- %746 = fadd float %744, %745 ; [#uses=1]
- %747 = fmul float %715, %727 ; [#uses=1]
- %748 = fsub float %746, %747 ; [#uses=1]
- %749 = fmul float %748, %355 ; [#uses=1]
- %750 = fmul float %741, %356 ; [#uses=1]
- %751 = fadd float %749, %750 ; [#uses=1]
- %752 = fmul float %734, %357 ; [#uses=1]
- %753 = fadd float %751, %752 ; [#uses=1]
- %754 = fcmp olt float %753, 0.000000e+00 ; [#uses=1]
- br i1 %754, label %bb70, label %bb71
-
-bb70: ; preds = %invcont68
- %755 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 0 ; [#uses=2]
- %756 = load i32* %755, align 4 ; [#uses=1]
- %757 = or i32 %756, 16 ; [#uses=1]
- store i32 %757, i32* %755, align 4
- br label %bb71
-
-bb71: ; preds = %bb70, %invcont68
- %758 = fsub float -0.000000e+00, %correctedAngle.0 ; [#uses=1]
- %759 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 2 ; [#uses=1]
- store float %758, float* %759, align 4
- %toBool72 = icmp eq i8 %isConvex.0, 0 ; [#uses=1]
- br i1 %toBool72, label %bb79, label %bb73
-
-bb73: ; preds = %bb71
- %760 = getelementptr inbounds %struct.btTriangleInfo* %info.0, i32 0, i32 0 ; [#uses=2]
- %761 = load i32* %760, align 4 ; [#uses=1]
- %762 = or i32 %761, 2 ; [#uses=1]
- store i32 %762, i32* %760, align 4
- br label %bb79
-
-bb79: ; preds = %bb73, %bb71, %bb60, %bb58, %bb47, %bb45, %bb36
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %260, align 8
- %763 = getelementptr inbounds %struct.btTriangleShape* %tB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %763)
- to label %bb86 unwind label %ppad
-
-invcont84: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb86: ; preds = %bb79
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %218, align 8
- %764 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %764)
- ret void
-
-return: ; preds = %bb12, %bb9, %bb6, %bb2, %bb1, %bb
- ret void
-
-lpad98: ; preds = %ppad
- %eh_ptr99 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select101 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr99, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb79, %bb19
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select89 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %218, align 8
- %765 = getelementptr inbounds %struct.btTriangleShape* %tA, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %765)
- to label %invcont84 unwind label %lpad98
-}
-
-; [#uses=0]
-define void @_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_(%struct.btQuadWord* nocapture %point, %struct.btQuadWord* nocapture %line0, %struct.btQuadWord* nocapture %line1, %struct.btQuadWord* nocapture %nearestPoint) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %line1, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %line0, i32 0, i32 0, i32 2 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fsub float %1, %3 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btQuadWord* %line1, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %line0, i32 0, i32 0, i32 1 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fsub float %6, %8 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btQuadWord* %line1, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %line0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=4]
- %14 = fsub float %11, %13 ; [#uses=4]
- %15 = fmul float %14, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = fmul float %4, %4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=2]
- %20 = fcmp olt float %19, 0x3E80000000000000 ; [#uses=1]
- br i1 %20, label %bb, label %bb1
-
-bb: ; preds = %entry
- %21 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %13, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %7, align 4 ; [#uses=1]
- store float %23, float* %22, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %2, align 4 ; [#uses=1]
- store float %25, float* %24, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %line0, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- ret void
-
-bb1: ; preds = %entry
- %29 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fsub float %30, %3 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %33, %8 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fsub float %36, %13 ; [#uses=1]
- %38 = fmul float %37, %14 ; [#uses=1]
- %39 = fmul float %34, %9 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = fmul float %31, %4 ; [#uses=1]
- %42 = fadd float %40, %41 ; [#uses=1]
- %43 = fdiv float %42, %19 ; [#uses=3]
- %44 = fcmp olt float %43, 0.000000e+00 ; [#uses=1]
- br i1 %44, label %bb5, label %bb3
-
-bb3: ; preds = %bb1
- %45 = fcmp ogt float %43, 1.000000e+00 ; [#uses=1]
- br i1 %45, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3, %bb1
- %delta.0 = phi float [ 1.000000e+00, %bb4 ], [ %43, %bb3 ], [ 0.000000e+00, %bb1 ] ; [#uses=3]
- %46 = fmul float %4, %delta.0 ; [#uses=1]
- %47 = fmul float %9, %delta.0 ; [#uses=1]
- %48 = fmul float %14, %delta.0 ; [#uses=1]
- %49 = fadd float %3, %46 ; [#uses=1]
- %50 = fadd float %8, %47 ; [#uses=1]
- %51 = fadd float %13, %48 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %51, float* %52, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %50, float* %53, align 4
- %54 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %49, float* %54, align 4
- %55 = getelementptr inbounds %struct.btQuadWord* %nearestPoint, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %55, align 4
- ret void
-}
-
-; [#uses=3]
-define zeroext i8 @_Z13btClampNormalRK9btVector3S1_S1_fRS_(%struct.btQuadWord* nocapture %edge, %struct.btQuadWord* nocapture %tri_normal_org, %struct.btQuadWord* nocapture %localContactNormalOnB, float %correctedEdgeAngle, %struct.btQuadWord* nocapture %clampedLocalNormal) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %tri_normal_org, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btQuadWord* %tri_normal_org, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btQuadWord* %tri_normal_org, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %edge, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=8]
- %8 = fmul float %7, %3 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %edge, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=8]
- %11 = fmul float %10, %1 ; [#uses=1]
- %12 = fsub float %8, %11 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btQuadWord* %edge, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=8]
- %15 = fmul float %14, %1 ; [#uses=1]
- %16 = fmul float %7, %5 ; [#uses=1]
- %17 = fsub float %15, %16 ; [#uses=3]
- %18 = fmul float %10, %5 ; [#uses=1]
- %19 = fmul float %14, %3 ; [#uses=1]
- %20 = fsub float %18, %19 ; [#uses=3]
- %21 = fmul float %20, %20 ; [#uses=1]
- %22 = fmul float %17, %17 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = fmul float %12, %12 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = tail call float @sqrtf(float %25) nounwind readonly ; [#uses=1]
- %27 = fdiv float 1.000000e+00, %26 ; [#uses=3]
- %28 = fmul float %20, %27 ; [#uses=1]
- %29 = fmul float %17, %27 ; [#uses=1]
- %30 = fmul float %12, %27 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=8]
- %33 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=8]
- %35 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=8]
- %37 = fmul float %32, %1 ; [#uses=1]
- %38 = fmul float %34, %3 ; [#uses=1]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = fmul float %36, %5 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = fmul float %32, %28 ; [#uses=1]
- %43 = fmul float %34, %29 ; [#uses=1]
- %44 = fadd float %42, %43 ; [#uses=1]
- %45 = fmul float %36, %30 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=1]
- %47 = tail call float @atan2f(float %46, float %41) nounwind readonly ; [#uses=4]
- %48 = fcmp olt float %correctedEdgeAngle, 0.000000e+00 ; [#uses=1]
- %49 = fcmp olt float %47, %correctedEdgeAngle ; [#uses=1]
- %or.cond = and i1 %48, %49 ; [#uses=1]
- br i1 %or.cond, label %bb1, label %bb2
-
-bb1: ; preds = %entry
- %50 = fsub float %correctedEdgeAngle, %47 ; [#uses=1]
- %51 = fmul float %7, %7 ; [#uses=1]
- %52 = fmul float %10, %10 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=1]
- %54 = fmul float %14, %14 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = tail call float @sqrtf(float %55) nounwind readonly ; [#uses=1]
- %57 = fmul float %50, 5.000000e-01 ; [#uses=2]
- %58 = tail call float @sinf(float %57) nounwind readonly ; [#uses=1]
- %59 = fdiv float %58, %56 ; [#uses=3]
- %60 = tail call float @cosf(float %57) nounwind readonly ; [#uses=5]
- %61 = fmul float %14, %59 ; [#uses=4]
- %62 = fmul float %10, %59 ; [#uses=5]
- %63 = fmul float %7, %59 ; [#uses=6]
- %64 = fmul float %63, %63 ; [#uses=1]
- %65 = fmul float %62, %62 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %61, %61 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = fmul float %60, %60 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fdiv float 2.000000e+00, %70 ; [#uses=3]
- %72 = fmul float %63, %71 ; [#uses=2]
- %73 = fmul float %62, %71 ; [#uses=3]
- %74 = fmul float %61, %71 ; [#uses=4]
- %75 = fmul float %60, %72 ; [#uses=2]
- %76 = fmul float %60, %73 ; [#uses=2]
- %77 = fmul float %60, %74 ; [#uses=2]
- %78 = fmul float %63, %72 ; [#uses=2]
- %79 = fmul float %63, %73 ; [#uses=2]
- %80 = fmul float %63, %74 ; [#uses=2]
- %81 = fmul float %62, %73 ; [#uses=2]
- %82 = fmul float %62, %74 ; [#uses=2]
- %83 = fmul float %61, %74 ; [#uses=2]
- %84 = fadd float %78, %81 ; [#uses=1]
- %85 = fsub float 1.000000e+00, %84 ; [#uses=1]
- %86 = fadd float %82, %75 ; [#uses=1]
- %87 = fsub float %80, %76 ; [#uses=1]
- %88 = fsub float %82, %75 ; [#uses=1]
- %89 = fadd float %78, %83 ; [#uses=1]
- %90 = fsub float 1.000000e+00, %89 ; [#uses=1]
- %91 = fadd float %79, %77 ; [#uses=1]
- %92 = fadd float %80, %76 ; [#uses=1]
- %93 = fsub float %79, %77 ; [#uses=1]
- %94 = fadd float %81, %83 ; [#uses=1]
- %95 = fsub float 1.000000e+00, %94 ; [#uses=1]
- %96 = fmul float %87, %32 ; [#uses=1]
- %97 = fmul float %86, %34 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=1]
- %99 = fmul float %85, %36 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %91, %32 ; [#uses=1]
- %102 = fmul float %90, %34 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fmul float %88, %36 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %95, %32 ; [#uses=1]
- %107 = fmul float %93, %34 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %92, %36 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %110, float* %111, align 4
- %112 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %105, float* %112, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %113, align 4
- %114 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %114, align 4
- ret i8 1
-
-bb2: ; preds = %entry
- %.not = fcmp oge float %correctedEdgeAngle, 0.000000e+00 ; [#uses=1]
- %115 = fcmp ogt float %47, %correctedEdgeAngle ; [#uses=1]
- %or.cond14 = and i1 %.not, %115 ; [#uses=1]
- br i1 %or.cond14, label %bb4, label %bb11
-
-bb4: ; preds = %bb2
- %116 = fsub float %correctedEdgeAngle, %47 ; [#uses=1]
- %117 = fmul float %7, %7 ; [#uses=1]
- %118 = fmul float %10, %10 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = fmul float %14, %14 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = tail call float @sqrtf(float %121) nounwind readonly ; [#uses=1]
- %123 = fmul float %116, 5.000000e-01 ; [#uses=2]
- %124 = tail call float @sinf(float %123) nounwind readonly ; [#uses=1]
- %125 = fdiv float %124, %122 ; [#uses=3]
- %126 = tail call float @cosf(float %123) nounwind readonly ; [#uses=5]
- %127 = fmul float %14, %125 ; [#uses=4]
- %128 = fmul float %10, %125 ; [#uses=5]
- %129 = fmul float %7, %125 ; [#uses=6]
- %130 = fmul float %129, %129 ; [#uses=1]
- %131 = fmul float %128, %128 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %127, %127 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = fmul float %126, %126 ; [#uses=1]
- %136 = fadd float %134, %135 ; [#uses=1]
- %137 = fdiv float 2.000000e+00, %136 ; [#uses=3]
- %138 = fmul float %129, %137 ; [#uses=2]
- %139 = fmul float %128, %137 ; [#uses=3]
- %140 = fmul float %127, %137 ; [#uses=4]
- %141 = fmul float %126, %138 ; [#uses=2]
- %142 = fmul float %126, %139 ; [#uses=2]
- %143 = fmul float %126, %140 ; [#uses=2]
- %144 = fmul float %129, %138 ; [#uses=2]
- %145 = fmul float %129, %139 ; [#uses=2]
- %146 = fmul float %129, %140 ; [#uses=2]
- %147 = fmul float %128, %139 ; [#uses=2]
- %148 = fmul float %128, %140 ; [#uses=2]
- %149 = fmul float %127, %140 ; [#uses=2]
- %150 = fadd float %144, %147 ; [#uses=1]
- %151 = fsub float 1.000000e+00, %150 ; [#uses=1]
- %152 = fadd float %148, %141 ; [#uses=1]
- %153 = fsub float %146, %142 ; [#uses=1]
- %154 = fsub float %148, %141 ; [#uses=1]
- %155 = fadd float %144, %149 ; [#uses=1]
- %156 = fsub float 1.000000e+00, %155 ; [#uses=1]
- %157 = fadd float %145, %143 ; [#uses=1]
- %158 = fadd float %146, %142 ; [#uses=1]
- %159 = fsub float %145, %143 ; [#uses=1]
- %160 = fadd float %147, %149 ; [#uses=1]
- %161 = fsub float 1.000000e+00, %160 ; [#uses=1]
- %162 = fmul float %153, %32 ; [#uses=1]
- %163 = fmul float %152, %34 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- %165 = fmul float %151, %36 ; [#uses=1]
- %166 = fadd float %164, %165 ; [#uses=1]
- %167 = fmul float %157, %32 ; [#uses=1]
- %168 = fmul float %156, %34 ; [#uses=1]
- %169 = fadd float %167, %168 ; [#uses=1]
- %170 = fmul float %154, %36 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=1]
- %172 = fmul float %161, %32 ; [#uses=1]
- %173 = fmul float %159, %34 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=1]
- %175 = fmul float %158, %36 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %176, float* %177, align 4
- %178 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %171, float* %178, align 4
- %179 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %166, float* %179, align 4
- %180 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %180, align 4
- ret i8 1
-
-bb11: ; preds = %bb2
- ret i8 0
-}
-
-; [#uses=0]
-define void @_Z28btAdjustInternalEdgeContactsR15btManifoldPointPK17btCollisionObjectS3_iii(%struct.btManifoldPoint* %cp, %struct.btCollisionObject* nocapture %colObj0, %struct.btCollisionObject* nocapture %colObj1, i32 %partId0, i32 %index0, i32 %normalAdjustFlags) {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %v0 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %v1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %v2 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %localContactNormalOnB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %edge = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %clampedLocalNormal = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %edge38 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %localContactNormalOnB73 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %clampedLocalNormal75 = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %edge96 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %localContactNormalOnB131 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %clampedLocalNormal133 = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %3 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 9 ; [#uses=1]
- %4 = load %struct.btCollisionShape** %3, align 4 ; [#uses=12]
- %5 = getelementptr inbounds %struct.btCollisionShape* %4, i32 0, i32 1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp eq i32 %6, 1 ; [#uses=1]
- br i1 %7, label %bb, label %return
-
-bb: ; preds = %entry
- %8 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 11 ; [#uses=1]
- %9 = load %struct.btCollisionShape** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCollisionShape* %9, i32 4, i32 2 ; [#uses=1]
- %11 = load i8** %10, align 4 ; [#uses=13]
- %12 = icmp eq i8* %11, null ; [#uses=1]
- br i1 %12, label %return, label %bb1
-
-bb1: ; preds = %bb
- %13 = shl i32 %partId0, 21 ; [#uses=1]
- %14 = or i32 %13, %index0 ; [#uses=2]
- %15 = shl i32 %index0, 15 ; [#uses=1]
- %not.i.i.i = xor i32 %15, -1 ; [#uses=1]
- %16 = add nsw i32 %14, %not.i.i.i ; [#uses=2]
- %17 = ashr i32 %16, 10 ; [#uses=1]
- %18 = xor i32 %17, %16 ; [#uses=1]
- %19 = mul i32 %18, 9 ; [#uses=2]
- %20 = ashr i32 %19, 6 ; [#uses=1]
- %21 = xor i32 %20, %19 ; [#uses=2]
- %22 = shl i32 %21, 11 ; [#uses=1]
- %not2.i.i.i = xor i32 %22, -1 ; [#uses=1]
- %23 = add nsw i32 %21, %not2.i.i.i ; [#uses=2]
- %24 = ashr i32 %23, 16 ; [#uses=1]
- %25 = xor i32 %24, %23 ; [#uses=1]
- %26 = getelementptr inbounds i8* %11, i32 52 ; [#uses=1]
- %27 = bitcast i8* %26 to i32* ; [#uses=1]
- %28 = load i32* %27, align 4 ; [#uses=1]
- %29 = add nsw i32 %28, -1 ; [#uses=1]
- %30 = and i32 %29, %25 ; [#uses=2]
- %31 = getelementptr inbounds i8* %11, i32 8 ; [#uses=1]
- %32 = bitcast i8* %31 to i32* ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = icmp ugt i32 %33, %30 ; [#uses=1]
- br i1 %34, label %bb1.i.i, label %return
-
-bb1.i.i: ; preds = %bb1
- %35 = getelementptr inbounds i8* %11, i32 16 ; [#uses=1]
- %36 = bitcast i8* %35 to i32** ; [#uses=1]
- %37 = load i32** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32* %37, i32 %30 ; [#uses=1]
- %39 = getelementptr inbounds i8* %11, i32 76 ; [#uses=1]
- %40 = bitcast i8* %39 to %struct.btHashInt** ; [#uses=1]
- %41 = getelementptr inbounds i8* %11, i32 36 ; [#uses=1]
- %42 = bitcast i8* %41 to i32** ; [#uses=1]
- br label %bb3.i.i
-
-bb2.i.i: ; preds = %bb4.i.i
- %43 = load i32** %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds i32* %43, i32 %index.0.i.i ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %bb1.i.i
- %index.0.in.i.i = phi i32* [ %38, %bb1.i.i ], [ %44, %bb2.i.i ] ; [#uses=1]
- %index.0.i.i = load i32* %index.0.in.i.i, align 4 ; [#uses=10]
- %45 = icmp eq i32 %index.0.i.i, -1 ; [#uses=1]
- br i1 %45, label %return, label %bb4.i.i
-
-bb4.i.i: ; preds = %bb3.i.i
- %46 = load %struct.btHashInt** %40, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btHashInt* %46, i32 %index.0.i.i, i32 0 ; [#uses=1]
- %48 = load i32* %47, align 4 ; [#uses=1]
- %49 = icmp eq i32 %14, %48 ; [#uses=1]
- br i1 %49, label %_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit, label %bb2.i.i
-
-_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit: ; preds = %bb4.i.i
- %50 = getelementptr inbounds i8* %11, i32 56 ; [#uses=1]
- %51 = bitcast i8* %50 to %struct.btTriangleInfo** ; [#uses=1]
- %52 = load %struct.btTriangleInfo** %51, align 4 ; [#uses=7]
- %53 = getelementptr inbounds %struct.btTriangleInfo* %52, i32 %index.0.i.i ; [#uses=1]
- %54 = icmp eq %struct.btTriangleInfo* %53, null ; [#uses=1]
- br i1 %54, label %return, label %bb2
-
-bb2: ; preds = %_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit
- %55 = and i32 %normalAdjustFlags, 1 ; [#uses=1]
- %56 = icmp eq i32 %55, 0 ; [#uses=1]
- %iftmp.296.0 = select i1 %56, float 1.000000e+00, float -1.000000e+00 ; [#uses=12]
- %57 = bitcast %struct.btCollisionShape* %4 to %struct.btTriangleShape* ; [#uses=3]
- %58 = getelementptr inbounds %struct.btCollisionShape* %4, i32 0, i32 0 ; [#uses=3]
- %59 = load i32 (...)*** %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds i32 (...)** %59, i32 24 ; [#uses=1]
- %61 = load i32 (...)** %60, align 4 ; [#uses=1]
- %62 = bitcast i32 (...)* %61 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %62(%struct.btTriangleShape* %57, i32 0, %struct.btQuadWord* %v0)
- %63 = load i32 (...)*** %58, align 4 ; [#uses=1]
- %64 = getelementptr inbounds i32 (...)** %63, i32 24 ; [#uses=1]
- %65 = load i32 (...)** %64, align 4 ; [#uses=1]
- %66 = bitcast i32 (...)* %65 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %66(%struct.btTriangleShape* %57, i32 1, %struct.btQuadWord* %v1)
- %67 = load i32 (...)*** %58, align 4 ; [#uses=1]
- %68 = getelementptr inbounds i32 (...)** %67, i32 24 ; [#uses=1]
- %69 = load i32 (...)** %68, align 4 ; [#uses=1]
- %70 = bitcast i32 (...)* %69 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %70(%struct.btTriangleShape* %57, i32 2, %struct.btQuadWord* %v2)
- %71 = getelementptr inbounds %struct.btCollisionShape* %4, i32 7, i32 2 ; [#uses=1]
- %72 = bitcast i8** %71 to float* ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btCollisionShape* %4, i32 5 ; [#uses=1]
- %75 = bitcast %struct.btCollisionShape* %74 to float* ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=2]
- %77 = fsub float %73, %76 ; [#uses=2]
- %78 = getelementptr inbounds %struct.btCollisionShape* %4, i32 7, i32 1 ; [#uses=1]
- %79 = bitcast i32* %78 to float* ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btCollisionShape* %4, i32 4, i32 2 ; [#uses=1]
- %82 = bitcast i8** %81 to float* ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=2]
- %84 = fsub float %80, %83 ; [#uses=2]
- %85 = getelementptr inbounds %struct.btCollisionShape* %4, i32 7 ; [#uses=1]
- %86 = bitcast %struct.btCollisionShape* %85 to float* ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btCollisionShape* %4, i32 4, i32 1 ; [#uses=1]
- %89 = bitcast i32* %88 to float* ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=2]
- %91 = fsub float %87, %90 ; [#uses=2]
- %92 = getelementptr inbounds %struct.btCollisionShape* %4, i32 6, i32 1 ; [#uses=1]
- %93 = bitcast i32* %92 to float* ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fsub float %94, %76 ; [#uses=2]
- %96 = getelementptr inbounds %struct.btCollisionShape* %4, i32 6 ; [#uses=1]
- %97 = bitcast %struct.btCollisionShape* %96 to float* ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fsub float %98, %83 ; [#uses=2]
- %100 = getelementptr inbounds %struct.btCollisionShape* %4, i32 5, i32 2 ; [#uses=1]
- %101 = bitcast i8** %100 to float* ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fsub float %102, %90 ; [#uses=2]
- %104 = fmul float %103, %84 ; [#uses=1]
- %105 = fmul float %99, %91 ; [#uses=1]
- %106 = fsub float %104, %105 ; [#uses=3]
- %107 = fmul float %95, %91 ; [#uses=1]
- %108 = fmul float %103, %77 ; [#uses=1]
- %109 = fsub float %107, %108 ; [#uses=3]
- %110 = fmul float %99, %77 ; [#uses=1]
- %111 = fmul float %95, %84 ; [#uses=1]
- %112 = fsub float %110, %111 ; [#uses=3]
- %113 = fmul float %112, %112 ; [#uses=1]
- %114 = fmul float %109, %109 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %106, %106 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = call float @sqrtf(float %117) nounwind readonly ; [#uses=1]
- %119 = fdiv float 1.000000e+00, %118 ; [#uses=3]
- %120 = fmul float %112, %119 ; [#uses=22]
- %121 = fmul float %109, %119 ; [#uses=22]
- %122 = fmul float %106, %119 ; [#uses=22]
- %123 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 2 ; [#uses=2]
- %124 = load float* %123, align 8 ; [#uses=2]
- %125 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 2 ; [#uses=2]
- %126 = load float* %125, align 8 ; [#uses=5]
- %127 = fsub float %124, %126 ; [#uses=4]
- %128 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 1 ; [#uses=2]
- %129 = load float* %128, align 4 ; [#uses=2]
- %130 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 1 ; [#uses=2]
- %131 = load float* %130, align 4 ; [#uses=5]
- %132 = fsub float %129, %131 ; [#uses=4]
- %133 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 0 ; [#uses=2]
- %134 = load float* %133, align 8 ; [#uses=2]
- %135 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 0 ; [#uses=2]
- %136 = load float* %135, align 8 ; [#uses=5]
- %137 = fsub float %134, %136 ; [#uses=4]
- %138 = fmul float %137, %137 ; [#uses=1]
- %139 = fmul float %132, %132 ; [#uses=1]
- %140 = fadd float %138, %139 ; [#uses=1]
- %141 = fmul float %127, %127 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=2]
- %143 = fcmp olt float %142, 0x3E80000000000000 ; [#uses=1]
- br i1 %143, label %bb.i172, label %bb1.i173
-
-bb.i172: ; preds = %bb2
- %.phi.trans.insert = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- %.phi.trans.insert322 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %.pre323 = load float* %.phi.trans.insert322, align 4 ; [#uses=1]
- %.phi.trans.insert324 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %.pre325 = load float* %.phi.trans.insert324, align 4 ; [#uses=1]
- br label %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit178
-
-bb1.i173: ; preds = %bb2
- %144 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=2]
- %146 = fsub float %145, %126 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=2]
- %149 = fsub float %148, %131 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=2]
- %152 = fsub float %151, %136 ; [#uses=1]
- %153 = fmul float %152, %137 ; [#uses=1]
- %154 = fmul float %149, %132 ; [#uses=1]
- %155 = fadd float %153, %154 ; [#uses=1]
- %156 = fmul float %146, %127 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fdiv float %157, %142 ; [#uses=3]
- %159 = fcmp olt float %158, 0.000000e+00 ; [#uses=1]
- br i1 %159, label %bb5.i177, label %bb3.i174
-
-bb3.i174: ; preds = %bb1.i173
- %160 = fcmp ogt float %158, 1.000000e+00 ; [#uses=1]
- br i1 %160, label %bb4.i175, label %bb5.i177
-
-bb4.i175: ; preds = %bb3.i174
- br label %bb5.i177
-
-bb5.i177: ; preds = %bb4.i175, %bb3.i174, %bb1.i173
- %delta.0.i176 = phi float [ 1.000000e+00, %bb4.i175 ], [ %158, %bb3.i174 ], [ 0.000000e+00, %bb1.i173 ] ; [#uses=3]
- %161 = fmul float %127, %delta.0.i176 ; [#uses=1]
- %162 = fmul float %132, %delta.0.i176 ; [#uses=1]
- %163 = fmul float %137, %delta.0.i176 ; [#uses=1]
- %164 = fadd float %126, %161 ; [#uses=1]
- %165 = fadd float %131, %162 ; [#uses=1]
- %166 = fadd float %136, %163 ; [#uses=1]
- %.pre344 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre345 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre347 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- br label %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit178
-
-_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit178: ; preds = %bb5.i177, %bb.i172
- %.pre-phi348 = phi float* [ %.phi.trans.insert324, %bb.i172 ], [ %.pre347, %bb5.i177 ] ; [#uses=4]
- %.pre-phi346 = phi float* [ %.phi.trans.insert322, %bb.i172 ], [ %.pre345, %bb5.i177 ] ; [#uses=4]
- %.pre-phi = phi float* [ %.phi.trans.insert, %bb.i172 ], [ %.pre344, %bb5.i177 ] ; [#uses=4]
- %167 = phi float [ %.pre325, %bb.i172 ], [ %145, %bb5.i177 ] ; [#uses=5]
- %168 = phi float [ %.pre323, %bb.i172 ], [ %148, %bb5.i177 ] ; [#uses=5]
- %169 = phi float [ %.pre, %bb.i172 ], [ %151, %bb5.i177 ] ; [#uses=5]
- %nearest.0.0.2 = phi float [ %136, %bb.i172 ], [ %166, %bb5.i177 ] ; [#uses=1]
- %nearest.0.1.2 = phi float [ %131, %bb.i172 ], [ %165, %bb5.i177 ] ; [#uses=1]
- %nearest.0.2.2 = phi float [ %126, %bb.i172 ], [ %164, %bb5.i177 ] ; [#uses=1]
- %170 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=12]
- %171 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=12]
- %172 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=12]
- %173 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=12]
- %174 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=12]
- %175 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=12]
- %176 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=12]
- %177 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=12]
- %178 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=12]
- %179 = load float* %178, align 4 ; [#uses=1]
- %180 = load float* %177, align 4 ; [#uses=1]
- %181 = load float* %176, align 4 ; [#uses=1]
- %182 = load float* %175, align 4 ; [#uses=1]
- %183 = load float* %174, align 4 ; [#uses=1]
- %184 = load float* %173, align 4 ; [#uses=1]
- %185 = load float* %172, align 4 ; [#uses=1]
- %186 = load float* %171, align 4 ; [#uses=1]
- %187 = load float* %170, align 4 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 0 ; [#uses=8]
- %189 = load float* %188, align 4 ; [#uses=3]
- %190 = fmul float %185, %189 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 1 ; [#uses=8]
- %192 = load float* %191, align 4 ; [#uses=3]
- %193 = fmul float %186, %192 ; [#uses=1]
- %194 = fadd float %190, %193 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 2 ; [#uses=8]
- %196 = load float* %195, align 4 ; [#uses=3]
- %197 = fmul float %187, %196 ; [#uses=1]
- %198 = fadd float %194, %197 ; [#uses=3]
- %199 = fmul float %182, %189 ; [#uses=1]
- %200 = fmul float %183, %192 ; [#uses=1]
- %201 = fadd float %199, %200 ; [#uses=1]
- %202 = fmul float %184, %196 ; [#uses=1]
- %203 = fadd float %201, %202 ; [#uses=3]
- %204 = fmul float %179, %189 ; [#uses=1]
- %205 = fmul float %180, %192 ; [#uses=1]
- %206 = fadd float %204, %205 ; [#uses=1]
- %207 = fmul float %181, %196 ; [#uses=1]
- %208 = fadd float %206, %207 ; [#uses=3]
- %209 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB, i32 0, i32 0, i32 0 ; [#uses=4]
- %210 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB, i32 0, i32 0, i32 1 ; [#uses=4]
- %211 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB, i32 0, i32 0, i32 2 ; [#uses=4]
- %212 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %212, align 4
- %213 = fmul float %208, %208 ; [#uses=1]
- %214 = fmul float %203, %203 ; [#uses=1]
- %215 = fadd float %213, %214 ; [#uses=1]
- %216 = fmul float %198, %198 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=1]
- %218 = call float @sqrtf(float %217) nounwind readonly ; [#uses=1]
- %219 = fdiv float 1.000000e+00, %218 ; [#uses=3]
- %220 = fmul float %208, %219 ; [#uses=3]
- store float %220, float* %209, align 8
- %221 = fmul float %203, %219 ; [#uses=3]
- store float %221, float* %210, align 4
- %222 = fmul float %198, %219 ; [#uses=3]
- store float %222, float* %211, align 8
- %223 = getelementptr inbounds %struct.btTriangleInfo* %52, i32 %index.0.i.i, i32 1 ; [#uses=1]
- %224 = load float* %223, align 4 ; [#uses=4]
- %225 = fcmp olt float %224, 0x401921FB60000000 ; [#uses=1]
- br i1 %225, label %bb6, label %bb32
-
-bb6: ; preds = %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit178
- %226 = fsub float %167, %nearest.0.2.2 ; [#uses=2]
- %227 = fsub float %168, %nearest.0.1.2 ; [#uses=2]
- %228 = fsub float %169, %nearest.0.0.2 ; [#uses=2]
- %229 = fmul float %228, %228 ; [#uses=1]
- %230 = fmul float %227, %227 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = fmul float %226, %226 ; [#uses=1]
- %233 = fadd float %231, %232 ; [#uses=1]
- %234 = call float @sqrtf(float %233) nounwind readonly ; [#uses=1]
- %235 = getelementptr inbounds i8* %11, i32 96 ; [#uses=1]
- %236 = bitcast i8* %235 to float* ; [#uses=1]
- %237 = load float* %236, align 4 ; [#uses=1]
- %238 = fcmp ogt float %237, %234 ; [#uses=1]
- br i1 %238, label %bb7, label %bb32
-
-bb7: ; preds = %bb6
- %239 = fsub float %126, %124 ; [#uses=4]
- %240 = fsub float %131, %129 ; [#uses=4]
- %241 = fsub float %136, %134 ; [#uses=4]
- %242 = getelementptr inbounds %struct.btQuadWord* %edge, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %241, float* %242, align 8
- %243 = getelementptr inbounds %struct.btQuadWord* %edge, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %240, float* %243, align 4
- %244 = getelementptr inbounds %struct.btQuadWord* %edge, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %239, float* %244, align 8
- %245 = getelementptr inbounds %struct.btQuadWord* %edge, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %245, align 4
- %246 = fcmp oeq float %224, 0.000000e+00 ; [#uses=1]
- br i1 %246, label %bb32, label %bb9
-
-bb9: ; preds = %bb7
- %247 = getelementptr inbounds %struct.btTriangleInfo* %52, i32 %index.0.i.i, i32 0 ; [#uses=1]
- %248 = load i32* %247, align 4 ; [#uses=2]
- %249 = and i32 %248, 1 ; [#uses=1]
- %toBool10 = icmp eq i32 %249, 0 ; [#uses=1]
- %iftmp.297.0 = select i1 %toBool10, float -1.000000e+00, float 1.000000e+00 ; [#uses=6]
- %250 = fmul float %122, %iftmp.297.0 ; [#uses=2]
- %251 = fmul float %121, %iftmp.297.0 ; [#uses=2]
- %252 = fmul float %120, %iftmp.297.0 ; [#uses=2]
- %253 = fmul float %241, %241 ; [#uses=1]
- %254 = fmul float %240, %240 ; [#uses=1]
- %255 = fadd float %253, %254 ; [#uses=1]
- %256 = fmul float %239, %239 ; [#uses=1]
- %257 = fadd float %255, %256 ; [#uses=1]
- %258 = call float @sqrtf(float %257) nounwind readonly ; [#uses=1]
- %259 = fmul float %224, 5.000000e-01 ; [#uses=2]
- %260 = call float @sinf(float %259) nounwind readonly ; [#uses=1]
- %261 = fdiv float %260, %258 ; [#uses=3]
- %262 = call float @cosf(float %259) nounwind readonly ; [#uses=6]
- %263 = fmul float %239, %261 ; [#uses=4]
- %264 = fmul float %240, %261 ; [#uses=4]
- %265 = fmul float %241, %261 ; [#uses=3]
- %266 = fsub float -0.000000e+00, %265 ; [#uses=4]
- %267 = fmul float %120, %266 ; [#uses=1]
- %268 = fmul float %264, %121 ; [#uses=1]
- %269 = fsub float %267, %268 ; [#uses=1]
- %270 = fmul float %263, %122 ; [#uses=1]
- %271 = fsub float %269, %270 ; [#uses=3]
- %272 = fmul float %262, %122 ; [#uses=1]
- %273 = fmul float %265, %121 ; [#uses=1]
- %274 = fadd float %272, %273 ; [#uses=1]
- %275 = fmul float %264, %120 ; [#uses=1]
- %276 = fsub float %274, %275 ; [#uses=3]
- %277 = fmul float %262, %121 ; [#uses=1]
- %278 = fmul float %263, %120 ; [#uses=1]
- %279 = fadd float %277, %278 ; [#uses=1]
- %280 = fmul float %265, %122 ; [#uses=1]
- %281 = fsub float %279, %280 ; [#uses=3]
- %282 = fmul float %262, %120 ; [#uses=1]
- %283 = fmul float %264, %122 ; [#uses=1]
- %284 = fadd float %282, %283 ; [#uses=1]
- %285 = fmul float %263, %121 ; [#uses=1]
- %286 = fsub float %284, %285 ; [#uses=3]
- %287 = fsub float -0.000000e+00, %263 ; [#uses=3]
- %288 = fsub float -0.000000e+00, %264 ; [#uses=3]
- %289 = fmul float %271, %287 ; [#uses=1]
- %290 = fmul float %276, %262 ; [#uses=1]
- %291 = fadd float %289, %290 ; [#uses=1]
- %292 = fmul float %286, %288 ; [#uses=1]
- %293 = fadd float %291, %292 ; [#uses=1]
- %294 = fmul float %281, %266 ; [#uses=1]
- %295 = fsub float %293, %294 ; [#uses=2]
- %296 = fmul float %271, %288 ; [#uses=1]
- %297 = fmul float %281, %262 ; [#uses=1]
- %298 = fadd float %296, %297 ; [#uses=1]
- %299 = fmul float %276, %266 ; [#uses=1]
- %300 = fadd float %298, %299 ; [#uses=1]
- %301 = fmul float %286, %287 ; [#uses=1]
- %302 = fsub float %300, %301 ; [#uses=2]
- %303 = fmul float %271, %266 ; [#uses=1]
- %304 = fmul float %286, %262 ; [#uses=1]
- %305 = fadd float %303, %304 ; [#uses=1]
- %306 = fmul float %281, %287 ; [#uses=1]
- %307 = fadd float %305, %306 ; [#uses=1]
- %308 = fmul float %276, %288 ; [#uses=1]
- %309 = fsub float %307, %308 ; [#uses=2]
- %310 = and i32 %248, 8 ; [#uses=1]
- %311 = icmp eq i32 %310, 0 ; [#uses=1]
- br i1 %311, label %bb15, label %bb14
-
-bb14: ; preds = %bb9
- %312 = fmul float %309, -1.000000e+00 ; [#uses=1]
- %313 = fmul float %302, -1.000000e+00 ; [#uses=1]
- %314 = fmul float %295, -1.000000e+00 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb14, %bb9
- %computedNormalB.0.0.0 = phi float [ %309, %bb9 ], [ %312, %bb14 ] ; [#uses=1]
- %computedNormalB.0.1.0 = phi float [ %302, %bb9 ], [ %313, %bb14 ] ; [#uses=1]
- %computedNormalB.0.2.0 = phi float [ %295, %bb9 ], [ %314, %bb14 ] ; [#uses=1]
- %315 = fmul float %220, %252 ; [#uses=1]
- %316 = fmul float %221, %251 ; [#uses=1]
- %317 = fadd float %315, %316 ; [#uses=1]
- %318 = fmul float %222, %250 ; [#uses=1]
- %319 = fadd float %317, %318 ; [#uses=1]
- %320 = getelementptr inbounds i8* %11, i32 84 ; [#uses=1]
- %321 = bitcast i8* %320 to float* ; [#uses=1]
- %322 = load float* %321, align 4 ; [#uses=2]
- %323 = fcmp ule float %322, %319 ; [#uses=1]
- br i1 %323, label %bb18, label %bb16
-
-bb16: ; preds = %bb15
- %324 = fmul float %computedNormalB.0.0.0, %iftmp.297.0 ; [#uses=1]
- %325 = fmul float %computedNormalB.0.1.0, %iftmp.297.0 ; [#uses=1]
- %326 = fmul float %221, %325 ; [#uses=1]
- %327 = fmul float %220, %324 ; [#uses=1]
- %328 = fmul float %computedNormalB.0.2.0, %iftmp.297.0 ; [#uses=1]
- %329 = fmul float %222, %328 ; [#uses=1]
- %330 = fadd float %327, %326 ; [#uses=1]
- %331 = fadd float %330, %329 ; [#uses=1]
- %332 = fcmp ule float %322, %331 ; [#uses=1]
- br i1 %332, label %bb18, label %bb32
-
-bb18: ; preds = %bb16, %bb15
- %333 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %252, float* %333, align 8
- %334 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %251, float* %334, align 4
- %335 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %250, float* %335, align 8
- %336 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %336, align 4
- %337 = call zeroext i8 @_Z13btClampNormalRK9btVector3S1_S1_fRS_(%struct.btQuadWord* %edge, %struct.btQuadWord* %2, %struct.btQuadWord* %localContactNormalOnB, float %224, %struct.btQuadWord* %clampedLocalNormal) ; [#uses=1]
- %toBool23 = icmp eq i8 %337, 0 ; [#uses=1]
- br i1 %toBool23, label %bb32, label %bb24
-
-bb24: ; preds = %bb18
- %338 = and i32 %normalAdjustFlags, 4 ; [#uses=1]
- %339 = icmp eq i32 %338, 0 ; [#uses=1]
- br i1 %339, label %bb25, label %bb24.bb30_crit_edge
-
-bb24.bb30_crit_edge: ; preds = %bb24
- %.phi.trans.insert326 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre327 = load float* %.phi.trans.insert326, align 8 ; [#uses=1]
- %.phi.trans.insert328 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre329 = load float* %.phi.trans.insert328, align 4 ; [#uses=1]
- %.phi.trans.insert330 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre331 = load float* %.phi.trans.insert330, align 8 ; [#uses=1]
- br label %bb30
-
-bb25: ; preds = %bb24
- %340 = fmul float %122, %iftmp.296.0 ; [#uses=1]
- %341 = fmul float %121, %iftmp.296.0 ; [#uses=1]
- %342 = fmul float %120, %iftmp.296.0 ; [#uses=1]
- %343 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- %344 = load float* %343, align 8 ; [#uses=2]
- %345 = fmul float %344, %342 ; [#uses=1]
- %346 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- %347 = load float* %346, align 4 ; [#uses=2]
- %348 = fmul float %347, %341 ; [#uses=1]
- %349 = fadd float %345, %348 ; [#uses=1]
- %350 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- %351 = load float* %350, align 8 ; [#uses=2]
- %352 = fmul float %351, %340 ; [#uses=1]
- %353 = fadd float %349, %352 ; [#uses=1]
- %354 = fcmp ogt float %353, 0.000000e+00 ; [#uses=1]
- br i1 %354, label %bb30, label %bb32
-
-bb30: ; preds = %bb25, %bb24.bb30_crit_edge
- %355 = phi float [ %.pre331, %bb24.bb30_crit_edge ], [ %351, %bb25 ] ; [#uses=3]
- %356 = phi float [ %.pre329, %bb24.bb30_crit_edge ], [ %347, %bb25 ] ; [#uses=3]
- %357 = phi float [ %.pre327, %bb24.bb30_crit_edge ], [ %344, %bb25 ] ; [#uses=3]
- %358 = load float* %176, align 4 ; [#uses=1]
- %359 = fmul float %358, %357 ; [#uses=1]
- %360 = load float* %173, align 4 ; [#uses=1]
- %361 = fmul float %360, %356 ; [#uses=1]
- %362 = fadd float %359, %361 ; [#uses=1]
- %363 = load float* %170, align 4 ; [#uses=1]
- %364 = fmul float %363, %355 ; [#uses=1]
- %365 = fadd float %362, %364 ; [#uses=2]
- %366 = load float* %177, align 4 ; [#uses=1]
- %367 = fmul float %366, %357 ; [#uses=1]
- %368 = load float* %174, align 4 ; [#uses=1]
- %369 = fmul float %368, %356 ; [#uses=1]
- %370 = fadd float %367, %369 ; [#uses=1]
- %371 = load float* %171, align 4 ; [#uses=1]
- %372 = fmul float %371, %355 ; [#uses=1]
- %373 = fadd float %370, %372 ; [#uses=2]
- %374 = load float* %178, align 4 ; [#uses=1]
- %375 = fmul float %374, %357 ; [#uses=1]
- %376 = load float* %175, align 4 ; [#uses=1]
- %377 = fmul float %376, %356 ; [#uses=1]
- %378 = fadd float %375, %377 ; [#uses=1]
- %379 = load float* %172, align 4 ; [#uses=1]
- %380 = fmul float %379, %355 ; [#uses=1]
- %381 = fadd float %378, %380 ; [#uses=2]
- store float %381, float* %188, align 4
- store float %373, float* %191, align 4
- store float %365, float* %195, align 4
- %382 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %382, align 4
- %383 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 5 ; [#uses=1]
- %384 = load float* %383, align 4 ; [#uses=3]
- %385 = fmul float %365, %384 ; [#uses=1]
- %386 = fmul float %373, %384 ; [#uses=1]
- %387 = fmul float %381, %384 ; [#uses=1]
- %388 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %389 = load float* %388, align 4 ; [#uses=1]
- %390 = fsub float %389, %385 ; [#uses=2]
- %391 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %392 = load float* %391, align 4 ; [#uses=1]
- %393 = fsub float %392, %386 ; [#uses=2]
- %394 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %395 = load float* %394, align 4 ; [#uses=1]
- %396 = fsub float %395, %387 ; [#uses=2]
- %397 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %396, float* %397, align 4
- %398 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %393, float* %398, align 4
- %399 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %390, float* %399, align 4
- %400 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %400, align 4
- %401 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %402 = load float* %401, align 4 ; [#uses=1]
- %403 = fsub float %390, %402 ; [#uses=3]
- %404 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %405 = load float* %404, align 4 ; [#uses=1]
- %406 = fsub float %393, %405 ; [#uses=3]
- %407 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %408 = load float* %407, align 4 ; [#uses=1]
- %409 = fsub float %396, %408 ; [#uses=3]
- %410 = load float* %178, align 4 ; [#uses=1]
- %411 = load float* %177, align 4 ; [#uses=1]
- %412 = load float* %176, align 4 ; [#uses=1]
- %413 = load float* %175, align 4 ; [#uses=1]
- %414 = load float* %174, align 4 ; [#uses=1]
- %415 = load float* %173, align 4 ; [#uses=1]
- %416 = load float* %172, align 4 ; [#uses=1]
- %417 = load float* %171, align 4 ; [#uses=1]
- %418 = load float* %170, align 4 ; [#uses=1]
- %419 = fmul float %416, %409 ; [#uses=1]
- %420 = fmul float %417, %406 ; [#uses=1]
- %421 = fadd float %419, %420 ; [#uses=1]
- %422 = fmul float %418, %403 ; [#uses=1]
- %423 = fadd float %421, %422 ; [#uses=1]
- %424 = fmul float %413, %409 ; [#uses=1]
- %425 = fmul float %414, %406 ; [#uses=1]
- %426 = fadd float %424, %425 ; [#uses=1]
- %427 = fmul float %415, %403 ; [#uses=1]
- %428 = fadd float %426, %427 ; [#uses=1]
- %429 = fmul float %410, %409 ; [#uses=1]
- %430 = fmul float %411, %406 ; [#uses=1]
- %431 = fadd float %429, %430 ; [#uses=1]
- %432 = fmul float %412, %403 ; [#uses=1]
- %433 = fadd float %431, %432 ; [#uses=1]
- store float %433, float* %.pre-phi, align 4
- store float %428, float* %.pre-phi346, align 4
- store float %423, float* %.pre-phi348, align 4
- %434 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %434, align 4
- br label %bb32
-
-bb32: ; preds = %bb30, %bb25, %bb18, %bb16, %bb7, %bb6, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit178
- %isNearEdge.0 = phi i8 [ 1, %bb30 ], [ 0, %bb6 ], [ 0, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit178 ], [ 1, %bb7 ], [ 1, %bb16 ], [ 1, %bb18 ], [ 1, %bb25 ] ; [#uses=2]
- %numConcaveEdgeHits.0 = phi i32 [ 0, %bb30 ], [ 0, %bb6 ], [ 0, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit178 ], [ 1, %bb7 ], [ 1, %bb16 ], [ 0, %bb18 ], [ 0, %bb25 ] ; [#uses=7]
- %435 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 2 ; [#uses=2]
- %436 = load float* %435, align 8 ; [#uses=2]
- %437 = load float* %123, align 8 ; [#uses=5]
- %438 = fsub float %436, %437 ; [#uses=4]
- %439 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 1 ; [#uses=2]
- %440 = load float* %439, align 4 ; [#uses=2]
- %441 = load float* %128, align 4 ; [#uses=5]
- %442 = fsub float %440, %441 ; [#uses=4]
- %443 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 0 ; [#uses=2]
- %444 = load float* %443, align 8 ; [#uses=2]
- %445 = load float* %133, align 8 ; [#uses=5]
- %446 = fsub float %444, %445 ; [#uses=4]
- %447 = fmul float %446, %446 ; [#uses=1]
- %448 = fmul float %442, %442 ; [#uses=1]
- %449 = fadd float %447, %448 ; [#uses=1]
- %450 = fmul float %438, %438 ; [#uses=1]
- %451 = fadd float %449, %450 ; [#uses=2]
- %452 = fcmp olt float %451, 0x3E80000000000000 ; [#uses=1]
- br i1 %452, label %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit171, label %bb1.i166
-
-bb1.i166: ; preds = %bb32
- %453 = fsub float %167, %437 ; [#uses=1]
- %454 = fsub float %168, %441 ; [#uses=1]
- %455 = fsub float %169, %445 ; [#uses=1]
- %456 = fmul float %455, %446 ; [#uses=1]
- %457 = fmul float %454, %442 ; [#uses=1]
- %458 = fadd float %456, %457 ; [#uses=1]
- %459 = fmul float %453, %438 ; [#uses=1]
- %460 = fadd float %458, %459 ; [#uses=1]
- %461 = fdiv float %460, %451 ; [#uses=3]
- %462 = fcmp olt float %461, 0.000000e+00 ; [#uses=1]
- br i1 %462, label %bb5.i170, label %bb3.i167
-
-bb3.i167: ; preds = %bb1.i166
- %463 = fcmp ogt float %461, 1.000000e+00 ; [#uses=1]
- br i1 %463, label %bb4.i168, label %bb5.i170
-
-bb4.i168: ; preds = %bb3.i167
- br label %bb5.i170
-
-bb5.i170: ; preds = %bb4.i168, %bb3.i167, %bb1.i166
- %delta.0.i169 = phi float [ 1.000000e+00, %bb4.i168 ], [ %461, %bb3.i167 ], [ 0.000000e+00, %bb1.i166 ] ; [#uses=3]
- %464 = fmul float %438, %delta.0.i169 ; [#uses=1]
- %465 = fmul float %442, %delta.0.i169 ; [#uses=1]
- %466 = fmul float %446, %delta.0.i169 ; [#uses=1]
- %467 = fadd float %437, %464 ; [#uses=1]
- %468 = fadd float %441, %465 ; [#uses=1]
- %469 = fadd float %445, %466 ; [#uses=1]
- br label %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit171
-
-_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit171: ; preds = %bb5.i170, %bb32
- %nearest.0.0.1 = phi float [ %469, %bb5.i170 ], [ %445, %bb32 ] ; [#uses=1]
- %nearest.0.1.1 = phi float [ %468, %bb5.i170 ], [ %441, %bb32 ] ; [#uses=1]
- %nearest.0.2.1 = phi float [ %467, %bb5.i170 ], [ %437, %bb32 ] ; [#uses=1]
- %470 = getelementptr inbounds %struct.btTriangleInfo* %52, i32 %index.0.i.i, i32 2 ; [#uses=1]
- %471 = load float* %470, align 4 ; [#uses=4]
- %472 = fcmp olt float %471, 0x401921FB60000000 ; [#uses=1]
- br i1 %472, label %bb33, label %bb90
-
-bb33: ; preds = %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit171
- %473 = fsub float %167, %nearest.0.2.1 ; [#uses=2]
- %474 = fsub float %168, %nearest.0.1.1 ; [#uses=2]
- %475 = fsub float %169, %nearest.0.0.1 ; [#uses=2]
- %476 = fmul float %475, %475 ; [#uses=1]
- %477 = fmul float %474, %474 ; [#uses=1]
- %478 = fadd float %476, %477 ; [#uses=1]
- %479 = fmul float %473, %473 ; [#uses=1]
- %480 = fadd float %478, %479 ; [#uses=1]
- %481 = call float @sqrtf(float %480) nounwind readonly ; [#uses=1]
- %482 = getelementptr inbounds i8* %11, i32 96 ; [#uses=1]
- %483 = bitcast i8* %482 to float* ; [#uses=1]
- %484 = load float* %483, align 4 ; [#uses=1]
- %485 = fcmp ogt float %484, %481 ; [#uses=1]
- br i1 %485, label %bb36, label %bb90
-
-bb36: ; preds = %bb33
- %486 = fsub float %437, %436 ; [#uses=4]
- %487 = fsub float %441, %440 ; [#uses=4]
- %488 = fsub float %445, %444 ; [#uses=4]
- %489 = getelementptr inbounds %struct.btQuadWord* %edge38, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %488, float* %489, align 8
- %490 = getelementptr inbounds %struct.btQuadWord* %edge38, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %487, float* %490, align 4
- %491 = getelementptr inbounds %struct.btQuadWord* %edge38, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %486, float* %491, align 8
- %492 = getelementptr inbounds %struct.btQuadWord* %edge38, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %492, align 4
- %493 = fcmp oeq float %471, 0.000000e+00 ; [#uses=1]
- br i1 %493, label %bb39, label %bb40
-
-bb39: ; preds = %bb36
- %494 = add nsw i32 %numConcaveEdgeHits.0, 1 ; [#uses=1]
- br label %bb90
-
-bb40: ; preds = %bb36
- %495 = getelementptr inbounds %struct.btTriangleInfo* %52, i32 %index.0.i.i, i32 0 ; [#uses=1]
- %496 = load i32* %495, align 4 ; [#uses=2]
- %.lobit163 = and i32 %496, 2 ; [#uses=1]
- %toBool59 = icmp eq i32 %.lobit163, 0 ; [#uses=1]
- %iftmp.301.0 = select i1 %toBool59, float -1.000000e+00, float 1.000000e+00 ; [#uses=6]
- %497 = fmul float %122, %iftmp.301.0 ; [#uses=2]
- %498 = fmul float %121, %iftmp.301.0 ; [#uses=2]
- %499 = fmul float %120, %iftmp.301.0 ; [#uses=2]
- %500 = fmul float %488, %488 ; [#uses=1]
- %501 = fmul float %487, %487 ; [#uses=1]
- %502 = fadd float %500, %501 ; [#uses=1]
- %503 = fmul float %486, %486 ; [#uses=1]
- %504 = fadd float %502, %503 ; [#uses=1]
- %505 = call float @sqrtf(float %504) nounwind readonly ; [#uses=1]
- %506 = fmul float %471, 5.000000e-01 ; [#uses=2]
- %507 = call float @sinf(float %506) nounwind readonly ; [#uses=1]
- %508 = fdiv float %507, %505 ; [#uses=3]
- %509 = call float @cosf(float %506) nounwind readonly ; [#uses=6]
- %510 = fmul float %486, %508 ; [#uses=4]
- %511 = fmul float %487, %508 ; [#uses=4]
- %512 = fmul float %488, %508 ; [#uses=3]
- %513 = fsub float -0.000000e+00, %512 ; [#uses=4]
- %514 = fmul float %120, %513 ; [#uses=1]
- %515 = fmul float %511, %121 ; [#uses=1]
- %516 = fsub float %514, %515 ; [#uses=1]
- %517 = fmul float %510, %122 ; [#uses=1]
- %518 = fsub float %516, %517 ; [#uses=3]
- %519 = fmul float %509, %122 ; [#uses=1]
- %520 = fmul float %512, %121 ; [#uses=1]
- %521 = fadd float %519, %520 ; [#uses=1]
- %522 = fmul float %511, %120 ; [#uses=1]
- %523 = fsub float %521, %522 ; [#uses=3]
- %524 = fmul float %509, %121 ; [#uses=1]
- %525 = fmul float %510, %120 ; [#uses=1]
- %526 = fadd float %524, %525 ; [#uses=1]
- %527 = fmul float %512, %122 ; [#uses=1]
- %528 = fsub float %526, %527 ; [#uses=3]
- %529 = fmul float %509, %120 ; [#uses=1]
- %530 = fmul float %511, %122 ; [#uses=1]
- %531 = fadd float %529, %530 ; [#uses=1]
- %532 = fmul float %510, %121 ; [#uses=1]
- %533 = fsub float %531, %532 ; [#uses=3]
- %534 = fsub float -0.000000e+00, %510 ; [#uses=3]
- %535 = fsub float -0.000000e+00, %511 ; [#uses=3]
- %536 = fmul float %518, %534 ; [#uses=1]
- %537 = fmul float %523, %509 ; [#uses=1]
- %538 = fadd float %536, %537 ; [#uses=1]
- %539 = fmul float %533, %535 ; [#uses=1]
- %540 = fadd float %538, %539 ; [#uses=1]
- %541 = fmul float %528, %513 ; [#uses=1]
- %542 = fsub float %540, %541 ; [#uses=2]
- %543 = fmul float %518, %535 ; [#uses=1]
- %544 = fmul float %528, %509 ; [#uses=1]
- %545 = fadd float %543, %544 ; [#uses=1]
- %546 = fmul float %523, %513 ; [#uses=1]
- %547 = fadd float %545, %546 ; [#uses=1]
- %548 = fmul float %533, %534 ; [#uses=1]
- %549 = fsub float %547, %548 ; [#uses=2]
- %550 = fmul float %518, %513 ; [#uses=1]
- %551 = fmul float %533, %509 ; [#uses=1]
- %552 = fadd float %550, %551 ; [#uses=1]
- %553 = fmul float %528, %534 ; [#uses=1]
- %554 = fadd float %552, %553 ; [#uses=1]
- %555 = fmul float %523, %535 ; [#uses=1]
- %556 = fsub float %554, %555 ; [#uses=2]
- %557 = and i32 %496, 16 ; [#uses=1]
- %558 = icmp eq i32 %557, 0 ; [#uses=1]
- br i1 %558, label %bb64, label %bb63
-
-bb63: ; preds = %bb40
- %559 = fmul float %556, -1.000000e+00 ; [#uses=1]
- %560 = fmul float %549, -1.000000e+00 ; [#uses=1]
- %561 = fmul float %542, -1.000000e+00 ; [#uses=1]
- br label %bb64
-
-bb64: ; preds = %bb63, %bb40
- %computedNormalB50.0.0.0 = phi float [ %559, %bb63 ], [ %556, %bb40 ] ; [#uses=1]
- %computedNormalB50.0.1.0 = phi float [ %560, %bb63 ], [ %549, %bb40 ] ; [#uses=1]
- %computedNormalB50.0.2.0 = phi float [ %561, %bb63 ], [ %542, %bb40 ] ; [#uses=1]
- %562 = load float* %209, align 8 ; [#uses=2]
- %563 = fmul float %562, %499 ; [#uses=1]
- %564 = load float* %210, align 4 ; [#uses=2]
- %565 = fmul float %564, %498 ; [#uses=1]
- %566 = fadd float %563, %565 ; [#uses=1]
- %567 = load float* %211, align 8 ; [#uses=2]
- %568 = fmul float %567, %497 ; [#uses=1]
- %569 = fadd float %566, %568 ; [#uses=1]
- %570 = getelementptr inbounds i8* %11, i32 84 ; [#uses=1]
- %571 = bitcast i8* %570 to float* ; [#uses=1]
- %572 = load float* %571, align 4 ; [#uses=2]
- %573 = fcmp ule float %572, %569 ; [#uses=1]
- br i1 %573, label %bb67, label %bb65
-
-bb65: ; preds = %bb64
- %574 = fmul float %computedNormalB50.0.0.0, %iftmp.301.0 ; [#uses=1]
- %575 = fmul float %computedNormalB50.0.1.0, %iftmp.301.0 ; [#uses=1]
- %576 = fmul float %564, %575 ; [#uses=1]
- %577 = fmul float %562, %574 ; [#uses=1]
- %578 = fmul float %computedNormalB50.0.2.0, %iftmp.301.0 ; [#uses=1]
- %579 = fmul float %567, %578 ; [#uses=1]
- %580 = fadd float %577, %576 ; [#uses=1]
- %581 = fadd float %580, %579 ; [#uses=1]
- %582 = fcmp ule float %572, %581 ; [#uses=1]
- br i1 %582, label %bb67, label %bb70
-
-bb67: ; preds = %bb65, %bb64
- %583 = load float* %178, align 4 ; [#uses=1]
- %584 = load float* %177, align 4 ; [#uses=1]
- %585 = load float* %176, align 4 ; [#uses=1]
- %586 = load float* %175, align 4 ; [#uses=1]
- %587 = load float* %174, align 4 ; [#uses=1]
- %588 = load float* %173, align 4 ; [#uses=1]
- %589 = load float* %172, align 4 ; [#uses=1]
- %590 = load float* %171, align 4 ; [#uses=1]
- %591 = load float* %170, align 4 ; [#uses=1]
- %592 = load float* %188, align 4 ; [#uses=3]
- %593 = fmul float %589, %592 ; [#uses=1]
- %594 = load float* %191, align 4 ; [#uses=3]
- %595 = fmul float %590, %594 ; [#uses=1]
- %596 = fadd float %593, %595 ; [#uses=1]
- %597 = load float* %195, align 4 ; [#uses=3]
- %598 = fmul float %591, %597 ; [#uses=1]
- %599 = fadd float %596, %598 ; [#uses=1]
- %600 = fmul float %586, %592 ; [#uses=1]
- %601 = fmul float %587, %594 ; [#uses=1]
- %602 = fadd float %600, %601 ; [#uses=1]
- %603 = fmul float %588, %597 ; [#uses=1]
- %604 = fadd float %602, %603 ; [#uses=1]
- %605 = fmul float %583, %592 ; [#uses=1]
- %606 = fmul float %584, %594 ; [#uses=1]
- %607 = fadd float %605, %606 ; [#uses=1]
- %608 = fmul float %585, %597 ; [#uses=1]
- %609 = fadd float %607, %608 ; [#uses=1]
- %610 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB73, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %609, float* %610, align 8
- %611 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB73, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %604, float* %611, align 4
- %612 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB73, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %599, float* %612, align 8
- %613 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB73, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %613, align 4
- %614 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %499, float* %614, align 8
- %615 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %498, float* %615, align 4
- %616 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %497, float* %616, align 8
- %617 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %617, align 4
- %618 = call zeroext i8 @_Z13btClampNormalRK9btVector3S1_S1_fRS_(%struct.btQuadWord* %edge38, %struct.btQuadWord* %1, %struct.btQuadWord* %localContactNormalOnB73, float %471, %struct.btQuadWord* %clampedLocalNormal75) ; [#uses=1]
- %toBool78 = icmp eq i8 %618, 0 ; [#uses=1]
- br i1 %toBool78, label %bb90, label %bb79
-
-bb70: ; preds = %bb65
- %619 = add nsw i32 %numConcaveEdgeHits.0, 1 ; [#uses=1]
- br label %bb90
-
-bb79: ; preds = %bb67
- %620 = and i32 %normalAdjustFlags, 4 ; [#uses=1]
- %621 = icmp eq i32 %620, 0 ; [#uses=1]
- br i1 %621, label %bb80, label %bb79.bb85_crit_edge
-
-bb79.bb85_crit_edge: ; preds = %bb79
- %.phi.trans.insert332 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal75, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre333 = load float* %.phi.trans.insert332, align 8 ; [#uses=1]
- %.phi.trans.insert334 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal75, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre335 = load float* %.phi.trans.insert334, align 4 ; [#uses=1]
- %.phi.trans.insert336 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal75, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre337 = load float* %.phi.trans.insert336, align 8 ; [#uses=1]
- br label %bb85
-
-bb80: ; preds = %bb79
- %622 = fmul float %122, %iftmp.296.0 ; [#uses=1]
- %623 = fmul float %121, %iftmp.296.0 ; [#uses=1]
- %624 = fmul float %120, %iftmp.296.0 ; [#uses=1]
- %625 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal75, i32 0, i32 0, i32 0 ; [#uses=1]
- %626 = load float* %625, align 8 ; [#uses=2]
- %627 = fmul float %626, %624 ; [#uses=1]
- %628 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal75, i32 0, i32 0, i32 1 ; [#uses=1]
- %629 = load float* %628, align 4 ; [#uses=2]
- %630 = fmul float %629, %623 ; [#uses=1]
- %631 = fadd float %627, %630 ; [#uses=1]
- %632 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal75, i32 0, i32 0, i32 2 ; [#uses=1]
- %633 = load float* %632, align 8 ; [#uses=2]
- %634 = fmul float %633, %622 ; [#uses=1]
- %635 = fadd float %631, %634 ; [#uses=1]
- %636 = fcmp ogt float %635, 0.000000e+00 ; [#uses=1]
- br i1 %636, label %bb85, label %bb90
-
-bb85: ; preds = %bb80, %bb79.bb85_crit_edge
- %637 = phi float [ %.pre337, %bb79.bb85_crit_edge ], [ %633, %bb80 ] ; [#uses=3]
- %638 = phi float [ %.pre335, %bb79.bb85_crit_edge ], [ %629, %bb80 ] ; [#uses=3]
- %639 = phi float [ %.pre333, %bb79.bb85_crit_edge ], [ %626, %bb80 ] ; [#uses=3]
- %640 = load float* %176, align 4 ; [#uses=1]
- %641 = fmul float %640, %639 ; [#uses=1]
- %642 = load float* %173, align 4 ; [#uses=1]
- %643 = fmul float %642, %638 ; [#uses=1]
- %644 = fadd float %641, %643 ; [#uses=1]
- %645 = load float* %170, align 4 ; [#uses=1]
- %646 = fmul float %645, %637 ; [#uses=1]
- %647 = fadd float %644, %646 ; [#uses=2]
- %648 = load float* %177, align 4 ; [#uses=1]
- %649 = fmul float %648, %639 ; [#uses=1]
- %650 = load float* %174, align 4 ; [#uses=1]
- %651 = fmul float %650, %638 ; [#uses=1]
- %652 = fadd float %649, %651 ; [#uses=1]
- %653 = load float* %171, align 4 ; [#uses=1]
- %654 = fmul float %653, %637 ; [#uses=1]
- %655 = fadd float %652, %654 ; [#uses=2]
- %656 = load float* %178, align 4 ; [#uses=1]
- %657 = fmul float %656, %639 ; [#uses=1]
- %658 = load float* %175, align 4 ; [#uses=1]
- %659 = fmul float %658, %638 ; [#uses=1]
- %660 = fadd float %657, %659 ; [#uses=1]
- %661 = load float* %172, align 4 ; [#uses=1]
- %662 = fmul float %661, %637 ; [#uses=1]
- %663 = fadd float %660, %662 ; [#uses=2]
- store float %663, float* %188, align 4
- store float %655, float* %191, align 4
- store float %647, float* %195, align 4
- %664 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %664, align 4
- %665 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 5 ; [#uses=1]
- %666 = load float* %665, align 4 ; [#uses=3]
- %667 = fmul float %647, %666 ; [#uses=1]
- %668 = fmul float %655, %666 ; [#uses=1]
- %669 = fmul float %663, %666 ; [#uses=1]
- %670 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %671 = load float* %670, align 4 ; [#uses=1]
- %672 = fsub float %671, %667 ; [#uses=2]
- %673 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %674 = load float* %673, align 4 ; [#uses=1]
- %675 = fsub float %674, %668 ; [#uses=2]
- %676 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %677 = load float* %676, align 4 ; [#uses=1]
- %678 = fsub float %677, %669 ; [#uses=2]
- %679 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %678, float* %679, align 4
- %680 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %675, float* %680, align 4
- %681 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %672, float* %681, align 4
- %682 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %682, align 4
- %683 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %684 = load float* %683, align 4 ; [#uses=1]
- %685 = fsub float %672, %684 ; [#uses=3]
- %686 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %687 = load float* %686, align 4 ; [#uses=1]
- %688 = fsub float %675, %687 ; [#uses=3]
- %689 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %690 = load float* %689, align 4 ; [#uses=1]
- %691 = fsub float %678, %690 ; [#uses=3]
- %692 = load float* %178, align 4 ; [#uses=1]
- %693 = load float* %177, align 4 ; [#uses=1]
- %694 = load float* %176, align 4 ; [#uses=1]
- %695 = load float* %175, align 4 ; [#uses=1]
- %696 = load float* %174, align 4 ; [#uses=1]
- %697 = load float* %173, align 4 ; [#uses=1]
- %698 = load float* %172, align 4 ; [#uses=1]
- %699 = load float* %171, align 4 ; [#uses=1]
- %700 = load float* %170, align 4 ; [#uses=1]
- %701 = fmul float %698, %691 ; [#uses=1]
- %702 = fmul float %699, %688 ; [#uses=1]
- %703 = fadd float %701, %702 ; [#uses=1]
- %704 = fmul float %700, %685 ; [#uses=1]
- %705 = fadd float %703, %704 ; [#uses=1]
- %706 = fmul float %695, %691 ; [#uses=1]
- %707 = fmul float %696, %688 ; [#uses=1]
- %708 = fadd float %706, %707 ; [#uses=1]
- %709 = fmul float %697, %685 ; [#uses=1]
- %710 = fadd float %708, %709 ; [#uses=1]
- %711 = fmul float %692, %691 ; [#uses=1]
- %712 = fmul float %693, %688 ; [#uses=1]
- %713 = fadd float %711, %712 ; [#uses=1]
- %714 = fmul float %694, %685 ; [#uses=1]
- %715 = fadd float %713, %714 ; [#uses=1]
- store float %715, float* %.pre-phi, align 4
- store float %710, float* %.pre-phi346, align 4
- store float %705, float* %.pre-phi348, align 4
- %716 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %716, align 4
- br label %bb90
-
-bb90: ; preds = %bb85, %bb80, %bb70, %bb67, %bb39, %bb33, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit171
- %isNearEdge.1 = phi i8 [ 1, %bb39 ], [ 1, %bb70 ], [ 1, %bb85 ], [ %isNearEdge.0, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit171 ], [ %isNearEdge.0, %bb33 ], [ 1, %bb67 ], [ 1, %bb80 ] ; [#uses=2]
- %numConcaveEdgeHits.1 = phi i32 [ %494, %bb39 ], [ %619, %bb70 ], [ %numConcaveEdgeHits.0, %bb85 ], [ %numConcaveEdgeHits.0, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit171 ], [ %numConcaveEdgeHits.0, %bb33 ], [ %numConcaveEdgeHits.0, %bb67 ], [ %numConcaveEdgeHits.0, %bb80 ] ; [#uses=7]
- %717 = load float* %125, align 8 ; [#uses=2]
- %718 = load float* %435, align 8 ; [#uses=5]
- %719 = fsub float %717, %718 ; [#uses=4]
- %720 = load float* %130, align 4 ; [#uses=2]
- %721 = load float* %439, align 4 ; [#uses=5]
- %722 = fsub float %720, %721 ; [#uses=4]
- %723 = load float* %135, align 8 ; [#uses=2]
- %724 = load float* %443, align 8 ; [#uses=5]
- %725 = fsub float %723, %724 ; [#uses=4]
- %726 = fmul float %725, %725 ; [#uses=1]
- %727 = fmul float %722, %722 ; [#uses=1]
- %728 = fadd float %726, %727 ; [#uses=1]
- %729 = fmul float %719, %719 ; [#uses=1]
- %730 = fadd float %728, %729 ; [#uses=2]
- %731 = fcmp olt float %730, 0x3E80000000000000 ; [#uses=1]
- br i1 %731, label %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit, label %bb1.i
-
-bb1.i: ; preds = %bb90
- %732 = fsub float %167, %718 ; [#uses=1]
- %733 = fsub float %168, %721 ; [#uses=1]
- %734 = fsub float %169, %724 ; [#uses=1]
- %735 = fmul float %734, %725 ; [#uses=1]
- %736 = fmul float %733, %722 ; [#uses=1]
- %737 = fadd float %735, %736 ; [#uses=1]
- %738 = fmul float %732, %719 ; [#uses=1]
- %739 = fadd float %737, %738 ; [#uses=1]
- %740 = fdiv float %739, %730 ; [#uses=3]
- %741 = fcmp olt float %740, 0.000000e+00 ; [#uses=1]
- br i1 %741, label %bb5.i, label %bb3.i
-
-bb3.i: ; preds = %bb1.i
- %742 = fcmp ogt float %740, 1.000000e+00 ; [#uses=1]
- br i1 %742, label %bb4.i, label %bb5.i
-
-bb4.i: ; preds = %bb3.i
- br label %bb5.i
-
-bb5.i: ; preds = %bb4.i, %bb3.i, %bb1.i
- %delta.0.i = phi float [ 1.000000e+00, %bb4.i ], [ %740, %bb3.i ], [ 0.000000e+00, %bb1.i ] ; [#uses=3]
- %743 = fmul float %719, %delta.0.i ; [#uses=1]
- %744 = fmul float %722, %delta.0.i ; [#uses=1]
- %745 = fmul float %725, %delta.0.i ; [#uses=1]
- %746 = fadd float %718, %743 ; [#uses=1]
- %747 = fadd float %721, %744 ; [#uses=1]
- %748 = fadd float %724, %745 ; [#uses=1]
- br label %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit
-
-_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit: ; preds = %bb5.i, %bb90
- %nearest.0.0.0 = phi float [ %748, %bb5.i ], [ %724, %bb90 ] ; [#uses=1]
- %nearest.0.1.0 = phi float [ %747, %bb5.i ], [ %721, %bb90 ] ; [#uses=1]
- %nearest.0.2.0 = phi float [ %746, %bb5.i ], [ %718, %bb90 ] ; [#uses=1]
- %749 = getelementptr inbounds %struct.btTriangleInfo* %52, i32 %index.0.i.i, i32 3 ; [#uses=1]
- %750 = load float* %749, align 4 ; [#uses=4]
- %751 = fcmp olt float %750, 0x401921FB60000000 ; [#uses=1]
- br i1 %751, label %bb91, label %bb148
-
-bb91: ; preds = %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit
- %752 = fsub float %167, %nearest.0.2.0 ; [#uses=2]
- %753 = fsub float %168, %nearest.0.1.0 ; [#uses=2]
- %754 = fsub float %169, %nearest.0.0.0 ; [#uses=2]
- %755 = fmul float %754, %754 ; [#uses=1]
- %756 = fmul float %753, %753 ; [#uses=1]
- %757 = fadd float %755, %756 ; [#uses=1]
- %758 = fmul float %752, %752 ; [#uses=1]
- %759 = fadd float %757, %758 ; [#uses=1]
- %760 = call float @sqrtf(float %759) nounwind readonly ; [#uses=1]
- %761 = getelementptr inbounds i8* %11, i32 96 ; [#uses=1]
- %762 = bitcast i8* %761 to float* ; [#uses=1]
- %763 = load float* %762, align 4 ; [#uses=1]
- %764 = fcmp ogt float %763, %760 ; [#uses=1]
- br i1 %764, label %bb94, label %bb148
-
-bb94: ; preds = %bb91
- %765 = fsub float %718, %717 ; [#uses=4]
- %766 = fsub float %721, %720 ; [#uses=4]
- %767 = fsub float %724, %723 ; [#uses=4]
- %768 = getelementptr inbounds %struct.btQuadWord* %edge96, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %767, float* %768, align 8
- %769 = getelementptr inbounds %struct.btQuadWord* %edge96, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %766, float* %769, align 4
- %770 = getelementptr inbounds %struct.btQuadWord* %edge96, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %765, float* %770, align 8
- %771 = getelementptr inbounds %struct.btQuadWord* %edge96, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %771, align 4
- %772 = fcmp oeq float %750, 0.000000e+00 ; [#uses=1]
- br i1 %772, label %bb97, label %bb98
-
-bb97: ; preds = %bb94
- %773 = add nsw i32 %numConcaveEdgeHits.1, 1 ; [#uses=1]
- br label %bb148
-
-bb98: ; preds = %bb94
- %774 = getelementptr inbounds %struct.btTriangleInfo* %52, i32 %index.0.i.i, i32 0 ; [#uses=1]
- %775 = load i32* %774, align 4 ; [#uses=2]
- %.lobit = and i32 %775, 4 ; [#uses=1]
- %toBool117 = icmp eq i32 %.lobit, 0 ; [#uses=1]
- %iftmp.305.0 = select i1 %toBool117, float -1.000000e+00, float 1.000000e+00 ; [#uses=6]
- %776 = fmul float %122, %iftmp.305.0 ; [#uses=2]
- %777 = fmul float %121, %iftmp.305.0 ; [#uses=2]
- %778 = fmul float %120, %iftmp.305.0 ; [#uses=2]
- %779 = fmul float %767, %767 ; [#uses=1]
- %780 = fmul float %766, %766 ; [#uses=1]
- %781 = fadd float %779, %780 ; [#uses=1]
- %782 = fmul float %765, %765 ; [#uses=1]
- %783 = fadd float %781, %782 ; [#uses=1]
- %784 = call float @sqrtf(float %783) nounwind readonly ; [#uses=1]
- %785 = fmul float %750, 5.000000e-01 ; [#uses=2]
- %786 = call float @sinf(float %785) nounwind readonly ; [#uses=1]
- %787 = fdiv float %786, %784 ; [#uses=3]
- %788 = call float @cosf(float %785) nounwind readonly ; [#uses=6]
- %789 = fmul float %765, %787 ; [#uses=4]
- %790 = fmul float %766, %787 ; [#uses=4]
- %791 = fmul float %767, %787 ; [#uses=3]
- %792 = fsub float -0.000000e+00, %791 ; [#uses=4]
- %793 = fmul float %120, %792 ; [#uses=1]
- %794 = fmul float %790, %121 ; [#uses=1]
- %795 = fsub float %793, %794 ; [#uses=1]
- %796 = fmul float %789, %122 ; [#uses=1]
- %797 = fsub float %795, %796 ; [#uses=3]
- %798 = fmul float %788, %122 ; [#uses=1]
- %799 = fmul float %791, %121 ; [#uses=1]
- %800 = fadd float %798, %799 ; [#uses=1]
- %801 = fmul float %790, %120 ; [#uses=1]
- %802 = fsub float %800, %801 ; [#uses=3]
- %803 = fmul float %788, %121 ; [#uses=1]
- %804 = fmul float %789, %120 ; [#uses=1]
- %805 = fadd float %803, %804 ; [#uses=1]
- %806 = fmul float %791, %122 ; [#uses=1]
- %807 = fsub float %805, %806 ; [#uses=3]
- %808 = fmul float %788, %120 ; [#uses=1]
- %809 = fmul float %790, %122 ; [#uses=1]
- %810 = fadd float %808, %809 ; [#uses=1]
- %811 = fmul float %789, %121 ; [#uses=1]
- %812 = fsub float %810, %811 ; [#uses=3]
- %813 = fsub float -0.000000e+00, %789 ; [#uses=3]
- %814 = fsub float -0.000000e+00, %790 ; [#uses=3]
- %815 = fmul float %797, %813 ; [#uses=1]
- %816 = fmul float %802, %788 ; [#uses=1]
- %817 = fadd float %815, %816 ; [#uses=1]
- %818 = fmul float %812, %814 ; [#uses=1]
- %819 = fadd float %817, %818 ; [#uses=1]
- %820 = fmul float %807, %792 ; [#uses=1]
- %821 = fsub float %819, %820 ; [#uses=2]
- %822 = fmul float %797, %814 ; [#uses=1]
- %823 = fmul float %807, %788 ; [#uses=1]
- %824 = fadd float %822, %823 ; [#uses=1]
- %825 = fmul float %802, %792 ; [#uses=1]
- %826 = fadd float %824, %825 ; [#uses=1]
- %827 = fmul float %812, %813 ; [#uses=1]
- %828 = fsub float %826, %827 ; [#uses=2]
- %829 = fmul float %797, %792 ; [#uses=1]
- %830 = fmul float %812, %788 ; [#uses=1]
- %831 = fadd float %829, %830 ; [#uses=1]
- %832 = fmul float %807, %813 ; [#uses=1]
- %833 = fadd float %831, %832 ; [#uses=1]
- %834 = fmul float %802, %814 ; [#uses=1]
- %835 = fsub float %833, %834 ; [#uses=2]
- %836 = and i32 %775, 32 ; [#uses=1]
- %837 = icmp eq i32 %836, 0 ; [#uses=1]
- br i1 %837, label %bb122, label %bb121
-
-bb121: ; preds = %bb98
- %838 = fmul float %835, -1.000000e+00 ; [#uses=1]
- %839 = fmul float %828, -1.000000e+00 ; [#uses=1]
- %840 = fmul float %821, -1.000000e+00 ; [#uses=1]
- br label %bb122
-
-bb122: ; preds = %bb121, %bb98
- %computedNormalB108.0.0.0 = phi float [ %838, %bb121 ], [ %835, %bb98 ] ; [#uses=1]
- %computedNormalB108.0.1.0 = phi float [ %839, %bb121 ], [ %828, %bb98 ] ; [#uses=1]
- %computedNormalB108.0.2.0 = phi float [ %840, %bb121 ], [ %821, %bb98 ] ; [#uses=1]
- %841 = load float* %209, align 8 ; [#uses=2]
- %842 = fmul float %841, %778 ; [#uses=1]
- %843 = load float* %210, align 4 ; [#uses=2]
- %844 = fmul float %843, %777 ; [#uses=1]
- %845 = fadd float %842, %844 ; [#uses=1]
- %846 = load float* %211, align 8 ; [#uses=2]
- %847 = fmul float %846, %776 ; [#uses=1]
- %848 = fadd float %845, %847 ; [#uses=1]
- %849 = getelementptr inbounds i8* %11, i32 84 ; [#uses=1]
- %850 = bitcast i8* %849 to float* ; [#uses=1]
- %851 = load float* %850, align 4 ; [#uses=2]
- %852 = fcmp ule float %851, %848 ; [#uses=1]
- br i1 %852, label %bb125, label %bb123
-
-bb123: ; preds = %bb122
- %853 = fmul float %computedNormalB108.0.0.0, %iftmp.305.0 ; [#uses=1]
- %854 = fmul float %computedNormalB108.0.1.0, %iftmp.305.0 ; [#uses=1]
- %855 = fmul float %843, %854 ; [#uses=1]
- %856 = fmul float %841, %853 ; [#uses=1]
- %857 = fmul float %computedNormalB108.0.2.0, %iftmp.305.0 ; [#uses=1]
- %858 = fmul float %846, %857 ; [#uses=1]
- %859 = fadd float %856, %855 ; [#uses=1]
- %860 = fadd float %859, %858 ; [#uses=1]
- %861 = fcmp ule float %851, %860 ; [#uses=1]
- br i1 %861, label %bb125, label %bb128
-
-bb125: ; preds = %bb123, %bb122
- %862 = load float* %178, align 4 ; [#uses=1]
- %863 = load float* %177, align 4 ; [#uses=1]
- %864 = load float* %176, align 4 ; [#uses=1]
- %865 = load float* %175, align 4 ; [#uses=1]
- %866 = load float* %174, align 4 ; [#uses=1]
- %867 = load float* %173, align 4 ; [#uses=1]
- %868 = load float* %172, align 4 ; [#uses=1]
- %869 = load float* %171, align 4 ; [#uses=1]
- %870 = load float* %170, align 4 ; [#uses=1]
- %871 = load float* %188, align 4 ; [#uses=3]
- %872 = fmul float %868, %871 ; [#uses=1]
- %873 = load float* %191, align 4 ; [#uses=3]
- %874 = fmul float %869, %873 ; [#uses=1]
- %875 = fadd float %872, %874 ; [#uses=1]
- %876 = load float* %195, align 4 ; [#uses=3]
- %877 = fmul float %870, %876 ; [#uses=1]
- %878 = fadd float %875, %877 ; [#uses=1]
- %879 = fmul float %865, %871 ; [#uses=1]
- %880 = fmul float %866, %873 ; [#uses=1]
- %881 = fadd float %879, %880 ; [#uses=1]
- %882 = fmul float %867, %876 ; [#uses=1]
- %883 = fadd float %881, %882 ; [#uses=1]
- %884 = fmul float %862, %871 ; [#uses=1]
- %885 = fmul float %863, %873 ; [#uses=1]
- %886 = fadd float %884, %885 ; [#uses=1]
- %887 = fmul float %864, %876 ; [#uses=1]
- %888 = fadd float %886, %887 ; [#uses=1]
- %889 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB131, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %888, float* %889, align 8
- %890 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB131, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %883, float* %890, align 4
- %891 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB131, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %878, float* %891, align 8
- %892 = getelementptr inbounds %struct.btQuadWord* %localContactNormalOnB131, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %892, align 4
- %893 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %778, float* %893, align 8
- %894 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %777, float* %894, align 4
- %895 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %776, float* %895, align 8
- %896 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %896, align 4
- %897 = call zeroext i8 @_Z13btClampNormalRK9btVector3S1_S1_fRS_(%struct.btQuadWord* %edge96, %struct.btQuadWord* %0, %struct.btQuadWord* %localContactNormalOnB131, float %750, %struct.btQuadWord* %clampedLocalNormal133) ; [#uses=1]
- %toBool136 = icmp eq i8 %897, 0 ; [#uses=1]
- br i1 %toBool136, label %bb148, label %bb137
-
-bb128: ; preds = %bb123
- %898 = add nsw i32 %numConcaveEdgeHits.1, 1 ; [#uses=1]
- br label %bb148
-
-bb137: ; preds = %bb125
- %899 = and i32 %normalAdjustFlags, 4 ; [#uses=1]
- %900 = icmp eq i32 %899, 0 ; [#uses=1]
- br i1 %900, label %bb138, label %bb137.bb143_crit_edge
-
-bb137.bb143_crit_edge: ; preds = %bb137
- %.phi.trans.insert338 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal133, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre339 = load float* %.phi.trans.insert338, align 8 ; [#uses=1]
- %.phi.trans.insert340 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal133, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre341 = load float* %.phi.trans.insert340, align 4 ; [#uses=1]
- %.phi.trans.insert342 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal133, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre343 = load float* %.phi.trans.insert342, align 8 ; [#uses=1]
- br label %bb143
-
-bb138: ; preds = %bb137
- %901 = fmul float %122, %iftmp.296.0 ; [#uses=1]
- %902 = fmul float %121, %iftmp.296.0 ; [#uses=1]
- %903 = fmul float %120, %iftmp.296.0 ; [#uses=1]
- %904 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal133, i32 0, i32 0, i32 0 ; [#uses=1]
- %905 = load float* %904, align 8 ; [#uses=2]
- %906 = fmul float %905, %903 ; [#uses=1]
- %907 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal133, i32 0, i32 0, i32 1 ; [#uses=1]
- %908 = load float* %907, align 4 ; [#uses=2]
- %909 = fmul float %908, %902 ; [#uses=1]
- %910 = fadd float %906, %909 ; [#uses=1]
- %911 = getelementptr inbounds %struct.btQuadWord* %clampedLocalNormal133, i32 0, i32 0, i32 2 ; [#uses=1]
- %912 = load float* %911, align 8 ; [#uses=2]
- %913 = fmul float %912, %901 ; [#uses=1]
- %914 = fadd float %910, %913 ; [#uses=1]
- %915 = fcmp ogt float %914, 0.000000e+00 ; [#uses=1]
- br i1 %915, label %bb143, label %bb148
-
-bb143: ; preds = %bb138, %bb137.bb143_crit_edge
- %916 = phi float [ %.pre343, %bb137.bb143_crit_edge ], [ %912, %bb138 ] ; [#uses=3]
- %917 = phi float [ %.pre341, %bb137.bb143_crit_edge ], [ %908, %bb138 ] ; [#uses=3]
- %918 = phi float [ %.pre339, %bb137.bb143_crit_edge ], [ %905, %bb138 ] ; [#uses=3]
- %919 = load float* %176, align 4 ; [#uses=1]
- %920 = fmul float %919, %918 ; [#uses=1]
- %921 = load float* %173, align 4 ; [#uses=1]
- %922 = fmul float %921, %917 ; [#uses=1]
- %923 = fadd float %920, %922 ; [#uses=1]
- %924 = load float* %170, align 4 ; [#uses=1]
- %925 = fmul float %924, %916 ; [#uses=1]
- %926 = fadd float %923, %925 ; [#uses=2]
- %927 = load float* %177, align 4 ; [#uses=1]
- %928 = fmul float %927, %918 ; [#uses=1]
- %929 = load float* %174, align 4 ; [#uses=1]
- %930 = fmul float %929, %917 ; [#uses=1]
- %931 = fadd float %928, %930 ; [#uses=1]
- %932 = load float* %171, align 4 ; [#uses=1]
- %933 = fmul float %932, %916 ; [#uses=1]
- %934 = fadd float %931, %933 ; [#uses=2]
- %935 = load float* %178, align 4 ; [#uses=1]
- %936 = fmul float %935, %918 ; [#uses=1]
- %937 = load float* %175, align 4 ; [#uses=1]
- %938 = fmul float %937, %917 ; [#uses=1]
- %939 = fadd float %936, %938 ; [#uses=1]
- %940 = load float* %172, align 4 ; [#uses=1]
- %941 = fmul float %940, %916 ; [#uses=1]
- %942 = fadd float %939, %941 ; [#uses=2]
- store float %942, float* %188, align 4
- store float %934, float* %191, align 4
- store float %926, float* %195, align 4
- %943 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %943, align 4
- %944 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 5 ; [#uses=1]
- %945 = load float* %944, align 4 ; [#uses=3]
- %946 = fmul float %926, %945 ; [#uses=1]
- %947 = fmul float %934, %945 ; [#uses=1]
- %948 = fmul float %942, %945 ; [#uses=1]
- %949 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %950 = load float* %949, align 4 ; [#uses=1]
- %951 = fsub float %950, %946 ; [#uses=2]
- %952 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %953 = load float* %952, align 4 ; [#uses=1]
- %954 = fsub float %953, %947 ; [#uses=2]
- %955 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %956 = load float* %955, align 4 ; [#uses=1]
- %957 = fsub float %956, %948 ; [#uses=2]
- %958 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %957, float* %958, align 4
- %959 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %954, float* %959, align 4
- %960 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %951, float* %960, align 4
- %961 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %961, align 4
- %962 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %963 = load float* %962, align 4 ; [#uses=1]
- %964 = fsub float %951, %963 ; [#uses=3]
- %965 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %966 = load float* %965, align 4 ; [#uses=1]
- %967 = fsub float %954, %966 ; [#uses=3]
- %968 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %969 = load float* %968, align 4 ; [#uses=1]
- %970 = fsub float %957, %969 ; [#uses=3]
- %971 = load float* %178, align 4 ; [#uses=1]
- %972 = load float* %177, align 4 ; [#uses=1]
- %973 = load float* %176, align 4 ; [#uses=1]
- %974 = load float* %175, align 4 ; [#uses=1]
- %975 = load float* %174, align 4 ; [#uses=1]
- %976 = load float* %173, align 4 ; [#uses=1]
- %977 = load float* %172, align 4 ; [#uses=1]
- %978 = load float* %171, align 4 ; [#uses=1]
- %979 = load float* %170, align 4 ; [#uses=1]
- %980 = fmul float %977, %970 ; [#uses=1]
- %981 = fmul float %978, %967 ; [#uses=1]
- %982 = fadd float %980, %981 ; [#uses=1]
- %983 = fmul float %979, %964 ; [#uses=1]
- %984 = fadd float %982, %983 ; [#uses=1]
- %985 = fmul float %974, %970 ; [#uses=1]
- %986 = fmul float %975, %967 ; [#uses=1]
- %987 = fadd float %985, %986 ; [#uses=1]
- %988 = fmul float %976, %964 ; [#uses=1]
- %989 = fadd float %987, %988 ; [#uses=1]
- %990 = fmul float %971, %970 ; [#uses=1]
- %991 = fmul float %972, %967 ; [#uses=1]
- %992 = fadd float %990, %991 ; [#uses=1]
- %993 = fmul float %973, %964 ; [#uses=1]
- %994 = fadd float %992, %993 ; [#uses=1]
- store float %994, float* %.pre-phi, align 4
- store float %989, float* %.pre-phi346, align 4
- store float %984, float* %.pre-phi348, align 4
- %995 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %995, align 4
- br label %bb148
-
-bb148: ; preds = %bb143, %bb138, %bb128, %bb125, %bb97, %bb91, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit
- %isNearEdge.2 = phi i8 [ 1, %bb97 ], [ 1, %bb128 ], [ 1, %bb143 ], [ 1, %bb125 ], [ %isNearEdge.1, %bb91 ], [ %isNearEdge.1, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit ], [ 1, %bb138 ] ; [#uses=1]
- %numConcaveEdgeHits.2 = phi i32 [ %773, %bb97 ], [ %898, %bb128 ], [ %numConcaveEdgeHits.1, %bb143 ], [ %numConcaveEdgeHits.1, %bb125 ], [ %numConcaveEdgeHits.1, %bb91 ], [ %numConcaveEdgeHits.1, %_Z27btNearestPointInLineSegmentRK9btVector3S1_S1_RS_.exit ], [ %numConcaveEdgeHits.1, %bb138 ] ; [#uses=1]
- %toBool149.not = icmp ne i8 %isNearEdge.2, 0 ; [#uses=1]
- %996 = icmp sgt i32 %numConcaveEdgeHits.2, 0 ; [#uses=1]
- %or.cond = and i1 %toBool149.not, %996 ; [#uses=1]
- br i1 %or.cond, label %bb151, label %return
-
-bb151: ; preds = %bb148
- %997 = and i32 %normalAdjustFlags, 2 ; [#uses=1]
- %998 = icmp eq i32 %997, 0 ; [#uses=1]
- br i1 %998, label %bb157, label %bb152
-
-bb152: ; preds = %bb151
- %999 = load float* %209, align 8 ; [#uses=1]
- %1000 = fmul float %120, %999 ; [#uses=1]
- %1001 = load float* %210, align 4 ; [#uses=1]
- %1002 = fmul float %121, %1001 ; [#uses=1]
- %1003 = fadd float %1000, %1002 ; [#uses=1]
- %1004 = load float* %211, align 8 ; [#uses=1]
- %1005 = fmul float %122, %1004 ; [#uses=1]
- %1006 = fadd float %1003, %1005 ; [#uses=1]
- %1007 = fcmp olt float %1006, 0.000000e+00 ; [#uses=1]
- br i1 %1007, label %bb154, label %bb155
-
-bb154: ; preds = %bb152
- %1008 = fmul float %120, -1.000000e+00 ; [#uses=1]
- %1009 = fmul float %121, -1.000000e+00 ; [#uses=1]
- %1010 = fmul float %122, -1.000000e+00 ; [#uses=1]
- br label %bb155
-
-bb155: ; preds = %bb154, %bb152
- %tri_normal.0.0.0 = phi float [ %1008, %bb154 ], [ %120, %bb152 ] ; [#uses=3]
- %tri_normal.0.1.0 = phi float [ %1009, %bb154 ], [ %121, %bb152 ] ; [#uses=3]
- %tri_normal.0.2.0 = phi float [ %1010, %bb154 ], [ %122, %bb152 ] ; [#uses=3]
- %1011 = load float* %176, align 4 ; [#uses=1]
- %1012 = fmul float %1011, %tri_normal.0.0.0 ; [#uses=1]
- %1013 = load float* %173, align 4 ; [#uses=1]
- %1014 = fmul float %1013, %tri_normal.0.1.0 ; [#uses=1]
- %1015 = fadd float %1012, %1014 ; [#uses=1]
- %1016 = load float* %170, align 4 ; [#uses=1]
- %1017 = fmul float %1016, %tri_normal.0.2.0 ; [#uses=1]
- %1018 = fadd float %1015, %1017 ; [#uses=2]
- %1019 = load float* %177, align 4 ; [#uses=1]
- %1020 = fmul float %1019, %tri_normal.0.0.0 ; [#uses=1]
- %1021 = load float* %174, align 4 ; [#uses=1]
- %1022 = fmul float %1021, %tri_normal.0.1.0 ; [#uses=1]
- %1023 = fadd float %1020, %1022 ; [#uses=1]
- %1024 = load float* %171, align 4 ; [#uses=1]
- %1025 = fmul float %1024, %tri_normal.0.2.0 ; [#uses=1]
- %1026 = fadd float %1023, %1025 ; [#uses=2]
- %1027 = load float* %178, align 4 ; [#uses=1]
- %1028 = fmul float %1027, %tri_normal.0.0.0 ; [#uses=1]
- %1029 = load float* %175, align 4 ; [#uses=1]
- %1030 = fmul float %1029, %tri_normal.0.1.0 ; [#uses=1]
- %1031 = fadd float %1028, %1030 ; [#uses=1]
- %1032 = load float* %172, align 4 ; [#uses=1]
- %1033 = fmul float %1032, %tri_normal.0.2.0 ; [#uses=1]
- %1034 = fadd float %1031, %1033 ; [#uses=2]
- store float %1034, float* %188, align 4
- store float %1026, float* %191, align 4
- store float %1018, float* %195, align 4
- %1035 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1035, align 4
- br label %bb159
-
-bb157: ; preds = %bb151
- %1036 = fmul float %122, %iftmp.296.0 ; [#uses=3]
- %1037 = fmul float %121, %iftmp.296.0 ; [#uses=3]
- %1038 = fmul float %120, %iftmp.296.0 ; [#uses=3]
- %1039 = load float* %176, align 4 ; [#uses=1]
- %1040 = fmul float %1039, %1038 ; [#uses=1]
- %1041 = load float* %173, align 4 ; [#uses=1]
- %1042 = fmul float %1041, %1037 ; [#uses=1]
- %1043 = fadd float %1040, %1042 ; [#uses=1]
- %1044 = load float* %170, align 4 ; [#uses=1]
- %1045 = fmul float %1044, %1036 ; [#uses=1]
- %1046 = fadd float %1043, %1045 ; [#uses=2]
- %1047 = load float* %177, align 4 ; [#uses=1]
- %1048 = fmul float %1047, %1038 ; [#uses=1]
- %1049 = load float* %174, align 4 ; [#uses=1]
- %1050 = fmul float %1049, %1037 ; [#uses=1]
- %1051 = fadd float %1048, %1050 ; [#uses=1]
- %1052 = load float* %171, align 4 ; [#uses=1]
- %1053 = fmul float %1052, %1036 ; [#uses=1]
- %1054 = fadd float %1051, %1053 ; [#uses=2]
- %1055 = load float* %178, align 4 ; [#uses=1]
- %1056 = fmul float %1055, %1038 ; [#uses=1]
- %1057 = load float* %175, align 4 ; [#uses=1]
- %1058 = fmul float %1057, %1037 ; [#uses=1]
- %1059 = fadd float %1056, %1058 ; [#uses=1]
- %1060 = load float* %172, align 4 ; [#uses=1]
- %1061 = fmul float %1060, %1036 ; [#uses=1]
- %1062 = fadd float %1059, %1061 ; [#uses=2]
- store float %1062, float* %188, align 4
- store float %1054, float* %191, align 4
- store float %1046, float* %195, align 4
- %1063 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1063, align 4
- br label %bb159
-
-bb159: ; preds = %bb157, %bb155
- %1064 = phi float [ %1062, %bb157 ], [ %1034, %bb155 ] ; [#uses=1]
- %1065 = phi float [ %1054, %bb157 ], [ %1026, %bb155 ] ; [#uses=1]
- %1066 = phi float [ %1046, %bb157 ], [ %1018, %bb155 ] ; [#uses=1]
- %1067 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 5 ; [#uses=1]
- %1068 = load float* %1067, align 4 ; [#uses=3]
- %1069 = fmul float %1066, %1068 ; [#uses=1]
- %1070 = fmul float %1065, %1068 ; [#uses=1]
- %1071 = fmul float %1064, %1068 ; [#uses=1]
- %1072 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1073 = load float* %1072, align 4 ; [#uses=1]
- %1074 = fsub float %1073, %1069 ; [#uses=2]
- %1075 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %1076 = load float* %1075, align 4 ; [#uses=1]
- %1077 = fsub float %1076, %1070 ; [#uses=2]
- %1078 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1079 = load float* %1078, align 4 ; [#uses=1]
- %1080 = fsub float %1079, %1071 ; [#uses=2]
- %1081 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %1080, float* %1081, align 4
- %1082 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %1077, float* %1082, align 4
- %1083 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %1074, float* %1083, align 4
- %1084 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1084, align 4
- %1085 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %1086 = load float* %1085, align 4 ; [#uses=1]
- %1087 = fsub float %1074, %1086 ; [#uses=3]
- %1088 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %1089 = load float* %1088, align 4 ; [#uses=1]
- %1090 = fsub float %1077, %1089 ; [#uses=3]
- %1091 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %1092 = load float* %1091, align 4 ; [#uses=1]
- %1093 = fsub float %1080, %1092 ; [#uses=3]
- %1094 = load float* %178, align 4 ; [#uses=1]
- %1095 = load float* %177, align 4 ; [#uses=1]
- %1096 = load float* %176, align 4 ; [#uses=1]
- %1097 = load float* %175, align 4 ; [#uses=1]
- %1098 = load float* %174, align 4 ; [#uses=1]
- %1099 = load float* %173, align 4 ; [#uses=1]
- %1100 = load float* %172, align 4 ; [#uses=1]
- %1101 = load float* %171, align 4 ; [#uses=1]
- %1102 = load float* %170, align 4 ; [#uses=1]
- %1103 = fmul float %1100, %1093 ; [#uses=1]
- %1104 = fmul float %1101, %1090 ; [#uses=1]
- %1105 = fadd float %1103, %1104 ; [#uses=1]
- %1106 = fmul float %1102, %1087 ; [#uses=1]
- %1107 = fadd float %1105, %1106 ; [#uses=1]
- %1108 = fmul float %1097, %1093 ; [#uses=1]
- %1109 = fmul float %1098, %1090 ; [#uses=1]
- %1110 = fadd float %1108, %1109 ; [#uses=1]
- %1111 = fmul float %1099, %1087 ; [#uses=1]
- %1112 = fadd float %1110, %1111 ; [#uses=1]
- %1113 = fmul float %1094, %1093 ; [#uses=1]
- %1114 = fmul float %1095, %1090 ; [#uses=1]
- %1115 = fadd float %1113, %1114 ; [#uses=1]
- %1116 = fmul float %1096, %1087 ; [#uses=1]
- %1117 = fadd float %1115, %1116 ; [#uses=1]
- store float %1117, float* %.pre-phi, align 4
- store float %1112, float* %.pre-phi346, align 4
- store float %1107, float* %.pre-phi348, align 4
- %1118 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1118, align 4
- ret void
-
-return: ; preds = %bb148, %_ZN9btHashMapI9btHashInt14btTriangleInfoE4findERKS0_.exit, %bb3.i.i, %bb1, %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI14btTriangleInfoE9push_backERKS0_(%"struct.btAlignedObjectArray<btTriangleInfo>"* nocapture %this, %struct.btTriangleInfo* nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.403.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.403.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.403.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI14btTriangleInfoE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.403.0.i, 4 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btTriangleInfo* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI14btTriangleInfoE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI14btTriangleInfoE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btTriangleInfo* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=6]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI14btTriangleInfoE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI14btTriangleInfoE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=10]
- %scevgep.i.i = getelementptr %struct.btTriangleInfo* %12, i32 %indvar.i.i ; [#uses=1]
- %15 = icmp eq %struct.btTriangleInfo* %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep14.i.i = getelementptr %struct.btTriangleInfo* %12, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep15.i.i = getelementptr %struct.btTriangleInfo* %12, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %scevgep16.i.i = getelementptr %struct.btTriangleInfo* %12, i32 %indvar.i.i, i32 3 ; [#uses=1]
- %scevgep13.i.i = getelementptr inbounds %struct.btTriangleInfo* %12, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load %struct.btTriangleInfo** %14, align 4 ; [#uses=4]
- %scevgep89.i.i = getelementptr inbounds %struct.btTriangleInfo* %16, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %17 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- store i32 %17, i32* %scevgep13.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btTriangleInfo* %16, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %18 = load float* %scevgep10.i.i, align 4 ; [#uses=1]
- store float %18, float* %scevgep14.i.i, align 4
- %scevgep11.i.i = getelementptr %struct.btTriangleInfo* %16, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %19 = load float* %scevgep11.i.i, align 4 ; [#uses=1]
- store float %19, float* %scevgep15.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btTriangleInfo* %16, i32 %indvar.i.i, i32 3 ; [#uses=1]
- %20 = load float* %scevgep12.i.i, align 4 ; [#uses=1]
- store float %20, float* %scevgep16.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI14btTriangleInfoE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI14btTriangleInfoE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI14btTriangleInfoE8allocateEi.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 0, i32 3 ; [#uses=3]
- %22 = load %struct.btTriangleInfo** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btTriangleInfo* %22, null ; [#uses=1]
- br i1 %23, label %_ZN20btAlignedObjectArrayI14btTriangleInfoE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI14btTriangleInfoE4copyEiiPS0_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 0, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %26 = bitcast %struct.btTriangleInfo* %22 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %26)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btTriangleInfo* null, %struct.btTriangleInfo** %21, align 4
- br label %_ZN20btAlignedObjectArrayI14btTriangleInfoE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI14btTriangleInfoE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI14btTriangleInfoE4copyEiiPS0_.exit.i
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btTriangleInfo* %12, %struct.btTriangleInfo** %21, align 4
- store i32 %iftmp.403.0.i, i32* %2, align 4
- %.pre11 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI14btTriangleInfoE10deallocateEv.exit.i, %bb, %entry
- %28 = phi i32 [ %.pre11, %_ZN20btAlignedObjectArrayI14btTriangleInfoE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=6]
- %29 = getelementptr inbounds %"struct.btAlignedObjectArray<btTriangleInfo>"* %this, i32 0, i32 3 ; [#uses=1]
- %30 = load %struct.btTriangleInfo** %29, align 4 ; [#uses=5]
- %31 = getelementptr inbounds %struct.btTriangleInfo* %30, i32 %28 ; [#uses=1]
- %32 = icmp eq %struct.btTriangleInfo* %31, null ; [#uses=1]
- br i1 %32, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %33 = getelementptr inbounds %struct.btTriangleInfo* %30, i32 %28, i32 0 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTriangleInfo* %_Val, i32 0, i32 0 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- store i32 %35, i32* %33, align 4
- %36 = getelementptr inbounds %struct.btTriangleInfo* %30, i32 %28, i32 1 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTriangleInfo* %_Val, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btTriangleInfo* %30, i32 %28, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTriangleInfo* %_Val, i32 0, i32 2 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.btTriangleInfo* %30, i32 %28, i32 3 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTriangleInfo* %_Val, i32 0, i32 3 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- store float %44, float* %42, align 4
- %.pre12 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %45 = phi i32 [ %28, %bb1 ], [ %.pre12, %bb2 ] ; [#uses=1]
- %46 = add nsw i32 %45, 1 ; [#uses=1]
- store i32 %46, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btHashIntE9push_backERKS0_(%"struct.btAlignedObjectArray<btHashInt>"* nocapture %this, %struct.btHashInt* nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.388.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.388.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.388.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI9btHashIntE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.388.0.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btHashInt* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI9btHashIntE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI9btHashIntE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btHashInt* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=3]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI9btHashIntE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI9btHashIntE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=4]
- %scevgep.i.i = getelementptr %struct.btHashInt* %12, i32 %indvar.i.i ; [#uses=1]
- %15 = icmp eq %struct.btHashInt* %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep10.i.i = getelementptr inbounds %struct.btHashInt* %12, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load %struct.btHashInt** %14, align 4 ; [#uses=1]
- %scevgep89.i.i = getelementptr inbounds %struct.btHashInt* %16, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %17 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- store i32 %17, i32* %scevgep10.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI9btHashIntE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI9btHashIntE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI9btHashIntE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.btHashInt** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btHashInt* %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayI9btHashIntE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI9btHashIntE4copyEiiPS0_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %struct.btHashInt* %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btHashInt* null, %struct.btHashInt** %18, align 4
- br label %_ZN20btAlignedObjectArrayI9btHashIntE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI9btHashIntE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI9btHashIntE4copyEiiPS0_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btHashInt* %12, %struct.btHashInt** %18, align 4
- store i32 %iftmp.388.0.i, i32* %2, align 4
- %.pre8 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI9btHashIntE10deallocateEv.exit.i, %bb, %entry
- %25 = phi i32 [ %.pre8, %_ZN20btAlignedObjectArrayI9btHashIntE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=3]
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btHashInt>"* %this, i32 0, i32 3 ; [#uses=1]
- %27 = load %struct.btHashInt** %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btHashInt* %27, i32 %25 ; [#uses=1]
- %29 = icmp eq %struct.btHashInt* %28, null ; [#uses=1]
- br i1 %29, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %30 = getelementptr inbounds %struct.btHashInt* %_Val, i32 0, i32 0 ; [#uses=1]
- %31 = load i32* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btHashInt* %27, i32 %25, i32 0 ; [#uses=1]
- store i32 %31, i32* %32, align 4
- %.pre9 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %33 = phi i32 [ %25, %bb1 ], [ %.pre9, %bb2 ] ; [#uses=1]
- %34 = add nsw i32 %33, 1 ; [#uses=1]
- store i32 %34, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9btHashMapI9btHashInt14btTriangleInfoE10growTablesERKS0_(%"struct.btHashMap<btHashInt,btTriangleInfo>"* nocapture %this, %struct.btHashInt* nocapture %unnamed_arg) align 2 {
-entry:
- %0 = alloca i32, align 4 ; [#uses=2]
- %1 = alloca i32, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=6]
- %4 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = icmp slt i32 %5, %3 ; [#uses=1]
- br i1 %6, label %bb, label %return
-
-bb: ; preds = %entry
- store i32 0, i32* %1, align 4
- %7 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 0 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %7, i32 %3, i32* %1) inlinehint
- store i32 0, i32* %0, align 4
- %8 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %8, i32 %3, i32* %0) inlinehint
- %9 = icmp sgt i32 %3, 0 ; [#uses=2]
- br i1 %9, label %bb.nph14, label %bb8.preheader
-
-bb.nph14: ; preds = %bb
- %10 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph14
- %i.013 = phi i32 [ 0, %bb.nph14 ], [ %12, %bb1 ] ; [#uses=2]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %scevgep20 = getelementptr i32* %11, i32 %i.013 ; [#uses=1]
- store i32 -1, i32* %scevgep20, align 4
- %12 = add nsw i32 %i.013, 1 ; [#uses=2]
- %exitcond19 = icmp eq i32 %12, %3 ; [#uses=1]
- br i1 %exitcond19, label %bb5.preheader, label %bb1
-
-bb5.preheader: ; preds = %bb1
- br i1 %9, label %bb.nph12, label %bb8.preheader
-
-bb.nph12: ; preds = %bb5.preheader
- %13 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb.nph12
- %i.111 = phi i32 [ 0, %bb.nph12 ], [ %15, %bb4 ] ; [#uses=2]
- %14 = load i32** %13, align 4 ; [#uses=1]
- %scevgep18 = getelementptr i32* %14, i32 %i.111 ; [#uses=1]
- store i32 -1, i32* %scevgep18, align 4
- %15 = add nsw i32 %i.111, 1 ; [#uses=2]
- %exitcond17 = icmp eq i32 %15, %3 ; [#uses=1]
- br i1 %exitcond17, label %bb8.preheader, label %bb4
-
-bb8.preheader: ; preds = %bb4, %bb5.preheader, %bb
- %16 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %16, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb8.preheader
- %17 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %20 = phi i32 [ 0, %bb.nph ], [ %43, %bb7 ] ; [#uses=4]
- %21 = load %struct.btHashInt** %17, align 4 ; [#uses=1]
- %scevgep1516 = getelementptr inbounds %struct.btHashInt* %21, i32 %20, i32 0 ; [#uses=1]
- %22 = load i32* %scevgep1516, align 4 ; [#uses=2]
- %23 = shl i32 %22, 15 ; [#uses=1]
- %not.i = xor i32 %23, -1 ; [#uses=1]
- %24 = add nsw i32 %22, %not.i ; [#uses=2]
- %25 = ashr i32 %24, 10 ; [#uses=1]
- %26 = xor i32 %25, %24 ; [#uses=1]
- %27 = mul i32 %26, 9 ; [#uses=2]
- %28 = ashr i32 %27, 6 ; [#uses=1]
- %29 = xor i32 %28, %27 ; [#uses=2]
- %30 = shl i32 %29, 11 ; [#uses=1]
- %not2.i = xor i32 %30, -1 ; [#uses=1]
- %31 = add nsw i32 %29, %not2.i ; [#uses=2]
- %32 = ashr i32 %31, 16 ; [#uses=1]
- %33 = xor i32 %32, %31 ; [#uses=1]
- %34 = load i32* %2, align 4 ; [#uses=1]
- %35 = add nsw i32 %34, -1 ; [#uses=1]
- %36 = and i32 %33, %35 ; [#uses=2]
- %37 = load i32** %18, align 4 ; [#uses=1]
- %38 = load i32** %19, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32* %38, i32 %36 ; [#uses=1]
- %40 = load i32* %39, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %37, i32 %20 ; [#uses=1]
- store i32 %40, i32* %scevgep, align 4
- %41 = load i32** %19, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32* %41, i32 %36 ; [#uses=1]
- store i32 %20, i32* %42, align 4
- %43 = add nsw i32 %20, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %43, %5 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb7
-
-return: ; preds = %bb7, %bb8.preheader, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9btHashMapI9btHashInt14btTriangleInfoE6insertERKS0_RKS1_(%"struct.btHashMap<btHashInt,btTriangleInfo>"* nocapture %this, %struct.btHashInt* nocapture %key, %struct.btTriangleInfo* nocapture %value) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHashInt* %key, i32 0, i32 0 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = shl i32 %1, 15 ; [#uses=1]
- %not.i = xor i32 %2, -1 ; [#uses=1]
- %3 = add nsw i32 %1, %not.i ; [#uses=2]
- %4 = ashr i32 %3, 10 ; [#uses=1]
- %5 = xor i32 %4, %3 ; [#uses=1]
- %6 = mul i32 %5, 9 ; [#uses=2]
- %7 = ashr i32 %6, 6 ; [#uses=1]
- %8 = xor i32 %7, %6 ; [#uses=2]
- %9 = shl i32 %8, 11 ; [#uses=1]
- %not2.i = xor i32 %9, -1 ; [#uses=1]
- %10 = add nsw i32 %8, %not2.i ; [#uses=2]
- %11 = ashr i32 %10, 16 ; [#uses=1]
- %12 = xor i32 %11, %10 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 2, i32 2 ; [#uses=3]
- %14 = load i32* %13, align 4 ; [#uses=2]
- %15 = add nsw i32 %14, -1 ; [#uses=1]
- %16 = and i32 %12, %15 ; [#uses=3]
- %17 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = icmp ugt i32 %18, %16 ; [#uses=1]
- br i1 %19, label %bb1.i, label %bb1
-
-bb1.i: ; preds = %entry
- %20 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %21 = load i32** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32* %21, i32 %16 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb3.i
-
-bb2.i: ; preds = %bb4.i
- %25 = load i32** %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32* %25, i32 %index.0.i ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb1.i
- %index.0.in.i = phi i32* [ %22, %bb1.i ], [ %26, %bb2.i ] ; [#uses=1]
- %index.0.i = load i32* %index.0.in.i, align 4 ; [#uses=7]
- %27 = icmp eq i32 %index.0.i, -1 ; [#uses=1]
- br i1 %27, label %bb1, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %28 = load %struct.btHashInt** %23, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btHashInt* %28, i32 %index.0.i, i32 0 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = icmp eq i32 %1, %30 ; [#uses=1]
- br i1 %31, label %bb, label %bb2.i
-
-bb: ; preds = %bb4.i
- %32 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %33 = load %struct.btTriangleInfo** %32, align 4 ; [#uses=4]
- %34 = getelementptr inbounds %struct.btTriangleInfo* %33, i32 %index.0.i, i32 0 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTriangleInfo* %value, i32 0, i32 0 ; [#uses=1]
- %36 = load i32* %35, align 4 ; [#uses=1]
- store i32 %36, i32* %34, align 4
- %37 = getelementptr inbounds %struct.btTriangleInfo* %33, i32 %index.0.i, i32 1 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTriangleInfo* %value, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btTriangleInfo* %33, i32 %index.0.i, i32 2 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTriangleInfo* %value, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btTriangleInfo* %33, i32 %index.0.i, i32 3 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTriangleInfo* %value, i32 0, i32 3 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- ret void
-
-bb1: ; preds = %bb3.i, %entry
- %46 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=2]
- %48 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 2 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI14btTriangleInfoE9push_backERKS0_(%"struct.btAlignedObjectArray<btTriangleInfo>"* %48, %struct.btTriangleInfo* %value) inlinehint
- %49 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 3 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI9btHashIntE9push_backERKS0_(%"struct.btAlignedObjectArray<btHashInt>"* %49, %struct.btHashInt* %key) inlinehint
- %50 = load i32* %13, align 4 ; [#uses=1]
- %51 = icmp slt i32 %14, %50 ; [#uses=1]
- br i1 %51, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- tail call void @_ZN9btHashMapI9btHashInt14btTriangleInfoE10growTablesERKS0_(%"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, %struct.btHashInt* %key)
- %52 = load i32* %0, align 4 ; [#uses=2]
- %53 = shl i32 %52, 15 ; [#uses=1]
- %not.i5 = xor i32 %53, -1 ; [#uses=1]
- %54 = add nsw i32 %52, %not.i5 ; [#uses=2]
- %55 = ashr i32 %54, 10 ; [#uses=1]
- %56 = xor i32 %55, %54 ; [#uses=1]
- %57 = mul i32 %56, 9 ; [#uses=2]
- %58 = ashr i32 %57, 6 ; [#uses=1]
- %59 = xor i32 %58, %57 ; [#uses=2]
- %60 = shl i32 %59, 11 ; [#uses=1]
- %not2.i6 = xor i32 %60, -1 ; [#uses=1]
- %61 = add nsw i32 %59, %not2.i6 ; [#uses=2]
- %62 = ashr i32 %61, 16 ; [#uses=1]
- %63 = xor i32 %62, %61 ; [#uses=1]
- %64 = load i32* %13, align 4 ; [#uses=1]
- %65 = add nsw i32 %64, -1 ; [#uses=1]
- %66 = and i32 %63, %65 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %hash.0 = phi i32 [ %66, %bb2 ], [ %16, %bb1 ] ; [#uses=2]
- %67 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %68 = load i32** %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds i32* %68, i32 %47 ; [#uses=1]
- %70 = getelementptr inbounds %"struct.btHashMap<btHashInt,btTriangleInfo>"* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- %71 = load i32** %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds i32* %71, i32 %hash.0 ; [#uses=1]
- %73 = load i32* %72, align 4 ; [#uses=1]
- store i32 %73, i32* %69, align 4
- %74 = load i32** %70, align 4 ; [#uses=1]
- %75 = getelementptr inbounds i32* %74, i32 %hash.0 ; [#uses=1]
- store i32 %47, i32* %75, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN16btManifoldResultC2EP17btCollisionObjectS1_(%struct.btManifoldResult* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %1, align 4
- %2 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btCollisionObject* %body0, %struct.btCollisionObject** %2, align 4
- %3 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btCollisionObject* %body1, %struct.btCollisionObject** %3, align 4
- %4 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 4
- %58 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 4
- %64 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 4
- %76 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 4
- %82 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 4
- %88 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btManifoldResultD1Ev(%struct.btManifoldResult* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btManifoldResultD0Ev(%struct.btManifoldResult* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btManifoldResult* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btManifoldResult15addContactPointERK9btVector3S2_f(%struct.btManifoldResult* %this, %struct.btQuadWord* nocapture %normalOnBInWorld, %struct.btQuadWord* nocapture %pointInWorld, float %depth) align 2 {
-entry:
- %newPt = alloca %struct.btManifoldPoint, align 8 ; [#uses=51]
- %0 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 1 ; [#uses=4]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = call float @_ZNK20btPersistentManifold27getContactBreakingThresholdEv(%struct.btPersistentManifold* %1) ; [#uses=1]
- %3 = fcmp olt float %2, %depth ; [#uses=1]
- br i1 %3, label %bb18, label %bb
-
-bb: ; preds = %entry
- %4 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btPersistentManifold* %4, i32 0, i32 2 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 4 ; [#uses=4]
- %8 = load %struct.btCollisionObject** %7, align 4 ; [#uses=1]
- %9 = bitcast %struct.btCollisionObject* %8 to i8* ; [#uses=1]
- %10 = icmp ne i8* %6, %9 ; [#uses=3]
- %11 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = fmul float %12, %depth ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fmul float %15, %depth ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fmul float %18, %depth ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=4]
- %22 = fadd float %21, %13 ; [#uses=3]
- %23 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=4]
- %25 = fadd float %24, %16 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=4]
- %28 = fadd float %27, %19 ; [#uses=3]
- br i1 %10, label %bb2, label %bb4
-
-bb2: ; preds = %bb
- %29 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fsub float %22, %30 ; [#uses=3]
- %32 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %25, %33 ; [#uses=3]
- %35 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fsub float %28, %36 ; [#uses=3]
- %38 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = load float* %45, align 4 ; [#uses=1]
- %49 = load float* %44, align 4 ; [#uses=1]
- %50 = load float* %43, align 4 ; [#uses=1]
- %51 = load float* %42, align 4 ; [#uses=1]
- %52 = load float* %41, align 4 ; [#uses=1]
- %53 = load float* %40, align 4 ; [#uses=1]
- %54 = load float* %39, align 4 ; [#uses=1]
- %55 = load float* %38, align 4 ; [#uses=1]
- %56 = fmul float %53, %37 ; [#uses=1]
- %57 = fmul float %54, %34 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=1]
- %59 = fmul float %55, %31 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %50, %37 ; [#uses=1]
- %62 = fmul float %51, %34 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fmul float %52, %31 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fmul float %47, %37 ; [#uses=1]
- %67 = fmul float %48, %34 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = fmul float %49, %31 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fsub float %21, %72 ; [#uses=3]
- %74 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fsub float %24, %75 ; [#uses=3]
- %77 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fsub float %27, %78 ; [#uses=3]
- %80 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = load float* %87, align 4 ; [#uses=1]
- %91 = load float* %86, align 4 ; [#uses=1]
- %92 = load float* %85, align 4 ; [#uses=1]
- %93 = load float* %84, align 4 ; [#uses=1]
- %94 = load float* %83, align 4 ; [#uses=1]
- %95 = load float* %82, align 4 ; [#uses=1]
- %96 = load float* %81, align 4 ; [#uses=1]
- %97 = load float* %80, align 4 ; [#uses=1]
- %98 = fmul float %95, %79 ; [#uses=1]
- %99 = fmul float %96, %76 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %97, %73 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %92, %79 ; [#uses=1]
- %104 = fmul float %93, %76 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %94, %73 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %89, %79 ; [#uses=1]
- %109 = fmul float %90, %76 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %91, %73 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- br label %bb7
-
-bb4: ; preds = %bb
- %113 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=1]
- %115 = fsub float %22, %114 ; [#uses=3]
- %116 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = fsub float %25, %117 ; [#uses=3]
- %119 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fsub float %28, %120 ; [#uses=3]
- %122 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = load float* %129, align 4 ; [#uses=1]
- %133 = load float* %128, align 4 ; [#uses=1]
- %134 = load float* %127, align 4 ; [#uses=1]
- %135 = load float* %126, align 4 ; [#uses=1]
- %136 = load float* %125, align 4 ; [#uses=1]
- %137 = load float* %124, align 4 ; [#uses=1]
- %138 = load float* %123, align 4 ; [#uses=1]
- %139 = load float* %122, align 4 ; [#uses=1]
- %140 = fmul float %137, %121 ; [#uses=1]
- %141 = fmul float %138, %118 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=1]
- %143 = fmul float %139, %115 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = fmul float %134, %121 ; [#uses=1]
- %146 = fmul float %135, %118 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=1]
- %148 = fmul float %136, %115 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fmul float %131, %121 ; [#uses=1]
- %151 = fmul float %132, %118 ; [#uses=1]
- %152 = fadd float %150, %151 ; [#uses=1]
- %153 = fmul float %133, %115 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- %157 = fsub float %21, %156 ; [#uses=3]
- %158 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fsub float %24, %159 ; [#uses=3]
- %161 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fsub float %27, %162 ; [#uses=3]
- %164 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %169 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- %174 = load float* %171, align 4 ; [#uses=1]
- %175 = load float* %170, align 4 ; [#uses=1]
- %176 = load float* %169, align 4 ; [#uses=1]
- %177 = load float* %168, align 4 ; [#uses=1]
- %178 = load float* %167, align 4 ; [#uses=1]
- %179 = load float* %166, align 4 ; [#uses=1]
- %180 = load float* %165, align 4 ; [#uses=1]
- %181 = load float* %164, align 4 ; [#uses=1]
- %182 = fmul float %179, %163 ; [#uses=1]
- %183 = fmul float %180, %160 ; [#uses=1]
- %184 = fadd float %182, %183 ; [#uses=1]
- %185 = fmul float %181, %157 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = fmul float %176, %163 ; [#uses=1]
- %188 = fmul float %177, %160 ; [#uses=1]
- %189 = fadd float %187, %188 ; [#uses=1]
- %190 = fmul float %178, %157 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = fmul float %173, %163 ; [#uses=1]
- %193 = fmul float %174, %160 ; [#uses=1]
- %194 = fadd float %192, %193 ; [#uses=1]
- %195 = fmul float %175, %157 ; [#uses=1]
- %196 = fadd float %194, %195 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb4, %bb2
- %localA.0.0.0 = phi float [ %70, %bb2 ], [ %154, %bb4 ] ; [#uses=1]
- %localA.0.1.0 = phi float [ %65, %bb2 ], [ %149, %bb4 ] ; [#uses=1]
- %localA.0.2.0 = phi float [ %60, %bb2 ], [ %144, %bb4 ] ; [#uses=1]
- %localB.0.0.0 = phi float [ %112, %bb2 ], [ %196, %bb4 ] ; [#uses=1]
- %localB.0.1.0 = phi float [ %107, %bb2 ], [ %191, %bb4 ] ; [#uses=1]
- %localB.0.2.0 = phi float [ %102, %bb2 ], [ %186, %bb4 ] ; [#uses=1]
- %197 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %localA.0.0.0, float* %197, align 8
- %198 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %localA.0.1.0, float* %198, align 4
- %199 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %localA.0.2.0, float* %199, align 8
- %200 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %200, align 4
- %201 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %localB.0.0.0, float* %201, align 8
- %202 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %localB.0.1.0, float* %202, align 4
- %203 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %localB.0.2.0, float* %203, align 8
- %204 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %204, align 4
- %205 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %205, align 8
- %206 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %15, float* %206, align 4
- %207 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %12, float* %207, align 8
- %208 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=1]
- store float %210, float* %208, align 4
- %211 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 5 ; [#uses=1]
- store float %depth, float* %211, align 8
- %212 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 6 ; [#uses=2]
- store float 0.000000e+00, float* %212, align 4
- %213 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 7 ; [#uses=2]
- store float 0.000000e+00, float* %213, align 8
- %214 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 12 ; [#uses=1]
- store i8* null, i8** %214, align 4
- %215 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %215, align 8
- %216 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 14 ; [#uses=1]
- store i8 0, i8* %216, align 4
- %217 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %217, align 8
- %218 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %218, align 4
- %219 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 17 ; [#uses=1]
- store float 0.000000e+00, float* %219, align 8
- %220 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 18 ; [#uses=1]
- store float 0.000000e+00, float* %220, align 4
- %221 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 19 ; [#uses=1]
- store float 0.000000e+00, float* %221, align 8
- %222 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 20 ; [#uses=1]
- store float 0.000000e+00, float* %222, align 4
- %223 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 21 ; [#uses=1]
- store i32 0, i32* %223, align 8
- %224 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 24, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %224, align 4
- %225 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 24, i32 1, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %225, align 4
- %226 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 24, i32 2, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %226, align 4
- %227 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %28, float* %227, align 8
- %228 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %25, float* %228, align 4
- %229 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %22, float* %229, align 8
- %230 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %230, align 4
- %231 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %27, float* %231, align 8
- %232 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %24, float* %232, align 4
- %233 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %233, align 8
- %234 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %235 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %236 = load float* %235, align 4 ; [#uses=1]
- store float %236, float* %234, align 4
- %237 = call i32 @_ZNK20btPersistentManifold13getCacheEntryERK15btManifoldPoint(%struct.btPersistentManifold* %4, %struct.btManifoldPoint* %newPt) ; [#uses=11]
- %238 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 5 ; [#uses=4]
- %239 = load %struct.btCollisionObject** %238, align 4 ; [#uses=2]
- %240 = load %struct.btCollisionObject** %7, align 4 ; [#uses=2]
- %241 = getelementptr inbounds %struct.btCollisionObject* %240, i32 0, i32 17 ; [#uses=1]
- %242 = load float* %241, align 4 ; [#uses=1]
- %243 = getelementptr inbounds %struct.btCollisionObject* %239, i32 0, i32 17 ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = fmul float %242, %244 ; [#uses=2]
- %246 = fcmp olt float %245, -1.000000e+01 ; [#uses=1]
- %friction.0.i = select i1 %246, float -1.000000e+01, float %245 ; [#uses=2]
- %247 = fcmp ogt float %friction.0.i, 1.000000e+01 ; [#uses=1]
- %friction.1.i = select i1 %247, float 1.000000e+01, float %friction.0.i ; [#uses=1]
- store float %friction.1.i, float* %212, align 4
- %248 = getelementptr inbounds %struct.btCollisionObject* %240, i32 0, i32 18 ; [#uses=1]
- %249 = load float* %248, align 4 ; [#uses=1]
- %250 = getelementptr inbounds %struct.btCollisionObject* %239, i32 0, i32 18 ; [#uses=1]
- %251 = load float* %250, align 4 ; [#uses=1]
- %252 = fmul float %249, %251 ; [#uses=1]
- store float %252, float* %213, align 8
- br i1 %10, label %bb9, label %bb10
-
-bb9: ; preds = %bb7
- %253 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 7 ; [#uses=1]
- %254 = load i32* %253, align 4 ; [#uses=1]
- %255 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 8 ; [#uses=1]
- store i32 %254, i32* %255, align 4
- %256 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 6 ; [#uses=1]
- %257 = load i32* %256, align 4 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 9 ; [#uses=1]
- store i32 %257, i32* %258, align 8
- %259 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 9 ; [#uses=1]
- %260 = load i32* %259, align 4 ; [#uses=1]
- %261 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 10 ; [#uses=1]
- store i32 %260, i32* %261, align 4
- %262 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 8 ; [#uses=1]
- %263 = load i32* %262, align 4 ; [#uses=1]
- %264 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 11 ; [#uses=1]
- store i32 %263, i32* %264, align 8
- br label %bb11
-
-bb10: ; preds = %bb7
- %265 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 6 ; [#uses=1]
- %266 = load i32* %265, align 4 ; [#uses=1]
- %267 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 8 ; [#uses=1]
- store i32 %266, i32* %267, align 4
- %268 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 7 ; [#uses=1]
- %269 = load i32* %268, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 9 ; [#uses=1]
- store i32 %269, i32* %270, align 8
- %271 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 8 ; [#uses=1]
- %272 = load i32* %271, align 4 ; [#uses=1]
- %273 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 10 ; [#uses=1]
- store i32 %272, i32* %273, align 4
- %274 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 9 ; [#uses=1]
- %275 = load i32* %274, align 4 ; [#uses=1]
- %276 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 11 ; [#uses=1]
- store i32 %275, i32* %276, align 8
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9
- %277 = icmp sgt i32 %237, -1 ; [#uses=1]
- %278 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=10]
- br i1 %277, label %bb12, label %bb13
-
-bb12: ; preds = %bb11
- %279 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 21 ; [#uses=2]
- %280 = load i32* %279, align 4 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 24, i32 0, i32 5 ; [#uses=2]
- %282 = load float* %281, align 4 ; [#uses=2]
- %283 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 24, i32 1, i32 5 ; [#uses=2]
- %284 = load float* %283, align 4 ; [#uses=2]
- %285 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 24, i32 2, i32 5 ; [#uses=2]
- %286 = load float* %285, align 4 ; [#uses=2]
- %287 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 12 ; [#uses=2]
- %288 = load i8** %287, align 4 ; [#uses=1]
- %289 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237 ; [#uses=1]
- %290 = bitcast %struct.btManifoldPoint* %289 to i8* ; [#uses=1]
- %291 = bitcast %struct.btManifoldPoint* %newPt to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %290, i8* %291, i32 276, i32 4, i1 false) nounwind
- store i8* %288, i8** %287, align 4
- %292 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 13 ; [#uses=1]
- store float %282, float* %292, align 4
- %293 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 15 ; [#uses=1]
- store float %284, float* %293, align 4
- %294 = getelementptr inbounds %struct.btPersistentManifold* %278, i32 0, i32 1, i32 %237, i32 16 ; [#uses=1]
- store float %286, float* %294, align 4
- store float %282, float* %281, align 4
- store float %284, float* %283, align 4
- store float %286, float* %285, align 4
- store i32 %280, i32* %279, align 4
- br label %bb14
-
-bb13: ; preds = %bb11
- %295 = call i32 @_ZN20btPersistentManifold16addManifoldPointERK15btManifoldPoint(%struct.btPersistentManifold* %278, %struct.btManifoldPoint* %newPt) ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb13, %bb12
- %insertIndex.0 = phi i32 [ %237, %bb12 ], [ %295, %bb13 ] ; [#uses=1]
- %296 = load i8 (%struct.btManifoldPoint*, %struct.btCollisionObject*, i32, i32, %struct.btCollisionObject*, i32, i32)** @gContactAddedCallback, align 4 ; [#uses=2]
- %297 = icmp eq i8 (%struct.btManifoldPoint*, %struct.btCollisionObject*, i32, i32, %struct.btCollisionObject*, i32, i32)* %296, null ; [#uses=1]
- br i1 %297, label %bb18, label %bb15
-
-bb15: ; preds = %bb14
- %298 = load %struct.btCollisionObject** %7, align 4 ; [#uses=2]
- %299 = getelementptr inbounds %struct.btCollisionObject* %298, i32 0, i32 12 ; [#uses=1]
- %300 = load i32* %299, align 4 ; [#uses=1]
- %301 = and i32 %300, 8 ; [#uses=1]
- %302 = icmp eq i32 %301, 0 ; [#uses=1]
- br i1 %302, label %bb16, label %bb21
-
-bb16: ; preds = %bb15
- %303 = load %struct.btCollisionObject** %238, align 4 ; [#uses=1]
- %304 = getelementptr inbounds %struct.btCollisionObject* %303, i32 0, i32 12 ; [#uses=1]
- %305 = load i32* %304, align 4 ; [#uses=1]
- %306 = and i32 %305, 8 ; [#uses=1]
- %307 = icmp eq i32 %306, 0 ; [#uses=1]
- br i1 %307, label %bb18, label %bb21
-
-bb18: ; preds = %bb16, %bb14, %entry
- ret void
-
-bb21: ; preds = %bb16, %bb15
- br i1 %10, label %bb29, label %bb31
-
-bb29: ; preds = %bb21
- %iftmp.157.054.pre = load %struct.btCollisionObject** %238, align 4 ; [#uses=1]
- br label %bb31
-
-bb31: ; preds = %bb29, %bb21
- %iftmp.157.054 = phi %struct.btCollisionObject* [ %iftmp.157.054.pre, %bb29 ], [ %298, %bb21 ] ; [#uses=1]
- %iftmp.158.0.in = phi %struct.btCollisionObject** [ %7, %bb29 ], [ %238, %bb21 ] ; [#uses=1]
- %iftmp.158.0 = load %struct.btCollisionObject** %iftmp.158.0.in, align 4 ; [#uses=1]
- %308 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 11 ; [#uses=1]
- %309 = load i32* %308, align 8 ; [#uses=1]
- %310 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 9 ; [#uses=1]
- %311 = load i32* %310, align 8 ; [#uses=1]
- %312 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 10 ; [#uses=1]
- %313 = load i32* %312, align 4 ; [#uses=1]
- %314 = getelementptr inbounds %struct.btManifoldPoint* %newPt, i32 0, i32 8 ; [#uses=1]
- %315 = load i32* %314, align 4 ; [#uses=1]
- %316 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btPersistentManifold* %316, i32 0, i32 1, i32 %insertIndex.0 ; [#uses=1]
- %318 = call zeroext i8 %296(%struct.btManifoldPoint* %317, %struct.btCollisionObject* %iftmp.157.054, i32 %315, i32 %313, %struct.btCollisionObject* %iftmp.158.0, i32 %311, i32 %309) ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btManifoldResultC1EP17btCollisionObjectS1_(%struct.btManifoldResult* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btManifoldResult, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %1, align 4
- %2 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btCollisionObject* %body0, %struct.btCollisionObject** %2, align 4
- %3 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btCollisionObject* %body1, %struct.btCollisionObject** %3, align 4
- %4 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 4
- %58 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 4
- %64 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 4
- %76 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 4
- %82 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 4
- %88 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.btManifoldResult* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btSimulationIslandManagerC2Ev(%struct.btSimulationIslandManager* %this) align 2 {
-invcont1:
- %0 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btSimulationIslandManager, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN11btUnionFindC1Ev(%struct.btPairSet* %1)
- %2 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %3, align 4
- %4 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- %7 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %7, align 4
- %8 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %10, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManager10findUnionsEP12btDispatcherP16btCollisionWorld(%struct.btSimulationIslandManager* nocapture %this, %struct.btActionInterface* nocapture %unnamed_arg, %struct.btCollisionWorld* nocapture %colWorld) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %colWorld, i32 0, i32 5 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 9 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btActionInterface*)* ; [#uses=1]
- %7 = tail call %struct..0btMultiSapOverlapFilterCallback* %6(%struct.btActionInterface* %1) ; [#uses=3]
- %8 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %7, i32 0, i32 0, i32 0 ; [#uses=2]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 9 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to i32 (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %13 = tail call i32 %12(%struct..0btMultiSapOverlapFilterCallback* %7) ; [#uses=2]
- %14 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 5 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to %struct.btBroadphasePair* (%struct..0btMultiSapOverlapFilterCallback*)* ; [#uses=1]
- %18 = tail call %struct.btBroadphasePair* %17(%struct..0btMultiSapOverlapFilterCallback* %7) ; [#uses=2]
- %19 = icmp sgt i32 %13, 0 ; [#uses=1]
- br i1 %19, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %20 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- br label %bb
-
-bb: ; preds = %bb16, %bb.nph
- %i.023 = phi i32 [ 0, %bb.nph ], [ %81, %bb16 ] ; [#uses=3]
- %scevgep27 = getelementptr inbounds %struct.btBroadphasePair* %18, i32 %i.023, i32 0 ; [#uses=1]
- %scevgep28 = getelementptr %struct.btBroadphasePair* %18, i32 %i.023, i32 1 ; [#uses=1]
- %21 = load %struct.btBroadphaseProxy** %scevgep27, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btBroadphaseProxy* %21, i32 0, i32 0 ; [#uses=1]
- %23 = load i8** %22, align 4 ; [#uses=3]
- %24 = load %struct.btBroadphaseProxy** %scevgep28, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btBroadphaseProxy* %24, i32 0, i32 0 ; [#uses=1]
- %26 = load i8** %25, align 4 ; [#uses=3]
- %27 = icmp eq i8* %23, null ; [#uses=1]
- br i1 %27, label %bb16, label %bb1
-
-bb1: ; preds = %bb
- %28 = getelementptr inbounds i8* %23, i32 204 ; [#uses=1]
- %29 = bitcast i8* %28 to i32* ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = and i32 %30, 7 ; [#uses=1]
- %toBoolnot = icmp ne i32 %31, 0 ; [#uses=1]
- %32 = icmp eq i8* %26, null ; [#uses=1]
- %or.cond = or i1 %32, %toBoolnot ; [#uses=1]
- br i1 %or.cond, label %bb16, label %bb6
-
-bb6: ; preds = %bb1
- %33 = getelementptr inbounds i8* %26, i32 204 ; [#uses=1]
- %34 = bitcast i8* %33 to i32* ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = and i32 %35, 7 ; [#uses=1]
- %37 = icmp eq i32 %36, 0 ; [#uses=1]
- br i1 %37, label %bb15, label %bb16
-
-bb15: ; preds = %bb6
- %38 = getelementptr inbounds i8* %26, i32 208 ; [#uses=1]
- %39 = bitcast i8* %38 to i32* ; [#uses=1]
- %40 = load i32* %39, align 4 ; [#uses=4]
- %41 = getelementptr inbounds i8* %23, i32 208 ; [#uses=1]
- %42 = bitcast i8* %41 to i32* ; [#uses=1]
- %43 = load i32* %42, align 4 ; [#uses=4]
- %44 = load %struct.CONTACT_KEY_TOKEN** %20, align 4 ; [#uses=3]
- %45 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %44, i32 %43, i32 0 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=2]
- %47 = icmp eq i32 %46, %43 ; [#uses=1]
- br i1 %47, label %_ZN11btUnionFind4findEi.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb.i.i, %bb15
- %48 = phi i32 [ %56, %bb.i.i ], [ %46, %bb15 ] ; [#uses=1]
- %49 = phi %struct.CONTACT_KEY_TOKEN* [ %54, %bb.i.i ], [ %44, %bb15 ] ; [#uses=2]
- %x_addr.04.i.i = phi i32 [ %53, %bb.i.i ], [ %43, %bb15 ] ; [#uses=1]
- %50 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %49, i32 %x_addr.04.i.i, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %49, i32 %48, i32 0 ; [#uses=2]
- %52 = load i32* %51, align 4 ; [#uses=1]
- store i32 %52, i32* %50, align 4
- %53 = load i32* %51, align 4 ; [#uses=4]
- %54 = load %struct.CONTACT_KEY_TOKEN** %20, align 4 ; [#uses=3]
- %55 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %54, i32 %53, i32 0 ; [#uses=1]
- %56 = load i32* %55, align 4 ; [#uses=2]
- %57 = icmp eq i32 %56, %53 ; [#uses=1]
- br i1 %57, label %_ZN11btUnionFind4findEi.exit.i, label %bb.i.i
-
-_ZN11btUnionFind4findEi.exit.i: ; preds = %bb.i.i, %bb15
- %58 = phi %struct.CONTACT_KEY_TOKEN* [ %44, %bb15 ], [ %54, %bb.i.i ] ; [#uses=3]
- %x_addr.0.lcssa.i.i = phi i32 [ %43, %bb15 ], [ %53, %bb.i.i ] ; [#uses=3]
- %59 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %58, i32 %40, i32 0 ; [#uses=1]
- %60 = load i32* %59, align 4 ; [#uses=2]
- %61 = icmp eq i32 %60, %40 ; [#uses=1]
- br i1 %61, label %_ZN11btUnionFind4findEi.exit5.i, label %bb.i3.i
-
-bb.i3.i: ; preds = %bb.i3.i, %_ZN11btUnionFind4findEi.exit.i
- %62 = phi i32 [ %70, %bb.i3.i ], [ %60, %_ZN11btUnionFind4findEi.exit.i ] ; [#uses=1]
- %63 = phi %struct.CONTACT_KEY_TOKEN* [ %68, %bb.i3.i ], [ %58, %_ZN11btUnionFind4findEi.exit.i ] ; [#uses=2]
- %x_addr.04.i2.i = phi i32 [ %67, %bb.i3.i ], [ %40, %_ZN11btUnionFind4findEi.exit.i ] ; [#uses=1]
- %64 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %63, i32 %x_addr.04.i2.i, i32 0 ; [#uses=1]
- %65 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %63, i32 %62, i32 0 ; [#uses=2]
- %66 = load i32* %65, align 4 ; [#uses=1]
- store i32 %66, i32* %64, align 4
- %67 = load i32* %65, align 4 ; [#uses=4]
- %68 = load %struct.CONTACT_KEY_TOKEN** %20, align 4 ; [#uses=3]
- %69 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %68, i32 %67, i32 0 ; [#uses=1]
- %70 = load i32* %69, align 4 ; [#uses=2]
- %71 = icmp eq i32 %70, %67 ; [#uses=1]
- br i1 %71, label %_ZN11btUnionFind4findEi.exit5.i, label %bb.i3.i
-
-_ZN11btUnionFind4findEi.exit5.i: ; preds = %bb.i3.i, %_ZN11btUnionFind4findEi.exit.i
- %72 = phi %struct.CONTACT_KEY_TOKEN* [ %58, %_ZN11btUnionFind4findEi.exit.i ], [ %68, %bb.i3.i ] ; [#uses=1]
- %x_addr.0.lcssa.i4.i = phi i32 [ %40, %_ZN11btUnionFind4findEi.exit.i ], [ %67, %bb.i3.i ] ; [#uses=3]
- %73 = icmp eq i32 %x_addr.0.lcssa.i.i, %x_addr.0.lcssa.i4.i ; [#uses=1]
- br i1 %73, label %bb16, label %bb.i
-
-bb.i: ; preds = %_ZN11btUnionFind4findEi.exit5.i
- %74 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %72, i32 %x_addr.0.lcssa.i.i, i32 0 ; [#uses=1]
- store i32 %x_addr.0.lcssa.i4.i, i32* %74, align 4
- %75 = load %struct.CONTACT_KEY_TOKEN** %20, align 4 ; [#uses=2]
- %76 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %75, i32 %x_addr.0.lcssa.i4.i, i32 1 ; [#uses=2]
- %77 = load i32* %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %75, i32 %x_addr.0.lcssa.i.i, i32 1 ; [#uses=1]
- %79 = load i32* %78, align 4 ; [#uses=1]
- %80 = add nsw i32 %79, %77 ; [#uses=1]
- store i32 %80, i32* %76, align 4
- br label %bb16
-
-bb16: ; preds = %bb.i, %_ZN11btUnionFind4findEi.exit5.i, %bb6, %bb1, %bb
- %81 = add nsw i32 %i.023, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %81, %13 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb16, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManager26storeIslandActivationStateEP16btCollisionWorld(%struct.btSimulationIslandManager* nocapture %this, %struct.btCollisionWorld* nocapture %colWorld) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %colWorld, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCollisionWorld* %colWorld, i32 0, i32 1, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- br label %bb
-
-bb: ; preds = %bb5, %bb.nph
- %5 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb5 ] ; [#uses=3]
- %index.19 = phi i32 [ 0, %bb.nph ], [ %index.0, %bb5 ] ; [#uses=7]
- %tmp = add i32 %5, 1 ; [#uses=2]
- %6 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %6, i32 %5 ; [#uses=1]
- %7 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=5]
- %8 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 12 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = and i32 %9, 3 ; [#uses=1]
- %11 = icmp eq i32 %10, 0 ; [#uses=1]
- br i1 %11, label %bb3, label %bb4
-
-bb3: ; preds = %bb
- %12 = load %struct.CONTACT_KEY_TOKEN** %4, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %12, i32 %index.19, i32 0 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=2]
- %15 = icmp eq i32 %14, %index.19 ; [#uses=1]
- br i1 %15, label %_ZN11btUnionFind4findEi.exit, label %bb.i
-
-bb.i: ; preds = %bb.i, %bb3
- %16 = phi i32 [ %24, %bb.i ], [ %14, %bb3 ] ; [#uses=1]
- %17 = phi %struct.CONTACT_KEY_TOKEN* [ %22, %bb.i ], [ %12, %bb3 ] ; [#uses=2]
- %x_addr.04.i = phi i32 [ %21, %bb.i ], [ %index.19, %bb3 ] ; [#uses=1]
- %18 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %17, i32 %x_addr.04.i, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %17, i32 %16, i32 0 ; [#uses=2]
- %20 = load i32* %19, align 4 ; [#uses=1]
- store i32 %20, i32* %18, align 4
- %21 = load i32* %19, align 4 ; [#uses=4]
- %22 = load %struct.CONTACT_KEY_TOKEN** %4, align 4 ; [#uses=2]
- %23 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %22, i32 %21, i32 0 ; [#uses=1]
- %24 = load i32* %23, align 4 ; [#uses=2]
- %25 = icmp eq i32 %24, %21 ; [#uses=1]
- br i1 %25, label %_ZN11btUnionFind4findEi.exit, label %bb.i
-
-_ZN11btUnionFind4findEi.exit: ; preds = %bb.i, %bb3
- %x_addr.0.lcssa.i = phi i32 [ %index.19, %bb3 ], [ %21, %bb.i ] ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 13 ; [#uses=1]
- store i32 %x_addr.0.lcssa.i, i32* %26, align 4
- %27 = load %struct.CONTACT_KEY_TOKEN** %4, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %27, i32 %index.19, i32 1 ; [#uses=1]
- store i32 %5, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 14 ; [#uses=1]
- store i32 -1, i32* %29, align 4
- %30 = add nsw i32 %index.19, 1 ; [#uses=1]
- br label %bb5
-
-bb4: ; preds = %bb
- %31 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 13 ; [#uses=1]
- store i32 -1, i32* %31, align 4
- %32 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 14 ; [#uses=1]
- store i32 -2, i32* %32, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %_ZN11btUnionFind4findEi.exit
- %index.0 = phi i32 [ %30, %_ZN11btUnionFind4findEi.exit ], [ %index.19, %bb4 ] ; [#uses=1]
- %33 = load i32* %0, align 4 ; [#uses=1]
- %34 = icmp sgt i32 %33, %tmp ; [#uses=1]
- br i1 %34, label %bb, label %return
-
-return: ; preds = %bb5, %entry
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE17quickSortInternalI33btPersistentManifoldSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %CompareFunc, i32 %lo, i32 %hi) nounwind align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.btPersistentManifold*** %2, align 4 ; [#uses=1]
- %4 = add nsw i32 %hi, %lo ; [#uses=1]
- %5 = sdiv i32 %4, 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btPersistentManifold** %3, i32 %5 ; [#uses=1]
- %7 = load %struct.btPersistentManifold** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btPersistentManifold* %7, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btPersistentManifold* %7, i32 0, i32 3 ; [#uses=2]
- br label %bb1.outer
-
-bb1.outer: ; preds = %bb7, %entry
- %i.0.ph = phi i32 [ %lo, %entry ], [ %i.1, %bb7 ] ; [#uses=2]
- %j.1.ph = phi i32 [ %hi, %entry ], [ %j.2, %bb7 ] ; [#uses=2]
- %10 = load %struct.btPersistentManifold*** %2, align 4 ; [#uses=5]
- %11 = load i8** %8, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i8* %11, i32 208 ; [#uses=1]
- %13 = bitcast i8* %12 to i32* ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=3]
- %15 = icmp sgt i32 %14, -1 ; [#uses=2]
- br i1 %15, label %bb1.us, label %bb1
-
-bb1.us: ; preds = %bb.us, %bb1.outer
- %indvar = phi i32 [ %indvar.next, %bb.us ], [ 0, %bb1.outer ] ; [#uses=2]
- %i.0.us = add i32 %i.0.ph, %indvar ; [#uses=2]
- %scevgep = getelementptr %struct.btPersistentManifold** %10, i32 %i.0.us ; [#uses=1]
- %16 = load %struct.btPersistentManifold** %scevgep, align 4 ; [#uses=3]
- %17 = getelementptr inbounds %struct.btPersistentManifold* %16, i32 0, i32 2 ; [#uses=1]
- %18 = load i8** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i8* %18, i32 208 ; [#uses=1]
- %20 = bitcast i8* %19 to i32* ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=2]
- %22 = icmp sgt i32 %21, -1 ; [#uses=1]
- br i1 %22, label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit.us, label %bb1.i.i.us
-
-bb.us: ; preds = %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit.us
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb1.us
-
-_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit.us: ; preds = %bb1.i.i.us, %bb1.us
- %23 = phi i32 [ %29, %bb1.i.i.us ], [ %21, %bb1.us ] ; [#uses=1]
- %24 = icmp slt i32 %23, %14 ; [#uses=1]
- br i1 %24, label %bb.us, label %bb3.preheader
-
-bb1.i.i.us: ; preds = %bb1.us
- %25 = getelementptr inbounds %struct.btPersistentManifold* %16, i32 0, i32 3 ; [#uses=1]
- %26 = load i8** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i8* %26, i32 208 ; [#uses=1]
- %28 = bitcast i8* %27 to i32* ; [#uses=1]
- %29 = load i32* %28, align 4 ; [#uses=1]
- br label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit.us
-
-bb: ; preds = %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit
- %indvar.next30 = add i32 %indvar29, 1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %bb1.outer
- %indvar29 = phi i32 [ %indvar.next30, %bb ], [ 0, %bb1.outer ] ; [#uses=2]
- %i.0 = add i32 %i.0.ph, %indvar29 ; [#uses=2]
- %scevgep32 = getelementptr %struct.btPersistentManifold** %10, i32 %i.0 ; [#uses=1]
- %30 = load %struct.btPersistentManifold** %scevgep32, align 4 ; [#uses=3]
- %31 = getelementptr inbounds %struct.btPersistentManifold* %30, i32 0, i32 2 ; [#uses=1]
- %32 = load i8** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i8* %32, i32 208 ; [#uses=1]
- %34 = bitcast i8* %33 to i32* ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=2]
- %36 = icmp sgt i32 %35, -1 ; [#uses=1]
- br i1 %36, label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb1
- %37 = getelementptr inbounds %struct.btPersistentManifold* %30, i32 0, i32 3 ; [#uses=1]
- %38 = load i8** %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i8* %38, i32 208 ; [#uses=1]
- %40 = bitcast i8* %39 to i32* ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=1]
- br label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit
-
-_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit: ; preds = %bb1.i.i, %bb1
- %42 = phi i32 [ %41, %bb1.i.i ], [ %35, %bb1 ] ; [#uses=1]
- %43 = load i8** %9, align 4 ; [#uses=1]
- %44 = getelementptr inbounds i8* %43, i32 208 ; [#uses=1]
- %45 = bitcast i8* %44 to i32* ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=1]
- %47 = icmp slt i32 %42, %46 ; [#uses=1]
- br i1 %47, label %bb, label %bb3.preheader
-
-bb3.preheader: ; preds = %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit.us
- %48 = phi %struct.btPersistentManifold* [ %16, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit.us ], [ %30, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit ] ; [#uses=1]
- %i.0.lcssa = phi i32 [ %i.0.us, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit.us ], [ %i.0, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit ] ; [#uses=4]
- br i1 %15, label %_Z11getIslandIdPK20btPersistentManifold.exit.i14.us, label %_Z11getIslandIdPK20btPersistentManifold.exit.i14
-
-bb2.us: ; preds = %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17.us
- %indvar.next19 = add i32 %indvar18, 1 ; [#uses=1]
- br label %_Z11getIslandIdPK20btPersistentManifold.exit.i14.us
-
-_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17.us: ; preds = %_Z11getIslandIdPK20btPersistentManifold.exit.i14.us, %bb1.i4.i15.us
- %49 = phi i32 [ %55, %bb1.i4.i15.us ], [ %61, %_Z11getIslandIdPK20btPersistentManifold.exit.i14.us ] ; [#uses=1]
- %50 = icmp slt i32 %14, %49 ; [#uses=1]
- br i1 %50, label %bb2.us, label %bb5
-
-bb1.i4.i15.us: ; preds = %_Z11getIslandIdPK20btPersistentManifold.exit.i14.us
- %51 = getelementptr inbounds %struct.btPersistentManifold* %56, i32 0, i32 3 ; [#uses=1]
- %52 = load i8** %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds i8* %52, i32 208 ; [#uses=1]
- %54 = bitcast i8* %53 to i32* ; [#uses=1]
- %55 = load i32* %54, align 4 ; [#uses=1]
- br label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17.us
-
-_Z11getIslandIdPK20btPersistentManifold.exit.i14.us: ; preds = %bb2.us, %bb3.preheader
- %indvar18 = phi i32 [ %indvar.next19, %bb2.us ], [ 0, %bb3.preheader ] ; [#uses=2]
- %j.0.us = sub i32 %j.1.ph, %indvar18 ; [#uses=2]
- %scevgep21 = getelementptr %struct.btPersistentManifold** %10, i32 %j.0.us ; [#uses=1]
- %56 = load %struct.btPersistentManifold** %scevgep21, align 4 ; [#uses=3]
- %57 = getelementptr inbounds %struct.btPersistentManifold* %56, i32 0, i32 2 ; [#uses=1]
- %58 = load i8** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i8* %58, i32 208 ; [#uses=1]
- %60 = bitcast i8* %59 to i32* ; [#uses=1]
- %61 = load i32* %60, align 4 ; [#uses=2]
- %62 = icmp sgt i32 %61, -1 ; [#uses=1]
- br i1 %62, label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17.us, label %bb1.i4.i15.us
-
-bb2: ; preds = %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17
- %indvar.next24 = add i32 %indvar23, 1 ; [#uses=1]
- br label %_Z11getIslandIdPK20btPersistentManifold.exit.i14
-
-_Z11getIslandIdPK20btPersistentManifold.exit.i14: ; preds = %bb2, %bb3.preheader
- %indvar23 = phi i32 [ %indvar.next24, %bb2 ], [ 0, %bb3.preheader ] ; [#uses=2]
- %j.0 = sub i32 %j.1.ph, %indvar23 ; [#uses=2]
- %scevgep27 = getelementptr %struct.btPersistentManifold** %10, i32 %j.0 ; [#uses=1]
- %63 = load %struct.btPersistentManifold** %scevgep27, align 4 ; [#uses=3]
- %64 = load i8** %9, align 4 ; [#uses=1]
- %65 = getelementptr inbounds i8* %64, i32 208 ; [#uses=1]
- %66 = bitcast i8* %65 to i32* ; [#uses=1]
- %67 = load i32* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btPersistentManifold* %63, i32 0, i32 2 ; [#uses=1]
- %69 = load i8** %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds i8* %69, i32 208 ; [#uses=1]
- %71 = bitcast i8* %70 to i32* ; [#uses=1]
- %72 = load i32* %71, align 4 ; [#uses=2]
- %73 = icmp sgt i32 %72, -1 ; [#uses=1]
- br i1 %73, label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17, label %bb1.i4.i15
-
-bb1.i4.i15: ; preds = %_Z11getIslandIdPK20btPersistentManifold.exit.i14
- %74 = getelementptr inbounds %struct.btPersistentManifold* %63, i32 0, i32 3 ; [#uses=1]
- %75 = load i8** %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds i8* %75, i32 208 ; [#uses=1]
- %77 = bitcast i8* %76 to i32* ; [#uses=1]
- %78 = load i32* %77, align 4 ; [#uses=1]
- br label %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17
-
-_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17: ; preds = %bb1.i4.i15, %_Z11getIslandIdPK20btPersistentManifold.exit.i14
- %79 = phi i32 [ %78, %bb1.i4.i15 ], [ %72, %_Z11getIslandIdPK20btPersistentManifold.exit.i14 ] ; [#uses=1]
- %80 = icmp slt i32 %67, %79 ; [#uses=1]
- br i1 %80, label %bb2, label %bb5
-
-bb5: ; preds = %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17.us
- %81 = phi %struct.btPersistentManifold* [ %56, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17.us ], [ %63, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17 ] ; [#uses=1]
- %j.0.lcssa = phi i32 [ %j.0.us, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17.us ], [ %j.0, %_ZN33btPersistentManifoldSortPredicateclEPK20btPersistentManifoldS2_.exit17 ] ; [#uses=4]
- %82 = icmp sgt i32 %i.0.lcssa, %j.0.lcssa ; [#uses=1]
- br i1 %82, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %83 = getelementptr inbounds %struct.btPersistentManifold** %10, i32 %i.0.lcssa ; [#uses=1]
- store %struct.btPersistentManifold* %81, %struct.btPersistentManifold** %83, align 4
- %84 = load %struct.btPersistentManifold*** %2, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btPersistentManifold** %84, i32 %j.0.lcssa ; [#uses=1]
- store %struct.btPersistentManifold* %48, %struct.btPersistentManifold** %85, align 4
- %86 = add nsw i32 %i.0.lcssa, 1 ; [#uses=1]
- %87 = add nsw i32 %j.0.lcssa, -1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %i.1 = phi i32 [ %86, %bb6 ], [ %i.0.lcssa, %bb5 ] ; [#uses=4]
- %j.2 = phi i32 [ %87, %bb6 ], [ %j.0.lcssa, %bb5 ] ; [#uses=4]
- %88 = icmp sgt i32 %i.1, %j.2 ; [#uses=1]
- br i1 %88, label %bb8, label %bb1.outer
-
-bb8: ; preds = %bb7
- %89 = icmp sgt i32 %j.2, %lo ; [#uses=1]
- br i1 %89, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE17quickSortInternalI33btPersistentManifoldSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 %lo, i32 %j.2)
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %90 = icmp slt i32 %i.1, %hi ; [#uses=1]
- br i1 %90, label %bb11, label %return
-
-bb11: ; preds = %bb10
- call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE17quickSortInternalI33btPersistentManifoldSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 %i.1, i32 %hi)
- ret void
-
-return: ; preds = %bb10
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManager12buildIslandsEP12btDispatcherP16btCollisionWorld(%struct.btSimulationIslandManager* %this, %struct.btActionInterface* %dispatcher, %struct.btCollisionWorld* nocapture %collisionWorld) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([28 x i8]* @.str30, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=7]
- %1 = load i32* %0, align 4 ; [#uses=4]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- %.not = xor i1 %2, true ; [#uses=1]
- %3 = icmp slt i32 %1, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %3 ; [#uses=1]
- br i1 %or.cond, label %bb4.i, label %invcont
-
-bb4.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, 0 ; [#uses=1]
- br i1 %6, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i: ; preds = %bb4.i
- %7 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %8 = load %struct.btPersistentManifold*** %7, align 4 ; [#uses=2]
- %9 = icmp eq %struct.btPersistentManifold** %8, null ; [#uses=1]
- br i1 %9, label %bb11.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %10 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %11 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %12 = bitcast %struct.btPersistentManifold** %8 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %12)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %7, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %13 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %7, align 4
- store i32 0, i32* %4, align 4
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb11.preheader.i, %bb4.i
- %14 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %tmp.i = sub i32 0, %1 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp = add i32 %1, %indvar.i ; [#uses=1]
- %15 = load %struct.btPersistentManifold*** %14, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btPersistentManifold** %15, i32 %tmp ; [#uses=2]
- %16 = icmp eq %struct.btPersistentManifold** %scevgep, null ; [#uses=1]
- br i1 %16, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %scevgep, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond, label %invcont, label %bb7.i
-
-invcont: ; preds = %bb10.i, %entry
- store i32 0, i32* %0, align 4
- %17 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN11btUnionFind11sortIslandsEv(%struct.btPairSet* %17)
- to label %invcont1 unwind label %lpad
-
-invcont1: ; preds = %invcont
- %18 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 1, i32 3 ; [#uses=3]
- br label %bb63
-
-invcont3: ; preds = %bb63
- %22 = load %struct.CONTACT_KEY_TOKEN** %20, align 4 ; [#uses=3]
- %23 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %22, i32 %startIslandIndex.0, i32 0 ; [#uses=1]
- %24 = load i32* %23, align 4 ; [#uses=4]
- %tmp156 = add i32 %startIslandIndex.0, 1 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %invcont7, %invcont3
- %indvar154 = phi i32 [ %indvar.next155, %invcont7 ], [ 0, %invcont3 ] ; [#uses=2]
- %endIslandIndex.0 = add i32 %tmp156, %indvar154 ; [#uses=8]
- %25 = icmp slt i32 %endIslandIndex.0, %19 ; [#uses=1]
- br i1 %25, label %invcont7, label %bb27.loopexit
-
-invcont7: ; preds = %bb5
- %scevgep158159 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %22, i32 %endIslandIndex.0, i32 0 ; [#uses=1]
- %26 = load i32* %scevgep158159, align 4 ; [#uses=1]
- %27 = icmp eq i32 %26, %24 ; [#uses=1]
- %indvar.next155 = add i32 %indvar154, 1 ; [#uses=1]
- br i1 %27, label %bb5, label %bb27.loopexit
-
-bb.nph: ; preds = %bb27.loopexit
- %28 = load %struct.btCollisionObject*** %21, align 4 ; [#uses=1]
- %tmp162 = sub i32 %endIslandIndex.0, %startIslandIndex.0 ; [#uses=1]
- br label %invcont14
-
-invcont14: ; preds = %bb26, %bb.nph
- %indvar160 = phi i32 [ 0, %bb.nph ], [ %indvar.next161, %bb26 ] ; [#uses=2]
- %allSleeping.2143 = phi i8 [ 1, %bb.nph ], [ %allSleeping.1, %bb26 ] ; [#uses=2]
- %tmp164 = add i32 %startIslandIndex.0, %indvar160 ; [#uses=1]
- %scevgep165 = getelementptr %struct.CONTACT_KEY_TOKEN* %22, i32 %tmp164, i32 1 ; [#uses=1]
- %29 = load i32* %scevgep165, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCollisionObject** %28, i32 %29 ; [#uses=1]
- %31 = load %struct.btCollisionObject** %30, align 4 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btCollisionObject* %31, i32 0, i32 13 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = icmp eq i32 %33, %24 ; [#uses=1]
- br i1 %34, label %bb20, label %bb26
-
-bb20: ; preds = %invcont14
- %35 = getelementptr inbounds %struct.btCollisionObject* %31, i32 0, i32 15 ; [#uses=1]
- %36 = load i32* %35, align 4 ; [#uses=2]
- %37 = icmp eq i32 %36, 1 ; [#uses=1]
- %allSleeping.0 = select i1 %37, i8 0, i8 %allSleeping.2143 ; [#uses=1]
- %38 = icmp eq i32 %36, 4 ; [#uses=1]
- br i1 %38, label %bb25, label %bb26
-
-bb25: ; preds = %bb20
- br label %bb26
-
-bb26: ; preds = %bb25, %bb20, %invcont14
- %allSleeping.1 = phi i8 [ 0, %bb25 ], [ %allSleeping.0, %bb20 ], [ %allSleeping.2143, %invcont14 ] ; [#uses=2]
- %indvar.next161 = add i32 %indvar160, 1 ; [#uses=2]
- %exitcond163 = icmp eq i32 %indvar.next161, %tmp162 ; [#uses=1]
- br i1 %exitcond163, label %bb28, label %invcont14
-
-bb27.loopexit: ; preds = %invcont7, %bb5
- %39 = icmp slt i32 %startIslandIndex.0, %endIslandIndex.0 ; [#uses=1]
- br i1 %39, label %bb.nph, label %bb44
-
-bb28: ; preds = %bb26
- %toBool29 = icmp eq i8 %allSleeping.1, 0 ; [#uses=1]
- br i1 %toBool29, label %bb61, label %bb44
-
-invcont35: ; preds = %bb44
- %40 = load %struct.CONTACT_KEY_TOKEN** %20, align 4 ; [#uses=1]
- %scevgep151 = getelementptr %struct.CONTACT_KEY_TOKEN* %40, i32 %idx31.0, i32 1 ; [#uses=1]
- %41 = load i32* %scevgep151, align 4 ; [#uses=1]
- %42 = load %struct.btCollisionObject*** %21, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btCollisionObject** %42, i32 %41 ; [#uses=1]
- %44 = load %struct.btCollisionObject** %43, align 4 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btCollisionObject* %44, i32 0, i32 13 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=1]
- %47 = icmp eq i32 %46, %24 ; [#uses=1]
- br i1 %47, label %bb41, label %bb43
-
-bb41: ; preds = %invcont35
- invoke void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %44, i32 2)
- to label %bb43 unwind label %lpad
-
-bb43: ; preds = %bb41, %invcont35
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb44
-
-bb44: ; preds = %bb43, %bb28, %bb27.loopexit
- %indvar = phi i32 [ %indvar.next, %bb43 ], [ 0, %bb28 ], [ 0, %bb27.loopexit ] ; [#uses=2]
- %idx31.0 = add i32 %startIslandIndex.0, %indvar ; [#uses=2]
- %48 = icmp slt i32 %idx31.0, %endIslandIndex.0 ; [#uses=1]
- br i1 %48, label %invcont35, label %bb63
-
-invcont50: ; preds = %bb61
- %49 = load %struct.CONTACT_KEY_TOKEN** %20, align 4 ; [#uses=1]
- %scevgep169 = getelementptr %struct.CONTACT_KEY_TOKEN* %49, i32 %idx46.0, i32 1 ; [#uses=1]
- %50 = load i32* %scevgep169, align 4 ; [#uses=1]
- %51 = load %struct.btCollisionObject*** %21, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btCollisionObject** %51, i32 %50 ; [#uses=1]
- %53 = load %struct.btCollisionObject** %52, align 4 ; [#uses=4]
- %54 = getelementptr inbounds %struct.btCollisionObject* %53, i32 0, i32 13 ; [#uses=1]
- %55 = load i32* %54, align 4 ; [#uses=1]
- %56 = icmp eq i32 %55, %24 ; [#uses=1]
- br i1 %56, label %bb56, label %bb60
-
-bb56: ; preds = %invcont50
- %57 = getelementptr inbounds %struct.btCollisionObject* %53, i32 0, i32 15 ; [#uses=1]
- %58 = load i32* %57, align 4 ; [#uses=1]
- %59 = icmp eq i32 %58, 2 ; [#uses=1]
- br i1 %59, label %bb58, label %bb60
-
-bb58: ; preds = %bb56
- invoke void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %53, i32 3)
- to label %invcont59 unwind label %lpad
-
-invcont59: ; preds = %bb58
- %60 = getelementptr inbounds %struct.btCollisionObject* %53, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- br label %bb60
-
-bb60: ; preds = %invcont59, %bb56, %invcont50
- %indvar.next167 = add i32 %indvar166, 1 ; [#uses=1]
- br label %bb61
-
-bb61: ; preds = %bb60, %bb28
- %indvar166 = phi i32 [ %indvar.next167, %bb60 ], [ 0, %bb28 ] ; [#uses=2]
- %idx46.0 = add i32 %startIslandIndex.0, %indvar166 ; [#uses=2]
- %61 = icmp slt i32 %idx46.0, %endIslandIndex.0 ; [#uses=1]
- br i1 %61, label %invcont50, label %bb63
-
-bb63: ; preds = %bb61, %bb44, %invcont1
- %startIslandIndex.0 = phi i32 [ 0, %invcont1 ], [ %endIslandIndex.0, %bb44 ], [ %endIslandIndex.0, %bb61 ] ; [#uses=8]
- %62 = icmp slt i32 %startIslandIndex.0, %19 ; [#uses=1]
- br i1 %62, label %invcont3, label %bb64
-
-bb64: ; preds = %bb63
- %63 = getelementptr inbounds %struct.btActionInterface* %dispatcher, i32 0, i32 0 ; [#uses=3]
- %64 = load i32 (...)*** %63, align 4 ; [#uses=1]
- %65 = getelementptr inbounds i32 (...)** %64, i32 9 ; [#uses=1]
- %66 = load i32 (...)** %65, align 4 ; [#uses=1]
- %67 = bitcast i32 (...)* %66 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %68 = invoke i32 %67(%struct.btActionInterface* %dispatcher)
- to label %bb108.preheader unwind label %lpad ; [#uses=1]
-
-bb108.preheader: ; preds = %bb64
- %69 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- %71 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=5]
- %72 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=2]
- br label %bb108
-
-bb66: ; preds = %bb108
- %73 = load i32 (...)*** %63, align 4 ; [#uses=1]
- %74 = getelementptr inbounds i32 (...)** %73, i32 10 ; [#uses=1]
- %75 = load i32 (...)** %74, align 4 ; [#uses=1]
- %76 = bitcast i32 (...)* %75 to %struct.btPersistentManifold* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %77 = invoke %struct.btPersistentManifold* %76(%struct.btActionInterface* %dispatcher, i32 %140)
- to label %invcont68 unwind label %lpad ; [#uses=3]
-
-invcont68: ; preds = %bb66
- %78 = getelementptr inbounds %struct.btPersistentManifold* %77, i32 0, i32 2 ; [#uses=1]
- %79 = load i8** %78, align 4 ; [#uses=5]
- %80 = bitcast i8* %79 to %struct.btCollisionObject* ; [#uses=2]
- %81 = getelementptr inbounds %struct.btPersistentManifold* %77, i32 0, i32 3 ; [#uses=1]
- %82 = load i8** %81, align 4 ; [#uses=5]
- %83 = bitcast i8* %82 to %struct.btCollisionObject* ; [#uses=2]
- %84 = icmp eq i8* %79, null ; [#uses=1]
- br i1 %84, label %bb70, label %bb69
-
-bb69: ; preds = %invcont68
- %85 = getelementptr inbounds i8* %79, i32 216 ; [#uses=1]
- %86 = bitcast i8* %85 to i32* ; [#uses=1]
- %87 = load i32* %86, align 4 ; [#uses=1]
- %88 = icmp eq i32 %87, 2 ; [#uses=1]
- br i1 %88, label %bb70, label %bb76
-
-bb70: ; preds = %bb69, %invcont68
- %89 = icmp eq i8* %82, null ; [#uses=1]
- br i1 %89, label %bb107, label %bb71
-
-bb71: ; preds = %bb70
- %90 = getelementptr inbounds i8* %82, i32 216 ; [#uses=1]
- %91 = bitcast i8* %90 to i32* ; [#uses=1]
- %92 = load i32* %91, align 4 ; [#uses=1]
- %93 = icmp eq i32 %92, 2 ; [#uses=1]
- br i1 %93, label %bb107, label %bb76
-
-bb76: ; preds = %bb71, %bb69
- %94 = getelementptr inbounds i8* %79, i32 204 ; [#uses=1]
- %95 = bitcast i8* %94 to i32* ; [#uses=1]
- %96 = load i32* %95, align 4 ; [#uses=1]
- %.lobit.i140 = and i32 %96, 2 ; [#uses=1]
- %toBool77not = icmp eq i32 %.lobit.i140, 0 ; [#uses=1]
- br i1 %toBool77not, label %bb88, label %bb81
-
-bb81: ; preds = %bb76
- %97 = getelementptr inbounds i8* %79, i32 216 ; [#uses=1]
- %98 = bitcast i8* %97 to i32* ; [#uses=1]
- %99 = load i32* %98, align 4 ; [#uses=1]
- %100 = icmp eq i32 %99, 2 ; [#uses=1]
- br i1 %100, label %bb88, label %bb86
-
-bb86: ; preds = %bb81
- invoke void @_ZN17btCollisionObject8activateEb(%struct.btCollisionObject* %83, i8 zeroext 0)
- to label %bb88 unwind label %lpad
-
-bb88: ; preds = %bb86, %bb81, %bb76
- %101 = getelementptr inbounds i8* %82, i32 204 ; [#uses=1]
- %102 = bitcast i8* %101 to i32* ; [#uses=1]
- %103 = load i32* %102, align 4 ; [#uses=1]
- %.lobit.i = and i32 %103, 2 ; [#uses=1]
- %toBool89not = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool89not, label %bb100, label %bb93
-
-bb93: ; preds = %bb88
- %104 = getelementptr inbounds i8* %82, i32 216 ; [#uses=1]
- %105 = bitcast i8* %104 to i32* ; [#uses=1]
- %106 = load i32* %105, align 4 ; [#uses=1]
- %107 = icmp eq i32 %106, 2 ; [#uses=1]
- br i1 %107, label %bb100, label %bb98
-
-bb98: ; preds = %bb93
- invoke void @_ZN17btCollisionObject8activateEb(%struct.btCollisionObject* %80, i8 zeroext 0)
- to label %bb100 unwind label %lpad
-
-bb100: ; preds = %bb98, %bb93, %bb88
- %108 = load i8* %69, align 4 ; [#uses=1]
- %toBool101 = icmp eq i8 %108, 0 ; [#uses=1]
- br i1 %toBool101, label %bb107, label %bb102
-
-bb102: ; preds = %bb100
- %109 = load i32 (...)*** %63, align 4 ; [#uses=1]
- %110 = getelementptr inbounds i32 (...)** %109, i32 7 ; [#uses=1]
- %111 = load i32 (...)** %110, align 4 ; [#uses=1]
- %112 = bitcast i32 (...)* %111 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %113 = invoke zeroext i8 %112(%struct.btActionInterface* %dispatcher, %struct.btCollisionObject* %80, %struct.btCollisionObject* %83)
- to label %invcont103 unwind label %lpad ; [#uses=1]
-
-invcont103: ; preds = %bb102
- %toBool104 = icmp eq i8 %113, 0 ; [#uses=1]
- br i1 %toBool104, label %bb107, label %bb105
-
-bb105: ; preds = %invcont103
- %114 = load i32* %0, align 4 ; [#uses=6]
- %115 = load i32* %70, align 4 ; [#uses=2]
- %116 = icmp eq i32 %115, %114 ; [#uses=1]
- br i1 %116, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb105
- %117 = icmp eq i32 %114, 0 ; [#uses=1]
- %118 = shl i32 %114, 1 ; [#uses=1]
- %iftmp.231.0.i.i = select i1 %117, i32 1, i32 %118 ; [#uses=4]
- %119 = icmp slt i32 %115, %iftmp.231.0.i.i ; [#uses=1]
- br i1 %119, label %bb.i.i121, label %bb1.i
-
-bb.i.i121: ; preds = %bb.i
- %120 = icmp eq i32 %iftmp.231.0.i.i, 0 ; [#uses=1]
- br i1 %120, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i122, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i121
- %121 = shl i32 %iftmp.231.0.i.i, 2 ; [#uses=1]
- %122 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %121, i32 16)
- to label %.noexc138 unwind label %lpad ; [#uses=1]
-
-.noexc138: ; preds = %bb.i2.i.i
- %phitmp.i.i = bitcast i8* %122 to %struct.btPersistentManifold** ; [#uses=1]
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i122
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i122: ; preds = %.noexc138, %bb.i.i121
- %123 = phi i32 [ %.pre.i, %.noexc138 ], [ %114, %bb.i.i121 ] ; [#uses=2]
- %124 = phi %struct.btPersistentManifold** [ %phitmp.i.i, %.noexc138 ], [ null, %bb.i.i121 ] ; [#uses=2]
- %125 = icmp sgt i32 %123, 0 ; [#uses=1]
- br i1 %125, label %bb.i4.i.i126, label %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i132
-
-bb.i4.i.i126: ; preds = %bb3.i.i.i131, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i122
- %indvar.i.i.i124 = phi i32 [ %indvar.next.i.i.i129, %bb3.i.i.i131 ], [ 0, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i122 ] ; [#uses=3]
- %scevgep.i.i.i125 = getelementptr %struct.btPersistentManifold** %124, i32 %indvar.i.i.i124 ; [#uses=2]
- %126 = icmp eq %struct.btPersistentManifold** %scevgep.i.i.i125, null ; [#uses=1]
- br i1 %126, label %bb3.i.i.i131, label %bb1.i5.i.i128
-
-bb1.i5.i.i128: ; preds = %bb.i4.i.i126
- %127 = load %struct.btPersistentManifold*** %71, align 4 ; [#uses=1]
- %scevgep8.i.i.i127 = getelementptr %struct.btPersistentManifold** %127, i32 %indvar.i.i.i124 ; [#uses=1]
- %128 = load %struct.btPersistentManifold** %scevgep8.i.i.i127, align 4 ; [#uses=1]
- store %struct.btPersistentManifold* %128, %struct.btPersistentManifold** %scevgep.i.i.i125, align 4
- br label %bb3.i.i.i131
-
-bb3.i.i.i131: ; preds = %bb1.i5.i.i128, %bb.i4.i.i126
- %indvar.next.i.i.i129 = add i32 %indvar.i.i.i124, 1 ; [#uses=2]
- %exitcond147 = icmp eq i32 %indvar.next.i.i.i129, %123 ; [#uses=1]
- br i1 %exitcond147, label %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i132, label %bb.i4.i.i126
-
-_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i132: ; preds = %bb3.i.i.i131, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i122
- %129 = load %struct.btPersistentManifold*** %71, align 4 ; [#uses=2]
- %130 = icmp eq %struct.btPersistentManifold** %129, null ; [#uses=1]
- br i1 %130, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i, label %bb.i.i.i134
-
-bb.i.i.i134: ; preds = %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i132
- %131 = load i8* %72, align 4 ; [#uses=1]
- %toBool.i.i.i133 = icmp eq i8 %131, 0 ; [#uses=1]
- br i1 %toBool.i.i.i133, label %bb2.i.i.i136, label %bb1.i.i.i135
-
-bb1.i.i.i135: ; preds = %bb.i.i.i134
- %132 = bitcast %struct.btPersistentManifold** %129 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %132)
- to label %bb2.i.i.i136 unwind label %lpad
-
-bb2.i.i.i136: ; preds = %bb1.i.i.i135, %bb.i.i.i134
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %71, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i136, %_ZNK20btAlignedObjectArrayIP20btPersistentManifoldE4copyEiiPS1_.exit.i.i132
- store i8 1, i8* %72, align 4
- store %struct.btPersistentManifold** %124, %struct.btPersistentManifold*** %71, align 4
- store i32 %iftmp.231.0.i.i, i32* %70, align 4
- %.pre5.i = load i32* %0, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i, %bb.i, %bb105
- %133 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE10deallocateEv.exit.i.i ], [ %114, %bb105 ], [ %114, %bb.i ] ; [#uses=2]
- %134 = load %struct.btPersistentManifold*** %71, align 4 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btPersistentManifold** %134, i32 %133 ; [#uses=2]
- %136 = icmp eq %struct.btPersistentManifold** %135, null ; [#uses=1]
- br i1 %136, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btPersistentManifold* %77, %struct.btPersistentManifold** %135, align 4
- %.pre6.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %137 = phi i32 [ %133, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %138 = add nsw i32 %137, 1 ; [#uses=1]
- store i32 %138, i32* %0, align 4
- br label %bb107
-
-bb107: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_.exit, %invcont103, %bb100, %bb71, %bb70
- %139 = add nsw i32 %140, 1 ; [#uses=1]
- br label %bb108
-
-bb108: ; preds = %bb107, %bb108.preheader
- %140 = phi i32 [ %139, %bb107 ], [ 0, %bb108.preheader ] ; [#uses=3]
- %141 = icmp slt i32 %140, %68 ; [#uses=1]
- br i1 %141, label %bb66, label %bb112
-
-invcont110: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb112: ; preds = %bb108
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb1.i.i.i135, %bb.i2.i.i, %bb102, %bb98, %bb86, %bb66, %bb64, %bb58, %bb41, %invcont, %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select114 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont110 unwind label %lpad115
-
-lpad115: ; preds = %lpad
- %eh_ptr116 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select118 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr116, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManager22buildAndProcessIslandsEP12btDispatcherP16btCollisionWorldPNS_14IslandCallbackE(%struct.btSimulationIslandManager* %this, %struct.btActionInterface* %dispatcher, %struct.btCollisionWorld* nocapture %collisionWorld, %struct.btActionInterface* %callback) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- call void @_ZN25btSimulationIslandManager12buildIslandsEP12btDispatcherP16btCollisionWorld(%struct.btSimulationIslandManager* %this, %struct.btActionInterface* %dispatcher, %struct.btCollisionWorld* %collisionWorld)
- %1 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=2]
- call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([15 x i8]* @.str131, i32 0, i32 0))
- %3 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBoolnot = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb6
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btActionInterface* %dispatcher, i32 0, i32 0 ; [#uses=2]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 11 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to %struct.btPersistentManifold** (%struct.btActionInterface*)* ; [#uses=1]
- %10 = invoke %struct.btPersistentManifold** %9(%struct.btActionInterface* %dispatcher)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- %11 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 9 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %15 = invoke i32 %14(%struct.btActionInterface* %dispatcher)
- to label %invcont4 unwind label %lpad ; [#uses=1]
-
-invcont4: ; preds = %invcont
- %16 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 2 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 1, i32 1 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 1, i32 3 ; [#uses=1]
- %23 = load %struct.btCollisionObject*** %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %19 to void (%struct.btActionInterface*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, i32)* ; [#uses=1]
- invoke void %24(%struct.btActionInterface* %callback, %struct.btCollisionObject** %23, i32 %21, %struct.btPersistentManifold** %10, i32 %15, i32 -1)
- to label %bb51 unwind label %lpad
-
-bb6: ; preds = %entry
- %25 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=4]
- %27 = icmp sgt i32 %26, 1 ; [#uses=1]
- br i1 %27, label %bb.i87, label %bb47.preheader
-
-bb.i87: ; preds = %bb6
- %28 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2 ; [#uses=1]
- %29 = add nsw i32 %26, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE17quickSortInternalI33btPersistentManifoldSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %28, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %29) nounwind
- br label %bb47.preheader
-
-bb47.preheader: ; preds = %bb.i87, %bb6
- %30 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 1, i32 3 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 1 ; [#uses=8]
- %33 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 2 ; [#uses=4]
- %34 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 3 ; [#uses=10]
- %35 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=4]
- %36 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- br label %bb47
-
-invcont9: ; preds = %bb47
- %38 = load %struct.CONTACT_KEY_TOKEN** %30, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %38, i32 %startIslandIndex.0, i32 0 ; [#uses=1]
- %40 = load i32* %39, align 4 ; [#uses=4]
- br label %bb18
-
-invcont11: ; preds = %invcont20
- %scevgep102 = getelementptr %struct.CONTACT_KEY_TOKEN* %75, i32 %endIslandIndex.0, i32 1 ; [#uses=1]
- %41 = load i32* %scevgep102, align 4 ; [#uses=1]
- %42 = load %struct.btCollisionObject*** %31, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btCollisionObject** %42, i32 %41 ; [#uses=1]
- %44 = load %struct.btCollisionObject** %43, align 4 ; [#uses=2]
- %45 = load i32* %32, align 4 ; [#uses=6]
- %46 = load i32* %33, align 4 ; [#uses=2]
- %47 = icmp eq i32 %46, %45 ; [#uses=1]
- br i1 %47, label %bb.i64, label %bb1.i81
-
-bb.i64: ; preds = %invcont11
- %48 = icmp eq i32 %45, 0 ; [#uses=1]
- %49 = shl i32 %45, 1 ; [#uses=1]
- %iftmp.225.0.i.i = select i1 %48, i32 1, i32 %49 ; [#uses=4]
- %50 = icmp slt i32 %46, %iftmp.225.0.i.i ; [#uses=1]
- br i1 %50, label %bb.i.i65, label %bb1.i81
-
-bb.i.i65: ; preds = %bb.i64
- %51 = icmp eq i32 %iftmp.225.0.i.i, 0 ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i66, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i65
- %52 = shl i32 %iftmp.225.0.i.i, 2 ; [#uses=1]
- %53 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %52, i32 16)
- to label %.noexc84 unwind label %lpad ; [#uses=1]
-
-.noexc84: ; preds = %bb.i2.i.i
- %phitmp.i.i = bitcast i8* %53 to %struct.btCollisionObject** ; [#uses=1]
- %.pre.i = load i32* %32, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i66
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i66: ; preds = %.noexc84, %bb.i.i65
- %54 = phi i32 [ %.pre.i, %.noexc84 ], [ %45, %bb.i.i65 ] ; [#uses=2]
- %55 = phi %struct.btCollisionObject** [ %phitmp.i.i, %.noexc84 ], [ null, %bb.i.i65 ] ; [#uses=2]
- %56 = icmp sgt i32 %54, 0 ; [#uses=1]
- br i1 %56, label %bb.i4.i.i70, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i76
-
-bb.i4.i.i70: ; preds = %bb3.i.i.i75, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i66
- %indvar.i.i.i68 = phi i32 [ %indvar.next.i.i.i73, %bb3.i.i.i75 ], [ 0, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i66 ] ; [#uses=3]
- %scevgep.i.i.i69 = getelementptr %struct.btCollisionObject** %55, i32 %indvar.i.i.i68 ; [#uses=2]
- %57 = icmp eq %struct.btCollisionObject** %scevgep.i.i.i69, null ; [#uses=1]
- br i1 %57, label %bb3.i.i.i75, label %bb1.i5.i.i72
-
-bb1.i5.i.i72: ; preds = %bb.i4.i.i70
- %58 = load %struct.btCollisionObject*** %34, align 4 ; [#uses=1]
- %scevgep8.i.i.i71 = getelementptr %struct.btCollisionObject** %58, i32 %indvar.i.i.i68 ; [#uses=1]
- %59 = load %struct.btCollisionObject** %scevgep8.i.i.i71, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %59, %struct.btCollisionObject** %scevgep.i.i.i69, align 4
- br label %bb3.i.i.i75
-
-bb3.i.i.i75: ; preds = %bb1.i5.i.i72, %bb.i4.i.i70
- %indvar.next.i.i.i73 = add i32 %indvar.i.i.i68, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i73, %54 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i76, label %bb.i4.i.i70
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i76: ; preds = %bb3.i.i.i75, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i66
- %60 = load %struct.btCollisionObject*** %34, align 4 ; [#uses=2]
- %61 = icmp eq %struct.btCollisionObject** %60, null ; [#uses=1]
- br i1 %61, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, label %bb.i.i.i78
-
-bb.i.i.i78: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i76
- %62 = load i8* %35, align 4 ; [#uses=1]
- %toBool.i.i.i77 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool.i.i.i77, label %bb2.i.i.i80, label %bb1.i.i.i79
-
-bb1.i.i.i79: ; preds = %bb.i.i.i78
- %63 = bitcast %struct.btCollisionObject** %60 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %63)
- to label %bb2.i.i.i80 unwind label %lpad
-
-bb2.i.i.i80: ; preds = %bb1.i.i.i79, %bb.i.i.i78
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %34, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i80, %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i.i76
- store i8 1, i8* %35, align 4
- store %struct.btCollisionObject** %55, %struct.btCollisionObject*** %34, align 4
- store i32 %iftmp.225.0.i.i, i32* %33, align 4
- %.pre5.i = load i32* %32, align 4 ; [#uses=1]
- br label %bb1.i81
-
-bb1.i81: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i, %bb.i64, %invcont11
- %64 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i.i ], [ %45, %invcont11 ], [ %45, %bb.i64 ] ; [#uses=2]
- %65 = load %struct.btCollisionObject*** %34, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btCollisionObject** %65, i32 %64 ; [#uses=2]
- %67 = icmp eq %struct.btCollisionObject** %66, null ; [#uses=1]
- br i1 %67, label %invcont12, label %bb2.i82
-
-bb2.i82: ; preds = %bb1.i81
- store %struct.btCollisionObject* %44, %struct.btCollisionObject** %66, align 4
- %.pre6.i = load i32* %32, align 4 ; [#uses=1]
- br label %invcont12
-
-invcont12: ; preds = %bb2.i82, %bb1.i81
- %68 = phi i32 [ %64, %bb1.i81 ], [ %.pre6.i, %bb2.i82 ] ; [#uses=1]
- %69 = add nsw i32 %68, 1 ; [#uses=1]
- store i32 %69, i32* %32, align 4
- %70 = getelementptr inbounds %struct.btCollisionObject* %44, i32 0, i32 15 ; [#uses=1]
- %71 = load i32* %70, align 4 ; [#uses=2]
- %72 = icmp eq i32 %71, 2 ; [#uses=1]
- br i1 %72, label %_ZNK17btCollisionObject8isActiveEv.exit, label %bb.i63
-
-bb.i63: ; preds = %invcont12
- %phitmp = icmp eq i32 %71, 5 ; [#uses=1]
- %phitmp90 = select i1 %phitmp, i8 1, i8 %islandSleeping.1 ; [#uses=1]
- br label %_ZNK17btCollisionObject8isActiveEv.exit
-
-_ZNK17btCollisionObject8isActiveEv.exit: ; preds = %bb.i63, %invcont12
- %73 = phi i8 [ %phitmp90, %bb.i63 ], [ 1, %invcont12 ] ; [#uses=1]
- %indvar.next100 = add i32 %indvar99, 1 ; [#uses=1]
- br label %bb18
-
-bb18: ; preds = %_ZNK17btCollisionObject8isActiveEv.exit, %invcont9
- %indvar99 = phi i32 [ %indvar.next100, %_ZNK17btCollisionObject8isActiveEv.exit ], [ 0, %invcont9 ] ; [#uses=2]
- %islandSleeping.1 = phi i8 [ %73, %_ZNK17btCollisionObject8isActiveEv.exit ], [ 0, %invcont9 ] ; [#uses=2]
- %endIslandIndex.0 = add i32 %startIslandIndex.0, %indvar99 ; [#uses=4]
- %74 = icmp slt i32 %endIslandIndex.0, %2 ; [#uses=1]
- br i1 %74, label %invcont20, label %bb25.critedge
-
-invcont20: ; preds = %bb18
- %75 = load %struct.CONTACT_KEY_TOKEN** %30, align 4 ; [#uses=2]
- %scevgep103104 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %75, i32 %endIslandIndex.0, i32 0 ; [#uses=1]
- %76 = load i32* %scevgep103104, align 4 ; [#uses=1]
- %77 = icmp eq i32 %76, %40 ; [#uses=1]
- br i1 %77, label %invcont11, label %bb25.critedge
-
-bb25.critedge: ; preds = %invcont20, %bb18
- %78 = icmp slt i32 %startManifoldIndex.1, %26 ; [#uses=1]
- br i1 %78, label %bb26, label %bb36
-
-bb26: ; preds = %bb25.critedge
- %79 = load %struct.btPersistentManifold*** %36, align 4 ; [#uses=2]
- %80 = getelementptr inbounds %struct.btPersistentManifold** %79, i32 %startManifoldIndex.1 ; [#uses=2]
- %81 = load %struct.btPersistentManifold** %80, align 4 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btPersistentManifold* %81, i32 0, i32 2 ; [#uses=1]
- %83 = load i8** %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds i8* %83, i32 208 ; [#uses=1]
- %85 = bitcast i8* %84 to i32* ; [#uses=1]
- %86 = load i32* %85, align 4 ; [#uses=2]
- %87 = icmp sgt i32 %86, -1 ; [#uses=1]
- br i1 %87, label %_Z11getIslandIdPK20btPersistentManifold.exit62, label %bb1.i61
-
-bb1.i61: ; preds = %bb26
- %88 = getelementptr inbounds %struct.btPersistentManifold* %81, i32 0, i32 3 ; [#uses=1]
- %89 = load i8** %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds i8* %89, i32 208 ; [#uses=1]
- %91 = bitcast i8* %90 to i32* ; [#uses=1]
- %92 = load i32* %91, align 4 ; [#uses=1]
- br label %_Z11getIslandIdPK20btPersistentManifold.exit62
-
-_Z11getIslandIdPK20btPersistentManifold.exit62: ; preds = %bb1.i61, %bb26
- %93 = phi i32 [ %92, %bb1.i61 ], [ %86, %bb26 ] ; [#uses=1]
- %94 = icmp eq i32 %93, %40 ; [#uses=1]
- br i1 %94, label %bb27, label %bb36
-
-bb27: ; preds = %_Z11getIslandIdPK20btPersistentManifold.exit62
- %tmp = add i32 %startManifoldIndex.1, 1 ; [#uses=1]
- br label %bb29
-
-bb29: ; preds = %_Z11getIslandIdPK20btPersistentManifold.exit, %bb27
- %indvar = phi i32 [ %indvar.next, %_Z11getIslandIdPK20btPersistentManifold.exit ], [ 0, %bb27 ] ; [#uses=2]
- %endManifoldIndex.2 = add i32 %tmp, %indvar ; [#uses=4]
- %95 = icmp slt i32 %endManifoldIndex.2, %26 ; [#uses=1]
- br i1 %95, label %bb30, label %bb35.critedge
-
-bb30: ; preds = %bb29
- %scevgep = getelementptr %struct.btPersistentManifold** %79, i32 %endManifoldIndex.2 ; [#uses=1]
- %96 = load %struct.btPersistentManifold** %scevgep, align 4 ; [#uses=2]
- %97 = getelementptr inbounds %struct.btPersistentManifold* %96, i32 0, i32 2 ; [#uses=1]
- %98 = load i8** %97, align 4 ; [#uses=1]
- %99 = getelementptr inbounds i8* %98, i32 208 ; [#uses=1]
- %100 = bitcast i8* %99 to i32* ; [#uses=1]
- %101 = load i32* %100, align 4 ; [#uses=2]
- %102 = icmp sgt i32 %101, -1 ; [#uses=1]
- br i1 %102, label %_Z11getIslandIdPK20btPersistentManifold.exit, label %bb1.i
-
-bb1.i: ; preds = %bb30
- %103 = getelementptr inbounds %struct.btPersistentManifold* %96, i32 0, i32 3 ; [#uses=1]
- %104 = load i8** %103, align 4 ; [#uses=1]
- %105 = getelementptr inbounds i8* %104, i32 208 ; [#uses=1]
- %106 = bitcast i8* %105 to i32* ; [#uses=1]
- %107 = load i32* %106, align 4 ; [#uses=1]
- br label %_Z11getIslandIdPK20btPersistentManifold.exit
-
-_Z11getIslandIdPK20btPersistentManifold.exit: ; preds = %bb1.i, %bb30
- %108 = phi i32 [ %107, %bb1.i ], [ %101, %bb30 ] ; [#uses=1]
- %109 = icmp eq i32 %108, %40 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br i1 %109, label %bb29, label %bb35.critedge
-
-bb35.critedge: ; preds = %_Z11getIslandIdPK20btPersistentManifold.exit, %bb29
- %110 = sub nsw i32 %endManifoldIndex.2, %startManifoldIndex.1 ; [#uses=1]
- br label %bb36
-
-bb36: ; preds = %bb35.critedge, %_Z11getIslandIdPK20btPersistentManifold.exit62, %bb25.critedge
- %endManifoldIndex.0 = phi i32 [ %endManifoldIndex.2, %bb35.critedge ], [ %endManifoldIndex.1, %_Z11getIslandIdPK20btPersistentManifold.exit62 ], [ %endManifoldIndex.1, %bb25.critedge ] ; [#uses=2]
- %numIslandManifolds.0 = phi i32 [ %110, %bb35.critedge ], [ 0, %_Z11getIslandIdPK20btPersistentManifold.exit62 ], [ 0, %bb25.critedge ] ; [#uses=2]
- %startManifold.0 = phi %struct.btPersistentManifold** [ %80, %bb35.critedge ], [ null, %_Z11getIslandIdPK20btPersistentManifold.exit62 ], [ null, %bb25.critedge ] ; [#uses=1]
- %toBool37not = icmp eq i8 %islandSleeping.1, 0 ; [#uses=1]
- br i1 %toBool37not, label %bb41, label %bb43
-
-bb41: ; preds = %bb36
- %111 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %112 = getelementptr inbounds i32 (...)** %111, i32 2 ; [#uses=1]
- %113 = load i32 (...)** %112, align 4 ; [#uses=1]
- %114 = load i32* %32, align 4 ; [#uses=1]
- %115 = load %struct.btCollisionObject*** %34, align 4 ; [#uses=1]
- %116 = bitcast i32 (...)* %113 to void (%struct.btActionInterface*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, i32)* ; [#uses=1]
- invoke void %116(%struct.btActionInterface* %callback, %struct.btCollisionObject** %115, i32 %114, %struct.btPersistentManifold** %startManifold.0, i32 %numIslandManifolds.0, i32 %40)
- to label %bb43 unwind label %lpad
-
-bb43: ; preds = %bb41, %bb36
- %117 = icmp eq i32 %numIslandManifolds.0, 0 ; [#uses=1]
- %startManifoldIndex.0 = select i1 %117, i32 %startManifoldIndex.1, i32 %endManifoldIndex.0 ; [#uses=1]
- %118 = load i32* %32, align 4 ; [#uses=4]
- %119 = icmp sgt i32 %118, 0 ; [#uses=1]
- %.not = xor i1 %119, true ; [#uses=1]
- %120 = icmp slt i32 %118, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %120 ; [#uses=1]
- br i1 %or.cond, label %bb4.i, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit
-
-bb4.i: ; preds = %bb43
- %121 = load i32* %33, align 4 ; [#uses=1]
- %122 = icmp slt i32 %121, 0 ; [#uses=1]
- br i1 %122, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i: ; preds = %bb4.i
- %123 = load %struct.btCollisionObject*** %34, align 4 ; [#uses=2]
- %124 = icmp eq %struct.btCollisionObject** %123, null ; [#uses=1]
- br i1 %124, label %bb11.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %125 = load i8* %35, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %125, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %126 = bitcast %struct.btCollisionObject** %123 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %126)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %34, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- store i8 1, i8* %35, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %34, align 4
- store i32 0, i32* %33, align 4
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb11.preheader.i, %bb4.i
- %tmp105 = sub i32 0, %118 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp107 = add i32 %118, %indvar.i ; [#uses=1]
- %127 = load %struct.btCollisionObject*** %34, align 4 ; [#uses=1]
- %scevgep109 = getelementptr %struct.btCollisionObject** %127, i32 %tmp107 ; [#uses=2]
- %128 = icmp eq %struct.btCollisionObject** %scevgep109, null ; [#uses=1]
- br i1 %128, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %scevgep109, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond106 = icmp eq i32 %indvar.next.i, %tmp105 ; [#uses=1]
- br i1 %exitcond106, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit: ; preds = %bb10.i, %bb43
- store i32 0, i32* %32, align 4
- br label %bb47
-
-bb47: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit, %bb47.preheader
- %startIslandIndex.0 = phi i32 [ %endIslandIndex.0, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit ], [ 0, %bb47.preheader ] ; [#uses=3]
- %startManifoldIndex.1 = phi i32 [ %startManifoldIndex.0, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit ], [ 0, %bb47.preheader ] ; [#uses=5]
- %endManifoldIndex.1 = phi i32 [ %endManifoldIndex.0, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit ], [ 1, %bb47.preheader ] ; [#uses=2]
- %129 = icmp slt i32 %startIslandIndex.0, %2 ; [#uses=1]
- br i1 %129, label %invcont9, label %bb51
-
-invcont49: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb51: ; preds = %bb47, %invcont4
- call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb1.i.i.i, %bb41, %bb1.i.i.i79, %bb.i2.i.i, %invcont4, %invcont, %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select53 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont49 unwind label %lpad54
-
-lpad54: ; preds = %lpad
- %eh_ptr55 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select57 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr55, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN25btSimulationIslandManager13initUnionFindEi(%struct.btSimulationIslandManager* %this, i32 %n) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN11btUnionFind5resetEi(%struct.btPairSet* %0, i32 %n)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManager21updateActivationStateEP16btCollisionWorldP12btDispatcher(%struct.btSimulationIslandManager* %this, %struct.btCollisionWorld* nocapture %colWorld, %struct.btActionInterface* nocapture %dispatcher) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %colWorld, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb7
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCollisionWorld* %colWorld, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb4, %bb.nph
- %i.09 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb4 ] ; [#uses=2]
- %index.18 = phi i32 [ 0, %bb.nph ], [ %index.0, %bb4 ] ; [#uses=3]
- %tmp = add i32 %i.09, 1 ; [#uses=2]
- %4 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %4, i32 %i.09 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=4]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 12 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = and i32 %7, 3 ; [#uses=1]
- %9 = icmp eq i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb3, label %bb4
-
-bb3: ; preds = %bb
- %10 = add nsw i32 %index.18, 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 13 ; [#uses=1]
- store i32 %index.18, i32* %11, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %bb
- %index.0 = phi i32 [ %10, %bb3 ], [ %index.18, %bb ] ; [#uses=2]
- %12 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 14 ; [#uses=1]
- store i32 -1, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 21 ; [#uses=1]
- store float 1.000000e+00, float* %13, align 4
- %14 = load i32* %0, align 4 ; [#uses=1]
- %15 = icmp sgt i32 %14, %tmp ; [#uses=1]
- br i1 %15, label %bb, label %bb7
-
-bb7: ; preds = %bb4, %entry
- %index.1.lcssa = phi i32 [ 0, %entry ], [ %index.0, %bb4 ] ; [#uses=1]
- %16 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN11btUnionFind5resetEi(%struct.btPairSet* %16, i32 %index.1.lcssa)
- tail call void @_ZN25btSimulationIslandManager10findUnionsEP12btDispatcherP16btCollisionWorld(%struct.btSimulationIslandManager* %this, %struct.btActionInterface* %dispatcher, %struct.btCollisionWorld* %colWorld)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManagerD0Ev(%struct.btSimulationIslandManager* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btSimulationIslandManager, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionObject*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionObject** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionObject** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- %8 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %11 = load %struct.btPersistentManifold*** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btPersistentManifold** %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btPersistentManifold** %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %16 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- %17 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN11btUnionFindD1Ev(%struct.btPairSet* %19)
- %20 = bitcast %struct.btSimulationIslandManager* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %20) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %21 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %22 = load %struct.btPersistentManifold*** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btPersistentManifold** %22, null ; [#uses=1]
- br i1 %23, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %lpad18
- %24 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %26 = bitcast %struct.btPersistentManifold** %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %26)
- to label %bb2.i.i.i42 unwind label %lpad22
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %21, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44: ; preds = %bb2.i.i.i42, %lpad18
- %27 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %21, align 4
- %28 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i41
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44 ] ; [#uses=1]
- %30 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN11btUnionFindD1Ev(%struct.btPairSet* %30)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManagerD1Ev(%struct.btSimulationIslandManager* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btSimulationIslandManager, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionObject*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionObject** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionObject** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- %8 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %11 = load %struct.btPersistentManifold*** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btPersistentManifold** %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btPersistentManifold** %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %16 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- %17 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN11btUnionFindD1Ev(%struct.btPairSet* %19)
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %20 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %21 = load %struct.btPersistentManifold*** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btPersistentManifold** %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %lpad18
- %23 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %25 = bitcast %struct.btPersistentManifold** %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i42 unwind label %lpad22
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %20, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44: ; preds = %bb2.i.i.i42, %lpad18
- %26 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %20, align 4
- %27 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %28, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i41
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44 ] ; [#uses=1]
- %29 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN11btUnionFindD1Ev(%struct.btPairSet* %29)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=0]
-define void @_ZN25btSimulationIslandManagerD2Ev(%struct.btSimulationIslandManager* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btSimulationIslandManager, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionObject*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionObject** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionObject** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %1, align 4
- %8 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %11 = load %struct.btPersistentManifold*** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btPersistentManifold** %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btPersistentManifold** %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %16 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- %17 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN11btUnionFindD1Ev(%struct.btPairSet* %19)
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %20 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %21 = load %struct.btPersistentManifold*** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btPersistentManifold** %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %lpad18
- %23 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %25 = bitcast %struct.btPersistentManifold** %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i42 unwind label %lpad22
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %20, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44: ; preds = %bb2.i.i.i42, %lpad18
- %26 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %20, align 4
- %27 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %28, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i41
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44 ] ; [#uses=1]
- %29 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN11btUnionFindD1Ev(%struct.btPairSet* %29)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=1]
-define void @_ZN25btSimulationIslandManagerC1Ev(%struct.btSimulationIslandManager* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btSimulationIslandManager, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN11btUnionFindC1Ev(%struct.btPairSet* %1)
- %2 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %3, align 4
- %4 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- %7 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %7, align 4
- %8 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btSimulationIslandManager* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %10, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN29btSphereBoxCollisionAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_b(%struct.btSphereBoxCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, i8 zeroext %isSwapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1)
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV29btSphereBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %isSwapped, i8* %4, align 4
- %toBool = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.187.0 = select i1 %toBool, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1 ; [#uses=2]
- %iftmp.188.0 = select i1 %toBool, %struct.btCollisionObject* %col1, %struct.btCollisionObject* %col0 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %5, label %bb7, label %bb13
-
-bb7: ; preds = %entry
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 6 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %13 = invoke zeroext i8 %12(%struct.btActionInterface* %7, %struct.btCollisionObject* %iftmp.187.0, %struct.btCollisionObject* %iftmp.188.0)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb7
- %toBool8not = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool8not, label %bb13, label %bb16
-
-bb13: ; preds = %invcont, %entry
- ret void
-
-bb16: ; preds = %invcont
- %14 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btActionInterface* %14, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 3 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %20 = bitcast %struct.btCollisionObject* %iftmp.187.0 to i8* ; [#uses=1]
- %21 = bitcast %struct.btCollisionObject* %iftmp.188.0 to i8* ; [#uses=1]
- %22 = invoke %struct.btPersistentManifold* %19(%struct.btActionInterface* %14, i8* %20, i8* %21)
- to label %invcont17 unwind label %lpad ; [#uses=1]
-
-invcont17: ; preds = %bb16
- store %struct.btPersistentManifold* %22, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont19: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb16, %bb7
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select23 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont19 unwind label %lpad24
-
-lpad24: ; preds = %lpad
- %eh_ptr25 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select27 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr25, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN29btSphereBoxCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %col0, %struct.btCollisionObject* nocapture %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN29btSphereBoxCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZN29btSphereBoxCollisionAlgorithm20getSpherePenetrationEP17btCollisionObjectR9btVector3S3_RKS2_fS5_S5_(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %boxObj, %struct.btQuadWord* nocapture %pointOnBox, %struct.btQuadWord* nocapture %v3PointOnSphere, %struct.btQuadWord* nocapture %sphereCenter, float %fRadius, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-bb5:
- %bounds = alloca [2 x %struct.btQuadWord], align 8 ; [#uses=11]
- %n = alloca [6 x %struct.btQuadWord], align 8 ; [#uses=27]
- %0 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 8
- %3 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 8
- %9 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 8
- %15 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 8
- %21 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %24, align 8
- %25 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 8
- %27 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 8
- %29 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 8
- %31 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 8
- %33 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %34, align 8
- %35 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %36, align 8
- %37 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 8
- %39 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- %40 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 8
- %41 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 8
- %43 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- %44 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 8
- %45 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- %46 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %46, align 8
- %47 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 4
- %48 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fsub float %49, %51 ; [#uses=3]
- %53 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fsub float %54, %56 ; [#uses=3]
- %58 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fsub float %59, %61 ; [#uses=3]
- %63 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %64 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %65 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %66 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %67 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %68 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %69 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %70 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %71 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = load float* %70, align 4 ; [#uses=1]
- %74 = load float* %69, align 4 ; [#uses=1]
- %75 = load float* %68, align 4 ; [#uses=1]
- %76 = load float* %67, align 4 ; [#uses=1]
- %77 = load float* %66, align 4 ; [#uses=1]
- %78 = load float* %65, align 4 ; [#uses=1]
- %79 = load float* %64, align 4 ; [#uses=1]
- %80 = load float* %63, align 4 ; [#uses=1]
- %81 = fmul float %78, %62 ; [#uses=1]
- %82 = fmul float %79, %57 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = fmul float %80, %52 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=3]
- %86 = fmul float %75, %62 ; [#uses=1]
- %87 = fmul float %76, %57 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=1]
- %89 = fmul float %77, %52 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=3]
- %91 = fmul float %72, %62 ; [#uses=1]
- %92 = fmul float %73, %57 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %74, %52 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=3]
- br label %bb13
-
-bb7: ; preds = %bb13
- %scevgep8687 = getelementptr [6 x %struct.btQuadWord]* %n, i32 0, i32 %119, i32 0, i32 0 ; [#uses=1]
- %scevgep85 = getelementptr [6 x %struct.btQuadWord]* %n, i32 0, i32 %119, i32 0, i32 1 ; [#uses=1]
- %scevgep = getelementptr [6 x %struct.btQuadWord]* %n, i32 0, i32 %119, i32 0, i32 2 ; [#uses=1]
- %96 = icmp sgt i32 %119, 2 ; [#uses=1]
- %97 = zext i1 %96 to i32 ; [#uses=3]
- %98 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %97, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 8 ; [#uses=2]
- %100 = fsub float %85, %99 ; [#uses=1]
- %101 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %97, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=2]
- %103 = fsub float %90, %102 ; [#uses=1]
- %104 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %97, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 8 ; [#uses=2]
- %106 = fsub float %95, %105 ; [#uses=1]
- %107 = load float* %scevgep8687, align 8 ; [#uses=2]
- %108 = fmul float %106, %107 ; [#uses=1]
- %109 = load float* %scevgep85, align 4 ; [#uses=2]
- %110 = fmul float %103, %109 ; [#uses=1]
- %111 = fadd float %108, %110 ; [#uses=1]
- %112 = load float* %scevgep, align 8 ; [#uses=2]
- %113 = fmul float %100, %112 ; [#uses=1]
- %114 = fadd float %111, %113 ; [#uses=1]
- %115 = fsub float %114, %fRadius ; [#uses=3]
- %116 = fcmp ogt float %115, 0.000000e+00 ; [#uses=1]
- br i1 %116, label %bb19, label %bb10
-
-bb10: ; preds = %bb7
- %117 = fcmp ogt float %115, %fSep.1 ; [#uses=1]
- br i1 %117, label %bb11, label %bb12
-
-bb11: ; preds = %bb10
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10
- %p0.0.0.0 = phi float [ %105, %bb11 ], [ %p0.0.0.1, %bb10 ] ; [#uses=1]
- %p0.0.1.0 = phi float [ %102, %bb11 ], [ %p0.0.1.1, %bb10 ] ; [#uses=1]
- %p0.0.2.0 = phi float [ %99, %bb11 ], [ %p0.0.2.1, %bb10 ] ; [#uses=1]
- %normal.0.0.0 = phi float [ %107, %bb11 ], [ %normal.0.0.1, %bb10 ] ; [#uses=1]
- %normal.0.1.0 = phi float [ %109, %bb11 ], [ %normal.0.1.1, %bb10 ] ; [#uses=1]
- %normal.0.2.0 = phi float [ %112, %bb11 ], [ %normal.0.2.1, %bb10 ] ; [#uses=1]
- %fSep.0 = phi float [ %115, %bb11 ], [ %fSep.1, %bb10 ] ; [#uses=1]
- %118 = add nsw i32 %119, 1 ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb12, %bb5
- %p0.0.0.1 = phi float [ 0.000000e+00, %bb5 ], [ %p0.0.0.0, %bb12 ] ; [#uses=2]
- %p0.0.1.1 = phi float [ 0.000000e+00, %bb5 ], [ %p0.0.1.0, %bb12 ] ; [#uses=2]
- %p0.0.2.1 = phi float [ 0.000000e+00, %bb5 ], [ %p0.0.2.0, %bb12 ] ; [#uses=2]
- %normal.0.0.1 = phi float [ 0.000000e+00, %bb5 ], [ %normal.0.0.0, %bb12 ] ; [#uses=4]
- %normal.0.1.1 = phi float [ 0.000000e+00, %bb5 ], [ %normal.0.1.0, %bb12 ] ; [#uses=4]
- %normal.0.2.1 = phi float [ 0.000000e+00, %bb5 ], [ %normal.0.2.0, %bb12 ] ; [#uses=4]
- %fSep.1 = phi float [ -1.000000e+07, %bb5 ], [ %fSep.0, %bb12 ] ; [#uses=6]
- %119 = phi i32 [ 0, %bb5 ], [ %118, %bb12 ] ; [#uses=6]
- %120 = icmp slt i32 %119, 6 ; [#uses=1]
- br i1 %120, label %bb7, label %bb14
-
-bb14: ; preds = %bb13
- %121 = fsub float %85, %p0.0.2.1 ; [#uses=1]
- %122 = fsub float %90, %p0.0.1.1 ; [#uses=1]
- %123 = fsub float %95, %p0.0.0.1 ; [#uses=1]
- %124 = fmul float %normal.0.0.1, %123 ; [#uses=1]
- %125 = fmul float %normal.0.1.1, %122 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = fmul float %normal.0.2.1, %121 ; [#uses=1]
- %128 = fadd float %126, %127 ; [#uses=3]
- %129 = fmul float %normal.0.2.1, %128 ; [#uses=1]
- %130 = fmul float %normal.0.1.1, %128 ; [#uses=1]
- %131 = fmul float %normal.0.0.1, %128 ; [#uses=1]
- %132 = fsub float %85, %129 ; [#uses=2]
- %133 = fsub float %90, %130 ; [#uses=2]
- %134 = fsub float %95, %131 ; [#uses=2]
- %135 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %134, float* %135, align 4
- %136 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %133, float* %136, align 4
- %137 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %132, float* %137, align 4
- %138 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %138, align 4
- %139 = fmul float %normal.0.2.1, %fSep.1 ; [#uses=1]
- %140 = fmul float %normal.0.1.1, %fSep.1 ; [#uses=1]
- %141 = fmul float %normal.0.0.1, %fSep.1 ; [#uses=1]
- %142 = fadd float %132, %139 ; [#uses=1]
- %143 = fadd float %133, %140 ; [#uses=1]
- %144 = fadd float %134, %141 ; [#uses=1]
- %145 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %144, float* %145, align 4
- %146 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %143, float* %146, align 4
- %147 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %142, float* %147, align 4
- %148 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %148, align 4
- %149 = load float* %69, align 4 ; [#uses=1]
- %150 = load float* %135, align 4 ; [#uses=3]
- %151 = fmul float %149, %150 ; [#uses=1]
- %152 = load float* %66, align 4 ; [#uses=1]
- %153 = load float* %136, align 4 ; [#uses=3]
- %154 = fmul float %152, %153 ; [#uses=1]
- %155 = fadd float %151, %154 ; [#uses=1]
- %156 = load float* %63, align 4 ; [#uses=1]
- %157 = load float* %137, align 4 ; [#uses=3]
- %158 = fmul float %156, %157 ; [#uses=1]
- %159 = fadd float %155, %158 ; [#uses=1]
- %160 = load float* %50, align 4 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=1]
- %162 = load float* %70, align 4 ; [#uses=1]
- %163 = fmul float %162, %150 ; [#uses=1]
- %164 = load float* %67, align 4 ; [#uses=1]
- %165 = fmul float %164, %153 ; [#uses=1]
- %166 = fadd float %163, %165 ; [#uses=1]
- %167 = load float* %64, align 4 ; [#uses=1]
- %168 = fmul float %167, %157 ; [#uses=1]
- %169 = fadd float %166, %168 ; [#uses=1]
- %170 = load float* %55, align 4 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=1]
- %172 = load float* %71, align 4 ; [#uses=1]
- %173 = fmul float %172, %150 ; [#uses=1]
- %174 = load float* %68, align 4 ; [#uses=1]
- %175 = fmul float %174, %153 ; [#uses=1]
- %176 = fadd float %173, %175 ; [#uses=1]
- %177 = load float* %65, align 4 ; [#uses=1]
- %178 = fmul float %177, %157 ; [#uses=1]
- %179 = fadd float %176, %178 ; [#uses=1]
- %180 = load float* %60, align 4 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=1]
- store float %181, float* %135, align 4
- store float %171, float* %136, align 4
- store float %161, float* %137, align 4
- store float 0.000000e+00, float* %138, align 4
- %182 = load float* %69, align 4 ; [#uses=1]
- %183 = load float* %145, align 4 ; [#uses=3]
- %184 = fmul float %182, %183 ; [#uses=1]
- %185 = load float* %66, align 4 ; [#uses=1]
- %186 = load float* %146, align 4 ; [#uses=3]
- %187 = fmul float %185, %186 ; [#uses=1]
- %188 = fadd float %184, %187 ; [#uses=1]
- %189 = load float* %63, align 4 ; [#uses=1]
- %190 = load float* %147, align 4 ; [#uses=3]
- %191 = fmul float %189, %190 ; [#uses=1]
- %192 = fadd float %188, %191 ; [#uses=1]
- %193 = load float* %50, align 4 ; [#uses=1]
- %194 = fadd float %192, %193 ; [#uses=1]
- %195 = load float* %70, align 4 ; [#uses=1]
- %196 = fmul float %195, %183 ; [#uses=1]
- %197 = load float* %67, align 4 ; [#uses=1]
- %198 = fmul float %197, %186 ; [#uses=1]
- %199 = fadd float %196, %198 ; [#uses=1]
- %200 = load float* %64, align 4 ; [#uses=1]
- %201 = fmul float %200, %190 ; [#uses=1]
- %202 = fadd float %199, %201 ; [#uses=1]
- %203 = load float* %55, align 4 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=1]
- %205 = load float* %71, align 4 ; [#uses=1]
- %206 = fmul float %205, %183 ; [#uses=1]
- %207 = load float* %68, align 4 ; [#uses=1]
- %208 = fmul float %207, %186 ; [#uses=1]
- %209 = fadd float %206, %208 ; [#uses=1]
- %210 = load float* %65, align 4 ; [#uses=1]
- %211 = fmul float %210, %190 ; [#uses=1]
- %212 = fadd float %209, %211 ; [#uses=1]
- %213 = load float* %60, align 4 ; [#uses=1]
- %214 = fadd float %212, %213 ; [#uses=1]
- store float %214, float* %145, align 4
- store float %204, float* %146, align 4
- store float %194, float* %147, align 4
- store float 0.000000e+00, float* %148, align 4
- ret float %fSep.1
-
-bb19: ; preds = %bb7
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define float @_ZN29btSphereBoxCollisionAlgorithm17getSphereDistanceEP17btCollisionObjectR9btVector3S3_RKS2_f(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %boxObj, %struct.btQuadWord* %pointOnBox, %struct.btQuadWord* %v3PointOnSphere, %struct.btQuadWord* nocapture %sphereCenter, float %fRadius) align 2 {
-bb.nph:
- %bounds = alloca [2 x %struct.btQuadWord], align 8 ; [#uses=13]
- %boundsVec = alloca [2 x %struct.btQuadWord], align 8 ; [#uses=8]
- %n = alloca [6 x %struct.btQuadWord], align 8 ; [#uses=27]
- %0 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 9 ; [#uses=1]
- %1 = load %struct.btCollisionShape** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btCollisionShape* %1, i32 2, i32 1 ; [#uses=4]
- %3 = getelementptr inbounds i32* %2, i32 2 ; [#uses=1]
- %4 = bitcast i32* %3 to float* ; [#uses=2]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = fsub float -0.000000e+00, %5 ; [#uses=2]
- %7 = getelementptr inbounds i32* %2, i32 1 ; [#uses=1]
- %8 = bitcast i32* %7 to float* ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=2]
- %10 = fsub float -0.000000e+00, %9 ; [#uses=2]
- %11 = bitcast i32* %2 to float* ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = fsub float -0.000000e+00, %12 ; [#uses=2]
- %14 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %15 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %16 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %17 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %19 = load float* %11, align 4 ; [#uses=4]
- %20 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %21 = load float* %8, align 4 ; [#uses=4]
- %22 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %23 = load float* %4, align 4 ; [#uses=4]
- %24 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %25 = getelementptr inbounds i32* %2, i32 3 ; [#uses=1]
- %26 = bitcast i32* %25 to float* ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=4]
- store float %27, float* %24, align 4
- %28 = getelementptr inbounds %struct.btCollisionShape* %1, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 11 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = bitcast %struct.btCollisionShape* %1 to %struct.btConvexInternalShape* ; [#uses=1]
- %33 = bitcast i32 (...)* %31 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %34 = call float %33(%struct.btConvexInternalShape* %32) ; [#uses=10]
- %35 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %13, float* %35, align 8
- %36 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %10, float* %36, align 4
- %37 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %6, float* %37, align 8
- %38 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- %39 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %19, float* %39, align 8
- %40 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %40, align 4
- %41 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %23, float* %41, align 8
- %42 = getelementptr inbounds [2 x %struct.btQuadWord]* %boundsVec, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %27, float* %42, align 4
- %43 = fsub float %34, %12 ; [#uses=1]
- store float %43, float* %14, align 8
- %44 = fsub float %34, %9 ; [#uses=1]
- store float %44, float* %15, align 4
- %45 = fsub float %34, %5 ; [#uses=1]
- store float %45, float* %16, align 8
- %46 = fsub float %19, %34 ; [#uses=1]
- store float %46, float* %18, align 8
- %47 = fsub float %21, %34 ; [#uses=1]
- store float %47, float* %20, align 4
- %48 = fsub float %23, %34 ; [#uses=1]
- store float %48, float* %22, align 8
- %49 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %49, align 8
- %50 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %50, align 4
- %51 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 8
- %52 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 8
- %54 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %55, align 8
- %56 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %56, align 4
- %57 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %57, align 8
- %58 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %58, align 4
- %59 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %59, align 8
- %60 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- %61 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %61, align 8
- %62 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %62, align 4
- %63 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %63, align 8
- %64 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %64, align 4
- %65 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %65, align 8
- %66 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %66, align 4
- %67 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 8
- %68 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %68, align 4
- %69 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %69, align 8
- %70 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %70, align 4
- %71 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %71, align 8
- %72 = getelementptr inbounds [6 x %struct.btQuadWord]* %n, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %72, align 4
- %73 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fsub float %74, %76 ; [#uses=3]
- %78 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = fsub float %79, %81 ; [#uses=3]
- %83 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 0 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = fsub float %84, %86 ; [#uses=3]
- %88 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %89 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %90 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %91 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %92 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %93 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %94 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %95 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %96 = getelementptr inbounds %struct.btCollisionObject* %boxObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %97 = load float* %96, align 4 ; [#uses=1]
- %98 = load float* %95, align 4 ; [#uses=1]
- %99 = load float* %94, align 4 ; [#uses=1]
- %100 = load float* %93, align 4 ; [#uses=1]
- %101 = load float* %92, align 4 ; [#uses=1]
- %102 = load float* %91, align 4 ; [#uses=1]
- %103 = load float* %90, align 4 ; [#uses=1]
- %104 = load float* %89, align 4 ; [#uses=1]
- %105 = load float* %88, align 4 ; [#uses=1]
- %106 = fmul float %103, %87 ; [#uses=1]
- %107 = fmul float %104, %82 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %105, %77 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=3]
- %111 = fmul float %100, %87 ; [#uses=1]
- %112 = fmul float %101, %82 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fmul float %102, %77 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=3]
- %116 = fmul float %97, %87 ; [#uses=1]
- %117 = fmul float %98, %82 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=1]
- %119 = fmul float %99, %77 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=3]
- br label %bb11
-
-bb11: ; preds = %bb15.bb11_crit_edge, %bb.nph
- %121 = phi float [ 0.000000e+00, %bb.nph ], [ %.pre124, %bb15.bb11_crit_edge ] ; [#uses=2]
- %122 = phi float [ 0.000000e+00, %bb.nph ], [ %.pre123, %bb15.bb11_crit_edge ] ; [#uses=2]
- %123 = phi float [ -1.000000e+00, %bb.nph ], [ %.pre, %bb15.bb11_crit_edge ] ; [#uses=2]
- %124 = phi i32 [ 0, %bb.nph ], [ %148, %bb15.bb11_crit_edge ] ; [#uses=2]
- %bFound.1106 = phi i8 [ 0, %bb.nph ], [ %bFound.0, %bb15.bb11_crit_edge ] ; [#uses=1]
- %v3P.0.2.1105 = phi float [ %110, %bb.nph ], [ %v3P.0.2.0, %bb15.bb11_crit_edge ] ; [#uses=3]
- %v3P.0.1.1104 = phi float [ %115, %bb.nph ], [ %v3P.0.1.0, %bb15.bb11_crit_edge ] ; [#uses=3]
- %v3P.0.0.1103 = phi float [ %120, %bb.nph ], [ %v3P.0.0.0, %bb15.bb11_crit_edge ] ; [#uses=3]
- %125 = icmp sgt i32 %124, 2 ; [#uses=1]
- %126 = zext i1 %125 to i32 ; [#uses=3]
- %127 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %126, i32 0, i32 2 ; [#uses=1]
- %128 = load float* %127, align 8 ; [#uses=1]
- %129 = fsub float %v3P.0.2.1105, %128 ; [#uses=1]
- %130 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %126, i32 0, i32 1 ; [#uses=1]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = fsub float %v3P.0.1.1104, %131 ; [#uses=1]
- %133 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 %126, i32 0, i32 0 ; [#uses=1]
- %134 = load float* %133, align 8 ; [#uses=1]
- %135 = fsub float %v3P.0.0.1103, %134 ; [#uses=1]
- %136 = fmul float %135, %123 ; [#uses=1]
- %137 = fmul float %132, %122 ; [#uses=1]
- %138 = fadd float %136, %137 ; [#uses=1]
- %139 = fmul float %129, %121 ; [#uses=1]
- %140 = fadd float %138, %139 ; [#uses=4]
- %141 = fcmp ogt float %140, 0.000000e+00 ; [#uses=1]
- br i1 %141, label %bb13, label %bb15
-
-bb13: ; preds = %bb11
- %142 = fmul float %121, %140 ; [#uses=1]
- %143 = fmul float %122, %140 ; [#uses=1]
- %144 = fmul float %123, %140 ; [#uses=1]
- %145 = fsub float %v3P.0.2.1105, %142 ; [#uses=1]
- %146 = fsub float %v3P.0.1.1104, %143 ; [#uses=1]
- %147 = fsub float %v3P.0.0.1103, %144 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb13, %bb11
- %v3P.0.0.0 = phi float [ %147, %bb13 ], [ %v3P.0.0.1103, %bb11 ] ; [#uses=3]
- %v3P.0.1.0 = phi float [ %146, %bb13 ], [ %v3P.0.1.1104, %bb11 ] ; [#uses=3]
- %v3P.0.2.0 = phi float [ %145, %bb13 ], [ %v3P.0.2.1105, %bb11 ] ; [#uses=3]
- %bFound.0 = phi i8 [ 1, %bb13 ], [ %bFound.1106, %bb11 ] ; [#uses=2]
- %148 = add nsw i32 %124, 1 ; [#uses=5]
- %exitcond = icmp eq i32 %148, 6 ; [#uses=1]
- br i1 %exitcond, label %bb17, label %bb15.bb11_crit_edge
-
-bb15.bb11_crit_edge: ; preds = %bb15
- %scevgep117.phi.trans.insert = getelementptr [6 x %struct.btQuadWord]* %n, i32 0, i32 %148, i32 0, i32 0 ; [#uses=1]
- %.pre = load float* %scevgep117.phi.trans.insert, align 8 ; [#uses=1]
- %scevgep118.phi.trans.insert = getelementptr [6 x %struct.btQuadWord]* %n, i32 0, i32 %148, i32 0, i32 1 ; [#uses=1]
- %.pre123 = load float* %scevgep118.phi.trans.insert, align 4 ; [#uses=1]
- %scevgep119.phi.trans.insert = getelementptr [6 x %struct.btQuadWord]* %n, i32 0, i32 %148, i32 0, i32 2 ; [#uses=1]
- %.pre124 = load float* %scevgep119.phi.trans.insert, align 8 ; [#uses=1]
- br label %bb11
-
-bb17: ; preds = %bb15
- %toBool18 = icmp eq i8 %bFound.0, 0 ; [#uses=1]
- br i1 %toBool18, label %bb31, label %bb19
-
-bb19: ; preds = %bb17
- store float %13, float* %14, align 8
- store float %10, float* %15, align 4
- store float %6, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- store float %19, float* %18, align 8
- store float %21, float* %20, align 4
- store float %23, float* %22, align 8
- store float %27, float* %24, align 4
- %149 = fsub float %110, %v3P.0.2.0 ; [#uses=3]
- %150 = fsub float %115, %v3P.0.1.0 ; [#uses=3]
- %151 = fsub float %120, %v3P.0.0.0 ; [#uses=3]
- %152 = fmul float %151, %151 ; [#uses=1]
- %153 = fmul float %150, %150 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %149, %149 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- %157 = call float @sqrtf(float %156) nounwind readonly ; [#uses=1]
- %158 = fdiv float 1.000000e+00, %157 ; [#uses=3]
- %159 = fmul float %151, %158 ; [#uses=3]
- %160 = fmul float %150, %158 ; [#uses=3]
- %161 = fmul float %149, %158 ; [#uses=3]
- %162 = fmul float %161, %34 ; [#uses=1]
- %163 = fmul float %160, %34 ; [#uses=1]
- %164 = fmul float %159, %34 ; [#uses=1]
- %165 = fadd float %v3P.0.2.0, %162 ; [#uses=1]
- %166 = fadd float %v3P.0.1.0, %163 ; [#uses=1]
- %167 = fadd float %v3P.0.0.0, %164 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 0 ; [#uses=4]
- store float %167, float* %168, align 4
- %169 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 1 ; [#uses=4]
- store float %166, float* %169, align 4
- %170 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 2 ; [#uses=4]
- store float %165, float* %170, align 4
- %171 = getelementptr inbounds %struct.btQuadWord* %pointOnBox, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %171, align 4
- %172 = fmul float %161, %fRadius ; [#uses=1]
- %173 = fmul float %160, %fRadius ; [#uses=1]
- %174 = fmul float %159, %fRadius ; [#uses=1]
- %175 = fsub float %110, %172 ; [#uses=2]
- %176 = fsub float %115, %173 ; [#uses=2]
- %177 = fsub float %120, %174 ; [#uses=2]
- %178 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %177, float* %178, align 4
- %179 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %176, float* %179, align 4
- %180 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %175, float* %180, align 4
- %181 = getelementptr inbounds %struct.btQuadWord* %v3PointOnSphere, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %181, align 4
- %182 = load float* %170, align 4 ; [#uses=4]
- %183 = fsub float %175, %182 ; [#uses=1]
- %184 = load float* %169, align 4 ; [#uses=4]
- %185 = fsub float %176, %184 ; [#uses=1]
- %186 = load float* %168, align 4 ; [#uses=4]
- %187 = fsub float %177, %186 ; [#uses=1]
- %188 = fmul float %187, %159 ; [#uses=1]
- %189 = fmul float %185, %160 ; [#uses=1]
- %190 = fadd float %188, %189 ; [#uses=1]
- %191 = fmul float %183, %161 ; [#uses=1]
- %192 = fadd float %190, %191 ; [#uses=1]
- %193 = fcmp ogt float %192, 0.000000e+00 ; [#uses=1]
- br i1 %193, label %bb34, label %bb25
-
-bb25: ; preds = %bb19
- %194 = load float* %94, align 4 ; [#uses=1]
- %195 = fmul float %194, %186 ; [#uses=1]
- %196 = load float* %91, align 4 ; [#uses=1]
- %197 = fmul float %196, %184 ; [#uses=1]
- %198 = fadd float %195, %197 ; [#uses=1]
- %199 = load float* %88, align 4 ; [#uses=1]
- %200 = fmul float %199, %182 ; [#uses=1]
- %201 = fadd float %198, %200 ; [#uses=1]
- %202 = load float* %75, align 4 ; [#uses=1]
- %203 = fadd float %201, %202 ; [#uses=1]
- %204 = load float* %95, align 4 ; [#uses=1]
- %205 = fmul float %204, %186 ; [#uses=1]
- %206 = load float* %92, align 4 ; [#uses=1]
- %207 = fmul float %206, %184 ; [#uses=1]
- %208 = fadd float %205, %207 ; [#uses=1]
- %209 = load float* %89, align 4 ; [#uses=1]
- %210 = fmul float %209, %182 ; [#uses=1]
- %211 = fadd float %208, %210 ; [#uses=1]
- %212 = load float* %80, align 4 ; [#uses=1]
- %213 = fadd float %211, %212 ; [#uses=1]
- %214 = load float* %96, align 4 ; [#uses=1]
- %215 = fmul float %214, %186 ; [#uses=1]
- %216 = load float* %93, align 4 ; [#uses=1]
- %217 = fmul float %216, %184 ; [#uses=1]
- %218 = fadd float %215, %217 ; [#uses=1]
- %219 = load float* %90, align 4 ; [#uses=1]
- %220 = fmul float %219, %182 ; [#uses=1]
- %221 = fadd float %218, %220 ; [#uses=1]
- %222 = load float* %85, align 4 ; [#uses=1]
- %223 = fadd float %221, %222 ; [#uses=1]
- store float %223, float* %168, align 4
- store float %213, float* %169, align 4
- store float %203, float* %170, align 4
- store float 0.000000e+00, float* %171, align 4
- %224 = load float* %94, align 4 ; [#uses=1]
- %225 = load float* %178, align 4 ; [#uses=3]
- %226 = fmul float %224, %225 ; [#uses=1]
- %227 = load float* %91, align 4 ; [#uses=1]
- %228 = load float* %179, align 4 ; [#uses=3]
- %229 = fmul float %227, %228 ; [#uses=1]
- %230 = fadd float %226, %229 ; [#uses=1]
- %231 = load float* %88, align 4 ; [#uses=1]
- %232 = load float* %180, align 4 ; [#uses=3]
- %233 = fmul float %231, %232 ; [#uses=1]
- %234 = fadd float %230, %233 ; [#uses=1]
- %235 = load float* %75, align 4 ; [#uses=1]
- %236 = fadd float %234, %235 ; [#uses=2]
- %237 = load float* %95, align 4 ; [#uses=1]
- %238 = fmul float %237, %225 ; [#uses=1]
- %239 = load float* %92, align 4 ; [#uses=1]
- %240 = fmul float %239, %228 ; [#uses=1]
- %241 = fadd float %238, %240 ; [#uses=1]
- %242 = load float* %89, align 4 ; [#uses=1]
- %243 = fmul float %242, %232 ; [#uses=1]
- %244 = fadd float %241, %243 ; [#uses=1]
- %245 = load float* %80, align 4 ; [#uses=1]
- %246 = fadd float %244, %245 ; [#uses=2]
- %247 = load float* %96, align 4 ; [#uses=1]
- %248 = fmul float %247, %225 ; [#uses=1]
- %249 = load float* %93, align 4 ; [#uses=1]
- %250 = fmul float %249, %228 ; [#uses=1]
- %251 = fadd float %248, %250 ; [#uses=1]
- %252 = load float* %90, align 4 ; [#uses=1]
- %253 = fmul float %252, %232 ; [#uses=1]
- %254 = fadd float %251, %253 ; [#uses=1]
- %255 = load float* %85, align 4 ; [#uses=1]
- %256 = fadd float %254, %255 ; [#uses=2]
- store float %256, float* %178, align 4
- store float %246, float* %179, align 4
- store float %236, float* %180, align 4
- store float 0.000000e+00, float* %181, align 4
- %257 = load float* %170, align 4 ; [#uses=1]
- %258 = fsub float %257, %236 ; [#uses=2]
- %259 = load float* %169, align 4 ; [#uses=1]
- %260 = fsub float %259, %246 ; [#uses=2]
- %261 = load float* %168, align 4 ; [#uses=1]
- %262 = fsub float %261, %256 ; [#uses=2]
- %263 = fmul float %262, %262 ; [#uses=1]
- %264 = fmul float %260, %260 ; [#uses=1]
- %265 = fadd float %263, %264 ; [#uses=1]
- %266 = fmul float %258, %258 ; [#uses=1]
- %267 = fadd float %265, %266 ; [#uses=2]
- %268 = fcmp ogt float %267, 0x3E80000000000000 ; [#uses=1]
- br i1 %268, label %bb28, label %bb34
-
-bb28: ; preds = %bb25
- %269 = call float @sqrtf(float %267) nounwind readonly ; [#uses=1]
- %270 = fsub float -0.000000e+00, %269 ; [#uses=1]
- ret float %270
-
-bb31: ; preds = %bb17
- %271 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 0 ; [#uses=1]
- %272 = getelementptr inbounds [2 x %struct.btQuadWord]* %bounds, i32 0, i32 1 ; [#uses=1]
- %273 = call float @_ZN29btSphereBoxCollisionAlgorithm20getSpherePenetrationEP17btCollisionObjectR9btVector3S3_RKS2_fS5_S5_(%struct.btSphereBoxCollisionAlgorithm* %this, %struct.btCollisionObject* %boxObj, %struct.btQuadWord* %pointOnBox, %struct.btQuadWord* %v3PointOnSphere, %struct.btQuadWord* %sphereCenter, float %fRadius, %struct.btQuadWord* %271, %struct.btQuadWord* %272) ; [#uses=2]
- %274 = load float* %35, align 8 ; [#uses=1]
- store float %274, float* %14, align 8
- %275 = load float* %36, align 4 ; [#uses=1]
- store float %275, float* %15, align 4
- %276 = load float* %37, align 8 ; [#uses=1]
- store float %276, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- store float %19, float* %18, align 8
- store float %21, float* %20, align 4
- store float %23, float* %22, align 8
- store float %27, float* %24, align 4
- %277 = fcmp ugt float %273, 0.000000e+00 ; [#uses=1]
- br i1 %277, label %bb34, label %bb32
-
-bb32: ; preds = %bb31
- %278 = fsub float %273, %34 ; [#uses=1]
- ret float %278
-
-bb34: ; preds = %bb31, %bb25, %bb19
- %.038 = phi float [ 1.000000e+00, %bb19 ], [ 1.000000e+07, %bb25 ], [ 1.000000e+00, %bb31 ] ; [#uses=1]
- ret float %.038
-}
-
-; [#uses=1]
-define void @_ZN29btSphereBoxCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %pOnBox = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pOnSphere = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %sphereCenter = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %normalOnSurfaceB9 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=3]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=2]
- %iftmp.193.0 = select i1 %toBool, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1 ; [#uses=5]
- %iftmp.194.0 = select i1 %toBool, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCollisionObject* %iftmp.193.0, i32 0, i32 9 ; [#uses=1]
- %6 = load %struct.btCollisionShape** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionObject* %iftmp.193.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 8
- %10 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %iftmp.193.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionObject* %iftmp.193.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 8
- %16 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionObject* %iftmp.193.0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btCollisionShape* %6, i32 2, i32 1 ; [#uses=1]
- %20 = bitcast i32* %19 to float* ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionShape* %6, i32 1 ; [#uses=1]
- %23 = bitcast %struct.btCollisionShape* %22 to float* ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fmul float %21, %24 ; [#uses=1]
- %26 = call float @_ZN29btSphereBoxCollisionAlgorithm17getSphereDistanceEP17btCollisionObjectR9btVector3S3_RKS2_f(%struct.btSphereBoxCollisionAlgorithm* %this, %struct.btCollisionObject* %iftmp.194.0, %struct.btQuadWord* %pOnBox, %struct.btQuadWord* %pOnSphere, %struct.btQuadWord* %sphereCenter, float %25) ; [#uses=2]
- %27 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- store %struct.btPersistentManifold* %27, %struct.btPersistentManifold** %28, align 4
- %29 = fcmp olt float %26, 0x3E80000000000000 ; [#uses=1]
- br i1 %29, label %bb8, label %bb10
-
-bb8: ; preds = %bb
- %30 = getelementptr inbounds %struct.btQuadWord* %pOnBox, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 8 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %pOnSphere, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 8 ; [#uses=1]
- %34 = fsub float %31, %33 ; [#uses=3]
- %35 = getelementptr inbounds %struct.btQuadWord* %pOnBox, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %pOnSphere, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fsub float %36, %38 ; [#uses=3]
- %40 = getelementptr inbounds %struct.btQuadWord* %pOnBox, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 8 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %pOnSphere, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 8 ; [#uses=1]
- %44 = fsub float %41, %43 ; [#uses=3]
- %45 = fmul float %44, %44 ; [#uses=1]
- %46 = fmul float %39, %39 ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=1]
- %48 = fmul float %34, %34 ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=1]
- %50 = call float @sqrtf(float %49) nounwind readonly ; [#uses=1]
- %51 = fdiv float 1.000000e+00, %50 ; [#uses=3]
- %52 = fmul float %44, %51 ; [#uses=1]
- %53 = fmul float %39, %51 ; [#uses=1]
- %54 = fmul float %34, %51 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB9, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %52, float* %55, align 8
- %56 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB9, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %53, float* %56, align 4
- %57 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB9, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %54, float* %57, align 8
- %58 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB9, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %58, align 4
- %59 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0, i32 0 ; [#uses=1]
- %60 = load i32 (...)*** %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds i32 (...)** %60, i32 4 ; [#uses=1]
- %62 = load i32 (...)** %61, align 4 ; [#uses=1]
- %63 = bitcast i32 (...)* %62 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %63(%struct.btManifoldResult* %resultOut, %struct.btQuadWord* %normalOnSurfaceB9, %struct.btQuadWord* %pOnBox, float %26)
- br label %bb10
-
-bb10: ; preds = %bb8, %bb
- %64 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %65 = load i8* %64, align 4 ; [#uses=1]
- %toBool11 = icmp eq i8 %65, 0 ; [#uses=1]
- br i1 %toBool11, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb12
-
-bb12: ; preds = %bb10
- %66 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btPersistentManifold* %66, i32 0, i32 4 ; [#uses=1]
- %68 = load i32* %67, align 4 ; [#uses=1]
- %69 = icmp eq i32 %68, 0 ; [#uses=1]
- br i1 %69, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb14
-
-bb14: ; preds = %bb12
- %70 = load %struct.btPersistentManifold** %28, align 4 ; [#uses=4]
- %71 = getelementptr inbounds %struct.btPersistentManifold* %70, i32 0, i32 4 ; [#uses=1]
- %72 = load i32* %71, align 4 ; [#uses=1]
- %73 = icmp eq i32 %72, 0 ; [#uses=1]
- br i1 %73, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb.i
-
-bb.i: ; preds = %bb14
- %74 = getelementptr inbounds %struct.btPersistentManifold* %70, i32 0, i32 2 ; [#uses=1]
- %75 = load i8** %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %77 = load %struct.btCollisionObject** %76, align 4 ; [#uses=1]
- %78 = bitcast %struct.btCollisionObject* %77 to i8* ; [#uses=1]
- %79 = icmp eq i8* %75, %78 ; [#uses=1]
- br i1 %79, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %80 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %70, %struct.btTransform* %81, %struct.btTransform* %80)
- ret void
-
-bb3.i: ; preds = %bb.i
- %82 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %70, %struct.btTransform* %83, %struct.btTransform* %82)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit: ; preds = %bb14, %bb12, %bb10, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btSphereBoxCollisionAlgorithmD0Ev(%struct.btSphereBoxCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV29btSphereBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- %14 = bitcast %struct.btSphereBoxCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %14) nounwind
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %15)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN29btSphereBoxCollisionAlgorithmD1Ev(%struct.btSphereBoxCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV29btSphereBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN29btSphereBoxCollisionAlgorithmD2Ev(%struct.btSphereBoxCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV29btSphereBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN29btSphereBoxCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_b(%struct.btSphereBoxCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, i8 zeroext %isSwapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1)
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV29btSphereBoxCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %isSwapped, i8* %4, align 4
- %toBool = icmp eq i8 %isSwapped, 0 ; [#uses=2]
- %iftmp.187.0 = select i1 %toBool, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1 ; [#uses=2]
- %iftmp.188.0 = select i1 %toBool, %struct.btCollisionObject* %col1, %struct.btCollisionObject* %col0 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %5, label %bb7, label %bb13
-
-bb7: ; preds = %entry
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 6 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %13 = invoke zeroext i8 %12(%struct.btActionInterface* %7, %struct.btCollisionObject* %iftmp.187.0, %struct.btCollisionObject* %iftmp.188.0)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb7
- %toBool8not = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool8not, label %bb13, label %bb16
-
-bb13: ; preds = %invcont, %entry
- ret void
-
-bb16: ; preds = %invcont
- %14 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btActionInterface* %14, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 3 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %20 = bitcast %struct.btCollisionObject* %iftmp.187.0 to i8* ; [#uses=1]
- %21 = bitcast %struct.btCollisionObject* %iftmp.188.0 to i8* ; [#uses=1]
- %22 = invoke %struct.btPersistentManifold* %19(%struct.btActionInterface* %14, i8* %20, i8* %21)
- to label %invcont17 unwind label %lpad ; [#uses=1]
-
-invcont17: ; preds = %bb16
- store %struct.btPersistentManifold* %22, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont19: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb16, %bb7
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select23 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont19 unwind label %lpad24
-
-lpad24: ; preds = %lpad
- %eh_ptr25 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select27 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr25, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN32btSphereSphereCollisionAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1)
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV32btSphereSphereCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %4, label %bb, label %return
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btActionInterface* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 3 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %12 = bitcast %struct.btCollisionObject* %col0 to i8* ; [#uses=1]
- %13 = bitcast %struct.btCollisionObject* %col1 to i8* ; [#uses=1]
- %14 = invoke %struct.btPersistentManifold* %11(%struct.btActionInterface* %6, i8* %12, i8* %13)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- store %struct.btPersistentManifold* %14, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN32btSphereSphereCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %col0, %struct.btCollisionObject* nocapture %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN32btSphereSphereCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN32btSphereSphereCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btBox2dBox2dCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %col0, %struct.btCollisionObject* nocapture %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %normalOnSurfaceB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pos1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=6]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %_ZN16btManifoldResult20refreshContactPointsEv.exit10, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- store %struct.btPersistentManifold* %1, %struct.btPersistentManifold** %3, align 4
- %4 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 9 ; [#uses=1]
- %5 = load %struct.btCollisionShape** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 9 ; [#uses=1]
- %7 = load %struct.btCollisionShape** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fsub float %9, %11 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fsub float %14, %16 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btCollisionObject* %col0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %col1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = fsub float %19, %21 ; [#uses=3]
- %23 = fmul float %22, %22 ; [#uses=1]
- %24 = fmul float %17, %17 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = fmul float %12, %12 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = call float @sqrtf(float %27) nounwind readonly ; [#uses=4]
- %29 = getelementptr inbounds %struct.btCollisionShape* %5, i32 2, i32 1 ; [#uses=1]
- %30 = bitcast i32* %29 to float* ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionShape* %5, i32 1 ; [#uses=1]
- %33 = bitcast %struct.btCollisionShape* %32 to float* ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fmul float %31, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCollisionShape* %7, i32 2, i32 1 ; [#uses=1]
- %37 = bitcast i32* %36 to float* ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionShape* %7, i32 1 ; [#uses=1]
- %40 = bitcast %struct.btCollisionShape* %39 to float* ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fmul float %38, %41 ; [#uses=4]
- %43 = fadd float %35, %42 ; [#uses=2]
- %44 = fcmp olt float %43, %28 ; [#uses=1]
- br i1 %44, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %45 = getelementptr inbounds %struct.btPersistentManifold* %1, i32 0, i32 4 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=1]
- %47 = icmp eq i32 %46, 0 ; [#uses=1]
- br i1 %47, label %_ZN16btManifoldResult20refreshContactPointsEv.exit10, label %bb.i6
-
-bb.i6: ; preds = %bb1
- %48 = getelementptr inbounds %struct.btPersistentManifold* %1, i32 0, i32 2 ; [#uses=1]
- %49 = load i8** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %51 = load %struct.btCollisionObject** %50, align 4 ; [#uses=1]
- %52 = bitcast %struct.btCollisionObject* %51 to i8* ; [#uses=1]
- %53 = icmp eq i8* %49, %52 ; [#uses=1]
- br i1 %53, label %bb3.i8, label %bb2.i7
-
-bb2.i7: ; preds = %bb.i6
- %54 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %1, %struct.btTransform* %55, %struct.btTransform* %54)
- ret void
-
-bb3.i8: ; preds = %bb.i6
- %56 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %1, %struct.btTransform* %57, %struct.btTransform* %56)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit10: ; preds = %bb4, %bb1, %entry
- ret void
-
-bb2: ; preds = %bb
- %58 = fsub float %28, %43 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 1.000000e+00, float* %59, align 8
- %60 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %60, align 4
- %61 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %61, align 8
- %62 = getelementptr inbounds %struct.btQuadWord* %normalOnSurfaceB, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %62, align 4
- %63 = fcmp ogt float %28, 0x3E80000000000000 ; [#uses=1]
- br i1 %63, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- %64 = fdiv float 1.000000e+00, %28 ; [#uses=3]
- %65 = fmul float %12, %64 ; [#uses=2]
- %66 = fmul float %17, %64 ; [#uses=2]
- %67 = fmul float %22, %64 ; [#uses=2]
- store float %67, float* %59, align 8
- store float %66, float* %60, align 4
- store float %65, float* %61, align 8
- store float 0.000000e+00, float* %62, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %68 = phi float [ %67, %bb3 ], [ 1.000000e+00, %bb2 ] ; [#uses=1]
- %69 = phi float [ %66, %bb3 ], [ 0.000000e+00, %bb2 ] ; [#uses=1]
- %70 = phi float [ %65, %bb3 ], [ 0.000000e+00, %bb2 ] ; [#uses=1]
- %71 = fmul float %70, %42 ; [#uses=1]
- %72 = fmul float %69, %42 ; [#uses=1]
- %73 = fmul float %68, %42 ; [#uses=1]
- %74 = fadd float %11, %71 ; [#uses=1]
- %75 = fadd float %16, %72 ; [#uses=1]
- %76 = fadd float %21, %73 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btQuadWord* %pos1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %76, float* %77, align 8
- %78 = getelementptr inbounds %struct.btQuadWord* %pos1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %75, float* %78, align 4
- %79 = getelementptr inbounds %struct.btQuadWord* %pos1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %74, float* %79, align 8
- %80 = getelementptr inbounds %struct.btQuadWord* %pos1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %80, align 4
- %81 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0, i32 0 ; [#uses=1]
- %82 = load i32 (...)*** %81, align 4 ; [#uses=1]
- %83 = getelementptr inbounds i32 (...)** %82, i32 4 ; [#uses=1]
- %84 = load i32 (...)** %83, align 4 ; [#uses=1]
- %85 = bitcast i32 (...)* %84 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %85(%struct.btManifoldResult* %resultOut, %struct.btQuadWord* %normalOnSurfaceB, %struct.btQuadWord* %pos1, float %58)
- %86 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=4]
- %87 = getelementptr inbounds %struct.btPersistentManifold* %86, i32 0, i32 4 ; [#uses=1]
- %88 = load i32* %87, align 4 ; [#uses=1]
- %89 = icmp eq i32 %88, 0 ; [#uses=1]
- br i1 %89, label %_ZN16btManifoldResult20refreshContactPointsEv.exit10, label %bb.i
-
-bb.i: ; preds = %bb4
- %90 = getelementptr inbounds %struct.btPersistentManifold* %86, i32 0, i32 2 ; [#uses=1]
- %91 = load i8** %90, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %93 = load %struct.btCollisionObject** %92, align 4 ; [#uses=1]
- %94 = bitcast %struct.btCollisionObject* %93 to i8* ; [#uses=1]
- %95 = icmp eq i8* %91, %94 ; [#uses=1]
- br i1 %95, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %96 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %86, %struct.btTransform* %97, %struct.btTransform* %96)
- ret void
-
-bb3.i: ; preds = %bb.i
- %98 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %86, %struct.btTransform* %99, %struct.btTransform* %98)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN32btSphereSphereCollisionAlgorithmD0Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV32btSphereSphereCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- %14 = bitcast %struct.btBox2dBox2dCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %14) nounwind
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %15)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN32btSphereSphereCollisionAlgorithmD1Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV32btSphereSphereCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN32btSphereSphereCollisionAlgorithmD2Ev(%struct.btBox2dBox2dCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV32btSphereSphereCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN32btSphereSphereCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_(%struct.btBox2dBox2dCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1)
- %1 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV32btSphereSphereCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %4, label %bb, label %return
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btBox2dBox2dCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btActionInterface** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btActionInterface* %6, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 3 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %12 = bitcast %struct.btCollisionObject* %col0 to i8* ; [#uses=1]
- %13 = bitcast %struct.btCollisionObject* %col1 to i8* ; [#uses=1]
- %14 = invoke %struct.btPersistentManifold* %11(%struct.btActionInterface* %6, i8* %12, i8* %13)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- store %struct.btPersistentManifold* %14, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN34btSphereTriangleCollisionAlgorithmC2EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_b(%struct.btSphereBoxCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, i8 zeroext %swapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1)
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV34btSphereTriangleCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %swapped, i8* %4, align 4
- %5 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %5, label %bb, label %return
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 3 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %13 = bitcast %struct.btCollisionObject* %col0 to i8* ; [#uses=1]
- %14 = bitcast %struct.btCollisionObject* %col1 to i8* ; [#uses=1]
- %15 = invoke %struct.btPersistentManifold* %12(%struct.btActionInterface* %7, i8* %13, i8* %14)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- store %struct.btPersistentManifold* %15, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN34btSphereTriangleCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %col0, %struct.btCollisionObject* nocapture %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btSphereTriangleCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb1
-
-bb1: ; preds = %bb
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN34btSphereTriangleCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btSphereBoxCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %col0, %struct.btCollisionObject* nocapture %col1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %detector = alloca %struct.SphereTriangleDetector, align 8 ; [#uses=2]
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=35]
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=2]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %4, 0 ; [#uses=2]
- %iftmp.185.0 = select i1 %toBool, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1 ; [#uses=17]
- %iftmp.186.0 = select i1 %toBool, %struct.btCollisionObject* %col1, %struct.btCollisionObject* %col0 ; [#uses=17]
- %5 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 9 ; [#uses=1]
- %6 = load %struct.btCollisionShape** %5, align 4 ; [#uses=1]
- %7 = bitcast %struct.btCollisionShape* %6 to %struct.btPolyhedralConvexShape* ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 9 ; [#uses=1]
- %9 = load %struct.btCollisionShape** %8, align 4 ; [#uses=1]
- %10 = bitcast %struct.btCollisionShape* %9 to %struct.btTriangleShape* ; [#uses=1]
- %11 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 1 ; [#uses=2]
- store %struct.btPersistentManifold* %1, %struct.btPersistentManifold** %11, align 4
- %12 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %13 = call float @_ZNK20btPersistentManifold27getContactBreakingThresholdEv(%struct.btPersistentManifold* %12) ; [#uses=1]
- call void @_ZN22SphereTriangleDetectorC1EP13btSphereShapeP15btTriangleShapef(%struct.SphereTriangleDetector* %detector, %struct.btPolyhedralConvexShape* %7, %struct.btTriangleShape* %10, float %13)
- %14 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %15, align 4
- store float 0x43ABC16D60000000, float* %14, align 8
- %16 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 8
- %19 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 8
- %25 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 8
- %31 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 8
- %37 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 8
- %43 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 8
- %49 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 8
- %55 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 4
- %58 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 8
- %61 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btCollisionObject* %iftmp.185.0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 4
- %64 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 8
- %67 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 8
- %73 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 4
- %76 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 8
- %79 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 4
- %82 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 8
- %85 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 4
- %88 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 8
- %91 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 8
- %97 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- %100 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- store float %102, float* %100, align 8
- %103 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- store float %105, float* %103, align 4
- %106 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- store float %108, float* %106, align 8
- %109 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btCollisionObject* %iftmp.186.0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- store float %111, float* %109, align 4
- %112 = load i8* %3, align 4 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btDispatcherInfo* %dispatchInfo, i32 0, i32 5 ; [#uses=1]
- %114 = load %struct.btActionInterface** %113, align 4 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 0 ; [#uses=1]
- call void @_ZN22SphereTriangleDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.SphereTriangleDetector* %detector, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %115, %struct.btActionInterface* %114, i8 zeroext %112)
- %116 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %117 = load i8* %116, align 4 ; [#uses=1]
- %toBool8 = icmp eq i8 %117, 0 ; [#uses=1]
- br i1 %toBool8, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb9
-
-bb9: ; preds = %bb
- %118 = load %struct.btPersistentManifold** %11, align 4 ; [#uses=4]
- %119 = getelementptr inbounds %struct.btPersistentManifold* %118, i32 0, i32 4 ; [#uses=1]
- %120 = load i32* %119, align 4 ; [#uses=1]
- %121 = icmp eq i32 %120, 0 ; [#uses=1]
- br i1 %121, label %_ZN16btManifoldResult20refreshContactPointsEv.exit, label %bb.i
-
-bb.i: ; preds = %bb9
- %122 = getelementptr inbounds %struct.btPersistentManifold* %118, i32 0, i32 2 ; [#uses=1]
- %123 = load i8** %122, align 4 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 4 ; [#uses=1]
- %125 = load %struct.btCollisionObject** %124, align 4 ; [#uses=1]
- %126 = bitcast %struct.btCollisionObject* %125 to i8* ; [#uses=1]
- %127 = icmp eq i8* %123, %126 ; [#uses=1]
- br i1 %127, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %128 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %118, %struct.btTransform* %129, %struct.btTransform* %128)
- ret void
-
-bb3.i: ; preds = %bb.i
- %130 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 3 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btManifoldResult* %resultOut, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %118, %struct.btTransform* %131, %struct.btTransform* %130)
- ret void
-
-_ZN16btManifoldResult20refreshContactPointsEv.exit: ; preds = %bb9, %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN34btSphereTriangleCollisionAlgorithmD0Ev(%struct.btSphereBoxCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV34btSphereTriangleCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- %14 = bitcast %struct.btSphereBoxCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %14) nounwind
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %15)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN34btSphereTriangleCollisionAlgorithmD1Ev(%struct.btSphereBoxCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV34btSphereTriangleCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN34btSphereTriangleCollisionAlgorithmD2Ev(%struct.btSphereBoxCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV34btSphereTriangleCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPersistentManifold** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btPersistentManifold* %4, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 4 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %12(%struct.btActionInterface* %7, %struct.btPersistentManifold* %4)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1, %bb, %entry
- %13 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %13)
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %14 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %14)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN34btSphereTriangleCollisionAlgorithmC1EP20btPersistentManifoldRK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS6_b(%struct.btSphereBoxCollisionAlgorithm* %this, %struct.btPersistentManifold* %mf, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1, i8 zeroext %swapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %col0, %struct.btCollisionObject* %col1)
- %1 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV34btSphereTriangleCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- store %struct.btPersistentManifold* %mf, %struct.btPersistentManifold** %3, align 4
- %4 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %swapped, i8* %4, align 4
- %5 = icmp eq %struct.btPersistentManifold* %mf, null ; [#uses=1]
- br i1 %5, label %bb, label %return
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btSphereBoxCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 3 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %13 = bitcast %struct.btCollisionObject* %col0 to i8* ; [#uses=1]
- %14 = bitcast %struct.btCollisionObject* %col1 to i8* ; [#uses=1]
- %15 = invoke %struct.btPersistentManifold* %12(%struct.btActionInterface* %7, i8* %13, i8* %14)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- store %struct.btPersistentManifold* %15, %struct.btPersistentManifold** %3, align 4
- store i8 1, i8* %2, align 4
- ret void
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %0)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN11btUnionFindD2Ev(%struct.btPairSet* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=6]
- %1 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.CONTACT_KEY_TOKEN* %1, null ; [#uses=1]
- br i1 %2, label %_ZN20btAlignedObjectArrayI9btElementED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=3]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %5 = bitcast %struct.CONTACT_KEY_TOKEN* %1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- br label %_ZN20btAlignedObjectArrayI9btElementED1Ev.exit
-
-invcont1: ; preds = %bb2.i.i.i20, %lpad
- store i8 1, i8* %3, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- %6 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %7, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-_ZN20btAlignedObjectArrayI9btElementED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %8 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %8, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- store i32 0, i32* %9, align 4
- store i32 0, i32* %10, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=2]
- %12 = icmp eq %struct.CONTACT_KEY_TOKEN* %11, null ; [#uses=1]
- br i1 %12, label %invcont1, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %lpad
- %13 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %14 = bitcast %struct.CONTACT_KEY_TOKEN* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i.i20 unwind label %lpad7
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- br label %invcont1
-
-lpad7: ; preds = %bb1.i.i.i19
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=2]
-define void @_ZN11btUnionFindC1Ev(%struct.btPairSet* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- %2 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN11btUnionFindC2Ev(%struct.btPairSet* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- %2 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btElementE17quickSortInternalI31btUnionFindElementSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %CompareFunc, i32 %lo, i32 %hi) nounwind align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.CONTACT_KEY_TOKEN** %2, align 4 ; [#uses=1]
- %4 = add nsw i32 %hi, %lo ; [#uses=1]
- %5 = sdiv i32 %4, 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %3, i32 %5, i32 0 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=4]
- br label %bb1.outer
-
-bb1.outer: ; preds = %bb7, %entry
- %i.0.ph = phi i32 [ %lo, %entry ], [ %i.1, %bb7 ] ; [#uses=3]
- %j.1.ph = phi i32 [ %hi, %entry ], [ %j.2, %bb7 ] ; [#uses=3]
- %8 = load %struct.CONTACT_KEY_TOKEN** %2, align 4 ; [#uses=7]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %i.0.ph, i32 0 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=2]
- %11 = icmp slt i32 %10, %7 ; [#uses=1]
- br i1 %11, label %bb.nph16, label %bb3.preheader
-
-bb.nph16: ; preds = %bb1.outer
- %tmp24 = add i32 %i.0.ph, 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph16
- %indvar22 = phi i32 [ 0, %bb.nph16 ], [ %indvar.next23, %bb ] ; [#uses=2]
- %tmp25 = add i32 %tmp24, %indvar22 ; [#uses=2]
- %scevgep2627 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %tmp25, i32 0 ; [#uses=1]
- %12 = load i32* %scevgep2627, align 4 ; [#uses=2]
- %13 = icmp slt i32 %12, %7 ; [#uses=1]
- %indvar.next23 = add i32 %indvar22, 1 ; [#uses=1]
- br i1 %13, label %bb, label %bb3.preheader
-
-bb3.preheader: ; preds = %bb, %bb1.outer
- %14 = phi i32 [ %10, %bb1.outer ], [ %12, %bb ] ; [#uses=1]
- %i.0.lcssa = phi i32 [ %i.0.ph, %bb1.outer ], [ %tmp25, %bb ] ; [#uses=5]
- %15 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %j.1.ph, i32 0 ; [#uses=1]
- %16 = load i32* %15, align 4 ; [#uses=2]
- %17 = icmp slt i32 %7, %16 ; [#uses=1]
- br i1 %17, label %bb.nph, label %bb5
-
-bb.nph: ; preds = %bb3.preheader
- %tmp18 = add i32 %j.1.ph, -1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb2 ] ; [#uses=2]
- %tmp19 = sub i32 %tmp18, %indvar ; [#uses=2]
- %scevgep20 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %tmp19, i32 0 ; [#uses=1]
- %18 = load i32* %scevgep20, align 4 ; [#uses=2]
- %19 = icmp slt i32 %7, %18 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br i1 %19, label %bb2, label %bb5
-
-bb5: ; preds = %bb2, %bb3.preheader
- %20 = phi i32 [ %16, %bb3.preheader ], [ %18, %bb2 ] ; [#uses=1]
- %j.0.lcssa = phi i32 [ %j.1.ph, %bb3.preheader ], [ %tmp19, %bb2 ] ; [#uses=6]
- %21 = icmp sgt i32 %i.0.lcssa, %j.0.lcssa ; [#uses=1]
- br i1 %21, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %22 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %i.0.lcssa, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %i.0.lcssa, i32 1 ; [#uses=2]
- %24 = load i32* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %j.0.lcssa, i32 1 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=1]
- store i32 %20, i32* %22, align 4
- store i32 %26, i32* %23, align 4
- %27 = load %struct.CONTACT_KEY_TOKEN** %2, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %27, i32 %j.0.lcssa, i32 0 ; [#uses=1]
- store i32 %14, i32* %28, align 4
- %29 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %27, i32 %j.0.lcssa, i32 1 ; [#uses=1]
- store i32 %24, i32* %29, align 4
- %30 = add nsw i32 %i.0.lcssa, 1 ; [#uses=1]
- %31 = add nsw i32 %j.0.lcssa, -1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %i.1 = phi i32 [ %30, %bb6 ], [ %i.0.lcssa, %bb5 ] ; [#uses=4]
- %j.2 = phi i32 [ %31, %bb6 ], [ %j.0.lcssa, %bb5 ] ; [#uses=4]
- %32 = icmp sgt i32 %i.1, %j.2 ; [#uses=1]
- br i1 %32, label %bb8, label %bb1.outer
-
-bb8: ; preds = %bb7
- %33 = icmp sgt i32 %j.2, %lo ; [#uses=1]
- br i1 %33, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- call void @_ZN20btAlignedObjectArrayI9btElementE17quickSortInternalI31btUnionFindElementSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 %lo, i32 %j.2)
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %34 = icmp slt i32 %i.1, %hi ; [#uses=1]
- br i1 %34, label %bb11, label %return
-
-bb11: ; preds = %bb10
- call void @_ZN20btAlignedObjectArrayI9btElementE17quickSortInternalI31btUnionFindElementSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 %i.1, i32 %hi)
- ret void
-
-return: ; preds = %bb10
- ret void
-}
-
-; [#uses=1]
-define void @_ZN11btUnionFind11sortIslandsEv(%struct.btPairSet* %this) nounwind align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=2]
- %3 = icmp sgt i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb.nph, label %_ZN20btAlignedObjectArrayI9btElementE9quickSortI31btUnionFindElementSortPredicateEEvT_.exit
-
-bb.nph: ; preds = %entry
- %4 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %_ZN11btUnionFind4findEi.exit, %bb.nph
- %5 = phi i32 [ 0, %bb.nph ], [ %19, %_ZN11btUnionFind4findEi.exit ] ; [#uses=5]
- %6 = load %struct.CONTACT_KEY_TOKEN** %4, align 4 ; [#uses=2]
- %scevgep9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %6, i32 %5, i32 0 ; [#uses=2]
- %7 = load i32* %scevgep9, align 4 ; [#uses=2]
- %8 = icmp eq i32 %7, %5 ; [#uses=1]
- br i1 %8, label %_ZN11btUnionFind4findEi.exit, label %bb.i4
-
-bb.i4: ; preds = %bb.i4, %bb
- %9 = phi i32 [ %17, %bb.i4 ], [ %7, %bb ] ; [#uses=1]
- %10 = phi %struct.CONTACT_KEY_TOKEN* [ %15, %bb.i4 ], [ %6, %bb ] ; [#uses=2]
- %x_addr.04.i = phi i32 [ %14, %bb.i4 ], [ %5, %bb ] ; [#uses=1]
- %11 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %10, i32 %x_addr.04.i, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %10, i32 %9, i32 0 ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- store i32 %13, i32* %11, align 4
- %14 = load i32* %12, align 4 ; [#uses=4]
- %15 = load %struct.CONTACT_KEY_TOKEN** %4, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %15, i32 %14, i32 0 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=2]
- %18 = icmp eq i32 %17, %14 ; [#uses=1]
- br i1 %18, label %_ZN11btUnionFind4findEi.exit, label %bb.i4
-
-_ZN11btUnionFind4findEi.exit: ; preds = %bb.i4, %bb
- %x_addr.0.lcssa.i = phi i32 [ %5, %bb ], [ %14, %bb.i4 ] ; [#uses=1]
- store i32 %x_addr.0.lcssa.i, i32* %scevgep9, align 4
- %19 = add nsw i32 %5, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %19, %2 ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %_ZN11btUnionFind4findEi.exit
- %.pre = load i32* %1, align 4 ; [#uses=2]
- %20 = icmp sgt i32 %.pre, 1 ; [#uses=1]
- br i1 %20, label %bb.i, label %_ZN20btAlignedObjectArrayI9btElementE9quickSortI31btUnionFindElementSortPredicateEEvT_.exit
-
-bb.i: ; preds = %bb2
- %.lcssa7 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0 ; [#uses=1]
- %21 = add nsw i32 %.pre, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btElementE17quickSortInternalI31btUnionFindElementSortPredicateEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %.lcssa7, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %21) nounwind
- ret void
-
-_ZN20btAlignedObjectArrayI9btElementE9quickSortI31btUnionFindElementSortPredicateEEvT_.exit: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN11btUnionFind4FreeEv(%struct.btPairSet* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %1 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.CONTACT_KEY_TOKEN* %1, null ; [#uses=1]
- br i1 %2, label %_ZN20btAlignedObjectArrayI9btElementE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %5 = bitcast %struct.CONTACT_KEY_TOKEN* %1 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %5)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- br label %_ZN20btAlignedObjectArrayI9btElementE5clearEv.exit
-
-_ZN20btAlignedObjectArrayI9btElementE5clearEv.exit: ; preds = %bb2.i.i, %entry
- %6 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- %7 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btElementE6resizeEiRKS0_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* nocapture %this, i32 %newsize, %struct.CONTACT_KEY_TOKEN* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayI9btElementE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 3 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI9btElementE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI9btElementE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi %struct.CONTACT_KEY_TOKEN* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=4]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI9btElementE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI9btElementE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=6]
- %scevgep.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %11, i32 %indvar.i.i ; [#uses=1]
- %14 = icmp eq %struct.CONTACT_KEY_TOKEN* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep12.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %11, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep11.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %11, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %15 = load %struct.CONTACT_KEY_TOKEN** %13, align 4 ; [#uses=2]
- %scevgep89.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %15, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- %scevgep10.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %15, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %17 = load i32* %scevgep10.i.i, align 4 ; [#uses=1]
- store i32 %16, i32* %scevgep11.i.i, align 4
- store i32 %17, i32* %scevgep12.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond21 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond21, label %_ZNK20btAlignedObjectArrayI9btElementE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI9btElementE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI9btElementE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.CONTACT_KEY_TOKEN** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.CONTACT_KEY_TOKEN* %19, null ; [#uses=1]
- br i1 %20, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI9btElementE4copyEiiPS0_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %struct.CONTACT_KEY_TOKEN* %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %18, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI9btElementE4copyEiiPS0_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.CONTACT_KEY_TOKEN* %11, %struct.CONTACT_KEY_TOKEN** %18, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %fillData, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %fillData, i32 0, i32 1 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=3]
- %28 = load %struct.CONTACT_KEY_TOKEN** %25, align 4 ; [#uses=3]
- %scevgep = getelementptr %struct.CONTACT_KEY_TOKEN* %28, i32 %tmp17 ; [#uses=1]
- %29 = icmp eq %struct.CONTACT_KEY_TOKEN* %scevgep, null ; [#uses=1]
- br i1 %29, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %30 = load i32* %26, align 4 ; [#uses=1]
- %31 = load i32* %27, align 4 ; [#uses=1]
- %scevgep1819 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %28, i32 %tmp17, i32 0 ; [#uses=1]
- store i32 %30, i32* %scevgep1819, align 4
- %scevgep20 = getelementptr %struct.CONTACT_KEY_TOKEN* %28, i32 %tmp17, i32 1 ; [#uses=1]
- store i32 %31, i32* %scevgep20, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN11btUnionFind8allocateEi(%struct.btPairSet* nocapture %this, i32 %N) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %1, align 8
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btElementE6resizeEiRKS0_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %3, i32 %N, %struct.CONTACT_KEY_TOKEN* %0) inlinehint
- ret void
-}
-
-; [#uses=2]
-define void @_ZN11btUnionFind5resetEi(%struct.btPairSet* nocapture %this, i32 %N) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %1, align 8
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btElementE6resizeEiRKS0_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %3, i32 %N, %struct.CONTACT_KEY_TOKEN* %0) inlinehint
- %4 = icmp sgt i32 %N, 0 ; [#uses=1]
- br i1 %4, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %5 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %6 = phi i32 [ 0, %bb.nph ], [ %9, %bb ] ; [#uses=4]
- %7 = load %struct.CONTACT_KEY_TOKEN** %5, align 4 ; [#uses=1]
- %scevgep4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %7, i32 %6, i32 0 ; [#uses=1]
- store i32 %6, i32* %scevgep4, align 4
- %8 = load %struct.CONTACT_KEY_TOKEN** %5, align 4 ; [#uses=1]
- %scevgep5 = getelementptr %struct.CONTACT_KEY_TOKEN* %8, i32 %6, i32 1 ; [#uses=1]
- store i32 1, i32* %scevgep5, align 4
- %9 = add nsw i32 %6, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %9, %N ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=6]
-define void @_ZN11btUnionFindD1Ev(%struct.btPairSet* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=6]
- %1 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.CONTACT_KEY_TOKEN* %1, null ; [#uses=1]
- br i1 %2, label %_ZN20btAlignedObjectArrayI9btElementED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=3]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %5 = bitcast %struct.CONTACT_KEY_TOKEN* %1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- br label %_ZN20btAlignedObjectArrayI9btElementED1Ev.exit
-
-invcont1: ; preds = %bb2.i.i.i20, %lpad
- store i8 1, i8* %3, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- %6 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %7, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-_ZN20btAlignedObjectArrayI9btElementED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %8 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %8, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- store i32 0, i32* %9, align 4
- store i32 0, i32* %10, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = load %struct.CONTACT_KEY_TOKEN** %0, align 4 ; [#uses=2]
- %12 = icmp eq %struct.CONTACT_KEY_TOKEN* %11, null ; [#uses=1]
- br i1 %12, label %invcont1, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %lpad
- %13 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %14 = bitcast %struct.CONTACT_KEY_TOKEN* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i.i20 unwind label %lpad7
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %0, align 4
- br label %invcont1
-
-lpad7: ; preds = %bb1.i.i.i19
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN22SphereTriangleDetectorC2EP13btSphereShapeP15btTriangleShapef(%struct.SphereTriangleDetector* nocapture %this, %struct.btPolyhedralConvexShape* %sphere, %struct.btTriangleShape* %triangle, float %contactBreakingThreshold) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22SphereTriangleDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btPolyhedralConvexShape* %sphere, %struct.btPolyhedralConvexShape** %1, align 4
- %2 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btTriangleShape* %triangle, %struct.btTriangleShape** %2, align 4
- %3 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 3 ; [#uses=1]
- store float %contactBreakingThreshold, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22SphereTriangleDetectorD1Ev(%struct.SphereTriangleDetector* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22SphereTriangleDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22SphereTriangleDetectorD0Ev(%struct.SphereTriangleDetector* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22SphereTriangleDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.SphereTriangleDetector* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=2]
-define void @_ZN22SphereTriangleDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.SphereTriangleDetector* nocapture %this, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* nocapture %input, %struct.btActionInterface* %output, %struct.btActionInterface* nocapture %debugDraw, i8 zeroext %swapResults) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %point = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %normal = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %timeOfImpact = alloca float, align 4 ; [#uses=2]
- %depth = alloca float, align 4 ; [#uses=4]
- %sphereInTr = alloca %struct.btTransform, align 8 ; [#uses=17]
- %normalOnA = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pointOnA = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- store float 1.000000e+00, float* %timeOfImpact, align 4
- store float 0.000000e+00, float* %depth, align 4
- %2 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fsub float %3, %5 ; [#uses=3]
- %7 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fsub float %8, %10 ; [#uses=3]
- %12 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float %13, %15 ; [#uses=3]
- %17 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = fmul float %18, %16 ; [#uses=1]
- %20 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %21 = load float* %20, align 4 ; [#uses=4]
- %22 = fmul float %21, %11 ; [#uses=1]
- %23 = fadd float %19, %22 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = fmul float %25, %6 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %29 = load float* %28, align 4 ; [#uses=4]
- %30 = fmul float %29, %16 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %32 = load float* %31, align 4 ; [#uses=4]
- %33 = fmul float %32, %11 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=1]
- %35 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %36 = load float* %35, align 4 ; [#uses=4]
- %37 = fmul float %36, %6 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=1]
- %39 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %40 = load float* %39, align 4 ; [#uses=4]
- %41 = fmul float %40, %16 ; [#uses=1]
- %42 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %43 = load float* %42, align 4 ; [#uses=4]
- %44 = fmul float %43, %11 ; [#uses=1]
- %45 = fadd float %41, %44 ; [#uses=1]
- %46 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %47 = load float* %46, align 4 ; [#uses=4]
- %48 = fmul float %47, %6 ; [#uses=1]
- %49 = fadd float %45, %48 ; [#uses=1]
- %50 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = fmul float %18, %51 ; [#uses=1]
- %53 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=3]
- %55 = fmul float %21, %54 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=3]
- %59 = fmul float %25, %58 ; [#uses=1]
- %60 = fadd float %56, %59 ; [#uses=1]
- %61 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=3]
- %63 = fmul float %18, %62 ; [#uses=1]
- %64 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=3]
- %66 = fmul float %21, %65 ; [#uses=1]
- %67 = fadd float %63, %66 ; [#uses=1]
- %68 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=3]
- %70 = fmul float %25, %69 ; [#uses=1]
- %71 = fadd float %67, %70 ; [#uses=1]
- %72 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=3]
- %74 = fmul float %18, %73 ; [#uses=1]
- %75 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=3]
- %77 = fmul float %21, %76 ; [#uses=1]
- %78 = fadd float %74, %77 ; [#uses=1]
- %79 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=3]
- %81 = fmul float %25, %80 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=1]
- %83 = fmul float %29, %51 ; [#uses=1]
- %84 = fmul float %32, %54 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %36, %58 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %29, %62 ; [#uses=1]
- %89 = fmul float %32, %65 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %36, %69 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %29, %73 ; [#uses=1]
- %94 = fmul float %32, %76 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %36, %80 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %40, %51 ; [#uses=1]
- %99 = fmul float %43, %54 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %47, %58 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %40, %62 ; [#uses=1]
- %104 = fmul float %43, %65 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %47, %69 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %40, %73 ; [#uses=1]
- %109 = fmul float %43, %76 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %47, %80 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %112, float* %113, align 8
- %114 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %107, float* %114, align 4
- %115 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %102, float* %115, align 8
- %116 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %116, align 4
- %117 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %97, float* %117, align 8
- %118 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %92, float* %118, align 4
- %119 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %87, float* %119, align 8
- %120 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %120, align 4
- %121 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %82, float* %121, align 8
- %122 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %71, float* %122, align 4
- %123 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %60, float* %123, align 8
- %124 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %124, align 4
- %125 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %49, float* %125, align 8
- %126 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %126, align 4
- %127 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %27, float* %127, align 8
- %128 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %128, align 4
- %129 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 3 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btTransform* %sphereInTr, i32 0, i32 1 ; [#uses=1]
- %132 = call zeroext i8 @_ZN22SphereTriangleDetector7collideERK9btVector3RS0_S3_RfS4_f(%struct.SphereTriangleDetector* %this, %struct.btQuadWord* %131, %struct.btQuadWord* %point, %struct.btQuadWord* %normal, float* %depth, float* %timeOfImpact, float %130) ; [#uses=1]
- %toBool = icmp eq i8 %132, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %toBool1 = icmp eq i8 %swapResults, 0 ; [#uses=1]
- br i1 %toBool1, label %bb3, label %bb2
-
-bb2: ; preds = %bb
- %133 = load float* %46, align 4 ; [#uses=2]
- %134 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %135 = load float* %134, align 8 ; [#uses=3]
- %136 = fmul float %133, %135 ; [#uses=1]
- %137 = load float* %35, align 4 ; [#uses=2]
- %138 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=3]
- %140 = fmul float %137, %139 ; [#uses=1]
- %141 = fadd float %136, %140 ; [#uses=1]
- %142 = load float* %24, align 4 ; [#uses=2]
- %143 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %144 = load float* %143, align 8 ; [#uses=3]
- %145 = fmul float %142, %144 ; [#uses=1]
- %146 = fadd float %141, %145 ; [#uses=2]
- %147 = load float* %42, align 4 ; [#uses=2]
- %148 = fmul float %147, %135 ; [#uses=1]
- %149 = load float* %31, align 4 ; [#uses=2]
- %150 = fmul float %149, %139 ; [#uses=1]
- %151 = fadd float %148, %150 ; [#uses=1]
- %152 = load float* %20, align 4 ; [#uses=2]
- %153 = fmul float %152, %144 ; [#uses=1]
- %154 = fadd float %151, %153 ; [#uses=2]
- %155 = load float* %39, align 4 ; [#uses=2]
- %156 = fmul float %155, %135 ; [#uses=1]
- %157 = load float* %28, align 4 ; [#uses=2]
- %158 = fmul float %157, %139 ; [#uses=1]
- %159 = fadd float %156, %158 ; [#uses=1]
- %160 = load float* %17, align 4 ; [#uses=2]
- %161 = fmul float %160, %144 ; [#uses=1]
- %162 = fadd float %159, %161 ; [#uses=2]
- %163 = fsub float -0.000000e+00, %146 ; [#uses=1]
- %164 = fsub float -0.000000e+00, %154 ; [#uses=1]
- %165 = fsub float -0.000000e+00, %162 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btQuadWord* %normalOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %165, float* %166, align 8
- %167 = getelementptr inbounds %struct.btQuadWord* %normalOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %164, float* %167, align 4
- %168 = getelementptr inbounds %struct.btQuadWord* %normalOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %163, float* %168, align 8
- %169 = getelementptr inbounds %struct.btQuadWord* %normalOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %169, align 4
- %170 = load float* %depth, align 4 ; [#uses=4]
- %171 = fmul float %146, %170 ; [#uses=1]
- %172 = fmul float %154, %170 ; [#uses=1]
- %173 = fmul float %162, %170 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %175 = load float* %174, align 8 ; [#uses=3]
- %176 = fmul float %133, %175 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %178 = load float* %177, align 4 ; [#uses=3]
- %179 = fmul float %137, %178 ; [#uses=1]
- %180 = fadd float %176, %179 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- %182 = load float* %181, align 8 ; [#uses=3]
- %183 = fmul float %142, %182 ; [#uses=1]
- %184 = fadd float %180, %183 ; [#uses=1]
- %185 = load float* %4, align 4 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = fmul float %147, %175 ; [#uses=1]
- %188 = fmul float %149, %178 ; [#uses=1]
- %189 = fadd float %187, %188 ; [#uses=1]
- %190 = fmul float %152, %182 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = load float* %9, align 4 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- %194 = fmul float %155, %175 ; [#uses=1]
- %195 = fmul float %157, %178 ; [#uses=1]
- %196 = fadd float %194, %195 ; [#uses=1]
- %197 = fmul float %160, %182 ; [#uses=1]
- %198 = fadd float %196, %197 ; [#uses=1]
- %199 = load float* %14, align 4 ; [#uses=1]
- %200 = fadd float %198, %199 ; [#uses=1]
- %201 = fadd float %186, %171 ; [#uses=1]
- %202 = fadd float %193, %172 ; [#uses=1]
- %203 = fadd float %200, %173 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %203, float* %204, align 8
- %205 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %202, float* %205, align 4
- %206 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %201, float* %206, align 8
- %207 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %207, align 4
- %208 = getelementptr inbounds %struct.btActionInterface* %output, i32 0, i32 0 ; [#uses=1]
- %209 = load i32 (...)*** %208, align 4 ; [#uses=1]
- %210 = getelementptr inbounds i32 (...)** %209, i32 4 ; [#uses=1]
- %211 = load i32 (...)** %210, align 4 ; [#uses=1]
- %212 = bitcast i32 (...)* %211 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %212(%struct.btActionInterface* %output, %struct.btQuadWord* %normalOnA, %struct.btQuadWord* %pointOnA, float %170)
- ret void
-
-bb3: ; preds = %bb
- %213 = getelementptr inbounds %struct.btActionInterface* %output, i32 0, i32 0 ; [#uses=1]
- %214 = load i32 (...)*** %213, align 4 ; [#uses=1]
- %215 = getelementptr inbounds i32 (...)** %214, i32 4 ; [#uses=1]
- %216 = load i32 (...)** %215, align 4 ; [#uses=1]
- %217 = load float* %depth, align 4 ; [#uses=1]
- %218 = load float* %46, align 4 ; [#uses=2]
- %219 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %220 = load float* %219, align 8 ; [#uses=3]
- %221 = fmul float %218, %220 ; [#uses=1]
- %222 = load float* %35, align 4 ; [#uses=2]
- %223 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %224 = load float* %223, align 4 ; [#uses=3]
- %225 = fmul float %222, %224 ; [#uses=1]
- %226 = fadd float %221, %225 ; [#uses=1]
- %227 = load float* %24, align 4 ; [#uses=2]
- %228 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- %229 = load float* %228, align 8 ; [#uses=3]
- %230 = fmul float %227, %229 ; [#uses=1]
- %231 = fadd float %226, %230 ; [#uses=1]
- %232 = load float* %4, align 4 ; [#uses=1]
- %233 = fadd float %231, %232 ; [#uses=1]
- %234 = load float* %42, align 4 ; [#uses=2]
- %235 = fmul float %234, %220 ; [#uses=1]
- %236 = load float* %31, align 4 ; [#uses=2]
- %237 = fmul float %236, %224 ; [#uses=1]
- %238 = fadd float %235, %237 ; [#uses=1]
- %239 = load float* %20, align 4 ; [#uses=2]
- %240 = fmul float %239, %229 ; [#uses=1]
- %241 = fadd float %238, %240 ; [#uses=1]
- %242 = load float* %9, align 4 ; [#uses=1]
- %243 = fadd float %241, %242 ; [#uses=1]
- %244 = load float* %39, align 4 ; [#uses=2]
- %245 = fmul float %244, %220 ; [#uses=1]
- %246 = load float* %28, align 4 ; [#uses=2]
- %247 = fmul float %246, %224 ; [#uses=1]
- %248 = fadd float %245, %247 ; [#uses=1]
- %249 = load float* %17, align 4 ; [#uses=2]
- %250 = fmul float %249, %229 ; [#uses=1]
- %251 = fadd float %248, %250 ; [#uses=1]
- %252 = load float* %14, align 4 ; [#uses=1]
- %253 = fadd float %251, %252 ; [#uses=1]
- %254 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %253, float* %254, align 8
- %255 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %243, float* %255, align 4
- %256 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %233, float* %256, align 8
- %257 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %257, align 4
- %258 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %259 = load float* %258, align 8 ; [#uses=3]
- %260 = fmul float %218, %259 ; [#uses=1]
- %261 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %262 = load float* %261, align 4 ; [#uses=3]
- %263 = fmul float %222, %262 ; [#uses=1]
- %264 = fadd float %260, %263 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %266 = load float* %265, align 8 ; [#uses=3]
- %267 = fmul float %227, %266 ; [#uses=1]
- %268 = fadd float %264, %267 ; [#uses=1]
- %269 = fmul float %234, %259 ; [#uses=1]
- %270 = fmul float %236, %262 ; [#uses=1]
- %271 = fadd float %269, %270 ; [#uses=1]
- %272 = fmul float %239, %266 ; [#uses=1]
- %273 = fadd float %271, %272 ; [#uses=1]
- %274 = fmul float %244, %259 ; [#uses=1]
- %275 = fmul float %246, %262 ; [#uses=1]
- %276 = fadd float %274, %275 ; [#uses=1]
- %277 = fmul float %249, %266 ; [#uses=1]
- %278 = fadd float %276, %277 ; [#uses=1]
- %279 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %278, float* %279, align 8
- %280 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %273, float* %280, align 4
- %281 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %268, float* %281, align 8
- %282 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %282, align 4
- %283 = bitcast i32 (...)* %216 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %283(%struct.btActionInterface* %output, %struct.btQuadWord* %0, %struct.btQuadWord* %1, float %217)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN22SphereTriangleDetectorC1EP13btSphereShapeP15btTriangleShapef(%struct.SphereTriangleDetector* nocapture %this, %struct.btPolyhedralConvexShape* %sphere, %struct.btTriangleShape* %triangle, float %contactBreakingThreshold) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22SphereTriangleDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btPolyhedralConvexShape* %sphere, %struct.btPolyhedralConvexShape** %1, align 4
- %2 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btTriangleShape* %triangle, %struct.btTriangleShape** %2, align 4
- %3 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 3 ; [#uses=1]
- store float %contactBreakingThreshold, float* %3, align 4
- ret void
-}
-
-; [#uses=0]
-define float @_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_(%struct.btQuadWord* nocapture %from, %struct.btQuadWord* nocapture %to, %struct.btQuadWord* nocapture %p, %struct.btQuadWord* nocapture %nearest) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fsub float %1, %3 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fsub float %6, %8 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fsub float %11, %13 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %16, %3 ; [#uses=6]
- %18 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %19, %8 ; [#uses=6]
- %21 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %22, %13 ; [#uses=6]
- %24 = fmul float %23, %14 ; [#uses=1]
- %25 = fmul float %20, %9 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fmul float %17, %4 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=3]
- %29 = fcmp ogt float %28, 0.000000e+00 ; [#uses=1]
- br i1 %29, label %bb, label %bb4
-
-bb: ; preds = %entry
- %30 = fmul float %23, %23 ; [#uses=1]
- %31 = fmul float %20, %20 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %17, %17 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=2]
- %35 = fcmp olt float %28, %34 ; [#uses=1]
- br i1 %35, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %36 = fdiv float %28, %34 ; [#uses=4]
- %37 = fmul float %17, %36 ; [#uses=1]
- %38 = fmul float %20, %36 ; [#uses=1]
- %39 = fmul float %23, %36 ; [#uses=1]
- %40 = fsub float %14, %39 ; [#uses=1]
- %41 = fsub float %9, %38 ; [#uses=1]
- %42 = fsub float %4, %37 ; [#uses=1]
- br label %bb4
-
-bb2: ; preds = %bb
- %43 = fsub float %14, %23 ; [#uses=1]
- %44 = fsub float %9, %20 ; [#uses=1]
- %45 = fsub float %4, %17 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1, %entry
- %diff.0.0.0 = phi float [ %40, %bb1 ], [ %43, %bb2 ], [ %14, %entry ] ; [#uses=2]
- %diff.0.1.0 = phi float [ %41, %bb1 ], [ %44, %bb2 ], [ %9, %entry ] ; [#uses=2]
- %diff.0.2.0 = phi float [ %42, %bb1 ], [ %45, %bb2 ], [ %4, %entry ] ; [#uses=2]
- %t.0 = phi float [ %36, %bb1 ], [ 1.000000e+00, %bb2 ], [ 0.000000e+00, %entry ] ; [#uses=3]
- %46 = fmul float %17, %t.0 ; [#uses=1]
- %47 = fmul float %20, %t.0 ; [#uses=1]
- %48 = fmul float %23, %t.0 ; [#uses=1]
- %49 = fadd float %3, %46 ; [#uses=1]
- %50 = fadd float %8, %47 ; [#uses=1]
- %51 = fadd float %13, %48 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btQuadWord* %nearest, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %51, float* %52, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %nearest, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %50, float* %53, align 4
- %54 = getelementptr inbounds %struct.btQuadWord* %nearest, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %49, float* %54, align 4
- %55 = getelementptr inbounds %struct.btQuadWord* %nearest, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %55, align 4
- %56 = fmul float %diff.0.0.0, %diff.0.0.0 ; [#uses=1]
- %57 = fmul float %diff.0.1.0, %diff.0.1.0 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=1]
- %59 = fmul float %diff.0.2.0, %diff.0.2.0 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- ret float %60
-}
-
-; [#uses=2]
-define zeroext i8 @_ZN22SphereTriangleDetector15pointInTriangleEPK9btVector3RS1_PS0_(%struct.SphereTriangleDetector* nocapture %this, %struct.btQuadWord* nocapture %vertices, %struct.btQuadWord* nocapture %normal, %struct.btQuadWord* nocapture %p) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 1, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=3]
- %12 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 2, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fsub float %16, %1 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=3]
- %20 = fsub float %19, %6 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 2, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=3]
- %23 = fsub float %22, %11 ; [#uses=2]
- %24 = fsub float %3, %16 ; [#uses=2]
- %25 = fsub float %8, %19 ; [#uses=2]
- %26 = fsub float %13, %22 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=3]
- %29 = fsub float %28, %3 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = fsub float %31, %8 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=3]
- %35 = fsub float %34, %13 ; [#uses=1]
- %36 = fsub float %28, %1 ; [#uses=1]
- %37 = fsub float %31, %6 ; [#uses=1]
- %38 = fsub float %34, %11 ; [#uses=1]
- %39 = fsub float %28, %16 ; [#uses=1]
- %40 = fsub float %31, %19 ; [#uses=1]
- %41 = fsub float %34, %22 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=6]
- %44 = fmul float %14, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=6]
- %47 = fmul float %9, %46 ; [#uses=1]
- %48 = fsub float %44, %47 ; [#uses=1]
- %49 = fmul float %4, %46 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=6]
- %52 = fmul float %14, %51 ; [#uses=1]
- %53 = fsub float %49, %52 ; [#uses=1]
- %54 = fmul float %9, %51 ; [#uses=1]
- %55 = fmul float %4, %43 ; [#uses=1]
- %56 = fsub float %54, %55 ; [#uses=1]
- %57 = fmul float %23, %43 ; [#uses=1]
- %58 = fmul float %20, %46 ; [#uses=1]
- %59 = fsub float %57, %58 ; [#uses=1]
- %60 = fmul float %17, %46 ; [#uses=1]
- %61 = fmul float %23, %51 ; [#uses=1]
- %62 = fsub float %60, %61 ; [#uses=1]
- %63 = fmul float %20, %51 ; [#uses=1]
- %64 = fmul float %17, %43 ; [#uses=1]
- %65 = fsub float %63, %64 ; [#uses=1]
- %66 = fmul float %26, %43 ; [#uses=1]
- %67 = fmul float %25, %46 ; [#uses=1]
- %68 = fsub float %66, %67 ; [#uses=1]
- %69 = fmul float %24, %46 ; [#uses=1]
- %70 = fmul float %26, %51 ; [#uses=1]
- %71 = fsub float %69, %70 ; [#uses=1]
- %72 = fmul float %25, %51 ; [#uses=1]
- %73 = fmul float %24, %43 ; [#uses=1]
- %74 = fsub float %72, %73 ; [#uses=1]
- %75 = fmul float %56, %35 ; [#uses=1]
- %76 = fmul float %53, %32 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = fmul float %48, %29 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=2]
- %80 = fmul float %65, %38 ; [#uses=1]
- %81 = fmul float %62, %37 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = fmul float %59, %36 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=2]
- %85 = fmul float %74, %41 ; [#uses=1]
- %86 = fmul float %71, %40 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %68, %39 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=2]
- %notlhs = fcmp ogt float %79, 0.000000e+00 ; [#uses=1]
- %notrhs = fcmp ogt float %84, 0.000000e+00 ; [#uses=1]
- %or.cond.not = and i1 %notrhs, %notlhs ; [#uses=1]
- %90 = fcmp ogt float %89, 0.000000e+00 ; [#uses=1]
- %or.cond10 = and i1 %or.cond.not, %90 ; [#uses=1]
- br i1 %or.cond10, label %bb7, label %bb2
-
-bb2: ; preds = %entry
- %91 = fcmp ugt float %79, 0.000000e+00 ; [#uses=1]
- %92 = fcmp ugt float %84, 0.000000e+00 ; [#uses=1]
- %or.cond11 = or i1 %91, %92 ; [#uses=1]
- %93 = fcmp ugt float %89, 0.000000e+00 ; [#uses=1]
- %or.cond12 = or i1 %or.cond11, %93 ; [#uses=1]
- %94 = zext i1 %or.cond12 to i8 ; [#uses=1]
- %retval = xor i8 %94, 1 ; [#uses=1]
- ret i8 %retval
-
-bb7: ; preds = %entry
- ret i8 1
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN22SphereTriangleDetector12facecontainsERK9btVector3PS1_RS0_(%struct.SphereTriangleDetector* nocapture %this, %struct.btQuadWord* nocapture %p, %struct.btQuadWord* nocapture %vertices, %struct.btQuadWord* nocapture %normal) nounwind readonly align 2 {
-entry:
- %lp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %lnormal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btQuadWord* %lp, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 8
- %3 = getelementptr inbounds %struct.btQuadWord* %lp, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %lp, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %lp, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %lnormal, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 8
- %15 = getelementptr inbounds %struct.btQuadWord* %lnormal, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %lnormal, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 8
- %21 = getelementptr inbounds %struct.btQuadWord* %lnormal, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = call zeroext i8 @_ZN22SphereTriangleDetector15pointInTriangleEPK9btVector3RS1_PS0_(%struct.SphereTriangleDetector* %this, %struct.btQuadWord* %vertices, %struct.btQuadWord* %lnormal, %struct.btQuadWord* %lp) nounwind ; [#uses=1]
- ret i8 %24
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN22SphereTriangleDetector7collideERK9btVector3RS0_S3_RfS4_f(%struct.SphereTriangleDetector* nocapture %this, %struct.btQuadWord* nocapture %sphereCenter, %struct.btQuadWord* nocapture %point, %struct.btQuadWord* nocapture %resultNormal, float* nocapture %depth, float* nocapture %timeOfImpact, float %contactBreakingThreshold) align 2 {
-entry:
- %lp.i = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %lnormal.i = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pa = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %pb = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 2 ; [#uses=3]
- %1 = load %struct.btTriangleShape** %0, align 4 ; [#uses=12]
- %2 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.SphereTriangleDetector* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btPolyhedralConvexShape** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btPolyhedralConvexShape* %4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btPolyhedralConvexShape* %4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=5]
- %10 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = fsub float %16, %18 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- %24 = fsub float %21, %23 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fsub float %26, %13 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fsub float %29, %18 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fsub float %32, %23 ; [#uses=2]
- %34 = fmul float %33, %19 ; [#uses=1]
- %35 = fmul float %30, %24 ; [#uses=1]
- %36 = fsub float %34, %35 ; [#uses=3]
- %37 = fmul float %27, %24 ; [#uses=1]
- %38 = fmul float %33, %14 ; [#uses=1]
- %39 = fsub float %37, %38 ; [#uses=3]
- %40 = fmul float %30, %14 ; [#uses=1]
- %41 = fmul float %27, %19 ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=3]
- %43 = fmul float %42, %42 ; [#uses=1]
- %44 = fmul float %39, %39 ; [#uses=1]
- %45 = fadd float %43, %44 ; [#uses=1]
- %46 = fmul float %36, %36 ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=1]
- %48 = call float @sqrtf(float %47) nounwind readonly ; [#uses=1]
- %49 = fdiv float 1.000000e+00, %48 ; [#uses=3]
- %50 = fmul float %42, %49 ; [#uses=3]
- %51 = fmul float %39, %49 ; [#uses=3]
- %52 = fmul float %36, %49 ; [#uses=3]
- %53 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 2 ; [#uses=3]
- %54 = load float* %53, align 4 ; [#uses=4]
- %55 = fsub float %54, %13 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 1 ; [#uses=3]
- %57 = load float* %56, align 4 ; [#uses=4]
- %58 = fsub float %57, %18 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 0 ; [#uses=3]
- %60 = load float* %59, align 4 ; [#uses=4]
- %61 = fsub float %60, %23 ; [#uses=1]
- %62 = fmul float %61, %50 ; [#uses=1]
- %63 = fmul float %58, %51 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %55, %52 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=3]
- %67 = fcmp olt float %66, 0.000000e+00 ; [#uses=1]
- br i1 %67, label %bb, label %bb1
-
-bb: ; preds = %entry
- %68 = fsub float -0.000000e+00, %66 ; [#uses=1]
- %69 = fmul float %50, -1.000000e+00 ; [#uses=1]
- %70 = fmul float %51, -1.000000e+00 ; [#uses=1]
- %71 = fmul float %52, -1.000000e+00 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %normal.0.0.0 = phi float [ %69, %bb ], [ %50, %entry ] ; [#uses=3]
- %normal.0.1.0 = phi float [ %70, %bb ], [ %51, %entry ] ; [#uses=3]
- %normal.0.2.0 = phi float [ %71, %bb ], [ %52, %entry ] ; [#uses=3]
- %distanceFromPlane.0 = phi float [ %68, %bb ], [ %66, %entry ] ; [#uses=5]
- %72 = fmul float %normal.0.0.0, 0.000000e+00 ; [#uses=1]
- %73 = fmul float %normal.0.1.0, 0.000000e+00 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = fmul float %normal.0.2.0, 0.000000e+00 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %toBoolnot.not = fcmp olt float %distanceFromPlane.0, %9 ; [#uses=1]
- %77 = fcmp ult float %76, 0.000000e+00 ; [#uses=1]
- %or.cond = or i1 %toBoolnot.not, %77 ; [#uses=1]
- br i1 %or.cond, label %bb7, label %bb37
-
-bb7: ; preds = %bb1
- %78 = fadd float %9, %contactBreakingThreshold ; [#uses=3]
- %79 = fcmp ogt float %78, %distanceFromPlane.0 ; [#uses=1]
- br i1 %79, label %bb9, label %bb37
-
-bb9: ; preds = %bb7
- %80 = getelementptr inbounds %struct.btQuadWord* %lp.i, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %60, float* %80, align 8
- %81 = getelementptr inbounds %struct.btQuadWord* %lp.i, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %57, float* %81, align 4
- %82 = getelementptr inbounds %struct.btQuadWord* %lp.i, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %54, float* %82, align 8
- %83 = getelementptr inbounds %struct.btQuadWord* %lp.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %sphereCenter, i32 0, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btQuadWord* %lnormal.i, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %normal.0.0.0, float* %86, align 8
- %87 = getelementptr inbounds %struct.btQuadWord* %lnormal.i, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %normal.0.1.0, float* %87, align 4
- %88 = getelementptr inbounds %struct.btQuadWord* %lnormal.i, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %normal.0.2.0, float* %88, align 8
- %89 = getelementptr inbounds %struct.btQuadWord* %lnormal.i, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %89, align 4
- %90 = call zeroext i8 @_ZN22SphereTriangleDetector15pointInTriangleEPK9btVector3RS1_PS0_(%struct.SphereTriangleDetector* %this, %struct.btQuadWord* %2, %struct.btQuadWord* %lnormal.i, %struct.btQuadWord* %lp.i) nounwind ; [#uses=1]
- %toBool10 = icmp eq i8 %90, 0 ; [#uses=1]
- br i1 %toBool10, label %bb12, label %bb24.thread80
-
-bb24.thread80: ; preds = %bb9
- %91 = fmul float %normal.0.2.0, %distanceFromPlane.0 ; [#uses=1]
- %92 = fmul float %normal.0.1.0, %distanceFromPlane.0 ; [#uses=1]
- %93 = fmul float %normal.0.0.0, %distanceFromPlane.0 ; [#uses=1]
- %94 = fsub float %54, %91 ; [#uses=1]
- %95 = fsub float %57, %92 ; [#uses=1]
- %96 = fsub float %60, %93 ; [#uses=1]
- br label %bb26
-
-bb12: ; preds = %bb9
- %97 = fmul float %78, %78 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btTriangleShape* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = load i32 (...)*** %98, align 4 ; [#uses=1]
- %100 = getelementptr inbounds i32 (...)** %99, i32 22 ; [#uses=1]
- %101 = load i32 (...)** %100, align 4 ; [#uses=1]
- %102 = bitcast i32 (...)* %101 to i32 (%struct.btTriangleShape*)* ; [#uses=1]
- %103 = call i32 %102(%struct.btTriangleShape* %1) ; [#uses=1]
- %104 = icmp sgt i32 %103, 0 ; [#uses=1]
- br i1 %104, label %bb.nph, label %bb37
-
-bb.nph: ; preds = %bb12
- %105 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb21, %bb.nph
- %111 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb21 ] ; [#uses=2]
- %hasContact.290 = phi i8 [ 0, %bb.nph ], [ %hasContact.1, %bb21 ] ; [#uses=1]
- %contactPoint.0.2.188 = phi float [ undef, %bb.nph ], [ %contactPoint.0.2.0, %bb21 ] ; [#uses=1]
- %contactPoint.0.1.187 = phi float [ undef, %bb.nph ], [ %contactPoint.0.1.0, %bb21 ] ; [#uses=1]
- %contactPoint.0.0.186 = phi float [ undef, %bb.nph ], [ %contactPoint.0.0.0, %bb21 ] ; [#uses=1]
- %tmp = add i32 %111, 1 ; [#uses=2]
- %112 = load %struct.btTriangleShape** %0, align 4 ; [#uses=2]
- %113 = getelementptr inbounds %struct.btTriangleShape* %112, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %114 = load i32 (...)*** %113, align 4 ; [#uses=1]
- %115 = getelementptr inbounds i32 (...)** %114, i32 23 ; [#uses=1]
- %116 = load i32 (...)** %115, align 4 ; [#uses=1]
- %117 = bitcast i32 (...)* %116 to void (%struct.btTriangleShape*, i32, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %117(%struct.btTriangleShape* %112, i32 %111, %struct.btQuadWord* %pa, %struct.btQuadWord* %pb)
- %118 = load float* %53, align 4 ; [#uses=1]
- %119 = load float* %105, align 8 ; [#uses=3]
- %120 = fsub float %118, %119 ; [#uses=4]
- %121 = load float* %56, align 4 ; [#uses=1]
- %122 = load float* %106, align 4 ; [#uses=3]
- %123 = fsub float %121, %122 ; [#uses=4]
- %124 = load float* %59, align 4 ; [#uses=1]
- %125 = load float* %107, align 8 ; [#uses=3]
- %126 = fsub float %124, %125 ; [#uses=4]
- %127 = load float* %108, align 8 ; [#uses=1]
- %128 = fsub float %127, %119 ; [#uses=6]
- %129 = load float* %109, align 4 ; [#uses=1]
- %130 = fsub float %129, %122 ; [#uses=6]
- %131 = load float* %110, align 8 ; [#uses=1]
- %132 = fsub float %131, %125 ; [#uses=6]
- %133 = fmul float %132, %126 ; [#uses=1]
- %134 = fmul float %130, %123 ; [#uses=1]
- %135 = fadd float %133, %134 ; [#uses=1]
- %136 = fmul float %128, %120 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=3]
- %138 = fcmp ogt float %137, 0.000000e+00 ; [#uses=1]
- br i1 %138, label %bb.i, label %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit
-
-bb.i: ; preds = %bb16
- %139 = fmul float %132, %132 ; [#uses=1]
- %140 = fmul float %130, %130 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = fmul float %128, %128 ; [#uses=1]
- %143 = fadd float %141, %142 ; [#uses=2]
- %144 = fcmp olt float %137, %143 ; [#uses=1]
- br i1 %144, label %bb1.i, label %bb2.i
-
-bb1.i: ; preds = %bb.i
- %145 = fdiv float %137, %143 ; [#uses=4]
- %146 = fmul float %128, %145 ; [#uses=1]
- %147 = fmul float %130, %145 ; [#uses=1]
- %148 = fmul float %132, %145 ; [#uses=1]
- %149 = fsub float %126, %148 ; [#uses=1]
- %150 = fsub float %123, %147 ; [#uses=1]
- %151 = fsub float %120, %146 ; [#uses=1]
- br label %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit
-
-bb2.i: ; preds = %bb.i
- %152 = fsub float %126, %132 ; [#uses=1]
- %153 = fsub float %123, %130 ; [#uses=1]
- %154 = fsub float %120, %128 ; [#uses=1]
- br label %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit
-
-_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit: ; preds = %bb2.i, %bb1.i, %bb16
- %diff.0.0.0.i = phi float [ %149, %bb1.i ], [ %152, %bb2.i ], [ %126, %bb16 ] ; [#uses=2]
- %diff.0.1.0.i = phi float [ %150, %bb1.i ], [ %153, %bb2.i ], [ %123, %bb16 ] ; [#uses=2]
- %diff.0.2.0.i = phi float [ %151, %bb1.i ], [ %154, %bb2.i ], [ %120, %bb16 ] ; [#uses=2]
- %t.0.i = phi float [ %145, %bb1.i ], [ 1.000000e+00, %bb2.i ], [ 0.000000e+00, %bb16 ] ; [#uses=3]
- %155 = fmul float %diff.0.0.0.i, %diff.0.0.0.i ; [#uses=1]
- %156 = fmul float %diff.0.1.0.i, %diff.0.1.0.i ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fmul float %diff.0.2.0.i, %diff.0.2.0.i ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fcmp olt float %159, %97 ; [#uses=1]
- br i1 %160, label %bb20, label %bb21
-
-bb20: ; preds = %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit
- %161 = fmul float %132, %t.0.i ; [#uses=1]
- %162 = fmul float %130, %t.0.i ; [#uses=1]
- %163 = fmul float %128, %t.0.i ; [#uses=1]
- %164 = fadd float %125, %161 ; [#uses=1]
- %165 = fadd float %122, %162 ; [#uses=1]
- %166 = fadd float %119, %163 ; [#uses=1]
- br label %bb21
-
-bb21: ; preds = %bb20, %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit
- %contactPoint.0.0.0 = phi float [ %164, %bb20 ], [ %contactPoint.0.0.186, %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit ] ; [#uses=2]
- %contactPoint.0.1.0 = phi float [ %165, %bb20 ], [ %contactPoint.0.1.187, %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit ] ; [#uses=2]
- %contactPoint.0.2.0 = phi float [ %166, %bb20 ], [ %contactPoint.0.2.188, %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit ] ; [#uses=2]
- %hasContact.1 = phi i8 [ 1, %bb20 ], [ %hasContact.290, %_Z18SegmentSqrDistanceRK9btVector3S1_S1_RS_.exit ] ; [#uses=2]
- %167 = load %struct.btTriangleShape** %0, align 4 ; [#uses=2]
- %168 = getelementptr inbounds %struct.btTriangleShape* %167, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %169 = load i32 (...)*** %168, align 4 ; [#uses=1]
- %170 = getelementptr inbounds i32 (...)** %169, i32 22 ; [#uses=1]
- %171 = load i32 (...)** %170, align 4 ; [#uses=1]
- %172 = bitcast i32 (...)* %171 to i32 (%struct.btTriangleShape*)* ; [#uses=1]
- %173 = call i32 %172(%struct.btTriangleShape* %167) ; [#uses=1]
- %174 = icmp sgt i32 %173, %tmp ; [#uses=1]
- br i1 %174, label %bb16, label %bb24
-
-bb24: ; preds = %bb21
- %toBool25 = icmp eq i8 %hasContact.1, 0 ; [#uses=1]
- br i1 %toBool25, label %bb37, label %bb24.bb26_crit_edge
-
-bb24.bb26_crit_edge: ; preds = %bb24
- %.pre = load float* %53, align 4 ; [#uses=1]
- %.pre96 = load float* %56, align 4 ; [#uses=1]
- %.pre97 = load float* %59, align 4 ; [#uses=1]
- br label %bb26
-
-bb26: ; preds = %bb24.bb26_crit_edge, %bb24.thread80
- %175 = phi float [ %60, %bb24.thread80 ], [ %.pre97, %bb24.bb26_crit_edge ] ; [#uses=1]
- %176 = phi float [ %57, %bb24.thread80 ], [ %.pre96, %bb24.bb26_crit_edge ] ; [#uses=1]
- %177 = phi float [ %54, %bb24.thread80 ], [ %.pre, %bb24.bb26_crit_edge ] ; [#uses=1]
- %contactPoint.0.2.284 = phi float [ %94, %bb24.thread80 ], [ %contactPoint.0.2.0, %bb24.bb26_crit_edge ] ; [#uses=3]
- %contactPoint.0.1.283 = phi float [ %95, %bb24.thread80 ], [ %contactPoint.0.1.0, %bb24.bb26_crit_edge ] ; [#uses=3]
- %contactPoint.0.0.282 = phi float [ %96, %bb24.thread80 ], [ %contactPoint.0.0.0, %bb24.bb26_crit_edge ] ; [#uses=3]
- %178 = fsub float %177, %contactPoint.0.2.284 ; [#uses=5]
- %179 = fsub float %176, %contactPoint.0.1.283 ; [#uses=5]
- %180 = fsub float %175, %contactPoint.0.0.282 ; [#uses=5]
- %181 = fmul float %180, %180 ; [#uses=1]
- %182 = fmul float %179, %179 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=1]
- %184 = fmul float %178, %178 ; [#uses=1]
- %185 = fadd float %183, %184 ; [#uses=3]
- %186 = fmul float %9, %9 ; [#uses=1]
- %187 = fcmp ogt float %186, %185 ; [#uses=1]
- br i1 %187, label %bb30, label %bb32
-
-bb30: ; preds = %bb26
- %188 = call float @sqrtf(float %185) nounwind readonly ; [#uses=1]
- %189 = getelementptr inbounds %struct.btQuadWord* %resultNormal, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %180, float* %189, align 4
- %190 = getelementptr inbounds %struct.btQuadWord* %resultNormal, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %179, float* %190, align 4
- %191 = getelementptr inbounds %struct.btQuadWord* %resultNormal, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %178, float* %191, align 4
- %192 = getelementptr inbounds %struct.btQuadWord* %resultNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %192, align 4
- %193 = call float @sqrtf(float %185) nounwind readonly ; [#uses=1]
- %194 = fdiv float 1.000000e+00, %193 ; [#uses=3]
- %195 = fmul float %180, %194 ; [#uses=1]
- store float %195, float* %189, align 4
- %196 = fmul float %179, %194 ; [#uses=1]
- store float %196, float* %190, align 4
- %197 = fmul float %178, %194 ; [#uses=1]
- store float %197, float* %191, align 4
- %198 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %contactPoint.0.0.282, float* %198, align 4
- %199 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %contactPoint.0.1.283, float* %199, align 4
- %200 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %contactPoint.0.2.284, float* %200, align 4
- %201 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %201, align 4
- %202 = fsub float %9, %188 ; [#uses=1]
- %203 = fsub float -0.000000e+00, %202 ; [#uses=1]
- store float %203, float* %depth, align 4
- ret i8 1
-
-bb32: ; preds = %bb26
- %204 = fmul float %180, 0.000000e+00 ; [#uses=1]
- %205 = fmul float %179, 0.000000e+00 ; [#uses=1]
- %206 = fadd float %204, %205 ; [#uses=1]
- %207 = fmul float %178, 0.000000e+00 ; [#uses=1]
- %208 = fadd float %206, %207 ; [#uses=1]
- %209 = fcmp ult float %208, 0.000000e+00 ; [#uses=1]
- br i1 %209, label %bb35, label %bb37
-
-bb35: ; preds = %bb32
- %210 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %contactPoint.0.0.282, float* %210, align 4
- %211 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %contactPoint.0.1.283, float* %211, align 4
- %212 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %contactPoint.0.2.284, float* %212, align 4
- %213 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %213, align 4
- store float 0.000000e+00, float* %timeOfImpact, align 4
- ret i8 1
-
-bb37: ; preds = %bb32, %bb24, %bb12, %bb7, %bb1
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZNK10btBoxShape7getAabbERK11btTransformR9btVector3S4_(%struct.btBoxShape* %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=3]
- %7 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fadd float %8, %6 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fadd float %11, %6 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fadd float %14, %6 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = tail call float @fabsf(float %17) nounwind readnone ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = tail call float @fabsf(float %20) nounwind readnone ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = tail call float @fabsf(float %23) nounwind readnone ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = tail call float @fabsf(float %26) nounwind readnone ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = tail call float @fabsf(float %29) nounwind readnone ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = tail call float @fabsf(float %32) nounwind readnone ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = tail call float @fabsf(float %35) nounwind readnone ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = tail call float @fabsf(float %38) nounwind readnone ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = tail call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=2]
- %49 = fmul float %24, %15 ; [#uses=1]
- %50 = fmul float %21, %12 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fmul float %18, %9 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=2]
- %54 = fmul float %33, %15 ; [#uses=1]
- %55 = fmul float %30, %12 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %27, %9 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=2]
- %59 = fmul float %42, %15 ; [#uses=1]
- %60 = fmul float %39, %12 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %36, %9 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=2]
- %64 = fsub float %48, %53 ; [#uses=1]
- %65 = fsub float %46, %58 ; [#uses=1]
- %66 = fsub float %44, %63 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %66, float* %67, align 4
- %68 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %65, float* %68, align 4
- %69 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %64, float* %69, align 4
- %70 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %70, align 4
- %71 = fadd float %48, %53 ; [#uses=1]
- %72 = fadd float %46, %58 ; [#uses=1]
- %73 = fadd float %44, %63 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %73, float* %74, align 4
- %75 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %75, align 4
- %76 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %71, float* %76, align 4
- %77 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %77, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btBoxShape* %this, %struct.btQuadWord* nocapture %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %11 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %12 = tail call float %11(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %13 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 11 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %17 = tail call float %16(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %18 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 11 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %22 = tail call float %21(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %23 = fadd float %1, %22 ; [#uses=2]
- %24 = fadd float %3, %17 ; [#uses=2]
- %25 = fadd float %5, %12 ; [#uses=2]
- %26 = fsub float -0.000000e+00, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fcmp ult float %28, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i2 = select i1 %29, float %26, float %25 ; [#uses=1]
- %30 = fsub float -0.000000e+00, %24 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fcmp ult float %32, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i1 = select i1 %33, float %30, float %24 ; [#uses=1]
- %34 = fsub float -0.000000e+00, %23 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fcmp ult float %36, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i = select i1 %37, float %34, float %23 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %iftmp.3.0.i, float* %38, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.3.0.i1, float* %39, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.3.0.i2, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btBoxShape* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = fcmp ult float %4, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i2 = select i1 %5, float %2, float %1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fsub float -0.000000e+00, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fcmp ult float %10, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i1 = select i1 %11, float %8, float %7 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float -0.000000e+00, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fcmp ult float %16, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i = select i1 %17, float %14, float %13 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %iftmp.3.0.i, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.3.0.i1, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.3.0.i2, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btBoxShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %16, %bb ] ; [#uses=8]
- %scevgep = getelementptr %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %scevgep78 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %scevgep910 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %1, align 4 ; [#uses=2]
- %5 = fsub float -0.000000e+00, %4 ; [#uses=1]
- %6 = load float* %scevgep, align 4 ; [#uses=1]
- %7 = fcmp ult float %6, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i4 = select i1 %7, float %5, float %4 ; [#uses=1]
- %8 = load float* %2, align 4 ; [#uses=2]
- %9 = fsub float -0.000000e+00, %8 ; [#uses=1]
- %10 = load float* %scevgep6, align 4 ; [#uses=1]
- %11 = fcmp ult float %10, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i3 = select i1 %11, float %9, float %8 ; [#uses=1]
- %12 = load float* %3, align 4 ; [#uses=2]
- %13 = fsub float -0.000000e+00, %12 ; [#uses=1]
- %14 = load float* %scevgep78, align 4 ; [#uses=1]
- %15 = fcmp ult float %14, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i = select i1 %15, float %13, float %12 ; [#uses=1]
- store float %iftmp.3.0.i, float* %scevgep910, align 4
- store float %iftmp.3.0.i3, float* %scevgep11, align 4
- store float %iftmp.3.0.i4, float* %scevgep12, align 4
- store float 0.000000e+00, float* %scevgep13, align 4
- %16 = add nsw i32 %i.05, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %16, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN10btBoxShape9setMarginEf(%struct.btBoxShape* %this, float %collisionMargin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0 ; [#uses=6]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %17 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %collisionMargin, float* %26, align 4
- %27 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 11 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %31 = tail call float %30(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %32 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 11 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %36 = tail call float %35(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %37 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 11 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %41 = tail call float %40(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %42 = fsub float %19, %31 ; [#uses=1]
- %43 = fsub float %22, %36 ; [#uses=1]
- %44 = fsub float %25, %41 ; [#uses=1]
- store float %44, float* %23, align 4
- store float %43, float* %20, align 4
- store float %42, float* %17, align 4
- %45 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape8getPlaneER9btVector3S1_i(%struct.btBoxShape* %this, %struct.btQuadWord* nocapture %planeNormal, %struct.btQuadWord* nocapture %planeSupport, i32 %i) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %plane = alloca %struct.btQuaternion, align 8 ; [#uses=4]
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 28 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to void (%struct.btBoxShape*, %struct.btQuaternion*, i32)* ; [#uses=1]
- call void %5(%struct.btBoxShape* %this, %struct.btQuaternion* %plane, i32 %i)
- %6 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 8 ; [#uses=2]
- %10 = load float* %7, align 4 ; [#uses=2]
- %11 = load float* %6, align 8 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %9, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %10, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 15 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = fsub float -0.000000e+00, %11 ; [#uses=1]
- %20 = fsub float -0.000000e+00, %10 ; [#uses=1]
- %21 = fsub float -0.000000e+00, %9 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %21, float* %22, align 8
- %23 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %20, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %24, align 8
- %25 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = bitcast i32 (...)* %18 to void (%struct.btQuadWord*, %struct.btBoxShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %26(%struct.btQuadWord* noalias sret %memtmp, %struct.btBoxShape* %this, %struct.btQuadWord* %0)
- %27 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 8 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 8 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK10btBoxShape12getNumPlanesEv(%struct.btBoxShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 6
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK10btBoxShape14getNumVerticesEv(%struct.btBoxShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 8
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK10btBoxShape11getNumEdgesEv(%struct.btBoxShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 12
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape9getVertexEiR9btVector3(%struct.btBoxShape* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %vtx) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = lshr i32 %i, 2 ; [#uses=1]
- %B.not = and i32 %6, 1 ; [#uses=2]
- %7 = xor i32 %B.not, 1 ; [#uses=1]
- %8 = sitofp i32 %7 to float ; [#uses=1]
- %9 = fmul float %5, %8 ; [#uses=1]
- %10 = sitofp i32 %B.not to float ; [#uses=1]
- %11 = fmul float %5, %10 ; [#uses=1]
- %12 = fsub float %9, %11 ; [#uses=1]
- %13 = lshr i32 %i, 1 ; [#uses=1]
- %B.not3 = and i32 %13, 1 ; [#uses=2]
- %14 = xor i32 %B.not3, 1 ; [#uses=1]
- %15 = sitofp i32 %14 to float ; [#uses=1]
- %16 = fmul float %3, %15 ; [#uses=1]
- %17 = sitofp i32 %B.not3 to float ; [#uses=1]
- %18 = fmul float %3, %17 ; [#uses=1]
- %19 = fsub float %16, %18 ; [#uses=1]
- %20 = and i32 %i, 1 ; [#uses=2]
- %21 = icmp eq i32 %20, 0 ; [#uses=1]
- %iftmp.133.0 = select i1 %21, float 1.000000e+00, float 0.000000e+00 ; [#uses=1]
- %22 = fmul float %1, %iftmp.133.0 ; [#uses=1]
- %23 = sitofp i32 %20 to float ; [#uses=1]
- %24 = fmul float %1, %23 ; [#uses=1]
- %25 = fsub float %22, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %25, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %12, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape16getPlaneEquationER9btVector4i(%struct.btBoxShape* nocapture %this, %struct.btQuaternion* %plane, i32 %i) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- switch i32 %i, label %return [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- i32 3, label %bb3
- i32 4, label %bb4
- i32 5, label %bb5
- ]
-
-bb: ; preds = %entry
- %6 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %6, float* %10, align 4
- ret void
-
-bb1: ; preds = %entry
- %11 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %11, float* %15, align 4
- ret void
-
-bb2: ; preds = %entry
- %16 = fsub float -0.000000e+00, %3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %16, float* %20, align 4
- ret void
-
-bb3: ; preds = %entry
- %21 = fsub float -0.000000e+00, %3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %21, float* %25, align 4
- ret void
-
-bb4: ; preds = %entry
- %26 = fsub float -0.000000e+00, %5 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %26, float* %30, align 4
- ret void
-
-bb5: ; preds = %entry
- %31 = fsub float -0.000000e+00, %5 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %31, float* %35, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape7getEdgeEiR9btVector3S1_(%struct.btBoxShape* %this, i32 %i, %struct.btQuadWord* %pa, %struct.btQuadWord* %pb) align 2 {
-entry:
- switch i32 %i, label %bb12 [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- i32 3, label %bb3
- i32 4, label %bb4
- i32 5, label %bb5
- i32 6, label %bb6
- i32 7, label %bb7
- i32 8, label %bb8
- i32 9, label %bb9
- i32 10, label %bb10
- i32 11, label %bb11
- ]
-
-bb: ; preds = %entry
- br label %bb12
-
-bb1: ; preds = %entry
- br label %bb12
-
-bb2: ; preds = %entry
- br label %bb12
-
-bb3: ; preds = %entry
- br label %bb12
-
-bb4: ; preds = %entry
- br label %bb12
-
-bb5: ; preds = %entry
- br label %bb12
-
-bb6: ; preds = %entry
- br label %bb12
-
-bb7: ; preds = %entry
- br label %bb12
-
-bb8: ; preds = %entry
- br label %bb12
-
-bb9: ; preds = %entry
- br label %bb12
-
-bb10: ; preds = %entry
- br label %bb12
-
-bb11: ; preds = %entry
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10, %bb9, %bb8, %bb7, %bb6, %bb5, %bb4, %bb3, %bb2, %bb1, %bb, %entry
- %edgeVert0.0 = phi i32 [ 0, %entry ], [ 6, %bb11 ], [ 5, %bb10 ], [ 4, %bb9 ], [ 4, %bb8 ], [ 3, %bb7 ], [ 2, %bb6 ], [ 1, %bb5 ], [ 0, %bb4 ], [ 2, %bb3 ], [ 1, %bb2 ], [ 0, %bb1 ], [ 0, %bb ] ; [#uses=1]
- %edgeVert1.0 = phi i32 [ 0, %entry ], [ 7, %bb11 ], [ 7, %bb10 ], [ 6, %bb9 ], [ 5, %bb8 ], [ 7, %bb7 ], [ 6, %bb6 ], [ 5, %bb5 ], [ 4, %bb4 ], [ 3, %bb3 ], [ 3, %bb2 ], [ 2, %bb1 ], [ 1, %bb ] ; [#uses=1]
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 24 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btBoxShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btBoxShape* %this, i32 %edgeVert0.0, %struct.btQuadWord* %pa)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 24 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btBoxShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %8(%struct.btBoxShape* %this, i32 %edgeVert1.0, %struct.btQuadWord* %pb)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK10btBoxShape8isInsideERK9btVector3f(%struct.btBoxShape* nocapture %this, %struct.btQuadWord* nocapture %pt, float %tolerance) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fadd float %1, %tolerance ; [#uses=1]
- %9 = fcmp ugt float %7, %8 ; [#uses=1]
- br i1 %9, label %bb6, label %bb
-
-bb: ; preds = %entry
- %10 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %11 = fsub float %10, %tolerance ; [#uses=1]
- %12 = fcmp ult float %7, %11 ; [#uses=1]
- br i1 %12, label %bb6, label %bb1
-
-bb1: ; preds = %bb
- %13 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fadd float %3, %tolerance ; [#uses=1]
- %16 = fcmp ugt float %14, %15 ; [#uses=1]
- br i1 %16, label %bb6, label %bb2
-
-bb2: ; preds = %bb1
- %17 = fsub float -0.000000e+00, %3 ; [#uses=1]
- %18 = fsub float %17, %tolerance ; [#uses=1]
- %19 = fcmp ult float %14, %18 ; [#uses=1]
- br i1 %19, label %bb6, label %bb3
-
-bb3: ; preds = %bb2
- %20 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = fadd float %5, %tolerance ; [#uses=1]
- %23 = fcmp ugt float %21, %22 ; [#uses=1]
- br i1 %23, label %bb6, label %bb4
-
-bb4: ; preds = %bb3
- %24 = fsub float -0.000000e+00, %5 ; [#uses=1]
- %25 = fsub float %24, %tolerance ; [#uses=1]
- %not. = fcmp oge float %21, %25 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb6: ; preds = %bb3, %bb2, %bb1, %bb, %entry
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK10btBoxShape7getNameEv(%struct.btBoxShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([4 x i8]* @.str40, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK10btBoxShape36getNumPreferredPenetrationDirectionsEv(%struct.btBoxShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 6
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK10btBoxShape32getPreferredPenetrationDirectionEiR9btVector3(%struct.btBoxShape* nocapture %this, i32 %index, %struct.btQuadWord* %penetrationVector) nounwind align 2 {
-entry:
- switch i32 %index, label %return [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- i32 3, label %bb3
- i32 4, label %bb4
- i32 5, label %bb5
- ]
-
-bb: ; preds = %entry
- %0 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- %4 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- ret void
-
-bb2: ; preds = %entry
- %8 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- ret void
-
-bb3: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- ret void
-
-bb4: ; preds = %entry
- %16 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- ret void
-
-bb5: ; preds = %entry
- %20 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK10btBoxShape21calculateLocalInertiaEfR9btVector3(%struct.btBoxShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %11 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %12 = tail call float %11(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %13 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 11 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %17 = tail call float %16(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %18 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 11 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %22 = tail call float %21(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %23 = fadd float %1, %22 ; [#uses=1]
- %24 = fadd float %3, %17 ; [#uses=1]
- %25 = fadd float %5, %12 ; [#uses=1]
- %26 = fmul float %23, 2.000000e+00 ; [#uses=2]
- %27 = fmul float %24, 2.000000e+00 ; [#uses=2]
- %28 = fmul float %25, 2.000000e+00 ; [#uses=2]
- %29 = fdiv float %mass, 1.200000e+01 ; [#uses=3]
- %30 = fmul float %26, %26 ; [#uses=2]
- %31 = fmul float %27, %27 ; [#uses=2]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %29, %32 ; [#uses=1]
- %34 = fmul float %28, %28 ; [#uses=2]
- %35 = fadd float %30, %34 ; [#uses=1]
- %36 = fmul float %29, %35 ; [#uses=1]
- %37 = fadd float %31, %34 ; [#uses=1]
- %38 = fmul float %29, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %38, float* %39, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %36, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %33, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN10btBoxShape15setLocalScalingERK9btVector3(%struct.btBoxShape* %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0 ; [#uses=4]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %17 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fdiv float %19, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fdiv float %22, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fdiv float %25, %33 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3(%struct.btConvexInternalShape* %4, %struct.btQuadWord* %scaling)
- %35 = load float* %26, align 4 ; [#uses=1]
- %36 = fmul float %28, %35 ; [#uses=1]
- %37 = load float* %29, align 4 ; [#uses=1]
- %38 = fmul float %31, %37 ; [#uses=1]
- %39 = load float* %32, align 4 ; [#uses=1]
- %40 = fmul float %34, %39 ; [#uses=1]
- %41 = fsub float %36, %6 ; [#uses=1]
- %42 = fsub float %38, %11 ; [#uses=1]
- %43 = fsub float %40, %16 ; [#uses=1]
- store float %43, float* %23, align 4
- store float %42, float* %20, align 4
- store float %41, float* %17, align 4
- %44 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN10btBoxShapeD0Ev(%struct.btBoxShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btBoxShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN10btBoxShapeD1Ev(%struct.btBoxShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBoxShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK12btBox2dShape7getAabbERK11btTransformR9btVector3S4_(%struct.btBox2dShape* %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=3]
- %7 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fadd float %8, %6 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fadd float %11, %6 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fadd float %14, %6 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = tail call float @fabsf(float %17) nounwind readnone ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = tail call float @fabsf(float %20) nounwind readnone ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = tail call float @fabsf(float %23) nounwind readnone ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = tail call float @fabsf(float %26) nounwind readnone ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = tail call float @fabsf(float %29) nounwind readnone ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = tail call float @fabsf(float %32) nounwind readnone ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = tail call float @fabsf(float %35) nounwind readnone ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = tail call float @fabsf(float %38) nounwind readnone ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = tail call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=2]
- %49 = fmul float %24, %15 ; [#uses=1]
- %50 = fmul float %21, %12 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fmul float %18, %9 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=2]
- %54 = fmul float %33, %15 ; [#uses=1]
- %55 = fmul float %30, %12 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %27, %9 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=2]
- %59 = fmul float %42, %15 ; [#uses=1]
- %60 = fmul float %39, %12 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %36, %9 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=2]
- %64 = fsub float %48, %53 ; [#uses=1]
- %65 = fsub float %46, %58 ; [#uses=1]
- %66 = fsub float %44, %63 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %66, float* %67, align 4
- %68 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %65, float* %68, align 4
- %69 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %64, float* %69, align 4
- %70 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %70, align 4
- %71 = fadd float %48, %53 ; [#uses=1]
- %72 = fadd float %46, %58 ; [#uses=1]
- %73 = fadd float %44, %63 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %73, float* %74, align 4
- %75 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %75, align 4
- %76 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %71, float* %76, align 4
- %77 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %77, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btBox2dShape* %this, %struct.btQuadWord* nocapture %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %11 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %12 = tail call float %11(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %13 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 11 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %17 = tail call float %16(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %18 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 11 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %22 = tail call float %21(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %23 = fadd float %1, %22 ; [#uses=2]
- %24 = fadd float %3, %17 ; [#uses=2]
- %25 = fadd float %5, %12 ; [#uses=2]
- %26 = fsub float -0.000000e+00, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fcmp ult float %28, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i2 = select i1 %29, float %26, float %25 ; [#uses=1]
- %30 = fsub float -0.000000e+00, %24 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fcmp ult float %32, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i1 = select i1 %33, float %30, float %24 ; [#uses=1]
- %34 = fsub float -0.000000e+00, %23 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fcmp ult float %36, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i = select i1 %37, float %34, float %23 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %iftmp.3.0.i, float* %38, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.3.0.i1, float* %39, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.3.0.i2, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btBox2dShape* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = fcmp ult float %4, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i2 = select i1 %5, float %2, float %1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fsub float -0.000000e+00, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fcmp ult float %10, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i1 = select i1 %11, float %8, float %7 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float -0.000000e+00, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fcmp ult float %16, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i = select i1 %17, float %14, float %13 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %iftmp.3.0.i, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.3.0.i1, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.3.0.i2, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btBox2dShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %16, %bb ] ; [#uses=8]
- %scevgep = getelementptr %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %scevgep78 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %scevgep910 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %1, align 4 ; [#uses=2]
- %5 = fsub float -0.000000e+00, %4 ; [#uses=1]
- %6 = load float* %scevgep, align 4 ; [#uses=1]
- %7 = fcmp ult float %6, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i4 = select i1 %7, float %5, float %4 ; [#uses=1]
- %8 = load float* %2, align 4 ; [#uses=2]
- %9 = fsub float -0.000000e+00, %8 ; [#uses=1]
- %10 = load float* %scevgep6, align 4 ; [#uses=1]
- %11 = fcmp ult float %10, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i3 = select i1 %11, float %9, float %8 ; [#uses=1]
- %12 = load float* %3, align 4 ; [#uses=2]
- %13 = fsub float -0.000000e+00, %12 ; [#uses=1]
- %14 = load float* %scevgep78, align 4 ; [#uses=1]
- %15 = fcmp ult float %14, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i = select i1 %15, float %13, float %12 ; [#uses=1]
- store float %iftmp.3.0.i, float* %scevgep910, align 4
- store float %iftmp.3.0.i3, float* %scevgep11, align 4
- store float %iftmp.3.0.i4, float* %scevgep12, align 4
- store float 0.000000e+00, float* %scevgep13, align 4
- %16 = add nsw i32 %i.05, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %16, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btBox2dShape9setMarginEf(%struct.btBox2dShape* %this, float %collisionMargin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0 ; [#uses=6]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %17 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %collisionMargin, float* %26, align 4
- %27 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 11 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %31 = tail call float %30(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %32 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 11 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %36 = tail call float %35(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %37 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 11 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %41 = tail call float %40(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %42 = fsub float %19, %31 ; [#uses=1]
- %43 = fsub float %22, %36 ; [#uses=1]
- %44 = fsub float %25, %41 ; [#uses=1]
- store float %44, float* %23, align 4
- store float %43, float* %20, align 4
- store float %42, float* %17, align 4
- %45 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK12btBox2dShape14getNumVerticesEv(%struct.btBox2dShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 4
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape8getPlaneER9btVector3S1_i(%struct.btBox2dShape* %this, %struct.btQuadWord* nocapture %planeNormal, %struct.btQuadWord* nocapture %planeSupport, i32 %i) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %plane = alloca %struct.btQuaternion, align 8 ; [#uses=4]
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 28 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to void (%struct.btBox2dShape*, %struct.btQuaternion*, i32)* ; [#uses=1]
- call void %5(%struct.btBox2dShape* %this, %struct.btQuaternion* %plane, i32 %i)
- %6 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 8 ; [#uses=2]
- %10 = load float* %7, align 4 ; [#uses=2]
- %11 = load float* %6, align 8 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %9, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %10, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 15 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = fsub float -0.000000e+00, %11 ; [#uses=1]
- %20 = fsub float -0.000000e+00, %10 ; [#uses=1]
- %21 = fsub float -0.000000e+00, %9 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %21, float* %22, align 8
- %23 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %20, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %24, align 8
- %25 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = bitcast i32 (...)* %18 to void (%struct.btQuadWord*, %struct.btBox2dShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %26(%struct.btQuadWord* noalias sret %memtmp, %struct.btBox2dShape* %this, %struct.btQuadWord* %0)
- %27 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 8 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 8 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %planeSupport, i32 0, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK12btBox2dShape12getNumPlanesEv(%struct.btBox2dShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 6
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK12btBox2dShape11getNumEdgesEv(%struct.btBox2dShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 12
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape9getVertexEiR9btVector3(%struct.btBox2dShape* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %vtx) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = lshr i32 %i, 2 ; [#uses=1]
- %B.not = and i32 %6, 1 ; [#uses=2]
- %7 = xor i32 %B.not, 1 ; [#uses=1]
- %8 = sitofp i32 %7 to float ; [#uses=1]
- %9 = fmul float %5, %8 ; [#uses=1]
- %10 = sitofp i32 %B.not to float ; [#uses=1]
- %11 = fmul float %5, %10 ; [#uses=1]
- %12 = fsub float %9, %11 ; [#uses=1]
- %13 = lshr i32 %i, 1 ; [#uses=1]
- %B.not3 = and i32 %13, 1 ; [#uses=2]
- %14 = xor i32 %B.not3, 1 ; [#uses=1]
- %15 = sitofp i32 %14 to float ; [#uses=1]
- %16 = fmul float %3, %15 ; [#uses=1]
- %17 = sitofp i32 %B.not3 to float ; [#uses=1]
- %18 = fmul float %3, %17 ; [#uses=1]
- %19 = fsub float %16, %18 ; [#uses=1]
- %20 = and i32 %i, 1 ; [#uses=2]
- %21 = icmp eq i32 %20, 0 ; [#uses=1]
- %iftmp.135.0 = select i1 %21, float 1.000000e+00, float 0.000000e+00 ; [#uses=1]
- %22 = fmul float %1, %iftmp.135.0 ; [#uses=1]
- %23 = sitofp i32 %20 to float ; [#uses=1]
- %24 = fmul float %1, %23 ; [#uses=1]
- %25 = fsub float %22, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %25, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %12, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape16getPlaneEquationER9btVector4i(%struct.btBox2dShape* nocapture %this, %struct.btQuaternion* %plane, i32 %i) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- switch i32 %i, label %return [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- i32 3, label %bb3
- i32 4, label %bb4
- i32 5, label %bb5
- ]
-
-bb: ; preds = %entry
- %6 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %6, float* %10, align 4
- ret void
-
-bb1: ; preds = %entry
- %11 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %11, float* %15, align 4
- ret void
-
-bb2: ; preds = %entry
- %16 = fsub float -0.000000e+00, %3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %16, float* %20, align 4
- ret void
-
-bb3: ; preds = %entry
- %21 = fsub float -0.000000e+00, %3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %21, float* %25, align 4
- ret void
-
-bb4: ; preds = %entry
- %26 = fsub float -0.000000e+00, %5 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %26, float* %30, align 4
- ret void
-
-bb5: ; preds = %entry
- %31 = fsub float -0.000000e+00, %5 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %31, float* %35, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape7getEdgeEiR9btVector3S1_(%struct.btBox2dShape* %this, i32 %i, %struct.btQuadWord* %pa, %struct.btQuadWord* %pb) align 2 {
-entry:
- switch i32 %i, label %bb12 [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- i32 3, label %bb3
- i32 4, label %bb4
- i32 5, label %bb5
- i32 6, label %bb6
- i32 7, label %bb7
- i32 8, label %bb8
- i32 9, label %bb9
- i32 10, label %bb10
- i32 11, label %bb11
- ]
-
-bb: ; preds = %entry
- br label %bb12
-
-bb1: ; preds = %entry
- br label %bb12
-
-bb2: ; preds = %entry
- br label %bb12
-
-bb3: ; preds = %entry
- br label %bb12
-
-bb4: ; preds = %entry
- br label %bb12
-
-bb5: ; preds = %entry
- br label %bb12
-
-bb6: ; preds = %entry
- br label %bb12
-
-bb7: ; preds = %entry
- br label %bb12
-
-bb8: ; preds = %entry
- br label %bb12
-
-bb9: ; preds = %entry
- br label %bb12
-
-bb10: ; preds = %entry
- br label %bb12
-
-bb11: ; preds = %entry
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10, %bb9, %bb8, %bb7, %bb6, %bb5, %bb4, %bb3, %bb2, %bb1, %bb, %entry
- %edgeVert0.0 = phi i32 [ 0, %entry ], [ 6, %bb11 ], [ 5, %bb10 ], [ 4, %bb9 ], [ 4, %bb8 ], [ 3, %bb7 ], [ 2, %bb6 ], [ 1, %bb5 ], [ 0, %bb4 ], [ 2, %bb3 ], [ 1, %bb2 ], [ 0, %bb1 ], [ 0, %bb ] ; [#uses=1]
- %edgeVert1.0 = phi i32 [ 0, %entry ], [ 7, %bb11 ], [ 7, %bb10 ], [ 6, %bb9 ], [ 5, %bb8 ], [ 7, %bb7 ], [ 6, %bb6 ], [ 5, %bb5 ], [ 4, %bb4 ], [ 3, %bb3 ], [ 3, %bb2 ], [ 2, %bb1 ], [ 1, %bb ] ; [#uses=1]
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 24 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btBox2dShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btBox2dShape* %this, i32 %edgeVert0.0, %struct.btQuadWord* %pa)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 24 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btBox2dShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %8(%struct.btBox2dShape* %this, i32 %edgeVert1.0, %struct.btQuadWord* %pb)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK12btBox2dShape8isInsideERK9btVector3f(%struct.btBox2dShape* nocapture %this, %struct.btQuadWord* nocapture %pt, float %tolerance) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fadd float %1, %tolerance ; [#uses=1]
- %9 = fcmp ugt float %7, %8 ; [#uses=1]
- br i1 %9, label %bb6, label %bb
-
-bb: ; preds = %entry
- %10 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %11 = fsub float %10, %tolerance ; [#uses=1]
- %12 = fcmp ult float %7, %11 ; [#uses=1]
- br i1 %12, label %bb6, label %bb1
-
-bb1: ; preds = %bb
- %13 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fadd float %3, %tolerance ; [#uses=1]
- %16 = fcmp ugt float %14, %15 ; [#uses=1]
- br i1 %16, label %bb6, label %bb2
-
-bb2: ; preds = %bb1
- %17 = fsub float -0.000000e+00, %3 ; [#uses=1]
- %18 = fsub float %17, %tolerance ; [#uses=1]
- %19 = fcmp ult float %14, %18 ; [#uses=1]
- br i1 %19, label %bb6, label %bb3
-
-bb3: ; preds = %bb2
- %20 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = fadd float %5, %tolerance ; [#uses=1]
- %23 = fcmp ugt float %21, %22 ; [#uses=1]
- br i1 %23, label %bb6, label %bb4
-
-bb4: ; preds = %bb3
- %24 = fsub float -0.000000e+00, %5 ; [#uses=1]
- %25 = fsub float %24, %tolerance ; [#uses=1]
- %not. = fcmp oge float %21, %25 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb6: ; preds = %bb3, %bb2, %bb1, %bb, %entry
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK12btBox2dShape7getNameEv(%struct.btBox2dShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([6 x i8]* @.str42, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK12btBox2dShape36getNumPreferredPenetrationDirectionsEv(%struct.btBox2dShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 6
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btBox2dShape32getPreferredPenetrationDirectionEiR9btVector3(%struct.btBox2dShape* nocapture %this, i32 %index, %struct.btQuadWord* %penetrationVector) nounwind align 2 {
-entry:
- switch i32 %index, label %return [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- i32 3, label %bb3
- i32 4, label %bb4
- i32 5, label %bb5
- ]
-
-bb: ; preds = %entry
- %0 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- %4 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- ret void
-
-bb2: ; preds = %entry
- %8 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- ret void
-
-bb3: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- ret void
-
-bb4: ; preds = %entry
- %16 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- ret void
-
-bb5: ; preds = %entry
- %20 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %penetrationVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK12btBox2dShape21calculateLocalInertiaEfR9btVector3(%struct.btBox2dShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %11 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %12 = tail call float %11(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %13 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 11 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %17 = tail call float %16(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %18 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 11 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %22 = tail call float %21(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %23 = fadd float %1, %22 ; [#uses=1]
- %24 = fadd float %3, %17 ; [#uses=1]
- %25 = fadd float %5, %12 ; [#uses=1]
- %26 = fmul float %23, 2.000000e+00 ; [#uses=2]
- %27 = fmul float %24, 2.000000e+00 ; [#uses=2]
- %28 = fmul float %25, 2.000000e+00 ; [#uses=2]
- %29 = fdiv float %mass, 1.200000e+01 ; [#uses=3]
- %30 = fmul float %26, %26 ; [#uses=2]
- %31 = fmul float %27, %27 ; [#uses=2]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %29, %32 ; [#uses=1]
- %34 = fmul float %28, %28 ; [#uses=2]
- %35 = fadd float %30, %34 ; [#uses=1]
- %36 = fmul float %29, %35 ; [#uses=1]
- %37 = fadd float %31, %34 ; [#uses=1]
- %38 = fmul float %29, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %38, float* %39, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %36, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %33, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btBox2dShape15setLocalScalingERK9btVector3(%struct.btBox2dShape* %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0 ; [#uses=4]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %17 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fdiv float %19, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fdiv float %22, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fdiv float %25, %33 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3(%struct.btConvexInternalShape* %4, %struct.btQuadWord* %scaling)
- %35 = load float* %26, align 4 ; [#uses=1]
- %36 = fmul float %28, %35 ; [#uses=1]
- %37 = load float* %29, align 4 ; [#uses=1]
- %38 = fmul float %31, %37 ; [#uses=1]
- %39 = load float* %32, align 4 ; [#uses=1]
- %40 = fmul float %34, %39 ; [#uses=1]
- %41 = fsub float %36, %6 ; [#uses=1]
- %42 = fsub float %38, %11 ; [#uses=1]
- %43 = fsub float %40, %16 ; [#uses=1]
- store float %43, float* %23, align 4
- store float %42, float* %20, align 4
- store float %41, float* %17, align 4
- %44 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btBox2dShapeD0Ev(%struct.btBox2dShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btBox2dShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btBox2dShapeD1Ev(%struct.btBox2dShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBox2dShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN22btBvhTriangleMeshShapeC2EP23btStridingMeshInterfacebb(%struct.btBvhTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %useQuantizedAabbCompression, i8 zeroext %buildBvh) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN19btTriangleMeshShapeC2EP23btStridingMeshInterface(%struct.btTriangleMeshShape* %0, %struct.btStridingMeshInterface* %meshInterface)
- %1 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([22 x i32 (...)*]* @_ZTV22btBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btOptimizedBvh* null, %struct.btOptimizedBvh** %2, align 4
- %3 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btTriangleInfoMap* null, %struct.btTriangleInfoMap** %3, align 4
- %4 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %useQuantizedAabbCompression, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %5, align 1
- %6 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 21, i32* %6, align 4
- %toBool = icmp eq i8 %buildBvh, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- invoke void @_ZN22btBvhTriangleMeshShape17buildOptimizedBvhEv(%struct.btBvhTriangleMeshShape* %this)
- to label %return unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb, %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %0)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZNK14btConcaveShape9getMarginEv(%struct.btConcaveShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btConcaveShape9setMarginEf(%struct.btConcaveShape* nocapture %this, float %collisionMargin) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 1 ; [#uses=1]
- store float %collisionMargin, float* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK19btTriangleMeshShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btQuadWord* noalias sret %agg.result, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK22btBvhTriangleMeshShape7getNameEv(%struct.btBvhTriangleMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([16 x i8]* @.str44, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK22btBvhTriangleMeshShape28calculateSerializeBufferSizeEv(%struct.btBvhTriangleMeshShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 60
-}
-
-; [#uses=1]
-define void @_ZZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD1Ev(%struct..0MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD0Ev(%struct..0MyNodeOverlapCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0MyNodeOverlapCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallback11processNodeEii(%struct..0MyNodeOverlapCallback* nocapture %this, i32 %nodeSubPart, i32 %nodeTriangleIndex) align 2 {
-bb.nph:
- %m_triangle = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=5]
- %vertexbase = alloca i8*, align 4 ; [#uses=2]
- %numverts = alloca i32, align 4 ; [#uses=1]
- %type = alloca i32, align 4 ; [#uses=2]
- %stride = alloca i32, align 4 ; [#uses=2]
- %indexbase = alloca i8*, align 4 ; [#uses=2]
- %indexstride = alloca i32, align 4 ; [#uses=2]
- %numfaces = alloca i32, align 4 ; [#uses=1]
- %indicestype = alloca i32, align 4 ; [#uses=2]
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %6(%struct.btStridingMeshInterface* %1, i8** %vertexbase, i32* %numverts, i32* %type, i32* %stride, i8** %indexbase, i32* %indexstride, i32* %numfaces, i32* %indicestype, i32 %nodeSubPart)
- %7 = load i8** %indexbase, align 4 ; [#uses=2]
- %8 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=3]
- %9 = load i32* %indexstride, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %tmp26 = mul i32 %9, %nodeTriangleIndex ; [#uses=2]
- %tmp27 = add i32 %tmp26, 4 ; [#uses=1]
- %tmp31 = add i32 %tmp26, 8 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=4]
- %tmp36 = sub i32 2, %indvar ; [#uses=4]
- %scevgep3738 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 0 ; [#uses=1]
- %scevgep39 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 1 ; [#uses=1]
- %scevgep40 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 2 ; [#uses=1]
- %scevgep41 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 3 ; [#uses=1]
- %13 = load i32* %indicestype, align 4 ; [#uses=1]
- %14 = icmp eq i32 %13, 3 ; [#uses=1]
- br i1 %14, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %tmp = mul i32 %indvar, -2 ; [#uses=1]
- %tmp28 = add i32 %tmp27, %tmp ; [#uses=1]
- %scevgep = getelementptr i8* %7, i32 %tmp28 ; [#uses=1]
- %scevgep29 = bitcast i8* %scevgep to i16* ; [#uses=1]
- %15 = load i16* %scevgep29, align 2 ; [#uses=1]
- %16 = zext i16 %15 to i32 ; [#uses=1]
- br label %bb6
-
-bb5: ; preds = %bb3
- %tmp30 = mul i32 %indvar, -4 ; [#uses=1]
- %tmp32 = add i32 %tmp31, %tmp30 ; [#uses=1]
- %scevgep33 = getelementptr i8* %7, i32 %tmp32 ; [#uses=1]
- %scevgep3334 = bitcast i8* %scevgep33 to i32* ; [#uses=1]
- %17 = load i32* %scevgep3334, align 4 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %iftmp.220.0 = phi i32 [ %16, %bb4 ], [ %17, %bb5 ] ; [#uses=1]
- %18 = load i32* %type, align 4 ; [#uses=1]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- %20 = load i8** %vertexbase, align 4 ; [#uses=5]
- %21 = load i32* %stride, align 4 ; [#uses=1]
- %22 = mul nsw i32 %21, %iftmp.220.0 ; [#uses=5]
- %23 = getelementptr inbounds i8* %20, i32 %22 ; [#uses=2]
- br i1 %19, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- %24 = bitcast i8* %23 to float* ; [#uses=1]
- %.sum15 = add i32 %22, 8 ; [#uses=1]
- %25 = getelementptr inbounds i8* %20, i32 %.sum15 ; [#uses=1]
- %26 = bitcast i8* %25 to float* ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = load float* %10, align 4 ; [#uses=1]
- %29 = fmul float %27, %28 ; [#uses=1]
- %.sum16 = add i32 %22, 4 ; [#uses=1]
- %30 = getelementptr inbounds i8* %20, i32 %.sum16 ; [#uses=1]
- %31 = bitcast i8* %30 to float* ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = load float* %11, align 4 ; [#uses=1]
- %34 = fmul float %32, %33 ; [#uses=1]
- %35 = load float* %24, align 4 ; [#uses=1]
- %36 = load float* %12, align 4 ; [#uses=1]
- %37 = fmul float %35, %36 ; [#uses=1]
- br label %bb10
-
-bb8: ; preds = %bb6
- %38 = bitcast i8* %23 to double* ; [#uses=1]
- %.sum = add i32 %22, 16 ; [#uses=1]
- %39 = getelementptr inbounds i8* %20, i32 %.sum ; [#uses=1]
- %40 = bitcast i8* %39 to double* ; [#uses=1]
- %41 = load double* %40, align 4 ; [#uses=1]
- %42 = fptrunc double %41 to float ; [#uses=1]
- %43 = load float* %10, align 4 ; [#uses=1]
- %44 = fmul float %42, %43 ; [#uses=1]
- %.sum14 = add i32 %22, 8 ; [#uses=1]
- %45 = getelementptr inbounds i8* %20, i32 %.sum14 ; [#uses=1]
- %46 = bitcast i8* %45 to double* ; [#uses=1]
- %47 = load double* %46, align 4 ; [#uses=1]
- %48 = fptrunc double %47 to float ; [#uses=1]
- %49 = load float* %11, align 4 ; [#uses=1]
- %50 = fmul float %48, %49 ; [#uses=1]
- %51 = load double* %38, align 4 ; [#uses=1]
- %52 = fptrunc double %51 to float ; [#uses=1]
- %53 = load float* %12, align 4 ; [#uses=1]
- %54 = fmul float %52, %53 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %storemerge46 = phi float [ %37, %bb7 ], [ %54, %bb8 ] ; [#uses=1]
- %storemerge45 = phi float [ %34, %bb7 ], [ %50, %bb8 ] ; [#uses=1]
- %storemerge = phi float [ %29, %bb7 ], [ %44, %bb8 ] ; [#uses=1]
- store float %storemerge46, float* %scevgep3738, align 8
- store float %storemerge45, float* %scevgep39, align 4
- store float %storemerge, float* %scevgep40, align 8
- store float 0.000000e+00, float* %scevgep41, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb3
-
-bb12: ; preds = %bb10
- %55 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 2 ; [#uses=1]
- %56 = load %struct.btActionInterface** %55, align 4 ; [#uses=2]
- %57 = getelementptr inbounds %struct.btActionInterface* %56, i32 0, i32 0 ; [#uses=1]
- %58 = load i32 (...)*** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 2 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- %62 = getelementptr inbounds [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 0 ; [#uses=1]
- call void %61(%struct.btActionInterface* %56, %struct.btQuadWord* %62, i32 %nodeSubPart, i32 %nodeTriangleIndex)
- %63 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=2]
- %64 = getelementptr inbounds %struct.btStridingMeshInterface* %63, i32 0, i32 0 ; [#uses=1]
- %65 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds i32 (...)** %65, i32 6 ; [#uses=1]
- %67 = load i32 (...)** %66, align 4 ; [#uses=1]
- %68 = bitcast i32 (...)* %67 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- call void %68(%struct.btStridingMeshInterface* %63, i32 %nodeSubPart)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_EN21MyNodeOverlapCallbackD1Ev(%struct..0MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_EN21MyNodeOverlapCallbackD0Ev(%struct..0MyNodeOverlapCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0MyNodeOverlapCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_EN21MyNodeOverlapCallback11processNodeEii(%struct..0MyNodeOverlapCallback* nocapture %this, i32 %nodeSubPart, i32 %nodeTriangleIndex) align 2 {
-bb.nph:
- %m_triangle = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=5]
- %vertexbase = alloca i8*, align 4 ; [#uses=2]
- %numverts = alloca i32, align 4 ; [#uses=1]
- %type = alloca i32, align 4 ; [#uses=2]
- %stride = alloca i32, align 4 ; [#uses=2]
- %indexbase = alloca i8*, align 4 ; [#uses=2]
- %indexstride = alloca i32, align 4 ; [#uses=2]
- %numfaces = alloca i32, align 4 ; [#uses=1]
- %indicestype = alloca i32, align 4 ; [#uses=2]
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %6(%struct.btStridingMeshInterface* %1, i8** %vertexbase, i32* %numverts, i32* %type, i32* %stride, i8** %indexbase, i32* %indexstride, i32* %numfaces, i32* %indicestype, i32 %nodeSubPart)
- %7 = load i8** %indexbase, align 4 ; [#uses=2]
- %8 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=3]
- %9 = load i32* %indexstride, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %tmp26 = mul i32 %9, %nodeTriangleIndex ; [#uses=2]
- %tmp27 = add i32 %tmp26, 4 ; [#uses=1]
- %tmp31 = add i32 %tmp26, 8 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=4]
- %tmp36 = sub i32 2, %indvar ; [#uses=4]
- %scevgep3738 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 0 ; [#uses=1]
- %scevgep39 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 1 ; [#uses=1]
- %scevgep40 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 2 ; [#uses=1]
- %scevgep41 = getelementptr [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 %tmp36, i32 0, i32 3 ; [#uses=1]
- %13 = load i32* %indicestype, align 4 ; [#uses=1]
- %14 = icmp eq i32 %13, 3 ; [#uses=1]
- br i1 %14, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %tmp = mul i32 %indvar, -2 ; [#uses=1]
- %tmp28 = add i32 %tmp27, %tmp ; [#uses=1]
- %scevgep = getelementptr i8* %7, i32 %tmp28 ; [#uses=1]
- %scevgep29 = bitcast i8* %scevgep to i16* ; [#uses=1]
- %15 = load i16* %scevgep29, align 2 ; [#uses=1]
- %16 = zext i16 %15 to i32 ; [#uses=1]
- br label %bb6
-
-bb5: ; preds = %bb3
- %tmp30 = mul i32 %indvar, -4 ; [#uses=1]
- %tmp32 = add i32 %tmp31, %tmp30 ; [#uses=1]
- %scevgep33 = getelementptr i8* %7, i32 %tmp32 ; [#uses=1]
- %scevgep3334 = bitcast i8* %scevgep33 to i32* ; [#uses=1]
- %17 = load i32* %scevgep3334, align 4 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %iftmp.234.0 = phi i32 [ %16, %bb4 ], [ %17, %bb5 ] ; [#uses=1]
- %18 = load i32* %type, align 4 ; [#uses=1]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- %20 = load i8** %vertexbase, align 4 ; [#uses=5]
- %21 = load i32* %stride, align 4 ; [#uses=1]
- %22 = mul nsw i32 %21, %iftmp.234.0 ; [#uses=5]
- %23 = getelementptr inbounds i8* %20, i32 %22 ; [#uses=2]
- br i1 %19, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- %24 = bitcast i8* %23 to float* ; [#uses=1]
- %.sum15 = add i32 %22, 8 ; [#uses=1]
- %25 = getelementptr inbounds i8* %20, i32 %.sum15 ; [#uses=1]
- %26 = bitcast i8* %25 to float* ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = load float* %10, align 4 ; [#uses=1]
- %29 = fmul float %27, %28 ; [#uses=1]
- %.sum16 = add i32 %22, 4 ; [#uses=1]
- %30 = getelementptr inbounds i8* %20, i32 %.sum16 ; [#uses=1]
- %31 = bitcast i8* %30 to float* ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = load float* %11, align 4 ; [#uses=1]
- %34 = fmul float %32, %33 ; [#uses=1]
- %35 = load float* %24, align 4 ; [#uses=1]
- %36 = load float* %12, align 4 ; [#uses=1]
- %37 = fmul float %35, %36 ; [#uses=1]
- br label %bb10
-
-bb8: ; preds = %bb6
- %38 = bitcast i8* %23 to double* ; [#uses=1]
- %.sum = add i32 %22, 16 ; [#uses=1]
- %39 = getelementptr inbounds i8* %20, i32 %.sum ; [#uses=1]
- %40 = bitcast i8* %39 to double* ; [#uses=1]
- %41 = load double* %40, align 4 ; [#uses=1]
- %42 = fptrunc double %41 to float ; [#uses=1]
- %43 = load float* %10, align 4 ; [#uses=1]
- %44 = fmul float %42, %43 ; [#uses=1]
- %.sum14 = add i32 %22, 8 ; [#uses=1]
- %45 = getelementptr inbounds i8* %20, i32 %.sum14 ; [#uses=1]
- %46 = bitcast i8* %45 to double* ; [#uses=1]
- %47 = load double* %46, align 4 ; [#uses=1]
- %48 = fptrunc double %47 to float ; [#uses=1]
- %49 = load float* %11, align 4 ; [#uses=1]
- %50 = fmul float %48, %49 ; [#uses=1]
- %51 = load double* %38, align 4 ; [#uses=1]
- %52 = fptrunc double %51 to float ; [#uses=1]
- %53 = load float* %12, align 4 ; [#uses=1]
- %54 = fmul float %52, %53 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %storemerge46 = phi float [ %37, %bb7 ], [ %54, %bb8 ] ; [#uses=1]
- %storemerge45 = phi float [ %34, %bb7 ], [ %50, %bb8 ] ; [#uses=1]
- %storemerge = phi float [ %29, %bb7 ], [ %44, %bb8 ] ; [#uses=1]
- store float %storemerge46, float* %scevgep3738, align 8
- store float %storemerge45, float* %scevgep39, align 4
- store float %storemerge, float* %scevgep40, align 8
- store float 0.000000e+00, float* %scevgep41, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb3
-
-bb12: ; preds = %bb10
- %55 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 2 ; [#uses=1]
- %56 = load %struct.btActionInterface** %55, align 4 ; [#uses=2]
- %57 = getelementptr inbounds %struct.btActionInterface* %56, i32 0, i32 0 ; [#uses=1]
- %58 = load i32 (...)*** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 2 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- %62 = getelementptr inbounds [3 x %struct.btQuadWord]* %m_triangle, i32 0, i32 0 ; [#uses=1]
- call void %61(%struct.btActionInterface* %56, %struct.btQuadWord* %62, i32 %nodeSubPart, i32 %nodeTriangleIndex)
- %63 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=2]
- %64 = getelementptr inbounds %struct.btStridingMeshInterface* %63, i32 0, i32 0 ; [#uses=1]
- %65 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds i32 (...)** %65, i32 6 ; [#uses=1]
- %67 = load i32 (...)** %66, align 4 ; [#uses=1]
- %68 = bitcast i32 (...)* %67 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- call void %68(%struct.btStridingMeshInterface* %63, i32 %nodeSubPart)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD1Ev(%struct..2MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD0Ev(%struct..2MyNodeOverlapCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..2MyNodeOverlapCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallback11processNodeEii(%struct..2MyNodeOverlapCallback* %this, i32 %nodeSubPart, i32 %nodeTriangleIndex) align 2 {
-bb.nph:
- %vertexbase = alloca i8*, align 4 ; [#uses=2]
- %numverts = alloca i32, align 4 ; [#uses=1]
- %type = alloca i32, align 4 ; [#uses=2]
- %stride = alloca i32, align 4 ; [#uses=2]
- %indexbase = alloca i8*, align 4 ; [#uses=2]
- %indexstride = alloca i32, align 4 ; [#uses=2]
- %numfaces = alloca i32, align 4 ; [#uses=1]
- %indicestype = alloca i32, align 4 ; [#uses=2]
- %0 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 4 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %6(%struct.btStridingMeshInterface* %1, i8** %vertexbase, i32* %numverts, i32* %type, i32* %stride, i8** %indexbase, i32* %indexstride, i32* %numfaces, i32* %indicestype, i32 %nodeSubPart)
- %7 = load i8** %indexbase, align 4 ; [#uses=2]
- %8 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=3]
- %9 = load i32* %indexstride, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btStridingMeshInterface* %8, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %tmp22 = mul i32 %9, %nodeTriangleIndex ; [#uses=2]
- %tmp23 = add i32 %tmp22, 4 ; [#uses=1]
- %tmp27 = add i32 %tmp22, 8 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb7 ] ; [#uses=4]
- %tmp32 = sub i32 2, %indvar ; [#uses=4]
- %scevgep3334 = getelementptr %struct..2MyNodeOverlapCallback* %this, i32 0, i32 3, i32 %tmp32, i32 0, i32 0 ; [#uses=1]
- %scevgep35 = getelementptr %struct..2MyNodeOverlapCallback* %this, i32 0, i32 3, i32 %tmp32, i32 0, i32 1 ; [#uses=1]
- %scevgep36 = getelementptr %struct..2MyNodeOverlapCallback* %this, i32 0, i32 3, i32 %tmp32, i32 0, i32 2 ; [#uses=1]
- %scevgep37 = getelementptr %struct..2MyNodeOverlapCallback* %this, i32 0, i32 3, i32 %tmp32, i32 0, i32 3 ; [#uses=1]
- %13 = load i32* %indicestype, align 4 ; [#uses=1]
- %14 = icmp eq i32 %13, 3 ; [#uses=1]
- br i1 %14, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %tmp = mul i32 %indvar, -2 ; [#uses=1]
- %tmp24 = add i32 %tmp23, %tmp ; [#uses=1]
- %scevgep = getelementptr i8* %7, i32 %tmp24 ; [#uses=1]
- %scevgep25 = bitcast i8* %scevgep to i16* ; [#uses=1]
- %15 = load i16* %scevgep25, align 2 ; [#uses=1]
- %16 = zext i16 %15 to i32 ; [#uses=1]
- br label %bb3
-
-bb2: ; preds = %bb
- %tmp26 = mul i32 %indvar, -4 ; [#uses=1]
- %tmp28 = add i32 %tmp27, %tmp26 ; [#uses=1]
- %scevgep29 = getelementptr i8* %7, i32 %tmp28 ; [#uses=1]
- %scevgep2930 = bitcast i8* %scevgep29 to i32* ; [#uses=1]
- %17 = load i32* %scevgep2930, align 4 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %iftmp.248.0 = phi i32 [ %16, %bb1 ], [ %17, %bb2 ] ; [#uses=1]
- %18 = load i32* %type, align 4 ; [#uses=1]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- %20 = load i8** %vertexbase, align 4 ; [#uses=5]
- %21 = load i32* %stride, align 4 ; [#uses=1]
- %22 = mul nsw i32 %21, %iftmp.248.0 ; [#uses=5]
- %23 = getelementptr inbounds i8* %20, i32 %22 ; [#uses=2]
- br i1 %19, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %24 = bitcast i8* %23 to float* ; [#uses=1]
- %.sum11 = add i32 %22, 8 ; [#uses=1]
- %25 = getelementptr inbounds i8* %20, i32 %.sum11 ; [#uses=1]
- %26 = bitcast i8* %25 to float* ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = load float* %10, align 4 ; [#uses=1]
- %29 = fmul float %27, %28 ; [#uses=1]
- %.sum12 = add i32 %22, 4 ; [#uses=1]
- %30 = getelementptr inbounds i8* %20, i32 %.sum12 ; [#uses=1]
- %31 = bitcast i8* %30 to float* ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = load float* %11, align 4 ; [#uses=1]
- %34 = fmul float %32, %33 ; [#uses=1]
- %35 = load float* %24, align 4 ; [#uses=1]
- %36 = load float* %12, align 4 ; [#uses=1]
- %37 = fmul float %35, %36 ; [#uses=1]
- br label %bb7
-
-bb5: ; preds = %bb3
- %38 = bitcast i8* %23 to double* ; [#uses=1]
- %.sum = add i32 %22, 16 ; [#uses=1]
- %39 = getelementptr inbounds i8* %20, i32 %.sum ; [#uses=1]
- %40 = bitcast i8* %39 to double* ; [#uses=1]
- %41 = load double* %40, align 4 ; [#uses=1]
- %42 = fptrunc double %41 to float ; [#uses=1]
- %43 = load float* %10, align 4 ; [#uses=1]
- %44 = fmul float %42, %43 ; [#uses=1]
- %.sum10 = add i32 %22, 8 ; [#uses=1]
- %45 = getelementptr inbounds i8* %20, i32 %.sum10 ; [#uses=1]
- %46 = bitcast i8* %45 to double* ; [#uses=1]
- %47 = load double* %46, align 4 ; [#uses=1]
- %48 = fptrunc double %47 to float ; [#uses=1]
- %49 = load float* %11, align 4 ; [#uses=1]
- %50 = fmul float %48, %49 ; [#uses=1]
- %51 = load double* %38, align 4 ; [#uses=1]
- %52 = fptrunc double %51 to float ; [#uses=1]
- %53 = load float* %12, align 4 ; [#uses=1]
- %54 = fmul float %52, %53 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb5, %bb4
- %storemerge39 = phi float [ %37, %bb4 ], [ %54, %bb5 ] ; [#uses=1]
- %storemerge38 = phi float [ %34, %bb4 ], [ %50, %bb5 ] ; [#uses=1]
- %storemerge = phi float [ %29, %bb4 ], [ %44, %bb5 ] ; [#uses=1]
- store float %storemerge39, float* %scevgep3334, align 4
- store float %storemerge38, float* %scevgep35, align 4
- store float %storemerge, float* %scevgep36, align 4
- store float 0.000000e+00, float* %scevgep37, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb9, label %bb
-
-bb9: ; preds = %bb7
- %55 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %this, i32 0, i32 2 ; [#uses=1]
- %56 = load %struct.btActionInterface** %55, align 4 ; [#uses=2]
- %57 = getelementptr inbounds %struct.btActionInterface* %56, i32 0, i32 0 ; [#uses=1]
- %58 = load i32 (...)*** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 2 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- %62 = bitcast i32 (...)* %60 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %62(%struct.btActionInterface* %56, %struct.btQuadWord* %61, i32 %nodeSubPart, i32 %nodeTriangleIndex)
- %63 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=2]
- %64 = getelementptr inbounds %struct.btStridingMeshInterface* %63, i32 0, i32 0 ; [#uses=1]
- %65 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds i32 (...)** %65, i32 6 ; [#uses=1]
- %67 = load i32 (...)** %66, align 4 ; [#uses=1]
- %68 = bitcast i32 (...)* %67 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- call void %68(%struct.btStridingMeshInterface* %63, i32 %nodeSubPart)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK22btBvhTriangleMeshShape18serializeSingleBvhEP12btSerializer(%struct.btBvhTriangleMeshShape* nocapture %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load %struct.btOptimizedBvh** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btOptimizedBvh* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btOptimizedBvh* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 3 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btOptimizedBvh* %1, i32 0, i32 0 ; [#uses=1]
- %8 = bitcast i32 (...)* %6 to i32 (%struct.btQuantizedBvh*)* ; [#uses=1]
- %9 = tail call i32 %8(%struct.btQuantizedBvh* %7) ; [#uses=1]
- %10 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 4 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %15 = tail call %struct.btChunk* %14(%struct.btActionInterface* %serializer, i32 %9, i32 1) ; [#uses=2]
- %16 = load %struct.btOptimizedBvh** %0, align 4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btOptimizedBvh* %16, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load i32 (...)*** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 4 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btChunk* %15, i32 0, i32 2 ; [#uses=1]
- %22 = load i8** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btOptimizedBvh* %16, i32 0, i32 0 ; [#uses=1]
- %24 = bitcast i32 (...)* %20 to i8* (%struct.btQuantizedBvh*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %25 = tail call i8* %24(%struct.btQuantizedBvh* %23, i8* %22, %struct.btActionInterface* %serializer) ; [#uses=1]
- %26 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 5 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = load %struct.btOptimizedBvh** %0, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %28 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %31 = bitcast %struct.btOptimizedBvh* %29 to i8* ; [#uses=1]
- tail call void %30(%struct.btActionInterface* %serializer, %struct.btChunk* %15, i8* %25, i32 1213612625, i8* %31)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK22btBvhTriangleMeshShape30serializeSingleTriangleInfoMapEP12btSerializer(%struct.btBvhTriangleMeshShape* nocapture %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=3]
- %1 = load %struct.btTriangleInfoMap** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.btTriangleInfoMap* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btTriangleInfoMap* %1, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 2 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to i32 (%struct.btTriangleInfoMap*)* ; [#uses=1]
- %8 = tail call i32 %7(%struct.btTriangleInfoMap* %1) ; [#uses=1]
- %9 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 4 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %14 = tail call %struct.btChunk* %13(%struct.btActionInterface* %serializer, i32 %8, i32 1) ; [#uses=2]
- %15 = load %struct.btTriangleInfoMap** %0, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btTriangleInfoMap* %15, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 3 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btChunk* %14, i32 0, i32 2 ; [#uses=1]
- %21 = load i8** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %19 to i8* (%struct.btTriangleInfoMap*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %23 = tail call i8* %22(%struct.btTriangleInfoMap* %15, i8* %21, %struct.btActionInterface* %serializer) ; [#uses=1]
- %24 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 5 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = load %struct.btTriangleInfoMap** %0, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %26 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %29 = bitcast %struct.btTriangleInfoMap* %27 to i8* ; [#uses=1]
- tail call void %28(%struct.btActionInterface* %serializer, %struct.btChunk* %14, i8* %23, i32 1346456916, i8* %29)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD2Ev(%struct..2MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_EN21MyNodeOverlapCallbackD2Ev(%struct..0MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_EN21MyNodeOverlapCallbackD2Ev(%struct..0MyNodeOverlapCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZNK22btBvhTriangleMeshShape9serializeEPvP12btSerializer(%struct.btBvhTriangleMeshShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btStridingMeshInterface** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btStridingMeshInterface* %3, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 14 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %9 = bitcast i32 (...)* %7 to i8* (%struct.btStridingMeshInterface*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %10 = tail call i8* %9(%struct.btStridingMeshInterface* %3, i8* %8, %struct.btActionInterface* %serializer) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %14 = bitcast i8* %13 to float* ; [#uses=1]
- store float %12, float* %14, align 4
- %15 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=6]
- %16 = load %struct.btOptimizedBvh** %15, align 4 ; [#uses=1]
- %17 = icmp eq %struct.btOptimizedBvh* %16, null ; [#uses=1]
- br i1 %17, label %bb8, label %bb
-
-bb: ; preds = %entry
- %18 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=5]
- %19 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 13 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %21 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %23 = tail call i32 %22(%struct.btActionInterface* %serializer) ; [#uses=1]
- %24 = and i32 %23, 1 ; [#uses=1]
- %toBool6 = icmp eq i32 %24, 0 ; [#uses=1]
- br i1 %toBool6, label %bb11, label %bb8
-
-bb8: ; preds = %bb, %entry
- %25 = getelementptr inbounds i8* %dataBuffer, i32 40 ; [#uses=1]
- %26 = bitcast i8* %25 to %struct.btQuantizedBvhFloatData** ; [#uses=1]
- store %struct.btQuantizedBvhFloatData* null, %struct.btQuantizedBvhFloatData** %26, align 4
- %27 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %28 = bitcast i8* %27 to %struct.btQuantizedBvhDoubleData** ; [#uses=1]
- store %struct.btQuantizedBvhDoubleData* null, %struct.btQuantizedBvhDoubleData** %28, align 4
- br label %bb16
-
-bb11: ; preds = %bb
- %29 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 6 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = load %struct.btOptimizedBvh** %15, align 4 ; [#uses=1]
- %33 = bitcast i32 (...)* %31 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %34 = bitcast %struct.btOptimizedBvh* %32 to i8* ; [#uses=1]
- %35 = tail call i8* %33(%struct.btActionInterface* %serializer, i8* %34) ; [#uses=2]
- %36 = icmp eq i8* %35, null ; [#uses=1]
- br i1 %36, label %bb13, label %bb12
-
-bb12: ; preds = %bb11
- %37 = bitcast i8* %35 to %struct.btQuantizedBvhFloatData* ; [#uses=1]
- %38 = getelementptr inbounds i8* %dataBuffer, i32 40 ; [#uses=1]
- %39 = bitcast i8* %38 to %struct.btQuantizedBvhFloatData** ; [#uses=1]
- store %struct.btQuantizedBvhFloatData* %37, %struct.btQuantizedBvhFloatData** %39, align 4
- %40 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %41 = bitcast i8* %40 to %struct.btQuantizedBvhDoubleData** ; [#uses=1]
- store %struct.btQuantizedBvhDoubleData* null, %struct.btQuantizedBvhDoubleData** %41, align 4
- br label %bb16
-
-bb13: ; preds = %bb11
- %42 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %43 = getelementptr inbounds i32 (...)** %42, i32 7 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = load %struct.btOptimizedBvh** %15, align 4 ; [#uses=1]
- %46 = bitcast i32 (...)* %44 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %47 = bitcast %struct.btOptimizedBvh* %45 to i8* ; [#uses=1]
- %48 = tail call i8* %46(%struct.btActionInterface* %serializer, i8* %47) ; [#uses=1]
- %49 = bitcast i8* %48 to %struct.btQuantizedBvhFloatData* ; [#uses=1]
- %50 = getelementptr inbounds i8* %dataBuffer, i32 40 ; [#uses=1]
- %51 = bitcast i8* %50 to %struct.btQuantizedBvhFloatData** ; [#uses=1]
- store %struct.btQuantizedBvhFloatData* %49, %struct.btQuantizedBvhFloatData** %51, align 4
- %52 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %53 = bitcast i8* %52 to %struct.btQuantizedBvhDoubleData** ; [#uses=1]
- store %struct.btQuantizedBvhDoubleData* null, %struct.btQuantizedBvhDoubleData** %53, align 4
- %54 = load %struct.btOptimizedBvh** %15, align 4 ; [#uses=2]
- %55 = getelementptr inbounds %struct.btOptimizedBvh* %54, i32 0, i32 0, i32 0 ; [#uses=1]
- %56 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 3 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btOptimizedBvh* %54, i32 0, i32 0 ; [#uses=1]
- %60 = bitcast i32 (...)* %58 to i32 (%struct.btQuantizedBvh*)* ; [#uses=1]
- %61 = tail call i32 %60(%struct.btQuantizedBvh* %59) ; [#uses=1]
- %62 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %63 = getelementptr inbounds i32 (...)** %62, i32 4 ; [#uses=1]
- %64 = load i32 (...)** %63, align 4 ; [#uses=1]
- %65 = bitcast i32 (...)* %64 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %66 = tail call %struct.btChunk* %65(%struct.btActionInterface* %serializer, i32 %61, i32 1) ; [#uses=2]
- %67 = load %struct.btOptimizedBvh** %15, align 4 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btOptimizedBvh* %67, i32 0, i32 0, i32 0 ; [#uses=1]
- %69 = load i32 (...)*** %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds i32 (...)** %69, i32 4 ; [#uses=1]
- %71 = load i32 (...)** %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btChunk* %66, i32 0, i32 2 ; [#uses=1]
- %73 = load i8** %72, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btOptimizedBvh* %67, i32 0, i32 0 ; [#uses=1]
- %75 = bitcast i32 (...)* %71 to i8* (%struct.btQuantizedBvh*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %76 = tail call i8* %75(%struct.btQuantizedBvh* %74, i8* %73, %struct.btActionInterface* %serializer) ; [#uses=1]
- %77 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %78 = getelementptr inbounds i32 (...)** %77, i32 5 ; [#uses=1]
- %79 = load i32 (...)** %78, align 4 ; [#uses=1]
- %80 = load %struct.btOptimizedBvh** %15, align 4 ; [#uses=1]
- %81 = bitcast i32 (...)* %79 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %82 = bitcast %struct.btOptimizedBvh* %80 to i8* ; [#uses=1]
- tail call void %81(%struct.btActionInterface* %serializer, %struct.btChunk* %66, i8* %76, i32 1213612625, i8* %82)
- br label %bb16
-
-bb16: ; preds = %bb13, %bb12, %bb8
- %83 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=6]
- %84 = load %struct.btTriangleInfoMap** %83, align 4 ; [#uses=1]
- %85 = icmp eq %struct.btTriangleInfoMap* %84, null ; [#uses=1]
- br i1 %85, label %bb19, label %bb17
-
-bb17: ; preds = %bb16
- %86 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=5]
- %87 = load i32 (...)*** %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds i32 (...)** %87, i32 13 ; [#uses=1]
- %89 = load i32 (...)** %88, align 4 ; [#uses=1]
- %90 = bitcast i32 (...)* %89 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %91 = tail call i32 %90(%struct.btActionInterface* %serializer) ; [#uses=1]
- %92 = and i32 %91, 2 ; [#uses=1]
- %93 = icmp eq i32 %92, 0 ; [#uses=1]
- br i1 %93, label %bb22, label %bb19
-
-bb19: ; preds = %bb17, %bb16
- %94 = getelementptr inbounds i8* %dataBuffer, i32 48 ; [#uses=1]
- %95 = bitcast i8* %94 to %struct.btTriangleInfoMapData** ; [#uses=1]
- store %struct.btTriangleInfoMapData* null, %struct.btTriangleInfoMapData** %95, align 4
- ret i8* getelementptr inbounds ([24 x i8]* @.str448, i32 0, i32 0)
-
-bb22: ; preds = %bb17
- %96 = load i32 (...)*** %86, align 4 ; [#uses=1]
- %97 = getelementptr inbounds i32 (...)** %96, i32 6 ; [#uses=1]
- %98 = load i32 (...)** %97, align 4 ; [#uses=1]
- %99 = load %struct.btTriangleInfoMap** %83, align 4 ; [#uses=1]
- %100 = bitcast i32 (...)* %98 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %101 = bitcast %struct.btTriangleInfoMap* %99 to i8* ; [#uses=1]
- %102 = tail call i8* %100(%struct.btActionInterface* %serializer, i8* %101) ; [#uses=2]
- %103 = icmp eq i8* %102, null ; [#uses=1]
- br i1 %103, label %bb25, label %bb24
-
-bb24: ; preds = %bb22
- %104 = bitcast i8* %102 to %struct.btTriangleInfoMapData* ; [#uses=1]
- %105 = getelementptr inbounds i8* %dataBuffer, i32 48 ; [#uses=1]
- %106 = bitcast i8* %105 to %struct.btTriangleInfoMapData** ; [#uses=1]
- store %struct.btTriangleInfoMapData* %104, %struct.btTriangleInfoMapData** %106, align 4
- ret i8* getelementptr inbounds ([24 x i8]* @.str448, i32 0, i32 0)
-
-bb25: ; preds = %bb22
- %107 = load i32 (...)*** %86, align 4 ; [#uses=1]
- %108 = getelementptr inbounds i32 (...)** %107, i32 7 ; [#uses=1]
- %109 = load i32 (...)** %108, align 4 ; [#uses=1]
- %110 = load %struct.btTriangleInfoMap** %83, align 4 ; [#uses=1]
- %111 = bitcast i32 (...)* %109 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %112 = bitcast %struct.btTriangleInfoMap* %110 to i8* ; [#uses=1]
- %113 = tail call i8* %111(%struct.btActionInterface* %serializer, i8* %112) ; [#uses=1]
- %114 = bitcast i8* %113 to %struct.btTriangleInfoMapData* ; [#uses=1]
- %115 = getelementptr inbounds i8* %dataBuffer, i32 48 ; [#uses=1]
- %116 = bitcast i8* %115 to %struct.btTriangleInfoMapData** ; [#uses=1]
- store %struct.btTriangleInfoMapData* %114, %struct.btTriangleInfoMapData** %116, align 4
- %117 = load %struct.btTriangleInfoMap** %83, align 4 ; [#uses=2]
- %118 = getelementptr inbounds %struct.btTriangleInfoMap* %117, i32 0, i32 0 ; [#uses=1]
- %119 = load i32 (...)*** %118, align 4 ; [#uses=1]
- %120 = getelementptr inbounds i32 (...)** %119, i32 2 ; [#uses=1]
- %121 = load i32 (...)** %120, align 4 ; [#uses=1]
- %122 = bitcast i32 (...)* %121 to i32 (%struct.btTriangleInfoMap*)* ; [#uses=1]
- %123 = tail call i32 %122(%struct.btTriangleInfoMap* %117) ; [#uses=1]
- %124 = load i32 (...)*** %86, align 4 ; [#uses=1]
- %125 = getelementptr inbounds i32 (...)** %124, i32 4 ; [#uses=1]
- %126 = load i32 (...)** %125, align 4 ; [#uses=1]
- %127 = bitcast i32 (...)* %126 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %128 = tail call %struct.btChunk* %127(%struct.btActionInterface* %serializer, i32 %123, i32 1) ; [#uses=2]
- %129 = load %struct.btTriangleInfoMap** %83, align 4 ; [#uses=2]
- %130 = getelementptr inbounds %struct.btTriangleInfoMap* %129, i32 0, i32 0 ; [#uses=1]
- %131 = load i32 (...)*** %130, align 4 ; [#uses=1]
- %132 = getelementptr inbounds i32 (...)** %131, i32 3 ; [#uses=1]
- %133 = load i32 (...)** %132, align 4 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btChunk* %128, i32 0, i32 2 ; [#uses=1]
- %135 = load i8** %134, align 4 ; [#uses=1]
- %136 = bitcast i32 (...)* %133 to i8* (%struct.btTriangleInfoMap*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %137 = tail call i8* %136(%struct.btTriangleInfoMap* %129, i8* %135, %struct.btActionInterface* %serializer) ; [#uses=1]
- %138 = load i32 (...)*** %86, align 4 ; [#uses=1]
- %139 = getelementptr inbounds i32 (...)** %138, i32 5 ; [#uses=1]
- %140 = load i32 (...)** %139, align 4 ; [#uses=1]
- %141 = load %struct.btTriangleInfoMap** %83, align 4 ; [#uses=1]
- %142 = bitcast i32 (...)* %140 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %143 = bitcast %struct.btTriangleInfoMap* %141 to i8* ; [#uses=1]
- tail call void %142(%struct.btActionInterface* %serializer, %struct.btChunk* %128, i8* %137, i32 1346456916, i8* %143)
- ret i8* getelementptr inbounds ([24 x i8]* @.str448, i32 0, i32 0)
-}
-
-; [#uses=0]
-define void @_ZN22btBvhTriangleMeshShape15setOptimizedBvhEP14btOptimizedBvhRK9btVector3(%struct.btBvhTriangleMeshShape* %this, %struct.btOptimizedBvh* %bvh, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btOptimizedBvh* %bvh, %struct.btOptimizedBvh** %0, align 4
- %1 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %1, align 1
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 7 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- %7 = bitcast i32 (...)* %5 to %struct.btQuadWord* (%struct.btTriangleMeshShape*)* ; [#uses=1]
- %8 = tail call %struct.btQuadWord* %7(%struct.btTriangleMeshShape* %6) ; [#uses=3]
- %9 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fsub float %10, %12 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fsub float %15, %17 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %20, %22 ; [#uses=2]
- %24 = fmul float %23, %23 ; [#uses=1]
- %25 = fmul float %18, %18 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fmul float %13, %13 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=1]
- %29 = fcmp ogt float %28, 0x3E80000000000000 ; [#uses=1]
- br i1 %29, label %bb, label %return
-
-bb: ; preds = %entry
- tail call void @_ZN19btTriangleMeshShape15setLocalScalingERK9btVector3(%struct.btTriangleMeshShape* %6, %struct.btQuadWord* %scaling)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define void @_ZN22btBvhTriangleMeshShape17buildOptimizedBvhEv(%struct.btBvhTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=2]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=2]
- %3 = load %struct.btOptimizedBvh** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btOptimizedBvh* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to void (%struct.btOptimizedBvh*)* ; [#uses=1]
- tail call void %7(%struct.btOptimizedBvh* %3)
- %8 = load %struct.btOptimizedBvh** %2, align 4 ; [#uses=1]
- %9 = bitcast %struct.btOptimizedBvh* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %9)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 172, i32 16) ; [#uses=1]
- %11 = bitcast i8* %10 to %struct.btOptimizedBvh* ; [#uses=3]
- invoke void @_ZN14btOptimizedBvhC1Ev(%struct.btOptimizedBvh* %11)
- to label %bb3 unwind label %lpad
-
-bb3: ; preds = %bb1
- %12 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btOptimizedBvh* %11, %struct.btOptimizedBvh** %12, align 4
- %13 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=1]
- %16 = load i8* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %18 = load %struct.btStridingMeshInterface** %17, align 4 ; [#uses=1]
- tail call void @_ZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_(%struct.btOptimizedBvh* %11, %struct.btStridingMeshInterface* %18, i8 zeroext %16, %struct.btQuadWord* %14, %struct.btQuadWord* %13)
- store i8 1, i8* %0, align 1
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select5 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN22btBvhTriangleMeshShape15setLocalScalingERK9btVector3(%struct.btBvhTriangleMeshShape* %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 7 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- %5 = bitcast i32 (...)* %3 to %struct.btQuadWord* (%struct.btTriangleMeshShape*)* ; [#uses=1]
- %6 = tail call %struct.btQuadWord* %5(%struct.btTriangleMeshShape* %4) ; [#uses=3]
- %7 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fsub float %8, %10 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float %13, %15 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %18, %20 ; [#uses=2]
- %22 = fmul float %21, %21 ; [#uses=1]
- %23 = fmul float %16, %16 ; [#uses=1]
- %24 = fadd float %22, %23 ; [#uses=1]
- %25 = fmul float %11, %11 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fcmp ogt float %26, 0x3E80000000000000 ; [#uses=1]
- br i1 %27, label %bb, label %return
-
-bb: ; preds = %entry
- tail call void @_ZN19btTriangleMeshShape15setLocalScalingERK9btVector3(%struct.btTriangleMeshShape* %4, %struct.btQuadWord* %scaling)
- tail call void @_ZN22btBvhTriangleMeshShape17buildOptimizedBvhEv(%struct.btBvhTriangleMeshShape* %this)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btBvhTriangleMeshShape* nocapture %this, %struct.btActionInterface* %callback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %myNodeCallback = alloca %struct..2MyNodeOverlapCallback, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- %3 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btStridingMeshInterface* %1, %struct.btStridingMeshInterface** %3, align 4
- %4 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %callback, %struct.btActionInterface** %4, align 8
- %5 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btOptimizedBvh** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btOptimizedBvh* %6, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct..2MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK14btQuantizedBvh26reportAabbOverlappingNodexEP21btNodeOverlapCallbackRK9btVector3S4_(%struct.btQuantizedBvh* %7, %struct.btActionInterface* %8, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK22btBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_(%struct.btBvhTriangleMeshShape* nocapture %this, %struct.btActionInterface* %callback, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %myNodeCallback = alloca %struct..0MyNodeOverlapCallback, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- %3 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btStridingMeshInterface* %1, %struct.btStridingMeshInterface** %3, align 4
- %4 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %callback, %struct.btActionInterface** %4, align 8
- %5 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btOptimizedBvh** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btOptimizedBvh* %6, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK14btQuantizedBvh29reportBoxCastOverlappingNodexEP21btNodeOverlapCallbackRK9btVector3S4_S4_S4_(%struct.btQuantizedBvh* %7, %struct.btActionInterface* %8, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape17performConvexcastEP18btTriangleCallbackRK9btVector3S4_S4_S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_(%struct.btBvhTriangleMeshShape* nocapture %this, %struct.btActionInterface* %callback, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget) align 2 {
-entry:
- %myNodeCallback = alloca %struct..0MyNodeOverlapCallback, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- %3 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btStridingMeshInterface* %1, %struct.btStridingMeshInterface** %3, align 4
- %4 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %callback, %struct.btActionInterface** %4, align 8
- %5 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %6 = load %struct.btOptimizedBvh** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btOptimizedBvh* %6, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct..0MyNodeOverlapCallback* %myNodeCallback, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK14btQuantizedBvh25reportRayOverlappingNodexEP21btNodeOverlapCallbackRK9btVector3S4_(%struct.btQuantizedBvh* %7, %struct.btActionInterface* %8, %struct.btQuadWord* %raySource, %struct.btQuadWord* %rayTarget)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN22btBvhTriangleMeshShape14performRaycastEP18btTriangleCallbackRK9btVector3S4_E21MyNodeOverlapCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN22btBvhTriangleMeshShapeD0Ev(%struct.btBvhTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([22 x i32 (...)*]* @_ZTV22btBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=1]
- %2 = load i8* %1, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=2]
- %4 = load %struct.btOptimizedBvh** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btOptimizedBvh* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btOptimizedBvh*)* ; [#uses=1]
- invoke void %8(%struct.btOptimizedBvh* %4)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %9 = load %struct.btOptimizedBvh** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct.btOptimizedBvh* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %invcont, %entry
- %11 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %11)
- %12 = bitcast %struct.btBvhTriangleMeshShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %13 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %13)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN22btBvhTriangleMeshShapeD1Ev(%struct.btBvhTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([22 x i32 (...)*]* @_ZTV22btBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=1]
- %2 = load i8* %1, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=2]
- %4 = load %struct.btOptimizedBvh** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btOptimizedBvh* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btOptimizedBvh*)* ; [#uses=1]
- invoke void %8(%struct.btOptimizedBvh* %4)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %9 = load %struct.btOptimizedBvh** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct.btOptimizedBvh* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %invcont, %entry
- %11 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %11)
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %12)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN22btBvhTriangleMeshShapeD2Ev(%struct.btBvhTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([22 x i32 (...)*]* @_ZTV22btBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=1]
- %2 = load i8* %1, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=2]
- %4 = load %struct.btOptimizedBvh** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btOptimizedBvh* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btOptimizedBvh*)* ; [#uses=1]
- invoke void %8(%struct.btOptimizedBvh* %4)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %9 = load %struct.btOptimizedBvh** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct.btOptimizedBvh* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %invcont, %entry
- %11 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %11)
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %12)
- to label %invcont3 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN22btBvhTriangleMeshShape9refitTreeERK9btVector3S2_(%struct.btBvhTriangleMeshShape* %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btOptimizedBvh** %2, align 4 ; [#uses=1]
- tail call void @_ZN14btOptimizedBvh5refitEP23btStridingMeshInterfaceRK9btVector3S4_(%struct.btOptimizedBvh* %3, %struct.btStridingMeshInterface* %1, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %4 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN19btTriangleMeshShape15recalcLocalAabbEv(%struct.btTriangleMeshShape* %4)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN22btBvhTriangleMeshShape16partialRefitTreeERK9btVector3S2_(%struct.btBvhTriangleMeshShape* nocapture %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btOptimizedBvh** %2, align 4 ; [#uses=1]
- tail call void @_ZN14btOptimizedBvh12refitPartialEP23btStridingMeshInterfaceRK9btVector3S4_(%struct.btOptimizedBvh* %3, %struct.btStridingMeshInterface* %1, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %6 = load float* %4, align 4 ; [#uses=2]
- %7 = load float* %5, align 4 ; [#uses=1]
- %8 = fcmp olt float %6, %7 ; [#uses=1]
- br i1 %8, label %bb.i.i, label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-bb.i.i: ; preds = %entry
- store float %6, float* %5, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i, %entry
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %9, align 4 ; [#uses=2]
- %12 = load float* %10, align 4 ; [#uses=1]
- %13 = fcmp olt float %11, %12 ; [#uses=1]
- br i1 %13, label %bb.i7.i, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-bb.i7.i: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i
- store float %11, float* %10, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i, %_Z8btSetMinIfEvRT_RKS0_.exit.i
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %16 = load float* %14, align 4 ; [#uses=2]
- %17 = load float* %15, align 4 ; [#uses=1]
- %18 = fcmp olt float %16, %17 ; [#uses=1]
- br i1 %18, label %bb.i4.i, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-bb.i4.i: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- store float %16, float* %15, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i, %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %21 = load float* %19, align 4 ; [#uses=2]
- %22 = load float* %20, align 4 ; [#uses=1]
- %23 = fcmp olt float %21, %22 ; [#uses=1]
- br i1 %23, label %bb.i1.i, label %_ZN9btVector36setMinERKS_.exit
-
-bb.i1.i: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- store float %21, float* %20, align 4
- br label %_ZN9btVector36setMinERKS_.exit
-
-_ZN9btVector36setMinERKS_.exit: ; preds = %bb.i1.i, %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- %24 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = load float* %24, align 4 ; [#uses=2]
- %28 = fcmp olt float %26, %27 ; [#uses=1]
- br i1 %28, label %bb.i.i1, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-bb.i.i1: ; preds = %_ZN9btVector36setMinERKS_.exit
- store float %27, float* %25, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i1, %_ZN9btVector36setMinERKS_.exit
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = load float* %29, align 4 ; [#uses=2]
- %33 = fcmp olt float %31, %32 ; [#uses=1]
- br i1 %33, label %bb.i7.i2, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-bb.i7.i2: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- store float %32, float* %30, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i2, %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- %34 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = load float* %34, align 4 ; [#uses=2]
- %38 = fcmp olt float %36, %37 ; [#uses=1]
- br i1 %38, label %bb.i4.i3, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-bb.i4.i3: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- store float %37, float* %35, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i3, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- %39 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = load float* %39, align 4 ; [#uses=2]
- %43 = fcmp olt float %41, %42 ; [#uses=1]
- br i1 %43, label %bb.i1.i4, label %_ZN9btVector36setMaxERKS_.exit
-
-bb.i1.i4: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- store float %42, float* %40, align 4
- ret void
-
-_ZN9btVector36setMaxERKS_.exit: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- ret void
-}
-
-; [#uses=1]
-define void @_ZN22btBvhTriangleMeshShapeC2EP23btStridingMeshInterfacebRK9btVector3S4_b(%struct.btBvhTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %useQuantizedAabbCompression, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax, i8 zeroext %buildBvh) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN19btTriangleMeshShapeC2EP23btStridingMeshInterface(%struct.btTriangleMeshShape* %0, %struct.btStridingMeshInterface* %meshInterface)
- %1 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([22 x i32 (...)*]* @_ZTV22btBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=2]
- store %struct.btOptimizedBvh* null, %struct.btOptimizedBvh** %2, align 4
- %3 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btTriangleInfoMap* null, %struct.btTriangleInfoMap** %3, align 4
- %4 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=2]
- store i8 %useQuantizedAabbCompression, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=2]
- store i8 0, i8* %5, align 1
- %6 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 21, i32* %6, align 4
- %toBool = icmp eq i8 %buildBvh, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %7 = invoke i8* @_Z22btAlignedAllocInternalji(i32 172, i32 16)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb
- %8 = bitcast i8* %7 to %struct.btOptimizedBvh* ; [#uses=3]
- invoke void @_ZN14btOptimizedBvhC1Ev(%struct.btOptimizedBvh* %8)
- to label %bb3 unwind label %lpad13
-
-bb3: ; preds = %invcont
- store %struct.btOptimizedBvh* %8, %struct.btOptimizedBvh** %2, align 4
- %9 = load i8* %4, align 4 ; [#uses=1]
- invoke void @_ZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_(%struct.btOptimizedBvh* %8, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %9, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %bb3
- store i8 1, i8* %5, align 1
- ret void
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-return: ; preds = %entry
- ret void
-
-lpad: ; preds = %bb3, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad13: ; preds = %invcont
- %eh_ptr14 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select16 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr14, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad17: ; preds = %ppad
- %eh_ptr18 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr18, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad13, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr14, %lpad13 ] ; [#uses=1]
- invoke void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %0)
- to label %invcont8 unwind label %lpad17
-}
-
-; [#uses=0]
-define void @_ZN22btBvhTriangleMeshShapeC1EP23btStridingMeshInterfacebRK9btVector3S4_b(%struct.btBvhTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %useQuantizedAabbCompression, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax, i8 zeroext %buildBvh) align 2 {
-entry:
- tail call void @_ZN22btBvhTriangleMeshShapeC2EP23btStridingMeshInterfacebRK9btVector3S4_b(%struct.btBvhTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %useQuantizedAabbCompression, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax, i8 zeroext %buildBvh)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN22btBvhTriangleMeshShapeC1EP23btStridingMeshInterfacebb(%struct.btBvhTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %useQuantizedAabbCompression, i8 zeroext %buildBvh) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN19btTriangleMeshShapeC2EP23btStridingMeshInterface(%struct.btTriangleMeshShape* %0, %struct.btStridingMeshInterface* %meshInterface)
- %1 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([22 x i32 (...)*]* @_ZTV22btBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btOptimizedBvh* null, %struct.btOptimizedBvh** %2, align 4
- %3 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btTriangleInfoMap* null, %struct.btTriangleInfoMap** %3, align 4
- %4 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 %useQuantizedAabbCompression, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %5, align 1
- %6 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 21, i32* %6, align 4
- %toBool = icmp eq i8 %buildBvh, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- invoke void @_ZN22btBvhTriangleMeshShape17buildOptimizedBvhEv(%struct.btBvhTriangleMeshShape* %this)
- to label %return unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb, %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %0)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN14btCapsuleShapeC2Eff(%struct.btCapsuleShape* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV14btCapsuleShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 10, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %3, align 4
- %4 = fmul float %height, 5.000000e-01 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %radius, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %4, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK21btConvexInternalShape36getNumPreferredPenetrationDirectionsEv(%struct.btConvexInternalShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK21btConvexInternalShape32getPreferredPenetrationDirectionEiR9btVector3(%struct.btConvexInternalShape* nocapture %this, i32 %index, %struct.btQuadWord* nocapture %penetrationVector) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btCapsuleShape9setMarginEf(%struct.btCapsuleShape* %this, float %collisionMargin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=6]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %collisionMargin, float* %26, align 4
- %27 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 11 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %31 = tail call float %30(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %32 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 11 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %36 = tail call float %35(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %37 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 11 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %41 = tail call float %40(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %42 = fsub float %19, %31 ; [#uses=1]
- %43 = fsub float %22, %36 ; [#uses=1]
- %44 = fsub float %25, %41 ; [#uses=1]
- store float %44, float* %23, align 4
- store float %43, float* %20, align 4
- store float %42, float* %17, align 4
- %45 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK14btCapsuleShape7getNameEv(%struct.btCapsuleShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([13 x i8]* @.str51, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK14btCapsuleShape7getAabbERK11btTransformR9btVector3S4_(%struct.btCapsuleShape* %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %halfExtents = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = add nsw i32 %1, 2 ; [#uses=1]
- %3 = srem i32 %2, 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %3 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=4]
- %6 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %5, float* %6, align 8
- %7 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %5, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %5, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fadd float %5, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 %1 ; [#uses=1]
- store float %12, float* %13, align 4
- %14 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 11 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=3]
- %19 = bitcast i32 (...)* %17 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %20 = call float %19(%struct.btConvexInternalShape* %18) ; [#uses=1]
- %21 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 11 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %23 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %25 = call float %24(%struct.btConvexInternalShape* %18) ; [#uses=1]
- %26 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 11 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %28 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %30 = call float %29(%struct.btConvexInternalShape* %18) ; [#uses=1]
- %31 = load float* %6, align 8 ; [#uses=1]
- %32 = fadd float %31, %30 ; [#uses=4]
- store float %32, float* %6, align 8
- %33 = load float* %7, align 4 ; [#uses=1]
- %34 = fadd float %33, %25 ; [#uses=4]
- store float %34, float* %7, align 4
- %35 = load float* %8, align 8 ; [#uses=1]
- %36 = fadd float %35, %20 ; [#uses=3]
- %37 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = call float @fabsf(float %38) nounwind readnone ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = call float @fabsf(float %44) nounwind readnone ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = call float @fabsf(float %47) nounwind readnone ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = call float @fabsf(float %50) nounwind readnone ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = call float @fabsf(float %53) nounwind readnone ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = call float @fabsf(float %56) nounwind readnone ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = call float @fabsf(float %59) nounwind readnone ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = call float @fabsf(float %62) nounwind readnone ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=2]
- %66 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=2]
- %70 = fmul float %45, %32 ; [#uses=1]
- %71 = fmul float %42, %34 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fmul float %39, %36 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=2]
- %75 = fmul float %54, %32 ; [#uses=1]
- %76 = fmul float %51, %34 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = fmul float %48, %36 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=2]
- %80 = fmul float %63, %32 ; [#uses=1]
- %81 = fmul float %60, %34 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = fmul float %57, %36 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=2]
- %85 = fsub float %69, %74 ; [#uses=1]
- %86 = fsub float %67, %79 ; [#uses=1]
- %87 = fsub float %65, %84 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %87, float* %88, align 4
- %89 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %86, float* %89, align 4
- %90 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %85, float* %90, align 4
- %91 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %91, align 4
- %92 = fadd float %69, %74 ; [#uses=1]
- %93 = fadd float %67, %79 ; [#uses=1]
- %94 = fadd float %65, %84 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %94, float* %95, align 4
- %96 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %93, float* %96, align 4
- %97 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %92, float* %97, align 4
- %98 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %98, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK15btCapsuleShapeX7getNameEv(%struct.btCapsuleShapeX* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([9 x i8]* @.str152, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK15btCapsuleShapeZ7getNameEv(%struct.btCapsuleShapeX* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([9 x i8]* @.str253, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK14btCapsuleShape28calculateSerializeBufferSizeEv(%struct.btCapsuleShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 60
-}
-
-; [#uses=1]
-define void @_ZNK14btCapsuleShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btCapsuleShape* %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) align 2 {
-entry:
- %pos = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pos4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = add nsw i32 %1, 2 ; [#uses=1]
- %3 = srem i32 %2, 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %3 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=6]
- %6 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %6, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %7 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 0 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btQuadWord* %pos4, i32 0, i32 0, i32 0 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btQuadWord* %pos4, i32 0, i32 0, i32 1 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %pos4, i32 0, i32 0, i32 2 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %pos4, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7.bb_crit_edge, %bb.nph
- %20 = phi i32 [ %1, %bb.nph ], [ %.pre, %bb7.bb_crit_edge ] ; [#uses=2]
- %j.064 = phi i32 [ 0, %bb.nph ], [ %99, %bb7.bb_crit_edge ] ; [#uses=8]
- %scevgep65 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %j.064, i32 0, i32 0 ; [#uses=2]
- %scevgep66 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.064, i32 0, i32 1 ; [#uses=2]
- %scevgep67 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.064, i32 0, i32 2 ; [#uses=2]
- %scevgep68 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.064, i32 0, i32 3 ; [#uses=2]
- %scevgep69 = getelementptr %struct.btQuadWord* %vectors, i32 %j.064, i32 0, i32 2 ; [#uses=2]
- %scevgep70 = getelementptr %struct.btQuadWord* %vectors, i32 %j.064, i32 0, i32 1 ; [#uses=2]
- %scevgep7172 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %j.064, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %7, align 8
- store float 0.000000e+00, float* %8, align 4
- store float 0.000000e+00, float* %9, align 8
- store float 0.000000e+00, float* %10, align 4
- %21 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %20 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 %20 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 11 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = bitcast i32 (...)* %26 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %28 = call float %27(%struct.btConvexInternalShape* %12) ; [#uses=3]
- %29 = load float* %scevgep69, align 4 ; [#uses=3]
- %30 = fmul float %29, %28 ; [#uses=1]
- %31 = load float* %scevgep70, align 4 ; [#uses=3]
- %32 = fmul float %31, %28 ; [#uses=1]
- %33 = load float* %scevgep7172, align 4 ; [#uses=3]
- %34 = fmul float %33, %28 ; [#uses=1]
- %35 = load float* %13, align 4 ; [#uses=1]
- %36 = fmul float %29, %35 ; [#uses=1]
- %37 = load float* %14, align 4 ; [#uses=1]
- %38 = fmul float %31, %37 ; [#uses=1]
- %39 = load float* %15, align 4 ; [#uses=1]
- %40 = fmul float %33, %39 ; [#uses=1]
- %41 = fmul float %36, %5 ; [#uses=1]
- %42 = fmul float %38, %5 ; [#uses=1]
- %43 = fmul float %40, %5 ; [#uses=1]
- %44 = load float* %9, align 8 ; [#uses=1]
- %45 = fadd float %44, %41 ; [#uses=1]
- %46 = load float* %8, align 4 ; [#uses=1]
- %47 = fadd float %46, %42 ; [#uses=1]
- %48 = load float* %7, align 8 ; [#uses=1]
- %49 = fadd float %48, %43 ; [#uses=1]
- %50 = fsub float %45, %30 ; [#uses=2]
- %51 = fsub float %47, %32 ; [#uses=2]
- %52 = fsub float %49, %34 ; [#uses=2]
- %53 = fmul float %33, %52 ; [#uses=1]
- %54 = fmul float %31, %51 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %29, %50 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=2]
- %58 = fcmp ogt float %57, 0xC3ABC16D60000000 ; [#uses=1]
- br i1 %58, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- store float %52, float* %scevgep65, align 4
- store float %51, float* %scevgep66, align 4
- store float %50, float* %scevgep67, align 4
- store float 0.000000e+00, float* %scevgep68, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %maxDot.0 = phi float [ %57, %bb1 ], [ 0xC3ABC16D60000000, %bb ] ; [#uses=1]
- store float 0.000000e+00, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- store float 0.000000e+00, float* %18, align 8
- store float 0.000000e+00, float* %19, align 4
- %59 = load i32* %0, align 4 ; [#uses=2]
- %60 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %59 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fsub float -0.000000e+00, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btQuadWord* %pos4, i32 0, i32 0, i32 %59 ; [#uses=1]
- store float %62, float* %63, align 4
- %64 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %65 = getelementptr inbounds i32 (...)** %64, i32 11 ; [#uses=1]
- %66 = load i32 (...)** %65, align 4 ; [#uses=1]
- %67 = bitcast i32 (...)* %66 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %68 = call float %67(%struct.btConvexInternalShape* %12) ; [#uses=3]
- %69 = load float* %scevgep69, align 4 ; [#uses=3]
- %70 = fmul float %69, %68 ; [#uses=1]
- %71 = load float* %scevgep70, align 4 ; [#uses=3]
- %72 = fmul float %71, %68 ; [#uses=1]
- %73 = load float* %scevgep7172, align 4 ; [#uses=3]
- %74 = fmul float %73, %68 ; [#uses=1]
- %75 = load float* %13, align 4 ; [#uses=1]
- %76 = fmul float %69, %75 ; [#uses=1]
- %77 = load float* %14, align 4 ; [#uses=1]
- %78 = fmul float %71, %77 ; [#uses=1]
- %79 = load float* %15, align 4 ; [#uses=1]
- %80 = fmul float %73, %79 ; [#uses=1]
- %81 = fmul float %76, %5 ; [#uses=1]
- %82 = fmul float %78, %5 ; [#uses=1]
- %83 = fmul float %80, %5 ; [#uses=1]
- %84 = load float* %18, align 8 ; [#uses=1]
- %85 = fadd float %84, %81 ; [#uses=1]
- %86 = load float* %17, align 4 ; [#uses=1]
- %87 = fadd float %86, %82 ; [#uses=1]
- %88 = load float* %16, align 8 ; [#uses=1]
- %89 = fadd float %88, %83 ; [#uses=1]
- %90 = fsub float %85, %70 ; [#uses=2]
- %91 = fsub float %87, %72 ; [#uses=2]
- %92 = fsub float %89, %74 ; [#uses=2]
- %93 = fmul float %73, %92 ; [#uses=1]
- %94 = fmul float %71, %91 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %69, %90 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fcmp ogt float %97, %maxDot.0 ; [#uses=1]
- br i1 %98, label %bb6, label %bb7
-
-bb6: ; preds = %bb2
- store float %92, float* %scevgep65, align 4
- store float %91, float* %scevgep66, align 4
- store float %90, float* %scevgep67, align 4
- store float 0.000000e+00, float* %scevgep68, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb2
- %99 = add nsw i32 %j.064, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %99, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb7.bb_crit_edge
-
-bb7.bb_crit_edge: ; preds = %bb7
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %bb
-
-return: ; preds = %bb7, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK14btCapsuleShape21calculateLocalInertiaEfR9btVector3(%struct.btCapsuleShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %halfExtents = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = add nsw i32 %1, 2 ; [#uses=1]
- %3 = srem i32 %2, 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %3 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %5, float* %6, align 8
- %7 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %5, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %5, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 %1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fadd float %11, %13 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = load float* %6, align 8 ; [#uses=1]
- %16 = fadd float %15, 0x3FA47AE140000000 ; [#uses=1]
- %17 = fmul float %16, 2.000000e+00 ; [#uses=2]
- %18 = load float* %7, align 4 ; [#uses=1]
- %19 = fadd float %18, 0x3FA47AE140000000 ; [#uses=1]
- %20 = fmul float %19, 2.000000e+00 ; [#uses=2]
- %21 = load float* %8, align 8 ; [#uses=1]
- %22 = fadd float %21, 0x3FA47AE140000000 ; [#uses=1]
- %23 = fmul float %22, 2.000000e+00 ; [#uses=2]
- %24 = fmul float %17, %17 ; [#uses=2]
- %25 = fmul float %20, %20 ; [#uses=2]
- %26 = fmul float %23, %23 ; [#uses=2]
- %27 = fmul float %mass, 0x3FB5555540000000 ; [#uses=3]
- %28 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = fadd float %25, %26 ; [#uses=1]
- %30 = fmul float %29, %27 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = fadd float %24, %26 ; [#uses=1]
- %32 = fmul float %31, %27 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %32, float* %33, align 4
- %34 = fadd float %24, %25 ; [#uses=1]
- %35 = fmul float %34, %27 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %35, float* %36, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK14btCapsuleShape9serializeEPvP12btSerializer(%struct.btCapsuleShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 28 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %3 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 32 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %5 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.2.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %7 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.3.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %9 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %9, float* %8, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %scevgep.i2.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3.i = bitcast i8* %10 to float* ; [#uses=1]
- %11 = load float* %scevgep.i2.i, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.i3.i, align 4
- %scevgep.1.i4.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5.i = getelementptr i8* %dataBuffer, i32 16 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.1.i5.i to float* ; [#uses=1]
- %13 = load float* %scevgep.1.i4.i, align 4 ; [#uses=1]
- store float %13, float* %12, align 4
- %scevgep.2.i6.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7.i = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %14 = bitcast i8* %scevgep4.2.i7.i to float* ; [#uses=1]
- %15 = load float* %scevgep.2.i6.i, align 4 ; [#uses=1]
- store float %15, float* %14, align 4
- %scevgep.3.i8.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9.i = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.3.i9.i to float* ; [#uses=1]
- %17 = load float* %scevgep.3.i8.i, align 4 ; [#uses=1]
- store float %17, float* %16, align 4
- %18 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %21 = bitcast i8* %20 to float* ; [#uses=1]
- store float %19, float* %21, align 4
- %22 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %25 = bitcast i8* %24 to i32* ; [#uses=1]
- store i32 %23, i32* %25, align 4
- ret i8* getelementptr inbounds ([19 x i8]* @.str454, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btCapsuleShape15setLocalScalingERK9btVector3(%struct.btCapsuleShape* %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=4]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %17 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fdiv float %19, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fdiv float %22, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fdiv float %25, %33 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3(%struct.btConvexInternalShape* %4, %struct.btQuadWord* %scaling)
- %35 = load float* %26, align 4 ; [#uses=1]
- %36 = fmul float %28, %35 ; [#uses=1]
- %37 = load float* %29, align 4 ; [#uses=1]
- %38 = fmul float %31, %37 ; [#uses=1]
- %39 = load float* %32, align 4 ; [#uses=1]
- %40 = fmul float %34, %39 ; [#uses=1]
- %41 = fsub float %36, %6 ; [#uses=1]
- %42 = fsub float %38, %11 ; [#uses=1]
- %43 = fsub float %40, %16 ; [#uses=1]
- store float %43, float* %23, align 4
- store float %42, float* %20, align 4
- store float %41, float* %17, align 4
- %44 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btCapsuleShapeD0Ev(%struct.btCapsuleShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btCapsuleShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btCapsuleShapeD1Ev(%struct.btCapsuleShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK14btCapsuleShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btCapsuleShape* %this, %struct.btQuadWord* nocapture %vec0) align 2 {
-entry:
- %pos = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pos6 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = fmul float %5, %5 ; [#uses=1]
- %11 = fmul float %7, %7 ; [#uses=1]
- %12 = fadd float %10, %11 ; [#uses=1]
- %13 = fmul float %9, %9 ; [#uses=1]
- %14 = fadd float %12, %13 ; [#uses=2]
- %15 = fcmp olt float %14, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %15, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %16 = call float @sqrtf(float %14) nounwind readonly ; [#uses=1]
- %17 = fdiv float 1.000000e+00, %16 ; [#uses=3]
- %18 = fmul float %5, %17 ; [#uses=1]
- %19 = fmul float %7, %17 ; [#uses=1]
- %20 = fmul float %9, %17 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %entry
- %vec.0.0.0 = phi float [ %18, %bb1 ], [ 1.000000e+00, %entry ] ; [#uses=6]
- %vec.0.1.0 = phi float [ %19, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=6]
- %vec.0.2.0 = phi float [ %20, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=6]
- %21 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=2]
- %22 = load i32* %21, align 4 ; [#uses=3]
- %23 = add nsw i32 %22, 2 ; [#uses=1]
- %24 = srem i32 %23, 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %24 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=6]
- %27 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %27, align 8
- %28 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %29, align 8
- %30 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %22 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 %22 ; [#uses=1]
- store float %32, float* %33, align 4
- %34 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %35 = load i32 (...)*** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32 (...)** %35, i32 11 ; [#uses=1]
- %37 = load i32 (...)** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=2]
- %39 = bitcast i32 (...)* %37 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %40 = call float %39(%struct.btConvexInternalShape* %38) ; [#uses=3]
- %41 = fmul float %vec.0.2.0, %40 ; [#uses=1]
- %42 = fmul float %vec.0.1.0, %40 ; [#uses=1]
- %43 = fmul float %vec.0.0.0, %40 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fmul float %vec.0.2.0, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fmul float %vec.0.1.0, %48 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %vec.0.0.0, %51 ; [#uses=1]
- %53 = fmul float %46, %26 ; [#uses=1]
- %54 = fmul float %49, %26 ; [#uses=1]
- %55 = fmul float %52, %26 ; [#uses=1]
- %56 = load float* %29, align 8 ; [#uses=1]
- %57 = fadd float %56, %53 ; [#uses=1]
- %58 = load float* %28, align 4 ; [#uses=1]
- %59 = fadd float %58, %54 ; [#uses=1]
- %60 = load float* %27, align 8 ; [#uses=1]
- %61 = fadd float %60, %55 ; [#uses=1]
- %62 = fsub float %57, %41 ; [#uses=2]
- %63 = fsub float %59, %42 ; [#uses=2]
- %64 = fsub float %61, %43 ; [#uses=2]
- %65 = fmul float %vec.0.0.0, %64 ; [#uses=1]
- %66 = fmul float %vec.0.1.0, %63 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=1]
- %68 = fmul float %vec.0.2.0, %62 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=2]
- %70 = fcmp ogt float %69, 0xC3ABC16D60000000 ; [#uses=1]
- br i1 %70, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- store float %64, float* %0, align 4
- store float %63, float* %1, align 4
- store float %62, float* %2, align 4
- store float 0.000000e+00, float* %3, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %maxDot.0 = phi float [ %69, %bb3 ], [ 0xC3ABC16D60000000, %bb2 ] ; [#uses=1]
- %71 = getelementptr inbounds %struct.btQuadWord* %pos6, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %71, align 8
- %72 = getelementptr inbounds %struct.btQuadWord* %pos6, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %72, align 4
- %73 = getelementptr inbounds %struct.btQuadWord* %pos6, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %73, align 8
- %74 = getelementptr inbounds %struct.btQuadWord* %pos6, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %74, align 4
- %75 = load i32* %21, align 4 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 %75 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fsub float -0.000000e+00, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btQuadWord* %pos6, i32 0, i32 0, i32 %75 ; [#uses=1]
- store float %78, float* %79, align 4
- %80 = load i32 (...)*** %34, align 4 ; [#uses=1]
- %81 = getelementptr inbounds i32 (...)** %80, i32 11 ; [#uses=1]
- %82 = load i32 (...)** %81, align 4 ; [#uses=1]
- %83 = bitcast i32 (...)* %82 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %84 = call float %83(%struct.btConvexInternalShape* %38) ; [#uses=3]
- %85 = fmul float %vec.0.2.0, %84 ; [#uses=1]
- %86 = fmul float %vec.0.1.0, %84 ; [#uses=1]
- %87 = fmul float %vec.0.0.0, %84 ; [#uses=1]
- %88 = load float* %44, align 4 ; [#uses=1]
- %89 = fmul float %vec.0.2.0, %88 ; [#uses=1]
- %90 = load float* %47, align 4 ; [#uses=1]
- %91 = fmul float %vec.0.1.0, %90 ; [#uses=1]
- %92 = load float* %50, align 4 ; [#uses=1]
- %93 = fmul float %vec.0.0.0, %92 ; [#uses=1]
- %94 = fmul float %89, %26 ; [#uses=1]
- %95 = fmul float %91, %26 ; [#uses=1]
- %96 = fmul float %93, %26 ; [#uses=1]
- %97 = load float* %73, align 8 ; [#uses=1]
- %98 = fadd float %97, %94 ; [#uses=1]
- %99 = load float* %72, align 4 ; [#uses=1]
- %100 = fadd float %99, %95 ; [#uses=1]
- %101 = load float* %71, align 8 ; [#uses=1]
- %102 = fadd float %101, %96 ; [#uses=1]
- %103 = fsub float %98, %85 ; [#uses=2]
- %104 = fsub float %100, %86 ; [#uses=2]
- %105 = fsub float %102, %87 ; [#uses=2]
- %106 = fmul float %vec.0.0.0, %105 ; [#uses=1]
- %107 = fmul float %vec.0.1.0, %104 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %vec.0.2.0, %103 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fcmp ogt float %110, %maxDot.0 ; [#uses=1]
- br i1 %111, label %bb8, label %return
-
-bb8: ; preds = %bb4
- store float %105, float* %0, align 4
- store float %104, float* %1, align 4
- store float %103, float* %2, align 4
- store float 0.000000e+00, float* %3, align 4
- ret void
-
-return: ; preds = %bb4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCapsuleShapeZD0Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btCapsuleShapeX* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCapsuleShapeZD1Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCapsuleShapeXD0Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btCapsuleShapeX* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCapsuleShapeXD1Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btCapsuleShapeZC1Eff(%struct.btCapsuleShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 10, i32* %2, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btCapsuleShapeZ, i32 0, i32 2), i32 (...)*** %1, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- %4 = fmul float %height, 5.000000e-01 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %radius, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %radius, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %4, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btCapsuleShapeZC2Eff(%struct.btCapsuleShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 10, i32* %2, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btCapsuleShapeZ, i32 0, i32 2), i32 (...)*** %1, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- %4 = fmul float %height, 5.000000e-01 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %radius, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %radius, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %4, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btCapsuleShapeXC1Eff(%struct.btCapsuleShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 10, i32* %2, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btCapsuleShapeX, i32 0, i32 2), i32 (...)*** %1, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = fmul float %height, 5.000000e-01 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %4, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %radius, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btCapsuleShapeXC2Eff(%struct.btCapsuleShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 10, i32* %2, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btCapsuleShapeX, i32 0, i32 2), i32 (...)*** %1, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = fmul float %height, 5.000000e-01 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %4, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %radius, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btCapsuleShapeC1Eff(%struct.btCapsuleShape* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV14btCapsuleShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 10, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %3, align 4
- %4 = fmul float %height, 5.000000e-01 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %radius, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %4, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- ret void
-}
-
-; [#uses=0]
-define void @btBulletCollisionProbe() nounwind readnone {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK16btCollisionShape28calculateSerializeBufferSizeEv(%struct.btCollisionShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 12
-}
-
-; [#uses=1]
-define float @_ZNK16btCollisionShape27getContactBreakingThresholdEf(%struct.btCollisionShape* %this, float %defaultContactThreshold) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 4 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %5 = tail call float %4(%struct.btCollisionShape* %this) ; [#uses=1]
- %6 = fmul float %5, %defaultContactThreshold ; [#uses=1]
- ret float %6
-}
-
-; [#uses=10]
-define i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %this, i8* nocapture %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 10 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %5 = bitcast %struct.btCollisionShape* %this to i8* ; [#uses=1]
- %6 = tail call i8* %4(%struct.btActionInterface* %serializer, i8* %5) ; [#uses=2]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 7 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %11 = tail call i8* %10(%struct.btActionInterface* %serializer, i8* %6) ; [#uses=2]
- %12 = bitcast i8* %dataBuffer to i8** ; [#uses=1]
- store i8* %11, i8** %12, align 4
- %13 = icmp eq i8* %11, null ; [#uses=1]
- br i1 %13, label %bb1, label %bb
-
-bb: ; preds = %entry
- %14 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 12 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- tail call void %17(%struct.btActionInterface* %serializer, i8* %6)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %18 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 1 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 4 ; [#uses=1]
- %21 = bitcast i8* %20 to i32* ; [#uses=1]
- store i32 %19, i32* %21, align 4
- ret i8* getelementptr inbounds ([21 x i8]* @.str55, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK16btCollisionShape20serializeSingleShapeEP12btSerializer(%struct.btCollisionShape* %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 12 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i32 (%struct.btCollisionShape*)* ; [#uses=1]
- %5 = tail call i32 %4(%struct.btCollisionShape* %this) ; [#uses=1]
- %6 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %11 = tail call %struct.btChunk* %10(%struct.btActionInterface* %serializer, i32 %5, i32 1) ; [#uses=2]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 13 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btChunk* %11, i32 0, i32 2 ; [#uses=1]
- %16 = load i8** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %14 to i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %18 = tail call i8* %17(%struct.btCollisionShape* %this, i8* %16, %struct.btActionInterface* %serializer) ; [#uses=1]
- %19 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 5 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast %struct.btCollisionShape* %this to i8* ; [#uses=1]
- %23 = bitcast i32 (...)* %21 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %23(%struct.btActionInterface* %serializer, %struct.btChunk* %11, i8* %18, i32 1346455635, i8* %22)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionShapeD0Ev(%struct.btCollisionShape* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV16btCollisionShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btCollisionShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionShapeD1Ev(%struct.btCollisionShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV16btCollisionShape, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btCollisionShape17getBoundingSphereER9btVector3Rf(%struct.btCollisionShape* %this, %struct.btQuadWord* nocapture %center, float* nocapture %radius) align 2 {
-entry:
- %tr = alloca %struct.btTransform, align 8 ; [#uses=17]
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 8
- %1 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 8
- %11 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 8
- %13 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 8
- %15 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 2 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %19 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %20(%struct.btCollisionShape* %this, %struct.btTransform* %tr, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 8 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 8 ; [#uses=2]
- %25 = fsub float %22, %24 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fsub float %27, %29 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 8 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 8 ; [#uses=2]
- %35 = fsub float %32, %34 ; [#uses=2]
- %36 = fmul float %35, %35 ; [#uses=1]
- %37 = fmul float %30, %30 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = fmul float %25, %25 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = call float @sqrtf(float %40) nounwind readonly ; [#uses=1]
- %42 = fmul float %41, 5.000000e-01 ; [#uses=1]
- store float %42, float* %radius, align 4
- %43 = fadd float %24, %22 ; [#uses=1]
- %44 = fadd float %29, %27 ; [#uses=1]
- %45 = fadd float %34, %32 ; [#uses=1]
- %46 = fmul float %43, 5.000000e-01 ; [#uses=1]
- %47 = fmul float %44, 5.000000e-01 ; [#uses=1]
- %48 = fmul float %45, 5.000000e-01 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %48, float* %49, align 4
- %50 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %47, float* %50, align 4
- %51 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %46, float* %51, align 4
- %52 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK16btCollisionShape20getAngularMotionDiscEv(%struct.btCollisionShape* %this) align 2 {
-entry:
- %center = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %disc = alloca float, align 4 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 3 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btCollisionShape*, %struct.btQuadWord*, float*)* ; [#uses=1]
- call void %4(%struct.btCollisionShape* %this, %struct.btQuadWord* %center, float* %disc)
- %5 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 8 ; [#uses=2]
- %7 = fmul float %6, %6 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=2]
- %10 = fmul float %9, %9 ; [#uses=1]
- %11 = fadd float %7, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %center, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 8 ; [#uses=2]
- %14 = fmul float %13, %13 ; [#uses=1]
- %15 = fadd float %11, %14 ; [#uses=1]
- %16 = call float @sqrtf(float %15) nounwind readonly ; [#uses=1]
- %17 = load float* %disc, align 4 ; [#uses=1]
- %18 = fadd float %16, %17 ; [#uses=1]
- ret float %18
-}
-
-; [#uses=2]
-define void @_ZNK16btCollisionShape21calculateTemporalAabbERK11btTransformRK9btVector3S5_fRS3_S6_(%struct.btCollisionShape* %this, %struct.btTransform* %curTrans, %struct.btQuadWord* nocapture %linvel, %struct.btQuadWord* nocapture %angvel, float %timeStep, %struct.btQuadWord* %temporalAabbMin, %struct.btQuadWord* %temporalAabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionShape* %this, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 2 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btCollisionShape* %this, %struct.btTransform* %curTrans, %struct.btQuadWord* %temporalAabbMin, %struct.btQuadWord* %temporalAabbMax)
- %5 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 0 ; [#uses=4]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 1 ; [#uses=4]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 2 ; [#uses=4]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 0 ; [#uses=4]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 1 ; [#uses=4]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 2 ; [#uses=4]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btQuadWord* %linvel, i32 0, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %18, %timeStep ; [#uses=3]
- %20 = getelementptr inbounds %struct.btQuadWord* %linvel, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fmul float %21, %timeStep ; [#uses=3]
- %23 = getelementptr inbounds %struct.btQuadWord* %linvel, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fmul float %24, %timeStep ; [#uses=3]
- %26 = fcmp ogt float %25, 0.000000e+00 ; [#uses=1]
- br i1 %26, label %bb, label %bb1
-
-bb: ; preds = %entry
- %27 = fadd float %25, %6 ; [#uses=1]
- br label %bb2
-
-bb1: ; preds = %entry
- %28 = fadd float %25, %12 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %temporalAabbMinx.0 = phi float [ %12, %bb ], [ %28, %bb1 ] ; [#uses=1]
- %temporalAabbMaxx.0 = phi float [ %27, %bb ], [ %6, %bb1 ] ; [#uses=1]
- %29 = fcmp ogt float %22, 0.000000e+00 ; [#uses=1]
- br i1 %29, label %bb4, label %bb5
-
-bb4: ; preds = %bb2
- %30 = fadd float %22, %8 ; [#uses=1]
- br label %bb6
-
-bb5: ; preds = %bb2
- %31 = fadd float %22, %14 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %temporalAabbMiny.0 = phi float [ %14, %bb4 ], [ %31, %bb5 ] ; [#uses=1]
- %temporalAabbMaxy.0 = phi float [ %30, %bb4 ], [ %8, %bb5 ] ; [#uses=1]
- %32 = fcmp ogt float %19, 0.000000e+00 ; [#uses=1]
- br i1 %32, label %bb8, label %bb9
-
-bb8: ; preds = %bb6
- %33 = fadd float %19, %10 ; [#uses=1]
- br label %bb10
-
-bb9: ; preds = %bb6
- %34 = fadd float %19, %16 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %temporalAabbMaxz.0 = phi float [ %33, %bb8 ], [ %10, %bb9 ] ; [#uses=1]
- %temporalAabbMinz.0 = phi float [ %16, %bb8 ], [ %34, %bb9 ] ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %angvel, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %36 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %angvel, i32 0, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = fmul float %39, %39 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %angvel, i32 0, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=2]
- %44 = fmul float %43, %43 ; [#uses=1]
- %45 = fadd float %41, %44 ; [#uses=1]
- %46 = tail call float @sqrtf(float %45) nounwind readonly ; [#uses=1]
- %47 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %48 = getelementptr inbounds i32 (...)** %47, i32 4 ; [#uses=1]
- %49 = load i32 (...)** %48, align 4 ; [#uses=1]
- %50 = bitcast i32 (...)* %49 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %51 = tail call float %50(%struct.btCollisionShape* %this) ; [#uses=1]
- %52 = fmul float %46, %51 ; [#uses=1]
- %53 = fmul float %52, %timeStep ; [#uses=6]
- store float %temporalAabbMinx.0, float* %11, align 4
- store float %temporalAabbMiny.0, float* %13, align 4
- store float %temporalAabbMinz.0, float* %15, align 4
- %54 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- store float %temporalAabbMaxx.0, float* %5, align 4
- store float %temporalAabbMaxy.0, float* %7, align 4
- store float %temporalAabbMaxz.0, float* %9, align 4
- %55 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %55, align 4
- %56 = load float* %11, align 4 ; [#uses=1]
- %57 = fsub float %56, %53 ; [#uses=1]
- store float %57, float* %11, align 4
- %58 = load float* %13, align 4 ; [#uses=1]
- %59 = fsub float %58, %53 ; [#uses=1]
- store float %59, float* %13, align 4
- %60 = load float* %15, align 4 ; [#uses=1]
- %61 = fsub float %60, %53 ; [#uses=1]
- store float %61, float* %15, align 4
- %62 = load float* %5, align 4 ; [#uses=1]
- %63 = fadd float %62, %53 ; [#uses=1]
- store float %63, float* %5, align 4
- %64 = load float* %7, align 4 ; [#uses=1]
- %65 = fadd float %64, %53 ; [#uses=1]
- store float %65, float* %7, align 4
- %66 = load float* %9, align 4 ; [#uses=1]
- %67 = fadd float %66, %53 ; [#uses=1]
- store float %67, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShapeC2Eb(%struct.btCompoundShape* nocapture %this, i8 zeroext %enableDynamicAabbTree) align 2 {
-invcont:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8* null, i8** %2, align 4
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btCompoundShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %3 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %3, align 4
- %4 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %4, align 4
- %5 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %8, align 4
- %9 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %9, align 4
- %10 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %11, align 4
- %12 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %12, align 4
- %13 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %13, align 4
- %14 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=2]
- store %struct.btDbvt* null, %struct.btDbvt** %15, align 4
- %16 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 5 ; [#uses=1]
- store i32 1, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- store i32 31, i32* %1, align 4
- %toBool = icmp eq i8 %enableDynamicAabbTree, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %invcont
- %22 = invoke i8* @_Z22btAlignedAllocInternalji(i32 40, i32 16)
- to label %invcont1 unwind label %lpad19 ; [#uses=2]
-
-invcont1: ; preds = %bb
- %23 = bitcast i8* %22 to %struct.btDbvt* ; [#uses=2]
- %24 = icmp eq i8* %22, null ; [#uses=1]
- br i1 %24, label %bb7, label %bb2
-
-bb2: ; preds = %invcont1
- invoke void @_ZN6btDbvtC1Ev(%struct.btDbvt* %23)
- to label %bb7 unwind label %lpad23
-
-bb7: ; preds = %bb2, %invcont1
- store %struct.btDbvt* %23, %struct.btDbvt** %15, align 4
- ret void
-
-return: ; preds = %invcont
- ret void
-
-lpad19: ; preds = %bb
- %eh_ptr20 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr20, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad31
-
-lpad23: ; preds = %bb2
- %eh_ptr24 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select26 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad31
-
-lpad27: ; preds = %bb1.i.i.i
- %eh_ptr28 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select30 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %ppad31
- store i8 1, i8* %3, align 4
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %4, align 4
- store i32 0, i32* %5, align 4
- store i32 0, i32* %6, align 4
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV16btCollisionShape, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-ppad31: ; preds = %lpad23, %lpad19
- %eh_exception.0 = phi i8* [ %eh_ptr24, %lpad23 ], [ %eh_ptr20, %lpad19 ] ; [#uses=1]
- %25 = load %struct.btCompoundShapeChild** %4, align 4 ; [#uses=2]
- %26 = icmp eq %struct.btCompoundShapeChild* %25, null ; [#uses=1]
- br i1 %26, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad31
- %27 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %28 = bitcast %struct.btCompoundShapeChild* %25 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %28)
- to label %bb2.i.i.i unwind label %lpad27
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %4, align 4
- br label %ppad
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btQuadWord* @_ZNK15btCompoundShape15getLocalScalingEv(%struct.btCompoundShape* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCompoundShape9setMarginEf(%struct.btCompoundShape* nocapture %this, float %margin) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 6 ; [#uses=1]
- store float %margin, float* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZNK15btCompoundShape9getMarginEv(%struct.btCompoundShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK15btCompoundShape7getNameEv(%struct.btCompoundShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([9 x i8]* @.str62, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btCompoundShape28calculateSerializeBufferSizeEv(%struct.btCompoundShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 24
-}
-
-; [#uses=1]
-define void @_ZNK15btCompoundShape21calculateLocalInertiaEfR9btVector3(%struct.btCompoundShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %ident = alloca %struct.btTransform, align 8 ; [#uses=17]
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 8
- %1 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 8
- %11 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 8
- %13 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 8
- %15 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 2 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %19 to void (%struct.btCompoundShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %20(%struct.btCompoundShape* %this, %struct.btTransform* %ident, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 8 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 8 ; [#uses=1]
- %25 = fsub float %22, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fsub float %27, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 8 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 8 ; [#uses=1]
- %35 = fsub float %32, %34 ; [#uses=1]
- %36 = fmul float %25, 5.000000e-01 ; [#uses=1]
- %37 = fmul float %30, 5.000000e-01 ; [#uses=1]
- %38 = fmul float %35, 5.000000e-01 ; [#uses=1]
- %39 = fmul float %38, 2.000000e+00 ; [#uses=2]
- %40 = fmul float %37, 2.000000e+00 ; [#uses=2]
- %41 = fmul float %36, 2.000000e+00 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = fdiv float %mass, 1.200000e+01 ; [#uses=3]
- %44 = fmul float %40, %40 ; [#uses=2]
- %45 = fmul float %41, %41 ; [#uses=2]
- %46 = fadd float %44, %45 ; [#uses=1]
- %47 = fmul float %43, %46 ; [#uses=1]
- store float %47, float* %42, align 4
- %48 = fmul float %39, %39 ; [#uses=2]
- %49 = fadd float %48, %45 ; [#uses=1]
- %50 = fmul float %43, %49 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %50, float* %51, align 4
- %52 = fadd float %48, %44 ; [#uses=1]
- %53 = fmul float %43, %52 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %53, float* %54, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btCompoundShape7getAabbERK11btTransformR9btVector3S4_(%struct.btCompoundShape* %this, %struct.btTransform* nocapture %trans, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = fmul float %4, 5.000000e-01 ; [#uses=1]
- %16 = fmul float %9, 5.000000e-01 ; [#uses=1]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=1]
- %18 = fadd float %1, %3 ; [#uses=1]
- %19 = fadd float %6, %8 ; [#uses=1]
- %20 = fadd float %11, %13 ; [#uses=1]
- %21 = fmul float %18, 5.000000e-01 ; [#uses=1]
- %22 = fmul float %19, 5.000000e-01 ; [#uses=1]
- %23 = fmul float %20, 5.000000e-01 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = icmp eq i32 %25, 0 ; [#uses=1]
- br i1 %26, label %bb, label %bb1
-
-bb: ; preds = %entry
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %localHalfExtents.0.0.0 = phi float [ 0.000000e+00, %bb ], [ %17, %entry ] ; [#uses=1]
- %localHalfExtents.0.1.0 = phi float [ 0.000000e+00, %bb ], [ %16, %entry ] ; [#uses=1]
- %localHalfExtents.0.2.0 = phi float [ 0.000000e+00, %bb ], [ %15, %entry ] ; [#uses=1]
- %localCenter.0.0.0 = phi float [ 0.000000e+00, %bb ], [ %23, %entry ] ; [#uses=3]
- %localCenter.0.1.0 = phi float [ 0.000000e+00, %bb ], [ %22, %entry ] ; [#uses=3]
- %localCenter.0.2.0 = phi float [ 0.000000e+00, %bb ], [ %21, %entry ] ; [#uses=3]
- %27 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %28 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 11 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to float (%struct.btCompoundShape*)* ; [#uses=1]
- %32 = tail call float %31(%struct.btCompoundShape* %this) ; [#uses=1]
- %33 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i32 (...)** %33, i32 11 ; [#uses=1]
- %35 = load i32 (...)** %34, align 4 ; [#uses=1]
- %36 = bitcast i32 (...)* %35 to float (%struct.btCompoundShape*)* ; [#uses=1]
- %37 = tail call float %36(%struct.btCompoundShape* %this) ; [#uses=1]
- %38 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32 (...)** %38, i32 11 ; [#uses=1]
- %40 = load i32 (...)** %39, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %40 to float (%struct.btCompoundShape*)* ; [#uses=1]
- %42 = tail call float %41(%struct.btCompoundShape* %this) ; [#uses=1]
- %43 = fadd float %localHalfExtents.0.0.0, %42 ; [#uses=3]
- %44 = fadd float %localHalfExtents.0.1.0, %37 ; [#uses=3]
- %45 = fadd float %localHalfExtents.0.2.0, %32 ; [#uses=3]
- %46 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = tail call float @fabsf(float %47) nounwind readnone ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = tail call float @fabsf(float %50) nounwind readnone ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = tail call float @fabsf(float %53) nounwind readnone ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=2]
- %57 = tail call float @fabsf(float %56) nounwind readnone ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = tail call float @fabsf(float %59) nounwind readnone ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=2]
- %63 = tail call float @fabsf(float %62) nounwind readnone ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=2]
- %66 = tail call float @fabsf(float %65) nounwind readnone ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=2]
- %69 = tail call float @fabsf(float %68) nounwind readnone ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=2]
- %72 = tail call float @fabsf(float %71) nounwind readnone ; [#uses=1]
- %73 = fmul float %53, %localCenter.0.0.0 ; [#uses=1]
- %74 = fmul float %50, %localCenter.0.1.0 ; [#uses=1]
- %75 = fadd float %73, %74 ; [#uses=1]
- %76 = fmul float %47, %localCenter.0.2.0 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=2]
- %81 = fmul float %62, %localCenter.0.0.0 ; [#uses=1]
- %82 = fmul float %59, %localCenter.0.1.0 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = fmul float %56, %localCenter.0.2.0 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = fadd float %85, %87 ; [#uses=2]
- %89 = fmul float %71, %localCenter.0.0.0 ; [#uses=1]
- %90 = fmul float %68, %localCenter.0.1.0 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %65, %localCenter.0.2.0 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fadd float %93, %95 ; [#uses=2]
- %97 = fmul float %54, %43 ; [#uses=1]
- %98 = fmul float %51, %44 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %48, %45 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=2]
- %102 = fmul float %63, %43 ; [#uses=1]
- %103 = fmul float %60, %44 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fmul float %57, %45 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=2]
- %107 = fmul float %72, %43 ; [#uses=1]
- %108 = fmul float %69, %44 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- %110 = fmul float %66, %45 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=2]
- %112 = fsub float %80, %101 ; [#uses=1]
- %113 = fsub float %88, %106 ; [#uses=1]
- %114 = fsub float %96, %111 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %114, float* %115, align 4
- %116 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %113, float* %116, align 4
- %117 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %112, float* %117, align 4
- %118 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %118, align 4
- %119 = fadd float %80, %101 ; [#uses=1]
- %120 = fadd float %88, %106 ; [#uses=1]
- %121 = fadd float %96, %111 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %121, float* %122, align 4
- %123 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %120, float* %123, align 4
- %124 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %119, float* %124, align 4
- %125 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %125, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShape20recalculateLocalAabbEv(%struct.btCompoundShape* nocapture %this) align 2 {
-entry:
- %localAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %localAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- store float 0x43ABC16D60000000, float* %0, align 4
- %1 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- store float 0x43ABC16D60000000, float* %1, align 4
- %2 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- store float 0x43ABC16D60000000, float* %2, align 4
- %3 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=3]
- store float 0xC3ABC16D60000000, float* %4, align 4
- %5 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=3]
- store float 0xC3ABC16D60000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=3]
- store float 0xC3ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = icmp sgt i32 %9, 0 ; [#uses=1]
- br i1 %10, label %bb.nph22, label %return
-
-bb.nph22: ; preds = %entry
- %11 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.nph
-
-bb.nph: ; preds = %bb8, %bb.nph22
- %j.021 = phi i32 [ 0, %bb.nph22 ], [ %tmp, %bb8 ] ; [#uses=3]
- %tmp = add i32 %j.021, 1 ; [#uses=2]
- %12 = load %struct.btCompoundShapeChild** %11, align 4 ; [#uses=2]
- %scevgep26 = getelementptr %struct.btCompoundShapeChild* %12, i32 %j.021, i32 1 ; [#uses=1]
- %13 = load %struct.btCollisionShape** %scevgep26, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btCollisionShape* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 2 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %scevgep2728 = getelementptr inbounds %struct.btCompoundShapeChild* %12, i32 %j.021, i32 0 ; [#uses=1]
- call void %18(%struct.btCollisionShape* %13, %struct.btTransform* %scevgep2728, %struct.btQuadWord* %localAabbMin, %struct.btQuadWord* %localAabbMax)
- %scevgep23 = getelementptr %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep25 = getelementptr %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %0, align 4 ; [#uses=1]
- %20 = load float* %scevgep23, align 8 ; [#uses=2]
- %21 = fcmp ogt float %19, %20 ; [#uses=1]
- br i1 %21, label %bb2, label %bb3
-
-bb2: ; preds = %bb.nph
- store float %20, float* %0, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %bb.nph
- %22 = load float* %4, align 4 ; [#uses=1]
- %23 = load float* %scevgep25, align 8 ; [#uses=2]
- %24 = fcmp olt float %22, %23 ; [#uses=1]
- br i1 %24, label %bb5, label %bb6
-
-bb5: ; preds = %bb3
- store float %23, float* %4, align 4
- br label %bb6
-
-bb6: ; preds = %bb5, %bb3
- %scevgep23.1 = getelementptr %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep25.1 = getelementptr %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %1, align 4 ; [#uses=1]
- %26 = load float* %scevgep23.1, align 4 ; [#uses=2]
- %27 = fcmp ogt float %25, %26 ; [#uses=1]
- br i1 %27, label %bb2.1, label %bb3.1
-
-bb8: ; preds = %bb5.2, %bb3.2
- %28 = load i32* %8, align 4 ; [#uses=1]
- %29 = icmp sgt i32 %28, %tmp ; [#uses=1]
- br i1 %29, label %bb.nph, label %return
-
-return: ; preds = %bb8, %entry
- ret void
-
-bb6.1: ; preds = %bb5.1, %bb3.1
- %scevgep23.2 = getelementptr %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep25.2 = getelementptr %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %2, align 4 ; [#uses=1]
- %31 = load float* %scevgep23.2, align 8 ; [#uses=2]
- %32 = fcmp ogt float %30, %31 ; [#uses=1]
- br i1 %32, label %bb2.2, label %bb3.2
-
-bb3.1: ; preds = %bb2.1, %bb6
- %33 = load float* %5, align 4 ; [#uses=1]
- %34 = load float* %scevgep25.1, align 4 ; [#uses=2]
- %35 = fcmp olt float %33, %34 ; [#uses=1]
- br i1 %35, label %bb5.1, label %bb6.1
-
-bb2.1: ; preds = %bb6
- store float %26, float* %1, align 4
- br label %bb3.1
-
-bb5.1: ; preds = %bb3.1
- store float %34, float* %5, align 4
- br label %bb6.1
-
-bb3.2: ; preds = %bb2.2, %bb6.1
- %36 = load float* %6, align 4 ; [#uses=1]
- %37 = load float* %scevgep25.2, align 8 ; [#uses=2]
- %38 = fcmp olt float %36, %37 ; [#uses=1]
- br i1 %38, label %bb5.2, label %bb8
-
-bb2.2: ; preds = %bb6.1
- store float %31, float* %2, align 4
- br label %bb3.2
-
-bb5.2: ; preds = %bb3.2
- store float %37, float* %6, align 4
- br label %bb8
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI20btCompoundShapeChildE4swapEii(%"struct.btAlignedObjectArray<btCompoundShapeChild>"* nocapture %this, i32 %index0, i32 %index1) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 3 ; [#uses=2]
- %1 = load %struct.btCompoundShapeChild** %0, align 4 ; [#uses=40]
- %2 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 1 ; [#uses=2]
- %35 = load %struct.btCollisionShape** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 2 ; [#uses=2]
- %37 = load i32* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 3 ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index0, i32 4 ; [#uses=2]
- %41 = load %struct.btDbvtNode** %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %2, align 4
- %44 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %4, align 4
- %46 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %6, align 4
- %48 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %8, align 4
- %50 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %10, align 4
- %52 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %12, align 4
- %54 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %14, align 4
- %56 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %16, align 4
- %58 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %18, align 4
- %60 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %20, align 4
- %62 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %22, align 4
- %64 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %24, align 4
- %66 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %26, align 4
- %68 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %28, align 4
- %70 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %30, align 4
- %72 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %32, align 4
- %74 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 1 ; [#uses=1]
- %75 = load %struct.btCollisionShape** %74, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %75, %struct.btCollisionShape** %34, align 4
- %76 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 2 ; [#uses=1]
- %77 = load i32* %76, align 4 ; [#uses=1]
- store i32 %77, i32* %36, align 4
- %78 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 3 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %38, align 4
- %80 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %index1, i32 4 ; [#uses=1]
- %81 = load %struct.btDbvtNode** %80, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %81, %struct.btDbvtNode** %40, align 4
- %82 = load %struct.btCompoundShapeChild** %0, align 4 ; [#uses=20]
- %83 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %3, float* %83, align 4
- %84 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %5, float* %84, align 4
- %85 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %7, float* %85, align 4
- %86 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %9, float* %86, align 4
- %87 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %11, float* %87, align 4
- %88 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %13, float* %88, align 4
- %89 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %89, align 4
- %90 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %17, float* %90, align 4
- %91 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %19, float* %91, align 4
- %92 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %92, align 4
- %93 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %23, float* %93, align 4
- %94 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %25, float* %94, align 4
- %95 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %27, float* %95, align 4
- %96 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %29, float* %96, align 4
- %97 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %31, float* %97, align 4
- %98 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %33, float* %98, align 4
- %99 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 1 ; [#uses=1]
- store %struct.btCollisionShape* %35, %struct.btCollisionShape** %99, align 4
- %100 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 2 ; [#uses=1]
- store i32 %37, i32* %100, align 4
- %101 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 3 ; [#uses=1]
- store float %39, float* %101, align 4
- %102 = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %index1, i32 4 ; [#uses=1]
- store %struct.btDbvtNode* %41, %struct.btDbvtNode** %102, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK20btAlignedObjectArrayI20btCompoundShapeChildE4copyEiiPS0_(%"struct.btAlignedObjectArray<btCompoundShapeChild>"* nocapture %this, i32 %start, i32 %end, %struct.btCompoundShapeChild* nocapture %dest) nounwind inlinehint align 2 {
-entry:
- %0 = icmp slt i32 %start, %end ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 3 ; [#uses=1]
- %tmp = sub i32 %end, %start ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %tmp4 = add i32 %indvar, %start ; [#uses=40]
- %scevgep5 = getelementptr inbounds %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep1415 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep20 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep2425 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep28 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep30 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep32 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep34 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep36 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep38 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep40 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep43 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 1 ; [#uses=1]
- %scevgep45 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 2 ; [#uses=1]
- %scevgep47 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 3 ; [#uses=1]
- %scevgep49 = getelementptr %struct.btCompoundShapeChild* %dest, i32 %tmp4, i32 4 ; [#uses=1]
- %2 = load %struct.btCompoundShapeChild** %1, align 4 ; [#uses=20]
- %scevgep67 = getelementptr inbounds %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %scevgep67, align 4 ; [#uses=1]
- store float %3, float* %scevgep5, align 4
- %scevgep9 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %scevgep9, align 4 ; [#uses=1]
- store float %4, float* %scevgep8, align 4
- %scevgep11 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %scevgep11, align 4 ; [#uses=1]
- store float %5, float* %scevgep10, align 4
- %scevgep13 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %6 = load float* %scevgep13, align 4 ; [#uses=1]
- store float %6, float* %scevgep12, align 4
- %scevgep1617 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %scevgep1617, align 4 ; [#uses=1]
- store float %7, float* %scevgep1415, align 4
- %scevgep19 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %scevgep19, align 4 ; [#uses=1]
- store float %8, float* %scevgep18, align 4
- %scevgep21 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %scevgep21, align 4 ; [#uses=1]
- store float %9, float* %scevgep20, align 4
- %scevgep23 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %10 = load float* %scevgep23, align 4 ; [#uses=1]
- store float %10, float* %scevgep22, align 4
- %scevgep2627 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %scevgep2627, align 4 ; [#uses=1]
- store float %11, float* %scevgep2425, align 4
- %scevgep29 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %scevgep29, align 4 ; [#uses=1]
- store float %12, float* %scevgep28, align 4
- %scevgep31 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %scevgep31, align 4 ; [#uses=1]
- store float %13, float* %scevgep30, align 4
- %scevgep33 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %scevgep33, align 4 ; [#uses=1]
- store float %14, float* %scevgep32, align 4
- %scevgep35 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %scevgep35, align 4 ; [#uses=1]
- store float %15, float* %scevgep34, align 4
- %scevgep37 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %scevgep37, align 4 ; [#uses=1]
- store float %16, float* %scevgep36, align 4
- %scevgep39 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %scevgep39, align 4 ; [#uses=1]
- store float %17, float* %scevgep38, align 4
- %scevgep41 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %18 = load float* %scevgep41, align 4 ; [#uses=1]
- store float %18, float* %scevgep40, align 4
- %scevgep42 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 1 ; [#uses=1]
- %19 = load %struct.btCollisionShape** %scevgep42, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %19, %struct.btCollisionShape** %scevgep43, align 4
- %scevgep44 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 2 ; [#uses=1]
- %20 = load i32* %scevgep44, align 4 ; [#uses=1]
- store i32 %20, i32* %scevgep45, align 4
- %scevgep46 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 3 ; [#uses=1]
- %21 = load float* %scevgep46, align 4 ; [#uses=1]
- store float %21, float* %scevgep47, align 4
- %scevgep48 = getelementptr %struct.btCompoundShapeChild* %2, i32 %tmp4, i32 4 ; [#uses=1]
- %22 = load %struct.btDbvtNode** %scevgep48, align 4 ; [#uses=1]
- store %struct.btDbvtNode* %22, %struct.btDbvtNode** %scevgep49, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZNK15btCompoundShape9serializeEPvP12btSerializer(%struct.btCompoundShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 6 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i8* %dataBuffer, i32 20 ; [#uses=1]
- %5 = bitcast i8* %4 to float* ; [#uses=1]
- store float %3, float* %5, align 4
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds i8* %dataBuffer, i32 16 ; [#uses=1]
- %9 = bitcast i8* %8 to i32* ; [#uses=3]
- store i32 %7, i32* %9, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %11 = bitcast i8* %10 to %struct.btCompoundShapeChildData** ; [#uses=2]
- store %struct.btCompoundShapeChildData* null, %struct.btCompoundShapeChildData** %11, align 4
- %12 = icmp eq i32 %7, 0 ; [#uses=1]
- br i1 %12, label %bb7, label %bb
-
-bb: ; preds = %entry
- %13 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=7]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 4 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %18 = tail call %struct.btChunk* %17(%struct.btActionInterface* %serializer, i32 76, i32 %7) ; [#uses=2]
- %19 = getelementptr inbounds %struct.btChunk* %18, i32 0, i32 2 ; [#uses=2]
- %20 = load i8** %19, align 4 ; [#uses=20]
- %21 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 7 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %23 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %25 = tail call i8* %24(%struct.btActionInterface* %serializer, i8* %20) ; [#uses=1]
- %26 = bitcast i8* %25 to %struct.btCompoundShapeChildData* ; [#uses=1]
- store %struct.btCompoundShapeChildData* %26, %struct.btCompoundShapeChildData** %11, align 4
- %27 = load i32* %9, align 4 ; [#uses=1]
- %28 = icmp sgt i32 %27, 0 ; [#uses=1]
- br i1 %28, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb
- %29 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=8]
- br label %bb1
-
-bb1: ; preds = %bb4, %bb.nph
- %i.010 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb4 ] ; [#uses=25]
- %tmp = add i32 %i.010, 1 ; [#uses=2]
- %tmp36 = mul i32 %i.010, 76 ; [#uses=19]
- %tmp37 = add i32 %tmp36, 72 ; [#uses=1]
- %scevgep38 = getelementptr i8* %20, i32 %tmp37 ; [#uses=1]
- %scevgep3839 = bitcast i8* %scevgep38 to float* ; [#uses=1]
- %tmp40 = add i32 %tmp36, 64 ; [#uses=1]
- %scevgep41 = getelementptr i8* %20, i32 %tmp40 ; [#uses=1]
- %scevgep4142 = bitcast i8* %scevgep41 to %struct.btCollisionShapeData** ; [#uses=1]
- %tmp43 = add i32 %tmp36, 68 ; [#uses=1]
- %scevgep44 = getelementptr i8* %20, i32 %tmp43 ; [#uses=1]
- %scevgep4445 = bitcast i8* %scevgep44 to i32* ; [#uses=1]
- %scevgep46 = getelementptr i8* %20, i32 %tmp36 ; [#uses=1]
- %scevgep4.i.i.i = bitcast i8* %scevgep46 to float* ; [#uses=1]
- %tmp48 = add i32 %tmp36, 4 ; [#uses=1]
- %scevgep49 = getelementptr i8* %20, i32 %tmp48 ; [#uses=1]
- %scevgep4.1.i.i.i = bitcast i8* %scevgep49 to float* ; [#uses=1]
- %tmp51 = add i32 %tmp36, 8 ; [#uses=1]
- %scevgep52 = getelementptr i8* %20, i32 %tmp51 ; [#uses=1]
- %scevgep4.2.i.i.i = bitcast i8* %scevgep52 to float* ; [#uses=1]
- %tmp54 = add i32 %tmp36, 12 ; [#uses=1]
- %scevgep55 = getelementptr i8* %20, i32 %tmp54 ; [#uses=1]
- %scevgep4.3.i.i.i = bitcast i8* %scevgep55 to float* ; [#uses=1]
- %tmp57 = add i32 %tmp36, 16 ; [#uses=1]
- %scevgep58 = getelementptr i8* %20, i32 %tmp57 ; [#uses=1]
- %scevgep4.i.1.i.i = bitcast i8* %scevgep58 to float* ; [#uses=1]
- %tmp60 = add i32 %tmp36, 20 ; [#uses=1]
- %scevgep61 = getelementptr i8* %20, i32 %tmp60 ; [#uses=1]
- %scevgep4.1.i.1.i.i = bitcast i8* %scevgep61 to float* ; [#uses=1]
- %tmp63 = add i32 %tmp36, 24 ; [#uses=1]
- %scevgep64 = getelementptr i8* %20, i32 %tmp63 ; [#uses=1]
- %scevgep4.2.i.1.i.i = bitcast i8* %scevgep64 to float* ; [#uses=1]
- %tmp66 = add i32 %tmp36, 28 ; [#uses=1]
- %scevgep67 = getelementptr i8* %20, i32 %tmp66 ; [#uses=1]
- %scevgep4.3.i.1.i.i = bitcast i8* %scevgep67 to float* ; [#uses=1]
- %tmp69 = add i32 %tmp36, 32 ; [#uses=1]
- %scevgep70 = getelementptr i8* %20, i32 %tmp69 ; [#uses=1]
- %scevgep4.i.2.i.i = bitcast i8* %scevgep70 to float* ; [#uses=1]
- %tmp72 = add i32 %tmp36, 36 ; [#uses=1]
- %scevgep73 = getelementptr i8* %20, i32 %tmp72 ; [#uses=1]
- %scevgep4.1.i.2.i.i = bitcast i8* %scevgep73 to float* ; [#uses=1]
- %tmp75 = add i32 %tmp36, 40 ; [#uses=1]
- %scevgep76 = getelementptr i8* %20, i32 %tmp75 ; [#uses=1]
- %scevgep4.2.i.2.i.i = bitcast i8* %scevgep76 to float* ; [#uses=1]
- %tmp78 = add i32 %tmp36, 44 ; [#uses=1]
- %scevgep79 = getelementptr i8* %20, i32 %tmp78 ; [#uses=1]
- %scevgep4.3.i.2.i.i = bitcast i8* %scevgep79 to float* ; [#uses=1]
- %tmp81 = add i32 %tmp36, 48 ; [#uses=1]
- %scevgep82 = getelementptr i8* %20, i32 %tmp81 ; [#uses=1]
- %scevgep4.i.i = bitcast i8* %scevgep82 to float* ; [#uses=1]
- %tmp84 = add i32 %tmp36, 52 ; [#uses=1]
- %scevgep85 = getelementptr i8* %20, i32 %tmp84 ; [#uses=1]
- %scevgep4.1.i.i = bitcast i8* %scevgep85 to float* ; [#uses=1]
- %tmp87 = add i32 %tmp36, 56 ; [#uses=1]
- %scevgep88 = getelementptr i8* %20, i32 %tmp87 ; [#uses=1]
- %scevgep4.2.i.i = bitcast i8* %scevgep88 to float* ; [#uses=1]
- %tmp90 = add i32 %tmp36, 60 ; [#uses=1]
- %scevgep91 = getelementptr i8* %20, i32 %tmp90 ; [#uses=1]
- %scevgep4.3.i.i = bitcast i8* %scevgep91 to float* ; [#uses=1]
- %30 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCompoundShapeChild* %30, i32 %i.010, i32 3 ; [#uses=1]
- %31 = load float* %scevgep, align 4 ; [#uses=1]
- store float %31, float* %scevgep3839, align 4
- %32 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 7 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btCompoundShapeChild* %35, i32 %i.010, i32 1 ; [#uses=1]
- %36 = load %struct.btCollisionShape** %scevgep11, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %34 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %38 = bitcast %struct.btCollisionShape* %36 to i8* ; [#uses=1]
- %39 = tail call i8* %37(%struct.btActionInterface* %serializer, i8* %38) ; [#uses=1]
- %40 = bitcast i8* %39 to %struct.btCollisionShapeData* ; [#uses=1]
- store %struct.btCollisionShapeData* %40, %struct.btCollisionShapeData** %scevgep4142, align 4
- %41 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 6 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btCompoundShapeChild* %44, i32 %i.010, i32 1 ; [#uses=1]
- %45 = load %struct.btCollisionShape** %scevgep12, align 4 ; [#uses=1]
- %46 = bitcast i32 (...)* %43 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %47 = bitcast %struct.btCollisionShape* %45 to i8* ; [#uses=1]
- %48 = tail call i8* %46(%struct.btActionInterface* %serializer, i8* %47) ; [#uses=1]
- %49 = icmp eq i8* %48, null ; [#uses=1]
- br i1 %49, label %bb2, label %bb4
-
-bb2: ; preds = %bb1
- %50 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %51 = getelementptr inbounds i32 (...)** %50, i32 4 ; [#uses=1]
- %52 = load i32 (...)** %51, align 4 ; [#uses=1]
- %53 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btCompoundShapeChild* %53, i32 %i.010, i32 1 ; [#uses=1]
- %54 = load %struct.btCollisionShape** %scevgep33, align 4 ; [#uses=2]
- %55 = getelementptr inbounds %struct.btCollisionShape* %54, i32 0, i32 0 ; [#uses=1]
- %56 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 12 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = bitcast i32 (...)* %58 to i32 (%struct.btCollisionShape*)* ; [#uses=1]
- %60 = tail call i32 %59(%struct.btCollisionShape* %54) ; [#uses=1]
- %61 = bitcast i32 (...)* %52 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %62 = tail call %struct.btChunk* %61(%struct.btActionInterface* %serializer, i32 %60, i32 1) ; [#uses=2]
- %63 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=1]
- %scevgep34 = getelementptr %struct.btCompoundShapeChild* %63, i32 %i.010, i32 1 ; [#uses=1]
- %64 = load %struct.btCollisionShape** %scevgep34, align 4 ; [#uses=2]
- %65 = getelementptr inbounds %struct.btCollisionShape* %64, i32 0, i32 0 ; [#uses=1]
- %66 = load i32 (...)*** %65, align 4 ; [#uses=1]
- %67 = getelementptr inbounds i32 (...)** %66, i32 13 ; [#uses=1]
- %68 = load i32 (...)** %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btChunk* %62, i32 0, i32 2 ; [#uses=1]
- %70 = load i8** %69, align 4 ; [#uses=1]
- %71 = bitcast i32 (...)* %68 to i8* (%struct.btCollisionShape*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %72 = tail call i8* %71(%struct.btCollisionShape* %64, i8* %70, %struct.btActionInterface* %serializer) ; [#uses=1]
- %73 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %74 = getelementptr inbounds i32 (...)** %73, i32 5 ; [#uses=1]
- %75 = load i32 (...)** %74, align 4 ; [#uses=1]
- %76 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=1]
- %scevgep35 = getelementptr %struct.btCompoundShapeChild* %76, i32 %i.010, i32 1 ; [#uses=1]
- %77 = load %struct.btCollisionShape** %scevgep35, align 4 ; [#uses=1]
- %78 = bitcast i32 (...)* %75 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %79 = bitcast %struct.btCollisionShape* %77 to i8* ; [#uses=1]
- tail call void %78(%struct.btActionInterface* %serializer, %struct.btChunk* %62, i8* %72, i32 1346455635, i8* %79)
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %80 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btCompoundShapeChild* %80, i32 %i.010, i32 2 ; [#uses=1]
- %81 = load i32* %scevgep13, align 4 ; [#uses=1]
- store i32 %81, i32* %scevgep4445, align 4
- %82 = load %struct.btCompoundShapeChild** %29, align 4 ; [#uses=16]
- %scevgep.i.i.i = getelementptr inbounds %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %scevgep.i.i.i, align 4 ; [#uses=1]
- store float %83, float* %scevgep4.i.i.i, align 4
- %scevgep.1.i.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %scevgep.1.i.i.i, align 4 ; [#uses=1]
- store float %84, float* %scevgep4.1.i.i.i, align 4
- %scevgep.2.i.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %85 = load float* %scevgep.2.i.i.i, align 4 ; [#uses=1]
- store float %85, float* %scevgep4.2.i.i.i, align 4
- %scevgep.3.i.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %86 = load float* %scevgep.3.i.i.i, align 4 ; [#uses=1]
- store float %86, float* %scevgep4.3.i.i.i, align 4
- %scevgep.i.1.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %scevgep.i.1.i.i, align 4 ; [#uses=1]
- store float %87, float* %scevgep4.i.1.i.i, align 4
- %scevgep.1.i.1.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %88 = load float* %scevgep.1.i.1.i.i, align 4 ; [#uses=1]
- store float %88, float* %scevgep4.1.i.1.i.i, align 4
- %scevgep.2.i.1.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %scevgep.2.i.1.i.i, align 4 ; [#uses=1]
- store float %89, float* %scevgep4.2.i.1.i.i, align 4
- %scevgep.3.i.1.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %90 = load float* %scevgep.3.i.1.i.i, align 4 ; [#uses=1]
- store float %90, float* %scevgep4.3.i.1.i.i, align 4
- %scevgep.i.2.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %scevgep.i.2.i.i, align 4 ; [#uses=1]
- store float %91, float* %scevgep4.i.2.i.i, align 4
- %scevgep.1.i.2.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %92 = load float* %scevgep.1.i.2.i.i, align 4 ; [#uses=1]
- store float %92, float* %scevgep4.1.i.2.i.i, align 4
- %scevgep.2.i.2.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %scevgep.2.i.2.i.i, align 4 ; [#uses=1]
- store float %93, float* %scevgep4.2.i.2.i.i, align 4
- %scevgep.3.i.2.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %94 = load float* %scevgep.3.i.2.i.i, align 4 ; [#uses=1]
- store float %94, float* %scevgep4.3.i.2.i.i, align 4
- %scevgep.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %95 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %95, float* %scevgep4.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %96, float* %scevgep4.1.i.i, align 4
- %scevgep.2.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %97 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %97, float* %scevgep4.2.i.i, align 4
- %scevgep.3.i.i = getelementptr %struct.btCompoundShapeChild* %82, i32 %i.010, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %98 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %98, float* %scevgep4.3.i.i, align 4
- %99 = load i32* %9, align 4 ; [#uses=1]
- %100 = icmp sgt i32 %99, %tmp ; [#uses=1]
- br i1 %100, label %bb1, label %bb6
-
-bb6: ; preds = %bb4, %bb
- %101 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %102 = getelementptr inbounds i32 (...)** %101, i32 5 ; [#uses=1]
- %103 = load i32 (...)** %102, align 4 ; [#uses=1]
- %104 = load i8** %19, align 4 ; [#uses=1]
- %105 = bitcast i32 (...)* %103 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %105(%struct.btActionInterface* %serializer, %struct.btChunk* %18, i8* getelementptr inbounds ([25 x i8]* @.str163, i32 0, i32 0), i32 1497453121, i8* %104)
- ret i8* getelementptr inbounds ([20 x i8]* @.str264, i32 0, i32 0)
-
-bb7: ; preds = %entry
- ret i8* getelementptr inbounds ([20 x i8]* @.str264, i32 0, i32 0)
-}
-
-; [#uses=0]
-define void @_ZN15btCompoundShape26createAabbTreeFromChildrenEv(%struct.btCompoundShape* nocapture %this) align 2 {
-entry:
- %localAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %localAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %bounds = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=3]
- %1 = load %struct.btDbvt** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btDbvt* %1, null ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = call i8* @_Z22btAlignedAllocInternalji(i32 40, i32 16) ; [#uses=2]
- %4 = bitcast i8* %3 to %struct.btDbvt* ; [#uses=2]
- %5 = icmp eq i8* %3, null ; [#uses=1]
- br i1 %5, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- invoke void @_ZN6btDbvtC1Ev(%struct.btDbvt* %4)
- to label %bb5 unwind label %lpad
-
-bb5: ; preds = %bb1, %bb
- store %struct.btDbvt* %4, %struct.btDbvt** %0, align 4
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = icmp sgt i32 %7, 0 ; [#uses=1]
- br i1 %8, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb5
- %9 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb6, %bb.nph
- %26 = phi i32 [ 0, %bb.nph ], [ %45, %bb6 ] ; [#uses=5]
- %27 = load %struct.btCompoundShapeChild** %9, align 4 ; [#uses=3]
- %scevgep = getelementptr %struct.btCompoundShapeChild* %27, i32 %26, i32 1 ; [#uses=1]
- %28 = load %struct.btCollisionShape** %scevgep, align 4 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btCollisionShape* %28, i32 0, i32 0 ; [#uses=1]
- %30 = load i32 (...)*** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds i32 (...)** %30, i32 2 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = bitcast i32 (...)* %32 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %scevgep1314 = getelementptr inbounds %struct.btCompoundShapeChild* %27, i32 %26, i32 0 ; [#uses=1]
- call void %33(%struct.btCollisionShape* %28, %struct.btTransform* %scevgep1314, %struct.btQuadWord* %localAabbMin, %struct.btQuadWord* %localAabbMax)
- %34 = load float* %11, align 8 ; [#uses=1]
- store float %34, float* %10, align 8
- %35 = load float* %13, align 4 ; [#uses=1]
- store float %35, float* %12, align 4
- %36 = load float* %15, align 8 ; [#uses=1]
- store float %36, float* %14, align 8
- %37 = load float* %17, align 4 ; [#uses=1]
- store float %37, float* %16, align 4
- %38 = load float* %19, align 8 ; [#uses=1]
- store float %38, float* %18, align 8
- %39 = load float* %21, align 4 ; [#uses=1]
- store float %39, float* %20, align 4
- %40 = load float* %23, align 8 ; [#uses=1]
- store float %40, float* %22, align 8
- %41 = load float* %25, align 4 ; [#uses=1]
- store float %41, float* %24, align 4
- %42 = inttoptr i32 %26 to i8* ; [#uses=1]
- %43 = load %struct.btDbvt** %0, align 4 ; [#uses=1]
- %44 = call %struct.btDbvtNode* @_ZN6btDbvt6insertERK12btDbvtAabbMmPv(%struct.btDbvt* %43, %struct.GIM_AABB* %bounds, i8* %42) ; [#uses=1]
- %scevgep16 = getelementptr %struct.btCompoundShapeChild* %27, i32 %26, i32 4 ; [#uses=1]
- store %struct.btDbvtNode* %44, %struct.btDbvtNode** %scevgep16, align 4
- %45 = add nsw i32 %26, 1 ; [#uses=2]
- %46 = load i32* %6, align 4 ; [#uses=1]
- %47 = icmp sgt i32 %46, %45 ; [#uses=1]
- br i1 %47, label %bb6, label %return
-
-return: ; preds = %bb6, %bb5, %entry
- ret void
-
-lpad: ; preds = %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN11btMatrix3x311diagonalizeERS_fi(%struct.btMatrix3x3* %this, %struct.btMatrix3x3* nocapture %rot, float %threshold, i32 %maxSteps) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- br label %bb17
-
-bb: ; preds = %bb17
- %18 = load float* %12, align 4 ; [#uses=1]
- %19 = tail call float @fabsf(float %18) nounwind readnone ; [#uses=2]
- %20 = load float* %13, align 4 ; [#uses=1]
- %21 = tail call float @fabsf(float %20) nounwind readnone ; [#uses=2]
- %22 = fcmp ogt float %21, %19 ; [#uses=3]
- %max.0 = select i1 %22, float %21, float %19 ; [#uses=2]
- %r.0 = select i1 %22, i32 1, i32 2 ; [#uses=1]
- %q.0 = select i1 %22, i32 2, i32 1 ; [#uses=1]
- %23 = load float* %14, align 4 ; [#uses=1]
- %24 = tail call float @fabsf(float %23) nounwind readnone ; [#uses=2]
- %25 = fcmp ogt float %24, %max.0 ; [#uses=1]
- br i1 %25, label %bb3, label %bb4
-
-bb3: ; preds = %bb
- br label %bb4
-
-bb4: ; preds = %bb3, %bb
- %max.1 = phi float [ %24, %bb3 ], [ %max.0, %bb ] ; [#uses=2]
- %r.1 = phi i32 [ 0, %bb3 ], [ %r.0, %bb ] ; [#uses=4]
- %q.1 = phi i32 [ 2, %bb3 ], [ %q.0, %bb ] ; [#uses=9]
- %p.0 = phi i32 [ 1, %bb3 ], [ 0, %bb ] ; [#uses=9]
- %26 = load float* %15, align 4 ; [#uses=1]
- %27 = tail call float @fabsf(float %26) nounwind readnone ; [#uses=1]
- %28 = load float* %16, align 4 ; [#uses=1]
- %29 = tail call float @fabsf(float %28) nounwind readnone ; [#uses=1]
- %30 = fadd float %27, %29 ; [#uses=1]
- %31 = load float* %17, align 4 ; [#uses=1]
- %32 = tail call float @fabsf(float %31) nounwind readnone ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=1]
- %34 = fmul float %33, %threshold ; [#uses=2]
- %35 = fcmp ugt float %max.1, %34 ; [#uses=1]
- br i1 %35, label %bb7, label %bb5
-
-bb5: ; preds = %bb4
- %36 = fmul float %34, 0x3E80000000000000 ; [#uses=1]
- %37 = fcmp ult float %36, %max.1 ; [#uses=1]
- br i1 %37, label %bb7, label %return
-
-bb7: ; preds = %bb5, %bb4
- %step.0 = phi i32 [ %step.1, %bb4 ], [ 1, %bb5 ] ; [#uses=1]
- %38 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %p.0, i32 0, i32 %q.1 ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %q.1, i32 0, i32 %q.1 ; [#uses=3]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %p.0, i32 0, i32 %p.0 ; [#uses=3]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fsub float %41, %43 ; [#uses=1]
- %45 = fmul float %39, 2.000000e+00 ; [#uses=1]
- %46 = fdiv float %44, %45 ; [#uses=6]
- %47 = fmul float %46, %46 ; [#uses=4]
- %48 = fmul float %47, %47 ; [#uses=1]
- %49 = fcmp olt float %48, 8.388608e+07 ; [#uses=1]
- br i1 %49, label %bb8, label %bb12
-
-bb8: ; preds = %bb7
- %50 = fcmp ult float %46, 0.000000e+00 ; [#uses=1]
- %51 = fadd float %47, 1.000000e+00 ; [#uses=1]
- %52 = tail call float @sqrtf(float %51) nounwind readonly ; [#uses=2]
- br i1 %50, label %bb10, label %bb9
-
-bb9: ; preds = %bb8
- %53 = fadd float %52, %46 ; [#uses=1]
- br label %bb11
-
-bb10: ; preds = %bb8
- %54 = fsub float %46, %52 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9
- %.pn = phi float [ %53, %bb9 ], [ %54, %bb10 ] ; [#uses=1]
- %iftmp.70.0 = fdiv float 1.000000e+00, %.pn ; [#uses=4]
- %55 = fmul float %iftmp.70.0, %iftmp.70.0 ; [#uses=1]
- %56 = fadd float %55, 1.000000e+00 ; [#uses=1]
- %57 = tail call float @sqrtf(float %56) nounwind readonly ; [#uses=1]
- %58 = fdiv float 1.000000e+00, %57 ; [#uses=2]
- %59 = fmul float %58, %iftmp.70.0 ; [#uses=1]
- br label %bb16
-
-bb12: ; preds = %bb7
- %60 = fdiv float 5.000000e-01, %47 ; [#uses=1]
- %61 = fadd float %60, 2.000000e+00 ; [#uses=1]
- %62 = fmul float %61, %46 ; [#uses=1]
- %63 = fdiv float 1.000000e+00, %62 ; [#uses=4]
- %64 = fmul float %63, -5.000000e-01 ; [#uses=1]
- %65 = fmul float %64, %63 ; [#uses=1]
- %66 = fadd float %65, 1.000000e+00 ; [#uses=2]
- %67 = fmul float %66, %63 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb12, %bb11
- %cos.0 = phi float [ %58, %bb11 ], [ %66, %bb12 ] ; [#uses=8]
- %t.0 = phi float [ %iftmp.70.0, %bb11 ], [ %63, %bb12 ] ; [#uses=1]
- %sin.0 = phi float [ %59, %bb11 ], [ %67, %bb12 ] ; [#uses=8]
- %68 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %q.1, i32 0, i32 %p.0 ; [#uses=1]
- store float 0.000000e+00, float* %68, align 4
- store float 0.000000e+00, float* %38, align 4
- %69 = load float* %42, align 4 ; [#uses=1]
- %70 = fmul float %t.0, %39 ; [#uses=2]
- %71 = fsub float %69, %70 ; [#uses=1]
- store float %71, float* %42, align 4
- %72 = load float* %40, align 4 ; [#uses=1]
- %73 = fadd float %72, %70 ; [#uses=1]
- store float %73, float* %40, align 4
- %74 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %r.1, i32 0, i32 %p.0 ; [#uses=2]
- %75 = load float* %74, align 4 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %r.1, i32 0, i32 %q.1 ; [#uses=2]
- %77 = load float* %76, align 4 ; [#uses=2]
- %78 = fmul float %cos.0, %75 ; [#uses=1]
- %79 = fmul float %sin.0, %77 ; [#uses=1]
- %80 = fsub float %78, %79 ; [#uses=2]
- %81 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %p.0, i32 0, i32 %r.1 ; [#uses=1]
- store float %80, float* %81, align 4
- store float %80, float* %74, align 4
- %82 = fmul float %cos.0, %77 ; [#uses=1]
- %83 = fmul float %sin.0, %75 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=2]
- %85 = getelementptr inbounds %struct.btMatrix3x3* %this, i32 0, i32 0, i32 %q.1, i32 0, i32 %r.1 ; [#uses=1]
- store float %84, float* %85, align 4
- store float %84, float* %76, align 4
- %scevgep = getelementptr %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 0, i32 0, i32 %p.0 ; [#uses=2]
- %scevgep20 = getelementptr %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 0, i32 0, i32 %q.1 ; [#uses=2]
- %86 = load float* %scevgep, align 4 ; [#uses=2]
- %87 = load float* %scevgep20, align 4 ; [#uses=2]
- %88 = fmul float %cos.0, %86 ; [#uses=1]
- %89 = fmul float %sin.0, %87 ; [#uses=1]
- %90 = fsub float %88, %89 ; [#uses=1]
- store float %90, float* %scevgep, align 4
- %91 = fmul float %cos.0, %87 ; [#uses=1]
- %92 = fmul float %sin.0, %86 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- store float %93, float* %scevgep20, align 4
- %scevgep.1 = getelementptr %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 1, i32 0, i32 %p.0 ; [#uses=2]
- %scevgep20.1 = getelementptr %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 1, i32 0, i32 %q.1 ; [#uses=2]
- %94 = load float* %scevgep.1, align 4 ; [#uses=2]
- %95 = load float* %scevgep20.1, align 4 ; [#uses=2]
- %96 = fmul float %cos.0, %94 ; [#uses=1]
- %97 = fmul float %sin.0, %95 ; [#uses=1]
- %98 = fsub float %96, %97 ; [#uses=1]
- store float %98, float* %scevgep.1, align 4
- %99 = fmul float %cos.0, %95 ; [#uses=1]
- %100 = fmul float %sin.0, %94 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- store float %101, float* %scevgep20.1, align 4
- %scevgep.2 = getelementptr %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 2, i32 0, i32 %p.0 ; [#uses=2]
- %scevgep20.2 = getelementptr %struct.btMatrix3x3* %rot, i32 0, i32 0, i32 2, i32 0, i32 %q.1 ; [#uses=2]
- %102 = load float* %scevgep.2, align 4 ; [#uses=2]
- %103 = load float* %scevgep20.2, align 4 ; [#uses=2]
- %104 = fmul float %cos.0, %102 ; [#uses=1]
- %105 = fmul float %sin.0, %103 ; [#uses=1]
- %106 = fsub float %104, %105 ; [#uses=1]
- store float %106, float* %scevgep.2, align 4
- %107 = fmul float %cos.0, %103 ; [#uses=1]
- %108 = fmul float %sin.0, %102 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- store float %109, float* %scevgep20.2, align 4
- %110 = add nsw i32 %step.0, -1 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb16, %entry
- %step.1 = phi i32 [ %maxSteps, %entry ], [ %110, %bb16 ] ; [#uses=2]
- %111 = icmp sgt i32 %step.1, 0 ; [#uses=1]
- br i1 %111, label %bb, label %return
-
-return: ; preds = %bb17, %bb5
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK15btCompoundShape31calculatePrincipalAxisTransformEPfR11btTransformR9btVector3(%struct.btCompoundShape* nocapture %this, float* nocapture %masses, %struct.btTransform* nocapture %principal, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %tensor = alloca %struct.btMatrix3x3, align 8 ; [#uses=11]
- %i = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = icmp sgt i32 %1, 0 ; [#uses=2]
- br i1 %2, label %bb.nph89, label %bb2
-
-bb.nph89: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %4 = load %struct.btCompoundShapeChild** %3, align 4 ; [#uses=3]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph89
- %k.088 = phi i32 [ 0, %bb.nph89 ], [ %16, %bb ] ; [#uses=5]
- %totalMass.087 = phi float [ 0.000000e+00, %bb.nph89 ], [ %15, %bb ] ; [#uses=1]
- %center.0.2.086 = phi float [ 0.000000e+00, %bb.nph89 ], [ %14, %bb ] ; [#uses=1]
- %center.0.1.085 = phi float [ 0.000000e+00, %bb.nph89 ], [ %13, %bb ] ; [#uses=1]
- %center.0.0.084 = phi float [ 0.000000e+00, %bb.nph89 ], [ %12, %bb ] ; [#uses=1]
- %scevgep125 = getelementptr float* %masses, i32 %k.088 ; [#uses=1]
- %scevgep126 = getelementptr %struct.btCompoundShapeChild* %4, i32 %k.088, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep127 = getelementptr %struct.btCompoundShapeChild* %4, i32 %k.088, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep128 = getelementptr %struct.btCompoundShapeChild* %4, i32 %k.088, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %scevgep126, align 4 ; [#uses=1]
- %6 = load float* %scevgep125, align 4 ; [#uses=4]
- %7 = fmul float %5, %6 ; [#uses=1]
- %8 = load float* %scevgep127, align 4 ; [#uses=1]
- %9 = fmul float %8, %6 ; [#uses=1]
- %10 = load float* %scevgep128, align 4 ; [#uses=1]
- %11 = fmul float %10, %6 ; [#uses=1]
- %12 = fadd float %center.0.0.084, %11 ; [#uses=2]
- %13 = fadd float %center.0.1.085, %9 ; [#uses=2]
- %14 = fadd float %center.0.2.086, %7 ; [#uses=2]
- %15 = fadd float %6, %totalMass.087 ; [#uses=2]
- %16 = add nsw i32 %k.088, 1 ; [#uses=2]
- %exitcond124 = icmp eq i32 %16, %1 ; [#uses=1]
- br i1 %exitcond124, label %bb2, label %bb
-
-bb2: ; preds = %bb, %entry
- %totalMass.0.lcssa = phi float [ 0.000000e+00, %entry ], [ %15, %bb ] ; [#uses=1]
- %center.0.2.0.lcssa = phi float [ 0.000000e+00, %entry ], [ %14, %bb ] ; [#uses=1]
- %center.0.1.0.lcssa = phi float [ 0.000000e+00, %entry ], [ %13, %bb ] ; [#uses=1]
- %center.0.0.0.lcssa = phi float [ 0.000000e+00, %entry ], [ %12, %bb ] ; [#uses=1]
- %17 = fdiv float 1.000000e+00, %totalMass.0.lcssa ; [#uses=3]
- %18 = fmul float %center.0.0.0.lcssa, %17 ; [#uses=2]
- %19 = fmul float %center.0.1.0.lcssa, %17 ; [#uses=2]
- %20 = fmul float %center.0.2.0.lcssa, %17 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %21, align 4
- %22 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %22, align 4
- %23 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %23, align 4
- %24 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %30 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btMatrix3x3* %tensor, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %34 = bitcast %struct.btMatrix3x3* %tensor to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %34, i8 0, i64 48, i32 8, i1 false)
- br i1 %2, label %bb.nph, label %bb5
-
-bb.nph: ; preds = %bb2
- %35 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btQuadWord* %i, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %i, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %i, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre = load %struct.btCompoundShapeChild** %35, align 4 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb3, %bb.nph
- %39 = phi %struct.btCompoundShapeChild* [ %.pre, %bb.nph ], [ %47, %bb3 ] ; [#uses=1]
- %k.183 = phi i32 [ 0, %bb.nph ], [ %183, %bb3 ] ; [#uses=15]
- %scevgep = getelementptr float* %masses, i32 %k.183 ; [#uses=2]
- %scevgep93 = getelementptr %struct.btCompoundShapeChild* %39, i32 %k.183, i32 1 ; [#uses=1]
- %40 = load %struct.btCollisionShape** %scevgep93, align 4 ; [#uses=2]
- %41 = getelementptr inbounds %struct.btCollisionShape* %40, i32 0, i32 0 ; [#uses=1]
- %42 = load i32 (...)*** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds i32 (...)** %42, i32 8 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = load float* %scevgep, align 4 ; [#uses=1]
- %46 = bitcast i32 (...)* %44 to void (%struct.btCollisionShape*, float, %struct.btQuadWord*)* ; [#uses=1]
- call void %46(%struct.btCollisionShape* %40, float %45, %struct.btQuadWord* %i)
- %47 = load %struct.btCompoundShapeChild** %35, align 4 ; [#uses=13]
- %scevgep94 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %scevgep94, align 4 ; [#uses=1]
- %49 = fsub float %48, %20 ; [#uses=6]
- %scevgep95 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %scevgep95, align 4 ; [#uses=1]
- %51 = fsub float %50, %19 ; [#uses=6]
- %scevgep96 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %scevgep96, align 4 ; [#uses=1]
- %53 = fsub float %52, %18 ; [#uses=6]
- %scevgep107108 = getelementptr inbounds %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %scevgep107108, align 4 ; [#uses=4]
- %scevgep105106 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %scevgep105106, align 4 ; [#uses=4]
- %scevgep103104 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %scevgep103104, align 4 ; [#uses=4]
- %scevgep102 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %scevgep102, align 4 ; [#uses=4]
- %scevgep101 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %scevgep101, align 4 ; [#uses=4]
- %scevgep100 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %scevgep100, align 4 ; [#uses=4]
- %scevgep99 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %scevgep99, align 4 ; [#uses=4]
- %scevgep98 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %scevgep98, align 4 ; [#uses=4]
- %scevgep97 = getelementptr %struct.btCompoundShapeChild* %47, i32 %k.183, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %scevgep97, align 4 ; [#uses=4]
- %63 = load float* %36, align 8 ; [#uses=3]
- %64 = fmul float %54, %63 ; [#uses=3]
- %65 = fmul float %55, %63 ; [#uses=3]
- %66 = fmul float %56, %63 ; [#uses=3]
- %67 = load float* %37, align 4 ; [#uses=3]
- %68 = fmul float %57, %67 ; [#uses=3]
- %69 = fmul float %58, %67 ; [#uses=3]
- %70 = fmul float %59, %67 ; [#uses=3]
- %71 = load float* %38, align 8 ; [#uses=3]
- %72 = fmul float %60, %71 ; [#uses=3]
- %73 = fmul float %61, %71 ; [#uses=3]
- %74 = fmul float %62, %71 ; [#uses=3]
- %75 = fmul float %66, %56 ; [#uses=1]
- %76 = fmul float %70, %59 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = fmul float %74, %62 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %65, %56 ; [#uses=1]
- %81 = fmul float %69, %59 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = fmul float %73, %62 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=1]
- %85 = fmul float %64, %56 ; [#uses=1]
- %86 = fmul float %68, %59 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %72, %62 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=1]
- %90 = fmul float %66, %55 ; [#uses=1]
- %91 = fmul float %70, %58 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %74, %61 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=1]
- %95 = fmul float %65, %55 ; [#uses=1]
- %96 = fmul float %69, %58 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %73, %61 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %64, %55 ; [#uses=1]
- %101 = fmul float %68, %58 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %72, %61 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fmul float %66, %54 ; [#uses=1]
- %106 = fmul float %70, %57 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %74, %60 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- %110 = fmul float %65, %54 ; [#uses=1]
- %111 = fmul float %69, %57 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %73, %60 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=1]
- %115 = fmul float %64, %54 ; [#uses=1]
- %116 = fmul float %68, %57 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %72, %60 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = load float* %25, align 8 ; [#uses=1]
- %121 = fadd float %120, %119 ; [#uses=1]
- %122 = load float* %26, align 4 ; [#uses=1]
- %123 = fadd float %122, %114 ; [#uses=1]
- %124 = load float* %27, align 8 ; [#uses=1]
- %125 = fadd float %124, %109 ; [#uses=1]
- %126 = load float* %28, align 8 ; [#uses=1]
- %127 = fadd float %126, %104 ; [#uses=1]
- %128 = load float* %29, align 4 ; [#uses=1]
- %129 = fadd float %128, %99 ; [#uses=1]
- %130 = load float* %30, align 8 ; [#uses=1]
- %131 = fadd float %130, %94 ; [#uses=1]
- %132 = load float* %31, align 8 ; [#uses=1]
- %133 = fadd float %132, %89 ; [#uses=1]
- %134 = load float* %32, align 4 ; [#uses=1]
- %135 = fadd float %134, %84 ; [#uses=1]
- %136 = load float* %33, align 8 ; [#uses=1]
- %137 = fadd float %136, %79 ; [#uses=1]
- %138 = fmul float %53, %53 ; [#uses=1]
- %139 = fmul float %51, %51 ; [#uses=1]
- %140 = fadd float %138, %139 ; [#uses=1]
- %141 = fmul float %49, %49 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=3]
- %143 = fsub float -0.000000e+00, %53 ; [#uses=3]
- %144 = fmul float %49, %143 ; [#uses=1]
- %145 = fmul float %51, %143 ; [#uses=1]
- %146 = fmul float %53, %143 ; [#uses=1]
- %147 = fadd float %142, %146 ; [#uses=1]
- %148 = fadd float %145, 0.000000e+00 ; [#uses=1]
- %149 = fadd float %144, 0.000000e+00 ; [#uses=1]
- %150 = fsub float -0.000000e+00, %51 ; [#uses=3]
- %151 = fmul float %49, %150 ; [#uses=1]
- %152 = fmul float %51, %150 ; [#uses=1]
- %153 = fmul float %53, %150 ; [#uses=1]
- %154 = fadd float %153, 0.000000e+00 ; [#uses=1]
- %155 = fadd float %142, %152 ; [#uses=1]
- %156 = fadd float %151, 0.000000e+00 ; [#uses=1]
- %157 = fsub float -0.000000e+00, %49 ; [#uses=3]
- %158 = fmul float %49, %157 ; [#uses=1]
- %159 = fmul float %51, %157 ; [#uses=1]
- %160 = fmul float %53, %157 ; [#uses=1]
- %161 = fadd float %160, 0.000000e+00 ; [#uses=1]
- %162 = fadd float %159, 0.000000e+00 ; [#uses=1]
- %163 = fadd float %142, %158 ; [#uses=1]
- %164 = load float* %scevgep, align 4 ; [#uses=9]
- %165 = fmul float %149, %164 ; [#uses=1]
- %166 = fmul float %148, %164 ; [#uses=1]
- %167 = fmul float %147, %164 ; [#uses=1]
- %168 = fadd float %121, %167 ; [#uses=1]
- store float %168, float* %25, align 8
- %169 = fadd float %123, %166 ; [#uses=1]
- store float %169, float* %26, align 4
- %170 = fadd float %125, %165 ; [#uses=1]
- store float %170, float* %27, align 8
- %171 = fmul float %156, %164 ; [#uses=1]
- %172 = fmul float %155, %164 ; [#uses=1]
- %173 = fmul float %154, %164 ; [#uses=1]
- %174 = fadd float %127, %173 ; [#uses=1]
- store float %174, float* %28, align 8
- %175 = fadd float %129, %172 ; [#uses=1]
- store float %175, float* %29, align 4
- %176 = fadd float %131, %171 ; [#uses=1]
- store float %176, float* %30, align 8
- %177 = fmul float %163, %164 ; [#uses=1]
- %178 = fmul float %162, %164 ; [#uses=1]
- %179 = fmul float %161, %164 ; [#uses=1]
- %180 = fadd float %133, %179 ; [#uses=1]
- store float %180, float* %31, align 8
- %181 = fadd float %135, %178 ; [#uses=1]
- store float %181, float* %32, align 4
- %182 = fadd float %137, %177 ; [#uses=1]
- store float %182, float* %33, align 8
- %183 = add nsw i32 %k.183, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %183, %1 ; [#uses=1]
- br i1 %exitcond, label %bb5, label %bb3
-
-bb5: ; preds = %bb3, %bb2
- %184 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 0 ; [#uses=1]
- call void @_ZN11btMatrix3x311diagonalizeERS_fi(%struct.btMatrix3x3* %tensor, %struct.btMatrix3x3* %184, float 0x3EE4F8B580000000, i32 20) nounwind
- %185 = load float* %25, align 8 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %185, float* %186, align 4
- %187 = load float* %29, align 4 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %187, float* %188, align 4
- %189 = load float* %33, align 8 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %189, float* %190, align 4
- %191 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %191, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btCompoundShape23removeChildShapeByIndexEi(%struct.btCompoundShape* nocapture %this, i32 %childShapeIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 5 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* %0, align 4
- %3 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=2]
- %4 = load %struct.btDbvt** %3, align 4 ; [#uses=2]
- %5 = icmp eq %struct.btDbvt* %4, null ; [#uses=1]
- br i1 %5, label %bb1, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %7 = load %struct.btCompoundShapeChild** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCompoundShapeChild* %7, i32 %childShapeIndex, i32 4 ; [#uses=1]
- %9 = load %struct.btDbvtNode** %8, align 4 ; [#uses=1]
- tail call void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* %4, %struct.btDbvtNode* %9)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %10 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = add nsw i32 %11, -1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI20btCompoundShapeChildE4swapEii(%"struct.btAlignedObjectArray<btCompoundShapeChild>"* %13, i32 %childShapeIndex, i32 %12) nounwind
- %14 = load %struct.btDbvt** %3, align 4 ; [#uses=1]
- %15 = icmp eq %struct.btDbvt* %14, null ; [#uses=1]
- br i1 %15, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %16 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %17 = load %struct.btCompoundShapeChild** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btCompoundShapeChild* %17, i32 %childShapeIndex, i32 4 ; [#uses=1]
- %19 = load %struct.btDbvtNode** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btDbvtNode* %19, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %childShapeIndex.c = inttoptr i32 %childShapeIndex to %struct.btDbvtNode* ; [#uses=1]
- store %struct.btDbvtNode* %childShapeIndex.c, %struct.btDbvtNode** %20, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %21 = load i32* %10, align 4 ; [#uses=1]
- %22 = add nsw i32 %21, -1 ; [#uses=1]
- store i32 %22, i32* %10, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShape16removeChildShapeEP16btCollisionShape(%struct.btCompoundShape* %this, %struct.btCollisionShape* %shape) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 5 ; [#uses=4]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* %0, align 4
- %3 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=4]
- %4 = load i32* %3, align 4 ; [#uses=4]
- %i.05 = add i32 %4, -1 ; [#uses=2]
- %5 = icmp sgt i32 %i.05, -1 ; [#uses=1]
- br i1 %5, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %entry
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb3.backedge, %bb.nph
- %9 = phi i32 [ %4, %bb.nph ], [ %27, %bb3.backedge ] ; [#uses=2]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb3.backedge ] ; [#uses=3]
- %tmp7 = sub i32 %4, %indvar ; [#uses=3]
- %i.06 = sub i32 %i.05, %indvar ; [#uses=2]
- %10 = load %struct.btCompoundShapeChild** %6, align 4 ; [#uses=2]
- %scevgep13 = getelementptr %struct.btCompoundShapeChild* %10, i32 %tmp7, i32 0, i32 0, i32 0, i32 -1 ; [#uses=1]
- %scevgep1314 = bitcast %struct.btQuadWord* %scevgep13 to %struct.btCollisionShape** ; [#uses=1]
- %11 = load %struct.btCollisionShape** %scevgep1314, align 4 ; [#uses=1]
- %12 = icmp eq %struct.btCollisionShape* %11, %shape ; [#uses=1]
- br i1 %12, label %bb1, label %bb3.backedge
-
-bb1: ; preds = %bb
- %13 = load i32* %0, align 4 ; [#uses=1]
- %14 = add nsw i32 %13, 1 ; [#uses=1]
- store i32 %14, i32* %0, align 4
- %15 = load %struct.btDbvt** %7, align 4 ; [#uses=2]
- %16 = icmp eq %struct.btDbvt* %15, null ; [#uses=1]
- br i1 %16, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb1
- %scevgep = getelementptr %struct.btCompoundShapeChild* %10, i32 %tmp7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 -1 ; [#uses=1]
- %scevgep8 = bitcast float* %scevgep to %struct.btDbvtNode** ; [#uses=1]
- %17 = load %struct.btDbvtNode** %scevgep8, align 4 ; [#uses=1]
- tail call void @_ZN6btDbvt6removeEP10btDbvtNode(%struct.btDbvt* %15, %struct.btDbvtNode* %17)
- %.pre = load i32* %3, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %bb1
- %18 = phi i32 [ %.pre, %bb.i ], [ %9, %bb1 ] ; [#uses=1]
- %19 = add nsw i32 %18, -1 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI20btCompoundShapeChildE4swapEii(%"struct.btAlignedObjectArray<btCompoundShapeChild>"* %8, i32 %i.06, i32 %19) nounwind
- %20 = load %struct.btDbvt** %7, align 4 ; [#uses=1]
- %21 = icmp eq %struct.btDbvt* %20, null ; [#uses=1]
- br i1 %21, label %_ZN15btCompoundShape23removeChildShapeByIndexEi.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %22 = load %struct.btCompoundShapeChild** %6, align 4 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btCompoundShapeChild* %22, i32 %tmp7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 -1 ; [#uses=1]
- %scevgep1112 = bitcast float* %scevgep11 to %struct.btDbvtNode** ; [#uses=1]
- %23 = load %struct.btDbvtNode** %scevgep1112, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btDbvtNode* %23, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %childShapeIndex.c.i = inttoptr i32 %i.06 to %struct.btDbvtNode* ; [#uses=1]
- store %struct.btDbvtNode* %childShapeIndex.c.i, %struct.btDbvtNode** %24, align 4
- br label %_ZN15btCompoundShape23removeChildShapeByIndexEi.exit
-
-_ZN15btCompoundShape23removeChildShapeByIndexEi.exit: ; preds = %bb2.i, %bb1.i
- %25 = load i32* %3, align 4 ; [#uses=1]
- %26 = add nsw i32 %25, -1 ; [#uses=2]
- store i32 %26, i32* %3, align 4
- br label %bb3.backedge
-
-bb3.backedge: ; preds = %_ZN15btCompoundShape23removeChildShapeByIndexEi.exit, %bb
- %27 = phi i32 [ %26, %_ZN15btCompoundShape23removeChildShapeByIndexEi.exit ], [ %9, %bb ] ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %4 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb
-
-bb4: ; preds = %bb3.backedge, %entry
- %28 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 16 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = bitcast i32 (...)* %31 to void (%struct.btCompoundShape*)* ; [#uses=1]
- tail call void %32(%struct.btCompoundShape* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShape20updateChildTransformEiRK11btTransform(%struct.btCompoundShape* %this, i32 %childIndex, %struct.btTransform* %newChildTransform) align 2 {
-entry:
- %localAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %localAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %bounds = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %1 = load %struct.btCompoundShapeChild** %0, align 4 ; [#uses=16]
- %2 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btCompoundShapeChild* %1, i32 %childIndex, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %newChildTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=2]
- %51 = load %struct.btDbvt** %50, align 4 ; [#uses=1]
- %52 = icmp eq %struct.btDbvt* %51, null ; [#uses=1]
- br i1 %52, label %bb1, label %bb
-
-bb: ; preds = %entry
- %53 = load %struct.btCompoundShapeChild** %0, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btCompoundShapeChild* %53, i32 %childIndex, i32 1 ; [#uses=1]
- %55 = load %struct.btCollisionShape** %54, align 4 ; [#uses=2]
- %56 = getelementptr inbounds %struct.btCollisionShape* %55, i32 0, i32 0 ; [#uses=1]
- %57 = load i32 (...)*** %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds i32 (...)** %57, i32 2 ; [#uses=1]
- %59 = load i32 (...)** %58, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %59 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %60(%struct.btCollisionShape* %55, %struct.btTransform* %newChildTransform, %struct.btQuadWord* %localAabbMin, %struct.btQuadWord* %localAabbMax)
- %61 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 8 ; [#uses=1]
- store float %63, float* %61, align 8
- %64 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 8 ; [#uses=1]
- store float %69, float* %67, align 8
- %70 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 8 ; [#uses=1]
- store float %75, float* %73, align 8
- %76 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 8 ; [#uses=1]
- store float %81, float* %79, align 8
- %82 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = load %struct.btCompoundShapeChild** %0, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btCompoundShapeChild* %85, i32 %childIndex, i32 4 ; [#uses=1]
- %87 = load %struct.btDbvtNode** %86, align 4 ; [#uses=1]
- %88 = load %struct.btDbvt** %50, align 4 ; [#uses=1]
- call void @_ZN6btDbvt6updateEP10btDbvtNodeR12btDbvtAabbMm(%struct.btDbvt* %88, %struct.btDbvtNode* %87, %struct.GIM_AABB* %bounds)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %89 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %90 = load i32 (...)*** %89, align 4 ; [#uses=1]
- %91 = getelementptr inbounds i32 (...)** %90, i32 16 ; [#uses=1]
- %92 = load i32 (...)** %91, align 4 ; [#uses=1]
- %93 = bitcast i32 (...)* %92 to void (%struct.btCompoundShape*)* ; [#uses=1]
- call void %93(%struct.btCompoundShape* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShape15setLocalScalingERK9btVector3(%struct.btCompoundShape* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %childTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %childScale = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb2
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %17 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %19 = getelementptr inbounds %struct.btTransform* %childTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btQuadWord* %childScale, i32 0, i32 0, i32 0 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %childScale, i32 0, i32 0, i32 1 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btQuadWord* %childScale, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %childScale, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %31 = phi i32 [ 0, %bb.nph ], [ %94, %bb ] ; [#uses=20]
- %32 = load %struct.btCompoundShapeChild** %3, align 4 ; [#uses=17]
- %scevgep14 = getelementptr inbounds %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %scevgep14, align 4 ; [#uses=1]
- store float %33, float* %4, align 8
- %scevgep15 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %scevgep15, align 4 ; [#uses=1]
- store float %34, float* %5, align 4
- %scevgep16 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %scevgep16, align 4 ; [#uses=1]
- store float %35, float* %6, align 8
- %scevgep17 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %scevgep17, align 4 ; [#uses=1]
- store float %36, float* %7, align 4
- %scevgep1819 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %scevgep1819, align 4 ; [#uses=1]
- store float %37, float* %8, align 8
- %scevgep20 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %scevgep20, align 4 ; [#uses=1]
- store float %38, float* %9, align 4
- %scevgep21 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %scevgep21, align 4 ; [#uses=1]
- store float %39, float* %10, align 8
- %scevgep22 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %40 = load float* %scevgep22, align 4 ; [#uses=1]
- store float %40, float* %11, align 4
- %scevgep2324 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %scevgep2324, align 4 ; [#uses=1]
- store float %41, float* %12, align 8
- %scevgep25 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %scevgep25, align 4 ; [#uses=1]
- store float %42, float* %13, align 4
- %scevgep26 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %scevgep26, align 4 ; [#uses=1]
- store float %43, float* %14, align 8
- %scevgep27 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %44 = load float* %scevgep27, align 4 ; [#uses=1]
- store float %44, float* %15, align 4
- %scevgep28 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %scevgep28, align 4 ; [#uses=1]
- store float %45, float* %16, align 8
- %scevgep29 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %scevgep29, align 4 ; [#uses=1]
- store float %46, float* %17, align 4
- %scevgep30 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %scevgep30, align 4 ; [#uses=1]
- store float %47, float* %18, align 8
- %scevgep31 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %scevgep31, align 4 ; [#uses=1]
- store float %48, float* %19, align 4
- %scevgep32 = getelementptr %struct.btCompoundShapeChild* %32, i32 %31, i32 1 ; [#uses=1]
- %49 = load %struct.btCollisionShape** %scevgep32, align 4 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btCollisionShape* %49, i32 0, i32 0 ; [#uses=1]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds i32 (...)** %51, i32 7 ; [#uses=1]
- %53 = load i32 (...)** %52, align 4 ; [#uses=1]
- %54 = bitcast i32 (...)* %53 to %struct.btQuadWord* (%struct.btCollisionShape*)* ; [#uses=1]
- %55 = call %struct.btQuadWord* %54(%struct.btCollisionShape* %49) ; [#uses=3]
- %56 = getelementptr inbounds %struct.btQuadWord* %55, i32 0, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=2]
- store float %57, float* %20, align 8
- %58 = getelementptr inbounds %struct.btQuadWord* %55, i32 0, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- store float %59, float* %21, align 4
- %60 = getelementptr inbounds %struct.btQuadWord* %55, i32 0, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = load float* %24, align 4 ; [#uses=1]
- %63 = fmul float %61, %62 ; [#uses=1]
- %64 = load float* %25, align 4 ; [#uses=1]
- %65 = fmul float %59, %64 ; [#uses=1]
- %66 = load float* %26, align 4 ; [#uses=1]
- %67 = fmul float %57, %66 ; [#uses=1]
- %68 = load float* %27, align 4 ; [#uses=1]
- %69 = fdiv float %63, %68 ; [#uses=1]
- %70 = load float* %28, align 4 ; [#uses=1]
- %71 = fdiv float %65, %70 ; [#uses=1]
- %72 = load float* %29, align 4 ; [#uses=1]
- %73 = fdiv float %67, %72 ; [#uses=1]
- store float %73, float* %20, align 8
- store float %71, float* %21, align 4
- store float %69, float* %22, align 8
- store float 0.000000e+00, float* %23, align 4
- %74 = load %struct.btCompoundShapeChild** %3, align 4 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btCompoundShapeChild* %74, i32 %31, i32 1 ; [#uses=1]
- %75 = load %struct.btCollisionShape** %scevgep33, align 4 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btCollisionShape* %75, i32 0, i32 0 ; [#uses=1]
- %77 = load i32 (...)*** %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds i32 (...)** %77, i32 6 ; [#uses=1]
- %79 = load i32 (...)** %78, align 4 ; [#uses=1]
- %80 = bitcast i32 (...)* %79 to void (%struct.btCollisionShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %80(%struct.btCollisionShape* %75, %struct.btQuadWord* %childScale)
- %81 = load float* %18, align 8 ; [#uses=1]
- %82 = load float* %24, align 4 ; [#uses=1]
- %83 = fmul float %81, %82 ; [#uses=1]
- %84 = load float* %17, align 4 ; [#uses=1]
- %85 = load float* %25, align 4 ; [#uses=1]
- %86 = fmul float %84, %85 ; [#uses=1]
- %87 = load float* %16, align 8 ; [#uses=1]
- %88 = load float* %26, align 4 ; [#uses=1]
- %89 = fmul float %87, %88 ; [#uses=1]
- store float %89, float* %16, align 8
- store float %86, float* %17, align 4
- store float %83, float* %18, align 8
- store float 0.000000e+00, float* %19, align 4
- call void @_ZN15btCompoundShape20updateChildTransformEiRK11btTransform(%struct.btCompoundShape* %this, i32 %31, %struct.btTransform* %childTrans)
- %90 = load i32 (...)*** %30, align 4 ; [#uses=1]
- %91 = getelementptr inbounds i32 (...)** %90, i32 16 ; [#uses=1]
- %92 = load i32 (...)** %91, align 4 ; [#uses=1]
- %93 = bitcast i32 (...)* %92 to void (%struct.btCompoundShape*)* ; [#uses=1]
- call void %93(%struct.btCompoundShape* %this)
- %94 = add nsw i32 %31, 1 ; [#uses=2]
- %95 = load i32* %0, align 4 ; [#uses=1]
- %96 = icmp sgt i32 %95, %94 ; [#uses=1]
- br i1 %96, label %bb, label %bb2
-
-bb2: ; preds = %bb, %entry
- %97 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- %100 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- store float %102, float* %100, align 4
- %103 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- store float %105, float* %103, align 4
- %106 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 7, i32 0, i32 3 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- store float %108, float* %106, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI20btCompoundShapeChildE9push_backERKS0_(%"struct.btAlignedObjectArray<btCompoundShapeChild>"* nocapture %this, %struct.btCompoundShapeChild* nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.408.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.408.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.408.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = mul i32 %iftmp.408.0.i, 80 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btCompoundShapeChild* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI20btCompoundShapeChildE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=1]
- %12 = phi %struct.btCompoundShapeChild* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- tail call void @_ZNK20btAlignedObjectArrayI20btCompoundShapeChildE4copyEiiPS0_(%"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 %11, %struct.btCompoundShapeChild* %12) nounwind
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 3 ; [#uses=3]
- %14 = load %struct.btCompoundShapeChild** %13, align 4 ; [#uses=2]
- %15 = icmp eq %struct.btCompoundShapeChild* %14, null ; [#uses=1]
- br i1 %15, label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE8allocateEi.exit.i
- %16 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 4 ; [#uses=1]
- %17 = load i8* %16, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %17, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %18 = bitcast %struct.btCompoundShapeChild* %14 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %18)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %13, align 4
- br label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI20btCompoundShapeChildE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE8allocateEi.exit.i
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- store %struct.btCompoundShapeChild* %12, %struct.btCompoundShapeChild** %13, align 4
- store i32 %iftmp.408.0.i, i32* %2, align 4
- %.pre2 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE10deallocateEv.exit.i, %bb, %entry
- %20 = phi i32 [ %.pre2, %_ZN20btAlignedObjectArrayI20btCompoundShapeChildE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=20]
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btCompoundShapeChild>"* %this, i32 0, i32 3 ; [#uses=1]
- %22 = load %struct.btCompoundShapeChild** %21, align 4 ; [#uses=20]
- %23 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 1 ; [#uses=1]
- %72 = load %struct.btCollisionShape** %71, align 4 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 1 ; [#uses=1]
- store %struct.btCollisionShape* %72, %struct.btCollisionShape** %73, align 4
- %74 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 2 ; [#uses=1]
- %75 = load i32* %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 2 ; [#uses=1]
- store i32 %75, i32* %76, align 4
- %77 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 3 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 3 ; [#uses=1]
- store float %78, float* %79, align 4
- %80 = getelementptr inbounds %struct.btCompoundShapeChild* %_Val, i32 0, i32 4 ; [#uses=1]
- %81 = load %struct.btDbvtNode** %80, align 4 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btCompoundShapeChild* %22, i32 %20, i32 4 ; [#uses=1]
- store %struct.btDbvtNode* %81, %struct.btDbvtNode** %82, align 4
- %83 = load i32* %0, align 4 ; [#uses=1]
- %84 = add nsw i32 %83, 1 ; [#uses=1]
- store i32 %84, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShape13addChildShapeERK11btTransformP16btCollisionShape(%struct.btCompoundShape* nocapture %this, %struct.btTransform* %localTransform, %struct.btCollisionShape* %shape) align 2 {
-bb.nph:
- %child = alloca %struct.btCompoundShapeChild, align 8 ; [#uses=21]
- %localAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=8]
- %localAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=8]
- %bounds = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 5 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* %0, align 4
- %3 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 4 ; [#uses=2]
- store %struct.btDbvtNode* null, %struct.btDbvtNode** %3, align 4
- %4 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 8
- %7 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 8
- %13 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 8
- %19 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 8
- %25 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 8
- %31 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 8
- %37 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 8
- %43 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 8
- %49 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTransform* %localTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionShape* %shape, %struct.btCollisionShape** %52, align 8
- %53 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 1 ; [#uses=1]
- %54 = load i32* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 2 ; [#uses=1]
- store i32 %54, i32* %55, align 4
- %56 = getelementptr inbounds %struct.btCollisionShape* %shape, i32 0, i32 0 ; [#uses=2]
- %57 = load i32 (...)*** %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds i32 (...)** %57, i32 11 ; [#uses=1]
- %59 = load i32 (...)** %58, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %59 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %61 = call float %60(%struct.btCollisionShape* %shape) ; [#uses=1]
- %62 = getelementptr inbounds %struct.btCompoundShapeChild* %child, i32 0, i32 3 ; [#uses=1]
- store float %61, float* %62, align 8
- %63 = load i32 (...)*** %56, align 4 ; [#uses=1]
- %64 = getelementptr inbounds i32 (...)** %63, i32 2 ; [#uses=1]
- %65 = load i32 (...)** %64, align 4 ; [#uses=1]
- %66 = bitcast i32 (...)* %65 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %66(%struct.btCollisionShape* %shape, %struct.btTransform* %localTransform, %struct.btQuadWord* %localAabbMin, %struct.btQuadWord* %localAabbMax)
- %scevgep = getelementptr %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %scevgep11 = getelementptr %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %scevgep13 = getelementptr %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %scevgep, align 4 ; [#uses=1]
- %68 = load float* %scevgep11, align 8 ; [#uses=2]
- %69 = fcmp ogt float %67, %68 ; [#uses=1]
- br i1 %69, label %bb1, label %bb2
-
-bb1: ; preds = %bb.nph
- store float %68, float* %scevgep, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb.nph
- %70 = load float* %scevgep12, align 4 ; [#uses=1]
- %71 = load float* %scevgep13, align 8 ; [#uses=2]
- %72 = fcmp olt float %70, %71 ; [#uses=1]
- br i1 %72, label %bb4, label %bb5
-
-bb4: ; preds = %bb2
- store float %71, float* %scevgep12, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb2
- %scevgep.1 = getelementptr %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %scevgep11.1 = getelementptr %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep12.1 = getelementptr %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %scevgep13.1 = getelementptr %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %scevgep.1, align 4 ; [#uses=1]
- %74 = load float* %scevgep11.1, align 4 ; [#uses=2]
- %75 = fcmp ogt float %73, %74 ; [#uses=1]
- br i1 %75, label %bb1.1, label %bb2.1
-
-bb7: ; preds = %bb4.2, %bb2.2
- %76 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=1]
- %77 = load %struct.btDbvt** %76, align 4 ; [#uses=2]
- %78 = icmp eq %struct.btDbvt* %77, null ; [#uses=1]
- br i1 %78, label %bb9, label %bb8
-
-bb8: ; preds = %bb7
- %79 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %81 = load float* %80, align 8 ; [#uses=1]
- store float %81, float* %79, align 8
- %82 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %87 = load float* %86, align 8 ; [#uses=1]
- store float %87, float* %85, align 8
- %88 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 8 ; [#uses=1]
- store float %93, float* %91, align 8
- %94 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 8 ; [#uses=1]
- store float %99, float* %97, align 8
- %100 = getelementptr inbounds %struct.GIM_AABB* %bounds, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- store float %102, float* %100, align 4
- %103 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %104 = load i32* %103, align 4 ; [#uses=1]
- %105 = inttoptr i32 %104 to i8* ; [#uses=1]
- %106 = call %struct.btDbvtNode* @_ZN6btDbvt6insertERK12btDbvtAabbMmPv(%struct.btDbvt* %77, %struct.GIM_AABB* %bounds, i8* %105) ; [#uses=1]
- store %struct.btDbvtNode* %106, %struct.btDbvtNode** %3, align 4
- br label %bb9
-
-bb9: ; preds = %bb8, %bb7
- %107 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI20btCompoundShapeChildE9push_backERKS0_(%"struct.btAlignedObjectArray<btCompoundShapeChild>"* %107, %struct.btCompoundShapeChild* %child) inlinehint
- ret void
-
-bb5.1: ; preds = %bb4.1, %bb2.1
- %scevgep.2 = getelementptr %struct.btCompoundShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %scevgep11.2 = getelementptr %struct.btQuadWord* %localAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep12.2 = getelementptr %struct.btCompoundShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %scevgep13.2 = getelementptr %struct.btQuadWord* %localAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %108 = load float* %scevgep.2, align 4 ; [#uses=1]
- %109 = load float* %scevgep11.2, align 8 ; [#uses=2]
- %110 = fcmp ogt float %108, %109 ; [#uses=1]
- br i1 %110, label %bb1.2, label %bb2.2
-
-bb2.1: ; preds = %bb1.1, %bb5
- %111 = load float* %scevgep12.1, align 4 ; [#uses=1]
- %112 = load float* %scevgep13.1, align 4 ; [#uses=2]
- %113 = fcmp olt float %111, %112 ; [#uses=1]
- br i1 %113, label %bb4.1, label %bb5.1
-
-bb1.1: ; preds = %bb5
- store float %74, float* %scevgep.1, align 4
- br label %bb2.1
-
-bb4.1: ; preds = %bb2.1
- store float %112, float* %scevgep12.1, align 4
- br label %bb5.1
-
-bb2.2: ; preds = %bb1.2, %bb5.1
- %114 = load float* %scevgep12.2, align 4 ; [#uses=1]
- %115 = load float* %scevgep13.2, align 8 ; [#uses=2]
- %116 = fcmp olt float %114, %115 ; [#uses=1]
- br i1 %116, label %bb4.2, label %bb7
-
-bb1.2: ; preds = %bb5.1
- store float %109, float* %scevgep.2, align 4
- br label %bb2.2
-
-bb4.2: ; preds = %bb2.2
- store float %115, float* %scevgep12.2, align 4
- br label %bb7
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShapeD0Ev(%struct.btCompoundShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btCompoundShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=2]
- %2 = load %struct.btDbvt** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btDbvt* %2, null ; [#uses=1]
- br i1 %3, label %bb5, label %bb
-
-bb: ; preds = %entry
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %2)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %4 = load %struct.btDbvt** %1, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDbvt* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %bb2.i.i.i20, %lpad
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %19, align 4
- %7 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %invcont, %entry
- %9 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %10 = load %struct.btCompoundShapeChild** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btCompoundShapeChild* %10, null ; [#uses=1]
- br i1 %11, label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb5
- %12 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %14 = bitcast %struct.btCompoundShapeChild* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %14)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %9, align 4
- br label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit
-
-_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit: ; preds = %bb2.i.i.i, %bb5
- %15 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %15, align 4
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %9, align 4
- %16 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = bitcast %struct.btCompoundShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %18)
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %19 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %20 = load %struct.btCompoundShapeChild** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.btCompoundShapeChild* %20, null ; [#uses=1]
- br i1 %21, label %invcont3, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %lpad
- %22 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %24 = bitcast %struct.btCompoundShapeChild* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i20 unwind label %lpad11
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %19, align 4
- br label %invcont3
-
-lpad11: ; preds = %bb1.i.i.i19
- %eh_ptr12 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShapeD1Ev(%struct.btCompoundShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btCompoundShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=2]
- %2 = load %struct.btDbvt** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btDbvt* %2, null ; [#uses=1]
- br i1 %3, label %bb5, label %bb
-
-bb: ; preds = %entry
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %2)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %4 = load %struct.btDbvt** %1, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDbvt* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %bb2.i.i.i20, %lpad
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %18, align 4
- %7 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %invcont, %entry
- %9 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %10 = load %struct.btCompoundShapeChild** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btCompoundShapeChild* %10, null ; [#uses=1]
- br i1 %11, label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb5
- %12 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %14 = bitcast %struct.btCompoundShapeChild* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %14)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %9, align 4
- br label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit
-
-_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit: ; preds = %bb2.i.i.i, %bb5
- %15 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %15, align 4
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %9, align 4
- %16 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %17, align 4
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %18 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %19 = load %struct.btCompoundShapeChild** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btCompoundShapeChild* %19, null ; [#uses=1]
- br i1 %20, label %invcont3, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %lpad
- %21 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %23 = bitcast %struct.btCompoundShapeChild* %19 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %23)
- to label %bb2.i.i.i20 unwind label %lpad11
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %18, align 4
- br label %invcont3
-
-lpad11: ; preds = %bb1.i.i.i19
- %eh_ptr12 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN15btCompoundShapeD2Ev(%struct.btCompoundShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV15btCompoundShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 4 ; [#uses=2]
- %2 = load %struct.btDbvt** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btDbvt* %2, null ; [#uses=1]
- br i1 %3, label %bb5, label %bb
-
-bb: ; preds = %entry
- invoke void @_ZN6btDbvtD1Ev(%struct.btDbvt* %2)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %4 = load %struct.btDbvt** %1, align 4 ; [#uses=1]
- %5 = bitcast %struct.btDbvt* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb5 unwind label %lpad
-
-invcont3: ; preds = %bb2.i.i.i20, %lpad
- %6 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %18, align 4
- %7 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %invcont, %entry
- %9 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %10 = load %struct.btCompoundShapeChild** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btCompoundShapeChild* %10, null ; [#uses=1]
- br i1 %11, label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb5
- %12 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %14 = bitcast %struct.btCompoundShapeChild* %10 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %14)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %9, align 4
- br label %_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit
-
-_ZN20btAlignedObjectArrayI20btCompoundShapeChildED1Ev.exit: ; preds = %bb2.i.i.i, %bb5
- %15 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %15, align 4
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %9, align 4
- %16 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %17, align 4
- ret void
-
-lpad: ; preds = %invcont, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %18 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %19 = load %struct.btCompoundShapeChild** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btCompoundShapeChild* %19, null ; [#uses=1]
- br i1 %20, label %invcont3, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %lpad
- %21 = getelementptr inbounds %struct.btCompoundShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %23 = bitcast %struct.btCompoundShapeChild* %19 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %23)
- to label %bb2.i.i.i20 unwind label %lpad11
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.btCompoundShapeChild* null, %struct.btCompoundShapeChild** %18, align 4
- br label %invcont3
-
-lpad11: ; preds = %bb1.i.i.i19
- %eh_ptr12 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN15btCompoundShapeC1Eb(%struct.btCompoundShape* nocapture %this, i8 zeroext %enableDynamicAabbTree) align 2 {
-entry:
- tail call void @_ZN15btCompoundShapeC2Eb(%struct.btCompoundShape* %this, i8 zeroext %enableDynamicAabbTree)
- ret void
-}
-
-; [#uses=11]
-define void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 35, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8* null, i8** %2, align 4
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV14btConcaveShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %3 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btConcaveShapeD1Ev(%struct.btConcaveShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV14btConcaveShape, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btConcaveShapeD0Ev(%struct.btConcaveShape* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV14btConcaveShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btConcaveShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btConcaveShapeC1Ev(%struct.btConcaveShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 35, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8* null, i8** %2, align 4
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV14btConcaveShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %3 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=40]
-define void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConcaveShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV14btConcaveShape, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN11btConeShapeC2Eff(%struct.btConeShape* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV11btConeShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 3 ; [#uses=1]
- store float %height, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 11, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 2, i32* %7, align 4
- %8 = fmul float %radius, %radius ; [#uses=1]
- %9 = fmul float %height, %height ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = fdiv float %radius, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %13, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK21btConvexInternalShape7getAabbERK11btTransformR9btVector3S4_(%struct.btConvexInternalShape* %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 18 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btConvexInternalShape* %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK11btConeShape21calculateLocalInertiaEfR9btVector3(%struct.btConeShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %identity = alloca %struct.btTransform, align 8 ; [#uses=17]
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 8
- %1 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 8
- %11 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 8
- %13 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 8
- %15 = getelementptr inbounds %struct.btTransform* %identity, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 2 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0 ; [#uses=2]
- %21 = bitcast i32 (...)* %19 to void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %21(%struct.btConvexInternalShape* %20, %struct.btTransform* %identity, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 8 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 8 ; [#uses=1]
- %26 = fsub float %23, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fsub float %28, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 8 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 8 ; [#uses=1]
- %36 = fsub float %33, %35 ; [#uses=1]
- %37 = fmul float %26, 5.000000e-01 ; [#uses=1]
- %38 = fmul float %31, 5.000000e-01 ; [#uses=1]
- %39 = fmul float %36, 5.000000e-01 ; [#uses=1]
- %40 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %41 = getelementptr inbounds i32 (...)** %40, i32 11 ; [#uses=1]
- %42 = load i32 (...)** %41, align 4 ; [#uses=1]
- %43 = bitcast i32 (...)* %42 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %44 = call float %43(%struct.btConvexInternalShape* %20) ; [#uses=3]
- %45 = fadd float %39, %44 ; [#uses=1]
- %46 = fmul float %45, 2.000000e+00 ; [#uses=2]
- %47 = fadd float %38, %44 ; [#uses=1]
- %48 = fmul float %47, 2.000000e+00 ; [#uses=2]
- %49 = fadd float %37, %44 ; [#uses=1]
- %50 = fmul float %49, 2.000000e+00 ; [#uses=2]
- %51 = fmul float %46, %46 ; [#uses=2]
- %52 = fmul float %48, %48 ; [#uses=2]
- %53 = fmul float %50, %50 ; [#uses=2]
- %54 = fmul float %mass, 0x3FB5555540000000 ; [#uses=3]
- %55 = fadd float %51, %52 ; [#uses=1]
- %56 = fadd float %51, %53 ; [#uses=1]
- %57 = fadd float %52, %53 ; [#uses=1]
- %58 = fmul float %55, %54 ; [#uses=1]
- %59 = fmul float %56, %54 ; [#uses=1]
- %60 = fmul float %57, %54 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %60, float* %61, align 4
- %62 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %59, float* %62, align 4
- %63 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %58, float* %63, align 4
- %64 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %64, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK11btConeShape7getNameEv(%struct.btConeShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([5 x i8]* @.str65, i32 0, i32 0)
-}
-
-; [#uses=0]
-define void @_ZN11btConeShape14setConeUpIndexEi(%struct.btConeShape* nocapture %this, i32 %upIndex) nounwind align 2 {
-entry:
- switch i32 %upIndex, label %return [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- ]
-
-bb: ; preds = %entry
- %0 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- store i32 1, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 2, i32* %2, align 4
- ret void
-
-bb1: ; preds = %entry
- %3 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 1, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 2, i32* %5, align 4
- ret void
-
-bb2: ; preds = %entry
- %6 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 2, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 1, i32* %8, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN11btConeShapeD0Ev(%struct.btConeShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConeShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN11btConeShapeD1Ev(%struct.btConeShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK11btConeShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConeShape* %this, %struct.btQuadWord* nocapture %vec) align 2 {
-entry:
- tail call void @_ZNK11btConeShape16coneLocalSupportERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConeShape* %this, %struct.btQuadWord* %vec) nounwind
- %0 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0 ; [#uses=2]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %7 = fcmp une float %6, 0.000000e+00 ; [#uses=1]
- br i1 %7, label %bb, label %return
-
-bb: ; preds = %entry
- %8 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=3]
- %12 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fmul float %9, %9 ; [#uses=1]
- %15 = fmul float %11, %11 ; [#uses=1]
- %16 = fadd float %14, %15 ; [#uses=1]
- %17 = fmul float %13, %13 ; [#uses=1]
- %18 = fadd float %16, %17 ; [#uses=1]
- %19 = fcmp olt float %18, 0x3D10000000000000 ; [#uses=3]
- %vecnorm.0.0.0 = select i1 %19, float -1.000000e+00, float %9 ; [#uses=3]
- %vecnorm.0.1.0 = select i1 %19, float -1.000000e+00, float %11 ; [#uses=3]
- %vecnorm.0.2.0 = select i1 %19, float -1.000000e+00, float %13 ; [#uses=3]
- %20 = fmul float %vecnorm.0.0.0, %vecnorm.0.0.0 ; [#uses=1]
- %21 = fmul float %vecnorm.0.1.0, %vecnorm.0.1.0 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- %23 = fmul float %vecnorm.0.2.0, %vecnorm.0.2.0 ; [#uses=1]
- %24 = fadd float %22, %23 ; [#uses=1]
- %25 = tail call float @sqrtf(float %24) nounwind readonly ; [#uses=1]
- %26 = fdiv float 1.000000e+00, %25 ; [#uses=3]
- %27 = fmul float %vecnorm.0.0.0, %26 ; [#uses=1]
- %28 = fmul float %vecnorm.0.1.0, %26 ; [#uses=1]
- %29 = fmul float %vecnorm.0.2.0, %26 ; [#uses=1]
- %30 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %31 = getelementptr inbounds i32 (...)** %30, i32 11 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = bitcast i32 (...)* %32 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %34 = tail call float %33(%struct.btConvexInternalShape* %4) ; [#uses=3]
- %35 = fmul float %29, %34 ; [#uses=1]
- %36 = fmul float %28, %34 ; [#uses=1]
- %37 = fmul float %27, %34 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fadd float %39, %37 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fadd float %42, %36 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fadd float %45, %35 ; [#uses=1]
- store float %46, float* %44, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK11btConeShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConeShape* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind align 2 {
-entry:
- tail call void @_ZNK11btConeShape16coneLocalSupportERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConeShape* %this, %struct.btQuadWord* %vec) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK11btConeShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btConeShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.03 = phi i32 [ 0, %bb.nph ], [ %9, %bb ] ; [#uses=6]
- %scevgep = getelementptr %struct.btQuadWord* %vectors, i32 %i.03 ; [#uses=1]
- %scevgep45 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 0 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 1 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 2 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 3 ; [#uses=1]
- call void @_ZNK11btConeShape16coneLocalSupportERK9btVector3(%struct.btQuadWord* noalias sret %memtmp, %struct.btConeShape* %this, %struct.btQuadWord* %scevgep) nounwind
- %5 = load float* %1, align 8 ; [#uses=1]
- store float %5, float* %scevgep45, align 4
- %6 = load float* %2, align 4 ; [#uses=1]
- store float %6, float* %scevgep6, align 4
- %7 = load float* %3, align 8 ; [#uses=1]
- store float %7, float* %scevgep7, align 4
- %8 = load float* %4, align 4 ; [#uses=1]
- store float %8, float* %scevgep8, align 4
- %9 = add nsw i32 %i.03, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %9, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConeShapeXD0Ev(%struct.btConeShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConeShapeX* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConeShapeXD1Ev(%struct.btConeShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConeShapeZD0Ev(%struct.btConeShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConeShapeX* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btConeShapeZD1Ev(%struct.btConeShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=3]
-define void @_ZNK11btConeShape16coneLocalSupportERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConeShape* nocapture %this, %struct.btQuadWord* nocapture %v) nounwind align 2 {
-entry:
- %tmp = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %tmp3 = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %tmp5 = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %0 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fmul float %1, 5.000000e-01 ; [#uses=3]
- %3 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 %4 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fmul float %11, %11 ; [#uses=1]
- %13 = fadd float %9, %12 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fmul float %15, %15 ; [#uses=1]
- %17 = fadd float %13, %16 ; [#uses=1]
- %18 = call float @sqrtf(float %17) nounwind readonly ; [#uses=1]
- %19 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = fcmp ogt float %6, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- %24 = load i32* %23, align 4 ; [#uses=4]
- br i1 %22, label %bb, label %bb1
-
-bb: ; preds = %entry
- %25 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %24 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %4 ; [#uses=1]
- store float %2, float* %26, align 4
- %27 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- %28 = load i32* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %28 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 8 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 8 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 3 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- ret void
-
-bb1: ; preds = %entry
- %42 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 %24 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = fmul float %43, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=3]
- %47 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 %46 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=3]
- %49 = fmul float %48, %48 ; [#uses=1]
- %50 = fadd float %44, %49 ; [#uses=1]
- %51 = call float @sqrtf(float %50) nounwind readonly ; [#uses=2]
- %52 = fcmp ogt float %51, 0x3E80000000000000 ; [#uses=1]
- br i1 %52, label %bb2, label %bb4
-
-bb2: ; preds = %bb1
- %53 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fdiv float %54, %51 ; [#uses=2]
- %56 = fmul float %43, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btQuadWord* %tmp3, i32 0, i32 0, i32 %24 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = fsub float -0.000000e+00, %2 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuadWord* %tmp3, i32 0, i32 0, i32 %4 ; [#uses=1]
- store float %58, float* %59, align 4
- %60 = fmul float %48, %55 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuadWord* %tmp3, i32 0, i32 0, i32 %46 ; [#uses=1]
- store float %60, float* %61, align 4
- %62 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btQuadWord* %tmp3, i32 0, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 8 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btQuadWord* %tmp3, i32 0, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btQuadWord* %tmp3, i32 0, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 8 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btQuadWord* %tmp3, i32 0, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- ret void
-
-bb4: ; preds = %bb1
- %74 = getelementptr inbounds %struct.btQuadWord* %tmp5, i32 0, i32 0, i32 %24 ; [#uses=1]
- store float 0.000000e+00, float* %74, align 4
- %75 = fsub float -0.000000e+00, %2 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btQuadWord* %tmp5, i32 0, i32 0, i32 %4 ; [#uses=1]
- store float %75, float* %76, align 4
- %77 = getelementptr inbounds %struct.btQuadWord* %tmp5, i32 0, i32 0, i32 %46 ; [#uses=1]
- store float 0.000000e+00, float* %77, align 4
- %78 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btQuadWord* %tmp5, i32 0, i32 0, i32 0 ; [#uses=1]
- %80 = load float* %79, align 8 ; [#uses=1]
- store float %80, float* %78, align 4
- %81 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btQuadWord* %tmp5, i32 0, i32 0, i32 1 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btQuadWord* %tmp5, i32 0, i32 0, i32 2 ; [#uses=1]
- %86 = load float* %85, align 8 ; [#uses=1]
- store float %86, float* %84, align 4
- %87 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btQuadWord* %tmp5, i32 0, i32 0, i32 3 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btConeShapeXC1Eff(%struct.btConeShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV11btConeShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %height, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 11, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 0 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 1 ; [#uses=2]
- store i32 1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 2, i32* %7, align 4
- %8 = fmul float %radius, %radius ; [#uses=1]
- %9 = fmul float %height, %height ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = fdiv float %radius, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %13, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV12btConeShapeX, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 1, i32* %5, align 4
- store i32 0, i32* %6, align 4
- store i32 2, i32* %7, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btConeShapeXC2Eff(%struct.btConeShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV11btConeShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %height, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 11, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 0 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 1 ; [#uses=2]
- store i32 1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 2, i32* %7, align 4
- %8 = fmul float %radius, %radius ; [#uses=1]
- %9 = fmul float %height, %height ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = fdiv float %radius, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %13, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV12btConeShapeX, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 1, i32* %5, align 4
- store i32 0, i32* %6, align 4
- store i32 2, i32* %7, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btConeShapeZC1Eff(%struct.btConeShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV11btConeShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %height, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 11, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 0 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 1 ; [#uses=2]
- store i32 1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 2, i32* %7, align 4
- %8 = fmul float %radius, %radius ; [#uses=1]
- %9 = fmul float %height, %height ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = fdiv float %radius, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %13, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV12btConeShapeZ, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 0, i32* %5, align 4
- store i32 2, i32* %6, align 4
- store i32 1, i32* %7, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btConeShapeZC2Eff(%struct.btConeShapeX* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV11btConeShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %height, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 11, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 0 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 1 ; [#uses=2]
- store i32 1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 2, i32* %7, align 4
- %8 = fmul float %radius, %radius ; [#uses=1]
- %9 = fmul float %height, %height ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = fdiv float %radius, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btConeShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %13, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV12btConeShapeZ, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 0, i32* %5, align 4
- store i32 2, i32* %6, align 4
- store i32 1, i32* %7, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN11btConeShapeC1Eff(%struct.btConeShape* %this, float %radius, float %height) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV11btConeShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 3 ; [#uses=1]
- store float %height, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 11, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 1, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 2, i32* %7, align 4
- %8 = fmul float %radius, %radius ; [#uses=1]
- %9 = fmul float %height, %height ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = fdiv float %radius, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btConeShape* %this, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %13, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btConvexHullShapeC2EPKfii(%struct.btConvexHullShape* %this, float* nocapture %points, i32 %numPoints, i32 %stride) align 2 {
-invcont:
- %0 = bitcast float* %points to i8* ; [#uses=1]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0 ; [#uses=2]
- call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %2)
- %3 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV17btConvexHullShape, i32 0, i32 2), i32 (...)*** %3, align 4
- %4 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=5]
- store %struct.btQuadWord* null, %struct.btQuadWord** %5, align 4
- %6 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 4, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %9, i32 %numPoints, %struct.btQuadWord* %1) inlinehint
- to label %invcont1 unwind label %lpad16
-
-invcont1: ; preds = %invcont
- %10 = icmp sgt i32 %numPoints, 0 ; [#uses=1]
- br i1 %10, label %bb.nph, label %bb3
-
-bb.nph: ; preds = %invcont1
- %scevgep41 = getelementptr float* %points, i32 2 ; [#uses=1]
- %scevgep4142 = bitcast float* %scevgep41 to i8* ; [#uses=1]
- %scevgep45 = getelementptr float* %points, i32 1 ; [#uses=1]
- %scevgep4546 = bitcast float* %scevgep45 to i8* ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.035 = phi i32 [ 0, %bb.nph ], [ %15, %bb ] ; [#uses=6]
- %tmp = mul i32 %i.035, %stride ; [#uses=3]
- %uglygep = getelementptr i8* %0, i32 %tmp ; [#uses=1]
- %uglygep40 = bitcast i8* %uglygep to float* ; [#uses=1]
- %uglygep43 = getelementptr i8* %scevgep4142, i32 %tmp ; [#uses=1]
- %uglygep4344 = bitcast i8* %uglygep43 to float* ; [#uses=1]
- %uglygep47 = getelementptr i8* %scevgep4546, i32 %tmp ; [#uses=1]
- %uglygep4748 = bitcast i8* %uglygep47 to float* ; [#uses=1]
- %11 = load %struct.btQuadWord** %5, align 4 ; [#uses=4]
- %12 = load float* %uglygep40, align 4 ; [#uses=1]
- %13 = load float* %uglygep4748, align 4 ; [#uses=1]
- %14 = load float* %uglygep4344, align 4 ; [#uses=1]
- %scevgep36 = getelementptr inbounds %struct.btQuadWord* %11, i32 %i.035, i32 0, i32 0 ; [#uses=1]
- store float %12, float* %scevgep36, align 4
- %scevgep37 = getelementptr %struct.btQuadWord* %11, i32 %i.035, i32 0, i32 1 ; [#uses=1]
- store float %13, float* %scevgep37, align 4
- %scevgep38 = getelementptr %struct.btQuadWord* %11, i32 %i.035, i32 0, i32 2 ; [#uses=1]
- store float %14, float* %scevgep38, align 4
- %scevgep39 = getelementptr %struct.btQuadWord* %11, i32 %i.035, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep39, align 4
- %15 = add nsw i32 %i.035, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %15, %numPoints ; [#uses=1]
- br i1 %exitcond, label %bb3, label %bb
-
-bb3: ; preds = %bb, %invcont1
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %2)
- to label %return unwind label %lpad16
-
-invcont11: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr17)
- unreachable
-
-return: ; preds = %bb3
- ret void
-
-lpad16: ; preds = %bb3, %invcont
- %eh_ptr17 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select19 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %16 = load %struct.btQuadWord** %5, align 4 ; [#uses=2]
- %17 = icmp eq %struct.btQuadWord* %16, null ; [#uses=1]
- br i1 %17, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad16
- %18 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %18, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %19 = bitcast %struct.btQuadWord* %16 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %19)
- to label %bb2.i.i.i unwind label %lpad20
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btQuadWord* null, %struct.btQuadWord** %5, align 4
- br label %ppad
-
-lpad20: ; preds = %bb1.i.i.i
- %eh_ptr21 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select23 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad24: ; preds = %ppad
- %eh_ptr25 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select27 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr25, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad16
- store i8 1, i8* %4, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %5, align 4
- store i32 0, i32* %6, align 4
- store i32 0, i32* %7, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %3, align 4
- %20 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %20)
- to label %invcont11 unwind label %lpad24
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK17btConvexHullShape7getNameEv(%struct.btConvexHullShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([7 x i8]* @.str67, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK17btConvexHullShape28calculateSerializeBufferSizeEv(%struct.btConvexHullShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 68
-}
-
-; [#uses=1]
-define i32 @_ZNK17btConvexHullShape12getNumPlanesEv(%struct.btConvexHullShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZNK17btConvexHullShape8getPlaneER9btVector3S1_i(%struct.btConvexHullShape* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2, i32 %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZNK17btConvexHullShape8isInsideERK9btVector3f(%struct.btConvexHullShape* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, float %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZNK17btConvexHullShape9getVertexEiR9btVector3(%struct.btConvexHullShape* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %vtx) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btQuadWord** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 %i, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %1, i32 %i, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %1, i32 %i, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %16, float* %17, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %11, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %6, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK17btConvexHullShape7getEdgeEiR9btVector3S1_(%struct.btConvexHullShape* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %pa, %struct.btQuadWord* nocapture %pb) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = srem i32 %i, %1 ; [#uses=3]
- %3 = add nsw i32 %i, 1 ; [#uses=1]
- %4 = srem i32 %3, %1 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %6 = load %struct.btQuadWord** %5, align 4 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btQuadWord* %6, i32 %2, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %6, i32 %2, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %6, i32 %2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %21, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = load %struct.btQuadWord** %5, align 4 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btQuadWord* %26, i32 %4, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = load float* %9, align 4 ; [#uses=1]
- %30 = fmul float %28, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %26, i32 %4, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = load float* %14, align 4 ; [#uses=1]
- %34 = fmul float %32, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %26, i32 %4, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = load float* %19, align 4 ; [#uses=1]
- %38 = fmul float %36, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %38, float* %39, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %34, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %30, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 4
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK17btConvexHullShape11getNumEdgesEv(%struct.btConvexHullShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define i32 @_ZNK17btConvexHullShape14getNumVerticesEv(%struct.btConvexHullShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define void @_ZNK17btConvexHullShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btConvexHullShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=2]
- br i1 %0, label %bb, label %bb10.preheader
-
-bb: ; preds = %bb, %entry
- %i.019 = phi i32 [ %1, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep35 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.019, i32 0, i32 3 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %scevgep35, align 4
- %1 = add nsw i32 %i.019, 1 ; [#uses=2]
- %exitcond34 = icmp eq i32 %1, %numVectors ; [#uses=1]
- br i1 %exitcond34, label %bb10.preheader, label %bb
-
-bb10.preheader: ; preds = %bb, %entry
- %2 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp sgt i32 %3, 0 ; [#uses=1]
- br i1 %4, label %bb.nph18, label %return
-
-bb.nph18: ; preds = %bb10.preheader
- %5 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- br i1 %0, label %bb.nph.us, label %bb9
-
-bb9.us: ; preds = %bb7.us
- %9 = load i32* %2, align 4 ; [#uses=1]
- %10 = icmp sgt i32 %9, %tmp ; [#uses=1]
- br i1 %10, label %bb.nph.us, label %return
-
-bb7.us: ; preds = %bb6.us, %bb5.us
- %11 = add nsw i32 %j.016.us, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %11, %numVectors ; [#uses=1]
- br i1 %exitcond, label %bb9.us, label %bb5.us
-
-bb5.us: ; preds = %bb.nph.us, %bb7.us
- %j.016.us = phi i32 [ 0, %bb.nph.us ], [ %11, %bb7.us ] ; [#uses=8]
- %scevgep = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.016.us, i32 0, i32 3 ; [#uses=2]
- %scevgep25 = getelementptr %struct.btQuadWord* %vectors, i32 %j.016.us, i32 0, i32 2 ; [#uses=1]
- %scevgep26 = getelementptr %struct.btQuadWord* %vectors, i32 %j.016.us, i32 0, i32 1 ; [#uses=1]
- %scevgep2728 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %j.016.us, i32 0, i32 0 ; [#uses=1]
- %12 = load float* %scevgep2728, align 4 ; [#uses=1]
- %13 = fmul float %12, %31 ; [#uses=1]
- %14 = load float* %scevgep26, align 4 ; [#uses=1]
- %15 = fmul float %14, %28 ; [#uses=1]
- %16 = fadd float %13, %15 ; [#uses=1]
- %17 = load float* %scevgep25, align 4 ; [#uses=1]
- %18 = fmul float %17, %25 ; [#uses=1]
- %19 = fadd float %16, %18 ; [#uses=2]
- %20 = load float* %scevgep, align 4 ; [#uses=1]
- %21 = fcmp olt float %20, %19 ; [#uses=1]
- br i1 %21, label %bb6.us, label %bb7.us
-
-bb6.us: ; preds = %bb5.us
- %scevgep2324 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %j.016.us, i32 0, i32 0 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.016.us, i32 0, i32 1 ; [#uses=1]
- %scevgep21 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.016.us, i32 0, i32 2 ; [#uses=1]
- store float %31, float* %scevgep2324, align 4
- store float %28, float* %scevgep22, align 4
- store float %25, float* %scevgep21, align 4
- store float %19, float* %scevgep, align 4
- br label %bb7.us
-
-bb.nph.us: ; preds = %bb9.us, %bb.nph18
- %i3.017.us = phi i32 [ %tmp, %bb9.us ], [ 0, %bb.nph18 ] ; [#uses=4]
- %tmp = add i32 %i3.017.us, 1 ; [#uses=2]
- %22 = load %struct.btQuadWord** %5, align 4 ; [#uses=3]
- %scevgep32 = getelementptr %struct.btQuadWord* %22, i32 %i3.017.us, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %scevgep32, align 4 ; [#uses=1]
- %24 = load float* %6, align 4 ; [#uses=1]
- %25 = fmul float %23, %24 ; [#uses=2]
- %scevgep31 = getelementptr %struct.btQuadWord* %22, i32 %i3.017.us, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %scevgep31, align 4 ; [#uses=1]
- %27 = load float* %7, align 4 ; [#uses=1]
- %28 = fmul float %26, %27 ; [#uses=2]
- %scevgep2930 = getelementptr inbounds %struct.btQuadWord* %22, i32 %i3.017.us, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %scevgep2930, align 4 ; [#uses=1]
- %30 = load float* %8, align 4 ; [#uses=1]
- %31 = fmul float %29, %30 ; [#uses=2]
- br label %bb5.us
-
-bb9: ; preds = %bb9, %bb.nph18
- %i3.017 = phi i32 [ %tmp33, %bb9 ], [ 0, %bb.nph18 ] ; [#uses=1]
- %tmp33 = add i32 %i3.017, 1 ; [#uses=2]
- %32 = icmp sgt i32 %3, %tmp33 ; [#uses=1]
- br i1 %32, label %bb9, label %return
-
-return: ; preds = %bb9, %bb9.us, %bb10.preheader
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK17btConvexHullShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConvexHullShape* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %6, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %7 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %8 = load %struct.btQuadWord** %7, align 4 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %tmp = icmp sgt i32 %5, 1 ; [#uses=1]
- %smax = select i1 %tmp, i32 %5, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.09 = phi i32 [ 0, %bb.nph ], [ %33, %bb2 ] ; [#uses=4]
- %maxDot.18 = phi float [ 0xC3ABC16D60000000, %bb.nph ], [ %maxDot.0, %bb2 ] ; [#uses=2]
- %scevgep = getelementptr %struct.btQuadWord* %8, i32 %i.09, i32 0, i32 2 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btQuadWord* %8, i32 %i.09, i32 0, i32 1 ; [#uses=1]
- %scevgep1112 = getelementptr inbounds %struct.btQuadWord* %8, i32 %i.09, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %scevgep, align 4 ; [#uses=1]
- %22 = fmul float %21, %10 ; [#uses=2]
- %23 = load float* %scevgep10, align 4 ; [#uses=1]
- %24 = fmul float %23, %12 ; [#uses=2]
- %25 = load float* %scevgep1112, align 4 ; [#uses=1]
- %26 = fmul float %25, %14 ; [#uses=2]
- %27 = fmul float %16, %26 ; [#uses=1]
- %28 = fmul float %18, %24 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = fmul float %20, %22 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=2]
- %32 = fcmp ogt float %31, %maxDot.18 ; [#uses=1]
- br i1 %32, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- store float %26, float* %0, align 4
- store float %24, float* %1, align 4
- store float %22, float* %2, align 4
- store float 0.000000e+00, float* %3, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %maxDot.0 = phi float [ %31, %bb1 ], [ %maxDot.18, %bb ] ; [#uses=1]
- %33 = add nsw i32 %i.09, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %33, %smax ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btConvexHullShapeD0Ev(%struct.btConvexHullShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV17btConvexHullShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btQuadWord** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btQuadWord* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btQuadWord* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btQuadWord* null, %struct.btQuadWord** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %1, align 4
- %8 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %10 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %10)
- %11 = bitcast %struct.btConvexHullShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %12 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btConvexHullShapeD1Ev(%struct.btConvexHullShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV17btConvexHullShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btQuadWord** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btQuadWord* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btQuadWord* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btQuadWord* null, %struct.btQuadWord** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %1, align 4
- %8 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %10 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %11 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN17btConvexHullShape15setLocalScalingERK9btVector3(%struct.btConvexHullShape* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %12)
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZNK17btConvexHullShape9serializeEPvP12btSerializer(%struct.btConvexHullShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 28 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %3 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 32 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %5 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.2.i.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %7 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.3.i.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %9 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %9, float* %8, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %scevgep.i2.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3.i = bitcast i8* %10 to float* ; [#uses=1]
- %11 = load float* %scevgep.i2.i, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.i3.i, align 4
- %scevgep.1.i4.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5.i = getelementptr i8* %dataBuffer, i32 16 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.1.i5.i to float* ; [#uses=1]
- %13 = load float* %scevgep.1.i4.i, align 4 ; [#uses=1]
- store float %13, float* %12, align 4
- %scevgep.2.i6.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7.i = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %14 = bitcast i8* %scevgep4.2.i7.i to float* ; [#uses=1]
- %15 = load float* %scevgep.2.i6.i, align 4 ; [#uses=1]
- store float %15, float* %14, align 4
- %scevgep.3.i8.i = getelementptr %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9.i = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.3.i9.i to float* ; [#uses=1]
- %17 = load float* %scevgep.3.i8.i, align 4 ; [#uses=1]
- store float %17, float* %16, align 4
- %18 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %21 = bitcast i8* %20 to float* ; [#uses=1]
- store float %19, float* %21, align 4
- %22 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=5]
- %24 = getelementptr inbounds i8* %dataBuffer, i32 60 ; [#uses=1]
- %25 = bitcast i8* %24 to i32* ; [#uses=1]
- store i32 %23, i32* %25, align 4
- %26 = icmp eq i32 %23, 0 ; [#uses=1]
- br i1 %26, label %bb7, label %bb3
-
-bb3: ; preds = %entry
- %27 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=3]
- %28 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 7 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %32 = load %struct.btQuadWord** %31, align 4 ; [#uses=1]
- %33 = bitcast %struct.btQuadWord* %32 to i8* ; [#uses=1]
- %34 = bitcast i32 (...)* %30 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %35 = tail call i8* %34(%struct.btActionInterface* %serializer, i8* %33) ; [#uses=1]
- %36 = bitcast i8* %35 to %struct.btQuadWord* ; [#uses=1]
- %37 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %38 = bitcast i8* %37 to %struct.btQuadWord** ; [#uses=1]
- store %struct.btQuadWord* %36, %struct.btQuadWord** %38, align 4
- %39 = getelementptr inbounds i8* %dataBuffer, i32 56 ; [#uses=1]
- %40 = bitcast i8* %39 to %struct.btVector3DoubleData** ; [#uses=1]
- store %struct.btVector3DoubleData* null, %struct.btVector3DoubleData** %40, align 4
- %41 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 4 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = bitcast i32 (...)* %43 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %45 = tail call %struct.btChunk* %44(%struct.btActionInterface* %serializer, i32 16, i32 %23) ; [#uses=2]
- %46 = icmp sgt i32 %23, 0 ; [#uses=1]
- br i1 %46, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb3
- %47 = getelementptr inbounds %struct.btChunk* %45, i32 0, i32 2 ; [#uses=1]
- %48 = load i8** %47, align 4 ; [#uses=4]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb.nph
- %i.010 = phi i32 [ 0, %bb.nph ], [ %54, %bb4 ] ; [#uses=6]
- %tmp = shl i32 %i.010, 4 ; [#uses=4]
- %scevgep15 = getelementptr i8* %48, i32 %tmp ; [#uses=1]
- %scevgep4.i = bitcast i8* %scevgep15 to float* ; [#uses=1]
- %tmp1726 = or i32 %tmp, 4 ; [#uses=1]
- %scevgep18 = getelementptr i8* %48, i32 %tmp1726 ; [#uses=1]
- %scevgep4.1.i = bitcast i8* %scevgep18 to float* ; [#uses=1]
- %tmp2027 = or i32 %tmp, 8 ; [#uses=1]
- %scevgep21 = getelementptr i8* %48, i32 %tmp2027 ; [#uses=1]
- %scevgep4.2.i = bitcast i8* %scevgep21 to float* ; [#uses=1]
- %tmp2328 = or i32 %tmp, 12 ; [#uses=1]
- %scevgep24 = getelementptr i8* %48, i32 %tmp2328 ; [#uses=1]
- %scevgep4.3.i = bitcast i8* %scevgep24 to float* ; [#uses=1]
- %49 = load %struct.btQuadWord** %31, align 4 ; [#uses=4]
- %scevgep.i = getelementptr inbounds %struct.btQuadWord* %49, i32 %i.010, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %50, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btQuadWord* %49, i32 %i.010, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %51, float* %scevgep4.1.i, align 4
- %scevgep.2.i = getelementptr %struct.btQuadWord* %49, i32 %i.010, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %52, float* %scevgep4.2.i, align 4
- %scevgep.3.i = getelementptr %struct.btQuadWord* %49, i32 %i.010, i32 0, i32 3 ; [#uses=1]
- %53 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %53, float* %scevgep4.3.i, align 4
- %54 = add nsw i32 %i.010, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %54, %23 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb4
-
-bb6: ; preds = %bb4, %bb3
- %55 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %56 = getelementptr inbounds i32 (...)** %55, i32 5 ; [#uses=1]
- %57 = load i32 (...)** %56, align 4 ; [#uses=1]
- %58 = load %struct.btQuadWord** %31, align 4 ; [#uses=1]
- %59 = bitcast %struct.btQuadWord* %58 to i8* ; [#uses=1]
- %60 = bitcast i32 (...)* %57 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %60(%struct.btActionInterface* %serializer, %struct.btChunk* %45, i8* getelementptr inbounds ([19 x i8]* @.str268, i32 0, i32 0), i32 1497453121, i8* %59)
- ret i8* getelementptr inbounds ([22 x i8]* @.str369, i32 0, i32 0)
-
-bb7: ; preds = %entry
- %61 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %62 = bitcast i8* %61 to %struct.btQuadWord** ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %62, align 4
- %63 = getelementptr inbounds i8* %dataBuffer, i32 56 ; [#uses=1]
- %64 = bitcast i8* %63 to %struct.btVector3DoubleData** ; [#uses=1]
- store %struct.btVector3DoubleData* null, %struct.btVector3DoubleData** %64, align 4
- ret i8* getelementptr inbounds ([22 x i8]* @.str369, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK17btConvexHullShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexHullShape* %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btQuadWord*, %struct.btConvexHullShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexHullShape* %this, %struct.btQuadWord* %vec)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 11 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %9 = bitcast i32 (...)* %7 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %10 = tail call float %9(%struct.btConvexInternalShape* %8) ; [#uses=1]
- %11 = fcmp une float %10, 0.000000e+00 ; [#uses=1]
- br i1 %11, label %bb, label %return
-
-bb: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = fmul float %13, %13 ; [#uses=1]
- %19 = fmul float %15, %15 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- %21 = fmul float %17, %17 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- %23 = fcmp olt float %22, 0x3D10000000000000 ; [#uses=3]
- %vecnorm.0.0.0 = select i1 %23, float -1.000000e+00, float %13 ; [#uses=3]
- %vecnorm.0.1.0 = select i1 %23, float -1.000000e+00, float %15 ; [#uses=3]
- %vecnorm.0.2.0 = select i1 %23, float -1.000000e+00, float %17 ; [#uses=3]
- %24 = fmul float %vecnorm.0.0.0, %vecnorm.0.0.0 ; [#uses=1]
- %25 = fmul float %vecnorm.0.1.0, %vecnorm.0.1.0 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fmul float %vecnorm.0.2.0, %vecnorm.0.2.0 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=1]
- %29 = tail call float @sqrtf(float %28) nounwind readonly ; [#uses=1]
- %30 = fdiv float 1.000000e+00, %29 ; [#uses=3]
- %31 = fmul float %vecnorm.0.0.0, %30 ; [#uses=1]
- %32 = fmul float %vecnorm.0.1.0, %30 ; [#uses=1]
- %33 = fmul float %vecnorm.0.2.0, %30 ; [#uses=1]
- %34 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %35 = getelementptr inbounds i32 (...)** %34, i32 11 ; [#uses=1]
- %36 = load i32 (...)** %35, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %36 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %38 = tail call float %37(%struct.btConvexInternalShape* %8) ; [#uses=3]
- %39 = fmul float %33, %38 ; [#uses=1]
- %40 = fmul float %32, %38 ; [#uses=1]
- %41 = fmul float %31, %38 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %41 ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %46, %40 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %49, %39 ; [#uses=1]
- store float %50, float* %48, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btVector3E9push_backERKS0_(%"struct.btAlignedObjectArray<btVector3>"* nocapture %this, %struct.btQuadWord* nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.288.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.288.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.288.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.288.0.i, 4 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btQuadWord* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btQuadWord* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=6]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=10]
- %scevgep.i.i = getelementptr %struct.btQuadWord* %12, i32 %indvar.i.i ; [#uses=1]
- %15 = icmp eq %struct.btQuadWord* %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep14.i.i = getelementptr %struct.btQuadWord* %12, i32 %indvar.i.i, i32 0, i32 1 ; [#uses=1]
- %scevgep15.i.i = getelementptr %struct.btQuadWord* %12, i32 %indvar.i.i, i32 0, i32 2 ; [#uses=1]
- %scevgep16.i.i = getelementptr %struct.btQuadWord* %12, i32 %indvar.i.i, i32 0, i32 3 ; [#uses=1]
- %scevgep13.i.i = getelementptr inbounds %struct.btQuadWord* %12, i32 %indvar.i.i, i32 0, i32 0 ; [#uses=1]
- %16 = load %struct.btQuadWord** %14, align 4 ; [#uses=4]
- %scevgep89.i.i = getelementptr inbounds %struct.btQuadWord* %16, i32 %indvar.i.i, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %scevgep89.i.i, align 4 ; [#uses=1]
- store float %17, float* %scevgep13.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btQuadWord* %16, i32 %indvar.i.i, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %scevgep10.i.i, align 4 ; [#uses=1]
- store float %18, float* %scevgep14.i.i, align 4
- %scevgep11.i.i = getelementptr %struct.btQuadWord* %16, i32 %indvar.i.i, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %scevgep11.i.i, align 4 ; [#uses=1]
- store float %19, float* %scevgep15.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btQuadWord* %16, i32 %indvar.i.i, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %scevgep12.i.i, align 4 ; [#uses=1]
- store float %20, float* %scevgep16.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 3 ; [#uses=3]
- %22 = load %struct.btQuadWord** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btQuadWord* %22, null ; [#uses=1]
- br i1 %23, label %_ZN20btAlignedObjectArrayI9btVector3E10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %26 = bitcast %struct.btQuadWord* %22 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %26)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btQuadWord* null, %struct.btQuadWord** %21, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3E10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI9btVector3E10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btQuadWord* %12, %struct.btQuadWord** %21, align 4
- store i32 %iftmp.288.0.i, i32* %2, align 4
- %.pre11 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI9btVector3E10deallocateEv.exit.i, %bb, %entry
- %28 = phi i32 [ %.pre11, %_ZN20btAlignedObjectArrayI9btVector3E10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=6]
- %29 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 3 ; [#uses=1]
- %30 = load %struct.btQuadWord** %29, align 4 ; [#uses=5]
- %31 = getelementptr inbounds %struct.btQuadWord* %30, i32 %28 ; [#uses=1]
- %32 = icmp eq %struct.btQuadWord* %31, null ; [#uses=1]
- br i1 %32, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %33 = getelementptr inbounds %struct.btQuadWord* %30, i32 %28, i32 0, i32 0 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %_Val, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %30, i32 %28, i32 0, i32 1 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %_Val, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %30, i32 %28, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %_Val, i32 0, i32 0, i32 2 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %30, i32 %28, i32 0, i32 3 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btQuadWord* %_Val, i32 0, i32 0, i32 3 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- store float %44, float* %42, align 4
- %.pre12 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %45 = phi i32 [ %28, %bb1 ], [ %.pre12, %bb2 ] ; [#uses=1]
- %46 = add nsw i32 %45, 1 ; [#uses=1]
- store i32 %46, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btConvexHullShape8addPointERK9btVector3(%struct.btConvexHullShape* %this, %struct.btQuadWord* nocapture %point) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI9btVector3E9push_backERKS0_(%"struct.btAlignedObjectArray<btVector3>"* %0, %struct.btQuadWord* %point) inlinehint
- %1 = getelementptr inbounds %struct.btConvexHullShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %1)
- ret void
-}
-
-; [#uses=10]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* nocapture %this, i32 %newsize, %struct.btQuadWord* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 4 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to %struct.btQuadWord* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi %struct.btQuadWord* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=6]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=10]
- %scevgep.i.i = getelementptr %struct.btQuadWord* %11, i32 %indvar.i.i ; [#uses=1]
- %14 = icmp eq %struct.btQuadWord* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep14.i.i = getelementptr %struct.btQuadWord* %11, i32 %indvar.i.i, i32 0, i32 1 ; [#uses=1]
- %scevgep15.i.i = getelementptr %struct.btQuadWord* %11, i32 %indvar.i.i, i32 0, i32 2 ; [#uses=1]
- %scevgep16.i.i = getelementptr %struct.btQuadWord* %11, i32 %indvar.i.i, i32 0, i32 3 ; [#uses=1]
- %scevgep13.i.i = getelementptr inbounds %struct.btQuadWord* %11, i32 %indvar.i.i, i32 0, i32 0 ; [#uses=1]
- %15 = load %struct.btQuadWord** %13, align 4 ; [#uses=4]
- %scevgep89.i.i = getelementptr inbounds %struct.btQuadWord* %15, i32 %indvar.i.i, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %scevgep89.i.i, align 4 ; [#uses=1]
- store float %16, float* %scevgep13.i.i, align 4
- %scevgep10.i.i = getelementptr %struct.btQuadWord* %15, i32 %indvar.i.i, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %scevgep10.i.i, align 4 ; [#uses=1]
- store float %17, float* %scevgep14.i.i, align 4
- %scevgep11.i.i = getelementptr %struct.btQuadWord* %15, i32 %indvar.i.i, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %scevgep11.i.i, align 4 ; [#uses=1]
- store float %18, float* %scevgep15.i.i, align 4
- %scevgep12.i.i = getelementptr %struct.btQuadWord* %15, i32 %indvar.i.i, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %scevgep12.i.i, align 4 ; [#uses=1]
- store float %19, float* %scevgep16.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond23 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond23, label %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI9btVector3E8allocateEi.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 3 ; [#uses=3]
- %21 = load %struct.btQuadWord** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btQuadWord* %21, null ; [#uses=1]
- br i1 %22, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %25 = bitcast %struct.btQuadWord* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %25)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btQuadWord* null, %struct.btQuadWord** %20, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI9btVector3E4copyEiiPS0_.exit.i
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btQuadWord* %11, %struct.btQuadWord** %20, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %this, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %fillData, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %fillData, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %fillData, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %fillData, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=5]
- %32 = load %struct.btQuadWord** %27, align 4 ; [#uses=5]
- %scevgep = getelementptr %struct.btQuadWord* %32, i32 %tmp17 ; [#uses=1]
- %33 = icmp eq %struct.btQuadWord* %scevgep, null ; [#uses=1]
- br i1 %33, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %34 = load float* %28, align 4 ; [#uses=1]
- %scevgep1819 = getelementptr inbounds %struct.btQuadWord* %32, i32 %tmp17, i32 0, i32 0 ; [#uses=1]
- store float %34, float* %scevgep1819, align 4
- %35 = load float* %29, align 4 ; [#uses=1]
- %scevgep20 = getelementptr %struct.btQuadWord* %32, i32 %tmp17, i32 0, i32 1 ; [#uses=1]
- store float %35, float* %scevgep20, align 4
- %36 = load float* %30, align 4 ; [#uses=1]
- %scevgep21 = getelementptr %struct.btQuadWord* %32, i32 %tmp17, i32 0, i32 2 ; [#uses=1]
- store float %36, float* %scevgep21, align 4
- %37 = load float* %31, align 4 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btQuadWord* %32, i32 %tmp17, i32 0, i32 3 ; [#uses=1]
- store float %37, float* %scevgep22, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btConvexHullShapeC1EPKfii(%struct.btConvexHullShape* %this, float* nocapture %points, i32 %numPoints, i32 %stride) align 2 {
-entry:
- tail call void @_ZN17btConvexHullShapeC2EPKfii(%struct.btConvexHullShape* %this, float* %points, i32 %numPoints, i32 %stride)
- ret void
-}
-
-; [#uses=35]
-define void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 3 ; [#uses=1]
- store float 0x3FA47AE140000000, float* %6, align 4
- ret void
-}
-
-; [#uses=6]
-define void @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3(%struct.btConvexInternalShape* nocapture %this, %struct.btQuadWord* nocapture %scaling) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = tail call float @fabsf(float %1) nounwind readnone ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = tail call float @fabsf(float %4) nounwind readnone ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = tail call float @fabsf(float %7) nounwind readnone ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %8, float* %9, align 4
- %10 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %5, float* %10, align 4
- %11 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %2, float* %11, align 4
- %12 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK21btConvexInternalShape11getAabbSlowERK11btTransformR9btVector3S4_(%struct.btConvexInternalShape* %this, %struct.btTransform* %trans, %struct.btQuadWord* nocapture %minAabb, %struct.btQuadWord* nocapture %maxAabb) align 2 {
-bb.nph:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %vec = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %sv = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 11 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %8 = call float %7(%struct.btConvexInternalShape* %this) ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=3]
- %11 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=3]
- %12 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %14 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %16 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %17 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %19 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %20 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %21 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %22 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %sv, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %sv, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %sv, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 0 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 1 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 2 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 3 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %175, %bb ] ; [#uses=5]
- %scevgep = getelementptr %struct.btQuadWord* %vec, i32 0, i32 0, i32 %i.05 ; [#uses=2]
- %scevgep6 = getelementptr %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %i.05 ; [#uses=2]
- %scevgep7 = getelementptr %struct.btQuadWord* %maxAabb, i32 0, i32 0, i32 %i.05 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %minAabb, i32 0, i32 0, i32 %i.05 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 8
- store float 0.000000e+00, float* %10, align 4
- store float 0.000000e+00, float* %11, align 8
- store float 0.000000e+00, float* %12, align 4
- store float 1.000000e+00, float* %scevgep, align 4
- %43 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %44 = getelementptr inbounds i32 (...)** %43, i32 15 ; [#uses=1]
- %45 = load i32 (...)** %44, align 4 ; [#uses=1]
- %46 = load float* %13, align 4 ; [#uses=1]
- %47 = load float* %9, align 8 ; [#uses=3]
- %48 = fmul float %46, %47 ; [#uses=1]
- %49 = load float* %14, align 4 ; [#uses=1]
- %50 = load float* %10, align 4 ; [#uses=3]
- %51 = fmul float %49, %50 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = load float* %15, align 4 ; [#uses=1]
- %54 = load float* %11, align 8 ; [#uses=3]
- %55 = fmul float %53, %54 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = load float* %16, align 4 ; [#uses=1]
- %58 = fmul float %57, %47 ; [#uses=1]
- %59 = load float* %17, align 4 ; [#uses=1]
- %60 = fmul float %59, %50 ; [#uses=1]
- %61 = fadd float %58, %60 ; [#uses=1]
- %62 = load float* %18, align 4 ; [#uses=1]
- %63 = fmul float %62, %54 ; [#uses=1]
- %64 = fadd float %61, %63 ; [#uses=1]
- %65 = load float* %19, align 4 ; [#uses=1]
- %66 = fmul float %65, %47 ; [#uses=1]
- %67 = load float* %20, align 4 ; [#uses=1]
- %68 = fmul float %67, %50 ; [#uses=1]
- %69 = fadd float %66, %68 ; [#uses=1]
- %70 = load float* %21, align 4 ; [#uses=1]
- %71 = fmul float %70, %54 ; [#uses=1]
- %72 = fadd float %69, %71 ; [#uses=1]
- store float %72, float* %22, align 8
- store float %64, float* %23, align 4
- store float %56, float* %24, align 8
- store float 0.000000e+00, float* %25, align 4
- %73 = bitcast i32 (...)* %45 to void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %73(%struct.btQuadWord* noalias sret %sv, %struct.btConvexInternalShape* %this, %struct.btQuadWord* %2)
- %74 = load float* %21, align 4 ; [#uses=1]
- %75 = load float* %26, align 8 ; [#uses=3]
- %76 = fmul float %74, %75 ; [#uses=1]
- %77 = load float* %18, align 4 ; [#uses=1]
- %78 = load float* %27, align 4 ; [#uses=3]
- %79 = fmul float %77, %78 ; [#uses=1]
- %80 = fadd float %76, %79 ; [#uses=1]
- %81 = load float* %15, align 4 ; [#uses=1]
- %82 = load float* %28, align 8 ; [#uses=3]
- %83 = fmul float %81, %82 ; [#uses=1]
- %84 = fadd float %80, %83 ; [#uses=1]
- %85 = load float* %29, align 4 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = load float* %20, align 4 ; [#uses=1]
- %88 = fmul float %87, %75 ; [#uses=1]
- %89 = load float* %17, align 4 ; [#uses=1]
- %90 = fmul float %89, %78 ; [#uses=1]
- %91 = fadd float %88, %90 ; [#uses=1]
- %92 = load float* %14, align 4 ; [#uses=1]
- %93 = fmul float %92, %82 ; [#uses=1]
- %94 = fadd float %91, %93 ; [#uses=1]
- %95 = load float* %30, align 4 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = load float* %19, align 4 ; [#uses=1]
- %98 = fmul float %97, %75 ; [#uses=1]
- %99 = load float* %16, align 4 ; [#uses=1]
- %100 = fmul float %99, %78 ; [#uses=1]
- %101 = fadd float %98, %100 ; [#uses=1]
- %102 = load float* %13, align 4 ; [#uses=1]
- %103 = fmul float %102, %82 ; [#uses=1]
- %104 = fadd float %101, %103 ; [#uses=1]
- %105 = load float* %31, align 4 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- store float %106, float* %32, align 8
- store float %96, float* %33, align 4
- store float %86, float* %34, align 8
- store float 0.000000e+00, float* %35, align 4
- %107 = load float* %scevgep6, align 4 ; [#uses=1]
- %108 = fadd float %107, %8 ; [#uses=1]
- store float %108, float* %scevgep7, align 4
- store float -1.000000e+00, float* %scevgep, align 4
- %109 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %110 = getelementptr inbounds i32 (...)** %109, i32 15 ; [#uses=1]
- %111 = load i32 (...)** %110, align 4 ; [#uses=1]
- %112 = load float* %13, align 4 ; [#uses=1]
- %113 = load float* %9, align 8 ; [#uses=3]
- %114 = fmul float %112, %113 ; [#uses=1]
- %115 = load float* %14, align 4 ; [#uses=1]
- %116 = load float* %10, align 4 ; [#uses=3]
- %117 = fmul float %115, %116 ; [#uses=1]
- %118 = fadd float %114, %117 ; [#uses=1]
- %119 = load float* %15, align 4 ; [#uses=1]
- %120 = load float* %11, align 8 ; [#uses=3]
- %121 = fmul float %119, %120 ; [#uses=1]
- %122 = fadd float %118, %121 ; [#uses=1]
- %123 = load float* %16, align 4 ; [#uses=1]
- %124 = fmul float %123, %113 ; [#uses=1]
- %125 = load float* %17, align 4 ; [#uses=1]
- %126 = fmul float %125, %116 ; [#uses=1]
- %127 = fadd float %124, %126 ; [#uses=1]
- %128 = load float* %18, align 4 ; [#uses=1]
- %129 = fmul float %128, %120 ; [#uses=1]
- %130 = fadd float %127, %129 ; [#uses=1]
- %131 = load float* %19, align 4 ; [#uses=1]
- %132 = fmul float %131, %113 ; [#uses=1]
- %133 = load float* %20, align 4 ; [#uses=1]
- %134 = fmul float %133, %116 ; [#uses=1]
- %135 = fadd float %132, %134 ; [#uses=1]
- %136 = load float* %21, align 4 ; [#uses=1]
- %137 = fmul float %136, %120 ; [#uses=1]
- %138 = fadd float %135, %137 ; [#uses=1]
- store float %138, float* %36, align 8
- store float %130, float* %37, align 4
- store float %122, float* %38, align 8
- store float 0.000000e+00, float* %39, align 4
- %139 = bitcast i32 (...)* %111 to void (%struct.btQuadWord*, %struct.btConvexInternalShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %139(%struct.btQuadWord* noalias sret %1, %struct.btConvexInternalShape* %this, %struct.btQuadWord* %0)
- %140 = load float* %21, align 4 ; [#uses=1]
- %141 = load float* %40, align 8 ; [#uses=3]
- %142 = fmul float %140, %141 ; [#uses=1]
- %143 = load float* %18, align 4 ; [#uses=1]
- %144 = load float* %41, align 4 ; [#uses=3]
- %145 = fmul float %143, %144 ; [#uses=1]
- %146 = fadd float %142, %145 ; [#uses=1]
- %147 = load float* %15, align 4 ; [#uses=1]
- %148 = load float* %42, align 8 ; [#uses=3]
- %149 = fmul float %147, %148 ; [#uses=1]
- %150 = fadd float %146, %149 ; [#uses=1]
- %151 = load float* %29, align 4 ; [#uses=1]
- %152 = fadd float %150, %151 ; [#uses=1]
- %153 = load float* %20, align 4 ; [#uses=1]
- %154 = fmul float %153, %141 ; [#uses=1]
- %155 = load float* %17, align 4 ; [#uses=1]
- %156 = fmul float %155, %144 ; [#uses=1]
- %157 = fadd float %154, %156 ; [#uses=1]
- %158 = load float* %14, align 4 ; [#uses=1]
- %159 = fmul float %158, %148 ; [#uses=1]
- %160 = fadd float %157, %159 ; [#uses=1]
- %161 = load float* %30, align 4 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = load float* %19, align 4 ; [#uses=1]
- %164 = fmul float %163, %141 ; [#uses=1]
- %165 = load float* %16, align 4 ; [#uses=1]
- %166 = fmul float %165, %144 ; [#uses=1]
- %167 = fadd float %164, %166 ; [#uses=1]
- %168 = load float* %13, align 4 ; [#uses=1]
- %169 = fmul float %168, %148 ; [#uses=1]
- %170 = fadd float %167, %169 ; [#uses=1]
- %171 = load float* %31, align 4 ; [#uses=1]
- %172 = fadd float %170, %171 ; [#uses=1]
- store float %172, float* %32, align 8
- store float %162, float* %33, align 4
- store float %152, float* %34, align 8
- store float 0.000000e+00, float* %35, align 4
- %173 = load float* %scevgep6, align 4 ; [#uses=1]
- %174 = fsub float %173, %8 ; [#uses=1]
- store float %174, float* %scevgep8, align 4
- %175 = add nsw i32 %i.05, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %175, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK32btConvexInternalAabbCachingShape7getAabbERK11btTransformR9btVector3S4_(%struct.btConvexInternalAabbCachingShape* %this, %struct.btTransform* nocapture %trans, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=3]
- %7 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = fsub float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fsub float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fsub float %18, %20 ; [#uses=1]
- %22 = fmul float %11, 5.000000e-01 ; [#uses=1]
- %23 = fmul float %16, 5.000000e-01 ; [#uses=1]
- %24 = fmul float %21, 5.000000e-01 ; [#uses=1]
- %25 = fadd float %24, %6 ; [#uses=3]
- %26 = fadd float %23, %6 ; [#uses=3]
- %27 = fadd float %22, %6 ; [#uses=3]
- %28 = fadd float %8, %10 ; [#uses=1]
- %29 = fadd float %13, %15 ; [#uses=1]
- %30 = fadd float %18, %20 ; [#uses=1]
- %31 = fmul float %28, 5.000000e-01 ; [#uses=3]
- %32 = fmul float %29, 5.000000e-01 ; [#uses=3]
- %33 = fmul float %30, 5.000000e-01 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = tail call float @fabsf(float %35) nounwind readnone ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = tail call float @fabsf(float %38) nounwind readnone ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=2]
- %42 = tail call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = tail call float @fabsf(float %44) nounwind readnone ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = tail call float @fabsf(float %47) nounwind readnone ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = tail call float @fabsf(float %50) nounwind readnone ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = tail call float @fabsf(float %53) nounwind readnone ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=2]
- %57 = tail call float @fabsf(float %56) nounwind readnone ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = tail call float @fabsf(float %59) nounwind readnone ; [#uses=1]
- %61 = fmul float %41, %33 ; [#uses=1]
- %62 = fmul float %38, %32 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fmul float %35, %31 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fadd float %65, %67 ; [#uses=2]
- %69 = fmul float %50, %33 ; [#uses=1]
- %70 = fmul float %47, %32 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %44, %31 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fadd float %73, %75 ; [#uses=2]
- %77 = fmul float %59, %33 ; [#uses=1]
- %78 = fmul float %56, %32 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %53, %31 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fadd float %81, %83 ; [#uses=2]
- %85 = fmul float %42, %25 ; [#uses=1]
- %86 = fmul float %39, %26 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %36, %27 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=2]
- %90 = fmul float %51, %25 ; [#uses=1]
- %91 = fmul float %48, %26 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %45, %27 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=2]
- %95 = fmul float %60, %25 ; [#uses=1]
- %96 = fmul float %57, %26 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %54, %27 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=2]
- %100 = fsub float %68, %89 ; [#uses=1]
- %101 = fsub float %76, %94 ; [#uses=1]
- %102 = fsub float %84, %99 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %102, float* %103, align 4
- %104 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %101, float* %104, align 4
- %105 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %105, align 4
- %106 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %106, align 4
- %107 = fadd float %68, %89 ; [#uses=1]
- %108 = fadd float %76, %94 ; [#uses=1]
- %109 = fadd float %84, %99 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %109, float* %110, align 4
- %111 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %108, float* %111, align 4
- %112 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %107, float* %112, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btConvexInternalShapeD0Ev(%struct.btConvexInternalShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConvexInternalShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btConvexInternalShapeD1Ev(%struct.btConvexInternalShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK21btConvexInternalShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexInternalShape* %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %5(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexShape* %4, %struct.btQuadWord* %vec)
- %6 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 11 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %10 = tail call float %9(%struct.btConvexInternalShape* %this) ; [#uses=1]
- %11 = fcmp une float %10, 0.000000e+00 ; [#uses=1]
- br i1 %11, label %bb, label %return
-
-bb: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = fmul float %13, %13 ; [#uses=1]
- %19 = fmul float %15, %15 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- %21 = fmul float %17, %17 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- %23 = fcmp olt float %22, 0x3D10000000000000 ; [#uses=3]
- %vecnorm.0.0.0 = select i1 %23, float -1.000000e+00, float %13 ; [#uses=3]
- %vecnorm.0.1.0 = select i1 %23, float -1.000000e+00, float %15 ; [#uses=3]
- %vecnorm.0.2.0 = select i1 %23, float -1.000000e+00, float %17 ; [#uses=3]
- %24 = fmul float %vecnorm.0.0.0, %vecnorm.0.0.0 ; [#uses=1]
- %25 = fmul float %vecnorm.0.1.0, %vecnorm.0.1.0 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fmul float %vecnorm.0.2.0, %vecnorm.0.2.0 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=1]
- %29 = tail call float @sqrtf(float %28) nounwind readonly ; [#uses=1]
- %30 = fdiv float 1.000000e+00, %29 ; [#uses=3]
- %31 = fmul float %vecnorm.0.0.0, %30 ; [#uses=1]
- %32 = fmul float %vecnorm.0.1.0, %30 ; [#uses=1]
- %33 = fmul float %vecnorm.0.2.0, %30 ; [#uses=1]
- %34 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %35 = getelementptr inbounds i32 (...)** %34, i32 11 ; [#uses=1]
- %36 = load i32 (...)** %35, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %36 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %38 = tail call float %37(%struct.btConvexInternalShape* %this) ; [#uses=3]
- %39 = fmul float %33, %38 ; [#uses=1]
- %40 = fmul float %32, %38 ; [#uses=1]
- %41 = fmul float %31, %38 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %41 ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %46, %40 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %49, %39 ; [#uses=1]
- store float %50, float* %48, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN32btConvexInternalAabbCachingShapeD0Ev(%struct.btConvexInternalAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConvexInternalAabbCachingShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN32btConvexInternalAabbCachingShapeD1Ev(%struct.btConvexInternalAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN32btConvexInternalAabbCachingShape15setLocalScalingERK9btVector3(%struct.btConvexInternalAabbCachingShape* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = tail call float @fabsf(float %1) nounwind readnone ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = tail call float @fabsf(float %4) nounwind readnone ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = tail call float @fabsf(float %7) nounwind readnone ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %8, float* %9, align 4
- %10 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %5, float* %10, align 4
- %11 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %2, float* %11, align 4
- %12 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- tail call void @_ZN32btConvexInternalAabbCachingShape15recalcLocalAabbEv(%struct.btConvexInternalAabbCachingShape* %this)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN32btConvexInternalAabbCachingShape15recalcLocalAabbEv(%struct.btConvexInternalAabbCachingShape* %this) align 2 {
-entry:
- %_supporting = alloca [6 x %struct.btQuadWord], align 8 ; [#uses=8]
- %0 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 1, i8* %0, align 4
- %1 = load i8* bitcast (i64* @_ZGVZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions to i8*), align 8 ; [#uses=1]
- %2 = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions) nounwind ; [#uses=1]
- %4 = icmp eq i32 %3, 0 ; [#uses=1]
- br i1 %4, label %return, label %bb1
-
-bb1: ; preds = %bb
- store float 1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 3), align 4
- store float -1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 0), align 32
- store float -1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 1), align 4
- store float -1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions) nounwind
- br label %return
-
-return: ; preds = %bb1, %bb, %entry
- %5 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = bitcast [6 x %struct.btQuadWord]* %_supporting to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %6, i8 0, i64 96, i32 8, i1 false)
- %7 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 17 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = bitcast i32 (...)* %9 to void (%struct.btConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* ; [#uses=1]
- %12 = getelementptr inbounds [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0 ; [#uses=1]
- call void %11(%struct.btConvexShape* %10, %struct.btQuadWord* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN32btConvexInternalAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0), %struct.btQuadWord* %12, i32 6)
- %13 = getelementptr inbounds [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %13, align 8 ; [#uses=1]
- %17 = load float* %15, align 4 ; [#uses=6]
- %18 = fadd float %16, %17 ; [#uses=1]
- store float %18, float* %scevgep7, align 4
- %19 = load float* %14, align 8 ; [#uses=1]
- %20 = fsub float %19, %17 ; [#uses=1]
- store float %20, float* %scevgep9, align 4
- %scevgep.1 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0, i32 0, i32 5 ; [#uses=1]
- %scevgep7.1 = getelementptr %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep8.1 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 3, i32 0, i32 5 ; [#uses=1]
- %scevgep9.1 = getelementptr %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %scevgep.1, align 4 ; [#uses=1]
- %22 = fadd float %21, %17 ; [#uses=1]
- store float %22, float* %scevgep7.1, align 4
- %23 = load float* %scevgep8.1, align 4 ; [#uses=1]
- %24 = fsub float %23, %17 ; [#uses=1]
- store float %24, float* %scevgep9.1, align 4
- %scevgep.2 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0, i32 0, i32 10 ; [#uses=1]
- %scevgep7.2 = getelementptr %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep8.2 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 3, i32 0, i32 10 ; [#uses=1]
- %scevgep9.2 = getelementptr %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %scevgep.2, align 8 ; [#uses=1]
- %26 = fadd float %25, %17 ; [#uses=1]
- store float %26, float* %scevgep7.2, align 4
- %27 = load float* %scevgep8.2, align 8 ; [#uses=1]
- %28 = fsub float %27, %17 ; [#uses=1]
- store float %28, float* %scevgep9.2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConvexInternalShapeC1Ev(%struct.btConvexInternalShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btConvexInternalShape* %this, i32 0, i32 3 ; [#uses=1]
- store float 0x3FA47AE140000000, float* %6, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN32btConvexInternalAabbCachingShapeC1Ev(%struct.btConvexInternalAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0x3FA47AE140000000, float* %6, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV32btConvexInternalAabbCachingShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %7 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %15, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN32btConvexInternalAabbCachingShapeC2Ev(%struct.btConvexInternalAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0x3FA47AE140000000, float* %6, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV32btConvexInternalAabbCachingShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %7 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btConvexInternalAabbCachingShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %15, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btConvexPointCloudShape15setLocalScalingERK9btVector3(%struct.btConvexPointCloudShape* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %12)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK23btConvexPointCloudShape7getNameEv(%struct.btConvexPointCloudShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([17 x i8]* @.str77, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK23btConvexPointCloudShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btConvexPointCloudShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=2]
- br i1 %0, label %bb, label %bb10.preheader
-
-bb: ; preds = %bb, %entry
- %i.018 = phi i32 [ %1, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep34 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.018, i32 0, i32 3 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %scevgep34, align 4
- %1 = add nsw i32 %i.018, 1 ; [#uses=2]
- %exitcond33 = icmp eq i32 %1, %numVectors ; [#uses=1]
- br i1 %exitcond33, label %bb10.preheader, label %bb
-
-bb10.preheader: ; preds = %bb, %entry
- %2 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp sgt i32 %3, 0 ; [#uses=1]
- br i1 %4, label %bb.nph17, label %return
-
-bb.nph17: ; preds = %bb10.preheader
- %5 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- br i1 %0, label %bb.nph.us, label %bb9
-
-bb9.us: ; preds = %bb7.us
- %9 = load i32* %2, align 4 ; [#uses=1]
- %10 = icmp sgt i32 %9, %tmp ; [#uses=1]
- br i1 %10, label %bb.nph.us, label %return
-
-bb7.us: ; preds = %bb6.us, %bb5.us
- %11 = add nsw i32 %j.015.us, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %11, %numVectors ; [#uses=1]
- br i1 %exitcond, label %bb9.us, label %bb5.us
-
-bb5.us: ; preds = %bb.nph.us, %bb7.us
- %j.015.us = phi i32 [ 0, %bb.nph.us ], [ %11, %bb7.us ] ; [#uses=8]
- %scevgep = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.015.us, i32 0, i32 3 ; [#uses=2]
- %scevgep24 = getelementptr %struct.btQuadWord* %vectors, i32 %j.015.us, i32 0, i32 2 ; [#uses=1]
- %scevgep25 = getelementptr %struct.btQuadWord* %vectors, i32 %j.015.us, i32 0, i32 1 ; [#uses=1]
- %scevgep2627 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %j.015.us, i32 0, i32 0 ; [#uses=1]
- %12 = load float* %scevgep2627, align 4 ; [#uses=1]
- %13 = fmul float %12, %31 ; [#uses=1]
- %14 = load float* %scevgep25, align 4 ; [#uses=1]
- %15 = fmul float %14, %28 ; [#uses=1]
- %16 = fadd float %13, %15 ; [#uses=1]
- %17 = load float* %scevgep24, align 4 ; [#uses=1]
- %18 = fmul float %17, %25 ; [#uses=1]
- %19 = fadd float %16, %18 ; [#uses=2]
- %20 = load float* %scevgep, align 4 ; [#uses=1]
- %21 = fcmp olt float %20, %19 ; [#uses=1]
- br i1 %21, label %bb6.us, label %bb7.us
-
-bb6.us: ; preds = %bb5.us
- %scevgep2223 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %j.015.us, i32 0, i32 0 ; [#uses=1]
- %scevgep21 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.015.us, i32 0, i32 1 ; [#uses=1]
- %scevgep20 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.015.us, i32 0, i32 2 ; [#uses=1]
- store float %31, float* %scevgep2223, align 4
- store float %28, float* %scevgep21, align 4
- store float %25, float* %scevgep20, align 4
- store float %19, float* %scevgep, align 4
- br label %bb7.us
-
-bb.nph.us: ; preds = %bb9.us, %bb.nph17
- %i3.016.us = phi i32 [ %tmp, %bb9.us ], [ 0, %bb.nph17 ] ; [#uses=4]
- %tmp = add i32 %i3.016.us, 1 ; [#uses=2]
- %22 = load %struct.btQuadWord** %5, align 4 ; [#uses=3]
- %scevgep31 = getelementptr %struct.btQuadWord* %22, i32 %i3.016.us, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %scevgep31, align 4 ; [#uses=1]
- %24 = load float* %6, align 4 ; [#uses=1]
- %25 = fmul float %23, %24 ; [#uses=2]
- %scevgep30 = getelementptr %struct.btQuadWord* %22, i32 %i3.016.us, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %scevgep30, align 4 ; [#uses=1]
- %27 = load float* %7, align 4 ; [#uses=1]
- %28 = fmul float %26, %27 ; [#uses=2]
- %scevgep2829 = getelementptr inbounds %struct.btQuadWord* %22, i32 %i3.016.us, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %scevgep2829, align 4 ; [#uses=1]
- %30 = load float* %8, align 4 ; [#uses=1]
- %31 = fmul float %29, %30 ; [#uses=2]
- br label %bb5.us
-
-bb9: ; preds = %bb9, %bb.nph17
- %i3.016 = phi i32 [ %tmp32, %bb9 ], [ 0, %bb.nph17 ] ; [#uses=1]
- %tmp32 = add i32 %i3.016, 1 ; [#uses=2]
- %32 = icmp sgt i32 %3, %tmp32 ; [#uses=1]
- br i1 %32, label %bb9, label %return
-
-return: ; preds = %bb9, %bb9.us, %bb10.preheader
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK23btConvexPointCloudShape14getNumVerticesEv(%struct.btConvexPointCloudShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define i32 @_ZNK23btConvexPointCloudShape11getNumEdgesEv(%struct.btConvexPointCloudShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZNK23btConvexPointCloudShape7getEdgeEiR9btVector3S1_(%struct.btConvexPointCloudShape* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %pa, %struct.btQuadWord* nocapture %pb) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK23btConvexPointCloudShape9getVertexEiR9btVector3(%struct.btConvexPointCloudShape* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %vtx) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btQuadWord** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btQuadWord* %1, i32 %i, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %1, i32 %i, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %1, i32 %i, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %16, float* %17, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %11, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %6, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK23btConvexPointCloudShape12getNumPlanesEv(%struct.btConvexPointCloudShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZNK23btConvexPointCloudShape8getPlaneER9btVector3S1_i(%struct.btConvexPointCloudShape* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2, i32 %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZNK23btConvexPointCloudShape8isInsideERK9btVector3f(%struct.btConvexPointCloudShape* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, float %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btConvexPointCloudShapeD0Ev(%struct.btConvexPointCloudShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConvexPointCloudShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btConvexPointCloudShapeD1Ev(%struct.btConvexPointCloudShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK23btConvexPointCloudShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexPointCloudShape* %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btQuadWord*, %struct.btConvexPointCloudShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexPointCloudShape* %this, %struct.btQuadWord* %vec)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 11 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %9 = bitcast i32 (...)* %7 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %10 = tail call float %9(%struct.btConvexInternalShape* %8) ; [#uses=1]
- %11 = fcmp une float %10, 0.000000e+00 ; [#uses=1]
- br i1 %11, label %bb, label %return
-
-bb: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = fmul float %13, %13 ; [#uses=1]
- %19 = fmul float %15, %15 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- %21 = fmul float %17, %17 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- %23 = fcmp olt float %22, 0x3D10000000000000 ; [#uses=3]
- %vecnorm.0.0.0 = select i1 %23, float -1.000000e+00, float %13 ; [#uses=3]
- %vecnorm.0.1.0 = select i1 %23, float -1.000000e+00, float %15 ; [#uses=3]
- %vecnorm.0.2.0 = select i1 %23, float -1.000000e+00, float %17 ; [#uses=3]
- %24 = fmul float %vecnorm.0.0.0, %vecnorm.0.0.0 ; [#uses=1]
- %25 = fmul float %vecnorm.0.1.0, %vecnorm.0.1.0 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fmul float %vecnorm.0.2.0, %vecnorm.0.2.0 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=1]
- %29 = tail call float @sqrtf(float %28) nounwind readonly ; [#uses=1]
- %30 = fdiv float 1.000000e+00, %29 ; [#uses=3]
- %31 = fmul float %vecnorm.0.0.0, %30 ; [#uses=1]
- %32 = fmul float %vecnorm.0.1.0, %30 ; [#uses=1]
- %33 = fmul float %vecnorm.0.2.0, %30 ; [#uses=1]
- %34 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %35 = getelementptr inbounds i32 (...)** %34, i32 11 ; [#uses=1]
- %36 = load i32 (...)** %35, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %36 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %38 = tail call float %37(%struct.btConvexInternalShape* %8) ; [#uses=3]
- %39 = fmul float %33, %38 ; [#uses=1]
- %40 = fmul float %32, %38 ; [#uses=1]
- %41 = fmul float %31, %38 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %41 ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %46, %40 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %49, %39 ; [#uses=1]
- store float %50, float* %48, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK23btConvexPointCloudShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConvexPointCloudShape* nocapture %this, %struct.btQuadWord* nocapture %vec0) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = fmul float %5, %5 ; [#uses=1]
- %11 = fmul float %7, %7 ; [#uses=1]
- %12 = fadd float %10, %11 ; [#uses=1]
- %13 = fmul float %9, %9 ; [#uses=1]
- %14 = fadd float %12, %13 ; [#uses=2]
- %15 = fcmp olt float %14, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %15, label %bb6.preheader, label %bb1
-
-bb1: ; preds = %entry
- %16 = tail call float @sqrtf(float %14) nounwind readonly ; [#uses=1]
- %17 = fdiv float 1.000000e+00, %16 ; [#uses=3]
- %18 = fmul float %5, %17 ; [#uses=1]
- %19 = fmul float %7, %17 ; [#uses=1]
- %20 = fmul float %9, %17 ; [#uses=1]
- br label %bb6.preheader
-
-bb6.preheader: ; preds = %bb1, %entry
- %vec.0.2.0.ph = phi float [ 0.000000e+00, %entry ], [ %20, %bb1 ] ; [#uses=1]
- %vec.0.1.0.ph = phi float [ 0.000000e+00, %entry ], [ %19, %bb1 ] ; [#uses=1]
- %vec.0.0.0.ph = phi float [ 1.000000e+00, %entry ], [ %18, %bb1 ] ; [#uses=1]
- %21 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 2 ; [#uses=1]
- %22 = load i32* %21, align 4 ; [#uses=3]
- %23 = icmp sgt i32 %22, 0 ; [#uses=1]
- br i1 %23, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb6.preheader
- %24 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 1 ; [#uses=1]
- %25 = load %struct.btQuadWord** %24, align 4 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btConvexPointCloudShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %tmp = icmp sgt i32 %22, 1 ; [#uses=1]
- %smax = select i1 %tmp, i32 %22, i32 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb5, %bb.nph
- %i.017 = phi i32 [ 0, %bb.nph ], [ %44, %bb5 ] ; [#uses=4]
- %maxDot.116 = phi float [ 0xC3ABC16D60000000, %bb.nph ], [ %maxDot.0, %bb5 ] ; [#uses=2]
- %scevgep = getelementptr %struct.btQuadWord* %25, i32 %i.017, i32 0, i32 2 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btQuadWord* %25, i32 %i.017, i32 0, i32 1 ; [#uses=1]
- %scevgep1920 = getelementptr inbounds %struct.btQuadWord* %25, i32 %i.017, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %scevgep, align 4 ; [#uses=1]
- %33 = fmul float %32, %27 ; [#uses=2]
- %34 = load float* %scevgep18, align 4 ; [#uses=1]
- %35 = fmul float %34, %29 ; [#uses=2]
- %36 = load float* %scevgep1920, align 4 ; [#uses=1]
- %37 = fmul float %36, %31 ; [#uses=2]
- %38 = fmul float %vec.0.0.0.ph, %37 ; [#uses=1]
- %39 = fmul float %vec.0.1.0.ph, %35 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = fmul float %vec.0.2.0.ph, %33 ; [#uses=1]
- %42 = fadd float %40, %41 ; [#uses=2]
- %43 = fcmp ogt float %42, %maxDot.116 ; [#uses=1]
- br i1 %43, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- store float %37, float* %0, align 4
- store float %35, float* %1, align 4
- store float %33, float* %2, align 4
- store float 0.000000e+00, float* %3, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %maxDot.0 = phi float [ %42, %bb4 ], [ %maxDot.116, %bb3 ] ; [#uses=1]
- %44 = add nsw i32 %i.017, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %44, %smax ; [#uses=1]
- br i1 %exitcond, label %return, label %bb3
-
-return: ; preds = %bb5, %bb6.preheader
- ret void
-}
-
-; [#uses=8]
-define void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 35, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8* null, i8** %2, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btConvexShape, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN13btConvexShapeD1Ev(%struct.btConvexShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btConvexShape, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN13btConvexShapeD0Ev(%struct.btConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btConvexShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btConvexShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN13btConvexShapeC1Ev(%struct.btConvexShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 35, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8* null, i8** %2, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btConvexShape, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=6]
-define float @_ZNK13btConvexShape19getMarginNonVirtualEv(%struct.btConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- switch i32 %1, label %bb6 [
- i32 0, label %bb1
- i32 1, label %bb2
- i32 4, label %bb5
- i32 5, label %bb5
- i32 8, label %bb
- i32 10, label %bb4
- i32 13, label %bb3
- ]
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btConvexShape* %this, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = bitcast i32* %2 to float* ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btConvexShape* %this, i32 1 ; [#uses=1]
- %6 = bitcast %struct.btConvexShape* %5 to float* ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fmul float %4, %7 ; [#uses=1]
- ret float %8
-
-bb1: ; preds = %entry
- %9 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %10 = bitcast i8** %9 to float* ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- ret float %11
-
-bb2: ; preds = %entry
- %12 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %13 = bitcast i8** %12 to float* ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- ret float %14
-
-bb3: ; preds = %entry
- %15 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %16 = bitcast i8** %15 to float* ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- ret float %17
-
-bb4: ; preds = %entry
- %18 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %19 = bitcast i8** %18 to float* ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- ret float %20
-
-bb5: ; preds = %entry, %entry
- %21 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %22 = bitcast i8** %21 to float* ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- ret float %23
-
-bb6: ; preds = %entry
- %24 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load i32 (...)*** %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32 (...)** %25, i32 11 ; [#uses=1]
- %27 = load i32 (...)** %26, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %27 to float (%struct.btConvexShape*)* ; [#uses=1]
- %29 = tail call float %28(%struct.btConvexShape* %this) ; [#uses=1]
- ret float %29
-}
-
-; [#uses=6]
-define void @_ZNK13btConvexShape44localGetSupportVertexWithoutMarginNonVirtualERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexShape* %this, %struct.btQuadWord* %localDir) align 2 {
-entry:
- %halfExtents4 = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %v = alloca %struct.btQuadWord, align 8 ; [#uses=8]
- %tmp = alloca %struct.btQuadWord, align 8 ; [#uses=12]
- %pos = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pos26 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- switch i32 %1, label %bb40 [
- i32 0, label %bb1
- i32 1, label %bb2
- i32 4, label %bb34
- i32 5, label %bb30
- i32 8, label %bb
- i32 10, label %bb17
- i32 13, label %bb3
- ]
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- ret void
-
-bb1: ; preds = %entry
- %6 = getelementptr inbounds %struct.btConvexShape* %this, i32 2, i32 0, i32 1 ; [#uses=3]
- %7 = getelementptr inbounds i32* %6, i32 2 ; [#uses=1]
- %8 = bitcast i32* %7 to float* ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=2]
- %10 = fsub float -0.000000e+00, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fcmp ult float %12, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i65 = select i1 %13, float %10, float %9 ; [#uses=1]
- %14 = getelementptr inbounds i32* %6, i32 1 ; [#uses=1]
- %15 = bitcast i32* %14 to float* ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fsub float -0.000000e+00, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fcmp ult float %19, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i64 = select i1 %20, float %17, float %16 ; [#uses=1]
- %21 = bitcast i32* %6 to float* ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fsub float -0.000000e+00, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fcmp ult float %25, 0.000000e+00 ; [#uses=1]
- %iftmp.3.0.i = select i1 %26, float %23, float %22 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %iftmp.3.0.i, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.3.0.i64, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.3.0.i65, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- ret void
-
-bb2: ; preds = %entry
- %31 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=3]
- %35 = load float* %32, align 4 ; [#uses=3]
- %36 = load float* %31, align 4 ; [#uses=3]
- %37 = getelementptr inbounds %struct.btConvexShape* %this, i32 4, i32 0, i32 1 ; [#uses=10]
- %38 = bitcast i32* %37 to %struct.btQuadWord* ; [#uses=3]
- %39 = getelementptr inbounds i32* %37, i32 8 ; [#uses=1]
- %40 = bitcast i32* %39 to float* ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fmul float %34, %41 ; [#uses=1]
- %43 = getelementptr inbounds i32* %37, i32 9 ; [#uses=1]
- %44 = bitcast i32* %43 to float* ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fmul float %35, %45 ; [#uses=1]
- %47 = fadd float %42, %46 ; [#uses=1]
- %48 = getelementptr inbounds i32* %37, i32 10 ; [#uses=1]
- %49 = bitcast i32* %48 to float* ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %36, %50 ; [#uses=1]
- %52 = fadd float %47, %51 ; [#uses=2]
- %53 = getelementptr inbounds i32* %37, i32 4 ; [#uses=1]
- %54 = bitcast i32* %53 to float* ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %34, %55 ; [#uses=1]
- %57 = getelementptr inbounds i32* %37, i32 5 ; [#uses=1]
- %58 = bitcast i32* %57 to float* ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = fmul float %35, %59 ; [#uses=1]
- %61 = fadd float %56, %60 ; [#uses=1]
- %62 = getelementptr inbounds i32* %37, i32 6 ; [#uses=1]
- %63 = bitcast i32* %62 to float* ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fmul float %36, %64 ; [#uses=1]
- %66 = fadd float %61, %65 ; [#uses=2]
- %67 = bitcast i32* %37 to float* ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %34, %68 ; [#uses=1]
- %70 = getelementptr inbounds i32* %37, i32 1 ; [#uses=1]
- %71 = bitcast i32* %70 to float* ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %35, %72 ; [#uses=1]
- %74 = fadd float %69, %73 ; [#uses=1]
- %75 = getelementptr inbounds i32* %37, i32 2 ; [#uses=1]
- %76 = bitcast i32* %75 to float* ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fmul float %36, %77 ; [#uses=1]
- %79 = fadd float %74, %78 ; [#uses=2]
- %80 = fcmp olt float %79, %66 ; [#uses=1]
- br i1 %80, label %bb.i63, label %bb4.i
-
-bb.i63: ; preds = %bb2
- %81 = fcmp olt float %66, %52 ; [#uses=1]
- %iftmp.18.0.i = select i1 %81, i32 2, i32 1 ; [#uses=1]
- br label %_ZNK9btVector37maxAxisEv.exit
-
-bb4.i: ; preds = %bb2
- %82 = fcmp olt float %79, %52 ; [#uses=1]
- %iftmp.19.0.i = select i1 %82, i32 2, i32 0 ; [#uses=1]
- br label %_ZNK9btVector37maxAxisEv.exit
-
-_ZNK9btVector37maxAxisEv.exit: ; preds = %bb4.i, %bb.i63
- %83 = phi i32 [ %iftmp.19.0.i, %bb4.i ], [ %iftmp.18.0.i, %bb.i63 ] ; [#uses=3]
- %84 = getelementptr inbounds %struct.btQuadWord* %38, i32 %83, i32 0, i32 0 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btQuadWord* %38, i32 %83, i32 0, i32 1 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btQuadWord* %38, i32 %83, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %85, float* %90, align 4
- %91 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %87, float* %91, align 4
- %92 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %89, float* %92, align 4
- %93 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %93, align 4
- ret void
-
-bb3: ; preds = %entry
- %94 = getelementptr inbounds %struct.btConvexShape* %this, i32 2, i32 0, i32 1 ; [#uses=4]
- %95 = getelementptr inbounds %struct.btQuadWord* %halfExtents4, i32 0, i32 0, i32 0 ; [#uses=1]
- %96 = bitcast i32* %94 to float* ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- store float %97, float* %95, align 8
- %98 = getelementptr inbounds %struct.btQuadWord* %halfExtents4, i32 0, i32 0, i32 1 ; [#uses=1]
- %99 = getelementptr inbounds i32* %94, i32 1 ; [#uses=1]
- %100 = bitcast i32* %99 to float* ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- store float %101, float* %98, align 4
- %102 = getelementptr inbounds %struct.btQuadWord* %halfExtents4, i32 0, i32 0, i32 2 ; [#uses=1]
- %103 = getelementptr inbounds i32* %94, i32 2 ; [#uses=1]
- %104 = bitcast i32* %103 to float* ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- store float %105, float* %102, align 8
- %106 = getelementptr inbounds %struct.btQuadWord* %halfExtents4, i32 0, i32 0, i32 3 ; [#uses=1]
- %107 = getelementptr inbounds i32* %94, i32 3 ; [#uses=1]
- %108 = bitcast i32* %107 to float* ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- store float %109, float* %106, align 4
- %110 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 2 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 1 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 0 ; [#uses=1]
- %113 = load float* %112, align 4 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %113, float* %114, align 8
- %115 = load float* %111, align 4 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %115, float* %116, align 4
- %117 = load float* %110, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %117, float* %118, align 8
- %119 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %119, align 4
- %120 = getelementptr inbounds %struct.btConvexShape* %this, i32 4, i32 0, i32 1 ; [#uses=1]
- %121 = load i32* %120, align 4 ; [#uses=2]
- switch i32 %121, label %bb8 [
- i32 1, label %bb6
- i32 2, label %bb7
- ]
-
-bb6: ; preds = %bb3
- br label %bb8
-
-bb7: ; preds = %bb3
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6, %bb3
- %XX.0 = phi i32 [ 0, %bb7 ], [ 0, %bb6 ], [ 1, %bb3 ] ; [#uses=4]
- %YY.0 = phi i32 [ 2, %bb7 ], [ 1, %bb6 ], [ 0, %bb3 ] ; [#uses=4]
- %ZZ.0 = phi i32 [ 1, %bb7 ], [ 2, %bb6 ], [ 2, %bb3 ] ; [#uses=3]
- %122 = getelementptr inbounds %struct.btQuadWord* %halfExtents4, i32 0, i32 0, i32 %XX.0 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=2]
- %124 = getelementptr inbounds %struct.btQuadWord* %halfExtents4, i32 0, i32 0, i32 %121 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=4]
- %126 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 %XX.0 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=3]
- %128 = fmul float %127, %127 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 %ZZ.0 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=3]
- %131 = fmul float %130, %130 ; [#uses=1]
- %132 = fadd float %128, %131 ; [#uses=1]
- %133 = call float @sqrtf(float %132) nounwind readonly ; [#uses=2]
- %134 = fcmp une float %133, 0.000000e+00 ; [#uses=1]
- br i1 %134, label %bb9, label %bb13
-
-bb9: ; preds = %bb8
- %135 = fdiv float %123, %133 ; [#uses=2]
- %136 = fmul float %127, %135 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %XX.0 ; [#uses=1]
- store float %136, float* %137, align 4
- %138 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 %YY.0 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=1]
- %140 = fcmp olt float %139, 0.000000e+00 ; [#uses=1]
- br i1 %140, label %bb10, label %bb12
-
-bb10: ; preds = %bb9
- %141 = fsub float -0.000000e+00, %125 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb10, %bb9
- %iftmp.152.0 = phi float [ %141, %bb10 ], [ %125, %bb9 ] ; [#uses=1]
- %142 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %YY.0 ; [#uses=1]
- store float %iftmp.152.0, float* %142, align 4
- %143 = fmul float %130, %135 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %ZZ.0 ; [#uses=1]
- store float %143, float* %144, align 4
- %145 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %148 = load float* %147, align 8 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %148, float* %149, align 4
- %150 = load float* %146, align 4 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %150, float* %151, align 4
- %152 = load float* %145, align 8 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %152, float* %153, align 4
- %154 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %154, align 4
- ret void
-
-bb13: ; preds = %bb8
- %155 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %XX.0 ; [#uses=1]
- store float %123, float* %155, align 4
- %156 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 %YY.0 ; [#uses=1]
- %157 = load float* %156, align 4 ; [#uses=1]
- %158 = fcmp olt float %157, 0.000000e+00 ; [#uses=1]
- br i1 %158, label %bb14, label %bb16
-
-bb14: ; preds = %bb13
- %159 = fsub float -0.000000e+00, %125 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb14, %bb13
- %iftmp.153.0 = phi float [ %159, %bb14 ], [ %125, %bb13 ] ; [#uses=1]
- %160 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %YY.0 ; [#uses=1]
- store float %iftmp.153.0, float* %160, align 4
- %161 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %ZZ.0 ; [#uses=1]
- store float 0.000000e+00, float* %161, align 4
- %162 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %165 = load float* %164, align 8 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %165, float* %166, align 4
- %167 = load float* %163, align 4 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %167, float* %168, align 4
- %169 = load float* %162, align 8 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %169, float* %170, align 4
- %171 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %171, align 4
- ret void
-
-bb17: ; preds = %entry
- %172 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 2 ; [#uses=1]
- %173 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 1 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 0 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=3]
- %176 = load float* %173, align 4 ; [#uses=3]
- %177 = load float* %172, align 4 ; [#uses=3]
- %178 = bitcast %struct.btConvexShape* %this to %struct.btCapsuleShape* ; [#uses=2]
- %179 = getelementptr inbounds %struct.btConvexShape* %this, i32 4, i32 0, i32 1 ; [#uses=1]
- %180 = load i32* %179, align 4 ; [#uses=4]
- %181 = getelementptr inbounds %struct.btCapsuleShape* %178, i32 0, i32 0, i32 2, i32 0, i32 %180 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=2]
- %183 = add nsw i32 %180, 2 ; [#uses=1]
- %184 = srem i32 %183, 3 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btCapsuleShape* %178, i32 0, i32 0, i32 2, i32 0, i32 %184 ; [#uses=1]
- %186 = load float* %185, align 4 ; [#uses=3]
- %187 = fmul float %175, %175 ; [#uses=1]
- %188 = fmul float %176, %176 ; [#uses=1]
- %189 = fadd float %187, %188 ; [#uses=1]
- %190 = fmul float %177, %177 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=2]
- %192 = fcmp olt float %191, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %192, label %bb22, label %bb21
-
-bb21: ; preds = %bb17
- %193 = call float @sqrtf(float %191) nounwind readonly ; [#uses=1]
- %194 = fdiv float 1.000000e+00, %193 ; [#uses=3]
- %195 = fmul float %175, %194 ; [#uses=1]
- %196 = fmul float %176, %194 ; [#uses=1]
- %197 = fmul float %177, %194 ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %bb21, %bb17
- %vec.0.0.0 = phi float [ %195, %bb21 ], [ 1.000000e+00, %bb17 ] ; [#uses=4]
- %vec.0.1.0 = phi float [ %196, %bb21 ], [ 0.000000e+00, %bb17 ] ; [#uses=4]
- %vec.0.2.0 = phi float [ %197, %bb21 ], [ 0.000000e+00, %bb17 ] ; [#uses=4]
- %198 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %198, align 8
- %199 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %199, align 4
- %200 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %200, align 8
- %201 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %201, align 4
- %202 = getelementptr inbounds %struct.btQuadWord* %pos, i32 0, i32 0, i32 %180 ; [#uses=1]
- store float %182, float* %202, align 4
- %203 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %204 = bitcast i8** %203 to float* ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=3]
- %206 = fmul float %vec.0.2.0, %205 ; [#uses=2]
- %207 = fmul float %vec.0.1.0, %205 ; [#uses=2]
- %208 = fmul float %vec.0.0.0, %205 ; [#uses=2]
- %209 = getelementptr inbounds %struct.btConvexShape* %this, i32 1 ; [#uses=1]
- %210 = getelementptr inbounds %struct.btConvexShape* %this, i32 1, i32 0, i32 2 ; [#uses=1]
- %211 = bitcast i8** %210 to float* ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=1]
- %213 = fmul float %vec.0.2.0, %212 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btConvexShape* %this, i32 1, i32 0, i32 1 ; [#uses=1]
- %215 = bitcast i32* %214 to float* ; [#uses=1]
- %216 = load float* %215, align 4 ; [#uses=1]
- %217 = fmul float %vec.0.1.0, %216 ; [#uses=1]
- %218 = bitcast %struct.btConvexShape* %209 to float* ; [#uses=1]
- %219 = load float* %218, align 4 ; [#uses=1]
- %220 = fmul float %vec.0.0.0, %219 ; [#uses=1]
- %221 = fmul float %213, %186 ; [#uses=2]
- %222 = fmul float %217, %186 ; [#uses=2]
- %223 = fmul float %220, %186 ; [#uses=2]
- %224 = load float* %200, align 8 ; [#uses=1]
- %225 = fadd float %224, %221 ; [#uses=1]
- %226 = load float* %199, align 4 ; [#uses=1]
- %227 = fadd float %226, %222 ; [#uses=1]
- %228 = load float* %198, align 8 ; [#uses=1]
- %229 = fadd float %228, %223 ; [#uses=1]
- %230 = fsub float %225, %206 ; [#uses=2]
- %231 = fsub float %227, %207 ; [#uses=2]
- %232 = fsub float %229, %208 ; [#uses=2]
- %233 = fmul float %vec.0.0.0, %232 ; [#uses=1]
- %234 = fmul float %vec.0.1.0, %231 ; [#uses=1]
- %235 = fadd float %233, %234 ; [#uses=1]
- %236 = fmul float %vec.0.2.0, %230 ; [#uses=1]
- %237 = fadd float %235, %236 ; [#uses=2]
- %238 = fcmp ogt float %237, 0xC3ABC16D60000000 ; [#uses=1]
- br i1 %238, label %bb23, label %bb24
-
-bb23: ; preds = %bb22
- br label %bb24
-
-bb24: ; preds = %bb23, %bb22
- %supVec.0.0.1 = phi float [ %232, %bb23 ], [ 0.000000e+00, %bb22 ] ; [#uses=1]
- %supVec.0.1.1 = phi float [ %231, %bb23 ], [ 0.000000e+00, %bb22 ] ; [#uses=1]
- %supVec.0.2.1 = phi float [ %230, %bb23 ], [ 0.000000e+00, %bb22 ] ; [#uses=1]
- %maxDot.0 = phi float [ %237, %bb23 ], [ 0xC3ABC16D60000000, %bb22 ] ; [#uses=1]
- %239 = getelementptr inbounds %struct.btQuadWord* %pos26, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %239, align 8
- %240 = getelementptr inbounds %struct.btQuadWord* %pos26, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %240, align 4
- %241 = getelementptr inbounds %struct.btQuadWord* %pos26, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %241, align 8
- %242 = getelementptr inbounds %struct.btQuadWord* %pos26, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %242, align 4
- %243 = fsub float -0.000000e+00, %182 ; [#uses=1]
- %244 = getelementptr inbounds %struct.btQuadWord* %pos26, i32 0, i32 0, i32 %180 ; [#uses=1]
- store float %243, float* %244, align 4
- %245 = load float* %241, align 8 ; [#uses=1]
- %246 = fadd float %245, %221 ; [#uses=1]
- %247 = load float* %240, align 4 ; [#uses=1]
- %248 = fadd float %247, %222 ; [#uses=1]
- %249 = load float* %239, align 8 ; [#uses=1]
- %250 = fadd float %249, %223 ; [#uses=1]
- %251 = fsub float %246, %206 ; [#uses=2]
- %252 = fsub float %248, %207 ; [#uses=2]
- %253 = fsub float %250, %208 ; [#uses=2]
- %254 = fmul float %vec.0.0.0, %253 ; [#uses=1]
- %255 = fmul float %vec.0.1.0, %252 ; [#uses=1]
- %256 = fadd float %254, %255 ; [#uses=1]
- %257 = fmul float %vec.0.2.0, %251 ; [#uses=1]
- %258 = fadd float %256, %257 ; [#uses=1]
- %259 = fcmp ogt float %258, %maxDot.0 ; [#uses=3]
- %supVec.0.0.0 = select i1 %259, float %253, float %supVec.0.0.1 ; [#uses=1]
- %supVec.0.1.0 = select i1 %259, float %252, float %supVec.0.1.1 ; [#uses=1]
- %supVec.0.2.0 = select i1 %259, float %251, float %supVec.0.2.1 ; [#uses=1]
- %260 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %supVec.0.0.0, float* %260, align 4
- %261 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %supVec.0.1.0, float* %261, align 4
- %262 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %supVec.0.2.0, float* %262, align 4
- %263 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %263, align 4
- ret void
-
-bb30: ; preds = %entry
- %264 = getelementptr inbounds %struct.btConvexShape* %this, i32 7, i32 0, i32 1 ; [#uses=1]
- %265 = bitcast i32* %264 to %struct.btQuadWord** ; [#uses=1]
- %266 = load %struct.btQuadWord** %265, align 4 ; [#uses=6]
- %267 = getelementptr inbounds %struct.btConvexShape* %this, i32 7, i32 0, i32 2 ; [#uses=1]
- %268 = bitcast i8** %267 to i32* ; [#uses=1]
- %269 = load i32* %268, align 4 ; [#uses=2]
- %270 = getelementptr inbounds %struct.btConvexShape* %this, i32 1 ; [#uses=1]
- %localDir.idx46 = getelementptr %struct.btQuadWord* %localDir, i32 0, i32 0, i32 0 ; [#uses=1]
- %localDir.idx46.val = load float* %localDir.idx46, align 4 ; [#uses=1]
- %localDir.idx47 = getelementptr %struct.btQuadWord* %localDir, i32 0, i32 0, i32 1 ; [#uses=1]
- %localDir.idx47.val = load float* %localDir.idx47, align 4 ; [#uses=1]
- %localDir.idx48 = getelementptr %struct.btQuadWord* %localDir, i32 0, i32 0, i32 2 ; [#uses=1]
- %localDir.idx48.val = load float* %localDir.idx48, align 4 ; [#uses=1]
- %.idx49 = bitcast %struct.btConvexShape* %270 to float* ; [#uses=1]
- %.idx49.val = load float* %.idx49, align 4 ; [#uses=2]
- %.idx50 = getelementptr %struct.btConvexShape* %this, i32 1, i32 0, i32 1 ; [#uses=1]
- %271 = bitcast i32* %.idx50 to float* ; [#uses=1]
- %.idx50.val = load float* %271, align 4 ; [#uses=2]
- %.idx51 = getelementptr %struct.btConvexShape* %this, i32 1, i32 0, i32 2 ; [#uses=1]
- %272 = bitcast i8** %.idx51 to float* ; [#uses=1]
- %.idx51.val = load float* %272, align 4 ; [#uses=2]
- %273 = fmul float %localDir.idx48.val, %.idx51.val ; [#uses=1]
- %274 = fmul float %localDir.idx47.val, %.idx50.val ; [#uses=1]
- %275 = fmul float %localDir.idx46.val, %.idx49.val ; [#uses=1]
- %276 = icmp sgt i32 %269, 0 ; [#uses=1]
- br i1 %276, label %bb.i60, label %_ZL17convexHullSupportRK9btVector3PS0_iS1_.exit62
-
-bb.i60: ; preds = %bb.i60, %bb30
- %277 = phi i32 [ %287, %bb.i60 ], [ 0, %bb30 ] ; [#uses=5]
- %ptIndex.14.i52 = phi i32 [ %ptIndex.0.i57, %bb.i60 ], [ -1, %bb30 ] ; [#uses=1]
- %maxDot.13.i53 = phi float [ %maxDot.0.i58, %bb.i60 ], [ 0xC3ABC16D60000000, %bb30 ] ; [#uses=2]
- %scevgep8.i56 = getelementptr %struct.btQuadWord* %266, i32 %277, i32 0, i32 2 ; [#uses=1]
- %scevgep7.i55 = getelementptr %struct.btQuadWord* %266, i32 %277, i32 0, i32 1 ; [#uses=1]
- %scevgep6.i54 = getelementptr inbounds %struct.btQuadWord* %266, i32 %277, i32 0, i32 0 ; [#uses=1]
- %278 = load float* %scevgep6.i54, align 4 ; [#uses=1]
- %279 = fmul float %275, %278 ; [#uses=1]
- %280 = load float* %scevgep7.i55, align 4 ; [#uses=1]
- %281 = fmul float %274, %280 ; [#uses=1]
- %282 = fadd float %279, %281 ; [#uses=1]
- %283 = load float* %scevgep8.i56, align 4 ; [#uses=1]
- %284 = fmul float %273, %283 ; [#uses=1]
- %285 = fadd float %282, %284 ; [#uses=2]
- %286 = fcmp ogt float %285, %maxDot.13.i53 ; [#uses=2]
- %ptIndex.0.i57 = select i1 %286, i32 %277, i32 %ptIndex.14.i52 ; [#uses=2]
- %287 = add nsw i32 %277, 1 ; [#uses=2]
- %maxDot.0.i58 = select i1 %286, float %285, float %maxDot.13.i53 ; [#uses=1]
- %exitcond = icmp eq i32 %287, %269 ; [#uses=1]
- br i1 %exitcond, label %_ZL17convexHullSupportRK9btVector3PS0_iS1_.exit62, label %bb.i60
-
-_ZL17convexHullSupportRK9btVector3PS0_iS1_.exit62: ; preds = %bb.i60, %bb30
- %ptIndex.1.lcssa.i61 = phi i32 [ -1, %bb30 ], [ %ptIndex.0.i57, %bb.i60 ] ; [#uses=3]
- %288 = getelementptr inbounds %struct.btQuadWord* %266, i32 %ptIndex.1.lcssa.i61, i32 0, i32 2 ; [#uses=1]
- %289 = load float* %288, align 4 ; [#uses=1]
- %290 = fmul float %289, %.idx51.val ; [#uses=1]
- %291 = getelementptr inbounds %struct.btQuadWord* %266, i32 %ptIndex.1.lcssa.i61, i32 0, i32 1 ; [#uses=1]
- %292 = load float* %291, align 4 ; [#uses=1]
- %293 = fmul float %292, %.idx50.val ; [#uses=1]
- %294 = getelementptr inbounds %struct.btQuadWord* %266, i32 %ptIndex.1.lcssa.i61, i32 0, i32 0 ; [#uses=1]
- %295 = load float* %294, align 4 ; [#uses=1]
- %296 = fmul float %295, %.idx49.val ; [#uses=1]
- %297 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %296, float* %297, align 4
- %298 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %293, float* %298, align 4
- %299 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %290, float* %299, align 4
- %300 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %300, align 4
- ret void
-
-bb34: ; preds = %entry
- %301 = getelementptr inbounds %struct.btConvexShape* %this, i32 8, i32 0, i32 1 ; [#uses=1]
- %302 = bitcast i32* %301 to %struct.btQuadWord** ; [#uses=1]
- %303 = load %struct.btQuadWord** %302, align 4 ; [#uses=6]
- %304 = getelementptr inbounds %struct.btConvexShape* %this, i32 7, i32 0, i32 2 ; [#uses=1]
- %305 = bitcast i8** %304 to i32* ; [#uses=1]
- %306 = load i32* %305, align 4 ; [#uses=2]
- %307 = getelementptr inbounds %struct.btConvexShape* %this, i32 1 ; [#uses=1]
- %localDir.idx = getelementptr %struct.btQuadWord* %localDir, i32 0, i32 0, i32 0 ; [#uses=1]
- %localDir.idx.val = load float* %localDir.idx, align 4 ; [#uses=1]
- %localDir.idx42 = getelementptr %struct.btQuadWord* %localDir, i32 0, i32 0, i32 1 ; [#uses=1]
- %localDir.idx42.val = load float* %localDir.idx42, align 4 ; [#uses=1]
- %localDir.idx43 = getelementptr %struct.btQuadWord* %localDir, i32 0, i32 0, i32 2 ; [#uses=1]
- %localDir.idx43.val = load float* %localDir.idx43, align 4 ; [#uses=1]
- %.idx = bitcast %struct.btConvexShape* %307 to float* ; [#uses=1]
- %.idx.val = load float* %.idx, align 4 ; [#uses=2]
- %.idx44 = getelementptr %struct.btConvexShape* %this, i32 1, i32 0, i32 1 ; [#uses=1]
- %308 = bitcast i32* %.idx44 to float* ; [#uses=1]
- %.idx44.val = load float* %308, align 4 ; [#uses=2]
- %.idx45 = getelementptr %struct.btConvexShape* %this, i32 1, i32 0, i32 2 ; [#uses=1]
- %309 = bitcast i8** %.idx45 to float* ; [#uses=1]
- %.idx45.val = load float* %309, align 4 ; [#uses=2]
- %310 = fmul float %localDir.idx43.val, %.idx45.val ; [#uses=1]
- %311 = fmul float %localDir.idx42.val, %.idx44.val ; [#uses=1]
- %312 = fmul float %localDir.idx.val, %.idx.val ; [#uses=1]
- %313 = icmp sgt i32 %306, 0 ; [#uses=1]
- br i1 %313, label %bb.i, label %_ZL17convexHullSupportRK9btVector3PS0_iS1_.exit
-
-bb.i: ; preds = %bb.i, %bb34
- %314 = phi i32 [ %324, %bb.i ], [ 0, %bb34 ] ; [#uses=5]
- %ptIndex.14.i = phi i32 [ %ptIndex.0.i, %bb.i ], [ -1, %bb34 ] ; [#uses=1]
- %maxDot.13.i = phi float [ %maxDot.0.i, %bb.i ], [ 0xC3ABC16D60000000, %bb34 ] ; [#uses=2]
- %scevgep8.i = getelementptr %struct.btQuadWord* %303, i32 %314, i32 0, i32 2 ; [#uses=1]
- %scevgep7.i = getelementptr %struct.btQuadWord* %303, i32 %314, i32 0, i32 1 ; [#uses=1]
- %scevgep6.i = getelementptr inbounds %struct.btQuadWord* %303, i32 %314, i32 0, i32 0 ; [#uses=1]
- %315 = load float* %scevgep6.i, align 4 ; [#uses=1]
- %316 = fmul float %312, %315 ; [#uses=1]
- %317 = load float* %scevgep7.i, align 4 ; [#uses=1]
- %318 = fmul float %311, %317 ; [#uses=1]
- %319 = fadd float %316, %318 ; [#uses=1]
- %320 = load float* %scevgep8.i, align 4 ; [#uses=1]
- %321 = fmul float %310, %320 ; [#uses=1]
- %322 = fadd float %319, %321 ; [#uses=2]
- %323 = fcmp ogt float %322, %maxDot.13.i ; [#uses=2]
- %ptIndex.0.i = select i1 %323, i32 %314, i32 %ptIndex.14.i ; [#uses=2]
- %324 = add nsw i32 %314, 1 ; [#uses=2]
- %maxDot.0.i = select i1 %323, float %322, float %maxDot.13.i ; [#uses=1]
- %exitcond145 = icmp eq i32 %324, %306 ; [#uses=1]
- br i1 %exitcond145, label %_ZL17convexHullSupportRK9btVector3PS0_iS1_.exit, label %bb.i
-
-_ZL17convexHullSupportRK9btVector3PS0_iS1_.exit: ; preds = %bb.i, %bb34
- %ptIndex.1.lcssa.i = phi i32 [ -1, %bb34 ], [ %ptIndex.0.i, %bb.i ] ; [#uses=3]
- %325 = getelementptr inbounds %struct.btQuadWord* %303, i32 %ptIndex.1.lcssa.i, i32 0, i32 2 ; [#uses=1]
- %326 = load float* %325, align 4 ; [#uses=1]
- %327 = fmul float %326, %.idx45.val ; [#uses=1]
- %328 = getelementptr inbounds %struct.btQuadWord* %303, i32 %ptIndex.1.lcssa.i, i32 0, i32 1 ; [#uses=1]
- %329 = load float* %328, align 4 ; [#uses=1]
- %330 = fmul float %329, %.idx44.val ; [#uses=1]
- %331 = getelementptr inbounds %struct.btQuadWord* %303, i32 %ptIndex.1.lcssa.i, i32 0, i32 0 ; [#uses=1]
- %332 = load float* %331, align 4 ; [#uses=1]
- %333 = fmul float %332, %.idx.val ; [#uses=1]
- %334 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %333, float* %334, align 4
- %335 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %330, float* %335, align 4
- %336 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %327, float* %336, align 4
- %337 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %337, align 4
- ret void
-
-bb40: ; preds = %entry
- %338 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %339 = load i32 (...)*** %338, align 4 ; [#uses=1]
- %340 = getelementptr inbounds i32 (...)** %339, i32 16 ; [#uses=1]
- %341 = load i32 (...)** %340, align 4 ; [#uses=1]
- %342 = bitcast i32 (...)* %341 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %342(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexShape* %this, %struct.btQuadWord* %localDir)
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK13btConvexShape17getAabbNonVirtualERK11btTransformR9btVector3S4_(%struct.btConvexShape* %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %vec = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %sv = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %halfExtents28 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- switch i32 %4, label %bb42 [
- i32 10, label %bb25
- i32 1, label %bb.nph
- i32 13, label %bb3.i47
- i32 0, label %bb1.i45
- i32 8, label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
- i32 4, label %bb5.i57
- i32 5, label %bb5.i57
- ]
-
-_ZNK13btConvexShape19getMarginNonVirtualEv.exit: ; preds = %entry
- %5 = getelementptr inbounds %struct.btConvexShape* %this, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = bitcast i32* %5 to float* ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btConvexShape* %this, i32 1 ; [#uses=1]
- %9 = bitcast %struct.btConvexShape* %8 to float* ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %7, %10 ; [#uses=1]
- %12 = fadd float %11, %7 ; [#uses=6]
- %13 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fsub float %14, %12 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fsub float %17, %12 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %20, %12 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %21, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %18, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = load float* %13, align 4 ; [#uses=1]
- %27 = fadd float %26, %12 ; [#uses=1]
- %28 = load float* %16, align 4 ; [#uses=1]
- %29 = fadd float %28, %12 ; [#uses=1]
- %30 = load float* %19, align 4 ; [#uses=1]
- %31 = fadd float %30, %12 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %31, float* %32, align 4
- %33 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %29, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %27, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- ret void
-
-bb1.i45: ; preds = %entry
- %36 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %37 = bitcast i8** %36 to float* ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit51
-
-bb3.i47: ; preds = %entry
- %39 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %40 = bitcast i8** %39 to float* ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit51
-
-_ZNK13btConvexShape19getMarginNonVirtualEv.exit51: ; preds = %bb3.i47, %bb1.i45
- %42 = phi float [ %41, %bb3.i47 ], [ %38, %bb1.i45 ] ; [#uses=3]
- %43 = getelementptr inbounds %struct.btConvexShape* %this, i32 2, i32 0, i32 1 ; [#uses=3]
- %44 = bitcast i32* %43 to float* ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds i32* %43, i32 1 ; [#uses=1]
- %47 = bitcast i32* %46 to float* ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds i32* %43, i32 2 ; [#uses=1]
- %50 = bitcast i32* %49 to float* ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fadd float %45, %42 ; [#uses=3]
- %53 = fadd float %48, %42 ; [#uses=3]
- %54 = fadd float %51, %42 ; [#uses=3]
- %55 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = call float @fabsf(float %56) nounwind readnone ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = call float @fabsf(float %59) nounwind readnone ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = call float @fabsf(float %62) nounwind readnone ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = call float @fabsf(float %65) nounwind readnone ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = call float @fabsf(float %68) nounwind readnone ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = call float @fabsf(float %71) nounwind readnone ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = call float @fabsf(float %74) nounwind readnone ; [#uses=1]
- %76 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = call float @fabsf(float %77) nounwind readnone ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = call float @fabsf(float %80) nounwind readnone ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=2]
- %84 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=2]
- %86 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=2]
- %88 = fmul float %63, %52 ; [#uses=1]
- %89 = fmul float %60, %53 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %57, %54 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=2]
- %93 = fmul float %72, %52 ; [#uses=1]
- %94 = fmul float %69, %53 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %66, %54 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=2]
- %98 = fmul float %81, %52 ; [#uses=1]
- %99 = fmul float %78, %53 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %75, %54 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=2]
- %103 = fsub float %87, %92 ; [#uses=1]
- %104 = fsub float %85, %97 ; [#uses=1]
- %105 = fsub float %83, %102 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %105, float* %106, align 4
- %107 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %104, float* %107, align 4
- %108 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %103, float* %108, align 4
- %109 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %109, align 4
- %110 = fadd float %87, %92 ; [#uses=1]
- %111 = fadd float %85, %97 ; [#uses=1]
- %112 = fadd float %83, %102 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %112, float* %113, align 4
- %114 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %111, float* %114, align 4
- %115 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %110, float* %115, align 4
- %116 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %116, align 4
- ret void
-
-bb.nph: ; preds = %entry
- %117 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %118 = bitcast i8** %117 to float* ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=2]
- %120 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=3]
- %121 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=3]
- %122 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=3]
- %123 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 3 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %125 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %126 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %127 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %128 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %129 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %130 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %131 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %132 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %133 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btQuadWord* %sv, i32 0, i32 0, i32 0 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btQuadWord* %sv, i32 0, i32 0, i32 1 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btQuadWord* %sv, i32 0, i32 0, i32 2 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %141 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %142 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %143 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 0 ; [#uses=2]
- %144 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 1 ; [#uses=2]
- %145 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 2 ; [#uses=2]
- %146 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 3 ; [#uses=2]
- %147 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb19, %bb.nph
- %i.0144 = phi i32 [ 0, %bb.nph ], [ %278, %bb19 ] ; [#uses=5]
- %scevgep = getelementptr %struct.btQuadWord* %vec, i32 0, i32 0, i32 %i.0144 ; [#uses=2]
- %scevgep145 = getelementptr %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %i.0144 ; [#uses=2]
- %scevgep146 = getelementptr %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 %i.0144 ; [#uses=1]
- %scevgep147 = getelementptr %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 %i.0144 ; [#uses=1]
- store float 0.000000e+00, float* %120, align 8
- store float 0.000000e+00, float* %121, align 4
- store float 0.000000e+00, float* %122, align 8
- store float 0.000000e+00, float* %123, align 4
- store float 1.000000e+00, float* %scevgep, align 4
- %154 = load float* %124, align 4 ; [#uses=1]
- %155 = load float* %120, align 8 ; [#uses=3]
- %156 = fmul float %154, %155 ; [#uses=1]
- %157 = load float* %125, align 4 ; [#uses=1]
- %158 = load float* %121, align 4 ; [#uses=3]
- %159 = fmul float %157, %158 ; [#uses=1]
- %160 = fadd float %156, %159 ; [#uses=1]
- %161 = load float* %126, align 4 ; [#uses=1]
- %162 = load float* %122, align 8 ; [#uses=3]
- %163 = fmul float %161, %162 ; [#uses=1]
- %164 = fadd float %160, %163 ; [#uses=1]
- %165 = load float* %127, align 4 ; [#uses=1]
- %166 = fmul float %165, %155 ; [#uses=1]
- %167 = load float* %128, align 4 ; [#uses=1]
- %168 = fmul float %167, %158 ; [#uses=1]
- %169 = fadd float %166, %168 ; [#uses=1]
- %170 = load float* %129, align 4 ; [#uses=1]
- %171 = fmul float %170, %162 ; [#uses=1]
- %172 = fadd float %169, %171 ; [#uses=1]
- %173 = load float* %130, align 4 ; [#uses=1]
- %174 = fmul float %173, %155 ; [#uses=1]
- %175 = load float* %131, align 4 ; [#uses=1]
- %176 = fmul float %175, %158 ; [#uses=1]
- %177 = fadd float %174, %176 ; [#uses=1]
- %178 = load float* %132, align 4 ; [#uses=1]
- %179 = fmul float %178, %162 ; [#uses=1]
- %180 = fadd float %177, %179 ; [#uses=1]
- store float %180, float* %133, align 8
- store float %172, float* %134, align 4
- store float %164, float* %135, align 8
- store float 0.000000e+00, float* %136, align 4
- call void @_ZNK13btConvexShape44localGetSupportVertexWithoutMarginNonVirtualERK9btVector3(%struct.btQuadWord* noalias sret %sv, %struct.btConvexShape* %this, %struct.btQuadWord* %2)
- %181 = load float* %132, align 4 ; [#uses=1]
- %182 = load float* %137, align 8 ; [#uses=3]
- %183 = fmul float %181, %182 ; [#uses=1]
- %184 = load float* %129, align 4 ; [#uses=1]
- %185 = load float* %138, align 4 ; [#uses=3]
- %186 = fmul float %184, %185 ; [#uses=1]
- %187 = fadd float %183, %186 ; [#uses=1]
- %188 = load float* %126, align 4 ; [#uses=1]
- %189 = load float* %139, align 8 ; [#uses=3]
- %190 = fmul float %188, %189 ; [#uses=1]
- %191 = fadd float %187, %190 ; [#uses=1]
- %192 = load float* %140, align 4 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- %194 = load float* %131, align 4 ; [#uses=1]
- %195 = fmul float %194, %182 ; [#uses=1]
- %196 = load float* %128, align 4 ; [#uses=1]
- %197 = fmul float %196, %185 ; [#uses=1]
- %198 = fadd float %195, %197 ; [#uses=1]
- %199 = load float* %125, align 4 ; [#uses=1]
- %200 = fmul float %199, %189 ; [#uses=1]
- %201 = fadd float %198, %200 ; [#uses=1]
- %202 = load float* %141, align 4 ; [#uses=1]
- %203 = fadd float %201, %202 ; [#uses=1]
- %204 = load float* %130, align 4 ; [#uses=1]
- %205 = fmul float %204, %182 ; [#uses=1]
- %206 = load float* %127, align 4 ; [#uses=1]
- %207 = fmul float %206, %185 ; [#uses=1]
- %208 = fadd float %205, %207 ; [#uses=1]
- %209 = load float* %124, align 4 ; [#uses=1]
- %210 = fmul float %209, %189 ; [#uses=1]
- %211 = fadd float %208, %210 ; [#uses=1]
- %212 = load float* %142, align 4 ; [#uses=1]
- %213 = fadd float %211, %212 ; [#uses=1]
- store float %213, float* %143, align 8
- store float %203, float* %144, align 4
- store float %193, float* %145, align 8
- store float 0.000000e+00, float* %146, align 4
- %214 = load float* %scevgep145, align 4 ; [#uses=1]
- %215 = fadd float %214, %119 ; [#uses=1]
- store float %215, float* %scevgep146, align 4
- store float -1.000000e+00, float* %scevgep, align 4
- %216 = load float* %124, align 4 ; [#uses=1]
- %217 = load float* %120, align 8 ; [#uses=3]
- %218 = fmul float %216, %217 ; [#uses=1]
- %219 = load float* %125, align 4 ; [#uses=1]
- %220 = load float* %121, align 4 ; [#uses=3]
- %221 = fmul float %219, %220 ; [#uses=1]
- %222 = fadd float %218, %221 ; [#uses=1]
- %223 = load float* %126, align 4 ; [#uses=1]
- %224 = load float* %122, align 8 ; [#uses=3]
- %225 = fmul float %223, %224 ; [#uses=1]
- %226 = fadd float %222, %225 ; [#uses=1]
- %227 = load float* %127, align 4 ; [#uses=1]
- %228 = fmul float %227, %217 ; [#uses=1]
- %229 = load float* %128, align 4 ; [#uses=1]
- %230 = fmul float %229, %220 ; [#uses=1]
- %231 = fadd float %228, %230 ; [#uses=1]
- %232 = load float* %129, align 4 ; [#uses=1]
- %233 = fmul float %232, %224 ; [#uses=1]
- %234 = fadd float %231, %233 ; [#uses=1]
- %235 = load float* %130, align 4 ; [#uses=1]
- %236 = fmul float %235, %217 ; [#uses=1]
- %237 = load float* %131, align 4 ; [#uses=1]
- %238 = fmul float %237, %220 ; [#uses=1]
- %239 = fadd float %236, %238 ; [#uses=1]
- %240 = load float* %132, align 4 ; [#uses=1]
- %241 = fmul float %240, %224 ; [#uses=1]
- %242 = fadd float %239, %241 ; [#uses=1]
- store float %242, float* %147, align 8
- store float %234, float* %148, align 4
- store float %226, float* %149, align 8
- store float 0.000000e+00, float* %150, align 4
- call void @_ZNK13btConvexShape44localGetSupportVertexWithoutMarginNonVirtualERK9btVector3(%struct.btQuadWord* noalias sret %1, %struct.btConvexShape* %this, %struct.btQuadWord* %0)
- %243 = load float* %132, align 4 ; [#uses=1]
- %244 = load float* %151, align 8 ; [#uses=3]
- %245 = fmul float %243, %244 ; [#uses=1]
- %246 = load float* %129, align 4 ; [#uses=1]
- %247 = load float* %152, align 4 ; [#uses=3]
- %248 = fmul float %246, %247 ; [#uses=1]
- %249 = fadd float %245, %248 ; [#uses=1]
- %250 = load float* %126, align 4 ; [#uses=1]
- %251 = load float* %153, align 8 ; [#uses=3]
- %252 = fmul float %250, %251 ; [#uses=1]
- %253 = fadd float %249, %252 ; [#uses=1]
- %254 = load float* %140, align 4 ; [#uses=1]
- %255 = fadd float %253, %254 ; [#uses=1]
- %256 = load float* %131, align 4 ; [#uses=1]
- %257 = fmul float %256, %244 ; [#uses=1]
- %258 = load float* %128, align 4 ; [#uses=1]
- %259 = fmul float %258, %247 ; [#uses=1]
- %260 = fadd float %257, %259 ; [#uses=1]
- %261 = load float* %125, align 4 ; [#uses=1]
- %262 = fmul float %261, %251 ; [#uses=1]
- %263 = fadd float %260, %262 ; [#uses=1]
- %264 = load float* %141, align 4 ; [#uses=1]
- %265 = fadd float %263, %264 ; [#uses=1]
- %266 = load float* %130, align 4 ; [#uses=1]
- %267 = fmul float %266, %244 ; [#uses=1]
- %268 = load float* %127, align 4 ; [#uses=1]
- %269 = fmul float %268, %247 ; [#uses=1]
- %270 = fadd float %267, %269 ; [#uses=1]
- %271 = load float* %124, align 4 ; [#uses=1]
- %272 = fmul float %271, %251 ; [#uses=1]
- %273 = fadd float %270, %272 ; [#uses=1]
- %274 = load float* %142, align 4 ; [#uses=1]
- %275 = fadd float %273, %274 ; [#uses=1]
- store float %275, float* %143, align 8
- store float %265, float* %144, align 4
- store float %255, float* %145, align 8
- store float 0.000000e+00, float* %146, align 4
- %276 = load float* %scevgep145, align 4 ; [#uses=1]
- %277 = fsub float %276, %119 ; [#uses=1]
- store float %277, float* %scevgep147, align 4
- %278 = add nsw i32 %i.0144, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %278, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb19
-
-bb25: ; preds = %entry
- %279 = bitcast %struct.btConvexShape* %this to %struct.btCapsuleShape* ; [#uses=2]
- %280 = getelementptr inbounds %struct.btConvexShape* %this, i32 4, i32 0, i32 1 ; [#uses=1]
- %281 = load i32* %280, align 4 ; [#uses=3]
- %282 = add nsw i32 %281, 2 ; [#uses=1]
- %283 = srem i32 %282, 3 ; [#uses=1]
- %284 = getelementptr inbounds %struct.btCapsuleShape* %279, i32 0, i32 0, i32 2, i32 0, i32 %283 ; [#uses=1]
- %285 = load float* %284, align 4 ; [#uses=4]
- %286 = getelementptr inbounds %struct.btQuadWord* %halfExtents28, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %285, float* %286, align 8
- %287 = getelementptr inbounds %struct.btQuadWord* %halfExtents28, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %285, float* %287, align 4
- %288 = getelementptr inbounds %struct.btQuadWord* %halfExtents28, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %285, float* %288, align 8
- %289 = getelementptr inbounds %struct.btQuadWord* %halfExtents28, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %289, align 4
- %290 = getelementptr inbounds %struct.btCapsuleShape* %279, i32 0, i32 0, i32 2, i32 0, i32 %281 ; [#uses=1]
- %291 = load float* %290, align 4 ; [#uses=1]
- %292 = fadd float %285, %291 ; [#uses=1]
- %293 = getelementptr inbounds %struct.btQuadWord* %halfExtents28, i32 0, i32 0, i32 %281 ; [#uses=1]
- store float %292, float* %293, align 4
- %294 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %295 = bitcast i8** %294 to float* ; [#uses=1]
- %296 = load float* %295, align 4 ; [#uses=1]
- %297 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %298 = bitcast i8** %297 to float* ; [#uses=1]
- %299 = load float* %298, align 4 ; [#uses=1]
- %300 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %301 = bitcast i8** %300 to float* ; [#uses=1]
- %302 = load float* %301, align 4 ; [#uses=1]
- %303 = load float* %286, align 8 ; [#uses=1]
- %304 = fadd float %303, %302 ; [#uses=4]
- store float %304, float* %286, align 8
- %305 = load float* %287, align 4 ; [#uses=1]
- %306 = fadd float %305, %299 ; [#uses=4]
- store float %306, float* %287, align 4
- %307 = load float* %288, align 8 ; [#uses=1]
- %308 = fadd float %307, %296 ; [#uses=3]
- %309 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %310 = load float* %309, align 4 ; [#uses=1]
- %311 = call float @fabsf(float %310) nounwind readnone ; [#uses=1]
- %312 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %313 = load float* %312, align 4 ; [#uses=1]
- %314 = call float @fabsf(float %313) nounwind readnone ; [#uses=1]
- %315 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %316 = load float* %315, align 4 ; [#uses=1]
- %317 = call float @fabsf(float %316) nounwind readnone ; [#uses=1]
- %318 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %319 = load float* %318, align 4 ; [#uses=1]
- %320 = call float @fabsf(float %319) nounwind readnone ; [#uses=1]
- %321 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %322 = load float* %321, align 4 ; [#uses=1]
- %323 = call float @fabsf(float %322) nounwind readnone ; [#uses=1]
- %324 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %325 = load float* %324, align 4 ; [#uses=1]
- %326 = call float @fabsf(float %325) nounwind readnone ; [#uses=1]
- %327 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %328 = load float* %327, align 4 ; [#uses=1]
- %329 = call float @fabsf(float %328) nounwind readnone ; [#uses=1]
- %330 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %331 = load float* %330, align 4 ; [#uses=1]
- %332 = call float @fabsf(float %331) nounwind readnone ; [#uses=1]
- %333 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %334 = load float* %333, align 4 ; [#uses=1]
- %335 = call float @fabsf(float %334) nounwind readnone ; [#uses=1]
- %336 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %337 = load float* %336, align 4 ; [#uses=2]
- %338 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=2]
- %340 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %341 = load float* %340, align 4 ; [#uses=2]
- %342 = fmul float %317, %304 ; [#uses=1]
- %343 = fmul float %314, %306 ; [#uses=1]
- %344 = fadd float %342, %343 ; [#uses=1]
- %345 = fmul float %311, %308 ; [#uses=1]
- %346 = fadd float %344, %345 ; [#uses=2]
- %347 = fmul float %326, %304 ; [#uses=1]
- %348 = fmul float %323, %306 ; [#uses=1]
- %349 = fadd float %347, %348 ; [#uses=1]
- %350 = fmul float %320, %308 ; [#uses=1]
- %351 = fadd float %349, %350 ; [#uses=2]
- %352 = fmul float %335, %304 ; [#uses=1]
- %353 = fmul float %332, %306 ; [#uses=1]
- %354 = fadd float %352, %353 ; [#uses=1]
- %355 = fmul float %329, %308 ; [#uses=1]
- %356 = fadd float %354, %355 ; [#uses=2]
- %357 = fsub float %341, %346 ; [#uses=1]
- %358 = fsub float %339, %351 ; [#uses=1]
- %359 = fsub float %337, %356 ; [#uses=1]
- %360 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %359, float* %360, align 4
- %361 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %358, float* %361, align 4
- %362 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %357, float* %362, align 4
- %363 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %363, align 4
- %364 = fadd float %341, %346 ; [#uses=1]
- %365 = fadd float %339, %351 ; [#uses=1]
- %366 = fadd float %337, %356 ; [#uses=1]
- %367 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %366, float* %367, align 4
- %368 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %365, float* %368, align 4
- %369 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %364, float* %369, align 4
- %370 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %370, align 4
- ret void
-
-bb5.i57: ; preds = %entry, %entry
- %371 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %372 = bitcast i8** %371 to float* ; [#uses=1]
- %373 = load float* %372, align 4 ; [#uses=3]
- %374 = getelementptr inbounds %struct.btConvexShape* %this, i32 6, i32 0, i32 1 ; [#uses=1]
- %375 = bitcast i32* %374 to float* ; [#uses=1]
- %376 = load float* %375, align 4 ; [#uses=2]
- %377 = getelementptr inbounds %struct.btConvexShape* %this, i32 5 ; [#uses=1]
- %378 = bitcast %struct.btConvexShape* %377 to float* ; [#uses=1]
- %379 = load float* %378, align 4 ; [#uses=2]
- %380 = fsub float %376, %379 ; [#uses=1]
- %381 = getelementptr inbounds %struct.btConvexShape* %this, i32 6 ; [#uses=1]
- %382 = bitcast %struct.btConvexShape* %381 to float* ; [#uses=1]
- %383 = load float* %382, align 4 ; [#uses=2]
- %384 = getelementptr inbounds %struct.btConvexShape* %this, i32 4, i32 0, i32 2 ; [#uses=1]
- %385 = bitcast i8** %384 to float* ; [#uses=1]
- %386 = load float* %385, align 4 ; [#uses=2]
- %387 = fsub float %383, %386 ; [#uses=1]
- %388 = getelementptr inbounds %struct.btConvexShape* %this, i32 5, i32 0, i32 2 ; [#uses=1]
- %389 = bitcast i8** %388 to float* ; [#uses=1]
- %390 = load float* %389, align 4 ; [#uses=2]
- %391 = getelementptr inbounds %struct.btConvexShape* %this, i32 4, i32 0, i32 1 ; [#uses=1]
- %392 = bitcast i32* %391 to float* ; [#uses=1]
- %393 = load float* %392, align 4 ; [#uses=2]
- %394 = fsub float %390, %393 ; [#uses=1]
- %395 = fmul float %380, 5.000000e-01 ; [#uses=1]
- %396 = fmul float %387, 5.000000e-01 ; [#uses=1]
- %397 = fmul float %394, 5.000000e-01 ; [#uses=1]
- %398 = fadd float %397, %373 ; [#uses=3]
- %399 = fadd float %396, %373 ; [#uses=3]
- %400 = fadd float %395, %373 ; [#uses=3]
- %401 = fadd float %376, %379 ; [#uses=1]
- %402 = fadd float %383, %386 ; [#uses=1]
- %403 = fadd float %390, %393 ; [#uses=1]
- %404 = fmul float %401, 5.000000e-01 ; [#uses=3]
- %405 = fmul float %402, 5.000000e-01 ; [#uses=3]
- %406 = fmul float %403, 5.000000e-01 ; [#uses=3]
- %407 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %408 = load float* %407, align 4 ; [#uses=2]
- %409 = call float @fabsf(float %408) nounwind readnone ; [#uses=1]
- %410 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %411 = load float* %410, align 4 ; [#uses=2]
- %412 = call float @fabsf(float %411) nounwind readnone ; [#uses=1]
- %413 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %414 = load float* %413, align 4 ; [#uses=2]
- %415 = call float @fabsf(float %414) nounwind readnone ; [#uses=1]
- %416 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %417 = load float* %416, align 4 ; [#uses=2]
- %418 = call float @fabsf(float %417) nounwind readnone ; [#uses=1]
- %419 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %420 = load float* %419, align 4 ; [#uses=2]
- %421 = call float @fabsf(float %420) nounwind readnone ; [#uses=1]
- %422 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %423 = load float* %422, align 4 ; [#uses=2]
- %424 = call float @fabsf(float %423) nounwind readnone ; [#uses=1]
- %425 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %426 = load float* %425, align 4 ; [#uses=2]
- %427 = call float @fabsf(float %426) nounwind readnone ; [#uses=1]
- %428 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %429 = load float* %428, align 4 ; [#uses=2]
- %430 = call float @fabsf(float %429) nounwind readnone ; [#uses=1]
- %431 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %432 = load float* %431, align 4 ; [#uses=2]
- %433 = call float @fabsf(float %432) nounwind readnone ; [#uses=1]
- %434 = fmul float %414, %406 ; [#uses=1]
- %435 = fmul float %411, %405 ; [#uses=1]
- %436 = fadd float %434, %435 ; [#uses=1]
- %437 = fmul float %408, %404 ; [#uses=1]
- %438 = fadd float %436, %437 ; [#uses=1]
- %439 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %440 = load float* %439, align 4 ; [#uses=1]
- %441 = fadd float %438, %440 ; [#uses=2]
- %442 = fmul float %423, %406 ; [#uses=1]
- %443 = fmul float %420, %405 ; [#uses=1]
- %444 = fadd float %442, %443 ; [#uses=1]
- %445 = fmul float %417, %404 ; [#uses=1]
- %446 = fadd float %444, %445 ; [#uses=1]
- %447 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %448 = load float* %447, align 4 ; [#uses=1]
- %449 = fadd float %446, %448 ; [#uses=2]
- %450 = fmul float %432, %406 ; [#uses=1]
- %451 = fmul float %429, %405 ; [#uses=1]
- %452 = fadd float %450, %451 ; [#uses=1]
- %453 = fmul float %426, %404 ; [#uses=1]
- %454 = fadd float %452, %453 ; [#uses=1]
- %455 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %456 = load float* %455, align 4 ; [#uses=1]
- %457 = fadd float %454, %456 ; [#uses=2]
- %458 = fmul float %415, %398 ; [#uses=1]
- %459 = fmul float %412, %399 ; [#uses=1]
- %460 = fadd float %458, %459 ; [#uses=1]
- %461 = fmul float %409, %400 ; [#uses=1]
- %462 = fadd float %460, %461 ; [#uses=2]
- %463 = fmul float %424, %398 ; [#uses=1]
- %464 = fmul float %421, %399 ; [#uses=1]
- %465 = fadd float %463, %464 ; [#uses=1]
- %466 = fmul float %418, %400 ; [#uses=1]
- %467 = fadd float %465, %466 ; [#uses=2]
- %468 = fmul float %433, %398 ; [#uses=1]
- %469 = fmul float %430, %399 ; [#uses=1]
- %470 = fadd float %468, %469 ; [#uses=1]
- %471 = fmul float %427, %400 ; [#uses=1]
- %472 = fadd float %470, %471 ; [#uses=2]
- %473 = fsub float %441, %462 ; [#uses=1]
- %474 = fsub float %449, %467 ; [#uses=1]
- %475 = fsub float %457, %472 ; [#uses=1]
- %476 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %475, float* %476, align 4
- %477 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %474, float* %477, align 4
- %478 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %473, float* %478, align 4
- %479 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %479, align 4
- %480 = fadd float %441, %462 ; [#uses=1]
- %481 = fadd float %449, %467 ; [#uses=1]
- %482 = fadd float %457, %472 ; [#uses=1]
- %483 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %482, float* %483, align 4
- %484 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %481, float* %484, align 4
- %485 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %480, float* %485, align 4
- %486 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %486, align 4
- ret void
-
-bb42: ; preds = %entry
- %487 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %488 = load i32 (...)*** %487, align 4 ; [#uses=1]
- %489 = getelementptr inbounds i32 (...)** %488, i32 2 ; [#uses=1]
- %490 = load i32 (...)** %489, align 4 ; [#uses=1]
- %491 = bitcast i32 (...)* %490 to void (%struct.btConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %491(%struct.btConvexShape* %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-
-return: ; preds = %bb19
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK13btConvexShape31localGetSupportVertexNonVirtualERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConvexShape* %this, %struct.btQuadWord* nocapture %localDir) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %localDirNorm = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btQuadWord* %localDirNorm, i32 0, i32 0, i32 0 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- store float %3, float* %1, align 8
- %4 = getelementptr inbounds %struct.btQuadWord* %localDirNorm, i32 0, i32 0, i32 1 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %localDirNorm, i32 0, i32 0, i32 2 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- store float %9, float* %7, align 8
- %10 = getelementptr inbounds %struct.btQuadWord* %localDirNorm, i32 0, i32 0, i32 3 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuadWord* %localDir, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = fmul float %3, %3 ; [#uses=1]
- %14 = fmul float %6, %6 ; [#uses=1]
- %15 = fadd float %13, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = fcmp olt float %17, 0x3D10000000000000 ; [#uses=1]
- br i1 %18, label %bb, label %bb1
-
-bb: ; preds = %entry
- store float -1.000000e+00, float* %1, align 8
- store float -1.000000e+00, float* %4, align 4
- store float -1.000000e+00, float* %7, align 8
- store float 0.000000e+00, float* %10, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %19 = phi float [ -1.000000e+00, %bb ], [ %9, %entry ] ; [#uses=3]
- %20 = phi float [ -1.000000e+00, %bb ], [ %6, %entry ] ; [#uses=3]
- %21 = phi float [ -1.000000e+00, %bb ], [ %3, %entry ] ; [#uses=3]
- %22 = fmul float %21, %21 ; [#uses=1]
- %23 = fmul float %20, %20 ; [#uses=1]
- %24 = fadd float %22, %23 ; [#uses=1]
- %25 = fmul float %19, %19 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = call float @sqrtf(float %26) nounwind readonly ; [#uses=1]
- %28 = fdiv float 1.000000e+00, %27 ; [#uses=3]
- %29 = fmul float %21, %28 ; [#uses=7]
- store float %29, float* %1, align 8
- %30 = fmul float %20, %28 ; [#uses=7]
- store float %30, float* %4, align 4
- %31 = fmul float %19, %28 ; [#uses=7]
- store float %31, float* %7, align 8
- %32 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- switch i32 %33, label %bb6.i [
- i32 0, label %bb1.i
- i32 1, label %bb2.i
- i32 4, label %bb5.i
- i32 5, label %bb5.i
- i32 8, label %bb.i
- i32 10, label %bb4.i
- i32 13, label %bb3.i
- ]
-
-bb.i: ; preds = %bb1
- %34 = getelementptr inbounds %struct.btConvexShape* %this, i32 2, i32 0, i32 1 ; [#uses=1]
- %35 = bitcast i32* %34 to float* ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btConvexShape* %this, i32 1 ; [#uses=1]
- %38 = bitcast %struct.btConvexShape* %37 to float* ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %36, %39 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
-
-bb1.i: ; preds = %bb1
- %41 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %42 = bitcast i8** %41 to float* ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
-
-bb2.i: ; preds = %bb1
- %44 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %45 = bitcast i8** %44 to float* ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
-
-bb3.i: ; preds = %bb1
- %47 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %48 = bitcast i8** %47 to float* ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
-
-bb4.i: ; preds = %bb1
- %50 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %51 = bitcast i8** %50 to float* ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
-
-bb5.i: ; preds = %bb1, %bb1
- %53 = getelementptr inbounds %struct.btConvexShape* %this, i32 3, i32 0, i32 2 ; [#uses=1]
- %54 = bitcast i8** %53 to float* ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
-
-bb6.i: ; preds = %bb1
- %56 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %57 = load i32 (...)*** %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds i32 (...)** %57, i32 11 ; [#uses=1]
- %59 = load i32 (...)** %58, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %59 to float (%struct.btConvexShape*)* ; [#uses=1]
- %61 = call float %60(%struct.btConvexShape* %this) ; [#uses=1]
- %.pre = load float* %7, align 8 ; [#uses=1]
- %.pre4 = load float* %4, align 4 ; [#uses=1]
- %.pre5 = load float* %1, align 8 ; [#uses=1]
- br label %_ZNK13btConvexShape19getMarginNonVirtualEv.exit
-
-_ZNK13btConvexShape19getMarginNonVirtualEv.exit: ; preds = %bb6.i, %bb5.i, %bb4.i, %bb3.i, %bb2.i, %bb1.i, %bb.i
- %62 = phi float [ %29, %bb3.i ], [ %29, %bb4.i ], [ %29, %bb.i ], [ %29, %bb5.i ], [ %29, %bb2.i ], [ %29, %bb1.i ], [ %.pre5, %bb6.i ] ; [#uses=1]
- %63 = phi float [ %30, %bb3.i ], [ %30, %bb4.i ], [ %30, %bb.i ], [ %30, %bb5.i ], [ %30, %bb2.i ], [ %30, %bb1.i ], [ %.pre4, %bb6.i ] ; [#uses=1]
- %64 = phi float [ %31, %bb3.i ], [ %31, %bb4.i ], [ %31, %bb.i ], [ %31, %bb5.i ], [ %31, %bb2.i ], [ %31, %bb1.i ], [ %.pre, %bb6.i ] ; [#uses=1]
- %65 = phi float [ %49, %bb3.i ], [ %52, %bb4.i ], [ %40, %bb.i ], [ %55, %bb5.i ], [ %46, %bb2.i ], [ %43, %bb1.i ], [ %61, %bb6.i ] ; [#uses=3]
- %66 = fmul float %64, %65 ; [#uses=1]
- %67 = fmul float %63, %65 ; [#uses=1]
- %68 = fmul float %62, %65 ; [#uses=1]
- call void @_ZNK13btConvexShape44localGetSupportVertexWithoutMarginNonVirtualERK9btVector3(%struct.btQuadWord* noalias sret %0, %struct.btConvexShape* %this, %struct.btQuadWord* %localDirNorm)
- %69 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 8 ; [#uses=1]
- %71 = fadd float %70, %66 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fadd float %73, %67 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 8 ; [#uses=1]
- %77 = fadd float %76, %68 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %77, float* %78, align 4
- %79 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %74, float* %79, align 4
- %80 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %71, float* %80, align 4
- %81 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %81, align 4
- ret void
-}
-
-; [#uses=126]
-define void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btConvexShape, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btConvex2dShapeC2EP13btConvexShape(%struct.btConvex2dShape* %this, %struct.btConvexShape* %convexChildShape) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btConvex2dShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btConvexShape* %convexChildShape, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 18, i32* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK15btConvex2dShape7getNameEv(%struct.btConvex2dShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([14 x i8]* @.str82, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK15btConvex2dShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvex2dShape* nocapture %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 16 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexShape* %1, %struct.btQuadWord* %vec)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btConvex2dShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btConvex2dShape* nocapture %this, %struct.btQuadWord* %vectors, %struct.btQuadWord* %supportVerticesOut, i32 %numVectors) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 17 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btQuadWord* %vectors, %struct.btQuadWord* %supportVerticesOut, i32 %numVectors)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btConvex2dShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvex2dShape* nocapture %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 15 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexShape* %1, %struct.btQuadWord* %vec)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btConvex2dShape21calculateLocalInertiaEfR9btVector3(%struct.btConvex2dShape* nocapture %this, float %mass, %struct.btQuadWord* %inertia) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 8 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0 ; [#uses=1]
- %7 = bitcast i32 (...)* %5 to void (%struct.btCollisionShape*, float, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %7(%struct.btCollisionShape* %6, float %mass, %struct.btQuadWord* %inertia)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btConvex2dShape7getAabbERK11btTransformR9btVector3S4_(%struct.btConvex2dShape* nocapture %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btConvex2dShape11getAabbSlowERK11btTransformR9btVector3S4_(%struct.btConvex2dShape* nocapture %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 18 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btConvex2dShape15setLocalScalingERK9btVector3(%struct.btConvex2dShape* nocapture %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 6 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btQuadWord* %scaling)
- ret void
-}
-
-; [#uses=1]
-define %struct.btQuadWord* @_ZNK15btConvex2dShape15getLocalScalingEv(%struct.btConvex2dShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 7 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to %struct.btQuadWord* (%struct.btConvexShape*)* ; [#uses=1]
- %7 = tail call %struct.btQuadWord* %6(%struct.btConvexShape* %1) ; [#uses=1]
- ret %struct.btQuadWord* %7
-}
-
-; [#uses=1]
-define void @_ZN15btConvex2dShape9setMarginEf(%struct.btConvex2dShape* nocapture %this, float %margin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 10 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, float)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, float %margin)
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK15btConvex2dShape9getMarginEv(%struct.btConvex2dShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 11 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to float (%struct.btConvexShape*)* ; [#uses=1]
- %7 = tail call float %6(%struct.btConvexShape* %1) ; [#uses=1]
- ret float %7
-}
-
-; [#uses=1]
-define i32 @_ZNK15btConvex2dShape36getNumPreferredPenetrationDirectionsEv(%struct.btConvex2dShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 19 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i32 (%struct.btConvexShape*)* ; [#uses=1]
- %7 = tail call i32 %6(%struct.btConvexShape* %1) ; [#uses=1]
- ret i32 %7
-}
-
-; [#uses=1]
-define void @_ZNK15btConvex2dShape32getPreferredPenetrationDirectionEiR9btVector3(%struct.btConvex2dShape* nocapture %this, i32 %index, %struct.btQuadWord* %penetrationVector) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 20 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, i32 %index, %struct.btQuadWord* %penetrationVector)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btConvex2dShapeD0Ev(%struct.btConvex2dShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btConvex2dShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConvex2dShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btConvex2dShapeD1Ev(%struct.btConvex2dShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btConvex2dShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btConvex2dShapeD2Ev(%struct.btConvex2dShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btConvex2dShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btConvex2dShapeC1EP13btConvexShape(%struct.btConvex2dShape* %this, %struct.btConvexShape* %convexChildShape) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV15btConvex2dShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btConvexShape* %convexChildShape, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btConvex2dShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 18, i32* %3, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btConvexTriangleMeshShapeC2EP23btStridingMeshInterfaceb(%struct.btConvexTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %calcAabb) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV25btConvexTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btStridingMeshInterface* %meshInterface, %struct.btStridingMeshInterface** %2, align 4
- %3 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 3, i32* %3, align 4
- %toBool = icmp eq i8 %calcAabb, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %return unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb, %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %4 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %4)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK25btConvexTriangleMeshShape7getNameEv(%struct.btConvexTriangleMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([14 x i8]* @.str83, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26LocalSupportVertexCallbackD1Ev(%struct.LocalSupportVertexCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26LocalSupportVertexCallbackD0Ev(%struct.LocalSupportVertexCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.LocalSupportVertexCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26LocalSupportVertexCallback28internalProcessTriangleIndexEP9btVector3ii(%struct.LocalSupportVertexCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) nounwind align 2 {
-bb.nph:
- %0 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 2 ; [#uses=4]
- %4 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %5 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %6 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %7 = getelementptr inbounds %struct.LocalSupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %scevgep6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=2]
- %scevgep7 = getelementptr %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=2]
- %scevgep8 = getelementptr %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %0, align 4 ; [#uses=3]
- %9 = load float* %scevgep6, align 4 ; [#uses=1]
- %10 = fmul float %8, %9 ; [#uses=1]
- %11 = load float* %1, align 4 ; [#uses=3]
- %12 = load float* %scevgep7, align 4 ; [#uses=1]
- %13 = fmul float %11, %12 ; [#uses=1]
- %14 = fadd float %10, %13 ; [#uses=1]
- %15 = load float* %2, align 4 ; [#uses=3]
- %16 = load float* %scevgep8, align 4 ; [#uses=1]
- %17 = fmul float %15, %16 ; [#uses=1]
- %18 = fadd float %14, %17 ; [#uses=3]
- %19 = load float* %3, align 4 ; [#uses=2]
- %20 = fcmp olt float %19, %18 ; [#uses=1]
- br i1 %20, label %bb1, label %bb2
-
-bb1: ; preds = %bb.nph
- %scevgep9 = getelementptr %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %18, float* %3, align 4
- %21 = load float* %scevgep6, align 4 ; [#uses=1]
- store float %21, float* %4, align 4
- %22 = load float* %scevgep7, align 4 ; [#uses=1]
- store float %22, float* %5, align 4
- %23 = load float* %scevgep8, align 4 ; [#uses=1]
- store float %23, float* %6, align 4
- %24 = load float* %scevgep9, align 4 ; [#uses=1]
- store float %24, float* %7, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb.nph
- %25 = phi float [ %18, %bb1 ], [ %19, %bb.nph ] ; [#uses=2]
- %scevgep6.1 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=2]
- %scevgep7.1 = getelementptr %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=2]
- %scevgep8.1 = getelementptr %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=2]
- %26 = load float* %scevgep6.1, align 4 ; [#uses=1]
- %27 = fmul float %8, %26 ; [#uses=1]
- %28 = load float* %scevgep7.1, align 4 ; [#uses=1]
- %29 = fmul float %11, %28 ; [#uses=1]
- %30 = fadd float %27, %29 ; [#uses=1]
- %31 = load float* %scevgep8.1, align 4 ; [#uses=1]
- %32 = fmul float %15, %31 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=3]
- %34 = fcmp olt float %25, %33 ; [#uses=1]
- br i1 %34, label %bb1.1, label %bb2.1
-
-return: ; preds = %bb2.1
- ret void
-
-bb2.1: ; preds = %bb1.1, %bb2
- %35 = phi float [ %33, %bb1.1 ], [ %25, %bb2 ] ; [#uses=1]
- %scevgep6.2 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=2]
- %scevgep7.2 = getelementptr %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=2]
- %scevgep8.2 = getelementptr %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=2]
- %36 = load float* %scevgep6.2, align 4 ; [#uses=1]
- %37 = fmul float %8, %36 ; [#uses=1]
- %38 = load float* %scevgep7.2, align 4 ; [#uses=1]
- %39 = fmul float %11, %38 ; [#uses=1]
- %40 = fadd float %37, %39 ; [#uses=1]
- %41 = load float* %scevgep8.2, align 4 ; [#uses=1]
- %42 = fmul float %15, %41 ; [#uses=1]
- %43 = fadd float %40, %42 ; [#uses=2]
- %44 = fcmp olt float %35, %43 ; [#uses=1]
- br i1 %44, label %bb1.2, label %return
-
-bb1.1: ; preds = %bb2
- %scevgep9.1 = getelementptr %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %33, float* %3, align 4
- %45 = load float* %scevgep6.1, align 4 ; [#uses=1]
- store float %45, float* %4, align 4
- %46 = load float* %scevgep7.1, align 4 ; [#uses=1]
- store float %46, float* %5, align 4
- %47 = load float* %scevgep8.1, align 4 ; [#uses=1]
- store float %47, float* %6, align 4
- %48 = load float* %scevgep9.1, align 4 ; [#uses=1]
- store float %48, float* %7, align 4
- br label %bb2.1
-
-bb1.2: ; preds = %bb2.1
- %scevgep9.2 = getelementptr %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %43, float* %3, align 4
- %49 = load float* %scevgep6.2, align 4 ; [#uses=1]
- store float %49, float* %4, align 4
- %50 = load float* %scevgep7.2, align 4 ; [#uses=1]
- store float %50, float* %5, align 4
- %51 = load float* %scevgep8.2, align 4 ; [#uses=1]
- store float %51, float* %6, align 4
- %52 = load float* %scevgep9.2, align 4 ; [#uses=1]
- store float %52, float* %7, align 4
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK25btConvexTriangleMeshShape14getNumVerticesEv(%struct.btConvexTriangleMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define i32 @_ZNK25btConvexTriangleMeshShape11getNumEdgesEv(%struct.btConvexTriangleMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZNK25btConvexTriangleMeshShape7getEdgeEiR9btVector3S1_(%struct.btConvexTriangleMeshShape* nocapture %this, i32 %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2, %struct.btQuadWord* nocapture %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK25btConvexTriangleMeshShape9getVertexEiR9btVector3(%struct.btConvexTriangleMeshShape* nocapture %this, i32 %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK25btConvexTriangleMeshShape12getNumPlanesEv(%struct.btConvexTriangleMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZNK25btConvexTriangleMeshShape8getPlaneER9btVector3S1_i(%struct.btConvexTriangleMeshShape* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2, i32 %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZNK25btConvexTriangleMeshShape8isInsideERK9btVector3f(%struct.btConvexTriangleMeshShape* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, float %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define %struct.btQuadWord* @_ZNK25btConvexTriangleMeshShape15getLocalScalingEv(%struct.btConvexTriangleMeshShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1 ; [#uses=1]
- ret %struct.btQuadWord* %2
-}
-
-; [#uses=1]
-define void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN14CenterCallbackD1Ev(%struct..0CenterCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN14CenterCallbackD0Ev(%struct..0CenterCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..0CenterCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN14CenterCallback28internalProcessTriangleIndexEPS2_ii(%struct..0CenterCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- store i8 0, i8* %0, align 4
- ret void
-
-bb1: ; preds = %entry
- %14 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=4]
- %18 = fsub float %15, %17 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=4]
- %23 = fsub float %20, %22 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=4]
- %28 = fsub float %25, %27 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=2]
- %31 = fsub float %30, %17 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = fsub float %33, %22 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fsub float %36, %27 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = fsub float %39, %17 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=2]
- %43 = fsub float %42, %22 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- %46 = fsub float %45, %27 ; [#uses=1]
- %47 = fmul float %34, %18 ; [#uses=1]
- %48 = fmul float %31, %23 ; [#uses=1]
- %49 = fsub float %47, %48 ; [#uses=1]
- %50 = fmul float %46, %49 ; [#uses=1]
- %51 = fmul float %31, %28 ; [#uses=1]
- %52 = fmul float %37, %18 ; [#uses=1]
- %53 = fsub float %51, %52 ; [#uses=1]
- %54 = fmul float %43, %53 ; [#uses=1]
- %55 = fadd float %50, %54 ; [#uses=1]
- %56 = fmul float %37, %23 ; [#uses=1]
- %57 = fmul float %34, %28 ; [#uses=1]
- %58 = fsub float %56, %57 ; [#uses=1]
- %59 = fmul float %40, %58 ; [#uses=1]
- %60 = fadd float %55, %59 ; [#uses=1]
- %61 = tail call float @fabsf(float %60) nounwind readnone ; [#uses=2]
- %62 = fadd float %39, %30 ; [#uses=1]
- %63 = fadd float %42, %33 ; [#uses=1]
- %64 = fadd float %45, %36 ; [#uses=1]
- %65 = fadd float %62, %15 ; [#uses=1]
- %66 = fadd float %63, %20 ; [#uses=1]
- %67 = fadd float %64, %25 ; [#uses=1]
- %68 = fadd float %65, %17 ; [#uses=1]
- %69 = fadd float %66, %22 ; [#uses=1]
- %70 = fadd float %67, %27 ; [#uses=1]
- %71 = fmul float %61, 2.500000e-01 ; [#uses=3]
- %72 = fmul float %68, %71 ; [#uses=1]
- %73 = fmul float %69, %71 ; [#uses=1]
- %74 = fmul float %70, %71 ; [#uses=1]
- %75 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fadd float %76, %74 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = fadd float %79, %73 ; [#uses=1]
- store float %80, float* %78, align 4
- %81 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = fadd float %82, %72 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 4 ; [#uses=2]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fadd float %85, %61 ; [#uses=1]
- store float %86, float* %84, align 4
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN15InertiaCallback28internalProcessTriangleIndexEPS2_ii(%struct..1InertiaCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) nounwind align 2 {
-bb.nph.1:
- %i = alloca %struct.btMatrix3x3, align 8 ; [#uses=14]
- %a = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %b = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %c = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fsub float %1, %3 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fsub float %6, %8 ; [#uses=5]
- %10 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fsub float %11, %13 ; [#uses=10]
- %15 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %14, float* %15, align 8
- %16 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %9, float* %16, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %4, float* %17, align 8
- %18 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %20, %3 ; [#uses=6]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fsub float %23, %8 ; [#uses=6]
- %25 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fsub float %26, %13 ; [#uses=11]
- %28 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %27, float* %28, align 8
- %29 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %24, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %30, align 8
- %31 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %33, %3 ; [#uses=6]
- %35 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fsub float %36, %8 ; [#uses=6]
- %38 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fsub float %39, %13 ; [#uses=11]
- %41 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %40, float* %41, align 8
- %42 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %37, float* %42, align 4
- %43 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %34, float* %43, align 8
- %44 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- %45 = fmul float %24, %34 ; [#uses=1]
- %46 = fmul float %21, %37 ; [#uses=1]
- %47 = fsub float %45, %46 ; [#uses=1]
- %48 = fmul float %14, %47 ; [#uses=1]
- %49 = fmul float %21, %40 ; [#uses=1]
- %50 = fmul float %27, %34 ; [#uses=1]
- %51 = fsub float %49, %50 ; [#uses=1]
- %52 = fmul float %9, %51 ; [#uses=1]
- %53 = fadd float %48, %52 ; [#uses=1]
- %54 = fmul float %27, %37 ; [#uses=1]
- %55 = fmul float %24, %40 ; [#uses=1]
- %56 = fsub float %54, %55 ; [#uses=1]
- %57 = fmul float %4, %56 ; [#uses=1]
- %58 = fadd float %53, %57 ; [#uses=1]
- %59 = call float @fabsf(float %58) nounwind readnone ; [#uses=1]
- %60 = fmul float %59, 0xBFC5555560000000 ; [#uses=3]
- %scevgep12 = getelementptr %struct.btMatrix3x3* %i, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %61 = fmul float %14, %14 ; [#uses=1]
- %62 = fmul float %27, %27 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fmul float %40, %40 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fmul float %65, 0x3FB99999A0000000 ; [#uses=1]
- %67 = fmul float %14, %27 ; [#uses=1]
- %68 = fmul float %14, %27 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %14, %40 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %14, %40 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=1]
- %74 = fmul float %27, %40 ; [#uses=1]
- %75 = fadd float %73, %74 ; [#uses=1]
- %76 = fmul float %27, %40 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = fmul float %77, 0x3FA99999A0000000 ; [#uses=1]
- %79 = fadd float %66, %78 ; [#uses=1]
- %80 = fmul float %79, %60 ; [#uses=1]
- store float %80, float* %scevgep12, align 8
- br label %bb1.1
-
-bb5: ; preds = %bb1.2
- %.phi.trans.insert = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 8 ; [#uses=2]
- %.phi.trans.insert20 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre21 = load float* %.phi.trans.insert20, align 4 ; [#uses=2]
- %.phi.trans.insert22 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %.pre23 = load float* %.phi.trans.insert22, align 8 ; [#uses=2]
- %.phi.trans.insert24 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre25 = load float* %.phi.trans.insert24, align 4 ; [#uses=1]
- %.phi.trans.insert26 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre27 = load float* %.phi.trans.insert26, align 8 ; [#uses=1]
- %.phi.trans.insert28 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre29 = load float* %.phi.trans.insert28, align 8 ; [#uses=1]
- %.phi.trans.insert30 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre31 = load float* %.phi.trans.insert30, align 8 ; [#uses=1]
- %.phi.trans.insert32 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %.pre33 = load float* %.phi.trans.insert32, align 8 ; [#uses=1]
- %.phi.trans.insert34 = getelementptr inbounds %struct.btMatrix3x3* %i, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %.pre35 = load float* %.phi.trans.insert34, align 4 ; [#uses=1]
- %81 = fsub float -0.000000e+00, %.pre ; [#uses=1]
- %82 = fsub float -0.000000e+00, %.pre21 ; [#uses=1]
- %83 = fsub float -0.000000e+00, %.pre23 ; [#uses=1]
- %84 = fsub float %83, %.pre21 ; [#uses=1]
- %85 = fsub float %81, %.pre23 ; [#uses=1]
- %86 = fsub float %82, %.pre ; [#uses=1]
- %87 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fadd float %88, %84 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fadd float %91, %.pre25 ; [#uses=1]
- store float %92, float* %90, align 4
- %93 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fadd float %94, %.pre27 ; [#uses=1]
- store float %95, float* %93, align 4
- %96 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %97 = load float* %96, align 4 ; [#uses=1]
- %98 = fadd float %97, %.pre29 ; [#uses=1]
- store float %98, float* %96, align 4
- %99 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %100 = load float* %99, align 4 ; [#uses=1]
- %101 = fadd float %100, %85 ; [#uses=1]
- store float %101, float* %99, align 4
- %102 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %103 = load float* %102, align 4 ; [#uses=1]
- %104 = fadd float %103, %.pre31 ; [#uses=1]
- store float %104, float* %102, align 4
- %105 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %106 = load float* %105, align 4 ; [#uses=1]
- %107 = fadd float %106, %.pre33 ; [#uses=1]
- store float %107, float* %105, align 4
- %108 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fadd float %109, %.pre35 ; [#uses=1]
- store float %110, float* %108, align 4
- %111 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fadd float %112, %86 ; [#uses=1]
- store float %113, float* %111, align 4
- ret void
-
-bb1.1: ; preds = %bb1.1.bb1.1_crit_edge, %bb.nph.1
- %114 = phi float [ %40, %bb.nph.1 ], [ %.pre41, %bb1.1.bb1.1_crit_edge ] ; [#uses=3]
- %115 = phi float [ %27, %bb.nph.1 ], [ %.pre40, %bb1.1.bb1.1_crit_edge ] ; [#uses=3]
- %116 = phi float [ %14, %bb.nph.1 ], [ %.pre39, %bb1.1.bb1.1_crit_edge ] ; [#uses=3]
- %k.06.1 = phi i32 [ 0, %bb.nph.1 ], [ %137, %bb1.1.bb1.1_crit_edge ] ; [#uses=3]
- %scevgep12.1 = getelementptr %struct.btMatrix3x3* %i, i32 0, i32 0, i32 1, i32 0, i32 %k.06.1 ; [#uses=1]
- %scevgep11.1 = getelementptr %struct.btMatrix3x3* %i, i32 0, i32 0, i32 %k.06.1, i32 0, i32 1 ; [#uses=1]
- %117 = fmul float %9, %116 ; [#uses=1]
- %118 = fmul float %24, %115 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = fmul float %37, %114 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fmul float %121, 0x3FB99999A0000000 ; [#uses=1]
- %123 = fmul float %9, %115 ; [#uses=1]
- %124 = fmul float %116, %24 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %9, %114 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = fmul float %116, %37 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=1]
- %130 = fmul float %24, %114 ; [#uses=1]
- %131 = fadd float %129, %130 ; [#uses=1]
- %132 = fmul float %115, %37 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %133, 0x3FA99999A0000000 ; [#uses=1]
- %135 = fadd float %122, %134 ; [#uses=1]
- %136 = fmul float %135, %60 ; [#uses=2]
- store float %136, float* %scevgep11.1, align 4
- store float %136, float* %scevgep12.1, align 4
- %137 = add nsw i32 %k.06.1, 1 ; [#uses=5]
- %exitcond.1 = icmp eq i32 %137, 2 ; [#uses=1]
- br i1 %exitcond.1, label %bb1.2, label %bb1.1.bb1.1_crit_edge
-
-bb1.1.bb1.1_crit_edge: ; preds = %bb1.1
- %scevgep.1.phi.trans.insert = getelementptr %struct.btQuadWord* %a, i32 0, i32 0, i32 %137 ; [#uses=1]
- %.pre39 = load float* %scevgep.1.phi.trans.insert, align 4 ; [#uses=1]
- %scevgep9.1.phi.trans.insert = getelementptr %struct.btQuadWord* %b, i32 0, i32 0, i32 %137 ; [#uses=1]
- %.pre40 = load float* %scevgep9.1.phi.trans.insert, align 4 ; [#uses=1]
- %scevgep10.1.phi.trans.insert = getelementptr %struct.btQuadWord* %c, i32 0, i32 0, i32 %137 ; [#uses=1]
- %.pre41 = load float* %scevgep10.1.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb1.1
-
-bb1.2: ; preds = %bb1.2.bb1.2_crit_edge, %bb1.1
- %138 = phi float [ %.pre38, %bb1.2.bb1.2_crit_edge ], [ %40, %bb1.1 ] ; [#uses=3]
- %139 = phi float [ %.pre37, %bb1.2.bb1.2_crit_edge ], [ %27, %bb1.1 ] ; [#uses=3]
- %140 = phi float [ %.pre36, %bb1.2.bb1.2_crit_edge ], [ %14, %bb1.1 ] ; [#uses=3]
- %k.06.2 = phi i32 [ %161, %bb1.2.bb1.2_crit_edge ], [ 0, %bb1.1 ] ; [#uses=3]
- %scevgep12.2 = getelementptr %struct.btMatrix3x3* %i, i32 0, i32 0, i32 2, i32 0, i32 %k.06.2 ; [#uses=1]
- %scevgep11.2 = getelementptr %struct.btMatrix3x3* %i, i32 0, i32 0, i32 %k.06.2, i32 0, i32 2 ; [#uses=1]
- %141 = fmul float %4, %140 ; [#uses=1]
- %142 = fmul float %21, %139 ; [#uses=1]
- %143 = fadd float %141, %142 ; [#uses=1]
- %144 = fmul float %34, %138 ; [#uses=1]
- %145 = fadd float %143, %144 ; [#uses=1]
- %146 = fmul float %145, 0x3FB99999A0000000 ; [#uses=1]
- %147 = fmul float %4, %139 ; [#uses=1]
- %148 = fmul float %140, %21 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fmul float %4, %138 ; [#uses=1]
- %151 = fadd float %149, %150 ; [#uses=1]
- %152 = fmul float %140, %34 ; [#uses=1]
- %153 = fadd float %151, %152 ; [#uses=1]
- %154 = fmul float %21, %138 ; [#uses=1]
- %155 = fadd float %153, %154 ; [#uses=1]
- %156 = fmul float %139, %34 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fmul float %157, 0x3FA99999A0000000 ; [#uses=1]
- %159 = fadd float %146, %158 ; [#uses=1]
- %160 = fmul float %159, %60 ; [#uses=2]
- store float %160, float* %scevgep11.2, align 8
- store float %160, float* %scevgep12.2, align 4
- %161 = add nsw i32 %k.06.2, 1 ; [#uses=5]
- %exitcond.2 = icmp eq i32 %161, 3 ; [#uses=1]
- br i1 %exitcond.2, label %bb5, label %bb1.2.bb1.2_crit_edge
-
-bb1.2.bb1.2_crit_edge: ; preds = %bb1.2
- %scevgep.2.phi.trans.insert = getelementptr %struct.btQuadWord* %a, i32 0, i32 0, i32 %161 ; [#uses=1]
- %.pre36 = load float* %scevgep.2.phi.trans.insert, align 4 ; [#uses=1]
- %scevgep9.2.phi.trans.insert = getelementptr %struct.btQuadWord* %b, i32 0, i32 0, i32 %161 ; [#uses=1]
- %.pre37 = load float* %scevgep9.2.phi.trans.insert, align 4 ; [#uses=1]
- %scevgep10.2.phi.trans.insert = getelementptr %struct.btQuadWord* %c, i32 0, i32 0, i32 %161 ; [#uses=1]
- %.pre38 = load float* %scevgep10.2.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb1.2
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btConvexTriangleMeshShapeD0Ev(%struct.btConvexTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btConvexTriangleMeshShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btConvexTriangleMeshShapeD1Ev(%struct.btConvexTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btConvexTriangleMeshShape15setLocalScalingERK9btVector3(%struct.btConvexTriangleMeshShape* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %14)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK25btConvexTriangleMeshShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexTriangleMeshShape* %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btQuadWord*, %struct.btConvexTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %4(%struct.btQuadWord* noalias sret %agg.result, %struct.btConvexTriangleMeshShape* %this, %struct.btQuadWord* %vec)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 11 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %9 = bitcast i32 (...)* %7 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %10 = tail call float %9(%struct.btConvexInternalShape* %8) ; [#uses=1]
- %11 = fcmp une float %10, 0.000000e+00 ; [#uses=1]
- br i1 %11, label %bb, label %return
-
-bb: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = fmul float %13, %13 ; [#uses=1]
- %19 = fmul float %15, %15 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- %21 = fmul float %17, %17 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- %23 = fcmp olt float %22, 0x3D10000000000000 ; [#uses=3]
- %vecnorm.0.0.0 = select i1 %23, float -1.000000e+00, float %13 ; [#uses=3]
- %vecnorm.0.1.0 = select i1 %23, float -1.000000e+00, float %15 ; [#uses=3]
- %vecnorm.0.2.0 = select i1 %23, float -1.000000e+00, float %17 ; [#uses=3]
- %24 = fmul float %vecnorm.0.0.0, %vecnorm.0.0.0 ; [#uses=1]
- %25 = fmul float %vecnorm.0.1.0, %vecnorm.0.1.0 ; [#uses=1]
- %26 = fadd float %24, %25 ; [#uses=1]
- %27 = fmul float %vecnorm.0.2.0, %vecnorm.0.2.0 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=1]
- %29 = tail call float @sqrtf(float %28) nounwind readonly ; [#uses=1]
- %30 = fdiv float 1.000000e+00, %29 ; [#uses=3]
- %31 = fmul float %vecnorm.0.0.0, %30 ; [#uses=1]
- %32 = fmul float %vecnorm.0.1.0, %30 ; [#uses=1]
- %33 = fmul float %vecnorm.0.2.0, %30 ; [#uses=1]
- %34 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %35 = getelementptr inbounds i32 (...)** %34, i32 11 ; [#uses=1]
- %36 = load i32 (...)** %35, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %36 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %38 = tail call float %37(%struct.btConvexInternalShape* %8) ; [#uses=3]
- %39 = fmul float %33, %38 ; [#uses=1]
- %40 = fmul float %32, %38 ; [#uses=1]
- %41 = fmul float %31, %38 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %41 ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %46, %40 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %49, %39 ; [#uses=1]
- store float %50, float* %48, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK25btConvexTriangleMeshShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConvexTriangleMeshShape* nocapture %this, %struct.btQuadWord* nocapture %vec0) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %supportCallback = alloca %struct.LocalSupportVertexCallback, align 8 ; [#uses=11]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = fmul float %6, %6 ; [#uses=1]
- %12 = fmul float %8, %8 ; [#uses=1]
- %13 = fadd float %11, %12 ; [#uses=1]
- %14 = fmul float %10, %10 ; [#uses=1]
- %15 = fadd float %13, %14 ; [#uses=2]
- %16 = fcmp olt float %15, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %16, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %17 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 3 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = call float @sqrtf(float %15) nounwind readonly ; [#uses=1]
- %20 = fdiv float 1.000000e+00, %19 ; [#uses=3]
- %21 = fmul float %6, %20 ; [#uses=1]
- %22 = fmul float %8, %20 ; [#uses=1]
- %23 = fmul float %10, %20 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %entry
- %vec.0.3.0 = phi float [ %18, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %vec.0.2.0 = phi float [ %23, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %vec.0.1.0 = phi float [ %22, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %vec.0.0.0 = phi float [ %21, %bb1 ], [ 1.000000e+00, %entry ] ; [#uses=1]
- %24 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %24, align 8
- %25 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %29, align 4
- %30 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %vec.0.0.0, float* %30, align 8
- %31 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %vec.0.1.0, float* %31, align 4
- %32 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %vec.0.2.0, float* %32, align 8
- %33 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float %vec.0.3.0, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %34, align 8
- %35 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %35, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %36, align 8
- %37 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %39 = load %struct.btStridingMeshInterface** %38, align 4 ; [#uses=2]
- %40 = getelementptr inbounds %struct.btStridingMeshInterface* %39, i32 0, i32 0 ; [#uses=1]
- %41 = load i32 (...)*** %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 2 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %44, align 8
- %45 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %45, align 4
- %46 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %46, align 8
- %47 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 4
- %48 = bitcast i32 (...)* %43 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %49 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 0 ; [#uses=3]
- invoke void %48(%struct.btStridingMeshInterface* %39, %struct.btActionInterface* %49, %struct.btQuadWord* %0, %struct.btQuadWord* %aabbMax)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb2
- %50 = load float* %25, align 4 ; [#uses=1]
- %51 = load float* %26, align 4 ; [#uses=1]
- %52 = load float* %27, align 4 ; [#uses=1]
- %53 = load float* %28, align 4 ; [#uses=1]
- store float %50, float* %1, align 4
- store float %51, float* %2, align 4
- store float %52, float* %3, align 4
- store float %53, float* %4, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %24, align 8
- call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %49)
- ret void
-
-invcont6: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb2
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %24, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %49)
- to label %invcont6 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZNK25btConvexTriangleMeshShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btConvexTriangleMeshShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %supportCallback = alloca %struct.LocalSupportVertexCallback, align 8 ; [#uses=11]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb9.preheader
-
-bb: ; preds = %bb, %entry
- %i.021 = phi i32 [ %2, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep31 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.021, i32 0, i32 3 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %scevgep31, align 4
- %2 = add nsw i32 %i.021, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %2, %numVectors ; [#uses=1]
- br i1 %exitcond, label %bb9.preheader, label %bb
-
-bb9.preheader: ; preds = %bb, %entry
- %3 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- %4 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %5 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %6 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %7 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %8 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.LocalSupportVertexCallback* %supportCallback, i32 0, i32 0 ; [#uses=3]
- br label %bb9
-
-bb3: ; preds = %bb9
- %scevgep2425 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %38, i32 0, i32 0 ; [#uses=1]
- %scevgep23 = getelementptr %struct.btQuadWord* %vectors, i32 %38, i32 0, i32 1 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btQuadWord* %vectors, i32 %38, i32 0, i32 2 ; [#uses=1]
- %scevgep = getelementptr %struct.btQuadWord* %vectors, i32 %38, i32 0, i32 3 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %3, align 8
- store float 0.000000e+00, float* %4, align 4
- store float 0.000000e+00, float* %5, align 4
- store float 0.000000e+00, float* %6, align 4
- store float 0.000000e+00, float* %7, align 4
- store float 0xC3ABC16D60000000, float* %8, align 4
- %23 = load float* %scevgep2425, align 4 ; [#uses=1]
- store float %23, float* %9, align 8
- %24 = load float* %scevgep23, align 4 ; [#uses=1]
- store float %24, float* %10, align 4
- %25 = load float* %scevgep22, align 4 ; [#uses=1]
- store float %25, float* %11, align 8
- %26 = load float* %scevgep, align 4 ; [#uses=1]
- store float %26, float* %12, align 4
- store float 0x43ABC16D60000000, float* %13, align 8
- store float 0x43ABC16D60000000, float* %14, align 4
- store float 0x43ABC16D60000000, float* %15, align 8
- store float 0.000000e+00, float* %16, align 4
- %27 = load %struct.btStridingMeshInterface** %17, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btStridingMeshInterface* %27, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 2 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %18, align 8
- store float 0xC3ABC16D60000000, float* %19, align 4
- store float 0xC3ABC16D60000000, float* %20, align 8
- store float 0.000000e+00, float* %21, align 4
- %32 = bitcast i32 (...)* %31 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %32(%struct.btStridingMeshInterface* %27, %struct.btActionInterface* %22, %struct.btQuadWord* %0, %struct.btQuadWord* %aabbMax)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb3
- %33 = load float* %4, align 4 ; [#uses=1]
- %34 = load float* %5, align 4 ; [#uses=1]
- %35 = load float* %6, align 4 ; [#uses=1]
- %36 = load float* %7, align 4 ; [#uses=1]
- store float %33, float* %scevgep2930, align 4
- store float %34, float* %scevgep28, align 4
- store float %35, float* %scevgep27, align 4
- store float %36, float* %scevgep26, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %3, align 8
- call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %22)
- %37 = add nsw i32 %38, 1 ; [#uses=1]
- br label %bb9
-
-invcont7: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9: ; preds = %invcont, %bb9.preheader
- %38 = phi i32 [ %37, %invcont ], [ 0, %bb9.preheader ] ; [#uses=10]
- %scevgep26 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %38, i32 0, i32 3 ; [#uses=1]
- %scevgep27 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %38, i32 0, i32 2 ; [#uses=1]
- %scevgep28 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %38, i32 0, i32 1 ; [#uses=1]
- %scevgep2930 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %38, i32 0, i32 0 ; [#uses=1]
- %39 = icmp slt i32 %38, %numVectors ; [#uses=1]
- br i1 %39, label %bb3, label %return
-
-return: ; preds = %bb9
- ret void
-
-lpad: ; preds = %bb3
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV26LocalSupportVertexCallback, i32 0, i32 2), i32 (...)*** %3, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %22)
- to label %invcont7 unwind label %lpad13
-
-lpad13: ; preds = %lpad
- %eh_ptr14 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select16 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr14, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN15InertiaCallbackD1Ev(%struct..1InertiaCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN15InertiaCallbackD0Ev(%struct..1InertiaCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..1InertiaCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN15InertiaCallbackD2Ev(%struct..1InertiaCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1InertiaCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3Rf(%struct.btConvexTriangleMeshShape* nocapture %this, %struct.btTransform* nocapture %principal, %struct.btQuadWord* nocapture %inertia, float* nocapture %volume) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %centerCallback = alloca %struct..0CenterCallback, align 8 ; [#uses=11]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %inertiaCallback = alloca %struct..1InertiaCallback, align 8 ; [#uses=10]
- %2 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- %3 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 1 ; [#uses=1]
- store i8 1, i8* %3, align 4
- %4 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %5 = bitcast float* %4 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %5, i8 0, i64 36, i32 8, i1 false) nounwind
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %6, align 8
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=2]
- %11 = load %struct.btStridingMeshInterface** %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btStridingMeshInterface* %11, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 2 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %16, align 8
- %17 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %17, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %18, align 8
- %19 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = bitcast i32 (...)* %15 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %21 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 0 ; [#uses=3]
- invoke void %20(%struct.btStridingMeshInterface* %11, %struct.btActionInterface* %21, %struct.btQuadWord* %1, %struct.btQuadWord* %aabbMax)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %22 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 4 ; [#uses=1]
- %23 = load float* %22, align 8 ; [#uses=3]
- %24 = fcmp ogt float %23, 0.000000e+00 ; [#uses=1]
- br i1 %24, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %invcont
- %25 = fdiv float 1.000000e+00, %23 ; [#uses=3]
- %26 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 8 ; [#uses=1]
- %28 = fmul float %27, %25 ; [#uses=1]
- %29 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fmul float %30, %25 ; [#uses=1]
- %32 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 8 ; [#uses=1]
- %34 = fmul float %33, %25 ; [#uses=1]
- br label %invcont1
-
-bb1.i: ; preds = %invcont
- %35 = load float* %4, align 8 ; [#uses=1]
- %36 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 8 ; [#uses=1]
- %40 = getelementptr inbounds %struct..0CenterCallback* %centerCallback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- br label %invcont1
-
-invcont1: ; preds = %bb1.i, %bb.i
- %center.0.3.0 = phi float [ 0.000000e+00, %bb.i ], [ %41, %bb1.i ] ; [#uses=2]
- %center.0.2.0 = phi float [ %28, %bb.i ], [ %39, %bb1.i ] ; [#uses=2]
- %center.0.1.0 = phi float [ %31, %bb.i ], [ %37, %bb1.i ] ; [#uses=2]
- %center.0.0.0 = phi float [ %34, %bb.i ], [ %35, %bb1.i ] ; [#uses=2]
- %42 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %center.0.0.0, float* %42, align 4
- %43 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %center.0.1.0, float* %43, align 4
- %44 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %center.0.2.0, float* %44, align 4
- %45 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %center.0.3.0, float* %45, align 4
- %46 = fmul float %23, 0x3FC5555560000000 ; [#uses=1]
- store float %46, float* %volume, align 4
- %47 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback, i32 0, i32 2), i32 (...)*** %47, align 8
- %48 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %49 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %50 = bitcast float* %48 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %50, i8 0, i64 48, i32 4, i1 false)
- store float %center.0.0.0, float* %49, align 4
- %51 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %center.0.1.0, float* %51, align 4
- %52 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %center.0.2.0, float* %52, align 4
- %53 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %center.0.3.0, float* %53, align 4
- %54 = load %struct.btStridingMeshInterface** %10, align 4 ; [#uses=2]
- %55 = getelementptr inbounds %struct.btStridingMeshInterface* %54, i32 0, i32 0 ; [#uses=1]
- %56 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 2 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = load float* %8, align 8 ; [#uses=1]
- %60 = fsub float -0.000000e+00, %59 ; [#uses=1]
- %61 = load float* %7, align 4 ; [#uses=1]
- %62 = fsub float -0.000000e+00, %61 ; [#uses=1]
- %63 = load float* %6, align 8 ; [#uses=1]
- %64 = fsub float -0.000000e+00, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %64, float* %65, align 8
- %66 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %62, float* %66, align 4
- %67 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %60, float* %67, align 8
- %68 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %68, align 4
- %69 = bitcast i32 (...)* %58 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %70 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 0 ; [#uses=3]
- invoke void %69(%struct.btStridingMeshInterface* %54, %struct.btActionInterface* %70, %struct.btQuadWord* %0, %struct.btQuadWord* %aabbMax)
- to label %invcont2 unwind label %lpad14
-
-invcont2: ; preds = %invcont1
- %71 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 1 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %principal, i32 0, i32 0 ; [#uses=1]
- call void @_ZN11btMatrix3x311diagonalizeERS_fi(%struct.btMatrix3x3* %71, %struct.btMatrix3x3* %72, float 0x3EE4F8B580000000, i32 20) nounwind
- %73 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %74 = getelementptr inbounds %struct..1InertiaCallback* %inertiaCallback, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %48, align 4 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %75, float* %76, align 4
- %77 = load float* %74, align 4 ; [#uses=2]
- %78 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %77, float* %78, align 4
- %79 = load float* %73, align 4 ; [#uses=2]
- %80 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %79, float* %80, align 4
- %81 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %81, align 4
- %82 = load float* %volume, align 4 ; [#uses=1]
- %83 = fdiv float 1.000000e+00, %82 ; [#uses=3]
- %84 = fmul float %75, %83 ; [#uses=1]
- store float %84, float* %76, align 4
- %85 = fmul float %77, %83 ; [#uses=1]
- store float %85, float* %78, align 4
- %86 = fmul float %79, %83 ; [#uses=1]
- store float %86, float* %80, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback, i32 0, i32 2), i32 (...)*** %47, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %70)
- to label %bb11 unwind label %lpad
-
-invcont9: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb11: ; preds = %invcont2
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %21)
- ret void
-
-lpad: ; preds = %invcont2, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select13 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad14: ; preds = %invcont1
- %eh_ptr15 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr15, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE15InertiaCallback, i32 0, i32 2), i32 (...)*** %47, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %70)
- to label %ppad unwind label %lpad18
-
-lpad18: ; preds = %lpad14
- %eh_ptr19 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select21 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad22: ; preds = %ppad
- %eh_ptr23 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad14, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr15, %lpad14 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback, i32 0, i32 2), i32 (...)*** %2, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %21)
- to label %invcont9 unwind label %lpad22
-}
-
-; [#uses=0]
-define void @_ZZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfEN14CenterCallbackD2Ev(%struct..0CenterCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK25btConvexTriangleMeshShape31calculatePrincipalAxisTransformER11btTransformR9btVector3RfE14CenterCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0CenterCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btConvexTriangleMeshShapeC1EP23btStridingMeshInterfaceb(%struct.btConvexTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface, i8 zeroext %calcAabb) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV25btConvexTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btStridingMeshInterface* %meshInterface, %struct.btStridingMeshInterface** %2, align 4
- %3 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 3, i32* %3, align 4
- %toBool = icmp eq i8 %calcAabb, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %return unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb, %entry
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %4 = getelementptr inbounds %struct.btConvexTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %4)
- to label %invcont2 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN15btCylinderShapeC2ERK9btVector3(%struct.btCapsuleShape* %this, %struct.btQuadWord* nocapture %halfExtents) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV15btCylinderShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fsub float %9, %4 ; [#uses=1]
- %21 = fsub float %14, %4 ; [#uses=1]
- %22 = fsub float %19, %4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 13, i32* %27, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCylinderShape9setMarginEf(%struct.btCapsuleShape* %this, float %collisionMargin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=6]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %collisionMargin, float* %26, align 4
- %27 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 11 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %31 = tail call float %30(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %32 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 11 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %36 = tail call float %35(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %37 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 11 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %41 = tail call float %40(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %42 = fsub float %19, %31 ; [#uses=1]
- %43 = fsub float %22, %36 ; [#uses=1]
- %44 = fsub float %25, %41 ; [#uses=1]
- store float %44, float* %23, align 4
- store float %43, float* %20, align 4
- store float %42, float* %17, align 4
- %45 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZNK15btCylinderShape9getRadiusEv(%struct.btCapsuleShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 11 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=3]
- %7 = bitcast i32 (...)* %5 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %8 = tail call float %7(%struct.btConvexInternalShape* %6) ; [#uses=0]
- %9 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 11 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %13 = tail call float %12(%struct.btConvexInternalShape* %6) ; [#uses=0]
- %14 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 11 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %18 = tail call float %17(%struct.btConvexInternalShape* %6) ; [#uses=1]
- %19 = fadd float %1, %18 ; [#uses=1]
- ret float %19
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK15btCylinderShape7getNameEv(%struct.btCapsuleShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([10 x i8]* @.str85, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK16btCylinderShapeX7getNameEv(%struct.btCapsuleShapeX* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([10 x i8]* @.str186, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZNK16btCylinderShapeX9getRadiusEv(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 11 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = bitcast i32 (...)* %5 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %8 = tail call float %7(%struct.btConvexInternalShape* %6) ; [#uses=0]
- %9 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 11 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %13 = tail call float %12(%struct.btConvexInternalShape* %6) ; [#uses=1]
- %14 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 11 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %18 = tail call float %17(%struct.btConvexInternalShape* %6) ; [#uses=0]
- %19 = fadd float %1, %13 ; [#uses=1]
- ret float %19
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK16btCylinderShapeZ7getNameEv(%struct.btCapsuleShapeX* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([10 x i8]* @.str287, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZNK16btCylinderShapeZ9getRadiusEv(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 11 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = bitcast i32 (...)* %5 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %8 = tail call float %7(%struct.btConvexInternalShape* %6) ; [#uses=0]
- %9 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 11 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %13 = tail call float %12(%struct.btConvexInternalShape* %6) ; [#uses=0]
- %14 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 11 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %18 = tail call float %17(%struct.btConvexInternalShape* %6) ; [#uses=1]
- %19 = fadd float %1, %18 ; [#uses=1]
- ret float %19
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btCylinderShape28calculateSerializeBufferSizeEv(%struct.btCapsuleShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 60
-}
-
-; [#uses=1]
-define void @_ZNK15btCylinderShape7getAabbERK11btTransformR9btVector3S4_(%struct.btCapsuleShape* %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=3]
- %7 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fadd float %8, %6 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fadd float %11, %6 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fadd float %14, %6 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = tail call float @fabsf(float %17) nounwind readnone ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = tail call float @fabsf(float %20) nounwind readnone ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = tail call float @fabsf(float %23) nounwind readnone ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = tail call float @fabsf(float %26) nounwind readnone ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = tail call float @fabsf(float %29) nounwind readnone ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = tail call float @fabsf(float %32) nounwind readnone ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = tail call float @fabsf(float %35) nounwind readnone ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = tail call float @fabsf(float %38) nounwind readnone ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = tail call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=2]
- %49 = fmul float %24, %15 ; [#uses=1]
- %50 = fmul float %21, %12 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fmul float %18, %9 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=2]
- %54 = fmul float %33, %15 ; [#uses=1]
- %55 = fmul float %30, %12 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %27, %9 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=2]
- %59 = fmul float %42, %15 ; [#uses=1]
- %60 = fmul float %39, %12 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %36, %9 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=2]
- %64 = fsub float %48, %53 ; [#uses=1]
- %65 = fsub float %46, %58 ; [#uses=1]
- %66 = fsub float %44, %63 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %66, float* %67, align 4
- %68 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %65, float* %68, align 4
- %69 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %64, float* %69, align 4
- %70 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %70, align 4
- %71 = fadd float %48, %53 ; [#uses=1]
- %72 = fadd float %46, %58 ; [#uses=1]
- %73 = fadd float %44, %63 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %73, float* %74, align 4
- %75 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %75, align 4
- %76 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %71, float* %76, align 4
- %77 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %77, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btCylinderShape21calculateLocalInertiaEfR9btVector3(%struct.btCapsuleShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=3]
- %11 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %12 = tail call float %11(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %13 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 11 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %17 = tail call float %16(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %18 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 11 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %22 = tail call float %21(%struct.btConvexInternalShape* %10) ; [#uses=1]
- %23 = fadd float %1, %22 ; [#uses=1]
- %24 = fadd float %3, %17 ; [#uses=1]
- %25 = fadd float %5, %12 ; [#uses=1]
- %26 = fmul float %23, 2.000000e+00 ; [#uses=2]
- %27 = fmul float %24, 2.000000e+00 ; [#uses=2]
- %28 = fmul float %25, 2.000000e+00 ; [#uses=2]
- %29 = fdiv float %mass, 1.200000e+01 ; [#uses=3]
- %30 = fmul float %26, %26 ; [#uses=2]
- %31 = fmul float %27, %27 ; [#uses=2]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %29, %32 ; [#uses=1]
- %34 = fmul float %28, %28 ; [#uses=2]
- %35 = fadd float %30, %34 ; [#uses=1]
- %36 = fmul float %29, %35 ; [#uses=1]
- %37 = fadd float %31, %34 ; [#uses=1]
- %38 = fmul float %29, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %38, float* %39, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %36, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %33, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCylinderShapeD0Ev(%struct.btCapsuleShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btCapsuleShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCylinderShapeD1Ev(%struct.btCapsuleShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btCylinderShape15setLocalScalingERK9btVector3(%struct.btCapsuleShape* %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=4]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConvexInternalShape* %4) ; [#uses=2]
- %17 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fadd float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fdiv float %19, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fdiv float %22, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fdiv float %25, %33 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3(%struct.btConvexInternalShape* %4, %struct.btQuadWord* %scaling)
- %35 = load float* %26, align 4 ; [#uses=1]
- %36 = fmul float %28, %35 ; [#uses=1]
- %37 = load float* %29, align 4 ; [#uses=1]
- %38 = fmul float %31, %37 ; [#uses=1]
- %39 = load float* %32, align 4 ; [#uses=1]
- %40 = fmul float %34, %39 ; [#uses=1]
- %41 = fsub float %36, %6 ; [#uses=1]
- %42 = fsub float %38, %11 ; [#uses=1]
- %43 = fsub float %40, %16 ; [#uses=1]
- store float %43, float* %23, align 4
- store float %42, float* %20, align 4
- store float %41, float* %17, align 4
- %44 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK15btCylinderShape9serializeEPvP12btSerializer(%struct.btCapsuleShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 28 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %3 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 32 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %5 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.2.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %7 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.3.i.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %9 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %9, float* %8, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %scevgep.i2.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3.i = bitcast i8* %10 to float* ; [#uses=1]
- %11 = load float* %scevgep.i2.i, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.i3.i, align 4
- %scevgep.1.i4.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5.i = getelementptr i8* %dataBuffer, i32 16 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.1.i5.i to float* ; [#uses=1]
- %13 = load float* %scevgep.1.i4.i, align 4 ; [#uses=1]
- store float %13, float* %12, align 4
- %scevgep.2.i6.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7.i = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %14 = bitcast i8* %scevgep4.2.i7.i to float* ; [#uses=1]
- %15 = load float* %scevgep.2.i6.i, align 4 ; [#uses=1]
- store float %15, float* %14, align 4
- %scevgep.3.i8.i = getelementptr %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9.i = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.3.i9.i to float* ; [#uses=1]
- %17 = load float* %scevgep.3.i8.i, align 4 ; [#uses=1]
- store float %17, float* %16, align 4
- %18 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %21 = bitcast i8* %20 to float* ; [#uses=1]
- store float %19, float* %21, align 4
- %22 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %25 = bitcast i8* %24 to i32* ; [#uses=1]
- store i32 %23, i32* %25, align 4
- ret i8* getelementptr inbounds ([20 x i8]* @.str488, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK15btCylinderShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btCapsuleShape* %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btQuadWord*, %struct.btCapsuleShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %4(%struct.btQuadWord* noalias sret %memtmp, %struct.btCapsuleShape* %this, %struct.btQuadWord* %vec)
- %5 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 8 ; [#uses=2]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 8 ; [#uses=2]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 11 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=2]
- %21 = bitcast i32 (...)* %19 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %22 = call float %21(%struct.btConvexInternalShape* %20) ; [#uses=1]
- %23 = fcmp une float %22, 0.000000e+00 ; [#uses=1]
- br i1 %23, label %bb, label %return
-
-bb: ; preds = %entry
- %24 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=3]
- %28 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=3]
- %30 = fmul float %25, %25 ; [#uses=1]
- %31 = fmul float %27, %27 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %29, %29 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=1]
- %35 = fcmp olt float %34, 0x3D10000000000000 ; [#uses=3]
- %vecnorm.0.0.0 = select i1 %35, float -1.000000e+00, float %25 ; [#uses=3]
- %vecnorm.0.1.0 = select i1 %35, float -1.000000e+00, float %27 ; [#uses=3]
- %vecnorm.0.2.0 = select i1 %35, float -1.000000e+00, float %29 ; [#uses=3]
- %36 = fmul float %vecnorm.0.0.0, %vecnorm.0.0.0 ; [#uses=1]
- %37 = fmul float %vecnorm.0.1.0, %vecnorm.0.1.0 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = fmul float %vecnorm.0.2.0, %vecnorm.0.2.0 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = call float @sqrtf(float %40) nounwind readonly ; [#uses=1]
- %42 = fdiv float 1.000000e+00, %41 ; [#uses=3]
- %43 = fmul float %vecnorm.0.0.0, %42 ; [#uses=1]
- %44 = fmul float %vecnorm.0.1.0, %42 ; [#uses=1]
- %45 = fmul float %vecnorm.0.2.0, %42 ; [#uses=1]
- %46 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %47 = getelementptr inbounds i32 (...)** %46, i32 11 ; [#uses=1]
- %48 = load i32 (...)** %47, align 4 ; [#uses=1]
- %49 = bitcast i32 (...)* %48 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %50 = call float %49(%struct.btConvexInternalShape* %20) ; [#uses=3]
- %51 = fmul float %45, %50 ; [#uses=1]
- %52 = fmul float %44, %50 ; [#uses=1]
- %53 = fmul float %43, %50 ; [#uses=1]
- %54 = fadd float %7, %53 ; [#uses=1]
- store float %54, float* %5, align 4
- %55 = fadd float %10, %52 ; [#uses=1]
- store float %55, float* %8, align 4
- %56 = fadd float %13, %51 ; [#uses=1]
- store float %56, float* %11, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btCylinderShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btCapsuleShape* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = fmul float %5, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = fadd float %6, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=2]
- %12 = fcmp une float %11, 0.000000e+00 ; [#uses=1]
- br i1 %12, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %entry
- %13 = fdiv float %1, %11 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = fmul float %5, %13 ; [#uses=1]
- store float %15, float* %14, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fcmp olt float %17, 0.000000e+00 ; [#uses=1]
- br i1 %18, label %bb1.i, label %bb3.i
-
-bb1.i: ; preds = %bb.i
- %19 = fsub float -0.000000e+00, %3 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %iftmp.143.0.i = phi float [ %19, %bb1.i ], [ %3, %bb.i ] ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.143.0.i, float* %20, align 4
- %21 = fmul float %8, %13 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %22, align 4
- ret void
-
-bb4.i: ; preds = %entry
- %23 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fcmp olt float %25, 0.000000e+00 ; [#uses=1]
- br i1 %26, label %bb5.i, label %bb7.i
-
-bb5.i: ; preds = %bb4.i
- %27 = fsub float -0.000000e+00, %3 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb5.i, %bb4.i
- %iftmp.144.0.i = phi float [ %27, %bb5.i ], [ %3, %bb4.i ] ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.144.0.i, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK15btCylinderShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btCapsuleShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_Z21CylinderLocalSupportYRK9btVector3S1_.exit, %bb.nph
- %i.06 = phi i32 [ 0, %bb.nph ], [ %21, %_Z21CylinderLocalSupportYRK9btVector3S1_.exit ] ; [#uses=7]
- %scevgep7 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 0 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 1 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 2 ; [#uses=1]
- %scevgep1011 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 0 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 2 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 1 ; [#uses=2]
- %3 = load float* %1, align 4 ; [#uses=3]
- %4 = load float* %2, align 4 ; [#uses=4]
- %5 = load float* %scevgep1011, align 4 ; [#uses=3]
- %6 = fmul float %5, %5 ; [#uses=1]
- %7 = load float* %scevgep12, align 4 ; [#uses=3]
- %8 = fmul float %7, %7 ; [#uses=1]
- %9 = fadd float %6, %8 ; [#uses=1]
- %10 = tail call float @sqrtf(float %9) nounwind readonly ; [#uses=2]
- %11 = fcmp une float %10, 0.000000e+00 ; [#uses=1]
- br i1 %11, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb
- %12 = fdiv float %3, %10 ; [#uses=2]
- %13 = fmul float %5, %12 ; [#uses=1]
- %14 = load float* %scevgep13, align 4 ; [#uses=1]
- %15 = fcmp olt float %14, 0.000000e+00 ; [#uses=1]
- br i1 %15, label %bb1.i, label %bb3.i
-
-bb1.i: ; preds = %bb.i
- %16 = fsub float -0.000000e+00, %4 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %iftmp.143.0.i = phi float [ %16, %bb1.i ], [ %4, %bb.i ] ; [#uses=1]
- %17 = fmul float %7, %12 ; [#uses=1]
- br label %_Z21CylinderLocalSupportYRK9btVector3S1_.exit
-
-bb4.i: ; preds = %bb
- %18 = load float* %scevgep13, align 4 ; [#uses=1]
- %19 = fcmp olt float %18, 0.000000e+00 ; [#uses=1]
- br i1 %19, label %bb5.i, label %_Z21CylinderLocalSupportYRK9btVector3S1_.exit
-
-bb5.i: ; preds = %bb4.i
- %20 = fsub float -0.000000e+00, %4 ; [#uses=1]
- br label %_Z21CylinderLocalSupportYRK9btVector3S1_.exit
-
-_Z21CylinderLocalSupportYRK9btVector3S1_.exit: ; preds = %bb5.i, %bb4.i, %bb3.i
- %memtmp.0.2.0 = phi float [ %17, %bb3.i ], [ 0.000000e+00, %bb5.i ], [ 0.000000e+00, %bb4.i ] ; [#uses=1]
- %memtmp.0.1.0 = phi float [ %iftmp.143.0.i, %bb3.i ], [ %20, %bb5.i ], [ %4, %bb4.i ] ; [#uses=1]
- %memtmp.0.0.0 = phi float [ %13, %bb3.i ], [ %3, %bb5.i ], [ %3, %bb4.i ] ; [#uses=1]
- store float %memtmp.0.0.0, float* %scevgep7, align 4
- store float %memtmp.0.1.0, float* %scevgep8, align 4
- store float %memtmp.0.2.0, float* %scevgep9, align 4
- %21 = add nsw i32 %i.06, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %21, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %_Z21CylinderLocalSupportYRK9btVector3S1_.exit, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCylinderShapeXD0Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btCapsuleShapeX* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCylinderShapeXD1Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btCylinderShapeX37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btCapsuleShapeX* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = fmul float %5, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = fadd float %6, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=2]
- %12 = fcmp une float %11, 0.000000e+00 ; [#uses=1]
- br i1 %12, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %entry
- %13 = fdiv float %1, %11 ; [#uses=2]
- %14 = fmul float %5, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %14, float* %15, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp olt float %18, 0.000000e+00 ; [#uses=1]
- br i1 %19, label %bb1.i, label %bb3.i
-
-bb1.i: ; preds = %bb.i
- %20 = fsub float -0.000000e+00, %3 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %iftmp.141.0.i = phi float [ %20, %bb1.i ], [ %3, %bb.i ] ; [#uses=1]
- store float %iftmp.141.0.i, float* %16, align 4
- %21 = fmul float %8, %13 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %22, align 4
- ret void
-
-bb4.i: ; preds = %entry
- %23 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fcmp olt float %26, 0.000000e+00 ; [#uses=1]
- br i1 %27, label %bb5.i, label %bb7.i
-
-bb5.i: ; preds = %bb4.i
- %28 = fsub float -0.000000e+00, %3 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb5.i, %bb4.i
- %iftmp.142.0.i = phi float [ %28, %bb5.i ], [ %3, %bb4.i ] ; [#uses=1]
- store float %iftmp.142.0.i, float* %24, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btCylinderShapeX49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btCapsuleShapeX* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_Z21CylinderLocalSupportXRK9btVector3S1_.exit, %bb.nph
- %i.06 = phi i32 [ 0, %bb.nph ], [ %21, %_Z21CylinderLocalSupportXRK9btVector3S1_.exit ] ; [#uses=7]
- %scevgep7 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 0 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 1 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 2 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 1 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 2 ; [#uses=1]
- %scevgep1213 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 0 ; [#uses=2]
- %3 = load float* %1, align 4 ; [#uses=3]
- %4 = load float* %2, align 4 ; [#uses=4]
- %5 = load float* %scevgep10, align 4 ; [#uses=3]
- %6 = fmul float %5, %5 ; [#uses=1]
- %7 = load float* %scevgep11, align 4 ; [#uses=3]
- %8 = fmul float %7, %7 ; [#uses=1]
- %9 = fadd float %6, %8 ; [#uses=1]
- %10 = tail call float @sqrtf(float %9) nounwind readonly ; [#uses=2]
- %11 = fcmp une float %10, 0.000000e+00 ; [#uses=1]
- br i1 %11, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb
- %12 = fdiv float %3, %10 ; [#uses=2]
- %13 = fmul float %5, %12 ; [#uses=1]
- %14 = load float* %scevgep1213, align 4 ; [#uses=1]
- %15 = fcmp olt float %14, 0.000000e+00 ; [#uses=1]
- br i1 %15, label %bb1.i, label %bb3.i
-
-bb1.i: ; preds = %bb.i
- %16 = fsub float -0.000000e+00, %4 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %iftmp.141.0.i = phi float [ %16, %bb1.i ], [ %4, %bb.i ] ; [#uses=1]
- %17 = fmul float %7, %12 ; [#uses=1]
- br label %_Z21CylinderLocalSupportXRK9btVector3S1_.exit
-
-bb4.i: ; preds = %bb
- %18 = load float* %scevgep1213, align 4 ; [#uses=1]
- %19 = fcmp olt float %18, 0.000000e+00 ; [#uses=1]
- br i1 %19, label %bb5.i, label %_Z21CylinderLocalSupportXRK9btVector3S1_.exit
-
-bb5.i: ; preds = %bb4.i
- %20 = fsub float -0.000000e+00, %4 ; [#uses=1]
- br label %_Z21CylinderLocalSupportXRK9btVector3S1_.exit
-
-_Z21CylinderLocalSupportXRK9btVector3S1_.exit: ; preds = %bb5.i, %bb4.i, %bb3.i
- %memtmp.0.2.0 = phi float [ %17, %bb3.i ], [ 0.000000e+00, %bb5.i ], [ 0.000000e+00, %bb4.i ] ; [#uses=1]
- %memtmp.0.1.0 = phi float [ %13, %bb3.i ], [ %3, %bb5.i ], [ %3, %bb4.i ] ; [#uses=1]
- %memtmp.0.0.0 = phi float [ %iftmp.141.0.i, %bb3.i ], [ %20, %bb5.i ], [ %4, %bb4.i ] ; [#uses=1]
- store float %memtmp.0.0.0, float* %scevgep7, align 4
- store float %memtmp.0.1.0, float* %scevgep8, align 4
- store float %memtmp.0.2.0, float* %scevgep9, align 4
- %21 = add nsw i32 %i.06, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %21, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %_Z21CylinderLocalSupportXRK9btVector3S1_.exit, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCylinderShapeZD0Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btCapsuleShapeX* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCylinderShapeZD1Ev(%struct.btCapsuleShapeX* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btCylinderShapeZ37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btCapsuleShapeX* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = fmul float %5, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = fadd float %6, %9 ; [#uses=1]
- %11 = tail call float @sqrtf(float %10) nounwind readonly ; [#uses=2]
- %12 = fcmp une float %11, 0.000000e+00 ; [#uses=1]
- br i1 %12, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %entry
- %13 = fdiv float %1, %11 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = fmul float %5, %13 ; [#uses=1]
- store float %15, float* %14, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fcmp olt float %17, 0.000000e+00 ; [#uses=1]
- br i1 %18, label %bb1.i, label %bb3.i
-
-bb1.i: ; preds = %bb.i
- %19 = fsub float -0.000000e+00, %3 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %iftmp.145.0.i = phi float [ %19, %bb1.i ], [ %3, %bb.i ] ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.145.0.i, float* %20, align 4
- %21 = fmul float %8, %13 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %22, align 4
- ret void
-
-bb4.i: ; preds = %entry
- %23 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fcmp olt float %25, 0.000000e+00 ; [#uses=1]
- br i1 %26, label %bb5.i, label %bb7.i
-
-bb5.i: ; preds = %bb4.i
- %27 = fsub float -0.000000e+00, %3 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb5.i, %bb4.i
- %iftmp.146.0.i = phi float [ %27, %bb5.i ], [ %3, %bb4.i ] ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.146.0.i, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btCylinderShapeZ49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btCapsuleShapeX* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_Z21CylinderLocalSupportZRK9btVector3S1_.exit, %bb.nph
- %i.06 = phi i32 [ 0, %bb.nph ], [ %21, %_Z21CylinderLocalSupportZRK9btVector3S1_.exit ] ; [#uses=7]
- %scevgep7 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 0 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 1 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.06, i32 0, i32 2 ; [#uses=1]
- %scevgep1011 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 0 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 1 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btQuadWord* %vectors, i32 %i.06, i32 0, i32 2 ; [#uses=2]
- %3 = load float* %1, align 4 ; [#uses=3]
- %4 = load float* %2, align 4 ; [#uses=4]
- %5 = load float* %scevgep1011, align 4 ; [#uses=3]
- %6 = fmul float %5, %5 ; [#uses=1]
- %7 = load float* %scevgep12, align 4 ; [#uses=3]
- %8 = fmul float %7, %7 ; [#uses=1]
- %9 = fadd float %6, %8 ; [#uses=1]
- %10 = tail call float @sqrtf(float %9) nounwind readonly ; [#uses=2]
- %11 = fcmp une float %10, 0.000000e+00 ; [#uses=1]
- br i1 %11, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb
- %12 = fdiv float %3, %10 ; [#uses=2]
- %13 = fmul float %5, %12 ; [#uses=1]
- %14 = load float* %scevgep13, align 4 ; [#uses=1]
- %15 = fcmp olt float %14, 0.000000e+00 ; [#uses=1]
- br i1 %15, label %bb1.i, label %bb3.i
-
-bb1.i: ; preds = %bb.i
- %16 = fsub float -0.000000e+00, %4 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %iftmp.145.0.i = phi float [ %16, %bb1.i ], [ %4, %bb.i ] ; [#uses=1]
- %17 = fmul float %7, %12 ; [#uses=1]
- br label %_Z21CylinderLocalSupportZRK9btVector3S1_.exit
-
-bb4.i: ; preds = %bb
- %18 = load float* %scevgep13, align 4 ; [#uses=1]
- %19 = fcmp olt float %18, 0.000000e+00 ; [#uses=1]
- br i1 %19, label %bb5.i, label %_Z21CylinderLocalSupportZRK9btVector3S1_.exit
-
-bb5.i: ; preds = %bb4.i
- %20 = fsub float -0.000000e+00, %4 ; [#uses=1]
- br label %_Z21CylinderLocalSupportZRK9btVector3S1_.exit
-
-_Z21CylinderLocalSupportZRK9btVector3S1_.exit: ; preds = %bb5.i, %bb4.i, %bb3.i
- %memtmp.0.2.0 = phi float [ %iftmp.145.0.i, %bb3.i ], [ %20, %bb5.i ], [ %4, %bb4.i ] ; [#uses=1]
- %memtmp.0.1.0 = phi float [ %17, %bb3.i ], [ 0.000000e+00, %bb5.i ], [ 0.000000e+00, %bb4.i ] ; [#uses=1]
- %memtmp.0.0.0 = phi float [ %13, %bb3.i ], [ %3, %bb5.i ], [ %3, %bb4.i ] ; [#uses=1]
- store float %memtmp.0.0.0, float* %scevgep7, align 4
- store float %memtmp.0.1.0, float* %scevgep8, align 4
- store float %memtmp.0.2.0, float* %scevgep9, align 4
- %21 = add nsw i32 %i.06, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %21, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %_Z21CylinderLocalSupportZRK9btVector3S1_.exit, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btCylinderShapeZC1ERK9btVector3(%struct.btCapsuleShapeX* %this, %struct.btQuadWord* nocapture %halfExtents) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV15btCylinderShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fsub float %9, %4 ; [#uses=1]
- %21 = fsub float %14, %4 ; [#uses=1]
- %22 = fsub float %19, %4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 13, i32* %27, align 4
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV16btCylinderShapeZ, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 2, i32* %2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btCylinderShapeZC2ERK9btVector3(%struct.btCapsuleShapeX* %this, %struct.btQuadWord* nocapture %halfExtents) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV15btCylinderShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fsub float %9, %4 ; [#uses=1]
- %21 = fsub float %14, %4 ; [#uses=1]
- %22 = fsub float %19, %4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 13, i32* %27, align 4
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV16btCylinderShapeZ, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 2, i32* %2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btCylinderShapeXC1ERK9btVector3(%struct.btCapsuleShapeX* %this, %struct.btQuadWord* nocapture %halfExtents) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV15btCylinderShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fsub float %9, %4 ; [#uses=1]
- %21 = fsub float %14, %4 ; [#uses=1]
- %22 = fsub float %19, %4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 13, i32* %27, align 4
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV16btCylinderShapeX, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 0, i32* %2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btCylinderShapeXC2ERK9btVector3(%struct.btCapsuleShapeX* %this, %struct.btQuadWord* nocapture %halfExtents) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV15btCylinderShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fsub float %9, %4 ; [#uses=1]
- %21 = fsub float %14, %4 ; [#uses=1]
- %22 = fsub float %19, %4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCapsuleShapeX* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 13, i32* %27, align 4
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV16btCylinderShapeX, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 0, i32* %2, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15btCylinderShapeC1ERK9btVector3(%struct.btCapsuleShape* %this, %struct.btQuadWord* nocapture %halfExtents) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([24 x i32 (...)*]* @_ZTV15btCylinderShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %halfExtents, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fsub float %9, %4 ; [#uses=1]
- %21 = fsub float %14, %4 ; [#uses=1]
- %22 = fsub float %19, %4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %24, align 4
- %25 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %25, align 4
- %26 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btCapsuleShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 13, i32* %27, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btEmptyShapeC2Ev(%struct.btEmptyShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV12btEmptyShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 27, i32* %2, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN12btEmptyShape15setLocalScalingERK9btVector3(%struct.btEmptyShape* nocapture %this, %struct.btQuadWord* nocapture %scaling) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btQuadWord* @_ZNK12btEmptyShape15getLocalScalingEv(%struct.btEmptyShape* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 1 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK12btEmptyShape7getNameEv(%struct.btEmptyShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([6 x i8]* @.str89, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12btEmptyShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btEmptyShape* nocapture %this, %struct.btActionInterface* nocapture %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2, %struct.btQuadWord* nocapture %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK12btEmptyShape7getAabbERK11btTransformR9btVector3S4_(%struct.btEmptyShape* %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0 ; [#uses=3]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConcaveShape* %4) ; [#uses=2]
- %7 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %11 = tail call float %10(%struct.btConcaveShape* %4) ; [#uses=2]
- %12 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 11 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = bitcast i32 (...)* %14 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %16 = tail call float %15(%struct.btConcaveShape* %4) ; [#uses=2]
- %17 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fsub float %18, %6 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fsub float %21, %11 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fsub float %24, %16 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %25, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %22, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = load float* %17, align 4 ; [#uses=1]
- %31 = fadd float %30, %6 ; [#uses=1]
- %32 = load float* %20, align 4 ; [#uses=1]
- %33 = fadd float %32, %11 ; [#uses=1]
- %34 = load float* %23, align 4 ; [#uses=1]
- %35 = fadd float %34, %16 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %35, float* %36, align 4
- %37 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %33, float* %37, align 4
- %38 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %31, float* %38, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK12btEmptyShape21calculateLocalInertiaEfR9btVector3(%struct.btEmptyShape* nocapture %this, float %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN12btEmptyShapeD0Ev(%struct.btEmptyShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV12btEmptyShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- %2 = bitcast %struct.btEmptyShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN12btEmptyShapeD1Ev(%struct.btEmptyShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV12btEmptyShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btEmptyShapeD2Ev(%struct.btEmptyShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV12btEmptyShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btEmptyShapeC1Ev(%struct.btEmptyShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV12btEmptyShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btEmptyShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 27, i32* %2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btHeightfieldTerrainShapeC2EiiPvfffi14PHY_ScalarTypeb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %heightScale, float %minHeight, float %maxHeight, i32 %upAxis, i32 %hdt, i8 zeroext %flipQuadEdges) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV25btHeightfieldTerrainShape, i32 0, i32 2), i32 (...)*** %1, align 4
- tail call void @_ZN25btHeightfieldTerrainShape10initializeEiiPvfffi14PHY_ScalarTypeb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %heightScale, float %minHeight, float %maxHeight, i32 %upAxis, i32 %hdt, i8 zeroext %flipQuadEdges) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK25btHeightfieldTerrainShape7getNameEv(%struct.btHeightfieldTerrainShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([12 x i8]* @.str90, i32 0, i32 0)
-}
-
-; [#uses=4]
-define void @_ZN25btHeightfieldTerrainShape10initializeEiiPvfffi14PHY_ScalarTypeb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %heightScale, float %minHeight, float %maxHeight, i32 %upAxis, i32 %hdt, i8 zeroext %flipQuadEdges) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 24, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 4 ; [#uses=1]
- store i32 %heightStickWidth, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 5 ; [#uses=1]
- store i32 %heightStickLength, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 6 ; [#uses=1]
- store float %minHeight, float* %3, align 4
- %4 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 7 ; [#uses=1]
- store float %maxHeight, float* %4, align 4
- %5 = add nsw i32 %heightStickWidth, -1 ; [#uses=1]
- %6 = sitofp i32 %5 to float ; [#uses=7]
- %7 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 8 ; [#uses=1]
- store float %6, float* %7, align 4
- %8 = add nsw i32 %heightStickLength, -1 ; [#uses=1]
- %9 = sitofp i32 %8 to float ; [#uses=7]
- %10 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 9 ; [#uses=1]
- store float %9, float* %10, align 4
- %11 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 10 ; [#uses=1]
- store float %heightScale, float* %11, align 4
- %12 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 11, i32 0 ; [#uses=1]
- store i8* %heightfieldData, i8** %12, align 4
- %13 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 12 ; [#uses=1]
- store i32 %hdt, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 13 ; [#uses=1]
- store i8 %flipQuadEdges, i8* %14, align 4
- %15 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 14 ; [#uses=1]
- store i8 0, i8* %15, align 1
- %16 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 15 ; [#uses=1]
- store i32 %upAxis, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- switch i32 %upAxis, label %entry.bb3_crit_edge [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- ]
-
-entry.bb3_crit_edge: ; preds = %entry
- %.phi.trans.insert = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- %.phi.trans.insert8 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %.pre9 = load float* %.phi.trans.insert8, align 4 ; [#uses=1]
- %.phi.trans.insert10 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre11 = load float* %.phi.trans.insert10, align 4 ; [#uses=1]
- %.phi.trans.insert12 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %.pre13 = load float* %.phi.trans.insert12, align 4 ; [#uses=1]
- %.phi.trans.insert14 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre15 = load float* %.phi.trans.insert14, align 4 ; [#uses=1]
- %.phi.trans.insert16 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %.pre17 = load float* %.phi.trans.insert16, align 4 ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %entry
- %21 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %minHeight, float* %21, align 4
- %22 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %maxHeight, float* %25, align 4
- %26 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %6, float* %26, align 4
- %27 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %9, float* %27, align 4
- %28 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- br label %bb3
-
-bb1: ; preds = %entry
- %29 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %minHeight, float* %30, align 4
- %31 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %6, float* %33, align 4
- %34 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %maxHeight, float* %34, align 4
- %35 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %9, float* %35, align 4
- %36 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- br label %bb3
-
-bb2: ; preds = %entry
- %37 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- %39 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %minHeight, float* %39, align 4
- %40 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 4
- %41 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %6, float* %41, align 4
- %42 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %9, float* %42, align 4
- %43 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %maxHeight, float* %43, align 4
- %44 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1, %bb, %entry.bb3_crit_edge
- %45 = phi float [ %.pre17, %entry.bb3_crit_edge ], [ %6, %bb2 ], [ %6, %bb1 ], [ %maxHeight, %bb ] ; [#uses=1]
- %46 = phi float [ %.pre15, %entry.bb3_crit_edge ], [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb1 ], [ %minHeight, %bb ] ; [#uses=1]
- %47 = phi float [ %.pre13, %entry.bb3_crit_edge ], [ %9, %bb2 ], [ %maxHeight, %bb1 ], [ %6, %bb ] ; [#uses=1]
- %48 = phi float [ %.pre11, %entry.bb3_crit_edge ], [ 0.000000e+00, %bb2 ], [ %minHeight, %bb1 ], [ 0.000000e+00, %bb ] ; [#uses=1]
- %49 = phi float [ %.pre9, %entry.bb3_crit_edge ], [ %maxHeight, %bb2 ], [ %9, %bb1 ], [ %9, %bb ] ; [#uses=1]
- %50 = phi float [ %.pre, %entry.bb3_crit_edge ], [ %minHeight, %bb2 ], [ 0.000000e+00, %bb1 ], [ 0.000000e+00, %bb ] ; [#uses=1]
- %51 = fadd float %50, %49 ; [#uses=1]
- %52 = fadd float %48, %47 ; [#uses=1]
- %53 = fadd float %46, %45 ; [#uses=1]
- %54 = fmul float %51, 5.000000e-01 ; [#uses=1]
- %55 = fmul float %52, 5.000000e-01 ; [#uses=1]
- %56 = fmul float %53, 5.000000e-01 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %55, float* %58, align 4
- %59 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %54, float* %59, align 4
- %60 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK25btHeightfieldTerrainShape7getAabbERK11btTransformR9btVector3S4_(%struct.btHeightfieldTerrainShape* %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %4, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fmul float %9, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %14, %22 ; [#uses=1]
- %24 = fmul float %17, 5.000000e-01 ; [#uses=3]
- %25 = fmul float %20, 5.000000e-01 ; [#uses=3]
- %26 = fmul float %23, 5.000000e-01 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = call float @fabsf(float %28) nounwind readnone ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = call float @fabsf(float %31) nounwind readnone ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = call float @fabsf(float %34) nounwind readnone ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = call float @fabsf(float %37) nounwind readnone ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = call float @fabsf(float %40) nounwind readnone ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = call float @fabsf(float %43) nounwind readnone ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = call float @fabsf(float %46) nounwind readnone ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = call float @fabsf(float %49) nounwind readnone ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = call float @fabsf(float %52) nounwind readnone ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=2]
- %56 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=2]
- %58 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = fmul float %35, %26 ; [#uses=1]
- %61 = fmul float %32, %25 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %29, %24 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %44, %26 ; [#uses=1]
- %66 = fmul float %41, %25 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=1]
- %68 = fmul float %38, %24 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %53, %26 ; [#uses=1]
- %71 = fmul float %50, %25 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fmul float %47, %24 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %76 = load i32 (...)*** %75, align 4 ; [#uses=1]
- %77 = getelementptr inbounds i32 (...)** %76, i32 11 ; [#uses=1]
- %78 = load i32 (...)** %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=3]
- %80 = bitcast i32 (...)* %78 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %81 = call float %80(%struct.btConcaveShape* %79) ; [#uses=1]
- %82 = load i32 (...)*** %75, align 4 ; [#uses=1]
- %83 = getelementptr inbounds i32 (...)** %82, i32 11 ; [#uses=1]
- %84 = load i32 (...)** %83, align 4 ; [#uses=1]
- %85 = bitcast i32 (...)* %84 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %86 = call float %85(%struct.btConcaveShape* %79) ; [#uses=1]
- %87 = load i32 (...)*** %75, align 4 ; [#uses=1]
- %88 = getelementptr inbounds i32 (...)** %87, i32 11 ; [#uses=1]
- %89 = load i32 (...)** %88, align 4 ; [#uses=1]
- %90 = bitcast i32 (...)* %89 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %91 = call float %90(%struct.btConcaveShape* %79) ; [#uses=1]
- %92 = fadd float %74, %91 ; [#uses=2]
- %93 = fadd float %69, %86 ; [#uses=2]
- %94 = fadd float %64, %81 ; [#uses=2]
- %95 = fsub float %59, %94 ; [#uses=1]
- %96 = fsub float %57, %93 ; [#uses=1]
- %97 = fsub float %55, %92 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %97, float* %98, align 4
- %99 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %96, float* %99, align 4
- %100 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %95, float* %100, align 4
- %101 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %101, align 4
- %102 = fadd float %59, %94 ; [#uses=1]
- %103 = fadd float %57, %93 ; [#uses=1]
- %104 = fadd float %55, %92 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %104, float* %105, align 4
- %106 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %103, float* %106, align 4
- %107 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %102, float* %107, align 4
- %108 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %108, align 4
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK25btHeightfieldTerrainShape22getRawHeightFieldValueEii(%struct.btHeightfieldTerrainShape* nocapture %this, i32 %x, i32 %y) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- switch i32 %1, label %bb3 [
- i32 0, label %bb
- i32 3, label %bb2
- i32 5, label %bb1
- ]
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 11, i32 0 ; [#uses=1]
- %3 = load i8** %2, align 4 ; [#uses=1]
- %4 = bitcast i8* %3 to float* ; [#uses=1]
- %5 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 4 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = mul nsw i32 %6, %y ; [#uses=1]
- %8 = add nsw i32 %7, %x ; [#uses=1]
- %9 = getelementptr inbounds float* %4, i32 %8 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- ret float %10
-
-bb1: ; preds = %entry
- %11 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 11, i32 0 ; [#uses=1]
- %12 = load i8** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 4 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %15 = mul nsw i32 %14, %y ; [#uses=1]
- %16 = add nsw i32 %15, %x ; [#uses=1]
- %17 = getelementptr inbounds i8* %12, i32 %16 ; [#uses=1]
- %18 = load i8* %17, align 1 ; [#uses=1]
- %19 = zext i8 %18 to i32 ; [#uses=1]
- %20 = sitofp i32 %19 to float ; [#uses=1]
- %21 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 10 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %20, %22 ; [#uses=1]
- ret float %23
-
-bb2: ; preds = %entry
- %24 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 11, i32 0 ; [#uses=1]
- %25 = load i8** %24, align 4 ; [#uses=1]
- %26 = bitcast i8* %25 to i16* ; [#uses=1]
- %27 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 4 ; [#uses=1]
- %28 = load i32* %27, align 4 ; [#uses=1]
- %29 = mul nsw i32 %28, %y ; [#uses=1]
- %30 = add nsw i32 %29, %x ; [#uses=1]
- %31 = getelementptr inbounds i16* %26, i32 %30 ; [#uses=1]
- %32 = load i16* %31, align 2 ; [#uses=1]
- %33 = sitofp i16 %32 to float ; [#uses=1]
- %34 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 10 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fmul float %33, %35 ; [#uses=1]
- ret float %36
-
-bb3: ; preds = %entry
- ret float 0.000000e+00
-}
-
-; [#uses=12]
-define void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %x, i32 %y, %struct.btQuadWord* nocapture %vertex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to float (%struct.btHeightfieldTerrainShape*, i32, i32)* ; [#uses=1]
- %5 = tail call float %4(%struct.btHeightfieldTerrainShape* %this, i32 %x, i32 %y) ; [#uses=3]
- %6 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 15 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- switch i32 %7, label %entry.bb3_crit_edge [
- i32 0, label %bb
- i32 1, label %bb1
- i32 2, label %bb2
- ]
-
-entry.bb3_crit_edge: ; preds = %entry
- %.phi.trans.insert = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- %.phi.trans.insert4 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre5 = load float* %.phi.trans.insert4, align 4 ; [#uses=1]
- %.phi.trans.insert6 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre7 = load float* %.phi.trans.insert6, align 4 ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %entry
- %8 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 9 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fmul float %9, -5.000000e-01 ; [#uses=1]
- %11 = sitofp i32 %y to float ; [#uses=1]
- %12 = fadd float %10, %11 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 8 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %14, -5.000000e-01 ; [#uses=1]
- %16 = sitofp i32 %x to float ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %5, %19 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %20, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %17, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %12, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- br label %bb3
-
-bb1: ; preds = %entry
- %25 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 9 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fmul float %26, -5.000000e-01 ; [#uses=1]
- %28 = sitofp i32 %y to float ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fsub float %5, %31 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 8 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fmul float %34, -5.000000e-01 ; [#uses=1]
- %36 = sitofp i32 %x to float ; [#uses=1]
- %37 = fadd float %35, %36 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %37, float* %38, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %32, float* %39, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %29, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- br label %bb3
-
-bb2: ; preds = %entry
- %42 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fsub float %5, %43 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 9 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, -5.000000e-01 ; [#uses=1]
- %48 = sitofp i32 %y to float ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 8 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %51, -5.000000e-01 ; [#uses=1]
- %53 = sitofp i32 %x to float ; [#uses=1]
- %54 = fadd float %52, %53 ; [#uses=2]
- %55 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %54, float* %55, align 4
- %56 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %49, float* %56, align 4
- %57 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %44, float* %57, align 4
- %58 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %58, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1, %bb, %entry.bb3_crit_edge
- %59 = phi float [ %.pre7, %entry.bb3_crit_edge ], [ %44, %bb2 ], [ %29, %bb1 ], [ %12, %bb ] ; [#uses=1]
- %60 = phi float [ %.pre5, %entry.bb3_crit_edge ], [ %49, %bb2 ], [ %32, %bb1 ], [ %17, %bb ] ; [#uses=1]
- %61 = phi float [ %.pre, %entry.bb3_crit_edge ], [ %54, %bb2 ], [ %37, %bb1 ], [ %20, %bb ] ; [#uses=1]
- %62 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fmul float %61, %64 ; [#uses=1]
- store float %65, float* %62, align 4
- %66 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %60, %68 ; [#uses=1]
- store float %69, float* %66, align 4
- %70 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %59, %72 ; [#uses=1]
- store float %73, float* %70, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK25btHeightfieldTerrainShape21calculateLocalInertiaEfR9btVector3(%struct.btHeightfieldTerrainShape* nocapture %this, float %unnamed_arg, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btHeightfieldTerrainShape15setLocalScalingERK9btVector3(%struct.btHeightfieldTerrainShape* nocapture %this, %struct.btQuadWord* nocapture %scaling) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btQuadWord* @_ZNK25btHeightfieldTerrainShape15getLocalScalingEv(%struct.btHeightfieldTerrainShape* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=0]
-define void @_ZNK25btHeightfieldTerrainShape17quantizeWithClampEPiRK9btVector3i(%struct.btHeightfieldTerrainShape* nocapture %this, i32* nocapture %out, %struct.btQuadWord* nocapture %point, i32 %unnamed_arg) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fcmp olt float %1, %7 ; [#uses=1]
- %clampedPoint.0.0.0 = select i1 %8, float %7, float %1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = fcmp olt float %3, %10 ; [#uses=1]
- %clampedPoint.0.1.0 = select i1 %11, float %10, float %3 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fcmp olt float %5, %13 ; [#uses=1]
- %clampedPoint.0.2.0 = select i1 %14, float %13, float %5 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fcmp olt float %16, %clampedPoint.0.0.0 ; [#uses=1]
- %clampedPoint.0.0.1 = select i1 %17, float %16, float %clampedPoint.0.0.0 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fcmp olt float %19, %clampedPoint.0.1.0 ; [#uses=1]
- %clampedPoint.0.1.1 = select i1 %20, float %19, float %clampedPoint.0.1.0 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fcmp olt float %22, %clampedPoint.0.2.0 ; [#uses=1]
- %clampedPoint.0.2.1 = select i1 %23, float %22, float %clampedPoint.0.2.0 ; [#uses=2]
- %24 = fcmp olt float %clampedPoint.0.0.1, 0.000000e+00 ; [#uses=1]
- %25 = fpext float %clampedPoint.0.0.1 to double ; [#uses=2]
- br i1 %24, label %bb.i6, label %bb1.i7
-
-bb.i6: ; preds = %entry
- %26 = fadd double %25, -5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit10
-
-bb1.i7: ; preds = %entry
- %27 = fadd double %25, 5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit10
-
-_ZL12getQuantizedf.exit10: ; preds = %bb1.i7, %bb.i6
- %.0.in.i8 = phi double [ %26, %bb.i6 ], [ %27, %bb1.i7 ] ; [#uses=1]
- %.0.i9 = fptosi double %.0.in.i8 to i32 ; [#uses=1]
- store i32 %.0.i9, i32* %out, align 4
- %28 = fcmp olt float %clampedPoint.0.1.1, 0.000000e+00 ; [#uses=1]
- %29 = fpext float %clampedPoint.0.1.1 to double ; [#uses=2]
- br i1 %28, label %bb.i1, label %bb1.i2
-
-bb.i1: ; preds = %_ZL12getQuantizedf.exit10
- %30 = fadd double %29, -5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit5
-
-bb1.i2: ; preds = %_ZL12getQuantizedf.exit10
- %31 = fadd double %29, 5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit5
-
-_ZL12getQuantizedf.exit5: ; preds = %bb1.i2, %bb.i1
- %.0.in.i3 = phi double [ %30, %bb.i1 ], [ %31, %bb1.i2 ] ; [#uses=1]
- %.0.i4 = fptosi double %.0.in.i3 to i32 ; [#uses=1]
- %32 = getelementptr inbounds i32* %out, i32 1 ; [#uses=1]
- store i32 %.0.i4, i32* %32, align 4
- %33 = fcmp olt float %clampedPoint.0.2.1, 0.000000e+00 ; [#uses=1]
- %34 = fpext float %clampedPoint.0.2.1 to double ; [#uses=2]
- br i1 %33, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %_ZL12getQuantizedf.exit5
- %35 = fadd double %34, -5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit
-
-bb1.i: ; preds = %_ZL12getQuantizedf.exit5
- %36 = fadd double %34, 5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit
-
-_ZL12getQuantizedf.exit: ; preds = %bb1.i, %bb.i
- %.0.in.i = phi double [ %35, %bb.i ], [ %36, %bb1.i ] ; [#uses=1]
- %.0.i = fptosi double %.0.in.i to i32 ; [#uses=1]
- %37 = getelementptr inbounds i32* %out, i32 2 ; [#uses=1]
- store i32 %.0.i, i32* %37, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK25btHeightfieldTerrainShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btHeightfieldTerrainShape* %this, %struct.btActionInterface* %callback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %quantizedAabbMin = alloca [3 x i32], align 4 ; [#uses=3]
- %quantizedAabbMax = alloca [3 x i32], align 4 ; [#uses=3]
- %vertices = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fdiv float 1.000000e+00, %1 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = fdiv float 1.000000e+00, %4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fdiv float 1.000000e+00, %7 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %10, %2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %13, %5 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %16, %8 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fmul float %19, %2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %22, %5 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fmul float %25, %8 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- %29 = fadd float %17, %28 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fadd float %14, %31 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fadd float %11, %34 ; [#uses=2]
- %36 = fadd float %26, %28 ; [#uses=2]
- %37 = fadd float %23, %31 ; [#uses=2]
- %38 = fadd float %20, %34 ; [#uses=2]
- %39 = getelementptr inbounds [3 x i32]* %quantizedAabbMin, i32 0, i32 0 ; [#uses=2]
- %40 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=4]
- %42 = fcmp olt float %29, %41 ; [#uses=1]
- %clampedPoint.0.0.0.i = select i1 %42, float %41, float %29 ; [#uses=2]
- %43 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=4]
- %45 = fcmp olt float %32, %44 ; [#uses=1]
- %clampedPoint.0.1.0.i = select i1 %45, float %44, float %32 ; [#uses=2]
- %46 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=4]
- %48 = fcmp olt float %35, %47 ; [#uses=1]
- %clampedPoint.0.2.0.i = select i1 %48, float %47, float %35 ; [#uses=2]
- %49 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=4]
- %51 = fcmp olt float %50, %clampedPoint.0.0.0.i ; [#uses=1]
- %clampedPoint.0.0.1.i = select i1 %51, float %50, float %clampedPoint.0.0.0.i ; [#uses=2]
- %52 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=4]
- %54 = fcmp olt float %53, %clampedPoint.0.1.0.i ; [#uses=1]
- %clampedPoint.0.1.1.i = select i1 %54, float %53, float %clampedPoint.0.1.0.i ; [#uses=2]
- %55 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=4]
- %57 = fcmp olt float %56, %clampedPoint.0.2.0.i ; [#uses=1]
- %clampedPoint.0.2.1.i = select i1 %57, float %56, float %clampedPoint.0.2.0.i ; [#uses=2]
- %58 = fcmp olt float %clampedPoint.0.0.1.i, 0.000000e+00 ; [#uses=1]
- %59 = fpext float %clampedPoint.0.0.1.i to double ; [#uses=2]
- br i1 %58, label %bb.i6.i, label %bb1.i7.i
-
-bb.i6.i: ; preds = %entry
- %60 = fadd double %59, -5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit10.i
-
-bb1.i7.i: ; preds = %entry
- %61 = fadd double %59, 5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit10.i
-
-_ZL12getQuantizedf.exit10.i: ; preds = %bb1.i7.i, %bb.i6.i
- %.0.in.i8.i = phi double [ %60, %bb.i6.i ], [ %61, %bb1.i7.i ] ; [#uses=1]
- %.0.i9.i = fptosi double %.0.in.i8.i to i32 ; [#uses=2]
- store i32 %.0.i9.i, i32* %39, align 4
- %62 = fcmp olt float %clampedPoint.0.1.1.i, 0.000000e+00 ; [#uses=1]
- %63 = fpext float %clampedPoint.0.1.1.i to double ; [#uses=2]
- br i1 %62, label %bb.i1.i, label %bb1.i2.i
-
-bb.i1.i: ; preds = %_ZL12getQuantizedf.exit10.i
- %64 = fadd double %63, -5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit5.i
-
-bb1.i2.i: ; preds = %_ZL12getQuantizedf.exit10.i
- %65 = fadd double %63, 5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit5.i
-
-_ZL12getQuantizedf.exit5.i: ; preds = %bb1.i2.i, %bb.i1.i
- %.0.in.i3.i = phi double [ %64, %bb.i1.i ], [ %65, %bb1.i2.i ] ; [#uses=1]
- %.0.i4.i = fptosi double %.0.in.i3.i to i32 ; [#uses=2]
- %66 = getelementptr inbounds [3 x i32]* %quantizedAabbMin, i32 0, i32 1 ; [#uses=2]
- store i32 %.0.i4.i, i32* %66, align 4
- %67 = fcmp olt float %clampedPoint.0.2.1.i, 0.000000e+00 ; [#uses=1]
- %68 = fpext float %clampedPoint.0.2.1.i to double ; [#uses=2]
- br i1 %67, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %_ZL12getQuantizedf.exit5.i
- %69 = fadd double %68, -5.000000e-01 ; [#uses=1]
- br label %_ZNK25btHeightfieldTerrainShape17quantizeWithClampEPiRK9btVector3i.exit
-
-bb1.i.i: ; preds = %_ZL12getQuantizedf.exit5.i
- %70 = fadd double %68, 5.000000e-01 ; [#uses=1]
- br label %_ZNK25btHeightfieldTerrainShape17quantizeWithClampEPiRK9btVector3i.exit
-
-_ZNK25btHeightfieldTerrainShape17quantizeWithClampEPiRK9btVector3i.exit: ; preds = %bb1.i.i, %bb.i.i
- %.0.in.i.i = phi double [ %69, %bb.i.i ], [ %70, %bb1.i.i ] ; [#uses=1]
- %.0.i.i = fptosi double %.0.in.i.i to i32 ; [#uses=2]
- %71 = getelementptr inbounds [3 x i32]* %quantizedAabbMin, i32 0, i32 2 ; [#uses=2]
- store i32 %.0.i.i, i32* %71, align 4
- %72 = getelementptr inbounds [3 x i32]* %quantizedAabbMax, i32 0, i32 0 ; [#uses=2]
- %73 = fcmp olt float %36, %41 ; [#uses=1]
- %clampedPoint.0.0.0.i51 = select i1 %73, float %41, float %36 ; [#uses=2]
- %74 = fcmp olt float %37, %44 ; [#uses=1]
- %clampedPoint.0.1.0.i52 = select i1 %74, float %44, float %37 ; [#uses=2]
- %75 = fcmp olt float %38, %47 ; [#uses=1]
- %clampedPoint.0.2.0.i53 = select i1 %75, float %47, float %38 ; [#uses=2]
- %76 = fcmp olt float %50, %clampedPoint.0.0.0.i51 ; [#uses=1]
- %clampedPoint.0.0.1.i54 = select i1 %76, float %50, float %clampedPoint.0.0.0.i51 ; [#uses=2]
- %77 = fcmp olt float %53, %clampedPoint.0.1.0.i52 ; [#uses=1]
- %clampedPoint.0.1.1.i55 = select i1 %77, float %53, float %clampedPoint.0.1.0.i52 ; [#uses=2]
- %78 = fcmp olt float %56, %clampedPoint.0.2.0.i53 ; [#uses=1]
- %clampedPoint.0.2.1.i56 = select i1 %78, float %56, float %clampedPoint.0.2.0.i53 ; [#uses=2]
- %79 = fcmp olt float %clampedPoint.0.0.1.i54, 0.000000e+00 ; [#uses=1]
- %80 = fpext float %clampedPoint.0.0.1.i54 to double ; [#uses=2]
- br i1 %79, label %bb.i6.i57, label %bb1.i7.i58
-
-bb.i6.i57: ; preds = %_ZNK25btHeightfieldTerrainShape17quantizeWithClampEPiRK9btVector3i.exit
- %81 = fadd double %80, -5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit10.i61
-
-bb1.i7.i58: ; preds = %_ZNK25btHeightfieldTerrainShape17quantizeWithClampEPiRK9btVector3i.exit
- %82 = fadd double %80, 5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit10.i61
-
-_ZL12getQuantizedf.exit10.i61: ; preds = %bb1.i7.i58, %bb.i6.i57
- %.0.in.i8.i59 = phi double [ %81, %bb.i6.i57 ], [ %82, %bb1.i7.i58 ] ; [#uses=1]
- %.0.i9.i60 = fptosi double %.0.in.i8.i59 to i32 ; [#uses=2]
- store i32 %.0.i9.i60, i32* %72, align 4
- %83 = fcmp olt float %clampedPoint.0.1.1.i55, 0.000000e+00 ; [#uses=1]
- %84 = fpext float %clampedPoint.0.1.1.i55 to double ; [#uses=2]
- br i1 %83, label %bb.i1.i62, label %bb1.i2.i63
-
-bb.i1.i62: ; preds = %_ZL12getQuantizedf.exit10.i61
- %85 = fadd double %84, -5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit5.i66
-
-bb1.i2.i63: ; preds = %_ZL12getQuantizedf.exit10.i61
- %86 = fadd double %84, 5.000000e-01 ; [#uses=1]
- br label %_ZL12getQuantizedf.exit5.i66
-
-_ZL12getQuantizedf.exit5.i66: ; preds = %bb1.i2.i63, %bb.i1.i62
- %.0.in.i3.i64 = phi double [ %85, %bb.i1.i62 ], [ %86, %bb1.i2.i63 ] ; [#uses=1]
- %.0.i4.i65 = fptosi double %.0.in.i3.i64 to i32 ; [#uses=2]
- %87 = getelementptr inbounds [3 x i32]* %quantizedAabbMax, i32 0, i32 1 ; [#uses=2]
- store i32 %.0.i4.i65, i32* %87, align 4
- %88 = fcmp olt float %clampedPoint.0.2.1.i56, 0.000000e+00 ; [#uses=1]
- %89 = fpext float %clampedPoint.0.2.1.i56 to double ; [#uses=2]
- br i1 %88, label %bb.i.i67, label %bb1.i.i68
-
-bb.i.i67: ; preds = %_ZL12getQuantizedf.exit5.i66
- %90 = fadd double %89, -5.000000e-01 ; [#uses=1]
- br label %bb2
-
-bb1.i.i68: ; preds = %_ZL12getQuantizedf.exit5.i66
- %91 = fadd double %89, 5.000000e-01 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1.i.i68, %bb.i.i67
- %.0.in.i.i69 = phi double [ %90, %bb.i.i67 ], [ %91, %bb1.i.i68 ] ; [#uses=1]
- %.0.i.i70 = fptosi double %.0.in.i.i69 to i32 ; [#uses=1]
- %92 = getelementptr inbounds [3 x i32]* %quantizedAabbMax, i32 0, i32 2 ; [#uses=1]
- %93 = add nsw i32 %.0.i9.i, -1 ; [#uses=5]
- store i32 %93, i32* %39, align 4
- %94 = add nsw i32 %.0.i9.i60, 1 ; [#uses=5]
- store i32 %94, i32* %72, align 4
- %95 = add nsw i32 %.0.i4.i, -1 ; [#uses=5]
- store i32 %95, i32* %66, align 4
- %96 = add nsw i32 %.0.i4.i65, 1 ; [#uses=5]
- store i32 %96, i32* %87, align 4
- %97 = add nsw i32 %.0.i.i, -1 ; [#uses=5]
- store i32 %97, i32* %71, align 4
- %98 = add nsw i32 %.0.i.i70, 1 ; [#uses=5]
- store i32 %98, i32* %92, align 4
- %99 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 4 ; [#uses=1]
- %100 = load i32* %99, align 4 ; [#uses=1]
- %101 = add nsw i32 %100, -1 ; [#uses=7]
- %102 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 5 ; [#uses=1]
- %103 = load i32* %102, align 4 ; [#uses=1]
- %104 = add nsw i32 %103, -1 ; [#uses=7]
- %105 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 15 ; [#uses=1]
- %106 = load i32* %105, align 4 ; [#uses=1]
- switch i32 %106, label %bb27 [
- i32 0, label %bb3
- i32 1, label %bb11
- i32 2, label %bb19
- ]
-
-bb3: ; preds = %bb2
- %107 = icmp sgt i32 %95, 0 ; [#uses=1]
- %startX.0 = select i1 %107, i32 %95, i32 0 ; [#uses=2]
- %108 = icmp slt i32 %96, %101 ; [#uses=1]
- %endX.0 = select i1 %108, i32 %96, i32 %101 ; [#uses=2]
- %109 = icmp sgt i32 %97, 0 ; [#uses=1]
- %startJ.0 = select i1 %109, i32 %97, i32 0 ; [#uses=2]
- %110 = icmp slt i32 %98, %104 ; [#uses=1]
- br i1 %110, label %bb10, label %bb27
-
-bb10: ; preds = %bb3
- br label %bb27
-
-bb11: ; preds = %bb2
- %111 = icmp sgt i32 %93, 0 ; [#uses=1]
- %startX.2 = select i1 %111, i32 %93, i32 0 ; [#uses=2]
- %112 = icmp slt i32 %94, %101 ; [#uses=1]
- %endX.2 = select i1 %112, i32 %94, i32 %101 ; [#uses=2]
- %113 = icmp sgt i32 %97, 0 ; [#uses=1]
- %startJ.2 = select i1 %113, i32 %97, i32 0 ; [#uses=2]
- %114 = icmp slt i32 %98, %104 ; [#uses=1]
- br i1 %114, label %bb18, label %bb27
-
-bb18: ; preds = %bb11
- br label %bb27
-
-bb19: ; preds = %bb2
- %115 = icmp sgt i32 %93, 0 ; [#uses=1]
- %startX.3 = select i1 %115, i32 %93, i32 0 ; [#uses=2]
- %116 = icmp slt i32 %94, %101 ; [#uses=1]
- %endX.3 = select i1 %116, i32 %94, i32 %101 ; [#uses=2]
- %117 = icmp sgt i32 %95, 0 ; [#uses=1]
- %startJ.3 = select i1 %117, i32 %95, i32 0 ; [#uses=2]
- %118 = icmp slt i32 %96, %104 ; [#uses=1]
- br i1 %118, label %bb26, label %bb27
-
-bb26: ; preds = %bb19
- br label %bb27
-
-bb27: ; preds = %bb26, %bb19, %bb18, %bb11, %bb10, %bb3, %bb2
- %startX.1 = phi i32 [ 0, %bb2 ], [ %startX.3, %bb26 ], [ %startX.3, %bb19 ], [ %startX.2, %bb18 ], [ %startX.2, %bb11 ], [ %startX.0, %bb10 ], [ %startX.0, %bb3 ] ; [#uses=5]
- %endX.1 = phi i32 [ %101, %bb2 ], [ %endX.3, %bb26 ], [ %endX.3, %bb19 ], [ %endX.2, %bb18 ], [ %endX.2, %bb11 ], [ %endX.0, %bb10 ], [ %endX.0, %bb3 ] ; [#uses=2]
- %startJ.1 = phi i32 [ 0, %bb2 ], [ %startJ.3, %bb26 ], [ %startJ.3, %bb19 ], [ %startJ.2, %bb18 ], [ %startJ.2, %bb11 ], [ %startJ.0, %bb10 ], [ %startJ.0, %bb3 ] ; [#uses=5]
- %endJ.0 = phi i32 [ %104, %bb2 ], [ %96, %bb26 ], [ %104, %bb19 ], [ %98, %bb18 ], [ %104, %bb11 ], [ %98, %bb10 ], [ %104, %bb3 ] ; [#uses=2]
- %119 = icmp slt i32 %startJ.1, %endJ.0 ; [#uses=1]
- br i1 %119, label %bb.nph88, label %return
-
-bb32: ; preds = %bb46.preheader, %bb45
- %indvar = phi i32 [ %indvar.next, %bb45 ], [ 0, %bb46.preheader ] ; [#uses=4]
- %tmp96 = add i32 %tmp101, %indvar ; [#uses=1]
- %x.085 = add i32 %startX.1, %indvar ; [#uses=10]
- %tmp98 = add i32 %tmp97, %indvar ; [#uses=6]
- %120 = load i8* %140, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %120, 0 ; [#uses=1]
- br i1 %toBool, label %bb33, label %bb43
-
-bb33: ; preds = %bb32
- %121 = load i8* %141, align 1 ; [#uses=1]
- %toBool34not = icmp eq i8 %121, 0 ; [#uses=1]
- br i1 %toBool34not, label %bb44, label %bb38
-
-bb38: ; preds = %bb33
- %122 = and i32 %tmp96, 1 ; [#uses=1]
- %toBool42 = icmp eq i32 %122, 0 ; [#uses=1]
- br i1 %toBool42, label %bb43, label %bb44
-
-bb43: ; preds = %bb38, %bb32
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %x.085, i32 %j.087, %struct.btQuadWord* %142)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %tmp98, i32 %j.087, %struct.btQuadWord* %143)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %tmp98, i32 %tmp105, %struct.btQuadWord* %144)
- %123 = load i32 (...)*** %145, align 4 ; [#uses=1]
- %124 = getelementptr inbounds i32 (...)** %123, i32 2 ; [#uses=1]
- %125 = load i32 (...)** %124, align 4 ; [#uses=1]
- %126 = bitcast i32 (...)* %125 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %126(%struct.btActionInterface* %callback, %struct.btQuadWord* %142, i32 %x.085, i32 %j.087)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %x.085, i32 %j.087, %struct.btQuadWord* %142)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %tmp98, i32 %tmp105, %struct.btQuadWord* %143)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %x.085, i32 %tmp105, %struct.btQuadWord* %144)
- %127 = load i32 (...)*** %145, align 4 ; [#uses=1]
- %128 = getelementptr inbounds i32 (...)** %127, i32 2 ; [#uses=1]
- %129 = load i32 (...)** %128, align 4 ; [#uses=1]
- %130 = bitcast i32 (...)* %129 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %130(%struct.btActionInterface* %callback, %struct.btQuadWord* %142, i32 %x.085, i32 %j.087)
- br label %bb45
-
-bb44: ; preds = %bb38, %bb33
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %x.085, i32 %j.087, %struct.btQuadWord* %142)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %x.085, i32 %tmp105, %struct.btQuadWord* %143)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %tmp98, i32 %j.087, %struct.btQuadWord* %144)
- %131 = load i32 (...)*** %145, align 4 ; [#uses=1]
- %132 = getelementptr inbounds i32 (...)** %131, i32 2 ; [#uses=1]
- %133 = load i32 (...)** %132, align 4 ; [#uses=1]
- %134 = bitcast i32 (...)* %133 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %134(%struct.btActionInterface* %callback, %struct.btQuadWord* %142, i32 %x.085, i32 %j.087)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %tmp98, i32 %j.087, %struct.btQuadWord* %142)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %x.085, i32 %tmp105, %struct.btQuadWord* %143)
- call void @_ZNK25btHeightfieldTerrainShape9getVertexEiiR9btVector3(%struct.btHeightfieldTerrainShape* %this, i32 %tmp98, i32 %tmp105, %struct.btQuadWord* %144)
- %135 = load i32 (...)*** %145, align 4 ; [#uses=1]
- %136 = getelementptr inbounds i32 (...)** %135, i32 2 ; [#uses=1]
- %137 = load i32 (...)** %136, align 4 ; [#uses=1]
- %138 = bitcast i32 (...)* %137 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %138(%struct.btActionInterface* %callback, %struct.btQuadWord* %142, i32 %x.085, i32 %j.087)
- br label %bb45
-
-bb45: ; preds = %bb44, %bb43
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb47, label %bb32
-
-bb47: ; preds = %bb46.preheader, %bb45
- %indvar.next93 = add i32 %indvar92, 1 ; [#uses=2]
- %exitcond100 = icmp eq i32 %indvar.next93, %tmp99 ; [#uses=1]
- br i1 %exitcond100, label %return, label %bb46.preheader
-
-bb.nph88: ; preds = %bb27
- %139 = icmp slt i32 %startX.1, %endX.1 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 13 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 14 ; [#uses=1]
- %142 = getelementptr inbounds [3 x %struct.btQuadWord]* %vertices, i32 0, i32 0 ; [#uses=8]
- %143 = getelementptr inbounds [3 x %struct.btQuadWord]* %vertices, i32 0, i32 1 ; [#uses=4]
- %144 = getelementptr inbounds [3 x %struct.btQuadWord]* %vertices, i32 0, i32 2 ; [#uses=4]
- %145 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=4]
- %tmp = sub i32 %endX.1, %startX.1 ; [#uses=1]
- %tmp94 = add i32 %startJ.1, %startX.1 ; [#uses=1]
- %tmp97 = add i32 %startX.1, 1 ; [#uses=1]
- %tmp99 = sub i32 %endJ.0, %startJ.1 ; [#uses=1]
- %tmp104 = add i32 %startJ.1, 1 ; [#uses=1]
- br label %bb46.preheader
-
-bb46.preheader: ; preds = %bb.nph88, %bb47
- %indvar92 = phi i32 [ 0, %bb.nph88 ], [ %indvar.next93, %bb47 ] ; [#uses=4]
- %tmp101 = add i32 %tmp94, %indvar92 ; [#uses=1]
- %j.087 = add i32 %startJ.1, %indvar92 ; [#uses=10]
- %tmp105 = add i32 %tmp104, %indvar92 ; [#uses=6]
- br i1 %139, label %bb32, label %bb47
-
-return: ; preds = %bb47, %bb27
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btHeightfieldTerrainShapeD0Ev(%struct.btHeightfieldTerrainShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV25btHeightfieldTerrainShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- %2 = bitcast %struct.btHeightfieldTerrainShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btHeightfieldTerrainShapeD1Ev(%struct.btHeightfieldTerrainShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV25btHeightfieldTerrainShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btHeightfieldTerrainShapeD2Ev(%struct.btHeightfieldTerrainShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV25btHeightfieldTerrainShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btHeightfieldTerrainShapeC2EiiPvfibb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %maxHeight, i32 %upAxis, i8 zeroext %useFloatData, i8 zeroext %flipQuadEdges) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV25btHeightfieldTerrainShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %toBool = icmp eq i8 %useFloatData, 0 ; [#uses=1]
- %iftmp.123.0 = select i1 %toBool, i32 5, i32 0 ; [#uses=1]
- %2 = fdiv float %maxHeight, 6.553500e+04 ; [#uses=1]
- tail call void @_ZN25btHeightfieldTerrainShape10initializeEiiPvfffi14PHY_ScalarTypeb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %2, float 0.000000e+00, float %maxHeight, i32 %upAxis, i32 %iftmp.123.0, i8 zeroext %flipQuadEdges) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btHeightfieldTerrainShapeC1EiiPvfibb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %maxHeight, i32 %upAxis, i8 zeroext %useFloatData, i8 zeroext %flipQuadEdges) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV25btHeightfieldTerrainShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %toBool.i = icmp eq i8 %useFloatData, 0 ; [#uses=1]
- %iftmp.123.0.i = select i1 %toBool.i, i32 5, i32 0 ; [#uses=1]
- %2 = fdiv float %maxHeight, 6.553500e+04 ; [#uses=1]
- tail call void @_ZN25btHeightfieldTerrainShape10initializeEiiPvfffi14PHY_ScalarTypeb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %2, float 0.000000e+00, float %maxHeight, i32 %upAxis, i32 %iftmp.123.0.i, i8 zeroext %flipQuadEdges) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btHeightfieldTerrainShapeC1EiiPvfffi14PHY_ScalarTypeb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %heightScale, float %minHeight, float %maxHeight, i32 %upAxis, i32 %hdt, i8 zeroext %flipQuadEdges) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btHeightfieldTerrainShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV25btHeightfieldTerrainShape, i32 0, i32 2), i32 (...)*** %1, align 4
- tail call void @_ZN25btHeightfieldTerrainShape10initializeEiiPvfffi14PHY_ScalarTypeb(%struct.btHeightfieldTerrainShape* %this, i32 %heightStickWidth, i32 %heightStickLength, i8* %heightfieldData, float %heightScale, float %minHeight, float %maxHeight, i32 %upAxis, i32 %hdt, i8 zeroext %flipQuadEdges) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btMinkowskiSumShapeC2EPK13btConvexShapeS2_(%struct.btMinkowskiSumShape* %this, %struct.btConvexShape* %shapeA, %struct.btConvexShape* %shapeB) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV19btMinkowskiSumShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %shapeA, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %shapeB, %struct.btConvexShape** %3, align 4
- %4 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 16, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK19btMinkowskiSumShape7getNameEv(%struct.btMinkowskiSumShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([13 x i8]* @.str91, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK19btMinkowskiSumShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btMinkowskiSumShape* nocapture %this, %struct.btQuadWord* nocapture %vec) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 3 ; [#uses=1]
- %5 = load %struct.btConvexShape** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btConvexShape* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 16 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fadd float %14, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=3]
- %25 = fmul float %22, %24 ; [#uses=1]
- %26 = fadd float %20, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %28, %13 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fmul float %31, %18 ; [#uses=1]
- %33 = fadd float %29, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fmul float %35, %24 ; [#uses=1]
- %37 = fadd float %33, %36 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %13 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fmul float %42, %18 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, %24 ; [#uses=1]
- %48 = fadd float %44, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %48, float* %49, align 8
- %50 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %37, float* %50, align 4
- %51 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %26, float* %51, align 8
- %52 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = bitcast i32 (...)* %9 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %53(%struct.btQuadWord* noalias sret %3, %struct.btConvexShape* %5, %struct.btQuadWord* %2)
- %54 = load float* %45, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %55, align 8 ; [#uses=3]
- %57 = fmul float %54, %56 ; [#uses=1]
- %58 = load float* %34, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fmul float %58, %60 ; [#uses=1]
- %62 = fadd float %57, %61 ; [#uses=1]
- %63 = load float* %21, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 8 ; [#uses=3]
- %66 = fmul float %63, %65 ; [#uses=1]
- %67 = fadd float %62, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fadd float %67, %69 ; [#uses=1]
- %71 = load float* %41, align 4 ; [#uses=1]
- %72 = fmul float %71, %56 ; [#uses=1]
- %73 = load float* %30, align 4 ; [#uses=1]
- %74 = fmul float %73, %60 ; [#uses=1]
- %75 = fadd float %72, %74 ; [#uses=1]
- %76 = load float* %15, align 4 ; [#uses=1]
- %77 = fmul float %76, %65 ; [#uses=1]
- %78 = fadd float %75, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fadd float %78, %80 ; [#uses=1]
- %82 = load float* %38, align 4 ; [#uses=1]
- %83 = fmul float %82, %56 ; [#uses=1]
- %84 = load float* %27, align 4 ; [#uses=1]
- %85 = fmul float %84, %60 ; [#uses=1]
- %86 = fadd float %83, %85 ; [#uses=1]
- %87 = load float* %10, align 4 ; [#uses=1]
- %88 = fmul float %87, %65 ; [#uses=1]
- %89 = fadd float %86, %88 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fadd float %89, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 4 ; [#uses=1]
- %94 = load %struct.btConvexShape** %93, align 4 ; [#uses=2]
- %95 = getelementptr inbounds %struct.btConvexShape* %94, i32 0, i32 0, i32 0 ; [#uses=1]
- %96 = load i32 (...)*** %95, align 4 ; [#uses=1]
- %97 = getelementptr inbounds i32 (...)** %96, i32 16 ; [#uses=1]
- %98 = load i32 (...)** %97, align 4 ; [#uses=1]
- %99 = load float* %23, align 4 ; [#uses=1]
- %100 = fsub float -0.000000e+00, %99 ; [#uses=3]
- %101 = load float* %17, align 4 ; [#uses=1]
- %102 = fsub float -0.000000e+00, %101 ; [#uses=3]
- %103 = load float* %12, align 4 ; [#uses=1]
- %104 = fsub float -0.000000e+00, %103 ; [#uses=3]
- %105 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %106 = load float* %105, align 4 ; [#uses=1]
- %107 = fmul float %106, %104 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %102 ; [#uses=1]
- %111 = fadd float %107, %110 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %113 = load float* %112, align 4 ; [#uses=1]
- %114 = fmul float %113, %100 ; [#uses=1]
- %115 = fadd float %111, %114 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = fmul float %117, %104 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fmul float %120, %102 ; [#uses=1]
- %122 = fadd float %118, %121 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %124 = load float* %123, align 4 ; [#uses=1]
- %125 = fmul float %124, %100 ; [#uses=1]
- %126 = fadd float %122, %125 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %128 = load float* %127, align 4 ; [#uses=1]
- %129 = fmul float %128, %104 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = fmul float %131, %102 ; [#uses=1]
- %133 = fadd float %129, %132 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = fmul float %135, %100 ; [#uses=1]
- %137 = fadd float %133, %136 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %137, float* %138, align 8
- %139 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %126, float* %139, align 4
- %140 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %115, float* %140, align 8
- %141 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %141, align 4
- %142 = bitcast i32 (...)* %98 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %142(%struct.btQuadWord* noalias sret %1, %struct.btConvexShape* %94, %struct.btQuadWord* %0)
- %143 = load float* %134, align 4 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %145 = load float* %144, align 8 ; [#uses=3]
- %146 = fmul float %143, %145 ; [#uses=1]
- %147 = load float* %123, align 4 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=3]
- %150 = fmul float %147, %149 ; [#uses=1]
- %151 = fadd float %146, %150 ; [#uses=1]
- %152 = load float* %112, align 4 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %154 = load float* %153, align 8 ; [#uses=3]
- %155 = fmul float %152, %154 ; [#uses=1]
- %156 = fadd float %151, %155 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- %159 = fadd float %156, %158 ; [#uses=1]
- %160 = load float* %130, align 4 ; [#uses=1]
- %161 = fmul float %160, %145 ; [#uses=1]
- %162 = load float* %119, align 4 ; [#uses=1]
- %163 = fmul float %162, %149 ; [#uses=1]
- %164 = fadd float %161, %163 ; [#uses=1]
- %165 = load float* %108, align 4 ; [#uses=1]
- %166 = fmul float %165, %154 ; [#uses=1]
- %167 = fadd float %164, %166 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- %170 = fadd float %167, %169 ; [#uses=1]
- %171 = load float* %127, align 4 ; [#uses=1]
- %172 = fmul float %171, %145 ; [#uses=1]
- %173 = load float* %116, align 4 ; [#uses=1]
- %174 = fmul float %173, %149 ; [#uses=1]
- %175 = fadd float %172, %174 ; [#uses=1]
- %176 = load float* %105, align 4 ; [#uses=1]
- %177 = fmul float %176, %154 ; [#uses=1]
- %178 = fadd float %175, %177 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %180 = load float* %179, align 4 ; [#uses=1]
- %181 = fadd float %178, %180 ; [#uses=1]
- %182 = fsub float %70, %159 ; [#uses=1]
- %183 = fsub float %81, %170 ; [#uses=1]
- %184 = fsub float %92, %181 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %184, float* %185, align 4
- %186 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %183, float* %186, align 4
- %187 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %182, float* %187, align 4
- %188 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %188, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK19btMinkowskiSumShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btMinkowskiSumShape* %this, %struct.btQuadWord* %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) align 2 {
-entry:
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %1 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.03 = phi i32 [ 0, %bb.nph ], [ %14, %bb ] ; [#uses=6]
- %scevgep = getelementptr %struct.btQuadWord* %vectors, i32 %i.03 ; [#uses=1]
- %scevgep45 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 0 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 1 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 2 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 3 ; [#uses=1]
- %6 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 16 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct.btQuadWord*, %struct.btMinkowskiSumShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %9(%struct.btQuadWord* noalias sret %memtmp, %struct.btMinkowskiSumShape* %this, %struct.btQuadWord* %scevgep)
- %10 = load float* %2, align 8 ; [#uses=1]
- store float %10, float* %scevgep45, align 4
- %11 = load float* %3, align 4 ; [#uses=1]
- store float %11, float* %scevgep6, align 4
- %12 = load float* %4, align 8 ; [#uses=1]
- store float %12, float* %scevgep7, align 4
- %13 = load float* %5, align 4 ; [#uses=1]
- store float %13, float* %scevgep8, align 4
- %14 = add nsw i32 %i.03, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %14, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK19btMinkowskiSumShape9getMarginEv(%struct.btMinkowskiSumShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 11 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to float (%struct.btConvexShape*)* ; [#uses=1]
- %7 = tail call float %6(%struct.btConvexShape* %1) ; [#uses=1]
- %8 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 4 ; [#uses=1]
- %9 = load %struct.btConvexShape** %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btConvexShape* %9, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 11 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to float (%struct.btConvexShape*)* ; [#uses=1]
- %15 = tail call float %14(%struct.btConvexShape* %9) ; [#uses=1]
- %16 = fadd float %7, %15 ; [#uses=1]
- ret float %16
-}
-
-; [#uses=1]
-define void @_ZNK19btMinkowskiSumShape21calculateLocalInertiaEfR9btVector3(%struct.btMinkowskiSumShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19btMinkowskiSumShapeD0Ev(%struct.btMinkowskiSumShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btMinkowskiSumShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19btMinkowskiSumShapeD1Ev(%struct.btMinkowskiSumShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btMinkowskiSumShapeC1EPK13btConvexShapeS2_(%struct.btMinkowskiSumShape* %this, %struct.btConvexShape* %shapeA, %struct.btConvexShape* %shapeB) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV19btMinkowskiSumShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %shapeA, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %shapeB, %struct.btConvexShape** %3, align 4
- %4 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 16, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btMinkowskiSumShape* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- ret void
-}
-
-; [#uses=0]
-define %struct.btMaterial* @_ZN32btMultimaterialTriangleMeshShape21getMaterialPropertiesEii(%struct.btMultimaterialTriangleMeshShape* nocapture %this, i32 %partID, i32 %triIndex) align 2 {
-entry:
- %materialBase = alloca i8*, align 4 ; [#uses=3]
- %numMaterials = alloca i32, align 4 ; [#uses=1]
- %materialType = alloca i32, align 4 ; [#uses=1]
- %materialStride = alloca i32, align 4 ; [#uses=2]
- %triangleMaterialBase = alloca i8*, align 4 ; [#uses=3]
- %numTriangles = alloca i32, align 4 ; [#uses=1]
- %triangleMaterialStride = alloca i32, align 4 ; [#uses=2]
- %triangleType = alloca i32, align 4 ; [#uses=1]
- store i8* null, i8** %materialBase, align 4
- store i8* null, i8** %triangleMaterialBase, align 4
- %0 = getelementptr inbounds %struct.btMultimaterialTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 16 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast %struct.btStridingMeshInterface* %1 to %struct.btTriangleIndexVertexMaterialArray* ; [#uses=1]
- %7 = bitcast i32 (...)* %5 to void (%struct.btTriangleIndexVertexMaterialArray*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %7(%struct.btTriangleIndexVertexMaterialArray* %6, i8** %materialBase, i32* %numMaterials, i32* %materialType, i32* %materialStride, i8** %triangleMaterialBase, i32* %numTriangles, i32* %triangleMaterialStride, i32* %triangleType, i32 %partID)
- %8 = load i8** %triangleMaterialBase, align 4 ; [#uses=1]
- %9 = load i32* %triangleMaterialStride, align 4 ; [#uses=1]
- %10 = mul nsw i32 %9, %triIndex ; [#uses=1]
- %11 = getelementptr inbounds i8* %8, i32 %10 ; [#uses=1]
- %12 = bitcast i8* %11 to i32* ; [#uses=1]
- %13 = load i8** %materialBase, align 4 ; [#uses=1]
- %14 = load i32* %12, align 4 ; [#uses=1]
- %15 = load i32* %materialStride, align 4 ; [#uses=1]
- %16 = mul nsw i32 %15, %14 ; [#uses=1]
- %17 = getelementptr inbounds i8* %13, i32 %16 ; [#uses=1]
- %18 = bitcast i8* %17 to %struct.btMaterial* ; [#uses=1]
- ret %struct.btMaterial* %18
-}
-
-; [#uses=1]
-define void @_ZN18btMultiSphereShapeC2EPK9btVector3PKfi(%struct.btMultiSphereShape* %this, %struct.btQuadWord* nocapture %positions, float* nocapture %radi, i32 %numSpheres) align 2 {
-invcont1:
- %0 = alloca float, align 4 ; [#uses=2]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0 ; [#uses=2]
- call void @_ZN32btConvexInternalAabbCachingShapeC2Ev(%struct.btConvexInternalAabbCachingShape* %2)
- %3 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV18btMultiSphereShape, i32 0, i32 2), i32 (...)*** %3, align 4
- %4 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=5]
- store %struct.btQuadWord* null, %struct.btQuadWord** %5, align 4
- %6 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 4 ; [#uses=3]
- store i8 1, i8* %8, align 4
- %9 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 3 ; [#uses=5]
- store float* null, float** %9, align 4
- %10 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 1 ; [#uses=2]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 9, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %13, i32 %numSpheres, %struct.btQuadWord* %1) inlinehint
- to label %invcont2 unwind label %lpad27
-
-invcont2: ; preds = %invcont1
- store float 0.000000e+00, float* %0, align 4
- %14 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIfE6resizeEiRKf(%"struct.btAlignedObjectArray<float>"* %14, i32 %numSpheres, float* %0) inlinehint
- to label %bb4.preheader unwind label %lpad27
-
-bb4.preheader: ; preds = %invcont2
- %15 = icmp sgt i32 %numSpheres, 0 ; [#uses=1]
- br i1 %15, label %bb, label %bb5
-
-bb: ; preds = %bb, %bb4.preheader
- %i.055 = phi i32 [ %23, %bb ], [ 0, %bb4.preheader ] ; [#uses=11]
- %scevgep = getelementptr float* %radi, i32 %i.055 ; [#uses=1]
- %scevgep5657 = getelementptr inbounds %struct.btQuadWord* %positions, i32 %i.055, i32 0, i32 0 ; [#uses=1]
- %scevgep58 = getelementptr %struct.btQuadWord* %positions, i32 %i.055, i32 0, i32 1 ; [#uses=1]
- %scevgep59 = getelementptr %struct.btQuadWord* %positions, i32 %i.055, i32 0, i32 2 ; [#uses=1]
- %scevgep60 = getelementptr %struct.btQuadWord* %positions, i32 %i.055, i32 0, i32 3 ; [#uses=1]
- %16 = load %struct.btQuadWord** %5, align 4 ; [#uses=4]
- %17 = load float* %scevgep5657, align 4 ; [#uses=1]
- %scevgep6263 = getelementptr inbounds %struct.btQuadWord* %16, i32 %i.055, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %scevgep6263, align 4
- %18 = load float* %scevgep58, align 4 ; [#uses=1]
- %scevgep64 = getelementptr %struct.btQuadWord* %16, i32 %i.055, i32 0, i32 1 ; [#uses=1]
- store float %18, float* %scevgep64, align 4
- %19 = load float* %scevgep59, align 4 ; [#uses=1]
- %scevgep65 = getelementptr %struct.btQuadWord* %16, i32 %i.055, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %scevgep65, align 4
- %20 = load float* %scevgep60, align 4 ; [#uses=1]
- %scevgep66 = getelementptr %struct.btQuadWord* %16, i32 %i.055, i32 0, i32 3 ; [#uses=1]
- store float %20, float* %scevgep66, align 4
- %21 = load float** %9, align 4 ; [#uses=1]
- %22 = load float* %scevgep, align 4 ; [#uses=1]
- %scevgep61 = getelementptr float* %21, i32 %i.055 ; [#uses=1]
- store float %22, float* %scevgep61, align 4
- %23 = add nsw i32 %i.055, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %23, %numSpheres ; [#uses=1]
- br i1 %exitcond, label %bb5, label %bb
-
-bb5: ; preds = %bb, %bb4.preheader
- invoke void @_ZN32btConvexInternalAabbCachingShape15recalcLocalAabbEv(%struct.btConvexInternalAabbCachingShape* %2)
- to label %return unwind label %lpad27
-
-invcont18: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr28)
- unreachable
-
-return: ; preds = %bb5
- ret void
-
-lpad27: ; preds = %bb5, %invcont2, %invcont1
- %eh_ptr28 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select30 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %24 = load float** %9, align 4 ; [#uses=2]
- %25 = icmp eq float* %24, null ; [#uses=1]
- br i1 %25, label %ppad43, label %bb.i.i.i51
-
-bb.i.i.i51: ; preds = %lpad27
- %26 = load i8* %8, align 4 ; [#uses=1]
- %toBool.i.i.i50 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i50, label %bb2.i.i.i53, label %bb1.i.i.i52
-
-bb1.i.i.i52: ; preds = %bb.i.i.i51
- %27 = bitcast float* %24 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %27)
- to label %bb2.i.i.i53 unwind label %lpad31
-
-bb2.i.i.i53: ; preds = %bb1.i.i.i52, %bb.i.i.i51
- store float* null, float** %9, align 4
- br label %ppad43
-
-lpad31: ; preds = %bb1.i.i.i52
- %eh_ptr32 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select34 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad35: ; preds = %bb1.i.i.i
- %eh_ptr36 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select38 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr36, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad39: ; preds = %ppad
- %eh_ptr40 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select42 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr40, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %ppad43
- store i8 1, i8* %4, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %5, align 4
- store i32 0, i32* %6, align 4
- store i32 0, i32* %7, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %3, align 4
- %28 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %28)
- to label %invcont18 unwind label %lpad39
-
-ppad43: ; preds = %bb2.i.i.i53, %lpad27
- store i8 1, i8* %8, align 4
- store float* null, float** %9, align 4
- store i32 0, i32* %10, align 4
- store i32 0, i32* %11, align 4
- %29 = load %struct.btQuadWord** %5, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btQuadWord* %29, null ; [#uses=1]
- br i1 %30, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad43
- %31 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %32 = bitcast %struct.btQuadWord* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %32)
- to label %bb2.i.i.i unwind label %lpad35
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btQuadWord* null, %struct.btQuadWord** %5, align 4
- br label %ppad
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK18btMultiSphereShape7getNameEv(%struct.btMultiSphereShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([12 x i8]* @.str96, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK18btMultiSphereShape28calculateSerializeBufferSizeEv(%struct.btMultiSphereShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 64
-}
-
-; [#uses=1]
-define void @_ZNK18btMultiSphereShape21calculateLocalInertiaEfR9btVector3(%struct.btMultiSphereShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fsub float %11, %5 ; [#uses=1]
- %13 = fsub float %9, %3 ; [#uses=1]
- %14 = fsub float %7, %1 ; [#uses=1]
- %15 = fmul float %12, 5.000000e-01 ; [#uses=1]
- %16 = fmul float %13, 5.000000e-01 ; [#uses=1]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=1]
- %18 = fmul float %17, 2.000000e+00 ; [#uses=2]
- %19 = fmul float %16, 2.000000e+00 ; [#uses=2]
- %20 = fmul float %15, 2.000000e+00 ; [#uses=2]
- %21 = fdiv float %mass, 1.200000e+01 ; [#uses=3]
- %22 = fmul float %18, %18 ; [#uses=2]
- %23 = fmul float %19, %19 ; [#uses=2]
- %24 = fadd float %22, %23 ; [#uses=1]
- %25 = fmul float %21, %24 ; [#uses=1]
- %26 = fmul float %20, %20 ; [#uses=2]
- %27 = fadd float %22, %26 ; [#uses=1]
- %28 = fmul float %21, %27 ; [#uses=1]
- %29 = fadd float %23, %26 ; [#uses=1]
- %30 = fmul float %21, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %30, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %28, float* %32, align 4
- %33 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %25, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK18btMultiSphereShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btMultiSphereShape* %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb.nph38, label %return
-
-bb.nph38: ; preds = %entry
- %1 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb5, %bb.nph38
- %j.037 = phi i32 [ 0, %bb.nph38 ], [ %50, %bb5 ] ; [#uses=8]
- %scevgep4344 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %j.037, i32 0, i32 0 ; [#uses=1]
- %scevgep45 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.037, i32 0, i32 1 ; [#uses=1]
- %scevgep46 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.037, i32 0, i32 2 ; [#uses=1]
- %scevgep47 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.037, i32 0, i32 3 ; [#uses=1]
- %scevgep48 = getelementptr %struct.btQuadWord* %vectors, i32 %j.037, i32 0, i32 2 ; [#uses=1]
- %scevgep49 = getelementptr %struct.btQuadWord* %vectors, i32 %j.037, i32 0, i32 1 ; [#uses=1]
- %scevgep5051 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %j.037, i32 0, i32 0 ; [#uses=1]
- %9 = load i32* %3, align 4 ; [#uses=2]
- %10 = icmp sgt i32 %9, 0 ; [#uses=1]
- br i1 %10, label %bb.nph, label %bb5
-
-bb.nph: ; preds = %bb
- %11 = load float** %2, align 4 ; [#uses=1]
- %12 = load %struct.btQuadWord** %1, align 4 ; [#uses=3]
- br label %bb1
-
-bb1: ; preds = %bb3, %bb.nph
- %i.036 = phi i32 [ 0, %bb.nph ], [ %49, %bb3 ] ; [#uses=5]
- %maxDot.133 = phi float [ 0xC3ABC16D60000000, %bb.nph ], [ %maxDot.0, %bb3 ] ; [#uses=2]
- %rad.035 = getelementptr float* %11, i32 %i.036 ; [#uses=1]
- %scevgep = getelementptr %struct.btQuadWord* %12, i32 %i.036, i32 0, i32 2 ; [#uses=1]
- %scevgep39 = getelementptr %struct.btQuadWord* %12, i32 %i.036, i32 0, i32 1 ; [#uses=1]
- %scevgep4041 = getelementptr inbounds %struct.btQuadWord* %12, i32 %i.036, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 11 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %17 = tail call float %16(%struct.btConvexInternalShape* %5) ; [#uses=3]
- %18 = load float* %scevgep48, align 4 ; [#uses=3]
- %19 = fmul float %18, %17 ; [#uses=1]
- %20 = load float* %scevgep49, align 4 ; [#uses=3]
- %21 = fmul float %20, %17 ; [#uses=1]
- %22 = load float* %scevgep5051, align 4 ; [#uses=3]
- %23 = fmul float %22, %17 ; [#uses=1]
- %24 = load float* %6, align 4 ; [#uses=1]
- %25 = fmul float %18, %24 ; [#uses=1]
- %26 = load float* %7, align 4 ; [#uses=1]
- %27 = fmul float %20, %26 ; [#uses=1]
- %28 = load float* %8, align 4 ; [#uses=1]
- %29 = fmul float %22, %28 ; [#uses=1]
- %30 = load float* %rad.035, align 4 ; [#uses=3]
- %31 = fmul float %25, %30 ; [#uses=1]
- %32 = fmul float %27, %30 ; [#uses=1]
- %33 = fmul float %29, %30 ; [#uses=1]
- %34 = load float* %scevgep, align 4 ; [#uses=1]
- %35 = fadd float %34, %31 ; [#uses=1]
- %36 = load float* %scevgep39, align 4 ; [#uses=1]
- %37 = fadd float %36, %32 ; [#uses=1]
- %38 = load float* %scevgep4041, align 4 ; [#uses=1]
- %39 = fadd float %38, %33 ; [#uses=1]
- %40 = fsub float %35, %19 ; [#uses=2]
- %41 = fsub float %37, %21 ; [#uses=2]
- %42 = fsub float %39, %23 ; [#uses=2]
- %43 = fmul float %22, %42 ; [#uses=1]
- %44 = fmul float %20, %41 ; [#uses=1]
- %45 = fadd float %43, %44 ; [#uses=1]
- %46 = fmul float %18, %40 ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=2]
- %48 = fcmp ogt float %47, %maxDot.133 ; [#uses=1]
- br i1 %48, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- store float %42, float* %scevgep4344, align 4
- store float %41, float* %scevgep45, align 4
- store float %40, float* %scevgep46, align 4
- store float 0.000000e+00, float* %scevgep47, align 4
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %maxDot.0 = phi float [ %47, %bb2 ], [ %maxDot.133, %bb1 ] ; [#uses=1]
- %49 = add nsw i32 %i.036, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %49, %9 ; [#uses=1]
- br i1 %exitcond, label %bb5, label %bb1
-
-bb5: ; preds = %bb3, %bb
- %50 = add nsw i32 %j.037, 1 ; [#uses=2]
- %exitcond42 = icmp eq i32 %50, %numVectors ; [#uses=1]
- br i1 %exitcond42, label %return, label %bb
-
-return: ; preds = %bb5, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btMultiSphereShapeD0Ev(%struct.btMultiSphereShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV18btMultiSphereShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %2 = load float** %1, align 4 ; [#uses=2]
- %3 = icmp eq float* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast float* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store float* null, float** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store float* null, float** %1, align 4
- %8 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %11 = load %struct.btQuadWord** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btQuadWord* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btQuadWord* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btQuadWord* null, %struct.btQuadWord** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %16 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %10, align 4
- %17 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %19 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %19)
- %20 = bitcast %struct.btMultiSphereShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %20)
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %21 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %22 = load %struct.btQuadWord** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btQuadWord* %22, null ; [#uses=1]
- br i1 %23, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %lpad18
- %24 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %26 = bitcast %struct.btQuadWord* %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %26)
- to label %bb2.i.i.i42 unwind label %lpad22
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btQuadWord* null, %struct.btQuadWord** %21, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44: ; preds = %bb2.i.i.i42, %lpad18
- %27 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %21, align 4
- %28 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i41
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %30 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %30)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btMultiSphereShapeD1Ev(%struct.btMultiSphereShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV18btMultiSphereShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %2 = load float** %1, align 4 ; [#uses=2]
- %3 = icmp eq float* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast float* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store float* null, float** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store float* null, float** %1, align 4
- %8 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %11 = load %struct.btQuadWord** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btQuadWord* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btQuadWord* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btQuadWord* null, %struct.btQuadWord** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %16 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %10, align 4
- %17 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %19 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %19)
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %20 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %21 = load %struct.btQuadWord** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btQuadWord* %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %lpad18
- %23 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %25 = bitcast %struct.btQuadWord* %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i42 unwind label %lpad22
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btQuadWord* null, %struct.btQuadWord** %20, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44: ; preds = %bb2.i.i.i42, %lpad18
- %26 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %20, align 4
- %27 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %28, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i41
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %ppad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit44 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %29 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %29)
- to label %invcont8 unwind label %lpad26
-}
-
-; [#uses=1]
-define i8* @_ZNK18btMultiSphereShape9serializeEPvP12btSerializer(%struct.btMultiSphereShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 28 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %3 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 32 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %5 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.2.i.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %7 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.3.i.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %9 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %9, float* %8, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %scevgep.i2.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3.i = bitcast i8* %10 to float* ; [#uses=1]
- %11 = load float* %scevgep.i2.i, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.i3.i, align 4
- %scevgep.1.i4.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5.i = getelementptr i8* %dataBuffer, i32 16 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.1.i5.i to float* ; [#uses=1]
- %13 = load float* %scevgep.1.i4.i, align 4 ; [#uses=1]
- store float %13, float* %12, align 4
- %scevgep.2.i6.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7.i = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %14 = bitcast i8* %scevgep4.2.i7.i to float* ; [#uses=1]
- %15 = load float* %scevgep.2.i6.i, align 4 ; [#uses=1]
- store float %15, float* %14, align 4
- %scevgep.3.i8.i = getelementptr %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9.i = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.3.i9.i to float* ; [#uses=1]
- %17 = load float* %scevgep.3.i8.i, align 4 ; [#uses=1]
- store float %17, float* %16, align 4
- %18 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %21 = bitcast i8* %20 to float* ; [#uses=1]
- store float %19, float* %21, align 4
- %22 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=6]
- %24 = icmp eq i32 %23, 0 ; [#uses=1]
- br i1 %24, label %bb7, label %bb3
-
-bb3: ; preds = %entry
- %25 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=3]
- %26 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 7 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %30 = load %struct.btQuadWord** %29, align 4 ; [#uses=1]
- %31 = bitcast %struct.btQuadWord* %30 to i8* ; [#uses=1]
- %32 = bitcast i32 (...)* %28 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %33 = tail call i8* %32(%struct.btActionInterface* %serializer, i8* %31) ; [#uses=1]
- %34 = bitcast i8* %33 to %struct.btPlane* ; [#uses=1]
- %35 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %36 = bitcast i8* %35 to %struct.btPlane** ; [#uses=1]
- store %struct.btPlane* %34, %struct.btPlane** %36, align 4
- %37 = getelementptr inbounds i8* %dataBuffer, i32 56 ; [#uses=1]
- %38 = bitcast i8* %37 to i32* ; [#uses=1]
- store i32 %23, i32* %38, align 4
- %39 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %40 = getelementptr inbounds i32 (...)** %39, i32 4 ; [#uses=1]
- %41 = load i32 (...)** %40, align 4 ; [#uses=1]
- %42 = bitcast i32 (...)* %41 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %43 = tail call %struct.btChunk* %42(%struct.btActionInterface* %serializer, i32 20, i32 %23) ; [#uses=2]
- %44 = icmp sgt i32 %23, 0 ; [#uses=1]
- br i1 %44, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb3
- %45 = getelementptr inbounds %struct.btChunk* %43, i32 0, i32 2 ; [#uses=1]
- %46 = load i8** %45, align 4 ; [#uses=5]
- %47 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb4, %bb.nph
- %i.010 = phi i32 [ 0, %bb.nph ], [ %55, %bb4 ] ; [#uses=7]
- %tmp = mul i32 %i.010, 20 ; [#uses=5]
- %tmp16 = add i32 %tmp, 16 ; [#uses=1]
- %scevgep17 = getelementptr i8* %46, i32 %tmp16 ; [#uses=1]
- %scevgep1718 = bitcast i8* %scevgep17 to float* ; [#uses=1]
- %scevgep19 = getelementptr i8* %46, i32 %tmp ; [#uses=1]
- %scevgep4.i = bitcast i8* %scevgep19 to float* ; [#uses=1]
- %tmp21 = add i32 %tmp, 4 ; [#uses=1]
- %scevgep22 = getelementptr i8* %46, i32 %tmp21 ; [#uses=1]
- %scevgep4.1.i = bitcast i8* %scevgep22 to float* ; [#uses=1]
- %tmp24 = add i32 %tmp, 8 ; [#uses=1]
- %scevgep25 = getelementptr i8* %46, i32 %tmp24 ; [#uses=1]
- %scevgep4.2.i = bitcast i8* %scevgep25 to float* ; [#uses=1]
- %tmp27 = add i32 %tmp, 12 ; [#uses=1]
- %scevgep28 = getelementptr i8* %46, i32 %tmp27 ; [#uses=1]
- %scevgep4.3.i = bitcast i8* %scevgep28 to float* ; [#uses=1]
- %48 = load %struct.btQuadWord** %29, align 4 ; [#uses=4]
- %scevgep.i = getelementptr inbounds %struct.btQuadWord* %48, i32 %i.010, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %49, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btQuadWord* %48, i32 %i.010, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %50, float* %scevgep4.1.i, align 4
- %scevgep.2.i = getelementptr %struct.btQuadWord* %48, i32 %i.010, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %51, float* %scevgep4.2.i, align 4
- %scevgep.3.i = getelementptr %struct.btQuadWord* %48, i32 %i.010, i32 0, i32 3 ; [#uses=1]
- %52 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %52, float* %scevgep4.3.i, align 4
- %53 = load float** %47, align 4 ; [#uses=1]
- %scevgep = getelementptr float* %53, i32 %i.010 ; [#uses=1]
- %54 = load float* %scevgep, align 4 ; [#uses=1]
- store float %54, float* %scevgep1718, align 4
- %55 = add nsw i32 %i.010, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %55, %23 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb4
-
-bb6: ; preds = %bb4, %bb3
- %56 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 5 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = load %struct.btQuadWord** %29, align 4 ; [#uses=1]
- %60 = bitcast %struct.btQuadWord* %59 to i8* ; [#uses=1]
- %61 = bitcast i32 (...)* %58 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %61(%struct.btActionInterface* %serializer, %struct.btChunk* %43, i8* getelementptr inbounds ([20 x i8]* @.str297, i32 0, i32 0), i32 1497453121, i8* %60)
- ret i8* getelementptr inbounds ([23 x i8]* @.str398, i32 0, i32 0)
-
-bb7: ; preds = %entry
- %62 = getelementptr inbounds i8* %dataBuffer, i32 52 ; [#uses=1]
- %63 = bitcast i8* %62 to %struct.btPlane** ; [#uses=1]
- store %struct.btPlane* null, %struct.btPlane** %63, align 4
- %64 = getelementptr inbounds i8* %dataBuffer, i32 56 ; [#uses=1]
- %65 = bitcast i8* %64 to i32* ; [#uses=1]
- store i32 %23, i32* %65, align 4
- ret i8* getelementptr inbounds ([23 x i8]* @.str398, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK18btMultiSphereShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btMultiSphereShape* %this, %struct.btQuadWord* nocapture %vec0) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = fmul float %5, %5 ; [#uses=1]
- %11 = fmul float %7, %7 ; [#uses=1]
- %12 = fadd float %10, %11 ; [#uses=1]
- %13 = fmul float %9, %9 ; [#uses=1]
- %14 = fadd float %12, %13 ; [#uses=2]
- %15 = fcmp olt float %14, 0x3D10000000000000 ; [#uses=1]
- br i1 %15, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %16 = tail call float @sqrtf(float %14) nounwind readonly ; [#uses=1]
- %17 = fdiv float 1.000000e+00, %16 ; [#uses=3]
- %18 = fmul float %5, %17 ; [#uses=1]
- %19 = fmul float %7, %17 ; [#uses=1]
- %20 = fmul float %9, %17 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %entry
- %vec.0.0.0 = phi float [ %18, %bb1 ], [ 1.000000e+00, %entry ] ; [#uses=3]
- %vec.0.1.0 = phi float [ %19, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=3]
- %vec.0.2.0 = phi float [ %20, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=3]
- %21 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %22 = load i32* %21, align 4 ; [#uses=2]
- %23 = icmp sgt i32 %22, 0 ; [#uses=1]
- br i1 %23, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb2
- %24 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %26 = load float** %24, align 4 ; [#uses=1]
- %27 = load %struct.btQuadWord** %25, align 4 ; [#uses=3]
- %28 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btMultiSphereShape* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb5, %bb.nph
- %i.041 = phi i32 [ 0, %bb.nph ], [ %66, %bb5 ] ; [#uses=5]
- %maxDot.140 = phi float [ 0xC3ABC16D60000000, %bb.nph ], [ %maxDot.0, %bb5 ] ; [#uses=2]
- %rad.043 = getelementptr float* %26, i32 %i.041 ; [#uses=1]
- %scevgep = getelementptr %struct.btQuadWord* %27, i32 %i.041, i32 0, i32 2 ; [#uses=1]
- %scevgep44 = getelementptr %struct.btQuadWord* %27, i32 %i.041, i32 0, i32 1 ; [#uses=1]
- %scevgep4546 = getelementptr inbounds %struct.btQuadWord* %27, i32 %i.041, i32 0, i32 0 ; [#uses=1]
- %33 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i32 (...)** %33, i32 11 ; [#uses=1]
- %35 = load i32 (...)** %34, align 4 ; [#uses=1]
- %36 = bitcast i32 (...)* %35 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %37 = tail call float %36(%struct.btConvexInternalShape* %29) ; [#uses=3]
- %38 = fmul float %vec.0.2.0, %37 ; [#uses=1]
- %39 = fmul float %vec.0.1.0, %37 ; [#uses=1]
- %40 = fmul float %vec.0.0.0, %37 ; [#uses=1]
- %41 = load float* %30, align 4 ; [#uses=1]
- %42 = fmul float %vec.0.2.0, %41 ; [#uses=1]
- %43 = load float* %31, align 4 ; [#uses=1]
- %44 = fmul float %vec.0.1.0, %43 ; [#uses=1]
- %45 = load float* %32, align 4 ; [#uses=1]
- %46 = fmul float %vec.0.0.0, %45 ; [#uses=1]
- %47 = load float* %rad.043, align 4 ; [#uses=3]
- %48 = fmul float %42, %47 ; [#uses=1]
- %49 = fmul float %44, %47 ; [#uses=1]
- %50 = fmul float %46, %47 ; [#uses=1]
- %51 = load float* %scevgep, align 4 ; [#uses=1]
- %52 = fadd float %51, %48 ; [#uses=1]
- %53 = load float* %scevgep44, align 4 ; [#uses=1]
- %54 = fadd float %53, %49 ; [#uses=1]
- %55 = load float* %scevgep4546, align 4 ; [#uses=1]
- %56 = fadd float %55, %50 ; [#uses=1]
- %57 = fsub float %52, %38 ; [#uses=2]
- %58 = fsub float %54, %39 ; [#uses=2]
- %59 = fsub float %56, %40 ; [#uses=2]
- %60 = fmul float %vec.0.0.0, %59 ; [#uses=1]
- %61 = fmul float %vec.0.1.0, %58 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %vec.0.2.0, %57 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=2]
- %65 = fcmp ogt float %64, %maxDot.140 ; [#uses=1]
- br i1 %65, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- store float %59, float* %0, align 4
- store float %58, float* %1, align 4
- store float %57, float* %2, align 4
- store float 0.000000e+00, float* %3, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %maxDot.0 = phi float [ %64, %bb4 ], [ %maxDot.140, %bb3 ] ; [#uses=1]
- %66 = add nsw i32 %i.041, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %66, %22 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb3
-
-return: ; preds = %bb5, %bb2
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIfE6resizeEiRKf(%"struct.btAlignedObjectArray<float>"* nocapture %this, i32 %newsize, float* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<float>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<float>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 2 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to float* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi float* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<float>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr float* %11, i32 %indvar.i.i ; [#uses=2]
- %14 = icmp eq float* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %15 = load float** %13, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr float* %15, i32 %indvar.i.i ; [#uses=1]
- %16 = load float* %scevgep8.i.i, align 4 ; [#uses=1]
- store float %16, float* %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond19 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond19, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i
- %17 = getelementptr inbounds %"struct.btAlignedObjectArray<float>"* %this, i32 0, i32 3 ; [#uses=3]
- %18 = load float** %17, align 4 ; [#uses=2]
- %19 = icmp eq float* %18, null ; [#uses=1]
- br i1 %19, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<float>"* %this, i32 0, i32 4 ; [#uses=1]
- %21 = load i8* %20, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %21, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %22 = bitcast float* %18 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %22)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store float* null, float** %17, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<float>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %23, align 4
- store float* %11, float** %17, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<float>"* %this, i32 0, i32 3 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=1]
- %25 = load float** %24, align 4 ; [#uses=1]
- %scevgep18 = getelementptr float* %25, i32 %tmp17 ; [#uses=2]
- %26 = icmp eq float* %scevgep18, null ; [#uses=1]
- br i1 %26, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %27 = load float* %fillData, align 4 ; [#uses=1]
- store float %27, float* %scevgep18, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btMultiSphereShapeC1EPK9btVector3PKfi(%struct.btMultiSphereShape* %this, %struct.btQuadWord* nocapture %positions, float* nocapture %radi, i32 %numSpheres) align 2 {
-entry:
- tail call void @_ZN18btMultiSphereShapeC2EPK9btVector3PKfi(%struct.btMultiSphereShape* %this, %struct.btQuadWord* %positions, float* %radi, i32 %numSpheres)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btOptimizedBvhC2Ev(%struct.btOptimizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btQuantizedBvhC2Ev(%struct.btQuantizedBvh* %0)
- %1 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([10 x i32 (...)*]* @_ZTV14btOptimizedBvh, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallbackD1Ev(%struct..0NodeTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0NodeTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0NodeTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallbackD0Ev(%struct..0NodeTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0NodeTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0NodeTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..0NodeTriangleCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallback28internalProcessTriangleIndexEPS2_ii(%struct..0NodeTriangleCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=4]
- %2 = fcmp olt float %1, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.0.2 = select i1 %2, float %1, float 0x43ABC16D60000000 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=4]
- %5 = fcmp olt float %4, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.1.2 = select i1 %5, float %4, float 0x43ABC16D60000000 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=4]
- %8 = fcmp olt float %7, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.2.2 = select i1 %8, float %7, float 0x43ABC16D60000000 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=4]
- %11 = fcmp olt float %10, 0.000000e+00 ; [#uses=1]
- %aabbMin.0.3.2 = select i1 %11, float %10, float 0.000000e+00 ; [#uses=2]
- %12 = fcmp ogt float %1, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.0.2 = select i1 %12, float %1, float 0xC3ABC16D60000000 ; [#uses=2]
- %13 = fcmp ogt float %4, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.1.2 = select i1 %13, float %4, float 0xC3ABC16D60000000 ; [#uses=2]
- %14 = fcmp ogt float %7, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.2.2 = select i1 %14, float %7, float 0xC3ABC16D60000000 ; [#uses=2]
- %15 = fcmp ogt float %10, 0.000000e+00 ; [#uses=1]
- %aabbMax.0.3.2 = select i1 %15, float %10, float 0.000000e+00 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=4]
- %18 = fcmp olt float %17, %aabbMin.0.0.2 ; [#uses=1]
- %aabbMin.0.0.1 = select i1 %18, float %17, float %aabbMin.0.0.2 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=4]
- %21 = fcmp olt float %20, %aabbMin.0.1.2 ; [#uses=1]
- %aabbMin.0.1.1 = select i1 %21, float %20, float %aabbMin.0.1.2 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- %24 = fcmp olt float %23, %aabbMin.0.2.2 ; [#uses=1]
- %aabbMin.0.2.1 = select i1 %24, float %23, float %aabbMin.0.2.2 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=4]
- %27 = fcmp olt float %26, %aabbMin.0.3.2 ; [#uses=1]
- %aabbMin.0.3.1 = select i1 %27, float %26, float %aabbMin.0.3.2 ; [#uses=2]
- %28 = fcmp olt float %aabbMax.0.0.2, %17 ; [#uses=1]
- %aabbMax.0.0.1 = select i1 %28, float %17, float %aabbMax.0.0.2 ; [#uses=2]
- %29 = fcmp olt float %aabbMax.0.1.2, %20 ; [#uses=1]
- %aabbMax.0.1.1 = select i1 %29, float %20, float %aabbMax.0.1.2 ; [#uses=2]
- %30 = fcmp olt float %aabbMax.0.2.2, %23 ; [#uses=1]
- %aabbMax.0.2.1 = select i1 %30, float %23, float %aabbMax.0.2.2 ; [#uses=2]
- %31 = fcmp olt float %aabbMax.0.3.2, %26 ; [#uses=1]
- %aabbMax.0.3.1 = select i1 %31, float %26, float %aabbMax.0.3.2 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=4]
- %34 = fcmp olt float %33, %aabbMin.0.0.1 ; [#uses=1]
- %aabbMin.0.0.0 = select i1 %34, float %33, float %aabbMin.0.0.1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=4]
- %37 = fcmp olt float %36, %aabbMin.0.1.1 ; [#uses=1]
- %aabbMin.0.1.0 = select i1 %37, float %36, float %aabbMin.0.1.1 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=4]
- %40 = fcmp olt float %39, %aabbMin.0.2.1 ; [#uses=1]
- %aabbMin.0.2.0 = select i1 %40, float %39, float %aabbMin.0.2.1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=4]
- %43 = fcmp olt float %42, %aabbMin.0.3.1 ; [#uses=1]
- %aabbMin.0.3.0 = select i1 %43, float %42, float %aabbMin.0.3.1 ; [#uses=1]
- %44 = fcmp olt float %aabbMax.0.0.1, %33 ; [#uses=1]
- %aabbMax.0.0.0 = select i1 %44, float %33, float %aabbMax.0.0.1 ; [#uses=1]
- %45 = fcmp olt float %aabbMax.0.1.1, %36 ; [#uses=1]
- %aabbMax.0.1.0 = select i1 %45, float %36, float %aabbMax.0.1.1 ; [#uses=1]
- %46 = fcmp olt float %aabbMax.0.2.1, %39 ; [#uses=1]
- %aabbMax.0.2.0 = select i1 %46, float %39, float %aabbMax.0.2.1 ; [#uses=1]
- %47 = fcmp olt float %aabbMax.0.3.1, %42 ; [#uses=1]
- %aabbMax.0.3.0 = select i1 %47, float %42, float %aabbMax.0.3.1 ; [#uses=1]
- %48 = getelementptr inbounds %struct..0NodeTriangleCallback* %this, i32 0, i32 1 ; [#uses=1]
- %49 = load %struct.NodeArray** %48, align 4 ; [#uses=7]
- %50 = getelementptr inbounds %struct.NodeArray* %49, i32 0, i32 1 ; [#uses=5]
- %51 = load i32* %50, align 4 ; [#uses=6]
- %52 = getelementptr inbounds %struct.NodeArray* %49, i32 0, i32 2 ; [#uses=2]
- %53 = load i32* %52, align 4 ; [#uses=2]
- %54 = icmp eq i32 %53, %51 ; [#uses=1]
- br i1 %54, label %bb.i, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE9push_backERKS0_.exit
-
-bb.i: ; preds = %entry
- %55 = icmp eq i32 %51, 0 ; [#uses=1]
- %56 = shl i32 %51, 1 ; [#uses=1]
- %iftmp.196.0.i.i = select i1 %55, i32 1, i32 %56 ; [#uses=4]
- %57 = icmp slt i32 %53, %iftmp.196.0.i.i ; [#uses=1]
- br i1 %57, label %bb.i.i, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE9push_backERKS0_.exit
-
-bb.i.i: ; preds = %bb.i
- %58 = icmp eq i32 %iftmp.196.0.i.i, 0 ; [#uses=1]
- br i1 %58, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %59 = shl i32 %iftmp.196.0.i.i, 6 ; [#uses=1]
- %60 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %59, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %60 to %struct.btOptimizedBvhNode* ; [#uses=1]
- %.pre.i = load i32* %50, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %61 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %51, %bb.i.i ] ; [#uses=2]
- %62 = phi %struct.btOptimizedBvhNode* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %63 = icmp sgt i32 %61, 0 ; [#uses=1]
- br i1 %63, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %64 = getelementptr inbounds %struct.NodeArray* %49, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep85 = getelementptr %struct.btOptimizedBvhNode* %62, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btOptimizedBvhNode* %scevgep85 to i8* ; [#uses=1]
- %65 = load %struct.btOptimizedBvhNode** %64, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btOptimizedBvhNode* %65, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btOptimizedBvhNode* %scevgep to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 64, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %61 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %66 = getelementptr inbounds %struct.NodeArray* %49, i32 0, i32 3 ; [#uses=3]
- %67 = load %struct.btOptimizedBvhNode** %66, align 4 ; [#uses=2]
- %68 = icmp eq %struct.btOptimizedBvhNode* %67, null ; [#uses=1]
- br i1 %68, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %69 = getelementptr inbounds %struct.NodeArray* %49, i32 0, i32 4 ; [#uses=1]
- %70 = load i8* %69, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %70, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %71 = bitcast %struct.btOptimizedBvhNode* %67 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %71)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %66, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %72 = getelementptr inbounds %struct.NodeArray* %49, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %72, align 4
- store %struct.btOptimizedBvhNode* %62, %struct.btOptimizedBvhNode** %66, align 4
- store i32 %iftmp.196.0.i.i, i32* %52, align 4
- %.pre5.i = load i32* %50, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE9push_backERKS0_.exit
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE9push_backERKS0_.exit: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE10deallocateEv.exit.i.i, %bb.i, %entry
- %73 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE10deallocateEv.exit.i.i ], [ %51, %entry ], [ %51, %bb.i ] ; [#uses=11]
- %74 = getelementptr inbounds %struct.NodeArray* %49, i32 0, i32 3 ; [#uses=1]
- %75 = load %struct.btOptimizedBvhNode** %74, align 4 ; [#uses=11]
- %.0 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %aabbMin.0.0.0, float* %.0, align 4
- %.178 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %aabbMin.0.1.0, float* %.178, align 4
- %.280 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %aabbMin.0.2.0, float* %.280, align 4
- %.382 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %aabbMin.0.3.0, float* %.382, align 4
- %.169.0 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %aabbMax.0.0.0, float* %.169.0, align 4
- %.169.1 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %aabbMax.0.1.0, float* %.169.1, align 4
- %.169.2 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %aabbMax.0.2.0, float* %.169.2, align 4
- %.169.3 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %aabbMax.0.3.0, float* %.169.3, align 4
- %.2 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 2 ; [#uses=1]
- store i32 -1, i32* %.2, align 4
- %.3 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 3 ; [#uses=1]
- store i32 %partId, i32* %.3, align 4
- %.4 = getelementptr inbounds %struct.btOptimizedBvhNode* %75, i32 %73, i32 4 ; [#uses=1]
- store i32 %triangleIndex, i32* %.4, align 4
- %76 = load i32* %50, align 4 ; [#uses=1]
- %77 = add nsw i32 %76, 1 ; [#uses=1]
- store i32 %77, i32* %50, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallbackD1Ev(%struct..1QuantizedNodeTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallbackD0Ev(%struct..1QuantizedNodeTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..1QuantizedNodeTriangleCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallback28internalProcessTriangleIndexEPS2_ii(%struct..1QuantizedNodeTriangleCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=4]
- %2 = fcmp olt float %1, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.0.3 = select i1 %2, float %1, float 0x43ABC16D60000000 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=4]
- %5 = fcmp olt float %4, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.1.3 = select i1 %5, float %4, float 0x43ABC16D60000000 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=4]
- %8 = fcmp olt float %7, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.2.3 = select i1 %8, float %7, float 0x43ABC16D60000000 ; [#uses=2]
- %9 = fcmp ogt float %1, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.0.3 = select i1 %9, float %1, float 0xC3ABC16D60000000 ; [#uses=2]
- %10 = fcmp ogt float %4, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.1.3 = select i1 %10, float %4, float 0xC3ABC16D60000000 ; [#uses=2]
- %11 = fcmp ogt float %7, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.2.3 = select i1 %11, float %7, float 0xC3ABC16D60000000 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=4]
- %14 = fcmp olt float %13, %aabbMin.0.0.3 ; [#uses=1]
- %aabbMin.0.0.2 = select i1 %14, float %13, float %aabbMin.0.0.3 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=4]
- %17 = fcmp olt float %16, %aabbMin.0.1.3 ; [#uses=1]
- %aabbMin.0.1.2 = select i1 %17, float %16, float %aabbMin.0.1.3 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=4]
- %20 = fcmp olt float %19, %aabbMin.0.2.3 ; [#uses=1]
- %aabbMin.0.2.2 = select i1 %20, float %19, float %aabbMin.0.2.3 ; [#uses=2]
- %21 = fcmp olt float %aabbMax.0.0.3, %13 ; [#uses=1]
- %aabbMax.0.0.2 = select i1 %21, float %13, float %aabbMax.0.0.3 ; [#uses=2]
- %22 = fcmp olt float %aabbMax.0.1.3, %16 ; [#uses=1]
- %aabbMax.0.1.2 = select i1 %22, float %16, float %aabbMax.0.1.3 ; [#uses=2]
- %23 = fcmp olt float %aabbMax.0.2.3, %19 ; [#uses=1]
- %aabbMax.0.2.2 = select i1 %23, float %19, float %aabbMax.0.2.3 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = fcmp olt float %25, %aabbMin.0.0.2 ; [#uses=1]
- %aabbMin.0.0.1 = select i1 %26, float %25, float %aabbMin.0.0.2 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=4]
- %29 = fcmp olt float %28, %aabbMin.0.1.2 ; [#uses=1]
- %aabbMin.0.1.1 = select i1 %29, float %28, float %aabbMin.0.1.2 ; [#uses=3]
- %30 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=4]
- %32 = fcmp olt float %31, %aabbMin.0.2.2 ; [#uses=1]
- %aabbMin.0.2.1 = select i1 %32, float %31, float %aabbMin.0.2.2 ; [#uses=3]
- %33 = fcmp olt float %aabbMax.0.0.2, %25 ; [#uses=1]
- %aabbMax.0.0.1 = select i1 %33, float %25, float %aabbMax.0.0.2 ; [#uses=3]
- %34 = fcmp olt float %aabbMax.0.1.2, %28 ; [#uses=1]
- %aabbMax.0.1.1 = select i1 %34, float %28, float %aabbMax.0.1.2 ; [#uses=3]
- %35 = fcmp olt float %aabbMax.0.2.2, %31 ; [#uses=1]
- %aabbMax.0.2.1 = select i1 %35, float %31, float %aabbMax.0.2.2 ; [#uses=3]
- %36 = fsub float %aabbMax.0.0.1, %aabbMin.0.0.1 ; [#uses=1]
- %37 = fcmp olt float %36, 0x3F60624DE0000000 ; [#uses=1]
- br i1 %37, label %bb, label %bb1
-
-bb: ; preds = %entry
- %38 = fadd float %aabbMax.0.0.1, 0x3F50624DE0000000 ; [#uses=1]
- %39 = fadd float %aabbMin.0.0.1, 0xBF50624DE0000000 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %aabbMin.0.0.0 = phi float [ %39, %bb ], [ %aabbMin.0.0.1, %entry ] ; [#uses=1]
- %aabbMax.0.0.0 = phi float [ %38, %bb ], [ %aabbMax.0.0.1, %entry ] ; [#uses=1]
- %40 = fsub float %aabbMax.0.1.1, %aabbMin.0.1.1 ; [#uses=1]
- %41 = fcmp olt float %40, 0x3F60624DE0000000 ; [#uses=1]
- br i1 %41, label %bb3, label %bb4
-
-bb3: ; preds = %bb1
- %42 = fadd float %aabbMax.0.1.1, 0x3F50624DE0000000 ; [#uses=1]
- %43 = fadd float %aabbMin.0.1.1, 0xBF50624DE0000000 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb1
- %aabbMin.0.1.0 = phi float [ %43, %bb3 ], [ %aabbMin.0.1.1, %bb1 ] ; [#uses=1]
- %aabbMax.0.1.0 = phi float [ %42, %bb3 ], [ %aabbMax.0.1.1, %bb1 ] ; [#uses=1]
- %44 = fsub float %aabbMax.0.2.1, %aabbMin.0.2.1 ; [#uses=1]
- %45 = fcmp olt float %44, 0x3F60624DE0000000 ; [#uses=1]
- br i1 %45, label %bb6, label %bb7
-
-bb6: ; preds = %bb4
- %46 = fadd float %aabbMax.0.2.1, 0x3F50624DE0000000 ; [#uses=1]
- %47 = fadd float %aabbMin.0.2.1, 0xBF50624DE0000000 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb4
- %aabbMin.0.2.0 = phi float [ %47, %bb6 ], [ %aabbMin.0.2.1, %bb4 ] ; [#uses=1]
- %aabbMax.0.2.0 = phi float [ %46, %bb6 ], [ %aabbMax.0.2.1, %bb4 ] ; [#uses=1]
- %48 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 2 ; [#uses=1]
- %49 = load %struct.btQuantizedBvh** %48, align 4 ; [#uses=6]
- %50 = getelementptr inbounds %struct.btQuantizedBvh* %49, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- %52 = fsub float %aabbMin.0.2.0, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuantizedBvh* %49, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=2]
- %55 = fsub float %aabbMin.0.1.0, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuantizedBvh* %49, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=2]
- %58 = fsub float %aabbMin.0.0.0, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuantizedBvh* %49, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=2]
- %61 = fmul float %52, %60 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btQuantizedBvh* %49, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=2]
- %64 = fmul float %55, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuantizedBvh* %49, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=2]
- %67 = fmul float %58, %66 ; [#uses=1]
- %68 = fptoui float %67 to i16 ; [#uses=1]
- %69 = and i16 %68, -2 ; [#uses=1]
- %70 = fptoui float %64 to i16 ; [#uses=1]
- %71 = and i16 %70, -2 ; [#uses=1]
- %72 = fptoui float %61 to i16 ; [#uses=1]
- %73 = and i16 %72, -2 ; [#uses=1]
- %74 = fsub float %aabbMax.0.2.0, %51 ; [#uses=1]
- %75 = fsub float %aabbMax.0.1.0, %54 ; [#uses=1]
- %76 = fsub float %aabbMax.0.0.0, %57 ; [#uses=1]
- %77 = fmul float %74, %60 ; [#uses=1]
- %78 = fmul float %75, %63 ; [#uses=1]
- %79 = fmul float %76, %66 ; [#uses=1]
- %80 = fadd float %79, 1.000000e+00 ; [#uses=1]
- %81 = fptoui float %80 to i16 ; [#uses=1]
- %82 = or i16 %81, 1 ; [#uses=1]
- %83 = fadd float %78, 1.000000e+00 ; [#uses=1]
- %84 = fptoui float %83 to i16 ; [#uses=1]
- %85 = or i16 %84, 1 ; [#uses=1]
- %86 = fadd float %77, 1.000000e+00 ; [#uses=1]
- %87 = fptoui float %86 to i16 ; [#uses=1]
- %88 = or i16 %87, 1 ; [#uses=1]
- %89 = shl i32 %partId, 21 ; [#uses=1]
- %90 = or i32 %89, %triangleIndex ; [#uses=1]
- %91 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 1 ; [#uses=1]
- %92 = load %struct.QuantizedNodeArray** %91, align 4 ; [#uses=4]
- %93 = getelementptr inbounds %struct.QuantizedNodeArray* %92, i32 0, i32 1 ; [#uses=4]
- %94 = load i32* %93, align 4 ; [#uses=4]
- %95 = getelementptr inbounds %struct.QuantizedNodeArray* %92, i32 0, i32 2 ; [#uses=1]
- %96 = load i32* %95, align 4 ; [#uses=1]
- %97 = icmp eq i32 %96, %94 ; [#uses=1]
- br i1 %97, label %bb.i, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit
-
-bb.i: ; preds = %bb7
- %98 = icmp eq i32 %94, 0 ; [#uses=1]
- %99 = shl i32 %94, 1 ; [#uses=1]
- %iftmp.198.0.i.i = select i1 %98, i32 1, i32 %99 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE7reserveEi(%struct.QuantizedNodeArray* %92, i32 %iftmp.198.0.i.i) inlinehint
- %.pre.i = load i32* %93, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE9push_backERKS0_.exit: ; preds = %bb.i, %bb7
- %100 = phi i32 [ %.pre.i, %bb.i ], [ %94, %bb7 ] ; [#uses=7]
- %101 = getelementptr inbounds %struct.QuantizedNodeArray* %92, i32 0, i32 3 ; [#uses=1]
- %102 = load %struct.BT_QUANTIZED_BVH_NODE** %101, align 4 ; [#uses=7]
- %103 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %100, i32 0, i32 0 ; [#uses=1]
- store i16 %69, i16* %103, align 4
- %104 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %100, i32 0, i32 1 ; [#uses=1]
- store i16 %71, i16* %104, align 2
- %105 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %100, i32 0, i32 2 ; [#uses=1]
- store i16 %73, i16* %105, align 4
- %106 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %100, i32 1, i32 0 ; [#uses=1]
- store i16 %82, i16* %106, align 2
- %107 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %100, i32 1, i32 1 ; [#uses=1]
- store i16 %85, i16* %107, align 2
- %108 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %100, i32 1, i32 2 ; [#uses=1]
- store i16 %88, i16* %108, align 2
- %109 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %102, i32 %100, i32 2 ; [#uses=1]
- store i32 %90, i32* %109, align 4
- %110 = load i32* %93, align 4 ; [#uses=1]
- %111 = add nsw i32 %110, 1 ; [#uses=1]
- store i32 %111, i32* %93, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN14btOptimizedBvh14updateBvhNodesEP23btStridingMeshInterfaceiii(%struct.btOptimizedBvh* nocapture %this, %struct.btStridingMeshInterface* %meshInterface, i32 %firstNode, i32 %endNode, i32 %index) align 2 {
-bb32.preheader:
- %vertexbase = alloca i8*, align 4 ; [#uses=3]
- %numverts = alloca i32, align 4 ; [#uses=2]
- %type = alloca i32, align 4 ; [#uses=3]
- %stride = alloca i32, align 4 ; [#uses=3]
- %indexbase = alloca i8*, align 4 ; [#uses=3]
- %indexstride = alloca i32, align 4 ; [#uses=3]
- %numfaces = alloca i32, align 4 ; [#uses=2]
- %indicestype = alloca i32, align 4 ; [#uses=3]
- %triangleVerts = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=13]
- store i8* null, i8** %vertexbase, align 4
- store i32 0, i32* %numverts, align 4
- store i32 2, i32* %type, align 4
- store i32 0, i32* %stride, align 4
- store i8* null, i8** %indexbase, align 4
- store i32 0, i32* %indexstride, align 4
- store i32 0, i32* %numfaces, align 4
- store i32 2, i32* %indicestype, align 4
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 10, i32 3 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btStridingMeshInterface* %meshInterface, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %meshInterface, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btStridingMeshInterface* %meshInterface, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %4 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btStridingMeshInterface* %meshInterface, i32 0, i32 0 ; [#uses=3]
- br label %bb32.outer
-
-bb3: ; preds = %bb32
- %20 = load %struct.BT_QUANTIZED_BVH_NODE** %0, align 4 ; [#uses=27]
- %scevgep162 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 -2 ; [#uses=1]
- %scevgep162163 = bitcast i16* %scevgep162 to i32* ; [#uses=1]
- %21 = load i32* %scevgep162163, align 4 ; [#uses=1]
- %toBool = icmp slt i32 %21, 0 ; [#uses=1]
- br i1 %toBool, label %bb19, label %bb4
-
-bb4: ; preds = %bb3
- %22 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 2 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=2]
- %24 = ashr i32 %23, 21 ; [#uses=3]
- %25 = icmp eq i32 %24, %curNodeSubPart.2.ph ; [#uses=1]
- br i1 %25, label %bb.nph, label %bb5
-
-bb5: ; preds = %bb4
- %26 = icmp sgt i32 %curNodeSubPart.2.ph, -1 ; [#uses=1]
- br i1 %26, label %bb6, label %bb7
-
-bb6: ; preds = %bb5
- %27 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 6 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- call void %30(%struct.btStridingMeshInterface* %meshInterface, i32 %curNodeSubPart.2.ph)
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %31 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32 (...)** %31, i32 4 ; [#uses=1]
- %33 = load i32 (...)** %32, align 4 ; [#uses=1]
- %34 = bitcast i32 (...)* %33 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %34(%struct.btStridingMeshInterface* %meshInterface, i8** %vertexbase, i32* %numverts, i32* %type, i32* %stride, i8** %indexbase, i32* %indexstride, i32* %numfaces, i32* %indicestype, i32 %24)
- br label %bb.nph
-
-bb.nph: ; preds = %bb7, %bb4
- %curNodeSubPart.0 = phi i32 [ %24, %bb7 ], [ %curNodeSubPart.2.ph, %bb4 ] ; [#uses=1]
- %35 = load i8** %indexbase, align 4 ; [#uses=2]
- %36 = load i32* %indexstride, align 4 ; [#uses=1]
- %tmp106 = and i32 %23, 2097151 ; [#uses=1]
- %tmp107 = mul i32 %36, %tmp106 ; [#uses=2]
- %tmp108 = add i32 %tmp107, 4 ; [#uses=1]
- %tmp112 = add i32 %tmp107, 8 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb16, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb16 ] ; [#uses=4]
- %tmp117 = sub i32 2, %indvar ; [#uses=4]
- %scevgep118119 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp117, i32 0, i32 0 ; [#uses=1]
- %scevgep120 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp117, i32 0, i32 1 ; [#uses=1]
- %scevgep121 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp117, i32 0, i32 2 ; [#uses=1]
- %scevgep122 = getelementptr [3 x %struct.btQuadWord]* %triangleVerts, i32 0, i32 %tmp117, i32 0, i32 3 ; [#uses=1]
- %37 = load i32* %indicestype, align 4 ; [#uses=1]
- %38 = icmp eq i32 %37, 3 ; [#uses=1]
- br i1 %38, label %bb10, label %bb11
-
-bb10: ; preds = %bb9
- %tmp = mul i32 %indvar, -2 ; [#uses=1]
- %tmp109 = add i32 %tmp108, %tmp ; [#uses=1]
- %scevgep = getelementptr i8* %35, i32 %tmp109 ; [#uses=1]
- %scevgep110 = bitcast i8* %scevgep to i16* ; [#uses=1]
- %39 = load i16* %scevgep110, align 2 ; [#uses=1]
- %40 = zext i16 %39 to i32 ; [#uses=1]
- br label %bb12
-
-bb11: ; preds = %bb9
- %tmp111 = mul i32 %indvar, -4 ; [#uses=1]
- %tmp113 = add i32 %tmp112, %tmp111 ; [#uses=1]
- %scevgep114 = getelementptr i8* %35, i32 %tmp113 ; [#uses=1]
- %scevgep114115 = bitcast i8* %scevgep114 to i32* ; [#uses=1]
- %41 = load i32* %scevgep114115, align 4 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10
- %iftmp.164.0 = phi i32 [ %40, %bb10 ], [ %41, %bb11 ] ; [#uses=1]
- %42 = load i32* %type, align 4 ; [#uses=1]
- %43 = icmp eq i32 %42, 0 ; [#uses=1]
- %44 = load i8** %vertexbase, align 4 ; [#uses=5]
- %45 = load i32* %stride, align 4 ; [#uses=1]
- %46 = mul nsw i32 %45, %iftmp.164.0 ; [#uses=5]
- %47 = getelementptr inbounds i8* %44, i32 %46 ; [#uses=2]
- br i1 %43, label %bb13, label %bb14
-
-bb13: ; preds = %bb12
- %48 = bitcast i8* %47 to float* ; [#uses=1]
- %.sum38 = add i32 %46, 8 ; [#uses=1]
- %49 = getelementptr inbounds i8* %44, i32 %.sum38 ; [#uses=1]
- %50 = bitcast i8* %49 to float* ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = load float* %1, align 4 ; [#uses=1]
- %53 = fmul float %51, %52 ; [#uses=1]
- %.sum39 = add i32 %46, 4 ; [#uses=1]
- %54 = getelementptr inbounds i8* %44, i32 %.sum39 ; [#uses=1]
- %55 = bitcast i8* %54 to float* ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = load float* %2, align 4 ; [#uses=1]
- %58 = fmul float %56, %57 ; [#uses=1]
- %59 = load float* %48, align 4 ; [#uses=1]
- %60 = load float* %3, align 4 ; [#uses=1]
- %61 = fmul float %59, %60 ; [#uses=1]
- br label %bb16
-
-bb14: ; preds = %bb12
- %62 = bitcast i8* %47 to double* ; [#uses=1]
- %.sum = add i32 %46, 16 ; [#uses=1]
- %63 = getelementptr inbounds i8* %44, i32 %.sum ; [#uses=1]
- %64 = bitcast i8* %63 to double* ; [#uses=1]
- %65 = load double* %64, align 4 ; [#uses=1]
- %66 = load float* %1, align 4 ; [#uses=1]
- %67 = fpext float %66 to double ; [#uses=1]
- %68 = fmul double %65, %67 ; [#uses=1]
- %69 = fptrunc double %68 to float ; [#uses=1]
- %.sum37 = add i32 %46, 8 ; [#uses=1]
- %70 = getelementptr inbounds i8* %44, i32 %.sum37 ; [#uses=1]
- %71 = bitcast i8* %70 to double* ; [#uses=1]
- %72 = load double* %71, align 4 ; [#uses=1]
- %73 = load float* %2, align 4 ; [#uses=1]
- %74 = fpext float %73 to double ; [#uses=1]
- %75 = fmul double %72, %74 ; [#uses=1]
- %76 = fptrunc double %75 to float ; [#uses=1]
- %77 = load double* %62, align 4 ; [#uses=1]
- %78 = load float* %3, align 4 ; [#uses=1]
- %79 = fpext float %78 to double ; [#uses=1]
- %80 = fmul double %77, %79 ; [#uses=1]
- %81 = fptrunc double %80 to float ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb14, %bb13
- %storemerge174 = phi float [ %61, %bb13 ], [ %81, %bb14 ] ; [#uses=1]
- %storemerge173 = phi float [ %58, %bb13 ], [ %76, %bb14 ] ; [#uses=1]
- %storemerge = phi float [ %53, %bb13 ], [ %69, %bb14 ] ; [#uses=1]
- store float %storemerge174, float* %scevgep118119, align 8
- store float %storemerge173, float* %scevgep120, align 4
- store float %storemerge, float* %scevgep121, align 8
- store float 0.000000e+00, float* %scevgep122, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, 3 ; [#uses=1]
- br i1 %exitcond, label %bb18, label %bb9
-
-bb18: ; preds = %bb16
- %.pre = load float* %4, align 8 ; [#uses=4]
- %.pre175 = load float* %5, align 4 ; [#uses=4]
- %.pre176 = load float* %6, align 8 ; [#uses=4]
- %.pre177 = load float* %7, align 8 ; [#uses=4]
- %.pre178 = load float* %8, align 4 ; [#uses=4]
- %.pre179 = load float* %9, align 8 ; [#uses=4]
- %.pre180 = load float* %10, align 8 ; [#uses=4]
- %.pre181 = load float* %11, align 4 ; [#uses=4]
- %.pre182 = load float* %12, align 8 ; [#uses=4]
- %82 = fcmp olt float %.pre, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.0.2 = select i1 %82, float %.pre, float 0x43ABC16D60000000 ; [#uses=2]
- %83 = fcmp olt float %.pre175, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.1.2 = select i1 %83, float %.pre175, float 0x43ABC16D60000000 ; [#uses=2]
- %84 = fcmp olt float %.pre176, 0x43ABC16D60000000 ; [#uses=1]
- %aabbMin.0.2.2 = select i1 %84, float %.pre176, float 0x43ABC16D60000000 ; [#uses=2]
- %85 = fcmp ogt float %.pre, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.0.2 = select i1 %85, float %.pre, float 0xC3ABC16D60000000 ; [#uses=2]
- %86 = fcmp ogt float %.pre175, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.1.2 = select i1 %86, float %.pre175, float 0xC3ABC16D60000000 ; [#uses=2]
- %87 = fcmp ogt float %.pre176, 0xC3ABC16D60000000 ; [#uses=1]
- %aabbMax.0.2.2 = select i1 %87, float %.pre176, float 0xC3ABC16D60000000 ; [#uses=2]
- %88 = fcmp olt float %.pre177, %aabbMin.0.0.2 ; [#uses=1]
- %aabbMin.0.0.1 = select i1 %88, float %.pre177, float %aabbMin.0.0.2 ; [#uses=2]
- %89 = fcmp olt float %.pre178, %aabbMin.0.1.2 ; [#uses=1]
- %aabbMin.0.1.1 = select i1 %89, float %.pre178, float %aabbMin.0.1.2 ; [#uses=2]
- %90 = fcmp olt float %.pre179, %aabbMin.0.2.2 ; [#uses=1]
- %aabbMin.0.2.1 = select i1 %90, float %.pre179, float %aabbMin.0.2.2 ; [#uses=2]
- %91 = fcmp olt float %aabbMax.0.0.2, %.pre177 ; [#uses=1]
- %aabbMax.0.0.1 = select i1 %91, float %.pre177, float %aabbMax.0.0.2 ; [#uses=2]
- %92 = fcmp olt float %aabbMax.0.1.2, %.pre178 ; [#uses=1]
- %aabbMax.0.1.1 = select i1 %92, float %.pre178, float %aabbMax.0.1.2 ; [#uses=2]
- %93 = fcmp olt float %aabbMax.0.2.2, %.pre179 ; [#uses=1]
- %aabbMax.0.2.1 = select i1 %93, float %.pre179, float %aabbMax.0.2.2 ; [#uses=2]
- %94 = fcmp olt float %.pre180, %aabbMin.0.0.1 ; [#uses=1]
- %aabbMin.0.0.0 = select i1 %94, float %.pre180, float %aabbMin.0.0.1 ; [#uses=1]
- %95 = fcmp olt float %.pre181, %aabbMin.0.1.1 ; [#uses=1]
- %aabbMin.0.1.0 = select i1 %95, float %.pre181, float %aabbMin.0.1.1 ; [#uses=1]
- %96 = fcmp olt float %.pre182, %aabbMin.0.2.1 ; [#uses=1]
- %aabbMin.0.2.0 = select i1 %96, float %.pre182, float %aabbMin.0.2.1 ; [#uses=1]
- %97 = fcmp olt float %aabbMax.0.0.1, %.pre180 ; [#uses=1]
- %aabbMax.0.0.0 = select i1 %97, float %.pre180, float %aabbMax.0.0.1 ; [#uses=1]
- %98 = fcmp olt float %aabbMax.0.1.1, %.pre181 ; [#uses=1]
- %aabbMax.0.1.0 = select i1 %98, float %.pre181, float %aabbMax.0.1.1 ; [#uses=1]
- %99 = fcmp olt float %aabbMax.0.2.1, %.pre182 ; [#uses=1]
- %aabbMax.0.2.0 = select i1 %99, float %.pre182, float %aabbMax.0.2.1 ; [#uses=1]
- %100 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 0, i32 0 ; [#uses=1]
- %101 = load float* %13, align 4 ; [#uses=1]
- %102 = fsub float %aabbMin.0.2.0, %101 ; [#uses=1]
- %103 = load float* %14, align 4 ; [#uses=1]
- %104 = fsub float %aabbMin.0.1.0, %103 ; [#uses=1]
- %105 = load float* %15, align 4 ; [#uses=1]
- %106 = fsub float %aabbMin.0.0.0, %105 ; [#uses=1]
- %107 = load float* %16, align 4 ; [#uses=1]
- %108 = fmul float %102, %107 ; [#uses=1]
- %109 = load float* %17, align 4 ; [#uses=1]
- %110 = fmul float %104, %109 ; [#uses=1]
- %111 = load float* %18, align 4 ; [#uses=1]
- %112 = fmul float %106, %111 ; [#uses=1]
- %113 = fptoui float %112 to i16 ; [#uses=1]
- %114 = and i16 %113, -2 ; [#uses=1]
- store i16 %114, i16* %100, align 2
- %115 = fptoui float %110 to i16 ; [#uses=1]
- %116 = and i16 %115, -2 ; [#uses=1]
- %117 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 0, i32 1 ; [#uses=1]
- store i16 %116, i16* %117, align 2
- %118 = fptoui float %108 to i16 ; [#uses=1]
- %119 = and i16 %118, -2 ; [#uses=1]
- %120 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 0, i32 2 ; [#uses=1]
- store i16 %119, i16* %120, align 2
- %121 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 1, i32 0 ; [#uses=1]
- %122 = load float* %13, align 4 ; [#uses=1]
- %123 = fsub float %aabbMax.0.2.0, %122 ; [#uses=1]
- %124 = load float* %14, align 4 ; [#uses=1]
- %125 = fsub float %aabbMax.0.1.0, %124 ; [#uses=1]
- %126 = load float* %15, align 4 ; [#uses=1]
- %127 = fsub float %aabbMax.0.0.0, %126 ; [#uses=1]
- %128 = load float* %16, align 4 ; [#uses=1]
- %129 = fmul float %123, %128 ; [#uses=1]
- %130 = load float* %17, align 4 ; [#uses=1]
- %131 = fmul float %125, %130 ; [#uses=1]
- %132 = load float* %18, align 4 ; [#uses=1]
- %133 = fmul float %127, %132 ; [#uses=1]
- %134 = fadd float %133, 1.000000e+00 ; [#uses=1]
- %135 = fptoui float %134 to i16 ; [#uses=1]
- %136 = or i16 %135, 1 ; [#uses=1]
- store i16 %136, i16* %121, align 2
- %137 = fadd float %131, 1.000000e+00 ; [#uses=1]
- %138 = fptoui float %137 to i16 ; [#uses=1]
- %139 = or i16 %138, 1 ; [#uses=1]
- %140 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 1, i32 1 ; [#uses=1]
- store i16 %139, i16* %140, align 2
- %141 = fadd float %129, 1.000000e+00 ; [#uses=1]
- %142 = fptoui float %141 to i16 ; [#uses=1]
- %143 = or i16 %142, 1 ; [#uses=1]
- %144 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 1, i32 2 ; [#uses=1]
- store i16 %143, i16* %144, align 2
- br label %bb32.outer
-
-bb32.outer: ; preds = %bb18, %bb32.preheader
- %curNodeSubPart.2.ph = phi i32 [ %curNodeSubPart.0, %bb18 ], [ -1, %bb32.preheader ] ; [#uses=6]
- %i.0.in.ph = phi i32 [ %i.0, %bb18 ], [ %endNode, %bb32.preheader ] ; [#uses=3]
- %tmp129 = add i32 %i.0.in.ph, -1 ; [#uses=1]
- %tmp164 = add i32 %i.0.in.ph, 1 ; [#uses=1]
- br label %bb32
-
-bb19: ; preds = %bb3
- %scevgep169 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 2 ; [#uses=1]
- %145 = load i32* %scevgep169, align 4 ; [#uses=2]
- %tmp167 = sub i32 %tmp139, %145 ; [#uses=1]
- %toBool20 = icmp slt i32 %145, 0 ; [#uses=2]
- %tmp167.tmp165 = select i1 %toBool20, i32 %tmp167, i32 %tmp165 ; [#uses=8]
- %tmp165.pn = select i1 %toBool20, i32 %tmp167.tmp165, i32 %tmp167.tmp165 ; [#uses=0]
- %scevgep132 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp167.tmp165, i32 0, i32 0 ; [#uses=1]
- %scevgep136 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp167.tmp165, i32 1, i32 0 ; [#uses=1]
- %scevgep128 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 0 ; [#uses=1]
- %146 = load i16* %scevgep128, align 2 ; [#uses=2]
- %scevgep147148 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %i.0, i32 0, i32 0 ; [#uses=2]
- store i16 %146, i16* %scevgep147148, align 2
- %147 = load i16* %scevgep132, align 2 ; [#uses=2]
- %148 = icmp ugt i16 %146, %147 ; [#uses=1]
- br i1 %148, label %bb26, label %bb27
-
-bb26: ; preds = %bb19
- store i16 %147, i16* %scevgep147148, align 2
- br label %bb27
-
-bb27: ; preds = %bb26, %bb19
- %scevgep133 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 1, i32 0 ; [#uses=1]
- %149 = load i16* %scevgep133, align 2 ; [#uses=2]
- %scevgep158 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 -5 ; [#uses=2]
- store i16 %149, i16* %scevgep158, align 2
- %150 = load i16* %scevgep136, align 2 ; [#uses=2]
- %151 = icmp ult i16 %149, %150 ; [#uses=1]
- br i1 %151, label %bb28, label %bb29
-
-bb28: ; preds = %bb27
- store i16 %150, i16* %scevgep158, align 2
- br label %bb29
-
-bb29: ; preds = %bb28, %bb27
- %scevgep132.1 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp167.tmp165, i32 0, i32 1 ; [#uses=1]
- %scevgep136.1 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp167.tmp165, i32 1, i32 1 ; [#uses=1]
- %scevgep128.1 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 1 ; [#uses=1]
- %152 = load i16* %scevgep128.1, align 2 ; [#uses=2]
- %scevgep143 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 -7 ; [#uses=2]
- store i16 %152, i16* %scevgep143, align 2
- %153 = load i16* %scevgep132.1, align 2 ; [#uses=2]
- %154 = icmp ugt i16 %152, %153 ; [#uses=1]
- br i1 %154, label %bb26.1, label %bb27.1
-
-bb32.loopexit: ; preds = %bb28.2, %bb27.2
- %indvar.next125 = add i32 %indvar124, 1 ; [#uses=1]
- br label %bb32
-
-bb32: ; preds = %bb32.loopexit, %bb32.outer
- %indvar124 = phi i32 [ 0, %bb32.outer ], [ %indvar.next125, %bb32.loopexit ] ; [#uses=4]
- %tmp139 = sub i32 %i.0.in.ph, %indvar124 ; [#uses=14]
- %i.0 = sub i32 %tmp129, %indvar124 ; [#uses=10]
- %tmp165 = sub i32 %tmp164, %indvar124 ; [#uses=1]
- %155 = icmp slt i32 %i.0, %firstNode ; [#uses=1]
- br i1 %155, label %bb33, label %bb3
-
-bb33: ; preds = %bb32
- %156 = icmp sgt i32 %curNodeSubPart.2.ph, -1 ; [#uses=1]
- br i1 %156, label %bb34, label %return
-
-bb34: ; preds = %bb33
- %157 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %158 = getelementptr inbounds i32 (...)** %157, i32 6 ; [#uses=1]
- %159 = load i32 (...)** %158, align 4 ; [#uses=1]
- %160 = bitcast i32 (...)* %159 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- call void %160(%struct.btStridingMeshInterface* %meshInterface, i32 %curNodeSubPart.2.ph)
- ret void
-
-return: ; preds = %bb33
- ret void
-
-bb29.1: ; preds = %bb28.1, %bb27.1
- %scevgep132.2 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp167.tmp165, i32 0, i32 2 ; [#uses=1]
- %scevgep136.2 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp167.tmp165, i32 1, i32 2 ; [#uses=1]
- %scevgep128.2 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 2 ; [#uses=1]
- %161 = load i16* %scevgep128.2, align 2 ; [#uses=2]
- %scevgep141 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 -6 ; [#uses=2]
- store i16 %161, i16* %scevgep141, align 2
- %162 = load i16* %scevgep132.2, align 2 ; [#uses=2]
- %163 = icmp ugt i16 %161, %162 ; [#uses=1]
- br i1 %163, label %bb26.2, label %bb27.2
-
-bb27.1: ; preds = %bb26.1, %bb29
- %scevgep133.1 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 1, i32 1 ; [#uses=1]
- %164 = load i16* %scevgep133.1, align 2 ; [#uses=2]
- %scevgep154 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 -4 ; [#uses=2]
- store i16 %164, i16* %scevgep154, align 2
- %165 = load i16* %scevgep136.1, align 2 ; [#uses=2]
- %166 = icmp ult i16 %164, %165 ; [#uses=1]
- br i1 %166, label %bb28.1, label %bb29.1
-
-bb26.1: ; preds = %bb29
- store i16 %153, i16* %scevgep143, align 2
- br label %bb27.1
-
-bb28.1: ; preds = %bb27.1
- store i16 %165, i16* %scevgep154, align 2
- br label %bb29.1
-
-bb27.2: ; preds = %bb26.2, %bb29.1
- %scevgep133.2 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 1, i32 2 ; [#uses=1]
- %167 = load i16* %scevgep133.2, align 2 ; [#uses=2]
- %scevgep150 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %20, i32 %tmp139, i32 0, i32 -3 ; [#uses=2]
- store i16 %167, i16* %scevgep150, align 2
- %168 = load i16* %scevgep136.2, align 2 ; [#uses=2]
- %169 = icmp ult i16 %167, %168 ; [#uses=1]
- br i1 %169, label %bb28.2, label %bb32.loopexit
-
-bb26.2: ; preds = %bb29.1
- store i16 %162, i16* %scevgep141, align 2
- br label %bb27.2
-
-bb28.2: ; preds = %bb27.2
- store i16 %168, i16* %scevgep150, align 2
- br label %bb32.loopexit
-}
-
-; [#uses=1]
-define void @_ZN14btOptimizedBvh12refitPartialEP23btStridingMeshInterfaceRK9btVector3S4_(%struct.btOptimizedBvh* nocapture %this, %struct.btStridingMeshInterface* %meshInterface, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fmul float %4, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fmul float %9, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fmul float %14, %22 ; [#uses=1]
- %24 = fptoui float %23 to i16 ; [#uses=1]
- %25 = and i16 %24, -2 ; [#uses=1]
- %26 = fptoui float %20 to i16 ; [#uses=1]
- %27 = and i16 %26, -2 ; [#uses=1]
- %28 = fptoui float %17 to i16 ; [#uses=1]
- %29 = and i16 %28, -2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fsub float %31, %3 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fsub float %34, %8 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fsub float %37, %13 ; [#uses=1]
- %39 = fmul float %32, %16 ; [#uses=1]
- %40 = fmul float %35, %19 ; [#uses=1]
- %41 = fmul float %38, %22 ; [#uses=1]
- %42 = fadd float %41, 1.000000e+00 ; [#uses=1]
- %43 = fptoui float %42 to i16 ; [#uses=1]
- %44 = or i16 %43, 1 ; [#uses=1]
- %45 = fadd float %40, 1.000000e+00 ; [#uses=1]
- %46 = fptoui float %45 to i16 ; [#uses=1]
- %47 = or i16 %46, 1 ; [#uses=1]
- %48 = fadd float %39, 1.000000e+00 ; [#uses=1]
- %49 = fptoui float %48 to i16 ; [#uses=1]
- %50 = or i16 %49, 1 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 1 ; [#uses=2]
- %52 = load i32* %51, align 4 ; [#uses=1]
- %53 = icmp sgt i32 %52, 0 ; [#uses=1]
- br i1 %53, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %54 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 3 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 10, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %56 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=10]
- %tmp = add i32 %56, 1 ; [#uses=2]
- %57 = load %struct.btBvhSubtreeInfo** %54, align 4 ; [#uses=8]
- %scevgep = getelementptr %struct.btBvhSubtreeInfo* %57, i32 %56, i32 1, i32 0 ; [#uses=2]
- %58 = load i16* %scevgep, align 2 ; [#uses=1]
- %59 = icmp ule i16 %25, %58 ; [#uses=1]
- %scevgep67 = getelementptr inbounds %struct.btBvhSubtreeInfo* %57, i32 %56, i32 0, i32 0 ; [#uses=2]
- %60 = load i16* %scevgep67, align 2 ; [#uses=1]
- %61 = icmp uge i16 %44, %60 ; [#uses=1]
- %62 = and i1 %59, %61 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btBvhSubtreeInfo* %57, i32 %56, i32 1, i32 2 ; [#uses=2]
- %63 = load i16* %scevgep8, align 2 ; [#uses=1]
- %64 = icmp ule i16 %29, %63 ; [#uses=1]
- %65 = and i1 %62, %64 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btBvhSubtreeInfo* %57, i32 %56, i32 0, i32 2 ; [#uses=2]
- %66 = load i16* %scevgep9, align 2 ; [#uses=1]
- %67 = icmp uge i16 %50, %66 ; [#uses=1]
- %68 = and i1 %65, %67 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btBvhSubtreeInfo* %57, i32 %56, i32 1, i32 1 ; [#uses=2]
- %69 = load i16* %scevgep10, align 2 ; [#uses=1]
- %70 = icmp ule i16 %27, %69 ; [#uses=1]
- %71 = and i1 %68, %70 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btBvhSubtreeInfo* %57, i32 %56, i32 0, i32 1 ; [#uses=2]
- %72 = load i16* %scevgep11, align 2 ; [#uses=1]
- %73 = icmp uge i16 %47, %72 ; [#uses=1]
- %74 = and i1 %71, %73 ; [#uses=1]
- br i1 %74, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %scevgep12 = getelementptr %struct.btBvhSubtreeInfo* %57, i32 %56, i32 2 ; [#uses=2]
- %75 = load i32* %scevgep12, align 4 ; [#uses=2]
- %scevgep13 = getelementptr %struct.btBvhSubtreeInfo* %57, i32 %56, i32 3 ; [#uses=1]
- %76 = load i32* %scevgep13, align 4 ; [#uses=1]
- %77 = add nsw i32 %76, %75 ; [#uses=1]
- tail call void @_ZN14btOptimizedBvh14updateBvhNodesEP23btStridingMeshInterfaceiii(%struct.btOptimizedBvh* %this, %struct.btStridingMeshInterface* %meshInterface, i32 %75, i32 %77, i32 %56)
- %78 = load i32* %scevgep12, align 4 ; [#uses=6]
- %79 = load %struct.BT_QUANTIZED_BVH_NODE** %55, align 4 ; [#uses=6]
- %80 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %79, i32 %78, i32 0, i32 0 ; [#uses=1]
- %81 = load i16* %80, align 2 ; [#uses=1]
- store i16 %81, i16* %scevgep67, align 2
- %82 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %79, i32 %78, i32 0, i32 1 ; [#uses=1]
- %83 = load i16* %82, align 2 ; [#uses=1]
- store i16 %83, i16* %scevgep11, align 2
- %84 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %79, i32 %78, i32 0, i32 2 ; [#uses=1]
- %85 = load i16* %84, align 2 ; [#uses=1]
- store i16 %85, i16* %scevgep9, align 2
- %86 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %79, i32 %78, i32 1, i32 0 ; [#uses=1]
- %87 = load i16* %86, align 2 ; [#uses=1]
- store i16 %87, i16* %scevgep, align 2
- %88 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %79, i32 %78, i32 1, i32 1 ; [#uses=1]
- %89 = load i16* %88, align 2 ; [#uses=1]
- store i16 %89, i16* %scevgep10, align 2
- %90 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %79, i32 %78, i32 1, i32 2 ; [#uses=1]
- %91 = load i16* %90, align 2 ; [#uses=1]
- store i16 %91, i16* %scevgep8, align 2
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %92 = load i32* %51, align 4 ; [#uses=1]
- %93 = icmp sgt i32 %92, %tmp ; [#uses=1]
- br i1 %93, label %bb, label %return
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK14btOptimizedBvh16serializeInPlaceEPvjb(%struct.btOptimizedBvh* %this, i8* %o_alignedDataBuffer, i32 %i_dataBufferSize, i8 zeroext %i_swapEndian) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call zeroext i8 @_ZNK14btQuantizedBvh9serializeEPvjb(%struct.btQuantizedBvh* %0, i8* %o_alignedDataBuffer, i32 %i_dataBufferSize, i8 zeroext %i_swapEndian) ; [#uses=1]
- ret i8 %1
-}
-
-; [#uses=0]
-define %struct.btOptimizedBvh* @_ZN14btOptimizedBvh18deSerializeInPlaceEPvjb(i8* %i_alignedDataBuffer, i32 %i_dataBufferSize, i8 zeroext %i_swapEndian) align 2 {
-entry:
- %0 = tail call %struct.btQuantizedBvh* @_ZN14btQuantizedBvh18deSerializeInPlaceEPvjb(i8* %i_alignedDataBuffer, i32 %i_dataBufferSize, i8 zeroext %i_swapEndian) ; [#uses=1]
- %1 = bitcast %struct.btQuantizedBvh* %0 to %struct.btOptimizedBvh* ; [#uses=1]
- ret %struct.btOptimizedBvh* %1
-}
-
-; [#uses=1]
-define void @_ZN14btOptimizedBvh5refitEP23btStridingMeshInterfaceRK9btVector3S4_(%struct.btOptimizedBvh* %this, %struct.btStridingMeshInterface* %meshInterface, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btQuantizedBvh21setQuantizationValuesERK9btVector3S2_f(%struct.btQuantizedBvh* %2, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax, float 1.000000e+00)
- %3 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- tail call void @_ZN14btOptimizedBvh14updateBvhNodesEP23btStridingMeshInterfaceiii(%struct.btOptimizedBvh* %this, %struct.btStridingMeshInterface* %meshInterface, i32 0, i32 %4, i32 0)
- %5 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 1 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp sgt i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb
- %8 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 3 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 10, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %25, %bb1 ] ; [#uses=8]
- %10 = load %struct.btBvhSubtreeInfo** %8, align 4 ; [#uses=7]
- %scevgep = getelementptr %struct.btBvhSubtreeInfo* %10, i32 %i.05, i32 2 ; [#uses=1]
- %11 = load i32* %scevgep, align 4 ; [#uses=6]
- %12 = load %struct.BT_QUANTIZED_BVH_NODE** %9, align 4 ; [#uses=6]
- %13 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %11, i32 0, i32 0 ; [#uses=1]
- %14 = load i16* %13, align 2 ; [#uses=1]
- %scevgep67 = getelementptr inbounds %struct.btBvhSubtreeInfo* %10, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- store i16 %14, i16* %scevgep67, align 2
- %15 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %11, i32 0, i32 1 ; [#uses=1]
- %16 = load i16* %15, align 2 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btBvhSubtreeInfo* %10, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- store i16 %16, i16* %scevgep8, align 2
- %17 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %11, i32 0, i32 2 ; [#uses=1]
- %18 = load i16* %17, align 2 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btBvhSubtreeInfo* %10, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- store i16 %18, i16* %scevgep9, align 2
- %19 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %11, i32 1, i32 0 ; [#uses=1]
- %20 = load i16* %19, align 2 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btBvhSubtreeInfo* %10, i32 %i.05, i32 1, i32 0 ; [#uses=1]
- store i16 %20, i16* %scevgep10, align 2
- %21 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %11, i32 1, i32 1 ; [#uses=1]
- %22 = load i16* %21, align 2 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btBvhSubtreeInfo* %10, i32 %i.05, i32 1, i32 1 ; [#uses=1]
- store i16 %22, i16* %scevgep11, align 2
- %23 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %11, i32 1, i32 2 ; [#uses=1]
- %24 = load i16* %23, align 2 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btBvhSubtreeInfo* %10, i32 %i.05, i32 1, i32 2 ; [#uses=1]
- store i16 %24, i16* %scevgep12, align 2
- %25 = add nsw i32 %i.05, 1 ; [#uses=2]
- %26 = load i32* %5, align 4 ; [#uses=1]
- %27 = icmp sgt i32 %26, %25 ; [#uses=1]
- br i1 %27, label %bb1, label %return
-
-return: ; preds = %bb1, %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN20NodeTriangleCallbackD2Ev(%struct..0NodeTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0NodeTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0NodeTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_(%struct.btOptimizedBvh* %this, %struct.btStridingMeshInterface* %triangles, i8 zeroext %useQuantizedAabbCompression, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax) align 2 {
-entry:
- %callback = alloca %struct..1QuantizedNodeTriangleCallback, align 8 ; [#uses=4]
- %callback7 = alloca %struct..0NodeTriangleCallback, align 8 ; [#uses=3]
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 6 ; [#uses=2]
- store i8 %useQuantizedAabbCompression, i8* %0, align 4
- %toBool = icmp eq i8 %useQuantizedAabbCompression, 0 ; [#uses=1]
- br i1 %toBool, label %bb6, label %bb
-
-bb: ; preds = %entry
- %1 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=2]
- call void @_ZN14btQuantizedBvh21setQuantizationValuesERK9btVector3S2_f(%struct.btQuantizedBvh* %1, %struct.btQuadWord* %bvhAabbMin, %struct.btQuadWord* %bvhAabbMax, float 1.000000e+00)
- %2 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 9 ; [#uses=1]
- %3 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %callback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback, i32 0, i32 2), i32 (...)*** %3, align 8
- %4 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %callback, i32 0, i32 1 ; [#uses=1]
- store %struct.QuantizedNodeArray* %2, %struct.QuantizedNodeArray** %4, align 4
- %5 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %callback, i32 0, i32 2 ; [#uses=1]
- store %struct.btQuantizedBvh* %1, %struct.btQuantizedBvh** %5, align 8
- %6 = getelementptr inbounds %struct.btStridingMeshInterface* %triangles, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 2 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = bitcast i32 (...)* %9 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %13 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %callback, i32 0, i32 0 ; [#uses=3]
- invoke void %12(%struct.btStridingMeshInterface* %triangles, %struct.btActionInterface* %13, %struct.btQuadWord* %11, %struct.btQuadWord* %10)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %14 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 9, i32 1 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=2]
- %16 = shl i32 %15, 1 ; [#uses=4]
- %17 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 10, i32 1 ; [#uses=2]
- %18 = load i32* %17, align 4 ; [#uses=3]
- %19 = icmp slt i32 %18, %16 ; [#uses=1]
- br i1 %19, label %bb.nph.i, label %bb5
-
-bb.nph.i: ; preds = %invcont
- %20 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 10 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE7reserveEi(%struct.QuantizedNodeArray* %20, i32 %16) inlinehint
- to label %.noexc unwind label %lpad
-
-.noexc: ; preds = %bb.nph.i
- %21 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 10, i32 3 ; [#uses=1]
- %tmp152 = sub i32 %16, %18 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb7.i, %.noexc
- %indvar.i = phi i32 [ 0, %.noexc ], [ %indvar.next.i, %bb7.i ] ; [#uses=2]
- %tmp153 = add i32 %18, %indvar.i ; [#uses=1]
- %22 = load %struct.BT_QUANTIZED_BVH_NODE** %21, align 4 ; [#uses=1]
- %scevgep15.i = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %tmp153, i32 0, i32 0 ; [#uses=1]
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp152 ; [#uses=1]
- %scevgep15.i168 = bitcast i16* %scevgep15.i to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %scevgep15.i168, i8 0, i64 16, i32 4, i1 false)
- br i1 %exitcond, label %bb5, label %bb7.i
-
-bb5: ; preds = %bb7.i, %invcont
- store i32 %16, i32* %17, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback, i32 0, i32 2), i32 (...)*** %3, align 8
- call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %13)
- br label %bb16
-
-bb6: ; preds = %entry
- %23 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 7 ; [#uses=1]
- %24 = getelementptr inbounds %struct..0NodeTriangleCallback* %callback7, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback, i32 0, i32 2), i32 (...)*** %24, align 8
- %25 = getelementptr inbounds %struct..0NodeTriangleCallback* %callback7, i32 0, i32 1 ; [#uses=1]
- store %struct.NodeArray* %23, %struct.NodeArray** %25, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %26, align 8
- %27 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %28, align 8
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %30, align 8
- %31 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %32, align 8
- %33 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btStridingMeshInterface* %triangles, i32 0, i32 0 ; [#uses=1]
- %35 = load i32 (...)*** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32 (...)** %35, i32 2 ; [#uses=1]
- %37 = load i32 (...)** %36, align 4 ; [#uses=1]
- %38 = bitcast i32 (...)* %37 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %39 = getelementptr inbounds %struct..0NodeTriangleCallback* %callback7, i32 0, i32 0 ; [#uses=3]
- invoke void %38(%struct.btStridingMeshInterface* %triangles, %struct.btActionInterface* %39, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %invcont8 unwind label %lpad38
-
-invcont8: ; preds = %bb6
- %40 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 7, i32 1 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=3]
- %42 = shl i32 %41, 1 ; [#uses=6]
- %43 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 8, i32 1 ; [#uses=3]
- %44 = load i32* %43, align 4 ; [#uses=3]
- %45 = icmp sgt i32 %44, %42 ; [#uses=1]
- %.not = xor i1 %45, true ; [#uses=1]
- %46 = icmp slt i32 %44, %42 ; [#uses=1]
- %or.cond = and i1 %.not, %46 ; [#uses=1]
- br i1 %or.cond, label %bb4.i, label %bb15
-
-bb4.i: ; preds = %invcont8
- %47 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 8, i32 2 ; [#uses=2]
- %48 = load i32* %47, align 4 ; [#uses=1]
- %49 = icmp slt i32 %48, %42 ; [#uses=1]
- br i1 %49, label %bb.i.i57, label %bb15
-
-bb.i.i57: ; preds = %bb4.i
- %50 = icmp eq i32 %42, 0 ; [#uses=1]
- br i1 %50, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i, label %bb.i2.i.i60
-
-bb.i2.i.i60: ; preds = %bb.i.i57
- %51 = shl i32 %41, 7 ; [#uses=1]
- %52 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %51, i32 16)
- to label %.noexc82 unwind label %lpad38 ; [#uses=1]
-
-.noexc82: ; preds = %bb.i2.i.i60
- %phitmp.i.i58 = bitcast i8* %52 to %struct.btOptimizedBvhNode* ; [#uses=1]
- %.pre.i59 = load i32* %43, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i: ; preds = %.noexc82, %bb.i.i57
- %53 = phi i32 [ %.pre.i59, %.noexc82 ], [ %44, %bb.i.i57 ] ; [#uses=2]
- %54 = phi %struct.btOptimizedBvhNode* [ %phitmp.i.i58, %.noexc82 ], [ null, %bb.i.i57 ] ; [#uses=2]
- %55 = icmp sgt i32 %53, 0 ; [#uses=1]
- br i1 %55, label %bb.nph.i.i.i61, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i61: ; preds = %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %56 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 8, i32 3 ; [#uses=1]
- br label %bb.i4.i.i68
-
-bb.i4.i.i68: ; preds = %bb.i4.i.i68, %bb.nph.i.i.i61
- %indvar.i.i.i62 = phi i32 [ 0, %bb.nph.i.i.i61 ], [ %indvar.next.i.i.i67, %bb.i4.i.i68 ] ; [#uses=3]
- %scevgep161 = getelementptr %struct.btOptimizedBvhNode* %54, i32 %indvar.i.i.i62 ; [#uses=1]
- %scevgep5.i.i.i64 = bitcast %struct.btOptimizedBvhNode* %scevgep161 to i8* ; [#uses=1]
- %57 = load %struct.btOptimizedBvhNode** %56, align 4 ; [#uses=1]
- %scevgep159 = getelementptr %struct.btOptimizedBvhNode* %57, i32 %indvar.i.i.i62 ; [#uses=1]
- %scevgep67.i.i.i66 = bitcast %struct.btOptimizedBvhNode* %scevgep159 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i64, i8* %scevgep67.i.i.i66, i32 64, i32 4, i1 false) nounwind
- %indvar.next.i.i.i67 = add i32 %indvar.i.i.i62, 1 ; [#uses=2]
- %exitcond158 = icmp eq i32 %indvar.next.i.i.i67, %53 ; [#uses=1]
- br i1 %exitcond158, label %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i68
-
-_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i68, %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE8allocateEi.exit.i.i
- %58 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 8, i32 3 ; [#uses=3]
- %59 = load %struct.btOptimizedBvhNode** %58, align 4 ; [#uses=2]
- %60 = icmp eq %struct.btOptimizedBvhNode* %59, null ; [#uses=1]
- br i1 %60, label %bb8.preheader.i, label %bb.i.i.i70
-
-bb.i.i.i70: ; preds = %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %61 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 8, i32 4 ; [#uses=1]
- %62 = load i8* %61, align 4 ; [#uses=1]
- %toBool.i.i.i69 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool.i.i.i69, label %bb2.i.i.i72, label %bb1.i.i.i71
-
-bb1.i.i.i71: ; preds = %bb.i.i.i70
- %63 = bitcast %struct.btOptimizedBvhNode* %59 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %63)
- to label %bb2.i.i.i72 unwind label %lpad38
-
-bb2.i.i.i72: ; preds = %bb1.i.i.i71, %bb.i.i.i70
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %58, align 4
- br label %bb8.preheader.i
-
-bb8.preheader.i: ; preds = %bb2.i.i.i72, %_ZNK20btAlignedObjectArrayI18btOptimizedBvhNodeE4copyEiiPS0_.exit.i.i
- %64 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %64, align 4
- store %struct.btOptimizedBvhNode* %54, %struct.btOptimizedBvhNode** %58, align 4
- store i32 %42, i32* %47, align 4
- br label %bb15
-
-bb15: ; preds = %bb8.preheader.i, %bb4.i, %invcont8
- store i32 %42, i32* %43, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback, i32 0, i32 2), i32 (...)*** %24, align 8
- call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %39)
- br label %bb16
-
-bb16: ; preds = %bb15, %bb5
- %numLeafNodes.0 = phi i32 [ %15, %bb5 ], [ %41, %bb15 ] ; [#uses=1]
- %65 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- store i32 0, i32* %65, align 4
- %66 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- call void @_ZN14btQuantizedBvh9buildTreeEii(%struct.btQuantizedBvh* %66, i32 0, i32 %numLeafNodes.0)
- %67 = load i8* %0, align 4 ; [#uses=1]
- %toBool17not = icmp eq i8 %67, 0 ; [#uses=1]
- br i1 %toBool17not, label %bb31, label %bb21
-
-bb21: ; preds = %bb16
- %68 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 1 ; [#uses=4]
- %69 = load i32* %68, align 4 ; [#uses=10]
- %70 = icmp eq i32 %69, 0 ; [#uses=1]
- br i1 %70, label %bb26, label %bb31
-
-bb26: ; preds = %bb21
- %71 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 2 ; [#uses=2]
- %72 = load i32* %71, align 4 ; [#uses=2]
- %73 = icmp eq i32 %72, %69 ; [#uses=1]
- %74 = icmp slt i32 %72, 1 ; [#uses=1]
- %or.cond169 = and i1 %73, %74 ; [#uses=1]
- br i1 %or.cond169, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i: ; preds = %bb26
- %75 = call i8* @_Z22btAlignedAllocInternalji(i32 32, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %75 to %struct.btBvhSubtreeInfo* ; [#uses=2]
- %.pre.i = load i32* %68, align 4 ; [#uses=2]
- %76 = icmp sgt i32 %.pre.i, 0 ; [#uses=1]
- br i1 %76, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %77 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep166 = getelementptr %struct.btBvhSubtreeInfo* %phitmp.i.i, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep166 to i8* ; [#uses=1]
- %78 = load %struct.btBvhSubtreeInfo** %77, align 4 ; [#uses=1]
- %scevgep164 = getelementptr %struct.btBvhSubtreeInfo* %78, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btBvhSubtreeInfo* %scevgep164 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 32, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond163 = icmp eq i32 %indvar.next.i.i.i, %.pre.i ; [#uses=1]
- br i1 %exitcond163, label %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE8allocateEi.exit.i.i
- %79 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 3 ; [#uses=3]
- %80 = load %struct.btBvhSubtreeInfo** %79, align 4 ; [#uses=2]
- %81 = icmp eq %struct.btBvhSubtreeInfo* %80, null ; [#uses=1]
- br i1 %81, label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %82 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 4 ; [#uses=1]
- %83 = load i8* %82, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %83, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %84 = bitcast %struct.btBvhSubtreeInfo* %80 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %84)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btBvhSubtreeInfo* null, %struct.btBvhSubtreeInfo** %79, align 4
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI16btBvhSubtreeInfoE4copyEiiPS0_.exit.i.i
- %85 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 4 ; [#uses=1]
- store i8 1, i8* %85, align 4
- store %struct.btBvhSubtreeInfo* %phitmp.i.i, %struct.btBvhSubtreeInfo** %79, align 4
- store i32 1, i32* %71, align 4
- %.pre6.i = load i32* %68, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit
-
-_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i, %bb26
- %86 = phi i32 [ %.pre6.i, %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE10deallocateEv.exit.i.i ], [ 0, %bb26 ] ; [#uses=1]
- %87 = add nsw i32 %86, 1 ; [#uses=1]
- store i32 %87, i32* %68, align 4
- %88 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 3 ; [#uses=1]
- %89 = load %struct.btBvhSubtreeInfo** %88, align 4 ; [#uses=8]
- %90 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 10, i32 3 ; [#uses=2]
- %91 = load %struct.BT_QUANTIZED_BVH_NODE** %90, align 4 ; [#uses=6]
- %92 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %91, i32 0, i32 0, i32 0 ; [#uses=1]
- %93 = load i16* %92, align 2 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 0, i32 0 ; [#uses=1]
- store i16 %93, i16* %94, align 2
- %95 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %91, i32 0, i32 0, i32 1 ; [#uses=1]
- %96 = load i16* %95, align 2 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 0, i32 1 ; [#uses=1]
- store i16 %96, i16* %97, align 2
- %98 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %91, i32 0, i32 0, i32 2 ; [#uses=1]
- %99 = load i16* %98, align 2 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 0, i32 2 ; [#uses=1]
- store i16 %99, i16* %100, align 2
- %101 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %91, i32 0, i32 1, i32 0 ; [#uses=1]
- %102 = load i16* %101, align 2 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 1, i32 0 ; [#uses=1]
- store i16 %102, i16* %103, align 2
- %104 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %91, i32 0, i32 1, i32 1 ; [#uses=1]
- %105 = load i16* %104, align 2 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 1, i32 1 ; [#uses=1]
- store i16 %105, i16* %106, align 2
- %107 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %91, i32 0, i32 1, i32 2 ; [#uses=1]
- %108 = load i16* %107, align 2 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 1, i32 2 ; [#uses=1]
- store i16 %108, i16* %109, align 2
- %110 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 2 ; [#uses=1]
- store i32 0, i32* %110, align 4
- %111 = load %struct.BT_QUANTIZED_BVH_NODE** %90, align 4 ; [#uses=1]
- %112 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %111, i32 0, i32 2 ; [#uses=1]
- %113 = load i32* %112, align 4 ; [#uses=2]
- %114 = sub nsw i32 0, %113 ; [#uses=1]
- %toBool27 = icmp slt i32 %113, 0 ; [#uses=2]
- %. = select i1 %toBool27, i32 %114, i32 1 ; [#uses=3]
- %iftmp.157.0 = select i1 %toBool27, i32 %., i32 %. ; [#uses=0]
- %115 = getelementptr inbounds %struct.btBvhSubtreeInfo* %89, i32 %69, i32 3 ; [#uses=1]
- store i32 %., i32* %115, align 4
- br label %bb31
-
-bb31: ; preds = %_ZN20btAlignedObjectArrayI16btBvhSubtreeInfoE6expandERKS0_.exit, %bb21, %bb16
- %116 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 12, i32 1 ; [#uses=1]
- %117 = load i32* %116, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 13 ; [#uses=1]
- store i32 %117, i32* %118, align 4
- %119 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 9, i32 3 ; [#uses=3]
- %120 = load %struct.BT_QUANTIZED_BVH_NODE** %119, align 4 ; [#uses=2]
- %121 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %120, null ; [#uses=1]
- br i1 %121, label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit, label %bb.i.i51
-
-bb.i.i51: ; preds = %bb31
- %122 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 9, i32 4 ; [#uses=1]
- %123 = load i8* %122, align 4 ; [#uses=1]
- %toBool.i.i50 = icmp eq i8 %123, 0 ; [#uses=1]
- br i1 %toBool.i.i50, label %bb2.i.i53, label %bb1.i.i52
-
-bb1.i.i52: ; preds = %bb.i.i51
- %124 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %120 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %124)
- br label %bb2.i.i53
-
-bb2.i.i53: ; preds = %bb1.i.i52, %bb.i.i51
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %119, align 4
- br label %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit
-
-_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit: ; preds = %bb2.i.i53, %bb31
- %125 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %125, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %119, align 4
- %126 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %126, align 4
- %127 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %127, align 4
- %128 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 7, i32 3 ; [#uses=3]
- %129 = load %struct.btOptimizedBvhNode** %128, align 4 ; [#uses=2]
- %130 = icmp eq %struct.btOptimizedBvhNode* %129, null ; [#uses=1]
- br i1 %130, label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit
- %131 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 7, i32 4 ; [#uses=1]
- %132 = load i8* %131, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %132, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %133 = bitcast %struct.btOptimizedBvhNode* %129 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %133)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %128, align 4
- br label %_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE5clearEv.exit
-
-_ZN20btAlignedObjectArrayI18btOptimizedBvhNodeE5clearEv.exit: ; preds = %bb2.i.i, %_ZN20btAlignedObjectArrayI18btQuantizedBvhNodeE5clearEv.exit
- %134 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 7, i32 4 ; [#uses=1]
- store i8 1, i8* %134, align 4
- store %struct.btOptimizedBvhNode* null, %struct.btOptimizedBvhNode** %128, align 4
- %135 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %135, align 4
- %136 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 7, i32 2 ; [#uses=1]
- store i32 0, i32* %136, align 4
- ret void
-
-lpad: ; preds = %bb.nph.i, %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select33 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback, i32 0, i32 2), i32 (...)*** %3, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %13)
- to label %Unwind unwind label %lpad34
-
-lpad34: ; preds = %lpad
- %eh_ptr35 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select37 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr35, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad38: ; preds = %bb1.i.i.i71, %bb.i2.i.i60, %bb6
- %eh_ptr39 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select41 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr39, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E20NodeTriangleCallback, i32 0, i32 2), i32 (...)*** %24, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %39)
- to label %Unwind unwind label %lpad42
-
-lpad42: ; preds = %lpad38
- %eh_ptr43 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select45 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr43, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-Unwind: ; preds = %lpad38, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr39, %lpad38 ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_EN29QuantizedNodeTriangleCallbackD2Ev(%struct..1QuantizedNodeTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN14btOptimizedBvh5buildEP23btStridingMeshInterfacebRK9btVector3S4_E29QuantizedNodeTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..1QuantizedNodeTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btOptimizedBvhD0Ev(%struct.btOptimizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([10 x i32 (...)*]* @_ZTV14btOptimizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btQuantizedBvhD2Ev(%struct.btQuantizedBvh* %1)
- %2 = bitcast %struct.btOptimizedBvh* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btOptimizedBvhD1Ev(%struct.btOptimizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([10 x i32 (...)*]* @_ZTV14btOptimizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btQuantizedBvhD2Ev(%struct.btQuantizedBvh* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btOptimizedBvhD2Ev(%struct.btOptimizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([10 x i32 (...)*]* @_ZTV14btOptimizedBvh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btQuantizedBvhD2Ev(%struct.btQuantizedBvh* %1)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN14btOptimizedBvhC1Ev(%struct.btOptimizedBvh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btQuantizedBvhC2Ev(%struct.btQuantizedBvh* %0)
- %1 = getelementptr inbounds %struct.btOptimizedBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([10 x i32 (...)*]* @_ZTV14btOptimizedBvh, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=13]
-define void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV23btPolyhedralConvexShape, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK23btPolyhedralConvexShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btPolyhedralConvexShape* %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) align 2 {
-entry:
- %vtx = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=2]
- br i1 %0, label %bb, label %return
-
-bb: ; preds = %bb, %entry
- %i.015 = phi i32 [ %1, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep26 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.015, i32 0, i32 3 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %scevgep26, align 4
- %1 = add nsw i32 %i.015, 1 ; [#uses=2]
- %exitcond25 = icmp eq i32 %1, %numVectors ; [#uses=1]
- br i1 %exitcond25, label %bb10.preheader, label %bb
-
-bb10.preheader: ; preds = %bb
- br i1 %0, label %bb.nph14, label %return
-
-bb4: ; preds = %bb7.preheader, %bb6
- %2 = phi i32 [ %tmp, %bb6 ], [ 0, %bb7.preheader ] ; [#uses=2]
- %tmp = add i32 %2, 1 ; [#uses=2]
- %3 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 24 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btPolyhedralConvexShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %6(%struct.btPolyhedralConvexShape* %this, i32 %2, %struct.btQuadWord* %vtx)
- %7 = load float* %scevgep2021, align 4 ; [#uses=1]
- %8 = load float* %28, align 8 ; [#uses=2]
- %9 = fmul float %7, %8 ; [#uses=1]
- %10 = load float* %scevgep22, align 4 ; [#uses=1]
- %11 = load float* %29, align 4 ; [#uses=2]
- %12 = fmul float %10, %11 ; [#uses=1]
- %13 = fadd float %9, %12 ; [#uses=1]
- %14 = load float* %scevgep23, align 4 ; [#uses=1]
- %15 = load float* %30, align 8 ; [#uses=2]
- %16 = fmul float %14, %15 ; [#uses=1]
- %17 = fadd float %13, %16 ; [#uses=2]
- %18 = load float* %scevgep24, align 4 ; [#uses=1]
- %19 = fcmp olt float %18, %17 ; [#uses=1]
- br i1 %19, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- store float %8, float* %scevgep17, align 4
- store float %11, float* %scevgep18, align 4
- store float %15, float* %scevgep19, align 4
- store float %17, float* %scevgep24, align 4
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %20 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32 (...)** %20, i32 21 ; [#uses=1]
- %22 = load i32 (...)** %21, align 4 ; [#uses=1]
- %23 = bitcast i32 (...)* %22 to i32 (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %24 = call i32 %23(%struct.btPolyhedralConvexShape* %this) ; [#uses=1]
- %25 = icmp sgt i32 %24, %tmp ; [#uses=1]
- br i1 %25, label %bb4, label %bb9
-
-bb9: ; preds = %bb7.preheader, %bb6
- %26 = add nsw i32 %j.013, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %26, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb7.preheader
-
-bb.nph14: ; preds = %bb10.preheader
- %27 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %28 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb7.preheader
-
-bb7.preheader: ; preds = %bb.nph14, %bb9
- %j.013 = phi i32 [ 0, %bb.nph14 ], [ %26, %bb9 ] ; [#uses=8]
- %scevgep17 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %j.013, i32 0, i32 0 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.013, i32 0, i32 1 ; [#uses=1]
- %scevgep19 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.013, i32 0, i32 2 ; [#uses=1]
- %scevgep2021 = getelementptr inbounds %struct.btQuadWord* %vectors, i32 %j.013, i32 0, i32 0 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btQuadWord* %vectors, i32 %j.013, i32 0, i32 1 ; [#uses=1]
- %scevgep23 = getelementptr %struct.btQuadWord* %vectors, i32 %j.013, i32 0, i32 2 ; [#uses=1]
- %scevgep24 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %j.013, i32 0, i32 3 ; [#uses=2]
- %31 = load i32 (...)*** %27, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32 (...)** %31, i32 21 ; [#uses=1]
- %33 = load i32 (...)** %32, align 4 ; [#uses=1]
- %34 = bitcast i32 (...)* %33 to i32 (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %35 = call i32 %34(%struct.btPolyhedralConvexShape* %this) ; [#uses=1]
- %36 = icmp sgt i32 %35, 0 ; [#uses=1]
- br i1 %36, label %bb4, label %bb9
-
-return: ; preds = %bb9, %bb10.preheader, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK23btPolyhedralConvexShape21calculateLocalInertiaEfR9btVector3(%struct.btPolyhedralConvexShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %ident = alloca %struct.btTransform, align 8 ; [#uses=17]
- %aabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0 ; [#uses=2]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = call float %5(%struct.btConvexInternalShape* %4) ; [#uses=3]
- %7 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %7, align 8
- %8 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 8
- %10 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 8
- %12 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 8
- %14 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 8
- %16 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %17, align 8
- %18 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 8
- %20 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 8
- %22 = getelementptr inbounds %struct.btTransform* %ident, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 2 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to void (%struct.btConvexInternalShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %26(%struct.btConvexInternalShape* %4, %struct.btTransform* %ident, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %27 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 8 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 8 ; [#uses=1]
- %31 = fsub float %28, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fsub float %33, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 8 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 8 ; [#uses=1]
- %41 = fsub float %38, %40 ; [#uses=1]
- %42 = fmul float %31, 5.000000e-01 ; [#uses=1]
- %43 = fmul float %36, 5.000000e-01 ; [#uses=1]
- %44 = fmul float %41, 5.000000e-01 ; [#uses=1]
- %45 = fadd float %44, %6 ; [#uses=1]
- %46 = fmul float %45, 2.000000e+00 ; [#uses=2]
- %47 = fadd float %43, %6 ; [#uses=1]
- %48 = fmul float %47, 2.000000e+00 ; [#uses=2]
- %49 = fadd float %42, %6 ; [#uses=1]
- %50 = fmul float %49, 2.000000e+00 ; [#uses=2]
- %51 = fmul float %46, %46 ; [#uses=2]
- %52 = fmul float %48, %48 ; [#uses=2]
- %53 = fmul float %50, %50 ; [#uses=2]
- %54 = fmul float %mass, 0x3FB5555540000000 ; [#uses=3]
- %55 = fadd float %51, %52 ; [#uses=1]
- %56 = fadd float %51, %53 ; [#uses=1]
- %57 = fadd float %52, %53 ; [#uses=1]
- %58 = fmul float %55, %54 ; [#uses=1]
- %59 = fmul float %56, %54 ; [#uses=1]
- %60 = fmul float %57, %54 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %60, float* %61, align 4
- %62 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %59, float* %62, align 4
- %63 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %58, float* %63, align 4
- %64 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %64, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZNK34btPolyhedralConvexAabbCachingShape7getAabbERK11btTransformR9btVector3S4_(%struct.btPolyhedralConvexAabbCachingShape* %this, %struct.btTransform* nocapture %trans, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=3]
- %7 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = fsub float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fsub float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fsub float %18, %20 ; [#uses=1]
- %22 = fmul float %11, 5.000000e-01 ; [#uses=1]
- %23 = fmul float %16, 5.000000e-01 ; [#uses=1]
- %24 = fmul float %21, 5.000000e-01 ; [#uses=1]
- %25 = fadd float %24, %6 ; [#uses=3]
- %26 = fadd float %23, %6 ; [#uses=3]
- %27 = fadd float %22, %6 ; [#uses=3]
- %28 = fadd float %8, %10 ; [#uses=1]
- %29 = fadd float %13, %15 ; [#uses=1]
- %30 = fadd float %18, %20 ; [#uses=1]
- %31 = fmul float %28, 5.000000e-01 ; [#uses=3]
- %32 = fmul float %29, 5.000000e-01 ; [#uses=3]
- %33 = fmul float %30, 5.000000e-01 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = tail call float @fabsf(float %35) nounwind readnone ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = tail call float @fabsf(float %38) nounwind readnone ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=2]
- %42 = tail call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = tail call float @fabsf(float %44) nounwind readnone ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = tail call float @fabsf(float %47) nounwind readnone ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = tail call float @fabsf(float %50) nounwind readnone ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = tail call float @fabsf(float %53) nounwind readnone ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=2]
- %57 = tail call float @fabsf(float %56) nounwind readnone ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = tail call float @fabsf(float %59) nounwind readnone ; [#uses=1]
- %61 = fmul float %41, %33 ; [#uses=1]
- %62 = fmul float %38, %32 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fmul float %35, %31 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fadd float %65, %67 ; [#uses=2]
- %69 = fmul float %50, %33 ; [#uses=1]
- %70 = fmul float %47, %32 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %44, %31 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fadd float %73, %75 ; [#uses=2]
- %77 = fmul float %59, %33 ; [#uses=1]
- %78 = fmul float %56, %32 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %53, %31 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fadd float %81, %83 ; [#uses=2]
- %85 = fmul float %42, %25 ; [#uses=1]
- %86 = fmul float %39, %26 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %36, %27 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=2]
- %90 = fmul float %51, %25 ; [#uses=1]
- %91 = fmul float %48, %26 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %45, %27 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=2]
- %95 = fmul float %60, %25 ; [#uses=1]
- %96 = fmul float %57, %26 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %54, %27 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=2]
- %100 = fsub float %68, %89 ; [#uses=1]
- %101 = fsub float %76, %94 ; [#uses=1]
- %102 = fsub float %84, %99 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %102, float* %103, align 4
- %104 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %101, float* %104, align 4
- %105 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %105, align 4
- %106 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %106, align 4
- %107 = fadd float %68, %89 ; [#uses=1]
- %108 = fadd float %76, %94 ; [#uses=1]
- %109 = fadd float %84, %99 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %109, float* %110, align 4
- %111 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %108, float* %111, align 4
- %112 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %107, float* %112, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btPolyhedralConvexShapeD0Ev(%struct.btPolyhedralConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btPolyhedralConvexShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btPolyhedralConvexShapeD1Ev(%struct.btPolyhedralConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK23btPolyhedralConvexShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btPolyhedralConvexShape* %this, %struct.btQuadWord* nocapture %vec0) align 2 {
-entry:
- %vtx = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btQuadWord* %vec0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = fmul float %5, %5 ; [#uses=1]
- %11 = fmul float %7, %7 ; [#uses=1]
- %12 = fadd float %10, %11 ; [#uses=1]
- %13 = fmul float %9, %9 ; [#uses=1]
- %14 = fadd float %12, %13 ; [#uses=2]
- %15 = fcmp olt float %14, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %15, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %16 = call float @sqrtf(float %14) nounwind readonly ; [#uses=1]
- %17 = fdiv float 1.000000e+00, %16 ; [#uses=3]
- %18 = fmul float %5, %17 ; [#uses=1]
- %19 = fmul float %7, %17 ; [#uses=1]
- %20 = fmul float %9, %17 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %entry
- %vec.0.2.0 = phi float [ %20, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %vec.0.1.0 = phi float [ %19, %bb1 ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %vec.0.0.0 = phi float [ %18, %bb1 ], [ 1.000000e+00, %entry ] ; [#uses=1]
- %21 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %22 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 21 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %24 to i32 (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %26 = call i32 %25(%struct.btPolyhedralConvexShape* %this) ; [#uses=1]
- %27 = icmp sgt i32 %26, 0 ; [#uses=1]
- br i1 %27, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb2
- %28 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb5, %bb.nph
- %maxDot.114 = phi float [ 0xC3ABC16D60000000, %bb.nph ], [ %maxDot.0, %bb5 ] ; [#uses=2]
- %32 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb5 ] ; [#uses=2]
- %tmp = add i32 %32, 1 ; [#uses=2]
- %33 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i32 (...)** %33, i32 24 ; [#uses=1]
- %35 = load i32 (...)** %34, align 4 ; [#uses=1]
- %36 = bitcast i32 (...)* %35 to void (%struct.btPolyhedralConvexShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %36(%struct.btPolyhedralConvexShape* %this, i32 %32, %struct.btQuadWord* %vtx)
- %37 = load float* %28, align 8 ; [#uses=2]
- %38 = fmul float %vec.0.0.0, %37 ; [#uses=1]
- %39 = load float* %29, align 4 ; [#uses=2]
- %40 = fmul float %vec.0.1.0, %39 ; [#uses=1]
- %41 = fadd float %38, %40 ; [#uses=1]
- %42 = load float* %30, align 8 ; [#uses=2]
- %43 = fmul float %vec.0.2.0, %42 ; [#uses=1]
- %44 = fadd float %41, %43 ; [#uses=2]
- %45 = fcmp ogt float %44, %maxDot.114 ; [#uses=1]
- br i1 %45, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- store float %37, float* %0, align 4
- store float %39, float* %1, align 4
- store float %42, float* %2, align 4
- %46 = load float* %31, align 4 ; [#uses=1]
- store float %46, float* %3, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %maxDot.0 = phi float [ %44, %bb4 ], [ %maxDot.114, %bb3 ] ; [#uses=1]
- %47 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %48 = getelementptr inbounds i32 (...)** %47, i32 21 ; [#uses=1]
- %49 = load i32 (...)** %48, align 4 ; [#uses=1]
- %50 = bitcast i32 (...)* %49 to i32 (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %51 = call i32 %50(%struct.btPolyhedralConvexShape* %this) ; [#uses=1]
- %52 = icmp sgt i32 %51, %tmp ; [#uses=1]
- br i1 %52, label %bb3, label %return
-
-return: ; preds = %bb5, %bb2
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btPolyhedralConvexAabbCachingShapeD0Ev(%struct.btPolyhedralConvexAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btPolyhedralConvexAabbCachingShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btPolyhedralConvexAabbCachingShapeD1Ev(%struct.btPolyhedralConvexAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN34btPolyhedralConvexAabbCachingShape15setLocalScalingERK9btVector3(%struct.btPolyhedralConvexAabbCachingShape* %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShape15setLocalScalingERK9btVector3(%struct.btConvexInternalShape* %0, %struct.btQuadWord* %scaling)
- tail call void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %this)
- ret void
-}
-
-; [#uses=20]
-define void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %this) align 2 {
-entry:
- %_supporting = alloca [6 x %struct.btQuadWord], align 8 ; [#uses=8]
- %0 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 1, i8* %0, align 4
- %1 = load i8* bitcast (i64* @_ZGVZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions to i8*), align 8 ; [#uses=1]
- %2 = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions) nounwind ; [#uses=1]
- %4 = icmp eq i32 %3, 0 ; [#uses=1]
- br i1 %4, label %return, label %bb1
-
-bb1: ; preds = %bb
- store float 1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 2, i32 0, i32 3), align 4
- store float -1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 3, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 0), align 32
- store float -1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 4, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 1), align 4
- store float -1.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 5, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions) nounwind
- br label %return
-
-return: ; preds = %bb1, %bb, %entry
- %5 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = bitcast [6 x %struct.btQuadWord]* %_supporting to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %6, i8 0, i64 96, i32 8, i1 false)
- %7 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 17 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0 ; [#uses=1]
- %11 = bitcast i32 (...)* %9 to void (%struct.btPolyhedralConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* ; [#uses=1]
- %12 = getelementptr inbounds [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0 ; [#uses=1]
- call void %11(%struct.btPolyhedralConvexShape* %10, %struct.btQuadWord* getelementptr inbounds ([6 x %struct.btQuadWord]* @_ZZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEvE11_directions, i32 0, i32 0), %struct.btQuadWord* %12, i32 6)
- %13 = getelementptr inbounds [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %13, align 8 ; [#uses=1]
- %17 = load float* %15, align 4 ; [#uses=6]
- %18 = fadd float %16, %17 ; [#uses=1]
- store float %18, float* %scevgep7, align 4
- %19 = load float* %14, align 8 ; [#uses=1]
- %20 = fsub float %19, %17 ; [#uses=1]
- store float %20, float* %scevgep9, align 4
- %scevgep.1 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0, i32 0, i32 5 ; [#uses=1]
- %scevgep7.1 = getelementptr %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep8.1 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 3, i32 0, i32 5 ; [#uses=1]
- %scevgep9.1 = getelementptr %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %scevgep.1, align 4 ; [#uses=1]
- %22 = fadd float %21, %17 ; [#uses=1]
- store float %22, float* %scevgep7.1, align 4
- %23 = load float* %scevgep8.1, align 4 ; [#uses=1]
- %24 = fsub float %23, %17 ; [#uses=1]
- store float %24, float* %scevgep9.1, align 4
- %scevgep.2 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 0, i32 0, i32 10 ; [#uses=1]
- %scevgep7.2 = getelementptr %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep8.2 = getelementptr [6 x %struct.btQuadWord]* %_supporting, i32 0, i32 3, i32 0, i32 10 ; [#uses=1]
- %scevgep9.2 = getelementptr %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %scevgep.2, align 8 ; [#uses=1]
- %26 = fadd float %25, %17 ; [#uses=1]
- store float %26, float* %scevgep7.2, align 4
- %27 = load float* %scevgep8.2, align 8 ; [#uses=1]
- %28 = fsub float %27, %17 ; [#uses=1]
- store float %28, float* %scevgep9.2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btPolyhedralConvexShapeC1Ev(%struct.btPolyhedralConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV23btPolyhedralConvexShape, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN34btPolyhedralConvexAabbCachingShapeC1Ev(%struct.btPolyhedralConvexAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV34btPolyhedralConvexAabbCachingShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %10, align 4
- ret void
-}
-
-; [#uses=10]
-define void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %0)
- %1 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([30 x i32 (...)*]* @_ZTV34btPolyhedralConvexAabbCachingShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btPolyhedralConvexAabbCachingShape* %this, i32 0, i32 3 ; [#uses=1]
- store i8 0, i8* %10, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN28btScaledBvhTriangleMeshShapeC2EP22btBvhTriangleMeshShapeRK9btVector3(%struct.btScaledBvhTriangleMeshShape* %this, %struct.btBvhTriangleMeshShape* %childShape, %struct.btQuadWord* nocapture %localScaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV28btScaledBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btBvhTriangleMeshShape* %childShape, %struct.btBvhTriangleMeshShape** %14, align 4
- %15 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 22, i32* %15, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK28btScaledBvhTriangleMeshShape7getNameEv(%struct.btScaledBvhTriangleMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([22 x i8]* @.str111, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btScaledTriangleCallbackD1Ev(%struct.btScaledTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btScaledTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btScaledTriangleCallbackD0Ev(%struct.btScaledTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btScaledTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btScaledTriangleCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN24btScaledTriangleCallback15processTriangleEP9btVector3ii(%struct.btScaledTriangleCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-bb2:
- %newTriangle = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=13]
- %0 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %14, float* %15, align 8
- %16 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %9, float* %16, align 4
- %17 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %4, float* %17, align 8
- %18 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %20, %3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fmul float %23, %8 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fmul float %26, %13 ; [#uses=1]
- %28 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %27, float* %28, align 8
- %29 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %24, float* %29, align 4
- %30 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %30, align 8
- %31 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fmul float %33, %3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fmul float %36, %8 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %13 ; [#uses=1]
- %41 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %40, float* %41, align 8
- %42 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %37, float* %42, align 4
- %43 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %34, float* %43, align 8
- %44 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- %45 = getelementptr inbounds %struct.btScaledTriangleCallback* %this, i32 0, i32 1 ; [#uses=1]
- %46 = load %struct.btActionInterface** %45, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btActionInterface* %46, i32 0, i32 0 ; [#uses=1]
- %48 = load i32 (...)*** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds i32 (...)** %48, i32 2 ; [#uses=1]
- %50 = load i32 (...)** %49, align 4 ; [#uses=1]
- %51 = bitcast i32 (...)* %50 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- %52 = getelementptr inbounds [3 x %struct.btQuadWord]* %newTriangle, i32 0, i32 0 ; [#uses=1]
- call void %51(%struct.btActionInterface* %46, %struct.btQuadWord* %52, i32 %partId, i32 %triangleIndex)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK28btScaledBvhTriangleMeshShape7getAabbERK11btTransformR9btVector3S4_(%struct.btScaledBvhTriangleMeshShape* nocapture %this, %struct.btTransform* nocapture %trans, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %tmpLocalAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmpLocalAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btBvhTriangleMeshShape** %0, align 4 ; [#uses=8]
- %2 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=4]
- %16 = fmul float %7, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = fmul float %5, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=4]
- %22 = fmul float %3, %21 ; [#uses=3]
- %23 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMin, i32 0, i32 0, i32 0 ; [#uses=5]
- store float %22, float* %23, align 8
- %24 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %16, float* %25, align 8
- %26 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = fmul float %13, %15 ; [#uses=1]
- %28 = fmul float %11, %18 ; [#uses=1]
- %29 = fmul float %9, %21 ; [#uses=3]
- %30 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMax, i32 0, i32 0, i32 0 ; [#uses=5]
- store float %29, float* %30, align 8
- %31 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %28, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %27, float* %32, align 8
- %33 = getelementptr inbounds %struct.btQuadWord* %tmpLocalAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = fcmp ult float %21, 0.000000e+00 ; [#uses=1]
- %iftmp.224.0 = select i1 %34, float %29, float %22 ; [#uses=2]
- %35 = fcmp ult float %18, 0.000000e+00 ; [#uses=1]
- %.pn = select i1 %35, float* %30, float* %23 ; [#uses=1]
- %iftmp.225.0.in = getelementptr inbounds float* %.pn, i32 1 ; [#uses=1]
- %iftmp.225.0 = load float* %iftmp.225.0.in, align 4 ; [#uses=2]
- %36 = fcmp ult float %15, 0.000000e+00 ; [#uses=1]
- %.pn19 = select i1 %36, float* %30, float* %23 ; [#uses=1]
- %iftmp.226.0.in = getelementptr inbounds float* %.pn19, i32 2 ; [#uses=1]
- %iftmp.226.0 = load float* %iftmp.226.0.in, align 4 ; [#uses=2]
- %37 = fcmp ugt float %21, 0.000000e+00 ; [#uses=1]
- %iftmp.227.0 = select i1 %37, float %29, float %22 ; [#uses=2]
- %38 = fcmp ugt float %18, 0.000000e+00 ; [#uses=1]
- %.pn20 = select i1 %38, float* %30, float* %23 ; [#uses=1]
- %iftmp.228.0.in = getelementptr inbounds float* %.pn20, i32 1 ; [#uses=1]
- %iftmp.228.0 = load float* %iftmp.228.0.in, align 4 ; [#uses=2]
- %39 = fcmp ugt float %15, 0.000000e+00 ; [#uses=1]
- %.pn21 = select i1 %39, float* %30, float* %23 ; [#uses=1]
- %iftmp.229.0.in = getelementptr inbounds float* %.pn21, i32 2 ; [#uses=1]
- %iftmp.229.0 = load float* %iftmp.229.0.in, align 4 ; [#uses=2]
- %40 = fsub float %iftmp.229.0, %iftmp.226.0 ; [#uses=1]
- %41 = fsub float %iftmp.228.0, %iftmp.225.0 ; [#uses=1]
- %42 = fsub float %iftmp.227.0, %iftmp.224.0 ; [#uses=1]
- %43 = fmul float %40, 5.000000e-01 ; [#uses=1]
- %44 = fmul float %41, 5.000000e-01 ; [#uses=1]
- %45 = fmul float %42, 5.000000e-01 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load i32 (...)*** %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds i32 (...)** %47, i32 11 ; [#uses=1]
- %49 = load i32 (...)** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = bitcast i32 (...)* %49 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %52 = call float %51(%struct.btConcaveShape* %50) ; [#uses=3]
- %53 = fadd float %45, %52 ; [#uses=3]
- %54 = fadd float %44, %52 ; [#uses=3]
- %55 = fadd float %43, %52 ; [#uses=3]
- %56 = fadd float %iftmp.229.0, %iftmp.226.0 ; [#uses=1]
- %57 = fadd float %iftmp.228.0, %iftmp.225.0 ; [#uses=1]
- %58 = fadd float %iftmp.227.0, %iftmp.224.0 ; [#uses=1]
- %59 = fmul float %56, 5.000000e-01 ; [#uses=3]
- %60 = fmul float %57, 5.000000e-01 ; [#uses=3]
- %61 = fmul float %58, 5.000000e-01 ; [#uses=3]
- %62 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=2]
- %64 = call float @fabsf(float %63) nounwind readnone ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=2]
- %67 = call float @fabsf(float %66) nounwind readnone ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=2]
- %70 = call float @fabsf(float %69) nounwind readnone ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=2]
- %73 = call float @fabsf(float %72) nounwind readnone ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=2]
- %76 = call float @fabsf(float %75) nounwind readnone ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=2]
- %79 = call float @fabsf(float %78) nounwind readnone ; [#uses=1]
- %80 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=2]
- %82 = call float @fabsf(float %81) nounwind readnone ; [#uses=1]
- %83 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=2]
- %85 = call float @fabsf(float %84) nounwind readnone ; [#uses=1]
- %86 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=2]
- %88 = call float @fabsf(float %87) nounwind readnone ; [#uses=1]
- %89 = fmul float %69, %61 ; [#uses=1]
- %90 = fmul float %66, %60 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %63, %59 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fadd float %93, %95 ; [#uses=2]
- %97 = fmul float %78, %61 ; [#uses=1]
- %98 = fmul float %75, %60 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %72, %59 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=1]
- %104 = fadd float %101, %103 ; [#uses=2]
- %105 = fmul float %87, %61 ; [#uses=1]
- %106 = fmul float %84, %60 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %81, %59 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- %112 = fadd float %109, %111 ; [#uses=2]
- %113 = fmul float %70, %53 ; [#uses=1]
- %114 = fmul float %67, %54 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %64, %55 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=2]
- %118 = fmul float %79, %53 ; [#uses=1]
- %119 = fmul float %76, %54 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %73, %55 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=2]
- %123 = fmul float %88, %53 ; [#uses=1]
- %124 = fmul float %85, %54 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %82, %55 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=2]
- %128 = fsub float %96, %117 ; [#uses=1]
- %129 = fsub float %104, %122 ; [#uses=1]
- %130 = fsub float %112, %127 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %130, float* %131, align 4
- %132 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %129, float* %132, align 4
- %133 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %128, float* %133, align 4
- %134 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- %135 = fadd float %96, %117 ; [#uses=1]
- %136 = fadd float %104, %122 ; [#uses=1]
- %137 = fadd float %112, %127 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %137, float* %138, align 4
- %139 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %136, float* %139, align 4
- %140 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %135, float* %140, align 4
- %141 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %141, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btScaledBvhTriangleMeshShape15setLocalScalingERK9btVector3(%struct.btScaledBvhTriangleMeshShape* nocapture %this, %struct.btQuadWord* nocapture %scaling) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btQuadWord* @_ZNK28btScaledBvhTriangleMeshShape15getLocalScalingEv(%struct.btScaledBvhTriangleMeshShape* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=1]
-define void @_ZNK28btScaledBvhTriangleMeshShape21calculateLocalInertiaEfR9btVector3(%struct.btScaledBvhTriangleMeshShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK28btScaledBvhTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btScaledBvhTriangleMeshShape* nocapture %this, %struct.btActionInterface* %callback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %scaledCallback = alloca %struct.btScaledTriangleCallback, align 8 ; [#uses=7]
- %scaledAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %scaledAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btScaledTriangleCallback* %scaledCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btScaledTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct.btScaledTriangleCallback* %scaledCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %callback, %struct.btActionInterface** %1, align 4
- %2 = getelementptr inbounds %struct.btScaledTriangleCallback* %scaledCallback, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=4]
- store float %4, float* %2, align 8
- %5 = getelementptr inbounds %struct.btScaledTriangleCallback* %scaledCallback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=4]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btScaledTriangleCallback* %scaledCallback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=4]
- store float %10, float* %8, align 8
- %11 = getelementptr inbounds %struct.btScaledTriangleCallback* %scaledCallback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = fdiv float 1.000000e+00, %10 ; [#uses=2]
- %15 = fdiv float 1.000000e+00, %7 ; [#uses=2]
- %16 = fdiv float 1.000000e+00, %4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btQuadWord* %scaledAabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = fcmp ult float %4, 0.000000e+00 ; [#uses=1]
- %aabbMin.pn = select i1 %18, %struct.btQuadWord* %aabbMax, %struct.btQuadWord* %aabbMin ; [#uses=1]
- %.pn.in = getelementptr inbounds %struct.btQuadWord* %aabbMin.pn, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pn = load float* %.pn.in, align 4 ; [#uses=1]
- %iftmp.218.0 = fmul float %.pn, %16 ; [#uses=1]
- store float %iftmp.218.0, float* %17, align 8
- %19 = fcmp ult float %7, 0.000000e+00 ; [#uses=1]
- %aabbMin.pn48 = select i1 %19, %struct.btQuadWord* %aabbMax, %struct.btQuadWord* %aabbMin ; [#uses=1]
- %.pn43.in = getelementptr inbounds %struct.btQuadWord* %aabbMin.pn48, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pn43 = load float* %.pn43.in, align 4 ; [#uses=1]
- %iftmp.219.0 = fmul float %.pn43, %15 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %scaledAabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.219.0, float* %20, align 4
- %21 = fcmp ult float %10, 0.000000e+00 ; [#uses=1]
- %aabbMin.pn49 = select i1 %21, %struct.btQuadWord* %aabbMax, %struct.btQuadWord* %aabbMin ; [#uses=1]
- %.pn44.in = getelementptr inbounds %struct.btQuadWord* %aabbMin.pn49, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pn44 = load float* %.pn44.in, align 4 ; [#uses=1]
- %iftmp.220.0 = fmul float %.pn44, %14 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %scaledAabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.220.0, float* %22, align 8
- %23 = getelementptr inbounds %struct.btQuadWord* %scaledAabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = fcmp ugt float %4, 0.000000e+00 ; [#uses=1]
- %aabbMin.pn50 = select i1 %24, %struct.btQuadWord* %aabbMax, %struct.btQuadWord* %aabbMin ; [#uses=1]
- %.pn45.in = getelementptr inbounds %struct.btQuadWord* %aabbMin.pn50, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pn45 = load float* %.pn45.in, align 4 ; [#uses=1]
- %iftmp.221.0 = fmul float %.pn45, %16 ; [#uses=1]
- store float %iftmp.221.0, float* %23, align 8
- %25 = fcmp ugt float %7, 0.000000e+00 ; [#uses=1]
- %aabbMin.pn51 = select i1 %25, %struct.btQuadWord* %aabbMax, %struct.btQuadWord* %aabbMin ; [#uses=1]
- %.pn46.in = getelementptr inbounds %struct.btQuadWord* %aabbMin.pn51, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pn46 = load float* %.pn46.in, align 4 ; [#uses=1]
- %iftmp.222.0 = fmul float %.pn46, %15 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %scaledAabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.222.0, float* %26, align 4
- %27 = fcmp ugt float %10, 0.000000e+00 ; [#uses=1]
- %aabbMin.pn52 = select i1 %27, %struct.btQuadWord* %aabbMax, %struct.btQuadWord* %aabbMin ; [#uses=1]
- %.pn47.in = getelementptr inbounds %struct.btQuadWord* %aabbMin.pn52, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pn47 = load float* %.pn47.in, align 4 ; [#uses=1]
- %iftmp.223.0 = fmul float %.pn47, %14 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %scaledAabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.223.0, float* %28, align 8
- %29 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- %30 = load %struct.btBvhTriangleMeshShape** %29, align 4 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btBvhTriangleMeshShape* %30, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load i32 (...)*** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 15 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to void (%struct.btBvhTriangleMeshShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %36 = getelementptr inbounds %struct.btScaledTriangleCallback* %scaledCallback, i32 0, i32 0 ; [#uses=3]
- invoke void %35(%struct.btBvhTriangleMeshShape* %30, %struct.btActionInterface* %36, %struct.btQuadWord* %scaledAabbMin, %struct.btQuadWord* %scaledAabbMax)
- to label %bb21 unwind label %lpad
-
-invcont19: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb21: ; preds = %entry
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btScaledTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %36)
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select23 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV24btScaledTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %36)
- to label %invcont19 unwind label %lpad24
-
-lpad24: ; preds = %lpad
- %eh_ptr25 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select27 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr25, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN28btScaledBvhTriangleMeshShapeD0Ev(%struct.btScaledBvhTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV28btScaledBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- %2 = bitcast %struct.btScaledBvhTriangleMeshShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btScaledBvhTriangleMeshShapeD1Ev(%struct.btScaledBvhTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV28btScaledBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN28btScaledBvhTriangleMeshShapeD2Ev(%struct.btScaledBvhTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV28btScaledBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN28btScaledBvhTriangleMeshShapeC1EP22btBvhTriangleMeshShapeRK9btVector3(%struct.btScaledBvhTriangleMeshShape* %this, %struct.btBvhTriangleMeshShape* %childShape, %struct.btQuadWord* nocapture %localScaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV28btScaledBvhTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %localScaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btBvhTriangleMeshShape* %childShape, %struct.btBvhTriangleMeshShape** %14, align 4
- %15 = getelementptr inbounds %struct.btScaledBvhTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 22, i32* %15, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN11btShapeHullC2EPK13btConvexShape(%struct.btShapeHull* nocapture %this, %struct.btConvexShape* %shape) align 2 {
-invcont2:
- %0 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %shape, %struct.btConvexShape** %8, align 4
- store i8 1, i8* %0, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %1, align 4
- store i32 0, i32* %2, align 4
- store i32 0, i32* %3, align 4
- store i8 1, i8* %4, align 4
- store i32* null, i32** %5, align 4
- store i32 0, i32* %6, align 4
- store i32 0, i32* %7, align 4
- %9 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZNK11btShapeHull12numTrianglesEv(%struct.btShapeHull* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = udiv i32 %1, 3 ; [#uses=1]
- ret i32 %2
-}
-
-; [#uses=0]
-define i32 @_ZNK11btShapeHull10numIndicesEv(%struct.btShapeHull* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=0]
-define i32 @_ZNK11btShapeHull11numVerticesEv(%struct.btShapeHull* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=2]
-define %struct.btQuadWord* @_ZN11btShapeHull19getUnitSpherePointsEv() nounwind align 2 {
-entry:
- %0 = load i8* bitcast (i64* @_ZGVZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints to i8*), align 8 ; [#uses=1]
- %1 = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb5
-
-bb: ; preds = %entry
- %2 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints) nounwind ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb5, label %bb4
-
-bb4: ; preds = %bb
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 0, i32 0, i32 0), align 32
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 0, i32 0, i32 1), align 4
- store float -1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0x3FE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 1, i32 0, i32 0), align 16
- store float 0xBFE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0xBFDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0xBFD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0xBFEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 2, i32 0, i32 1), align 4
- store float 0xBFDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 2, i32 0, i32 3), align 4
- store float 0xBFEC9F2340000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 3, i32 0, i32 0), align 16
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 3, i32 0, i32 1), align 4
- store float 0xBFDC9F2FE0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 3, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 3, i32 0, i32 3), align 4
- store float 0xBFD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 4, i32 0, i32 0), align 32
- store float 0x3FEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 4, i32 0, i32 1), align 4
- store float 0xBFDC9F40A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 4, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 4, i32 0, i32 3), align 4
- store float 0x3FE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 5, i32 0, i32 0), align 16
- store float 0x3FE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 5, i32 0, i32 1), align 4
- store float 0xBFDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 5, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 5, i32 0, i32 3), align 4
- store float 0x3FD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 6, i32 0, i32 0), align 32
- store float 0xBFEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 6, i32 0, i32 1), align 4
- store float 0x3FDC9F40A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 6, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 6, i32 0, i32 3), align 4
- store float 0xBFE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 7, i32 0, i32 0), align 16
- store float 0xBFE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 7, i32 0, i32 1), align 4
- store float 0x3FDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 7, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 7, i32 0, i32 3), align 4
- store float 0xBFE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 8, i32 0, i32 0), align 32
- store float 0x3FE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 8, i32 0, i32 1), align 4
- store float 0x3FDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 8, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 8, i32 0, i32 3), align 4
- store float 0x3FD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 9, i32 0, i32 0), align 16
- store float 0x3FEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 9, i32 0, i32 1), align 4
- store float 0x3FDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 9, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 9, i32 0, i32 3), align 4
- store float 0x3FEC9F2340000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 10, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 10, i32 0, i32 1), align 4
- store float 0x3FDC9F2FE0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 10, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 10, i32 0, i32 3), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 11, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 11, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 11, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 11, i32 0, i32 3), align 4
- store float 0x3FDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 12, i32 0, i32 0), align 32
- store float 0xBFD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 12, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 12, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 12, i32 0, i32 3), align 4
- store float 0xBFC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 13, i32 0, i32 0), align 16
- store float 0xBFDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 13, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 13, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 13, i32 0, i32 3), align 4
- store float 0x3FD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 14, i32 0, i32 0), align 32
- store float 0xBFE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 14, i32 0, i32 1), align 4
- store float 0xBFE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 14, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 14, i32 0, i32 3), align 4
- store float 0x3FDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 15, i32 0, i32 0), align 16
- store float 0x3FD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 15, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 15, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 15, i32 0, i32 3), align 4
- store float 0x3FEB388220000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 16, i32 0, i32 0), align 32
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 16, i32 0, i32 1), align 4
- store float 0xBFE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 16, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 16, i32 0, i32 3), align 4
- store float 0xBFE0D2C7C0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 17, i32 0, i32 0), align 16
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 17, i32 0, i32 1), align 4
- store float 0xBFEB388A80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 17, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 17, i32 0, i32 3), align 4
- store float 0xBFE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 18, i32 0, i32 0), align 32
- store float 0xBFDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 18, i32 0, i32 1), align 4
- store float 0xBFE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 18, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 18, i32 0, i32 3), align 4
- store float 0xBFC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 19, i32 0, i32 0), align 16
- store float 0x3FDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 19, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 19, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 19, i32 0, i32 3), align 4
- store float 0xBFE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 20, i32 0, i32 0), align 32
- store float 0x3FDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 20, i32 0, i32 1), align 4
- store float 0xBFE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 20, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 20, i32 0, i32 3), align 4
- store float 0x3FD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 21, i32 0, i32 0), align 16
- store float 0x3FE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 21, i32 0, i32 1), align 4
- store float 0xBFE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 21, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 21, i32 0, i32 3), align 4
- store float 0x3FEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 22, i32 0, i32 0), align 32
- store float 0x3FD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 22, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 22, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 22, i32 0, i32 3), align 4
- store float 0x3FEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 23, i32 0, i32 0), align 16
- store float 0xBFD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 23, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 23, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 23, i32 0, i32 3), align 4
- store float 0x3FE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 24, i32 0, i32 0), align 32
- store float 0xBFE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 24, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 24, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 24, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 25, i32 0, i32 0), align 16
- store float -1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 25, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 25, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 25, i32 0, i32 3), align 4
- store float 0xBFE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 26, i32 0, i32 0), align 32
- store float 0xBFE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 26, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 26, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 26, i32 0, i32 3), align 4
- store float 0xBFEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 27, i32 0, i32 0), align 16
- store float 0xBFD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 27, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 27, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 27, i32 0, i32 3), align 4
- store float 0xBFEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 28, i32 0, i32 0), align 32
- store float 0x3FD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 28, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 28, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 28, i32 0, i32 3), align 4
- store float 0xBFE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 29, i32 0, i32 0), align 16
- store float 0x3FE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 29, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 29, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 29, i32 0, i32 3), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 30, i32 0, i32 0), align 32
- store float 1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 30, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 30, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 30, i32 0, i32 3), align 4
- store float 0x3FE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 31, i32 0, i32 0), align 16
- store float 0x3FE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 31, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 31, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 31, i32 0, i32 3), align 4
- store float 0x3FE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 32, i32 0, i32 0), align 32
- store float 0xBFDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 32, i32 0, i32 1), align 4
- store float 0x3FE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 32, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 32, i32 0, i32 3), align 4
- store float 0xBFD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 33, i32 0, i32 0), align 16
- store float 0xBFE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 33, i32 0, i32 1), align 4
- store float 0x3FE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 33, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 33, i32 0, i32 3), align 4
- store float 0xBFEB388220000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 34, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 34, i32 0, i32 1), align 4
- store float 0x3FE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 34, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 34, i32 0, i32 3), align 4
- store float 0xBFD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 35, i32 0, i32 0), align 16
- store float 0x3FE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 35, i32 0, i32 1), align 4
- store float 0x3FE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 35, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 35, i32 0, i32 3), align 4
- store float 0x3FE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 36, i32 0, i32 0), align 32
- store float 0x3FDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 36, i32 0, i32 1), align 4
- store float 0x3FE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 36, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 36, i32 0, i32 3), align 4
- store float 0x3FE0D2C7C0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 37, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 37, i32 0, i32 1), align 4
- store float 0x3FEB388A80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 37, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 37, i32 0, i32 3), align 4
- store float 0x3FC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 38, i32 0, i32 0), align 32
- store float 0xBFDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 38, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 38, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 38, i32 0, i32 3), align 4
- store float 0xBFDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 39, i32 0, i32 0), align 16
- store float 0xBFD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 39, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 39, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 39, i32 0, i32 3), align 4
- store float 0xBFDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 40, i32 0, i32 0), align 32
- store float 0x3FD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 40, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 40, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 40, i32 0, i32 3), align 4
- store float 0x3FC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 41, i32 0, i32 0), align 16
- store float 0x3FDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 41, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 41, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 41, i32 0, i32 3), align 4
- tail call void @__cxa_guard_release(i64* @_ZGVZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints) nounwind
- ret %struct.btQuadWord* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 0)
-
-bb5: ; preds = %bb, %entry
- ret %struct.btQuadWord* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 0)
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN10HullResultD1Ev(%struct.HullResult* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %1 = load i32** %0, align 4 ; [#uses=2]
- %2 = icmp eq i32* %1, null ; [#uses=1]
- br i1 %2, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %5 = bitcast i32* %1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %0, align 4
- br label %bb3
-
-invcont1: ; preds = %bb2.i.i.i20, %lpad
- %6 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %21, align 4
- %7 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %9 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- store i32* null, i32** %0, align 4
- %10 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %13 = load %struct.btQuadWord** %12, align 4 ; [#uses=2]
- %14 = icmp eq %struct.btQuadWord* %13, null ; [#uses=1]
- br i1 %14, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit, label %bb.i.i.i14
-
-bb.i.i.i14: ; preds = %bb3
- %15 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %16 = load i8* %15, align 4 ; [#uses=1]
- %toBool.i.i.i13 = icmp eq i8 %16, 0 ; [#uses=1]
- br i1 %toBool.i.i.i13, label %bb2.i.i.i16, label %bb1.i.i.i15
-
-bb1.i.i.i15: ; preds = %bb.i.i.i14
- %17 = bitcast %struct.btQuadWord* %13 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %17)
- br label %bb2.i.i.i16
-
-bb2.i.i.i16: ; preds = %bb1.i.i.i15, %bb.i.i.i14
- store %struct.btQuadWord* null, %struct.btQuadWord** %12, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit: ; preds = %bb2.i.i.i16, %bb3
- %18 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %18, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %12, align 4
- %19 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %20, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %21 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %22 = load %struct.btQuadWord** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btQuadWord* %22, null ; [#uses=1]
- br i1 %23, label %invcont1, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %lpad
- %24 = getelementptr inbounds %struct.HullResult* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %26 = bitcast %struct.btQuadWord* %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %26)
- to label %bb2.i.i.i20 unwind label %lpad7
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.btQuadWord* null, %struct.btQuadWord** %21, align 4
- br label %invcont1
-
-lpad7: ; preds = %bb1.i.i.i19
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN11btShapeHullD1Ev(%struct.btShapeHull* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 3 ; [#uses=10]
- %1 = load i32** %0, align 4 ; [#uses=2]
- %2 = icmp eq i32* %1, null ; [#uses=1]
- br i1 %2, label %invcont, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %5 = bitcast i32* %1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb2.i.i unwind label %lpad17
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store i32* null, i32** %0, align 4
- br label %invcont
-
-invcont: ; preds = %bb2.i.i, %entry
- %6 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=5]
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- %7 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 1 ; [#uses=4]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 2 ; [#uses=4]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 3 ; [#uses=6]
- %10 = load %struct.btQuadWord** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btQuadWord* %10, null ; [#uses=1]
- br i1 %11, label %bb4, label %bb.i.i34
-
-bb.i.i34: ; preds = %invcont
- %12 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i33 = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i33, label %bb2.i.i36, label %bb1.i.i35
-
-bb1.i.i35: ; preds = %bb.i.i34
- %14 = bitcast %struct.btQuadWord* %10 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb1.i.i35.bb2.i.i36_crit_edge unwind label %lpad17
-
-bb1.i.i35.bb2.i.i36_crit_edge: ; preds = %bb1.i.i35
- %.pre.pre = load i32** %0, align 4 ; [#uses=1]
- br label %bb2.i.i36
-
-bb2.i.i36: ; preds = %bb1.i.i35.bb2.i.i36_crit_edge, %bb.i.i34
- %.pre = phi i32* [ %.pre.pre, %bb1.i.i35.bb2.i.i36_crit_edge ], [ null, %bb.i.i34 ] ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- br label %bb4
-
-bb4: ; preds = %bb2.i.i36, %invcont
- %15 = phi i32* [ %.pre, %bb2.i.i36 ], [ null, %invcont ] ; [#uses=2]
- %16 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=3]
- store i8 1, i8* %16, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- %17 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %18, align 4
- %19 = icmp eq i32* %15, null ; [#uses=1]
- br i1 %19, label %bb11.thread, label %bb.i.i.i
-
-bb11.thread: ; preds = %bb4
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- store i32 0, i32* %7, align 4
- store i32 0, i32* %8, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-bb.i.i.i: ; preds = %bb4
- %20 = load i8* %6, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %20, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb11.thread58, label %bb1.i.i.i
-
-bb11.thread58: ; preds = %bb.i.i.i
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- store i32 0, i32* %7, align 4
- store i32 0, i32* %8, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %21 = bitcast i32* %15 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %21)
- to label %bb11 unwind label %lpad
-
-invcont9: ; preds = %bb2.i.i.i52, %ppad
- %22 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %22, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %36, align 4
- %23 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %24, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb11: ; preds = %bb1.i.i.i
- %.pre55.pre = load %struct.btQuadWord** %9, align 4 ; [#uses=2]
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- store i32 0, i32* %7, align 4
- store i32 0, i32* %8, align 4
- %25 = icmp eq %struct.btQuadWord* %.pre55.pre, null ; [#uses=1]
- br i1 %25, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %bb11
- %26 = load i8* %16, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %27 = bitcast %struct.btQuadWord* %.pre55.pre to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i42
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit: ; preds = %bb2.i.i.i42, %bb11, %bb11.thread58, %bb11.thread
- store i8 1, i8* %16, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- store i32 0, i32* %17, align 4
- store i32 0, i32* %18, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select16 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad17: ; preds = %bb1.i.i35, %bb1.i.i
- %eh_ptr18 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr18, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %28 = load i32** %0, align 4 ; [#uses=2]
- %29 = icmp eq i32* %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIjED1Ev.exit48, label %bb.i.i.i44
-
-bb.i.i.i44: ; preds = %lpad17
- %30 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %31 = load i8* %30, align 4 ; [#uses=1]
- %toBool.i.i.i43 = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i43, label %bb2.i.i.i46, label %bb1.i.i.i45
-
-bb1.i.i.i45: ; preds = %bb.i.i.i44
- %32 = bitcast i32* %28 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %32)
- to label %bb2.i.i.i46 unwind label %lpad21
-
-bb2.i.i.i46: ; preds = %bb1.i.i.i45, %bb.i.i.i44
- store i32* null, i32** %0, align 4
- br label %_ZN20btAlignedObjectArrayIjED1Ev.exit48
-
-_ZN20btAlignedObjectArrayIjED1Ev.exit48: ; preds = %bb2.i.i.i46, %lpad17
- %33 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %33, align 4
- store i32* null, i32** %0, align 4
- %34 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %34, align 4
- %35 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %35, align 4
- br label %ppad
-
-lpad21: ; preds = %bb1.i.i.i45
- %eh_ptr22 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select24 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr22, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad25: ; preds = %bb1.i.i.i51
- %eh_ptr26 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIjED1Ev.exit48, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr18, %_ZN20btAlignedObjectArrayIjED1Ev.exit48 ] ; [#uses=1]
- %36 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %37 = load %struct.btQuadWord** %36, align 4 ; [#uses=2]
- %38 = icmp eq %struct.btQuadWord* %37, null ; [#uses=1]
- br i1 %38, label %invcont9, label %bb.i.i.i50
-
-bb.i.i.i50: ; preds = %ppad
- %39 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %40 = load i8* %39, align 4 ; [#uses=1]
- %toBool.i.i.i49 = icmp eq i8 %40, 0 ; [#uses=1]
- br i1 %toBool.i.i.i49, label %bb2.i.i.i52, label %bb1.i.i.i51
-
-bb1.i.i.i51: ; preds = %bb.i.i.i50
- %41 = bitcast %struct.btQuadWord* %37 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %41)
- to label %bb2.i.i.i52 unwind label %lpad25
-
-bb2.i.i.i52: ; preds = %bb1.i.i.i51, %bb.i.i.i50
- store %struct.btQuadWord* null, %struct.btQuadWord** %36, align 4
- br label %invcont9
-}
-
-; [#uses=0]
-define void @_ZN11btShapeHullD2Ev(%struct.btShapeHull* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 3 ; [#uses=10]
- %1 = load i32** %0, align 4 ; [#uses=2]
- %2 = icmp eq i32* %1, null ; [#uses=1]
- br i1 %2, label %invcont, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %5 = bitcast i32* %1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb2.i.i unwind label %lpad17
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store i32* null, i32** %0, align 4
- br label %invcont
-
-invcont: ; preds = %bb2.i.i, %entry
- %6 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=5]
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- %7 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 1 ; [#uses=4]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 2 ; [#uses=4]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 3 ; [#uses=6]
- %10 = load %struct.btQuadWord** %9, align 4 ; [#uses=2]
- %11 = icmp eq %struct.btQuadWord* %10, null ; [#uses=1]
- br i1 %11, label %bb4, label %bb.i.i34
-
-bb.i.i34: ; preds = %invcont
- %12 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i33 = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i33, label %bb2.i.i36, label %bb1.i.i35
-
-bb1.i.i35: ; preds = %bb.i.i34
- %14 = bitcast %struct.btQuadWord* %10 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb1.i.i35.bb2.i.i36_crit_edge unwind label %lpad17
-
-bb1.i.i35.bb2.i.i36_crit_edge: ; preds = %bb1.i.i35
- %.pre.pre = load i32** %0, align 4 ; [#uses=1]
- br label %bb2.i.i36
-
-bb2.i.i36: ; preds = %bb1.i.i35.bb2.i.i36_crit_edge, %bb.i.i34
- %.pre = phi i32* [ %.pre.pre, %bb1.i.i35.bb2.i.i36_crit_edge ], [ null, %bb.i.i34 ] ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- br label %bb4
-
-bb4: ; preds = %bb2.i.i36, %invcont
- %15 = phi i32* [ %.pre, %bb2.i.i36 ], [ null, %invcont ] ; [#uses=2]
- %16 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=3]
- store i8 1, i8* %16, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- %17 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %18, align 4
- %19 = icmp eq i32* %15, null ; [#uses=1]
- br i1 %19, label %bb11.thread, label %bb.i.i.i
-
-bb11.thread: ; preds = %bb4
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- store i32 0, i32* %7, align 4
- store i32 0, i32* %8, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-bb.i.i.i: ; preds = %bb4
- %20 = load i8* %6, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %20, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb11.thread58, label %bb1.i.i.i
-
-bb11.thread58: ; preds = %bb.i.i.i
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- store i32 0, i32* %7, align 4
- store i32 0, i32* %8, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %21 = bitcast i32* %15 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %21)
- to label %bb11 unwind label %lpad
-
-invcont9: ; preds = %bb2.i.i.i52, %ppad
- %22 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %22, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %36, align 4
- %23 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %24, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb11: ; preds = %bb1.i.i.i
- %.pre55.pre = load %struct.btQuadWord** %9, align 4 ; [#uses=2]
- store i8 1, i8* %6, align 4
- store i32* null, i32** %0, align 4
- store i32 0, i32* %7, align 4
- store i32 0, i32* %8, align 4
- %25 = icmp eq %struct.btQuadWord* %.pre55.pre, null ; [#uses=1]
- br i1 %25, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %bb11
- %26 = load i8* %16, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %27 = bitcast %struct.btQuadWord* %.pre55.pre to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i42
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit: ; preds = %bb2.i.i.i42, %bb11, %bb11.thread58, %bb11.thread
- store i8 1, i8* %16, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %9, align 4
- store i32 0, i32* %17, align 4
- store i32 0, i32* %18, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select16 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad17: ; preds = %bb1.i.i35, %bb1.i.i
- %eh_ptr18 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select20 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr18, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %28 = load i32** %0, align 4 ; [#uses=2]
- %29 = icmp eq i32* %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIjED1Ev.exit48, label %bb.i.i.i44
-
-bb.i.i.i44: ; preds = %lpad17
- %30 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %31 = load i8* %30, align 4 ; [#uses=1]
- %toBool.i.i.i43 = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i43, label %bb2.i.i.i46, label %bb1.i.i.i45
-
-bb1.i.i.i45: ; preds = %bb.i.i.i44
- %32 = bitcast i32* %28 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %32)
- to label %bb2.i.i.i46 unwind label %lpad21
-
-bb2.i.i.i46: ; preds = %bb1.i.i.i45, %bb.i.i.i44
- store i32* null, i32** %0, align 4
- br label %_ZN20btAlignedObjectArrayIjED1Ev.exit48
-
-_ZN20btAlignedObjectArrayIjED1Ev.exit48: ; preds = %bb2.i.i.i46, %lpad17
- %33 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %33, align 4
- store i32* null, i32** %0, align 4
- %34 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %34, align 4
- %35 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %35, align 4
- br label %ppad
-
-lpad21: ; preds = %bb1.i.i.i45
- %eh_ptr22 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select24 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr22, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad25: ; preds = %bb1.i.i.i51
- %eh_ptr26 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select28 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIjED1Ev.exit48, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr18, %_ZN20btAlignedObjectArrayIjED1Ev.exit48 ] ; [#uses=1]
- %36 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %37 = load %struct.btQuadWord** %36, align 4 ; [#uses=2]
- %38 = icmp eq %struct.btQuadWord* %37, null ; [#uses=1]
- br i1 %38, label %invcont9, label %bb.i.i.i50
-
-bb.i.i.i50: ; preds = %ppad
- %39 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %40 = load i8* %39, align 4 ; [#uses=1]
- %toBool.i.i.i49 = icmp eq i8 %40, 0 ; [#uses=1]
- br i1 %toBool.i.i.i49, label %bb2.i.i.i52, label %bb1.i.i.i51
-
-bb1.i.i.i51: ; preds = %bb.i.i.i50
- %41 = bitcast %struct.btQuadWord* %37 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %41)
- to label %bb2.i.i.i52 unwind label %lpad25
-
-bb2.i.i.i52: ; preds = %bb1.i.i.i51, %bb.i.i.i50
- store %struct.btQuadWord* null, %struct.btQuadWord** %36, align 4
- br label %invcont9
-}
-
-; [#uses=0]
-define void @_ZN11btShapeHullC1EPK13btConvexShape(%struct.btShapeHull* nocapture %this, %struct.btConvexShape* %shape) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %shape, %struct.btConvexShape** %8, align 4
- store i8 1, i8* %0, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %1, align 4
- store i32 0, i32* %2, align 4
- store i32 0, i32* %3, align 4
- store i8 1, i8* %4, align 4
- store i32* null, i32** %5, align 4
- store i32 0, i32* %6, align 4
- store i32 0, i32* %7, align 4
- %9 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN11HullLibraryD1Ev(%struct.HullLibrary* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %1 = load i32** %0, align 4 ; [#uses=2]
- %2 = icmp eq i32* %1, null ; [#uses=1]
- br i1 %2, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %5 = bitcast i32* %1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %0, align 4
- br label %bb3
-
-invcont1: ; preds = %bb2.i.i.i20, %lpad
- %6 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %21, align 4
- %7 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %9 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- store i32* null, i32** %0, align 4
- %10 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %13 = load %struct.btHullTriangle*** %12, align 4 ; [#uses=2]
- %14 = icmp eq %struct.btHullTriangle** %13, null ; [#uses=1]
- br i1 %14, label %_ZN20btAlignedObjectArrayIP14btHullTriangleED1Ev.exit, label %bb.i.i.i14
-
-bb.i.i.i14: ; preds = %bb3
- %15 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %16 = load i8* %15, align 4 ; [#uses=1]
- %toBool.i.i.i13 = icmp eq i8 %16, 0 ; [#uses=1]
- br i1 %toBool.i.i.i13, label %bb2.i.i.i16, label %bb1.i.i.i15
-
-bb1.i.i.i15: ; preds = %bb.i.i.i14
- %17 = bitcast %struct.btHullTriangle** %13 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %17)
- br label %bb2.i.i.i16
-
-bb2.i.i.i16: ; preds = %bb1.i.i.i15, %bb.i.i.i14
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %12, align 4
- br label %_ZN20btAlignedObjectArrayIP14btHullTriangleED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP14btHullTriangleED1Ev.exit: ; preds = %bb2.i.i.i16, %bb3
- %18 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %18, align 4
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %12, align 4
- %19 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %20, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %21 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %22 = load %struct.btHullTriangle*** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btHullTriangle** %22, null ; [#uses=1]
- br i1 %23, label %invcont1, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %lpad
- %24 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %26 = bitcast %struct.btHullTriangle** %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %26)
- to label %bb2.i.i.i20 unwind label %lpad7
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %21, align 4
- br label %invcont1
-
-lpad7: ; preds = %bb1.i.i.i19
- %eh_ptr8 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(%"struct.btAlignedObjectArray<int>"* nocapture %this, i32 %newsize, i32* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 2 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to i32* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi i32* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr i32* %11, i32 %indvar.i.i ; [#uses=2]
- %14 = icmp eq i32* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %15 = load i32** %13, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr i32* %15, i32 %indvar.i.i ; [#uses=1]
- %16 = load i32* %scevgep8.i.i, align 4 ; [#uses=1]
- store i32 %16, i32* %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond19 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond19, label %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i
- %17 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 3 ; [#uses=3]
- %18 = load i32** %17, align 4 ; [#uses=2]
- %19 = icmp eq i32* %18, null ; [#uses=1]
- br i1 %19, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 4 ; [#uses=1]
- %21 = load i8* %20, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %21, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %22 = bitcast i32* %18 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %22)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store i32* null, i32** %17, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %23, align 4
- store i32* %11, i32** %17, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %this, i32 0, i32 3 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=1]
- %25 = load i32** %24, align 4 ; [#uses=1]
- %scevgep18 = getelementptr i32* %25, i32 %tmp17 ; [#uses=2]
- %26 = icmp eq i32* %scevgep18, null ; [#uses=1]
- br i1 %26, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %27 = load i32* %fillData, align 4 ; [#uses=1]
- store i32 %27, i32* %scevgep18, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN11btShapeHull9buildHullEf(%struct.btShapeHull* nocapture %this, float %unnamed_arg) align 2 {
-entry:
- %0 = alloca i32, align 4 ; [#uses=2]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %supportPoints = alloca [62 x %struct.btQuadWord], align 8 ; [#uses=5]
- %hd = alloca %struct.HullDesc, align 8 ; [#uses=8]
- %hl = alloca %struct.HullLibrary, align 8 ; [#uses=12]
- %hr = alloca %struct.HullResult, align 8 ; [#uses=16]
- %norm = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 3 ; [#uses=4]
- %3 = load %struct.btConvexShape** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btConvexShape* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 19 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to i32 (%struct.btConvexShape*)* ; [#uses=1]
- %9 = call i32 %8(%struct.btConvexShape* %3) ; [#uses=4]
- %10 = icmp eq i32 %9, 0 ; [#uses=1]
- %.not = xor i1 %10, true ; [#uses=1]
- %11 = icmp sgt i32 %9, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %11 ; [#uses=1]
- br i1 %or.cond, label %bb.nph, label %bb.nph65
-
-bb.nph: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %norm, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %norm, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %norm, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %norm, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %16 = phi i32 [ 0, %bb.nph ], [ %28, %bb2 ] ; [#uses=3]
- %tmp68 = add i32 %16, 42 ; [#uses=4]
- %scevgep69 = getelementptr [62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 %tmp68, i32 0, i32 0 ; [#uses=1]
- %scevgep70 = getelementptr [62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 %tmp68, i32 0, i32 1 ; [#uses=1]
- %scevgep71 = getelementptr [62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 %tmp68, i32 0, i32 2 ; [#uses=1]
- %scevgep72 = getelementptr [62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 %tmp68, i32 0, i32 3 ; [#uses=1]
- %17 = load %struct.btConvexShape** %2, align 4 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btConvexShape* %17, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 20 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %21 to void (%struct.btConvexShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %22(%struct.btConvexShape* %17, i32 %16, %struct.btQuadWord* %norm)
- %23 = call %struct.btQuadWord* @_ZN11btShapeHull19getUnitSpherePointsEv() nounwind ; [#uses=0]
- %24 = load float* %12, align 8 ; [#uses=1]
- store float %24, float* %scevgep69, align 16
- %25 = load float* %13, align 4 ; [#uses=1]
- store float %25, float* %scevgep70, align 4
- %26 = load float* %14, align 8 ; [#uses=1]
- store float %26, float* %scevgep71, align 8
- %27 = load float* %15, align 4 ; [#uses=1]
- store float %27, float* %scevgep72, align 4
- %28 = add nsw i32 %16, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %28, %9 ; [#uses=1]
- br i1 %exitcond, label %bb9.preheader, label %bb2
-
-bb9.preheader: ; preds = %bb2
- %tmp = add i32 %9, 42 ; [#uses=3]
- %29 = icmp sgt i32 %tmp, 0 ; [#uses=1]
- br i1 %29, label %bb.nph65, label %invcont
-
-bb.nph65: ; preds = %bb9.preheader, %entry
- %numSampleDirections.196 = phi i32 [ %tmp, %bb9.preheader ], [ 42, %entry ] ; [#uses=2]
- %30 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb8, %bb.nph65
- %i.064 = phi i32 [ 0, %bb.nph65 ], [ %46, %bb8 ] ; [#uses=6]
- %scevgep8889 = getelementptr [62 x %struct.btQuadWord]* %supportPoints, i32 0, i32 %i.064, i32 0, i32 0 ; [#uses=1]
- %scevgep90 = getelementptr [62 x %struct.btQuadWord]* %supportPoints, i32 0, i32 %i.064, i32 0, i32 1 ; [#uses=1]
- %scevgep91 = getelementptr [62 x %struct.btQuadWord]* %supportPoints, i32 0, i32 %i.064, i32 0, i32 2 ; [#uses=1]
- %scevgep92 = getelementptr [62 x %struct.btQuadWord]* %supportPoints, i32 0, i32 %i.064, i32 0, i32 3 ; [#uses=1]
- %scevgep93 = getelementptr [62 x %struct.btQuadWord]* @_ZZN11btShapeHull19getUnitSpherePointsEvE17sUnitSpherePoints, i32 0, i32 %i.064 ; [#uses=1]
- %34 = load %struct.btConvexShape** %2, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btConvexShape* %34, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load i32 (...)*** %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 15 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = call %struct.btQuadWord* @_ZN11btShapeHull19getUnitSpherePointsEv() nounwind ; [#uses=0]
- %40 = load %struct.btConvexShape** %2, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %38 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %41(%struct.btQuadWord* noalias sret %memtmp, %struct.btConvexShape* %40, %struct.btQuadWord* %scevgep93)
- %42 = load float* %30, align 8 ; [#uses=1]
- store float %42, float* %scevgep8889, align 8
- %43 = load float* %31, align 4 ; [#uses=1]
- store float %43, float* %scevgep90, align 4
- %44 = load float* %32, align 8 ; [#uses=1]
- store float %44, float* %scevgep91, align 8
- %45 = load float* %33, align 4 ; [#uses=1]
- store float %45, float* %scevgep92, align 4
- %46 = add nsw i32 %i.064, 1 ; [#uses=2]
- %exitcond87 = icmp eq i32 %46, %numSampleDirections.196 ; [#uses=1]
- br i1 %exitcond87, label %invcont, label %bb8
-
-invcont: ; preds = %bb8, %bb9.preheader
- %numSampleDirections.195 = phi i32 [ %tmp, %bb9.preheader ], [ %numSampleDirections.196, %bb8 ] ; [#uses=1]
- %47 = getelementptr inbounds %struct.HullDesc* %hd, i32 0, i32 0 ; [#uses=1]
- %48 = getelementptr inbounds %struct.HullDesc* %hd, i32 0, i32 1 ; [#uses=1]
- %49 = getelementptr inbounds %struct.HullDesc* %hd, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds %struct.HullDesc* %hd, i32 0, i32 3 ; [#uses=1]
- %51 = getelementptr inbounds %struct.HullDesc* %hd, i32 0, i32 4 ; [#uses=1]
- store float 0x3F50624DE0000000, float* %51, align 8
- %52 = getelementptr inbounds %struct.HullDesc* %hd, i32 0, i32 5 ; [#uses=1]
- store i32 4096, i32* %52, align 4
- %53 = getelementptr inbounds %struct.HullDesc* %hd, i32 0, i32 6 ; [#uses=1]
- store i32 4096, i32* %53, align 8
- store i32 1, i32* %47, align 8
- store i32 %numSampleDirections.195, i32* %48, align 4
- %54 = getelementptr inbounds [62 x %struct.btQuadWord]* %supportPoints, i32 0, i32 0 ; [#uses=1]
- store %struct.btQuadWord* %54, %struct.btQuadWord** %49, align 8
- store i32 16, i32* %50, align 4
- %55 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 8
- %56 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 0, i32 3 ; [#uses=1]
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %56, align 4
- %57 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %57, align 4
- %58 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %58, align 8
- %59 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %59, align 4
- %60 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 1, i32 3 ; [#uses=1]
- store i32* null, i32** %60, align 4
- %61 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %61, align 4
- %62 = getelementptr inbounds %struct.HullLibrary* %hl, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %62, align 4
- %63 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %63, align 8
- %64 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 2, i32 3 ; [#uses=2]
- store %struct.btQuadWord* null, %struct.btQuadWord** %64, align 4
- %65 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %65, align 4
- %66 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %66, align 8
- %67 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %67, align 4
- %68 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 5, i32 3 ; [#uses=2]
- store i32* null, i32** %68, align 4
- %69 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %69, align 4
- %70 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %70, align 4
- %71 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 0 ; [#uses=1]
- store i8 1, i8* %71, align 8
- %72 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 1 ; [#uses=4]
- store i32 0, i32* %72, align 4
- %73 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %73, align 4
- %74 = getelementptr inbounds %struct.HullResult* %hr, i32 0, i32 4 ; [#uses=2]
- store i32 0, i32* %74, align 8
- %75 = invoke i32 @_ZN11HullLibrary16CreateConvexHullERK8HullDescR10HullResult(%struct.HullLibrary* %hl, %struct.HullDesc* %hd, %struct.HullResult* %hr)
- to label %invcont11 unwind label %lpad40 ; [#uses=1]
-
-invcont11: ; preds = %invcont
- %76 = icmp eq i32 %75, 1 ; [#uses=1]
- br i1 %76, label %bb28, label %bb13
-
-bb13: ; preds = %invcont11
- %77 = load i32* %72, align 4 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %78, i32 %77, %struct.btQuadWord* %1) inlinehint
- to label %bb16.preheader unwind label %lpad40
-
-bb16.preheader: ; preds = %bb13
- %79 = load i32* %72, align 4 ; [#uses=1]
- %80 = icmp sgt i32 %79, 0 ; [#uses=1]
- br i1 %80, label %bb.nph63, label %bb17
-
-bb.nph63: ; preds = %bb16.preheader
- %81 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb15, %bb.nph63
- %i.162 = phi i32 [ 0, %bb.nph63 ], [ %88, %bb15 ] ; [#uses=9]
- %82 = load %struct.btQuadWord** %81, align 4 ; [#uses=4]
- %83 = load %struct.btQuadWord** %64, align 4 ; [#uses=4]
- %scevgep7879 = getelementptr inbounds %struct.btQuadWord* %83, i32 %i.162, i32 0, i32 0 ; [#uses=1]
- %84 = load float* %scevgep7879, align 4 ; [#uses=1]
- %scevgep7677 = getelementptr inbounds %struct.btQuadWord* %82, i32 %i.162, i32 0, i32 0 ; [#uses=1]
- store float %84, float* %scevgep7677, align 4
- %scevgep81 = getelementptr %struct.btQuadWord* %83, i32 %i.162, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %scevgep81, align 4 ; [#uses=1]
- %scevgep80 = getelementptr %struct.btQuadWord* %82, i32 %i.162, i32 0, i32 1 ; [#uses=1]
- store float %85, float* %scevgep80, align 4
- %scevgep83 = getelementptr %struct.btQuadWord* %83, i32 %i.162, i32 0, i32 2 ; [#uses=1]
- %86 = load float* %scevgep83, align 4 ; [#uses=1]
- %scevgep82 = getelementptr %struct.btQuadWord* %82, i32 %i.162, i32 0, i32 2 ; [#uses=1]
- store float %86, float* %scevgep82, align 4
- %scevgep85 = getelementptr %struct.btQuadWord* %83, i32 %i.162, i32 0, i32 3 ; [#uses=1]
- %87 = load float* %scevgep85, align 4 ; [#uses=1]
- %scevgep84 = getelementptr %struct.btQuadWord* %82, i32 %i.162, i32 0, i32 3 ; [#uses=1]
- store float %87, float* %scevgep84, align 4
- %88 = add nsw i32 %i.162, 1 ; [#uses=2]
- %89 = load i32* %72, align 4 ; [#uses=1]
- %90 = icmp sgt i32 %89, %88 ; [#uses=1]
- br i1 %90, label %bb15, label %bb17
-
-bb17: ; preds = %bb15, %bb16.preheader
- %91 = load i32* %74, align 8 ; [#uses=2]
- %92 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 2 ; [#uses=3]
- store i32 %91, i32* %92, align 4
- store i32 0, i32* %0, align 4
- %93 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(%"struct.btAlignedObjectArray<int>"* %93, i32 %91, i32* %0) inlinehint
- to label %bb20.preheader unwind label %lpad40
-
-bb20.preheader: ; preds = %bb17
- %94 = load i32* %92, align 4 ; [#uses=1]
- %95 = icmp sgt i32 %94, 0 ; [#uses=1]
- br i1 %95, label %bb.nph61, label %bb21
-
-bb.nph61: ; preds = %bb20.preheader
- %96 = getelementptr inbounds %struct.btShapeHull* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb19, %bb.nph61
- %i.260 = phi i32 [ 0, %bb.nph61 ], [ %100, %bb19 ] ; [#uses=3]
- %97 = load i32** %96, align 4 ; [#uses=1]
- %98 = load i32** %68, align 4 ; [#uses=1]
- %scevgep73 = getelementptr i32* %98, i32 %i.260 ; [#uses=1]
- %99 = load i32* %scevgep73, align 4 ; [#uses=1]
- %scevgep74 = getelementptr i32* %97, i32 %i.260 ; [#uses=1]
- store i32 %99, i32* %scevgep74, align 4
- %100 = add nsw i32 %i.260, 1 ; [#uses=2]
- %101 = load i32* %92, align 4 ; [#uses=1]
- %102 = icmp sgt i32 %101, %100 ; [#uses=1]
- br i1 %102, label %bb19, label %bb21
-
-bb21: ; preds = %bb19, %bb20.preheader
- %103 = invoke i32 @_ZN11HullLibrary13ReleaseResultER10HullResult(%struct.HullLibrary* %hl, %struct.HullResult* %hr)
- to label %bb28 unwind label %lpad40 ; [#uses=0]
-
-bb28: ; preds = %bb21, %invcont11
- %.057 = phi i8 [ 0, %invcont11 ], [ 1, %bb21 ] ; [#uses=1]
- invoke void @_ZN10HullResultD1Ev(%struct.HullResult* %hr)
- to label %bb35 unwind label %lpad
-
-invcont33: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb35: ; preds = %bb28
- call void @_ZN11HullLibraryD1Ev(%struct.HullLibrary* %hl)
- ret i8 %.057
-
-lpad: ; preds = %bb28
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad40: ; preds = %bb21, %bb17, %bb13, %invcont
- %eh_ptr41 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN10HullResultD1Ev(%struct.HullResult* %hr)
- to label %ppad unwind label %lpad44
-
-lpad44: ; preds = %lpad40
- %eh_ptr45 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select47 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad48: ; preds = %ppad
- %eh_ptr49 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad40, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr41, %lpad40 ] ; [#uses=1]
- invoke void @_ZN11HullLibraryD1Ev(%struct.HullLibrary* %hl)
- to label %invcont33 unwind label %lpad48
-}
-
-; [#uses=1]
-define void @_ZNK13btSphereShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btPolyhedralConvexShape* nocapture %this, %struct.btQuadWord* nocapture %vec) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK13btSphereShape7getNameEv(%struct.btPolyhedralConvexShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([7 x i8]* @.str115, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btSphereShape9setMarginEf(%struct.btPolyhedralConvexShape* nocapture %this, float %margin) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %margin, float* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZNK13btSphereShape9getMarginEv(%struct.btPolyhedralConvexShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fmul float %1, %3 ; [#uses=1]
- ret float %4
-}
-
-; [#uses=1]
-define void @_ZNK13btSphereShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btPolyhedralConvexShape* nocapture %this, %struct.btQuadWord* nocapture %vectors, %struct.btQuadWord* nocapture %supportVerticesOut, i32 %numVectors) nounwind align 2 {
-entry:
- %0 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %0, label %bb, label %return
-
-bb: ; preds = %bb, %entry
- %i.03 = phi i32 [ %1, %bb ], [ 0, %entry ] ; [#uses=5]
- %scevgep4 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 0 ; [#uses=1]
- %scevgep5 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 1 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 2 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.03, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep4, align 4
- store float 0.000000e+00, float* %scevgep5, align 4
- store float 0.000000e+00, float* %scevgep6, align 4
- store float 0.000000e+00, float* %scevgep7, align 4
- %1 = add nsw i32 %i.03, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %1, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK13btSphereShape7getAabbERK11btTransformR9btVector3S4_(%struct.btPolyhedralConvexShape* %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to float (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %5 = tail call float %4(%struct.btPolyhedralConvexShape* %this) ; [#uses=2]
- %6 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 11 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to float (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %10 = tail call float %9(%struct.btPolyhedralConvexShape* %this) ; [#uses=2]
- %11 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 11 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to float (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %15 = tail call float %14(%struct.btPolyhedralConvexShape* %this) ; [#uses=2]
- %16 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fsub float %17, %5 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %20, %10 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fsub float %23, %15 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %24, float* %25, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %18, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = load float* %16, align 4 ; [#uses=1]
- %30 = fadd float %29, %5 ; [#uses=1]
- %31 = load float* %19, align 4 ; [#uses=1]
- %32 = fadd float %31, %10 ; [#uses=1]
- %33 = load float* %22, align 4 ; [#uses=1]
- %34 = fadd float %33, %15 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %34, float* %35, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %32, float* %36, align 4
- %37 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %30, float* %37, align 4
- %38 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK13btSphereShape21calculateLocalInertiaEfR9btVector3(%struct.btPolyhedralConvexShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %0 = fmul float %mass, 0x3FD99999A0000000 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 11 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to float (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btPolyhedralConvexShape* %this) ; [#uses=1]
- %7 = fmul float %0, %6 ; [#uses=1]
- %8 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 11 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to float (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %12 = tail call float %11(%struct.btPolyhedralConvexShape* %this) ; [#uses=1]
- %13 = fmul float %7, %12 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %13, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %13, float* %15, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %13, float* %16, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btSphereShapeD0Ev(%struct.btPolyhedralConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btPolyhedralConvexShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN13btSphereShapeD1Ev(%struct.btPolyhedralConvexShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK13btSphereShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btPolyhedralConvexShape* %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btPolyhedralConvexShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btQuadWord*, %struct.btPolyhedralConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %4(%struct.btQuadWord* noalias sret %memtmp, %struct.btPolyhedralConvexShape* %this, %struct.btQuadWord* %vec)
- %5 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 8 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 8 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=3]
- %23 = fmul float %18, %18 ; [#uses=1]
- %24 = fmul float %20, %20 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = fmul float %22, %22 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = fcmp olt float %27, 0x3D10000000000000 ; [#uses=3]
- %vecnorm.0.0.0 = select i1 %28, float -1.000000e+00, float %18 ; [#uses=3]
- %vecnorm.0.1.0 = select i1 %28, float -1.000000e+00, float %20 ; [#uses=3]
- %vecnorm.0.2.0 = select i1 %28, float -1.000000e+00, float %22 ; [#uses=3]
- %29 = fmul float %vecnorm.0.0.0, %vecnorm.0.0.0 ; [#uses=1]
- %30 = fmul float %vecnorm.0.1.0, %vecnorm.0.1.0 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=1]
- %32 = fmul float %vecnorm.0.2.0, %vecnorm.0.2.0 ; [#uses=1]
- %33 = fadd float %31, %32 ; [#uses=1]
- %34 = call float @sqrtf(float %33) nounwind readonly ; [#uses=1]
- %35 = fdiv float 1.000000e+00, %34 ; [#uses=3]
- %36 = fmul float %vecnorm.0.0.0, %35 ; [#uses=1]
- %37 = fmul float %vecnorm.0.1.0, %35 ; [#uses=1]
- %38 = fmul float %vecnorm.0.2.0, %35 ; [#uses=1]
- %39 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %40 = getelementptr inbounds i32 (...)** %39, i32 11 ; [#uses=1]
- %41 = load i32 (...)** %40, align 4 ; [#uses=1]
- %42 = bitcast i32 (...)* %41 to float (%struct.btPolyhedralConvexShape*)* ; [#uses=1]
- %43 = call float %42(%struct.btPolyhedralConvexShape* %this) ; [#uses=3]
- %44 = fmul float %38, %43 ; [#uses=1]
- %45 = fmul float %37, %43 ; [#uses=1]
- %46 = fmul float %36, %43 ; [#uses=1]
- %47 = fadd float %7, %46 ; [#uses=1]
- store float %47, float* %5, align 4
- %48 = fadd float %10, %45 ; [#uses=1]
- store float %48, float* %8, align 4
- %49 = fadd float %13, %44 ; [#uses=1]
- store float %49, float* %11, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btStaticPlaneShapeC2ERK9btVector3f(%struct.btStaticPlaneShape* %this, %struct.btQuadWord* nocapture %planeNormal, float %planeConstant) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV18btStaticPlaneShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %3, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = fmul float %6, %6 ; [#uses=1]
- %8 = fadd float %4, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = fmul float %10, %10 ; [#uses=1]
- %12 = fadd float %8, %11 ; [#uses=1]
- %13 = tail call float @sqrtf(float %12) nounwind readonly ; [#uses=1]
- %14 = fdiv float 1.000000e+00, %13 ; [#uses=3]
- %15 = fmul float %10, %14 ; [#uses=1]
- %16 = fmul float %6, %14 ; [#uses=1]
- %17 = fmul float %3, %14 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 4
- %19 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %19, align 4
- %20 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %20, align 4
- %21 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 4 ; [#uses=1]
- store float %planeConstant, float* %22, align 4
- %23 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 28, i32* %27, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK18btStaticPlaneShape7getNameEv(%struct.btStaticPlaneShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([12 x i8]* @.str120, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK18btStaticPlaneShape28calculateSerializeBufferSizeEv(%struct.btStaticPlaneShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 52
-}
-
-; [#uses=1]
-define void @_ZNK18btStaticPlaneShape7getAabbERK11btTransformR9btVector3S4_(%struct.btStaticPlaneShape* nocapture %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK18btStaticPlaneShape21calculateLocalInertiaEfR9btVector3(%struct.btStaticPlaneShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btStaticPlaneShape15setLocalScalingERK9btVector3(%struct.btStaticPlaneShape* nocapture %this, %struct.btQuadWord* nocapture %scaling) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btQuadWord* @_ZNK18btStaticPlaneShape15getLocalScalingEv(%struct.btStaticPlaneShape* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK18btStaticPlaneShape9serializeEPvP12btSerializer(%struct.btStaticPlaneShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %2 to float* ; [#uses=1]
- %3 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 16 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %5 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.2.i = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 20 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %7 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.3.i = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 24 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %9 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %9, float* %8, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 28 ; [#uses=1]
- %scevgep.i2 = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3 = bitcast i8* %10 to float* ; [#uses=1]
- %11 = load float* %scevgep.i2, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.i3, align 4
- %scevgep.1.i4 = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5 = getelementptr i8* %dataBuffer, i32 32 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.1.i5 to float* ; [#uses=1]
- %13 = load float* %scevgep.1.i4, align 4 ; [#uses=1]
- store float %13, float* %12, align 4
- %scevgep.2.i6 = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7 = getelementptr i8* %dataBuffer, i32 36 ; [#uses=1]
- %14 = bitcast i8* %scevgep4.2.i7 to float* ; [#uses=1]
- %15 = load float* %scevgep.2.i6, align 4 ; [#uses=1]
- store float %15, float* %14, align 4
- %scevgep.3.i8 = getelementptr %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9 = getelementptr i8* %dataBuffer, i32 40 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.3.i9 to float* ; [#uses=1]
- %17 = load float* %scevgep.3.i8, align 4 ; [#uses=1]
- store float %17, float* %16, align 4
- %18 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 4 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %21 = bitcast i8* %20 to float* ; [#uses=1]
- store float %19, float* %21, align 4
- ret i8* getelementptr inbounds ([23 x i8]* @.str1121, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK18btStaticPlaneShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btStaticPlaneShape* nocapture %this, %struct.btActionInterface* %callback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %triangle = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=13]
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = fmul float %4, 5.000000e-01 ; [#uses=2]
- %16 = fmul float %9, 5.000000e-01 ; [#uses=2]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=2]
- %18 = fmul float %17, %17 ; [#uses=1]
- %19 = fmul float %16, %16 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- %21 = fmul float %15, %15 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- %23 = call float @sqrtf(float %22) nounwind readonly ; [#uses=6]
- %24 = fadd float %1, %3 ; [#uses=1]
- %25 = fadd float %6, %8 ; [#uses=1]
- %26 = fadd float %11, %13 ; [#uses=1]
- %27 = fmul float %24, 5.000000e-01 ; [#uses=2]
- %28 = fmul float %25, 5.000000e-01 ; [#uses=2]
- %29 = fmul float %26, 5.000000e-01 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=8]
- %32 = call float @fabsf(float %31) nounwind readnone ; [#uses=1]
- %33 = fcmp ogt float %32, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %33, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %34 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=4]
- %36 = fmul float %35, %35 ; [#uses=1]
- %37 = fmul float %31, %31 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=2]
- %39 = call float @sqrtf(float %38) nounwind readonly ; [#uses=1]
- %40 = fdiv float 1.000000e+00, %39 ; [#uses=3]
- %41 = fsub float -0.000000e+00, %31 ; [#uses=1]
- %42 = fmul float %40, %41 ; [#uses=2]
- %43 = fmul float %35, %40 ; [#uses=2]
- %44 = fmul float %38, %40 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fsub float -0.000000e+00, %46 ; [#uses=1]
- %48 = fmul float %43, %47 ; [#uses=1]
- %49 = fmul float %46, %42 ; [#uses=1]
- br label %bb2
-
-bb1.i: ; preds = %entry
- %50 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=4]
- %52 = fmul float %51, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=4]
- %55 = fmul float %54, %54 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=2]
- %57 = call float @sqrtf(float %56) nounwind readonly ; [#uses=1]
- %58 = fdiv float 1.000000e+00, %57 ; [#uses=3]
- %59 = fsub float -0.000000e+00, %54 ; [#uses=1]
- %60 = fmul float %58, %59 ; [#uses=2]
- %61 = fmul float %51, %58 ; [#uses=2]
- %62 = fsub float -0.000000e+00, %31 ; [#uses=1]
- %63 = fmul float %61, %62 ; [#uses=1]
- %64 = fmul float %31, %60 ; [#uses=1]
- %65 = fmul float %56, %58 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1.i, %bb.i
- %66 = phi float [ %35, %bb.i ], [ %54, %bb1.i ] ; [#uses=2]
- %67 = phi float [ %46, %bb.i ], [ %51, %bb1.i ] ; [#uses=2]
- %tangentDir0.0.0.0 = phi float [ 0.000000e+00, %bb.i ], [ %60, %bb1.i ] ; [#uses=1]
- %tangentDir0.0.1.0 = phi float [ %42, %bb.i ], [ %61, %bb1.i ] ; [#uses=1]
- %tangentDir0.0.2.0 = phi float [ %43, %bb.i ], [ 0.000000e+00, %bb1.i ] ; [#uses=1]
- %tangentDir1.0.0.0 = phi float [ %44, %bb.i ], [ %63, %bb1.i ] ; [#uses=1]
- %tangentDir1.0.1.0 = phi float [ %48, %bb.i ], [ %64, %bb1.i ] ; [#uses=1]
- %tangentDir1.0.2.0 = phi float [ %49, %bb.i ], [ %65, %bb1.i ] ; [#uses=1]
- %68 = fmul float %67, %29 ; [#uses=1]
- %69 = fmul float %66, %28 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fmul float %31, %27 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 4 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fsub float %72, %74 ; [#uses=3]
- %76 = fmul float %31, %75 ; [#uses=1]
- %77 = fmul float %66, %75 ; [#uses=1]
- %78 = fmul float %67, %75 ; [#uses=1]
- %79 = fsub float %27, %76 ; [#uses=2]
- %80 = fsub float %28, %77 ; [#uses=2]
- %81 = fsub float %29, %78 ; [#uses=2]
- %82 = fmul float %tangentDir1.0.2.0, %23 ; [#uses=4]
- %83 = fmul float %tangentDir1.0.1.0, %23 ; [#uses=4]
- %84 = fmul float %tangentDir1.0.0.0, %23 ; [#uses=4]
- %85 = fmul float %tangentDir0.0.2.0, %23 ; [#uses=2]
- %86 = fmul float %tangentDir0.0.1.0, %23 ; [#uses=2]
- %87 = fmul float %tangentDir0.0.0.0, %23 ; [#uses=2]
- %88 = fadd float %79, %85 ; [#uses=2]
- %89 = fadd float %80, %86 ; [#uses=2]
- %90 = fadd float %81, %87 ; [#uses=2]
- %91 = fadd float %88, %82 ; [#uses=2]
- %92 = fadd float %89, %83 ; [#uses=2]
- %93 = fadd float %90, %84 ; [#uses=2]
- %94 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %93, float* %94, align 8
- %95 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %92, float* %95, align 4
- %96 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %91, float* %96, align 8
- %97 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %97, align 4
- %98 = fsub float %88, %82 ; [#uses=1]
- %99 = fsub float %89, %83 ; [#uses=1]
- %100 = fsub float %90, %84 ; [#uses=1]
- %101 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float %100, float* %101, align 8
- %102 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float %99, float* %102, align 4
- %103 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float %98, float* %103, align 8
- %104 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %104, align 4
- %105 = fsub float %79, %85 ; [#uses=2]
- %106 = fsub float %80, %86 ; [#uses=2]
- %107 = fsub float %81, %87 ; [#uses=2]
- %108 = fsub float %105, %82 ; [#uses=2]
- %109 = fsub float %106, %83 ; [#uses=2]
- %110 = fsub float %107, %84 ; [#uses=2]
- %111 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float %110, float* %111, align 8
- %112 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float %109, float* %112, align 4
- %113 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float %108, float* %113, align 8
- %114 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %114, align 4
- %115 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=2]
- %116 = load i32 (...)*** %115, align 4 ; [#uses=1]
- %117 = getelementptr inbounds i32 (...)** %116, i32 2 ; [#uses=1]
- %118 = load i32 (...)** %117, align 4 ; [#uses=1]
- %119 = bitcast i32 (...)* %118 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- %120 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0 ; [#uses=2]
- call void %119(%struct.btActionInterface* %callback, %struct.btQuadWord* %120, i32 0, i32 0)
- store float %110, float* %94, align 8
- store float %109, float* %95, align 4
- store float %108, float* %96, align 8
- store float 0.000000e+00, float* %97, align 4
- %121 = fadd float %105, %82 ; [#uses=1]
- %122 = fadd float %106, %83 ; [#uses=1]
- %123 = fadd float %107, %84 ; [#uses=1]
- store float %123, float* %101, align 8
- store float %122, float* %102, align 4
- store float %121, float* %103, align 8
- store float 0.000000e+00, float* %104, align 4
- store float %93, float* %111, align 8
- store float %92, float* %112, align 4
- store float %91, float* %113, align 8
- store float 0.000000e+00, float* %114, align 4
- %124 = load i32 (...)*** %115, align 4 ; [#uses=1]
- %125 = getelementptr inbounds i32 (...)** %124, i32 2 ; [#uses=1]
- %126 = load i32 (...)** %125, align 4 ; [#uses=1]
- %127 = bitcast i32 (...)* %126 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %127(%struct.btActionInterface* %callback, %struct.btQuadWord* %120, i32 0, i32 1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btStaticPlaneShapeD0Ev(%struct.btStaticPlaneShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV18btStaticPlaneShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- %2 = bitcast %struct.btStaticPlaneShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btStaticPlaneShapeD1Ev(%struct.btStaticPlaneShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV18btStaticPlaneShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btStaticPlaneShapeD2Ev(%struct.btStaticPlaneShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV18btStaticPlaneShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btStaticPlaneShapeC1ERK9btVector3f(%struct.btStaticPlaneShape* %this, %struct.btQuadWord* nocapture %planeNormal, float %planeConstant) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([18 x i32 (...)*]* @_ZTV18btStaticPlaneShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %3, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = fmul float %6, %6 ; [#uses=1]
- %8 = fadd float %4, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = fmul float %10, %10 ; [#uses=1]
- %12 = fadd float %8, %11 ; [#uses=1]
- %13 = tail call float @sqrtf(float %12) nounwind readonly ; [#uses=1]
- %14 = fdiv float 1.000000e+00, %13 ; [#uses=3]
- %15 = fmul float %10, %14 ; [#uses=1]
- %16 = fmul float %6, %14 ; [#uses=1]
- %17 = fmul float %3, %14 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 4
- %19 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %19, align 4
- %20 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %20, align 4
- %21 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 4 ; [#uses=1]
- store float %planeConstant, float* %22, align 4
- %23 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btStaticPlaneShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 28, i32* %27, align 4
- ret void
-}
-
-; [#uses=7]
-define void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV23btStridingMeshInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK23btStridingMeshInterface14hasPremadeAabbEv(%struct.btStridingMeshInterface* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btStridingMeshInterface14setPremadeAabbERK9btVector3S2_(%struct.btStridingMeshInterface* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btStridingMeshInterface14getPremadeAabbEP9btVector3S1_(%struct.btStridingMeshInterface* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK23btStridingMeshInterface28calculateSerializeBufferSizeEv(%struct.btStridingMeshInterface* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 28
-}
-
-; [#uses=1]
-define void @_ZNK23btStridingMeshInterface27InternalProcessAllTrianglesEP31btInternalTriangleIndexCallbackRK9btVector3S4_(%struct.btStridingMeshInterface* %this, %struct.btActionInterface* %callback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-bb2:
- %vertexbase = alloca i8*, align 4 ; [#uses=5]
- %indexbase = alloca i8*, align 4 ; [#uses=5]
- %indexstride = alloca i32, align 4 ; [#uses=5]
- %type = alloca i32, align 4 ; [#uses=2]
- %gfxindextype = alloca i32, align 4 ; [#uses=3]
- %stride = alloca i32, align 4 ; [#uses=5]
- %numverts = alloca i32, align 4 ; [#uses=1]
- %numtriangles = alloca i32, align 4 ; [#uses=9]
- %triangle = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=13]
- %0 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 7 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i32 (%struct.btStridingMeshInterface*)* ; [#uses=1]
- %5 = call i32 %4(%struct.btStridingMeshInterface* %this) ; [#uses=2]
- %6 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=12]
- %8 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=12]
- %10 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=12]
- %12 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %12, label %bb.nph81, label %return
-
-bb.nph81: ; preds = %bb2
- %13 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %14 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %15 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %16 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0, i32 0, i32 3 ; [#uses=4]
- %17 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %18 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %19 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %20 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %21 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %22 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %23 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %24 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 2, i32 0, i32 3 ; [#uses=4]
- %25 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=4]
- %26 = getelementptr inbounds [3 x %struct.btQuadWord]* %triangle, i32 0, i32 0 ; [#uses=4]
- br label %bb3
-
-bb3: ; preds = %bb22, %bb.nph81
- %27 = phi i32 [ 0, %bb.nph81 ], [ %315, %bb22 ] ; [#uses=7]
- %28 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 4 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %31(%struct.btStridingMeshInterface* %this, i8** %vertexbase, i32* %numverts, i32* %type, i32* %stride, i8** %indexbase, i32* %indexstride, i32* %numtriangles, i32* %gfxindextype, i32 %27)
- %32 = load i32* %type, align 4 ; [#uses=1]
- switch i32 %32, label %bb22 [
- i32 0, label %bb4
- i32 1, label %bb12
- ]
-
-bb4: ; preds = %bb3
- %33 = load i32* %gfxindextype, align 4 ; [#uses=1]
- switch i32 %33, label %bb22 [
- i32 2, label %bb7.preheader
- i32 3, label %bb11.preheader
- ]
-
-bb7.preheader: ; preds = %bb4
- %34 = load i32* %numtriangles, align 4 ; [#uses=1]
- %35 = icmp sgt i32 %34, 0 ; [#uses=1]
- br i1 %35, label %bb6, label %bb22
-
-bb11.preheader: ; preds = %bb4
- %36 = load i32* %numtriangles, align 4 ; [#uses=1]
- %37 = icmp sgt i32 %36, 0 ; [#uses=1]
- br i1 %37, label %bb9, label %bb22
-
-bb6: ; preds = %bb6, %bb7.preheader
- %38 = phi i32 [ %96, %bb6 ], [ 0, %bb7.preheader ] ; [#uses=3]
- %39 = load i8** %indexbase, align 4 ; [#uses=3]
- %40 = load i32* %indexstride, align 4 ; [#uses=1]
- %41 = mul nsw i32 %40, %38 ; [#uses=3]
- %42 = getelementptr inbounds i8* %39, i32 %41 ; [#uses=1]
- %43 = bitcast i8* %42 to i32* ; [#uses=1]
- %44 = load i8** %vertexbase, align 4 ; [#uses=9]
- %45 = load i32* %43, align 4 ; [#uses=1]
- %46 = load i32* %stride, align 4 ; [#uses=3]
- %47 = mul i32 %46, %45 ; [#uses=3]
- %48 = getelementptr inbounds i8* %44, i32 %47 ; [#uses=1]
- %49 = bitcast i8* %48 to float* ; [#uses=1]
- %.sum49 = add i32 %47, 8 ; [#uses=1]
- %50 = getelementptr inbounds i8* %44, i32 %.sum49 ; [#uses=1]
- %51 = bitcast i8* %50 to float* ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fmul float %52, %11 ; [#uses=1]
- %.sum50 = add i32 %47, 4 ; [#uses=1]
- %54 = getelementptr inbounds i8* %44, i32 %.sum50 ; [#uses=1]
- %55 = bitcast i8* %54 to float* ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fmul float %56, %9 ; [#uses=1]
- %58 = load float* %49, align 4 ; [#uses=1]
- %59 = fmul float %58, %7 ; [#uses=1]
- store float %59, float* %13, align 8
- store float %57, float* %14, align 4
- store float %53, float* %15, align 8
- store float 0.000000e+00, float* %16, align 4
- %.sum51 = add i32 %41, 4 ; [#uses=1]
- %60 = getelementptr inbounds i8* %39, i32 %.sum51 ; [#uses=1]
- %61 = bitcast i8* %60 to i32* ; [#uses=1]
- %62 = load i32* %61, align 4 ; [#uses=1]
- %63 = mul i32 %46, %62 ; [#uses=3]
- %64 = getelementptr inbounds i8* %44, i32 %63 ; [#uses=1]
- %65 = bitcast i8* %64 to float* ; [#uses=1]
- %.sum52 = add i32 %63, 8 ; [#uses=1]
- %66 = getelementptr inbounds i8* %44, i32 %.sum52 ; [#uses=1]
- %67 = bitcast i8* %66 to float* ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %68, %11 ; [#uses=1]
- %.sum53 = add i32 %63, 4 ; [#uses=1]
- %70 = getelementptr inbounds i8* %44, i32 %.sum53 ; [#uses=1]
- %71 = bitcast i8* %70 to float* ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %72, %9 ; [#uses=1]
- %74 = load float* %65, align 4 ; [#uses=1]
- %75 = fmul float %74, %7 ; [#uses=1]
- store float %75, float* %17, align 8
- store float %73, float* %18, align 4
- store float %69, float* %19, align 8
- store float 0.000000e+00, float* %20, align 4
- %.sum54 = add i32 %41, 8 ; [#uses=1]
- %76 = getelementptr inbounds i8* %39, i32 %.sum54 ; [#uses=1]
- %77 = bitcast i8* %76 to i32* ; [#uses=1]
- %78 = load i32* %77, align 4 ; [#uses=1]
- %79 = mul i32 %46, %78 ; [#uses=3]
- %80 = getelementptr inbounds i8* %44, i32 %79 ; [#uses=1]
- %81 = bitcast i8* %80 to float* ; [#uses=1]
- %.sum55 = add i32 %79, 8 ; [#uses=1]
- %82 = getelementptr inbounds i8* %44, i32 %.sum55 ; [#uses=1]
- %83 = bitcast i8* %82 to float* ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = fmul float %84, %11 ; [#uses=1]
- %.sum56 = add i32 %79, 4 ; [#uses=1]
- %86 = getelementptr inbounds i8* %44, i32 %.sum56 ; [#uses=1]
- %87 = bitcast i8* %86 to float* ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fmul float %88, %9 ; [#uses=1]
- %90 = load float* %81, align 4 ; [#uses=1]
- %91 = fmul float %90, %7 ; [#uses=1]
- store float %91, float* %21, align 8
- store float %89, float* %22, align 4
- store float %85, float* %23, align 8
- store float 0.000000e+00, float* %24, align 4
- %92 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %93 = getelementptr inbounds i32 (...)** %92, i32 2 ; [#uses=1]
- %94 = load i32 (...)** %93, align 4 ; [#uses=1]
- %95 = bitcast i32 (...)* %94 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %95(%struct.btActionInterface* %callback, %struct.btQuadWord* %26, i32 %27, i32 %38)
- %96 = add nsw i32 %38, 1 ; [#uses=2]
- %97 = load i32* %numtriangles, align 4 ; [#uses=1]
- %98 = icmp slt i32 %96, %97 ; [#uses=1]
- br i1 %98, label %bb6, label %bb22
-
-bb9: ; preds = %bb9, %bb11.preheader
- %99 = phi i32 [ %160, %bb9 ], [ 0, %bb11.preheader ] ; [#uses=3]
- %100 = load i8** %indexbase, align 4 ; [#uses=3]
- %101 = load i32* %indexstride, align 4 ; [#uses=1]
- %102 = mul nsw i32 %101, %99 ; [#uses=3]
- %103 = getelementptr inbounds i8* %100, i32 %102 ; [#uses=1]
- %104 = bitcast i8* %103 to i16* ; [#uses=1]
- %105 = load i8** %vertexbase, align 4 ; [#uses=9]
- %106 = load i16* %104, align 2 ; [#uses=1]
- %107 = zext i16 %106 to i32 ; [#uses=1]
- %108 = load i32* %stride, align 4 ; [#uses=3]
- %109 = mul nsw i32 %107, %108 ; [#uses=3]
- %110 = getelementptr inbounds i8* %105, i32 %109 ; [#uses=1]
- %111 = bitcast i8* %110 to float* ; [#uses=1]
- %.sum41 = add i32 %109, 8 ; [#uses=1]
- %112 = getelementptr inbounds i8* %105, i32 %.sum41 ; [#uses=1]
- %113 = bitcast i8* %112 to float* ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=1]
- %115 = fmul float %114, %11 ; [#uses=1]
- %.sum42 = add i32 %109, 4 ; [#uses=1]
- %116 = getelementptr inbounds i8* %105, i32 %.sum42 ; [#uses=1]
- %117 = bitcast i8* %116 to float* ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fmul float %118, %9 ; [#uses=1]
- %120 = load float* %111, align 4 ; [#uses=1]
- %121 = fmul float %120, %7 ; [#uses=1]
- store float %121, float* %13, align 8
- store float %119, float* %14, align 4
- store float %115, float* %15, align 8
- store float 0.000000e+00, float* %16, align 4
- %.sum43 = add i32 %102, 2 ; [#uses=1]
- %122 = getelementptr inbounds i8* %100, i32 %.sum43 ; [#uses=1]
- %123 = bitcast i8* %122 to i16* ; [#uses=1]
- %124 = load i16* %123, align 2 ; [#uses=1]
- %125 = zext i16 %124 to i32 ; [#uses=1]
- %126 = mul nsw i32 %125, %108 ; [#uses=3]
- %127 = getelementptr inbounds i8* %105, i32 %126 ; [#uses=1]
- %128 = bitcast i8* %127 to float* ; [#uses=1]
- %.sum44 = add i32 %126, 8 ; [#uses=1]
- %129 = getelementptr inbounds i8* %105, i32 %.sum44 ; [#uses=1]
- %130 = bitcast i8* %129 to float* ; [#uses=1]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = fmul float %131, %11 ; [#uses=1]
- %.sum45 = add i32 %126, 4 ; [#uses=1]
- %133 = getelementptr inbounds i8* %105, i32 %.sum45 ; [#uses=1]
- %134 = bitcast i8* %133 to float* ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = fmul float %135, %9 ; [#uses=1]
- %137 = load float* %128, align 4 ; [#uses=1]
- %138 = fmul float %137, %7 ; [#uses=1]
- store float %138, float* %17, align 8
- store float %136, float* %18, align 4
- store float %132, float* %19, align 8
- store float 0.000000e+00, float* %20, align 4
- %.sum46 = add i32 %102, 4 ; [#uses=1]
- %139 = getelementptr inbounds i8* %100, i32 %.sum46 ; [#uses=1]
- %140 = bitcast i8* %139 to i16* ; [#uses=1]
- %141 = load i16* %140, align 2 ; [#uses=1]
- %142 = zext i16 %141 to i32 ; [#uses=1]
- %143 = mul nsw i32 %142, %108 ; [#uses=3]
- %144 = getelementptr inbounds i8* %105, i32 %143 ; [#uses=1]
- %145 = bitcast i8* %144 to float* ; [#uses=1]
- %.sum47 = add i32 %143, 8 ; [#uses=1]
- %146 = getelementptr inbounds i8* %105, i32 %.sum47 ; [#uses=1]
- %147 = bitcast i8* %146 to float* ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=1]
- %149 = fmul float %148, %11 ; [#uses=1]
- %.sum48 = add i32 %143, 4 ; [#uses=1]
- %150 = getelementptr inbounds i8* %105, i32 %.sum48 ; [#uses=1]
- %151 = bitcast i8* %150 to float* ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=1]
- %153 = fmul float %152, %9 ; [#uses=1]
- %154 = load float* %145, align 4 ; [#uses=1]
- %155 = fmul float %154, %7 ; [#uses=1]
- store float %155, float* %21, align 8
- store float %153, float* %22, align 4
- store float %149, float* %23, align 8
- store float 0.000000e+00, float* %24, align 4
- %156 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %157 = getelementptr inbounds i32 (...)** %156, i32 2 ; [#uses=1]
- %158 = load i32 (...)** %157, align 4 ; [#uses=1]
- %159 = bitcast i32 (...)* %158 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %159(%struct.btActionInterface* %callback, %struct.btQuadWord* %26, i32 %27, i32 %99)
- %160 = add nsw i32 %99, 1 ; [#uses=2]
- %161 = load i32* %numtriangles, align 4 ; [#uses=1]
- %162 = icmp slt i32 %160, %161 ; [#uses=1]
- br i1 %162, label %bb9, label %bb22
-
-bb12: ; preds = %bb3
- %163 = load i32* %gfxindextype, align 4 ; [#uses=1]
- switch i32 %163, label %bb22 [
- i32 2, label %bb17.preheader
- i32 3, label %bb21.preheader
- ]
-
-bb17.preheader: ; preds = %bb12
- %164 = load i32* %numtriangles, align 4 ; [#uses=1]
- %165 = icmp sgt i32 %164, 0 ; [#uses=1]
- br i1 %165, label %bb15, label %bb22
-
-bb21.preheader: ; preds = %bb12
- %166 = load i32* %numtriangles, align 4 ; [#uses=1]
- %167 = icmp sgt i32 %166, 0 ; [#uses=1]
- br i1 %167, label %bb19, label %bb22
-
-bb15: ; preds = %bb15, %bb17.preheader
- %168 = phi i32 [ %235, %bb15 ], [ 0, %bb17.preheader ] ; [#uses=3]
- %169 = load i8** %indexbase, align 4 ; [#uses=3]
- %170 = load i32* %indexstride, align 4 ; [#uses=1]
- %171 = mul nsw i32 %170, %168 ; [#uses=3]
- %172 = getelementptr inbounds i8* %169, i32 %171 ; [#uses=1]
- %173 = bitcast i8* %172 to i32* ; [#uses=1]
- %174 = load i8** %vertexbase, align 4 ; [#uses=9]
- %175 = load i32* %173, align 4 ; [#uses=1]
- %176 = load i32* %stride, align 4 ; [#uses=3]
- %177 = mul i32 %176, %175 ; [#uses=3]
- %178 = getelementptr inbounds i8* %174, i32 %177 ; [#uses=1]
- %179 = bitcast i8* %178 to double* ; [#uses=1]
- %.sum33 = add i32 %177, 16 ; [#uses=1]
- %180 = getelementptr inbounds i8* %174, i32 %.sum33 ; [#uses=1]
- %181 = bitcast i8* %180 to double* ; [#uses=1]
- %182 = load double* %181, align 4 ; [#uses=1]
- %183 = fptrunc double %182 to float ; [#uses=1]
- %184 = fmul float %183, %11 ; [#uses=1]
- %.sum34 = add i32 %177, 8 ; [#uses=1]
- %185 = getelementptr inbounds i8* %174, i32 %.sum34 ; [#uses=1]
- %186 = bitcast i8* %185 to double* ; [#uses=1]
- %187 = load double* %186, align 4 ; [#uses=1]
- %188 = fptrunc double %187 to float ; [#uses=1]
- %189 = fmul float %188, %9 ; [#uses=1]
- %190 = load double* %179, align 4 ; [#uses=1]
- %191 = fptrunc double %190 to float ; [#uses=1]
- %192 = fmul float %191, %7 ; [#uses=1]
- store float %192, float* %13, align 8
- store float %189, float* %14, align 4
- store float %184, float* %15, align 8
- store float 0.000000e+00, float* %16, align 4
- %.sum35 = add i32 %171, 4 ; [#uses=1]
- %193 = getelementptr inbounds i8* %169, i32 %.sum35 ; [#uses=1]
- %194 = bitcast i8* %193 to i32* ; [#uses=1]
- %195 = load i32* %194, align 4 ; [#uses=1]
- %196 = mul i32 %176, %195 ; [#uses=3]
- %197 = getelementptr inbounds i8* %174, i32 %196 ; [#uses=1]
- %198 = bitcast i8* %197 to double* ; [#uses=1]
- %.sum36 = add i32 %196, 16 ; [#uses=1]
- %199 = getelementptr inbounds i8* %174, i32 %.sum36 ; [#uses=1]
- %200 = bitcast i8* %199 to double* ; [#uses=1]
- %201 = load double* %200, align 4 ; [#uses=1]
- %202 = fptrunc double %201 to float ; [#uses=1]
- %203 = fmul float %202, %11 ; [#uses=1]
- %.sum37 = add i32 %196, 8 ; [#uses=1]
- %204 = getelementptr inbounds i8* %174, i32 %.sum37 ; [#uses=1]
- %205 = bitcast i8* %204 to double* ; [#uses=1]
- %206 = load double* %205, align 4 ; [#uses=1]
- %207 = fptrunc double %206 to float ; [#uses=1]
- %208 = fmul float %207, %9 ; [#uses=1]
- %209 = load double* %198, align 4 ; [#uses=1]
- %210 = fptrunc double %209 to float ; [#uses=1]
- %211 = fmul float %210, %7 ; [#uses=1]
- store float %211, float* %17, align 8
- store float %208, float* %18, align 4
- store float %203, float* %19, align 8
- store float 0.000000e+00, float* %20, align 4
- %.sum38 = add i32 %171, 8 ; [#uses=1]
- %212 = getelementptr inbounds i8* %169, i32 %.sum38 ; [#uses=1]
- %213 = bitcast i8* %212 to i32* ; [#uses=1]
- %214 = load i32* %213, align 4 ; [#uses=1]
- %215 = mul i32 %176, %214 ; [#uses=3]
- %216 = getelementptr inbounds i8* %174, i32 %215 ; [#uses=1]
- %217 = bitcast i8* %216 to double* ; [#uses=1]
- %.sum39 = add i32 %215, 16 ; [#uses=1]
- %218 = getelementptr inbounds i8* %174, i32 %.sum39 ; [#uses=1]
- %219 = bitcast i8* %218 to double* ; [#uses=1]
- %220 = load double* %219, align 4 ; [#uses=1]
- %221 = fptrunc double %220 to float ; [#uses=1]
- %222 = fmul float %221, %11 ; [#uses=1]
- %.sum40 = add i32 %215, 8 ; [#uses=1]
- %223 = getelementptr inbounds i8* %174, i32 %.sum40 ; [#uses=1]
- %224 = bitcast i8* %223 to double* ; [#uses=1]
- %225 = load double* %224, align 4 ; [#uses=1]
- %226 = fptrunc double %225 to float ; [#uses=1]
- %227 = fmul float %226, %9 ; [#uses=1]
- %228 = load double* %217, align 4 ; [#uses=1]
- %229 = fptrunc double %228 to float ; [#uses=1]
- %230 = fmul float %229, %7 ; [#uses=1]
- store float %230, float* %21, align 8
- store float %227, float* %22, align 4
- store float %222, float* %23, align 8
- store float 0.000000e+00, float* %24, align 4
- %231 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %232 = getelementptr inbounds i32 (...)** %231, i32 2 ; [#uses=1]
- %233 = load i32 (...)** %232, align 4 ; [#uses=1]
- %234 = bitcast i32 (...)* %233 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %234(%struct.btActionInterface* %callback, %struct.btQuadWord* %26, i32 %27, i32 %168)
- %235 = add nsw i32 %168, 1 ; [#uses=2]
- %236 = load i32* %numtriangles, align 4 ; [#uses=1]
- %237 = icmp slt i32 %235, %236 ; [#uses=1]
- br i1 %237, label %bb15, label %bb22
-
-bb19: ; preds = %bb19, %bb21.preheader
- %238 = phi i32 [ %308, %bb19 ], [ 0, %bb21.preheader ] ; [#uses=3]
- %239 = load i8** %indexbase, align 4 ; [#uses=3]
- %240 = load i32* %indexstride, align 4 ; [#uses=1]
- %241 = mul nsw i32 %240, %238 ; [#uses=3]
- %242 = getelementptr inbounds i8* %239, i32 %241 ; [#uses=1]
- %243 = bitcast i8* %242 to i16* ; [#uses=1]
- %244 = load i8** %vertexbase, align 4 ; [#uses=9]
- %245 = load i16* %243, align 2 ; [#uses=1]
- %246 = zext i16 %245 to i32 ; [#uses=1]
- %247 = load i32* %stride, align 4 ; [#uses=3]
- %248 = mul nsw i32 %246, %247 ; [#uses=3]
- %249 = getelementptr inbounds i8* %244, i32 %248 ; [#uses=1]
- %250 = bitcast i8* %249 to double* ; [#uses=1]
- %.sum = add i32 %248, 16 ; [#uses=1]
- %251 = getelementptr inbounds i8* %244, i32 %.sum ; [#uses=1]
- %252 = bitcast i8* %251 to double* ; [#uses=1]
- %253 = load double* %252, align 4 ; [#uses=1]
- %254 = fptrunc double %253 to float ; [#uses=1]
- %255 = fmul float %254, %11 ; [#uses=1]
- %.sum26 = add i32 %248, 8 ; [#uses=1]
- %256 = getelementptr inbounds i8* %244, i32 %.sum26 ; [#uses=1]
- %257 = bitcast i8* %256 to double* ; [#uses=1]
- %258 = load double* %257, align 4 ; [#uses=1]
- %259 = fptrunc double %258 to float ; [#uses=1]
- %260 = fmul float %259, %9 ; [#uses=1]
- %261 = load double* %250, align 4 ; [#uses=1]
- %262 = fptrunc double %261 to float ; [#uses=1]
- %263 = fmul float %262, %7 ; [#uses=1]
- store float %263, float* %13, align 8
- store float %260, float* %14, align 4
- store float %255, float* %15, align 8
- store float 0.000000e+00, float* %16, align 4
- %.sum27 = add i32 %241, 2 ; [#uses=1]
- %264 = getelementptr inbounds i8* %239, i32 %.sum27 ; [#uses=1]
- %265 = bitcast i8* %264 to i16* ; [#uses=1]
- %266 = load i16* %265, align 2 ; [#uses=1]
- %267 = zext i16 %266 to i32 ; [#uses=1]
- %268 = mul nsw i32 %267, %247 ; [#uses=3]
- %269 = getelementptr inbounds i8* %244, i32 %268 ; [#uses=1]
- %270 = bitcast i8* %269 to double* ; [#uses=1]
- %.sum28 = add i32 %268, 16 ; [#uses=1]
- %271 = getelementptr inbounds i8* %244, i32 %.sum28 ; [#uses=1]
- %272 = bitcast i8* %271 to double* ; [#uses=1]
- %273 = load double* %272, align 4 ; [#uses=1]
- %274 = fptrunc double %273 to float ; [#uses=1]
- %275 = fmul float %274, %11 ; [#uses=1]
- %.sum29 = add i32 %268, 8 ; [#uses=1]
- %276 = getelementptr inbounds i8* %244, i32 %.sum29 ; [#uses=1]
- %277 = bitcast i8* %276 to double* ; [#uses=1]
- %278 = load double* %277, align 4 ; [#uses=1]
- %279 = fptrunc double %278 to float ; [#uses=1]
- %280 = fmul float %279, %9 ; [#uses=1]
- %281 = load double* %270, align 4 ; [#uses=1]
- %282 = fptrunc double %281 to float ; [#uses=1]
- %283 = fmul float %282, %7 ; [#uses=1]
- store float %283, float* %17, align 8
- store float %280, float* %18, align 4
- store float %275, float* %19, align 8
- store float 0.000000e+00, float* %20, align 4
- %.sum30 = add i32 %241, 4 ; [#uses=1]
- %284 = getelementptr inbounds i8* %239, i32 %.sum30 ; [#uses=1]
- %285 = bitcast i8* %284 to i16* ; [#uses=1]
- %286 = load i16* %285, align 2 ; [#uses=1]
- %287 = zext i16 %286 to i32 ; [#uses=1]
- %288 = mul nsw i32 %287, %247 ; [#uses=3]
- %289 = getelementptr inbounds i8* %244, i32 %288 ; [#uses=1]
- %290 = bitcast i8* %289 to double* ; [#uses=1]
- %.sum31 = add i32 %288, 16 ; [#uses=1]
- %291 = getelementptr inbounds i8* %244, i32 %.sum31 ; [#uses=1]
- %292 = bitcast i8* %291 to double* ; [#uses=1]
- %293 = load double* %292, align 4 ; [#uses=1]
- %294 = fptrunc double %293 to float ; [#uses=1]
- %295 = fmul float %294, %11 ; [#uses=1]
- %.sum32 = add i32 %288, 8 ; [#uses=1]
- %296 = getelementptr inbounds i8* %244, i32 %.sum32 ; [#uses=1]
- %297 = bitcast i8* %296 to double* ; [#uses=1]
- %298 = load double* %297, align 4 ; [#uses=1]
- %299 = fptrunc double %298 to float ; [#uses=1]
- %300 = fmul float %299, %9 ; [#uses=1]
- %301 = load double* %290, align 4 ; [#uses=1]
- %302 = fptrunc double %301 to float ; [#uses=1]
- %303 = fmul float %302, %7 ; [#uses=1]
- store float %303, float* %21, align 8
- store float %300, float* %22, align 4
- store float %295, float* %23, align 8
- store float 0.000000e+00, float* %24, align 4
- %304 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %305 = getelementptr inbounds i32 (...)** %304, i32 2 ; [#uses=1]
- %306 = load i32 (...)** %305, align 4 ; [#uses=1]
- %307 = bitcast i32 (...)* %306 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- call void %307(%struct.btActionInterface* %callback, %struct.btQuadWord* %26, i32 %27, i32 %238)
- %308 = add nsw i32 %238, 1 ; [#uses=2]
- %309 = load i32* %numtriangles, align 4 ; [#uses=1]
- %310 = icmp slt i32 %308, %309 ; [#uses=1]
- br i1 %310, label %bb19, label %bb22
-
-bb22: ; preds = %bb19, %bb15, %bb21.preheader, %bb17.preheader, %bb12, %bb9, %bb6, %bb11.preheader, %bb7.preheader, %bb4, %bb3
- %311 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %312 = getelementptr inbounds i32 (...)** %311, i32 6 ; [#uses=1]
- %313 = load i32 (...)** %312, align 4 ; [#uses=1]
- %314 = bitcast i32 (...)* %313 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- call void %314(%struct.btStridingMeshInterface* %this, i32 %27)
- %315 = add nsw i32 %27, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %315, %5 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb3
-
-return: ; preds = %bb22, %bb2
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_EN23AabbCalculationCallbackD1Ev(%struct..0AabbCalculationCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_EN23AabbCalculationCallbackD0Ev(%struct..0AabbCalculationCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..0AabbCalculationCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_EN23AabbCalculationCallback28internalProcessTriangleIndexEPS0_ii(%struct..0AabbCalculationCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %2 = load float* %0, align 4 ; [#uses=3]
- %3 = load float* %1, align 4 ; [#uses=2]
- %4 = fcmp olt float %2, %3 ; [#uses=1]
- br i1 %4, label %bb.i.i, label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-bb.i.i: ; preds = %entry
- store float %2, float* %1, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i, %entry
- %5 = phi float [ %2, %bb.i.i ], [ %3, %entry ] ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %8 = load float* %6, align 4 ; [#uses=3]
- %9 = load float* %7, align 4 ; [#uses=2]
- %10 = fcmp olt float %8, %9 ; [#uses=1]
- br i1 %10, label %bb.i7.i, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-bb.i7.i: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i
- store float %8, float* %7, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i, %_Z8btSetMinIfEvRT_RKS0_.exit.i
- %11 = phi float [ %8, %bb.i7.i ], [ %9, %_Z8btSetMinIfEvRT_RKS0_.exit.i ] ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=2]
- %13 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %14 = load float* %12, align 4 ; [#uses=3]
- %15 = load float* %13, align 4 ; [#uses=2]
- %16 = fcmp olt float %14, %15 ; [#uses=1]
- br i1 %16, label %bb.i4.i, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-bb.i4.i: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- store float %14, float* %13, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i, %_Z8btSetMinIfEvRT_RKS0_.exit9.i
- %17 = phi float [ %14, %bb.i4.i ], [ %15, %_Z8btSetMinIfEvRT_RKS0_.exit9.i ] ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=2]
- %19 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %20 = load float* %18, align 4 ; [#uses=3]
- %21 = load float* %19, align 4 ; [#uses=2]
- %22 = fcmp olt float %20, %21 ; [#uses=1]
- br i1 %22, label %bb.i1.i, label %_ZN9btVector36setMinERKS_.exit
-
-bb.i1.i: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- store float %20, float* %19, align 4
- br label %_ZN9btVector36setMinERKS_.exit
-
-_ZN9btVector36setMinERKS_.exit: ; preds = %bb.i1.i, %_Z8btSetMinIfEvRT_RKS0_.exit6.i
- %23 = phi float [ %20, %bb.i1.i ], [ %21, %_Z8btSetMinIfEvRT_RKS0_.exit6.i ] ; [#uses=2]
- %24 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = load float* %0, align 4 ; [#uses=3]
- %27 = fcmp olt float %25, %26 ; [#uses=1]
- br i1 %27, label %bb.i.i32, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i33
-
-bb.i.i32: ; preds = %_ZN9btVector36setMinERKS_.exit
- store float %26, float* %24, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i33
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i33: ; preds = %bb.i.i32, %_ZN9btVector36setMinERKS_.exit
- %28 = phi float [ %26, %bb.i.i32 ], [ %25, %_ZN9btVector36setMinERKS_.exit ] ; [#uses=2]
- %29 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %30 = load float* %29, align 4 ; [#uses=2]
- %31 = load float* %6, align 4 ; [#uses=3]
- %32 = fcmp olt float %30, %31 ; [#uses=1]
- br i1 %32, label %bb.i7.i34, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i35
-
-bb.i7.i34: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i33
- store float %31, float* %29, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i35
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i35: ; preds = %bb.i7.i34, %_Z8btSetMaxIfEvRT_RKS0_.exit.i33
- %33 = phi float [ %31, %bb.i7.i34 ], [ %30, %_Z8btSetMaxIfEvRT_RKS0_.exit.i33 ] ; [#uses=2]
- %34 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = load float* %12, align 4 ; [#uses=3]
- %37 = fcmp olt float %35, %36 ; [#uses=1]
- br i1 %37, label %bb.i4.i36, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i37
-
-bb.i4.i36: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i35
- store float %36, float* %34, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i37
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i37: ; preds = %bb.i4.i36, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i35
- %38 = phi float [ %36, %bb.i4.i36 ], [ %35, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i35 ] ; [#uses=2]
- %39 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=4]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = load float* %18, align 4 ; [#uses=3]
- %42 = fcmp olt float %40, %41 ; [#uses=1]
- br i1 %42, label %bb.i1.i38, label %_ZN9btVector36setMaxERKS_.exit40
-
-bb.i1.i38: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i37
- store float %41, float* %39, align 4
- br label %_ZN9btVector36setMaxERKS_.exit40
-
-_ZN9btVector36setMaxERKS_.exit40: ; preds = %bb.i1.i38, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i37
- %43 = phi float [ %40, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i37 ], [ %41, %bb.i1.i38 ] ; [#uses=2]
- %44 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=2]
- %45 = load float* %44, align 4 ; [#uses=3]
- %46 = fcmp olt float %45, %5 ; [#uses=1]
- br i1 %46, label %bb.i.i23, label %_Z8btSetMinIfEvRT_RKS0_.exit.i24
-
-bb.i.i23: ; preds = %_ZN9btVector36setMaxERKS_.exit40
- store float %45, float* %1, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i24
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i24: ; preds = %bb.i.i23, %_ZN9btVector36setMaxERKS_.exit40
- %47 = phi float [ %45, %bb.i.i23 ], [ %5, %_ZN9btVector36setMaxERKS_.exit40 ] ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=3]
- %50 = fcmp olt float %49, %11 ; [#uses=1]
- br i1 %50, label %bb.i7.i25, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i26
-
-bb.i7.i25: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i24
- store float %49, float* %7, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i26
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i26: ; preds = %bb.i7.i25, %_Z8btSetMinIfEvRT_RKS0_.exit.i24
- %51 = phi float [ %49, %bb.i7.i25 ], [ %11, %_Z8btSetMinIfEvRT_RKS0_.exit.i24 ] ; [#uses=1]
- %52 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=2]
- %53 = load float* %52, align 4 ; [#uses=3]
- %54 = fcmp olt float %53, %17 ; [#uses=1]
- br i1 %54, label %bb.i4.i27, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i28
-
-bb.i4.i27: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i26
- store float %53, float* %13, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i28
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i28: ; preds = %bb.i4.i27, %_Z8btSetMinIfEvRT_RKS0_.exit9.i26
- %55 = phi float [ %53, %bb.i4.i27 ], [ %17, %_Z8btSetMinIfEvRT_RKS0_.exit9.i26 ] ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=2]
- %57 = load float* %56, align 4 ; [#uses=3]
- %58 = fcmp olt float %57, %23 ; [#uses=1]
- br i1 %58, label %bb.i1.i29, label %_ZN9btVector36setMinERKS_.exit31
-
-bb.i1.i29: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i28
- store float %57, float* %19, align 4
- br label %_ZN9btVector36setMinERKS_.exit31
-
-_ZN9btVector36setMinERKS_.exit31: ; preds = %bb.i1.i29, %_Z8btSetMinIfEvRT_RKS0_.exit6.i28
- %59 = phi float [ %57, %bb.i1.i29 ], [ %23, %_Z8btSetMinIfEvRT_RKS0_.exit6.i28 ] ; [#uses=1]
- %60 = load float* %44, align 4 ; [#uses=3]
- %61 = fcmp olt float %28, %60 ; [#uses=1]
- br i1 %61, label %bb.i.i14, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i15
-
-bb.i.i14: ; preds = %_ZN9btVector36setMinERKS_.exit31
- store float %60, float* %24, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i15
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i15: ; preds = %bb.i.i14, %_ZN9btVector36setMinERKS_.exit31
- %62 = phi float [ %60, %bb.i.i14 ], [ %28, %_ZN9btVector36setMinERKS_.exit31 ] ; [#uses=1]
- %63 = load float* %48, align 4 ; [#uses=3]
- %64 = fcmp olt float %33, %63 ; [#uses=1]
- br i1 %64, label %bb.i7.i16, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i17
-
-bb.i7.i16: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i15
- store float %63, float* %29, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i17
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i17: ; preds = %bb.i7.i16, %_Z8btSetMaxIfEvRT_RKS0_.exit.i15
- %65 = phi float [ %63, %bb.i7.i16 ], [ %33, %_Z8btSetMaxIfEvRT_RKS0_.exit.i15 ] ; [#uses=1]
- %66 = load float* %52, align 4 ; [#uses=3]
- %67 = fcmp olt float %38, %66 ; [#uses=1]
- br i1 %67, label %bb.i4.i18, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i19
-
-bb.i4.i18: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i17
- store float %66, float* %34, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i19
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i19: ; preds = %bb.i4.i18, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i17
- %68 = phi float [ %66, %bb.i4.i18 ], [ %38, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i17 ] ; [#uses=1]
- %69 = load float* %56, align 4 ; [#uses=3]
- %70 = fcmp olt float %43, %69 ; [#uses=1]
- br i1 %70, label %bb.i1.i20, label %_ZN9btVector36setMaxERKS_.exit22
-
-bb.i1.i20: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i19
- store float %69, float* %39, align 4
- br label %_ZN9btVector36setMaxERKS_.exit22
-
-_ZN9btVector36setMaxERKS_.exit22: ; preds = %bb.i1.i20, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i19
- %71 = phi float [ %43, %_Z8btSetMaxIfEvRT_RKS0_.exit6.i19 ], [ %69, %bb.i1.i20 ] ; [#uses=1]
- %72 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=2]
- %73 = load float* %72, align 4 ; [#uses=2]
- %74 = fcmp olt float %73, %47 ; [#uses=1]
- br i1 %74, label %bb.i.i5, label %_Z8btSetMinIfEvRT_RKS0_.exit.i6
-
-bb.i.i5: ; preds = %_ZN9btVector36setMaxERKS_.exit22
- store float %73, float* %1, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit.i6
-
-_Z8btSetMinIfEvRT_RKS0_.exit.i6: ; preds = %bb.i.i5, %_ZN9btVector36setMaxERKS_.exit22
- %75 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=2]
- %76 = load float* %75, align 4 ; [#uses=2]
- %77 = fcmp olt float %76, %51 ; [#uses=1]
- br i1 %77, label %bb.i7.i7, label %_Z8btSetMinIfEvRT_RKS0_.exit9.i8
-
-bb.i7.i7: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit.i6
- store float %76, float* %7, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit9.i8
-
-_Z8btSetMinIfEvRT_RKS0_.exit9.i8: ; preds = %bb.i7.i7, %_Z8btSetMinIfEvRT_RKS0_.exit.i6
- %78 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=2]
- %79 = load float* %78, align 4 ; [#uses=2]
- %80 = fcmp olt float %79, %55 ; [#uses=1]
- br i1 %80, label %bb.i4.i9, label %_Z8btSetMinIfEvRT_RKS0_.exit6.i10
-
-bb.i4.i9: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit9.i8
- store float %79, float* %13, align 4
- br label %_Z8btSetMinIfEvRT_RKS0_.exit6.i10
-
-_Z8btSetMinIfEvRT_RKS0_.exit6.i10: ; preds = %bb.i4.i9, %_Z8btSetMinIfEvRT_RKS0_.exit9.i8
- %81 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=2]
- %82 = load float* %81, align 4 ; [#uses=2]
- %83 = fcmp olt float %82, %59 ; [#uses=1]
- br i1 %83, label %bb.i1.i11, label %_ZN9btVector36setMinERKS_.exit13
-
-bb.i1.i11: ; preds = %_Z8btSetMinIfEvRT_RKS0_.exit6.i10
- store float %82, float* %19, align 4
- br label %_ZN9btVector36setMinERKS_.exit13
-
-_ZN9btVector36setMinERKS_.exit13: ; preds = %bb.i1.i11, %_Z8btSetMinIfEvRT_RKS0_.exit6.i10
- %84 = load float* %72, align 4 ; [#uses=2]
- %85 = fcmp olt float %62, %84 ; [#uses=1]
- br i1 %85, label %bb.i.i1, label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-bb.i.i1: ; preds = %_ZN9btVector36setMinERKS_.exit13
- store float %84, float* %24, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit.i: ; preds = %bb.i.i1, %_ZN9btVector36setMinERKS_.exit13
- %86 = load float* %75, align 4 ; [#uses=2]
- %87 = fcmp olt float %65, %86 ; [#uses=1]
- br i1 %87, label %bb.i7.i2, label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-bb.i7.i2: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- store float %86, float* %29, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit9.i: ; preds = %bb.i7.i2, %_Z8btSetMaxIfEvRT_RKS0_.exit.i
- %88 = load float* %78, align 4 ; [#uses=2]
- %89 = fcmp olt float %68, %88 ; [#uses=1]
- br i1 %89, label %bb.i4.i3, label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-bb.i4.i3: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- store float %88, float* %34, align 4
- br label %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
-
-_Z8btSetMaxIfEvRT_RKS0_.exit6.i: ; preds = %bb.i4.i3, %_Z8btSetMaxIfEvRT_RKS0_.exit9.i
- %90 = load float* %81, align 4 ; [#uses=2]
- %91 = fcmp olt float %71, %90 ; [#uses=1]
- br i1 %91, label %bb.i1.i4, label %_ZN9btVector36setMaxERKS_.exit
-
-bb.i1.i4: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- store float %90, float* %39, align 4
- ret void
-
-_ZN9btVector36setMaxERKS_.exit: ; preds = %_Z8btSetMaxIfEvRT_RKS0_.exit6.i
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZNK23btStridingMeshInterface9serializeEPvP12btSerializer(%struct.btStridingMeshInterface* %this, i8* nocapture %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %vertexbase = alloca i8*, align 4 ; [#uses=3]
- %indexbase = alloca i8*, align 4 ; [#uses=3]
- %indexstride = alloca i32, align 4 ; [#uses=3]
- %type = alloca i32, align 4 ; [#uses=2]
- %gfxindextype = alloca i32, align 4 ; [#uses=2]
- %stride = alloca i32, align 4 ; [#uses=3]
- %numverts = alloca i32, align 4 ; [#uses=7]
- %numtriangles = alloca i32, align 4 ; [#uses=8]
- %0 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 0 ; [#uses=4]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 7 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i32 (%struct.btStridingMeshInterface*)* ; [#uses=1]
- %5 = call i32 %4(%struct.btStridingMeshInterface* %this) ; [#uses=3]
- %6 = getelementptr inbounds i8* %dataBuffer, i32 20 ; [#uses=1]
- %7 = bitcast i8* %6 to i32* ; [#uses=1]
- store i32 %5, i32* %7, align 4
- %8 = bitcast i8* %dataBuffer to %struct.btMeshPartData** ; [#uses=2]
- store %struct.btMeshPartData* null, %struct.btMeshPartData** %8, align 4
- %9 = icmp eq i32 %5, 0 ; [#uses=1]
- br i1 %9, label %bb35, label %bb
-
-bb: ; preds = %entry
- %10 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=15]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 4 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %15 = call %struct.btChunk* %14(%struct.btActionInterface* %serializer, i32 28, i32 %5) ; [#uses=2]
- %16 = getelementptr inbounds %struct.btChunk* %15, i32 0, i32 2 ; [#uses=2]
- %17 = load i8** %16, align 4 ; [#uses=8]
- %18 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 7 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %22 = call i8* %21(%struct.btActionInterface* %serializer, i8* %17) ; [#uses=1]
- %23 = bitcast i8* %22 to %struct.btMeshPartData* ; [#uses=1]
- store %struct.btMeshPartData* %23, %struct.btMeshPartData** %8, align 4
- %24 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 7 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = bitcast i32 (...)* %26 to i32 (%struct.btStridingMeshInterface*)* ; [#uses=1]
- %28 = call i32 %27(%struct.btStridingMeshInterface* %this) ; [#uses=2]
- %29 = icmp sgt i32 %28, 0 ; [#uses=1]
- br i1 %29, label %bb1, label %bb34
-
-bb1: ; preds = %bb32, %bb
- %30 = phi i32 [ %186, %bb32 ], [ 0, %bb ] ; [#uses=4]
- %tmp102 = mul i32 %30, 28 ; [#uses=7]
- %tmp103 = add i32 %tmp102, 20 ; [#uses=1]
- %scevgep104 = getelementptr i8* %17, i32 %tmp103 ; [#uses=1]
- %scevgep104105 = bitcast i8* %scevgep104 to i32* ; [#uses=1]
- %tmp106 = add i32 %tmp102, 24 ; [#uses=1]
- %scevgep107 = getelementptr i8* %17, i32 %tmp106 ; [#uses=1]
- %scevgep107108 = bitcast i8* %scevgep107 to i32* ; [#uses=1]
- %tmp109 = add i32 %tmp102, 16 ; [#uses=1]
- %scevgep110 = getelementptr i8* %17, i32 %tmp109 ; [#uses=1]
- %scevgep110111 = bitcast i8* %scevgep110 to %struct.btShortIntIndexData** ; [#uses=1]
- %tmp112 = add i32 %tmp102, 8 ; [#uses=1]
- %scevgep113 = getelementptr i8* %17, i32 %tmp112 ; [#uses=1]
- %scevgep113114 = bitcast i8* %scevgep113 to %struct.btHashInt** ; [#uses=2]
- %tmp115 = add i32 %tmp102, 12 ; [#uses=1]
- %scevgep116 = getelementptr i8* %17, i32 %tmp115 ; [#uses=1]
- %scevgep116117 = bitcast i8* %scevgep116 to %struct.btShortIntIndexTripletData** ; [#uses=2]
- %scevgep118 = getelementptr i8* %17, i32 %tmp102 ; [#uses=1]
- %scevgep118119 = bitcast i8* %scevgep118 to %struct.btQuadWord** ; [#uses=2]
- %tmp120 = add i32 %tmp102, 4 ; [#uses=1]
- %scevgep121 = getelementptr i8* %17, i32 %tmp120 ; [#uses=1]
- %scevgep121122 = bitcast i8* %scevgep121 to %struct.btVector3DoubleData** ; [#uses=2]
- %31 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32 (...)** %31, i32 4 ; [#uses=1]
- %33 = load i32 (...)** %32, align 4 ; [#uses=1]
- %34 = bitcast i32 (...)* %33 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- call void %34(%struct.btStridingMeshInterface* %this, i8** %vertexbase, i32* %numverts, i32* %type, i32* %stride, i8** %indexbase, i32* %indexstride, i32* %numtriangles, i32* %gfxindextype, i32 %30)
- %35 = load i32* %numtriangles, align 4 ; [#uses=1]
- store i32 %35, i32* %scevgep104105, align 4
- %36 = load i32* %numverts, align 4 ; [#uses=1]
- store i32 %36, i32* %scevgep107108, align 4
- store %struct.btShortIntIndexData* null, %struct.btShortIntIndexData** %scevgep110111, align 4
- store %struct.btHashInt* null, %struct.btHashInt** %scevgep113114, align 4
- store %struct.btShortIntIndexTripletData* null, %struct.btShortIntIndexTripletData** %scevgep116117, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %scevgep118119, align 4
- store %struct.btVector3DoubleData* null, %struct.btVector3DoubleData** %scevgep121122, align 4
- %37 = load i32* %gfxindextype, align 4 ; [#uses=1]
- switch i32 %37, label %bb16 [
- i32 2, label %bb2
- i32 3, label %bb8
- ]
-
-bb2: ; preds = %bb1
- %38 = load i32* %numtriangles, align 4 ; [#uses=1]
- %39 = mul nsw i32 %38, 3 ; [#uses=2]
- %40 = icmp eq i32 %39, 0 ; [#uses=1]
- br i1 %40, label %bb16, label %bb3
-
-bb3: ; preds = %bb2
- %41 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 4 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = bitcast i32 (...)* %43 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %45 = call %struct.btChunk* %44(%struct.btActionInterface* %serializer, i32 4, i32 %39) ; [#uses=2]
- %46 = getelementptr inbounds %struct.btChunk* %45, i32 0, i32 2 ; [#uses=2]
- %47 = load i8** %46, align 4 ; [#uses=4]
- %48 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %49 = getelementptr inbounds i32 (...)** %48, i32 7 ; [#uses=1]
- %50 = load i32 (...)** %49, align 4 ; [#uses=1]
- %51 = bitcast i32 (...)* %50 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %52 = call i8* %51(%struct.btActionInterface* %serializer, i8* %47) ; [#uses=1]
- %53 = bitcast i8* %52 to %struct.btHashInt* ; [#uses=1]
- store %struct.btHashInt* %53, %struct.btHashInt** %scevgep113114, align 4
- %54 = load i32* %numtriangles, align 4 ; [#uses=1]
- %55 = icmp sgt i32 %54, 0 ; [#uses=1]
- br i1 %55, label %bb5, label %bb7
-
-bb5: ; preds = %bb5, %bb3
- %56 = phi i32 [ %69, %bb5 ], [ 0, %bb3 ] ; [#uses=3]
- %tmp91 = mul i32 %56, 12 ; [#uses=3]
- %scevgep92 = getelementptr i8* %47, i32 %tmp91 ; [#uses=1]
- %scevgep9293 = bitcast i8* %scevgep92 to i32* ; [#uses=1]
- %tmp94 = add i32 %tmp91, 4 ; [#uses=1]
- %scevgep95 = getelementptr i8* %47, i32 %tmp94 ; [#uses=1]
- %scevgep9596 = bitcast i8* %scevgep95 to i32* ; [#uses=1]
- %tmp97 = add i32 %tmp91, 8 ; [#uses=1]
- %scevgep98 = getelementptr i8* %47, i32 %tmp97 ; [#uses=1]
- %scevgep9899 = bitcast i8* %scevgep98 to i32* ; [#uses=1]
- %57 = load i8** %indexbase, align 4 ; [#uses=3]
- %58 = load i32* %indexstride, align 4 ; [#uses=1]
- %59 = mul nsw i32 %58, %56 ; [#uses=3]
- %60 = getelementptr inbounds i8* %57, i32 %59 ; [#uses=1]
- %61 = bitcast i8* %60 to i32* ; [#uses=1]
- %62 = load i32* %61, align 4 ; [#uses=1]
- store i32 %62, i32* %scevgep9293, align 4
- %.sum42 = add i32 %59, 4 ; [#uses=1]
- %63 = getelementptr inbounds i8* %57, i32 %.sum42 ; [#uses=1]
- %64 = bitcast i8* %63 to i32* ; [#uses=1]
- %65 = load i32* %64, align 4 ; [#uses=1]
- store i32 %65, i32* %scevgep9596, align 4
- %.sum43 = add i32 %59, 8 ; [#uses=1]
- %66 = getelementptr inbounds i8* %57, i32 %.sum43 ; [#uses=1]
- %67 = bitcast i8* %66 to i32* ; [#uses=1]
- %68 = load i32* %67, align 4 ; [#uses=1]
- store i32 %68, i32* %scevgep9899, align 4
- %69 = add nsw i32 %56, 1 ; [#uses=2]
- %70 = load i32* %numtriangles, align 4 ; [#uses=1]
- %71 = icmp slt i32 %69, %70 ; [#uses=1]
- br i1 %71, label %bb5, label %bb7
-
-bb7: ; preds = %bb5, %bb3
- %72 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %73 = getelementptr inbounds i32 (...)** %72, i32 5 ; [#uses=1]
- %74 = load i32 (...)** %73, align 4 ; [#uses=1]
- %75 = load i8** %46, align 4 ; [#uses=1]
- %76 = bitcast i32 (...)* %74 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- call void %76(%struct.btActionInterface* %serializer, %struct.btChunk* %45, i8* getelementptr inbounds ([15 x i8]* @.str123, i32 0, i32 0), i32 1497453121, i8* %75)
- br label %bb16
-
-bb8: ; preds = %bb1
- %77 = load i32* %numtriangles, align 4 ; [#uses=2]
- %78 = icmp eq i32 %77, 0 ; [#uses=1]
- br i1 %78, label %bb16, label %bb9
-
-bb9: ; preds = %bb8
- %79 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %80 = getelementptr inbounds i32 (...)** %79, i32 4 ; [#uses=1]
- %81 = load i32 (...)** %80, align 4 ; [#uses=1]
- %82 = bitcast i32 (...)* %81 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %83 = call %struct.btChunk* %82(%struct.btActionInterface* %serializer, i32 8, i32 %77) ; [#uses=2]
- %84 = getelementptr inbounds %struct.btChunk* %83, i32 0, i32 2 ; [#uses=2]
- %85 = load i8** %84, align 4 ; [#uses=4]
- %86 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %87 = getelementptr inbounds i32 (...)** %86, i32 7 ; [#uses=1]
- %88 = load i32 (...)** %87, align 4 ; [#uses=1]
- %89 = bitcast i32 (...)* %88 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %90 = call i8* %89(%struct.btActionInterface* %serializer, i8* %85) ; [#uses=1]
- %91 = bitcast i8* %90 to %struct.btShortIntIndexTripletData* ; [#uses=1]
- store %struct.btShortIntIndexTripletData* %91, %struct.btShortIntIndexTripletData** %scevgep116117, align 4
- %92 = load i32* %numtriangles, align 4 ; [#uses=1]
- %93 = icmp sgt i32 %92, 0 ; [#uses=1]
- br i1 %93, label %bb12, label %bb15
-
-bb12: ; preds = %bb12, %bb9
- %94 = phi i32 [ %107, %bb12 ], [ 0, %bb9 ] ; [#uses=3]
- %tmp81 = shl i32 %94, 3 ; [#uses=3]
- %scevgep82 = getelementptr i8* %85, i32 %tmp81 ; [#uses=1]
- %scevgep8283 = bitcast i8* %scevgep82 to i16* ; [#uses=1]
- %tmp84127 = or i32 %tmp81, 2 ; [#uses=1]
- %scevgep85 = getelementptr i8* %85, i32 %tmp84127 ; [#uses=1]
- %scevgep8586 = bitcast i8* %scevgep85 to i16* ; [#uses=1]
- %tmp87128 = or i32 %tmp81, 4 ; [#uses=1]
- %scevgep88 = getelementptr i8* %85, i32 %tmp87128 ; [#uses=1]
- %scevgep8889 = bitcast i8* %scevgep88 to i16* ; [#uses=1]
- %95 = load i8** %indexbase, align 4 ; [#uses=3]
- %96 = load i32* %indexstride, align 4 ; [#uses=1]
- %97 = mul nsw i32 %96, %94 ; [#uses=3]
- %98 = getelementptr inbounds i8* %95, i32 %97 ; [#uses=1]
- %99 = bitcast i8* %98 to i16* ; [#uses=1]
- %100 = load i16* %99, align 2 ; [#uses=1]
- store i16 %100, i16* %scevgep8283, align 2
- %.sum40 = add i32 %97, 2 ; [#uses=1]
- %101 = getelementptr inbounds i8* %95, i32 %.sum40 ; [#uses=1]
- %102 = bitcast i8* %101 to i16* ; [#uses=1]
- %103 = load i16* %102, align 2 ; [#uses=1]
- store i16 %103, i16* %scevgep8586, align 2
- %.sum41 = add i32 %97, 4 ; [#uses=1]
- %104 = getelementptr inbounds i8* %95, i32 %.sum41 ; [#uses=1]
- %105 = bitcast i8* %104 to i16* ; [#uses=1]
- %106 = load i16* %105, align 2 ; [#uses=1]
- store i16 %106, i16* %scevgep8889, align 2
- %107 = add nsw i32 %94, 1 ; [#uses=2]
- %108 = load i32* %numtriangles, align 4 ; [#uses=1]
- %109 = icmp slt i32 %107, %108 ; [#uses=1]
- br i1 %109, label %bb12, label %bb15
-
-bb15: ; preds = %bb12, %bb9
- %110 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %111 = getelementptr inbounds i32 (...)** %110, i32 5 ; [#uses=1]
- %112 = load i32 (...)** %111, align 4 ; [#uses=1]
- %113 = load i8** %84, align 4 ; [#uses=1]
- %114 = bitcast i32 (...)* %112 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- call void %114(%struct.btActionInterface* %serializer, %struct.btChunk* %83, i8* getelementptr inbounds ([27 x i8]* @.str1124, i32 0, i32 0), i32 1497453121, i8* %113)
- br label %bb16
-
-bb16: ; preds = %bb15, %bb8, %bb7, %bb2, %bb1
- %115 = load i32* %type, align 4 ; [#uses=1]
- switch i32 %115, label %bb32 [
- i32 0, label %bb17
- i32 1, label %bb23
- ]
-
-bb17: ; preds = %bb16
- %116 = load i32* %numverts, align 4 ; [#uses=2]
- %117 = icmp eq i32 %116, 0 ; [#uses=1]
- br i1 %117, label %bb32, label %bb18
-
-bb18: ; preds = %bb17
- %118 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %119 = getelementptr inbounds i32 (...)** %118, i32 4 ; [#uses=1]
- %120 = load i32 (...)** %119, align 4 ; [#uses=1]
- %121 = bitcast i32 (...)* %120 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %122 = call %struct.btChunk* %121(%struct.btActionInterface* %serializer, i32 16, i32 %116) ; [#uses=2]
- %123 = getelementptr inbounds %struct.btChunk* %122, i32 0, i32 2 ; [#uses=2]
- %124 = load i8** %123, align 4 ; [#uses=4]
- %125 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %126 = getelementptr inbounds i32 (...)** %125, i32 7 ; [#uses=1]
- %127 = load i32 (...)** %126, align 4 ; [#uses=1]
- %128 = bitcast i32 (...)* %127 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %129 = call i8* %128(%struct.btActionInterface* %serializer, i8* %124) ; [#uses=1]
- %130 = bitcast i8* %129 to %struct.btQuadWord* ; [#uses=1]
- store %struct.btQuadWord* %130, %struct.btQuadWord** %scevgep118119, align 4
- %131 = load i32* %numverts, align 4 ; [#uses=1]
- %132 = icmp sgt i32 %131, 0 ; [#uses=1]
- br i1 %132, label %bb20, label %bb22
-
-bb20: ; preds = %bb20, %bb18
- %133 = phi i32 [ %146, %bb20 ], [ 0, %bb18 ] ; [#uses=3]
- %tmp71 = shl i32 %133, 4 ; [#uses=3]
- %scevgep72 = getelementptr i8* %124, i32 %tmp71 ; [#uses=1]
- %scevgep7273 = bitcast i8* %scevgep72 to float* ; [#uses=1]
- %tmp74125 = or i32 %tmp71, 4 ; [#uses=1]
- %scevgep75 = getelementptr i8* %124, i32 %tmp74125 ; [#uses=1]
- %scevgep7576 = bitcast i8* %scevgep75 to float* ; [#uses=1]
- %tmp77126 = or i32 %tmp71, 8 ; [#uses=1]
- %scevgep78 = getelementptr i8* %124, i32 %tmp77126 ; [#uses=1]
- %scevgep7879 = bitcast i8* %scevgep78 to float* ; [#uses=1]
- %134 = load i8** %vertexbase, align 4 ; [#uses=3]
- %135 = load i32* %stride, align 4 ; [#uses=1]
- %136 = mul nsw i32 %135, %133 ; [#uses=3]
- %137 = getelementptr inbounds i8* %134, i32 %136 ; [#uses=1]
- %138 = bitcast i8* %137 to float* ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=1]
- store float %139, float* %scevgep7273, align 4
- %.sum38 = add i32 %136, 4 ; [#uses=1]
- %140 = getelementptr inbounds i8* %134, i32 %.sum38 ; [#uses=1]
- %141 = bitcast i8* %140 to float* ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=1]
- store float %142, float* %scevgep7576, align 4
- %.sum39 = add i32 %136, 8 ; [#uses=1]
- %143 = getelementptr inbounds i8* %134, i32 %.sum39 ; [#uses=1]
- %144 = bitcast i8* %143 to float* ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- store float %145, float* %scevgep7879, align 4
- %146 = add nsw i32 %133, 1 ; [#uses=2]
- %147 = load i32* %numverts, align 4 ; [#uses=1]
- %148 = icmp slt i32 %146, %147 ; [#uses=1]
- br i1 %148, label %bb20, label %bb22
-
-bb22: ; preds = %bb20, %bb18
- %149 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %150 = getelementptr inbounds i32 (...)** %149, i32 5 ; [#uses=1]
- %151 = load i32 (...)** %150, align 4 ; [#uses=1]
- %152 = load i8** %123, align 4 ; [#uses=1]
- %153 = bitcast i32 (...)* %151 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- call void %153(%struct.btActionInterface* %serializer, %struct.btChunk* %122, i8* getelementptr inbounds ([19 x i8]* @.str2125, i32 0, i32 0), i32 1497453121, i8* %152)
- br label %bb32
-
-bb23: ; preds = %bb16
- %154 = load i32* %numverts, align 4 ; [#uses=2]
- %155 = icmp eq i32 %154, 0 ; [#uses=1]
- br i1 %155, label %bb32, label %bb24
-
-bb24: ; preds = %bb23
- %156 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %157 = getelementptr inbounds i32 (...)** %156, i32 4 ; [#uses=1]
- %158 = load i32 (...)** %157, align 4 ; [#uses=1]
- %159 = bitcast i32 (...)* %158 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %160 = call %struct.btChunk* %159(%struct.btActionInterface* %serializer, i32 32, i32 %154) ; [#uses=2]
- %161 = getelementptr inbounds %struct.btChunk* %160, i32 0, i32 2 ; [#uses=2]
- %162 = load i8** %161, align 4 ; [#uses=4]
- %163 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %164 = getelementptr inbounds i32 (...)** %163, i32 7 ; [#uses=1]
- %165 = load i32 (...)** %164, align 4 ; [#uses=1]
- %166 = bitcast i32 (...)* %165 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %167 = call i8* %166(%struct.btActionInterface* %serializer, i8* %162) ; [#uses=1]
- %168 = bitcast i8* %167 to %struct.btVector3DoubleData* ; [#uses=1]
- store %struct.btVector3DoubleData* %168, %struct.btVector3DoubleData** %scevgep121122, align 4
- %169 = load i32* %numverts, align 4 ; [#uses=3]
- %170 = icmp sgt i32 %169, 0 ; [#uses=1]
- br i1 %170, label %bb.nph, label %bb31
-
-bb.nph: ; preds = %bb24
- %171 = load i8** %vertexbase, align 4 ; [#uses=3]
- %172 = load i32* %stride, align 4 ; [#uses=1]
- %tmp = icmp sgt i32 %169, 1 ; [#uses=1]
- %smax = select i1 %tmp, i32 %169, i32 1 ; [#uses=1]
- br label %bb28
-
-bb28: ; preds = %bb28, %bb.nph
- %i27.044 = phi i32 [ 0, %bb.nph ], [ %176, %bb28 ] ; [#uses=3]
- %tmp54 = shl i32 %i27.044, 5 ; [#uses=3]
- %scevgep = getelementptr i8* %162, i32 %tmp54 ; [#uses=1]
- %scevgep55 = bitcast i8* %scevgep to double* ; [#uses=1]
- %tmp56123 = or i32 %tmp54, 8 ; [#uses=1]
- %scevgep57 = getelementptr i8* %162, i32 %tmp56123 ; [#uses=1]
- %scevgep5758 = bitcast i8* %scevgep57 to double* ; [#uses=1]
- %tmp59124 = or i32 %tmp54, 16 ; [#uses=1]
- %scevgep60 = getelementptr i8* %162, i32 %tmp59124 ; [#uses=1]
- %scevgep6061 = bitcast i8* %scevgep60 to double* ; [#uses=1]
- %tmp62 = mul i32 %172, %i27.044 ; [#uses=3]
- %tmp63 = add i32 %tmp62, 16 ; [#uses=1]
- %scevgep64 = getelementptr i8* %171, i32 %tmp63 ; [#uses=1]
- %scevgep6465 = bitcast i8* %scevgep64 to double* ; [#uses=1]
- %tmp66 = add i32 %tmp62, 8 ; [#uses=1]
- %scevgep67 = getelementptr i8* %171, i32 %tmp66 ; [#uses=1]
- %scevgep6768 = bitcast i8* %scevgep67 to double* ; [#uses=1]
- %scevgep69 = getelementptr i8* %171, i32 %tmp62 ; [#uses=1]
- %scevgep6970 = bitcast i8* %scevgep69 to double* ; [#uses=1]
- %173 = load double* %scevgep6970, align 4 ; [#uses=1]
- store double %173, double* %scevgep55, align 4
- %174 = load double* %scevgep6768, align 4 ; [#uses=1]
- store double %174, double* %scevgep5758, align 4
- %175 = load double* %scevgep6465, align 4 ; [#uses=1]
- store double %175, double* %scevgep6061, align 4
- %176 = add nsw i32 %i27.044, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %176, %smax ; [#uses=1]
- br i1 %exitcond, label %bb31, label %bb28
-
-bb31: ; preds = %bb28, %bb24
- %177 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %178 = getelementptr inbounds i32 (...)** %177, i32 5 ; [#uses=1]
- %179 = load i32 (...)** %178, align 4 ; [#uses=1]
- %180 = load i8** %161, align 4 ; [#uses=1]
- %181 = bitcast i32 (...)* %179 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- call void %181(%struct.btActionInterface* %serializer, %struct.btChunk* %160, i8* getelementptr inbounds ([20 x i8]* @.str3126, i32 0, i32 0), i32 1497453121, i8* %180)
- br label %bb32
-
-bb32: ; preds = %bb31, %bb23, %bb22, %bb17, %bb16
- %182 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %183 = getelementptr inbounds i32 (...)** %182, i32 6 ; [#uses=1]
- %184 = load i32 (...)** %183, align 4 ; [#uses=1]
- %185 = bitcast i32 (...)* %184 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- call void %185(%struct.btStridingMeshInterface* %this, i32 %30)
- %186 = add nsw i32 %30, 1 ; [#uses=2]
- %exitcond101 = icmp eq i32 %186, %28 ; [#uses=1]
- br i1 %exitcond101, label %bb34, label %bb1
-
-bb34: ; preds = %bb32, %bb
- %187 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %188 = getelementptr inbounds i32 (...)** %187, i32 5 ; [#uses=1]
- %189 = load i32 (...)** %188, align 4 ; [#uses=1]
- %190 = load i8** %16, align 4 ; [#uses=1]
- %191 = bitcast i32 (...)* %189 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- call void %191(%struct.btActionInterface* %serializer, %struct.btChunk* %15, i8* getelementptr inbounds ([15 x i8]* @.str4127, i32 0, i32 0), i32 1497453121, i8* %190)
- br label %bb35
-
-bb35: ; preds = %bb34, %entry
- %192 = getelementptr inbounds i8* %dataBuffer, i32 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btStridingMeshInterface* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %192 to float* ; [#uses=1]
- %193 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %193, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btStridingMeshInterface* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 8 ; [#uses=1]
- %194 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %195 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %195, float* %194, align 4
- %scevgep.2.i = getelementptr %struct.btStridingMeshInterface* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 12 ; [#uses=1]
- %196 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %197 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %197, float* %196, align 4
- %scevgep.3.i = getelementptr %struct.btStridingMeshInterface* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 16 ; [#uses=1]
- %198 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %199 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %199, float* %198, align 4
- ret i8* getelementptr inbounds ([28 x i8]* @.str5128, i32 0, i32 0)
-}
-
-; [#uses=0]
-define void @_ZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_(%struct.btStridingMeshInterface* %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %aabbCallback = alloca %struct..0AabbCalculationCallback, align 8 ; [#uses=10]
- %0 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %1, align 4
- %2 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %2, align 4
- %3 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %3, align 4
- %4 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float 0xC3ABC16D60000000, float* %5, align 4
- %6 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float 0xC3ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float 0xC3ABC16D60000000, float* %7, align 4
- %8 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0xC3ABC16D60000000, float* %9, align 4
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0xC3ABC16D60000000, float* %10, align 4
- %11 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0xC3ABC16D60000000, float* %11, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %15, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 0 ; [#uses=1]
- %18 = load i32 (...)*** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 2 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %22 = getelementptr inbounds %struct..0AabbCalculationCallback* %aabbCallback, i32 0, i32 0 ; [#uses=3]
- invoke void %21(%struct.btStridingMeshInterface* %this, %struct.btActionInterface* %22, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %23 = load float* %1, align 4 ; [#uses=1]
- store float %23, float* %9, align 4
- %24 = load float* %2, align 4 ; [#uses=1]
- store float %24, float* %10, align 4
- %25 = load float* %3, align 4 ; [#uses=1]
- store float %25, float* %11, align 4
- %26 = load float* %4, align 4 ; [#uses=1]
- store float %26, float* %12, align 4
- %27 = load float* %5, align 4 ; [#uses=1]
- store float %27, float* %13, align 4
- %28 = load float* %6, align 4 ; [#uses=1]
- store float %28, float* %14, align 4
- %29 = load float* %7, align 4 ; [#uses=1]
- store float %29, float* %15, align 4
- %30 = load float* %8, align 4 ; [#uses=1]
- store float %30, float* %16, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %22)
- ret void
-
-invcont1: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %22)
- to label %invcont1 unwind label %lpad5
-
-lpad5: ; preds = %lpad
- %eh_ptr6 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select8 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr6, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_EN23AabbCalculationCallbackD2Ev(%struct..0AabbCalculationCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btStridingMeshInterface23calculateAabbBruteForceER9btVector3S1_E23AabbCalculationCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0AabbCalculationCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btStridingMeshInterfaceD0Ev(%struct.btStridingMeshInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV23btStridingMeshInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btStridingMeshInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btStridingMeshInterfaceD1Ev(%struct.btStridingMeshInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btStridingMeshInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV23btStridingMeshInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btBU_Simplex1to4C2Ev(%struct.btBU_Simplex1to4* %this) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV16btBU_Simplex1to4, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK16btBU_Simplex1to47getNameEv(%struct.btBU_Simplex1to4* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([17 x i8]* @.str129, i32 0, i32 0)
-}
-
-; [#uses=1]
-define i32 @_ZNK16btBU_Simplex1to414getNumVerticesEv(%struct.btBU_Simplex1to4* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define i32 @_ZNK16btBU_Simplex1to411getNumEdgesEv(%struct.btBU_Simplex1to4* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- switch i32 %1, label %bb6 [
- i32 2, label %bb2
- i32 3, label %bb3
- i32 4, label %bb4
- ]
-
-bb2: ; preds = %entry
- ret i32 1
-
-bb3: ; preds = %entry
- ret i32 3
-
-bb4: ; preds = %entry
- ret i32 6
-
-bb6: ; preds = %entry
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZNK16btBU_Simplex1to47getEdgeEiR9btVector3S1_(%struct.btBU_Simplex1to4* %this, i32 %i, %struct.btQuadWord* %pa, %struct.btQuadWord* %pb) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- switch i32 %1, label %return [
- i32 2, label %bb
- i32 3, label %bb1
- i32 4, label %bb5
- ]
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- ret void
-
-bb1: ; preds = %entry
- switch i32 %i, label %return [
- i32 0, label %bb2
- i32 1, label %bb3
- i32 2, label %bb4
- ]
-
-bb2: ; preds = %bb1
- %26 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- ret void
-
-bb3: ; preds = %bb1
- %50 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- ret void
-
-bb4: ; preds = %bb1
- %74 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- store float %88, float* %86, align 4
- %89 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- store float %91, float* %89, align 4
- %92 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- store float %94, float* %92, align 4
- %95 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- store float %97, float* %95, align 4
- ret void
-
-bb5: ; preds = %entry
- switch i32 %i, label %return [
- i32 0, label %bb6
- i32 1, label %bb7
- i32 2, label %bb8
- i32 3, label %bb9
- i32 4, label %bb10
- i32 5, label %bb11
- ]
-
-bb6: ; preds = %bb5
- %98 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=1]
- store float %100, float* %98, align 4
- %101 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=1]
- store float %103, float* %101, align 4
- %104 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- store float %106, float* %104, align 4
- %107 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- store float %109, float* %107, align 4
- %110 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- store float %112, float* %110, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- store float %115, float* %113, align 4
- %116 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- store float %118, float* %116, align 4
- %119 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- store float %121, float* %119, align 4
- ret void
-
-bb7: ; preds = %bb5
- %122 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- store float %124, float* %122, align 4
- %125 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=1]
- store float %127, float* %125, align 4
- %128 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- store float %130, float* %128, align 4
- %131 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- store float %133, float* %131, align 4
- %134 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- store float %136, float* %134, align 4
- %137 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=1]
- store float %139, float* %137, align 4
- %140 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=1]
- store float %142, float* %140, align 4
- %143 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- store float %145, float* %143, align 4
- ret void
-
-bb8: ; preds = %bb5
- %146 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=1]
- store float %148, float* %146, align 4
- %149 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=1]
- store float %151, float* %149, align 4
- %152 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %154 = load float* %153, align 4 ; [#uses=1]
- store float %154, float* %152, align 4
- %155 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- %157 = load float* %156, align 4 ; [#uses=1]
- store float %157, float* %155, align 4
- %158 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=1]
- store float %160, float* %158, align 4
- %161 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- store float %163, float* %161, align 4
- %164 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- store float %166, float* %164, align 4
- %167 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- store float %169, float* %167, align 4
- ret void
-
-bb9: ; preds = %bb5
- %170 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %172 = load float* %171, align 4 ; [#uses=1]
- store float %172, float* %170, align 4
- %173 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- store float %175, float* %173, align 4
- %176 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %178 = load float* %177, align 4 ; [#uses=1]
- store float %178, float* %176, align 4
- %179 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %181 = load float* %180, align 4 ; [#uses=1]
- store float %181, float* %179, align 4
- %182 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 0 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=1]
- store float %184, float* %182, align 4
- %185 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 1 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=1]
- store float %187, float* %185, align 4
- %188 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 2 ; [#uses=1]
- %190 = load float* %189, align 4 ; [#uses=1]
- store float %190, float* %188, align 4
- %191 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 3 ; [#uses=1]
- %193 = load float* %192, align 4 ; [#uses=1]
- store float %193, float* %191, align 4
- ret void
-
-bb10: ; preds = %bb5
- %194 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %196 = load float* %195, align 4 ; [#uses=1]
- store float %196, float* %194, align 4
- %197 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %199 = load float* %198, align 4 ; [#uses=1]
- store float %199, float* %197, align 4
- %200 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %202 = load float* %201, align 4 ; [#uses=1]
- store float %202, float* %200, align 4
- %203 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=1]
- store float %205, float* %203, align 4
- %206 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %207 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 0 ; [#uses=1]
- %208 = load float* %207, align 4 ; [#uses=1]
- store float %208, float* %206, align 4
- %209 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %210 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 1 ; [#uses=1]
- %211 = load float* %210, align 4 ; [#uses=1]
- store float %211, float* %209, align 4
- %212 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %213 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 2 ; [#uses=1]
- %214 = load float* %213, align 4 ; [#uses=1]
- store float %214, float* %212, align 4
- %215 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %216 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 3 ; [#uses=1]
- %217 = load float* %216, align 4 ; [#uses=1]
- store float %217, float* %215, align 4
- ret void
-
-bb11: ; preds = %bb5
- %218 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=1]
- store float %220, float* %218, align 4
- %221 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- %222 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %223 = load float* %222, align 4 ; [#uses=1]
- store float %223, float* %221, align 4
- %224 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- %225 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %226 = load float* %225, align 4 ; [#uses=1]
- store float %226, float* %224, align 4
- %227 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- %228 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- %229 = load float* %228, align 4 ; [#uses=1]
- store float %229, float* %227, align 4
- %230 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- %231 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 0 ; [#uses=1]
- %232 = load float* %231, align 4 ; [#uses=1]
- store float %232, float* %230, align 4
- %233 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- %234 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 1 ; [#uses=1]
- %235 = load float* %234, align 4 ; [#uses=1]
- store float %235, float* %233, align 4
- %236 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- %237 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 2 ; [#uses=1]
- %238 = load float* %237, align 4 ; [#uses=1]
- store float %238, float* %236, align 4
- %239 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %240 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 3, i32 0, i32 3 ; [#uses=1]
- %241 = load float* %240, align 4 ; [#uses=1]
- store float %241, float* %239, align 4
- ret void
-
-return: ; preds = %bb5, %bb1, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btBU_Simplex1to49getVertexEiR9btVector3(%struct.btBU_Simplex1to4* nocapture %this, i32 %i, %struct.btQuadWord* nocapture %vtx) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %i, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %i, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %i, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %vtx, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %i, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK16btBU_Simplex1to412getNumPlanesEv(%struct.btBU_Simplex1to4* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- switch i32 %1, label %bb6 [
- i32 3, label %bb3
- i32 4, label %bb4
- ]
-
-bb3: ; preds = %entry
- ret i32 2
-
-bb4: ; preds = %entry
- ret i32 4
-
-bb6: ; preds = %entry
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZNK16btBU_Simplex1to48getPlaneER9btVector3S1_i(%struct.btBU_Simplex1to4* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, %struct.btQuadWord* nocapture %unnamed_arg2, i32 %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK16btBU_Simplex1to48getIndexEi(%struct.btBU_Simplex1to4* nocapture %this, i32 %unnamed_arg) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define zeroext i8 @_ZNK16btBU_Simplex1to48isInsideERK9btVector3f(%struct.btBU_Simplex1to4* nocapture %this, %struct.btQuadWord* nocapture %unnamed_arg, float %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btBU_Simplex1to4D0Ev(%struct.btBU_Simplex1to4* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btBU_Simplex1to4* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btBU_Simplex1to4D1Ev(%struct.btBU_Simplex1to4* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK16btBU_Simplex1to47getAabbERK11btTransformR9btVector3S4_(%struct.btBU_Simplex1to4* %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZNK34btPolyhedralConvexAabbCachingShape7getAabbERK11btTransformR9btVector3S4_(%struct.btPolyhedralConvexAabbCachingShape* %0, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btBU_Simplex1to49addVertexERK9btVector3(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %1, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %pt, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %14, i32* %0, align 4
- %15 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %15)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btBU_Simplex1to4C1Ev(%struct.btBU_Simplex1to4* %this) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV16btBU_Simplex1to4, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btBU_Simplex1to4C2ERK9btVector3S2_S2_S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0, %struct.btQuadWord* nocapture %pt1, %struct.btQuadWord* nocapture %pt2, %struct.btQuadWord* nocapture %pt3) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=5]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV16btBU_Simplex1to4, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=8]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- store i32 1, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb2
- %16 = load i32* %2, align 4 ; [#uses=5]
- %17 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = add nsw i32 %16, 1 ; [#uses=1]
- store i32 %29, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %invcont
- %30 = load i32* %2, align 4 ; [#uses=5]
- %31 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = add nsw i32 %30, 1 ; [#uses=1]
- store i32 %43, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %invcont3
- %44 = load i32* %2, align 4 ; [#uses=5]
- %45 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %44, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btQuadWord* %pt3, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %44, i32 0, i32 1 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btQuadWord* %pt3, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %51 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %44, i32 0, i32 2 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btQuadWord* %pt3, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 4
- %54 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %44, i32 0, i32 3 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btQuadWord* %pt3, i32 0, i32 0, i32 3 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 4
- %57 = add nsw i32 %44, 1 ; [#uses=1]
- store i32 %57, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %return unwind label %lpad
-
-invcont7: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %invcont4
- ret void
-
-lpad: ; preds = %invcont4, %invcont3, %invcont, %bb2
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %58 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %58)
- to label %invcont7 unwind label %lpad12
-
-lpad12: ; preds = %lpad
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN16btBU_Simplex1to4C1ERK9btVector3S2_S2_S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0, %struct.btQuadWord* nocapture %pt1, %struct.btQuadWord* nocapture %pt2, %struct.btQuadWord* nocapture %pt3) align 2 {
-entry:
- tail call void @_ZN16btBU_Simplex1to4C2ERK9btVector3S2_S2_S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* %pt0, %struct.btQuadWord* %pt1, %struct.btQuadWord* %pt2, %struct.btQuadWord* %pt3)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btBU_Simplex1to4C2ERK9btVector3S2_S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0, %struct.btQuadWord* nocapture %pt1, %struct.btQuadWord* nocapture %pt2) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=4]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV16btBU_Simplex1to4, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=6]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- store i32 1, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb2
- %16 = load i32* %2, align 4 ; [#uses=5]
- %17 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = add nsw i32 %16, 1 ; [#uses=1]
- store i32 %29, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %invcont
- %30 = load i32* %2, align 4 ; [#uses=5]
- %31 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %30, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %pt2, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = add nsw i32 %30, 1 ; [#uses=1]
- store i32 %43, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %return unwind label %lpad
-
-invcont6: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %invcont3
- ret void
-
-lpad: ; preds = %invcont3, %invcont, %bb2
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %44 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %44)
- to label %invcont6 unwind label %lpad11
-
-lpad11: ; preds = %lpad
- %eh_ptr12 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN16btBU_Simplex1to4C1ERK9btVector3S2_S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0, %struct.btQuadWord* nocapture %pt1, %struct.btQuadWord* nocapture %pt2) align 2 {
-entry:
- tail call void @_ZN16btBU_Simplex1to4C2ERK9btVector3S2_S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* %pt0, %struct.btQuadWord* %pt1, %struct.btQuadWord* %pt2)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btBU_Simplex1to4C2ERK9btVector3S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0, %struct.btQuadWord* nocapture %pt1) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=3]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV16btBU_Simplex1to4, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=4]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- store i32 1, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb2
- %16 = load i32* %2, align 4 ; [#uses=5]
- %17 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 %16, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %pt1, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = add nsw i32 %16, 1 ; [#uses=1]
- store i32 %29, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %return unwind label %lpad
-
-invcont5: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %invcont
- ret void
-
-lpad: ; preds = %invcont, %bb2
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %30 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %30)
- to label %invcont5 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN16btBU_Simplex1to4C1ERK9btVector3S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0, %struct.btQuadWord* nocapture %pt1) align 2 {
-entry:
- tail call void @_ZN16btBU_Simplex1to4C2ERK9btVector3S2_(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* %pt0, %struct.btQuadWord* %pt1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btBU_Simplex1to4C1ERK9btVector3(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV16btBU_Simplex1to4, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=2]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- store i32 1, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %return unwind label %lpad
-
-invcont4: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb2
- ret void
-
-lpad: ; preds = %bb2
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %16 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %16)
- to label %invcont4 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN16btBU_Simplex1to4C2ERK9btVector3(%struct.btBU_Simplex1to4* %this, %struct.btQuadWord* nocapture %pt0) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN34btPolyhedralConvexAabbCachingShapeC2Ev(%struct.btPolyhedralConvexAabbCachingShape* %0)
- %1 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV16btBU_Simplex1to4, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 1 ; [#uses=2]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 2, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %pt0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- store i32 1, i32* %2, align 4
- invoke void @_ZN34btPolyhedralConvexAabbCachingShape15recalcLocalAabbEv(%struct.btPolyhedralConvexAabbCachingShape* %0)
- to label %return unwind label %lpad
-
-invcont4: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb2
- ret void
-
-lpad: ; preds = %bb2
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %16 = getelementptr inbounds %struct.btBU_Simplex1to4* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %16)
- to label %invcont4 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btTriangleBuffer15processTriangleEP9btVector3ii(%struct.btTriangleBuffer* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- %25 = load i32* %24, align 4 ; [#uses=6]
- %26 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %27 = load i32* %26, align 4 ; [#uses=2]
- %28 = icmp eq i32 %27, %25 ; [#uses=1]
- br i1 %28, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %29 = icmp eq i32 %25, 0 ; [#uses=1]
- %30 = shl i32 %25, 1 ; [#uses=1]
- %iftmp.39.0.i.i = select i1 %29, i32 1, i32 %30 ; [#uses=4]
- %31 = icmp slt i32 %27, %iftmp.39.0.i.i ; [#uses=1]
- br i1 %31, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %32 = icmp eq i32 %iftmp.39.0.i.i, 0 ; [#uses=1]
- br i1 %32, label %_ZN20btAlignedObjectArrayI10btTriangleE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %33 = mul i32 %iftmp.39.0.i.i, 56 ; [#uses=1]
- %34 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %33, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %34 to %struct.btTriangle* ; [#uses=1]
- %.pre.i = load i32* %24, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI10btTriangleE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI10btTriangleE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %35 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %25, %bb.i.i ] ; [#uses=2]
- %36 = phi %struct.btTriangle* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %37 = icmp sgt i32 %35, 0 ; [#uses=1]
- br i1 %37, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI10btTriangleE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI10btTriangleE8allocateEi.exit.i.i
- %38 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btTriangle* %36, i32 %indvar.i.i.i ; [#uses=2]
- %39 = icmp eq %struct.btTriangle* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %39, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %scevgep8.i.i.i = bitcast %struct.btTriangle* %scevgep.i.i.i to i8* ; [#uses=1]
- %40 = load %struct.btTriangle** %38, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btTriangle* %40, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep910.i.i.i = bitcast %struct.btTriangle* %scevgep to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep8.i.i.i, i8* %scevgep910.i.i.i, i32 56, i32 4, i1 false) nounwind
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %35 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI10btTriangleE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI10btTriangleE4copyEiiPS0_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayI10btTriangleE8allocateEi.exit.i.i
- %41 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %42 = load %struct.btTriangle** %41, align 4 ; [#uses=2]
- %43 = icmp eq %struct.btTriangle* %42, null ; [#uses=1]
- br i1 %43, label %_ZN20btAlignedObjectArrayI10btTriangleE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI10btTriangleE4copyEiiPS0_.exit.i.i
- %44 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %45 = load i8* %44, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %46 = bitcast %struct.btTriangle* %42 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %46)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTriangle* null, %struct.btTriangle** %41, align 4
- br label %_ZN20btAlignedObjectArrayI10btTriangleE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI10btTriangleE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI10btTriangleE4copyEiiPS0_.exit.i.i
- %47 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %47, align 4
- store %struct.btTriangle* %36, %struct.btTriangle** %41, align 4
- store i32 %iftmp.39.0.i.i, i32* %26, align 4
- %.pre8.i = load i32* %24, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayI10btTriangleE10deallocateEv.exit.i.i, %bb.i, %entry
- %48 = phi i32 [ %.pre8.i, %_ZN20btAlignedObjectArrayI10btTriangleE10deallocateEv.exit.i.i ], [ %25, %entry ], [ %25, %bb.i ] ; [#uses=16]
- %49 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %50 = load %struct.btTriangle** %49, align 4 ; [#uses=15]
- %51 = getelementptr inbounds %struct.btTriangle* %50, i32 %48 ; [#uses=1]
- %52 = icmp eq %struct.btTriangle* %51, null ; [#uses=1]
- br i1 %52, label %_ZN20btAlignedObjectArrayI10btTriangleE9push_backERKS0_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %.0 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %.0, align 4
- %.129 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %3, float* %.129, align 4
- %.231 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %5, float* %.231, align 4
- %.333 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %7, float* %.333, align 4
- %.120.0 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %9, float* %.120.0, align 4
- %.120.1 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %11, float* %.120.1, align 4
- %.120.2 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %13, float* %.120.2, align 4
- %.120.3 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %15, float* %.120.3, align 4
- %.213.0 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %.213.0, align 4
- %.213.1 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %.213.1, align 4
- %.213.2 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %.213.2, align 4
- %.213.3 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %23, float* %.213.3, align 4
- %.3 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 3 ; [#uses=1]
- store i32 %partId, i32* %.3, align 4
- %.4 = getelementptr inbounds %struct.btTriangle* %50, i32 %48, i32 4 ; [#uses=1]
- store i32 %triangleIndex, i32* %.4, align 4
- %.pre9.i = load i32* %24, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI10btTriangleE9push_backERKS0_.exit
-
-_ZN20btAlignedObjectArrayI10btTriangleE9push_backERKS0_.exit: ; preds = %bb2.i, %bb1.i
- %53 = phi i32 [ %48, %bb1.i ], [ %.pre9.i, %bb2.i ] ; [#uses=1]
- %54 = add nsw i32 %53, 1 ; [#uses=1]
- store i32 %54, i32* %24, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btTriangleBufferD0Ev(%struct.btTriangleBuffer* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV16btTriangleBuffer, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btTriangle** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btTriangle* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btTriangle* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTriangle* null, %struct.btTriangle** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btTriangle* null, %struct.btTriangle** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %10)
- %11 = bitcast %struct.btTriangleBuffer* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %11) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btTriangleBufferD1Ev(%struct.btTriangleBuffer* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV16btTriangleBuffer, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btTriangle** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btTriangle* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btTriangle* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTriangle* null, %struct.btTriangle** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btTriangle* null, %struct.btTriangle** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btTriangleBuffer* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=75]
-define void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV18btTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btInternalTriangleIndexCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV31btInternalTriangleIndexCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN31btInternalTriangleIndexCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV31btInternalTriangleIndexCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=44]
-define void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV31btInternalTriangleIndexCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btTriangleCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV18btTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btTriangleCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV18btTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN26btTriangleIndexVertexArrayC2EiPiiiPfi(%struct.btTriangleIndexVertexArray* %this, i32 %numTriangles, i32* %triangleIndexBase, i32 %triangleIndexStride, i32 %numVertices, float* %vertexBase, i32 %vertexStride) align 2 {
-bb.i.i:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV26btTriangleIndexVertexArray, i32 0, i32 2), i32 (...)*** %0, align 4
- %5 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 3 ; [#uses=6]
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %6, align 4
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = bitcast i32* %triangleIndexBase to i8* ; [#uses=1]
- %11 = bitcast float* %vertexBase to i8* ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI13btIndexedMeshE7reserveEi(%struct.IndexedMeshArray* %12, i32 1) inlinehint
- to label %return unwind label %lpad12
-
-invcont7: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr13)
- unreachable
-
-return: ; preds = %bb.i.i
- %.pre.i.i = load i32* %7, align 4 ; [#uses=8]
- %.pre = load %struct.btIndexedMesh** %6, align 4 ; [#uses=8]
- %13 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 0 ; [#uses=1]
- store i32 %numTriangles, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 1 ; [#uses=1]
- store i8* %10, i8** %14, align 4
- %15 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 2 ; [#uses=1]
- store i32 %triangleIndexStride, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 3 ; [#uses=1]
- store i32 %numVertices, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 4 ; [#uses=1]
- store i8* %11, i8** %17, align 4
- %18 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 5 ; [#uses=1]
- store i32 %vertexStride, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 6 ; [#uses=1]
- store i32 2, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i.i, i32 7 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = load i32* %7, align 4 ; [#uses=2]
- %22 = add nsw i32 %21, 1 ; [#uses=1]
- store i32 %22, i32* %7, align 4
- %23 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btIndexedMesh* %23, i32 %21, i32 6 ; [#uses=1]
- store i32 2, i32* %24, align 4
- ret void
-
-lpad12: ; preds = %bb.i.i
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %25 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=2]
- %26 = icmp eq %struct.btIndexedMesh* %25, null ; [#uses=1]
- br i1 %26, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad12
- %27 = load i8* %5, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %28 = bitcast %struct.btIndexedMesh* %25 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %28)
- to label %bb2.i.i.i unwind label %lpad16
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %6, align 4
- br label %ppad
-
-lpad16: ; preds = %bb1.i.i.i
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad20: ; preds = %ppad
- %eh_ptr21 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select23 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad12
- store i8 1, i8* %5, align 4
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %6, align 4
- store i32 0, i32* %7, align 4
- store i32 0, i32* %8, align 4
- %29 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* %29)
- to label %invcont7 unwind label %lpad20
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26btTriangleIndexVertexArray16unLockVertexBaseEi(%struct.btTriangleIndexVertexArray* nocapture %this, i32 %subpart) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK26btTriangleIndexVertexArray24unLockReadOnlyVertexBaseEi(%struct.btTriangleIndexVertexArray* nocapture %this, i32 %subpart) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26btTriangleIndexVertexArray19preallocateVerticesEi(%struct.btTriangleIndexVertexArray* nocapture %this, i32 %numverts) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN26btTriangleIndexVertexArray18preallocateIndicesEi(%struct.btTriangleIndexVertexArray* nocapture %this, i32 %numindices) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZNK26btTriangleIndexVertexArray14hasPremadeAabbEv(%struct.btTriangleIndexVertexArray* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 1 ; [#uses=1]
- %retval12 = zext i1 %2 to i8 ; [#uses=1]
- ret i8 %retval12
-}
-
-; [#uses=1]
-define void @_ZNK26btTriangleIndexVertexArray14setPremadeAabbERK9btVector3S2_(%struct.btTriangleIndexVertexArray* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 3 ; [#uses=1]
- store i32 1, i32* %24, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK26btTriangleIndexVertexArray14getPremadeAabbEP9btVector3S1_(%struct.btTriangleIndexVertexArray* nocapture %this, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK26btTriangleIndexVertexArray14getNumSubPartsEv(%struct.btTriangleIndexVertexArray* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define void @_ZN26btTriangleIndexVertexArray24getLockedVertexIndexBaseEPPhRiR14PHY_ScalarTypeS2_S1_S2_S2_S4_i(%struct.btTriangleIndexVertexArray* nocapture %this, i8** nocapture %vertexbase, i32* nocapture %numverts, i32* nocapture %type, i32* nocapture %vertexStride, i8** nocapture %indexbase, i32* nocapture %indexstride, i32* nocapture %numfaces, i32* nocapture %indicestype, i32 %subpart) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btIndexedMesh** %0, align 4 ; [#uses=8]
- %2 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 3 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %numverts, align 4
- %4 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 4 ; [#uses=1]
- %5 = load i8** %4, align 4 ; [#uses=1]
- store i8* %5, i8** %vertexbase, align 4
- %6 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 7 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- store i32 %7, i32* %type, align 4
- %8 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 5 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- store i32 %9, i32* %vertexStride, align 4
- %10 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 0 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- store i32 %11, i32* %numfaces, align 4
- %12 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 1 ; [#uses=1]
- %13 = load i8** %12, align 4 ; [#uses=1]
- store i8* %13, i8** %indexbase, align 4
- %14 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 2 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=1]
- store i32 %15, i32* %indexstride, align 4
- %16 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 6 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- store i32 %17, i32* %indicestype, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK26btTriangleIndexVertexArray32getLockedReadOnlyVertexIndexBaseEPPKhRiR14PHY_ScalarTypeS3_S2_S3_S3_S5_i(%struct.btTriangleIndexVertexArray* nocapture %this, i8** nocapture %vertexbase, i32* nocapture %numverts, i32* nocapture %type, i32* nocapture %vertexStride, i8** nocapture %indexbase, i32* nocapture %indexstride, i32* nocapture %numfaces, i32* nocapture %indicestype, i32 %subpart) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btIndexedMesh** %0, align 4 ; [#uses=8]
- %2 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 3 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %numverts, align 4
- %4 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 4 ; [#uses=1]
- %5 = load i8** %4, align 4 ; [#uses=1]
- store i8* %5, i8** %vertexbase, align 4
- %6 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 7 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- store i32 %7, i32* %type, align 4
- %8 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 5 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- store i32 %9, i32* %vertexStride, align 4
- %10 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 0 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- store i32 %11, i32* %numfaces, align 4
- %12 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 1 ; [#uses=1]
- %13 = load i8** %12, align 4 ; [#uses=1]
- store i8* %13, i8** %indexbase, align 4
- %14 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 2 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=1]
- store i32 %15, i32* %indexstride, align 4
- %16 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 %subpart, i32 6 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- store i32 %17, i32* %indicestype, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN26btTriangleIndexVertexArrayD0Ev(%struct.btTriangleIndexVertexArray* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV26btTriangleIndexVertexArray, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btIndexedMesh** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btIndexedMesh* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btIndexedMesh* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* %10)
- %11 = bitcast %struct.btTriangleIndexVertexArray* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN26btTriangleIndexVertexArrayD1Ev(%struct.btTriangleIndexVertexArray* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV26btTriangleIndexVertexArray, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btIndexedMesh** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btIndexedMesh* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btIndexedMesh* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=10]
-define void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV26btTriangleIndexVertexArray, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btIndexedMesh** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btIndexedMesh* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btIndexedMesh* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btTriangleIndexVertexArray* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btStridingMeshInterfaceD2Ev(%struct.btStridingMeshInterface* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI13btIndexedMeshE7reserveEi(%struct.IndexedMeshArray* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.IndexedMeshArray* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI13btIndexedMeshE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = shl i32 %_Count, 5 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.btIndexedMesh* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI13btIndexedMeshE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI13btIndexedMeshE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.btIndexedMesh* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=9]
- %7 = getelementptr inbounds %struct.IndexedMeshArray* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI13btIndexedMeshE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI13btIndexedMeshE8allocateEi.exit
- %10 = getelementptr inbounds %struct.IndexedMeshArray* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb.i4, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb.i4 ] ; [#uses=17]
- %scevgep1314.i = getelementptr inbounds %struct.btIndexedMesh* %6, i32 %indvar.i, i32 0 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.btIndexedMesh* %6, i32 %indvar.i, i32 1 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.btIndexedMesh* %6, i32 %indvar.i, i32 2 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.btIndexedMesh* %6, i32 %indvar.i, i32 3 ; [#uses=1]
- %scevgep18.i = getelementptr %struct.btIndexedMesh* %6, i32 %indvar.i, i32 4 ; [#uses=1]
- %scevgep19.i = getelementptr %struct.btIndexedMesh* %6, i32 %indvar.i, i32 5 ; [#uses=1]
- %scevgep20.i = getelementptr %struct.btIndexedMesh* %6, i32 %indvar.i, i32 6 ; [#uses=1]
- %scevgep21.i = getelementptr %struct.btIndexedMesh* %6, i32 %indvar.i, i32 7 ; [#uses=1]
- %11 = load %struct.btIndexedMesh** %10, align 4 ; [#uses=8]
- %scevgep5.i = getelementptr inbounds %struct.btIndexedMesh* %11, i32 %indvar.i, i32 0 ; [#uses=1]
- %12 = load i32* %scevgep5.i, align 4 ; [#uses=1]
- store i32 %12, i32* %scevgep1314.i, align 4
- %scevgep6.i = getelementptr %struct.btIndexedMesh* %11, i32 %indvar.i, i32 1 ; [#uses=1]
- %13 = load i8** %scevgep6.i, align 4 ; [#uses=1]
- store i8* %13, i8** %scevgep15.i, align 4
- %scevgep7.i = getelementptr %struct.btIndexedMesh* %11, i32 %indvar.i, i32 2 ; [#uses=1]
- %14 = load i32* %scevgep7.i, align 4 ; [#uses=1]
- store i32 %14, i32* %scevgep16.i, align 4
- %scevgep8.i = getelementptr %struct.btIndexedMesh* %11, i32 %indvar.i, i32 3 ; [#uses=1]
- %15 = load i32* %scevgep8.i, align 4 ; [#uses=1]
- store i32 %15, i32* %scevgep17.i, align 4
- %scevgep9.i = getelementptr %struct.btIndexedMesh* %11, i32 %indvar.i, i32 4 ; [#uses=1]
- %16 = load i8** %scevgep9.i, align 4 ; [#uses=1]
- store i8* %16, i8** %scevgep18.i, align 4
- %scevgep10.i = getelementptr %struct.btIndexedMesh* %11, i32 %indvar.i, i32 5 ; [#uses=1]
- %17 = load i32* %scevgep10.i, align 4 ; [#uses=1]
- store i32 %17, i32* %scevgep19.i, align 4
- %scevgep11.i = getelementptr %struct.btIndexedMesh* %11, i32 %indvar.i, i32 6 ; [#uses=1]
- %18 = load i32* %scevgep11.i, align 4 ; [#uses=1]
- store i32 %18, i32* %scevgep20.i, align 4
- %scevgep12.i = getelementptr %struct.btIndexedMesh* %11, i32 %indvar.i, i32 7 ; [#uses=1]
- %19 = load i32* %scevgep12.i, align 4 ; [#uses=1]
- store i32 %19, i32* %scevgep21.i, align 4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI13btIndexedMeshE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI13btIndexedMeshE4copyEiiPS0_.exit: ; preds = %bb.i4, %_ZN20btAlignedObjectArrayI13btIndexedMeshE8allocateEi.exit
- %20 = getelementptr inbounds %struct.IndexedMeshArray* %this, i32 0, i32 3 ; [#uses=3]
- %21 = load %struct.btIndexedMesh** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btIndexedMesh* %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayI13btIndexedMeshE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI13btIndexedMeshE4copyEiiPS0_.exit
- %23 = getelementptr inbounds %struct.IndexedMeshArray* %this, i32 0, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %25 = bitcast %struct.btIndexedMesh* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %25)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %20, align 4
- br label %_ZN20btAlignedObjectArrayI13btIndexedMeshE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI13btIndexedMeshE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI13btIndexedMeshE4copyEiiPS0_.exit
- %26 = getelementptr inbounds %struct.IndexedMeshArray* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.btIndexedMesh* %6, %struct.btIndexedMesh** %20, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN26btTriangleIndexVertexArrayC1EiPiiiPfi(%struct.btTriangleIndexVertexArray* %this, i32 %numTriangles, i32* %triangleIndexBase, i32 %triangleIndexStride, i32 %numVertices, float* %vertexBase, i32 %vertexStride) align 2 {
-entry:
- tail call void @_ZN26btTriangleIndexVertexArrayC2EiPiiiPfi(%struct.btTriangleIndexVertexArray* %this, i32 %numTriangles, i32* %triangleIndexBase, i32 %triangleIndexStride, i32 %numVertices, float* %vertexBase, i32 %vertexStride)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN34btTriangleIndexVertexMaterialArrayC2EiPiiiPfiiPhiS0_i(%struct.btTriangleIndexVertexMaterialArray* %this, i32 %numTriangles, i32* %triangleIndexBase, i32 %triangleIndexStride, i32 %numVertices, float* %vertexBase, i32 %vertexStride, i32 %numMaterials, i8* %materialBase, i32 %materialStride, i32* %triangleMaterialsBase, i32 %materialIndexStride) align 2 {
-bb.i.i:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN26btTriangleIndexVertexArrayC2EiPiiiPfi(%struct.btTriangleIndexVertexArray* %0, i32 %numTriangles, i32* %triangleIndexBase, i32 %triangleIndexStride, i32 %numVertices, float* %vertexBase, i32 %vertexStride)
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV34btTriangleIndexVertexMaterialArray, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 3 ; [#uses=6]
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %3, align 4
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = bitcast i32* %triangleMaterialsBase to i8* ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI20btMaterialPropertiesE7reserveEi(%struct.MaterialArray* %7, i32 1) inlinehint
- to label %bb1.i.i unwind label %lpad12
-
-bb1.i.i: ; preds = %bb.i.i
- %.pre.i.i = load i32* %4, align 4 ; [#uses=10]
- %.pre = load %struct.btMaterialProperties** %3, align 4 ; [#uses=10]
- %8 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i ; [#uses=1]
- %9 = icmp eq %struct.btMaterialProperties* %8, null ; [#uses=1]
- br i1 %9, label %return, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i
- %10 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 0 ; [#uses=1]
- store i32 %numMaterials, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 1 ; [#uses=1]
- store i8* %materialBase, i8** %11, align 4
- %12 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 2 ; [#uses=1]
- store i32 %materialStride, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 3 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 4 ; [#uses=1]
- store i32 %numTriangles, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 5 ; [#uses=1]
- store i8* %6, i8** %15, align 4
- %16 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 6 ; [#uses=1]
- store i32 %materialIndexStride, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btMaterialProperties* %.pre, i32 %.pre.i.i, i32 7 ; [#uses=1]
- store i32 2, i32* %17, align 4
- %.pre5.i.i = load i32* %4, align 4 ; [#uses=1]
- %.pre.i = load %struct.btMaterialProperties** %3, align 4 ; [#uses=1]
- br label %return
-
-invcont7: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr13)
- unreachable
-
-return: ; preds = %bb2.i.i, %bb1.i.i
- %18 = phi %struct.btMaterialProperties* [ %.pre, %bb1.i.i ], [ %.pre.i, %bb2.i.i ] ; [#uses=1]
- %19 = phi i32 [ %.pre.i.i, %bb1.i.i ], [ %.pre5.i.i, %bb2.i.i ] ; [#uses=2]
- %20 = add nsw i32 %19, 1 ; [#uses=1]
- store i32 %20, i32* %4, align 4
- %21 = getelementptr inbounds %struct.btMaterialProperties* %18, i32 %19, i32 7 ; [#uses=1]
- store i32 2, i32* %21, align 4
- ret void
-
-lpad12: ; preds = %bb.i.i
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %22 = load %struct.btMaterialProperties** %3, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btMaterialProperties* %22, null ; [#uses=1]
- br i1 %23, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad12
- %24 = load i8* %2, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %25 = bitcast %struct.btMaterialProperties* %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i unwind label %lpad16
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %3, align 4
- br label %ppad
-
-lpad16: ; preds = %bb1.i.i.i
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad20: ; preds = %ppad
- %eh_ptr21 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select23 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad12
- store i8 1, i8* %2, align 4
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %3, align 4
- store i32 0, i32* %4, align 4
- store i32 0, i32* %5, align 4
- invoke void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %0)
- to label %invcont7 unwind label %lpad20
-}
-
-; [#uses=1]
-define void @_ZN34btTriangleIndexVertexMaterialArray29getLockedReadOnlyMaterialBaseEPPKhRiR14PHY_ScalarTypeS3_S2_S3_S3_S5_i(%struct.btTriangleIndexVertexMaterialArray* nocapture %this, i8** nocapture %materialBase, i32* nocapture %numMaterials, i32* nocapture %materialType, i32* nocapture %materialStride, i8** nocapture %triangleMaterialBase, i32* nocapture %numTriangles, i32* nocapture %triangleMaterialStride, i32* nocapture %triangleType, i32 %subpart) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btMaterialProperties** %0, align 4 ; [#uses=7]
- %2 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 0 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %numMaterials, align 4
- %4 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 1 ; [#uses=1]
- %5 = load i8** %4, align 4 ; [#uses=1]
- store i8* %5, i8** %materialBase, align 4
- store i32 0, i32* %materialType, align 4
- %6 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 2 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- store i32 %7, i32* %materialStride, align 4
- %8 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 4 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- store i32 %9, i32* %numTriangles, align 4
- %10 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 5 ; [#uses=1]
- %11 = load i8** %10, align 4 ; [#uses=1]
- store i8* %11, i8** %triangleMaterialBase, align 4
- %12 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 6 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- store i32 %13, i32* %triangleMaterialStride, align 4
- %14 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 7 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=1]
- store i32 %15, i32* %triangleType, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN34btTriangleIndexVertexMaterialArray21getLockedMaterialBaseEPPhRiR14PHY_ScalarTypeS2_S1_S2_S2_S4_i(%struct.btTriangleIndexVertexMaterialArray* nocapture %this, i8** nocapture %materialBase, i32* nocapture %numMaterials, i32* nocapture %materialType, i32* nocapture %materialStride, i8** nocapture %triangleMaterialBase, i32* nocapture %numTriangles, i32* nocapture %triangleMaterialStride, i32* nocapture %triangleType, i32 %subpart) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btMaterialProperties** %0, align 4 ; [#uses=7]
- %2 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 0 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- store i32 %3, i32* %numMaterials, align 4
- %4 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 1 ; [#uses=1]
- %5 = load i8** %4, align 4 ; [#uses=1]
- store i8* %5, i8** %materialBase, align 4
- store i32 0, i32* %materialType, align 4
- %6 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 2 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- store i32 %7, i32* %materialStride, align 4
- %8 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 4 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- store i32 %9, i32* %numTriangles, align 4
- %10 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 5 ; [#uses=1]
- %11 = load i8** %10, align 4 ; [#uses=1]
- store i8* %11, i8** %triangleMaterialBase, align 4
- %12 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 6 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- store i32 %13, i32* %triangleMaterialStride, align 4
- %14 = getelementptr inbounds %struct.btMaterialProperties* %1, i32 %subpart, i32 7 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=1]
- store i32 %15, i32* %triangleType, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btTriangleIndexVertexMaterialArrayD0Ev(%struct.btTriangleIndexVertexMaterialArray* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV34btTriangleIndexVertexMaterialArray, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btMaterialProperties** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btMaterialProperties* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btMaterialProperties* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %10)
- %11 = bitcast %struct.btTriangleIndexVertexMaterialArray* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btTriangleIndexVertexMaterialArrayD1Ev(%struct.btTriangleIndexVertexMaterialArray* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([19 x i32 (...)*]* @_ZTV34btTriangleIndexVertexMaterialArray, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %2 = load %struct.btMaterialProperties** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btMaterialProperties* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btMaterialProperties* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btTriangleIndexVertexMaterialArray* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI20btMaterialPropertiesE7reserveEi(%struct.MaterialArray* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.MaterialArray* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI20btMaterialPropertiesE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = shl i32 %_Count, 5 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.btMaterialProperties* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI20btMaterialPropertiesE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI20btMaterialPropertiesE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.btMaterialProperties* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=10]
- %7 = getelementptr inbounds %struct.MaterialArray* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI20btMaterialPropertiesE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI20btMaterialPropertiesE8allocateEi.exit
- %10 = getelementptr inbounds %struct.MaterialArray* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb3.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=18]
- %scevgep.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i ; [#uses=1]
- %11 = icmp eq %struct.btMaterialProperties* %scevgep.i, null ; [#uses=1]
- br i1 %11, label %bb3.i, label %bb1.i5
-
-bb1.i5: ; preds = %bb.i4
- %scevgep18.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i, i32 1 ; [#uses=1]
- %scevgep19.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i, i32 2 ; [#uses=1]
- %scevgep20.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i, i32 3 ; [#uses=1]
- %scevgep21.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i, i32 4 ; [#uses=1]
- %scevgep22.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i, i32 5 ; [#uses=1]
- %scevgep23.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i, i32 6 ; [#uses=1]
- %scevgep24.i = getelementptr %struct.btMaterialProperties* %6, i32 %indvar.i, i32 7 ; [#uses=1]
- %scevgep17.i = getelementptr inbounds %struct.btMaterialProperties* %6, i32 %indvar.i, i32 0 ; [#uses=1]
- %12 = load %struct.btMaterialProperties** %10, align 4 ; [#uses=8]
- %scevgep89.i = getelementptr inbounds %struct.btMaterialProperties* %12, i32 %indvar.i, i32 0 ; [#uses=1]
- %13 = load i32* %scevgep89.i, align 4 ; [#uses=1]
- store i32 %13, i32* %scevgep17.i, align 4
- %scevgep10.i = getelementptr %struct.btMaterialProperties* %12, i32 %indvar.i, i32 1 ; [#uses=1]
- %14 = load i8** %scevgep10.i, align 4 ; [#uses=1]
- store i8* %14, i8** %scevgep18.i, align 4
- %scevgep11.i = getelementptr %struct.btMaterialProperties* %12, i32 %indvar.i, i32 2 ; [#uses=1]
- %15 = load i32* %scevgep11.i, align 4 ; [#uses=1]
- store i32 %15, i32* %scevgep19.i, align 4
- %scevgep12.i = getelementptr %struct.btMaterialProperties* %12, i32 %indvar.i, i32 3 ; [#uses=1]
- %16 = load i32* %scevgep12.i, align 4 ; [#uses=1]
- store i32 %16, i32* %scevgep20.i, align 4
- %scevgep13.i = getelementptr %struct.btMaterialProperties* %12, i32 %indvar.i, i32 4 ; [#uses=1]
- %17 = load i32* %scevgep13.i, align 4 ; [#uses=1]
- store i32 %17, i32* %scevgep21.i, align 4
- %scevgep14.i = getelementptr %struct.btMaterialProperties* %12, i32 %indvar.i, i32 5 ; [#uses=1]
- %18 = load i8** %scevgep14.i, align 4 ; [#uses=1]
- store i8* %18, i8** %scevgep22.i, align 4
- %scevgep15.i = getelementptr %struct.btMaterialProperties* %12, i32 %indvar.i, i32 6 ; [#uses=1]
- %19 = load i32* %scevgep15.i, align 4 ; [#uses=1]
- store i32 %19, i32* %scevgep23.i, align 4
- %scevgep16.i = getelementptr %struct.btMaterialProperties* %12, i32 %indvar.i, i32 7 ; [#uses=1]
- %20 = load i32* %scevgep16.i, align 4 ; [#uses=1]
- store i32 %20, i32* %scevgep24.i, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i5, %bb.i4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI20btMaterialPropertiesE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI20btMaterialPropertiesE4copyEiiPS0_.exit: ; preds = %bb3.i, %_ZN20btAlignedObjectArrayI20btMaterialPropertiesE8allocateEi.exit
- %21 = getelementptr inbounds %struct.MaterialArray* %this, i32 0, i32 3 ; [#uses=3]
- %22 = load %struct.btMaterialProperties** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btMaterialProperties* %22, null ; [#uses=1]
- br i1 %23, label %_ZN20btAlignedObjectArrayI20btMaterialPropertiesE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI20btMaterialPropertiesE4copyEiiPS0_.exit
- %24 = getelementptr inbounds %struct.MaterialArray* %this, i32 0, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %26 = bitcast %struct.btMaterialProperties* %22 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %26)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.btMaterialProperties* null, %struct.btMaterialProperties** %21, align 4
- br label %_ZN20btAlignedObjectArrayI20btMaterialPropertiesE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI20btMaterialPropertiesE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI20btMaterialPropertiesE4copyEiiPS0_.exit
- %27 = getelementptr inbounds %struct.MaterialArray* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btMaterialProperties* %6, %struct.btMaterialProperties** %21, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN34btTriangleIndexVertexMaterialArrayC1EiPiiiPfiiPhiS0_i(%struct.btTriangleIndexVertexMaterialArray* %this, i32 %numTriangles, i32* %triangleIndexBase, i32 %triangleIndexStride, i32 %numVertices, float* %vertexBase, i32 %vertexStride, i32 %numMaterials, i8* %materialBase, i32 %materialStride, i32* %triangleMaterialsBase, i32 %materialIndexStride) align 2 {
-entry:
- tail call void @_ZN34btTriangleIndexVertexMaterialArrayC2EiPiiiPfiiPhiS0_i(%struct.btTriangleIndexVertexMaterialArray* %this, i32 %numTriangles, i32* %triangleIndexBase, i32 %triangleIndexStride, i32 %numVertices, float* %vertexBase, i32 %vertexStride, i32 %numMaterials, i8* %materialBase, i32 %materialStride, i32* %triangleMaterialsBase, i32 %materialIndexStride)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN14btTriangleMeshC2Ebb(%struct.btTriangleMesh* %this, i8 zeroext %use32bitIndices, i8 zeroext %use4componentVertices) align 2 {
-bb.i:
- %0 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=14]
- store %struct.btIndexedMesh* null, %struct.btIndexedMesh** %6, align 4
- %7 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 1 ; [#uses=4]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %9, align 4
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV14btTriangleMesh, i32 0, i32 2), i32 (...)*** %0, align 4
- %10 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %10, align 4
- %11 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- store %struct.btQuadWord* null, %struct.btQuadWord** %11, align 4
- %12 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=3]
- store i8 1, i8* %14, align 4
- %15 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=4]
- store float* null, float** %15, align 4
- %16 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 1 ; [#uses=3]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=3]
- store i8 1, i8* %18, align 4
- %19 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=4]
- store i32* null, i32** %19, align 4
- %20 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 1 ; [#uses=3]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 2 ; [#uses=2]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 4 ; [#uses=3]
- store i8 1, i8* %22, align 4
- %23 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 3 ; [#uses=4]
- store i16* null, i16** %23, align 4
- %24 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 1 ; [#uses=3]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 0, i32* %25, align 4
- %26 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 5 ; [#uses=2]
- store i8 %use32bitIndices, i8* %26, align 4
- %27 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 6 ; [#uses=2]
- store i8 %use4componentVertices, i8* %27, align 1
- %28 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI13btIndexedMeshE7reserveEi(%struct.IndexedMeshArray* %29, i32 1) inlinehint
- to label %invcont4 unwind label %lpad48
-
-invcont4: ; preds = %bb.i
- %.pre.i = load i32* %7, align 4 ; [#uses=8]
- %.pre = load %struct.btIndexedMesh** %6, align 4 ; [#uses=8]
- %30 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 0 ; [#uses=1]
- store i32 0, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 1 ; [#uses=1]
- store i8* null, i8** %31, align 4
- %32 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 2 ; [#uses=1]
- store i32 12, i32* %32, align 4
- %33 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 3 ; [#uses=1]
- store i32 0, i32* %33, align 4
- %34 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 4 ; [#uses=1]
- store i8* null, i8** %34, align 4
- %35 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 5 ; [#uses=1]
- store i32 16, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 6 ; [#uses=1]
- store i32 2, i32* %36, align 4
- %37 = getelementptr inbounds %struct.btIndexedMesh* %.pre, i32 %.pre.i, i32 7 ; [#uses=1]
- store i32 0, i32* %37, align 4
- %38 = load i32* %7, align 4 ; [#uses=1]
- %39 = add nsw i32 %38, 1 ; [#uses=1]
- store i32 %39, i32* %7, align 4
- %40 = load i8* %26, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %40, 0 ; [#uses=1]
- %41 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=2]
- br i1 %toBool, label %bb5, label %bb
-
-bb: ; preds = %invcont4
- %42 = load i32* %20, align 4 ; [#uses=1]
- %43 = sdiv i32 %42, 3 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btIndexedMesh* %41, i32 0, i32 0 ; [#uses=1]
- store i32 %43, i32* %44, align 4
- %45 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btIndexedMesh* %45, i32 0, i32 1 ; [#uses=1]
- store i8* null, i8** %46, align 4
- %47 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btIndexedMesh* %47, i32 0, i32 6 ; [#uses=1]
- store i32 2, i32* %48, align 4
- %49 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btIndexedMesh* %49, i32 0, i32 2 ; [#uses=1]
- store i32 12, i32* %50, align 4
- br label %bb6
-
-bb5: ; preds = %invcont4
- %51 = load i32* %24, align 4 ; [#uses=1]
- %52 = sdiv i32 %51, 3 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btIndexedMesh* %41, i32 0, i32 0 ; [#uses=1]
- store i32 %52, i32* %53, align 4
- %54 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btIndexedMesh* %54, i32 0, i32 1 ; [#uses=1]
- store i8* null, i8** %55, align 4
- %56 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btIndexedMesh* %56, i32 0, i32 6 ; [#uses=1]
- store i32 3, i32* %57, align 4
- %58 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btIndexedMesh* %58, i32 0, i32 2 ; [#uses=1]
- store i32 6, i32* %59, align 4
- br label %bb6
-
-bb6: ; preds = %bb5, %bb
- %60 = load i8* %27, align 1 ; [#uses=1]
- %toBool7 = icmp eq i8 %60, 0 ; [#uses=1]
- %61 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=2]
- br i1 %toBool7, label %bb9, label %bb8
-
-bb8: ; preds = %bb6
- %62 = load i32* %12, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btIndexedMesh* %61, i32 0, i32 3 ; [#uses=1]
- store i32 %62, i32* %63, align 4
- %64 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btIndexedMesh* %64, i32 0, i32 4 ; [#uses=1]
- store i8* null, i8** %65, align 4
- %66 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btIndexedMesh* %66, i32 0, i32 5 ; [#uses=1]
- store i32 16, i32* %67, align 4
- ret void
-
-bb9: ; preds = %bb6
- %68 = load i32* %16, align 4 ; [#uses=1]
- %69 = sdiv i32 %68, 3 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btIndexedMesh* %61, i32 0, i32 3 ; [#uses=1]
- store i32 %69, i32* %70, align 4
- %71 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btIndexedMesh* %71, i32 0, i32 4 ; [#uses=1]
- store i8* null, i8** %72, align 4
- %73 = load %struct.btIndexedMesh** %6, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btIndexedMesh* %73, i32 0, i32 5 ; [#uses=1]
- store i32 12, i32* %74, align 4
- ret void
-
-invcont31: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr49)
- unreachable
-
-lpad48: ; preds = %bb.i
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %75 = load i16** %23, align 4 ; [#uses=2]
- %76 = icmp eq i16* %75, null ; [#uses=1]
- br i1 %76, label %ppad74, label %bb.i.i.i93
-
-bb.i.i.i93: ; preds = %lpad48
- %77 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i92 = icmp eq i8 %77, 0 ; [#uses=1]
- br i1 %toBool.i.i.i92, label %bb2.i.i.i95, label %bb1.i.i.i94
-
-bb1.i.i.i94: ; preds = %bb.i.i.i93
- %78 = bitcast i16* %75 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %78)
- to label %bb2.i.i.i95 unwind label %lpad52
-
-bb2.i.i.i95: ; preds = %bb1.i.i.i94, %bb.i.i.i93
- store i16* null, i16** %23, align 4
- br label %ppad74
-
-lpad52: ; preds = %bb1.i.i.i94
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad56: ; preds = %bb1.i.i.i
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %bb1.i.i.i84
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad64: ; preds = %bb1.i.i.i89
- %eh_ptr65 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select67 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr65, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad68: ; preds = %ppad
- %eh_ptr69 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select71 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr69, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i90, %ppad72
- store i8 1, i8* %10, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %11, align 4
- store i32 0, i32* %12, align 4
- store i32 0, i32* %13, align 4
- %79 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %79)
- to label %invcont31 unwind label %lpad68
-
-ppad72: ; preds = %bb2.i.i.i85, %ppad73
- store i8 1, i8* %14, align 4
- store float* null, float** %15, align 4
- store i32 0, i32* %16, align 4
- store i32 0, i32* %17, align 4
- %80 = load %struct.btQuadWord** %11, align 4 ; [#uses=2]
- %81 = icmp eq %struct.btQuadWord* %80, null ; [#uses=1]
- br i1 %81, label %ppad, label %bb.i.i.i88
-
-bb.i.i.i88: ; preds = %ppad72
- %82 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i.i.i87 = icmp eq i8 %82, 0 ; [#uses=1]
- br i1 %toBool.i.i.i87, label %bb2.i.i.i90, label %bb1.i.i.i89
-
-bb1.i.i.i89: ; preds = %bb.i.i.i88
- %83 = bitcast %struct.btQuadWord* %80 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %83)
- to label %bb2.i.i.i90 unwind label %lpad64
-
-bb2.i.i.i90: ; preds = %bb1.i.i.i89, %bb.i.i.i88
- store %struct.btQuadWord* null, %struct.btQuadWord** %11, align 4
- br label %ppad
-
-ppad73: ; preds = %bb2.i.i.i, %ppad74
- store i8 1, i8* %18, align 4
- store i32* null, i32** %19, align 4
- store i32 0, i32* %20, align 4
- store i32 0, i32* %21, align 4
- %84 = load float** %15, align 4 ; [#uses=2]
- %85 = icmp eq float* %84, null ; [#uses=1]
- br i1 %85, label %ppad72, label %bb.i.i.i83
-
-bb.i.i.i83: ; preds = %ppad73
- %86 = load i8* %14, align 4 ; [#uses=1]
- %toBool.i.i.i82 = icmp eq i8 %86, 0 ; [#uses=1]
- br i1 %toBool.i.i.i82, label %bb2.i.i.i85, label %bb1.i.i.i84
-
-bb1.i.i.i84: ; preds = %bb.i.i.i83
- %87 = bitcast float* %84 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %87)
- to label %bb2.i.i.i85 unwind label %lpad60
-
-bb2.i.i.i85: ; preds = %bb1.i.i.i84, %bb.i.i.i83
- store float* null, float** %15, align 4
- br label %ppad72
-
-ppad74: ; preds = %bb2.i.i.i95, %lpad48
- store i8 1, i8* %22, align 4
- store i16* null, i16** %23, align 4
- store i32 0, i32* %24, align 4
- store i32 0, i32* %25, align 4
- %88 = load i32** %19, align 4 ; [#uses=2]
- %89 = icmp eq i32* %88, null ; [#uses=1]
- br i1 %89, label %ppad73, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad74
- %90 = load i8* %18, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %90, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %91 = bitcast i32* %88 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %91)
- to label %bb2.i.i.i unwind label %lpad56
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %19, align 4
- br label %ppad73
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btTriangleMesh19preallocateVerticesEi(%struct.btTriangleMesh* nocapture %this, i32 %numverts) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btTriangleMesh18preallocateIndicesEi(%struct.btTriangleMesh* nocapture %this, i32 %numindices) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZNK14btTriangleMesh15getNumTrianglesEv(%struct.btTriangleMesh* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- br label %bb2
-
-bb1: ; preds = %entry
- %3 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %.0.in.in = phi i32* [ %2, %bb ], [ %3, %bb1 ] ; [#uses=1]
- %.0.in = load i32* %.0.in.in, align 4 ; [#uses=1]
- %.0 = sdiv i32 %.0.in, 3 ; [#uses=1]
- ret i32 %.0
-}
-
-; [#uses=3]
-define i32 @_ZN14btTriangleMesh15findOrAddVertexERK9btVector3b(%struct.btTriangleMesh* %this, %struct.btQuadWord* nocapture %vertex, i8 zeroext %removeDuplicateVertices) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %toBool1 = icmp ne i8 %removeDuplicateVertices, 0 ; [#uses=2]
- br i1 %toBool, label %bb10, label %bb
-
-bb: ; preds = %entry
- br i1 %toBool1, label %bb7.preheader, label %bb9
-
-bb7.preheader: ; preds = %bb
- %2 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 7 ; [#uses=1]
- br label %bb7
-
-bb3: ; preds = %bb7
- %9 = load %struct.btQuadWord** %4, align 4 ; [#uses=3]
- %scevgep92 = getelementptr %struct.btQuadWord* %9, i32 %27, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %scevgep92, align 4 ; [#uses=1]
- %11 = load float* %5, align 4 ; [#uses=1]
- %12 = fsub float %10, %11 ; [#uses=2]
- %scevgep91 = getelementptr %struct.btQuadWord* %9, i32 %27, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %scevgep91, align 4 ; [#uses=1]
- %14 = load float* %6, align 4 ; [#uses=1]
- %15 = fsub float %13, %14 ; [#uses=2]
- %scevgep90 = getelementptr inbounds %struct.btQuadWord* %9, i32 %27, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %scevgep90, align 4 ; [#uses=1]
- %17 = load float* %7, align 4 ; [#uses=1]
- %18 = fsub float %16, %17 ; [#uses=2]
- %19 = fmul float %18, %18 ; [#uses=1]
- %20 = fmul float %15, %15 ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=1]
- %22 = fmul float %12, %12 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = load float* %8, align 4 ; [#uses=1]
- %25 = fcmp ugt float %23, %24 ; [#uses=1]
- br i1 %25, label %bb6, label %bb21
-
-bb6: ; preds = %bb3
- %26 = add nsw i32 %27, 1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb7.preheader
- %27 = phi i32 [ %26, %bb6 ], [ 0, %bb7.preheader ] ; [#uses=6]
- %28 = icmp sgt i32 %3, %27 ; [#uses=1]
- br i1 %28, label %bb3, label %bb9
-
-bb9: ; preds = %bb7, %bb
- %29 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=2]
- %30 = load %struct.btIndexedMesh** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btIndexedMesh* %30, i32 0, i32 3 ; [#uses=2]
- %32 = load i32* %31, align 4 ; [#uses=1]
- %33 = add nsw i32 %32, 1 ; [#uses=1]
- store i32 %33, i32* %31, align 4
- %34 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI9btVector3E9push_backERKS0_(%"struct.btAlignedObjectArray<btVector3>"* %34, %struct.btQuadWord* %vertex) inlinehint
- %35 = load %struct.btIndexedMesh** %29, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %37 = load %struct.btQuadWord** %36, align 4 ; [#uses=1]
- %38 = bitcast %struct.btQuadWord* %37 to i8* ; [#uses=1]
- %39 = getelementptr inbounds %struct.btIndexedMesh* %35, i32 0, i32 4 ; [#uses=1]
- store i8* %38, i8** %39, align 4
- %40 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=1]
- %42 = add nsw i32 %41, -1 ; [#uses=1]
- ret i32 %42
-
-bb10: ; preds = %entry
- %43 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 1 ; [#uses=2]
- %44 = load i32* %43, align 4 ; [#uses=3]
- br i1 %toBool1, label %bb18.preheader, label %bb20
-
-bb18.preheader: ; preds = %bb10
- %45 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 7 ; [#uses=1]
- br label %bb18
-
-bb14: ; preds = %bb18
- %tmp103 = add i32 %i13.0, 2 ; [#uses=1]
- %tmp = add i32 %i13.0, 1 ; [#uses=1]
- %50 = load float** %45, align 4 ; [#uses=3]
- %scevgep105 = getelementptr float* %50, i32 %i13.0 ; [#uses=1]
- %51 = load float* %scevgep105, align 4 ; [#uses=1]
- %scevgep102 = getelementptr float* %50, i32 %tmp ; [#uses=1]
- %52 = load float* %scevgep102, align 4 ; [#uses=1]
- %scevgep104 = getelementptr float* %50, i32 %tmp103 ; [#uses=1]
- %53 = load float* %scevgep104, align 4 ; [#uses=1]
- %54 = load float* %46, align 4 ; [#uses=1]
- %55 = fsub float %53, %54 ; [#uses=2]
- %56 = load float* %47, align 4 ; [#uses=1]
- %57 = fsub float %52, %56 ; [#uses=2]
- %58 = load float* %48, align 4 ; [#uses=1]
- %59 = fsub float %51, %58 ; [#uses=2]
- %60 = fmul float %59, %59 ; [#uses=1]
- %61 = fmul float %57, %57 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %55, %55 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = load float* %49, align 4 ; [#uses=1]
- %66 = fcmp ugt float %64, %65 ; [#uses=1]
- br i1 %66, label %bb17, label %bb16
-
-bb16: ; preds = %bb14
- %67 = sdiv i32 %i13.0, 3 ; [#uses=1]
- ret i32 %67
-
-bb17: ; preds = %bb14
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb18
-
-bb18: ; preds = %bb17, %bb18.preheader
- %indvar = phi i32 [ 0, %bb18.preheader ], [ %indvar.next, %bb17 ] ; [#uses=2]
- %i13.0 = mul i32 %indvar, 3 ; [#uses=5]
- %68 = icmp sgt i32 %44, %i13.0 ; [#uses=1]
- br i1 %68, label %bb14, label %bb20.loopexit
-
-bb20.loopexit: ; preds = %bb18
- %.pre108 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb20.loopexit, %bb10
- %.pre-phi = phi i32* [ %.pre108, %bb20.loopexit ], [ %43, %bb10 ] ; [#uses=13]
- %69 = phi i32 [ %44, %bb20.loopexit ], [ %44, %bb10 ] ; [#uses=6]
- %70 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 2 ; [#uses=6]
- %73 = load i32* %72, align 4 ; [#uses=4]
- %74 = icmp eq i32 %73, %69 ; [#uses=1]
- br i1 %74, label %bb.i51, label %bb1.i73
-
-bb.i51: ; preds = %bb20
- %75 = icmp eq i32 %69, 0 ; [#uses=1]
- %76 = shl i32 %69, 1 ; [#uses=1]
- %iftmp.138.0.i.i50 = select i1 %75, i32 1, i32 %76 ; [#uses=5]
- %77 = icmp slt i32 %73, %iftmp.138.0.i.i50 ; [#uses=1]
- br i1 %77, label %bb.i.i52, label %bb1.i73
-
-bb.i.i52: ; preds = %bb.i51
- %78 = icmp eq i32 %iftmp.138.0.i.i50, 0 ; [#uses=1]
- br i1 %78, label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i56, label %bb.i2.i.i55
-
-bb.i2.i.i55: ; preds = %bb.i.i52
- %79 = shl i32 %iftmp.138.0.i.i50, 2 ; [#uses=1]
- %80 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %79, i32 16) ; [#uses=1]
- %phitmp.i.i53 = bitcast i8* %80 to float* ; [#uses=1]
- %.pre.i54 = load i32* %.pre-phi, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i56
-
-_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i56: ; preds = %bb.i2.i.i55, %bb.i.i52
- %81 = phi i32 [ %.pre.i54, %bb.i2.i.i55 ], [ %69, %bb.i.i52 ] ; [#uses=2]
- %82 = phi float* [ %phitmp.i.i53, %bb.i2.i.i55 ], [ null, %bb.i.i52 ] ; [#uses=2]
- %83 = icmp sgt i32 %81, 0 ; [#uses=1]
- br i1 %83, label %bb.nph.i.i.i57, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i66
-
-bb.nph.i.i.i57: ; preds = %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i56
- %84 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- br label %bb.i4.i.i60
-
-bb.i4.i.i60: ; preds = %bb3.i.i.i65, %bb.nph.i.i.i57
- %indvar.i.i.i58 = phi i32 [ 0, %bb.nph.i.i.i57 ], [ %indvar.next.i.i.i63, %bb3.i.i.i65 ] ; [#uses=3]
- %scevgep.i.i.i59 = getelementptr float* %82, i32 %indvar.i.i.i58 ; [#uses=2]
- %85 = icmp eq float* %scevgep.i.i.i59, null ; [#uses=1]
- br i1 %85, label %bb3.i.i.i65, label %bb1.i5.i.i62
-
-bb1.i5.i.i62: ; preds = %bb.i4.i.i60
- %86 = load float** %84, align 4 ; [#uses=1]
- %scevgep8.i.i.i61 = getelementptr float* %86, i32 %indvar.i.i.i58 ; [#uses=1]
- %87 = load float* %scevgep8.i.i.i61, align 4 ; [#uses=1]
- store float %87, float* %scevgep.i.i.i59, align 4
- br label %bb3.i.i.i65
-
-bb3.i.i.i65: ; preds = %bb1.i5.i.i62, %bb.i4.i.i60
- %indvar.next.i.i.i63 = add i32 %indvar.i.i.i58, 1 ; [#uses=2]
- %exitcond98 = icmp eq i32 %indvar.next.i.i.i63, %81 ; [#uses=1]
- br i1 %exitcond98, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i66, label %bb.i4.i.i60
-
-_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i66: ; preds = %bb3.i.i.i65, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i56
- %88 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %89 = load float** %88, align 4 ; [#uses=2]
- %90 = icmp eq float* %89, null ; [#uses=1]
- br i1 %90, label %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i72, label %bb.i.i.i68
-
-bb.i.i.i68: ; preds = %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i66
- %91 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %92 = load i8* %91, align 4 ; [#uses=1]
- %toBool.i.i.i67 = icmp eq i8 %92, 0 ; [#uses=1]
- br i1 %toBool.i.i.i67, label %bb2.i.i.i70, label %bb1.i.i.i69
-
-bb1.i.i.i69: ; preds = %bb.i.i.i68
- %93 = bitcast float* %89 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %93)
- br label %bb2.i.i.i70
-
-bb2.i.i.i70: ; preds = %bb1.i.i.i69, %bb.i.i.i68
- store float* null, float** %88, align 4
- br label %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i72
-
-_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i72: ; preds = %bb2.i.i.i70, %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i66
- %94 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %94, align 4
- store float* %82, float** %88, align 4
- store i32 %iftmp.138.0.i.i50, i32* %72, align 4
- %.pre5.i71 = load i32* %.pre-phi, align 4 ; [#uses=1]
- br label %bb1.i73
-
-bb1.i73: ; preds = %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i72, %bb.i51, %bb20
- %95 = phi i32 [ %iftmp.138.0.i.i50, %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i72 ], [ %73, %bb20 ], [ %73, %bb.i51 ] ; [#uses=1]
- %96 = phi i32 [ %.pre5.i71, %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i72 ], [ %69, %bb20 ], [ %69, %bb.i51 ] ; [#uses=2]
- %97 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=12]
- %98 = load float** %97, align 4 ; [#uses=1]
- %99 = getelementptr inbounds float* %98, i32 %96 ; [#uses=2]
- %100 = icmp eq float* %99, null ; [#uses=1]
- br i1 %100, label %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit76, label %bb2.i75
-
-bb2.i75: ; preds = %bb1.i73
- store float %71, float* %99, align 4
- %.pre6.i74 = load i32* %.pre-phi, align 4 ; [#uses=1]
- %.pre = load i32* %72, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit76
-
-_ZN20btAlignedObjectArrayIfE9push_backERKf.exit76: ; preds = %bb2.i75, %bb1.i73
- %101 = phi i32 [ %95, %bb1.i73 ], [ %.pre, %bb2.i75 ] ; [#uses=4]
- %102 = phi i32 [ %96, %bb1.i73 ], [ %.pre6.i74, %bb2.i75 ] ; [#uses=1]
- %103 = add nsw i32 %102, 1 ; [#uses=7]
- store i32 %103, i32* %.pre-phi, align 4
- %104 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = icmp eq i32 %101, %103 ; [#uses=1]
- br i1 %106, label %bb.i24, label %bb1.i46
-
-bb.i24: ; preds = %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit76
- %107 = icmp eq i32 %103, 0 ; [#uses=1]
- %108 = shl i32 %103, 1 ; [#uses=1]
- %iftmp.138.0.i.i23 = select i1 %107, i32 1, i32 %108 ; [#uses=5]
- %109 = icmp slt i32 %101, %iftmp.138.0.i.i23 ; [#uses=1]
- br i1 %109, label %bb.i.i25, label %bb1.i46
-
-bb.i.i25: ; preds = %bb.i24
- %110 = icmp eq i32 %iftmp.138.0.i.i23, 0 ; [#uses=1]
- br i1 %110, label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i29, label %bb.i2.i.i28
-
-bb.i2.i.i28: ; preds = %bb.i.i25
- %111 = shl i32 %iftmp.138.0.i.i23, 2 ; [#uses=1]
- %112 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %111, i32 16) ; [#uses=1]
- %phitmp.i.i26 = bitcast i8* %112 to float* ; [#uses=1]
- %.pre.i27 = load i32* %.pre-phi, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i29
-
-_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i29: ; preds = %bb.i2.i.i28, %bb.i.i25
- %113 = phi i32 [ %.pre.i27, %bb.i2.i.i28 ], [ %103, %bb.i.i25 ] ; [#uses=2]
- %114 = phi float* [ %phitmp.i.i26, %bb.i2.i.i28 ], [ null, %bb.i.i25 ] ; [#uses=2]
- %115 = icmp sgt i32 %113, 0 ; [#uses=1]
- br i1 %115, label %bb.i4.i.i33, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i39
-
-bb.i4.i.i33: ; preds = %bb3.i.i.i38, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i29
- %indvar.i.i.i31 = phi i32 [ %indvar.next.i.i.i36, %bb3.i.i.i38 ], [ 0, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i29 ] ; [#uses=3]
- %scevgep.i.i.i32 = getelementptr float* %114, i32 %indvar.i.i.i31 ; [#uses=2]
- %116 = icmp eq float* %scevgep.i.i.i32, null ; [#uses=1]
- br i1 %116, label %bb3.i.i.i38, label %bb1.i5.i.i35
-
-bb1.i5.i.i35: ; preds = %bb.i4.i.i33
- %117 = load float** %97, align 4 ; [#uses=1]
- %scevgep8.i.i.i34 = getelementptr float* %117, i32 %indvar.i.i.i31 ; [#uses=1]
- %118 = load float* %scevgep8.i.i.i34, align 4 ; [#uses=1]
- store float %118, float* %scevgep.i.i.i32, align 4
- br label %bb3.i.i.i38
-
-bb3.i.i.i38: ; preds = %bb1.i5.i.i35, %bb.i4.i.i33
- %indvar.next.i.i.i36 = add i32 %indvar.i.i.i31, 1 ; [#uses=2]
- %exitcond95 = icmp eq i32 %indvar.next.i.i.i36, %113 ; [#uses=1]
- br i1 %exitcond95, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i39, label %bb.i4.i.i33
-
-_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i39: ; preds = %bb3.i.i.i38, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i29
- %119 = load float** %97, align 4 ; [#uses=2]
- %120 = icmp eq float* %119, null ; [#uses=1]
- br i1 %120, label %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i45, label %bb.i.i.i41
-
-bb.i.i.i41: ; preds = %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i39
- %121 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %122 = load i8* %121, align 4 ; [#uses=1]
- %toBool.i.i.i40 = icmp eq i8 %122, 0 ; [#uses=1]
- br i1 %toBool.i.i.i40, label %bb2.i.i.i43, label %bb1.i.i.i42
-
-bb1.i.i.i42: ; preds = %bb.i.i.i41
- %123 = bitcast float* %119 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %123)
- br label %bb2.i.i.i43
-
-bb2.i.i.i43: ; preds = %bb1.i.i.i42, %bb.i.i.i41
- store float* null, float** %97, align 4
- br label %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i45
-
-_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i45: ; preds = %bb2.i.i.i43, %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i39
- %124 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %124, align 4
- store float* %114, float** %97, align 4
- store i32 %iftmp.138.0.i.i23, i32* %72, align 4
- %.pre5.i44 = load i32* %.pre-phi, align 4 ; [#uses=1]
- br label %bb1.i46
-
-bb1.i46: ; preds = %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i45, %bb.i24, %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit76
- %125 = phi i32 [ %iftmp.138.0.i.i23, %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i45 ], [ %101, %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit76 ], [ %101, %bb.i24 ] ; [#uses=1]
- %126 = phi i32 [ %.pre5.i44, %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i45 ], [ %103, %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit76 ], [ %103, %bb.i24 ] ; [#uses=2]
- %127 = load float** %97, align 4 ; [#uses=1]
- %128 = getelementptr inbounds float* %127, i32 %126 ; [#uses=2]
- %129 = icmp eq float* %128, null ; [#uses=1]
- br i1 %129, label %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit49, label %bb2.i48
-
-bb2.i48: ; preds = %bb1.i46
- store float %105, float* %128, align 4
- %.pre6.i47 = load i32* %.pre-phi, align 4 ; [#uses=1]
- %.pre106 = load i32* %72, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit49
-
-_ZN20btAlignedObjectArrayIfE9push_backERKf.exit49: ; preds = %bb2.i48, %bb1.i46
- %130 = phi i32 [ %125, %bb1.i46 ], [ %.pre106, %bb2.i48 ] ; [#uses=2]
- %131 = phi i32 [ %126, %bb1.i46 ], [ %.pre6.i47, %bb2.i48 ] ; [#uses=1]
- %132 = add nsw i32 %131, 1 ; [#uses=7]
- store i32 %132, i32* %.pre-phi, align 4
- %133 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=1]
- %135 = icmp eq i32 %130, %132 ; [#uses=1]
- br i1 %135, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit49
- %136 = icmp eq i32 %132, 0 ; [#uses=1]
- %137 = shl i32 %132, 1 ; [#uses=1]
- %iftmp.138.0.i.i = select i1 %136, i32 1, i32 %137 ; [#uses=4]
- %138 = icmp slt i32 %130, %iftmp.138.0.i.i ; [#uses=1]
- br i1 %138, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %139 = icmp eq i32 %iftmp.138.0.i.i, 0 ; [#uses=1]
- br i1 %139, label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %140 = shl i32 %iftmp.138.0.i.i, 2 ; [#uses=1]
- %141 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %140, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %141 to float* ; [#uses=1]
- %.pre.i = load i32* %.pre-phi, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %142 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %132, %bb.i.i ] ; [#uses=2]
- %143 = phi float* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %144 = icmp sgt i32 %142, 0 ; [#uses=1]
- br i1 %144, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr float* %143, i32 %indvar.i.i.i ; [#uses=2]
- %145 = icmp eq float* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %145, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %146 = load float** %97, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr float* %146, i32 %indvar.i.i.i ; [#uses=1]
- %147 = load float* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store float %147, float* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %142 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIfE8allocateEi.exit.i.i
- %148 = load float** %97, align 4 ; [#uses=2]
- %149 = icmp eq float* %148, null ; [#uses=1]
- br i1 %149, label %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i
- %150 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %151 = load i8* %150, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %151, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %152 = bitcast float* %148 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %152)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store float* null, float** %97, align 4
- br label %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIfE4copyEiiPf.exit.i.i
- %153 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %153, align 4
- store float* %143, float** %97, align 4
- store i32 %iftmp.138.0.i.i, i32* %72, align 4
- %.pre5.i = load i32* %.pre-phi, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i, %bb.i, %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit49
- %154 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIfE10deallocateEv.exit.i.i ], [ %132, %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit49 ], [ %132, %bb.i ] ; [#uses=2]
- %155 = load float** %97, align 4 ; [#uses=1]
- %156 = getelementptr inbounds float* %155, i32 %154 ; [#uses=2]
- %157 = icmp eq float* %156, null ; [#uses=1]
- br i1 %157, label %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store float %134, float* %156, align 4
- %.pre6.i = load i32* %.pre-phi, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIfE9push_backERKf.exit
-
-_ZN20btAlignedObjectArrayIfE9push_backERKf.exit: ; preds = %bb2.i, %bb1.i
- %158 = phi i32 [ %154, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %159 = add nsw i32 %158, 1 ; [#uses=1]
- store i32 %159, i32* %.pre-phi, align 4
- %160 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=2]
- %161 = load %struct.btIndexedMesh** %160, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btIndexedMesh* %161, i32 0, i32 3 ; [#uses=2]
- %163 = load i32* %162, align 4 ; [#uses=1]
- %164 = add nsw i32 %163, 1 ; [#uses=1]
- store i32 %164, i32* %162, align 4
- %165 = load %struct.btIndexedMesh** %160, align 4 ; [#uses=1]
- %166 = load float** %97, align 4 ; [#uses=1]
- %167 = bitcast float* %166 to i8* ; [#uses=1]
- %168 = getelementptr inbounds %struct.btIndexedMesh* %165, i32 0, i32 4 ; [#uses=1]
- store i8* %167, i8** %168, align 4
- %169 = load i32* %.pre-phi, align 4 ; [#uses=1]
- %170 = sdiv i32 %169, 3 ; [#uses=1]
- %171 = add nsw i32 %170, -1 ; [#uses=1]
- ret i32 %171
-
-bb21: ; preds = %bb3
- ret i32 %27
-}
-
-; [#uses=3]
-define void @_ZN14btTriangleMesh8addIndexEi(%struct.btTriangleMesh* nocapture %this, i32 %index) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 1 ; [#uses=5]
- %3 = load i32* %2, align 4 ; [#uses=6]
- %4 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=2]
- %6 = icmp eq i32 %5, %3 ; [#uses=1]
- br i1 %6, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb
- %7 = icmp eq i32 %3, 0 ; [#uses=1]
- %8 = shl i32 %3, 1 ; [#uses=1]
- %iftmp.132.0.i.i = select i1 %7, i32 1, i32 %8 ; [#uses=4]
- %9 = icmp slt i32 %5, %iftmp.132.0.i.i ; [#uses=1]
- br i1 %9, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %10 = icmp eq i32 %iftmp.132.0.i.i, 0 ; [#uses=1]
- br i1 %10, label %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %11 = shl i32 %iftmp.132.0.i.i, 2 ; [#uses=1]
- %12 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %11, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %12 to i32* ; [#uses=1]
- %.pre.i = load i32* %2, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %13 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %3, %bb.i.i ] ; [#uses=2]
- %14 = phi i32* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %15 = icmp sgt i32 %13, 0 ; [#uses=1]
- br i1 %15, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i.i
- %16 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr i32* %14, i32 %indvar.i.i.i ; [#uses=2]
- %17 = icmp eq i32* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %17, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %18 = load i32** %16, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr i32* %18, i32 %indvar.i.i.i ; [#uses=1]
- %19 = load i32* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store i32 %19, i32* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %13 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIjE8allocateEi.exit.i.i
- %20 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %21 = load i32** %20, align 4 ; [#uses=2]
- %22 = icmp eq i32* %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayIjE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i.i
- %23 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %25 = bitcast i32* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %25)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %20, align 4
- br label %_ZN20btAlignedObjectArrayIjE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIjE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIjE4copyEiiPj.exit.i.i
- %26 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store i32* %14, i32** %20, align 4
- store i32 %iftmp.132.0.i.i, i32* %4, align 4
- %.pre5.i = load i32* %2, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIjE10deallocateEv.exit.i.i, %bb.i, %bb
- %27 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIjE10deallocateEv.exit.i.i ], [ %3, %bb ], [ %3, %bb.i ] ; [#uses=2]
- %28 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=2]
- %29 = load i32** %28, align 4 ; [#uses=2]
- %30 = getelementptr inbounds i32* %29, i32 %27 ; [#uses=2]
- %31 = icmp eq i32* %30, null ; [#uses=1]
- br i1 %31, label %_ZN20btAlignedObjectArrayIjE9push_backERKj.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 %index, i32* %30, align 4
- %.pre6.i = load i32* %2, align 4 ; [#uses=1]
- %.pre26 = load i32** %28, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIjE9push_backERKj.exit
-
-_ZN20btAlignedObjectArrayIjE9push_backERKj.exit: ; preds = %bb2.i, %bb1.i
- %32 = phi i32* [ %29, %bb1.i ], [ %.pre26, %bb2.i ] ; [#uses=1]
- %33 = phi i32 [ %27, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %34 = add nsw i32 %33, 1 ; [#uses=1]
- store i32 %34, i32* %2, align 4
- %35 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- %36 = load %struct.btIndexedMesh** %35, align 4 ; [#uses=1]
- %37 = bitcast i32* %32 to i8* ; [#uses=1]
- %38 = getelementptr inbounds %struct.btIndexedMesh* %36, i32 0, i32 1 ; [#uses=1]
- store i8* %37, i8** %38, align 4
- ret void
-
-bb1: ; preds = %entry
- %39 = trunc i32 %index to i16 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 1 ; [#uses=5]
- %41 = load i32* %40, align 4 ; [#uses=6]
- %42 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 2 ; [#uses=2]
- %43 = load i32* %42, align 4 ; [#uses=2]
- %44 = icmp eq i32 %43, %41 ; [#uses=1]
- br i1 %44, label %bb.i3, label %bb1.i22
-
-bb.i3: ; preds = %bb1
- %45 = icmp eq i32 %41, 0 ; [#uses=1]
- %46 = shl i32 %41, 1 ; [#uses=1]
- %iftmp.134.0.i.i = select i1 %45, i32 1, i32 %46 ; [#uses=4]
- %47 = icmp slt i32 %43, %iftmp.134.0.i.i ; [#uses=1]
- br i1 %47, label %bb.i.i4, label %bb1.i22
-
-bb.i.i4: ; preds = %bb.i3
- %48 = icmp eq i32 %iftmp.134.0.i.i, 0 ; [#uses=1]
- br i1 %48, label %_ZN20btAlignedObjectArrayItE8allocateEi.exit.i.i, label %bb.i2.i.i7
-
-bb.i2.i.i7: ; preds = %bb.i.i4
- %49 = shl i32 %iftmp.134.0.i.i, 1 ; [#uses=1]
- %50 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %49, i32 16) ; [#uses=1]
- %phitmp.i.i5 = bitcast i8* %50 to i16* ; [#uses=1]
- %.pre.i6 = load i32* %40, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayItE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayItE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i7, %bb.i.i4
- %51 = phi i32 [ %.pre.i6, %bb.i2.i.i7 ], [ %41, %bb.i.i4 ] ; [#uses=2]
- %52 = phi i16* [ %phitmp.i.i5, %bb.i2.i.i7 ], [ null, %bb.i.i4 ] ; [#uses=2]
- %53 = icmp sgt i32 %51, 0 ; [#uses=1]
- br i1 %53, label %bb.nph.i.i.i8, label %_ZNK20btAlignedObjectArrayItE4copyEiiPt.exit.i.i
-
-bb.nph.i.i.i8: ; preds = %_ZN20btAlignedObjectArrayItE8allocateEi.exit.i.i
- %54 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb.i4.i.i11
-
-bb.i4.i.i11: ; preds = %bb3.i.i.i16, %bb.nph.i.i.i8
- %indvar.i.i.i9 = phi i32 [ 0, %bb.nph.i.i.i8 ], [ %indvar.next.i.i.i14, %bb3.i.i.i16 ] ; [#uses=3]
- %scevgep.i.i.i10 = getelementptr i16* %52, i32 %indvar.i.i.i9 ; [#uses=2]
- %55 = icmp eq i16* %scevgep.i.i.i10, null ; [#uses=1]
- br i1 %55, label %bb3.i.i.i16, label %bb1.i5.i.i13
-
-bb1.i5.i.i13: ; preds = %bb.i4.i.i11
- %56 = load i16** %54, align 4 ; [#uses=1]
- %scevgep8.i.i.i12 = getelementptr i16* %56, i32 %indvar.i.i.i9 ; [#uses=1]
- %57 = load i16* %scevgep8.i.i.i12, align 2 ; [#uses=1]
- store i16 %57, i16* %scevgep.i.i.i10, align 2
- br label %bb3.i.i.i16
-
-bb3.i.i.i16: ; preds = %bb1.i5.i.i13, %bb.i4.i.i11
- %indvar.next.i.i.i14 = add i32 %indvar.i.i.i9, 1 ; [#uses=2]
- %exitcond25 = icmp eq i32 %indvar.next.i.i.i14, %51 ; [#uses=1]
- br i1 %exitcond25, label %_ZNK20btAlignedObjectArrayItE4copyEiiPt.exit.i.i, label %bb.i4.i.i11
-
-_ZNK20btAlignedObjectArrayItE4copyEiiPt.exit.i.i: ; preds = %bb3.i.i.i16, %_ZN20btAlignedObjectArrayItE8allocateEi.exit.i.i
- %58 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %59 = load i16** %58, align 4 ; [#uses=2]
- %60 = icmp eq i16* %59, null ; [#uses=1]
- br i1 %60, label %_ZN20btAlignedObjectArrayItE10deallocateEv.exit.i.i, label %bb.i.i.i18
-
-bb.i.i.i18: ; preds = %_ZNK20btAlignedObjectArrayItE4copyEiiPt.exit.i.i
- %61 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %62 = load i8* %61, align 4 ; [#uses=1]
- %toBool.i.i.i17 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool.i.i.i17, label %bb2.i.i.i20, label %bb1.i.i.i19
-
-bb1.i.i.i19: ; preds = %bb.i.i.i18
- %63 = bitcast i16* %59 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %63)
- br label %bb2.i.i.i20
-
-bb2.i.i.i20: ; preds = %bb1.i.i.i19, %bb.i.i.i18
- store i16* null, i16** %58, align 4
- br label %_ZN20btAlignedObjectArrayItE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayItE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i20, %_ZNK20btAlignedObjectArrayItE4copyEiiPt.exit.i.i
- %64 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %64, align 4
- store i16* %52, i16** %58, align 4
- store i32 %iftmp.134.0.i.i, i32* %42, align 4
- %.pre5.i21 = load i32* %40, align 4 ; [#uses=1]
- br label %bb1.i22
-
-bb1.i22: ; preds = %_ZN20btAlignedObjectArrayItE10deallocateEv.exit.i.i, %bb.i3, %bb1
- %65 = phi i32 [ %.pre5.i21, %_ZN20btAlignedObjectArrayItE10deallocateEv.exit.i.i ], [ %41, %bb1 ], [ %41, %bb.i3 ] ; [#uses=2]
- %66 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 3 ; [#uses=2]
- %67 = load i16** %66, align 4 ; [#uses=2]
- %68 = getelementptr inbounds i16* %67, i32 %65 ; [#uses=2]
- %69 = icmp eq i16* %68, null ; [#uses=1]
- br i1 %69, label %_ZN20btAlignedObjectArrayItE9push_backERKt.exit, label %bb2.i24
-
-bb2.i24: ; preds = %bb1.i22
- store i16 %39, i16* %68, align 2
- %.pre6.i23 = load i32* %40, align 4 ; [#uses=1]
- %.pre = load i16** %66, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayItE9push_backERKt.exit
-
-_ZN20btAlignedObjectArrayItE9push_backERKt.exit: ; preds = %bb2.i24, %bb1.i22
- %70 = phi i16* [ %67, %bb1.i22 ], [ %.pre, %bb2.i24 ] ; [#uses=1]
- %71 = phi i32 [ %65, %bb1.i22 ], [ %.pre6.i23, %bb2.i24 ] ; [#uses=1]
- %72 = add nsw i32 %71, 1 ; [#uses=1]
- store i32 %72, i32* %40, align 4
- %73 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- %74 = load %struct.btIndexedMesh** %73, align 4 ; [#uses=1]
- %75 = bitcast i16* %70 to i8* ; [#uses=1]
- %76 = getelementptr inbounds %struct.btIndexedMesh* %74, i32 0, i32 1 ; [#uses=1]
- store i8* %75, i8** %76, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btTriangleMesh11addTriangleERK9btVector3S2_S2_b(%struct.btTriangleMesh* %this, %struct.btQuadWord* nocapture %vertex0, %struct.btQuadWord* nocapture %vertex1, %struct.btQuadWord* nocapture %vertex2, i8 zeroext %removeDuplicateVertices) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- %1 = load %struct.btIndexedMesh** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btIndexedMesh* %1, i32 0, i32 0 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = add nsw i32 %3, 1 ; [#uses=1]
- store i32 %4, i32* %2, align 4
- %5 = tail call i32 @_ZN14btTriangleMesh15findOrAddVertexERK9btVector3b(%struct.btTriangleMesh* %this, %struct.btQuadWord* %vertex0, i8 zeroext %removeDuplicateVertices) ; [#uses=1]
- tail call void @_ZN14btTriangleMesh8addIndexEi(%struct.btTriangleMesh* %this, i32 %5)
- %6 = tail call i32 @_ZN14btTriangleMesh15findOrAddVertexERK9btVector3b(%struct.btTriangleMesh* %this, %struct.btQuadWord* %vertex1, i8 zeroext %removeDuplicateVertices) ; [#uses=1]
- tail call void @_ZN14btTriangleMesh8addIndexEi(%struct.btTriangleMesh* %this, i32 %6)
- %7 = tail call i32 @_ZN14btTriangleMesh15findOrAddVertexERK9btVector3b(%struct.btTriangleMesh* %this, %struct.btQuadWord* %vertex2, i8 zeroext %removeDuplicateVertices) ; [#uses=1]
- tail call void @_ZN14btTriangleMesh8addIndexEi(%struct.btTriangleMesh* %this, i32 %7)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btTriangleMeshD0Ev(%struct.btTriangleMesh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV14btTriangleMesh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %2 = load i16** %1, align 4 ; [#uses=2]
- %3 = icmp eq i16* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast i16* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad44
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i16* null, i16** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store i16* null, i16** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %11 = load i32** %10, align 4 ; [#uses=2]
- %12 = icmp eq i32* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i73
-
-bb.i.i.i73: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i72 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i72, label %bb2.i.i.i75, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %bb.i.i.i73
- %15 = bitcast i32* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i75 unwind label %lpad40
-
-bb2.i.i.i75: ; preds = %bb1.i.i.i74, %bb.i.i.i73
- store i32* null, i32** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i75, %bb3
- %16 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store i32* null, i32** %10, align 4
- %17 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %20 = load float** %19, align 4 ; [#uses=2]
- %21 = icmp eq float* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i78
-
-bb.i.i.i78: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i77 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i77, label %bb2.i.i.i80, label %bb1.i.i.i79
-
-bb1.i.i.i79: ; preds = %bb.i.i.i78
- %24 = bitcast float* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i80 unwind label %lpad36
-
-bb2.i.i.i80: ; preds = %bb1.i.i.i79, %bb.i.i.i78
- store float* null, float** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i80, %bb10
- %25 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store float* null, float** %19, align 4
- %26 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %29 = load %struct.btQuadWord** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btQuadWord* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i83
-
-bb.i.i.i83: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i82 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i82, label %bb2.i.i.i85, label %bb1.i.i.i84
-
-bb1.i.i.i84: ; preds = %bb.i.i.i83
- %33 = bitcast %struct.btQuadWord* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i85 unwind label %lpad
-
-bb2.i.i.i85: ; preds = %bb1.i.i.i84, %bb.i.i.i83
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- br label %bb28
-
-invcont26: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb28: ; preds = %bb2.i.i.i85, %bb19
- %34 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- %35 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- %37 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %37)
- %38 = bitcast %struct.btTriangleMesh* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %38)
- ret void
-
-lpad: ; preds = %bb1.i.i.i84
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad36: ; preds = %bb1.i.i.i79
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad64
-
-lpad40: ; preds = %bb1.i.i.i74
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad65
-
-lpad44: ; preds = %bb1.i.i.i
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %39 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %40 = load i32** %39, align 4 ; [#uses=2]
- %41 = icmp eq i32* %40, null ; [#uses=1]
- br i1 %41, label %_ZN20btAlignedObjectArrayIjED1Ev.exit92, label %bb.i.i.i88
-
-bb.i.i.i88: ; preds = %lpad44
- %42 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %43 = load i8* %42, align 4 ; [#uses=1]
- %toBool.i.i.i87 = icmp eq i8 %43, 0 ; [#uses=1]
- br i1 %toBool.i.i.i87, label %bb2.i.i.i90, label %bb1.i.i.i89
-
-bb1.i.i.i89: ; preds = %bb.i.i.i88
- %44 = bitcast i32* %40 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %44)
- to label %bb2.i.i.i90 unwind label %lpad48
-
-bb2.i.i.i90: ; preds = %bb1.i.i.i89, %bb.i.i.i88
- store i32* null, i32** %39, align 4
- br label %_ZN20btAlignedObjectArrayIjED1Ev.exit92
-
-_ZN20btAlignedObjectArrayIjED1Ev.exit92: ; preds = %bb2.i.i.i90, %lpad44
- %45 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %45, align 4
- store i32* null, i32** %39, align 4
- %46 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %46, align 4
- %47 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %47, align 4
- br label %ppad65
-
-lpad48: ; preds = %bb1.i.i.i89
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad52: ; preds = %bb1.i.i.i101
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad56: ; preds = %bb1.i.i.i95
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %ppad
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98 ] ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %48)
- to label %invcont26 unwind label %lpad60
-
-ppad64: ; preds = %_ZN20btAlignedObjectArrayIfED1Ev.exit104, %lpad36
- %eh_exception.1 = phi i8* [ %eh_ptr37, %lpad36 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIfED1Ev.exit104 ] ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %50 = load %struct.btQuadWord** %49, align 4 ; [#uses=2]
- %51 = icmp eq %struct.btQuadWord* %50, null ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98, label %bb.i.i.i94
-
-bb.i.i.i94: ; preds = %ppad64
- %52 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %53 = load i8* %52, align 4 ; [#uses=1]
- %toBool.i.i.i93 = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i93, label %bb2.i.i.i96, label %bb1.i.i.i95
-
-bb1.i.i.i95: ; preds = %bb.i.i.i94
- %54 = bitcast %struct.btQuadWord* %50 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %54)
- to label %bb2.i.i.i96 unwind label %lpad56
-
-bb2.i.i.i96: ; preds = %bb1.i.i.i95, %bb.i.i.i94
- store %struct.btQuadWord* null, %struct.btQuadWord** %49, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98: ; preds = %bb2.i.i.i96, %ppad64
- %55 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %49, align 4
- %56 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- br label %ppad
-
-ppad65: ; preds = %_ZN20btAlignedObjectArrayIjED1Ev.exit92, %lpad40
- %eh_exception.0 = phi i8* [ %eh_ptr41, %lpad40 ], [ %eh_ptr45, %_ZN20btAlignedObjectArrayIjED1Ev.exit92 ] ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %59 = load float** %58, align 4 ; [#uses=2]
- %60 = icmp eq float* %59, null ; [#uses=1]
- br i1 %60, label %_ZN20btAlignedObjectArrayIfED1Ev.exit104, label %bb.i.i.i100
-
-bb.i.i.i100: ; preds = %ppad65
- %61 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %62 = load i8* %61, align 4 ; [#uses=1]
- %toBool.i.i.i99 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool.i.i.i99, label %bb2.i.i.i102, label %bb1.i.i.i101
-
-bb1.i.i.i101: ; preds = %bb.i.i.i100
- %63 = bitcast float* %59 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %63)
- to label %bb2.i.i.i102 unwind label %lpad52
-
-bb2.i.i.i102: ; preds = %bb1.i.i.i101, %bb.i.i.i100
- store float* null, float** %58, align 4
- br label %_ZN20btAlignedObjectArrayIfED1Ev.exit104
-
-_ZN20btAlignedObjectArrayIfED1Ev.exit104: ; preds = %bb2.i.i.i102, %ppad65
- %64 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %64, align 4
- store float* null, float** %58, align 4
- %65 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %65, align 4
- %66 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %66, align 4
- br label %ppad64
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btTriangleMeshD1Ev(%struct.btTriangleMesh* %this) align 2 {
-entry:
- tail call void @_ZN14btTriangleMeshD2Ev(%struct.btTriangleMesh* %this)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN14btTriangleMeshD2Ev(%struct.btTriangleMesh* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([17 x i32 (...)*]* @_ZTV14btTriangleMesh, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %2 = load i16** %1, align 4 ; [#uses=2]
- %3 = icmp eq i16* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast i16* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad44
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i16* null, i16** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store i16* null, i16** %1, align 4
- %8 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %11 = load i32** %10, align 4 ; [#uses=2]
- %12 = icmp eq i32* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i73
-
-bb.i.i.i73: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i72 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i72, label %bb2.i.i.i75, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %bb.i.i.i73
- %15 = bitcast i32* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i75 unwind label %lpad40
-
-bb2.i.i.i75: ; preds = %bb1.i.i.i74, %bb.i.i.i73
- store i32* null, i32** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i75, %bb3
- %16 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store i32* null, i32** %10, align 4
- %17 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %20 = load float** %19, align 4 ; [#uses=2]
- %21 = icmp eq float* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i78
-
-bb.i.i.i78: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i77 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i77, label %bb2.i.i.i80, label %bb1.i.i.i79
-
-bb1.i.i.i79: ; preds = %bb.i.i.i78
- %24 = bitcast float* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i80 unwind label %lpad36
-
-bb2.i.i.i80: ; preds = %bb1.i.i.i79, %bb.i.i.i78
- store float* null, float** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i80, %bb10
- %25 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store float* null, float** %19, align 4
- %26 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %29 = load %struct.btQuadWord** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btQuadWord* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i83
-
-bb.i.i.i83: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i82 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i82, label %bb2.i.i.i85, label %bb1.i.i.i84
-
-bb1.i.i.i84: ; preds = %bb.i.i.i83
- %33 = bitcast %struct.btQuadWord* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i85 unwind label %lpad
-
-bb2.i.i.i85: ; preds = %bb1.i.i.i84, %bb.i.i.i83
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- br label %bb28
-
-invcont26: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb28: ; preds = %bb2.i.i.i85, %bb19
- %34 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- %35 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- %37 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %37)
- ret void
-
-lpad: ; preds = %bb1.i.i.i84
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad36: ; preds = %bb1.i.i.i79
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad64
-
-lpad40: ; preds = %bb1.i.i.i74
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad65
-
-lpad44: ; preds = %bb1.i.i.i
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %38 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %39 = load i32** %38, align 4 ; [#uses=2]
- %40 = icmp eq i32* %39, null ; [#uses=1]
- br i1 %40, label %_ZN20btAlignedObjectArrayIjED1Ev.exit92, label %bb.i.i.i88
-
-bb.i.i.i88: ; preds = %lpad44
- %41 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %42 = load i8* %41, align 4 ; [#uses=1]
- %toBool.i.i.i87 = icmp eq i8 %42, 0 ; [#uses=1]
- br i1 %toBool.i.i.i87, label %bb2.i.i.i90, label %bb1.i.i.i89
-
-bb1.i.i.i89: ; preds = %bb.i.i.i88
- %43 = bitcast i32* %39 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %43)
- to label %bb2.i.i.i90 unwind label %lpad48
-
-bb2.i.i.i90: ; preds = %bb1.i.i.i89, %bb.i.i.i88
- store i32* null, i32** %38, align 4
- br label %_ZN20btAlignedObjectArrayIjED1Ev.exit92
-
-_ZN20btAlignedObjectArrayIjED1Ev.exit92: ; preds = %bb2.i.i.i90, %lpad44
- %44 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %44, align 4
- store i32* null, i32** %38, align 4
- %45 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %46, align 4
- br label %ppad65
-
-lpad48: ; preds = %bb1.i.i.i89
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad52: ; preds = %bb1.i.i.i101
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad56: ; preds = %bb1.i.i.i95
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %ppad
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98 ] ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN26btTriangleIndexVertexArrayD2Ev(%struct.btTriangleIndexVertexArray* %47)
- to label %invcont26 unwind label %lpad60
-
-ppad64: ; preds = %_ZN20btAlignedObjectArrayIfED1Ev.exit104, %lpad36
- %eh_exception.1 = phi i8* [ %eh_ptr37, %lpad36 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIfED1Ev.exit104 ] ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %49 = load %struct.btQuadWord** %48, align 4 ; [#uses=2]
- %50 = icmp eq %struct.btQuadWord* %49, null ; [#uses=1]
- br i1 %50, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98, label %bb.i.i.i94
-
-bb.i.i.i94: ; preds = %ppad64
- %51 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %52 = load i8* %51, align 4 ; [#uses=1]
- %toBool.i.i.i93 = icmp eq i8 %52, 0 ; [#uses=1]
- br i1 %toBool.i.i.i93, label %bb2.i.i.i96, label %bb1.i.i.i95
-
-bb1.i.i.i95: ; preds = %bb.i.i.i94
- %53 = bitcast %struct.btQuadWord* %49 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %53)
- to label %bb2.i.i.i96 unwind label %lpad56
-
-bb2.i.i.i96: ; preds = %bb1.i.i.i95, %bb.i.i.i94
- store %struct.btQuadWord* null, %struct.btQuadWord** %48, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit98: ; preds = %bb2.i.i.i96, %ppad64
- %54 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %54, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %48, align 4
- %55 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %55, align 4
- %56 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %56, align 4
- br label %ppad
-
-ppad65: ; preds = %_ZN20btAlignedObjectArrayIjED1Ev.exit92, %lpad40
- %eh_exception.0 = phi i8* [ %eh_ptr41, %lpad40 ], [ %eh_ptr45, %_ZN20btAlignedObjectArrayIjED1Ev.exit92 ] ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %58 = load float** %57, align 4 ; [#uses=2]
- %59 = icmp eq float* %58, null ; [#uses=1]
- br i1 %59, label %_ZN20btAlignedObjectArrayIfED1Ev.exit104, label %bb.i.i.i100
-
-bb.i.i.i100: ; preds = %ppad65
- %60 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %61 = load i8* %60, align 4 ; [#uses=1]
- %toBool.i.i.i99 = icmp eq i8 %61, 0 ; [#uses=1]
- br i1 %toBool.i.i.i99, label %bb2.i.i.i102, label %bb1.i.i.i101
-
-bb1.i.i.i101: ; preds = %bb.i.i.i100
- %62 = bitcast float* %58 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %62)
- to label %bb2.i.i.i102 unwind label %lpad52
-
-bb2.i.i.i102: ; preds = %bb1.i.i.i101, %bb.i.i.i100
- store float* null, float** %57, align 4
- br label %_ZN20btAlignedObjectArrayIfED1Ev.exit104
-
-_ZN20btAlignedObjectArrayIfED1Ev.exit104: ; preds = %bb2.i.i.i102, %ppad65
- %63 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %63, align 4
- store float* null, float** %57, align 4
- %64 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %64, align 4
- %65 = getelementptr inbounds %struct.btTriangleMesh* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %65, align 4
- br label %ppad64
-}
-
-; [#uses=0]
-define void @_ZN14btTriangleMeshC1Ebb(%struct.btTriangleMesh* %this, i8 zeroext %use32bitIndices, i8 zeroext %use4componentVertices) align 2 {
-entry:
- tail call void @_ZN14btTriangleMeshC2Ebb(%struct.btTriangleMesh* %this, i8 zeroext %use32bitIndices, i8 zeroext %use4componentVertices)
- ret void
-}
-
-; [#uses=4]
-define void @_ZN19btTriangleMeshShapeC2EP23btStridingMeshInterface(%struct.btTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface) align 2 {
-entry:
- %vec.i = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %tmp.i = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %memtmp.i = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=2]
- call void @_ZN14btConcaveShapeC2Ev(%struct.btConcaveShape* %0)
- %1 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([20 x i32 (...)*]* @_ZTV19btTriangleMeshShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btStridingMeshInterface* %meshInterface, %struct.btStridingMeshInterface** %2, align 4
- %3 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 21, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btStridingMeshInterface* %meshInterface, i32 0, i32 0 ; [#uses=2]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 10 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to i8 (%struct.btStridingMeshInterface*)* ; [#uses=1]
- %9 = invoke zeroext i8 %8(%struct.btStridingMeshInterface* %meshInterface)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %entry
- %toBool = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb
-
-bb: ; preds = %invcont
- %10 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 12 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %15 = bitcast i32 (...)* %12 to void (%struct.btStridingMeshInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %15(%struct.btStridingMeshInterface* %meshInterface, %struct.btQuadWord* %14, %struct.btQuadWord* %13)
- to label %return unwind label %lpad
-
-bb2: ; preds = %invcont
- %16 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %.noexc16, %bb2
- %i.03.i = phi i32 [ 0, %bb2 ], [ %47, %.noexc16 ] ; [#uses=6]
- %scevgep6.i = getelementptr %struct.btTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 %i.03.i ; [#uses=1]
- %scevgep4.i = getelementptr %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 %i.03.i ; [#uses=2]
- %scevgep.i = getelementptr %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 %i.03.i ; [#uses=2]
- store float 0.000000e+00, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- store float 0.000000e+00, float* %18, align 8
- store float 0.000000e+00, float* %19, align 4
- store float 1.000000e+00, float* %scevgep.i, align 4
- %29 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 16 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = bitcast i32 (...)* %31 to void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %32(%struct.btQuadWord* noalias sret %tmp.i, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec.i)
- to label %.noexc unwind label %lpad
-
-.noexc: ; preds = %bb.i
- %scevgep5.i = getelementptr %struct.btTriangleMeshShape* %this, i32 0, i32 2, i32 0, i32 %i.03.i ; [#uses=1]
- %33 = load float* %scevgep4.i, align 4 ; [#uses=1]
- %34 = load float* %20, align 4 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- store float %35, float* %scevgep5.i, align 4
- store float -1.000000e+00, float* %scevgep.i, align 4
- %36 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 16 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = bitcast i32 (...)* %38 to void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %39(%struct.btQuadWord* noalias sret %memtmp.i, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec.i)
- to label %.noexc16 unwind label %lpad
-
-.noexc16: ; preds = %.noexc
- %40 = load float* %22, align 8 ; [#uses=1]
- store float %40, float* %21, align 8
- %41 = load float* %24, align 4 ; [#uses=1]
- store float %41, float* %23, align 4
- %42 = load float* %26, align 8 ; [#uses=1]
- store float %42, float* %25, align 8
- %43 = load float* %28, align 4 ; [#uses=1]
- store float %43, float* %27, align 4
- %44 = load float* %scevgep4.i, align 4 ; [#uses=1]
- %45 = load float* %20, align 4 ; [#uses=1]
- %46 = fsub float %44, %45 ; [#uses=1]
- store float %46, float* %scevgep6.i, align 4
- %47 = add nsw i32 %i.03.i, 1 ; [#uses=1]
- %exitcond.i = icmp eq i32 %i.03.i, 2 ; [#uses=1]
- br i1 %exitcond.i, label %return, label %bb.i
-
-invcont5: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %.noexc16, %bb
- ret void
-
-lpad: ; preds = %.noexc, %bb.i, %bb, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %0)
- to label %invcont5 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK19btTriangleMeshShape7getNameEv(%struct.btTriangleMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([13 x i8]* @.str135, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK19btTriangleMeshShape7getAabbERK11btTransformR9btVector3S4_(%struct.btTriangleMeshShape* %this, %struct.btTransform* nocapture %trans, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = fmul float %4, 5.000000e-01 ; [#uses=1]
- %16 = fmul float %9, 5.000000e-01 ; [#uses=1]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %19 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 11 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=3]
- %23 = bitcast i32 (...)* %21 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %24 = tail call float %23(%struct.btConcaveShape* %22) ; [#uses=1]
- %25 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32 (...)** %25, i32 11 ; [#uses=1]
- %27 = load i32 (...)** %26, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %27 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %29 = tail call float %28(%struct.btConcaveShape* %22) ; [#uses=1]
- %30 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %31 = getelementptr inbounds i32 (...)** %30, i32 11 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = bitcast i32 (...)* %32 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %34 = tail call float %33(%struct.btConcaveShape* %22) ; [#uses=1]
- %35 = fadd float %17, %34 ; [#uses=3]
- %36 = fadd float %16, %29 ; [#uses=3]
- %37 = fadd float %15, %24 ; [#uses=3]
- %38 = load float* %0, align 4 ; [#uses=1]
- %39 = load float* %2, align 4 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = load float* %5, align 4 ; [#uses=1]
- %42 = load float* %7, align 4 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=1]
- %44 = load float* %10, align 4 ; [#uses=1]
- %45 = load float* %12, align 4 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=1]
- %47 = fmul float %40, 5.000000e-01 ; [#uses=3]
- %48 = fmul float %43, 5.000000e-01 ; [#uses=3]
- %49 = fmul float %46, 5.000000e-01 ; [#uses=3]
- %50 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- %52 = tail call float @fabsf(float %51) nounwind readnone ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=2]
- %55 = tail call float @fabsf(float %54) nounwind readnone ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=2]
- %58 = tail call float @fabsf(float %57) nounwind readnone ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=2]
- %61 = tail call float @fabsf(float %60) nounwind readnone ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=2]
- %64 = tail call float @fabsf(float %63) nounwind readnone ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=2]
- %67 = tail call float @fabsf(float %66) nounwind readnone ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=2]
- %70 = tail call float @fabsf(float %69) nounwind readnone ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=2]
- %73 = tail call float @fabsf(float %72) nounwind readnone ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=2]
- %76 = tail call float @fabsf(float %75) nounwind readnone ; [#uses=1]
- %77 = fmul float %57, %49 ; [#uses=1]
- %78 = fmul float %54, %48 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %51, %47 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fadd float %81, %83 ; [#uses=2]
- %85 = fmul float %66, %49 ; [#uses=1]
- %86 = fmul float %63, %48 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %60, %47 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fadd float %89, %91 ; [#uses=2]
- %93 = fmul float %75, %49 ; [#uses=1]
- %94 = fmul float %72, %48 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %69, %47 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btTransform* %trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fadd float %97, %99 ; [#uses=2]
- %101 = fmul float %58, %35 ; [#uses=1]
- %102 = fmul float %55, %36 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fmul float %52, %37 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=2]
- %106 = fmul float %67, %35 ; [#uses=1]
- %107 = fmul float %64, %36 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %61, %37 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=2]
- %111 = fmul float %76, %35 ; [#uses=1]
- %112 = fmul float %73, %36 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fmul float %70, %37 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=2]
- %116 = fsub float %84, %105 ; [#uses=1]
- %117 = fsub float %92, %110 ; [#uses=1]
- %118 = fsub float %100, %115 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %118, float* %119, align 4
- %120 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %117, float* %120, align 4
- %121 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %116, float* %121, align 4
- %122 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %122, align 4
- %123 = fadd float %84, %105 ; [#uses=1]
- %124 = fadd float %92, %110 ; [#uses=1]
- %125 = fadd float %100, %115 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %125, float* %126, align 4
- %127 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %124, float* %127, align 4
- %128 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %123, float* %128, align 4
- %129 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %129, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btTriangleMeshShape15recalcLocalAabbEv(%struct.btTriangleMeshShape* %this) align 2 {
-bb.nph:
- %vec = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %tmp = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.03 = phi i32 [ 0, %bb.nph ], [ %32, %bb ] ; [#uses=5]
- %scevgep = getelementptr %struct.btQuadWord* %vec, i32 0, i32 0, i32 %i.03 ; [#uses=2]
- %scevgep4 = getelementptr %struct.btQuadWord* %tmp, i32 0, i32 0, i32 %i.03 ; [#uses=2]
- %scevgep5 = getelementptr %struct.btTriangleMeshShape* %this, i32 0, i32 2, i32 0, i32 %i.03 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 %i.03 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 8
- store float 0.000000e+00, float* %1, align 4
- store float 0.000000e+00, float* %2, align 8
- store float 0.000000e+00, float* %3, align 4
- store float 1.000000e+00, float* %scevgep, align 4
- %14 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 16 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %17(%struct.btQuadWord* noalias sret %tmp, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec)
- %18 = load float* %scevgep4, align 4 ; [#uses=1]
- %19 = load float* %5, align 4 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- store float %20, float* %scevgep5, align 4
- store float -1.000000e+00, float* %scevgep, align 4
- %21 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 16 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %23 to void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %24(%struct.btQuadWord* noalias sret %memtmp, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec)
- %25 = load float* %7, align 8 ; [#uses=1]
- store float %25, float* %6, align 8
- %26 = load float* %9, align 4 ; [#uses=1]
- store float %26, float* %8, align 4
- %27 = load float* %11, align 8 ; [#uses=1]
- store float %27, float* %10, align 8
- %28 = load float* %13, align 4 ; [#uses=1]
- store float %28, float* %12, align 4
- %29 = load float* %scevgep4, align 4 ; [#uses=1]
- %30 = load float* %5, align 4 ; [#uses=1]
- %31 = fsub float %29, %30 ; [#uses=1]
- store float %31, float* %scevgep6, align 4
- %32 = add nsw i32 %i.03, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %32, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21SupportVertexCallbackD1Ev(%struct.SupportVertexCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21SupportVertexCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21SupportVertexCallbackD0Ev(%struct.SupportVertexCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21SupportVertexCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.SupportVertexCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21SupportVertexCallback15processTriangleEP9btVector3ii(%struct.SupportVertexCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) nounwind align 2 {
-bb.nph:
- %0 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 3 ; [#uses=4]
- %4 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %5 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %6 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %7 = getelementptr inbounds %struct.SupportVertexCallback* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %scevgep6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=2]
- %scevgep7 = getelementptr %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=2]
- %scevgep8 = getelementptr %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %0, align 4 ; [#uses=3]
- %9 = load float* %scevgep6, align 4 ; [#uses=1]
- %10 = fmul float %8, %9 ; [#uses=1]
- %11 = load float* %1, align 4 ; [#uses=3]
- %12 = load float* %scevgep7, align 4 ; [#uses=1]
- %13 = fmul float %11, %12 ; [#uses=1]
- %14 = fadd float %10, %13 ; [#uses=1]
- %15 = load float* %2, align 4 ; [#uses=3]
- %16 = load float* %scevgep8, align 4 ; [#uses=1]
- %17 = fmul float %15, %16 ; [#uses=1]
- %18 = fadd float %14, %17 ; [#uses=3]
- %19 = load float* %3, align 4 ; [#uses=2]
- %20 = fcmp olt float %19, %18 ; [#uses=1]
- br i1 %20, label %bb1, label %bb2
-
-bb1: ; preds = %bb.nph
- %scevgep9 = getelementptr %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %18, float* %3, align 4
- %21 = load float* %scevgep6, align 4 ; [#uses=1]
- store float %21, float* %4, align 4
- %22 = load float* %scevgep7, align 4 ; [#uses=1]
- store float %22, float* %5, align 4
- %23 = load float* %scevgep8, align 4 ; [#uses=1]
- store float %23, float* %6, align 4
- %24 = load float* %scevgep9, align 4 ; [#uses=1]
- store float %24, float* %7, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb.nph
- %25 = phi float [ %18, %bb1 ], [ %19, %bb.nph ] ; [#uses=2]
- %scevgep6.1 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=2]
- %scevgep7.1 = getelementptr %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=2]
- %scevgep8.1 = getelementptr %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=2]
- %26 = load float* %scevgep6.1, align 4 ; [#uses=1]
- %27 = fmul float %8, %26 ; [#uses=1]
- %28 = load float* %scevgep7.1, align 4 ; [#uses=1]
- %29 = fmul float %11, %28 ; [#uses=1]
- %30 = fadd float %27, %29 ; [#uses=1]
- %31 = load float* %scevgep8.1, align 4 ; [#uses=1]
- %32 = fmul float %15, %31 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=3]
- %34 = fcmp olt float %25, %33 ; [#uses=1]
- br i1 %34, label %bb1.1, label %bb2.1
-
-return: ; preds = %bb2.1
- ret void
-
-bb2.1: ; preds = %bb1.1, %bb2
- %35 = phi float [ %33, %bb1.1 ], [ %25, %bb2 ] ; [#uses=1]
- %scevgep6.2 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=2]
- %scevgep7.2 = getelementptr %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=2]
- %scevgep8.2 = getelementptr %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=2]
- %36 = load float* %scevgep6.2, align 4 ; [#uses=1]
- %37 = fmul float %8, %36 ; [#uses=1]
- %38 = load float* %scevgep7.2, align 4 ; [#uses=1]
- %39 = fmul float %11, %38 ; [#uses=1]
- %40 = fadd float %37, %39 ; [#uses=1]
- %41 = load float* %scevgep8.2, align 4 ; [#uses=1]
- %42 = fmul float %15, %41 ; [#uses=1]
- %43 = fadd float %40, %42 ; [#uses=2]
- %44 = fcmp olt float %35, %43 ; [#uses=1]
- br i1 %44, label %bb1.2, label %return
-
-bb1.1: ; preds = %bb2
- %scevgep9.1 = getelementptr %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %33, float* %3, align 4
- %45 = load float* %scevgep6.1, align 4 ; [#uses=1]
- store float %45, float* %4, align 4
- %46 = load float* %scevgep7.1, align 4 ; [#uses=1]
- store float %46, float* %5, align 4
- %47 = load float* %scevgep8.1, align 4 ; [#uses=1]
- store float %47, float* %6, align 4
- %48 = load float* %scevgep9.1, align 4 ; [#uses=1]
- store float %48, float* %7, align 4
- br label %bb2.1
-
-bb1.2: ; preds = %bb2.1
- %scevgep9.2 = getelementptr %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %43, float* %3, align 4
- %49 = load float* %scevgep6.2, align 4 ; [#uses=1]
- store float %49, float* %4, align 4
- %50 = load float* %scevgep7.2, align 4 ; [#uses=1]
- store float %50, float* %5, align 4
- %51 = load float* %scevgep8.2, align 4 ; [#uses=1]
- store float %51, float* %6, align 4
- %52 = load float* %scevgep9.2, align 4 ; [#uses=1]
- store float %52, float* %7, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN19btTriangleMeshShape15setLocalScalingERK9btVector3(%struct.btTriangleMeshShape* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %vec.i = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %tmp.i = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %memtmp.i = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %memtmp.i, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb.i, %entry
- %i.03.i = phi i32 [ 0, %entry ], [ %46, %bb.i ] ; [#uses=5]
- %scevgep6.i = getelementptr %struct.btTriangleMeshShape* %this, i32 0, i32 1, i32 0, i32 %i.03.i ; [#uses=1]
- %scevgep5.i = getelementptr %struct.btTriangleMeshShape* %this, i32 0, i32 2, i32 0, i32 %i.03.i ; [#uses=1]
- %scevgep4.i = getelementptr %struct.btQuadWord* %tmp.i, i32 0, i32 0, i32 %i.03.i ; [#uses=2]
- %scevgep.i = getelementptr %struct.btQuadWord* %vec.i, i32 0, i32 0, i32 %i.03.i ; [#uses=2]
- store float 0.000000e+00, float* %14, align 8
- store float 0.000000e+00, float* %15, align 4
- store float 0.000000e+00, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- store float 1.000000e+00, float* %scevgep.i, align 4
- %28 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 16 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %31(%struct.btQuadWord* noalias sret %tmp.i, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec.i)
- %32 = load float* %scevgep4.i, align 4 ; [#uses=1]
- %33 = load float* %19, align 4 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=1]
- store float %34, float* %scevgep5.i, align 4
- store float -1.000000e+00, float* %scevgep.i, align 4
- %35 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32 (...)** %35, i32 16 ; [#uses=1]
- %37 = load i32 (...)** %36, align 4 ; [#uses=1]
- %38 = bitcast i32 (...)* %37 to void (%struct.btQuadWord*, %struct.btTriangleMeshShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %38(%struct.btQuadWord* noalias sret %memtmp.i, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* %vec.i)
- %39 = load float* %21, align 8 ; [#uses=1]
- store float %39, float* %20, align 8
- %40 = load float* %23, align 4 ; [#uses=1]
- store float %40, float* %22, align 4
- %41 = load float* %25, align 8 ; [#uses=1]
- store float %41, float* %24, align 8
- %42 = load float* %27, align 4 ; [#uses=1]
- store float %42, float* %26, align 4
- %43 = load float* %scevgep4.i, align 4 ; [#uses=1]
- %44 = load float* %19, align 4 ; [#uses=1]
- %45 = fsub float %43, %44 ; [#uses=1]
- store float %45, float* %scevgep6.i, align 4
- %46 = add nsw i32 %i.03.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %46, 3 ; [#uses=1]
- br i1 %exitcond, label %_ZN19btTriangleMeshShape15recalcLocalAabbEv.exit, label %bb.i
-
-_ZN19btTriangleMeshShape15recalcLocalAabbEv.exit: ; preds = %bb.i
- ret void
-}
-
-; [#uses=1]
-define %struct.btQuadWord* @_ZNK19btTriangleMeshShape15getLocalScalingEv(%struct.btTriangleMeshShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=1]
- %1 = load %struct.btStridingMeshInterface** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btStridingMeshInterface* %1, i32 0, i32 1 ; [#uses=1]
- ret %struct.btQuadWord* %2
-}
-
-; [#uses=1]
-define void @_ZZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN16FilteredCallbackD1Ev(%struct..0FilteredCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN16FilteredCallbackD0Ev(%struct..0FilteredCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct..0FilteredCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN16FilteredCallback28internalProcessTriangleIndexEPS2_ii(%struct..0FilteredCallback* nocapture %this, %struct.btQuadWord* %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = load float* %1, align 4 ; [#uses=4]
- %5 = fcmp olt float %3, %4 ; [#uses=1]
- %6 = select i1 %5, float %3, float %4 ; [#uses=2]
- %7 = load float* %0, align 4 ; [#uses=4]
- %8 = fcmp olt float %6, %7 ; [#uses=1]
- %9 = select i1 %8, float %6, float %7 ; [#uses=1]
- %10 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fcmp ogt float %9, %11 ; [#uses=1]
- br i1 %12, label %return, label %bb1.i
-
-bb1.i: ; preds = %entry
- %13 = fcmp ogt float %3, %4 ; [#uses=1]
- %14 = select i1 %13, float %3, float %4 ; [#uses=2]
- %15 = fcmp ogt float %14, %7 ; [#uses=1]
- %16 = select i1 %15, float %14, float %7 ; [#uses=1]
- %17 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp olt float %16, %18 ; [#uses=1]
- br i1 %19, label %return, label %bb4.i
-
-bb4.i: ; preds = %bb1.i
- %20 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- %24 = load float* %21, align 4 ; [#uses=4]
- %25 = fcmp olt float %23, %24 ; [#uses=1]
- %26 = select i1 %25, float %23, float %24 ; [#uses=2]
- %27 = load float* %20, align 4 ; [#uses=4]
- %28 = fcmp olt float %26, %27 ; [#uses=1]
- %29 = select i1 %28, float %26, float %27 ; [#uses=1]
- %30 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fcmp ogt float %29, %31 ; [#uses=1]
- br i1 %32, label %return, label %bb7.i
-
-bb7.i: ; preds = %bb4.i
- %33 = fcmp ogt float %23, %24 ; [#uses=1]
- %34 = select i1 %33, float %23, float %24 ; [#uses=2]
- %35 = fcmp ogt float %34, %27 ; [#uses=1]
- %36 = select i1 %35, float %34, float %27 ; [#uses=1]
- %37 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fcmp olt float %36, %38 ; [#uses=1]
- br i1 %39, label %return, label %bb10.i
-
-bb10.i: ; preds = %bb7.i
- %40 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=4]
- %44 = load float* %41, align 4 ; [#uses=4]
- %45 = fcmp olt float %43, %44 ; [#uses=1]
- %46 = select i1 %45, float %43, float %44 ; [#uses=2]
- %47 = load float* %40, align 4 ; [#uses=4]
- %48 = fcmp olt float %46, %47 ; [#uses=1]
- %49 = select i1 %48, float %46, float %47 ; [#uses=1]
- %50 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fcmp ogt float %49, %51 ; [#uses=1]
- br i1 %52, label %return, label %_Z24TestTriangleAgainstAabb2PK9btVector3RS0_S2_.exit
-
-_Z24TestTriangleAgainstAabb2PK9btVector3RS0_S2_.exit: ; preds = %bb10.i
- %53 = fcmp ogt float %43, %44 ; [#uses=1]
- %54 = select i1 %53, float %43, float %44 ; [#uses=2]
- %55 = fcmp ogt float %54, %47 ; [#uses=1]
- %56 = select i1 %55, float %54, float %47 ; [#uses=1]
- %57 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %phitmp = fcmp olt float %56, %58 ; [#uses=1]
- br i1 %phitmp, label %return, label %bb
-
-bb: ; preds = %_Z24TestTriangleAgainstAabb2PK9btVector3RS0_S2_.exit
- %59 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 1 ; [#uses=1]
- %60 = load %struct.btActionInterface** %59, align 4 ; [#uses=2]
- %61 = getelementptr inbounds %struct.btActionInterface* %60, i32 0, i32 0 ; [#uses=1]
- %62 = load i32 (...)*** %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds i32 (...)** %62, i32 2 ; [#uses=1]
- %64 = load i32 (...)** %63, align 4 ; [#uses=1]
- %65 = bitcast i32 (...)* %64 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- tail call void %65(%struct.btActionInterface* %60, %struct.btQuadWord* %triangle, i32 %partId, i32 %triangleIndex)
- ret void
-
-return: ; preds = %_Z24TestTriangleAgainstAabb2PK9btVector3RS0_S2_.exit, %bb10.i, %bb7.i, %bb4.i, %bb1.i, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK19btTriangleMeshShape21calculateLocalInertiaEfR9btVector3(%struct.btTriangleMeshShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK19btTriangleMeshShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btTriangleMeshShape* %this, %struct.btQuadWord* nocapture %vec) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %supportCallback = alloca %struct.SupportVertexCallback, align 8 ; [#uses=27]
- %aabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21SupportVertexCallback, i32 0, i32 2), i32 (...)*** %1, align 8
- %2 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 3 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=2]
- %25 = fmul float %24, 0.000000e+00 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=2]
- %28 = fmul float %27, 0.000000e+00 ; [#uses=2]
- %29 = fadd float %25, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %vec, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fadd float %29, %31 ; [#uses=1]
- %33 = fadd float %25, %27 ; [#uses=1]
- %34 = fmul float %31, 0.000000e+00 ; [#uses=2]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fadd float %24, %28 ; [#uses=1]
- %37 = fadd float %36, %34 ; [#uses=1]
- %38 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %37, float* %38, align 8
- %39 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %35, float* %39, align 4
- %40 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %32, float* %40, align 8
- %41 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %42, align 8
- %43 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %43, align 4
- %44 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %44, align 8
- %45 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- %46 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load i32 (...)*** %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds i32 (...)** %47, i32 15 ; [#uses=1]
- %49 = load i32 (...)** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %50, align 8
- %51 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %51, align 4
- %52 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC3ABC16D60000000, float* %52, align 8
- %53 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 4
- %54 = bitcast i32 (...)* %49 to void (%struct.btTriangleMeshShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %55 = getelementptr inbounds %struct.SupportVertexCallback* %supportCallback, i32 0, i32 0 ; [#uses=3]
- invoke void %54(%struct.btTriangleMeshShape* %this, %struct.btActionInterface* %55, %struct.btQuadWord* %0, %struct.btQuadWord* %aabbMax)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %56 = load float* %2, align 4 ; [#uses=1]
- %57 = load float* %3, align 4 ; [#uses=1]
- %58 = load float* %4, align 4 ; [#uses=1]
- %59 = load float* %5, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %56, float* %60, align 4
- %61 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %57, float* %61, align 4
- %62 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %58, float* %62, align 4
- %63 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %59, float* %63, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21SupportVertexCallback, i32 0, i32 2), i32 (...)*** %1, align 8
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %55)
- ret void
-
-invcont3: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV21SupportVertexCallback, i32 0, i32 2), i32 (...)*** %1, align 8
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %55)
- to label %invcont3 unwind label %lpad7
-
-lpad7: ; preds = %lpad
- %eh_ptr8 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btTriangleMeshShape* nocapture %this, %struct.btActionInterface* %callback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %filterCallback = alloca %struct..0FilteredCallback, align 8 ; [#uses=11]
- %0 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %callback, %struct.btActionInterface** %1, align 4
- %2 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 8
- %5 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 8
- %11 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 8
- %17 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 8
- %23 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 3 ; [#uses=1]
- %27 = load %struct.btStridingMeshInterface** %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btStridingMeshInterface* %27, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 2 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = bitcast i32 (...)* %31 to void (%struct.btStridingMeshInterface*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %33 = getelementptr inbounds %struct..0FilteredCallback* %filterCallback, i32 0, i32 0 ; [#uses=3]
- invoke void %32(%struct.btStridingMeshInterface* %27, %struct.btActionInterface* %33, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- to label %bb3 unwind label %lpad
-
-invcont1: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %entry
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %33)
- ret void
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select5 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- invoke void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %33)
- to label %invcont1 unwind label %lpad6
-
-lpad6: ; preds = %lpad
- %eh_ptr7 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select9 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr7, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_EN16FilteredCallbackD2Ev(%struct..0FilteredCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZNK19btTriangleMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_E16FilteredCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0FilteredCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN31btInternalTriangleIndexCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btTriangleMeshShapeD0Ev(%struct.btTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([20 x i32 (...)*]* @_ZTV19btTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- %2 = bitcast %struct.btTriangleMeshShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btTriangleMeshShapeD1Ev(%struct.btTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([20 x i32 (...)*]* @_ZTV19btTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=9]
-define void @_ZN19btTriangleMeshShapeD2Ev(%struct.btTriangleMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([20 x i32 (...)*]* @_ZTV19btTriangleMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleMeshShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btTriangleMeshShapeC1EP23btStridingMeshInterface(%struct.btTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface) align 2 {
-entry:
- tail call void @_ZN19btTriangleMeshShapeC2EP23btStridingMeshInterface(%struct.btTriangleMeshShape* %this, %struct.btStridingMeshInterface* %meshInterface)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btUniformScalingShapeC2EP13btConvexShapef(%struct.btUniformScalingShape* %this, %struct.btConvexShape* %convexChildShape, float %uniformScalingFactor) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btUniformScalingShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btConvexShape* %convexChildShape, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- store float %uniformScalingFactor, float* %3, align 4
- %4 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 14, i32* %4, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK21btUniformScalingShape7getNameEv(%struct.btUniformScalingShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([20 x i8]* @.str146, i32 0, i32 0)
-}
-
-; [#uses=1]
-define void @_ZNK21btUniformScalingShape37localGetSupportingVertexWithoutMarginERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btUniformScalingShape* nocapture %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 16 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %6(%struct.btQuadWord* noalias sret %memtmp, %struct.btConvexShape* %1, %struct.btQuadWord* %vec)
- %7 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 8 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 8 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fmul float %10, %14 ; [#uses=1]
- %17 = fmul float %8, %14 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK21btUniformScalingShape49batchedUnitVectorGetSupportingVertexWithoutMarginEPK9btVector3PS0_i(%struct.btUniformScalingShape* nocapture %this, %struct.btQuadWord* %vectors, %struct.btQuadWord* %supportVerticesOut, i32 %numVectors) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 17 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btQuadWord* %vectors, %struct.btQuadWord* %supportVerticesOut, i32 %numVectors)
- %7 = icmp sgt i32 %numVectors, 0 ; [#uses=1]
- br i1 %7, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %8 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %16, %bb ] ; [#uses=5]
- %scevgep6 = getelementptr inbounds %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 0 ; [#uses=2]
- %scevgep7 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 1 ; [#uses=2]
- %scevgep8 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 2 ; [#uses=2]
- %scevgep9 = getelementptr %struct.btQuadWord* %supportVerticesOut, i32 %i.05, i32 0, i32 3 ; [#uses=1]
- %9 = load float* %scevgep8, align 4 ; [#uses=1]
- %10 = load float* %8, align 4 ; [#uses=3]
- %11 = fmul float %9, %10 ; [#uses=1]
- %12 = load float* %scevgep7, align 4 ; [#uses=1]
- %13 = fmul float %12, %10 ; [#uses=1]
- %14 = load float* %scevgep6, align 4 ; [#uses=1]
- %15 = fmul float %14, %10 ; [#uses=1]
- store float %15, float* %scevgep6, align 4
- store float %13, float* %scevgep7, align 4
- store float %11, float* %scevgep8, align 4
- store float 0.000000e+00, float* %scevgep9, align 4
- %16 = add nsw i32 %i.05, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %16, %numVectors ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK21btUniformScalingShape24localGetSupportingVertexERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btUniformScalingShape* nocapture %this, %struct.btQuadWord* %vec) align 2 {
-entry:
- %memtmp = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 15 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %6(%struct.btQuadWord* noalias sret %memtmp, %struct.btConvexShape* %1, %struct.btQuadWord* %vec)
- %7 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 8 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %memtmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 8 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fmul float %10, %14 ; [#uses=1]
- %17 = fmul float %8, %14 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK21btUniformScalingShape21calculateLocalInertiaEfR9btVector3(%struct.btUniformScalingShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %tmpInertia = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 8 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0 ; [#uses=1]
- %7 = bitcast i32 (...)* %5 to void (%struct.btCollisionShape*, float, %struct.btQuadWord*)* ; [#uses=1]
- call void %7(%struct.btCollisionShape* %6, float %mass, %struct.btQuadWord* %tmpInertia)
- %8 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %tmpInertia, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 8 ; [#uses=1]
- %11 = load float* %8, align 4 ; [#uses=3]
- %12 = fmul float %10, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %tmpInertia, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %14, %11 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %tmpInertia, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 8 ; [#uses=1]
- %18 = fmul float %17, %11 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %15, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %12, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK21btUniformScalingShape7getAabbERK11btTransformR9btVector3S4_(%struct.btUniformScalingShape* nocapture %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = fadd float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fadd float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fadd float %18, %20 ; [#uses=1]
- %22 = fmul float %11, 5.000000e-01 ; [#uses=2]
- %23 = fmul float %16, 5.000000e-01 ; [#uses=2]
- %24 = fmul float %21, 5.000000e-01 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- %26 = fsub float %8, %10 ; [#uses=1]
- %27 = fsub float %13, %15 ; [#uses=1]
- %28 = fsub float %18, %20 ; [#uses=1]
- %29 = fmul float %26, 5.000000e-01 ; [#uses=1]
- %30 = fmul float %27, 5.000000e-01 ; [#uses=1]
- %31 = fmul float %28, 5.000000e-01 ; [#uses=1]
- %32 = load float* %25, align 4 ; [#uses=3]
- %33 = fmul float %29, %32 ; [#uses=2]
- %34 = fmul float %30, %32 ; [#uses=2]
- %35 = fmul float %31, %32 ; [#uses=2]
- %36 = fsub float %22, %33 ; [#uses=1]
- %37 = fsub float %23, %34 ; [#uses=1]
- %38 = fsub float %24, %35 ; [#uses=1]
- store float %38, float* %19, align 4
- store float %37, float* %14, align 4
- store float %36, float* %9, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- %40 = fadd float %22, %33 ; [#uses=1]
- %41 = fadd float %23, %34 ; [#uses=1]
- %42 = fadd float %24, %35 ; [#uses=1]
- store float %42, float* %17, align 4
- store float %41, float* %12, align 4
- store float %40, float* %7, align 4
- %43 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK21btUniformScalingShape11getAabbSlowERK11btTransformR9btVector3S4_(%struct.btUniformScalingShape* nocapture %this, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 18 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %7 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = fadd float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fadd float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fadd float %18, %20 ; [#uses=1]
- %22 = fmul float %11, 5.000000e-01 ; [#uses=2]
- %23 = fmul float %16, 5.000000e-01 ; [#uses=2]
- %24 = fmul float %21, 5.000000e-01 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- %26 = fsub float %8, %10 ; [#uses=1]
- %27 = fsub float %13, %15 ; [#uses=1]
- %28 = fsub float %18, %20 ; [#uses=1]
- %29 = fmul float %26, 5.000000e-01 ; [#uses=1]
- %30 = fmul float %27, 5.000000e-01 ; [#uses=1]
- %31 = fmul float %28, 5.000000e-01 ; [#uses=1]
- %32 = load float* %25, align 4 ; [#uses=3]
- %33 = fmul float %29, %32 ; [#uses=2]
- %34 = fmul float %30, %32 ; [#uses=2]
- %35 = fmul float %31, %32 ; [#uses=2]
- %36 = fsub float %22, %33 ; [#uses=1]
- %37 = fsub float %23, %34 ; [#uses=1]
- %38 = fsub float %24, %35 ; [#uses=1]
- store float %38, float* %19, align 4
- store float %37, float* %14, align 4
- store float %36, float* %9, align 4
- %39 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- %40 = fadd float %22, %33 ; [#uses=1]
- %41 = fadd float %23, %34 ; [#uses=1]
- %42 = fadd float %24, %35 ; [#uses=1]
- store float %42, float* %17, align 4
- store float %41, float* %12, align 4
- store float %40, float* %7, align 4
- %43 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btUniformScalingShape15setLocalScalingERK9btVector3(%struct.btUniformScalingShape* nocapture %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 6 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, %struct.btQuadWord* %scaling)
- ret void
-}
-
-; [#uses=1]
-define %struct.btQuadWord* @_ZNK21btUniformScalingShape15getLocalScalingEv(%struct.btUniformScalingShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 7 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to %struct.btQuadWord* (%struct.btConvexShape*)* ; [#uses=1]
- %7 = tail call %struct.btQuadWord* %6(%struct.btConvexShape* %1) ; [#uses=1]
- ret %struct.btQuadWord* %7
-}
-
-; [#uses=1]
-define void @_ZN21btUniformScalingShape9setMarginEf(%struct.btUniformScalingShape* nocapture %this, float %margin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 10 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, float)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, float %margin)
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK21btUniformScalingShape9getMarginEv(%struct.btUniformScalingShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 11 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to float (%struct.btConvexShape*)* ; [#uses=1]
- %7 = tail call float %6(%struct.btConvexShape* %1) ; [#uses=1]
- %8 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fmul float %7, %9 ; [#uses=1]
- ret float %10
-}
-
-; [#uses=1]
-define i32 @_ZNK21btUniformScalingShape36getNumPreferredPenetrationDirectionsEv(%struct.btUniformScalingShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 19 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i32 (%struct.btConvexShape*)* ; [#uses=1]
- %7 = tail call i32 %6(%struct.btConvexShape* %1) ; [#uses=1]
- ret i32 %7
-}
-
-; [#uses=1]
-define void @_ZNK21btUniformScalingShape32getPreferredPenetrationDirectionEiR9btVector3(%struct.btUniformScalingShape* nocapture %this, i32 %index, %struct.btQuadWord* %penetrationVector) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btConvexShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btConvexShape* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 20 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btConvexShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %6(%struct.btConvexShape* %1, i32 %index, %struct.btQuadWord* %penetrationVector)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btUniformScalingShapeD0Ev(%struct.btUniformScalingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btUniformScalingShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btUniformScalingShape* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btUniformScalingShapeD1Ev(%struct.btUniformScalingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btUniformScalingShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btUniformScalingShapeD2Ev(%struct.btUniformScalingShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btUniformScalingShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btUniformScalingShapeC1EP13btConvexShapef(%struct.btUniformScalingShape* %this, %struct.btConvexShape* %convexChildShape, float %uniformScalingFactor) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeC2Ev(%struct.btConvexShape* %0)
- %1 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btUniformScalingShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btConvexShape* %convexChildShape, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 2 ; [#uses=1]
- store float %uniformScalingFactor, float* %3, align 4
- %4 = getelementptr inbounds %struct.btUniformScalingShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 14, i32* %4, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btContactArray14merge_contactsERKS_b(%struct.btContactArray* nocapture %this, %struct.btContactArray* nocapture %contacts, i8 zeroext %normal_contact_average) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %keycontacts = alloca %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>", align 8 ; [#uses=5]
- %coincident_normals = alloca [8 x %struct.btQuadWord], align 8 ; [#uses=7]
- %1 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 3 ; [#uses=8]
- %2 = load %struct.GIM_CONTACT** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.GIM_CONTACT* %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %6 = bitcast %struct.GIM_CONTACT* %2 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.GIM_CONTACT* null, %struct.GIM_CONTACT** %1, align 4
- br label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit
-
-_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit: ; preds = %bb2.i.i, %entry
- %7 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.GIM_CONTACT* null, %struct.GIM_CONTACT** %1, align 4
- %8 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 1 ; [#uses=12]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 2 ; [#uses=3]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btContactArray* %contacts, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load i32* %10, align 4 ; [#uses=4]
- switch i32 %11, label %bb3 [
- i32 0, label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENED1Ev.exit52
- i32 1, label %bb1.i57
- ]
-
-bb1.i57: ; preds = %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit
- %12 = getelementptr inbounds %struct.btContactArray* %contacts, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load %struct.GIM_CONTACT** %12, align 4 ; [#uses=11]
- %14 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI11GIM_CONTACTE7reserveEi(%"struct.btAlignedObjectArray<GIM_CONTACT>"* %14, i32 1) inlinehint
- %.pre.i55 = load i32* %8, align 4 ; [#uses=13]
- %.pre = load %struct.GIM_CONTACT** %1, align 4 ; [#uses=12]
- %15 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55 ; [#uses=1]
- %16 = icmp eq %struct.GIM_CONTACT* %15, null ; [#uses=1]
- br i1 %16, label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE9push_backERKS0_.exit60, label %bb2.i59
-
-bb2.i59: ; preds = %bb1.i57
- %17 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 1, i32 0, i32 0 ; [#uses=1]
- %30 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 1, i32 0, i32 2 ; [#uses=1]
- %36 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 1, i32 0, i32 3 ; [#uses=1]
- %39 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 2 ; [#uses=1]
- store float %42, float* %43, align 4
- %44 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 4 ; [#uses=1]
- %45 = load i32* %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 4 ; [#uses=1]
- store i32 %45, i32* %46, align 4
- %47 = getelementptr inbounds %struct.GIM_CONTACT* %13, i32 0, i32 5 ; [#uses=1]
- %48 = load i32* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i55, i32 5 ; [#uses=1]
- store i32 %48, i32* %49, align 4
- %.pre5.i58 = load i32* %8, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE9push_backERKS0_.exit60
-
-_ZN20btAlignedObjectArrayI11GIM_CONTACTE9push_backERKS0_.exit60: ; preds = %bb2.i59, %bb1.i57
- %50 = phi i32 [ %.pre.i55, %bb1.i57 ], [ %.pre5.i58, %bb2.i59 ] ; [#uses=1]
- %51 = add nsw i32 %50, 1 ; [#uses=1]
- store i32 %51, i32* %8, align 4
- ret void
-
-bb3: ; preds = %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit
- %52 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %keycontacts, i32 0, i32 4 ; [#uses=8]
- store i8 1, i8* %52, align 8
- %53 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %keycontacts, i32 0, i32 3 ; [#uses=16]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %53, align 4
- %54 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %keycontacts, i32 0, i32 1 ; [#uses=9]
- store i32 0, i32* %54, align 4
- %55 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %keycontacts, i32 0, i32 2 ; [#uses=5]
- store i32 0, i32* %55, align 8
- %56 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %56, label %bb.i2.i, label %bb6.preheader
-
-bb.i2.i: ; preds = %bb3
- %57 = shl i32 %11, 3 ; [#uses=1]
- %58 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %57, i32 16)
- to label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i unwind label %lpad ; [#uses=3]
-
-_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i: ; preds = %bb.i2.i
- %phitmp.i = bitcast i8* %58 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %59 = load i32* %54, align 4 ; [#uses=2]
- %60 = icmp sgt i32 %59, 0 ; [#uses=1]
- br i1 %60, label %bb.i4.i, label %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i
-
-bb.i4.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i
- %indvar.i.i = phi i32 [ %indvar.next.i.i, %bb3.i.i ], [ 0, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i ] ; [#uses=4]
- %tmp = shl i32 %indvar.i.i, 3 ; [#uses=2]
- %scevgep133 = getelementptr i8* %58, i32 %tmp ; [#uses=2]
- %61 = icmp eq i8* %scevgep133, null ; [#uses=1]
- br i1 %61, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %tmp135139 = or i32 %tmp, 4 ; [#uses=1]
- %scevgep136 = getelementptr i8* %58, i32 %tmp135139 ; [#uses=1]
- %scevgep12.i.i = bitcast i8* %scevgep136 to i32* ; [#uses=1]
- %scevgep10.i.i = bitcast i8* %scevgep133 to i32* ; [#uses=1]
- %62 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=2]
- %scevgep89.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %62, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %63 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- store i32 %63, i32* %scevgep10.i.i, align 4
- %scevgep11.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %62, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %64 = load i32* %scevgep11.i.i, align 4 ; [#uses=1]
- store i32 %64, i32* %scevgep12.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond129 = icmp eq i32 %indvar.next.i.i, %59 ; [#uses=1]
- br i1 %exitcond129, label %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i
- %65 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=2]
- %66 = icmp eq %struct.CONTACT_KEY_TOKEN* %65, null ; [#uses=1]
- br i1 %66, label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i, label %bb.i.i66
-
-bb.i.i66: ; preds = %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i
- %67 = load i8* %52, align 8 ; [#uses=1]
- %toBool.i.i65 = icmp eq i8 %67, 0 ; [#uses=1]
- br i1 %toBool.i.i65, label %bb2.i.i68, label %bb1.i.i67
-
-bb1.i.i67: ; preds = %bb.i.i66
- %68 = bitcast %struct.CONTACT_KEY_TOKEN* %65 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %68)
- to label %bb2.i.i68 unwind label %lpad
-
-bb2.i.i68: ; preds = %bb1.i.i67, %bb.i.i66
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %53, align 4
- br label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i: ; preds = %bb2.i.i68, %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i
- store i8 1, i8* %52, align 8
- store %struct.CONTACT_KEY_TOKEN* %phitmp.i, %struct.CONTACT_KEY_TOKEN** %53, align 4
- store i32 %11, i32* %55, align 8
- %.pre140.pre = load i32* %54, align 4 ; [#uses=1]
- br label %bb6.preheader
-
-bb6.preheader: ; preds = %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i, %bb3
- %.pre140 = phi i32 [ 0, %bb3 ], [ %.pre140.pre, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i ] ; [#uses=1]
- %69 = getelementptr inbounds %struct.btContactArray* %contacts, i32 0, i32 0, i32 3 ; [#uses=3]
- br label %bb6
-
-bb4: ; preds = %bb6
- %70 = load %struct.GIM_CONTACT** %69, align 4 ; [#uses=3]
- %scevgep127128 = getelementptr inbounds %struct.GIM_CONTACT* %70, i32 %115, i32 0, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %scevgep127128, align 4 ; [#uses=1]
- %72 = fmul float %71, 1.000000e+03 ; [#uses=1]
- %73 = fadd float %72, 1.000000e+00 ; [#uses=1]
- %74 = fptosi float %73 to i32 ; [#uses=1]
- %scevgep126 = getelementptr %struct.GIM_CONTACT* %70, i32 %115, i32 0, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %scevgep126, align 4 ; [#uses=1]
- %76 = fmul float %75, 1.333000e+03 ; [#uses=1]
- %77 = fptosi float %76 to i32 ; [#uses=1]
- %scevgep125 = getelementptr %struct.GIM_CONTACT* %70, i32 %115, i32 0, i32 0, i32 2 ; [#uses=1]
- %78 = load float* %scevgep125, align 4 ; [#uses=1]
- %79 = fmul float %78, 2.133000e+03 ; [#uses=1]
- %80 = fadd float %79, 3.000000e+00 ; [#uses=1]
- %81 = fptosi float %80 to i32 ; [#uses=1]
- %82 = shl i32 %77, 4 ; [#uses=1]
- %83 = shl i32 %81, 8 ; [#uses=1]
- %84 = add i32 %82, %74 ; [#uses=1]
- %85 = add i32 %84, %83 ; [#uses=1]
- %86 = load i32* %55, align 8 ; [#uses=2]
- %87 = icmp eq i32 %86, %114 ; [#uses=1]
- br i1 %87, label %bb.i83, label %bb1.i91
-
-bb.i83: ; preds = %bb4
- %88 = icmp eq i32 %114, 0 ; [#uses=1]
- %89 = shl i32 %114, 1 ; [#uses=1]
- %iftmp.280.0.i.i = select i1 %88, i32 1, i32 %89 ; [#uses=4]
- %90 = icmp slt i32 %86, %iftmp.280.0.i.i ; [#uses=1]
- br i1 %90, label %bb.i.i84, label %bb1.i91
-
-bb.i.i84: ; preds = %bb.i83
- %91 = icmp eq i32 %iftmp.280.0.i.i, 0 ; [#uses=1]
- br i1 %91, label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i84
- %92 = shl i32 %iftmp.280.0.i.i, 3 ; [#uses=1]
- %93 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %92, i32 16)
- to label %.noexc93 unwind label %lpad ; [#uses=1]
-
-.noexc93: ; preds = %bb.i2.i.i
- %phitmp.i.i = bitcast i8* %93 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %.pre.i85 = load i32* %54, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i.i: ; preds = %.noexc93, %bb.i.i84
- %94 = phi i32 [ %.pre.i85, %.noexc93 ], [ %114, %bb.i.i84 ] ; [#uses=2]
- %95 = phi %struct.CONTACT_KEY_TOKEN* [ %phitmp.i.i, %.noexc93 ], [ null, %bb.i.i84 ] ; [#uses=4]
- %96 = icmp sgt i32 %94, 0 ; [#uses=1]
- br i1 %96, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i.i ] ; [#uses=6]
- %scevgep.i.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %95, i32 %indvar.i.i.i ; [#uses=1]
- %97 = icmp eq %struct.CONTACT_KEY_TOKEN* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %97, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %scevgep12.i.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %95, i32 %indvar.i.i.i, i32 1 ; [#uses=1]
- %scevgep10.i.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %95, i32 %indvar.i.i.i, i32 0 ; [#uses=1]
- %98 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=2]
- %scevgep89.i.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %98, i32 %indvar.i.i.i, i32 0 ; [#uses=1]
- %99 = load i32* %scevgep89.i.i.i, align 4 ; [#uses=1]
- store i32 %99, i32* %scevgep10.i.i.i, align 4
- %scevgep11.i.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %98, i32 %indvar.i.i.i, i32 1 ; [#uses=1]
- %100 = load i32* %scevgep11.i.i.i, align 4 ; [#uses=1]
- store i32 %100, i32* %scevgep12.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond118 = icmp eq i32 %indvar.next.i.i.i, %94 ; [#uses=1]
- br i1 %exitcond118, label %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE8allocateEi.exit.i.i
- %101 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=2]
- %102 = icmp eq %struct.CONTACT_KEY_TOKEN* %101, null ; [#uses=1]
- br i1 %102, label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i.i, label %bb.i.i.i88
-
-bb.i.i.i88: ; preds = %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i.i
- %103 = load i8* %52, align 8 ; [#uses=1]
- %toBool.i.i.i87 = icmp eq i8 %103, 0 ; [#uses=1]
- br i1 %toBool.i.i.i87, label %bb2.i.i.i90, label %bb1.i.i.i89
-
-bb1.i.i.i89: ; preds = %bb.i.i.i88
- %104 = bitcast %struct.CONTACT_KEY_TOKEN* %101 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %104)
- to label %bb2.i.i.i90 unwind label %lpad
-
-bb2.i.i.i90: ; preds = %bb1.i.i.i89, %bb.i.i.i88
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %53, align 4
- br label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i90, %_ZNK20btAlignedObjectArrayI17CONTACT_KEY_TOKENE4copyEiiPS0_.exit.i.i
- store i8 1, i8* %52, align 8
- store %struct.CONTACT_KEY_TOKEN* %95, %struct.CONTACT_KEY_TOKEN** %53, align 4
- store i32 %iftmp.280.0.i.i, i32* %55, align 8
- %.pre9.i = load i32* %54, align 4 ; [#uses=1]
- br label %bb1.i91
-
-bb1.i91: ; preds = %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i.i, %bb.i83, %bb4
- %105 = phi i32 [ %.pre9.i, %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE10deallocateEv.exit.i.i ], [ %114, %bb4 ], [ %114, %bb.i83 ] ; [#uses=4]
- %106 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=3]
- %107 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %106, i32 %105 ; [#uses=1]
- %108 = icmp eq %struct.CONTACT_KEY_TOKEN* %107, null ; [#uses=1]
- br i1 %108, label %invcont5, label %bb2.i92
-
-bb2.i92: ; preds = %bb1.i91
- %109 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %106, i32 %105, i32 0 ; [#uses=1]
- store i32 %85, i32* %109, align 4
- %110 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %106, i32 %105, i32 1 ; [#uses=1]
- store i32 %115, i32* %110, align 4
- %.pre10.i = load i32* %54, align 4 ; [#uses=1]
- br label %invcont5
-
-invcont5: ; preds = %bb2.i92, %bb1.i91
- %111 = phi i32 [ %105, %bb1.i91 ], [ %.pre10.i, %bb2.i92 ] ; [#uses=1]
- %112 = add nsw i32 %111, 1 ; [#uses=2]
- store i32 %112, i32* %54, align 4
- %113 = add nsw i32 %115, 1 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %invcont5, %bb6.preheader
- %114 = phi i32 [ %112, %invcont5 ], [ %.pre140, %bb6.preheader ] ; [#uses=8]
- %115 = phi i32 [ %113, %invcont5 ], [ 0, %bb6.preheader ] ; [#uses=6]
- %116 = load i32* %10, align 4 ; [#uses=1]
- %117 = icmp sgt i32 %116, %115 ; [#uses=1]
- br i1 %117, label %bb4, label %bb8
-
-bb8: ; preds = %bb6
- %118 = icmp sgt i32 %114, 1 ; [#uses=1]
- br i1 %118, label %bb.i81, label %bb12
-
-bb.i81: ; preds = %bb8
- %119 = add nsw i32 %114, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE17quickSortInternalI22CONTACT_KEY_TOKEN_COMPEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %keycontacts, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %119) nounwind
- br label %bb12
-
-bb12: ; preds = %bb.i81, %bb8
- %120 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=2]
- %121 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %120, i32 0, i32 0 ; [#uses=1]
- %122 = load i32* %121, align 4 ; [#uses=1]
- %123 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %120, i32 0, i32 1 ; [#uses=1]
- %124 = load i32* %123, align 4 ; [#uses=11]
- %125 = load %struct.GIM_CONTACT** %69, align 4 ; [#uses=11]
- %126 = load i32* %8, align 4 ; [#uses=4]
- %127 = load i32* %9, align 4 ; [#uses=1]
- %128 = icmp eq i32 %127, %126 ; [#uses=1]
- br i1 %128, label %bb.i74, label %bb1.i75
-
-bb.i74: ; preds = %bb12
- %129 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0 ; [#uses=1]
- %130 = icmp eq i32 %126, 0 ; [#uses=1]
- %131 = shl i32 %126, 1 ; [#uses=1]
- %iftmp.278.0.i.i72 = select i1 %130, i32 1, i32 %131 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI11GIM_CONTACTE7reserveEi(%"struct.btAlignedObjectArray<GIM_CONTACT>"* %129, i32 %iftmp.278.0.i.i72) inlinehint
- to label %.noexc78 unwind label %lpad
-
-.noexc78: ; preds = %bb.i74
- %.pre.i73 = load i32* %8, align 4 ; [#uses=1]
- br label %bb1.i75
-
-bb1.i75: ; preds = %.noexc78, %bb12
- %132 = phi i32 [ %.pre.i73, %.noexc78 ], [ %126, %bb12 ] ; [#uses=13]
- %133 = load %struct.GIM_CONTACT** %1, align 4 ; [#uses=13]
- %134 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132 ; [#uses=1]
- %135 = icmp eq %struct.GIM_CONTACT* %134, null ; [#uses=1]
- br i1 %135, label %invcont13, label %bb2.i77
-
-bb2.i77: ; preds = %bb1.i75
- %136 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 0, i32 0, i32 0 ; [#uses=1]
- %137 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 0, i32 0, i32 0 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- store float %138, float* %136, align 4
- %139 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 0, i32 0, i32 1 ; [#uses=1]
- %140 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 0, i32 0, i32 1 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- store float %141, float* %139, align 4
- %142 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 0, i32 0, i32 2 ; [#uses=1]
- %143 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 0, i32 0, i32 2 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=1]
- store float %144, float* %142, align 4
- %145 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 0, i32 0, i32 3 ; [#uses=1]
- %146 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 0, i32 0, i32 3 ; [#uses=1]
- %147 = load float* %146, align 4 ; [#uses=1]
- store float %147, float* %145, align 4
- %148 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 1, i32 0, i32 0 ; [#uses=1]
- %149 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 1, i32 0, i32 0 ; [#uses=1]
- %150 = load float* %149, align 4 ; [#uses=1]
- store float %150, float* %148, align 4
- %151 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 1, i32 0, i32 1 ; [#uses=1]
- %152 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 1, i32 0, i32 1 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- store float %153, float* %151, align 4
- %154 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 1, i32 0, i32 2 ; [#uses=1]
- %155 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 1, i32 0, i32 2 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- store float %156, float* %154, align 4
- %157 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 1, i32 0, i32 3 ; [#uses=1]
- %158 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 1, i32 0, i32 3 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- store float %159, float* %157, align 4
- %160 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 2 ; [#uses=1]
- %161 = load float* %160, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 2 ; [#uses=1]
- store float %161, float* %162, align 4
- %163 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 4 ; [#uses=1]
- %164 = load i32* %163, align 4 ; [#uses=1]
- %165 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 4 ; [#uses=1]
- store i32 %164, i32* %165, align 4
- %166 = getelementptr inbounds %struct.GIM_CONTACT* %125, i32 %124, i32 5 ; [#uses=1]
- %167 = load i32* %166, align 4 ; [#uses=1]
- %168 = getelementptr inbounds %struct.GIM_CONTACT* %133, i32 %132, i32 5 ; [#uses=1]
- store i32 %167, i32* %168, align 4
- %.pre5.i76 = load i32* %8, align 4 ; [#uses=1]
- %.pre141 = load %struct.GIM_CONTACT** %1, align 4 ; [#uses=1]
- br label %invcont13
-
-invcont13: ; preds = %bb2.i77, %bb1.i75
- %169 = phi %struct.GIM_CONTACT* [ %133, %bb1.i75 ], [ %.pre141, %bb2.i77 ] ; [#uses=1]
- %170 = phi i32 [ %132, %bb1.i75 ], [ %.pre5.i76, %bb2.i77 ] ; [#uses=1]
- %171 = add nsw i32 %170, 1 ; [#uses=1]
- store i32 %171, i32* %8, align 4
- %toBool18 = icmp eq i8 %normal_contact_average, 0 ; [#uses=1]
- %toBool24.not = icmp ne i8 %normal_contact_average, 0 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0 ; [#uses=1]
- br label %bb30
-
-bb14: ; preds = %bb30
- %scevgep113114 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %277, i32 %indvar, i32 0 ; [#uses=1]
- %173 = load i32* %scevgep113114, align 4 ; [#uses=2]
- %scevgep112 = getelementptr %struct.CONTACT_KEY_TOKEN* %277, i32 %indvar, i32 1 ; [#uses=1]
- %174 = load i32* %scevgep112, align 4 ; [#uses=17]
- %175 = load %struct.GIM_CONTACT** %69, align 4 ; [#uses=17]
- %176 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174 ; [#uses=1]
- %177 = icmp eq i32 %last_key.0, %173 ; [#uses=1]
- br i1 %177, label %bb15, label %bb23
-
-bb15: ; preds = %bb14
- %178 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 2 ; [#uses=1]
- %179 = load float* %178, align 4 ; [#uses=2]
- %180 = fadd float %179, 0xBEE4F8B580000000 ; [#uses=1]
- %181 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 2 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=2]
- %183 = fcmp ogt float %180, %182 ; [#uses=1]
- br i1 %183, label %bb16, label %bb17
-
-bb16: ; preds = %bb15
- %184 = bitcast %struct.GIM_CONTACT* %pcontact.1 to i8* ; [#uses=1]
- %185 = bitcast %struct.GIM_CONTACT* %176 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %184, i8* %185, i32 48, i32 4, i1 false)
- br label %bb29
-
-bb17: ; preds = %bb15
- br i1 %toBool18, label %bb29, label %bb19
-
-bb19: ; preds = %bb17
- %186 = fsub float %179, %182 ; [#uses=1]
- %187 = call float @fabsf(float %186) nounwind readnone ; [#uses=1]
- %188 = fcmp olt float %187, 0x3EE4F8B580000000 ; [#uses=1]
- %189 = icmp slt i32 %coincident_count.1, 8 ; [#uses=1]
- %or.cond = and i1 %188, %189 ; [#uses=1]
- br i1 %or.cond, label %bb22, label %bb29
-
-bb22: ; preds = %bb19
- %190 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 0 ; [#uses=1]
- %191 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 0 ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=1]
- store float %192, float* %190, align 8
- %193 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 1 ; [#uses=1]
- %194 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 1 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=1]
- store float %195, float* %193, align 4
- %196 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 2 ; [#uses=1]
- %197 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 2 ; [#uses=1]
- %198 = load float* %197, align 4 ; [#uses=1]
- store float %198, float* %196, align 8
- %199 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 3 ; [#uses=1]
- %200 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 3 ; [#uses=1]
- %201 = load float* %200, align 4 ; [#uses=1]
- store float %201, float* %199, align 4
- %202 = add nsw i32 %coincident_count.1, 1 ; [#uses=1]
- br label %bb29
-
-bb23: ; preds = %bb14
- %203 = icmp sgt i32 %coincident_count.1, 0 ; [#uses=2]
- %or.cond47 = and i1 %toBool24.not, %203 ; [#uses=1]
- br i1 %or.cond47, label %bb26, label %bb27
-
-bb26: ; preds = %bb23
- %204 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %205 = load float* %204, align 4 ; [#uses=2]
- %206 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %207 = load float* %206, align 4 ; [#uses=2]
- %208 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %209 = load float* %208, align 4 ; [#uses=2]
- br i1 %203, label %bb.i61, label %bb2.i62
-
-bb.i61: ; preds = %bb.i61, %bb26
- %i.014.i = phi i32 [ %216, %bb.i61 ], [ 0, %bb26 ] ; [#uses=4]
- %vec_sum.0.0.013.i = phi float [ %211, %bb.i61 ], [ %205, %bb26 ] ; [#uses=1]
- %vec_sum.0.1.012.i = phi float [ %213, %bb.i61 ], [ %207, %bb26 ] ; [#uses=1]
- %vec_sum.0.2.011.i = phi float [ %215, %bb.i61 ], [ %209, %bb26 ] ; [#uses=1]
- %scevgep21.i = getelementptr [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %i.014.i, i32 0, i32 2 ; [#uses=1]
- %scevgep20.i = getelementptr [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %i.014.i, i32 0, i32 1 ; [#uses=1]
- %scevgep19.i = getelementptr [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %i.014.i, i32 0, i32 0 ; [#uses=1]
- %210 = load float* %scevgep19.i, align 8 ; [#uses=1]
- %211 = fadd float %vec_sum.0.0.013.i, %210 ; [#uses=2]
- %212 = load float* %scevgep20.i, align 4 ; [#uses=1]
- %213 = fadd float %vec_sum.0.1.012.i, %212 ; [#uses=2]
- %214 = load float* %scevgep21.i, align 8 ; [#uses=1]
- %215 = fadd float %vec_sum.0.2.011.i, %214 ; [#uses=2]
- %216 = add nsw i32 %i.014.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %216, %coincident_count.1 ; [#uses=1]
- br i1 %exitcond, label %bb2.i62, label %bb.i61
-
-bb2.i62: ; preds = %bb.i61, %bb26
- %vec_sum.0.0.0.lcssa.i = phi float [ %205, %bb26 ], [ %211, %bb.i61 ] ; [#uses=3]
- %vec_sum.0.1.0.lcssa.i = phi float [ %207, %bb26 ], [ %213, %bb.i61 ] ; [#uses=3]
- %vec_sum.0.2.0.lcssa.i = phi float [ %209, %bb26 ], [ %215, %bb.i61 ] ; [#uses=3]
- %217 = fmul float %vec_sum.0.0.0.lcssa.i, %vec_sum.0.0.0.lcssa.i ; [#uses=1]
- %218 = fmul float %vec_sum.0.1.0.lcssa.i, %vec_sum.0.1.0.lcssa.i ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=1]
- %220 = fmul float %vec_sum.0.2.0.lcssa.i, %vec_sum.0.2.0.lcssa.i ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=2]
- %222 = fcmp olt float %221, 0x3EE4F8B580000000 ; [#uses=1]
- br i1 %222, label %bb27, label %bb3.i
-
-bb3.i: ; preds = %bb2.i62
- %223 = call float @sqrtf(float %221) nounwind readonly ; [#uses=1]
- %224 = fdiv float 1.000000e+00, %223 ; [#uses=3]
- %225 = fmul float %vec_sum.0.2.0.lcssa.i, %224 ; [#uses=1]
- %226 = fmul float %vec_sum.0.1.0.lcssa.i, %224 ; [#uses=1]
- %227 = fmul float %vec_sum.0.0.0.lcssa.i, %224 ; [#uses=1]
- store float %227, float* %204, align 4
- store float %226, float* %206, align 4
- store float %225, float* %208, align 4
- %228 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %228, align 4
- br label %bb27
-
-bb27: ; preds = %bb3.i, %bb2.i62, %bb23
- %coincident_count.2 = phi i32 [ 0, %bb3.i ], [ %coincident_count.1, %bb23 ], [ 0, %bb2.i62 ] ; [#uses=1]
- %229 = load i32* %8, align 4 ; [#uses=4]
- %230 = load i32* %9, align 4 ; [#uses=1]
- %231 = icmp eq i32 %230, %229 ; [#uses=1]
- br i1 %231, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb27
- %232 = icmp eq i32 %229, 0 ; [#uses=1]
- %233 = shl i32 %229, 1 ; [#uses=1]
- %iftmp.278.0.i.i = select i1 %232, i32 1, i32 %233 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI11GIM_CONTACTE7reserveEi(%"struct.btAlignedObjectArray<GIM_CONTACT>"* %172, i32 %iftmp.278.0.i.i) inlinehint
- to label %.noexc53 unwind label %lpad
-
-.noexc53: ; preds = %bb.i
- %.pre.i = load i32* %8, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %.noexc53, %bb27
- %234 = phi i32 [ %.pre.i, %.noexc53 ], [ %229, %bb27 ] ; [#uses=13]
- %235 = load %struct.GIM_CONTACT** %1, align 4 ; [#uses=13]
- %236 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234 ; [#uses=1]
- %237 = icmp eq %struct.GIM_CONTACT* %236, null ; [#uses=1]
- br i1 %237, label %invcont28, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %238 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 0, i32 0, i32 0 ; [#uses=1]
- %239 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 0, i32 0, i32 0 ; [#uses=1]
- %240 = load float* %239, align 4 ; [#uses=1]
- store float %240, float* %238, align 4
- %241 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 0, i32 0, i32 1 ; [#uses=1]
- %242 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 0, i32 0, i32 1 ; [#uses=1]
- %243 = load float* %242, align 4 ; [#uses=1]
- store float %243, float* %241, align 4
- %244 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 0, i32 0, i32 2 ; [#uses=1]
- %245 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 0, i32 0, i32 2 ; [#uses=1]
- %246 = load float* %245, align 4 ; [#uses=1]
- store float %246, float* %244, align 4
- %247 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 0, i32 0, i32 3 ; [#uses=1]
- %248 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 0, i32 0, i32 3 ; [#uses=1]
- %249 = load float* %248, align 4 ; [#uses=1]
- store float %249, float* %247, align 4
- %250 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 1, i32 0, i32 0 ; [#uses=1]
- %251 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 0 ; [#uses=1]
- %252 = load float* %251, align 4 ; [#uses=1]
- store float %252, float* %250, align 4
- %253 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 1, i32 0, i32 1 ; [#uses=1]
- %254 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 1 ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=1]
- store float %255, float* %253, align 4
- %256 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 1, i32 0, i32 2 ; [#uses=1]
- %257 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 2 ; [#uses=1]
- %258 = load float* %257, align 4 ; [#uses=1]
- store float %258, float* %256, align 4
- %259 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 1, i32 0, i32 3 ; [#uses=1]
- %260 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 1, i32 0, i32 3 ; [#uses=1]
- %261 = load float* %260, align 4 ; [#uses=1]
- store float %261, float* %259, align 4
- %262 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 2 ; [#uses=1]
- %263 = load float* %262, align 4 ; [#uses=1]
- %264 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 2 ; [#uses=1]
- store float %263, float* %264, align 4
- %265 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 4 ; [#uses=1]
- %266 = load i32* %265, align 4 ; [#uses=1]
- %267 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 4 ; [#uses=1]
- store i32 %266, i32* %267, align 4
- %268 = getelementptr inbounds %struct.GIM_CONTACT* %175, i32 %174, i32 5 ; [#uses=1]
- %269 = load i32* %268, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %struct.GIM_CONTACT* %235, i32 %234, i32 5 ; [#uses=1]
- store i32 %269, i32* %270, align 4
- %.pre5.i = load i32* %8, align 4 ; [#uses=1]
- %.pre142 = load %struct.GIM_CONTACT** %1, align 4 ; [#uses=1]
- br label %invcont28
-
-invcont28: ; preds = %bb2.i, %bb1.i
- %271 = phi %struct.GIM_CONTACT* [ %235, %bb1.i ], [ %.pre142, %bb2.i ] ; [#uses=1]
- %272 = phi i32 [ %234, %bb1.i ], [ %.pre5.i, %bb2.i ] ; [#uses=2]
- %273 = add nsw i32 %272, 1 ; [#uses=1]
- store i32 %273, i32* %8, align 4
- %274 = getelementptr inbounds %struct.GIM_CONTACT* %271, i32 %272 ; [#uses=1]
- br label %bb29
-
-bb29: ; preds = %invcont28, %bb22, %bb19, %bb17, %bb16
- %coincident_count.0 = phi i32 [ 0, %bb16 ], [ %202, %bb22 ], [ %coincident_count.1, %bb19 ], [ %coincident_count.1, %bb17 ], [ %coincident_count.2, %invcont28 ] ; [#uses=1]
- %pcontact.0 = phi %struct.GIM_CONTACT* [ %pcontact.1, %bb16 ], [ %pcontact.1, %bb22 ], [ %pcontact.1, %bb19 ], [ %pcontact.1, %bb17 ], [ %274, %invcont28 ] ; [#uses=1]
- %phitmp = add i32 %indvar, 1 ; [#uses=1]
- br label %bb30
-
-bb30: ; preds = %bb29, %invcont13
- %indvar = phi i32 [ %phitmp, %bb29 ], [ 1, %invcont13 ] ; [#uses=4]
- %coincident_count.1 = phi i32 [ %coincident_count.0, %bb29 ], [ 0, %invcont13 ] ; [#uses=11]
- %last_key.0 = phi i32 [ %173, %bb29 ], [ %122, %invcont13 ] ; [#uses=1]
- %pcontact.1 = phi %struct.GIM_CONTACT* [ %pcontact.0, %bb29 ], [ %169, %invcont13 ] ; [#uses=10]
- %275 = load i32* %54, align 4 ; [#uses=1]
- %276 = icmp sgt i32 %275, %indvar ; [#uses=1]
- %277 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=4]
- br i1 %276, label %bb14, label %bb35
-
-invcont33: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %52, align 8
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %53, align 4
- store i32 0, i32* %54, align 4
- store i32 0, i32* %55, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb35: ; preds = %bb30
- %278 = icmp eq %struct.CONTACT_KEY_TOKEN* %277, null ; [#uses=1]
- br i1 %278, label %_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENED1Ev.exit52, label %bb.i.i.i49
-
-bb.i.i.i49: ; preds = %bb35
- %279 = load i8* %52, align 8 ; [#uses=1]
- %toBool.i.i.i48 = icmp eq i8 %279, 0 ; [#uses=1]
- br i1 %toBool.i.i.i48, label %bb2.i.i.i51, label %bb1.i.i.i50
-
-bb1.i.i.i50: ; preds = %bb.i.i.i49
- %280 = bitcast %struct.CONTACT_KEY_TOKEN* %277 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %280)
- br label %bb2.i.i.i51
-
-bb2.i.i.i51: ; preds = %bb1.i.i.i50, %bb.i.i.i49
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %53, align 4
- ret void
-
-_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENED1Ev.exit52: ; preds = %bb35, %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit
- ret void
-
-lpad: ; preds = %bb.i, %bb.i74, %bb1.i.i.i89, %bb.i2.i.i, %bb1.i.i67, %bb.i2.i
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select38 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %281 = load %struct.CONTACT_KEY_TOKEN** %53, align 4 ; [#uses=2]
- %282 = icmp eq %struct.CONTACT_KEY_TOKEN* %281, null ; [#uses=1]
- br i1 %282, label %invcont33, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %283 = load i8* %52, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %283, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %284 = bitcast %struct.CONTACT_KEY_TOKEN* %281 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %284)
- to label %bb2.i.i.i unwind label %lpad39
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %53, align 4
- br label %invcont33
-
-lpad39: ; preds = %bb1.i.i.i
- %eh_ptr40 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select42 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr40, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE17quickSortInternalI22CONTACT_KEY_TOKEN_COMPEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %CompareFunc, i32 %lo, i32 %hi) nounwind align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.CONTACT_KEY_TOKEN** %2, align 4 ; [#uses=1]
- %4 = add nsw i32 %hi, %lo ; [#uses=1]
- %5 = sdiv i32 %4, 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %3, i32 %5, i32 0 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=4]
- br label %bb1.outer
-
-bb1.outer: ; preds = %bb7, %entry
- %i.0.ph = phi i32 [ %lo, %entry ], [ %i.1, %bb7 ] ; [#uses=3]
- %j.1.ph = phi i32 [ %hi, %entry ], [ %j.2, %bb7 ] ; [#uses=3]
- %8 = load %struct.CONTACT_KEY_TOKEN** %2, align 4 ; [#uses=7]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %i.0.ph, i32 0 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=2]
- %11 = icmp ult i32 %10, %7 ; [#uses=1]
- br i1 %11, label %bb.nph16, label %bb3.preheader
-
-bb.nph16: ; preds = %bb1.outer
- %tmp24 = add i32 %i.0.ph, 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph16
- %indvar22 = phi i32 [ 0, %bb.nph16 ], [ %indvar.next23, %bb ] ; [#uses=2]
- %tmp25 = add i32 %tmp24, %indvar22 ; [#uses=2]
- %scevgep2627 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %tmp25, i32 0 ; [#uses=1]
- %12 = load i32* %scevgep2627, align 4 ; [#uses=2]
- %13 = icmp ult i32 %12, %7 ; [#uses=1]
- %indvar.next23 = add i32 %indvar22, 1 ; [#uses=1]
- br i1 %13, label %bb, label %bb3.preheader
-
-bb3.preheader: ; preds = %bb, %bb1.outer
- %14 = phi i32 [ %10, %bb1.outer ], [ %12, %bb ] ; [#uses=1]
- %i.0.lcssa = phi i32 [ %i.0.ph, %bb1.outer ], [ %tmp25, %bb ] ; [#uses=5]
- %15 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %j.1.ph, i32 0 ; [#uses=1]
- %16 = load i32* %15, align 4 ; [#uses=2]
- %17 = icmp ult i32 %7, %16 ; [#uses=1]
- br i1 %17, label %bb.nph, label %bb5
-
-bb.nph: ; preds = %bb3.preheader
- %tmp18 = add i32 %j.1.ph, -1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb2 ] ; [#uses=2]
- %tmp19 = sub i32 %tmp18, %indvar ; [#uses=2]
- %scevgep20 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %tmp19, i32 0 ; [#uses=1]
- %18 = load i32* %scevgep20, align 4 ; [#uses=2]
- %19 = icmp ult i32 %7, %18 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br i1 %19, label %bb2, label %bb5
-
-bb5: ; preds = %bb2, %bb3.preheader
- %20 = phi i32 [ %16, %bb3.preheader ], [ %18, %bb2 ] ; [#uses=1]
- %j.0.lcssa = phi i32 [ %j.1.ph, %bb3.preheader ], [ %tmp19, %bb2 ] ; [#uses=6]
- %21 = icmp sgt i32 %i.0.lcssa, %j.0.lcssa ; [#uses=1]
- br i1 %21, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %22 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %i.0.lcssa, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %i.0.lcssa, i32 1 ; [#uses=2]
- %24 = load i32* %23, align 4 ; [#uses=1]
- store i32 %20, i32* %22, align 4
- %25 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %j.0.lcssa, i32 1 ; [#uses=1]
- %26 = load i32* %25, align 4 ; [#uses=1]
- store i32 %26, i32* %23, align 4
- %27 = load %struct.CONTACT_KEY_TOKEN** %2, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %27, i32 %j.0.lcssa, i32 0 ; [#uses=1]
- store i32 %14, i32* %28, align 4
- %29 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %27, i32 %j.0.lcssa, i32 1 ; [#uses=1]
- store i32 %24, i32* %29, align 4
- %30 = add nsw i32 %i.0.lcssa, 1 ; [#uses=1]
- %31 = add nsw i32 %j.0.lcssa, -1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %i.1 = phi i32 [ %30, %bb6 ], [ %i.0.lcssa, %bb5 ] ; [#uses=4]
- %j.2 = phi i32 [ %31, %bb6 ], [ %j.0.lcssa, %bb5 ] ; [#uses=4]
- %32 = icmp sgt i32 %i.1, %j.2 ; [#uses=1]
- br i1 %32, label %bb8, label %bb1.outer
-
-bb8: ; preds = %bb7
- %33 = icmp sgt i32 %j.2, %lo ; [#uses=1]
- br i1 %33, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- call void @_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE17quickSortInternalI22CONTACT_KEY_TOKEN_COMPEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 %lo, i32 %j.2)
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %34 = icmp slt i32 %i.1, %hi ; [#uses=1]
- br i1 %34, label %bb11, label %return
-
-bb11: ; preds = %bb10
- call void @_ZN20btAlignedObjectArrayI17CONTACT_KEY_TOKENE17quickSortInternalI22CONTACT_KEY_TOKEN_COMPEEvT_ii(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 %i.1, i32 %hi)
- ret void
-
-return: ; preds = %bb10
- ret void
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI11GIM_CONTACTE7reserveEi(%"struct.btAlignedObjectArray<GIM_CONTACT>"* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_CONTACT>"* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = mul i32 %_Count, 48 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.GIM_CONTACT* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI11GIM_CONTACTE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.GIM_CONTACT* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=13]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_CONTACT>"* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI11GIM_CONTACTE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI11GIM_CONTACTE8allocateEi.exit
- %10 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_CONTACT>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb3.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=24]
- %scevgep.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i ; [#uses=1]
- %11 = icmp eq %struct.GIM_CONTACT* %scevgep.i, null ; [#uses=1]
- br i1 %11, label %bb3.i, label %bb1.i5
-
-bb1.i5: ; preds = %bb.i4
- %scevgep11.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep19.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep21.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep23.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep26.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 2 ; [#uses=1]
- %scevgep28.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 4 ; [#uses=1]
- %scevgep30.i = getelementptr %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 5 ; [#uses=1]
- %scevgep8.i = getelementptr inbounds %struct.GIM_CONTACT* %6, i32 %indvar.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load %struct.GIM_CONTACT** %10, align 4 ; [#uses=11]
- %scevgep910.i = getelementptr inbounds %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %scevgep910.i, align 4 ; [#uses=1]
- store float %13, float* %scevgep8.i, align 4
- %scevgep12.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %scevgep12.i, align 4 ; [#uses=1]
- store float %14, float* %scevgep11.i, align 4
- %scevgep14.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %scevgep14.i, align 4 ; [#uses=1]
- store float %15, float* %scevgep13.i, align 4
- %scevgep16.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %scevgep16.i, align 4 ; [#uses=1]
- store float %16, float* %scevgep15.i, align 4
- %scevgep18.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %scevgep18.i, align 4 ; [#uses=1]
- store float %17, float* %scevgep17.i, align 4
- %scevgep20.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %scevgep20.i, align 4 ; [#uses=1]
- store float %18, float* %scevgep19.i, align 4
- %scevgep22.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %scevgep22.i, align 4 ; [#uses=1]
- store float %19, float* %scevgep21.i, align 4
- %scevgep24.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 1, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %scevgep24.i, align 4 ; [#uses=1]
- store float %20, float* %scevgep23.i, align 4
- %scevgep25.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 2 ; [#uses=1]
- %21 = load float* %scevgep25.i, align 4 ; [#uses=1]
- store float %21, float* %scevgep26.i, align 4
- %scevgep27.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 4 ; [#uses=1]
- %22 = load i32* %scevgep27.i, align 4 ; [#uses=1]
- store i32 %22, i32* %scevgep28.i, align 4
- %scevgep29.i = getelementptr %struct.GIM_CONTACT* %12, i32 %indvar.i, i32 5 ; [#uses=1]
- %23 = load i32* %scevgep29.i, align 4 ; [#uses=1]
- store i32 %23, i32* %scevgep30.i, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i5, %bb.i4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI11GIM_CONTACTE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI11GIM_CONTACTE4copyEiiPS0_.exit: ; preds = %bb3.i, %_ZN20btAlignedObjectArrayI11GIM_CONTACTE8allocateEi.exit
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_CONTACT>"* %this, i32 0, i32 3 ; [#uses=3]
- %25 = load %struct.GIM_CONTACT** %24, align 4 ; [#uses=2]
- %26 = icmp eq %struct.GIM_CONTACT* %25, null ; [#uses=1]
- br i1 %26, label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI11GIM_CONTACTE4copyEiiPS0_.exit
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_CONTACT>"* %this, i32 0, i32 4 ; [#uses=1]
- %28 = load i8* %27, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %28, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %29 = bitcast %struct.GIM_CONTACT* %25 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %29)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.GIM_CONTACT* null, %struct.GIM_CONTACT** %24, align 4
- br label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI11GIM_CONTACTE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI11GIM_CONTACTE4copyEiiPS0_.exit
- %30 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_CONTACT>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %30, align 4
- store %struct.GIM_CONTACT* %6, %struct.GIM_CONTACT** %24, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btContactArray21merge_contacts_uniqueERKS_(%struct.btContactArray* nocapture %this, %struct.btContactArray* nocapture %contacts) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 3 ; [#uses=4]
- %1 = load %struct.GIM_CONTACT** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.GIM_CONTACT* %1, null ; [#uses=1]
- br i1 %2, label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %5 = bitcast %struct.GIM_CONTACT* %1 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %5)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.GIM_CONTACT* null, %struct.GIM_CONTACT** %0, align 4
- br label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit
-
-_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit: ; preds = %bb2.i.i, %entry
- %6 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %6, align 4
- store %struct.GIM_CONTACT* null, %struct.GIM_CONTACT** %0, align 4
- %7 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 1 ; [#uses=4]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btContactArray* %contacts, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=3]
- %11 = icmp eq i32 %10, 0 ; [#uses=1]
- br i1 %11, label %bb7, label %bb
-
-bb: ; preds = %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit
- %12 = icmp eq i32 %10, 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btContactArray* %contacts, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load %struct.GIM_CONTACT** %13, align 4 ; [#uses=11]
- br i1 %12, label %bb1.i, label %bb5.preheader
-
-bb5.preheader: ; preds = %bb
- %15 = icmp sgt i32 %10, 1 ; [#uses=0]
- ret void
-
-bb1.i: ; preds = %bb
- %16 = getelementptr inbounds %struct.btContactArray* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI11GIM_CONTACTE7reserveEi(%"struct.btAlignedObjectArray<GIM_CONTACT>"* %16, i32 1) inlinehint
- %.pre.i = load i32* %7, align 4 ; [#uses=13]
- %.pre = load %struct.GIM_CONTACT** %0, align 4 ; [#uses=12]
- %17 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i ; [#uses=1]
- %18 = icmp eq %struct.GIM_CONTACT* %17, null ; [#uses=1]
- br i1 %18, label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE9push_backERKS0_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %19 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %29 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 1, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 1, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 2 ; [#uses=1]
- store float %44, float* %45, align 4
- %46 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 4 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 4 ; [#uses=1]
- store i32 %47, i32* %48, align 4
- %49 = getelementptr inbounds %struct.GIM_CONTACT* %14, i32 0, i32 5 ; [#uses=1]
- %50 = load i32* %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.GIM_CONTACT* %.pre, i32 %.pre.i, i32 5 ; [#uses=1]
- store i32 %50, i32* %51, align 4
- %.pre5.i = load i32* %7, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI11GIM_CONTACTE9push_backERKS0_.exit
-
-_ZN20btAlignedObjectArrayI11GIM_CONTACTE9push_backERKS0_.exit: ; preds = %bb2.i, %bb1.i
- %52 = phi i32 [ %.pre.i, %bb1.i ], [ %.pre5.i, %bb2.i ] ; [#uses=1]
- %53 = add nsw i32 %52, 1 ; [#uses=1]
- store i32 %53, i32* %7, align 4
- ret void
-
-bb7: ; preds = %_ZN20btAlignedObjectArrayI11GIM_CONTACTE5clearEv.exit
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN19btGenericMemoryPool24allocate_from_free_nodesEj(%struct.btGenericMemoryPool* nocapture %this, i32 %num_elements) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 4 ; [#uses=4]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb15, label %bb1
-
-bb1: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 2 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 1 ; [#uses=3]
- br label %bb4.outer
-
-bb4.outer: ; preds = %bb2.us, %bb1
- %ptr.0.ph = phi i32 [ -1, %bb1 ], [ %tmp22, %bb2.us ] ; [#uses=4]
- %revindex.0.ph = phi i32 [ %1, %bb1 ], [ %tmp22, %bb2.us ] ; [#uses=1]
- %5 = icmp eq i32 %ptr.0.ph, -1 ; [#uses=2]
- br i1 %5, label %bb4.outer.split.us, label %bb11
-
-bb4.outer.split.us: ; preds = %bb4.outer
- %tmp21 = add i32 %revindex.0.ph, -1 ; [#uses=1]
- br label %bb4.us
-
-bb4.us: ; preds = %bb2.us, %bb4.outer.split.us
- %indvar = phi i32 [ %indvar.next, %bb2.us ], [ 0, %bb4.outer.split.us ] ; [#uses=2]
- %tmp22 = sub i32 %tmp21, %indvar ; [#uses=4]
- %.not.us = icmp eq i32 %tmp22, -1 ; [#uses=1]
- br i1 %.not.us, label %bb9, label %bb2.us
-
-bb2.us: ; preds = %bb4.us
- %6 = load i32** %3, align 4 ; [#uses=1]
- %7 = load i32** %4, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %7, i32 %tmp22 ; [#uses=1]
- %8 = load i32* %scevgep, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32* %6, i32 %8 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = icmp ult i32 %10, %num_elements ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br i1 %11, label %bb4.us, label %bb4.outer
-
-bb9: ; preds = %bb4.us
- br i1 %5, label %bb15, label %bb11
-
-bb11: ; preds = %bb9, %bb4.outer
- %12 = load i32** %4, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32* %12, i32 %ptr.0.ph ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=4]
- %15 = load i32** %3, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32* %15, i32 %14 ; [#uses=2]
- %17 = load i32* %16, align 4 ; [#uses=2]
- store i32 %num_elements, i32* %16, align 4
- %18 = icmp eq i32 %17, %num_elements ; [#uses=1]
- %19 = load i32** %4, align 4 ; [#uses=3]
- br i1 %18, label %bb13, label %bb12
-
-bb12: ; preds = %bb11
- %20 = sub i32 %17, %num_elements ; [#uses=1]
- %21 = add i32 %14, %num_elements ; [#uses=2]
- %22 = getelementptr inbounds i32* %19, i32 %ptr.0.ph ; [#uses=1]
- store i32 %21, i32* %22, align 4
- %23 = load i32** %3, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32* %23, i32 %21 ; [#uses=1]
- store i32 %20, i32* %24, align 4
- ret i32 %14
-
-bb13: ; preds = %bb11
- %25 = load i32* %0, align 4 ; [#uses=1]
- %26 = add i32 %25, -1 ; [#uses=1]
- %27 = getelementptr inbounds i32* %19, i32 %26 ; [#uses=1]
- %28 = load i32* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32* %19, i32 %ptr.0.ph ; [#uses=1]
- store i32 %28, i32* %29, align 4
- %30 = load i32* %0, align 4 ; [#uses=1]
- %31 = add i32 %30, -1 ; [#uses=1]
- store i32 %31, i32* %0, align 4
- ret i32 %14
-
-bb15: ; preds = %bb9, %entry
- ret i32 -1
-}
-
-; [#uses=1]
-define internal void @_GLOBAL__I__ZN19btGenericMemoryPool24allocate_from_free_nodesEj() nounwind {
-entry:
- store i32 0, i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4
- store i32 8, i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 1), align 4
- store i32 32768, i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 2), align 8
- store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV22GIM_STANDARD_ALLOCATOR, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 0), align 32
- %0 = tail call i32 @__cxa_atexit(void (i8*)* @__tcf_0, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define void @_ZN22btGenericPoolAllocatorD1Ev(%struct.btGenericPoolAllocator* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV22btGenericPoolAllocator, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 4 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %return, label %bb
-
-bb: ; preds = %bb, %entry
- %i.05 = phi i32 [ %17, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep = getelementptr %struct.btGenericPoolAllocator* %this, i32 0, i32 3, i32 %i.05 ; [#uses=2]
- %4 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- %7 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 1 ; [#uses=1]
- %8 = load i32** %7, align 4 ; [#uses=1]
- %9 = bitcast i32* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %9)
- %10 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 2 ; [#uses=1]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %12 = bitcast i32* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- %13 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=1]
- %16 = bitcast %struct.btGenericMemoryPool* %15 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %16)
- %17 = add i32 %i.05, 1 ; [#uses=2]
- %18 = load i32* %1, align 4 ; [#uses=1]
- %19 = icmp ugt i32 %18, %17 ; [#uses=1]
- br i1 %19, label %bb, label %return
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN22btGenericPoolAllocatorD0Ev(%struct.btGenericPoolAllocator* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV22btGenericPoolAllocator, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 4 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb3, label %bb
-
-bb: ; preds = %bb, %entry
- %i.05 = phi i32 [ %17, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep = getelementptr %struct.btGenericPoolAllocator* %this, i32 0, i32 3, i32 %i.05 ; [#uses=2]
- %4 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- %7 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 1 ; [#uses=1]
- %8 = load i32** %7, align 4 ; [#uses=1]
- %9 = bitcast i32* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %9)
- %10 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 2 ; [#uses=1]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %12 = bitcast i32* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- %13 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=1]
- %16 = bitcast %struct.btGenericMemoryPool* %15 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %16)
- %17 = add i32 %i.05, 1 ; [#uses=2]
- %18 = load i32* %1, align 4 ; [#uses=1]
- %19 = icmp ugt i32 %18, %17 ; [#uses=1]
- br i1 %19, label %bb, label %bb3
-
-bb3: ; preds = %bb, %entry
- %20 = bitcast %struct.btGenericPoolAllocator* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %20) nounwind
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN19btGenericMemoryPool18allocate_from_poolEj(%struct.btGenericMemoryPool* nocapture %this, i32 %num_elements) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 3 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = add i32 %1, %num_elements ; [#uses=1]
- %3 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 6 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = icmp ugt i32 %2, %4 ; [#uses=1]
- br i1 %5, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %6 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 2 ; [#uses=1]
- %7 = load i32** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32* %7, i32 %1 ; [#uses=1]
- store i32 %num_elements, i32* %8, align 4
- %9 = load i32* %0, align 4 ; [#uses=1]
- %10 = add i32 %9, %num_elements ; [#uses=1]
- store i32 %10, i32* %0, align 4
- ret i32 %1
-
-bb2: ; preds = %entry
- ret i32 -1
-}
-
-; [#uses=7]
-define i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* nocapture %this, i32 %size_bytes) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 5 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = urem i32 %size_bytes, %1 ; [#uses=1]
- %3 = udiv i32 %size_bytes, %1 ; [#uses=1]
- %not. = icmp ne i32 %2, 0 ; [#uses=1]
- %4 = zext i1 %not. to i32 ; [#uses=1]
- %element_count.0 = add i32 %4, %3 ; [#uses=8]
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 4 ; [#uses=4]
- %6 = load i32* %5, align 4 ; [#uses=2]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb3, label %bb1.i
-
-bb1.i: ; preds = %entry
- %8 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 2 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 1 ; [#uses=3]
- br label %bb4.outer.i
-
-bb4.outer.i: ; preds = %bb2.us.i, %bb1.i
- %ptr.0.ph.i = phi i32 [ -1, %bb1.i ], [ %tmp22.i, %bb2.us.i ] ; [#uses=4]
- %revindex.0.ph.i = phi i32 [ %6, %bb1.i ], [ %tmp22.i, %bb2.us.i ] ; [#uses=1]
- %10 = icmp eq i32 %ptr.0.ph.i, -1 ; [#uses=2]
- br i1 %10, label %bb4.outer.split.us.i, label %bb11.i
-
-bb4.outer.split.us.i: ; preds = %bb4.outer.i
- %tmp21.i = add i32 %revindex.0.ph.i, -1 ; [#uses=1]
- br label %bb4.us.i
-
-bb4.us.i: ; preds = %bb2.us.i, %bb4.outer.split.us.i
- %indvar.i = phi i32 [ %indvar.next.i, %bb2.us.i ], [ 0, %bb4.outer.split.us.i ] ; [#uses=2]
- %tmp22.i = sub i32 %tmp21.i, %indvar.i ; [#uses=4]
- %.not.us.i = icmp eq i32 %tmp22.i, -1 ; [#uses=1]
- br i1 %.not.us.i, label %bb9.i, label %bb2.us.i
-
-bb2.us.i: ; preds = %bb4.us.i
- %11 = load i32** %8, align 4 ; [#uses=1]
- %12 = load i32** %9, align 4 ; [#uses=1]
- %scevgep.i = getelementptr i32* %12, i32 %tmp22.i ; [#uses=1]
- %13 = load i32* %scevgep.i, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32* %11, i32 %13 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=1]
- %16 = icmp ult i32 %15, %element_count.0 ; [#uses=1]
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=1]
- br i1 %16, label %bb4.us.i, label %bb4.outer.i
-
-bb9.i: ; preds = %bb4.us.i
- br i1 %10, label %bb3, label %bb11.i
-
-bb11.i: ; preds = %bb9.i, %bb4.outer.i
- %17 = load i32** %9, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32* %17, i32 %ptr.0.ph.i ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=4]
- %20 = load i32** %8, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32* %20, i32 %19 ; [#uses=2]
- %22 = load i32* %21, align 4 ; [#uses=2]
- store i32 %element_count.0, i32* %21, align 4
- %23 = icmp eq i32 %22, %element_count.0 ; [#uses=1]
- %24 = load i32** %9, align 4 ; [#uses=3]
- br i1 %23, label %bb13.i, label %bb12.i
-
-bb12.i: ; preds = %bb11.i
- %25 = sub i32 %22, %element_count.0 ; [#uses=1]
- %26 = add i32 %19, %element_count.0 ; [#uses=2]
- %27 = getelementptr inbounds i32* %24, i32 %ptr.0.ph.i ; [#uses=1]
- store i32 %26, i32* %27, align 4
- %28 = load i32** %8, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32* %28, i32 %26 ; [#uses=1]
- store i32 %25, i32* %29, align 4
- br label %_ZN19btGenericMemoryPool24allocate_from_free_nodesEj.exit
-
-bb13.i: ; preds = %bb11.i
- %30 = load i32* %5, align 4 ; [#uses=1]
- %31 = add i32 %30, -1 ; [#uses=1]
- %32 = getelementptr inbounds i32* %24, i32 %31 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i32* %24, i32 %ptr.0.ph.i ; [#uses=1]
- store i32 %33, i32* %34, align 4
- %35 = load i32* %5, align 4 ; [#uses=1]
- %36 = add i32 %35, -1 ; [#uses=1]
- store i32 %36, i32* %5, align 4
- br label %_ZN19btGenericMemoryPool24allocate_from_free_nodesEj.exit
-
-_ZN19btGenericMemoryPool24allocate_from_free_nodesEj.exit: ; preds = %bb13.i, %bb12.i
- %37 = icmp eq i32 %19, -1 ; [#uses=1]
- br i1 %37, label %bb3, label %bb2
-
-bb2: ; preds = %_ZN19btGenericMemoryPool24allocate_from_free_nodesEj.exit
- %38 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 0 ; [#uses=1]
- %39 = load i8** %38, align 4 ; [#uses=1]
- %40 = load i32* %0, align 4 ; [#uses=1]
- %41 = mul i32 %40, %19 ; [#uses=1]
- %42 = getelementptr inbounds i8* %39, i32 %41 ; [#uses=1]
- ret i8* %42
-
-bb3: ; preds = %_ZN19btGenericMemoryPool24allocate_from_free_nodesEj.exit, %bb9.i, %entry
- %43 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 3 ; [#uses=3]
- %44 = load i32* %43, align 4 ; [#uses=4]
- %45 = add i32 %44, %element_count.0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 6 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = icmp ugt i32 %45, %47 ; [#uses=1]
- br i1 %48, label %bb6, label %_ZN19btGenericMemoryPool18allocate_from_poolEj.exit
-
-_ZN19btGenericMemoryPool18allocate_from_poolEj.exit: ; preds = %bb3
- %49 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 2 ; [#uses=1]
- %50 = load i32** %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds i32* %50, i32 %44 ; [#uses=1]
- store i32 %element_count.0, i32* %51, align 4
- %52 = load i32* %43, align 4 ; [#uses=1]
- %53 = add i32 %52, %element_count.0 ; [#uses=1]
- store i32 %53, i32* %43, align 4
- %54 = icmp eq i32 %44, -1 ; [#uses=1]
- br i1 %54, label %bb6, label %bb5
-
-bb5: ; preds = %_ZN19btGenericMemoryPool18allocate_from_poolEj.exit
- %55 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 0 ; [#uses=1]
- %56 = load i8** %55, align 4 ; [#uses=1]
- %57 = load i32* %0, align 4 ; [#uses=1]
- %58 = mul i32 %57, %44 ; [#uses=1]
- %59 = getelementptr inbounds i8* %56, i32 %58 ; [#uses=1]
- ret i8* %59
-
-bb6: ; preds = %_ZN19btGenericMemoryPool18allocate_from_poolEj.exit, %bb3
- ret i8* null
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN19btGenericMemoryPool10freeMemoryEPv(%struct.btGenericMemoryPool* nocapture %this, i8* %pointer) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=2]
- %2 = icmp ugt i8* %1, %pointer ; [#uses=1]
- br i1 %2, label %bb4, label %bb1
-
-bb1: ; preds = %entry
- %3 = ptrtoint i8* %pointer to i32 ; [#uses=1]
- %4 = ptrtoint i8* %1 to i32 ; [#uses=1]
- %5 = sub nsw i32 %3, %4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 5 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 6 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = mul i32 %9, %7 ; [#uses=1]
- %11 = icmp ugt i32 %10, %5 ; [#uses=1]
- br i1 %11, label %bb3, label %bb4
-
-bb3: ; preds = %bb1
- %12 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 1 ; [#uses=1]
- %13 = load i32** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 4 ; [#uses=3]
- %15 = load i32* %14, align 4 ; [#uses=1]
- %16 = udiv i32 %5, %7 ; [#uses=1]
- %17 = getelementptr inbounds i32* %13, i32 %15 ; [#uses=1]
- store i32 %16, i32* %17, align 4
- %18 = load i32* %14, align 4 ; [#uses=1]
- %19 = add i32 %18, 1 ; [#uses=1]
- store i32 %19, i32* %14, align 4
- ret i8 1
-
-bb4: ; preds = %bb1, %entry
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22GIM_STANDARD_ALLOCATORD1Ev(%struct.GIM_STANDARD_ALLOCATOR* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.GIM_STANDARD_ALLOCATOR* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV22btGenericPoolAllocator, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.GIM_STANDARD_ALLOCATOR* %this, i32 0, i32 0, i32 4 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %_ZN22btGenericPoolAllocatorD2Ev.exit, label %bb.i
-
-bb.i: ; preds = %bb.i, %entry
- %i.05.i = phi i32 [ %tmp, %bb.i ], [ 0, %entry ] ; [#uses=2]
- %tmp = add i32 %i.05.i, 1 ; [#uses=2]
- %scevgep.i = getelementptr %struct.GIM_STANDARD_ALLOCATOR* %this, i32 0, i32 0, i32 3, i32 %i.05.i ; [#uses=2]
- %4 = load %struct.btGenericMemoryPool** %scevgep.i, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- %7 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 1 ; [#uses=1]
- %8 = load i32** %7, align 4 ; [#uses=1]
- %9 = bitcast i32* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %9)
- %10 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 2 ; [#uses=1]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %12 = bitcast i32* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- %13 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = load %struct.btGenericMemoryPool** %scevgep.i, align 4 ; [#uses=1]
- %16 = bitcast %struct.btGenericMemoryPool* %15 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %16)
- %17 = load i32* %1, align 4 ; [#uses=1]
- %18 = icmp ugt i32 %17, %tmp ; [#uses=1]
- br i1 %18, label %bb.i, label %_ZN22btGenericPoolAllocatorD2Ev.exit
-
-_ZN22btGenericPoolAllocatorD2Ev.exit: ; preds = %bb.i, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22GIM_STANDARD_ALLOCATORD0Ev(%struct.GIM_STANDARD_ALLOCATOR* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.GIM_STANDARD_ALLOCATOR* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV22btGenericPoolAllocator, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.GIM_STANDARD_ALLOCATOR* %this, i32 0, i32 0, i32 4 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %_ZN22btGenericPoolAllocatorD2Ev.exit, label %bb.i
-
-bb.i: ; preds = %bb.i, %entry
- %i.05.i = phi i32 [ %tmp, %bb.i ], [ 0, %entry ] ; [#uses=2]
- %tmp = add i32 %i.05.i, 1 ; [#uses=2]
- %scevgep.i = getelementptr %struct.GIM_STANDARD_ALLOCATOR* %this, i32 0, i32 0, i32 3, i32 %i.05.i ; [#uses=2]
- %4 = load %struct.btGenericMemoryPool** %scevgep.i, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- %7 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 1 ; [#uses=1]
- %8 = load i32** %7, align 4 ; [#uses=1]
- %9 = bitcast i32* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %9)
- %10 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 2 ; [#uses=1]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %12 = bitcast i32* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- %13 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = load %struct.btGenericMemoryPool** %scevgep.i, align 4 ; [#uses=1]
- %16 = bitcast %struct.btGenericMemoryPool* %15 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %16)
- %17 = load i32* %1, align 4 ; [#uses=1]
- %18 = icmp ugt i32 %17, %tmp ; [#uses=1]
- br i1 %18, label %bb.i, label %_ZN22btGenericPoolAllocatorD2Ev.exit
-
-_ZN22btGenericPoolAllocatorD2Ev.exit: ; preds = %bb.i, %entry
- %19 = bitcast %struct.GIM_STANDARD_ALLOCATOR* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %19) nounwind
- ret void
-}
-
-; [#uses=9]
-declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*) nounwind
-
-; [#uses=1]
-define internal void @__tcf_0(i8* nocapture %unnamed_arg) {
-entry:
- store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV22btGenericPoolAllocator, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 0), align 32
- %0 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=1]
- %1 = icmp eq i32 %0, 0 ; [#uses=1]
- br i1 %1, label %_ZN22GIM_STANDARD_ALLOCATORD1Ev.exit, label %bb.i.i
-
-bb.i.i: ; preds = %bb.i.i, %entry
- %i.05.i.i = phi i32 [ %tmp.i, %bb.i.i ], [ 0, %entry ] ; [#uses=2]
- %tmp.i = add i32 %i.05.i.i, 1 ; [#uses=2]
- %scevgep.i.i = getelementptr %struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 3, i32 %i.05.i.i ; [#uses=2]
- %2 = load %struct.btGenericMemoryPool** %scevgep.i.i, align 4 ; [#uses=5]
- %3 = getelementptr inbounds %struct.btGenericMemoryPool* %2, i32 0, i32 0 ; [#uses=1]
- %4 = load i8** %3, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %4)
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %2, i32 0, i32 1 ; [#uses=1]
- %6 = load i32** %5, align 4 ; [#uses=1]
- %7 = bitcast i32* %6 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %7)
- %8 = getelementptr inbounds %struct.btGenericMemoryPool* %2, i32 0, i32 2 ; [#uses=1]
- %9 = load i32** %8, align 4 ; [#uses=1]
- %10 = bitcast i32* %9 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %10)
- %11 = getelementptr inbounds %struct.btGenericMemoryPool* %2, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btGenericMemoryPool* %2, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %12, align 4
- %13 = load %struct.btGenericMemoryPool** %scevgep.i.i, align 4 ; [#uses=1]
- %14 = bitcast %struct.btGenericMemoryPool* %13 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %14)
- %15 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=1]
- %16 = icmp ugt i32 %15, %tmp.i ; [#uses=1]
- br i1 %16, label %bb.i.i, label %_ZN22GIM_STANDARD_ALLOCATORD1Ev.exit
-
-_ZN22GIM_STANDARD_ALLOCATORD1Ev.exit: ; preds = %bb.i.i, %entry
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN22btGenericPoolAllocator13failback_freeEPv(%struct.btGenericPoolAllocator* nocapture %this, i8* %pointer) align 2 {
-entry:
- tail call void @_Z21btAlignedFreeInternalPv(i8* %pointer)
- ret i8 1
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN22btGenericPoolAllocator10freeMemoryEPv(%struct.btGenericPoolAllocator* nocapture %this, i8* %pointer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 4 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb9, label %bb.nph
-
-bb.nph: ; preds = %entry
- %3 = ptrtoint i8* %pointer to i32 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_ZN19btGenericMemoryPool10freeMemoryEPv.exit, %bb.nph
- %i.015 = phi i32 [ 0, %bb.nph ], [ %tmp, %_ZN19btGenericMemoryPool10freeMemoryEPv.exit ] ; [#uses=2]
- %scevgep = getelementptr %struct.btGenericPoolAllocator* %this, i32 0, i32 3, i32 %i.015 ; [#uses=1]
- %tmp = add i32 %i.015, 1 ; [#uses=2]
- %4 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=2]
- %7 = icmp ugt i8* %6, %pointer ; [#uses=1]
- br i1 %7, label %_ZN19btGenericMemoryPool10freeMemoryEPv.exit, label %bb1.i
-
-bb1.i: ; preds = %bb
- %8 = ptrtoint i8* %6 to i32 ; [#uses=1]
- %9 = sub nsw i32 %3, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 5 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 6 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = mul i32 %13, %11 ; [#uses=1]
- %15 = icmp ugt i32 %14, %9 ; [#uses=1]
- br i1 %15, label %bb10, label %_ZN19btGenericMemoryPool10freeMemoryEPv.exit
-
-_ZN19btGenericMemoryPool10freeMemoryEPv.exit: ; preds = %bb1.i, %bb
- %16 = load i32* %0, align 4 ; [#uses=1]
- %17 = icmp ugt i32 %16, %tmp ; [#uses=1]
- br i1 %17, label %bb, label %bb9
-
-bb9: ; preds = %_ZN19btGenericMemoryPool10freeMemoryEPv.exit, %entry
- tail call void @_Z21btAlignedFreeInternalPv(i8* %pointer)
- ret i8 1
-
-bb10: ; preds = %bb1.i
- %18 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 1 ; [#uses=1]
- %19 = load i32** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 4 ; [#uses=3]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %22 = udiv i32 %9, %11 ; [#uses=1]
- %23 = getelementptr inbounds i32* %19, i32 %21 ; [#uses=1]
- store i32 %22, i32* %23, align 4
- %24 = load i32* %20, align 4 ; [#uses=1]
- %25 = add i32 %24, 1 ; [#uses=1]
- store i32 %25, i32* %20, align 4
- ret i8 1
-}
-
-; [#uses=0]
-define void @_Z10btPoolFreePv(i8* %ptr) {
-entry:
- %0 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=2]
- %1 = icmp eq i32 %0, 0 ; [#uses=1]
- br i1 %1, label %bb9.i, label %bb.nph.i
-
-bb.nph.i: ; preds = %entry
- %2 = ptrtoint i8* %ptr to i32 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i, %bb.nph.i
- %i.015.i = phi i32 [ 0, %bb.nph.i ], [ %tmp.i, %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i ] ; [#uses=2]
- %tmp.i = add i32 %i.015.i, 1 ; [#uses=2]
- %scevgep.i = getelementptr %struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 3, i32 %i.015.i ; [#uses=1]
- %3 = load %struct.btGenericMemoryPool** %scevgep.i, align 4 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btGenericMemoryPool* %3, i32 0, i32 0 ; [#uses=1]
- %5 = load i8** %4, align 4 ; [#uses=2]
- %6 = icmp ugt i8* %5, %ptr ; [#uses=1]
- br i1 %6, label %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i
- %7 = ptrtoint i8* %5 to i32 ; [#uses=1]
- %8 = sub nsw i32 %2, %7 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btGenericMemoryPool* %3, i32 0, i32 5 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btGenericMemoryPool* %3, i32 0, i32 6 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = mul i32 %12, %10 ; [#uses=1]
- %14 = icmp ugt i32 %13, %8 ; [#uses=1]
- br i1 %14, label %bb10.i, label %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i
-
-_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i: ; preds = %bb1.i.i, %bb.i
- %15 = icmp ugt i32 %0, %tmp.i ; [#uses=1]
- br i1 %15, label %bb.i, label %bb9.i
-
-bb9.i: ; preds = %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i, %entry
- tail call void @_Z21btAlignedFreeInternalPv(i8* %ptr)
- ret void
-
-bb10.i: ; preds = %bb1.i.i
- %16 = getelementptr inbounds %struct.btGenericMemoryPool* %3, i32 0, i32 1 ; [#uses=1]
- %17 = load i32** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGenericMemoryPool* %3, i32 0, i32 4 ; [#uses=3]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = udiv i32 %8, %10 ; [#uses=1]
- %21 = getelementptr inbounds i32* %17, i32 %19 ; [#uses=1]
- store i32 %20, i32* %21, align 4
- %22 = load i32* %18, align 4 ; [#uses=1]
- %23 = add i32 %22, 1 ; [#uses=1]
- store i32 %23, i32* %18, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btGenericMemoryPool8end_poolEv(%struct.btGenericMemoryPool* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %1)
- %2 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load i32** %2, align 4 ; [#uses=1]
- %4 = bitcast i32* %3 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %4)
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 2 ; [#uses=1]
- %6 = load i32** %5, align 4 ; [#uses=1]
- %7 = bitcast i32* %6 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %7)
- %8 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN22btGenericPoolAllocatorD2Ev(%struct.btGenericPoolAllocator* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV22btGenericPoolAllocator, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 4 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %return, label %bb
-
-bb: ; preds = %bb, %entry
- %i.05 = phi i32 [ %17, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep = getelementptr %struct.btGenericPoolAllocator* %this, i32 0, i32 3, i32 %i.05 ; [#uses=2]
- %4 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- %7 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 1 ; [#uses=1]
- %8 = load i32** %7, align 4 ; [#uses=1]
- %9 = bitcast i32* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %9)
- %10 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 2 ; [#uses=1]
- %11 = load i32** %10, align 4 ; [#uses=1]
- %12 = bitcast i32* %11 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %12)
- %13 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btGenericMemoryPool* %4, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=1]
- %16 = bitcast %struct.btGenericMemoryPool* %15 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %16)
- %17 = add i32 %i.05, 1 ; [#uses=2]
- %18 = load i32* %1, align 4 ; [#uses=1]
- %19 = icmp ugt i32 %18, %17 ; [#uses=1]
- br i1 %19, label %bb, label %return
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btGenericMemoryPool9init_poolEjj(%struct.btGenericMemoryPool* nocapture %this, i32 %element_size, i32 %element_count) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 5 ; [#uses=1]
- store i32 %element_size, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 6 ; [#uses=5]
- store i32 %element_count, i32* %3, align 4
- %4 = mul i32 %element_size, %element_count ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %6 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 0 ; [#uses=1]
- store i8* %5, i8** %6, align 4
- %7 = load i32* %3, align 4 ; [#uses=1]
- %8 = shl i32 %7, 2 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %10 = bitcast i8* %9 to i32* ; [#uses=1]
- %11 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 1 ; [#uses=1]
- store i32* %10, i32** %11, align 4
- %12 = load i32* %3, align 4 ; [#uses=1]
- %13 = shl i32 %12, 2 ; [#uses=1]
- %14 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %13, i32 16) ; [#uses=1]
- %15 = bitcast i8* %14 to i32* ; [#uses=2]
- %16 = getelementptr inbounds %struct.btGenericMemoryPool* %this, i32 0, i32 2 ; [#uses=2]
- store i32* %15, i32** %16, align 4
- %17 = load i32* %3, align 4 ; [#uses=1]
- %18 = icmp eq i32 %17, 0 ; [#uses=1]
- br i1 %18, label %return, label %bb
-
-bb: ; preds = %bb.bb_crit_edge, %entry
- %19 = phi i32* [ %.pre, %bb.bb_crit_edge ], [ %15, %entry ] ; [#uses=1]
- %i.03 = phi i32 [ %20, %bb.bb_crit_edge ], [ 0, %entry ] ; [#uses=2]
- %scevgep = getelementptr i32* %19, i32 %i.03 ; [#uses=1]
- store i32 0, i32* %scevgep, align 4
- %20 = add i32 %i.03, 1 ; [#uses=2]
- %21 = load i32* %3, align 4 ; [#uses=1]
- %22 = icmp ugt i32 %21, %20 ; [#uses=1]
- br i1 %22, label %bb.bb_crit_edge, label %return
-
-bb.bb_crit_edge: ; preds = %bb
- %.pre = load i32** %16, align 4 ; [#uses=1]
- br label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=4]
-define %struct.btGenericMemoryPool* @_ZN22btGenericPoolAllocator13push_new_poolEv(%struct.btGenericPoolAllocator* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 4 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp ugt i32 %1, 15 ; [#uses=1]
- br i1 %2, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %3 = tail call i8* @_Z22btAlignedAllocInternalji(i32 28, i32 16) ; [#uses=1]
- %4 = bitcast i8* %3 to %struct.btGenericMemoryPool* ; [#uses=2]
- %5 = load i32* %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 3, i32 %5 ; [#uses=1]
- store %struct.btGenericMemoryPool* %4, %struct.btGenericMemoryPool** %6, align 4
- %7 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 2 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=2]
- %11 = load i32* %0, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 3, i32 %11 ; [#uses=1]
- %13 = load %struct.btGenericMemoryPool** %12, align 4 ; [#uses=7]
- %14 = getelementptr inbounds %struct.btGenericMemoryPool* %13, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btGenericMemoryPool* %13, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btGenericMemoryPool* %13, i32 0, i32 5 ; [#uses=1]
- store i32 %10, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btGenericMemoryPool* %13, i32 0, i32 6 ; [#uses=6]
- store i32 %8, i32* %17, align 4
- %18 = mul i32 %10, %8 ; [#uses=1]
- %19 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %18, i32 16) ; [#uses=1]
- %20 = getelementptr inbounds %struct.btGenericMemoryPool* %13, i32 0, i32 0 ; [#uses=1]
- store i8* %19, i8** %20, align 4
- %21 = load i32* %17, align 4 ; [#uses=1]
- %22 = shl i32 %21, 2 ; [#uses=1]
- %23 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %22, i32 16) ; [#uses=1]
- %24 = bitcast i8* %23 to i32* ; [#uses=1]
- %25 = getelementptr inbounds %struct.btGenericMemoryPool* %13, i32 0, i32 1 ; [#uses=1]
- store i32* %24, i32** %25, align 4
- %26 = load i32* %17, align 4 ; [#uses=1]
- %27 = shl i32 %26, 2 ; [#uses=1]
- %28 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %27, i32 16) ; [#uses=1]
- %29 = bitcast i8* %28 to i32* ; [#uses=2]
- %30 = getelementptr inbounds %struct.btGenericMemoryPool* %13, i32 0, i32 2 ; [#uses=2]
- store i32* %29, i32** %30, align 4
- %31 = load i32* %17, align 4 ; [#uses=1]
- %32 = icmp eq i32 %31, 0 ; [#uses=1]
- br i1 %32, label %_ZN19btGenericMemoryPool9init_poolEjj.exit, label %bb.i.preheader
-
-bb.i.preheader: ; preds = %bb1
- store i32 0, i32* %29, align 4
- %33 = load i32* %17, align 4 ; [#uses=1]
- %34 = icmp ugt i32 %33, 1 ; [#uses=1]
- br i1 %34, label %bb.bb_crit_edge.i, label %_ZN19btGenericMemoryPool9init_poolEjj.exit
-
-bb.bb_crit_edge.i: ; preds = %bb.bb_crit_edge.i, %bb.i.preheader
- %indvar = phi i32 [ %tmp, %bb.bb_crit_edge.i ], [ 0, %bb.i.preheader ] ; [#uses=2]
- %tmp5 = add i32 %indvar, 2 ; [#uses=1]
- %tmp = add i32 %indvar, 1 ; [#uses=2]
- %.pre.i = load i32** %30, align 4 ; [#uses=1]
- %scevgep.i = getelementptr i32* %.pre.i, i32 %tmp ; [#uses=1]
- store i32 0, i32* %scevgep.i, align 4
- %35 = load i32* %17, align 4 ; [#uses=1]
- %36 = icmp ugt i32 %35, %tmp5 ; [#uses=1]
- br i1 %36, label %bb.bb_crit_edge.i, label %_ZN19btGenericMemoryPool9init_poolEjj.exit
-
-_ZN19btGenericMemoryPool9init_poolEjj.exit: ; preds = %bb.bb_crit_edge.i, %bb.i.preheader, %bb1
- %37 = load i32* %0, align 4 ; [#uses=1]
- %38 = add i32 %37, 1 ; [#uses=1]
- store i32 %38, i32* %0, align 4
- ret %struct.btGenericMemoryPool* %4
-
-bb2: ; preds = %entry
- ret %struct.btGenericMemoryPool* null
-}
-
-; [#uses=0]
-define i8* @_ZN22btGenericPoolAllocator14failback_allocEj(%struct.btGenericPoolAllocator* nocapture %this, i32 %size_bytes) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 2 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = mul i32 %3, %1 ; [#uses=1]
- %5 = icmp ult i32 %4, %size_bytes ; [#uses=1]
- br i1 %5, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %6 = tail call %struct.btGenericMemoryPool* @_ZN22btGenericPoolAllocator13push_new_poolEv(%struct.btGenericPoolAllocator* %this) ; [#uses=2]
- %7 = icmp eq %struct.btGenericMemoryPool* %6, null ; [#uses=1]
- br i1 %7, label %bb2, label %bb3
-
-bb2: ; preds = %bb1, %entry
- %8 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %size_bytes, i32 16) ; [#uses=1]
- ret i8* %8
-
-bb3: ; preds = %bb1
- %9 = tail call i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* %6, i32 %size_bytes) nounwind ; [#uses=1]
- ret i8* %9
-}
-
-; [#uses=0]
-define i8* @_ZN22btGenericPoolAllocator8allocateEj(%struct.btGenericPoolAllocator* nocapture %this, i32 %size_bytes) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 4 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb6, label %bb
-
-bb: ; preds = %bb, %entry
- %i.09 = phi i32 [ %5, %bb ], [ 0, %entry ] ; [#uses=2]
- %scevgep = getelementptr %struct.btGenericPoolAllocator* %this, i32 0, i32 3, i32 %i.09 ; [#uses=1]
- %3 = load %struct.btGenericMemoryPool** %scevgep, align 4 ; [#uses=1]
- %4 = tail call i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* %3, i32 %size_bytes) nounwind ; [#uses=3]
- %5 = add i32 %i.09, 1 ; [#uses=2]
- %6 = load i32* %0, align 4 ; [#uses=1]
- %7 = icmp ugt i32 %6, %5 ; [#uses=1]
- %8 = icmp eq i8* %4, null ; [#uses=1]
- %9 = and i1 %7, %8 ; [#uses=1]
- br i1 %9, label %bb, label %bb4
-
-bb4: ; preds = %bb
- %10 = icmp eq i8* %4, null ; [#uses=1]
- br i1 %10, label %bb6, label %bb7
-
-bb6: ; preds = %bb4, %entry
- %11 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 1 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btGenericPoolAllocator* %this, i32 0, i32 2 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %15 = mul i32 %14, %12 ; [#uses=1]
- %16 = icmp ult i32 %15, %size_bytes ; [#uses=1]
- br i1 %16, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb6
- %17 = tail call %struct.btGenericMemoryPool* @_ZN22btGenericPoolAllocator13push_new_poolEv(%struct.btGenericPoolAllocator* %this) ; [#uses=2]
- %18 = icmp eq %struct.btGenericMemoryPool* %17, null ; [#uses=1]
- br i1 %18, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb1.i, %bb6
- %19 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %size_bytes, i32 16) ; [#uses=1]
- ret i8* %19
-
-bb3.i: ; preds = %bb1.i
- %20 = tail call i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* %17, i32 %size_bytes) nounwind ; [#uses=1]
- ret i8* %20
-
-bb7: ; preds = %bb4
- ret i8* %4
-}
-
-; [#uses=0]
-define i8* @_Z11btPoolAllocj(i32 %size) {
-entry:
- %0 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=1]
- %1 = icmp eq i32 %0, 0 ; [#uses=1]
- br i1 %1, label %bb6.i, label %bb.i
-
-bb.i: ; preds = %bb.i, %entry
- %i.09.i = phi i32 [ %tmp, %bb.i ], [ 0, %entry ] ; [#uses=2]
- %tmp = add i32 %i.09.i, 1 ; [#uses=2]
- %scevgep.i = getelementptr %struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 3, i32 %i.09.i ; [#uses=1]
- %2 = load %struct.btGenericMemoryPool** %scevgep.i, align 4 ; [#uses=1]
- %3 = tail call i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* %2, i32 %size) nounwind ; [#uses=2]
- %4 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=1]
- %5 = icmp ugt i32 %4, %tmp ; [#uses=1]
- %6 = icmp eq i8* %3, null ; [#uses=2]
- %7 = and i1 %5, %6 ; [#uses=1]
- br i1 %7, label %bb.i, label %bb4.i
-
-bb4.i: ; preds = %bb.i
- br i1 %6, label %bb6.i, label %_ZN22btGenericPoolAllocator8allocateEj.exit
-
-bb6.i: ; preds = %bb4.i, %entry
- %8 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 1), align 4 ; [#uses=1]
- %9 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 2), align 8 ; [#uses=1]
- %10 = mul i32 %9, %8 ; [#uses=1]
- %11 = icmp ult i32 %10, %size ; [#uses=1]
- br i1 %11, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb6.i
- %12 = tail call %struct.btGenericMemoryPool* @_ZN22btGenericPoolAllocator13push_new_poolEv(%struct.btGenericPoolAllocator* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0)) ; [#uses=2]
- %13 = icmp eq %struct.btGenericMemoryPool* %12, null ; [#uses=1]
- br i1 %13, label %bb2.i.i, label %bb3.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb6.i
- %14 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %size, i32 16) ; [#uses=1]
- ret i8* %14
-
-bb3.i.i: ; preds = %bb1.i.i
- %15 = tail call i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* %12, i32 %size) nounwind ; [#uses=1]
- ret i8* %15
-
-_ZN22btGenericPoolAllocator8allocateEj.exit: ; preds = %bb4.i
- ret i8* %3
-}
-
-; [#uses=0]
-define i8* @_Z13btPoolReallocPvjj(i8* %ptr, i32 %oldsize, i32 %newsize) {
-entry:
- %0 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=1]
- %1 = icmp eq i32 %0, 0 ; [#uses=1]
- br i1 %1, label %bb6.i.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb.i.i, %entry
- %i.09.i.i = phi i32 [ %tmp.i, %bb.i.i ], [ 0, %entry ] ; [#uses=2]
- %tmp.i = add i32 %i.09.i.i, 1 ; [#uses=2]
- %scevgep.i.i = getelementptr %struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 3, i32 %i.09.i.i ; [#uses=1]
- %2 = load %struct.btGenericMemoryPool** %scevgep.i.i, align 4 ; [#uses=1]
- %3 = tail call i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* %2, i32 %newsize) nounwind ; [#uses=2]
- %4 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=1]
- %5 = icmp ugt i32 %4, %tmp.i ; [#uses=1]
- %6 = icmp eq i8* %3, null ; [#uses=2]
- %7 = and i1 %5, %6 ; [#uses=1]
- br i1 %7, label %bb.i.i, label %bb4.i.i
-
-bb4.i.i: ; preds = %bb.i.i
- br i1 %6, label %bb6.i.i, label %_Z11btPoolAllocj.exit
-
-bb6.i.i: ; preds = %bb4.i.i, %entry
- %8 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 1), align 4 ; [#uses=1]
- %9 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 2), align 8 ; [#uses=1]
- %10 = mul i32 %9, %8 ; [#uses=1]
- %11 = icmp ult i32 %10, %newsize ; [#uses=1]
- br i1 %11, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb6.i.i
- %12 = tail call %struct.btGenericMemoryPool* @_ZN22btGenericPoolAllocator13push_new_poolEv(%struct.btGenericPoolAllocator* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0)) ; [#uses=2]
- %13 = icmp eq %struct.btGenericMemoryPool* %12, null ; [#uses=1]
- br i1 %13, label %bb2.i.i.i, label %bb3.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb6.i.i
- %14 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %newsize, i32 16) ; [#uses=1]
- br label %_Z11btPoolAllocj.exit
-
-bb3.i.i.i: ; preds = %bb1.i.i.i
- %15 = tail call i8* @_ZN19btGenericMemoryPool8allocateEj(%struct.btGenericMemoryPool* %12, i32 %newsize) nounwind ; [#uses=1]
- br label %_Z11btPoolAllocj.exit
-
-_Z11btPoolAllocj.exit: ; preds = %bb3.i.i.i, %bb2.i.i.i, %bb4.i.i
- %16 = phi i8* [ %15, %bb3.i.i.i ], [ %14, %bb2.i.i.i ], [ %3, %bb4.i.i ] ; [#uses=3]
- %17 = icmp ult i32 %oldsize, %newsize ; [#uses=1]
- %iftmp.24.0 = select i1 %17, i32 %oldsize, i32 %newsize ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %16, i8* %ptr, i32 %iftmp.24.0, i32 1, i1 false)
- %18 = load i32* getelementptr inbounds (%struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 4), align 4 ; [#uses=2]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- br i1 %19, label %bb9.i.i, label %bb.nph.i.i
-
-bb.nph.i.i: ; preds = %_Z11btPoolAllocj.exit
- %20 = ptrtoint i8* %ptr to i32 ; [#uses=1]
- br label %bb.i.i5
-
-bb.i.i5: ; preds = %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i.i, %bb.nph.i.i
- %i.015.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %tmp.i.i, %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i.i ] ; [#uses=2]
- %tmp.i.i = add i32 %i.015.i.i, 1 ; [#uses=2]
- %scevgep.i.i4 = getelementptr %struct.GIM_STANDARD_ALLOCATOR* @g_main_allocator, i32 0, i32 0, i32 3, i32 %i.015.i.i ; [#uses=1]
- %21 = load %struct.btGenericMemoryPool** %scevgep.i.i4, align 4 ; [#uses=5]
- %22 = getelementptr inbounds %struct.btGenericMemoryPool* %21, i32 0, i32 0 ; [#uses=1]
- %23 = load i8** %22, align 4 ; [#uses=2]
- %24 = icmp ugt i8* %23, %ptr ; [#uses=1]
- br i1 %24, label %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i.i, label %bb1.i.i.i6
-
-bb1.i.i.i6: ; preds = %bb.i.i5
- %25 = ptrtoint i8* %23 to i32 ; [#uses=1]
- %26 = sub nsw i32 %20, %25 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btGenericMemoryPool* %21, i32 0, i32 5 ; [#uses=1]
- %28 = load i32* %27, align 4 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btGenericMemoryPool* %21, i32 0, i32 6 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = mul i32 %30, %28 ; [#uses=1]
- %32 = icmp ugt i32 %31, %26 ; [#uses=1]
- br i1 %32, label %bb10.i.i, label %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i.i
-
-_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i.i: ; preds = %bb1.i.i.i6, %bb.i.i5
- %33 = icmp ugt i32 %18, %tmp.i.i ; [#uses=1]
- br i1 %33, label %bb.i.i5, label %bb9.i.i
-
-bb9.i.i: ; preds = %_ZN19btGenericMemoryPool10freeMemoryEPv.exit.i.i, %_Z11btPoolAllocj.exit
- tail call void @_Z21btAlignedFreeInternalPv(i8* %ptr)
- ret i8* %16
-
-bb10.i.i: ; preds = %bb1.i.i.i6
- %34 = getelementptr inbounds %struct.btGenericMemoryPool* %21, i32 0, i32 1 ; [#uses=1]
- %35 = load i32** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btGenericMemoryPool* %21, i32 0, i32 4 ; [#uses=3]
- %37 = load i32* %36, align 4 ; [#uses=1]
- %38 = udiv i32 %26, %28 ; [#uses=1]
- %39 = getelementptr inbounds i32* %35, i32 %37 ; [#uses=1]
- store i32 %38, i32* %39, align 4
- %40 = load i32* %36, align 4 ; [#uses=1]
- %41 = add i32 %40, 1 ; [#uses=1]
- store i32 %41, i32* %36, align 4
- ret i8* %16
-}
-
-; [#uses=1]
-define i32 @_ZN9btBvhTree20_calc_splitting_axisER18GIM_BVH_DATA_ARRAYii(%struct.btBvhTree* nocapture %this, %struct.GIM_BVH_DATA_ARRAY* nocapture %primitive_boxes, i32 %startIndex, i32 %endIndex) nounwind readonly align 2 {
-entry:
- %0 = sub nsw i32 %endIndex, %startIndex ; [#uses=4]
- %1 = icmp slt i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %1, label %bb.nph45, label %bb2.thread
-
-bb2.thread: ; preds = %entry
- %2 = sitofp i32 %0 to float ; [#uses=1]
- br label %bb6
-
-bb.nph45: ; preds = %entry
- %3 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=6]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph45
- %indvar61 = phi i32 [ 0, %bb.nph45 ], [ %indvar.next62, %bb ] ; [#uses=2]
- %means.0.2.043 = phi float [ 0.000000e+00, %bb.nph45 ], [ %19, %bb ] ; [#uses=1]
- %means.0.1.042 = phi float [ 0.000000e+00, %bb.nph45 ], [ %18, %bb ] ; [#uses=1]
- %means.0.0.041 = phi float [ 0.000000e+00, %bb.nph45 ], [ %17, %bb ] ; [#uses=1]
- %tmp65 = add i32 %indvar61, %startIndex ; [#uses=6]
- %scevgep66 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep67 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep68 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep69 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep70 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep7172 = getelementptr inbounds %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %scevgep66, align 4 ; [#uses=1]
- %6 = load float* %scevgep67, align 4 ; [#uses=1]
- %7 = fadd float %5, %6 ; [#uses=1]
- %8 = load float* %scevgep68, align 4 ; [#uses=1]
- %9 = load float* %scevgep69, align 4 ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = load float* %scevgep70, align 4 ; [#uses=1]
- %12 = load float* %scevgep7172, align 4 ; [#uses=1]
- %13 = fadd float %11, %12 ; [#uses=1]
- %14 = fmul float %7, 5.000000e-01 ; [#uses=1]
- %15 = fmul float %10, 5.000000e-01 ; [#uses=1]
- %16 = fmul float %13, 5.000000e-01 ; [#uses=1]
- %17 = fadd float %means.0.0.041, %16 ; [#uses=2]
- %18 = fadd float %means.0.1.042, %15 ; [#uses=2]
- %19 = fadd float %means.0.2.043, %14 ; [#uses=2]
- %indvar.next62 = add i32 %indvar61, 1 ; [#uses=2]
- %exitcond64 = icmp eq i32 %indvar.next62, %0 ; [#uses=1]
- br i1 %exitcond64, label %bb2, label %bb
-
-bb2: ; preds = %bb
- %20 = sitofp i32 %0 to float ; [#uses=3]
- %21 = fdiv float 1.000000e+00, %20 ; [#uses=3]
- %22 = fmul float %17, %21 ; [#uses=1]
- %23 = fmul float %18, %21 ; [#uses=1]
- %24 = fmul float %19, %21 ; [#uses=1]
- br i1 %1, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb2
- %25 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- %26 = load %struct.GIM_AABB_DATA** %25, align 4 ; [#uses=6]
- br label %bb3
-
-bb3: ; preds = %bb3, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb3 ] ; [#uses=2]
- %variance.0.2.037 = phi float [ 0.000000e+00, %bb.nph ], [ %47, %bb3 ] ; [#uses=1]
- %variance.0.1.036 = phi float [ 0.000000e+00, %bb.nph ], [ %46, %bb3 ] ; [#uses=1]
- %variance.0.0.035 = phi float [ 0.000000e+00, %bb.nph ], [ %45, %bb3 ] ; [#uses=1]
- %tmp51 = add i32 %indvar, %startIndex ; [#uses=6]
- %scevgep = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep52 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep53 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep54 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep55 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep5657 = getelementptr inbounds %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %scevgep, align 4 ; [#uses=1]
- %28 = load float* %scevgep52, align 4 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = load float* %scevgep53, align 4 ; [#uses=1]
- %31 = load float* %scevgep54, align 4 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = load float* %scevgep55, align 4 ; [#uses=1]
- %34 = load float* %scevgep5657, align 4 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fmul float %29, 5.000000e-01 ; [#uses=1]
- %37 = fmul float %32, 5.000000e-01 ; [#uses=1]
- %38 = fmul float %35, 5.000000e-01 ; [#uses=1]
- %39 = fsub float %36, %24 ; [#uses=2]
- %40 = fsub float %37, %23 ; [#uses=2]
- %41 = fsub float %38, %22 ; [#uses=2]
- %42 = fmul float %39, %39 ; [#uses=1]
- %43 = fmul float %40, %40 ; [#uses=1]
- %44 = fmul float %41, %41 ; [#uses=1]
- %45 = fadd float %variance.0.0.035, %44 ; [#uses=2]
- %46 = fadd float %variance.0.1.036, %43 ; [#uses=2]
- %47 = fadd float %variance.0.2.037, %42 ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb3
-
-bb6: ; preds = %bb3, %bb2, %bb2.thread
- %48 = phi float [ %20, %bb2 ], [ %2, %bb2.thread ], [ %20, %bb3 ] ; [#uses=1]
- %variance.0.2.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %47, %bb3 ] ; [#uses=1]
- %variance.0.1.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %46, %bb3 ] ; [#uses=1]
- %variance.0.0.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %45, %bb3 ] ; [#uses=1]
- %49 = fadd float %48, -1.000000e+00 ; [#uses=1]
- %50 = fdiv float 1.000000e+00, %49 ; [#uses=3]
- %51 = fmul float %variance.0.0.0.lcssa, %50 ; [#uses=2]
- %52 = fmul float %variance.0.1.0.lcssa, %50 ; [#uses=2]
- %53 = fmul float %variance.0.2.0.lcssa, %50 ; [#uses=2]
- %54 = fcmp olt float %51, %52 ; [#uses=1]
- br i1 %54, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb6
- %55 = fcmp olt float %52, %53 ; [#uses=1]
- %iftmp.20.0.i = select i1 %55, i32 2, i32 1 ; [#uses=1]
- ret i32 %iftmp.20.0.i
-
-bb4.i: ; preds = %bb6
- %56 = fcmp olt float %51, %53 ; [#uses=1]
- %iftmp.21.0.i = select i1 %56, i32 2, i32 0 ; [#uses=1]
- ret i32 %iftmp.21.0.i
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN26BT_BOX_BOX_TRANSFORM_CACHE19calc_from_homogenicERK11btTransformS2_(%struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, %struct.btTransform* nocapture %trans0, %struct.btTransform* nocapture %trans1) nounwind inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=5]
- %10 = load float* %7, align 4 ; [#uses=5]
- %11 = load float* %6, align 4 ; [#uses=5]
- %12 = load float* %5, align 4 ; [#uses=5]
- %13 = load float* %4, align 4 ; [#uses=5]
- %14 = load float* %3, align 4 ; [#uses=5]
- %15 = load float* %2, align 4 ; [#uses=5]
- %16 = load float* %1, align 4 ; [#uses=5]
- %17 = load float* %0, align 4 ; [#uses=5]
- %18 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float -0.000000e+00, %19 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float -0.000000e+00, %22 ; [#uses=3]
- %24 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fsub float -0.000000e+00, %25 ; [#uses=3]
- %27 = fmul float %15, %26 ; [#uses=1]
- %28 = fmul float %16, %23 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = fmul float %17, %20 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=1]
- %32 = fmul float %12, %26 ; [#uses=1]
- %33 = fmul float %13, %23 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=1]
- %35 = fmul float %14, %20 ; [#uses=1]
- %36 = fadd float %34, %35 ; [#uses=1]
- %37 = fmul float %9, %26 ; [#uses=1]
- %38 = fmul float %10, %23 ; [#uses=1]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = fmul float %11, %20 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = fmul float %15, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fmul float %16, %46 ; [#uses=1]
- %48 = fadd float %44, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=3]
- %51 = fmul float %17, %50 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = fadd float %52, %31 ; [#uses=1]
- %54 = fmul float %12, %43 ; [#uses=1]
- %55 = fmul float %13, %46 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %14, %50 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=1]
- %59 = fadd float %58, %36 ; [#uses=1]
- %60 = fmul float %9, %43 ; [#uses=1]
- %61 = fmul float %10, %46 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %11, %50 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fadd float %64, %41 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = fmul float %67, %15 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=3]
- %71 = fmul float %70, %16 ; [#uses=1]
- %72 = fadd float %68, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=3]
- %75 = fmul float %74, %17 ; [#uses=1]
- %76 = fadd float %72, %75 ; [#uses=2]
- %77 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=3]
- %79 = fmul float %78, %15 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=3]
- %82 = fmul float %81, %16 ; [#uses=1]
- %83 = fadd float %79, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=3]
- %86 = fmul float %85, %17 ; [#uses=1]
- %87 = fadd float %83, %86 ; [#uses=2]
- %88 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=3]
- %90 = fmul float %89, %15 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=3]
- %93 = fmul float %92, %16 ; [#uses=1]
- %94 = fadd float %90, %93 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btTransform* %trans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=3]
- %97 = fmul float %96, %17 ; [#uses=1]
- %98 = fadd float %94, %97 ; [#uses=2]
- %99 = fmul float %67, %12 ; [#uses=1]
- %100 = fmul float %70, %13 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %74, %14 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=2]
- %104 = fmul float %78, %12 ; [#uses=1]
- %105 = fmul float %81, %13 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %85, %14 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=2]
- %109 = fmul float %89, %12 ; [#uses=1]
- %110 = fmul float %92, %13 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = fmul float %96, %14 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=2]
- %114 = fmul float %67, %9 ; [#uses=1]
- %115 = fmul float %70, %10 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=1]
- %117 = fmul float %74, %11 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=2]
- %119 = fmul float %78, %9 ; [#uses=1]
- %120 = fmul float %81, %10 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fmul float %85, %11 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=2]
- %124 = fmul float %89, %9 ; [#uses=1]
- %125 = fmul float %92, %10 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = fmul float %96, %11 ; [#uses=1]
- %128 = fadd float %126, %127 ; [#uses=2]
- %129 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %65, float* %129, align 4
- %130 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %59, float* %130, align 4
- %131 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %53, float* %131, align 4
- %132 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %132, align 4
- %133 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %128, float* %133, align 4
- %134 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %123, float* %134, align 4
- %135 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %118, float* %135, align 4
- %136 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %136, align 4
- %137 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %113, float* %137, align 4
- %138 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %108, float* %138, align 4
- %139 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %103, float* %139, align 4
- %140 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %140, align 4
- %141 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %98, float* %141, align 4
- %142 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %87, float* %142, align 4
- %143 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %76, float* %143, align 4
- %144 = getelementptr inbounds %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %144, align 4
- %scevgep9.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep9.1.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep9.2.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %145 = tail call float @fabsf(float %128) nounwind readnone ; [#uses=1]
- %146 = fadd float %145, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %146, float* %scevgep9.i, align 4
- %147 = tail call float @fabsf(float %123) nounwind readnone ; [#uses=1]
- %148 = fadd float %147, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %148, float* %scevgep9.1.i, align 4
- %149 = tail call float @fabsf(float %118) nounwind readnone ; [#uses=1]
- %150 = fadd float %149, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %150, float* %scevgep9.2.i, align 4
- %scevgep9.118.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep9.1.1.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep9.2.1.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %151 = tail call float @fabsf(float %113) nounwind readnone ; [#uses=1]
- %152 = fadd float %151, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %152, float* %scevgep9.118.i, align 4
- %153 = tail call float @fabsf(float %108) nounwind readnone ; [#uses=1]
- %154 = fadd float %153, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %154, float* %scevgep9.1.1.i, align 4
- %155 = tail call float @fabsf(float %103) nounwind readnone ; [#uses=1]
- %156 = fadd float %155, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %156, float* %scevgep9.2.1.i, align 4
- %scevgep9.221.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep9.1.2.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep9.2.2.i = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %this, i32 0, i32 2, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %157 = tail call float @fabsf(float %98) nounwind readnone ; [#uses=1]
- %158 = fadd float %157, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %158, float* %scevgep9.221.i, align 4
- %159 = tail call float @fabsf(float %87) nounwind readnone ; [#uses=1]
- %160 = fadd float %159, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %160, float* %scevgep9.1.2.i, align 4
- %161 = tail call float @fabsf(float %76) nounwind readnone ; [#uses=1]
- %162 = fadd float %161, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %162, float* %scevgep9.2.2.i, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr zeroext i8 @_ZNK6btAABB11collide_rayERK9btVector3S2_(%struct.GIM_AABB* nocapture %this, %struct.btQuadWord* nocapture %vorigin, %struct.btQuadWord* nocapture %vdir) nounwind readonly inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fadd float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fadd float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fadd float %11, %13 ; [#uses=1]
- %15 = fmul float %4, 5.000000e-01 ; [#uses=2]
- %16 = fmul float %9, 5.000000e-01 ; [#uses=2]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=2]
- %18 = fsub float %1, %15 ; [#uses=3]
- %19 = fsub float %6, %16 ; [#uses=3]
- %20 = fsub float %11, %17 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btQuadWord* %vorigin, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %22, %17 ; [#uses=4]
- %24 = tail call float @fabsf(float %23) nounwind readnone ; [#uses=1]
- %25 = fcmp ule float %24, %20 ; [#uses=1]
- br i1 %25, label %bb2, label %bb
-
-bb: ; preds = %entry
- %26 = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fmul float %27, %23 ; [#uses=1]
- %29 = fcmp ult float %28, 0.000000e+00 ; [#uses=1]
- br i1 %29, label %bb2, label %bb29
-
-bb2: ; preds = %bb, %entry
- %30 = getelementptr inbounds %struct.btQuadWord* %vorigin, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fsub float %31, %16 ; [#uses=4]
- %33 = tail call float @fabsf(float %32) nounwind readnone ; [#uses=1]
- %34 = fcmp ule float %33, %19 ; [#uses=1]
- br i1 %34, label %bb8, label %bb6
-
-bb6: ; preds = %bb2
- %35 = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fmul float %36, %32 ; [#uses=1]
- %38 = fcmp ult float %37, 0.000000e+00 ; [#uses=1]
- br i1 %38, label %bb8, label %bb29
-
-bb8: ; preds = %bb6, %bb2
- %39 = getelementptr inbounds %struct.btQuadWord* %vorigin, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fsub float %40, %15 ; [#uses=4]
- %42 = tail call float @fabsf(float %41) nounwind readnone ; [#uses=1]
- %43 = fcmp ule float %42, %18 ; [#uses=1]
- %.phi.trans.insert = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=3]
- br i1 %43, label %bb15, label %bb13
-
-bb13: ; preds = %bb8
- %44 = fmul float %.pre, %41 ; [#uses=1]
- %45 = fcmp ult float %44, 0.000000e+00 ; [#uses=1]
- br i1 %45, label %bb15, label %bb29
-
-bb15: ; preds = %bb13, %bb8
- %46 = phi float [ %.pre, %bb13 ], [ %.pre, %bb8 ] ; [#uses=3]
- %47 = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=3]
- %49 = fmul float %48, %41 ; [#uses=1]
- %50 = fmul float %46, %32 ; [#uses=1]
- %51 = fsub float %49, %50 ; [#uses=1]
- %52 = tail call float @fabsf(float %51) nounwind readnone ; [#uses=1]
- %53 = tail call float @fabsf(float %46) nounwind readnone ; [#uses=2]
- %54 = fmul float %19, %53 ; [#uses=1]
- %55 = tail call float @fabsf(float %48) nounwind readnone ; [#uses=2]
- %56 = fmul float %18, %55 ; [#uses=1]
- %57 = fadd float %54, %56 ; [#uses=1]
- %58 = fcmp ogt float %52, %57 ; [#uses=1]
- br i1 %58, label %bb29, label %bb22
-
-bb22: ; preds = %bb15
- %59 = fmul float %46, %23 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=3]
- %62 = fmul float %61, %41 ; [#uses=1]
- %63 = fsub float %59, %62 ; [#uses=1]
- %64 = tail call float @fabsf(float %63) nounwind readnone ; [#uses=1]
- %65 = fmul float %20, %53 ; [#uses=1]
- %66 = tail call float @fabsf(float %61) nounwind readnone ; [#uses=2]
- %67 = fmul float %18, %66 ; [#uses=1]
- %68 = fadd float %65, %67 ; [#uses=1]
- %69 = fcmp ogt float %64, %68 ; [#uses=1]
- br i1 %69, label %bb29, label %bb25
-
-bb25: ; preds = %bb22
- %70 = fmul float %61, %32 ; [#uses=1]
- %71 = fmul float %48, %23 ; [#uses=1]
- %72 = fsub float %70, %71 ; [#uses=1]
- %73 = tail call float @fabsf(float %72) nounwind readnone ; [#uses=1]
- %74 = fmul float %20, %55 ; [#uses=1]
- %75 = fmul float %19, %66 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %not. = fcmp ule float %73, %76 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb29: ; preds = %bb22, %bb15, %bb13, %bb6, %bb
- ret i8 0
-}
-
-; [#uses=2]
-define linkonce_odr zeroext i8 @_ZNK6btAABB23overlapping_trans_cacheERKS_RK26BT_BOX_BOX_TRANSFORM_CACHEb(%struct.GIM_AABB* nocapture %this, %struct.GIM_AABB* nocapture %box, %struct.BT_BOX_BOX_TRANSFORM_CACHE* nocapture %transcache, i8 zeroext %fulltest) nounwind readonly inlinehint align 2 {
-entry:
- %ea = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %eb = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %ca = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %T = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fadd float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fadd float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.GIM_AABB* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fadd float %11, %13 ; [#uses=1]
- %15 = fmul float %4, 5.000000e-01 ; [#uses=2]
- %16 = fmul float %9, 5.000000e-01 ; [#uses=2]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %ca, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 8
- %19 = getelementptr inbounds %struct.btQuadWord* %ca, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %19, align 4
- %20 = getelementptr inbounds %struct.btQuadWord* %ca, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %15, float* %20, align 8
- %21 = getelementptr inbounds %struct.btQuadWord* %ca, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = fsub float %1, %15 ; [#uses=2]
- %23 = fsub float %6, %16 ; [#uses=2]
- %24 = fsub float %11, %17 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btQuadWord* %ea, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %24, float* %25, align 8
- %26 = getelementptr inbounds %struct.btQuadWord* %ea, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %23, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuadWord* %ea, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %22, float* %27, align 8
- %28 = getelementptr inbounds %struct.btQuadWord* %ea, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=2]
- %31 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fadd float %35, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fadd float %40, %42 ; [#uses=1]
- %44 = fmul float %33, 5.000000e-01 ; [#uses=2]
- %45 = fmul float %38, 5.000000e-01 ; [#uses=2]
- %46 = fmul float %43, 5.000000e-01 ; [#uses=2]
- %47 = fsub float %30, %44 ; [#uses=2]
- %48 = fsub float %35, %45 ; [#uses=2]
- %49 = fsub float %40, %46 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btQuadWord* %eb, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %49, float* %50, align 8
- %51 = getelementptr inbounds %struct.btQuadWord* %eb, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %48, float* %51, align 4
- %52 = getelementptr inbounds %struct.btQuadWord* %eb, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %47, float* %52, align 8
- %53 = getelementptr inbounds %struct.btQuadWord* %eb, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 4
- br label %bb3
-
-bb: ; preds = %bb3
- %scevgep58 = getelementptr %struct.btQuadWord* %T, i32 0, i32 0, i32 %79 ; [#uses=1]
- %scevgep6869 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 %79, i32 0, i32 0 ; [#uses=1]
- %scevgep67 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 %79, i32 0, i32 1 ; [#uses=1]
- %scevgep66 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 %79, i32 0, i32 2 ; [#uses=1]
- %scevgep65 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 0, i32 0, i32 %79 ; [#uses=1]
- %scevgep64 = getelementptr %struct.btQuadWord* %ca, i32 0, i32 0, i32 %79 ; [#uses=1]
- %scevgep6263 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 %79, i32 0, i32 0 ; [#uses=1]
- %scevgep61 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 %79, i32 0, i32 1 ; [#uses=1]
- %scevgep60 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 %79, i32 0, i32 2 ; [#uses=1]
- %scevgep59 = getelementptr %struct.btQuadWord* %ea, i32 0, i32 0, i32 %79 ; [#uses=1]
- %54 = load float* %scevgep6869, align 4 ; [#uses=1]
- %55 = fmul float %54, %46 ; [#uses=1]
- %56 = load float* %scevgep67, align 4 ; [#uses=1]
- %57 = fmul float %56, %45 ; [#uses=1]
- %58 = fadd float %55, %57 ; [#uses=1]
- %59 = load float* %scevgep66, align 4 ; [#uses=1]
- %60 = fmul float %59, %44 ; [#uses=1]
- %61 = fadd float %58, %60 ; [#uses=1]
- %62 = load float* %scevgep65, align 4 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = load float* %scevgep64, align 4 ; [#uses=1]
- %65 = fsub float %63, %64 ; [#uses=2]
- store float %65, float* %scevgep58, align 4
- %66 = load float* %scevgep6263, align 4 ; [#uses=1]
- %67 = fmul float %66, %49 ; [#uses=1]
- %68 = load float* %scevgep61, align 4 ; [#uses=1]
- %69 = fmul float %68, %48 ; [#uses=1]
- %70 = fadd float %67, %69 ; [#uses=1]
- %71 = load float* %scevgep60, align 4 ; [#uses=1]
- %72 = fmul float %71, %47 ; [#uses=1]
- %73 = fadd float %70, %72 ; [#uses=1]
- %74 = load float* %scevgep59, align 4 ; [#uses=1]
- %75 = fadd float %73, %74 ; [#uses=1]
- %76 = call float @fabsf(float %65) nounwind readnone ; [#uses=1]
- %77 = fcmp ogt float %76, %75 ; [#uses=1]
- br i1 %77, label %bb34, label %bb2
-
-bb2: ; preds = %bb
- %78 = add nsw i32 %79, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- %79 = phi i32 [ 0, %entry ], [ %78, %bb2 ] ; [#uses=12]
- %80 = icmp slt i32 %79, 3 ; [#uses=1]
- br i1 %80, label %bb, label %bb9.preheader
-
-bb9.preheader: ; preds = %bb3
- %81 = getelementptr inbounds %struct.btQuadWord* %T, i32 0, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %81, align 8 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btQuadWord* %T, i32 0, i32 0, i32 1 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %T, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb9
-
-bb5: ; preds = %bb9
- %scevgep57 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 0, i32 0, i32 %108 ; [#uses=1]
- %scevgep56 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 1, i32 0, i32 %108 ; [#uses=1]
- %scevgep55 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 2, i32 0, i32 %108 ; [#uses=1]
- %scevgep54 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 0, i32 0, i32 %108 ; [#uses=1]
- %scevgep53 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 1, i32 0, i32 %108 ; [#uses=1]
- %scevgep52 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 2, i32 0, i32 %108 ; [#uses=1]
- %scevgep51 = getelementptr %struct.btQuadWord* %eb, i32 0, i32 0, i32 %108 ; [#uses=1]
- %85 = load float* %scevgep57, align 4 ; [#uses=1]
- %86 = fmul float %82, %85 ; [#uses=1]
- %87 = load float* %83, align 4 ; [#uses=1]
- %88 = load float* %scevgep56, align 4 ; [#uses=1]
- %89 = fmul float %87, %88 ; [#uses=1]
- %90 = fadd float %86, %89 ; [#uses=1]
- %91 = load float* %84, align 8 ; [#uses=1]
- %92 = load float* %scevgep55, align 4 ; [#uses=1]
- %93 = fmul float %91, %92 ; [#uses=1]
- %94 = fadd float %90, %93 ; [#uses=1]
- %95 = load float* %scevgep54, align 4 ; [#uses=1]
- %96 = fmul float %24, %95 ; [#uses=1]
- %97 = load float* %scevgep53, align 4 ; [#uses=1]
- %98 = fmul float %23, %97 ; [#uses=1]
- %99 = fadd float %96, %98 ; [#uses=1]
- %100 = load float* %scevgep52, align 4 ; [#uses=1]
- %101 = fmul float %22, %100 ; [#uses=1]
- %102 = fadd float %99, %101 ; [#uses=1]
- %103 = load float* %scevgep51, align 4 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = call float @fabsf(float %94) nounwind readnone ; [#uses=1]
- %106 = fcmp ogt float %105, %104 ; [#uses=1]
- br i1 %106, label %bb34, label %bb8
-
-bb8: ; preds = %bb5
- %107 = add nsw i32 %108, 1 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb8, %bb9.preheader
- %108 = phi i32 [ %107, %bb8 ], [ 0, %bb9.preheader ] ; [#uses=9]
- %109 = icmp slt i32 %108, 3 ; [#uses=1]
- br i1 %109, label %bb5, label %bb10
-
-bb10: ; preds = %bb9
- %toBool11 = icmp eq i8 %fulltest, 0 ; [#uses=1]
- br i1 %toBool11, label %bb34, label %bb32
-
-bb13: ; preds = %bb32
- %tmp46 = add i32 %149, 1 ; [#uses=2]
- %tmp45 = add i32 %149, 2 ; [#uses=1]
- %110 = srem i32 %tmp46, 3 ; [#uses=2]
- %111 = srem i32 %tmp45, 3 ; [#uses=2]
- %112 = icmp eq i32 %149, 0 ; [#uses=1]
- %iftmp.168.0 = zext i1 %112 to i32 ; [#uses=2]
- %113 = icmp eq i32 %149, 2 ; [#uses=1]
- %iftmp.169.0 = select i1 %113, i32 1, i32 2 ; [#uses=2]
- %114 = getelementptr inbounds %struct.btQuadWord* %T, i32 0, i32 0, i32 %111 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btQuadWord* %T, i32 0, i32 0, i32 %110 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btQuadWord* %ea, i32 0, i32 0, i32 %iftmp.168.0 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btQuadWord* %ea, i32 0, i32 0, i32 %iftmp.169.0 ; [#uses=1]
- br label %bb30
-
-bb20: ; preds = %bb30
- %scevgep44 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 %110, i32 0, i32 %147 ; [#uses=1]
- %scevgep43 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 1, i32 0, i32 %111, i32 0, i32 %147 ; [#uses=1]
- %scevgep42 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 %iftmp.169.0, i32 0, i32 %147 ; [#uses=1]
- %scevgep = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 %iftmp.168.0, i32 0, i32 %147 ; [#uses=1]
- %118 = icmp eq i32 %147, 2 ; [#uses=1]
- %iftmp.170.0 = select i1 %118, i32 1, i32 2 ; [#uses=2]
- %119 = icmp eq i32 %147, 0 ; [#uses=1]
- %iftmp.171.0 = zext i1 %119 to i32 ; [#uses=2]
- %120 = load float* %114, align 4 ; [#uses=1]
- %121 = load float* %scevgep44, align 4 ; [#uses=1]
- %122 = fmul float %120, %121 ; [#uses=1]
- %123 = load float* %115, align 4 ; [#uses=1]
- %124 = load float* %scevgep43, align 4 ; [#uses=1]
- %125 = fmul float %123, %124 ; [#uses=1]
- %126 = fsub float %122, %125 ; [#uses=1]
- %127 = load float* %116, align 4 ; [#uses=1]
- %128 = load float* %scevgep42, align 4 ; [#uses=1]
- %129 = fmul float %127, %128 ; [#uses=1]
- %130 = load float* %117, align 4 ; [#uses=1]
- %131 = load float* %scevgep, align 4 ; [#uses=1]
- %132 = fmul float %130, %131 ; [#uses=1]
- %133 = fadd float %129, %132 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btQuadWord* %eb, i32 0, i32 0, i32 %iftmp.171.0 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- %scevgep50 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 %149, i32 0, i32 %iftmp.170.0 ; [#uses=1]
- %136 = load float* %scevgep50, align 4 ; [#uses=1]
- %137 = fmul float %135, %136 ; [#uses=1]
- %138 = fadd float %133, %137 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btQuadWord* %eb, i32 0, i32 0, i32 %iftmp.170.0 ; [#uses=1]
- %140 = load float* %139, align 4 ; [#uses=1]
- %scevgep49 = getelementptr %struct.BT_BOX_BOX_TRANSFORM_CACHE* %transcache, i32 0, i32 2, i32 0, i32 %149, i32 0, i32 %iftmp.171.0 ; [#uses=1]
- %141 = load float* %scevgep49, align 4 ; [#uses=1]
- %142 = fmul float %140, %141 ; [#uses=1]
- %143 = fadd float %138, %142 ; [#uses=1]
- %144 = call float @fabsf(float %126) nounwind readnone ; [#uses=1]
- %145 = fcmp ogt float %144, %143 ; [#uses=1]
- br i1 %145, label %bb34, label %bb29
-
-bb29: ; preds = %bb20
- %146 = add nsw i32 %147, 1 ; [#uses=1]
- br label %bb30
-
-bb30: ; preds = %bb29, %bb13
- %147 = phi i32 [ 0, %bb13 ], [ %146, %bb29 ] ; [#uses=8]
- %148 = icmp slt i32 %147, 3 ; [#uses=1]
- br i1 %148, label %bb20, label %bb32
-
-bb32: ; preds = %bb30, %bb10
- %149 = phi i32 [ 0, %bb10 ], [ %tmp46, %bb30 ] ; [#uses=7]
- %150 = icmp slt i32 %149, 3 ; [#uses=1]
- br i1 %150, label %bb13, label %bb34
-
-bb34: ; preds = %bb32, %bb20, %bb10, %bb5, %bb
- %.0 = phi i8 [ 1, %bb10 ], [ 0, %bb20 ], [ 1, %bb32 ], [ 0, %bb5 ], [ 0, %bb ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=0]
-define void @_ZN12btGImpactBvh5refitEv(%struct.btGImpactBvh* nocapture %this) align 2 {
-entry:
- %leafbox = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %bound = alloca %struct.GIM_AABB, align 8 ; [#uses=20]
- %temp_box = alloca %struct.GIM_AABB, align 8 ; [#uses=20]
- %0 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %4 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %5 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %6 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %7 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %8 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %9 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %10 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %13 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %14 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %15 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %16 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %17 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %18 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %19 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %tmp49 = add i32 %1, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7.backedge, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb7.backedge ] ; [#uses=4]
- %nodecount.028 = sub i32 %1, %indvar ; [#uses=26]
- %tmp50 = sub i32 %tmp49, %indvar ; [#uses=2]
- %29 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=26]
- %scevgep69 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -1 ; [#uses=1]
- %scevgep6970 = bitcast float* %scevgep69 to i32* ; [#uses=1]
- %30 = load i32* %scevgep6970, align 4 ; [#uses=2]
- %toBool = icmp slt i32 %30, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %31 = load %struct.btActionInterface** %20, align 4 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btActionInterface* %31, i32 0, i32 0 ; [#uses=1]
- %33 = load i32 (...)*** %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i32 (...)** %33, i32 4 ; [#uses=1]
- %35 = load i32 (...)** %34, align 4 ; [#uses=1]
- %36 = bitcast i32 (...)* %35 to void (%struct.btActionInterface*, i32, %struct.GIM_AABB*)* ; [#uses=1]
- call void %36(%struct.btActionInterface* %31, i32 %30, %struct.GIM_AABB* %leafbox)
- %37 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=8]
- %38 = load float* %21, align 8 ; [#uses=1]
- %scevgep6061 = getelementptr inbounds %struct.GIM_AABB_DATA* %37, i32 %tmp50, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %38, float* %scevgep6061, align 4
- %39 = load float* %22, align 4 ; [#uses=1]
- %scevgep62 = getelementptr %struct.GIM_AABB_DATA* %37, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -8 ; [#uses=1]
- store float %39, float* %scevgep62, align 4
- %40 = load float* %23, align 8 ; [#uses=1]
- %scevgep63 = getelementptr %struct.GIM_AABB_DATA* %37, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -7 ; [#uses=1]
- store float %40, float* %scevgep63, align 4
- %41 = load float* %24, align 4 ; [#uses=1]
- %scevgep64 = getelementptr %struct.GIM_AABB_DATA* %37, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -6 ; [#uses=1]
- store float %41, float* %scevgep64, align 4
- %42 = load float* %25, align 8 ; [#uses=1]
- %scevgep65 = getelementptr %struct.GIM_AABB_DATA* %37, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -5 ; [#uses=1]
- store float %42, float* %scevgep65, align 4
- %43 = load float* %26, align 4 ; [#uses=1]
- %scevgep66 = getelementptr %struct.GIM_AABB_DATA* %37, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -4 ; [#uses=1]
- store float %43, float* %scevgep66, align 4
- %44 = load float* %27, align 8 ; [#uses=1]
- %scevgep67 = getelementptr %struct.GIM_AABB_DATA* %37, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -3 ; [#uses=1]
- store float %44, float* %scevgep67, align 4
- %45 = load float* %28, align 4 ; [#uses=1]
- %scevgep68 = getelementptr %struct.GIM_AABB_DATA* %37, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -2 ; [#uses=1]
- store float %45, float* %scevgep68, align 4
- br label %bb7.backedge
-
-bb7.backedge: ; preds = %bb6, %bb1
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %1 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-bb2: ; preds = %bb
- store float 0x47EFFFFFE0000000, float* %4, align 8
- store float 0x47EFFFFFE0000000, float* %5, align 4
- store float 0x47EFFFFFE0000000, float* %6, align 8
- store float 0xC7EFFFFFE0000000, float* %7, align 8
- store float 0xC7EFFFFFE0000000, float* %8, align 4
- store float 0xC7EFFFFFE0000000, float* %9, align 8
- %46 = icmp eq i32 %1, %indvar ; [#uses=1]
- br i1 %46, label %bb4, label %bb3
-
-bb3: ; preds = %bb2
- %scevgep31 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %scevgep31, align 4 ; [#uses=2]
- store float %47, float* %12, align 8
- %scevgep32 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %scevgep32, align 4 ; [#uses=2]
- store float %48, float* %13, align 4
- %scevgep33 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %scevgep33, align 4 ; [#uses=2]
- store float %49, float* %14, align 8
- %scevgep34 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %50 = load float* %scevgep34, align 4 ; [#uses=1]
- store float %50, float* %15, align 4
- %scevgep35 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %scevgep35, align 4 ; [#uses=2]
- store float %51, float* %16, align 8
- %scevgep36 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %52 = load float* %scevgep36, align 4 ; [#uses=2]
- store float %52, float* %17, align 4
- %scevgep37 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %scevgep37, align 4 ; [#uses=2]
- store float %53, float* %18, align 8
- %scevgep38 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %54 = load float* %scevgep38, align 4 ; [#uses=1]
- store float %54, float* %19, align 4
- %55 = fcmp olt float %47, 0x47EFFFFFE0000000 ; [#uses=1]
- %box.pn25.i10 = select i1 %55, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.139.0.in.i11 = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i10, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.139.0.i12 = load float* %iftmp.139.0.in.i11, align 8 ; [#uses=2]
- store float %iftmp.139.0.i12, float* %4, align 8
- %56 = fcmp olt float %48, 0x47EFFFFFE0000000 ; [#uses=1]
- %box.pn24.i13 = select i1 %56, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.140.0.in.i14 = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i13, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.140.0.i15 = load float* %iftmp.140.0.in.i14, align 4 ; [#uses=2]
- store float %iftmp.140.0.i15, float* %5, align 4
- %57 = fcmp olt float %49, 0x47EFFFFFE0000000 ; [#uses=1]
- %box.pn23.i16 = select i1 %57, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.141.0.in.i17 = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i16, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.141.0.i18 = load float* %iftmp.141.0.in.i17, align 8 ; [#uses=2]
- store float %iftmp.141.0.i18, float* %6, align 8
- %58 = fcmp ogt float %51, 0xC7EFFFFFE0000000 ; [#uses=1]
- %box.pn22.i19 = select i1 %58, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.142.0.in.i20 = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i19, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.142.0.i21 = load float* %iftmp.142.0.in.i20, align 8 ; [#uses=2]
- store float %iftmp.142.0.i21, float* %7, align 8
- %59 = fcmp ogt float %52, 0xC7EFFFFFE0000000 ; [#uses=1]
- %box.pn21.i22 = select i1 %59, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.143.0.in.i23 = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i22, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.143.0.i24 = load float* %iftmp.143.0.in.i23, align 4 ; [#uses=2]
- store float %iftmp.143.0.i24, float* %8, align 4
- %60 = fcmp ogt float %53, 0xC7EFFFFFE0000000 ; [#uses=1]
- %box.pn.i25 = select i1 %60, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.144.0.in.i26 = getelementptr inbounds %struct.GIM_AABB* %box.pn.i25, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.144.0.i27 = load float* %iftmp.144.0.in.i26, align 8 ; [#uses=2]
- store float %iftmp.144.0.i27, float* %9, align 8
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %61 = phi float [ 0xC7EFFFFFE0000000, %bb2 ], [ %iftmp.144.0.i27, %bb3 ] ; [#uses=1]
- %62 = phi float [ 0xC7EFFFFFE0000000, %bb2 ], [ %iftmp.143.0.i24, %bb3 ] ; [#uses=1]
- %63 = phi float [ 0xC7EFFFFFE0000000, %bb2 ], [ %iftmp.142.0.i21, %bb3 ] ; [#uses=1]
- %64 = phi float [ 0x47EFFFFFE0000000, %bb2 ], [ %iftmp.141.0.i18, %bb3 ] ; [#uses=1]
- %65 = phi float [ 0x47EFFFFFE0000000, %bb2 ], [ %iftmp.140.0.i15, %bb3 ] ; [#uses=1]
- %66 = phi float [ 0x47EFFFFFE0000000, %bb2 ], [ %iftmp.139.0.i12, %bb3 ] ; [#uses=2]
- %scevgep39 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 1 ; [#uses=1]
- %67 = load i32* %scevgep39, align 4 ; [#uses=2]
- %toBool.i.i = icmp slt i32 %67, 0 ; [#uses=1]
- %tmp = sub i32 0, %67 ; [#uses=1]
- %.p = select i1 %toBool.i.i, i32 %tmp, i32 1 ; [#uses=2]
- %tmp48 = sub i32 0, %nodecount.028 ; [#uses=1]
- %68 = icmp eq i32 %.p, %tmp48 ; [#uses=1]
- br i1 %68, label %bb6, label %bb5
-
-bb5: ; preds = %bb4
- %tmp47 = add i32 %.p, %nodecount.028 ; [#uses=8]
- %69 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=2]
- store float %70, float* %12, align 8
- %71 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=2]
- store float %72, float* %13, align 4
- %73 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=2]
- store float %74, float* %14, align 8
- %75 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %15, align 4
- %77 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=2]
- store float %78, float* %16, align 8
- %79 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=2]
- store float %80, float* %17, align 4
- %81 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=2]
- store float %82, float* %18, align 8
- %83 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp47, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %19, align 4
- %85 = fcmp ogt float %66, %70 ; [#uses=1]
- %box.pn25.i = select i1 %85, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.139.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.139.0.i = load float* %iftmp.139.0.in.i, align 8 ; [#uses=2]
- store float %iftmp.139.0.i, float* %4, align 8
- %86 = fcmp ogt float %65, %72 ; [#uses=1]
- %box.pn24.i = select i1 %86, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.140.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.140.0.i = load float* %iftmp.140.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.140.0.i, float* %5, align 4
- %87 = fcmp ogt float %64, %74 ; [#uses=1]
- %box.pn23.i = select i1 %87, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.141.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.141.0.i = load float* %iftmp.141.0.in.i, align 8 ; [#uses=1]
- store float %iftmp.141.0.i, float* %6, align 8
- %88 = fcmp olt float %63, %78 ; [#uses=1]
- %box.pn22.i = select i1 %88, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.142.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.142.0.i = load float* %iftmp.142.0.in.i, align 8 ; [#uses=1]
- store float %iftmp.142.0.i, float* %7, align 8
- %89 = fcmp olt float %62, %80 ; [#uses=1]
- %box.pn21.i = select i1 %89, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.143.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.143.0.i = load float* %iftmp.143.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.143.0.i, float* %8, align 4
- %90 = fcmp olt float %61, %82 ; [#uses=1]
- %box.pn.i = select i1 %90, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.144.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.144.0.i = load float* %iftmp.144.0.in.i, align 8 ; [#uses=1]
- store float %iftmp.144.0.i, float* %9, align 8
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4
- %91 = phi float [ %66, %bb4 ], [ %iftmp.139.0.i, %bb5 ] ; [#uses=1]
- %scevgep5152 = getelementptr inbounds %struct.GIM_AABB_DATA* %29, i32 %tmp50, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %91, float* %scevgep5152, align 4
- %92 = load float* %5, align 4 ; [#uses=1]
- %scevgep53 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -8 ; [#uses=1]
- store float %92, float* %scevgep53, align 4
- %93 = load float* %6, align 8 ; [#uses=1]
- %scevgep54 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -7 ; [#uses=1]
- store float %93, float* %scevgep54, align 4
- %94 = load float* %10, align 4 ; [#uses=1]
- %scevgep55 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -6 ; [#uses=1]
- store float %94, float* %scevgep55, align 4
- %95 = load float* %7, align 8 ; [#uses=1]
- %scevgep56 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -5 ; [#uses=1]
- store float %95, float* %scevgep56, align 4
- %96 = load float* %8, align 4 ; [#uses=1]
- %scevgep57 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -4 ; [#uses=1]
- store float %96, float* %scevgep57, align 4
- %97 = load float* %9, align 8 ; [#uses=1]
- %scevgep58 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -3 ; [#uses=1]
- store float %97, float* %scevgep58, align 4
- %98 = load float* %11, align 4 ; [#uses=1]
- %scevgep59 = getelementptr %struct.GIM_AABB_DATA* %29, i32 %nodecount.028, i32 0, i32 0, i32 0, i32 -2 ; [#uses=1]
- store float %98, float* %scevgep59, align 4
- br label %bb7.backedge
-
-return: ; preds = %bb7.backedge, %entry
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN9btBvhTree30_sort_and_calc_splitting_indexER18GIM_BVH_DATA_ARRAYiii(%struct.btBvhTree* nocapture %this, %struct.GIM_BVH_DATA_ARRAY* nocapture %primitive_boxes, i32 %startIndex, i32 %endIndex, i32 %splitAxis) nounwind align 2 {
-entry:
- %means = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %center4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = sub nsw i32 %endIndex, %startIndex ; [#uses=5]
- %1 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %1, align 8
- %2 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %3, align 8
- %4 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = icmp slt i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %5, label %bb.nph30, label %bb2
-
-bb.nph30: ; preds = %entry
- %6 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- %7 = load %struct.GIM_AABB_DATA** %6, align 4 ; [#uses=6]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph30
- %indvar56 = phi i32 [ 0, %bb.nph30 ], [ %indvar.next57, %bb ] ; [#uses=2]
- %8 = phi float [ 0.000000e+00, %bb.nph30 ], [ %25, %bb ] ; [#uses=1]
- %9 = phi float [ 0.000000e+00, %bb.nph30 ], [ %24, %bb ] ; [#uses=1]
- %10 = phi float [ 0.000000e+00, %bb.nph30 ], [ %23, %bb ] ; [#uses=1]
- %tmp60 = add i32 %indvar56, %startIndex ; [#uses=6]
- %scevgep61 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep62 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep63 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep64 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep65 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep6667 = getelementptr inbounds %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %scevgep61, align 4 ; [#uses=1]
- %12 = load float* %scevgep62, align 4 ; [#uses=1]
- %13 = fadd float %11, %12 ; [#uses=1]
- %14 = load float* %scevgep63, align 4 ; [#uses=1]
- %15 = load float* %scevgep64, align 4 ; [#uses=1]
- %16 = fadd float %14, %15 ; [#uses=1]
- %17 = load float* %scevgep65, align 4 ; [#uses=1]
- %18 = load float* %scevgep6667, align 4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fmul float %13, 5.000000e-01 ; [#uses=1]
- %21 = fmul float %16, 5.000000e-01 ; [#uses=1]
- %22 = fmul float %19, 5.000000e-01 ; [#uses=1]
- %23 = fadd float %10, %22 ; [#uses=3]
- %24 = fadd float %9, %21 ; [#uses=3]
- %25 = fadd float %8, %20 ; [#uses=3]
- %indvar.next57 = add i32 %indvar56, 1 ; [#uses=2]
- %exitcond59 = icmp eq i32 %indvar.next57, %0 ; [#uses=1]
- br i1 %exitcond59, label %bb1.bb2_crit_edge, label %bb
-
-bb1.bb2_crit_edge: ; preds = %bb
- store float %25, float* %3, align 8
- store float %24, float* %2, align 4
- store float %23, float* %1, align 8
- br label %bb2
-
-bb2: ; preds = %bb1.bb2_crit_edge, %entry
- %26 = phi float [ %25, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %27 = phi float [ %24, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %28 = phi float [ %23, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %29 = sitofp i32 %0 to float ; [#uses=1]
- %30 = fdiv float 1.000000e+00, %29 ; [#uses=3]
- %31 = fmul float %28, %30 ; [#uses=1]
- store float %31, float* %1, align 8
- %32 = fmul float %27, %30 ; [#uses=1]
- store float %32, float* %2, align 4
- %33 = fmul float %26, %30 ; [#uses=1]
- store float %33, float* %3, align 8
- %34 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- br i1 %5, label %bb.nph, label %bb8
-
-bb.nph: ; preds = %bb2
- %36 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=2]
- %37 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 1 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb6, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb6 ] ; [#uses=2]
- %splitIndex.128 = phi i32 [ %startIndex, %bb.nph ], [ %splitIndex.0, %bb6 ] ; [#uses=12]
- %tmp35 = add i32 %indvar, %startIndex ; [#uses=10]
- %42 = load %struct.GIM_AABB_DATA** %36, align 4 ; [#uses=11]
- %scevgep47 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %scevgep47, align 4 ; [#uses=2]
- %scevgep48 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %scevgep48, align 4 ; [#uses=2]
- %45 = fadd float %43, %44 ; [#uses=1]
- %scevgep49 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %scevgep49, align 4 ; [#uses=2]
- %scevgep50 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %scevgep50, align 4 ; [#uses=2]
- %48 = fadd float %46, %47 ; [#uses=1]
- %scevgep51 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %scevgep51, align 4 ; [#uses=2]
- %scevgep5253 = getelementptr inbounds %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %scevgep5253, align 4 ; [#uses=2]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fmul float %45, 5.000000e-01 ; [#uses=1]
- %53 = fmul float %48, 5.000000e-01 ; [#uses=1]
- %54 = fmul float %51, 5.000000e-01 ; [#uses=1]
- store float %54, float* %37, align 8
- store float %53, float* %38, align 4
- store float %52, float* %39, align 8
- store float 0.000000e+00, float* %40, align 4
- %55 = load float* %41, align 4 ; [#uses=1]
- %56 = fcmp ogt float %55, %35 ; [#uses=1]
- br i1 %56, label %bb5, label %bb6
-
-bb5: ; preds = %bb3
- %scevgep39 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %57 = load float* %scevgep39, align 4 ; [#uses=1]
- %scevgep43 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %58 = load float* %scevgep43, align 4 ; [#uses=1]
- %scevgep44 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 1 ; [#uses=1]
- %59 = load i32* %scevgep44, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.GIM_AABB_DATA* %42, i32 %splitIndex.128 ; [#uses=1]
- %61 = bitcast %struct.GIM_AABB_DATA* %60 to i8* ; [#uses=1]
- %scevgep45 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35 ; [#uses=1]
- %scevgep4546 = bitcast %struct.GIM_AABB_DATA* %scevgep45 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep4546, i8* %61, i32 36, i32 4, i1 false) nounwind
- %62 = load %struct.GIM_AABB_DATA** %36, align 4 ; [#uses=9]
- %.020.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %50, float* %.020.i, align 4
- %.122.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %47, float* %.122.i, align 4
- %.2.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %44, float* %.2.i, align 4
- %.3.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %57, float* %.3.i, align 4
- %.1813.0.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %49, float* %.1813.0.i, align 4
- %.1813.1.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %.1813.1.i, align 4
- %.1813.2.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %43, float* %.1813.2.i, align 4
- %.1813.3.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %58, float* %.1813.3.i, align 4
- %.1.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 1 ; [#uses=1]
- store i32 %59, i32* %.1.i, align 4
- %63 = add nsw i32 %splitIndex.128, 1 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb3
- %splitIndex.0 = phi i32 [ %63, %bb5 ], [ %splitIndex.128, %bb3 ] ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb8, label %bb3
-
-bb8: ; preds = %bb6, %bb2
- %splitIndex.1.lcssa = phi i32 [ %startIndex, %bb2 ], [ %splitIndex.0, %bb6 ] ; [#uses=3]
- %64 = sdiv i32 %0, 3 ; [#uses=2]
- %65 = add nsw i32 %64, %startIndex ; [#uses=1]
- %66 = icmp slt i32 %65, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %66, label %bb9, label %bb14
-
-bb9: ; preds = %bb8
- %67 = add nsw i32 %endIndex, -1 ; [#uses=1]
- %68 = sub i32 %67, %64 ; [#uses=1]
- %69 = icmp sgt i32 %68, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %69, label %bb11, label %bb14
-
-bb11: ; preds = %bb9
- ret i32 %splitIndex.1.lcssa
-
-bb14: ; preds = %bb9, %bb8
- %70 = ashr i32 %0, 1 ; [#uses=1]
- %71 = add nsw i32 %70, %startIndex ; [#uses=1]
- ret i32 %71
-}
-
-; [#uses=4]
-define void @_ZN9btBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %endIndex) nounwind align 2 {
-entry:
- %node_bound = alloca %struct.GIM_AABB, align 8 ; [#uses=12]
- %0 = getelementptr inbounds %struct.btBvhTree* %this, i32 0, i32 0 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=18]
- %2 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* %0, align 4
- %3 = sub nsw i32 %endIndex, %startIndex ; [#uses=2]
- %4 = icmp eq i32 %3, 1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=2]
- %6 = load %struct.GIM_AABB_DATA** %5, align 4 ; [#uses=8]
- %7 = getelementptr inbounds %struct.btBvhTree* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %8 = load %struct.GIM_AABB_DATA** %7, align 4 ; [#uses=8]
- %9 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.GIM_AABB_DATA* %8, i32 %1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %31 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = load %struct.GIM_AABB_DATA** %5, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.GIM_AABB_DATA* %33, i32 %startIndex, i32 1 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = load %struct.GIM_AABB_DATA** %7, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.GIM_AABB_DATA* %36, i32 %1, i32 1 ; [#uses=1]
- store i32 %35, i32* %37, align 4
- ret void
-
-bb1: ; preds = %entry
- %38 = call i32 @_ZN9btBvhTree20_calc_splitting_axisER18GIM_BVH_DATA_ARRAYii(%struct.btBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %endIndex) ; [#uses=1]
- %39 = call i32 @_ZN9btBvhTree30_sort_and_calc_splitting_indexER18GIM_BVH_DATA_ARRAYiii(%struct.btBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %endIndex, i32 %38) ; [#uses=2]
- %40 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %40, align 8
- %41 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %41, align 4
- %42 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %42, align 8
- %43 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %43, align 8
- %44 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %44, align 4
- %45 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %45, align 8
- %46 = icmp slt i32 %startIndex, %endIndex ; [#uses=1]
- br i1 %46, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %bb1
- %47 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %48 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.144.0.i, %bb2 ] ; [#uses=1]
- %49 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.143.0.i, %bb2 ] ; [#uses=1]
- %50 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.142.0.i, %bb2 ] ; [#uses=1]
- %51 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.141.0.i, %bb2 ] ; [#uses=1]
- %52 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.140.0.i, %bb2 ] ; [#uses=1]
- %53 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.139.0.i, %bb2 ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb2 ] ; [#uses=2]
- %tmp7 = add i32 %indvar, %startIndex ; [#uses=7]
- %54 = load %struct.GIM_AABB_DATA** %47, align 4 ; [#uses=7]
- %scevgep1920 = getelementptr inbounds %struct.GIM_AABB_DATA* %54, i32 %tmp7, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %scevgep1920, align 4 ; [#uses=1]
- %56 = fcmp ogt float %53, %55 ; [#uses=1]
- %scevgep1718 = getelementptr inbounds %struct.GIM_AABB_DATA* %54, i32 %tmp7, i32 0 ; [#uses=6]
- %box.pn25.i = select i1 %56, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.139.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.139.0.i = load float* %iftmp.139.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.139.0.i, float* %40, align 8
- %scevgep21 = getelementptr %struct.GIM_AABB_DATA* %54, i32 %tmp7, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %scevgep21, align 4 ; [#uses=1]
- %58 = fcmp ogt float %52, %57 ; [#uses=1]
- %box.pn24.i = select i1 %58, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.140.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.140.0.i = load float* %iftmp.140.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.140.0.i, float* %41, align 4
- %scevgep22 = getelementptr %struct.GIM_AABB_DATA* %54, i32 %tmp7, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %scevgep22, align 4 ; [#uses=1]
- %60 = fcmp ogt float %51, %59 ; [#uses=1]
- %box.pn23.i = select i1 %60, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.141.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.141.0.i = load float* %iftmp.141.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.141.0.i, float* %42, align 8
- %scevgep23 = getelementptr %struct.GIM_AABB_DATA* %54, i32 %tmp7, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %scevgep23, align 4 ; [#uses=1]
- %62 = fcmp olt float %50, %61 ; [#uses=1]
- %box.pn22.i = select i1 %62, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.142.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.142.0.i = load float* %iftmp.142.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.142.0.i, float* %43, align 8
- %scevgep24 = getelementptr %struct.GIM_AABB_DATA* %54, i32 %tmp7, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %scevgep24, align 4 ; [#uses=1]
- %64 = fcmp olt float %49, %63 ; [#uses=1]
- %box.pn21.i = select i1 %64, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.143.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.143.0.i = load float* %iftmp.143.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.143.0.i, float* %44, align 4
- %scevgep25 = getelementptr %struct.GIM_AABB_DATA* %54, i32 %tmp7, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %scevgep25, align 4 ; [#uses=1]
- %66 = fcmp olt float %48, %65 ; [#uses=1]
- %box.pn.i = select i1 %66, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.144.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.144.0.i = load float* %iftmp.144.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.144.0.i, float* %45, align 8
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %bb2, %bb1
- %67 = phi float [ 0xC7EFFFFFE0000000, %bb1 ], [ %iftmp.144.0.i, %bb2 ] ; [#uses=1]
- %68 = phi float [ 0xC7EFFFFFE0000000, %bb1 ], [ %iftmp.143.0.i, %bb2 ] ; [#uses=1]
- %69 = phi float [ 0xC7EFFFFFE0000000, %bb1 ], [ %iftmp.142.0.i, %bb2 ] ; [#uses=1]
- %70 = phi float [ 0x47EFFFFFE0000000, %bb1 ], [ %iftmp.141.0.i, %bb2 ] ; [#uses=1]
- %71 = phi float [ 0x47EFFFFFE0000000, %bb1 ], [ %iftmp.140.0.i, %bb2 ] ; [#uses=1]
- %72 = phi float [ 0x47EFFFFFE0000000, %bb1 ], [ %iftmp.139.0.i, %bb2 ] ; [#uses=1]
- %73 = getelementptr inbounds %struct.btBvhTree* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %74 = load %struct.GIM_AABB_DATA** %73, align 4 ; [#uses=6]
- %75 = getelementptr inbounds %struct.GIM_AABB_DATA* %74, i32 %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %72, float* %75, align 4
- %76 = getelementptr inbounds %struct.GIM_AABB_DATA* %74, i32 %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %71, float* %76, align 4
- %77 = getelementptr inbounds %struct.GIM_AABB_DATA* %74, i32 %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %70, float* %77, align 4
- %78 = getelementptr inbounds %struct.GIM_AABB_DATA* %74, i32 %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %69, float* %78, align 4
- %79 = getelementptr inbounds %struct.GIM_AABB_DATA* %74, i32 %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %68, float* %79, align 4
- %80 = getelementptr inbounds %struct.GIM_AABB_DATA* %74, i32 %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %67, float* %80, align 4
- call void @_ZN9btBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %39)
- call void @_ZN9btBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %39, i32 %endIndex)
- %81 = load i32* %0, align 4 ; [#uses=1]
- %82 = sub nsw i32 %1, %81 ; [#uses=1]
- %83 = load %struct.GIM_AABB_DATA** %73, align 4 ; [#uses=1]
- %84 = getelementptr inbounds %struct.GIM_AABB_DATA* %83, i32 %1, i32 1 ; [#uses=1]
- store i32 %82, i32* %84, align 4
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI8GIM_PAIRE9push_backERKS0_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.289.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.289.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.289.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.289.0.i, 3 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.CONTACT_KEY_TOKEN* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=4]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=6]
- %scevgep.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %12, i32 %indvar.i.i ; [#uses=1]
- %15 = icmp eq %struct.CONTACT_KEY_TOKEN* %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep12.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %12, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep10.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %12, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load %struct.CONTACT_KEY_TOKEN** %14, align 4 ; [#uses=2]
- %scevgep89.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %16, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %17 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- store i32 %17, i32* %scevgep10.i.i, align 4
- %scevgep11.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %16, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %18 = load i32* %scevgep11.i.i, align 4 ; [#uses=1]
- store i32 %18, i32* %scevgep12.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=3]
- %20 = load %struct.CONTACT_KEY_TOKEN** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.CONTACT_KEY_TOKEN* %20, null ; [#uses=1]
- br i1 %21, label %_ZN20btAlignedObjectArrayI8GIM_PAIRE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i
- %22 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %24 = bitcast %struct.CONTACT_KEY_TOKEN* %20 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %24)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %19, align 4
- br label %_ZN20btAlignedObjectArrayI8GIM_PAIRE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI8GIM_PAIRE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store %struct.CONTACT_KEY_TOKEN* %12, %struct.CONTACT_KEY_TOKEN** %19, align 4
- store i32 %iftmp.289.0.i, i32* %2, align 4
- %.pre9 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI8GIM_PAIRE10deallocateEv.exit.i, %bb, %entry
- %26 = phi i32 [ %.pre9, %_ZN20btAlignedObjectArrayI8GIM_PAIRE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=4]
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=1]
- %28 = load %struct.CONTACT_KEY_TOKEN** %27, align 4 ; [#uses=3]
- %29 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %28, i32 %26 ; [#uses=1]
- %30 = icmp eq %struct.CONTACT_KEY_TOKEN* %29, null ; [#uses=1]
- br i1 %30, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %31 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %_Val, i32 0, i32 0 ; [#uses=1]
- %32 = load i32* %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %28, i32 %26, i32 0 ; [#uses=1]
- store i32 %32, i32* %33, align 4
- %34 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %_Val, i32 0, i32 1 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %28, i32 %26, i32 1 ; [#uses=1]
- store i32 %35, i32* %36, align 4
- %.pre10 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %37 = phi i32 [ %26, %bb1 ], [ %.pre10, %bb2 ] ; [#uses=1]
- %38 = add nsw i32 %37, 1 ; [#uses=1]
- store i32 %38, i32* %0, align 4
- ret void
-}
-
-; [#uses=9]
-define internal fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %node0, i32 %node1, i8 zeroext %complete_primitive_tests) {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %box0.i = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %box1.i = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %1 = getelementptr inbounds %struct.btGImpactBvh* %boxset0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %2 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=9]
- %3 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 8
- %6 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 8
- %12 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 8
- %18 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 8
- %24 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btGImpactBvh* %boxset1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %28 = load %struct.GIM_AABB_DATA** %27, align 4 ; [#uses=9]
- %29 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %30 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 8
- %32 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %36 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 8
- %38 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %39 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %42 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 8
- %44 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 8
- %50 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %51 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = call zeroext i8 @_ZNK6btAABB23overlapping_trans_cacheERKS_RK26BT_BOX_BOX_TRANSFORM_CACHEb(%struct.GIM_AABB* %box0.i, %struct.GIM_AABB* %box1.i, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i8 zeroext %complete_primitive_tests) nounwind ; [#uses=1]
- %toBoolnot = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBoolnot, label %return, label %bb
-
-bb: ; preds = %entry
- %54 = getelementptr inbounds %struct.GIM_AABB_DATA* %2, i32 %node0, i32 1 ; [#uses=1]
- %55 = load i32* %54, align 4 ; [#uses=2]
- %toBool3 = icmp slt i32 %55, 0 ; [#uses=1]
- %56 = getelementptr inbounds %struct.GIM_AABB_DATA* %28, i32 %node1, i32 1 ; [#uses=1]
- %57 = load i32* %56, align 4 ; [#uses=2]
- %toBool9 = icmp slt i32 %57, 0 ; [#uses=2]
- br i1 %toBool3, label %bb8, label %bb4
-
-bb4: ; preds = %bb
- br i1 %toBool9, label %bb7, label %bb6
-
-bb6: ; preds = %bb4
- %58 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 0 ; [#uses=1]
- store i32 %55, i32* %58, align 8
- %59 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 1 ; [#uses=1]
- store i32 %57, i32* %59, align 4
- %60 = getelementptr inbounds %struct.btPairSet* %collision_pairs, i32 0, i32 0 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI8GIM_PAIRE9push_backERKS0_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %60, %struct.CONTACT_KEY_TOKEN* %0) inlinehint
- ret void
-
-bb7: ; preds = %bb4
- %61 = add nsw i32 %node1, 1 ; [#uses=3]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %node0, i32 %61, i8 zeroext 0)
- %62 = load %struct.GIM_AABB_DATA** %27, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %61, i32 1 ; [#uses=1]
- %64 = load i32* %63, align 4 ; [#uses=2]
- %toBool.i.i16 = icmp slt i32 %64, 0 ; [#uses=1]
- %65 = add nsw i32 %node1, 2 ; [#uses=1]
- %66 = sub i32 %61, %64 ; [#uses=1]
- %67 = select i1 %toBool.i.i16, i32 %66, i32 %65 ; [#uses=1]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %node0, i32 %67, i8 zeroext 0)
- ret void
-
-bb8: ; preds = %bb
- br i1 %toBool9, label %bb11, label %bb10
-
-bb10: ; preds = %bb8
- %68 = add nsw i32 %node0, 1 ; [#uses=3]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %68, i32 %node1, i8 zeroext 0)
- %69 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.GIM_AABB_DATA* %69, i32 %68, i32 1 ; [#uses=1]
- %71 = load i32* %70, align 4 ; [#uses=2]
- %toBool.i.i19 = icmp slt i32 %71, 0 ; [#uses=1]
- %72 = add nsw i32 %node0, 2 ; [#uses=1]
- %73 = sub i32 %68, %71 ; [#uses=1]
- %74 = select i1 %toBool.i.i19, i32 %73, i32 %72 ; [#uses=1]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %74, i32 %node1, i8 zeroext 0)
- ret void
-
-bb11: ; preds = %bb8
- %75 = add nsw i32 %node1, 1 ; [#uses=6]
- %76 = add nsw i32 %node0, 1 ; [#uses=6]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %76, i32 %75, i8 zeroext 0)
- %77 = load %struct.GIM_AABB_DATA** %27, align 4 ; [#uses=1]
- %78 = getelementptr inbounds %struct.GIM_AABB_DATA* %77, i32 %75, i32 1 ; [#uses=1]
- %79 = load i32* %78, align 4 ; [#uses=2]
- %toBool.i.i18 = icmp slt i32 %79, 0 ; [#uses=1]
- %80 = add nsw i32 %node1, 2 ; [#uses=2]
- %81 = sub i32 %75, %79 ; [#uses=1]
- %82 = select i1 %toBool.i.i18, i32 %81, i32 %80 ; [#uses=1]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %76, i32 %82, i8 zeroext 0)
- %83 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=1]
- %84 = getelementptr inbounds %struct.GIM_AABB_DATA* %83, i32 %76, i32 1 ; [#uses=1]
- %85 = load i32* %84, align 4 ; [#uses=2]
- %toBool.i.i20 = icmp slt i32 %85, 0 ; [#uses=1]
- %86 = add nsw i32 %node0, 2 ; [#uses=2]
- %87 = sub i32 %76, %85 ; [#uses=1]
- %88 = select i1 %toBool.i.i20, i32 %87, i32 %86 ; [#uses=1]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %88, i32 %75, i8 zeroext 0)
- %89 = load %struct.GIM_AABB_DATA** %27, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.GIM_AABB_DATA* %89, i32 %75, i32 1 ; [#uses=1]
- %91 = load i32* %90, align 4 ; [#uses=2]
- %toBool.i.i17 = icmp slt i32 %91, 0 ; [#uses=1]
- %92 = sub i32 %75, %91 ; [#uses=1]
- %93 = select i1 %toBool.i.i17, i32 %92, i32 %80 ; [#uses=1]
- %94 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=1]
- %95 = getelementptr inbounds %struct.GIM_AABB_DATA* %94, i32 %76, i32 1 ; [#uses=1]
- %96 = load i32* %95, align 4 ; [#uses=2]
- %toBool.i.i = icmp slt i32 %96, 0 ; [#uses=1]
- %97 = sub i32 %76, %96 ; [#uses=1]
- %98 = select i1 %toBool.i.i, i32 %97, i32 %86 ; [#uses=1]
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %98, i32 %93, i8 zeroext 0)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btGImpactBvh14find_collisionEPS_RK11btTransformS0_S3_R9btPairSet(%struct.btGImpactBvh* %boxset0, %struct.btTransform* nocapture %trans0, %struct.btGImpactBvh* %boxset1, %struct.btTransform* nocapture %trans1, %struct.btPairSet* %collision_pairs) align 2 {
-entry:
- %trans_cache_1to0 = alloca %struct.BT_BOX_BOX_TRANSFORM_CACHE, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btGImpactBvh* %boxset0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactBvh* %boxset1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %5, label %return, label %bb4.critedge
-
-bb4.critedge: ; preds = %bb
- call void @_ZN26BT_BOX_BOX_TRANSFORM_CACHE19calc_from_homogenicERK11btTransformS2_(%struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, %struct.btTransform* %trans0, %struct.btTransform* %trans1) inlinehint
- call fastcc void @_ZL31_find_collision_pairs_recursiveP12btGImpactBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBvh* %boxset0, %struct.btGImpactBvh* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 0, i32 0, i8 zeroext 1)
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZNK12btGImpactBvh8rayQueryERK9btVector3S2_R20btAlignedObjectArrayIiE(%struct.btGImpactBvh* nocapture %this, %struct.btQuadWord* nocapture %ray_dir, %struct.btQuadWord* nocapture %ray_origin, %"struct.btAlignedObjectArray<int>"* nocapture %collided_results) align 2 {
-entry:
- %bound = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb11
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %4 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %8 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=5]
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 2 ; [#uses=2]
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 3 ; [#uses=5]
- %15 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 4 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb10.backedge, %bb.nph
- %curIndex.019 = phi i32 [ 0, %bb.nph ], [ %curIndex.0.be, %bb10.backedge ] ; [#uses=12]
- %16 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=9]
- %17 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %4, align 8
- %19 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %5, align 4
- %21 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %6, align 8
- %23 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %7, align 4
- %25 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %8, align 8
- %27 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %9, align 4
- %29 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %10, align 8
- %31 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %11, align 4
- %33 = call zeroext i8 @_ZNK6btAABB11collide_rayERK9btVector3S2_(%struct.GIM_AABB* %bound, %struct.btQuadWord* %ray_origin, %struct.btQuadWord* %ray_dir) nounwind ; [#uses=1]
- %34 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %curIndex.019, i32 1 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=2]
- %toBool = icmp slt i32 %35, 0 ; [#uses=2]
- %toBool2 = icmp eq i8 %33, 0 ; [#uses=2]
- %or.cond = or i1 %toBool, %toBool2 ; [#uses=1]
- br i1 %or.cond, label %bb4, label %bb3
-
-bb3: ; preds = %bb
- %36 = load i32* %12, align 4 ; [#uses=6]
- %37 = load i32* %13, align 4 ; [#uses=2]
- %38 = icmp eq i32 %37, %36 ; [#uses=1]
- br i1 %38, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb3
- %39 = icmp eq i32 %36, 0 ; [#uses=1]
- %40 = shl i32 %36, 1 ; [#uses=1]
- %iftmp.293.0.i.i = select i1 %39, i32 1, i32 %40 ; [#uses=4]
- %41 = icmp slt i32 %37, %iftmp.293.0.i.i ; [#uses=1]
- br i1 %41, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %42 = icmp eq i32 %iftmp.293.0.i.i, 0 ; [#uses=1]
- br i1 %42, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %43 = shl i32 %iftmp.293.0.i.i, 2 ; [#uses=1]
- %44 = call i8* @_Z22btAlignedAllocInternalji(i32 %43, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %44 to i32* ; [#uses=1]
- %.pre.i = load i32* %12, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %45 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %36, %bb.i.i ] ; [#uses=2]
- %46 = phi i32* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %47 = icmp sgt i32 %45, 0 ; [#uses=1]
- br i1 %47, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr i32* %46, i32 %indvar.i.i.i ; [#uses=2]
- %48 = icmp eq i32* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %48, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %49 = load i32** %14, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr i32* %49, i32 %indvar.i.i.i ; [#uses=1]
- %50 = load i32* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store i32 %50, i32* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %45 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %51 = load i32** %14, align 4 ; [#uses=2]
- %52 = icmp eq i32* %51, null ; [#uses=1]
- br i1 %52, label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- %53 = load i8* %15, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %54 = bitcast i32* %51 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %54)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %14, align 4
- br label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- store i8 1, i8* %15, align 4
- store i32* %46, i32** %14, align 4
- store i32 %iftmp.293.0.i.i, i32* %13, align 4
- %.pre5.i = load i32* %12, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, %bb.i, %bb3
- %55 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i ], [ %36, %bb3 ], [ %36, %bb.i ] ; [#uses=2]
- %56 = load i32** %14, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32* %56, i32 %55 ; [#uses=2]
- %58 = icmp eq i32* %57, null ; [#uses=1]
- br i1 %58, label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 %35, i32* %57, align 4
- %.pre6.i = load i32* %12, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit
-
-_ZN20btAlignedObjectArrayIiE9push_backERKi.exit: ; preds = %bb2.i, %bb1.i
- %59 = phi i32 [ %55, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %60 = add nsw i32 %59, 1 ; [#uses=1]
- store i32 %60, i32* %12, align 4
- br label %bb4
-
-bb4: ; preds = %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, %bb
- %or.cond18 = and i1 %toBool2, %toBool ; [#uses=1]
- br i1 %or.cond18, label %bb9, label %bb8
-
-bb8: ; preds = %bb4
- %61 = add nsw i32 %curIndex.019, 1 ; [#uses=1]
- br label %bb10.backedge
-
-bb10.backedge: ; preds = %bb9, %bb8
- %curIndex.0.be = phi i32 [ %61, %bb8 ], [ %66, %bb9 ] ; [#uses=2]
- %62 = icmp slt i32 %curIndex.0.be, %1 ; [#uses=1]
- br i1 %62, label %bb, label %bb11
-
-bb9: ; preds = %bb4
- %63 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.GIM_AABB_DATA* %63, i32 %curIndex.019, i32 1 ; [#uses=1]
- %65 = load i32* %64, align 4 ; [#uses=1]
- %66 = sub i32 %curIndex.019, %65 ; [#uses=1]
- br label %bb10.backedge
-
-bb11: ; preds = %bb10.backedge, %entry
- %67 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=1]
- %68 = load i32* %67, align 4 ; [#uses=1]
- %69 = icmp sgt i32 %68, 0 ; [#uses=1]
- %.0 = zext i1 %69 to i8 ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=0]
-define zeroext i8 @_ZNK12btGImpactBvh8boxQueryERK6btAABBR20btAlignedObjectArrayIiE(%struct.btGImpactBvh* nocapture %this, %struct.GIM_AABB* nocapture %box, %"struct.btAlignedObjectArray<int>"* nocapture %collided_results) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb11
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %4 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=5]
- %6 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 2 ; [#uses=2]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 3 ; [#uses=5]
- %8 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb10.backedge, %bb.nph
- %curIndex.026 = phi i32 [ 0, %bb.nph ], [ %curIndex.0.be, %bb10.backedge ] ; [#uses=11]
- %14 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=8]
- %15 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load float* %4, align 4 ; [#uses=1]
- %26 = fcmp ogt float %16, %25 ; [#uses=1]
- br i1 %26, label %_ZNK6btAABB13has_collisionERKS_.exit.thread, label %bb.i19
-
-bb.i19: ; preds = %bb
- %27 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = load float* %9, align 4 ; [#uses=1]
- %30 = fcmp olt float %28, %29 ; [#uses=1]
- br i1 %30, label %_ZNK6btAABB13has_collisionERKS_.exit.thread, label %bb1.i20
-
-bb1.i20: ; preds = %bb.i19
- %31 = load float* %10, align 4 ; [#uses=1]
- %32 = fcmp ogt float %18, %31 ; [#uses=1]
- br i1 %32, label %_ZNK6btAABB13has_collisionERKS_.exit.thread, label %bb2.i21
-
-bb2.i21: ; preds = %bb1.i20
- %33 = load float* %11, align 4 ; [#uses=1]
- %34 = fcmp olt float %22, %33 ; [#uses=1]
- br i1 %34, label %_ZNK6btAABB13has_collisionERKS_.exit.thread, label %bb3.i
-
-bb3.i: ; preds = %bb2.i21
- %35 = load float* %12, align 4 ; [#uses=1]
- %36 = fcmp ogt float %20, %35 ; [#uses=1]
- br i1 %36, label %_ZNK6btAABB13has_collisionERKS_.exit.thread, label %_ZNK6btAABB13has_collisionERKS_.exit
-
-_ZNK6btAABB13has_collisionERKS_.exit.thread: ; preds = %bb3.i, %bb2.i21, %bb1.i20, %bb.i19, %bb
- %37 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 1 ; [#uses=1]
- %38 = load i32* %37, align 4 ; [#uses=1]
- %toBool27 = icmp slt i32 %38, 0 ; [#uses=1]
- br label %bb4
-
-_ZNK6btAABB13has_collisionERKS_.exit: ; preds = %bb3.i
- %39 = load float* %13, align 4 ; [#uses=1]
- %phitmp = fcmp olt float %24, %39 ; [#uses=3]
- %40 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %curIndex.026, i32 1 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=2]
- %toBool = icmp slt i32 %41, 0 ; [#uses=3]
- %or.cond = or i1 %toBool, %phitmp ; [#uses=1]
- br i1 %or.cond, label %bb4, label %bb3
-
-bb3: ; preds = %_ZNK6btAABB13has_collisionERKS_.exit
- %42 = load i32* %5, align 4 ; [#uses=6]
- %43 = load i32* %6, align 4 ; [#uses=2]
- %44 = icmp eq i32 %43, %42 ; [#uses=1]
- br i1 %44, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb3
- %45 = icmp eq i32 %42, 0 ; [#uses=1]
- %46 = shl i32 %42, 1 ; [#uses=1]
- %iftmp.293.0.i.i = select i1 %45, i32 1, i32 %46 ; [#uses=4]
- %47 = icmp slt i32 %43, %iftmp.293.0.i.i ; [#uses=1]
- br i1 %47, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %48 = icmp eq i32 %iftmp.293.0.i.i, 0 ; [#uses=1]
- br i1 %48, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %49 = shl i32 %iftmp.293.0.i.i, 2 ; [#uses=1]
- %50 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %49, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %50 to i32* ; [#uses=1]
- %.pre.i = load i32* %5, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %51 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %42, %bb.i.i ] ; [#uses=2]
- %52 = phi i32* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %53 = icmp sgt i32 %51, 0 ; [#uses=1]
- br i1 %53, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr i32* %52, i32 %indvar.i.i.i ; [#uses=2]
- %54 = icmp eq i32* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %54, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %55 = load i32** %7, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr i32* %55, i32 %indvar.i.i.i ; [#uses=1]
- %56 = load i32* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store i32 %56, i32* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %51 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %57 = load i32** %7, align 4 ; [#uses=2]
- %58 = icmp eq i32* %57, null ; [#uses=1]
- br i1 %58, label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- %59 = load i8* %8, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %59, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %60 = bitcast i32* %57 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %60)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %7, align 4
- br label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- store i8 1, i8* %8, align 4
- store i32* %52, i32** %7, align 4
- store i32 %iftmp.293.0.i.i, i32* %6, align 4
- %.pre5.i = load i32* %5, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, %bb.i, %bb3
- %61 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i ], [ %42, %bb3 ], [ %42, %bb.i ] ; [#uses=2]
- %62 = load i32** %7, align 4 ; [#uses=1]
- %63 = getelementptr inbounds i32* %62, i32 %61 ; [#uses=2]
- %64 = icmp eq i32* %63, null ; [#uses=1]
- br i1 %64, label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 %41, i32* %63, align 4
- %.pre6.i = load i32* %5, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit
-
-_ZN20btAlignedObjectArrayIiE9push_backERKi.exit: ; preds = %bb2.i, %bb1.i
- %65 = phi i32 [ %61, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %66 = add nsw i32 %65, 1 ; [#uses=1]
- store i32 %66, i32* %5, align 4
- br label %bb4
-
-bb4: ; preds = %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, %_ZNK6btAABB13has_collisionERKS_.exit, %_ZNK6btAABB13has_collisionERKS_.exit.thread
- %toBool29 = phi i1 [ %toBool27, %_ZNK6btAABB13has_collisionERKS_.exit.thread ], [ %toBool, %_ZNK6btAABB13has_collisionERKS_.exit ], [ %toBool, %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit ] ; [#uses=1]
- %67 = phi i1 [ true, %_ZNK6btAABB13has_collisionERKS_.exit.thread ], [ %phitmp, %_ZNK6btAABB13has_collisionERKS_.exit ], [ %phitmp, %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit ] ; [#uses=1]
- %or.cond18 = and i1 %67, %toBool29 ; [#uses=1]
- br i1 %or.cond18, label %bb9, label %bb8
-
-bb8: ; preds = %bb4
- %68 = add nsw i32 %curIndex.026, 1 ; [#uses=1]
- br label %bb10.backedge
-
-bb10.backedge: ; preds = %bb9, %bb8
- %curIndex.0.be = phi i32 [ %68, %bb8 ], [ %73, %bb9 ] ; [#uses=2]
- %69 = icmp slt i32 %curIndex.0.be, %1 ; [#uses=1]
- br i1 %69, label %bb, label %bb11
-
-bb9: ; preds = %bb4
- %70 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=1]
- %71 = getelementptr inbounds %struct.GIM_AABB_DATA* %70, i32 %curIndex.026, i32 1 ; [#uses=1]
- %72 = load i32* %71, align 4 ; [#uses=1]
- %73 = sub i32 %curIndex.026, %72 ; [#uses=1]
- br label %bb10.backedge
-
-bb11: ; preds = %bb10.backedge, %entry
- %74 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=1]
- %75 = load i32* %74, align 4 ; [#uses=1]
- %76 = icmp sgt i32 %75, 0 ; [#uses=1]
- %.0 = zext i1 %76 to i8 ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE7reserveEi(%"struct.btAlignedObjectArray<GIM_BVH_DATA>"* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = mul i32 %_Count, 36 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.GIM_AABB_DATA* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.GIM_AABB_DATA* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=11]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI12GIM_BVH_DATAE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE8allocateEi.exit
- %10 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb3.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=20]
- %scevgep.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i ; [#uses=1]
- %11 = icmp eq %struct.GIM_AABB_DATA* %scevgep.i, null ; [#uses=1]
- br i1 %11, label %bb3.i, label %bb1.i5
-
-bb1.i5: ; preds = %bb.i4
- %scevgep11.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep19.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep21.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep23.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep26.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 1 ; [#uses=1]
- %scevgep8.i = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load %struct.GIM_AABB_DATA** %10, align 4 ; [#uses=9]
- %scevgep910.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %scevgep910.i, align 4 ; [#uses=1]
- store float %13, float* %scevgep8.i, align 4
- %scevgep12.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %scevgep12.i, align 4 ; [#uses=1]
- store float %14, float* %scevgep11.i, align 4
- %scevgep14.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %scevgep14.i, align 4 ; [#uses=1]
- store float %15, float* %scevgep13.i, align 4
- %scevgep16.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %scevgep16.i, align 4 ; [#uses=1]
- store float %16, float* %scevgep15.i, align 4
- %scevgep18.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %scevgep18.i, align 4 ; [#uses=1]
- store float %17, float* %scevgep17.i, align 4
- %scevgep20.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %scevgep20.i, align 4 ; [#uses=1]
- store float %18, float* %scevgep19.i, align 4
- %scevgep22.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %scevgep22.i, align 4 ; [#uses=1]
- store float %19, float* %scevgep21.i, align 4
- %scevgep24.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %scevgep24.i, align 4 ; [#uses=1]
- store float %20, float* %scevgep23.i, align 4
- %scevgep25.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 1 ; [#uses=1]
- %21 = load i32* %scevgep25.i, align 4 ; [#uses=1]
- store i32 %21, i32* %scevgep26.i, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i5, %bb.i4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI12GIM_BVH_DATAE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI12GIM_BVH_DATAE4copyEiiPS0_.exit: ; preds = %bb3.i, %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE8allocateEi.exit
- %22 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 3 ; [#uses=3]
- %23 = load %struct.GIM_AABB_DATA** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.GIM_AABB_DATA* %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI12GIM_BVH_DATAE4copyEiiPS0_.exit
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %27 = bitcast %struct.GIM_AABB_DATA* %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %22, align 4
- br label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI12GIM_BVH_DATAE4copyEiiPS0_.exit
- %28 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.GIM_AABB_DATA* %6, %struct.GIM_AABB_DATA** %22, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE7reserveEi(%"struct.btAlignedObjectArray<GIM_BVH_DATA>"* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = mul i32 %_Count, 36 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.GIM_AABB_DATA* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.GIM_AABB_DATA* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=11]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE8allocateEi.exit
- %10 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb3.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=20]
- %scevgep.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i ; [#uses=1]
- %11 = icmp eq %struct.GIM_AABB_DATA* %scevgep.i, null ; [#uses=1]
- br i1 %11, label %bb3.i, label %bb1.i5
-
-bb1.i5: ; preds = %bb.i4
- %scevgep11.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep19.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep21.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep23.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep26.i = getelementptr %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 1 ; [#uses=1]
- %scevgep8.i = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %indvar.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load %struct.GIM_AABB_DATA** %10, align 4 ; [#uses=9]
- %scevgep910.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %scevgep910.i, align 4 ; [#uses=1]
- store float %13, float* %scevgep8.i, align 4
- %scevgep12.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %scevgep12.i, align 4 ; [#uses=1]
- store float %14, float* %scevgep11.i, align 4
- %scevgep14.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %scevgep14.i, align 4 ; [#uses=1]
- store float %15, float* %scevgep13.i, align 4
- %scevgep16.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %scevgep16.i, align 4 ; [#uses=1]
- store float %16, float* %scevgep15.i, align 4
- %scevgep18.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %scevgep18.i, align 4 ; [#uses=1]
- store float %17, float* %scevgep17.i, align 4
- %scevgep20.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %scevgep20.i, align 4 ; [#uses=1]
- store float %18, float* %scevgep19.i, align 4
- %scevgep22.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %scevgep22.i, align 4 ; [#uses=1]
- store float %19, float* %scevgep21.i, align 4
- %scevgep24.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %scevgep24.i, align 4 ; [#uses=1]
- store float %20, float* %scevgep23.i, align 4
- %scevgep25.i = getelementptr %struct.GIM_AABB_DATA* %12, i32 %indvar.i, i32 1 ; [#uses=1]
- %21 = load i32* %scevgep25.i, align 4 ; [#uses=1]
- store i32 %21, i32* %scevgep26.i, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i5, %bb.i4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE4copyEiiPS0_.exit: ; preds = %bb3.i, %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE8allocateEi.exit
- %22 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 3 ; [#uses=3]
- %23 = load %struct.GIM_AABB_DATA** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.GIM_AABB_DATA* %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE4copyEiiPS0_.exit
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %27 = bitcast %struct.GIM_AABB_DATA* %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %22, align 4
- br label %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE4copyEiiPS0_.exit
- %28 = getelementptr inbounds %"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.GIM_AABB_DATA* %6, %struct.GIM_AABB_DATA** %22, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN9btBvhTree10build_treeER18GIM_BVH_DATA_ARRAY(%struct.btBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btBvhTree* %this, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %0, align 4
- %1 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 1 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = shl i32 %2, 1 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btBvhTree* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = icmp slt i32 %5, %3 ; [#uses=1]
- br i1 %6, label %bb.nph.i, label %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE6resizeEiRKS0_.exit
-
-bb.nph.i: ; preds = %entry
- %7 = getelementptr inbounds %struct.btBvhTree* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE7reserveEi(%"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %7, i32 %3) inlinehint
- %8 = getelementptr inbounds %struct.btBvhTree* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %tmp2 = sub i32 %3, %5 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp3 = add i32 %5, %indvar.i ; [#uses=2]
- %9 = load %struct.GIM_AABB_DATA** %8, align 4 ; [#uses=2]
- %scevgep.i = getelementptr %struct.GIM_AABB_DATA* %9, i32 %tmp3 ; [#uses=1]
- %10 = icmp eq %struct.GIM_AABB_DATA* %scevgep.i, null ; [#uses=1]
- br i1 %10, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- %scevgep27.i = getelementptr %struct.GIM_AABB_DATA* %9, i32 %tmp3, i32 1 ; [#uses=1]
- store i32 0, i32* %scevgep27.i, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp2 ; [#uses=1]
- br i1 %exitcond, label %_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE6resizeEiRKS0_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE6resizeEiRKS0_.exit: ; preds = %bb10.i, %entry
- store i32 %3, i32* %4, align 4
- %11 = load i32* %1, align 4 ; [#uses=1]
- tail call void @_ZN9btBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 %11)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12btGImpactBvh8buildSetEv(%struct.btGImpactBvh* %this) align 2 {
-entry:
- %primitive_boxes = alloca %struct.GIM_BVH_DATA_ARRAY, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 4 ; [#uses=4]
- store i8 1, i8* %0, align 8
- %1 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=8]
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- %2 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 1 ; [#uses=6]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %3, align 8
- %4 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 1 ; [#uses=2]
- %5 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 3 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %11 = invoke i32 %10(%struct.btActionInterface* %5)
- to label %invcont unwind label %lpad ; [#uses=4]
-
-invcont: ; preds = %entry
- %12 = load i32* %2, align 4 ; [#uses=1]
- %13 = icmp slt i32 %12, %11 ; [#uses=1]
- br i1 %13, label %bb.nph.i, label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit
-
-bb.nph.i: ; preds = %invcont
- %14 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE7reserveEi(%"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %14, i32 %11) inlinehint
- to label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit unwind label %lpad
-
-_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit: ; preds = %bb.nph.i, %invcont
- store i32 %11, i32* %2, align 4
- br label %bb3
-
-bb: ; preds = %bb3
- %15 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btActionInterface* %15, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 4 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %19 to void (%struct.btActionInterface*, i32, %struct.GIM_AABB*)* ; [#uses=1]
- %scevgep2930 = getelementptr inbounds %struct.GIM_AABB_DATA* %20, i32 %25, i32 0 ; [#uses=1]
- invoke void %21(%struct.btActionInterface* %15, i32 %25, %struct.GIM_AABB* %scevgep2930)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %bb
- %22 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.GIM_AABB_DATA* %22, i32 %25, i32 1 ; [#uses=1]
- store i32 %25, i32* %scevgep, align 4
- %23 = add nsw i32 %25, 1 ; [#uses=1]
- %.pre = load i32* %2, align 4 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %invcont2, %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit
- %24 = phi i32 [ %.pre, %invcont2 ], [ %11, %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit ] ; [#uses=3]
- %25 = phi i32 [ %23, %invcont2 ], [ 0, %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit ] ; [#uses=6]
- %26 = icmp sgt i32 %24, %25 ; [#uses=1]
- br i1 %26, label %bb, label %bb4
-
-bb4: ; preds = %bb3
- %27 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = shl i32 %24, 1 ; [#uses=4]
- %30 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %31 = load i32* %30, align 4 ; [#uses=3]
- %32 = icmp slt i32 %31, %29 ; [#uses=1]
- br i1 %32, label %bb.nph.i.i, label %bb9
-
-bb.nph.i.i: ; preds = %bb4
- %33 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 1, i32 0 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI17GIM_BVH_TREE_NODEE7reserveEi(%"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %33, i32 %29) inlinehint
- to label %.noexc25 unwind label %lpad
-
-.noexc25: ; preds = %bb.nph.i.i
- %34 = getelementptr inbounds %struct.btGImpactBvh* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %tmp27 = sub i32 %29, %31 ; [#uses=1]
- br label %bb7.i.i
-
-bb7.i.i: ; preds = %bb10.i.i, %.noexc25
- %indvar.i.i = phi i32 [ 0, %.noexc25 ], [ %indvar.next.i.i, %bb10.i.i ] ; [#uses=2]
- %tmp28 = add i32 %31, %indvar.i.i ; [#uses=2]
- %35 = load %struct.GIM_AABB_DATA** %34, align 4 ; [#uses=2]
- %scevgep.i.i = getelementptr %struct.GIM_AABB_DATA* %35, i32 %tmp28 ; [#uses=1]
- %36 = icmp eq %struct.GIM_AABB_DATA* %scevgep.i.i, null ; [#uses=1]
- br i1 %36, label %bb10.i.i, label %bb8.i.i
-
-bb8.i.i: ; preds = %bb7.i.i
- %scevgep27.i.i = getelementptr %struct.GIM_AABB_DATA* %35, i32 %tmp28, i32 1 ; [#uses=1]
- store i32 0, i32* %scevgep27.i.i, align 4
- br label %bb10.i.i
-
-bb10.i.i: ; preds = %bb8.i.i, %bb7.i.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %tmp27 ; [#uses=1]
- br i1 %exitcond, label %bb9.loopexit, label %bb7.i.i
-
-invcont7: ; preds = %bb2.i.i.i.i, %lpad
- store i8 1, i8* %0, align 8
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- store i32 0, i32* %2, align 4
- store i32 0, i32* %3, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9.loopexit: ; preds = %bb10.i.i
- %.pre32 = load i32* %2, align 4 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb9.loopexit, %bb4
- %37 = phi i32 [ %.pre32, %bb9.loopexit ], [ %24, %bb4 ] ; [#uses=1]
- store i32 %29, i32* %30, align 4
- call void @_ZN9btBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btBvhTree* %27, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 %37)
- %38 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=2]
- %39 = icmp eq %struct.GIM_AABB_DATA* %38, null ; [#uses=1]
- br i1 %39, label %_ZN18GIM_BVH_DATA_ARRAYD1Ev.exit22, label %bb.i.i.i.i19
-
-bb.i.i.i.i19: ; preds = %bb9
- %40 = load i8* %0, align 8 ; [#uses=1]
- %toBool.i.i.i.i18 = icmp eq i8 %40, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i18, label %bb2.i.i.i.i21, label %bb1.i.i.i.i20
-
-bb1.i.i.i.i20: ; preds = %bb.i.i.i.i19
- %41 = bitcast %struct.GIM_AABB_DATA* %38 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %41)
- br label %bb2.i.i.i.i21
-
-bb2.i.i.i.i21: ; preds = %bb1.i.i.i.i20, %bb.i.i.i.i19
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- ret void
-
-_ZN18GIM_BVH_DATA_ARRAYD1Ev.exit22: ; preds = %bb9
- ret void
-
-lpad: ; preds = %bb.nph.i.i, %bb, %bb.nph.i, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %42 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=2]
- %43 = icmp eq %struct.GIM_AABB_DATA* %42, null ; [#uses=1]
- br i1 %43, label %invcont7, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %lpad
- %44 = load i8* %0, align 8 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %45 = bitcast %struct.GIM_AABB_DATA* %42 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %45)
- to label %bb2.i.i.i.i unwind label %lpad12
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- br label %invcont7
-
-lpad12: ; preds = %bb1.i.i.i.i
- %eh_ptr13 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN27btGImpactCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btGImpactCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %2, align 4
- %3 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btTransform* @_ZN11btTransformmLERKS_(%struct.btTransform* %this, %struct.btTransform* nocapture %t) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=4]
- %13 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = fmul float %18, %3 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=4]
- %22 = fmul float %21, %8 ; [#uses=1]
- %23 = fadd float %19, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = fmul float %25, %14 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %29 = load float* %28, align 4 ; [#uses=4]
- %30 = fmul float %29, %3 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %32 = load float* %31, align 4 ; [#uses=4]
- %33 = fmul float %32, %8 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %36 = load float* %35, align 4 ; [#uses=4]
- %37 = fmul float %36, %14 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fadd float %40, %38 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %43, %27 ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %46, %16 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=3]
- %50 = fmul float %49, %1 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=3]
- %53 = fmul float %52, %6 ; [#uses=1]
- %54 = fadd float %50, %53 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=3]
- %57 = fmul float %56, %12 ; [#uses=1]
- %58 = fadd float %54, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fmul float %60, %1 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=3]
- %64 = fmul float %63, %6 ; [#uses=1]
- %65 = fadd float %61, %64 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = fmul float %67, %12 ; [#uses=1]
- %69 = fadd float %65, %68 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=3]
- %72 = fmul float %71, %1 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=3]
- %75 = fmul float %74, %6 ; [#uses=1]
- %76 = fadd float %72, %75 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=3]
- %79 = fmul float %78, %12 ; [#uses=1]
- %80 = fadd float %76, %79 ; [#uses=1]
- %81 = fmul float %49, %18 ; [#uses=1]
- %82 = fmul float %52, %21 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = fmul float %56, %25 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %60, %18 ; [#uses=1]
- %87 = fmul float %63, %21 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=1]
- %89 = fmul float %67, %25 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %71, %18 ; [#uses=1]
- %92 = fmul float %74, %21 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %78, %25 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %49, %29 ; [#uses=1]
- %97 = fmul float %52, %32 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=1]
- %99 = fmul float %56, %36 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %60, %29 ; [#uses=1]
- %102 = fmul float %63, %32 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fmul float %67, %36 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %71, %29 ; [#uses=1]
- %107 = fmul float %74, %32 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %78, %36 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- store float %110, float* %28, align 4
- store float %105, float* %31, align 4
- store float %100, float* %35, align 4
- %111 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- store float %95, float* %17, align 4
- store float %90, float* %20, align 4
- store float %85, float* %24, align 4
- %112 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %112, align 4
- store float %80, float* %0, align 4
- store float %69, float* %5, align 4
- store float %58, float* %11, align 4
- %113 = getelementptr inbounds %struct.btTransform* %this, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 4
- ret %struct.btTransform* %this
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK17btTriangleShapeEx7getAabbERK11btTransformR9btVector3S4_(%struct.btTriangleShapeEx* nocapture %this, %struct.btTransform* %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %tv0 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tv1 = alloca %struct.btQuadWord, align 8 ; [#uses=10]
- %tv2 = alloca %struct.btQuadWord, align 8 ; [#uses=10]
- %0 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = fadd float %16, %18 ; [#uses=3]
- %20 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=3]
- %22 = fmul float %21, %3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=3]
- %25 = fmul float %24, %8 ; [#uses=1]
- %26 = fadd float %22, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=3]
- %29 = fmul float %28, %14 ; [#uses=1]
- %30 = fadd float %26, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=3]
- %33 = fadd float %30, %32 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=3]
- %36 = fmul float %35, %3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=3]
- %39 = fmul float %38, %8 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=3]
- %43 = fmul float %42, %14 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fadd float %44, %46 ; [#uses=3]
- %48 = getelementptr inbounds %struct.btQuadWord* %tv0, i32 0, i32 0, i32 0 ; [#uses=7]
- store float %47, float* %48, align 8
- %49 = getelementptr inbounds %struct.btQuadWord* %tv0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %33, float* %49, align 4
- %50 = getelementptr inbounds %struct.btQuadWord* %tv0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %50, align 8
- %51 = getelementptr inbounds %struct.btQuadWord* %tv0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 4
- %52 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=3]
- %54 = fmul float %1, %53 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=3]
- %57 = fmul float %6, %56 ; [#uses=1]
- %58 = fadd float %54, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fmul float %12, %60 ; [#uses=1]
- %62 = fadd float %58, %61 ; [#uses=1]
- %63 = fadd float %62, %18 ; [#uses=3]
- %64 = fmul float %21, %53 ; [#uses=1]
- %65 = fmul float %24, %56 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %28, %60 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = fadd float %68, %32 ; [#uses=3]
- %70 = fmul float %35, %53 ; [#uses=1]
- %71 = fmul float %38, %56 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fmul float %42, %60 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = fadd float %74, %46 ; [#uses=3]
- %76 = getelementptr inbounds %struct.btQuadWord* %tv1, i32 0, i32 0, i32 0 ; [#uses=7]
- store float %75, float* %76, align 8
- %77 = getelementptr inbounds %struct.btQuadWord* %tv1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %69, float* %77, align 4
- %78 = getelementptr inbounds %struct.btQuadWord* %tv1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %63, float* %78, align 8
- %79 = getelementptr inbounds %struct.btQuadWord* %tv1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %79, align 4
- %80 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=3]
- %82 = fmul float %1, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=3]
- %85 = fmul float %6, %84 ; [#uses=1]
- %86 = fadd float %82, %85 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=3]
- %89 = fmul float %12, %88 ; [#uses=1]
- %90 = fadd float %86, %89 ; [#uses=1]
- %91 = fadd float %90, %18 ; [#uses=3]
- %92 = fmul float %21, %81 ; [#uses=1]
- %93 = fmul float %24, %84 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=1]
- %95 = fmul float %28, %88 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = fadd float %96, %32 ; [#uses=3]
- %98 = fmul float %35, %81 ; [#uses=1]
- %99 = fmul float %38, %84 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %42, %88 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fadd float %102, %46 ; [#uses=3]
- %104 = getelementptr inbounds %struct.btQuadWord* %tv2, i32 0, i32 0, i32 0 ; [#uses=7]
- store float %103, float* %104, align 8
- %105 = getelementptr inbounds %struct.btQuadWord* %tv2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %97, float* %105, align 4
- %106 = getelementptr inbounds %struct.btQuadWord* %tv2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %91, float* %106, align 8
- %107 = getelementptr inbounds %struct.btQuadWord* %tv2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=6]
- %110 = fcmp ogt float %75, %103 ; [#uses=2]
- %V3.pn.i = select i1 %110, %struct.btQuadWord* %tv2, %struct.btQuadWord* %tv1 ; [#uses=1]
- %iftmp.227.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.227.0.i = load float* %iftmp.227.0.in.i, align 8 ; [#uses=1]
- %.not.i = fcmp ule float %47, %iftmp.227.0.i ; [#uses=2]
- %brmerge.i = or i1 %.not.i, %110 ; [#uses=1]
- %.mux.i = select i1 %.not.i, float* %48, float* %104 ; [#uses=1]
- %iftmp.226.0.in.i = select i1 %brmerge.i, float* %.mux.i, float* %76 ; [#uses=1]
- %iftmp.226.0.i = load float* %iftmp.226.0.in.i, align 8 ; [#uses=1]
- %111 = fcmp ogt float %69, %97 ; [#uses=2]
- %V3.pn61.i = select i1 %111, %struct.btQuadWord* %tv2, %struct.btQuadWord* %tv1 ; [#uses=1]
- %iftmp.230.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn61.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.230.0.i = load float* %iftmp.230.0.in.i, align 4 ; [#uses=1]
- %.not66.i = fcmp ule float %33, %iftmp.230.0.i ; [#uses=2]
- %brmerge67.i = or i1 %.not66.i, %111 ; [#uses=1]
- %.mux68.i = select i1 %.not66.i, float* %48, float* %104 ; [#uses=1]
- %.pn60.pn.i = select i1 %brmerge67.i, float* %.mux68.i, float* %76 ; [#uses=1]
- %iftmp.229.0.in.i = getelementptr inbounds float* %.pn60.pn.i, i32 1 ; [#uses=1]
- %iftmp.229.0.i = load float* %iftmp.229.0.in.i, align 4 ; [#uses=1]
- %112 = fcmp ogt float %63, %91 ; [#uses=2]
- %V3.pn62.i = select i1 %112, %struct.btQuadWord* %tv2, %struct.btQuadWord* %tv1 ; [#uses=1]
- %iftmp.233.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn62.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.233.0.i = load float* %iftmp.233.0.in.i, align 8 ; [#uses=1]
- %.not69.i = fcmp ule float %19, %iftmp.233.0.i ; [#uses=2]
- %brmerge70.i = or i1 %.not69.i, %112 ; [#uses=1]
- %.mux71.i = select i1 %.not69.i, float* %48, float* %104 ; [#uses=1]
- %.pn59.pn.i = select i1 %brmerge70.i, float* %.mux71.i, float* %76 ; [#uses=1]
- %iftmp.232.0.in.i = getelementptr inbounds float* %.pn59.pn.i, i32 2 ; [#uses=1]
- %iftmp.232.0.i = load float* %iftmp.232.0.in.i, align 8 ; [#uses=1]
- %113 = fcmp olt float %75, %103 ; [#uses=2]
- %V3.pn63.i = select i1 %113, %struct.btQuadWord* %tv2, %struct.btQuadWord* %tv1 ; [#uses=1]
- %iftmp.236.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn63.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.236.0.i = load float* %iftmp.236.0.in.i, align 8 ; [#uses=1]
- %.not72.i = fcmp uge float %47, %iftmp.236.0.i ; [#uses=2]
- %brmerge73.i = or i1 %.not72.i, %113 ; [#uses=1]
- %.mux74.i = select i1 %.not72.i, float* %48, float* %104 ; [#uses=1]
- %iftmp.235.0.in.i = select i1 %brmerge73.i, float* %.mux74.i, float* %76 ; [#uses=1]
- %iftmp.235.0.i = load float* %iftmp.235.0.in.i, align 8 ; [#uses=1]
- %114 = fcmp olt float %69, %97 ; [#uses=2]
- %V3.pn64.i = select i1 %114, %struct.btQuadWord* %tv2, %struct.btQuadWord* %tv1 ; [#uses=1]
- %iftmp.239.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn64.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.239.0.i = load float* %iftmp.239.0.in.i, align 4 ; [#uses=1]
- %.not75.i = fcmp uge float %33, %iftmp.239.0.i ; [#uses=2]
- %brmerge76.i = or i1 %.not75.i, %114 ; [#uses=1]
- %.mux77.i = select i1 %.not75.i, float* %48, float* %104 ; [#uses=1]
- %.pn58.pn.i = select i1 %brmerge76.i, float* %.mux77.i, float* %76 ; [#uses=1]
- %iftmp.238.0.in.i = getelementptr inbounds float* %.pn58.pn.i, i32 1 ; [#uses=1]
- %iftmp.238.0.i = load float* %iftmp.238.0.in.i, align 4 ; [#uses=1]
- %115 = fcmp olt float %63, %91 ; [#uses=2]
- %V3.pn65.i = select i1 %115, %struct.btQuadWord* %tv2, %struct.btQuadWord* %tv1 ; [#uses=1]
- %iftmp.242.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn65.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.242.0.i = load float* %iftmp.242.0.in.i, align 8 ; [#uses=1]
- %.not78.i = fcmp uge float %19, %iftmp.242.0.i ; [#uses=2]
- %brmerge79.i = or i1 %.not78.i, %115 ; [#uses=1]
- %.mux80.i = select i1 %.not78.i, float* %48, float* %104 ; [#uses=1]
- %.pn57.pn.i = select i1 %brmerge79.i, float* %.mux80.i, float* %76 ; [#uses=1]
- %iftmp.241.0.in.i = getelementptr inbounds float* %.pn57.pn.i, i32 2 ; [#uses=1]
- %iftmp.241.0.i = load float* %iftmp.241.0.in.i, align 8 ; [#uses=1]
- %116 = fsub float %iftmp.226.0.i, %109 ; [#uses=1]
- %117 = fsub float %iftmp.229.0.i, %109 ; [#uses=1]
- %118 = fsub float %iftmp.232.0.i, %109 ; [#uses=1]
- %119 = fadd float %iftmp.235.0.i, %109 ; [#uses=1]
- %120 = fadd float %iftmp.238.0.i, %109 ; [#uses=1]
- %121 = fadd float %iftmp.241.0.i, %109 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %116, float* %122, align 4
- %123 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %117, float* %123, align 4
- %124 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %118, float* %124, align 4
- %125 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %119, float* %125, align 4
- %126 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %120, float* %126, align 4
- %127 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %121, float* %127, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionShape* @_ZN18GIM_ShapeRetriever19ChildShapeRetriever13getChildShapeEi(%"struct.GIM_ShapeRetriever::ChildShapeRetriever"* nocapture %this, i32 %index) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.GIM_ShapeRetriever** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.GIM_ShapeRetriever* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load %struct.btGImpactShapeInterface** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btGImpactShapeInterface* %3, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 30 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to %struct.btCollisionShape* (%struct.btGImpactShapeInterface*, i32)* ; [#uses=1]
- %9 = tail call %struct.btCollisionShape* %8(%struct.btGImpactShapeInterface* %3, i32 %index) ; [#uses=1]
- ret %struct.btCollisionShape* %9
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionShape* @_ZN18GIM_ShapeRetriever22TriangleShapeRetriever13getChildShapeEi(%"struct.GIM_ShapeRetriever::TetraShapeRetriever"* nocapture %this, i32 %index) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.GIM_ShapeRetriever** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.GIM_ShapeRetriever* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load %struct.btGImpactShapeInterface** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btGImpactShapeInterface* %3, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 25 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.GIM_ShapeRetriever* %1, i32 0, i32 1 ; [#uses=1]
- %9 = bitcast i32 (...)* %7 to void (%struct.btGImpactShapeInterface*, i32, %struct.btTriangleShapeEx*)* ; [#uses=1]
- tail call void %9(%struct.btGImpactShapeInterface* %3, i32 %index, %struct.btTriangleShapeEx* %8)
- %10 = load %struct.GIM_ShapeRetriever** %0, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_ShapeRetriever* %10, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- ret %struct.btCollisionShape* %11
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionShape* @_ZN18GIM_ShapeRetriever19TetraShapeRetriever13getChildShapeEi(%"struct.GIM_ShapeRetriever::TetraShapeRetriever"* nocapture %this, i32 %index) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.GIM_ShapeRetriever** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.GIM_ShapeRetriever* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load %struct.btGImpactShapeInterface** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btGImpactShapeInterface* %3, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 26 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.GIM_ShapeRetriever* %1, i32 0, i32 2 ; [#uses=1]
- %9 = bitcast i32 (...)* %7 to void (%struct.btGImpactShapeInterface*, i32, %struct.btTetrahedronShapeEx*)* ; [#uses=1]
- tail call void %9(%struct.btGImpactShapeInterface* %3, i32 %index, %struct.btTetrahedronShapeEx* %8)
- %10 = load %struct.GIM_ShapeRetriever** %0, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_ShapeRetriever* %10, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- ret %struct.btCollisionShape* %11
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18GIM_ShapeRetriever19ChildShapeRetrieverD1Ev(%"struct.GIM_ShapeRetriever::ChildShapeRetriever"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18GIM_ShapeRetriever19ChildShapeRetrieverD0Ev(%"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18GIM_ShapeRetriever22TriangleShapeRetrieverD1Ev(%"struct.GIM_ShapeRetriever::TetraShapeRetriever"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18GIM_ShapeRetriever22TriangleShapeRetrieverD0Ev(%"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18GIM_ShapeRetriever19TetraShapeRetrieverD1Ev(%"struct.GIM_ShapeRetriever::TetraShapeRetriever"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18GIM_ShapeRetriever19TetraShapeRetrieverD0Ev(%"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.GIM_ShapeRetriever::TetraShapeRetriever"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btQuadWord* %point, %struct.btQuadWord* %normal, float %distance) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=4]
- %1 = load %struct.btManifoldResult** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btManifoldResult* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %5 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- tail call void %10(%struct.btManifoldResult* %1, i32 %9, i32 %7)
- %11 = load %struct.btManifoldResult** %0, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btManifoldResult* %11, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 3 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %15 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- tail call void %20(%struct.btManifoldResult* %11, i32 %19, i32 %17)
- %21 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %22 = load %struct.btPersistentManifold** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btPersistentManifold* %22, null ; [#uses=1]
- br i1 %23, label %bb.i, label %_ZN27btGImpactCollisionAlgorithm13checkManifoldEP17btCollisionObjectS1_.exit
-
-bb.i: ; preds = %entry
- %24 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load %struct.btActionInterface** %24, align 4 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btActionInterface* %25, i32 0, i32 0 ; [#uses=1]
- %27 = load i32 (...)*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 3 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %31 = bitcast %struct.btCollisionObject* %body0 to i8* ; [#uses=1]
- %32 = bitcast %struct.btCollisionObject* %body1 to i8* ; [#uses=1]
- %33 = tail call %struct.btPersistentManifold* %30(%struct.btActionInterface* %25, i8* %31, i8* %32) ; [#uses=2]
- store %struct.btPersistentManifold* %33, %struct.btPersistentManifold** %21, align 4
- br label %_ZN27btGImpactCollisionAlgorithm13checkManifoldEP17btCollisionObjectS1_.exit
-
-_ZN27btGImpactCollisionAlgorithm13checkManifoldEP17btCollisionObjectS1_.exit: ; preds = %bb.i, %entry
- %34 = phi %struct.btPersistentManifold* [ %33, %bb.i ], [ %22, %entry ] ; [#uses=1]
- %35 = load %struct.btManifoldResult** %0, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btManifoldResult* %35, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* %34, %struct.btPersistentManifold** %36, align 4
- %37 = load %struct.btManifoldResult** %0, align 4 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btManifoldResult* %37, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load i32 (...)*** %38, align 4 ; [#uses=1]
- %40 = getelementptr inbounds i32 (...)** %39, i32 4 ; [#uses=1]
- %41 = load i32 (...)** %40, align 4 ; [#uses=1]
- %42 = bitcast i32 (...)* %41 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- tail call void %42(%struct.btManifoldResult* %37, %struct.btQuadWord* %normal, %struct.btQuadWord* %point, float %distance)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN27btGImpactCollisionAlgorithm24shape_vs_shape_collisionEP17btCollisionObjectS1_P16btCollisionShapeS3_(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btCollisionShape* %shape0, %struct.btCollisionShape* %shape1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=3]
- %1 = load %struct.btCollisionShape** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=3]
- %3 = load %struct.btCollisionShape** %2, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %shape0, %struct.btCollisionShape** %0, align 4
- store %struct.btCollisionShape* %shape1, %struct.btCollisionShape** %2, align 4
- %4 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=3]
- %5 = load %struct.btPersistentManifold** %4, align 4 ; [#uses=2]
- %6 = icmp eq %struct.btPersistentManifold* %5, null ; [#uses=1]
- br i1 %6, label %bb.i.i, label %_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit
-
-bb.i.i: ; preds = %entry
- %7 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load %struct.btActionInterface** %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btActionInterface* %8, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 3 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %14 = bitcast %struct.btCollisionObject* %body0 to i8* ; [#uses=1]
- %15 = bitcast %struct.btCollisionObject* %body1 to i8* ; [#uses=1]
- %16 = tail call %struct.btPersistentManifold* %13(%struct.btActionInterface* %8, i8* %14, i8* %15) ; [#uses=2]
- store %struct.btPersistentManifold* %16, %struct.btPersistentManifold** %4, align 4
- br label %_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit
-
-_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit: ; preds = %bb.i.i, %entry
- %17 = phi %struct.btPersistentManifold* [ %16, %bb.i.i ], [ %5, %entry ] ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=4]
- %19 = load %struct.btManifoldResult** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btManifoldResult* %19, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* %17, %struct.btPersistentManifold** %20, align 4
- %21 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %22 = load %struct.btActionInterface** %21, align 4 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btActionInterface* %22, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 2 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = load %struct.btPersistentManifold** %4, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %26 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %29 = tail call %struct.btCollisionAlgorithm* %28(%struct.btActionInterface* %22, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btPersistentManifold* %27) ; [#uses=4]
- %30 = load %struct.btManifoldResult** %18, align 4 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btManifoldResult* %30, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load i32 (...)*** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 2 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- %36 = load i32* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- %38 = load i32* %37, align 4 ; [#uses=1]
- %39 = bitcast i32 (...)* %34 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- tail call void %39(%struct.btManifoldResult* %30, i32 %38, i32 %36)
- %40 = load %struct.btManifoldResult** %18, align 4 ; [#uses=2]
- %41 = getelementptr inbounds %struct.btManifoldResult* %40, i32 0, i32 0, i32 0 ; [#uses=1]
- %42 = load i32 (...)*** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds i32 (...)** %42, i32 3 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- %48 = load i32* %47, align 4 ; [#uses=1]
- %49 = bitcast i32 (...)* %44 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- tail call void %49(%struct.btManifoldResult* %40, i32 %48, i32 %46)
- %50 = getelementptr inbounds %struct.btCollisionAlgorithm* %29, i32 0, i32 0 ; [#uses=2]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds i32 (...)** %51, i32 2 ; [#uses=1]
- %53 = load i32 (...)** %52, align 4 ; [#uses=1]
- %54 = load %struct.btManifoldResult** %18, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %56 = load %struct.btDispatcherInfo** %55, align 4 ; [#uses=1]
- %57 = bitcast i32 (...)* %53 to void (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- tail call void %57(%struct.btCollisionAlgorithm* %29, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %56, %struct.btManifoldResult* %54)
- %58 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %59 = load i32 (...)** %58, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %59 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- tail call void %60(%struct.btCollisionAlgorithm* %29)
- %61 = load %struct.btActionInterface** %21, align 4 ; [#uses=2]
- %62 = getelementptr inbounds %struct.btActionInterface* %61, i32 0, i32 0 ; [#uses=1]
- %63 = load i32 (...)*** %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds i32 (...)** %63, i32 13 ; [#uses=1]
- %65 = load i32 (...)** %64, align 4 ; [#uses=1]
- %66 = bitcast i32 (...)* %65 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %67 = bitcast %struct.btCollisionAlgorithm* %29 to i8* ; [#uses=1]
- tail call void %66(%struct.btActionInterface* %61, i8* %67)
- store %struct.btCollisionShape* %1, %struct.btCollisionShape** %0, align 4
- store %struct.btCollisionShape* %3, %struct.btCollisionShape** %2, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN27btGImpactCollisionAlgorithm26convex_vs_convex_collisionEP17btCollisionObjectS1_P16btCollisionShapeS3_(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btCollisionShape* %shape0, %struct.btCollisionShape* %shape1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=3]
- %1 = load %struct.btCollisionShape** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=3]
- %3 = load %struct.btCollisionShape** %2, align 4 ; [#uses=1]
- store %struct.btCollisionShape* %shape0, %struct.btCollisionShape** %0, align 4
- store %struct.btCollisionShape* %shape1, %struct.btCollisionShape** %2, align 4
- %4 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=4]
- %5 = load %struct.btManifoldResult** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btManifoldResult* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 2 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %9 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- tail call void %14(%struct.btManifoldResult* %5, i32 %13, i32 %11)
- %15 = load %struct.btManifoldResult** %4, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btManifoldResult* %15, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 3 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %19 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- tail call void %24(%struct.btManifoldResult* %15, i32 %23, i32 %21)
- %25 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=2]
- %26 = load %struct.btCollisionAlgorithm** %25, align 4 ; [#uses=2]
- %27 = icmp eq %struct.btCollisionAlgorithm* %26, null ; [#uses=1]
- br i1 %27, label %bb.i, label %_ZN27btGImpactCollisionAlgorithm20checkConvexAlgorithmEP17btCollisionObjectS1_.exit
-
-bb.i: ; preds = %entry
- %28 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=3]
- %29 = load %struct.btPersistentManifold** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btPersistentManifold* %29, null ; [#uses=1]
- br i1 %30, label %bb.i.i.i, label %_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit.i
-
-bb.i.i.i: ; preds = %bb.i
- %31 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load %struct.btActionInterface** %31, align 4 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btActionInterface* %32, i32 0, i32 0 ; [#uses=1]
- %34 = load i32 (...)*** %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds i32 (...)** %34, i32 3 ; [#uses=1]
- %36 = load i32 (...)** %35, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %36 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %38 = bitcast %struct.btCollisionObject* %body0 to i8* ; [#uses=1]
- %39 = bitcast %struct.btCollisionObject* %body1 to i8* ; [#uses=1]
- %40 = tail call %struct.btPersistentManifold* %37(%struct.btActionInterface* %32, i8* %38, i8* %39) ; [#uses=2]
- store %struct.btPersistentManifold* %40, %struct.btPersistentManifold** %28, align 4
- br label %_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit.i
-
-_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit.i: ; preds = %bb.i.i.i, %bb.i
- %41 = phi %struct.btPersistentManifold* [ %40, %bb.i.i.i ], [ %29, %bb.i ] ; [#uses=1]
- %42 = load %struct.btManifoldResult** %4, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btManifoldResult* %42, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* %41, %struct.btPersistentManifold** %43, align 4
- %44 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %45 = load %struct.btActionInterface** %44, align 4 ; [#uses=2]
- %46 = getelementptr inbounds %struct.btActionInterface* %45, i32 0, i32 0 ; [#uses=1]
- %47 = load i32 (...)*** %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds i32 (...)** %47, i32 2 ; [#uses=1]
- %49 = load i32 (...)** %48, align 4 ; [#uses=1]
- %50 = load %struct.btPersistentManifold** %28, align 4 ; [#uses=1]
- %51 = bitcast i32 (...)* %49 to %struct.btCollisionAlgorithm* (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btPersistentManifold*)* ; [#uses=1]
- %52 = tail call %struct.btCollisionAlgorithm* %51(%struct.btActionInterface* %45, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btPersistentManifold* %50) ; [#uses=2]
- store %struct.btCollisionAlgorithm* %52, %struct.btCollisionAlgorithm** %25, align 4
- br label %_ZN27btGImpactCollisionAlgorithm20checkConvexAlgorithmEP17btCollisionObjectS1_.exit
-
-_ZN27btGImpactCollisionAlgorithm20checkConvexAlgorithmEP17btCollisionObjectS1_.exit: ; preds = %_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit.i, %entry
- %53 = phi %struct.btCollisionAlgorithm* [ %26, %entry ], [ %52, %_ZN27btGImpactCollisionAlgorithm12newAlgorithmEP17btCollisionObjectS1_.exit.i ] ; [#uses=2]
- %54 = getelementptr inbounds %struct.btCollisionAlgorithm* %53, i32 0, i32 0 ; [#uses=1]
- %55 = load i32 (...)*** %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds i32 (...)** %55, i32 2 ; [#uses=1]
- %57 = load i32 (...)** %56, align 4 ; [#uses=1]
- %58 = load %struct.btManifoldResult** %4, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- %60 = load %struct.btDispatcherInfo** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %57 to void (%struct.btCollisionAlgorithm*, %struct.btCollisionObject*, %struct.btCollisionObject*, %struct.btDispatcherInfo*, %struct.btManifoldResult*)* ; [#uses=1]
- tail call void %61(%struct.btCollisionAlgorithm* %53, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %60, %struct.btManifoldResult* %58)
- store %struct.btCollisionShape* %1, %struct.btCollisionShape** %0, align 4
- store %struct.btCollisionShape* %3, %struct.btCollisionShape** %2, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithm37gimpacttrimeshpart_vs_plane_collisionEP17btCollisionObjectS1_P22btGImpactMeshShapePartP18btStaticPlaneShapeb(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactMeshShapePart* %shape0, %struct.btStaticPlaneShape* %shape1, i8 zeroext %swapped) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %orgtrans0 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %plane = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %tribox = alloca %struct.GIM_AABB, align 8 ; [#uses=8]
- %vertex = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %1 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 8
- %4 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 8
- %10 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 8
- %16 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 8
- %22 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 8
- %28 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 8
- %34 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 8
- %40 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %41 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %44 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 8
- %46 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %74 = getelementptr inbounds %struct.btStaticPlaneShape* %shape1, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=4]
- %76 = fmul float %50, %75 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btStaticPlaneShape* %shape1, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=4]
- %79 = fmul float %52, %78 ; [#uses=1]
- %80 = fadd float %76, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btStaticPlaneShape* %shape1, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=4]
- %83 = fmul float %54, %82 ; [#uses=1]
- %84 = fadd float %80, %83 ; [#uses=1]
- store float %84, float* %73, align 8
- %85 = fmul float %56, %75 ; [#uses=1]
- %86 = fmul float %58, %78 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %60, %82 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %89, float* %90, align 4
- %91 = fmul float %62, %75 ; [#uses=1]
- %92 = fmul float %64, %78 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %66, %82 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %95, float* %96, align 8
- %97 = fmul float %68, %75 ; [#uses=1]
- %98 = fmul float %70, %78 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %72, %82 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btStaticPlaneShape* %shape1, i32 0, i32 4 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=1]
- %104 = fadd float %101, %103 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- store float %104, float* %105, align 4
- %106 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %107 = load i32 (...)*** %106, align 4 ; [#uses=1]
- %108 = getelementptr inbounds i32 (...)** %107, i32 2 ; [#uses=1]
- %109 = load i32 (...)** %108, align 4 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 0 ; [#uses=1]
- %111 = bitcast i32 (...)* %109 to void (%struct.btGImpactShapeInterface*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %112 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 0 ; [#uses=1]
- %113 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 1 ; [#uses=1]
- call void %111(%struct.btGImpactShapeInterface* %110, %struct.btTransform* %orgtrans0, %struct.btQuadWord* %112, %struct.btQuadWord* %113)
- %114 = getelementptr inbounds %struct.btStaticPlaneShape* %shape1, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %115 = load i32 (...)*** %114, align 4 ; [#uses=1]
- %116 = getelementptr inbounds i32 (...)** %115, i32 11 ; [#uses=1]
- %117 = load i32 (...)** %116, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btStaticPlaneShape* %shape1, i32 0, i32 0 ; [#uses=2]
- %119 = bitcast i32 (...)* %117 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %120 = call float %119(%struct.btConcaveShape* %118) ; [#uses=6]
- %121 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %122 = load float* %121, align 8 ; [#uses=1]
- %123 = fsub float %122, %120 ; [#uses=2]
- store float %123, float* %121, align 8
- %124 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %125 = load float* %124, align 4 ; [#uses=1]
- %126 = fsub float %125, %120 ; [#uses=2]
- store float %126, float* %124, align 4
- %127 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %128 = load float* %127, align 8 ; [#uses=1]
- %129 = fsub float %128, %120 ; [#uses=2]
- store float %129, float* %127, align 8
- %130 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %131 = load float* %130, align 8 ; [#uses=1]
- %132 = fadd float %131, %120 ; [#uses=3]
- store float %132, float* %130, align 8
- %133 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %134 = load float* %133, align 4 ; [#uses=1]
- %135 = fadd float %134, %120 ; [#uses=3]
- store float %135, float* %133, align 4
- %136 = getelementptr inbounds %struct.GIM_AABB* %tribox, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %137 = load float* %136, align 8 ; [#uses=1]
- %138 = fadd float %137, %120 ; [#uses=3]
- store float %138, float* %136, align 8
- %139 = fadd float %138, %129 ; [#uses=1]
- %140 = fadd float %135, %126 ; [#uses=1]
- %141 = fadd float %132, %123 ; [#uses=1]
- %142 = fmul float %139, 5.000000e-01 ; [#uses=2]
- %143 = fmul float %140, 5.000000e-01 ; [#uses=2]
- %144 = fmul float %141, 5.000000e-01 ; [#uses=2]
- %145 = fsub float %138, %142 ; [#uses=1]
- %146 = fsub float %135, %143 ; [#uses=1]
- %147 = fsub float %132, %144 ; [#uses=1]
- %148 = load float* %73, align 8 ; [#uses=2]
- %149 = fmul float %148, %144 ; [#uses=1]
- %150 = load float* %90, align 4 ; [#uses=2]
- %151 = fmul float %150, %143 ; [#uses=1]
- %152 = fadd float %149, %151 ; [#uses=1]
- %153 = load float* %96, align 8 ; [#uses=2]
- %154 = fmul float %153, %142 ; [#uses=1]
- %155 = fadd float %152, %154 ; [#uses=2]
- %156 = call float @fabsf(float %153) nounwind readnone ; [#uses=1]
- %157 = call float @fabsf(float %150) nounwind readnone ; [#uses=1]
- %158 = call float @fabsf(float %148) nounwind readnone ; [#uses=1]
- %159 = fmul float %147, %158 ; [#uses=1]
- %160 = fmul float %146, %157 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=1]
- %162 = fmul float %145, %156 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=2]
- %164 = fadd float %155, %163 ; [#uses=1]
- %165 = load float* %105, align 4 ; [#uses=2]
- %166 = fadd float %164, 0x3EB0C6F7A0000000 ; [#uses=1]
- %167 = fcmp ogt float %165, %166 ; [#uses=1]
- br i1 %167, label %return, label %_ZNK6btAABB14plane_classifyERK9btVector4.exit
-
-_ZNK6btAABB14plane_classifyERK9btVector4.exit: ; preds = %entry
- %168 = fsub float %155, %163 ; [#uses=1]
- %169 = fadd float %165, 0x3EB0C6F7A0000000 ; [#uses=1]
- %not. = fcmp ult float %169, %168 ; [#uses=1]
- br i1 %not., label %return, label %bb
-
-bb: ; preds = %_ZNK6btAABB14plane_classifyERK9btVector4.exit
- %170 = load i32 (...)*** %106, align 4 ; [#uses=1]
- %171 = getelementptr inbounds i32 (...)** %170, i32 27 ; [#uses=1]
- %172 = load i32 (...)** %171, align 4 ; [#uses=1]
- %173 = bitcast i32 (...)* %172 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- call void %173(%struct.btGImpactMeshShapePart* %shape0)
- %174 = load i32 (...)*** %106, align 4 ; [#uses=1]
- %175 = getelementptr inbounds i32 (...)** %174, i32 11 ; [#uses=1]
- %176 = load i32 (...)** %175, align 4 ; [#uses=1]
- %177 = bitcast i32 (...)* %176 to float (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- %178 = call float %177(%struct.btGImpactMeshShapePart* %shape0) ; [#uses=1]
- %179 = load i32 (...)*** %114, align 4 ; [#uses=1]
- %180 = getelementptr inbounds i32 (...)** %179, i32 11 ; [#uses=1]
- %181 = load i32 (...)** %180, align 4 ; [#uses=1]
- %182 = bitcast i32 (...)* %181 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %183 = call float %182(%struct.btConcaveShape* %118) ; [#uses=1]
- %184 = fadd float %178, %183 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 1, i32 7 ; [#uses=1]
- %186 = load i32* %185, align 4 ; [#uses=3]
- %187 = icmp eq i32 %186, 0 ; [#uses=1]
- br i1 %187, label %bb8, label %bb.nph
-
-bb.nph: ; preds = %bb
- %188 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 1, i32 8 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 1, i32 6 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 1, i32 9 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 0 ; [#uses=3]
- %192 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 1, i32 3, i32 0, i32 0 ; [#uses=2]
- %193 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 1, i32 3, i32 0, i32 1 ; [#uses=2]
- %194 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 1 ; [#uses=3]
- %195 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 1, i32 3, i32 0, i32 2 ; [#uses=2]
- %196 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 2 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btQuadWord* %vertex, i32 0, i32 0, i32 3 ; [#uses=1]
- %toBool3 = icmp eq i8 %swapped, 0 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=8]
- %200 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=2]
- %201 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=2]
- %202 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=2]
- %203 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=2]
- %204 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=4]
- %205 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %206 = bitcast %struct.btCollisionObject* %body0 to i8* ; [#uses=2]
- %207 = bitcast %struct.btCollisionObject* %body1 to i8* ; [#uses=2]
- %208 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %210 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp19 = add i32 %186, -1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb6.backedge, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb6.backedge ] ; [#uses=2]
- %tmp20 = sub i32 %tmp19, %indvar ; [#uses=1]
- %212 = load i32* %188, align 4 ; [#uses=1]
- %213 = icmp eq i32 %212, 1 ; [#uses=1]
- %214 = load i8** %189, align 4 ; [#uses=5]
- %215 = load i32* %190, align 4 ; [#uses=1]
- %216 = mul nsw i32 %215, %tmp20 ; [#uses=5]
- %217 = getelementptr inbounds i8* %214, i32 %216 ; [#uses=2]
- br i1 %213, label %bb.i.i12, label %bb1.i.i
-
-bb.i.i12: ; preds = %bb1
- %218 = bitcast i8* %217 to double* ; [#uses=1]
- %219 = load double* %218, align 4 ; [#uses=1]
- %220 = load float* %192, align 4 ; [#uses=1]
- %221 = fpext float %220 to double ; [#uses=1]
- %222 = fmul double %219, %221 ; [#uses=1]
- %223 = fptrunc double %222 to float ; [#uses=2]
- store float %223, float* %191, align 8
- %.sum4.i.i = add i32 %216, 8 ; [#uses=1]
- %224 = getelementptr inbounds i8* %214, i32 %.sum4.i.i ; [#uses=1]
- %225 = bitcast i8* %224 to double* ; [#uses=1]
- %226 = load double* %225, align 4 ; [#uses=1]
- %227 = load float* %193, align 4 ; [#uses=1]
- %228 = fpext float %227 to double ; [#uses=1]
- %229 = fmul double %226, %228 ; [#uses=1]
- %230 = fptrunc double %229 to float ; [#uses=2]
- store float %230, float* %194, align 4
- %.sum5.i.i = add i32 %216, 16 ; [#uses=1]
- %231 = getelementptr inbounds i8* %214, i32 %.sum5.i.i ; [#uses=1]
- %232 = bitcast i8* %231 to double* ; [#uses=1]
- %233 = load double* %232, align 4 ; [#uses=1]
- %234 = load float* %195, align 4 ; [#uses=1]
- %235 = fpext float %234 to double ; [#uses=1]
- %236 = fmul double %233, %235 ; [#uses=1]
- %237 = fptrunc double %236 to float ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit
-
-bb1.i.i: ; preds = %bb1
- %238 = bitcast i8* %217 to float* ; [#uses=1]
- %239 = load float* %238, align 4 ; [#uses=1]
- %240 = load float* %192, align 4 ; [#uses=1]
- %241 = fmul float %239, %240 ; [#uses=2]
- store float %241, float* %191, align 8
- %.sum.i.i = add i32 %216, 4 ; [#uses=1]
- %242 = getelementptr inbounds i8* %214, i32 %.sum.i.i ; [#uses=1]
- %243 = bitcast i8* %242 to float* ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = load float* %193, align 4 ; [#uses=1]
- %246 = fmul float %244, %245 ; [#uses=2]
- store float %246, float* %194, align 4
- %.sum3.i.i = add i32 %216, 8 ; [#uses=1]
- %247 = getelementptr inbounds i8* %214, i32 %.sum3.i.i ; [#uses=1]
- %248 = bitcast i8* %247 to float* ; [#uses=1]
- %249 = load float* %248, align 4 ; [#uses=1]
- %250 = load float* %195, align 4 ; [#uses=1]
- %251 = fmul float %249, %250 ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit
-
-_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit: ; preds = %bb1.i.i, %bb.i.i12
- %252 = phi float [ %251, %bb1.i.i ], [ %237, %bb.i.i12 ] ; [#uses=3]
- %253 = phi float [ %246, %bb1.i.i ], [ %230, %bb.i.i12 ] ; [#uses=3]
- %254 = phi float [ %241, %bb1.i.i ], [ %223, %bb.i.i12 ] ; [#uses=3]
- %255 = load float* %25, align 8 ; [#uses=1]
- %256 = fmul float %255, %254 ; [#uses=1]
- %257 = load float* %28, align 4 ; [#uses=1]
- %258 = fmul float %257, %253 ; [#uses=1]
- %259 = fadd float %256, %258 ; [#uses=1]
- %260 = load float* %31, align 8 ; [#uses=1]
- %261 = fmul float %260, %252 ; [#uses=1]
- %262 = fadd float %259, %261 ; [#uses=1]
- %263 = load float* %43, align 8 ; [#uses=1]
- %264 = fadd float %262, %263 ; [#uses=2]
- %265 = load float* %13, align 8 ; [#uses=1]
- %266 = fmul float %265, %254 ; [#uses=1]
- %267 = load float* %16, align 4 ; [#uses=1]
- %268 = fmul float %267, %253 ; [#uses=1]
- %269 = fadd float %266, %268 ; [#uses=1]
- %270 = load float* %19, align 8 ; [#uses=1]
- %271 = fmul float %270, %252 ; [#uses=1]
- %272 = fadd float %269, %271 ; [#uses=1]
- %273 = load float* %40, align 4 ; [#uses=1]
- %274 = fadd float %272, %273 ; [#uses=2]
- %275 = load float* %1, align 8 ; [#uses=1]
- %276 = fmul float %275, %254 ; [#uses=1]
- %277 = load float* %4, align 4 ; [#uses=1]
- %278 = fmul float %277, %253 ; [#uses=1]
- %279 = fadd float %276, %278 ; [#uses=1]
- %280 = load float* %7, align 8 ; [#uses=1]
- %281 = fmul float %280, %252 ; [#uses=1]
- %282 = fadd float %279, %281 ; [#uses=1]
- %283 = load float* %37, align 8 ; [#uses=1]
- %284 = fadd float %282, %283 ; [#uses=2]
- store float %284, float* %191, align 8
- store float %274, float* %194, align 4
- store float %264, float* %196, align 8
- store float 0.000000e+00, float* %197, align 4
- %285 = load float* %73, align 8 ; [#uses=2]
- %286 = fmul float %284, %285 ; [#uses=1]
- %287 = load float* %90, align 4 ; [#uses=2]
- %288 = fmul float %274, %287 ; [#uses=1]
- %289 = fadd float %286, %288 ; [#uses=1]
- %290 = load float* %96, align 8 ; [#uses=2]
- %291 = fmul float %264, %290 ; [#uses=1]
- %292 = fadd float %289, %291 ; [#uses=1]
- %293 = load float* %105, align 4 ; [#uses=1]
- %294 = fsub float %292, %293 ; [#uses=1]
- %295 = fsub float %294, %184 ; [#uses=3]
- %296 = fcmp olt float %295, 0.000000e+00 ; [#uses=1]
- br i1 %296, label %bb2, label %bb6.backedge
-
-bb6.backedge: ; preds = %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit, %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit11, %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %186 ; [#uses=1]
- br i1 %exitcond, label %bb8, label %bb1
-
-bb2: ; preds = %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit
- br i1 %toBool3, label %bb5, label %bb4
-
-bb4: ; preds = %bb2
- %297 = fsub float -0.000000e+00, %290 ; [#uses=1]
- %298 = fsub float -0.000000e+00, %287 ; [#uses=1]
- %299 = fsub float -0.000000e+00, %285 ; [#uses=1]
- store float %299, float* %208, align 8
- store float %298, float* %209, align 4
- store float %297, float* %210, align 8
- store float 0.000000e+00, float* %211, align 4
- %300 = load %struct.btManifoldResult** %199, align 4 ; [#uses=2]
- %301 = getelementptr inbounds %struct.btManifoldResult* %300, i32 0, i32 0, i32 0 ; [#uses=1]
- %302 = load i32 (...)*** %301, align 4 ; [#uses=1]
- %303 = getelementptr inbounds i32 (...)** %302, i32 2 ; [#uses=1]
- %304 = load i32 (...)** %303, align 4 ; [#uses=1]
- %305 = load i32* %200, align 4 ; [#uses=1]
- %306 = load i32* %201, align 4 ; [#uses=1]
- %307 = bitcast i32 (...)* %304 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %307(%struct.btManifoldResult* %300, i32 %306, i32 %305)
- %308 = load %struct.btManifoldResult** %199, align 4 ; [#uses=2]
- %309 = getelementptr inbounds %struct.btManifoldResult* %308, i32 0, i32 0, i32 0 ; [#uses=1]
- %310 = load i32 (...)*** %309, align 4 ; [#uses=1]
- %311 = getelementptr inbounds i32 (...)** %310, i32 3 ; [#uses=1]
- %312 = load i32 (...)** %311, align 4 ; [#uses=1]
- %313 = load i32* %202, align 4 ; [#uses=1]
- %314 = load i32* %203, align 4 ; [#uses=1]
- %315 = bitcast i32 (...)* %312 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %315(%struct.btManifoldResult* %308, i32 %314, i32 %313)
- %316 = load %struct.btPersistentManifold** %204, align 4 ; [#uses=2]
- %317 = icmp eq %struct.btPersistentManifold* %316, null ; [#uses=1]
- br i1 %317, label %bb.i.i10, label %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit11
-
-bb.i.i10: ; preds = %bb4
- %318 = load %struct.btActionInterface** %205, align 4 ; [#uses=2]
- %319 = getelementptr inbounds %struct.btActionInterface* %318, i32 0, i32 0 ; [#uses=1]
- %320 = load i32 (...)*** %319, align 4 ; [#uses=1]
- %321 = getelementptr inbounds i32 (...)** %320, i32 3 ; [#uses=1]
- %322 = load i32 (...)** %321, align 4 ; [#uses=1]
- %323 = bitcast i32 (...)* %322 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %324 = call %struct.btPersistentManifold* %323(%struct.btActionInterface* %318, i8* %207, i8* %206) ; [#uses=2]
- store %struct.btPersistentManifold* %324, %struct.btPersistentManifold** %204, align 4
- br label %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit11
-
-_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit11: ; preds = %bb.i.i10, %bb4
- %325 = phi %struct.btPersistentManifold* [ %324, %bb.i.i10 ], [ %316, %bb4 ] ; [#uses=1]
- %326 = load %struct.btManifoldResult** %199, align 4 ; [#uses=1]
- %327 = getelementptr inbounds %struct.btManifoldResult* %326, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* %325, %struct.btPersistentManifold** %327, align 4
- %328 = load %struct.btManifoldResult** %199, align 4 ; [#uses=2]
- %329 = getelementptr inbounds %struct.btManifoldResult* %328, i32 0, i32 0, i32 0 ; [#uses=1]
- %330 = load i32 (...)*** %329, align 4 ; [#uses=1]
- %331 = getelementptr inbounds i32 (...)** %330, i32 4 ; [#uses=1]
- %332 = load i32 (...)** %331, align 4 ; [#uses=1]
- %333 = bitcast i32 (...)* %332 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %333(%struct.btManifoldResult* %328, %struct.btQuadWord* %0, %struct.btQuadWord* %vertex, float %295)
- br label %bb6.backedge
-
-bb5: ; preds = %bb2
- %334 = load %struct.btManifoldResult** %199, align 4 ; [#uses=2]
- %335 = getelementptr inbounds %struct.btManifoldResult* %334, i32 0, i32 0, i32 0 ; [#uses=1]
- %336 = load i32 (...)*** %335, align 4 ; [#uses=1]
- %337 = getelementptr inbounds i32 (...)** %336, i32 2 ; [#uses=1]
- %338 = load i32 (...)** %337, align 4 ; [#uses=1]
- %339 = load i32* %200, align 4 ; [#uses=1]
- %340 = load i32* %201, align 4 ; [#uses=1]
- %341 = bitcast i32 (...)* %338 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %341(%struct.btManifoldResult* %334, i32 %340, i32 %339)
- %342 = load %struct.btManifoldResult** %199, align 4 ; [#uses=2]
- %343 = getelementptr inbounds %struct.btManifoldResult* %342, i32 0, i32 0, i32 0 ; [#uses=1]
- %344 = load i32 (...)*** %343, align 4 ; [#uses=1]
- %345 = getelementptr inbounds i32 (...)** %344, i32 3 ; [#uses=1]
- %346 = load i32 (...)** %345, align 4 ; [#uses=1]
- %347 = load i32* %202, align 4 ; [#uses=1]
- %348 = load i32* %203, align 4 ; [#uses=1]
- %349 = bitcast i32 (...)* %346 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %349(%struct.btManifoldResult* %342, i32 %348, i32 %347)
- %350 = load %struct.btPersistentManifold** %204, align 4 ; [#uses=2]
- %351 = icmp eq %struct.btPersistentManifold* %350, null ; [#uses=1]
- br i1 %351, label %bb.i.i, label %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit
-
-bb.i.i: ; preds = %bb5
- %352 = load %struct.btActionInterface** %205, align 4 ; [#uses=2]
- %353 = getelementptr inbounds %struct.btActionInterface* %352, i32 0, i32 0 ; [#uses=1]
- %354 = load i32 (...)*** %353, align 4 ; [#uses=1]
- %355 = getelementptr inbounds i32 (...)** %354, i32 3 ; [#uses=1]
- %356 = load i32 (...)** %355, align 4 ; [#uses=1]
- %357 = bitcast i32 (...)* %356 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %358 = call %struct.btPersistentManifold* %357(%struct.btActionInterface* %352, i8* %206, i8* %207) ; [#uses=2]
- store %struct.btPersistentManifold* %358, %struct.btPersistentManifold** %204, align 4
- br label %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit
-
-_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit: ; preds = %bb.i.i, %bb5
- %359 = phi %struct.btPersistentManifold* [ %358, %bb.i.i ], [ %350, %bb5 ] ; [#uses=1]
- %360 = load %struct.btManifoldResult** %199, align 4 ; [#uses=1]
- %361 = getelementptr inbounds %struct.btManifoldResult* %360, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* %359, %struct.btPersistentManifold** %361, align 4
- %362 = load %struct.btManifoldResult** %199, align 4 ; [#uses=2]
- %363 = getelementptr inbounds %struct.btManifoldResult* %362, i32 0, i32 0, i32 0 ; [#uses=1]
- %364 = load i32 (...)*** %363, align 4 ; [#uses=1]
- %365 = getelementptr inbounds i32 (...)** %364, i32 4 ; [#uses=1]
- %366 = load i32 (...)** %365, align 4 ; [#uses=1]
- %367 = bitcast i32 (...)* %366 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %367(%struct.btManifoldResult* %362, %struct.btQuadWord* %198, %struct.btQuadWord* %vertex, float %295)
- br label %bb6.backedge
-
-bb8: ; preds = %bb6.backedge, %bb
- %368 = load i32 (...)*** %106, align 4 ; [#uses=1]
- %369 = getelementptr inbounds i32 (...)** %368, i32 28 ; [#uses=1]
- %370 = load i32 (...)** %369, align 4 ; [#uses=1]
- %371 = bitcast i32 (...)* %370 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- call void %371(%struct.btGImpactMeshShapePart* %shape0)
- ret void
-
-return: ; preds = %_ZNK6btAABB14plane_classifyERK9btVector4.exit, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btGImpactTriangleCallbackD1Ev(%struct.btGImpactTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV25btGImpactTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btGImpactTriangleCallbackD0Ev(%struct.btGImpactTriangleCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV25btGImpactTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btGImpactTriangleCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btGImpactTriangleCallback15processTriangleEP9btVector3ii(%struct.btGImpactTriangleCallback* nocapture %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %tri1 = alloca %struct.btTriangleShapeEx, align 8 ; [#uses=19]
- %0 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %0)
- %1 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV17btTriangleShapeEx, i32 0, i32 2), i32 (...)*** %1, align 8
- %39 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 6 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %40, float* %41, align 4
- %42 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 5 ; [#uses=2]
- %43 = load i8* %42, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %43, 0 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 1 ; [#uses=4]
- %45 = load %struct.btGImpactCollisionAlgorithm** %44, align 4 ; [#uses=2]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %46 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %45, i32 0, i32 6 ; [#uses=1]
- store i32 %partId, i32* %46, align 4
- %47 = load %struct.btGImpactCollisionAlgorithm** %44, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %47, i32 0, i32 5 ; [#uses=1]
- store i32 %triangleIndex, i32* %48, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- %49 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %45, i32 0, i32 8 ; [#uses=1]
- store i32 %partId, i32* %49, align 4
- %50 = load %struct.btGImpactCollisionAlgorithm** %44, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %50, i32 0, i32 7 ; [#uses=1]
- store i32 %triangleIndex, i32* %51, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %52 = load i8* %42, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 4 ; [#uses=1]
- %54 = load %struct.btGImpactShapeInterface** %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 3 ; [#uses=1]
- %56 = load %struct.btCollisionObject** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btGImpactTriangleCallback* %this, i32 0, i32 2 ; [#uses=1]
- %58 = load %struct.btCollisionObject** %57, align 4 ; [#uses=1]
- %59 = load %struct.btGImpactCollisionAlgorithm** %44, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN27btGImpactCollisionAlgorithm16gimpact_vs_shapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP16btCollisionShapeb(%struct.btGImpactCollisionAlgorithm* %59, %struct.btCollisionObject* %58, %struct.btCollisionObject* %56, %struct.btGImpactShapeInterface* %54, %struct.btCollisionShape* %60, i8 zeroext %52)
- to label %bb6 unwind label %lpad
-
-invcont4: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb6: ; preds = %bb2
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %61 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %61)
- ret void
-
-lpad: ; preds = %bb2
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %62 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %62)
- to label %invcont4 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN27btGImpactCollisionAlgorithm21calculateTimeOfImpactEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* nocapture %body0, %struct.btCollisionObject* nocapture %body1, %struct.btDispatcherInfo* nocapture %dispatchInfo, %struct.btManifoldResult* nocapture %resultOut) nounwind readnone align 2 {
-entry:
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN27btGImpactCollisionAlgorithm10CreateFuncD1Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btGImpactCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN27btGImpactCollisionAlgorithm10CreateFuncD0Ev(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btGImpactCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionAlgorithm* @_ZN27btGImpactCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* nocapture %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionAlgorithmConstructionInfo* %ci, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 12 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i8* (%struct.btActionInterface*, i32)* ; [#uses=1]
- %7 = tail call i8* %6(%struct.btActionInterface* %1, i32 40) ; [#uses=6]
- %8 = icmp eq i8* %7, null ; [#uses=1]
- br i1 %8, label %bb4, label %bb
-
-bb: ; preds = %entry
- %9 = bitcast i8* %7 to %struct.btActivatingCollisionAlgorithm* ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %9, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- to label %_ZN27btGImpactCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_.exit unwind label %lpad
-
-_ZN27btGImpactCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_.exit: ; preds = %bb
- %10 = bitcast i8* %7 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btGImpactCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %10, align 4
- %11 = getelementptr inbounds i8* %7, i32 12 ; [#uses=1]
- %12 = bitcast i8* %11 to %struct.btPersistentManifold** ; [#uses=1]
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %12, align 4
- %13 = getelementptr inbounds i8* %7, i32 8 ; [#uses=1]
- %14 = bitcast i8* %13 to %struct.btCollisionAlgorithm** ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %14, align 4
- br label %bb4
-
-bb4: ; preds = %_ZN27btGImpactCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_.exit, %entry
- %iftmp.367.0 = bitcast i8* %7 to %struct.btCollisionAlgorithm* ; [#uses=1]
- ret %struct.btCollisionAlgorithm* %iftmp.367.0
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN27btGImpactCollisionAlgorithm22getAllContactManifoldsER20btAlignedObjectArrayIP20btPersistentManifoldE(%struct.btGImpactCollisionAlgorithm* nocapture %this, %"struct.btAlignedObjectArray<btPersistentManifold*>"* nocapture %manifoldArray) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, %struct.btPersistentManifold** %0) inlinehint
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcher(%struct.btCollisionDispatcher* %dispatcher) align 2 {
-entry:
- %0 = load i8* bitcast (i64* @_ZGVZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf to i8*), align 8 ; [#uses=1]
- %1 = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb3
-
-bb: ; preds = %entry
- %2 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf) nounwind ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb3, label %bb1
-
-bb1: ; preds = %bb
- store i8 0, i8* getelementptr inbounds (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* @_ZZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf, i32 0, i32 0, i32 1), align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btGImpactCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* @_ZZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf, i32 0, i32 0, i32 0), align 8
- tail call void @__cxa_guard_release(i64* @_ZGVZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf) nounwind
- %4 = tail call i32 @__cxa_atexit(void (i8*)* @__tcf_0150, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- br label %bb3
-
-bb3: ; preds = %bb3, %bb1, %bb, %entry
- %5 = phi i32 [ %6, %bb3 ], [ 0, %entry ], [ 0, %bb1 ], [ 0, %bb ] ; [#uses=2]
- tail call void @_ZN21btCollisionDispatcher27registerCollisionCreateFuncEiiP30btCollisionAlgorithmCreateFunc(%struct.btCollisionDispatcher* %dispatcher, i32 25, i32 %5, %struct.btCollisionAlgorithmCreateFunc* getelementptr inbounds (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* @_ZZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf, i32 0, i32 0))
- %6 = add nsw i32 %5, 1 ; [#uses=2]
- %exitcond12 = icmp eq i32 %6, 36 ; [#uses=1]
- br i1 %exitcond12, label %bb6, label %bb3
-
-bb6: ; preds = %bb6, %bb3
- %7 = phi i32 [ %8, %bb6 ], [ 0, %bb3 ] ; [#uses=2]
- tail call void @_ZN21btCollisionDispatcher27registerCollisionCreateFuncEiiP30btCollisionAlgorithmCreateFunc(%struct.btCollisionDispatcher* %dispatcher, i32 %7, i32 25, %struct.btCollisionAlgorithmCreateFunc* getelementptr inbounds (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* @_ZZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf, i32 0, i32 0))
- %8 = add nsw i32 %7, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %8, 36 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb6
-
-return: ; preds = %bb6
- ret void
-}
-
-; [#uses=1]
-define internal void @__tcf_0150(i8* nocapture %unnamed_arg) nounwind {
-entry:
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN27btGImpactCollisionAlgorithm10CreateFuncE, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%"struct.btBoxBoxCollisionAlgorithm::CreateFunc"* @_ZZN27btGImpactCollisionAlgorithm17registerAlgorithmEP21btCollisionDispatcherE12s_gimpact_cf, i32 0, i32 0, i32 0), align 8
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9btPairSetC1Ev(%struct.btPairSet* nocapture %this) align 2 {
-bb.i:
- %0 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 4 ; [#uses=5]
- store i8 1, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 3 ; [#uses=8]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- %2 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 1 ; [#uses=3]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btPairSet* %this, i32 0, i32 0, i32 2 ; [#uses=3]
- store i32 0, i32* %3, align 4
- %4 = invoke i8* @_Z22btAlignedAllocInternalji(i32 256, i32 16)
- to label %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i unwind label %lpad ; [#uses=3]
-
-_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i: ; preds = %bb.i
- %phitmp.i = bitcast i8* %4 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %5 = load i32* %2, align 4 ; [#uses=2]
- %6 = icmp sgt i32 %5, 0 ; [#uses=1]
- br i1 %6, label %bb.i4.i, label %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i
-
-bb.i4.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i
- %indvar.i.i = phi i32 [ %indvar.next.i.i, %bb3.i.i ], [ 0, %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i ] ; [#uses=4]
- %tmp = shl i32 %indvar.i.i, 3 ; [#uses=2]
- %scevgep15 = getelementptr i8* %4, i32 %tmp ; [#uses=2]
- %7 = icmp eq i8* %scevgep15, null ; [#uses=1]
- br i1 %7, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %tmp1721 = or i32 %tmp, 4 ; [#uses=1]
- %scevgep18 = getelementptr i8* %4, i32 %tmp1721 ; [#uses=1]
- %scevgep12.i.i = bitcast i8* %scevgep18 to i32* ; [#uses=1]
- %scevgep10.i.i = bitcast i8* %scevgep15 to i32* ; [#uses=1]
- %8 = load %struct.CONTACT_KEY_TOKEN** %1, align 4 ; [#uses=2]
- %scevgep89.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %8, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %9 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- store i32 %9, i32* %scevgep10.i.i, align 4
- %scevgep11.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %8, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %10 = load i32* %scevgep11.i.i, align 4 ; [#uses=1]
- store i32 %10, i32* %scevgep12.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %5 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI8GIM_PAIRE8allocateEi.exit.i
- %11 = load %struct.CONTACT_KEY_TOKEN** %1, align 4 ; [#uses=2]
- %12 = icmp eq %struct.CONTACT_KEY_TOKEN* %11, null ; [#uses=1]
- br i1 %12, label %return, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i
- %13 = load i8* %0, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %14 = bitcast %struct.CONTACT_KEY_TOKEN* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %14)
- to label %bb2.i.i unwind label %lpad
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- br label %return
-
-invcont1: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %0, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- store i32 0, i32* %2, align 4
- store i32 0, i32* %3, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-return: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI8GIM_PAIRE4copyEiiPS0_.exit.i
- store i8 1, i8* %0, align 4
- store %struct.CONTACT_KEY_TOKEN* %phitmp.i, %struct.CONTACT_KEY_TOKEN** %1, align 4
- store i32 32, i32* %3, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i, %bb.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select5 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %15 = load %struct.CONTACT_KEY_TOKEN** %1, align 4 ; [#uses=2]
- %16 = icmp eq %struct.CONTACT_KEY_TOKEN* %15, null ; [#uses=1]
- br i1 %16, label %invcont1, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %17 = load i8* %0, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %17, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %18 = bitcast %struct.CONTACT_KEY_TOKEN* %15 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %18)
- to label %bb2.i.i.i unwind label %lpad6
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- br label %invcont1
-
-lpad6: ; preds = %bb1.i.i.i
- %eh_ptr7 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr7, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTriangleShapeExD0Ev(%struct.btTriangleShapeEx* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btTriangleShapeEx* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btTriangleShapeExD1Ev(%struct.btTriangleShapeEx* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btTetrahedronShapeExD0Ev(%struct.btTetrahedronShapeEx* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTetrahedronShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTetrahedronShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- %2 = bitcast %struct.btTetrahedronShapeEx* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %2)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btTetrahedronShapeExD1Ev(%struct.btTetrahedronShapeEx* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTetrahedronShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTetrahedronShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %1)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithm18gimpact_vs_concaveEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP14btConcaveShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btConcaveShape* %shape1, i8 zeroext %swapped) align 2 {
-entry:
- %tricallback = alloca %struct.btGImpactTriangleCallback, align 8 ; [#uses=9]
- %gimpactInConcaveSpace = alloca %struct.btTransform, align 8 ; [#uses=17]
- %minAABB = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %maxAABB = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV25btGImpactTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %1 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btGImpactCollisionAlgorithm* %this, %struct.btGImpactCollisionAlgorithm** %1, align 4
- %2 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %body0, %struct.btCollisionObject** %2, align 8
- %3 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 3 ; [#uses=1]
- store %struct.btCollisionObject* %body1, %struct.btCollisionObject** %3, align 4
- %4 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 4 ; [#uses=1]
- store %struct.btGImpactShapeInterface* %shape0, %struct.btGImpactShapeInterface** %4, align 8
- %5 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 5 ; [#uses=1]
- store i8 %swapped, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btConcaveShape* %shape1, i32 0, i32 0, i32 0 ; [#uses=2]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 11 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to float (%struct.btConcaveShape*)* ; [#uses=1]
- %11 = invoke float %10(%struct.btConcaveShape* %shape1)
- to label %invcont2 unwind label %lpad ; [#uses=1]
-
-invcont2: ; preds = %entry
- %12 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 6 ; [#uses=1]
- store float %11, float* %12, align 8
- %13 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=5]
- %23 = load float* %20, align 4 ; [#uses=5]
- %24 = load float* %19, align 4 ; [#uses=5]
- %25 = load float* %18, align 4 ; [#uses=5]
- %26 = load float* %17, align 4 ; [#uses=5]
- %27 = load float* %16, align 4 ; [#uses=5]
- %28 = load float* %15, align 4 ; [#uses=5]
- %29 = load float* %14, align 4 ; [#uses=5]
- %30 = load float* %13, align 4 ; [#uses=5]
- %31 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fsub float -0.000000e+00, %32 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fsub float -0.000000e+00, %35 ; [#uses=3]
- %37 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fsub float -0.000000e+00, %38 ; [#uses=3]
- %40 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=3]
- %42 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=3]
- %46 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=3]
- %48 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=3]
- %50 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=3]
- %54 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=3]
- %56 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=3]
- %58 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=3]
- %60 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=3]
- %62 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=3]
- %64 = fmul float %23, %43 ; [#uses=1]
- %65 = fmul float %22, %41 ; [#uses=1]
- %66 = fmul float %26, %43 ; [#uses=1]
- %67 = fmul float %25, %41 ; [#uses=1]
- %68 = fmul float %29, %43 ; [#uses=1]
- %69 = fmul float %28, %41 ; [#uses=1]
- %70 = fmul float %28, %39 ; [#uses=1]
- %71 = fmul float %29, %36 ; [#uses=1]
- %72 = fmul float %25, %39 ; [#uses=1]
- %73 = fmul float %26, %36 ; [#uses=1]
- %74 = fmul float %22, %39 ; [#uses=1]
- %75 = fmul float %23, %36 ; [#uses=1]
- %76 = fmul float %61, %23 ; [#uses=1]
- %77 = fmul float %59, %22 ; [#uses=1]
- %78 = fmul float %55, %23 ; [#uses=1]
- %79 = fmul float %53, %22 ; [#uses=1]
- %80 = fmul float %49, %23 ; [#uses=1]
- %81 = fmul float %47, %22 ; [#uses=1]
- %82 = fmul float %61, %26 ; [#uses=1]
- %83 = fmul float %59, %25 ; [#uses=1]
- %84 = fmul float %55, %26 ; [#uses=1]
- %85 = fmul float %53, %25 ; [#uses=1]
- %86 = fmul float %49, %26 ; [#uses=1]
- %87 = fmul float %47, %25 ; [#uses=1]
- %88 = fmul float %61, %29 ; [#uses=1]
- %89 = fmul float %59, %28 ; [#uses=1]
- %90 = fmul float %55, %29 ; [#uses=1]
- %91 = fmul float %53, %28 ; [#uses=1]
- %92 = fmul float %49, %29 ; [#uses=1]
- %93 = fmul float %47, %28 ; [#uses=1]
- %94 = fmul float %24, %45 ; [#uses=1]
- %95 = fadd float %65, %64 ; [#uses=1]
- %96 = fmul float %27, %45 ; [#uses=1]
- %97 = fadd float %67, %66 ; [#uses=1]
- %98 = fmul float %30, %45 ; [#uses=1]
- %99 = fadd float %69, %68 ; [#uses=1]
- %100 = fadd float %70, %71 ; [#uses=1]
- %101 = fmul float %30, %33 ; [#uses=1]
- %102 = fadd float %72, %73 ; [#uses=1]
- %103 = fmul float %27, %33 ; [#uses=1]
- %104 = fadd float %74, %75 ; [#uses=1]
- %105 = fmul float %24, %33 ; [#uses=1]
- %106 = fmul float %63, %24 ; [#uses=1]
- %107 = fadd float %77, %76 ; [#uses=1]
- %108 = fmul float %57, %24 ; [#uses=1]
- %109 = fadd float %79, %78 ; [#uses=1]
- %110 = fmul float %51, %24 ; [#uses=1]
- %111 = fadd float %81, %80 ; [#uses=1]
- %112 = fmul float %63, %27 ; [#uses=1]
- %113 = fadd float %83, %82 ; [#uses=1]
- %114 = fmul float %57, %27 ; [#uses=1]
- %115 = fadd float %85, %84 ; [#uses=1]
- %116 = fmul float %51, %27 ; [#uses=1]
- %117 = fadd float %87, %86 ; [#uses=1]
- %118 = fmul float %63, %30 ; [#uses=1]
- %119 = fadd float %89, %88 ; [#uses=1]
- %120 = fmul float %57, %30 ; [#uses=1]
- %121 = fadd float %91, %90 ; [#uses=1]
- %122 = fmul float %51, %30 ; [#uses=1]
- %123 = fadd float %93, %92 ; [#uses=1]
- %124 = fadd float %95, %94 ; [#uses=1]
- %125 = fadd float %97, %96 ; [#uses=1]
- %126 = fadd float %99, %98 ; [#uses=1]
- %127 = fadd float %100, %101 ; [#uses=1]
- %128 = fadd float %102, %103 ; [#uses=1]
- %129 = fadd float %104, %105 ; [#uses=1]
- %130 = fadd float %107, %106 ; [#uses=1]
- %131 = fadd float %109, %108 ; [#uses=1]
- %132 = fadd float %111, %110 ; [#uses=1]
- %133 = fadd float %113, %112 ; [#uses=1]
- %134 = fadd float %115, %114 ; [#uses=1]
- %135 = fadd float %117, %116 ; [#uses=1]
- %136 = fadd float %119, %118 ; [#uses=1]
- %137 = fadd float %121, %120 ; [#uses=1]
- %138 = fadd float %123, %122 ; [#uses=1]
- %139 = fadd float %124, %129 ; [#uses=1]
- %140 = fadd float %125, %128 ; [#uses=1]
- %141 = fadd float %126, %127 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %130, float* %142, align 8
- %143 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %131, float* %143, align 4
- %144 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %132, float* %144, align 8
- %145 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %145, align 4
- %146 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %133, float* %146, align 8
- %147 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %134, float* %147, align 4
- %148 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %135, float* %148, align 8
- %149 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %149, align 4
- %150 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %136, float* %150, align 8
- %151 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %137, float* %151, align 4
- %152 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %138, float* %152, align 8
- %153 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %153, align 4
- %154 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %139, float* %154, align 8
- %155 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %140, float* %155, align 4
- %156 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %141, float* %156, align 8
- %157 = getelementptr inbounds %struct.btTransform* %gimpactInConcaveSpace, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %157, align 4
- %158 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %159 = load i32 (...)*** %158, align 4 ; [#uses=1]
- %160 = getelementptr inbounds i32 (...)** %159, i32 2 ; [#uses=1]
- %161 = load i32 (...)** %160, align 4 ; [#uses=1]
- %162 = bitcast i32 (...)* %161 to void (%struct.btGImpactShapeInterface*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %162(%struct.btGImpactShapeInterface* %shape0, %struct.btTransform* %gimpactInConcaveSpace, %struct.btQuadWord* %minAABB, %struct.btQuadWord* %maxAABB)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %invcont2
- %163 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %164 = getelementptr inbounds i32 (...)** %163, i32 15 ; [#uses=1]
- %165 = load i32 (...)** %164, align 4 ; [#uses=1]
- %166 = bitcast i32 (...)* %165 to void (%struct.btConcaveShape*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %167 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 0 ; [#uses=2]
- invoke void %166(%struct.btConcaveShape* %shape1, %struct.btActionInterface* %167, %struct.btQuadWord* %minAABB, %struct.btQuadWord* %maxAABB)
- to label %bb7 unwind label %lpad
-
-invcont5: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb7: ; preds = %invcont3
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV25btGImpactTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %167)
- ret void
-
-lpad: ; preds = %invcont3, %invcont2, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV25btGImpactTriangleCallback, i32 0, i32 2), i32 (...)*** %0, align 8
- %168 = getelementptr inbounds %struct.btGImpactTriangleCallback* %tricallback, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %168)
- to label %invcont5 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN18GIM_ShapeRetrieverC2EP23btGImpactShapeInterface(%struct.GIM_ShapeRetriever* %this, %struct.btGImpactShapeInterface* %gim_shape) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %0)
- %1 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = bitcast float* %3 to i8* ; [#uses=1]
- tail call void @llvm.memset.p0i8.i64(i8* %4, i8 0, i64 48, i32 4, i1 false)
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV17btTriangleShapeEx, i32 0, i32 2), i32 (...)*** %1, align 4
- %5 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- invoke void @_ZN16btBU_Simplex1to4C2Ev(%struct.btBU_Simplex1to4* %5)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %6 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV20btTetrahedronShapeEx, i32 0, i32 2), i32 (...)*** %6, align 4
- %7 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store i32 4, i32* %7, align 4
- %8 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 3, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %8, align 4
- %9 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %9, align 4
- %10 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %10, align 4
- %11 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 0 ; [#uses=2]
- store %struct.btGImpactShapeInterface* %gim_shape, %struct.btGImpactShapeInterface** %11, align 4
- %12 = getelementptr inbounds %struct.btGImpactShapeInterface* %gim_shape, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 23 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to i8 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %17 = invoke zeroext i8 %16(%struct.btGImpactShapeInterface* %gim_shape)
- to label %invcont1 unwind label %lpad27 ; [#uses=1]
-
-invcont1: ; preds = %invcont
- %toBool = icmp eq i8 %17, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb
-
-bb: ; preds = %invcont1
- %18 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 4, i32 0 ; [#uses=2]
- %19 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 6 ; [#uses=1]
- store %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %18, %"struct.GIM_ShapeRetriever::ChildShapeRetriever"** %19, align 4
- br label %bb7
-
-bb2: ; preds = %invcont1
- %20 = load %struct.btGImpactShapeInterface** %11, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btGImpactShapeInterface* %20, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 24 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %24 to i8 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %26 = invoke zeroext i8 %25(%struct.btGImpactShapeInterface* %20)
- to label %invcont3 unwind label %lpad27 ; [#uses=1]
-
-invcont3: ; preds = %bb2
- %toBool4 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool4, label %bb6, label %bb5
-
-bb5: ; preds = %invcont3
- %27 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 5, i32 0 ; [#uses=2]
- %28 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 6 ; [#uses=1]
- store %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %27, %"struct.GIM_ShapeRetriever::ChildShapeRetriever"** %28, align 4
- br label %bb7
-
-bb6: ; preds = %invcont3
- %29 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 3 ; [#uses=2]
- %30 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 6 ; [#uses=1]
- store %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %29, %"struct.GIM_ShapeRetriever::ChildShapeRetriever"** %30, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5, %bb
- %31 = phi %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* [ %29, %bb6 ], [ %27, %bb5 ], [ %18, %bb ] ; [#uses=1]
- %32 = getelementptr inbounds %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %31, i32 0, i32 1 ; [#uses=1]
- store %struct.GIM_ShapeRetriever* %this, %struct.GIM_ShapeRetriever** %32, align 4
- ret void
-
-invcont23: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select26 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad27: ; preds = %bb2, %invcont
- %eh_ptr28 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select30 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %10, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %9, align 4
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %8, align 4
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %6, align 4
- %33 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %33)
- to label %ppad unwind label %lpad31
-
-lpad31: ; preds = %lpad27
- %eh_ptr32 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select34 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad35: ; preds = %ppad
- %eh_ptr36 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select38 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr36, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad27, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr28, %lpad27 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 4
- %34 = getelementptr inbounds %struct.GIM_ShapeRetriever* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %34)
- to label %invcont23 unwind label %lpad35
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithm21collide_sat_trianglesEP17btCollisionObjectS1_P22btGImpactMeshShapePartS3_PKii(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactMeshShapePart* %shape0, %struct.btGImpactMeshShapePart* %shape1, i32* nocapture %pairs, i32 %pair_count) align 2 {
-entry:
- %ptri0 = alloca %struct.btPrimitiveTriangle, align 8 ; [#uses=20]
- %ptri1 = alloca %struct.btPrimitiveTriangle, align 8 ; [#uses=20]
- %contact_data = alloca %struct.GIM_TRIANGLE_CONTACT, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=3]
- %12 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=3]
- %20 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=3]
- %22 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- %24 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=3]
- %28 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=3]
- %30 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=3]
- %36 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=3]
- %38 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=3]
- %40 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=3]
- %42 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=3]
- %46 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=3]
- %48 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 2 ; [#uses=1]
- store float 0x3F847AE140000000, float* %48, align 8
- %49 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 2 ; [#uses=1]
- store float 0x3F847AE140000000, float* %49, align 8
- %50 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds i32 (...)** %51, i32 27 ; [#uses=1]
- %53 = load i32 (...)** %52, align 4 ; [#uses=1]
- %54 = bitcast i32 (...)* %53 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- call void %54(%struct.btGImpactMeshShapePart* %shape0)
- %55 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %56 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 27 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = bitcast i32 (...)* %58 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- call void %59(%struct.btGImpactMeshShapePart* %shape1)
- %60 = icmp eq i32 %pair_count, 0 ; [#uses=1]
- br i1 %60, label %bb9, label %bb.nph19
-
-bb.nph19: ; preds = %entry
- %61 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=2]
- %62 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=3]
- %63 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 0 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape1, i32 0, i32 0 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %66 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %67 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %71 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %72 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %75 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %78 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %79 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %80 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %83 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %84 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %86 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %87 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %88 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri0, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btPrimitiveTriangle* %ptri1, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %97 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contact_data, i32 0, i32 1 ; [#uses=1]
- %98 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contact_data, i32 0, i32 0 ; [#uses=1]
- %99 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contact_data, i32 0, i32 2, i32 0 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=4]
- %101 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %104 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %105 = bitcast %struct.btCollisionObject* %body0 to i8* ; [#uses=1]
- %106 = bitcast %struct.btCollisionObject* %body1 to i8* ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7.backedge, %bb.nph19
- %indvar23 = phi i32 [ 0, %bb.nph19 ], [ %indvar.next24, %bb7.backedge ] ; [#uses=2]
- %tmp26 = shl i32 %indvar23, 1 ; [#uses=2]
- %pair_pointer.018 = getelementptr i32* %pairs, i32 %tmp26 ; [#uses=1]
- %tmp2830 = or i32 %tmp26, 1 ; [#uses=1]
- %scevgep29 = getelementptr i32* %pairs, i32 %tmp2830 ; [#uses=1]
- %107 = load i32* %pair_pointer.018, align 4 ; [#uses=2]
- store i32 %107, i32* %61, align 4
- %108 = load i32* %scevgep29, align 4 ; [#uses=1]
- store i32 %108, i32* %62, align 4
- %109 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %110 = getelementptr inbounds i32 (...)** %109, i32 20 ; [#uses=1]
- %111 = load i32 (...)** %110, align 4 ; [#uses=1]
- %112 = bitcast i32 (...)* %111 to %struct.btActionInterface* (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %113 = call %struct.btActionInterface* %112(%struct.btGImpactShapeInterface* %63) ; [#uses=2]
- %114 = getelementptr inbounds %struct.btActionInterface* %113, i32 0, i32 0 ; [#uses=1]
- %115 = load i32 (...)*** %114, align 4 ; [#uses=1]
- %116 = getelementptr inbounds i32 (...)** %115, i32 5 ; [#uses=1]
- %117 = load i32 (...)** %116, align 4 ; [#uses=1]
- %118 = bitcast i32 (...)* %117 to void (%struct.btActionInterface*, i32, %struct.btPrimitiveTriangle*)* ; [#uses=1]
- call void %118(%struct.btActionInterface* %113, i32 %107, %struct.btPrimitiveTriangle* %ptri0)
- %119 = load i32* %62, align 4 ; [#uses=1]
- %120 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %121 = getelementptr inbounds i32 (...)** %120, i32 20 ; [#uses=1]
- %122 = load i32 (...)** %121, align 4 ; [#uses=1]
- %123 = bitcast i32 (...)* %122 to %struct.btActionInterface* (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %124 = call %struct.btActionInterface* %123(%struct.btGImpactShapeInterface* %64) ; [#uses=2]
- %125 = getelementptr inbounds %struct.btActionInterface* %124, i32 0, i32 0 ; [#uses=1]
- %126 = load i32 (...)*** %125, align 4 ; [#uses=1]
- %127 = getelementptr inbounds i32 (...)** %126, i32 5 ; [#uses=1]
- %128 = load i32 (...)** %127, align 4 ; [#uses=1]
- %129 = bitcast i32 (...)* %128 to void (%struct.btActionInterface*, i32, %struct.btPrimitiveTriangle*)* ; [#uses=1]
- call void %129(%struct.btActionInterface* %124, i32 %119, %struct.btPrimitiveTriangle* %ptri1)
- %130 = load float* %65, align 8 ; [#uses=3]
- %131 = fmul float %13, %130 ; [#uses=1]
- %132 = load float* %66, align 4 ; [#uses=3]
- %133 = fmul float %15, %132 ; [#uses=1]
- %134 = fadd float %131, %133 ; [#uses=1]
- %135 = load float* %67, align 8 ; [#uses=3]
- %136 = fmul float %17, %135 ; [#uses=1]
- %137 = fadd float %134, %136 ; [#uses=1]
- %138 = fadd float %137, %23 ; [#uses=4]
- %139 = fmul float %7, %130 ; [#uses=1]
- %140 = fmul float %9, %132 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = fmul float %11, %135 ; [#uses=1]
- %143 = fadd float %141, %142 ; [#uses=1]
- %144 = fadd float %143, %21 ; [#uses=4]
- %145 = fmul float %1, %130 ; [#uses=1]
- %146 = fmul float %3, %132 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=1]
- %148 = fmul float %5, %135 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fadd float %149, %19 ; [#uses=4]
- store float %150, float* %65, align 8
- store float %144, float* %66, align 4
- store float %138, float* %67, align 8
- store float 0.000000e+00, float* %68, align 4
- %151 = load float* %69, align 8 ; [#uses=3]
- %152 = fmul float %13, %151 ; [#uses=1]
- %153 = load float* %70, align 4 ; [#uses=3]
- %154 = fmul float %15, %153 ; [#uses=1]
- %155 = fadd float %152, %154 ; [#uses=1]
- %156 = load float* %71, align 8 ; [#uses=3]
- %157 = fmul float %17, %156 ; [#uses=1]
- %158 = fadd float %155, %157 ; [#uses=1]
- %159 = fadd float %158, %23 ; [#uses=2]
- %160 = fmul float %7, %151 ; [#uses=1]
- %161 = fmul float %9, %153 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fmul float %11, %156 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- %165 = fadd float %164, %21 ; [#uses=2]
- %166 = fmul float %1, %151 ; [#uses=1]
- %167 = fmul float %3, %153 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=1]
- %169 = fmul float %5, %156 ; [#uses=1]
- %170 = fadd float %168, %169 ; [#uses=1]
- %171 = fadd float %170, %19 ; [#uses=2]
- store float %171, float* %69, align 8
- store float %165, float* %70, align 4
- store float %159, float* %71, align 8
- store float 0.000000e+00, float* %72, align 4
- %172 = load float* %73, align 8 ; [#uses=3]
- %173 = fmul float %13, %172 ; [#uses=1]
- %174 = load float* %74, align 4 ; [#uses=3]
- %175 = fmul float %15, %174 ; [#uses=1]
- %176 = fadd float %173, %175 ; [#uses=1]
- %177 = load float* %75, align 8 ; [#uses=3]
- %178 = fmul float %17, %177 ; [#uses=1]
- %179 = fadd float %176, %178 ; [#uses=1]
- %180 = fadd float %179, %23 ; [#uses=2]
- %181 = fmul float %7, %172 ; [#uses=1]
- %182 = fmul float %9, %174 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=1]
- %184 = fmul float %11, %177 ; [#uses=1]
- %185 = fadd float %183, %184 ; [#uses=1]
- %186 = fadd float %185, %21 ; [#uses=2]
- %187 = fmul float %1, %172 ; [#uses=1]
- %188 = fmul float %3, %174 ; [#uses=1]
- %189 = fadd float %187, %188 ; [#uses=1]
- %190 = fmul float %5, %177 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = fadd float %191, %19 ; [#uses=2]
- store float %192, float* %73, align 8
- store float %186, float* %74, align 4
- store float %180, float* %75, align 8
- store float 0.000000e+00, float* %76, align 4
- %193 = load float* %77, align 8 ; [#uses=3]
- %194 = fmul float %37, %193 ; [#uses=1]
- %195 = load float* %78, align 4 ; [#uses=3]
- %196 = fmul float %39, %195 ; [#uses=1]
- %197 = fadd float %194, %196 ; [#uses=1]
- %198 = load float* %79, align 8 ; [#uses=3]
- %199 = fmul float %41, %198 ; [#uses=1]
- %200 = fadd float %197, %199 ; [#uses=1]
- %201 = fadd float %200, %47 ; [#uses=4]
- %202 = fmul float %31, %193 ; [#uses=1]
- %203 = fmul float %33, %195 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=1]
- %205 = fmul float %35, %198 ; [#uses=1]
- %206 = fadd float %204, %205 ; [#uses=1]
- %207 = fadd float %206, %45 ; [#uses=4]
- %208 = fmul float %25, %193 ; [#uses=1]
- %209 = fmul float %27, %195 ; [#uses=1]
- %210 = fadd float %208, %209 ; [#uses=1]
- %211 = fmul float %29, %198 ; [#uses=1]
- %212 = fadd float %210, %211 ; [#uses=1]
- %213 = fadd float %212, %43 ; [#uses=4]
- store float %213, float* %77, align 8
- store float %207, float* %78, align 4
- store float %201, float* %79, align 8
- store float 0.000000e+00, float* %80, align 4
- %214 = load float* %81, align 8 ; [#uses=3]
- %215 = fmul float %37, %214 ; [#uses=1]
- %216 = load float* %82, align 4 ; [#uses=3]
- %217 = fmul float %39, %216 ; [#uses=1]
- %218 = fadd float %215, %217 ; [#uses=1]
- %219 = load float* %83, align 8 ; [#uses=3]
- %220 = fmul float %41, %219 ; [#uses=1]
- %221 = fadd float %218, %220 ; [#uses=1]
- %222 = fadd float %221, %47 ; [#uses=2]
- %223 = fmul float %31, %214 ; [#uses=1]
- %224 = fmul float %33, %216 ; [#uses=1]
- %225 = fadd float %223, %224 ; [#uses=1]
- %226 = fmul float %35, %219 ; [#uses=1]
- %227 = fadd float %225, %226 ; [#uses=1]
- %228 = fadd float %227, %45 ; [#uses=2]
- %229 = fmul float %25, %214 ; [#uses=1]
- %230 = fmul float %27, %216 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = fmul float %29, %219 ; [#uses=1]
- %233 = fadd float %231, %232 ; [#uses=1]
- %234 = fadd float %233, %43 ; [#uses=2]
- store float %234, float* %81, align 8
- store float %228, float* %82, align 4
- store float %222, float* %83, align 8
- store float 0.000000e+00, float* %84, align 4
- %235 = load float* %85, align 8 ; [#uses=3]
- %236 = fmul float %37, %235 ; [#uses=1]
- %237 = load float* %86, align 4 ; [#uses=3]
- %238 = fmul float %39, %237 ; [#uses=1]
- %239 = fadd float %236, %238 ; [#uses=1]
- %240 = load float* %87, align 8 ; [#uses=3]
- %241 = fmul float %41, %240 ; [#uses=1]
- %242 = fadd float %239, %241 ; [#uses=1]
- %243 = fadd float %242, %47 ; [#uses=2]
- %244 = fmul float %31, %235 ; [#uses=1]
- %245 = fmul float %33, %237 ; [#uses=1]
- %246 = fadd float %244, %245 ; [#uses=1]
- %247 = fmul float %35, %240 ; [#uses=1]
- %248 = fadd float %246, %247 ; [#uses=1]
- %249 = fadd float %248, %45 ; [#uses=2]
- %250 = fmul float %25, %235 ; [#uses=1]
- %251 = fmul float %27, %237 ; [#uses=1]
- %252 = fadd float %250, %251 ; [#uses=1]
- %253 = fmul float %29, %240 ; [#uses=1]
- %254 = fadd float %252, %253 ; [#uses=1]
- %255 = fadd float %254, %43 ; [#uses=2]
- store float %255, float* %85, align 8
- store float %249, float* %86, align 4
- store float %243, float* %87, align 8
- store float 0.000000e+00, float* %88, align 4
- %256 = fsub float %180, %138 ; [#uses=2]
- %257 = fsub float %186, %144 ; [#uses=2]
- %258 = fsub float %192, %150 ; [#uses=2]
- %259 = fsub float %159, %138 ; [#uses=2]
- %260 = fsub float %165, %144 ; [#uses=2]
- %261 = fsub float %171, %150 ; [#uses=2]
- %262 = fmul float %261, %257 ; [#uses=1]
- %263 = fmul float %260, %258 ; [#uses=1]
- %264 = fsub float %262, %263 ; [#uses=3]
- %265 = fmul float %259, %258 ; [#uses=1]
- %266 = fmul float %261, %256 ; [#uses=1]
- %267 = fsub float %265, %266 ; [#uses=3]
- %268 = fmul float %260, %256 ; [#uses=1]
- %269 = fmul float %259, %257 ; [#uses=1]
- %270 = fsub float %268, %269 ; [#uses=3]
- %271 = fmul float %270, %270 ; [#uses=1]
- %272 = fmul float %267, %267 ; [#uses=1]
- %273 = fadd float %271, %272 ; [#uses=1]
- %274 = fmul float %264, %264 ; [#uses=1]
- %275 = fadd float %273, %274 ; [#uses=1]
- %276 = call float @sqrtf(float %275) nounwind readonly ; [#uses=1]
- %277 = fdiv float 1.000000e+00, %276 ; [#uses=3]
- %278 = fmul float %270, %277 ; [#uses=2]
- %279 = fmul float %267, %277 ; [#uses=2]
- %280 = fmul float %264, %277 ; [#uses=2]
- %281 = fmul float %150, %278 ; [#uses=1]
- %282 = fmul float %144, %279 ; [#uses=1]
- %283 = fadd float %281, %282 ; [#uses=1]
- %284 = fmul float %138, %280 ; [#uses=1]
- %285 = fadd float %283, %284 ; [#uses=1]
- store float %278, float* %89, align 8
- store float %279, float* %90, align 4
- store float %280, float* %91, align 8
- store float %285, float* %92, align 4
- %286 = fsub float %243, %201 ; [#uses=2]
- %287 = fsub float %249, %207 ; [#uses=2]
- %288 = fsub float %255, %213 ; [#uses=2]
- %289 = fsub float %222, %201 ; [#uses=2]
- %290 = fsub float %228, %207 ; [#uses=2]
- %291 = fsub float %234, %213 ; [#uses=2]
- %292 = fmul float %291, %287 ; [#uses=1]
- %293 = fmul float %290, %288 ; [#uses=1]
- %294 = fsub float %292, %293 ; [#uses=3]
- %295 = fmul float %289, %288 ; [#uses=1]
- %296 = fmul float %291, %286 ; [#uses=1]
- %297 = fsub float %295, %296 ; [#uses=3]
- %298 = fmul float %290, %286 ; [#uses=1]
- %299 = fmul float %289, %287 ; [#uses=1]
- %300 = fsub float %298, %299 ; [#uses=3]
- %301 = fmul float %300, %300 ; [#uses=1]
- %302 = fmul float %297, %297 ; [#uses=1]
- %303 = fadd float %301, %302 ; [#uses=1]
- %304 = fmul float %294, %294 ; [#uses=1]
- %305 = fadd float %303, %304 ; [#uses=1]
- %306 = call float @sqrtf(float %305) nounwind readonly ; [#uses=1]
- %307 = fdiv float 1.000000e+00, %306 ; [#uses=3]
- %308 = fmul float %300, %307 ; [#uses=2]
- %309 = fmul float %297, %307 ; [#uses=2]
- %310 = fmul float %294, %307 ; [#uses=2]
- %311 = fmul float %213, %308 ; [#uses=1]
- %312 = fmul float %207, %309 ; [#uses=1]
- %313 = fadd float %311, %312 ; [#uses=1]
- %314 = fmul float %201, %310 ; [#uses=1]
- %315 = fadd float %313, %314 ; [#uses=1]
- store float %308, float* %93, align 8
- store float %309, float* %94, align 4
- store float %310, float* %95, align 8
- store float %315, float* %96, align 4
- %316 = call zeroext i8 @_ZN19btPrimitiveTriangle25overlap_test_conservativeERKS_(%struct.btPrimitiveTriangle* %ptri0, %struct.btPrimitiveTriangle* %ptri1) ; [#uses=1]
- %toBool = icmp eq i8 %316, 0 ; [#uses=1]
- br i1 %toBool, label %bb7.backedge, label %bb1
-
-bb7.backedge: ; preds = %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit, %bb3, %bb1, %bb
- %indvar.next24 = add i32 %indvar23, 1 ; [#uses=2]
- %exitcond25 = icmp eq i32 %indvar.next24, %pair_count ; [#uses=1]
- br i1 %exitcond25, label %bb9, label %bb
-
-bb1: ; preds = %bb
- %317 = call zeroext i8 @_ZN19btPrimitiveTriangle35find_triangle_collision_clip_methodERS_R20GIM_TRIANGLE_CONTACT(%struct.btPrimitiveTriangle* %ptri0, %struct.btPrimitiveTriangle* %ptri1, %struct.GIM_TRIANGLE_CONTACT* %contact_data) ; [#uses=1]
- %toBool2 = icmp eq i8 %317, 0 ; [#uses=1]
- br i1 %toBool2, label %bb7.backedge, label %bb3
-
-bb3: ; preds = %bb1
- %318 = load i32* %97, align 4 ; [#uses=3]
- %319 = icmp eq i32 %318, 0 ; [#uses=1]
- br i1 %319, label %bb7.backedge, label %bb.nph
-
-bb.nph: ; preds = %bb3
- %tmp20 = shl i32 %318, 2 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit ] ; [#uses=2]
- %tmp = mul i32 %indvar, -4 ; [#uses=1]
- %tmp21 = add i32 %tmp20, %tmp ; [#uses=1]
- %scevgep = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contact_data, i32 0, i32 2, i32 0, i32 0, i32 %tmp21 ; [#uses=1]
- %scevgep22 = bitcast float* %scevgep to %struct.btQuadWord* ; [#uses=1]
- %320 = load float* %98, align 8 ; [#uses=1]
- %321 = fsub float -0.000000e+00, %320 ; [#uses=1]
- %322 = load %struct.btManifoldResult** %100, align 4 ; [#uses=2]
- %323 = getelementptr inbounds %struct.btManifoldResult* %322, i32 0, i32 0, i32 0 ; [#uses=1]
- %324 = load i32 (...)*** %323, align 4 ; [#uses=1]
- %325 = getelementptr inbounds i32 (...)** %324, i32 2 ; [#uses=1]
- %326 = load i32 (...)** %325, align 4 ; [#uses=1]
- %327 = load i32* %61, align 4 ; [#uses=1]
- %328 = load i32* %101, align 4 ; [#uses=1]
- %329 = bitcast i32 (...)* %326 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %329(%struct.btManifoldResult* %322, i32 %328, i32 %327)
- %330 = load %struct.btManifoldResult** %100, align 4 ; [#uses=2]
- %331 = getelementptr inbounds %struct.btManifoldResult* %330, i32 0, i32 0, i32 0 ; [#uses=1]
- %332 = load i32 (...)*** %331, align 4 ; [#uses=1]
- %333 = getelementptr inbounds i32 (...)** %332, i32 3 ; [#uses=1]
- %334 = load i32 (...)** %333, align 4 ; [#uses=1]
- %335 = load i32* %62, align 4 ; [#uses=1]
- %336 = load i32* %102, align 4 ; [#uses=1]
- %337 = bitcast i32 (...)* %334 to void (%struct.btManifoldResult*, i32, i32)* ; [#uses=1]
- call void %337(%struct.btManifoldResult* %330, i32 %336, i32 %335)
- %338 = load %struct.btPersistentManifold** %103, align 4 ; [#uses=2]
- %339 = icmp eq %struct.btPersistentManifold* %338, null ; [#uses=1]
- br i1 %339, label %bb.i.i, label %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit
-
-bb.i.i: ; preds = %bb4
- %340 = load %struct.btActionInterface** %104, align 4 ; [#uses=2]
- %341 = getelementptr inbounds %struct.btActionInterface* %340, i32 0, i32 0 ; [#uses=1]
- %342 = load i32 (...)*** %341, align 4 ; [#uses=1]
- %343 = getelementptr inbounds i32 (...)** %342, i32 3 ; [#uses=1]
- %344 = load i32 (...)** %343, align 4 ; [#uses=1]
- %345 = bitcast i32 (...)* %344 to %struct.btPersistentManifold* (%struct.btActionInterface*, i8*, i8*)* ; [#uses=1]
- %346 = call %struct.btPersistentManifold* %345(%struct.btActionInterface* %340, i8* %105, i8* %106) ; [#uses=2]
- store %struct.btPersistentManifold* %346, %struct.btPersistentManifold** %103, align 4
- br label %_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit
-
-_ZN27btGImpactCollisionAlgorithm15addContactPointEP17btCollisionObjectS1_RK9btVector3S4_f.exit: ; preds = %bb.i.i, %bb4
- %347 = phi %struct.btPersistentManifold* [ %346, %bb.i.i ], [ %338, %bb4 ] ; [#uses=1]
- %348 = load %struct.btManifoldResult** %100, align 4 ; [#uses=1]
- %349 = getelementptr inbounds %struct.btManifoldResult* %348, i32 0, i32 1 ; [#uses=1]
- store %struct.btPersistentManifold* %347, %struct.btPersistentManifold** %349, align 4
- %350 = load %struct.btManifoldResult** %100, align 4 ; [#uses=2]
- %351 = getelementptr inbounds %struct.btManifoldResult* %350, i32 0, i32 0, i32 0 ; [#uses=1]
- %352 = load i32 (...)*** %351, align 4 ; [#uses=1]
- %353 = getelementptr inbounds i32 (...)** %352, i32 4 ; [#uses=1]
- %354 = load i32 (...)** %353, align 4 ; [#uses=1]
- %355 = bitcast i32 (...)* %354 to void (%struct.btManifoldResult*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %355(%struct.btManifoldResult* %350, %struct.btQuadWord* %99, %struct.btQuadWord* %scevgep22, float %321)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %318 ; [#uses=1]
- br i1 %exitcond, label %bb7.backedge, label %bb4
-
-bb9: ; preds = %bb7.backedge, %entry
- %356 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %357 = getelementptr inbounds i32 (...)** %356, i32 28 ; [#uses=1]
- %358 = load i32 (...)** %357, align 4 ; [#uses=1]
- %359 = bitcast i32 (...)* %358 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- call void %359(%struct.btGImpactMeshShapePart* %shape0)
- %360 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %361 = getelementptr inbounds i32 (...)** %360, i32 28 ; [#uses=1]
- %362 = load i32 (...)** %361, align 4 ; [#uses=1]
- %363 = bitcast i32 (...)* %362 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- call void %363(%struct.btGImpactMeshShapePart* %shape1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN27btGImpactCollisionAlgorithm21collide_gjk_trianglesEP17btCollisionObjectS1_P22btGImpactMeshShapePartS3_PKii(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactMeshShapePart* %shape0, %struct.btGImpactMeshShapePart* %shape1, i32* nocapture %pairs, i32 %pair_count) align 2 {
-entry:
- %tri0 = alloca %struct.btTriangleShapeEx, align 8 ; [#uses=9]
- %tri1 = alloca %struct.btTriangleShapeEx, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btTriangleShapeEx* %tri0, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %0)
- %1 = getelementptr inbounds %struct.btTriangleShapeEx* %tri0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btTriangleShapeEx* %tri0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btTriangleShapeEx* %tri0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = bitcast float* %3 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %4, i8 0, i64 48, i32 4, i1 false)
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV17btTriangleShapeEx, i32 0, i32 2), i32 (...)*** %1, align 8
- %5 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %5)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %6 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = bitcast float* %8 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %9, i8 0, i64 48, i32 4, i1 false)
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV17btTriangleShapeEx, i32 0, i32 2), i32 (...)*** %6, align 8
- %10 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 27 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %14(%struct.btGImpactMeshShapePart* %shape0)
- to label %invcont1 unwind label %lpad26
-
-invcont1: ; preds = %invcont
- %15 = getelementptr inbounds %struct.btGImpactMeshShapePart* %shape1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 27 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %19(%struct.btGImpactMeshShapePart* %shape1)
- to label %bb8.preheader unwind label %lpad26
-
-bb8.preheader: ; preds = %invcont1
- %20 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btTriangleShapeEx* %tri0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %tmp44 = add i32 %pair_count, -1 ; [#uses=1]
- br label %bb8
-
-bb: ; preds = %bb8
- %tmp4749 = or i32 %tmp46, 1 ; [#uses=1]
- %pair_pointer.0 = getelementptr i32* %pairs, i32 %tmp46 ; [#uses=1]
- %scevgep = getelementptr i32* %pairs, i32 %tmp4749 ; [#uses=1]
- %24 = load i32* %pair_pointer.0, align 4 ; [#uses=2]
- store i32 %24, i32* %20, align 4
- %25 = load i32* %scevgep, align 4 ; [#uses=1]
- store i32 %25, i32* %21, align 4
- %26 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 25 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %28 to void (%struct.btGImpactMeshShapePart*, i32, %struct.btTriangleShapeEx*)* ; [#uses=1]
- invoke void %29(%struct.btGImpactMeshShapePart* %shape0, i32 %24, %struct.btTriangleShapeEx* %tri0)
- to label %invcont3 unwind label %lpad26
-
-invcont3: ; preds = %bb
- %30 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %31 = getelementptr inbounds i32 (...)** %30, i32 25 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = load i32* %21, align 4 ; [#uses=1]
- %34 = bitcast i32 (...)* %32 to void (%struct.btGImpactMeshShapePart*, i32, %struct.btTriangleShapeEx*)* ; [#uses=1]
- invoke void %34(%struct.btGImpactMeshShapePart* %shape1, i32 %33, %struct.btTriangleShapeEx* %tri1)
- to label %invcont4 unwind label %lpad26
-
-invcont4: ; preds = %invcont3
- %35 = invoke zeroext i8 @_ZN17btTriangleShapeEx25overlap_test_conservativeERKS_(%struct.btTriangleShapeEx* %tri0, %struct.btTriangleShapeEx* %tri1)
- to label %invcont5 unwind label %lpad26 ; [#uses=1]
-
-invcont5: ; preds = %invcont4
- %toBool = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool, label %bb8.backedge, label %bb6
-
-bb6: ; preds = %invcont5
- invoke void @_ZN27btGImpactCollisionAlgorithm26convex_vs_convex_collisionEP17btCollisionObjectS1_P16btCollisionShapeS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btCollisionShape* %22, %struct.btCollisionShape* %23)
- to label %bb8.backedge unwind label %lpad26
-
-bb8.backedge: ; preds = %bb6, %invcont5
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb8.backedge, %bb8.preheader
- %indvar = phi i32 [ %indvar.next, %bb8.backedge ], [ 0, %bb8.preheader ] ; [#uses=3]
- %tmp45 = sub i32 %tmp44, %indvar ; [#uses=1]
- %tmp46 = shl i32 %indvar, 1 ; [#uses=2]
- %36 = icmp eq i32 %tmp45, -1 ; [#uses=1]
- br i1 %36, label %bb10, label %bb
-
-bb10: ; preds = %bb8
- %37 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 28 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %40(%struct.btGImpactMeshShapePart* %shape0)
- to label %invcont11 unwind label %lpad26
-
-invcont11: ; preds = %bb10
- %41 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 28 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = bitcast i32 (...)* %43 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %44(%struct.btGImpactMeshShapePart* %shape1)
- to label %bb16 unwind label %lpad26
-
-bb16: ; preds = %invcont11
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %6, align 8
- %45 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %45)
- to label %bb23 unwind label %lpad
-
-invcont21: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb23: ; preds = %bb16
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %46 = getelementptr inbounds %struct.btTriangleShapeEx* %tri0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %46)
- ret void
-
-lpad: ; preds = %bb16, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select25 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad26: ; preds = %invcont11, %bb10, %bb6, %invcont4, %invcont3, %bb, %invcont1, %invcont
- %eh_ptr27 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select29 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %6, align 8
- %47 = getelementptr inbounds %struct.btTriangleShapeEx* %tri1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %47)
- to label %ppad unwind label %lpad30
-
-lpad30: ; preds = %lpad26
- %eh_ptr31 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select33 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr31, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad34: ; preds = %ppad
- %eh_ptr35 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select37 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr35, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad26, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr27, %lpad26 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %48 = getelementptr inbounds %struct.btTriangleShapeEx* %tri0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %48)
- to label %invcont21 unwind label %lpad34
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithm27gimpact_vs_shape_find_pairsERK11btTransformS2_P23btGImpactShapeInterfaceP16btCollisionShapeR20btAlignedObjectArrayIiE(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btTransform* %trans0, %struct.btTransform* %trans1, %struct.btGImpactShapeInterface* %shape0, %struct.btCollisionShape* %shape1, %"struct.btAlignedObjectArray<int>"* %collided_primitives) align 2 {
-entry:
- %boxshape = alloca %struct.GIM_AABB, align 8 ; [#uses=11]
- %trans1to0 = alloca %struct.btTransform, align 8 ; [#uses=18]
- %boxshape0 = alloca %struct.GIM_AABB, align 8 ; [#uses=8]
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %not..i = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %not..i, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = load float* %9, align 4 ; [#uses=2]
- %13 = load float* %8, align 4 ; [#uses=2]
- %14 = load float* %7, align 4 ; [#uses=2]
- %15 = load float* %6, align 4 ; [#uses=2]
- %16 = load float* %5, align 4 ; [#uses=2]
- %17 = load float* %4, align 4 ; [#uses=2]
- %18 = load float* %3, align 4 ; [#uses=2]
- %19 = load float* %2, align 4 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fsub float -0.000000e+00, %21 ; [#uses=3]
- %23 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fsub float -0.000000e+00, %24 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btTransform* %trans0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fsub float -0.000000e+00, %27 ; [#uses=3]
- %29 = fmul float %17, %28 ; [#uses=1]
- %30 = fmul float %18, %25 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=1]
- %32 = fmul float %19, %22 ; [#uses=1]
- %33 = fadd float %31, %32 ; [#uses=1]
- %34 = fmul float %14, %28 ; [#uses=1]
- %35 = fmul float %15, %25 ; [#uses=1]
- %36 = fadd float %34, %35 ; [#uses=1]
- %37 = fmul float %16, %22 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = fmul float %11, %28 ; [#uses=1]
- %40 = fmul float %12, %25 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = fmul float %13, %22 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %11, float* %44, align 8
- %45 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %45, align 4
- %46 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %13, float* %46, align 8
- %47 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 4
- %48 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %14, float* %48, align 8
- %49 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %15, float* %49, align 4
- %50 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %16, float* %50, align 8
- %51 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 4
- %52 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %52, align 8
- %53 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %18, float* %53, align 4
- %54 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %54, align 8
- %55 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %55, align 4
- %56 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %43, float* %56, align 8
- %57 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %57, align 4
- %58 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %33, float* %58, align 8
- %59 = getelementptr inbounds %struct.btTransform* %trans1to0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %59, align 4
- %60 = call %struct.btTransform* @_ZN11btTransformmLERKS_(%struct.btTransform* %trans1to0, %struct.btTransform* %trans1) nounwind ; [#uses=0]
- %61 = getelementptr inbounds %struct.btCollisionShape* %shape1, i32 0, i32 0 ; [#uses=1]
- %62 = load i32 (...)*** %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds i32 (...)** %62, i32 2 ; [#uses=1]
- %64 = load i32 (...)** %63, align 4 ; [#uses=1]
- %65 = bitcast i32 (...)* %64 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %66 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 0 ; [#uses=1]
- %67 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 1 ; [#uses=1]
- call void %65(%struct.btCollisionShape* %shape1, %struct.btTransform* %trans1to0, %struct.btQuadWord* %66, %struct.btQuadWord* %67)
- %68 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 4 ; [#uses=1]
- %69 = call zeroext i8 @_ZNK21btGImpactQuantizedBvh8boxQueryERK6btAABBR20btAlignedObjectArrayIiE(%struct.btGImpactBoxSet* %68, %struct.GIM_AABB* %boxshape, %"struct.btAlignedObjectArray<int>"* %collided_primitives) ; [#uses=0]
- ret void
-
-bb1: ; preds = %entry
- %70 = getelementptr inbounds %struct.btCollisionShape* %shape1, i32 0, i32 0 ; [#uses=1]
- %71 = load i32 (...)*** %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds i32 (...)** %71, i32 2 ; [#uses=1]
- %73 = load i32 (...)** %72, align 4 ; [#uses=1]
- %74 = bitcast i32 (...)* %73 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %75 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 0 ; [#uses=1]
- %76 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 1 ; [#uses=1]
- call void %74(%struct.btCollisionShape* %shape1, %struct.btTransform* %trans1, %struct.btQuadWord* %75, %struct.btQuadWord* %76)
- %77 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %78 = load i32 (...)*** %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds i32 (...)** %78, i32 21 ; [#uses=1]
- %80 = load i32 (...)** %79, align 4 ; [#uses=1]
- %81 = bitcast i32 (...)* %80 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %82 = call i32 %81(%struct.btGImpactShapeInterface* %shape0) ; [#uses=3]
- %83 = icmp eq i32 %82, 0 ; [#uses=1]
- br i1 %83, label %return, label %bb.nph
-
-bb.nph: ; preds = %bb1
- %84 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0 ; [#uses=1]
- %85 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1 ; [#uses=1]
- %86 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %89 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %90 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %91 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %93 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %94 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %95 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %96 = getelementptr inbounds %struct.GIM_AABB* %boxshape, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %97 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %98 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_primitives, i32 0, i32 1 ; [#uses=5]
- %99 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_primitives, i32 0, i32 2 ; [#uses=2]
- %100 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_primitives, i32 0, i32 3 ; [#uses=5]
- %101 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_primitives, i32 0, i32 4 ; [#uses=2]
- %tmp13 = add i32 %82, -1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb5.backedge, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb5.backedge ] ; [#uses=2]
- %tmp14 = sub i32 %tmp13, %indvar ; [#uses=2]
- %102 = load i32 (...)*** %77, align 4 ; [#uses=1]
- %103 = getelementptr inbounds i32 (...)** %102, i32 29 ; [#uses=1]
- %104 = load i32 (...)** %103, align 4 ; [#uses=1]
- %105 = bitcast i32 (...)* %104 to void (%struct.btGImpactShapeInterface*, i32, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %105(%struct.btGImpactShapeInterface* %shape0, i32 %tmp14, %struct.btTransform* %trans0, %struct.btQuadWord* %84, %struct.btQuadWord* %85)
- %106 = load float* %86, align 8 ; [#uses=1]
- %107 = load float* %87, align 8 ; [#uses=1]
- %108 = fcmp ogt float %106, %107 ; [#uses=1]
- br i1 %108, label %bb5.backedge, label %bb.i8
-
-bb.i8: ; preds = %bb2
- %109 = load float* %88, align 8 ; [#uses=1]
- %110 = load float* %89, align 8 ; [#uses=1]
- %111 = fcmp olt float %109, %110 ; [#uses=1]
- br i1 %111, label %bb5.backedge, label %bb1.i9
-
-bb1.i9: ; preds = %bb.i8
- %112 = load float* %90, align 4 ; [#uses=1]
- %113 = load float* %91, align 4 ; [#uses=1]
- %114 = fcmp ogt float %112, %113 ; [#uses=1]
- br i1 %114, label %bb5.backedge, label %bb2.i10
-
-bb2.i10: ; preds = %bb1.i9
- %115 = load float* %92, align 4 ; [#uses=1]
- %116 = load float* %93, align 4 ; [#uses=1]
- %117 = fcmp olt float %115, %116 ; [#uses=1]
- br i1 %117, label %bb5.backedge, label %bb3.i
-
-bb3.i: ; preds = %bb2.i10
- %118 = load float* %94, align 8 ; [#uses=1]
- %119 = load float* %95, align 8 ; [#uses=1]
- %120 = fcmp ogt float %118, %119 ; [#uses=1]
- br i1 %120, label %bb5.backedge, label %_ZNK6btAABB13has_collisionERKS_.exit
-
-_ZNK6btAABB13has_collisionERKS_.exit: ; preds = %bb3.i
- %121 = load float* %96, align 8 ; [#uses=1]
- %122 = load float* %97, align 8 ; [#uses=1]
- %phitmp = fcmp olt float %121, %122 ; [#uses=1]
- br i1 %phitmp, label %bb5.backedge, label %bb4
-
-bb4: ; preds = %_ZNK6btAABB13has_collisionERKS_.exit
- %123 = load i32* %98, align 4 ; [#uses=6]
- %124 = load i32* %99, align 4 ; [#uses=2]
- %125 = icmp eq i32 %124, %123 ; [#uses=1]
- br i1 %125, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb4
- %126 = icmp eq i32 %123, 0 ; [#uses=1]
- %127 = shl i32 %123, 1 ; [#uses=1]
- %iftmp.488.0.i.i = select i1 %126, i32 1, i32 %127 ; [#uses=4]
- %128 = icmp slt i32 %124, %iftmp.488.0.i.i ; [#uses=1]
- br i1 %128, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %129 = icmp eq i32 %iftmp.488.0.i.i, 0 ; [#uses=1]
- br i1 %129, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %130 = shl i32 %iftmp.488.0.i.i, 2 ; [#uses=1]
- %131 = call i8* @_Z22btAlignedAllocInternalji(i32 %130, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %131 to i32* ; [#uses=1]
- %.pre.i = load i32* %98, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %132 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %123, %bb.i.i ] ; [#uses=2]
- %133 = phi i32* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %134 = icmp sgt i32 %132, 0 ; [#uses=1]
- br i1 %134, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr i32* %133, i32 %indvar.i.i.i ; [#uses=2]
- %135 = icmp eq i32* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %135, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %136 = load i32** %100, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr i32* %136, i32 %indvar.i.i.i ; [#uses=1]
- %137 = load i32* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store i32 %137, i32* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %132 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %138 = load i32** %100, align 4 ; [#uses=2]
- %139 = icmp eq i32* %138, null ; [#uses=1]
- br i1 %139, label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- %140 = load i8* %101, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %140, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %141 = bitcast i32* %138 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %141)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %100, align 4
- br label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- store i8 1, i8* %101, align 4
- store i32* %133, i32** %100, align 4
- store i32 %iftmp.488.0.i.i, i32* %99, align 4
- %.pre5.i = load i32* %98, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, %bb.i, %bb4
- %142 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i ], [ %123, %bb4 ], [ %123, %bb.i ] ; [#uses=2]
- %143 = load i32** %100, align 4 ; [#uses=1]
- %144 = getelementptr inbounds i32* %143, i32 %142 ; [#uses=2]
- %145 = icmp eq i32* %144, null ; [#uses=1]
- br i1 %145, label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 %tmp14, i32* %144, align 4
- %.pre6.i = load i32* %98, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit
-
-_ZN20btAlignedObjectArrayIiE9push_backERKi.exit: ; preds = %bb2.i, %bb1.i
- %146 = phi i32 [ %142, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %147 = add nsw i32 %146, 1 ; [#uses=1]
- store i32 %147, i32* %98, align 4
- br label %bb5.backedge
-
-bb5.backedge: ; preds = %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, %_ZNK6btAABB13has_collisionERKS_.exit, %bb3.i, %bb2.i10, %bb1.i9, %bb.i8, %bb2
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond12 = icmp eq i32 %indvar.next, %82 ; [#uses=1]
- br i1 %exitcond12, label %return, label %bb2
-
-return: ; preds = %bb5.backedge, %bb1
- ret void
-}
-
-; [#uses=5]
-define void @_ZN27btGImpactCollisionAlgorithm16gimpact_vs_shapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP16btCollisionShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btCollisionShape* %shape1, i8 zeroext %swapped) align 2 {
-entry:
- %0 = alloca %struct.btTransform, align 8 ; [#uses=13]
- %orgtrans0 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %orgtrans1 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %collided_results = alloca %"struct.btAlignedObjectArray<int>", align 8 ; [#uses=5]
- %retriever0 = alloca %struct.GIM_ShapeRetriever, align 8 ; [#uses=20]
- %1 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 19 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %6 = call i32 %5(%struct.btGImpactShapeInterface* %shape0) ; [#uses=1]
- %7 = icmp eq i32 %6, 2 ; [#uses=1]
- br i1 %7, label %bb, label %bb8
-
-bb: ; preds = %entry
- %toBool1 = icmp eq i8 %swapped, 0 ; [#uses=1]
- br i1 %toBool1, label %bb3, label %bb2
-
-bb2: ; preds = %bb
- %8 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- br label %bb4
-
-bb3: ; preds = %bb
- %9 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %iftmp.407.0 = phi i32* [ %8, %bb2 ], [ %9, %bb3 ] ; [#uses=3]
- %10 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = bitcast i8** %10 to i32* ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = add nsw i32 %12, -1 ; [#uses=3]
- store i32 %13, i32* %iftmp.407.0, align 4
- %14 = icmp eq i32 %13, -1 ; [#uses=1]
- br i1 %14, label %_ZN20btAlignedObjectArrayIiED1Ev.exit87, label %bb.nph
-
-bb.nph: ; preds = %bb4
- %15 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 1, i32 1 ; [#uses=1]
- %16 = bitcast %struct.GIM_AABB* %15 to %struct.btGImpactMeshShapePart*** ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb5, %bb.nph
- %17 = phi i32 [ %13, %bb.nph ], [ %23, %bb5 ] ; [#uses=1]
- %18 = load %struct.btGImpactMeshShapePart*** %16, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btGImpactMeshShapePart** %18, i32 %17 ; [#uses=1]
- %20 = load %struct.btGImpactMeshShapePart** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btGImpactMeshShapePart* %20, i32 0, i32 0 ; [#uses=1]
- call void @_ZN27btGImpactCollisionAlgorithm16gimpact_vs_shapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP16btCollisionShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %21, %struct.btCollisionShape* %shape1, i8 zeroext %swapped)
- %22 = load i32* %iftmp.407.0, align 4 ; [#uses=1]
- %23 = add nsw i32 %22, -1 ; [#uses=3]
- store i32 %23, i32* %iftmp.407.0, align 4
- %24 = icmp eq i32 %23, -1 ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayIiED1Ev.exit87, label %bb5
-
-bb8: ; preds = %entry
- %25 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32 (...)** %25, i32 19 ; [#uses=1]
- %27 = load i32 (...)** %26, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %27 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %29 = call i32 %28(%struct.btGImpactShapeInterface* %shape0) ; [#uses=1]
- %30 = icmp eq i32 %29, 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btCollisionShape* %shape1, i32 0, i32 1 ; [#uses=1]
- %32 = load i32* %31, align 4 ; [#uses=3]
- %33 = icmp eq i32 %32, 28 ; [#uses=1]
- %or.cond = and i1 %30, %33 ; [#uses=1]
- br i1 %or.cond, label %bb14, label %bb11
-
-bb11: ; preds = %bb8
- %34 = icmp eq i32 %32, 31 ; [#uses=1]
- br i1 %34, label %bb17, label %bb18
-
-bb14: ; preds = %bb8
- %35 = bitcast %struct.btGImpactShapeInterface* %shape0 to %struct.btGImpactMeshShapePart* ; [#uses=1]
- %36 = bitcast %struct.btCollisionShape* %shape1 to %struct.btStaticPlaneShape* ; [#uses=1]
- call void @_ZN27btGImpactCollisionAlgorithm37gimpacttrimeshpart_vs_plane_collisionEP17btCollisionObjectS1_P22btGImpactMeshShapePartP18btStaticPlaneShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactMeshShapePart* %35, %struct.btStaticPlaneShape* %36, i8 zeroext %swapped)
- ret void
-
-bb17: ; preds = %bb11
- %37 = bitcast %struct.btCollisionShape* %shape1 to %struct.btCompoundShape* ; [#uses=1]
- call void @_ZN27btGImpactCollisionAlgorithm24gimpact_vs_compoundshapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP15btCompoundShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btCompoundShape* %37, i8 zeroext %swapped)
- ret void
-
-bb18: ; preds = %bb11
- %38 = add i32 %32, -21 ; [#uses=1]
- %39 = icmp ult i32 %38, 9 ; [#uses=1]
- br i1 %39, label %bb20, label %bb21
-
-bb20: ; preds = %bb18
- %40 = bitcast %struct.btCollisionShape* %shape1 to %struct.btConcaveShape* ; [#uses=1]
- call void @_ZN27btGImpactCollisionAlgorithm18gimpact_vs_concaveEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP14btConcaveShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btConcaveShape* %40, i8 zeroext %swapped)
- ret void
-
-bb21: ; preds = %bb18
- %41 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %42 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 8
- %44 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %45 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %48 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 8
- %50 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %51 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %54 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 8
- %56 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %57 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %60 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 8
- %62 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %63 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %66 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 8
- %68 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %69 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %72 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 8
- %74 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %75 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %78 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 8
- %80 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %81 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %84 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 8
- %86 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %87 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=3]
- %88 = load float* %87, align 4 ; [#uses=1]
- store float %88, float* %86, align 4
- %89 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- store float %91, float* %89, align 8
- %92 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- store float %94, float* %92, align 4
- %95 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- store float %97, float* %95, align 8
- %98 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=1]
- store float %100, float* %98, align 4
- %101 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=1]
- store float %103, float* %101, align 8
- %104 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- store float %106, float* %104, align 4
- %107 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- store float %109, float* %107, align 8
- %110 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- store float %112, float* %110, align 4
- %113 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- store float %115, float* %113, align 8
- %116 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- store float %118, float* %116, align 4
- %119 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- store float %121, float* %119, align 8
- %122 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- store float %124, float* %122, align 4
- %125 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=1]
- store float %127, float* %125, align 8
- %128 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- store float %130, float* %128, align 4
- %131 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- store float %133, float* %131, align 8
- %134 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- store float %136, float* %134, align 4
- %137 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 4 ; [#uses=4]
- store i8 1, i8* %137, align 8
- %138 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 3 ; [#uses=7]
- store i32* null, i32** %138, align 4
- %139 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=4]
- store i32 0, i32* %139, align 4
- %140 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %140, align 8
- invoke void @_ZN27btGImpactCollisionAlgorithm27gimpact_vs_shape_find_pairsERK11btTransformS2_P23btGImpactShapeInterfaceP16btCollisionShapeR20btAlignedObjectArrayIiE(%struct.btGImpactCollisionAlgorithm* %this, %struct.btTransform* %orgtrans0, %struct.btTransform* %orgtrans1, %struct.btGImpactShapeInterface* %shape0, %struct.btCollisionShape* %shape1, %"struct.btAlignedObjectArray<int>"* %collided_results)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb21
- %141 = load i32* %139, align 4 ; [#uses=1]
- %142 = icmp eq i32 %141, 0 ; [#uses=1]
- br i1 %142, label %bb61, label %bb24
-
-bb24: ; preds = %invcont
- %143 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %144 = getelementptr inbounds i32 (...)** %143, i32 27 ; [#uses=1]
- %145 = load i32 (...)** %144, align 4 ; [#uses=1]
- %146 = bitcast i32 (...)* %145 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- invoke void %146(%struct.btGImpactShapeInterface* %shape0)
- to label %invcont25 unwind label %lpad
-
-invcont25: ; preds = %bb24
- invoke void @_ZN18GIM_ShapeRetrieverC2EP23btGImpactShapeInterface(%struct.GIM_ShapeRetriever* %retriever0, %struct.btGImpactShapeInterface* %shape0)
- to label %invcont26 unwind label %lpad
-
-invcont26: ; preds = %invcont25
- %147 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %148 = getelementptr inbounds i32 (...)** %147, i32 22 ; [#uses=1]
- %149 = load i32 (...)** %148, align 4 ; [#uses=1]
- %150 = bitcast i32 (...)* %149 to i8 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %151 = invoke zeroext i8 %150(%struct.btGImpactShapeInterface* %shape0)
- to label %invcont27 unwind label %lpad65 ; [#uses=1]
-
-invcont27: ; preds = %invcont26
- %152 = load i32* %139, align 4 ; [#uses=1]
- %toBool29 = icmp eq i8 %swapped, 0 ; [#uses=2]
- %153 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- %154 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 6 ; [#uses=1]
- %toBool34 = icmp eq i8 %151, 0 ; [#uses=2]
- %155 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- %tmp106 = add i32 %152, -1 ; [#uses=1]
- br label %bb47
-
-bb28: ; preds = %bb47
- %168 = load i32** %138, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %168, i32 %tmp107 ; [#uses=1]
- %169 = load i32* %scevgep, align 4 ; [#uses=4]
- br i1 %toBool29, label %bb31, label %bb30
-
-bb30: ; preds = %bb28
- store i32 %169, i32* %167, align 4
- br label %bb32
-
-bb31: ; preds = %bb28
- store i32 %169, i32* %153, align 4
- br label %bb32
-
-bb32: ; preds = %bb31, %bb30
- %170 = load %"struct.GIM_ShapeRetriever::ChildShapeRetriever"** %154, align 4 ; [#uses=2]
- %171 = getelementptr inbounds %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %170, i32 0, i32 0 ; [#uses=1]
- %172 = load i32 (...)*** %171, align 4 ; [#uses=1]
- %173 = load i32 (...)** %172, align 4 ; [#uses=1]
- %174 = bitcast i32 (...)* %173 to %struct.btCollisionShape* (%"struct.GIM_ShapeRetriever::ChildShapeRetriever"*, i32)* ; [#uses=1]
- %175 = invoke %struct.btCollisionShape* %174(%"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %170, i32 %169)
- to label %invcont33 unwind label %lpad65 ; [#uses=2]
-
-invcont33: ; preds = %bb32
- br i1 %toBool34, label %bb38, label %bb35
-
-bb35: ; preds = %invcont33
- %176 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %177 = getelementptr inbounds i32 (...)** %176, i32 32 ; [#uses=1]
- %178 = load i32 (...)** %177, align 4 ; [#uses=1]
- %179 = bitcast i32 (...)* %178 to void (%struct.btTransform*, %struct.btGImpactShapeInterface*, i32)* ; [#uses=1]
- invoke void %179(%struct.btTransform* noalias sret %0, %struct.btGImpactShapeInterface* %shape0, i32 %169)
- to label %invcont37 unwind label %lpad65
-
-invcont37: ; preds = %bb35
- %180 = load float* %65, align 8 ; [#uses=4]
- %181 = load float* %155, align 8 ; [#uses=3]
- %182 = load float* %68, align 4 ; [#uses=4]
- %183 = load float* %156, align 4 ; [#uses=3]
- %184 = load float* %71, align 8 ; [#uses=4]
- %185 = load float* %157, align 8 ; [#uses=3]
- %186 = load float* %53, align 8 ; [#uses=4]
- %187 = load float* %56, align 4 ; [#uses=4]
- %188 = load float* %59, align 8 ; [#uses=4]
- %189 = load float* %41, align 8 ; [#uses=4]
- %190 = load float* %44, align 4 ; [#uses=4]
- %191 = load float* %47, align 8 ; [#uses=4]
- %192 = load float* %158, align 8 ; [#uses=3]
- %193 = load float* %159, align 8 ; [#uses=3]
- %194 = load float* %160, align 8 ; [#uses=3]
- %195 = load float* %161, align 4 ; [#uses=3]
- %196 = load float* %162, align 4 ; [#uses=3]
- %197 = load float* %163, align 4 ; [#uses=3]
- %198 = load float* %164, align 8 ; [#uses=3]
- %199 = load float* %165, align 8 ; [#uses=3]
- %200 = load float* %166, align 8 ; [#uses=3]
- %201 = fmul float %190, %183 ; [#uses=1]
- %202 = fmul float %189, %181 ; [#uses=1]
- %203 = fmul float %187, %183 ; [#uses=1]
- %204 = fmul float %186, %181 ; [#uses=1]
- %205 = fmul float %182, %183 ; [#uses=1]
- %206 = fmul float %180, %181 ; [#uses=1]
- %207 = fmul float %199, %190 ; [#uses=1]
- %208 = fmul float %198, %189 ; [#uses=1]
- %209 = fmul float %196, %190 ; [#uses=1]
- %210 = fmul float %195, %189 ; [#uses=1]
- %211 = fmul float %193, %190 ; [#uses=1]
- %212 = fmul float %192, %189 ; [#uses=1]
- %213 = fmul float %199, %187 ; [#uses=1]
- %214 = fmul float %198, %186 ; [#uses=1]
- %215 = fmul float %196, %187 ; [#uses=1]
- %216 = fmul float %195, %186 ; [#uses=1]
- %217 = fmul float %193, %187 ; [#uses=1]
- %218 = fmul float %192, %186 ; [#uses=1]
- %219 = fmul float %199, %182 ; [#uses=1]
- %220 = fmul float %198, %180 ; [#uses=1]
- %221 = fmul float %196, %182 ; [#uses=1]
- %222 = fmul float %195, %180 ; [#uses=1]
- %223 = fmul float %193, %182 ; [#uses=1]
- %224 = fmul float %192, %180 ; [#uses=1]
- %225 = fmul float %191, %185 ; [#uses=1]
- %226 = fadd float %202, %201 ; [#uses=1]
- %227 = fmul float %188, %185 ; [#uses=1]
- %228 = fadd float %204, %203 ; [#uses=1]
- %229 = fmul float %184, %185 ; [#uses=1]
- %230 = fadd float %206, %205 ; [#uses=1]
- %231 = fmul float %200, %191 ; [#uses=1]
- %232 = fadd float %208, %207 ; [#uses=1]
- %233 = fmul float %197, %191 ; [#uses=1]
- %234 = fadd float %210, %209 ; [#uses=1]
- %235 = fmul float %194, %191 ; [#uses=1]
- %236 = fadd float %212, %211 ; [#uses=1]
- %237 = fmul float %200, %188 ; [#uses=1]
- %238 = fadd float %214, %213 ; [#uses=1]
- %239 = fmul float %197, %188 ; [#uses=1]
- %240 = fadd float %216, %215 ; [#uses=1]
- %241 = fmul float %194, %188 ; [#uses=1]
- %242 = fadd float %218, %217 ; [#uses=1]
- %243 = fmul float %200, %184 ; [#uses=1]
- %244 = fadd float %220, %219 ; [#uses=1]
- %245 = fmul float %197, %184 ; [#uses=1]
- %246 = fadd float %222, %221 ; [#uses=1]
- %247 = fmul float %194, %184 ; [#uses=1]
- %248 = fadd float %224, %223 ; [#uses=1]
- %249 = load float* %77, align 8 ; [#uses=1]
- %250 = fadd float %226, %225 ; [#uses=1]
- %251 = load float* %80, align 4 ; [#uses=1]
- %252 = fadd float %228, %227 ; [#uses=1]
- %253 = load float* %83, align 8 ; [#uses=1]
- %254 = fadd float %230, %229 ; [#uses=1]
- %255 = fadd float %232, %231 ; [#uses=1]
- %256 = fadd float %234, %233 ; [#uses=1]
- %257 = fadd float %236, %235 ; [#uses=1]
- %258 = fadd float %238, %237 ; [#uses=1]
- %259 = fadd float %240, %239 ; [#uses=1]
- %260 = fadd float %242, %241 ; [#uses=1]
- %261 = fadd float %244, %243 ; [#uses=1]
- %262 = fadd float %246, %245 ; [#uses=1]
- %263 = fadd float %248, %247 ; [#uses=1]
- %264 = fadd float %250, %249 ; [#uses=1]
- %265 = fadd float %252, %251 ; [#uses=1]
- %266 = fadd float %254, %253 ; [#uses=1]
- store float %255, float* %42, align 4
- store float %256, float* %45, align 4
- store float %257, float* %48, align 4
- store float 0.000000e+00, float* %51, align 4
- store float %258, float* %54, align 4
- store float %259, float* %57, align 4
- store float %260, float* %60, align 4
- store float 0.000000e+00, float* %63, align 4
- store float %261, float* %66, align 4
- store float %262, float* %69, align 4
- store float %263, float* %72, align 4
- store float 0.000000e+00, float* %75, align 4
- store float %264, float* %78, align 4
- store float %265, float* %81, align 4
- store float %266, float* %84, align 4
- store float 0.000000e+00, float* %87, align 4
- br label %bb38
-
-bb38: ; preds = %invcont37, %invcont33
- br i1 %toBool29, label %bb42, label %bb40
-
-bb40: ; preds = %bb38
- invoke void @_ZN27btGImpactCollisionAlgorithm24shape_vs_shape_collisionEP17btCollisionObjectS1_P16btCollisionShapeS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0, %struct.btCollisionShape* %shape1, %struct.btCollisionShape* %175)
- to label %bb44 unwind label %lpad65
-
-bb42: ; preds = %bb38
- invoke void @_ZN27btGImpactCollisionAlgorithm24shape_vs_shape_collisionEP17btCollisionObjectS1_P16btCollisionShapeS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btCollisionShape* %175, %struct.btCollisionShape* %shape1)
- to label %bb44 unwind label %lpad65
-
-bb44: ; preds = %bb42, %bb40
- br i1 %toBool34, label %bb47.backedge, label %bb46
-
-bb46: ; preds = %bb44
- %267 = load float* %41, align 8 ; [#uses=1]
- store float %267, float* %42, align 4
- %268 = load float* %44, align 4 ; [#uses=1]
- store float %268, float* %45, align 4
- %269 = load float* %47, align 8 ; [#uses=1]
- store float %269, float* %48, align 4
- %270 = load float* %50, align 4 ; [#uses=1]
- store float %270, float* %51, align 4
- %271 = load float* %53, align 8 ; [#uses=1]
- store float %271, float* %54, align 4
- %272 = load float* %56, align 4 ; [#uses=1]
- store float %272, float* %57, align 4
- %273 = load float* %59, align 8 ; [#uses=1]
- store float %273, float* %60, align 4
- %274 = load float* %62, align 4 ; [#uses=1]
- store float %274, float* %63, align 4
- %275 = load float* %65, align 8 ; [#uses=1]
- store float %275, float* %66, align 4
- %276 = load float* %68, align 4 ; [#uses=1]
- store float %276, float* %69, align 4
- %277 = load float* %71, align 8 ; [#uses=1]
- store float %277, float* %72, align 4
- %278 = load float* %74, align 4 ; [#uses=1]
- store float %278, float* %75, align 4
- %279 = load float* %77, align 8 ; [#uses=1]
- store float %279, float* %78, align 4
- %280 = load float* %80, align 4 ; [#uses=1]
- store float %280, float* %81, align 4
- %281 = load float* %83, align 8 ; [#uses=1]
- store float %281, float* %84, align 4
- %282 = load float* %86, align 4 ; [#uses=1]
- store float %282, float* %87, align 4
- br label %bb47.backedge
-
-bb47.backedge: ; preds = %bb46, %bb44
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb47
-
-bb47: ; preds = %bb47.backedge, %invcont27
- %indvar = phi i32 [ %indvar.next, %bb47.backedge ], [ 0, %invcont27 ] ; [#uses=2]
- %tmp107 = sub i32 %tmp106, %indvar ; [#uses=2]
- %283 = icmp eq i32 %tmp107, -1 ; [#uses=1]
- br i1 %283, label %bb49, label %bb28
-
-bb49: ; preds = %bb47
- %284 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %285 = getelementptr inbounds i32 (...)** %284, i32 28 ; [#uses=1]
- %286 = load i32 (...)** %285, align 4 ; [#uses=1]
- %287 = bitcast i32 (...)* %286 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- invoke void %287(%struct.btGImpactShapeInterface* %shape0)
- to label %bb54 unwind label %lpad65
-
-bb54: ; preds = %bb49
- %288 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %288, align 4
- %289 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %289, align 4
- %290 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %290, align 4
- %291 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %291, align 8
- %292 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %292)
- to label %bb3.i92 unwind label %lpad.i95
-
-invcont1.i91: ; preds = %lpad.i95
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i93)
- to label %.noexc99 unwind label %lpad
-
-.noexc99: ; preds = %invcont1.i91
- unreachable
-
-bb3.i92: ; preds = %bb54
- %293 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %293, align 4
- %294 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %294)
- to label %bb61 unwind label %lpad
-
-lpad.i95: ; preds = %bb54
- %eh_ptr.i93 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6.i94 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i93, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %295 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %295, align 4
- %296 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %296)
- to label %invcont1.i91 unwind label %lpad7.i98
-
-lpad7.i98: ; preds = %lpad.i95
- %eh_ptr8.i96 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10.i97 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8.i96, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-invcont59: ; preds = %bb2.i.i.i, %ppad
- store i8 1, i8* %137, align 8
- store i32* null, i32** %138, align 4
- store i32 0, i32* %139, align 4
- store i32 0, i32* %140, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb61: ; preds = %bb3.i92, %invcont
- %297 = load i32** %138, align 4 ; [#uses=2]
- %298 = icmp eq i32* %297, null ; [#uses=1]
- br i1 %298, label %_ZN20btAlignedObjectArrayIiED1Ev.exit87, label %bb.i.i.i84
-
-bb.i.i.i84: ; preds = %bb61
- %299 = load i8* %137, align 8 ; [#uses=1]
- %toBool.i.i.i83 = icmp eq i8 %299, 0 ; [#uses=1]
- br i1 %toBool.i.i.i83, label %bb2.i.i.i86, label %bb1.i.i.i85
-
-bb1.i.i.i85: ; preds = %bb.i.i.i84
- %300 = bitcast i32* %297 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %300)
- br label %bb2.i.i.i86
-
-bb2.i.i.i86: ; preds = %bb1.i.i.i85, %bb.i.i.i84
- store i32* null, i32** %138, align 4
- ret void
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit87: ; preds = %bb61, %bb5, %bb4
- ret void
-
-lpad: ; preds = %bb3.i92, %invcont1.i91, %invcont25, %bb24, %bb21
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select64 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad65: ; preds = %bb49, %bb42, %bb40, %bb35, %bb32, %invcont26
- %eh_ptr66 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select68 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr66, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %301 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %301, align 4
- %302 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %302, align 4
- %303 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %303, align 4
- %304 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %304, align 8
- %305 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %305)
- to label %bb3.i unwind label %lpad.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc81 unwind label %lpad69
-
-.noexc81: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %lpad65
- %306 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %306, align 4
- %307 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %307)
- to label %ppad unwind label %lpad69
-
-lpad.i: ; preds = %lpad65
- %eh_ptr.i = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6.i = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %308 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %308, align 4
- %309 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %309)
- to label %invcont1.i unwind label %lpad7.i
-
-lpad7.i: ; preds = %lpad.i
- %eh_ptr8.i = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10.i = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad69: ; preds = %bb3.i, %invcont1.i
- %eh_ptr70 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select72 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr70, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad73: ; preds = %bb1.i.i.i
- %eh_ptr74 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select76 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr74, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb3.i, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr66, %bb3.i ] ; [#uses=1]
- %310 = load i32** %138, align 4 ; [#uses=2]
- %311 = icmp eq i32* %310, null ; [#uses=1]
- br i1 %311, label %invcont59, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad
- %312 = load i8* %137, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %312, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %313 = bitcast i32* %310 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %313)
- to label %bb2.i.i.i unwind label %lpad73
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %138, align 4
- br label %invcont59
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithm24gimpact_vs_compoundshapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP15btCompoundShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btCompoundShape* nocapture %shape1, i8 zeroext %swapped) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load float* %0, align 4 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %3 = load float* %2, align 4 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %5 = load float* %4, align 4 ; [#uses=5]
- %6 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %9 = load float* %8, align 4 ; [#uses=5]
- %10 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %11 = load float* %10, align 4 ; [#uses=5]
- %12 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %13 = load float* %12, align 4 ; [#uses=5]
- %14 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %17 = load float* %16, align 4 ; [#uses=5]
- %18 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %19 = load float* %18, align 4 ; [#uses=5]
- %20 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %21 = load float* %20, align 4 ; [#uses=5]
- %22 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %27 = load float* %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=3]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCompoundShape* %shape1, i32 0, i32 1, i32 1 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=4]
- %34 = icmp eq i32 %33, 0 ; [#uses=1]
- br i1 %34, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %35 = getelementptr inbounds %struct.btCompoundShape* %shape1, i32 0, i32 1, i32 3 ; [#uses=1]
- %tmp25 = add i32 %33, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=3]
- %tmp13 = sub i32 %33, %indvar ; [#uses=12]
- %tmp26 = sub i32 %tmp25, %indvar ; [#uses=1]
- %36 = load %struct.btCompoundShapeChild** %35, align 4 ; [#uses=13]
- %scevgep = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -1 ; [#uses=1]
- %scevgep14 = bitcast %struct.btQuadWord* %scevgep to %struct.btCollisionShape** ; [#uses=1]
- %37 = load %struct.btCollisionShape** %scevgep14, align 4 ; [#uses=1]
- %scevgep1516 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -2, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %scevgep1516, align 4 ; [#uses=3]
- %39 = fmul float %17, %38 ; [#uses=1]
- %scevgep17 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -1, i32 0, i32 -3 ; [#uses=1]
- %40 = load float* %scevgep17, align 4 ; [#uses=3]
- %41 = fmul float %19, %40 ; [#uses=1]
- %42 = fadd float %39, %41 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -1, i32 0, i32 -2 ; [#uses=1]
- %43 = load float* %scevgep18, align 4 ; [#uses=3]
- %44 = fmul float %21, %43 ; [#uses=1]
- %45 = fadd float %42, %44 ; [#uses=1]
- %46 = fadd float %45, %29 ; [#uses=1]
- %47 = fmul float %9, %38 ; [#uses=1]
- %48 = fmul float %11, %40 ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=1]
- %50 = fmul float %13, %43 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fadd float %51, %27 ; [#uses=1]
- %53 = fmul float %1, %38 ; [#uses=1]
- %54 = fmul float %3, %40 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %5, %43 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=1]
- %58 = fadd float %57, %25 ; [#uses=1]
- %scevgep19 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -4, i32 0, i32 -2 ; [#uses=1]
- %59 = load float* %scevgep19, align 4 ; [#uses=3]
- %60 = fmul float %59, %17 ; [#uses=1]
- %scevgep20 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -3, i32 0, i32 -2 ; [#uses=1]
- %61 = load float* %scevgep20, align 4 ; [#uses=3]
- %62 = fmul float %61, %19 ; [#uses=1]
- %63 = fadd float %60, %62 ; [#uses=1]
- %scevgep21 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -2, i32 0, i32 -2 ; [#uses=1]
- %64 = load float* %scevgep21, align 4 ; [#uses=3]
- %65 = fmul float %64, %21 ; [#uses=1]
- %66 = fadd float %63, %65 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -4, i32 0, i32 -3 ; [#uses=1]
- %67 = load float* %scevgep22, align 4 ; [#uses=3]
- %68 = fmul float %67, %17 ; [#uses=1]
- %scevgep23 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -3, i32 0, i32 -3 ; [#uses=1]
- %69 = load float* %scevgep23, align 4 ; [#uses=3]
- %70 = fmul float %69, %19 ; [#uses=1]
- %71 = fadd float %68, %70 ; [#uses=1]
- %scevgep24 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -2, i32 0, i32 -3 ; [#uses=1]
- %72 = load float* %scevgep24, align 4 ; [#uses=3]
- %73 = fmul float %72, %21 ; [#uses=1]
- %74 = fadd float %71, %73 ; [#uses=1]
- %scevgep2728 = getelementptr inbounds %struct.btCompoundShapeChild* %36, i32 %tmp26, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %scevgep2728, align 4 ; [#uses=3]
- %76 = fmul float %75, %17 ; [#uses=1]
- %scevgep2930 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -4, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %scevgep2930, align 4 ; [#uses=3]
- %78 = fmul float %77, %19 ; [#uses=1]
- %79 = fadd float %76, %78 ; [#uses=1]
- %scevgep3132 = getelementptr %struct.btCompoundShapeChild* %36, i32 %tmp13, i32 0, i32 0, i32 0, i32 -3, i32 0, i32 0 ; [#uses=1]
- %80 = load float* %scevgep3132, align 4 ; [#uses=3]
- %81 = fmul float %80, %21 ; [#uses=1]
- %82 = fadd float %79, %81 ; [#uses=1]
- %83 = fmul float %59, %9 ; [#uses=1]
- %84 = fmul float %61, %11 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %64, %13 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %67, %9 ; [#uses=1]
- %89 = fmul float %69, %11 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %72, %13 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %75, %9 ; [#uses=1]
- %94 = fmul float %77, %11 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %80, %13 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %59, %1 ; [#uses=1]
- %99 = fmul float %61, %3 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %64, %5 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %67, %1 ; [#uses=1]
- %104 = fmul float %69, %3 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %72, %5 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %75, %1 ; [#uses=1]
- %109 = fmul float %77, %3 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %80, %5 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- store float %112, float* %0, align 4
- store float %107, float* %2, align 4
- store float %102, float* %4, align 4
- store float 0.000000e+00, float* %6, align 4
- store float %97, float* %8, align 4
- store float %92, float* %10, align 4
- store float %87, float* %12, align 4
- store float 0.000000e+00, float* %14, align 4
- store float %82, float* %16, align 4
- store float %74, float* %18, align 4
- store float %66, float* %20, align 4
- store float 0.000000e+00, float* %22, align 4
- store float %58, float* %24, align 4
- store float %52, float* %26, align 4
- store float %46, float* %28, align 4
- store float 0.000000e+00, float* %30, align 4
- tail call void @_ZN27btGImpactCollisionAlgorithm16gimpact_vs_shapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP16btCollisionShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btCollisionShape* %37, i8 zeroext %swapped)
- store float %1, float* %0, align 4
- store float %3, float* %2, align 4
- store float %5, float* %4, align 4
- store float %7, float* %6, align 4
- store float %9, float* %8, align 4
- store float %11, float* %10, align 4
- store float %13, float* %12, align 4
- store float %15, float* %14, align 4
- store float %17, float* %16, align 4
- store float %19, float* %18, align 4
- store float %21, float* %20, align 4
- store float %23, float* %22, align 4
- store float %25, float* %24, align 4
- store float %27, float* %26, align 4
- store float %29, float* %28, align 4
- store float %31, float* %30, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %33 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithm29gimpact_vs_gimpact_find_pairsERK11btTransformS2_P23btGImpactShapeInterfaceS4_R9btPairSet(%struct.btGImpactCollisionAlgorithm* nocapture %this, %struct.btTransform* %trans0, %struct.btTransform* %trans1, %struct.btGImpactShapeInterface* %shape0, %struct.btGImpactShapeInterface* %shape1, %struct.btPairSet* %pairset) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %boxshape0 = alloca %struct.GIM_AABB, align 8 ; [#uses=8]
- %boxshape1 = alloca %struct.GIM_AABB, align 8 ; [#uses=8]
- %1 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %not..i = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %not..i, label %bb9, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape1, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %not..i23 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %not..i23, label %bb9, label %bb12
-
-bb9: ; preds = %bb, %entry
- %5 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 21 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %10 = call i32 %9(%struct.btGImpactShapeInterface* %shape0) ; [#uses=3]
- %11 = icmp eq i32 %10, 0 ; [#uses=1]
- br i1 %11, label %return, label %bb.nph26
-
-bb12: ; preds = %bb
- %12 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape1, i32 0, i32 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 4 ; [#uses=1]
- call void @_ZN21btGImpactQuantizedBvh14find_collisionEPS_RK11btTransformS0_S3_R9btPairSet(%struct.btGImpactBoxSet* %13, %struct.btTransform* %trans0, %struct.btGImpactBoxSet* %12, %struct.btTransform* %trans1, %struct.btPairSet* %pairset)
- ret void
-
-bb.nph26: ; preds = %bb9
- %14 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape1, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %17 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %26 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = getelementptr inbounds %struct.GIM_AABB* %boxshape1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.GIM_AABB* %boxshape0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0 ; [#uses=1]
- %tmp33 = add i32 %10, -1 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb20.loopexit, %bb.nph26
- %indvar29 = phi i32 [ 0, %bb.nph26 ], [ %indvar.next30, %bb20.loopexit ] ; [#uses=2]
- %tmp34 = sub i32 %tmp33, %indvar29 ; [#uses=3]
- %34 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %35 = getelementptr inbounds i32 (...)** %34, i32 29 ; [#uses=1]
- %36 = load i32 (...)** %35, align 4 ; [#uses=1]
- %37 = bitcast i32 (...)* %36 to void (%struct.btGImpactShapeInterface*, i32, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %37(%struct.btGImpactShapeInterface* %shape0, i32 %tmp34, %struct.btTransform* %trans0, %struct.btQuadWord* %14, %struct.btQuadWord* %15)
- %38 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32 (...)** %38, i32 21 ; [#uses=1]
- %40 = load i32 (...)** %39, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %40 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %42 = call i32 %41(%struct.btGImpactShapeInterface* %shape1) ; [#uses=3]
- %43 = icmp eq i32 %42, 0 ; [#uses=1]
- br i1 %43, label %bb20.loopexit, label %bb.nph
-
-bb.nph: ; preds = %bb14
- %tmp27 = add i32 %42, -1 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb18.backedge, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb18.backedge ] ; [#uses=2]
- %tmp28 = sub i32 %tmp27, %indvar ; [#uses=1]
- %44 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %45 = getelementptr inbounds i32 (...)** %44, i32 29 ; [#uses=1]
- %46 = load i32 (...)** %45, align 4 ; [#uses=1]
- %47 = bitcast i32 (...)* %46 to void (%struct.btGImpactShapeInterface*, i32, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %47(%struct.btGImpactShapeInterface* %shape1, i32 %tmp34, %struct.btTransform* %trans1, %struct.btQuadWord* %17, %struct.btQuadWord* %18)
- %48 = load float* %19, align 8 ; [#uses=1]
- %49 = load float* %20, align 8 ; [#uses=1]
- %50 = fcmp ogt float %48, %49 ; [#uses=1]
- br i1 %50, label %bb18.backedge, label %bb.i
-
-bb.i: ; preds = %bb15
- %51 = load float* %21, align 8 ; [#uses=1]
- %52 = load float* %22, align 8 ; [#uses=1]
- %53 = fcmp olt float %51, %52 ; [#uses=1]
- br i1 %53, label %bb18.backedge, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %54 = load float* %23, align 4 ; [#uses=1]
- %55 = load float* %24, align 4 ; [#uses=1]
- %56 = fcmp ogt float %54, %55 ; [#uses=1]
- br i1 %56, label %bb18.backedge, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %57 = load float* %25, align 4 ; [#uses=1]
- %58 = load float* %26, align 4 ; [#uses=1]
- %59 = fcmp olt float %57, %58 ; [#uses=1]
- br i1 %59, label %bb18.backedge, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %60 = load float* %27, align 8 ; [#uses=1]
- %61 = load float* %28, align 8 ; [#uses=1]
- %62 = fcmp ogt float %60, %61 ; [#uses=1]
- br i1 %62, label %bb18.backedge, label %_ZNK6btAABB13has_collisionERKS_.exit
-
-_ZNK6btAABB13has_collisionERKS_.exit: ; preds = %bb3.i
- %63 = load float* %29, align 8 ; [#uses=1]
- %64 = load float* %30, align 8 ; [#uses=1]
- %phitmp = fcmp olt float %63, %64 ; [#uses=1]
- br i1 %phitmp, label %bb18.backedge, label %bb17
-
-bb17: ; preds = %_ZNK6btAABB13has_collisionERKS_.exit
- store i32 %tmp34, i32* %31, align 8
- store i32 %tmp28, i32* %32, align 4
- call void @_ZN20btAlignedObjectArrayI8GIM_PAIRE9push_backERKS0_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %33, %struct.CONTACT_KEY_TOKEN* %0) inlinehint
- br label %bb18.backedge
-
-bb18.backedge: ; preds = %bb17, %_ZNK6btAABB13has_collisionERKS_.exit, %bb3.i, %bb2.i, %bb1.i, %bb.i, %bb15
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %42 ; [#uses=1]
- br i1 %exitcond, label %bb20.loopexit, label %bb15
-
-bb20.loopexit: ; preds = %bb18.backedge, %bb14
- %indvar.next30 = add i32 %indvar29, 1 ; [#uses=2]
- %exitcond31 = icmp eq i32 %indvar.next30, %10 ; [#uses=1]
- br i1 %exitcond31, label %return, label %bb14
-
-return: ; preds = %bb20.loopexit, %bb9
- ret void
-}
-
-; [#uses=3]
-define void @_ZN27btGImpactCollisionAlgorithm18gimpact_vs_gimpactEP17btCollisionObjectS1_P23btGImpactShapeInterfaceS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btGImpactShapeInterface* %shape1) align 2 {
-entry:
- %0 = alloca %struct.btTransform, align 8 ; [#uses=13]
- %1 = alloca %struct.btTransform, align 8 ; [#uses=13]
- %orgtrans0 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %orgtrans1 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %pairset = alloca %struct.btPairSet, align 8 ; [#uses=12]
- %retriever0 = alloca %struct.GIM_ShapeRetriever, align 8 ; [#uses=20]
- %retriever1 = alloca %struct.GIM_ShapeRetriever, align 8 ; [#uses=20]
- %2 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 19 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %7 = call i32 %6(%struct.btGImpactShapeInterface* %shape0) ; [#uses=1]
- %8 = icmp eq i32 %7, 2 ; [#uses=1]
- br i1 %8, label %bb, label %bb4
-
-bb: ; preds = %entry
- %9 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = bitcast i8** %9 to i32* ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = add nsw i32 %11, -1 ; [#uses=3]
- %13 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=3]
- store i32 %12, i32* %13, align 4
- %14 = icmp eq i32 %12, -1 ; [#uses=1]
- br i1 %14, label %_ZN9btPairSetD1Ev.exit146, label %bb.nph172
-
-bb.nph172: ; preds = %bb
- %15 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape0, i32 1, i32 1 ; [#uses=1]
- %16 = bitcast %struct.GIM_AABB* %15 to %struct.btGImpactMeshShapePart*** ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph172
- %17 = phi i32 [ %12, %bb.nph172 ], [ %23, %bb1 ] ; [#uses=1]
- %18 = load %struct.btGImpactMeshShapePart*** %16, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btGImpactMeshShapePart** %18, i32 %17 ; [#uses=1]
- %20 = load %struct.btGImpactMeshShapePart** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btGImpactMeshShapePart* %20, i32 0, i32 0 ; [#uses=1]
- call void @_ZN27btGImpactCollisionAlgorithm18gimpact_vs_gimpactEP17btCollisionObjectS1_P23btGImpactShapeInterfaceS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %21, %struct.btGImpactShapeInterface* %shape1)
- %22 = load i32* %13, align 4 ; [#uses=1]
- %23 = add nsw i32 %22, -1 ; [#uses=3]
- store i32 %23, i32* %13, align 4
- %24 = icmp eq i32 %23, -1 ; [#uses=1]
- br i1 %24, label %_ZN9btPairSetD1Ev.exit146, label %bb1
-
-bb4: ; preds = %entry
- %25 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape1, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %26 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 19 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %28 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %30 = call i32 %29(%struct.btGImpactShapeInterface* %shape1) ; [#uses=1]
- %31 = icmp eq i32 %30, 2 ; [#uses=1]
- br i1 %31, label %bb6, label %bb10
-
-bb6: ; preds = %bb4
- %32 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape1, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = bitcast i8** %32 to i32* ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = add nsw i32 %34, -1 ; [#uses=3]
- %36 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=3]
- store i32 %35, i32* %36, align 4
- %37 = icmp eq i32 %35, -1 ; [#uses=1]
- br i1 %37, label %_ZN9btPairSetD1Ev.exit146, label %bb.nph
-
-bb.nph: ; preds = %bb6
- %38 = getelementptr inbounds %struct.btGImpactShapeInterface* %shape1, i32 1, i32 1 ; [#uses=1]
- %39 = bitcast %struct.GIM_AABB* %38 to %struct.btGImpactMeshShapePart*** ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph
- %40 = phi i32 [ %35, %bb.nph ], [ %46, %bb7 ] ; [#uses=1]
- %41 = load %struct.btGImpactMeshShapePart*** %39, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btGImpactMeshShapePart** %41, i32 %40 ; [#uses=1]
- %43 = load %struct.btGImpactMeshShapePart** %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btGImpactMeshShapePart* %43, i32 0, i32 0 ; [#uses=1]
- call void @_ZN27btGImpactCollisionAlgorithm18gimpact_vs_gimpactEP17btCollisionObjectS1_P23btGImpactShapeInterfaceS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %shape0, %struct.btGImpactShapeInterface* %44)
- %45 = load i32* %36, align 4 ; [#uses=1]
- %46 = add nsw i32 %45, -1 ; [#uses=3]
- store i32 %46, i32* %36, align 4
- %47 = icmp eq i32 %46, -1 ; [#uses=1]
- br i1 %47, label %_ZN9btPairSetD1Ev.exit146, label %bb7
-
-bb10: ; preds = %bb4
- %48 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %49 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 8
- %51 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %52 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 4
- %54 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %55 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 8
- %57 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %58 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %61 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 8
- %63 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %64 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %67 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 8
- %69 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %73 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 8
- %75 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %76 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %79 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 8
- %81 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %85 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %86 = load float* %85, align 4 ; [#uses=1]
- store float %86, float* %84, align 8
- %87 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %88 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %91 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %92 = load float* %91, align 4 ; [#uses=1]
- store float %92, float* %90, align 8
- %93 = getelementptr inbounds %struct.btTransform* %orgtrans0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %94 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=3]
- %95 = load float* %94, align 4 ; [#uses=1]
- store float %95, float* %93, align 4
- %96 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %97 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %98 = load float* %97, align 4 ; [#uses=1]
- store float %98, float* %96, align 8
- %99 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %100 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %101 = load float* %100, align 4 ; [#uses=1]
- store float %101, float* %99, align 4
- %102 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %103 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %104 = load float* %103, align 4 ; [#uses=1]
- store float %104, float* %102, align 8
- %105 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %106 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- %107 = load float* %106, align 4 ; [#uses=1]
- store float %107, float* %105, align 4
- %108 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %109 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %110 = load float* %109, align 4 ; [#uses=1]
- store float %110, float* %108, align 8
- %111 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %112 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %113 = load float* %112, align 4 ; [#uses=1]
- store float %113, float* %111, align 4
- %114 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %115 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %116 = load float* %115, align 4 ; [#uses=1]
- store float %116, float* %114, align 8
- %117 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %118 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %119 = load float* %118, align 4 ; [#uses=1]
- store float %119, float* %117, align 4
- %120 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %121 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %122 = load float* %121, align 4 ; [#uses=1]
- store float %122, float* %120, align 8
- %123 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %124 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %125 = load float* %124, align 4 ; [#uses=1]
- store float %125, float* %123, align 4
- %126 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %127 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %128 = load float* %127, align 4 ; [#uses=1]
- store float %128, float* %126, align 8
- %129 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %130 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- %131 = load float* %130, align 4 ; [#uses=1]
- store float %131, float* %129, align 4
- %132 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %133 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %134 = load float* %133, align 4 ; [#uses=1]
- store float %134, float* %132, align 8
- %135 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %136 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %137 = load float* %136, align 4 ; [#uses=1]
- store float %137, float* %135, align 4
- %138 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %139 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %140 = load float* %139, align 4 ; [#uses=1]
- store float %140, float* %138, align 8
- %141 = getelementptr inbounds %struct.btTransform* %orgtrans1, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %142 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=3]
- %143 = load float* %142, align 4 ; [#uses=1]
- store float %143, float* %141, align 4
- call void @_ZN9btPairSetC1Ev(%struct.btPairSet* %pairset)
- invoke void @_ZN27btGImpactCollisionAlgorithm29gimpact_vs_gimpact_find_pairsERK11btTransformS2_P23btGImpactShapeInterfaceS4_R9btPairSet(%struct.btGImpactCollisionAlgorithm* %this, %struct.btTransform* %orgtrans0, %struct.btTransform* %orgtrans1, %struct.btGImpactShapeInterface* %shape0, %struct.btGImpactShapeInterface* %shape1, %struct.btPairSet* %pairset)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb10
- %144 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 1 ; [#uses=3]
- %145 = load i32* %144, align 4 ; [#uses=1]
- %146 = icmp eq i32 %145, 0 ; [#uses=1]
- br i1 %146, label %bb71, label %bb13
-
-bb13: ; preds = %invcont
- %147 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %148 = getelementptr inbounds i32 (...)** %147, i32 19 ; [#uses=1]
- %149 = load i32 (...)** %148, align 4 ; [#uses=1]
- %150 = bitcast i32 (...)* %149 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %151 = invoke i32 %150(%struct.btGImpactShapeInterface* %shape0)
- to label %invcont14 unwind label %lpad ; [#uses=1]
-
-invcont14: ; preds = %bb13
- %152 = icmp eq i32 %151, 1 ; [#uses=1]
- br i1 %152, label %bb15, label %bb18
-
-bb15: ; preds = %invcont14
- %153 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %154 = getelementptr inbounds i32 (...)** %153, i32 19 ; [#uses=1]
- %155 = load i32 (...)** %154, align 4 ; [#uses=1]
- %156 = bitcast i32 (...)* %155 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %157 = invoke i32 %156(%struct.btGImpactShapeInterface* %shape1)
- to label %invcont16 unwind label %lpad ; [#uses=1]
-
-invcont16: ; preds = %bb15
- %158 = icmp eq i32 %157, 1 ; [#uses=1]
- br i1 %158, label %bb21, label %bb18
-
-bb18: ; preds = %invcont16, %invcont14
- %159 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %160 = getelementptr inbounds i32 (...)** %159, i32 27 ; [#uses=1]
- %161 = load i32 (...)** %160, align 4 ; [#uses=1]
- %162 = bitcast i32 (...)* %161 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- invoke void %162(%struct.btGImpactShapeInterface* %shape0)
- to label %invcont24 unwind label %lpad
-
-bb21: ; preds = %invcont16
- %163 = bitcast %struct.btGImpactShapeInterface* %shape0 to %struct.btGImpactMeshShapePart* ; [#uses=1]
- %164 = bitcast %struct.btGImpactShapeInterface* %shape1 to %struct.btGImpactMeshShapePart* ; [#uses=1]
- %165 = load i32* %144, align 4 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 3 ; [#uses=1]
- %167 = load %struct.CONTACT_KEY_TOKEN** %166, align 4 ; [#uses=1]
- %168 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %167, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN27btGImpactCollisionAlgorithm21collide_sat_trianglesEP17btCollisionObjectS1_P22btGImpactMeshShapePartS3_PKii(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactMeshShapePart* %163, %struct.btGImpactMeshShapePart* %164, i32* %168, i32 %165)
- to label %bb71 unwind label %lpad
-
-invcont24: ; preds = %bb18
- %169 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %170 = getelementptr inbounds i32 (...)** %169, i32 27 ; [#uses=1]
- %171 = load i32 (...)** %170, align 4 ; [#uses=1]
- %172 = bitcast i32 (...)* %171 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- invoke void %172(%struct.btGImpactShapeInterface* %shape1)
- to label %invcont25 unwind label %lpad
-
-invcont25: ; preds = %invcont24
- invoke void @_ZN18GIM_ShapeRetrieverC2EP23btGImpactShapeInterface(%struct.GIM_ShapeRetriever* %retriever0, %struct.btGImpactShapeInterface* %shape0)
- to label %invcont26 unwind label %lpad
-
-invcont26: ; preds = %invcont25
- invoke void @_ZN18GIM_ShapeRetrieverC2EP23btGImpactShapeInterface(%struct.GIM_ShapeRetriever* %retriever1, %struct.btGImpactShapeInterface* %shape1)
- to label %invcont27 unwind label %lpad75
-
-invcont27: ; preds = %invcont26
- %173 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %174 = getelementptr inbounds i32 (...)** %173, i32 22 ; [#uses=1]
- %175 = load i32 (...)** %174, align 4 ; [#uses=1]
- %176 = bitcast i32 (...)* %175 to i8 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %177 = invoke zeroext i8 %176(%struct.btGImpactShapeInterface* %shape0)
- to label %invcont28 unwind label %lpad79 ; [#uses=1]
-
-invcont28: ; preds = %invcont27
- %178 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %179 = getelementptr inbounds i32 (...)** %178, i32 22 ; [#uses=1]
- %180 = load i32 (...)** %179, align 4 ; [#uses=1]
- %181 = bitcast i32 (...)* %180 to i8 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %182 = invoke zeroext i8 %181(%struct.btGImpactShapeInterface* %shape1)
- to label %invcont29 unwind label %lpad79 ; [#uses=1]
-
-invcont29: ; preds = %invcont28
- %183 = load i32* %144, align 4 ; [#uses=2]
- %184 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 3 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=2]
- %186 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=3]
- %187 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 6 ; [#uses=1]
- %188 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 6 ; [#uses=1]
- %toBool33 = icmp eq i8 %177, 0 ; [#uses=2]
- %toBool38 = icmp eq i8 %182, 0 ; [#uses=2]
- %189 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %207 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %210 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btTransform* %1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %tmp175 = add i32 %183, -1 ; [#uses=1]
- br label %bb49
-
-bb30: ; preds = %bb49
- %tmp173 = sub i32 %183, %indvar ; [#uses=1]
- %213 = load %struct.CONTACT_KEY_TOKEN** %184, align 4 ; [#uses=2]
- %scevgep177178 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %213, i32 %tmp176, i32 0 ; [#uses=1]
- %214 = load i32* %scevgep177178, align 4 ; [#uses=2]
- store i32 %214, i32* %185, align 4
- %scevgep = getelementptr %struct.CONTACT_KEY_TOKEN* %213, i32 %tmp173, i32 0 ; [#uses=1]
- %scevgep174 = getelementptr i32* %scevgep, i32 -1 ; [#uses=1]
- %215 = load i32* %scevgep174, align 4 ; [#uses=1]
- store i32 %215, i32* %186, align 4
- %216 = load %"struct.GIM_ShapeRetriever::ChildShapeRetriever"** %187, align 4 ; [#uses=2]
- %217 = getelementptr inbounds %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %216, i32 0, i32 0 ; [#uses=1]
- %218 = load i32 (...)*** %217, align 4 ; [#uses=1]
- %219 = load i32 (...)** %218, align 4 ; [#uses=1]
- %220 = bitcast i32 (...)* %219 to %struct.btCollisionShape* (%"struct.GIM_ShapeRetriever::ChildShapeRetriever"*, i32)* ; [#uses=1]
- %221 = invoke %struct.btCollisionShape* %220(%"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %216, i32 %214)
- to label %invcont31 unwind label %lpad79 ; [#uses=1]
-
-invcont31: ; preds = %bb30
- %222 = load i32* %186, align 4 ; [#uses=1]
- %223 = load %"struct.GIM_ShapeRetriever::ChildShapeRetriever"** %188, align 4 ; [#uses=2]
- %224 = getelementptr inbounds %"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %223, i32 0, i32 0 ; [#uses=1]
- %225 = load i32 (...)*** %224, align 4 ; [#uses=1]
- %226 = load i32 (...)** %225, align 4 ; [#uses=1]
- %227 = bitcast i32 (...)* %226 to %struct.btCollisionShape* (%"struct.GIM_ShapeRetriever::ChildShapeRetriever"*, i32)* ; [#uses=1]
- %228 = invoke %struct.btCollisionShape* %227(%"struct.GIM_ShapeRetriever::ChildShapeRetriever"* %223, i32 %222)
- to label %invcont32 unwind label %lpad79 ; [#uses=1]
-
-invcont32: ; preds = %invcont31
- br i1 %toBool33, label %bb37, label %bb34
-
-bb34: ; preds = %invcont32
- %229 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %230 = getelementptr inbounds i32 (...)** %229, i32 32 ; [#uses=1]
- %231 = load i32 (...)** %230, align 4 ; [#uses=1]
- %232 = load i32* %185, align 4 ; [#uses=1]
- %233 = bitcast i32 (...)* %231 to void (%struct.btTransform*, %struct.btGImpactShapeInterface*, i32)* ; [#uses=1]
- invoke void %233(%struct.btTransform* noalias sret %1, %struct.btGImpactShapeInterface* %shape0, i32 %232)
- to label %invcont36 unwind label %lpad79
-
-invcont36: ; preds = %bb34
- %234 = load float* %72, align 8 ; [#uses=4]
- %235 = load float* %201, align 8 ; [#uses=3]
- %236 = load float* %75, align 4 ; [#uses=4]
- %237 = load float* %202, align 4 ; [#uses=3]
- %238 = load float* %78, align 8 ; [#uses=4]
- %239 = load float* %203, align 8 ; [#uses=3]
- %240 = load float* %60, align 8 ; [#uses=4]
- %241 = load float* %63, align 4 ; [#uses=4]
- %242 = load float* %66, align 8 ; [#uses=4]
- %243 = load float* %48, align 8 ; [#uses=4]
- %244 = load float* %51, align 4 ; [#uses=4]
- %245 = load float* %54, align 8 ; [#uses=4]
- %246 = load float* %204, align 8 ; [#uses=3]
- %247 = load float* %205, align 8 ; [#uses=3]
- %248 = load float* %206, align 8 ; [#uses=3]
- %249 = load float* %207, align 4 ; [#uses=3]
- %250 = load float* %208, align 4 ; [#uses=3]
- %251 = load float* %209, align 4 ; [#uses=3]
- %252 = load float* %210, align 8 ; [#uses=3]
- %253 = load float* %211, align 8 ; [#uses=3]
- %254 = load float* %212, align 8 ; [#uses=3]
- %255 = fmul float %244, %237 ; [#uses=1]
- %256 = fmul float %243, %235 ; [#uses=1]
- %257 = fmul float %241, %237 ; [#uses=1]
- %258 = fmul float %240, %235 ; [#uses=1]
- %259 = fmul float %236, %237 ; [#uses=1]
- %260 = fmul float %234, %235 ; [#uses=1]
- %261 = fmul float %253, %244 ; [#uses=1]
- %262 = fmul float %252, %243 ; [#uses=1]
- %263 = fmul float %250, %244 ; [#uses=1]
- %264 = fmul float %249, %243 ; [#uses=1]
- %265 = fmul float %247, %244 ; [#uses=1]
- %266 = fmul float %246, %243 ; [#uses=1]
- %267 = fmul float %253, %241 ; [#uses=1]
- %268 = fmul float %252, %240 ; [#uses=1]
- %269 = fmul float %250, %241 ; [#uses=1]
- %270 = fmul float %249, %240 ; [#uses=1]
- %271 = fmul float %247, %241 ; [#uses=1]
- %272 = fmul float %246, %240 ; [#uses=1]
- %273 = fmul float %253, %236 ; [#uses=1]
- %274 = fmul float %252, %234 ; [#uses=1]
- %275 = fmul float %250, %236 ; [#uses=1]
- %276 = fmul float %249, %234 ; [#uses=1]
- %277 = fmul float %247, %236 ; [#uses=1]
- %278 = fmul float %246, %234 ; [#uses=1]
- %279 = fmul float %245, %239 ; [#uses=1]
- %280 = fadd float %256, %255 ; [#uses=1]
- %281 = fmul float %242, %239 ; [#uses=1]
- %282 = fadd float %258, %257 ; [#uses=1]
- %283 = fmul float %238, %239 ; [#uses=1]
- %284 = fadd float %260, %259 ; [#uses=1]
- %285 = fmul float %254, %245 ; [#uses=1]
- %286 = fadd float %262, %261 ; [#uses=1]
- %287 = fmul float %251, %245 ; [#uses=1]
- %288 = fadd float %264, %263 ; [#uses=1]
- %289 = fmul float %248, %245 ; [#uses=1]
- %290 = fadd float %266, %265 ; [#uses=1]
- %291 = fmul float %254, %242 ; [#uses=1]
- %292 = fadd float %268, %267 ; [#uses=1]
- %293 = fmul float %251, %242 ; [#uses=1]
- %294 = fadd float %270, %269 ; [#uses=1]
- %295 = fmul float %248, %242 ; [#uses=1]
- %296 = fadd float %272, %271 ; [#uses=1]
- %297 = fmul float %254, %238 ; [#uses=1]
- %298 = fadd float %274, %273 ; [#uses=1]
- %299 = fmul float %251, %238 ; [#uses=1]
- %300 = fadd float %276, %275 ; [#uses=1]
- %301 = fmul float %248, %238 ; [#uses=1]
- %302 = fadd float %278, %277 ; [#uses=1]
- %303 = load float* %84, align 8 ; [#uses=1]
- %304 = fadd float %280, %279 ; [#uses=1]
- %305 = load float* %87, align 4 ; [#uses=1]
- %306 = fadd float %282, %281 ; [#uses=1]
- %307 = load float* %90, align 8 ; [#uses=1]
- %308 = fadd float %284, %283 ; [#uses=1]
- %309 = fadd float %286, %285 ; [#uses=1]
- %310 = fadd float %288, %287 ; [#uses=1]
- %311 = fadd float %290, %289 ; [#uses=1]
- %312 = fadd float %292, %291 ; [#uses=1]
- %313 = fadd float %294, %293 ; [#uses=1]
- %314 = fadd float %296, %295 ; [#uses=1]
- %315 = fadd float %298, %297 ; [#uses=1]
- %316 = fadd float %300, %299 ; [#uses=1]
- %317 = fadd float %302, %301 ; [#uses=1]
- %318 = fadd float %304, %303 ; [#uses=1]
- %319 = fadd float %306, %305 ; [#uses=1]
- %320 = fadd float %308, %307 ; [#uses=1]
- store float %309, float* %49, align 4
- store float %310, float* %52, align 4
- store float %311, float* %55, align 4
- store float 0.000000e+00, float* %58, align 4
- store float %312, float* %61, align 4
- store float %313, float* %64, align 4
- store float %314, float* %67, align 4
- store float 0.000000e+00, float* %70, align 4
- store float %315, float* %73, align 4
- store float %316, float* %76, align 4
- store float %317, float* %79, align 4
- store float 0.000000e+00, float* %82, align 4
- store float %318, float* %85, align 4
- store float %319, float* %88, align 4
- store float %320, float* %91, align 4
- store float 0.000000e+00, float* %94, align 4
- br label %bb37
-
-bb37: ; preds = %invcont36, %invcont32
- br i1 %toBool38, label %bb42, label %bb39
-
-bb39: ; preds = %bb37
- %321 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %322 = getelementptr inbounds i32 (...)** %321, i32 32 ; [#uses=1]
- %323 = load i32 (...)** %322, align 4 ; [#uses=1]
- %324 = load i32* %186, align 4 ; [#uses=1]
- %325 = bitcast i32 (...)* %323 to void (%struct.btTransform*, %struct.btGImpactShapeInterface*, i32)* ; [#uses=1]
- invoke void %325(%struct.btTransform* noalias sret %0, %struct.btGImpactShapeInterface* %shape1, i32 %324)
- to label %invcont41 unwind label %lpad79
-
-invcont41: ; preds = %bb39
- %326 = load float* %120, align 8 ; [#uses=4]
- %327 = load float* %189, align 8 ; [#uses=3]
- %328 = load float* %123, align 4 ; [#uses=4]
- %329 = load float* %190, align 4 ; [#uses=3]
- %330 = load float* %126, align 8 ; [#uses=4]
- %331 = load float* %191, align 8 ; [#uses=3]
- %332 = load float* %108, align 8 ; [#uses=4]
- %333 = load float* %111, align 4 ; [#uses=4]
- %334 = load float* %114, align 8 ; [#uses=4]
- %335 = load float* %96, align 8 ; [#uses=4]
- %336 = load float* %99, align 4 ; [#uses=4]
- %337 = load float* %102, align 8 ; [#uses=4]
- %338 = load float* %192, align 8 ; [#uses=3]
- %339 = load float* %193, align 8 ; [#uses=3]
- %340 = load float* %194, align 8 ; [#uses=3]
- %341 = load float* %195, align 4 ; [#uses=3]
- %342 = load float* %196, align 4 ; [#uses=3]
- %343 = load float* %197, align 4 ; [#uses=3]
- %344 = load float* %198, align 8 ; [#uses=3]
- %345 = load float* %199, align 8 ; [#uses=3]
- %346 = load float* %200, align 8 ; [#uses=3]
- %347 = fmul float %336, %329 ; [#uses=1]
- %348 = fmul float %335, %327 ; [#uses=1]
- %349 = fmul float %333, %329 ; [#uses=1]
- %350 = fmul float %332, %327 ; [#uses=1]
- %351 = fmul float %328, %329 ; [#uses=1]
- %352 = fmul float %326, %327 ; [#uses=1]
- %353 = fmul float %345, %336 ; [#uses=1]
- %354 = fmul float %344, %335 ; [#uses=1]
- %355 = fmul float %342, %336 ; [#uses=1]
- %356 = fmul float %341, %335 ; [#uses=1]
- %357 = fmul float %339, %336 ; [#uses=1]
- %358 = fmul float %338, %335 ; [#uses=1]
- %359 = fmul float %345, %333 ; [#uses=1]
- %360 = fmul float %344, %332 ; [#uses=1]
- %361 = fmul float %342, %333 ; [#uses=1]
- %362 = fmul float %341, %332 ; [#uses=1]
- %363 = fmul float %339, %333 ; [#uses=1]
- %364 = fmul float %338, %332 ; [#uses=1]
- %365 = fmul float %345, %328 ; [#uses=1]
- %366 = fmul float %344, %326 ; [#uses=1]
- %367 = fmul float %342, %328 ; [#uses=1]
- %368 = fmul float %341, %326 ; [#uses=1]
- %369 = fmul float %339, %328 ; [#uses=1]
- %370 = fmul float %338, %326 ; [#uses=1]
- %371 = fmul float %337, %331 ; [#uses=1]
- %372 = fadd float %348, %347 ; [#uses=1]
- %373 = fmul float %334, %331 ; [#uses=1]
- %374 = fadd float %350, %349 ; [#uses=1]
- %375 = fmul float %330, %331 ; [#uses=1]
- %376 = fadd float %352, %351 ; [#uses=1]
- %377 = fmul float %346, %337 ; [#uses=1]
- %378 = fadd float %354, %353 ; [#uses=1]
- %379 = fmul float %343, %337 ; [#uses=1]
- %380 = fadd float %356, %355 ; [#uses=1]
- %381 = fmul float %340, %337 ; [#uses=1]
- %382 = fadd float %358, %357 ; [#uses=1]
- %383 = fmul float %346, %334 ; [#uses=1]
- %384 = fadd float %360, %359 ; [#uses=1]
- %385 = fmul float %343, %334 ; [#uses=1]
- %386 = fadd float %362, %361 ; [#uses=1]
- %387 = fmul float %340, %334 ; [#uses=1]
- %388 = fadd float %364, %363 ; [#uses=1]
- %389 = fmul float %346, %330 ; [#uses=1]
- %390 = fadd float %366, %365 ; [#uses=1]
- %391 = fmul float %343, %330 ; [#uses=1]
- %392 = fadd float %368, %367 ; [#uses=1]
- %393 = fmul float %340, %330 ; [#uses=1]
- %394 = fadd float %370, %369 ; [#uses=1]
- %395 = load float* %132, align 8 ; [#uses=1]
- %396 = fadd float %372, %371 ; [#uses=1]
- %397 = load float* %135, align 4 ; [#uses=1]
- %398 = fadd float %374, %373 ; [#uses=1]
- %399 = load float* %138, align 8 ; [#uses=1]
- %400 = fadd float %376, %375 ; [#uses=1]
- %401 = fadd float %378, %377 ; [#uses=1]
- %402 = fadd float %380, %379 ; [#uses=1]
- %403 = fadd float %382, %381 ; [#uses=1]
- %404 = fadd float %384, %383 ; [#uses=1]
- %405 = fadd float %386, %385 ; [#uses=1]
- %406 = fadd float %388, %387 ; [#uses=1]
- %407 = fadd float %390, %389 ; [#uses=1]
- %408 = fadd float %392, %391 ; [#uses=1]
- %409 = fadd float %394, %393 ; [#uses=1]
- %410 = fadd float %396, %395 ; [#uses=1]
- %411 = fadd float %398, %397 ; [#uses=1]
- %412 = fadd float %400, %399 ; [#uses=1]
- store float %401, float* %97, align 4
- store float %402, float* %100, align 4
- store float %403, float* %103, align 4
- store float 0.000000e+00, float* %106, align 4
- store float %404, float* %109, align 4
- store float %405, float* %112, align 4
- store float %406, float* %115, align 4
- store float 0.000000e+00, float* %118, align 4
- store float %407, float* %121, align 4
- store float %408, float* %124, align 4
- store float %409, float* %127, align 4
- store float 0.000000e+00, float* %130, align 4
- store float %410, float* %133, align 4
- store float %411, float* %136, align 4
- store float %412, float* %139, align 4
- store float 0.000000e+00, float* %142, align 4
- br label %bb42
-
-bb42: ; preds = %invcont41, %bb37
- invoke void @_ZN27btGImpactCollisionAlgorithm26convex_vs_convex_collisionEP17btCollisionObjectS1_P16btCollisionShapeS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btCollisionShape* %221, %struct.btCollisionShape* %228)
- to label %invcont43 unwind label %lpad79
-
-invcont43: ; preds = %bb42
- br i1 %toBool33, label %bb46, label %bb45
-
-bb45: ; preds = %invcont43
- %413 = load float* %48, align 8 ; [#uses=1]
- store float %413, float* %49, align 4
- %414 = load float* %51, align 4 ; [#uses=1]
- store float %414, float* %52, align 4
- %415 = load float* %54, align 8 ; [#uses=1]
- store float %415, float* %55, align 4
- %416 = load float* %57, align 4 ; [#uses=1]
- store float %416, float* %58, align 4
- %417 = load float* %60, align 8 ; [#uses=1]
- store float %417, float* %61, align 4
- %418 = load float* %63, align 4 ; [#uses=1]
- store float %418, float* %64, align 4
- %419 = load float* %66, align 8 ; [#uses=1]
- store float %419, float* %67, align 4
- %420 = load float* %69, align 4 ; [#uses=1]
- store float %420, float* %70, align 4
- %421 = load float* %72, align 8 ; [#uses=1]
- store float %421, float* %73, align 4
- %422 = load float* %75, align 4 ; [#uses=1]
- store float %422, float* %76, align 4
- %423 = load float* %78, align 8 ; [#uses=1]
- store float %423, float* %79, align 4
- %424 = load float* %81, align 4 ; [#uses=1]
- store float %424, float* %82, align 4
- %425 = load float* %84, align 8 ; [#uses=1]
- store float %425, float* %85, align 4
- %426 = load float* %87, align 4 ; [#uses=1]
- store float %426, float* %88, align 4
- %427 = load float* %90, align 8 ; [#uses=1]
- store float %427, float* %91, align 4
- %428 = load float* %93, align 4 ; [#uses=1]
- store float %428, float* %94, align 4
- br label %bb46
-
-bb46: ; preds = %bb45, %invcont43
- br i1 %toBool38, label %bb49.backedge, label %bb48
-
-bb48: ; preds = %bb46
- %429 = load float* %96, align 8 ; [#uses=1]
- store float %429, float* %97, align 4
- %430 = load float* %99, align 4 ; [#uses=1]
- store float %430, float* %100, align 4
- %431 = load float* %102, align 8 ; [#uses=1]
- store float %431, float* %103, align 4
- %432 = load float* %105, align 4 ; [#uses=1]
- store float %432, float* %106, align 4
- %433 = load float* %108, align 8 ; [#uses=1]
- store float %433, float* %109, align 4
- %434 = load float* %111, align 4 ; [#uses=1]
- store float %434, float* %112, align 4
- %435 = load float* %114, align 8 ; [#uses=1]
- store float %435, float* %115, align 4
- %436 = load float* %117, align 4 ; [#uses=1]
- store float %436, float* %118, align 4
- %437 = load float* %120, align 8 ; [#uses=1]
- store float %437, float* %121, align 4
- %438 = load float* %123, align 4 ; [#uses=1]
- store float %438, float* %124, align 4
- %439 = load float* %126, align 8 ; [#uses=1]
- store float %439, float* %127, align 4
- %440 = load float* %129, align 4 ; [#uses=1]
- store float %440, float* %130, align 4
- %441 = load float* %132, align 8 ; [#uses=1]
- store float %441, float* %133, align 4
- %442 = load float* %135, align 4 ; [#uses=1]
- store float %442, float* %136, align 4
- %443 = load float* %138, align 8 ; [#uses=1]
- store float %443, float* %139, align 4
- %444 = load float* %141, align 4 ; [#uses=1]
- store float %444, float* %142, align 4
- br label %bb49.backedge
-
-bb49.backedge: ; preds = %bb48, %bb46
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb49
-
-bb49: ; preds = %bb49.backedge, %invcont29
- %indvar = phi i32 [ %indvar.next, %bb49.backedge ], [ 0, %invcont29 ] ; [#uses=3]
- %tmp176 = sub i32 %tmp175, %indvar ; [#uses=2]
- %445 = icmp eq i32 %tmp176, -1 ; [#uses=1]
- br i1 %445, label %bb51, label %bb30
-
-bb51: ; preds = %bb49
- %446 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %447 = getelementptr inbounds i32 (...)** %446, i32 28 ; [#uses=1]
- %448 = load i32 (...)** %447, align 4 ; [#uses=1]
- %449 = bitcast i32 (...)* %448 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- invoke void %449(%struct.btGImpactShapeInterface* %shape0)
- to label %invcont52 unwind label %lpad79
-
-invcont52: ; preds = %bb51
- %450 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %451 = getelementptr inbounds i32 (...)** %450, i32 28 ; [#uses=1]
- %452 = load i32 (...)** %451, align 4 ; [#uses=1]
- %453 = bitcast i32 (...)* %452 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- invoke void %453(%struct.btGImpactShapeInterface* %shape1)
- to label %bb57 unwind label %lpad79
-
-bb57: ; preds = %invcont52
- %454 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %454, align 4
- %455 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %455, align 4
- %456 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %456, align 4
- %457 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %457, align 8
- %458 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %458)
- to label %bb3.i121 unwind label %lpad.i124
-
-invcont1.i120: ; preds = %lpad.i124
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i122)
- to label %.noexc128 unwind label %lpad75
-
-.noexc128: ; preds = %invcont1.i120
- unreachable
-
-bb3.i121: ; preds = %bb57
- %459 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %459, align 4
- %460 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %460)
- to label %bb64 unwind label %lpad75
-
-lpad.i124: ; preds = %bb57
- %eh_ptr.i122 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6.i123 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i122, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %461 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %461, align 4
- %462 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %462)
- to label %invcont1.i120 unwind label %lpad7.i127
-
-lpad7.i127: ; preds = %lpad.i124
- %eh_ptr8.i125 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10.i126 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8.i125, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-bb64: ; preds = %bb3.i121
- %463 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %463, align 4
- %464 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %464, align 4
- %465 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %465, align 4
- %466 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %466, align 8
- %467 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %467)
- to label %bb3.i132 unwind label %lpad.i135
-
-invcont1.i131: ; preds = %lpad.i135
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i133)
- to label %.noexc139 unwind label %lpad
-
-.noexc139: ; preds = %invcont1.i131
- unreachable
-
-bb3.i132: ; preds = %bb64
- %468 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %468, align 4
- %469 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %469)
- to label %bb71 unwind label %lpad
-
-lpad.i135: ; preds = %bb64
- %eh_ptr.i133 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6.i134 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i133, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %470 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %470, align 4
- %471 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %471)
- to label %invcont1.i131 unwind label %lpad7.i138
-
-lpad7.i138: ; preds = %lpad.i135
- %eh_ptr8.i136 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10.i137 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8.i136, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-invcont69: ; preds = %bb2.i.i.i.i, %ppad
- %472 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %472, align 8
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %490, align 4
- %473 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %473, align 4
- %474 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %474, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-
-bb71: ; preds = %bb3.i132, %bb21, %invcont
- %475 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 3 ; [#uses=2]
- %476 = load %struct.CONTACT_KEY_TOKEN** %475, align 4 ; [#uses=2]
- %477 = icmp eq %struct.CONTACT_KEY_TOKEN* %476, null ; [#uses=1]
- br i1 %477, label %_ZN9btPairSetD1Ev.exit146, label %bb.i.i.i.i143
-
-bb.i.i.i.i143: ; preds = %bb71
- %478 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 4 ; [#uses=1]
- %479 = load i8* %478, align 8 ; [#uses=1]
- %toBool.i.i.i.i142 = icmp eq i8 %479, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i142, label %bb2.i.i.i.i145, label %bb1.i.i.i.i144
-
-bb1.i.i.i.i144: ; preds = %bb.i.i.i.i143
- %480 = bitcast %struct.CONTACT_KEY_TOKEN* %476 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %480)
- br label %bb2.i.i.i.i145
-
-bb2.i.i.i.i145: ; preds = %bb1.i.i.i.i144, %bb.i.i.i.i143
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %475, align 4
- ret void
-
-_ZN9btPairSetD1Ev.exit146: ; preds = %bb71, %bb7, %bb6, %bb1, %bb
- ret void
-
-lpad: ; preds = %bb3.i132, %invcont1.i131, %invcont25, %invcont24, %bb21, %bb18, %bb15, %bb13, %bb10
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select74 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad75: ; preds = %bb3.i121, %invcont1.i120, %invcont26
- %eh_ptr76 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select78 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr76, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad95
-
-lpad79: ; preds = %invcont52, %bb51, %bb42, %bb39, %bb34, %invcont31, %bb30, %invcont28, %invcont27
- %eh_ptr80 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select82 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr80, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %481 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %481, align 4
- %482 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %482, align 4
- %483 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %483, align 4
- %484 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %484, align 8
- %485 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %485)
- to label %bb3.i104 unwind label %lpad.i107
-
-invcont1.i103: ; preds = %lpad.i107
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i105)
- to label %.noexc111 unwind label %lpad83
-
-.noexc111: ; preds = %invcont1.i103
- unreachable
-
-bb3.i104: ; preds = %lpad79
- %486 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %486, align 4
- %487 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %487)
- to label %ppad95 unwind label %lpad83
-
-lpad.i107: ; preds = %lpad79
- %eh_ptr.i105 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6.i106 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i105, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %488 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %488, align 4
- %489 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %489)
- to label %invcont1.i103 unwind label %lpad7.i110
-
-lpad7.i110: ; preds = %lpad.i107
- %eh_ptr8.i108 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10.i109 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8.i108, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad83: ; preds = %bb3.i104, %invcont1.i103
- %eh_ptr84 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select86 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr84, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad87: ; preds = %bb3.i, %invcont1.i
- %eh_ptr88 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select90 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr88, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad91: ; preds = %bb1.i.i.i.i
- %eh_ptr92 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select94 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr92, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb3.i, %lpad
- %eh_exception.1 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.0, %bb3.i ] ; [#uses=1]
- %490 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 3 ; [#uses=3]
- %491 = load %struct.CONTACT_KEY_TOKEN** %490, align 4 ; [#uses=2]
- %492 = icmp eq %struct.CONTACT_KEY_TOKEN* %491, null ; [#uses=1]
- br i1 %492, label %invcont69, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %ppad
- %493 = getelementptr inbounds %struct.btPairSet* %pairset, i32 0, i32 0, i32 4 ; [#uses=1]
- %494 = load i8* %493, align 8 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %494, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %495 = bitcast %struct.CONTACT_KEY_TOKEN* %491 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %495)
- to label %bb2.i.i.i.i unwind label %lpad91
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %490, align 4
- br label %invcont69
-
-ppad95: ; preds = %bb3.i104, %lpad75
- %eh_exception.0 = phi i8* [ %eh_ptr76, %lpad75 ], [ %eh_ptr80, %bb3.i104 ] ; [#uses=1]
- %496 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19TetraShapeRetrieverE, i32 0, i32 2), i32 (...)*** %496, align 4
- %497 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever22TriangleShapeRetrieverE, i32 0, i32 2), i32 (...)*** %497, align 4
- %498 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN18GIM_ShapeRetriever19ChildShapeRetrieverE, i32 0, i32 2), i32 (...)*** %498, align 4
- %499 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %499, align 8
- %500 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %500)
- to label %bb3.i unwind label %lpad.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc unwind label %lpad87
-
-.noexc: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %ppad95
- %501 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %501, align 4
- %502 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %502)
- to label %ppad unwind label %lpad87
-
-lpad.i: ; preds = %ppad95
- %eh_ptr.i = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6.i = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %503 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %503, align 4
- %504 = getelementptr inbounds %struct.GIM_ShapeRetriever* %retriever0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %504)
- to label %invcont1.i unwind label %lpad7.i
-
-lpad7.i: ; preds = %lpad.i
- %eh_ptr8.i = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select10.i = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr8.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithm16processCollisionEP17btCollisionObjectS1_RK16btDispatcherInfoP16btManifoldResult(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btDispatcherInfo* %dispatchInfo, %struct.btManifoldResult* %resultOut) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load %struct.btPersistentManifold** %0, align 4 ; [#uses=2]
- %2 = icmp eq %struct.btPersistentManifold* %1, null ; [#uses=1]
- br i1 %2, label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 4 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- tail call void %9(%struct.btActionInterface* %4, %struct.btPersistentManifold* %1)
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %0, align 4
- br label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
-
-_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i: ; preds = %bb.i.i, %entry
- %10 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=3]
- %11 = load %struct.btCollisionAlgorithm** %10, align 4 ; [#uses=3]
- %12 = icmp eq %struct.btCollisionAlgorithm* %11, null ; [#uses=1]
- br i1 %12, label %_ZN27btGImpactCollisionAlgorithm10clearCacheEv.exit, label %bb.i1.i
-
-bb.i1.i: ; preds = %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %13 = getelementptr inbounds %struct.btCollisionAlgorithm* %11, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- tail call void %16(%struct.btCollisionAlgorithm* %11)
- %17 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load %struct.btActionInterface** %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btActionInterface* %18, i32 0, i32 0 ; [#uses=1]
- %20 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32 (...)** %20, i32 13 ; [#uses=1]
- %22 = load i32 (...)** %21, align 4 ; [#uses=1]
- %23 = load %struct.btCollisionAlgorithm** %10, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %22 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %25 = bitcast %struct.btCollisionAlgorithm* %23 to i8* ; [#uses=1]
- tail call void %24(%struct.btActionInterface* %18, i8* %25)
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %10, align 4
- br label %_ZN27btGImpactCollisionAlgorithm10clearCacheEv.exit
-
-_ZN27btGImpactCollisionAlgorithm10clearCacheEv.exit: ; preds = %bb.i1.i, %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %26 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i32 -1, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 -1, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 -1, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- store i32 -1, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btManifoldResult* %resultOut, %struct.btManifoldResult** %30, align 4
- %31 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btDispatcherInfo* %dispatchInfo, %struct.btDispatcherInfo** %31, align 4
- %32 = getelementptr inbounds %struct.btCollisionObject* %body0, i32 0, i32 9 ; [#uses=1]
- %33 = load %struct.btCollisionShape** %32, align 4 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btCollisionShape* %33, i32 0, i32 1 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = icmp eq i32 %35, 25 ; [#uses=1]
- br i1 %36, label %bb, label %bb4
-
-bb: ; preds = %_ZN27btGImpactCollisionAlgorithm10clearCacheEv.exit
- %37 = bitcast %struct.btCollisionShape* %33 to %struct.btGImpactShapeInterface* ; [#uses=2]
- %38 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=1]
- %39 = load %struct.btCollisionShape** %38, align 4 ; [#uses=3]
- %40 = getelementptr inbounds %struct.btCollisionShape* %39, i32 0, i32 1 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=1]
- %42 = icmp eq i32 %41, 25 ; [#uses=1]
- br i1 %42, label %bb2, label %bb3
-
-bb2: ; preds = %bb
- %43 = bitcast %struct.btCollisionShape* %39 to %struct.btGImpactShapeInterface* ; [#uses=1]
- tail call void @_ZN27btGImpactCollisionAlgorithm18gimpact_vs_gimpactEP17btCollisionObjectS1_P23btGImpactShapeInterfaceS3_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %37, %struct.btGImpactShapeInterface* %43)
- ret void
-
-bb3: ; preds = %bb
- tail call void @_ZN27btGImpactCollisionAlgorithm16gimpact_vs_shapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP16btCollisionShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1, %struct.btGImpactShapeInterface* %37, %struct.btCollisionShape* %39, i8 zeroext 0)
- ret void
-
-bb4: ; preds = %_ZN27btGImpactCollisionAlgorithm10clearCacheEv.exit
- %44 = getelementptr inbounds %struct.btCollisionObject* %body1, i32 0, i32 9 ; [#uses=1]
- %45 = load %struct.btCollisionShape** %44, align 4 ; [#uses=2]
- %46 = getelementptr inbounds %struct.btCollisionShape* %45, i32 0, i32 1 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = icmp eq i32 %47, 25 ; [#uses=1]
- br i1 %48, label %bb6, label %return
-
-bb6: ; preds = %bb4
- %49 = bitcast %struct.btCollisionShape* %45 to %struct.btGImpactShapeInterface* ; [#uses=1]
- tail call void @_ZN27btGImpactCollisionAlgorithm16gimpact_vs_shapeEP17btCollisionObjectS1_P23btGImpactShapeInterfaceP16btCollisionShapeb(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionObject* %body1, %struct.btCollisionObject* %body0, %struct.btGImpactShapeInterface* %49, %struct.btCollisionShape* %33, i8 zeroext 1)
- ret void
-
-return: ; preds = %bb4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithmD0Ev(%struct.btGImpactCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btGImpactCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %2 = load %struct.btPersistentManifold** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btPersistentManifold* %2, null ; [#uses=1]
- br i1 %3, label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %10(%struct.btActionInterface* %5, %struct.btPersistentManifold* %2)
- to label %.noexc unwind label %lpad
-
-.noexc: ; preds = %bb.i.i
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %1, align 4
- br label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
-
-_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i: ; preds = %.noexc, %entry
- %11 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=3]
- %12 = load %struct.btCollisionAlgorithm** %11, align 4 ; [#uses=3]
- %13 = icmp eq %struct.btCollisionAlgorithm* %12, null ; [#uses=1]
- br i1 %13, label %bb3, label %bb.i1.i
-
-bb.i1.i: ; preds = %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %14 = getelementptr inbounds %struct.btCollisionAlgorithm* %12, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %17(%struct.btCollisionAlgorithm* %12)
- to label %.noexc15 unwind label %lpad
-
-.noexc15: ; preds = %bb.i1.i
- %18 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load %struct.btActionInterface** %18, align 4 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btActionInterface* %19, i32 0, i32 0 ; [#uses=1]
- %21 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 13 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = load %struct.btCollisionAlgorithm** %11, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %23 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %26 = bitcast %struct.btCollisionAlgorithm* %24 to i8* ; [#uses=1]
- invoke void %25(%struct.btActionInterface* %19, i8* %26)
- to label %.noexc16 unwind label %lpad
-
-.noexc16: ; preds = %.noexc15
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %11, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %.noexc16, %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %27 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i32 -1, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 -1, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 -1, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- store i32 -1, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %31)
- %32 = bitcast %struct.btGImpactCollisionAlgorithm* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %32) nounwind
- ret void
-
-lpad: ; preds = %.noexc15, %bb.i1.i, %bb.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %33 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %33)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN27btGImpactCollisionAlgorithmD1Ev(%struct.btGImpactCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btGImpactCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %2 = load %struct.btPersistentManifold** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btPersistentManifold* %2, null ; [#uses=1]
- br i1 %3, label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %10(%struct.btActionInterface* %5, %struct.btPersistentManifold* %2)
- to label %.noexc unwind label %lpad
-
-.noexc: ; preds = %bb.i.i
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %1, align 4
- br label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
-
-_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i: ; preds = %.noexc, %entry
- %11 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=3]
- %12 = load %struct.btCollisionAlgorithm** %11, align 4 ; [#uses=3]
- %13 = icmp eq %struct.btCollisionAlgorithm* %12, null ; [#uses=1]
- br i1 %13, label %bb3, label %bb.i1.i
-
-bb.i1.i: ; preds = %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %14 = getelementptr inbounds %struct.btCollisionAlgorithm* %12, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %17(%struct.btCollisionAlgorithm* %12)
- to label %.noexc15 unwind label %lpad
-
-.noexc15: ; preds = %bb.i1.i
- %18 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load %struct.btActionInterface** %18, align 4 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btActionInterface* %19, i32 0, i32 0 ; [#uses=1]
- %21 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 13 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = load %struct.btCollisionAlgorithm** %11, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %23 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %26 = bitcast %struct.btCollisionAlgorithm* %24 to i8* ; [#uses=1]
- invoke void %25(%struct.btActionInterface* %19, i8* %26)
- to label %.noexc16 unwind label %lpad
-
-.noexc16: ; preds = %.noexc15
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %11, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %.noexc16, %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %27 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i32 -1, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 -1, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 -1, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- store i32 -1, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %31)
- ret void
-
-lpad: ; preds = %.noexc15, %bb.i1.i, %bb.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %32 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %32)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN27btGImpactCollisionAlgorithmD2Ev(%struct.btGImpactCollisionAlgorithm* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btGImpactCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=2]
- %2 = load %struct.btPersistentManifold** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btPersistentManifold* %2, null ; [#uses=1]
- br i1 %3, label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btActionInterface*, %struct.btPersistentManifold*)* ; [#uses=1]
- invoke void %10(%struct.btActionInterface* %5, %struct.btPersistentManifold* %2)
- to label %.noexc unwind label %lpad
-
-.noexc: ; preds = %bb.i.i
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %1, align 4
- br label %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
-
-_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i: ; preds = %.noexc, %entry
- %11 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=3]
- %12 = load %struct.btCollisionAlgorithm** %11, align 4 ; [#uses=3]
- %13 = icmp eq %struct.btCollisionAlgorithm* %12, null ; [#uses=1]
- br i1 %13, label %bb3, label %bb.i1.i
-
-bb.i1.i: ; preds = %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %14 = getelementptr inbounds %struct.btCollisionAlgorithm* %12, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to void (%struct.btCollisionAlgorithm*)* ; [#uses=1]
- invoke void %17(%struct.btCollisionAlgorithm* %12)
- to label %.noexc15 unwind label %lpad
-
-.noexc15: ; preds = %bb.i1.i
- %18 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load %struct.btActionInterface** %18, align 4 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btActionInterface* %19, i32 0, i32 0 ; [#uses=1]
- %21 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 13 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = load %struct.btCollisionAlgorithm** %11, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %23 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %26 = bitcast %struct.btCollisionAlgorithm* %24 to i8* ; [#uses=1]
- invoke void %25(%struct.btActionInterface* %19, i8* %26)
- to label %.noexc16 unwind label %lpad
-
-.noexc16: ; preds = %.noexc15
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %11, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %.noexc16, %_ZN27btGImpactCollisionAlgorithm23destroyContactManifoldsEv.exit.i
- %27 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 5 ; [#uses=1]
- store i32 -1, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 6 ; [#uses=1]
- store i32 -1, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 7 ; [#uses=1]
- store i32 -1, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 8 ; [#uses=1]
- store i32 -1, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %31)
- ret void
-
-lpad: ; preds = %.noexc15, %bb.i1.i, %bb.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %32 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN30btActivatingCollisionAlgorithmD2Ev(%struct.btActivatingCollisionAlgorithm* %32)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN27btGImpactCollisionAlgorithmC1ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btGImpactCollisionAlgorithm* %this, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN30btActivatingCollisionAlgorithmC2ERK36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_(%struct.btActivatingCollisionAlgorithm* %0, %struct.btCollisionAlgorithmConstructionInfo* %ci, %struct.btCollisionObject* %body0, %struct.btCollisionObject* %body1)
- %1 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV27btGImpactCollisionAlgorithm, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %2, align 4
- %3 = getelementptr inbounds %struct.btGImpactCollisionAlgorithm* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionAlgorithm* null, %struct.btCollisionAlgorithm** %3, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN18btQuantizedBvhTree17calc_quantizationER18GIM_BVH_DATA_ARRAYf(%struct.btQuantizedBvhTree* nocapture %this, %struct.GIM_BVH_DATA_ARRAY* nocapture %primitive_boxes, float %boundMargin) nounwind align 2 {
-entry:
- %global_bound = alloca %struct.GIM_AABB, align 8 ; [#uses=12]
- %0 = getelementptr inbounds %struct.GIM_AABB* %global_bound, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %0, align 8
- %1 = getelementptr inbounds %struct.GIM_AABB* %global_bound, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %1, align 4
- %2 = getelementptr inbounds %struct.GIM_AABB* %global_bound, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %2, align 8
- %3 = getelementptr inbounds %struct.GIM_AABB* %global_bound, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %3, align 8
- %4 = getelementptr inbounds %struct.GIM_AABB* %global_bound, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %4, align 4
- %5 = getelementptr inbounds %struct.GIM_AABB* %global_bound, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %5, align 8
- %6 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=2]
- %8 = icmp sgt i32 %7, 0 ; [#uses=1]
- br i1 %8, label %bb.nph, label %bb2
-
-bb.nph: ; preds = %entry
- %9 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %10 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.144.0.i, %bb ] ; [#uses=1]
- %11 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.143.0.i, %bb ] ; [#uses=1]
- %12 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.142.0.i, %bb ] ; [#uses=1]
- %13 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.141.0.i, %bb ] ; [#uses=1]
- %14 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.140.0.i, %bb ] ; [#uses=1]
- %15 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.139.0.i, %bb ] ; [#uses=1]
- %i.03 = phi i32 [ 0, %bb.nph ], [ %29, %bb ] ; [#uses=8]
- %16 = load %struct.GIM_AABB_DATA** %9, align 4 ; [#uses=7]
- %scevgep1516 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %i.03, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %scevgep1516, align 4 ; [#uses=1]
- %18 = fcmp ogt float %15, %17 ; [#uses=1]
- %scevgep1314 = getelementptr inbounds %struct.GIM_AABB_DATA* %16, i32 %i.03, i32 0 ; [#uses=6]
- %box.pn25.i = select i1 %18, %struct.GIM_AABB* %scevgep1314, %struct.GIM_AABB* %global_bound ; [#uses=1]
- %iftmp.139.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.139.0.i = load float* %iftmp.139.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.139.0.i, float* %0, align 8
- %scevgep17 = getelementptr %struct.GIM_AABB_DATA* %16, i32 %i.03, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %scevgep17, align 4 ; [#uses=1]
- %20 = fcmp ogt float %14, %19 ; [#uses=1]
- %box.pn24.i = select i1 %20, %struct.GIM_AABB* %scevgep1314, %struct.GIM_AABB* %global_bound ; [#uses=1]
- %iftmp.140.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.140.0.i = load float* %iftmp.140.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.140.0.i, float* %1, align 4
- %scevgep18 = getelementptr %struct.GIM_AABB_DATA* %16, i32 %i.03, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %scevgep18, align 4 ; [#uses=1]
- %22 = fcmp ogt float %13, %21 ; [#uses=1]
- %box.pn23.i = select i1 %22, %struct.GIM_AABB* %scevgep1314, %struct.GIM_AABB* %global_bound ; [#uses=1]
- %iftmp.141.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.141.0.i = load float* %iftmp.141.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.141.0.i, float* %2, align 8
- %scevgep19 = getelementptr %struct.GIM_AABB_DATA* %16, i32 %i.03, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %scevgep19, align 4 ; [#uses=1]
- %24 = fcmp olt float %12, %23 ; [#uses=1]
- %box.pn22.i = select i1 %24, %struct.GIM_AABB* %scevgep1314, %struct.GIM_AABB* %global_bound ; [#uses=1]
- %iftmp.142.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.142.0.i = load float* %iftmp.142.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.142.0.i, float* %3, align 8
- %scevgep20 = getelementptr %struct.GIM_AABB_DATA* %16, i32 %i.03, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %scevgep20, align 4 ; [#uses=1]
- %26 = fcmp olt float %11, %25 ; [#uses=1]
- %box.pn21.i = select i1 %26, %struct.GIM_AABB* %scevgep1314, %struct.GIM_AABB* %global_bound ; [#uses=1]
- %iftmp.143.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.143.0.i = load float* %iftmp.143.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.143.0.i, float* %4, align 4
- %scevgep21 = getelementptr %struct.GIM_AABB_DATA* %16, i32 %i.03, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %scevgep21, align 4 ; [#uses=1]
- %28 = fcmp olt float %10, %27 ; [#uses=1]
- %box.pn.i = select i1 %28, %struct.GIM_AABB* %scevgep1314, %struct.GIM_AABB* %global_bound ; [#uses=1]
- %iftmp.144.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.144.0.i = load float* %iftmp.144.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.144.0.i, float* %5, align 8
- %29 = add nsw i32 %i.03, 1 ; [#uses=2]
- %30 = icmp sgt i32 %7, %29 ; [#uses=1]
- br i1 %30, label %bb, label %bb2
-
-bb2: ; preds = %bb, %entry
- %31 = phi float [ 0xC7EFFFFFE0000000, %entry ], [ %iftmp.142.0.i, %bb ] ; [#uses=1]
- %32 = phi float [ 0xC7EFFFFFE0000000, %entry ], [ %iftmp.143.0.i, %bb ] ; [#uses=1]
- %33 = phi float [ 0xC7EFFFFFE0000000, %entry ], [ %iftmp.144.0.i, %bb ] ; [#uses=1]
- %34 = phi float [ 0x47EFFFFFE0000000, %entry ], [ %iftmp.139.0.i, %bb ] ; [#uses=1]
- %35 = phi float [ 0x47EFFFFFE0000000, %entry ], [ %iftmp.140.0.i, %bb ] ; [#uses=1]
- %36 = phi float [ 0x47EFFFFFE0000000, %entry ], [ %iftmp.141.0.i, %bb ] ; [#uses=1]
- %37 = fsub float %36, %boundMargin ; [#uses=2]
- %38 = fsub float %35, %boundMargin ; [#uses=2]
- %39 = fsub float %34, %boundMargin ; [#uses=2]
- %40 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %39, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %37, float* %42, align 4
- %43 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- %44 = fadd float %33, %boundMargin ; [#uses=2]
- %45 = fadd float %32, %boundMargin ; [#uses=2]
- %46 = fadd float %31, %boundMargin ; [#uses=2]
- %47 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %46, float* %47, align 4
- %48 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %45, float* %48, align 4
- %49 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %44, float* %49, align 4
- %50 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %50, align 4
- %51 = fsub float %44, %37 ; [#uses=1]
- %52 = fsub float %45, %38 ; [#uses=1]
- %53 = fsub float %46, %39 ; [#uses=1]
- %54 = fdiv float 6.553500e+04, %51 ; [#uses=1]
- %55 = fdiv float 6.553500e+04, %52 ; [#uses=1]
- %56 = fdiv float 6.553500e+04, %53 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %55, float* %58, align 4
- %59 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %54, float* %59, align 4
- %60 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btGImpactQuantizedBvh5refitEv(%struct.btGImpactBoxSet* %this) align 2 {
-entry:
- %leafbox = alloca %struct.GIM_AABB, align 8 ; [#uses=7]
- %bound = alloca %struct.GIM_AABB, align 8 ; [#uses=18]
- %temp_box = alloca %struct.GIM_AABB, align 8 ; [#uses=20]
- %0 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %4 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %5 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %6 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %7 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %8 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %9 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=6]
- %11 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=6]
- %12 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=6]
- %13 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=4]
- %14 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=4]
- %16 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=6]
- %17 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=6]
- %18 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=6]
- %19 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %20 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %21 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %22 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %23 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %24 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %25 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %26 = getelementptr inbounds %struct.GIM_AABB* %temp_box, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 1 ; [#uses=1]
- %28 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.GIM_AABB* %leafbox, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %tmp57 = add i32 %1, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7.backedge, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb7.backedge ] ; [#uses=4]
- %nodecount.040 = sub i32 %1, %indvar ; [#uses=20]
- %tmp58 = sub i32 %tmp57, %indvar ; [#uses=2]
- %34 = load %struct.BT_QUANTIZED_BVH_NODE** %3, align 4 ; [#uses=17]
- %scevgep73 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 0, i32 -2 ; [#uses=1]
- %scevgep7374 = bitcast i16* %scevgep73 to i32* ; [#uses=1]
- %35 = load i32* %scevgep7374, align 4 ; [#uses=2]
- %toBool = icmp slt i32 %35, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %36 = load %struct.btActionInterface** %27, align 4 ; [#uses=2]
- %37 = getelementptr inbounds %struct.btActionInterface* %36, i32 0, i32 0 ; [#uses=1]
- %38 = load i32 (...)*** %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32 (...)** %38, i32 4 ; [#uses=1]
- %40 = load i32 (...)** %39, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %40 to void (%struct.btActionInterface*, i32, %struct.GIM_AABB*)* ; [#uses=1]
- call void %41(%struct.btActionInterface* %36, i32 %35, %struct.GIM_AABB* %leafbox)
- %42 = load %struct.BT_QUANTIZED_BVH_NODE** %3, align 4 ; [#uses=3]
- %43 = load float* %28, align 8 ; [#uses=2]
- %44 = load float* %29, align 4 ; [#uses=2]
- %45 = load float* %30, align 8 ; [#uses=2]
- %46 = load float* %10, align 4 ; [#uses=3]
- %47 = fcmp olt float %43, %46 ; [#uses=1]
- %clampedPoint.0.0.0.i1.i.i28 = select i1 %47, float %46, float %43 ; [#uses=2]
- %48 = load float* %11, align 4 ; [#uses=3]
- %49 = fcmp olt float %44, %48 ; [#uses=1]
- %clampedPoint.0.1.0.i2.i.i29 = select i1 %49, float %48, float %44 ; [#uses=2]
- %50 = load float* %12, align 4 ; [#uses=3]
- %51 = fcmp olt float %45, %50 ; [#uses=1]
- %clampedPoint.0.2.0.i3.i.i30 = select i1 %51, float %50, float %45 ; [#uses=2]
- %52 = load float* %13, align 4 ; [#uses=2]
- %53 = fcmp olt float %52, %clampedPoint.0.0.0.i1.i.i28 ; [#uses=1]
- %clampedPoint.0.0.1.i4.i.i31 = select i1 %53, float %52, float %clampedPoint.0.0.0.i1.i.i28 ; [#uses=1]
- %54 = load float* %14, align 4 ; [#uses=2]
- %55 = fcmp olt float %54, %clampedPoint.0.1.0.i2.i.i29 ; [#uses=1]
- %clampedPoint.0.1.1.i5.i.i32 = select i1 %55, float %54, float %clampedPoint.0.1.0.i2.i.i29 ; [#uses=1]
- %56 = load float* %15, align 4 ; [#uses=2]
- %57 = fcmp olt float %56, %clampedPoint.0.2.0.i3.i.i30 ; [#uses=1]
- %clampedPoint.0.2.1.i6.i.i33 = select i1 %57, float %56, float %clampedPoint.0.2.0.i3.i.i30 ; [#uses=1]
- %58 = fsub float %clampedPoint.0.2.1.i6.i.i33, %50 ; [#uses=1]
- %59 = fsub float %clampedPoint.0.1.1.i5.i.i32, %48 ; [#uses=1]
- %60 = fsub float %clampedPoint.0.0.1.i4.i.i31, %46 ; [#uses=1]
- %61 = load float* %16, align 4 ; [#uses=1]
- %62 = fmul float %58, %61 ; [#uses=1]
- %63 = load float* %17, align 4 ; [#uses=1]
- %64 = fmul float %59, %63 ; [#uses=1]
- %65 = load float* %18, align 4 ; [#uses=1]
- %66 = fmul float %60, %65 ; [#uses=1]
- %67 = fadd float %66, 5.000000e-01 ; [#uses=1]
- %68 = fptoui float %67 to i16 ; [#uses=1]
- %scevgep6667 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %42, i32 %tmp58, i32 0, i32 0 ; [#uses=1]
- store i16 %68, i16* %scevgep6667, align 2
- %69 = fadd float %64, 5.000000e-01 ; [#uses=1]
- %70 = fptoui float %69 to i16 ; [#uses=1]
- %scevgep68 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %42, i32 %nodecount.040, i32 0, i32 -7 ; [#uses=1]
- store i16 %70, i16* %scevgep68, align 2
- %71 = fadd float %62, 5.000000e-01 ; [#uses=1]
- %72 = fptoui float %71 to i16 ; [#uses=1]
- %scevgep69 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %42, i32 %nodecount.040, i32 0, i32 -6 ; [#uses=1]
- store i16 %72, i16* %scevgep69, align 2
- %73 = load %struct.BT_QUANTIZED_BVH_NODE** %3, align 4 ; [#uses=3]
- %74 = load float* %31, align 8 ; [#uses=2]
- %75 = load float* %32, align 4 ; [#uses=2]
- %76 = load float* %33, align 8 ; [#uses=2]
- %77 = load float* %10, align 4 ; [#uses=3]
- %78 = fcmp olt float %74, %77 ; [#uses=1]
- %clampedPoint.0.0.0.i.i.i34 = select i1 %78, float %77, float %74 ; [#uses=2]
- %79 = load float* %11, align 4 ; [#uses=3]
- %80 = fcmp olt float %75, %79 ; [#uses=1]
- %clampedPoint.0.1.0.i.i.i35 = select i1 %80, float %79, float %75 ; [#uses=2]
- %81 = load float* %12, align 4 ; [#uses=3]
- %82 = fcmp olt float %76, %81 ; [#uses=1]
- %clampedPoint.0.2.0.i.i.i36 = select i1 %82, float %81, float %76 ; [#uses=2]
- %83 = load float* %13, align 4 ; [#uses=2]
- %84 = fcmp olt float %83, %clampedPoint.0.0.0.i.i.i34 ; [#uses=1]
- %clampedPoint.0.0.1.i.i.i37 = select i1 %84, float %83, float %clampedPoint.0.0.0.i.i.i34 ; [#uses=1]
- %85 = load float* %14, align 4 ; [#uses=2]
- %86 = fcmp olt float %85, %clampedPoint.0.1.0.i.i.i35 ; [#uses=1]
- %clampedPoint.0.1.1.i.i.i38 = select i1 %86, float %85, float %clampedPoint.0.1.0.i.i.i35 ; [#uses=1]
- %87 = load float* %15, align 4 ; [#uses=2]
- %88 = fcmp olt float %87, %clampedPoint.0.2.0.i.i.i36 ; [#uses=1]
- %clampedPoint.0.2.1.i.i.i39 = select i1 %88, float %87, float %clampedPoint.0.2.0.i.i.i36 ; [#uses=1]
- %89 = fsub float %clampedPoint.0.2.1.i.i.i39, %81 ; [#uses=1]
- %90 = fsub float %clampedPoint.0.1.1.i.i.i38, %79 ; [#uses=1]
- %91 = fsub float %clampedPoint.0.0.1.i.i.i37, %77 ; [#uses=1]
- %92 = load float* %16, align 4 ; [#uses=1]
- %93 = fmul float %89, %92 ; [#uses=1]
- %94 = load float* %17, align 4 ; [#uses=1]
- %95 = fmul float %90, %94 ; [#uses=1]
- %96 = load float* %18, align 4 ; [#uses=1]
- %97 = fmul float %91, %96 ; [#uses=1]
- %98 = fadd float %97, 5.000000e-01 ; [#uses=1]
- %99 = fptoui float %98 to i16 ; [#uses=1]
- %scevgep70 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %73, i32 %nodecount.040, i32 0, i32 -5 ; [#uses=1]
- store i16 %99, i16* %scevgep70, align 2
- %100 = fadd float %95, 5.000000e-01 ; [#uses=1]
- %101 = fptoui float %100 to i16 ; [#uses=1]
- %scevgep71 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %73, i32 %nodecount.040, i32 0, i32 -4 ; [#uses=1]
- store i16 %101, i16* %scevgep71, align 2
- %102 = fadd float %93, 5.000000e-01 ; [#uses=1]
- %103 = fptoui float %102 to i16 ; [#uses=1]
- %scevgep72 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %73, i32 %nodecount.040, i32 0, i32 -3 ; [#uses=1]
- store i16 %103, i16* %scevgep72, align 2
- br label %bb7.backedge
-
-bb7.backedge: ; preds = %bb6, %bb1
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %1 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-bb2: ; preds = %bb
- store float 0x47EFFFFFE0000000, float* %4, align 8
- store float 0x47EFFFFFE0000000, float* %5, align 4
- store float 0x47EFFFFFE0000000, float* %6, align 8
- store float 0xC7EFFFFFE0000000, float* %7, align 8
- store float 0xC7EFFFFFE0000000, float* %8, align 4
- store float 0xC7EFFFFFE0000000, float* %9, align 8
- %104 = icmp eq i32 %1, %indvar ; [#uses=1]
- br i1 %104, label %bb4, label %bb3
-
-bb3: ; preds = %bb2
- %scevgep44 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 0, i32 2 ; [#uses=1]
- %105 = load i16* %scevgep44, align 2 ; [#uses=1]
- %106 = uitofp i16 %105 to float ; [#uses=1]
- %107 = load float* %16, align 4 ; [#uses=2]
- %108 = fdiv float %106, %107 ; [#uses=1]
- %scevgep45 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 0, i32 1 ; [#uses=1]
- %109 = load i16* %scevgep45, align 2 ; [#uses=1]
- %110 = uitofp i16 %109 to float ; [#uses=1]
- %111 = load float* %17, align 4 ; [#uses=2]
- %112 = fdiv float %110, %111 ; [#uses=1]
- %scevgep43 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 0, i32 0 ; [#uses=1]
- %113 = load i16* %scevgep43, align 2 ; [#uses=1]
- %114 = uitofp i16 %113 to float ; [#uses=1]
- %115 = load float* %18, align 4 ; [#uses=2]
- %116 = fdiv float %114, %115 ; [#uses=1]
- %117 = load float* %10, align 4 ; [#uses=2]
- %118 = fadd float %116, %117 ; [#uses=2]
- %119 = load float* %11, align 4 ; [#uses=2]
- %120 = fadd float %112, %119 ; [#uses=2]
- %121 = load float* %12, align 4 ; [#uses=2]
- %122 = fadd float %108, %121 ; [#uses=2]
- store float %118, float* %19, align 8
- store float %120, float* %20, align 4
- store float %122, float* %21, align 8
- store float 0.000000e+00, float* %22, align 4
- %scevgep47 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 1, i32 2 ; [#uses=1]
- %123 = load i16* %scevgep47, align 2 ; [#uses=1]
- %124 = uitofp i16 %123 to float ; [#uses=1]
- %125 = fdiv float %124, %107 ; [#uses=1]
- %scevgep48 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 1, i32 1 ; [#uses=1]
- %126 = load i16* %scevgep48, align 2 ; [#uses=1]
- %127 = uitofp i16 %126 to float ; [#uses=1]
- %128 = fdiv float %127, %111 ; [#uses=1]
- %scevgep46 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 1, i32 0 ; [#uses=1]
- %129 = load i16* %scevgep46, align 2 ; [#uses=1]
- %130 = uitofp i16 %129 to float ; [#uses=1]
- %131 = fdiv float %130, %115 ; [#uses=1]
- %132 = fadd float %131, %117 ; [#uses=2]
- %133 = fadd float %128, %119 ; [#uses=2]
- %134 = fadd float %125, %121 ; [#uses=2]
- store float %132, float* %23, align 8
- store float %133, float* %24, align 4
- store float %134, float* %25, align 8
- store float 0.000000e+00, float* %26, align 4
- %135 = fcmp olt float %118, 0x47EFFFFFE0000000 ; [#uses=1]
- %box.pn25.i10 = select i1 %135, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.139.0.in.i11 = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i10, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.139.0.i12 = load float* %iftmp.139.0.in.i11, align 8 ; [#uses=2]
- store float %iftmp.139.0.i12, float* %4, align 8
- %136 = fcmp olt float %120, 0x47EFFFFFE0000000 ; [#uses=1]
- %box.pn24.i13 = select i1 %136, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.140.0.in.i14 = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i13, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.140.0.i15 = load float* %iftmp.140.0.in.i14, align 4 ; [#uses=2]
- store float %iftmp.140.0.i15, float* %5, align 4
- %137 = fcmp olt float %122, 0x47EFFFFFE0000000 ; [#uses=1]
- %box.pn23.i16 = select i1 %137, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.141.0.in.i17 = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i16, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.141.0.i18 = load float* %iftmp.141.0.in.i17, align 8 ; [#uses=2]
- store float %iftmp.141.0.i18, float* %6, align 8
- %138 = fcmp ogt float %132, 0xC7EFFFFFE0000000 ; [#uses=1]
- %box.pn22.i19 = select i1 %138, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.142.0.in.i20 = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i19, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.142.0.i21 = load float* %iftmp.142.0.in.i20, align 8 ; [#uses=2]
- store float %iftmp.142.0.i21, float* %7, align 8
- %139 = fcmp ogt float %133, 0xC7EFFFFFE0000000 ; [#uses=1]
- %box.pn21.i22 = select i1 %139, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.143.0.in.i23 = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i22, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.143.0.i24 = load float* %iftmp.143.0.in.i23, align 4 ; [#uses=2]
- store float %iftmp.143.0.i24, float* %8, align 4
- %140 = fcmp ogt float %134, 0xC7EFFFFFE0000000 ; [#uses=1]
- %box.pn.i25 = select i1 %140, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.144.0.in.i26 = getelementptr inbounds %struct.GIM_AABB* %box.pn.i25, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.144.0.i27 = load float* %iftmp.144.0.in.i26, align 8 ; [#uses=2]
- store float %iftmp.144.0.i27, float* %9, align 8
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %141 = phi float [ 0xC7EFFFFFE0000000, %bb2 ], [ %iftmp.144.0.i27, %bb3 ] ; [#uses=1]
- %142 = phi float [ 0xC7EFFFFFE0000000, %bb2 ], [ %iftmp.143.0.i24, %bb3 ] ; [#uses=1]
- %143 = phi float [ 0xC7EFFFFFE0000000, %bb2 ], [ %iftmp.142.0.i21, %bb3 ] ; [#uses=1]
- %144 = phi float [ 0x47EFFFFFE0000000, %bb2 ], [ %iftmp.141.0.i18, %bb3 ] ; [#uses=2]
- %145 = phi float [ 0x47EFFFFFE0000000, %bb2 ], [ %iftmp.140.0.i15, %bb3 ] ; [#uses=2]
- %146 = phi float [ 0x47EFFFFFE0000000, %bb2 ], [ %iftmp.139.0.i12, %bb3 ] ; [#uses=2]
- %scevgep49 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 2 ; [#uses=1]
- %147 = load i32* %scevgep49, align 4 ; [#uses=2]
- %toBool.i.i = icmp slt i32 %147, 0 ; [#uses=1]
- %tmp = sub i32 0, %147 ; [#uses=1]
- %.p = select i1 %toBool.i.i, i32 %tmp, i32 1 ; [#uses=2]
- %tmp56 = sub i32 0, %nodecount.040 ; [#uses=1]
- %148 = icmp eq i32 %.p, %tmp56 ; [#uses=1]
- br i1 %148, label %bb4.bb6_crit_edge, label %bb5
-
-bb4.bb6_crit_edge: ; preds = %bb4
- %.pre = load float* %10, align 4 ; [#uses=1]
- %.pre77 = load float* %11, align 4 ; [#uses=1]
- %.pre78 = load float* %12, align 4 ; [#uses=1]
- %.pre79 = load float* %16, align 4 ; [#uses=1]
- %.pre80 = load float* %17, align 4 ; [#uses=1]
- %.pre81 = load float* %18, align 4 ; [#uses=1]
- br label %bb6
-
-bb5: ; preds = %bb4
- %tmp55 = add i32 %.p, %nodecount.040 ; [#uses=6]
- %149 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %tmp55, i32 0, i32 0 ; [#uses=1]
- %150 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %tmp55, i32 0, i32 2 ; [#uses=1]
- %151 = load i16* %150, align 2 ; [#uses=1]
- %152 = uitofp i16 %151 to float ; [#uses=1]
- %153 = load float* %16, align 4 ; [#uses=3]
- %154 = fdiv float %152, %153 ; [#uses=1]
- %155 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %tmp55, i32 0, i32 1 ; [#uses=1]
- %156 = load i16* %155, align 2 ; [#uses=1]
- %157 = uitofp i16 %156 to float ; [#uses=1]
- %158 = load float* %17, align 4 ; [#uses=3]
- %159 = fdiv float %157, %158 ; [#uses=1]
- %160 = load i16* %149, align 2 ; [#uses=1]
- %161 = uitofp i16 %160 to float ; [#uses=1]
- %162 = load float* %18, align 4 ; [#uses=3]
- %163 = fdiv float %161, %162 ; [#uses=1]
- %164 = load float* %10, align 4 ; [#uses=3]
- %165 = fadd float %163, %164 ; [#uses=2]
- %166 = load float* %11, align 4 ; [#uses=3]
- %167 = fadd float %159, %166 ; [#uses=2]
- %168 = load float* %12, align 4 ; [#uses=3]
- %169 = fadd float %154, %168 ; [#uses=2]
- store float %165, float* %19, align 8
- store float %167, float* %20, align 4
- store float %169, float* %21, align 8
- store float 0.000000e+00, float* %22, align 4
- %170 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %tmp55, i32 1, i32 0 ; [#uses=1]
- %171 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %tmp55, i32 1, i32 2 ; [#uses=1]
- %172 = load i16* %171, align 2 ; [#uses=1]
- %173 = uitofp i16 %172 to float ; [#uses=1]
- %174 = fdiv float %173, %153 ; [#uses=1]
- %175 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %tmp55, i32 1, i32 1 ; [#uses=1]
- %176 = load i16* %175, align 2 ; [#uses=1]
- %177 = uitofp i16 %176 to float ; [#uses=1]
- %178 = fdiv float %177, %158 ; [#uses=1]
- %179 = load i16* %170, align 2 ; [#uses=1]
- %180 = uitofp i16 %179 to float ; [#uses=1]
- %181 = fdiv float %180, %162 ; [#uses=1]
- %182 = fadd float %181, %164 ; [#uses=2]
- %183 = fadd float %178, %166 ; [#uses=2]
- %184 = fadd float %174, %168 ; [#uses=2]
- store float %182, float* %23, align 8
- store float %183, float* %24, align 4
- store float %184, float* %25, align 8
- store float 0.000000e+00, float* %26, align 4
- %185 = fcmp ogt float %146, %165 ; [#uses=1]
- %box.pn25.i = select i1 %185, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.139.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.139.0.i = load float* %iftmp.139.0.in.i, align 8 ; [#uses=2]
- store float %iftmp.139.0.i, float* %4, align 8
- %186 = fcmp ogt float %145, %167 ; [#uses=1]
- %box.pn24.i = select i1 %186, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.140.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.140.0.i = load float* %iftmp.140.0.in.i, align 4 ; [#uses=2]
- store float %iftmp.140.0.i, float* %5, align 4
- %187 = fcmp ogt float %144, %169 ; [#uses=1]
- %box.pn23.i = select i1 %187, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.141.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.141.0.i = load float* %iftmp.141.0.in.i, align 8 ; [#uses=2]
- store float %iftmp.141.0.i, float* %6, align 8
- %188 = fcmp olt float %143, %182 ; [#uses=1]
- %box.pn22.i = select i1 %188, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.142.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.142.0.i = load float* %iftmp.142.0.in.i, align 8 ; [#uses=1]
- store float %iftmp.142.0.i, float* %7, align 8
- %189 = fcmp olt float %142, %183 ; [#uses=1]
- %box.pn21.i = select i1 %189, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.143.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.143.0.i = load float* %iftmp.143.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.143.0.i, float* %8, align 4
- %190 = fcmp olt float %141, %184 ; [#uses=1]
- %box.pn.i = select i1 %190, %struct.GIM_AABB* %temp_box, %struct.GIM_AABB* %bound ; [#uses=1]
- %iftmp.144.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.144.0.i = load float* %iftmp.144.0.in.i, align 8 ; [#uses=1]
- store float %iftmp.144.0.i, float* %9, align 8
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4.bb6_crit_edge
- %191 = phi float [ %.pre81, %bb4.bb6_crit_edge ], [ %162, %bb5 ] ; [#uses=1]
- %192 = phi float [ %.pre80, %bb4.bb6_crit_edge ], [ %158, %bb5 ] ; [#uses=1]
- %193 = phi float [ %.pre79, %bb4.bb6_crit_edge ], [ %153, %bb5 ] ; [#uses=1]
- %194 = phi float [ %.pre78, %bb4.bb6_crit_edge ], [ %168, %bb5 ] ; [#uses=3]
- %195 = phi float [ %.pre77, %bb4.bb6_crit_edge ], [ %166, %bb5 ] ; [#uses=3]
- %196 = phi float [ %.pre, %bb4.bb6_crit_edge ], [ %164, %bb5 ] ; [#uses=3]
- %197 = phi float [ %144, %bb4.bb6_crit_edge ], [ %iftmp.141.0.i, %bb5 ] ; [#uses=2]
- %198 = phi float [ %145, %bb4.bb6_crit_edge ], [ %iftmp.140.0.i, %bb5 ] ; [#uses=2]
- %199 = phi float [ %146, %bb4.bb6_crit_edge ], [ %iftmp.139.0.i, %bb5 ] ; [#uses=2]
- %200 = fcmp olt float %199, %196 ; [#uses=1]
- %clampedPoint.0.0.0.i1.i.i = select i1 %200, float %196, float %199 ; [#uses=2]
- %201 = fcmp olt float %198, %195 ; [#uses=1]
- %clampedPoint.0.1.0.i2.i.i = select i1 %201, float %195, float %198 ; [#uses=2]
- %202 = fcmp olt float %197, %194 ; [#uses=1]
- %clampedPoint.0.2.0.i3.i.i = select i1 %202, float %194, float %197 ; [#uses=2]
- %203 = load float* %13, align 4 ; [#uses=2]
- %204 = fcmp olt float %203, %clampedPoint.0.0.0.i1.i.i ; [#uses=1]
- %clampedPoint.0.0.1.i4.i.i = select i1 %204, float %203, float %clampedPoint.0.0.0.i1.i.i ; [#uses=1]
- %205 = load float* %14, align 4 ; [#uses=2]
- %206 = fcmp olt float %205, %clampedPoint.0.1.0.i2.i.i ; [#uses=1]
- %clampedPoint.0.1.1.i5.i.i = select i1 %206, float %205, float %clampedPoint.0.1.0.i2.i.i ; [#uses=1]
- %207 = load float* %15, align 4 ; [#uses=2]
- %208 = fcmp olt float %207, %clampedPoint.0.2.0.i3.i.i ; [#uses=1]
- %clampedPoint.0.2.1.i6.i.i = select i1 %208, float %207, float %clampedPoint.0.2.0.i3.i.i ; [#uses=1]
- %209 = fsub float %clampedPoint.0.2.1.i6.i.i, %194 ; [#uses=1]
- %210 = fsub float %clampedPoint.0.1.1.i5.i.i, %195 ; [#uses=1]
- %211 = fsub float %clampedPoint.0.0.1.i4.i.i, %196 ; [#uses=1]
- %212 = fmul float %209, %193 ; [#uses=1]
- %213 = fmul float %210, %192 ; [#uses=1]
- %214 = fmul float %211, %191 ; [#uses=1]
- %215 = fadd float %214, 5.000000e-01 ; [#uses=1]
- %216 = fptoui float %215 to i16 ; [#uses=1]
- %scevgep5960 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %tmp58, i32 0, i32 0 ; [#uses=1]
- store i16 %216, i16* %scevgep5960, align 2
- %217 = fadd float %213, 5.000000e-01 ; [#uses=1]
- %218 = fptoui float %217 to i16 ; [#uses=1]
- %scevgep61 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 0, i32 -7 ; [#uses=1]
- store i16 %218, i16* %scevgep61, align 2
- %219 = fadd float %212, 5.000000e-01 ; [#uses=1]
- %220 = fptoui float %219 to i16 ; [#uses=1]
- %scevgep62 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %34, i32 %nodecount.040, i32 0, i32 -6 ; [#uses=1]
- store i16 %220, i16* %scevgep62, align 2
- %221 = load %struct.BT_QUANTIZED_BVH_NODE** %3, align 4 ; [#uses=3]
- %222 = load float* %7, align 8 ; [#uses=2]
- %223 = load float* %8, align 4 ; [#uses=2]
- %224 = load float* %9, align 8 ; [#uses=2]
- %225 = load float* %10, align 4 ; [#uses=3]
- %226 = fcmp olt float %222, %225 ; [#uses=1]
- %clampedPoint.0.0.0.i.i.i = select i1 %226, float %225, float %222 ; [#uses=2]
- %227 = load float* %11, align 4 ; [#uses=3]
- %228 = fcmp olt float %223, %227 ; [#uses=1]
- %clampedPoint.0.1.0.i.i.i = select i1 %228, float %227, float %223 ; [#uses=2]
- %229 = load float* %12, align 4 ; [#uses=3]
- %230 = fcmp olt float %224, %229 ; [#uses=1]
- %clampedPoint.0.2.0.i.i.i = select i1 %230, float %229, float %224 ; [#uses=2]
- %231 = load float* %13, align 4 ; [#uses=2]
- %232 = fcmp olt float %231, %clampedPoint.0.0.0.i.i.i ; [#uses=1]
- %clampedPoint.0.0.1.i.i.i = select i1 %232, float %231, float %clampedPoint.0.0.0.i.i.i ; [#uses=1]
- %233 = load float* %14, align 4 ; [#uses=2]
- %234 = fcmp olt float %233, %clampedPoint.0.1.0.i.i.i ; [#uses=1]
- %clampedPoint.0.1.1.i.i.i = select i1 %234, float %233, float %clampedPoint.0.1.0.i.i.i ; [#uses=1]
- %235 = load float* %15, align 4 ; [#uses=2]
- %236 = fcmp olt float %235, %clampedPoint.0.2.0.i.i.i ; [#uses=1]
- %clampedPoint.0.2.1.i.i.i = select i1 %236, float %235, float %clampedPoint.0.2.0.i.i.i ; [#uses=1]
- %237 = fsub float %clampedPoint.0.2.1.i.i.i, %229 ; [#uses=1]
- %238 = fsub float %clampedPoint.0.1.1.i.i.i, %227 ; [#uses=1]
- %239 = fsub float %clampedPoint.0.0.1.i.i.i, %225 ; [#uses=1]
- %240 = load float* %16, align 4 ; [#uses=1]
- %241 = fmul float %237, %240 ; [#uses=1]
- %242 = load float* %17, align 4 ; [#uses=1]
- %243 = fmul float %238, %242 ; [#uses=1]
- %244 = load float* %18, align 4 ; [#uses=1]
- %245 = fmul float %239, %244 ; [#uses=1]
- %246 = fadd float %245, 5.000000e-01 ; [#uses=1]
- %247 = fptoui float %246 to i16 ; [#uses=1]
- %scevgep63 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %221, i32 %nodecount.040, i32 0, i32 -5 ; [#uses=1]
- store i16 %247, i16* %scevgep63, align 2
- %248 = fadd float %243, 5.000000e-01 ; [#uses=1]
- %249 = fptoui float %248 to i16 ; [#uses=1]
- %scevgep64 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %221, i32 %nodecount.040, i32 0, i32 -4 ; [#uses=1]
- store i16 %249, i16* %scevgep64, align 2
- %250 = fadd float %241, 5.000000e-01 ; [#uses=1]
- %251 = fptoui float %250 to i16 ; [#uses=1]
- %scevgep65 = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %221, i32 %nodecount.040, i32 0, i32 -3 ; [#uses=1]
- store i16 %251, i16* %scevgep65, align 2
- br label %bb7.backedge
-
-return: ; preds = %bb7.backedge, %entry
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN18btQuantizedBvhTree20_calc_splitting_axisER18GIM_BVH_DATA_ARRAYii(%struct.btQuantizedBvhTree* nocapture %this, %struct.GIM_BVH_DATA_ARRAY* nocapture %primitive_boxes, i32 %startIndex, i32 %endIndex) nounwind readonly align 2 {
-entry:
- %0 = sub nsw i32 %endIndex, %startIndex ; [#uses=4]
- %1 = icmp slt i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %1, label %bb.nph45, label %bb2.thread
-
-bb2.thread: ; preds = %entry
- %2 = sitofp i32 %0 to float ; [#uses=1]
- br label %bb6
-
-bb.nph45: ; preds = %entry
- %3 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=6]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph45
- %indvar61 = phi i32 [ 0, %bb.nph45 ], [ %indvar.next62, %bb ] ; [#uses=2]
- %means.0.2.043 = phi float [ 0.000000e+00, %bb.nph45 ], [ %19, %bb ] ; [#uses=1]
- %means.0.1.042 = phi float [ 0.000000e+00, %bb.nph45 ], [ %18, %bb ] ; [#uses=1]
- %means.0.0.041 = phi float [ 0.000000e+00, %bb.nph45 ], [ %17, %bb ] ; [#uses=1]
- %tmp65 = add i32 %indvar61, %startIndex ; [#uses=6]
- %scevgep66 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep67 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep68 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep69 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep70 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep7172 = getelementptr inbounds %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %scevgep66, align 4 ; [#uses=1]
- %6 = load float* %scevgep67, align 4 ; [#uses=1]
- %7 = fadd float %5, %6 ; [#uses=1]
- %8 = load float* %scevgep68, align 4 ; [#uses=1]
- %9 = load float* %scevgep69, align 4 ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = load float* %scevgep70, align 4 ; [#uses=1]
- %12 = load float* %scevgep7172, align 4 ; [#uses=1]
- %13 = fadd float %11, %12 ; [#uses=1]
- %14 = fmul float %7, 5.000000e-01 ; [#uses=1]
- %15 = fmul float %10, 5.000000e-01 ; [#uses=1]
- %16 = fmul float %13, 5.000000e-01 ; [#uses=1]
- %17 = fadd float %means.0.0.041, %16 ; [#uses=2]
- %18 = fadd float %means.0.1.042, %15 ; [#uses=2]
- %19 = fadd float %means.0.2.043, %14 ; [#uses=2]
- %indvar.next62 = add i32 %indvar61, 1 ; [#uses=2]
- %exitcond64 = icmp eq i32 %indvar.next62, %0 ; [#uses=1]
- br i1 %exitcond64, label %bb2, label %bb
-
-bb2: ; preds = %bb
- %20 = sitofp i32 %0 to float ; [#uses=3]
- %21 = fdiv float 1.000000e+00, %20 ; [#uses=3]
- %22 = fmul float %17, %21 ; [#uses=1]
- %23 = fmul float %18, %21 ; [#uses=1]
- %24 = fmul float %19, %21 ; [#uses=1]
- br i1 %1, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb2
- %25 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- %26 = load %struct.GIM_AABB_DATA** %25, align 4 ; [#uses=6]
- br label %bb3
-
-bb3: ; preds = %bb3, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb3 ] ; [#uses=2]
- %variance.0.2.037 = phi float [ 0.000000e+00, %bb.nph ], [ %47, %bb3 ] ; [#uses=1]
- %variance.0.1.036 = phi float [ 0.000000e+00, %bb.nph ], [ %46, %bb3 ] ; [#uses=1]
- %variance.0.0.035 = phi float [ 0.000000e+00, %bb.nph ], [ %45, %bb3 ] ; [#uses=1]
- %tmp51 = add i32 %indvar, %startIndex ; [#uses=6]
- %scevgep = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep52 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep53 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep54 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep55 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep5657 = getelementptr inbounds %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %scevgep, align 4 ; [#uses=1]
- %28 = load float* %scevgep52, align 4 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = load float* %scevgep53, align 4 ; [#uses=1]
- %31 = load float* %scevgep54, align 4 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = load float* %scevgep55, align 4 ; [#uses=1]
- %34 = load float* %scevgep5657, align 4 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fmul float %29, 5.000000e-01 ; [#uses=1]
- %37 = fmul float %32, 5.000000e-01 ; [#uses=1]
- %38 = fmul float %35, 5.000000e-01 ; [#uses=1]
- %39 = fsub float %36, %24 ; [#uses=2]
- %40 = fsub float %37, %23 ; [#uses=2]
- %41 = fsub float %38, %22 ; [#uses=2]
- %42 = fmul float %39, %39 ; [#uses=1]
- %43 = fmul float %40, %40 ; [#uses=1]
- %44 = fmul float %41, %41 ; [#uses=1]
- %45 = fadd float %variance.0.0.035, %44 ; [#uses=2]
- %46 = fadd float %variance.0.1.036, %43 ; [#uses=2]
- %47 = fadd float %variance.0.2.037, %42 ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb3
-
-bb6: ; preds = %bb3, %bb2, %bb2.thread
- %48 = phi float [ %20, %bb2 ], [ %2, %bb2.thread ], [ %20, %bb3 ] ; [#uses=1]
- %variance.0.2.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %47, %bb3 ] ; [#uses=1]
- %variance.0.1.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %46, %bb3 ] ; [#uses=1]
- %variance.0.0.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %45, %bb3 ] ; [#uses=1]
- %49 = fadd float %48, -1.000000e+00 ; [#uses=1]
- %50 = fdiv float 1.000000e+00, %49 ; [#uses=3]
- %51 = fmul float %variance.0.0.0.lcssa, %50 ; [#uses=2]
- %52 = fmul float %variance.0.1.0.lcssa, %50 ; [#uses=2]
- %53 = fmul float %variance.0.2.0.lcssa, %50 ; [#uses=2]
- %54 = fcmp olt float %51, %52 ; [#uses=1]
- br i1 %54, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb6
- %55 = fcmp olt float %52, %53 ; [#uses=1]
- %iftmp.20.0.i = select i1 %55, i32 2, i32 1 ; [#uses=1]
- ret i32 %iftmp.20.0.i
-
-bb4.i: ; preds = %bb6
- %56 = fcmp olt float %51, %53 ; [#uses=1]
- %iftmp.21.0.i = select i1 %56, i32 2, i32 0 ; [#uses=1]
- ret i32 %iftmp.21.0.i
-}
-
-; [#uses=1]
-define i32 @_ZN18btQuantizedBvhTree30_sort_and_calc_splitting_indexER18GIM_BVH_DATA_ARRAYiii(%struct.btQuantizedBvhTree* nocapture %this, %struct.GIM_BVH_DATA_ARRAY* nocapture %primitive_boxes, i32 %startIndex, i32 %endIndex, i32 %splitAxis) nounwind align 2 {
-entry:
- %means = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %center4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = sub nsw i32 %endIndex, %startIndex ; [#uses=5]
- %1 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %1, align 8
- %2 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %3, align 8
- %4 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = icmp slt i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %5, label %bb.nph30, label %bb2
-
-bb.nph30: ; preds = %entry
- %6 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- %7 = load %struct.GIM_AABB_DATA** %6, align 4 ; [#uses=6]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph30
- %indvar56 = phi i32 [ 0, %bb.nph30 ], [ %indvar.next57, %bb ] ; [#uses=2]
- %8 = phi float [ 0.000000e+00, %bb.nph30 ], [ %25, %bb ] ; [#uses=1]
- %9 = phi float [ 0.000000e+00, %bb.nph30 ], [ %24, %bb ] ; [#uses=1]
- %10 = phi float [ 0.000000e+00, %bb.nph30 ], [ %23, %bb ] ; [#uses=1]
- %tmp60 = add i32 %indvar56, %startIndex ; [#uses=6]
- %scevgep61 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep62 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep63 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep64 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep65 = getelementptr %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep6667 = getelementptr inbounds %struct.GIM_AABB_DATA* %7, i32 %tmp60, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %scevgep61, align 4 ; [#uses=1]
- %12 = load float* %scevgep62, align 4 ; [#uses=1]
- %13 = fadd float %11, %12 ; [#uses=1]
- %14 = load float* %scevgep63, align 4 ; [#uses=1]
- %15 = load float* %scevgep64, align 4 ; [#uses=1]
- %16 = fadd float %14, %15 ; [#uses=1]
- %17 = load float* %scevgep65, align 4 ; [#uses=1]
- %18 = load float* %scevgep6667, align 4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fmul float %13, 5.000000e-01 ; [#uses=1]
- %21 = fmul float %16, 5.000000e-01 ; [#uses=1]
- %22 = fmul float %19, 5.000000e-01 ; [#uses=1]
- %23 = fadd float %10, %22 ; [#uses=3]
- %24 = fadd float %9, %21 ; [#uses=3]
- %25 = fadd float %8, %20 ; [#uses=3]
- %indvar.next57 = add i32 %indvar56, 1 ; [#uses=2]
- %exitcond59 = icmp eq i32 %indvar.next57, %0 ; [#uses=1]
- br i1 %exitcond59, label %bb1.bb2_crit_edge, label %bb
-
-bb1.bb2_crit_edge: ; preds = %bb
- store float %25, float* %3, align 8
- store float %24, float* %2, align 4
- store float %23, float* %1, align 8
- br label %bb2
-
-bb2: ; preds = %bb1.bb2_crit_edge, %entry
- %26 = phi float [ %25, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %27 = phi float [ %24, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %28 = phi float [ %23, %bb1.bb2_crit_edge ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %29 = sitofp i32 %0 to float ; [#uses=1]
- %30 = fdiv float 1.000000e+00, %29 ; [#uses=3]
- %31 = fmul float %28, %30 ; [#uses=1]
- store float %31, float* %1, align 8
- %32 = fmul float %27, %30 ; [#uses=1]
- store float %32, float* %2, align 4
- %33 = fmul float %26, %30 ; [#uses=1]
- store float %33, float* %3, align 8
- %34 = getelementptr inbounds %struct.btQuadWord* %means, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- br i1 %5, label %bb.nph, label %bb8
-
-bb.nph: ; preds = %bb2
- %36 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=2]
- %37 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 1 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %center4, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb6, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb6 ] ; [#uses=2]
- %splitIndex.128 = phi i32 [ %startIndex, %bb.nph ], [ %splitIndex.0, %bb6 ] ; [#uses=12]
- %tmp35 = add i32 %indvar, %startIndex ; [#uses=10]
- %42 = load %struct.GIM_AABB_DATA** %36, align 4 ; [#uses=11]
- %scevgep47 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %scevgep47, align 4 ; [#uses=2]
- %scevgep48 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %scevgep48, align 4 ; [#uses=2]
- %45 = fadd float %43, %44 ; [#uses=1]
- %scevgep49 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %scevgep49, align 4 ; [#uses=2]
- %scevgep50 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %scevgep50, align 4 ; [#uses=2]
- %48 = fadd float %46, %47 ; [#uses=1]
- %scevgep51 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %scevgep51, align 4 ; [#uses=2]
- %scevgep5253 = getelementptr inbounds %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %scevgep5253, align 4 ; [#uses=2]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fmul float %45, 5.000000e-01 ; [#uses=1]
- %53 = fmul float %48, 5.000000e-01 ; [#uses=1]
- %54 = fmul float %51, 5.000000e-01 ; [#uses=1]
- store float %54, float* %37, align 8
- store float %53, float* %38, align 4
- store float %52, float* %39, align 8
- store float 0.000000e+00, float* %40, align 4
- %55 = load float* %41, align 4 ; [#uses=1]
- %56 = fcmp ogt float %55, %35 ; [#uses=1]
- br i1 %56, label %bb5, label %bb6
-
-bb5: ; preds = %bb3
- %scevgep39 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %57 = load float* %scevgep39, align 4 ; [#uses=1]
- %scevgep43 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %58 = load float* %scevgep43, align 4 ; [#uses=1]
- %scevgep44 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35, i32 1 ; [#uses=1]
- %59 = load i32* %scevgep44, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.GIM_AABB_DATA* %42, i32 %splitIndex.128 ; [#uses=1]
- %61 = bitcast %struct.GIM_AABB_DATA* %60 to i8* ; [#uses=1]
- %scevgep45 = getelementptr %struct.GIM_AABB_DATA* %42, i32 %tmp35 ; [#uses=1]
- %scevgep4546 = bitcast %struct.GIM_AABB_DATA* %scevgep45 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep4546, i8* %61, i32 36, i32 4, i1 false) nounwind
- %62 = load %struct.GIM_AABB_DATA** %36, align 4 ; [#uses=9]
- %.020.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %50, float* %.020.i, align 4
- %.122.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %47, float* %.122.i, align 4
- %.2.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %44, float* %.2.i, align 4
- %.3.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %57, float* %.3.i, align 4
- %.1813.0.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %49, float* %.1813.0.i, align 4
- %.1813.1.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %.1813.1.i, align 4
- %.1813.2.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %43, float* %.1813.2.i, align 4
- %.1813.3.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %58, float* %.1813.3.i, align 4
- %.1.i = getelementptr inbounds %struct.GIM_AABB_DATA* %62, i32 %splitIndex.128, i32 1 ; [#uses=1]
- store i32 %59, i32* %.1.i, align 4
- %63 = add nsw i32 %splitIndex.128, 1 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb3
- %splitIndex.0 = phi i32 [ %63, %bb5 ], [ %splitIndex.128, %bb3 ] ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb8, label %bb3
-
-bb8: ; preds = %bb6, %bb2
- %splitIndex.1.lcssa = phi i32 [ %startIndex, %bb2 ], [ %splitIndex.0, %bb6 ] ; [#uses=3]
- %64 = sdiv i32 %0, 3 ; [#uses=2]
- %65 = add nsw i32 %64, %startIndex ; [#uses=1]
- %66 = icmp slt i32 %65, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %66, label %bb9, label %bb14
-
-bb9: ; preds = %bb8
- %67 = add nsw i32 %endIndex, -1 ; [#uses=1]
- %68 = sub i32 %67, %64 ; [#uses=1]
- %69 = icmp sgt i32 %68, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %69, label %bb11, label %bb14
-
-bb11: ; preds = %bb9
- ret i32 %splitIndex.1.lcssa
-
-bb14: ; preds = %bb9, %bb8
- %70 = ashr i32 %0, 1 ; [#uses=1]
- %71 = add nsw i32 %70, %startIndex ; [#uses=1]
- ret i32 %71
-}
-
-; [#uses=4]
-define void @_ZN18btQuantizedBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %endIndex) nounwind align 2 {
-entry:
- %node_bound = alloca %struct.GIM_AABB, align 8 ; [#uses=12]
- %0 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 0 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=16]
- %2 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* %0, align 4
- %3 = sub nsw i32 %endIndex, %startIndex ; [#uses=2]
- %4 = icmp eq i32 %3, 1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=2]
- %6 = load %struct.GIM_AABB_DATA** %5, align 4 ; [#uses=6]
- %7 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %8 = load %struct.BT_QUANTIZED_BVH_NODE** %7, align 4 ; [#uses=3]
- %9 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %8, i32 %1, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = fcmp olt float %11, %17 ; [#uses=1]
- %clampedPoint.0.0.0.i1.i = select i1 %18, float %17, float %11 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fcmp olt float %13, %20 ; [#uses=1]
- %clampedPoint.0.1.0.i2.i = select i1 %21, float %20, float %13 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=3]
- %24 = fcmp olt float %15, %23 ; [#uses=1]
- %clampedPoint.0.2.0.i3.i = select i1 %24, float %23, float %15 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=2]
- %27 = fcmp olt float %26, %clampedPoint.0.0.0.i1.i ; [#uses=1]
- %clampedPoint.0.0.1.i4.i = select i1 %27, float %26, float %clampedPoint.0.0.0.i1.i ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=2]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fcmp olt float %29, %clampedPoint.0.1.0.i2.i ; [#uses=1]
- %clampedPoint.0.1.1.i5.i = select i1 %30, float %29, float %clampedPoint.0.1.0.i2.i ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=2]
- %32 = load float* %31, align 4 ; [#uses=2]
- %33 = fcmp olt float %32, %clampedPoint.0.2.0.i3.i ; [#uses=1]
- %clampedPoint.0.2.1.i6.i = select i1 %33, float %32, float %clampedPoint.0.2.0.i3.i ; [#uses=1]
- %34 = fsub float %clampedPoint.0.2.1.i6.i, %23 ; [#uses=1]
- %35 = fsub float %clampedPoint.0.1.1.i5.i, %20 ; [#uses=1]
- %36 = fsub float %clampedPoint.0.0.1.i4.i, %17 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %34, %38 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fmul float %35, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fmul float %36, %44 ; [#uses=1]
- %46 = fadd float %45, 5.000000e-01 ; [#uses=1]
- %47 = fptoui float %46 to i16 ; [#uses=1]
- store i16 %47, i16* %9, align 2
- %48 = fadd float %42, 5.000000e-01 ; [#uses=1]
- %49 = fptoui float %48 to i16 ; [#uses=1]
- %50 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %8, i32 %1, i32 0, i32 1 ; [#uses=1]
- store i16 %49, i16* %50, align 2
- %51 = fadd float %39, 5.000000e-01 ; [#uses=1]
- %52 = fptoui float %51 to i16 ; [#uses=1]
- %53 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %8, i32 %1, i32 0, i32 2 ; [#uses=1]
- store i16 %52, i16* %53, align 2
- %54 = load %struct.BT_QUANTIZED_BVH_NODE** %7, align 4 ; [#uses=3]
- %55 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %1, i32 1, i32 0 ; [#uses=1]
- %56 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=2]
- %58 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = getelementptr inbounds %struct.GIM_AABB_DATA* %6, i32 %startIndex, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=2]
- %62 = load float* %16, align 4 ; [#uses=3]
- %63 = fcmp olt float %57, %62 ; [#uses=1]
- %clampedPoint.0.0.0.i.i = select i1 %63, float %62, float %57 ; [#uses=2]
- %64 = load float* %19, align 4 ; [#uses=3]
- %65 = fcmp olt float %59, %64 ; [#uses=1]
- %clampedPoint.0.1.0.i.i = select i1 %65, float %64, float %59 ; [#uses=2]
- %66 = load float* %22, align 4 ; [#uses=3]
- %67 = fcmp olt float %61, %66 ; [#uses=1]
- %clampedPoint.0.2.0.i.i = select i1 %67, float %66, float %61 ; [#uses=2]
- %68 = load float* %25, align 4 ; [#uses=2]
- %69 = fcmp olt float %68, %clampedPoint.0.0.0.i.i ; [#uses=1]
- %clampedPoint.0.0.1.i.i = select i1 %69, float %68, float %clampedPoint.0.0.0.i.i ; [#uses=1]
- %70 = load float* %28, align 4 ; [#uses=2]
- %71 = fcmp olt float %70, %clampedPoint.0.1.0.i.i ; [#uses=1]
- %clampedPoint.0.1.1.i.i = select i1 %71, float %70, float %clampedPoint.0.1.0.i.i ; [#uses=1]
- %72 = load float* %31, align 4 ; [#uses=2]
- %73 = fcmp olt float %72, %clampedPoint.0.2.0.i.i ; [#uses=1]
- %clampedPoint.0.2.1.i.i = select i1 %73, float %72, float %clampedPoint.0.2.0.i.i ; [#uses=1]
- %74 = fsub float %clampedPoint.0.2.1.i.i, %66 ; [#uses=1]
- %75 = fsub float %clampedPoint.0.1.1.i.i, %64 ; [#uses=1]
- %76 = fsub float %clampedPoint.0.0.1.i.i, %62 ; [#uses=1]
- %77 = load float* %37, align 4 ; [#uses=1]
- %78 = fmul float %74, %77 ; [#uses=1]
- %79 = load float* %40, align 4 ; [#uses=1]
- %80 = fmul float %75, %79 ; [#uses=1]
- %81 = load float* %43, align 4 ; [#uses=1]
- %82 = fmul float %76, %81 ; [#uses=1]
- %83 = fadd float %82, 5.000000e-01 ; [#uses=1]
- %84 = fptoui float %83 to i16 ; [#uses=1]
- store i16 %84, i16* %55, align 2
- %85 = fadd float %80, 5.000000e-01 ; [#uses=1]
- %86 = fptoui float %85 to i16 ; [#uses=1]
- %87 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %1, i32 1, i32 1 ; [#uses=1]
- store i16 %86, i16* %87, align 2
- %88 = fadd float %78, 5.000000e-01 ; [#uses=1]
- %89 = fptoui float %88 to i16 ; [#uses=1]
- %90 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %1, i32 1, i32 2 ; [#uses=1]
- store i16 %89, i16* %90, align 2
- %91 = load %struct.GIM_AABB_DATA** %5, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.GIM_AABB_DATA* %91, i32 %startIndex, i32 1 ; [#uses=1]
- %93 = load i32* %92, align 4 ; [#uses=1]
- %94 = load %struct.BT_QUANTIZED_BVH_NODE** %7, align 4 ; [#uses=1]
- %95 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %94, i32 %1, i32 2 ; [#uses=1]
- store i32 %93, i32* %95, align 4
- ret void
-
-bb1: ; preds = %entry
- %96 = call i32 @_ZN18btQuantizedBvhTree20_calc_splitting_axisER18GIM_BVH_DATA_ARRAYii(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %endIndex) ; [#uses=1]
- %97 = call i32 @_ZN18btQuantizedBvhTree30_sort_and_calc_splitting_indexER18GIM_BVH_DATA_ARRAYiii(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %endIndex, i32 %96) ; [#uses=2]
- %98 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %98, align 8
- %99 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %99, align 4
- %100 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %100, align 8
- %101 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %101, align 8
- %102 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %102, align 4
- %103 = getelementptr inbounds %struct.GIM_AABB* %node_bound, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %103, align 8
- %104 = icmp slt i32 %startIndex, %endIndex ; [#uses=1]
- br i1 %104, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %bb1
- %105 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %106 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.144.0.i, %bb2 ] ; [#uses=1]
- %107 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.143.0.i, %bb2 ] ; [#uses=1]
- %108 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.142.0.i, %bb2 ] ; [#uses=1]
- %109 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.141.0.i, %bb2 ] ; [#uses=1]
- %110 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.140.0.i, %bb2 ] ; [#uses=1]
- %111 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.139.0.i, %bb2 ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb2 ] ; [#uses=2]
- %tmp19 = add i32 %indvar, %startIndex ; [#uses=7]
- %112 = load %struct.GIM_AABB_DATA** %105, align 4 ; [#uses=7]
- %scevgep3132 = getelementptr inbounds %struct.GIM_AABB_DATA* %112, i32 %tmp19, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %113 = load float* %scevgep3132, align 4 ; [#uses=1]
- %114 = fcmp ogt float %111, %113 ; [#uses=1]
- %scevgep2930 = getelementptr inbounds %struct.GIM_AABB_DATA* %112, i32 %tmp19, i32 0 ; [#uses=6]
- %box.pn25.i = select i1 %114, %struct.GIM_AABB* %scevgep2930, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.139.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.139.0.i = load float* %iftmp.139.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.139.0.i, float* %98, align 8
- %scevgep33 = getelementptr %struct.GIM_AABB_DATA* %112, i32 %tmp19, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %115 = load float* %scevgep33, align 4 ; [#uses=1]
- %116 = fcmp ogt float %110, %115 ; [#uses=1]
- %box.pn24.i = select i1 %116, %struct.GIM_AABB* %scevgep2930, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.140.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.140.0.i = load float* %iftmp.140.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.140.0.i, float* %99, align 4
- %scevgep34 = getelementptr %struct.GIM_AABB_DATA* %112, i32 %tmp19, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %117 = load float* %scevgep34, align 4 ; [#uses=1]
- %118 = fcmp ogt float %109, %117 ; [#uses=1]
- %box.pn23.i = select i1 %118, %struct.GIM_AABB* %scevgep2930, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.141.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.141.0.i = load float* %iftmp.141.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.141.0.i, float* %100, align 8
- %scevgep35 = getelementptr %struct.GIM_AABB_DATA* %112, i32 %tmp19, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %119 = load float* %scevgep35, align 4 ; [#uses=1]
- %120 = fcmp olt float %108, %119 ; [#uses=1]
- %box.pn22.i = select i1 %120, %struct.GIM_AABB* %scevgep2930, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.142.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.142.0.i = load float* %iftmp.142.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.142.0.i, float* %101, align 8
- %scevgep36 = getelementptr %struct.GIM_AABB_DATA* %112, i32 %tmp19, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %121 = load float* %scevgep36, align 4 ; [#uses=1]
- %122 = fcmp olt float %107, %121 ; [#uses=1]
- %box.pn21.i = select i1 %122, %struct.GIM_AABB* %scevgep2930, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.143.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.143.0.i = load float* %iftmp.143.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.143.0.i, float* %102, align 4
- %scevgep37 = getelementptr %struct.GIM_AABB_DATA* %112, i32 %tmp19, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %123 = load float* %scevgep37, align 4 ; [#uses=1]
- %124 = fcmp olt float %106, %123 ; [#uses=1]
- %box.pn.i = select i1 %124, %struct.GIM_AABB* %scevgep2930, %struct.GIM_AABB* %node_bound ; [#uses=1]
- %iftmp.144.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.144.0.i = load float* %iftmp.144.0.in.i, align 4 ; [#uses=3]
- store float %iftmp.144.0.i, float* %103, align 8
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %bb2, %bb1
- %125 = phi float [ 0xC7EFFFFFE0000000, %bb1 ], [ %iftmp.144.0.i, %bb2 ] ; [#uses=2]
- %126 = phi float [ 0xC7EFFFFFE0000000, %bb1 ], [ %iftmp.143.0.i, %bb2 ] ; [#uses=2]
- %127 = phi float [ 0xC7EFFFFFE0000000, %bb1 ], [ %iftmp.142.0.i, %bb2 ] ; [#uses=2]
- %128 = phi float [ 0x47EFFFFFE0000000, %bb1 ], [ %iftmp.141.0.i, %bb2 ] ; [#uses=2]
- %129 = phi float [ 0x47EFFFFFE0000000, %bb1 ], [ %iftmp.140.0.i, %bb2 ] ; [#uses=2]
- %130 = phi float [ 0x47EFFFFFE0000000, %bb1 ], [ %iftmp.139.0.i, %bb2 ] ; [#uses=2]
- %131 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %132 = load %struct.BT_QUANTIZED_BVH_NODE** %131, align 4 ; [#uses=3]
- %133 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %132, i32 %1, i32 0, i32 0 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=2]
- %135 = load float* %134, align 4 ; [#uses=3]
- %136 = fcmp olt float %130, %135 ; [#uses=1]
- %clampedPoint.0.0.0.i1.i6 = select i1 %136, float %135, float %130 ; [#uses=2]
- %137 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=2]
- %138 = load float* %137, align 4 ; [#uses=3]
- %139 = fcmp olt float %129, %138 ; [#uses=1]
- %clampedPoint.0.1.0.i2.i7 = select i1 %139, float %138, float %129 ; [#uses=2]
- %140 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=2]
- %141 = load float* %140, align 4 ; [#uses=3]
- %142 = fcmp olt float %128, %141 ; [#uses=1]
- %clampedPoint.0.2.0.i3.i8 = select i1 %142, float %141, float %128 ; [#uses=2]
- %143 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=2]
- %144 = load float* %143, align 4 ; [#uses=2]
- %145 = fcmp olt float %144, %clampedPoint.0.0.0.i1.i6 ; [#uses=1]
- %clampedPoint.0.0.1.i4.i9 = select i1 %145, float %144, float %clampedPoint.0.0.0.i1.i6 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=2]
- %147 = load float* %146, align 4 ; [#uses=2]
- %148 = fcmp olt float %147, %clampedPoint.0.1.0.i2.i7 ; [#uses=1]
- %clampedPoint.0.1.1.i5.i10 = select i1 %148, float %147, float %clampedPoint.0.1.0.i2.i7 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=2]
- %150 = load float* %149, align 4 ; [#uses=2]
- %151 = fcmp olt float %150, %clampedPoint.0.2.0.i3.i8 ; [#uses=1]
- %clampedPoint.0.2.1.i6.i11 = select i1 %151, float %150, float %clampedPoint.0.2.0.i3.i8 ; [#uses=1]
- %152 = fsub float %clampedPoint.0.2.1.i6.i11, %141 ; [#uses=1]
- %153 = fsub float %clampedPoint.0.1.1.i5.i10, %138 ; [#uses=1]
- %154 = fsub float %clampedPoint.0.0.1.i4.i9, %135 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %156 = load float* %155, align 4 ; [#uses=1]
- %157 = fmul float %152, %156 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fmul float %153, %159 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fmul float %154, %162 ; [#uses=1]
- %164 = fadd float %163, 5.000000e-01 ; [#uses=1]
- %165 = fptoui float %164 to i16 ; [#uses=1]
- store i16 %165, i16* %133, align 2
- %166 = fadd float %160, 5.000000e-01 ; [#uses=1]
- %167 = fptoui float %166 to i16 ; [#uses=1]
- %168 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %132, i32 %1, i32 0, i32 1 ; [#uses=1]
- store i16 %167, i16* %168, align 2
- %169 = fadd float %157, 5.000000e-01 ; [#uses=1]
- %170 = fptoui float %169 to i16 ; [#uses=1]
- %171 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %132, i32 %1, i32 0, i32 2 ; [#uses=1]
- store i16 %170, i16* %171, align 2
- %172 = load %struct.BT_QUANTIZED_BVH_NODE** %131, align 4 ; [#uses=3]
- %173 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %172, i32 %1, i32 1, i32 0 ; [#uses=1]
- %174 = load float* %134, align 4 ; [#uses=3]
- %175 = fcmp olt float %127, %174 ; [#uses=1]
- %clampedPoint.0.0.0.i.i12 = select i1 %175, float %174, float %127 ; [#uses=2]
- %176 = load float* %137, align 4 ; [#uses=3]
- %177 = fcmp olt float %126, %176 ; [#uses=1]
- %clampedPoint.0.1.0.i.i13 = select i1 %177, float %176, float %126 ; [#uses=2]
- %178 = load float* %140, align 4 ; [#uses=3]
- %179 = fcmp olt float %125, %178 ; [#uses=1]
- %clampedPoint.0.2.0.i.i14 = select i1 %179, float %178, float %125 ; [#uses=2]
- %180 = load float* %143, align 4 ; [#uses=2]
- %181 = fcmp olt float %180, %clampedPoint.0.0.0.i.i12 ; [#uses=1]
- %clampedPoint.0.0.1.i.i15 = select i1 %181, float %180, float %clampedPoint.0.0.0.i.i12 ; [#uses=1]
- %182 = load float* %146, align 4 ; [#uses=2]
- %183 = fcmp olt float %182, %clampedPoint.0.1.0.i.i13 ; [#uses=1]
- %clampedPoint.0.1.1.i.i16 = select i1 %183, float %182, float %clampedPoint.0.1.0.i.i13 ; [#uses=1]
- %184 = load float* %149, align 4 ; [#uses=2]
- %185 = fcmp olt float %184, %clampedPoint.0.2.0.i.i14 ; [#uses=1]
- %clampedPoint.0.2.1.i.i17 = select i1 %185, float %184, float %clampedPoint.0.2.0.i.i14 ; [#uses=1]
- %186 = fsub float %clampedPoint.0.2.1.i.i17, %178 ; [#uses=1]
- %187 = fsub float %clampedPoint.0.1.1.i.i16, %176 ; [#uses=1]
- %188 = fsub float %clampedPoint.0.0.1.i.i15, %174 ; [#uses=1]
- %189 = load float* %155, align 4 ; [#uses=1]
- %190 = fmul float %186, %189 ; [#uses=1]
- %191 = load float* %158, align 4 ; [#uses=1]
- %192 = fmul float %187, %191 ; [#uses=1]
- %193 = load float* %161, align 4 ; [#uses=1]
- %194 = fmul float %188, %193 ; [#uses=1]
- %195 = fadd float %194, 5.000000e-01 ; [#uses=1]
- %196 = fptoui float %195 to i16 ; [#uses=1]
- store i16 %196, i16* %173, align 2
- %197 = fadd float %192, 5.000000e-01 ; [#uses=1]
- %198 = fptoui float %197 to i16 ; [#uses=1]
- %199 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %172, i32 %1, i32 1, i32 1 ; [#uses=1]
- store i16 %198, i16* %199, align 2
- %200 = fadd float %190, 5.000000e-01 ; [#uses=1]
- %201 = fptoui float %200 to i16 ; [#uses=1]
- %202 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %172, i32 %1, i32 1, i32 2 ; [#uses=1]
- store i16 %201, i16* %202, align 2
- call void @_ZN18btQuantizedBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %startIndex, i32 %97)
- call void @_ZN18btQuantizedBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 %97, i32 %endIndex)
- %203 = load i32* %0, align 4 ; [#uses=1]
- %204 = sub nsw i32 %1, %203 ; [#uses=1]
- %205 = load %struct.BT_QUANTIZED_BVH_NODE** %131, align 4 ; [#uses=1]
- %206 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %205, i32 %1, i32 2 ; [#uses=1]
- store i32 %204, i32* %206, align 4
- ret void
-}
-
-; [#uses=9]
-define internal fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %node0, i32 %node1, i8 zeroext %complete_primitive_tests) {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %box0.i = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %box1.i = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %1 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %2 = load %struct.BT_QUANTIZED_BVH_NODE** %1, align 4 ; [#uses=7]
- %3 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %node0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %node0, i32 0, i32 2 ; [#uses=1]
- %5 = load i16* %4, align 2 ; [#uses=1]
- %6 = uitofp i16 %5 to float ; [#uses=1]
- %7 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fdiv float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %node0, i32 0, i32 1 ; [#uses=1]
- %11 = load i16* %10, align 2 ; [#uses=1]
- %12 = uitofp i16 %11 to float ; [#uses=1]
- %13 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fdiv float %12, %14 ; [#uses=1]
- %16 = load i16* %3, align 2 ; [#uses=1]
- %17 = uitofp i16 %16 to float ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fdiv float %17, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fadd float %20, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = fadd float %15, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- %29 = fadd float %9, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %23, float* %30, align 8
- %31 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %26, float* %31, align 4
- %32 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %29, float* %32, align 8
- %33 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %node0, i32 1, i32 0 ; [#uses=1]
- %35 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %node0, i32 1, i32 2 ; [#uses=1]
- %36 = load i16* %35, align 2 ; [#uses=1]
- %37 = uitofp i16 %36 to float ; [#uses=1]
- %38 = fdiv float %37, %8 ; [#uses=1]
- %39 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %node0, i32 1, i32 1 ; [#uses=1]
- %40 = load i16* %39, align 2 ; [#uses=1]
- %41 = uitofp i16 %40 to float ; [#uses=1]
- %42 = fdiv float %41, %14 ; [#uses=1]
- %43 = load i16* %34, align 2 ; [#uses=1]
- %44 = uitofp i16 %43 to float ; [#uses=1]
- %45 = fdiv float %44, %19 ; [#uses=1]
- %46 = fadd float %45, %22 ; [#uses=1]
- %47 = fadd float %42, %25 ; [#uses=1]
- %48 = fadd float %38, %28 ; [#uses=1]
- %49 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %46, float* %49, align 8
- %50 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %47, float* %50, align 4
- %51 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %48, float* %51, align 8
- %52 = getelementptr inbounds %struct.GIM_AABB* %box0.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %54 = load %struct.BT_QUANTIZED_BVH_NODE** %53, align 4 ; [#uses=7]
- %55 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %node1, i32 0, i32 0 ; [#uses=1]
- %56 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %node1, i32 0, i32 2 ; [#uses=1]
- %57 = load i16* %56, align 2 ; [#uses=1]
- %58 = uitofp i16 %57 to float ; [#uses=1]
- %59 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=2]
- %61 = fdiv float %58, %60 ; [#uses=1]
- %62 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %node1, i32 0, i32 1 ; [#uses=1]
- %63 = load i16* %62, align 2 ; [#uses=1]
- %64 = uitofp i16 %63 to float ; [#uses=1]
- %65 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=2]
- %67 = fdiv float %64, %66 ; [#uses=1]
- %68 = load i16* %55, align 2 ; [#uses=1]
- %69 = uitofp i16 %68 to float ; [#uses=1]
- %70 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=2]
- %72 = fdiv float %69, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=2]
- %75 = fadd float %72, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=2]
- %78 = fadd float %67, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=2]
- %81 = fadd float %61, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %75, float* %82, align 8
- %83 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %78, float* %83, align 4
- %84 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %81, float* %84, align 8
- %85 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %85, align 4
- %86 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %node1, i32 1, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %node1, i32 1, i32 2 ; [#uses=1]
- %88 = load i16* %87, align 2 ; [#uses=1]
- %89 = uitofp i16 %88 to float ; [#uses=1]
- %90 = fdiv float %89, %60 ; [#uses=1]
- %91 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %node1, i32 1, i32 1 ; [#uses=1]
- %92 = load i16* %91, align 2 ; [#uses=1]
- %93 = uitofp i16 %92 to float ; [#uses=1]
- %94 = fdiv float %93, %66 ; [#uses=1]
- %95 = load i16* %86, align 2 ; [#uses=1]
- %96 = uitofp i16 %95 to float ; [#uses=1]
- %97 = fdiv float %96, %71 ; [#uses=1]
- %98 = fadd float %97, %74 ; [#uses=1]
- %99 = fadd float %94, %77 ; [#uses=1]
- %100 = fadd float %90, %80 ; [#uses=1]
- %101 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %98, float* %101, align 8
- %102 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %99, float* %102, align 4
- %103 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %103, align 8
- %104 = getelementptr inbounds %struct.GIM_AABB* %box1.i, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %104, align 4
- %105 = call zeroext i8 @_ZNK6btAABB23overlapping_trans_cacheERKS_RK26BT_BOX_BOX_TRANSFORM_CACHEb(%struct.GIM_AABB* %box0.i, %struct.GIM_AABB* %box1.i, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i8 zeroext %complete_primitive_tests) nounwind ; [#uses=1]
- %toBoolnot = icmp eq i8 %105, 0 ; [#uses=1]
- br i1 %toBoolnot, label %return, label %bb
-
-bb: ; preds = %entry
- %106 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %2, i32 %node0, i32 2 ; [#uses=1]
- %107 = load i32* %106, align 4 ; [#uses=2]
- %toBool3 = icmp slt i32 %107, 0 ; [#uses=1]
- %108 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %54, i32 %node1, i32 2 ; [#uses=1]
- %109 = load i32* %108, align 4 ; [#uses=2]
- %toBool9 = icmp slt i32 %109, 0 ; [#uses=2]
- br i1 %toBool3, label %bb8, label %bb4
-
-bb4: ; preds = %bb
- br i1 %toBool9, label %bb7, label %bb6
-
-bb6: ; preds = %bb4
- %110 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 0 ; [#uses=1]
- store i32 %107, i32* %110, align 8
- %111 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %0, i32 0, i32 1 ; [#uses=1]
- store i32 %109, i32* %111, align 4
- %112 = getelementptr inbounds %struct.btPairSet* %collision_pairs, i32 0, i32 0 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI8GIM_PAIRE9push_backERKS0_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %112, %struct.CONTACT_KEY_TOKEN* %0) inlinehint
- ret void
-
-bb7: ; preds = %bb4
- %113 = add nsw i32 %node1, 1 ; [#uses=3]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %node0, i32 %113, i8 zeroext 0)
- %114 = load %struct.BT_QUANTIZED_BVH_NODE** %53, align 4 ; [#uses=1]
- %115 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %114, i32 %113, i32 2 ; [#uses=1]
- %116 = load i32* %115, align 4 ; [#uses=2]
- %toBool.i.i16 = icmp slt i32 %116, 0 ; [#uses=1]
- %117 = add nsw i32 %node1, 2 ; [#uses=1]
- %118 = sub i32 %113, %116 ; [#uses=1]
- %119 = select i1 %toBool.i.i16, i32 %118, i32 %117 ; [#uses=1]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %node0, i32 %119, i8 zeroext 0)
- ret void
-
-bb8: ; preds = %bb
- br i1 %toBool9, label %bb11, label %bb10
-
-bb10: ; preds = %bb8
- %120 = add nsw i32 %node0, 1 ; [#uses=3]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %120, i32 %node1, i8 zeroext 0)
- %121 = load %struct.BT_QUANTIZED_BVH_NODE** %1, align 4 ; [#uses=1]
- %122 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %121, i32 %120, i32 2 ; [#uses=1]
- %123 = load i32* %122, align 4 ; [#uses=2]
- %toBool.i.i19 = icmp slt i32 %123, 0 ; [#uses=1]
- %124 = add nsw i32 %node0, 2 ; [#uses=1]
- %125 = sub i32 %120, %123 ; [#uses=1]
- %126 = select i1 %toBool.i.i19, i32 %125, i32 %124 ; [#uses=1]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %126, i32 %node1, i8 zeroext 0)
- ret void
-
-bb11: ; preds = %bb8
- %127 = add nsw i32 %node1, 1 ; [#uses=6]
- %128 = add nsw i32 %node0, 1 ; [#uses=6]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %128, i32 %127, i8 zeroext 0)
- %129 = load %struct.BT_QUANTIZED_BVH_NODE** %53, align 4 ; [#uses=1]
- %130 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %129, i32 %127, i32 2 ; [#uses=1]
- %131 = load i32* %130, align 4 ; [#uses=2]
- %toBool.i.i18 = icmp slt i32 %131, 0 ; [#uses=1]
- %132 = add nsw i32 %node1, 2 ; [#uses=2]
- %133 = sub i32 %127, %131 ; [#uses=1]
- %134 = select i1 %toBool.i.i18, i32 %133, i32 %132 ; [#uses=1]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %128, i32 %134, i8 zeroext 0)
- %135 = load %struct.BT_QUANTIZED_BVH_NODE** %1, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %135, i32 %128, i32 2 ; [#uses=1]
- %137 = load i32* %136, align 4 ; [#uses=2]
- %toBool.i.i20 = icmp slt i32 %137, 0 ; [#uses=1]
- %138 = add nsw i32 %node0, 2 ; [#uses=2]
- %139 = sub i32 %128, %137 ; [#uses=1]
- %140 = select i1 %toBool.i.i20, i32 %139, i32 %138 ; [#uses=1]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %140, i32 %127, i8 zeroext 0)
- %141 = load %struct.BT_QUANTIZED_BVH_NODE** %53, align 4 ; [#uses=1]
- %142 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %141, i32 %127, i32 2 ; [#uses=1]
- %143 = load i32* %142, align 4 ; [#uses=2]
- %toBool.i.i17 = icmp slt i32 %143, 0 ; [#uses=1]
- %144 = sub i32 %127, %143 ; [#uses=1]
- %145 = select i1 %toBool.i.i17, i32 %144, i32 %132 ; [#uses=1]
- %146 = load %struct.BT_QUANTIZED_BVH_NODE** %1, align 4 ; [#uses=1]
- %147 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %146, i32 %128, i32 2 ; [#uses=1]
- %148 = load i32* %147, align 4 ; [#uses=2]
- %toBool.i.i = icmp slt i32 %148, 0 ; [#uses=1]
- %149 = sub i32 %128, %148 ; [#uses=1]
- %150 = select i1 %toBool.i.i, i32 %149, i32 %138 ; [#uses=1]
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 %150, i32 %145, i8 zeroext 0)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btGImpactQuantizedBvh14find_collisionEPS_RK11btTransformS0_S3_R9btPairSet(%struct.btGImpactBoxSet* %boxset0, %struct.btTransform* nocapture %trans0, %struct.btGImpactBoxSet* %boxset1, %struct.btTransform* nocapture %trans1, %struct.btPairSet* %collision_pairs) align 2 {
-entry:
- %trans_cache_1to0 = alloca %struct.BT_BOX_BOX_TRANSFORM_CACHE, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactBoxSet* %boxset1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %5, label %return, label %bb4.critedge
-
-bb4.critedge: ; preds = %bb
- call void @_ZN26BT_BOX_BOX_TRANSFORM_CACHE19calc_from_homogenicERK11btTransformS2_(%struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, %struct.btTransform* %trans0, %struct.btTransform* %trans1) inlinehint
- call fastcc void @_ZL41_find_quantized_collision_pairs_recursiveP21btGImpactQuantizedBvhS0_P9btPairSetRK26BT_BOX_BOX_TRANSFORM_CACHEiib(%struct.btGImpactBoxSet* %boxset0, %struct.btGImpactBoxSet* %boxset1, %struct.btPairSet* %collision_pairs, %struct.BT_BOX_BOX_TRANSFORM_CACHE* %trans_cache_1to0, i32 0, i32 0, i8 zeroext 1)
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZNK21btGImpactQuantizedBvh8rayQueryERK9btVector3S2_R20btAlignedObjectArrayIiE(%struct.btGImpactBoxSet* nocapture %this, %struct.btQuadWord* nocapture %ray_dir, %struct.btQuadWord* nocapture %ray_origin, %"struct.btAlignedObjectArray<int>"* nocapture %collided_results) align 2 {
-entry:
- %bound = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %0 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb11
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %17 = getelementptr inbounds %struct.GIM_AABB* %bound, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=5]
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 2 ; [#uses=2]
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 3 ; [#uses=5]
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 4 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb10.backedge, %bb.nph
- %curIndex.019 = phi i32 [ 0, %bb.nph ], [ %curIndex.0.be, %bb10.backedge ] ; [#uses=10]
- %22 = load %struct.BT_QUANTIZED_BVH_NODE** %3, align 4 ; [#uses=7]
- %23 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %curIndex.019, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %curIndex.019, i32 0, i32 2 ; [#uses=1]
- %25 = load i16* %24, align 2 ; [#uses=1]
- %26 = uitofp i16 %25 to float ; [#uses=1]
- %27 = load float* %4, align 4 ; [#uses=2]
- %28 = fdiv float %26, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %curIndex.019, i32 0, i32 1 ; [#uses=1]
- %30 = load i16* %29, align 2 ; [#uses=1]
- %31 = uitofp i16 %30 to float ; [#uses=1]
- %32 = load float* %5, align 4 ; [#uses=2]
- %33 = fdiv float %31, %32 ; [#uses=1]
- %34 = load i16* %23, align 2 ; [#uses=1]
- %35 = uitofp i16 %34 to float ; [#uses=1]
- %36 = load float* %6, align 4 ; [#uses=2]
- %37 = fdiv float %35, %36 ; [#uses=1]
- %38 = load float* %7, align 4 ; [#uses=2]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = load float* %8, align 4 ; [#uses=2]
- %41 = fadd float %33, %40 ; [#uses=1]
- %42 = load float* %9, align 4 ; [#uses=2]
- %43 = fadd float %28, %42 ; [#uses=1]
- store float %39, float* %10, align 8
- store float %41, float* %11, align 4
- store float %43, float* %12, align 8
- store float 0.000000e+00, float* %13, align 4
- %44 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %curIndex.019, i32 1, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %curIndex.019, i32 1, i32 2 ; [#uses=1]
- %46 = load i16* %45, align 2 ; [#uses=1]
- %47 = uitofp i16 %46 to float ; [#uses=1]
- %48 = fdiv float %47, %27 ; [#uses=1]
- %49 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %curIndex.019, i32 1, i32 1 ; [#uses=1]
- %50 = load i16* %49, align 2 ; [#uses=1]
- %51 = uitofp i16 %50 to float ; [#uses=1]
- %52 = fdiv float %51, %32 ; [#uses=1]
- %53 = load i16* %44, align 2 ; [#uses=1]
- %54 = uitofp i16 %53 to float ; [#uses=1]
- %55 = fdiv float %54, %36 ; [#uses=1]
- %56 = fadd float %55, %38 ; [#uses=1]
- %57 = fadd float %52, %40 ; [#uses=1]
- %58 = fadd float %48, %42 ; [#uses=1]
- store float %56, float* %14, align 8
- store float %57, float* %15, align 4
- store float %58, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- %59 = call zeroext i8 @_ZNK6btAABB11collide_rayERK9btVector3S2_(%struct.GIM_AABB* %bound, %struct.btQuadWord* %ray_origin, %struct.btQuadWord* %ray_dir) nounwind ; [#uses=1]
- %60 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %22, i32 %curIndex.019, i32 2 ; [#uses=1]
- %61 = load i32* %60, align 4 ; [#uses=2]
- %toBool = icmp slt i32 %61, 0 ; [#uses=2]
- %toBool2 = icmp eq i8 %59, 0 ; [#uses=2]
- %or.cond = or i1 %toBool, %toBool2 ; [#uses=1]
- br i1 %or.cond, label %bb4, label %bb3
-
-bb3: ; preds = %bb
- %62 = load i32* %18, align 4 ; [#uses=6]
- %63 = load i32* %19, align 4 ; [#uses=2]
- %64 = icmp eq i32 %63, %62 ; [#uses=1]
- br i1 %64, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb3
- %65 = icmp eq i32 %62, 0 ; [#uses=1]
- %66 = shl i32 %62, 1 ; [#uses=1]
- %iftmp.299.0.i.i = select i1 %65, i32 1, i32 %66 ; [#uses=4]
- %67 = icmp slt i32 %63, %iftmp.299.0.i.i ; [#uses=1]
- br i1 %67, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %68 = icmp eq i32 %iftmp.299.0.i.i, 0 ; [#uses=1]
- br i1 %68, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %69 = shl i32 %iftmp.299.0.i.i, 2 ; [#uses=1]
- %70 = call i8* @_Z22btAlignedAllocInternalji(i32 %69, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %70 to i32* ; [#uses=1]
- %.pre.i = load i32* %18, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %71 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %62, %bb.i.i ] ; [#uses=2]
- %72 = phi i32* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %73 = icmp sgt i32 %71, 0 ; [#uses=1]
- br i1 %73, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr i32* %72, i32 %indvar.i.i.i ; [#uses=2]
- %74 = icmp eq i32* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %74, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %75 = load i32** %20, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr i32* %75, i32 %indvar.i.i.i ; [#uses=1]
- %76 = load i32* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store i32 %76, i32* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %71 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %77 = load i32** %20, align 4 ; [#uses=2]
- %78 = icmp eq i32* %77, null ; [#uses=1]
- br i1 %78, label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- %79 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %79, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %80 = bitcast i32* %77 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %80)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %20, align 4
- br label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- store i8 1, i8* %21, align 4
- store i32* %72, i32** %20, align 4
- store i32 %iftmp.299.0.i.i, i32* %19, align 4
- %.pre5.i = load i32* %18, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, %bb.i, %bb3
- %81 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i ], [ %62, %bb3 ], [ %62, %bb.i ] ; [#uses=2]
- %82 = load i32** %20, align 4 ; [#uses=1]
- %83 = getelementptr inbounds i32* %82, i32 %81 ; [#uses=2]
- %84 = icmp eq i32* %83, null ; [#uses=1]
- br i1 %84, label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 %61, i32* %83, align 4
- %.pre6.i = load i32* %18, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit
-
-_ZN20btAlignedObjectArrayIiE9push_backERKi.exit: ; preds = %bb2.i, %bb1.i
- %85 = phi i32 [ %81, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %86 = add nsw i32 %85, 1 ; [#uses=1]
- store i32 %86, i32* %18, align 4
- br label %bb4
-
-bb4: ; preds = %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, %bb
- %or.cond18 = and i1 %toBool2, %toBool ; [#uses=1]
- br i1 %or.cond18, label %bb9, label %bb8
-
-bb8: ; preds = %bb4
- %87 = add nsw i32 %curIndex.019, 1 ; [#uses=1]
- br label %bb10.backedge
-
-bb10.backedge: ; preds = %bb9, %bb8
- %curIndex.0.be = phi i32 [ %87, %bb8 ], [ %92, %bb9 ] ; [#uses=2]
- %88 = icmp slt i32 %curIndex.0.be, %1 ; [#uses=1]
- br i1 %88, label %bb, label %bb11
-
-bb9: ; preds = %bb4
- %89 = load %struct.BT_QUANTIZED_BVH_NODE** %3, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %89, i32 %curIndex.019, i32 2 ; [#uses=1]
- %91 = load i32* %90, align 4 ; [#uses=1]
- %92 = sub i32 %curIndex.019, %91 ; [#uses=1]
- br label %bb10.backedge
-
-bb11: ; preds = %bb10.backedge, %entry
- %93 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=1]
- %94 = load i32* %93, align 4 ; [#uses=1]
- %95 = icmp sgt i32 %94, 0 ; [#uses=1]
- %.0 = zext i1 %95 to i8 ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=2]
-define zeroext i8 @_ZNK21btGImpactQuantizedBvh8boxQueryERK6btAABBR20btAlignedObjectArrayIiE(%struct.btGImpactBoxSet* nocapture %this, %struct.GIM_AABB* nocapture %box, %"struct.btAlignedObjectArray<int>"* nocapture %collided_results) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=6]
- %10 = fcmp olt float %3, %9 ; [#uses=1]
- %clampedPoint.0.0.0.i.i = select i1 %10, float %9, float %3 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=6]
- %13 = fcmp olt float %5, %12 ; [#uses=1]
- %clampedPoint.0.1.0.i.i = select i1 %13, float %12, float %5 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=6]
- %16 = fcmp olt float %7, %15 ; [#uses=1]
- %clampedPoint.0.2.0.i.i = select i1 %16, float %15, float %7 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = fcmp olt float %18, %clampedPoint.0.0.0.i.i ; [#uses=1]
- %clampedPoint.0.0.1.i.i = select i1 %19, float %18, float %clampedPoint.0.0.0.i.i ; [#uses=1]
- %20 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=4]
- %22 = fcmp olt float %21, %clampedPoint.0.1.0.i.i ; [#uses=1]
- %clampedPoint.0.1.1.i.i = select i1 %22, float %21, float %clampedPoint.0.1.0.i.i ; [#uses=1]
- %23 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=4]
- %25 = fcmp olt float %24, %clampedPoint.0.2.0.i.i ; [#uses=1]
- %clampedPoint.0.2.1.i.i = select i1 %25, float %24, float %clampedPoint.0.2.0.i.i ; [#uses=1]
- %26 = fsub float %clampedPoint.0.2.1.i.i, %15 ; [#uses=1]
- %27 = fsub float %clampedPoint.0.1.1.i.i, %12 ; [#uses=1]
- %28 = fsub float %clampedPoint.0.0.1.i.i, %9 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=2]
- %31 = fmul float %26, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = fmul float %27, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %28, %36 ; [#uses=1]
- %38 = fadd float %37, 5.000000e-01 ; [#uses=1]
- %39 = fptoui float %38 to i16 ; [#uses=1]
- %40 = fadd float %34, 5.000000e-01 ; [#uses=1]
- %41 = fptoui float %40 to i16 ; [#uses=1]
- %42 = fadd float %31, 5.000000e-01 ; [#uses=1]
- %43 = fptoui float %42 to i16 ; [#uses=1]
- %44 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=2]
- %46 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=2]
- %50 = fcmp olt float %45, %9 ; [#uses=1]
- %clampedPoint.0.0.0.i.i19 = select i1 %50, float %9, float %45 ; [#uses=2]
- %51 = fcmp olt float %47, %12 ; [#uses=1]
- %clampedPoint.0.1.0.i.i20 = select i1 %51, float %12, float %47 ; [#uses=2]
- %52 = fcmp olt float %49, %15 ; [#uses=1]
- %clampedPoint.0.2.0.i.i21 = select i1 %52, float %15, float %49 ; [#uses=2]
- %53 = fcmp olt float %18, %clampedPoint.0.0.0.i.i19 ; [#uses=1]
- %clampedPoint.0.0.1.i.i22 = select i1 %53, float %18, float %clampedPoint.0.0.0.i.i19 ; [#uses=1]
- %54 = fcmp olt float %21, %clampedPoint.0.1.0.i.i20 ; [#uses=1]
- %clampedPoint.0.1.1.i.i23 = select i1 %54, float %21, float %clampedPoint.0.1.0.i.i20 ; [#uses=1]
- %55 = fcmp olt float %24, %clampedPoint.0.2.0.i.i21 ; [#uses=1]
- %clampedPoint.0.2.1.i.i24 = select i1 %55, float %24, float %clampedPoint.0.2.0.i.i21 ; [#uses=1]
- %56 = fsub float %clampedPoint.0.2.1.i.i24, %15 ; [#uses=1]
- %57 = fsub float %clampedPoint.0.1.1.i.i23, %12 ; [#uses=1]
- %58 = fsub float %clampedPoint.0.0.1.i.i22, %9 ; [#uses=1]
- %59 = fmul float %56, %30 ; [#uses=1]
- %60 = fmul float %57, %33 ; [#uses=1]
- %61 = fmul float %58, %36 ; [#uses=1]
- %62 = fadd float %61, 5.000000e-01 ; [#uses=1]
- %63 = fptoui float %62 to i16 ; [#uses=1]
- %64 = fadd float %60, 5.000000e-01 ; [#uses=1]
- %65 = fptoui float %64 to i16 ; [#uses=1]
- %66 = fadd float %59, 5.000000e-01 ; [#uses=1]
- %67 = fptoui float %66 to i16 ; [#uses=1]
- %68 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %68, label %bb.nph, label %bb11
-
-bb.nph: ; preds = %entry
- %69 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %70 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=5]
- %71 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 2 ; [#uses=2]
- %72 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 3 ; [#uses=5]
- %73 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 4 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb10.backedge, %bb.nph
- %curIndex.026 = phi i32 [ 0, %bb.nph ], [ %curIndex.0.be, %bb10.backedge ] ; [#uses=11]
- %74 = load %struct.BT_QUANTIZED_BVH_NODE** %69, align 4 ; [#uses=8]
- %75 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 0, i32 0 ; [#uses=1]
- %76 = load i16* %75, align 2 ; [#uses=1]
- %77 = icmp ugt i16 %76, %63 ; [#uses=1]
- br i1 %77, label %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread, label %bb.i.i25
-
-bb.i.i25: ; preds = %bb
- %78 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 1, i32 0 ; [#uses=1]
- %79 = load i16* %78, align 2 ; [#uses=1]
- %80 = icmp ult i16 %79, %39 ; [#uses=1]
- br i1 %80, label %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i25
- %81 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 0, i32 1 ; [#uses=1]
- %82 = load i16* %81, align 2 ; [#uses=1]
- %83 = icmp ugt i16 %82, %65 ; [#uses=1]
- br i1 %83, label %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i
- %84 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 1, i32 1 ; [#uses=1]
- %85 = load i16* %84, align 2 ; [#uses=1]
- %86 = icmp ult i16 %85, %41 ; [#uses=1]
- br i1 %86, label %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread, label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i
- %87 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 0, i32 2 ; [#uses=1]
- %88 = load i16* %87, align 2 ; [#uses=1]
- %89 = icmp ugt i16 %88, %67 ; [#uses=1]
- br i1 %89, label %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread, label %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit
-
-_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread: ; preds = %bb3.i.i, %bb2.i.i, %bb1.i.i, %bb.i.i25, %bb
- %90 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 2 ; [#uses=1]
- %91 = load i32* %90, align 4 ; [#uses=1]
- %toBool27 = icmp slt i32 %91, 0 ; [#uses=1]
- br label %bb4
-
-_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit: ; preds = %bb3.i.i
- %92 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 1, i32 2 ; [#uses=1]
- %93 = load i16* %92, align 2 ; [#uses=1]
- %phitmp = icmp ult i16 %93, %43 ; [#uses=3]
- %94 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %74, i32 %curIndex.026, i32 2 ; [#uses=1]
- %95 = load i32* %94, align 4 ; [#uses=2]
- %toBool = icmp slt i32 %95, 0 ; [#uses=3]
- %or.cond = or i1 %toBool, %phitmp ; [#uses=1]
- br i1 %or.cond, label %bb4, label %bb3
-
-bb3: ; preds = %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit
- %96 = load i32* %70, align 4 ; [#uses=6]
- %97 = load i32* %71, align 4 ; [#uses=2]
- %98 = icmp eq i32 %97, %96 ; [#uses=1]
- br i1 %98, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb3
- %99 = icmp eq i32 %96, 0 ; [#uses=1]
- %100 = shl i32 %96, 1 ; [#uses=1]
- %iftmp.299.0.i.i = select i1 %99, i32 1, i32 %100 ; [#uses=4]
- %101 = icmp slt i32 %97, %iftmp.299.0.i.i ; [#uses=1]
- br i1 %101, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %102 = icmp eq i32 %iftmp.299.0.i.i, 0 ; [#uses=1]
- br i1 %102, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %103 = shl i32 %iftmp.299.0.i.i, 2 ; [#uses=1]
- %104 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %103, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %104 to i32* ; [#uses=1]
- %.pre.i = load i32* %70, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %105 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %96, %bb.i.i ] ; [#uses=2]
- %106 = phi i32* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %107 = icmp sgt i32 %105, 0 ; [#uses=1]
- br i1 %107, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr i32* %106, i32 %indvar.i.i.i ; [#uses=2]
- %108 = icmp eq i32* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %108, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %109 = load i32** %72, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr i32* %109, i32 %indvar.i.i.i ; [#uses=1]
- %110 = load i32* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store i32 %110, i32* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %105 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %111 = load i32** %72, align 4 ; [#uses=2]
- %112 = icmp eq i32* %111, null ; [#uses=1]
- br i1 %112, label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- %113 = load i8* %73, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %113, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %114 = bitcast i32* %111 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %114)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %72, align 4
- br label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- store i8 1, i8* %73, align 4
- store i32* %106, i32** %72, align 4
- store i32 %iftmp.299.0.i.i, i32* %71, align 4
- %.pre5.i = load i32* %70, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, %bb.i, %bb3
- %115 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i ], [ %96, %bb3 ], [ %96, %bb.i ] ; [#uses=2]
- %116 = load i32** %72, align 4 ; [#uses=1]
- %117 = getelementptr inbounds i32* %116, i32 %115 ; [#uses=2]
- %118 = icmp eq i32* %117, null ; [#uses=1]
- br i1 %118, label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 %95, i32* %117, align 4
- %.pre6.i = load i32* %70, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit
-
-_ZN20btAlignedObjectArrayIiE9push_backERKi.exit: ; preds = %bb2.i, %bb1.i
- %119 = phi i32 [ %115, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %120 = add nsw i32 %119, 1 ; [#uses=1]
- store i32 %120, i32* %70, align 4
- br label %bb4
-
-bb4: ; preds = %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit, %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread
- %toBool29 = phi i1 [ %toBool27, %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread ], [ %toBool, %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit ], [ %toBool, %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit ] ; [#uses=1]
- %121 = phi i1 [ true, %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit.thread ], [ %phitmp, %_ZNK18btQuantizedBvhTree24testQuantizedBoxOverlappEiPtS0_.exit ], [ %phitmp, %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit ] ; [#uses=1]
- %or.cond18 = and i1 %121, %toBool29 ; [#uses=1]
- br i1 %or.cond18, label %bb9, label %bb8
-
-bb8: ; preds = %bb4
- %122 = add nsw i32 %curIndex.026, 1 ; [#uses=1]
- br label %bb10.backedge
-
-bb10.backedge: ; preds = %bb9, %bb8
- %curIndex.0.be = phi i32 [ %122, %bb8 ], [ %127, %bb9 ] ; [#uses=2]
- %123 = icmp slt i32 %curIndex.0.be, %1 ; [#uses=1]
- br i1 %123, label %bb, label %bb11
-
-bb9: ; preds = %bb4
- %124 = load %struct.BT_QUANTIZED_BVH_NODE** %69, align 4 ; [#uses=1]
- %125 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %124, i32 %curIndex.026, i32 2 ; [#uses=1]
- %126 = load i32* %125, align 4 ; [#uses=1]
- %127 = sub i32 %curIndex.026, %126 ; [#uses=1]
- br label %bb10.backedge
-
-bb11: ; preds = %bb10.backedge, %entry
- %128 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided_results, i32 0, i32 1 ; [#uses=1]
- %129 = load i32* %128, align 4 ; [#uses=1]
- %130 = icmp sgt i32 %129, 0 ; [#uses=1]
- %.0 = zext i1 %130 to i8 ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE7reserveEi(%struct.QuantizedNodeArray* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = shl i32 %_Count, 4 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.BT_QUANTIZED_BVH_NODE* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.BT_QUANTIZED_BVH_NODE* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=9]
- %7 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE8allocateEi.exit
- %10 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb3.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=16]
- %scevgep.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i ; [#uses=1]
- %11 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %scevgep.i, null ; [#uses=1]
- br i1 %11, label %bb3.i, label %bb1.i5
-
-bb1.i5: ; preds = %bb.i4
- %scevgep17.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 0, i32 1 ; [#uses=1]
- %scevgep18.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 0, i32 2 ; [#uses=1]
- %scevgep19.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 1, i32 0 ; [#uses=1]
- %scevgep20.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 1, i32 1 ; [#uses=1]
- %scevgep21.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 1, i32 2 ; [#uses=1]
- %scevgep22.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 2 ; [#uses=1]
- %scevgep16.i = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %6, i32 %indvar.i, i32 0, i32 0 ; [#uses=1]
- %12 = load %struct.BT_QUANTIZED_BVH_NODE** %10, align 4 ; [#uses=7]
- %scevgep89.i = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %indvar.i, i32 0, i32 0 ; [#uses=1]
- %13 = load i16* %scevgep89.i, align 4 ; [#uses=1]
- store i16 %13, i16* %scevgep16.i, align 4
- %scevgep10.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %indvar.i, i32 0, i32 1 ; [#uses=1]
- %14 = load i16* %scevgep10.i, align 2 ; [#uses=1]
- store i16 %14, i16* %scevgep17.i, align 2
- %scevgep11.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %indvar.i, i32 0, i32 2 ; [#uses=1]
- %15 = load i16* %scevgep11.i, align 4 ; [#uses=1]
- store i16 %15, i16* %scevgep18.i, align 4
- %scevgep12.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %indvar.i, i32 1, i32 0 ; [#uses=1]
- %16 = load i16* %scevgep12.i, align 2 ; [#uses=1]
- store i16 %16, i16* %scevgep19.i, align 2
- %scevgep13.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %indvar.i, i32 1, i32 1 ; [#uses=1]
- %17 = load i16* %scevgep13.i, align 2 ; [#uses=1]
- store i16 %17, i16* %scevgep20.i, align 2
- %scevgep14.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %indvar.i, i32 1, i32 2 ; [#uses=1]
- %18 = load i16* %scevgep14.i, align 2 ; [#uses=1]
- store i16 %18, i16* %scevgep21.i, align 2
- %scevgep15.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %12, i32 %indvar.i, i32 2 ; [#uses=1]
- %19 = load i32* %scevgep15.i, align 4 ; [#uses=1]
- store i32 %19, i32* %scevgep22.i, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i5, %bb.i4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE4copyEiiPS0_.exit: ; preds = %bb3.i, %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE8allocateEi.exit
- %20 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 3 ; [#uses=3]
- %21 = load %struct.BT_QUANTIZED_BVH_NODE** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %21, null ; [#uses=1]
- br i1 %22, label %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE4copyEiiPS0_.exit
- %23 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %25 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %21 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %25)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %20, align 4
- br label %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE4copyEiiPS0_.exit
- %26 = getelementptr inbounds %struct.QuantizedNodeArray* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* %6, %struct.BT_QUANTIZED_BVH_NODE** %20, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btQuantizedBvhTree10build_treeER18GIM_BVH_DATA_ARRAY(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes) align 2 {
-entry:
- tail call void @_ZN18btQuantizedBvhTree17calc_quantizationER18GIM_BVH_DATA_ARRAYf(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, float 1.000000e+00)
- %0 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %0, align 4
- %1 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 1 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = shl i32 %2, 1 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = icmp slt i32 %5, %3 ; [#uses=1]
- br i1 %6, label %bb.nph.i, label %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE6resizeEiRKS0_.exit
-
-bb.nph.i: ; preds = %entry
- %7 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE7reserveEi(%struct.QuantizedNodeArray* %7, i32 %3) inlinehint
- %8 = getelementptr inbounds %struct.btQuantizedBvhTree* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %tmp3 = sub i32 %3, %5 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp4 = add i32 %5, %indvar.i ; [#uses=2]
- %9 = load %struct.BT_QUANTIZED_BVH_NODE** %8, align 4 ; [#uses=2]
- %scevgep.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %tmp4 ; [#uses=1]
- %10 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %scevgep.i, null ; [#uses=1]
- br i1 %10, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- %scevgep25.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %9, i32 %tmp4, i32 2 ; [#uses=1]
- store i32 0, i32* %scevgep25.i, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp3 ; [#uses=1]
- br i1 %exitcond, label %_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE6resizeEiRKS0_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE6resizeEiRKS0_.exit: ; preds = %bb10.i, %entry
- store i32 %3, i32* %4, align 4
- %11 = load i32* %1, align 4 ; [#uses=1]
- tail call void @_ZN18btQuantizedBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btQuantizedBvhTree* %this, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 %11)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btGImpactQuantizedBvh8buildSetEv(%struct.btGImpactBoxSet* %this) align 2 {
-entry:
- %primitive_boxes = alloca %struct.GIM_BVH_DATA_ARRAY, align 8 ; [#uses=7]
- %0 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 4 ; [#uses=4]
- store i8 1, i8* %0, align 8
- %1 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 3 ; [#uses=8]
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- %2 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 1 ; [#uses=7]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %3, align 8
- %4 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 1 ; [#uses=2]
- %5 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 3 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %11 = invoke i32 %10(%struct.btActionInterface* %5)
- to label %invcont unwind label %lpad ; [#uses=4]
-
-invcont: ; preds = %entry
- %12 = load i32* %2, align 4 ; [#uses=1]
- %13 = icmp slt i32 %12, %11 ; [#uses=1]
- br i1 %13, label %bb.nph.i, label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit
-
-bb.nph.i: ; preds = %invcont
- %14 = getelementptr inbounds %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE7reserveEi(%"struct.btAlignedObjectArray<GIM_BVH_DATA>"* %14, i32 %11) inlinehint
- to label %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit unwind label %lpad
-
-_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit: ; preds = %bb.nph.i, %invcont
- store i32 %11, i32* %2, align 4
- br label %bb3
-
-bb: ; preds = %bb3
- %15 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btActionInterface* %15, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 4 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %19 to void (%struct.btActionInterface*, i32, %struct.GIM_AABB*)* ; [#uses=1]
- %scevgep2930 = getelementptr inbounds %struct.GIM_AABB_DATA* %20, i32 %25, i32 0 ; [#uses=1]
- invoke void %21(%struct.btActionInterface* %15, i32 %25, %struct.GIM_AABB* %scevgep2930)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %bb
- %22 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.GIM_AABB_DATA* %22, i32 %25, i32 1 ; [#uses=1]
- store i32 %25, i32* %scevgep, align 4
- %23 = add nsw i32 %25, 1 ; [#uses=1]
- %.pre = load i32* %2, align 4 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %invcont2, %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit
- %24 = phi i32 [ %.pre, %invcont2 ], [ %11, %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit ] ; [#uses=1]
- %25 = phi i32 [ %23, %invcont2 ], [ 0, %_ZN20btAlignedObjectArrayI12GIM_BVH_DATAE6resizeEiRKS0_.exit ] ; [#uses=6]
- %26 = icmp sgt i32 %24, %25 ; [#uses=1]
- br i1 %26, label %bb, label %bb4
-
-bb4: ; preds = %bb3
- %27 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0 ; [#uses=2]
- call void @_ZN18btQuantizedBvhTree17calc_quantizationER18GIM_BVH_DATA_ARRAYf(%struct.btQuantizedBvhTree* %27, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, float 1.000000e+00)
- %28 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = load i32* %2, align 4 ; [#uses=2]
- %30 = shl i32 %29, 1 ; [#uses=4]
- %31 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %32 = load i32* %31, align 4 ; [#uses=3]
- %33 = icmp slt i32 %32, %30 ; [#uses=1]
- br i1 %33, label %bb.nph.i.i, label %bb9
-
-bb.nph.i.i: ; preds = %bb4
- %34 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 1, i32 0 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI21BT_QUANTIZED_BVH_NODEE7reserveEi(%struct.QuantizedNodeArray* %34, i32 %30) inlinehint
- to label %.noexc25 unwind label %lpad
-
-.noexc25: ; preds = %bb.nph.i.i
- %35 = getelementptr inbounds %struct.btGImpactBoxSet* %this, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %tmp27 = sub i32 %30, %32 ; [#uses=1]
- br label %bb7.i.i
-
-bb7.i.i: ; preds = %bb10.i.i, %.noexc25
- %indvar.i.i = phi i32 [ 0, %.noexc25 ], [ %indvar.next.i.i, %bb10.i.i ] ; [#uses=2]
- %tmp28 = add i32 %32, %indvar.i.i ; [#uses=2]
- %36 = load %struct.BT_QUANTIZED_BVH_NODE** %35, align 4 ; [#uses=2]
- %scevgep.i.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %36, i32 %tmp28 ; [#uses=1]
- %37 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %scevgep.i.i, null ; [#uses=1]
- br i1 %37, label %bb10.i.i, label %bb8.i.i
-
-bb8.i.i: ; preds = %bb7.i.i
- %scevgep25.i.i = getelementptr %struct.BT_QUANTIZED_BVH_NODE* %36, i32 %tmp28, i32 2 ; [#uses=1]
- store i32 0, i32* %scevgep25.i.i, align 4
- br label %bb10.i.i
-
-bb10.i.i: ; preds = %bb8.i.i, %bb7.i.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %tmp27 ; [#uses=1]
- br i1 %exitcond, label %bb9.loopexit, label %bb7.i.i
-
-invcont7: ; preds = %bb2.i.i.i.i, %lpad
- store i8 1, i8* %0, align 8
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- store i32 0, i32* %2, align 4
- store i32 0, i32* %3, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb9.loopexit: ; preds = %bb10.i.i
- %.pre32 = load i32* %2, align 4 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb9.loopexit, %bb4
- %38 = phi i32 [ %.pre32, %bb9.loopexit ], [ %29, %bb4 ] ; [#uses=1]
- store i32 %30, i32* %31, align 4
- call void @_ZN18btQuantizedBvhTree15_build_sub_treeER18GIM_BVH_DATA_ARRAYii(%struct.btQuantizedBvhTree* %27, %struct.GIM_BVH_DATA_ARRAY* %primitive_boxes, i32 0, i32 %38)
- %39 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=2]
- %40 = icmp eq %struct.GIM_AABB_DATA* %39, null ; [#uses=1]
- br i1 %40, label %_ZN18GIM_BVH_DATA_ARRAYD1Ev.exit22, label %bb.i.i.i.i19
-
-bb.i.i.i.i19: ; preds = %bb9
- %41 = load i8* %0, align 8 ; [#uses=1]
- %toBool.i.i.i.i18 = icmp eq i8 %41, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i18, label %bb2.i.i.i.i21, label %bb1.i.i.i.i20
-
-bb1.i.i.i.i20: ; preds = %bb.i.i.i.i19
- %42 = bitcast %struct.GIM_AABB_DATA* %39 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %42)
- br label %bb2.i.i.i.i21
-
-bb2.i.i.i.i21: ; preds = %bb1.i.i.i.i20, %bb.i.i.i.i19
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- ret void
-
-_ZN18GIM_BVH_DATA_ARRAYD1Ev.exit22: ; preds = %bb9
- ret void
-
-lpad: ; preds = %bb.nph.i.i, %bb, %bb.nph.i, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select11 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %43 = load %struct.GIM_AABB_DATA** %1, align 4 ; [#uses=2]
- %44 = icmp eq %struct.GIM_AABB_DATA* %43, null ; [#uses=1]
- br i1 %44, label %invcont7, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %lpad
- %45 = load i8* %0, align 8 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %46 = bitcast %struct.GIM_AABB_DATA* %43 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %46)
- to label %bb2.i.i.i.i unwind label %lpad12
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.GIM_AABB_DATA* null, %struct.GIM_AABB_DATA** %1, align 4
- br label %invcont7
-
-lpad12: ; preds = %bb1.i.i.i.i
- %eh_ptr13 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select15 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZNK22btGImpactCompoundShape21calculateLocalInertiaEfR9btVector3(%struct.btGImpactCompoundShape* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %temp_inertia = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 27 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0 ; [#uses=2]
- %5 = bitcast i32 (...)* %3 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- call void %5(%struct.btGImpactShapeInterface* %4)
- %6 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=4]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=4]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=4]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %9, align 4
- %10 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 21 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to i32 (%struct.btGImpactCompoundShape*)* ; [#uses=1]
- %14 = call i32 %13(%struct.btGImpactCompoundShape* %this) ; [#uses=5]
- %15 = sitofp i32 %14 to float ; [#uses=1]
- %16 = fdiv float %mass, %15 ; [#uses=1]
- %17 = icmp eq i32 %14, 0 ; [#uses=1]
- br i1 %17, label %bb6, label %bb.nph
-
-bb.nph: ; preds = %entry
- %18 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %temp_inertia, i32 0, i32 0, i32 2 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btQuadWord* %temp_inertia, i32 0, i32 0, i32 1 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %temp_inertia, i32 0, i32 0, i32 0 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %tmp11 = add i32 %14, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb4.backedge, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb4.backedge ] ; [#uses=3]
- %tmp12 = sub i32 %tmp11, %indvar ; [#uses=2]
- %tmp13 = sub i32 %14, %indvar ; [#uses=11]
- %23 = load %struct.btCollisionShape*** %18, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionShape** %23, i32 %tmp12 ; [#uses=1]
- %24 = load %struct.btCollisionShape** %scevgep, align 4 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btCollisionShape* %24, i32 0, i32 0 ; [#uses=1]
- %26 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 8 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %28 to void (%struct.btCollisionShape*, float, %struct.btQuadWord*)* ; [#uses=1]
- call void %29(%struct.btCollisionShape* %24, float %16, %struct.btQuadWord* %temp_inertia)
- %30 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %31 = getelementptr inbounds i32 (...)** %30, i32 22 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = bitcast i32 (...)* %32 to i8 (%struct.btGImpactCompoundShape*)* ; [#uses=1]
- %34 = call zeroext i8 %33(%struct.btGImpactCompoundShape* %this) ; [#uses=1]
- %toBool = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %35 = load %struct.btTransform** %22, align 4 ; [#uses=12]
- %scevgep2425 = getelementptr inbounds %struct.btTransform* %35, i32 %tmp12, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %scevgep2425, align 4 ; [#uses=2]
- %scevgep2223 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -3, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %scevgep2223, align 4 ; [#uses=2]
- %scevgep2021 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -2, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %scevgep2021, align 4 ; [#uses=2]
- %scevgep19 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -3, i32 0, i32 -3 ; [#uses=1]
- %39 = load float* %scevgep19, align 4 ; [#uses=2]
- %scevgep18 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -2, i32 0, i32 -3 ; [#uses=1]
- %40 = load float* %scevgep18, align 4 ; [#uses=2]
- %scevgep17 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -1, i32 0, i32 -3 ; [#uses=1]
- %41 = load float* %scevgep17, align 4 ; [#uses=2]
- %scevgep16 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -3, i32 0, i32 -2 ; [#uses=1]
- %42 = load float* %scevgep16, align 4 ; [#uses=2]
- %scevgep15 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -2, i32 0, i32 -2 ; [#uses=1]
- %43 = load float* %scevgep15, align 4 ; [#uses=2]
- %scevgep14 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -1, i32 0, i32 -2 ; [#uses=1]
- %44 = load float* %scevgep14, align 4 ; [#uses=2]
- %45 = load float* %19, align 8 ; [#uses=3]
- %46 = fmul float %44, %45 ; [#uses=1]
- %47 = load float* %20, align 4 ; [#uses=3]
- %48 = fmul float %41, %47 ; [#uses=1]
- %49 = load float* %21, align 8 ; [#uses=3]
- %50 = fmul float %38, %49 ; [#uses=1]
- %51 = fmul float %43, %45 ; [#uses=1]
- %52 = fmul float %40, %47 ; [#uses=1]
- %53 = fmul float %37, %49 ; [#uses=1]
- %54 = fmul float %42, %45 ; [#uses=1]
- %55 = fmul float %39, %47 ; [#uses=1]
- %56 = fmul float %36, %49 ; [#uses=1]
- %57 = fmul float %38, %50 ; [#uses=1]
- %58 = fmul float %41, %48 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = fmul float %44, %46 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %37, %53 ; [#uses=1]
- %63 = fmul float %40, %52 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %43, %51 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %36, %56 ; [#uses=1]
- %68 = fmul float %39, %55 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %42, %54 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %scevgep2627 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 -1, i32 0, i32 0 ; [#uses=1]
- %72 = load float* %scevgep2627, align 4 ; [#uses=2]
- %73 = fmul float %72, %72 ; [#uses=2]
- %scevgep28 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 0, i32 0, i32 -3 ; [#uses=1]
- %74 = load float* %scevgep28, align 4 ; [#uses=2]
- %75 = fmul float %74, %74 ; [#uses=2]
- %scevgep29 = getelementptr %struct.btTransform* %35, i32 %tmp13, i32 0, i32 0, i32 0, i32 0, i32 -2 ; [#uses=1]
- %76 = load float* %scevgep29, align 4 ; [#uses=2]
- %77 = fmul float %76, %76 ; [#uses=2]
- %78 = fadd float %75, %77 ; [#uses=1]
- %79 = fmul float %71, %78 ; [#uses=1]
- %80 = fadd float %73, %77 ; [#uses=1]
- %81 = fmul float %66, %80 ; [#uses=1]
- %82 = fadd float %73, %75 ; [#uses=1]
- %83 = fmul float %61, %82 ; [#uses=1]
- %84 = load float* %8, align 4 ; [#uses=1]
- %85 = fadd float %84, %83 ; [#uses=1]
- %86 = load float* %7, align 4 ; [#uses=1]
- %87 = fadd float %86, %81 ; [#uses=1]
- %88 = load float* %6, align 4 ; [#uses=1]
- %89 = fadd float %88, %79 ; [#uses=1]
- br label %bb4.backedge
-
-bb4.backedge: ; preds = %bb2, %bb1
- %storemerge31 = phi float [ %144, %bb2 ], [ %89, %bb1 ] ; [#uses=1]
- %storemerge30 = phi float [ %142, %bb2 ], [ %87, %bb1 ] ; [#uses=1]
- %storemerge = phi float [ %140, %bb2 ], [ %85, %bb1 ] ; [#uses=1]
- store float %storemerge31, float* %6, align 4
- store float %storemerge30, float* %7, align 4
- store float %storemerge, float* %8, align 4
- store float 0.000000e+00, float* %9, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %14 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb
-
-bb2: ; preds = %bb
- %90 = call %struct.btTransform* @_ZN11btTransform11getIdentityEv() ; [#uses=0]
- %91 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0), align 32 ; [#uses=2]
- %92 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0), align 16 ; [#uses=2]
- %93 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0), align 32 ; [#uses=2]
- %94 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1), align 4 ; [#uses=2]
- %95 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1), align 4 ; [#uses=2]
- %96 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1), align 4 ; [#uses=2]
- %97 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2), align 8 ; [#uses=2]
- %98 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2), align 8 ; [#uses=2]
- %99 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2), align 8 ; [#uses=2]
- %100 = load float* %19, align 8 ; [#uses=3]
- %101 = fmul float %99, %100 ; [#uses=1]
- %102 = load float* %20, align 4 ; [#uses=3]
- %103 = fmul float %96, %102 ; [#uses=1]
- %104 = load float* %21, align 8 ; [#uses=3]
- %105 = fmul float %93, %104 ; [#uses=1]
- %106 = fmul float %98, %100 ; [#uses=1]
- %107 = fmul float %95, %102 ; [#uses=1]
- %108 = fmul float %92, %104 ; [#uses=1]
- %109 = fmul float %97, %100 ; [#uses=1]
- %110 = fmul float %94, %102 ; [#uses=1]
- %111 = fmul float %91, %104 ; [#uses=1]
- %112 = fmul float %93, %105 ; [#uses=1]
- %113 = fmul float %96, %103 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=1]
- %115 = fmul float %99, %101 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=1]
- %117 = fmul float %92, %108 ; [#uses=1]
- %118 = fmul float %95, %107 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = fmul float %98, %106 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fmul float %91, %111 ; [#uses=1]
- %123 = fmul float %94, %110 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=1]
- %125 = fmul float %97, %109 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 1, i32 0, i32 0), align 16 ; [#uses=2]
- %128 = fmul float %127, %127 ; [#uses=2]
- %129 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 1, i32 0, i32 1), align 4 ; [#uses=2]
- %130 = fmul float %129, %129 ; [#uses=2]
- %131 = load float* getelementptr inbounds (%struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i32 0, i32 1, i32 0, i32 2), align 8 ; [#uses=2]
- %132 = fmul float %131, %131 ; [#uses=2]
- %133 = fadd float %130, %132 ; [#uses=1]
- %134 = fmul float %126, %133 ; [#uses=1]
- %135 = fadd float %128, %132 ; [#uses=1]
- %136 = fmul float %121, %135 ; [#uses=1]
- %137 = fadd float %128, %130 ; [#uses=1]
- %138 = fmul float %116, %137 ; [#uses=1]
- %139 = load float* %8, align 4 ; [#uses=1]
- %140 = fadd float %139, %138 ; [#uses=1]
- %141 = load float* %7, align 4 ; [#uses=1]
- %142 = fadd float %141, %136 ; [#uses=1]
- %143 = load float* %6, align 4 ; [#uses=1]
- %144 = fadd float %143, %134 ; [#uses=1]
- br label %bb4.backedge
-
-bb6: ; preds = %bb4.backedge, %entry
- %145 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %146 = getelementptr inbounds i32 (...)** %145, i32 28 ; [#uses=1]
- %147 = load i32 (...)** %146, align 4 ; [#uses=1]
- %148 = bitcast i32 (...)* %147 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- call void %148(%struct.btGImpactShapeInterface* %4)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btGImpactShapeInterface7getAabbERK11btTransformR9btVector3S4_(%struct.btGImpactShapeInterface* nocapture %this, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fadd float %11, %5 ; [#uses=1]
- %13 = fadd float %9, %3 ; [#uses=1]
- %14 = fadd float %7, %1 ; [#uses=1]
- %15 = fmul float %12, 5.000000e-01 ; [#uses=4]
- %16 = fmul float %13, 5.000000e-01 ; [#uses=4]
- %17 = fmul float %14, 5.000000e-01 ; [#uses=4]
- %18 = fsub float %11, %15 ; [#uses=3]
- %19 = fsub float %9, %16 ; [#uses=3]
- %20 = fsub float %7, %17 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fmul float %22, %17 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = fmul float %25, %16 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fmul float %29, %15 ; [#uses=1]
- %31 = fadd float %27, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fadd float %31, %33 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %17 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = fmul float %39, %16 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=2]
- %44 = fmul float %43, %15 ; [#uses=1]
- %45 = fadd float %41, %44 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fadd float %45, %47 ; [#uses=2]
- %49 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = fmul float %50, %17 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = fmul float %53, %16 ; [#uses=1]
- %55 = fadd float %51, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=2]
- %58 = fmul float %57, %15 ; [#uses=1]
- %59 = fadd float %55, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=2]
- %63 = tail call float @fabsf(float %29) nounwind readnone ; [#uses=1]
- %64 = tail call float @fabsf(float %25) nounwind readnone ; [#uses=1]
- %65 = tail call float @fabsf(float %22) nounwind readnone ; [#uses=1]
- %66 = fmul float %20, %65 ; [#uses=1]
- %67 = fmul float %19, %64 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = fmul float %18, %63 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=2]
- %71 = tail call float @fabsf(float %43) nounwind readnone ; [#uses=1]
- %72 = tail call float @fabsf(float %39) nounwind readnone ; [#uses=1]
- %73 = tail call float @fabsf(float %36) nounwind readnone ; [#uses=1]
- %74 = fmul float %20, %73 ; [#uses=1]
- %75 = fmul float %19, %72 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = fmul float %18, %71 ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=2]
- %79 = tail call float @fabsf(float %57) nounwind readnone ; [#uses=1]
- %80 = tail call float @fabsf(float %53) nounwind readnone ; [#uses=1]
- %81 = tail call float @fabsf(float %50) nounwind readnone ; [#uses=1]
- %82 = fmul float %20, %81 ; [#uses=1]
- %83 = fmul float %19, %80 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=1]
- %85 = fmul float %18, %79 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=2]
- %87 = fsub float %34, %70 ; [#uses=1]
- %88 = fsub float %48, %78 ; [#uses=1]
- %89 = fsub float %62, %86 ; [#uses=1]
- %90 = fadd float %34, %70 ; [#uses=1]
- %91 = fadd float %48, %78 ; [#uses=1]
- %92 = fadd float %62, %86 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %89, float* %93, align 4
- %94 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %88, float* %94, align 4
- %95 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %87, float* %95, align 4
- %96 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %96, align 4
- %97 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %92, float* %97, align 4
- %98 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %91, float* %98, align 4
- %99 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %90, float* %99, align 4
- %100 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %100, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGImpactShapeInterface10postUpdateEv(%struct.btGImpactShapeInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK23btGImpactShapeInterface12getShapeTypeEv(%struct.btGImpactShapeInterface* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 25
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGImpactShapeInterface15setLocalScalingERK9btVector3(%struct.btGImpactShapeInterface* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 17 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %16(%struct.btGImpactShapeInterface* %this)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btQuadWord* @_ZNK23btGImpactShapeInterface15getLocalScalingEv(%struct.btGImpactShapeInterface* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 3 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGImpactShapeInterface9setMarginEf(%struct.btGImpactShapeInterface* %this, float %margin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %margin, float* %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 21 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to i32 (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %6 = tail call i32 %5(%struct.btGImpactShapeInterface* %this) ; [#uses=3]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb2, label %bb.nph
-
-bb.nph: ; preds = %entry
- %tmp3 = add i32 %6, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %tmp4 = sub i32 %tmp3, %indvar ; [#uses=1]
- %8 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 30 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to %struct.btCollisionShape* (%struct.btGImpactShapeInterface*, i32)* ; [#uses=1]
- %12 = tail call %struct.btCollisionShape* %11(%struct.btGImpactShapeInterface* %this, i32 %tmp4) ; [#uses=2]
- %13 = getelementptr inbounds %struct.btCollisionShape* %12, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 10 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to void (%struct.btCollisionShape*, float)* ; [#uses=1]
- tail call void %17(%struct.btCollisionShape* %12, float %margin)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %6 ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %bb, %entry
- %18 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %18, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btGImpactShapeInterface15lockChildShapesEv(%struct.btGImpactShapeInterface* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btGImpactShapeInterface17unlockChildShapesEv(%struct.btGImpactShapeInterface* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btGImpactShapeInterface12getChildAabbEiRK11btTransformR9btVector3S4_(%struct.btGImpactShapeInterface* %this, i32 %child_index, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %child_aabb = alloca %struct.GIM_AABB, align 8 ; [#uses=7]
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 20 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to %struct.btActionInterface* (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %5 = call %struct.btActionInterface* %4(%struct.btGImpactShapeInterface* %this) ; [#uses=2]
- %6 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 4 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btActionInterface*, i32, %struct.GIM_AABB*)* ; [#uses=1]
- call void %10(%struct.btActionInterface* %5, i32 %child_index, %struct.GIM_AABB* %child_aabb)
- %11 = getelementptr inbounds %struct.GIM_AABB* %child_aabb, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 8 ; [#uses=2]
- %13 = getelementptr inbounds %struct.GIM_AABB* %child_aabb, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 8 ; [#uses=1]
- %15 = fadd float %12, %14 ; [#uses=1]
- %16 = getelementptr inbounds %struct.GIM_AABB* %child_aabb, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=2]
- %18 = getelementptr inbounds %struct.GIM_AABB* %child_aabb, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fadd float %17, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.GIM_AABB* %child_aabb, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 8 ; [#uses=2]
- %23 = getelementptr inbounds %struct.GIM_AABB* %child_aabb, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 8 ; [#uses=1]
- %25 = fadd float %22, %24 ; [#uses=1]
- %26 = fmul float %15, 5.000000e-01 ; [#uses=4]
- %27 = fmul float %20, 5.000000e-01 ; [#uses=4]
- %28 = fmul float %25, 5.000000e-01 ; [#uses=4]
- %29 = fsub float %12, %26 ; [#uses=3]
- %30 = fsub float %17, %27 ; [#uses=3]
- %31 = fsub float %22, %28 ; [#uses=3]
- %32 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = fmul float %33, %28 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %27 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = fmul float %40, %26 ; [#uses=1]
- %42 = fadd float %38, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fadd float %42, %44 ; [#uses=2]
- %46 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = fmul float %47, %28 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = fmul float %50, %27 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=2]
- %55 = fmul float %54, %26 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fadd float %56, %58 ; [#uses=2]
- %60 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=2]
- %62 = fmul float %61, %28 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=2]
- %65 = fmul float %64, %27 ; [#uses=1]
- %66 = fadd float %62, %65 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=2]
- %69 = fmul float %68, %26 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fadd float %70, %72 ; [#uses=2]
- %74 = call float @fabsf(float %40) nounwind readnone ; [#uses=1]
- %75 = call float @fabsf(float %36) nounwind readnone ; [#uses=1]
- %76 = call float @fabsf(float %33) nounwind readnone ; [#uses=1]
- %77 = fmul float %31, %76 ; [#uses=1]
- %78 = fmul float %30, %75 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %29, %74 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=2]
- %82 = call float @fabsf(float %54) nounwind readnone ; [#uses=1]
- %83 = call float @fabsf(float %50) nounwind readnone ; [#uses=1]
- %84 = call float @fabsf(float %47) nounwind readnone ; [#uses=1]
- %85 = fmul float %31, %84 ; [#uses=1]
- %86 = fmul float %30, %83 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %29, %82 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=2]
- %90 = call float @fabsf(float %68) nounwind readnone ; [#uses=1]
- %91 = call float @fabsf(float %64) nounwind readnone ; [#uses=1]
- %92 = call float @fabsf(float %61) nounwind readnone ; [#uses=1]
- %93 = fmul float %31, %92 ; [#uses=1]
- %94 = fmul float %30, %91 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %29, %90 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=2]
- %98 = fsub float %45, %81 ; [#uses=1]
- %99 = fsub float %59, %89 ; [#uses=1]
- %100 = fsub float %73, %97 ; [#uses=1]
- %101 = fadd float %45, %81 ; [#uses=1]
- %102 = fadd float %59, %89 ; [#uses=1]
- %103 = fadd float %73, %97 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %100, float* %104, align 4
- %105 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %99, float* %105, align 4
- %106 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %98, float* %106, align 4
- %107 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %103, float* %108, align 4
- %109 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %102, float* %109, align 4
- %110 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %101, float* %110, align 4
- %111 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btGImpactShapeInterface7rayTestERK9btVector3S2_RN16btCollisionWorld17RayResultCallbackE(%struct.btGImpactShapeInterface* nocapture %this, %struct.btQuadWord* nocapture %rayFrom, %struct.btQuadWord* nocapture %rayTo, %"struct.btCollisionWorld::RayResultCallback"* nocapture %resultCallback) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK23btGImpactShapeInterface19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btGImpactShapeInterface* nocapture %this, %struct.btActionInterface* nocapture %callback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager10is_trimeshEv(%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager19get_primitive_countEv(%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btGImpactCompoundShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btGImpactCompoundShape* %1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 21 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to i32 (%struct.btGImpactCompoundShape*)* ; [#uses=1]
- %7 = tail call i32 %6(%struct.btGImpactCompoundShape* %1) ; [#uses=1]
- ret i32 %7
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager17get_primitive_boxEiR6btAABB(%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* nocapture %this, i32 %prim_index, %struct.GIM_AABB* %primbox) align 2 {
-entry:
- %0 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %prim_trans = alloca %struct.btTransform, align 8 ; [#uses=33]
- %1 = getelementptr inbounds %"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* %this, i32 0, i32 1 ; [#uses=3]
- %2 = load %struct.btGImpactCompoundShape** %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btGImpactCompoundShape* %2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load i32 (...)*** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds i32 (...)** %4, i32 22 ; [#uses=1]
- %6 = load i32 (...)** %5, align 4 ; [#uses=1]
- %7 = bitcast i32 (...)* %6 to i8 (%struct.btGImpactCompoundShape*)* ; [#uses=1]
- %8 = call zeroext i8 %7(%struct.btGImpactCompoundShape* %2) ; [#uses=1]
- %toBool = icmp eq i8 %8, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %9 = load %struct.btGImpactCompoundShape** %1, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btGImpactCompoundShape* %9, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 32 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to void (%struct.btTransform*, %struct.btGImpactCompoundShape*, i32)* ; [#uses=1]
- call void %14(%struct.btTransform* noalias sret %0, %struct.btGImpactCompoundShape* %9, i32 %prim_index)
- %15 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 8 ; [#uses=1]
- store float %17, float* %15, align 8
- %18 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 8 ; [#uses=1]
- store float %23, float* %21, align 8
- %24 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 8 ; [#uses=1]
- store float %29, float* %27, align 8
- %30 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 8 ; [#uses=1]
- store float %35, float* %33, align 8
- %36 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 8 ; [#uses=1]
- store float %41, float* %39, align 8
- %42 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 8 ; [#uses=1]
- store float %47, float* %45, align 8
- %48 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %51 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 8 ; [#uses=1]
- store float %53, float* %51, align 8
- %54 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 4
- %57 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 8 ; [#uses=1]
- store float %59, float* %57, align 8
- %60 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- %63 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %63, align 8
- %64 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %64, align 4
- %65 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %65, align 8
- %66 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %66, align 4
- %67 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 8
- %68 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %68, align 4
- %69 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %69, align 8
- %70 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %70, align 4
- %71 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %71, align 8
- %72 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %72, align 4
- %73 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %73, align 8
- %74 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %74, align 4
- %75 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %75, align 8
- %76 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %76, align 4
- %77 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %77, align 8
- %78 = getelementptr inbounds %struct.btTransform* %prim_trans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %78, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %79 = load %struct.btGImpactCompoundShape** %1, align 4 ; [#uses=2]
- %80 = getelementptr inbounds %struct.btGImpactCompoundShape* %79, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %81 = load i32 (...)*** %80, align 4 ; [#uses=1]
- %82 = getelementptr inbounds i32 (...)** %81, i32 30 ; [#uses=1]
- %83 = load i32 (...)** %82, align 4 ; [#uses=1]
- %84 = bitcast i32 (...)* %83 to %struct.btCollisionShape* (%struct.btGImpactCompoundShape*, i32)* ; [#uses=1]
- %85 = call %struct.btCollisionShape* %84(%struct.btGImpactCompoundShape* %79, i32 %prim_index) ; [#uses=2]
- %86 = getelementptr inbounds %struct.btCollisionShape* %85, i32 0, i32 0 ; [#uses=1]
- %87 = load i32 (...)*** %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds i32 (...)** %87, i32 2 ; [#uses=1]
- %89 = load i32 (...)** %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 1 ; [#uses=1]
- %91 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 0 ; [#uses=1]
- %92 = bitcast i32 (...)* %89 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %92(%struct.btCollisionShape* %85, %struct.btTransform* %prim_trans, %struct.btQuadWord* %91, %struct.btQuadWord* %90)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactCompoundShape24CompoundPrimitiveManager22get_primitive_triangleEiR19btPrimitiveTriangle(%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* nocapture %this, i32 %prim_index, %struct.btPrimitiveTriangle* nocapture %triangle) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btActionInterface* @_ZNK22btGImpactCompoundShape19getPrimitiveManagerEv(%struct.btGImpactCompoundShape* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- ret %struct.btActionInterface* %0
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactCompoundShape22needsRetrieveTrianglesEv(%struct.btGImpactCompoundShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactCompoundShape25needsRetrieveTetrahedronsEv(%struct.btGImpactCompoundShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactCompoundShape17getBulletTriangleEiR17btTriangleShapeEx(%struct.btGImpactCompoundShape* nocapture %this, i32 %prim_index, %struct.btTriangleShapeEx* nocapture %triangle) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactCompoundShape20getBulletTetrahedronEiR20btTetrahedronShapeEx(%struct.btGImpactCompoundShape* nocapture %this, i32 %prim_index, %struct.btTetrahedronShapeEx* nocapture %tetrahedron) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK22btGImpactCompoundShape7getNameEv(%struct.btGImpactCompoundShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([16 x i8]* @.str153, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK22btGImpactCompoundShape19getGImpactShapeTypeEv(%struct.btGImpactCompoundShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10is_trimeshEv(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager19get_primitive_countEv(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager22get_primitive_triangleEiR19btPrimitiveTriangle(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 %prim_index, %struct.btPrimitiveTriangle* nocapture %triangle) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 13 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 3 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 10 ; [#uses=1]
- %4 = load i8** %3, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 11 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = mul nsw i32 %6, %prim_index ; [#uses=5]
- %8 = getelementptr inbounds i8* %4, i32 %7 ; [#uses=2]
- br i1 %2, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %9 = bitcast i8* %8 to i16* ; [#uses=1]
- %10 = load i16* %9, align 2 ; [#uses=1]
- %11 = sext i16 %10 to i32 ; [#uses=1]
- %.sum4.i = add i32 %7, 2 ; [#uses=1]
- %12 = getelementptr inbounds i8* %4, i32 %.sum4.i ; [#uses=1]
- %13 = bitcast i8* %12 to i16* ; [#uses=1]
- %14 = load i16* %13, align 2 ; [#uses=1]
- %15 = sext i16 %14 to i32 ; [#uses=1]
- %.sum5.i = add i32 %7, 4 ; [#uses=1]
- %16 = getelementptr inbounds i8* %4, i32 %.sum5.i ; [#uses=1]
- %17 = bitcast i8* %16 to i16* ; [#uses=1]
- %18 = load i16* %17, align 2 ; [#uses=1]
- %19 = sext i16 %18 to i32 ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
-
-bb1.i: ; preds = %entry
- %20 = bitcast i8* %8 to i32* ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %.sum.i = add i32 %7, 4 ; [#uses=1]
- %22 = getelementptr inbounds i8* %4, i32 %.sum.i ; [#uses=1]
- %23 = bitcast i8* %22 to i32* ; [#uses=1]
- %24 = load i32* %23, align 4 ; [#uses=1]
- %.sum3.i = add i32 %7, 8 ; [#uses=1]
- %25 = getelementptr inbounds i8* %4, i32 %.sum3.i ; [#uses=1]
- %26 = bitcast i8* %25 to i32* ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit: ; preds = %bb1.i, %bb.i
- %indices.2.0 = phi i32 [ %19, %bb.i ], [ %27, %bb1.i ] ; [#uses=1]
- %indices.1.0 = phi i32 [ %15, %bb.i ], [ %24, %bb1.i ] ; [#uses=1]
- %indices.0.0 = phi i32 [ %11, %bb.i ], [ %21, %bb1.i ] ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 8 ; [#uses=3]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %30 = icmp eq i32 %29, 1 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 6 ; [#uses=3]
- %32 = load i8** %31, align 4 ; [#uses=5]
- %33 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 9 ; [#uses=3]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = mul nsw i32 %34, %indices.0.0 ; [#uses=5]
- %36 = getelementptr inbounds i8* %32, i32 %35 ; [#uses=2]
- br i1 %30, label %bb.i16, label %bb1.i19
-
-bb.i16: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
- %37 = bitcast i8* %36 to double* ; [#uses=1]
- %38 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load double* %37, align 4 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fpext float %41 to double ; [#uses=1]
- %43 = fmul double %39, %42 ; [#uses=1]
- %44 = fptrunc double %43 to float ; [#uses=1]
- store float %44, float* %38, align 4
- %.sum4.i14 = add i32 %35, 8 ; [#uses=1]
- %45 = getelementptr inbounds i8* %32, i32 %.sum4.i14 ; [#uses=1]
- %46 = bitcast i8* %45 to double* ; [#uses=1]
- %47 = load double* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fpext float %49 to double ; [#uses=1]
- %51 = fmul double %47, %50 ; [#uses=1]
- %52 = fptrunc double %51 to float ; [#uses=1]
- %53 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %52, float* %53, align 4
- %.sum5.i15 = add i32 %35, 16 ; [#uses=1]
- %54 = getelementptr inbounds i8* %32, i32 %.sum5.i15 ; [#uses=1]
- %55 = bitcast i8* %54 to double* ; [#uses=1]
- %56 = load double* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fpext float %58 to double ; [#uses=1]
- %60 = fmul double %56, %59 ; [#uses=1]
- %61 = fptrunc double %60 to float ; [#uses=1]
- %62 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %61, float* %62, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
-
-bb1.i19: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
- %63 = bitcast i8* %36 to float* ; [#uses=1]
- %64 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %63, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fmul float %65, %67 ; [#uses=1]
- store float %68, float* %64, align 4
- %.sum.i17 = add i32 %35, 4 ; [#uses=1]
- %69 = getelementptr inbounds i8* %32, i32 %.sum.i17 ; [#uses=1]
- %70 = bitcast i8* %69 to float* ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fmul float %71, %73 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %74, float* %75, align 4
- %.sum3.i18 = add i32 %35, 8 ; [#uses=1]
- %76 = getelementptr inbounds i8* %32, i32 %.sum3.i18 ; [#uses=1]
- %77 = bitcast i8* %76 to float* ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fmul float %78, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %81, float* %82, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20: ; preds = %bb1.i19, %bb.i16
- %83 = load i32* %28, align 4 ; [#uses=1]
- %84 = icmp eq i32 %83, 1 ; [#uses=1]
- %85 = load i8** %31, align 4 ; [#uses=5]
- %86 = load i32* %33, align 4 ; [#uses=1]
- %87 = mul nsw i32 %86, %indices.1.0 ; [#uses=5]
- %88 = getelementptr inbounds i8* %85, i32 %87 ; [#uses=2]
- br i1 %84, label %bb.i9, label %bb1.i12
-
-bb.i9: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
- %89 = bitcast i8* %88 to double* ; [#uses=1]
- %90 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %91 = load double* %89, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = fpext float %93 to double ; [#uses=1]
- %95 = fmul double %91, %94 ; [#uses=1]
- %96 = fptrunc double %95 to float ; [#uses=1]
- store float %96, float* %90, align 4
- %.sum4.i7 = add i32 %87, 8 ; [#uses=1]
- %97 = getelementptr inbounds i8* %85, i32 %.sum4.i7 ; [#uses=1]
- %98 = bitcast i8* %97 to double* ; [#uses=1]
- %99 = load double* %98, align 4 ; [#uses=1]
- %100 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = fpext float %101 to double ; [#uses=1]
- %103 = fmul double %99, %102 ; [#uses=1]
- %104 = fptrunc double %103 to float ; [#uses=1]
- %105 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %104, float* %105, align 4
- %.sum5.i8 = add i32 %87, 16 ; [#uses=1]
- %106 = getelementptr inbounds i8* %85, i32 %.sum5.i8 ; [#uses=1]
- %107 = bitcast i8* %106 to double* ; [#uses=1]
- %108 = load double* %107, align 4 ; [#uses=1]
- %109 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- %111 = fpext float %110 to double ; [#uses=1]
- %112 = fmul double %108, %111 ; [#uses=1]
- %113 = fptrunc double %112 to float ; [#uses=1]
- %114 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %113, float* %114, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13
-
-bb1.i12: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
- %115 = bitcast i8* %88 to float* ; [#uses=1]
- %116 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %117 = load float* %115, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=1]
- %120 = fmul float %117, %119 ; [#uses=1]
- store float %120, float* %116, align 4
- %.sum.i10 = add i32 %87, 4 ; [#uses=1]
- %121 = getelementptr inbounds i8* %85, i32 %.sum.i10 ; [#uses=1]
- %122 = bitcast i8* %121 to float* ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=1]
- %126 = fmul float %123, %125 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %126, float* %127, align 4
- %.sum3.i11 = add i32 %87, 8 ; [#uses=1]
- %128 = getelementptr inbounds i8* %85, i32 %.sum3.i11 ; [#uses=1]
- %129 = bitcast i8* %128 to float* ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = fmul float %130, %132 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %133, float* %134, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13: ; preds = %bb1.i12, %bb.i9
- %135 = load i32* %28, align 4 ; [#uses=1]
- %136 = icmp eq i32 %135, 1 ; [#uses=1]
- %137 = load i8** %31, align 4 ; [#uses=5]
- %138 = load i32* %33, align 4 ; [#uses=1]
- %139 = mul nsw i32 %138, %indices.2.0 ; [#uses=5]
- %140 = getelementptr inbounds i8* %137, i32 %139 ; [#uses=2]
- br i1 %136, label %bb.i3, label %bb1.i6
-
-bb.i3: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13
- %141 = bitcast i8* %140 to double* ; [#uses=1]
- %142 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %143 = load double* %141, align 4 ; [#uses=1]
- %144 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = fpext float %145 to double ; [#uses=1]
- %147 = fmul double %143, %146 ; [#uses=1]
- %148 = fptrunc double %147 to float ; [#uses=1]
- store float %148, float* %142, align 4
- %.sum4.i1 = add i32 %139, 8 ; [#uses=1]
- %149 = getelementptr inbounds i8* %137, i32 %.sum4.i1 ; [#uses=1]
- %150 = bitcast i8* %149 to double* ; [#uses=1]
- %151 = load double* %150, align 4 ; [#uses=1]
- %152 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = fpext float %153 to double ; [#uses=1]
- %155 = fmul double %151, %154 ; [#uses=1]
- %156 = fptrunc double %155 to float ; [#uses=1]
- %157 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %156, float* %157, align 4
- %.sum5.i2 = add i32 %139, 16 ; [#uses=1]
- %158 = getelementptr inbounds i8* %137, i32 %.sum5.i2 ; [#uses=1]
- %159 = bitcast i8* %158 to double* ; [#uses=1]
- %160 = load double* %159, align 4 ; [#uses=1]
- %161 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fpext float %162 to double ; [#uses=1]
- %164 = fmul double %160, %163 ; [#uses=1]
- %165 = fptrunc double %164 to float ; [#uses=1]
- %166 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %165, float* %166, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit
-
-bb1.i6: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13
- %167 = bitcast i8* %140 to float* ; [#uses=1]
- %168 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %169 = load float* %167, align 4 ; [#uses=1]
- %170 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = fmul float %169, %171 ; [#uses=1]
- store float %172, float* %168, align 4
- %.sum.i4 = add i32 %139, 4 ; [#uses=1]
- %173 = getelementptr inbounds i8* %137, i32 %.sum.i4 ; [#uses=1]
- %174 = bitcast i8* %173 to float* ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=1]
- %178 = fmul float %175, %177 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %178, float* %179, align 4
- %.sum3.i5 = add i32 %139, 8 ; [#uses=1]
- %180 = getelementptr inbounds i8* %137, i32 %.sum3.i5 ; [#uses=1]
- %181 = bitcast i8* %180 to float* ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=1]
- %183 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=1]
- %185 = fmul float %182, %184 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %185, float* %186, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit: ; preds = %bb1.i6, %bb.i3
- %187 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 1 ; [#uses=1]
- %188 = load float* %187, align 4 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 2 ; [#uses=1]
- store float %188, float* %189, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager19get_bullet_triangleEiR17btTriangleShapeEx(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 %prim_index, %struct.btTriangleShapeEx* %triangle) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 13 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 3 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 10 ; [#uses=1]
- %4 = load i8** %3, align 4 ; [#uses=5]
- %5 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 11 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = mul nsw i32 %6, %prim_index ; [#uses=5]
- %8 = getelementptr inbounds i8* %4, i32 %7 ; [#uses=2]
- br i1 %2, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %9 = bitcast i8* %8 to i16* ; [#uses=1]
- %10 = load i16* %9, align 2 ; [#uses=1]
- %11 = sext i16 %10 to i32 ; [#uses=1]
- %.sum4.i = add i32 %7, 2 ; [#uses=1]
- %12 = getelementptr inbounds i8* %4, i32 %.sum4.i ; [#uses=1]
- %13 = bitcast i8* %12 to i16* ; [#uses=1]
- %14 = load i16* %13, align 2 ; [#uses=1]
- %15 = sext i16 %14 to i32 ; [#uses=1]
- %.sum5.i = add i32 %7, 4 ; [#uses=1]
- %16 = getelementptr inbounds i8* %4, i32 %.sum5.i ; [#uses=1]
- %17 = bitcast i8* %16 to i16* ; [#uses=1]
- %18 = load i16* %17, align 2 ; [#uses=1]
- %19 = sext i16 %18 to i32 ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
-
-bb1.i: ; preds = %entry
- %20 = bitcast i8* %8 to i32* ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %.sum.i = add i32 %7, 4 ; [#uses=1]
- %22 = getelementptr inbounds i8* %4, i32 %.sum.i ; [#uses=1]
- %23 = bitcast i8* %22 to i32* ; [#uses=1]
- %24 = load i32* %23, align 4 ; [#uses=1]
- %.sum3.i = add i32 %7, 8 ; [#uses=1]
- %25 = getelementptr inbounds i8* %4, i32 %.sum3.i ; [#uses=1]
- %26 = bitcast i8* %25 to i32* ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit: ; preds = %bb1.i, %bb.i
- %indices.2.0 = phi i32 [ %19, %bb.i ], [ %27, %bb1.i ] ; [#uses=1]
- %indices.1.0 = phi i32 [ %15, %bb.i ], [ %24, %bb1.i ] ; [#uses=1]
- %indices.0.0 = phi i32 [ %11, %bb.i ], [ %21, %bb1.i ] ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 8 ; [#uses=3]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %30 = icmp eq i32 %29, 1 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 6 ; [#uses=3]
- %32 = load i8** %31, align 4 ; [#uses=5]
- %33 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 9 ; [#uses=3]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = mul nsw i32 %34, %indices.0.0 ; [#uses=5]
- %36 = getelementptr inbounds i8* %32, i32 %35 ; [#uses=2]
- br i1 %30, label %bb.i3, label %bb1.i6
-
-bb.i3: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
- %37 = bitcast i8* %36 to double* ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load double* %37, align 4 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fpext float %41 to double ; [#uses=1]
- %43 = fmul double %39, %42 ; [#uses=1]
- %44 = fptrunc double %43 to float ; [#uses=1]
- store float %44, float* %38, align 4
- %.sum4.i1 = add i32 %35, 8 ; [#uses=1]
- %45 = getelementptr inbounds i8* %32, i32 %.sum4.i1 ; [#uses=1]
- %46 = bitcast i8* %45 to double* ; [#uses=1]
- %47 = load double* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fpext float %49 to double ; [#uses=1]
- %51 = fmul double %47, %50 ; [#uses=1]
- %52 = fptrunc double %51 to float ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %52, float* %53, align 4
- %.sum5.i2 = add i32 %35, 16 ; [#uses=1]
- %54 = getelementptr inbounds i8* %32, i32 %.sum5.i2 ; [#uses=1]
- %55 = bitcast i8* %54 to double* ; [#uses=1]
- %56 = load double* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fpext float %58 to double ; [#uses=1]
- %60 = fmul double %56, %59 ; [#uses=1]
- %61 = fptrunc double %60 to float ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %61, float* %62, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit
-
-bb1.i6: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager11get_indicesEiRiS1_S1_.exit
- %63 = bitcast i8* %36 to float* ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %63, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fmul float %65, %67 ; [#uses=1]
- store float %68, float* %64, align 4
- %.sum.i4 = add i32 %35, 4 ; [#uses=1]
- %69 = getelementptr inbounds i8* %32, i32 %.sum.i4 ; [#uses=1]
- %70 = bitcast i8* %69 to float* ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fmul float %71, %73 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %74, float* %75, align 4
- %.sum3.i5 = add i32 %35, 8 ; [#uses=1]
- %76 = getelementptr inbounds i8* %32, i32 %.sum3.i5 ; [#uses=1]
- %77 = bitcast i8* %76 to float* ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fmul float %78, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %81, float* %82, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit: ; preds = %bb1.i6, %bb.i3
- %83 = load i32* %28, align 4 ; [#uses=1]
- %84 = icmp eq i32 %83, 1 ; [#uses=1]
- %85 = load i8** %31, align 4 ; [#uses=5]
- %86 = load i32* %33, align 4 ; [#uses=1]
- %87 = mul nsw i32 %86, %indices.1.0 ; [#uses=5]
- %88 = getelementptr inbounds i8* %85, i32 %87 ; [#uses=2]
- br i1 %84, label %bb.i16, label %bb1.i19
-
-bb.i16: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit
- %89 = bitcast i8* %88 to double* ; [#uses=1]
- %90 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %91 = load double* %89, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = fpext float %93 to double ; [#uses=1]
- %95 = fmul double %91, %94 ; [#uses=1]
- %96 = fptrunc double %95 to float ; [#uses=1]
- store float %96, float* %90, align 4
- %.sum4.i14 = add i32 %87, 8 ; [#uses=1]
- %97 = getelementptr inbounds i8* %85, i32 %.sum4.i14 ; [#uses=1]
- %98 = bitcast i8* %97 to double* ; [#uses=1]
- %99 = load double* %98, align 4 ; [#uses=1]
- %100 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = fpext float %101 to double ; [#uses=1]
- %103 = fmul double %99, %102 ; [#uses=1]
- %104 = fptrunc double %103 to float ; [#uses=1]
- %105 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %104, float* %105, align 4
- %.sum5.i15 = add i32 %87, 16 ; [#uses=1]
- %106 = getelementptr inbounds i8* %85, i32 %.sum5.i15 ; [#uses=1]
- %107 = bitcast i8* %106 to double* ; [#uses=1]
- %108 = load double* %107, align 4 ; [#uses=1]
- %109 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- %111 = fpext float %110 to double ; [#uses=1]
- %112 = fmul double %108, %111 ; [#uses=1]
- %113 = fptrunc double %112 to float ; [#uses=1]
- %114 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %113, float* %114, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
-
-bb1.i19: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit
- %115 = bitcast i8* %88 to float* ; [#uses=1]
- %116 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %117 = load float* %115, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=1]
- %120 = fmul float %117, %119 ; [#uses=1]
- store float %120, float* %116, align 4
- %.sum.i17 = add i32 %87, 4 ; [#uses=1]
- %121 = getelementptr inbounds i8* %85, i32 %.sum.i17 ; [#uses=1]
- %122 = bitcast i8* %121 to float* ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=1]
- %126 = fmul float %123, %125 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %126, float* %127, align 4
- %.sum3.i18 = add i32 %87, 8 ; [#uses=1]
- %128 = getelementptr inbounds i8* %85, i32 %.sum3.i18 ; [#uses=1]
- %129 = bitcast i8* %128 to float* ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = fmul float %130, %132 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %133, float* %134, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20: ; preds = %bb1.i19, %bb.i16
- %135 = load i32* %28, align 4 ; [#uses=1]
- %136 = icmp eq i32 %135, 1 ; [#uses=1]
- %137 = load i8** %31, align 4 ; [#uses=5]
- %138 = load i32* %33, align 4 ; [#uses=1]
- %139 = mul nsw i32 %138, %indices.2.0 ; [#uses=5]
- %140 = getelementptr inbounds i8* %137, i32 %139 ; [#uses=2]
- br i1 %136, label %bb.i9, label %bb1.i12
-
-bb.i9: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
- %141 = bitcast i8* %140 to double* ; [#uses=1]
- %142 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %143 = load double* %141, align 4 ; [#uses=1]
- %144 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = fpext float %145 to double ; [#uses=1]
- %147 = fmul double %143, %146 ; [#uses=1]
- %148 = fptrunc double %147 to float ; [#uses=1]
- store float %148, float* %142, align 4
- %.sum4.i7 = add i32 %139, 8 ; [#uses=1]
- %149 = getelementptr inbounds i8* %137, i32 %.sum4.i7 ; [#uses=1]
- %150 = bitcast i8* %149 to double* ; [#uses=1]
- %151 = load double* %150, align 4 ; [#uses=1]
- %152 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = fpext float %153 to double ; [#uses=1]
- %155 = fmul double %151, %154 ; [#uses=1]
- %156 = fptrunc double %155 to float ; [#uses=1]
- %157 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %156, float* %157, align 4
- %.sum5.i8 = add i32 %139, 16 ; [#uses=1]
- %158 = getelementptr inbounds i8* %137, i32 %.sum5.i8 ; [#uses=1]
- %159 = bitcast i8* %158 to double* ; [#uses=1]
- %160 = load double* %159, align 4 ; [#uses=1]
- %161 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fpext float %162 to double ; [#uses=1]
- %164 = fmul double %160, %163 ; [#uses=1]
- %165 = fptrunc double %164 to float ; [#uses=1]
- %166 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %165, float* %166, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13
-
-bb1.i12: ; preds = %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit20
- %167 = bitcast i8* %140 to float* ; [#uses=1]
- %168 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %169 = load float* %167, align 4 ; [#uses=1]
- %170 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = fmul float %169, %171 ; [#uses=1]
- store float %172, float* %168, align 4
- %.sum.i10 = add i32 %139, 4 ; [#uses=1]
- %173 = getelementptr inbounds i8* %137, i32 %.sum.i10 ; [#uses=1]
- %174 = bitcast i8* %173 to float* ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=1]
- %178 = fmul float %175, %177 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %178, float* %179, align 4
- %.sum3.i11 = add i32 %139, 8 ; [#uses=1]
- %180 = getelementptr inbounds i8* %137, i32 %.sum3.i11 ; [#uses=1]
- %181 = bitcast i8* %180 to float* ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=1]
- %183 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=1]
- %185 = fmul float %182, %184 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %185, float* %186, align 4
- br label %_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13
-
-_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager10get_vertexEiR9btVector3.exit13: ; preds = %bb1.i12, %bb.i9
- %187 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %188 = load i32 (...)*** %187, align 4 ; [#uses=1]
- %189 = getelementptr inbounds i32 (...)** %188, i32 10 ; [#uses=1]
- %190 = load i32 (...)** %189, align 4 ; [#uses=1]
- %191 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 1 ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btTriangleShapeEx* %triangle, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %194 = bitcast i32 (...)* %190 to void (%struct.btConvexInternalShape*, float)* ; [#uses=1]
- tail call void %194(%struct.btConvexInternalShape* %193, float %192)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactMeshShapePart20childrenHasTransformEv(%struct.btGImpactMeshShapePart* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart15lockChildShapesEv(%struct.btGImpactMeshShapePart* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 1 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=13]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 8 ; [#uses=1]
- %3 = bitcast %struct.btActionInterface* %2 to i32* ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=2]
- %5 = icmp sgt i32 %4, 0 ; [#uses=1]
- br i1 %5, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %6 = add nsw i32 %4, 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btActionInterface* %1, i32 8, i32 0 ; [#uses=1]
- %.c = inttoptr i32 %6 to i32 (...)** ; [#uses=1]
- store i32 (...)** %.c, i32 (...)*** %7, align 4
- ret void
-
-bb1.i: ; preds = %entry
- %8 = getelementptr inbounds %struct.btActionInterface* %1, i32 2 ; [#uses=1]
- %9 = bitcast %struct.btActionInterface* %8 to %struct.btStridingMeshInterface** ; [#uses=1]
- %10 = load %struct.btStridingMeshInterface** %9, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btStridingMeshInterface* %10, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 4 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btActionInterface* %1, i32 7 ; [#uses=1]
- %16 = bitcast %struct.btActionInterface* %15 to i32* ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btActionInterface* %1, i32 16 ; [#uses=1]
- %19 = bitcast %struct.btActionInterface* %18 to i32* ; [#uses=1]
- %20 = getelementptr inbounds %struct.btActionInterface* %1, i32 15 ; [#uses=1]
- %21 = bitcast %struct.btActionInterface* %20 to i32* ; [#uses=1]
- %22 = getelementptr inbounds %struct.btActionInterface* %1, i32 14 ; [#uses=1]
- %23 = bitcast %struct.btActionInterface* %22 to i32* ; [#uses=1]
- %24 = getelementptr inbounds %struct.btActionInterface* %1, i32 13 ; [#uses=1]
- %25 = bitcast %struct.btActionInterface* %24 to i8** ; [#uses=1]
- %26 = getelementptr inbounds %struct.btActionInterface* %1, i32 12 ; [#uses=1]
- %27 = bitcast %struct.btActionInterface* %26 to i32* ; [#uses=1]
- %28 = getelementptr inbounds %struct.btActionInterface* %1, i32 11 ; [#uses=1]
- %29 = bitcast %struct.btActionInterface* %28 to i32* ; [#uses=1]
- %30 = getelementptr inbounds %struct.btActionInterface* %1, i32 10 ; [#uses=1]
- %31 = bitcast %struct.btActionInterface* %30 to i32* ; [#uses=1]
- %32 = getelementptr inbounds %struct.btActionInterface* %1, i32 9 ; [#uses=1]
- %33 = bitcast %struct.btActionInterface* %32 to i8** ; [#uses=1]
- %34 = bitcast i32 (...)* %14 to void (%struct.btStridingMeshInterface*, i8**, i32*, i32*, i32*, i8**, i32*, i32*, i32*, i32)* ; [#uses=1]
- tail call void %34(%struct.btStridingMeshInterface* %10, i8** %33, i32* %31, i32* %29, i32* %27, i8** %25, i32* %23, i32* %21, i32* %19, i32 %17)
- %35 = getelementptr inbounds %struct.btActionInterface* %1, i32 8, i32 0 ; [#uses=1]
- store i32 (...)** inttoptr (i32 1 to i32 (...)**), i32 (...)*** %35, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart17unlockChildShapesEv(%struct.btGImpactMeshShapePart* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 1 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 8 ; [#uses=1]
- %3 = bitcast %struct.btActionInterface* %2 to i32* ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=3]
- %5 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %5, label %_ZN22btGImpactMeshShapePart23TrimeshPrimitiveManager6unlockEv.exit, label %bb.i
-
-bb.i: ; preds = %entry
- %6 = icmp sgt i32 %4, 1 ; [#uses=1]
- br i1 %6, label %bb1.i, label %bb2.i
-
-bb1.i: ; preds = %bb.i
- %7 = add nsw i32 %4, -1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btActionInterface* %1, i32 8, i32 0 ; [#uses=1]
- %.c = inttoptr i32 %7 to i32 (...)** ; [#uses=1]
- store i32 (...)** %.c, i32 (...)*** %8, align 4
- ret void
-
-bb2.i: ; preds = %bb.i
- %9 = getelementptr inbounds %struct.btActionInterface* %1, i32 2 ; [#uses=1]
- %10 = bitcast %struct.btActionInterface* %9 to %struct.btStridingMeshInterface** ; [#uses=1]
- %11 = load %struct.btStridingMeshInterface** %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btStridingMeshInterface* %11, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 6 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btActionInterface* %1, i32 7 ; [#uses=1]
- %17 = bitcast %struct.btActionInterface* %16 to i32* ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %15 to void (%struct.btStridingMeshInterface*, i32)* ; [#uses=1]
- tail call void %19(%struct.btStridingMeshInterface* %11, i32 %18)
- %20 = getelementptr inbounds %struct.btActionInterface* %1, i32 9, i32 0 ; [#uses=1]
- store i32 (...)** null, i32 (...)*** %20, align 4
- %21 = getelementptr inbounds %struct.btActionInterface* %1, i32 8, i32 0 ; [#uses=1]
- store i32 (...)** null, i32 (...)*** %21, align 4
- ret void
-
-_ZN22btGImpactMeshShapePart23TrimeshPrimitiveManager6unlockEv.exit: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK22btGImpactMeshShapePart17getNumChildShapesEv(%struct.btGImpactMeshShapePart* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btCollisionShape* @_ZN22btGImpactMeshShapePart13getChildShapeEi(%struct.btGImpactMeshShapePart* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret %struct.btCollisionShape* null
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btCollisionShape* @_ZNK22btGImpactMeshShapePart13getChildShapeEi(%struct.btGImpactMeshShapePart* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret %struct.btCollisionShape* null
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart17getChildTransformEi(%struct.btTransform* noalias nocapture sret %agg.result, %struct.btGImpactMeshShapePart* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactMeshShapePart17setChildTransformEiRK11btTransform(%struct.btGImpactMeshShapePart* nocapture %this, i32 %index, %struct.btTransform* nocapture %transform) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btActionInterface* @_ZNK22btGImpactMeshShapePart19getPrimitiveManagerEv(%struct.btGImpactMeshShapePart* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- ret %struct.btActionInterface* %0
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK22btGImpactMeshShapePart7getNameEv(%struct.btGImpactMeshShapePart* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([21 x i8]* @.str1154, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK22btGImpactMeshShapePart19getGImpactShapeTypeEv(%struct.btGImpactMeshShapePart* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 1
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactMeshShapePart22needsRetrieveTrianglesEv(%struct.btGImpactMeshShapePart* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 1
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactMeshShapePart25needsRetrieveTetrahedronsEv(%struct.btGImpactMeshShapePart* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart17getBulletTriangleEiR17btTriangleShapeEx(%struct.btGImpactMeshShapePart* %this, i32 %prim_index, %struct.btTriangleShapeEx* %triangle) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager19get_bullet_triangleEiR17btTriangleShapeEx(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %0, i32 %prim_index, %struct.btTriangleShapeEx* %triangle) inlinehint
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart20getBulletTetrahedronEiR20btTetrahedronShapeEx(%struct.btGImpactMeshShapePart* nocapture %this, i32 %prim_index, %struct.btTetrahedronShapeEx* nocapture %tetrahedron) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactMeshShapePart9setMarginEf(%struct.btGImpactMeshShapePart* %this, float %margin) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store float %margin, float* %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 17 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0 ; [#uses=1]
- %6 = bitcast i32 (...)* %4 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %6(%struct.btGImpactShapeInterface* %5)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZNK22btGImpactMeshShapePart9getMarginEv(%struct.btGImpactMeshShapePart* nocapture %this) nounwind readonly inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactMeshShapePart15setLocalScalingERK9btVector3(%struct.btGImpactMeshShapePart* %this, %struct.btQuadWord* nocapture %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 17 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0 ; [#uses=1]
- %17 = bitcast i32 (...)* %15 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %17(%struct.btGImpactShapeInterface* %16)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btQuadWord* @_ZNK22btGImpactMeshShapePart15getLocalScalingEv(%struct.btGImpactMeshShapePart* %this) nounwind readnone align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- ret %struct.btQuadWord* %0
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btActionInterface* @_ZNK18btGImpactMeshShape19getPrimitiveManagerEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret %struct.btActionInterface* null
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK18btGImpactMeshShape17getNumChildShapesEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK18btGImpactMeshShape20childrenHasTransformEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK18btGImpactMeshShape22needsRetrieveTrianglesEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK18btGImpactMeshShape25needsRetrieveTetrahedronsEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK18btGImpactMeshShape17getBulletTriangleEiR17btTriangleShapeEx(%struct.btGImpactMeshShape* nocapture %this, i32 %prim_index, %struct.btTriangleShapeEx* nocapture %triangle) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK18btGImpactMeshShape20getBulletTetrahedronEiR20btTetrahedronShapeEx(%struct.btGImpactMeshShape* nocapture %this, i32 %prim_index, %struct.btTetrahedronShapeEx* nocapture %tetrahedron) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK18btGImpactMeshShape15lockChildShapesEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK18btGImpactMeshShape17unlockChildShapesEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK18btGImpactMeshShape12getChildAabbEiRK11btTransformR9btVector3S4_(%struct.btGImpactMeshShape* nocapture %this, i32 %child_index, %struct.btTransform* nocapture %t, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btCollisionShape* @_ZN18btGImpactMeshShape13getChildShapeEi(%struct.btGImpactMeshShape* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret %struct.btCollisionShape* null
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btCollisionShape* @_ZNK18btGImpactMeshShape13getChildShapeEi(%struct.btGImpactMeshShape* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret %struct.btCollisionShape* null
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK18btGImpactMeshShape17getChildTransformEi(%struct.btTransform* noalias nocapture sret %agg.result, %struct.btGImpactMeshShape* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShape17setChildTransformEiRK11btTransform(%struct.btGImpactMeshShape* nocapture %this, i32 %index, %struct.btTransform* nocapture %transform) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK18btGImpactMeshShape19getGImpactShapeTypeEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 2
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK18btGImpactMeshShape7getNameEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i8* getelementptr inbounds ([12 x i8]* @.str2155, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK18btGImpactMeshShape28calculateSerializeBufferSizeEv(%struct.btGImpactMeshShape* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 64
-}
-
-; [#uses=1]
-define void @_ZNK22btGImpactMeshShapePart21calculateLocalInertiaEfR9btVector3(%struct.btGImpactMeshShapePart* %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 27 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- tail call void %4(%struct.btGImpactMeshShapePart* %this)
- %5 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 7 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=4]
- %11 = sitofp i32 %10 to float ; [#uses=1]
- %12 = fdiv float %mass, %11 ; [#uses=3]
- %13 = icmp eq i32 %10, 0 ; [#uses=1]
- br i1 %13, label %bb2, label %bb.nph
-
-bb.nph: ; preds = %entry
- %14 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 8 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 6 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 9 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3, i32 0, i32 0 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3, i32 0, i32 1 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 3, i32 0, i32 2 ; [#uses=2]
- %tmp10 = add i32 %10, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit, %bb.nph
- %20 = phi float [ 0.000000e+00, %bb.nph ], [ %74, %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit ] ; [#uses=1]
- %21 = phi float [ 0.000000e+00, %bb.nph ], [ %73, %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit ] ; [#uses=1]
- %22 = phi float [ 0.000000e+00, %bb.nph ], [ %72, %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit ] ; [#uses=2]
- %tmp11 = sub i32 %tmp10, %indvar ; [#uses=1]
- %23 = load i32* %14, align 4 ; [#uses=1]
- %24 = icmp eq i32 %23, 1 ; [#uses=1]
- %25 = load i8** %15, align 4 ; [#uses=5]
- %26 = load i32* %16, align 4 ; [#uses=1]
- %27 = mul nsw i32 %26, %tmp11 ; [#uses=5]
- %28 = getelementptr inbounds i8* %25, i32 %27 ; [#uses=2]
- br i1 %24, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb
- %29 = bitcast i8* %28 to double* ; [#uses=1]
- %30 = load double* %29, align 4 ; [#uses=1]
- %31 = load float* %17, align 4 ; [#uses=1]
- %32 = fpext float %31 to double ; [#uses=1]
- %33 = fmul double %30, %32 ; [#uses=1]
- %34 = fptrunc double %33 to float ; [#uses=1]
- %.sum4.i.i = add i32 %27, 8 ; [#uses=1]
- %35 = getelementptr inbounds i8* %25, i32 %.sum4.i.i ; [#uses=1]
- %36 = bitcast i8* %35 to double* ; [#uses=1]
- %37 = load double* %36, align 4 ; [#uses=1]
- %38 = load float* %18, align 4 ; [#uses=1]
- %39 = fpext float %38 to double ; [#uses=1]
- %40 = fmul double %37, %39 ; [#uses=1]
- %41 = fptrunc double %40 to float ; [#uses=1]
- %.sum5.i.i = add i32 %27, 16 ; [#uses=1]
- %42 = getelementptr inbounds i8* %25, i32 %.sum5.i.i ; [#uses=1]
- %43 = bitcast i8* %42 to double* ; [#uses=1]
- %44 = load double* %43, align 4 ; [#uses=1]
- %45 = load float* %19, align 4 ; [#uses=1]
- %46 = fpext float %45 to double ; [#uses=1]
- %47 = fmul double %44, %46 ; [#uses=1]
- %48 = fptrunc double %47 to float ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit
-
-bb1.i.i: ; preds = %bb
- %49 = bitcast i8* %28 to float* ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = load float* %17, align 4 ; [#uses=1]
- %52 = fmul float %50, %51 ; [#uses=1]
- %.sum.i.i = add i32 %27, 4 ; [#uses=1]
- %53 = getelementptr inbounds i8* %25, i32 %.sum.i.i ; [#uses=1]
- %54 = bitcast i8* %53 to float* ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = load float* %18, align 4 ; [#uses=1]
- %57 = fmul float %55, %56 ; [#uses=1]
- %.sum3.i.i = add i32 %27, 8 ; [#uses=1]
- %58 = getelementptr inbounds i8* %25, i32 %.sum3.i.i ; [#uses=1]
- %59 = bitcast i8* %58 to float* ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = load float* %19, align 4 ; [#uses=1]
- %62 = fmul float %60, %61 ; [#uses=1]
- br label %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit
-
-_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit: ; preds = %bb1.i.i, %bb.i.i
- %pointintertia.0.2.0 = phi float [ %48, %bb.i.i ], [ %62, %bb1.i.i ] ; [#uses=2]
- %pointintertia.0.1.0 = phi float [ %41, %bb.i.i ], [ %57, %bb1.i.i ] ; [#uses=2]
- %pointintertia.0.0.0 = phi float [ %34, %bb.i.i ], [ %52, %bb1.i.i ] ; [#uses=2]
- %63 = fmul float %pointintertia.0.0.0, %pointintertia.0.0.0 ; [#uses=2]
- %64 = fmul float %pointintertia.0.1.0, %pointintertia.0.1.0 ; [#uses=2]
- %65 = fmul float %pointintertia.0.2.0, %pointintertia.0.2.0 ; [#uses=2]
- %66 = fadd float %63, %64 ; [#uses=1]
- %67 = fmul float %66, %12 ; [#uses=1]
- %68 = fadd float %63, %65 ; [#uses=1]
- %69 = fmul float %68, %12 ; [#uses=1]
- %70 = fadd float %64, %65 ; [#uses=1]
- %71 = fmul float %70, %12 ; [#uses=1]
- %72 = fadd float %22, %71 ; [#uses=2]
- store float %72, float* %5, align 4
- %73 = fadd float %21, %69 ; [#uses=2]
- store float %73, float* %6, align 4
- %74 = fadd float %20, %67 ; [#uses=2]
- store float %74, float* %7, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %10 ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %_ZNK22btGImpactMeshShapePart9getVertexEiR9btVector3.exit, %entry
- %75 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %76 = getelementptr inbounds i32 (...)** %75, i32 28 ; [#uses=1]
- %77 = load i32 (...)** %76, align 4 ; [#uses=1]
- %78 = bitcast i32 (...)* %77 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- tail call void %78(%struct.btGImpactMeshShapePart* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK18btGImpactMeshShape7rayTestERK9btVector3S2_RN16btCollisionWorld17RayResultCallbackE(%struct.btGImpactMeshShape* nocapture %this, %struct.btQuadWord* nocapture %rayFrom, %struct.btQuadWord* nocapture %rayTo, %"struct.btCollisionWorld::RayResultCallback"* nocapture %resultCallback) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK22btGImpactCompoundShape20childrenHasTransformEv(%struct.btGImpactCompoundShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %not. = icmp ne i32 %1, 0 ; [#uses=1]
- %.0 = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK22btGImpactCompoundShape17getNumChildShapesEv(%struct.btGImpactCompoundShape* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionShape* @_ZN22btGImpactCompoundShape13getChildShapeEi(%struct.btGImpactCompoundShape* nocapture %this, i32 %index) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %1 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionShape** %1, i32 %index ; [#uses=1]
- %3 = load %struct.btCollisionShape** %2, align 4 ; [#uses=1]
- ret %struct.btCollisionShape* %3
-}
-
-; [#uses=1]
-define linkonce_odr %struct.btCollisionShape* @_ZNK22btGImpactCompoundShape13getChildShapeEi(%struct.btGImpactCompoundShape* nocapture %this, i32 %index) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %1 = load %struct.btCollisionShape*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btCollisionShape** %1, i32 %index ; [#uses=1]
- %3 = load %struct.btCollisionShape** %2, align 4 ; [#uses=1]
- ret %struct.btCollisionShape* %3
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactCompoundShape17getChildTransformEi(%struct.btTransform* noalias nocapture sret %agg.result, %struct.btGImpactCompoundShape* nocapture %this, i32 %index) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %1 = load %struct.btTransform** %0, align 4 ; [#uses=16]
- %2 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btTransform* %agg.result, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactCompoundShape12getChildAabbEiRK11btTransformR9btVector3S4_(%struct.btGImpactCompoundShape* %this, i32 %child_index, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = alloca %struct.btTransform, align 8 ; [#uses=17]
- %1 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 22 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to i8 (%struct.btGImpactCompoundShape*)* ; [#uses=1]
- %6 = call zeroext i8 %5(%struct.btGImpactCompoundShape* %this) ; [#uses=1]
- %toBool = icmp eq i8 %6, 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %8 = load %struct.btCollisionShape*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btCollisionShape** %8, i32 %child_index ; [#uses=1]
- %10 = load %struct.btCollisionShape** %9, align 4 ; [#uses=3]
- %11 = getelementptr inbounds %struct.btCollisionShape* %10, i32 0, i32 0 ; [#uses=1]
- %12 = load i32 (...)*** %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 2 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=2]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %15 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %16 = load %struct.btTransform** %15, align 4 ; [#uses=12]
- %17 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- %24 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = fmul float %23, %25 ; [#uses=1]
- %27 = fadd float %21, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=4]
- %30 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = fmul float %29, %31 ; [#uses=1]
- %33 = fadd float %27, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fadd float %33, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=4]
- %39 = fmul float %38, %20 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=4]
- %42 = fmul float %41, %25 ; [#uses=1]
- %43 = fadd float %39, %42 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=4]
- %46 = fmul float %45, %31 ; [#uses=1]
- %47 = fadd float %43, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %47, %49 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=4]
- %53 = fmul float %52, %20 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=4]
- %56 = fmul float %55, %25 ; [#uses=1]
- %57 = fadd float %53, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=4]
- %60 = fmul float %59, %31 ; [#uses=1]
- %61 = fadd float %57, %60 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTransform* %t, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = fadd float %61, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=3]
- %67 = fmul float %66, %18 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=3]
- %70 = fmul float %69, %23 ; [#uses=1]
- %71 = fadd float %67, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=3]
- %74 = fmul float %73, %29 ; [#uses=1]
- %75 = fadd float %71, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=3]
- %78 = fmul float %77, %18 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=3]
- %81 = fmul float %80, %23 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=3]
- %85 = fmul float %84, %29 ; [#uses=1]
- %86 = fadd float %82, %85 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=3]
- %89 = fmul float %88, %18 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=3]
- %92 = fmul float %91, %23 ; [#uses=1]
- %93 = fadd float %89, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btTransform* %16, i32 %child_index, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=3]
- %96 = fmul float %95, %29 ; [#uses=1]
- %97 = fadd float %93, %96 ; [#uses=1]
- %98 = fmul float %66, %38 ; [#uses=1]
- %99 = fmul float %69, %41 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %73, %45 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %77, %38 ; [#uses=1]
- %104 = fmul float %80, %41 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %84, %45 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %88, %38 ; [#uses=1]
- %109 = fmul float %91, %41 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %95, %45 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %66, %52 ; [#uses=1]
- %114 = fmul float %69, %55 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %73, %59 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %77, %52 ; [#uses=1]
- %119 = fmul float %80, %55 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %84, %59 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = fmul float %88, %52 ; [#uses=1]
- %124 = fmul float %91, %55 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %95, %59 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %127, float* %128, align 8
- %129 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %122, float* %129, align 4
- %130 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %117, float* %130, align 8
- %131 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %131, align 4
- %132 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %112, float* %132, align 8
- %133 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %107, float* %133, align 4
- %134 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %102, float* %134, align 8
- %135 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %135, align 4
- %136 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %97, float* %136, align 8
- %137 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %86, float* %137, align 4
- %138 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %75, float* %138, align 8
- %139 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %139, align 4
- %140 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %64, float* %140, align 8
- %141 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %50, float* %141, align 4
- %142 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %36, float* %142, align 8
- %143 = getelementptr inbounds %struct.btTransform* %0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %143, align 4
- %144 = bitcast i32 (...)* %14 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %144(%struct.btCollisionShape* %10, %struct.btTransform* %0, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-
-bb1: ; preds = %entry
- %145 = bitcast i32 (...)* %14 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %145(%struct.btCollisionShape* %10, %struct.btTransform* %t, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactCompoundShape17setChildTransformEiRK11btTransform(%struct.btGImpactCompoundShape* %this, i32 %index, %struct.btTransform* nocapture %transform) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %1 = load %struct.btTransform** %0, align 4 ; [#uses=16]
- %2 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btTransform* %1, i32 %index, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %transform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds i32 (...)** %51, i32 17 ; [#uses=1]
- %53 = load i32 (...)** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0 ; [#uses=1]
- %55 = bitcast i32 (...)* %53 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %55(%struct.btGImpactShapeInterface* %54)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK22btGImpactMeshShapePart23TrimeshPrimitiveManager17get_primitive_boxEiR6btAABB(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 %prim_index, %struct.GIM_AABB* nocapture %primbox) align 2 {
-entry:
- %triangle = alloca %struct.btPrimitiveTriangle, align 8 ; [#uses=13]
- %0 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 2 ; [#uses=2]
- store float 0x3F847AE140000000, float* %0, align 8
- %1 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 5 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to void (%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"*, i32, %struct.btPrimitiveTriangle*)* ; [#uses=1]
- call void %5(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 %prim_index, %struct.btPrimitiveTriangle* %triangle)
- %6 = load float* %0, align 8 ; [#uses=6]
- %7 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1 ; [#uses=6]
- %8 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2 ; [#uses=6]
- %9 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=7]
- %11 = load float* %10, align 8 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=7]
- %13 = load float* %12, align 8 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=7]
- %15 = load float* %14, align 8 ; [#uses=2]
- %16 = fcmp ogt float %13, %15 ; [#uses=2]
- %V3.pn.i = select i1 %16, %struct.btQuadWord* %8, %struct.btQuadWord* %7 ; [#uses=1]
- %iftmp.380.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.380.0.i = load float* %iftmp.380.0.in.i, align 8 ; [#uses=1]
- %.not.i = fcmp ule float %11, %iftmp.380.0.i ; [#uses=2]
- %brmerge.i = or i1 %.not.i, %16 ; [#uses=1]
- %.mux.i = select i1 %.not.i, float* %10, float* %14 ; [#uses=1]
- %iftmp.379.0.in.i = select i1 %brmerge.i, float* %.mux.i, float* %12 ; [#uses=1]
- %iftmp.379.0.i = load float* %iftmp.379.0.in.i, align 8 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fcmp ogt float %20, %22 ; [#uses=2]
- %V3.pn61.i = select i1 %23, %struct.btQuadWord* %8, %struct.btQuadWord* %7 ; [#uses=1]
- %iftmp.383.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn61.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.383.0.i = load float* %iftmp.383.0.in.i, align 4 ; [#uses=1]
- %.not66.i = fcmp ule float %18, %iftmp.383.0.i ; [#uses=2]
- %brmerge67.i = or i1 %.not66.i, %23 ; [#uses=1]
- %.mux68.i = select i1 %.not66.i, float* %10, float* %14 ; [#uses=1]
- %.pn60.pn.i = select i1 %brmerge67.i, float* %.mux68.i, float* %12 ; [#uses=1]
- %iftmp.382.0.in.i = getelementptr inbounds float* %.pn60.pn.i, i32 1 ; [#uses=1]
- %iftmp.382.0.i = load float* %iftmp.382.0.in.i, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 8 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 8 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 8 ; [#uses=2]
- %31 = fcmp ogt float %28, %30 ; [#uses=2]
- %V3.pn62.i = select i1 %31, %struct.btQuadWord* %8, %struct.btQuadWord* %7 ; [#uses=1]
- %iftmp.386.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn62.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.386.0.i = load float* %iftmp.386.0.in.i, align 8 ; [#uses=1]
- %.not69.i = fcmp ule float %26, %iftmp.386.0.i ; [#uses=2]
- %brmerge70.i = or i1 %.not69.i, %31 ; [#uses=1]
- %.mux71.i = select i1 %.not69.i, float* %10, float* %14 ; [#uses=1]
- %.pn59.pn.i = select i1 %brmerge70.i, float* %.mux71.i, float* %12 ; [#uses=1]
- %iftmp.385.0.in.i = getelementptr inbounds float* %.pn59.pn.i, i32 2 ; [#uses=1]
- %iftmp.385.0.i = load float* %iftmp.385.0.in.i, align 8 ; [#uses=1]
- %32 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %34 = fcmp olt float %13, %15 ; [#uses=2]
- %V3.pn63.i = select i1 %34, %struct.btQuadWord* %8, %struct.btQuadWord* %7 ; [#uses=1]
- %iftmp.389.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn63.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.389.0.i = load float* %iftmp.389.0.in.i, align 8 ; [#uses=1]
- %.not72.i = fcmp uge float %11, %iftmp.389.0.i ; [#uses=2]
- %brmerge73.i = or i1 %.not72.i, %34 ; [#uses=1]
- %.mux74.i = select i1 %.not72.i, float* %10, float* %14 ; [#uses=1]
- %iftmp.388.0.in.i = select i1 %brmerge73.i, float* %.mux74.i, float* %12 ; [#uses=1]
- %iftmp.388.0.i = load float* %iftmp.388.0.in.i, align 8 ; [#uses=1]
- %35 = fcmp olt float %20, %22 ; [#uses=2]
- %V3.pn64.i = select i1 %35, %struct.btQuadWord* %8, %struct.btQuadWord* %7 ; [#uses=1]
- %iftmp.392.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn64.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.392.0.i = load float* %iftmp.392.0.in.i, align 4 ; [#uses=1]
- %.not75.i = fcmp uge float %18, %iftmp.392.0.i ; [#uses=2]
- %brmerge76.i = or i1 %.not75.i, %35 ; [#uses=1]
- %.mux77.i = select i1 %.not75.i, float* %10, float* %14 ; [#uses=1]
- %.pn58.pn.i = select i1 %brmerge76.i, float* %.mux77.i, float* %12 ; [#uses=1]
- %iftmp.391.0.in.i = getelementptr inbounds float* %.pn58.pn.i, i32 1 ; [#uses=1]
- %iftmp.391.0.i = load float* %iftmp.391.0.in.i, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %37 = fcmp olt float %28, %30 ; [#uses=2]
- %V3.pn65.i = select i1 %37, %struct.btQuadWord* %8, %struct.btQuadWord* %7 ; [#uses=1]
- %iftmp.395.0.in.i = getelementptr inbounds %struct.btQuadWord* %V3.pn65.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.395.0.i = load float* %iftmp.395.0.in.i, align 8 ; [#uses=1]
- %.not78.i = fcmp uge float %26, %iftmp.395.0.i ; [#uses=2]
- %brmerge79.i = or i1 %.not78.i, %37 ; [#uses=1]
- %.mux80.i = select i1 %.not78.i, float* %10, float* %14 ; [#uses=1]
- %.pn57.pn.i = select i1 %brmerge79.i, float* %.mux80.i, float* %12 ; [#uses=1]
- %iftmp.394.0.in.i = getelementptr inbounds float* %.pn57.pn.i, i32 2 ; [#uses=1]
- %iftmp.394.0.i = load float* %iftmp.394.0.in.i, align 8 ; [#uses=1]
- %38 = getelementptr inbounds %struct.GIM_AABB* %primbox, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = fsub float %iftmp.379.0.i, %6 ; [#uses=1]
- store float %39, float* %9, align 4
- %40 = fsub float %iftmp.382.0.i, %6 ; [#uses=1]
- store float %40, float* %24, align 4
- %41 = fsub float %iftmp.385.0.i, %6 ; [#uses=1]
- store float %41, float* %32, align 4
- %42 = fadd float %iftmp.388.0.i, %6 ; [#uses=1]
- store float %42, float* %33, align 4
- %43 = fadd float %iftmp.391.0.i, %6 ; [#uses=1]
- store float %43, float* %36, align 4
- %44 = fadd float %iftmp.394.0.i, %6 ; [#uses=1]
- store float %44, float* %38, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShape10postUpdateEv(%struct.btGImpactMeshShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb2, label %bb.nph
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %tmp3 = add i32 %1, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %tmp4 = sub i32 %tmp3, %indvar ; [#uses=1]
- %4 = load %struct.btGImpactMeshShapePart*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %4, i32 %tmp4 ; [#uses=1]
- %5 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btGImpactMeshShapePart* %5, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 17 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btGImpactMeshShapePart* %5, i32 0, i32 0 ; [#uses=1]
- %11 = bitcast i32 (...)* %9 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %11(%struct.btGImpactShapeInterface* %10)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %1 ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %bb, %entry
- %12 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %12, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShape13calcLocalAABBEv(%struct.btGImpactMeshShape* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=3]
- store float 0x47EFFFFFE0000000, float* %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 0x47EFFFFFE0000000, float* %1, align 4
- %2 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=3]
- store float 0x47EFFFFFE0000000, float* %2, align 4
- %3 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- store float 0xC7EFFFFFE0000000, float* %3, align 4
- %4 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- store float 0xC7EFFFFFE0000000, float* %4, align 4
- %5 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- store float 0xC7EFFFFFE0000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=3]
- %8 = icmp eq i32 %7, 0 ; [#uses=1]
- br i1 %8, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %9 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 1 ; [#uses=6]
- %tmp3 = add i32 %7, -1 ; [#uses=1]
- %.pre = load %struct.btGImpactMeshShapePart*** %9, align 4 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_ZN23btGImpactShapeInterface11updateBoundEv.exit, %bb.nph
- %11 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.245.0.i, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=1]
- %12 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.244.0.i, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=1]
- %13 = phi float [ 0xC7EFFFFFE0000000, %bb.nph ], [ %iftmp.243.0.i, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=1]
- %14 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.242.0.i, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=1]
- %15 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.241.0.i, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=1]
- %16 = phi float [ 0x47EFFFFFE0000000, %bb.nph ], [ %iftmp.240.0.i, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=1]
- %17 = phi %struct.btGImpactMeshShapePart** [ %.pre, %bb.nph ], [ %33, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %_ZN23btGImpactShapeInterface11updateBoundEv.exit ] ; [#uses=2]
- %tmp4 = sub i32 %tmp3, %indvar ; [#uses=2]
- %scevgep5 = getelementptr %struct.btGImpactMeshShapePart** %17, i32 %tmp4 ; [#uses=1]
- %18 = load %struct.btGImpactMeshShapePart** %scevgep5, align 4 ; [#uses=3]
- %19 = getelementptr inbounds %struct.btGImpactMeshShapePart* %18, i32 0, i32 0, i32 2 ; [#uses=2]
- %20 = load i8* %19, align 4 ; [#uses=1]
- %toBoolnot.i = icmp eq i8 %20, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %_ZN23btGImpactShapeInterface11updateBoundEv.exit, label %bb.i
-
-bb.i: ; preds = %bb
- %21 = getelementptr inbounds %struct.btGImpactMeshShapePart* %18, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btGImpactMeshShapePart* %18, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load i32 (...)*** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 16 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %26(%struct.btGImpactShapeInterface* %21)
- store i8 0, i8* %19, align 4
- %.pre6 = load float* %0, align 4 ; [#uses=1]
- %.pre7 = load float* %1, align 4 ; [#uses=1]
- %.pre8 = load float* %2, align 4 ; [#uses=1]
- %.pre9 = load float* %3, align 4 ; [#uses=1]
- %.pre10 = load float* %4, align 4 ; [#uses=1]
- %.pre11 = load float* %5, align 4 ; [#uses=1]
- br label %_ZN23btGImpactShapeInterface11updateBoundEv.exit
-
-_ZN23btGImpactShapeInterface11updateBoundEv.exit: ; preds = %bb.i, %bb
- %27 = phi float [ %11, %bb ], [ %.pre11, %bb.i ] ; [#uses=1]
- %28 = phi float [ %12, %bb ], [ %.pre10, %bb.i ] ; [#uses=1]
- %29 = phi float [ %13, %bb ], [ %.pre9, %bb.i ] ; [#uses=1]
- %30 = phi float [ %14, %bb ], [ %.pre8, %bb.i ] ; [#uses=1]
- %31 = phi float [ %15, %bb ], [ %.pre7, %bb.i ] ; [#uses=1]
- %32 = phi float [ %16, %bb ], [ %.pre6, %bb.i ] ; [#uses=1]
- %33 = load %struct.btGImpactMeshShapePart*** %9, align 4 ; [#uses=2]
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %33, i32 %tmp4 ; [#uses=1]
- %34 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=7]
- %35 = getelementptr inbounds %struct.btGImpactMeshShapePart* %34, i32 0, i32 0, i32 1 ; [#uses=6]
- %36 = getelementptr inbounds %struct.btGImpactMeshShapePart* %34, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fcmp ogt float %32, %37 ; [#uses=1]
- %box.pn25.i = select i1 %38, %struct.GIM_AABB* %35, %struct.GIM_AABB* %10 ; [#uses=1]
- %iftmp.240.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.240.0.i = load float* %iftmp.240.0.in.i, align 4 ; [#uses=2]
- store float %iftmp.240.0.i, float* %0, align 4
- %39 = getelementptr inbounds %struct.btGImpactMeshShapePart* %34, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fcmp ogt float %31, %40 ; [#uses=1]
- %box.pn24.i = select i1 %41, %struct.GIM_AABB* %35, %struct.GIM_AABB* %10 ; [#uses=1]
- %iftmp.241.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.241.0.i = load float* %iftmp.241.0.in.i, align 4 ; [#uses=2]
- store float %iftmp.241.0.i, float* %1, align 4
- %42 = getelementptr inbounds %struct.btGImpactMeshShapePart* %34, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fcmp ogt float %30, %43 ; [#uses=1]
- %box.pn23.i = select i1 %44, %struct.GIM_AABB* %35, %struct.GIM_AABB* %10 ; [#uses=1]
- %iftmp.242.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.242.0.i = load float* %iftmp.242.0.in.i, align 4 ; [#uses=2]
- store float %iftmp.242.0.i, float* %2, align 4
- %45 = getelementptr inbounds %struct.btGImpactMeshShapePart* %34, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fcmp olt float %29, %46 ; [#uses=1]
- %box.pn22.i = select i1 %47, %struct.GIM_AABB* %35, %struct.GIM_AABB* %10 ; [#uses=1]
- %iftmp.243.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.243.0.i = load float* %iftmp.243.0.in.i, align 4 ; [#uses=2]
- store float %iftmp.243.0.i, float* %3, align 4
- %48 = getelementptr inbounds %struct.btGImpactMeshShapePart* %34, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fcmp olt float %28, %49 ; [#uses=1]
- %box.pn21.i = select i1 %50, %struct.GIM_AABB* %35, %struct.GIM_AABB* %10 ; [#uses=1]
- %iftmp.244.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.244.0.i = load float* %iftmp.244.0.in.i, align 4 ; [#uses=2]
- store float %iftmp.244.0.i, float* %4, align 4
- %51 = getelementptr inbounds %struct.btGImpactMeshShapePart* %34, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fcmp olt float %27, %52 ; [#uses=1]
- %box.pn.i = select i1 %53, %struct.GIM_AABB* %35, %struct.GIM_AABB* %10 ; [#uses=1]
- %iftmp.245.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.245.0.i = load float* %iftmp.245.0.in.i, align 4 ; [#uses=2]
- store float %iftmp.245.0.i, float* %5, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %7 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %_ZN23btGImpactShapeInterface11updateBoundEv.exit, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShape9setMarginEf(%struct.btGImpactMeshShape* nocapture %this, float %margin) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %margin, float* %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=3]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb2, label %bb.nph
-
-bb.nph: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %tmp3 = add i32 %2, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %tmp4 = sub i32 %tmp3, %indvar ; [#uses=1]
- %5 = load %struct.btGImpactMeshShapePart*** %4, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %5, i32 %tmp4 ; [#uses=1]
- %6 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btGImpactMeshShapePart* %6, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 10 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to void (%struct.btGImpactMeshShapePart*, float)* ; [#uses=1]
- tail call void %11(%struct.btGImpactMeshShapePart* %6, float %margin)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %2 ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %bb, %entry
- %12 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %12, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShape15setLocalScalingERK9btVector3(%struct.btGImpactMeshShape* nocapture %this, %struct.btQuadWord* %scaling) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=3]
- %14 = icmp eq i32 %13, 0 ; [#uses=1]
- br i1 %14, label %bb2, label %bb.nph
-
-bb.nph: ; preds = %entry
- %15 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %tmp3 = add i32 %13, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %tmp4 = sub i32 %tmp3, %indvar ; [#uses=1]
- %16 = load %struct.btGImpactMeshShapePart*** %15, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %16, i32 %tmp4 ; [#uses=1]
- %17 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btGImpactMeshShapePart* %17, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 6 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %21 to void (%struct.btGImpactMeshShapePart*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %22(%struct.btGImpactMeshShapePart* %17, %struct.btQuadWord* %scaling)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %13 ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %bb, %entry
- %23 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %23, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK18btGImpactMeshShape19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btGImpactMeshShape* nocapture %this, %struct.btActionInterface* %callback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %tmp3 = add i32 %1, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %tmp4 = sub i32 %tmp3, %indvar ; [#uses=1]
- %4 = load %struct.btGImpactMeshShapePart*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %4, i32 %tmp4 ; [#uses=1]
- %5 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btGImpactMeshShapePart* %5, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 15 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btGImpactMeshShapePart*, %struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %10(%struct.btGImpactMeshShapePart* %5, %struct.btActionInterface* %callback, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %1 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK18btGImpactMeshShape21calculateLocalInertiaEfR9btVector3(%struct.btGImpactMeshShape* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) align 2 {
-entry:
- %partinertia = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=4]
- %6 = sitofp i32 %5 to float ; [#uses=1]
- %7 = fdiv float %mass, %6 ; [#uses=1]
- %8 = icmp eq i32 %5, 0 ; [#uses=1]
- br i1 %8, label %return, label %bb.nph
-
-bb.nph: ; preds = %entry
- %9 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %partinertia, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %partinertia, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %partinertia, i32 0, i32 0, i32 2 ; [#uses=1]
- %tmp3 = add i32 %5, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %tmp4 = sub i32 %tmp3, %indvar ; [#uses=1]
- %13 = load %struct.btGImpactMeshShapePart*** %9, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %13, i32 %tmp4 ; [#uses=1]
- %14 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btGImpactMeshShapePart* %14, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 8 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to void (%struct.btGImpactMeshShapePart*, float, %struct.btQuadWord*)* ; [#uses=1]
- call void %19(%struct.btGImpactMeshShapePart* %14, float %7, %struct.btQuadWord* %partinertia)
- %20 = load float* %0, align 4 ; [#uses=1]
- %21 = load float* %10, align 8 ; [#uses=1]
- %22 = fadd float %20, %21 ; [#uses=1]
- store float %22, float* %0, align 4
- %23 = load float* %1, align 4 ; [#uses=1]
- %24 = load float* %11, align 4 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- store float %25, float* %1, align 4
- %26 = load float* %2, align 4 ; [#uses=1]
- %27 = load float* %12, align 8 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=1]
- store float %28, float* %2, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %5 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZNK18btGImpactMeshShape9serializeEPvP12btSerializer(%struct.btGImpactMeshShape* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK16btCollisionShape9serializeEPvP12btSerializer(%struct.btCollisionShape* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btStridingMeshInterface** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btStridingMeshInterface* %3, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 14 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %9 = bitcast i32 (...)* %7 to i8* (%struct.btStridingMeshInterface*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %10 = tail call i8* %9(%struct.btStridingMeshInterface* %3, i8* %8, %struct.btActionInterface* %serializer) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i8* %dataBuffer, i32 56 ; [#uses=1]
- %14 = bitcast i8* %13 to float* ; [#uses=1]
- store float %12, float* %14, align 4
- %15 = getelementptr inbounds i8* %dataBuffer, i32 40 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %15 to float* ; [#uses=1]
- %16 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %16, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 44 ; [#uses=1]
- %17 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %18 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %18, float* %17, align 4
- %scevgep.2.i = getelementptr %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 48 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %20 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %20, float* %19, align 4
- %scevgep.3.i = getelementptr %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 52 ; [#uses=1]
- %21 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %22 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %22, float* %21, align 4
- %23 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load i32 (...)*** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds i32 (...)** %24, i32 19 ; [#uses=1]
- %26 = load i32 (...)** %25, align 4 ; [#uses=1]
- %27 = bitcast i32 (...)* %26 to i32 (%struct.btGImpactMeshShape*)* ; [#uses=1]
- %28 = tail call i32 %27(%struct.btGImpactMeshShape* %this) ; [#uses=1]
- %29 = getelementptr inbounds i8* %dataBuffer, i32 60 ; [#uses=1]
- %30 = bitcast i8* %29 to i32* ; [#uses=1]
- store i32 %28, i32* %30, align 4
- ret i8* getelementptr inbounds ([23 x i8]* @.str3156, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactCompoundShape24CompoundPrimitiveManagerD1Ev(%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactCompoundShape24CompoundPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactCompoundShape24CompoundPrimitiveManagerD0Ev(%"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactCompoundShape24CompoundPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btGImpactCompoundShape::CompoundPrimitiveManager"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactMeshShapePart23TrimeshPrimitiveManagerD1Ev(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactMeshShapePart23TrimeshPrimitiveManagerD0Ev(%"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btGImpactMeshShapePart::TrimeshPrimitiveManager"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGImpactShapeInterfaceD1Ev(%struct.btGImpactShapeInterface* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %2 = load %struct.BT_QUANTIZED_BVH_NODE** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i
- %6 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i.i.i.i unwind label %lpad
-
-bb2.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i, %bb.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %1, align 4
- %8 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGImpactShapeInterfaceD0Ev(%struct.btGImpactShapeInterface* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %2 = load %struct.BT_QUANTIZED_BVH_NODE** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i
- %6 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i.i.i.i unwind label %lpad
-
-bb2.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i, %bb.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %1, align 4
- %8 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %10)
- %11 = bitcast %struct.btGImpactShapeInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %11) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGImpactShapeInterface13calcLocalAABBEv(%struct.btGImpactShapeInterface* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 27 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %4(%struct.btGImpactShapeInterface* %this)
- %5 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4 ; [#uses=2]
- br i1 %7, label %bb, label %bb1
-
-bb: ; preds = %entry
- tail call void @_ZN21btGImpactQuantizedBvh8buildSetEv(%struct.btGImpactBoxSet* %8)
- br label %bb2
-
-bb1: ; preds = %entry
- tail call void @_ZN21btGImpactQuantizedBvh5refitEv(%struct.btGImpactBoxSet* %8)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %9 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 28 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = bitcast i32 (...)* %11 to void (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- tail call void %12(%struct.btGImpactShapeInterface* %this)
- %13 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %14 = load %struct.BT_QUANTIZED_BVH_NODE** %13, align 4 ; [#uses=6]
- %15 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %14, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %14, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load i16* %16, align 2 ; [#uses=1]
- %18 = uitofp i16 %17 to float ; [#uses=1]
- %19 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fdiv float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %14, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load i16* %22, align 2 ; [#uses=1]
- %24 = uitofp i16 %23 to float ; [#uses=1]
- %25 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=2]
- %27 = fdiv float %24, %26 ; [#uses=1]
- %28 = load i16* %15, align 2 ; [#uses=1]
- %29 = uitofp i16 %28 to float ; [#uses=1]
- %30 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fdiv float %29, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fadd float %32, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = fadd float %27, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 4, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = fadd float %21, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %14, i32 0, i32 1, i32 0 ; [#uses=1]
- %43 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %14, i32 0, i32 1, i32 2 ; [#uses=1]
- %44 = load i16* %43, align 2 ; [#uses=1]
- %45 = uitofp i16 %44 to float ; [#uses=1]
- %46 = fdiv float %45, %20 ; [#uses=1]
- %47 = getelementptr inbounds %struct.BT_QUANTIZED_BVH_NODE* %14, i32 0, i32 1, i32 1 ; [#uses=1]
- %48 = load i16* %47, align 2 ; [#uses=1]
- %49 = uitofp i16 %48 to float ; [#uses=1]
- %50 = fdiv float %49, %26 ; [#uses=1]
- %51 = load i16* %42, align 2 ; [#uses=1]
- %52 = uitofp i16 %51 to float ; [#uses=1]
- %53 = fdiv float %52, %31 ; [#uses=1]
- %54 = fadd float %53, %34 ; [#uses=1]
- %55 = fadd float %50, %37 ; [#uses=1]
- %56 = fadd float %46, %40 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %35, float* %57, align 4
- %58 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %58, align 4
- %59 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %41, float* %59, align 4
- %60 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- %61 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %54, float* %61, align 4
- %62 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %55, float* %62, align 4
- %63 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %56, float* %63, align 4
- %64 = getelementptr inbounds %struct.btGImpactShapeInterface* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %64, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactCompoundShapeD0Ev(%struct.btGImpactCompoundShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV22btGImpactCompoundShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionShape*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionShape** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionShape** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad23
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %1, align 4
- %8 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %11 = load %struct.btTransform** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btTransform* %11, null ; [#uses=1]
- br i1 %12, label %bb8, label %bb.i.i.i41
-
-bb.i.i.i41: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i40 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i40, label %bb2.i.i.i43, label %bb1.i.i.i42
-
-bb1.i.i.i42: ; preds = %bb.i.i.i41
- %15 = bitcast %struct.btTransform* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i43 unwind label %lpad
-
-bb2.i.i.i43: ; preds = %bb1.i.i.i42, %bb.i.i.i41
- store %struct.btTransform* null, %struct.btTransform** %10, align 4
- br label %bb8
-
-bb8: ; preds = %bb2.i.i.i43, %bb3
- %16 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btTransform* null, %struct.btTransform** %10, align 4
- %17 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactCompoundShape24CompoundPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %19, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %20 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %21 = load %struct.BT_QUANTIZED_BVH_NODE** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %21, null ; [#uses=1]
- br i1 %22, label %_ZN23btGImpactShapeInterfaceD2Ev.exit59, label %bb.i.i.i.i.i.i.i48
-
-bb.i.i.i.i.i.i.i48: ; preds = %bb8
- %23 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i47 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i47, label %bb2.i.i.i.i.i.i.i50, label %bb1.i.i.i.i.i.i.i49
-
-bb1.i.i.i.i.i.i.i49: ; preds = %bb.i.i.i.i.i.i.i48
- %25 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i.i.i.i.i50 unwind label %lpad.i55
-
-bb2.i.i.i.i.i.i.i50: ; preds = %bb1.i.i.i.i.i.i.i49, %bb.i.i.i.i.i.i.i48
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %20, align 4
- br label %_ZN23btGImpactShapeInterfaceD2Ev.exit59
-
-invcont1.i51: ; preds = %lpad.i55
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i53)
- unreachable
-
-lpad.i55: ; preds = %bb1.i.i.i.i.i.i.i49
- %eh_ptr.i53 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i54 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %26 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %26)
- to label %invcont1.i51 unwind label %lpad9.i58
-
-lpad9.i58: ; preds = %lpad.i55
- %eh_ptr10.i56 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i57 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i56, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN23btGImpactShapeInterfaceD2Ev.exit59: ; preds = %bb2.i.i.i.i.i.i.i50, %bb8
- %27 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %20, align 4
- %28 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %30)
- %31 = bitcast %struct.btGImpactCompoundShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %31) nounwind
- ret void
-
-invcont16: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-lpad: ; preds = %bb1.i.i.i42
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad35
-
-lpad23: ; preds = %bb1.i.i.i
- %eh_ptr24 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select26 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %32 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %33 = load %struct.btTransform** %32, align 4 ; [#uses=2]
- %34 = icmp eq %struct.btTransform* %33, null ; [#uses=1]
- br i1 %34, label %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65, label %bb.i.i.i61
-
-bb.i.i.i61: ; preds = %lpad23
- %35 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %36 = load i8* %35, align 4 ; [#uses=1]
- %toBool.i.i.i60 = icmp eq i8 %36, 0 ; [#uses=1]
- br i1 %toBool.i.i.i60, label %bb2.i.i.i63, label %bb1.i.i.i62
-
-bb1.i.i.i62: ; preds = %bb.i.i.i61
- %37 = bitcast %struct.btTransform* %33 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %37)
- to label %bb2.i.i.i63 unwind label %lpad27
-
-bb2.i.i.i63: ; preds = %bb1.i.i.i62, %bb.i.i.i61
- store %struct.btTransform* null, %struct.btTransform** %32, align 4
- br label %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65
-
-_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65: ; preds = %bb2.i.i.i63, %lpad23
- %38 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %38, align 4
- store %struct.btTransform* null, %struct.btTransform** %32, align 4
- %39 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %40, align 4
- br label %ppad35
-
-lpad27: ; preds = %bb1.i.i.i62
- %eh_ptr28 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select30 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad31: ; preds = %bb3.i, %invcont1.i
- %eh_ptr32 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select34 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad35: ; preds = %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr24, %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65 ] ; [#uses=1]
- %41 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactCompoundShape24CompoundPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %41, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %42 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %43 = load %struct.BT_QUANTIZED_BVH_NODE** %42, align 4 ; [#uses=2]
- %44 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %43, null ; [#uses=1]
- br i1 %44, label %bb3.i, label %bb.i.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i.i: ; preds = %ppad35
- %45 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %46 = load i8* %45, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i = icmp eq i8 %46, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i.i
- %47 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %43 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %47)
- to label %bb2.i.i.i.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i.i, %bb.i.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %42, align 4
- br label %bb3.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc45 unwind label %lpad31
-
-.noexc45: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i.i.i.i, %ppad35
- %48 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %48, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %42, align 4
- %49 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %49, align 4
- %50 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %50, align 4
- %51 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %51)
- to label %invcont16 unwind label %lpad31
-
-lpad.i: ; preds = %bb1.i.i.i.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %52 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %52)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactCompoundShapeD1Ev(%struct.btGImpactCompoundShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV22btGImpactCompoundShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %2 = load %struct.btCollisionShape*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btCollisionShape** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btCollisionShape** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad23
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btCollisionShape** null, %struct.btCollisionShape*** %1, align 4
- %8 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %11 = load %struct.btTransform** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btTransform* %11, null ; [#uses=1]
- br i1 %12, label %bb8, label %bb.i.i.i41
-
-bb.i.i.i41: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i40 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i40, label %bb2.i.i.i43, label %bb1.i.i.i42
-
-bb1.i.i.i42: ; preds = %bb.i.i.i41
- %15 = bitcast %struct.btTransform* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i43 unwind label %lpad
-
-bb2.i.i.i43: ; preds = %bb1.i.i.i42, %bb.i.i.i41
- store %struct.btTransform* null, %struct.btTransform** %10, align 4
- br label %bb8
-
-bb8: ; preds = %bb2.i.i.i43, %bb3
- %16 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btTransform* null, %struct.btTransform** %10, align 4
- %17 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactCompoundShape24CompoundPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %19, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %20 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %21 = load %struct.BT_QUANTIZED_BVH_NODE** %20, align 4 ; [#uses=2]
- %22 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %21, null ; [#uses=1]
- br i1 %22, label %_ZN23btGImpactShapeInterfaceD2Ev.exit59, label %bb.i.i.i.i.i.i.i48
-
-bb.i.i.i.i.i.i.i48: ; preds = %bb8
- %23 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %24 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i47 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i47, label %bb2.i.i.i.i.i.i.i50, label %bb1.i.i.i.i.i.i.i49
-
-bb1.i.i.i.i.i.i.i49: ; preds = %bb.i.i.i.i.i.i.i48
- %25 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %25)
- to label %bb2.i.i.i.i.i.i.i50 unwind label %lpad.i55
-
-bb2.i.i.i.i.i.i.i50: ; preds = %bb1.i.i.i.i.i.i.i49, %bb.i.i.i.i.i.i.i48
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %20, align 4
- br label %_ZN23btGImpactShapeInterfaceD2Ev.exit59
-
-invcont1.i51: ; preds = %lpad.i55
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i53)
- unreachable
-
-lpad.i55: ; preds = %bb1.i.i.i.i.i.i.i49
- %eh_ptr.i53 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i54 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %26 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %26)
- to label %invcont1.i51 unwind label %lpad9.i58
-
-lpad9.i58: ; preds = %lpad.i55
- %eh_ptr10.i56 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i57 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i56, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN23btGImpactShapeInterfaceD2Ev.exit59: ; preds = %bb2.i.i.i.i.i.i.i50, %bb8
- %27 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %20, align 4
- %28 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %30)
- ret void
-
-invcont16: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-lpad: ; preds = %bb1.i.i.i42
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select22 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad35
-
-lpad23: ; preds = %bb1.i.i.i
- %eh_ptr24 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select26 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %32 = load %struct.btTransform** %31, align 4 ; [#uses=2]
- %33 = icmp eq %struct.btTransform* %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65, label %bb.i.i.i61
-
-bb.i.i.i61: ; preds = %lpad23
- %34 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i60 = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i60, label %bb2.i.i.i63, label %bb1.i.i.i62
-
-bb1.i.i.i62: ; preds = %bb.i.i.i61
- %36 = bitcast %struct.btTransform* %32 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %36)
- to label %bb2.i.i.i63 unwind label %lpad27
-
-bb2.i.i.i63: ; preds = %bb1.i.i.i62, %bb.i.i.i61
- store %struct.btTransform* null, %struct.btTransform** %31, align 4
- br label %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65
-
-_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65: ; preds = %bb2.i.i.i63, %lpad23
- %37 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btTransform* null, %struct.btTransform** %31, align 4
- %38 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- br label %ppad35
-
-lpad27: ; preds = %bb1.i.i.i62
- %eh_ptr28 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select30 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad31: ; preds = %bb3.i, %invcont1.i
- %eh_ptr32 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select34 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad35: ; preds = %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr24, %_ZN20btAlignedObjectArrayI11btTransformED1Ev.exit65 ] ; [#uses=1]
- %40 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactCompoundShape24CompoundPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %40, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %41 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %42 = load %struct.BT_QUANTIZED_BVH_NODE** %41, align 4 ; [#uses=2]
- %43 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %42, null ; [#uses=1]
- br i1 %43, label %bb3.i, label %bb.i.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i.i: ; preds = %ppad35
- %44 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %45 = load i8* %44, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i.i
- %46 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %42 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %46)
- to label %bb2.i.i.i.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i.i, %bb.i.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %41, align 4
- br label %bb3.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc45 unwind label %lpad31
-
-.noexc45: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i.i.i.i, %ppad35
- %47 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %47, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %41, align 4
- %48 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %48, align 4
- %49 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %49, align 4
- %50 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %50)
- to label %invcont16 unwind label %lpad31
-
-lpad.i: ; preds = %bb1.i.i.i.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %51 = getelementptr inbounds %struct.btGImpactCompoundShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %51)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactMeshShapePartD0Ev(%struct.btGImpactMeshShapePart* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %2 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.BT_QUANTIZED_BVH_NODE** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %3, null ; [#uses=1]
- br i1 %4, label %_ZN23btGImpactShapeInterfaceD2Ev.exit, label %bb.i.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i = icmp eq i8 %6, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i.i
- %7 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %3 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %7)
- to label %bb2.i.i.i.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i.i, %bb.i.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %2, align 4
- br label %_ZN23btGImpactShapeInterfaceD2Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %8 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %8)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN23btGImpactShapeInterfaceD2Ev.exit: ; preds = %bb2.i.i.i.i.i.i.i, %entry
- %9 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %2, align 4
- %10 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %12)
- %13 = bitcast %struct.btGImpactMeshShapePart* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %13) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btGImpactMeshShapePartD1Ev(%struct.btGImpactMeshShapePart* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTVN22btGImpactMeshShapePart23TrimeshPrimitiveManagerE, i32 0, i32 2), i32 (...)*** %1, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %2 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.BT_QUANTIZED_BVH_NODE** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %3, null ; [#uses=1]
- br i1 %4, label %_ZN23btGImpactShapeInterfaceD2Ev.exit, label %bb.i.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %6 = load i8* %5, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i = icmp eq i8 %6, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i.i
- %7 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %3 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %7)
- to label %bb2.i.i.i.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i.i, %bb.i.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %2, align 4
- br label %_ZN23btGImpactShapeInterfaceD2Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %8 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %8)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN23btGImpactShapeInterfaceD2Ev.exit: ; preds = %bb2.i.i.i.i.i.i.i, %entry
- %9 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %2, align 4
- %10 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %12)
- ret void
-}
-
-; [#uses=1]
-define void @_ZNK22btGImpactMeshShapePart19processAllTrianglesEP18btTriangleCallbackRK9btVector3S4_(%struct.btGImpactMeshShapePart* %this, %struct.btActionInterface* %callback, %struct.btQuadWord* nocapture %aabbMin, %struct.btQuadWord* nocapture %aabbMax) align 2 {
-entry:
- %box = alloca %struct.GIM_AABB, align 8 ; [#uses=9]
- %collided = alloca %"struct.btAlignedObjectArray<int>", align 8 ; [#uses=5]
- %triangle = alloca %struct.btPrimitiveTriangle, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 27 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- call void %4(%struct.btGImpactMeshShapePart* %this)
- %5 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 8
- %8 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 8
- %14 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %aabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 8
- %20 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 8
- %26 = getelementptr inbounds %struct.GIM_AABB* %box, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %aabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided, i32 0, i32 4 ; [#uses=4]
- store i8 1, i8* %29, align 8
- %30 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided, i32 0, i32 3 ; [#uses=8]
- store i32* null, i32** %30, align 4
- %31 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided, i32 0, i32 1 ; [#uses=3]
- store i32 0, i32* %31, align 4
- %32 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %collided, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %32, align 8
- %33 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %34 = invoke zeroext i8 @_ZNK21btGImpactQuantizedBvh8boxQueryERK6btAABBR20btAlignedObjectArrayIiE(%struct.btGImpactBoxSet* %33, %struct.GIM_AABB* %box, %"struct.btAlignedObjectArray<int>"* %collided)
- to label %invcont unwind label %lpad ; [#uses=0]
-
-invcont: ; preds = %entry
- %35 = load i32* %31, align 4 ; [#uses=2]
- %36 = icmp eq i32 %35, 0 ; [#uses=1]
- br i1 %36, label %bb, label %bb2
-
-bb: ; preds = %invcont
- %37 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 28 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %40(%struct.btGImpactMeshShapePart* %this)
- to label %bb13 unwind label %lpad
-
-bb2: ; preds = %invcont
- %41 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 2 ; [#uses=1]
- store float 0x3F847AE140000000, float* %43, align 8
- %44 = getelementptr inbounds %struct.btGImpactMeshShapePart* %this, i32 0, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btActionInterface* %callback, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btPrimitiveTriangle* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %tmp29 = add i32 %35, -1 ; [#uses=1]
- br label %bb6
-
-bb3: ; preds = %bb6
- %47 = load i32** %30, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %47, i32 %tmp30 ; [#uses=1]
- %48 = load i32* %scevgep, align 4 ; [#uses=1]
- %49 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %50 = getelementptr inbounds i32 (...)** %49, i32 20 ; [#uses=1]
- %51 = load i32 (...)** %50, align 4 ; [#uses=1]
- %52 = bitcast i32 (...)* %51 to %struct.btActionInterface* (%struct.btGImpactShapeInterface*)* ; [#uses=1]
- %53 = invoke %struct.btActionInterface* %52(%struct.btGImpactShapeInterface* %44)
- to label %.noexc27 unwind label %lpad ; [#uses=2]
-
-.noexc27: ; preds = %bb3
- %54 = getelementptr inbounds %struct.btActionInterface* %53, i32 0, i32 0 ; [#uses=1]
- %55 = load i32 (...)*** %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds i32 (...)** %55, i32 5 ; [#uses=1]
- %57 = load i32 (...)** %56, align 4 ; [#uses=1]
- %58 = bitcast i32 (...)* %57 to void (%struct.btActionInterface*, i32, %struct.btPrimitiveTriangle*)* ; [#uses=1]
- invoke void %58(%struct.btActionInterface* %53, i32 %48, %struct.btPrimitiveTriangle* %triangle)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %.noexc27
- %59 = load i32 (...)*** %45, align 4 ; [#uses=1]
- %60 = getelementptr inbounds i32 (...)** %59, i32 2 ; [#uses=1]
- %61 = load i32 (...)** %60, align 4 ; [#uses=1]
- %62 = load i32** %30, align 4 ; [#uses=1]
- %scevgep31 = getelementptr i32* %62, i32 %tmp30 ; [#uses=1]
- %63 = load i32* %scevgep31, align 4 ; [#uses=1]
- %64 = bitcast i32 (...)* %61 to void (%struct.btActionInterface*, %struct.btQuadWord*, i32, i32)* ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- invoke void %64(%struct.btActionInterface* %callback, %struct.btQuadWord* %46, i32 %42, i32 %63)
- to label %bb6 unwind label %lpad
-
-bb6: ; preds = %invcont4, %bb2
- %indvar = phi i32 [ %indvar.next, %invcont4 ], [ 0, %bb2 ] ; [#uses=2]
- %tmp30 = sub i32 %tmp29, %indvar ; [#uses=3]
- %65 = icmp eq i32 %tmp30, -1 ; [#uses=1]
- br i1 %65, label %bb8, label %bb3
-
-bb8: ; preds = %bb6
- %66 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %67 = getelementptr inbounds i32 (...)** %66, i32 28 ; [#uses=1]
- %68 = load i32 (...)** %67, align 4 ; [#uses=1]
- %69 = bitcast i32 (...)* %68 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %69(%struct.btGImpactMeshShapePart* %this)
- to label %bb13 unwind label %lpad
-
-invcont11: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %29, align 8
- store i32* null, i32** %30, align 4
- store i32 0, i32* %31, align 4
- store i32 0, i32* %32, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb13: ; preds = %bb8, %bb
- %70 = load i32** %30, align 4 ; [#uses=2]
- %71 = icmp eq i32* %70, null ; [#uses=1]
- br i1 %71, label %_ZN20btAlignedObjectArrayIiED1Ev.exit26, label %bb.i.i.i23
-
-bb.i.i.i23: ; preds = %bb13
- %72 = load i8* %29, align 8 ; [#uses=1]
- %toBool.i.i.i22 = icmp eq i8 %72, 0 ; [#uses=1]
- br i1 %toBool.i.i.i22, label %bb2.i.i.i25, label %bb1.i.i.i24
-
-bb1.i.i.i24: ; preds = %bb.i.i.i23
- %73 = bitcast i32* %70 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %73)
- br label %bb2.i.i.i25
-
-bb2.i.i.i25: ; preds = %bb1.i.i.i24, %bb.i.i.i23
- store i32* null, i32** %30, align 4
- ret void
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit26: ; preds = %bb13
- ret void
-
-lpad: ; preds = %bb8, %invcont4, %.noexc27, %bb3, %bb, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %74 = load i32** %30, align 4 ; [#uses=2]
- %75 = icmp eq i32* %74, null ; [#uses=1]
- br i1 %75, label %invcont11, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %76 = load i8* %29, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %76, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %77 = bitcast i32* %74 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %77)
- to label %bb2.i.i.i unwind label %lpad16
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %30, align 4
- br label %invcont11
-
-lpad16: ; preds = %bb1.i.i.i
- %eh_ptr17 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShapeD0Ev(%struct.btGImpactMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV18btGImpactMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=6]
- %tmp66 = add i32 %2, -1 ; [#uses=1]
- br label %bb2
-
-bb: ; preds = %bb2
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %12, i32 %tmp67 ; [#uses=1]
- %4 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=3]
- %5 = icmp eq %struct.btGImpactMeshShapePart* %4, null ; [#uses=1]
- br i1 %5, label %bb2.backedge, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btGImpactMeshShapePart* %4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 1 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %10(%struct.btGImpactMeshShapePart* %4)
- to label %bb2.backedge unwind label %lpad24
-
-bb2.backedge: ; preds = %bb1, %bb
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2.backedge, %entry
- %indvar = phi i32 [ %indvar.next, %bb2.backedge ], [ 0, %entry ] ; [#uses=2]
- %tmp67 = sub i32 %tmp66, %indvar ; [#uses=2]
- %11 = icmp eq i32 %tmp67, -1 ; [#uses=1]
- %12 = load %struct.btGImpactMeshShapePart*** %3, align 4 ; [#uses=3]
- br i1 %11, label %bb3, label %bb
-
-bb3: ; preds = %bb2
- %13 = icmp eq %struct.btGImpactMeshShapePart** %12, null ; [#uses=1]
- br i1 %13, label %bb15, label %bb.i.i
-
-bb.i.i: ; preds = %bb3
- %14 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %15 = load i8* %14, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %16 = bitcast %struct.btGImpactMeshShapePart** %12 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %16)
- to label %bb2.i.i unwind label %lpad24
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- br label %bb15
-
-invcont13: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr25)
- unreachable
-
-bb15: ; preds = %bb2.i.i, %bb3
- %17 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i8 1, i8* %17, align 4
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- store i32 0, i32* %1, align 4
- store i32 0, i32* %18, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %19 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %20 = load %struct.BT_QUANTIZED_BVH_NODE** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %20, null ; [#uses=1]
- br i1 %21, label %_ZN23btGImpactShapeInterfaceD2Ev.exit55, label %bb.i.i.i.i.i.i.i44
-
-bb.i.i.i.i.i.i.i44: ; preds = %bb15
- %22 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i43 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i43, label %bb2.i.i.i.i.i.i.i46, label %bb1.i.i.i.i.i.i.i45
-
-bb1.i.i.i.i.i.i.i45: ; preds = %bb.i.i.i.i.i.i.i44
- %24 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i.i.i.i.i46 unwind label %lpad.i51
-
-bb2.i.i.i.i.i.i.i46: ; preds = %bb1.i.i.i.i.i.i.i45, %bb.i.i.i.i.i.i.i44
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- br label %_ZN23btGImpactShapeInterfaceD2Ev.exit55
-
-invcont1.i47: ; preds = %lpad.i51
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i49)
- unreachable
-
-lpad.i51: ; preds = %bb1.i.i.i.i.i.i.i45
- %eh_ptr.i49 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i50 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %25 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %25)
- to label %invcont1.i47 unwind label %lpad9.i54
-
-lpad9.i54: ; preds = %lpad.i51
- %eh_ptr10.i52 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i53 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i52, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN23btGImpactShapeInterfaceD2Ev.exit55: ; preds = %bb2.i.i.i.i.i.i.i46, %bb15
- %26 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- %27 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %29)
- %30 = bitcast %struct.btGImpactMeshShape* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %30) nounwind
- ret void
-
-lpad24: ; preds = %bb1.i.i, %bb1
- %eh_ptr25 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select27 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr25, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = load %struct.btGImpactMeshShapePart*** %3, align 4 ; [#uses=2]
- %32 = icmp eq %struct.btGImpactMeshShapePart** %31, null ; [#uses=1]
- br i1 %32, label %ppad, label %bb.i.i.i57
-
-bb.i.i.i57: ; preds = %lpad24
- %33 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %34 = load i8* %33, align 4 ; [#uses=1]
- %toBool.i.i.i56 = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i56, label %bb2.i.i.i59, label %bb1.i.i.i58
-
-bb1.i.i.i58: ; preds = %bb.i.i.i57
- %35 = bitcast %struct.btGImpactMeshShapePart** %31 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %35)
- to label %bb2.i.i.i59 unwind label %lpad28
-
-bb2.i.i.i59: ; preds = %bb1.i.i.i58, %bb.i.i.i57
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- br label %ppad
-
-lpad28: ; preds = %bb1.i.i.i58
- %eh_ptr29 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select31 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr29, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad32: ; preds = %bb3.i, %invcont1.i
- %eh_ptr33 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr33, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i59, %lpad24
- %36 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %36, align 4
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- store i32 0, i32* %1, align 4
- %37 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %37, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %38 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %39 = load %struct.BT_QUANTIZED_BVH_NODE** %38, align 4 ; [#uses=2]
- %40 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %39, null ; [#uses=1]
- br i1 %40, label %bb3.i, label %bb.i.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i.i: ; preds = %ppad
- %41 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %42 = load i8* %41, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i = icmp eq i8 %42, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i.i
- %43 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %39 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %43)
- to label %bb2.i.i.i.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i.i, %bb.i.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %38, align 4
- br label %bb3.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc unwind label %lpad32
-
-.noexc: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i.i.i.i, %ppad
- %44 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %44, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %38, align 4
- %45 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %46, align 4
- %47 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %47)
- to label %invcont13 unwind label %lpad32
-
-lpad.i: ; preds = %bb1.i.i.i.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %48 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %48)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShapeD1Ev(%struct.btGImpactMeshShape* %this) align 2 {
-entry:
- tail call void @_ZN18btGImpactMeshShapeD2Ev(%struct.btGImpactMeshShape* %this)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btGImpactMeshShapeD2Ev(%struct.btGImpactMeshShape* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV18btGImpactMeshShape, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 1 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 3 ; [#uses=6]
- %tmp66 = add i32 %2, -1 ; [#uses=1]
- br label %bb2
-
-bb: ; preds = %bb2
- %scevgep = getelementptr %struct.btGImpactMeshShapePart** %12, i32 %tmp67 ; [#uses=1]
- %4 = load %struct.btGImpactMeshShapePart** %scevgep, align 4 ; [#uses=3]
- %5 = icmp eq %struct.btGImpactMeshShapePart* %4, null ; [#uses=1]
- br i1 %5, label %bb2.backedge, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btGImpactMeshShapePart* %4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 1 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btGImpactMeshShapePart*)* ; [#uses=1]
- invoke void %10(%struct.btGImpactMeshShapePart* %4)
- to label %bb2.backedge unwind label %lpad24
-
-bb2.backedge: ; preds = %bb1, %bb
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2.backedge, %entry
- %indvar = phi i32 [ %indvar.next, %bb2.backedge ], [ 0, %entry ] ; [#uses=2]
- %tmp67 = sub i32 %tmp66, %indvar ; [#uses=2]
- %11 = icmp eq i32 %tmp67, -1 ; [#uses=1]
- %12 = load %struct.btGImpactMeshShapePart*** %3, align 4 ; [#uses=3]
- br i1 %11, label %bb3, label %bb
-
-bb3: ; preds = %bb2
- %13 = icmp eq %struct.btGImpactMeshShapePart** %12, null ; [#uses=1]
- br i1 %13, label %bb15, label %bb.i.i
-
-bb.i.i: ; preds = %bb3
- %14 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %15 = load i8* %14, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %15, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %16 = bitcast %struct.btGImpactMeshShapePart** %12 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %16)
- to label %bb2.i.i unwind label %lpad24
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- br label %bb15
-
-invcont13: ; preds = %bb3.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr25)
- unreachable
-
-bb15: ; preds = %bb2.i.i, %bb3
- %17 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i8 1, i8* %17, align 4
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- store i32 0, i32* %1, align 4
- store i32 0, i32* %18, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %19 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %20 = load %struct.BT_QUANTIZED_BVH_NODE** %19, align 4 ; [#uses=2]
- %21 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %20, null ; [#uses=1]
- br i1 %21, label %_ZN23btGImpactShapeInterfaceD2Ev.exit55, label %bb.i.i.i.i.i.i.i44
-
-bb.i.i.i.i.i.i.i44: ; preds = %bb15
- %22 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i43 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i43, label %bb2.i.i.i.i.i.i.i46, label %bb1.i.i.i.i.i.i.i45
-
-bb1.i.i.i.i.i.i.i45: ; preds = %bb.i.i.i.i.i.i.i44
- %24 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i.i.i.i.i46 unwind label %lpad.i51
-
-bb2.i.i.i.i.i.i.i46: ; preds = %bb1.i.i.i.i.i.i.i45, %bb.i.i.i.i.i.i.i44
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- br label %_ZN23btGImpactShapeInterfaceD2Ev.exit55
-
-invcont1.i47: ; preds = %lpad.i51
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i49)
- unreachable
-
-lpad.i51: ; preds = %bb1.i.i.i.i.i.i.i45
- %eh_ptr.i49 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i50 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %25 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %25)
- to label %invcont1.i47 unwind label %lpad9.i54
-
-lpad9.i54: ; preds = %lpad.i51
- %eh_ptr10.i52 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i53 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i52, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN23btGImpactShapeInterfaceD2Ev.exit55: ; preds = %bb2.i.i.i.i.i.i.i46, %bb15
- %26 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %26, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %19, align 4
- %27 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %29)
- ret void
-
-lpad24: ; preds = %bb1.i.i, %bb1
- %eh_ptr25 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select27 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr25, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %30 = load %struct.btGImpactMeshShapePart*** %3, align 4 ; [#uses=2]
- %31 = icmp eq %struct.btGImpactMeshShapePart** %30, null ; [#uses=1]
- br i1 %31, label %ppad, label %bb.i.i.i57
-
-bb.i.i.i57: ; preds = %lpad24
- %32 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %33 = load i8* %32, align 4 ; [#uses=1]
- %toBool.i.i.i56 = icmp eq i8 %33, 0 ; [#uses=1]
- br i1 %toBool.i.i.i56, label %bb2.i.i.i59, label %bb1.i.i.i58
-
-bb1.i.i.i58: ; preds = %bb.i.i.i57
- %34 = bitcast %struct.btGImpactMeshShapePart** %30 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %34)
- to label %bb2.i.i.i59 unwind label %lpad28
-
-bb2.i.i.i59: ; preds = %bb1.i.i.i58, %bb.i.i.i57
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- br label %ppad
-
-lpad28: ; preds = %bb1.i.i.i58
- %eh_ptr29 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select31 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr29, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad32: ; preds = %bb3.i, %invcont1.i
- %eh_ptr33 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr33, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i59, %lpad24
- %35 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %35, align 4
- store %struct.btGImpactMeshShapePart** null, %struct.btGImpactMeshShapePart*** %3, align 4
- store i32 0, i32* %1, align 4
- %36 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- store i32 (...)** getelementptr inbounds ([37 x i32 (...)*]* @_ZTV23btGImpactShapeInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %37 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %38 = load %struct.BT_QUANTIZED_BVH_NODE** %37, align 4 ; [#uses=2]
- %39 = icmp eq %struct.BT_QUANTIZED_BVH_NODE* %38, null ; [#uses=1]
- br i1 %39, label %bb3.i, label %bb.i.i.i.i.i.i.i
-
-bb.i.i.i.i.i.i.i: ; preds = %ppad
- %40 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- %41 = load i8* %40, align 4 ; [#uses=1]
- %toBool.i.i.i.i.i.i.i = icmp eq i8 %41, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i.i.i.i, label %bb2.i.i.i.i.i.i.i, label %bb1.i.i.i.i.i.i.i
-
-bb1.i.i.i.i.i.i.i: ; preds = %bb.i.i.i.i.i.i.i
- %42 = bitcast %struct.BT_QUANTIZED_BVH_NODE* %38 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %42)
- to label %bb2.i.i.i.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i.i.i.i: ; preds = %bb1.i.i.i.i.i.i.i, %bb.i.i.i.i.i.i.i
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %37, align 4
- br label %bb3.i
-
-invcont1.i: ; preds = %lpad.i
- invoke void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- to label %.noexc unwind label %lpad32
-
-.noexc: ; preds = %invcont1.i
- unreachable
-
-bb3.i: ; preds = %bb2.i.i.i.i.i.i.i, %ppad
- %43 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %43, align 4
- store %struct.BT_QUANTIZED_BVH_NODE* null, %struct.BT_QUANTIZED_BVH_NODE** %37, align 4
- %44 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %44, align 4
- %45 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 4, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store i32 0, i32* %45, align 4
- %46 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %46)
- to label %invcont13 unwind label %lpad32
-
-lpad.i: ; preds = %bb1.i.i.i.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %47 = getelementptr inbounds %struct.btGImpactMeshShape* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN14btConcaveShapeD2Ev(%struct.btConcaveShape* %47)
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=2]
-define void @_ZN20GIM_TRIANGLE_CONTACT12merge_pointsERK9btVector4fPK9btVector3i(%struct.GIM_TRIANGLE_CONTACT* nocapture %this, %struct.btQuaternion* nocapture %plane, float %margin, %struct.btQuadWord* nocapture %points, i32 %point_count) nounwind align 2 {
-entry:
- %point_indices = alloca [16 x i32], align 4 ; [#uses=3]
- %0 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 1 ; [#uses=4]
- store i32 0, i32* %0, align 4
- %1 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 0 ; [#uses=2]
- store float -1.000000e+03, float* %1, align 4
- %2 = icmp sgt i32 %point_count, 0 ; [#uses=1]
- br i1 %2, label %bb.nph13, label %return
-
-bb.nph13: ; preds = %entry
- %3 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %7 = getelementptr inbounds [16 x i32]* %point_indices, i32 0, i32 0 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb5, %bb.nph13
- %8 = phi i32 [ 0, %bb.nph13 ], [ %31, %bb5 ] ; [#uses=4]
- %9 = phi float [ -1.000000e+03, %bb.nph13 ], [ %32, %bb5 ] ; [#uses=5]
- %10 = phi i32 [ 0, %bb.nph13 ], [ %33, %bb5 ] ; [#uses=6]
- %scevgep1920 = getelementptr inbounds %struct.btQuadWord* %points, i32 %10, i32 0, i32 0 ; [#uses=1]
- %scevgep21 = getelementptr %struct.btQuadWord* %points, i32 %10, i32 0, i32 1 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btQuadWord* %points, i32 %10, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %scevgep1920, align 4 ; [#uses=1]
- %12 = load float* %3, align 4 ; [#uses=1]
- %13 = fmul float %11, %12 ; [#uses=1]
- %14 = load float* %scevgep21, align 4 ; [#uses=1]
- %15 = load float* %4, align 4 ; [#uses=1]
- %16 = fmul float %14, %15 ; [#uses=1]
- %17 = fadd float %13, %16 ; [#uses=1]
- %18 = load float* %scevgep22, align 4 ; [#uses=1]
- %19 = load float* %5, align 4 ; [#uses=1]
- %20 = fmul float %18, %19 ; [#uses=1]
- %21 = fadd float %17, %20 ; [#uses=1]
- %22 = load float* %6, align 4 ; [#uses=1]
- %23 = fsub float %21, %22 ; [#uses=1]
- %24 = fsub float %margin, %23 ; [#uses=5]
- %25 = fcmp ult float %24, 0.000000e+00 ; [#uses=1]
- br i1 %25, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %26 = fcmp olt float %9, %24 ; [#uses=1]
- br i1 %26, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- store float %24, float* %1, align 4
- store i32 %10, i32* %7, align 4
- store i32 1, i32* %0, align 4
- br label %bb5
-
-bb3: ; preds = %bb1
- %27 = fadd float %24, 0x3E80000000000000 ; [#uses=1]
- %28 = fcmp ult float %27, %9 ; [#uses=1]
- br i1 %28, label %bb5, label %bb4
-
-bb4: ; preds = %bb3
- %29 = getelementptr inbounds [16 x i32]* %point_indices, i32 0, i32 %8 ; [#uses=1]
- store i32 %10, i32* %29, align 4
- %30 = add nsw i32 %8, 1 ; [#uses=2]
- store i32 %30, i32* %0, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3, %bb2, %bb
- %31 = phi i32 [ %8, %bb3 ], [ %8, %bb ], [ %30, %bb4 ], [ 1, %bb2 ] ; [#uses=2]
- %32 = phi float [ %9, %bb3 ], [ %9, %bb ], [ %9, %bb4 ], [ %24, %bb2 ] ; [#uses=1]
- %33 = add nsw i32 %10, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %33, %point_count ; [#uses=1]
- br i1 %exitcond, label %bb9.preheader, label %bb
-
-bb9.preheader: ; preds = %bb5
- %34 = icmp sgt i32 %31, 0 ; [#uses=1]
- br i1 %34, label %bb8, label %return
-
-bb8: ; preds = %bb8, %bb9.preheader
- %_k.111 = phi i32 [ 0, %bb9.preheader ], [ %44, %bb8 ] ; [#uses=6]
- %scevgep = getelementptr [16 x i32]* %point_indices, i32 0, i32 %_k.111 ; [#uses=1]
- %scevgep1415 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111, i32 0, i32 0 ; [#uses=1]
- %scevgep16 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111, i32 0, i32 1 ; [#uses=1]
- %scevgep17 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111, i32 0, i32 2 ; [#uses=1]
- %scevgep18 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111, i32 0, i32 3 ; [#uses=1]
- %35 = load i32* %scevgep, align 4 ; [#uses=4]
- %36 = getelementptr inbounds %struct.btQuadWord* %points, i32 %35, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %scevgep1415, align 4
- %38 = getelementptr inbounds %struct.btQuadWord* %points, i32 %35, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %scevgep16, align 4
- %40 = getelementptr inbounds %struct.btQuadWord* %points, i32 %35, i32 0, i32 2 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %scevgep17, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %points, i32 %35, i32 0, i32 3 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %scevgep18, align 4
- %44 = add nsw i32 %_k.111, 1 ; [#uses=2]
- %45 = load i32* %0, align 4 ; [#uses=1]
- %46 = icmp sgt i32 %45, %44 ; [#uses=1]
- br i1 %46, label %bb8, label %return
-
-return: ; preds = %bb8, %bb9.preheader, %entry
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr i32 @_Z21bt_plane_clip_polygonRK9btVector4PK9btVector3iPS2_(%struct.btQuaternion* nocapture %plane, %struct.btQuadWord* nocapture %polygon_points, i32 %polygon_point_count, %struct.btQuadWord* nocapture %clipped) nounwind inlinehint {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 1 ; [#uses=4]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 2 ; [#uses=4]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fsub float %16, %18 ; [#uses=5]
- %20 = fcmp ule float %19, 0x3E80000000000000 ; [#uses=1]
- br i1 %20, label %bb, label %bb3.preheader
-
-bb: ; preds = %entry
- %21 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %5, align 4 ; [#uses=1]
- store float %23, float* %22, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %11, align 4 ; [#uses=1]
- store float %25, float* %24, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- br label %bb3.preheader
-
-bb3.preheader: ; preds = %bb, %entry
- %clipped_count.0.ph = phi i32 [ 0, %entry ], [ 1, %bb ] ; [#uses=2]
- %29 = icmp sgt i32 %polygon_point_count, 1 ; [#uses=1]
- br i1 %29, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %bb3.preheader
- %tmp = add i32 %polygon_point_count, -1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %tmp15, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10 ] ; [#uses=4]
- %olddist.012 = phi float [ %19, %bb.nph ], [ %42, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10 ] ; [#uses=3]
- %clipped_count.011 = phi i32 [ %clipped_count.0.ph, %bb.nph ], [ %clipped_count.4, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10 ] ; [#uses=6]
- %tmp15 = add i32 %indvar, 1 ; [#uses=6]
- %scevgep16 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %tmp15, i32 0, i32 0 ; [#uses=2]
- %scevgep17 = getelementptr %struct.btQuadWord* %polygon_points, i32 %tmp15, i32 0, i32 1 ; [#uses=2]
- %scevgep18 = getelementptr %struct.btQuadWord* %polygon_points, i32 %tmp15, i32 0, i32 2 ; [#uses=2]
- %scevgep19 = getelementptr %struct.btQuadWord* %polygon_points, i32 %tmp15, i32 0, i32 3 ; [#uses=1]
- %30 = load float* %scevgep16, align 4 ; [#uses=2]
- %31 = load float* %2, align 4 ; [#uses=1]
- %32 = fmul float %30, %31 ; [#uses=1]
- %33 = load float* %scevgep17, align 4 ; [#uses=2]
- %34 = load float* %7, align 4 ; [#uses=1]
- %35 = fmul float %33, %34 ; [#uses=1]
- %36 = fadd float %32, %35 ; [#uses=1]
- %37 = load float* %scevgep18, align 4 ; [#uses=2]
- %38 = load float* %13, align 4 ; [#uses=1]
- %39 = fmul float %37, %38 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = load float* %17, align 4 ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=4]
- %43 = fcmp ogt float %olddist.012, 0x3E80000000000000 ; [#uses=1]
- %44 = fcmp ogt float %42, 0x3E80000000000000 ; [#uses=2]
- %45 = xor i1 %44, %43 ; [#uses=1]
- br i1 %45, label %bb.i6, label %bb1.i7
-
-bb.i6: ; preds = %bb2
- %scevgep23 = getelementptr %struct.btQuadWord* %polygon_points, i32 %indvar, i32 0, i32 2 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btQuadWord* %polygon_points, i32 %indvar, i32 0, i32 1 ; [#uses=1]
- %scevgep2021 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %indvar, i32 0, i32 0 ; [#uses=1]
- %46 = fsub float -0.000000e+00, %olddist.012 ; [#uses=1]
- %47 = fsub float %42, %olddist.012 ; [#uses=1]
- %48 = fdiv float %46, %47 ; [#uses=4]
- %49 = fmul float %37, %48 ; [#uses=1]
- %50 = fmul float %33, %48 ; [#uses=1]
- %51 = fmul float %30, %48 ; [#uses=1]
- %52 = fsub float 1.000000e+00, %48 ; [#uses=3]
- %53 = load float* %scevgep23, align 4 ; [#uses=1]
- %54 = fmul float %53, %52 ; [#uses=1]
- %55 = load float* %scevgep22, align 4 ; [#uses=1]
- %56 = fmul float %55, %52 ; [#uses=1]
- %57 = load float* %scevgep2021, align 4 ; [#uses=1]
- %58 = fmul float %57, %52 ; [#uses=1]
- %59 = fadd float %54, %49 ; [#uses=1]
- %60 = fadd float %56, %50 ; [#uses=1]
- %61 = fadd float %58, %51 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.011, i32 0, i32 0 ; [#uses=1]
- store float %61, float* %62, align 4
- %63 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.011, i32 0, i32 1 ; [#uses=1]
- store float %60, float* %63, align 4
- %64 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.011, i32 0, i32 2 ; [#uses=1]
- store float %59, float* %64, align 4
- %65 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.011, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %65, align 4
- %66 = add nsw i32 %clipped_count.011, 1 ; [#uses=1]
- br label %bb1.i7
-
-bb1.i7: ; preds = %bb.i6, %bb2
- %clipped_count.3 = phi i32 [ %66, %bb.i6 ], [ %clipped_count.011, %bb2 ] ; [#uses=6]
- br i1 %44, label %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10, label %bb5.i8
-
-bb5.i8: ; preds = %bb1.i7
- %67 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %scevgep16, align 4 ; [#uses=1]
- store float %68, float* %67, align 4
- %69 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %scevgep17, align 4 ; [#uses=1]
- store float %70, float* %69, align 4
- %71 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %scevgep18, align 4 ; [#uses=1]
- store float %72, float* %71, align 4
- %73 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 3 ; [#uses=1]
- %74 = load float* %scevgep19, align 4 ; [#uses=1]
- store float %74, float* %73, align 4
- %75 = add nsw i32 %clipped_count.3, 1 ; [#uses=1]
- br label %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10
-
-_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10: ; preds = %bb5.i8, %bb1.i7
- %clipped_count.4 = phi i32 [ %75, %bb5.i8 ], [ %clipped_count.3, %bb1.i7 ] ; [#uses=2]
- %exitcond = icmp eq i32 %tmp15, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10, %bb3.preheader
- %olddist.0.lcssa = phi float [ %19, %bb3.preheader ], [ %42, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10 ] ; [#uses=3]
- %clipped_count.0.lcssa = phi i32 [ %clipped_count.0.ph, %bb3.preheader ], [ %clipped_count.4, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit10 ] ; [#uses=6]
- %76 = add nsw i32 %polygon_point_count, -1 ; [#uses=3]
- %77 = fcmp ogt float %olddist.0.lcssa, 0x3E80000000000000 ; [#uses=1]
- %78 = fcmp ogt float %19, 0x3E80000000000000 ; [#uses=2]
- %79 = xor i1 %78, %77 ; [#uses=1]
- br i1 %79, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb4
- %80 = fsub float -0.000000e+00, %olddist.0.lcssa ; [#uses=1]
- %81 = fsub float %19, %olddist.0.lcssa ; [#uses=1]
- %82 = fdiv float %80, %81 ; [#uses=4]
- %83 = load float* %11, align 4 ; [#uses=1]
- %84 = fmul float %83, %82 ; [#uses=1]
- %85 = load float* %5, align 4 ; [#uses=1]
- %86 = fmul float %85, %82 ; [#uses=1]
- %87 = load float* %0, align 4 ; [#uses=1]
- %88 = fmul float %87, %82 ; [#uses=1]
- %89 = fsub float 1.000000e+00, %82 ; [#uses=3]
- %90 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %76, i32 0, i32 2 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %91, %89 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %76, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %94, %89 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %76, i32 0, i32 0 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- %98 = fmul float %97, %89 ; [#uses=1]
- %99 = fadd float %92, %84 ; [#uses=1]
- %100 = fadd float %95, %86 ; [#uses=1]
- %101 = fadd float %98, %88 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0.lcssa, i32 0, i32 0 ; [#uses=1]
- store float %101, float* %102, align 4
- %103 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0.lcssa, i32 0, i32 1 ; [#uses=1]
- store float %100, float* %103, align 4
- %104 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0.lcssa, i32 0, i32 2 ; [#uses=1]
- store float %99, float* %104, align 4
- %105 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0.lcssa, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %105, align 4
- %106 = add nsw i32 %clipped_count.0.lcssa, 1 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %bb4
- %clipped_count.1 = phi i32 [ %106, %bb.i ], [ %clipped_count.0.lcssa, %bb4 ] ; [#uses=6]
- br i1 %78, label %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit, label %bb5.i
-
-bb5.i: ; preds = %bb1.i
- %107 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 0 ; [#uses=1]
- %108 = load float* %0, align 4 ; [#uses=1]
- store float %108, float* %107, align 4
- %109 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 1 ; [#uses=1]
- %110 = load float* %5, align 4 ; [#uses=1]
- store float %110, float* %109, align 4
- %111 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 2 ; [#uses=1]
- %112 = load float* %11, align 4 ; [#uses=1]
- store float %112, float* %111, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 3 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 3 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- store float %115, float* %113, align 4
- %116 = add nsw i32 %clipped_count.1, 1 ; [#uses=1]
- ret i32 %116
-
-_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit: ; preds = %bb1.i
- ret i32 %clipped_count.1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_Z22bt_plane_clip_triangleRK9btVector4RK9btVector3S4_S4_PS2_(%struct.btQuaternion* nocapture %plane, %struct.btQuadWord* nocapture %point0, %struct.btQuadWord* nocapture %point1, %struct.btQuadWord* nocapture %point2, %struct.btQuadWord* %clipped) nounwind inlinehint {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 0 ; [#uses=4]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 1 ; [#uses=5]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 2 ; [#uses=5]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fsub float %16, %18 ; [#uses=5]
- %20 = fcmp ule float %19, 0x3E80000000000000 ; [#uses=1]
- br i1 %20, label %bb, label %bb1
-
-bb: ; preds = %entry
- %21 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %5, align 4 ; [#uses=1]
- store float %23, float* %22, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %11, align 4 ; [#uses=1]
- store float %25, float* %24, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %.pre = load float* %2, align 4 ; [#uses=1]
- %.pre13 = load float* %7, align 4 ; [#uses=1]
- %.pre14 = load float* %13, align 4 ; [#uses=1]
- %.pre15 = load float* %17, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %29 = phi float [ %.pre15, %bb ], [ %18, %entry ] ; [#uses=1]
- %30 = phi float [ %.pre14, %bb ], [ %14, %entry ] ; [#uses=1]
- %31 = phi float [ %.pre13, %bb ], [ %8, %entry ] ; [#uses=1]
- %32 = phi float [ %.pre, %bb ], [ %3, %entry ] ; [#uses=1]
- %clipped_count.0 = phi i32 [ 1, %bb ], [ 0, %entry ] ; [#uses=6]
- %33 = getelementptr inbounds %struct.btQuadWord* %point1, i32 0, i32 0, i32 0 ; [#uses=3]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fmul float %34, %32 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %point1, i32 0, i32 0, i32 1 ; [#uses=3]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = fmul float %37, %31 ; [#uses=1]
- %39 = fadd float %35, %38 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %point1, i32 0, i32 0, i32 2 ; [#uses=3]
- %41 = load float* %40, align 4 ; [#uses=2]
- %42 = fmul float %41, %30 ; [#uses=1]
- %43 = fadd float %39, %42 ; [#uses=1]
- %44 = fsub float %43, %29 ; [#uses=4]
- %45 = fcmp ogt float %19, 0x3E80000000000000 ; [#uses=4]
- %46 = fcmp ogt float %44, 0x3E80000000000000 ; [#uses=3]
- %47 = xor i1 %46, %45 ; [#uses=1]
- br i1 %47, label %bb.i8, label %bb1.i9
-
-bb.i8: ; preds = %bb1
- %48 = fsub float -0.000000e+00, %19 ; [#uses=1]
- %49 = fsub float %44, %19 ; [#uses=1]
- %50 = fdiv float %48, %49 ; [#uses=4]
- %51 = fmul float %41, %50 ; [#uses=1]
- %52 = fmul float %37, %50 ; [#uses=1]
- %53 = fmul float %34, %50 ; [#uses=1]
- %54 = fsub float 1.000000e+00, %50 ; [#uses=3]
- %55 = load float* %11, align 4 ; [#uses=1]
- %56 = fmul float %55, %54 ; [#uses=1]
- %57 = load float* %5, align 4 ; [#uses=1]
- %58 = fmul float %57, %54 ; [#uses=1]
- %59 = load float* %0, align 4 ; [#uses=1]
- %60 = fmul float %59, %54 ; [#uses=1]
- %61 = fadd float %56, %51 ; [#uses=1]
- %62 = fadd float %58, %52 ; [#uses=1]
- %63 = fadd float %60, %53 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0, i32 0, i32 0 ; [#uses=1]
- store float %63, float* %64, align 4
- %65 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0, i32 0, i32 1 ; [#uses=1]
- store float %62, float* %65, align 4
- %66 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0, i32 0, i32 2 ; [#uses=1]
- store float %61, float* %66, align 4
- %67 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- %68 = add nsw i32 %clipped_count.0, 1 ; [#uses=1]
- br label %bb1.i9
-
-bb1.i9: ; preds = %bb.i8, %bb1
- %clipped_count.5 = phi i32 [ %68, %bb.i8 ], [ %clipped_count.0, %bb1 ] ; [#uses=6]
- br i1 %46, label %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit12, label %bb5.i10
-
-bb5.i10: ; preds = %bb1.i9
- %69 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.5, i32 0, i32 0 ; [#uses=1]
- %70 = load float* %33, align 4 ; [#uses=1]
- store float %70, float* %69, align 4
- %71 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.5, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %36, align 4 ; [#uses=1]
- store float %72, float* %71, align 4
- %73 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.5, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %40, align 4 ; [#uses=1]
- store float %74, float* %73, align 4
- %75 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.5, i32 0, i32 3 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btQuadWord* %point1, i32 0, i32 0, i32 3 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = add nsw i32 %clipped_count.5, 1 ; [#uses=1]
- br label %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit12
-
-_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit12: ; preds = %bb5.i10, %bb1.i9
- %clipped_count.6 = phi i32 [ %78, %bb5.i10 ], [ %clipped_count.5, %bb1.i9 ] ; [#uses=6]
- %79 = getelementptr inbounds %struct.btQuadWord* %point2, i32 0, i32 0, i32 0 ; [#uses=3]
- %80 = load float* %79, align 4 ; [#uses=2]
- %81 = load float* %2, align 4 ; [#uses=1]
- %82 = fmul float %80, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btQuadWord* %point2, i32 0, i32 0, i32 1 ; [#uses=3]
- %84 = load float* %83, align 4 ; [#uses=2]
- %85 = load float* %7, align 4 ; [#uses=1]
- %86 = fmul float %84, %85 ; [#uses=1]
- %87 = fadd float %82, %86 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btQuadWord* %point2, i32 0, i32 0, i32 2 ; [#uses=3]
- %89 = load float* %88, align 4 ; [#uses=2]
- %90 = load float* %13, align 4 ; [#uses=1]
- %91 = fmul float %89, %90 ; [#uses=1]
- %92 = fadd float %87, %91 ; [#uses=1]
- %93 = load float* %17, align 4 ; [#uses=1]
- %94 = fsub float %92, %93 ; [#uses=4]
- %95 = fcmp ogt float %94, 0x3E80000000000000 ; [#uses=4]
- %96 = xor i1 %95, %46 ; [#uses=1]
- br i1 %96, label %bb.i3, label %bb1.i4
-
-bb.i3: ; preds = %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit12
- %97 = fsub float -0.000000e+00, %44 ; [#uses=1]
- %98 = fsub float %94, %44 ; [#uses=1]
- %99 = fdiv float %97, %98 ; [#uses=4]
- %100 = fmul float %89, %99 ; [#uses=1]
- %101 = fmul float %84, %99 ; [#uses=1]
- %102 = fmul float %80, %99 ; [#uses=1]
- %103 = fsub float 1.000000e+00, %99 ; [#uses=3]
- %104 = load float* %40, align 4 ; [#uses=1]
- %105 = fmul float %104, %103 ; [#uses=1]
- %106 = load float* %36, align 4 ; [#uses=1]
- %107 = fmul float %106, %103 ; [#uses=1]
- %108 = load float* %33, align 4 ; [#uses=1]
- %109 = fmul float %108, %103 ; [#uses=1]
- %110 = fadd float %105, %100 ; [#uses=1]
- %111 = fadd float %107, %101 ; [#uses=1]
- %112 = fadd float %109, %102 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.6, i32 0, i32 0 ; [#uses=1]
- store float %112, float* %113, align 4
- %114 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.6, i32 0, i32 1 ; [#uses=1]
- store float %111, float* %114, align 4
- %115 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.6, i32 0, i32 2 ; [#uses=1]
- store float %110, float* %115, align 4
- %116 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %116, align 4
- %117 = add nsw i32 %clipped_count.6, 1 ; [#uses=1]
- br label %bb1.i4
-
-bb1.i4: ; preds = %bb.i3, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit12
- %clipped_count.3 = phi i32 [ %117, %bb.i3 ], [ %clipped_count.6, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit12 ] ; [#uses=7]
- br i1 %95, label %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit7, label %bb5.i5
-
-bb5.i5: ; preds = %bb1.i4
- %118 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 0 ; [#uses=1]
- %119 = load float* %79, align 4 ; [#uses=1]
- store float %119, float* %118, align 4
- %120 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 1 ; [#uses=1]
- %121 = load float* %83, align 4 ; [#uses=1]
- store float %121, float* %120, align 4
- %122 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 2 ; [#uses=1]
- %123 = load float* %88, align 4 ; [#uses=1]
- store float %123, float* %122, align 4
- %124 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 3 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btQuadWord* %point2, i32 0, i32 0, i32 3 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- store float %126, float* %124, align 4
- %127 = add nsw i32 %clipped_count.3, 1 ; [#uses=2]
- %128 = xor i1 %45, %95 ; [#uses=1]
- br i1 %128, label %bb.i, label %bb1.i
-
-_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit7: ; preds = %bb1.i4
- %129 = xor i1 %45, %95 ; [#uses=1]
- br i1 %129, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit7, %bb5.i5
- %clipped_count.416 = phi i32 [ %127, %bb5.i5 ], [ %clipped_count.3, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit7 ] ; [#uses=5]
- %130 = fsub float -0.000000e+00, %94 ; [#uses=1]
- %131 = fsub float %19, %94 ; [#uses=1]
- %132 = fdiv float %130, %131 ; [#uses=4]
- %133 = load float* %11, align 4 ; [#uses=1]
- %134 = fmul float %133, %132 ; [#uses=1]
- %135 = load float* %5, align 4 ; [#uses=1]
- %136 = fmul float %135, %132 ; [#uses=1]
- %137 = load float* %0, align 4 ; [#uses=1]
- %138 = fmul float %137, %132 ; [#uses=1]
- %139 = fsub float 1.000000e+00, %132 ; [#uses=3]
- %140 = load float* %88, align 4 ; [#uses=1]
- %141 = fmul float %140, %139 ; [#uses=1]
- %142 = load float* %83, align 4 ; [#uses=1]
- %143 = fmul float %142, %139 ; [#uses=1]
- %144 = load float* %79, align 4 ; [#uses=1]
- %145 = fmul float %144, %139 ; [#uses=1]
- %146 = fadd float %141, %134 ; [#uses=1]
- %147 = fadd float %143, %136 ; [#uses=1]
- %148 = fadd float %145, %138 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.416, i32 0, i32 0 ; [#uses=1]
- store float %148, float* %149, align 4
- %150 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.416, i32 0, i32 1 ; [#uses=1]
- store float %147, float* %150, align 4
- %151 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.416, i32 0, i32 2 ; [#uses=1]
- store float %146, float* %151, align 4
- %152 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.416, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %152, align 4
- %153 = add nsw i32 %clipped_count.416, 1 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit7, %bb5.i5
- %clipped_count.1 = phi i32 [ %153, %bb.i ], [ %clipped_count.3, %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit7 ], [ %127, %bb5.i5 ] ; [#uses=6]
- br i1 %45, label %_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit, label %bb5.i
-
-bb5.i: ; preds = %bb1.i
- %154 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 0 ; [#uses=1]
- %155 = load float* %0, align 4 ; [#uses=1]
- store float %155, float* %154, align 4
- %156 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 1 ; [#uses=1]
- %157 = load float* %5, align 4 ; [#uses=1]
- store float %157, float* %156, align 4
- %158 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 2 ; [#uses=1]
- %159 = load float* %11, align 4 ; [#uses=1]
- store float %159, float* %158, align 4
- %160 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 3 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 3 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- store float %162, float* %160, align 4
- %163 = add nsw i32 %clipped_count.1, 1 ; [#uses=1]
- ret i32 %163
-
-_Z29bt_plane_clip_polygon_collectRK9btVector3S1_ffPS_Ri.exit: ; preds = %bb1.i
- ret i32 %clipped_count.1
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN19btPrimitiveTriangle25overlap_test_conservativeERKS_(%struct.btPrimitiveTriangle* nocapture %this, %struct.btPrimitiveTriangle* nocapture %other) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fadd float %1, %3 ; [#uses=6]
- %5 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fmul float %11, %13 ; [#uses=1]
- %15 = fadd float %9, %14 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=3]
- %20 = fmul float %17, %19 ; [#uses=1]
- %21 = fadd float %15, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- %24 = fsub float %21, %23 ; [#uses=1]
- %25 = fsub float %24, %4 ; [#uses=1]
- %26 = fcmp ogt float %25, 0.000000e+00 ; [#uses=1]
- br i1 %26, label %bb, label %bb3
-
-bb: ; preds = %entry
- %27 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %27, align 4 ; [#uses=1]
- %31 = load float* %28, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %29, align 4 ; [#uses=1]
- %35 = fmul float %30, %13 ; [#uses=1]
- %36 = fmul float %31, %8 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %32, align 4 ; [#uses=1]
- %39 = load float* %33, align 4 ; [#uses=1]
- %40 = fmul float %34, %19 ; [#uses=1]
- %41 = fadd float %36, %35 ; [#uses=1]
- %42 = load float* %37, align 4 ; [#uses=1]
- %43 = fmul float %38, %13 ; [#uses=1]
- %44 = fmul float %39, %8 ; [#uses=1]
- %45 = fadd float %41, %40 ; [#uses=1]
- %46 = fmul float %42, %19 ; [#uses=1]
- %47 = fadd float %44, %43 ; [#uses=1]
- %48 = fsub float %45, %23 ; [#uses=1]
- %49 = fadd float %47, %46 ; [#uses=1]
- %50 = fsub float %48, %4 ; [#uses=1]
- %51 = fsub float %49, %23 ; [#uses=1]
- %52 = fsub float %51, %4 ; [#uses=1]
- %53 = fcmp ogt float %52, 0.000000e+00 ; [#uses=1]
- %54 = fcmp ogt float %50, 0.000000e+00 ; [#uses=1]
- %or.cond = and i1 %53, %54 ; [#uses=1]
- br i1 %or.cond, label %bb8, label %bb3
-
-bb3: ; preds = %bb, %entry
- %55 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=3]
- %59 = fmul float %56, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=3]
- %64 = fmul float %61, %63 ; [#uses=1]
- %65 = fadd float %59, %64 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=3]
- %70 = fmul float %67, %69 ; [#uses=1]
- %71 = fadd float %65, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=3]
- %74 = fsub float %71, %73 ; [#uses=1]
- %75 = fsub float %74, %4 ; [#uses=1]
- %76 = fcmp ogt float %75, 0.000000e+00 ; [#uses=1]
- br i1 %76, label %bb4, label %bb7
-
-bb4: ; preds = %bb3
- %77 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %77, align 4 ; [#uses=1]
- %81 = load float* %78, align 4 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %84 = load float* %79, align 4 ; [#uses=1]
- %85 = fmul float %80, %63 ; [#uses=1]
- %86 = fmul float %81, %58 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %88 = load float* %82, align 4 ; [#uses=1]
- %89 = load float* %83, align 4 ; [#uses=1]
- %90 = fmul float %84, %69 ; [#uses=1]
- %91 = fadd float %86, %85 ; [#uses=1]
- %92 = load float* %87, align 4 ; [#uses=1]
- %93 = fmul float %88, %63 ; [#uses=1]
- %94 = fmul float %89, %58 ; [#uses=1]
- %95 = fadd float %91, %90 ; [#uses=1]
- %96 = fmul float %92, %69 ; [#uses=1]
- %97 = fadd float %94, %93 ; [#uses=1]
- %98 = fsub float %95, %73 ; [#uses=1]
- %99 = fadd float %97, %96 ; [#uses=1]
- %100 = fsub float %98, %4 ; [#uses=1]
- %101 = fsub float %99, %73 ; [#uses=1]
- %102 = fsub float %101, %4 ; [#uses=1]
- %103 = fcmp ogt float %102, 0.000000e+00 ; [#uses=1]
- %104 = fcmp ogt float %100, 0.000000e+00 ; [#uses=1]
- %or.cond11 = and i1 %103, %104 ; [#uses=1]
- %105 = zext i1 %or.cond11 to i8 ; [#uses=1]
- %retval = xor i8 %105, 1 ; [#uses=1]
- ret i8 %retval
-
-bb7: ; preds = %bb3
- ret i8 1
-
-bb8: ; preds = %bb
- ret i8 0
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN17btTriangleShapeEx25overlap_test_conservativeERKS_(%struct.btTriangleShapeEx* %this, %struct.btTriangleShapeEx* %other) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 11 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = bitcast i32 (...)* %3 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %6 = tail call float %5(%struct.btConvexInternalShape* %4) ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load i32 (...)*** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 11 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = bitcast i32 (...)* %10 to float (%struct.btConvexInternalShape*)* ; [#uses=1]
- %13 = tail call float %12(%struct.btConvexInternalShape* %11) ; [#uses=1]
- %14 = fadd float %6, %13 ; [#uses=6]
- %15 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = fsub float %16, %18 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- %24 = fsub float %21, %23 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=4]
- %29 = fsub float %26, %28 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fsub float %31, %18 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fsub float %34, %23 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btTriangleShapeEx* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = fsub float %37, %28 ; [#uses=2]
- %39 = fmul float %38, %24 ; [#uses=1]
- %40 = fmul float %35, %29 ; [#uses=1]
- %41 = fsub float %39, %40 ; [#uses=3]
- %42 = fmul float %32, %29 ; [#uses=1]
- %43 = fmul float %38, %19 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=3]
- %45 = fmul float %35, %19 ; [#uses=1]
- %46 = fmul float %32, %24 ; [#uses=1]
- %47 = fsub float %45, %46 ; [#uses=3]
- %48 = fmul float %47, %47 ; [#uses=1]
- %49 = fmul float %44, %44 ; [#uses=1]
- %50 = fadd float %48, %49 ; [#uses=1]
- %51 = fmul float %41, %41 ; [#uses=1]
- %52 = fadd float %50, %51 ; [#uses=1]
- %53 = tail call float @sqrtf(float %52) nounwind readonly ; [#uses=1]
- %54 = fdiv float 1.000000e+00, %53 ; [#uses=3]
- %55 = fmul float %47, %54 ; [#uses=4]
- %56 = fmul float %44, %54 ; [#uses=4]
- %57 = fmul float %41, %54 ; [#uses=4]
- %58 = fmul float %28, %55 ; [#uses=1]
- %59 = fmul float %23, %56 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %18, %57 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=3]
- %63 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=2]
- %65 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=4]
- %67 = fsub float %64, %66 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=4]
- %72 = fsub float %69, %71 ; [#uses=2]
- %73 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=2]
- %75 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=4]
- %77 = fsub float %74, %76 ; [#uses=2]
- %78 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=2]
- %80 = fsub float %79, %66 ; [#uses=2]
- %81 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=2]
- %83 = fsub float %82, %71 ; [#uses=2]
- %84 = getelementptr inbounds %struct.btTriangleShapeEx* %other, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=2]
- %86 = fsub float %85, %76 ; [#uses=2]
- %87 = fmul float %86, %72 ; [#uses=1]
- %88 = fmul float %83, %77 ; [#uses=1]
- %89 = fsub float %87, %88 ; [#uses=3]
- %90 = fmul float %80, %77 ; [#uses=1]
- %91 = fmul float %86, %67 ; [#uses=1]
- %92 = fsub float %90, %91 ; [#uses=3]
- %93 = fmul float %83, %67 ; [#uses=1]
- %94 = fmul float %80, %72 ; [#uses=1]
- %95 = fsub float %93, %94 ; [#uses=3]
- %96 = fmul float %95, %95 ; [#uses=1]
- %97 = fmul float %92, %92 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=1]
- %99 = fmul float %89, %89 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = tail call float @sqrtf(float %100) nounwind readonly ; [#uses=1]
- %102 = fdiv float 1.000000e+00, %101 ; [#uses=3]
- %103 = fmul float %95, %102 ; [#uses=4]
- %104 = fmul float %92, %102 ; [#uses=4]
- %105 = fmul float %89, %102 ; [#uses=4]
- %106 = fmul float %76, %103 ; [#uses=1]
- %107 = fmul float %71, %104 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %66, %105 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=3]
- %111 = fmul float %76, %55 ; [#uses=1]
- %112 = fmul float %71, %56 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fmul float %66, %57 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fsub float %115, %62 ; [#uses=1]
- %117 = fsub float %116, %14 ; [#uses=1]
- %118 = fcmp ogt float %117, 0.000000e+00 ; [#uses=1]
- br i1 %118, label %bb, label %bb3
-
-bb: ; preds = %entry
- %119 = fmul float %69, %56 ; [#uses=1]
- %120 = fmul float %74, %55 ; [#uses=1]
- %121 = fmul float %64, %57 ; [#uses=1]
- %122 = fadd float %120, %119 ; [#uses=1]
- %123 = fmul float %82, %56 ; [#uses=1]
- %124 = fmul float %85, %55 ; [#uses=1]
- %125 = fadd float %122, %121 ; [#uses=1]
- %126 = fmul float %79, %57 ; [#uses=1]
- %127 = fadd float %124, %123 ; [#uses=1]
- %128 = fsub float %125, %62 ; [#uses=1]
- %129 = fadd float %127, %126 ; [#uses=1]
- %130 = fsub float %128, %14 ; [#uses=1]
- %131 = fsub float %129, %62 ; [#uses=1]
- %132 = fsub float %131, %14 ; [#uses=1]
- %133 = fcmp ogt float %132, 0.000000e+00 ; [#uses=1]
- %134 = fcmp ogt float %130, 0.000000e+00 ; [#uses=1]
- %or.cond = and i1 %133, %134 ; [#uses=1]
- br i1 %or.cond, label %bb8, label %bb3
-
-bb3: ; preds = %bb, %entry
- %135 = fmul float %28, %103 ; [#uses=1]
- %136 = fmul float %23, %104 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %18, %105 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fsub float %139, %110 ; [#uses=1]
- %141 = fsub float %140, %14 ; [#uses=1]
- %142 = fcmp ogt float %141, 0.000000e+00 ; [#uses=1]
- br i1 %142, label %bb4, label %bb7
-
-bb4: ; preds = %bb3
- %143 = fmul float %21, %104 ; [#uses=1]
- %144 = fmul float %26, %103 ; [#uses=1]
- %145 = fmul float %16, %105 ; [#uses=1]
- %146 = fadd float %144, %143 ; [#uses=1]
- %147 = fmul float %34, %104 ; [#uses=1]
- %148 = fmul float %37, %103 ; [#uses=1]
- %149 = fadd float %146, %145 ; [#uses=1]
- %150 = fmul float %31, %105 ; [#uses=1]
- %151 = fadd float %148, %147 ; [#uses=1]
- %152 = fsub float %149, %110 ; [#uses=1]
- %153 = fadd float %151, %150 ; [#uses=1]
- %154 = fsub float %152, %14 ; [#uses=1]
- %155 = fsub float %153, %110 ; [#uses=1]
- %156 = fsub float %155, %14 ; [#uses=1]
- %157 = fcmp ogt float %156, 0.000000e+00 ; [#uses=1]
- %158 = fcmp ogt float %154, 0.000000e+00 ; [#uses=1]
- %or.cond11 = and i1 %157, %158 ; [#uses=1]
- %159 = zext i1 %or.cond11 to i8 ; [#uses=1]
- %retval = xor i8 %159, 1 ; [#uses=1]
- ret i8 %retval
-
-bb7: ; preds = %bb3
- ret i8 1
-
-bb8: ; preds = %bb
- ret i8 0
-}
-
-; [#uses=2]
-define i32 @_ZN19btPrimitiveTriangle13clip_triangleERS_P9btVector3(%struct.btPrimitiveTriangle* %this, %struct.btPrimitiveTriangle* nocapture %other, %struct.btQuadWord* nocapture %clipped_points) nounwind align 2 {
-bb2:
- %temp_points = alloca [16 x %struct.btQuadWord], align 8 ; [#uses=1]
- %edgeplane = alloca %struct.btQuaternion, align 8 ; [#uses=7]
- %temp_points1 = alloca [16 x %struct.btQuadWord], align 8 ; [#uses=1]
- %0 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=3]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=3]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fmul float %9, %19 ; [#uses=1]
- %21 = fsub float %17, %20 ; [#uses=3]
- %22 = fmul float %4, %19 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=3]
- %24 = load float* %23, align 4 ; [#uses=2]
- %25 = fmul float %14, %24 ; [#uses=1]
- %26 = fsub float %22, %25 ; [#uses=3]
- %27 = fmul float %9, %24 ; [#uses=1]
- %28 = fmul float %4, %16 ; [#uses=1]
- %29 = fsub float %27, %28 ; [#uses=3]
- %30 = fmul float %29, %29 ; [#uses=1]
- %31 = fmul float %26, %26 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %21, %21 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=1]
- %35 = call float @sqrtf(float %34) nounwind readonly ; [#uses=1]
- %36 = fdiv float 1.000000e+00, %35 ; [#uses=3]
- %37 = fmul float %29, %36 ; [#uses=2]
- %38 = fmul float %26, %36 ; [#uses=2]
- %39 = fmul float %21, %36 ; [#uses=2]
- %40 = fmul float %11, %37 ; [#uses=1]
- %41 = fmul float %6, %38 ; [#uses=1]
- %42 = fadd float %40, %41 ; [#uses=1]
- %43 = fmul float %1, %39 ; [#uses=1]
- %44 = fadd float %42, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %37, float* %45, align 8
- %46 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %38, float* %46, align 4
- %47 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %39, float* %47, align 8
- %48 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- store float %44, float* %48, align 4
- %49 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 1 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = getelementptr inbounds [16 x %struct.btQuadWord]* %temp_points, i32 0, i32 0 ; [#uses=2]
- %53 = call i32 @_Z22bt_plane_clip_triangleRK9btVector4RK9btVector3S4_S4_PS2_(%struct.btQuaternion* %edgeplane, %struct.btQuadWord* %51, %struct.btQuadWord* %50, %struct.btQuadWord* %49, %struct.btQuadWord* %52) nounwind ; [#uses=2]
- %54 = icmp eq i32 %53, 0 ; [#uses=1]
- br i1 %54, label %bb10, label %bb7
-
-bb7: ; preds = %bb2
- %55 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %56 = load float* %55, align 4 ; [#uses=2]
- %57 = load float* %0, align 4 ; [#uses=1]
- %58 = fsub float %56, %57 ; [#uses=2]
- %59 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %60 = load float* %59, align 4 ; [#uses=2]
- %61 = load float* %5, align 4 ; [#uses=1]
- %62 = fsub float %60, %61 ; [#uses=2]
- %63 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %64 = load float* %63, align 4 ; [#uses=2]
- %65 = load float* %10, align 4 ; [#uses=1]
- %66 = fsub float %64, %65 ; [#uses=2]
- %67 = load float* %15, align 4 ; [#uses=2]
- %68 = fmul float %66, %67 ; [#uses=1]
- %69 = load float* %18, align 4 ; [#uses=2]
- %70 = fmul float %62, %69 ; [#uses=1]
- %71 = fsub float %68, %70 ; [#uses=3]
- %72 = fmul float %58, %69 ; [#uses=1]
- %73 = load float* %23, align 4 ; [#uses=2]
- %74 = fmul float %66, %73 ; [#uses=1]
- %75 = fsub float %72, %74 ; [#uses=3]
- %76 = fmul float %62, %73 ; [#uses=1]
- %77 = fmul float %58, %67 ; [#uses=1]
- %78 = fsub float %76, %77 ; [#uses=3]
- %79 = fmul float %78, %78 ; [#uses=1]
- %80 = fmul float %75, %75 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = fmul float %71, %71 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = call float @sqrtf(float %83) nounwind readonly ; [#uses=1]
- %85 = fdiv float 1.000000e+00, %84 ; [#uses=3]
- %86 = fmul float %78, %85 ; [#uses=2]
- %87 = fmul float %75, %85 ; [#uses=2]
- %88 = fmul float %71, %85 ; [#uses=2]
- %89 = fmul float %64, %86 ; [#uses=1]
- %90 = fmul float %60, %87 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %56, %88 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- store float %86, float* %45, align 8
- store float %87, float* %46, align 4
- store float %88, float* %47, align 8
- store float %93, float* %48, align 4
- %94 = getelementptr inbounds [16 x %struct.btQuadWord]* %temp_points1, i32 0, i32 0 ; [#uses=2]
- %95 = call i32 @_Z21bt_plane_clip_polygonRK9btVector4PK9btVector3iPS2_(%struct.btQuaternion* %edgeplane, %struct.btQuadWord* %52, i32 %53, %struct.btQuadWord* %94) nounwind ; [#uses=2]
- %96 = icmp eq i32 %95, 0 ; [#uses=1]
- br i1 %96, label %bb10, label %bb9
-
-bb9: ; preds = %bb7
- %97 = load float* %2, align 4 ; [#uses=2]
- %98 = load float* %55, align 4 ; [#uses=1]
- %99 = fsub float %97, %98 ; [#uses=2]
- %100 = load float* %7, align 4 ; [#uses=2]
- %101 = load float* %59, align 4 ; [#uses=1]
- %102 = fsub float %100, %101 ; [#uses=2]
- %103 = load float* %12, align 4 ; [#uses=2]
- %104 = load float* %63, align 4 ; [#uses=1]
- %105 = fsub float %103, %104 ; [#uses=2]
- %106 = load float* %15, align 4 ; [#uses=2]
- %107 = fmul float %105, %106 ; [#uses=1]
- %108 = load float* %18, align 4 ; [#uses=2]
- %109 = fmul float %102, %108 ; [#uses=1]
- %110 = fsub float %107, %109 ; [#uses=3]
- %111 = fmul float %99, %108 ; [#uses=1]
- %112 = load float* %23, align 4 ; [#uses=2]
- %113 = fmul float %105, %112 ; [#uses=1]
- %114 = fsub float %111, %113 ; [#uses=3]
- %115 = fmul float %102, %112 ; [#uses=1]
- %116 = fmul float %99, %106 ; [#uses=1]
- %117 = fsub float %115, %116 ; [#uses=3]
- %118 = fmul float %117, %117 ; [#uses=1]
- %119 = fmul float %114, %114 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %110, %110 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = call float @sqrtf(float %122) nounwind readonly ; [#uses=1]
- %124 = fdiv float 1.000000e+00, %123 ; [#uses=3]
- %125 = fmul float %117, %124 ; [#uses=2]
- %126 = fmul float %114, %124 ; [#uses=2]
- %127 = fmul float %110, %124 ; [#uses=2]
- %128 = fmul float %103, %125 ; [#uses=1]
- %129 = fmul float %100, %126 ; [#uses=1]
- %130 = fadd float %128, %129 ; [#uses=1]
- %131 = fmul float %97, %127 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- store float %125, float* %45, align 8
- store float %126, float* %46, align 4
- store float %127, float* %47, align 8
- store float %132, float* %48, align 4
- %133 = call i32 @_Z21bt_plane_clip_polygonRK9btVector4PK9btVector3iPS2_(%struct.btQuaternion* %edgeplane, %struct.btQuadWord* %94, i32 %95, %struct.btQuadWord* %clipped_points) nounwind ; [#uses=1]
- ret i32 %133
-
-bb10: ; preds = %bb7, %bb2
- ret i32 0
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN19btPrimitiveTriangle35find_triangle_collision_clip_methodERS_R20GIM_TRIANGLE_CONTACT(%struct.btPrimitiveTriangle* %this, %struct.btPrimitiveTriangle* %other, %struct.GIM_TRIANGLE_CONTACT* nocapture %contacts) nounwind align 2 {
-bb2:
- %clipped_points = alloca [16 x %struct.btQuadWord], align 8 ; [#uses=1]
- %contacts1 = alloca %struct.GIM_TRIANGLE_CONTACT, align 8 ; [#uses=12]
- %contacts2 = alloca %struct.GIM_TRIANGLE_CONTACT, align 8 ; [#uses=12]
- %0 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fadd float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 8
- %8 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=3]
- %12 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 8
- %14 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btPrimitiveTriangle* %this, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds [16 x %struct.btQuadWord]* %clipped_points, i32 0, i32 0 ; [#uses=4]
- %18 = call i32 @_ZN19btPrimitiveTriangle13clip_triangleERS_P9btVector3(%struct.btPrimitiveTriangle* %this, %struct.btPrimitiveTriangle* %other, %struct.btQuadWord* %17) nounwind ; [#uses=2]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- br i1 %19, label %bb14, label %bb4
-
-bb4: ; preds = %bb2
- %20 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20GIM_TRIANGLE_CONTACT12merge_pointsERK9btVector4fPK9btVector3i(%struct.GIM_TRIANGLE_CONTACT* %contacts1, %struct.btQuaternion* %20, float %4, %struct.btQuadWord* %17, i32 %18) nounwind
- %21 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 1 ; [#uses=1]
- %22 = load i32* %21, align 4 ; [#uses=4]
- %23 = icmp eq i32 %22, 0 ; [#uses=1]
- br i1 %23, label %bb14, label %bb6
-
-bb6: ; preds = %bb4
- %24 = load float* %5, align 8 ; [#uses=1]
- %25 = fmul float %24, -1.000000e+00 ; [#uses=2]
- store float %25, float* %5, align 8
- %26 = load float* %8, align 4 ; [#uses=1]
- %27 = fmul float %26, -1.000000e+00 ; [#uses=2]
- store float %27, float* %8, align 4
- %28 = load float* %11, align 8 ; [#uses=1]
- %29 = fmul float %28, -1.000000e+00 ; [#uses=2]
- store float %29, float* %11, align 8
- %30 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 8
- %33 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=2]
- %37 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 8
- %39 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=2]
- %40 = getelementptr inbounds %struct.btPrimitiveTriangle* %other, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = call i32 @_ZN19btPrimitiveTriangle13clip_triangleERS_P9btVector3(%struct.btPrimitiveTriangle* %other, %struct.btPrimitiveTriangle* %this, %struct.btQuadWord* %17) nounwind ; [#uses=2]
- %43 = icmp eq i32 %42, 0 ; [#uses=1]
- br i1 %43, label %bb14, label %bb8
-
-bb8: ; preds = %bb6
- %44 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20GIM_TRIANGLE_CONTACT12merge_pointsERK9btVector4fPK9btVector3i(%struct.GIM_TRIANGLE_CONTACT* %contacts2, %struct.btQuaternion* %44, float %4, %struct.btQuadWord* %17, i32 %42) nounwind
- %45 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 1 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=4]
- %47 = icmp eq i32 %46, 0 ; [#uses=1]
- br i1 %47, label %bb14, label %bb10
-
-bb10: ; preds = %bb8
- %48 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %48, align 8 ; [#uses=2]
- %50 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 8 ; [#uses=2]
- %52 = fcmp olt float %49, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 0 ; [#uses=2]
- br i1 %52, label %bb.nph.i23, label %bb.nph.i
-
-bb.nph.i23: ; preds = %bb10
- store float %49, float* %53, align 4
- %54 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %30, align 8 ; [#uses=1]
- store float %55, float* %54, align 4
- %56 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %33, align 4 ; [#uses=1]
- store float %57, float* %56, align 4
- %58 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %36, align 8 ; [#uses=1]
- store float %59, float* %58, align 4
- %60 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %39, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %62 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 1 ; [#uses=1]
- store i32 %46, i32* %62, align 4
- %tmp54 = shl i32 %46, 2 ; [#uses=4]
- %tmp5566 = or i32 %tmp54, 3 ; [#uses=1]
- %tmp5767 = or i32 %tmp54, 2 ; [#uses=1]
- %tmp5968 = or i32 %tmp54, 1 ; [#uses=1]
- br label %bb.i40
-
-bb.i40: ; preds = %bb.i40, %bb.nph.i23
- %indvar.i24 = phi i32 [ 0, %bb.nph.i23 ], [ %indvar.next.i38, %bb.i40 ] ; [#uses=2]
- %tmp53 = mul i32 %indvar.i24, -4 ; [#uses=4]
- %tmp56 = add i32 %tmp5566, %tmp53 ; [#uses=2]
- %scevgep17.i37 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 %tmp56 ; [#uses=1]
- %scevgep16.i36 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp56 ; [#uses=1]
- %tmp58 = add i32 %tmp5767, %tmp53 ; [#uses=2]
- %scevgep13.i34 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 %tmp58 ; [#uses=1]
- %scevgep12.i33 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp58 ; [#uses=1]
- %tmp60 = add i32 %tmp5968, %tmp53 ; [#uses=2]
- %scevgep9.i31 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 %tmp60 ; [#uses=1]
- %scevgep8.i30 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp60 ; [#uses=1]
- %tmp61 = add i32 %tmp54, %tmp53 ; [#uses=2]
- %scevgep5.i28 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts2, i32 0, i32 2, i32 0, i32 0, i32 %tmp61 ; [#uses=1]
- %scevgep.i27 = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp61 ; [#uses=1]
- %63 = load float* %scevgep5.i28, align 8 ; [#uses=1]
- store float %63, float* %scevgep.i27, align 4
- %64 = load float* %scevgep9.i31, align 4 ; [#uses=1]
- store float %64, float* %scevgep8.i30, align 4
- %65 = load float* %scevgep13.i34, align 8 ; [#uses=1]
- store float %65, float* %scevgep12.i33, align 4
- %66 = load float* %scevgep17.i37, align 4 ; [#uses=1]
- store float %66, float* %scevgep16.i36, align 4
- %indvar.next.i38 = add i32 %indvar.i24, 1 ; [#uses=2]
- %exitcond52 = icmp eq i32 %indvar.next.i38, %46 ; [#uses=1]
- br i1 %exitcond52, label %_ZN20GIM_TRIANGLE_CONTACT9copy_fromERKS_.exit41, label %bb.i40
-
-_ZN20GIM_TRIANGLE_CONTACT9copy_fromERKS_.exit41: ; preds = %bb.i, %bb.i40
- ret i8 1
-
-bb.nph.i: ; preds = %bb10
- store float %51, float* %53, align 4
- %67 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %25, float* %67, align 4
- %68 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %27, float* %68, align 4
- %69 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %29, float* %69, align 4
- %70 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %71 = load float* %14, align 4 ; [#uses=1]
- store float %71, float* %70, align 4
- %72 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 1 ; [#uses=1]
- store i32 %22, i32* %72, align 4
- %tmp44 = shl i32 %22, 2 ; [#uses=4]
- %tmp4563 = or i32 %tmp44, 3 ; [#uses=1]
- %tmp4764 = or i32 %tmp44, 2 ; [#uses=1]
- %tmp4965 = or i32 %tmp44, 1 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb.i ] ; [#uses=2]
- %tmp = mul i32 %indvar.i, -4 ; [#uses=4]
- %tmp46 = add i32 %tmp4563, %tmp ; [#uses=2]
- %scevgep17.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 %tmp46 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp46 ; [#uses=1]
- %tmp48 = add i32 %tmp4764, %tmp ; [#uses=2]
- %scevgep13.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 %tmp48 ; [#uses=1]
- %scevgep12.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp48 ; [#uses=1]
- %tmp50 = add i32 %tmp4965, %tmp ; [#uses=2]
- %scevgep9.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 %tmp50 ; [#uses=1]
- %scevgep8.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp50 ; [#uses=1]
- %tmp51 = add i32 %tmp44, %tmp ; [#uses=2]
- %scevgep5.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts1, i32 0, i32 2, i32 0, i32 0, i32 %tmp51 ; [#uses=1]
- %scevgep.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 %tmp51 ; [#uses=1]
- %73 = load float* %scevgep5.i, align 8 ; [#uses=1]
- store float %73, float* %scevgep.i, align 4
- %74 = load float* %scevgep9.i, align 4 ; [#uses=1]
- store float %74, float* %scevgep8.i, align 4
- %75 = load float* %scevgep13.i, align 8 ; [#uses=1]
- store float %75, float* %scevgep12.i, align 4
- %76 = load float* %scevgep17.i, align 4 ; [#uses=1]
- store float %76, float* %scevgep16.i, align 4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %22 ; [#uses=1]
- br i1 %exitcond, label %_ZN20GIM_TRIANGLE_CONTACT9copy_fromERKS_.exit41, label %bb.i
-
-bb14: ; preds = %bb8, %bb6, %bb4, %bb2
- ret i8 0
-}
-
-; [#uses=1]
-define i32 @_ZN12GIM_BOX_TREE20_calc_splitting_axisER9gim_arrayI13GIM_AABB_DATAEjj(%struct.GIM_BOX_TREE* nocapture %this, %"struct.gim_array<GIM_AABB_DATA>"* nocapture %primitive_boxes, i32 %startIndex, i32 %endIndex) nounwind readonly align 2 {
-entry:
- %0 = sub i32 %endIndex, %startIndex ; [#uses=4]
- %1 = icmp ult i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %1, label %bb.nph45, label %bb2.thread
-
-bb2.thread: ; preds = %entry
- %2 = uitofp i32 %0 to float ; [#uses=1]
- br label %bb6
-
-bb.nph45: ; preds = %entry
- %3 = getelementptr inbounds %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.GIM_AABB_DATA** %3, align 4 ; [#uses=6]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph45
- %indvar61 = phi i32 [ 0, %bb.nph45 ], [ %indvar.next62, %bb ] ; [#uses=2]
- %means.0.2.043 = phi float [ 0.000000e+00, %bb.nph45 ], [ %19, %bb ] ; [#uses=1]
- %means.0.1.042 = phi float [ 0.000000e+00, %bb.nph45 ], [ %18, %bb ] ; [#uses=1]
- %means.0.0.041 = phi float [ 0.000000e+00, %bb.nph45 ], [ %17, %bb ] ; [#uses=1]
- %tmp65 = add i32 %indvar61, %startIndex ; [#uses=6]
- %scevgep66 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep67 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep68 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep69 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep70 = getelementptr %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep7172 = getelementptr inbounds %struct.GIM_AABB_DATA* %4, i32 %tmp65, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %scevgep66, align 4 ; [#uses=1]
- %6 = load float* %scevgep67, align 4 ; [#uses=1]
- %7 = fadd float %5, %6 ; [#uses=1]
- %8 = load float* %scevgep68, align 4 ; [#uses=1]
- %9 = load float* %scevgep69, align 4 ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = load float* %scevgep70, align 4 ; [#uses=1]
- %12 = load float* %scevgep7172, align 4 ; [#uses=1]
- %13 = fadd float %11, %12 ; [#uses=1]
- %14 = fmul float %7, 5.000000e-01 ; [#uses=1]
- %15 = fmul float %10, 5.000000e-01 ; [#uses=1]
- %16 = fmul float %13, 5.000000e-01 ; [#uses=1]
- %17 = fadd float %means.0.0.041, %16 ; [#uses=2]
- %18 = fadd float %means.0.1.042, %15 ; [#uses=2]
- %19 = fadd float %means.0.2.043, %14 ; [#uses=2]
- %indvar.next62 = add i32 %indvar61, 1 ; [#uses=2]
- %exitcond64 = icmp eq i32 %indvar.next62, %0 ; [#uses=1]
- br i1 %exitcond64, label %bb2, label %bb
-
-bb2: ; preds = %bb
- %20 = uitofp i32 %0 to float ; [#uses=3]
- %21 = fdiv float 1.000000e+00, %20 ; [#uses=3]
- %22 = fmul float %17, %21 ; [#uses=1]
- %23 = fmul float %18, %21 ; [#uses=1]
- %24 = fmul float %19, %21 ; [#uses=1]
- br i1 %1, label %bb.nph, label %bb6
-
-bb.nph: ; preds = %bb2
- %25 = getelementptr inbounds %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 0 ; [#uses=1]
- %26 = load %struct.GIM_AABB_DATA** %25, align 4 ; [#uses=6]
- br label %bb3
-
-bb3: ; preds = %bb3, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb3 ] ; [#uses=2]
- %variance.0.2.037 = phi float [ 0.000000e+00, %bb.nph ], [ %47, %bb3 ] ; [#uses=1]
- %variance.0.1.036 = phi float [ 0.000000e+00, %bb.nph ], [ %46, %bb3 ] ; [#uses=1]
- %variance.0.0.035 = phi float [ 0.000000e+00, %bb.nph ], [ %45, %bb3 ] ; [#uses=1]
- %tmp51 = add i32 %indvar, %startIndex ; [#uses=6]
- %scevgep = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep52 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep53 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep54 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep55 = getelementptr %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep5657 = getelementptr inbounds %struct.GIM_AABB_DATA* %26, i32 %tmp51, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %scevgep, align 4 ; [#uses=1]
- %28 = load float* %scevgep52, align 4 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = load float* %scevgep53, align 4 ; [#uses=1]
- %31 = load float* %scevgep54, align 4 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = load float* %scevgep55, align 4 ; [#uses=1]
- %34 = load float* %scevgep5657, align 4 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fmul float %29, 5.000000e-01 ; [#uses=1]
- %37 = fmul float %32, 5.000000e-01 ; [#uses=1]
- %38 = fmul float %35, 5.000000e-01 ; [#uses=1]
- %39 = fsub float %36, %24 ; [#uses=2]
- %40 = fsub float %37, %23 ; [#uses=2]
- %41 = fsub float %38, %22 ; [#uses=2]
- %42 = fmul float %39, %39 ; [#uses=1]
- %43 = fmul float %40, %40 ; [#uses=1]
- %44 = fmul float %41, %41 ; [#uses=1]
- %45 = fadd float %variance.0.0.035, %44 ; [#uses=2]
- %46 = fadd float %variance.0.1.036, %43 ; [#uses=2]
- %47 = fadd float %variance.0.2.037, %42 ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb6, label %bb3
-
-bb6: ; preds = %bb3, %bb2, %bb2.thread
- %48 = phi float [ %20, %bb2 ], [ %2, %bb2.thread ], [ %20, %bb3 ] ; [#uses=1]
- %variance.0.2.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %47, %bb3 ] ; [#uses=1]
- %variance.0.1.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %46, %bb3 ] ; [#uses=1]
- %variance.0.0.0.lcssa = phi float [ 0.000000e+00, %bb2 ], [ 0.000000e+00, %bb2.thread ], [ %45, %bb3 ] ; [#uses=1]
- %49 = fadd float %48, -1.000000e+00 ; [#uses=1]
- %50 = fdiv float 1.000000e+00, %49 ; [#uses=3]
- %51 = fmul float %variance.0.0.0.lcssa, %50 ; [#uses=2]
- %52 = fmul float %variance.0.1.0.lcssa, %50 ; [#uses=2]
- %53 = fmul float %variance.0.2.0.lcssa, %50 ; [#uses=2]
- %54 = fcmp olt float %51, %52 ; [#uses=1]
- br i1 %54, label %bb.i, label %bb4.i
-
-bb.i: ; preds = %bb6
- %55 = fcmp olt float %52, %53 ; [#uses=1]
- %iftmp.30.0.i = select i1 %55, i32 2, i32 1 ; [#uses=1]
- ret i32 %iftmp.30.0.i
-
-bb4.i: ; preds = %bb6
- %56 = fcmp olt float %51, %53 ; [#uses=1]
- %iftmp.31.0.i = select i1 %56, i32 2, i32 0 ; [#uses=1]
- ret i32 %iftmp.31.0.i
-}
-
-; [#uses=1]
-define i32 @_ZN12GIM_BOX_TREE30_sort_and_calc_splitting_indexER9gim_arrayI13GIM_AABB_DATAEjjj(%struct.GIM_BOX_TREE* nocapture %this, %"struct.gim_array<GIM_AABB_DATA>"* nocapture %primitive_boxes, i32 %startIndex, i32 %endIndex, i32 %splitAxis) nounwind align 2 {
-entry:
- %0 = sub i32 %endIndex, %startIndex ; [#uses=5]
- %1 = icmp ult i32 %startIndex, %endIndex ; [#uses=2]
- br i1 %1, label %bb.nph19, label %bb7
-
-bb.nph19: ; preds = %entry
- %2 = getelementptr inbounds %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 0 ; [#uses=1]
- %3 = load %struct.GIM_AABB_DATA** %2, align 4 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph19
- %indvar35 = phi i32 [ 0, %bb.nph19 ], [ %indvar.next36, %bb ] ; [#uses=2]
- %splitValue.018 = phi float [ 0.000000e+00, %bb.nph19 ], [ %8, %bb ] ; [#uses=1]
- %tmp39 = add i32 %indvar35, %startIndex ; [#uses=2]
- %scevgep40 = getelementptr %struct.GIM_AABB_DATA* %3, i32 %tmp39, i32 0, i32 1, i32 0, i32 %splitAxis ; [#uses=1]
- %scevgep41 = getelementptr %struct.GIM_AABB_DATA* %3, i32 %tmp39, i32 0, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- %4 = load float* %scevgep40, align 4 ; [#uses=1]
- %5 = load float* %scevgep41, align 4 ; [#uses=1]
- %6 = fadd float %4, %5 ; [#uses=1]
- %7 = fmul float %6, 5.000000e-01 ; [#uses=1]
- %8 = fadd float %7, %splitValue.018 ; [#uses=2]
- %indvar.next36 = add i32 %indvar35, 1 ; [#uses=2]
- %exitcond38 = icmp eq i32 %indvar.next36, %0 ; [#uses=1]
- br i1 %exitcond38, label %bb2, label %bb
-
-bb2: ; preds = %bb
- %9 = uitofp i32 %0 to float ; [#uses=1]
- %10 = fdiv float %8, %9 ; [#uses=1]
- br i1 %1, label %bb.nph, label %bb7
-
-bb.nph: ; preds = %bb2
- %11 = getelementptr inbounds %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 0 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb5, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb5 ] ; [#uses=2]
- %splitIndex.116 = phi i32 [ %startIndex, %bb.nph ], [ %splitIndex.0, %bb5 ] ; [#uses=12]
- %tmp21 = add i32 %indvar, %startIndex ; [#uses=12]
- %12 = load %struct.GIM_AABB_DATA** %11, align 4 ; [#uses=22]
- %scevgep33 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 1, i32 0, i32 %splitAxis ; [#uses=1]
- %13 = load float* %scevgep33, align 4 ; [#uses=1]
- %scevgep34 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 0, i32 0, i32 %splitAxis ; [#uses=1]
- %14 = load float* %scevgep34, align 4 ; [#uses=1]
- %15 = fadd float %13, %14 ; [#uses=1]
- %16 = fmul float %15, 5.000000e-01 ; [#uses=1]
- %17 = fcmp ogt float %16, %10 ; [#uses=1]
- br i1 %17, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %scevgep22 = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %scevgep22, align 4 ; [#uses=1]
- %scevgep23 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %scevgep23, align 4 ; [#uses=1]
- %scevgep24 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %scevgep24, align 4 ; [#uses=1]
- %scevgep25 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %21 = load float* %scevgep25, align 4 ; [#uses=1]
- %scevgep26 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %scevgep26, align 4 ; [#uses=1]
- %scevgep27 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %scevgep27, align 4 ; [#uses=1]
- %scevgep28 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %scevgep28, align 4 ; [#uses=1]
- %scevgep29 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %scevgep29, align 4 ; [#uses=1]
- %scevgep30 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21, i32 1 ; [#uses=1]
- %26 = load i32* %scevgep30, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116 ; [#uses=1]
- %28 = bitcast %struct.GIM_AABB_DATA* %27 to i8* ; [#uses=1]
- %scevgep31 = getelementptr %struct.GIM_AABB_DATA* %12, i32 %tmp21 ; [#uses=1]
- %scevgep3132 = bitcast %struct.GIM_AABB_DATA* %scevgep31 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep3132, i8* %28, i32 36, i32 4, i1 false) nounwind
- %.020.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %.020.i.i, align 4
- %.122.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %.122.i.i, align 4
- %.2.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %.2.i.i, align 4
- %.3.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %21, float* %.3.i.i, align 4
- %.1813.0.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %.1813.0.i.i, align 4
- %.1813.1.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %23, float* %.1813.1.i.i, align 4
- %.1813.2.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %24, float* %.1813.2.i.i, align 4
- %.1813.3.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %25, float* %.1813.3.i.i, align 4
- %.1.i.i = getelementptr inbounds %struct.GIM_AABB_DATA* %12, i32 %splitIndex.116, i32 1 ; [#uses=1]
- store i32 %26, i32* %.1.i.i, align 4
- %29 = add i32 %splitIndex.116, 1 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %splitIndex.0 = phi i32 [ %29, %bb4 ], [ %splitIndex.116, %bb3 ] ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %0 ; [#uses=1]
- br i1 %exitcond, label %bb7, label %bb3
-
-bb7: ; preds = %bb5, %bb2, %entry
- %splitIndex.1.lcssa = phi i32 [ %startIndex, %bb2 ], [ %splitIndex.0, %bb5 ], [ %startIndex, %entry ] ; [#uses=3]
- %30 = udiv i32 %0, 3 ; [#uses=2]
- %31 = add i32 %30, %startIndex ; [#uses=1]
- %32 = icmp ult i32 %31, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %32, label %bb8, label %bb12
-
-bb8: ; preds = %bb7
- %33 = add i32 %endIndex, -1 ; [#uses=1]
- %34 = sub i32 %33, %30 ; [#uses=1]
- %35 = icmp ugt i32 %34, %splitIndex.1.lcssa ; [#uses=1]
- br i1 %35, label %bb10, label %bb12
-
-bb10: ; preds = %bb8
- ret i32 %splitIndex.1.lcssa
-
-bb12: ; preds = %bb8, %bb7
- %36 = lshr i32 %0, 1 ; [#uses=1]
- %37 = add i32 %36, %startIndex ; [#uses=1]
- ret i32 %37
-}
-
-; [#uses=3]
-define void @_ZN12GIM_BOX_TREE15_build_sub_treeER9gim_arrayI13GIM_AABB_DATAEjj(%struct.GIM_BOX_TREE* %this, %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 %startIndex, i32 %endIndex) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.GIM_BOX_TREE* %this, i32 0, i32 0 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=30]
- %2 = add i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* %0, align 4
- %3 = sub i32 %endIndex, %startIndex ; [#uses=2]
- %4 = icmp eq i32 %3, 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.GIM_BOX_TREE* %this, i32 0, i32 1, i32 0 ; [#uses=9]
- %6 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=7]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %6, i32 %1, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %8, i32 %1, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %10, i32 %1, i32 3 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=8]
- %13 = getelementptr inbounds %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 0 ; [#uses=2]
- %14 = load %struct.GIM_AABB_DATA** %13, align 4 ; [#uses=8]
- %15 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %12, i32 %1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.GIM_AABB_DATA* %14, i32 %startIndex, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=1]
- %40 = load %struct.GIM_AABB_DATA** %13, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.GIM_AABB_DATA* %40, i32 %startIndex, i32 1 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %39, i32 %1, i32 4 ; [#uses=1]
- store i32 %42, i32* %43, align 4
- ret void
-
-bb1: ; preds = %entry
- %44 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %6, i32 %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %44, align 4
- %45 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %6, i32 %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %45, align 4
- %46 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %6, i32 %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %46, align 4
- %47 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %6, i32 %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %47, align 4
- %48 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %6, i32 %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %48, align 4
- %49 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %6, i32 %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %49, align 4
- %50 = icmp ult i32 %startIndex, %endIndex ; [#uses=1]
- br i1 %50, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %bb1
- %51 = getelementptr inbounds %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb2 ] ; [#uses=2]
- %tmp7 = add i32 %indvar, %startIndex ; [#uses=7]
- %52 = load %struct.GIM_AABB_DATA** %51, align 4 ; [#uses=7]
- %53 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=7]
- %54 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %53, i32 %1, i32 0 ; [#uses=6]
- %55 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %53, i32 %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %56 = load float* %55, align 4 ; [#uses=1]
- %scevgep1920 = getelementptr inbounds %struct.GIM_AABB_DATA* %52, i32 %tmp7, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %scevgep1920, align 4 ; [#uses=1]
- %58 = fcmp ogt float %56, %57 ; [#uses=1]
- %scevgep1718 = getelementptr inbounds %struct.GIM_AABB_DATA* %52, i32 %tmp7, i32 0 ; [#uses=6]
- %box.pn25.i = select i1 %58, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %54 ; [#uses=1]
- %iftmp.151.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn25.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %iftmp.151.0.i = load float* %iftmp.151.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.151.0.i, float* %55, align 4
- %59 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %53, i32 %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %60 = load float* %59, align 4 ; [#uses=1]
- %scevgep21 = getelementptr %struct.GIM_AABB_DATA* %52, i32 %tmp7, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %scevgep21, align 4 ; [#uses=1]
- %62 = fcmp ogt float %60, %61 ; [#uses=1]
- %box.pn24.i = select i1 %62, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %54 ; [#uses=1]
- %iftmp.152.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn24.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %iftmp.152.0.i = load float* %iftmp.152.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.152.0.i, float* %59, align 4
- %63 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %53, i32 %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %64 = load float* %63, align 4 ; [#uses=1]
- %scevgep22 = getelementptr %struct.GIM_AABB_DATA* %52, i32 %tmp7, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %scevgep22, align 4 ; [#uses=1]
- %66 = fcmp ogt float %64, %65 ; [#uses=1]
- %box.pn23.i = select i1 %66, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %54 ; [#uses=1]
- %iftmp.153.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn23.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %iftmp.153.0.i = load float* %iftmp.153.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.153.0.i, float* %63, align 4
- %67 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %53, i32 %1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %68 = load float* %67, align 4 ; [#uses=1]
- %scevgep23 = getelementptr %struct.GIM_AABB_DATA* %52, i32 %tmp7, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %69 = load float* %scevgep23, align 4 ; [#uses=1]
- %70 = fcmp olt float %68, %69 ; [#uses=1]
- %box.pn22.i = select i1 %70, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %54 ; [#uses=1]
- %iftmp.154.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn22.i, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %iftmp.154.0.i = load float* %iftmp.154.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.154.0.i, float* %67, align 4
- %71 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %53, i32 %1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %72 = load float* %71, align 4 ; [#uses=1]
- %scevgep24 = getelementptr %struct.GIM_AABB_DATA* %52, i32 %tmp7, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %scevgep24, align 4 ; [#uses=1]
- %74 = fcmp olt float %72, %73 ; [#uses=1]
- %box.pn21.i = select i1 %74, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %54 ; [#uses=1]
- %iftmp.155.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn21.i, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %iftmp.155.0.i = load float* %iftmp.155.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.155.0.i, float* %71, align 4
- %75 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %53, i32 %1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %76 = load float* %75, align 4 ; [#uses=1]
- %scevgep25 = getelementptr %struct.GIM_AABB_DATA* %52, i32 %tmp7, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %77 = load float* %scevgep25, align 4 ; [#uses=1]
- %78 = fcmp olt float %76, %77 ; [#uses=1]
- %box.pn.i = select i1 %78, %struct.GIM_AABB* %scevgep1718, %struct.GIM_AABB* %54 ; [#uses=1]
- %iftmp.156.0.in.i = getelementptr inbounds %struct.GIM_AABB* %box.pn.i, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %iftmp.156.0.i = load float* %iftmp.156.0.in.i, align 4 ; [#uses=1]
- store float %iftmp.156.0.i, float* %75, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %bb2, %bb1
- %79 = tail call i32 @_ZN12GIM_BOX_TREE20_calc_splitting_axisER9gim_arrayI13GIM_AABB_DATAEjj(%struct.GIM_BOX_TREE* %this, %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 %startIndex, i32 %endIndex) ; [#uses=1]
- %80 = tail call i32 @_ZN12GIM_BOX_TREE30_sort_and_calc_splitting_indexER9gim_arrayI13GIM_AABB_DATAEjjj(%struct.GIM_BOX_TREE* %this, %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 %startIndex, i32 %endIndex, i32 %79) ; [#uses=2]
- %81 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=1]
- %82 = load i32* %0, align 4 ; [#uses=1]
- %83 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %81, i32 %1, i32 1 ; [#uses=1]
- store i32 %82, i32* %83, align 4
- tail call void @_ZN12GIM_BOX_TREE15_build_sub_treeER9gim_arrayI13GIM_AABB_DATAEjj(%struct.GIM_BOX_TREE* %this, %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 %startIndex, i32 %80)
- %84 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=1]
- %85 = load i32* %0, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %84, i32 %1, i32 2 ; [#uses=1]
- store i32 %85, i32* %86, align 4
- tail call void @_ZN12GIM_BOX_TREE15_build_sub_treeER9gim_arrayI13GIM_AABB_DATAEjj(%struct.GIM_BOX_TREE* %this, %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 %80, i32 %endIndex)
- %87 = load %struct.GIM_BOX_TREE_NODE** %5, align 4 ; [#uses=1]
- %88 = load i32* %0, align 4 ; [#uses=1]
- %89 = sub i32 %88, %1 ; [#uses=1]
- %90 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %87, i32 %1, i32 3 ; [#uses=1]
- store i32 %89, i32* %90, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN9gim_arrayI17GIM_BOX_TREE_NODEE6resizeEjb(%"struct.gim_array<GIM_BOX_TREE_NODE>"* nocapture %this, i32 %size, i8 zeroext %call_constructor) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.gim_array<GIM_BOX_TREE_NODE>"* %this, i32 0, i32 1 ; [#uses=7]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp ult i32 %1, %size ; [#uses=1]
- br i1 %2, label %bb, label %bb6
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %"struct.gim_array<GIM_BOX_TREE_NODE>"* %this, i32 0, i32 2 ; [#uses=3]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = icmp ult i32 %4, %size ; [#uses=1]
- br i1 %5, label %bb1.i, label %_ZN9gim_arrayI17GIM_BOX_TREE_NODEE7reserveEj.exit
-
-bb1.i: ; preds = %bb
- %6 = icmp eq i32 %size, 0 ; [#uses=1]
- br i1 %6, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb1.i
- store i32 0, i32* %3, align 4
- %7 = getelementptr inbounds %"struct.gim_array<GIM_BOX_TREE_NODE>"* %this, i32 0, i32 0 ; [#uses=2]
- %8 = load %struct.GIM_BOX_TREE_NODE** %7, align 4 ; [#uses=2]
- %9 = icmp eq %struct.GIM_BOX_TREE_NODE* %8, null ; [#uses=1]
- br i1 %9, label %_ZN9gim_arrayI17GIM_BOX_TREE_NODEE7reserveEj.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb.i.i
- %10 = bitcast %struct.GIM_BOX_TREE_NODE* %8 to i8* ; [#uses=1]
- tail call void @_Z8gim_freePv(i8* %10)
- store %struct.GIM_BOX_TREE_NODE* null, %struct.GIM_BOX_TREE_NODE** %7, align 4
- br label %_ZN9gim_arrayI17GIM_BOX_TREE_NODEE7reserveEj.exit
-
-bb1.i.i: ; preds = %bb1.i
- %11 = icmp eq i32 %1, 0 ; [#uses=1]
- %12 = mul i32 %size, 48 ; [#uses=2]
- br i1 %11, label %bb3.i.i, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i
- %13 = mul i32 %1, 48 ; [#uses=1]
- %14 = getelementptr inbounds %"struct.gim_array<GIM_BOX_TREE_NODE>"* %this, i32 0, i32 0 ; [#uses=2]
- %15 = load %struct.GIM_BOX_TREE_NODE** %14, align 4 ; [#uses=1]
- %16 = bitcast %struct.GIM_BOX_TREE_NODE* %15 to i8* ; [#uses=1]
- %17 = tail call i8* @_Z11gim_reallocPvjj(i8* %16, i32 %13, i32 %12) ; [#uses=1]
- %18 = bitcast i8* %17 to %struct.GIM_BOX_TREE_NODE* ; [#uses=1]
- store %struct.GIM_BOX_TREE_NODE* %18, %struct.GIM_BOX_TREE_NODE** %14, align 4
- br label %bb4.i.i
-
-bb3.i.i: ; preds = %bb1.i.i
- %19 = tail call i8* @_Z9gim_allocj(i32 %12) ; [#uses=1]
- %20 = bitcast i8* %19 to %struct.GIM_BOX_TREE_NODE* ; [#uses=1]
- %21 = getelementptr inbounds %"struct.gim_array<GIM_BOX_TREE_NODE>"* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.GIM_BOX_TREE_NODE* %20, %struct.GIM_BOX_TREE_NODE** %21, align 4
- br label %bb4.i.i
-
-bb4.i.i: ; preds = %bb3.i.i, %bb2.i.i
- store i32 %size, i32* %3, align 4
- br label %_ZN9gim_arrayI17GIM_BOX_TREE_NODEE7reserveEj.exit
-
-_ZN9gim_arrayI17GIM_BOX_TREE_NODEE7reserveEj.exit: ; preds = %bb4.i.i, %bb.i.i.i, %bb.i.i, %bb
- %toBool = icmp eq i8 %call_constructor, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb4.preheader
-
-bb4.preheader: ; preds = %_ZN9gim_arrayI17GIM_BOX_TREE_NODEE7reserveEj.exit
- %22 = load i32* %0, align 4 ; [#uses=2]
- %23 = icmp ult i32 %22, %size ; [#uses=1]
- br i1 %23, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb4.preheader
- %24 = getelementptr inbounds %"struct.gim_array<GIM_BOX_TREE_NODE>"* %this, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph
- %25 = phi i32 [ %22, %bb.nph ], [ %28, %bb2 ] ; [#uses=4]
- %26 = load %struct.GIM_BOX_TREE_NODE** %24, align 4 ; [#uses=4]
- %.1 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %26, i32 %25, i32 1 ; [#uses=1]
- store i32 0, i32* %.1, align 4
- %.2 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %26, i32 %25, i32 2 ; [#uses=1]
- store i32 0, i32* %.2, align 4
- %.3 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %26, i32 %25, i32 3 ; [#uses=1]
- store i32 0, i32* %.3, align 4
- %.4 = getelementptr inbounds %struct.GIM_BOX_TREE_NODE* %26, i32 %25, i32 4 ; [#uses=1]
- store i32 0, i32* %.4, align 4
- %27 = load i32* %0, align 4 ; [#uses=1]
- %28 = add i32 %27, 1 ; [#uses=3]
- store i32 %28, i32* %0, align 4
- %29 = icmp ult i32 %28, %size ; [#uses=1]
- br i1 %29, label %bb2, label %return
-
-bb5: ; preds = %_ZN9gim_arrayI17GIM_BOX_TREE_NODEE7reserveEj.exit
- store i32 %size, i32* %0, align 4
- ret void
-
-bb6: ; preds = %entry
- %30 = icmp ugt i32 %1, %size ; [#uses=1]
- br i1 %30, label %bb7, label %return
-
-bb7: ; preds = %bb6
- %toBool8 = icmp eq i8 %call_constructor, 0 ; [#uses=1]
- br i1 %toBool8, label %bb10, label %bb.nph.i
-
-bb.nph.i: ; preds = %bb7
- %tmp.i = sub i32 0, %1 ; [#uses=2]
- %tmp3.i = xor i32 %size, -1 ; [#uses=2]
- %tmp4.i = icmp ugt i32 %tmp.i, %tmp3.i ; [#uses=1]
- %umax.i = select i1 %tmp4.i, i32 %tmp.i, i32 %tmp3.i ; [#uses=1]
- %tmp5.i = xor i32 %umax.i, -1 ; [#uses=1]
- store i32 %tmp5.i, i32* %0, align 4
- br label %bb10
-
-bb10: ; preds = %bb.nph.i, %bb7
- store i32 %size, i32* %0, align 4
- ret void
-
-return: ; preds = %bb6, %bb2, %bb4.preheader
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12GIM_BOX_TREE10build_treeER9gim_arrayI13GIM_AABB_DATAE(%struct.GIM_BOX_TREE* %this, %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.GIM_BOX_TREE* %this, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %0, align 4
- %1 = getelementptr inbounds %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 1 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = shl i32 %2, 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.GIM_BOX_TREE* %this, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN9gim_arrayI17GIM_BOX_TREE_NODEE6resizeEjb(%"struct.gim_array<GIM_BOX_TREE_NODE>"* %4, i32 %3, i8 zeroext 1)
- %5 = load i32* %1, align 4 ; [#uses=1]
- tail call void @_ZN12GIM_BOX_TREE15_build_sub_treeER9gim_arrayI13GIM_AABB_DATAEjj(%struct.GIM_BOX_TREE* %this, %"struct.gim_array<GIM_AABB_DATA>"* %primitive_boxes, i32 0, i32 %5)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17gim_contact_array14merge_contactsERKS_b(%struct.gim_contact_array* nocapture %this, %struct.gim_contact_array* nocapture %contacts, i8 zeroext %normal_contact_average) align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %coincident_normals = alloca [8 x %struct.btQuadWord], align 8 ; [#uses=7]
- %1 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 1 ; [#uses=16]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit, label %bb.nph.i.i
-
-bb.nph.i.i: ; preds = %entry
- store i32 0, i32* %1, align 4
- br label %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit
-
-_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit: ; preds = %bb.nph.i.i, %entry
- %4 = getelementptr inbounds %struct.gim_contact_array* %contacts, i32 0, i32 0, i32 1 ; [#uses=4]
- %5 = load i32* %4, align 4 ; [#uses=4]
- switch i32 %5, label %_ZN9gim_arrayI15GIM_RSORT_TOKENEC1Ej.exit [
- i32 1, label %bb
- i32 0, label %bb9
- ]
-
-bb: ; preds = %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit
- %6 = getelementptr inbounds %struct.gim_contact_array* %contacts, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load %struct.GIM_CONTACT** %6, align 4 ; [#uses=1]
- %8 = add i32 %5, -1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.GIM_CONTACT* %7, i32 %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 2 ; [#uses=2]
- %11 = load i32* %10, align 4 ; [#uses=2]
- %12 = icmp ugt i32 %11, 0 ; [#uses=1]
- br i1 %12, label %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i56, label %bb1.i.i.i60
-
-entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i56: ; preds = %bb
- %.phi.trans.insert.i54 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre.i55 = load %struct.GIM_CONTACT** %.phi.trans.insert.i54, align 4 ; [#uses=1]
- br label %_ZN9gim_arrayI11GIM_CONTACTE9push_backERKS0_.exit64
-
-bb1.i.i.i60: ; preds = %bb
- store i32 %11, i32* %1, align 4
- %13 = call i8* @_Z9gim_allocj(i32 192) ; [#uses=1]
- %14 = bitcast i8* %13 to %struct.GIM_CONTACT* ; [#uses=2]
- %15 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store %struct.GIM_CONTACT* %14, %struct.GIM_CONTACT** %15, align 4
- store i32 4, i32* %10, align 4
- br label %_ZN9gim_arrayI11GIM_CONTACTE9push_backERKS0_.exit64
-
-_ZN9gim_arrayI11GIM_CONTACTE9push_backERKS0_.exit64: ; preds = %bb1.i.i.i60, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i56
- %16 = phi %struct.GIM_CONTACT* [ %.pre.i55, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i56 ], [ %14, %bb1.i.i.i60 ] ; [#uses=1]
- %17 = load i32* %1, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.GIM_CONTACT* %16, i32 %17 ; [#uses=1]
- %19 = bitcast %struct.GIM_CONTACT* %18 to i8* ; [#uses=1]
- %20 = bitcast %struct.GIM_CONTACT* %9 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %19, i8* %20, i32 48, i32 4, i1 false)
- %21 = load i32* %1, align 4 ; [#uses=1]
- %22 = add i32 %21, 1 ; [#uses=1]
- store i32 %22, i32* %1, align 4
- ret void
-
-_ZN9gim_arrayI15GIM_RSORT_TOKENEC1Ej.exit: ; preds = %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit
- %23 = shl i32 %5, 3 ; [#uses=1]
- %24 = call i8* @_Z9gim_allocj(i32 %23) ; [#uses=1]
- %25 = bitcast i8* %24 to %struct.CONTACT_KEY_TOKEN* ; [#uses=3]
- %.pre = load i32* %4, align 4 ; [#uses=5]
- %26 = icmp eq i32 %.pre, 0 ; [#uses=1]
- br i1 %26, label %bb9, label %bb.i
-
-bb.i: ; preds = %_ZN9gim_arrayI15GIM_RSORT_TOKENEC1Ej.exit
- %27 = icmp ult i32 %5, %.pre ; [#uses=1]
- br i1 %27, label %bb3.i.i.i70, label %bb.nph101
-
-bb3.i.i.i70: ; preds = %bb.i
- %28 = shl i32 %.pre, 3 ; [#uses=1]
- %29 = invoke i8* @_Z9gim_allocj(i32 %28)
- to label %_ZN9gim_arrayI15GIM_RSORT_TOKENE6resizeEjb.exit unwind label %lpad.thread ; [#uses=1]
-
-lpad.thread: ; preds = %bb3.i.i.i70
- %eh_ptr93 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3594 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr93, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %_ZN9gim_arrayI15GIM_RSORT_TOKENE5clearEv.exit.i.i
-
-_ZN9gim_arrayI15GIM_RSORT_TOKENE6resizeEjb.exit: ; preds = %bb3.i.i.i70
- %30 = bitcast i8* %29 to %struct.CONTACT_KEY_TOKEN* ; [#uses=2]
- %.pre118 = load i32* %4, align 4 ; [#uses=1]
- %31 = icmp eq i32 %.pre118, 0 ; [#uses=1]
- br i1 %31, label %bb9, label %bb.nph101
-
-bb.nph101: ; preds = %_ZN9gim_arrayI15GIM_RSORT_TOKENE6resizeEjb.exit, %bb.i
- %keycontacts.0.2123 = phi %struct.CONTACT_KEY_TOKEN* [ %30, %_ZN9gim_arrayI15GIM_RSORT_TOKENE6resizeEjb.exit ], [ %25, %bb.i ] ; [#uses=3]
- %32 = getelementptr inbounds %struct.gim_contact_array* %contacts, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb2, %bb.nph101
- %33 = phi i32 [ 0, %bb.nph101 ], [ %50, %bb2 ] ; [#uses=7]
- %scevgep115116 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2123, i32 %33, i32 0 ; [#uses=1]
- %scevgep117 = getelementptr %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2123, i32 %33, i32 1 ; [#uses=1]
- %34 = load %struct.GIM_CONTACT** %32, align 4 ; [#uses=3]
- %scevgep111112 = getelementptr inbounds %struct.GIM_CONTACT* %34, i32 %33, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %scevgep111112, align 4 ; [#uses=1]
- %36 = fmul float %35, 1.000000e+03 ; [#uses=1]
- %37 = fadd float %36, 1.000000e+00 ; [#uses=1]
- %38 = fptosi float %37 to i32 ; [#uses=1]
- %scevgep113 = getelementptr %struct.GIM_CONTACT* %34, i32 %33, i32 0, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %scevgep113, align 4 ; [#uses=1]
- %40 = fmul float %39, 1.333000e+03 ; [#uses=1]
- %41 = fptosi float %40 to i32 ; [#uses=1]
- %scevgep114 = getelementptr %struct.GIM_CONTACT* %34, i32 %33, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %scevgep114, align 4 ; [#uses=1]
- %43 = fmul float %42, 2.133000e+03 ; [#uses=1]
- %44 = fadd float %43, 3.000000e+00 ; [#uses=1]
- %45 = fptosi float %44 to i32 ; [#uses=1]
- %46 = shl i32 %41, 4 ; [#uses=1]
- %47 = shl i32 %45, 8 ; [#uses=1]
- %48 = add i32 %46, %38 ; [#uses=1]
- %49 = add i32 %48, %47 ; [#uses=1]
- store i32 %49, i32* %scevgep115116, align 4
- store i32 %33, i32* %scevgep117, align 4
- %50 = add i32 %33, 1 ; [#uses=2]
- %51 = load i32* %4, align 4 ; [#uses=1]
- %52 = icmp ugt i32 %51, %50 ; [#uses=1]
- br i1 %52, label %bb2, label %bb9
-
-bb9: ; preds = %bb2, %_ZN9gim_arrayI15GIM_RSORT_TOKENE6resizeEjb.exit, %_ZN9gim_arrayI15GIM_RSORT_TOKENEC1Ej.exit, %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit
- %keycontacts.0.2120 = phi %struct.CONTACT_KEY_TOKEN* [ %30, %_ZN9gim_arrayI15GIM_RSORT_TOKENE6resizeEjb.exit ], [ %keycontacts.0.2123, %bb2 ], [ %25, %_ZN9gim_arrayI15GIM_RSORT_TOKENEC1Ej.exit ], [ null, %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit ] ; [#uses=8]
- %keycontacts.1.0119 = phi i32 [ %.pre, %_ZN9gim_arrayI15GIM_RSORT_TOKENE6resizeEjb.exit ], [ %.pre, %bb2 ], [ 0, %_ZN9gim_arrayI15GIM_RSORT_TOKENEC1Ej.exit ], [ 0, %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit ] ; [#uses=2]
- call void @_Z13gim_heap_sortI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jT0_(%struct.CONTACT_KEY_TOKEN* %keycontacts.0.2120, i32 %keycontacts.1.0119, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0)
- %53 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2120, i32 0, i32 0 ; [#uses=1]
- %54 = load i32* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2120, i32 0, i32 1 ; [#uses=1]
- %56 = load i32* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.gim_contact_array* %contacts, i32 0, i32 0, i32 0 ; [#uses=2]
- %58 = load %struct.GIM_CONTACT** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.GIM_CONTACT* %58, i32 %56 ; [#uses=1]
- %60 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 2 ; [#uses=6]
- %61 = load i32* %60, align 4 ; [#uses=4]
- %62 = load i32* %1, align 4 ; [#uses=2]
- %63 = icmp ugt i32 %61, %62 ; [#uses=1]
- br i1 %63, label %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i81, label %bb.i.i82
-
-entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i81: ; preds = %bb9
- %.phi.trans.insert.i79 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre.i80 = load %struct.GIM_CONTACT** %.phi.trans.insert.i79, align 4 ; [#uses=1]
- br label %invcont10
-
-bb.i.i82: ; preds = %bb9
- store i32 %61, i32* %1, align 4
- %64 = shl i32 %62, 1 ; [#uses=1]
- %65 = add i32 %64, 4 ; [#uses=3]
- %66 = icmp eq i32 %65, 0 ; [#uses=1]
- br i1 %66, label %bb.i.i.i83, label %bb1.i.i.i85
-
-bb.i.i.i83: ; preds = %bb.i.i82
- store i32 0, i32* %60, align 4
- %67 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %68 = load %struct.GIM_CONTACT** %67, align 4 ; [#uses=2]
- %69 = icmp eq %struct.GIM_CONTACT* %68, null ; [#uses=1]
- br i1 %69, label %invcont10, label %bb.i.i.i.i84
-
-bb.i.i.i.i84: ; preds = %bb.i.i.i83
- %70 = bitcast %struct.GIM_CONTACT* %68 to i8* ; [#uses=1]
- invoke void @_Z8gim_freePv(i8* %70)
- to label %.noexc89 unwind label %lpad
-
-.noexc89: ; preds = %bb.i.i.i.i84
- store %struct.GIM_CONTACT* null, %struct.GIM_CONTACT** %67, align 4
- br label %invcont10
-
-bb1.i.i.i85: ; preds = %bb.i.i82
- %71 = icmp eq i32 %61, 0 ; [#uses=1]
- %72 = mul i32 %65, 48 ; [#uses=2]
- br i1 %71, label %bb3.i.i.i87, label %bb2.i.i.i86
-
-bb2.i.i.i86: ; preds = %bb1.i.i.i85
- %73 = mul i32 %61, 48 ; [#uses=1]
- %74 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %75 = load %struct.GIM_CONTACT** %74, align 4 ; [#uses=1]
- %76 = bitcast %struct.GIM_CONTACT* %75 to i8* ; [#uses=1]
- %77 = invoke i8* @_Z11gim_reallocPvjj(i8* %76, i32 %73, i32 %72)
- to label %.noexc90 unwind label %lpad ; [#uses=1]
-
-.noexc90: ; preds = %bb2.i.i.i86
- %78 = bitcast i8* %77 to %struct.GIM_CONTACT* ; [#uses=2]
- store %struct.GIM_CONTACT* %78, %struct.GIM_CONTACT** %74, align 4
- br label %bb4.i.i.i88
-
-bb3.i.i.i87: ; preds = %bb1.i.i.i85
- %79 = invoke i8* @_Z9gim_allocj(i32 %72)
- to label %.noexc91 unwind label %lpad ; [#uses=1]
-
-.noexc91: ; preds = %bb3.i.i.i87
- %80 = bitcast i8* %79 to %struct.GIM_CONTACT* ; [#uses=2]
- %81 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store %struct.GIM_CONTACT* %80, %struct.GIM_CONTACT** %81, align 4
- br label %bb4.i.i.i88
-
-bb4.i.i.i88: ; preds = %.noexc91, %.noexc90
- %82 = phi %struct.GIM_CONTACT* [ %80, %.noexc91 ], [ %78, %.noexc90 ] ; [#uses=1]
- store i32 %65, i32* %60, align 4
- br label %invcont10
-
-invcont10: ; preds = %bb4.i.i.i88, %.noexc89, %bb.i.i.i83, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i81
- %83 = phi %struct.GIM_CONTACT* [ %.pre.i80, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i81 ], [ null, %bb.i.i.i83 ], [ null, %.noexc89 ], [ %82, %bb4.i.i.i88 ] ; [#uses=1]
- %84 = load i32* %1, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %struct.GIM_CONTACT* %83, i32 %84 ; [#uses=1]
- %86 = bitcast %struct.GIM_CONTACT* %85 to i8* ; [#uses=1]
- %87 = bitcast %struct.GIM_CONTACT* %59 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %86, i8* %87, i32 48, i32 4, i1 false)
- %88 = load i32* %1, align 4 ; [#uses=2]
- %89 = add i32 %88, 1 ; [#uses=1]
- store i32 %89, i32* %1, align 4
- %90 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=7]
- %91 = load %struct.GIM_CONTACT** %90, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.GIM_CONTACT* %91, i32 %88 ; [#uses=1]
- %toBool15 = icmp eq i8 %normal_contact_average, 0 ; [#uses=2]
- br label %bb27
-
-bb11: ; preds = %bb27
- %scevgep106107 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2120, i32 %indvar, i32 0 ; [#uses=1]
- %scevgep105 = getelementptr %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2120, i32 %indvar, i32 1 ; [#uses=1]
- %93 = load i32* %scevgep106107, align 4 ; [#uses=2]
- %94 = load i32* %scevgep105, align 4 ; [#uses=6]
- %95 = load %struct.GIM_CONTACT** %57, align 4 ; [#uses=6]
- %96 = getelementptr inbounds %struct.GIM_CONTACT* %95, i32 %94 ; [#uses=2]
- %97 = icmp eq i32 %last_key.0, %93 ; [#uses=1]
- br i1 %97, label %bb12, label %bb20
-
-bb12: ; preds = %bb11
- %98 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=2]
- %100 = fadd float %99, 0xBEE4F8B580000000 ; [#uses=1]
- %101 = getelementptr inbounds %struct.GIM_CONTACT* %95, i32 %94, i32 2 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=2]
- %103 = fcmp ogt float %100, %102 ; [#uses=1]
- br i1 %103, label %bb13, label %bb14
-
-bb13: ; preds = %bb12
- %104 = bitcast %struct.GIM_CONTACT* %pcontact.1 to i8* ; [#uses=1]
- %105 = bitcast %struct.GIM_CONTACT* %96 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %104, i8* %105, i32 48, i32 4, i1 false)
- br label %bb26
-
-bb14: ; preds = %bb12
- br i1 %toBool15, label %bb26, label %bb16
-
-bb16: ; preds = %bb14
- %106 = fsub float %99, %102 ; [#uses=1]
- %107 = call float @fabsf(float %106) nounwind readnone ; [#uses=1]
- %108 = fcmp olt float %107, 0x3EE4F8B580000000 ; [#uses=1]
- %109 = icmp ult i32 %coincident_count.1, 8 ; [#uses=1]
- %or.cond = and i1 %108, %109 ; [#uses=1]
- br i1 %or.cond, label %bb19, label %bb26
-
-bb19: ; preds = %bb16
- %110 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 0 ; [#uses=1]
- %111 = getelementptr inbounds %struct.GIM_CONTACT* %95, i32 %94, i32 1, i32 0, i32 0 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- store float %112, float* %110, align 8
- %113 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 1 ; [#uses=1]
- %114 = getelementptr inbounds %struct.GIM_CONTACT* %95, i32 %94, i32 1, i32 0, i32 1 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- store float %115, float* %113, align 4
- %116 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 2 ; [#uses=1]
- %117 = getelementptr inbounds %struct.GIM_CONTACT* %95, i32 %94, i32 1, i32 0, i32 2 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- store float %118, float* %116, align 8
- %119 = getelementptr inbounds [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %coincident_count.1, i32 0, i32 3 ; [#uses=1]
- %120 = getelementptr inbounds %struct.GIM_CONTACT* %95, i32 %94, i32 1, i32 0, i32 3 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- store float %121, float* %119, align 4
- %122 = add i32 %coincident_count.1, 1 ; [#uses=1]
- br label %bb26
-
-bb20: ; preds = %bb11
- %123 = icmp eq i32 %coincident_count.1, 0 ; [#uses=2]
- %or.cond44 = or i1 %toBool15, %123 ; [#uses=1]
- br i1 %or.cond44, label %bb24, label %bb23
-
-bb23: ; preds = %bb20
- %124 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %125 = load float* %124, align 4 ; [#uses=2]
- %126 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %127 = load float* %126, align 4 ; [#uses=2]
- %128 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %129 = load float* %128, align 4 ; [#uses=2]
- br i1 %123, label %bb2.i, label %bb.i76
-
-bb.i76: ; preds = %bb.i76, %bb23
- %i.031.i = phi i32 [ %136, %bb.i76 ], [ 0, %bb23 ] ; [#uses=4]
- %vec_sum.0.0.030.i = phi float [ %131, %bb.i76 ], [ %125, %bb23 ] ; [#uses=1]
- %vec_sum.0.1.029.i = phi float [ %133, %bb.i76 ], [ %127, %bb23 ] ; [#uses=1]
- %vec_sum.0.2.028.i = phi float [ %135, %bb.i76 ], [ %129, %bb23 ] ; [#uses=1]
- %scevgep38.i = getelementptr [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %i.031.i, i32 0, i32 2 ; [#uses=1]
- %scevgep37.i = getelementptr [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %i.031.i, i32 0, i32 1 ; [#uses=1]
- %scevgep36.i = getelementptr [8 x %struct.btQuadWord]* %coincident_normals, i32 0, i32 %i.031.i, i32 0, i32 0 ; [#uses=1]
- %130 = load float* %scevgep36.i, align 8 ; [#uses=1]
- %131 = fadd float %vec_sum.0.0.030.i, %130 ; [#uses=2]
- %132 = load float* %scevgep37.i, align 4 ; [#uses=1]
- %133 = fadd float %vec_sum.0.1.029.i, %132 ; [#uses=2]
- %134 = load float* %scevgep38.i, align 8 ; [#uses=1]
- %135 = fadd float %vec_sum.0.2.028.i, %134 ; [#uses=2]
- %136 = add i32 %i.031.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %136, %coincident_count.1 ; [#uses=1]
- br i1 %exitcond, label %bb2.i, label %bb.i76
-
-bb2.i: ; preds = %bb.i76, %bb23
- %vec_sum.0.0.0.lcssa.i = phi float [ %125, %bb23 ], [ %131, %bb.i76 ] ; [#uses=3]
- %vec_sum.0.1.0.lcssa.i = phi float [ %127, %bb23 ], [ %133, %bb.i76 ] ; [#uses=3]
- %vec_sum.0.2.0.lcssa.i = phi float [ %129, %bb23 ], [ %135, %bb.i76 ] ; [#uses=3]
- %137 = fmul float %vec_sum.0.0.0.lcssa.i, %vec_sum.0.0.0.lcssa.i ; [#uses=1]
- %138 = fmul float %vec_sum.0.1.0.lcssa.i, %vec_sum.0.1.0.lcssa.i ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %vec_sum.0.2.0.lcssa.i, %vec_sum.0.2.0.lcssa.i ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=4]
- %tmp22.i = bitcast float %141 to i32 ; [#uses=1]
- %142 = fcmp olt float %141, 0x3EE4F8B580000000 ; [#uses=1]
- br i1 %142, label %bb24, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %143 = fcmp ugt float %141, 0x3E7AD7F2A0000000 ; [#uses=1]
- br i1 %143, label %bb5.i77, label %bb10.i
-
-bb5.i77: ; preds = %bb3.i
- %144 = fmul float %141, 5.000000e-01 ; [#uses=1]
- %145 = lshr i32 %tmp22.i, 1 ; [#uses=1]
- %146 = sub i32 1597463007, %145 ; [#uses=1]
- %tmp12.i = bitcast i32 %146 to float ; [#uses=3]
- %147 = fmul float %144, %tmp12.i ; [#uses=1]
- %148 = fmul float %147, %tmp12.i ; [#uses=1]
- %149 = fsub float 1.500000e+00, %148 ; [#uses=1]
- %150 = fmul float %149, %tmp12.i ; [#uses=1]
- br label %bb10.i
-
-bb10.i: ; preds = %bb5.i77, %bb3.i
- %storemerge.i = phi float [ %150, %bb5.i77 ], [ 0x47EFFFFFE0000000, %bb3.i ] ; [#uses=3]
- %151 = fmul float %vec_sum.0.2.0.lcssa.i, %storemerge.i ; [#uses=1]
- %152 = fmul float %vec_sum.0.1.0.lcssa.i, %storemerge.i ; [#uses=1]
- %153 = fmul float %vec_sum.0.0.0.lcssa.i, %storemerge.i ; [#uses=1]
- store float %153, float* %124, align 4
- store float %152, float* %126, align 4
- store float %151, float* %128, align 4
- %154 = getelementptr inbounds %struct.GIM_CONTACT* %pcontact.1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %154, align 4
- br label %bb24
-
-bb24: ; preds = %bb10.i, %bb2.i, %bb20
- %coincident_count.2 = phi i32 [ 0, %bb10.i ], [ %coincident_count.1, %bb20 ], [ 0, %bb2.i ] ; [#uses=1]
- %155 = load i32* %60, align 4 ; [#uses=4]
- %156 = load i32* %1, align 4 ; [#uses=2]
- %157 = icmp ugt i32 %155, %156 ; [#uses=1]
- br i1 %157, label %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i, label %bb.i.i
-
-entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i: ; preds = %bb24
- %.pre.i = load %struct.GIM_CONTACT** %90, align 4 ; [#uses=1]
- br label %invcont25
-
-bb.i.i: ; preds = %bb24
- store i32 %155, i32* %1, align 4
- %158 = shl i32 %156, 1 ; [#uses=1]
- %159 = add i32 %158, 4 ; [#uses=3]
- %160 = icmp eq i32 %159, 0 ; [#uses=1]
- br i1 %160, label %bb.i.i.i50, label %bb1.i.i.i
-
-bb.i.i.i50: ; preds = %bb.i.i
- store i32 0, i32* %60, align 4
- %161 = load %struct.GIM_CONTACT** %90, align 4 ; [#uses=2]
- %162 = icmp eq %struct.GIM_CONTACT* %161, null ; [#uses=1]
- br i1 %162, label %invcont25, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %bb.i.i.i50
- %163 = bitcast %struct.GIM_CONTACT* %161 to i8* ; [#uses=1]
- invoke void @_Z8gim_freePv(i8* %163)
- to label %.noexc51 unwind label %lpad
-
-.noexc51: ; preds = %bb.i.i.i.i
- store %struct.GIM_CONTACT* null, %struct.GIM_CONTACT** %90, align 4
- br label %invcont25
-
-bb1.i.i.i: ; preds = %bb.i.i
- %164 = icmp eq i32 %155, 0 ; [#uses=1]
- %165 = mul i32 %159, 48 ; [#uses=2]
- br i1 %164, label %bb3.i.i.i, label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i
- %166 = mul i32 %155, 48 ; [#uses=1]
- %167 = load %struct.GIM_CONTACT** %90, align 4 ; [#uses=1]
- %168 = bitcast %struct.GIM_CONTACT* %167 to i8* ; [#uses=1]
- %169 = invoke i8* @_Z11gim_reallocPvjj(i8* %168, i32 %166, i32 %165)
- to label %.noexc52 unwind label %lpad ; [#uses=1]
-
-.noexc52: ; preds = %bb2.i.i.i
- %170 = bitcast i8* %169 to %struct.GIM_CONTACT* ; [#uses=1]
- br label %bb4.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i.i.i
- %171 = invoke i8* @_Z9gim_allocj(i32 %165)
- to label %.noexc53 unwind label %lpad ; [#uses=1]
-
-.noexc53: ; preds = %bb3.i.i.i
- %172 = bitcast i8* %171 to %struct.GIM_CONTACT* ; [#uses=1]
- br label %bb4.i.i.i
-
-bb4.i.i.i: ; preds = %.noexc53, %.noexc52
- %storemerge = phi %struct.GIM_CONTACT* [ %170, %.noexc52 ], [ %172, %.noexc53 ] ; [#uses=2]
- store %struct.GIM_CONTACT* %storemerge, %struct.GIM_CONTACT** %90, align 4
- store i32 %159, i32* %60, align 4
- br label %invcont25
-
-invcont25: ; preds = %bb4.i.i.i, %.noexc51, %bb.i.i.i50, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i
- %173 = phi %struct.GIM_CONTACT* [ %.pre.i, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i ], [ null, %bb.i.i.i50 ], [ null, %.noexc51 ], [ %storemerge, %bb4.i.i.i ] ; [#uses=1]
- %174 = load i32* %1, align 4 ; [#uses=1]
- %175 = getelementptr inbounds %struct.GIM_CONTACT* %173, i32 %174 ; [#uses=1]
- %176 = bitcast %struct.GIM_CONTACT* %175 to i8* ; [#uses=1]
- %177 = bitcast %struct.GIM_CONTACT* %96 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %176, i8* %177, i32 48, i32 4, i1 false)
- %178 = load i32* %1, align 4 ; [#uses=2]
- %179 = add i32 %178, 1 ; [#uses=1]
- store i32 %179, i32* %1, align 4
- %180 = load %struct.GIM_CONTACT** %90, align 4 ; [#uses=1]
- %181 = getelementptr inbounds %struct.GIM_CONTACT* %180, i32 %178 ; [#uses=1]
- br label %bb26
-
-bb26: ; preds = %invcont25, %bb19, %bb16, %bb14, %bb13
- %coincident_count.0 = phi i32 [ 0, %bb13 ], [ %122, %bb19 ], [ %coincident_count.1, %bb16 ], [ %coincident_count.1, %bb14 ], [ %coincident_count.2, %invcont25 ] ; [#uses=1]
- %pcontact.0 = phi %struct.GIM_CONTACT* [ %pcontact.1, %bb13 ], [ %pcontact.1, %bb19 ], [ %pcontact.1, %bb16 ], [ %pcontact.1, %bb14 ], [ %181, %invcont25 ] ; [#uses=1]
- %phitmp = add i32 %indvar, 1 ; [#uses=1]
- br label %bb27
-
-bb27: ; preds = %bb26, %invcont10
- %indvar = phi i32 [ %phitmp, %bb26 ], [ 1, %invcont10 ] ; [#uses=4]
- %coincident_count.1 = phi i32 [ %coincident_count.0, %bb26 ], [ 0, %invcont10 ] ; [#uses=11]
- %last_key.0 = phi i32 [ %93, %bb26 ], [ %54, %invcont10 ] ; [#uses=1]
- %pcontact.1 = phi %struct.GIM_CONTACT* [ %pcontact.0, %bb26 ], [ %92, %invcont10 ] ; [#uses=10]
- %182 = icmp ugt i32 %keycontacts.1.0119, %indvar ; [#uses=1]
- br i1 %182, label %bb11, label %bb32
-
-invcont30: ; preds = %bb.i.i.i, %_ZN9gim_arrayI15GIM_RSORT_TOKENE5clearEv.exit.i.i
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr96)
- unreachable
-
-bb32: ; preds = %bb27
- %183 = icmp eq %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2120, null ; [#uses=1]
- br i1 %183, label %_ZN9gim_arrayI15GIM_RSORT_TOKENED1Ev.exit49, label %bb.i.i.i47
-
-bb.i.i.i47: ; preds = %bb32
- %184 = bitcast %struct.CONTACT_KEY_TOKEN* %keycontacts.0.2120 to i8* ; [#uses=1]
- call void @_Z8gim_freePv(i8* %184)
- ret void
-
-_ZN9gim_arrayI15GIM_RSORT_TOKENED1Ev.exit49: ; preds = %bb32
- ret void
-
-lpad: ; preds = %bb3.i.i.i, %bb2.i.i.i, %bb.i.i.i.i, %bb3.i.i.i87, %bb2.i.i.i86, %bb.i.i.i.i84
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %_ZN9gim_arrayI15GIM_RSORT_TOKENE5clearEv.exit.i.i
-
-_ZN9gim_arrayI15GIM_RSORT_TOKENE5clearEv.exit.i.i: ; preds = %lpad, %lpad.thread
- %eh_ptr96 = phi i8* [ %eh_ptr93, %lpad.thread ], [ %eh_ptr, %lpad ] ; [#uses=1]
- %keycontacts.0.395 = phi %struct.CONTACT_KEY_TOKEN* [ %25, %lpad.thread ], [ %keycontacts.0.2120, %lpad ] ; [#uses=2]
- %185 = icmp eq %struct.CONTACT_KEY_TOKEN* %keycontacts.0.395, null ; [#uses=1]
- br i1 %185, label %invcont30, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN9gim_arrayI15GIM_RSORT_TOKENE5clearEv.exit.i.i
- %186 = bitcast %struct.CONTACT_KEY_TOKEN* %keycontacts.0.395 to i8* ; [#uses=1]
- invoke void @_Z8gim_freePv(i8* %186)
- to label %invcont30 unwind label %lpad36
-
-lpad36: ; preds = %bb.i.i.i
- %eh_ptr37 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select39 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_Z13gim_heap_sortI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jT0_(%struct.CONTACT_KEY_TOKEN* %pArr, i32 %element_count, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %CompareFunc) nounwind {
-entry:
- %0 = icmp ult i32 %element_count, 2 ; [#uses=1]
- br i1 %0, label %return, label %bb.nph27
-
-bb.nph27: ; preds = %entry
- %1 = lshr i32 %element_count, 1 ; [#uses=4]
- %tmp41 = add i32 %1, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit, %bb.nph27
- %indvar34 = phi i32 [ 0, %bb.nph27 ], [ %indvar.next35, %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit ] ; [#uses=3]
- %k.026 = sub i32 %1, %indvar34 ; [#uses=2]
- %scevgep39 = getelementptr %struct.CONTACT_KEY_TOKEN* %pArr, i32 %k.026, i32 0 ; [#uses=1]
- %scevgep40 = getelementptr i32* %scevgep39, i32 -1 ; [#uses=1]
- %tmp42 = sub i32 %tmp41, %indvar34 ; [#uses=1]
- %scevgep4344 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %tmp42, i32 0 ; [#uses=1]
- %2 = load i32* %scevgep4344, align 4 ; [#uses=2]
- %3 = load i32* %scevgep40, align 4 ; [#uses=1]
- br label %bb9.i
-
-bb.i: ; preds = %bb9.i
- %4 = shl i32 %k_addr.0.i, 1 ; [#uses=5]
- %5 = icmp slt i32 %4, %element_count ; [#uses=1]
- br i1 %5, label %bb1.i, label %bb6.i
-
-bb1.i: ; preds = %bb.i
- %6 = add nsw i32 %4, -1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %6, i32 0 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %4, i32 0 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = sub i32 %8, %10 ; [#uses=1]
- %.lobit.i = lshr i32 %11, 31 ; [#uses=1]
- %..i = or i32 %.lobit.i, %4 ; [#uses=1]
- br label %bb6.i
-
-bb6.i: ; preds = %bb1.i, %bb.i
- %child.0.i = phi i32 [ %4, %bb.i ], [ %..i, %bb1.i ] ; [#uses=2]
- %12 = add nsw i32 %child.0.i, -1 ; [#uses=2]
- %13 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %12, i32 0 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=2]
- %15 = sub i32 %2, %14 ; [#uses=1]
- %toBool7.i = icmp slt i32 %15, 0 ; [#uses=1]
- br i1 %toBool7.i, label %bb8.i, label %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit
-
-bb8.i: ; preds = %bb6.i
- %16 = add i32 %k_addr.0.i, -1 ; [#uses=2]
- %17 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %16, i32 0 ; [#uses=1]
- store i32 %14, i32* %17, align 4
- %18 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %16, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %12, i32 1 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=1]
- store i32 %20, i32* %18, align 4
- br label %bb9.i
-
-bb9.i: ; preds = %bb8.i, %bb
- %k_addr.0.i = phi i32 [ %k.026, %bb ], [ %child.0.i, %bb8.i ] ; [#uses=4]
- %21 = icmp ult i32 %1, %k_addr.0.i ; [#uses=1]
- br i1 %21, label %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit, label %bb.i
-
-_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit: ; preds = %bb9.i, %bb6.i
- %22 = add i32 %k_addr.0.i, -1 ; [#uses=2]
- %23 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %22, i32 0 ; [#uses=1]
- store i32 %2, i32* %23, align 4
- %24 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %22, i32 1 ; [#uses=1]
- store i32 %3, i32* %24, align 4
- %indvar.next35 = add i32 %indvar34, 1 ; [#uses=2]
- %exitcond36 = icmp eq i32 %indvar.next35, %1 ; [#uses=1]
- br i1 %exitcond36, label %bb3.preheader, label %bb
-
-bb3.preheader: ; preds = %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit
- %25 = icmp ugt i32 %element_count, 1 ; [#uses=1]
- br i1 %25, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb3.preheader
- %26 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 0, i32 0 ; [#uses=3]
- %27 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 0, i32 1 ; [#uses=3]
- %tmp = add i32 %element_count, -1 ; [#uses=2]
- br label %bb2
-
-bb2: ; preds = %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit20, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit20 ] ; [#uses=3]
- %tmp29 = sub i32 %element_count, %indvar ; [#uses=1]
- %scevgep = getelementptr %struct.CONTACT_KEY_TOKEN* %pArr, i32 %tmp29, i32 0 ; [#uses=1]
- %scevgep30 = getelementptr i32* %scevgep, i32 -1 ; [#uses=2]
- %tmp31 = sub i32 %tmp, %indvar ; [#uses=3]
- %scevgep3233 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %tmp31, i32 0 ; [#uses=2]
- %28 = load i32* %26, align 4 ; [#uses=1]
- %29 = load i32* %27, align 4 ; [#uses=1]
- %30 = load i32* %scevgep3233, align 4 ; [#uses=1]
- store i32 %30, i32* %26, align 4
- %31 = load i32* %scevgep30, align 4 ; [#uses=1]
- store i32 %31, i32* %27, align 4
- store i32 %28, i32* %scevgep3233, align 4
- store i32 %29, i32* %scevgep30, align 4
- %32 = load i32* %26, align 4 ; [#uses=2]
- %33 = load i32* %27, align 4 ; [#uses=1]
- %34 = lshr i32 %tmp31, 1 ; [#uses=1]
- br label %bb9.i19
-
-bb.i10: ; preds = %bb9.i19
- %35 = shl i32 %k_addr.0.i18, 1 ; [#uses=5]
- %36 = icmp slt i32 %35, %tmp31 ; [#uses=1]
- br i1 %36, label %bb1.i13, label %bb6.i16
-
-bb1.i13: ; preds = %bb.i10
- %37 = add nsw i32 %35, -1 ; [#uses=1]
- %38 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %37, i32 0 ; [#uses=1]
- %39 = load i32* %38, align 4 ; [#uses=1]
- %40 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %35, i32 0 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=1]
- %42 = sub i32 %39, %41 ; [#uses=1]
- %.lobit.i11 = lshr i32 %42, 31 ; [#uses=1]
- %..i12 = or i32 %.lobit.i11, %35 ; [#uses=1]
- br label %bb6.i16
-
-bb6.i16: ; preds = %bb1.i13, %bb.i10
- %child.0.i14 = phi i32 [ %35, %bb.i10 ], [ %..i12, %bb1.i13 ] ; [#uses=2]
- %43 = add nsw i32 %child.0.i14, -1 ; [#uses=2]
- %44 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %43, i32 0 ; [#uses=1]
- %45 = load i32* %44, align 4 ; [#uses=2]
- %46 = sub i32 %32, %45 ; [#uses=1]
- %toBool7.i15 = icmp slt i32 %46, 0 ; [#uses=1]
- br i1 %toBool7.i15, label %bb8.i17, label %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit20
-
-bb8.i17: ; preds = %bb6.i16
- %47 = add i32 %k_addr.0.i18, -1 ; [#uses=2]
- %48 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %47, i32 0 ; [#uses=1]
- store i32 %45, i32* %48, align 4
- %49 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %47, i32 1 ; [#uses=1]
- %50 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %43, i32 1 ; [#uses=1]
- %51 = load i32* %50, align 4 ; [#uses=1]
- store i32 %51, i32* %49, align 4
- br label %bb9.i19
-
-bb9.i19: ; preds = %bb8.i17, %bb2
- %k_addr.0.i18 = phi i32 [ 1, %bb2 ], [ %child.0.i14, %bb8.i17 ] ; [#uses=4]
- %52 = icmp ult i32 %34, %k_addr.0.i18 ; [#uses=1]
- br i1 %52, label %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit20, label %bb.i10
-
-_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit20: ; preds = %bb9.i19, %bb6.i16
- %53 = add i32 %k_addr.0.i18, -1 ; [#uses=2]
- %54 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %53, i32 0 ; [#uses=1]
- store i32 %32, i32* %54, align 4
- %55 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %pArr, i32 %53, i32 1 ; [#uses=1]
- store i32 %33, i32* %55, align 4
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %return, label %bb2
-
-return: ; preds = %_Z13gim_down_heapI15GIM_RSORT_TOKEN26GIM_RSORT_TOKEN_COMPARATOREvPT_jjT0_.exit20, %bb3.preheader, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17gim_contact_array21merge_contacts_uniqueERKS_(%struct.gim_contact_array* nocapture %this, %struct.gim_contact_array* nocapture %contacts) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 1 ; [#uses=6]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit, label %bb.nph.i.i
-
-bb.nph.i.i: ; preds = %entry
- store i32 0, i32* %0, align 4
- br label %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit
-
-_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit: ; preds = %bb.nph.i.i, %entry
- %3 = getelementptr inbounds %struct.gim_contact_array* %contacts, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=3]
- %5 = icmp eq i32 %4, 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.gim_contact_array* %contacts, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load %struct.GIM_CONTACT** %6, align 4 ; [#uses=1]
- %8 = add i32 %4, -1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.GIM_CONTACT* %7, i32 %8 ; [#uses=1]
- br i1 %5, label %bb, label %bb3.preheader
-
-bb3.preheader: ; preds = %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit
- %10 = icmp ugt i32 %4, 1 ; [#uses=0]
- ret void
-
-bb: ; preds = %_ZN9gim_arrayI11GIM_CONTACTE5clearEv.exit
- %11 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 2 ; [#uses=2]
- %12 = load i32* %11, align 4 ; [#uses=2]
- %13 = icmp ugt i32 %12, 0 ; [#uses=1]
- br i1 %13, label %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i, label %bb1.i.i.i
-
-entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i: ; preds = %bb
- %.phi.trans.insert.i = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre.i = load %struct.GIM_CONTACT** %.phi.trans.insert.i, align 4 ; [#uses=1]
- br label %_ZN9gim_arrayI11GIM_CONTACTE9push_backERKS0_.exit
-
-bb1.i.i.i: ; preds = %bb
- store i32 %12, i32* %0, align 4
- %14 = tail call i8* @_Z9gim_allocj(i32 192) ; [#uses=1]
- %15 = bitcast i8* %14 to %struct.GIM_CONTACT* ; [#uses=2]
- %16 = getelementptr inbounds %struct.gim_contact_array* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store %struct.GIM_CONTACT* %15, %struct.GIM_CONTACT** %16, align 4
- store i32 4, i32* %11, align 4
- br label %_ZN9gim_arrayI11GIM_CONTACTE9push_backERKS0_.exit
-
-_ZN9gim_arrayI11GIM_CONTACTE9push_backERKS0_.exit: ; preds = %bb1.i.i.i, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i
- %17 = phi %struct.GIM_CONTACT* [ %.pre.i, %entry._ZN9gim_arrayI11GIM_CONTACTE12growingCheckEv.exit_crit_edge.i ], [ %15, %bb1.i.i.i ] ; [#uses=1]
- %18 = load i32* %0, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.GIM_CONTACT* %17, i32 %18 ; [#uses=1]
- %20 = bitcast %struct.GIM_CONTACT* %19 to i8* ; [#uses=1]
- %21 = bitcast %struct.GIM_CONTACT* %9 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %20, i8* %21, i32 48, i32 4, i1 false)
- %22 = load i32* %0, align 4 ; [#uses=1]
- %23 = add i32 %22, 1 ; [#uses=1]
- store i32 %23, i32* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z21gim_set_alloc_handlerPFPvjE(i8* (i32)* %fn) nounwind {
-entry:
- store i8* (i32)* %fn, i8* (i32)** @_ZL9g_allocfn, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z22gim_set_alloca_handlerPFPvjE(i8* (i32)* %fn) nounwind {
-entry:
- store i8* (i32)* %fn, i8* (i32)** @_ZL10g_allocafn, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z23gim_set_realloc_handlerPFPvS_jjE(i8* (i8*, i32, i32)* %fn) nounwind {
-entry:
- store i8* (i8*, i32, i32)* %fn, i8* (i8*, i32, i32)** @_ZL11g_reallocfn, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z20gim_set_free_handlerPFvPvE(void (i8*)* %fn) nounwind {
-entry:
- store void (i8*)* %fn, void (i8*)** @_ZL8g_freefn, align 4
- ret void
-}
-
-; [#uses=0]
-define i8* (i32)* @_Z21gim_get_alloc_handlerv() nounwind readonly {
-entry:
- %0 = load i8* (i32)** @_ZL9g_allocfn, align 4 ; [#uses=1]
- ret i8* (i32)* %0
-}
-
-; [#uses=0]
-define i8* (i32)* @_Z22gim_get_alloca_handlerv() nounwind readonly {
-entry:
- %0 = load i8* (i32)** @_ZL10g_allocafn, align 4 ; [#uses=1]
- ret i8* (i32)* %0
-}
-
-; [#uses=0]
-define i8* (i8*, i32, i32)* @_Z23gim_get_realloc_handlerv() nounwind readonly {
-entry:
- %0 = load i8* (i8*, i32, i32)** @_ZL11g_reallocfn, align 4 ; [#uses=1]
- ret i8* (i8*, i32, i32)* %0
-}
-
-; [#uses=0]
-define void (i8*)* @_Z20gim_get_free_handlerv() nounwind readonly {
-entry:
- %0 = load void (i8*)** @_ZL8g_freefn, align 4 ; [#uses=1]
- ret void (i8*)* %0
-}
-
-; [#uses=5]
-define void @_Z8gim_freePv(i8* %ptr) {
-entry:
- %0 = icmp eq i8* %ptr, null ; [#uses=1]
- br i1 %0, label %return, label %bb
-
-bb: ; preds = %entry
- %1 = load void (i8*)** @_ZL8g_freefn, align 4 ; [#uses=2]
- %2 = icmp eq void (i8*)* %1, null ; [#uses=1]
- br i1 %2, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- tail call void %1(i8* %ptr)
- ret void
-
-bb2: ; preds = %bb
- tail call void @free(i8* %ptr) nounwind
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-declare void @free(i8* nocapture) nounwind
-
-; [#uses=7]
-define i8* @_Z9gim_allocj(i32 %size) {
-entry:
- %0 = load i8* (i32)** @_ZL9g_allocfn, align 4 ; [#uses=2]
- %1 = icmp eq i8* (i32)* %0, null ; [#uses=1]
- br i1 %1, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = tail call i8* %0(i32 %size) ; [#uses=1]
- ret i8* %2
-
-bb1: ; preds = %entry
- %3 = tail call noalias i8* @malloc(i32 %size) nounwind ; [#uses=1]
- ret i8* %3
-}
-
-; [#uses=4]
-declare noalias i8* @malloc(i32) nounwind
-
-; [#uses=3]
-define i8* @_Z11gim_reallocPvjj(i8* %ptr, i32 %oldsize, i32 %newsize) {
-entry:
- %0 = load i8* (i32)** @_ZL9g_allocfn, align 4 ; [#uses=2]
- %1 = icmp eq i8* (i32)* %0, null ; [#uses=1]
- br i1 %1, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- %2 = tail call i8* %0(i32 %newsize) ; [#uses=1]
- br label %_Z9gim_allocj.exit
-
-bb1.i: ; preds = %entry
- %3 = tail call noalias i8* @malloc(i32 %newsize) nounwind ; [#uses=1]
- br label %_Z9gim_allocj.exit
-
-_Z9gim_allocj.exit: ; preds = %bb1.i, %bb.i
- %4 = phi i8* [ %2, %bb.i ], [ %3, %bb1.i ] ; [#uses=4]
- %5 = icmp ult i32 %oldsize, %newsize ; [#uses=1]
- %iftmp.25.0 = select i1 %5, i32 %oldsize, i32 %newsize ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %4, i8* %ptr, i32 %iftmp.25.0, i32 1, i1 false) nounwind
- %6 = icmp eq i8* %ptr, null ; [#uses=1]
- br i1 %6, label %_Z8gim_freePv.exit, label %bb.i4
-
-bb.i4: ; preds = %_Z9gim_allocj.exit
- %7 = load void (i8*)** @_ZL8g_freefn, align 4 ; [#uses=2]
- %8 = icmp eq void (i8*)* %7, null ; [#uses=1]
- br i1 %8, label %bb2.i, label %bb1.i5
-
-bb1.i5: ; preds = %bb.i4
- tail call void %7(i8* %ptr)
- ret i8* %4
-
-bb2.i: ; preds = %bb.i4
- tail call void @free(i8* %ptr) nounwind
- ret i8* %4
-
-_Z8gim_freePv.exit: ; preds = %_Z9gim_allocj.exit
- ret i8* %4
-}
-
-; [#uses=0]
-define i8* @_Z10gim_allocaj(i32 %size) {
-entry:
- %0 = load i8* (i32)** @_ZL10g_allocafn, align 4 ; [#uses=2]
- %1 = icmp eq i8* (i32)* %0, null ; [#uses=1]
- br i1 %1, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = tail call i8* %0(i32 %size) ; [#uses=1]
- ret i8* %2
-
-bb1: ; preds = %entry
- %3 = load i8* (i32)** @_ZL9g_allocfn, align 4 ; [#uses=2]
- %4 = icmp eq i8* (i32)* %3, null ; [#uses=1]
- br i1 %4, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb1
- %5 = tail call i8* %3(i32 %size) ; [#uses=1]
- ret i8* %5
-
-bb1.i: ; preds = %bb1
- %6 = tail call noalias i8* @malloc(i32 %size) nounwind ; [#uses=1]
- ret i8* %6
-}
-
-; [#uses=0]
-define zeroext i8 @_ZNK12GIM_TRIANGLE26collide_triangle_hard_testERKS_R25GIM_TRIANGLE_CONTACT_DATA(%struct.GIM_TRIANGLE* nocapture %this, %struct.GIM_TRIANGLE* nocapture %other, %struct.GIM_TRIANGLE_CONTACT* nocapture %contact_data) nounwind align 2 {
-entry:
- %calc_cache = alloca %struct.GIM_TRIANGLE_CALCULATION_CACHE, align 8 ; [#uses=1]
- %0 = getelementptr inbounds %struct.GIM_TRIANGLE* %other, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.GIM_TRIANGLE* %other, i32 0, i32 1, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.GIM_TRIANGLE* %other, i32 0, i32 1, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.GIM_TRIANGLE* %other, i32 0, i32 1, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.GIM_TRIANGLE* %this, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.GIM_TRIANGLE* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.GIM_TRIANGLE* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.GIM_TRIANGLE* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %10 = call zeroext i8 @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(%struct.GIM_TRIANGLE_CALCULATION_CACHE* %calc_cache, %struct.btQuadWord* %9, %struct.btQuadWord* %8, %struct.btQuadWord* %7, float %6, %struct.btQuadWord* %4, %struct.btQuadWord* %3, %struct.btQuadWord* %2, float %1, %struct.GIM_TRIANGLE_CONTACT* %contact_data) ; [#uses=1]
- ret i8 %10
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN25GIM_TRIANGLE_CONTACT_DATA12merge_pointsERK9btVector4fPK9btVector3j(%struct.GIM_TRIANGLE_CONTACT* nocapture %this, %struct.btQuaternion* nocapture %plane, float %margin, %struct.btQuadWord* nocapture %points, i32 %point_count) nounwind inlinehint align 2 {
-entry:
- %point_indices.i = alloca [16 x i32], align 4 ; [#uses=3]
- %0 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 1 ; [#uses=4]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 0 ; [#uses=2]
- store float -1.000000e+03, float* %13, align 4
- %14 = icmp eq i32 %point_count, 0 ; [#uses=1]
- br i1 %14, label %_ZN25GIM_TRIANGLE_CONTACT_DATA19mergepoints_genericI22DISTANCE_PLANE_3D_FUNC9btVector4EEvRKT0_fPK9btVector3jT_.exit, label %bb.nph13.i
-
-bb.nph13.i: ; preds = %entry
- %15 = getelementptr inbounds [16 x i32]* %point_indices.i, i32 0, i32 0 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb5.i, %bb.nph13.i
- %16 = phi i32 [ 0, %bb.nph13.i ], [ %39, %bb5.i ] ; [#uses=4]
- %17 = phi float [ -1.000000e+03, %bb.nph13.i ], [ %40, %bb5.i ] ; [#uses=5]
- %18 = phi i32 [ 0, %bb.nph13.i ], [ %41, %bb5.i ] ; [#uses=6]
- %scevgep22.i = getelementptr %struct.btQuadWord* %points, i32 %18, i32 0, i32 2 ; [#uses=1]
- %scevgep21.i = getelementptr %struct.btQuadWord* %points, i32 %18, i32 0, i32 1 ; [#uses=1]
- %scevgep1920.i = getelementptr inbounds %struct.btQuadWord* %points, i32 %18, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %1, align 4 ; [#uses=1]
- %20 = load float* %scevgep1920.i, align 4 ; [#uses=1]
- %21 = fmul float %19, %20 ; [#uses=1]
- %22 = load float* %4, align 4 ; [#uses=1]
- %23 = load float* %scevgep21.i, align 4 ; [#uses=1]
- %24 = fmul float %22, %23 ; [#uses=1]
- %25 = fadd float %21, %24 ; [#uses=1]
- %26 = load float* %7, align 4 ; [#uses=1]
- %27 = load float* %scevgep22.i, align 4 ; [#uses=1]
- %28 = fmul float %26, %27 ; [#uses=1]
- %29 = fadd float %25, %28 ; [#uses=1]
- %30 = load float* %10, align 4 ; [#uses=1]
- %31 = fsub float %29, %30 ; [#uses=1]
- %32 = fsub float %margin, %31 ; [#uses=5]
- %33 = fcmp ult float %32, 0.000000e+00 ; [#uses=1]
- br i1 %33, label %bb5.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %34 = fcmp olt float %17, %32 ; [#uses=1]
- br i1 %34, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb1.i
- store float %32, float* %13, align 4
- store i32 %18, i32* %15, align 4
- store i32 1, i32* %12, align 4
- br label %bb5.i
-
-bb3.i: ; preds = %bb1.i
- %35 = fadd float %32, 0x3E80000000000000 ; [#uses=1]
- %36 = fcmp ult float %35, %17 ; [#uses=1]
- br i1 %36, label %bb5.i, label %bb4.i
-
-bb4.i: ; preds = %bb3.i
- %37 = getelementptr inbounds [16 x i32]* %point_indices.i, i32 0, i32 %16 ; [#uses=1]
- store i32 %18, i32* %37, align 4
- %38 = add i32 %16, 1 ; [#uses=2]
- store i32 %38, i32* %12, align 4
- br label %bb5.i
-
-bb5.i: ; preds = %bb4.i, %bb3.i, %bb2.i, %bb.i
- %39 = phi i32 [ %16, %bb3.i ], [ %16, %bb.i ], [ %38, %bb4.i ], [ 1, %bb2.i ] ; [#uses=2]
- %40 = phi float [ %17, %bb3.i ], [ %17, %bb.i ], [ %17, %bb4.i ], [ %32, %bb2.i ] ; [#uses=1]
- %41 = add i32 %18, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %41, %point_count ; [#uses=1]
- br i1 %exitcond, label %bb9.preheader.i, label %bb.i
-
-bb9.preheader.i: ; preds = %bb5.i
- %42 = icmp eq i32 %39, 0 ; [#uses=1]
- br i1 %42, label %_ZN25GIM_TRIANGLE_CONTACT_DATA19mergepoints_genericI22DISTANCE_PLANE_3D_FUNC9btVector4EEvRKT0_fPK9btVector3jT_.exit, label %bb8.i
-
-bb8.i: ; preds = %bb8.i, %bb9.preheader.i
- %_k.111.i = phi i32 [ 0, %bb9.preheader.i ], [ %tmp, %bb8.i ] ; [#uses=6]
- %tmp = add i32 %_k.111.i, 1 ; [#uses=2]
- %scevgep18.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111.i, i32 0, i32 3 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111.i, i32 0, i32 2 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111.i, i32 0, i32 1 ; [#uses=1]
- %scevgep1415.i = getelementptr %struct.GIM_TRIANGLE_CONTACT* %this, i32 0, i32 3, i32 %_k.111.i, i32 0, i32 0 ; [#uses=1]
- %scevgep.i = getelementptr [16 x i32]* %point_indices.i, i32 0, i32 %_k.111.i ; [#uses=1]
- %43 = load i32* %scevgep.i, align 4 ; [#uses=4]
- %44 = getelementptr inbounds %struct.btQuadWord* %points, i32 %43, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %scevgep1415.i, align 4
- %46 = getelementptr inbounds %struct.btQuadWord* %points, i32 %43, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %scevgep16.i, align 4
- %48 = getelementptr inbounds %struct.btQuadWord* %points, i32 %43, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %scevgep17.i, align 4
- %50 = getelementptr inbounds %struct.btQuadWord* %points, i32 %43, i32 0, i32 3 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %scevgep18.i, align 4
- %52 = load i32* %12, align 4 ; [#uses=1]
- %53 = icmp ugt i32 %52, %tmp ; [#uses=1]
- br i1 %53, label %bb8.i, label %_ZN25GIM_TRIANGLE_CONTACT_DATA19mergepoints_genericI22DISTANCE_PLANE_3D_FUNC9btVector4EEvRKT0_fPK9btVector3jT_.exit
-
-_ZN25GIM_TRIANGLE_CONTACT_DATA19mergepoints_genericI22DISTANCE_PLANE_3D_FUNC9btVector4EEvRKT0_fPK9btVector3jT_.exit: ; preds = %bb8.i, %bb9.preheader.i, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_Z27PLANE_CLIP_TRIANGLE_GENERICI9btVector39btVector422DISTANCE_PLANE_3D_FUNCEjRKT0_RKT_S8_S8_PS6_T1_(%struct.btQuaternion* nocapture %plane, %struct.btQuadWord* nocapture %point0, %struct.btQuadWord* nocapture %point1, %struct.btQuadWord* nocapture %point2, %struct.btQuadWord* %clipped, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %distance_func) nounwind inlinehint {
-entry:
- %0 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 0 ; [#uses=4]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 1 ; [#uses=5]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btQuadWord* %point0, i32 0, i32 0, i32 2 ; [#uses=5]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fsub float %16, %18 ; [#uses=5]
- %20 = fcmp ule float %19, 0x3E80000000000000 ; [#uses=1]
- br i1 %20, label %bb, label %bb1
-
-bb: ; preds = %entry
- %21 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %3, float* %21, align 4
- %22 = load float* %7, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = load float* %13, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %24, float* %25, align 4
- %.pre = load float* %0, align 4 ; [#uses=1]
- %.pre13 = load float* %5, align 4 ; [#uses=1]
- %.pre14 = load float* %11, align 4 ; [#uses=1]
- %.pre15 = load float* %17, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %26 = phi float [ %.pre15, %bb ], [ %18, %entry ] ; [#uses=1]
- %27 = phi float [ %.pre14, %bb ], [ %12, %entry ] ; [#uses=1]
- %28 = phi float [ %.pre13, %bb ], [ %6, %entry ] ; [#uses=1]
- %29 = phi float [ %.pre, %bb ], [ %1, %entry ] ; [#uses=1]
- %clipped_count.0 = phi i32 [ 1, %bb ], [ 0, %entry ] ; [#uses=5]
- %30 = getelementptr inbounds %struct.btQuadWord* %point1, i32 0, i32 0, i32 0 ; [#uses=3]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fmul float %29, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %point1, i32 0, i32 0, i32 1 ; [#uses=4]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fmul float %28, %34 ; [#uses=1]
- %36 = fadd float %32, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %point1, i32 0, i32 0, i32 2 ; [#uses=4]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %27, %38 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = fsub float %40, %26 ; [#uses=4]
- %42 = fcmp ogt float %19, 0x3E80000000000000 ; [#uses=4]
- %43 = fcmp ogt float %41, 0x3E80000000000000 ; [#uses=3]
- %44 = xor i1 %43, %42 ; [#uses=1]
- br i1 %44, label %bb.i8, label %bb1.i9
-
-bb.i8: ; preds = %bb1
- %45 = fsub float -0.000000e+00, %19 ; [#uses=1]
- %46 = fsub float %41, %19 ; [#uses=1]
- %47 = fdiv float %45, %46 ; [#uses=4]
- %48 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0, i32 0, i32 0 ; [#uses=1]
- %49 = fsub float 1.000000e+00, %47 ; [#uses=3]
- %50 = load float* %2, align 4 ; [#uses=1]
- %51 = fmul float %49, %50 ; [#uses=1]
- %52 = fmul float %31, %47 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=1]
- store float %53, float* %48, align 4
- %54 = load float* %7, align 4 ; [#uses=1]
- %55 = fmul float %49, %54 ; [#uses=1]
- %56 = load float* %33, align 4 ; [#uses=1]
- %57 = fmul float %56, %47 ; [#uses=1]
- %58 = fadd float %55, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0, i32 0, i32 1 ; [#uses=1]
- store float %58, float* %59, align 4
- %60 = load float* %13, align 4 ; [#uses=1]
- %61 = fmul float %49, %60 ; [#uses=1]
- %62 = load float* %37, align 4 ; [#uses=1]
- %63 = fmul float %62, %47 ; [#uses=1]
- %64 = fadd float %61, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0, i32 0, i32 2 ; [#uses=1]
- store float %64, float* %65, align 4
- %66 = add i32 %clipped_count.0, 1 ; [#uses=1]
- br label %bb1.i9
-
-bb1.i9: ; preds = %bb.i8, %bb1
- %clipped_count.5 = phi i32 [ %66, %bb.i8 ], [ %clipped_count.0, %bb1 ] ; [#uses=5]
- br i1 %43, label %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit12, label %bb2.i10
-
-bb2.i10: ; preds = %bb1.i9
- %67 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.5, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %30, align 4 ; [#uses=1]
- store float %68, float* %67, align 4
- %69 = load float* %33, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.5, i32 0, i32 1 ; [#uses=1]
- store float %69, float* %70, align 4
- %71 = load float* %37, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.5, i32 0, i32 2 ; [#uses=1]
- store float %71, float* %72, align 4
- %73 = add i32 %clipped_count.5, 1 ; [#uses=1]
- br label %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit12
-
-_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit12: ; preds = %bb2.i10, %bb1.i9
- %clipped_count.6 = phi i32 [ %73, %bb2.i10 ], [ %clipped_count.5, %bb1.i9 ] ; [#uses=5]
- %74 = load float* %0, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btQuadWord* %point2, i32 0, i32 0, i32 0 ; [#uses=3]
- %76 = load float* %75, align 4 ; [#uses=2]
- %77 = fmul float %74, %76 ; [#uses=1]
- %78 = load float* %5, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btQuadWord* %point2, i32 0, i32 0, i32 1 ; [#uses=4]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fmul float %78, %80 ; [#uses=1]
- %82 = fadd float %77, %81 ; [#uses=1]
- %83 = load float* %11, align 4 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %point2, i32 0, i32 0, i32 2 ; [#uses=4]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fmul float %83, %85 ; [#uses=1]
- %87 = fadd float %82, %86 ; [#uses=1]
- %88 = load float* %17, align 4 ; [#uses=1]
- %89 = fsub float %87, %88 ; [#uses=4]
- %90 = fcmp ogt float %89, 0x3E80000000000000 ; [#uses=4]
- %91 = xor i1 %90, %43 ; [#uses=1]
- br i1 %91, label %bb.i3, label %bb1.i4
-
-bb.i3: ; preds = %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit12
- %92 = fsub float -0.000000e+00, %41 ; [#uses=1]
- %93 = fsub float %89, %41 ; [#uses=1]
- %94 = fdiv float %92, %93 ; [#uses=4]
- %95 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.6, i32 0, i32 0 ; [#uses=1]
- %96 = fsub float 1.000000e+00, %94 ; [#uses=3]
- %97 = load float* %30, align 4 ; [#uses=1]
- %98 = fmul float %96, %97 ; [#uses=1]
- %99 = fmul float %76, %94 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- store float %100, float* %95, align 4
- %101 = load float* %33, align 4 ; [#uses=1]
- %102 = fmul float %96, %101 ; [#uses=1]
- %103 = load float* %79, align 4 ; [#uses=1]
- %104 = fmul float %103, %94 ; [#uses=1]
- %105 = fadd float %102, %104 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.6, i32 0, i32 1 ; [#uses=1]
- store float %105, float* %106, align 4
- %107 = load float* %37, align 4 ; [#uses=1]
- %108 = fmul float %96, %107 ; [#uses=1]
- %109 = load float* %84, align 4 ; [#uses=1]
- %110 = fmul float %109, %94 ; [#uses=1]
- %111 = fadd float %108, %110 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.6, i32 0, i32 2 ; [#uses=1]
- store float %111, float* %112, align 4
- %113 = add i32 %clipped_count.6, 1 ; [#uses=1]
- br label %bb1.i4
-
-bb1.i4: ; preds = %bb.i3, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit12
- %clipped_count.3 = phi i32 [ %113, %bb.i3 ], [ %clipped_count.6, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit12 ] ; [#uses=6]
- br i1 %90, label %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit7, label %bb2.i5
-
-bb2.i5: ; preds = %bb1.i4
- %114 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 0 ; [#uses=1]
- %115 = load float* %75, align 4 ; [#uses=1]
- store float %115, float* %114, align 4
- %116 = load float* %79, align 4 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 1 ; [#uses=1]
- store float %116, float* %117, align 4
- %118 = load float* %84, align 4 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 2 ; [#uses=1]
- store float %118, float* %119, align 4
- %120 = add i32 %clipped_count.3, 1 ; [#uses=2]
- %121 = xor i1 %42, %90 ; [#uses=1]
- br i1 %121, label %bb.i, label %bb1.i
-
-_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit7: ; preds = %bb1.i4
- %122 = xor i1 %42, %90 ; [#uses=1]
- br i1 %122, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit7, %bb2.i5
- %clipped_count.416 = phi i32 [ %120, %bb2.i5 ], [ %clipped_count.3, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit7 ] ; [#uses=4]
- %123 = fsub float -0.000000e+00, %89 ; [#uses=1]
- %124 = fsub float %19, %89 ; [#uses=1]
- %125 = fdiv float %123, %124 ; [#uses=4]
- %126 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.416, i32 0, i32 0 ; [#uses=1]
- %127 = fsub float 1.000000e+00, %125 ; [#uses=3]
- %128 = load float* %75, align 4 ; [#uses=1]
- %129 = fmul float %127, %128 ; [#uses=1]
- %130 = load float* %2, align 4 ; [#uses=1]
- %131 = fmul float %130, %125 ; [#uses=1]
- %132 = fadd float %129, %131 ; [#uses=1]
- store float %132, float* %126, align 4
- %133 = load float* %79, align 4 ; [#uses=1]
- %134 = fmul float %127, %133 ; [#uses=1]
- %135 = load float* %7, align 4 ; [#uses=1]
- %136 = fmul float %135, %125 ; [#uses=1]
- %137 = fadd float %134, %136 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.416, i32 0, i32 1 ; [#uses=1]
- store float %137, float* %138, align 4
- %139 = load float* %84, align 4 ; [#uses=1]
- %140 = fmul float %127, %139 ; [#uses=1]
- %141 = load float* %13, align 4 ; [#uses=1]
- %142 = fmul float %141, %125 ; [#uses=1]
- %143 = fadd float %140, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.416, i32 0, i32 2 ; [#uses=1]
- store float %143, float* %144, align 4
- %145 = add i32 %clipped_count.416, 1 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit7, %bb2.i5
- %clipped_count.1 = phi i32 [ %145, %bb.i ], [ %clipped_count.3, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit7 ], [ %120, %bb2.i5 ] ; [#uses=5]
- br i1 %42, label %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %146 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 0 ; [#uses=1]
- %147 = load float* %2, align 4 ; [#uses=1]
- store float %147, float* %146, align 4
- %148 = load float* %7, align 4 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 1 ; [#uses=1]
- store float %148, float* %149, align 4
- %150 = load float* %13, align 4 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 2 ; [#uses=1]
- store float %150, float* %151, align 4
- %152 = add i32 %clipped_count.1, 1 ; [#uses=1]
- ret i32 %152
-
-_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit: ; preds = %bb1.i
- ret i32 %clipped_count.1
-}
-
-; [#uses=2]
-define linkonce_odr i32 @_Z26PLANE_CLIP_POLYGON_GENERICI9btVector39btVector422DISTANCE_PLANE_3D_FUNCEjRKT0_PKT_jPS6_T1_(%struct.btQuaternion* nocapture %plane, %struct.btQuadWord* nocapture %polygon_points, i32 %polygon_point_count, %struct.btQuadWord* nocapture %clipped, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %distance_func) nounwind inlinehint {
-entry:
- %0 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 1 ; [#uses=4]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 0, i32 0, i32 2 ; [#uses=4]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuaternion* %plane, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fsub float %16, %18 ; [#uses=5]
- %20 = fcmp ule float %19, 0x3E80000000000000 ; [#uses=1]
- br i1 %20, label %bb, label %bb3.preheader
-
-bb: ; preds = %entry
- %21 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %3, float* %21, align 4
- %22 = load float* %7, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = load float* %13, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %24, float* %25, align 4
- br label %bb3.preheader
-
-bb3.preheader: ; preds = %bb, %entry
- %clipped_count.0.ph = phi i32 [ 0, %entry ], [ 1, %bb ] ; [#uses=2]
- %26 = icmp ugt i32 %polygon_point_count, 1 ; [#uses=1]
- br i1 %26, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %bb3.preheader
- %tmp = add i32 %polygon_point_count, -1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %tmp15, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10 ] ; [#uses=4]
- %olddist.012 = phi float [ %19, %bb.nph ], [ %39, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10 ] ; [#uses=3]
- %clipped_count.011 = phi i32 [ %clipped_count.0.ph, %bb.nph ], [ %clipped_count.4, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10 ] ; [#uses=5]
- %tmp15 = add i32 %indvar, 1 ; [#uses=5]
- %scevgep16 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %tmp15, i32 0, i32 0 ; [#uses=2]
- %scevgep17 = getelementptr %struct.btQuadWord* %polygon_points, i32 %tmp15, i32 0, i32 1 ; [#uses=3]
- %scevgep18 = getelementptr %struct.btQuadWord* %polygon_points, i32 %tmp15, i32 0, i32 2 ; [#uses=3]
- %27 = load float* %0, align 4 ; [#uses=1]
- %28 = load float* %scevgep16, align 4 ; [#uses=2]
- %29 = fmul float %27, %28 ; [#uses=1]
- %30 = load float* %5, align 4 ; [#uses=1]
- %31 = load float* %scevgep17, align 4 ; [#uses=1]
- %32 = fmul float %30, %31 ; [#uses=1]
- %33 = fadd float %29, %32 ; [#uses=1]
- %34 = load float* %11, align 4 ; [#uses=1]
- %35 = load float* %scevgep18, align 4 ; [#uses=1]
- %36 = fmul float %34, %35 ; [#uses=1]
- %37 = fadd float %33, %36 ; [#uses=1]
- %38 = load float* %17, align 4 ; [#uses=1]
- %39 = fsub float %37, %38 ; [#uses=4]
- %40 = fcmp ogt float %olddist.012, 0x3E80000000000000 ; [#uses=1]
- %41 = fcmp ogt float %39, 0x3E80000000000000 ; [#uses=2]
- %42 = xor i1 %41, %40 ; [#uses=1]
- br i1 %42, label %bb.i6, label %bb1.i7
-
-bb.i6: ; preds = %bb2
- %scevgep2122 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %indvar, i32 0, i32 0 ; [#uses=1]
- %scevgep20 = getelementptr %struct.btQuadWord* %polygon_points, i32 %indvar, i32 0, i32 1 ; [#uses=1]
- %scevgep19 = getelementptr %struct.btQuadWord* %polygon_points, i32 %indvar, i32 0, i32 2 ; [#uses=1]
- %43 = fsub float -0.000000e+00, %olddist.012 ; [#uses=1]
- %44 = fsub float %39, %olddist.012 ; [#uses=1]
- %45 = fdiv float %43, %44 ; [#uses=4]
- %46 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.011, i32 0, i32 0 ; [#uses=1]
- %47 = fsub float 1.000000e+00, %45 ; [#uses=3]
- %48 = load float* %scevgep2122, align 4 ; [#uses=1]
- %49 = fmul float %47, %48 ; [#uses=1]
- %50 = fmul float %28, %45 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=1]
- store float %51, float* %46, align 4
- %52 = load float* %scevgep20, align 4 ; [#uses=1]
- %53 = fmul float %47, %52 ; [#uses=1]
- %54 = load float* %scevgep17, align 4 ; [#uses=1]
- %55 = fmul float %54, %45 ; [#uses=1]
- %56 = fadd float %53, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.011, i32 0, i32 1 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = load float* %scevgep19, align 4 ; [#uses=1]
- %59 = fmul float %47, %58 ; [#uses=1]
- %60 = load float* %scevgep18, align 4 ; [#uses=1]
- %61 = fmul float %60, %45 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.011, i32 0, i32 2 ; [#uses=1]
- store float %62, float* %63, align 4
- %64 = add i32 %clipped_count.011, 1 ; [#uses=1]
- br label %bb1.i7
-
-bb1.i7: ; preds = %bb.i6, %bb2
- %clipped_count.3 = phi i32 [ %64, %bb.i6 ], [ %clipped_count.011, %bb2 ] ; [#uses=5]
- br i1 %41, label %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10, label %bb2.i8
-
-bb2.i8: ; preds = %bb1.i7
- %65 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %scevgep16, align 4 ; [#uses=1]
- store float %66, float* %65, align 4
- %67 = load float* %scevgep17, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 1 ; [#uses=1]
- store float %67, float* %68, align 4
- %69 = load float* %scevgep18, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.3, i32 0, i32 2 ; [#uses=1]
- store float %69, float* %70, align 4
- %71 = add i32 %clipped_count.3, 1 ; [#uses=1]
- br label %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10
-
-_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10: ; preds = %bb2.i8, %bb1.i7
- %clipped_count.4 = phi i32 [ %71, %bb2.i8 ], [ %clipped_count.3, %bb1.i7 ] ; [#uses=2]
- %exitcond = icmp eq i32 %tmp15, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb2
-
-bb4: ; preds = %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10, %bb3.preheader
- %olddist.0.lcssa = phi float [ %19, %bb3.preheader ], [ %39, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10 ] ; [#uses=3]
- %clipped_count.0.lcssa = phi i32 [ %clipped_count.0.ph, %bb3.preheader ], [ %clipped_count.4, %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit10 ] ; [#uses=5]
- %72 = add i32 %polygon_point_count, -1 ; [#uses=3]
- %73 = fcmp ogt float %olddist.0.lcssa, 0x3E80000000000000 ; [#uses=1]
- %74 = fcmp ogt float %19, 0x3E80000000000000 ; [#uses=2]
- %75 = xor i1 %74, %73 ; [#uses=1]
- br i1 %75, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb4
- %76 = fsub float -0.000000e+00, %olddist.0.lcssa ; [#uses=1]
- %77 = fsub float %19, %olddist.0.lcssa ; [#uses=1]
- %78 = fdiv float %76, %77 ; [#uses=4]
- %79 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0.lcssa, i32 0, i32 0 ; [#uses=1]
- %80 = fsub float 1.000000e+00, %78 ; [#uses=3]
- %81 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %72, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = fmul float %80, %82 ; [#uses=1]
- %84 = load float* %2, align 4 ; [#uses=1]
- %85 = fmul float %84, %78 ; [#uses=1]
- %86 = fadd float %83, %85 ; [#uses=1]
- store float %86, float* %79, align 4
- %87 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %72, i32 0, i32 1 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fmul float %80, %88 ; [#uses=1]
- %90 = load float* %7, align 4 ; [#uses=1]
- %91 = fmul float %90, %78 ; [#uses=1]
- %92 = fadd float %89, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0.lcssa, i32 0, i32 1 ; [#uses=1]
- store float %92, float* %93, align 4
- %94 = getelementptr inbounds %struct.btQuadWord* %polygon_points, i32 %72, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fmul float %80, %95 ; [#uses=1]
- %97 = load float* %13, align 4 ; [#uses=1]
- %98 = fmul float %97, %78 ; [#uses=1]
- %99 = fadd float %96, %98 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.0.lcssa, i32 0, i32 2 ; [#uses=1]
- store float %99, float* %100, align 4
- %101 = add i32 %clipped_count.0.lcssa, 1 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %bb4
- %clipped_count.1 = phi i32 [ %101, %bb.i ], [ %clipped_count.0.lcssa, %bb4 ] ; [#uses=5]
- br i1 %74, label %_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %102 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 0 ; [#uses=1]
- %103 = load float* %2, align 4 ; [#uses=1]
- store float %103, float* %102, align 4
- %104 = load float* %7, align 4 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 1 ; [#uses=1]
- store float %104, float* %105, align 4
- %106 = load float* %13, align 4 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btQuadWord* %clipped, i32 %clipped_count.1, i32 0, i32 2 ; [#uses=1]
- store float %106, float* %107, align 4
- %108 = add i32 %clipped_count.1, 1 ; [#uses=1]
- ret i32 %108
-
-_Z26PLANE_CLIP_POLYGON_COLLECTI9btVector3EvRKT_S3_ffPS1_Rj.exit: ; preds = %bb1.i
- ret i32 %clipped_count.1
-}
-
-; [#uses=2]
-define linkonce_odr i32 @_ZN30GIM_TRIANGLE_CALCULATION_CACHE13clip_triangleERK9btVector4PK9btVector3S5_PS3_(%struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, %struct.btQuaternion* nocapture %tri_plane, %struct.btQuadWord* %tripoints, %struct.btQuadWord* nocapture %srcpoints, %struct.btQuadWord* nocapture %clip_points) nounwind inlinehint align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %edgeplane = alloca %struct.btQuaternion, align 8 ; [#uses=7]
- %3 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 1, i32 0, i32 0 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 0, i32 0, i32 0 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = fsub float %4, %6 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 1, i32 0, i32 1 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fsub float %9, %11 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 1, i32 0, i32 2 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 0, i32 0, i32 2 ; [#uses=2]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fsub float %14, %16 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %19 = getelementptr inbounds %struct.btQuaternion* %tri_plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fmul float %12, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuaternion* %tri_plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fmul float %17, %23 ; [#uses=1]
- %25 = fsub float %21, %24 ; [#uses=6]
- store float %25, float* %18, align 8
- %26 = getelementptr inbounds %struct.btQuaternion* %tri_plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %27 = load float* %26, align 4 ; [#uses=2]
- %28 = fmul float %17, %27 ; [#uses=1]
- %29 = fmul float %7, %20 ; [#uses=1]
- %30 = fsub float %28, %29 ; [#uses=6]
- %31 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 1 ; [#uses=6]
- store float %30, float* %31, align 4
- %32 = fmul float %7, %23 ; [#uses=1]
- %33 = fmul float %12, %27 ; [#uses=1]
- %34 = fsub float %32, %33 ; [#uses=6]
- %35 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 2 ; [#uses=6]
- store float %34, float* %35, align 8
- %36 = fmul float %25, %25 ; [#uses=1]
- %37 = fmul float %30, %30 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = fmul float %34, %34 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=3]
- %41 = fcmp ugt float %40, 0x3E7AD7F2A0000000 ; [#uses=1]
- br i1 %41, label %bb6, label %bb8
-
-bb6: ; preds = %entry
- %tmp65 = bitcast float %40 to i32 ; [#uses=1]
- %42 = fmul float %40, 5.000000e-01 ; [#uses=1]
- %43 = lshr i32 %tmp65, 1 ; [#uses=1]
- %44 = sub i32 1597463007, %43 ; [#uses=1]
- %tmp59 = bitcast i32 %44 to float ; [#uses=3]
- %45 = fmul float %42, %tmp59 ; [#uses=1]
- %46 = fmul float %45, %tmp59 ; [#uses=1]
- %47 = fsub float 1.500000e+00, %46 ; [#uses=1]
- %48 = fmul float %47, %tmp59 ; [#uses=4]
- %49 = fcmp olt float %48, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %49, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- %50 = fmul float %25, %48 ; [#uses=2]
- store float %50, float* %18, align 8
- %51 = fmul float %30, %48 ; [#uses=2]
- store float %51, float* %31, align 4
- %52 = fmul float %34, %48 ; [#uses=2]
- store float %52, float* %35, align 8
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6, %entry
- %53 = phi float [ %34, %entry ], [ %52, %bb7 ], [ %34, %bb6 ] ; [#uses=1]
- %54 = phi float [ %30, %entry ], [ %51, %bb7 ], [ %30, %bb6 ] ; [#uses=1]
- %55 = phi float [ %25, %entry ], [ %50, %bb7 ], [ %25, %bb6 ] ; [#uses=1]
- %56 = fmul float %6, %55 ; [#uses=1]
- %57 = fmul float %11, %54 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=1]
- %59 = fmul float %16, %53 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuaternion* %edgeplane, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- store float %60, float* %61, align 4
- %62 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 15, i32 0 ; [#uses=2]
- %63 = getelementptr inbounds %struct.btQuadWord* %srcpoints, i32 2 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btQuadWord* %srcpoints, i32 1 ; [#uses=1]
- %65 = call i32 @_Z27PLANE_CLIP_TRIANGLE_GENERICI9btVector39btVector422DISTANCE_PLANE_3D_FUNCEjRKT0_RKT_S8_S8_PS6_T1_(%struct.btQuaternion* %edgeplane, %struct.btQuadWord* %srcpoints, %struct.btQuadWord* %64, %struct.btQuadWord* %63, %struct.btQuadWord* %62, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0) nounwind ; [#uses=2]
- %66 = icmp eq i32 %65, 0 ; [#uses=1]
- br i1 %66, label %bb41, label %bb10
-
-bb10: ; preds = %bb8
- %67 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 2, i32 0, i32 0 ; [#uses=2]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = load float* %3, align 4 ; [#uses=2]
- %70 = fsub float %68, %69 ; [#uses=2]
- %71 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 2, i32 0, i32 1 ; [#uses=2]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = load float* %8, align 4 ; [#uses=2]
- %74 = fsub float %72, %73 ; [#uses=2]
- %75 = getelementptr inbounds %struct.btQuadWord* %tripoints, i32 2, i32 0, i32 2 ; [#uses=2]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = load float* %13, align 4 ; [#uses=2]
- %78 = fsub float %76, %77 ; [#uses=2]
- %79 = load float* %19, align 4 ; [#uses=2]
- %80 = fmul float %74, %79 ; [#uses=1]
- %81 = load float* %22, align 4 ; [#uses=2]
- %82 = fmul float %78, %81 ; [#uses=1]
- %83 = fsub float %80, %82 ; [#uses=6]
- store float %83, float* %18, align 8
- %84 = load float* %26, align 4 ; [#uses=2]
- %85 = fmul float %78, %84 ; [#uses=1]
- %86 = fmul float %70, %79 ; [#uses=1]
- %87 = fsub float %85, %86 ; [#uses=6]
- store float %87, float* %31, align 4
- %88 = fmul float %70, %81 ; [#uses=1]
- %89 = fmul float %74, %84 ; [#uses=1]
- %90 = fsub float %88, %89 ; [#uses=6]
- store float %90, float* %35, align 8
- %91 = fmul float %83, %83 ; [#uses=1]
- %92 = fmul float %87, %87 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %90, %90 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=3]
- %96 = fcmp ugt float %95, 0x3E7AD7F2A0000000 ; [#uses=1]
- br i1 %96, label %bb22, label %bb24
-
-bb22: ; preds = %bb10
- %tmp57 = bitcast float %95 to i32 ; [#uses=1]
- %97 = fmul float %95, 5.000000e-01 ; [#uses=1]
- %98 = lshr i32 %tmp57, 1 ; [#uses=1]
- %99 = sub i32 1597463007, %98 ; [#uses=1]
- %tmp51 = bitcast i32 %99 to float ; [#uses=3]
- %100 = fmul float %97, %tmp51 ; [#uses=1]
- %101 = fmul float %100, %tmp51 ; [#uses=1]
- %102 = fsub float 1.500000e+00, %101 ; [#uses=1]
- %103 = fmul float %102, %tmp51 ; [#uses=4]
- %104 = fcmp olt float %103, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %104, label %bb23, label %bb24
-
-bb23: ; preds = %bb22
- %105 = fmul float %83, %103 ; [#uses=2]
- store float %105, float* %18, align 8
- %106 = fmul float %87, %103 ; [#uses=2]
- store float %106, float* %31, align 4
- %107 = fmul float %90, %103 ; [#uses=2]
- store float %107, float* %35, align 8
- br label %bb24
-
-bb24: ; preds = %bb23, %bb22, %bb10
- %108 = phi float [ %90, %bb10 ], [ %107, %bb23 ], [ %90, %bb22 ] ; [#uses=1]
- %109 = phi float [ %87, %bb10 ], [ %106, %bb23 ], [ %87, %bb22 ] ; [#uses=1]
- %110 = phi float [ %83, %bb10 ], [ %105, %bb23 ], [ %83, %bb22 ] ; [#uses=1]
- %111 = fmul float %69, %110 ; [#uses=1]
- %112 = fmul float %73, %109 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fmul float %77, %108 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- store float %115, float* %61, align 4
- %116 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 16, i32 0 ; [#uses=2]
- %117 = call i32 @_Z26PLANE_CLIP_POLYGON_GENERICI9btVector39btVector422DISTANCE_PLANE_3D_FUNCEjRKT0_PKT_jPS6_T1_(%struct.btQuaternion* %edgeplane, %struct.btQuadWord* %62, i32 %65, %struct.btQuadWord* %116, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1) nounwind ; [#uses=2]
- %118 = icmp eq i32 %117, 0 ; [#uses=1]
- br i1 %118, label %bb41, label %bb26
-
-bb26: ; preds = %bb24
- %119 = load float* %5, align 4 ; [#uses=1]
- %120 = load float* %67, align 4 ; [#uses=2]
- %121 = fsub float %119, %120 ; [#uses=2]
- %122 = load float* %10, align 4 ; [#uses=1]
- %123 = load float* %71, align 4 ; [#uses=2]
- %124 = fsub float %122, %123 ; [#uses=2]
- %125 = load float* %15, align 4 ; [#uses=1]
- %126 = load float* %75, align 4 ; [#uses=2]
- %127 = fsub float %125, %126 ; [#uses=2]
- %128 = load float* %19, align 4 ; [#uses=2]
- %129 = fmul float %124, %128 ; [#uses=1]
- %130 = load float* %22, align 4 ; [#uses=2]
- %131 = fmul float %127, %130 ; [#uses=1]
- %132 = fsub float %129, %131 ; [#uses=6]
- store float %132, float* %18, align 8
- %133 = load float* %26, align 4 ; [#uses=2]
- %134 = fmul float %127, %133 ; [#uses=1]
- %135 = fmul float %121, %128 ; [#uses=1]
- %136 = fsub float %134, %135 ; [#uses=6]
- store float %136, float* %31, align 4
- %137 = fmul float %121, %130 ; [#uses=1]
- %138 = fmul float %124, %133 ; [#uses=1]
- %139 = fsub float %137, %138 ; [#uses=6]
- store float %139, float* %35, align 8
- %140 = fmul float %132, %132 ; [#uses=1]
- %141 = fmul float %136, %136 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=1]
- %143 = fmul float %139, %139 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=3]
- %145 = fcmp ugt float %144, 0x3E7AD7F2A0000000 ; [#uses=1]
- br i1 %145, label %bb38, label %bb40
-
-bb38: ; preds = %bb26
- %tmp49 = bitcast float %144 to i32 ; [#uses=1]
- %146 = fmul float %144, 5.000000e-01 ; [#uses=1]
- %147 = lshr i32 %tmp49, 1 ; [#uses=1]
- %148 = sub i32 1597463007, %147 ; [#uses=1]
- %tmp43 = bitcast i32 %148 to float ; [#uses=3]
- %149 = fmul float %146, %tmp43 ; [#uses=1]
- %150 = fmul float %149, %tmp43 ; [#uses=1]
- %151 = fsub float 1.500000e+00, %150 ; [#uses=1]
- %152 = fmul float %151, %tmp43 ; [#uses=4]
- %153 = fcmp olt float %152, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %153, label %bb39, label %bb40
-
-bb39: ; preds = %bb38
- %154 = fmul float %132, %152 ; [#uses=2]
- store float %154, float* %18, align 8
- %155 = fmul float %136, %152 ; [#uses=2]
- store float %155, float* %31, align 4
- %156 = fmul float %139, %152 ; [#uses=2]
- store float %156, float* %35, align 8
- br label %bb40
-
-bb40: ; preds = %bb39, %bb38, %bb26
- %157 = phi float [ %139, %bb26 ], [ %156, %bb39 ], [ %139, %bb38 ] ; [#uses=1]
- %158 = phi float [ %136, %bb26 ], [ %155, %bb39 ], [ %136, %bb38 ] ; [#uses=1]
- %159 = phi float [ %132, %bb26 ], [ %154, %bb39 ], [ %132, %bb38 ] ; [#uses=1]
- %160 = fmul float %120, %159 ; [#uses=1]
- %161 = fmul float %123, %158 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fmul float %126, %157 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- store float %164, float* %61, align 4
- %165 = call i32 @_Z26PLANE_CLIP_POLYGON_GENERICI9btVector39btVector422DISTANCE_PLANE_3D_FUNCEjRKT0_PKT_jPS6_T1_(%struct.btQuaternion* %edgeplane, %struct.btQuadWord* %116, i32 %117, %struct.btQuadWord* %clip_points, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %2) nounwind ; [#uses=1]
- ret i32 %165
-
-bb41: ; preds = %bb24, %bb8
- ret i32 0
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZN30GIM_TRIANGLE_CALCULATION_CACHE18triangle_collisionERK9btVector3S2_S2_fS2_S2_S2_fR25GIM_TRIANGLE_CONTACT_DATA(%struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, %struct.btQuadWord* nocapture %u0, %struct.btQuadWord* nocapture %u1, %struct.btQuadWord* nocapture %u2, float %margin_u, %struct.btQuadWord* nocapture %v0, %struct.btQuadWord* nocapture %v1, %struct.btQuadWord* nocapture %v2, float %margin_v, %struct.GIM_TRIANGLE_CONTACT* nocapture %contacts) nounwind inlinehint align 2 {
-entry:
- %0 = fadd float %margin_u, %margin_v ; [#uses=5]
- %1 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 0 ; [#uses=3]
- store float %0, float* %1, align 4
- %2 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=3]
- %3 = getelementptr inbounds %struct.btQuadWord* %u0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=7]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %u0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=7]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btQuadWord* %u0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=7]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %u0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btQuadWord* %u1, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=7]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btQuadWord* %u1, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=7]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btQuadWord* %u1, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=7]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %u1, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %u2, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=3]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %u2, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %u2, i32 0, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=3]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %u2, i32 0, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=3]
- %39 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=8]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=3]
- %42 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=8]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=3]
- %45 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=8]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=3]
- %51 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=8]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=3]
- %54 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=8]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=3]
- %57 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=8]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=3]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=3]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=3]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = fsub float %52, %40 ; [#uses=2]
- %75 = fsub float %55, %43 ; [#uses=2]
- %76 = fsub float %58, %46 ; [#uses=2]
- %77 = fsub float %64, %40 ; [#uses=2]
- %78 = fsub float %67, %43 ; [#uses=2]
- %79 = fsub float %70, %46 ; [#uses=2]
- %80 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 4, i32 0, i32 0, i32 0 ; [#uses=4]
- %81 = fmul float %75, %79 ; [#uses=1]
- %82 = fmul float %76, %78 ; [#uses=1]
- %83 = fsub float %81, %82 ; [#uses=6]
- store float %83, float* %80, align 4
- %84 = fmul float %76, %77 ; [#uses=1]
- %85 = fmul float %74, %79 ; [#uses=1]
- %86 = fsub float %84, %85 ; [#uses=6]
- %87 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 4, i32 0, i32 0, i32 1 ; [#uses=4]
- store float %86, float* %87, align 4
- %88 = fmul float %74, %78 ; [#uses=1]
- %89 = fmul float %75, %77 ; [#uses=1]
- %90 = fsub float %88, %89 ; [#uses=6]
- %91 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 4, i32 0, i32 0, i32 2 ; [#uses=4]
- store float %90, float* %91, align 4
- %92 = fmul float %83, %83 ; [#uses=1]
- %93 = fmul float %86, %86 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=1]
- %95 = fmul float %90, %90 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=3]
- %97 = fcmp ugt float %96, 0x3E7AD7F2A0000000 ; [#uses=1]
- br i1 %97, label %bb6, label %bb8
-
-bb6: ; preds = %entry
- %tmp157 = bitcast float %96 to i32 ; [#uses=1]
- %98 = fmul float %96, 5.000000e-01 ; [#uses=1]
- %99 = lshr i32 %tmp157, 1 ; [#uses=1]
- %100 = sub i32 1597463007, %99 ; [#uses=1]
- %tmp151 = bitcast i32 %100 to float ; [#uses=3]
- %101 = fmul float %98, %tmp151 ; [#uses=1]
- %102 = fmul float %101, %tmp151 ; [#uses=1]
- %103 = fsub float 1.500000e+00, %102 ; [#uses=1]
- %104 = fmul float %103, %tmp151 ; [#uses=4]
- %105 = fcmp olt float %104, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %105, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- %106 = fmul float %83, %104 ; [#uses=2]
- store float %106, float* %80, align 4
- %107 = fmul float %86, %104 ; [#uses=2]
- store float %107, float* %87, align 4
- %108 = fmul float %90, %104 ; [#uses=2]
- store float %108, float* %91, align 4
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6, %entry
- %109 = phi float [ %90, %entry ], [ %108, %bb7 ], [ %90, %bb6 ] ; [#uses=6]
- %110 = phi float [ %86, %entry ], [ %107, %bb7 ], [ %86, %bb6 ] ; [#uses=6]
- %111 = phi float [ %83, %entry ], [ %106, %bb7 ], [ %83, %bb6 ] ; [#uses=6]
- %112 = fmul float %40, %111 ; [#uses=1]
- %113 = fmul float %43, %110 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=1]
- %115 = fmul float %46, %109 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=6]
- %117 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 4, i32 0, i32 0, i32 3 ; [#uses=3]
- store float %116, float* %117, align 4
- %118 = fmul float %111, %4 ; [#uses=1]
- %119 = fmul float %110, %7 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %109, %10 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = fsub float %122, %116 ; [#uses=9]
- %124 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 9, i32 0 ; [#uses=5]
- store float %123, float* %124, align 4
- %125 = fmul float %111, %16 ; [#uses=1]
- %126 = fmul float %110, %19 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = fmul float %109, %22 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=1]
- %130 = fsub float %129, %116 ; [#uses=11]
- %131 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 9, i32 1 ; [#uses=5]
- store float %130, float* %131, align 4
- %132 = fmul float %111, %28 ; [#uses=1]
- %133 = fmul float %110, %31 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = fmul float %109, %34 ; [#uses=1]
- %136 = fadd float %134, %135 ; [#uses=1]
- %137 = fsub float %136, %116 ; [#uses=11]
- %138 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 9, i32 2 ; [#uses=5]
- store float %137, float* %138, align 4
- %139 = fmul float %123, %130 ; [#uses=2]
- %140 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 10 ; [#uses=1]
- store float %139, float* %140, align 4
- %141 = fmul float %123, %137 ; [#uses=2]
- %142 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 11 ; [#uses=1]
- store float %141, float* %142, align 4
- %143 = fcmp ule float %139, 0.000000e+00 ; [#uses=1]
- %144 = fcmp ule float %141, 0.000000e+00 ; [#uses=1]
- %or.cond = or i1 %143, %144 ; [#uses=1]
- br i1 %or.cond, label %bb35, label %bb10
-
-bb10: ; preds = %bb8
- %145 = fcmp olt float %123, 0.000000e+00 ; [#uses=1]
- %146 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 8, i32 0, i32 0 ; [#uses=2]
- br i1 %145, label %bb11, label %bb23
-
-bb11: ; preds = %bb10
- %147 = fcmp olt float %130, %137 ; [#uses=2]
- %iftmp.291.0 = select i1 %147, float %137, float %130 ; [#uses=1]
- %148 = fcmp olt float %123, %iftmp.291.0 ; [#uses=1]
- %.not = xor i1 %148, true ; [#uses=2]
- %brmerge = or i1 %.not, %147 ; [#uses=1]
- %.mux = select i1 %.not, float* %124, float* %138 ; [#uses=1]
- %iftmp.290.0.in = select i1 %brmerge, float* %.mux, float* %131 ; [#uses=1]
- %iftmp.290.0 = load float* %iftmp.290.0.in, align 4 ; [#uses=1]
- %149 = fsub float -0.000000e+00, %iftmp.290.0 ; [#uses=3]
- store float %149, float* %146, align 4
- %150 = fcmp olt float %0, %149 ; [#uses=1]
- br i1 %150, label %bb140, label %bb22
-
-bb22: ; preds = %bb11
- %151 = fadd float %40, %52 ; [#uses=2]
- %152 = fsub float %151, %52 ; [#uses=3]
- store float %152, float* %50, align 4
- %153 = fsub float %151, %152 ; [#uses=2]
- store float %153, float* %38, align 4
- %154 = fadd float %43, %55 ; [#uses=2]
- %155 = fsub float %154, %55 ; [#uses=3]
- store float %155, float* %53, align 4
- %156 = fsub float %154, %155 ; [#uses=2]
- store float %156, float* %41, align 4
- %157 = fadd float %46, %58 ; [#uses=2]
- %158 = fsub float %157, %58 ; [#uses=3]
- store float %158, float* %56, align 4
- %159 = fsub float %157, %158 ; [#uses=2]
- store float %159, float* %44, align 4
- %160 = fsub float -0.000000e+00, %111 ; [#uses=1]
- store float %160, float* %80, align 4
- %161 = fsub float -0.000000e+00, %110 ; [#uses=1]
- store float %161, float* %87, align 4
- %162 = fsub float -0.000000e+00, %109 ; [#uses=1]
- store float %162, float* %91, align 4
- %163 = fsub float -0.000000e+00, %116 ; [#uses=1]
- store float %163, float* %117, align 4
- br label %bb57
-
-bb23: ; preds = %bb10
- %164 = fcmp ogt float %130, %137 ; [#uses=2]
- %iftmp.295.0 = select i1 %164, float %137, float %130 ; [#uses=1]
- %165 = fcmp ogt float %123, %iftmp.295.0 ; [#uses=1]
- %.not166 = xor i1 %165, true ; [#uses=2]
- %brmerge167 = or i1 %.not166, %164 ; [#uses=1]
- %.mux168 = select i1 %.not166, float* %124, float* %138 ; [#uses=1]
- %iftmp.294.0.in = select i1 %brmerge167, float* %.mux168, float* %131 ; [#uses=1]
- %iftmp.294.0 = load float* %iftmp.294.0.in, align 4 ; [#uses=3]
- store float %iftmp.294.0, float* %146, align 4
- %166 = fcmp ogt float %iftmp.294.0, %0 ; [#uses=1]
- br i1 %166, label %bb140, label %bb57
-
-bb35: ; preds = %bb8
- %167 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 8, i32 0, i32 0 ; [#uses=3]
- %168 = fadd float %123, %130 ; [#uses=1]
- %169 = fadd float %168, %137 ; [#uses=1]
- %170 = fdiv float %169, 3.000000e+00 ; [#uses=2]
- store float %170, float* %167, align 4
- %171 = fcmp olt float %170, 0.000000e+00 ; [#uses=1]
- br i1 %171, label %bb37, label %bb47
-
-bb37: ; preds = %bb35
- %172 = fadd float %40, %52 ; [#uses=2]
- %173 = fsub float %172, %52 ; [#uses=3]
- store float %173, float* %50, align 4
- %174 = fsub float %172, %173 ; [#uses=2]
- store float %174, float* %38, align 4
- %175 = fadd float %43, %55 ; [#uses=2]
- %176 = fsub float %175, %55 ; [#uses=3]
- store float %176, float* %53, align 4
- %177 = fsub float %175, %176 ; [#uses=2]
- store float %177, float* %41, align 4
- %178 = fadd float %46, %58 ; [#uses=2]
- %179 = fsub float %178, %58 ; [#uses=3]
- store float %179, float* %56, align 4
- %180 = fsub float %178, %179 ; [#uses=2]
- store float %180, float* %44, align 4
- %181 = fsub float -0.000000e+00, %111 ; [#uses=1]
- store float %181, float* %80, align 4
- %182 = fsub float -0.000000e+00, %110 ; [#uses=1]
- store float %182, float* %87, align 4
- %183 = fsub float -0.000000e+00, %109 ; [#uses=1]
- store float %183, float* %91, align 4
- %184 = fsub float -0.000000e+00, %116 ; [#uses=1]
- store float %184, float* %117, align 4
- %185 = fcmp olt float %130, %137 ; [#uses=2]
- %iftmp.300.0 = select i1 %185, float %137, float %130 ; [#uses=1]
- %186 = fcmp olt float %123, %iftmp.300.0 ; [#uses=1]
- %.not169 = xor i1 %186, true ; [#uses=2]
- %brmerge170 = or i1 %.not169, %185 ; [#uses=1]
- %.mux171 = select i1 %.not169, float* %124, float* %138 ; [#uses=1]
- %iftmp.299.0.in = select i1 %brmerge170, float* %.mux171, float* %131 ; [#uses=1]
- %iftmp.299.0 = load float* %iftmp.299.0.in, align 4 ; [#uses=1]
- %187 = fsub float -0.000000e+00, %iftmp.299.0 ; [#uses=2]
- store float %187, float* %167, align 4
- br label %bb57
-
-bb47: ; preds = %bb35
- %188 = fcmp ogt float %130, %137 ; [#uses=2]
- %iftmp.303.0 = select i1 %188, float %137, float %130 ; [#uses=1]
- %189 = fcmp ogt float %123, %iftmp.303.0 ; [#uses=1]
- %.not172 = xor i1 %189, true ; [#uses=2]
- %brmerge173 = or i1 %.not172, %188 ; [#uses=1]
- %.mux174 = select i1 %.not172, float* %124, float* %138 ; [#uses=1]
- %iftmp.302.0.in = select i1 %brmerge173, float* %.mux174, float* %131 ; [#uses=1]
- %iftmp.302.0 = load float* %iftmp.302.0.in, align 4 ; [#uses=2]
- store float %iftmp.302.0, float* %167, align 4
- br label %bb57
-
-bb57: ; preds = %bb47, %bb37, %bb23, %bb22
- %190 = phi float [ %iftmp.302.0, %bb47 ], [ %187, %bb37 ], [ %iftmp.294.0, %bb23 ], [ %149, %bb22 ] ; [#uses=1]
- %191 = phi float [ %58, %bb47 ], [ %179, %bb37 ], [ %58, %bb23 ], [ %158, %bb22 ] ; [#uses=1]
- %192 = phi float [ %55, %bb47 ], [ %176, %bb37 ], [ %55, %bb23 ], [ %155, %bb22 ] ; [#uses=1]
- %193 = phi float [ %52, %bb47 ], [ %173, %bb37 ], [ %52, %bb23 ], [ %152, %bb22 ] ; [#uses=1]
- %194 = phi float [ %46, %bb47 ], [ %180, %bb37 ], [ %46, %bb23 ], [ %159, %bb22 ] ; [#uses=1]
- %195 = phi float [ %43, %bb47 ], [ %177, %bb37 ], [ %43, %bb23 ], [ %156, %bb22 ] ; [#uses=1]
- %196 = phi float [ %40, %bb47 ], [ %174, %bb37 ], [ %40, %bb23 ], [ %153, %bb22 ] ; [#uses=1]
- %197 = fsub float %16, %4 ; [#uses=2]
- %198 = fsub float %19, %7 ; [#uses=2]
- %199 = fsub float %22, %10 ; [#uses=2]
- %200 = fsub float %28, %4 ; [#uses=2]
- %201 = fsub float %31, %7 ; [#uses=2]
- %202 = fsub float %34, %10 ; [#uses=2]
- %203 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=4]
- %204 = fmul float %198, %202 ; [#uses=1]
- %205 = fmul float %199, %201 ; [#uses=1]
- %206 = fsub float %204, %205 ; [#uses=6]
- store float %206, float* %203, align 4
- %207 = fmul float %199, %200 ; [#uses=1]
- %208 = fmul float %197, %202 ; [#uses=1]
- %209 = fsub float %207, %208 ; [#uses=6]
- %210 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=4]
- store float %209, float* %210, align 4
- %211 = fmul float %197, %201 ; [#uses=1]
- %212 = fmul float %198, %200 ; [#uses=1]
- %213 = fsub float %211, %212 ; [#uses=6]
- %214 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=4]
- store float %213, float* %214, align 4
- %215 = fmul float %206, %206 ; [#uses=1]
- %216 = fmul float %209, %209 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=1]
- %218 = fmul float %213, %213 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=3]
- %220 = fcmp ugt float %219, 0x3E7AD7F2A0000000 ; [#uses=1]
- br i1 %220, label %bb70, label %bb72
-
-bb70: ; preds = %bb57
- %tmp149 = bitcast float %219 to i32 ; [#uses=1]
- %221 = fmul float %219, 5.000000e-01 ; [#uses=1]
- %222 = lshr i32 %tmp149, 1 ; [#uses=1]
- %223 = sub i32 1597463007, %222 ; [#uses=1]
- %tmp143 = bitcast i32 %223 to float ; [#uses=3]
- %224 = fmul float %221, %tmp143 ; [#uses=1]
- %225 = fmul float %224, %tmp143 ; [#uses=1]
- %226 = fsub float 1.500000e+00, %225 ; [#uses=1]
- %227 = fmul float %226, %tmp143 ; [#uses=4]
- %228 = fcmp olt float %227, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %228, label %bb71, label %bb72
-
-bb71: ; preds = %bb70
- %229 = fmul float %206, %227 ; [#uses=2]
- store float %229, float* %203, align 4
- %230 = fmul float %209, %227 ; [#uses=2]
- store float %230, float* %210, align 4
- %231 = fmul float %213, %227 ; [#uses=2]
- store float %231, float* %214, align 4
- br label %bb72
-
-bb72: ; preds = %bb71, %bb70, %bb57
- %232 = phi float [ %213, %bb57 ], [ %231, %bb71 ], [ %213, %bb70 ] ; [#uses=6]
- %233 = phi float [ %209, %bb57 ], [ %230, %bb71 ], [ %209, %bb70 ] ; [#uses=6]
- %234 = phi float [ %206, %bb57 ], [ %229, %bb71 ], [ %206, %bb70 ] ; [#uses=6]
- %235 = fmul float %4, %234 ; [#uses=1]
- %236 = fmul float %7, %233 ; [#uses=1]
- %237 = fadd float %235, %236 ; [#uses=1]
- %238 = fmul float %10, %232 ; [#uses=1]
- %239 = fadd float %237, %238 ; [#uses=6]
- %240 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 3, i32 0, i32 0, i32 3 ; [#uses=3]
- store float %239, float* %240, align 4
- %241 = fmul float %234, %196 ; [#uses=1]
- %242 = fmul float %233, %195 ; [#uses=1]
- %243 = fadd float %241, %242 ; [#uses=1]
- %244 = fmul float %232, %194 ; [#uses=1]
- %245 = fadd float %243, %244 ; [#uses=1]
- %246 = fsub float %245, %239 ; [#uses=9]
- %247 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 12, i32 0 ; [#uses=5]
- store float %246, float* %247, align 4
- %248 = fmul float %234, %193 ; [#uses=1]
- %249 = fmul float %233, %192 ; [#uses=1]
- %250 = fadd float %248, %249 ; [#uses=1]
- %251 = fmul float %232, %191 ; [#uses=1]
- %252 = fadd float %250, %251 ; [#uses=1]
- %253 = fsub float %252, %239 ; [#uses=11]
- %254 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 12, i32 1 ; [#uses=5]
- store float %253, float* %254, align 4
- %255 = fmul float %234, %64 ; [#uses=1]
- %256 = fmul float %233, %67 ; [#uses=1]
- %257 = fadd float %255, %256 ; [#uses=1]
- %258 = fmul float %232, %70 ; [#uses=1]
- %259 = fadd float %257, %258 ; [#uses=1]
- %260 = fsub float %259, %239 ; [#uses=11]
- %261 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 12, i32 2 ; [#uses=5]
- store float %260, float* %261, align 4
- %262 = fmul float %246, %253 ; [#uses=2]
- %263 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 13 ; [#uses=1]
- store float %262, float* %263, align 4
- %264 = fmul float %246, %260 ; [#uses=2]
- %265 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 14 ; [#uses=1]
- store float %264, float* %265, align 4
- %266 = fcmp ule float %262, 0.000000e+00 ; [#uses=1]
- %267 = fcmp ule float %264, 0.000000e+00 ; [#uses=1]
- %or.cond175 = or i1 %266, %267 ; [#uses=1]
- br i1 %or.cond175, label %bb100, label %bb74
-
-bb74: ; preds = %bb72
- %268 = fcmp olt float %246, 0.000000e+00 ; [#uses=1]
- br i1 %268, label %bb75, label %bb88
-
-bb75: ; preds = %bb74
- %269 = fcmp olt float %253, %260 ; [#uses=2]
- %iftmp.310.0 = select i1 %269, float %260, float %253 ; [#uses=1]
- %270 = fcmp olt float %246, %iftmp.310.0 ; [#uses=1]
- %.not176 = xor i1 %270, true ; [#uses=2]
- %brmerge177 = or i1 %.not176, %269 ; [#uses=1]
- %.mux178 = select i1 %.not176, float* %247, float* %261 ; [#uses=1]
- %iftmp.309.0.in = select i1 %brmerge177, float* %.mux178, float* %254 ; [#uses=1]
- %iftmp.309.0 = load float* %iftmp.309.0.in, align 4 ; [#uses=1]
- %271 = fsub float -0.000000e+00, %iftmp.309.0 ; [#uses=3]
- %272 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- store float %271, float* %272, align 4
- %273 = fcmp olt float %0, %271 ; [#uses=1]
- br i1 %273, label %bb140, label %bb87
-
-bb87: ; preds = %bb75
- %274 = fadd float %4, %16 ; [#uses=2]
- %275 = fsub float %274, %16 ; [#uses=2]
- store float %275, float* %14, align 4
- %276 = fsub float %274, %275 ; [#uses=1]
- store float %276, float* %2, align 4
- %277 = fadd float %7, %19 ; [#uses=2]
- %278 = fsub float %277, %19 ; [#uses=2]
- store float %278, float* %17, align 4
- %279 = fsub float %277, %278 ; [#uses=1]
- store float %279, float* %5, align 4
- %280 = fadd float %10, %22 ; [#uses=2]
- %281 = fsub float %280, %22 ; [#uses=2]
- store float %281, float* %20, align 4
- %282 = fsub float %280, %281 ; [#uses=1]
- store float %282, float* %8, align 4
- %283 = fsub float -0.000000e+00, %234 ; [#uses=1]
- store float %283, float* %203, align 4
- %284 = fsub float -0.000000e+00, %233 ; [#uses=1]
- store float %284, float* %210, align 4
- %285 = fsub float -0.000000e+00, %232 ; [#uses=1]
- store float %285, float* %214, align 4
- %286 = fsub float -0.000000e+00, %239 ; [#uses=1]
- store float %286, float* %240, align 4
- br label %bb122
-
-bb88: ; preds = %bb74
- %287 = fcmp ogt float %253, %260 ; [#uses=2]
- %iftmp.314.0 = select i1 %287, float %260, float %253 ; [#uses=1]
- %288 = fcmp ogt float %246, %iftmp.314.0 ; [#uses=1]
- %.not179 = xor i1 %288, true ; [#uses=2]
- %brmerge180 = or i1 %.not179, %287 ; [#uses=1]
- %.mux181 = select i1 %.not179, float* %247, float* %261 ; [#uses=1]
- %iftmp.313.0.in = select i1 %brmerge180, float* %.mux181, float* %254 ; [#uses=1]
- %iftmp.313.0 = load float* %iftmp.313.0.in, align 4 ; [#uses=3]
- %289 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.313.0, float* %289, align 4
- %290 = fcmp ogt float %iftmp.313.0, %0 ; [#uses=1]
- br i1 %290, label %bb140, label %bb122
-
-bb100: ; preds = %bb72
- %291 = fadd float %246, %253 ; [#uses=1]
- %292 = fadd float %291, %260 ; [#uses=1]
- %293 = fdiv float %292, 3.000000e+00 ; [#uses=2]
- %294 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=3]
- store float %293, float* %294, align 4
- %295 = fcmp olt float %293, 0.000000e+00 ; [#uses=1]
- br i1 %295, label %bb102, label %bb112
-
-bb102: ; preds = %bb100
- %296 = fadd float %4, %16 ; [#uses=2]
- %297 = fsub float %296, %16 ; [#uses=2]
- store float %297, float* %14, align 4
- %298 = fsub float %296, %297 ; [#uses=1]
- store float %298, float* %2, align 4
- %299 = fadd float %7, %19 ; [#uses=2]
- %300 = fsub float %299, %19 ; [#uses=2]
- store float %300, float* %17, align 4
- %301 = fsub float %299, %300 ; [#uses=1]
- store float %301, float* %5, align 4
- %302 = fadd float %10, %22 ; [#uses=2]
- %303 = fsub float %302, %22 ; [#uses=2]
- store float %303, float* %20, align 4
- %304 = fsub float %302, %303 ; [#uses=1]
- store float %304, float* %8, align 4
- %305 = fsub float -0.000000e+00, %234 ; [#uses=1]
- store float %305, float* %203, align 4
- %306 = fsub float -0.000000e+00, %233 ; [#uses=1]
- store float %306, float* %210, align 4
- %307 = fsub float -0.000000e+00, %232 ; [#uses=1]
- store float %307, float* %214, align 4
- %308 = fsub float -0.000000e+00, %239 ; [#uses=1]
- store float %308, float* %240, align 4
- %309 = fcmp olt float %253, %260 ; [#uses=2]
- %iftmp.319.0 = select i1 %309, float %260, float %253 ; [#uses=1]
- %310 = fcmp olt float %246, %iftmp.319.0 ; [#uses=1]
- %.not182 = xor i1 %310, true ; [#uses=2]
- %brmerge183 = or i1 %.not182, %309 ; [#uses=1]
- %.mux184 = select i1 %.not182, float* %247, float* %261 ; [#uses=1]
- %iftmp.318.0.in = select i1 %brmerge183, float* %.mux184, float* %254 ; [#uses=1]
- %iftmp.318.0 = load float* %iftmp.318.0.in, align 4 ; [#uses=1]
- %311 = fsub float -0.000000e+00, %iftmp.318.0 ; [#uses=2]
- store float %311, float* %294, align 4
- br label %bb122
-
-bb112: ; preds = %bb100
- %312 = fcmp ogt float %253, %260 ; [#uses=2]
- %iftmp.322.0 = select i1 %312, float %260, float %253 ; [#uses=1]
- %313 = fcmp ogt float %246, %iftmp.322.0 ; [#uses=1]
- %.not185 = xor i1 %313, true ; [#uses=2]
- %brmerge186 = or i1 %.not185, %312 ; [#uses=1]
- %.mux187 = select i1 %.not185, float* %247, float* %261 ; [#uses=1]
- %iftmp.321.0.in = select i1 %brmerge186, float* %.mux187, float* %254 ; [#uses=1]
- %iftmp.321.0 = load float* %iftmp.321.0.in, align 4 ; [#uses=2]
- store float %iftmp.321.0, float* %294, align 4
- br label %bb122
-
-bb122: ; preds = %bb112, %bb102, %bb88, %bb87
- %314 = phi float [ %iftmp.321.0, %bb112 ], [ %311, %bb102 ], [ %iftmp.313.0, %bb88 ], [ %271, %bb87 ] ; [#uses=1]
- %315 = fcmp olt float %190, %314 ; [#uses=1]
- %316 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 17, i32 0 ; [#uses=4]
- br i1 %315, label %bb134, label %bb131
-
-bb131: ; preds = %bb122
- %317 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %318 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %319 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 4 ; [#uses=2]
- %320 = tail call i32 @_ZN30GIM_TRIANGLE_CALCULATION_CACHE13clip_triangleERK9btVector4PK9btVector3S5_PS3_(%struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, %struct.btQuaternion* %319, %struct.btQuadWord* %318, %struct.btQuadWord* %317, %struct.btQuadWord* %316) inlinehint ; [#uses=2]
- %321 = icmp eq i32 %320, 0 ; [#uses=1]
- br i1 %321, label %bb140, label %bb133
-
-bb133: ; preds = %bb131
- %322 = load float* %1, align 4 ; [#uses=1]
- tail call void @_ZN25GIM_TRIANGLE_CONTACT_DATA12merge_pointsERK9btVector4fPK9btVector3j(%struct.GIM_TRIANGLE_CONTACT* %contacts, %struct.btQuaternion* %319, float %322, %struct.btQuadWord* %316, i32 %320) inlinehint
- br label %bb137
-
-bb134: ; preds = %bb122
- %323 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %324 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %325 = getelementptr inbounds %struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, i32 0, i32 3 ; [#uses=2]
- %326 = tail call i32 @_ZN30GIM_TRIANGLE_CALCULATION_CACHE13clip_triangleERK9btVector4PK9btVector3S5_PS3_(%struct.GIM_TRIANGLE_CALCULATION_CACHE* %this, %struct.btQuaternion* %325, %struct.btQuadWord* %324, %struct.btQuadWord* %323, %struct.btQuadWord* %316) inlinehint ; [#uses=2]
- %327 = icmp eq i32 %326, 0 ; [#uses=1]
- br i1 %327, label %bb140, label %bb136
-
-bb136: ; preds = %bb134
- %328 = load float* %1, align 4 ; [#uses=1]
- tail call void @_ZN25GIM_TRIANGLE_CONTACT_DATA12merge_pointsERK9btVector4fPK9btVector3j(%struct.GIM_TRIANGLE_CONTACT* %contacts, %struct.btQuaternion* %325, float %328, %struct.btQuadWord* %316, i32 %326) inlinehint
- %329 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=2]
- %330 = load float* %329, align 4 ; [#uses=1]
- %331 = fmul float %330, -1.000000e+00 ; [#uses=1]
- store float %331, float* %329, align 4
- %332 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=2]
- %333 = load float* %332, align 4 ; [#uses=1]
- %334 = fmul float %333, -1.000000e+00 ; [#uses=1]
- store float %334, float* %332, align 4
- %335 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=2]
- %336 = load float* %335, align 4 ; [#uses=1]
- %337 = fmul float %336, -1.000000e+00 ; [#uses=1]
- store float %337, float* %335, align 4
- br label %bb137
-
-bb137: ; preds = %bb136, %bb133
- %338 = getelementptr inbounds %struct.GIM_TRIANGLE_CONTACT* %contacts, i32 0, i32 1 ; [#uses=1]
- %339 = load i32* %338, align 4 ; [#uses=1]
- %not. = icmp ne i32 %339, 0 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb140: ; preds = %bb134, %bb131, %bb88, %bb75, %bb23, %bb11
- ret i8 0
-}
-
-; [#uses=0]
-define void @_ZN27btContinuousConvexCollisionC2EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btContinuousConvexCollision* nocapture %this, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %penetrationDepthSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %1, align 4
- %2 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %penetrationDepthSolver, %struct.btActionInterface** %2, align 4
- %3 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexA, %struct.btConvexShape** %3, align 4
- %4 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %convexB, %struct.btConvexShape** %4, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btPointCollectorD1Ev(%struct..0btIntermediateResult* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btPointCollectorD0Ev(%struct..0btIntermediateResult* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0btIntermediateResult* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btPointCollector20setShapeIdentifiersAEii(%struct..0btIntermediateResult* nocapture %this, i32 %partId0, i32 %index0) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btPointCollector20setShapeIdentifiersBEii(%struct..0btIntermediateResult* nocapture %this, i32 %partId1, i32 %index1) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btPointCollector15addContactPointERK9btVector3S2_f(%struct..0btIntermediateResult* nocapture %this, %struct.btQuadWord* nocapture %normalOnBInWorld, %struct.btQuadWord* nocapture %pointInWorld, float %depth) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 3 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fcmp ogt float %1, %depth ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %3, align 4
- %4 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- store float %depth, float* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN27btContinuousConvexCollisionD1Ev(%struct.btContinuousConvexCollision* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN27btContinuousConvexCollisionD0Ev(%struct.btContinuousConvexCollision* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btContinuousConvexCollision* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=2]
-define zeroext i8 @_ZN27btContinuousConvexCollision16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btContinuousConvexCollision* nocapture %this, %struct.btTransform* %fromA, %struct.btTransform* nocapture %toA, %struct.btTransform* %fromB, %struct.btTransform* nocapture %toB, %"struct.btConvexCast::CastResult"* %result) align 2 {
-entry:
- %axis.i70 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %angle.i71 = alloca float, align 4 ; [#uses=2]
- %axis.i = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %angle.i = alloca float, align 4 ; [#uses=2]
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %linVelA = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %angVelA = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %linVelB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %angVelB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %c = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %raySphere = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=7]
- %pointCollector1 = alloca %struct..0btIntermediateResult, align 8 ; [#uses=12]
- %gjk = alloca %struct.btGjkPairDetector, align 8 ; [#uses=2]
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=35]
- %interpolatedTransA = alloca %struct.btTransform, align 8 ; [#uses=18]
- %interpolatedTransB = alloca %struct.btTransform, align 8 ; [#uses=17]
- %pointCollector = alloca %struct..0btIntermediateResult, align 8 ; [#uses=12]
- %gjk7 = alloca %struct.btGjkPairDetector, align 8 ; [#uses=2]
- %input8 = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=35]
- %2 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 1 ; [#uses=3]
- %3 = load %struct.btVoronoiSimplexSolver** %2, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver5resetEv(%struct.btVoronoiSimplexSolver* %3)
- %4 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fsub float %5, %7 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fsub float %10, %12 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fsub float %15, %17 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %19, align 8
- %20 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %13, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %8, float* %21, align 8
- %22 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- call void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* %fromA, %struct.btTransform* %toA, %struct.btQuadWord* %axis.i, float* %angle.i) nounwind
- %23 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 8 ; [#uses=1]
- %25 = load float* %angle.i, align 4 ; [#uses=3]
- %26 = fmul float %24, %25 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %28, %25 ; [#uses=3]
- %30 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 8 ; [#uses=1]
- %32 = fmul float %31, %25 ; [#uses=3]
- %33 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %32, float* %33, align 8
- %34 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %29, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %26, float* %35, align 8
- %36 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fsub float %38, %40 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fsub float %43, %45 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fsub float %48, %50 ; [#uses=2]
- %52 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %51, float* %52, align 8
- %53 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %53, align 4
- %54 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %41, float* %54, align 8
- %55 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %55, align 4
- call void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* %fromB, %struct.btTransform* %toB, %struct.btQuadWord* %axis.i70, float* %angle.i71) nounwind
- %56 = getelementptr inbounds %struct.btQuadWord* %axis.i70, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 8 ; [#uses=1]
- %58 = load float* %angle.i71, align 4 ; [#uses=3]
- %59 = fmul float %57, %58 ; [#uses=3]
- %60 = getelementptr inbounds %struct.btQuadWord* %axis.i70, i32 0, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %61, %58 ; [#uses=3]
- %63 = getelementptr inbounds %struct.btQuadWord* %axis.i70, i32 0, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 8 ; [#uses=1]
- %65 = fmul float %64, %58 ; [#uses=3]
- %66 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %65, float* %66, align 8
- %67 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %62, float* %67, align 4
- %68 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %59, float* %68, align 8
- %69 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %69, align 4
- %70 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 3 ; [#uses=4]
- %71 = load %struct.btConvexShape** %70, align 4 ; [#uses=2]
- %72 = getelementptr inbounds %struct.btConvexShape* %71, i32 0, i32 0, i32 0 ; [#uses=1]
- %73 = load i32 (...)*** %72, align 4 ; [#uses=1]
- %74 = getelementptr inbounds i32 (...)** %73, i32 4 ; [#uses=1]
- %75 = load i32 (...)** %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btConvexShape* %71, i32 0, i32 0 ; [#uses=1]
- %77 = bitcast i32 (...)* %75 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %78 = call float %77(%struct.btCollisionShape* %76) ; [#uses=1]
- %79 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 4 ; [#uses=4]
- %80 = load %struct.btConvexShape** %79, align 4 ; [#uses=2]
- %81 = getelementptr inbounds %struct.btConvexShape* %80, i32 0, i32 0, i32 0 ; [#uses=1]
- %82 = load i32 (...)*** %81, align 4 ; [#uses=1]
- %83 = getelementptr inbounds i32 (...)** %82, i32 4 ; [#uses=1]
- %84 = load i32 (...)** %83, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btConvexShape* %80, i32 0, i32 0 ; [#uses=1]
- %86 = bitcast i32 (...)* %84 to float (%struct.btCollisionShape*)* ; [#uses=1]
- %87 = call float %86(%struct.btCollisionShape* %85) ; [#uses=1]
- %88 = fmul float %32, %32 ; [#uses=1]
- %89 = fmul float %29, %29 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %26, %26 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = call float @sqrtf(float %92) nounwind readonly ; [#uses=1]
- %94 = fmul float %93, %78 ; [#uses=1]
- %95 = fmul float %65, %65 ; [#uses=1]
- %96 = fmul float %62, %62 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %59, %59 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = call float @sqrtf(float %99) nounwind readonly ; [#uses=1]
- %101 = fmul float %100, %87 ; [#uses=1]
- %102 = fadd float %94, %101 ; [#uses=3]
- %103 = fsub float %41, %8 ; [#uses=4]
- %104 = fsub float %46, %13 ; [#uses=4]
- %105 = fsub float %51, %18 ; [#uses=4]
- %106 = fmul float %105, %105 ; [#uses=1]
- %107 = fmul float %104, %104 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %103, %103 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = call float @sqrtf(float %110) nounwind readonly ; [#uses=1]
- %112 = fadd float %111, %102 ; [#uses=1]
- %113 = fcmp oeq float %112, 0.000000e+00 ; [#uses=1]
- br i1 %113, label %bb52, label %bb1
-
-bb1: ; preds = %entry
- %114 = getelementptr inbounds %struct.btPolyhedralConvexShape* %raySphere, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %114)
- %115 = getelementptr inbounds %struct.btPolyhedralConvexShape* %raySphere, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %115, align 8
- %116 = getelementptr inbounds %struct.btPolyhedralConvexShape* %raySphere, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %116, align 4
- %117 = getelementptr inbounds %struct.btPolyhedralConvexShape* %raySphere, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %117, align 4
- %118 = getelementptr inbounds %struct.btPolyhedralConvexShape* %raySphere, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %118, align 4
- %119 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %119, align 8
- %120 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 3 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %120, align 4
- %121 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 4 ; [#uses=2]
- store i8 0, i8* %121, align 8
- %122 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 2 ; [#uses=2]
- %123 = load %struct.btActionInterface** %122, align 4 ; [#uses=1]
- %124 = load %struct.btVoronoiSimplexSolver** %2, align 4 ; [#uses=1]
- %125 = load %struct.btConvexShape** %79, align 4 ; [#uses=2]
- %126 = getelementptr inbounds %struct.btConvexShape* %125, i32 0, i32 0, i32 0 ; [#uses=1]
- %127 = load i32 (...)*** %126, align 4 ; [#uses=1]
- %128 = getelementptr inbounds i32 (...)** %127, i32 11 ; [#uses=1]
- %129 = load i32 (...)** %128, align 4 ; [#uses=1]
- %130 = bitcast i32 (...)* %129 to float (%struct.btConvexShape*)* ; [#uses=1]
- %131 = invoke float %130(%struct.btConvexShape* %125)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb1
- %132 = load %struct.btConvexShape** %70, align 4 ; [#uses=2]
- %133 = getelementptr inbounds %struct.btConvexShape* %132, i32 0, i32 0, i32 0 ; [#uses=1]
- %134 = load i32 (...)*** %133, align 4 ; [#uses=1]
- %135 = getelementptr inbounds i32 (...)** %134, i32 11 ; [#uses=1]
- %136 = load i32 (...)** %135, align 4 ; [#uses=1]
- %137 = bitcast i32 (...)* %136 to float (%struct.btConvexShape*)* ; [#uses=1]
- %138 = invoke float %137(%struct.btConvexShape* %132)
- to label %invcont2 unwind label %lpad ; [#uses=1]
-
-invcont2: ; preds = %invcont
- %139 = load %struct.btConvexShape** %79, align 4 ; [#uses=2]
- %140 = getelementptr inbounds %struct.btConvexShape* %139, i32 0, i32 0, i32 1 ; [#uses=1]
- %141 = load i32* %140, align 4 ; [#uses=1]
- %142 = load %struct.btConvexShape** %70, align 4 ; [#uses=2]
- %143 = getelementptr inbounds %struct.btConvexShape* %142, i32 0, i32 0, i32 1 ; [#uses=1]
- %144 = load i32* %143, align 4 ; [#uses=1]
- invoke void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_iiffP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* %gjk, %struct.btConvexShape* %142, %struct.btConvexShape* %139, i32 %144, i32 %141, float %138, float %131, %struct.btVoronoiSimplexSolver* %124, %struct.btActionInterface* %123)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %invcont2
- %145 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %145, align 8
- %146 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %146, align 4
- %147 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=1]
- store float %149, float* %147, align 8
- %150 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=1]
- store float %152, float* %150, align 4
- %153 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=1]
- store float %155, float* %153, align 8
- %156 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- store float %158, float* %156, align 4
- %159 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %161 = load float* %160, align 4 ; [#uses=1]
- store float %161, float* %159, align 8
- %162 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %164 = load float* %163, align 4 ; [#uses=1]
- store float %164, float* %162, align 4
- %165 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %167 = load float* %166, align 4 ; [#uses=1]
- store float %167, float* %165, align 8
- %168 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %169 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %170 = load float* %169, align 4 ; [#uses=1]
- store float %170, float* %168, align 4
- %171 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- store float %173, float* %171, align 8
- %174 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %175 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %176 = load float* %175, align 4 ; [#uses=1]
- store float %176, float* %174, align 4
- %177 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %179 = load float* %178, align 4 ; [#uses=1]
- store float %179, float* %177, align 8
- %180 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=1]
- store float %182, float* %180, align 4
- %183 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %184 = load float* %16, align 4 ; [#uses=1]
- store float %184, float* %183, align 8
- %185 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %186 = load float* %11, align 4 ; [#uses=1]
- store float %186, float* %185, align 4
- %187 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %188 = load float* %6, align 4 ; [#uses=1]
- store float %188, float* %187, align 8
- %189 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=1]
- store float %191, float* %189, align 4
- %192 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %194 = load float* %193, align 4 ; [#uses=1]
- store float %194, float* %192, align 8
- %195 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %197 = load float* %196, align 4 ; [#uses=1]
- store float %197, float* %195, align 4
- %198 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %200 = load float* %199, align 4 ; [#uses=1]
- store float %200, float* %198, align 8
- %201 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %203 = load float* %202, align 4 ; [#uses=1]
- store float %203, float* %201, align 4
- %204 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %206 = load float* %205, align 4 ; [#uses=1]
- store float %206, float* %204, align 8
- %207 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=1]
- store float %209, float* %207, align 4
- %210 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=1]
- store float %212, float* %210, align 8
- %213 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %215 = load float* %214, align 4 ; [#uses=1]
- store float %215, float* %213, align 4
- %216 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %217 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %218 = load float* %217, align 4 ; [#uses=1]
- store float %218, float* %216, align 8
- %219 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %220 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %221 = load float* %220, align 4 ; [#uses=1]
- store float %221, float* %219, align 4
- %222 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %223 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %224 = load float* %223, align 4 ; [#uses=1]
- store float %224, float* %222, align 8
- %225 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %226 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %227 = load float* %226, align 4 ; [#uses=1]
- store float %227, float* %225, align 4
- %228 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %229 = load float* %49, align 4 ; [#uses=1]
- store float %229, float* %228, align 8
- %230 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %231 = load float* %44, align 4 ; [#uses=1]
- store float %231, float* %230, align 4
- %232 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %233 = load float* %39, align 4 ; [#uses=1]
- store float %233, float* %232, align 8
- %234 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %235 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %236 = load float* %235, align 4 ; [#uses=1]
- store float %236, float* %234, align 4
- %237 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjk, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %237, %struct.btActionInterface* null, i8 zeroext 0)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %invcont3
- %238 = load i8* %121, align 8 ; [#uses=1]
- %239 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 0 ; [#uses=2]
- %240 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %241 = load float* %240, align 4 ; [#uses=2]
- store float %241, float* %239, align 8
- %242 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 1 ; [#uses=2]
- %243 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=2]
- store float %244, float* %242, align 4
- %245 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 2 ; [#uses=2]
- %246 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %247 = load float* %246, align 4 ; [#uses=2]
- store float %247, float* %245, align 8
- %248 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 3 ; [#uses=2]
- %249 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %250 = load float* %249, align 4 ; [#uses=2]
- store float %250, float* %248, align 4
- %toBool = icmp eq i8 %238, 0 ; [#uses=1]
- br i1 %toBool, label %bb46, label %bb5
-
-bb5: ; preds = %invcont4
- %251 = load float* %120, align 4 ; [#uses=1]
- %252 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %253 = load float* %252, align 4 ; [#uses=2]
- %254 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=2]
- %256 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %257 = load float* %256, align 4 ; [#uses=2]
- %258 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %259 = load float* %258, align 4 ; [#uses=1]
- %260 = fmul float %105, %253 ; [#uses=1]
- %261 = fmul float %104, %255 ; [#uses=1]
- %262 = fadd float %260, %261 ; [#uses=1]
- %263 = fmul float %103, %257 ; [#uses=1]
- %264 = fadd float %262, %263 ; [#uses=1]
- %265 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 6 ; [#uses=2]
- %266 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 0 ; [#uses=1]
- %267 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 0, i32 0 ; [#uses=4]
- %268 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 3 ; [#uses=2]
- %269 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 4 ; [#uses=2]
- %270 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 2 ; [#uses=1]
- %271 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 3 ; [#uses=1]
- %272 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %273 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %274 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %276 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %277 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %278 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %279 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %280 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %282 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %283 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %284 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %285 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %286 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %287 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %288 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %289 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %290 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %291 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %292 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %293 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %294 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %295 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %296 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %297 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %298 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %299 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %300 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %301 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %302 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %303 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %304 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %305 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %306 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %307 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %308 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %309 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %310 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %311 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %312 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %314 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %315 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %316 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %318 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %319 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %320 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %321 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %322 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %324 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %325 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %326 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %327 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %328 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %330 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %331 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %332 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %333 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %334 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %335 = getelementptr inbounds %struct.btTransform* %interpolatedTransB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %336 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 0 ; [#uses=1]
- %337 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %338 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %339 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %340 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %341 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %342 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %343 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %344 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %345 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %346 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %347 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %348 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %349 = getelementptr inbounds %struct.btTransform* %interpolatedTransA, i32 0, i32 1 ; [#uses=1]
- %350 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %351 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %352 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %353 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb38
-
-bb6: ; preds = %bb38
- %354 = load %struct.btActionInterface** %265, align 4 ; [#uses=3]
- %355 = icmp eq %struct.btActionInterface* %354, null ; [#uses=1]
- br i1 %355, label %bb11, label %bb9
-
-bb9: ; preds = %bb6
- %356 = getelementptr inbounds %struct.btActionInterface* %354, i32 0, i32 0 ; [#uses=1]
- %357 = load i32 (...)*** %356, align 4 ; [#uses=1]
- %358 = getelementptr inbounds i32 (...)** %357, i32 5 ; [#uses=1]
- %359 = load i32 (...)** %358, align 4 ; [#uses=1]
- store float 1.000000e+00, float* %350, align 8
- store float 1.000000e+00, float* %351, align 4
- store float 1.000000e+00, float* %352, align 8
- store float 0.000000e+00, float* %353, align 4
- %360 = bitcast i32 (...)* %359 to void (%struct.btActionInterface*, %struct.btQuadWord*, float, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %360(%struct.btActionInterface* %354, %struct.btQuadWord* %c, float 0x3FC99999A0000000, %struct.btQuadWord* %1)
- to label %bb11 unwind label %lpad
-
-bb11: ; preds = %bb9, %bb6
- %361 = icmp sgt i32 %indvar, 64 ; [#uses=1]
- br i1 %361, label %bb46, label %bb13
-
-bb13: ; preds = %bb11
- %362 = fmul float %105, %n.0.0.1 ; [#uses=1]
- %363 = fmul float %104, %n.0.1.1 ; [#uses=1]
- %364 = fadd float %362, %363 ; [#uses=1]
- %365 = fmul float %103, %n.0.2.1 ; [#uses=1]
- %366 = fadd float %364, %365 ; [#uses=2]
- %367 = fadd float %366, %102 ; [#uses=2]
- %368 = fcmp ugt float %367, 0x3E80000000000000 ; [#uses=1]
- br i1 %368, label %bb15, label %bb46
-
-bb15: ; preds = %bb13
- %369 = fdiv float %dist.1, %367 ; [#uses=1]
- %370 = fadd float %lambda.0, %369 ; [#uses=8]
- %notlhs = fcmp ule float %370, 1.000000e+00 ; [#uses=1]
- %notrhs = fcmp uge float %370, 0.000000e+00 ; [#uses=1]
- %or.cond.not = and i1 %notrhs, %notlhs ; [#uses=1]
- %371 = fcmp ugt float %370, %lambda.0 ; [#uses=1]
- %or.cond69 = and i1 %or.cond.not, %371 ; [#uses=1]
- br i1 %or.cond69, label %invcont24, label %bb46
-
-invcont24: ; preds = %bb15
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %fromA, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %angVelA, float %370, %struct.btTransform* %interpolatedTransA)
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %fromB, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelB, float %370, %struct.btTransform* %interpolatedTransB)
- %372 = load %struct.btActionInterface** %265, align 4 ; [#uses=3]
- %373 = icmp eq %struct.btActionInterface* %372, null ; [#uses=1]
- br i1 %373, label %bb27, label %bb25
-
-bb25: ; preds = %invcont24
- %374 = getelementptr inbounds %struct.btActionInterface* %372, i32 0, i32 0 ; [#uses=1]
- %375 = load i32 (...)*** %374, align 4 ; [#uses=1]
- %376 = getelementptr inbounds i32 (...)** %375, i32 5 ; [#uses=1]
- %377 = load i32 (...)** %376, align 4 ; [#uses=1]
- store float 1.000000e+00, float* %345, align 8
- store float 0.000000e+00, float* %346, align 4
- store float 0.000000e+00, float* %347, align 8
- store float 0.000000e+00, float* %348, align 4
- %378 = bitcast i32 (...)* %377 to void (%struct.btActionInterface*, %struct.btQuadWord*, float, %struct.btQuadWord*)* ; [#uses=1]
- invoke void %378(%struct.btActionInterface* %372, %struct.btQuadWord* %349, float 0x3FC99999A0000000, %struct.btQuadWord* %0)
- to label %bb27 unwind label %lpad
-
-bb27: ; preds = %bb25, %invcont24
- %379 = load i32 (...)*** %266, align 4 ; [#uses=1]
- %380 = load i32 (...)** %379, align 4 ; [#uses=1]
- %381 = bitcast i32 (...)* %380 to void (%"struct.btConvexCast::CastResult"*, float)* ; [#uses=1]
- invoke void %381(%"struct.btConvexCast::CastResult"* %result, float %370)
- to label %invcont28 unwind label %lpad
-
-invcont28: ; preds = %bb27
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %267, align 8
- store float 0x43ABC16D60000000, float* %268, align 4
- store i8 0, i8* %269, align 8
- %382 = load %struct.btActionInterface** %122, align 4 ; [#uses=1]
- %383 = load %struct.btVoronoiSimplexSolver** %2, align 4 ; [#uses=1]
- %384 = load %struct.btConvexShape** %79, align 4 ; [#uses=1]
- %385 = load %struct.btConvexShape** %70, align 4 ; [#uses=1]
- invoke void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* %gjk7, %struct.btConvexShape* %385, %struct.btConvexShape* %384, %struct.btVoronoiSimplexSolver* %383, %struct.btActionInterface* %382)
- to label %invcont29 unwind label %lpad57
-
-invcont29: ; preds = %invcont28
- store float 0x43ABC16D60000000, float* %270, align 8
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %271, align 4
- %386 = load float* %273, align 8 ; [#uses=1]
- store float %386, float* %272, align 8
- %387 = load float* %275, align 4 ; [#uses=1]
- store float %387, float* %274, align 4
- %388 = load float* %277, align 8 ; [#uses=1]
- store float %388, float* %276, align 8
- %389 = load float* %279, align 4 ; [#uses=1]
- store float %389, float* %278, align 4
- %390 = load float* %281, align 8 ; [#uses=1]
- store float %390, float* %280, align 8
- %391 = load float* %283, align 4 ; [#uses=1]
- store float %391, float* %282, align 4
- %392 = load float* %285, align 8 ; [#uses=1]
- store float %392, float* %284, align 8
- %393 = load float* %287, align 4 ; [#uses=1]
- store float %393, float* %286, align 4
- %394 = load float* %289, align 8 ; [#uses=1]
- store float %394, float* %288, align 8
- %395 = load float* %291, align 4 ; [#uses=1]
- store float %395, float* %290, align 4
- %396 = load float* %293, align 8 ; [#uses=1]
- store float %396, float* %292, align 8
- %397 = load float* %295, align 4 ; [#uses=1]
- store float %397, float* %294, align 4
- %398 = load float* %297, align 8 ; [#uses=1]
- store float %398, float* %296, align 8
- %399 = load float* %299, align 4 ; [#uses=1]
- store float %399, float* %298, align 4
- %400 = load float* %301, align 8 ; [#uses=1]
- store float %400, float* %300, align 8
- %401 = load float* %303, align 4 ; [#uses=1]
- store float %401, float* %302, align 4
- %402 = load float* %305, align 8 ; [#uses=1]
- store float %402, float* %304, align 8
- %403 = load float* %307, align 4 ; [#uses=1]
- store float %403, float* %306, align 4
- %404 = load float* %309, align 8 ; [#uses=1]
- store float %404, float* %308, align 8
- %405 = load float* %311, align 4 ; [#uses=1]
- store float %405, float* %310, align 4
- %406 = load float* %313, align 8 ; [#uses=1]
- store float %406, float* %312, align 8
- %407 = load float* %315, align 4 ; [#uses=1]
- store float %407, float* %314, align 4
- %408 = load float* %317, align 8 ; [#uses=1]
- store float %408, float* %316, align 8
- %409 = load float* %319, align 4 ; [#uses=1]
- store float %409, float* %318, align 4
- %410 = load float* %321, align 8 ; [#uses=1]
- store float %410, float* %320, align 8
- %411 = load float* %323, align 4 ; [#uses=1]
- store float %411, float* %322, align 4
- %412 = load float* %325, align 8 ; [#uses=1]
- store float %412, float* %324, align 8
- %413 = load float* %327, align 4 ; [#uses=1]
- store float %413, float* %326, align 4
- %414 = load float* %329, align 8 ; [#uses=1]
- store float %414, float* %328, align 8
- %415 = load float* %331, align 4 ; [#uses=1]
- store float %415, float* %330, align 4
- %416 = load float* %333, align 8 ; [#uses=1]
- store float %416, float* %332, align 8
- %417 = load float* %335, align 4 ; [#uses=1]
- store float %417, float* %334, align 4
- invoke void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjk7, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input8, %struct.btActionInterface* %336, %struct.btActionInterface* null, i8 zeroext 0)
- to label %invcont30 unwind label %lpad57
-
-invcont30: ; preds = %invcont29
- %418 = load i8* %269, align 8 ; [#uses=1]
- %toBool31 = icmp eq i8 %418, 0 ; [#uses=1]
- br i1 %toBool31, label %bb37.thread, label %bb32
-
-bb32: ; preds = %invcont30
- %419 = load float* %268, align 4 ; [#uses=2]
- %420 = fcmp olt float %419, 0.000000e+00 ; [#uses=1]
- br i1 %420, label %bb33, label %bb37
-
-bb33: ; preds = %bb32
- %421 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 5 ; [#uses=1]
- store float %370, float* %421, align 4
- %422 = load float* %341, align 4 ; [#uses=1]
- %423 = load float* %342, align 4 ; [#uses=1]
- %424 = load float* %343, align 4 ; [#uses=1]
- %425 = load float* %344, align 4 ; [#uses=1]
- %426 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %422, float* %426, align 4
- %427 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %423, float* %427, align 4
- %428 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %424, float* %428, align 4
- %429 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float %425, float* %429, align 4
- %430 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %431 = load float* %337, align 4 ; [#uses=1]
- store float %431, float* %430, align 4
- %432 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %433 = load float* %338, align 4 ; [#uses=1]
- store float %433, float* %432, align 4
- %434 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %435 = load float* %339, align 4 ; [#uses=1]
- store float %435, float* %434, align 4
- %436 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %437 = load float* %340, align 4 ; [#uses=1]
- store float %437, float* %436, align 4
- br label %bb37.thread
-
-bb37.thread: ; preds = %bb33, %invcont30
- %.2.ph = phi i8 [ 1, %bb33 ], [ 0, %invcont30 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %267, align 8
- br label %bb46
-
-bb37: ; preds = %bb32
- %438 = load float* %337, align 4 ; [#uses=2]
- store float %438, float* %239, align 8
- %439 = load float* %338, align 4 ; [#uses=2]
- store float %439, float* %242, align 4
- %440 = load float* %339, align 4 ; [#uses=2]
- store float %440, float* %245, align 8
- %441 = load float* %340, align 4 ; [#uses=2]
- store float %441, float* %248, align 4
- %442 = load float* %341, align 4 ; [#uses=1]
- %443 = load float* %342, align 4 ; [#uses=1]
- %444 = load float* %343, align 4 ; [#uses=1]
- %445 = load float* %344, align 4 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %267, align 8
- %phitmp = add i32 %indvar, 1 ; [#uses=1]
- br label %bb38
-
-bb38: ; preds = %bb37, %bb5
- %446 = phi float [ %441, %bb37 ], [ %250, %bb5 ] ; [#uses=1]
- %447 = phi float [ %440, %bb37 ], [ %247, %bb5 ] ; [#uses=1]
- %448 = phi float [ %439, %bb37 ], [ %244, %bb5 ] ; [#uses=1]
- %449 = phi float [ %438, %bb37 ], [ %241, %bb5 ] ; [#uses=1]
- %indvar = phi i32 [ %phitmp, %bb37 ], [ 1, %bb5 ] ; [#uses=2]
- %n.0.0.1 = phi float [ %442, %bb37 ], [ %253, %bb5 ] ; [#uses=2]
- %n.0.1.1 = phi float [ %443, %bb37 ], [ %255, %bb5 ] ; [#uses=2]
- %n.0.2.1 = phi float [ %444, %bb37 ], [ %257, %bb5 ] ; [#uses=2]
- %n.0.3.1 = phi float [ %445, %bb37 ], [ %259, %bb5 ] ; [#uses=1]
- %lambda.0 = phi float [ %370, %bb37 ], [ 0.000000e+00, %bb5 ] ; [#uses=3]
- %dist.1 = phi float [ %419, %bb37 ], [ %251, %bb5 ] ; [#uses=2]
- %projectedLinearVelocity.0 = phi float [ %366, %bb37 ], [ %264, %bb5 ] ; [#uses=1]
- %450 = fcmp ogt float %dist.1, 0x3F50624DE0000000 ; [#uses=1]
- br i1 %450, label %bb6, label %bb39
-
-bb39: ; preds = %bb38
- %451 = fadd float %projectedLinearVelocity.0, %102 ; [#uses=1]
- %452 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 7 ; [#uses=1]
- %453 = load float* %452, align 4 ; [#uses=1]
- %454 = fcmp ugt float %451, %453 ; [#uses=1]
- br i1 %454, label %bb41, label %bb46
-
-bb41: ; preds = %bb39
- %455 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 5 ; [#uses=1]
- store float %lambda.0, float* %455, align 4
- %456 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %n.0.0.1, float* %456, align 4
- %457 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %n.0.1.1, float* %457, align 4
- %458 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %n.0.2.1, float* %458, align 4
- %459 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float %n.0.3.1, float* %459, align 4
- %460 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %449, float* %460, align 4
- %461 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %448, float* %461, align 4
- %462 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %447, float* %462, align 4
- %463 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float %446, float* %463, align 4
- br label %bb46
-
-bb46: ; preds = %bb41, %bb39, %bb37.thread, %bb15, %bb13, %bb11, %invcont4
- %.1 = phi i8 [ 1, %bb41 ], [ 0, %bb39 ], [ 0, %invcont4 ], [ %.2.ph, %bb37.thread ], [ 0, %bb11 ], [ 0, %bb13 ], [ 0, %bb15 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %119, align 8
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %115, align 8
- %464 = getelementptr inbounds %struct.btPolyhedralConvexShape* %raySphere, i32 0, i32 0, i32 0 ; [#uses=1]
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %464)
- ret i8 %.1
-
-invcont50: ; preds = %ppad65
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb52: ; preds = %entry
- ret i8 0
-
-lpad: ; preds = %bb27, %bb25, %bb9, %invcont3, %invcont2, %invcont, %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select56 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad65
-
-lpad57: ; preds = %invcont29, %invcont28
- %eh_ptr58 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select60 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr58, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %267, align 8
- br label %ppad65
-
-lpad61: ; preds = %ppad65
- %eh_ptr62 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select64 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr62, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad65: ; preds = %lpad57, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr58, %lpad57 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %119, align 8
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %115, align 8
- %465 = getelementptr inbounds %struct.btPolyhedralConvexShape* %raySphere, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %465)
- to label %invcont50 unwind label %lpad61
-}
-
-; [#uses=2]
-define void @_ZN27btContinuousConvexCollisionC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btContinuousConvexCollision* nocapture %this, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %penetrationDepthSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %1, align 4
- %2 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %penetrationDepthSolver, %struct.btActionInterface** %2, align 4
- %3 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexA, %struct.btConvexShape** %3, align 4
- %4 = getelementptr inbounds %struct.btContinuousConvexCollision* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %convexB, %struct.btConvexShape** %4, align 4
- ret void
-}
-
-; [#uses=9]
-define linkonce_odr void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %curTrans, %struct.btQuadWord* nocapture %linvel, %struct.btQuadWord* nocapture %angvel, float %timeStep, %struct.btTransform* nocapture %predictedTransform) nounwind {
-entry:
- %orn0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btQuadWord* %linvel, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fmul float %1, %timeStep ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %linvel, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = fmul float %4, %timeStep ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %linvel, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fmul float %7, %timeStep ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %curTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fadd float %10, %2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %curTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fadd float %13, %5 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %curTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fadd float %16, %8 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 4
- %19 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %14, float* %19, align 4
- %20 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %20, align 4
- %21 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %angvel, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- %24 = fmul float %23, %23 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %angvel, i32 0, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = fmul float %26, %26 ; [#uses=1]
- %28 = fadd float %24, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %angvel, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=3]
- %31 = fmul float %30, %30 ; [#uses=1]
- %32 = fadd float %28, %31 ; [#uses=1]
- %33 = call float @sqrtf(float %32) nounwind readonly ; [#uses=2]
- %34 = fmul float %33, %timeStep ; [#uses=1]
- %35 = fcmp ogt float %34, 0x3FE921FB60000000 ; [#uses=1]
- br i1 %35, label %bb, label %bb1
-
-bb: ; preds = %entry
- %36 = fdiv float 0x3FE921FB60000000, %timeStep ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %fAngle.0 = phi float [ %36, %bb ], [ %33, %entry ] ; [#uses=6]
- %37 = fcmp olt float %fAngle.0, 0x3F50624DE0000000 ; [#uses=1]
- br i1 %37, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %38 = fmul float %timeStep, 5.000000e-01 ; [#uses=1]
- %39 = fmul float %timeStep, %timeStep ; [#uses=1]
- %40 = fmul float %39, %timeStep ; [#uses=1]
- %41 = fmul float %40, 0xBF95555560000000 ; [#uses=1]
- %42 = fmul float %41, %fAngle.0 ; [#uses=1]
- %43 = fmul float %42, %fAngle.0 ; [#uses=1]
- %44 = fadd float %38, %43 ; [#uses=1]
- br label %bb5
-
-bb3: ; preds = %bb1
- %45 = fmul float %fAngle.0, 5.000000e-01 ; [#uses=1]
- %46 = fmul float %45, %timeStep ; [#uses=1]
- %47 = call float @sinf(float %46) nounwind readonly ; [#uses=1]
- %48 = fdiv float %47, %fAngle.0 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb2
- %.pn = phi float [ %44, %bb2 ], [ %48, %bb3 ] ; [#uses=3]
- %axis.0.2.0 = fmul float %30, %.pn ; [#uses=4]
- %axis.0.1.0 = fmul float %26, %.pn ; [#uses=4]
- %axis.0.0.0 = fmul float %23, %.pn ; [#uses=4]
- %49 = fmul float %fAngle.0, %timeStep ; [#uses=1]
- %50 = fmul float %49, 5.000000e-01 ; [#uses=1]
- %51 = call float @cosf(float %50) nounwind readonly ; [#uses=4]
- %52 = getelementptr inbounds %struct.btTransform* %curTrans, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %52, %struct.btQuaternion* %orn0) nounwind
- %53 = getelementptr inbounds %struct.btQuaternion* %orn0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=4]
- %55 = fmul float %51, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuaternion* %orn0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 8 ; [#uses=4]
- %58 = fmul float %axis.0.0.0, %57 ; [#uses=1]
- %59 = fsub float %55, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuaternion* %orn0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=4]
- %62 = fmul float %axis.0.1.0, %61 ; [#uses=1]
- %63 = fsub float %59, %62 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btQuaternion* %orn0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 8 ; [#uses=4]
- %66 = fmul float %axis.0.2.0, %65 ; [#uses=1]
- %67 = fsub float %63, %66 ; [#uses=3]
- %68 = fmul float %51, %65 ; [#uses=1]
- %69 = fmul float %axis.0.2.0, %54 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fmul float %axis.0.0.0, %61 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fmul float %axis.0.1.0, %57 ; [#uses=1]
- %74 = fsub float %72, %73 ; [#uses=3]
- %75 = fmul float %51, %61 ; [#uses=1]
- %76 = fmul float %axis.0.1.0, %54 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = fmul float %axis.0.2.0, %57 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %axis.0.0.0, %65 ; [#uses=1]
- %81 = fsub float %79, %80 ; [#uses=3]
- %82 = fmul float %51, %57 ; [#uses=1]
- %83 = fmul float %axis.0.0.0, %54 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=1]
- %85 = fmul float %axis.0.1.0, %65 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = fmul float %axis.0.2.0, %61 ; [#uses=1]
- %88 = fsub float %86, %87 ; [#uses=3]
- %89 = fmul float %88, %88 ; [#uses=1]
- %90 = fmul float %81, %81 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %74, %74 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %67, %67 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = call float @sqrtf(float %95) nounwind readonly ; [#uses=1]
- %97 = fdiv float 1.000000e+00, %96 ; [#uses=4]
- %98 = fmul float %88, %97 ; [#uses=6]
- %99 = fmul float %81, %97 ; [#uses=5]
- %100 = fmul float %74, %97 ; [#uses=4]
- %101 = fmul float %67, %97 ; [#uses=5]
- %102 = fmul float %98, %98 ; [#uses=1]
- %103 = fmul float %99, %99 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fmul float %100, %100 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %101, %101 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fdiv float 2.000000e+00, %108 ; [#uses=3]
- %110 = fmul float %98, %109 ; [#uses=2]
- %111 = fmul float %99, %109 ; [#uses=3]
- %112 = fmul float %100, %109 ; [#uses=4]
- %113 = fmul float %101, %110 ; [#uses=2]
- %114 = fmul float %101, %111 ; [#uses=2]
- %115 = fmul float %101, %112 ; [#uses=2]
- %116 = fmul float %98, %110 ; [#uses=2]
- %117 = fmul float %98, %111 ; [#uses=2]
- %118 = fmul float %98, %112 ; [#uses=2]
- %119 = fmul float %99, %111 ; [#uses=2]
- %120 = fmul float %99, %112 ; [#uses=2]
- %121 = fmul float %100, %112 ; [#uses=2]
- %122 = fadd float %116, %119 ; [#uses=1]
- %123 = fsub float 1.000000e+00, %122 ; [#uses=1]
- %124 = fadd float %120, %113 ; [#uses=1]
- %125 = fsub float %118, %114 ; [#uses=1]
- %126 = fsub float %120, %113 ; [#uses=1]
- %127 = fadd float %116, %121 ; [#uses=1]
- %128 = fsub float 1.000000e+00, %127 ; [#uses=1]
- %129 = fadd float %117, %115 ; [#uses=1]
- %130 = fadd float %118, %114 ; [#uses=1]
- %131 = fsub float %117, %115 ; [#uses=1]
- %132 = fadd float %119, %121 ; [#uses=1]
- %133 = fsub float 1.000000e+00, %132 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %133, float* %134, align 4
- %135 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %131, float* %135, align 4
- %136 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %130, float* %136, align 4
- %137 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %137, align 4
- %138 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %129, float* %138, align 4
- %139 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %128, float* %139, align 4
- %140 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %126, float* %140, align 4
- %141 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %141, align 4
- %142 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %125, float* %142, align 4
- %143 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %124, float* %143, align 4
- %144 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %123, float* %144, align 4
- %145 = getelementptr inbounds %struct.btTransform* %predictedTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %145, align 4
- ret void
-}
-
-; [#uses=22]
-define void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV12btConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN12btConvexCastD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV12btConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN12btConvexCastD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV12btConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN15btGjkConvexCastC2EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* nocapture %this, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btVoronoiSimplexSolver* %simplexSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %1, align 4
- %2 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btConvexShape* %convexA, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexB, %struct.btConvexShape** %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btGjkConvexCastD1Ev(%struct.btGjkConvexCast* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btGjkConvexCastD0Ev(%struct.btGjkConvexCast* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btGjkConvexCast* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=5]
-define zeroext i8 @_ZN15btGjkConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* nocapture %this, %struct.btTransform* nocapture %fromA, %struct.btTransform* nocapture %toA, %struct.btTransform* nocapture %fromB, %struct.btTransform* nocapture %toB, %"struct.btConvexCast::CastResult"* %result) align 2 {
-entry:
- %pointCollector = alloca %struct..0btIntermediateResult, align 8 ; [#uses=12]
- %gjk = alloca %struct.btGjkPairDetector, align 8 ; [#uses=3]
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=36]
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.btVoronoiSimplexSolver** %0, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver5resetEv(%struct.btVoronoiSimplexSolver* %1)
- %2 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fsub float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fsub float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fsub float %23, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fsub float %28, %30 ; [#uses=1]
- %32 = fsub float %6, %21 ; [#uses=2]
- %33 = fsub float %11, %26 ; [#uses=2]
- %34 = fsub float %16, %31 ; [#uses=2]
- %35 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %35, align 8
- %36 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 3 ; [#uses=3]
- store float 0x43ABC16D60000000, float* %36, align 4
- %37 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 4 ; [#uses=3]
- store i8 0, i8* %37, align 8
- %38 = load %struct.btVoronoiSimplexSolver** %0, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 3 ; [#uses=1]
- %40 = load %struct.btConvexShape** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 2 ; [#uses=1]
- %42 = load %struct.btConvexShape** %41, align 4 ; [#uses=1]
- invoke void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* %gjk, %struct.btConvexShape* %42, %struct.btConvexShape* %40, %struct.btVoronoiSimplexSolver* %38, %struct.btActionInterface* null)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %43 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %43, align 8
- %44 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %44, align 4
- %45 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %45, align 8
- %48 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %51 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 8
- %54 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 4
- %57 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 8
- %60 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 4
- %63 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 8
- %66 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 4
- %69 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 8
- %72 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 4
- %75 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 8
- %78 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 4
- %81 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %82 = load float* %14, align 4 ; [#uses=1]
- store float %82, float* %81, align 8
- %83 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %84 = load float* %9, align 4 ; [#uses=1]
- store float %84, float* %83, align 4
- %85 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %86 = load float* %4, align 4 ; [#uses=1]
- store float %86, float* %85, align 8
- %87 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- store float %92, float* %90, align 8
- %93 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- store float %95, float* %93, align 4
- %96 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- store float %98, float* %96, align 8
- %99 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- store float %101, float* %99, align 4
- %102 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- store float %104, float* %102, align 8
- %105 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=1]
- store float %107, float* %105, align 4
- %108 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- store float %110, float* %108, align 8
- %111 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %113 = load float* %112, align 4 ; [#uses=1]
- store float %113, float* %111, align 4
- %114 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=1]
- store float %116, float* %114, align 8
- %117 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=1]
- store float %119, float* %117, align 4
- %120 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- store float %122, float* %120, align 8
- %123 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=1]
- store float %125, float* %123, align 4
- %126 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %127 = load float* %29, align 4 ; [#uses=1]
- store float %127, float* %126, align 8
- %128 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %129 = load float* %24, align 4 ; [#uses=1]
- store float %129, float* %128, align 4
- %130 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %131 = load float* %19, align 4 ; [#uses=1]
- store float %131, float* %130, align 8
- %132 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=1]
- store float %134, float* %132, align 4
- %135 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjk, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %135, %struct.btActionInterface* null, i8 zeroext 0)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %invcont
- %136 = load i8* %37, align 8 ; [#uses=1]
- %toBool = icmp eq i8 %136, 0 ; [#uses=1]
- br i1 %toBool, label %bb31, label %bb
-
-bb: ; preds = %invcont2
- %137 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- %138 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %139 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %140 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %141 = load float* %137, align 4 ; [#uses=1]
- %142 = load float* %138, align 4 ; [#uses=1]
- %143 = load float* %139, align 4 ; [#uses=1]
- %144 = load float* %140, align 4 ; [#uses=1]
- %145 = load float* %36, align 4 ; [#uses=1]
- %146 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %147 = load float* %146, align 4 ; [#uses=1]
- %148 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %149 = load float* %148, align 4 ; [#uses=1]
- %150 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %151 = load float* %150, align 4 ; [#uses=1]
- %152 = getelementptr inbounds %struct..0btIntermediateResult* %pointCollector, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 0 ; [#uses=1]
- br label %bb22
-
-bb4: ; preds = %bb22
- %155 = icmp sgt i32 %indvar, 32 ; [#uses=1]
- br i1 %155, label %bb31, label %bb8
-
-bb8: ; preds = %bb4
- %156 = fmul float %34, %n.0.0.0 ; [#uses=1]
- %157 = fmul float %33, %n.0.1.0 ; [#uses=1]
- %158 = fadd float %156, %157 ; [#uses=1]
- %159 = fmul float %32, %n.0.2.0 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=1]
- %161 = fdiv float %dist.0, %160 ; [#uses=1]
- %162 = fsub float %lambda.0, %161 ; [#uses=13]
- %notlhs = fcmp ule float %162, 1.000000e+00 ; [#uses=1]
- %notrhs = fcmp uge float %162, 0.000000e+00 ; [#uses=1]
- %or.cond.not = and i1 %notrhs, %notlhs ; [#uses=1]
- %163 = fcmp ugt float %162, %lambda.0 ; [#uses=1]
- %or.cond37 = and i1 %or.cond.not, %163 ; [#uses=1]
- br i1 %or.cond37, label %bb14, label %bb31
-
-bb14: ; preds = %bb8
- %164 = load i32 (...)*** %154, align 4 ; [#uses=1]
- %165 = load i32 (...)** %164, align 4 ; [#uses=1]
- %166 = bitcast i32 (...)* %165 to void (%"struct.btConvexCast::CastResult"*, float)* ; [#uses=1]
- invoke void %166(%"struct.btConvexCast::CastResult"* %result, float %162)
- to label %invcont15 unwind label %lpad
-
-invcont15: ; preds = %bb14
- %167 = fsub float 1.000000e+00, %162 ; [#uses=6]
- %168 = load float* %14, align 4 ; [#uses=1]
- %169 = fmul float %168, %167 ; [#uses=1]
- %170 = load float* %12, align 4 ; [#uses=1]
- %171 = fmul float %170, %162 ; [#uses=1]
- %172 = fadd float %169, %171 ; [#uses=1]
- store float %172, float* %81, align 8
- %173 = load float* %9, align 4 ; [#uses=1]
- %174 = fmul float %173, %167 ; [#uses=1]
- %175 = load float* %7, align 4 ; [#uses=1]
- %176 = fmul float %175, %162 ; [#uses=1]
- %177 = fadd float %174, %176 ; [#uses=1]
- store float %177, float* %83, align 4
- %178 = load float* %4, align 4 ; [#uses=1]
- %179 = fmul float %178, %167 ; [#uses=1]
- %180 = load float* %2, align 4 ; [#uses=1]
- %181 = fmul float %180, %162 ; [#uses=1]
- %182 = fadd float %179, %181 ; [#uses=1]
- store float %182, float* %85, align 8
- %183 = load float* %29, align 4 ; [#uses=1]
- %184 = fmul float %183, %167 ; [#uses=1]
- %185 = load float* %27, align 4 ; [#uses=1]
- %186 = fmul float %185, %162 ; [#uses=1]
- %187 = fadd float %184, %186 ; [#uses=1]
- store float %187, float* %126, align 8
- %188 = load float* %24, align 4 ; [#uses=1]
- %189 = fmul float %188, %167 ; [#uses=1]
- %190 = load float* %22, align 4 ; [#uses=1]
- %191 = fmul float %190, %162 ; [#uses=1]
- %192 = fadd float %189, %191 ; [#uses=1]
- store float %192, float* %128, align 4
- %193 = load float* %19, align 4 ; [#uses=1]
- %194 = fmul float %193, %167 ; [#uses=1]
- %195 = load float* %17, align 4 ; [#uses=1]
- %196 = fmul float %195, %162 ; [#uses=1]
- %197 = fadd float %194, %196 ; [#uses=1]
- store float %197, float* %130, align 8
- invoke void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjk, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %135, %struct.btActionInterface* null, i8 zeroext 0)
- to label %invcont16 unwind label %lpad
-
-invcont16: ; preds = %invcont15
- %198 = load i8* %37, align 8 ; [#uses=1]
- %toBool17 = icmp eq i8 %198, 0 ; [#uses=1]
- br i1 %toBool17, label %bb31, label %bb18
-
-bb18: ; preds = %invcont16
- %199 = load float* %36, align 4 ; [#uses=2]
- %200 = fcmp olt float %199, 0.000000e+00 ; [#uses=1]
- br i1 %200, label %bb19, label %bb20
-
-bb19: ; preds = %bb18
- %201 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 5 ; [#uses=1]
- store float %162, float* %201, align 4
- %202 = load float* %146, align 4 ; [#uses=1]
- %203 = load float* %148, align 4 ; [#uses=1]
- %204 = load float* %150, align 4 ; [#uses=1]
- %205 = load float* %152, align 4 ; [#uses=1]
- %206 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %202, float* %206, align 4
- %207 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %203, float* %207, align 4
- %208 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %204, float* %208, align 4
- %209 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float %205, float* %209, align 4
- %210 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %211 = load float* %140, align 4 ; [#uses=1]
- store float %211, float* %210, align 4
- %212 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %213 = load float* %139, align 4 ; [#uses=1]
- store float %213, float* %212, align 4
- %214 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %215 = load float* %138, align 4 ; [#uses=1]
- store float %215, float* %214, align 4
- %216 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %217 = load float* %137, align 4 ; [#uses=1]
- store float %217, float* %216, align 4
- ret i8 1
-
-bb20: ; preds = %bb18
- %218 = load float* %140, align 4 ; [#uses=1]
- %219 = load float* %139, align 4 ; [#uses=1]
- %220 = load float* %138, align 4 ; [#uses=1]
- %221 = load float* %137, align 4 ; [#uses=1]
- %222 = load float* %146, align 4 ; [#uses=1]
- %223 = load float* %148, align 4 ; [#uses=1]
- %224 = load float* %150, align 4 ; [#uses=1]
- %225 = load float* %152, align 4 ; [#uses=1]
- %phitmp = add i32 %indvar, 1 ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %bb20, %bb
- %indvar = phi i32 [ %phitmp, %bb20 ], [ 1, %bb ] ; [#uses=2]
- %n.0.0.0 = phi float [ %222, %bb20 ], [ %147, %bb ] ; [#uses=3]
- %n.0.1.0 = phi float [ %223, %bb20 ], [ %149, %bb ] ; [#uses=3]
- %n.0.2.0 = phi float [ %224, %bb20 ], [ %151, %bb ] ; [#uses=3]
- %n.0.3.0 = phi float [ %225, %bb20 ], [ %153, %bb ] ; [#uses=1]
- %c.0.0.0 = phi float [ %218, %bb20 ], [ %144, %bb ] ; [#uses=1]
- %c.0.1.0 = phi float [ %219, %bb20 ], [ %143, %bb ] ; [#uses=1]
- %c.0.2.0 = phi float [ %220, %bb20 ], [ %142, %bb ] ; [#uses=1]
- %c.0.3.0 = phi float [ %221, %bb20 ], [ %141, %bb ] ; [#uses=1]
- %lambda.0 = phi float [ %162, %bb20 ], [ 0.000000e+00, %bb ] ; [#uses=3]
- %dist.0 = phi float [ %199, %bb20 ], [ %145, %bb ] ; [#uses=2]
- %226 = fcmp ogt float %dist.0, 0x3F50624DE0000000 ; [#uses=1]
- br i1 %226, label %bb4, label %bb23
-
-bb23: ; preds = %bb22
- %227 = fmul float %n.0.0.0, %34 ; [#uses=1]
- %228 = fmul float %n.0.1.0, %33 ; [#uses=1]
- %229 = fadd float %227, %228 ; [#uses=1]
- %230 = fmul float %n.0.2.0, %32 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 7 ; [#uses=1]
- %233 = load float* %232, align 4 ; [#uses=1]
- %234 = fsub float -0.000000e+00, %233 ; [#uses=1]
- %235 = fcmp ult float %231, %234 ; [#uses=1]
- br i1 %235, label %bb26, label %bb31
-
-bb26: ; preds = %bb23
- %236 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 5 ; [#uses=1]
- store float %lambda.0, float* %236, align 4
- %237 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %n.0.0.0, float* %237, align 4
- %238 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %n.0.1.0, float* %238, align 4
- %239 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %n.0.2.0, float* %239, align 4
- %240 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float %n.0.3.0, float* %240, align 4
- %241 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %c.0.0.0, float* %241, align 4
- %242 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %c.0.1.0, float* %242, align 4
- %243 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %c.0.2.0, float* %243, align 4
- %244 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float %c.0.3.0, float* %244, align 4
- ret i8 1
-
-bb31: ; preds = %bb23, %invcont16, %bb8, %bb4, %invcont2
- ret i8 0
-
-lpad: ; preds = %invcont15, %bb14, %invcont, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %35, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=4]
-define void @_ZN15btGjkConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* nocapture %this, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btVoronoiSimplexSolver* %simplexSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV15btGjkConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %1, align 4
- %2 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btConvexShape* %convexA, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexB, %struct.btConvexShape** %3, align 4
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN15btGjkEpaSolver220StackSizeRequirementEv() nounwind readnone align 2 {
-entry:
- ret i32 10188
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %"struct.gjkepa2_impl::MinkowskiDiff"* nocapture %this, %struct.btQuadWord* nocapture %d) inlinehint align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %2 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- %3 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %2, align 4 ; [#uses=2]
- %4 = ptrtoint void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %3 to i32 ; [#uses=2]
- %5 = and i32 %4, 1 ; [#uses=1]
- %toBool = icmp eq i32 %5, 0 ; [#uses=1]
- %.phi.trans.insert = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre = load %struct.btConvexShape** %.phi.trans.insert, align 4 ; [#uses=4]
- %.phi.trans.insert4 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %.pre5 = load i32* %.phi.trans.insert4, align 4 ; [#uses=4]
- br i1 %toBool, label %bb2, label %bb
-
-bb: ; preds = %entry
- %6 = ptrtoint %struct.btConvexShape* %.pre to i32 ; [#uses=1]
- %7 = add i32 %6, %.pre5 ; [#uses=1]
- %8 = inttoptr i32 %7 to %struct.btConvexShape* ; [#uses=1]
- %9 = getelementptr inbounds %struct.btConvexShape* %8, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = ptrtoint i32 (...)** %10 to i32 ; [#uses=1]
- %12 = add nsw i32 %11, -1 ; [#uses=1]
- %13 = add i32 %12, %4 ; [#uses=1]
- %14 = inttoptr i32 %13 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** ; [#uses=1]
- %iftmp.135.0.pre = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %14, align 4 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %15 = phi i32 [ %.pre5, %bb ], [ %.pre5, %entry ] ; [#uses=0]
- %16 = phi %struct.btConvexShape* [ %.pre, %bb ], [ %.pre, %entry ] ; [#uses=0]
- %iftmp.135.0 = phi void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* [ %iftmp.135.0.pre, %bb ], [ %3, %entry ] ; [#uses=1]
- %17 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = fmul float %23, %25 ; [#uses=1]
- %27 = fadd float %21, %26 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = fmul float %29, %31 ; [#uses=1]
- %33 = fadd float %27, %32 ; [#uses=1]
- %34 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fmul float %35, %20 ; [#uses=1]
- %37 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %38, %25 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fmul float %42, %31 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, %20 ; [#uses=1]
- %48 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fmul float %49, %25 ; [#uses=1]
- %51 = fadd float %47, %50 ; [#uses=1]
- %52 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = fmul float %53, %31 ; [#uses=1]
- %55 = fadd float %51, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %55, float* %56, align 8
- %57 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %44, float* %57, align 4
- %58 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %33, float* %58, align 8
- %59 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %59, align 4
- %60 = ptrtoint %struct.btConvexShape* %.pre to i32 ; [#uses=1]
- %61 = add i32 %60, %.pre5 ; [#uses=1]
- %62 = inttoptr i32 %61 to %struct.btConvexShape* ; [#uses=1]
- call void %iftmp.135.0(%struct.btQuadWord* noalias sret %1, %struct.btConvexShape* %62, %struct.btQuadWord* %0)
- %63 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 8 ; [#uses=3]
- %67 = fmul float %64, %66 ; [#uses=1]
- %68 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=3]
- %72 = fmul float %69, %71 ; [#uses=1]
- %73 = fadd float %67, %72 ; [#uses=1]
- %74 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %77 = load float* %76, align 8 ; [#uses=3]
- %78 = fmul float %75, %77 ; [#uses=1]
- %79 = fadd float %73, %78 ; [#uses=1]
- %80 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = fadd float %79, %81 ; [#uses=1]
- %83 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = fmul float %84, %66 ; [#uses=1]
- %86 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = fmul float %87, %71 ; [#uses=1]
- %89 = fadd float %85, %88 ; [#uses=1]
- %90 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %91, %77 ; [#uses=1]
- %93 = fadd float %89, %92 ; [#uses=1]
- %94 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fadd float %93, %95 ; [#uses=1]
- %97 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fmul float %98, %66 ; [#uses=1]
- %100 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = fmul float %101, %71 ; [#uses=1]
- %103 = fadd float %99, %102 ; [#uses=1]
- %104 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %105, %77 ; [#uses=1]
- %107 = fadd float %103, %106 ; [#uses=1]
- %108 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fadd float %107, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %110, float* %111, align 4
- %112 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %96, float* %112, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %82, float* %113, align 4
- %114 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %114, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_PfRj(%struct.btQuadWord* nocapture %a, %struct.btQuadWord* nocapture %b, float* nocapture %w, i32* nocapture %m) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=3]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=3]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=3]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=4]
- %15 = fmul float %14, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = fmul float %4, %4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=2]
- %20 = fcmp ogt float %19, 0.000000e+00 ; [#uses=1]
- br i1 %20, label %bb3, label %bb9
-
-bb3: ; preds = %entry
- %21 = fmul float %13, %14 ; [#uses=1]
- %22 = fmul float %8, %9 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = fmul float %3, %4 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = fsub float -0.000000e+00, %25 ; [#uses=1]
- %27 = fdiv float %26, %19 ; [#uses=7]
- %28 = fcmp ult float %27, 1.000000e+00 ; [#uses=1]
- br i1 %28, label %bb5, label %bb4
-
-bb4: ; preds = %bb3
- store float 0.000000e+00, float* %w, align 4
- %29 = getelementptr inbounds float* %w, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- store i32 2, i32* %m, align 4
- %30 = load float* %10, align 4 ; [#uses=2]
- %31 = fmul float %30, %30 ; [#uses=1]
- %32 = load float* %5, align 4 ; [#uses=2]
- %33 = fmul float %32, %32 ; [#uses=1]
- %34 = fadd float %31, %33 ; [#uses=1]
- %35 = load float* %0, align 4 ; [#uses=2]
- %36 = fmul float %35, %35 ; [#uses=1]
- %37 = fadd float %34, %36 ; [#uses=1]
- ret float %37
-
-bb5: ; preds = %bb3
- %38 = fcmp ugt float %27, 0.000000e+00 ; [#uses=1]
- br i1 %38, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- store float 1.000000e+00, float* %w, align 4
- %39 = getelementptr inbounds float* %w, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- store i32 1, i32* %m, align 4
- %40 = load float* %12, align 4 ; [#uses=2]
- %41 = fmul float %40, %40 ; [#uses=1]
- %42 = load float* %7, align 4 ; [#uses=2]
- %43 = fmul float %42, %42 ; [#uses=1]
- %44 = fadd float %41, %43 ; [#uses=1]
- %45 = load float* %2, align 4 ; [#uses=2]
- %46 = fmul float %45, %45 ; [#uses=1]
- %47 = fadd float %44, %46 ; [#uses=1]
- ret float %47
-
-bb7: ; preds = %bb5
- %48 = getelementptr inbounds float* %w, i32 1 ; [#uses=1]
- store float %27, float* %48, align 4
- %49 = fsub float 1.000000e+00, %27 ; [#uses=1]
- store float %49, float* %w, align 4
- store i32 3, i32* %m, align 4
- %50 = fmul float %4, %27 ; [#uses=1]
- %51 = fmul float %9, %27 ; [#uses=1]
- %52 = fmul float %14, %27 ; [#uses=1]
- %53 = load float* %2, align 4 ; [#uses=1]
- %54 = fadd float %53, %50 ; [#uses=2]
- %55 = load float* %7, align 4 ; [#uses=1]
- %56 = fadd float %55, %51 ; [#uses=2]
- %57 = load float* %12, align 4 ; [#uses=1]
- %58 = fadd float %57, %52 ; [#uses=2]
- %59 = fmul float %58, %58 ; [#uses=1]
- %60 = fmul float %56, %56 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %54, %54 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- ret float %63
-
-bb9: ; preds = %entry
- ret float -1.000000e+00
-}
-
-; [#uses=3]
-define internal fastcc void @_ZN12gjkepa2_implL10InitializeEPK13btConvexShapeRK11btTransformS2_S5_RN15btGjkEpaSolver28sResultsERNS_13MinkowskiDiffEb(%struct.btConvexShape* %shape0, %struct.btTransform* nocapture %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* nocapture %wtrs1, %"struct.btGjkEpaSolver2::sResults"* nocapture %results, %"struct.gjkepa2_impl::MinkowskiDiff"* nocapture %shape, i8 zeroext %withmargins) nounwind {
-entry:
- %0 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = bitcast %"struct.btGjkEpaSolver2::sResults"* %results to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %1, i8 0, i64 36, i32 4, i1 false)
- store %struct.btConvexShape* %shape0, %struct.btConvexShape** %0, align 4
- %2 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 0, i32 1 ; [#uses=1]
- store %struct.btConvexShape* %shape1, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=3]
- %7 = fmul float %4, %6 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=3]
- %12 = fmul float %9, %11 ; [#uses=1]
- %13 = fadd float %7, %12 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = fmul float %15, %17 ; [#uses=1]
- %19 = fadd float %13, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=3]
- %22 = fmul float %4, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=3]
- %25 = fmul float %9, %24 ; [#uses=1]
- %26 = fadd float %22, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %28 = load float* %27, align 4 ; [#uses=3]
- %29 = fmul float %15, %28 ; [#uses=1]
- %30 = fadd float %26, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %32 = load float* %31, align 4 ; [#uses=3]
- %33 = fmul float %4, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %35 = load float* %34, align 4 ; [#uses=3]
- %36 = fmul float %9, %35 ; [#uses=1]
- %37 = fadd float %33, %36 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=3]
- %40 = fmul float %15, %39 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = fmul float %43, %6 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fmul float %46, %11 ; [#uses=1]
- %48 = fadd float %44, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %50 = load float* %49, align 4 ; [#uses=3]
- %51 = fmul float %50, %17 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = fmul float %43, %21 ; [#uses=1]
- %54 = fmul float %46, %24 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %50, %28 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=1]
- %58 = fmul float %43, %32 ; [#uses=1]
- %59 = fmul float %46, %35 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %50, %39 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %64 = load float* %63, align 4 ; [#uses=3]
- %65 = fmul float %64, %6 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = fmul float %67, %11 ; [#uses=1]
- %69 = fadd float %65, %68 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %71 = load float* %70, align 4 ; [#uses=3]
- %72 = fmul float %71, %17 ; [#uses=1]
- %73 = fadd float %69, %72 ; [#uses=1]
- %74 = fmul float %64, %21 ; [#uses=1]
- %75 = fmul float %67, %24 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = fmul float %71, %28 ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=1]
- %79 = fmul float %64, %32 ; [#uses=1]
- %80 = fmul float %67, %35 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = fmul float %71, %39 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %83, float* %84, align 4
- %85 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %78, float* %85, align 4
- %86 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %73, float* %86, align 4
- %87 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %87, align 4
- %88 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %62, float* %88, align 4
- %89 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %57, float* %89, align 4
- %90 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %52, float* %90, align 4
- %91 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %91, align 4
- %92 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %41, float* %92, align 4
- %93 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %30, float* %93, align 4
- %94 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %94, align 4
- %95 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %95, align 4
- %96 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fsub float %97, %99 ; [#uses=3]
- %101 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- %105 = fsub float %102, %104 ; [#uses=3]
- %106 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fsub float %107, %109 ; [#uses=3]
- %111 = load float* %5, align 4 ; [#uses=4]
- %112 = fmul float %111, %110 ; [#uses=1]
- %113 = load float* %10, align 4 ; [#uses=4]
- %114 = fmul float %113, %105 ; [#uses=1]
- %115 = fadd float %112, %114 ; [#uses=1]
- %116 = load float* %16, align 4 ; [#uses=4]
- %117 = fmul float %116, %100 ; [#uses=1]
- %118 = fadd float %115, %117 ; [#uses=1]
- %119 = load float* %20, align 4 ; [#uses=4]
- %120 = fmul float %119, %110 ; [#uses=1]
- %121 = load float* %23, align 4 ; [#uses=4]
- %122 = fmul float %121, %105 ; [#uses=1]
- %123 = fadd float %120, %122 ; [#uses=1]
- %124 = load float* %27, align 4 ; [#uses=4]
- %125 = fmul float %124, %100 ; [#uses=1]
- %126 = fadd float %123, %125 ; [#uses=1]
- %127 = load float* %31, align 4 ; [#uses=4]
- %128 = fmul float %127, %110 ; [#uses=1]
- %129 = load float* %34, align 4 ; [#uses=4]
- %130 = fmul float %129, %105 ; [#uses=1]
- %131 = fadd float %128, %130 ; [#uses=1]
- %132 = load float* %38, align 4 ; [#uses=4]
- %133 = fmul float %132, %100 ; [#uses=1]
- %134 = fadd float %131, %133 ; [#uses=1]
- %135 = load float* %3, align 4 ; [#uses=3]
- %136 = fmul float %111, %135 ; [#uses=1]
- %137 = load float* %8, align 4 ; [#uses=3]
- %138 = fmul float %113, %137 ; [#uses=1]
- %139 = fadd float %136, %138 ; [#uses=1]
- %140 = load float* %14, align 4 ; [#uses=3]
- %141 = fmul float %116, %140 ; [#uses=1]
- %142 = fadd float %139, %141 ; [#uses=1]
- %143 = load float* %42, align 4 ; [#uses=3]
- %144 = fmul float %111, %143 ; [#uses=1]
- %145 = load float* %45, align 4 ; [#uses=3]
- %146 = fmul float %113, %145 ; [#uses=1]
- %147 = fadd float %144, %146 ; [#uses=1]
- %148 = load float* %49, align 4 ; [#uses=3]
- %149 = fmul float %116, %148 ; [#uses=1]
- %150 = fadd float %147, %149 ; [#uses=1]
- %151 = load float* %63, align 4 ; [#uses=3]
- %152 = fmul float %111, %151 ; [#uses=1]
- %153 = load float* %66, align 4 ; [#uses=3]
- %154 = fmul float %113, %153 ; [#uses=1]
- %155 = fadd float %152, %154 ; [#uses=1]
- %156 = load float* %70, align 4 ; [#uses=3]
- %157 = fmul float %116, %156 ; [#uses=1]
- %158 = fadd float %155, %157 ; [#uses=1]
- %159 = fmul float %119, %135 ; [#uses=1]
- %160 = fmul float %121, %137 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=1]
- %162 = fmul float %124, %140 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fmul float %119, %143 ; [#uses=1]
- %165 = fmul float %121, %145 ; [#uses=1]
- %166 = fadd float %164, %165 ; [#uses=1]
- %167 = fmul float %124, %148 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=1]
- %169 = fmul float %119, %151 ; [#uses=1]
- %170 = fmul float %121, %153 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=1]
- %172 = fmul float %124, %156 ; [#uses=1]
- %173 = fadd float %171, %172 ; [#uses=1]
- %174 = fmul float %127, %135 ; [#uses=1]
- %175 = fmul float %129, %137 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=1]
- %177 = fmul float %132, %140 ; [#uses=1]
- %178 = fadd float %176, %177 ; [#uses=1]
- %179 = fmul float %127, %143 ; [#uses=1]
- %180 = fmul float %129, %145 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=1]
- %182 = fmul float %132, %148 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=1]
- %184 = fmul float %127, %151 ; [#uses=1]
- %185 = fmul float %129, %153 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = fmul float %132, %156 ; [#uses=1]
- %188 = fadd float %186, %187 ; [#uses=1]
- %189 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %188, float* %189, align 4
- %190 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %183, float* %190, align 4
- %191 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %178, float* %191, align 4
- %192 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %192, align 4
- %193 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %173, float* %193, align 4
- %194 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %168, float* %194, align 4
- %195 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %163, float* %195, align 4
- %196 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %196, align 4
- %197 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %158, float* %197, align 4
- %198 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %150, float* %198, align 4
- %199 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %142, float* %199, align 4
- %200 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %200, align 4
- %201 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %134, float* %201, align 4
- %202 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %126, float* %202, align 4
- %203 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %118, float* %203, align 4
- %204 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %204, align 4
- %toBool.i = icmp eq i8 %withmargins, 0 ; [#uses=1]
- %205 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 0 ; [#uses=2]
- br i1 %toBool.i, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- store void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* @_ZNK13btConvexShape31localGetSupportVertexNonVirtualERK9btVector3, void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %205, align 4
- %206 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %206, align 4
- ret void
-
-bb1.i: ; preds = %entry
- store void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* @_ZNK13btConvexShape44localGetSupportVertexWithoutMarginNonVirtualERK9btVector3, void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %205, align 4
- %207 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %207, align 4
- ret void
-}
-
-; [#uses=9]
-define linkonce_odr void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* nocapture %this, %struct.btQuadWord* nocapture %d, %struct.GIM_AABB* %sv) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %3 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = fmul float %4, %4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = fmul float %7, %7 ; [#uses=1]
- %9 = fadd float %5, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=3]
- %12 = fmul float %11, %11 ; [#uses=1]
- %13 = fadd float %9, %12 ; [#uses=1]
- %14 = call float @sqrtf(float %13) nounwind readonly ; [#uses=1]
- %15 = fdiv float 1.000000e+00, %14 ; [#uses=3]
- %16 = fmul float %11, %15 ; [#uses=2]
- %17 = fmul float %7, %15 ; [#uses=2]
- %18 = fmul float %4, %15 ; [#uses=2]
- %19 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %19, align 4
- %20 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %17, float* %20, align 4
- %21 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %16, float* %21, align 4
- %22 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0 ; [#uses=1]
- %25 = fsub float -0.000000e+00, %16 ; [#uses=1]
- %26 = fsub float -0.000000e+00, %17 ; [#uses=1]
- %27 = fsub float -0.000000e+00, %18 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %27, float* %28, align 8
- %29 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %26, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %25, float* %30, align 8
- %31 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- call void @_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3(%struct.btQuadWord* noalias sret %2, %"struct.gjkepa2_impl::MinkowskiDiff"* %24, %struct.btQuadWord* %1)
- %32 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 3, i32 0 ; [#uses=1]
- %33 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %32, align 4 ; [#uses=2]
- %34 = ptrtoint void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %33 to i32 ; [#uses=2]
- %35 = and i32 %34, 1 ; [#uses=1]
- %toBool.i.i = icmp eq i32 %35, 0 ; [#uses=1]
- %.phi.trans.insert.i.i = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre.i.i = load %struct.btConvexShape** %.phi.trans.insert.i.i, align 4 ; [#uses=2]
- %.phi.trans.insert4.i.i = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 3, i32 1 ; [#uses=1]
- %.pre5.i.i = load i32* %.phi.trans.insert4.i.i, align 4 ; [#uses=2]
- br i1 %toBool.i.i, label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3.exit, label %bb.i.i
-
-bb.i.i: ; preds = %entry
- %36 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %37 = add i32 %36, %.pre5.i.i ; [#uses=1]
- %38 = inttoptr i32 %37 to %struct.btConvexShape* ; [#uses=1]
- %39 = getelementptr inbounds %struct.btConvexShape* %38, i32 0, i32 0, i32 0 ; [#uses=1]
- %40 = load i32 (...)*** %39, align 4 ; [#uses=1]
- %41 = ptrtoint i32 (...)** %40 to i32 ; [#uses=1]
- %42 = add nsw i32 %34, -1 ; [#uses=1]
- %43 = add i32 %42, %41 ; [#uses=1]
- %44 = inttoptr i32 %43 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** ; [#uses=1]
- %iftmp.134.0.pre.i.i = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %44, align 4 ; [#uses=1]
- br label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3.exit
-
-_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3.exit: ; preds = %bb.i.i, %entry
- %iftmp.134.0.i.i = phi void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* [ %iftmp.134.0.pre.i.i, %bb.i.i ], [ %33, %entry ] ; [#uses=1]
- %45 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %46 = add i32 %45, %.pre5.i.i ; [#uses=1]
- %47 = inttoptr i32 %46 to %struct.btConvexShape* ; [#uses=1]
- call void %iftmp.134.0.i.i(%struct.btQuadWord* noalias sret %0, %struct.btConvexShape* %47, %struct.btQuadWord* %23)
- %48 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 8 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 8 ; [#uses=1]
- %52 = fsub float %49, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fsub float %54, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 8 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %61 = load float* %60, align 8 ; [#uses=1]
- %62 = fsub float %59, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %62, float* %63, align 4
- %64 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %57, float* %64, align 4
- %65 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %52, float* %65, align 4
- %66 = getelementptr inbounds %struct.GIM_AABB* %sv, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %66, align 4
- ret void
-}
-
-; [#uses=7]
-define linkonce_odr zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %this) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %axis = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %axis11 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %p = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %n = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 8 ; [#uses=12]
- %4 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=13]
- %5 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 2 ; [#uses=4]
- %6 = load i32* %5, align 4 ; [#uses=2]
- switch i32 %6, label %bb34 [
- i32 1, label %bb7.preheader
- i32 2, label %bb8
- i32 3, label %bb22
- i32 4, label %bb31
- ]
-
-bb7.preheader: ; preds = %entry
- %7 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 0 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 6 ; [#uses=8]
- %12 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb7
-
-bb1: ; preds = %bb7
- %scevgep68 = getelementptr %struct.btQuadWord* %axis, i32 0, i32 0, i32 %71 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 8
- store float 0.000000e+00, float* %8, align 4
- store float 0.000000e+00, float* %9, align 8
- store float 0.000000e+00, float* %10, align 4
- store float 1.000000e+00, float* %scevgep68, align 4
- %16 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=4]
- %17 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %16, i32 0, i32 2 ; [#uses=4]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %16, i32 0, i32 1, i32 %18 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = load i32* %17, align 4 ; [#uses=1]
- %21 = load i32* %11, align 4 ; [#uses=1]
- %22 = add i32 %21, -1 ; [#uses=2]
- store i32 %22, i32* %11, align 4
- %23 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %22 ; [#uses=1]
- %24 = load %struct.GIM_AABB** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %16, i32 0, i32 0, i32 %20 ; [#uses=1]
- store %struct.GIM_AABB* %24, %struct.GIM_AABB** %25, align 4
- %26 = load i32* %17, align 4 ; [#uses=2]
- %27 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %16, i32 0, i32 0, i32 %26 ; [#uses=1]
- %28 = load %struct.GIM_AABB** %27, align 4 ; [#uses=1]
- %29 = add i32 %26, 1 ; [#uses=1]
- store i32 %29, i32* %17, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %axis, %struct.GIM_AABB* %28)
- %30 = call zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %this) ; [#uses=1]
- %toBool = icmp eq i8 %30, 0 ; [#uses=1]
- br i1 %toBool, label %bb3, label %bb35
-
-bb3: ; preds = %bb1
- %31 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=2]
- %32 = load i32* %11, align 4 ; [#uses=2]
- %33 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %31, i32 0, i32 2 ; [#uses=2]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = add i32 %34, -1 ; [#uses=2]
- store i32 %35, i32* %33, align 4
- %36 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %31, i32 0, i32 0, i32 %35 ; [#uses=1]
- %37 = load %struct.GIM_AABB** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %32 ; [#uses=1]
- store %struct.GIM_AABB* %37, %struct.GIM_AABB** %38, align 4
- %39 = add i32 %32, 1 ; [#uses=1]
- store i32 %39, i32* %11, align 4
- %40 = load float* %9, align 8 ; [#uses=1]
- %41 = fsub float -0.000000e+00, %40 ; [#uses=1]
- %42 = load float* %8, align 4 ; [#uses=1]
- %43 = fsub float -0.000000e+00, %42 ; [#uses=1]
- %44 = load float* %7, align 8 ; [#uses=1]
- %45 = fsub float -0.000000e+00, %44 ; [#uses=1]
- store float %45, float* %12, align 8
- store float %43, float* %13, align 4
- store float %41, float* %14, align 8
- store float 0.000000e+00, float* %15, align 4
- %46 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=4]
- %47 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %46, i32 0, i32 2 ; [#uses=4]
- %48 = load i32* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %46, i32 0, i32 1, i32 %48 ; [#uses=1]
- store float 0.000000e+00, float* %49, align 4
- %50 = load i32* %47, align 4 ; [#uses=1]
- %51 = load i32* %11, align 4 ; [#uses=1]
- %52 = add i32 %51, -1 ; [#uses=2]
- store i32 %52, i32* %11, align 4
- %53 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %52 ; [#uses=1]
- %54 = load %struct.GIM_AABB** %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %46, i32 0, i32 0, i32 %50 ; [#uses=1]
- store %struct.GIM_AABB* %54, %struct.GIM_AABB** %55, align 4
- %56 = load i32* %47, align 4 ; [#uses=2]
- %57 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %46, i32 0, i32 0, i32 %56 ; [#uses=1]
- %58 = load %struct.GIM_AABB** %57, align 4 ; [#uses=1]
- %59 = add i32 %56, 1 ; [#uses=1]
- store i32 %59, i32* %47, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %2, %struct.GIM_AABB* %58)
- %60 = call zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %this) ; [#uses=1]
- %toBool4 = icmp eq i8 %60, 0 ; [#uses=1]
- br i1 %toBool4, label %bb6, label %bb35
-
-bb6: ; preds = %bb3
- %61 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=2]
- %62 = load i32* %11, align 4 ; [#uses=2]
- %63 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %61, i32 0, i32 2 ; [#uses=2]
- %64 = load i32* %63, align 4 ; [#uses=1]
- %65 = add i32 %64, -1 ; [#uses=2]
- store i32 %65, i32* %63, align 4
- %66 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %61, i32 0, i32 0, i32 %65 ; [#uses=1]
- %67 = load %struct.GIM_AABB** %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %62 ; [#uses=1]
- store %struct.GIM_AABB* %67, %struct.GIM_AABB** %68, align 4
- %69 = add i32 %62, 1 ; [#uses=1]
- store i32 %69, i32* %11, align 4
- %70 = add i32 %71, 1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb7.preheader
- %71 = phi i32 [ %70, %bb6 ], [ 0, %bb7.preheader ] ; [#uses=3]
- %72 = icmp ult i32 %71, 3 ; [#uses=1]
- br i1 %72, label %bb1, label %bb34
-
-bb8: ; preds = %entry
- %73 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %74 = load %struct.GIM_AABB** %73, align 4 ; [#uses=3]
- %75 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %76 = load %struct.GIM_AABB** %75, align 4 ; [#uses=3]
- %77 = getelementptr inbounds %struct.GIM_AABB* %76, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds %struct.GIM_AABB* %74, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fsub float %78, %80 ; [#uses=2]
- %82 = getelementptr inbounds %struct.GIM_AABB* %76, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds %struct.GIM_AABB* %74, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fsub float %83, %85 ; [#uses=2]
- %87 = getelementptr inbounds %struct.GIM_AABB* %76, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = getelementptr inbounds %struct.GIM_AABB* %74, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = fsub float %88, %90 ; [#uses=2]
- %92 = getelementptr inbounds %struct.btQuadWord* %axis11, i32 0, i32 0, i32 0 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btQuadWord* %axis11, i32 0, i32 0, i32 1 ; [#uses=2]
- %94 = getelementptr inbounds %struct.btQuadWord* %axis11, i32 0, i32 0, i32 2 ; [#uses=2]
- %95 = getelementptr inbounds %struct.btQuadWord* %axis11, i32 0, i32 0, i32 3 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=2]
- %97 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=2]
- %98 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=2]
- %99 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 3 ; [#uses=1]
- %100 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 6 ; [#uses=8]
- %101 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb21
-
-bb10: ; preds = %bb21
- %scevgep = getelementptr %struct.btQuadWord* %axis11, i32 0, i32 0, i32 %178 ; [#uses=1]
- store float 0.000000e+00, float* %92, align 8
- store float 0.000000e+00, float* %93, align 4
- store float 0.000000e+00, float* %94, align 8
- store float 0.000000e+00, float* %95, align 4
- store float 1.000000e+00, float* %scevgep, align 4
- %105 = load float* %93, align 4 ; [#uses=2]
- %106 = fmul float %91, %105 ; [#uses=1]
- %107 = load float* %92, align 8 ; [#uses=2]
- %108 = fmul float %86, %107 ; [#uses=1]
- %109 = fsub float %106, %108 ; [#uses=3]
- %110 = fmul float %81, %107 ; [#uses=1]
- %111 = load float* %94, align 8 ; [#uses=2]
- %112 = fmul float %91, %111 ; [#uses=1]
- %113 = fsub float %110, %112 ; [#uses=3]
- %114 = fmul float %86, %111 ; [#uses=1]
- %115 = fmul float %81, %105 ; [#uses=1]
- %116 = fsub float %114, %115 ; [#uses=3]
- store float %116, float* %96, align 8
- store float %113, float* %97, align 4
- store float %109, float* %98, align 8
- store float 0.000000e+00, float* %99, align 4
- %117 = fmul float %116, %116 ; [#uses=1]
- %118 = fmul float %113, %113 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = fmul float %109, %109 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fcmp ogt float %121, 0.000000e+00 ; [#uses=1]
- br i1 %122, label %bb13, label %bb20
-
-bb13: ; preds = %bb10
- %123 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=4]
- %124 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %123, i32 0, i32 2 ; [#uses=4]
- %125 = load i32* %124, align 4 ; [#uses=1]
- %126 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %123, i32 0, i32 1, i32 %125 ; [#uses=1]
- store float 0.000000e+00, float* %126, align 4
- %127 = load i32* %124, align 4 ; [#uses=1]
- %128 = load i32* %100, align 4 ; [#uses=1]
- %129 = add i32 %128, -1 ; [#uses=2]
- store i32 %129, i32* %100, align 4
- %130 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %129 ; [#uses=1]
- %131 = load %struct.GIM_AABB** %130, align 4 ; [#uses=1]
- %132 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %123, i32 0, i32 0, i32 %127 ; [#uses=1]
- store %struct.GIM_AABB* %131, %struct.GIM_AABB** %132, align 4
- %133 = load i32* %124, align 4 ; [#uses=2]
- %134 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %123, i32 0, i32 0, i32 %133 ; [#uses=1]
- %135 = load %struct.GIM_AABB** %134, align 4 ; [#uses=1]
- %136 = add i32 %133, 1 ; [#uses=1]
- store i32 %136, i32* %124, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %p, %struct.GIM_AABB* %135)
- %137 = call zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %this) ; [#uses=1]
- %toBool14 = icmp eq i8 %137, 0 ; [#uses=1]
- br i1 %toBool14, label %bb16, label %bb35
-
-bb16: ; preds = %bb13
- %138 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=2]
- %139 = load i32* %100, align 4 ; [#uses=2]
- %140 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %138, i32 0, i32 2 ; [#uses=2]
- %141 = load i32* %140, align 4 ; [#uses=1]
- %142 = add i32 %141, -1 ; [#uses=2]
- store i32 %142, i32* %140, align 4
- %143 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %138, i32 0, i32 0, i32 %142 ; [#uses=1]
- %144 = load %struct.GIM_AABB** %143, align 4 ; [#uses=1]
- %145 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %139 ; [#uses=1]
- store %struct.GIM_AABB* %144, %struct.GIM_AABB** %145, align 4
- %146 = add i32 %139, 1 ; [#uses=1]
- store i32 %146, i32* %100, align 4
- %147 = load float* %98, align 8 ; [#uses=1]
- %148 = fsub float -0.000000e+00, %147 ; [#uses=1]
- %149 = load float* %97, align 4 ; [#uses=1]
- %150 = fsub float -0.000000e+00, %149 ; [#uses=1]
- %151 = load float* %96, align 8 ; [#uses=1]
- %152 = fsub float -0.000000e+00, %151 ; [#uses=1]
- store float %152, float* %101, align 8
- store float %150, float* %102, align 4
- store float %148, float* %103, align 8
- store float 0.000000e+00, float* %104, align 4
- %153 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=4]
- %154 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %153, i32 0, i32 2 ; [#uses=4]
- %155 = load i32* %154, align 4 ; [#uses=1]
- %156 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %153, i32 0, i32 1, i32 %155 ; [#uses=1]
- store float 0.000000e+00, float* %156, align 4
- %157 = load i32* %154, align 4 ; [#uses=1]
- %158 = load i32* %100, align 4 ; [#uses=1]
- %159 = add i32 %158, -1 ; [#uses=2]
- store i32 %159, i32* %100, align 4
- %160 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %159 ; [#uses=1]
- %161 = load %struct.GIM_AABB** %160, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %153, i32 0, i32 0, i32 %157 ; [#uses=1]
- store %struct.GIM_AABB* %161, %struct.GIM_AABB** %162, align 4
- %163 = load i32* %154, align 4 ; [#uses=2]
- %164 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %153, i32 0, i32 0, i32 %163 ; [#uses=1]
- %165 = load %struct.GIM_AABB** %164, align 4 ; [#uses=1]
- %166 = add i32 %163, 1 ; [#uses=1]
- store i32 %166, i32* %154, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %1, %struct.GIM_AABB* %165)
- %167 = call zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %this) ; [#uses=1]
- %toBool17 = icmp eq i8 %167, 0 ; [#uses=1]
- br i1 %toBool17, label %bb19, label %bb35
-
-bb19: ; preds = %bb16
- %168 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=2]
- %169 = load i32* %100, align 4 ; [#uses=2]
- %170 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %168, i32 0, i32 2 ; [#uses=2]
- %171 = load i32* %170, align 4 ; [#uses=1]
- %172 = add i32 %171, -1 ; [#uses=2]
- store i32 %172, i32* %170, align 4
- %173 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %168, i32 0, i32 0, i32 %172 ; [#uses=1]
- %174 = load %struct.GIM_AABB** %173, align 4 ; [#uses=1]
- %175 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %169 ; [#uses=1]
- store %struct.GIM_AABB* %174, %struct.GIM_AABB** %175, align 4
- %176 = add i32 %169, 1 ; [#uses=1]
- store i32 %176, i32* %100, align 4
- br label %bb20
-
-bb20: ; preds = %bb19, %bb10
- %177 = add i32 %178, 1 ; [#uses=1]
- br label %bb21
-
-bb21: ; preds = %bb20, %bb8
- %178 = phi i32 [ 0, %bb8 ], [ %177, %bb20 ] ; [#uses=3]
- %179 = icmp ult i32 %178, 3 ; [#uses=1]
- br i1 %179, label %bb10, label %bb34
-
-bb22: ; preds = %entry
- %180 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %181 = load %struct.GIM_AABB** %180, align 4 ; [#uses=3]
- %182 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 2 ; [#uses=1]
- %183 = load %struct.GIM_AABB** %182, align 4 ; [#uses=3]
- %184 = getelementptr inbounds %struct.GIM_AABB* %183, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %185 = load float* %184, align 4 ; [#uses=1]
- %186 = getelementptr inbounds %struct.GIM_AABB* %181, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=2]
- %188 = fsub float %185, %187 ; [#uses=2]
- %189 = getelementptr inbounds %struct.GIM_AABB* %183, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %190 = load float* %189, align 4 ; [#uses=1]
- %191 = getelementptr inbounds %struct.GIM_AABB* %181, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=2]
- %193 = fsub float %190, %192 ; [#uses=2]
- %194 = getelementptr inbounds %struct.GIM_AABB* %183, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=1]
- %196 = getelementptr inbounds %struct.GIM_AABB* %181, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %197 = load float* %196, align 4 ; [#uses=2]
- %198 = fsub float %195, %197 ; [#uses=2]
- %199 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %200 = load %struct.GIM_AABB** %199, align 4 ; [#uses=3]
- %201 = getelementptr inbounds %struct.GIM_AABB* %200, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %202 = load float* %201, align 4 ; [#uses=1]
- %203 = fsub float %202, %187 ; [#uses=2]
- %204 = getelementptr inbounds %struct.GIM_AABB* %200, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=1]
- %206 = fsub float %205, %192 ; [#uses=2]
- %207 = getelementptr inbounds %struct.GIM_AABB* %200, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %208 = load float* %207, align 4 ; [#uses=1]
- %209 = fsub float %208, %197 ; [#uses=2]
- %210 = fmul float %209, %193 ; [#uses=1]
- %211 = fmul float %206, %198 ; [#uses=1]
- %212 = fsub float %210, %211 ; [#uses=3]
- %213 = fmul float %203, %198 ; [#uses=1]
- %214 = fmul float %209, %188 ; [#uses=1]
- %215 = fsub float %213, %214 ; [#uses=3]
- %216 = fmul float %206, %188 ; [#uses=1]
- %217 = fmul float %203, %193 ; [#uses=1]
- %218 = fsub float %216, %217 ; [#uses=3]
- %219 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %218, float* %219, align 8
- %220 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %215, float* %220, align 4
- %221 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %212, float* %221, align 8
- %222 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %222, align 4
- %223 = fmul float %218, %218 ; [#uses=1]
- %224 = fmul float %215, %215 ; [#uses=1]
- %225 = fadd float %223, %224 ; [#uses=1]
- %226 = fmul float %212, %212 ; [#uses=1]
- %227 = fadd float %225, %226 ; [#uses=1]
- %228 = fcmp ogt float %227, 0.000000e+00 ; [#uses=1]
- br i1 %228, label %bb24, label %bb34
-
-bb24: ; preds = %bb22
- %229 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 1, i32 %6 ; [#uses=1]
- store float 0.000000e+00, float* %229, align 4
- %230 = load i32* %5, align 4 ; [#uses=1]
- %231 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 6 ; [#uses=8]
- %232 = load i32* %231, align 4 ; [#uses=1]
- %233 = add i32 %232, -1 ; [#uses=2]
- store i32 %233, i32* %231, align 4
- %234 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %233 ; [#uses=1]
- %235 = load %struct.GIM_AABB** %234, align 4 ; [#uses=1]
- %236 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 %230 ; [#uses=1]
- store %struct.GIM_AABB* %235, %struct.GIM_AABB** %236, align 4
- %237 = load i32* %5, align 4 ; [#uses=2]
- %238 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 %237 ; [#uses=1]
- %239 = load %struct.GIM_AABB** %238, align 4 ; [#uses=1]
- %240 = add i32 %237, 1 ; [#uses=1]
- store i32 %240, i32* %5, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %n, %struct.GIM_AABB* %239)
- %241 = call zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %this) ; [#uses=1]
- %toBool25 = icmp eq i8 %241, 0 ; [#uses=1]
- br i1 %toBool25, label %bb27, label %bb35
-
-bb27: ; preds = %bb24
- %242 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=2]
- %243 = load i32* %231, align 4 ; [#uses=2]
- %244 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %242, i32 0, i32 2 ; [#uses=2]
- %245 = load i32* %244, align 4 ; [#uses=1]
- %246 = add i32 %245, -1 ; [#uses=2]
- store i32 %246, i32* %244, align 4
- %247 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %242, i32 0, i32 0, i32 %246 ; [#uses=1]
- %248 = load %struct.GIM_AABB** %247, align 4 ; [#uses=1]
- %249 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %243 ; [#uses=1]
- store %struct.GIM_AABB* %248, %struct.GIM_AABB** %249, align 4
- %250 = add i32 %243, 1 ; [#uses=1]
- store i32 %250, i32* %231, align 4
- %251 = load float* %221, align 8 ; [#uses=1]
- %252 = fsub float -0.000000e+00, %251 ; [#uses=1]
- %253 = load float* %220, align 4 ; [#uses=1]
- %254 = fsub float -0.000000e+00, %253 ; [#uses=1]
- %255 = load float* %219, align 8 ; [#uses=1]
- %256 = fsub float -0.000000e+00, %255 ; [#uses=1]
- %257 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %256, float* %257, align 8
- %258 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %254, float* %258, align 4
- %259 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %252, float* %259, align 8
- %260 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %260, align 4
- %261 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=4]
- %262 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %261, i32 0, i32 2 ; [#uses=4]
- %263 = load i32* %262, align 4 ; [#uses=1]
- %264 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %261, i32 0, i32 1, i32 %263 ; [#uses=1]
- store float 0.000000e+00, float* %264, align 4
- %265 = load i32* %262, align 4 ; [#uses=1]
- %266 = load i32* %231, align 4 ; [#uses=1]
- %267 = add i32 %266, -1 ; [#uses=2]
- store i32 %267, i32* %231, align 4
- %268 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %267 ; [#uses=1]
- %269 = load %struct.GIM_AABB** %268, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %261, i32 0, i32 0, i32 %265 ; [#uses=1]
- store %struct.GIM_AABB* %269, %struct.GIM_AABB** %270, align 4
- %271 = load i32* %262, align 4 ; [#uses=2]
- %272 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %261, i32 0, i32 0, i32 %271 ; [#uses=1]
- %273 = load %struct.GIM_AABB** %272, align 4 ; [#uses=1]
- %274 = add i32 %271, 1 ; [#uses=1]
- store i32 %274, i32* %262, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %0, %struct.GIM_AABB* %273)
- %275 = call zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %this) ; [#uses=1]
- %toBool28 = icmp eq i8 %275, 0 ; [#uses=1]
- br i1 %toBool28, label %bb30, label %bb35
-
-bb30: ; preds = %bb27
- %276 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %3, align 4 ; [#uses=2]
- %277 = load i32* %231, align 4 ; [#uses=2]
- %278 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %276, i32 0, i32 2 ; [#uses=2]
- %279 = load i32* %278, align 4 ; [#uses=1]
- %280 = add i32 %279, -1 ; [#uses=2]
- store i32 %280, i32* %278, align 4
- %281 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %276, i32 0, i32 0, i32 %280 ; [#uses=1]
- %282 = load %struct.GIM_AABB** %281, align 4 ; [#uses=1]
- %283 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %277 ; [#uses=1]
- store %struct.GIM_AABB* %282, %struct.GIM_AABB** %283, align 4
- %284 = add i32 %277, 1 ; [#uses=1]
- store i32 %284, i32* %231, align 4
- ret i8 0
-
-bb31: ; preds = %entry
- %285 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 3 ; [#uses=1]
- %286 = load %struct.GIM_AABB** %285, align 4 ; [#uses=3]
- %287 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 2 ; [#uses=1]
- %288 = load %struct.GIM_AABB** %287, align 4 ; [#uses=3]
- %289 = getelementptr inbounds %struct.GIM_AABB* %288, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %290 = load float* %289, align 4 ; [#uses=1]
- %291 = getelementptr inbounds %struct.GIM_AABB* %286, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %292 = load float* %291, align 4 ; [#uses=3]
- %293 = fsub float %290, %292 ; [#uses=2]
- %294 = getelementptr inbounds %struct.GIM_AABB* %288, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %295 = load float* %294, align 4 ; [#uses=1]
- %296 = getelementptr inbounds %struct.GIM_AABB* %286, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %297 = load float* %296, align 4 ; [#uses=3]
- %298 = fsub float %295, %297 ; [#uses=2]
- %299 = getelementptr inbounds %struct.GIM_AABB* %288, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %300 = load float* %299, align 4 ; [#uses=1]
- %301 = getelementptr inbounds %struct.GIM_AABB* %286, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %302 = load float* %301, align 4 ; [#uses=3]
- %303 = fsub float %300, %302 ; [#uses=2]
- %304 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %305 = load %struct.GIM_AABB** %304, align 4 ; [#uses=3]
- %306 = getelementptr inbounds %struct.GIM_AABB* %305, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %307 = load float* %306, align 4 ; [#uses=1]
- %308 = fsub float %307, %292 ; [#uses=2]
- %309 = getelementptr inbounds %struct.GIM_AABB* %305, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %310 = load float* %309, align 4 ; [#uses=1]
- %311 = fsub float %310, %297 ; [#uses=2]
- %312 = getelementptr inbounds %struct.GIM_AABB* %305, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %313 = load float* %312, align 4 ; [#uses=1]
- %314 = fsub float %313, %302 ; [#uses=2]
- %315 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %316 = load %struct.GIM_AABB** %315, align 4 ; [#uses=3]
- %317 = getelementptr inbounds %struct.GIM_AABB* %316, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %318 = load float* %317, align 4 ; [#uses=1]
- %319 = fsub float %318, %292 ; [#uses=2]
- %320 = getelementptr inbounds %struct.GIM_AABB* %316, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %321 = load float* %320, align 4 ; [#uses=1]
- %322 = fsub float %321, %297 ; [#uses=2]
- %323 = getelementptr inbounds %struct.GIM_AABB* %316, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %324 = load float* %323, align 4 ; [#uses=1]
- %325 = fsub float %324, %302 ; [#uses=2]
- %326 = fmul float %322, %308 ; [#uses=1]
- %327 = fmul float %326, %303 ; [#uses=1]
- %328 = fmul float %319, %314 ; [#uses=1]
- %329 = fmul float %328, %298 ; [#uses=1]
- %330 = fadd float %327, %329 ; [#uses=1]
- %331 = fmul float %325, %308 ; [#uses=1]
- %332 = fmul float %331, %298 ; [#uses=1]
- %333 = fsub float %330, %332 ; [#uses=1]
- %334 = fmul float %322, %314 ; [#uses=1]
- %335 = fmul float %334, %293 ; [#uses=1]
- %336 = fsub float %333, %335 ; [#uses=1]
- %337 = fmul float %325, %311 ; [#uses=1]
- %338 = fmul float %337, %293 ; [#uses=1]
- %339 = fadd float %336, %338 ; [#uses=1]
- %340 = fmul float %319, %311 ; [#uses=1]
- %341 = fmul float %340, %303 ; [#uses=1]
- %342 = fsub float %339, %341 ; [#uses=1]
- %343 = call float @fabsf(float %342) nounwind readnone ; [#uses=1]
- %344 = fcmp ogt float %343, 0.000000e+00 ; [#uses=1]
- %retval = zext i1 %344 to i8 ; [#uses=1]
- ret i8 %retval
-
-bb34: ; preds = %bb22, %bb21, %bb7, %entry
- ret i8 0
-
-bb35: ; preds = %bb27, %bb24, %bb16, %bb13, %bb3, %bb1
- ret i8 1
-}
-
-; [#uses=2]
-define linkonce_odr float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_PfRj(%struct.btQuadWord* %a, %struct.btQuadWord* %b, %struct.btQuadWord* %c, float* nocapture %w, i32* nocapture %m) nounwind {
-entry:
- %vt = alloca [3 x %struct.btQuadWord*], align 4 ; [#uses=5]
- %dl = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=15]
- %subw = alloca [2 x float], align 4 ; [#uses=2]
- %subm = alloca i32, align 4 ; [#uses=3]
- %0 = getelementptr inbounds [3 x %struct.btQuadWord*]* %vt, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds [3 x %struct.btQuadWord*]* %vt, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds [3 x %struct.btQuadWord*]* %vt, i32 0, i32 2 ; [#uses=1]
- store %struct.btQuadWord* %a, %struct.btQuadWord** %0, align 4
- store %struct.btQuadWord* %b, %struct.btQuadWord** %1, align 4
- store %struct.btQuadWord* %c, %struct.btQuadWord** %2, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = fsub float %4, %6 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fsub float %9, %11 ; [#uses=4]
- %13 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=2]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fsub float %14, %16 ; [#uses=4]
- %18 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 8
- %19 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %19, align 4
- %20 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %7, float* %20, align 8
- %21 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 2 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fsub float %6, %23 ; [#uses=5]
- %25 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 1 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=2]
- %27 = fsub float %11, %26 ; [#uses=5]
- %28 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 0 ; [#uses=2]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fsub float %16, %29 ; [#uses=5]
- %31 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %30, float* %31, align 8
- %32 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %27, float* %32, align 4
- %33 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %24, float* %33, align 8
- %34 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 4
- %35 = fsub float %23, %4 ; [#uses=3]
- %36 = fsub float %26, %9 ; [#uses=3]
- %37 = fsub float %29, %14 ; [#uses=3]
- %38 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %37, float* %38, align 8
- %39 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %36, float* %39, align 4
- %40 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %35, float* %40, align 8
- %41 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = fmul float %17, %27 ; [#uses=1]
- %43 = fmul float %12, %30 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=6]
- %45 = fmul float %7, %30 ; [#uses=1]
- %46 = fmul float %17, %24 ; [#uses=1]
- %47 = fsub float %45, %46 ; [#uses=6]
- %48 = fmul float %12, %24 ; [#uses=1]
- %49 = fmul float %7, %27 ; [#uses=1]
- %50 = fsub float %48, %49 ; [#uses=6]
- %51 = fmul float %50, %50 ; [#uses=1]
- %52 = fmul float %47, %47 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=1]
- %54 = fmul float %44, %44 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=3]
- %56 = fcmp ogt float %55, 0.000000e+00 ; [#uses=1]
- br i1 %56, label %bb.nph, label %bb18
-
-bb.nph: ; preds = %entry
- %57 = getelementptr inbounds [2 x float]* %subw, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %57, align 4
- %58 = getelementptr inbounds [2 x float]* %subw, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %58, align 4
- store i32 0, i32* %subm, align 4
- br label %bb1
-
-bb1: ; preds = %bb12.bb1_crit_edge, %bb.nph
- %59 = phi float [ %4, %bb.nph ], [ %.pre59, %bb12.bb1_crit_edge ] ; [#uses=1]
- %60 = phi float [ %9, %bb.nph ], [ %.pre57, %bb12.bb1_crit_edge ] ; [#uses=1]
- %61 = phi float [ %14, %bb.nph ], [ %.pre55, %bb12.bb1_crit_edge ] ; [#uses=1]
- %62 = phi %struct.btQuadWord* [ %a, %bb.nph ], [ %.pre54, %bb12.bb1_crit_edge ] ; [#uses=1]
- %63 = phi float [ %7, %bb.nph ], [ %.pre53, %bb12.bb1_crit_edge ] ; [#uses=2]
- %64 = phi float [ %12, %bb.nph ], [ %.pre52, %bb12.bb1_crit_edge ] ; [#uses=2]
- %65 = phi float [ %17, %bb.nph ], [ %.pre, %bb12.bb1_crit_edge ] ; [#uses=2]
- %66 = phi i32 [ 0, %bb.nph ], [ %101, %bb12.bb1_crit_edge ] ; [#uses=4]
- %mindist.144 = phi float [ -1.000000e+00, %bb.nph ], [ %mindist.0, %bb12.bb1_crit_edge ] ; [#uses=4]
- %scevgep47 = getelementptr float* %w, i32 %66 ; [#uses=1]
- %67 = fmul float %65, %47 ; [#uses=1]
- %68 = fmul float %64, %50 ; [#uses=1]
- %69 = fsub float %67, %68 ; [#uses=1]
- %70 = fmul float %63, %50 ; [#uses=1]
- %71 = fmul float %65, %44 ; [#uses=1]
- %72 = fsub float %70, %71 ; [#uses=1]
- %73 = fmul float %64, %44 ; [#uses=1]
- %74 = fmul float %63, %47 ; [#uses=1]
- %75 = fsub float %73, %74 ; [#uses=1]
- %76 = fmul float %61, %75 ; [#uses=1]
- %77 = fmul float %60, %72 ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=1]
- %79 = fmul float %59, %69 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=1]
- %81 = fcmp ogt float %80, 0.000000e+00 ; [#uses=1]
- br i1 %81, label %bb2, label %bb12
-
-bb2: ; preds = %bb1
- %scevgep46 = getelementptr [3 x i32]* @_ZZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_PfRjE4imd3, i32 0, i32 %66 ; [#uses=1]
- %82 = load i32* %scevgep46, align 4 ; [#uses=4]
- %83 = getelementptr inbounds [3 x %struct.btQuadWord*]* %vt, i32 0, i32 %82 ; [#uses=1]
- %84 = load %struct.btQuadWord** %83, align 4 ; [#uses=1]
- %85 = call float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_PfRj(%struct.btQuadWord* %62, %struct.btQuadWord* %84, float* %57, i32* %subm) nounwind ; [#uses=2]
- %86 = fcmp olt float %mindist.144, 0.000000e+00 ; [#uses=1]
- %87 = fcmp olt float %85, %mindist.144 ; [#uses=1]
- %or.cond = or i1 %86, %87 ; [#uses=1]
- br i1 %or.cond, label %bb4, label %bb12
-
-bb4: ; preds = %bb2
- %88 = load i32* %subm, align 4 ; [#uses=2]
- %89 = and i32 %88, 1 ; [#uses=1]
- %toBool5 = icmp eq i32 %89, 0 ; [#uses=1]
- %90 = shl i32 1, %66 ; [#uses=1]
- %iftmp.176.0 = select i1 %toBool5, i32 0, i32 %90 ; [#uses=1]
- %91 = and i32 %88, 2 ; [#uses=1]
- %92 = icmp eq i32 %91, 0 ; [#uses=1]
- %93 = shl i32 1, %82 ; [#uses=1]
- %iftmp.179.0 = select i1 %92, i32 0, i32 %93 ; [#uses=1]
- %94 = add nsw i32 %iftmp.176.0, %iftmp.179.0 ; [#uses=1]
- store i32 %94, i32* %m, align 4
- %95 = load float* %57, align 4 ; [#uses=1]
- store float %95, float* %scevgep47, align 4
- %96 = load float* %58, align 4 ; [#uses=1]
- %97 = getelementptr inbounds float* %w, i32 %82 ; [#uses=1]
- store float %96, float* %97, align 4
- %98 = getelementptr inbounds [3 x i32]* @_ZZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_PfRjE4imd3, i32 0, i32 %82 ; [#uses=1]
- %99 = load i32* %98, align 4 ; [#uses=1]
- %100 = getelementptr inbounds float* %w, i32 %99 ; [#uses=1]
- store float 0.000000e+00, float* %100, align 4
- br label %bb12
-
-bb12: ; preds = %bb4, %bb2, %bb1
- %mindist.0 = phi float [ %85, %bb4 ], [ %mindist.144, %bb1 ], [ %mindist.144, %bb2 ] ; [#uses=3]
- %101 = add i32 %66, 1 ; [#uses=6]
- %exitcond = icmp eq i32 %101, 3 ; [#uses=1]
- br i1 %exitcond, label %bb14, label %bb12.bb1_crit_edge
-
-bb12.bb1_crit_edge: ; preds = %bb12
- %scevgep4849.phi.trans.insert = getelementptr [3 x %struct.btQuadWord]* %dl, i32 0, i32 %101, i32 0, i32 0 ; [#uses=1]
- %.pre = load float* %scevgep4849.phi.trans.insert, align 8 ; [#uses=1]
- %scevgep50.phi.trans.insert = getelementptr [3 x %struct.btQuadWord]* %dl, i32 0, i32 %101, i32 0, i32 1 ; [#uses=1]
- %.pre52 = load float* %scevgep50.phi.trans.insert, align 4 ; [#uses=1]
- %scevgep51.phi.trans.insert = getelementptr [3 x %struct.btQuadWord]* %dl, i32 0, i32 %101, i32 0, i32 2 ; [#uses=1]
- %.pre53 = load float* %scevgep51.phi.trans.insert, align 8 ; [#uses=1]
- %scevgep.phi.trans.insert = getelementptr [3 x %struct.btQuadWord*]* %vt, i32 0, i32 %101 ; [#uses=1]
- %.pre54 = load %struct.btQuadWord** %scevgep.phi.trans.insert, align 4 ; [#uses=4]
- %.phi.trans.insert = getelementptr inbounds %struct.btQuadWord* %.pre54, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre55 = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- %.phi.trans.insert56 = getelementptr inbounds %struct.btQuadWord* %.pre54, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre57 = load float* %.phi.trans.insert56, align 4 ; [#uses=1]
- %.phi.trans.insert58 = getelementptr inbounds %struct.btQuadWord* %.pre54, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre59 = load float* %.phi.trans.insert58, align 4 ; [#uses=1]
- br label %bb1
-
-bb14: ; preds = %bb12
- %102 = fcmp olt float %mindist.0, 0.000000e+00 ; [#uses=1]
- br i1 %102, label %bb15, label %bb18
-
-bb15: ; preds = %bb14
- %103 = load float* %13, align 4 ; [#uses=1]
- %104 = fmul float %103, %50 ; [#uses=1]
- %105 = load float* %8, align 4 ; [#uses=1]
- %106 = fmul float %105, %47 ; [#uses=1]
- %107 = fadd float %104, %106 ; [#uses=1]
- %108 = load float* %3, align 4 ; [#uses=1]
- %109 = fmul float %108, %44 ; [#uses=1]
- %110 = fadd float %107, %109 ; [#uses=1]
- %111 = call float @sqrtf(float %55) nounwind readonly ; [#uses=2]
- %112 = fdiv float %110, %55 ; [#uses=3]
- %113 = fmul float %44, %112 ; [#uses=4]
- %114 = fmul float %47, %112 ; [#uses=4]
- %115 = fmul float %50, %112 ; [#uses=4]
- %116 = fmul float %115, %115 ; [#uses=1]
- %117 = fmul float %114, %114 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=1]
- %119 = fmul float %113, %113 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- store i32 7, i32* %m, align 4
- %121 = load float* %5, align 4 ; [#uses=1]
- %122 = fsub float %121, %113 ; [#uses=2]
- %123 = load float* %10, align 4 ; [#uses=1]
- %124 = fsub float %123, %114 ; [#uses=2]
- %125 = load float* %15, align 4 ; [#uses=1]
- %126 = fsub float %125, %115 ; [#uses=2]
- %127 = fmul float %30, %124 ; [#uses=1]
- %128 = fmul float %27, %126 ; [#uses=1]
- %129 = fsub float %127, %128 ; [#uses=2]
- %130 = fmul float %24, %126 ; [#uses=1]
- %131 = fmul float %30, %122 ; [#uses=1]
- %132 = fsub float %130, %131 ; [#uses=2]
- %133 = fmul float %27, %122 ; [#uses=1]
- %134 = fmul float %24, %124 ; [#uses=1]
- %135 = fsub float %133, %134 ; [#uses=2]
- %136 = fmul float %135, %135 ; [#uses=1]
- %137 = fmul float %132, %132 ; [#uses=1]
- %138 = fadd float %136, %137 ; [#uses=1]
- %139 = fmul float %129, %129 ; [#uses=1]
- %140 = fadd float %138, %139 ; [#uses=1]
- %141 = call float @sqrtf(float %140) nounwind readonly ; [#uses=1]
- %142 = fdiv float %141, %111 ; [#uses=2]
- store float %142, float* %w, align 4
- %143 = load float* %22, align 4 ; [#uses=1]
- %144 = fsub float %143, %113 ; [#uses=2]
- %145 = load float* %25, align 4 ; [#uses=1]
- %146 = fsub float %145, %114 ; [#uses=2]
- %147 = load float* %28, align 4 ; [#uses=1]
- %148 = fsub float %147, %115 ; [#uses=2]
- %149 = fmul float %37, %146 ; [#uses=1]
- %150 = fmul float %36, %148 ; [#uses=1]
- %151 = fsub float %149, %150 ; [#uses=2]
- %152 = fmul float %35, %148 ; [#uses=1]
- %153 = fmul float %37, %144 ; [#uses=1]
- %154 = fsub float %152, %153 ; [#uses=2]
- %155 = fmul float %36, %144 ; [#uses=1]
- %156 = fmul float %35, %146 ; [#uses=1]
- %157 = fsub float %155, %156 ; [#uses=2]
- %158 = fmul float %157, %157 ; [#uses=1]
- %159 = fmul float %154, %154 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=1]
- %161 = fmul float %151, %151 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = call float @sqrtf(float %162) nounwind readonly ; [#uses=1]
- %164 = fdiv float %163, %111 ; [#uses=2]
- %165 = getelementptr inbounds float* %w, i32 1 ; [#uses=1]
- store float %164, float* %165, align 4
- %166 = fadd float %142, %164 ; [#uses=1]
- %167 = fsub float 1.000000e+00, %166 ; [#uses=1]
- %168 = getelementptr inbounds float* %w, i32 2 ; [#uses=1]
- store float %167, float* %168, align 4
- ret float %120
-
-bb18: ; preds = %bb14, %entry
- %.0 = phi float [ %mindist.0, %bb14 ], [ -1.000000e+00, %entry ] ; [#uses=1]
- ret float %.0
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_S3_PfRj(%struct.btQuadWord* %a, %struct.btQuadWord* %b, %struct.btQuadWord* %c, %struct.btQuadWord* %d, float* nocapture %w, i32* nocapture %m) nounwind {
-entry:
- %vt = alloca [4 x %struct.btQuadWord*], align 4 ; [#uses=6]
- %dl = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=18]
- %subw = alloca [3 x float], align 4 ; [#uses=3]
- %subm = alloca i32, align 4 ; [#uses=3]
- %0 = getelementptr inbounds [4 x %struct.btQuadWord*]* %vt, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds [4 x %struct.btQuadWord*]* %vt, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds [4 x %struct.btQuadWord*]* %vt, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds [4 x %struct.btQuadWord*]* %vt, i32 0, i32 3 ; [#uses=1]
- store %struct.btQuadWord* %a, %struct.btQuadWord** %0, align 4
- store %struct.btQuadWord* %b, %struct.btQuadWord** %1, align 4
- store %struct.btQuadWord* %c, %struct.btQuadWord** %2, align 4
- store %struct.btQuadWord* %d, %struct.btQuadWord** %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=3]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 2 ; [#uses=5]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = fsub float %5, %7 ; [#uses=4]
- %9 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=3]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 1 ; [#uses=5]
- %12 = load float* %11, align 4 ; [#uses=3]
- %13 = fsub float %10, %12 ; [#uses=4]
- %14 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=3]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 0 ; [#uses=5]
- %17 = load float* %16, align 4 ; [#uses=3]
- %18 = fsub float %15, %17 ; [#uses=4]
- %19 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %19, align 8
- %20 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %13, float* %20, align 4
- %21 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %8, float* %21, align 8
- %22 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=3]
- %24 = load float* %23, align 4 ; [#uses=3]
- %25 = fsub float %24, %7 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=3]
- %27 = load float* %26, align 4 ; [#uses=3]
- %28 = fsub float %27, %12 ; [#uses=3]
- %29 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=3]
- %30 = load float* %29, align 4 ; [#uses=3]
- %31 = fsub float %30, %17 ; [#uses=3]
- %32 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %31, float* %32, align 8
- %33 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %28, float* %33, align 4
- %34 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %25, float* %34, align 8
- %35 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 2 ; [#uses=3]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = fsub float %37, %7 ; [#uses=3]
- %39 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 1 ; [#uses=3]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = fsub float %40, %12 ; [#uses=3]
- %42 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 0 ; [#uses=3]
- %43 = load float* %42, align 4 ; [#uses=2]
- %44 = fsub float %43, %17 ; [#uses=3]
- %45 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %44, float* %45, align 8
- %46 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %41, float* %46, align 4
- %47 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %38, float* %47, align 8
- %48 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %48, align 4
- %49 = fmul float %13, %25 ; [#uses=1]
- %50 = fmul float %49, %44 ; [#uses=1]
- %51 = fmul float %8, %31 ; [#uses=1]
- %52 = fmul float %51, %41 ; [#uses=1]
- %53 = fadd float %50, %52 ; [#uses=1]
- %54 = fmul float %18, %25 ; [#uses=1]
- %55 = fmul float %54, %41 ; [#uses=1]
- %56 = fsub float %53, %55 ; [#uses=1]
- %57 = fmul float %13, %31 ; [#uses=1]
- %58 = fmul float %57, %38 ; [#uses=1]
- %59 = fsub float %56, %58 ; [#uses=1]
- %60 = fmul float %18, %28 ; [#uses=1]
- %61 = fmul float %60, %38 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=1]
- %63 = fmul float %8, %28 ; [#uses=1]
- %64 = fmul float %63, %44 ; [#uses=1]
- %65 = fsub float %62, %64 ; [#uses=6]
- %66 = fsub float %5, %24 ; [#uses=2]
- %67 = fsub float %10, %27 ; [#uses=2]
- %68 = fsub float %15, %30 ; [#uses=2]
- %69 = fsub float %24, %37 ; [#uses=2]
- %70 = fsub float %27, %40 ; [#uses=2]
- %71 = fsub float %30, %43 ; [#uses=2]
- %72 = fmul float %71, %67 ; [#uses=1]
- %73 = fmul float %70, %68 ; [#uses=1]
- %74 = fsub float %72, %73 ; [#uses=1]
- %75 = fmul float %69, %68 ; [#uses=1]
- %76 = fmul float %71, %66 ; [#uses=1]
- %77 = fsub float %75, %76 ; [#uses=1]
- %78 = fmul float %70, %66 ; [#uses=1]
- %79 = fmul float %69, %67 ; [#uses=1]
- %80 = fsub float %78, %79 ; [#uses=1]
- %81 = fmul float %15, %80 ; [#uses=1]
- %82 = fmul float %10, %77 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = fmul float %5, %74 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %85, %65 ; [#uses=1]
- %toBoolnot = fcmp ugt float %86, 0.000000e+00 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb
-
-bb: ; preds = %entry
- %87 = call float @fabsf(float %65) nounwind readnone ; [#uses=1]
- %88 = fcmp ule float %87, 0.000000e+00 ; [#uses=1]
- br i1 %88, label %bb5, label %bb.nph
-
-bb5: ; preds = %bb, %entry
- ret float -1.000000e+00
-
-bb.nph: ; preds = %bb
- %89 = getelementptr inbounds [3 x float]* %subw, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %89, align 4
- %90 = getelementptr inbounds [3 x float]* %subw, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %90, align 4
- %91 = getelementptr inbounds [3 x float]* %subw, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %91, align 4
- store i32 0, i32* %subm, align 4
- %92 = getelementptr inbounds float* %w, i32 3 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb23.bb9_crit_edge, %bb.nph
- %93 = phi float [ %8, %bb.nph ], [ %.pre60, %bb23.bb9_crit_edge ] ; [#uses=2]
- %94 = phi float [ %13, %bb.nph ], [ %.pre59, %bb23.bb9_crit_edge ] ; [#uses=2]
- %95 = phi float [ %18, %bb.nph ], [ %.pre, %bb23.bb9_crit_edge ] ; [#uses=2]
- %96 = phi i32 [ 0, %bb.nph ], [ %146, %bb23.bb9_crit_edge ] ; [#uses=5]
- %mindist.151 = phi float [ -1.000000e+00, %bb.nph ], [ %mindist.0, %bb23.bb9_crit_edge ] ; [#uses=4]
- %scevgep = getelementptr [3 x i32]* @_ZZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_S3_PfRjE4imd3, i32 0, i32 %96 ; [#uses=1]
- %scevgep54 = getelementptr float* %w, i32 %96 ; [#uses=1]
- %97 = load i32* %scevgep, align 4 ; [#uses=7]
- %98 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 %97, i32 0, i32 1 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=2]
- %100 = fmul float %95, %99 ; [#uses=1]
- %101 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 %97, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 8 ; [#uses=2]
- %103 = fmul float %94, %102 ; [#uses=1]
- %104 = fsub float %100, %103 ; [#uses=1]
- %105 = fmul float %93, %102 ; [#uses=1]
- %106 = getelementptr inbounds [3 x %struct.btQuadWord]* %dl, i32 0, i32 %97, i32 0, i32 2 ; [#uses=1]
- %107 = load float* %106, align 8 ; [#uses=2]
- %108 = fmul float %95, %107 ; [#uses=1]
- %109 = fsub float %105, %108 ; [#uses=1]
- %110 = fmul float %94, %107 ; [#uses=1]
- %111 = fmul float %93, %99 ; [#uses=1]
- %112 = fsub float %110, %111 ; [#uses=1]
- %113 = load float* %16, align 4 ; [#uses=1]
- %114 = fmul float %113, %112 ; [#uses=1]
- %115 = load float* %11, align 4 ; [#uses=1]
- %116 = fmul float %115, %109 ; [#uses=1]
- %117 = fadd float %114, %116 ; [#uses=1]
- %118 = load float* %6, align 4 ; [#uses=1]
- %119 = fmul float %118, %104 ; [#uses=1]
- %120 = fadd float %117, %119 ; [#uses=1]
- %121 = fmul float %120, %65 ; [#uses=1]
- %122 = fcmp ogt float %121, 0.000000e+00 ; [#uses=1]
- br i1 %122, label %bb10, label %bb23
-
-bb10: ; preds = %bb9
- %scevgep53 = getelementptr [4 x %struct.btQuadWord*]* %vt, i32 0, i32 %96 ; [#uses=1]
- %123 = getelementptr inbounds [4 x %struct.btQuadWord*]* %vt, i32 0, i32 %97 ; [#uses=1]
- %124 = load %struct.btQuadWord** %123, align 4 ; [#uses=1]
- %125 = load %struct.btQuadWord** %scevgep53, align 4 ; [#uses=1]
- %126 = call float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_PfRj(%struct.btQuadWord* %125, %struct.btQuadWord* %124, %struct.btQuadWord* %d, float* %89, i32* %subm) nounwind ; [#uses=2]
- %127 = fcmp olt float %mindist.151, 0.000000e+00 ; [#uses=1]
- %128 = fcmp olt float %126, %mindist.151 ; [#uses=1]
- %or.cond = or i1 %127, %128 ; [#uses=1]
- br i1 %or.cond, label %bb12, label %bb23
-
-bb12: ; preds = %bb10
- %129 = load i32* %subm, align 4 ; [#uses=3]
- %130 = and i32 %129, 1 ; [#uses=1]
- %toBool13 = icmp eq i32 %130, 0 ; [#uses=1]
- %131 = shl i32 1, %96 ; [#uses=1]
- %iftmp.192.0 = select i1 %toBool13, i32 0, i32 %131 ; [#uses=1]
- %132 = and i32 %129, 2 ; [#uses=1]
- %133 = icmp eq i32 %132, 0 ; [#uses=1]
- %134 = shl i32 1, %97 ; [#uses=1]
- %iftmp.195.0 = select i1 %133, i32 0, i32 %134 ; [#uses=1]
- %135 = and i32 %129, 4 ; [#uses=1]
- %136 = icmp eq i32 %135, 0 ; [#uses=1]
- %iftmp.198.0 = select i1 %136, i32 0, i32 8 ; [#uses=1]
- %137 = add nsw i32 %iftmp.192.0, %iftmp.195.0 ; [#uses=1]
- %138 = add nsw i32 %137, %iftmp.198.0 ; [#uses=1]
- store i32 %138, i32* %m, align 4
- %139 = load float* %89, align 4 ; [#uses=1]
- store float %139, float* %scevgep54, align 4
- %140 = load float* %90, align 4 ; [#uses=1]
- %141 = getelementptr inbounds float* %w, i32 %97 ; [#uses=1]
- store float %140, float* %141, align 4
- %142 = getelementptr inbounds [3 x i32]* @_ZZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_S3_PfRjE4imd3, i32 0, i32 %97 ; [#uses=1]
- %143 = load i32* %142, align 4 ; [#uses=1]
- %144 = getelementptr inbounds float* %w, i32 %143 ; [#uses=1]
- store float 0.000000e+00, float* %144, align 4
- %145 = load float* %91, align 4 ; [#uses=1]
- store float %145, float* %92, align 4
- br label %bb23
-
-bb23: ; preds = %bb12, %bb10, %bb9
- %mindist.0 = phi float [ %126, %bb12 ], [ %mindist.151, %bb9 ], [ %mindist.151, %bb10 ] ; [#uses=3]
- %146 = add i32 %96, 1 ; [#uses=5]
- %exitcond = icmp eq i32 %146, 3 ; [#uses=1]
- br i1 %exitcond, label %bb25, label %bb23.bb9_crit_edge
-
-bb23.bb9_crit_edge: ; preds = %bb23
- %scevgep5556.phi.trans.insert = getelementptr [3 x %struct.btQuadWord]* %dl, i32 0, i32 %146, i32 0, i32 0 ; [#uses=1]
- %.pre = load float* %scevgep5556.phi.trans.insert, align 8 ; [#uses=1]
- %scevgep57.phi.trans.insert = getelementptr [3 x %struct.btQuadWord]* %dl, i32 0, i32 %146, i32 0, i32 1 ; [#uses=1]
- %.pre59 = load float* %scevgep57.phi.trans.insert, align 4 ; [#uses=1]
- %scevgep58.phi.trans.insert = getelementptr [3 x %struct.btQuadWord]* %dl, i32 0, i32 %146, i32 0, i32 2 ; [#uses=1]
- %.pre60 = load float* %scevgep58.phi.trans.insert, align 8 ; [#uses=1]
- br label %bb9
-
-bb25: ; preds = %bb23
- %147 = fcmp olt float %mindist.0, 0.000000e+00 ; [#uses=1]
- br i1 %147, label %bb26, label %bb29
-
-bb26: ; preds = %bb25
- store i32 15, i32* %m, align 4
- %148 = load float* %39, align 4 ; [#uses=2]
- %149 = load float* %23, align 4 ; [#uses=2]
- %150 = fmul float %148, %149 ; [#uses=1]
- %151 = load float* %16, align 4 ; [#uses=2]
- %152 = fmul float %150, %151 ; [#uses=1]
- %153 = load float* %36, align 4 ; [#uses=2]
- %154 = load float* %29, align 4 ; [#uses=2]
- %155 = fmul float %153, %154 ; [#uses=1]
- %156 = load float* %11, align 4 ; [#uses=2]
- %157 = fmul float %155, %156 ; [#uses=1]
- %158 = fadd float %152, %157 ; [#uses=1]
- %159 = load float* %42, align 4 ; [#uses=2]
- %160 = fmul float %159, %149 ; [#uses=1]
- %161 = fmul float %160, %156 ; [#uses=1]
- %162 = fsub float %158, %161 ; [#uses=1]
- %163 = fmul float %148, %154 ; [#uses=1]
- %164 = load float* %6, align 4 ; [#uses=2]
- %165 = fmul float %163, %164 ; [#uses=1]
- %166 = fsub float %162, %165 ; [#uses=1]
- %167 = load float* %26, align 4 ; [#uses=2]
- %168 = fmul float %159, %167 ; [#uses=1]
- %169 = fmul float %168, %164 ; [#uses=1]
- %170 = fadd float %166, %169 ; [#uses=1]
- %171 = fmul float %153, %167 ; [#uses=1]
- %172 = fmul float %171, %151 ; [#uses=1]
- %173 = fsub float %170, %172 ; [#uses=1]
- %174 = fdiv float %173, %65 ; [#uses=2]
- store float %174, float* %w, align 4
- %175 = load float* %9, align 4 ; [#uses=2]
- %176 = load float* %36, align 4 ; [#uses=2]
- %177 = fmul float %175, %176 ; [#uses=1]
- %178 = load float* %16, align 4 ; [#uses=2]
- %179 = fmul float %177, %178 ; [#uses=1]
- %180 = load float* %4, align 4 ; [#uses=2]
- %181 = load float* %42, align 4 ; [#uses=2]
- %182 = fmul float %180, %181 ; [#uses=1]
- %183 = load float* %11, align 4 ; [#uses=2]
- %184 = fmul float %182, %183 ; [#uses=1]
- %185 = fadd float %179, %184 ; [#uses=1]
- %186 = load float* %14, align 4 ; [#uses=2]
- %187 = fmul float %186, %176 ; [#uses=1]
- %188 = fmul float %187, %183 ; [#uses=1]
- %189 = fsub float %185, %188 ; [#uses=1]
- %190 = fmul float %175, %181 ; [#uses=1]
- %191 = load float* %6, align 4 ; [#uses=2]
- %192 = fmul float %190, %191 ; [#uses=1]
- %193 = fsub float %189, %192 ; [#uses=1]
- %194 = load float* %39, align 4 ; [#uses=2]
- %195 = fmul float %186, %194 ; [#uses=1]
- %196 = fmul float %195, %191 ; [#uses=1]
- %197 = fadd float %193, %196 ; [#uses=1]
- %198 = fmul float %180, %194 ; [#uses=1]
- %199 = fmul float %198, %178 ; [#uses=1]
- %200 = fsub float %197, %199 ; [#uses=1]
- %201 = fdiv float %200, %65 ; [#uses=2]
- %202 = getelementptr inbounds float* %w, i32 1 ; [#uses=1]
- store float %201, float* %202, align 4
- %203 = load float* %26, align 4 ; [#uses=2]
- %204 = load float* %4, align 4 ; [#uses=2]
- %205 = fmul float %203, %204 ; [#uses=1]
- %206 = load float* %16, align 4 ; [#uses=2]
- %207 = fmul float %205, %206 ; [#uses=1]
- %208 = load float* %23, align 4 ; [#uses=2]
- %209 = load float* %14, align 4 ; [#uses=2]
- %210 = fmul float %208, %209 ; [#uses=1]
- %211 = load float* %11, align 4 ; [#uses=2]
- %212 = fmul float %210, %211 ; [#uses=1]
- %213 = fadd float %207, %212 ; [#uses=1]
- %214 = load float* %29, align 4 ; [#uses=2]
- %215 = fmul float %214, %204 ; [#uses=1]
- %216 = fmul float %215, %211 ; [#uses=1]
- %217 = fsub float %213, %216 ; [#uses=1]
- %218 = fmul float %203, %209 ; [#uses=1]
- %219 = load float* %6, align 4 ; [#uses=2]
- %220 = fmul float %218, %219 ; [#uses=1]
- %221 = fsub float %217, %220 ; [#uses=1]
- %222 = load float* %9, align 4 ; [#uses=2]
- %223 = fmul float %214, %222 ; [#uses=1]
- %224 = fmul float %223, %219 ; [#uses=1]
- %225 = fadd float %221, %224 ; [#uses=1]
- %226 = fmul float %208, %222 ; [#uses=1]
- %227 = fmul float %226, %206 ; [#uses=1]
- %228 = fsub float %225, %227 ; [#uses=1]
- %229 = fdiv float %228, %65 ; [#uses=2]
- %230 = getelementptr inbounds float* %w, i32 2 ; [#uses=1]
- store float %229, float* %230, align 4
- %231 = fadd float %174, %201 ; [#uses=1]
- %232 = fadd float %231, %229 ; [#uses=1]
- %233 = fsub float 1.000000e+00, %232 ; [#uses=1]
- %234 = getelementptr inbounds float* %w, i32 3 ; [#uses=1]
- store float %233, float* %234, align 4
- ret float 0.000000e+00
-
-bb29: ; preds = %bb25
- ret float %mindist.0
-}
-
-; [#uses=3]
-define linkonce_odr i32 @_ZN12gjkepa2_impl3GJK8EvaluateERKNS_13MinkowskiDiffERK9btVector3(%"struct.gjkepa2_impl::GJK"* %this, %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, %struct.btQuadWord* nocapture %guess) align 2 {
-bb2:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=9]
- %alpha = alloca float, align 4 ; [#uses=7]
- %lastw = alloca [4 x %struct.btQuadWord], align 8 ; [#uses=23]
- %weights = alloca [4 x float], align 4 ; [#uses=2]
- %mask = alloca i32, align 4 ; [#uses=5]
- store float 0.000000e+00, float* %alpha, align 4
- %2 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 0 ; [#uses=1]
- store %struct.GIM_AABB* %2, %struct.GIM_AABB** %3, align 4
- %4 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store %struct.GIM_AABB* %4, %struct.GIM_AABB** %5, align 4
- %6 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store %struct.GIM_AABB* %6, %struct.GIM_AABB** %7, align 4
- %8 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- store %struct.GIM_AABB* %8, %struct.GIM_AABB** %9, align 4
- %10 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 6 ; [#uses=12]
- store i32 4, i32* %10, align 4
- %11 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 7 ; [#uses=7]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 9 ; [#uses=6]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load %struct.btConvexShape** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = load %struct.btConvexShape** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store %struct.btConvexShape* %14, %struct.btConvexShape** %17, align 4
- %18 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store %struct.btConvexShape* %16, %struct.btConvexShape** %18, align 4
- %19 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %44 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %53 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %56 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 4
- %58 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %59 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %62 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 4
- %64 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %65 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %68 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %71 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %74 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 4
- %76 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %77 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %80 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 4
- %82 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %83 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %86 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 4
- %88 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %89 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %92 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %95 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %98 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- %100 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %101 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- store float %102, float* %100, align 4
- %103 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 3, i32 0 ; [#uses=1]
- %104 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %103, align 4 ; [#uses=1]
- %105 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shapearg, i32 0, i32 3, i32 1 ; [#uses=1]
- %106 = load i32* %105, align 4 ; [#uses=1]
- %107 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 3, i32 0 ; [#uses=1]
- store void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %104, void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %107, align 4
- %108 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 %106, i32* %108, align 4
- %109 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %109, align 4
- %110 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %110, align 4
- %111 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=8]
- %112 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 0 ; [#uses=1]
- %113 = load float* %112, align 4 ; [#uses=4]
- store float %113, float* %111, align 4
- %114 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=8]
- %115 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 1 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=4]
- store float %116, float* %114, align 4
- %117 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=8]
- %118 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 2 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=4]
- store float %119, float* %117, align 4
- %120 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- %121 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 3 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- store float %122, float* %120, align 4
- %123 = fmul float %113, %113 ; [#uses=1]
- %124 = fmul float %116, %116 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %119, %119 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=2]
- %128 = fcmp ogt float %127, 0.000000e+00 ; [#uses=1]
- br i1 %128, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- %129 = fsub float -0.000000e+00, %119 ; [#uses=1]
- %130 = fsub float -0.000000e+00, %116 ; [#uses=1]
- %131 = fsub float -0.000000e+00, %113 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %131, float* %132, align 8
- %133 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %130, float* %133, align 4
- %134 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %129, float* %134, align 8
- %135 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %135, align 4
- br label %bb5
-
-bb4: ; preds = %bb2
- %136 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %136, align 8
- %137 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %137, align 4
- %138 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %138, align 8
- %139 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %139, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %140 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 0, i32 1, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %140, align 4
- store i32 3, i32* %10, align 4
- %141 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- %142 = load %struct.GIM_AABB** %141, align 4 ; [#uses=2]
- %143 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=2]
- store %struct.GIM_AABB* %142, %struct.GIM_AABB** %143, align 4
- store i32 1, i32* %110, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %1, %struct.GIM_AABB* %142)
- store float 1.000000e+00, float* %140, align 4
- %144 = load %struct.GIM_AABB** %143, align 4 ; [#uses=4]
- %145 = getelementptr inbounds %struct.GIM_AABB* %144, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %146 = load float* %145, align 4 ; [#uses=6]
- store float %146, float* %111, align 4
- %147 = getelementptr inbounds %struct.GIM_AABB* %144, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=6]
- store float %148, float* %114, align 4
- %149 = getelementptr inbounds %struct.GIM_AABB* %144, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %150 = load float* %149, align 4 ; [#uses=6]
- store float %150, float* %117, align 4
- %151 = getelementptr inbounds %struct.GIM_AABB* %144, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=5]
- store float %152, float* %120, align 4
- %153 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %146, float* %153, align 8
- %154 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %148, float* %154, align 4
- %155 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %150, float* %155, align 8
- %156 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float %152, float* %156, align 4
- %157 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %146, float* %157, align 8
- %158 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %148, float* %158, align 4
- %159 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %150, float* %159, align 8
- %160 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %152, float* %160, align 4
- %161 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %146, float* %161, align 8
- %162 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %148, float* %162, align 4
- %163 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %150, float* %163, align 8
- %164 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %152, float* %164, align 4
- %165 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %146, float* %165, align 8
- %166 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %148, float* %166, align 4
- %167 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %150, float* %167, align 8
- %168 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %152, float* %168, align 4
- %169 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %173 = getelementptr inbounds [4 x float]* %weights, i32 0, i32 0 ; [#uses=3]
- br label %bb6
-
-bb6: ; preds = %bb36.bb6_crit_edge, %bb5
- %174 = phi float [ %150, %bb5 ], [ %.pre82, %bb36.bb6_crit_edge ] ; [#uses=3]
- %175 = phi float [ %148, %bb5 ], [ %.pre81, %bb36.bb6_crit_edge ] ; [#uses=3]
- %176 = phi float [ %146, %bb5 ], [ %.pre, %bb36.bb6_crit_edge ] ; [#uses=3]
- %177 = phi float [ 0.000000e+00, %bb5 ], [ %259, %bb36.bb6_crit_edge ] ; [#uses=4]
- %iterations.0 = phi i32 [ 1, %bb5 ], [ %phitmp, %bb36.bb6_crit_edge ] ; [#uses=2]
- %sqdist.1 = phi float [ %127, %bb5 ], [ %sqdist.0, %bb36.bb6_crit_edge ] ; [#uses=1]
- %clastw.0 = phi i32 [ 1, %bb5 ], [ %phitmp85, %bb36.bb6_crit_edge ] ; [#uses=5]
- %178 = load i32* %11, align 4 ; [#uses=16]
- %179 = sub i32 1, %178 ; [#uses=4]
- %180 = fmul float %176, %176 ; [#uses=1]
- %181 = fmul float %175, %175 ; [#uses=1]
- %182 = fadd float %180, %181 ; [#uses=1]
- %183 = fmul float %174, %174 ; [#uses=1]
- %184 = fadd float %182, %183 ; [#uses=1]
- %185 = call float @sqrtf(float %184) nounwind readonly ; [#uses=4]
- %186 = fcmp olt float %185, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %186, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- store float %177, float* %alpha, align 4
- store i32 1, i32* %12, align 4
- br label %bb37
-
-bb8: ; preds = %bb6
- %187 = fsub float -0.000000e+00, %174 ; [#uses=1]
- %188 = fsub float -0.000000e+00, %175 ; [#uses=1]
- %189 = fsub float -0.000000e+00, %176 ; [#uses=1]
- store float %189, float* %169, align 8
- store float %188, float* %170, align 4
- store float %187, float* %171, align 8
- store float 0.000000e+00, float* %172, align 4
- %190 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 2 ; [#uses=6]
- %191 = load i32* %190, align 4 ; [#uses=1]
- %192 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 1, i32 %191 ; [#uses=1]
- store float 0.000000e+00, float* %192, align 4
- %193 = load i32* %190, align 4 ; [#uses=1]
- %194 = load i32* %10, align 4 ; [#uses=1]
- %195 = add i32 %194, -1 ; [#uses=2]
- store i32 %195, i32* %10, align 4
- %196 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %195 ; [#uses=1]
- %197 = load %struct.GIM_AABB** %196, align 4 ; [#uses=1]
- %198 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 %193 ; [#uses=1]
- store %struct.GIM_AABB* %197, %struct.GIM_AABB** %198, align 4
- %199 = load i32* %190, align 4 ; [#uses=2]
- %200 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 %199 ; [#uses=1]
- %201 = load %struct.GIM_AABB** %200, align 4 ; [#uses=1]
- %202 = add i32 %199, 1 ; [#uses=1]
- store i32 %202, i32* %190, align 4
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %this, %struct.btQuadWord* %0, %struct.GIM_AABB* %201)
- %203 = load i32* %190, align 4 ; [#uses=2]
- %204 = add i32 %203, -1 ; [#uses=1]
- %205 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 %204 ; [#uses=1]
- %206 = load %struct.GIM_AABB** %205, align 4 ; [#uses=4]
- %207 = getelementptr inbounds %struct.GIM_AABB* %206, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %208 = getelementptr inbounds %struct.GIM_AABB* %206, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %209 = getelementptr inbounds %struct.GIM_AABB* %206, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- br label %bb12
-
-bb9: ; preds = %bb12
- %scevgep68 = getelementptr [4 x %struct.btQuadWord]* %lastw, i32 0, i32 %226, i32 0, i32 2 ; [#uses=1]
- %scevgep67 = getelementptr [4 x %struct.btQuadWord]* %lastw, i32 0, i32 %226, i32 0, i32 1 ; [#uses=1]
- %scevgep66 = getelementptr [4 x %struct.btQuadWord]* %lastw, i32 0, i32 %226, i32 0, i32 0 ; [#uses=1]
- %210 = load float* %207, align 4 ; [#uses=1]
- %211 = load float* %scevgep68, align 8 ; [#uses=1]
- %212 = fsub float %210, %211 ; [#uses=2]
- %213 = load float* %208, align 4 ; [#uses=1]
- %214 = load float* %scevgep67, align 4 ; [#uses=1]
- %215 = fsub float %213, %214 ; [#uses=2]
- %216 = load float* %209, align 4 ; [#uses=1]
- %217 = load float* %scevgep66, align 8 ; [#uses=1]
- %218 = fsub float %216, %217 ; [#uses=2]
- %219 = fmul float %218, %218 ; [#uses=1]
- %220 = fmul float %215, %215 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=1]
- %222 = fmul float %212, %212 ; [#uses=1]
- %223 = fadd float %221, %222 ; [#uses=1]
- %224 = fcmp olt float %223, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %224, label %bb15, label %bb11
-
-bb11: ; preds = %bb9
- %225 = add i32 %226, 1 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb11, %bb8
- %226 = phi i32 [ 0, %bb8 ], [ %225, %bb11 ] ; [#uses=5]
- %227 = icmp ult i32 %226, 4 ; [#uses=1]
- br i1 %227, label %bb9, label %bb16
-
-bb15: ; preds = %bb9
- store float %177, float* %alpha, align 4
- %228 = load i32* %11, align 4 ; [#uses=2]
- %229 = load i32* %10, align 4 ; [#uses=2]
- %230 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %228, i32 2 ; [#uses=2]
- %231 = load i32* %230, align 4 ; [#uses=1]
- %232 = add i32 %231, -1 ; [#uses=2]
- store i32 %232, i32* %230, align 4
- %233 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %228, i32 0, i32 %232 ; [#uses=1]
- %234 = load %struct.GIM_AABB** %233, align 4 ; [#uses=1]
- %235 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %229 ; [#uses=1]
- store %struct.GIM_AABB* %234, %struct.GIM_AABB** %235, align 4
- %236 = add i32 %229, 1 ; [#uses=1]
- store i32 %236, i32* %10, align 4
- br label %bb37
-
-bb16: ; preds = %bb12
- %237 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 %clastw.0, i32 0, i32 0 ; [#uses=1]
- %238 = load float* %209, align 4 ; [#uses=1]
- store float %238, float* %237, align 8
- %239 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 %clastw.0, i32 0, i32 1 ; [#uses=1]
- %240 = load float* %208, align 4 ; [#uses=1]
- store float %240, float* %239, align 4
- %241 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 %clastw.0, i32 0, i32 2 ; [#uses=1]
- %242 = load float* %207, align 4 ; [#uses=1]
- store float %242, float* %241, align 8
- %243 = getelementptr inbounds [4 x %struct.btQuadWord]* %lastw, i32 0, i32 %clastw.0, i32 0, i32 3 ; [#uses=1]
- %244 = getelementptr inbounds %struct.GIM_AABB* %206, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %245 = load float* %244, align 4 ; [#uses=1]
- store float %245, float* %243, align 4
- %246 = load float* %111, align 4 ; [#uses=1]
- %247 = load float* %209, align 4 ; [#uses=1]
- %248 = fmul float %246, %247 ; [#uses=1]
- %249 = load float* %114, align 4 ; [#uses=1]
- %250 = load float* %208, align 4 ; [#uses=1]
- %251 = fmul float %249, %250 ; [#uses=1]
- %252 = fadd float %248, %251 ; [#uses=1]
- %253 = load float* %117, align 4 ; [#uses=1]
- %254 = load float* %207, align 4 ; [#uses=1]
- %255 = fmul float %253, %254 ; [#uses=1]
- %256 = fadd float %252, %255 ; [#uses=1]
- %257 = fdiv float %256, %185 ; [#uses=2]
- %258 = fcmp ogt float %257, %177 ; [#uses=1]
- %259 = select i1 %258, float %257, float %177 ; [#uses=6]
- %260 = fsub float %185, %259 ; [#uses=1]
- %261 = fmul float %185, 0xBF1A36E2E0000000 ; [#uses=1]
- %262 = fadd float %260, %261 ; [#uses=1]
- %263 = fcmp ugt float %262, 0.000000e+00 ; [#uses=1]
- br i1 %263, label %bb18, label %bb17
-
-bb17: ; preds = %bb16
- store float %259, float* %alpha, align 4
- %264 = load i32* %11, align 4 ; [#uses=2]
- %265 = load i32* %10, align 4 ; [#uses=2]
- %266 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %264, i32 2 ; [#uses=2]
- %267 = load i32* %266, align 4 ; [#uses=1]
- %268 = add i32 %267, -1 ; [#uses=2]
- store i32 %268, i32* %266, align 4
- %269 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %264, i32 0, i32 %268 ; [#uses=1]
- %270 = load %struct.GIM_AABB** %269, align 4 ; [#uses=1]
- %271 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %265 ; [#uses=1]
- store %struct.GIM_AABB* %270, %struct.GIM_AABB** %271, align 4
- %272 = add i32 %265, 1 ; [#uses=1]
- store i32 %272, i32* %10, align 4
- br label %bb37
-
-bb18: ; preds = %bb16
- store i32 0, i32* %mask, align 4
- switch i32 %203, label %bb22 [
- i32 2, label %bb19
- i32 3, label %bb20
- i32 4, label %bb21
- ]
-
-bb19: ; preds = %bb18
- %273 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 1 ; [#uses=1]
- %274 = load %struct.GIM_AABB** %273, align 4 ; [#uses=1]
- %275 = getelementptr inbounds %struct.GIM_AABB* %274, i32 0, i32 1 ; [#uses=1]
- %276 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 0 ; [#uses=1]
- %277 = load %struct.GIM_AABB** %276, align 4 ; [#uses=1]
- %278 = getelementptr inbounds %struct.GIM_AABB* %277, i32 0, i32 1 ; [#uses=1]
- %279 = call float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_PfRj(%struct.btQuadWord* %278, %struct.btQuadWord* %275, float* %173, i32* %mask) nounwind ; [#uses=1]
- br label %bb22
-
-bb20: ; preds = %bb18
- %280 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 2 ; [#uses=1]
- %281 = load %struct.GIM_AABB** %280, align 4 ; [#uses=1]
- %282 = getelementptr inbounds %struct.GIM_AABB* %281, i32 0, i32 1 ; [#uses=1]
- %283 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 1 ; [#uses=1]
- %284 = load %struct.GIM_AABB** %283, align 4 ; [#uses=1]
- %285 = getelementptr inbounds %struct.GIM_AABB* %284, i32 0, i32 1 ; [#uses=1]
- %286 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 0 ; [#uses=1]
- %287 = load %struct.GIM_AABB** %286, align 4 ; [#uses=1]
- %288 = getelementptr inbounds %struct.GIM_AABB* %287, i32 0, i32 1 ; [#uses=1]
- %289 = call float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_PfRj(%struct.btQuadWord* %288, %struct.btQuadWord* %285, %struct.btQuadWord* %282, float* %173, i32* %mask) nounwind ; [#uses=1]
- br label %bb22
-
-bb21: ; preds = %bb18
- %290 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 3 ; [#uses=1]
- %291 = load %struct.GIM_AABB** %290, align 4 ; [#uses=1]
- %292 = getelementptr inbounds %struct.GIM_AABB* %291, i32 0, i32 1 ; [#uses=1]
- %293 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 2 ; [#uses=1]
- %294 = load %struct.GIM_AABB** %293, align 4 ; [#uses=1]
- %295 = getelementptr inbounds %struct.GIM_AABB* %294, i32 0, i32 1 ; [#uses=1]
- %296 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 1 ; [#uses=1]
- %297 = load %struct.GIM_AABB** %296, align 4 ; [#uses=1]
- %298 = getelementptr inbounds %struct.GIM_AABB* %297, i32 0, i32 1 ; [#uses=1]
- %299 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 0 ; [#uses=1]
- %300 = load %struct.GIM_AABB** %299, align 4 ; [#uses=1]
- %301 = getelementptr inbounds %struct.GIM_AABB* %300, i32 0, i32 1 ; [#uses=1]
- %302 = call float @_ZN12gjkepa2_impl3GJK13projectoriginERK9btVector3S3_S3_S3_PfRj(%struct.btQuadWord* %301, %struct.btQuadWord* %298, %struct.btQuadWord* %295, %struct.btQuadWord* %292, float* %173, i32* %mask) nounwind ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %bb21, %bb20, %bb19, %bb18
- %sqdist.0 = phi float [ %sqdist.1, %bb18 ], [ %302, %bb21 ], [ %289, %bb20 ], [ %279, %bb19 ] ; [#uses=2]
- %303 = fcmp ult float %sqdist.0, 0.000000e+00 ; [#uses=1]
- br i1 %303, label %bb32, label %bb23
-
-bb23: ; preds = %bb22
- %304 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %179, i32 2 ; [#uses=4]
- store i32 0, i32* %304, align 4
- store float 0.000000e+00, float* %111, align 4
- store float 0.000000e+00, float* %114, align 4
- store float 0.000000e+00, float* %117, align 4
- store float 0.000000e+00, float* %120, align 4
- store i32 %179, i32* %11, align 4
- %305 = load i32* %190, align 4 ; [#uses=2]
- %306 = icmp eq i32 %305, 0 ; [#uses=1]
- %.pre83 = load i32* %mask, align 4 ; [#uses=3]
- br i1 %306, label %bb30, label %bb25
-
-bb25: ; preds = %bb28, %bb23
- %307 = phi i32 [ %338, %bb28 ], [ 0, %bb23 ] ; [#uses=4]
- %scevgep70 = getelementptr %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %178, i32 0, i32 %307 ; [#uses=3]
- %308 = shl i32 1, %307 ; [#uses=1]
- %309 = and i32 %.pre83, %308 ; [#uses=1]
- %310 = icmp eq i32 %309, 0 ; [#uses=1]
- br i1 %310, label %bb27, label %bb26
-
-bb26: ; preds = %bb25
- %scevgep69 = getelementptr [4 x float]* %weights, i32 0, i32 %307 ; [#uses=1]
- %311 = load i32* %304, align 4 ; [#uses=1]
- %312 = load %struct.GIM_AABB** %scevgep70, align 4 ; [#uses=1]
- %313 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %179, i32 0, i32 %311 ; [#uses=1]
- store %struct.GIM_AABB* %312, %struct.GIM_AABB** %313, align 4
- %314 = load i32* %304, align 4 ; [#uses=2]
- %315 = load float* %scevgep69, align 4 ; [#uses=4]
- %316 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %179, i32 1, i32 %314 ; [#uses=1]
- store float %315, float* %316, align 4
- %317 = add i32 %314, 1 ; [#uses=1]
- store i32 %317, i32* %304, align 4
- %318 = load %struct.GIM_AABB** %scevgep70, align 4 ; [#uses=3]
- %319 = getelementptr inbounds %struct.GIM_AABB* %318, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %320 = load float* %319, align 4 ; [#uses=1]
- %321 = fmul float %320, %315 ; [#uses=1]
- %322 = getelementptr inbounds %struct.GIM_AABB* %318, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %323 = load float* %322, align 4 ; [#uses=1]
- %324 = fmul float %323, %315 ; [#uses=1]
- %325 = getelementptr inbounds %struct.GIM_AABB* %318, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %326 = load float* %325, align 4 ; [#uses=1]
- %327 = fmul float %326, %315 ; [#uses=1]
- %328 = load float* %111, align 4 ; [#uses=1]
- %329 = fadd float %328, %327 ; [#uses=1]
- store float %329, float* %111, align 4
- %330 = load float* %114, align 4 ; [#uses=1]
- %331 = fadd float %330, %324 ; [#uses=1]
- store float %331, float* %114, align 4
- %332 = load float* %117, align 4 ; [#uses=1]
- %333 = fadd float %332, %321 ; [#uses=1]
- store float %333, float* %117, align 4
- br label %bb28
-
-bb27: ; preds = %bb25
- %334 = load i32* %10, align 4 ; [#uses=2]
- %335 = load %struct.GIM_AABB** %scevgep70, align 4 ; [#uses=1]
- %336 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %334 ; [#uses=1]
- store %struct.GIM_AABB* %335, %struct.GIM_AABB** %336, align 4
- %337 = add i32 %334, 1 ; [#uses=1]
- store i32 %337, i32* %10, align 4
- br label %bb28
-
-bb28: ; preds = %bb27, %bb26
- %338 = add i32 %307, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %338, %305 ; [#uses=1]
- br i1 %exitcond, label %bb30, label %bb25
-
-bb30: ; preds = %bb28, %bb23
- %339 = phi i32 [ %.pre83, %bb28 ], [ %.pre83, %bb23 ] ; [#uses=1]
- %340 = icmp eq i32 %339, 15 ; [#uses=1]
- br i1 %340, label %bb31, label %bb33
-
-bb31: ; preds = %bb30
- store i32 1, i32* %12, align 4
- br label %bb33
-
-bb32: ; preds = %bb22
- store float %259, float* %alpha, align 4
- %341 = load i32* %11, align 4 ; [#uses=2]
- %342 = load i32* %10, align 4 ; [#uses=2]
- %343 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %341, i32 2 ; [#uses=2]
- %344 = load i32* %343, align 4 ; [#uses=1]
- %345 = add i32 %344, -1 ; [#uses=2]
- store i32 %345, i32* %343, align 4
- %346 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %341, i32 0, i32 %345 ; [#uses=1]
- %347 = load %struct.GIM_AABB** %346, align 4 ; [#uses=1]
- %348 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 5, i32 %342 ; [#uses=1]
- store %struct.GIM_AABB* %347, %struct.GIM_AABB** %348, align 4
- %349 = add i32 %342, 1 ; [#uses=1]
- store i32 %349, i32* %10, align 4
- br label %bb37
-
-bb33: ; preds = %bb31, %bb30
- %350 = icmp ult i32 %iterations.0, 128 ; [#uses=1]
- br i1 %350, label %bb36, label %bb36.thread
-
-bb36.thread: ; preds = %bb33
- store float %259, float* %alpha, align 4
- store i32 2, i32* %12, align 4
- br label %bb37
-
-bb36: ; preds = %bb33
- %351 = load i32* %12, align 4 ; [#uses=1]
- %352 = icmp eq i32 %351, 0 ; [#uses=1]
- br i1 %352, label %bb36.bb6_crit_edge, label %bb37.loopexit
-
-bb36.bb6_crit_edge: ; preds = %bb36
- %.pre = load float* %111, align 4 ; [#uses=1]
- %.pre81 = load float* %114, align 4 ; [#uses=1]
- %.pre82 = load float* %117, align 4 ; [#uses=1]
- %phitmp = add i32 %iterations.0, 1 ; [#uses=1]
- %phitmp84 = add i32 %clastw.0, 1 ; [#uses=1]
- %phitmp85 = and i32 %phitmp84, 3 ; [#uses=1]
- br label %bb6
-
-bb37.loopexit: ; preds = %bb36
- store float %259, float* %alpha, align 4
- br label %bb37
-
-bb37: ; preds = %bb37.loopexit, %bb36.thread, %bb32, %bb17, %bb15, %bb7
- %353 = load i32* %11, align 4 ; [#uses=1]
- %354 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 3, i32 %353 ; [#uses=1]
- %355 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %this, i32 0, i32 8 ; [#uses=1]
- store %"struct.gjkepa2_impl::GJK::sSimplex"* %354, %"struct.gjkepa2_impl::GJK::sSimplex"** %355, align 4
- %356 = load i32* %12, align 4 ; [#uses=4]
- switch i32 %356, label %bb40 [
- i32 0, label %bb38
- i32 1, label %bb39
- ]
-
-bb38: ; preds = %bb37
- %357 = load float* %111, align 4 ; [#uses=2]
- %358 = fmul float %357, %357 ; [#uses=1]
- %359 = load float* %114, align 4 ; [#uses=2]
- %360 = fmul float %359, %359 ; [#uses=1]
- %361 = fadd float %358, %360 ; [#uses=1]
- %362 = load float* %117, align 4 ; [#uses=2]
- %363 = fmul float %362, %362 ; [#uses=1]
- %364 = fadd float %361, %363 ; [#uses=1]
- %365 = call float @sqrtf(float %364) nounwind readonly ; [#uses=1]
- store float %365, float* %109, align 4
- ret i32 %356
-
-bb39: ; preds = %bb37
- store float 0.000000e+00, float* %109, align 4
- ret i32 %356
-
-bb40: ; preds = %bb37
- ret i32 %356
-}
-
-; [#uses=5]
-define linkonce_odr %"struct.gjkepa2_impl::EPA::sFace"* @_ZN12gjkepa2_impl3EPA7newfaceEPNS_3GJK3sSVES3_S3_b(%"struct.gjkepa2_impl::EPA"* nocapture %this, %struct.GIM_AABB* %a, %struct.GIM_AABB* %b, %struct.GIM_AABB* %c, i8 zeroext %forced) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 0 ; [#uses=6]
- %1 = load %"struct.gjkepa2_impl::EPA::sFace"** %0, align 4 ; [#uses=21]
- %2 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %1, null ; [#uses=1]
- br i1 %2, label %bb18, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 5, i32 1 ; [#uses=8]
- %4 = load %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4 ; [#uses=2]
- %5 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %4, null ; [#uses=1]
- br i1 %5, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb
- %6 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 5, i32 0 ; [#uses=1]
- %7 = load %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %4, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %7, %"struct.gjkepa2_impl::EPA::sFace"** %8, align 4
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %bb
- %9 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 5, i32 0 ; [#uses=5]
- %10 = load %"struct.gjkepa2_impl::EPA::sFace"** %9, align 4 ; [#uses=2]
- %11 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %10, null ; [#uses=1]
- br i1 %11, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %12 = load %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %10, i32 0, i32 5, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %12, %"struct.gjkepa2_impl::EPA::sFace"** %13, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb1.i
- %14 = load %"struct.gjkepa2_impl::EPA::sFace"** %0, align 4 ; [#uses=1]
- %15 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %14, %1 ; [#uses=1]
- br i1 %15, label %bb4.i, label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
-
-bb4.i: ; preds = %bb3.i
- %16 = load %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %16, %"struct.gjkepa2_impl::EPA::sFace"** %0, align 4
- br label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
-
-_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit: ; preds = %bb4.i, %bb3.i
- %17 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 1 ; [#uses=4]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = add i32 %18, -1 ; [#uses=1]
- store i32 %19, i32* %17, align 4
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %9, align 4
- %20 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 7, i32 0 ; [#uses=5]
- %21 = load %"struct.gjkepa2_impl::EPA::sFace"** %20, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %21, %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4
- %22 = load %"struct.gjkepa2_impl::EPA::sFace"** %20, align 4 ; [#uses=2]
- %23 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %22, null ; [#uses=1]
- br i1 %23, label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit32, label %bb.i30
-
-bb.i30: ; preds = %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
- %24 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %22, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %1, %"struct.gjkepa2_impl::EPA::sFace"** %24, align 4
- br label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit32
-
-_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit32: ; preds = %bb.i30, %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
- store %"struct.gjkepa2_impl::EPA::sFace"* %1, %"struct.gjkepa2_impl::EPA::sFace"** %20, align 4
- %25 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 7, i32 1 ; [#uses=4]
- %26 = load i32* %25, align 4 ; [#uses=1]
- %27 = add i32 %26, 1 ; [#uses=1]
- store i32 %27, i32* %25, align 4
- %28 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 7 ; [#uses=1]
- store i8 0, i8* %28, align 1
- %29 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 3, i32 0 ; [#uses=1]
- store %struct.GIM_AABB* %a, %struct.GIM_AABB** %29, align 4
- %30 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 3, i32 1 ; [#uses=1]
- store %struct.GIM_AABB* %b, %struct.GIM_AABB** %30, align 4
- %31 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 3, i32 2 ; [#uses=1]
- store %struct.GIM_AABB* %c, %struct.GIM_AABB** %31, align 4
- %32 = getelementptr inbounds %struct.GIM_AABB* %c, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.GIM_AABB* %a, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = fsub float %33, %35 ; [#uses=2]
- %37 = getelementptr inbounds %struct.GIM_AABB* %c, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.GIM_AABB* %a, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = fsub float %38, %40 ; [#uses=2]
- %42 = getelementptr inbounds %struct.GIM_AABB* %c, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.GIM_AABB* %a, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %45 = load float* %44, align 4 ; [#uses=2]
- %46 = fsub float %43, %45 ; [#uses=2]
- %47 = getelementptr inbounds %struct.GIM_AABB* %b, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fsub float %48, %35 ; [#uses=2]
- %50 = getelementptr inbounds %struct.GIM_AABB* %b, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fsub float %51, %40 ; [#uses=2]
- %53 = getelementptr inbounds %struct.GIM_AABB* %b, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fsub float %54, %45 ; [#uses=2]
- %56 = fmul float %55, %41 ; [#uses=1]
- %57 = fmul float %52, %46 ; [#uses=1]
- %58 = fsub float %56, %57 ; [#uses=11]
- %59 = fmul float %49, %46 ; [#uses=1]
- %60 = fmul float %55, %36 ; [#uses=1]
- %61 = fsub float %59, %60 ; [#uses=11]
- %62 = fmul float %52, %36 ; [#uses=1]
- %63 = fmul float %49, %41 ; [#uses=1]
- %64 = fsub float %62, %63 ; [#uses=11]
- %65 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %64, float* %65, align 4
- %66 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %61, float* %66, align 4
- %67 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %58, float* %67, align 4
- %68 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %68, align 4
- %69 = fmul float %64, %64 ; [#uses=1]
- %70 = fmul float %61, %61 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %58, %58 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=1]
- %74 = call float @sqrtf(float %73) nounwind readonly ; [#uses=4]
- %75 = fcmp ogt float %74, 0x3F1A36E2E0000000 ; [#uses=2]
- %76 = load float* %32, align 4 ; [#uses=3]
- %77 = load float* %34, align 4 ; [#uses=3]
- %78 = fsub float %76, %77 ; [#uses=2]
- %79 = load float* %37, align 4 ; [#uses=3]
- %80 = load float* %39, align 4 ; [#uses=3]
- %81 = fsub float %79, %80 ; [#uses=2]
- %82 = load float* %42, align 4 ; [#uses=3]
- %83 = load float* %44, align 4 ; [#uses=3]
- %84 = fsub float %82, %83 ; [#uses=2]
- %85 = fmul float %64, %81 ; [#uses=1]
- %86 = fmul float %61, %84 ; [#uses=1]
- %87 = fsub float %85, %86 ; [#uses=1]
- %88 = fmul float %58, %84 ; [#uses=1]
- %89 = fmul float %64, %78 ; [#uses=1]
- %90 = fsub float %88, %89 ; [#uses=1]
- %91 = fmul float %61, %78 ; [#uses=1]
- %92 = fmul float %58, %81 ; [#uses=1]
- %93 = fsub float %91, %92 ; [#uses=1]
- %94 = fmul float %82, %93 ; [#uses=1]
- %95 = fmul float %79, %90 ; [#uses=1]
- %96 = fadd float %94, %95 ; [#uses=1]
- %97 = fmul float %76, %87 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=2]
- %99 = load float* %47, align 4 ; [#uses=3]
- %100 = fsub float %99, %76 ; [#uses=2]
- %101 = load float* %50, align 4 ; [#uses=3]
- %102 = fsub float %101, %79 ; [#uses=2]
- %103 = load float* %53, align 4 ; [#uses=3]
- %104 = fsub float %103, %82 ; [#uses=2]
- %105 = fmul float %64, %102 ; [#uses=1]
- %106 = fmul float %61, %104 ; [#uses=1]
- %107 = fsub float %105, %106 ; [#uses=1]
- %108 = fmul float %58, %104 ; [#uses=1]
- %109 = fmul float %64, %100 ; [#uses=1]
- %110 = fsub float %108, %109 ; [#uses=1]
- %111 = fmul float %61, %100 ; [#uses=1]
- %112 = fmul float %58, %102 ; [#uses=1]
- %113 = fsub float %111, %112 ; [#uses=1]
- %114 = fmul float %103, %113 ; [#uses=1]
- %115 = fmul float %101, %110 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=1]
- %117 = fmul float %99, %107 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=2]
- %119 = fsub float %77, %99 ; [#uses=2]
- %120 = fsub float %80, %101 ; [#uses=2]
- %121 = fsub float %83, %103 ; [#uses=2]
- %122 = fmul float %64, %120 ; [#uses=1]
- %123 = fmul float %61, %121 ; [#uses=1]
- %124 = fsub float %122, %123 ; [#uses=1]
- %125 = fmul float %58, %121 ; [#uses=1]
- %126 = fmul float %64, %119 ; [#uses=1]
- %127 = fsub float %125, %126 ; [#uses=1]
- %128 = fmul float %61, %119 ; [#uses=1]
- %129 = fmul float %58, %120 ; [#uses=1]
- %130 = fsub float %128, %129 ; [#uses=1]
- %131 = fmul float %83, %130 ; [#uses=1]
- %132 = fmul float %80, %127 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %77, %124 ; [#uses=1]
- %135 = fadd float %133, %134 ; [#uses=2]
- %136 = fcmp olt float %135, %118 ; [#uses=1]
- %137 = select i1 %136, float %135, float %118 ; [#uses=2]
- %138 = fcmp olt float %137, %98 ; [#uses=1]
- %139 = select i1 %138, float %137, float %98 ; [#uses=1]
- %iftmp.214.0 = select i1 %75, float %74, float 1.000000e+00 ; [#uses=1]
- %140 = fdiv float %139, %iftmp.214.0 ; [#uses=3]
- %141 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 2 ; [#uses=2]
- store float %140, float* %141, align 4
- %142 = fcmp ult float %140, 0xBF847AE140000000 ; [#uses=1]
- %iftmp.215.0 = select i1 %142, float %140, float 0.000000e+00 ; [#uses=1]
- store float %iftmp.215.0, float* %141, align 4
- br i1 %75, label %bb8, label %bb13
-
-bb8: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit32
- %143 = load float* %44, align 4 ; [#uses=1]
- %144 = fmul float %143, %64 ; [#uses=1]
- %145 = load float* %39, align 4 ; [#uses=1]
- %146 = fmul float %145, %61 ; [#uses=1]
- %147 = fadd float %144, %146 ; [#uses=1]
- %148 = load float* %34, align 4 ; [#uses=1]
- %149 = fmul float %148, %58 ; [#uses=1]
- %150 = fadd float %147, %149 ; [#uses=1]
- %151 = fdiv float %150, %74 ; [#uses=2]
- %152 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %1, i32 0, i32 1 ; [#uses=1]
- store float %151, float* %152, align 4
- %153 = fdiv float 1.000000e+00, %74 ; [#uses=3]
- %154 = fmul float %64, %153 ; [#uses=1]
- store float %154, float* %65, align 4
- %155 = fmul float %61, %153 ; [#uses=1]
- store float %155, float* %66, align 4
- %156 = fmul float %58, %153 ; [#uses=1]
- store float %156, float* %67, align 4
- %toBool9 = icmp eq i8 %forced, 0 ; [#uses=1]
- %157 = fcmp ult float %151, 0xBEE4F8B580000000 ; [#uses=1]
- %or.cond = and i1 %toBool9, %157 ; [#uses=1]
- br i1 %or.cond, label %bb12, label %bb19
-
-bb12: ; preds = %bb8
- %158 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 3, i32* %158, align 4
- br label %bb14
-
-bb13: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit32
- %159 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 2, i32* %159, align 4
- br label %bb14
-
-bb14: ; preds = %bb13, %bb12
- %160 = load %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4 ; [#uses=2]
- %161 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %160, null ; [#uses=1]
- br i1 %161, label %bb1.i24, label %bb.i23
-
-bb.i23: ; preds = %bb14
- %162 = load %"struct.gjkepa2_impl::EPA::sFace"** %9, align 4 ; [#uses=1]
- %163 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %160, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %162, %"struct.gjkepa2_impl::EPA::sFace"** %163, align 4
- br label %bb1.i24
-
-bb1.i24: ; preds = %bb.i23, %bb14
- %164 = load %"struct.gjkepa2_impl::EPA::sFace"** %9, align 4 ; [#uses=2]
- %165 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %164, null ; [#uses=1]
- br i1 %165, label %bb3.i26, label %bb2.i25
-
-bb2.i25: ; preds = %bb1.i24
- %166 = load %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4 ; [#uses=1]
- %167 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %164, i32 0, i32 5, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %166, %"struct.gjkepa2_impl::EPA::sFace"** %167, align 4
- br label %bb3.i26
-
-bb3.i26: ; preds = %bb2.i25, %bb1.i24
- %168 = load %"struct.gjkepa2_impl::EPA::sFace"** %20, align 4 ; [#uses=1]
- %169 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %168, %1 ; [#uses=1]
- br i1 %169, label %bb4.i27, label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit28
-
-bb4.i27: ; preds = %bb3.i26
- %170 = load %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %170, %"struct.gjkepa2_impl::EPA::sFace"** %20, align 4
- br label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit28
-
-_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit28: ; preds = %bb4.i27, %bb3.i26
- %171 = load i32* %25, align 4 ; [#uses=1]
- %172 = add i32 %171, -1 ; [#uses=1]
- store i32 %172, i32* %25, align 4
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %9, align 4
- %173 = load %"struct.gjkepa2_impl::EPA::sFace"** %0, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %173, %"struct.gjkepa2_impl::EPA::sFace"** %3, align 4
- %174 = load %"struct.gjkepa2_impl::EPA::sFace"** %0, align 4 ; [#uses=2]
- %175 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %174, null ; [#uses=1]
- br i1 %175, label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit, label %bb.i21
-
-bb.i21: ; preds = %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit28
- %176 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %174, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %1, %"struct.gjkepa2_impl::EPA::sFace"** %176, align 4
- br label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit
-
-_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit: ; preds = %bb.i21, %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit28
- store %"struct.gjkepa2_impl::EPA::sFace"* %1, %"struct.gjkepa2_impl::EPA::sFace"** %0, align 4
- %177 = load i32* %17, align 4 ; [#uses=1]
- %178 = add i32 %177, 1 ; [#uses=1]
- store i32 %178, i32* %17, align 4
- ret %"struct.gjkepa2_impl::EPA::sFace"* null
-
-bb18: ; preds = %entry
- %179 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 5, i32* %179, align 4
- ret %"struct.gjkepa2_impl::EPA::sFace"* null
-
-bb19: ; preds = %bb8
- ret %"struct.gjkepa2_impl::EPA::sFace"* %1
-}
-
-; [#uses=3]
-define linkonce_odr zeroext i8 @_ZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonE(%"struct.gjkepa2_impl::EPA"* %this, i32 %pass, %struct.GIM_AABB* %w, %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 %e, %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 7 ; [#uses=2]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %2 = zext i8 %1 to i32 ; [#uses=1]
- %3 = icmp eq i32 %2, %pass ; [#uses=1]
- br i1 %3, label %bb17, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds [3 x i32]* @_ZZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonEE4i1m3, i32 0, i32 %e ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.GIM_AABB* %w, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fmul float %7, %9 ; [#uses=1]
- %11 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.GIM_AABB* %w, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.GIM_AABB* %w, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = fadd float %16, %21 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fsub float %22, %24 ; [#uses=1]
- %26 = fcmp olt float %25, 0xBEE4F8B580000000 ; [#uses=1]
- br i1 %26, label %bb1, label %bb6
-
-bb1: ; preds = %bb
- %27 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 3, i32 %e ; [#uses=1]
- %28 = load %struct.GIM_AABB** %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 3, i32 %5 ; [#uses=1]
- %30 = load %struct.GIM_AABB** %29, align 4 ; [#uses=1]
- %31 = tail call %"struct.gjkepa2_impl::EPA::sFace"* @_ZN12gjkepa2_impl3EPA7newfaceEPNS_3GJK3sSVES3_S3_b(%"struct.gjkepa2_impl::EPA"* %this, %struct.GIM_AABB* %30, %struct.GIM_AABB* %28, %struct.GIM_AABB* %w, i8 zeroext 0) ; [#uses=9]
- %32 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %31, null ; [#uses=1]
- br i1 %32, label %bb17, label %bb2
-
-bb2: ; preds = %bb1
- %33 = trunc i32 %e to i8 ; [#uses=1]
- %34 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %31, i32 0, i32 6, i32 0 ; [#uses=1]
- store i8 %33, i8* %34, align 1
- %35 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %31, i32 0, i32 4, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %f, %"struct.gjkepa2_impl::EPA::sFace"** %35, align 4
- %36 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 6, i32 %e ; [#uses=1]
- store i8 0, i8* %36, align 1
- %37 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 4, i32 %e ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %31, %"struct.gjkepa2_impl::EPA::sFace"** %37, align 4
- %38 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon, i32 0, i32 0 ; [#uses=2]
- %39 = load %"struct.gjkepa2_impl::EPA::sFace"** %38, align 4 ; [#uses=4]
- %40 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %39, null ; [#uses=1]
- br i1 %40, label %bb4, label %bb3
-
-bb3: ; preds = %bb2
- %41 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %39, i32 0, i32 6, i32 1 ; [#uses=1]
- store i8 2, i8* %41, align 1
- %42 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %39, i32 0, i32 4, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %31, %"struct.gjkepa2_impl::EPA::sFace"** %42, align 4
- %43 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %31, i32 0, i32 6, i32 2 ; [#uses=1]
- store i8 1, i8* %43, align 1
- %44 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %31, i32 0, i32 4, i32 2 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %39, %"struct.gjkepa2_impl::EPA::sFace"** %44, align 4
- br label %bb5
-
-bb4: ; preds = %bb2
- %45 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon, i32 0, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %31, %"struct.gjkepa2_impl::EPA::sFace"** %45, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- store %"struct.gjkepa2_impl::EPA::sFace"* %31, %"struct.gjkepa2_impl::EPA::sFace"** %38, align 4
- %46 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon, i32 0, i32 2 ; [#uses=2]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = add i32 %47, 1 ; [#uses=1]
- store i32 %48, i32* %46, align 4
- ret i8 1
-
-bb6: ; preds = %bb
- %49 = getelementptr inbounds [3 x i32]* @_ZZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonEE4i2m3, i32 0, i32 %e ; [#uses=1]
- %50 = load i32* %49, align 4 ; [#uses=2]
- %51 = trunc i32 %pass to i8 ; [#uses=1]
- store i8 %51, i8* %0, align 1
- %52 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 6, i32 %5 ; [#uses=1]
- %53 = load i8* %52, align 1 ; [#uses=1]
- %54 = zext i8 %53 to i32 ; [#uses=1]
- %55 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 4, i32 %5 ; [#uses=1]
- %56 = load %"struct.gjkepa2_impl::EPA::sFace"** %55, align 4 ; [#uses=1]
- %57 = tail call zeroext i8 @_ZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonE(%"struct.gjkepa2_impl::EPA"* %this, i32 %pass, %struct.GIM_AABB* %w, %"struct.gjkepa2_impl::EPA::sFace"* %56, i32 %54, %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon) ; [#uses=1]
- %toBool7not = icmp eq i8 %57, 0 ; [#uses=1]
- br i1 %toBool7not, label %bb17, label %bb11
-
-bb11: ; preds = %bb6
- %58 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 6, i32 %50 ; [#uses=1]
- %59 = load i8* %58, align 1 ; [#uses=1]
- %60 = zext i8 %59 to i32 ; [#uses=1]
- %61 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 4, i32 %50 ; [#uses=1]
- %62 = load %"struct.gjkepa2_impl::EPA::sFace"** %61, align 4 ; [#uses=1]
- %63 = tail call zeroext i8 @_ZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonE(%"struct.gjkepa2_impl::EPA"* %this, i32 %pass, %struct.GIM_AABB* %w, %"struct.gjkepa2_impl::EPA::sFace"* %62, i32 %60, %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon) ; [#uses=1]
- %toBool12not = icmp eq i8 %63, 0 ; [#uses=1]
- br i1 %toBool12not, label %bb17, label %bb20
-
-bb17: ; preds = %bb11, %bb6, %bb1, %entry
- ret i8 0
-
-bb20: ; preds = %bb11
- %64 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 5, i32 1 ; [#uses=4]
- %65 = load %"struct.gjkepa2_impl::EPA::sFace"** %64, align 4 ; [#uses=2]
- %66 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %65, null ; [#uses=1]
- br i1 %66, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb20
- %67 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 5, i32 0 ; [#uses=1]
- %68 = load %"struct.gjkepa2_impl::EPA::sFace"** %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %65, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %68, %"struct.gjkepa2_impl::EPA::sFace"** %69, align 4
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %bb20
- %70 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f, i32 0, i32 5, i32 0 ; [#uses=2]
- %71 = load %"struct.gjkepa2_impl::EPA::sFace"** %70, align 4 ; [#uses=2]
- %72 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %71, null ; [#uses=1]
- br i1 %72, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %73 = load %"struct.gjkepa2_impl::EPA::sFace"** %64, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %71, i32 0, i32 5, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %73, %"struct.gjkepa2_impl::EPA::sFace"** %74, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb1.i
- %75 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 7, i32 0 ; [#uses=2]
- %76 = load %"struct.gjkepa2_impl::EPA::sFace"** %75, align 4 ; [#uses=1]
- %77 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %76, %f ; [#uses=1]
- br i1 %77, label %bb4.i, label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
-
-bb4.i: ; preds = %bb3.i
- %78 = load %"struct.gjkepa2_impl::EPA::sFace"** %64, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %78, %"struct.gjkepa2_impl::EPA::sFace"** %75, align 4
- br label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
-
-_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit: ; preds = %bb4.i, %bb3.i
- %79 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 7, i32 1 ; [#uses=2]
- %80 = load i32* %79, align 4 ; [#uses=1]
- %81 = add i32 %80, -1 ; [#uses=1]
- store i32 %81, i32* %79, align 4
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %70, align 4
- %82 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 0 ; [#uses=3]
- %83 = load %"struct.gjkepa2_impl::EPA::sFace"** %82, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %83, %"struct.gjkepa2_impl::EPA::sFace"** %64, align 4
- %84 = load %"struct.gjkepa2_impl::EPA::sFace"** %82, align 4 ; [#uses=2]
- %85 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %84, null ; [#uses=1]
- br i1 %85, label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit, label %bb.i25
-
-bb.i25: ; preds = %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
- %86 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %84, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %f, %"struct.gjkepa2_impl::EPA::sFace"** %86, align 4
- br label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit
-
-_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit: ; preds = %bb.i25, %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
- store %"struct.gjkepa2_impl::EPA::sFace"* %f, %"struct.gjkepa2_impl::EPA::sFace"** %82, align 4
- %87 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 1 ; [#uses=2]
- %88 = load i32* %87, align 4 ; [#uses=1]
- %89 = add i32 %88, 1 ; [#uses=1]
- store i32 %89, i32* %87, align 4
- ret i8 1
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZN12gjkepa2_impl3EPA8EvaluateERNS_3GJKERK9btVector3(%"struct.gjkepa2_impl::EPA"* %this, %"struct.gjkepa2_impl::GJK"* %gjk, %struct.btQuadWord* nocapture %guess) align 2 {
-entry:
- %horizon = alloca %"struct.gjkepa2_impl::EPA::sHorizon", align 8 ; [#uses=4]
- %0 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 8 ; [#uses=1]
- %1 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %0, align 4 ; [#uses=8]
- %2 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 2 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = icmp ult i32 %3, 2 ; [#uses=1]
- br i1 %4, label %bb38, label %bb
-
-bb: ; preds = %entry
- %5 = call zeroext i8 @_ZN12gjkepa2_impl3GJK13EncloseOriginEv(%"struct.gjkepa2_impl::GJK"* %gjk) ; [#uses=1]
- %toBoolnot = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb38, label %bb9.preheader
-
-bb9.preheader: ; preds = %bb
- %6 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 7, i32 0 ; [#uses=8]
- %7 = load %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4 ; [#uses=2]
- %8 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %7, null ; [#uses=1]
- br i1 %8, label %bb10, label %bb.nph231
-
-bb.nph231: ; preds = %bb9.preheader
- %9 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 7, i32 1 ; [#uses=2]
- %10 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 0 ; [#uses=3]
- %11 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 1 ; [#uses=2]
- br label %bb8
-
-bb8: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit, %bb.nph231
- %12 = phi %"struct.gjkepa2_impl::EPA::sFace"* [ %7, %bb.nph231 ], [ %35, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit ] ; [#uses=6]
- %13 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %12, i32 0, i32 5, i32 1 ; [#uses=4]
- %14 = load %"struct.gjkepa2_impl::EPA::sFace"** %13, align 4 ; [#uses=2]
- %15 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %14, null ; [#uses=1]
- br i1 %15, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb8
- %16 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %12, i32 0, i32 5, i32 0 ; [#uses=1]
- %17 = load %"struct.gjkepa2_impl::EPA::sFace"** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %14, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %17, %"struct.gjkepa2_impl::EPA::sFace"** %18, align 4
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %bb8
- %19 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %12, i32 0, i32 5, i32 0 ; [#uses=2]
- %20 = load %"struct.gjkepa2_impl::EPA::sFace"** %19, align 4 ; [#uses=2]
- %21 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %20, null ; [#uses=1]
- br i1 %21, label %bb3.i, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %22 = load %"struct.gjkepa2_impl::EPA::sFace"** %13, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %20, i32 0, i32 5, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %22, %"struct.gjkepa2_impl::EPA::sFace"** %23, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb1.i
- %24 = load %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4 ; [#uses=1]
- %25 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %24, %12 ; [#uses=1]
- br i1 %25, label %bb4.i, label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
-
-bb4.i: ; preds = %bb3.i
- %26 = load %"struct.gjkepa2_impl::EPA::sFace"** %13, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %26, %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4
- br label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
-
-_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit: ; preds = %bb4.i, %bb3.i
- %27 = load i32* %9, align 4 ; [#uses=1]
- %28 = add i32 %27, -1 ; [#uses=1]
- store i32 %28, i32* %9, align 4
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %19, align 4
- %29 = load %"struct.gjkepa2_impl::EPA::sFace"** %10, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %29, %"struct.gjkepa2_impl::EPA::sFace"** %13, align 4
- %30 = load %"struct.gjkepa2_impl::EPA::sFace"** %10, align 4 ; [#uses=2]
- %31 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %30, null ; [#uses=1]
- br i1 %31, label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit, label %bb.i45
-
-bb.i45: ; preds = %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
- %32 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %30, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %12, %"struct.gjkepa2_impl::EPA::sFace"** %32, align 4
- br label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit
-
-_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit: ; preds = %bb.i45, %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit
- store %"struct.gjkepa2_impl::EPA::sFace"* %12, %"struct.gjkepa2_impl::EPA::sFace"** %10, align 4
- %33 = load i32* %11, align 4 ; [#uses=1]
- %34 = add i32 %33, 1 ; [#uses=1]
- store i32 %34, i32* %11, align 4
- %35 = load %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4 ; [#uses=2]
- %36 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %35, null ; [#uses=1]
- br i1 %36, label %bb10, label %bb8
-
-bb10: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit, %bb9.preheader
- %37 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 0 ; [#uses=6]
- store i32 0, i32* %37, align 4
- %38 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 6 ; [#uses=3]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 0, i32 3 ; [#uses=4]
- %40 = load %struct.GIM_AABB** %39, align 4 ; [#uses=3]
- %41 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 0, i32 2 ; [#uses=3]
- %42 = load %struct.GIM_AABB** %41, align 4 ; [#uses=4]
- %43 = getelementptr inbounds %struct.GIM_AABB* %42, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.GIM_AABB* %40, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fsub float %44, %46 ; [#uses=2]
- %48 = getelementptr inbounds %struct.GIM_AABB* %42, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.GIM_AABB* %40, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = fsub float %49, %51 ; [#uses=2]
- %53 = getelementptr inbounds %struct.GIM_AABB* %42, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.GIM_AABB* %40, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=3]
- %57 = fsub float %54, %56 ; [#uses=2]
- %58 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 0, i32 1 ; [#uses=4]
- %59 = load %struct.GIM_AABB** %58, align 4 ; [#uses=6]
- %60 = getelementptr inbounds %struct.GIM_AABB* %59, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fsub float %61, %46 ; [#uses=2]
- %63 = getelementptr inbounds %struct.GIM_AABB* %59, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fsub float %64, %51 ; [#uses=2]
- %66 = getelementptr inbounds %struct.GIM_AABB* %59, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fsub float %67, %56 ; [#uses=2]
- %69 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 0, i32 0 ; [#uses=4]
- %70 = load %struct.GIM_AABB** %69, align 4 ; [#uses=6]
- %71 = getelementptr inbounds %struct.GIM_AABB* %70, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fsub float %72, %46 ; [#uses=2]
- %74 = getelementptr inbounds %struct.GIM_AABB* %70, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fsub float %75, %51 ; [#uses=2]
- %77 = getelementptr inbounds %struct.GIM_AABB* %70, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fsub float %78, %56 ; [#uses=2]
- %80 = fmul float %76, %62 ; [#uses=1]
- %81 = fmul float %80, %57 ; [#uses=1]
- %82 = fmul float %73, %68 ; [#uses=1]
- %83 = fmul float %82, %52 ; [#uses=1]
- %84 = fadd float %81, %83 ; [#uses=1]
- %85 = fmul float %79, %62 ; [#uses=1]
- %86 = fmul float %85, %52 ; [#uses=1]
- %87 = fsub float %84, %86 ; [#uses=1]
- %88 = fmul float %76, %68 ; [#uses=1]
- %89 = fmul float %88, %47 ; [#uses=1]
- %90 = fsub float %87, %89 ; [#uses=1]
- %91 = fmul float %79, %65 ; [#uses=1]
- %92 = fmul float %91, %47 ; [#uses=1]
- %93 = fadd float %90, %92 ; [#uses=1]
- %94 = fmul float %73, %65 ; [#uses=1]
- %95 = fmul float %94, %57 ; [#uses=1]
- %96 = fsub float %93, %95 ; [#uses=1]
- %97 = fcmp olt float %96, 0.000000e+00 ; [#uses=1]
- br i1 %97, label %bb12, label %bb13
-
-bb12: ; preds = %bb10
- store %struct.GIM_AABB* %59, %struct.GIM_AABB** %69, align 4
- store %struct.GIM_AABB* %70, %struct.GIM_AABB** %58, align 4
- %98 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 1, i32 1 ; [#uses=2]
- %99 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 1, i32 0 ; [#uses=2]
- %100 = load float* %99, align 4 ; [#uses=1]
- %101 = load float* %98, align 4 ; [#uses=1]
- store float %101, float* %99, align 4
- store float %100, float* %98, align 4
- br label %bb13
-
-bb13: ; preds = %bb12, %bb10
- %102 = phi %struct.GIM_AABB* [ %59, %bb12 ], [ %70, %bb10 ] ; [#uses=1]
- %103 = phi %struct.GIM_AABB* [ %70, %bb12 ], [ %59, %bb10 ] ; [#uses=1]
- %104 = call %"struct.gjkepa2_impl::EPA::sFace"* @_ZN12gjkepa2_impl3EPA7newfaceEPNS_3GJK3sSVES3_S3_b(%"struct.gjkepa2_impl::EPA"* %this, %struct.GIM_AABB* %102, %struct.GIM_AABB* %103, %struct.GIM_AABB* %42, i8 zeroext 1) ; [#uses=9]
- %105 = load %struct.GIM_AABB** %39, align 4 ; [#uses=1]
- %106 = load %struct.GIM_AABB** %69, align 4 ; [#uses=1]
- %107 = load %struct.GIM_AABB** %58, align 4 ; [#uses=1]
- %108 = call %"struct.gjkepa2_impl::EPA::sFace"* @_ZN12gjkepa2_impl3EPA7newfaceEPNS_3GJK3sSVES3_S3_b(%"struct.gjkepa2_impl::EPA"* %this, %struct.GIM_AABB* %107, %struct.GIM_AABB* %106, %struct.GIM_AABB* %105, i8 zeroext 1) ; [#uses=9]
- %109 = load %struct.GIM_AABB** %39, align 4 ; [#uses=1]
- %110 = load %struct.GIM_AABB** %58, align 4 ; [#uses=1]
- %111 = load %struct.GIM_AABB** %41, align 4 ; [#uses=1]
- %112 = call %"struct.gjkepa2_impl::EPA::sFace"* @_ZN12gjkepa2_impl3EPA7newfaceEPNS_3GJK3sSVES3_S3_b(%"struct.gjkepa2_impl::EPA"* %this, %struct.GIM_AABB* %111, %struct.GIM_AABB* %110, %struct.GIM_AABB* %109, i8 zeroext 1) ; [#uses=9]
- %113 = load %struct.GIM_AABB** %39, align 4 ; [#uses=1]
- %114 = load %struct.GIM_AABB** %41, align 4 ; [#uses=1]
- %115 = load %struct.GIM_AABB** %69, align 4 ; [#uses=1]
- %116 = call %"struct.gjkepa2_impl::EPA::sFace"* @_ZN12gjkepa2_impl3EPA7newfaceEPNS_3GJK3sSVES3_S3_b(%"struct.gjkepa2_impl::EPA"* %this, %struct.GIM_AABB* %115, %struct.GIM_AABB* %114, %struct.GIM_AABB* %113, i8 zeroext 1) ; [#uses=9]
- %117 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 7, i32 1 ; [#uses=3]
- %118 = load i32* %117, align 4 ; [#uses=1]
- %119 = icmp eq i32 %118, 4 ; [#uses=1]
- br i1 %119, label %bb14, label %bb38
-
-bb14: ; preds = %bb13
- %120 = load %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4 ; [#uses=3]
- %121 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %120, i32 0, i32 1 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=2]
- %123 = fmul float %122, %122 ; [#uses=1]
- %maxp.1.ph.in.phi.trans.insert.i58 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %120, i32 0, i32 2 ; [#uses=1]
- %maxp.1.ph.pre.i59 = load float* %maxp.1.ph.in.phi.trans.insert.i58, align 4 ; [#uses=1]
- br label %bb4.outer.i66
-
-bb.i62: ; preds = %bb4.i70
- %124 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f.0.i69, i32 0, i32 1 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=2]
- %126 = fmul float %125, %125 ; [#uses=2]
- %127 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f.0.i69, i32 0, i32 2 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=2]
- %.not.i60 = fcmp oge float %128, %maxp.1.ph.i63 ; [#uses=1]
- %129 = fcmp olt float %126, %mind.1.ph.i65 ; [#uses=1]
- %or.cond.i61 = and i1 %.not.i60, %129 ; [#uses=1]
- br i1 %or.cond.i61, label %bb4.outer.i66, label %bb4.i70
-
-bb4.outer.i66: ; preds = %bb.i62, %bb14
- %maxp.1.ph.i63 = phi float [ %maxp.1.ph.pre.i59, %bb14 ], [ %128, %bb.i62 ] ; [#uses=1]
- %minf.1.ph.i64 = phi %"struct.gjkepa2_impl::EPA::sFace"* [ %120, %bb14 ], [ %f.0.i69, %bb.i62 ] ; [#uses=11]
- %mind.1.ph.i65 = phi float [ %123, %bb14 ], [ %126, %bb.i62 ] ; [#uses=1]
- br label %bb4.i70
-
-bb4.i70: ; preds = %bb4.outer.i66, %bb.i62
- %.pn.i67 = phi %"struct.gjkepa2_impl::EPA::sFace"* [ %f.0.i69, %bb.i62 ], [ %minf.1.ph.i64, %bb4.outer.i66 ] ; [#uses=1]
- %f.0.in.i68 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %.pn.i67, i32 0, i32 5, i32 1 ; [#uses=1]
- %f.0.i69 = load %"struct.gjkepa2_impl::EPA::sFace"** %f.0.in.i68, align 4 ; [#uses=5]
- %130 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %f.0.i69, null ; [#uses=1]
- br i1 %130, label %_ZN12gjkepa2_impl3EPA8findbestEv.exit71, label %bb.i62
-
-_ZN12gjkepa2_impl3EPA8findbestEv.exit71: ; preds = %bb4.i70
- %minf.1.ph.i64146.0 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %tmp147 = load float* %minf.1.ph.i64146.0, align 4 ; [#uses=1]
- %minf.1.ph.i64146.1 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %tmp148 = load float* %minf.1.ph.i64146.1, align 4 ; [#uses=1]
- %minf.1.ph.i64146.2 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %tmp149 = load float* %minf.1.ph.i64146.2, align 4 ; [#uses=1]
- %minf.1.ph.i64146.3 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp150 = load float* %minf.1.ph.i64146.3, align 4 ; [#uses=1]
- %minf.1.ph.i64.1 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 1 ; [#uses=1]
- %tmp101 = load float* %minf.1.ph.i64.1, align 4 ; [#uses=1]
- %minf.1.ph.i64.2 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 2 ; [#uses=1]
- %tmp102 = load float* %minf.1.ph.i64.2, align 4 ; [#uses=1]
- %minf.1.ph.i64.3.0 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 3, i32 0 ; [#uses=1]
- %tmp128 = load %struct.GIM_AABB** %minf.1.ph.i64.3.0, align 4 ; [#uses=1]
- %minf.1.ph.i64.3.1 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 3, i32 1 ; [#uses=1]
- %tmp129 = load %struct.GIM_AABB** %minf.1.ph.i64.3.1, align 4 ; [#uses=1]
- %minf.1.ph.i64.3.2 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i64, i32 0, i32 3, i32 2 ; [#uses=1]
- %tmp130 = load %struct.GIM_AABB** %minf.1.ph.i64.3.2, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %104, i32 0, i32 6, i32 0 ; [#uses=1]
- store i8 0, i8* %131, align 1
- %132 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %104, i32 0, i32 4, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %108, %"struct.gjkepa2_impl::EPA::sFace"** %132, align 4
- %133 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %108, i32 0, i32 6, i32 0 ; [#uses=1]
- store i8 0, i8* %133, align 1
- %134 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %108, i32 0, i32 4, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %104, %"struct.gjkepa2_impl::EPA::sFace"** %134, align 4
- %135 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %104, i32 0, i32 6, i32 1 ; [#uses=1]
- store i8 0, i8* %135, align 1
- %136 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %104, i32 0, i32 4, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %112, %"struct.gjkepa2_impl::EPA::sFace"** %136, align 4
- %137 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %112, i32 0, i32 6, i32 0 ; [#uses=1]
- store i8 1, i8* %137, align 1
- %138 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %112, i32 0, i32 4, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %104, %"struct.gjkepa2_impl::EPA::sFace"** %138, align 4
- %139 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %104, i32 0, i32 6, i32 2 ; [#uses=1]
- store i8 0, i8* %139, align 1
- %140 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %104, i32 0, i32 4, i32 2 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %116, %"struct.gjkepa2_impl::EPA::sFace"** %140, align 4
- %141 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %116, i32 0, i32 6, i32 0 ; [#uses=1]
- store i8 2, i8* %141, align 1
- %142 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %116, i32 0, i32 4, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %104, %"struct.gjkepa2_impl::EPA::sFace"** %142, align 4
- %143 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %108, i32 0, i32 6, i32 1 ; [#uses=1]
- store i8 2, i8* %143, align 1
- %144 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %108, i32 0, i32 4, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %116, %"struct.gjkepa2_impl::EPA::sFace"** %144, align 4
- %145 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %116, i32 0, i32 6, i32 2 ; [#uses=1]
- store i8 1, i8* %145, align 1
- %146 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %116, i32 0, i32 4, i32 2 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %108, %"struct.gjkepa2_impl::EPA::sFace"** %146, align 4
- %147 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %108, i32 0, i32 6, i32 2 ; [#uses=1]
- store i8 1, i8* %147, align 1
- %148 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %108, i32 0, i32 4, i32 2 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %112, %"struct.gjkepa2_impl::EPA::sFace"** %148, align 4
- %149 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %112, i32 0, i32 6, i32 1 ; [#uses=1]
- store i8 2, i8* %149, align 1
- %150 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %112, i32 0, i32 4, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %108, %"struct.gjkepa2_impl::EPA::sFace"** %150, align 4
- %151 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %112, i32 0, i32 6, i32 2 ; [#uses=1]
- store i8 1, i8* %151, align 1
- %152 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %112, i32 0, i32 4, i32 2 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %116, %"struct.gjkepa2_impl::EPA::sFace"** %152, align 4
- %153 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %116, i32 0, i32 6, i32 1 ; [#uses=1]
- store i8 2, i8* %153, align 1
- %154 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %116, i32 0, i32 4, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %112, %"struct.gjkepa2_impl::EPA::sFace"** %154, align 4
- store i32 0, i32* %37, align 4
- %155 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon, i32 0, i32 0 ; [#uses=2]
- %156 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon, i32 0, i32 1 ; [#uses=2]
- %157 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon, i32 0, i32 2 ; [#uses=2]
- %158 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 0 ; [#uses=3]
- %159 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 8, i32 1 ; [#uses=2]
- br label %bb36
-
-bb16: ; preds = %bb36
- %160 = load i32* %38, align 4 ; [#uses=6]
- %161 = icmp ult i32 %160, 64 ; [#uses=1]
- br i1 %161, label %bb17, label %bb34
-
-bb17: ; preds = %bb16
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %155, align 8
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %156, align 4
- store i32 0, i32* %157, align 8
- %162 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 4, i32 %160 ; [#uses=2]
- %163 = add i32 %160, 1 ; [#uses=1]
- store i32 %163, i32* %38, align 4
- %164 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 7 ; [#uses=1]
- store i8 %tmp271, i8* %164, align 1
- %165 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK12gjkepa2_impl3GJK10getsupportERK9btVector3RNS0_3sSVE(%"struct.gjkepa2_impl::GJK"* %gjk, %struct.btQuadWord* %165, %struct.GIM_AABB* %162)
- %166 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %167 = load float* %166, align 4 ; [#uses=1]
- %168 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 4, i32 %160, i32 1, i32 0, i32 0 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- %170 = fmul float %167, %169 ; [#uses=1]
- %171 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %172 = load float* %171, align 4 ; [#uses=1]
- %173 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 4, i32 %160, i32 1, i32 0, i32 1 ; [#uses=1]
- %174 = load float* %173, align 4 ; [#uses=1]
- %175 = fmul float %172, %174 ; [#uses=1]
- %176 = fadd float %170, %175 ; [#uses=1]
- %177 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %178 = load float* %177, align 4 ; [#uses=1]
- %179 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 4, i32 %160, i32 1, i32 0, i32 2 ; [#uses=1]
- %180 = load float* %179, align 4 ; [#uses=1]
- %181 = fmul float %178, %180 ; [#uses=1]
- %182 = fadd float %176, %181 ; [#uses=1]
- %183 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 1 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=1]
- %185 = fsub float %182, %184 ; [#uses=1]
- %186 = fcmp ogt float %185, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %186, label %bb19, label %bb33
-
-bb19: ; preds = %bb19, %bb17
- %j.0193 = phi i32 [ %192, %bb19 ], [ 0, %bb17 ] ; [#uses=3]
- %valid.0192 = phi i8 [ %191, %bb19 ], [ 1, %bb17 ] ; [#uses=1]
- %scevgep = getelementptr %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 6, i32 %j.0193 ; [#uses=1]
- %scevgep233 = getelementptr %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 4, i32 %j.0193 ; [#uses=1]
- %187 = load i8* %scevgep, align 1 ; [#uses=1]
- %188 = zext i8 %187 to i32 ; [#uses=1]
- %189 = load %"struct.gjkepa2_impl::EPA::sFace"** %scevgep233, align 4 ; [#uses=1]
- %190 = call zeroext i8 @_ZN12gjkepa2_impl3EPA6expandEjPNS_3GJK3sSVEPNS0_5sFaceEjRNS0_8sHorizonE(%"struct.gjkepa2_impl::EPA"* %this, i32 %pass.0, %struct.GIM_AABB* %162, %"struct.gjkepa2_impl::EPA::sFace"* %189, i32 %188, %"struct.gjkepa2_impl::EPA::sHorizon"* %horizon) ; [#uses=1]
- %191 = and i8 %190, %valid.0192 ; [#uses=3]
- %192 = add i32 %j.0193, 1 ; [#uses=2]
- %193 = icmp ugt i32 %192, 2 ; [#uses=1]
- %toBool22 = icmp eq i8 %191, 0 ; [#uses=1]
- %or.cond = or i1 %193, %toBool22 ; [#uses=1]
- br i1 %or.cond, label %bb23, label %bb19
-
-bb23: ; preds = %bb19
- %phitmp232 = icmp eq i8 %191, 1 ; [#uses=1]
- br i1 %phitmp232, label %bb28, label %bb32
-
-bb28: ; preds = %bb23
- %194 = load i32* %157, align 8 ; [#uses=1]
- %195 = icmp ult i32 %194, 3 ; [#uses=1]
- br i1 %195, label %bb32, label %bb29
-
-bb29: ; preds = %bb28
- %196 = load %"struct.gjkepa2_impl::EPA::sFace"** %156, align 4 ; [#uses=3]
- %197 = load %"struct.gjkepa2_impl::EPA::sFace"** %155, align 8 ; [#uses=3]
- %198 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %197, i32 0, i32 6, i32 1 ; [#uses=1]
- store i8 2, i8* %198, align 1
- %199 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %197, i32 0, i32 4, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %196, %"struct.gjkepa2_impl::EPA::sFace"** %199, align 4
- %200 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %196, i32 0, i32 6, i32 2 ; [#uses=1]
- store i8 1, i8* %200, align 1
- %201 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %196, i32 0, i32 4, i32 2 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %197, %"struct.gjkepa2_impl::EPA::sFace"** %201, align 4
- %202 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 5, i32 1 ; [#uses=4]
- %203 = load %"struct.gjkepa2_impl::EPA::sFace"** %202, align 4 ; [#uses=2]
- %204 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %203, null ; [#uses=1]
- br i1 %204, label %bb1.i53, label %bb.i52
-
-bb.i52: ; preds = %bb29
- %205 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 5, i32 0 ; [#uses=1]
- %206 = load %"struct.gjkepa2_impl::EPA::sFace"** %205, align 4 ; [#uses=1]
- %207 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %203, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %206, %"struct.gjkepa2_impl::EPA::sFace"** %207, align 4
- br label %bb1.i53
-
-bb1.i53: ; preds = %bb.i52, %bb29
- %208 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %best.0, i32 0, i32 5, i32 0 ; [#uses=2]
- %209 = load %"struct.gjkepa2_impl::EPA::sFace"** %208, align 4 ; [#uses=2]
- %210 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %209, null ; [#uses=1]
- br i1 %210, label %bb3.i55, label %bb2.i54
-
-bb2.i54: ; preds = %bb1.i53
- %211 = load %"struct.gjkepa2_impl::EPA::sFace"** %202, align 4 ; [#uses=1]
- %212 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %209, i32 0, i32 5, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %211, %"struct.gjkepa2_impl::EPA::sFace"** %212, align 4
- br label %bb3.i55
-
-bb3.i55: ; preds = %bb2.i54, %bb1.i53
- %213 = load %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4 ; [#uses=1]
- %214 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %213, %best.0 ; [#uses=1]
- br i1 %214, label %bb4.i56, label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit57
-
-bb4.i56: ; preds = %bb3.i55
- %215 = load %"struct.gjkepa2_impl::EPA::sFace"** %202, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %215, %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4
- br label %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit57
-
-_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit57: ; preds = %bb4.i56, %bb3.i55
- %216 = load i32* %117, align 4 ; [#uses=1]
- %217 = add i32 %216, -1 ; [#uses=1]
- store i32 %217, i32* %117, align 4
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %208, align 4
- %218 = load %"struct.gjkepa2_impl::EPA::sFace"** %158, align 4 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %218, %"struct.gjkepa2_impl::EPA::sFace"** %202, align 4
- %219 = load %"struct.gjkepa2_impl::EPA::sFace"** %158, align 4 ; [#uses=2]
- %220 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %219, null ; [#uses=1]
- br i1 %220, label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit51, label %bb.i49
-
-bb.i49: ; preds = %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit57
- %221 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %219, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %best.0, %"struct.gjkepa2_impl::EPA::sFace"** %221, align 4
- br label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit51
-
-_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit51: ; preds = %bb.i49, %_ZN12gjkepa2_impl3EPA6removeERNS0_5sListEPNS0_5sFaceE.exit57
- store %"struct.gjkepa2_impl::EPA::sFace"* %best.0, %"struct.gjkepa2_impl::EPA::sFace"** %158, align 4
- %222 = load i32* %159, align 4 ; [#uses=1]
- %223 = add i32 %222, 1 ; [#uses=1]
- store i32 %223, i32* %159, align 4
- %224 = load %"struct.gjkepa2_impl::EPA::sFace"** %6, align 4 ; [#uses=3]
- %225 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %224, i32 0, i32 1 ; [#uses=1]
- %226 = load float* %225, align 4 ; [#uses=2]
- %227 = fmul float %226, %226 ; [#uses=1]
- %maxp.1.ph.in.phi.trans.insert.i = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %224, i32 0, i32 2 ; [#uses=1]
- %maxp.1.ph.pre.i = load float* %maxp.1.ph.in.phi.trans.insert.i, align 4 ; [#uses=1]
- br label %bb4.outer.i
-
-bb.i47: ; preds = %bb4.i48
- %228 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f.0.i, i32 0, i32 1 ; [#uses=1]
- %229 = load float* %228, align 4 ; [#uses=2]
- %230 = fmul float %229, %229 ; [#uses=2]
- %231 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %f.0.i, i32 0, i32 2 ; [#uses=1]
- %232 = load float* %231, align 4 ; [#uses=2]
- %.not.i = fcmp oge float %232, %maxp.1.ph.i ; [#uses=1]
- %233 = fcmp olt float %230, %mind.1.ph.i ; [#uses=1]
- %or.cond.i = and i1 %.not.i, %233 ; [#uses=1]
- br i1 %or.cond.i, label %bb4.outer.i, label %bb4.i48
-
-bb4.outer.i: ; preds = %bb.i47, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit51
- %maxp.1.ph.i = phi float [ %maxp.1.ph.pre.i, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit51 ], [ %232, %bb.i47 ] ; [#uses=1]
- %minf.1.ph.i = phi %"struct.gjkepa2_impl::EPA::sFace"* [ %224, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit51 ], [ %f.0.i, %bb.i47 ] ; [#uses=12]
- %mind.1.ph.i = phi float [ %227, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit51 ], [ %230, %bb.i47 ] ; [#uses=1]
- br label %bb4.i48
-
-bb4.i48: ; preds = %bb4.outer.i, %bb.i47
- %.pn.i = phi %"struct.gjkepa2_impl::EPA::sFace"* [ %f.0.i, %bb.i47 ], [ %minf.1.ph.i, %bb4.outer.i ] ; [#uses=1]
- %f.0.in.i = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %.pn.i, i32 0, i32 5, i32 1 ; [#uses=1]
- %f.0.i = load %"struct.gjkepa2_impl::EPA::sFace"** %f.0.in.i, align 4 ; [#uses=5]
- %234 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %f.0.i, null ; [#uses=1]
- br i1 %234, label %_ZN12gjkepa2_impl3EPA8findbestEv.exit, label %bb.i47
-
-_ZN12gjkepa2_impl3EPA8findbestEv.exit: ; preds = %bb4.i48
- %235 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 2 ; [#uses=1]
- %236 = load float* %235, align 4 ; [#uses=2]
- %237 = fcmp ult float %236, %outer.2.1 ; [#uses=1]
- br i1 %237, label %bb36, label %bb30
-
-bb30: ; preds = %_ZN12gjkepa2_impl3EPA8findbestEv.exit
- %minf.1.ph.i141.0 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %tmp142 = load float* %minf.1.ph.i141.0, align 4 ; [#uses=1]
- %minf.1.ph.i141.1 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %tmp143 = load float* %minf.1.ph.i141.1, align 4 ; [#uses=1]
- %minf.1.ph.i141.2 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %tmp144 = load float* %minf.1.ph.i141.2, align 4 ; [#uses=1]
- %minf.1.ph.i141.3 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp145 = load float* %minf.1.ph.i141.3, align 4 ; [#uses=1]
- %minf.1.ph.i.1 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 1 ; [#uses=1]
- %tmp = load float* %minf.1.ph.i.1, align 4 ; [#uses=1]
- %minf.1.ph.i.3.0 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 3, i32 0 ; [#uses=1]
- %tmp131 = load %struct.GIM_AABB** %minf.1.ph.i.3.0, align 4 ; [#uses=1]
- %minf.1.ph.i.3.1 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 3, i32 1 ; [#uses=1]
- %tmp132 = load %struct.GIM_AABB** %minf.1.ph.i.3.1, align 4 ; [#uses=1]
- %minf.1.ph.i.3.2 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %minf.1.ph.i, i32 0, i32 3, i32 2 ; [#uses=1]
- %tmp133 = load %struct.GIM_AABB** %minf.1.ph.i.3.2, align 4 ; [#uses=1]
- br label %bb36
-
-bb32: ; preds = %bb28, %bb23
- store i32 4, i32* %37, align 4
- br label %bb37
-
-bb33: ; preds = %bb17
- store i32 7, i32* %37, align 4
- br label %bb37
-
-bb34: ; preds = %bb16
- store i32 6, i32* %37, align 4
- br label %bb37
-
-bb36: ; preds = %bb30, %_ZN12gjkepa2_impl3EPA8findbestEv.exit, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71
- %outer.0.0.0.1 = phi float [ %tmp147, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.0.0.0.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp142, %bb30 ] ; [#uses=3]
- %outer.0.0.1.1 = phi float [ %tmp148, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.0.0.1.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp143, %bb30 ] ; [#uses=3]
- %outer.0.0.2.1 = phi float [ %tmp149, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.0.0.2.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp144, %bb30 ] ; [#uses=3]
- %outer.0.0.3.1 = phi float [ %tmp150, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.0.0.3.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp145, %bb30 ] ; [#uses=2]
- %outer.1.1 = phi float [ %tmp101, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.1.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp, %bb30 ] ; [#uses=5]
- %outer.2.1 = phi float [ %tmp102, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.2.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %236, %bb30 ] ; [#uses=2]
- %outer.3.0.1 = phi %struct.GIM_AABB* [ %tmp128, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.3.0.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp131, %bb30 ] ; [#uses=5]
- %outer.3.1.1 = phi %struct.GIM_AABB* [ %tmp129, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.3.1.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp132, %bb30 ] ; [#uses=5]
- %outer.3.2.1 = phi %struct.GIM_AABB* [ %tmp130, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %outer.3.2.1, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %tmp133, %bb30 ] ; [#uses=5]
- %best.0 = phi %"struct.gjkepa2_impl::EPA::sFace"* [ %minf.1.ph.i64, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %minf.1.ph.i, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %minf.1.ph.i, %bb30 ] ; [#uses=14]
- %238 = phi i32 [ 0, %_ZN12gjkepa2_impl3EPA8findbestEv.exit71 ], [ %pass.0, %_ZN12gjkepa2_impl3EPA8findbestEv.exit ], [ %pass.0, %bb30 ] ; [#uses=2]
- %pass.0 = add i32 %238, 1 ; [#uses=4]
- %tmp271 = trunc i32 %pass.0 to i8 ; [#uses=1]
- %239 = icmp ult i32 %238, 255 ; [#uses=1]
- br i1 %239, label %bb16, label %bb37.loopexit
-
-bb37.loopexit: ; preds = %bb36
- %.0.pre.pre = load i32* %37, align 4 ; [#uses=1]
- br label %bb37
-
-bb37: ; preds = %bb37.loopexit, %bb34, %bb33, %bb32
- %.0.pre = phi i32 [ %.0.pre.pre, %bb37.loopexit ], [ 6, %bb34 ], [ 7, %bb33 ], [ 4, %bb32 ] ; [#uses=1]
- %240 = fmul float %outer.0.0.2.1, %outer.1.1 ; [#uses=6]
- %241 = fmul float %outer.0.0.1.1, %outer.1.1 ; [#uses=6]
- %242 = fmul float %outer.0.0.0.1, %outer.1.1 ; [#uses=6]
- %243 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %outer.0.0.0.1, float* %243, align 4
- %244 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %outer.0.0.1.1, float* %244, align 4
- %245 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %outer.0.0.2.1, float* %245, align 4
- %246 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %outer.0.0.3.1, float* %246, align 4
- %247 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 3 ; [#uses=1]
- store float %outer.1.1, float* %247, align 4
- %248 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 3, i32* %248, align 4
- %249 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store %struct.GIM_AABB* %outer.3.0.1, %struct.GIM_AABB** %249, align 4
- %250 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store %struct.GIM_AABB* %outer.3.1.1, %struct.GIM_AABB** %250, align 4
- %251 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store %struct.GIM_AABB* %outer.3.2.1, %struct.GIM_AABB** %251, align 4
- %252 = getelementptr inbounds %struct.GIM_AABB* %outer.3.2.1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %253 = load float* %252, align 4 ; [#uses=1]
- %254 = fsub float %253, %240 ; [#uses=2]
- %255 = getelementptr inbounds %struct.GIM_AABB* %outer.3.2.1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %256 = load float* %255, align 4 ; [#uses=1]
- %257 = fsub float %256, %241 ; [#uses=2]
- %258 = getelementptr inbounds %struct.GIM_AABB* %outer.3.2.1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %259 = load float* %258, align 4 ; [#uses=1]
- %260 = fsub float %259, %242 ; [#uses=2]
- %261 = getelementptr inbounds %struct.GIM_AABB* %outer.3.1.1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %262 = load float* %261, align 4 ; [#uses=1]
- %263 = fsub float %262, %240 ; [#uses=2]
- %264 = getelementptr inbounds %struct.GIM_AABB* %outer.3.1.1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %265 = load float* %264, align 4 ; [#uses=1]
- %266 = fsub float %265, %241 ; [#uses=2]
- %267 = getelementptr inbounds %struct.GIM_AABB* %outer.3.1.1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %268 = load float* %267, align 4 ; [#uses=1]
- %269 = fsub float %268, %242 ; [#uses=2]
- %270 = fmul float %269, %257 ; [#uses=1]
- %271 = fmul float %266, %260 ; [#uses=1]
- %272 = fsub float %270, %271 ; [#uses=2]
- %273 = fmul float %263, %260 ; [#uses=1]
- %274 = fmul float %269, %254 ; [#uses=1]
- %275 = fsub float %273, %274 ; [#uses=2]
- %276 = fmul float %266, %254 ; [#uses=1]
- %277 = fmul float %263, %257 ; [#uses=1]
- %278 = fsub float %276, %277 ; [#uses=2]
- %279 = fmul float %278, %278 ; [#uses=1]
- %280 = fmul float %275, %275 ; [#uses=1]
- %281 = fadd float %279, %280 ; [#uses=1]
- %282 = fmul float %272, %272 ; [#uses=1]
- %283 = fadd float %281, %282 ; [#uses=1]
- %284 = call float @sqrtf(float %283) nounwind readonly ; [#uses=3]
- %285 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=2]
- store float %284, float* %285, align 4
- %286 = getelementptr inbounds %struct.GIM_AABB* %outer.3.0.1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %287 = load float* %286, align 4 ; [#uses=1]
- %288 = fsub float %287, %240 ; [#uses=2]
- %289 = getelementptr inbounds %struct.GIM_AABB* %outer.3.0.1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %290 = load float* %289, align 4 ; [#uses=1]
- %291 = fsub float %290, %241 ; [#uses=2]
- %292 = getelementptr inbounds %struct.GIM_AABB* %outer.3.0.1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %293 = load float* %292, align 4 ; [#uses=1]
- %294 = fsub float %293, %242 ; [#uses=2]
- %295 = load float* %252, align 4 ; [#uses=1]
- %296 = fsub float %295, %240 ; [#uses=2]
- %297 = load float* %255, align 4 ; [#uses=1]
- %298 = fsub float %297, %241 ; [#uses=2]
- %299 = load float* %258, align 4 ; [#uses=1]
- %300 = fsub float %299, %242 ; [#uses=2]
- %301 = fmul float %300, %291 ; [#uses=1]
- %302 = fmul float %298, %294 ; [#uses=1]
- %303 = fsub float %301, %302 ; [#uses=2]
- %304 = fmul float %296, %294 ; [#uses=1]
- %305 = fmul float %300, %288 ; [#uses=1]
- %306 = fsub float %304, %305 ; [#uses=2]
- %307 = fmul float %298, %288 ; [#uses=1]
- %308 = fmul float %296, %291 ; [#uses=1]
- %309 = fsub float %307, %308 ; [#uses=2]
- %310 = fmul float %309, %309 ; [#uses=1]
- %311 = fmul float %306, %306 ; [#uses=1]
- %312 = fadd float %310, %311 ; [#uses=1]
- %313 = fmul float %303, %303 ; [#uses=1]
- %314 = fadd float %312, %313 ; [#uses=1]
- %315 = call float @sqrtf(float %314) nounwind readonly ; [#uses=3]
- %316 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 1, i32 1 ; [#uses=2]
- store float %315, float* %316, align 4
- %317 = load float* %261, align 4 ; [#uses=1]
- %318 = fsub float %317, %240 ; [#uses=2]
- %319 = load float* %264, align 4 ; [#uses=1]
- %320 = fsub float %319, %241 ; [#uses=2]
- %321 = load float* %267, align 4 ; [#uses=1]
- %322 = fsub float %321, %242 ; [#uses=2]
- %323 = load float* %286, align 4 ; [#uses=1]
- %324 = fsub float %323, %240 ; [#uses=2]
- %325 = load float* %289, align 4 ; [#uses=1]
- %326 = fsub float %325, %241 ; [#uses=2]
- %327 = load float* %292, align 4 ; [#uses=1]
- %328 = fsub float %327, %242 ; [#uses=2]
- %329 = fmul float %328, %320 ; [#uses=1]
- %330 = fmul float %326, %322 ; [#uses=1]
- %331 = fsub float %329, %330 ; [#uses=2]
- %332 = fmul float %324, %322 ; [#uses=1]
- %333 = fmul float %328, %318 ; [#uses=1]
- %334 = fsub float %332, %333 ; [#uses=2]
- %335 = fmul float %326, %318 ; [#uses=1]
- %336 = fmul float %324, %320 ; [#uses=1]
- %337 = fsub float %335, %336 ; [#uses=2]
- %338 = fmul float %337, %337 ; [#uses=1]
- %339 = fmul float %334, %334 ; [#uses=1]
- %340 = fadd float %338, %339 ; [#uses=1]
- %341 = fmul float %331, %331 ; [#uses=1]
- %342 = fadd float %340, %341 ; [#uses=1]
- %343 = call float @sqrtf(float %342) nounwind readonly ; [#uses=2]
- %344 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 1, i32 2 ; [#uses=1]
- %345 = fadd float %284, %315 ; [#uses=1]
- %346 = fadd float %345, %343 ; [#uses=3]
- %347 = fdiv float %284, %346 ; [#uses=1]
- store float %347, float* %285, align 4
- %348 = fdiv float %315, %346 ; [#uses=1]
- store float %348, float* %316, align 4
- %349 = fdiv float %343, %346 ; [#uses=1]
- store float %349, float* %344, align 4
- ret i32 %.0.pre
-
-bb38: ; preds = %bb13, %bb, %entry
- %350 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 0 ; [#uses=1]
- store i32 8, i32* %350, align 4
- %351 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 2 ; [#uses=1]
- %352 = load float* %351, align 4 ; [#uses=3]
- %353 = fsub float -0.000000e+00, %352 ; [#uses=2]
- %354 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 1 ; [#uses=1]
- %355 = load float* %354, align 4 ; [#uses=3]
- %356 = fsub float -0.000000e+00, %355 ; [#uses=2]
- %357 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 0 ; [#uses=1]
- %358 = load float* %357, align 4 ; [#uses=3]
- %359 = fsub float -0.000000e+00, %358 ; [#uses=2]
- %360 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float %359, float* %360, align 4
- %361 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float %356, float* %361, align 4
- %362 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float %353, float* %362, align 4
- %363 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %363, align 4
- %364 = fmul float %358, %358 ; [#uses=1]
- %365 = fmul float %355, %355 ; [#uses=1]
- %366 = fadd float %364, %365 ; [#uses=1]
- %367 = fmul float %352, %352 ; [#uses=1]
- %368 = fadd float %366, %367 ; [#uses=1]
- %369 = call float @sqrtf(float %368) nounwind readonly ; [#uses=2]
- %370 = fcmp ogt float %369, 0.000000e+00 ; [#uses=1]
- br i1 %370, label %bb39, label %bb42
-
-bb39: ; preds = %bb38
- %371 = fdiv float 1.000000e+00, %369 ; [#uses=3]
- %372 = fmul float %371, %353 ; [#uses=1]
- %373 = fmul float %371, %356 ; [#uses=1]
- %374 = fmul float %371, %359 ; [#uses=1]
- br label %bb42
-
-bb42: ; preds = %bb39, %bb38
- %storemerge278 = phi float [ %374, %bb39 ], [ 1.000000e+00, %bb38 ] ; [#uses=1]
- %storemerge277 = phi float [ %373, %bb39 ], [ 0.000000e+00, %bb38 ] ; [#uses=1]
- %storemerge = phi float [ %372, %bb39 ], [ 0.000000e+00, %bb38 ] ; [#uses=1]
- store float %storemerge278, float* %360, align 4
- store float %storemerge277, float* %361, align 4
- store float %storemerge, float* %362, align 4
- store float 0.000000e+00, float* %363, align 4
- %375 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %375, align 4
- %376 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 1, i32* %376, align 4
- %377 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %378 = load %struct.GIM_AABB** %377, align 4 ; [#uses=1]
- %379 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store %struct.GIM_AABB* %378, %struct.GIM_AABB** %379, align 4
- %380 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %this, i32 0, i32 1, i32 1, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %380, align 4
- ret i32 8
-}
-
-; [#uses=3]
-define zeroext i8 @_ZN15btGjkEpaSolver211PenetrationEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsEb(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* nocapture %wtrs1, %struct.btQuadWord* nocapture %guess, %"struct.btGjkEpaSolver2::sResults"* nocapture %results, i8 zeroext %usemargins) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %shape = alloca %"struct.gjkepa2_impl::MinkowskiDiff", align 8 ; [#uses=5]
- %gjk = alloca %"struct.gjkepa2_impl::GJK", align 8 ; [#uses=10]
- %epa = alloca %"struct.gjkepa2_impl::EPA", align 8 ; [#uses=18]
- call fastcc void @_ZN12gjkepa2_implL10InitializeEPK13btConvexShapeRK11btTransformS2_S5_RN15btGjkEpaSolver28sResultsERNS_13MinkowskiDiffEb(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* %wtrs1, %"struct.btGjkEpaSolver2::sResults"* %results, %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i8 zeroext %usemargins)
- %3 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 8
- %4 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 8
- %6 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 9 ; [#uses=1]
- store i32 2, i32* %8, align 8
- %9 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %9, align 8
- %10 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 8
- %11 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 2 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fsub float -0.000000e+00, %12 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 1 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float -0.000000e+00, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %guess, i32 0, i32 0, i32 0 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fsub float -0.000000e+00, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %19, float* %20, align 8
- %21 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %16, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %13, float* %22, align 8
- %23 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = call i32 @_ZN12gjkepa2_impl3GJK8EvaluateERKNS_13MinkowskiDiffERK9btVector3(%"struct.gjkepa2_impl::GJK"* %gjk, %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, %struct.btQuadWord* %2) ; [#uses=1]
- switch i32 %24, label %bb10 [
- i32 1, label %bb
- i32 2, label %bb8
- ]
-
-bb: ; preds = %entry
- %25 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 7, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %25, align 8
- %26 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 7, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 8, i32 0 ; [#uses=2]
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %27, align 8
- %28 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 8, i32 1 ; [#uses=3]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 0 ; [#uses=1]
- store i32 9, i32* %29, align 8
- %30 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %30, align 8
- %31 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %32, align 8
- %33 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %34, align 8
- %35 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %35, align 4
- br label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i, %bb
- %36 = phi i32 [ 0, %bb ], [ %41, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i ] ; [#uses=1]
- %37 = phi %"struct.gjkepa2_impl::EPA::sFace"* [ null, %bb ], [ %scevgep8.i.i.i, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i ] ; [#uses=3]
- %i.05.i.i.i = phi i32 [ 0, %bb ], [ %42, %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i ] ; [#uses=2]
- %tmp48 = sub i32 127, %i.05.i.i.i ; [#uses=3]
- %scevgep8.i.i.i = getelementptr %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 5, i32 %tmp48 ; [#uses=3]
- %scevgep7.i.i.i = getelementptr %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 5, i32 %tmp48, i32 5, i32 0 ; [#uses=1]
- %scevgep.i.i.i = getelementptr %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 5, i32 %tmp48, i32 5, i32 1 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* null, %"struct.gjkepa2_impl::EPA::sFace"** %scevgep7.i.i.i, align 4
- store %"struct.gjkepa2_impl::EPA::sFace"* %37, %"struct.gjkepa2_impl::EPA::sFace"** %scevgep.i.i.i, align 4
- %38 = icmp eq %"struct.gjkepa2_impl::EPA::sFace"* %37, null ; [#uses=1]
- br i1 %38, label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %bb.i.i.i
- %39 = getelementptr inbounds %"struct.gjkepa2_impl::EPA::sFace"* %37, i32 0, i32 5, i32 0 ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %scevgep8.i.i.i, %"struct.gjkepa2_impl::EPA::sFace"** %39, align 4
- %.pre.i.i13 = load i32* %28, align 4 ; [#uses=1]
- br label %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i
-
-_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i: ; preds = %bb.i.i.i.i, %bb.i.i.i
- %40 = phi i32 [ %.pre.i.i13, %bb.i.i.i.i ], [ %36, %bb.i.i.i ] ; [#uses=1]
- store %"struct.gjkepa2_impl::EPA::sFace"* %scevgep8.i.i.i, %"struct.gjkepa2_impl::EPA::sFace"** %27, align 8
- %41 = add i32 %40, 1 ; [#uses=2]
- store i32 %41, i32* %28, align 4
- %42 = add i32 %i.05.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %42, 128 ; [#uses=1]
- br i1 %exitcond, label %_ZN12gjkepa2_impl3EPAC1Ev.exit, label %bb.i.i.i
-
-_ZN12gjkepa2_impl3EPAC1Ev.exit: ; preds = %_ZN12gjkepa2_impl3EPA6appendERNS0_5sListEPNS0_5sFaceE.exit.i.i.i
- %43 = load float* %11, align 4 ; [#uses=1]
- %44 = fsub float -0.000000e+00, %43 ; [#uses=1]
- %45 = load float* %14, align 4 ; [#uses=1]
- %46 = fsub float -0.000000e+00, %45 ; [#uses=1]
- %47 = load float* %17, align 4 ; [#uses=1]
- %48 = fsub float -0.000000e+00, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %48, float* %49, align 8
- %50 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %50, align 4
- %51 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %44, float* %51, align 8
- %52 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = call i32 @_ZN12gjkepa2_impl3EPA8EvaluateERNS_3GJKERK9btVector3(%"struct.gjkepa2_impl::EPA"* %epa, %"struct.gjkepa2_impl::GJK"* %gjk, %struct.btQuadWord* %1) ; [#uses=1]
- %54 = icmp eq i32 %53, 9 ; [#uses=1]
- br i1 %54, label %bb7, label %bb3.preheader
-
-bb3.preheader: ; preds = %_ZN12gjkepa2_impl3EPAC1Ev.exit
- %55 = getelementptr inbounds %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 1, i32 2 ; [#uses=2]
- %56 = load i32* %55, align 4 ; [#uses=1]
- %57 = icmp eq i32 %56, 0 ; [#uses=1]
- br i1 %57, label %bb4, label %bb.nph
-
-bb.nph: ; preds = %bb3.preheader
- %58 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 0 ; [#uses=1]
- %.phi.trans.insert.i.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 0, i32 0 ; [#uses=1]
- %.phi.trans.insert4.i.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 1 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit, %bb.nph
- %i.041 = phi i32 [ 0, %bb.nph ], [ %tmp, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=3]
- %w0.0.2.040 = phi float [ 0.000000e+00, %bb.nph ], [ %88, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=1]
- %w0.0.1.039 = phi float [ 0.000000e+00, %bb.nph ], [ %87, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=1]
- %w0.0.0.038 = phi float [ 0.000000e+00, %bb.nph ], [ %86, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=1]
- %scevgep = getelementptr %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 1, i32 1, i32 %i.041 ; [#uses=1]
- %scevgep46 = getelementptr %"struct.gjkepa2_impl::EPA"* %epa, i32 0, i32 1, i32 0, i32 %i.041 ; [#uses=1]
- %tmp = add i32 %i.041, 1 ; [#uses=2]
- %62 = load %struct.GIM_AABB** %scevgep46, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.GIM_AABB* %62, i32 0, i32 0 ; [#uses=1]
- %64 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %58, align 8 ; [#uses=2]
- %65 = ptrtoint void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %64 to i32 ; [#uses=2]
- %66 = and i32 %65, 1 ; [#uses=1]
- %toBool.i.i = icmp eq i32 %66, 0 ; [#uses=1]
- %.pre.i.i = load %struct.btConvexShape** %.phi.trans.insert.i.i, align 8 ; [#uses=2]
- %.pre5.i.i = load i32* %.phi.trans.insert4.i.i, align 4 ; [#uses=2]
- br i1 %toBool.i.i, label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit, label %bb.i.i
-
-bb.i.i: ; preds = %bb2
- %67 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %68 = add i32 %67, %.pre5.i.i ; [#uses=1]
- %69 = inttoptr i32 %68 to %struct.btConvexShape* ; [#uses=1]
- %70 = getelementptr inbounds %struct.btConvexShape* %69, i32 0, i32 0, i32 0 ; [#uses=1]
- %71 = load i32 (...)*** %70, align 4 ; [#uses=1]
- %72 = ptrtoint i32 (...)** %71 to i32 ; [#uses=1]
- %73 = add nsw i32 %65, -1 ; [#uses=1]
- %74 = add i32 %73, %72 ; [#uses=1]
- %75 = inttoptr i32 %74 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** ; [#uses=1]
- %iftmp.134.0.pre.i.i = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %75, align 4 ; [#uses=1]
- br label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit
-
-_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit: ; preds = %bb.i.i, %bb2
- %iftmp.134.0.i.i = phi void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* [ %iftmp.134.0.pre.i.i, %bb.i.i ], [ %64, %bb2 ] ; [#uses=1]
- %76 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %77 = add i32 %76, %.pre5.i.i ; [#uses=1]
- %78 = inttoptr i32 %77 to %struct.btConvexShape* ; [#uses=1]
- call void %iftmp.134.0.i.i(%struct.btQuadWord* noalias sret %0, %struct.btConvexShape* %78, %struct.btQuadWord* %63)
- %79 = load float* %59, align 8 ; [#uses=1]
- %80 = load float* %scevgep, align 4 ; [#uses=3]
- %81 = fmul float %79, %80 ; [#uses=1]
- %82 = load float* %60, align 4 ; [#uses=1]
- %83 = fmul float %82, %80 ; [#uses=1]
- %84 = load float* %61, align 8 ; [#uses=1]
- %85 = fmul float %84, %80 ; [#uses=1]
- %86 = fadd float %w0.0.0.038, %85 ; [#uses=2]
- %87 = fadd float %w0.0.1.039, %83 ; [#uses=2]
- %88 = fadd float %w0.0.2.040, %81 ; [#uses=2]
- %89 = load i32* %55, align 4 ; [#uses=1]
- %90 = icmp ugt i32 %89, %tmp ; [#uses=1]
- br i1 %90, label %bb2, label %bb4
-
-bb4: ; preds = %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit, %bb3.preheader
- %w0.0.2.0.lcssa = phi float [ 0.000000e+00, %bb3.preheader ], [ %88, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=4]
- %w0.0.1.0.lcssa = phi float [ 0.000000e+00, %bb3.preheader ], [ %87, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=4]
- %w0.0.0.0.lcssa = phi float [ 0.000000e+00, %bb3.preheader ], [ %86, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=4]
- %91 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 0 ; [#uses=1]
- store i32 1, i32* %91, align 4
- %92 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = fmul float %93, %w0.0.0.0.lcssa ; [#uses=1]
- %95 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = fmul float %96, %w0.0.1.0.lcssa ; [#uses=1]
- %98 = fadd float %94, %97 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %100 = load float* %99, align 4 ; [#uses=1]
- %101 = fmul float %100, %w0.0.2.0.lcssa ; [#uses=1]
- %102 = fadd float %98, %101 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %104 = load float* %103, align 4 ; [#uses=1]
- %105 = fadd float %102, %104 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %107 = load float* %106, align 4 ; [#uses=1]
- %108 = fmul float %107, %w0.0.0.0.lcssa ; [#uses=1]
- %109 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %110 = load float* %109, align 4 ; [#uses=1]
- %111 = fmul float %110, %w0.0.1.0.lcssa ; [#uses=1]
- %112 = fadd float %108, %111 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %114 = load float* %113, align 4 ; [#uses=1]
- %115 = fmul float %114, %w0.0.2.0.lcssa ; [#uses=1]
- %116 = fadd float %112, %115 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fadd float %116, %118 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %121 = load float* %120, align 4 ; [#uses=1]
- %122 = fmul float %121, %w0.0.0.0.lcssa ; [#uses=1]
- %123 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %124 = load float* %123, align 4 ; [#uses=1]
- %125 = fmul float %124, %w0.0.1.0.lcssa ; [#uses=1]
- %126 = fadd float %122, %125 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %128 = load float* %127, align 4 ; [#uses=1]
- %129 = fmul float %128, %w0.0.2.0.lcssa ; [#uses=1]
- %130 = fadd float %126, %129 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = fadd float %130, %132 ; [#uses=1]
- %134 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %133, float* %134, align 4
- %135 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %119, float* %135, align 4
- %136 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %105, float* %136, align 4
- %137 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %137, align 4
- %138 = load float* %32, align 8 ; [#uses=2]
- %139 = load float* %34, align 8 ; [#uses=4]
- %140 = fmul float %138, %139 ; [#uses=1]
- %141 = load float* %31, align 4 ; [#uses=2]
- %142 = fmul float %141, %139 ; [#uses=1]
- %143 = load float* %30, align 8 ; [#uses=2]
- %144 = fmul float %143, %139 ; [#uses=1]
- %145 = fsub float %w0.0.2.0.lcssa, %140 ; [#uses=3]
- %146 = fsub float %w0.0.1.0.lcssa, %142 ; [#uses=3]
- %147 = fsub float %w0.0.0.0.lcssa, %144 ; [#uses=3]
- %148 = load float* %92, align 4 ; [#uses=1]
- %149 = fmul float %148, %147 ; [#uses=1]
- %150 = load float* %95, align 4 ; [#uses=1]
- %151 = fmul float %150, %146 ; [#uses=1]
- %152 = fadd float %149, %151 ; [#uses=1]
- %153 = load float* %99, align 4 ; [#uses=1]
- %154 = fmul float %153, %145 ; [#uses=1]
- %155 = fadd float %152, %154 ; [#uses=1]
- %156 = load float* %103, align 4 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = load float* %106, align 4 ; [#uses=1]
- %159 = fmul float %158, %147 ; [#uses=1]
- %160 = load float* %109, align 4 ; [#uses=1]
- %161 = fmul float %160, %146 ; [#uses=1]
- %162 = fadd float %159, %161 ; [#uses=1]
- %163 = load float* %113, align 4 ; [#uses=1]
- %164 = fmul float %163, %145 ; [#uses=1]
- %165 = fadd float %162, %164 ; [#uses=1]
- %166 = load float* %117, align 4 ; [#uses=1]
- %167 = fadd float %165, %166 ; [#uses=1]
- %168 = load float* %120, align 4 ; [#uses=1]
- %169 = fmul float %168, %147 ; [#uses=1]
- %170 = load float* %123, align 4 ; [#uses=1]
- %171 = fmul float %170, %146 ; [#uses=1]
- %172 = fadd float %169, %171 ; [#uses=1]
- %173 = load float* %127, align 4 ; [#uses=1]
- %174 = fmul float %173, %145 ; [#uses=1]
- %175 = fadd float %172, %174 ; [#uses=1]
- %176 = load float* %131, align 4 ; [#uses=1]
- %177 = fadd float %175, %176 ; [#uses=1]
- %178 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %177, float* %178, align 4
- %179 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %167, float* %179, align 4
- %180 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %157, float* %180, align 4
- %181 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %181, align 4
- %182 = fsub float -0.000000e+00, %138 ; [#uses=1]
- %183 = fsub float -0.000000e+00, %141 ; [#uses=1]
- %184 = fsub float -0.000000e+00, %143 ; [#uses=1]
- %185 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %184, float* %185, align 4
- %186 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %183, float* %186, align 4
- %187 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %182, float* %187, align 4
- %188 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %188, align 4
- %189 = fsub float -0.000000e+00, %139 ; [#uses=1]
- %190 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 3 ; [#uses=1]
- store float %189, float* %190, align 4
- ret i8 1
-
-bb7: ; preds = %_ZN12gjkepa2_impl3EPAC1Ev.exit
- %191 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 0 ; [#uses=1]
- store i32 3, i32* %191, align 4
- ret i8 0
-
-bb8: ; preds = %entry
- %192 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 0 ; [#uses=1]
- store i32 2, i32* %192, align 4
- ret i8 0
-
-bb10: ; preds = %entry
- ret i8 0
-}
-
-; [#uses=2]
-define zeroext i8 @_ZN15btGjkEpaSolver28DistanceEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsE(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* nocapture %wtrs1, %struct.btQuadWord* nocapture %guess, %"struct.btGjkEpaSolver2::sResults"* nocapture %results) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %shape = alloca %"struct.gjkepa2_impl::MinkowskiDiff", align 8 ; [#uses=27]
- %gjk = alloca %"struct.gjkepa2_impl::GJK", align 8 ; [#uses=10]
- call fastcc void @_ZN12gjkepa2_implL10InitializeEPK13btConvexShapeRK11btTransformS2_S5_RN15btGjkEpaSolver28sResultsERNS_13MinkowskiDiffEb(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* %wtrs1, %"struct.btGjkEpaSolver2::sResults"* %results, %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i8 zeroext 0)
- %3 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 8
- %4 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 8
- %6 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 9 ; [#uses=1]
- store i32 2, i32* %8, align 8
- %9 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %9, align 8
- %10 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 8
- %11 = call i32 @_ZN12gjkepa2_impl3GJK8EvaluateERKNS_13MinkowskiDiffERK9btVector3(%"struct.gjkepa2_impl::GJK"* %gjk, %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, %struct.btQuadWord* %guess) ; [#uses=1]
- switch i32 %11, label %bb11 [
- i32 0, label %bb2.preheader
- i32 1, label %bb12
- ]
-
-bb2.preheader: ; preds = %entry
- %12 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 8 ; [#uses=3]
- %13 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %13, i32 0, i32 2 ; [#uses=1]
- %15 = load i32* %14, align 4 ; [#uses=1]
- %16 = icmp eq i32 %15, 0 ; [#uses=1]
- br i1 %16, label %bb3, label %bb.nph
-
-bb.nph: ; preds = %bb2.preheader
- %17 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 0 ; [#uses=2]
- %.phi.trans.insert.i.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 0, i32 0 ; [#uses=1]
- %.phi.trans.insert4.i.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 1 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %.phi.trans.insert.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %26 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %34 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %41 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %42 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %44 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %48 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit, %bb.nph
- %49 = phi %"struct.gjkepa2_impl::GJK::sSimplex"* [ %13, %bb.nph ], [ %166, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=2]
- %i.056 = phi i32 [ 0, %bb.nph ], [ %tmp, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=4]
- %w1.0.2.055 = phi float [ 0.000000e+00, %bb.nph ], [ %165, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=1]
- %w1.0.1.054 = phi float [ 0.000000e+00, %bb.nph ], [ %164, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=1]
- %w1.0.0.053 = phi float [ 0.000000e+00, %bb.nph ], [ %163, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=1]
- %w0.0.2.052 = phi float [ 0.000000e+00, %bb.nph ], [ %76, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=1]
- %w0.0.1.051 = phi float [ 0.000000e+00, %bb.nph ], [ %75, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=1]
- %w0.0.0.050 = phi float [ 0.000000e+00, %bb.nph ], [ %74, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=1]
- %tmp = add i32 %i.056, 1 ; [#uses=2]
- %scevgep = getelementptr %"struct.gjkepa2_impl::GJK::sSimplex"* %49, i32 0, i32 1, i32 %i.056 ; [#uses=1]
- %50 = load float* %scevgep, align 4 ; [#uses=6]
- %scevgep67 = getelementptr %"struct.gjkepa2_impl::GJK::sSimplex"* %49, i32 0, i32 0, i32 %i.056 ; [#uses=1]
- %51 = load %struct.GIM_AABB** %scevgep67, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.GIM_AABB* %51, i32 0, i32 0 ; [#uses=1]
- %53 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %17, align 8 ; [#uses=2]
- %54 = ptrtoint void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %53 to i32 ; [#uses=2]
- %55 = and i32 %54, 1 ; [#uses=1]
- %toBool.i.i = icmp eq i32 %55, 0 ; [#uses=1]
- %.pre.i.i = load %struct.btConvexShape** %.phi.trans.insert.i.i, align 8 ; [#uses=2]
- %.pre5.i.i = load i32* %.phi.trans.insert4.i.i, align 4 ; [#uses=2]
- br i1 %toBool.i.i, label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit, label %bb.i.i
-
-bb.i.i: ; preds = %bb1
- %56 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %57 = add i32 %56, %.pre5.i.i ; [#uses=1]
- %58 = inttoptr i32 %57 to %struct.btConvexShape* ; [#uses=1]
- %59 = getelementptr inbounds %struct.btConvexShape* %58, i32 0, i32 0, i32 0 ; [#uses=1]
- %60 = load i32 (...)*** %59, align 4 ; [#uses=1]
- %61 = ptrtoint i32 (...)** %60 to i32 ; [#uses=1]
- %62 = add nsw i32 %54, -1 ; [#uses=1]
- %63 = add i32 %62, %61 ; [#uses=1]
- %64 = inttoptr i32 %63 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** ; [#uses=1]
- %iftmp.134.0.pre.i.i = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %64, align 4 ; [#uses=1]
- br label %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit
-
-_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit: ; preds = %bb.i.i, %bb1
- %iftmp.134.0.i.i = phi void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* [ %iftmp.134.0.pre.i.i, %bb.i.i ], [ %53, %bb1 ] ; [#uses=1]
- %65 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %66 = add i32 %65, %.pre5.i.i ; [#uses=1]
- %67 = inttoptr i32 %66 to %struct.btConvexShape* ; [#uses=1]
- call void %iftmp.134.0.i.i(%struct.btQuadWord* noalias sret %2, %struct.btConvexShape* %67, %struct.btQuadWord* %52)
- %68 = load float* %18, align 8 ; [#uses=1]
- %69 = fmul float %68, %50 ; [#uses=1]
- %70 = load float* %19, align 4 ; [#uses=1]
- %71 = fmul float %70, %50 ; [#uses=1]
- %72 = load float* %20, align 8 ; [#uses=1]
- %73 = fmul float %72, %50 ; [#uses=1]
- %74 = fadd float %w0.0.0.050, %73 ; [#uses=2]
- %75 = fadd float %w0.0.1.051, %71 ; [#uses=2]
- %76 = fadd float %w0.0.2.052, %69 ; [#uses=2]
- %77 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %12, align 4 ; [#uses=1]
- %scevgep68 = getelementptr %"struct.gjkepa2_impl::GJK::sSimplex"* %77, i32 0, i32 0, i32 %i.056 ; [#uses=1]
- %78 = load %struct.GIM_AABB** %scevgep68, align 4 ; [#uses=3]
- %79 = getelementptr inbounds %struct.GIM_AABB* %78, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fsub float -0.000000e+00, %80 ; [#uses=3]
- %82 = getelementptr inbounds %struct.GIM_AABB* %78, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fsub float -0.000000e+00, %83 ; [#uses=3]
- %85 = getelementptr inbounds %struct.GIM_AABB* %78, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = fsub float -0.000000e+00, %86 ; [#uses=3]
- %88 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %17, align 8 ; [#uses=2]
- %89 = ptrtoint void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %88 to i32 ; [#uses=2]
- %90 = and i32 %89, 1 ; [#uses=1]
- %toBool.i = icmp eq i32 %90, 0 ; [#uses=1]
- %.pre.i = load %struct.btConvexShape** %.phi.trans.insert.i, align 4 ; [#uses=2]
- %.pre5.i = load i32* %.phi.trans.insert4.i.i, align 4 ; [#uses=2]
- br i1 %toBool.i, label %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit
- %91 = ptrtoint %struct.btConvexShape* %.pre.i to i32 ; [#uses=1]
- %92 = add i32 %91, %.pre5.i ; [#uses=1]
- %93 = inttoptr i32 %92 to %struct.btConvexShape* ; [#uses=1]
- %94 = getelementptr inbounds %struct.btConvexShape* %93, i32 0, i32 0, i32 0 ; [#uses=1]
- %95 = load i32 (...)*** %94, align 4 ; [#uses=1]
- %96 = ptrtoint i32 (...)** %95 to i32 ; [#uses=1]
- %97 = add nsw i32 %89, -1 ; [#uses=1]
- %98 = add i32 %97, %96 ; [#uses=1]
- %99 = inttoptr i32 %98 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** ; [#uses=1]
- %iftmp.135.0.pre.i = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %99, align 4 ; [#uses=1]
- br label %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit
-
-_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit: ; preds = %bb.i, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit
- %iftmp.135.0.i = phi void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* [ %iftmp.135.0.pre.i, %bb.i ], [ %88, %_ZNK12gjkepa2_impl13MinkowskiDiff7SupportERK9btVector3j.exit ] ; [#uses=1]
- %100 = load float* %21, align 8 ; [#uses=1]
- %101 = fmul float %100, %87 ; [#uses=1]
- %102 = load float* %22, align 4 ; [#uses=1]
- %103 = fmul float %102, %84 ; [#uses=1]
- %104 = fadd float %101, %103 ; [#uses=1]
- %105 = load float* %23, align 8 ; [#uses=1]
- %106 = fmul float %105, %81 ; [#uses=1]
- %107 = fadd float %104, %106 ; [#uses=1]
- %108 = load float* %24, align 8 ; [#uses=1]
- %109 = fmul float %108, %87 ; [#uses=1]
- %110 = load float* %25, align 4 ; [#uses=1]
- %111 = fmul float %110, %84 ; [#uses=1]
- %112 = fadd float %109, %111 ; [#uses=1]
- %113 = load float* %26, align 8 ; [#uses=1]
- %114 = fmul float %113, %81 ; [#uses=1]
- %115 = fadd float %112, %114 ; [#uses=1]
- %116 = load float* %27, align 8 ; [#uses=1]
- %117 = fmul float %116, %87 ; [#uses=1]
- %118 = load float* %28, align 4 ; [#uses=1]
- %119 = fmul float %118, %84 ; [#uses=1]
- %120 = fadd float %117, %119 ; [#uses=1]
- %121 = load float* %29, align 8 ; [#uses=1]
- %122 = fmul float %121, %81 ; [#uses=1]
- %123 = fadd float %120, %122 ; [#uses=1]
- store float %123, float* %30, align 8
- store float %115, float* %31, align 4
- store float %107, float* %32, align 8
- store float 0.000000e+00, float* %33, align 4
- %124 = ptrtoint %struct.btConvexShape* %.pre.i to i32 ; [#uses=1]
- %125 = add i32 %124, %.pre5.i ; [#uses=1]
- %126 = inttoptr i32 %125 to %struct.btConvexShape* ; [#uses=1]
- call void %iftmp.135.0.i(%struct.btQuadWord* noalias sret %1, %struct.btConvexShape* %126, %struct.btQuadWord* %0)
- %127 = load float* %34, align 8 ; [#uses=1]
- %128 = load float* %35, align 8 ; [#uses=3]
- %129 = fmul float %127, %128 ; [#uses=1]
- %130 = load float* %36, align 4 ; [#uses=1]
- %131 = load float* %37, align 4 ; [#uses=3]
- %132 = fmul float %130, %131 ; [#uses=1]
- %133 = fadd float %129, %132 ; [#uses=1]
- %134 = load float* %38, align 8 ; [#uses=1]
- %135 = load float* %39, align 8 ; [#uses=3]
- %136 = fmul float %134, %135 ; [#uses=1]
- %137 = fadd float %133, %136 ; [#uses=1]
- %138 = load float* %40, align 8 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = load float* %41, align 8 ; [#uses=1]
- %141 = fmul float %140, %128 ; [#uses=1]
- %142 = load float* %42, align 4 ; [#uses=1]
- %143 = fmul float %142, %131 ; [#uses=1]
- %144 = fadd float %141, %143 ; [#uses=1]
- %145 = load float* %43, align 8 ; [#uses=1]
- %146 = fmul float %145, %135 ; [#uses=1]
- %147 = fadd float %144, %146 ; [#uses=1]
- %148 = load float* %44, align 4 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = load float* %45, align 8 ; [#uses=1]
- %151 = fmul float %150, %128 ; [#uses=1]
- %152 = load float* %46, align 4 ; [#uses=1]
- %153 = fmul float %152, %131 ; [#uses=1]
- %154 = fadd float %151, %153 ; [#uses=1]
- %155 = load float* %47, align 8 ; [#uses=1]
- %156 = fmul float %155, %135 ; [#uses=1]
- %157 = fadd float %154, %156 ; [#uses=1]
- %158 = load float* %48, align 8 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fmul float %139, %50 ; [#uses=1]
- %161 = fmul float %149, %50 ; [#uses=1]
- %162 = fmul float %159, %50 ; [#uses=1]
- %163 = fadd float %w1.0.0.053, %162 ; [#uses=2]
- %164 = fadd float %w1.0.1.054, %161 ; [#uses=2]
- %165 = fadd float %w1.0.2.055, %160 ; [#uses=2]
- %166 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %12, align 4 ; [#uses=2]
- %167 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %166, i32 0, i32 2 ; [#uses=1]
- %168 = load i32* %167, align 4 ; [#uses=1]
- %169 = icmp ugt i32 %168, %tmp ; [#uses=1]
- br i1 %169, label %bb1, label %bb3
-
-bb3: ; preds = %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit, %bb2.preheader
- %w1.0.2.0.lcssa = phi float [ 0.000000e+00, %bb2.preheader ], [ %165, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=4]
- %w1.0.1.0.lcssa = phi float [ 0.000000e+00, %bb2.preheader ], [ %164, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=4]
- %w1.0.0.0.lcssa = phi float [ 0.000000e+00, %bb2.preheader ], [ %163, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=4]
- %w0.0.2.0.lcssa = phi float [ 0.000000e+00, %bb2.preheader ], [ %76, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=4]
- %w0.0.1.0.lcssa = phi float [ 0.000000e+00, %bb2.preheader ], [ %75, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=4]
- %w0.0.0.0.lcssa = phi float [ 0.000000e+00, %bb2.preheader ], [ %74, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support1ERK9btVector3.exit ] ; [#uses=4]
- %170 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = fmul float %171, %w0.0.0.0.lcssa ; [#uses=1]
- %173 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %174 = load float* %173, align 4 ; [#uses=1]
- %175 = fmul float %174, %w0.0.1.0.lcssa ; [#uses=1]
- %176 = fadd float %172, %175 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %178 = load float* %177, align 4 ; [#uses=1]
- %179 = fmul float %178, %w0.0.2.0.lcssa ; [#uses=1]
- %180 = fadd float %176, %179 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %182 = load float* %181, align 4 ; [#uses=1]
- %183 = fadd float %180, %182 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %185 = load float* %184, align 4 ; [#uses=1]
- %186 = fmul float %185, %w0.0.0.0.lcssa ; [#uses=1]
- %187 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %188 = load float* %187, align 4 ; [#uses=1]
- %189 = fmul float %188, %w0.0.1.0.lcssa ; [#uses=1]
- %190 = fadd float %186, %189 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %192 = load float* %191, align 4 ; [#uses=1]
- %193 = fmul float %192, %w0.0.2.0.lcssa ; [#uses=1]
- %194 = fadd float %190, %193 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %196 = load float* %195, align 4 ; [#uses=1]
- %197 = fadd float %194, %196 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %199 = load float* %198, align 4 ; [#uses=1]
- %200 = fmul float %199, %w0.0.0.0.lcssa ; [#uses=1]
- %201 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %202 = load float* %201, align 4 ; [#uses=1]
- %203 = fmul float %202, %w0.0.1.0.lcssa ; [#uses=1]
- %204 = fadd float %200, %203 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %206 = load float* %205, align 4 ; [#uses=1]
- %207 = fmul float %206, %w0.0.2.0.lcssa ; [#uses=1]
- %208 = fadd float %204, %207 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %210 = load float* %209, align 4 ; [#uses=1]
- %211 = fadd float %208, %210 ; [#uses=1]
- %212 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %211, float* %212, align 4
- %213 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %197, float* %213, align 4
- %214 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %183, float* %214, align 4
- %215 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %215, align 4
- %216 = load float* %170, align 4 ; [#uses=1]
- %217 = fmul float %216, %w1.0.0.0.lcssa ; [#uses=1]
- %218 = load float* %173, align 4 ; [#uses=1]
- %219 = fmul float %218, %w1.0.1.0.lcssa ; [#uses=1]
- %220 = fadd float %217, %219 ; [#uses=1]
- %221 = load float* %177, align 4 ; [#uses=1]
- %222 = fmul float %221, %w1.0.2.0.lcssa ; [#uses=1]
- %223 = fadd float %220, %222 ; [#uses=1]
- %224 = load float* %181, align 4 ; [#uses=1]
- %225 = fadd float %223, %224 ; [#uses=1]
- %226 = load float* %184, align 4 ; [#uses=1]
- %227 = fmul float %226, %w1.0.0.0.lcssa ; [#uses=1]
- %228 = load float* %187, align 4 ; [#uses=1]
- %229 = fmul float %228, %w1.0.1.0.lcssa ; [#uses=1]
- %230 = fadd float %227, %229 ; [#uses=1]
- %231 = load float* %191, align 4 ; [#uses=1]
- %232 = fmul float %231, %w1.0.2.0.lcssa ; [#uses=1]
- %233 = fadd float %230, %232 ; [#uses=1]
- %234 = load float* %195, align 4 ; [#uses=1]
- %235 = fadd float %233, %234 ; [#uses=1]
- %236 = load float* %198, align 4 ; [#uses=1]
- %237 = fmul float %236, %w1.0.0.0.lcssa ; [#uses=1]
- %238 = load float* %201, align 4 ; [#uses=1]
- %239 = fmul float %238, %w1.0.1.0.lcssa ; [#uses=1]
- %240 = fadd float %237, %239 ; [#uses=1]
- %241 = load float* %205, align 4 ; [#uses=1]
- %242 = fmul float %241, %w1.0.2.0.lcssa ; [#uses=1]
- %243 = fadd float %240, %242 ; [#uses=1]
- %244 = load float* %209, align 4 ; [#uses=1]
- %245 = fadd float %243, %244 ; [#uses=1]
- %246 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %245, float* %246, align 4
- %247 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %235, float* %247, align 4
- %248 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %225, float* %248, align 4
- %249 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %249, align 4
- %250 = fsub float %w0.0.2.0.lcssa, %w1.0.2.0.lcssa ; [#uses=4]
- %251 = fsub float %w0.0.1.0.lcssa, %w1.0.1.0.lcssa ; [#uses=4]
- %252 = fsub float %w0.0.0.0.lcssa, %w1.0.0.0.lcssa ; [#uses=4]
- %253 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float %252, float* %253, align 4
- %254 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float %251, float* %254, align 4
- %255 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float %250, float* %255, align 4
- %256 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %256, align 4
- %257 = fmul float %252, %252 ; [#uses=1]
- %258 = fmul float %251, %251 ; [#uses=1]
- %259 = fadd float %257, %258 ; [#uses=1]
- %260 = fmul float %250, %250 ; [#uses=1]
- %261 = fadd float %259, %260 ; [#uses=1]
- %262 = call float @sqrtf(float %261) nounwind readonly ; [#uses=3]
- %263 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 3 ; [#uses=1]
- store float %262, float* %263, align 4
- %264 = fcmp ogt float %262, 0x3F1A36E2E0000000 ; [#uses=1]
- %iftmp.232.0 = select i1 %264, float %262, float 1.000000e+00 ; [#uses=1]
- %265 = fdiv float 1.000000e+00, %iftmp.232.0 ; [#uses=3]
- %266 = fmul float %252, %265 ; [#uses=1]
- store float %266, float* %253, align 4
- %267 = fmul float %251, %265 ; [#uses=1]
- store float %267, float* %254, align 4
- %268 = fmul float %250, %265 ; [#uses=1]
- store float %268, float* %255, align 4
- ret i8 1
-
-bb11: ; preds = %entry
- br label %bb12
-
-bb12: ; preds = %bb11, %entry
- %iftmp.233.0 = phi i32 [ 2, %bb11 ], [ 1, %entry ] ; [#uses=1]
- %269 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 0 ; [#uses=1]
- store i32 %iftmp.233.0, i32* %269, align 4
- ret i8 0
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN15btGjkEpaSolver214SignedDistanceEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsE(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* nocapture %wtrs1, %struct.btQuadWord* nocapture %guess, %"struct.btGjkEpaSolver2::sResults"* nocapture %results) align 2 {
-entry:
- %0 = tail call zeroext i8 @_ZN15btGjkEpaSolver28DistanceEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsE(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* %wtrs1, %struct.btQuadWord* %guess, %"struct.btGjkEpaSolver2::sResults"* %results) ; [#uses=1]
- %toBoolnot = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb4
-
-bb: ; preds = %entry
- %1 = tail call zeroext i8 @_ZN15btGjkEpaSolver211PenetrationEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsEb(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %shape1, %struct.btTransform* %wtrs1, %struct.btQuadWord* %guess, %"struct.btGjkEpaSolver2::sResults"* %results, i8 zeroext 0) ; [#uses=1]
- ret i8 %1
-
-bb4: ; preds = %entry
- ret i8 1
-}
-
-; [#uses=0]
-define float @_ZN15btGjkEpaSolver214SignedDistanceERK9btVector3fPK13btConvexShapeRK11btTransformRNS_8sResultsE(%struct.btQuadWord* nocapture %position, float %margin, %struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %"struct.btGjkEpaSolver2::sResults"* %results) align 2 {
-invcont2:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %shape = alloca %"struct.gjkepa2_impl::MinkowskiDiff", align 8 ; [#uses=27]
- %shape1 = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=6]
- %wtrs1 = alloca %struct.btTransform, align 8 ; [#uses=18]
- %gjk = alloca %"struct.gjkepa2_impl::GJK", align 8 ; [#uses=11]
- %4 = getelementptr inbounds %struct.btPolyhedralConvexShape* %shape1, i32 0, i32 0 ; [#uses=1]
- call void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %4)
- %5 = getelementptr inbounds %struct.btPolyhedralConvexShape* %shape1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %5, align 8
- %6 = getelementptr inbounds %struct.btPolyhedralConvexShape* %shape1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 8, i32* %6, align 4
- %7 = getelementptr inbounds %struct.btPolyhedralConvexShape* %shape1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %margin, float* %7, align 4
- %8 = getelementptr inbounds %struct.btPolyhedralConvexShape* %shape1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %margin, float* %8, align 4
- %9 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %9, align 8
- %10 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 8
- %12 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 8
- %14 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 8
- %16 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 8
- %18 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %19, align 8
- %20 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %position, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 8
- %24 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %position, i32 0, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %position, i32 0, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 8
- %30 = getelementptr inbounds %struct.btTransform* %wtrs1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %position, i32 0, i32 0, i32 3 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btPolyhedralConvexShape* %shape1, i32 0, i32 0, i32 0 ; [#uses=5]
- call fastcc void @_ZN12gjkepa2_implL10InitializeEPK13btConvexShapeRK11btTransformS2_S5_RN15btGjkEpaSolver28sResultsERNS_13MinkowskiDiffEb(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %33, %struct.btTransform* %wtrs1, %"struct.btGjkEpaSolver2::sResults"* %results, %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i8 zeroext 0)
- %34 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 8
- %35 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 8
- %37 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 9 ; [#uses=1]
- store i32 2, i32* %39, align 8
- %40 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %40, align 8
- %41 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 8
- %42 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %42, align 8
- %43 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %43, align 4
- %44 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %44, align 8
- %45 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- %46 = invoke i32 @_ZN12gjkepa2_impl3GJK8EvaluateERKNS_13MinkowskiDiffERK9btVector3(%"struct.gjkepa2_impl::GJK"* %gjk, %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, %struct.btQuadWord* %3)
- to label %invcont3 unwind label %lpad ; [#uses=1]
-
-invcont3: ; preds = %invcont2
- switch i32 %46, label %bb31 [
- i32 0, label %bb8.preheader
- i32 1, label %bb15
- ]
-
-bb8.preheader: ; preds = %invcont3
- %47 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 8 ; [#uses=2]
- %48 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 0 ; [#uses=2]
- %.phi.trans.insert.i.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 0, i32 0 ; [#uses=1]
- %.phi.trans.insert4.i.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 3, i32 1 ; [#uses=2]
- %49 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %.phi.trans.insert.i = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 0, i32 1 ; [#uses=1]
- %52 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %53 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %55 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %56 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %65 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %67 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %69 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %73 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %74 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %75 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %76 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %77 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %79 = getelementptr inbounds %"struct.gjkepa2_impl::MinkowskiDiff"* %shape, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- br label %bb8
-
-bb5: ; preds = %bb8
- %scevgep93 = getelementptr %"struct.gjkepa2_impl::GJK::sSimplex"* %198, i32 0, i32 1, i32 %197 ; [#uses=1]
- %80 = load float* %scevgep93, align 4 ; [#uses=6]
- %scevgep92 = getelementptr %"struct.gjkepa2_impl::GJK::sSimplex"* %198, i32 0, i32 0, i32 %197 ; [#uses=1]
- %81 = load %struct.GIM_AABB** %scevgep92, align 4 ; [#uses=1]
- %82 = getelementptr inbounds %struct.GIM_AABB* %81, i32 0, i32 0 ; [#uses=1]
- %83 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %48, align 8 ; [#uses=2]
- %84 = ptrtoint void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %83 to i32 ; [#uses=2]
- %85 = and i32 %84, 1 ; [#uses=1]
- %toBool.i.i = icmp eq i32 %85, 0 ; [#uses=1]
- %.pre.i.i = load %struct.btConvexShape** %.phi.trans.insert.i.i, align 8 ; [#uses=2]
- %.pre5.i.i = load i32* %.phi.trans.insert4.i.i, align 4 ; [#uses=2]
- br i1 %toBool.i.i, label %_ZNK12gjkepa2_impl13MinkowskiDiff8Support0ERK9btVector3.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb5
- %86 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %87 = add i32 %86, %.pre5.i.i ; [#uses=1]
- %88 = inttoptr i32 %87 to %struct.btConvexShape* ; [#uses=1]
- %89 = getelementptr inbounds %struct.btConvexShape* %88, i32 0, i32 0, i32 0 ; [#uses=1]
- %90 = load i32 (...)*** %89, align 4 ; [#uses=1]
- %91 = ptrtoint i32 (...)** %90 to i32 ; [#uses=1]
- %92 = add nsw i32 %84, -1 ; [#uses=1]
- %93 = add i32 %92, %91 ; [#uses=1]
- %94 = inttoptr i32 %93 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** ; [#uses=1]
- %iftmp.134.0.pre.i.i = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %94, align 4 ; [#uses=1]
- br label %_ZNK12gjkepa2_impl13MinkowskiDiff8Support0ERK9btVector3.exit.i
-
-_ZNK12gjkepa2_impl13MinkowskiDiff8Support0ERK9btVector3.exit.i: ; preds = %bb.i.i, %bb5
- %iftmp.134.0.i.i = phi void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* [ %iftmp.134.0.pre.i.i, %bb.i.i ], [ %83, %bb5 ] ; [#uses=1]
- %95 = ptrtoint %struct.btConvexShape* %.pre.i.i to i32 ; [#uses=1]
- %96 = add i32 %95, %.pre5.i.i ; [#uses=1]
- %97 = inttoptr i32 %96 to %struct.btConvexShape* ; [#uses=1]
- invoke void %iftmp.134.0.i.i(%struct.btQuadWord* noalias sret %2, %struct.btConvexShape* %97, %struct.btQuadWord* %82)
- to label %invcont6 unwind label %lpad
-
-invcont6: ; preds = %_ZNK12gjkepa2_impl13MinkowskiDiff8Support0ERK9btVector3.exit.i
- %98 = load float* %49, align 8 ; [#uses=1]
- %99 = fmul float %98, %80 ; [#uses=1]
- %100 = load float* %50, align 4 ; [#uses=1]
- %101 = fmul float %100, %80 ; [#uses=1]
- %102 = load float* %51, align 8 ; [#uses=1]
- %103 = fmul float %102, %80 ; [#uses=1]
- %104 = fadd float %w0.0.0.0, %103 ; [#uses=1]
- %105 = fadd float %w0.0.1.0, %101 ; [#uses=1]
- %106 = fadd float %w0.0.2.0, %99 ; [#uses=1]
- %107 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %47, align 4 ; [#uses=1]
- %scevgep = getelementptr %"struct.gjkepa2_impl::GJK::sSimplex"* %107, i32 0, i32 0, i32 %197 ; [#uses=1]
- %108 = load %struct.GIM_AABB** %scevgep, align 4 ; [#uses=3]
- %109 = getelementptr inbounds %struct.GIM_AABB* %108, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- %111 = fsub float -0.000000e+00, %110 ; [#uses=3]
- %112 = getelementptr inbounds %struct.GIM_AABB* %108, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %113 = load float* %112, align 4 ; [#uses=1]
- %114 = fsub float -0.000000e+00, %113 ; [#uses=3]
- %115 = getelementptr inbounds %struct.GIM_AABB* %108, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=1]
- %117 = fsub float -0.000000e+00, %116 ; [#uses=3]
- %118 = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %48, align 8 ; [#uses=2]
- %119 = ptrtoint void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* %118 to i32 ; [#uses=2]
- %120 = and i32 %119, 1 ; [#uses=1]
- %toBool.i = icmp eq i32 %120, 0 ; [#uses=1]
- %.pre.i = load %struct.btConvexShape** %.phi.trans.insert.i, align 4 ; [#uses=2]
- %.pre5.i = load i32* %.phi.trans.insert4.i.i, align 4 ; [#uses=2]
- br i1 %toBool.i, label %bb2.i, label %bb.i
-
-bb.i: ; preds = %invcont6
- %121 = ptrtoint %struct.btConvexShape* %.pre.i to i32 ; [#uses=1]
- %122 = add i32 %121, %.pre5.i ; [#uses=1]
- %123 = inttoptr i32 %122 to %struct.btConvexShape* ; [#uses=1]
- %124 = getelementptr inbounds %struct.btConvexShape* %123, i32 0, i32 0, i32 0 ; [#uses=1]
- %125 = load i32 (...)*** %124, align 4 ; [#uses=1]
- %126 = ptrtoint i32 (...)** %125 to i32 ; [#uses=1]
- %127 = add nsw i32 %119, -1 ; [#uses=1]
- %128 = add i32 %127, %126 ; [#uses=1]
- %129 = inttoptr i32 %128 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** ; [#uses=1]
- %iftmp.135.0.pre.i = load void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)** %129, align 4 ; [#uses=1]
- br label %bb2.i
-
-bb2.i: ; preds = %bb.i, %invcont6
- %iftmp.135.0.i = phi void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* [ %iftmp.135.0.pre.i, %bb.i ], [ %118, %invcont6 ] ; [#uses=1]
- %130 = load float* %52, align 8 ; [#uses=1]
- %131 = fmul float %130, %117 ; [#uses=1]
- %132 = load float* %53, align 4 ; [#uses=1]
- %133 = fmul float %132, %114 ; [#uses=1]
- %134 = fadd float %131, %133 ; [#uses=1]
- %135 = load float* %54, align 8 ; [#uses=1]
- %136 = fmul float %135, %111 ; [#uses=1]
- %137 = fadd float %134, %136 ; [#uses=1]
- %138 = load float* %55, align 8 ; [#uses=1]
- %139 = fmul float %138, %117 ; [#uses=1]
- %140 = load float* %56, align 4 ; [#uses=1]
- %141 = fmul float %140, %114 ; [#uses=1]
- %142 = fadd float %139, %141 ; [#uses=1]
- %143 = load float* %57, align 8 ; [#uses=1]
- %144 = fmul float %143, %111 ; [#uses=1]
- %145 = fadd float %142, %144 ; [#uses=1]
- %146 = load float* %58, align 8 ; [#uses=1]
- %147 = fmul float %146, %117 ; [#uses=1]
- %148 = load float* %59, align 4 ; [#uses=1]
- %149 = fmul float %148, %114 ; [#uses=1]
- %150 = fadd float %147, %149 ; [#uses=1]
- %151 = load float* %60, align 8 ; [#uses=1]
- %152 = fmul float %151, %111 ; [#uses=1]
- %153 = fadd float %150, %152 ; [#uses=1]
- store float %153, float* %61, align 8
- store float %145, float* %62, align 4
- store float %137, float* %63, align 8
- store float 0.000000e+00, float* %64, align 4
- %154 = ptrtoint %struct.btConvexShape* %.pre.i to i32 ; [#uses=1]
- %155 = add i32 %154, %.pre5.i ; [#uses=1]
- %156 = inttoptr i32 %155 to %struct.btConvexShape* ; [#uses=1]
- invoke void %iftmp.135.0.i(%struct.btQuadWord* noalias sret %1, %struct.btConvexShape* %156, %struct.btQuadWord* %0)
- to label %invcont7 unwind label %lpad
-
-invcont7: ; preds = %bb2.i
- %157 = load float* %65, align 8 ; [#uses=1]
- %158 = load float* %66, align 8 ; [#uses=3]
- %159 = fmul float %157, %158 ; [#uses=1]
- %160 = load float* %67, align 4 ; [#uses=1]
- %161 = load float* %68, align 4 ; [#uses=3]
- %162 = fmul float %160, %161 ; [#uses=1]
- %163 = fadd float %159, %162 ; [#uses=1]
- %164 = load float* %69, align 8 ; [#uses=1]
- %165 = load float* %70, align 8 ; [#uses=3]
- %166 = fmul float %164, %165 ; [#uses=1]
- %167 = fadd float %163, %166 ; [#uses=1]
- %168 = load float* %71, align 8 ; [#uses=1]
- %169 = fadd float %167, %168 ; [#uses=1]
- %170 = load float* %72, align 8 ; [#uses=1]
- %171 = fmul float %170, %158 ; [#uses=1]
- %172 = load float* %73, align 4 ; [#uses=1]
- %173 = fmul float %172, %161 ; [#uses=1]
- %174 = fadd float %171, %173 ; [#uses=1]
- %175 = load float* %74, align 8 ; [#uses=1]
- %176 = fmul float %175, %165 ; [#uses=1]
- %177 = fadd float %174, %176 ; [#uses=1]
- %178 = load float* %75, align 4 ; [#uses=1]
- %179 = fadd float %177, %178 ; [#uses=1]
- %180 = load float* %76, align 8 ; [#uses=1]
- %181 = fmul float %180, %158 ; [#uses=1]
- %182 = load float* %77, align 4 ; [#uses=1]
- %183 = fmul float %182, %161 ; [#uses=1]
- %184 = fadd float %181, %183 ; [#uses=1]
- %185 = load float* %78, align 8 ; [#uses=1]
- %186 = fmul float %185, %165 ; [#uses=1]
- %187 = fadd float %184, %186 ; [#uses=1]
- %188 = load float* %79, align 8 ; [#uses=1]
- %189 = fadd float %187, %188 ; [#uses=1]
- %190 = fmul float %169, %80 ; [#uses=1]
- %191 = fmul float %179, %80 ; [#uses=1]
- %192 = fmul float %189, %80 ; [#uses=1]
- %193 = fadd float %w1.0.0.0, %192 ; [#uses=1]
- %194 = fadd float %w1.0.1.0, %191 ; [#uses=1]
- %195 = fadd float %w1.0.2.0, %190 ; [#uses=1]
- %196 = add i32 %197, 1 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %invcont7, %bb8.preheader
- %w0.0.0.0 = phi float [ %104, %invcont7 ], [ 0.000000e+00, %bb8.preheader ] ; [#uses=4]
- %w0.0.1.0 = phi float [ %105, %invcont7 ], [ 0.000000e+00, %bb8.preheader ] ; [#uses=4]
- %w0.0.2.0 = phi float [ %106, %invcont7 ], [ 0.000000e+00, %bb8.preheader ] ; [#uses=4]
- %w1.0.0.0 = phi float [ %193, %invcont7 ], [ 0.000000e+00, %bb8.preheader ] ; [#uses=4]
- %w1.0.1.0 = phi float [ %194, %invcont7 ], [ 0.000000e+00, %bb8.preheader ] ; [#uses=4]
- %w1.0.2.0 = phi float [ %195, %invcont7 ], [ 0.000000e+00, %bb8.preheader ] ; [#uses=4]
- %197 = phi i32 [ %196, %invcont7 ], [ 0, %bb8.preheader ] ; [#uses=5]
- %198 = load %"struct.gjkepa2_impl::GJK::sSimplex"** %47, align 4 ; [#uses=3]
- %199 = getelementptr inbounds %"struct.gjkepa2_impl::GJK::sSimplex"* %198, i32 0, i32 2 ; [#uses=1]
- %200 = load i32* %199, align 4 ; [#uses=1]
- %201 = icmp ugt i32 %200, %197 ; [#uses=1]
- br i1 %201, label %bb5, label %bb9
-
-bb9: ; preds = %bb8
- %202 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %203 = load float* %202, align 4 ; [#uses=1]
- %204 = fmul float %203, %w0.0.0.0 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %206 = load float* %205, align 4 ; [#uses=1]
- %207 = fmul float %206, %w0.0.1.0 ; [#uses=1]
- %208 = fadd float %204, %207 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %210 = load float* %209, align 4 ; [#uses=1]
- %211 = fmul float %210, %w0.0.2.0 ; [#uses=1]
- %212 = fadd float %208, %211 ; [#uses=1]
- %213 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %214 = load float* %213, align 4 ; [#uses=1]
- %215 = fadd float %212, %214 ; [#uses=2]
- %216 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %217 = load float* %216, align 4 ; [#uses=1]
- %218 = fmul float %217, %w0.0.0.0 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %220 = load float* %219, align 4 ; [#uses=1]
- %221 = fmul float %220, %w0.0.1.0 ; [#uses=1]
- %222 = fadd float %218, %221 ; [#uses=1]
- %223 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %224 = load float* %223, align 4 ; [#uses=1]
- %225 = fmul float %224, %w0.0.2.0 ; [#uses=1]
- %226 = fadd float %222, %225 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %228 = load float* %227, align 4 ; [#uses=1]
- %229 = fadd float %226, %228 ; [#uses=2]
- %230 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %231 = load float* %230, align 4 ; [#uses=1]
- %232 = fmul float %231, %w0.0.0.0 ; [#uses=1]
- %233 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %234 = load float* %233, align 4 ; [#uses=1]
- %235 = fmul float %234, %w0.0.1.0 ; [#uses=1]
- %236 = fadd float %232, %235 ; [#uses=1]
- %237 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %238 = load float* %237, align 4 ; [#uses=1]
- %239 = fmul float %238, %w0.0.2.0 ; [#uses=1]
- %240 = fadd float %236, %239 ; [#uses=1]
- %241 = getelementptr inbounds %struct.btTransform* %wtrs0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %242 = load float* %241, align 4 ; [#uses=1]
- %243 = fadd float %240, %242 ; [#uses=2]
- %244 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %243, float* %244, align 4
- %245 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %229, float* %245, align 4
- %246 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %215, float* %246, align 4
- %247 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %247, align 4
- %248 = load float* %202, align 4 ; [#uses=1]
- %249 = fmul float %248, %w1.0.0.0 ; [#uses=1]
- %250 = load float* %205, align 4 ; [#uses=1]
- %251 = fmul float %250, %w1.0.1.0 ; [#uses=1]
- %252 = fadd float %249, %251 ; [#uses=1]
- %253 = load float* %209, align 4 ; [#uses=1]
- %254 = fmul float %253, %w1.0.2.0 ; [#uses=1]
- %255 = fadd float %252, %254 ; [#uses=1]
- %256 = load float* %213, align 4 ; [#uses=1]
- %257 = fadd float %255, %256 ; [#uses=2]
- %258 = load float* %216, align 4 ; [#uses=1]
- %259 = fmul float %258, %w1.0.0.0 ; [#uses=1]
- %260 = load float* %219, align 4 ; [#uses=1]
- %261 = fmul float %260, %w1.0.1.0 ; [#uses=1]
- %262 = fadd float %259, %261 ; [#uses=1]
- %263 = load float* %223, align 4 ; [#uses=1]
- %264 = fmul float %263, %w1.0.2.0 ; [#uses=1]
- %265 = fadd float %262, %264 ; [#uses=1]
- %266 = load float* %227, align 4 ; [#uses=1]
- %267 = fadd float %265, %266 ; [#uses=2]
- %268 = load float* %230, align 4 ; [#uses=1]
- %269 = fmul float %268, %w1.0.0.0 ; [#uses=1]
- %270 = load float* %233, align 4 ; [#uses=1]
- %271 = fmul float %270, %w1.0.1.0 ; [#uses=1]
- %272 = fadd float %269, %271 ; [#uses=1]
- %273 = load float* %237, align 4 ; [#uses=1]
- %274 = fmul float %273, %w1.0.2.0 ; [#uses=1]
- %275 = fadd float %272, %274 ; [#uses=1]
- %276 = load float* %241, align 4 ; [#uses=1]
- %277 = fadd float %275, %276 ; [#uses=2]
- %278 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %277, float* %278, align 4
- %279 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %267, float* %279, align 4
- %280 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %257, float* %280, align 4
- %281 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %281, align 4
- %282 = fsub float %257, %215 ; [#uses=3]
- %283 = fsub float %267, %229 ; [#uses=3]
- %284 = fsub float %277, %243 ; [#uses=3]
- %285 = invoke float @_ZNK13btConvexShape19getMarginNonVirtualEv(%struct.btConvexShape* %shape0)
- to label %invcont11 unwind label %lpad ; [#uses=1]
-
-invcont11: ; preds = %bb9
- %286 = invoke float @_ZNK13btConvexShape19getMarginNonVirtualEv(%struct.btConvexShape* %33)
- to label %invcont12 unwind label %lpad ; [#uses=1]
-
-invcont12: ; preds = %invcont11
- %287 = fadd float %285, %286 ; [#uses=4]
- %288 = fmul float %284, %284 ; [#uses=1]
- %289 = fmul float %283, %283 ; [#uses=1]
- %290 = fadd float %288, %289 ; [#uses=1]
- %291 = fmul float %282, %282 ; [#uses=1]
- %292 = fadd float %290, %291 ; [#uses=1]
- %293 = call float @sqrtf(float %292) nounwind readonly ; [#uses=2]
- %294 = fdiv float 1.000000e+00, %293 ; [#uses=3]
- %295 = fmul float %282, %294 ; [#uses=2]
- %296 = fmul float %283, %294 ; [#uses=2]
- %297 = fmul float %284, %294 ; [#uses=2]
- %298 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %297, float* %298, align 4
- %299 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %296, float* %299, align 4
- %300 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %295, float* %300, align 4
- %301 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %301, align 4
- %302 = fmul float %295, %287 ; [#uses=1]
- %303 = fmul float %296, %287 ; [#uses=1]
- %304 = fmul float %297, %287 ; [#uses=1]
- %305 = load float* %244, align 4 ; [#uses=1]
- %306 = fadd float %305, %304 ; [#uses=1]
- store float %306, float* %244, align 4
- %307 = load float* %245, align 4 ; [#uses=1]
- %308 = fadd float %307, %303 ; [#uses=1]
- store float %308, float* %245, align 4
- %309 = load float* %246, align 4 ; [#uses=1]
- %310 = fadd float %309, %302 ; [#uses=1]
- store float %310, float* %246, align 4
- %311 = fsub float %293, %287 ; [#uses=1]
- br label %bb31
-
-bb15: ; preds = %invcont3
- %312 = getelementptr inbounds %"struct.gjkepa2_impl::GJK"* %gjk, i32 0, i32 1 ; [#uses=1]
- %313 = invoke zeroext i8 @_ZN15btGjkEpaSolver211PenetrationEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsEb(%struct.btConvexShape* %shape0, %struct.btTransform* %wtrs0, %struct.btConvexShape* %33, %struct.btTransform* %wtrs1, %struct.btQuadWord* %312, %"struct.btGjkEpaSolver2::sResults"* %results, i8 zeroext 1)
- to label %invcont16 unwind label %lpad ; [#uses=1]
-
-invcont16: ; preds = %bb15
- %toBool = icmp eq i8 %313, 0 ; [#uses=1]
- br i1 %toBool, label %bb31, label %bb17
-
-bb17: ; preds = %invcont16
- %314 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %315 = load float* %314, align 4 ; [#uses=1]
- %316 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %317 = load float* %316, align 4 ; [#uses=1]
- %318 = fsub float %315, %317 ; [#uses=3]
- %319 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %320 = load float* %319, align 4 ; [#uses=1]
- %321 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %322 = load float* %321, align 4 ; [#uses=1]
- %323 = fsub float %320, %322 ; [#uses=3]
- %324 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %325 = load float* %324, align 4 ; [#uses=1]
- %326 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %327 = load float* %326, align 4 ; [#uses=1]
- %328 = fsub float %325, %327 ; [#uses=3]
- %329 = fmul float %328, %328 ; [#uses=1]
- %330 = fmul float %323, %323 ; [#uses=1]
- %331 = fadd float %329, %330 ; [#uses=1]
- %332 = fmul float %318, %318 ; [#uses=1]
- %333 = fadd float %331, %332 ; [#uses=1]
- %334 = call float @sqrtf(float %333) nounwind readonly ; [#uses=3]
- %335 = fcmp ult float %334, 0x3E80000000000000 ; [#uses=1]
- br i1 %335, label %bb24, label %bb22
-
-bb22: ; preds = %bb17
- %336 = fdiv float 1.000000e+00, %334 ; [#uses=3]
- %337 = fmul float %318, %336 ; [#uses=1]
- %338 = fmul float %323, %336 ; [#uses=1]
- %339 = fmul float %328, %336 ; [#uses=1]
- %340 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %339, float* %340, align 4
- %341 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %338, float* %341, align 4
- %342 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %337, float* %342, align 4
- %343 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %343, align 4
- br label %bb24
-
-bb24: ; preds = %bb22, %bb17
- %344 = fsub float -0.000000e+00, %334 ; [#uses=1]
- br label %bb31
-
-invcont29: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb31: ; preds = %bb24, %invcont16, %invcont12, %invcont3
- %.0 = phi float [ %311, %invcont12 ], [ %344, %bb24 ], [ 0x47EFFFFFE0000000, %invcont3 ], [ 0x47EFFFFFE0000000, %invcont16 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %5, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %33)
- ret float %.0
-
-lpad: ; preds = %bb15, %invcont11, %bb9, %bb2.i, %_ZNK12gjkepa2_impl13MinkowskiDiff8Support0ERK9btVector3.exit.i, %invcont2
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select34 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %5, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %33)
- to label %invcont29 unwind label %lpad35
-
-lpad35: ; preds = %lpad
- %eh_ptr36 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select38 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr36, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN30btGjkEpaPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAlloc(%struct..0btMultiSapOverlapFilterCallback* nocapture %this, %struct.btVoronoiSimplexSolver* nocapture %simplexSolver, %struct.btConvexShape* %pConvexA, %struct.btConvexShape* %pConvexB, %struct.btTransform* %transformA, %struct.btTransform* %transformB, %struct.btQuadWord* nocapture %v, %struct.btQuadWord* nocapture %wWitnessOnA, %struct.btQuadWord* nocapture %wWitnessOnB, %struct.btActionInterface* nocapture %debugDraw, %struct.btStackAlloc* nocapture %stackAlloc) align 2 {
-entry:
- %guessVector = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %results = alloca %"struct.btGjkEpaSolver2::sResults", align 8 ; [#uses=26]
- %0 = getelementptr inbounds %struct.btTransform* %transformA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %transformB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %transformA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %transformB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %transformA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %transformB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %guessVector, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %14, float* %15, align 8
- %16 = getelementptr inbounds %struct.btQuadWord* %guessVector, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %9, float* %16, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %guessVector, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %4, float* %17, align 8
- %18 = getelementptr inbounds %struct.btQuadWord* %guessVector, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = call zeroext i8 @_ZN15btGjkEpaSolver211PenetrationEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsEb(%struct.btConvexShape* %pConvexA, %struct.btTransform* %transformA, %struct.btConvexShape* %pConvexB, %struct.btTransform* %transformB, %struct.btQuadWord* %guessVector, %"struct.btGjkEpaSolver2::sResults"* %results, i8 zeroext 1) ; [#uses=1]
- %toBool = icmp eq i8 %19, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %20 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- %30 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- %48 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 3 ; [#uses=1]
- %54 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- ret i8 1
-
-bb1: ; preds = %entry
- %56 = call zeroext i8 @_ZN15btGjkEpaSolver28DistanceEPK13btConvexShapeRK11btTransformS2_S5_RK9btVector3RNS_8sResultsE(%struct.btConvexShape* %pConvexA, %struct.btTransform* %transformA, %struct.btConvexShape* %pConvexB, %struct.btTransform* %transformB, %struct.btQuadWord* %guessVector, %"struct.btGjkEpaSolver2::sResults"* %results) ; [#uses=1]
- %toBool2 = icmp eq i8 %56, 0 ; [#uses=1]
- br i1 %toBool2, label %bb5, label %bb3
-
-bb3: ; preds = %bb1
- %57 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- %58 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- %61 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 4
- %63 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- %64 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- %67 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 4
- %69 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %70 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- %73 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 4
- %75 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- %76 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = getelementptr inbounds %struct.btQuadWord* %wWitnessOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- %79 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 4
- %81 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- %82 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- %85 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- store float %86, float* %84, align 4
- %87 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- %88 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 3 ; [#uses=1]
- %91 = getelementptr inbounds %"struct.btGjkEpaSolver2::sResults"* %results, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- store float %92, float* %90, align 4
- ret i8 0
-
-bb5: ; preds = %bb1
- ret i8 0
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btGjkEpaPenetrationDepthSolverD0Ev(%struct..0btMultiSapOverlapFilterCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0btMultiSapOverlapFilterCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btGjkEpaPenetrationDepthSolverD1Ev(%struct..0btMultiSapOverlapFilterCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btGjkPairDetectorC2EPK13btConvexShapeS2_iiffP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* nocapture %this, %struct.btConvexShape* %objectA, %struct.btConvexShape* %objectB, i32 %shapeTypeA, i32 %shapeTypeB, float %marginA, float %marginB, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %penetrationDepthSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btGjkPairDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %penetrationDepthSolver, %struct.btActionInterface** %5, align 4
- %6 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %6, align 4
- %7 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %objectA, %struct.btConvexShape** %7, align 4
- %8 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btConvexShape* %objectB, %struct.btConvexShape** %8, align 4
- %9 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %shapeTypeA, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %shapeTypeB, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 8 ; [#uses=1]
- store float %marginA, float* %11, align 4
- %12 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 9 ; [#uses=1]
- store float %marginB, float* %12, align 4
- %13 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 10 ; [#uses=1]
- store i8 0, i8* %13, align 4
- %14 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 12 ; [#uses=1]
- store i32 -1, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 15 ; [#uses=1]
- store i32 1, i32* %15, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btGjkPairDetectorD1Ev(%struct.btGjkPairDetector* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btGjkPairDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btGjkPairDetectorD0Ev(%struct.btGjkPairDetector* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btGjkPairDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btGjkPairDetector* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=10]
-define void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %this, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* nocapture %input, %struct.btActionInterface* %output, %struct.btActionInterface* %debugDraw, i8 zeroext %swapResults) align 2 {
-entry:
- tail call void @_ZN17btGjkPairDetector26getClosestPointsNonVirtualERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDraw(%struct.btGjkPairDetector* %this, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %output, %struct.btActionInterface* %debugDraw)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_iiffP22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* nocapture %this, %struct.btConvexShape* %objectA, %struct.btConvexShape* %objectB, i32 %shapeTypeA, i32 %shapeTypeB, float %marginA, float %marginB, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %penetrationDepthSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btGjkPairDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %penetrationDepthSolver, %struct.btActionInterface** %5, align 4
- %6 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %6, align 4
- %7 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %objectA, %struct.btConvexShape** %7, align 4
- %8 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btConvexShape* %objectB, %struct.btConvexShape** %8, align 4
- %9 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %shapeTypeA, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %shapeTypeB, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 8 ; [#uses=1]
- store float %marginA, float* %11, align 4
- %12 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 9 ; [#uses=1]
- store float %marginB, float* %12, align 4
- %13 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 10 ; [#uses=1]
- store i8 0, i8* %13, align 4
- %14 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 12 ; [#uses=1]
- store i32 -1, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 15 ; [#uses=1]
- store i32 1, i32* %15, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btGjkPairDetectorC2EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* nocapture %this, %struct.btConvexShape* %objectA, %struct.btConvexShape* %objectB, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %penetrationDepthSolver) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btGjkPairDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %penetrationDepthSolver, %struct.btActionInterface** %5, align 4
- %6 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %6, align 4
- %7 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %objectA, %struct.btConvexShape** %7, align 4
- %8 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btConvexShape* %objectB, %struct.btConvexShape** %8, align 4
- %9 = getelementptr inbounds %struct.btConvexShape* %objectA, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %10, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btConvexShape* %objectB, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %13, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btConvexShape* %objectA, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 11 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to float (%struct.btConvexShape*)* ; [#uses=1]
- %20 = invoke float %19(%struct.btConvexShape* %objectA)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %entry
- %21 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 8 ; [#uses=1]
- store float %20, float* %21, align 4
- %22 = getelementptr inbounds %struct.btConvexShape* %objectB, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load i32 (...)*** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 11 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to float (%struct.btConvexShape*)* ; [#uses=1]
- %27 = invoke float %26(%struct.btConvexShape* %objectB)
- to label %invcont1 unwind label %lpad ; [#uses=1]
-
-invcont1: ; preds = %invcont
- %28 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 9 ; [#uses=1]
- store float %27, float* %28, align 4
- %29 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 10 ; [#uses=1]
- store i8 0, i8* %29, align 4
- %30 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 12 ; [#uses=1]
- store i32 -1, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 15 ; [#uses=1]
- store i32 1, i32* %31, align 4
- ret void
-
-lpad: ; preds = %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV36btDiscreteCollisionDetectorInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=6]
-define void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* nocapture %this, %struct.btConvexShape* %objectA, %struct.btConvexShape* %objectB, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %penetrationDepthSolver) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV17btGjkPairDetector, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %penetrationDepthSolver, %struct.btActionInterface** %5, align 4
- %6 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %6, align 4
- %7 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 4 ; [#uses=1]
- store %struct.btConvexShape* %objectA, %struct.btConvexShape** %7, align 4
- %8 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btConvexShape* %objectB, %struct.btConvexShape** %8, align 4
- %9 = getelementptr inbounds %struct.btConvexShape* %objectA, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 6 ; [#uses=1]
- store i32 %10, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btConvexShape* %objectB, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 7 ; [#uses=1]
- store i32 %13, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btConvexShape* %objectA, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds i32 (...)** %16, i32 11 ; [#uses=1]
- %18 = load i32 (...)** %17, align 4 ; [#uses=1]
- %19 = bitcast i32 (...)* %18 to float (%struct.btConvexShape*)* ; [#uses=1]
- %20 = invoke float %19(%struct.btConvexShape* %objectA)
- to label %invcont.i unwind label %lpad.i ; [#uses=1]
-
-invcont.i: ; preds = %entry
- %21 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 8 ; [#uses=1]
- store float %20, float* %21, align 4
- %22 = getelementptr inbounds %struct.btConvexShape* %objectB, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load i32 (...)*** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 11 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to float (%struct.btConvexShape*)* ; [#uses=1]
- %27 = invoke float %26(%struct.btConvexShape* %objectB)
- to label %_ZN17btGjkPairDetectorC2EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver.exit unwind label %lpad.i ; [#uses=1]
-
-lpad.i: ; preds = %invcont.i, %entry
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select3.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV36btDiscreteCollisionDetectorInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-_ZN17btGjkPairDetectorC2EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver.exit: ; preds = %invcont.i
- %28 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 9 ; [#uses=1]
- store float %27, float* %28, align 4
- %29 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 10 ; [#uses=1]
- store i8 0, i8* %29, align 4
- %30 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 12 ; [#uses=1]
- store i32 -1, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 15 ; [#uses=1]
- store i32 1, i32* %31, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btGjkPairDetector26getClosestPointsNonVirtualERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDraw(%struct.btGjkPairDetector* %this, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* nocapture %input, %struct.btActionInterface* %output, %struct.btActionInterface* %debugDraw) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %normalInB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pointOnA = alloca %struct.btQuadWord, align 8 ; [#uses=12]
- %pointOnB = alloca %struct.btQuadWord, align 8 ; [#uses=15]
- %localTransA = alloca %struct.btTransform, align 8 ; [#uses=17]
- %localTransB = alloca %struct.btTransform, align 8 ; [#uses=17]
- %seperatingAxisInA = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %seperatingAxisInB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pInA = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %qInB = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %pWorld = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %qWorld = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %w = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %newCachedSeparatingAxis = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %tmpPointOnA = alloca %struct.btQuadWord, align 8 ; [#uses=9]
- %tmpPointOnB = alloca %struct.btQuadWord, align 8 ; [#uses=9]
- %1 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 11 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %normalInB, i32 0, i32 0, i32 0 ; [#uses=7]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btQuadWord* %normalInB, i32 0, i32 0, i32 1 ; [#uses=7]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %normalInB, i32 0, i32 0, i32 2 ; [#uses=7]
- store float 0.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btQuadWord* %normalInB, i32 0, i32 0, i32 3 ; [#uses=5]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %7 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 8
- %9 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %10 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %13 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 8
- %15 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %19 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 8
- %21 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %22 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %25 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 8
- %27 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %31 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 8
- %33 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %34 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %37 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 8
- %39 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %43 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %46 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %49 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = getelementptr inbounds %struct.btTransform* %localTransA, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %52 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 4
- %54 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %55 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 8
- %57 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %58 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %61 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 8
- %63 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %64 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %67 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 8
- %69 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %70 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %73 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 8
- %75 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %76 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %79 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 8
- %81 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %82 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %85 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %86 = load float* %85, align 4 ; [#uses=1]
- store float %86, float* %84, align 8
- %87 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %88 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %91 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %94 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=2]
- %96 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %97 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=2]
- %99 = getelementptr inbounds %struct.btTransform* %localTransB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %100 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- store float %101, float* %99, align 4
- %102 = fadd float %50, %98 ; [#uses=1]
- %103 = fadd float %47, %95 ; [#uses=1]
- %104 = fadd float %44, %92 ; [#uses=1]
- %105 = fmul float %102, 5.000000e-01 ; [#uses=3]
- %106 = fmul float %103, 5.000000e-01 ; [#uses=3]
- %107 = fmul float %104, 5.000000e-01 ; [#uses=3]
- %108 = fsub float %44, %107 ; [#uses=1]
- store float %108, float* %42, align 8
- %109 = fsub float %47, %106 ; [#uses=1]
- store float %109, float* %45, align 4
- %110 = fsub float %50, %105 ; [#uses=1]
- store float %110, float* %48, align 8
- %111 = fsub float %92, %107 ; [#uses=1]
- store float %111, float* %90, align 8
- %112 = fsub float %95, %106 ; [#uses=1]
- store float %112, float* %93, align 4
- %113 = fsub float %98, %105 ; [#uses=1]
- store float %113, float* %96, align 8
- %114 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 4 ; [#uses=3]
- %115 = load %struct.btConvexShape** %114, align 4 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btConvexShape* %115, i32 0, i32 0, i32 1 ; [#uses=1]
- %117 = load i32* %116, align 4 ; [#uses=1]
- %118 = add i32 %117, -17 ; [#uses=1]
- %119 = icmp ult i32 %118, 2 ; [#uses=1]
- br i1 %119, label %bb, label %bb9
-
-bb: ; preds = %entry
- %120 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 5 ; [#uses=2]
- %121 = load %struct.btConvexShape** %120, align 4 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btConvexShape* %121, i32 0, i32 0, i32 1 ; [#uses=1]
- %123 = load i32* %122, align 4 ; [#uses=1]
- %124 = add i32 %123, -17 ; [#uses=1]
- %125 = icmp ult i32 %124, 2 ; [#uses=1]
- br i1 %125, label %bb10, label %bb9
-
-bb9: ; preds = %bb, %entry
- %.pre208 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 5 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb9, %bb
- %.pre-phi = phi %struct.btConvexShape** [ %120, %bb ], [ %.pre208, %bb9 ] ; [#uses=2]
- %iftmp.117.0 = phi i1 [ false, %bb ], [ true, %bb9 ] ; [#uses=1]
- %126 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 8 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 9 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=1]
- %130 = load i32* @gNumGjkChecks, align 4 ; [#uses=1]
- %131 = add nsw i32 %130, 1 ; [#uses=1]
- store i32 %131, i32* @gNumGjkChecks, align 4
- %132 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 10 ; [#uses=1]
- %133 = load i8* %132, align 4 ; [#uses=1]
- %toBool11 = icmp eq i8 %133, 0 ; [#uses=2]
- %marginA.0 = select i1 %toBool11, float %127, float 0.000000e+00 ; [#uses=5]
- %marginB.0 = select i1 %toBool11, float %129, float 0.000000e+00 ; [#uses=5]
- %134 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 13 ; [#uses=3]
- store i32 0, i32* %134, align 4
- %135 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=9]
- store float 0.000000e+00, float* %135, align 4
- %136 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=9]
- store float 1.000000e+00, float* %136, align 4
- %137 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=9]
- store float 0.000000e+00, float* %137, align 4
- %138 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=6]
- store float 0.000000e+00, float* %138, align 4
- %139 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 14 ; [#uses=10]
- store i32 0, i32* %139, align 4
- %140 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 12 ; [#uses=8]
- store i32 -1, i32* %140, align 4
- %141 = fadd float %marginA.0, %marginB.0 ; [#uses=3]
- %142 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 3 ; [#uses=8]
- %143 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver5resetEv(%struct.btVoronoiSimplexSolver* %143)
- %144 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %145 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInA, i32 0, i32 0, i32 2 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInA, i32 0, i32 0, i32 3 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInB, i32 0, i32 0, i32 0 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInB, i32 0, i32 0, i32 1 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInB, i32 0, i32 0, i32 2 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btQuadWord* %seperatingAxisInB, i32 0, i32 0, i32 3 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btQuadWord* %pInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btQuadWord* %pInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btQuadWord* %pInA, i32 0, i32 0, i32 2 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btQuadWord* %pWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btQuadWord* %pWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btQuadWord* %pWorld, i32 0, i32 0, i32 2 ; [#uses=2]
- %158 = getelementptr inbounds %struct.btQuadWord* %pWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btQuadWord* %qInB, i32 0, i32 0, i32 0 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btQuadWord* %qInB, i32 0, i32 0, i32 1 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btQuadWord* %qInB, i32 0, i32 0, i32 2 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btQuadWord* %qWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btQuadWord* %qWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btQuadWord* %qWorld, i32 0, i32 0, i32 2 ; [#uses=2]
- %165 = getelementptr inbounds %struct.btQuadWord* %qWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 0 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 1 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 2 ; [#uses=1]
- %169 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 3 ; [#uses=1]
- %170 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=2]
- %171 = getelementptr inbounds %struct.btQuadWord* %newCachedSeparatingAxis, i32 0, i32 0, i32 0 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btQuadWord* %newCachedSeparatingAxis, i32 0, i32 0, i32 1 ; [#uses=1]
- %173 = getelementptr inbounds %struct.btQuadWord* %newCachedSeparatingAxis, i32 0, i32 0, i32 2 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btQuadWord* %newCachedSeparatingAxis, i32 0, i32 0, i32 3 ; [#uses=1]
- %.pre = load float* %137, align 4 ; [#uses=1]
- %.pre205 = load float* %136, align 4 ; [#uses=1]
- %.pre206 = load float* %135, align 4 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb40, %bb10
- %175 = phi float [ %.pre206, %bb10 ], [ %324, %bb40 ] ; [#uses=4]
- %176 = phi float [ %.pre205, %bb10 ], [ %326, %bb40 ] ; [#uses=4]
- %177 = phi float [ %.pre, %bb10 ], [ %329, %bb40 ] ; [#uses=4]
- %squaredDistance.0 = phi float [ 0x43ABC16D60000000, %bb10 ], [ %331, %bb40 ] ; [#uses=10]
- %178 = fsub float -0.000000e+00, %177 ; [#uses=3]
- %179 = fsub float -0.000000e+00, %176 ; [#uses=3]
- %180 = fsub float -0.000000e+00, %175 ; [#uses=3]
- %181 = load float* %13, align 4 ; [#uses=1]
- %182 = fmul float %181, %180 ; [#uses=1]
- %183 = load float* %25, align 4 ; [#uses=1]
- %184 = fmul float %183, %179 ; [#uses=1]
- %185 = fadd float %182, %184 ; [#uses=1]
- %186 = load float* %37, align 4 ; [#uses=1]
- %187 = fmul float %186, %178 ; [#uses=1]
- %188 = fadd float %185, %187 ; [#uses=1]
- %189 = load float* %10, align 4 ; [#uses=1]
- %190 = fmul float %189, %180 ; [#uses=1]
- %191 = load float* %22, align 4 ; [#uses=1]
- %192 = fmul float %191, %179 ; [#uses=1]
- %193 = fadd float %190, %192 ; [#uses=1]
- %194 = load float* %34, align 4 ; [#uses=1]
- %195 = fmul float %194, %178 ; [#uses=1]
- %196 = fadd float %193, %195 ; [#uses=1]
- %197 = load float* %7, align 4 ; [#uses=1]
- %198 = fmul float %197, %180 ; [#uses=1]
- %199 = load float* %19, align 4 ; [#uses=1]
- %200 = fmul float %199, %179 ; [#uses=1]
- %201 = fadd float %198, %200 ; [#uses=1]
- %202 = load float* %31, align 4 ; [#uses=1]
- %203 = fmul float %202, %178 ; [#uses=1]
- %204 = fadd float %201, %203 ; [#uses=1]
- store float %204, float* %144, align 8
- store float %196, float* %145, align 4
- store float %188, float* %146, align 8
- store float 0.000000e+00, float* %147, align 4
- %205 = load float* %61, align 4 ; [#uses=1]
- %206 = fmul float %205, %175 ; [#uses=1]
- %207 = load float* %73, align 4 ; [#uses=1]
- %208 = fmul float %207, %176 ; [#uses=1]
- %209 = fadd float %206, %208 ; [#uses=1]
- %210 = load float* %85, align 4 ; [#uses=1]
- %211 = fmul float %210, %177 ; [#uses=1]
- %212 = fadd float %209, %211 ; [#uses=1]
- %213 = load float* %58, align 4 ; [#uses=1]
- %214 = fmul float %213, %175 ; [#uses=1]
- %215 = load float* %70, align 4 ; [#uses=1]
- %216 = fmul float %215, %176 ; [#uses=1]
- %217 = fadd float %214, %216 ; [#uses=1]
- %218 = load float* %82, align 4 ; [#uses=1]
- %219 = fmul float %218, %177 ; [#uses=1]
- %220 = fadd float %217, %219 ; [#uses=1]
- %221 = load float* %55, align 4 ; [#uses=1]
- %222 = fmul float %221, %175 ; [#uses=1]
- %223 = load float* %67, align 4 ; [#uses=1]
- %224 = fmul float %223, %176 ; [#uses=1]
- %225 = fadd float %222, %224 ; [#uses=1]
- %226 = load float* %79, align 4 ; [#uses=1]
- %227 = fmul float %226, %177 ; [#uses=1]
- %228 = fadd float %225, %227 ; [#uses=1]
- store float %228, float* %148, align 8
- store float %220, float* %149, align 4
- store float %212, float* %150, align 8
- store float 0.000000e+00, float* %151, align 4
- %229 = load %struct.btConvexShape** %114, align 4 ; [#uses=1]
- call void @_ZNK13btConvexShape44localGetSupportVertexWithoutMarginNonVirtualERK9btVector3(%struct.btQuadWord* noalias sret %pInA, %struct.btConvexShape* %229, %struct.btQuadWord* %seperatingAxisInA)
- %230 = load %struct.btConvexShape** %.pre-phi, align 4 ; [#uses=1]
- call void @_ZNK13btConvexShape44localGetSupportVertexWithoutMarginNonVirtualERK9btVector3(%struct.btQuadWord* noalias sret %qInB, %struct.btConvexShape* %230, %struct.btQuadWord* %seperatingAxisInB)
- %231 = load float* %30, align 8 ; [#uses=1]
- %232 = load float* %152, align 8 ; [#uses=3]
- %233 = fmul float %231, %232 ; [#uses=1]
- %234 = load float* %33, align 4 ; [#uses=1]
- %235 = load float* %153, align 4 ; [#uses=3]
- %236 = fmul float %234, %235 ; [#uses=1]
- %237 = fadd float %233, %236 ; [#uses=1]
- %238 = load float* %36, align 8 ; [#uses=1]
- %239 = load float* %154, align 8 ; [#uses=3]
- %240 = fmul float %238, %239 ; [#uses=1]
- %241 = fadd float %237, %240 ; [#uses=1]
- %242 = load float* %48, align 8 ; [#uses=1]
- %243 = fadd float %241, %242 ; [#uses=2]
- %244 = load float* %18, align 8 ; [#uses=1]
- %245 = fmul float %244, %232 ; [#uses=1]
- %246 = load float* %21, align 4 ; [#uses=1]
- %247 = fmul float %246, %235 ; [#uses=1]
- %248 = fadd float %245, %247 ; [#uses=1]
- %249 = load float* %24, align 8 ; [#uses=1]
- %250 = fmul float %249, %239 ; [#uses=1]
- %251 = fadd float %248, %250 ; [#uses=1]
- %252 = load float* %45, align 4 ; [#uses=1]
- %253 = fadd float %251, %252 ; [#uses=2]
- %254 = load float* %6, align 8 ; [#uses=1]
- %255 = fmul float %254, %232 ; [#uses=1]
- %256 = load float* %9, align 4 ; [#uses=1]
- %257 = fmul float %256, %235 ; [#uses=1]
- %258 = fadd float %255, %257 ; [#uses=1]
- %259 = load float* %12, align 8 ; [#uses=1]
- %260 = fmul float %259, %239 ; [#uses=1]
- %261 = fadd float %258, %260 ; [#uses=1]
- %262 = load float* %42, align 8 ; [#uses=1]
- %263 = fadd float %261, %262 ; [#uses=2]
- store float %263, float* %155, align 8
- store float %253, float* %156, align 4
- store float %243, float* %157, align 8
- store float 0.000000e+00, float* %158, align 4
- %264 = load float* %78, align 8 ; [#uses=1]
- %265 = load float* %159, align 8 ; [#uses=3]
- %266 = fmul float %264, %265 ; [#uses=1]
- %267 = load float* %81, align 4 ; [#uses=1]
- %268 = load float* %160, align 4 ; [#uses=3]
- %269 = fmul float %267, %268 ; [#uses=1]
- %270 = fadd float %266, %269 ; [#uses=1]
- %271 = load float* %84, align 8 ; [#uses=1]
- %272 = load float* %161, align 8 ; [#uses=3]
- %273 = fmul float %271, %272 ; [#uses=1]
- %274 = fadd float %270, %273 ; [#uses=1]
- %275 = load float* %96, align 8 ; [#uses=1]
- %276 = fadd float %274, %275 ; [#uses=2]
- %277 = load float* %66, align 8 ; [#uses=1]
- %278 = fmul float %277, %265 ; [#uses=1]
- %279 = load float* %69, align 4 ; [#uses=1]
- %280 = fmul float %279, %268 ; [#uses=1]
- %281 = fadd float %278, %280 ; [#uses=1]
- %282 = load float* %72, align 8 ; [#uses=1]
- %283 = fmul float %282, %272 ; [#uses=1]
- %284 = fadd float %281, %283 ; [#uses=1]
- %285 = load float* %93, align 4 ; [#uses=1]
- %286 = fadd float %284, %285 ; [#uses=2]
- %287 = load float* %54, align 8 ; [#uses=1]
- %288 = fmul float %287, %265 ; [#uses=1]
- %289 = load float* %57, align 4 ; [#uses=1]
- %290 = fmul float %289, %268 ; [#uses=1]
- %291 = fadd float %288, %290 ; [#uses=1]
- %292 = load float* %60, align 8 ; [#uses=1]
- %293 = fmul float %292, %272 ; [#uses=1]
- %294 = fadd float %291, %293 ; [#uses=1]
- %295 = load float* %90, align 8 ; [#uses=1]
- %296 = fadd float %294, %295 ; [#uses=2]
- store float %296, float* %162, align 8
- store float %286, float* %163, align 4
- store float %276, float* %164, align 8
- store float 0.000000e+00, float* %165, align 4
- br i1 %iftmp.117.0, label %bb17, label %bb16
-
-bb16: ; preds = %bb14
- store float 0.000000e+00, float* %157, align 8
- store float 0.000000e+00, float* %164, align 8
- br label %bb17
-
-bb17: ; preds = %bb16, %bb14
- %297 = phi float [ %276, %bb14 ], [ 0.000000e+00, %bb16 ] ; [#uses=1]
- %298 = phi float [ %243, %bb14 ], [ 0.000000e+00, %bb16 ] ; [#uses=1]
- %299 = fsub float %298, %297 ; [#uses=2]
- %300 = fsub float %253, %286 ; [#uses=2]
- %301 = fsub float %263, %296 ; [#uses=2]
- store float %301, float* %166, align 8
- store float %300, float* %167, align 4
- store float %299, float* %168, align 8
- store float 0.000000e+00, float* %169, align 4
- %302 = load float* %135, align 4 ; [#uses=1]
- %303 = fmul float %302, %301 ; [#uses=1]
- %304 = load float* %136, align 4 ; [#uses=1]
- %305 = fmul float %304, %300 ; [#uses=1]
- %306 = fadd float %303, %305 ; [#uses=1]
- %307 = load float* %137, align 4 ; [#uses=1]
- %308 = fmul float %307, %299 ; [#uses=1]
- %309 = fadd float %306, %308 ; [#uses=4]
- %310 = fcmp ogt float %309, 0.000000e+00 ; [#uses=1]
- br i1 %310, label %bb18, label %bb20
-
-bb18: ; preds = %bb17
- %311 = fmul float %309, %309 ; [#uses=1]
- %312 = load float* %170, align 4 ; [#uses=1]
- %313 = fmul float %312, %squaredDistance.0 ; [#uses=1]
- %314 = fcmp ogt float %311, %313 ; [#uses=1]
- br i1 %314, label %bb19, label %bb20
-
-bb19: ; preds = %bb18
- store i32 10, i32* %139, align 4
- br label %bb50
-
-bb20: ; preds = %bb18, %bb17
- %315 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=1]
- %316 = call zeroext i8 @_ZN22btVoronoiSimplexSolver9inSimplexERK9btVector3(%struct.btVoronoiSimplexSolver* %315, %struct.btQuadWord* %w) ; [#uses=1]
- %toBool21 = icmp eq i8 %316, 0 ; [#uses=1]
- br i1 %toBool21, label %bb23, label %bb22
-
-bb22: ; preds = %bb20
- store i32 1, i32* %139, align 4
- br label %bb50
-
-bb23: ; preds = %bb20
- %317 = fsub float %squaredDistance.0, %309 ; [#uses=2]
- %318 = fmul float %squaredDistance.0, 0x3EB0C6F7A0000000 ; [#uses=1]
- %319 = fcmp ugt float %317, %318 ; [#uses=1]
- br i1 %319, label %bb28, label %bb24
-
-bb24: ; preds = %bb23
- %320 = fcmp ugt float %317, 0.000000e+00 ; [#uses=1]
- %storemerge = select i1 %320, i32 11, i32 2 ; [#uses=1]
- store i32 %storemerge, i32* %139, align 4
- br label %bb50
-
-bb28: ; preds = %bb23
- %321 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver9addVertexERK9btVector3S2_S2_(%struct.btVoronoiSimplexSolver* %321, %struct.btQuadWord* %w, %struct.btQuadWord* %pWorld, %struct.btQuadWord* %qWorld)
- %322 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=1]
- %323 = call zeroext i8 @_ZN22btVoronoiSimplexSolver7closestER9btVector3(%struct.btVoronoiSimplexSolver* %322, %struct.btQuadWord* %newCachedSeparatingAxis) ; [#uses=1]
- %toBool29not = icmp eq i8 %323, 0 ; [#uses=1]
- br i1 %toBool29not, label %bb32, label %bb33
-
-bb32: ; preds = %bb28
- store i32 3, i32* %139, align 4
- br label %bb50
-
-bb33: ; preds = %bb28
- %324 = load float* %171, align 8 ; [#uses=4]
- %325 = fmul float %324, %324 ; [#uses=1]
- %326 = load float* %172, align 4 ; [#uses=4]
- %327 = fmul float %326, %326 ; [#uses=1]
- %328 = fadd float %325, %327 ; [#uses=1]
- %329 = load float* %173, align 8 ; [#uses=4]
- %330 = fmul float %329, %329 ; [#uses=1]
- %331 = fadd float %328, %330 ; [#uses=4]
- %332 = fcmp olt float %331, 0x3EB0C6F7A0000000 ; [#uses=1]
- store float %324, float* %135, align 4
- store float %326, float* %136, align 4
- store float %329, float* %137, align 4
- %333 = load float* %174, align 4 ; [#uses=1]
- store float %333, float* %138, align 4
- br i1 %332, label %bb35, label %bb36
-
-bb35: ; preds = %bb33
- store i32 6, i32* %139, align 4
- br label %bb50
-
-bb36: ; preds = %bb33
- %334 = fsub float %squaredDistance.0, %331 ; [#uses=1]
- %335 = fmul float %squaredDistance.0, 0x3E80000000000000 ; [#uses=1]
- %336 = fcmp ugt float %334, %335 ; [#uses=1]
- br i1 %336, label %bb38, label %bb37
-
-bb37: ; preds = %bb36
- %337 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1 ; [#uses=1]
- %338 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver14backup_closestER9btVector3(%struct.btVoronoiSimplexSolver* %338, %struct.btQuadWord* %337)
- store i32 12, i32* %139, align 4
- br label %bb50
-
-bb38: ; preds = %bb36
- %339 = load i32* %134, align 4 ; [#uses=2]
- %340 = icmp sgt i32 %339, 1000 ; [#uses=1]
- %341 = add nsw i32 %339, 1 ; [#uses=1]
- store i32 %341, i32* %134, align 4
- br i1 %340, label %bb57, label %bb40
-
-bb40: ; preds = %bb38
- %342 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=2]
- %343 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %342, i32 0, i32 0 ; [#uses=1]
- %344 = load i32* %343, align 4 ; [#uses=1]
- %345 = icmp eq i32 %344, 4 ; [#uses=1]
- br i1 %345, label %bb47, label %bb14
-
-bb47: ; preds = %bb40
- %346 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver14backup_closestER9btVector3(%struct.btVoronoiSimplexSolver* %342, %struct.btQuadWord* %346)
- store i32 13, i32* %139, align 4
- br label %bb57
-
-bb50: ; preds = %bb37, %bb35, %bb32, %bb24, %bb22, %bb19
- %squaredDistance.1.ph = phi float [ %squaredDistance.0, %bb19 ], [ %squaredDistance.0, %bb22 ], [ %squaredDistance.0, %bb24 ], [ %squaredDistance.0, %bb32 ], [ %squaredDistance.0, %bb35 ], [ %331, %bb37 ] ; [#uses=1]
- %347 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver14compute_pointsER9btVector3S1_(%struct.btVoronoiSimplexSolver* %347, %struct.btQuadWord* %pointOnA, %struct.btQuadWord* %pointOnB)
- %348 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 2 ; [#uses=2]
- %349 = load float* %348, align 8 ; [#uses=2]
- %350 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 2 ; [#uses=2]
- %351 = load float* %350, align 8 ; [#uses=2]
- %352 = fsub float %349, %351 ; [#uses=2]
- %353 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 1 ; [#uses=2]
- %354 = load float* %353, align 4 ; [#uses=2]
- %355 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 1 ; [#uses=2]
- %356 = load float* %355, align 4 ; [#uses=2]
- %357 = fsub float %354, %356 ; [#uses=2]
- %358 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 0 ; [#uses=2]
- %359 = load float* %358, align 8 ; [#uses=2]
- %360 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 0 ; [#uses=2]
- %361 = load float* %360, align 8 ; [#uses=2]
- %362 = fsub float %359, %361 ; [#uses=2]
- store float %362, float* %2, align 8
- store float %357, float* %3, align 4
- store float %352, float* %4, align 8
- store float 0.000000e+00, float* %5, align 4
- %363 = load float* %135, align 4 ; [#uses=4]
- %364 = fmul float %363, %363 ; [#uses=1]
- %365 = load float* %136, align 4 ; [#uses=4]
- %366 = fmul float %365, %365 ; [#uses=1]
- %367 = fadd float %364, %366 ; [#uses=1]
- %368 = load float* %137, align 4 ; [#uses=4]
- %369 = fmul float %368, %368 ; [#uses=1]
- %370 = fadd float %367, %369 ; [#uses=3]
- %371 = fpext float %370 to double ; [#uses=1]
- %372 = fcmp olt double %371, 1.000000e-04 ; [#uses=1]
- br i1 %372, label %bb51, label %bb52
-
-bb51: ; preds = %bb50
- store i32 5, i32* %139, align 4
- br label %bb52
-
-bb52: ; preds = %bb51, %bb50
- %373 = fcmp ogt float %370, 0x3D10000000000000 ; [#uses=1]
- br i1 %373, label %bb53, label %bb56
-
-bb53: ; preds = %bb52
- %374 = call float @sqrtf(float %370) nounwind readonly ; [#uses=1]
- %375 = fdiv float 1.000000e+00, %374 ; [#uses=4]
- %376 = fmul float %362, %375 ; [#uses=1]
- store float %376, float* %2, align 8
- %377 = fmul float %357, %375 ; [#uses=1]
- store float %377, float* %3, align 4
- %378 = fmul float %352, %375 ; [#uses=1]
- store float %378, float* %4, align 8
- %379 = call float @sqrtf(float %squaredDistance.1.ph) nounwind readonly ; [#uses=2]
- %380 = fdiv float %marginA.0, %379 ; [#uses=3]
- %381 = fmul float %368, %380 ; [#uses=1]
- %382 = fmul float %365, %380 ; [#uses=1]
- %383 = fmul float %363, %380 ; [#uses=1]
- %384 = fsub float %359, %383 ; [#uses=1]
- store float %384, float* %358, align 8
- %385 = fsub float %354, %382 ; [#uses=1]
- store float %385, float* %353, align 4
- %386 = fsub float %349, %381 ; [#uses=1]
- store float %386, float* %348, align 8
- %387 = fdiv float %marginB.0, %379 ; [#uses=3]
- %388 = fmul float %368, %387 ; [#uses=1]
- %389 = fmul float %365, %387 ; [#uses=1]
- %390 = fmul float %363, %387 ; [#uses=1]
- %391 = fadd float %361, %390 ; [#uses=1]
- store float %391, float* %360, align 8
- %392 = fadd float %356, %389 ; [#uses=1]
- store float %392, float* %355, align 4
- %393 = fadd float %351, %388 ; [#uses=1]
- store float %393, float* %350, align 8
- %394 = fdiv float 1.000000e+00, %375 ; [#uses=1]
- %395 = fsub float %394, %141 ; [#uses=1]
- store i32 1, i32* %140, align 4
- br label %bb57
-
-bb56: ; preds = %bb52
- store i32 2, i32* %140, align 4
- br label %bb57
-
-bb57: ; preds = %bb56, %bb53, %bb47, %bb38
- %distance.0 = phi float [ %395, %bb53 ], [ 0.000000e+00, %bb56 ], [ 0.000000e+00, %bb47 ], [ 0.000000e+00, %bb38 ] ; [#uses=6]
- %isValid.0 = phi i8 [ 1, %bb53 ], [ 0, %bb56 ], [ 0, %bb47 ], [ 0, %bb38 ] ; [#uses=5]
- %396 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 15 ; [#uses=1]
- %397 = load i32* %396, align 4 ; [#uses=1]
- %398 = icmp eq i32 %397, 0 ; [#uses=1]
- br i1 %398, label %bb65, label %bb58
-
-bb58: ; preds = %bb57
- %399 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 2 ; [#uses=1]
- %400 = load %struct.btActionInterface** %399, align 4 ; [#uses=1]
- %401 = icmp eq %struct.btActionInterface* %400, null ; [#uses=1]
- br i1 %401, label %bb65, label %bb59
-
-bb59: ; preds = %bb58
- %402 = load i32* %139, align 4 ; [#uses=1]
- %403 = icmp eq i32 %402, 0 ; [#uses=1]
- br i1 %403, label %bb65, label %bb60
-
-bb60: ; preds = %bb59
- %404 = fadd float %distance.0, %141 ; [#uses=1]
- %405 = fpext float %404 to double ; [#uses=1]
- %406 = fcmp uge double %405, 1.000000e-02 ; [#uses=1]
- %toBool69 = icmp eq i8 %isValid.0, 1 ; [#uses=1]
- %or.cond = and i1 %406, %toBool69 ; [#uses=1]
- br i1 %or.cond, label %bb108, label %bb73
-
-bb65: ; preds = %bb59, %bb58, %bb57
- %toBool69.old = icmp eq i8 %isValid.0, 1 ; [#uses=1]
- br i1 %toBool69.old, label %bb108, label %bb72
-
-bb72: ; preds = %bb65
- %.phi.trans.insert = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 2 ; [#uses=1]
- %.pre207 = load %struct.btActionInterface** %.phi.trans.insert, align 4 ; [#uses=1]
- %407 = icmp eq %struct.btActionInterface* %.pre207, null ; [#uses=1]
- br i1 %407, label %bb106, label %bb73
-
-bb73: ; preds = %bb72, %bb60
- %408 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 2 ; [#uses=1]
- %409 = load i32* @gNumDeepPenetrationChecks, align 4 ; [#uses=1]
- %410 = add nsw i32 %409, 1 ; [#uses=1]
- store i32 %410, i32* @gNumDeepPenetrationChecks, align 4
- store float 0.000000e+00, float* %135, align 4
- store float 0.000000e+00, float* %136, align 4
- store float 0.000000e+00, float* %137, align 4
- store float 0.000000e+00, float* %138, align 4
- %411 = load %struct.btActionInterface** %408, align 4 ; [#uses=2]
- %412 = getelementptr inbounds %struct.btActionInterface* %411, i32 0, i32 0 ; [#uses=1]
- %413 = load i32 (...)*** %412, align 4 ; [#uses=1]
- %414 = getelementptr inbounds i32 (...)** %413, i32 2 ; [#uses=1]
- %415 = load i32 (...)** %414, align 4 ; [#uses=1]
- %416 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=1]
- %417 = load %struct.btStackAlloc** %416, align 4 ; [#uses=1]
- %418 = getelementptr inbounds %struct.btGjkPairDetector* %this, i32 0, i32 1 ; [#uses=1]
- %419 = load %struct.btConvexShape** %.pre-phi, align 4 ; [#uses=1]
- %420 = load %struct.btConvexShape** %114, align 4 ; [#uses=1]
- %421 = load %struct.btVoronoiSimplexSolver** %142, align 4 ; [#uses=1]
- %422 = bitcast i32 (...)* %415 to i8 (%struct.btActionInterface*, %struct.btVoronoiSimplexSolver*, %struct.btConvexShape*, %struct.btConvexShape*, %struct.btTransform*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*, %struct.btStackAlloc*)* ; [#uses=1]
- %423 = call zeroext i8 %422(%struct.btActionInterface* %411, %struct.btVoronoiSimplexSolver* %421, %struct.btConvexShape* %420, %struct.btConvexShape* %419, %struct.btTransform* %localTransA, %struct.btTransform* %localTransB, %struct.btQuadWord* %418, %struct.btQuadWord* %tmpPointOnA, %struct.btQuadWord* %tmpPointOnB, %struct.btActionInterface* %debugDraw, %struct.btStackAlloc* %417) ; [#uses=1]
- %toBool77 = icmp eq i8 %423, 0 ; [#uses=1]
- br i1 %toBool77, label %bb94, label %bb78
-
-bb78: ; preds = %bb73
- %424 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- %425 = load float* %424, align 8 ; [#uses=3]
- %426 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- %427 = load float* %426, align 8 ; [#uses=3]
- %428 = fsub float %425, %427 ; [#uses=3]
- %429 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- %430 = load float* %429, align 4 ; [#uses=3]
- %431 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- %432 = load float* %431, align 4 ; [#uses=3]
- %433 = fsub float %430, %432 ; [#uses=3]
- %434 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %435 = load float* %434, align 8 ; [#uses=3]
- %436 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- %437 = load float* %436, align 8 ; [#uses=3]
- %438 = fsub float %435, %437 ; [#uses=3]
- %439 = fmul float %438, %438 ; [#uses=1]
- %440 = fmul float %433, %433 ; [#uses=1]
- %441 = fadd float %439, %440 ; [#uses=1]
- %442 = fmul float %428, %428 ; [#uses=1]
- %443 = fadd float %441, %442 ; [#uses=2]
- %444 = fcmp ugt float %443, 0x3D10000000000000 ; [#uses=1]
- br i1 %444, label %bb83, label %bb82
-
-bb82: ; preds = %bb78
- %445 = load float* %135, align 4 ; [#uses=3]
- %446 = load float* %136, align 4 ; [#uses=3]
- %447 = load float* %137, align 4 ; [#uses=3]
- %448 = load float* %138, align 4 ; [#uses=1]
- %449 = fmul float %445, %445 ; [#uses=1]
- %450 = fmul float %446, %446 ; [#uses=1]
- %451 = fadd float %449, %450 ; [#uses=1]
- %452 = fmul float %447, %447 ; [#uses=1]
- %453 = fadd float %451, %452 ; [#uses=1]
- br label %bb83
-
-bb83: ; preds = %bb82, %bb78
- %tmpNormalInB.0.0.0 = phi float [ %438, %bb78 ], [ %445, %bb82 ] ; [#uses=1]
- %tmpNormalInB.0.1.0 = phi float [ %433, %bb78 ], [ %446, %bb82 ] ; [#uses=1]
- %tmpNormalInB.0.2.0 = phi float [ %428, %bb78 ], [ %447, %bb82 ] ; [#uses=1]
- %tmpNormalInB.0.3.0 = phi float [ 0.000000e+00, %bb78 ], [ %448, %bb82 ] ; [#uses=1]
- %lenSqr81.0 = phi float [ %443, %bb78 ], [ %453, %bb82 ] ; [#uses=2]
- %454 = fcmp ogt float %lenSqr81.0, 0x3D10000000000000 ; [#uses=1]
- br i1 %454, label %bb84, label %bb93
-
-bb84: ; preds = %bb83
- %455 = call float @sqrtf(float %lenSqr81.0) nounwind readonly ; [#uses=1]
- %456 = fdiv float 1.000000e+00, %455 ; [#uses=3]
- %457 = fsub float %427, %425 ; [#uses=2]
- %458 = fsub float %432, %430 ; [#uses=2]
- %459 = fsub float %437, %435 ; [#uses=2]
- %460 = fmul float %459, %459 ; [#uses=1]
- %461 = fmul float %458, %458 ; [#uses=1]
- %462 = fadd float %460, %461 ; [#uses=1]
- %463 = fmul float %457, %457 ; [#uses=1]
- %464 = fadd float %462, %463 ; [#uses=1]
- %465 = call float @sqrtf(float %464) nounwind readonly ; [#uses=1]
- %466 = fsub float -0.000000e+00, %465 ; [#uses=2]
- %toBool89.not = icmp ne i8 %isValid.0, 1 ; [#uses=1]
- %467 = fcmp ogt float %distance.0, %466 ; [#uses=1]
- %or.cond112 = or i1 %toBool89.not, %467 ; [#uses=1]
- br i1 %or.cond112, label %bb91, label %bb92
-
-bb91: ; preds = %bb84
- %468 = fmul float %tmpNormalInB.0.2.0, %456 ; [#uses=1]
- %469 = fmul float %tmpNormalInB.0.1.0, %456 ; [#uses=1]
- %470 = fmul float %tmpNormalInB.0.0.0, %456 ; [#uses=1]
- %471 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %437, float* %471, align 8
- %472 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %432, float* %472, align 4
- %473 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %427, float* %473, align 8
- %474 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- %475 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- %476 = load float* %475, align 4 ; [#uses=1]
- store float %476, float* %474, align 4
- %477 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %435, float* %477, align 8
- %478 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %430, float* %478, align 4
- %479 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %425, float* %479, align 8
- %480 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- %481 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- %482 = load float* %481, align 4 ; [#uses=1]
- store float %482, float* %480, align 4
- store float %470, float* %2, align 8
- store float %469, float* %3, align 4
- store float %468, float* %4, align 8
- store float %tmpNormalInB.0.3.0, float* %5, align 4
- store i32 3, i32* %140, align 4
- br label %bb108
-
-bb92: ; preds = %bb84
- store i32 8, i32* %140, align 4
- br label %bb106
-
-bb93: ; preds = %bb83
- store i32 9, i32* %140, align 4
- br label %bb106
-
-bb94: ; preds = %bb73
- %483 = load float* %135, align 4 ; [#uses=6]
- %484 = fmul float %483, %483 ; [#uses=1]
- %485 = load float* %136, align 4 ; [#uses=6]
- %486 = fmul float %485, %485 ; [#uses=1]
- %487 = fadd float %484, %486 ; [#uses=1]
- %488 = load float* %137, align 4 ; [#uses=6]
- %489 = fmul float %488, %488 ; [#uses=1]
- %490 = fadd float %487, %489 ; [#uses=2]
- %491 = fcmp ogt float %490, 0.000000e+00 ; [#uses=1]
- br i1 %491, label %bb96, label %bb106
-
-bb96: ; preds = %bb94
- %492 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- %493 = load float* %492, align 8 ; [#uses=2]
- %494 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- %495 = load float* %494, align 8 ; [#uses=2]
- %496 = fsub float %493, %495 ; [#uses=2]
- %497 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- %498 = load float* %497, align 4 ; [#uses=2]
- %499 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- %500 = load float* %499, align 4 ; [#uses=2]
- %501 = fsub float %498, %500 ; [#uses=2]
- %502 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- %503 = load float* %502, align 8 ; [#uses=2]
- %504 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %505 = load float* %504, align 8 ; [#uses=2]
- %506 = fsub float %503, %505 ; [#uses=2]
- %507 = fmul float %506, %506 ; [#uses=1]
- %508 = fmul float %501, %501 ; [#uses=1]
- %509 = fadd float %507, %508 ; [#uses=1]
- %510 = fmul float %496, %496 ; [#uses=1]
- %511 = fadd float %509, %510 ; [#uses=1]
- %512 = call float @sqrtf(float %511) nounwind readonly ; [#uses=1]
- %513 = fsub float %512, %141 ; [#uses=2]
- %toBool102.not = icmp ne i8 %isValid.0, 1 ; [#uses=1]
- %514 = fcmp olt float %513, %distance.0 ; [#uses=1]
- %or.cond113 = or i1 %toBool102.not, %514 ; [#uses=1]
- br i1 %or.cond113, label %bb104, label %bb105
-
-bb104: ; preds = %bb96
- %515 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 0 ; [#uses=1]
- %516 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 1 ; [#uses=1]
- %517 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 2 ; [#uses=1]
- %518 = getelementptr inbounds %struct.btQuadWord* %pointOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- %519 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnA, i32 0, i32 0, i32 3 ; [#uses=1]
- %520 = load float* %519, align 4 ; [#uses=1]
- store float %520, float* %518, align 4
- %521 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %522 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- %523 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- %524 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- %525 = getelementptr inbounds %struct.btQuadWord* %tmpPointOnB, i32 0, i32 0, i32 3 ; [#uses=1]
- %526 = load float* %525, align 4 ; [#uses=1]
- store float %526, float* %524, align 4
- %527 = fmul float %488, %marginA.0 ; [#uses=1]
- %528 = fmul float %485, %marginA.0 ; [#uses=1]
- %529 = fmul float %483, %marginA.0 ; [#uses=1]
- %530 = fsub float %503, %529 ; [#uses=1]
- store float %530, float* %515, align 8
- %531 = fsub float %498, %528 ; [#uses=1]
- store float %531, float* %516, align 4
- %532 = fsub float %493, %527 ; [#uses=1]
- store float %532, float* %517, align 8
- %533 = fmul float %488, %marginB.0 ; [#uses=1]
- %534 = fmul float %485, %marginB.0 ; [#uses=1]
- %535 = fmul float %483, %marginB.0 ; [#uses=1]
- %536 = fadd float %505, %535 ; [#uses=1]
- store float %536, float* %521, align 8
- %537 = fadd float %500, %534 ; [#uses=1]
- store float %537, float* %522, align 4
- %538 = fadd float %495, %533 ; [#uses=1]
- store float %538, float* %523, align 8
- store float %483, float* %2, align 8
- store float %485, float* %3, align 4
- store float %488, float* %4, align 8
- %539 = load float* %138, align 4 ; [#uses=1]
- store float %539, float* %5, align 4
- %540 = call float @sqrtf(float %490) nounwind readonly ; [#uses=1]
- %541 = fdiv float 1.000000e+00, %540 ; [#uses=3]
- %542 = fmul float %483, %541 ; [#uses=1]
- store float %542, float* %2, align 8
- %543 = fmul float %485, %541 ; [#uses=1]
- store float %543, float* %3, align 4
- %544 = fmul float %488, %541 ; [#uses=1]
- store float %544, float* %4, align 8
- store i32 6, i32* %140, align 4
- br label %bb108
-
-bb105: ; preds = %bb96
- store i32 5, i32* %140, align 4
- br label %bb106
-
-bb106: ; preds = %bb105, %bb94, %bb93, %bb92, %bb72
- %toBool107 = icmp eq i8 %isValid.0, 0 ; [#uses=1]
- br i1 %toBool107, label %return, label %bb108
-
-bb108: ; preds = %bb106, %bb104, %bb91, %bb65, %bb60
- %distance.1174 = phi float [ %distance.0, %bb106 ], [ %466, %bb91 ], [ %513, %bb104 ], [ %distance.0, %bb65 ], [ %distance.0, %bb60 ] ; [#uses=5]
- %545 = fcmp olt float %distance.1174, 0.000000e+00 ; [#uses=1]
- br i1 %545, label %bb110, label %bb109
-
-bb109: ; preds = %bb108
- %546 = fmul float %distance.1174, %distance.1174 ; [#uses=1]
- %547 = load float* %170, align 4 ; [#uses=1]
- %548 = fcmp olt float %546, %547 ; [#uses=1]
- br i1 %548, label %bb110, label %return
-
-bb110: ; preds = %bb109, %bb108
- %549 = load float* %2, align 8 ; [#uses=1]
- store float %549, float* %135, align 4
- %550 = load float* %3, align 4 ; [#uses=1]
- store float %550, float* %136, align 4
- %551 = load float* %4, align 8 ; [#uses=1]
- store float %551, float* %137, align 4
- %552 = load float* %5, align 4 ; [#uses=1]
- store float %552, float* %138, align 4
- store float %distance.1174, float* %1, align 4
- %553 = getelementptr inbounds %struct.btActionInterface* %output, i32 0, i32 0 ; [#uses=1]
- %554 = load i32 (...)*** %553, align 4 ; [#uses=1]
- %555 = getelementptr inbounds i32 (...)** %554, i32 4 ; [#uses=1]
- %556 = load i32 (...)** %555, align 4 ; [#uses=1]
- %557 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 2 ; [#uses=1]
- %558 = load float* %557, align 8 ; [#uses=1]
- %559 = fadd float %558, %105 ; [#uses=1]
- %560 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 1 ; [#uses=1]
- %561 = load float* %560, align 4 ; [#uses=1]
- %562 = fadd float %561, %106 ; [#uses=1]
- %563 = getelementptr inbounds %struct.btQuadWord* %pointOnB, i32 0, i32 0, i32 0 ; [#uses=1]
- %564 = load float* %563, align 8 ; [#uses=1]
- %565 = fadd float %564, %107 ; [#uses=1]
- %566 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %565, float* %566, align 8
- %567 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %562, float* %567, align 4
- %568 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %559, float* %568, align 8
- %569 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %569, align 4
- %570 = bitcast i32 (...)* %556 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %570(%struct.btActionInterface* %output, %struct.btQuadWord* %normalInB, %struct.btQuadWord* %0, float %distance.1174)
- ret void
-
-return: ; preds = %bb109, %bb106
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResultD2Ev(%struct..0btIntermediateResult* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTVZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResultD1Ev(%struct..0btIntermediateResult* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTVZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResultD0Ev(%struct..0btIntermediateResult* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTVZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0btIntermediateResult* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResult20setShapeIdentifiersAEii(%struct..0btIntermediateResult* nocapture %this, i32 %partId0, i32 %index0) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResult20setShapeIdentifiersBEii(%struct..0btIntermediateResult* nocapture %this, i32 %partId1, i32 %index1) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define internal void @_ZZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocEN20btIntermediateResult15addContactPointERKS8_SG_f(%struct..0btIntermediateResult* nocapture %this, %struct.btQuadWord* nocapture %normalOnBInWorld, %struct.btQuadWord* nocapture %pointInWorld, float %depth) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %normalOnBInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %pointInWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 3 ; [#uses=1]
- store float %depth, float* %24, align 4
- %25 = getelementptr inbounds %struct..0btIntermediateResult* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN33btMinkowskiPenetrationDepthSolverD0Ev(%struct..0btMultiSapOverlapFilterCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV33btMinkowskiPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0btMultiSapOverlapFilterCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN33btMinkowskiPenetrationDepthSolverD1Ev(%struct..0btMultiSapOverlapFilterCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV33btMinkowskiPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAlloc(%struct..0btMultiSapOverlapFilterCallback* nocapture %this, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* nocapture %v, %struct.btQuadWord* nocapture %pa, %struct.btQuadWord* nocapture %pb, %struct.btActionInterface* %debugDraw, %struct.btStackAlloc* nocapture %stackAlloc) align 2 {
-entry:
- %supportVerticesABatch = alloca [62 x %struct.btQuadWord], align 8 ; [#uses=4]
- %supportVerticesBBatch = alloca [62 x %struct.btQuadWord], align 8 ; [#uses=4]
- %seperatingAxisInABatch = alloca [62 x %struct.btQuadWord], align 8 ; [#uses=13]
- %seperatingAxisInBBatch = alloca [62 x %struct.btQuadWord], align 8 ; [#uses=13]
- %gjkdet = alloca %struct.btGjkPairDetector, align 8 ; [#uses=6]
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=35]
- %res = alloca %struct..0btIntermediateResult, align 8 ; [#uses=8]
- %norm33 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %norm45 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btConvexShape* %convexA, i32 0, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add i32 %1, -17 ; [#uses=1]
- %3 = icmp ult i32 %2, 2 ; [#uses=1]
- br i1 %3, label %bb, label %bb9
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btConvexShape* %convexB, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = add i32 %5, -17 ; [#uses=1]
- %7 = icmp ult i32 %6, 2 ; [#uses=1]
- br i1 %7, label %bb.nph210, label %bb9
-
-bb9: ; preds = %bb, %entry
- br label %bb.nph210
-
-bb.nph210: ; preds = %bb9, %bb
- %iftmp.120.0 = phi i8 [ 0, %bb9 ], [ 1, %bb ] ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb23, %bb.nph210
- %i.0209 = phi i32 [ 0, %bb.nph210 ], [ %81, %bb23 ] ; [#uses=12]
- %scevgep267268 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %i.0209, i32 0, i32 0 ; [#uses=1]
- %scevgep269 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %i.0209, i32 0, i32 1 ; [#uses=1]
- %scevgep270 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %i.0209, i32 0, i32 2 ; [#uses=1]
- %scevgep271 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %i.0209, i32 0, i32 3 ; [#uses=1]
- %scevgep272273 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %i.0209, i32 0, i32 0 ; [#uses=1]
- %scevgep274 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %i.0209, i32 0, i32 1 ; [#uses=1]
- %scevgep275 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %i.0209, i32 0, i32 2 ; [#uses=1]
- %scevgep276 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %i.0209, i32 0, i32 3 ; [#uses=1]
- %scevgep277278 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %i.0209, i32 0, i32 0 ; [#uses=1]
- %scevgep279 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %i.0209, i32 0, i32 1 ; [#uses=1]
- %scevgep280 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %i.0209, i32 0, i32 2 ; [#uses=1]
- %26 = call %struct.btQuadWord* @_ZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEv() nounwind ; [#uses=0]
- %27 = load float* %scevgep277278, align 16 ; [#uses=4]
- %28 = load float* %scevgep279, align 4 ; [#uses=4]
- %29 = load float* %scevgep280, align 8 ; [#uses=4]
- %30 = fsub float -0.000000e+00, %29 ; [#uses=3]
- %31 = fsub float -0.000000e+00, %28 ; [#uses=3]
- %32 = fsub float -0.000000e+00, %27 ; [#uses=3]
- %33 = load float* %8, align 4 ; [#uses=1]
- %34 = fmul float %33, %32 ; [#uses=1]
- %35 = load float* %9, align 4 ; [#uses=1]
- %36 = fmul float %35, %31 ; [#uses=1]
- %37 = fadd float %34, %36 ; [#uses=1]
- %38 = load float* %10, align 4 ; [#uses=1]
- %39 = fmul float %38, %30 ; [#uses=1]
- %40 = fadd float %37, %39 ; [#uses=1]
- %41 = load float* %11, align 4 ; [#uses=1]
- %42 = fmul float %41, %32 ; [#uses=1]
- %43 = load float* %12, align 4 ; [#uses=1]
- %44 = fmul float %43, %31 ; [#uses=1]
- %45 = fadd float %42, %44 ; [#uses=1]
- %46 = load float* %13, align 4 ; [#uses=1]
- %47 = fmul float %46, %30 ; [#uses=1]
- %48 = fadd float %45, %47 ; [#uses=1]
- %49 = load float* %14, align 4 ; [#uses=1]
- %50 = fmul float %49, %32 ; [#uses=1]
- %51 = load float* %15, align 4 ; [#uses=1]
- %52 = fmul float %51, %31 ; [#uses=1]
- %53 = fadd float %50, %52 ; [#uses=1]
- %54 = load float* %16, align 4 ; [#uses=1]
- %55 = fmul float %54, %30 ; [#uses=1]
- %56 = fadd float %53, %55 ; [#uses=1]
- store float %56, float* %scevgep267268, align 8
- store float %48, float* %scevgep269, align 4
- store float %40, float* %scevgep270, align 8
- store float 0.000000e+00, float* %scevgep271, align 4
- %57 = load float* %17, align 4 ; [#uses=1]
- %58 = fmul float %57, %27 ; [#uses=1]
- %59 = load float* %18, align 4 ; [#uses=1]
- %60 = fmul float %59, %28 ; [#uses=1]
- %61 = fadd float %58, %60 ; [#uses=1]
- %62 = load float* %19, align 4 ; [#uses=1]
- %63 = fmul float %62, %29 ; [#uses=1]
- %64 = fadd float %61, %63 ; [#uses=1]
- %65 = load float* %20, align 4 ; [#uses=1]
- %66 = fmul float %65, %27 ; [#uses=1]
- %67 = load float* %21, align 4 ; [#uses=1]
- %68 = fmul float %67, %28 ; [#uses=1]
- %69 = fadd float %66, %68 ; [#uses=1]
- %70 = load float* %22, align 4 ; [#uses=1]
- %71 = fmul float %70, %29 ; [#uses=1]
- %72 = fadd float %69, %71 ; [#uses=1]
- %73 = load float* %23, align 4 ; [#uses=1]
- %74 = fmul float %73, %27 ; [#uses=1]
- %75 = load float* %24, align 4 ; [#uses=1]
- %76 = fmul float %75, %28 ; [#uses=1]
- %77 = fadd float %74, %76 ; [#uses=1]
- %78 = load float* %25, align 4 ; [#uses=1]
- %79 = fmul float %78, %29 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=1]
- store float %80, float* %scevgep272273, align 8
- store float %72, float* %scevgep274, align 4
- store float %64, float* %scevgep275, align 8
- store float 0.000000e+00, float* %scevgep276, align 4
- %81 = add nsw i32 %i.0209, 1 ; [#uses=2]
- %exitcond266 = icmp eq i32 %81, 42 ; [#uses=1]
- br i1 %exitcond266, label %bb26, label %bb23
-
-bb26: ; preds = %bb23
- %82 = getelementptr inbounds %struct.btConvexShape* %convexA, i32 0, i32 0, i32 0 ; [#uses=3]
- %83 = load i32 (...)*** %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds i32 (...)** %83, i32 19 ; [#uses=1]
- %85 = load i32 (...)** %84, align 4 ; [#uses=1]
- %86 = bitcast i32 (...)* %85 to i32 (%struct.btConvexShape*)* ; [#uses=1]
- %87 = call i32 %86(%struct.btConvexShape* %convexA) ; [#uses=4]
- %88 = icmp eq i32 %87, 0 ; [#uses=1]
- %.not = xor i1 %88, true ; [#uses=1]
- %89 = icmp sgt i32 %87, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %89 ; [#uses=1]
- br i1 %or.cond, label %bb.nph, label %bb38
-
-bb.nph: ; preds = %bb26
- %90 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %91 = getelementptr inbounds %struct.btQuadWord* %norm33, i32 0, i32 0, i32 0 ; [#uses=3]
- %92 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btQuadWord* %norm33, i32 0, i32 0, i32 1 ; [#uses=3]
- %94 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %95 = getelementptr inbounds %struct.btQuadWord* %norm33, i32 0, i32 0, i32 2 ; [#uses=3]
- %96 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %97 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %98 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %99 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %100 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %101 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %102 = getelementptr inbounds %struct.btQuadWord* %norm33, i32 0, i32 0, i32 3 ; [#uses=2]
- %103 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- br label %bb31
-
-bb31: ; preds = %bb31, %bb.nph
- %112 = phi i32 [ 0, %bb.nph ], [ %200, %bb31 ] ; [#uses=3]
- %tmp219 = add i32 %112, 42 ; [#uses=12]
- %scevgep220 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp219, i32 0, i32 0 ; [#uses=1]
- %scevgep221 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp219, i32 0, i32 1 ; [#uses=1]
- %scevgep222 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp219, i32 0, i32 2 ; [#uses=1]
- %scevgep223 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp219, i32 0, i32 3 ; [#uses=1]
- %scevgep224225 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp219, i32 0, i32 0 ; [#uses=1]
- %scevgep226 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp219, i32 0, i32 1 ; [#uses=1]
- %scevgep227 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp219, i32 0, i32 2 ; [#uses=1]
- %scevgep228 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp219, i32 0, i32 3 ; [#uses=1]
- %scevgep229230 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp219, i32 0, i32 0 ; [#uses=1]
- %scevgep231 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp219, i32 0, i32 1 ; [#uses=1]
- %scevgep232 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp219, i32 0, i32 2 ; [#uses=1]
- %scevgep233 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp219, i32 0, i32 3 ; [#uses=1]
- %113 = load i32 (...)*** %82, align 4 ; [#uses=1]
- %114 = getelementptr inbounds i32 (...)** %113, i32 20 ; [#uses=1]
- %115 = load i32 (...)** %114, align 4 ; [#uses=1]
- %116 = bitcast i32 (...)* %115 to void (%struct.btConvexShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %116(%struct.btConvexShape* %convexA, i32 %112, %struct.btQuadWord* %norm33)
- %117 = load float* %90, align 4 ; [#uses=1]
- %118 = load float* %91, align 8 ; [#uses=3]
- %119 = fmul float %117, %118 ; [#uses=1]
- %120 = load float* %92, align 4 ; [#uses=1]
- %121 = load float* %93, align 4 ; [#uses=3]
- %122 = fmul float %120, %121 ; [#uses=1]
- %123 = fadd float %119, %122 ; [#uses=1]
- %124 = load float* %94, align 4 ; [#uses=1]
- %125 = load float* %95, align 8 ; [#uses=3]
- %126 = fmul float %124, %125 ; [#uses=1]
- %127 = fadd float %123, %126 ; [#uses=1]
- %128 = load float* %96, align 4 ; [#uses=1]
- %129 = fmul float %128, %118 ; [#uses=1]
- %130 = load float* %97, align 4 ; [#uses=1]
- %131 = fmul float %130, %121 ; [#uses=1]
- %132 = fadd float %129, %131 ; [#uses=1]
- %133 = load float* %98, align 4 ; [#uses=1]
- %134 = fmul float %133, %125 ; [#uses=1]
- %135 = fadd float %132, %134 ; [#uses=1]
- %136 = load float* %99, align 4 ; [#uses=1]
- %137 = fmul float %136, %118 ; [#uses=1]
- %138 = load float* %100, align 4 ; [#uses=1]
- %139 = fmul float %138, %121 ; [#uses=1]
- %140 = fadd float %137, %139 ; [#uses=1]
- %141 = load float* %101, align 4 ; [#uses=1]
- %142 = fmul float %141, %125 ; [#uses=1]
- %143 = fadd float %140, %142 ; [#uses=1]
- store float %143, float* %91, align 8
- store float %135, float* %93, align 4
- store float %127, float* %95, align 8
- store float 0.000000e+00, float* %102, align 4
- %144 = call %struct.btQuadWord* @_ZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEv() nounwind ; [#uses=0]
- %145 = load float* %91, align 8 ; [#uses=5]
- store float %145, float* %scevgep229230, align 16
- %146 = load float* %93, align 4 ; [#uses=5]
- store float %146, float* %scevgep231, align 4
- %147 = load float* %95, align 8 ; [#uses=5]
- store float %147, float* %scevgep232, align 8
- %148 = load float* %102, align 4 ; [#uses=1]
- store float %148, float* %scevgep233, align 4
- %149 = fsub float -0.000000e+00, %147 ; [#uses=3]
- %150 = fsub float -0.000000e+00, %146 ; [#uses=3]
- %151 = fsub float -0.000000e+00, %145 ; [#uses=3]
- %152 = load float* %101, align 4 ; [#uses=1]
- %153 = fmul float %152, %151 ; [#uses=1]
- %154 = load float* %98, align 4 ; [#uses=1]
- %155 = fmul float %154, %150 ; [#uses=1]
- %156 = fadd float %153, %155 ; [#uses=1]
- %157 = load float* %94, align 4 ; [#uses=1]
- %158 = fmul float %157, %149 ; [#uses=1]
- %159 = fadd float %156, %158 ; [#uses=1]
- %160 = load float* %100, align 4 ; [#uses=1]
- %161 = fmul float %160, %151 ; [#uses=1]
- %162 = load float* %97, align 4 ; [#uses=1]
- %163 = fmul float %162, %150 ; [#uses=1]
- %164 = fadd float %161, %163 ; [#uses=1]
- %165 = load float* %92, align 4 ; [#uses=1]
- %166 = fmul float %165, %149 ; [#uses=1]
- %167 = fadd float %164, %166 ; [#uses=1]
- %168 = load float* %99, align 4 ; [#uses=1]
- %169 = fmul float %168, %151 ; [#uses=1]
- %170 = load float* %96, align 4 ; [#uses=1]
- %171 = fmul float %170, %150 ; [#uses=1]
- %172 = fadd float %169, %171 ; [#uses=1]
- %173 = load float* %90, align 4 ; [#uses=1]
- %174 = fmul float %173, %149 ; [#uses=1]
- %175 = fadd float %172, %174 ; [#uses=1]
- store float %175, float* %scevgep220, align 8
- store float %167, float* %scevgep221, align 4
- store float %159, float* %scevgep222, align 8
- store float 0.000000e+00, float* %scevgep223, align 4
- %176 = load float* %103, align 4 ; [#uses=1]
- %177 = fmul float %176, %145 ; [#uses=1]
- %178 = load float* %104, align 4 ; [#uses=1]
- %179 = fmul float %178, %146 ; [#uses=1]
- %180 = fadd float %177, %179 ; [#uses=1]
- %181 = load float* %105, align 4 ; [#uses=1]
- %182 = fmul float %181, %147 ; [#uses=1]
- %183 = fadd float %180, %182 ; [#uses=1]
- %184 = load float* %106, align 4 ; [#uses=1]
- %185 = fmul float %184, %145 ; [#uses=1]
- %186 = load float* %107, align 4 ; [#uses=1]
- %187 = fmul float %186, %146 ; [#uses=1]
- %188 = fadd float %185, %187 ; [#uses=1]
- %189 = load float* %108, align 4 ; [#uses=1]
- %190 = fmul float %189, %147 ; [#uses=1]
- %191 = fadd float %188, %190 ; [#uses=1]
- %192 = load float* %109, align 4 ; [#uses=1]
- %193 = fmul float %192, %145 ; [#uses=1]
- %194 = load float* %110, align 4 ; [#uses=1]
- %195 = fmul float %194, %146 ; [#uses=1]
- %196 = fadd float %193, %195 ; [#uses=1]
- %197 = load float* %111, align 4 ; [#uses=1]
- %198 = fmul float %197, %147 ; [#uses=1]
- %199 = fadd float %196, %198 ; [#uses=1]
- store float %199, float* %scevgep224225, align 8
- store float %191, float* %scevgep226, align 4
- store float %183, float* %scevgep227, align 8
- store float 0.000000e+00, float* %scevgep228, align 4
- %200 = add nsw i32 %112, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %200, %87 ; [#uses=1]
- br i1 %exitcond, label %bb37.bb38.loopexit_crit_edge, label %bb31
-
-bb37.bb38.loopexit_crit_edge: ; preds = %bb31
- %tmp = add i32 %87, 42 ; [#uses=1]
- br label %bb38
-
-bb38: ; preds = %bb37.bb38.loopexit_crit_edge, %bb26
- %numSampleDirections.1 = phi i32 [ 42, %bb26 ], [ %tmp, %bb37.bb38.loopexit_crit_edge ] ; [#uses=3]
- %201 = getelementptr inbounds %struct.btConvexShape* %convexB, i32 0, i32 0, i32 0 ; [#uses=3]
- %202 = load i32 (...)*** %201, align 4 ; [#uses=1]
- %203 = getelementptr inbounds i32 (...)** %202, i32 19 ; [#uses=1]
- %204 = load i32 (...)** %203, align 4 ; [#uses=1]
- %205 = bitcast i32 (...)* %204 to i32 (%struct.btConvexShape*)* ; [#uses=1]
- %206 = call i32 %205(%struct.btConvexShape* %convexB) ; [#uses=4]
- %207 = icmp eq i32 %206, 0 ; [#uses=1]
- %.not285 = xor i1 %207, true ; [#uses=1]
- %208 = icmp sgt i32 %206, 0 ; [#uses=1]
- %or.cond286 = and i1 %.not285, %208 ; [#uses=1]
- br i1 %or.cond286, label %bb.nph189, label %bb50
-
-bb.nph189: ; preds = %bb38
- %209 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %210 = getelementptr inbounds %struct.btQuadWord* %norm45, i32 0, i32 0, i32 0 ; [#uses=3]
- %211 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %212 = getelementptr inbounds %struct.btQuadWord* %norm45, i32 0, i32 0, i32 1 ; [#uses=3]
- %213 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %214 = getelementptr inbounds %struct.btQuadWord* %norm45, i32 0, i32 0, i32 2 ; [#uses=3]
- %215 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %216 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %217 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %218 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %219 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %220 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %221 = getelementptr inbounds %struct.btQuadWord* %norm45, i32 0, i32 0, i32 3 ; [#uses=2]
- %222 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %223 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %224 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %225 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %226 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %228 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %229 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- br label %bb43
-
-bb43: ; preds = %bb43, %bb.nph189
- %231 = phi i32 [ 0, %bb.nph189 ], [ %319, %bb43 ] ; [#uses=3]
- %tmp236 = add i32 %numSampleDirections.1, %231 ; [#uses=12]
- %scevgep237238 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp236, i32 0, i32 0 ; [#uses=1]
- %scevgep239 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp236, i32 0, i32 1 ; [#uses=1]
- %scevgep240 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp236, i32 0, i32 2 ; [#uses=1]
- %scevgep241 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 %tmp236, i32 0, i32 3 ; [#uses=1]
- %scevgep242243 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp236, i32 0, i32 0 ; [#uses=1]
- %scevgep244 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp236, i32 0, i32 1 ; [#uses=1]
- %scevgep245 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp236, i32 0, i32 2 ; [#uses=1]
- %scevgep246 = getelementptr [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 %tmp236, i32 0, i32 3 ; [#uses=1]
- %scevgep247248 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp236, i32 0, i32 0 ; [#uses=1]
- %scevgep249 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp236, i32 0, i32 1 ; [#uses=1]
- %scevgep250 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp236, i32 0, i32 2 ; [#uses=1]
- %scevgep251 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %tmp236, i32 0, i32 3 ; [#uses=1]
- %232 = load i32 (...)*** %201, align 4 ; [#uses=1]
- %233 = getelementptr inbounds i32 (...)** %232, i32 20 ; [#uses=1]
- %234 = load i32 (...)** %233, align 4 ; [#uses=1]
- %235 = bitcast i32 (...)* %234 to void (%struct.btConvexShape*, i32, %struct.btQuadWord*)* ; [#uses=1]
- call void %235(%struct.btConvexShape* %convexB, i32 %231, %struct.btQuadWord* %norm45)
- %236 = load float* %209, align 4 ; [#uses=1]
- %237 = load float* %210, align 8 ; [#uses=3]
- %238 = fmul float %236, %237 ; [#uses=1]
- %239 = load float* %211, align 4 ; [#uses=1]
- %240 = load float* %212, align 4 ; [#uses=3]
- %241 = fmul float %239, %240 ; [#uses=1]
- %242 = fadd float %238, %241 ; [#uses=1]
- %243 = load float* %213, align 4 ; [#uses=1]
- %244 = load float* %214, align 8 ; [#uses=3]
- %245 = fmul float %243, %244 ; [#uses=1]
- %246 = fadd float %242, %245 ; [#uses=1]
- %247 = load float* %215, align 4 ; [#uses=1]
- %248 = fmul float %247, %237 ; [#uses=1]
- %249 = load float* %216, align 4 ; [#uses=1]
- %250 = fmul float %249, %240 ; [#uses=1]
- %251 = fadd float %248, %250 ; [#uses=1]
- %252 = load float* %217, align 4 ; [#uses=1]
- %253 = fmul float %252, %244 ; [#uses=1]
- %254 = fadd float %251, %253 ; [#uses=1]
- %255 = load float* %218, align 4 ; [#uses=1]
- %256 = fmul float %255, %237 ; [#uses=1]
- %257 = load float* %219, align 4 ; [#uses=1]
- %258 = fmul float %257, %240 ; [#uses=1]
- %259 = fadd float %256, %258 ; [#uses=1]
- %260 = load float* %220, align 4 ; [#uses=1]
- %261 = fmul float %260, %244 ; [#uses=1]
- %262 = fadd float %259, %261 ; [#uses=1]
- store float %262, float* %210, align 8
- store float %254, float* %212, align 4
- store float %246, float* %214, align 8
- store float 0.000000e+00, float* %221, align 4
- %263 = call %struct.btQuadWord* @_ZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEv() nounwind ; [#uses=0]
- %264 = load float* %210, align 8 ; [#uses=5]
- store float %264, float* %scevgep247248, align 16
- %265 = load float* %212, align 4 ; [#uses=5]
- store float %265, float* %scevgep249, align 4
- %266 = load float* %214, align 8 ; [#uses=5]
- store float %266, float* %scevgep250, align 8
- %267 = load float* %221, align 4 ; [#uses=1]
- store float %267, float* %scevgep251, align 4
- %268 = fsub float -0.000000e+00, %266 ; [#uses=3]
- %269 = fsub float -0.000000e+00, %265 ; [#uses=3]
- %270 = fsub float -0.000000e+00, %264 ; [#uses=3]
- %271 = load float* %222, align 4 ; [#uses=1]
- %272 = fmul float %271, %270 ; [#uses=1]
- %273 = load float* %223, align 4 ; [#uses=1]
- %274 = fmul float %273, %269 ; [#uses=1]
- %275 = fadd float %272, %274 ; [#uses=1]
- %276 = load float* %224, align 4 ; [#uses=1]
- %277 = fmul float %276, %268 ; [#uses=1]
- %278 = fadd float %275, %277 ; [#uses=1]
- %279 = load float* %225, align 4 ; [#uses=1]
- %280 = fmul float %279, %270 ; [#uses=1]
- %281 = load float* %226, align 4 ; [#uses=1]
- %282 = fmul float %281, %269 ; [#uses=1]
- %283 = fadd float %280, %282 ; [#uses=1]
- %284 = load float* %227, align 4 ; [#uses=1]
- %285 = fmul float %284, %268 ; [#uses=1]
- %286 = fadd float %283, %285 ; [#uses=1]
- %287 = load float* %228, align 4 ; [#uses=1]
- %288 = fmul float %287, %270 ; [#uses=1]
- %289 = load float* %229, align 4 ; [#uses=1]
- %290 = fmul float %289, %269 ; [#uses=1]
- %291 = fadd float %288, %290 ; [#uses=1]
- %292 = load float* %230, align 4 ; [#uses=1]
- %293 = fmul float %292, %268 ; [#uses=1]
- %294 = fadd float %291, %293 ; [#uses=1]
- store float %294, float* %scevgep237238, align 8
- store float %286, float* %scevgep239, align 4
- store float %278, float* %scevgep240, align 8
- store float 0.000000e+00, float* %scevgep241, align 4
- %295 = load float* %220, align 4 ; [#uses=1]
- %296 = fmul float %295, %264 ; [#uses=1]
- %297 = load float* %217, align 4 ; [#uses=1]
- %298 = fmul float %297, %265 ; [#uses=1]
- %299 = fadd float %296, %298 ; [#uses=1]
- %300 = load float* %213, align 4 ; [#uses=1]
- %301 = fmul float %300, %266 ; [#uses=1]
- %302 = fadd float %299, %301 ; [#uses=1]
- %303 = load float* %219, align 4 ; [#uses=1]
- %304 = fmul float %303, %264 ; [#uses=1]
- %305 = load float* %216, align 4 ; [#uses=1]
- %306 = fmul float %305, %265 ; [#uses=1]
- %307 = fadd float %304, %306 ; [#uses=1]
- %308 = load float* %211, align 4 ; [#uses=1]
- %309 = fmul float %308, %266 ; [#uses=1]
- %310 = fadd float %307, %309 ; [#uses=1]
- %311 = load float* %218, align 4 ; [#uses=1]
- %312 = fmul float %311, %264 ; [#uses=1]
- %313 = load float* %215, align 4 ; [#uses=1]
- %314 = fmul float %313, %265 ; [#uses=1]
- %315 = fadd float %312, %314 ; [#uses=1]
- %316 = load float* %209, align 4 ; [#uses=1]
- %317 = fmul float %316, %266 ; [#uses=1]
- %318 = fadd float %315, %317 ; [#uses=1]
- store float %318, float* %scevgep242243, align 8
- store float %310, float* %scevgep244, align 4
- store float %302, float* %scevgep245, align 8
- store float 0.000000e+00, float* %scevgep246, align 4
- %319 = add nsw i32 %231, 1 ; [#uses=2]
- %exitcond235 = icmp eq i32 %319, %206 ; [#uses=1]
- br i1 %exitcond235, label %bb49.bb50.loopexit_crit_edge, label %bb43
-
-bb49.bb50.loopexit_crit_edge: ; preds = %bb43
- %tmp234 = add i32 %206, %numSampleDirections.1 ; [#uses=1]
- br label %bb50
-
-bb50: ; preds = %bb49.bb50.loopexit_crit_edge, %bb38
- %numSampleDirections.3 = phi i32 [ %numSampleDirections.1, %bb38 ], [ %tmp234, %bb49.bb50.loopexit_crit_edge ] ; [#uses=4]
- %320 = load i32 (...)*** %82, align 4 ; [#uses=1]
- %321 = getelementptr inbounds i32 (...)** %320, i32 17 ; [#uses=1]
- %322 = load i32 (...)** %321, align 4 ; [#uses=1]
- %323 = bitcast i32 (...)* %322 to void (%struct.btConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* ; [#uses=1]
- %324 = getelementptr inbounds [62 x %struct.btQuadWord]* %seperatingAxisInABatch, i32 0, i32 0 ; [#uses=1]
- %325 = getelementptr inbounds [62 x %struct.btQuadWord]* %supportVerticesABatch, i32 0, i32 0 ; [#uses=1]
- call void %323(%struct.btConvexShape* %convexA, %struct.btQuadWord* %324, %struct.btQuadWord* %325, i32 %numSampleDirections.3)
- %326 = load i32 (...)*** %201, align 4 ; [#uses=1]
- %327 = getelementptr inbounds i32 (...)** %326, i32 17 ; [#uses=1]
- %328 = load i32 (...)** %327, align 4 ; [#uses=1]
- %329 = bitcast i32 (...)* %328 to void (%struct.btConvexShape*, %struct.btQuadWord*, %struct.btQuadWord*, i32)* ; [#uses=1]
- %330 = getelementptr inbounds [62 x %struct.btQuadWord]* %seperatingAxisInBBatch, i32 0, i32 0 ; [#uses=1]
- %331 = getelementptr inbounds [62 x %struct.btQuadWord]* %supportVerticesBBatch, i32 0, i32 0 ; [#uses=1]
- call void %329(%struct.btConvexShape* %convexB, %struct.btQuadWord* %330, %struct.btQuadWord* %331, i32 %numSampleDirections.3)
- %332 = icmp sgt i32 %numSampleDirections.3, 0 ; [#uses=1]
- br i1 %332, label %bb.nph203, label %bb69
-
-bb.nph203: ; preds = %bb50
- %toBool54 = icmp eq i8 %iftmp.120.0, 0 ; [#uses=3]
- %333 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %334 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %335 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %336 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %337 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %338 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %339 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %340 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %341 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %342 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %343 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %344 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %345 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %346 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %347 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %348 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %349 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %350 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %351 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %352 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %353 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %354 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %355 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %356 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- br label %bb51
-
-bb51: ; preds = %bb67, %bb.nph203
- %i.1202 = phi i32 [ 0, %bb.nph203 ], [ %444, %bb67 ] ; [#uses=11]
- %minProj.1201 = phi float [ 0x43ABC16D60000000, %bb.nph203 ], [ %minProj.0, %bb67 ] ; [#uses=3]
- %minNorm.0.3.1194 = phi float [ 0.000000e+00, %bb.nph203 ], [ %minNorm.0.3.0, %bb67 ] ; [#uses=2]
- %minNorm.0.2.1193 = phi float [ 0.000000e+00, %bb.nph203 ], [ %minNorm.0.2.0, %bb67 ] ; [#uses=2]
- %minNorm.0.1.1192 = phi float [ 0.000000e+00, %bb.nph203 ], [ %minNorm.0.1.0, %bb67 ] ; [#uses=2]
- %minNorm.0.0.1191 = phi float [ 0.000000e+00, %bb.nph203 ], [ %minNorm.0.0.0, %bb67 ] ; [#uses=2]
- %scevgep261262 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %i.1202, i32 0, i32 0 ; [#uses=1]
- %scevgep263 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %i.1202, i32 0, i32 1 ; [#uses=1]
- %scevgep264 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %i.1202, i32 0, i32 2 ; [#uses=1]
- %scevgep265 = getelementptr [62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 %i.1202, i32 0, i32 3 ; [#uses=1]
- %357 = call %struct.btQuadWord* @_ZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEv() nounwind ; [#uses=0]
- %358 = load float* %scevgep261262, align 16 ; [#uses=4]
- %359 = load float* %scevgep263, align 4 ; [#uses=4]
- %360 = load float* %scevgep264, align 8 ; [#uses=1]
- %361 = load float* %scevgep265, align 4 ; [#uses=1]
- %norm53.0.2.0 = select i1 %toBool54, float %360, float 0.000000e+00 ; [#uses=4]
- %362 = fmul float %358, %358 ; [#uses=1]
- %363 = fmul float %359, %359 ; [#uses=1]
- %364 = fadd float %362, %363 ; [#uses=1]
- %365 = fmul float %norm53.0.2.0, %norm53.0.2.0 ; [#uses=1]
- %366 = fadd float %364, %365 ; [#uses=1]
- %367 = fpext float %366 to double ; [#uses=1]
- %368 = fcmp ogt double %367, 1.000000e-02 ; [#uses=1]
- br i1 %368, label %bb58, label %bb67
-
-bb58: ; preds = %bb51
- %scevgep260 = getelementptr [62 x %struct.btQuadWord]* %supportVerticesBBatch, i32 0, i32 %i.1202, i32 0, i32 2 ; [#uses=1]
- %scevgep259 = getelementptr [62 x %struct.btQuadWord]* %supportVerticesBBatch, i32 0, i32 %i.1202, i32 0, i32 1 ; [#uses=1]
- %scevgep257258 = getelementptr [62 x %struct.btQuadWord]* %supportVerticesBBatch, i32 0, i32 %i.1202, i32 0, i32 0 ; [#uses=1]
- %scevgep256 = getelementptr [62 x %struct.btQuadWord]* %supportVerticesABatch, i32 0, i32 %i.1202, i32 0, i32 2 ; [#uses=1]
- %scevgep255 = getelementptr [62 x %struct.btQuadWord]* %supportVerticesABatch, i32 0, i32 %i.1202, i32 0, i32 1 ; [#uses=1]
- %scevgep253254 = getelementptr [62 x %struct.btQuadWord]* %supportVerticesABatch, i32 0, i32 %i.1202, i32 0, i32 0 ; [#uses=1]
- %369 = load float* %scevgep253254, align 8 ; [#uses=3]
- %370 = load float* %scevgep255, align 4 ; [#uses=3]
- %371 = load float* %scevgep256, align 8 ; [#uses=3]
- %372 = load float* %scevgep257258, align 8 ; [#uses=3]
- %373 = load float* %scevgep259, align 4 ; [#uses=3]
- %374 = load float* %scevgep260, align 8 ; [#uses=3]
- %375 = load float* %333, align 4 ; [#uses=1]
- %376 = fmul float %375, %369 ; [#uses=1]
- %377 = load float* %334, align 4 ; [#uses=1]
- %378 = fmul float %377, %370 ; [#uses=1]
- %379 = fadd float %376, %378 ; [#uses=1]
- %380 = load float* %335, align 4 ; [#uses=1]
- %381 = fmul float %380, %371 ; [#uses=1]
- %382 = fadd float %379, %381 ; [#uses=1]
- %383 = load float* %336, align 4 ; [#uses=1]
- %384 = fadd float %382, %383 ; [#uses=1]
- %385 = load float* %337, align 4 ; [#uses=1]
- %386 = fmul float %385, %369 ; [#uses=1]
- %387 = load float* %338, align 4 ; [#uses=1]
- %388 = fmul float %387, %370 ; [#uses=1]
- %389 = fadd float %386, %388 ; [#uses=1]
- %390 = load float* %339, align 4 ; [#uses=1]
- %391 = fmul float %390, %371 ; [#uses=1]
- %392 = fadd float %389, %391 ; [#uses=1]
- %393 = load float* %340, align 4 ; [#uses=1]
- %394 = fadd float %392, %393 ; [#uses=1]
- %395 = load float* %341, align 4 ; [#uses=1]
- %396 = fmul float %395, %369 ; [#uses=1]
- %397 = load float* %342, align 4 ; [#uses=1]
- %398 = fmul float %397, %370 ; [#uses=1]
- %399 = fadd float %396, %398 ; [#uses=1]
- %400 = load float* %343, align 4 ; [#uses=1]
- %401 = fmul float %400, %371 ; [#uses=1]
- %402 = fadd float %399, %401 ; [#uses=1]
- %403 = load float* %344, align 4 ; [#uses=1]
- %404 = fadd float %402, %403 ; [#uses=1]
- %405 = load float* %345, align 4 ; [#uses=1]
- %406 = fmul float %405, %372 ; [#uses=1]
- %407 = load float* %346, align 4 ; [#uses=1]
- %408 = fmul float %407, %373 ; [#uses=1]
- %409 = fadd float %406, %408 ; [#uses=1]
- %410 = load float* %347, align 4 ; [#uses=1]
- %411 = fmul float %410, %374 ; [#uses=1]
- %412 = fadd float %409, %411 ; [#uses=1]
- %413 = load float* %348, align 4 ; [#uses=1]
- %414 = fadd float %412, %413 ; [#uses=1]
- %415 = load float* %349, align 4 ; [#uses=1]
- %416 = fmul float %415, %372 ; [#uses=1]
- %417 = load float* %350, align 4 ; [#uses=1]
- %418 = fmul float %417, %373 ; [#uses=1]
- %419 = fadd float %416, %418 ; [#uses=1]
- %420 = load float* %351, align 4 ; [#uses=1]
- %421 = fmul float %420, %374 ; [#uses=1]
- %422 = fadd float %419, %421 ; [#uses=1]
- %423 = load float* %352, align 4 ; [#uses=1]
- %424 = fadd float %422, %423 ; [#uses=1]
- %425 = load float* %353, align 4 ; [#uses=1]
- %426 = fmul float %425, %372 ; [#uses=1]
- %427 = load float* %354, align 4 ; [#uses=1]
- %428 = fmul float %427, %373 ; [#uses=1]
- %429 = fadd float %426, %428 ; [#uses=1]
- %430 = load float* %355, align 4 ; [#uses=1]
- %431 = fmul float %430, %374 ; [#uses=1]
- %432 = fadd float %429, %431 ; [#uses=1]
- %433 = load float* %356, align 4 ; [#uses=1]
- %434 = fadd float %432, %433 ; [#uses=1]
- %pWorld.0.2.0 = select i1 %toBool54, float %384, float 0.000000e+00 ; [#uses=1]
- %qWorld.0.2.0 = select i1 %toBool54, float %414, float 0.000000e+00 ; [#uses=1]
- %435 = fsub float %qWorld.0.2.0, %pWorld.0.2.0 ; [#uses=1]
- %436 = fsub float %424, %394 ; [#uses=1]
- %437 = fsub float %434, %404 ; [#uses=1]
- %438 = fmul float %358, %437 ; [#uses=1]
- %439 = fmul float %359, %436 ; [#uses=1]
- %440 = fadd float %438, %439 ; [#uses=1]
- %441 = fmul float %norm53.0.2.0, %435 ; [#uses=1]
- %442 = fadd float %440, %441 ; [#uses=2]
- %443 = fcmp olt float %442, %minProj.1201 ; [#uses=1]
- br i1 %443, label %bb66, label %bb67
-
-bb66: ; preds = %bb58
- br label %bb67
-
-bb67: ; preds = %bb66, %bb58, %bb51
- %minNorm.0.0.0 = phi float [ %358, %bb66 ], [ %minNorm.0.0.1191, %bb58 ], [ %minNorm.0.0.1191, %bb51 ] ; [#uses=2]
- %minNorm.0.1.0 = phi float [ %359, %bb66 ], [ %minNorm.0.1.1192, %bb58 ], [ %minNorm.0.1.1192, %bb51 ] ; [#uses=2]
- %minNorm.0.2.0 = phi float [ %norm53.0.2.0, %bb66 ], [ %minNorm.0.2.1193, %bb58 ], [ %minNorm.0.2.1193, %bb51 ] ; [#uses=2]
- %minNorm.0.3.0 = phi float [ %361, %bb66 ], [ %minNorm.0.3.1194, %bb58 ], [ %minNorm.0.3.1194, %bb51 ] ; [#uses=2]
- %minProj.0 = phi float [ %442, %bb66 ], [ %minProj.1201, %bb58 ], [ %minProj.1201, %bb51 ] ; [#uses=2]
- %444 = add nsw i32 %i.1202, 1 ; [#uses=2]
- %exitcond252 = icmp eq i32 %444, %numSampleDirections.3 ; [#uses=1]
- br i1 %exitcond252, label %bb69, label %bb51
-
-bb69: ; preds = %bb67, %bb50
- %minProj.1.lcssa = phi float [ 0x43ABC16D60000000, %bb50 ], [ %minProj.0, %bb67 ] ; [#uses=2]
- %minNorm.0.3.1.lcssa = phi float [ 0.000000e+00, %bb50 ], [ %minNorm.0.3.0, %bb67 ] ; [#uses=1]
- %minNorm.0.2.1.lcssa = phi float [ 0.000000e+00, %bb50 ], [ %minNorm.0.2.0, %bb67 ] ; [#uses=4]
- %minNorm.0.1.1.lcssa = phi float [ 0.000000e+00, %bb50 ], [ %minNorm.0.1.0, %bb67 ] ; [#uses=4]
- %minNorm.0.0.1.lcssa = phi float [ 0.000000e+00, %bb50 ], [ %minNorm.0.0.0, %bb67 ] ; [#uses=4]
- %445 = call float @_ZNK13btConvexShape19getMarginNonVirtualEv(%struct.btConvexShape* %convexA) ; [#uses=0]
- %446 = call float @_ZNK13btConvexShape19getMarginNonVirtualEv(%struct.btConvexShape* %convexB) ; [#uses=0]
- %447 = fcmp olt float %minProj.1.lcssa, 0.000000e+00 ; [#uses=1]
- br i1 %447, label %bb79, label %bb71
-
-bb71: ; preds = %bb69
- %448 = call float @_ZNK13btConvexShape19getMarginNonVirtualEv(%struct.btConvexShape* %convexA) ; [#uses=1]
- %449 = call float @_ZNK13btConvexShape19getMarginNonVirtualEv(%struct.btConvexShape* %convexB) ; [#uses=1]
- %450 = fadd float %448, %449 ; [#uses=1]
- %451 = fadd float %450, 5.000000e-01 ; [#uses=1]
- %452 = fadd float %451, %minProj.1.lcssa ; [#uses=4]
- call void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* %gjkdet, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* null)
- %453 = fmul float %minNorm.0.2.1.lcssa, %452 ; [#uses=1]
- %454 = fmul float %minNorm.0.1.1.lcssa, %452 ; [#uses=1]
- %455 = fmul float %minNorm.0.0.1.lcssa, %452 ; [#uses=1]
- %456 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=1]
- %457 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %457, align 4
- %458 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %459 = load float* %458, align 4 ; [#uses=1]
- %460 = fadd float %459, %453 ; [#uses=1]
- %461 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %462 = load float* %461, align 4 ; [#uses=1]
- %463 = fadd float %462, %454 ; [#uses=1]
- %464 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %465 = load float* %464, align 4 ; [#uses=1]
- %466 = fadd float %465, %455 ; [#uses=1]
- %467 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %468 = load float* %467, align 4 ; [#uses=1]
- %469 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %470 = load float* %469, align 4 ; [#uses=1]
- %471 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %472 = load float* %471, align 4 ; [#uses=1]
- %473 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %474 = load float* %473, align 4 ; [#uses=1]
- %475 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %476 = load float* %475, align 4 ; [#uses=1]
- %477 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %478 = load float* %477, align 4 ; [#uses=1]
- %479 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %480 = load float* %479, align 4 ; [#uses=1]
- %481 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %482 = load float* %481, align 4 ; [#uses=1]
- %483 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %484 = load float* %483, align 4 ; [#uses=1]
- %485 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %486 = load float* %485, align 4 ; [#uses=1]
- %487 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %488 = load float* %487, align 4 ; [#uses=1]
- %489 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %490 = load float* %489, align 4 ; [#uses=1]
- %491 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %468, float* %491, align 8
- %492 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %470, float* %492, align 4
- %493 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %472, float* %493, align 8
- %494 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %474, float* %494, align 4
- %495 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %476, float* %495, align 8
- %496 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %478, float* %496, align 4
- %497 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %480, float* %497, align 8
- %498 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %482, float* %498, align 4
- %499 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %484, float* %499, align 8
- %500 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %486, float* %500, align 4
- %501 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %488, float* %501, align 8
- %502 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %490, float* %502, align 4
- %503 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %466, float* %503, align 8
- %504 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %463, float* %504, align 4
- %505 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %460, float* %505, align 8
- %506 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %506, align 4
- %507 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %508 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %509 = load float* %508, align 4 ; [#uses=1]
- store float %509, float* %507, align 8
- %510 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %511 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %512 = load float* %511, align 4 ; [#uses=1]
- store float %512, float* %510, align 4
- %513 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %514 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %515 = load float* %514, align 4 ; [#uses=1]
- store float %515, float* %513, align 8
- %516 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %517 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %518 = load float* %517, align 4 ; [#uses=1]
- store float %518, float* %516, align 4
- %519 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %520 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %521 = load float* %520, align 4 ; [#uses=1]
- store float %521, float* %519, align 8
- %522 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %523 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %524 = load float* %523, align 4 ; [#uses=1]
- store float %524, float* %522, align 4
- %525 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %526 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %527 = load float* %526, align 4 ; [#uses=1]
- store float %527, float* %525, align 8
- %528 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %529 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %530 = load float* %529, align 4 ; [#uses=1]
- store float %530, float* %528, align 4
- %531 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %532 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %533 = load float* %532, align 4 ; [#uses=1]
- store float %533, float* %531, align 8
- %534 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %535 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %536 = load float* %535, align 4 ; [#uses=1]
- store float %536, float* %534, align 4
- %537 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %538 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %539 = load float* %538, align 4 ; [#uses=1]
- store float %539, float* %537, align 8
- %540 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %541 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %542 = load float* %541, align 4 ; [#uses=1]
- store float %542, float* %540, align 4
- %543 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %544 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %545 = load float* %544, align 4 ; [#uses=1]
- store float %545, float* %543, align 8
- %546 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %547 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %548 = load float* %547, align 4 ; [#uses=1]
- store float %548, float* %546, align 4
- %549 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %550 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %551 = load float* %550, align 4 ; [#uses=1]
- store float %551, float* %549, align 8
- %552 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %553 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %554 = load float* %553, align 4 ; [#uses=1]
- store float %554, float* %552, align 4
- store float 0x43ABC16D60000000, float* %456, align 8
- %555 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 0, i32 0 ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTVZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult, i32 0, i32 2), i32 (...)*** %555, align 8
- %556 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 4 ; [#uses=2]
- store i8 0, i8* %556, align 8
- %557 = fsub float -0.000000e+00, %minNorm.0.2.1.lcssa ; [#uses=1]
- %558 = fsub float -0.000000e+00, %minNorm.0.1.1.lcssa ; [#uses=1]
- %559 = fsub float -0.000000e+00, %minNorm.0.0.1.lcssa ; [#uses=1]
- %560 = getelementptr inbounds %struct.btGjkPairDetector* %gjkdet, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %559, float* %560, align 4
- %561 = getelementptr inbounds %struct.btGjkPairDetector* %gjkdet, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %558, float* %561, align 4
- %562 = getelementptr inbounds %struct.btGjkPairDetector* %gjkdet, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %557, float* %562, align 4
- %563 = getelementptr inbounds %struct.btGjkPairDetector* %gjkdet, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %563, align 4
- %564 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %gjkdet, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %564, %struct.btActionInterface* %debugDraw, i8 zeroext 0)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb71
- %565 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 3 ; [#uses=1]
- %566 = load float* %565, align 4 ; [#uses=1]
- %567 = fsub float %452, %566 ; [#uses=3]
- %568 = load i8* %556, align 8 ; [#uses=3]
- %toBool72 = icmp eq i8 %568, 0 ; [#uses=1]
- br i1 %toBool72, label %bb75, label %bb73
-
-bb73: ; preds = %invcont
- %569 = fmul float %minNorm.0.2.1.lcssa, %567 ; [#uses=1]
- %570 = fmul float %minNorm.0.1.1.lcssa, %567 ; [#uses=1]
- %571 = fmul float %minNorm.0.0.1.lcssa, %567 ; [#uses=1]
- %572 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %573 = load float* %572, align 4 ; [#uses=2]
- %574 = fsub float %573, %569 ; [#uses=1]
- %575 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %576 = load float* %575, align 4 ; [#uses=2]
- %577 = fsub float %576, %570 ; [#uses=1]
- %578 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %579 = load float* %578, align 4 ; [#uses=2]
- %580 = fsub float %579, %571 ; [#uses=1]
- %581 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %580, float* %581, align 4
- %582 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %577, float* %582, align 4
- %583 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %574, float* %583, align 4
- %584 = getelementptr inbounds %struct.btQuadWord* %pa, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %584, align 4
- %585 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %579, float* %585, align 4
- %586 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %576, float* %586, align 4
- %587 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %573, float* %587, align 4
- %588 = getelementptr inbounds %struct.btQuadWord* %pb, i32 0, i32 0, i32 3 ; [#uses=1]
- %589 = getelementptr inbounds %struct..0btIntermediateResult* %res, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %590 = load float* %589, align 4 ; [#uses=1]
- store float %590, float* %588, align 4
- %591 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %minNorm.0.0.1.lcssa, float* %591, align 4
- %592 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %minNorm.0.1.1.lcssa, float* %592, align 4
- %593 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %minNorm.0.2.1.lcssa, float* %593, align 4
- %594 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %minNorm.0.3.1.lcssa, float* %594, align 4
- ret i8 %568
-
-bb75: ; preds = %invcont
- ret i8 %568
-
-bb79: ; preds = %bb69
- ret i8 0
-
-lpad: ; preds = %bb71
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select83 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTVZN33btMinkowskiPenetrationDepthSolver12calcPenDepthER22btVoronoiSimplexSolverPK13btConvexShapeS4_RK11btTransformS7_R9btVector3S9_S9_P12btIDebugDrawP12btStackAllocE20btIntermediateResult, i32 0, i32 2), i32 (...)*** %555, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=4]
-define %struct.btQuadWord* @_ZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEv() nounwind align 2 {
-entry:
- %0 = load i8* bitcast (i64* @_ZGVZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections to i8*), align 8 ; [#uses=1]
- %1 = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb5
-
-bb: ; preds = %entry
- %2 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections) nounwind ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb5, label %bb4
-
-bb4: ; preds = %bb
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 0, i32 0, i32 0), align 32
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 0, i32 0, i32 1), align 4
- store float -1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0x3FE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 1, i32 0, i32 0), align 16
- store float 0xBFE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0xBFDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0xBFD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0xBFEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 2, i32 0, i32 1), align 4
- store float 0xBFDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 2, i32 0, i32 3), align 4
- store float 0xBFEC9F2340000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 3, i32 0, i32 0), align 16
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 3, i32 0, i32 1), align 4
- store float 0xBFDC9F2FE0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 3, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 3, i32 0, i32 3), align 4
- store float 0xBFD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 4, i32 0, i32 0), align 32
- store float 0x3FEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 4, i32 0, i32 1), align 4
- store float 0xBFDC9F40A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 4, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 4, i32 0, i32 3), align 4
- store float 0x3FE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 5, i32 0, i32 0), align 16
- store float 0x3FE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 5, i32 0, i32 1), align 4
- store float 0xBFDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 5, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 5, i32 0, i32 3), align 4
- store float 0x3FD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 6, i32 0, i32 0), align 32
- store float 0xBFEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 6, i32 0, i32 1), align 4
- store float 0x3FDC9F40A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 6, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 6, i32 0, i32 3), align 4
- store float 0xBFE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 7, i32 0, i32 0), align 16
- store float 0xBFE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 7, i32 0, i32 1), align 4
- store float 0x3FDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 7, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 7, i32 0, i32 3), align 4
- store float 0xBFE727CC00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 8, i32 0, i32 0), align 32
- store float 0x3FE0D2BD40000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 8, i32 0, i32 1), align 4
- store float 0x3FDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 8, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 8, i32 0, i32 3), align 4
- store float 0x3FD1B05740000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 9, i32 0, i32 0), align 16
- store float 0x3FEB388440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 9, i32 0, i32 1), align 4
- store float 0x3FDC9F3C80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 9, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 9, i32 0, i32 3), align 4
- store float 0x3FEC9F2340000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 10, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 10, i32 0, i32 1), align 4
- store float 0x3FDC9F2FE0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 10, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 10, i32 0, i32 3), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 11, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 11, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 11, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 11, i32 0, i32 3), align 4
- store float 0x3FDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 12, i32 0, i32 0), align 32
- store float 0xBFD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 12, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 12, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 12, i32 0, i32 3), align 4
- store float 0xBFC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 13, i32 0, i32 0), align 16
- store float 0xBFDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 13, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 13, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 13, i32 0, i32 3), align 4
- store float 0x3FD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 14, i32 0, i32 0), align 32
- store float 0xBFE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 14, i32 0, i32 1), align 4
- store float 0xBFE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 14, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 14, i32 0, i32 3), align 4
- store float 0x3FDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 15, i32 0, i32 0), align 16
- store float 0x3FD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 15, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 15, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 15, i32 0, i32 3), align 4
- store float 0x3FEB388220000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 16, i32 0, i32 0), align 32
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 16, i32 0, i32 1), align 4
- store float 0xBFE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 16, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 16, i32 0, i32 3), align 4
- store float 0xBFE0D2C7C0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 17, i32 0, i32 0), align 16
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 17, i32 0, i32 1), align 4
- store float 0xBFEB388A80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 17, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 17, i32 0, i32 3), align 4
- store float 0xBFE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 18, i32 0, i32 0), align 32
- store float 0xBFDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 18, i32 0, i32 1), align 4
- store float 0xBFE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 18, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 18, i32 0, i32 3), align 4
- store float 0xBFC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 19, i32 0, i32 0), align 16
- store float 0x3FDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 19, i32 0, i32 1), align 4
- store float 0xBFEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 19, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 19, i32 0, i32 3), align 4
- store float 0xBFE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 20, i32 0, i32 0), align 32
- store float 0x3FDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 20, i32 0, i32 1), align 4
- store float 0xBFE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 20, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 20, i32 0, i32 3), align 4
- store float 0x3FD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 21, i32 0, i32 0), align 16
- store float 0x3FE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 21, i32 0, i32 1), align 4
- store float 0xBFE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 21, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 21, i32 0, i32 3), align 4
- store float 0x3FEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 22, i32 0, i32 0), align 32
- store float 0x3FD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 22, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 22, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 22, i32 0, i32 3), align 4
- store float 0x3FEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 23, i32 0, i32 0), align 16
- store float 0xBFD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 23, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 23, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 23, i32 0, i32 3), align 4
- store float 0x3FE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 24, i32 0, i32 0), align 32
- store float 0xBFE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 24, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 24, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 24, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 25, i32 0, i32 0), align 16
- store float -1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 25, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 25, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 25, i32 0, i32 3), align 4
- store float 0xBFE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 26, i32 0, i32 0), align 32
- store float 0xBFE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 26, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 26, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 26, i32 0, i32 3), align 4
- store float 0xBFEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 27, i32 0, i32 0), align 16
- store float 0xBFD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 27, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 27, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 27, i32 0, i32 3), align 4
- store float 0xBFEE6F1120000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 28, i32 0, i32 0), align 32
- store float 0x3FD3C6DE80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 28, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 28, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 28, i32 0, i32 3), align 4
- store float 0xBFE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 29, i32 0, i32 0), align 16
- store float 0x3FE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 29, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 29, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 29, i32 0, i32 3), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 30, i32 0, i32 0), align 32
- store float 1.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 30, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 30, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 30, i32 0, i32 3), align 4
- store float 0x3FE2CF24A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 31, i32 0, i32 0), align 16
- store float 0x3FE9E377A0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 31, i32 0, i32 1), align 4
- store float -0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 31, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 31, i32 0, i32 3), align 4
- store float 0x3FE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 32, i32 0, i32 0), align 32
- store float 0xBFDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 32, i32 0, i32 1), align 4
- store float 0x3FE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 32, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 32, i32 0, i32 3), align 4
- store float 0xBFD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 33, i32 0, i32 0), align 16
- store float 0xBFE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 33, i32 0, i32 1), align 4
- store float 0x3FE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 33, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 33, i32 0, i32 3), align 4
- store float 0xBFEB388220000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 34, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 34, i32 0, i32 1), align 4
- store float 0x3FE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 34, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 34, i32 0, i32 3), align 4
- store float 0xBFD0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 35, i32 0, i32 0), align 16
- store float 0x3FE9E36D20000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 35, i32 0, i32 1), align 4
- store float 0x3FE0D2D880000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 35, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 35, i32 0, i32 3), align 4
- store float 0x3FE605A700000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 36, i32 0, i32 0), align 32
- store float 0x3FDFFFF360000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 36, i32 0, i32 1), align 4
- store float 0x3FE0D2D440000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 36, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 36, i32 0, i32 3), align 4
- store float 0x3FE0D2C7C0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 37, i32 0, i32 0), align 16
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 37, i32 0, i32 1), align 4
- store float 0x3FEB388A80000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 37, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 37, i32 0, i32 3), align 4
- store float 0x3FC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 38, i32 0, i32 0), align 32
- store float 0xBFDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 38, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 38, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 38, i32 0, i32 3), align 4
- store float 0xBFDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 39, i32 0, i32 0), align 16
- store float 0xBFD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 39, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 39, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 39, i32 0, i32 3), align 4
- store float 0xBFDB387E00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 40, i32 0, i32 0), align 32
- store float 0x3FD3C6D620000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 40, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 40, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 40, i32 0, i32 3), align 4
- store float 0x3FC4CB5BC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 41, i32 0, i32 0), align 16
- store float 0x3FDFFFEB00000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 41, i32 0, i32 1), align 4
- store float 0x3FEB388EC0000000, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 41, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 41, i32 0, i32 3), align 4
- tail call void @__cxa_guard_release(i64* @_ZGVZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections) nounwind
- ret %struct.btQuadWord* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 0)
-
-bb5: ; preds = %bb, %entry
- ret %struct.btQuadWord* getelementptr inbounds ([62 x %struct.btQuadWord]* @_ZZN33btMinkowskiPenetrationDepthSolver24getPenetrationDirectionsEvE22sPenetrationDirections, i32 0, i32 0)
-}
-
-; [#uses=0]
-define void @_ZN20btPersistentManifoldC2Ev(%struct.btPersistentManifold* nocapture %this) nounwind align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 1, i32* %0, align 4
- %scevgep = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 12 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 13 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 14 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 15 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 16 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 17 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 18 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 19 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 20 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep, align 4
- store float 0.000000e+00, float* %scevgep6, align 4
- store i8 0, i8* %scevgep7, align 4
- store float 0.000000e+00, float* %scevgep8, align 4
- store float 0.000000e+00, float* %scevgep9, align 4
- store float 0.000000e+00, float* %scevgep10, align 4
- store float 0.000000e+00, float* %scevgep11, align 4
- store float 0.000000e+00, float* %scevgep12, align 4
- store float 0.000000e+00, float* %scevgep13, align 4
- store i32 0, i32* %scevgep14, align 4
- %scevgep.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 12 ; [#uses=1]
- %scevgep6.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 13 ; [#uses=1]
- %scevgep7.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 14 ; [#uses=1]
- %scevgep8.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 15 ; [#uses=1]
- %scevgep9.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 16 ; [#uses=1]
- %scevgep10.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 17 ; [#uses=1]
- %scevgep11.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 18 ; [#uses=1]
- %scevgep12.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 19 ; [#uses=1]
- %scevgep13.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 20 ; [#uses=1]
- %scevgep14.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep.1, align 4
- store float 0.000000e+00, float* %scevgep6.1, align 4
- store i8 0, i8* %scevgep7.1, align 4
- store float 0.000000e+00, float* %scevgep8.1, align 4
- store float 0.000000e+00, float* %scevgep9.1, align 4
- store float 0.000000e+00, float* %scevgep10.1, align 4
- store float 0.000000e+00, float* %scevgep11.1, align 4
- store float 0.000000e+00, float* %scevgep12.1, align 4
- store float 0.000000e+00, float* %scevgep13.1, align 4
- store i32 0, i32* %scevgep14.1, align 4
- %scevgep.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 12 ; [#uses=1]
- %scevgep6.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 13 ; [#uses=1]
- %scevgep7.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 14 ; [#uses=1]
- %scevgep8.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 15 ; [#uses=1]
- %scevgep9.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 16 ; [#uses=1]
- %scevgep10.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 17 ; [#uses=1]
- %scevgep11.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 18 ; [#uses=1]
- %scevgep12.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 19 ; [#uses=1]
- %scevgep13.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 20 ; [#uses=1]
- %scevgep14.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep.2, align 4
- store float 0.000000e+00, float* %scevgep6.2, align 4
- store i8 0, i8* %scevgep7.2, align 4
- store float 0.000000e+00, float* %scevgep8.2, align 4
- store float 0.000000e+00, float* %scevgep9.2, align 4
- store float 0.000000e+00, float* %scevgep10.2, align 4
- store float 0.000000e+00, float* %scevgep11.2, align 4
- store float 0.000000e+00, float* %scevgep12.2, align 4
- store float 0.000000e+00, float* %scevgep13.2, align 4
- store i32 0, i32* %scevgep14.2, align 4
- %scevgep.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 12 ; [#uses=1]
- %scevgep6.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 13 ; [#uses=1]
- %scevgep7.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 14 ; [#uses=1]
- %scevgep8.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 15 ; [#uses=1]
- %scevgep9.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 16 ; [#uses=1]
- %scevgep10.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 17 ; [#uses=1]
- %scevgep11.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 18 ; [#uses=1]
- %scevgep12.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 19 ; [#uses=1]
- %scevgep13.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 20 ; [#uses=1]
- %scevgep14.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep.3, align 4
- store float 0.000000e+00, float* %scevgep6.3, align 4
- store i8 0, i8* %scevgep7.3, align 4
- store float 0.000000e+00, float* %scevgep8.3, align 4
- store float 0.000000e+00, float* %scevgep9.3, align 4
- store float 0.000000e+00, float* %scevgep10.3, align 4
- store float 0.000000e+00, float* %scevgep11.3, align 4
- store float 0.000000e+00, float* %scevgep12.3, align 4
- store float 0.000000e+00, float* %scevgep13.3, align 4
- store i32 0, i32* %scevgep14.3, align 4
- %1 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 2 ; [#uses=1]
- store i8* null, i8** %1, align 4
- %2 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 3 ; [#uses=1]
- store i8* null, i8** %2, align 4
- %3 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 9 ; [#uses=1]
- store i32 0, i32* %4, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN20btPersistentManifoldC1Ev(%struct.btPersistentManifold* nocapture %this) nounwind align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 1, i32* %0, align 4
- %scevgep = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 12 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 13 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 14 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 15 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 16 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 17 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 18 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 19 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 20 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep, align 4
- store float 0.000000e+00, float* %scevgep6, align 4
- store i8 0, i8* %scevgep7, align 4
- store float 0.000000e+00, float* %scevgep8, align 4
- store float 0.000000e+00, float* %scevgep9, align 4
- store float 0.000000e+00, float* %scevgep10, align 4
- store float 0.000000e+00, float* %scevgep11, align 4
- store float 0.000000e+00, float* %scevgep12, align 4
- store float 0.000000e+00, float* %scevgep13, align 4
- store i32 0, i32* %scevgep14, align 4
- %scevgep.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 12 ; [#uses=1]
- %scevgep6.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 13 ; [#uses=1]
- %scevgep7.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 14 ; [#uses=1]
- %scevgep8.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 15 ; [#uses=1]
- %scevgep9.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 16 ; [#uses=1]
- %scevgep10.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 17 ; [#uses=1]
- %scevgep11.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 18 ; [#uses=1]
- %scevgep12.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 19 ; [#uses=1]
- %scevgep13.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 20 ; [#uses=1]
- %scevgep14.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep.1, align 4
- store float 0.000000e+00, float* %scevgep6.1, align 4
- store i8 0, i8* %scevgep7.1, align 4
- store float 0.000000e+00, float* %scevgep8.1, align 4
- store float 0.000000e+00, float* %scevgep9.1, align 4
- store float 0.000000e+00, float* %scevgep10.1, align 4
- store float 0.000000e+00, float* %scevgep11.1, align 4
- store float 0.000000e+00, float* %scevgep12.1, align 4
- store float 0.000000e+00, float* %scevgep13.1, align 4
- store i32 0, i32* %scevgep14.1, align 4
- %scevgep.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 12 ; [#uses=1]
- %scevgep6.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 13 ; [#uses=1]
- %scevgep7.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 14 ; [#uses=1]
- %scevgep8.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 15 ; [#uses=1]
- %scevgep9.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 16 ; [#uses=1]
- %scevgep10.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 17 ; [#uses=1]
- %scevgep11.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 18 ; [#uses=1]
- %scevgep12.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 19 ; [#uses=1]
- %scevgep13.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 20 ; [#uses=1]
- %scevgep14.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep.2, align 4
- store float 0.000000e+00, float* %scevgep6.2, align 4
- store i8 0, i8* %scevgep7.2, align 4
- store float 0.000000e+00, float* %scevgep8.2, align 4
- store float 0.000000e+00, float* %scevgep9.2, align 4
- store float 0.000000e+00, float* %scevgep10.2, align 4
- store float 0.000000e+00, float* %scevgep11.2, align 4
- store float 0.000000e+00, float* %scevgep12.2, align 4
- store float 0.000000e+00, float* %scevgep13.2, align 4
- store i32 0, i32* %scevgep14.2, align 4
- %scevgep.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 12 ; [#uses=1]
- %scevgep6.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 13 ; [#uses=1]
- %scevgep7.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 14 ; [#uses=1]
- %scevgep8.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 15 ; [#uses=1]
- %scevgep9.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 16 ; [#uses=1]
- %scevgep10.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 17 ; [#uses=1]
- %scevgep11.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 18 ; [#uses=1]
- %scevgep12.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 19 ; [#uses=1]
- %scevgep13.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 20 ; [#uses=1]
- %scevgep14.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 21 ; [#uses=1]
- store i8* null, i8** %scevgep.3, align 4
- store float 0.000000e+00, float* %scevgep6.3, align 4
- store i8 0, i8* %scevgep7.3, align 4
- store float 0.000000e+00, float* %scevgep8.3, align 4
- store float 0.000000e+00, float* %scevgep9.3, align 4
- store float 0.000000e+00, float* %scevgep10.3, align 4
- store float 0.000000e+00, float* %scevgep11.3, align 4
- store float 0.000000e+00, float* %scevgep12.3, align 4
- store float 0.000000e+00, float* %scevgep13.3, align 4
- store i32 0, i32* %scevgep14.3, align 4
- %1 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 2 ; [#uses=1]
- store i8* null, i8** %1, align 4
- %2 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 3 ; [#uses=1]
- store i8* null, i8** %2, align 4
- %3 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 9 ; [#uses=1]
- store i32 0, i32* %4, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint(%struct.btPersistentManifold* nocapture %this, %struct.btManifoldPoint* nocapture %pt) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 12 ; [#uses=2]
- %1 = load i8** %0, align 4 ; [#uses=2]
- %2 = icmp eq i8* %1, null ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = load i8 (i8*)** @gContactDestroyedCallback, align 4 ; [#uses=2]
- %4 = icmp ne i8 (i8*)* %3, null ; [#uses=1]
- br i1 %4, label %bb2, label %return
-
-bb2: ; preds = %bb
- %5 = tail call zeroext i8 %3(i8* %1) ; [#uses=0]
- store i8* null, i8** %0, align 4
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN20btPersistentManifold16sortCachedPointsERK15btManifoldPoint(%struct.btPersistentManifold* nocapture %this, %struct.btManifoldPoint* nocapture %pt) nounwind readonly align 2 {
-bb.nph:
- %0 = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 5 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %scevgep = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 5 ; [#uses=1]
- %2 = load float* %scevgep, align 4 ; [#uses=2]
- %3 = fcmp olt float %2, %1 ; [#uses=2]
- %maxPenetrationIndex.0 = select i1 %3, i32 0, i32 -1 ; [#uses=1]
- %maxPenetration.0 = select i1 %3, float %2, float %1 ; [#uses=2]
- %scevgep.1 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 5 ; [#uses=1]
- %4 = load float* %scevgep.1, align 4 ; [#uses=2]
- %5 = fcmp olt float %4, %maxPenetration.0 ; [#uses=2]
- %maxPenetrationIndex.0.1 = select i1 %5, i32 1, i32 %maxPenetrationIndex.0 ; [#uses=1]
- %maxPenetration.0.1 = select i1 %5, float %4, float %maxPenetration.0 ; [#uses=2]
- %scevgep.2 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 5 ; [#uses=1]
- %6 = load float* %scevgep.2, align 4 ; [#uses=2]
- %7 = fcmp olt float %6, %maxPenetration.0.1 ; [#uses=2]
- %maxPenetrationIndex.0.2 = select i1 %7, i32 2, i32 %maxPenetrationIndex.0.1 ; [#uses=2]
- %maxPenetration.0.2 = select i1 %7, float %6, float %maxPenetration.0.1 ; [#uses=1]
- %scevgep.3 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 5 ; [#uses=1]
- %8 = load float* %scevgep.3, align 4 ; [#uses=1]
- %9 = fcmp olt float %8, %maxPenetration.0.2 ; [#uses=1]
- br i1 %9, label %bb5, label %bb4
-
-bb4: ; preds = %bb.nph
- %cond = icmp eq i32 %maxPenetrationIndex.0.2, 0 ; [#uses=1]
- br i1 %cond, label %bb4.bb7_crit_edge, label %bb5
-
-bb4.bb7_crit_edge: ; preds = %bb4
- %.phi.trans.insert = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- %.phi.trans.insert49 = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre50 = load float* %.phi.trans.insert49, align 4 ; [#uses=1]
- %.phi.trans.insert51 = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre52 = load float* %.phi.trans.insert51, align 4 ; [#uses=1]
- %.phi.trans.insert53 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre54 = load float* %.phi.trans.insert53, align 4 ; [#uses=1]
- %.phi.trans.insert55 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre56 = load float* %.phi.trans.insert55, align 4 ; [#uses=1]
- %.phi.trans.insert57 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre58 = load float* %.phi.trans.insert57, align 4 ; [#uses=1]
- %.phi.trans.insert59 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre60 = load float* %.phi.trans.insert59, align 4 ; [#uses=1]
- %.phi.trans.insert61 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre62 = load float* %.phi.trans.insert61, align 4 ; [#uses=1]
- %.phi.trans.insert63 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre64 = load float* %.phi.trans.insert63, align 4 ; [#uses=1]
- br label %bb7
-
-bb5: ; preds = %bb4, %bb.nph
- %maxPenetrationIndex.0.3109 = phi i32 [ %maxPenetrationIndex.0.2, %bb4 ], [ 3, %bb.nph ] ; [#uses=2]
- %10 = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=3]
- %12 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fsub float %16, %18 ; [#uses=2]
- %20 = getelementptr inbounds %struct.btManifoldPoint* %pt, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=3]
- %22 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fsub float %21, %23 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=3]
- %29 = fsub float %26, %28 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=3]
- %34 = fsub float %31, %33 ; [#uses=2]
- %35 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=3]
- %37 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=3]
- %39 = fsub float %36, %38 ; [#uses=2]
- %40 = fmul float %24, %34 ; [#uses=1]
- %41 = fmul float %19, %39 ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=2]
- %43 = fmul float %14, %39 ; [#uses=1]
- %44 = fmul float %24, %29 ; [#uses=1]
- %45 = fsub float %43, %44 ; [#uses=2]
- %46 = fmul float %19, %29 ; [#uses=1]
- %47 = fmul float %14, %34 ; [#uses=1]
- %48 = fsub float %46, %47 ; [#uses=2]
- %49 = fmul float %48, %48 ; [#uses=1]
- %50 = fmul float %45, %45 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fmul float %42, %42 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=2]
- %cond17 = icmp eq i32 %maxPenetrationIndex.0.3109, 1 ; [#uses=1]
- br i1 %cond17, label %bb5.bb10_crit_edge, label %bb7
-
-bb5.bb10_crit_edge: ; preds = %bb5
- %.phi.trans.insert71 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre72 = load float* %.phi.trans.insert71, align 4 ; [#uses=1]
- %.phi.trans.insert73 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre74 = load float* %.phi.trans.insert73, align 4 ; [#uses=1]
- %.phi.trans.insert75 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre76 = load float* %.phi.trans.insert75, align 4 ; [#uses=1]
- br label %bb10
-
-bb7: ; preds = %bb5, %bb4.bb7_crit_edge
- %maxPenetrationIndex.0.3108 = phi i32 [ 0, %bb4.bb7_crit_edge ], [ %maxPenetrationIndex.0.3109, %bb5 ] ; [#uses=2]
- %54 = phi float [ %.pre64, %bb4.bb7_crit_edge ], [ %38, %bb5 ] ; [#uses=3]
- %55 = phi float [ %.pre62, %bb4.bb7_crit_edge ], [ %36, %bb5 ] ; [#uses=2]
- %56 = phi float [ %.pre60, %bb4.bb7_crit_edge ], [ %33, %bb5 ] ; [#uses=3]
- %57 = phi float [ %.pre58, %bb4.bb7_crit_edge ], [ %31, %bb5 ] ; [#uses=2]
- %58 = phi float [ %.pre56, %bb4.bb7_crit_edge ], [ %28, %bb5 ] ; [#uses=3]
- %59 = phi float [ %.pre54, %bb4.bb7_crit_edge ], [ %26, %bb5 ] ; [#uses=2]
- %60 = phi float [ %.pre52, %bb4.bb7_crit_edge ], [ %21, %bb5 ] ; [#uses=3]
- %61 = phi float [ %.pre50, %bb4.bb7_crit_edge ], [ %16, %bb5 ] ; [#uses=3]
- %62 = phi float [ %.pre, %bb4.bb7_crit_edge ], [ %11, %bb5 ] ; [#uses=3]
- %res0.0 = phi float [ 0.000000e+00, %bb4.bb7_crit_edge ], [ %53, %bb5 ] ; [#uses=2]
- %63 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=3]
- %65 = fsub float %62, %64 ; [#uses=2]
- %66 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = fsub float %61, %67 ; [#uses=2]
- %69 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=3]
- %71 = fsub float %60, %70 ; [#uses=2]
- %72 = fsub float %59, %58 ; [#uses=2]
- %73 = fsub float %57, %56 ; [#uses=2]
- %74 = fsub float %55, %54 ; [#uses=2]
- %75 = fmul float %71, %73 ; [#uses=1]
- %76 = fmul float %68, %74 ; [#uses=1]
- %77 = fsub float %75, %76 ; [#uses=2]
- %78 = fmul float %65, %74 ; [#uses=1]
- %79 = fmul float %71, %72 ; [#uses=1]
- %80 = fsub float %78, %79 ; [#uses=2]
- %81 = fmul float %68, %72 ; [#uses=1]
- %82 = fmul float %65, %73 ; [#uses=1]
- %83 = fsub float %81, %82 ; [#uses=2]
- %84 = fmul float %83, %83 ; [#uses=1]
- %85 = fmul float %80, %80 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = fmul float %77, %77 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=2]
- %cond18 = icmp eq i32 %maxPenetrationIndex.0.3108, 2 ; [#uses=1]
- %.phi.trans.insert65 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre66 = load float* %.phi.trans.insert65, align 4 ; [#uses=2]
- %.phi.trans.insert67 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre68 = load float* %.phi.trans.insert67, align 4 ; [#uses=2]
- %.phi.trans.insert69 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre70 = load float* %.phi.trans.insert69, align 4 ; [#uses=2]
- br i1 %cond18, label %bb13, label %bb10
-
-bb10: ; preds = %bb7, %bb5.bb10_crit_edge
- %maxPenetrationIndex.0.3107 = phi i32 [ 1, %bb5.bb10_crit_edge ], [ %maxPenetrationIndex.0.3108, %bb7 ] ; [#uses=1]
- %89 = phi float [ %23, %bb5.bb10_crit_edge ], [ %.pre70, %bb7 ] ; [#uses=2]
- %90 = phi float [ %18, %bb5.bb10_crit_edge ], [ %.pre68, %bb7 ] ; [#uses=2]
- %91 = phi float [ %13, %bb5.bb10_crit_edge ], [ %.pre66, %bb7 ] ; [#uses=2]
- %92 = phi float [ %.pre76, %bb5.bb10_crit_edge ], [ %70, %bb7 ] ; [#uses=2]
- %93 = phi float [ %.pre74, %bb5.bb10_crit_edge ], [ %67, %bb7 ] ; [#uses=2]
- %94 = phi float [ %.pre72, %bb5.bb10_crit_edge ], [ %64, %bb7 ] ; [#uses=2]
- %95 = phi float [ %36, %bb5.bb10_crit_edge ], [ %55, %bb7 ] ; [#uses=1]
- %96 = phi float [ %31, %bb5.bb10_crit_edge ], [ %57, %bb7 ] ; [#uses=1]
- %97 = phi float [ %26, %bb5.bb10_crit_edge ], [ %59, %bb7 ] ; [#uses=1]
- %98 = phi float [ %21, %bb5.bb10_crit_edge ], [ %60, %bb7 ] ; [#uses=2]
- %99 = phi float [ %16, %bb5.bb10_crit_edge ], [ %61, %bb7 ] ; [#uses=2]
- %100 = phi float [ %11, %bb5.bb10_crit_edge ], [ %62, %bb7 ] ; [#uses=2]
- %101 = phi float [ %38, %bb5.bb10_crit_edge ], [ %54, %bb7 ] ; [#uses=1]
- %102 = phi float [ %33, %bb5.bb10_crit_edge ], [ %56, %bb7 ] ; [#uses=1]
- %103 = phi float [ %28, %bb5.bb10_crit_edge ], [ %58, %bb7 ] ; [#uses=1]
- %res1.0 = phi float [ 0.000000e+00, %bb5.bb10_crit_edge ], [ %88, %bb7 ] ; [#uses=2]
- %res0.1 = phi float [ %53, %bb5.bb10_crit_edge ], [ %res0.0, %bb7 ] ; [#uses=2]
- %104 = fsub float %100, %94 ; [#uses=2]
- %105 = fsub float %99, %93 ; [#uses=2]
- %106 = fsub float %98, %92 ; [#uses=2]
- %107 = fsub float %97, %91 ; [#uses=2]
- %108 = fsub float %96, %90 ; [#uses=2]
- %109 = fsub float %95, %89 ; [#uses=2]
- %110 = fmul float %106, %108 ; [#uses=1]
- %111 = fmul float %105, %109 ; [#uses=1]
- %112 = fsub float %110, %111 ; [#uses=2]
- %113 = fmul float %104, %109 ; [#uses=1]
- %114 = fmul float %106, %107 ; [#uses=1]
- %115 = fsub float %113, %114 ; [#uses=2]
- %116 = fmul float %105, %107 ; [#uses=1]
- %117 = fmul float %104, %108 ; [#uses=1]
- %118 = fsub float %116, %117 ; [#uses=2]
- %119 = fmul float %118, %118 ; [#uses=1]
- %120 = fmul float %115, %115 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fmul float %112, %112 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=2]
- %124 = icmp eq i32 %maxPenetrationIndex.0.3107, 3 ; [#uses=1]
- br i1 %124, label %bb15, label %bb13
-
-bb13: ; preds = %bb10, %bb7
- %125 = phi float [ %89, %bb10 ], [ %.pre70, %bb7 ] ; [#uses=1]
- %126 = phi float [ %90, %bb10 ], [ %.pre68, %bb7 ] ; [#uses=1]
- %127 = phi float [ %91, %bb10 ], [ %.pre66, %bb7 ] ; [#uses=1]
- %128 = phi float [ %101, %bb10 ], [ %54, %bb7 ] ; [#uses=1]
- %129 = phi float [ %102, %bb10 ], [ %56, %bb7 ] ; [#uses=1]
- %130 = phi float [ %103, %bb10 ], [ %58, %bb7 ] ; [#uses=1]
- %131 = phi float [ %92, %bb10 ], [ %70, %bb7 ] ; [#uses=1]
- %132 = phi float [ %98, %bb10 ], [ %60, %bb7 ] ; [#uses=1]
- %133 = phi float [ %93, %bb10 ], [ %67, %bb7 ] ; [#uses=1]
- %134 = phi float [ %99, %bb10 ], [ %61, %bb7 ] ; [#uses=1]
- %135 = phi float [ %94, %bb10 ], [ %64, %bb7 ] ; [#uses=1]
- %136 = phi float [ %100, %bb10 ], [ %62, %bb7 ] ; [#uses=1]
- %res2.0 = phi float [ %123, %bb10 ], [ 0.000000e+00, %bb7 ] ; [#uses=1]
- %res1.1 = phi float [ %res1.0, %bb10 ], [ %88, %bb7 ] ; [#uses=1]
- %res0.2 = phi float [ %res0.1, %bb10 ], [ %res0.0, %bb7 ] ; [#uses=1]
- %137 = fsub float %136, %135 ; [#uses=2]
- %138 = fsub float %134, %133 ; [#uses=2]
- %139 = fsub float %132, %131 ; [#uses=2]
- %140 = fsub float %130, %127 ; [#uses=2]
- %141 = fsub float %129, %126 ; [#uses=2]
- %142 = fsub float %128, %125 ; [#uses=2]
- %143 = fmul float %139, %141 ; [#uses=1]
- %144 = fmul float %138, %142 ; [#uses=1]
- %145 = fsub float %143, %144 ; [#uses=2]
- %146 = fmul float %137, %142 ; [#uses=1]
- %147 = fmul float %139, %140 ; [#uses=1]
- %148 = fsub float %146, %147 ; [#uses=2]
- %149 = fmul float %138, %140 ; [#uses=1]
- %150 = fmul float %137, %141 ; [#uses=1]
- %151 = fsub float %149, %150 ; [#uses=2]
- %152 = fmul float %151, %151 ; [#uses=1]
- %153 = fmul float %148, %148 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %145, %145 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb13, %bb10
- %res3.0 = phi float [ %156, %bb13 ], [ 0.000000e+00, %bb10 ] ; [#uses=1]
- %res2.1 = phi float [ %res2.0, %bb13 ], [ %123, %bb10 ] ; [#uses=1]
- %res1.2 = phi float [ %res1.1, %bb13 ], [ %res1.0, %bb10 ] ; [#uses=1]
- %res0.3 = phi float [ %res0.2, %bb13 ], [ %res0.1, %bb10 ] ; [#uses=1]
- %157 = tail call float @fabsf(float %res3.0) nounwind readnone ; [#uses=1]
- %158 = tail call float @fabsf(float %res2.1) nounwind readnone ; [#uses=2]
- %159 = tail call float @fabsf(float %res1.2) nounwind readnone ; [#uses=2]
- %160 = tail call float @fabsf(float %res0.3) nounwind readnone ; [#uses=2]
- %161 = fcmp ogt float %160, 0xC3ABC16D60000000 ; [#uses=2]
- %not..i = xor i1 %161, true ; [#uses=1]
- %maxIndex.0.i.i = sext i1 %not..i to i32 ; [#uses=1]
- %maxVal.0.i.i = select i1 %161, float %160, float 0xC3ABC16D60000000 ; [#uses=2]
- %162 = fcmp ogt float %159, %maxVal.0.i.i ; [#uses=2]
- %maxIndex.1.i.i = select i1 %162, i32 1, i32 %maxIndex.0.i.i ; [#uses=1]
- %maxVal.1.i.i = select i1 %162, float %159, float %maxVal.0.i.i ; [#uses=2]
- %163 = fcmp ogt float %158, %maxVal.1.i.i ; [#uses=2]
- %maxIndex.2.i.i = select i1 %163, i32 2, i32 %maxIndex.1.i.i ; [#uses=1]
- %maxVal.2.i.i = select i1 %163, float %158, float %maxVal.1.i.i ; [#uses=1]
- %164 = fcmp ogt float %157, %maxVal.2.i.i ; [#uses=1]
- %maxIndex.3.i.i = select i1 %164, i32 3, i32 %maxIndex.2.i.i ; [#uses=1]
- ret i32 %maxIndex.3.i.i
-}
-
-; [#uses=1]
-define i32 @_ZN20btPersistentManifold16addManifoldPointERK15btManifoldPoint(%struct.btPersistentManifold* nocapture %this, %struct.btManifoldPoint* nocapture %newPoint) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 4 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = icmp eq i32 %1, 4 ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- %3 = tail call i32 @_ZN20btPersistentManifold16sortCachedPointsERK15btManifoldPoint(%struct.btPersistentManifold* %this, %struct.btManifoldPoint* %newPoint) nounwind ; [#uses=4]
- %4 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %3, i32 12 ; [#uses=2]
- %5 = load i8** %4, align 4 ; [#uses=2]
- %6 = icmp eq i8* %5, null ; [#uses=1]
- br i1 %6, label %bb2, label %bb.i
-
-bb.i: ; preds = %bb
- %7 = load i8 (i8*)** @gContactDestroyedCallback, align 4 ; [#uses=2]
- %8 = icmp eq i8 (i8*)* %7, null ; [#uses=1]
- br i1 %8, label %bb2, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %9 = tail call zeroext i8 %7(i8* %5) ; [#uses=0]
- store i8* null, i8** %4, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- %10 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %10, i32* %0, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb2.i, %bb.i, %bb
- %insertIndex.0 = phi i32 [ %1, %bb1 ], [ %3, %bb ], [ %3, %bb.i ], [ %3, %bb2.i ] ; [#uses=2]
- %11 = icmp slt i32 %insertIndex.0, 0 ; [#uses=1]
- %insertIndex.1 = select i1 %11, i32 0, i32 %insertIndex.0 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %insertIndex.1 ; [#uses=1]
- %13 = bitcast %struct.btManifoldPoint* %12 to i8* ; [#uses=1]
- %14 = bitcast %struct.btManifoldPoint* %newPoint to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %13, i8* %14, i32 276, i32 4, i1 false)
- ret i32 %insertIndex.1
-}
-
-; [#uses=6]
-define float @_ZNK20btPersistentManifold27getContactBreakingThresholdEv(%struct.btPersistentManifold* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=1]
-define i32 @_ZNK20btPersistentManifold13getCacheEntryERK15btManifoldPoint(%struct.btPersistentManifold* nocapture %this, %struct.btManifoldPoint* nocapture %newPoint) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 4 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp sgt i32 %3, 0 ; [#uses=1]
- br i1 %4, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %entry
- %5 = fmul float %1, %1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btManifoldPoint* %newPoint, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btManifoldPoint* %newPoint, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btManifoldPoint* %newPoint, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %12 = phi i32 [ 0, %bb.nph ], [ %25, %bb ] ; [#uses=5]
- %nearestPoint.110 = phi i32 [ -1, %bb.nph ], [ %nearestPoint.0, %bb ] ; [#uses=1]
- %shortestDist.19 = phi float [ %5, %bb.nph ], [ %shortestDist.0, %bb ] ; [#uses=2]
- %scevgep = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %12, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %12, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep1314 = getelementptr %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %scevgep, align 4 ; [#uses=1]
- %14 = fsub float %13, %7 ; [#uses=2]
- %15 = load float* %scevgep12, align 4 ; [#uses=1]
- %16 = fsub float %15, %9 ; [#uses=2]
- %17 = load float* %scevgep1314, align 4 ; [#uses=1]
- %18 = fsub float %17, %11 ; [#uses=2]
- %19 = fmul float %18, %18 ; [#uses=1]
- %20 = fmul float %16, %16 ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=1]
- %22 = fmul float %14, %14 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=2]
- %24 = fcmp olt float %23, %shortestDist.19 ; [#uses=2]
- %nearestPoint.0 = select i1 %24, i32 %12, i32 %nearestPoint.110 ; [#uses=2]
- %25 = add nsw i32 %12, 1 ; [#uses=2]
- %shortestDist.0 = select i1 %24, float %23, float %shortestDist.19 ; [#uses=1]
- %exitcond = icmp eq i32 %25, %3 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb
-
-bb4: ; preds = %bb, %entry
- %nearestPoint.1.lcssa = phi i32 [ -1, %entry ], [ %nearestPoint.0, %bb ] ; [#uses=1]
- ret i32 %nearestPoint.1.lcssa
-}
-
-; [#uses=24]
-define void @_ZN20btPersistentManifold20refreshContactPointsERK11btTransformS2_(%struct.btPersistentManifold* %this, %struct.btTransform* nocapture %trA, %struct.btTransform* nocapture %trB) align 2 {
-entry:
- %this52 = bitcast %struct.btPersistentManifold* %this to i8* ; [#uses=31]
- %0 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 4 ; [#uses=8]
- %1 = load i32* %0, align 4 ; [#uses=4]
- %i.049 = add i32 %1, -1 ; [#uses=1]
- %2 = icmp sgt i32 %i.049, -1 ; [#uses=1]
- br i1 %2, label %bb.nph51, label %bb3
-
-bb.nph51: ; preds = %entry
- %3 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %trA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btTransform* %trB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %tmp108 = mul i32 %1, 276 ; [#uses=19]
- %tmp109 = add i32 %tmp108, -128 ; [#uses=1]
- %tmp113 = add i32 %tmp108, -192 ; [#uses=1]
- %tmp117 = add i32 %tmp108, -228 ; [#uses=1]
- %tmp121 = add i32 %tmp108, -232 ; [#uses=1]
- %tmp125 = add i32 %tmp108, -236 ; [#uses=1]
- %tmp129 = add i32 %tmp108, -240 ; [#uses=1]
- %tmp133 = add i32 %tmp108, -212 ; [#uses=1]
- %tmp137 = add i32 %tmp108, -216 ; [#uses=1]
- %tmp141 = add i32 %tmp108, -220 ; [#uses=1]
- %tmp145 = add i32 %tmp108, -224 ; [#uses=1]
- %tmp149 = add i32 %tmp108, -272 ; [#uses=1]
- %tmp153 = add i32 %tmp108, -268 ; [#uses=1]
- %tmp157 = add i32 %tmp108, -264 ; [#uses=1]
- %tmp161 = add i32 %tmp108, -256 ; [#uses=1]
- %tmp165 = add i32 %tmp108, -252 ; [#uses=1]
- %tmp169 = add i32 %tmp108, -248 ; [#uses=1]
- %tmp173 = add i32 %tmp108, -208 ; [#uses=1]
- %tmp177 = add i32 %tmp108, -204 ; [#uses=1]
- %tmp181 = add i32 %tmp108, -200 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph51
- %indvar104 = phi i32 [ 0, %bb.nph51 ], [ %indvar.next105, %bb ] ; [#uses=2]
- %tmp107 = mul i32 %indvar104, -276 ; [#uses=19]
- %tmp110 = add i32 %tmp109, %tmp107 ; [#uses=1]
- %uglygep111 = getelementptr i8* %this52, i32 %tmp110 ; [#uses=1]
- %uglygep111112 = bitcast i8* %uglygep111 to i32* ; [#uses=2]
- %tmp114 = add i32 %tmp113, %tmp107 ; [#uses=1]
- %uglygep115 = getelementptr i8* %this52, i32 %tmp114 ; [#uses=1]
- %uglygep115116 = bitcast i8* %uglygep115 to float* ; [#uses=1]
- %tmp118 = add i32 %tmp117, %tmp107 ; [#uses=1]
- %uglygep119 = getelementptr i8* %this52, i32 %tmp118 ; [#uses=1]
- %uglygep119120 = bitcast i8* %uglygep119 to float* ; [#uses=1]
- %tmp122 = add i32 %tmp121, %tmp107 ; [#uses=1]
- %uglygep123 = getelementptr i8* %this52, i32 %tmp122 ; [#uses=1]
- %uglygep123124 = bitcast i8* %uglygep123 to float* ; [#uses=2]
- %tmp126 = add i32 %tmp125, %tmp107 ; [#uses=1]
- %uglygep127 = getelementptr i8* %this52, i32 %tmp126 ; [#uses=1]
- %uglygep127128 = bitcast i8* %uglygep127 to float* ; [#uses=2]
- %tmp130 = add i32 %tmp129, %tmp107 ; [#uses=1]
- %uglygep131 = getelementptr i8* %this52, i32 %tmp130 ; [#uses=1]
- %uglygep131132 = bitcast i8* %uglygep131 to float* ; [#uses=2]
- %tmp134 = add i32 %tmp133, %tmp107 ; [#uses=1]
- %uglygep135 = getelementptr i8* %this52, i32 %tmp134 ; [#uses=1]
- %uglygep135136 = bitcast i8* %uglygep135 to float* ; [#uses=1]
- %tmp138 = add i32 %tmp137, %tmp107 ; [#uses=1]
- %uglygep139 = getelementptr i8* %this52, i32 %tmp138 ; [#uses=1]
- %uglygep139140 = bitcast i8* %uglygep139 to float* ; [#uses=2]
- %tmp142 = add i32 %tmp141, %tmp107 ; [#uses=1]
- %uglygep143 = getelementptr i8* %this52, i32 %tmp142 ; [#uses=1]
- %uglygep143144 = bitcast i8* %uglygep143 to float* ; [#uses=2]
- %tmp146 = add i32 %tmp145, %tmp107 ; [#uses=1]
- %uglygep147 = getelementptr i8* %this52, i32 %tmp146 ; [#uses=1]
- %uglygep147148 = bitcast i8* %uglygep147 to float* ; [#uses=2]
- %tmp150 = add i32 %tmp149, %tmp107 ; [#uses=1]
- %uglygep151 = getelementptr i8* %this52, i32 %tmp150 ; [#uses=1]
- %uglygep151152 = bitcast i8* %uglygep151 to float* ; [#uses=1]
- %tmp154 = add i32 %tmp153, %tmp107 ; [#uses=1]
- %uglygep155 = getelementptr i8* %this52, i32 %tmp154 ; [#uses=1]
- %uglygep155156 = bitcast i8* %uglygep155 to float* ; [#uses=1]
- %tmp158 = add i32 %tmp157, %tmp107 ; [#uses=1]
- %uglygep159 = getelementptr i8* %this52, i32 %tmp158 ; [#uses=1]
- %uglygep159160 = bitcast i8* %uglygep159 to float* ; [#uses=1]
- %tmp162 = add i32 %tmp161, %tmp107 ; [#uses=1]
- %uglygep163 = getelementptr i8* %this52, i32 %tmp162 ; [#uses=1]
- %uglygep163164 = bitcast i8* %uglygep163 to float* ; [#uses=1]
- %tmp166 = add i32 %tmp165, %tmp107 ; [#uses=1]
- %uglygep167 = getelementptr i8* %this52, i32 %tmp166 ; [#uses=1]
- %uglygep167168 = bitcast i8* %uglygep167 to float* ; [#uses=1]
- %tmp170 = add i32 %tmp169, %tmp107 ; [#uses=1]
- %uglygep171 = getelementptr i8* %this52, i32 %tmp170 ; [#uses=1]
- %uglygep171172 = bitcast i8* %uglygep171 to float* ; [#uses=1]
- %tmp174 = add i32 %tmp173, %tmp107 ; [#uses=1]
- %uglygep175 = getelementptr i8* %this52, i32 %tmp174 ; [#uses=1]
- %uglygep175176 = bitcast i8* %uglygep175 to float* ; [#uses=1]
- %tmp178 = add i32 %tmp177, %tmp107 ; [#uses=1]
- %uglygep179 = getelementptr i8* %this52, i32 %tmp178 ; [#uses=1]
- %uglygep179180 = bitcast i8* %uglygep179 to float* ; [#uses=1]
- %tmp182 = add i32 %tmp181, %tmp107 ; [#uses=1]
- %uglygep183 = getelementptr i8* %this52, i32 %tmp182 ; [#uses=1]
- %uglygep183184 = bitcast i8* %uglygep183 to float* ; [#uses=1]
- %27 = load float* %3, align 4 ; [#uses=1]
- %28 = load float* %uglygep151152, align 4 ; [#uses=3]
- %29 = fmul float %27, %28 ; [#uses=1]
- %30 = load float* %4, align 4 ; [#uses=1]
- %31 = load float* %uglygep155156, align 4 ; [#uses=3]
- %32 = fmul float %30, %31 ; [#uses=1]
- %33 = fadd float %29, %32 ; [#uses=1]
- %34 = load float* %5, align 4 ; [#uses=1]
- %35 = load float* %uglygep159160, align 4 ; [#uses=3]
- %36 = fmul float %34, %35 ; [#uses=1]
- %37 = fadd float %33, %36 ; [#uses=1]
- %38 = load float* %6, align 4 ; [#uses=1]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = load float* %7, align 4 ; [#uses=1]
- %41 = fmul float %40, %28 ; [#uses=1]
- %42 = load float* %8, align 4 ; [#uses=1]
- %43 = fmul float %42, %31 ; [#uses=1]
- %44 = fadd float %41, %43 ; [#uses=1]
- %45 = load float* %9, align 4 ; [#uses=1]
- %46 = fmul float %45, %35 ; [#uses=1]
- %47 = fadd float %44, %46 ; [#uses=1]
- %48 = load float* %10, align 4 ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=1]
- %50 = load float* %11, align 4 ; [#uses=1]
- %51 = fmul float %50, %28 ; [#uses=1]
- %52 = load float* %12, align 4 ; [#uses=1]
- %53 = fmul float %52, %31 ; [#uses=1]
- %54 = fadd float %51, %53 ; [#uses=1]
- %55 = load float* %13, align 4 ; [#uses=1]
- %56 = fmul float %55, %35 ; [#uses=1]
- %57 = fadd float %54, %56 ; [#uses=1]
- %58 = load float* %14, align 4 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- store float %59, float* %uglygep147148, align 4
- store float %49, float* %uglygep143144, align 4
- store float %39, float* %uglygep139140, align 4
- store float 0.000000e+00, float* %uglygep135136, align 4
- %60 = load float* %15, align 4 ; [#uses=1]
- %61 = load float* %uglygep163164, align 4 ; [#uses=3]
- %62 = fmul float %60, %61 ; [#uses=1]
- %63 = load float* %16, align 4 ; [#uses=1]
- %64 = load float* %uglygep167168, align 4 ; [#uses=3]
- %65 = fmul float %63, %64 ; [#uses=1]
- %66 = fadd float %62, %65 ; [#uses=1]
- %67 = load float* %17, align 4 ; [#uses=1]
- %68 = load float* %uglygep171172, align 4 ; [#uses=3]
- %69 = fmul float %67, %68 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = load float* %18, align 4 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = load float* %19, align 4 ; [#uses=1]
- %74 = fmul float %73, %61 ; [#uses=1]
- %75 = load float* %20, align 4 ; [#uses=1]
- %76 = fmul float %75, %64 ; [#uses=1]
- %77 = fadd float %74, %76 ; [#uses=1]
- %78 = load float* %21, align 4 ; [#uses=1]
- %79 = fmul float %78, %68 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=1]
- %81 = load float* %22, align 4 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = load float* %23, align 4 ; [#uses=1]
- %84 = fmul float %83, %61 ; [#uses=1]
- %85 = load float* %24, align 4 ; [#uses=1]
- %86 = fmul float %85, %64 ; [#uses=1]
- %87 = fadd float %84, %86 ; [#uses=1]
- %88 = load float* %25, align 4 ; [#uses=1]
- %89 = fmul float %88, %68 ; [#uses=1]
- %90 = fadd float %87, %89 ; [#uses=1]
- %91 = load float* %26, align 4 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- store float %92, float* %uglygep131132, align 4
- store float %82, float* %uglygep127128, align 4
- store float %72, float* %uglygep123124, align 4
- store float 0.000000e+00, float* %uglygep119120, align 4
- %93 = load float* %uglygep139140, align 4 ; [#uses=1]
- %94 = load float* %uglygep123124, align 4 ; [#uses=1]
- %95 = fsub float %93, %94 ; [#uses=1]
- %96 = load float* %uglygep143144, align 4 ; [#uses=1]
- %97 = load float* %uglygep127128, align 4 ; [#uses=1]
- %98 = fsub float %96, %97 ; [#uses=1]
- %99 = load float* %uglygep147148, align 4 ; [#uses=1]
- %100 = load float* %uglygep131132, align 4 ; [#uses=1]
- %101 = fsub float %99, %100 ; [#uses=1]
- %102 = load float* %uglygep175176, align 4 ; [#uses=1]
- %103 = fmul float %101, %102 ; [#uses=1]
- %104 = load float* %uglygep179180, align 4 ; [#uses=1]
- %105 = fmul float %98, %104 ; [#uses=1]
- %106 = fadd float %103, %105 ; [#uses=1]
- %107 = load float* %uglygep183184, align 4 ; [#uses=1]
- %108 = fmul float %95, %107 ; [#uses=1]
- %109 = fadd float %106, %108 ; [#uses=1]
- store float %109, float* %uglygep115116, align 4
- %110 = load i32* %uglygep111112, align 4 ; [#uses=1]
- %111 = add nsw i32 %110, 1 ; [#uses=1]
- store i32 %111, i32* %uglygep111112, align 4
- %indvar.next105 = add i32 %indvar104, 1 ; [#uses=2]
- %exitcond106 = icmp eq i32 %indvar.next105, %1 ; [#uses=1]
- br i1 %exitcond106, label %bb2.bb3_crit_edge, label %bb
-
-bb2.bb3_crit_edge: ; preds = %bb
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2.bb3_crit_edge, %entry
- %112 = phi i32 [ %.pre, %bb2.bb3_crit_edge ], [ %1, %entry ] ; [#uses=3]
- %i.147 = add i32 %112, -1 ; [#uses=2]
- %113 = icmp sgt i32 %i.147, -1 ; [#uses=1]
- br i1 %113, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb3
- %114 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 5 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 3 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 2 ; [#uses=1]
- %tmp53 = mul i32 %112, 276 ; [#uses=12]
- %tmp54 = add i32 %tmp53, -192 ; [#uses=1]
- %tmp57 = add i32 %tmp53, -272 ; [#uses=1]
- %tmp61 = add i32 %tmp53, -164 ; [#uses=1]
- %tmp68 = add i32 %tmp53, -200 ; [#uses=1]
- %tmp72 = add i32 %tmp53, -204 ; [#uses=1]
- %tmp76 = add i32 %tmp53, -208 ; [#uses=1]
- %tmp80 = add i32 %tmp53, -216 ; [#uses=1]
- %tmp84 = add i32 %tmp53, -220 ; [#uses=1]
- %tmp88 = add i32 %tmp53, -224 ; [#uses=1]
- %tmp92 = add i32 %tmp53, -232 ; [#uses=1]
- %tmp96 = add i32 %tmp53, -236 ; [#uses=1]
- %tmp100 = add i32 %tmp53, -240 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb18.backedge, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb18.backedge ] ; [#uses=3]
- %tmp = mul i32 %indvar, -276 ; [#uses=12]
- %tmp55 = add i32 %tmp54, %tmp ; [#uses=1]
- %uglygep = getelementptr i8* %this52, i32 %tmp55 ; [#uses=1]
- %uglygep56 = bitcast i8* %uglygep to float* ; [#uses=1]
- %tmp58 = add i32 %tmp57, %tmp ; [#uses=1]
- %uglygep59 = getelementptr i8* %this52, i32 %tmp58 ; [#uses=3]
- %uglygep5960 = bitcast i8* %uglygep59 to %struct.btManifoldPoint* ; [#uses=1]
- %tmp62 = add i32 %tmp61, %tmp ; [#uses=1]
- %uglygep63 = getelementptr i8* %this52, i32 %tmp62 ; [#uses=1]
- %uglygep6364 = bitcast i8* %uglygep63 to i8** ; [#uses=4]
- %i.148 = sub i32 %i.147, %indvar ; [#uses=2]
- %117 = load float* %uglygep56, align 4 ; [#uses=4]
- %118 = load float* %114, align 4 ; [#uses=3]
- %119 = fcmp ugt float %117, %118 ; [#uses=1]
- br i1 %119, label %bb9, label %bb10
-
-bb9: ; preds = %bb4
- %120 = load i8** %uglygep6364, align 4 ; [#uses=2]
- %121 = icmp eq i8* %120, null ; [#uses=1]
- br i1 %121, label %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i22, label %bb.i.i20
-
-bb.i.i20: ; preds = %bb9
- %122 = load i8 (i8*)** @gContactDestroyedCallback, align 4 ; [#uses=2]
- %123 = icmp eq i8 (i8*)* %122, null ; [#uses=1]
- br i1 %123, label %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i22, label %bb2.i.i21
-
-bb2.i.i21: ; preds = %bb.i.i20
- %124 = tail call zeroext i8 %122(i8* %120) ; [#uses=0]
- store i8* null, i8** %uglygep6364, align 4
- br label %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i22
-
-_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i22: ; preds = %bb2.i.i21, %bb.i.i20, %bb9
- %125 = load i32* %0, align 4 ; [#uses=2]
- %126 = add nsw i32 %125, -1 ; [#uses=11]
- %127 = icmp eq i32 %126, %i.148 ; [#uses=1]
- br i1 %127, label %_ZN20btPersistentManifold18removeContactPointEi.exit25, label %bb.i24
-
-bb.i24: ; preds = %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i22
- %128 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126 ; [#uses=1]
- %129 = bitcast %struct.btManifoldPoint* %128 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %uglygep59, i8* %129, i32 276, i32 4, i1 false)
- %130 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 12 ; [#uses=1]
- store i8* null, i8** %130, align 4
- %131 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 24, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %131, align 4
- %132 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 24, i32 1, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %132, align 4
- %133 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 24, i32 2, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %133, align 4
- %134 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- %135 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 14 ; [#uses=1]
- store i8 0, i8* %135, align 4
- %136 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %136, align 4
- %137 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %137, align 4
- %138 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %126, i32 21 ; [#uses=1]
- store i32 0, i32* %138, align 4
- %.pre.i23 = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btPersistentManifold18removeContactPointEi.exit25
-
-_ZN20btPersistentManifold18removeContactPointEi.exit25: ; preds = %bb.i24, %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i22
- %139 = phi i32 [ %125, %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i22 ], [ %.pre.i23, %bb.i24 ] ; [#uses=1]
- %140 = add nsw i32 %139, -1 ; [#uses=1]
- store i32 %140, i32* %0, align 4
- br label %bb18.backedge
-
-bb10: ; preds = %bb4
- %tmp101 = add i32 %tmp100, %tmp ; [#uses=1]
- %tmp97 = add i32 %tmp96, %tmp ; [#uses=1]
- %tmp93 = add i32 %tmp92, %tmp ; [#uses=1]
- %tmp89 = add i32 %tmp88, %tmp ; [#uses=1]
- %tmp85 = add i32 %tmp84, %tmp ; [#uses=1]
- %tmp81 = add i32 %tmp80, %tmp ; [#uses=1]
- %tmp77 = add i32 %tmp76, %tmp ; [#uses=1]
- %tmp73 = add i32 %tmp72, %tmp ; [#uses=1]
- %tmp69 = add i32 %tmp68, %tmp ; [#uses=1]
- %uglygep102 = getelementptr i8* %this52, i32 %tmp101 ; [#uses=1]
- %uglygep98 = getelementptr i8* %this52, i32 %tmp97 ; [#uses=1]
- %uglygep94 = getelementptr i8* %this52, i32 %tmp93 ; [#uses=1]
- %uglygep90 = getelementptr i8* %this52, i32 %tmp89 ; [#uses=1]
- %uglygep86 = getelementptr i8* %this52, i32 %tmp85 ; [#uses=1]
- %uglygep82 = getelementptr i8* %this52, i32 %tmp81 ; [#uses=1]
- %uglygep78 = getelementptr i8* %this52, i32 %tmp77 ; [#uses=1]
- %uglygep74 = getelementptr i8* %this52, i32 %tmp73 ; [#uses=1]
- %uglygep70 = getelementptr i8* %this52, i32 %tmp69 ; [#uses=1]
- %uglygep102103 = bitcast i8* %uglygep102 to float* ; [#uses=1]
- %uglygep9899 = bitcast i8* %uglygep98 to float* ; [#uses=1]
- %uglygep9495 = bitcast i8* %uglygep94 to float* ; [#uses=1]
- %uglygep9091 = bitcast i8* %uglygep90 to float* ; [#uses=1]
- %uglygep8687 = bitcast i8* %uglygep86 to float* ; [#uses=1]
- %uglygep8283 = bitcast i8* %uglygep82 to float* ; [#uses=1]
- %uglygep7879 = bitcast i8* %uglygep78 to float* ; [#uses=1]
- %uglygep7475 = bitcast i8* %uglygep74 to float* ; [#uses=1]
- %uglygep7071 = bitcast i8* %uglygep70 to float* ; [#uses=1]
- %141 = load float* %uglygep7071, align 4 ; [#uses=1]
- %142 = fmul float %141, %117 ; [#uses=1]
- %143 = load float* %uglygep7475, align 4 ; [#uses=1]
- %144 = fmul float %143, %117 ; [#uses=1]
- %145 = load float* %uglygep7879, align 4 ; [#uses=1]
- %146 = fmul float %145, %117 ; [#uses=1]
- %147 = load float* %uglygep8283, align 4 ; [#uses=1]
- %148 = fsub float %147, %142 ; [#uses=1]
- %149 = load float* %uglygep8687, align 4 ; [#uses=1]
- %150 = fsub float %149, %144 ; [#uses=1]
- %151 = load float* %uglygep9091, align 4 ; [#uses=1]
- %152 = fsub float %151, %146 ; [#uses=1]
- %153 = load float* %uglygep9495, align 4 ; [#uses=1]
- %154 = fsub float %153, %148 ; [#uses=2]
- %155 = load float* %uglygep9899, align 4 ; [#uses=1]
- %156 = fsub float %155, %150 ; [#uses=2]
- %157 = load float* %uglygep102103, align 4 ; [#uses=1]
- %158 = fsub float %157, %152 ; [#uses=2]
- %159 = fmul float %158, %158 ; [#uses=1]
- %160 = fmul float %156, %156 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=1]
- %162 = fmul float %154, %154 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fmul float %118, %118 ; [#uses=1]
- %165 = fcmp olt float %164, %163 ; [#uses=1]
- br i1 %165, label %bb14, label %bb15
-
-bb14: ; preds = %bb10
- %166 = load i8** %uglygep6364, align 4 ; [#uses=2]
- %167 = icmp eq i8* %166, null ; [#uses=1]
- br i1 %167, label %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb14
- %168 = load i8 (i8*)** @gContactDestroyedCallback, align 4 ; [#uses=2]
- %169 = icmp eq i8 (i8*)* %168, null ; [#uses=1]
- br i1 %169, label %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb.i.i
- %170 = tail call zeroext i8 %168(i8* %166) ; [#uses=0]
- store i8* null, i8** %uglygep6364, align 4
- br label %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i
-
-_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i: ; preds = %bb2.i.i, %bb.i.i, %bb14
- %171 = load i32* %0, align 4 ; [#uses=2]
- %172 = add nsw i32 %171, -1 ; [#uses=11]
- %173 = icmp eq i32 %172, %i.148 ; [#uses=1]
- br i1 %173, label %_ZN20btPersistentManifold18removeContactPointEi.exit, label %bb.i
-
-bb.i: ; preds = %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i
- %174 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172 ; [#uses=1]
- %175 = bitcast %struct.btManifoldPoint* %174 to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %uglygep59, i8* %175, i32 276, i32 4, i1 false)
- %176 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 12 ; [#uses=1]
- store i8* null, i8** %176, align 4
- %177 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 24, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %177, align 4
- %178 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 24, i32 1, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %178, align 4
- %179 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 24, i32 2, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %179, align 4
- %180 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %180, align 4
- %181 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 14 ; [#uses=1]
- store i8 0, i8* %181, align 4
- %182 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %182, align 4
- %183 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %183, align 4
- %184 = getelementptr inbounds %struct.btPersistentManifold* %this, i32 0, i32 1, i32 %172, i32 21 ; [#uses=1]
- store i32 0, i32* %184, align 4
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btPersistentManifold18removeContactPointEi.exit
-
-_ZN20btPersistentManifold18removeContactPointEi.exit: ; preds = %bb.i, %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i
- %185 = phi i32 [ %171, %_ZN20btPersistentManifold14clearUserCacheER15btManifoldPoint.exit.i ], [ %.pre.i, %bb.i ] ; [#uses=1]
- %186 = add nsw i32 %185, -1 ; [#uses=1]
- store i32 %186, i32* %0, align 4
- br label %bb18.backedge
-
-bb15: ; preds = %bb10
- %187 = load i8 (%struct.btManifoldPoint*, i8*, i8*)** @gContactProcessedCallback, align 4 ; [#uses=2]
- %188 = icmp eq i8 (%struct.btManifoldPoint*, i8*, i8*)* %187, null ; [#uses=1]
- br i1 %188, label %bb18.backedge, label %bb16
-
-bb18.backedge: ; preds = %bb16, %bb15, %_ZN20btPersistentManifold18removeContactPointEi.exit, %_ZN20btPersistentManifold18removeContactPointEi.exit25
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %112 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb4
-
-bb16: ; preds = %bb15
- %189 = load i8** %115, align 4 ; [#uses=1]
- %190 = load i8** %116, align 4 ; [#uses=1]
- %191 = tail call zeroext i8 %187(%struct.btManifoldPoint* %uglygep5960, i8* %190, i8* %189) ; [#uses=0]
- br label %bb18.backedge
-
-return: ; preds = %bb18.backedge, %bb3
- ret void
-}
-
-; [#uses=2]
-define void @_ZN25btTriangleRaycastCallbackC2ERK9btVector3S2_j(%struct.btTriangleRaycastCallback* nocapture %this, %struct.btQuadWord* nocapture %from, %struct.btQuadWord* nocapture %to, i32 %flags) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 3 ; [#uses=1]
- store i32 %flags, i32* %25, align 4
- %26 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %26, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btTriangleRaycastCallbackD1Ev(%struct.btTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btTriangleRaycastCallbackD0Ev(%struct.btTriangleRaycastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btTriangleRaycastCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btTriangleRaycastCallback15processTriangleEP9btVector3ii(%struct.btTriangleRaycastCallback* %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %triangleNormal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=4]
- %5 = fsub float %2, %4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- %10 = fsub float %7, %9 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=4]
- %15 = fsub float %12, %14 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=2]
- %18 = fsub float %17, %4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fsub float %20, %9 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fsub float %23, %14 ; [#uses=2]
- %25 = fmul float %15, %21 ; [#uses=1]
- %26 = fmul float %10, %24 ; [#uses=1]
- %27 = fsub float %25, %26 ; [#uses=10]
- %28 = fmul float %5, %24 ; [#uses=1]
- %29 = fmul float %15, %18 ; [#uses=1]
- %30 = fsub float %28, %29 ; [#uses=10]
- %31 = fmul float %10, %18 ; [#uses=1]
- %32 = fmul float %5, %21 ; [#uses=1]
- %33 = fsub float %31, %32 ; [#uses=10]
- %34 = getelementptr inbounds %struct.btQuadWord* %triangleNormal, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %33, float* %34, align 8
- %35 = getelementptr inbounds %struct.btQuadWord* %triangleNormal, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %30, float* %35, align 4
- %36 = getelementptr inbounds %struct.btQuadWord* %triangleNormal, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %27, float* %36, align 8
- %37 = getelementptr inbounds %struct.btQuadWord* %triangleNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = fmul float %14, %33 ; [#uses=1]
- %39 = fmul float %9, %30 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = fmul float %4, %27 ; [#uses=1]
- %42 = fadd float %40, %41 ; [#uses=2]
- %43 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = fmul float %33, %44 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = fmul float %30, %47 ; [#uses=1]
- %49 = fadd float %45, %48 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- %52 = fmul float %27, %51 ; [#uses=1]
- %53 = fadd float %49, %52 ; [#uses=1]
- %54 = fsub float %53, %42 ; [#uses=5]
- %55 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=2]
- %57 = fmul float %33, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = fmul float %30, %59 ; [#uses=1]
- %61 = fadd float %57, %60 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=2]
- %64 = fmul float %27, %63 ; [#uses=1]
- %65 = fadd float %61, %64 ; [#uses=1]
- %66 = fsub float %65, %42 ; [#uses=2]
- %67 = fmul float %54, %66 ; [#uses=1]
- %68 = fcmp ult float %67, 0.000000e+00 ; [#uses=1]
- br i1 %68, label %bb, label %return
-
-bb: ; preds = %entry
- %69 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 3 ; [#uses=1]
- %70 = load i32* %69, align 4 ; [#uses=2]
- %71 = and i32 %70, 1 ; [#uses=1]
- %toBool.not = icmp ne i32 %71, 0 ; [#uses=1]
- %72 = fcmp ogt float %54, 0.000000e+00 ; [#uses=1]
- %or.cond = and i1 %toBool.not, %72 ; [#uses=1]
- br i1 %or.cond, label %return, label %bb4
-
-bb4: ; preds = %bb
- %73 = fsub float %54, %66 ; [#uses=1]
- %74 = fdiv float %54, %73 ; [#uses=7]
- %75 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 4 ; [#uses=3]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fcmp ogt float %76, %74 ; [#uses=1]
- br i1 %77, label %bb5, label %return
-
-bb5: ; preds = %bb4
- %78 = fmul float %33, %33 ; [#uses=1]
- %79 = fmul float %30, %30 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=1]
- %81 = fmul float %27, %27 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=2]
- %83 = fmul float %82, 0xBF1A36E2E0000000 ; [#uses=3]
- %84 = fsub float 1.000000e+00, %74 ; [#uses=3]
- %85 = fmul float %44, %84 ; [#uses=1]
- %86 = fmul float %56, %74 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=3]
- %88 = fmul float %47, %84 ; [#uses=1]
- %89 = fmul float %59, %74 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=3]
- %91 = fmul float %51, %84 ; [#uses=1]
- %92 = fmul float %63, %74 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=3]
- %94 = fsub float %4, %93 ; [#uses=4]
- %95 = fsub float %9, %90 ; [#uses=4]
- %96 = fsub float %14, %87 ; [#uses=4]
- %97 = fsub float %2, %93 ; [#uses=4]
- %98 = fsub float %7, %90 ; [#uses=4]
- %99 = fsub float %12, %87 ; [#uses=4]
- %100 = fmul float %96, %98 ; [#uses=1]
- %101 = fmul float %95, %99 ; [#uses=1]
- %102 = fsub float %100, %101 ; [#uses=1]
- %103 = fmul float %94, %99 ; [#uses=1]
- %104 = fmul float %96, %97 ; [#uses=1]
- %105 = fsub float %103, %104 ; [#uses=1]
- %106 = fmul float %95, %97 ; [#uses=1]
- %107 = fmul float %94, %98 ; [#uses=1]
- %108 = fsub float %106, %107 ; [#uses=1]
- %109 = fmul float %108, %33 ; [#uses=1]
- %110 = fmul float %105, %30 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = fmul float %102, %27 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=1]
- %114 = fcmp ult float %113, %83 ; [#uses=1]
- br i1 %114, label %return, label %bb15
-
-bb15: ; preds = %bb5
- %115 = fsub float %17, %93 ; [#uses=4]
- %116 = fsub float %20, %90 ; [#uses=4]
- %117 = fsub float %23, %87 ; [#uses=4]
- %118 = fmul float %99, %116 ; [#uses=1]
- %119 = fmul float %98, %117 ; [#uses=1]
- %120 = fsub float %118, %119 ; [#uses=1]
- %121 = fmul float %97, %117 ; [#uses=1]
- %122 = fmul float %99, %115 ; [#uses=1]
- %123 = fsub float %121, %122 ; [#uses=1]
- %124 = fmul float %98, %115 ; [#uses=1]
- %125 = fmul float %97, %116 ; [#uses=1]
- %126 = fsub float %124, %125 ; [#uses=1]
- %127 = fmul float %126, %33 ; [#uses=1]
- %128 = fmul float %123, %30 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=1]
- %130 = fmul float %120, %27 ; [#uses=1]
- %131 = fadd float %129, %130 ; [#uses=1]
- %132 = fcmp ult float %131, %83 ; [#uses=1]
- br i1 %132, label %return, label %bb21
-
-bb21: ; preds = %bb15
- %133 = fmul float %117, %95 ; [#uses=1]
- %134 = fmul float %116, %96 ; [#uses=1]
- %135 = fsub float %133, %134 ; [#uses=1]
- %136 = fmul float %115, %96 ; [#uses=1]
- %137 = fmul float %117, %94 ; [#uses=1]
- %138 = fsub float %136, %137 ; [#uses=1]
- %139 = fmul float %116, %94 ; [#uses=1]
- %140 = fmul float %115, %95 ; [#uses=1]
- %141 = fsub float %139, %140 ; [#uses=1]
- %142 = fmul float %141, %33 ; [#uses=1]
- %143 = fmul float %138, %30 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = fmul float %135, %27 ; [#uses=1]
- %146 = fadd float %144, %145 ; [#uses=1]
- %147 = fcmp ult float %146, %83 ; [#uses=1]
- br i1 %147, label %return, label %bb25
-
-bb25: ; preds = %bb21
- %148 = call float @sqrtf(float %82) nounwind readonly ; [#uses=1]
- %149 = fdiv float 1.000000e+00, %148 ; [#uses=3]
- %150 = fmul float %33, %149 ; [#uses=2]
- store float %150, float* %34, align 8
- %151 = fmul float %30, %149 ; [#uses=2]
- store float %151, float* %35, align 4
- %152 = fmul float %27, %149 ; [#uses=2]
- store float %152, float* %36, align 8
- %153 = and i32 %70, 2 ; [#uses=1]
- %154 = icmp eq i32 %153, 0 ; [#uses=1]
- %155 = fcmp ugt float %54, 0.000000e+00 ; [#uses=1]
- %or.cond30 = and i1 %154, %155 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %157 = load i32 (...)*** %156, align 4 ; [#uses=1]
- %158 = getelementptr inbounds i32 (...)** %157, i32 3 ; [#uses=1]
- %159 = load i32 (...)** %158, align 4 ; [#uses=2]
- br i1 %or.cond30, label %bb28, label %bb27
-
-bb27: ; preds = %bb25
- %160 = fsub float -0.000000e+00, %152 ; [#uses=1]
- %161 = fsub float -0.000000e+00, %151 ; [#uses=1]
- %162 = fsub float -0.000000e+00, %150 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %162, float* %163, align 8
- %164 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %161, float* %164, align 4
- %165 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %160, float* %165, align 8
- %166 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %166, align 4
- %167 = bitcast i32 (...)* %159 to float (%struct.btTriangleRaycastCallback*, %struct.btQuadWord*, float, i32, i32)* ; [#uses=1]
- %168 = call float %167(%struct.btTriangleRaycastCallback* %this, %struct.btQuadWord* %0, float %74, i32 %partId, i32 %triangleIndex) ; [#uses=1]
- store float %168, float* %75, align 4
- ret void
-
-bb28: ; preds = %bb25
- %169 = bitcast i32 (...)* %159 to float (%struct.btTriangleRaycastCallback*, %struct.btQuadWord*, float, i32, i32)* ; [#uses=1]
- %170 = call float %169(%struct.btTriangleRaycastCallback* %this, %struct.btQuadWord* %triangleNormal, float %74, i32 %partId, i32 %triangleIndex) ; [#uses=1]
- store float %170, float* %75, align 4
- ret void
-
-return: ; preds = %bb21, %bb15, %bb5, %bb4, %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btTriangleRaycastCallbackC1ERK9btVector3S2_j(%struct.btTriangleRaycastCallback* nocapture %this, %struct.btQuadWord* nocapture %from, %struct.btQuadWord* nocapture %to, i32 %flags) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV25btTriangleRaycastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 3 ; [#uses=1]
- store i32 %flags, i32* %25, align 4
- %26 = getelementptr inbounds %struct.btTriangleRaycastCallback* %this, i32 0, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %26, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN28btTriangleConvexcastCallbackC2EPK13btConvexShapeRK11btTransformS5_S5_f(%struct.btTriangleConvexcastCallback* nocapture %this, %struct.btConvexShape* %convexShape, %struct.btTransform* nocapture %convexShapeFrom, %struct.btTransform* nocapture %convexShapeTo, %struct.btTransform* nocapture %triangleToWorld, float %triangleCollisionMargin) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btConvexShape* %convexShape, %struct.btConvexShape** %1, align 4
- %2 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %convexShapeFrom, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- store float %88, float* %86, align 4
- %89 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- store float %91, float* %89, align 4
- %92 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- store float %94, float* %92, align 4
- %95 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btTransform* %convexShapeTo, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- store float %97, float* %95, align 4
- %98 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=1]
- store float %100, float* %98, align 4
- %101 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=1]
- store float %103, float* %101, align 4
- %104 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- store float %106, float* %104, align 4
- %107 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- store float %109, float* %107, align 4
- %110 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- store float %112, float* %110, align 4
- %113 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- store float %115, float* %113, align 4
- %116 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- store float %118, float* %116, align 4
- %119 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- store float %121, float* %119, align 4
- %122 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- store float %124, float* %122, align 4
- %125 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=1]
- store float %127, float* %125, align 4
- %128 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- store float %130, float* %128, align 4
- %131 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- store float %133, float* %131, align 4
- %134 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- store float %136, float* %134, align 4
- %137 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=1]
- store float %139, float* %137, align 4
- %140 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=1]
- store float %142, float* %140, align 4
- %143 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btTransform* %triangleToWorld, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- store float %145, float* %143, align 4
- %146 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 5 ; [#uses=1]
- store float 1.000000e+00, float* %146, align 4
- %147 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 6 ; [#uses=1]
- store float %triangleCollisionMargin, float* %147, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btTriangleConvexcastCallbackD1Ev(%struct.btTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN28btTriangleConvexcastCallbackD0Ev(%struct.btTriangleConvexcastCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV28btTriangleConvexcastCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN18btTriangleCallbackD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btTriangleConvexcastCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN28btTriangleConvexcastCallback15processTriangleEP9btVector3ii(%struct.btTriangleConvexcastCallback* %this, %struct.btQuadWord* nocapture %triangle, i32 %partId, i32 %triangleIndex) align 2 {
-invcont:
- %triangleShape = alloca %struct.btTriangleShape, align 8 ; [#uses=17]
- %simplexSolver = alloca %struct.btVoronoiSimplexSolver, align 8 ; [#uses=3]
- %gjkEpaPenetrationSolver = alloca %struct..0btMultiSapOverlapFilterCallback, align 8 ; [#uses=2]
- %convexCaster = alloca %struct.btContinuousConvexCollision, align 8 ; [#uses=6]
- %castResult = alloca %"struct.btConvexCast::CastResult", align 8 ; [#uses=10]
- %0 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %0)
- %1 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV15btTriangleShape, i32 0, i32 2), i32 (...)*** %1, align 8
- %2 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %triangle, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 6 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %40, float* %41, align 4
- %42 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 8 ; [#uses=1]
- store float 0x3F1A36E2E0000000, float* %42, align 4
- %43 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %simplexSolver, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %45 = and i8 %44, -16 ; [#uses=1]
- store i8 %45, i8* %43, align 4
- %46 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %gjkEpaPenetrationSolver, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %46, align 8
- %47 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 1 ; [#uses=1]
- %48 = load %struct.btConvexShape** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTriangleShape* %triangleShape, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %50 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %gjkEpaPenetrationSolver, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN27btContinuousConvexCollisionC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btContinuousConvexCollision* %convexCaster, %struct.btConvexShape* %48, %struct.btConvexShape* %49, %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btActionInterface* %50)
- to label %invcont1 unwind label %lpad23
-
-invcont1: ; preds = %invcont
- %51 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN12btConvexCast10CastResultE, i32 0, i32 2), i32 (...)*** %51, align 8
- %52 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 5 ; [#uses=2]
- %53 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 6 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %53, align 8
- %54 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- store float 1.000000e+00, float* %52, align 4
- %55 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 4 ; [#uses=2]
- %56 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 3 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 2 ; [#uses=1]
- %58 = invoke zeroext i8 @_ZN27btContinuousConvexCollision16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btContinuousConvexCollision* %convexCaster, %struct.btTransform* %57, %struct.btTransform* %56, %struct.btTransform* %55, %struct.btTransform* %55, %"struct.btConvexCast::CastResult"* %castResult)
- to label %invcont2 unwind label %lpad27 ; [#uses=1]
-
-invcont2: ; preds = %invcont1
- %toBool = icmp eq i8 %58, 0 ; [#uses=1]
- br i1 %toBool, label %bb10, label %bb
-
-bb: ; preds = %invcont2
- %59 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fmul float %60, %60 ; [#uses=1]
- %62 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %63 = load float* %62, align 4 ; [#uses=3]
- %64 = fmul float %63, %63 ; [#uses=1]
- %65 = fadd float %61, %64 ; [#uses=1]
- %66 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = fmul float %67, %67 ; [#uses=1]
- %69 = fadd float %65, %68 ; [#uses=2]
- %70 = fcmp ogt float %69, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %70, label %bb4, label %bb10
-
-bb4: ; preds = %bb
- %71 = load float* %52, align 4 ; [#uses=2]
- %72 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 5 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fcmp olt float %71, %73 ; [#uses=1]
- br i1 %74, label %bb5, label %bb10
-
-bb5: ; preds = %bb4
- %75 = call float @sqrtf(float %69) nounwind readonly ; [#uses=1]
- %76 = fdiv float 1.000000e+00, %75 ; [#uses=3]
- %77 = fmul float %60, %76 ; [#uses=1]
- store float %77, float* %59, align 4
- %78 = fmul float %63, %76 ; [#uses=1]
- store float %78, float* %62, align 4
- %79 = fmul float %67, %76 ; [#uses=1]
- store float %79, float* %66, align 4
- %80 = getelementptr inbounds %struct.btTriangleConvexcastCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %81 = load i32 (...)*** %80, align 4 ; [#uses=1]
- %82 = getelementptr inbounds i32 (...)** %81, i32 3 ; [#uses=1]
- %83 = load i32 (...)** %82, align 4 ; [#uses=1]
- %84 = bitcast i32 (...)* %83 to float (%struct.btTriangleConvexcastCallback*, %struct.btQuadWord*, %struct.btQuadWord*, float, i32, i32)* ; [#uses=1]
- %85 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 3 ; [#uses=1]
- %86 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %castResult, i32 0, i32 4 ; [#uses=1]
- %87 = invoke float %84(%struct.btTriangleConvexcastCallback* %this, %struct.btQuadWord* %85, %struct.btQuadWord* %86, float %71, i32 %partId, i32 %triangleIndex)
- to label %bb10 unwind label %lpad27 ; [#uses=0]
-
-bb10: ; preds = %bb5, %bb4, %bb, %invcont2
- %88 = getelementptr inbounds %struct.btContinuousConvexCollision* %convexCaster, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %88, align 8
- %89 = getelementptr inbounds %struct.btContinuousConvexCollision* %convexCaster, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %89)
- to label %bb15 unwind label %lpad23
-
-bb15: ; preds = %bb10
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %46, align 8
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %49)
- ret void
-
-invcont19: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-lpad23: ; preds = %bb10, %invcont
- %eh_ptr24 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select26 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr24, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad27: ; preds = %bb5, %invcont1
- %eh_ptr28 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select30 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr28, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %90 = getelementptr inbounds %struct.btContinuousConvexCollision* %convexCaster, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV27btContinuousConvexCollision, i32 0, i32 2), i32 (...)*** %90, align 8
- %91 = getelementptr inbounds %struct.btContinuousConvexCollision* %convexCaster, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %91)
- to label %ppad unwind label %lpad31
-
-lpad31: ; preds = %lpad27
- %eh_ptr32 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select34 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad35: ; preds = %ppad
- %eh_ptr36 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select38 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr36, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %lpad27, %lpad23
- %eh_exception.0 = phi i8* [ %eh_ptr24, %lpad23 ], [ %eh_ptr28, %lpad27 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** %46, align 8
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %1, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %49)
- to label %invcont19 unwind label %lpad35
-}
-
-; [#uses=0]
-define void @_ZN28btTriangleConvexcastCallbackC1EPK13btConvexShapeRK11btTransformS5_S5_f(%struct.btTriangleConvexcastCallback* nocapture %this, %struct.btConvexShape* %convexShape, %struct.btTransform* nocapture %convexShapeFrom, %struct.btTransform* nocapture %convexShapeTo, %struct.btTransform* nocapture %triangleToWorld, float %triangleCollisionMargin) nounwind align 2 {
-entry:
- tail call void @_ZN28btTriangleConvexcastCallbackC2EPK13btConvexShapeRK11btTransformS5_S5_f(%struct.btTriangleConvexcastCallback* %this, %struct.btConvexShape* %convexShape, %struct.btTransform* %convexShapeFrom, %struct.btTransform* %convexShapeTo, %struct.btTransform* %triangleToWorld, float %triangleCollisionMargin)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN22btSubsimplexConvexCastC2EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* nocapture %this, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btVoronoiSimplexSolver* %simplexSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %1, align 4
- %2 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btConvexShape* %convexA, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexB, %struct.btConvexShape** %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btSubsimplexConvexCastD1Ev(%struct.btGjkConvexCast* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN22btSubsimplexConvexCastD0Ev(%struct.btGjkConvexCast* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN12btConvexCastD2Ev(%struct.btActionInterface* %1)
- %2 = bitcast %struct.btGjkConvexCast* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=3]
-define zeroext i8 @_ZN22btSubsimplexConvexCast16calcTimeOfImpactERK11btTransformS2_S2_S2_RN12btConvexCast10CastResultE(%struct.btGjkConvexCast* nocapture %this, %struct.btTransform* %fromA, %struct.btTransform* nocapture %toA, %struct.btTransform* %fromB, %struct.btTransform* nocapture %toB, %"struct.btConvexCast::CastResult"* nocapture %result) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %5 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %6 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %7 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %v = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %supVertexA = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %supVertexB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %w = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %hitA = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %hitB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %8 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 1 ; [#uses=5]
- %9 = load %struct.btVoronoiSimplexSolver** %8, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver5resetEv(%struct.btVoronoiSimplexSolver* %9)
- %10 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fsub float %16, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %toA, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fsub float %21, %23 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %28 = load float* %27, align 4 ; [#uses=2]
- %29 = fsub float %26, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = fsub float %31, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %toB, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = fsub float %36, %38 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %41 = load float* %40, align 4 ; [#uses=3]
- %42 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=3]
- %44 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %45 = load float* %44, align 4 ; [#uses=3]
- %46 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %47 = load float* %46, align 4 ; [#uses=3]
- %48 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=3]
- %50 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %53 = load float* %52, align 4 ; [#uses=3]
- %54 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %55 = load float* %54, align 4 ; [#uses=3]
- %56 = getelementptr inbounds %struct.btTransform* %fromA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %57 = load float* %56, align 4 ; [#uses=3]
- %58 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %59 = load float* %58, align 4 ; [#uses=2]
- %60 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- %61 = load float* %60, align 4 ; [#uses=2]
- %62 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %63 = load float* %62, align 4 ; [#uses=2]
- %64 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- %65 = load float* %64, align 4 ; [#uses=2]
- %66 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- %67 = load float* %66, align 4 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- %69 = load float* %68, align 4 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %71 = load float* %70, align 4 ; [#uses=2]
- %72 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %73 = load float* %72, align 4 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btTransform* %fromB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %75 = load float* %74, align 4 ; [#uses=2]
- %76 = fsub float %14, %29 ; [#uses=6]
- %77 = fsub float %19, %34 ; [#uses=6]
- %78 = fsub float %24, %39 ; [#uses=6]
- %79 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 2 ; [#uses=2]
- %80 = load %struct.btConvexShape** %79, align 4 ; [#uses=2]
- %81 = getelementptr inbounds %struct.btConvexShape* %80, i32 0, i32 0, i32 0 ; [#uses=1]
- %82 = load i32 (...)*** %81, align 4 ; [#uses=1]
- %83 = getelementptr inbounds i32 (...)** %82, i32 15 ; [#uses=1]
- %84 = load i32 (...)** %83, align 4 ; [#uses=1]
- %85 = fsub float -0.000000e+00, %76 ; [#uses=3]
- %86 = fsub float -0.000000e+00, %77 ; [#uses=3]
- %87 = fsub float -0.000000e+00, %78 ; [#uses=3]
- %88 = fmul float %45, %87 ; [#uses=1]
- %89 = fmul float %51, %86 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %57, %85 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %43, %87 ; [#uses=1]
- %94 = fmul float %49, %86 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %55, %85 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %41, %87 ; [#uses=1]
- %99 = fmul float %47, %86 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %53, %85 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %102, float* %103, align 8
- %104 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %97, float* %104, align 4
- %105 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %92, float* %105, align 8
- %106 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %106, align 4
- %107 = bitcast i32 (...)* %84 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %107(%struct.btQuadWord* noalias sret %7, %struct.btConvexShape* %80, %struct.btQuadWord* %6)
- %108 = load float* %52, align 4 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 0 ; [#uses=1]
- %110 = load float* %109, align 8 ; [#uses=3]
- %111 = fmul float %108, %110 ; [#uses=1]
- %112 = load float* %54, align 4 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 1 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=3]
- %115 = fmul float %112, %114 ; [#uses=1]
- %116 = fadd float %111, %115 ; [#uses=1]
- %117 = load float* %56, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 2 ; [#uses=1]
- %119 = load float* %118, align 8 ; [#uses=3]
- %120 = fmul float %117, %119 ; [#uses=1]
- %121 = fadd float %116, %120 ; [#uses=1]
- %122 = load float* %12, align 4 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=1]
- %124 = load float* %46, align 4 ; [#uses=1]
- %125 = fmul float %124, %110 ; [#uses=1]
- %126 = load float* %48, align 4 ; [#uses=1]
- %127 = fmul float %126, %114 ; [#uses=1]
- %128 = fadd float %125, %127 ; [#uses=1]
- %129 = load float* %50, align 4 ; [#uses=1]
- %130 = fmul float %129, %119 ; [#uses=1]
- %131 = fadd float %128, %130 ; [#uses=1]
- %132 = load float* %17, align 4 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = load float* %40, align 4 ; [#uses=1]
- %135 = fmul float %134, %110 ; [#uses=1]
- %136 = load float* %42, align 4 ; [#uses=1]
- %137 = fmul float %136, %114 ; [#uses=1]
- %138 = fadd float %135, %137 ; [#uses=1]
- %139 = load float* %44, align 4 ; [#uses=1]
- %140 = fmul float %139, %119 ; [#uses=1]
- %141 = fadd float %138, %140 ; [#uses=1]
- %142 = load float* %22, align 4 ; [#uses=1]
- %143 = fadd float %141, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btQuadWord* %supVertexA, i32 0, i32 0, i32 0 ; [#uses=4]
- store float %143, float* %144, align 8
- %145 = getelementptr inbounds %struct.btQuadWord* %supVertexA, i32 0, i32 0, i32 1 ; [#uses=4]
- store float %133, float* %145, align 4
- %146 = getelementptr inbounds %struct.btQuadWord* %supVertexA, i32 0, i32 0, i32 2 ; [#uses=4]
- store float %123, float* %146, align 8
- %147 = getelementptr inbounds %struct.btQuadWord* %supVertexA, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %147, align 4
- %148 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 3 ; [#uses=2]
- %149 = load %struct.btConvexShape** %148, align 4 ; [#uses=2]
- %150 = getelementptr inbounds %struct.btConvexShape* %149, i32 0, i32 0, i32 0 ; [#uses=1]
- %151 = load i32 (...)*** %150, align 4 ; [#uses=1]
- %152 = getelementptr inbounds i32 (...)** %151, i32 15 ; [#uses=1]
- %153 = load i32 (...)** %152, align 4 ; [#uses=1]
- %154 = load float* %62, align 4 ; [#uses=1]
- %155 = fmul float %154, %78 ; [#uses=1]
- %156 = load float* %68, align 4 ; [#uses=1]
- %157 = fmul float %156, %77 ; [#uses=1]
- %158 = fadd float %155, %157 ; [#uses=1]
- %159 = load float* %74, align 4 ; [#uses=1]
- %160 = fmul float %159, %76 ; [#uses=1]
- %161 = fadd float %158, %160 ; [#uses=1]
- %162 = load float* %60, align 4 ; [#uses=1]
- %163 = fmul float %162, %78 ; [#uses=1]
- %164 = load float* %66, align 4 ; [#uses=1]
- %165 = fmul float %164, %77 ; [#uses=1]
- %166 = fadd float %163, %165 ; [#uses=1]
- %167 = load float* %72, align 4 ; [#uses=1]
- %168 = fmul float %167, %76 ; [#uses=1]
- %169 = fadd float %166, %168 ; [#uses=1]
- %170 = load float* %58, align 4 ; [#uses=1]
- %171 = fmul float %170, %78 ; [#uses=1]
- %172 = load float* %64, align 4 ; [#uses=1]
- %173 = fmul float %172, %77 ; [#uses=1]
- %174 = fadd float %171, %173 ; [#uses=1]
- %175 = load float* %70, align 4 ; [#uses=1]
- %176 = fmul float %175, %76 ; [#uses=1]
- %177 = fadd float %174, %176 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %177, float* %178, align 8
- %179 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %169, float* %179, align 4
- %180 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %161, float* %180, align 8
- %181 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %181, align 4
- %182 = bitcast i32 (...)* %153 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %182(%struct.btQuadWord* noalias sret %5, %struct.btConvexShape* %149, %struct.btQuadWord* %4)
- %183 = load float* %70, align 4 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- %185 = load float* %184, align 8 ; [#uses=3]
- %186 = fmul float %183, %185 ; [#uses=1]
- %187 = load float* %72, align 4 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 1 ; [#uses=1]
- %189 = load float* %188, align 4 ; [#uses=3]
- %190 = fmul float %187, %189 ; [#uses=1]
- %191 = fadd float %186, %190 ; [#uses=1]
- %192 = load float* %74, align 4 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 2 ; [#uses=1]
- %194 = load float* %193, align 8 ; [#uses=3]
- %195 = fmul float %192, %194 ; [#uses=1]
- %196 = fadd float %191, %195 ; [#uses=1]
- %197 = load float* %27, align 4 ; [#uses=1]
- %198 = fadd float %196, %197 ; [#uses=2]
- %199 = load float* %64, align 4 ; [#uses=1]
- %200 = fmul float %199, %185 ; [#uses=1]
- %201 = load float* %66, align 4 ; [#uses=1]
- %202 = fmul float %201, %189 ; [#uses=1]
- %203 = fadd float %200, %202 ; [#uses=1]
- %204 = load float* %68, align 4 ; [#uses=1]
- %205 = fmul float %204, %194 ; [#uses=1]
- %206 = fadd float %203, %205 ; [#uses=1]
- %207 = load float* %32, align 4 ; [#uses=1]
- %208 = fadd float %206, %207 ; [#uses=2]
- %209 = load float* %58, align 4 ; [#uses=1]
- %210 = fmul float %209, %185 ; [#uses=1]
- %211 = load float* %60, align 4 ; [#uses=1]
- %212 = fmul float %211, %189 ; [#uses=1]
- %213 = fadd float %210, %212 ; [#uses=1]
- %214 = load float* %62, align 4 ; [#uses=1]
- %215 = fmul float %214, %194 ; [#uses=1]
- %216 = fadd float %213, %215 ; [#uses=1]
- %217 = load float* %37, align 4 ; [#uses=1]
- %218 = fadd float %216, %217 ; [#uses=2]
- %219 = getelementptr inbounds %struct.btQuadWord* %supVertexB, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %218, float* %219, align 8
- %220 = getelementptr inbounds %struct.btQuadWord* %supVertexB, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %208, float* %220, align 4
- %221 = getelementptr inbounds %struct.btQuadWord* %supVertexB, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %198, float* %221, align 8
- %222 = getelementptr inbounds %struct.btQuadWord* %supVertexB, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %222, align 4
- %223 = load float* %146, align 8 ; [#uses=1]
- %224 = fsub float %223, %198 ; [#uses=3]
- %225 = load float* %145, align 4 ; [#uses=1]
- %226 = fsub float %225, %208 ; [#uses=3]
- %227 = load float* %144, align 8 ; [#uses=1]
- %228 = fsub float %227, %218 ; [#uses=3]
- %229 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=5]
- store float %228, float* %229, align 8
- %230 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=5]
- store float %226, float* %230, align 4
- %231 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=5]
- store float %224, float* %231, align 8
- %232 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %232, align 4
- %233 = fmul float %228, %228 ; [#uses=1]
- %234 = fmul float %226, %226 ; [#uses=1]
- %235 = fadd float %233, %234 ; [#uses=1]
- %236 = fmul float %224, %224 ; [#uses=1]
- %237 = fadd float %235, %236 ; [#uses=1]
- %238 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- %239 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- %240 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- %241 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- %242 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %243 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- %244 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- %245 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %246 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %247 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %248 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- %249 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %250 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %251 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %252 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 0 ; [#uses=2]
- %253 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 1 ; [#uses=2]
- %254 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 2 ; [#uses=2]
- %255 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 3 ; [#uses=2]
- br label %bb21
-
-bb: ; preds = %bb22
- %256 = load %struct.btConvexShape** %79, align 4 ; [#uses=2]
- %257 = getelementptr inbounds %struct.btConvexShape* %256, i32 0, i32 0, i32 0 ; [#uses=1]
- %258 = load i32 (...)*** %257, align 4 ; [#uses=1]
- %259 = getelementptr inbounds i32 (...)** %258, i32 15 ; [#uses=1]
- %260 = load i32 (...)** %259, align 4 ; [#uses=1]
- %261 = load float* %231, align 8 ; [#uses=1]
- %262 = fsub float -0.000000e+00, %261 ; [#uses=3]
- %263 = load float* %230, align 4 ; [#uses=1]
- %264 = fsub float -0.000000e+00, %263 ; [#uses=3]
- %265 = load float* %229, align 8 ; [#uses=1]
- %266 = fsub float -0.000000e+00, %265 ; [#uses=3]
- %267 = fmul float %45, %266 ; [#uses=1]
- %268 = fmul float %51, %264 ; [#uses=1]
- %269 = fadd float %267, %268 ; [#uses=1]
- %270 = fmul float %57, %262 ; [#uses=1]
- %271 = fadd float %269, %270 ; [#uses=1]
- %272 = fmul float %43, %266 ; [#uses=1]
- %273 = fmul float %49, %264 ; [#uses=1]
- %274 = fadd float %272, %273 ; [#uses=1]
- %275 = fmul float %55, %262 ; [#uses=1]
- %276 = fadd float %274, %275 ; [#uses=1]
- %277 = fmul float %41, %266 ; [#uses=1]
- %278 = fmul float %47, %264 ; [#uses=1]
- %279 = fadd float %277, %278 ; [#uses=1]
- %280 = fmul float %53, %262 ; [#uses=1]
- %281 = fadd float %279, %280 ; [#uses=1]
- store float %281, float* %238, align 8
- store float %276, float* %239, align 4
- store float %271, float* %240, align 8
- store float 0.000000e+00, float* %241, align 4
- %282 = bitcast i32 (...)* %260 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %282(%struct.btQuadWord* noalias sret %3, %struct.btConvexShape* %256, %struct.btQuadWord* %2)
- %283 = load float* %242, align 8 ; [#uses=3]
- %284 = fmul float %53, %283 ; [#uses=1]
- %285 = load float* %243, align 4 ; [#uses=3]
- %286 = fmul float %55, %285 ; [#uses=1]
- %287 = fadd float %284, %286 ; [#uses=1]
- %288 = load float* %244, align 8 ; [#uses=3]
- %289 = fmul float %57, %288 ; [#uses=1]
- %290 = fadd float %287, %289 ; [#uses=1]
- %291 = fadd float %290, %interpolatedTransA.1.0.2.1 ; [#uses=1]
- %292 = fmul float %47, %283 ; [#uses=1]
- %293 = fmul float %49, %285 ; [#uses=1]
- %294 = fadd float %292, %293 ; [#uses=1]
- %295 = fmul float %51, %288 ; [#uses=1]
- %296 = fadd float %294, %295 ; [#uses=1]
- %297 = fadd float %296, %interpolatedTransA.1.0.1.1 ; [#uses=1]
- %298 = fmul float %41, %283 ; [#uses=1]
- %299 = fmul float %43, %285 ; [#uses=1]
- %300 = fadd float %298, %299 ; [#uses=1]
- %301 = fmul float %45, %288 ; [#uses=1]
- %302 = fadd float %300, %301 ; [#uses=1]
- %303 = fadd float %302, %interpolatedTransA.1.0.0.1 ; [#uses=1]
- store float %303, float* %144, align 8
- store float %297, float* %145, align 4
- store float %291, float* %146, align 8
- store float 0.000000e+00, float* %147, align 4
- %304 = load %struct.btConvexShape** %148, align 4 ; [#uses=2]
- %305 = getelementptr inbounds %struct.btConvexShape* %304, i32 0, i32 0, i32 0 ; [#uses=1]
- %306 = load i32 (...)*** %305, align 4 ; [#uses=1]
- %307 = getelementptr inbounds i32 (...)** %306, i32 15 ; [#uses=1]
- %308 = load i32 (...)** %307, align 4 ; [#uses=1]
- %309 = load float* %229, align 8 ; [#uses=3]
- %310 = fmul float %63, %309 ; [#uses=1]
- %311 = load float* %230, align 4 ; [#uses=3]
- %312 = fmul float %69, %311 ; [#uses=1]
- %313 = fadd float %310, %312 ; [#uses=1]
- %314 = load float* %231, align 8 ; [#uses=3]
- %315 = fmul float %75, %314 ; [#uses=1]
- %316 = fadd float %313, %315 ; [#uses=1]
- %317 = fmul float %61, %309 ; [#uses=1]
- %318 = fmul float %67, %311 ; [#uses=1]
- %319 = fadd float %317, %318 ; [#uses=1]
- %320 = fmul float %73, %314 ; [#uses=1]
- %321 = fadd float %319, %320 ; [#uses=1]
- %322 = fmul float %59, %309 ; [#uses=1]
- %323 = fmul float %65, %311 ; [#uses=1]
- %324 = fadd float %322, %323 ; [#uses=1]
- %325 = fmul float %71, %314 ; [#uses=1]
- %326 = fadd float %324, %325 ; [#uses=1]
- store float %326, float* %245, align 8
- store float %321, float* %246, align 4
- store float %316, float* %247, align 8
- store float 0.000000e+00, float* %248, align 4
- %327 = bitcast i32 (...)* %308 to void (%struct.btQuadWord*, %struct.btConvexShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %327(%struct.btQuadWord* noalias sret %1, %struct.btConvexShape* %304, %struct.btQuadWord* %0)
- %328 = load float* %249, align 8 ; [#uses=3]
- %329 = fmul float %71, %328 ; [#uses=1]
- %330 = load float* %250, align 4 ; [#uses=3]
- %331 = fmul float %73, %330 ; [#uses=1]
- %332 = fadd float %329, %331 ; [#uses=1]
- %333 = load float* %251, align 8 ; [#uses=3]
- %334 = fmul float %75, %333 ; [#uses=1]
- %335 = fadd float %332, %334 ; [#uses=1]
- %336 = fadd float %335, %interpolatedTransB.1.0.2.1 ; [#uses=2]
- %337 = fmul float %65, %328 ; [#uses=1]
- %338 = fmul float %67, %330 ; [#uses=1]
- %339 = fadd float %337, %338 ; [#uses=1]
- %340 = fmul float %69, %333 ; [#uses=1]
- %341 = fadd float %339, %340 ; [#uses=1]
- %342 = fadd float %341, %interpolatedTransB.1.0.1.1 ; [#uses=2]
- %343 = fmul float %59, %328 ; [#uses=1]
- %344 = fmul float %61, %330 ; [#uses=1]
- %345 = fadd float %343, %344 ; [#uses=1]
- %346 = fmul float %63, %333 ; [#uses=1]
- %347 = fadd float %345, %346 ; [#uses=1]
- %348 = fadd float %347, %interpolatedTransB.1.0.0.1 ; [#uses=2]
- store float %348, float* %219, align 8
- store float %342, float* %220, align 4
- store float %336, float* %221, align 8
- store float 0.000000e+00, float* %222, align 4
- %349 = load float* %146, align 8 ; [#uses=1]
- %350 = fsub float %349, %336 ; [#uses=3]
- %351 = load float* %145, align 4 ; [#uses=1]
- %352 = fsub float %351, %342 ; [#uses=3]
- %353 = load float* %144, align 8 ; [#uses=1]
- %354 = fsub float %353, %348 ; [#uses=3]
- store float %354, float* %252, align 8
- store float %352, float* %253, align 4
- store float %350, float* %254, align 8
- store float 0.000000e+00, float* %255, align 4
- %355 = load float* %229, align 8 ; [#uses=3]
- %356 = fmul float %355, %354 ; [#uses=1]
- %357 = load float* %230, align 4 ; [#uses=3]
- %358 = fmul float %357, %352 ; [#uses=1]
- %359 = fadd float %356, %358 ; [#uses=1]
- %360 = load float* %231, align 8 ; [#uses=3]
- %361 = fmul float %360, %350 ; [#uses=1]
- %362 = fadd float %359, %361 ; [#uses=2]
- %363 = fcmp ogt float %lambda.1, 1.000000e+00 ; [#uses=1]
- br i1 %363, label %bb36, label %bb8
-
-bb8: ; preds = %bb
- %364 = fcmp ogt float %362, 0.000000e+00 ; [#uses=1]
- br i1 %364, label %bb9, label %bb13
-
-bb9: ; preds = %bb8
- %365 = fmul float %355, %78 ; [#uses=1]
- %366 = fmul float %357, %77 ; [#uses=1]
- %367 = fadd float %365, %366 ; [#uses=1]
- %368 = fmul float %360, %76 ; [#uses=1]
- %369 = fadd float %367, %368 ; [#uses=2]
- %370 = fcmp ult float %369, 0xBD10000000000000 ; [#uses=1]
- br i1 %370, label %bb11, label %bb36
-
-bb11: ; preds = %bb9
- %371 = fdiv float %362, %369 ; [#uses=1]
- %372 = fsub float %lambda.1, %371 ; [#uses=8]
- %373 = fsub float 1.000000e+00, %372 ; [#uses=6]
- %374 = load float* %22, align 4 ; [#uses=1]
- %375 = fmul float %374, %373 ; [#uses=1]
- %376 = load float* %20, align 4 ; [#uses=1]
- %377 = fmul float %376, %372 ; [#uses=1]
- %378 = fadd float %375, %377 ; [#uses=1]
- %379 = load float* %17, align 4 ; [#uses=1]
- %380 = fmul float %379, %373 ; [#uses=1]
- %381 = load float* %15, align 4 ; [#uses=1]
- %382 = fmul float %381, %372 ; [#uses=1]
- %383 = fadd float %380, %382 ; [#uses=1]
- %384 = load float* %12, align 4 ; [#uses=1]
- %385 = fmul float %384, %373 ; [#uses=1]
- %386 = load float* %10, align 4 ; [#uses=1]
- %387 = fmul float %386, %372 ; [#uses=1]
- %388 = fadd float %385, %387 ; [#uses=1]
- %389 = load float* %37, align 4 ; [#uses=1]
- %390 = fmul float %389, %373 ; [#uses=1]
- %391 = load float* %35, align 4 ; [#uses=1]
- %392 = fmul float %391, %372 ; [#uses=1]
- %393 = fadd float %390, %392 ; [#uses=1]
- %394 = load float* %32, align 4 ; [#uses=1]
- %395 = fmul float %394, %373 ; [#uses=1]
- %396 = load float* %30, align 4 ; [#uses=1]
- %397 = fmul float %396, %372 ; [#uses=1]
- %398 = fadd float %395, %397 ; [#uses=1]
- %399 = load float* %27, align 4 ; [#uses=1]
- %400 = fmul float %399, %373 ; [#uses=1]
- %401 = load float* %25, align 4 ; [#uses=1]
- %402 = fmul float %401, %372 ; [#uses=1]
- %403 = fadd float %400, %402 ; [#uses=1]
- store float %354, float* %252, align 8
- store float %352, float* %253, align 4
- store float %350, float* %254, align 8
- store float 0.000000e+00, float* %255, align 4
- br label %bb13
-
-bb13: ; preds = %bb11, %bb8
- %interpolatedTransA.1.0.0.0 = phi float [ %378, %bb11 ], [ %interpolatedTransA.1.0.0.1, %bb8 ] ; [#uses=1]
- %interpolatedTransA.1.0.1.0 = phi float [ %383, %bb11 ], [ %interpolatedTransA.1.0.1.1, %bb8 ] ; [#uses=1]
- %interpolatedTransA.1.0.2.0 = phi float [ %388, %bb11 ], [ %interpolatedTransA.1.0.2.1, %bb8 ] ; [#uses=1]
- %interpolatedTransB.1.0.0.0 = phi float [ %393, %bb11 ], [ %interpolatedTransB.1.0.0.1, %bb8 ] ; [#uses=1]
- %interpolatedTransB.1.0.1.0 = phi float [ %398, %bb11 ], [ %interpolatedTransB.1.0.1.1, %bb8 ] ; [#uses=1]
- %interpolatedTransB.1.0.2.0 = phi float [ %403, %bb11 ], [ %interpolatedTransB.1.0.2.1, %bb8 ] ; [#uses=1]
- %n.0.0.0 = phi float [ %355, %bb11 ], [ %n.0.0.1, %bb8 ] ; [#uses=1]
- %n.0.1.0 = phi float [ %357, %bb11 ], [ %n.0.1.1, %bb8 ] ; [#uses=1]
- %n.0.2.0 = phi float [ %360, %bb11 ], [ %n.0.2.1, %bb8 ] ; [#uses=1]
- %lambda.0 = phi float [ %372, %bb11 ], [ %lambda.1, %bb8 ] ; [#uses=1]
- %404 = load %struct.btVoronoiSimplexSolver** %8, align 4 ; [#uses=1]
- %405 = call zeroext i8 @_ZN22btVoronoiSimplexSolver9inSimplexERK9btVector3(%struct.btVoronoiSimplexSolver* %404, %struct.btQuadWord* %w) ; [#uses=1]
- %toBoolnot = icmp eq i8 %405, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb16, label %bb17
-
-bb16: ; preds = %bb13
- %406 = load %struct.btVoronoiSimplexSolver** %8, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver9addVertexERK9btVector3S2_S2_(%struct.btVoronoiSimplexSolver* %406, %struct.btQuadWord* %w, %struct.btQuadWord* %supVertexA, %struct.btQuadWord* %supVertexB)
- br label %bb17
-
-bb17: ; preds = %bb16, %bb13
- %407 = load %struct.btVoronoiSimplexSolver** %8, align 4 ; [#uses=1]
- %408 = call zeroext i8 @_ZN22btVoronoiSimplexSolver7closestER9btVector3(%struct.btVoronoiSimplexSolver* %407, %struct.btQuadWord* %v) ; [#uses=1]
- %toBool18 = icmp eq i8 %408, 0 ; [#uses=1]
- br i1 %toBool18, label %bb21.backedge, label %bb19
-
-bb19: ; preds = %bb17
- %409 = load float* %229, align 8 ; [#uses=2]
- %410 = fmul float %409, %409 ; [#uses=1]
- %411 = load float* %230, align 4 ; [#uses=2]
- %412 = fmul float %411, %411 ; [#uses=1]
- %413 = fadd float %410, %412 ; [#uses=1]
- %414 = load float* %231, align 8 ; [#uses=2]
- %415 = fmul float %414, %414 ; [#uses=1]
- %416 = fadd float %413, %415 ; [#uses=1]
- br label %bb21.backedge
-
-bb21.backedge: ; preds = %bb19, %bb17
- %dist2.0.be = phi float [ 0.000000e+00, %bb17 ], [ %416, %bb19 ] ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb21
-
-bb21: ; preds = %bb21.backedge, %entry
- %indvar = phi i32 [ %indvar.next, %bb21.backedge ], [ 0, %entry ] ; [#uses=2]
- %interpolatedTransA.1.0.0.1 = phi float [ %interpolatedTransA.1.0.0.0, %bb21.backedge ], [ %23, %entry ] ; [#uses=2]
- %interpolatedTransA.1.0.1.1 = phi float [ %interpolatedTransA.1.0.1.0, %bb21.backedge ], [ %18, %entry ] ; [#uses=2]
- %interpolatedTransA.1.0.2.1 = phi float [ %interpolatedTransA.1.0.2.0, %bb21.backedge ], [ %13, %entry ] ; [#uses=2]
- %interpolatedTransB.1.0.0.1 = phi float [ %interpolatedTransB.1.0.0.0, %bb21.backedge ], [ %38, %entry ] ; [#uses=2]
- %interpolatedTransB.1.0.1.1 = phi float [ %interpolatedTransB.1.0.1.0, %bb21.backedge ], [ %33, %entry ] ; [#uses=2]
- %interpolatedTransB.1.0.2.1 = phi float [ %interpolatedTransB.1.0.2.0, %bb21.backedge ], [ %28, %entry ] ; [#uses=2]
- %n.0.0.1 = phi float [ %n.0.0.0, %bb21.backedge ], [ 0.000000e+00, %entry ] ; [#uses=4]
- %n.0.1.1 = phi float [ %n.0.1.0, %bb21.backedge ], [ 0.000000e+00, %entry ] ; [#uses=4]
- %n.0.2.1 = phi float [ %n.0.2.0, %bb21.backedge ], [ 0.000000e+00, %entry ] ; [#uses=4]
- %lambda.1 = phi float [ %lambda.0, %bb21.backedge ], [ 0.000000e+00, %entry ] ; [#uses=4]
- %dist2.0 = phi float [ %dist2.0.be, %bb21.backedge ], [ %237, %entry ] ; [#uses=1]
- %417 = fcmp ule float %dist2.0, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %417, label %bb27, label %bb22
-
-bb22: ; preds = %bb21
- %maxIter.2 = sub i32 31, %indvar ; [#uses=1]
- %418 = icmp eq i32 %maxIter.2, -1 ; [#uses=1]
- br i1 %418, label %bb27, label %bb
-
-bb27: ; preds = %bb22, %bb21
- %419 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 5 ; [#uses=1]
- store float %lambda.1, float* %419, align 4
- %420 = fmul float %n.0.0.1, %n.0.0.1 ; [#uses=1]
- %421 = fmul float %n.0.1.1, %n.0.1.1 ; [#uses=1]
- %422 = fadd float %420, %421 ; [#uses=1]
- %423 = fmul float %n.0.2.1, %n.0.2.1 ; [#uses=1]
- %424 = fadd float %422, %423 ; [#uses=2]
- %425 = fcmp ult float %424, 0x3D10000000000000 ; [#uses=1]
- br i1 %425, label %bb31, label %bb29
-
-bb29: ; preds = %bb27
- %426 = call float @sqrtf(float %424) nounwind readonly ; [#uses=1]
- %427 = fdiv float 1.000000e+00, %426 ; [#uses=3]
- %428 = fmul float %n.0.2.1, %427 ; [#uses=2]
- %429 = fmul float %n.0.1.1, %427 ; [#uses=2]
- %430 = fmul float %n.0.0.1, %427 ; [#uses=2]
- %431 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %430, float* %431, align 4
- %432 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %429, float* %432, align 4
- %433 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %428, float* %433, align 4
- %434 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %434, align 4
- br label %bb32
-
-bb31: ; preds = %bb27
- %435 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %435, align 4
- %436 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %436, align 4
- %437 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %437, align 4
- %438 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %438, align 4
- br label %bb32
-
-bb32: ; preds = %bb31, %bb29
- %439 = phi float [ 0.000000e+00, %bb31 ], [ %428, %bb29 ] ; [#uses=1]
- %440 = phi float [ 0.000000e+00, %bb31 ], [ %429, %bb29 ] ; [#uses=1]
- %441 = phi float [ 0.000000e+00, %bb31 ], [ %430, %bb29 ] ; [#uses=1]
- %442 = fmul float %441, %78 ; [#uses=1]
- %443 = fmul float %440, %77 ; [#uses=1]
- %444 = fadd float %442, %443 ; [#uses=1]
- %445 = fmul float %439, %76 ; [#uses=1]
- %446 = fadd float %444, %445 ; [#uses=1]
- %447 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 7 ; [#uses=1]
- %448 = load float* %447, align 4 ; [#uses=1]
- %449 = fsub float -0.000000e+00, %448 ; [#uses=1]
- %450 = fcmp ult float %446, %449 ; [#uses=1]
- br i1 %450, label %bb35, label %bb36
-
-bb35: ; preds = %bb32
- %451 = load %struct.btVoronoiSimplexSolver** %8, align 4 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver14compute_pointsER9btVector3S1_(%struct.btVoronoiSimplexSolver* %451, %struct.btQuadWord* %hitA, %struct.btQuadWord* %hitB)
- %452 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %453 = getelementptr inbounds %struct.btQuadWord* %hitB, i32 0, i32 0, i32 0 ; [#uses=1]
- %454 = load float* %453, align 8 ; [#uses=1]
- store float %454, float* %452, align 4
- %455 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %456 = getelementptr inbounds %struct.btQuadWord* %hitB, i32 0, i32 0, i32 1 ; [#uses=1]
- %457 = load float* %456, align 4 ; [#uses=1]
- store float %457, float* %455, align 4
- %458 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %459 = getelementptr inbounds %struct.btQuadWord* %hitB, i32 0, i32 0, i32 2 ; [#uses=1]
- %460 = load float* %459, align 8 ; [#uses=1]
- store float %460, float* %458, align 4
- %461 = getelementptr inbounds %"struct.btConvexCast::CastResult"* %result, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %462 = getelementptr inbounds %struct.btQuadWord* %hitB, i32 0, i32 0, i32 3 ; [#uses=1]
- %463 = load float* %462, align 4 ; [#uses=1]
- store float %463, float* %461, align 4
- ret i8 1
-
-bb36: ; preds = %bb32, %bb9, %bb
- ret i8 0
-}
-
-; [#uses=2]
-define void @_ZN22btSubsimplexConvexCastC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolver(%struct.btGjkConvexCast* nocapture %this, %struct.btConvexShape* %convexA, %struct.btConvexShape* %convexB, %struct.btVoronoiSimplexSolver* %simplexSolver) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV22btSubsimplexConvexCast, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btVoronoiSimplexSolver* %simplexSolver, %struct.btVoronoiSimplexSolver** %1, align 4
- %2 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btConvexShape* %convexA, %struct.btConvexShape** %2, align 4
- %3 = getelementptr inbounds %struct.btGjkConvexCast* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexB, %struct.btConvexShape** %3, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN22btVoronoiSimplexSolver12removeVertexEi(%struct.btVoronoiSimplexSolver* %this, i32 %index) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=4]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add nsw i32 %1, -1 ; [#uses=5]
- store i32 %2, i32* %0, align 4
- %3 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %index, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %2, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %index, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %index, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %2, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %index, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %2, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = load i32* %0, align 4 ; [#uses=4]
- %16 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %index, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %15, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %index, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %15, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %index, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %15, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %index, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %15, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = load i32* %0, align 4 ; [#uses=4]
- %29 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %index, i32 0, i32 0 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %28, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %index, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %28, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %index, i32 0, i32 2 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %28, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %index, i32 0, i32 3 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %28, i32 0, i32 3 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN22btVoronoiSimplexSolver14reduceVerticesERK15btUsageBitfield(%struct.btVoronoiSimplexSolver* %this, %struct.btUsageBitfield* nocapture %usedVerts) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=9]
- %2 = icmp slt i32 %1, 4 ; [#uses=1]
- br i1 %2, label %bb5, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btUsageBitfield* %usedVerts, i32 0, i32 0 ; [#uses=1]
- %4 = load i8* %3, align 2 ; [#uses=1]
- %tmp = and i8 %4, 8 ; [#uses=1]
- %5 = icmp eq i8 %tmp, 0 ; [#uses=1]
- br i1 %5, label %bb4, label %bb6
-
-bb4: ; preds = %bb
- %6 = add nsw i32 %1, -1 ; [#uses=14]
- store i32 %6, i32* %0, align 4
- %7 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 3, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %6, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 3, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %6, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 3, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %6, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 3, i32 0, i32 3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %6, i32 0, i32 3 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 3, i32 0, i32 0 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %6, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 3, i32 0, i32 1 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %6, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 3, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %6, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 3, i32 0, i32 3 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %6, i32 0, i32 3 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 3, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %6, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 3, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %6, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 3, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %6, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 3, i32 0, i32 3 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %6, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- br label %bb6
-
-bb5: ; preds = %entry
- %43 = icmp slt i32 %1, 3 ; [#uses=1]
- br i1 %43, label %bb12, label %bb6
-
-bb6: ; preds = %bb5, %bb4, %bb
- %44 = phi i32 [ %1, %bb5 ], [ %1, %bb ], [ %6, %bb4 ] ; [#uses=2]
- %45 = getelementptr inbounds %struct.btUsageBitfield* %usedVerts, i32 0, i32 0 ; [#uses=1]
- %46 = load i8* %45, align 2 ; [#uses=1]
- %tmp27 = and i8 %46, 4 ; [#uses=1]
- %47 = icmp eq i8 %tmp27, 0 ; [#uses=1]
- br i1 %47, label %bb11, label %bb13
-
-bb11: ; preds = %bb6
- %48 = add nsw i32 %44, -1 ; [#uses=14]
- store i32 %48, i32* %0, align 4
- %49 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %48, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %48, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- store float %54, float* %52, align 4
- %55 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %48, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- store float %57, float* %55, align 4
- %58 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %48, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- store float %60, float* %58, align 4
- %61 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %48, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 4
- %64 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %48, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %48, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %48, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %48, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 4
- %76 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 1 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %48, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 2 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %48, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 4
- %82 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 3 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %48, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- br label %bb13
-
-bb12: ; preds = %bb5
- %85 = icmp slt i32 %1, 2 ; [#uses=1]
- br i1 %85, label %bb19, label %bb13
-
-bb13: ; preds = %bb12, %bb11, %bb6
- %86 = phi i32 [ %1, %bb12 ], [ %44, %bb6 ], [ %48, %bb11 ] ; [#uses=2]
- %87 = getelementptr inbounds %struct.btUsageBitfield* %usedVerts, i32 0, i32 0 ; [#uses=1]
- %88 = load i8* %87, align 2 ; [#uses=1]
- %tmp28 = and i8 %88, 2 ; [#uses=1]
- %89 = icmp eq i8 %tmp28, 0 ; [#uses=1]
- br i1 %89, label %bb18, label %bb20
-
-bb18: ; preds = %bb13
- %90 = add nsw i32 %86, -1 ; [#uses=14]
- store i32 %90, i32* %0, align 4
- %91 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %90, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %90, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %90, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- %100 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %90, i32 0, i32 3 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- store float %102, float* %100, align 4
- %103 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %90, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- store float %105, float* %103, align 4
- %106 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %90, i32 0, i32 1 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- store float %108, float* %106, align 4
- %109 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %90, i32 0, i32 2 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- store float %111, float* %109, align 4
- %112 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %90, i32 0, i32 3 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=1]
- store float %114, float* %112, align 4
- %115 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %90, i32 0, i32 0 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=1]
- store float %117, float* %115, align 4
- %118 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %90, i32 0, i32 1 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- store float %120, float* %118, align 4
- %121 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %90, i32 0, i32 2 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- store float %123, float* %121, align 4
- %124 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %90, i32 0, i32 3 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- store float %126, float* %124, align 4
- br label %bb20
-
-bb19: ; preds = %bb12
- %127 = icmp slt i32 %1, 1 ; [#uses=1]
- br i1 %127, label %bb22, label %bb20
-
-bb20: ; preds = %bb19, %bb18, %bb13
- %128 = phi i32 [ %1, %bb19 ], [ %86, %bb13 ], [ %90, %bb18 ] ; [#uses=1]
- %129 = getelementptr inbounds %struct.btUsageBitfield* %usedVerts, i32 0, i32 0 ; [#uses=1]
- %130 = load i8* %129, align 2 ; [#uses=1]
- %tmp29 = and i8 %130, 1 ; [#uses=1]
- %131 = icmp eq i8 %tmp29, 0 ; [#uses=1]
- br i1 %131, label %bb25, label %bb22
-
-bb22: ; preds = %bb20, %bb19
- ret void
-
-bb25: ; preds = %bb20
- %132 = add nsw i32 %128, -1 ; [#uses=13]
- store i32 %132, i32* %0, align 4
- %133 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %132, i32 0, i32 0 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- store float %135, float* %133, align 4
- %136 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %132, i32 0, i32 1 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- store float %138, float* %136, align 4
- %139 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %132, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- store float %141, float* %139, align 4
- %142 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %132, i32 0, i32 3 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=1]
- store float %144, float* %142, align 4
- %145 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %132, i32 0, i32 0 ; [#uses=1]
- %147 = load float* %146, align 4 ; [#uses=1]
- store float %147, float* %145, align 4
- %148 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %132, i32 0, i32 1 ; [#uses=1]
- %150 = load float* %149, align 4 ; [#uses=1]
- store float %150, float* %148, align 4
- %151 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %132, i32 0, i32 2 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- store float %153, float* %151, align 4
- %154 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %132, i32 0, i32 3 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- store float %156, float* %154, align 4
- %157 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %132, i32 0, i32 0 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- store float %159, float* %157, align 4
- %160 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %132, i32 0, i32 1 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- store float %162, float* %160, align 4
- %163 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %132, i32 0, i32 2 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=1]
- store float %165, float* %163, align 4
- %166 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 3 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %132, i32 0, i32 3 ; [#uses=1]
- %168 = load float* %167, align 4 ; [#uses=1]
- store float %168, float* %166, align 4
- ret void
-}
-
-; [#uses=5]
-define void @_ZN22btVoronoiSimplexSolver5resetEv(%struct.btVoronoiSimplexSolver* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- store i8 0, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 11 ; [#uses=1]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %3, align 4
- %4 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %4, align 4
- %5 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- store i8 0, i8* %7, align 4
- %8 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 1, i32 0 ; [#uses=2]
- %13 = load i8* %12, align 2 ; [#uses=1]
- %14 = and i8 %13, -16 ; [#uses=1]
- store i8 %14, i8* %12, align 2
- ret void
-}
-
-; [#uses=2]
-define void @_ZN22btVoronoiSimplexSolver9addVertexERK9btVector3S2_S2_(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* nocapture %w, %struct.btQuadWord* nocapture %p, %struct.btQuadWord* nocapture %q) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 1 ; [#uses=2]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 3 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 11 ; [#uses=1]
- store i8 1, i8* %12, align 4
- %13 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=5]
- %14 = load i32* %13, align 4 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %14, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %1, align 4 ; [#uses=1]
- store float %16, float* %15, align 4
- %17 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %14, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %4, align 4 ; [#uses=1]
- store float %18, float* %17, align 4
- %19 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %14, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %7, align 4 ; [#uses=1]
- store float %20, float* %19, align 4
- %21 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %14, i32 0, i32 3 ; [#uses=1]
- %22 = load float* %10, align 4 ; [#uses=1]
- store float %22, float* %21, align 4
- %23 = load i32* %13, align 4 ; [#uses=4]
- %24 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %23, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %23, i32 0, i32 1 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %23, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %23, i32 0, i32 3 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 3 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = load i32* %13, align 4 ; [#uses=4]
- %37 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %36, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %36, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %36, i32 0, i32 2 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %36, i32 0, i32 3 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = load i32* %13, align 4 ; [#uses=1]
- %50 = add nsw i32 %49, 1 ; [#uses=1]
- store i32 %50, i32* %13, align 4
- ret void
-}
-
-; [#uses=0]
-define float @_ZN22btVoronoiSimplexSolver9maxVertexEv(%struct.btVoronoiSimplexSolver* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %bb4
-
-bb: ; preds = %bb, %entry
- %maxV.17 = phi float [ %maxV.0, %bb ], [ 0.000000e+00, %entry ] ; [#uses=2]
- %i.06 = phi i32 [ %12, %bb ], [ 0, %entry ] ; [#uses=4]
- %scevgep8 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.06, i32 0, i32 0 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.06, i32 0, i32 1 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.06, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %scevgep8, align 4 ; [#uses=2]
- %4 = fmul float %3, %3 ; [#uses=1]
- %5 = load float* %scevgep9, align 4 ; [#uses=2]
- %6 = fmul float %5, %5 ; [#uses=1]
- %7 = fadd float %4, %6 ; [#uses=1]
- %8 = load float* %scevgep10, align 4 ; [#uses=2]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = fadd float %7, %9 ; [#uses=2]
- %11 = fcmp olt float %maxV.17, %10 ; [#uses=1]
- %maxV.0 = select i1 %11, float %10, float %maxV.17 ; [#uses=2]
- %12 = add nsw i32 %i.06, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %12, %1 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb
-
-bb4: ; preds = %bb, %entry
- %maxV.1.lcssa = phi float [ 0.000000e+00, %entry ], [ %maxV.0, %bb ] ; [#uses=1]
- ret float %maxV.1.lcssa
-}
-
-; [#uses=0]
-define i32 @_ZNK22btVoronoiSimplexSolver10getSimplexEP9btVector3S1_S1_(%struct.btVoronoiSimplexSolver* nocapture %this, %struct.btQuadWord* nocapture %pBuf, %struct.btQuadWord* nocapture %qBuf, %struct.btQuadWord* nocapture %yBuf) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %bb2
-
-bb: ; preds = %bb, %entry
- %i.04 = phi i32 [ %15, %bb ], [ 0, %entry ] ; [#uses=25]
- %scevgep5 = getelementptr inbounds %struct.btQuadWord* %yBuf, i32 %i.04, i32 0, i32 0 ; [#uses=1]
- %scevgep67 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.04, i32 0, i32 0 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %yBuf, i32 %i.04, i32 0, i32 1 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.04, i32 0, i32 1 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btQuadWord* %yBuf, i32 %i.04, i32 0, i32 2 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.04, i32 0, i32 2 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btQuadWord* %yBuf, i32 %i.04, i32 0, i32 3 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.04, i32 0, i32 3 ; [#uses=1]
- %scevgep1415 = getelementptr inbounds %struct.btQuadWord* %pBuf, i32 %i.04, i32 0, i32 0 ; [#uses=1]
- %scevgep1617 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %i.04, i32 0, i32 0 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btQuadWord* %pBuf, i32 %i.04, i32 0, i32 1 ; [#uses=1]
- %scevgep19 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %i.04, i32 0, i32 1 ; [#uses=1]
- %scevgep20 = getelementptr %struct.btQuadWord* %pBuf, i32 %i.04, i32 0, i32 2 ; [#uses=1]
- %scevgep21 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %i.04, i32 0, i32 2 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btQuadWord* %pBuf, i32 %i.04, i32 0, i32 3 ; [#uses=1]
- %scevgep23 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 %i.04, i32 0, i32 3 ; [#uses=1]
- %scevgep2425 = getelementptr inbounds %struct.btQuadWord* %qBuf, i32 %i.04, i32 0, i32 0 ; [#uses=1]
- %scevgep2627 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %i.04, i32 0, i32 0 ; [#uses=1]
- %scevgep28 = getelementptr %struct.btQuadWord* %qBuf, i32 %i.04, i32 0, i32 1 ; [#uses=1]
- %scevgep29 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %i.04, i32 0, i32 1 ; [#uses=1]
- %scevgep30 = getelementptr %struct.btQuadWord* %qBuf, i32 %i.04, i32 0, i32 2 ; [#uses=1]
- %scevgep31 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %i.04, i32 0, i32 2 ; [#uses=1]
- %scevgep32 = getelementptr %struct.btQuadWord* %qBuf, i32 %i.04, i32 0, i32 3 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 %i.04, i32 0, i32 3 ; [#uses=1]
- %3 = load float* %scevgep67, align 4 ; [#uses=1]
- store float %3, float* %scevgep5, align 4
- %4 = load float* %scevgep9, align 4 ; [#uses=1]
- store float %4, float* %scevgep8, align 4
- %5 = load float* %scevgep11, align 4 ; [#uses=1]
- store float %5, float* %scevgep10, align 4
- %6 = load float* %scevgep13, align 4 ; [#uses=1]
- store float %6, float* %scevgep12, align 4
- %7 = load float* %scevgep1617, align 4 ; [#uses=1]
- store float %7, float* %scevgep1415, align 4
- %8 = load float* %scevgep19, align 4 ; [#uses=1]
- store float %8, float* %scevgep18, align 4
- %9 = load float* %scevgep21, align 4 ; [#uses=1]
- store float %9, float* %scevgep20, align 4
- %10 = load float* %scevgep23, align 4 ; [#uses=1]
- store float %10, float* %scevgep22, align 4
- %11 = load float* %scevgep2627, align 4 ; [#uses=1]
- store float %11, float* %scevgep2425, align 4
- %12 = load float* %scevgep29, align 4 ; [#uses=1]
- store float %12, float* %scevgep28, align 4
- %13 = load float* %scevgep31, align 4 ; [#uses=1]
- store float %13, float* %scevgep30, align 4
- %14 = load float* %scevgep33, align 4 ; [#uses=1]
- store float %14, float* %scevgep32, align 4
- %15 = add nsw i32 %i.04, 1 ; [#uses=2]
- %16 = load i32* %0, align 4 ; [#uses=2]
- %17 = icmp sgt i32 %16, %15 ; [#uses=1]
- br i1 %17, label %bb, label %bb2
-
-bb2: ; preds = %bb, %entry
- %18 = phi i32 [ %1, %entry ], [ %16, %bb ] ; [#uses=1]
- ret i32 %18
-}
-
-; [#uses=2]
-define zeroext i8 @_ZN22btVoronoiSimplexSolver9inSimplexERK9btVector3(%struct.btVoronoiSimplexSolver* nocapture %this, %struct.btQuadWord* nocapture %w) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 2 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 8 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.013 = phi i32 [ 0, %bb.nph ], [ %23, %bb ] ; [#uses=4]
- %found.112 = phi i8 [ 0, %bb.nph ], [ %found.0, %bb ] ; [#uses=1]
- %scevgep = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.013, i32 0, i32 2 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.013, i32 0, i32 1 ; [#uses=1]
- %scevgep1516 = getelementptr %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 %i.013, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %scevgep, align 4 ; [#uses=1]
- %12 = fsub float %4, %11 ; [#uses=2]
- %13 = load float* %scevgep14, align 4 ; [#uses=1]
- %14 = fsub float %6, %13 ; [#uses=2]
- %15 = load float* %scevgep1516, align 4 ; [#uses=1]
- %16 = fsub float %8, %15 ; [#uses=2]
- %17 = fmul float %16, %16 ; [#uses=1]
- %18 = fmul float %14, %14 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fmul float %12, %12 ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=1]
- %22 = fcmp ugt float %21, %10 ; [#uses=1]
- %found.0 = select i1 %22, i8 %found.112, i8 1 ; [#uses=2]
- %23 = add nsw i32 %i.013, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %23, %1 ; [#uses=1]
- br i1 %exitcond, label %bb4, label %bb
-
-bb4: ; preds = %bb, %entry
- %found.1.lcssa = phi i8 [ 0, %entry ], [ %found.0, %bb ] ; [#uses=2]
- %24 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fcmp une float %25, %27 ; [#uses=1]
- br i1 %28, label %_ZNK9btVector3eqERKS_.exit, label %bb.i
-
-bb.i: ; preds = %bb4
- %29 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fcmp une float %30, %32 ; [#uses=1]
- br i1 %33, label %_ZNK9btVector3eqERKS_.exit, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %34 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fcmp une float %35, %37 ; [#uses=1]
- br i1 %38, label %_ZNK9btVector3eqERKS_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %39 = getelementptr inbounds %struct.btQuadWord* %w, i32 0, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %phitmp = fcmp une float %40, %42 ; [#uses=1]
- %phitmp11 = select i1 %phitmp, i8 %found.1.lcssa, i8 1 ; [#uses=1]
- ret i8 %phitmp11
-
-_ZNK9btVector3eqERKS_.exit: ; preds = %bb1.i, %bb.i, %bb4
- ret i8 %found.1.lcssa
-}
-
-; [#uses=2]
-define void @_ZN22btVoronoiSimplexSolver14backup_closestER9btVector3(%struct.btVoronoiSimplexSolver* nocapture %this, %struct.btQuadWord* nocapture %v) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZNK22btVoronoiSimplexSolver12emptySimplexEv(%struct.btVoronoiSimplexSolver* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- %retval12 = zext i1 %2 to i8 ; [#uses=1]
- ret i8 %retval12
-}
-
-; [#uses=5]
-define zeroext i8 @_ZN22btVoronoiSimplexSolver22closestPtPointTriangleERK9btVector3S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* nocapture %this, %struct.btQuadWord* nocapture %p, %struct.btQuadWord* %a, %struct.btQuadWord* nocapture %b, %struct.btQuadWord* nocapture %c, %struct.btSubSimplexClosestResult* %result) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 1, i32 0 ; [#uses=9]
- %1 = load i8* %0, align 2 ; [#uses=1]
- %2 = and i8 %1, -16 ; [#uses=8]
- store i8 %2, i8* %0, align 2
- %3 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=6]
- %7 = fsub float %4, %6 ; [#uses=5]
- %8 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=6]
- %12 = fsub float %9, %11 ; [#uses=5]
- %13 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=5]
- %15 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=7]
- %17 = fsub float %14, %16 ; [#uses=5]
- %18 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 2 ; [#uses=2]
- %19 = load float* %18, align 4 ; [#uses=3]
- %20 = fsub float %19, %6 ; [#uses=5]
- %21 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 1 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=3]
- %23 = fsub float %22, %11 ; [#uses=5]
- %24 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = fsub float %25, %16 ; [#uses=5]
- %27 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=3]
- %29 = fsub float %28, %6 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = fsub float %31, %11 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=3]
- %35 = fsub float %34, %16 ; [#uses=2]
- %36 = fmul float %17, %35 ; [#uses=1]
- %37 = fmul float %12, %32 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = fmul float %7, %29 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=6]
- %41 = fmul float %26, %35 ; [#uses=1]
- %42 = fmul float %23, %32 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=1]
- %44 = fmul float %20, %29 ; [#uses=1]
- %45 = fadd float %43, %44 ; [#uses=6]
- %46 = fcmp ugt float %40, 0.000000e+00 ; [#uses=1]
- %47 = fcmp ugt float %45, 0.000000e+00 ; [#uses=1]
- %or.cond = or i1 %46, %47 ; [#uses=1]
- br i1 %or.cond, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %48 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %16, float* %48, align 4
- %49 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %10, align 4 ; [#uses=1]
- store float %50, float* %49, align 4
- %51 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %5, align 4 ; [#uses=1]
- store float %52, float* %51, align 4
- %53 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 3 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = or i8 %2, 1 ; [#uses=1]
- store i8 %56, i8* %0, align 4
- %57 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %57, align 4
- %58 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %58, align 4
- %59 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %59, align 4
- %60 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- ret i8 1
-
-bb2: ; preds = %entry
- %61 = fsub float %28, %4 ; [#uses=2]
- %62 = fsub float %31, %9 ; [#uses=2]
- %63 = fsub float %34, %14 ; [#uses=2]
- %64 = fmul float %17, %63 ; [#uses=1]
- %65 = fmul float %12, %62 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %7, %61 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=7]
- %69 = fmul float %26, %63 ; [#uses=1]
- %70 = fmul float %23, %62 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %20, %61 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=4]
- %74 = fcmp ult float %68, 0.000000e+00 ; [#uses=1]
- %75 = fcmp ugt float %73, %68 ; [#uses=1]
- %or.cond32 = or i1 %74, %75 ; [#uses=1]
- br i1 %or.cond32, label %bb5, label %bb4
-
-bb4: ; preds = %bb2
- %76 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %14, float* %76, align 4
- %77 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %8, align 4 ; [#uses=1]
- store float %78, float* %77, align 4
- %79 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %3, align 4 ; [#uses=1]
- store float %80, float* %79, align 4
- %81 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 3 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = or i8 %2, 2 ; [#uses=1]
- store i8 %84, i8* %0, align 4
- %85 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %85, align 4
- %86 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %86, align 4
- %87 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %87, align 4
- %88 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %88, align 4
- ret i8 1
-
-bb5: ; preds = %bb2
- %89 = fmul float %40, %73 ; [#uses=1]
- %90 = fmul float %68, %45 ; [#uses=1]
- %91 = fsub float %89, %90 ; [#uses=3]
- %92 = fcmp ugt float %91, 0.000000e+00 ; [#uses=1]
- %93 = fcmp ult float %40, 0.000000e+00 ; [#uses=1]
- %or.cond33 = or i1 %92, %93 ; [#uses=1]
- %94 = fcmp ugt float %68, 0.000000e+00 ; [#uses=1]
- %or.cond34 = or i1 %or.cond33, %94 ; [#uses=1]
- br i1 %or.cond34, label %bb10, label %bb8
-
-bb8: ; preds = %bb5
- %95 = fsub float %40, %68 ; [#uses=1]
- %96 = fdiv float %40, %95 ; [#uses=5]
- %97 = fmul float %7, %96 ; [#uses=1]
- %98 = fmul float %12, %96 ; [#uses=1]
- %99 = fmul float %17, %96 ; [#uses=1]
- %100 = fadd float %6, %97 ; [#uses=1]
- %101 = fadd float %11, %98 ; [#uses=1]
- %102 = fadd float %16, %99 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %102, float* %103, align 4
- %104 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %101, float* %104, align 4
- %105 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %105, align 4
- %106 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %106, align 4
- %107 = or i8 %2, 3 ; [#uses=1]
- store i8 %107, i8* %0, align 4
- %108 = fsub float 1.000000e+00, %96 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 0 ; [#uses=1]
- store float %108, float* %109, align 4
- %110 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 1 ; [#uses=1]
- store float %96, float* %110, align 4
- %111 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- %112 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %112, align 4
- ret i8 1
-
-bb10: ; preds = %bb5
- %113 = fsub float %28, %19 ; [#uses=2]
- %114 = fsub float %31, %22 ; [#uses=2]
- %115 = fsub float %34, %25 ; [#uses=2]
- %116 = fmul float %17, %115 ; [#uses=1]
- %117 = fmul float %12, %114 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=1]
- %119 = fmul float %7, %113 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=4]
- %121 = fmul float %26, %115 ; [#uses=1]
- %122 = fmul float %23, %114 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=1]
- %124 = fmul float %20, %113 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=7]
- %126 = fcmp ult float %125, 0.000000e+00 ; [#uses=1]
- %127 = fcmp ugt float %120, %125 ; [#uses=1]
- %or.cond35 = or i1 %126, %127 ; [#uses=1]
- br i1 %or.cond35, label %bb13, label %bb12
-
-bb12: ; preds = %bb10
- %128 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %25, float* %128, align 4
- %129 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %130 = load float* %21, align 4 ; [#uses=1]
- store float %130, float* %129, align 4
- %131 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %132 = load float* %18, align 4 ; [#uses=1]
- store float %132, float* %131, align 4
- %133 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 3 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- store float %135, float* %133, align 4
- %136 = or i8 %2, 4 ; [#uses=1]
- store i8 %136, i8* %0, align 4
- %137 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %137, align 4
- %138 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %138, align 4
- %139 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %139, align 4
- %140 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %140, align 4
- ret i8 1
-
-bb13: ; preds = %bb10
- %141 = fmul float %120, %45 ; [#uses=1]
- %142 = fmul float %40, %125 ; [#uses=1]
- %143 = fsub float %141, %142 ; [#uses=3]
- %144 = fcmp ugt float %143, 0.000000e+00 ; [#uses=1]
- %145 = fcmp ult float %45, 0.000000e+00 ; [#uses=1]
- %or.cond36 = or i1 %144, %145 ; [#uses=1]
- %146 = fcmp ugt float %125, 0.000000e+00 ; [#uses=1]
- %or.cond37 = or i1 %or.cond36, %146 ; [#uses=1]
- br i1 %or.cond37, label %bb20, label %bb16
-
-bb16: ; preds = %bb13
- %147 = fsub float %45, %125 ; [#uses=1]
- %148 = fdiv float %45, %147 ; [#uses=5]
- %149 = fmul float %20, %148 ; [#uses=1]
- %150 = fmul float %23, %148 ; [#uses=1]
- %151 = fmul float %26, %148 ; [#uses=1]
- %152 = fadd float %6, %149 ; [#uses=1]
- %153 = fadd float %11, %150 ; [#uses=1]
- %154 = fadd float %16, %151 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %154, float* %155, align 4
- %156 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %153, float* %156, align 4
- %157 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %152, float* %157, align 4
- %158 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %158, align 4
- %159 = or i8 %2, 5 ; [#uses=1]
- store i8 %159, i8* %0, align 4
- %160 = fsub float 1.000000e+00, %148 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 0 ; [#uses=1]
- store float %160, float* %161, align 4
- %162 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %162, align 4
- %163 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store float %148, float* %163, align 4
- %164 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %164, align 4
- ret i8 1
-
-bb20: ; preds = %bb13
- %165 = fmul float %68, %125 ; [#uses=1]
- %166 = fmul float %120, %73 ; [#uses=1]
- %167 = fsub float %165, %166 ; [#uses=2]
- %168 = fcmp ugt float %167, 0.000000e+00 ; [#uses=1]
- %169 = fsub float %73, %68 ; [#uses=3]
- %170 = fcmp ult float %169, 0.000000e+00 ; [#uses=1]
- %or.cond39 = or i1 %168, %170 ; [#uses=1]
- br i1 %or.cond39, label %bb27, label %bb22
-
-bb22: ; preds = %bb20
- %171 = fsub float %120, %125 ; [#uses=2]
- %172 = fcmp ult float %171, 0.000000e+00 ; [#uses=1]
- br i1 %172, label %bb27, label %bb23
-
-bb23: ; preds = %bb22
- %173 = fadd float %169, %171 ; [#uses=1]
- %174 = fdiv float %169, %173 ; [#uses=5]
- %175 = fsub float %19, %4 ; [#uses=1]
- %176 = fsub float %22, %9 ; [#uses=1]
- %177 = fsub float %25, %14 ; [#uses=1]
- %178 = fmul float %175, %174 ; [#uses=1]
- %179 = fmul float %176, %174 ; [#uses=1]
- %180 = fmul float %177, %174 ; [#uses=1]
- %181 = fadd float %4, %178 ; [#uses=1]
- %182 = fadd float %9, %179 ; [#uses=1]
- %183 = fadd float %14, %180 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %183, float* %184, align 4
- %185 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %182, float* %185, align 4
- %186 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %181, float* %186, align 4
- %187 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %187, align 4
- %188 = or i8 %2, 6 ; [#uses=1]
- store i8 %188, i8* %0, align 4
- %189 = fsub float 1.000000e+00, %174 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %190, align 4
- %191 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 1 ; [#uses=1]
- store float %189, float* %191, align 4
- %192 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store float %174, float* %192, align 4
- %193 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %193, align 4
- ret i8 1
-
-bb27: ; preds = %bb22, %bb20
- %194 = fadd float %167, %143 ; [#uses=1]
- %195 = fadd float %194, %91 ; [#uses=1]
- %196 = fdiv float 1.000000e+00, %195 ; [#uses=2]
- %197 = fmul float %143, %196 ; [#uses=5]
- %198 = fmul float %91, %196 ; [#uses=5]
- %199 = fmul float %20, %198 ; [#uses=1]
- %200 = fmul float %23, %198 ; [#uses=1]
- %201 = fmul float %26, %198 ; [#uses=1]
- %202 = fmul float %7, %197 ; [#uses=1]
- %203 = fmul float %12, %197 ; [#uses=1]
- %204 = fmul float %17, %197 ; [#uses=1]
- %205 = fadd float %6, %202 ; [#uses=1]
- %206 = fadd float %11, %203 ; [#uses=1]
- %207 = fadd float %16, %204 ; [#uses=1]
- %208 = fadd float %205, %199 ; [#uses=1]
- %209 = fadd float %206, %200 ; [#uses=1]
- %210 = fadd float %207, %201 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %210, float* %211, align 4
- %212 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %209, float* %212, align 4
- %213 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %208, float* %213, align 4
- %214 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %214, align 4
- %215 = or i8 %2, 7 ; [#uses=1]
- store i8 %215, i8* %0, align 4
- %216 = fsub float 1.000000e+00, %197 ; [#uses=1]
- %217 = fsub float %216, %198 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 0 ; [#uses=1]
- store float %217, float* %218, align 4
- %219 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 1 ; [#uses=1]
- store float %197, float* %219, align 4
- %220 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store float %198, float* %220, align 4
- %221 = getelementptr inbounds %struct.btSubSimplexClosestResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %221, align 4
- ret i8 1
-}
-
-; [#uses=0]
-define i32 @_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_(%struct.btVoronoiSimplexSolver* nocapture %this, %struct.btQuadWord* nocapture %p, %struct.btQuadWord* nocapture %a, %struct.btQuadWord* nocapture %b, %struct.btQuadWord* nocapture %c, %struct.btQuadWord* nocapture %d) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=4]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %16, %3 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %19, %8 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %22, %13 ; [#uses=2]
- %24 = fmul float %23, %9 ; [#uses=1]
- %25 = fmul float %20, %14 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=2]
- %27 = fmul float %17, %14 ; [#uses=1]
- %28 = fmul float %23, %4 ; [#uses=1]
- %29 = fsub float %27, %28 ; [#uses=2]
- %30 = fmul float %20, %4 ; [#uses=1]
- %31 = fmul float %17, %9 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fsub float %34, %3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fsub float %37, %8 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fsub float %40, %13 ; [#uses=1]
- %42 = fmul float %41, %32 ; [#uses=1]
- %43 = fmul float %38, %29 ; [#uses=1]
- %44 = fadd float %42, %43 ; [#uses=1]
- %45 = fmul float %35, %26 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=3]
- %47 = fmul float %46, %46 ; [#uses=1]
- %48 = fcmp olt float %47, 0x3E45798EC0000000 ; [#uses=1]
- br i1 %48, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %49 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %49, align 4 ; [#uses=1]
- %52 = load float* %50, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- %54 = fsub float %51, %13 ; [#uses=1]
- %55 = fsub float %52, %8 ; [#uses=1]
- %56 = load float* %53, align 4 ; [#uses=1]
- %57 = fmul float %55, %29 ; [#uses=1]
- %58 = fmul float %54, %32 ; [#uses=1]
- %59 = fsub float %56, %3 ; [#uses=1]
- %60 = fmul float %59, %26 ; [#uses=1]
- %61 = fadd float %58, %57 ; [#uses=1]
- %62 = fadd float %61, %60 ; [#uses=1]
- %63 = fmul float %62, %46 ; [#uses=1]
- %64 = fcmp olt float %63, 0.000000e+00 ; [#uses=1]
- %65 = zext i1 %64 to i32 ; [#uses=1]
- ret i32 %65
-
-bb2: ; preds = %entry
- ret i32 -1
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN22btVoronoiSimplexSolver25closestPtPointTetrahedronERK9btVector3S2_S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* nocapture %this, %struct.btQuadWord* %p, %struct.btQuadWord* %a, %struct.btQuadWord* %b, %struct.btQuadWord* nocapture %c, %struct.btQuadWord* nocapture %d, %struct.btSubSimplexClosestResult* %finalResult) nounwind align 2 {
-entry:
- %tempResult = alloca %struct.btSubSimplexClosestResult, align 8 ; [#uses=33]
- %0 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 1, i32 0 ; [#uses=5]
- store i8 0, i8* %0, align 8
- %1 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 0, i32 0, i32 0 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=9]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 0, i32 0, i32 1 ; [#uses=5]
- %5 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=9]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 0, i32 0, i32 2 ; [#uses=5]
- %8 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=9]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 0, i32 0, i32 3 ; [#uses=5]
- %11 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 1, i32 0 ; [#uses=10]
- %14 = load i8* %13, align 2 ; [#uses=1]
- %15 = or i8 %14, 15 ; [#uses=1]
- store i8 %15, i8* %13, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=7]
- %20 = fsub float %17, %19 ; [#uses=5]
- %21 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=7]
- %25 = fsub float %22, %24 ; [#uses=5]
- %26 = getelementptr inbounds %struct.btQuadWord* %c, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btQuadWord* %a, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=7]
- %30 = fsub float %27, %29 ; [#uses=5]
- %31 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=5]
- %33 = fsub float %32, %19 ; [#uses=5]
- %34 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=5]
- %36 = fsub float %35, %24 ; [#uses=5]
- %37 = getelementptr inbounds %struct.btQuadWord* %b, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=5]
- %39 = fsub float %38, %29 ; [#uses=5]
- %40 = fmul float %39, %25 ; [#uses=1]
- %41 = fmul float %36, %30 ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=2]
- %43 = fmul float %33, %30 ; [#uses=1]
- %44 = fmul float %39, %20 ; [#uses=1]
- %45 = fsub float %43, %44 ; [#uses=2]
- %46 = fmul float %36, %20 ; [#uses=1]
- %47 = fmul float %33, %25 ; [#uses=1]
- %48 = fsub float %46, %47 ; [#uses=2]
- %49 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = fsub float %50, %19 ; [#uses=5]
- %52 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = fsub float %53, %24 ; [#uses=5]
- %55 = getelementptr inbounds %struct.btQuadWord* %d, i32 0, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=2]
- %57 = fsub float %56, %29 ; [#uses=5]
- %58 = fmul float %57, %48 ; [#uses=1]
- %59 = fmul float %54, %45 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %51, %42 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=3]
- %63 = fmul float %62, %62 ; [#uses=1]
- %64 = fcmp olt float %63, 0x3E45798EC0000000 ; [#uses=1]
- br i1 %64, label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit, label %bb1.i
-
-bb1.i: ; preds = %entry
- %65 = load float* %2, align 4 ; [#uses=1]
- %66 = load float* %5, align 4 ; [#uses=1]
- %67 = fsub float %65, %29 ; [#uses=1]
- %68 = fsub float %66, %24 ; [#uses=1]
- %69 = load float* %8, align 4 ; [#uses=1]
- %70 = fmul float %68, %45 ; [#uses=1]
- %71 = fmul float %67, %48 ; [#uses=1]
- %72 = fsub float %69, %19 ; [#uses=1]
- %73 = fmul float %72, %42 ; [#uses=1]
- %74 = fadd float %71, %70 ; [#uses=1]
- %75 = fadd float %74, %73 ; [#uses=1]
- %76 = fmul float %75, %62 ; [#uses=1]
- %77 = fcmp olt float %76, 0.000000e+00 ; [#uses=1]
- %78 = zext i1 %77 to i32 ; [#uses=1]
- br label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit
-
-_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit: ; preds = %bb1.i, %entry
- %79 = phi i32 [ %78, %bb1.i ], [ -1, %entry ] ; [#uses=2]
- %80 = fmul float %30, %54 ; [#uses=1]
- %81 = fmul float %25, %57 ; [#uses=1]
- %82 = fsub float %80, %81 ; [#uses=2]
- %83 = fmul float %20, %57 ; [#uses=1]
- %84 = fmul float %30, %51 ; [#uses=1]
- %85 = fsub float %83, %84 ; [#uses=2]
- %86 = fmul float %25, %51 ; [#uses=1]
- %87 = fmul float %20, %54 ; [#uses=1]
- %88 = fsub float %86, %87 ; [#uses=2]
- %89 = fmul float %39, %88 ; [#uses=1]
- %90 = fmul float %36, %85 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %33, %82 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=3]
- %94 = fmul float %93, %93 ; [#uses=1]
- %95 = fcmp olt float %94, 0x3E45798EC0000000 ; [#uses=1]
- br i1 %95, label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit67, label %bb1.i65
-
-bb1.i65: ; preds = %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit
- %96 = load float* %2, align 4 ; [#uses=1]
- %97 = load float* %5, align 4 ; [#uses=1]
- %98 = fsub float %96, %29 ; [#uses=1]
- %99 = fsub float %97, %24 ; [#uses=1]
- %100 = load float* %8, align 4 ; [#uses=1]
- %101 = fmul float %99, %85 ; [#uses=1]
- %102 = fmul float %98, %88 ; [#uses=1]
- %103 = fsub float %100, %19 ; [#uses=1]
- %104 = fmul float %103, %82 ; [#uses=1]
- %105 = fadd float %102, %101 ; [#uses=1]
- %106 = fadd float %105, %104 ; [#uses=1]
- %107 = fmul float %106, %93 ; [#uses=1]
- %108 = fcmp olt float %107, 0.000000e+00 ; [#uses=1]
- %109 = zext i1 %108 to i32 ; [#uses=1]
- br label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit67
-
-_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit67: ; preds = %bb1.i65, %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit
- %110 = phi i32 [ %109, %bb1.i65 ], [ -1, %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit ] ; [#uses=2]
- %111 = fmul float %57, %36 ; [#uses=1]
- %112 = fmul float %54, %39 ; [#uses=1]
- %113 = fsub float %111, %112 ; [#uses=2]
- %114 = fmul float %51, %39 ; [#uses=1]
- %115 = fmul float %57, %33 ; [#uses=1]
- %116 = fsub float %114, %115 ; [#uses=2]
- %117 = fmul float %54, %33 ; [#uses=1]
- %118 = fmul float %51, %36 ; [#uses=1]
- %119 = fsub float %117, %118 ; [#uses=2]
- %120 = fmul float %30, %119 ; [#uses=1]
- %121 = fmul float %25, %116 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = fmul float %20, %113 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=3]
- %125 = fmul float %124, %124 ; [#uses=1]
- %126 = fcmp olt float %125, 0x3E45798EC0000000 ; [#uses=1]
- br i1 %126, label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit70, label %bb1.i68
-
-bb1.i68: ; preds = %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit67
- %127 = load float* %2, align 4 ; [#uses=1]
- %128 = load float* %5, align 4 ; [#uses=1]
- %129 = fsub float %127, %29 ; [#uses=1]
- %130 = fsub float %128, %24 ; [#uses=1]
- %131 = load float* %8, align 4 ; [#uses=1]
- %132 = fmul float %130, %116 ; [#uses=1]
- %133 = fmul float %129, %119 ; [#uses=1]
- %134 = fsub float %131, %19 ; [#uses=1]
- %135 = fmul float %134, %113 ; [#uses=1]
- %136 = fadd float %133, %132 ; [#uses=1]
- %137 = fadd float %136, %135 ; [#uses=1]
- %138 = fmul float %137, %124 ; [#uses=1]
- %139 = fcmp olt float %138, 0.000000e+00 ; [#uses=1]
- %140 = zext i1 %139 to i32 ; [#uses=1]
- br label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit70
-
-_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit70: ; preds = %bb1.i68, %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit67
- %141 = phi i32 [ %140, %bb1.i68 ], [ -1, %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit67 ] ; [#uses=3]
- %142 = fsub float %17, %32 ; [#uses=2]
- %143 = fsub float %22, %35 ; [#uses=2]
- %144 = fsub float %27, %38 ; [#uses=2]
- %145 = fsub float %50, %32 ; [#uses=2]
- %146 = fsub float %53, %35 ; [#uses=2]
- %147 = fsub float %56, %38 ; [#uses=2]
- %148 = fmul float %147, %143 ; [#uses=1]
- %149 = fmul float %146, %144 ; [#uses=1]
- %150 = fsub float %148, %149 ; [#uses=2]
- %151 = fmul float %145, %144 ; [#uses=1]
- %152 = fmul float %147, %142 ; [#uses=1]
- %153 = fsub float %151, %152 ; [#uses=2]
- %154 = fmul float %146, %142 ; [#uses=1]
- %155 = fmul float %145, %143 ; [#uses=1]
- %156 = fsub float %154, %155 ; [#uses=2]
- %157 = fsub float %19, %32 ; [#uses=1]
- %158 = fsub float %24, %35 ; [#uses=1]
- %159 = fsub float %29, %38 ; [#uses=1]
- %160 = fmul float %159, %156 ; [#uses=1]
- %161 = fmul float %158, %153 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fmul float %157, %150 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=3]
- %165 = fmul float %164, %164 ; [#uses=1]
- %166 = fcmp olt float %165, 0x3E45798EC0000000 ; [#uses=1]
- br i1 %166, label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit73, label %bb1.i71
-
-bb1.i71: ; preds = %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit70
- %167 = load float* %2, align 4 ; [#uses=1]
- %168 = load float* %5, align 4 ; [#uses=1]
- %169 = fsub float %167, %38 ; [#uses=1]
- %170 = fsub float %168, %35 ; [#uses=1]
- %171 = load float* %8, align 4 ; [#uses=1]
- %172 = fmul float %170, %153 ; [#uses=1]
- %173 = fmul float %169, %156 ; [#uses=1]
- %174 = fsub float %171, %32 ; [#uses=1]
- %175 = fmul float %174, %150 ; [#uses=1]
- %176 = fadd float %173, %172 ; [#uses=1]
- %177 = fadd float %176, %175 ; [#uses=1]
- %178 = fmul float %177, %164 ; [#uses=1]
- %179 = fcmp olt float %178, 0.000000e+00 ; [#uses=1]
- %180 = zext i1 %179 to i32 ; [#uses=1]
- br label %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit73
-
-_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit73: ; preds = %bb1.i71, %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit70
- %181 = phi i32 [ %180, %bb1.i71 ], [ -1, %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit70 ] ; [#uses=3]
- %.lobit4042 = or i32 %110, %79 ; [#uses=2]
- %toBool2 = icmp slt i32 %.lobit4042, 0 ; [#uses=1]
- br i1 %toBool2, label %bb6, label %bb
-
-bb: ; preds = %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit73
- %.lobit4749 = or i32 %181, %141 ; [#uses=1]
- %toBool5 = icmp slt i32 %.lobit4749, 0 ; [#uses=1]
- br i1 %toBool5, label %bb6, label %bb7
-
-bb6: ; preds = %bb, %_ZN22btVoronoiSimplexSolver19pointOutsideOfPlaneERK9btVector3S2_S2_S2_S2_.exit73
- %182 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 3 ; [#uses=1]
- store i8 1, i8* %182, align 4
- ret i8 0
-
-bb7: ; preds = %bb
- %183 = or i32 %.lobit4042, %141 ; [#uses=1]
- %184 = or i32 %183, %181 ; [#uses=1]
- %185 = icmp eq i32 %184, 0 ; [#uses=1]
- br i1 %185, label %bb33, label %bb9
-
-bb9: ; preds = %bb7
- %186 = icmp eq i32 %79, 0 ; [#uses=1]
- br i1 %186, label %bb12, label %bb10
-
-bb10: ; preds = %bb9
- %187 = call zeroext i8 @_ZN22btVoronoiSimplexSolver22closestPtPointTriangleERK9btVector3S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* %p, %struct.btQuadWord* %a, %struct.btQuadWord* %b, %struct.btQuadWord* %c, %struct.btSubSimplexClosestResult* %tempResult) nounwind ; [#uses=0]
- %188 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %189 = load float* %188, align 8 ; [#uses=2]
- %190 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=2]
- %192 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %193 = load float* %192, align 8 ; [#uses=2]
- %194 = load float* %8, align 4 ; [#uses=1]
- %195 = fsub float %193, %194 ; [#uses=2]
- %196 = load float* %5, align 4 ; [#uses=1]
- %197 = fsub float %191, %196 ; [#uses=2]
- %198 = load float* %2, align 4 ; [#uses=1]
- %199 = fsub float %189, %198 ; [#uses=2]
- %200 = fmul float %199, %199 ; [#uses=1]
- %201 = fmul float %197, %197 ; [#uses=1]
- %202 = fadd float %200, %201 ; [#uses=1]
- %203 = fmul float %195, %195 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=2]
- %205 = fcmp olt float %204, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %205, label %bb11, label %bb12
-
-bb11: ; preds = %bb10
- %206 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %207 = load float* %206, align 4 ; [#uses=1]
- store float %189, float* %1, align 4
- store float %191, float* %4, align 4
- store float %193, float* %7, align 4
- store float %207, float* %10, align 4
- %208 = load i8* %13, align 2 ; [#uses=1]
- %209 = load i8* %0, align 8 ; [#uses=3]
- %210 = and i8 %209, 1 ; [#uses=1]
- %.masked119 = and i8 %208, -16 ; [#uses=1]
- %211 = or i8 %210, %.masked119 ; [#uses=1]
- %212 = and i8 %209, 4 ; [#uses=1]
- %.masked120 = and i8 %209, 2 ; [#uses=1]
- %213 = or i8 %211, %.masked120 ; [#uses=1]
- %214 = or i8 %213, %212 ; [#uses=1]
- store i8 %214, i8* %13, align 4
- %215 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 2 ; [#uses=1]
- %216 = load float* %215, align 4 ; [#uses=1]
- %217 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 1 ; [#uses=1]
- %218 = load float* %217, align 4 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 0 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=1]
- %221 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 0 ; [#uses=1]
- store float %220, float* %221, align 4
- %222 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 1 ; [#uses=1]
- store float %218, float* %222, align 4
- %223 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 2 ; [#uses=1]
- store float %216, float* %223, align 4
- %224 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %224, align 4
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10, %bb9
- %bestSqDist.0 = phi float [ %204, %bb11 ], [ 0x47EFFFFFE0000000, %bb10 ], [ 0x47EFFFFFE0000000, %bb9 ] ; [#uses=3]
- %225 = icmp eq i32 %110, 0 ; [#uses=1]
- br i1 %225, label %bb17, label %bb13
-
-bb13: ; preds = %bb12
- %226 = call zeroext i8 @_ZN22btVoronoiSimplexSolver22closestPtPointTriangleERK9btVector3S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* %p, %struct.btQuadWord* %a, %struct.btQuadWord* %c, %struct.btQuadWord* %d, %struct.btSubSimplexClosestResult* %tempResult) nounwind ; [#uses=0]
- %227 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %228 = load float* %227, align 8 ; [#uses=2]
- %229 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %230 = load float* %229, align 4 ; [#uses=2]
- %231 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %232 = load float* %231, align 8 ; [#uses=2]
- %233 = load float* %8, align 4 ; [#uses=1]
- %234 = fsub float %232, %233 ; [#uses=2]
- %235 = load float* %5, align 4 ; [#uses=1]
- %236 = fsub float %230, %235 ; [#uses=2]
- %237 = load float* %2, align 4 ; [#uses=1]
- %238 = fsub float %228, %237 ; [#uses=2]
- %239 = fmul float %238, %238 ; [#uses=1]
- %240 = fmul float %236, %236 ; [#uses=1]
- %241 = fadd float %239, %240 ; [#uses=1]
- %242 = fmul float %234, %234 ; [#uses=1]
- %243 = fadd float %241, %242 ; [#uses=2]
- %244 = fcmp olt float %243, %bestSqDist.0 ; [#uses=1]
- br i1 %244, label %bb16, label %bb17
-
-bb16: ; preds = %bb13
- %245 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %246 = load float* %245, align 4 ; [#uses=1]
- store float %228, float* %1, align 4
- store float %230, float* %4, align 4
- store float %232, float* %7, align 4
- store float %246, float* %10, align 4
- %247 = load i8* %13, align 2 ; [#uses=1]
- %248 = load i8* %0, align 8 ; [#uses=2]
- %249 = and i8 %248, 1 ; [#uses=1]
- %250 = shl i8 %248, 1 ; [#uses=2]
- %.masked117 = and i8 %247, -16 ; [#uses=1]
- %251 = or i8 %249, %.masked117 ; [#uses=1]
- %252 = and i8 %250, 8 ; [#uses=1]
- %.masked118 = and i8 %250, 4 ; [#uses=1]
- %253 = or i8 %251, %.masked118 ; [#uses=1]
- %254 = or i8 %253, %252 ; [#uses=1]
- store i8 %254, i8* %13, align 4
- %255 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 2 ; [#uses=1]
- %256 = load float* %255, align 4 ; [#uses=1]
- %257 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 1 ; [#uses=1]
- %258 = load float* %257, align 4 ; [#uses=1]
- %259 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 0 ; [#uses=1]
- %260 = load float* %259, align 4 ; [#uses=1]
- %261 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 0 ; [#uses=1]
- store float %260, float* %261, align 4
- %262 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %262, align 4
- %263 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 2 ; [#uses=1]
- store float %258, float* %263, align 4
- %264 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 3 ; [#uses=1]
- store float %256, float* %264, align 4
- br label %bb17
-
-bb17: ; preds = %bb16, %bb13, %bb12
- %bestSqDist.1 = phi float [ %243, %bb16 ], [ %bestSqDist.0, %bb13 ], [ %bestSqDist.0, %bb12 ] ; [#uses=3]
- %265 = icmp eq i32 %141, 0 ; [#uses=1]
- br i1 %265, label %bb22, label %bb18
-
-bb18: ; preds = %bb17
- %266 = call zeroext i8 @_ZN22btVoronoiSimplexSolver22closestPtPointTriangleERK9btVector3S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* %p, %struct.btQuadWord* %a, %struct.btQuadWord* %d, %struct.btQuadWord* %b, %struct.btSubSimplexClosestResult* %tempResult) nounwind ; [#uses=0]
- %267 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %268 = load float* %267, align 8 ; [#uses=2]
- %269 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %270 = load float* %269, align 4 ; [#uses=2]
- %271 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %272 = load float* %271, align 8 ; [#uses=2]
- %273 = load float* %8, align 4 ; [#uses=1]
- %274 = fsub float %272, %273 ; [#uses=2]
- %275 = load float* %5, align 4 ; [#uses=1]
- %276 = fsub float %270, %275 ; [#uses=2]
- %277 = load float* %2, align 4 ; [#uses=1]
- %278 = fsub float %268, %277 ; [#uses=2]
- %279 = fmul float %278, %278 ; [#uses=1]
- %280 = fmul float %276, %276 ; [#uses=1]
- %281 = fadd float %279, %280 ; [#uses=1]
- %282 = fmul float %274, %274 ; [#uses=1]
- %283 = fadd float %281, %282 ; [#uses=2]
- %284 = fcmp olt float %283, %bestSqDist.1 ; [#uses=1]
- br i1 %284, label %bb21, label %bb22
-
-bb21: ; preds = %bb18
- %285 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %286 = load float* %285, align 4 ; [#uses=1]
- store float %268, float* %1, align 4
- store float %270, float* %4, align 4
- store float %272, float* %7, align 4
- store float %286, float* %10, align 4
- %287 = load i8* %13, align 2 ; [#uses=1]
- %288 = load i8* %0, align 8 ; [#uses=3]
- %289 = and i8 %288, 1 ; [#uses=1]
- %290 = lshr i8 %288, 1 ; [#uses=1]
- %.masked115 = and i8 %287, -16 ; [#uses=1]
- %291 = or i8 %289, %.masked115 ; [#uses=1]
- %292 = shl i8 %288, 2 ; [#uses=1]
- %293 = and i8 %292, 8 ; [#uses=1]
- %.masked116 = and i8 %290, 2 ; [#uses=1]
- %294 = or i8 %291, %.masked116 ; [#uses=1]
- %295 = or i8 %294, %293 ; [#uses=1]
- store i8 %295, i8* %13, align 4
- %296 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 1 ; [#uses=1]
- %297 = load float* %296, align 4 ; [#uses=1]
- %298 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 2 ; [#uses=1]
- %299 = load float* %298, align 4 ; [#uses=1]
- %300 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 0 ; [#uses=1]
- %301 = load float* %300, align 4 ; [#uses=1]
- %302 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 0 ; [#uses=1]
- store float %301, float* %302, align 4
- %303 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 1 ; [#uses=1]
- store float %299, float* %303, align 4
- %304 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %304, align 4
- %305 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 3 ; [#uses=1]
- store float %297, float* %305, align 4
- br label %bb22
-
-bb22: ; preds = %bb21, %bb18, %bb17
- %bestSqDist.2 = phi float [ %283, %bb21 ], [ %bestSqDist.1, %bb18 ], [ %bestSqDist.1, %bb17 ] ; [#uses=1]
- %306 = icmp eq i32 %181, 0 ; [#uses=1]
- br i1 %306, label %bb27, label %bb23
-
-bb23: ; preds = %bb22
- %307 = call zeroext i8 @_ZN22btVoronoiSimplexSolver22closestPtPointTriangleERK9btVector3S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* %p, %struct.btQuadWord* %b, %struct.btQuadWord* %d, %struct.btQuadWord* %c, %struct.btSubSimplexClosestResult* %tempResult) nounwind ; [#uses=0]
- %308 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %309 = load float* %308, align 8 ; [#uses=2]
- %310 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %311 = load float* %310, align 4 ; [#uses=2]
- %312 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %313 = load float* %312, align 8 ; [#uses=2]
- %314 = load float* %8, align 4 ; [#uses=1]
- %315 = fsub float %313, %314 ; [#uses=2]
- %316 = load float* %5, align 4 ; [#uses=1]
- %317 = fsub float %311, %316 ; [#uses=2]
- %318 = load float* %2, align 4 ; [#uses=1]
- %319 = fsub float %309, %318 ; [#uses=2]
- %320 = fmul float %319, %319 ; [#uses=1]
- %321 = fmul float %317, %317 ; [#uses=1]
- %322 = fadd float %320, %321 ; [#uses=1]
- %323 = fmul float %315, %315 ; [#uses=1]
- %324 = fadd float %322, %323 ; [#uses=1]
- %325 = fcmp olt float %324, %bestSqDist.2 ; [#uses=1]
- br i1 %325, label %bb26, label %bb27
-
-bb26: ; preds = %bb23
- %326 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %327 = load float* %326, align 4 ; [#uses=1]
- store float %309, float* %1, align 4
- store float %311, float* %4, align 4
- store float %313, float* %7, align 4
- store float %327, float* %10, align 4
- %328 = load i8* %13, align 2 ; [#uses=1]
- %329 = load i8* %0, align 8 ; [#uses=3]
- %tmp53 = shl i8 %329, 1 ; [#uses=1]
- %330 = and i8 %tmp53, 2 ; [#uses=1]
- %.masked = and i8 %328, -16 ; [#uses=1]
- %331 = or i8 %330, %.masked ; [#uses=1]
- %332 = shl i8 %329, 2 ; [#uses=1]
- %333 = and i8 %332, 8 ; [#uses=1]
- %.masked114 = and i8 %329, 4 ; [#uses=1]
- %334 = or i8 %331, %.masked114 ; [#uses=1]
- %335 = or i8 %334, %333 ; [#uses=1]
- store i8 %335, i8* %13, align 4
- %336 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 1 ; [#uses=1]
- %337 = load float* %336, align 4 ; [#uses=1]
- %338 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 2 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=1]
- %340 = getelementptr inbounds %struct.btSubSimplexClosestResult* %tempResult, i32 0, i32 2, i32 0 ; [#uses=1]
- %341 = load float* %340, align 4 ; [#uses=1]
- %342 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %342, align 4
- %343 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 1 ; [#uses=1]
- store float %341, float* %343, align 4
- %344 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 2 ; [#uses=1]
- store float %339, float* %344, align 4
- %345 = getelementptr inbounds %struct.btSubSimplexClosestResult* %finalResult, i32 0, i32 2, i32 3 ; [#uses=1]
- store float %337, float* %345, align 4
- ret i8 1
-
-bb27: ; preds = %bb23, %bb22
- ret i8 1
-
-bb33: ; preds = %bb7
- ret i8 0
-}
-
-; [#uses=2]
-define zeroext i8 @_ZN22btVoronoiSimplexSolver28updateClosestVectorAndPointsEv(%struct.btVoronoiSimplexSolver* %this) nounwind align 2 {
-entry:
- %p16 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %p25 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 11 ; [#uses=2]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %entry.bb44_crit_edge, label %bb
-
-entry.bb44_crit_edge: ; preds = %entry
- %.phi.trans.insert = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- %.pre = load i8* %.phi.trans.insert, align 4 ; [#uses=1]
- ret i8 %.pre
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 0 ; [#uses=8]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 1 ; [#uses=8]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 2 ; [#uses=8]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 2, i32 3 ; [#uses=7]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 1, i32 0 ; [#uses=6]
- %8 = load i8* %7, align 2 ; [#uses=2]
- %9 = and i8 %8, -16 ; [#uses=4]
- store i8 %9, i8* %7, align 2
- store i8 0, i8* %0, align 4
- %10 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 0 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- switch i32 %11, label %bb43 [
- i32 0, label %bb1
- i32 1, label %_ZN25btSubSimplexClosestResult7isValidEv.exit67
- i32 2, label %bb3
- i32 3, label %bb14
- i32 4, label %bb23
- ]
-
-bb1: ; preds = %bb
- %12 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- store i8 0, i8* %12, align 4
- ret i8 0
-
-_ZN25btSubSimplexClosestResult7isValidEv.exit67: ; preds = %bb
- %13 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=2]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=2]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 3 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = fsub float %21, %33 ; [#uses=1]
- %38 = fsub float %18, %30 ; [#uses=1]
- %39 = fsub float %15, %27 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- store float %39, float* %40, align 4
- %41 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %41, align 4
- %42 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- store float %37, float* %42, align 4
- %43 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- store i8 0, i8* %2, align 4
- %44 = and i8 %8, -16 ; [#uses=1]
- store i8 %44, i8* %7, align 2
- store float 1.000000e+00, float* %3, align 4
- store float 0.000000e+00, float* %4, align 4
- store float 0.000000e+00, float* %5, align 4
- store float 0.000000e+00, float* %6, align 4
- %45 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- store i8 1, i8* %45, align 4
- ret i8 1
-
-bb3: ; preds = %bb
- %46 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = fsub float 0.000000e+00, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = fsub float 0.000000e+00, %50 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = fsub float 0.000000e+00, %53 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fsub float %56, %47 ; [#uses=3]
- %58 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = fsub float %59, %50 ; [#uses=3]
- %61 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = fsub float %62, %53 ; [#uses=3]
- %64 = fmul float %63, %54 ; [#uses=1]
- %65 = fmul float %60, %51 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %57, %48 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=3]
- %69 = fcmp ogt float %68, 0.000000e+00 ; [#uses=1]
- br i1 %69, label %bb4, label %bb8
-
-bb4: ; preds = %bb3
- %70 = fmul float %63, %63 ; [#uses=1]
- %71 = fmul float %60, %60 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fmul float %57, %57 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=2]
- %75 = fcmp olt float %68, %74 ; [#uses=1]
- br i1 %75, label %bb6, label %bb7
-
-bb6: ; preds = %bb4
- %76 = fdiv float %68, %74 ; [#uses=1]
- %77 = or i8 %9, 3 ; [#uses=1]
- store i8 %77, i8* %7, align 4
- br label %bb9
-
-bb7: ; preds = %bb4
- %78 = or i8 %9, 2 ; [#uses=1]
- store i8 %78, i8* %7, align 4
- br label %bb9
-
-bb8: ; preds = %bb3
- %79 = or i8 %9, 1 ; [#uses=1]
- store i8 %79, i8* %7, align 4
- br label %bb9
-
-bb9: ; preds = %bb8, %bb7, %bb6
- %t.0 = phi float [ %76, %bb6 ], [ 1.000000e+00, %bb7 ], [ 0.000000e+00, %bb8 ] ; [#uses=8]
- %80 = fsub float 1.000000e+00, %t.0 ; [#uses=1]
- store float %80, float* %3, align 4
- store float %t.0, float* %4, align 4
- store float 0.000000e+00, float* %5, align 4
- store float 0.000000e+00, float* %6, align 4
- %81 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=2]
- %85 = fsub float %82, %84 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=2]
- %90 = fsub float %87, %89 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=2]
- %95 = fsub float %92, %94 ; [#uses=1]
- %96 = fmul float %85, %t.0 ; [#uses=1]
- %97 = fmul float %90, %t.0 ; [#uses=1]
- %98 = fmul float %95, %t.0 ; [#uses=1]
- %99 = fadd float %84, %96 ; [#uses=2]
- %100 = fadd float %89, %97 ; [#uses=2]
- %101 = fadd float %94, %98 ; [#uses=2]
- %102 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %101, float* %102, align 4
- %103 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %100, float* %103, align 4
- %104 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %99, float* %104, align 4
- %105 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %105, align 4
- %106 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=2]
- %110 = fsub float %107, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=2]
- %115 = fsub float %112, %114 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=2]
- %120 = fsub float %117, %119 ; [#uses=1]
- %121 = fmul float %110, %t.0 ; [#uses=1]
- %122 = fmul float %115, %t.0 ; [#uses=1]
- %123 = fmul float %120, %t.0 ; [#uses=1]
- %124 = fadd float %109, %121 ; [#uses=2]
- %125 = fadd float %114, %122 ; [#uses=2]
- %126 = fadd float %119, %123 ; [#uses=2]
- %127 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float %126, float* %127, align 4
- %128 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float %125, float* %128, align 4
- %129 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float %124, float* %129, align 4
- %130 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 4
- %131 = fsub float %99, %124 ; [#uses=1]
- %132 = fsub float %100, %125 ; [#uses=1]
- %133 = fsub float %101, %126 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- store float %133, float* %134, align 4
- %135 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- store float %132, float* %135, align 4
- %136 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- store float %131, float* %136, align 4
- %137 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %137, align 4
- %138 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver14reduceVerticesERK15btUsageBitfield(%struct.btVoronoiSimplexSolver* %this, %struct.btUsageBitfield* %138) nounwind
- %139 = load float* %3, align 4 ; [#uses=1]
- %140 = fcmp ult float %139, 0.000000e+00 ; [#uses=1]
- br i1 %140, label %_ZN25btSubSimplexClosestResult7isValidEv.exit60, label %bb.i54
-
-bb.i54: ; preds = %bb9
- %141 = load float* %4, align 4 ; [#uses=1]
- %142 = fcmp ult float %141, 0.000000e+00 ; [#uses=1]
- br i1 %142, label %_ZN25btSubSimplexClosestResult7isValidEv.exit60, label %bb1.i55
-
-bb1.i55: ; preds = %bb.i54
- %143 = load float* %5, align 4 ; [#uses=1]
- %144 = fcmp ult float %143, 0.000000e+00 ; [#uses=1]
- br i1 %144, label %_ZN25btSubSimplexClosestResult7isValidEv.exit60, label %bb2.i58
-
-bb2.i58: ; preds = %bb1.i55
- %145 = load float* %6, align 4 ; [#uses=1]
- %not..i56 = fcmp oge float %145, 0.000000e+00 ; [#uses=1]
- %retval.i57 = zext i1 %not..i56 to i8 ; [#uses=1]
- br label %_ZN25btSubSimplexClosestResult7isValidEv.exit60
-
-_ZN25btSubSimplexClosestResult7isValidEv.exit60: ; preds = %bb2.i58, %bb1.i55, %bb.i54, %bb9
- %146 = phi i8 [ %retval.i57, %bb2.i58 ], [ 0, %bb1.i55 ], [ 0, %bb.i54 ], [ 0, %bb9 ] ; [#uses=2]
- %147 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- store i8 %146, i8* %147, align 4
- ret i8 %146
-
-bb14: ; preds = %bb
- %148 = getelementptr inbounds %struct.btQuadWord* %p16, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %148, align 8
- %149 = getelementptr inbounds %struct.btQuadWord* %p16, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %149, align 4
- %150 = getelementptr inbounds %struct.btQuadWord* %p16, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %150, align 8
- %151 = getelementptr inbounds %struct.btQuadWord* %p16, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %151, align 4
- %152 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10 ; [#uses=1]
- %156 = call zeroext i8 @_ZN22btVoronoiSimplexSolver22closestPtPointTriangleERK9btVector3S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* %p16, %struct.btQuadWord* %152, %struct.btQuadWord* %153, %struct.btQuadWord* %154, %struct.btSubSimplexClosestResult* %155) nounwind ; [#uses=0]
- %157 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- %159 = load float* %5, align 4 ; [#uses=6]
- %160 = fmul float %158, %159 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fmul float %162, %159 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=1]
- %166 = fmul float %165, %159 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %168 = load float* %167, align 4 ; [#uses=1]
- %169 = load float* %4, align 4 ; [#uses=6]
- %170 = fmul float %168, %169 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %172 = load float* %171, align 4 ; [#uses=1]
- %173 = fmul float %172, %169 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = fmul float %175, %169 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %178 = load float* %177, align 4 ; [#uses=1]
- %179 = load float* %3, align 4 ; [#uses=6]
- %180 = fmul float %178, %179 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=1]
- %183 = fmul float %182, %179 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %185 = load float* %184, align 4 ; [#uses=1]
- %186 = fmul float %185, %179 ; [#uses=1]
- %187 = fadd float %180, %170 ; [#uses=1]
- %188 = fadd float %183, %173 ; [#uses=1]
- %189 = fadd float %186, %176 ; [#uses=1]
- %190 = fadd float %187, %160 ; [#uses=2]
- %191 = fadd float %188, %163 ; [#uses=2]
- %192 = fadd float %189, %166 ; [#uses=2]
- %193 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %192, float* %193, align 4
- %194 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %191, float* %194, align 4
- %195 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %190, float* %195, align 4
- %196 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %196, align 4
- %197 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 2 ; [#uses=1]
- %198 = load float* %197, align 4 ; [#uses=1]
- %199 = fmul float %198, %159 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 1 ; [#uses=1]
- %201 = load float* %200, align 4 ; [#uses=1]
- %202 = fmul float %201, %159 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 0 ; [#uses=1]
- %204 = load float* %203, align 4 ; [#uses=1]
- %205 = fmul float %204, %159 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %207 = load float* %206, align 4 ; [#uses=1]
- %208 = fmul float %207, %169 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=1]
- %211 = fmul float %210, %169 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %213 = load float* %212, align 4 ; [#uses=1]
- %214 = fmul float %213, %169 ; [#uses=1]
- %215 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %216 = load float* %215, align 4 ; [#uses=1]
- %217 = fmul float %216, %179 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %219 = load float* %218, align 4 ; [#uses=1]
- %220 = fmul float %219, %179 ; [#uses=1]
- %221 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %222 = load float* %221, align 4 ; [#uses=1]
- %223 = fmul float %222, %179 ; [#uses=1]
- %224 = fadd float %217, %208 ; [#uses=1]
- %225 = fadd float %220, %211 ; [#uses=1]
- %226 = fadd float %223, %214 ; [#uses=1]
- %227 = fadd float %224, %199 ; [#uses=2]
- %228 = fadd float %225, %202 ; [#uses=2]
- %229 = fadd float %226, %205 ; [#uses=2]
- %230 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float %229, float* %230, align 4
- %231 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float %228, float* %231, align 4
- %232 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float %227, float* %232, align 4
- %233 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %233, align 4
- %234 = fsub float %190, %227 ; [#uses=1]
- %235 = fsub float %191, %228 ; [#uses=1]
- %236 = fsub float %192, %229 ; [#uses=1]
- %237 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- store float %236, float* %237, align 4
- %238 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- store float %235, float* %238, align 4
- %239 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- store float %234, float* %239, align 4
- %240 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %240, align 4
- %241 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver14reduceVerticesERK15btUsageBitfield(%struct.btVoronoiSimplexSolver* %this, %struct.btUsageBitfield* %241) nounwind
- %242 = load float* %3, align 4 ; [#uses=1]
- %243 = fcmp ult float %242, 0.000000e+00 ; [#uses=1]
- br i1 %243, label %_ZN25btSubSimplexClosestResult7isValidEv.exit53, label %bb.i47
-
-bb.i47: ; preds = %bb14
- %244 = load float* %4, align 4 ; [#uses=1]
- %245 = fcmp ult float %244, 0.000000e+00 ; [#uses=1]
- br i1 %245, label %_ZN25btSubSimplexClosestResult7isValidEv.exit53, label %bb1.i48
-
-bb1.i48: ; preds = %bb.i47
- %246 = load float* %5, align 4 ; [#uses=1]
- %247 = fcmp ult float %246, 0.000000e+00 ; [#uses=1]
- br i1 %247, label %_ZN25btSubSimplexClosestResult7isValidEv.exit53, label %bb2.i51
-
-bb2.i51: ; preds = %bb1.i48
- %248 = load float* %6, align 4 ; [#uses=1]
- %not..i49 = fcmp oge float %248, 0.000000e+00 ; [#uses=1]
- %retval.i50 = zext i1 %not..i49 to i8 ; [#uses=1]
- br label %_ZN25btSubSimplexClosestResult7isValidEv.exit53
-
-_ZN25btSubSimplexClosestResult7isValidEv.exit53: ; preds = %bb2.i51, %bb1.i48, %bb.i47, %bb14
- %249 = phi i8 [ %retval.i50, %bb2.i51 ], [ 0, %bb1.i48 ], [ 0, %bb.i47 ], [ 0, %bb14 ] ; [#uses=2]
- %250 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- store i8 %249, i8* %250, align 4
- ret i8 %249
-
-bb23: ; preds = %bb
- %251 = getelementptr inbounds %struct.btQuadWord* %p25, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %251, align 8
- %252 = getelementptr inbounds %struct.btQuadWord* %p25, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %252, align 4
- %253 = getelementptr inbounds %struct.btQuadWord* %p25, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %253, align 8
- %254 = getelementptr inbounds %struct.btQuadWord* %p25, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %254, align 4
- %255 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %256 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %257 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %259 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10 ; [#uses=1]
- %260 = call zeroext i8 @_ZN22btVoronoiSimplexSolver25closestPtPointTetrahedronERK9btVector3S2_S2_S2_S2_R25btSubSimplexClosestResult(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* %p25, %struct.btQuadWord* %255, %struct.btQuadWord* %256, %struct.btQuadWord* %257, %struct.btQuadWord* %258, %struct.btSubSimplexClosestResult* %259) ; [#uses=1]
- %toBool34 = icmp eq i8 %260, 0 ; [#uses=1]
- br i1 %toBool34, label %bb39, label %bb35
-
-bb35: ; preds = %bb23
- %261 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 3, i32 0, i32 2 ; [#uses=1]
- %262 = load float* %261, align 4 ; [#uses=1]
- %263 = load float* %6, align 4 ; [#uses=6]
- %264 = fmul float %262, %263 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 3, i32 0, i32 1 ; [#uses=1]
- %266 = load float* %265, align 4 ; [#uses=1]
- %267 = fmul float %266, %263 ; [#uses=1]
- %268 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 3, i32 0, i32 0 ; [#uses=1]
- %269 = load float* %268, align 4 ; [#uses=1]
- %270 = fmul float %269, %263 ; [#uses=1]
- %271 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- %272 = load float* %271, align 4 ; [#uses=1]
- %273 = load float* %5, align 4 ; [#uses=6]
- %274 = fmul float %272, %273 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- %276 = load float* %275, align 4 ; [#uses=1]
- %277 = fmul float %276, %273 ; [#uses=1]
- %278 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- %279 = load float* %278, align 4 ; [#uses=1]
- %280 = fmul float %279, %273 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %282 = load float* %281, align 4 ; [#uses=1]
- %283 = load float* %4, align 4 ; [#uses=6]
- %284 = fmul float %282, %283 ; [#uses=1]
- %285 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %286 = load float* %285, align 4 ; [#uses=1]
- %287 = fmul float %286, %283 ; [#uses=1]
- %288 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %289 = load float* %288, align 4 ; [#uses=1]
- %290 = fmul float %289, %283 ; [#uses=1]
- %291 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- %292 = load float* %291, align 4 ; [#uses=1]
- %293 = load float* %3, align 4 ; [#uses=6]
- %294 = fmul float %292, %293 ; [#uses=1]
- %295 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- %296 = load float* %295, align 4 ; [#uses=1]
- %297 = fmul float %296, %293 ; [#uses=1]
- %298 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- %299 = load float* %298, align 4 ; [#uses=1]
- %300 = fmul float %299, %293 ; [#uses=1]
- %301 = fadd float %294, %284 ; [#uses=1]
- %302 = fadd float %297, %287 ; [#uses=1]
- %303 = fadd float %300, %290 ; [#uses=1]
- %304 = fadd float %301, %274 ; [#uses=1]
- %305 = fadd float %302, %277 ; [#uses=1]
- %306 = fadd float %303, %280 ; [#uses=1]
- %307 = fadd float %304, %264 ; [#uses=2]
- %308 = fadd float %305, %267 ; [#uses=2]
- %309 = fadd float %306, %270 ; [#uses=2]
- %310 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %309, float* %310, align 4
- %311 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %308, float* %311, align 4
- %312 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %307, float* %312, align 4
- %313 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %313, align 4
- %314 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 3, i32 0, i32 2 ; [#uses=1]
- %315 = load float* %314, align 4 ; [#uses=1]
- %316 = fmul float %315, %263 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 3, i32 0, i32 1 ; [#uses=1]
- %318 = load float* %317, align 4 ; [#uses=1]
- %319 = fmul float %318, %263 ; [#uses=1]
- %320 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 3, i32 0, i32 0 ; [#uses=1]
- %321 = load float* %320, align 4 ; [#uses=1]
- %322 = fmul float %321, %263 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 2 ; [#uses=1]
- %324 = load float* %323, align 4 ; [#uses=1]
- %325 = fmul float %324, %273 ; [#uses=1]
- %326 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 1 ; [#uses=1]
- %327 = load float* %326, align 4 ; [#uses=1]
- %328 = fmul float %327, %273 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 2, i32 0, i32 0 ; [#uses=1]
- %330 = load float* %329, align 4 ; [#uses=1]
- %331 = fmul float %330, %273 ; [#uses=1]
- %332 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %333 = load float* %332, align 4 ; [#uses=1]
- %334 = fmul float %333, %283 ; [#uses=1]
- %335 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %336 = load float* %335, align 4 ; [#uses=1]
- %337 = fmul float %336, %283 ; [#uses=1]
- %338 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=1]
- %340 = fmul float %339, %283 ; [#uses=1]
- %341 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 2 ; [#uses=1]
- %342 = load float* %341, align 4 ; [#uses=1]
- %343 = fmul float %342, %293 ; [#uses=1]
- %344 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 1 ; [#uses=1]
- %345 = load float* %344, align 4 ; [#uses=1]
- %346 = fmul float %345, %293 ; [#uses=1]
- %347 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 3, i32 0, i32 0, i32 0 ; [#uses=1]
- %348 = load float* %347, align 4 ; [#uses=1]
- %349 = fmul float %348, %293 ; [#uses=1]
- %350 = fadd float %343, %334 ; [#uses=1]
- %351 = fadd float %346, %337 ; [#uses=1]
- %352 = fadd float %349, %340 ; [#uses=1]
- %353 = fadd float %350, %325 ; [#uses=1]
- %354 = fadd float %351, %328 ; [#uses=1]
- %355 = fadd float %352, %331 ; [#uses=1]
- %356 = fadd float %353, %316 ; [#uses=2]
- %357 = fadd float %354, %319 ; [#uses=2]
- %358 = fadd float %355, %322 ; [#uses=2]
- %359 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float %358, float* %359, align 4
- %360 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float %357, float* %360, align 4
- %361 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float %356, float* %361, align 4
- %362 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %362, align 4
- %363 = fsub float %307, %356 ; [#uses=1]
- %364 = fsub float %308, %357 ; [#uses=1]
- %365 = fsub float %309, %358 ; [#uses=1]
- %366 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- store float %365, float* %366, align 4
- %367 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- store float %364, float* %367, align 4
- %368 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- store float %363, float* %368, align 4
- %369 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %369, align 4
- %370 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- call void @_ZN22btVoronoiSimplexSolver14reduceVerticesERK15btUsageBitfield(%struct.btVoronoiSimplexSolver* %this, %struct.btUsageBitfield* %370) nounwind
- %371 = load float* %3, align 4 ; [#uses=1]
- %372 = fcmp ult float %371, 0.000000e+00 ; [#uses=1]
- br i1 %372, label %_ZN25btSubSimplexClosestResult7isValidEv.exit, label %bb.i
-
-bb.i: ; preds = %bb35
- %373 = load float* %4, align 4 ; [#uses=1]
- %374 = fcmp ult float %373, 0.000000e+00 ; [#uses=1]
- br i1 %374, label %_ZN25btSubSimplexClosestResult7isValidEv.exit, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %375 = load float* %5, align 4 ; [#uses=1]
- %376 = fcmp ult float %375, 0.000000e+00 ; [#uses=1]
- br i1 %376, label %_ZN25btSubSimplexClosestResult7isValidEv.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %377 = load float* %6, align 4 ; [#uses=1]
- %not..i = fcmp oge float %377, 0.000000e+00 ; [#uses=1]
- %retval.i = zext i1 %not..i to i8 ; [#uses=1]
- br label %_ZN25btSubSimplexClosestResult7isValidEv.exit
-
-_ZN25btSubSimplexClosestResult7isValidEv.exit: ; preds = %bb2.i, %bb1.i, %bb.i, %bb35
- %378 = phi i8 [ %retval.i, %bb2.i ], [ 0, %bb1.i ], [ 0, %bb.i ], [ 0, %bb35 ] ; [#uses=2]
- %379 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- store i8 %378, i8* %379, align 4
- ret i8 %378
-
-bb39: ; preds = %bb23
- %380 = load i8* %2, align 4 ; [#uses=1]
- %toBool40 = icmp eq i8 %380, 0 ; [#uses=1]
- %381 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=2]
- br i1 %toBool40, label %bb42, label %bb41
-
-bb41: ; preds = %bb39
- store i8 0, i8* %381, align 4
- ret i8 0
-
-bb42: ; preds = %bb39
- store i8 1, i8* %381, align 4
- %382 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %382, align 4
- %383 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %383, align 4
- %384 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %384, align 4
- %385 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %385, align 4
- ret i8 1
-
-bb43: ; preds = %bb
- %386 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 9 ; [#uses=1]
- store i8 0, i8* %386, align 4
- ret i8 0
-}
-
-; [#uses=2]
-define void @_ZN22btVoronoiSimplexSolver14compute_pointsER9btVector3S1_(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* nocapture %p1, %struct.btQuadWord* nocapture %p2) nounwind align 2 {
-entry:
- %0 = tail call zeroext i8 @_ZN22btVoronoiSimplexSolver28updateClosestVectorAndPointsEv(%struct.btVoronoiSimplexSolver* %this) ; [#uses=0]
- %1 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %p2, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %p2, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %p2, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %p2, i32 0, i32 0, i32 3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- ret void
-}
-
-; [#uses=2]
-define zeroext i8 @_ZN22btVoronoiSimplexSolver7closestER9btVector3(%struct.btVoronoiSimplexSolver* %this, %struct.btQuadWord* nocapture %v) nounwind align 2 {
-entry:
- %0 = tail call zeroext i8 @_ZN22btVoronoiSimplexSolver28updateClosestVectorAndPointsEv(%struct.btVoronoiSimplexSolver* %this) ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btVoronoiSimplexSolver* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- ret i8 %0
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController26computeReflectionDirectionERK9btVector3S2_(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btKinematicCharacterController* nocapture %this, %struct.btQuadWord* nocapture %direction, %struct.btQuadWord* nocapture %normal) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = fmul float %16, 2.000000e+00 ; [#uses=3]
- %18 = fmul float %14, %17 ; [#uses=1]
- %19 = fmul float %8, %17 ; [#uses=1]
- %20 = fmul float %3, %17 ; [#uses=1]
- %21 = fsub float %12, %18 ; [#uses=1]
- %22 = fsub float %6, %19 ; [#uses=1]
- %23 = fsub float %1, %20 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %23, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %22, float* %25, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld27ClosestConvexResultCallbackD1Ev(%"struct.btCollisionWorld::ClosestConvexResultCallback"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld27ClosestConvexResultCallbackD0Ev(%"struct.btCollisionWorld::ClosestConvexResultCallback"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb(%"struct.btCollisionWorld::ClosestConvexResultCallback"* nocapture %this, %"struct.btCollisionWorld::LocalConvexResult"* nocapture %convexResult, i8 zeroext %normalInWorldSpace) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 4 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1, float* %2, align 4
- %3 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btCollisionObject** %3, align 4 ; [#uses=10]
- %5 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btCollisionObject* %4, %struct.btCollisionObject** %5, align 4
- %toBool = icmp eq i8 %normalInWorldSpace, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- %18 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=3]
- %22 = fmul float %19, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = fmul float %24, %26 ; [#uses=1]
- %28 = fadd float %22, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=3]
- %33 = fmul float %30, %32 ; [#uses=1]
- %34 = fadd float %28, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fmul float %36, %21 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %26 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fmul float %43, %32 ; [#uses=1]
- %45 = fadd float %41, %44 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fmul float %47, %21 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %50, %26 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %32 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %45, float* %58, align 4
- %59 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %34, float* %59, align 4
- %60 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %61 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %62 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- store float %63, float* %61, align 4
- %64 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %65 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %68 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %"struct.btCollisionWorld::ClosestConvexResultCallback"* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = load float* %0, align 4 ; [#uses=1]
- ret float %73
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btActionInterfaceD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV17btActionInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btActionInterfaceD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV17btActionInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btCharacterControllerInterfaceD1Ev(%struct..0btMultiSapOverlapFilterCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([15 x i32 (...)*]* @_ZTV30btCharacterControllerInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btCharacterControllerInterfaceD0Ev(%struct..0btMultiSapOverlapFilterCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([15 x i32 (...)*]* @_ZTV30btCharacterControllerInterface, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct..0btMultiSapOverlapFilterCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN30btKinematicCharacterController12updateActionEP16btCollisionWorldf(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, float %deltaTime) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 8 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btKinematicCharacterController*, %struct.btCollisionWorld*)* ; [#uses=1]
- tail call void %4(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld)
- %5 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 9 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btKinematicCharacterController*, %struct.btCollisionWorld*, float)* ; [#uses=1]
- tail call void %8(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, float %deltaTime)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN43btKinematicClosestNotMeConvexResultCallbackD1Ev(%struct.btKinematicClosestNotMeConvexResultCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN43btKinematicClosestNotMeConvexResultCallbackD0Ev(%struct.btKinematicClosestNotMeConvexResultCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btKinematicClosestNotMeConvexResultCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZN43btKinematicClosestNotMeConvexResultCallback15addSingleResultERN16btCollisionWorld17LocalConvexResultEb(%struct.btKinematicClosestNotMeConvexResultCallback* nocapture %this, %"struct.btCollisionWorld::LocalConvexResult"* nocapture %convexResult, i8 zeroext %normalInWorldSpace) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 0 ; [#uses=2]
- %1 = load %struct.btCollisionObject** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %4 = icmp eq %struct.btCollisionObject* %1, %3 ; [#uses=1]
- br i1 %4, label %bb7, label %bb1
-
-bb1: ; preds = %entry
- %toBool = icmp eq i8 %normalInWorldSpace, 0 ; [#uses=2]
- br i1 %toBool, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %5 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- br label %bb4
-
-bb3: ; preds = %bb1
- %11 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %12 = load %struct.btCollisionObject** %11, align 4 ; [#uses=9]
- %13 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=3]
- %22 = fmul float %19, %21 ; [#uses=1]
- %23 = fadd float %17, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=3]
- %28 = fmul float %25, %27 ; [#uses=1]
- %29 = fadd float %23, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fmul float %31, %16 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fmul float %34, %21 ; [#uses=1]
- %36 = fadd float %32, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %38, %27 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fmul float %42, %16 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fmul float %45, %21 ; [#uses=1]
- %47 = fadd float %43, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btCollisionObject* %12, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fmul float %49, %27 ; [#uses=1]
- %51 = fadd float %47, %50 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %hitNormalWorld.0.2.0 = phi float [ %29, %bb3 ], [ %10, %bb2 ] ; [#uses=1]
- %hitNormalWorld.0.1.0 = phi float [ %40, %bb3 ], [ %8, %bb2 ] ; [#uses=1]
- %hitNormalWorld.0.0.0 = phi float [ %51, %bb3 ], [ %6, %bb2 ] ; [#uses=1]
- %52 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = fmul float %53, %hitNormalWorld.0.0.0 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fmul float %56, %hitNormalWorld.0.1.0 ; [#uses=1]
- %58 = fadd float %54, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = fmul float %60, %hitNormalWorld.0.2.0 ; [#uses=1]
- %62 = fadd float %58, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 3 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fcmp ogt float %64, %62 ; [#uses=1]
- br i1 %65, label %bb7, label %bb6
-
-bb6: ; preds = %bb4
- %66 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 4 ; [#uses=2]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %67, float* %68, align 4
- %69 = load %struct.btCollisionObject** %0, align 4 ; [#uses=10]
- %70 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- store %struct.btCollisionObject* %69, %struct.btCollisionObject** %70, align 4
- br i1 %toBool, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb6
- %71 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %72 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %75 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %78 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %81 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- br label %_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb.exit
-
-bb1.i: ; preds = %bb6
- %83 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=3]
- %87 = fmul float %84, %86 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=3]
- %92 = fmul float %89, %91 ; [#uses=1]
- %93 = fadd float %87, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=3]
- %98 = fmul float %95, %97 ; [#uses=1]
- %99 = fadd float %93, %98 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = fmul float %101, %86 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- %105 = fmul float %104, %91 ; [#uses=1]
- %106 = fadd float %102, %105 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = fmul float %108, %97 ; [#uses=1]
- %110 = fadd float %106, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fmul float %112, %86 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = fmul float %115, %91 ; [#uses=1]
- %117 = fadd float %113, %116 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btCollisionObject* %69, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=1]
- %120 = fmul float %119, %97 ; [#uses=1]
- %121 = fadd float %117, %120 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %121, float* %122, align 4
- %123 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %110, float* %123, align 4
- %124 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %99, float* %124, align 4
- %125 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %125, align 4
- br label %_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb.exit
-
-_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb.exit: ; preds = %bb1.i, %bb.i
- %126 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %127 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=1]
- store float %128, float* %126, align 4
- %129 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %130 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %131 = load float* %130, align 4 ; [#uses=1]
- store float %131, float* %129, align 4
- %132 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %133 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=1]
- store float %134, float* %132, align 4
- %135 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %136 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=1]
- store float %137, float* %135, align 4
- %138 = load float* %66, align 4 ; [#uses=1]
- ret float %138
-
-bb7: ; preds = %bb4, %entry
- ret float 1.000000e+00
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController17parallelComponentERK9btVector3S2_(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btKinematicCharacterController* nocapture %this, %struct.btQuadWord* nocapture %direction, %struct.btQuadWord* nocapture %normal) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=3]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fmul float %8, %16 ; [#uses=1]
- %19 = fmul float %3, %16 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %19, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %18, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %17, float* %22, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController22perpindicularComponentERK9btVector3S2_(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btKinematicCharacterController* nocapture %this, %struct.btQuadWord* nocapture %direction, %struct.btQuadWord* nocapture %normal) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %direction, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=3]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fmul float %8, %16 ; [#uses=1]
- %19 = fmul float %3, %16 ; [#uses=1]
- %20 = fsub float %12, %17 ; [#uses=1]
- %21 = fsub float %6, %18 ; [#uses=1]
- %22 = fsub float %1, %19 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %21, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %20, float* %25, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- ret void
-}
-
-; [#uses=0]
-define %struct.btPairCachingGhostObject* @_ZN30btKinematicCharacterController14getGhostObjectEv(%struct.btKinematicCharacterController* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btPairCachingGhostObject** %0, align 4 ; [#uses=1]
- ret %struct.btPairCachingGhostObject* %1
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController5resetEv(%struct.btKinematicCharacterController* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController4warpERK9btVector3(%struct.btKinematicCharacterController* nocapture %this, %struct.btQuadWord* nocapture %origin) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %origin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %origin, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %origin, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %origin, i32 0, i32 0, i32 3 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=1]
- %9 = load %struct.btPairCachingGhostObject** %8, align 4 ; [#uses=16]
- %10 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %1, float* %22, align 4
- %23 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %3, float* %23, align 4
- %24 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %5, float* %24, align 4
- %25 = getelementptr inbounds %struct.btPairCachingGhostObject* %9, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %7, float* %25, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController12setFallSpeedEf(%struct.btKinematicCharacterController* nocapture %this, float %fallSpeed) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 6 ; [#uses=1]
- store float %fallSpeed, float* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController12setJumpSpeedEf(%struct.btKinematicCharacterController* nocapture %this, float %jumpSpeed) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 7 ; [#uses=1]
- store float %jumpSpeed, float* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController16setMaxJumpHeightEf(%struct.btKinematicCharacterController* nocapture %this, float %maxJumpHeight) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 8 ; [#uses=1]
- store float %maxJumpHeight, float* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZNK30btKinematicCharacterController7canJumpEv(%struct.btKinematicCharacterController* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 12 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i8 (%struct.btKinematicCharacterController*)* ; [#uses=1]
- %5 = tail call zeroext i8 %4(%struct.btKinematicCharacterController* %this) ; [#uses=1]
- ret i8 %5
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController4jumpEv(%struct.btKinematicCharacterController* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 10 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to i8 (%struct.btKinematicCharacterController*)* ; [#uses=1]
- %5 = tail call zeroext i8 %4(%struct.btKinematicCharacterController* %this) ; [#uses=1]
- %toBoolnot = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBoolnot, label %return, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 7 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 4 ; [#uses=1]
- store float %7, float* %8, align 4
- %9 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 24 ; [#uses=1]
- store i8 1, i8* %9, align 1
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController10setGravityEf(%struct.btKinematicCharacterController* nocapture %this, float %gravity) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 11 ; [#uses=1]
- store float %gravity, float* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define float @_ZNK30btKinematicCharacterController10getGravityEv(%struct.btKinematicCharacterController* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 11 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=0]
-define float @_ZNK30btKinematicCharacterController11getMaxSlopeEv(%struct.btKinematicCharacterController* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 9 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=1]
-define zeroext i8 @_ZNK30btKinematicCharacterController8onGroundEv(%struct.btKinematicCharacterController* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 4 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fcmp une float %1, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %bb2, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 5 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %not. = fcmp oeq float %4, 0.000000e+00 ; [#uses=1]
- %retval = zext i1 %not. to i8 ; [#uses=1]
- ret i8 %retval
-
-bb2: ; preds = %entry
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController9debugDrawEP12btIDebugDraw(%struct.btKinematicCharacterController* nocapture %this, %struct.btActionInterface* nocapture %debugDrawer) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=0]
-define %struct.btQuadWord* @_ZN30btKinematicCharacterController19getUpAxisDirectionsEv() nounwind align 2 {
-entry:
- %0 = load i8* bitcast (i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection to i8*), align 8 ; [#uses=1]
- %1 = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb2
-
-bb: ; preds = %entry
- %2 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 3), align 4
- tail call void @__cxa_guard_release(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind
- ret %struct.btQuadWord* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0)
-
-bb2: ; preds = %bb, %entry
- ret %struct.btQuadWord* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0)
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterController11setMaxSlopeEf(%struct.btKinematicCharacterController* nocapture %this, float %slopeRadians) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 9 ; [#uses=1]
- store float %slopeRadians, float* %0, align 4
- %1 = tail call float @cosf(float %slopeRadians) nounwind readonly ; [#uses=1]
- %2 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 10 ; [#uses=1]
- store float %1, float* %2, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController26setVelocityForTimeIntervalERK9btVector3f(%struct.btKinematicCharacterController* nocapture %this, %struct.btQuadWord* nocapture %velocity, float %timeInterval) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 26 ; [#uses=1]
- store i8 0, i8* %0, align 1
- %1 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %velocity, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = fmul float %3, %3 ; [#uses=1]
- %14 = fmul float %6, %6 ; [#uses=1]
- %15 = fadd float %13, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = tail call float @sqrtf(float %17) nounwind readonly ; [#uses=1]
- %19 = fdiv float 1.000000e+00, %18 ; [#uses=3]
- %20 = fmul float %19, %9 ; [#uses=3]
- %21 = fmul float %19, %6 ; [#uses=3]
- %22 = fmul float %19, %3 ; [#uses=3]
- %23 = fmul float %22, %22 ; [#uses=1]
- %24 = fmul float %21, %21 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = fmul float %20, %20 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = tail call float @sqrtf(float %27) nounwind readonly ; [#uses=1]
- %29 = fcmp olt float %28, 0x3E80000000000000 ; [#uses=3]
- %memtmp.0.2.0 = select i1 %29, float 0.000000e+00, float %20 ; [#uses=1]
- %memtmp.0.1.0 = select i1 %29, float 0.000000e+00, float %21 ; [#uses=1]
- %memtmp.0.0.0 = select i1 %29, float 0.000000e+00, float %22 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- store float %memtmp.0.0.0, float* %30, align 4
- %31 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- store float %memtmp.0.1.0, float* %31, align 4
- %32 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- store float %memtmp.0.2.0, float* %32, align 4
- %33 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 27 ; [#uses=1]
- store float %timeInterval, float* %34, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController16setWalkDirectionERK9btVector3(%struct.btKinematicCharacterController* nocapture %this, %struct.btQuadWord* nocapture %walkDirection) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 26 ; [#uses=1]
- store i8 1, i8* %0, align 1
- %1 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %walkDirection, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- store float %3, float* %1, align 4
- %4 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %walkDirection, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %walkDirection, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %walkDirection, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = fmul float %3, %3 ; [#uses=1]
- %14 = fmul float %6, %6 ; [#uses=1]
- %15 = fadd float %13, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = tail call float @sqrtf(float %17) nounwind readonly ; [#uses=1]
- %19 = fdiv float 1.000000e+00, %18 ; [#uses=3]
- %20 = fmul float %19, %9 ; [#uses=3]
- %21 = fmul float %19, %6 ; [#uses=3]
- %22 = fmul float %19, %3 ; [#uses=3]
- %23 = fmul float %22, %22 ; [#uses=1]
- %24 = fmul float %21, %21 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = fmul float %20, %20 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = tail call float @sqrtf(float %27) nounwind readonly ; [#uses=1]
- %29 = fcmp olt float %28, 0x3E80000000000000 ; [#uses=3]
- %memtmp.0.2.0 = select i1 %29, float 0.000000e+00, float %20 ; [#uses=1]
- %memtmp.0.1.0 = select i1 %29, float 0.000000e+00, float %21 ; [#uses=1]
- %memtmp.0.0.0 = select i1 %29, float 0.000000e+00, float %22 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- store float %memtmp.0.0.0, float* %30, align 4
- %31 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- store float %memtmp.0.1.0, float* %31, align 4
- %32 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- store float %memtmp.0.2.0, float* %32, align 4
- %33 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN30btKinematicCharacterController36updateTargetPositionBasedOnCollisionERK9btVector3ff(%struct.btKinematicCharacterController* nocapture %this, %struct.btQuadWord* nocapture %hitNormal, float %tangentMag, float %normalMag) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 2 ; [#uses=3]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fsub float %1, %3 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 1 ; [#uses=3]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fsub float %6, %8 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 0 ; [#uses=3]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fsub float %11, %13 ; [#uses=3]
- %15 = fmul float %14, %14 ; [#uses=1]
- %16 = fmul float %9, %9 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = fmul float %4, %4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = tail call float @sqrtf(float %19) nounwind readonly ; [#uses=3]
- %21 = fcmp ogt float %20, 0x3E80000000000000 ; [#uses=1]
- br i1 %21, label %bb, label %return
-
-bb: ; preds = %entry
- %22 = fdiv float 1.000000e+00, %20 ; [#uses=3]
- %23 = fmul float %14, %22 ; [#uses=2]
- %24 = fmul float %9, %22 ; [#uses=2]
- %25 = fmul float %4, %22 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btQuadWord* %hitNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=4]
- %28 = fmul float %23, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %hitNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=4]
- %31 = fmul float %24, %30 ; [#uses=1]
- %32 = fadd float %28, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %hitNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=4]
- %35 = fmul float %25, %34 ; [#uses=1]
- %36 = fadd float %32, %35 ; [#uses=1]
- %37 = fmul float %36, 2.000000e+00 ; [#uses=3]
- %38 = fmul float %34, %37 ; [#uses=1]
- %39 = fmul float %30, %37 ; [#uses=1]
- %40 = fmul float %27, %37 ; [#uses=1]
- %41 = fsub float %25, %38 ; [#uses=3]
- %42 = fsub float %24, %39 ; [#uses=3]
- %43 = fsub float %23, %40 ; [#uses=3]
- %44 = fmul float %43, %43 ; [#uses=1]
- %45 = fmul float %42, %42 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=1]
- %47 = fmul float %41, %41 ; [#uses=1]
- %48 = fadd float %46, %47 ; [#uses=1]
- %49 = tail call float @sqrtf(float %48) nounwind readonly ; [#uses=1]
- %50 = fdiv float 1.000000e+00, %49 ; [#uses=3]
- %51 = fmul float %43, %50 ; [#uses=2]
- %52 = fmul float %42, %50 ; [#uses=2]
- %53 = fmul float %41, %50 ; [#uses=2]
- %54 = fmul float %51, %27 ; [#uses=1]
- %55 = fmul float %52, %30 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %53, %34 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=3]
- store float %13, float* %10, align 4
- store float %8, float* %5, align 4
- store float %3, float* %0, align 4
- %59 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = fcmp une float %normalMag, 0.000000e+00 ; [#uses=1]
- br i1 %62, label %bb2, label %return
-
-bb2: ; preds = %bb
- %63 = fmul float %27, %58 ; [#uses=1]
- %64 = fmul float %30, %58 ; [#uses=1]
- %65 = fmul float %34, %58 ; [#uses=1]
- %66 = fsub float %51, %63 ; [#uses=1]
- %67 = fsub float %52, %64 ; [#uses=1]
- %68 = fsub float %53, %65 ; [#uses=1]
- %69 = fmul float %20, %normalMag ; [#uses=3]
- %70 = fmul float %68, %69 ; [#uses=1]
- %71 = fmul float %67, %69 ; [#uses=1]
- %72 = fmul float %66, %69 ; [#uses=1]
- %73 = fadd float %13, %72 ; [#uses=1]
- store float %73, float* %10, align 4
- %74 = fadd float %8, %71 ; [#uses=1]
- store float %74, float* %5, align 4
- %75 = fadd float %3, %70 ; [#uses=1]
- store float %75, float* %0, align 4
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController8stepDownEP16btCollisionWorldf(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, float %dt) align 2 {
-entry:
- %start = alloca %struct.btTransform, align 8 ; [#uses=18]
- %end = alloca %struct.btTransform, align 8 ; [#uses=18]
- %callback = alloca %struct.btKinematicClosestNotMeConvexResultCallback, align 8 ; [#uses=14]
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 4 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fcmp olt float %1, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %bb, label %bb2
-
-bb: ; preds = %entry
- %3 = fsub float -0.000000e+00, %1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %iftmp.235.0 = phi float [ %3, %bb ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %4 = fmul float %iftmp.235.0, %dt ; [#uses=5]
- %5 = fcmp ogt float %4, 0.000000e+00 ; [#uses=1]
- br i1 %5, label %bb3, label %bb11
-
-bb3: ; preds = %bb2
- %6 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 13 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fcmp ogt float %7, %4 ; [#uses=1]
- br i1 %8, label %bb4, label %bb11
-
-bb4: ; preds = %bb3
- %9 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 23 ; [#uses=1]
- %10 = load i8* %9, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %10, 0 ; [#uses=1]
- br i1 %toBool, label %bb5, label %bb10
-
-bb5: ; preds = %bb4
- %11 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 24 ; [#uses=1]
- %12 = load i8* %11, align 1 ; [#uses=1]
- %toBool6not = icmp eq i8 %12, 0 ; [#uses=1]
- br i1 %toBool6not, label %bb10, label %bb11
-
-bb10: ; preds = %bb5, %bb4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb5, %bb3, %bb2
- %downVelocity.0 = phi float [ %7, %bb10 ], [ %4, %bb5 ], [ %4, %bb3 ], [ %4, %bb2 ] ; [#uses=1]
- %13 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 18 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fadd float %14, %downVelocity.0 ; [#uses=3]
- %16 = load i8* bitcast (i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection to i8*), align 8 ; [#uses=1]
- %17 = icmp eq i8 %16, 0 ; [#uses=1]
- br i1 %17, label %bb.i25, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit28
-
-bb.i25: ; preds = %bb11
- %18 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind ; [#uses=1]
- %19 = icmp eq i32 %18, 0 ; [#uses=1]
- br i1 %19, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit28, label %bb1.i26
-
-bb1.i26: ; preds = %bb.i25
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind
- br label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit28
-
-_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit28: ; preds = %bb1.i26, %bb.i25, %bb11
- %20 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 28 ; [#uses=2]
- %21 = load i32* %20, align 4 ; [#uses=3]
- %22 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %21, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 8 ; [#uses=1]
- %24 = fmul float %23, %15 ; [#uses=1]
- %25 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %21, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fmul float %26, %15 ; [#uses=1]
- %28 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %21, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 16 ; [#uses=1]
- %30 = fmul float %29, %15 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 0 ; [#uses=4]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fsub float %32, %30 ; [#uses=2]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 1 ; [#uses=4]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fsub float %35, %27 ; [#uses=2]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 2 ; [#uses=4]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fsub float %38, %24 ; [#uses=2]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %40, align 8
- %41 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 8
- %43 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- %44 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 8
- %45 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %45, align 4
- %46 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %46, align 8
- %47 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 4
- %48 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %48, align 8
- %49 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %49, align 4
- %50 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %50, align 8
- %51 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 4
- %52 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %56, align 8
- %57 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %57, align 4
- %58 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %58, align 8
- %59 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %59, align 4
- %60 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 8
- %61 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %61, align 4
- %62 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %62, align 8
- %63 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %63, align 4
- %64 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %64, align 8
- %65 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %65, align 4
- %66 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %66, align 8
- %67 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- %68 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 0 ; [#uses=4]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %52, align 8
- %74 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 1 ; [#uses=4]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %53, align 4
- %76 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 2 ; [#uses=4]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %54, align 8
- %78 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 3 ; [#uses=2]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %55, align 4
- store float %33, float* %68, align 8
- store float %36, float* %69, align 4
- store float %39, float* %70, align 8
- %80 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 3 ; [#uses=2]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %71, align 4
- %82 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 10 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = load i8* bitcast (i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection to i8*), align 8 ; [#uses=1]
- %85 = icmp eq i8 %84, 0 ; [#uses=1]
- br i1 %85, label %bb.i, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
-
-bb.i: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit28
- %86 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind ; [#uses=1]
- %87 = icmp eq i32 %86, 0 ; [#uses=1]
- br i1 %87, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind
- br label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
-
-_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit: ; preds = %bb1.i, %bb.i, %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit28
- %88 = load i32* %20, align 4 ; [#uses=4]
- %89 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=1]
- %90 = load %struct.btPairCachingGhostObject** %89, align 4 ; [#uses=3]
- %91 = getelementptr inbounds %struct.btPairCachingGhostObject* %90, i32 0, i32 0, i32 0 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 1.000000e+00, float* %93, align 4
- %94 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store i16 1, i16* %94, align 8
- %95 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- store i16 -1, i16* %95, align 2
- %96 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 5 ; [#uses=1]
- %98 = bitcast float* %96 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %98, i8 0, i64 32, i32 4, i1 false) nounwind
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %97, align 4
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV43btKinematicClosestNotMeConvexResultCallback, i32 0, i32 2), i32 (...)*** %92, align 8
- %99 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %91, %struct.btCollisionObject** %99, align 8
- %100 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %101 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %88, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 16 ; [#uses=1]
- store float %102, float* %100, align 4
- %103 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %104 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %88, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- store float %105, float* %103, align 4
- %106 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %107 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %88, i32 0, i32 2 ; [#uses=1]
- %108 = load float* %107, align 8 ; [#uses=1]
- store float %108, float* %106, align 4
- %109 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %110 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %88, i32 0, i32 3 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- store float %111, float* %109, align 4
- %112 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 3 ; [#uses=1]
- store float %83, float* %112, align 4
- %113 = getelementptr inbounds %struct.btPairCachingGhostObject* %90, i32 0, i32 0, i32 0, i32 8 ; [#uses=2]
- %114 = load %struct.btBroadphaseProxy** %113, align 4 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btBroadphaseProxy* %114, i32 0, i32 1 ; [#uses=1]
- %116 = load i16* %115, align 4 ; [#uses=1]
- store i16 %116, i16* %94, align 8
- %117 = load %struct.btBroadphaseProxy** %113, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btBroadphaseProxy* %117, i32 0, i32 2 ; [#uses=1]
- %119 = load i16* %118, align 2 ; [#uses=1]
- store i16 %119, i16* %95, align 2
- %120 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 25 ; [#uses=1]
- %121 = load i8* %120, align 2 ; [#uses=1]
- %toBool12 = icmp eq i8 %121, 0 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 3, i32 9 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=2]
- %124 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 3 ; [#uses=1]
- %125 = load %struct.btConvexShape** %124, align 4 ; [#uses=2]
- br i1 %toBool12, label %bb14, label %bb13
-
-bb13: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
- %126 = getelementptr inbounds %struct.btPairCachingGhostObject* %90, i32 0, i32 0 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK13btGhostObject15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RN16btCollisionWorld20ConvexResultCallbackEf(%struct.btGhostObject* %126, %struct.btConvexShape* %125, %struct.btTransform* %start, %struct.btTransform* %end, %"struct.btCollisionWorld::ConvexResultCallback"* %127, float %123)
- to label %bb16 unwind label %lpad
-
-bb14: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
- %128 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK16btCollisionWorld15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RNS_20ConvexResultCallbackEf(%struct.btCollisionWorld* %collisionWorld, %struct.btConvexShape* %125, %struct.btTransform* %start, %struct.btTransform* %end, %"struct.btCollisionWorld::ConvexResultCallback"* %128, float %123)
- to label %bb16 unwind label %lpad
-
-bb16: ; preds = %bb14, %bb13
- %129 = load float* %93, align 4 ; [#uses=5]
- %130 = fcmp olt float %129, 1.000000e+00 ; [#uses=1]
- br i1 %130, label %bb18, label %bb19
-
-bb18: ; preds = %bb16
- %131 = fsub float 1.000000e+00, %129 ; [#uses=3]
- %132 = load float* %72, align 4 ; [#uses=1]
- %133 = fmul float %132, %131 ; [#uses=1]
- %134 = load float* %31, align 4 ; [#uses=1]
- %135 = fmul float %134, %129 ; [#uses=1]
- %136 = fadd float %133, %135 ; [#uses=1]
- store float %136, float* %72, align 4
- %137 = load float* %74, align 4 ; [#uses=1]
- %138 = fmul float %137, %131 ; [#uses=1]
- %139 = load float* %34, align 4 ; [#uses=1]
- %140 = fmul float %139, %129 ; [#uses=1]
- %141 = fadd float %138, %140 ; [#uses=1]
- store float %141, float* %74, align 4
- %142 = load float* %76, align 4 ; [#uses=1]
- %143 = fmul float %142, %131 ; [#uses=1]
- %144 = load float* %37, align 4 ; [#uses=1]
- %145 = fmul float %144, %129 ; [#uses=1]
- %146 = fadd float %143, %145 ; [#uses=1]
- store float %146, float* %76, align 4
- store float 0.000000e+00, float* %0, align 4
- %147 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %147, align 4
- %148 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 24 ; [#uses=1]
- store i8 0, i8* %148, align 1
- ret void
-
-bb19: ; preds = %bb16
- %149 = load float* %31, align 4 ; [#uses=1]
- store float %149, float* %72, align 4
- %150 = load float* %34, align 4 ; [#uses=1]
- store float %150, float* %74, align 4
- %151 = load float* %37, align 4 ; [#uses=1]
- store float %151, float* %76, align 4
- %152 = load float* %80, align 4 ; [#uses=1]
- store float %152, float* %78, align 4
- ret void
-
-lpad: ; preds = %bb14, %bb13
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select23 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %92, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=2]
-define void @_ZN30btKinematicCharacterController20stepForwardAndStrafeEP16btCollisionWorldRK9btVector3(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, %struct.btQuadWord* nocapture %walkMove) align 2 {
-entry:
- %start = alloca %struct.btTransform, align 8 ; [#uses=18]
- %end = alloca %struct.btTransform, align 8 ; [#uses=18]
- %callback = alloca %struct.btKinematicClosestNotMeConvexResultCallback, align 8 ; [#uses=14]
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 2 ; [#uses=4]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %walkMove, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fadd float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 1 ; [#uses=4]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %walkMove, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fadd float %6, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 0 ; [#uses=4]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %walkMove, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fadd float %11, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 0 ; [#uses=4]
- store float %14, float* %15, align 4
- %16 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 1 ; [#uses=4]
- store float %9, float* %16, align 4
- %17 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 2 ; [#uses=4]
- store float %4, float* %17, align 4
- %18 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %19, align 8
- %20 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 8
- %22 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 8
- %24 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 8
- %26 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 8
- %28 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 8
- %30 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %31, align 8
- %32 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %32, align 4
- %33 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %33, align 8
- %34 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %35, align 8
- %36 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 8
- %38 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- %39 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 8
- %40 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %40, align 4
- %41 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 8
- %42 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 4
- %43 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 8
- %44 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- %45 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %45, align 8
- %46 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %46, align 4
- %47 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %47, align 8
- %48 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %48, align 4
- %49 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %49, align 8
- %50 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %50, align 4
- %51 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 21 ; [#uses=1]
- %52 = load i8* %51, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %52, 0 ; [#uses=1]
- br i1 %toBool, label %bb30.preheader, label %bb
-
-bb: ; preds = %entry
- %53 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22, i32 0, i32 0 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fmul float %54, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %59, %61 ; [#uses=1]
- %63 = fadd float %57, %62 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fmul float %65, %67 ; [#uses=1]
- %69 = fadd float %63, %68 ; [#uses=1]
- %70 = fcmp ogt float %69, 0.000000e+00 ; [#uses=1]
- br i1 %70, label %bb2, label %bb30.preheader
-
-bb2: ; preds = %bb
- %71 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22 ; [#uses=1]
- call void @_ZN30btKinematicCharacterController36updateTargetPositionBasedOnCollisionERK9btVector3ff(%struct.btKinematicCharacterController* %this, %struct.btQuadWord* %71, float 0.000000e+00, float 1.000000e+00) nounwind
- br label %bb30.preheader
-
-bb30.preheader: ; preds = %bb2, %bb, %entry
- %72 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 3 ; [#uses=2]
- %73 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %75 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %77 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %78 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 5 ; [#uses=1]
- %80 = bitcast float* %78 to i8* ; [#uses=1]
- %81 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 1 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 3 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 3 ; [#uses=4]
- %88 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 14 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 25 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 3, i32 9 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0 ; [#uses=2]
- %92 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 3 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- br label %bb30
-
-bb4: ; preds = %bb31
- %96 = load float* %10, align 4 ; [#uses=2]
- store float %96, float* %31, align 8
- %97 = load float* %5, align 4 ; [#uses=2]
- store float %97, float* %32, align 4
- %98 = load float* %0, align 4 ; [#uses=2]
- store float %98, float* %33, align 8
- %99 = load float* %72, align 4 ; [#uses=1]
- store float %99, float* %34, align 4
- %100 = load float* %15, align 4 ; [#uses=2]
- store float %100, float* %47, align 8
- %101 = load float* %16, align 4 ; [#uses=2]
- store float %101, float* %48, align 4
- %102 = load float* %17, align 4 ; [#uses=2]
- store float %102, float* %49, align 8
- %103 = load float* %18, align 4 ; [#uses=1]
- store float %103, float* %50, align 4
- %104 = fsub float %98, %102 ; [#uses=1]
- %105 = fsub float %97, %101 ; [#uses=1]
- %106 = fsub float %96, %100 ; [#uses=1]
- %107 = load %struct.btPairCachingGhostObject** %73, align 4 ; [#uses=2]
- %108 = getelementptr inbounds %struct.btPairCachingGhostObject* %107, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %75, align 4
- store i16 1, i16* %76, align 8
- store i16 -1, i16* %77, align 2
- call void @llvm.memset.p0i8.i64(i8* %80, i8 0, i64 32, i32 4, i1 false) nounwind
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %79, align 4
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV43btKinematicClosestNotMeConvexResultCallback, i32 0, i32 2), i32 (...)*** %74, align 8
- store %struct.btCollisionObject* %108, %struct.btCollisionObject** %81, align 8
- store float %106, float* %82, align 4
- store float %105, float* %83, align 4
- store float %104, float* %84, align 4
- store float 0.000000e+00, float* %85, align 4
- store float 0.000000e+00, float* %86, align 4
- %109 = getelementptr inbounds %struct.btPairCachingGhostObject* %107, i32 0, i32 0, i32 0, i32 8 ; [#uses=2]
- %110 = load %struct.btBroadphaseProxy** %109, align 4 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btBroadphaseProxy* %110, i32 0, i32 1 ; [#uses=1]
- %112 = load i16* %111, align 4 ; [#uses=1]
- store i16 %112, i16* %76, align 8
- %113 = load %struct.btBroadphaseProxy** %109, align 4 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btBroadphaseProxy* %113, i32 0, i32 2 ; [#uses=1]
- %115 = load i16* %114, align 2 ; [#uses=1]
- store i16 %115, i16* %77, align 2
- %116 = load %struct.btConvexShape** %87, align 4 ; [#uses=2]
- %117 = getelementptr inbounds %struct.btConvexShape* %116, i32 0, i32 0, i32 0 ; [#uses=1]
- %118 = load i32 (...)*** %117, align 4 ; [#uses=1]
- %119 = getelementptr inbounds i32 (...)** %118, i32 11 ; [#uses=1]
- %120 = load i32 (...)** %119, align 4 ; [#uses=1]
- %121 = bitcast i32 (...)* %120 to float (%struct.btConvexShape*)* ; [#uses=1]
- %122 = invoke float %121(%struct.btConvexShape* %116)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %bb4
- %123 = load %struct.btConvexShape** %87, align 4 ; [#uses=2]
- %124 = getelementptr inbounds %struct.btConvexShape* %123, i32 0, i32 0, i32 0 ; [#uses=1]
- %125 = load i32 (...)*** %124, align 4 ; [#uses=1]
- %126 = getelementptr inbounds i32 (...)** %125, i32 10 ; [#uses=1]
- %127 = load i32 (...)** %126, align 4 ; [#uses=1]
- %128 = load float* %88, align 4 ; [#uses=1]
- %129 = fadd float %128, %122 ; [#uses=1]
- %130 = bitcast i32 (...)* %127 to void (%struct.btConvexShape*, float)* ; [#uses=1]
- invoke void %130(%struct.btConvexShape* %123, float %129)
- to label %invcont8 unwind label %lpad
-
-invcont8: ; preds = %invcont
- %131 = load i8* %89, align 2 ; [#uses=1]
- %toBool9 = icmp eq i8 %131, 0 ; [#uses=1]
- %132 = load float* %90, align 4 ; [#uses=2]
- %133 = load %struct.btConvexShape** %87, align 4 ; [#uses=2]
- br i1 %toBool9, label %bb12, label %bb10
-
-bb10: ; preds = %invcont8
- %134 = load %struct.btPairCachingGhostObject** %73, align 4 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btPairCachingGhostObject* %134, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK13btGhostObject15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RN16btCollisionWorld20ConvexResultCallbackEf(%struct.btGhostObject* %135, %struct.btConvexShape* %133, %struct.btTransform* %start, %struct.btTransform* %end, %"struct.btCollisionWorld::ConvexResultCallback"* %91, float %132)
- to label %bb14 unwind label %lpad
-
-bb12: ; preds = %invcont8
- invoke void @_ZNK16btCollisionWorld15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RNS_20ConvexResultCallbackEf(%struct.btCollisionWorld* %collisionWorld, %struct.btConvexShape* %133, %struct.btTransform* %start, %struct.btTransform* %end, %"struct.btCollisionWorld::ConvexResultCallback"* %91, float %132)
- to label %bb14 unwind label %lpad
-
-bb14: ; preds = %bb12, %bb10
- %136 = load %struct.btConvexShape** %87, align 4 ; [#uses=2]
- %137 = getelementptr inbounds %struct.btConvexShape* %136, i32 0, i32 0, i32 0 ; [#uses=1]
- %138 = load i32 (...)*** %137, align 4 ; [#uses=1]
- %139 = getelementptr inbounds i32 (...)** %138, i32 10 ; [#uses=1]
- %140 = load i32 (...)** %139, align 4 ; [#uses=1]
- %141 = bitcast i32 (...)* %140 to void (%struct.btConvexShape*, float)* ; [#uses=1]
- invoke void %141(%struct.btConvexShape* %136, float %122)
- to label %invcont15 unwind label %lpad
-
-invcont15: ; preds = %bb14
- %142 = load float* %75, align 4 ; [#uses=2]
- %143 = fsub float %fraction.0, %142 ; [#uses=1]
- %144 = fcmp olt float %142, 1.000000e+00 ; [#uses=1]
- br i1 %144, label %bb17, label %bb24
-
-bb17: ; preds = %invcont15
- call void @_ZN30btKinematicCharacterController36updateTargetPositionBasedOnCollisionERK9btVector3ff(%struct.btKinematicCharacterController* %this, %struct.btQuadWord* %92, float 0.000000e+00, float 1.000000e+00) nounwind
- %145 = load float* %17, align 4 ; [#uses=1]
- %146 = load float* %0, align 4 ; [#uses=1]
- %147 = fsub float %145, %146 ; [#uses=3]
- %148 = load float* %16, align 4 ; [#uses=1]
- %149 = load float* %5, align 4 ; [#uses=1]
- %150 = fsub float %148, %149 ; [#uses=3]
- %151 = load float* %15, align 4 ; [#uses=1]
- %152 = load float* %10, align 4 ; [#uses=1]
- %153 = fsub float %151, %152 ; [#uses=3]
- %154 = fmul float %153, %153 ; [#uses=1]
- %155 = fmul float %150, %150 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- %157 = fmul float %147, %147 ; [#uses=1]
- %158 = fadd float %156, %157 ; [#uses=2]
- %159 = fcmp ogt float %158, 0x3E80000000000000 ; [#uses=1]
- br i1 %159, label %bb21, label %bb29
-
-bb21: ; preds = %bb17
- %160 = call float @sqrtf(float %158) nounwind readonly ; [#uses=1]
- %161 = fdiv float 1.000000e+00, %160 ; [#uses=3]
- %162 = fmul float %153, %161 ; [#uses=1]
- %163 = fmul float %150, %161 ; [#uses=1]
- %164 = fmul float %147, %161 ; [#uses=1]
- %165 = load float* %93, align 4 ; [#uses=1]
- %166 = fmul float %162, %165 ; [#uses=1]
- %167 = load float* %94, align 4 ; [#uses=1]
- %168 = fmul float %163, %167 ; [#uses=1]
- %169 = fadd float %166, %168 ; [#uses=1]
- %170 = load float* %95, align 4 ; [#uses=1]
- %171 = fmul float %164, %170 ; [#uses=1]
- %172 = fadd float %169, %171 ; [#uses=1]
- %173 = fcmp ugt float %172, 0.000000e+00 ; [#uses=1]
- br i1 %173, label %bb30.critedge, label %bb29
-
-bb24: ; preds = %invcont15
- %174 = load float* %15, align 4 ; [#uses=1]
- store float %174, float* %10, align 4
- %175 = load float* %16, align 4 ; [#uses=1]
- store float %175, float* %5, align 4
- %176 = load float* %17, align 4 ; [#uses=1]
- store float %176, float* %0, align 4
- %177 = load float* %18, align 4 ; [#uses=1]
- store float %177, float* %72, align 4
- br label %bb30.critedge
-
-bb29: ; preds = %bb31, %bb30, %bb21, %bb17
- ret void
-
-bb30.critedge: ; preds = %bb24, %bb21
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %74, align 8
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb30
-
-bb30: ; preds = %bb30.critedge, %bb30.preheader
- %indvar = phi i32 [ 0, %bb30.preheader ], [ %indvar.next, %bb30.critedge ] ; [#uses=2]
- %fraction.0 = phi float [ 1.000000e+00, %bb30.preheader ], [ %143, %bb30.critedge ] ; [#uses=2]
- %178 = fcmp ule float %fraction.0, 0x3F847AE140000000 ; [#uses=1]
- br i1 %178, label %bb29, label %bb31
-
-bb31: ; preds = %bb30
- %maxIter.2 = sub i32 10, %indvar ; [#uses=1]
- %toBool32not = icmp slt i32 %maxIter.2, 1 ; [#uses=1]
- br i1 %toBool32not, label %bb29, label %bb4
-
-lpad: ; preds = %bb14, %bb12, %bb10, %invcont, %bb4
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select42 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %74, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController6stepUpEP16btCollisionWorld(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %world) align 2 {
-entry:
- %start = alloca %struct.btTransform, align 8 ; [#uses=18]
- %end = alloca %struct.btTransform, align 8 ; [#uses=18]
- %callback = alloca %struct.btKinematicClosestNotMeConvexResultCallback, align 8 ; [#uses=17]
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 13 ; [#uses=3]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 5 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fcmp ogt float %3, 0.000000e+00 ; [#uses=1]
- %iftmp.227.0 = select i1 %4, float %3, float 0.000000e+00 ; [#uses=1]
- %5 = fadd float %1, %iftmp.227.0 ; [#uses=3]
- %6 = load i8* bitcast (i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection to i8*), align 8 ; [#uses=1]
- %7 = icmp eq i8 %6, 0 ; [#uses=1]
- br i1 %7, label %bb.i20, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit23
-
-bb.i20: ; preds = %entry
- %8 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind ; [#uses=1]
- %9 = icmp eq i32 %8, 0 ; [#uses=1]
- br i1 %9, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit23, label %bb1.i21
-
-bb1.i21: ; preds = %bb.i20
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind
- br label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit23
-
-_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit23: ; preds = %bb1.i21, %bb.i20, %entry
- %10 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 28 ; [#uses=4]
- %11 = load i32* %10, align 4 ; [#uses=3]
- %12 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %11, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 8 ; [#uses=1]
- %14 = fmul float %13, %5 ; [#uses=1]
- %15 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %11, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %16, %5 ; [#uses=1]
- %18 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %11, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 16 ; [#uses=1]
- %20 = fmul float %19, %5 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 2 ; [#uses=5]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fadd float %22, %14 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 1 ; [#uses=5]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fadd float %25, %17 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 0 ; [#uses=5]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fadd float %28, %20 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 0 ; [#uses=4]
- store float %29, float* %30, align 4
- %31 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 1 ; [#uses=4]
- store float %26, float* %31, align 4
- %32 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 2 ; [#uses=4]
- store float %23, float* %32, align 4
- %33 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %34, align 8
- %35 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 8
- %37 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 8
- %39 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %39, align 4
- %40 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 8
- %41 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 8
- %43 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- %44 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %44, align 8
- %45 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- %46 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %46, align 8
- %47 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %47, align 4
- %48 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %48, align 8
- %49 = getelementptr inbounds %struct.btTransform* %start, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %49, align 4
- %50 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %50, align 8
- %51 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 4
- %52 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 8
- %53 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 4
- %54 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 8
- %55 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %55, align 4
- %56 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %56, align 8
- %57 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %57, align 4
- %58 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %58, align 8
- %59 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %59, align 4
- %60 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %60, align 8
- %61 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %61, align 4
- %62 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %62, align 8
- %63 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %63, align 4
- %64 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %64, align 8
- %65 = getelementptr inbounds %struct.btTransform* %end, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %65, align 4
- %66 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 3 ; [#uses=3]
- %67 = load %struct.btConvexShape** %66, align 4 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btConvexShape* %67, i32 0, i32 0, i32 0 ; [#uses=1]
- %69 = load i32 (...)*** %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds i32 (...)** %69, i32 11 ; [#uses=1]
- %71 = load i32 (...)** %70, align 4 ; [#uses=1]
- %72 = bitcast i32 (...)* %71 to float (%struct.btConvexShape*)* ; [#uses=1]
- %73 = call float %72(%struct.btConvexShape* %67) ; [#uses=1]
- %74 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 14 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fadd float %73, %75 ; [#uses=3]
- %77 = load i8* bitcast (i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection to i8*), align 8 ; [#uses=1]
- %78 = icmp eq i8 %77, 0 ; [#uses=1]
- br i1 %78, label %bb.i28, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit31
-
-bb.i28: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit23
- %79 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind ; [#uses=1]
- %80 = icmp eq i32 %79, 0 ; [#uses=1]
- br i1 %80, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit31, label %bb1.i29
-
-bb1.i29: ; preds = %bb.i28
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind
- br label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit31
-
-_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit31: ; preds = %bb1.i29, %bb.i28, %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit23
- %81 = load i32* %10, align 4 ; [#uses=3]
- %82 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %81, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 8 ; [#uses=1]
- %84 = fmul float %83, %76 ; [#uses=1]
- %85 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %81, i32 0, i32 1 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = fmul float %86, %76 ; [#uses=1]
- %88 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %81, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 16 ; [#uses=1]
- %90 = fmul float %89, %76 ; [#uses=1]
- %91 = load float* %21, align 4 ; [#uses=1]
- %92 = fadd float %91, %84 ; [#uses=1]
- %93 = load float* %24, align 4 ; [#uses=1]
- %94 = fadd float %93, %87 ; [#uses=1]
- %95 = load float* %27, align 4 ; [#uses=1]
- %96 = fadd float %95, %90 ; [#uses=1]
- store float %96, float* %46, align 8
- store float %94, float* %47, align 4
- store float %92, float* %48, align 8
- store float 0.000000e+00, float* %49, align 4
- %97 = load float* %30, align 4 ; [#uses=1]
- store float %97, float* %62, align 8
- %98 = load float* %31, align 4 ; [#uses=1]
- store float %98, float* %63, align 4
- %99 = load float* %32, align 4 ; [#uses=1]
- store float %99, float* %64, align 8
- %100 = load float* %33, align 4 ; [#uses=1]
- store float %100, float* %65, align 4
- %101 = load i8* bitcast (i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection to i8*), align 8 ; [#uses=1]
- %102 = icmp eq i8 %101, 0 ; [#uses=1]
- br i1 %102, label %bb.i24, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit27
-
-bb.i24: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit31
- %103 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind ; [#uses=1]
- %104 = icmp eq i32 %103, 0 ; [#uses=1]
- br i1 %104, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit27, label %bb1.i25
-
-bb1.i25: ; preds = %bb.i24
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind
- br label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit27
-
-_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit27: ; preds = %bb1.i25, %bb.i24, %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit31
- %105 = load i32* %10, align 4 ; [#uses=3]
- %106 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %105, i32 0, i32 2 ; [#uses=1]
- %107 = load float* %106, align 8 ; [#uses=1]
- %108 = fsub float -0.000000e+00, %107 ; [#uses=1]
- %109 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %105, i32 0, i32 1 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- %111 = fsub float -0.000000e+00, %110 ; [#uses=1]
- %112 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %105, i32 0, i32 0 ; [#uses=1]
- %113 = load float* %112, align 16 ; [#uses=1]
- %114 = fsub float -0.000000e+00, %113 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=1]
- %116 = load %struct.btPairCachingGhostObject** %115, align 4 ; [#uses=3]
- %117 = getelementptr inbounds %struct.btPairCachingGhostObject* %116, i32 0, i32 0, i32 0 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %119 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 1 ; [#uses=3]
- store float 1.000000e+00, float* %119, align 4
- %120 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store i16 1, i16* %120, align 8
- %121 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- store i16 -1, i16* %121, align 2
- %122 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 5 ; [#uses=1]
- %124 = bitcast float* %122 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %124, i8 0, i64 32, i32 4, i1 false) nounwind
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %123, align 4
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV43btKinematicClosestNotMeConvexResultCallback, i32 0, i32 2), i32 (...)*** %118, align 8
- %125 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 1 ; [#uses=1]
- store %struct.btCollisionObject* %117, %struct.btCollisionObject** %125, align 8
- %126 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %114, float* %126, align 4
- %127 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %111, float* %127, align 4
- %128 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %108, float* %128, align 4
- %129 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %129, align 4
- %130 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 3 ; [#uses=1]
- store float 0x3FE6A09020000000, float* %130, align 4
- %131 = getelementptr inbounds %struct.btPairCachingGhostObject* %116, i32 0, i32 0, i32 0, i32 8 ; [#uses=2]
- %132 = load %struct.btBroadphaseProxy** %131, align 4 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btBroadphaseProxy* %132, i32 0, i32 1 ; [#uses=1]
- %134 = load i16* %133, align 4 ; [#uses=1]
- store i16 %134, i16* %120, align 8
- %135 = load %struct.btBroadphaseProxy** %131, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btBroadphaseProxy* %135, i32 0, i32 2 ; [#uses=1]
- %137 = load i16* %136, align 2 ; [#uses=1]
- store i16 %137, i16* %121, align 2
- %138 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 25 ; [#uses=1]
- %139 = load i8* %138, align 2 ; [#uses=1]
- %toBool = icmp eq i8 %139, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb3
-
-bb3: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit27
- %140 = getelementptr inbounds %struct.btCollisionWorld* %world, i32 0, i32 3, i32 9 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = load %struct.btConvexShape** %66, align 4 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btPairCachingGhostObject* %116, i32 0, i32 0 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK13btGhostObject15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RN16btCollisionWorld20ConvexResultCallbackEf(%struct.btGhostObject* %143, %struct.btConvexShape* %142, %struct.btTransform* %start, %struct.btTransform* %end, %"struct.btCollisionWorld::ConvexResultCallback"* %144, float %141)
- to label %bb6 unwind label %lpad
-
-bb4: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit27
- %145 = load %struct.btConvexShape** %66, align 4 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZNK16btCollisionWorld15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RNS_20ConvexResultCallbackEf(%struct.btCollisionWorld* %world, %struct.btConvexShape* %145, %struct.btTransform* %start, %struct.btTransform* %end, %"struct.btCollisionWorld::ConvexResultCallback"* %146, float 0.000000e+00)
- to label %bb6 unwind label %lpad
-
-bb6: ; preds = %bb4, %bb3
- %147 = load float* %119, align 4 ; [#uses=1]
- %148 = fcmp olt float %147, 1.000000e+00 ; [#uses=1]
- br i1 %148, label %bb8, label %bb12
-
-bb8: ; preds = %bb6
- %149 = load i8* bitcast (i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection to i8*), align 8 ; [#uses=1]
- %150 = icmp eq i8 %149, 0 ; [#uses=1]
- br i1 %150, label %bb.i, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
-
-bb.i: ; preds = %bb8
- %151 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind ; [#uses=1]
- %152 = icmp eq i32 %151, 0 ; [#uses=1]
- br i1 %152, label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 0, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 0), align 16
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 1, i32 0, i32 3), align 4
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 0), align 32
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 1), align 4
- store float 1.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds ([3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 2, i32 0, i32 3), align 4
- call void @__cxa_guard_release(i64* @_ZGVZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection) nounwind
- br label %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
-
-_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit: ; preds = %bb1.i, %bb.i, %bb8
- %153 = load i32* %10, align 4 ; [#uses=3]
- %154 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=1]
- %156 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %153, i32 0, i32 0 ; [#uses=1]
- %157 = load float* %156, align 16 ; [#uses=1]
- %158 = fmul float %155, %157 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=1]
- %161 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %153, i32 0, i32 1 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fmul float %160, %162 ; [#uses=1]
- %164 = fadd float %158, %163 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btKinematicClosestNotMeConvexResultCallback* %callback, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = getelementptr inbounds [3 x %struct.btQuadWord]* @_ZZN30btKinematicCharacterController19getUpAxisDirectionsEvE16sUpAxisDirection, i32 0, i32 %153, i32 0, i32 2 ; [#uses=1]
- %168 = load float* %167, align 8 ; [#uses=1]
- %169 = fmul float %166, %168 ; [#uses=1]
- %170 = fadd float %164, %169 ; [#uses=1]
- %171 = fcmp ogt float %170, 0.000000e+00 ; [#uses=1]
- br i1 %171, label %bb10, label %bb11
-
-bb10: ; preds = %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
- %172 = load float* %0, align 4 ; [#uses=1]
- %173 = load float* %119, align 4 ; [#uses=5]
- %174 = fmul float %172, %173 ; [#uses=1]
- %175 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 18 ; [#uses=1]
- store float %174, float* %175, align 4
- %176 = fsub float 1.000000e+00, %173 ; [#uses=3]
- %177 = load float* %27, align 4 ; [#uses=1]
- %178 = fmul float %177, %176 ; [#uses=1]
- %179 = load float* %30, align 4 ; [#uses=1]
- %180 = fmul float %179, %173 ; [#uses=1]
- %181 = fadd float %178, %180 ; [#uses=1]
- store float %181, float* %27, align 4
- %182 = load float* %24, align 4 ; [#uses=1]
- %183 = fmul float %182, %176 ; [#uses=1]
- %184 = load float* %31, align 4 ; [#uses=1]
- %185 = fmul float %184, %173 ; [#uses=1]
- %186 = fadd float %183, %185 ; [#uses=1]
- store float %186, float* %24, align 4
- %187 = load float* %21, align 4 ; [#uses=1]
- %188 = fmul float %187, %176 ; [#uses=1]
- %189 = load float* %32, align 4 ; [#uses=1]
- %190 = fmul float %189, %173 ; [#uses=1]
- %191 = fadd float %188, %190 ; [#uses=1]
- store float %191, float* %21, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %_ZN30btKinematicCharacterController19getUpAxisDirectionsEv.exit
- %192 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %192, align 4
- store float 0.000000e+00, float* %2, align 4
- ret void
-
-bb12: ; preds = %bb6
- %193 = load float* %0, align 4 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 18 ; [#uses=1]
- store float %193, float* %194, align 4
- %195 = load float* %30, align 4 ; [#uses=1]
- store float %195, float* %27, align 4
- %196 = load float* %31, align 4 ; [#uses=1]
- store float %196, float* %24, align 4
- %197 = load float* %32, align 4 ; [#uses=1]
- store float %197, float* %21, align 4
- %198 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 3 ; [#uses=1]
- %199 = load float* %33, align 4 ; [#uses=1]
- store float %199, float* %198, align 4
- ret void
-
-lpad: ; preds = %bb4, %bb3
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select18 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %118, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController10playerStepEP16btCollisionWorldf(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, float %dt) align 2 {
-entry:
- %move = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 26 ; [#uses=2]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBoolnot = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb4
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 27 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fcmp ugt float %3, 0.000000e+00 ; [#uses=1]
- br i1 %4, label %bb4, label %return
-
-bb4: ; preds = %bb, %entry
- %5 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 12 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to i8 (%struct.btKinematicCharacterController*)* ; [#uses=1]
- %10 = call zeroext i8 %9(%struct.btKinematicCharacterController* %this) ; [#uses=1]
- %11 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 23 ; [#uses=1]
- store i8 %10, i8* %11, align 4
- %12 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 4 ; [#uses=4]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 11 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fmul float %15, %dt ; [#uses=1]
- %17 = fsub float %13, %16 ; [#uses=5]
- store float %17, float* %12, align 4
- %18 = fcmp ogt float %17, 0.000000e+00 ; [#uses=1]
- br i1 %18, label %bb5, label %bb7
-
-bb5: ; preds = %bb4
- %19 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 7 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fcmp ogt float %17, %20 ; [#uses=1]
- br i1 %21, label %bb6, label %bb7
-
-bb6: ; preds = %bb5
- store float %20, float* %12, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5, %bb4
- %22 = phi float [ %20, %bb6 ], [ %17, %bb5 ], [ %17, %bb4 ] ; [#uses=4]
- %23 = fcmp uge float %22, 0.000000e+00 ; [#uses=1]
- br i1 %23, label %bb14, label %bb8
-
-bb8: ; preds = %bb7
- %24 = call float @fabsf(float %22) nounwind readnone ; [#uses=1]
- %25 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 6 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = call float @fabsf(float %26) nounwind readnone ; [#uses=2]
- %28 = fcmp ule float %24, %27 ; [#uses=1]
- br i1 %28, label %bb14, label %bb13
-
-bb13: ; preds = %bb8
- %29 = fsub float -0.000000e+00, %27 ; [#uses=2]
- store float %29, float* %12, align 4
- br label %bb14
-
-bb14: ; preds = %bb13, %bb8, %bb7
- %30 = phi float [ %22, %bb7 ], [ %22, %bb8 ], [ %29, %bb13 ] ; [#uses=1]
- %31 = fmul float %30, %dt ; [#uses=1]
- %32 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 5 ; [#uses=1]
- store float %31, float* %32, align 4
- %33 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=2]
- %34 = load %struct.btPairCachingGhostObject** %33, align 4 ; [#uses=12]
- %35 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btPairCachingGhostObject* %34, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- call void @_ZN30btKinematicCharacterController6stepUpEP16btCollisionWorld(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld)
- %59 = load i8* %0, align 1 ; [#uses=1]
- %toBool15 = icmp eq i8 %59, 0 ; [#uses=1]
- br i1 %toBool15, label %bb17, label %bb16
-
-bb16: ; preds = %bb14
- %60 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15 ; [#uses=1]
- call void @_ZN30btKinematicCharacterController20stepForwardAndStrafeEP16btCollisionWorldRK9btVector3(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, %struct.btQuadWord* %60)
- br label %bb21
-
-bb17: ; preds = %bb14
- %61 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 27 ; [#uses=2]
- %62 = load float* %61, align 4 ; [#uses=3]
- %63 = fcmp ule float %62, %dt ; [#uses=1]
- %iftmp.240.0 = select i1 %63, float %62, float %dt ; [#uses=3]
- %64 = fsub float %62, %dt ; [#uses=1]
- store float %64, float* %61, align 4
- %65 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fmul float %66, %iftmp.240.0 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fmul float %69, %iftmp.240.0 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 0 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %72, %iftmp.240.0 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btQuadWord* %move, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %73, float* %74, align 8
- %75 = getelementptr inbounds %struct.btQuadWord* %move, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %70, float* %75, align 4
- %76 = getelementptr inbounds %struct.btQuadWord* %move, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %67, float* %76, align 8
- %77 = getelementptr inbounds %struct.btQuadWord* %move, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %77, align 4
- call void @_ZN30btKinematicCharacterController20stepForwardAndStrafeEP16btCollisionWorldRK9btVector3(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, %struct.btQuadWord* %move)
- br label %bb21
-
-bb21: ; preds = %bb17, %bb16
- call void @_ZN30btKinematicCharacterController8stepDownEP16btCollisionWorldf(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld, float %dt)
- %78 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 0 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = load %struct.btPairCachingGhostObject** %33, align 4 ; [#uses=16]
- %87 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %36, float* %87, align 4
- %88 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %88, align 4
- %89 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %40, float* %89, align 4
- %90 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %42, float* %90, align 4
- %91 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %44, float* %91, align 4
- %92 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %92, align 4
- %93 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %48, float* %93, align 4
- %94 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %50, float* %94, align 4
- %95 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %52, float* %95, align 4
- %96 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %54, float* %96, align 4
- %97 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %56, float* %97, align 4
- %98 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %58, float* %98, align 4
- %99 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %79, float* %99, align 4
- %100 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %81, float* %100, align 4
- %101 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %83, float* %101, align 4
- %102 = getelementptr inbounds %struct.btPairCachingGhostObject* %86, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %85, float* %102, align 4
- ret void
-
-return: ; preds = %bb
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterControllerC2EP24btPairCachingGhostObjectP13btConvexShapefi(%struct.btKinematicCharacterController* %this, %struct.btPairCachingGhostObject* %ghostObject, %struct.btConvexShape* %convexShape, float %stepHeight, i32 %upAxis) nounwind align 2 {
-invcont:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([15 x i32 (...)*]* @_ZTV30btKinematicCharacterController, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 3 ; [#uses=1]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- %3 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 2 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 28 ; [#uses=1]
- store i32 %upAxis, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 14 ; [#uses=1]
- store float 0x3F947AE140000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 25 ; [#uses=1]
- store i8 1, i8* %11, align 2
- %12 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btPairCachingGhostObject* %ghostObject, %struct.btPairCachingGhostObject** %12, align 4
- %13 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 13 ; [#uses=1]
- store float %stepHeight, float* %13, align 4
- %14 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexShape, %struct.btConvexShape** %15, align 4
- %16 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 26 ; [#uses=1]
- store i8 1, i8* %16, align 1
- %17 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 27 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x403D666660000000, float* %20, align 4
- %21 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 6 ; [#uses=1]
- store float 5.500000e+01, float* %21, align 4
- %22 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 7 ; [#uses=1]
- store float 1.000000e+01, float* %22, align 4
- %23 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 23 ; [#uses=1]
- store i8 0, i8* %23, align 4
- %24 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 24 ; [#uses=1]
- store i8 0, i8* %24, align 1
- %25 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 9 ; [#uses=1]
- store float 0x3FE921FB60000000, float* %25, align 4
- %26 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 10 ; [#uses=1]
- store float 0x3FE6A09E60000000, float* %26, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterControllerD1Ev(%struct.btKinematicCharacterController* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([15 x i32 (...)*]* @_ZTV30btKinematicCharacterController, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 3 ; [#uses=3]
- %2 = load %struct.btPersistentManifold*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btPersistentManifold** %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btPersistentManifold** %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %1, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %1, align 4
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterControllerD0Ev(%struct.btKinematicCharacterController* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([15 x i32 (...)*]* @_ZTV30btKinematicCharacterController, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 3 ; [#uses=3]
- %2 = load %struct.btPersistentManifold*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btPersistentManifold** %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btPersistentManifold** %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %1, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %1, align 4
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = bitcast %struct.btKinematicCharacterController* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %10) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN30btKinematicCharacterController7preStepEP16btCollisionWorld(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 21 ; [#uses=2]
- store i8 0, i8* %0, align 4
- br label %bb1
-
-bb: ; preds = %bb1
- %tmp = add i32 %numPenetrationLoops.0, 1 ; [#uses=2]
- store i8 1, i8* %0, align 4
- %1 = icmp sgt i32 %tmp, 4 ; [#uses=1]
- br i1 %1, label %bb2, label %bb1
-
-bb1: ; preds = %bb, %entry
- %numPenetrationLoops.0 = phi i32 [ 0, %entry ], [ %tmp, %bb ] ; [#uses=1]
- %2 = tail call zeroext i8 @_ZN30btKinematicCharacterController22recoverFromPenetrationEP16btCollisionWorld(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld) ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb
-
-bb2: ; preds = %bb1, %bb
- %3 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=1]
- %4 = load %struct.btPairCachingGhostObject** %3, align 4 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btPairCachingGhostObject* %4, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btPairCachingGhostObject* %4, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btPairCachingGhostObject* %4, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 3 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btPairCachingGhostObject* %4, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 0 ; [#uses=1]
- store float %7, float* %17, align 4
- %18 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 1 ; [#uses=1]
- store float %10, float* %18, align 4
- %19 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 2 ; [#uses=1]
- store float %13, float* %19, align 4
- %20 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 19, i32 0, i32 3 ; [#uses=1]
- store float %16, float* %20, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterControllerC1EP24btPairCachingGhostObjectP13btConvexShapefi(%struct.btKinematicCharacterController* %this, %struct.btPairCachingGhostObject* %ghostObject, %struct.btConvexShape* %convexShape, float %stepHeight, i32 %upAxis) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([15 x i32 (...)*]* @_ZTV30btKinematicCharacterController, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 3 ; [#uses=1]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %2, align 4
- %3 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 2 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 28 ; [#uses=1]
- store i32 %upAxis, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 14 ; [#uses=1]
- store float 0x3F947AE140000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 15, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 25 ; [#uses=1]
- store i8 1, i8* %11, align 2
- %12 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btPairCachingGhostObject* %ghostObject, %struct.btPairCachingGhostObject** %12, align 4
- %13 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 13 ; [#uses=1]
- store float %stepHeight, float* %13, align 4
- %14 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 3 ; [#uses=1]
- store %struct.btConvexShape* %convexShape, %struct.btConvexShape** %15, align 4
- %16 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 26 ; [#uses=1]
- store i8 1, i8* %16, align 1
- %17 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 27 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x403D666660000000, float* %20, align 4
- %21 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 6 ; [#uses=1]
- store float 5.500000e+01, float* %21, align 4
- %22 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 7 ; [#uses=1]
- store float 1.000000e+01, float* %22, align 4
- %23 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 23 ; [#uses=1]
- store i8 0, i8* %23, align 4
- %24 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 24 ; [#uses=1]
- store i8 0, i8* %24, align 1
- %25 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 9 ; [#uses=1]
- store float 0x3FE921FB60000000, float* %25, align 4
- %26 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 10 ; [#uses=1]
- store float 0x3FE6A09E60000000, float* %26, align 4
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN30btKinematicCharacterController22recoverFromPenetrationEP16btCollisionWorld(%struct.btKinematicCharacterController* %this, %struct.btCollisionWorld* %collisionWorld) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 2 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btActionInterface* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 8 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btCollisionWorld* %collisionWorld, i32 0, i32 3 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 2 ; [#uses=6]
- %8 = load %struct.btPairCachingGhostObject** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btPairCachingGhostObject* %8, i32 0, i32 1 ; [#uses=1]
- %10 = load %struct.btHashedOverlappingPairCache** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %10, i32 0, i32 0 ; [#uses=1]
- %12 = bitcast i32 (...)* %5 to void (%struct.btActionInterface*, %struct..0btMultiSapOverlapFilterCallback*, %struct.btDispatcherInfo*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %12(%struct.btActionInterface* %1, %struct..0btMultiSapOverlapFilterCallback* %11, %struct.btDispatcherInfo* %6, %struct.btActionInterface* %1)
- %13 = load %struct.btPairCachingGhostObject** %7, align 4 ; [#uses=5]
- %14 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 0 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btPairCachingGhostObject* %13, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 1 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btPairCachingGhostObject* %13, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 2 ; [#uses=4]
- %21 = getelementptr inbounds %struct.btPairCachingGhostObject* %13, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 17, i32 0, i32 3 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btPairCachingGhostObject* %13, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btPairCachingGhostObject* %13, i32 0, i32 1 ; [#uses=1]
- %27 = load %struct.btHashedOverlappingPairCache** %26, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %27, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load i32 (...)*** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 9 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = bitcast i32 (...)* %31 to i32 (%struct.btHashedOverlappingPairCache*)* ; [#uses=1]
- %33 = tail call i32 %32(%struct.btHashedOverlappingPairCache* %27) ; [#uses=1]
- %34 = icmp sgt i32 %33, 0 ; [#uses=1]
- br i1 %34, label %bb.nph56, label %bb19
-
-bb.nph56: ; preds = %entry
- %35 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 1 ; [#uses=3]
- %36 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 3 ; [#uses=5]
- %38 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22, i32 0, i32 1 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22, i32 0, i32 2 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 22, i32 0, i32 3 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 2 ; [#uses=2]
- %43 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb16, %bb.nph56
- %i.055 = phi i32 [ 0, %bb.nph56 ], [ %tmp68, %bb16 ] ; [#uses=2]
- %maxPen.454 = phi float [ 0.000000e+00, %bb.nph56 ], [ %maxPen.3.lcssa, %bb16 ] ; [#uses=2]
- %penetration.353 = phi i8 [ 0, %bb.nph56 ], [ %penetration.2.lcssa, %bb16 ] ; [#uses=2]
- %tmp68 = add i32 %i.055, 1 ; [#uses=2]
- %44 = load i32* %35, align 4 ; [#uses=4]
- %45 = icmp sgt i32 %44, 0 ; [#uses=1]
- %.not = xor i1 %45, true ; [#uses=1]
- %46 = icmp slt i32 %44, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %46 ; [#uses=1]
- br i1 %or.cond, label %bb4.i, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit
-
-bb4.i: ; preds = %bb
- %47 = load i32* %42, align 4 ; [#uses=1]
- %48 = icmp slt i32 %47, 0 ; [#uses=1]
- br i1 %48, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i: ; preds = %bb4.i
- %49 = load %struct.btPersistentManifold*** %37, align 4 ; [#uses=2]
- %50 = icmp eq %struct.btPersistentManifold** %49, null ; [#uses=1]
- br i1 %50, label %bb11.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %51 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %51, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %52 = bitcast %struct.btPersistentManifold** %49 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %52)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %37, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- store i8 1, i8* %43, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %37, align 4
- store i32 0, i32* %42, align 4
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb11.preheader.i, %bb4.i
- %tmp = sub i32 0, %44 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp58 = add i32 %44, %indvar.i ; [#uses=1]
- %53 = load %struct.btPersistentManifold*** %37, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btPersistentManifold** %53, i32 %tmp58 ; [#uses=2]
- %54 = icmp eq %struct.btPersistentManifold** %scevgep, null ; [#uses=1]
- br i1 %54, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %scevgep, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp ; [#uses=1]
- br i1 %exitcond, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit: ; preds = %bb10.i, %bb
- store i32 0, i32* %35, align 4
- %55 = load %struct.btPairCachingGhostObject** %7, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btPairCachingGhostObject* %55, i32 0, i32 1 ; [#uses=1]
- %57 = load %struct.btHashedOverlappingPairCache** %56, align 4 ; [#uses=2]
- %58 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %57, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load i32 (...)*** %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds i32 (...)** %59, i32 7 ; [#uses=1]
- %61 = load i32 (...)** %60, align 4 ; [#uses=1]
- %62 = bitcast i32 (...)* %61 to %"struct.btAlignedObjectArray<btBroadphasePair>"* (%struct.btHashedOverlappingPairCache*)* ; [#uses=1]
- %63 = tail call %"struct.btAlignedObjectArray<btBroadphasePair>"* %62(%struct.btHashedOverlappingPairCache* %57) ; [#uses=1]
- %64 = getelementptr inbounds %"struct.btAlignedObjectArray<btBroadphasePair>"* %63, i32 0, i32 3 ; [#uses=1]
- %65 = load %struct.btBroadphasePair** %64, align 4 ; [#uses=1]
- %scevgep66 = getelementptr %struct.btBroadphasePair* %65, i32 %i.055, i32 2 ; [#uses=1]
- %66 = load %struct.btCollisionAlgorithm** %scevgep66, align 4 ; [#uses=3]
- %67 = icmp eq %struct.btCollisionAlgorithm* %66, null ; [#uses=1]
- br i1 %67, label %bb14.preheader, label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit
- %68 = getelementptr inbounds %struct.btCollisionAlgorithm* %66, i32 0, i32 0 ; [#uses=1]
- %69 = load i32 (...)*** %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds i32 (...)** %69, i32 4 ; [#uses=1]
- %71 = load i32 (...)** %70, align 4 ; [#uses=1]
- %72 = bitcast i32 (...)* %71 to void (%struct.btCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* ; [#uses=1]
- tail call void %72(%struct.btCollisionAlgorithm* %66, %"struct.btAlignedObjectArray<btPersistentManifold*>"* %36)
- br label %bb14.preheader
-
-bb14.preheader: ; preds = %bb1, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit
- %73 = load i32* %35, align 4 ; [#uses=2]
- %74 = icmp sgt i32 %73, 0 ; [#uses=1]
- br i1 %74, label %bb3, label %bb14.preheader.bb16_crit_edge
-
-bb14.preheader.bb16_crit_edge: ; preds = %bb14.preheader
- %.pre = load %struct.btPairCachingGhostObject** %7, align 4 ; [#uses=1]
- br label %bb16
-
-bb3: ; preds = %bb13, %bb14.preheader
- %j.049 = phi i32 [ %tmp65, %bb13 ], [ 0, %bb14.preheader ] ; [#uses=2]
- %maxPen.348 = phi float [ %maxPen.2.lcssa, %bb13 ], [ %maxPen.454, %bb14.preheader ] ; [#uses=2]
- %penetration.247 = phi i8 [ %penetration.1.lcssa, %bb13 ], [ %penetration.353, %bb14.preheader ] ; [#uses=2]
- %tmp65 = add i32 %j.049, 1 ; [#uses=2]
- %75 = load %struct.btPersistentManifold*** %37, align 4 ; [#uses=1]
- %scevgep64 = getelementptr %struct.btPersistentManifold** %75, i32 %j.049 ; [#uses=1]
- %76 = load %struct.btPersistentManifold** %scevgep64, align 4 ; [#uses=6]
- %77 = getelementptr inbounds %struct.btPersistentManifold* %76, i32 0, i32 2 ; [#uses=1]
- %78 = load i8** %77, align 4 ; [#uses=1]
- %79 = load %struct.btPairCachingGhostObject** %7, align 4 ; [#uses=2]
- %80 = bitcast %struct.btPairCachingGhostObject* %79 to i8* ; [#uses=1]
- %81 = icmp eq i8* %78, %80 ; [#uses=1]
- %iftmp.222.0 = select i1 %81, float -1.000000e+00, float 1.000000e+00 ; [#uses=6]
- %82 = getelementptr inbounds %struct.btPersistentManifold* %76, i32 0, i32 4 ; [#uses=2]
- %83 = load i32* %82, align 4 ; [#uses=1]
- %84 = icmp sgt i32 %83, 0 ; [#uses=1]
- br i1 %84, label %bb7, label %bb13
-
-bb7: ; preds = %bb11, %bb3
- %p.045 = phi i32 [ %tmp63, %bb11 ], [ 0, %bb3 ] ; [#uses=5]
- %maxPen.244 = phi float [ %maxPen.1, %bb11 ], [ %maxPen.348, %bb3 ] ; [#uses=3]
- %penetration.143 = phi i8 [ %penetration.0, %bb11 ], [ %penetration.247, %bb3 ] ; [#uses=1]
- %scevgep59 = getelementptr %struct.btPersistentManifold* %76, i32 0, i32 1, i32 %p.045, i32 5 ; [#uses=1]
- %scevgep60 = getelementptr %struct.btPersistentManifold* %76, i32 0, i32 1, i32 %p.045, i32 4, i32 0, i32 2 ; [#uses=2]
- %scevgep61 = getelementptr %struct.btPersistentManifold* %76, i32 0, i32 1, i32 %p.045, i32 4, i32 0, i32 1 ; [#uses=2]
- %scevgep62 = getelementptr %struct.btPersistentManifold* %76, i32 0, i32 1, i32 %p.045, i32 4, i32 0, i32 0 ; [#uses=2]
- %tmp63 = add i32 %p.045, 1 ; [#uses=2]
- %85 = load float* %scevgep59, align 4 ; [#uses=6]
- %86 = fcmp olt float %85, 0.000000e+00 ; [#uses=1]
- br i1 %86, label %bb8, label %bb11
-
-bb8: ; preds = %bb7
- %87 = fcmp olt float %85, %maxPen.244 ; [#uses=1]
- br i1 %87, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- %88 = load float* %scevgep60, align 4 ; [#uses=1]
- %89 = fmul float %88, %iftmp.222.0 ; [#uses=1]
- %90 = load float* %scevgep61, align 4 ; [#uses=1]
- %91 = fmul float %90, %iftmp.222.0 ; [#uses=1]
- %92 = load float* %scevgep62, align 4 ; [#uses=1]
- %93 = fmul float %92, %iftmp.222.0 ; [#uses=1]
- store float %93, float* %38, align 4
- store float %91, float* %39, align 4
- store float %89, float* %40, align 4
- store float 0.000000e+00, float* %41, align 4
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %maxPen.0 = phi float [ %85, %bb9 ], [ %maxPen.244, %bb8 ] ; [#uses=1]
- %94 = load float* %scevgep60, align 4 ; [#uses=1]
- %95 = fmul float %94, %iftmp.222.0 ; [#uses=1]
- %96 = load float* %scevgep61, align 4 ; [#uses=1]
- %97 = fmul float %96, %iftmp.222.0 ; [#uses=1]
- %98 = load float* %scevgep62, align 4 ; [#uses=1]
- %99 = fmul float %98, %iftmp.222.0 ; [#uses=1]
- %100 = fmul float %95, %85 ; [#uses=1]
- %101 = fmul float %97, %85 ; [#uses=1]
- %102 = fmul float %99, %85 ; [#uses=1]
- %103 = fmul float %100, 0x3FC99999A0000000 ; [#uses=1]
- %104 = fmul float %101, 0x3FC99999A0000000 ; [#uses=1]
- %105 = fmul float %102, 0x3FC99999A0000000 ; [#uses=1]
- %106 = load float* %14, align 4 ; [#uses=1]
- %107 = fadd float %106, %105 ; [#uses=1]
- store float %107, float* %14, align 4
- %108 = load float* %17, align 4 ; [#uses=1]
- %109 = fadd float %108, %104 ; [#uses=1]
- store float %109, float* %17, align 4
- %110 = load float* %20, align 4 ; [#uses=1]
- %111 = fadd float %110, %103 ; [#uses=1]
- store float %111, float* %20, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb7
- %penetration.0 = phi i8 [ 1, %bb10 ], [ %penetration.143, %bb7 ] ; [#uses=2]
- %maxPen.1 = phi float [ %maxPen.0, %bb10 ], [ %maxPen.244, %bb7 ] ; [#uses=2]
- %112 = load i32* %82, align 4 ; [#uses=1]
- %113 = icmp sgt i32 %112, %tmp63 ; [#uses=1]
- br i1 %113, label %bb7, label %bb13
-
-bb13: ; preds = %bb11, %bb3
- %maxPen.2.lcssa = phi float [ %maxPen.348, %bb3 ], [ %maxPen.1, %bb11 ] ; [#uses=2]
- %penetration.1.lcssa = phi i8 [ %penetration.247, %bb3 ], [ %penetration.0, %bb11 ] ; [#uses=2]
- %114 = icmp sgt i32 %73, %tmp65 ; [#uses=1]
- br i1 %114, label %bb3, label %bb16
-
-bb16: ; preds = %bb13, %bb14.preheader.bb16_crit_edge
- %115 = phi %struct.btPairCachingGhostObject* [ %.pre, %bb14.preheader.bb16_crit_edge ], [ %79, %bb13 ] ; [#uses=1]
- %maxPen.3.lcssa = phi float [ %maxPen.454, %bb14.preheader.bb16_crit_edge ], [ %maxPen.2.lcssa, %bb13 ] ; [#uses=1]
- %penetration.2.lcssa = phi i8 [ %penetration.353, %bb14.preheader.bb16_crit_edge ], [ %penetration.1.lcssa, %bb13 ] ; [#uses=2]
- %116 = getelementptr inbounds %struct.btPairCachingGhostObject* %115, i32 0, i32 1 ; [#uses=1]
- %117 = load %struct.btHashedOverlappingPairCache** %116, align 4 ; [#uses=2]
- %118 = getelementptr inbounds %struct.btHashedOverlappingPairCache* %117, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %119 = load i32 (...)*** %118, align 4 ; [#uses=1]
- %120 = getelementptr inbounds i32 (...)** %119, i32 9 ; [#uses=1]
- %121 = load i32 (...)** %120, align 4 ; [#uses=1]
- %122 = bitcast i32 (...)* %121 to i32 (%struct.btHashedOverlappingPairCache*)* ; [#uses=1]
- %123 = tail call i32 %122(%struct.btHashedOverlappingPairCache* %117) ; [#uses=1]
- %124 = icmp sgt i32 %123, %tmp68 ; [#uses=1]
- br i1 %124, label %bb, label %bb19
-
-bb19: ; preds = %bb16, %entry
- %penetration.3.lcssa = phi i8 [ 0, %entry ], [ %penetration.2.lcssa, %bb16 ] ; [#uses=1]
- %125 = load %struct.btPairCachingGhostObject** %7, align 4 ; [#uses=16]
- %126 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %127 = load float* %126, align 4 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %129 = load float* %128, align 4 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %133 = load float* %132, align 4 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %137 = load float* %136, align 4 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %139 = load float* %138, align 4 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %143 = load float* %142, align 4 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %147 = load float* %146, align 4 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %149 = load float* %148, align 4 ; [#uses=1]
- %150 = load float* %14, align 4 ; [#uses=1]
- %151 = load float* %17, align 4 ; [#uses=1]
- %152 = load float* %20, align 4 ; [#uses=1]
- %153 = load float* %23, align 4 ; [#uses=1]
- store float %127, float* %126, align 4
- store float %129, float* %128, align 4
- store float %131, float* %130, align 4
- store float %133, float* %132, align 4
- store float %135, float* %134, align 4
- store float %137, float* %136, align 4
- store float %139, float* %138, align 4
- store float %141, float* %140, align 4
- store float %143, float* %142, align 4
- store float %145, float* %144, align 4
- store float %147, float* %146, align 4
- store float %149, float* %148, align 4
- %154 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %150, float* %154, align 4
- %155 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %151, float* %155, align 4
- %156 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %152, float* %156, align 4
- %157 = getelementptr inbounds %struct.btPairCachingGhostObject* %125, i32 0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %153, float* %157, align 4
- ret i8 %penetration.3.lcssa
-}
-
-; [#uses=0]
-define void @_ZN30btKinematicCharacterControllerD2Ev(%struct.btKinematicCharacterController* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([15 x i32 (...)*]* @_ZTV30btKinematicCharacterController, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 3 ; [#uses=3]
- %2 = load %struct.btPersistentManifold*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btPersistentManifold** %2, null ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btPersistentManifold** %2 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %6)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %1, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %1, align 4
- %8 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btKinematicCharacterController* %this, i32 0, i32 20, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraintC2ER11btRigidBodyS1_RK11btTransformS4_(%struct.btConeTwistConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %rbAFrame, %struct.btTransform* nocapture %rbBFrame) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 5, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV21btConeTwistConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- store float %88, float* %86, align 4
- %89 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- store float %91, float* %89, align 4
- %92 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- store float %94, float* %92, align 4
- %95 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- store float %97, float* %95, align 4
- %98 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store i8 0, i8* %99, align 4
- %100 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 32 ; [#uses=1]
- %101 = bitcast i8* %98 to i32* ; [#uses=1]
- store i32 0, i32* %101, align 4
- store float -1.000000e+00, float* %100, align 4
- %102 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %102, align 4
- %103 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %103, align 4
- %104 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %104, align 4
- %105 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %105, align 4
- %106 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float 0x3FD3333340000000, float* %106, align 4
- %107 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float 1.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3F847AE140000000, float* %108, align 4
- %109 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x3FA99999A0000000, float* %109, align 4
- %110 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=1]
- store i32 0, i32* %110, align 4
- %111 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 35 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- %112 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store float 0x3FE6666660000000, float* %112, align 4
- %113 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 4
- ret void
-}
-
-; [#uses=8]
-define linkonce_odr void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %this, %struct.btMatrix3x3* nocapture %world2A, %struct.btMatrix3x3* nocapture %world2B, %struct.btQuadWord* nocapture %rel_pos1, %struct.btQuadWord* nocapture %rel_pos2, %struct.btQuadWord* nocapture %jointAxis, %struct.btQuadWord* nocapture %inertiaInvA, float %massInvA, %struct.btQuadWord* nocapture %inertiaInvB, float %massInvB) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %jointAxis, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=4]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %jointAxis, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=4]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %jointAxis, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %jointAxis, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fmul float %13, %5 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fmul float %16, %2 ; [#uses=1]
- %18 = fsub float %14, %17 ; [#uses=3]
- %19 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fmul float %20, %2 ; [#uses=1]
- %22 = fmul float %13, %8 ; [#uses=1]
- %23 = fsub float %21, %22 ; [#uses=3]
- %24 = fmul float %16, %8 ; [#uses=1]
- %25 = fmul float %20, %5 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %28, %26 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = fmul float %31, %23 ; [#uses=1]
- %33 = fadd float %29, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fmul float %35, %18 ; [#uses=1]
- %37 = fadd float %33, %36 ; [#uses=3]
- %38 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %26 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fmul float %42, %23 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, %18 ; [#uses=1]
- %48 = fadd float %44, %47 ; [#uses=3]
- %49 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %50, %26 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = fmul float %53, %23 ; [#uses=1]
- %55 = fadd float %51, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btMatrix3x3* %world2A, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fmul float %57, %18 ; [#uses=1]
- %59 = fadd float %55, %58 ; [#uses=3]
- %60 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %59, float* %60, align 4
- %61 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %48, float* %61, align 4
- %62 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %37, float* %62, align 4
- %63 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %63, align 4
- %64 = fsub float -0.000000e+00, %8 ; [#uses=2]
- %65 = fsub float -0.000000e+00, %5 ; [#uses=2]
- %66 = fsub float -0.000000e+00, %2 ; [#uses=2]
- %67 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=2]
- %69 = fmul float %68, %65 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 1 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=2]
- %72 = fmul float %71, %66 ; [#uses=1]
- %73 = fsub float %69, %72 ; [#uses=3]
- %74 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 2 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=2]
- %76 = fmul float %75, %66 ; [#uses=1]
- %77 = fmul float %68, %64 ; [#uses=1]
- %78 = fsub float %76, %77 ; [#uses=3]
- %79 = fmul float %71, %64 ; [#uses=1]
- %80 = fmul float %75, %65 ; [#uses=1]
- %81 = fsub float %79, %80 ; [#uses=3]
- %82 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fmul float %83, %81 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = fmul float %86, %78 ; [#uses=1]
- %88 = fadd float %84, %87 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = fmul float %90, %73 ; [#uses=1]
- %92 = fadd float %88, %91 ; [#uses=3]
- %93 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %94, %81 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- %98 = fmul float %97, %78 ; [#uses=1]
- %99 = fadd float %95, %98 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = fmul float %101, %73 ; [#uses=1]
- %103 = fadd float %99, %102 ; [#uses=3]
- %104 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %105, %81 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = fmul float %108, %78 ; [#uses=1]
- %110 = fadd float %106, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btMatrix3x3* %world2B, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fmul float %112, %73 ; [#uses=1]
- %114 = fadd float %110, %113 ; [#uses=3]
- %115 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %114, float* %115, align 4
- %116 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %103, float* %116, align 4
- %117 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %92, float* %117, align 4
- %118 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %118, align 4
- %119 = getelementptr inbounds %struct.btQuadWord* %inertiaInvA, i32 0, i32 0, i32 2 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fmul float %120, %37 ; [#uses=2]
- %122 = getelementptr inbounds %struct.btQuadWord* %inertiaInvA, i32 0, i32 0, i32 1 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = fmul float %123, %48 ; [#uses=2]
- %125 = getelementptr inbounds %struct.btQuadWord* %inertiaInvA, i32 0, i32 0, i32 0 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- %127 = fmul float %126, %59 ; [#uses=2]
- %128 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %127, float* %128, align 4
- %129 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %124, float* %129, align 4
- %130 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %121, float* %130, align 4
- %131 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %131, align 4
- %132 = getelementptr inbounds %struct.btQuadWord* %inertiaInvB, i32 0, i32 0, i32 2 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- %134 = fmul float %133, %92 ; [#uses=2]
- %135 = getelementptr inbounds %struct.btQuadWord* %inertiaInvB, i32 0, i32 0, i32 1 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- %137 = fmul float %136, %103 ; [#uses=2]
- %138 = getelementptr inbounds %struct.btQuadWord* %inertiaInvB, i32 0, i32 0, i32 0 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=1]
- %140 = fmul float %139, %114 ; [#uses=2]
- %141 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %140, float* %141, align 4
- %142 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %137, float* %142, align 4
- %143 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %134, float* %143, align 4
- %144 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %144, align 4
- %145 = fmul float %127, %59 ; [#uses=1]
- %146 = fmul float %124, %48 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=1]
- %148 = fmul float %121, %37 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fadd float %149, %massInvA ; [#uses=1]
- %151 = fadd float %150, %massInvB ; [#uses=1]
- %152 = fmul float %140, %114 ; [#uses=1]
- %153 = fmul float %137, %103 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %134, %92 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- %157 = fadd float %151, %156 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btJacobianEntry* %this, i32 0, i32 5 ; [#uses=1]
- store float %157, float* %158, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK21btConeTwistConstraint28calculateSerializeBufferSizeEv(%struct.btConeTwistConstraint* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 204
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraint4initEv(%struct.btConeTwistConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store i8 0, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store i8 0, i8* %1, align 1
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=1]
- store i8 0, i8* %2, align 2
- %3 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store i8 0, i8* %3, align 4
- %4 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 32 ; [#uses=1]
- store float -1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %6, align 4
- %7 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %7, align 4
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float 0x3FD3333340000000, float* %9, align 4
- %10 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float 1.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3F847AE140000000, float* %11, align 4
- %12 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x3FA99999A0000000, float* %12, align 4
- %13 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=1]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 35 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store float 0x3FE6666660000000, float* %15, align 4
- %16 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraint18getInfo1NonVirtualEPN17btTypedConstraint17btConstraintInfo1E(%struct.btConeTwistConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=1]
- store i32 6, i32* %0, align 4
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %1, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraint9updateRHSEf(%struct.btConeTwistConstraint* nocapture %this, float %timeStep) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraint8setParamEifi(%struct.btConeTwistConstraint* nocapture %this, i32 %num, float %value, i32 %axis) nounwind align 2 {
-entry:
- switch i32 %num, label %return [
- i32 1, label %bb
- i32 2, label %bb
- i32 3, label %bb3
- i32 4, label %bb3
- ]
-
-bb: ; preds = %entry, %entry
- %0 = icmp ult i32 %axis, 3 ; [#uses=1]
- br i1 %0, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %1 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store float %value, float* %1, align 4
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = or i32 %3, 2 ; [#uses=1]
- store i32 %4, i32* %2, align 4
- ret void
-
-bb2: ; preds = %bb
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float %value, float* %5, align 4
- ret void
-
-bb3: ; preds = %entry, %entry
- %6 = icmp ult i32 %axis, 3 ; [#uses=1]
- br i1 %6, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %7 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 35 ; [#uses=1]
- store float %value, float* %7, align 4
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=2]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = or i32 %9, 1 ; [#uses=1]
- store i32 %10, i32* %8, align 4
- ret void
-
-bb5: ; preds = %bb3
- %11 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- store float %value, float* %11, align 4
- %12 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = or i32 %13, 4 ; [#uses=1]
- store i32 %14, i32* %12, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK21btConeTwistConstraint8getParamEii(%struct.btConeTwistConstraint* nocapture %this, i32 %num, i32 %axis) nounwind readonly align 2 {
-entry:
- switch i32 %num, label %bb8 [
- i32 1, label %bb
- i32 2, label %bb
- i32 3, label %bb4
- i32 4, label %bb4
- ]
-
-bb: ; preds = %entry, %entry
- %0 = icmp ult i32 %axis, 3 ; [#uses=1]
- br i1 %0, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %1 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 36 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- ret float %2
-
-bb2: ; preds = %bb
- %3 = add i32 %axis, -3 ; [#uses=1]
- %4 = icmp ult i32 %3, 3 ; [#uses=1]
- br i1 %4, label %bb3, label %bb8
-
-bb3: ; preds = %bb2
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- ret float %6
-
-bb4: ; preds = %entry, %entry
- %7 = icmp ult i32 %axis, 3 ; [#uses=1]
- br i1 %7, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 35 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- ret float %9
-
-bb6: ; preds = %bb4
- %10 = add i32 %axis, -3 ; [#uses=1]
- %11 = icmp ult i32 %10, 3 ; [#uses=1]
- br i1 %11, label %bb7, label %bb8
-
-bb7: ; preds = %bb6
- %12 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- ret float %13
-
-bb8: ; preds = %bb6, %bb2, %entry
- ret float 0.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK21btConeTwistConstraint9serializeEPvP12btSerializer(%struct.btConeTwistConstraint* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer(%struct.btTypedConstraint* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %scevgep.i.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %scevgep.1.i.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i = getelementptr i8* %dataBuffer, i32 48 ; [#uses=1]
- %3 = bitcast i8* %scevgep4.1.i.i.i to float* ; [#uses=1]
- %scevgep.2.i.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i = getelementptr i8* %dataBuffer, i32 52 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.2.i.i.i to float* ; [#uses=1]
- %scevgep.3.i.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i = getelementptr i8* %dataBuffer, i32 56 ; [#uses=1]
- %5 = bitcast i8* %scevgep4.3.i.i.i to float* ; [#uses=1]
- %6 = load float* %scevgep.i.i.i, align 4 ; [#uses=1]
- store float %6, float* %scevgep4.i.i.i, align 4
- %7 = load float* %scevgep.1.i.i.i, align 4 ; [#uses=1]
- store float %7, float* %3, align 4
- %8 = load float* %scevgep.2.i.i.i, align 4 ; [#uses=1]
- store float %8, float* %4, align 4
- %9 = load float* %scevgep.3.i.i.i, align 4 ; [#uses=1]
- store float %9, float* %5, align 4
- %scevgep.i.1.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i = getelementptr i8* %dataBuffer, i32 60 ; [#uses=1]
- %10 = bitcast i8* %scevgep4.i.1.i.i to float* ; [#uses=1]
- %scevgep.1.i.1.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i = getelementptr i8* %dataBuffer, i32 64 ; [#uses=1]
- %11 = bitcast i8* %scevgep4.1.i.1.i.i to float* ; [#uses=1]
- %scevgep.2.i.1.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i = getelementptr i8* %dataBuffer, i32 68 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.2.i.1.i.i to float* ; [#uses=1]
- %scevgep.3.i.1.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i = getelementptr i8* %dataBuffer, i32 72 ; [#uses=1]
- %13 = bitcast i8* %scevgep4.3.i.1.i.i to float* ; [#uses=1]
- %14 = load float* %scevgep.i.1.i.i, align 4 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = load float* %scevgep.1.i.1.i.i, align 4 ; [#uses=1]
- store float %15, float* %11, align 4
- %16 = load float* %scevgep.2.i.1.i.i, align 4 ; [#uses=1]
- store float %16, float* %12, align 4
- %17 = load float* %scevgep.3.i.1.i.i, align 4 ; [#uses=1]
- store float %17, float* %13, align 4
- %scevgep.i.2.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i = getelementptr i8* %dataBuffer, i32 76 ; [#uses=1]
- %18 = bitcast i8* %scevgep4.i.2.i.i to float* ; [#uses=1]
- %scevgep.1.i.2.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i = getelementptr i8* %dataBuffer, i32 80 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.1.i.2.i.i to float* ; [#uses=1]
- %scevgep.2.i.2.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i = getelementptr i8* %dataBuffer, i32 84 ; [#uses=1]
- %20 = bitcast i8* %scevgep4.2.i.2.i.i to float* ; [#uses=1]
- %scevgep.3.i.2.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i = getelementptr i8* %dataBuffer, i32 88 ; [#uses=1]
- %21 = bitcast i8* %scevgep4.3.i.2.i.i to float* ; [#uses=1]
- %22 = load float* %scevgep.i.2.i.i, align 4 ; [#uses=1]
- store float %22, float* %18, align 4
- %23 = load float* %scevgep.1.i.2.i.i, align 4 ; [#uses=1]
- store float %23, float* %19, align 4
- %24 = load float* %scevgep.2.i.2.i.i, align 4 ; [#uses=1]
- store float %24, float* %20, align 4
- %25 = load float* %scevgep.3.i.2.i.i, align 4 ; [#uses=1]
- store float %25, float* %21, align 4
- %scevgep.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = getelementptr i8* %dataBuffer, i32 92 ; [#uses=1]
- %26 = bitcast i8* %scevgep4.i.i to float* ; [#uses=1]
- %27 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %27, float* %26, align 4
- %scevgep.1.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 96 ; [#uses=1]
- %28 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %29 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %29, float* %28, align 4
- %scevgep.2.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 100 ; [#uses=1]
- %30 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %31 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %31, float* %30, align 4
- %scevgep.3.i.i = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 104 ; [#uses=1]
- %32 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %33 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %33, float* %32, align 4
- %34 = getelementptr inbounds i8* %dataBuffer, i32 108 ; [#uses=1]
- %scevgep.i.i.i2 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i3 = bitcast i8* %34 to float* ; [#uses=1]
- %scevgep.1.i.i.i4 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i5 = getelementptr i8* %dataBuffer, i32 112 ; [#uses=1]
- %35 = bitcast i8* %scevgep4.1.i.i.i5 to float* ; [#uses=1]
- %scevgep.2.i.i.i6 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i7 = getelementptr i8* %dataBuffer, i32 116 ; [#uses=1]
- %36 = bitcast i8* %scevgep4.2.i.i.i7 to float* ; [#uses=1]
- %scevgep.3.i.i.i8 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i9 = getelementptr i8* %dataBuffer, i32 120 ; [#uses=1]
- %37 = bitcast i8* %scevgep4.3.i.i.i9 to float* ; [#uses=1]
- %38 = load float* %scevgep.i.i.i2, align 4 ; [#uses=1]
- store float %38, float* %scevgep4.i.i.i3, align 4
- %39 = load float* %scevgep.1.i.i.i4, align 4 ; [#uses=1]
- store float %39, float* %35, align 4
- %40 = load float* %scevgep.2.i.i.i6, align 4 ; [#uses=1]
- store float %40, float* %36, align 4
- %41 = load float* %scevgep.3.i.i.i8, align 4 ; [#uses=1]
- store float %41, float* %37, align 4
- %scevgep.i.1.i.i10 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i11 = getelementptr i8* %dataBuffer, i32 124 ; [#uses=1]
- %42 = bitcast i8* %scevgep4.i.1.i.i11 to float* ; [#uses=1]
- %scevgep.1.i.1.i.i12 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i13 = getelementptr i8* %dataBuffer, i32 128 ; [#uses=1]
- %43 = bitcast i8* %scevgep4.1.i.1.i.i13 to float* ; [#uses=1]
- %scevgep.2.i.1.i.i14 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i15 = getelementptr i8* %dataBuffer, i32 132 ; [#uses=1]
- %44 = bitcast i8* %scevgep4.2.i.1.i.i15 to float* ; [#uses=1]
- %scevgep.3.i.1.i.i16 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i17 = getelementptr i8* %dataBuffer, i32 136 ; [#uses=1]
- %45 = bitcast i8* %scevgep4.3.i.1.i.i17 to float* ; [#uses=1]
- %46 = load float* %scevgep.i.1.i.i10, align 4 ; [#uses=1]
- store float %46, float* %42, align 4
- %47 = load float* %scevgep.1.i.1.i.i12, align 4 ; [#uses=1]
- store float %47, float* %43, align 4
- %48 = load float* %scevgep.2.i.1.i.i14, align 4 ; [#uses=1]
- store float %48, float* %44, align 4
- %49 = load float* %scevgep.3.i.1.i.i16, align 4 ; [#uses=1]
- store float %49, float* %45, align 4
- %scevgep.i.2.i.i18 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i19 = getelementptr i8* %dataBuffer, i32 140 ; [#uses=1]
- %50 = bitcast i8* %scevgep4.i.2.i.i19 to float* ; [#uses=1]
- %scevgep.1.i.2.i.i20 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i21 = getelementptr i8* %dataBuffer, i32 144 ; [#uses=1]
- %51 = bitcast i8* %scevgep4.1.i.2.i.i21 to float* ; [#uses=1]
- %scevgep.2.i.2.i.i22 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i23 = getelementptr i8* %dataBuffer, i32 148 ; [#uses=1]
- %52 = bitcast i8* %scevgep4.2.i.2.i.i23 to float* ; [#uses=1]
- %scevgep.3.i.2.i.i24 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i25 = getelementptr i8* %dataBuffer, i32 152 ; [#uses=1]
- %53 = bitcast i8* %scevgep4.3.i.2.i.i25 to float* ; [#uses=1]
- %54 = load float* %scevgep.i.2.i.i18, align 4 ; [#uses=1]
- store float %54, float* %50, align 4
- %55 = load float* %scevgep.1.i.2.i.i20, align 4 ; [#uses=1]
- store float %55, float* %51, align 4
- %56 = load float* %scevgep.2.i.2.i.i22, align 4 ; [#uses=1]
- store float %56, float* %52, align 4
- %57 = load float* %scevgep.3.i.2.i.i24, align 4 ; [#uses=1]
- store float %57, float* %53, align 4
- %scevgep.i.i26 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i27 = getelementptr i8* %dataBuffer, i32 156 ; [#uses=1]
- %58 = bitcast i8* %scevgep4.i.i27 to float* ; [#uses=1]
- %59 = load float* %scevgep.i.i26, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %scevgep.1.i.i28 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i29 = getelementptr i8* %dataBuffer, i32 160 ; [#uses=1]
- %60 = bitcast i8* %scevgep4.1.i.i29 to float* ; [#uses=1]
- %61 = load float* %scevgep.1.i.i28, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %scevgep.2.i.i30 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i31 = getelementptr i8* %dataBuffer, i32 164 ; [#uses=1]
- %62 = bitcast i8* %scevgep4.2.i.i31 to float* ; [#uses=1]
- %63 = load float* %scevgep.2.i.i30, align 4 ; [#uses=1]
- store float %63, float* %62, align 4
- %scevgep.3.i.i32 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i33 = getelementptr i8* %dataBuffer, i32 168 ; [#uses=1]
- %64 = bitcast i8* %scevgep4.3.i.i33 to float* ; [#uses=1]
- %65 = load float* %scevgep.3.i.i32, align 4 ; [#uses=1]
- store float %65, float* %64, align 4
- %66 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds i8* %dataBuffer, i32 172 ; [#uses=1]
- %69 = bitcast i8* %68 to float* ; [#uses=1]
- store float %67, float* %69, align 4
- %70 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds i8* %dataBuffer, i32 176 ; [#uses=1]
- %73 = bitcast i8* %72 to float* ; [#uses=1]
- store float %71, float* %73, align 4
- %74 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds i8* %dataBuffer, i32 180 ; [#uses=1]
- %77 = bitcast i8* %76 to float* ; [#uses=1]
- store float %75, float* %77, align 4
- %78 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 4 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds i8* %dataBuffer, i32 184 ; [#uses=1]
- %81 = bitcast i8* %80 to float* ; [#uses=1]
- store float %79, float* %81, align 4
- %82 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = getelementptr inbounds i8* %dataBuffer, i32 188 ; [#uses=1]
- %85 = bitcast i8* %84 to float* ; [#uses=1]
- store float %83, float* %85, align 4
- %86 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds i8* %dataBuffer, i32 192 ; [#uses=1]
- %89 = bitcast i8* %88 to float* ; [#uses=1]
- store float %87, float* %89, align 4
- %90 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = getelementptr inbounds i8* %dataBuffer, i32 196 ; [#uses=1]
- %93 = bitcast i8* %92 to float* ; [#uses=1]
- store float %91, float* %93, align 4
- ret i8* getelementptr inbounds ([26 x i8]* @.str13, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btConeTwistConstraintD0Ev(%struct.btConeTwistConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV21btConeTwistConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btConeTwistConstraint* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btConeTwistConstraintD1Ev(%struct.btConeTwistConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV21btConeTwistConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraint13buildJacobianEv(%struct.btConeTwistConstraint* %this) nounwind align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %3 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %normal = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=21]
- %4 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 25 ; [#uses=1]
- %5 = load i8* %4, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 33, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 33, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 33, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 33, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool1not = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool1not, label %bb8, label %bb19
-
-bb8: ; preds = %bb
- %15 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=2]
- %16 = load %struct.btRigidBody** %15, align 4 ; [#uses=12]
- %17 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = fmul float %23, %25 ; [#uses=1]
- %27 = fadd float %21, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = fmul float %29, %31 ; [#uses=1]
- %33 = fadd float %27, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fadd float %33, %35 ; [#uses=2]
- %37 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %38, %20 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fmul float %41, %25 ; [#uses=1]
- %43 = fadd float %39, %42 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fmul float %45, %31 ; [#uses=1]
- %47 = fadd float %43, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %47, %49 ; [#uses=2]
- %51 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fmul float %52, %20 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %55, %25 ; [#uses=1]
- %57 = fadd float %53, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = fmul float %59, %31 ; [#uses=1]
- %61 = fadd float %57, %60 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btRigidBody* %16, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = fadd float %61, %63 ; [#uses=2]
- %65 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=2]
- %66 = load %struct.btRigidBody** %65, align 4 ; [#uses=12]
- %67 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=3]
- %71 = fmul float %68, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=3]
- %76 = fmul float %73, %75 ; [#uses=1]
- %77 = fadd float %71, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=3]
- %82 = fmul float %79, %81 ; [#uses=1]
- %83 = fadd float %77, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fadd float %83, %85 ; [#uses=2]
- %87 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fmul float %88, %70 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %91, %75 ; [#uses=1]
- %93 = fadd float %89, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fmul float %95, %81 ; [#uses=1]
- %97 = fadd float %93, %96 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fadd float %97, %99 ; [#uses=2]
- %101 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fmul float %102, %70 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %105, %75 ; [#uses=1]
- %107 = fadd float %103, %106 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %81 ; [#uses=1]
- %111 = fadd float %107, %110 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %113 = load float* %112, align 4 ; [#uses=1]
- %114 = fadd float %111, %113 ; [#uses=2]
- %115 = fsub float %86, %36 ; [#uses=3]
- %116 = fsub float %100, %50 ; [#uses=3]
- %117 = fsub float %114, %64 ; [#uses=3]
- %118 = fmul float %117, %117 ; [#uses=1]
- %119 = fmul float %116, %116 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %115, %115 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=2]
- %123 = fcmp ogt float %122, 0x3E80000000000000 ; [#uses=1]
- br i1 %123, label %bb10, label %bb11
-
-bb10: ; preds = %bb8
- %124 = call float @sqrtf(float %122) nounwind readonly ; [#uses=1]
- %125 = fdiv float 1.000000e+00, %124 ; [#uses=3]
- %126 = fmul float %115, %125 ; [#uses=2]
- %127 = fmul float %116, %125 ; [#uses=2]
- %128 = fmul float %117, %125 ; [#uses=2]
- %129 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %128, float* %129, align 8
- %130 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %127, float* %130, align 4
- %131 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %126, float* %131, align 8
- %132 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %132, align 4
- br label %bb12
-
-bb11: ; preds = %bb8
- %133 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %133, align 8
- %134 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- %135 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %135, align 8
- %136 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %136, align 4
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10
- %137 = phi float [ 1.000000e+00, %bb11 ], [ %128, %bb10 ] ; [#uses=5]
- %138 = phi float [ 0.000000e+00, %bb11 ], [ %127, %bb10 ] ; [#uses=6]
- %139 = phi float [ 0.000000e+00, %bb11 ], [ %126, %bb10 ] ; [#uses=6]
- %140 = call float @fabsf(float %139) nounwind readnone ; [#uses=1]
- %141 = fcmp ogt float %140, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %141, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb12
- %142 = fmul float %138, %138 ; [#uses=1]
- %143 = fmul float %139, %139 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=2]
- %145 = call float @sqrtf(float %144) nounwind readonly ; [#uses=1]
- %146 = fdiv float 1.000000e+00, %145 ; [#uses=3]
- %147 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %147, align 8
- %148 = fsub float -0.000000e+00, %139 ; [#uses=1]
- %149 = fmul float %146, %148 ; [#uses=2]
- %150 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %149, float* %150, align 4
- %151 = fmul float %138, %146 ; [#uses=2]
- %152 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %151, float* %152, align 8
- %153 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %154 = fmul float %144, %146 ; [#uses=1]
- store float %154, float* %153, align 8
- %155 = fsub float -0.000000e+00, %137 ; [#uses=1]
- %156 = fmul float %151, %155 ; [#uses=1]
- %157 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %156, float* %157, align 4
- %158 = fmul float %137, %149 ; [#uses=1]
- %159 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %158, float* %159, align 8
- br label %bb.nph
-
-bb1.i: ; preds = %bb12
- %160 = fmul float %137, %137 ; [#uses=1]
- %161 = fmul float %138, %138 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=2]
- %163 = call float @sqrtf(float %162) nounwind readonly ; [#uses=1]
- %164 = fdiv float 1.000000e+00, %163 ; [#uses=3]
- %165 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %166 = fsub float -0.000000e+00, %138 ; [#uses=1]
- %167 = fmul float %164, %166 ; [#uses=2]
- store float %167, float* %165, align 8
- %168 = fmul float %137, %164 ; [#uses=2]
- %169 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %168, float* %169, align 4
- %170 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %170, align 8
- %171 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %172 = fsub float -0.000000e+00, %139 ; [#uses=1]
- %173 = fmul float %168, %172 ; [#uses=1]
- store float %173, float* %171, align 8
- %174 = fmul float %139, %167 ; [#uses=1]
- %175 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %174, float* %175, align 4
- %176 = fmul float %162, %164 ; [#uses=1]
- %177 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %176, float* %177, align 8
- br label %bb.nph
-
-bb.nph: ; preds = %bb1.i, %bb.i
- %178 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %182 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %207 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb17, %bb.nph
- %i.036 = phi i32 [ 0, %bb.nph ], [ %273, %bb17 ] ; [#uses=3]
- %scevgep39 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 1, i32 %i.036 ; [#uses=2]
- %210 = load %struct.btRigidBody** %15, align 4 ; [#uses=14]
- %211 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %213 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %215 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %216 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %217 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=1]
- store float %220, float* %178, align 8
- %221 = load float* %218, align 4 ; [#uses=1]
- store float %221, float* %179, align 4
- %222 = load float* %217, align 4 ; [#uses=1]
- store float %222, float* %180, align 8
- store float 0.000000e+00, float* %181, align 4
- %223 = load float* %216, align 4 ; [#uses=1]
- store float %223, float* %182, align 8
- %224 = load float* %215, align 4 ; [#uses=1]
- store float %224, float* %183, align 4
- %225 = load float* %214, align 4 ; [#uses=1]
- store float %225, float* %184, align 8
- store float 0.000000e+00, float* %185, align 4
- %226 = load float* %213, align 4 ; [#uses=1]
- store float %226, float* %186, align 8
- %227 = load float* %212, align 4 ; [#uses=1]
- store float %227, float* %187, align 4
- %228 = load float* %211, align 4 ; [#uses=1]
- store float %228, float* %188, align 8
- store float 0.000000e+00, float* %189, align 4
- %229 = load %struct.btRigidBody** %65, align 4 ; [#uses=14]
- %230 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %231 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %232 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %233 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %234 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %235 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %236 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %237 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %238 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %239 = load float* %238, align 4 ; [#uses=1]
- store float %239, float* %190, align 8
- %240 = load float* %237, align 4 ; [#uses=1]
- store float %240, float* %191, align 4
- %241 = load float* %236, align 4 ; [#uses=1]
- store float %241, float* %192, align 8
- store float 0.000000e+00, float* %193, align 4
- %242 = load float* %235, align 4 ; [#uses=1]
- store float %242, float* %194, align 8
- %243 = load float* %234, align 4 ; [#uses=1]
- store float %243, float* %195, align 4
- %244 = load float* %233, align 4 ; [#uses=1]
- store float %244, float* %196, align 8
- store float 0.000000e+00, float* %197, align 4
- %245 = load float* %232, align 4 ; [#uses=1]
- store float %245, float* %198, align 8
- %246 = load float* %231, align 4 ; [#uses=1]
- store float %246, float* %199, align 4
- %247 = load float* %230, align 4 ; [#uses=1]
- store float %247, float* %200, align 8
- store float 0.000000e+00, float* %201, align 4
- %248 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %249 = load float* %248, align 4 ; [#uses=1]
- %250 = fsub float %36, %249 ; [#uses=1]
- %251 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %252 = load float* %251, align 4 ; [#uses=1]
- %253 = fsub float %50, %252 ; [#uses=1]
- %254 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=1]
- %256 = fsub float %64, %255 ; [#uses=1]
- store float %256, float* %202, align 8
- store float %253, float* %203, align 4
- store float %250, float* %204, align 8
- store float 0.000000e+00, float* %205, align 4
- %257 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %258 = load float* %257, align 4 ; [#uses=1]
- %259 = fsub float %86, %258 ; [#uses=1]
- %260 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %261 = load float* %260, align 4 ; [#uses=1]
- %262 = fsub float %100, %261 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %264 = load float* %263, align 4 ; [#uses=1]
- %265 = fsub float %114, %264 ; [#uses=1]
- store float %265, float* %206, align 8
- store float %262, float* %207, align 4
- store float %259, float* %208, align 8
- store float 0.000000e+00, float* %209, align 4
- %266 = icmp eq %struct.btJacobianEntry* %scevgep39, null ; [#uses=1]
- br i1 %266, label %bb17, label %bb15
-
-bb15: ; preds = %bb14
- %scevgep = getelementptr [3 x %struct.btQuadWord]* %normal, i32 0, i32 %i.036 ; [#uses=1]
- %267 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 4 ; [#uses=1]
- %268 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 4 ; [#uses=1]
- %269 = load float* %267, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btRigidBody* %229, i32 0, i32 8 ; [#uses=1]
- %271 = load float* %268, align 4 ; [#uses=1]
- %272 = getelementptr inbounds %struct.btRigidBody* %210, i32 0, i32 8 ; [#uses=1]
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %scevgep39, %struct.btMatrix3x3* %3, %struct.btMatrix3x3* %2, %struct.btQuadWord* %1, %struct.btQuadWord* %0, %struct.btQuadWord* %scevgep, %struct.btQuadWord* %272, float %271, %struct.btQuadWord* %270, float %269) nounwind
- br label %bb17
-
-bb17: ; preds = %bb15, %bb14
- %273 = add nsw i32 %i.036, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %273, 3 ; [#uses=1]
- br i1 %exitcond, label %bb19, label %bb14
-
-bb19: ; preds = %bb17, %bb
- %274 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %275 = load %struct.btRigidBody** %274, align 4 ; [#uses=2]
- %276 = getelementptr inbounds %struct.btRigidBody* %275, i32 0, i32 1 ; [#uses=1]
- %277 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %278 = load %struct.btRigidBody** %277, align 4 ; [#uses=2]
- %279 = getelementptr inbounds %struct.btRigidBody* %278, i32 0, i32 1 ; [#uses=1]
- %280 = getelementptr inbounds %struct.btRigidBody* %275, i32 0, i32 0, i32 1 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btRigidBody* %278, i32 0, i32 0, i32 1 ; [#uses=1]
- call void @_ZN21btConeTwistConstraint14calcAngleInfo2ERK11btTransformS2_RK11btMatrix3x3S5_(%struct.btConeTwistConstraint* %this, %struct.btTransform* %281, %struct.btTransform* %280, %struct.btMatrix3x3* %279, %struct.btMatrix3x3* %276)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(%struct.btConeTwistConstraint* %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 25 ; [#uses=1]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=7]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- store i32 3, i32* %2, align 4
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=6]
- store i32 3, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %6 = load %struct.btRigidBody** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btRigidBody* %6, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %9 = load %struct.btRigidBody** %8, align 4 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %6, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN21btConeTwistConstraint14calcAngleInfo2ERK11btTransformS2_RK11btMatrix3x3S5_(%struct.btConeTwistConstraint* %this, %struct.btTransform* %12, %struct.btTransform* %11, %struct.btMatrix3x3* %10, %struct.btMatrix3x3* %7)
- %13 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=1]
- %14 = load i8* %13, align 2 ; [#uses=1]
- %toBool2 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool2, label %bb6, label %bb3
-
-bb3: ; preds = %bb1
- %15 = load i32* %2, align 4 ; [#uses=2]
- %16 = add nsw i32 %15, 1 ; [#uses=1]
- store i32 %16, i32* %2, align 4
- %17 = load i32* %4, align 4 ; [#uses=2]
- %18 = add nsw i32 %17, -1 ; [#uses=1]
- store i32 %18, i32* %4, align 4
- %19 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fcmp olt float %20, %22 ; [#uses=1]
- br i1 %23, label %bb4, label %bb6
-
-bb4: ; preds = %bb3
- %24 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fcmp olt float %25, %22 ; [#uses=1]
- br i1 %26, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- %27 = add nsw i32 %15, 2 ; [#uses=1]
- store i32 %27, i32* %2, align 4
- %28 = add nsw i32 %17, -2 ; [#uses=1]
- store i32 %28, i32* %4, align 4
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4, %bb3, %bb1
- %29 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=1]
- %30 = load i8* %29, align 1 ; [#uses=1]
- %toBool7 = icmp eq i8 %30, 0 ; [#uses=1]
- br i1 %toBool7, label %return, label %bb8
-
-bb8: ; preds = %bb6
- %31 = load i32* %2, align 4 ; [#uses=1]
- %32 = add nsw i32 %31, 1 ; [#uses=1]
- store i32 %32, i32* %2, align 4
- %33 = load i32* %4, align 4 ; [#uses=1]
- %34 = add nsw i32 %33, -1 ; [#uses=1]
- store i32 %34, i32* %4, align 4
- ret void
-
-return: ; preds = %bb6
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btConeTwistConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %4 = load %struct.btRigidBody** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN21btConeTwistConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK11btMatrix3x3S8_(%struct.btConeTwistConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %7, %struct.btTransform* %6, %struct.btMatrix3x3* %5, %struct.btMatrix3x3* %2)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraint23solveConstraintObsoleteER11btRigidBodyS1_f(%struct.btConeTwistConstraint* %this, %struct.btRigidBody* %bodyA, %struct.btRigidBody* %bodyB, float %timeStep) nounwind align 2 {
-entry:
- %axis.i115 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %angle.i116 = alloca float, align 4 ; [#uses=2]
- %axis.i = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %angle.i = alloca float, align 4 ; [#uses=2]
- %trACur = alloca %struct.btTransform, align 8 ; [#uses=18]
- %trBCur = alloca %struct.btTransform, align 8 ; [#uses=18]
- %omegaA = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %omegaB = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %trAPred = alloca %struct.btTransform, align 8 ; [#uses=17]
- %zerovec = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %trBPred = alloca %struct.btTransform, align 8 ; [#uses=17]
- %trADes = alloca %struct.btTransform, align 8 ; [#uses=17]
- %trBDes = alloca %struct.btTransform, align 8 ; [#uses=17]
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 25 ; [#uses=1]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=8]
- %3 = load %struct.btRigidBody** %2, align 4 ; [#uses=12]
- %4 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = fmul float %5, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=3]
- %13 = fmul float %10, %12 ; [#uses=1]
- %14 = fadd float %8, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fadd float %14, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fadd float %20, %22 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fmul float %25, %7 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %28, %12 ; [#uses=1]
- %30 = fadd float %26, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fmul float %32, %18 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fadd float %34, %36 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %7 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fmul float %42, %12 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, %18 ; [#uses=1]
- %48 = fadd float %44, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = fadd float %48, %50 ; [#uses=2]
- %52 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=10]
- %53 = load %struct.btRigidBody** %52, align 4 ; [#uses=12]
- %54 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=2]
- %57 = load float* %56, align 4 ; [#uses=3]
- %58 = fmul float %55, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=2]
- %62 = load float* %61, align 4 ; [#uses=3]
- %63 = fmul float %60, %62 ; [#uses=1]
- %64 = fadd float %58, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=2]
- %68 = load float* %67, align 4 ; [#uses=3]
- %69 = fmul float %66, %68 ; [#uses=1]
- %70 = fadd float %64, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=2]
- %73 = fadd float %70, %72 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fmul float %75, %57 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fmul float %78, %62 ; [#uses=1]
- %80 = fadd float %76, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = fmul float %82, %68 ; [#uses=1]
- %84 = fadd float %80, %83 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=2]
- %87 = fadd float %84, %86 ; [#uses=2]
- %88 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = fmul float %89, %57 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- %93 = fmul float %92, %62 ; [#uses=1]
- %94 = fadd float %90, %93 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = fmul float %96, %68 ; [#uses=1]
- %98 = fadd float %94, %97 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btRigidBody* %53, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=2]
- %101 = fadd float %98, %100 ; [#uses=2]
- %102 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %103 = load i8* %102, align 4 ; [#uses=1]
- %toBool1not = icmp eq i8 %103, 0 ; [#uses=1]
- br i1 %toBool1not, label %bb.nph, label %bb8
-
-bb.nph: ; preds = %bb
- %104 = fsub float %23, %22 ; [#uses=4]
- %105 = fsub float %37, %36 ; [#uses=4]
- %106 = fsub float %51, %50 ; [#uses=4]
- %107 = fsub float %73, %72 ; [#uses=4]
- %108 = fsub float %87, %86 ; [#uses=4]
- %109 = fsub float %101, %100 ; [#uses=4]
- %110 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %113 = load float* %112, align 4 ; [#uses=1]
- %114 = fadd float %111, %113 ; [#uses=2]
- %115 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fadd float %116, %118 ; [#uses=2]
- %120 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = fadd float %121, %123 ; [#uses=2]
- %125 = fmul float %124, %105 ; [#uses=1]
- %126 = fmul float %119, %106 ; [#uses=1]
- %127 = fsub float %125, %126 ; [#uses=1]
- %128 = fmul float %114, %106 ; [#uses=1]
- %129 = fmul float %124, %104 ; [#uses=1]
- %130 = fsub float %128, %129 ; [#uses=1]
- %131 = fmul float %119, %104 ; [#uses=1]
- %132 = fmul float %114, %105 ; [#uses=1]
- %133 = fsub float %131, %132 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %137 = load float* %136, align 4 ; [#uses=1]
- %138 = fadd float %135, %137 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %140 = load float* %139, align 4 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %142 = load float* %141, align 4 ; [#uses=1]
- %143 = fadd float %140, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %147 = load float* %146, align 4 ; [#uses=1]
- %148 = fadd float %145, %147 ; [#uses=1]
- %149 = fadd float %138, %127 ; [#uses=1]
- %150 = fadd float %143, %130 ; [#uses=1]
- %151 = fadd float %148, %133 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %155 = load float* %154, align 4 ; [#uses=1]
- %156 = fadd float %153, %155 ; [#uses=2]
- %157 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %160 = load float* %159, align 4 ; [#uses=1]
- %161 = fadd float %158, %160 ; [#uses=2]
- %162 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %165 = load float* %164, align 4 ; [#uses=1]
- %166 = fadd float %163, %165 ; [#uses=2]
- %167 = fmul float %166, %108 ; [#uses=1]
- %168 = fmul float %161, %109 ; [#uses=1]
- %169 = fsub float %167, %168 ; [#uses=1]
- %170 = fmul float %156, %109 ; [#uses=1]
- %171 = fmul float %166, %107 ; [#uses=1]
- %172 = fsub float %170, %171 ; [#uses=1]
- %173 = fmul float %161, %107 ; [#uses=1]
- %174 = fmul float %156, %108 ; [#uses=1]
- %175 = fsub float %173, %174 ; [#uses=1]
- %176 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %179 = load float* %178, align 4 ; [#uses=1]
- %180 = fadd float %177, %179 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %184 = load float* %183, align 4 ; [#uses=1]
- %185 = fadd float %182, %184 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %189 = load float* %188, align 4 ; [#uses=1]
- %190 = fadd float %187, %189 ; [#uses=1]
- %191 = fadd float %180, %169 ; [#uses=1]
- %192 = fadd float %185, %172 ; [#uses=1]
- %193 = fadd float %190, %175 ; [#uses=1]
- %194 = fsub float %149, %191 ; [#uses=1]
- %195 = fsub float %150, %192 ; [#uses=1]
- %196 = fsub float %151, %193 ; [#uses=1]
- %197 = fsub float %23, %73 ; [#uses=1]
- %198 = fsub float %37, %87 ; [#uses=1]
- %199 = fsub float %51, %101 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 7 ; [#uses=2]
- %201 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 4 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 4 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %207 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit119, %bb.nph
- %i.0430 = phi i32 [ 0, %bb.nph ], [ %383, %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit119 ] ; [#uses=5]
- %scevgep = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 1, i32 %i.0430, i32 5 ; [#uses=1]
- %scevgep431432 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 1, i32 %i.0430, i32 0, i32 0, i32 0 ; [#uses=2]
- %scevgep433 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 1, i32 %i.0430, i32 0, i32 0, i32 1 ; [#uses=2]
- %scevgep434 = getelementptr %struct.btConeTwistConstraint* %this, i32 0, i32 1, i32 %i.0430, i32 0, i32 0, i32 2 ; [#uses=2]
- %209 = load float* %scevgep, align 4 ; [#uses=1]
- %210 = fdiv float 1.000000e+00, %209 ; [#uses=2]
- %211 = load float* %scevgep431432, align 4 ; [#uses=7]
- %212 = fmul float %211, %196 ; [#uses=1]
- %213 = load float* %scevgep433, align 4 ; [#uses=7]
- %214 = fmul float %213, %195 ; [#uses=1]
- %215 = fadd float %212, %214 ; [#uses=1]
- %216 = load float* %scevgep434, align 4 ; [#uses=7]
- %217 = fmul float %216, %194 ; [#uses=1]
- %218 = fadd float %215, %217 ; [#uses=1]
- %219 = fmul float %199, %211 ; [#uses=1]
- %220 = fmul float %198, %213 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=1]
- %222 = fmul float %197, %216 ; [#uses=1]
- %223 = fadd float %221, %222 ; [#uses=1]
- %224 = fmul float %223, 0xBFD3333340000000 ; [#uses=1]
- %225 = fdiv float %224, %timeStep ; [#uses=1]
- %226 = fmul float %225, %210 ; [#uses=1]
- %227 = fmul float %218, %210 ; [#uses=1]
- %228 = fsub float %226, %227 ; [#uses=8]
- %229 = load float* %200, align 4 ; [#uses=1]
- %230 = fadd float %229, %228 ; [#uses=1]
- store float %230, float* %200, align 4
- %231 = fmul float %106, %213 ; [#uses=1]
- %232 = fmul float %105, %211 ; [#uses=1]
- %233 = fsub float %231, %232 ; [#uses=3]
- %234 = fmul float %104, %211 ; [#uses=1]
- %235 = fmul float %106, %216 ; [#uses=1]
- %236 = fsub float %234, %235 ; [#uses=3]
- %237 = fmul float %105, %216 ; [#uses=1]
- %238 = fmul float %104, %213 ; [#uses=1]
- %239 = fsub float %237, %238 ; [#uses=3]
- %240 = fmul float %109, %213 ; [#uses=1]
- %241 = fmul float %108, %211 ; [#uses=1]
- %242 = fsub float %240, %241 ; [#uses=3]
- %243 = fmul float %107, %211 ; [#uses=1]
- %244 = fmul float %109, %216 ; [#uses=1]
- %245 = fsub float %243, %244 ; [#uses=3]
- %246 = fmul float %108, %216 ; [#uses=1]
- %247 = fmul float %107, %213 ; [#uses=1]
- %248 = fsub float %246, %247 ; [#uses=3]
- %249 = load %struct.btRigidBody** %2, align 4 ; [#uses=10]
- %250 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 4 ; [#uses=1]
- %251 = load float* %250, align 4 ; [#uses=3]
- %252 = load float* %201, align 4 ; [#uses=1]
- %253 = fcmp une float %252, 0.000000e+00 ; [#uses=1]
- br i1 %253, label %bb.i120, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit122
-
-bb.i120: ; preds = %bb6
- %254 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %255 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %256 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %257 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %259 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %260 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %261 = load float* %254, align 4 ; [#uses=1]
- %262 = load float* %255, align 4 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %264 = load float* %256, align 4 ; [#uses=1]
- %265 = load float* %257, align 4 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btRigidBody* %249, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %267 = load float* %258, align 4 ; [#uses=1]
- %268 = load float* %259, align 4 ; [#uses=1]
- %269 = load float* %260, align 4 ; [#uses=1]
- %270 = fmul float %261, %236 ; [#uses=1]
- %271 = fmul float %262, %239 ; [#uses=1]
- %272 = load float* %263, align 4 ; [#uses=1]
- %273 = fmul float %264, %236 ; [#uses=1]
- %274 = fmul float %265, %239 ; [#uses=1]
- %275 = load float* %266, align 4 ; [#uses=1]
- %276 = fmul float %267, %236 ; [#uses=1]
- %277 = fmul float %268, %239 ; [#uses=1]
- %278 = fmul float %269, %233 ; [#uses=1]
- %279 = fadd float %271, %270 ; [#uses=1]
- %280 = fmul float %272, %233 ; [#uses=1]
- %281 = fadd float %274, %273 ; [#uses=1]
- %282 = fmul float %275, %233 ; [#uses=1]
- %283 = fadd float %277, %276 ; [#uses=1]
- %284 = fmul float %211, %251 ; [#uses=1]
- %285 = fmul float %213, %251 ; [#uses=1]
- %286 = fmul float %216, %251 ; [#uses=1]
- %287 = fadd float %279, %278 ; [#uses=1]
- %288 = fadd float %281, %280 ; [#uses=1]
- %289 = fadd float %283, %282 ; [#uses=1]
- %290 = fmul float %286, %228 ; [#uses=1]
- %291 = fmul float %285, %228 ; [#uses=1]
- %292 = fmul float %284, %228 ; [#uses=1]
- %293 = load float* %146, align 4 ; [#uses=1]
- %294 = fadd float %293, %292 ; [#uses=1]
- store float %294, float* %146, align 4
- %295 = load float* %141, align 4 ; [#uses=1]
- %296 = fadd float %295, %291 ; [#uses=1]
- store float %296, float* %141, align 4
- %297 = load float* %136, align 4 ; [#uses=1]
- %298 = fadd float %297, %290 ; [#uses=1]
- store float %298, float* %136, align 4
- %299 = load float* %202, align 4 ; [#uses=1]
- %300 = fmul float %299, %228 ; [#uses=1]
- %301 = load float* %203, align 4 ; [#uses=1]
- %302 = fmul float %301, %228 ; [#uses=1]
- %303 = load float* %204, align 4 ; [#uses=1]
- %304 = fmul float %303, %228 ; [#uses=1]
- %305 = fmul float %289, %300 ; [#uses=1]
- %306 = fmul float %288, %302 ; [#uses=1]
- %307 = fmul float %287, %304 ; [#uses=1]
- %308 = load float* %122, align 4 ; [#uses=1]
- %309 = fadd float %308, %307 ; [#uses=1]
- store float %309, float* %122, align 4
- %310 = load float* %117, align 4 ; [#uses=1]
- %311 = fadd float %310, %306 ; [#uses=1]
- store float %311, float* %117, align 4
- %312 = load float* %112, align 4 ; [#uses=1]
- %313 = fadd float %312, %305 ; [#uses=1]
- store float %313, float* %112, align 4
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit122
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit122: ; preds = %bb.i120, %bb6
- %314 = fsub float -0.000000e+00, %228 ; [#uses=6]
- %315 = load %struct.btRigidBody** %52, align 4 ; [#uses=10]
- %316 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 4 ; [#uses=1]
- %317 = load float* %316, align 4 ; [#uses=3]
- %318 = load float* %205, align 4 ; [#uses=1]
- %319 = fcmp une float %318, 0.000000e+00 ; [#uses=1]
- br i1 %319, label %bb.i117, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit119
-
-bb.i117: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit122
- %320 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %321 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %322 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %324 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %325 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %326 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %327 = load float* %320, align 4 ; [#uses=1]
- %328 = load float* %321, align 4 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %330 = load float* %322, align 4 ; [#uses=1]
- %331 = load float* %323, align 4 ; [#uses=1]
- %332 = getelementptr inbounds %struct.btRigidBody* %315, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %333 = load float* %324, align 4 ; [#uses=1]
- %334 = load float* %325, align 4 ; [#uses=1]
- %335 = load float* %326, align 4 ; [#uses=1]
- %336 = fmul float %327, %245 ; [#uses=1]
- %337 = fmul float %328, %248 ; [#uses=1]
- %338 = load float* %329, align 4 ; [#uses=1]
- %339 = fmul float %330, %245 ; [#uses=1]
- %340 = fmul float %331, %248 ; [#uses=1]
- %341 = load float* %332, align 4 ; [#uses=1]
- %342 = fmul float %333, %245 ; [#uses=1]
- %343 = fmul float %334, %248 ; [#uses=1]
- %344 = load float* %scevgep431432, align 4 ; [#uses=1]
- %345 = load float* %scevgep433, align 4 ; [#uses=1]
- %346 = load float* %scevgep434, align 4 ; [#uses=1]
- %347 = fmul float %335, %242 ; [#uses=1]
- %348 = fadd float %337, %336 ; [#uses=1]
- %349 = fmul float %338, %242 ; [#uses=1]
- %350 = fadd float %340, %339 ; [#uses=1]
- %351 = fmul float %341, %242 ; [#uses=1]
- %352 = fadd float %343, %342 ; [#uses=1]
- %353 = fmul float %344, %317 ; [#uses=1]
- %354 = fmul float %345, %317 ; [#uses=1]
- %355 = fmul float %346, %317 ; [#uses=1]
- %356 = fadd float %348, %347 ; [#uses=1]
- %357 = fadd float %350, %349 ; [#uses=1]
- %358 = fadd float %352, %351 ; [#uses=1]
- %359 = fmul float %355, %314 ; [#uses=1]
- %360 = fmul float %354, %314 ; [#uses=1]
- %361 = fmul float %353, %314 ; [#uses=1]
- %362 = load float* %188, align 4 ; [#uses=1]
- %363 = fadd float %362, %361 ; [#uses=1]
- store float %363, float* %188, align 4
- %364 = load float* %183, align 4 ; [#uses=1]
- %365 = fadd float %364, %360 ; [#uses=1]
- store float %365, float* %183, align 4
- %366 = load float* %178, align 4 ; [#uses=1]
- %367 = fadd float %366, %359 ; [#uses=1]
- store float %367, float* %178, align 4
- %368 = load float* %206, align 4 ; [#uses=1]
- %369 = fmul float %368, %314 ; [#uses=1]
- %370 = load float* %207, align 4 ; [#uses=1]
- %371 = fmul float %370, %314 ; [#uses=1]
- %372 = load float* %208, align 4 ; [#uses=1]
- %373 = fmul float %372, %314 ; [#uses=1]
- %374 = fmul float %358, %369 ; [#uses=1]
- %375 = fmul float %357, %371 ; [#uses=1]
- %376 = fmul float %356, %373 ; [#uses=1]
- %377 = load float* %164, align 4 ; [#uses=1]
- %378 = fadd float %377, %376 ; [#uses=1]
- store float %378, float* %164, align 4
- %379 = load float* %159, align 4 ; [#uses=1]
- %380 = fadd float %379, %375 ; [#uses=1]
- store float %380, float* %159, align 4
- %381 = load float* %154, align 4 ; [#uses=1]
- %382 = fadd float %381, %374 ; [#uses=1]
- store float %382, float* %154, align 4
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit119
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit119: ; preds = %bb.i117, %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit122
- %383 = add nsw i32 %i.0430, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %383, 3 ; [#uses=1]
- br i1 %exitcond, label %bb8, label %bb6
-
-bb8: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit119, %bb
- %384 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 29 ; [#uses=1]
- %385 = load i8* %384, align 4 ; [#uses=1]
- %toBool9 = icmp eq i8 %385, 0 ; [#uses=1]
- br i1 %toBool9, label %bb44, label %bb10
-
-bb10: ; preds = %bb8
- %386 = load %struct.btRigidBody** %2, align 4 ; [#uses=16]
- %387 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %388 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %389 = load float* %388, align 4 ; [#uses=1]
- store float %389, float* %387, align 8
- %390 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %391 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %392 = load float* %391, align 4 ; [#uses=1]
- store float %392, float* %390, align 4
- %393 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %394 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %395 = load float* %394, align 4 ; [#uses=1]
- store float %395, float* %393, align 8
- %396 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %397 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %398 = load float* %397, align 4 ; [#uses=1]
- store float %398, float* %396, align 4
- %399 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %400 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %401 = load float* %400, align 4 ; [#uses=1]
- store float %401, float* %399, align 8
- %402 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %403 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %404 = load float* %403, align 4 ; [#uses=1]
- store float %404, float* %402, align 4
- %405 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %406 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %407 = load float* %406, align 4 ; [#uses=1]
- store float %407, float* %405, align 8
- %408 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %409 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %410 = load float* %409, align 4 ; [#uses=1]
- store float %410, float* %408, align 4
- %411 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %412 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %413 = load float* %412, align 4 ; [#uses=1]
- store float %413, float* %411, align 8
- %414 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %415 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %416 = load float* %415, align 4 ; [#uses=1]
- store float %416, float* %414, align 4
- %417 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %418 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %419 = load float* %418, align 4 ; [#uses=1]
- store float %419, float* %417, align 8
- %420 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %421 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %422 = load float* %421, align 4 ; [#uses=1]
- store float %422, float* %420, align 4
- %423 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %424 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %425 = load float* %424, align 4 ; [#uses=1]
- store float %425, float* %423, align 8
- %426 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %427 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %428 = load float* %427, align 4 ; [#uses=1]
- store float %428, float* %426, align 4
- %429 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %430 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %431 = load float* %430, align 4 ; [#uses=1]
- store float %431, float* %429, align 8
- %432 = getelementptr inbounds %struct.btTransform* %trACur, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %433 = getelementptr inbounds %struct.btRigidBody* %386, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %434 = load float* %433, align 4 ; [#uses=1]
- store float %434, float* %432, align 4
- %435 = load %struct.btRigidBody** %52, align 4 ; [#uses=16]
- %436 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %437 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %438 = load float* %437, align 4 ; [#uses=1]
- store float %438, float* %436, align 8
- %439 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %440 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %441 = load float* %440, align 4 ; [#uses=1]
- store float %441, float* %439, align 4
- %442 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %443 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %444 = load float* %443, align 4 ; [#uses=1]
- store float %444, float* %442, align 8
- %445 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %446 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %447 = load float* %446, align 4 ; [#uses=1]
- store float %447, float* %445, align 4
- %448 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %449 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %450 = load float* %449, align 4 ; [#uses=1]
- store float %450, float* %448, align 8
- %451 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %452 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %453 = load float* %452, align 4 ; [#uses=1]
- store float %453, float* %451, align 4
- %454 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %455 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %456 = load float* %455, align 4 ; [#uses=1]
- store float %456, float* %454, align 8
- %457 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %458 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %459 = load float* %458, align 4 ; [#uses=1]
- store float %459, float* %457, align 4
- %460 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %461 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %462 = load float* %461, align 4 ; [#uses=1]
- store float %462, float* %460, align 8
- %463 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %464 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %465 = load float* %464, align 4 ; [#uses=1]
- store float %465, float* %463, align 4
- %466 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %467 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %468 = load float* %467, align 4 ; [#uses=1]
- store float %468, float* %466, align 8
- %469 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %470 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %471 = load float* %470, align 4 ; [#uses=1]
- store float %471, float* %469, align 4
- %472 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %473 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %474 = load float* %473, align 4 ; [#uses=1]
- store float %474, float* %472, align 8
- %475 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %476 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %477 = load float* %476, align 4 ; [#uses=1]
- store float %477, float* %475, align 4
- %478 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %479 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %480 = load float* %479, align 4 ; [#uses=1]
- store float %480, float* %478, align 8
- %481 = getelementptr inbounds %struct.btTransform* %trBCur, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %482 = getelementptr inbounds %struct.btRigidBody* %435, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %483 = load float* %482, align 4 ; [#uses=1]
- store float %483, float* %481, align 4
- %484 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %485 = load float* %484, align 4 ; [#uses=1]
- %486 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %487 = load float* %486, align 4 ; [#uses=1]
- %488 = fadd float %485, %487 ; [#uses=1]
- %489 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %490 = load float* %489, align 4 ; [#uses=1]
- %491 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %492 = load float* %491, align 4 ; [#uses=1]
- %493 = fadd float %490, %492 ; [#uses=1]
- %494 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %495 = load float* %494, align 4 ; [#uses=1]
- %496 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %497 = load float* %496, align 4 ; [#uses=1]
- %498 = fadd float %495, %497 ; [#uses=1]
- %499 = getelementptr inbounds %struct.btQuadWord* %omegaA, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %498, float* %499, align 8
- %500 = getelementptr inbounds %struct.btQuadWord* %omegaA, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %493, float* %500, align 4
- %501 = getelementptr inbounds %struct.btQuadWord* %omegaA, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %488, float* %501, align 8
- %502 = getelementptr inbounds %struct.btQuadWord* %omegaA, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %502, align 4
- %503 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %504 = load float* %503, align 4 ; [#uses=1]
- %505 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %506 = load float* %505, align 4 ; [#uses=1]
- %507 = fadd float %504, %506 ; [#uses=1]
- %508 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %509 = load float* %508, align 4 ; [#uses=1]
- %510 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %511 = load float* %510, align 4 ; [#uses=1]
- %512 = fadd float %509, %511 ; [#uses=1]
- %513 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %514 = load float* %513, align 4 ; [#uses=1]
- %515 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %516 = load float* %515, align 4 ; [#uses=1]
- %517 = fadd float %514, %516 ; [#uses=1]
- %518 = getelementptr inbounds %struct.btQuadWord* %omegaB, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %517, float* %518, align 8
- %519 = getelementptr inbounds %struct.btQuadWord* %omegaB, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %512, float* %519, align 4
- %520 = getelementptr inbounds %struct.btQuadWord* %omegaB, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %507, float* %520, align 8
- %521 = getelementptr inbounds %struct.btQuadWord* %omegaB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %521, align 4
- %522 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 1.000000e+00, float* %522, align 8
- %523 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %523, align 4
- %524 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %524, align 8
- %525 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %525, align 4
- %526 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %526, align 8
- %527 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 1.000000e+00, float* %527, align 4
- %528 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %528, align 8
- %529 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %529, align 4
- %530 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %530, align 8
- %531 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %531, align 4
- %532 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float 1.000000e+00, float* %532, align 8
- %533 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %533, align 4
- %534 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %534, align 8
- %535 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %535, align 4
- %536 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %536, align 8
- %537 = getelementptr inbounds %struct.btTransform* %trAPred, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %537, align 4
- %538 = getelementptr inbounds %struct.btQuadWord* %zerovec, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %538, align 8
- %539 = getelementptr inbounds %struct.btQuadWord* %zerovec, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %539, align 4
- %540 = getelementptr inbounds %struct.btQuadWord* %zerovec, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %540, align 8
- %541 = getelementptr inbounds %struct.btQuadWord* %zerovec, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %541, align 4
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %trACur, %struct.btQuadWord* %zerovec, %struct.btQuadWord* %omegaA, float %timeStep, %struct.btTransform* %trAPred)
- %542 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 1.000000e+00, float* %542, align 8
- %543 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %543, align 4
- %544 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %544, align 8
- %545 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %545, align 4
- %546 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %546, align 8
- %547 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 1.000000e+00, float* %547, align 4
- %548 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %548, align 8
- %549 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %549, align 4
- %550 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %550, align 8
- %551 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %551, align 4
- %552 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float 1.000000e+00, float* %552, align 8
- %553 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %553, align 4
- %554 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %554, align 8
- %555 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %555, align 4
- %556 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %556, align 8
- %557 = getelementptr inbounds %struct.btTransform* %trBPred, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %557, align 4
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %trBCur, %struct.btQuadWord* %zerovec, %struct.btQuadWord* %omegaB, float %timeStep, %struct.btTransform* %trBPred)
- %558 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 0 ; [#uses=1]
- %559 = load float* %558, align 4 ; [#uses=6]
- %560 = fmul float %559, %559 ; [#uses=1]
- %561 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 1 ; [#uses=1]
- %562 = load float* %561, align 4 ; [#uses=5]
- %563 = fmul float %562, %562 ; [#uses=1]
- %564 = fadd float %560, %563 ; [#uses=1]
- %565 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 2 ; [#uses=1]
- %566 = load float* %565, align 4 ; [#uses=4]
- %567 = fmul float %566, %566 ; [#uses=1]
- %568 = fadd float %564, %567 ; [#uses=1]
- %569 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 3 ; [#uses=1]
- %570 = load float* %569, align 4 ; [#uses=5]
- %571 = fmul float %570, %570 ; [#uses=1]
- %572 = fadd float %568, %571 ; [#uses=1]
- %573 = fdiv float 2.000000e+00, %572 ; [#uses=3]
- %574 = fmul float %559, %573 ; [#uses=2]
- %575 = fmul float %562, %573 ; [#uses=3]
- %576 = fmul float %566, %573 ; [#uses=4]
- %577 = fmul float %570, %574 ; [#uses=2]
- %578 = fmul float %570, %575 ; [#uses=2]
- %579 = fmul float %570, %576 ; [#uses=2]
- %580 = fmul float %559, %574 ; [#uses=2]
- %581 = fmul float %559, %575 ; [#uses=2]
- %582 = fmul float %559, %576 ; [#uses=2]
- %583 = fmul float %562, %575 ; [#uses=2]
- %584 = fmul float %562, %576 ; [#uses=2]
- %585 = fmul float %566, %576 ; [#uses=2]
- %586 = fadd float %580, %583 ; [#uses=1]
- %587 = fsub float 1.000000e+00, %586 ; [#uses=3]
- %588 = fadd float %584, %577 ; [#uses=3]
- %589 = fsub float %582, %578 ; [#uses=3]
- %590 = fsub float %584, %577 ; [#uses=3]
- %591 = fadd float %580, %585 ; [#uses=1]
- %592 = fsub float 1.000000e+00, %591 ; [#uses=3]
- %593 = fadd float %581, %579 ; [#uses=3]
- %594 = fadd float %582, %578 ; [#uses=3]
- %595 = fsub float %581, %579 ; [#uses=3]
- %596 = fadd float %583, %585 ; [#uses=1]
- %597 = fsub float 1.000000e+00, %596 ; [#uses=3]
- %598 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %599 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %600 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %601 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %602 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %603 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %604 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %605 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %606 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %607 = load float* %606, align 4 ; [#uses=4]
- %608 = load float* %605, align 4 ; [#uses=4]
- %609 = load float* %604, align 4 ; [#uses=4]
- %610 = load float* %603, align 4 ; [#uses=4]
- %611 = load float* %602, align 4 ; [#uses=4]
- %612 = load float* %601, align 4 ; [#uses=4]
- %613 = load float* %600, align 4 ; [#uses=4]
- %614 = load float* %599, align 4 ; [#uses=4]
- %615 = load float* %598, align 4 ; [#uses=4]
- %616 = load float* %17, align 4 ; [#uses=1]
- %617 = fsub float -0.000000e+00, %616 ; [#uses=3]
- %618 = load float* %11, align 4 ; [#uses=1]
- %619 = fsub float -0.000000e+00, %618 ; [#uses=3]
- %620 = load float* %6, align 4 ; [#uses=1]
- %621 = fsub float -0.000000e+00, %620 ; [#uses=3]
- %622 = fmul float %613, %621 ; [#uses=1]
- %623 = fmul float %614, %619 ; [#uses=1]
- %624 = fadd float %622, %623 ; [#uses=1]
- %625 = fmul float %615, %617 ; [#uses=1]
- %626 = fadd float %624, %625 ; [#uses=3]
- %627 = fmul float %610, %621 ; [#uses=1]
- %628 = fmul float %611, %619 ; [#uses=1]
- %629 = fadd float %627, %628 ; [#uses=1]
- %630 = fmul float %612, %617 ; [#uses=1]
- %631 = fadd float %629, %630 ; [#uses=3]
- %632 = fmul float %607, %621 ; [#uses=1]
- %633 = fmul float %608, %619 ; [#uses=1]
- %634 = fadd float %632, %633 ; [#uses=1]
- %635 = fmul float %609, %617 ; [#uses=1]
- %636 = fadd float %634, %635 ; [#uses=3]
- %637 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %638 = load float* %637, align 4 ; [#uses=4]
- %639 = fmul float %638, 0.000000e+00 ; [#uses=1]
- %640 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %641 = load float* %640, align 4 ; [#uses=4]
- %642 = fmul float %641, 0.000000e+00 ; [#uses=1]
- %643 = fadd float %639, %642 ; [#uses=1]
- %644 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %645 = load float* %644, align 4 ; [#uses=4]
- %646 = fmul float %645, 0.000000e+00 ; [#uses=1]
- %647 = fadd float %643, %646 ; [#uses=1]
- %648 = load float* %67, align 4 ; [#uses=1]
- %649 = fadd float %647, %648 ; [#uses=1]
- %650 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %651 = load float* %650, align 4 ; [#uses=4]
- %652 = fmul float %651, 0.000000e+00 ; [#uses=1]
- %653 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %654 = load float* %653, align 4 ; [#uses=4]
- %655 = fmul float %654, 0.000000e+00 ; [#uses=1]
- %656 = fadd float %652, %655 ; [#uses=1]
- %657 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %658 = load float* %657, align 4 ; [#uses=4]
- %659 = fmul float %658, 0.000000e+00 ; [#uses=1]
- %660 = fadd float %656, %659 ; [#uses=1]
- %661 = load float* %61, align 4 ; [#uses=1]
- %662 = fadd float %660, %661 ; [#uses=1]
- %663 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %664 = load float* %663, align 4 ; [#uses=4]
- %665 = fmul float %664, 0.000000e+00 ; [#uses=1]
- %666 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %667 = load float* %666, align 4 ; [#uses=4]
- %668 = fmul float %667, 0.000000e+00 ; [#uses=1]
- %669 = fadd float %665, %668 ; [#uses=1]
- %670 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %671 = load float* %670, align 4 ; [#uses=4]
- %672 = fmul float %671, 0.000000e+00 ; [#uses=1]
- %673 = fadd float %669, %672 ; [#uses=1]
- %674 = load float* %56, align 4 ; [#uses=1]
- %675 = fadd float %673, %674 ; [#uses=1]
- %676 = fmul float %594, %638 ; [#uses=1]
- %677 = fmul float %590, %641 ; [#uses=1]
- %678 = fadd float %676, %677 ; [#uses=1]
- %679 = fmul float %587, %645 ; [#uses=1]
- %680 = fadd float %678, %679 ; [#uses=4]
- %681 = fmul float %595, %638 ; [#uses=1]
- %682 = fmul float %592, %641 ; [#uses=1]
- %683 = fadd float %681, %682 ; [#uses=1]
- %684 = fmul float %588, %645 ; [#uses=1]
- %685 = fadd float %683, %684 ; [#uses=4]
- %686 = fmul float %597, %638 ; [#uses=1]
- %687 = fmul float %593, %641 ; [#uses=1]
- %688 = fadd float %686, %687 ; [#uses=1]
- %689 = fmul float %589, %645 ; [#uses=1]
- %690 = fadd float %688, %689 ; [#uses=4]
- %691 = fmul float %594, %651 ; [#uses=1]
- %692 = fmul float %590, %654 ; [#uses=1]
- %693 = fadd float %691, %692 ; [#uses=1]
- %694 = fmul float %587, %658 ; [#uses=1]
- %695 = fadd float %693, %694 ; [#uses=4]
- %696 = fmul float %595, %651 ; [#uses=1]
- %697 = fmul float %592, %654 ; [#uses=1]
- %698 = fadd float %696, %697 ; [#uses=1]
- %699 = fmul float %588, %658 ; [#uses=1]
- %700 = fadd float %698, %699 ; [#uses=4]
- %701 = fmul float %597, %651 ; [#uses=1]
- %702 = fmul float %593, %654 ; [#uses=1]
- %703 = fadd float %701, %702 ; [#uses=1]
- %704 = fmul float %589, %658 ; [#uses=1]
- %705 = fadd float %703, %704 ; [#uses=4]
- %706 = fmul float %594, %664 ; [#uses=1]
- %707 = fmul float %590, %667 ; [#uses=1]
- %708 = fadd float %706, %707 ; [#uses=1]
- %709 = fmul float %587, %671 ; [#uses=1]
- %710 = fadd float %708, %709 ; [#uses=4]
- %711 = fmul float %595, %664 ; [#uses=1]
- %712 = fmul float %592, %667 ; [#uses=1]
- %713 = fadd float %711, %712 ; [#uses=1]
- %714 = fmul float %588, %671 ; [#uses=1]
- %715 = fadd float %713, %714 ; [#uses=4]
- %716 = fmul float %597, %664 ; [#uses=1]
- %717 = fmul float %593, %667 ; [#uses=1]
- %718 = fadd float %716, %717 ; [#uses=1]
- %719 = fmul float %589, %671 ; [#uses=1]
- %720 = fadd float %718, %719 ; [#uses=4]
- %721 = fmul float %690, %636 ; [#uses=1]
- %722 = fmul float %685, %631 ; [#uses=1]
- %723 = fadd float %721, %722 ; [#uses=1]
- %724 = fmul float %680, %626 ; [#uses=1]
- %725 = fadd float %723, %724 ; [#uses=1]
- %726 = fadd float %725, %649 ; [#uses=4]
- %727 = fmul float %705, %636 ; [#uses=1]
- %728 = fmul float %700, %631 ; [#uses=1]
- %729 = fadd float %727, %728 ; [#uses=1]
- %730 = fmul float %695, %626 ; [#uses=1]
- %731 = fadd float %729, %730 ; [#uses=1]
- %732 = fadd float %731, %662 ; [#uses=4]
- %733 = fmul float %720, %636 ; [#uses=1]
- %734 = fmul float %715, %631 ; [#uses=1]
- %735 = fadd float %733, %734 ; [#uses=1]
- %736 = fmul float %710, %626 ; [#uses=1]
- %737 = fadd float %735, %736 ; [#uses=1]
- %738 = fadd float %737, %675 ; [#uses=4]
- %739 = fmul float %609, %690 ; [#uses=1]
- %740 = fmul float %612, %685 ; [#uses=1]
- %741 = fadd float %739, %740 ; [#uses=1]
- %742 = fmul float %615, %680 ; [#uses=1]
- %743 = fadd float %741, %742 ; [#uses=7]
- %744 = fmul float %608, %690 ; [#uses=1]
- %745 = fmul float %611, %685 ; [#uses=1]
- %746 = fadd float %744, %745 ; [#uses=1]
- %747 = fmul float %614, %680 ; [#uses=1]
- %748 = fadd float %746, %747 ; [#uses=7]
- %749 = fmul float %607, %690 ; [#uses=1]
- %750 = fmul float %610, %685 ; [#uses=1]
- %751 = fadd float %749, %750 ; [#uses=1]
- %752 = fmul float %613, %680 ; [#uses=1]
- %753 = fadd float %751, %752 ; [#uses=7]
- %754 = fmul float %609, %705 ; [#uses=1]
- %755 = fmul float %612, %700 ; [#uses=1]
- %756 = fadd float %754, %755 ; [#uses=1]
- %757 = fmul float %615, %695 ; [#uses=1]
- %758 = fadd float %756, %757 ; [#uses=7]
- %759 = fmul float %608, %705 ; [#uses=1]
- %760 = fmul float %611, %700 ; [#uses=1]
- %761 = fadd float %759, %760 ; [#uses=1]
- %762 = fmul float %614, %695 ; [#uses=1]
- %763 = fadd float %761, %762 ; [#uses=7]
- %764 = fmul float %607, %705 ; [#uses=1]
- %765 = fmul float %610, %700 ; [#uses=1]
- %766 = fadd float %764, %765 ; [#uses=1]
- %767 = fmul float %613, %695 ; [#uses=1]
- %768 = fadd float %766, %767 ; [#uses=7]
- %769 = fmul float %609, %720 ; [#uses=1]
- %770 = fmul float %612, %715 ; [#uses=1]
- %771 = fadd float %769, %770 ; [#uses=1]
- %772 = fmul float %615, %710 ; [#uses=1]
- %773 = fadd float %771, %772 ; [#uses=7]
- %774 = fmul float %608, %720 ; [#uses=1]
- %775 = fmul float %611, %715 ; [#uses=1]
- %776 = fadd float %774, %775 ; [#uses=1]
- %777 = fmul float %614, %710 ; [#uses=1]
- %778 = fadd float %776, %777 ; [#uses=7]
- %779 = fmul float %607, %720 ; [#uses=1]
- %780 = fmul float %610, %715 ; [#uses=1]
- %781 = fadd float %779, %780 ; [#uses=1]
- %782 = fmul float %613, %710 ; [#uses=1]
- %783 = fadd float %781, %782 ; [#uses=7]
- %784 = load float* %550, align 8 ; [#uses=4]
- %785 = fmul float %784, %738 ; [#uses=1]
- %786 = load float* %551, align 4 ; [#uses=4]
- %787 = fmul float %786, %732 ; [#uses=1]
- %788 = fadd float %785, %787 ; [#uses=1]
- %789 = load float* %552, align 8 ; [#uses=4]
- %790 = fmul float %789, %726 ; [#uses=1]
- %791 = fadd float %788, %790 ; [#uses=1]
- %792 = load float* %556, align 8 ; [#uses=1]
- %793 = fadd float %791, %792 ; [#uses=1]
- %794 = load float* %546, align 8 ; [#uses=4]
- %795 = fmul float %794, %738 ; [#uses=1]
- %796 = load float* %547, align 4 ; [#uses=4]
- %797 = fmul float %796, %732 ; [#uses=1]
- %798 = fadd float %795, %797 ; [#uses=1]
- %799 = load float* %548, align 8 ; [#uses=4]
- %800 = fmul float %799, %726 ; [#uses=1]
- %801 = fadd float %798, %800 ; [#uses=1]
- %802 = load float* %555, align 4 ; [#uses=1]
- %803 = fadd float %801, %802 ; [#uses=1]
- %804 = load float* %542, align 8 ; [#uses=4]
- %805 = fmul float %804, %738 ; [#uses=1]
- %806 = load float* %543, align 4 ; [#uses=4]
- %807 = fmul float %806, %732 ; [#uses=1]
- %808 = fadd float %805, %807 ; [#uses=1]
- %809 = load float* %544, align 8 ; [#uses=4]
- %810 = fmul float %809, %726 ; [#uses=1]
- %811 = fadd float %808, %810 ; [#uses=1]
- %812 = load float* %554, align 8 ; [#uses=1]
- %813 = fadd float %811, %812 ; [#uses=1]
- %814 = fmul float %773, %784 ; [#uses=1]
- %815 = fmul float %758, %786 ; [#uses=1]
- %816 = fadd float %814, %815 ; [#uses=1]
- %817 = fmul float %743, %789 ; [#uses=1]
- %818 = fadd float %816, %817 ; [#uses=1]
- %819 = fmul float %778, %784 ; [#uses=1]
- %820 = fmul float %763, %786 ; [#uses=1]
- %821 = fadd float %819, %820 ; [#uses=1]
- %822 = fmul float %748, %789 ; [#uses=1]
- %823 = fadd float %821, %822 ; [#uses=1]
- %824 = fmul float %783, %784 ; [#uses=1]
- %825 = fmul float %768, %786 ; [#uses=1]
- %826 = fadd float %824, %825 ; [#uses=1]
- %827 = fmul float %753, %789 ; [#uses=1]
- %828 = fadd float %826, %827 ; [#uses=1]
- %829 = fmul float %773, %794 ; [#uses=1]
- %830 = fmul float %758, %796 ; [#uses=1]
- %831 = fadd float %829, %830 ; [#uses=1]
- %832 = fmul float %743, %799 ; [#uses=1]
- %833 = fadd float %831, %832 ; [#uses=1]
- %834 = fmul float %778, %794 ; [#uses=1]
- %835 = fmul float %763, %796 ; [#uses=1]
- %836 = fadd float %834, %835 ; [#uses=1]
- %837 = fmul float %748, %799 ; [#uses=1]
- %838 = fadd float %836, %837 ; [#uses=1]
- %839 = fmul float %783, %794 ; [#uses=1]
- %840 = fmul float %768, %796 ; [#uses=1]
- %841 = fadd float %839, %840 ; [#uses=1]
- %842 = fmul float %753, %799 ; [#uses=1]
- %843 = fadd float %841, %842 ; [#uses=1]
- %844 = fmul float %773, %804 ; [#uses=1]
- %845 = fmul float %758, %806 ; [#uses=1]
- %846 = fadd float %844, %845 ; [#uses=1]
- %847 = fmul float %743, %809 ; [#uses=1]
- %848 = fadd float %846, %847 ; [#uses=1]
- %849 = fmul float %778, %804 ; [#uses=1]
- %850 = fmul float %763, %806 ; [#uses=1]
- %851 = fadd float %849, %850 ; [#uses=1]
- %852 = fmul float %748, %809 ; [#uses=1]
- %853 = fadd float %851, %852 ; [#uses=1]
- %854 = fmul float %783, %804 ; [#uses=1]
- %855 = fmul float %768, %806 ; [#uses=1]
- %856 = fadd float %854, %855 ; [#uses=1]
- %857 = fmul float %753, %809 ; [#uses=1]
- %858 = fadd float %856, %857 ; [#uses=1]
- %859 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %858, float* %859, align 8
- %860 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %853, float* %860, align 4
- %861 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %848, float* %861, align 8
- %862 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %862, align 4
- %863 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %843, float* %863, align 8
- %864 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %838, float* %864, align 4
- %865 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %833, float* %865, align 8
- %866 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %866, align 4
- %867 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %828, float* %867, align 8
- %868 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %823, float* %868, align 4
- %869 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %818, float* %869, align 8
- %870 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %870, align 4
- %871 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %813, float* %871, align 8
- %872 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %803, float* %872, align 4
- %873 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %793, float* %873, align 8
- %874 = getelementptr inbounds %struct.btTransform* %trADes, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %874, align 4
- %875 = fsub float -0.000000e+00, %726 ; [#uses=3]
- %876 = fsub float -0.000000e+00, %732 ; [#uses=3]
- %877 = fsub float -0.000000e+00, %738 ; [#uses=3]
- %878 = fmul float %773, %877 ; [#uses=1]
- %879 = fmul float %758, %876 ; [#uses=1]
- %880 = fadd float %878, %879 ; [#uses=1]
- %881 = fmul float %743, %875 ; [#uses=1]
- %882 = fadd float %880, %881 ; [#uses=3]
- %883 = fmul float %778, %877 ; [#uses=1]
- %884 = fmul float %763, %876 ; [#uses=1]
- %885 = fadd float %883, %884 ; [#uses=1]
- %886 = fmul float %748, %875 ; [#uses=1]
- %887 = fadd float %885, %886 ; [#uses=3]
- %888 = fmul float %783, %877 ; [#uses=1]
- %889 = fmul float %768, %876 ; [#uses=1]
- %890 = fadd float %888, %889 ; [#uses=1]
- %891 = fmul float %753, %875 ; [#uses=1]
- %892 = fadd float %890, %891 ; [#uses=3]
- %893 = load float* %530, align 8 ; [#uses=4]
- %894 = fmul float %893, %892 ; [#uses=1]
- %895 = load float* %531, align 4 ; [#uses=4]
- %896 = fmul float %895, %887 ; [#uses=1]
- %897 = fadd float %894, %896 ; [#uses=1]
- %898 = load float* %532, align 8 ; [#uses=4]
- %899 = fmul float %898, %882 ; [#uses=1]
- %900 = fadd float %897, %899 ; [#uses=1]
- %901 = load float* %536, align 8 ; [#uses=1]
- %902 = fadd float %900, %901 ; [#uses=2]
- %903 = load float* %526, align 8 ; [#uses=4]
- %904 = fmul float %903, %892 ; [#uses=1]
- %905 = load float* %527, align 4 ; [#uses=4]
- %906 = fmul float %905, %887 ; [#uses=1]
- %907 = fadd float %904, %906 ; [#uses=1]
- %908 = load float* %528, align 8 ; [#uses=4]
- %909 = fmul float %908, %882 ; [#uses=1]
- %910 = fadd float %907, %909 ; [#uses=1]
- %911 = load float* %535, align 4 ; [#uses=1]
- %912 = fadd float %910, %911 ; [#uses=2]
- %913 = load float* %522, align 8 ; [#uses=4]
- %914 = fmul float %913, %892 ; [#uses=1]
- %915 = load float* %523, align 4 ; [#uses=4]
- %916 = fmul float %915, %887 ; [#uses=1]
- %917 = fadd float %914, %916 ; [#uses=1]
- %918 = load float* %524, align 8 ; [#uses=4]
- %919 = fmul float %918, %882 ; [#uses=1]
- %920 = fadd float %917, %919 ; [#uses=1]
- %921 = load float* %534, align 8 ; [#uses=1]
- %922 = fadd float %920, %921 ; [#uses=2]
- %923 = fmul float %753, %893 ; [#uses=1]
- %924 = fmul float %748, %895 ; [#uses=1]
- %925 = fadd float %923, %924 ; [#uses=1]
- %926 = fmul float %743, %898 ; [#uses=1]
- %927 = fadd float %925, %926 ; [#uses=1]
- %928 = fmul float %768, %893 ; [#uses=1]
- %929 = fmul float %763, %895 ; [#uses=1]
- %930 = fadd float %928, %929 ; [#uses=1]
- %931 = fmul float %758, %898 ; [#uses=1]
- %932 = fadd float %930, %931 ; [#uses=1]
- %933 = fmul float %783, %893 ; [#uses=1]
- %934 = fmul float %778, %895 ; [#uses=1]
- %935 = fadd float %933, %934 ; [#uses=1]
- %936 = fmul float %773, %898 ; [#uses=1]
- %937 = fadd float %935, %936 ; [#uses=1]
- %938 = fmul float %753, %903 ; [#uses=1]
- %939 = fmul float %748, %905 ; [#uses=1]
- %940 = fadd float %938, %939 ; [#uses=1]
- %941 = fmul float %743, %908 ; [#uses=1]
- %942 = fadd float %940, %941 ; [#uses=1]
- %943 = fmul float %768, %903 ; [#uses=1]
- %944 = fmul float %763, %905 ; [#uses=1]
- %945 = fadd float %943, %944 ; [#uses=1]
- %946 = fmul float %758, %908 ; [#uses=1]
- %947 = fadd float %945, %946 ; [#uses=1]
- %948 = fmul float %783, %903 ; [#uses=1]
- %949 = fmul float %778, %905 ; [#uses=1]
- %950 = fadd float %948, %949 ; [#uses=1]
- %951 = fmul float %773, %908 ; [#uses=1]
- %952 = fadd float %950, %951 ; [#uses=1]
- %953 = fmul float %753, %913 ; [#uses=1]
- %954 = fmul float %748, %915 ; [#uses=1]
- %955 = fadd float %953, %954 ; [#uses=1]
- %956 = fmul float %743, %918 ; [#uses=1]
- %957 = fadd float %955, %956 ; [#uses=1]
- %958 = fmul float %768, %913 ; [#uses=1]
- %959 = fmul float %763, %915 ; [#uses=1]
- %960 = fadd float %958, %959 ; [#uses=1]
- %961 = fmul float %758, %918 ; [#uses=1]
- %962 = fadd float %960, %961 ; [#uses=1]
- %963 = fmul float %783, %913 ; [#uses=1]
- %964 = fmul float %778, %915 ; [#uses=1]
- %965 = fadd float %963, %964 ; [#uses=1]
- %966 = fmul float %773, %918 ; [#uses=1]
- %967 = fadd float %965, %966 ; [#uses=1]
- %968 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %967, float* %968, align 8
- %969 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %962, float* %969, align 4
- %970 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %957, float* %970, align 8
- %971 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %971, align 4
- %972 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %952, float* %972, align 8
- %973 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %947, float* %973, align 4
- %974 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %942, float* %974, align 8
- %975 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %975, align 4
- %976 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %937, float* %976, align 8
- %977 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %932, float* %977, align 4
- %978 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %927, float* %978, align 8
- %979 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %979, align 4
- %980 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %922, float* %980, align 8
- %981 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %912, float* %981, align 4
- %982 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %902, float* %982, align 8
- %983 = getelementptr inbounds %struct.btTransform* %trBDes, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %983, align 4
- %984 = fdiv float 1.000000e+00, %timeStep ; [#uses=9]
- call void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* %trACur, %struct.btTransform* %trADes, %struct.btQuadWord* %axis.i115, float* %angle.i116) nounwind
- %985 = getelementptr inbounds %struct.btQuadWord* %axis.i115, i32 0, i32 0, i32 2 ; [#uses=1]
- %986 = load float* %985, align 8 ; [#uses=1]
- %987 = load float* %angle.i116, align 4 ; [#uses=3]
- %988 = fmul float %986, %987 ; [#uses=1]
- %989 = getelementptr inbounds %struct.btQuadWord* %axis.i115, i32 0, i32 0, i32 1 ; [#uses=1]
- %990 = load float* %989, align 4 ; [#uses=1]
- %991 = fmul float %990, %987 ; [#uses=1]
- %992 = getelementptr inbounds %struct.btQuadWord* %axis.i115, i32 0, i32 0, i32 0 ; [#uses=1]
- %993 = load float* %992, align 8 ; [#uses=1]
- %994 = fmul float %993, %987 ; [#uses=1]
- %995 = fmul float %988, %984 ; [#uses=1]
- %996 = fmul float %991, %984 ; [#uses=1]
- %997 = fmul float %994, %984 ; [#uses=1]
- %998 = load float* %478, align 8 ; [#uses=1]
- %999 = fsub float %902, %998 ; [#uses=1]
- %1000 = load float* %475, align 4 ; [#uses=1]
- %1001 = fsub float %912, %1000 ; [#uses=1]
- %1002 = load float* %472, align 8 ; [#uses=1]
- %1003 = fsub float %922, %1002 ; [#uses=1]
- %1004 = fmul float %999, %984 ; [#uses=1]
- %1005 = fmul float %1001, %984 ; [#uses=1]
- %1006 = fmul float %1003, %984 ; [#uses=1]
- store float %1006, float* %538, align 8
- store float %1005, float* %539, align 4
- store float %1004, float* %540, align 8
- store float 0.000000e+00, float* %541, align 4
- call void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* %trBCur, %struct.btTransform* %trBDes, %struct.btQuadWord* %axis.i, float* %angle.i) nounwind
- %1007 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %1008 = load float* %1007, align 8 ; [#uses=1]
- %1009 = load float* %angle.i, align 4 ; [#uses=3]
- %1010 = fmul float %1008, %1009 ; [#uses=1]
- %1011 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %1012 = load float* %1011, align 4 ; [#uses=1]
- %1013 = fmul float %1012, %1009 ; [#uses=1]
- %1014 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %1015 = load float* %1014, align 8 ; [#uses=1]
- %1016 = fmul float %1015, %1009 ; [#uses=1]
- %1017 = fmul float %1010, %984 ; [#uses=1]
- %1018 = fmul float %1013, %984 ; [#uses=1]
- %1019 = fmul float %1016, %984 ; [#uses=1]
- %1020 = load float* %501, align 8 ; [#uses=1]
- %1021 = fsub float %995, %1020 ; [#uses=4]
- %1022 = load float* %500, align 4 ; [#uses=1]
- %1023 = fsub float %996, %1022 ; [#uses=4]
- %1024 = load float* %499, align 8 ; [#uses=1]
- %1025 = fsub float %997, %1024 ; [#uses=4]
- %1026 = load float* %520, align 8 ; [#uses=1]
- %1027 = fsub float %1017, %1026 ; [#uses=4]
- %1028 = load float* %519, align 4 ; [#uses=1]
- %1029 = fsub float %1018, %1028 ; [#uses=4]
- %1030 = load float* %518, align 8 ; [#uses=1]
- %1031 = fsub float %1019, %1030 ; [#uses=4]
- %1032 = fmul float %1025, %1025 ; [#uses=1]
- %1033 = fmul float %1023, %1023 ; [#uses=1]
- %1034 = fadd float %1032, %1033 ; [#uses=1]
- %1035 = fmul float %1021, %1021 ; [#uses=1]
- %1036 = fadd float %1034, %1035 ; [#uses=2]
- %1037 = fcmp ogt float %1036, 0x3E80000000000000 ; [#uses=1]
- br i1 %1037, label %bb12, label %bb13
-
-bb12: ; preds = %bb10
- %1038 = call float @sqrtf(float %1036) nounwind readonly ; [#uses=1]
- %1039 = fdiv float 1.000000e+00, %1038 ; [#uses=3]
- %1040 = fmul float %1021, %1039 ; [#uses=5]
- %1041 = fmul float %1023, %1039 ; [#uses=5]
- %1042 = fmul float %1025, %1039 ; [#uses=5]
- %1043 = load %struct.btRigidBody** %2, align 4 ; [#uses=9]
- %1044 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1045 = load float* %1044, align 4 ; [#uses=1]
- %1046 = fmul float %1045, %1042 ; [#uses=1]
- %1047 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1048 = load float* %1047, align 4 ; [#uses=1]
- %1049 = fmul float %1048, %1041 ; [#uses=1]
- %1050 = fadd float %1046, %1049 ; [#uses=1]
- %1051 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1052 = load float* %1051, align 4 ; [#uses=1]
- %1053 = fmul float %1052, %1040 ; [#uses=1]
- %1054 = fadd float %1050, %1053 ; [#uses=1]
- %1055 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1056 = load float* %1055, align 4 ; [#uses=1]
- %1057 = fmul float %1056, %1042 ; [#uses=1]
- %1058 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1059 = load float* %1058, align 4 ; [#uses=1]
- %1060 = fmul float %1059, %1041 ; [#uses=1]
- %1061 = fadd float %1057, %1060 ; [#uses=1]
- %1062 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1063 = load float* %1062, align 4 ; [#uses=1]
- %1064 = fmul float %1063, %1040 ; [#uses=1]
- %1065 = fadd float %1061, %1064 ; [#uses=1]
- %1066 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1067 = load float* %1066, align 4 ; [#uses=1]
- %1068 = fmul float %1067, %1042 ; [#uses=1]
- %1069 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1070 = load float* %1069, align 4 ; [#uses=1]
- %1071 = fmul float %1070, %1041 ; [#uses=1]
- %1072 = fadd float %1068, %1071 ; [#uses=1]
- %1073 = getelementptr inbounds %struct.btRigidBody* %1043, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1074 = load float* %1073, align 4 ; [#uses=1]
- %1075 = fmul float %1074, %1040 ; [#uses=1]
- %1076 = fadd float %1072, %1075 ; [#uses=1]
- %1077 = fmul float %1042, %1076 ; [#uses=1]
- %1078 = fmul float %1041, %1065 ; [#uses=1]
- %1079 = fadd float %1077, %1078 ; [#uses=1]
- %1080 = fmul float %1040, %1054 ; [#uses=1]
- %1081 = fadd float %1079, %1080 ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb12, %bb10
- %axisA.0.0.0 = phi float [ %1042, %bb12 ], [ undef, %bb10 ] ; [#uses=1]
- %axisA.0.1.0 = phi float [ %1041, %bb12 ], [ undef, %bb10 ] ; [#uses=1]
- %axisA.0.2.0 = phi float [ %1040, %bb12 ], [ undef, %bb10 ] ; [#uses=1]
- %kAxisAInv.0 = phi float [ %1081, %bb12 ], [ 0.000000e+00, %bb10 ] ; [#uses=3]
- %1082 = fmul float %1031, %1031 ; [#uses=1]
- %1083 = fmul float %1029, %1029 ; [#uses=1]
- %1084 = fadd float %1082, %1083 ; [#uses=1]
- %1085 = fmul float %1027, %1027 ; [#uses=1]
- %1086 = fadd float %1084, %1085 ; [#uses=2]
- %1087 = fcmp ogt float %1086, 0x3E80000000000000 ; [#uses=1]
- br i1 %1087, label %bb15, label %bb17
-
-bb15: ; preds = %bb13
- %1088 = call float @sqrtf(float %1086) nounwind readonly ; [#uses=1]
- %1089 = fdiv float 1.000000e+00, %1088 ; [#uses=3]
- %1090 = fmul float %1027, %1089 ; [#uses=5]
- %1091 = fmul float %1029, %1089 ; [#uses=5]
- %1092 = fmul float %1031, %1089 ; [#uses=5]
- %1093 = load %struct.btRigidBody** %52, align 4 ; [#uses=9]
- %1094 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1095 = load float* %1094, align 4 ; [#uses=1]
- %1096 = fmul float %1095, %1092 ; [#uses=1]
- %1097 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1098 = load float* %1097, align 4 ; [#uses=1]
- %1099 = fmul float %1098, %1091 ; [#uses=1]
- %1100 = fadd float %1096, %1099 ; [#uses=1]
- %1101 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1102 = load float* %1101, align 4 ; [#uses=1]
- %1103 = fmul float %1102, %1090 ; [#uses=1]
- %1104 = fadd float %1100, %1103 ; [#uses=1]
- %1105 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1106 = load float* %1105, align 4 ; [#uses=1]
- %1107 = fmul float %1106, %1092 ; [#uses=1]
- %1108 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1109 = load float* %1108, align 4 ; [#uses=1]
- %1110 = fmul float %1109, %1091 ; [#uses=1]
- %1111 = fadd float %1107, %1110 ; [#uses=1]
- %1112 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1113 = load float* %1112, align 4 ; [#uses=1]
- %1114 = fmul float %1113, %1090 ; [#uses=1]
- %1115 = fadd float %1111, %1114 ; [#uses=1]
- %1116 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1117 = load float* %1116, align 4 ; [#uses=1]
- %1118 = fmul float %1117, %1092 ; [#uses=1]
- %1119 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1120 = load float* %1119, align 4 ; [#uses=1]
- %1121 = fmul float %1120, %1091 ; [#uses=1]
- %1122 = fadd float %1118, %1121 ; [#uses=1]
- %1123 = getelementptr inbounds %struct.btRigidBody* %1093, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1124 = load float* %1123, align 4 ; [#uses=1]
- %1125 = fmul float %1124, %1090 ; [#uses=1]
- %1126 = fadd float %1122, %1125 ; [#uses=1]
- %1127 = fmul float %1092, %1126 ; [#uses=1]
- %1128 = fmul float %1091, %1115 ; [#uses=1]
- %1129 = fadd float %1127, %1128 ; [#uses=1]
- %1130 = fmul float %1090, %1104 ; [#uses=1]
- %1131 = fadd float %1129, %1130 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb15, %bb13
- %axisB.0.0.0 = phi float [ %1092, %bb15 ], [ undef, %bb13 ] ; [#uses=1]
- %axisB.0.1.0 = phi float [ %1091, %bb15 ], [ undef, %bb13 ] ; [#uses=1]
- %axisB.0.2.0 = phi float [ %1090, %bb15 ], [ undef, %bb13 ] ; [#uses=1]
- %kAxisBInv.0 = phi float [ %1131, %bb15 ], [ 0.000000e+00, %bb13 ] ; [#uses=3]
- %1132 = fmul float %axisB.0.2.0, %kAxisBInv.0 ; [#uses=1]
- %1133 = fmul float %axisB.0.1.0, %kAxisBInv.0 ; [#uses=1]
- %1134 = fmul float %axisB.0.0.0, %kAxisBInv.0 ; [#uses=1]
- %1135 = fmul float %axisA.0.2.0, %kAxisAInv.0 ; [#uses=1]
- %1136 = fmul float %axisA.0.1.0, %kAxisAInv.0 ; [#uses=1]
- %1137 = fmul float %axisA.0.0.0, %kAxisAInv.0 ; [#uses=1]
- %1138 = fadd float %1135, %1132 ; [#uses=3]
- %1139 = fadd float %1136, %1133 ; [#uses=3]
- %1140 = fadd float %1137, %1134 ; [#uses=3]
- %1141 = fmul float %1140, %1140 ; [#uses=1]
- %1142 = fmul float %1139, %1139 ; [#uses=1]
- %1143 = fadd float %1141, %1142 ; [#uses=1]
- %1144 = fmul float %1138, %1138 ; [#uses=1]
- %1145 = fadd float %1143, %1144 ; [#uses=2]
- %not. = fcmp ogt float %1145, 0x3E80000000000000 ; [#uses=1]
- br i1 %not., label %bb27, label %bb59
-
-bb27: ; preds = %bb17
- %1146 = call float @sqrtf(float %1145) nounwind readonly ; [#uses=1]
- %1147 = fdiv float 1.000000e+00, %1146 ; [#uses=3]
- %1148 = fmul float %1140, %1147 ; [#uses=8]
- %1149 = fmul float %1139, %1147 ; [#uses=8]
- %1150 = fmul float %1138, %1147 ; [#uses=8]
- %1151 = load %struct.btRigidBody** %2, align 4 ; [#uses=9]
- %1152 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %1153 = load float* %1152, align 4 ; [#uses=1]
- %1154 = fmul float %1153, %1148 ; [#uses=1]
- %1155 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %1156 = load float* %1155, align 4 ; [#uses=1]
- %1157 = fmul float %1156, %1149 ; [#uses=1]
- %1158 = fadd float %1154, %1157 ; [#uses=1]
- %1159 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %1160 = load float* %1159, align 4 ; [#uses=1]
- %1161 = fmul float %1160, %1150 ; [#uses=1]
- %1162 = fadd float %1158, %1161 ; [#uses=1]
- %1163 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %1164 = load float* %1163, align 4 ; [#uses=1]
- %1165 = fmul float %1164, %1148 ; [#uses=1]
- %1166 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %1167 = load float* %1166, align 4 ; [#uses=1]
- %1168 = fmul float %1167, %1149 ; [#uses=1]
- %1169 = fadd float %1165, %1168 ; [#uses=1]
- %1170 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %1171 = load float* %1170, align 4 ; [#uses=1]
- %1172 = fmul float %1171, %1150 ; [#uses=1]
- %1173 = fadd float %1169, %1172 ; [#uses=1]
- %1174 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1175 = load float* %1174, align 4 ; [#uses=1]
- %1176 = fmul float %1175, %1148 ; [#uses=1]
- %1177 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %1178 = load float* %1177, align 4 ; [#uses=1]
- %1179 = fmul float %1178, %1149 ; [#uses=1]
- %1180 = fadd float %1176, %1179 ; [#uses=1]
- %1181 = getelementptr inbounds %struct.btRigidBody* %1151, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %1182 = load float* %1181, align 4 ; [#uses=1]
- %1183 = fmul float %1182, %1150 ; [#uses=1]
- %1184 = fadd float %1180, %1183 ; [#uses=1]
- %1185 = fmul float %1148, %1184 ; [#uses=1]
- %1186 = fmul float %1149, %1173 ; [#uses=1]
- %1187 = fadd float %1185, %1186 ; [#uses=1]
- %1188 = fmul float %1150, %1162 ; [#uses=1]
- %1189 = fadd float %1187, %1188 ; [#uses=5]
- %1190 = load %struct.btRigidBody** %52, align 4 ; [#uses=10]
- %1191 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1192 = load float* %1191, align 4 ; [#uses=1]
- %1193 = fmul float %1192, %1148 ; [#uses=1]
- %1194 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1195 = load float* %1194, align 4 ; [#uses=1]
- %1196 = fmul float %1195, %1149 ; [#uses=1]
- %1197 = fadd float %1193, %1196 ; [#uses=1]
- %1198 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1199 = load float* %1198, align 4 ; [#uses=1]
- %1200 = fmul float %1199, %1150 ; [#uses=1]
- %1201 = fadd float %1197, %1200 ; [#uses=1]
- %1202 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1203 = load float* %1202, align 4 ; [#uses=1]
- %1204 = fmul float %1203, %1148 ; [#uses=1]
- %1205 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1206 = load float* %1205, align 4 ; [#uses=1]
- %1207 = fmul float %1206, %1149 ; [#uses=1]
- %1208 = fadd float %1204, %1207 ; [#uses=1]
- %1209 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1210 = load float* %1209, align 4 ; [#uses=1]
- %1211 = fmul float %1210, %1150 ; [#uses=1]
- %1212 = fadd float %1208, %1211 ; [#uses=1]
- %1213 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1214 = load float* %1213, align 4 ; [#uses=1]
- %1215 = fmul float %1214, %1148 ; [#uses=1]
- %1216 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1217 = load float* %1216, align 4 ; [#uses=1]
- %1218 = fmul float %1217, %1149 ; [#uses=1]
- %1219 = fadd float %1215, %1218 ; [#uses=1]
- %1220 = getelementptr inbounds %struct.btRigidBody* %1190, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1221 = load float* %1220, align 4 ; [#uses=1]
- %1222 = fmul float %1221, %1150 ; [#uses=1]
- %1223 = fadd float %1219, %1222 ; [#uses=1]
- %1224 = fmul float %1148, %1223 ; [#uses=1]
- %1225 = fmul float %1149, %1212 ; [#uses=1]
- %1226 = fadd float %1224, %1225 ; [#uses=1]
- %1227 = fmul float %1150, %1201 ; [#uses=1]
- %1228 = fadd float %1226, %1227 ; [#uses=4]
- %1229 = fadd float %1189, %1228 ; [#uses=2]
- %1230 = fmul float %1229, %1229 ; [#uses=1]
- %1231 = fmul float %1027, %1228 ; [#uses=1]
- %1232 = fmul float %1029, %1228 ; [#uses=1]
- %1233 = fmul float %1031, %1228 ; [#uses=1]
- %1234 = fmul float %1021, %1189 ; [#uses=1]
- %1235 = fmul float %1023, %1189 ; [#uses=1]
- %1236 = fmul float %1025, %1189 ; [#uses=1]
- %1237 = fsub float %1234, %1231 ; [#uses=1]
- %1238 = fsub float %1235, %1232 ; [#uses=1]
- %1239 = fsub float %1236, %1233 ; [#uses=1]
- %1240 = fdiv float 1.000000e+00, %1230 ; [#uses=3]
- %1241 = fmul float %1237, %1240 ; [#uses=3]
- %1242 = fmul float %1238, %1240 ; [#uses=3]
- %1243 = fmul float %1239, %1240 ; [#uses=3]
- %1244 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 32 ; [#uses=1]
- %1245 = load float* %1244, align 4 ; [#uses=3]
- %1246 = fcmp ult float %1245, 0.000000e+00 ; [#uses=1]
- br i1 %1246, label %bb43, label %bb33
-
-bb33: ; preds = %bb27
- %1247 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 30 ; [#uses=1]
- %1248 = load i8* %1247, align 1 ; [#uses=1]
- %toBool37 = icmp eq i8 %1248, 0 ; [#uses=1]
- br i1 %toBool37, label %bb39, label %bb38
-
-bb38: ; preds = %bb33
- %1249 = fdiv float %1245, %1189 ; [#uses=1]
- br label %bb39
-
-bb39: ; preds = %bb38, %bb33
- %fMaxImpulse.0 = phi float [ %1245, %bb33 ], [ %1249, %bb38 ] ; [#uses=4]
- %1250 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 33, i32 0, i32 2 ; [#uses=2]
- %1251 = load float* %1250, align 4 ; [#uses=3]
- %1252 = fadd float %1251, %1241 ; [#uses=3]
- %1253 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 33, i32 0, i32 1 ; [#uses=2]
- %1254 = load float* %1253, align 4 ; [#uses=3]
- %1255 = fadd float %1254, %1242 ; [#uses=3]
- %1256 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 33, i32 0, i32 0 ; [#uses=2]
- %1257 = load float* %1256, align 4 ; [#uses=3]
- %1258 = fadd float %1257, %1243 ; [#uses=3]
- %1259 = fmul float %1258, %1258 ; [#uses=1]
- %1260 = fmul float %1255, %1255 ; [#uses=1]
- %1261 = fadd float %1259, %1260 ; [#uses=1]
- %1262 = fmul float %1252, %1252 ; [#uses=1]
- %1263 = fadd float %1261, %1262 ; [#uses=1]
- %1264 = call float @sqrtf(float %1263) nounwind readonly ; [#uses=2]
- %1265 = fcmp ogt float %1264, %fMaxImpulse.0 ; [#uses=1]
- br i1 %1265, label %bb40, label %bb42
-
-bb40: ; preds = %bb39
- %1266 = fdiv float 1.000000e+00, %1264 ; [#uses=3]
- %1267 = fmul float %1258, %1266 ; [#uses=1]
- %1268 = fmul float %1255, %1266 ; [#uses=1]
- %1269 = fmul float %1252, %1266 ; [#uses=1]
- %1270 = fmul float %1267, %fMaxImpulse.0 ; [#uses=1]
- %1271 = fmul float %1268, %fMaxImpulse.0 ; [#uses=1]
- %1272 = fmul float %1269, %fMaxImpulse.0 ; [#uses=1]
- %1273 = fsub float %1272, %1251 ; [#uses=1]
- %1274 = fsub float %1271, %1254 ; [#uses=1]
- %1275 = fsub float %1270, %1257 ; [#uses=1]
- br label %bb42
-
-bb42: ; preds = %bb40, %bb39
- %impulse30.0.0.0 = phi float [ %1275, %bb40 ], [ %1243, %bb39 ] ; [#uses=2]
- %impulse30.0.1.0 = phi float [ %1274, %bb40 ], [ %1242, %bb39 ] ; [#uses=2]
- %impulse30.0.2.0 = phi float [ %1273, %bb40 ], [ %1241, %bb39 ] ; [#uses=2]
- %1276 = fadd float %1257, %impulse30.0.0.0 ; [#uses=1]
- store float %1276, float* %1256, align 4
- %1277 = fadd float %1254, %impulse30.0.1.0 ; [#uses=1]
- store float %1277, float* %1253, align 4
- %1278 = fadd float %1251, %impulse30.0.2.0 ; [#uses=1]
- store float %1278, float* %1250, align 4
- br label %bb43
-
-bb43: ; preds = %bb42, %bb27
- %impulse30.0.0.1 = phi float [ %1243, %bb27 ], [ %impulse30.0.0.0, %bb42 ] ; [#uses=3]
- %impulse30.0.1.1 = phi float [ %1242, %bb27 ], [ %impulse30.0.1.0, %bb42 ] ; [#uses=3]
- %impulse30.0.2.1 = phi float [ %1241, %bb27 ], [ %impulse30.0.2.0, %bb42 ] ; [#uses=3]
- %1279 = fmul float %impulse30.0.0.1, %impulse30.0.0.1 ; [#uses=1]
- %1280 = fmul float %impulse30.0.1.1, %impulse30.0.1.1 ; [#uses=1]
- %1281 = fadd float %1279, %1280 ; [#uses=1]
- %1282 = fmul float %impulse30.0.2.1, %impulse30.0.2.1 ; [#uses=1]
- %1283 = fadd float %1281, %1282 ; [#uses=1]
- %1284 = call float @sqrtf(float %1283) nounwind readonly ; [#uses=7]
- %1285 = fdiv float 1.000000e+00, %1284 ; [#uses=3]
- %1286 = fmul float %impulse30.0.2.1, %1285 ; [#uses=6]
- %1287 = fmul float %impulse30.0.1.1, %1285 ; [#uses=6]
- %1288 = fmul float %impulse30.0.0.1, %1285 ; [#uses=6]
- %1289 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 4 ; [#uses=1]
- %1290 = load float* %1289, align 4 ; [#uses=1]
- %1291 = fcmp une float %1290, 0.000000e+00 ; [#uses=1]
- br i1 %1291, label %bb.i112, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit114
-
-bb.i112: ; preds = %bb43
- %1292 = load float* %1163, align 4 ; [#uses=1]
- %1293 = load float* %1174, align 4 ; [#uses=1]
- %1294 = load float* %1166, align 4 ; [#uses=1]
- %1295 = load float* %1177, align 4 ; [#uses=1]
- %1296 = load float* %1170, align 4 ; [#uses=1]
- %1297 = load float* %1181, align 4 ; [#uses=1]
- %1298 = load float* %1152, align 4 ; [#uses=1]
- %1299 = fmul float %1292, %1287 ; [#uses=1]
- %1300 = fmul float %1293, %1288 ; [#uses=1]
- %1301 = load float* %1155, align 4 ; [#uses=1]
- %1302 = fmul float %1294, %1287 ; [#uses=1]
- %1303 = fmul float %1295, %1288 ; [#uses=1]
- %1304 = load float* %1159, align 4 ; [#uses=1]
- %1305 = fmul float %1296, %1287 ; [#uses=1]
- %1306 = fmul float %1297, %1288 ; [#uses=1]
- %1307 = fmul float %1298, %1286 ; [#uses=1]
- %1308 = fadd float %1300, %1299 ; [#uses=1]
- %1309 = fmul float %1301, %1286 ; [#uses=1]
- %1310 = fadd float %1303, %1302 ; [#uses=1]
- %1311 = fmul float %1304, %1286 ; [#uses=1]
- %1312 = fadd float %1306, %1305 ; [#uses=1]
- %1313 = fadd float %1308, %1307 ; [#uses=1]
- %1314 = fadd float %1310, %1309 ; [#uses=1]
- %1315 = fadd float %1312, %1311 ; [#uses=1]
- %1316 = fmul float %1284, 0.000000e+00 ; [#uses=3]
- %1317 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %1318 = load float* %1317, align 4 ; [#uses=1]
- %1319 = fadd float %1318, %1316 ; [#uses=1]
- store float %1319, float* %1317, align 4
- %1320 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %1321 = load float* %1320, align 4 ; [#uses=1]
- %1322 = fadd float %1321, %1316 ; [#uses=1]
- store float %1322, float* %1320, align 4
- %1323 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %1324 = load float* %1323, align 4 ; [#uses=1]
- %1325 = fadd float %1324, %1316 ; [#uses=1]
- store float %1325, float* %1323, align 4
- %1326 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %1327 = load float* %1326, align 4 ; [#uses=1]
- %1328 = fmul float %1327, %1284 ; [#uses=1]
- %1329 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %1330 = load float* %1329, align 4 ; [#uses=1]
- %1331 = fmul float %1330, %1284 ; [#uses=1]
- %1332 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %1333 = load float* %1332, align 4 ; [#uses=1]
- %1334 = fmul float %1333, %1284 ; [#uses=1]
- %1335 = fmul float %1315, %1328 ; [#uses=1]
- %1336 = fmul float %1314, %1331 ; [#uses=1]
- %1337 = fmul float %1313, %1334 ; [#uses=1]
- %1338 = load float* %496, align 4 ; [#uses=1]
- %1339 = fadd float %1338, %1337 ; [#uses=1]
- store float %1339, float* %496, align 4
- %1340 = load float* %491, align 4 ; [#uses=1]
- %1341 = fadd float %1340, %1336 ; [#uses=1]
- store float %1341, float* %491, align 4
- %1342 = load float* %486, align 4 ; [#uses=1]
- %1343 = fadd float %1342, %1335 ; [#uses=1]
- store float %1343, float* %486, align 4
- %.pre438 = load %struct.btRigidBody** %52, align 4 ; [#uses=1]
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit114
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit114: ; preds = %bb.i112, %bb43
- %1344 = phi %struct.btRigidBody* [ %1190, %bb43 ], [ %.pre438, %bb.i112 ] ; [#uses=9]
- %1345 = fsub float -0.000000e+00, %1284 ; [#uses=3]
- %1346 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 4 ; [#uses=1]
- %1347 = load float* %1346, align 4 ; [#uses=1]
- %1348 = fcmp une float %1347, 0.000000e+00 ; [#uses=1]
- br i1 %1348, label %bb.i109, label %bb59
-
-bb.i109: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit114
- %1349 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1350 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1351 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1352 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1353 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1354 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1355 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1356 = load float* %1349, align 4 ; [#uses=1]
- %1357 = load float* %1350, align 4 ; [#uses=1]
- %1358 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1359 = load float* %1351, align 4 ; [#uses=1]
- %1360 = load float* %1352, align 4 ; [#uses=1]
- %1361 = getelementptr inbounds %struct.btRigidBody* %1344, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1362 = load float* %1353, align 4 ; [#uses=1]
- %1363 = load float* %1354, align 4 ; [#uses=1]
- %1364 = load float* %1355, align 4 ; [#uses=1]
- %1365 = fmul float %1356, %1287 ; [#uses=1]
- %1366 = fmul float %1357, %1288 ; [#uses=1]
- %1367 = load float* %1358, align 4 ; [#uses=1]
- %1368 = fmul float %1359, %1287 ; [#uses=1]
- %1369 = fmul float %1360, %1288 ; [#uses=1]
- %1370 = load float* %1361, align 4 ; [#uses=1]
- %1371 = fmul float %1362, %1287 ; [#uses=1]
- %1372 = fmul float %1363, %1288 ; [#uses=1]
- %1373 = fmul float %1364, %1286 ; [#uses=1]
- %1374 = fadd float %1366, %1365 ; [#uses=1]
- %1375 = fmul float %1367, %1286 ; [#uses=1]
- %1376 = fadd float %1369, %1368 ; [#uses=1]
- %1377 = fmul float %1370, %1286 ; [#uses=1]
- %1378 = fadd float %1372, %1371 ; [#uses=1]
- %1379 = fadd float %1374, %1373 ; [#uses=1]
- %1380 = fadd float %1376, %1375 ; [#uses=1]
- %1381 = fadd float %1378, %1377 ; [#uses=1]
- %1382 = fmul float %1284, -0.000000e+00 ; [#uses=3]
- %1383 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %1384 = load float* %1383, align 4 ; [#uses=1]
- %1385 = fadd float %1384, %1382 ; [#uses=1]
- store float %1385, float* %1383, align 4
- %1386 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %1387 = load float* %1386, align 4 ; [#uses=1]
- %1388 = fadd float %1387, %1382 ; [#uses=1]
- store float %1388, float* %1386, align 4
- %1389 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %1390 = load float* %1389, align 4 ; [#uses=1]
- %1391 = fadd float %1390, %1382 ; [#uses=1]
- store float %1391, float* %1389, align 4
- %1392 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %1393 = load float* %1392, align 4 ; [#uses=1]
- %1394 = fmul float %1393, %1345 ; [#uses=1]
- %1395 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %1396 = load float* %1395, align 4 ; [#uses=1]
- %1397 = fmul float %1396, %1345 ; [#uses=1]
- %1398 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %1399 = load float* %1398, align 4 ; [#uses=1]
- %1400 = fmul float %1399, %1345 ; [#uses=1]
- %1401 = fmul float %1381, %1394 ; [#uses=1]
- %1402 = fmul float %1380, %1397 ; [#uses=1]
- %1403 = fmul float %1379, %1400 ; [#uses=1]
- %1404 = load float* %515, align 4 ; [#uses=1]
- %1405 = fadd float %1404, %1403 ; [#uses=1]
- store float %1405, float* %515, align 4
- %1406 = load float* %510, align 4 ; [#uses=1]
- %1407 = fadd float %1406, %1402 ; [#uses=1]
- store float %1407, float* %510, align 4
- %1408 = load float* %505, align 4 ; [#uses=1]
- %1409 = fadd float %1408, %1401 ; [#uses=1]
- store float %1409, float* %505, align 4
- br label %bb59
-
-bb44: ; preds = %bb8
- %1410 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %1411 = load float* %1410, align 4 ; [#uses=2]
- %1412 = fcmp ogt float %1411, 0x3E80000000000000 ; [#uses=1]
- br i1 %1412, label %bb45, label %bb59
-
-bb45: ; preds = %bb44
- %1413 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1414 = load float* %1413, align 4 ; [#uses=1]
- %1415 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 2 ; [#uses=2]
- %1416 = load float* %1415, align 4 ; [#uses=2]
- %1417 = fadd float %1414, %1416 ; [#uses=1]
- %1418 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %1419 = load float* %1418, align 4 ; [#uses=1]
- %1420 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 1 ; [#uses=2]
- %1421 = load float* %1420, align 4 ; [#uses=2]
- %1422 = fadd float %1419, %1421 ; [#uses=1]
- %1423 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1424 = load float* %1423, align 4 ; [#uses=1]
- %1425 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 0 ; [#uses=2]
- %1426 = load float* %1425, align 4 ; [#uses=2]
- %1427 = fadd float %1424, %1426 ; [#uses=1]
- %1428 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1429 = load float* %1428, align 4 ; [#uses=1]
- %1430 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %1431 = load float* %1430, align 4 ; [#uses=1]
- %1432 = fadd float %1429, %1431 ; [#uses=1]
- %1433 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %1434 = load float* %1433, align 4 ; [#uses=1]
- %1435 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %1436 = load float* %1435, align 4 ; [#uses=1]
- %1437 = fadd float %1434, %1436 ; [#uses=1]
- %1438 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1439 = load float* %1438, align 4 ; [#uses=1]
- %1440 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %1441 = load float* %1440, align 4 ; [#uses=1]
- %1442 = fadd float %1439, %1441 ; [#uses=1]
- %1443 = fsub float %1432, %1417 ; [#uses=4]
- %1444 = fsub float %1437, %1422 ; [#uses=4]
- %1445 = fsub float %1442, %1427 ; [#uses=4]
- %1446 = fmul float %1445, %1445 ; [#uses=1]
- %1447 = fmul float %1444, %1444 ; [#uses=1]
- %1448 = fadd float %1446, %1447 ; [#uses=1]
- %1449 = fmul float %1443, %1443 ; [#uses=1]
- %1450 = fadd float %1448, %1449 ; [#uses=2]
- %1451 = fcmp ogt float %1450, 0x3E80000000000000 ; [#uses=1]
- br i1 %1451, label %bb50, label %bb59
-
-bb50: ; preds = %bb45
- %1452 = call float @sqrtf(float %1450) nounwind readonly ; [#uses=1]
- %1453 = fdiv float 1.000000e+00, %1452 ; [#uses=3]
- %1454 = fmul float %1443, %1453 ; [#uses=8]
- %1455 = fmul float %1444, %1453 ; [#uses=8]
- %1456 = fmul float %1445, %1453 ; [#uses=8]
- %1457 = load %struct.btRigidBody** %2, align 4 ; [#uses=9]
- %1458 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1459 = load float* %1458, align 4 ; [#uses=2]
- %1460 = fmul float %1459, %1456 ; [#uses=1]
- %1461 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1462 = load float* %1461, align 4 ; [#uses=2]
- %1463 = fmul float %1462, %1455 ; [#uses=1]
- %1464 = fadd float %1460, %1463 ; [#uses=1]
- %1465 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1466 = load float* %1465, align 4 ; [#uses=2]
- %1467 = fmul float %1466, %1454 ; [#uses=1]
- %1468 = fadd float %1464, %1467 ; [#uses=1]
- %1469 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1470 = load float* %1469, align 4 ; [#uses=2]
- %1471 = fmul float %1470, %1456 ; [#uses=1]
- %1472 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1473 = load float* %1472, align 4 ; [#uses=2]
- %1474 = fmul float %1473, %1455 ; [#uses=1]
- %1475 = fadd float %1471, %1474 ; [#uses=1]
- %1476 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1477 = load float* %1476, align 4 ; [#uses=2]
- %1478 = fmul float %1477, %1454 ; [#uses=1]
- %1479 = fadd float %1475, %1478 ; [#uses=1]
- %1480 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1481 = load float* %1480, align 4 ; [#uses=2]
- %1482 = fmul float %1481, %1456 ; [#uses=1]
- %1483 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1484 = load float* %1483, align 4 ; [#uses=2]
- %1485 = fmul float %1484, %1455 ; [#uses=1]
- %1486 = fadd float %1482, %1485 ; [#uses=1]
- %1487 = getelementptr inbounds %struct.btRigidBody* %1457, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1488 = load float* %1487, align 4 ; [#uses=2]
- %1489 = fmul float %1488, %1454 ; [#uses=1]
- %1490 = fadd float %1486, %1489 ; [#uses=1]
- %1491 = fmul float %1456, %1490 ; [#uses=1]
- %1492 = fmul float %1455, %1479 ; [#uses=1]
- %1493 = fadd float %1491, %1492 ; [#uses=1]
- %1494 = fmul float %1454, %1468 ; [#uses=1]
- %1495 = fadd float %1493, %1494 ; [#uses=1]
- %1496 = load %struct.btRigidBody** %52, align 4 ; [#uses=10]
- %1497 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1498 = load float* %1497, align 4 ; [#uses=1]
- %1499 = fmul float %1498, %1456 ; [#uses=1]
- %1500 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1501 = load float* %1500, align 4 ; [#uses=1]
- %1502 = fmul float %1501, %1455 ; [#uses=1]
- %1503 = fadd float %1499, %1502 ; [#uses=1]
- %1504 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1505 = load float* %1504, align 4 ; [#uses=1]
- %1506 = fmul float %1505, %1454 ; [#uses=1]
- %1507 = fadd float %1503, %1506 ; [#uses=1]
- %1508 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1509 = load float* %1508, align 4 ; [#uses=1]
- %1510 = fmul float %1509, %1456 ; [#uses=1]
- %1511 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1512 = load float* %1511, align 4 ; [#uses=1]
- %1513 = fmul float %1512, %1455 ; [#uses=1]
- %1514 = fadd float %1510, %1513 ; [#uses=1]
- %1515 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1516 = load float* %1515, align 4 ; [#uses=1]
- %1517 = fmul float %1516, %1454 ; [#uses=1]
- %1518 = fadd float %1514, %1517 ; [#uses=1]
- %1519 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1520 = load float* %1519, align 4 ; [#uses=1]
- %1521 = fmul float %1520, %1456 ; [#uses=1]
- %1522 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1523 = load float* %1522, align 4 ; [#uses=1]
- %1524 = fmul float %1523, %1455 ; [#uses=1]
- %1525 = fadd float %1521, %1524 ; [#uses=1]
- %1526 = getelementptr inbounds %struct.btRigidBody* %1496, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1527 = load float* %1526, align 4 ; [#uses=1]
- %1528 = fmul float %1527, %1454 ; [#uses=1]
- %1529 = fadd float %1525, %1528 ; [#uses=1]
- %1530 = fmul float %1456, %1529 ; [#uses=1]
- %1531 = fmul float %1455, %1518 ; [#uses=1]
- %1532 = fadd float %1530, %1531 ; [#uses=1]
- %1533 = fmul float %1454, %1507 ; [#uses=1]
- %1534 = fadd float %1532, %1533 ; [#uses=1]
- %1535 = fadd float %1495, %1534 ; [#uses=1]
- %1536 = fdiv float 1.000000e+00, %1535 ; [#uses=1]
- %1537 = fmul float %1411, %1536 ; [#uses=3]
- %1538 = fmul float %1443, %1537 ; [#uses=3]
- %1539 = fmul float %1444, %1537 ; [#uses=3]
- %1540 = fmul float %1445, %1537 ; [#uses=3]
- %1541 = fmul float %1540, %1540 ; [#uses=1]
- %1542 = fmul float %1539, %1539 ; [#uses=1]
- %1543 = fadd float %1541, %1542 ; [#uses=1]
- %1544 = fmul float %1538, %1538 ; [#uses=1]
- %1545 = fadd float %1543, %1544 ; [#uses=1]
- %1546 = call float @sqrtf(float %1545) nounwind readonly ; [#uses=7]
- %1547 = fdiv float 1.000000e+00, %1546 ; [#uses=3]
- %1548 = fmul float %1538, %1547 ; [#uses=6]
- %1549 = fmul float %1539, %1547 ; [#uses=6]
- %1550 = fmul float %1540, %1547 ; [#uses=6]
- %1551 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 4 ; [#uses=1]
- %1552 = load float* %1551, align 4 ; [#uses=1]
- %1553 = fcmp une float %1552, 0.000000e+00 ; [#uses=1]
- br i1 %1553, label %bb.i106, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit108
-
-bb.i106: ; preds = %bb50
- %1554 = fmul float %1470, %1549 ; [#uses=1]
- %1555 = fmul float %1481, %1550 ; [#uses=1]
- %1556 = fmul float %1473, %1549 ; [#uses=1]
- %1557 = fmul float %1484, %1550 ; [#uses=1]
- %1558 = fmul float %1477, %1549 ; [#uses=1]
- %1559 = fmul float %1488, %1550 ; [#uses=1]
- %1560 = fmul float %1459, %1548 ; [#uses=1]
- %1561 = fadd float %1555, %1554 ; [#uses=1]
- %1562 = fmul float %1462, %1548 ; [#uses=1]
- %1563 = fadd float %1557, %1556 ; [#uses=1]
- %1564 = fmul float %1466, %1548 ; [#uses=1]
- %1565 = fadd float %1559, %1558 ; [#uses=1]
- %1566 = fadd float %1561, %1560 ; [#uses=1]
- %1567 = fadd float %1563, %1562 ; [#uses=1]
- %1568 = fadd float %1565, %1564 ; [#uses=1]
- %1569 = fmul float %1546, 0.000000e+00 ; [#uses=3]
- %1570 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %1571 = load float* %1570, align 4 ; [#uses=1]
- %1572 = fadd float %1571, %1569 ; [#uses=1]
- store float %1572, float* %1570, align 4
- %1573 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %1574 = load float* %1573, align 4 ; [#uses=1]
- %1575 = fadd float %1574, %1569 ; [#uses=1]
- store float %1575, float* %1573, align 4
- %1576 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %1577 = load float* %1576, align 4 ; [#uses=1]
- %1578 = fadd float %1577, %1569 ; [#uses=1]
- store float %1578, float* %1576, align 4
- %1579 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %1580 = load float* %1579, align 4 ; [#uses=1]
- %1581 = fmul float %1580, %1546 ; [#uses=1]
- %1582 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %1583 = load float* %1582, align 4 ; [#uses=1]
- %1584 = fmul float %1583, %1546 ; [#uses=1]
- %1585 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %1586 = load float* %1585, align 4 ; [#uses=1]
- %1587 = fmul float %1586, %1546 ; [#uses=1]
- %1588 = fmul float %1568, %1581 ; [#uses=1]
- %1589 = fmul float %1567, %1584 ; [#uses=1]
- %1590 = fmul float %1566, %1587 ; [#uses=1]
- %1591 = fadd float %1426, %1590 ; [#uses=1]
- store float %1591, float* %1425, align 4
- %1592 = fadd float %1421, %1589 ; [#uses=1]
- store float %1592, float* %1420, align 4
- %1593 = fadd float %1416, %1588 ; [#uses=1]
- store float %1593, float* %1415, align 4
- %.pre = load %struct.btRigidBody** %52, align 4 ; [#uses=1]
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit108
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit108: ; preds = %bb.i106, %bb50
- %1594 = phi %struct.btRigidBody* [ %.pre, %bb.i106 ], [ %1496, %bb50 ] ; [#uses=9]
- %1595 = fsub float -0.000000e+00, %1546 ; [#uses=3]
- %1596 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 4 ; [#uses=1]
- %1597 = load float* %1596, align 4 ; [#uses=1]
- %1598 = fcmp une float %1597, 0.000000e+00 ; [#uses=1]
- br i1 %1598, label %bb.i103, label %bb59
-
-bb.i103: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit108
- %1599 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1600 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1601 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1602 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1603 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1604 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1605 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1606 = load float* %1599, align 4 ; [#uses=1]
- %1607 = load float* %1600, align 4 ; [#uses=1]
- %1608 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1609 = load float* %1601, align 4 ; [#uses=1]
- %1610 = load float* %1602, align 4 ; [#uses=1]
- %1611 = getelementptr inbounds %struct.btRigidBody* %1594, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1612 = load float* %1603, align 4 ; [#uses=1]
- %1613 = load float* %1604, align 4 ; [#uses=1]
- %1614 = load float* %1605, align 4 ; [#uses=1]
- %1615 = fmul float %1606, %1549 ; [#uses=1]
- %1616 = fmul float %1607, %1550 ; [#uses=1]
- %1617 = load float* %1608, align 4 ; [#uses=1]
- %1618 = fmul float %1609, %1549 ; [#uses=1]
- %1619 = fmul float %1610, %1550 ; [#uses=1]
- %1620 = load float* %1611, align 4 ; [#uses=1]
- %1621 = fmul float %1612, %1549 ; [#uses=1]
- %1622 = fmul float %1613, %1550 ; [#uses=1]
- %1623 = fmul float %1614, %1548 ; [#uses=1]
- %1624 = fadd float %1616, %1615 ; [#uses=1]
- %1625 = fmul float %1617, %1548 ; [#uses=1]
- %1626 = fadd float %1619, %1618 ; [#uses=1]
- %1627 = fmul float %1620, %1548 ; [#uses=1]
- %1628 = fadd float %1622, %1621 ; [#uses=1]
- %1629 = fadd float %1624, %1623 ; [#uses=1]
- %1630 = fadd float %1626, %1625 ; [#uses=1]
- %1631 = fadd float %1628, %1627 ; [#uses=1]
- %1632 = fmul float %1546, -0.000000e+00 ; [#uses=3]
- %1633 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %1634 = load float* %1633, align 4 ; [#uses=1]
- %1635 = fadd float %1634, %1632 ; [#uses=1]
- store float %1635, float* %1633, align 4
- %1636 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %1637 = load float* %1636, align 4 ; [#uses=1]
- %1638 = fadd float %1637, %1632 ; [#uses=1]
- store float %1638, float* %1636, align 4
- %1639 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %1640 = load float* %1639, align 4 ; [#uses=1]
- %1641 = fadd float %1640, %1632 ; [#uses=1]
- store float %1641, float* %1639, align 4
- %1642 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %1643 = load float* %1642, align 4 ; [#uses=1]
- %1644 = fmul float %1643, %1595 ; [#uses=1]
- %1645 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %1646 = load float* %1645, align 4 ; [#uses=1]
- %1647 = fmul float %1646, %1595 ; [#uses=1]
- %1648 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %1649 = load float* %1648, align 4 ; [#uses=1]
- %1650 = fmul float %1649, %1595 ; [#uses=1]
- %1651 = fmul float %1631, %1644 ; [#uses=1]
- %1652 = fmul float %1630, %1647 ; [#uses=1]
- %1653 = fmul float %1629, %1650 ; [#uses=1]
- %1654 = load float* %1440, align 4 ; [#uses=1]
- %1655 = fadd float %1654, %1653 ; [#uses=1]
- store float %1655, float* %1440, align 4
- %1656 = load float* %1435, align 4 ; [#uses=1]
- %1657 = fadd float %1656, %1652 ; [#uses=1]
- store float %1657, float* %1435, align 4
- %1658 = load float* %1430, align 4 ; [#uses=1]
- %1659 = fadd float %1658, %1651 ; [#uses=1]
- store float %1659, float* %1430, align 4
- br label %bb59
-
-bb59: ; preds = %bb.i103, %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit108, %bb45, %bb44, %bb.i109, %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit114, %bb17
- %1660 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1661 = load float* %1660, align 4 ; [#uses=1]
- %1662 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 2 ; [#uses=5]
- %1663 = load float* %1662, align 4 ; [#uses=1]
- %1664 = fadd float %1661, %1663 ; [#uses=2]
- %1665 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %1666 = load float* %1665, align 4 ; [#uses=1]
- %1667 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 1 ; [#uses=5]
- %1668 = load float* %1667, align 4 ; [#uses=1]
- %1669 = fadd float %1666, %1668 ; [#uses=2]
- %1670 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1671 = load float* %1670, align 4 ; [#uses=1]
- %1672 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 25, i32 0, i32 0 ; [#uses=5]
- %1673 = load float* %1672, align 4 ; [#uses=1]
- %1674 = fadd float %1671, %1673 ; [#uses=2]
- %1675 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %1676 = load float* %1675, align 4 ; [#uses=1]
- %1677 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 2 ; [#uses=5]
- %1678 = load float* %1677, align 4 ; [#uses=1]
- %1679 = fadd float %1676, %1678 ; [#uses=2]
- %1680 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %1681 = load float* %1680, align 4 ; [#uses=1]
- %1682 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 1 ; [#uses=5]
- %1683 = load float* %1682, align 4 ; [#uses=1]
- %1684 = fadd float %1681, %1683 ; [#uses=2]
- %1685 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1686 = load float* %1685, align 4 ; [#uses=1]
- %1687 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 25, i32 0, i32 0 ; [#uses=5]
- %1688 = load float* %1687, align 4 ; [#uses=1]
- %1689 = fadd float %1686, %1688 ; [#uses=2]
- %1690 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=1]
- %1691 = load i8* %1690, align 2 ; [#uses=1]
- %toBool64 = icmp eq i8 %1691, 0 ; [#uses=1]
- br i1 %toBool64, label %bb78, label %bb65
-
-bb65: ; preds = %bb59
- %1692 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 26 ; [#uses=1]
- %1693 = load float* %1692, align 4 ; [#uses=2]
- %1694 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %1695 = load float* %1694, align 4 ; [#uses=1]
- %1696 = fmul float %1693, %1695 ; [#uses=1]
- %1697 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %1698 = load float* %1697, align 4 ; [#uses=1]
- %1699 = fmul float %1696, %1698 ; [#uses=1]
- %1700 = fdiv float %1699, %timeStep ; [#uses=2]
- %1701 = fsub float %1679, %1664 ; [#uses=1]
- %1702 = fsub float %1684, %1669 ; [#uses=1]
- %1703 = fsub float %1689, %1674 ; [#uses=1]
- %1704 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=1]
- %1705 = load float* %1704, align 4 ; [#uses=2]
- %1706 = fmul float %1703, %1705 ; [#uses=1]
- %1707 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=1]
- %1708 = load float* %1707, align 4 ; [#uses=2]
- %1709 = fmul float %1702, %1708 ; [#uses=1]
- %1710 = fadd float %1706, %1709 ; [#uses=1]
- %1711 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=1]
- %1712 = load float* %1711, align 4 ; [#uses=2]
- %1713 = fmul float %1701, %1712 ; [#uses=1]
- %1714 = fadd float %1710, %1713 ; [#uses=2]
- %1715 = fcmp ogt float %1714, 0.000000e+00 ; [#uses=1]
- br i1 %1715, label %bb74, label %bb75
-
-bb74: ; preds = %bb65
- %1716 = fmul float %1693, %1714 ; [#uses=1]
- %1717 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %1718 = load float* %1717, align 4 ; [#uses=1]
- %1719 = fmul float %1716, %1718 ; [#uses=1]
- %1720 = fadd float %1719, %1700 ; [#uses=1]
- br label %bb75
-
-bb75: ; preds = %bb74, %bb65
- %amplitude.0 = phi float [ %1720, %bb74 ], [ %1700, %bb65 ] ; [#uses=1]
- %1721 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 14 ; [#uses=1]
- %1722 = load float* %1721, align 4 ; [#uses=1]
- %1723 = fmul float %1722, %amplitude.0 ; [#uses=1]
- %1724 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 20 ; [#uses=2]
- %1725 = load float* %1724, align 4 ; [#uses=2]
- %1726 = fadd float %1725, %1723 ; [#uses=2]
- %1727 = fcmp ogt float %1726, 0.000000e+00 ; [#uses=1]
- %1728 = select i1 %1727, float %1726, float 0.000000e+00 ; [#uses=2]
- store float %1728, float* %1724, align 4
- %1729 = fsub float %1728, %1725 ; [#uses=3]
- %1730 = fmul float %1712, %1729 ; [#uses=2]
- %1731 = fmul float %1708, %1729 ; [#uses=2]
- %1732 = fmul float %1705, %1729 ; [#uses=2]
- %1733 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 0 ; [#uses=1]
- %1734 = load float* %1733, align 4 ; [#uses=2]
- %1735 = fmul float %1732, %1734 ; [#uses=1]
- %1736 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 1 ; [#uses=1]
- %1737 = load float* %1736, align 4 ; [#uses=2]
- %1738 = fmul float %1731, %1737 ; [#uses=1]
- %1739 = fadd float %1735, %1738 ; [#uses=1]
- %1740 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 2 ; [#uses=1]
- %1741 = load float* %1740, align 4 ; [#uses=2]
- %1742 = fmul float %1730, %1741 ; [#uses=1]
- %1743 = fadd float %1739, %1742 ; [#uses=3]
- %1744 = fmul float %1741, %1743 ; [#uses=1]
- %1745 = fmul float %1737, %1743 ; [#uses=1]
- %1746 = fmul float %1734, %1743 ; [#uses=1]
- %1747 = fsub float %1730, %1744 ; [#uses=3]
- %1748 = fsub float %1731, %1745 ; [#uses=3]
- %1749 = fsub float %1732, %1746 ; [#uses=3]
- %1750 = fmul float %1749, %1749 ; [#uses=1]
- %1751 = fmul float %1748, %1748 ; [#uses=1]
- %1752 = fadd float %1750, %1751 ; [#uses=1]
- %1753 = fmul float %1747, %1747 ; [#uses=1]
- %1754 = fadd float %1752, %1753 ; [#uses=1]
- %1755 = call float @sqrtf(float %1754) nounwind readonly ; [#uses=7]
- %1756 = fdiv float 1.000000e+00, %1755 ; [#uses=3]
- %1757 = fmul float %1747, %1756 ; [#uses=6]
- %1758 = fmul float %1748, %1756 ; [#uses=6]
- %1759 = fmul float %1749, %1756 ; [#uses=6]
- %1760 = load %struct.btRigidBody** %2, align 4 ; [#uses=9]
- %1761 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 4 ; [#uses=1]
- %1762 = load float* %1761, align 4 ; [#uses=1]
- %1763 = fcmp une float %1762, 0.000000e+00 ; [#uses=1]
- br i1 %1763, label %bb.i99, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit101
-
-bb.i99: ; preds = %bb75
- %1764 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1765 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1766 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1767 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1768 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1769 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1770 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1771 = load float* %1764, align 4 ; [#uses=1]
- %1772 = load float* %1765, align 4 ; [#uses=1]
- %1773 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1774 = load float* %1766, align 4 ; [#uses=1]
- %1775 = load float* %1767, align 4 ; [#uses=1]
- %1776 = getelementptr inbounds %struct.btRigidBody* %1760, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1777 = load float* %1768, align 4 ; [#uses=1]
- %1778 = load float* %1769, align 4 ; [#uses=1]
- %1779 = load float* %1770, align 4 ; [#uses=1]
- %1780 = fmul float %1771, %1758 ; [#uses=1]
- %1781 = fmul float %1772, %1759 ; [#uses=1]
- %1782 = load float* %1773, align 4 ; [#uses=1]
- %1783 = fmul float %1774, %1758 ; [#uses=1]
- %1784 = fmul float %1775, %1759 ; [#uses=1]
- %1785 = load float* %1776, align 4 ; [#uses=1]
- %1786 = fmul float %1777, %1758 ; [#uses=1]
- %1787 = fmul float %1778, %1759 ; [#uses=1]
- %1788 = fmul float %1779, %1757 ; [#uses=1]
- %1789 = fadd float %1781, %1780 ; [#uses=1]
- %1790 = fmul float %1782, %1757 ; [#uses=1]
- %1791 = fadd float %1784, %1783 ; [#uses=1]
- %1792 = fmul float %1785, %1757 ; [#uses=1]
- %1793 = fadd float %1787, %1786 ; [#uses=1]
- %1794 = fadd float %1789, %1788 ; [#uses=1]
- %1795 = fadd float %1791, %1790 ; [#uses=1]
- %1796 = fadd float %1793, %1792 ; [#uses=1]
- %1797 = fmul float %1755, 0.000000e+00 ; [#uses=3]
- %1798 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %1799 = load float* %1798, align 4 ; [#uses=1]
- %1800 = fadd float %1799, %1797 ; [#uses=1]
- store float %1800, float* %1798, align 4
- %1801 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %1802 = load float* %1801, align 4 ; [#uses=1]
- %1803 = fadd float %1802, %1797 ; [#uses=1]
- store float %1803, float* %1801, align 4
- %1804 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %1805 = load float* %1804, align 4 ; [#uses=1]
- %1806 = fadd float %1805, %1797 ; [#uses=1]
- store float %1806, float* %1804, align 4
- %1807 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %1808 = load float* %1807, align 4 ; [#uses=1]
- %1809 = fmul float %1808, %1755 ; [#uses=1]
- %1810 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %1811 = load float* %1810, align 4 ; [#uses=1]
- %1812 = fmul float %1811, %1755 ; [#uses=1]
- %1813 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %1814 = load float* %1813, align 4 ; [#uses=1]
- %1815 = fmul float %1814, %1755 ; [#uses=1]
- %1816 = fmul float %1796, %1809 ; [#uses=1]
- %1817 = fmul float %1795, %1812 ; [#uses=1]
- %1818 = fmul float %1794, %1815 ; [#uses=1]
- %1819 = load float* %1672, align 4 ; [#uses=1]
- %1820 = fadd float %1819, %1818 ; [#uses=1]
- store float %1820, float* %1672, align 4
- %1821 = load float* %1667, align 4 ; [#uses=1]
- %1822 = fadd float %1821, %1817 ; [#uses=1]
- store float %1822, float* %1667, align 4
- %1823 = load float* %1662, align 4 ; [#uses=1]
- %1824 = fadd float %1823, %1816 ; [#uses=1]
- store float %1824, float* %1662, align 4
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit101
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit101: ; preds = %bb.i99, %bb75
- %1825 = fsub float -0.000000e+00, %1755 ; [#uses=3]
- %1826 = load %struct.btRigidBody** %52, align 4 ; [#uses=9]
- %1827 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 4 ; [#uses=1]
- %1828 = load float* %1827, align 4 ; [#uses=1]
- %1829 = fcmp une float %1828, 0.000000e+00 ; [#uses=1]
- br i1 %1829, label %bb.i96, label %bb78
-
-bb.i96: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit101
- %1830 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1831 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1832 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1833 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1834 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1835 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1836 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1837 = load float* %1830, align 4 ; [#uses=1]
- %1838 = load float* %1831, align 4 ; [#uses=1]
- %1839 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1840 = load float* %1832, align 4 ; [#uses=1]
- %1841 = load float* %1833, align 4 ; [#uses=1]
- %1842 = getelementptr inbounds %struct.btRigidBody* %1826, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1843 = load float* %1834, align 4 ; [#uses=1]
- %1844 = load float* %1835, align 4 ; [#uses=1]
- %1845 = load float* %1836, align 4 ; [#uses=1]
- %1846 = fmul float %1837, %1758 ; [#uses=1]
- %1847 = fmul float %1838, %1759 ; [#uses=1]
- %1848 = load float* %1839, align 4 ; [#uses=1]
- %1849 = fmul float %1840, %1758 ; [#uses=1]
- %1850 = fmul float %1841, %1759 ; [#uses=1]
- %1851 = load float* %1842, align 4 ; [#uses=1]
- %1852 = fmul float %1843, %1758 ; [#uses=1]
- %1853 = fmul float %1844, %1759 ; [#uses=1]
- %1854 = fmul float %1845, %1757 ; [#uses=1]
- %1855 = fadd float %1847, %1846 ; [#uses=1]
- %1856 = fmul float %1848, %1757 ; [#uses=1]
- %1857 = fadd float %1850, %1849 ; [#uses=1]
- %1858 = fmul float %1851, %1757 ; [#uses=1]
- %1859 = fadd float %1853, %1852 ; [#uses=1]
- %1860 = fadd float %1855, %1854 ; [#uses=1]
- %1861 = fadd float %1857, %1856 ; [#uses=1]
- %1862 = fadd float %1859, %1858 ; [#uses=1]
- %1863 = fmul float %1755, -0.000000e+00 ; [#uses=3]
- %1864 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %1865 = load float* %1864, align 4 ; [#uses=1]
- %1866 = fadd float %1865, %1863 ; [#uses=1]
- store float %1866, float* %1864, align 4
- %1867 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %1868 = load float* %1867, align 4 ; [#uses=1]
- %1869 = fadd float %1868, %1863 ; [#uses=1]
- store float %1869, float* %1867, align 4
- %1870 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %1871 = load float* %1870, align 4 ; [#uses=1]
- %1872 = fadd float %1871, %1863 ; [#uses=1]
- store float %1872, float* %1870, align 4
- %1873 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %1874 = load float* %1873, align 4 ; [#uses=1]
- %1875 = fmul float %1874, %1825 ; [#uses=1]
- %1876 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %1877 = load float* %1876, align 4 ; [#uses=1]
- %1878 = fmul float %1877, %1825 ; [#uses=1]
- %1879 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %1880 = load float* %1879, align 4 ; [#uses=1]
- %1881 = fmul float %1880, %1825 ; [#uses=1]
- %1882 = fmul float %1862, %1875 ; [#uses=1]
- %1883 = fmul float %1861, %1878 ; [#uses=1]
- %1884 = fmul float %1860, %1881 ; [#uses=1]
- %1885 = load float* %1687, align 4 ; [#uses=1]
- %1886 = fadd float %1885, %1884 ; [#uses=1]
- store float %1886, float* %1687, align 4
- %1887 = load float* %1682, align 4 ; [#uses=1]
- %1888 = fadd float %1887, %1883 ; [#uses=1]
- store float %1888, float* %1682, align 4
- %1889 = load float* %1677, align 4 ; [#uses=1]
- %1890 = fadd float %1889, %1882 ; [#uses=1]
- store float %1890, float* %1677, align 4
- br label %bb78
-
-bb78: ; preds = %bb.i96, %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit101, %bb59
- %1891 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=1]
- %1892 = load i8* %1891, align 1 ; [#uses=1]
- %toBool79 = icmp eq i8 %1892, 0 ; [#uses=1]
- br i1 %toBool79, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit, label %bb80
-
-bb80: ; preds = %bb78
- %1893 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 27 ; [#uses=1]
- %1894 = load float* %1893, align 4 ; [#uses=2]
- %1895 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %1896 = load float* %1895, align 4 ; [#uses=1]
- %1897 = fmul float %1894, %1896 ; [#uses=1]
- %1898 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %1899 = load float* %1898, align 4 ; [#uses=1]
- %1900 = fmul float %1897, %1899 ; [#uses=1]
- %1901 = fdiv float %1900, %timeStep ; [#uses=2]
- %1902 = fsub float %1679, %1664 ; [#uses=1]
- %1903 = fsub float %1684, %1669 ; [#uses=1]
- %1904 = fsub float %1689, %1674 ; [#uses=1]
- %1905 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 0 ; [#uses=2]
- %1906 = load float* %1905, align 4 ; [#uses=5]
- %1907 = fmul float %1904, %1906 ; [#uses=1]
- %1908 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 1 ; [#uses=2]
- %1909 = load float* %1908, align 4 ; [#uses=5]
- %1910 = fmul float %1903, %1909 ; [#uses=1]
- %1911 = fadd float %1907, %1910 ; [#uses=1]
- %1912 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 2 ; [#uses=2]
- %1913 = load float* %1912, align 4 ; [#uses=5]
- %1914 = fmul float %1902, %1913 ; [#uses=1]
- %1915 = fadd float %1911, %1914 ; [#uses=2]
- %1916 = fcmp ogt float %1915, 0.000000e+00 ; [#uses=1]
- br i1 %1916, label %bb90, label %bb91
-
-bb90: ; preds = %bb80
- %1917 = fmul float %1894, %1915 ; [#uses=1]
- %1918 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %1919 = load float* %1918, align 4 ; [#uses=1]
- %1920 = fmul float %1917, %1919 ; [#uses=1]
- %1921 = fadd float %1920, %1901 ; [#uses=1]
- br label %bb91
-
-bb91: ; preds = %bb90, %bb80
- %amplitude82.0 = phi float [ %1921, %bb90 ], [ %1901, %bb80 ] ; [#uses=1]
- %1922 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 15 ; [#uses=1]
- %1923 = load float* %1922, align 4 ; [#uses=1]
- %1924 = fmul float %1923, %amplitude82.0 ; [#uses=1]
- %1925 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 21 ; [#uses=2]
- %1926 = load float* %1925, align 4 ; [#uses=2]
- %1927 = fadd float %1926, %1924 ; [#uses=2]
- %1928 = fcmp ogt float %1927, 0.000000e+00 ; [#uses=1]
- %1929 = select i1 %1928, float %1927, float 0.000000e+00 ; [#uses=2]
- store float %1929, float* %1925, align 4
- %1930 = fsub float %1929, %1926 ; [#uses=6]
- %1931 = load %struct.btRigidBody** %2, align 4 ; [#uses=9]
- %1932 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 4 ; [#uses=1]
- %1933 = load float* %1932, align 4 ; [#uses=1]
- %1934 = fcmp une float %1933, 0.000000e+00 ; [#uses=1]
- br i1 %1934, label %bb.i93, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit95
-
-bb.i93: ; preds = %bb91
- %1935 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1936 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1937 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1938 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1939 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1940 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1941 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1942 = load float* %1935, align 4 ; [#uses=1]
- %1943 = load float* %1936, align 4 ; [#uses=1]
- %1944 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1945 = load float* %1937, align 4 ; [#uses=1]
- %1946 = load float* %1938, align 4 ; [#uses=1]
- %1947 = getelementptr inbounds %struct.btRigidBody* %1931, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1948 = load float* %1939, align 4 ; [#uses=1]
- %1949 = load float* %1940, align 4 ; [#uses=1]
- %1950 = load float* %1941, align 4 ; [#uses=1]
- %1951 = fmul float %1942, %1909 ; [#uses=1]
- %1952 = fmul float %1943, %1906 ; [#uses=1]
- %1953 = load float* %1944, align 4 ; [#uses=1]
- %1954 = fmul float %1945, %1909 ; [#uses=1]
- %1955 = fmul float %1946, %1906 ; [#uses=1]
- %1956 = load float* %1947, align 4 ; [#uses=1]
- %1957 = fmul float %1948, %1909 ; [#uses=1]
- %1958 = fmul float %1949, %1906 ; [#uses=1]
- %1959 = fmul float %1950, %1913 ; [#uses=1]
- %1960 = fadd float %1952, %1951 ; [#uses=1]
- %1961 = fmul float %1953, %1913 ; [#uses=1]
- %1962 = fadd float %1955, %1954 ; [#uses=1]
- %1963 = fmul float %1956, %1913 ; [#uses=1]
- %1964 = fadd float %1958, %1957 ; [#uses=1]
- %1965 = fadd float %1960, %1959 ; [#uses=1]
- %1966 = fadd float %1962, %1961 ; [#uses=1]
- %1967 = fadd float %1964, %1963 ; [#uses=1]
- %1968 = fmul float %1930, 0.000000e+00 ; [#uses=3]
- %1969 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %1970 = load float* %1969, align 4 ; [#uses=1]
- %1971 = fadd float %1970, %1968 ; [#uses=1]
- store float %1971, float* %1969, align 4
- %1972 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %1973 = load float* %1972, align 4 ; [#uses=1]
- %1974 = fadd float %1973, %1968 ; [#uses=1]
- store float %1974, float* %1972, align 4
- %1975 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %1976 = load float* %1975, align 4 ; [#uses=1]
- %1977 = fadd float %1976, %1968 ; [#uses=1]
- store float %1977, float* %1975, align 4
- %1978 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %1979 = load float* %1978, align 4 ; [#uses=1]
- %1980 = fmul float %1979, %1930 ; [#uses=1]
- %1981 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %1982 = load float* %1981, align 4 ; [#uses=1]
- %1983 = fmul float %1982, %1930 ; [#uses=1]
- %1984 = getelementptr inbounds %struct.btRigidBody* %bodyA, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %1985 = load float* %1984, align 4 ; [#uses=1]
- %1986 = fmul float %1985, %1930 ; [#uses=1]
- %1987 = fmul float %1967, %1980 ; [#uses=1]
- %1988 = fmul float %1966, %1983 ; [#uses=1]
- %1989 = fmul float %1965, %1986 ; [#uses=1]
- %1990 = load float* %1672, align 4 ; [#uses=1]
- %1991 = fadd float %1990, %1989 ; [#uses=1]
- store float %1991, float* %1672, align 4
- %1992 = load float* %1667, align 4 ; [#uses=1]
- %1993 = fadd float %1992, %1988 ; [#uses=1]
- store float %1993, float* %1667, align 4
- %1994 = load float* %1662, align 4 ; [#uses=1]
- %1995 = fadd float %1994, %1987 ; [#uses=1]
- store float %1995, float* %1662, align 4
- %.pre435 = load float* %1905, align 4 ; [#uses=1]
- %.pre436 = load float* %1908, align 4 ; [#uses=1]
- %.pre437 = load float* %1912, align 4 ; [#uses=1]
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit95
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit95: ; preds = %bb.i93, %bb91
- %1996 = phi float [ %.pre437, %bb.i93 ], [ %1913, %bb91 ] ; [#uses=3]
- %1997 = phi float [ %.pre436, %bb.i93 ], [ %1909, %bb91 ] ; [#uses=3]
- %1998 = phi float [ %.pre435, %bb.i93 ], [ %1906, %bb91 ] ; [#uses=3]
- %1999 = fsub float -0.000000e+00, %1930 ; [#uses=3]
- %2000 = load %struct.btRigidBody** %52, align 4 ; [#uses=9]
- %2001 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 4 ; [#uses=1]
- %2002 = load float* %2001, align 4 ; [#uses=1]
- %2003 = fcmp une float %2002, 0.000000e+00 ; [#uses=1]
- br i1 %2003, label %bb.i, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit
-
-bb.i: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit95
- %2004 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %2005 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2006 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %2007 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2008 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %2009 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %2010 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %2011 = load float* %2004, align 4 ; [#uses=1]
- %2012 = load float* %2005, align 4 ; [#uses=1]
- %2013 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %2014 = load float* %2006, align 4 ; [#uses=1]
- %2015 = load float* %2007, align 4 ; [#uses=1]
- %2016 = getelementptr inbounds %struct.btRigidBody* %2000, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %2017 = load float* %2008, align 4 ; [#uses=1]
- %2018 = load float* %2009, align 4 ; [#uses=1]
- %2019 = load float* %2010, align 4 ; [#uses=1]
- %2020 = fmul float %2011, %1997 ; [#uses=1]
- %2021 = fmul float %2012, %1998 ; [#uses=1]
- %2022 = load float* %2013, align 4 ; [#uses=1]
- %2023 = fmul float %2014, %1997 ; [#uses=1]
- %2024 = fmul float %2015, %1998 ; [#uses=1]
- %2025 = load float* %2016, align 4 ; [#uses=1]
- %2026 = fmul float %2017, %1997 ; [#uses=1]
- %2027 = fmul float %2018, %1998 ; [#uses=1]
- %2028 = fmul float %2019, %1996 ; [#uses=1]
- %2029 = fadd float %2021, %2020 ; [#uses=1]
- %2030 = fmul float %2022, %1996 ; [#uses=1]
- %2031 = fadd float %2024, %2023 ; [#uses=1]
- %2032 = fmul float %2025, %1996 ; [#uses=1]
- %2033 = fadd float %2027, %2026 ; [#uses=1]
- %2034 = fadd float %2029, %2028 ; [#uses=1]
- %2035 = fadd float %2031, %2030 ; [#uses=1]
- %2036 = fadd float %2033, %2032 ; [#uses=1]
- %2037 = fmul float %1930, -0.000000e+00 ; [#uses=3]
- %2038 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %2039 = load float* %2038, align 4 ; [#uses=1]
- %2040 = fadd float %2039, %2037 ; [#uses=1]
- store float %2040, float* %2038, align 4
- %2041 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %2042 = load float* %2041, align 4 ; [#uses=1]
- %2043 = fadd float %2042, %2037 ; [#uses=1]
- store float %2043, float* %2041, align 4
- %2044 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %2045 = load float* %2044, align 4 ; [#uses=1]
- %2046 = fadd float %2045, %2037 ; [#uses=1]
- store float %2046, float* %2044, align 4
- %2047 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %2048 = load float* %2047, align 4 ; [#uses=1]
- %2049 = fmul float %2048, %1999 ; [#uses=1]
- %2050 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %2051 = load float* %2050, align 4 ; [#uses=1]
- %2052 = fmul float %2051, %1999 ; [#uses=1]
- %2053 = getelementptr inbounds %struct.btRigidBody* %bodyB, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %2054 = load float* %2053, align 4 ; [#uses=1]
- %2055 = fmul float %2054, %1999 ; [#uses=1]
- %2056 = fmul float %2036, %2049 ; [#uses=1]
- %2057 = fmul float %2035, %2052 ; [#uses=1]
- %2058 = fmul float %2034, %2055 ; [#uses=1]
- %2059 = load float* %1687, align 4 ; [#uses=1]
- %2060 = fadd float %2059, %2058 ; [#uses=1]
- store float %2060, float* %1687, align 4
- %2061 = load float* %1682, align 4 ; [#uses=1]
- %2062 = fadd float %2061, %2057 ; [#uses=1]
- store float %2062, float* %1682, align 4
- %2063 = load float* %1677, align 4 ; [#uses=1]
- %2064 = fadd float %2063, %2056 ; [#uses=1]
- store float %2064, float* %1677, align 4
- ret void
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit95, %bb78, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK21btConeTwistConstraint33adjustSwingAxisToUseEllipseNormalER9btVector3(%struct.btConeTwistConstraint* nocapture %this, %struct.btQuadWord* nocapture %vSwingAxis) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %vSwingAxis, i32 0, i32 0, i32 2 ; [#uses=3]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fsub float -0.000000e+00, %1 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuadWord* %vSwingAxis, i32 0, i32 0, i32 1 ; [#uses=3]
- %4 = load float* %3, align 4 ; [#uses=7]
- %5 = tail call float @fabsf(float %4) nounwind readnone ; [#uses=1]
- %6 = fcmp ogt float %5, 0x3E80000000000000 ; [#uses=1]
- br i1 %6, label %bb, label %return
-
-bb: ; preds = %entry
- %7 = fdiv float %2, %4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fdiv float %9, %11 ; [#uses=1]
- %13 = fmul float %12, %7 ; [#uses=1]
- %14 = fcmp ogt float %2, 0.000000e+00 ; [#uses=1]
- %15 = fmul float %13, %4 ; [#uses=1]
- %16 = tail call float @fabsf(float %15) nounwind readnone ; [#uses=2]
- br i1 %14, label %bb3, label %bb2
-
-bb2: ; preds = %bb
- %17 = fsub float -0.000000e+00, %16 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb
- %y.0 = phi float [ %17, %bb2 ], [ %16, %bb ] ; [#uses=3]
- %18 = fsub float -0.000000e+00, %y.0 ; [#uses=2]
- store float %18, float* %0, align 4
- store float %4, float* %3, align 4
- %19 = getelementptr inbounds %struct.btQuadWord* %vSwingAxis, i32 0, i32 0, i32 0 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %20, %20 ; [#uses=1]
- %22 = fmul float %4, %4 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = fmul float %y.0, %y.0 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = tail call float @sqrtf(float %25) nounwind readonly ; [#uses=1]
- %27 = fdiv float 1.000000e+00, %26 ; [#uses=3]
- %28 = fmul float %20, %27 ; [#uses=1]
- store float %28, float* %19, align 4
- %29 = fmul float %4, %27 ; [#uses=1]
- store float %29, float* %3, align 4
- %30 = fmul float %27, %18 ; [#uses=1]
- store float %30, float* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraint13calcAngleInfoEv(%struct.btConeTwistConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 17 ; [#uses=2]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=3]
- store i8 0, i8* %2, align 1
- %3 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=2]
- store i8 0, i8* %3, align 2
- %4 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = load float* %5, align 4 ; [#uses=3]
- %9 = load float* %4, align 4 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %11 = load %struct.btRigidBody** %10, align 4 ; [#uses=9]
- %12 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fmul float %13, %7 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fmul float %16, %8 ; [#uses=1]
- %18 = fadd float %14, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %20, %9 ; [#uses=1]
- %22 = fadd float %18, %21 ; [#uses=8]
- %23 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=3]
- %25 = fmul float %24, %7 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=3]
- %28 = fmul float %27, %8 ; [#uses=1]
- %29 = fadd float %25, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=3]
- %32 = fmul float %31, %9 ; [#uses=1]
- %33 = fadd float %29, %32 ; [#uses=8]
- %34 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=3]
- %36 = fmul float %35, %7 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=3]
- %39 = fmul float %38, %8 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=3]
- %43 = fmul float %42, %9 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=8]
- %45 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=3]
- %49 = load float* %46, align 4 ; [#uses=3]
- %50 = load float* %45, align 4 ; [#uses=3]
- %51 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %52 = load %struct.btRigidBody** %51, align 4 ; [#uses=9]
- %53 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %48 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fmul float %57, %49 ; [#uses=1]
- %59 = fadd float %55, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %61, %50 ; [#uses=1]
- %63 = fadd float %59, %62 ; [#uses=18]
- %64 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = fmul float %65, %48 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %68, %49 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %72, %50 ; [#uses=1]
- %74 = fadd float %70, %73 ; [#uses=20]
- %75 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fmul float %76, %48 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = fmul float %79, %49 ; [#uses=1]
- %81 = fadd float %77, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fmul float %83, %50 ; [#uses=1]
- %85 = fadd float %81, %84 ; [#uses=17]
- %86 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=3]
- %88 = fcmp ult float %87, 0x3FA99999A0000000 ; [#uses=1]
- br i1 %88, label %bb3, label %bb
-
-bb: ; preds = %entry
- %89 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=3]
- %93 = load float* %90, align 4 ; [#uses=3]
- %94 = load float* %89, align 4 ; [#uses=3]
- %95 = fmul float %13, %92 ; [#uses=1]
- %96 = fmul float %16, %93 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %20, %94 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=2]
- %100 = fmul float %24, %92 ; [#uses=1]
- %101 = fmul float %27, %93 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %31, %94 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=2]
- %105 = fmul float %35, %92 ; [#uses=1]
- %106 = fmul float %38, %93 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %42, %94 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=2]
- %110 = fmul float %85, %44 ; [#uses=1]
- %111 = fmul float %74, %33 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %63, %22 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=7]
- %115 = fmul float %85, %109 ; [#uses=1]
- %116 = fmul float %74, %104 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %63, %99 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=4]
- %120 = tail call float @fabsf(float %119) nounwind readnone ; [#uses=4]
- %121 = fcmp ult float %114, 0.000000e+00 ; [#uses=1]
- br i1 %121, label %bb1.i40, label %bb.i39
-
-bb.i39: ; preds = %bb
- %122 = fsub float %114, %120 ; [#uses=1]
- %123 = fadd float %120, %114 ; [#uses=1]
- %124 = fdiv float %122, %123 ; [#uses=1]
- %125 = fmul float %124, 0x3FE921FB60000000 ; [#uses=1]
- %126 = fsub float 0x3FE921FB60000000, %125 ; [#uses=1]
- br label %bb3.i42
-
-bb1.i40: ; preds = %bb
- %127 = fadd float %120, %114 ; [#uses=1]
- %128 = fsub float %120, %114 ; [#uses=1]
- %129 = fdiv float %127, %128 ; [#uses=1]
- %130 = fmul float %129, 0x3FE921FB60000000 ; [#uses=1]
- %131 = fsub float 0x4002D97C80000000, %130 ; [#uses=1]
- br label %bb3.i42
-
-bb3.i42: ; preds = %bb1.i40, %bb.i39
- %angle.0.i41 = phi float [ %126, %bb.i39 ], [ %131, %bb1.i40 ] ; [#uses=2]
- %132 = fcmp olt float %119, 0.000000e+00 ; [#uses=1]
- br i1 %132, label %bb4.i43, label %_Z11btAtan2Fastff.exit45
-
-bb4.i43: ; preds = %bb3.i42
- %133 = fsub float -0.000000e+00, %angle.0.i41 ; [#uses=1]
- br label %_Z11btAtan2Fastff.exit45
-
-_Z11btAtan2Fastff.exit45: ; preds = %bb4.i43, %bb3.i42
- %134 = phi float [ %133, %bb4.i43 ], [ %angle.0.i41, %bb3.i42 ] ; [#uses=1]
- %135 = fmul float %119, %119 ; [#uses=1]
- %136 = fmul float %114, %114 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %137, 1.000000e+01 ; [#uses=1]
- %139 = fmul float %138, 1.000000e+01 ; [#uses=2]
- %140 = fadd float %139, 1.000000e+00 ; [#uses=1]
- %141 = fdiv float %139, %140 ; [#uses=1]
- %142 = fmul float %134, %141 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %_Z11btAtan2Fastff.exit45, %entry
- %b1Axis2.0.0.0 = phi float [ undef, %entry ], [ %109, %_Z11btAtan2Fastff.exit45 ] ; [#uses=3]
- %b1Axis2.0.1.0 = phi float [ undef, %entry ], [ %104, %_Z11btAtan2Fastff.exit45 ] ; [#uses=3]
- %b1Axis2.0.2.0 = phi float [ undef, %entry ], [ %99, %_Z11btAtan2Fastff.exit45 ] ; [#uses=3]
- %swing1.0 = phi float [ 0.000000e+00, %entry ], [ %142, %_Z11btAtan2Fastff.exit45 ] ; [#uses=2]
- %143 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=3]
- %145 = fcmp ult float %144, 0x3FA99999A0000000 ; [#uses=1]
- br i1 %145, label %bb6, label %bb4
-
-bb4: ; preds = %bb3
- %146 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=3]
- %150 = load float* %147, align 4 ; [#uses=3]
- %151 = load float* %146, align 4 ; [#uses=3]
- %152 = fmul float %13, %149 ; [#uses=1]
- %153 = fmul float %16, %150 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %20, %151 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=2]
- %157 = fmul float %24, %149 ; [#uses=1]
- %158 = fmul float %27, %150 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fmul float %31, %151 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=2]
- %162 = fmul float %35, %149 ; [#uses=1]
- %163 = fmul float %38, %150 ; [#uses=1]
- %164 = fadd float %162, %163 ; [#uses=1]
- %165 = fmul float %42, %151 ; [#uses=1]
- %166 = fadd float %164, %165 ; [#uses=2]
- %167 = fmul float %85, %44 ; [#uses=1]
- %168 = fmul float %74, %33 ; [#uses=1]
- %169 = fadd float %167, %168 ; [#uses=1]
- %170 = fmul float %63, %22 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=7]
- %172 = fmul float %85, %166 ; [#uses=1]
- %173 = fmul float %74, %161 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=1]
- %175 = fmul float %63, %156 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=4]
- %177 = tail call float @fabsf(float %176) nounwind readnone ; [#uses=4]
- %178 = fcmp ult float %171, 0.000000e+00 ; [#uses=1]
- br i1 %178, label %bb1.i33, label %bb.i32
-
-bb.i32: ; preds = %bb4
- %179 = fsub float %171, %177 ; [#uses=1]
- %180 = fadd float %177, %171 ; [#uses=1]
- %181 = fdiv float %179, %180 ; [#uses=1]
- %182 = fmul float %181, 0x3FE921FB60000000 ; [#uses=1]
- %183 = fsub float 0x3FE921FB60000000, %182 ; [#uses=1]
- br label %bb3.i35
-
-bb1.i33: ; preds = %bb4
- %184 = fadd float %177, %171 ; [#uses=1]
- %185 = fsub float %177, %171 ; [#uses=1]
- %186 = fdiv float %184, %185 ; [#uses=1]
- %187 = fmul float %186, 0x3FE921FB60000000 ; [#uses=1]
- %188 = fsub float 0x4002D97C80000000, %187 ; [#uses=1]
- br label %bb3.i35
-
-bb3.i35: ; preds = %bb1.i33, %bb.i32
- %angle.0.i34 = phi float [ %183, %bb.i32 ], [ %188, %bb1.i33 ] ; [#uses=2]
- %189 = fcmp olt float %176, 0.000000e+00 ; [#uses=1]
- br i1 %189, label %bb4.i36, label %_Z11btAtan2Fastff.exit38
-
-bb4.i36: ; preds = %bb3.i35
- %190 = fsub float -0.000000e+00, %angle.0.i34 ; [#uses=1]
- br label %_Z11btAtan2Fastff.exit38
-
-_Z11btAtan2Fastff.exit38: ; preds = %bb4.i36, %bb3.i35
- %191 = phi float [ %190, %bb4.i36 ], [ %angle.0.i34, %bb3.i35 ] ; [#uses=1]
- %192 = fmul float %176, %176 ; [#uses=1]
- %193 = fmul float %171, %171 ; [#uses=1]
- %194 = fadd float %192, %193 ; [#uses=1]
- %195 = fmul float %194, 1.000000e+01 ; [#uses=1]
- %196 = fmul float %195, 1.000000e+01 ; [#uses=2]
- %197 = fadd float %196, 1.000000e+00 ; [#uses=1]
- %198 = fdiv float %196, %197 ; [#uses=1]
- %199 = fmul float %191, %198 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %_Z11btAtan2Fastff.exit38, %bb3
- %b1Axis3.0.0.0 = phi float [ undef, %bb3 ], [ %166, %_Z11btAtan2Fastff.exit38 ] ; [#uses=3]
- %b1Axis3.0.1.0 = phi float [ undef, %bb3 ], [ %161, %_Z11btAtan2Fastff.exit38 ] ; [#uses=3]
- %b1Axis3.0.2.0 = phi float [ undef, %bb3 ], [ %156, %_Z11btAtan2Fastff.exit38 ] ; [#uses=3]
- %swing2.0 = phi float [ 0.000000e+00, %bb3 ], [ %199, %_Z11btAtan2Fastff.exit38 ] ; [#uses=2]
- %200 = fmul float %87, %87 ; [#uses=1]
- %201 = fdiv float 1.000000e+00, %200 ; [#uses=1]
- %202 = fmul float %144, %144 ; [#uses=1]
- %203 = fdiv float 1.000000e+00, %202 ; [#uses=1]
- %204 = fmul float %swing1.0, %swing1.0 ; [#uses=1]
- %205 = tail call float @fabsf(float %204) nounwind readnone ; [#uses=1]
- %206 = fmul float %205, %201 ; [#uses=1]
- %207 = fmul float %swing2.0, %swing2.0 ; [#uses=1]
- %208 = tail call float @fabsf(float %207) nounwind readnone ; [#uses=1]
- %209 = fmul float %208, %203 ; [#uses=1]
- %210 = fadd float %206, %209 ; [#uses=2]
- %211 = fcmp ogt float %210, 1.000000e+00 ; [#uses=1]
- br i1 %211, label %bb7, label %bb13
-
-bb7: ; preds = %bb6
- %212 = fadd float %210, -1.000000e+00 ; [#uses=1]
- store float %212, float* %0, align 4
- store i8 1, i8* %3, align 2
- %213 = fmul float %85, %b1Axis3.0.0.0 ; [#uses=1]
- %214 = fmul float %74, %b1Axis3.0.1.0 ; [#uses=1]
- %215 = fadd float %213, %214 ; [#uses=1]
- %216 = fmul float %63, %b1Axis3.0.2.0 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=3]
- %218 = fmul float %b1Axis3.0.2.0, %217 ; [#uses=1]
- %219 = fmul float %b1Axis3.0.1.0, %217 ; [#uses=1]
- %220 = fmul float %b1Axis3.0.0.0, %217 ; [#uses=1]
- %221 = fmul float %85, %b1Axis2.0.0.0 ; [#uses=1]
- %222 = fmul float %74, %b1Axis2.0.1.0 ; [#uses=1]
- %223 = fadd float %221, %222 ; [#uses=1]
- %224 = fmul float %63, %b1Axis2.0.2.0 ; [#uses=1]
- %225 = fadd float %223, %224 ; [#uses=3]
- %226 = fmul float %b1Axis2.0.2.0, %225 ; [#uses=1]
- %227 = fmul float %b1Axis2.0.1.0, %225 ; [#uses=1]
- %228 = fmul float %b1Axis2.0.0.0, %225 ; [#uses=1]
- %229 = fadd float %226, %218 ; [#uses=2]
- %230 = fadd float %227, %219 ; [#uses=2]
- %231 = fadd float %228, %220 ; [#uses=2]
- %232 = fmul float %85, %230 ; [#uses=1]
- %233 = fmul float %74, %231 ; [#uses=1]
- %234 = fsub float %232, %233 ; [#uses=4]
- %235 = fmul float %63, %231 ; [#uses=1]
- %236 = fmul float %85, %229 ; [#uses=1]
- %237 = fsub float %235, %236 ; [#uses=4]
- %238 = fmul float %74, %229 ; [#uses=1]
- %239 = fmul float %63, %230 ; [#uses=1]
- %240 = fsub float %238, %239 ; [#uses=4]
- %241 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=2]
- store float %240, float* %241, align 4
- %242 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=2]
- store float %237, float* %242, align 4
- %243 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=2]
- store float %234, float* %243, align 4
- %244 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %244, align 4
- %245 = fmul float %240, %240 ; [#uses=1]
- %246 = fmul float %237, %237 ; [#uses=1]
- %247 = fadd float %245, %246 ; [#uses=1]
- %248 = fmul float %234, %234 ; [#uses=1]
- %249 = fadd float %247, %248 ; [#uses=1]
- %250 = tail call float @sqrtf(float %249) nounwind readonly ; [#uses=1]
- %251 = fdiv float 1.000000e+00, %250 ; [#uses=3]
- %252 = fmul float %240, %251 ; [#uses=1]
- %253 = fmul float %237, %251 ; [#uses=1]
- %254 = fmul float %234, %251 ; [#uses=1]
- %255 = fmul float %85, %44 ; [#uses=1]
- %256 = fmul float %74, %33 ; [#uses=1]
- %257 = fadd float %255, %256 ; [#uses=1]
- %258 = fmul float %63, %22 ; [#uses=1]
- %259 = fadd float %257, %258 ; [#uses=1]
- %260 = fcmp ult float %259, 0.000000e+00 ; [#uses=1]
- %iftmp.206.0 = select i1 %260, float -1.000000e+00, float 1.000000e+00 ; [#uses=3]
- %261 = fmul float %252, %iftmp.206.0 ; [#uses=1]
- store float %261, float* %241, align 4
- %262 = fmul float %253, %iftmp.206.0 ; [#uses=1]
- store float %262, float* %242, align 4
- %263 = fmul float %254, %iftmp.206.0 ; [#uses=1]
- store float %263, float* %243, align 4
- br label %bb13
-
-bb13: ; preds = %bb7, %bb6
- %264 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %265 = load float* %264, align 4 ; [#uses=6]
- %266 = fcmp ult float %265, 0.000000e+00 ; [#uses=1]
- br i1 %266, label %return, label %bb14
-
-bb14: ; preds = %bb13
- %267 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %268 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %269 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %270 = load float* %269, align 4 ; [#uses=3]
- %271 = load float* %268, align 4 ; [#uses=3]
- %272 = load float* %267, align 4 ; [#uses=3]
- %273 = load float* %53, align 4 ; [#uses=1]
- %274 = fmul float %273, %270 ; [#uses=1]
- %275 = load float* %56, align 4 ; [#uses=1]
- %276 = fmul float %275, %271 ; [#uses=1]
- %277 = fadd float %274, %276 ; [#uses=1]
- %278 = load float* %60, align 4 ; [#uses=1]
- %279 = fmul float %278, %272 ; [#uses=1]
- %280 = fadd float %277, %279 ; [#uses=4]
- %281 = load float* %64, align 4 ; [#uses=1]
- %282 = fmul float %281, %270 ; [#uses=1]
- %283 = load float* %67, align 4 ; [#uses=1]
- %284 = fmul float %283, %271 ; [#uses=1]
- %285 = fadd float %282, %284 ; [#uses=1]
- %286 = load float* %71, align 4 ; [#uses=1]
- %287 = fmul float %286, %272 ; [#uses=1]
- %288 = fadd float %285, %287 ; [#uses=4]
- %289 = load float* %75, align 4 ; [#uses=1]
- %290 = fmul float %289, %270 ; [#uses=1]
- %291 = load float* %78, align 4 ; [#uses=1]
- %292 = fmul float %291, %271 ; [#uses=1]
- %293 = fadd float %290, %292 ; [#uses=1]
- %294 = load float* %82, align 4 ; [#uses=1]
- %295 = fmul float %294, %272 ; [#uses=1]
- %296 = fadd float %293, %295 ; [#uses=4]
- %297 = fmul float %85, %44 ; [#uses=1]
- %298 = fmul float %74, %33 ; [#uses=1]
- %299 = fadd float %297, %298 ; [#uses=1]
- %300 = fmul float %63, %22 ; [#uses=1]
- %301 = fadd float %299, %300 ; [#uses=2]
- %302 = fcmp olt float %301, 0xBFEFFFFFC0000000 ; [#uses=1]
- br i1 %302, label %bb.i30, label %bb1.i31
-
-bb.i30: ; preds = %bb14
- %303 = tail call float @fabsf(float %63) nounwind readnone ; [#uses=1]
- %304 = fcmp ogt float %303, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %304, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i30
- %305 = fmul float %74, %74 ; [#uses=1]
- %306 = fmul float %63, %63 ; [#uses=1]
- %307 = fadd float %305, %306 ; [#uses=1]
- %308 = tail call float @sqrtf(float %307) nounwind readonly ; [#uses=1]
- %309 = fdiv float 1.000000e+00, %308 ; [#uses=2]
- %310 = fsub float -0.000000e+00, %63 ; [#uses=1]
- %311 = fmul float %309, %310 ; [#uses=1]
- %312 = fmul float %74, %309 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i.i: ; preds = %bb.i30
- %313 = fmul float %85, %85 ; [#uses=1]
- %314 = fmul float %74, %74 ; [#uses=1]
- %315 = fadd float %313, %314 ; [#uses=1]
- %316 = tail call float @sqrtf(float %315) nounwind readonly ; [#uses=1]
- %317 = fdiv float 1.000000e+00, %316 ; [#uses=2]
- %318 = fsub float -0.000000e+00, %74 ; [#uses=1]
- %319 = fmul float %317, %318 ; [#uses=1]
- %320 = fmul float %85, %317 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i31: ; preds = %bb14
- %321 = fmul float %63, %33 ; [#uses=1]
- %322 = fmul float %74, %22 ; [#uses=1]
- %323 = fmul float %85, %22 ; [#uses=1]
- %324 = fmul float %63, %44 ; [#uses=1]
- %325 = fmul float %74, %44 ; [#uses=1]
- %326 = fmul float %85, %33 ; [#uses=1]
- %327 = fsub float %322, %321 ; [#uses=1]
- %328 = fsub float %324, %323 ; [#uses=1]
- %329 = fsub float %326, %325 ; [#uses=1]
- %330 = fadd float %301, 1.000000e+00 ; [#uses=1]
- %331 = fmul float %330, 2.000000e+00 ; [#uses=1]
- %332 = tail call float @sqrtf(float %331) nounwind readonly ; [#uses=2]
- %333 = fdiv float 1.000000e+00, %332 ; [#uses=3]
- %334 = fmul float %332, 5.000000e-01 ; [#uses=1]
- %335 = fmul float %329, %333 ; [#uses=1]
- %336 = fmul float %328, %333 ; [#uses=1]
- %337 = fmul float %327, %333 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-_Z15shortestArcQuatRK9btVector3S1_.exit: ; preds = %bb1.i31, %bb1.i.i, %bb.i.i
- %rotationArc.0.0.0.0 = phi float [ %337, %bb1.i31 ], [ 0.000000e+00, %bb.i.i ], [ %319, %bb1.i.i ] ; [#uses=3]
- %rotationArc.0.0.1.0 = phi float [ %336, %bb1.i31 ], [ %311, %bb.i.i ], [ %320, %bb1.i.i ] ; [#uses=4]
- %rotationArc.0.0.2.0 = phi float [ %335, %bb1.i31 ], [ %312, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=4]
- %rotationArc.0.0.3.0 = phi float [ %334, %bb1.i31 ], [ 0.000000e+00, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=6]
- %338 = fsub float -0.000000e+00, %rotationArc.0.0.0.0 ; [#uses=4]
- %339 = fmul float %296, %338 ; [#uses=1]
- %340 = fmul float %rotationArc.0.0.1.0, %288 ; [#uses=1]
- %341 = fsub float %339, %340 ; [#uses=1]
- %342 = fmul float %rotationArc.0.0.2.0, %280 ; [#uses=1]
- %343 = fsub float %341, %342 ; [#uses=3]
- %344 = fmul float %rotationArc.0.0.3.0, %280 ; [#uses=1]
- %345 = fmul float %rotationArc.0.0.0.0, %288 ; [#uses=1]
- %346 = fadd float %344, %345 ; [#uses=1]
- %347 = fmul float %rotationArc.0.0.1.0, %296 ; [#uses=1]
- %348 = fsub float %346, %347 ; [#uses=3]
- %349 = fmul float %rotationArc.0.0.3.0, %288 ; [#uses=1]
- %350 = fmul float %rotationArc.0.0.2.0, %296 ; [#uses=1]
- %351 = fadd float %349, %350 ; [#uses=1]
- %352 = fmul float %rotationArc.0.0.0.0, %280 ; [#uses=1]
- %353 = fsub float %351, %352 ; [#uses=3]
- %354 = fmul float %rotationArc.0.0.3.0, %296 ; [#uses=1]
- %355 = fmul float %rotationArc.0.0.1.0, %280 ; [#uses=1]
- %356 = fadd float %354, %355 ; [#uses=1]
- %357 = fmul float %rotationArc.0.0.2.0, %288 ; [#uses=1]
- %358 = fsub float %356, %357 ; [#uses=3]
- %359 = fsub float -0.000000e+00, %rotationArc.0.0.2.0 ; [#uses=3]
- %360 = fsub float -0.000000e+00, %rotationArc.0.0.1.0 ; [#uses=3]
- %361 = fmul float %343, %359 ; [#uses=1]
- %362 = fmul float %348, %rotationArc.0.0.3.0 ; [#uses=1]
- %363 = fadd float %361, %362 ; [#uses=1]
- %364 = fmul float %358, %360 ; [#uses=1]
- %365 = fadd float %363, %364 ; [#uses=1]
- %366 = fmul float %353, %338 ; [#uses=1]
- %367 = fsub float %365, %366 ; [#uses=2]
- %368 = fmul float %343, %360 ; [#uses=1]
- %369 = fmul float %353, %rotationArc.0.0.3.0 ; [#uses=1]
- %370 = fadd float %368, %369 ; [#uses=1]
- %371 = fmul float %348, %338 ; [#uses=1]
- %372 = fadd float %370, %371 ; [#uses=1]
- %373 = fmul float %358, %359 ; [#uses=1]
- %374 = fsub float %372, %373 ; [#uses=2]
- %375 = fmul float %343, %338 ; [#uses=1]
- %376 = fmul float %358, %rotationArc.0.0.3.0 ; [#uses=1]
- %377 = fadd float %375, %376 ; [#uses=1]
- %378 = fmul float %353, %359 ; [#uses=1]
- %379 = fadd float %377, %378 ; [#uses=1]
- %380 = fmul float %348, %360 ; [#uses=1]
- %381 = fsub float %379, %380 ; [#uses=2]
- %382 = fmul float %381, %b1Axis2.0.0.0 ; [#uses=1]
- %383 = fmul float %374, %b1Axis2.0.1.0 ; [#uses=1]
- %384 = fadd float %382, %383 ; [#uses=1]
- %385 = fmul float %367, %b1Axis2.0.2.0 ; [#uses=1]
- %386 = fadd float %384, %385 ; [#uses=5]
- %387 = fmul float %381, %b1Axis3.0.0.0 ; [#uses=1]
- %388 = fmul float %374, %b1Axis3.0.1.0 ; [#uses=1]
- %389 = fadd float %387, %388 ; [#uses=1]
- %390 = fmul float %367, %b1Axis3.0.2.0 ; [#uses=1]
- %391 = fadd float %389, %390 ; [#uses=2]
- %392 = tail call float @fabsf(float %391) nounwind readnone ; [#uses=4]
- %393 = fcmp ult float %386, 0.000000e+00 ; [#uses=1]
- br i1 %393, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %_Z15shortestArcQuatRK9btVector3S1_.exit
- %394 = fsub float %386, %392 ; [#uses=1]
- %395 = fadd float %392, %386 ; [#uses=1]
- %396 = fdiv float %394, %395 ; [#uses=1]
- %397 = fmul float %396, 0x3FE921FB60000000 ; [#uses=1]
- %398 = fsub float 0x3FE921FB60000000, %397 ; [#uses=1]
- br label %bb3.i
-
-bb1.i: ; preds = %_Z15shortestArcQuatRK9btVector3S1_.exit
- %399 = fadd float %392, %386 ; [#uses=1]
- %400 = fsub float %392, %386 ; [#uses=1]
- %401 = fdiv float %399, %400 ; [#uses=1]
- %402 = fmul float %401, 0x3FE921FB60000000 ; [#uses=1]
- %403 = fsub float 0x4002D97C80000000, %402 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %angle.0.i = phi float [ %398, %bb.i ], [ %403, %bb1.i ] ; [#uses=2]
- %404 = fcmp olt float %391, 0.000000e+00 ; [#uses=1]
- br i1 %404, label %bb4.i, label %_Z11btAtan2Fastff.exit
-
-bb4.i: ; preds = %bb3.i
- %405 = fsub float -0.000000e+00, %angle.0.i ; [#uses=1]
- br label %_Z11btAtan2Fastff.exit
-
-_Z11btAtan2Fastff.exit: ; preds = %bb4.i, %bb3.i
- %406 = phi float [ %405, %bb4.i ], [ %angle.0.i, %bb3.i ] ; [#uses=5]
- %407 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store float %406, float* %407, align 4
- %408 = fcmp ogt float %265, 0x3FA99999A0000000 ; [#uses=1]
- %iftmp.207.0 = select i1 %408, float 1.000000e+00, float 0.000000e+00 ; [#uses=2]
- %409 = fsub float -0.000000e+00, %265 ; [#uses=1]
- %410 = fmul float %iftmp.207.0, %409 ; [#uses=1]
- %411 = fcmp ult float %410, %406 ; [#uses=1]
- br i1 %411, label %bb26, label %bb24
-
-bb24: ; preds = %_Z11btAtan2Fastff.exit
- %412 = fadd float %265, %406 ; [#uses=1]
- %413 = fsub float -0.000000e+00, %412 ; [#uses=1]
- %414 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store float %413, float* %414, align 4
- store i8 1, i8* %2, align 1
- %415 = fadd float %63, %22 ; [#uses=1]
- %416 = fadd float %74, %33 ; [#uses=1]
- %417 = fadd float %85, %44 ; [#uses=1]
- %418 = fmul float %415, 5.000000e-01 ; [#uses=4]
- %419 = fmul float %416, 5.000000e-01 ; [#uses=4]
- %420 = fmul float %417, 5.000000e-01 ; [#uses=4]
- %421 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 0 ; [#uses=2]
- store float %420, float* %421, align 4
- %422 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 1 ; [#uses=2]
- store float %419, float* %422, align 4
- %423 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 2 ; [#uses=2]
- store float %418, float* %423, align 4
- %424 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %424, align 4
- %425 = fmul float %420, %420 ; [#uses=1]
- %426 = fmul float %419, %419 ; [#uses=1]
- %427 = fadd float %425, %426 ; [#uses=1]
- %428 = fmul float %418, %418 ; [#uses=1]
- %429 = fadd float %427, %428 ; [#uses=1]
- %430 = tail call float @sqrtf(float %429) nounwind readonly ; [#uses=1]
- %431 = fdiv float 1.000000e+00, %430 ; [#uses=3]
- %432 = fmul float %420, %431 ; [#uses=1]
- %433 = fmul float %419, %431 ; [#uses=1]
- %434 = fmul float %418, %431 ; [#uses=1]
- %435 = fmul float %432, -1.000000e+00 ; [#uses=1]
- store float %435, float* %421, align 4
- %436 = fmul float %433, -1.000000e+00 ; [#uses=1]
- store float %436, float* %422, align 4
- %437 = fmul float %434, -1.000000e+00 ; [#uses=1]
- store float %437, float* %423, align 4
- ret void
-
-bb26: ; preds = %_Z11btAtan2Fastff.exit
- %438 = fmul float %265, %iftmp.207.0 ; [#uses=1]
- %439 = fcmp olt float %438, %406 ; [#uses=1]
- br i1 %439, label %bb27, label %return
-
-bb27: ; preds = %bb26
- %440 = fsub float %406, %265 ; [#uses=1]
- %441 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store float %440, float* %441, align 4
- store i8 1, i8* %2, align 1
- %442 = fadd float %63, %22 ; [#uses=1]
- %443 = fadd float %74, %33 ; [#uses=1]
- %444 = fadd float %85, %44 ; [#uses=1]
- %445 = fmul float %442, 5.000000e-01 ; [#uses=4]
- %446 = fmul float %443, 5.000000e-01 ; [#uses=4]
- %447 = fmul float %444, 5.000000e-01 ; [#uses=4]
- %448 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 0 ; [#uses=2]
- store float %447, float* %448, align 4
- %449 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 1 ; [#uses=2]
- store float %446, float* %449, align 4
- %450 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 2 ; [#uses=2]
- store float %445, float* %450, align 4
- %451 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %451, align 4
- %452 = fmul float %447, %447 ; [#uses=1]
- %453 = fmul float %446, %446 ; [#uses=1]
- %454 = fadd float %452, %453 ; [#uses=1]
- %455 = fmul float %445, %445 ; [#uses=1]
- %456 = fadd float %454, %455 ; [#uses=1]
- %457 = tail call float @sqrtf(float %456) nounwind readonly ; [#uses=1]
- %458 = fdiv float 1.000000e+00, %457 ; [#uses=3]
- %459 = fmul float %447, %458 ; [#uses=1]
- store float %459, float* %448, align 4
- %460 = fmul float %446, %458 ; [#uses=1]
- store float %460, float* %449, align 4
- %461 = fmul float %445, %458 ; [#uses=1]
- store float %461, float* %450, align 4
- ret void
-
-return: ; preds = %bb26, %bb13
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3(%struct.btConeTwistConstraint* nocapture %this, %struct.btQuaternion* nocapture %qTwist, float* nocapture %twistAngle, %struct.btQuadWord* nocapture %vTwistAxis) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuaternion* %qTwist, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuaternion* %qTwist, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuaternion* %qTwist, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuaternion* %qTwist, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fcmp olt float %7, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i = select i1 %8, float -1.000000e+00, float %7 ; [#uses=2]
- %9 = fcmp ogt float %x_addr.0.i.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i = select i1 %9, float 1.000000e+00, float %x_addr.0.i.i ; [#uses=1]
- %10 = tail call float @acosf(float %x_addr.1.i.i) nounwind readonly ; [#uses=1]
- %11 = fmul float %10, 2.000000e+00 ; [#uses=2]
- store float %11, float* %twistAngle, align 4
- %12 = fcmp ogt float %11, 0x400921FB60000000 ; [#uses=1]
- br i1 %12, label %bb, label %bb1
-
-bb: ; preds = %entry
- %13 = load float* %6, align 4 ; [#uses=1]
- %14 = fsub float -0.000000e+00, %13 ; [#uses=2]
- %15 = load float* %4, align 4 ; [#uses=1]
- %16 = fsub float -0.000000e+00, %15 ; [#uses=1]
- %17 = load float* %2, align 4 ; [#uses=1]
- %18 = fsub float -0.000000e+00, %17 ; [#uses=1]
- %19 = load float* %0, align 4 ; [#uses=1]
- %20 = fsub float -0.000000e+00, %19 ; [#uses=1]
- %21 = fcmp olt float %14, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i7 = select i1 %21, float -1.000000e+00, float %14 ; [#uses=2]
- %22 = fcmp ogt float %x_addr.0.i.i7, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i8 = select i1 %22, float 1.000000e+00, float %x_addr.0.i.i7 ; [#uses=1]
- %23 = tail call float @acosf(float %x_addr.1.i.i8) nounwind readonly ; [#uses=1]
- %24 = fmul float %23, 2.000000e+00 ; [#uses=1]
- store float %24, float* %twistAngle, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %25 = phi float [ %20, %bb ], [ %1, %entry ] ; [#uses=4]
- %26 = phi float [ %18, %bb ], [ %3, %entry ] ; [#uses=4]
- %27 = phi float [ %16, %bb ], [ %5, %entry ] ; [#uses=4]
- %28 = getelementptr inbounds %struct.btQuadWord* %vTwistAxis, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %25, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %vTwistAxis, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %26, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %vTwistAxis, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %27, float* %30, align 4
- %31 = getelementptr inbounds %struct.btQuadWord* %vTwistAxis, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = load float* %twistAngle, align 4 ; [#uses=1]
- %33 = fcmp ogt float %32, 0x3E80000000000000 ; [#uses=1]
- br i1 %33, label %bb5, label %return
-
-bb5: ; preds = %bb1
- %34 = fmul float %25, %25 ; [#uses=1]
- %35 = fmul float %26, %26 ; [#uses=1]
- %36 = fadd float %34, %35 ; [#uses=1]
- %37 = fmul float %27, %27 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = tail call float @sqrtf(float %38) nounwind readonly ; [#uses=1]
- %40 = fdiv float 1.000000e+00, %39 ; [#uses=3]
- %41 = fmul float %25, %40 ; [#uses=1]
- store float %41, float* %28, align 4
- %42 = fmul float %26, %40 ; [#uses=1]
- store float %42, float* %29, align 4
- %43 = fmul float %27, %40 ; [#uses=1]
- store float %43, float* %30, align 4
- ret void
-
-return: ; preds = %bb1
- ret void
-}
-
-; [#uses=2]
-define void @_ZNK21btConeTwistConstraint16GetPointForAngleEff(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btConeTwistConstraint* nocapture %this, float %fAngleInRadians, float %fLength) nounwind align 2 {
-entry:
- %0 = tail call float @cosf(float %fAngleInRadians) nounwind readonly ; [#uses=6]
- %1 = tail call float @sinf(float %fAngleInRadians) nounwind readonly ; [#uses=5]
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = tail call float @fabsf(float %0) nounwind readnone ; [#uses=1]
- %5 = fcmp ogt float %4, 0x3E80000000000000 ; [#uses=1]
- br i1 %5, label %bb, label %bb1
-
-bb: ; preds = %entry
- %6 = fmul float %1, %1 ; [#uses=1]
- %7 = fmul float %0, %0 ; [#uses=1]
- %8 = fdiv float %6, %7 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = fmul float %10, %10 ; [#uses=1]
- %12 = fdiv float 1.000000e+00, %11 ; [#uses=1]
- %13 = fmul float %3, %3 ; [#uses=1]
- %14 = fdiv float %8, %13 ; [#uses=1]
- %15 = fadd float %14, %12 ; [#uses=1]
- %16 = fadd float %8, 1.000000e+00 ; [#uses=1]
- %17 = fdiv float %16, %15 ; [#uses=1]
- %18 = tail call float @sqrtf(float %17) nounwind readonly ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %swingLimit.0 = phi float [ %18, %bb ], [ %3, %entry ] ; [#uses=1]
- %19 = fsub float -0.000000e+00, %1 ; [#uses=1]
- %20 = fmul float %0, %0 ; [#uses=1]
- %21 = fadd float %20, 0.000000e+00 ; [#uses=1]
- %22 = fmul float %1, %1 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = tail call float @sqrtf(float %23) nounwind readonly ; [#uses=1]
- %25 = fmul float %swingLimit.0, 5.000000e-01 ; [#uses=2]
- %26 = tail call float @sinf(float %25) nounwind readonly ; [#uses=1]
- %27 = fdiv float %26, %24 ; [#uses=3]
- %28 = tail call float @cosf(float %25) nounwind readonly ; [#uses=5]
- %29 = fmul float %27, %19 ; [#uses=3]
- %30 = fmul float %0, %27 ; [#uses=3]
- %31 = fmul float %27, 0.000000e+00 ; [#uses=2]
- %32 = fsub float -0.000000e+00, %31 ; [#uses=4]
- %33 = fmul float %fLength, %32 ; [#uses=1]
- %34 = fmul float %30, 0.000000e+00 ; [#uses=2]
- %35 = fsub float %33, %34 ; [#uses=1]
- %36 = fmul float %29, 0.000000e+00 ; [#uses=2]
- %37 = fsub float %35, %36 ; [#uses=3]
- %38 = fmul float %28, 0.000000e+00 ; [#uses=2]
- %39 = fmul float %31, 0.000000e+00 ; [#uses=2]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = fmul float %30, %fLength ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=3]
- %43 = fmul float %29, %fLength ; [#uses=1]
- %44 = fadd float %38, %43 ; [#uses=1]
- %45 = fsub float %44, %39 ; [#uses=3]
- %46 = fmul float %28, %fLength ; [#uses=1]
- %47 = fadd float %46, %34 ; [#uses=1]
- %48 = fsub float %47, %36 ; [#uses=3]
- %49 = fsub float -0.000000e+00, %29 ; [#uses=3]
- %50 = fsub float -0.000000e+00, %30 ; [#uses=3]
- %51 = fmul float %37, %49 ; [#uses=1]
- %52 = fmul float %42, %28 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=1]
- %54 = fmul float %48, %50 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %45, %32 ; [#uses=1]
- %57 = fsub float %55, %56 ; [#uses=1]
- %58 = fmul float %37, %50 ; [#uses=1]
- %59 = fmul float %45, %28 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %42, %32 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %48, %49 ; [#uses=1]
- %64 = fsub float %62, %63 ; [#uses=1]
- %65 = fmul float %37, %32 ; [#uses=1]
- %66 = fmul float %48, %28 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=1]
- %68 = fmul float %45, %49 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %42, %50 ; [#uses=1]
- %71 = fsub float %69, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %71, float* %72, align 4
- %73 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %64, float* %73, align 4
- %74 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %57, float* %74, align 4
- %75 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %75, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_(%struct.btConeTwistConstraint* nocapture %this, %struct.btQuaternion* nocapture %qCone, float* nocapture %swingAngle, %struct.btQuadWord* nocapture %vSwingAxis, float* nocapture %swingLimit) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuaternion* %qCone, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fcmp olt float %1, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i = select i1 %2, float -1.000000e+00, float %1 ; [#uses=2]
- %3 = fcmp ogt float %x_addr.0.i.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i = select i1 %3, float 1.000000e+00, float %x_addr.0.i.i ; [#uses=1]
- %4 = tail call float @acosf(float %x_addr.1.i.i) nounwind readonly ; [#uses=1]
- %5 = fmul float %4, 2.000000e+00 ; [#uses=2]
- store float %5, float* %swingAngle, align 4
- %6 = fcmp ogt float %5, 0x3E80000000000000 ; [#uses=1]
- br i1 %6, label %bb, label %bb4
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct.btQuaternion* %qCone, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuaternion* %qCone, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuaternion* %qCone, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=4]
- %11 = load float* %8, align 4 ; [#uses=4]
- %12 = load float* %7, align 4 ; [#uses=4]
- %13 = getelementptr inbounds %struct.btQuadWord* %vSwingAxis, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %10, float* %13, align 4
- %14 = getelementptr inbounds %struct.btQuadWord* %vSwingAxis, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %11, float* %14, align 4
- %15 = getelementptr inbounds %struct.btQuadWord* %vSwingAxis, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %12, float* %15, align 4
- %16 = getelementptr inbounds %struct.btQuadWord* %vSwingAxis, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = fmul float %10, %10 ; [#uses=1]
- %18 = fmul float %11, %11 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fmul float %12, %12 ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=1]
- %22 = tail call float @sqrtf(float %21) nounwind readonly ; [#uses=1]
- %23 = fdiv float 1.000000e+00, %22 ; [#uses=3]
- %24 = fmul float %10, %23 ; [#uses=1]
- store float %24, float* %13, align 4
- %25 = fmul float %11, %23 ; [#uses=4]
- store float %25, float* %14, align 4
- %26 = fmul float %12, %23 ; [#uses=3]
- store float %26, float* %15, align 4
- %27 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=2]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %swingLimit, align 4
- %29 = tail call float @fabsf(float %25) nounwind readnone ; [#uses=1]
- %30 = fcmp ogt float %29, 0x3E80000000000000 ; [#uses=1]
- br i1 %30, label %bb3, label %bb4
-
-bb3: ; preds = %bb
- %31 = fmul float %26, %26 ; [#uses=1]
- %32 = fmul float %25, %25 ; [#uses=1]
- %33 = fdiv float %31, %32 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = fmul float %35, %35 ; [#uses=1]
- %37 = fdiv float 1.000000e+00, %36 ; [#uses=1]
- %38 = load float* %27, align 4 ; [#uses=2]
- %39 = fmul float %38, %38 ; [#uses=1]
- %40 = fdiv float %33, %39 ; [#uses=1]
- %41 = fadd float %40, %37 ; [#uses=1]
- %42 = fadd float %33, 1.000000e+00 ; [#uses=1]
- %43 = fdiv float %42, %41 ; [#uses=1]
- %44 = tail call float @sqrtf(float %43) nounwind readonly ; [#uses=1]
- store float %44, float* %swingLimit, align 4
- ret void
-
-bb4: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraint31setMotorTargetInConstraintSpaceERK12btQuaternion(%struct.btConeTwistConstraint* nocapture %this, %struct.btQuaternion* nocapture %q) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=8]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 1 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=9]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=9]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 3 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=11]
- store float %11, float* %9, align 4
- %12 = fsub float -0.000000e+00, %2 ; [#uses=4]
- %13 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vTwist, i32 0, i32 0, i32 0), align 8 ; [#uses=10]
- %14 = fmul float %13, %12 ; [#uses=1]
- %15 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vTwist, i32 0, i32 0, i32 1), align 4 ; [#uses=13]
- %16 = fmul float %5, %15 ; [#uses=1]
- %17 = fsub float %14, %16 ; [#uses=1]
- %18 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vTwist, i32 0, i32 0, i32 2), align 8 ; [#uses=11]
- %19 = fmul float %8, %18 ; [#uses=1]
- %20 = fsub float %17, %19 ; [#uses=3]
- %21 = fmul float %11, %18 ; [#uses=1]
- %22 = fmul float %2, %15 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = fmul float %5, %13 ; [#uses=1]
- %25 = fsub float %23, %24 ; [#uses=3]
- %26 = fmul float %11, %15 ; [#uses=1]
- %27 = fmul float %8, %13 ; [#uses=1]
- %28 = fadd float %26, %27 ; [#uses=1]
- %29 = fmul float %2, %18 ; [#uses=1]
- %30 = fsub float %28, %29 ; [#uses=3]
- %31 = fmul float %11, %13 ; [#uses=1]
- %32 = fmul float %5, %18 ; [#uses=1]
- %33 = fadd float %31, %32 ; [#uses=1]
- %34 = fmul float %8, %15 ; [#uses=1]
- %35 = fsub float %33, %34 ; [#uses=3]
- %36 = fsub float -0.000000e+00, %8 ; [#uses=3]
- %37 = fsub float -0.000000e+00, %5 ; [#uses=3]
- %38 = fmul float %20, %36 ; [#uses=1]
- %39 = fmul float %25, %11 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = fmul float %35, %37 ; [#uses=1]
- %42 = fadd float %40, %41 ; [#uses=1]
- %43 = fmul float %30, %12 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=3]
- %45 = fmul float %20, %37 ; [#uses=1]
- %46 = fmul float %30, %11 ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=1]
- %48 = fmul float %25, %12 ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=1]
- %50 = fmul float %35, %36 ; [#uses=1]
- %51 = fsub float %49, %50 ; [#uses=3]
- %52 = fmul float %20, %12 ; [#uses=1]
- %53 = fmul float %35, %11 ; [#uses=1]
- %54 = fadd float %52, %53 ; [#uses=1]
- %55 = fmul float %30, %36 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %25, %37 ; [#uses=1]
- %58 = fsub float %56, %57 ; [#uses=3]
- %59 = fmul float %13, %58 ; [#uses=1]
- %60 = fmul float %15, %51 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %18, %44 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=2]
- %64 = fcmp olt float %63, 0xBFEFFFFFC0000000 ; [#uses=1]
- br i1 %64, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %65 = tail call float @fabsf(float %18) nounwind readnone ; [#uses=1]
- %66 = fcmp ogt float %65, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %66, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i
- %67 = fmul float %15, %15 ; [#uses=1]
- %68 = fmul float %18, %18 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = tail call float @sqrtf(float %69) nounwind readonly ; [#uses=1]
- %71 = fdiv float 1.000000e+00, %70 ; [#uses=2]
- %72 = fsub float -0.000000e+00, %18 ; [#uses=1]
- %73 = fmul float %71, %72 ; [#uses=1]
- %74 = fmul float %15, %71 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i.i: ; preds = %bb.i
- %75 = fmul float %13, %13 ; [#uses=1]
- %76 = fmul float %15, %15 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = tail call float @sqrtf(float %77) nounwind readonly ; [#uses=1]
- %79 = fdiv float 1.000000e+00, %78 ; [#uses=2]
- %80 = fsub float -0.000000e+00, %15 ; [#uses=1]
- %81 = fmul float %79, %80 ; [#uses=1]
- %82 = fmul float %13, %79 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i: ; preds = %entry
- %83 = fmul float %18, %51 ; [#uses=1]
- %84 = fmul float %15, %44 ; [#uses=1]
- %85 = fmul float %13, %44 ; [#uses=1]
- %86 = fmul float %18, %58 ; [#uses=1]
- %87 = fmul float %15, %58 ; [#uses=1]
- %88 = fmul float %13, %51 ; [#uses=1]
- %89 = fsub float %84, %83 ; [#uses=1]
- %90 = fsub float %86, %85 ; [#uses=1]
- %91 = fsub float %88, %87 ; [#uses=1]
- %92 = fadd float %63, 1.000000e+00 ; [#uses=1]
- %93 = fmul float %92, 2.000000e+00 ; [#uses=1]
- %94 = tail call float @sqrtf(float %93) nounwind readonly ; [#uses=2]
- %95 = fdiv float 1.000000e+00, %94 ; [#uses=3]
- %96 = fmul float %94, 5.000000e-01 ; [#uses=1]
- %97 = fmul float %91, %95 ; [#uses=1]
- %98 = fmul float %90, %95 ; [#uses=1]
- %99 = fmul float %89, %95 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-_Z15shortestArcQuatRK9btVector3S1_.exit: ; preds = %bb1.i, %bb1.i.i, %bb.i.i
- %qTargetCone.0.0.0.0 = phi float [ %99, %bb1.i ], [ 0.000000e+00, %bb.i.i ], [ %81, %bb1.i.i ] ; [#uses=3]
- %qTargetCone.0.0.1.0 = phi float [ %98, %bb1.i ], [ %73, %bb.i.i ], [ %82, %bb1.i.i ] ; [#uses=3]
- %qTargetCone.0.0.2.0 = phi float [ %97, %bb1.i ], [ %74, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=3]
- %qTargetCone.0.0.3.0 = phi float [ %96, %bb1.i ], [ 0.000000e+00, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=3]
- %100 = fmul float %qTargetCone.0.0.0.0, %qTargetCone.0.0.0.0 ; [#uses=1]
- %101 = fmul float %qTargetCone.0.0.1.0, %qTargetCone.0.0.1.0 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %qTargetCone.0.0.2.0, %qTargetCone.0.0.2.0 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fmul float %qTargetCone.0.0.3.0, %qTargetCone.0.0.3.0 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = tail call float @sqrtf(float %106) nounwind readonly ; [#uses=1]
- %108 = fdiv float 1.000000e+00, %107 ; [#uses=4]
- %109 = fmul float %qTargetCone.0.0.0.0, %108 ; [#uses=7]
- %110 = fmul float %qTargetCone.0.0.1.0, %108 ; [#uses=7]
- %111 = fmul float %qTargetCone.0.0.2.0, %108 ; [#uses=7]
- %112 = fmul float %qTargetCone.0.0.3.0, %108 ; [#uses=9]
- %113 = fsub float -0.000000e+00, %111 ; [#uses=4]
- %114 = fsub float -0.000000e+00, %110 ; [#uses=4]
- %115 = fsub float -0.000000e+00, %109 ; [#uses=4]
- %116 = fmul float %112, %11 ; [#uses=1]
- %117 = fmul float %2, %115 ; [#uses=1]
- %118 = fsub float %116, %117 ; [#uses=1]
- %119 = fmul float %5, %114 ; [#uses=1]
- %120 = fsub float %118, %119 ; [#uses=1]
- %121 = fmul float %8, %113 ; [#uses=1]
- %122 = fsub float %120, %121 ; [#uses=3]
- %123 = fmul float %112, %8 ; [#uses=1]
- %124 = fmul float %11, %113 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %5, %115 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = fmul float %2, %114 ; [#uses=1]
- %129 = fsub float %127, %128 ; [#uses=3]
- %130 = fmul float %112, %5 ; [#uses=1]
- %131 = fmul float %11, %114 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %2, %113 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = fmul float %8, %115 ; [#uses=1]
- %136 = fsub float %134, %135 ; [#uses=3]
- %137 = fmul float %112, %2 ; [#uses=1]
- %138 = fmul float %11, %115 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %8, %114 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = fmul float %5, %113 ; [#uses=1]
- %143 = fsub float %141, %142 ; [#uses=3]
- %144 = fmul float %143, %143 ; [#uses=1]
- %145 = fmul float %136, %136 ; [#uses=1]
- %146 = fadd float %144, %145 ; [#uses=1]
- %147 = fmul float %129, %129 ; [#uses=1]
- %148 = fadd float %146, %147 ; [#uses=1]
- %149 = fmul float %122, %122 ; [#uses=1]
- %150 = fadd float %148, %149 ; [#uses=1]
- %151 = tail call float @sqrtf(float %150) nounwind readonly ; [#uses=1]
- %152 = fdiv float 1.000000e+00, %151 ; [#uses=4]
- %153 = fmul float %143, %152 ; [#uses=4]
- %154 = fmul float %136, %152 ; [#uses=4]
- %155 = fmul float %129, %152 ; [#uses=4]
- %156 = fmul float %122, %152 ; [#uses=5]
- %157 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=4]
- %159 = fcmp ult float %158, 0x3FA99999A0000000 ; [#uses=1]
- br i1 %159, label %bb7, label %bb
-
-bb: ; preds = %_Z15shortestArcQuatRK9btVector3S1_.exit
- %160 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %161 = load float* %160, align 4 ; [#uses=3]
- %162 = fcmp ult float %161, 0x3FA99999A0000000 ; [#uses=1]
- br i1 %162, label %bb7, label %bb1
-
-bb1: ; preds = %bb
- %163 = fcmp olt float %112, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i.i = select i1 %163, float -1.000000e+00, float %112 ; [#uses=2]
- %164 = fcmp ogt float %x_addr.0.i.i.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i.i = select i1 %164, float 1.000000e+00, float %x_addr.0.i.i.i ; [#uses=1]
- %165 = tail call float @acosf(float %x_addr.1.i.i.i) nounwind readonly ; [#uses=1]
- %166 = fmul float %165, 2.000000e+00 ; [#uses=5]
- %167 = fcmp ogt float %166, 0x3E80000000000000 ; [#uses=1]
- br i1 %167, label %bb.i15, label %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
-
-bb.i15: ; preds = %bb1
- %168 = fmul float %109, %109 ; [#uses=1]
- %169 = fmul float %110, %110 ; [#uses=1]
- %170 = fadd float %168, %169 ; [#uses=1]
- %171 = fmul float %111, %111 ; [#uses=1]
- %172 = fadd float %170, %171 ; [#uses=1]
- %173 = tail call float @sqrtf(float %172) nounwind readonly ; [#uses=1]
- %174 = fdiv float 1.000000e+00, %173 ; [#uses=3]
- %175 = fmul float %109, %174 ; [#uses=2]
- %176 = fmul float %110, %174 ; [#uses=5]
- %177 = fmul float %111, %174 ; [#uses=4]
- %178 = tail call float @fabsf(float %176) nounwind readnone ; [#uses=1]
- %179 = fcmp ogt float %178, 0x3E80000000000000 ; [#uses=1]
- br i1 %179, label %bb3.i, label %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
-
-bb3.i: ; preds = %bb.i15
- %180 = fmul float %177, %177 ; [#uses=1]
- %181 = fmul float %176, %176 ; [#uses=1]
- %182 = fdiv float %180, %181 ; [#uses=2]
- %183 = fmul float %161, %161 ; [#uses=1]
- %184 = fdiv float 1.000000e+00, %183 ; [#uses=1]
- %185 = fmul float %158, %158 ; [#uses=1]
- %186 = fdiv float %182, %185 ; [#uses=1]
- %187 = fadd float %186, %184 ; [#uses=1]
- %188 = fadd float %182, 1.000000e+00 ; [#uses=1]
- %189 = fdiv float %188, %187 ; [#uses=1]
- %190 = tail call float @sqrtf(float %189) nounwind readonly ; [#uses=1]
- br label %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
-
-_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit: ; preds = %bb3.i, %bb.i15, %bb1
- %swingAxis.0.0.1 = phi float [ %175, %bb3.i ], [ %175, %bb.i15 ], [ undef, %bb1 ] ; [#uses=3]
- %swingAxis.0.1.1 = phi float [ %176, %bb3.i ], [ %176, %bb.i15 ], [ undef, %bb1 ] ; [#uses=3]
- %swingAxis.0.2.1 = phi float [ %177, %bb3.i ], [ %177, %bb.i15 ], [ undef, %bb1 ] ; [#uses=3]
- %swingLimit.1 = phi float [ %190, %bb3.i ], [ %158, %bb.i15 ], [ undef, %bb1 ] ; [#uses=3]
- %191 = tail call float @fabsf(float %166) nounwind readnone ; [#uses=1]
- %192 = fcmp ogt float %191, 0x3E80000000000000 ; [#uses=1]
- br i1 %192, label %bb2, label %bb7
-
-bb2: ; preds = %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
- %193 = fcmp olt float %swingLimit.1, %166 ; [#uses=1]
- br i1 %193, label %bb6, label %bb4
-
-bb4: ; preds = %bb2
- %194 = fsub float -0.000000e+00, %swingLimit.1 ; [#uses=2]
- %195 = fcmp olt float %166, %194 ; [#uses=1]
- br i1 %195, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- br label %bb6
-
-bb6: ; preds = %bb5, %bb4, %bb2
- %swingAngle.0 = phi float [ %194, %bb5 ], [ %166, %bb4 ], [ %swingLimit.1, %bb2 ] ; [#uses=1]
- %196 = fmul float %swingAxis.0.0.1, %swingAxis.0.0.1 ; [#uses=1]
- %197 = fmul float %swingAxis.0.1.1, %swingAxis.0.1.1 ; [#uses=1]
- %198 = fadd float %196, %197 ; [#uses=1]
- %199 = fmul float %swingAxis.0.2.1, %swingAxis.0.2.1 ; [#uses=1]
- %200 = fadd float %198, %199 ; [#uses=1]
- %201 = tail call float @sqrtf(float %200) nounwind readonly ; [#uses=1]
- %202 = fmul float %swingAngle.0, 5.000000e-01 ; [#uses=2]
- %203 = tail call float @sinf(float %202) nounwind readonly ; [#uses=1]
- %204 = fdiv float %203, %201 ; [#uses=3]
- %205 = tail call float @cosf(float %202) nounwind readonly ; [#uses=1]
- %206 = fmul float %swingAxis.0.2.1, %204 ; [#uses=1]
- %207 = fmul float %swingAxis.0.1.1, %204 ; [#uses=1]
- %208 = fmul float %swingAxis.0.0.1, %204 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit, %bb, %_Z15shortestArcQuatRK9btVector3S1_.exit
- %qTargetCone.0.0.0.1 = phi float [ %109, %_Z15shortestArcQuatRK9btVector3S1_.exit ], [ %109, %bb ], [ %208, %bb6 ], [ %109, %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit ] ; [#uses=4]
- %qTargetCone.0.0.1.1 = phi float [ %110, %_Z15shortestArcQuatRK9btVector3S1_.exit ], [ %110, %bb ], [ %207, %bb6 ], [ %110, %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit ] ; [#uses=4]
- %qTargetCone.0.0.2.1 = phi float [ %111, %_Z15shortestArcQuatRK9btVector3S1_.exit ], [ %111, %bb ], [ %206, %bb6 ], [ %111, %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit ] ; [#uses=4]
- %qTargetCone.0.0.3.1 = phi float [ %112, %_Z15shortestArcQuatRK9btVector3S1_.exit ], [ %112, %bb ], [ %205, %bb6 ], [ %112, %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit ] ; [#uses=4]
- %209 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=4]
- %211 = fcmp ult float %210, 0x3FA99999A0000000 ; [#uses=1]
- br i1 %211, label %bb14, label %bb8
-
-bb8: ; preds = %bb7
- %212 = fcmp olt float %156, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i.i16 = select i1 %212, float -1.000000e+00, float %156 ; [#uses=2]
- %213 = fcmp ogt float %x_addr.0.i.i.i16, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i.i17 = select i1 %213, float 1.000000e+00, float %x_addr.0.i.i.i16 ; [#uses=1]
- %214 = tail call float @acosf(float %x_addr.1.i.i.i17) nounwind readonly ; [#uses=1]
- %215 = fmul float %214, 2.000000e+00 ; [#uses=2]
- %216 = fcmp ogt float %215, 0x400921FB60000000 ; [#uses=1]
- br i1 %216, label %bb.i18, label %bb1.i19
-
-bb.i18: ; preds = %bb8
- %217 = fsub float -0.000000e+00, %156 ; [#uses=2]
- %218 = fsub float -0.000000e+00, %155 ; [#uses=1]
- %219 = fsub float -0.000000e+00, %154 ; [#uses=1]
- %220 = fsub float -0.000000e+00, %153 ; [#uses=1]
- %221 = fcmp olt float %217, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i7.i = select i1 %221, float -1.000000e+00, float %217 ; [#uses=2]
- %222 = fcmp ogt float %x_addr.0.i.i7.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i8.i = select i1 %222, float 1.000000e+00, float %x_addr.0.i.i7.i ; [#uses=1]
- %223 = tail call float @acosf(float %x_addr.1.i.i8.i) nounwind readonly ; [#uses=1]
- %224 = fmul float %223, 2.000000e+00 ; [#uses=1]
- br label %bb1.i19
-
-bb1.i19: ; preds = %bb.i18, %bb8
- %twistAngle.1 = phi float [ %224, %bb.i18 ], [ %215, %bb8 ] ; [#uses=5]
- %225 = phi float [ %220, %bb.i18 ], [ %153, %bb8 ] ; [#uses=4]
- %226 = phi float [ %219, %bb.i18 ], [ %154, %bb8 ] ; [#uses=4]
- %227 = phi float [ %218, %bb.i18 ], [ %155, %bb8 ] ; [#uses=4]
- %228 = fcmp ogt float %twistAngle.1, 0x3E80000000000000 ; [#uses=1]
- br i1 %228, label %bb5.i, label %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit
-
-bb5.i: ; preds = %bb1.i19
- %229 = fmul float %225, %225 ; [#uses=1]
- %230 = fmul float %226, %226 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = fmul float %227, %227 ; [#uses=1]
- %233 = fadd float %231, %232 ; [#uses=1]
- %234 = tail call float @sqrtf(float %233) nounwind readonly ; [#uses=1]
- %235 = fdiv float 1.000000e+00, %234 ; [#uses=3]
- %236 = fmul float %225, %235 ; [#uses=1]
- %237 = fmul float %226, %235 ; [#uses=1]
- %238 = fmul float %227, %235 ; [#uses=1]
- br label %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit
-
-_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit: ; preds = %bb5.i, %bb1.i19
- %twistAxis.0.0.0 = phi float [ %236, %bb5.i ], [ %225, %bb1.i19 ] ; [#uses=3]
- %twistAxis.0.1.0 = phi float [ %237, %bb5.i ], [ %226, %bb1.i19 ] ; [#uses=3]
- %twistAxis.0.2.0 = phi float [ %238, %bb5.i ], [ %227, %bb1.i19 ] ; [#uses=3]
- %239 = tail call float @fabsf(float %twistAngle.1) nounwind readnone ; [#uses=1]
- %240 = fcmp ogt float %239, 0x3E80000000000000 ; [#uses=1]
- br i1 %240, label %bb9, label %bb14
-
-bb9: ; preds = %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit
- %241 = fcmp olt float %210, %twistAngle.1 ; [#uses=1]
- br i1 %241, label %bb13, label %bb11
-
-bb11: ; preds = %bb9
- %242 = fsub float -0.000000e+00, %210 ; [#uses=2]
- %243 = fcmp olt float %twistAngle.1, %242 ; [#uses=1]
- br i1 %243, label %bb12, label %bb13
-
-bb12: ; preds = %bb11
- br label %bb13
-
-bb13: ; preds = %bb12, %bb11, %bb9
- %twistAngle.0 = phi float [ %242, %bb12 ], [ %twistAngle.1, %bb11 ], [ %210, %bb9 ] ; [#uses=1]
- %244 = fmul float %twistAxis.0.0.0, %twistAxis.0.0.0 ; [#uses=1]
- %245 = fmul float %twistAxis.0.1.0, %twistAxis.0.1.0 ; [#uses=1]
- %246 = fadd float %244, %245 ; [#uses=1]
- %247 = fmul float %twistAxis.0.2.0, %twistAxis.0.2.0 ; [#uses=1]
- %248 = fadd float %246, %247 ; [#uses=1]
- %249 = tail call float @sqrtf(float %248) nounwind readonly ; [#uses=1]
- %250 = fmul float %twistAngle.0, 5.000000e-01 ; [#uses=2]
- %251 = tail call float @sinf(float %250) nounwind readonly ; [#uses=1]
- %252 = fdiv float %251, %249 ; [#uses=3]
- %253 = tail call float @cosf(float %250) nounwind readonly ; [#uses=1]
- %254 = fmul float %twistAxis.0.2.0, %252 ; [#uses=1]
- %255 = fmul float %twistAxis.0.1.0, %252 ; [#uses=1]
- %256 = fmul float %twistAxis.0.0.0, %252 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb13, %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit, %bb7
- %qTargetTwist.0.0.0.0 = phi float [ %153, %bb7 ], [ %256, %bb13 ], [ %153, %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit ] ; [#uses=4]
- %qTargetTwist.0.0.1.0 = phi float [ %154, %bb7 ], [ %255, %bb13 ], [ %154, %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit ] ; [#uses=4]
- %qTargetTwist.0.0.2.0 = phi float [ %155, %bb7 ], [ %254, %bb13 ], [ %155, %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit ] ; [#uses=4]
- %qTargetTwist.0.0.3.0 = phi float [ %156, %bb7 ], [ %253, %bb13 ], [ %156, %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit ] ; [#uses=4]
- %257 = fmul float %qTargetCone.0.0.3.1, %qTargetTwist.0.0.3.0 ; [#uses=1]
- %258 = fmul float %qTargetCone.0.0.0.1, %qTargetTwist.0.0.0.0 ; [#uses=1]
- %259 = fsub float %257, %258 ; [#uses=1]
- %260 = fmul float %qTargetCone.0.0.1.1, %qTargetTwist.0.0.1.0 ; [#uses=1]
- %261 = fsub float %259, %260 ; [#uses=1]
- %262 = fmul float %qTargetCone.0.0.2.1, %qTargetTwist.0.0.2.0 ; [#uses=1]
- %263 = fsub float %261, %262 ; [#uses=1]
- %264 = fmul float %qTargetCone.0.0.3.1, %qTargetTwist.0.0.2.0 ; [#uses=1]
- %265 = fmul float %qTargetCone.0.0.2.1, %qTargetTwist.0.0.3.0 ; [#uses=1]
- %266 = fadd float %264, %265 ; [#uses=1]
- %267 = fmul float %qTargetCone.0.0.0.1, %qTargetTwist.0.0.1.0 ; [#uses=1]
- %268 = fadd float %266, %267 ; [#uses=1]
- %269 = fmul float %qTargetCone.0.0.1.1, %qTargetTwist.0.0.0.0 ; [#uses=1]
- %270 = fsub float %268, %269 ; [#uses=1]
- %271 = fmul float %qTargetCone.0.0.3.1, %qTargetTwist.0.0.1.0 ; [#uses=1]
- %272 = fmul float %qTargetCone.0.0.1.1, %qTargetTwist.0.0.3.0 ; [#uses=1]
- %273 = fadd float %271, %272 ; [#uses=1]
- %274 = fmul float %qTargetCone.0.0.2.1, %qTargetTwist.0.0.0.0 ; [#uses=1]
- %275 = fadd float %273, %274 ; [#uses=1]
- %276 = fmul float %qTargetCone.0.0.0.1, %qTargetTwist.0.0.2.0 ; [#uses=1]
- %277 = fsub float %275, %276 ; [#uses=1]
- %278 = fmul float %qTargetCone.0.0.3.1, %qTargetTwist.0.0.0.0 ; [#uses=1]
- %279 = fmul float %qTargetCone.0.0.0.1, %qTargetTwist.0.0.3.0 ; [#uses=1]
- %280 = fadd float %278, %279 ; [#uses=1]
- %281 = fmul float %qTargetCone.0.0.1.1, %qTargetTwist.0.0.2.0 ; [#uses=1]
- %282 = fadd float %280, %281 ; [#uses=1]
- %283 = fmul float %qTargetCone.0.0.2.1, %qTargetTwist.0.0.1.0 ; [#uses=1]
- %284 = fsub float %282, %283 ; [#uses=1]
- store float %284, float* %0, align 4
- store float %277, float* %3, align 4
- store float %270, float* %6, align 4
- store float %263, float* %9, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraint14setMotorTargetERK12btQuaternion(%struct.btConeTwistConstraint* %this, %struct.btQuaternion* nocapture %q) nounwind align 2 {
-entry:
- %0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %trABCur = alloca %struct.btTransform, align 8 ; [#uses=17]
- %qABCur = alloca %struct.btQuaternion, align 8 ; [#uses=1]
- %trConstraintCur = alloca %struct.btTransform, align 8 ; [#uses=17]
- %qConstraintCur = alloca %struct.btQuaternion, align 8 ; [#uses=1]
- %qConstraint = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %3 = load %struct.btRigidBody** %2, align 4 ; [#uses=12]
- %4 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=7]
- %6 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=7]
- %8 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=7]
- %10 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=7]
- %12 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=7]
- %14 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=7]
- %16 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=7]
- %18 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=7]
- %20 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=7]
- %22 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- %24 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=4]
- %28 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %29 = load %struct.btRigidBody** %28, align 4 ; [#uses=12]
- %30 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=9]
- %32 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=9]
- %34 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=9]
- %36 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=9]
- %38 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=9]
- %40 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=9]
- %42 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=9]
- %44 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=9]
- %46 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=9]
- %48 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=2]
- %52 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=2]
- %54 = fsub float -0.000000e+00, %53 ; [#uses=3]
- %55 = fsub float -0.000000e+00, %51 ; [#uses=3]
- %56 = fsub float -0.000000e+00, %49 ; [#uses=3]
- %57 = fmul float %35, %56 ; [#uses=1]
- %58 = fmul float %41, %55 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = fmul float %47, %54 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %33, %56 ; [#uses=1]
- %63 = fmul float %39, %55 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %45, %54 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %31, %56 ; [#uses=1]
- %68 = fmul float %37, %55 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %43, %54 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %35, %23 ; [#uses=1]
- %73 = fmul float %41, %25 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = fmul float %47, %27 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = fadd float %76, %61 ; [#uses=1]
- %78 = fmul float %33, %23 ; [#uses=1]
- %79 = fmul float %39, %25 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=1]
- %81 = fmul float %45, %27 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = fadd float %82, %66 ; [#uses=1]
- %84 = fmul float %31, %23 ; [#uses=1]
- %85 = fmul float %37, %25 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = fmul float %43, %27 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=1]
- %89 = fadd float %88, %71 ; [#uses=1]
- %90 = fmul float %9, %35 ; [#uses=1]
- %91 = fmul float %15, %41 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %21, %47 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=1]
- %95 = fmul float %7, %35 ; [#uses=1]
- %96 = fmul float %13, %41 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %19, %47 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fmul float %5, %35 ; [#uses=1]
- %101 = fmul float %11, %41 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %17, %47 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=1]
- %105 = fmul float %9, %33 ; [#uses=1]
- %106 = fmul float %15, %39 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %21, %45 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=1]
- %110 = fmul float %7, %33 ; [#uses=1]
- %111 = fmul float %13, %39 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %19, %45 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=1]
- %115 = fmul float %5, %33 ; [#uses=1]
- %116 = fmul float %11, %39 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %17, %45 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = fmul float %9, %31 ; [#uses=1]
- %121 = fmul float %15, %37 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = fmul float %21, %43 ; [#uses=1]
- %124 = fadd float %122, %123 ; [#uses=1]
- %125 = fmul float %7, %31 ; [#uses=1]
- %126 = fmul float %13, %37 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = fmul float %19, %43 ; [#uses=1]
- %129 = fadd float %127, %128 ; [#uses=1]
- %130 = fmul float %5, %31 ; [#uses=1]
- %131 = fmul float %11, %37 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %17, %43 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %134, float* %135, align 8
- %136 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %129, float* %136, align 4
- %137 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %124, float* %137, align 8
- %138 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %138, align 4
- %139 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %119, float* %139, align 8
- %140 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %114, float* %140, align 4
- %141 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %109, float* %141, align 8
- %142 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %142, align 4
- %143 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %104, float* %143, align 8
- %144 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %99, float* %144, align 4
- %145 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %94, float* %145, align 8
- %146 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %146, align 4
- %147 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %89, float* %147, align 8
- %148 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %83, float* %148, align 4
- %149 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %77, float* %149, align 8
- %150 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %150, align 4
- %151 = getelementptr inbounds %struct.btTransform* %trABCur, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %151, %struct.btQuaternion* %qABCur) nounwind
- %152 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=3]
- %154 = fmul float %17, %153 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=3]
- %157 = fmul float %19, %156 ; [#uses=1]
- %158 = fadd float %154, %157 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=3]
- %161 = fmul float %21, %160 ; [#uses=1]
- %162 = fadd float %158, %161 ; [#uses=1]
- %163 = fadd float %162, %27 ; [#uses=3]
- %164 = fmul float %11, %153 ; [#uses=1]
- %165 = fmul float %13, %156 ; [#uses=1]
- %166 = fadd float %164, %165 ; [#uses=1]
- %167 = fmul float %15, %160 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=1]
- %169 = fadd float %168, %25 ; [#uses=3]
- %170 = fmul float %5, %153 ; [#uses=1]
- %171 = fmul float %7, %156 ; [#uses=1]
- %172 = fadd float %170, %171 ; [#uses=1]
- %173 = fmul float %9, %160 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=1]
- %175 = fadd float %174, %23 ; [#uses=3]
- %176 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=3]
- %178 = fmul float %177, %17 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %180 = load float* %179, align 4 ; [#uses=3]
- %181 = fmul float %180, %19 ; [#uses=1]
- %182 = fadd float %178, %181 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=3]
- %185 = fmul float %184, %21 ; [#uses=1]
- %186 = fadd float %182, %185 ; [#uses=3]
- %187 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %188 = load float* %187, align 4 ; [#uses=3]
- %189 = fmul float %188, %17 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=3]
- %192 = fmul float %191, %19 ; [#uses=1]
- %193 = fadd float %189, %192 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=3]
- %196 = fmul float %195, %21 ; [#uses=1]
- %197 = fadd float %193, %196 ; [#uses=3]
- %198 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %199 = load float* %198, align 4 ; [#uses=3]
- %200 = fmul float %199, %17 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %202 = load float* %201, align 4 ; [#uses=3]
- %203 = fmul float %202, %19 ; [#uses=1]
- %204 = fadd float %200, %203 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %206 = load float* %205, align 4 ; [#uses=3]
- %207 = fmul float %206, %21 ; [#uses=1]
- %208 = fadd float %204, %207 ; [#uses=3]
- %209 = fmul float %177, %11 ; [#uses=1]
- %210 = fmul float %180, %13 ; [#uses=1]
- %211 = fadd float %209, %210 ; [#uses=1]
- %212 = fmul float %184, %15 ; [#uses=1]
- %213 = fadd float %211, %212 ; [#uses=3]
- %214 = fmul float %188, %11 ; [#uses=1]
- %215 = fmul float %191, %13 ; [#uses=1]
- %216 = fadd float %214, %215 ; [#uses=1]
- %217 = fmul float %195, %15 ; [#uses=1]
- %218 = fadd float %216, %217 ; [#uses=3]
- %219 = fmul float %199, %11 ; [#uses=1]
- %220 = fmul float %202, %13 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=1]
- %222 = fmul float %206, %15 ; [#uses=1]
- %223 = fadd float %221, %222 ; [#uses=3]
- %224 = fmul float %177, %5 ; [#uses=1]
- %225 = fmul float %180, %7 ; [#uses=1]
- %226 = fadd float %224, %225 ; [#uses=1]
- %227 = fmul float %184, %9 ; [#uses=1]
- %228 = fadd float %226, %227 ; [#uses=3]
- %229 = fmul float %188, %5 ; [#uses=1]
- %230 = fmul float %191, %7 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = fmul float %195, %9 ; [#uses=1]
- %233 = fadd float %231, %232 ; [#uses=3]
- %234 = fmul float %199, %5 ; [#uses=1]
- %235 = fmul float %202, %7 ; [#uses=1]
- %236 = fadd float %234, %235 ; [#uses=1]
- %237 = fmul float %206, %9 ; [#uses=1]
- %238 = fadd float %236, %237 ; [#uses=3]
- %239 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %240 = load float* %239, align 4 ; [#uses=3]
- %241 = fmul float %43, %240 ; [#uses=1]
- %242 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %243 = load float* %242, align 4 ; [#uses=3]
- %244 = fmul float %45, %243 ; [#uses=1]
- %245 = fadd float %241, %244 ; [#uses=1]
- %246 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %247 = load float* %246, align 4 ; [#uses=3]
- %248 = fmul float %47, %247 ; [#uses=1]
- %249 = fadd float %245, %248 ; [#uses=1]
- %250 = fadd float %249, %53 ; [#uses=1]
- %251 = fmul float %37, %240 ; [#uses=1]
- %252 = fmul float %39, %243 ; [#uses=1]
- %253 = fadd float %251, %252 ; [#uses=1]
- %254 = fmul float %41, %247 ; [#uses=1]
- %255 = fadd float %253, %254 ; [#uses=1]
- %256 = fadd float %255, %51 ; [#uses=1]
- %257 = fmul float %31, %240 ; [#uses=1]
- %258 = fmul float %33, %243 ; [#uses=1]
- %259 = fadd float %257, %258 ; [#uses=1]
- %260 = fmul float %35, %247 ; [#uses=1]
- %261 = fadd float %259, %260 ; [#uses=1]
- %262 = fadd float %261, %49 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %264 = load float* %263, align 4 ; [#uses=3]
- %265 = fmul float %264, %43 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %267 = load float* %266, align 4 ; [#uses=3]
- %268 = fmul float %267, %45 ; [#uses=1]
- %269 = fadd float %265, %268 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %271 = load float* %270, align 4 ; [#uses=3]
- %272 = fmul float %271, %47 ; [#uses=1]
- %273 = fadd float %269, %272 ; [#uses=5]
- %274 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %275 = load float* %274, align 4 ; [#uses=3]
- %276 = fmul float %275, %43 ; [#uses=1]
- %277 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %278 = load float* %277, align 4 ; [#uses=3]
- %279 = fmul float %278, %45 ; [#uses=1]
- %280 = fadd float %276, %279 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %282 = load float* %281, align 4 ; [#uses=3]
- %283 = fmul float %282, %47 ; [#uses=1]
- %284 = fadd float %280, %283 ; [#uses=5]
- %285 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %286 = load float* %285, align 4 ; [#uses=3]
- %287 = fmul float %286, %43 ; [#uses=1]
- %288 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %289 = load float* %288, align 4 ; [#uses=3]
- %290 = fmul float %289, %45 ; [#uses=1]
- %291 = fadd float %287, %290 ; [#uses=1]
- %292 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %293 = load float* %292, align 4 ; [#uses=3]
- %294 = fmul float %293, %47 ; [#uses=1]
- %295 = fadd float %291, %294 ; [#uses=5]
- %296 = fmul float %264, %37 ; [#uses=1]
- %297 = fmul float %267, %39 ; [#uses=1]
- %298 = fadd float %296, %297 ; [#uses=1]
- %299 = fmul float %271, %41 ; [#uses=1]
- %300 = fadd float %298, %299 ; [#uses=5]
- %301 = fmul float %275, %37 ; [#uses=1]
- %302 = fmul float %278, %39 ; [#uses=1]
- %303 = fadd float %301, %302 ; [#uses=1]
- %304 = fmul float %282, %41 ; [#uses=1]
- %305 = fadd float %303, %304 ; [#uses=5]
- %306 = fmul float %286, %37 ; [#uses=1]
- %307 = fmul float %289, %39 ; [#uses=1]
- %308 = fadd float %306, %307 ; [#uses=1]
- %309 = fmul float %293, %41 ; [#uses=1]
- %310 = fadd float %308, %309 ; [#uses=5]
- %311 = fmul float %264, %31 ; [#uses=1]
- %312 = fmul float %267, %33 ; [#uses=1]
- %313 = fadd float %311, %312 ; [#uses=1]
- %314 = fmul float %271, %35 ; [#uses=1]
- %315 = fadd float %313, %314 ; [#uses=5]
- %316 = fmul float %275, %31 ; [#uses=1]
- %317 = fmul float %278, %33 ; [#uses=1]
- %318 = fadd float %316, %317 ; [#uses=1]
- %319 = fmul float %282, %35 ; [#uses=1]
- %320 = fadd float %318, %319 ; [#uses=5]
- %321 = fmul float %286, %31 ; [#uses=1]
- %322 = fmul float %289, %33 ; [#uses=1]
- %323 = fadd float %321, %322 ; [#uses=1]
- %324 = fmul float %293, %35 ; [#uses=1]
- %325 = fadd float %323, %324 ; [#uses=5]
- %326 = fsub float -0.000000e+00, %250 ; [#uses=3]
- %327 = fsub float -0.000000e+00, %256 ; [#uses=3]
- %328 = fsub float -0.000000e+00, %262 ; [#uses=3]
- %329 = fmul float %315, %328 ; [#uses=1]
- %330 = fmul float %300, %327 ; [#uses=1]
- %331 = fadd float %329, %330 ; [#uses=1]
- %332 = fmul float %273, %326 ; [#uses=1]
- %333 = fadd float %331, %332 ; [#uses=1]
- %334 = fmul float %320, %328 ; [#uses=1]
- %335 = fmul float %305, %327 ; [#uses=1]
- %336 = fadd float %334, %335 ; [#uses=1]
- %337 = fmul float %284, %326 ; [#uses=1]
- %338 = fadd float %336, %337 ; [#uses=1]
- %339 = fmul float %325, %328 ; [#uses=1]
- %340 = fmul float %310, %327 ; [#uses=1]
- %341 = fadd float %339, %340 ; [#uses=1]
- %342 = fmul float %295, %326 ; [#uses=1]
- %343 = fadd float %341, %342 ; [#uses=1]
- %344 = fmul float %315, %175 ; [#uses=1]
- %345 = fmul float %300, %169 ; [#uses=1]
- %346 = fadd float %344, %345 ; [#uses=1]
- %347 = fmul float %273, %163 ; [#uses=1]
- %348 = fadd float %346, %347 ; [#uses=1]
- %349 = fadd float %348, %333 ; [#uses=1]
- %350 = fmul float %320, %175 ; [#uses=1]
- %351 = fmul float %305, %169 ; [#uses=1]
- %352 = fadd float %350, %351 ; [#uses=1]
- %353 = fmul float %284, %163 ; [#uses=1]
- %354 = fadd float %352, %353 ; [#uses=1]
- %355 = fadd float %354, %338 ; [#uses=1]
- %356 = fmul float %325, %175 ; [#uses=1]
- %357 = fmul float %310, %169 ; [#uses=1]
- %358 = fadd float %356, %357 ; [#uses=1]
- %359 = fmul float %295, %163 ; [#uses=1]
- %360 = fadd float %358, %359 ; [#uses=1]
- %361 = fadd float %360, %343 ; [#uses=1]
- %362 = fmul float %228, %315 ; [#uses=1]
- %363 = fmul float %213, %300 ; [#uses=1]
- %364 = fadd float %362, %363 ; [#uses=1]
- %365 = fmul float %186, %273 ; [#uses=1]
- %366 = fadd float %364, %365 ; [#uses=1]
- %367 = fmul float %233, %315 ; [#uses=1]
- %368 = fmul float %218, %300 ; [#uses=1]
- %369 = fadd float %367, %368 ; [#uses=1]
- %370 = fmul float %197, %273 ; [#uses=1]
- %371 = fadd float %369, %370 ; [#uses=1]
- %372 = fmul float %238, %315 ; [#uses=1]
- %373 = fmul float %223, %300 ; [#uses=1]
- %374 = fadd float %372, %373 ; [#uses=1]
- %375 = fmul float %208, %273 ; [#uses=1]
- %376 = fadd float %374, %375 ; [#uses=1]
- %377 = fmul float %228, %320 ; [#uses=1]
- %378 = fmul float %213, %305 ; [#uses=1]
- %379 = fadd float %377, %378 ; [#uses=1]
- %380 = fmul float %186, %284 ; [#uses=1]
- %381 = fadd float %379, %380 ; [#uses=1]
- %382 = fmul float %233, %320 ; [#uses=1]
- %383 = fmul float %218, %305 ; [#uses=1]
- %384 = fadd float %382, %383 ; [#uses=1]
- %385 = fmul float %197, %284 ; [#uses=1]
- %386 = fadd float %384, %385 ; [#uses=1]
- %387 = fmul float %238, %320 ; [#uses=1]
- %388 = fmul float %223, %305 ; [#uses=1]
- %389 = fadd float %387, %388 ; [#uses=1]
- %390 = fmul float %208, %284 ; [#uses=1]
- %391 = fadd float %389, %390 ; [#uses=1]
- %392 = fmul float %228, %325 ; [#uses=1]
- %393 = fmul float %213, %310 ; [#uses=1]
- %394 = fadd float %392, %393 ; [#uses=1]
- %395 = fmul float %186, %295 ; [#uses=1]
- %396 = fadd float %394, %395 ; [#uses=1]
- %397 = fmul float %233, %325 ; [#uses=1]
- %398 = fmul float %218, %310 ; [#uses=1]
- %399 = fadd float %397, %398 ; [#uses=1]
- %400 = fmul float %197, %295 ; [#uses=1]
- %401 = fadd float %399, %400 ; [#uses=1]
- %402 = fmul float %238, %325 ; [#uses=1]
- %403 = fmul float %223, %310 ; [#uses=1]
- %404 = fadd float %402, %403 ; [#uses=1]
- %405 = fmul float %208, %295 ; [#uses=1]
- %406 = fadd float %404, %405 ; [#uses=1]
- %407 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %406, float* %407, align 8
- %408 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %401, float* %408, align 4
- %409 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %396, float* %409, align 8
- %410 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %410, align 4
- %411 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %391, float* %411, align 8
- %412 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %386, float* %412, align 4
- %413 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %381, float* %413, align 8
- %414 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %414, align 4
- %415 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %376, float* %415, align 8
- %416 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %371, float* %416, align 4
- %417 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %366, float* %417, align 8
- %418 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %418, align 4
- %419 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %361, float* %419, align 8
- %420 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %355, float* %420, align 4
- %421 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %349, float* %421, align 8
- %422 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %422, align 4
- %423 = getelementptr inbounds %struct.btTransform* %trConstraintCur, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %423, %struct.btQuaternion* %qConstraintCur) nounwind
- %424 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %424, %struct.btQuaternion* %1) nounwind
- %425 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %425, %struct.btQuaternion* %0) nounwind
- %426 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %427 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %428 = load float* %427, align 8 ; [#uses=1]
- %429 = fsub float -0.000000e+00, %428 ; [#uses=4]
- %430 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %431 = load float* %430, align 4 ; [#uses=1]
- %432 = fsub float -0.000000e+00, %431 ; [#uses=4]
- %433 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %434 = load float* %433, align 8 ; [#uses=1]
- %435 = fsub float -0.000000e+00, %434 ; [#uses=4]
- %436 = load float* %426, align 4 ; [#uses=4]
- %437 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %438 = load float* %437, align 4 ; [#uses=4]
- %439 = fmul float %436, %438 ; [#uses=1]
- %440 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %441 = load float* %440, align 4 ; [#uses=4]
- %442 = fmul float %441, %435 ; [#uses=1]
- %443 = fsub float %439, %442 ; [#uses=1]
- %444 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %445 = load float* %444, align 4 ; [#uses=4]
- %446 = fmul float %445, %432 ; [#uses=1]
- %447 = fsub float %443, %446 ; [#uses=1]
- %448 = getelementptr inbounds %struct.btQuaternion* %q, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %449 = load float* %448, align 4 ; [#uses=4]
- %450 = fmul float %449, %429 ; [#uses=1]
- %451 = fsub float %447, %450 ; [#uses=4]
- %452 = fmul float %436, %449 ; [#uses=1]
- %453 = fmul float %438, %429 ; [#uses=1]
- %454 = fadd float %452, %453 ; [#uses=1]
- %455 = fmul float %445, %435 ; [#uses=1]
- %456 = fadd float %454, %455 ; [#uses=1]
- %457 = fmul float %441, %432 ; [#uses=1]
- %458 = fsub float %456, %457 ; [#uses=4]
- %459 = fmul float %436, %445 ; [#uses=1]
- %460 = fmul float %438, %432 ; [#uses=1]
- %461 = fadd float %459, %460 ; [#uses=1]
- %462 = fmul float %441, %429 ; [#uses=1]
- %463 = fadd float %461, %462 ; [#uses=1]
- %464 = fmul float %449, %435 ; [#uses=1]
- %465 = fsub float %463, %464 ; [#uses=4]
- %466 = fmul float %436, %441 ; [#uses=1]
- %467 = fmul float %438, %435 ; [#uses=1]
- %468 = fadd float %466, %467 ; [#uses=1]
- %469 = fmul float %449, %432 ; [#uses=1]
- %470 = fadd float %468, %469 ; [#uses=1]
- %471 = fmul float %445, %429 ; [#uses=1]
- %472 = fsub float %470, %471 ; [#uses=4]
- %473 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %474 = load float* %473, align 4 ; [#uses=4]
- %475 = fmul float %451, %474 ; [#uses=1]
- %476 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %477 = load float* %476, align 8 ; [#uses=4]
- %478 = fmul float %472, %477 ; [#uses=1]
- %479 = fsub float %475, %478 ; [#uses=1]
- %480 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %481 = load float* %480, align 4 ; [#uses=4]
- %482 = fmul float %465, %481 ; [#uses=1]
- %483 = fsub float %479, %482 ; [#uses=1]
- %484 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %485 = load float* %484, align 8 ; [#uses=4]
- %486 = fmul float %458, %485 ; [#uses=1]
- %487 = fsub float %483, %486 ; [#uses=1]
- %488 = fmul float %451, %485 ; [#uses=1]
- %489 = fmul float %458, %474 ; [#uses=1]
- %490 = fadd float %488, %489 ; [#uses=1]
- %491 = fmul float %472, %481 ; [#uses=1]
- %492 = fadd float %490, %491 ; [#uses=1]
- %493 = fmul float %465, %477 ; [#uses=1]
- %494 = fsub float %492, %493 ; [#uses=1]
- %495 = fmul float %451, %481 ; [#uses=1]
- %496 = fmul float %465, %474 ; [#uses=1]
- %497 = fadd float %495, %496 ; [#uses=1]
- %498 = fmul float %458, %477 ; [#uses=1]
- %499 = fadd float %497, %498 ; [#uses=1]
- %500 = fmul float %472, %485 ; [#uses=1]
- %501 = fsub float %499, %500 ; [#uses=1]
- %502 = fmul float %451, %477 ; [#uses=1]
- %503 = fmul float %472, %474 ; [#uses=1]
- %504 = fadd float %502, %503 ; [#uses=1]
- %505 = fmul float %465, %485 ; [#uses=1]
- %506 = fadd float %504, %505 ; [#uses=1]
- %507 = fmul float %458, %481 ; [#uses=1]
- %508 = fsub float %506, %507 ; [#uses=1]
- %509 = getelementptr inbounds %struct.btQuaternion* %qConstraint, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %508, float* %509, align 8
- %510 = getelementptr inbounds %struct.btQuaternion* %qConstraint, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %501, float* %510, align 4
- %511 = getelementptr inbounds %struct.btQuaternion* %qConstraint, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %494, float* %511, align 8
- %512 = getelementptr inbounds %struct.btQuaternion* %qConstraint, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %487, float* %512, align 4
- call void @_ZN21btConeTwistConstraint31setMotorTargetInConstraintSpaceERK12btQuaternion(%struct.btConeTwistConstraint* %this, %struct.btQuaternion* %qConstraint)
- ret void
-}
-
-; [#uses=3]
-define void @_ZN21btConeTwistConstraint14calcAngleInfo2ERK11btTransformS2_RK11btMatrix3x3S5_(%struct.btConeTwistConstraint* %this, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btMatrix3x3* nocapture %invInertiaWorldA, %struct.btMatrix3x3* nocapture %invInertiaWorldB) nounwind align 2 {
-entry:
- %0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %3 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %trDeltaAB = alloca %struct.btTransform, align 8 ; [#uses=17]
- %qDeltaAB = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 17 ; [#uses=4]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=2]
- store i8 0, i8* %6, align 1
- %7 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=7]
- store i8 0, i8* %7, align 2
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 29 ; [#uses=1]
- %9 = load i8* %8, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBool, label %bb10, label %bb
-
-bb: ; preds = %entry
- %10 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 25 ; [#uses=1]
- %11 = load i8* %10, align 1 ; [#uses=1]
- %toBool1not = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool1not, label %bb5, label %bb10
-
-bb5: ; preds = %bb
- %12 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=6]
- %14 = fmul float %13, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=5]
- %17 = fmul float %16, %16 ; [#uses=1]
- %18 = fadd float %14, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=4]
- %21 = fmul float %20, %20 ; [#uses=1]
- %22 = fadd float %18, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 31, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=5]
- %25 = fmul float %24, %24 ; [#uses=1]
- %26 = fadd float %22, %25 ; [#uses=1]
- %27 = fdiv float 2.000000e+00, %26 ; [#uses=3]
- %28 = fmul float %13, %27 ; [#uses=2]
- %29 = fmul float %16, %27 ; [#uses=3]
- %30 = fmul float %20, %27 ; [#uses=4]
- %31 = fmul float %24, %28 ; [#uses=2]
- %32 = fmul float %24, %29 ; [#uses=2]
- %33 = fmul float %24, %30 ; [#uses=2]
- %34 = fmul float %13, %28 ; [#uses=2]
- %35 = fmul float %13, %29 ; [#uses=2]
- %36 = fmul float %13, %30 ; [#uses=2]
- %37 = fmul float %16, %29 ; [#uses=2]
- %38 = fmul float %16, %30 ; [#uses=2]
- %39 = fmul float %20, %30 ; [#uses=2]
- %40 = fadd float %34, %37 ; [#uses=1]
- %41 = fsub float 1.000000e+00, %40 ; [#uses=3]
- %42 = fadd float %38, %31 ; [#uses=3]
- %43 = fsub float %36, %32 ; [#uses=3]
- %44 = fsub float %38, %31 ; [#uses=3]
- %45 = fadd float %34, %39 ; [#uses=1]
- %46 = fsub float 1.000000e+00, %45 ; [#uses=3]
- %47 = fadd float %35, %33 ; [#uses=3]
- %48 = fadd float %36, %32 ; [#uses=3]
- %49 = fsub float %35, %33 ; [#uses=3]
- %50 = fadd float %37, %39 ; [#uses=1]
- %51 = fsub float 1.000000e+00, %50 ; [#uses=3]
- %52 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=4]
- %54 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=3]
- %56 = fmul float %53, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=4]
- %59 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fmul float %58, %60 ; [#uses=1]
- %62 = fadd float %56, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=4]
- %65 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=3]
- %67 = fmul float %64, %66 ; [#uses=1]
- %68 = fadd float %62, %67 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %71 = fadd float %68, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=4]
- %74 = fmul float %73, %55 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=4]
- %77 = fmul float %76, %60 ; [#uses=1]
- %78 = fadd float %74, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=4]
- %81 = fmul float %80, %66 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = fadd float %82, %84 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=4]
- %88 = fmul float %87, %55 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=4]
- %91 = fmul float %90, %60 ; [#uses=1]
- %92 = fadd float %88, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=4]
- %95 = fmul float %94, %66 ; [#uses=1]
- %96 = fadd float %92, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fadd float %96, %98 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=3]
- %102 = fmul float %101, %53 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=3]
- %105 = fmul float %104, %58 ; [#uses=1]
- %106 = fadd float %102, %105 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=3]
- %109 = fmul float %108, %64 ; [#uses=1]
- %110 = fadd float %106, %109 ; [#uses=4]
- %111 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=3]
- %113 = fmul float %112, %53 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=3]
- %116 = fmul float %115, %58 ; [#uses=1]
- %117 = fadd float %113, %116 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=3]
- %120 = fmul float %119, %64 ; [#uses=1]
- %121 = fadd float %117, %120 ; [#uses=4]
- %122 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=3]
- %124 = fmul float %123, %53 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=3]
- %127 = fmul float %126, %58 ; [#uses=1]
- %128 = fadd float %124, %127 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=3]
- %131 = fmul float %130, %64 ; [#uses=1]
- %132 = fadd float %128, %131 ; [#uses=4]
- %133 = fmul float %101, %73 ; [#uses=1]
- %134 = fmul float %104, %76 ; [#uses=1]
- %135 = fadd float %133, %134 ; [#uses=1]
- %136 = fmul float %108, %80 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=4]
- %138 = fmul float %112, %73 ; [#uses=1]
- %139 = fmul float %115, %76 ; [#uses=1]
- %140 = fadd float %138, %139 ; [#uses=1]
- %141 = fmul float %119, %80 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=4]
- %143 = fmul float %123, %73 ; [#uses=1]
- %144 = fmul float %126, %76 ; [#uses=1]
- %145 = fadd float %143, %144 ; [#uses=1]
- %146 = fmul float %130, %80 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=4]
- %148 = fmul float %101, %87 ; [#uses=1]
- %149 = fmul float %104, %90 ; [#uses=1]
- %150 = fadd float %148, %149 ; [#uses=1]
- %151 = fmul float %108, %94 ; [#uses=1]
- %152 = fadd float %150, %151 ; [#uses=4]
- %153 = fmul float %112, %87 ; [#uses=1]
- %154 = fmul float %115, %90 ; [#uses=1]
- %155 = fadd float %153, %154 ; [#uses=1]
- %156 = fmul float %119, %94 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=4]
- %158 = fmul float %123, %87 ; [#uses=1]
- %159 = fmul float %126, %90 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=1]
- %161 = fmul float %130, %94 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=4]
- %163 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %164 = load float* %163, align 4 ; [#uses=4]
- %165 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=3]
- %167 = fmul float %164, %166 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=4]
- %170 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=3]
- %172 = fmul float %169, %171 ; [#uses=1]
- %173 = fadd float %167, %172 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=4]
- %176 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=3]
- %178 = fmul float %175, %177 ; [#uses=1]
- %179 = fadd float %173, %178 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %181 = load float* %180, align 4 ; [#uses=1]
- %182 = fadd float %179, %181 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=4]
- %185 = fmul float %184, %166 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=4]
- %188 = fmul float %187, %171 ; [#uses=1]
- %189 = fadd float %185, %188 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=4]
- %192 = fmul float %191, %177 ; [#uses=1]
- %193 = fadd float %189, %192 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=1]
- %196 = fadd float %193, %195 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %198 = load float* %197, align 4 ; [#uses=4]
- %199 = fmul float %198, %166 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %201 = load float* %200, align 4 ; [#uses=4]
- %202 = fmul float %201, %171 ; [#uses=1]
- %203 = fadd float %199, %202 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=4]
- %206 = fmul float %205, %177 ; [#uses=1]
- %207 = fadd float %203, %206 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=1]
- %210 = fadd float %207, %209 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=3]
- %213 = fmul float %212, %164 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %215 = load float* %214, align 4 ; [#uses=3]
- %216 = fmul float %215, %169 ; [#uses=1]
- %217 = fadd float %213, %216 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %219 = load float* %218, align 4 ; [#uses=3]
- %220 = fmul float %219, %175 ; [#uses=1]
- %221 = fadd float %217, %220 ; [#uses=4]
- %222 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %223 = load float* %222, align 4 ; [#uses=3]
- %224 = fmul float %223, %164 ; [#uses=1]
- %225 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %226 = load float* %225, align 4 ; [#uses=3]
- %227 = fmul float %226, %169 ; [#uses=1]
- %228 = fadd float %224, %227 ; [#uses=1]
- %229 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %230 = load float* %229, align 4 ; [#uses=3]
- %231 = fmul float %230, %175 ; [#uses=1]
- %232 = fadd float %228, %231 ; [#uses=4]
- %233 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %234 = load float* %233, align 4 ; [#uses=3]
- %235 = fmul float %234, %164 ; [#uses=1]
- %236 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %237 = load float* %236, align 4 ; [#uses=3]
- %238 = fmul float %237, %169 ; [#uses=1]
- %239 = fadd float %235, %238 ; [#uses=1]
- %240 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %241 = load float* %240, align 4 ; [#uses=3]
- %242 = fmul float %241, %175 ; [#uses=1]
- %243 = fadd float %239, %242 ; [#uses=4]
- %244 = fmul float %212, %184 ; [#uses=1]
- %245 = fmul float %215, %187 ; [#uses=1]
- %246 = fadd float %244, %245 ; [#uses=1]
- %247 = fmul float %219, %191 ; [#uses=1]
- %248 = fadd float %246, %247 ; [#uses=4]
- %249 = fmul float %223, %184 ; [#uses=1]
- %250 = fmul float %226, %187 ; [#uses=1]
- %251 = fadd float %249, %250 ; [#uses=1]
- %252 = fmul float %230, %191 ; [#uses=1]
- %253 = fadd float %251, %252 ; [#uses=4]
- %254 = fmul float %234, %184 ; [#uses=1]
- %255 = fmul float %237, %187 ; [#uses=1]
- %256 = fadd float %254, %255 ; [#uses=1]
- %257 = fmul float %241, %191 ; [#uses=1]
- %258 = fadd float %256, %257 ; [#uses=4]
- %259 = fmul float %212, %198 ; [#uses=1]
- %260 = fmul float %215, %201 ; [#uses=1]
- %261 = fadd float %259, %260 ; [#uses=1]
- %262 = fmul float %219, %205 ; [#uses=1]
- %263 = fadd float %261, %262 ; [#uses=4]
- %264 = fmul float %223, %198 ; [#uses=1]
- %265 = fmul float %226, %201 ; [#uses=1]
- %266 = fadd float %264, %265 ; [#uses=1]
- %267 = fmul float %230, %205 ; [#uses=1]
- %268 = fadd float %266, %267 ; [#uses=4]
- %269 = fmul float %234, %198 ; [#uses=1]
- %270 = fmul float %237, %201 ; [#uses=1]
- %271 = fadd float %269, %270 ; [#uses=1]
- %272 = fmul float %241, %205 ; [#uses=1]
- %273 = fadd float %271, %272 ; [#uses=4]
- %274 = fsub float -0.000000e+00, %71 ; [#uses=3]
- %275 = fsub float -0.000000e+00, %85 ; [#uses=3]
- %276 = fsub float -0.000000e+00, %99 ; [#uses=3]
- %277 = fmul float %152, %276 ; [#uses=1]
- %278 = fmul float %137, %275 ; [#uses=1]
- %279 = fadd float %277, %278 ; [#uses=1]
- %280 = fmul float %110, %274 ; [#uses=1]
- %281 = fadd float %279, %280 ; [#uses=3]
- %282 = fmul float %157, %276 ; [#uses=1]
- %283 = fmul float %142, %275 ; [#uses=1]
- %284 = fadd float %282, %283 ; [#uses=1]
- %285 = fmul float %121, %274 ; [#uses=1]
- %286 = fadd float %284, %285 ; [#uses=3]
- %287 = fmul float %162, %276 ; [#uses=1]
- %288 = fmul float %147, %275 ; [#uses=1]
- %289 = fadd float %287, %288 ; [#uses=1]
- %290 = fmul float %132, %274 ; [#uses=1]
- %291 = fadd float %289, %290 ; [#uses=3]
- %292 = fmul float %243, 0.000000e+00 ; [#uses=1]
- %293 = fmul float %232, 0.000000e+00 ; [#uses=1]
- %294 = fadd float %292, %293 ; [#uses=1]
- %295 = fmul float %221, 0.000000e+00 ; [#uses=1]
- %296 = fadd float %294, %295 ; [#uses=1]
- %297 = fadd float %296, %182 ; [#uses=1]
- %298 = fmul float %258, 0.000000e+00 ; [#uses=1]
- %299 = fmul float %253, 0.000000e+00 ; [#uses=1]
- %300 = fadd float %298, %299 ; [#uses=1]
- %301 = fmul float %248, 0.000000e+00 ; [#uses=1]
- %302 = fadd float %300, %301 ; [#uses=1]
- %303 = fadd float %302, %196 ; [#uses=1]
- %304 = fmul float %273, 0.000000e+00 ; [#uses=1]
- %305 = fmul float %268, 0.000000e+00 ; [#uses=1]
- %306 = fadd float %304, %305 ; [#uses=1]
- %307 = fmul float %263, 0.000000e+00 ; [#uses=1]
- %308 = fadd float %306, %307 ; [#uses=1]
- %309 = fadd float %308, %210 ; [#uses=1]
- %310 = fmul float %48, %243 ; [#uses=1]
- %311 = fmul float %44, %232 ; [#uses=1]
- %312 = fadd float %310, %311 ; [#uses=1]
- %313 = fmul float %41, %221 ; [#uses=1]
- %314 = fadd float %312, %313 ; [#uses=4]
- %315 = fmul float %49, %243 ; [#uses=1]
- %316 = fmul float %46, %232 ; [#uses=1]
- %317 = fadd float %315, %316 ; [#uses=1]
- %318 = fmul float %42, %221 ; [#uses=1]
- %319 = fadd float %317, %318 ; [#uses=4]
- %320 = fmul float %51, %243 ; [#uses=1]
- %321 = fmul float %47, %232 ; [#uses=1]
- %322 = fadd float %320, %321 ; [#uses=1]
- %323 = fmul float %43, %221 ; [#uses=1]
- %324 = fadd float %322, %323 ; [#uses=4]
- %325 = fmul float %48, %258 ; [#uses=1]
- %326 = fmul float %44, %253 ; [#uses=1]
- %327 = fadd float %325, %326 ; [#uses=1]
- %328 = fmul float %41, %248 ; [#uses=1]
- %329 = fadd float %327, %328 ; [#uses=4]
- %330 = fmul float %49, %258 ; [#uses=1]
- %331 = fmul float %46, %253 ; [#uses=1]
- %332 = fadd float %330, %331 ; [#uses=1]
- %333 = fmul float %42, %248 ; [#uses=1]
- %334 = fadd float %332, %333 ; [#uses=4]
- %335 = fmul float %51, %258 ; [#uses=1]
- %336 = fmul float %47, %253 ; [#uses=1]
- %337 = fadd float %335, %336 ; [#uses=1]
- %338 = fmul float %43, %248 ; [#uses=1]
- %339 = fadd float %337, %338 ; [#uses=4]
- %340 = fmul float %48, %273 ; [#uses=1]
- %341 = fmul float %44, %268 ; [#uses=1]
- %342 = fadd float %340, %341 ; [#uses=1]
- %343 = fmul float %41, %263 ; [#uses=1]
- %344 = fadd float %342, %343 ; [#uses=4]
- %345 = fmul float %49, %273 ; [#uses=1]
- %346 = fmul float %46, %268 ; [#uses=1]
- %347 = fadd float %345, %346 ; [#uses=1]
- %348 = fmul float %42, %263 ; [#uses=1]
- %349 = fadd float %347, %348 ; [#uses=4]
- %350 = fmul float %51, %273 ; [#uses=1]
- %351 = fmul float %47, %268 ; [#uses=1]
- %352 = fadd float %350, %351 ; [#uses=1]
- %353 = fmul float %43, %263 ; [#uses=1]
- %354 = fadd float %352, %353 ; [#uses=4]
- %355 = fmul float %324, %291 ; [#uses=1]
- %356 = fmul float %319, %286 ; [#uses=1]
- %357 = fadd float %355, %356 ; [#uses=1]
- %358 = fmul float %314, %281 ; [#uses=1]
- %359 = fadd float %357, %358 ; [#uses=1]
- %360 = fadd float %359, %297 ; [#uses=1]
- %361 = fmul float %339, %291 ; [#uses=1]
- %362 = fmul float %334, %286 ; [#uses=1]
- %363 = fadd float %361, %362 ; [#uses=1]
- %364 = fmul float %329, %281 ; [#uses=1]
- %365 = fadd float %363, %364 ; [#uses=1]
- %366 = fadd float %365, %303 ; [#uses=1]
- %367 = fmul float %354, %291 ; [#uses=1]
- %368 = fmul float %349, %286 ; [#uses=1]
- %369 = fadd float %367, %368 ; [#uses=1]
- %370 = fmul float %344, %281 ; [#uses=1]
- %371 = fadd float %369, %370 ; [#uses=1]
- %372 = fadd float %371, %309 ; [#uses=1]
- %373 = fmul float %132, %324 ; [#uses=1]
- %374 = fmul float %121, %319 ; [#uses=1]
- %375 = fadd float %373, %374 ; [#uses=1]
- %376 = fmul float %110, %314 ; [#uses=1]
- %377 = fadd float %375, %376 ; [#uses=1]
- %378 = fmul float %147, %324 ; [#uses=1]
- %379 = fmul float %142, %319 ; [#uses=1]
- %380 = fadd float %378, %379 ; [#uses=1]
- %381 = fmul float %137, %314 ; [#uses=1]
- %382 = fadd float %380, %381 ; [#uses=1]
- %383 = fmul float %162, %324 ; [#uses=1]
- %384 = fmul float %157, %319 ; [#uses=1]
- %385 = fadd float %383, %384 ; [#uses=1]
- %386 = fmul float %152, %314 ; [#uses=1]
- %387 = fadd float %385, %386 ; [#uses=1]
- %388 = fmul float %132, %339 ; [#uses=1]
- %389 = fmul float %121, %334 ; [#uses=1]
- %390 = fadd float %388, %389 ; [#uses=1]
- %391 = fmul float %110, %329 ; [#uses=1]
- %392 = fadd float %390, %391 ; [#uses=1]
- %393 = fmul float %147, %339 ; [#uses=1]
- %394 = fmul float %142, %334 ; [#uses=1]
- %395 = fadd float %393, %394 ; [#uses=1]
- %396 = fmul float %137, %329 ; [#uses=1]
- %397 = fadd float %395, %396 ; [#uses=1]
- %398 = fmul float %162, %339 ; [#uses=1]
- %399 = fmul float %157, %334 ; [#uses=1]
- %400 = fadd float %398, %399 ; [#uses=1]
- %401 = fmul float %152, %329 ; [#uses=1]
- %402 = fadd float %400, %401 ; [#uses=1]
- %403 = fmul float %132, %354 ; [#uses=1]
- %404 = fmul float %121, %349 ; [#uses=1]
- %405 = fadd float %403, %404 ; [#uses=1]
- %406 = fmul float %110, %344 ; [#uses=1]
- %407 = fadd float %405, %406 ; [#uses=1]
- %408 = fmul float %147, %354 ; [#uses=1]
- %409 = fmul float %142, %349 ; [#uses=1]
- %410 = fadd float %408, %409 ; [#uses=1]
- %411 = fmul float %137, %344 ; [#uses=1]
- %412 = fadd float %410, %411 ; [#uses=1]
- %413 = fmul float %162, %354 ; [#uses=1]
- %414 = fmul float %157, %349 ; [#uses=1]
- %415 = fadd float %413, %414 ; [#uses=1]
- %416 = fmul float %152, %344 ; [#uses=1]
- %417 = fadd float %415, %416 ; [#uses=1]
- %418 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %417, float* %418, align 8
- %419 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %412, float* %419, align 4
- %420 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %407, float* %420, align 8
- %421 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %421, align 4
- %422 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %402, float* %422, align 8
- %423 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %397, float* %423, align 4
- %424 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %392, float* %424, align 8
- %425 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %425, align 4
- %426 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %387, float* %426, align 8
- %427 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %382, float* %427, align 4
- %428 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %377, float* %428, align 8
- %429 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %429, align 4
- %430 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %372, float* %430, align 8
- %431 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %366, float* %431, align 4
- %432 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %360, float* %432, align 8
- %433 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %433, align 4
- %434 = getelementptr inbounds %struct.btTransform* %trDeltaAB, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %434, %struct.btQuaternion* %qDeltaAB) nounwind
- %435 = getelementptr inbounds %struct.btQuaternion* %qDeltaAB, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %436 = getelementptr inbounds %struct.btQuaternion* %qDeltaAB, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %437 = getelementptr inbounds %struct.btQuaternion* %qDeltaAB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %438 = load float* %437, align 8 ; [#uses=4]
- %439 = load float* %436, align 4 ; [#uses=4]
- %440 = load float* %435, align 8 ; [#uses=4]
- %441 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=2]
- store float %438, float* %441, align 4
- %442 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=2]
- store float %439, float* %442, align 4
- %443 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=2]
- store float %440, float* %443, align 4
- %444 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %444, align 4
- %445 = fmul float %438, %438 ; [#uses=1]
- %446 = fmul float %439, %439 ; [#uses=1]
- %447 = fadd float %445, %446 ; [#uses=1]
- %448 = fmul float %440, %440 ; [#uses=1]
- %449 = fadd float %447, %448 ; [#uses=1]
- %450 = call float @sqrtf(float %449) nounwind readonly ; [#uses=1]
- %451 = fdiv float 1.000000e+00, %450 ; [#uses=3]
- %452 = fmul float %438, %451 ; [#uses=1]
- store float %452, float* %441, align 4
- %453 = fmul float %439, %451 ; [#uses=1]
- store float %453, float* %442, align 4
- %454 = fmul float %440, %451 ; [#uses=1]
- store float %454, float* %443, align 4
- %455 = getelementptr inbounds %struct.btQuaternion* %qDeltaAB, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %456 = load float* %455, align 4 ; [#uses=2]
- %457 = fcmp olt float %456, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i = select i1 %457, float -1.000000e+00, float %456 ; [#uses=2]
- %458 = fcmp ogt float %x_addr.0.i.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i = select i1 %458, float 1.000000e+00, float %x_addr.0.i.i ; [#uses=1]
- %459 = call float @acosf(float %x_addr.1.i.i) nounwind readonly ; [#uses=1]
- %460 = fmul float %459, 2.000000e+00 ; [#uses=2]
- store float %460, float* %4, align 4
- %461 = call float @fabsf(float %460) nounwind readnone ; [#uses=1]
- %462 = fcmp olt float %461, 0x3E80000000000000 ; [#uses=1]
- br i1 %462, label %return, label %bb9
-
-bb9: ; preds = %bb5
- store i8 1, i8* %7, align 2
- ret void
-
-bb10: ; preds = %bb, %entry
- %463 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %463, %struct.btQuaternion* %3) nounwind
- %464 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %464, %struct.btQuaternion* %2) nounwind
- %465 = getelementptr inbounds %struct.btQuaternion* %2, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %466 = load float* %465, align 4 ; [#uses=4]
- %467 = getelementptr inbounds %struct.btQuaternion* %3, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %468 = load float* %467, align 4 ; [#uses=4]
- %469 = fmul float %466, %468 ; [#uses=1]
- %470 = getelementptr inbounds %struct.btQuaternion* %2, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %471 = load float* %470, align 8 ; [#uses=4]
- %472 = getelementptr inbounds %struct.btQuaternion* %3, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %473 = load float* %472, align 8 ; [#uses=4]
- %474 = fmul float %471, %473 ; [#uses=1]
- %475 = fsub float %469, %474 ; [#uses=1]
- %476 = getelementptr inbounds %struct.btQuaternion* %2, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %477 = load float* %476, align 4 ; [#uses=4]
- %478 = getelementptr inbounds %struct.btQuaternion* %3, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %479 = load float* %478, align 4 ; [#uses=4]
- %480 = fmul float %477, %479 ; [#uses=1]
- %481 = fsub float %475, %480 ; [#uses=1]
- %482 = getelementptr inbounds %struct.btQuaternion* %2, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %483 = load float* %482, align 8 ; [#uses=4]
- %484 = getelementptr inbounds %struct.btQuaternion* %3, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %485 = load float* %484, align 8 ; [#uses=4]
- %486 = fmul float %483, %485 ; [#uses=1]
- %487 = fsub float %481, %486 ; [#uses=10]
- %488 = fmul float %466, %485 ; [#uses=1]
- %489 = fmul float %483, %468 ; [#uses=1]
- %490 = fadd float %488, %489 ; [#uses=1]
- %491 = fmul float %471, %479 ; [#uses=1]
- %492 = fadd float %490, %491 ; [#uses=1]
- %493 = fmul float %477, %473 ; [#uses=1]
- %494 = fsub float %492, %493 ; [#uses=8]
- %495 = fmul float %466, %479 ; [#uses=1]
- %496 = fmul float %477, %468 ; [#uses=1]
- %497 = fadd float %495, %496 ; [#uses=1]
- %498 = fmul float %483, %473 ; [#uses=1]
- %499 = fadd float %497, %498 ; [#uses=1]
- %500 = fmul float %471, %485 ; [#uses=1]
- %501 = fsub float %499, %500 ; [#uses=8]
- %502 = fmul float %466, %473 ; [#uses=1]
- %503 = fmul float %471, %468 ; [#uses=1]
- %504 = fadd float %502, %503 ; [#uses=1]
- %505 = fmul float %477, %485 ; [#uses=1]
- %506 = fadd float %504, %505 ; [#uses=1]
- %507 = fmul float %483, %479 ; [#uses=1]
- %508 = fsub float %506, %507 ; [#uses=8]
- %509 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %509, %struct.btQuaternion* %1) nounwind
- %510 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %510, %struct.btQuaternion* %0) nounwind
- %511 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %512 = load float* %511, align 4 ; [#uses=4]
- %513 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %514 = load float* %513, align 4 ; [#uses=4]
- %515 = fmul float %512, %514 ; [#uses=1]
- %516 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %517 = load float* %516, align 8 ; [#uses=4]
- %518 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %519 = load float* %518, align 8 ; [#uses=4]
- %520 = fmul float %517, %519 ; [#uses=1]
- %521 = fsub float %515, %520 ; [#uses=1]
- %522 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %523 = load float* %522, align 4 ; [#uses=4]
- %524 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %525 = load float* %524, align 4 ; [#uses=4]
- %526 = fmul float %523, %525 ; [#uses=1]
- %527 = fsub float %521, %526 ; [#uses=1]
- %528 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %529 = load float* %528, align 8 ; [#uses=4]
- %530 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %531 = load float* %530, align 8 ; [#uses=4]
- %532 = fmul float %529, %531 ; [#uses=1]
- %533 = fsub float %527, %532 ; [#uses=16]
- %534 = fmul float %512, %531 ; [#uses=1]
- %535 = fmul float %529, %514 ; [#uses=1]
- %536 = fadd float %534, %535 ; [#uses=1]
- %537 = fmul float %517, %525 ; [#uses=1]
- %538 = fadd float %536, %537 ; [#uses=1]
- %539 = fmul float %523, %519 ; [#uses=1]
- %540 = fsub float %538, %539 ; [#uses=7]
- %541 = fmul float %512, %525 ; [#uses=1]
- %542 = fmul float %523, %514 ; [#uses=1]
- %543 = fadd float %541, %542 ; [#uses=1]
- %544 = fmul float %529, %519 ; [#uses=1]
- %545 = fadd float %543, %544 ; [#uses=1]
- %546 = fmul float %517, %531 ; [#uses=1]
- %547 = fsub float %545, %546 ; [#uses=7]
- %548 = fmul float %512, %519 ; [#uses=1]
- %549 = fmul float %517, %514 ; [#uses=1]
- %550 = fadd float %548, %549 ; [#uses=1]
- %551 = fmul float %523, %531 ; [#uses=1]
- %552 = fadd float %550, %551 ; [#uses=1]
- %553 = fmul float %529, %525 ; [#uses=1]
- %554 = fsub float %552, %553 ; [#uses=7]
- %555 = fsub float -0.000000e+00, %540 ; [#uses=10]
- %556 = fsub float -0.000000e+00, %547 ; [#uses=10]
- %557 = fsub float -0.000000e+00, %554 ; [#uses=10]
- %558 = fmul float %533, %487 ; [#uses=1]
- %559 = fmul float %508, %557 ; [#uses=1]
- %560 = fsub float %558, %559 ; [#uses=1]
- %561 = fmul float %501, %556 ; [#uses=1]
- %562 = fsub float %560, %561 ; [#uses=1]
- %563 = fmul float %494, %555 ; [#uses=1]
- %564 = fsub float %562, %563 ; [#uses=10]
- %565 = fmul float %533, %494 ; [#uses=1]
- %566 = fmul float %487, %555 ; [#uses=1]
- %567 = fadd float %565, %566 ; [#uses=1]
- %568 = fmul float %501, %557 ; [#uses=1]
- %569 = fadd float %567, %568 ; [#uses=1]
- %570 = fmul float %508, %556 ; [#uses=1]
- %571 = fsub float %569, %570 ; [#uses=8]
- %572 = fmul float %533, %501 ; [#uses=1]
- %573 = fmul float %487, %556 ; [#uses=1]
- %574 = fadd float %572, %573 ; [#uses=1]
- %575 = fmul float %508, %555 ; [#uses=1]
- %576 = fadd float %574, %575 ; [#uses=1]
- %577 = fmul float %494, %557 ; [#uses=1]
- %578 = fsub float %576, %577 ; [#uses=8]
- %579 = fmul float %533, %508 ; [#uses=1]
- %580 = fmul float %487, %557 ; [#uses=1]
- %581 = fadd float %579, %580 ; [#uses=1]
- %582 = fmul float %494, %556 ; [#uses=1]
- %583 = fadd float %581, %582 ; [#uses=1]
- %584 = fmul float %501, %555 ; [#uses=1]
- %585 = fsub float %583, %584 ; [#uses=7]
- %586 = fsub float -0.000000e+00, %585 ; [#uses=4]
- %587 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vTwist, i32 0, i32 0, i32 0), align 8 ; [#uses=10]
- %588 = fmul float %587, %586 ; [#uses=1]
- %589 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vTwist, i32 0, i32 0, i32 1), align 4 ; [#uses=13]
- %590 = fmul float %578, %589 ; [#uses=1]
- %591 = fsub float %588, %590 ; [#uses=1]
- %592 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vTwist, i32 0, i32 0, i32 2), align 8 ; [#uses=11]
- %593 = fmul float %571, %592 ; [#uses=1]
- %594 = fsub float %591, %593 ; [#uses=3]
- %595 = fmul float %564, %592 ; [#uses=1]
- %596 = fmul float %585, %589 ; [#uses=1]
- %597 = fadd float %595, %596 ; [#uses=1]
- %598 = fmul float %578, %587 ; [#uses=1]
- %599 = fsub float %597, %598 ; [#uses=3]
- %600 = fmul float %564, %589 ; [#uses=1]
- %601 = fmul float %571, %587 ; [#uses=1]
- %602 = fadd float %600, %601 ; [#uses=1]
- %603 = fmul float %585, %592 ; [#uses=1]
- %604 = fsub float %602, %603 ; [#uses=3]
- %605 = fmul float %564, %587 ; [#uses=1]
- %606 = fmul float %578, %592 ; [#uses=1]
- %607 = fadd float %605, %606 ; [#uses=1]
- %608 = fmul float %571, %589 ; [#uses=1]
- %609 = fsub float %607, %608 ; [#uses=3]
- %610 = fsub float -0.000000e+00, %571 ; [#uses=3]
- %611 = fsub float -0.000000e+00, %578 ; [#uses=3]
- %612 = fmul float %594, %610 ; [#uses=1]
- %613 = fmul float %599, %564 ; [#uses=1]
- %614 = fadd float %612, %613 ; [#uses=1]
- %615 = fmul float %609, %611 ; [#uses=1]
- %616 = fadd float %614, %615 ; [#uses=1]
- %617 = fmul float %604, %586 ; [#uses=1]
- %618 = fsub float %616, %617 ; [#uses=3]
- %619 = fmul float %594, %611 ; [#uses=1]
- %620 = fmul float %604, %564 ; [#uses=1]
- %621 = fadd float %619, %620 ; [#uses=1]
- %622 = fmul float %599, %586 ; [#uses=1]
- %623 = fadd float %621, %622 ; [#uses=1]
- %624 = fmul float %609, %610 ; [#uses=1]
- %625 = fsub float %623, %624 ; [#uses=3]
- %626 = fmul float %594, %586 ; [#uses=1]
- %627 = fmul float %609, %564 ; [#uses=1]
- %628 = fadd float %626, %627 ; [#uses=1]
- %629 = fmul float %604, %610 ; [#uses=1]
- %630 = fadd float %628, %629 ; [#uses=1]
- %631 = fmul float %599, %611 ; [#uses=1]
- %632 = fsub float %630, %631 ; [#uses=3]
- %633 = fmul float %632, %632 ; [#uses=1]
- %634 = fmul float %625, %625 ; [#uses=1]
- %635 = fadd float %633, %634 ; [#uses=1]
- %636 = fmul float %618, %618 ; [#uses=1]
- %637 = fadd float %635, %636 ; [#uses=1]
- %638 = call float @sqrtf(float %637) nounwind readonly ; [#uses=1]
- %639 = fdiv float 1.000000e+00, %638 ; [#uses=3]
- %640 = fmul float %632, %639 ; [#uses=3]
- %641 = fmul float %625, %639 ; [#uses=3]
- %642 = fmul float %618, %639 ; [#uses=3]
- %643 = fmul float %587, %640 ; [#uses=1]
- %644 = fmul float %589, %641 ; [#uses=1]
- %645 = fadd float %643, %644 ; [#uses=1]
- %646 = fmul float %592, %642 ; [#uses=1]
- %647 = fadd float %645, %646 ; [#uses=2]
- %648 = fcmp olt float %647, 0xBFEFFFFFC0000000 ; [#uses=1]
- br i1 %648, label %bb.i82, label %bb1.i83
-
-bb.i82: ; preds = %bb10
- %649 = call float @fabsf(float %592) nounwind readnone ; [#uses=1]
- %650 = fcmp ogt float %649, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %650, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i82
- %651 = fmul float %589, %589 ; [#uses=1]
- %652 = fmul float %592, %592 ; [#uses=1]
- %653 = fadd float %651, %652 ; [#uses=1]
- %654 = call float @sqrtf(float %653) nounwind readonly ; [#uses=1]
- %655 = fdiv float 1.000000e+00, %654 ; [#uses=2]
- %656 = fsub float -0.000000e+00, %592 ; [#uses=1]
- %657 = fmul float %655, %656 ; [#uses=1]
- %658 = fmul float %589, %655 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i.i: ; preds = %bb.i82
- %659 = fmul float %587, %587 ; [#uses=1]
- %660 = fmul float %589, %589 ; [#uses=1]
- %661 = fadd float %659, %660 ; [#uses=1]
- %662 = call float @sqrtf(float %661) nounwind readonly ; [#uses=1]
- %663 = fdiv float 1.000000e+00, %662 ; [#uses=2]
- %664 = fsub float -0.000000e+00, %589 ; [#uses=1]
- %665 = fmul float %663, %664 ; [#uses=1]
- %666 = fmul float %587, %663 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i83: ; preds = %bb10
- %667 = fmul float %592, %641 ; [#uses=1]
- %668 = fmul float %589, %642 ; [#uses=1]
- %669 = fmul float %587, %642 ; [#uses=1]
- %670 = fmul float %592, %640 ; [#uses=1]
- %671 = fmul float %589, %640 ; [#uses=1]
- %672 = fmul float %587, %641 ; [#uses=1]
- %673 = fsub float %668, %667 ; [#uses=1]
- %674 = fsub float %670, %669 ; [#uses=1]
- %675 = fsub float %672, %671 ; [#uses=1]
- %676 = fadd float %647, 1.000000e+00 ; [#uses=1]
- %677 = fmul float %676, 2.000000e+00 ; [#uses=1]
- %678 = call float @sqrtf(float %677) nounwind readonly ; [#uses=2]
- %679 = fdiv float 1.000000e+00, %678 ; [#uses=3]
- %680 = fmul float %678, 5.000000e-01 ; [#uses=1]
- %681 = fmul float %675, %679 ; [#uses=1]
- %682 = fmul float %674, %679 ; [#uses=1]
- %683 = fmul float %673, %679 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-_Z15shortestArcQuatRK9btVector3S1_.exit: ; preds = %bb1.i83, %bb1.i.i, %bb.i.i
- %qABCone.0.0.0.0 = phi float [ %683, %bb1.i83 ], [ 0.000000e+00, %bb.i.i ], [ %665, %bb1.i.i ] ; [#uses=3]
- %qABCone.0.0.1.0 = phi float [ %682, %bb1.i83 ], [ %657, %bb.i.i ], [ %666, %bb1.i.i ] ; [#uses=3]
- %qABCone.0.0.2.0 = phi float [ %681, %bb1.i83 ], [ %658, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=3]
- %qABCone.0.0.3.0 = phi float [ %680, %bb1.i83 ], [ 0.000000e+00, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=3]
- %684 = fmul float %qABCone.0.0.0.0, %qABCone.0.0.0.0 ; [#uses=1]
- %685 = fmul float %qABCone.0.0.1.0, %qABCone.0.0.1.0 ; [#uses=1]
- %686 = fadd float %684, %685 ; [#uses=1]
- %687 = fmul float %qABCone.0.0.2.0, %qABCone.0.0.2.0 ; [#uses=1]
- %688 = fadd float %686, %687 ; [#uses=1]
- %689 = fmul float %qABCone.0.0.3.0, %qABCone.0.0.3.0 ; [#uses=1]
- %690 = fadd float %688, %689 ; [#uses=1]
- %691 = call float @sqrtf(float %690) nounwind readonly ; [#uses=1]
- %692 = fdiv float 1.000000e+00, %691 ; [#uses=4]
- %693 = fmul float %qABCone.0.0.0.0, %692 ; [#uses=4]
- %694 = fmul float %qABCone.0.0.1.0, %692 ; [#uses=4]
- %695 = fmul float %qABCone.0.0.2.0, %692 ; [#uses=4]
- %696 = fmul float %qABCone.0.0.3.0, %692 ; [#uses=6]
- %697 = fsub float -0.000000e+00, %695 ; [#uses=4]
- %698 = fsub float -0.000000e+00, %694 ; [#uses=4]
- %699 = fsub float -0.000000e+00, %693 ; [#uses=4]
- %700 = fmul float %696, %564 ; [#uses=1]
- %701 = fmul float %585, %699 ; [#uses=1]
- %702 = fsub float %700, %701 ; [#uses=1]
- %703 = fmul float %578, %698 ; [#uses=1]
- %704 = fsub float %702, %703 ; [#uses=1]
- %705 = fmul float %571, %697 ; [#uses=1]
- %706 = fsub float %704, %705 ; [#uses=3]
- %707 = fmul float %696, %571 ; [#uses=1]
- %708 = fmul float %564, %697 ; [#uses=1]
- %709 = fadd float %707, %708 ; [#uses=1]
- %710 = fmul float %578, %699 ; [#uses=1]
- %711 = fadd float %709, %710 ; [#uses=1]
- %712 = fmul float %585, %698 ; [#uses=1]
- %713 = fsub float %711, %712 ; [#uses=3]
- %714 = fmul float %696, %578 ; [#uses=1]
- %715 = fmul float %564, %698 ; [#uses=1]
- %716 = fadd float %714, %715 ; [#uses=1]
- %717 = fmul float %585, %697 ; [#uses=1]
- %718 = fadd float %716, %717 ; [#uses=1]
- %719 = fmul float %571, %699 ; [#uses=1]
- %720 = fsub float %718, %719 ; [#uses=3]
- %721 = fmul float %696, %585 ; [#uses=1]
- %722 = fmul float %564, %699 ; [#uses=1]
- %723 = fadd float %721, %722 ; [#uses=1]
- %724 = fmul float %571, %698 ; [#uses=1]
- %725 = fadd float %723, %724 ; [#uses=1]
- %726 = fmul float %578, %697 ; [#uses=1]
- %727 = fsub float %725, %726 ; [#uses=3]
- %728 = fmul float %727, %727 ; [#uses=1]
- %729 = fmul float %720, %720 ; [#uses=1]
- %730 = fadd float %728, %729 ; [#uses=1]
- %731 = fmul float %713, %713 ; [#uses=1]
- %732 = fadd float %730, %731 ; [#uses=1]
- %733 = fmul float %706, %706 ; [#uses=1]
- %734 = fadd float %732, %733 ; [#uses=1]
- %735 = call float @sqrtf(float %734) nounwind readonly ; [#uses=1]
- %736 = fdiv float 1.000000e+00, %735 ; [#uses=4]
- %737 = fmul float %727, %736 ; [#uses=2]
- %738 = fmul float %720, %736 ; [#uses=2]
- %739 = fmul float %713, %736 ; [#uses=2]
- %740 = fmul float %706, %736 ; [#uses=3]
- %741 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %742 = load float* %741, align 4 ; [#uses=13]
- %743 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %744 = load float* %743, align 4 ; [#uses=6]
- %745 = fcmp ult float %742, %744 ; [#uses=2]
- br i1 %745, label %bb18, label %bb11
-
-bb11: ; preds = %_Z15shortestArcQuatRK9btVector3S1_.exit
- %746 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %747 = load float* %746, align 4 ; [#uses=4]
- %748 = fcmp ult float %747, %744 ; [#uses=1]
- br i1 %748, label %bb18, label %bb12
-
-bb12: ; preds = %bb11
- %749 = fcmp olt float %696, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i.i84 = select i1 %749, float -1.000000e+00, float %696 ; [#uses=2]
- %750 = fcmp ogt float %x_addr.0.i.i.i84, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i.i85 = select i1 %750, float 1.000000e+00, float %x_addr.0.i.i.i84 ; [#uses=1]
- %751 = call float @acosf(float %x_addr.1.i.i.i85) nounwind readonly ; [#uses=1]
- %752 = fmul float %751, 2.000000e+00 ; [#uses=5]
- %753 = fcmp ogt float %752, 0x3E80000000000000 ; [#uses=1]
- br i1 %753, label %bb.i86, label %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
-
-bb.i86: ; preds = %bb12
- %754 = fmul float %693, %693 ; [#uses=1]
- %755 = fmul float %694, %694 ; [#uses=1]
- %756 = fadd float %754, %755 ; [#uses=1]
- %757 = fmul float %695, %695 ; [#uses=1]
- %758 = fadd float %756, %757 ; [#uses=1]
- %759 = call float @sqrtf(float %758) nounwind readonly ; [#uses=1]
- %760 = fdiv float 1.000000e+00, %759 ; [#uses=3]
- %761 = fmul float %693, %760 ; [#uses=2]
- %762 = fmul float %694, %760 ; [#uses=5]
- %763 = fmul float %695, %760 ; [#uses=4]
- %764 = call float @fabsf(float %762) nounwind readnone ; [#uses=1]
- %765 = fcmp ogt float %764, 0x3E80000000000000 ; [#uses=1]
- br i1 %765, label %bb3.i, label %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
-
-bb3.i: ; preds = %bb.i86
- %766 = fmul float %763, %763 ; [#uses=1]
- %767 = fmul float %762, %762 ; [#uses=1]
- %768 = fdiv float %766, %767 ; [#uses=2]
- %769 = fmul float %747, %747 ; [#uses=1]
- %770 = fdiv float 1.000000e+00, %769 ; [#uses=1]
- %771 = fmul float %742, %742 ; [#uses=1]
- %772 = fdiv float %768, %771 ; [#uses=1]
- %773 = fadd float %772, %770 ; [#uses=1]
- %774 = fadd float %768, 1.000000e+00 ; [#uses=1]
- %775 = fdiv float %774, %773 ; [#uses=1]
- %776 = call float @sqrtf(float %775) nounwind readonly ; [#uses=1]
- br label %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
-
-_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit: ; preds = %bb3.i, %bb.i86, %bb12
- %swingAxis13.0.0.1 = phi float [ %761, %bb3.i ], [ %761, %bb.i86 ], [ undef, %bb12 ] ; [#uses=4]
- %swingAxis13.0.1.1 = phi float [ %762, %bb3.i ], [ %762, %bb.i86 ], [ undef, %bb12 ] ; [#uses=7]
- %swingAxis13.0.2.1 = phi float [ %763, %bb3.i ], [ %763, %bb.i86 ], [ undef, %bb12 ] ; [#uses=2]
- %swingLimit.1 = phi float [ %776, %bb3.i ], [ %742, %bb.i86 ], [ 0.000000e+00, %bb12 ] ; [#uses=3]
- %777 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 4 ; [#uses=1]
- %778 = load float* %777, align 4 ; [#uses=2]
- %779 = fmul float %778, %swingLimit.1 ; [#uses=4]
- %780 = fcmp olt float %779, %752 ; [#uses=1]
- br i1 %780, label %bb14, label %bb67
-
-bb14: ; preds = %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
- store i8 1, i8* %7, align 2
- %781 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 26 ; [#uses=2]
- store float 1.000000e+00, float* %781, align 4
- %782 = fcmp olt float %752, %swingLimit.1 ; [#uses=1]
- %783 = fcmp olt float %778, 0x3FEFFFFFC0000000 ; [#uses=1]
- %or.cond = and i1 %782, %783 ; [#uses=1]
- br i1 %or.cond, label %bb16, label %bb17
-
-bb16: ; preds = %bb14
- %784 = fsub float %752, %779 ; [#uses=1]
- %785 = fsub float %swingLimit.1, %779 ; [#uses=1]
- %786 = fdiv float %784, %785 ; [#uses=1]
- store float %786, float* %781, align 4
- br label %bb17
-
-bb17: ; preds = %bb16, %bb14
- %787 = fsub float %752, %779 ; [#uses=1]
- store float %787, float* %4, align 4
- %788 = fsub float -0.000000e+00, %swingAxis13.0.2.1 ; [#uses=2]
- %789 = call float @fabsf(float %swingAxis13.0.1.1) nounwind readnone ; [#uses=1]
- %790 = fcmp ogt float %789, 0x3E80000000000000 ; [#uses=1]
- br i1 %790, label %bb.i87, label %_ZNK21btConeTwistConstraint33adjustSwingAxisToUseEllipseNormalER9btVector3.exit
-
-bb.i87: ; preds = %bb17
- %791 = fdiv float %788, %swingAxis13.0.1.1 ; [#uses=1]
- %792 = fdiv float %747, %742 ; [#uses=1]
- %793 = fmul float %792, %791 ; [#uses=1]
- %794 = fcmp ogt float %788, 0.000000e+00 ; [#uses=1]
- %795 = fmul float %793, %swingAxis13.0.1.1 ; [#uses=1]
- %796 = call float @fabsf(float %795) nounwind readnone ; [#uses=2]
- br i1 %794, label %bb3.i88, label %bb2.i
-
-bb2.i: ; preds = %bb.i87
- %797 = fsub float -0.000000e+00, %796 ; [#uses=1]
- br label %bb3.i88
-
-bb3.i88: ; preds = %bb2.i, %bb.i87
- %y.0.i = phi float [ %797, %bb2.i ], [ %796, %bb.i87 ] ; [#uses=3]
- %798 = fsub float -0.000000e+00, %y.0.i ; [#uses=1]
- %799 = fmul float %swingAxis13.0.0.1, %swingAxis13.0.0.1 ; [#uses=1]
- %800 = fmul float %swingAxis13.0.1.1, %swingAxis13.0.1.1 ; [#uses=1]
- %801 = fadd float %799, %800 ; [#uses=1]
- %802 = fmul float %y.0.i, %y.0.i ; [#uses=1]
- %803 = fadd float %801, %802 ; [#uses=1]
- %804 = call float @sqrtf(float %803) nounwind readonly ; [#uses=1]
- %805 = fdiv float 1.000000e+00, %804 ; [#uses=3]
- %806 = fmul float %swingAxis13.0.0.1, %805 ; [#uses=1]
- %807 = fmul float %swingAxis13.0.1.1, %805 ; [#uses=1]
- %808 = fmul float %805, %798 ; [#uses=1]
- br label %_ZNK21btConeTwistConstraint33adjustSwingAxisToUseEllipseNormalER9btVector3.exit
-
-_ZNK21btConeTwistConstraint33adjustSwingAxisToUseEllipseNormalER9btVector3.exit: ; preds = %bb3.i88, %bb17
- %swingAxis13.0.0.2 = phi float [ %806, %bb3.i88 ], [ %swingAxis13.0.0.1, %bb17 ] ; [#uses=2]
- %swingAxis13.0.1.2 = phi float [ %807, %bb3.i88 ], [ %swingAxis13.0.1.1, %bb17 ] ; [#uses=1]
- %swingAxis13.0.2.2 = phi float [ %808, %bb3.i88 ], [ %swingAxis13.0.2.1, %bb17 ] ; [#uses=1]
- %809 = fsub float -0.000000e+00, %swingAxis13.0.2.2 ; [#uses=4]
- %810 = fsub float -0.000000e+00, %swingAxis13.0.1.2 ; [#uses=4]
- %811 = fsub float -0.000000e+00, %swingAxis13.0.0.2 ; [#uses=3]
- %812 = fmul float %swingAxis13.0.0.2, %554 ; [#uses=1]
- %813 = fmul float %547, %810 ; [#uses=1]
- %814 = fsub float %812, %813 ; [#uses=1]
- %815 = fmul float %540, %809 ; [#uses=1]
- %816 = fsub float %814, %815 ; [#uses=3]
- %817 = fmul float %533, %809 ; [#uses=1]
- %818 = fmul float %554, %810 ; [#uses=1]
- %819 = fadd float %817, %818 ; [#uses=1]
- %820 = fmul float %547, %811 ; [#uses=1]
- %821 = fsub float %819, %820 ; [#uses=3]
- %822 = fmul float %533, %810 ; [#uses=1]
- %823 = fmul float %540, %811 ; [#uses=1]
- %824 = fadd float %822, %823 ; [#uses=1]
- %825 = fmul float %554, %809 ; [#uses=1]
- %826 = fsub float %824, %825 ; [#uses=3]
- %827 = fmul float %533, %811 ; [#uses=1]
- %828 = fmul float %547, %809 ; [#uses=1]
- %829 = fadd float %827, %828 ; [#uses=1]
- %830 = fmul float %540, %810 ; [#uses=1]
- %831 = fsub float %829, %830 ; [#uses=3]
- %832 = fmul float %816, %555 ; [#uses=1]
- %833 = fmul float %821, %533 ; [#uses=1]
- %834 = fadd float %832, %833 ; [#uses=1]
- %835 = fmul float %831, %556 ; [#uses=1]
- %836 = fadd float %834, %835 ; [#uses=1]
- %837 = fmul float %826, %557 ; [#uses=1]
- %838 = fsub float %836, %837 ; [#uses=9]
- %839 = fmul float %816, %556 ; [#uses=1]
- %840 = fmul float %826, %533 ; [#uses=1]
- %841 = fadd float %839, %840 ; [#uses=1]
- %842 = fmul float %821, %557 ; [#uses=1]
- %843 = fadd float %841, %842 ; [#uses=1]
- %844 = fmul float %831, %555 ; [#uses=1]
- %845 = fsub float %843, %844 ; [#uses=9]
- %846 = fmul float %816, %557 ; [#uses=1]
- %847 = fmul float %831, %533 ; [#uses=1]
- %848 = fadd float %846, %847 ; [#uses=1]
- %849 = fmul float %826, %555 ; [#uses=1]
- %850 = fadd float %848, %849 ; [#uses=1]
- %851 = fmul float %821, %556 ; [#uses=1]
- %852 = fsub float %850, %851 ; [#uses=9]
- %853 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=1]
- store float %852, float* %853, align 4
- %854 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=1]
- store float %845, float* %854, align 4
- %855 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=1]
- store float %838, float* %855, align 4
- %856 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %856, align 4
- %857 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %857, align 4
- %858 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %858, align 4
- %859 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %859, align 4
- %860 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %860, align 4
- %861 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %862 = load float* %861, align 4 ; [#uses=1]
- %863 = fmul float %862, %852 ; [#uses=1]
- %864 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %865 = load float* %864, align 4 ; [#uses=1]
- %866 = fmul float %865, %845 ; [#uses=1]
- %867 = fadd float %863, %866 ; [#uses=1]
- %868 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %869 = load float* %868, align 4 ; [#uses=1]
- %870 = fmul float %869, %838 ; [#uses=1]
- %871 = fadd float %867, %870 ; [#uses=1]
- %872 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %873 = load float* %872, align 4 ; [#uses=1]
- %874 = fmul float %873, %852 ; [#uses=1]
- %875 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %876 = load float* %875, align 4 ; [#uses=1]
- %877 = fmul float %876, %845 ; [#uses=1]
- %878 = fadd float %874, %877 ; [#uses=1]
- %879 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %880 = load float* %879, align 4 ; [#uses=1]
- %881 = fmul float %880, %838 ; [#uses=1]
- %882 = fadd float %878, %881 ; [#uses=1]
- %883 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %884 = load float* %883, align 4 ; [#uses=1]
- %885 = fmul float %884, %852 ; [#uses=1]
- %886 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %887 = load float* %886, align 4 ; [#uses=1]
- %888 = fmul float %887, %845 ; [#uses=1]
- %889 = fadd float %885, %888 ; [#uses=1]
- %890 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %891 = load float* %890, align 4 ; [#uses=1]
- %892 = fmul float %891, %838 ; [#uses=1]
- %893 = fadd float %889, %892 ; [#uses=1]
- %894 = fmul float %852, %893 ; [#uses=1]
- %895 = fmul float %845, %882 ; [#uses=1]
- %896 = fadd float %894, %895 ; [#uses=1]
- %897 = fmul float %838, %871 ; [#uses=1]
- %898 = fadd float %896, %897 ; [#uses=1]
- %899 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %900 = load float* %899, align 4 ; [#uses=1]
- %901 = fmul float %900, %852 ; [#uses=1]
- %902 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %903 = load float* %902, align 4 ; [#uses=1]
- %904 = fmul float %903, %845 ; [#uses=1]
- %905 = fadd float %901, %904 ; [#uses=1]
- %906 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %907 = load float* %906, align 4 ; [#uses=1]
- %908 = fmul float %907, %838 ; [#uses=1]
- %909 = fadd float %905, %908 ; [#uses=1]
- %910 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %911 = load float* %910, align 4 ; [#uses=1]
- %912 = fmul float %911, %852 ; [#uses=1]
- %913 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %914 = load float* %913, align 4 ; [#uses=1]
- %915 = fmul float %914, %845 ; [#uses=1]
- %916 = fadd float %912, %915 ; [#uses=1]
- %917 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %918 = load float* %917, align 4 ; [#uses=1]
- %919 = fmul float %918, %838 ; [#uses=1]
- %920 = fadd float %916, %919 ; [#uses=1]
- %921 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %922 = load float* %921, align 4 ; [#uses=1]
- %923 = fmul float %922, %852 ; [#uses=1]
- %924 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %925 = load float* %924, align 4 ; [#uses=1]
- %926 = fmul float %925, %845 ; [#uses=1]
- %927 = fadd float %923, %926 ; [#uses=1]
- %928 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %929 = load float* %928, align 4 ; [#uses=1]
- %930 = fmul float %929, %838 ; [#uses=1]
- %931 = fadd float %927, %930 ; [#uses=1]
- %932 = fmul float %852, %931 ; [#uses=1]
- %933 = fmul float %845, %920 ; [#uses=1]
- %934 = fadd float %932, %933 ; [#uses=1]
- %935 = fmul float %838, %909 ; [#uses=1]
- %936 = fadd float %934, %935 ; [#uses=1]
- %937 = fadd float %898, %936 ; [#uses=1]
- %938 = fdiv float 1.000000e+00, %937 ; [#uses=1]
- %939 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 14 ; [#uses=1]
- store float %938, float* %939, align 4
- br label %bb67
-
-bb18: ; preds = %bb11, %_Z15shortestArcQuatRK9btVector3S1_.exit
- %940 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %941 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %942 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %943 = load float* %942, align 4 ; [#uses=3]
- %944 = load float* %941, align 4 ; [#uses=3]
- %945 = load float* %940, align 4 ; [#uses=3]
- %946 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %947 = load float* %946, align 4 ; [#uses=3]
- %948 = fmul float %947, %943 ; [#uses=1]
- %949 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %950 = load float* %949, align 4 ; [#uses=3]
- %951 = fmul float %950, %944 ; [#uses=1]
- %952 = fadd float %948, %951 ; [#uses=1]
- %953 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %954 = load float* %953, align 4 ; [#uses=3]
- %955 = fmul float %954, %945 ; [#uses=1]
- %956 = fadd float %952, %955 ; [#uses=4]
- %957 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %958 = load float* %957, align 4 ; [#uses=3]
- %959 = fmul float %958, %943 ; [#uses=1]
- %960 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %961 = load float* %960, align 4 ; [#uses=3]
- %962 = fmul float %961, %944 ; [#uses=1]
- %963 = fadd float %959, %962 ; [#uses=1]
- %964 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %965 = load float* %964, align 4 ; [#uses=3]
- %966 = fmul float %965, %945 ; [#uses=1]
- %967 = fadd float %963, %966 ; [#uses=4]
- %968 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %969 = load float* %968, align 4 ; [#uses=3]
- %970 = fmul float %969, %943 ; [#uses=1]
- %971 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %972 = load float* %971, align 4 ; [#uses=3]
- %973 = fmul float %972, %944 ; [#uses=1]
- %974 = fadd float %970, %973 ; [#uses=1]
- %975 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %976 = load float* %975, align 4 ; [#uses=3]
- %977 = fmul float %976, %945 ; [#uses=1]
- %978 = fadd float %974, %977 ; [#uses=4]
- %979 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %980 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %981 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %982 = load float* %981, align 4 ; [#uses=3]
- %983 = load float* %980, align 4 ; [#uses=3]
- %984 = load float* %979, align 4 ; [#uses=3]
- %985 = fmul float %947, %982 ; [#uses=1]
- %986 = fmul float %950, %983 ; [#uses=1]
- %987 = fadd float %985, %986 ; [#uses=1]
- %988 = fmul float %954, %984 ; [#uses=1]
- %989 = fadd float %987, %988 ; [#uses=2]
- %990 = fmul float %958, %982 ; [#uses=1]
- %991 = fmul float %961, %983 ; [#uses=1]
- %992 = fadd float %990, %991 ; [#uses=1]
- %993 = fmul float %965, %984 ; [#uses=1]
- %994 = fadd float %992, %993 ; [#uses=2]
- %995 = fmul float %969, %982 ; [#uses=1]
- %996 = fmul float %972, %983 ; [#uses=1]
- %997 = fadd float %995, %996 ; [#uses=1]
- %998 = fmul float %976, %984 ; [#uses=1]
- %999 = fadd float %997, %998 ; [#uses=2]
- %1000 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1001 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1002 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1003 = load float* %1002, align 4 ; [#uses=3]
- %1004 = load float* %1001, align 4 ; [#uses=3]
- %1005 = load float* %1000, align 4 ; [#uses=3]
- %1006 = fmul float %947, %1003 ; [#uses=1]
- %1007 = fmul float %950, %1004 ; [#uses=1]
- %1008 = fadd float %1006, %1007 ; [#uses=1]
- %1009 = fmul float %954, %1005 ; [#uses=1]
- %1010 = fadd float %1008, %1009 ; [#uses=2]
- %1011 = fmul float %958, %1003 ; [#uses=1]
- %1012 = fmul float %961, %1004 ; [#uses=1]
- %1013 = fadd float %1011, %1012 ; [#uses=1]
- %1014 = fmul float %965, %1005 ; [#uses=1]
- %1015 = fadd float %1013, %1014 ; [#uses=2]
- %1016 = fmul float %969, %1003 ; [#uses=1]
- %1017 = fmul float %972, %1004 ; [#uses=1]
- %1018 = fadd float %1016, %1017 ; [#uses=1]
- %1019 = fmul float %976, %1005 ; [#uses=1]
- %1020 = fadd float %1018, %1019 ; [#uses=2]
- %1021 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1022 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1023 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1024 = load float* %1023, align 4 ; [#uses=3]
- %1025 = load float* %1022, align 4 ; [#uses=3]
- %1026 = load float* %1021, align 4 ; [#uses=3]
- %1027 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1028 = load float* %1027, align 4 ; [#uses=1]
- %1029 = fmul float %1028, %1024 ; [#uses=1]
- %1030 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1031 = load float* %1030, align 4 ; [#uses=1]
- %1032 = fmul float %1031, %1025 ; [#uses=1]
- %1033 = fadd float %1029, %1032 ; [#uses=1]
- %1034 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1035 = load float* %1034, align 4 ; [#uses=1]
- %1036 = fmul float %1035, %1026 ; [#uses=1]
- %1037 = fadd float %1033, %1036 ; [#uses=7]
- %1038 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1039 = load float* %1038, align 4 ; [#uses=1]
- %1040 = fmul float %1039, %1024 ; [#uses=1]
- %1041 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1042 = load float* %1041, align 4 ; [#uses=1]
- %1043 = fmul float %1042, %1025 ; [#uses=1]
- %1044 = fadd float %1040, %1043 ; [#uses=1]
- %1045 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1046 = load float* %1045, align 4 ; [#uses=1]
- %1047 = fmul float %1046, %1026 ; [#uses=1]
- %1048 = fadd float %1044, %1047 ; [#uses=7]
- %1049 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1050 = load float* %1049, align 4 ; [#uses=1]
- %1051 = fmul float %1050, %1024 ; [#uses=1]
- %1052 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1053 = load float* %1052, align 4 ; [#uses=1]
- %1054 = fmul float %1053, %1025 ; [#uses=1]
- %1055 = fadd float %1051, %1054 ; [#uses=1]
- %1056 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1057 = load float* %1056, align 4 ; [#uses=1]
- %1058 = fmul float %1057, %1026 ; [#uses=1]
- %1059 = fadd float %1055, %1058 ; [#uses=7]
- %1060 = fmul float %1059, %978 ; [#uses=1]
- %1061 = fmul float %1048, %967 ; [#uses=1]
- %1062 = fadd float %1060, %1061 ; [#uses=1]
- %1063 = fmul float %1037, %956 ; [#uses=1]
- %1064 = fadd float %1062, %1063 ; [#uses=8]
- %1065 = fmul float %1059, %999 ; [#uses=1]
- %1066 = fmul float %1048, %994 ; [#uses=1]
- %1067 = fadd float %1065, %1066 ; [#uses=1]
- %1068 = fmul float %1037, %989 ; [#uses=1]
- %1069 = fadd float %1067, %1068 ; [#uses=8]
- %1070 = fmul float %1059, %1020 ; [#uses=1]
- %1071 = fmul float %1048, %1015 ; [#uses=1]
- %1072 = fadd float %1070, %1071 ; [#uses=1]
- %1073 = fmul float %1037, %1010 ; [#uses=1]
- %1074 = fadd float %1072, %1073 ; [#uses=8]
- %1075 = fcmp uge float %742, %744 ; [#uses=1]
- br i1 %1075, label %bb44, label %bb27
-
-bb27: ; preds = %bb18
- %1076 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %1077 = load float* %1076, align 4 ; [#uses=1]
- %1078 = fcmp uge float %1077, %744 ; [#uses=1]
- br i1 %1078, label %bb44, label %bb28
-
-bb28: ; preds = %bb27
- %1079 = call float @fabsf(float %1069) nounwind readnone ; [#uses=1]
- %1080 = fcmp olt float %1079, 0x3E80000000000000 ; [#uses=1]
- br i1 %1080, label %bb33, label %bb42
-
-bb33: ; preds = %bb28
- %1081 = call float @fabsf(float %1074) nounwind readnone ; [#uses=1]
- %1082 = fcmp olt float %1081, 0x3E80000000000000 ; [#uses=1]
- br i1 %1082, label %bb67, label %bb42
-
-bb42: ; preds = %bb33, %bb28
- store i8 1, i8* %7, align 2
- %1083 = fmul float %1059, %967 ; [#uses=1]
- %1084 = fmul float %1048, %978 ; [#uses=1]
- %1085 = fsub float %1083, %1084 ; [#uses=1]
- %1086 = fmul float %1037, %978 ; [#uses=1]
- %1087 = fmul float %1059, %956 ; [#uses=1]
- %1088 = fsub float %1086, %1087 ; [#uses=1]
- %1089 = fmul float %1048, %956 ; [#uses=1]
- %1090 = fmul float %1037, %967 ; [#uses=1]
- %1091 = fsub float %1089, %1090 ; [#uses=1]
- %1092 = fsub float -0.000000e+00, %1085 ; [#uses=1]
- %1093 = fsub float -0.000000e+00, %1088 ; [#uses=1]
- %1094 = fsub float -0.000000e+00, %1091 ; [#uses=1]
- %1095 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=1]
- store float %1094, float* %1095, align 4
- %1096 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=1]
- store float %1093, float* %1096, align 4
- %1097 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=1]
- store float %1092, float* %1097, align 4
- %1098 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1098, align 4
- br label %bb67
-
-bb44: ; preds = %bb27, %bb18
- %1099 = fcmp olt float %742, %744 ; [#uses=1]
- br i1 %1099, label %bb45, label %bb55
-
-bb45: ; preds = %bb44
- %1100 = call float @fabsf(float %1069) nounwind readnone ; [#uses=1]
- %1101 = fcmp olt float %1100, 0x3E80000000000000 ; [#uses=1]
- br i1 %1101, label %bb65, label %bb49
-
-bb49: ; preds = %bb45
- store i8 1, i8* %7, align 2
- %1102 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %1103 = load float* %1102, align 4 ; [#uses=7]
- %1104 = fcmp ult float %1103, %744 ; [#uses=1]
- br i1 %1104, label %bb65, label %bb50
-
-bb50: ; preds = %bb49
- %1105 = call float @atan2f(float %1074, float %1064) nounwind readonly ; [#uses=2]
- %1106 = fcmp olt float %1103, %1105 ; [#uses=1]
- br i1 %1106, label %bb52, label %bb53
-
-bb52: ; preds = %bb50
- %1107 = call float @cosf(float %1103) nounwind readonly ; [#uses=1]
- %1108 = call float @sinf(float %1103) nounwind readonly ; [#uses=1]
- br label %bb65
-
-bb53: ; preds = %bb50
- %1109 = fsub float -0.000000e+00, %1103 ; [#uses=1]
- %1110 = fcmp olt float %1105, %1109 ; [#uses=1]
- br i1 %1110, label %bb54, label %bb65
-
-bb54: ; preds = %bb53
- %1111 = call float @cosf(float %1103) nounwind readonly ; [#uses=1]
- %1112 = call float @sinf(float %1103) nounwind readonly ; [#uses=1]
- %1113 = fsub float -0.000000e+00, %1112 ; [#uses=1]
- br label %bb65
-
-bb55: ; preds = %bb44
- %1114 = call float @fabsf(float %1074) nounwind readnone ; [#uses=1]
- %1115 = fcmp olt float %1114, 0x3E80000000000000 ; [#uses=1]
- br i1 %1115, label %bb65, label %bb59
-
-bb59: ; preds = %bb55
- store i8 1, i8* %7, align 2
- br i1 %745, label %bb65, label %bb60
-
-bb60: ; preds = %bb59
- %1116 = call float @atan2f(float %1069, float %1064) nounwind readonly ; [#uses=2]
- %1117 = fcmp olt float %742, %1116 ; [#uses=1]
- br i1 %1117, label %bb62, label %bb63
-
-bb62: ; preds = %bb60
- %1118 = call float @cosf(float %742) nounwind readonly ; [#uses=1]
- %1119 = call float @sinf(float %742) nounwind readonly ; [#uses=1]
- br label %bb65
-
-bb63: ; preds = %bb60
- %1120 = fsub float -0.000000e+00, %742 ; [#uses=1]
- %1121 = fcmp olt float %1116, %1120 ; [#uses=1]
- br i1 %1121, label %bb64, label %bb65
-
-bb64: ; preds = %bb63
- %1122 = call float @cosf(float %742) nounwind readonly ; [#uses=1]
- %1123 = call float @sinf(float %742) nounwind readonly ; [#uses=1]
- %1124 = fsub float -0.000000e+00, %1123 ; [#uses=1]
- br label %bb65
-
-bb65: ; preds = %bb64, %bb63, %bb62, %bb59, %bb55, %bb54, %bb53, %bb52, %bb49, %bb45
- %x.0 = phi float [ %1107, %bb52 ], [ %1111, %bb54 ], [ %1064, %bb53 ], [ %1064, %bb49 ], [ %1064, %bb45 ], [ %1118, %bb62 ], [ %1122, %bb64 ], [ %1064, %bb63 ], [ %1064, %bb59 ], [ %1064, %bb55 ] ; [#uses=3]
- %y.0 = phi float [ 0.000000e+00, %bb52 ], [ 0.000000e+00, %bb54 ], [ 0.000000e+00, %bb53 ], [ %1069, %bb49 ], [ %1069, %bb45 ], [ %1119, %bb62 ], [ %1124, %bb64 ], [ %1069, %bb63 ], [ %1069, %bb59 ], [ %1069, %bb55 ] ; [#uses=3]
- %z.0 = phi float [ %1108, %bb52 ], [ %1113, %bb54 ], [ %1074, %bb53 ], [ %1074, %bb49 ], [ %1074, %bb45 ], [ 0.000000e+00, %bb62 ], [ 0.000000e+00, %bb64 ], [ 0.000000e+00, %bb63 ], [ %1074, %bb59 ], [ %1074, %bb55 ] ; [#uses=3]
- %1125 = fmul float %978, %x.0 ; [#uses=1]
- %1126 = fmul float %999, %y.0 ; [#uses=1]
- %1127 = fadd float %1125, %1126 ; [#uses=1]
- %1128 = fmul float %1020, %z.0 ; [#uses=1]
- %1129 = fadd float %1127, %1128 ; [#uses=3]
- %1130 = fmul float %967, %x.0 ; [#uses=1]
- %1131 = fmul float %994, %y.0 ; [#uses=1]
- %1132 = fadd float %1130, %1131 ; [#uses=1]
- %1133 = fmul float %1015, %z.0 ; [#uses=1]
- %1134 = fadd float %1132, %1133 ; [#uses=3]
- %1135 = fmul float %956, %x.0 ; [#uses=1]
- %1136 = fmul float %989, %y.0 ; [#uses=1]
- %1137 = fadd float %1135, %1136 ; [#uses=1]
- %1138 = fmul float %1010, %z.0 ; [#uses=1]
- %1139 = fadd float %1137, %1138 ; [#uses=3]
- %1140 = fmul float %1129, %1129 ; [#uses=1]
- %1141 = fmul float %1134, %1134 ; [#uses=1]
- %1142 = fadd float %1140, %1141 ; [#uses=1]
- %1143 = fmul float %1139, %1139 ; [#uses=1]
- %1144 = fadd float %1142, %1143 ; [#uses=1]
- %1145 = call float @sqrtf(float %1144) nounwind readonly ; [#uses=1]
- %1146 = fdiv float 1.000000e+00, %1145 ; [#uses=3]
- %1147 = fmul float %1129, %1146 ; [#uses=2]
- %1148 = fmul float %1134, %1146 ; [#uses=2]
- %1149 = fmul float %1139, %1146 ; [#uses=2]
- %1150 = fmul float %1059, %1148 ; [#uses=1]
- %1151 = fmul float %1048, %1147 ; [#uses=1]
- %1152 = fsub float %1150, %1151 ; [#uses=3]
- %1153 = fmul float %1037, %1147 ; [#uses=1]
- %1154 = fmul float %1059, %1149 ; [#uses=1]
- %1155 = fsub float %1153, %1154 ; [#uses=3]
- %1156 = fmul float %1048, %1149 ; [#uses=1]
- %1157 = fmul float %1037, %1148 ; [#uses=1]
- %1158 = fsub float %1156, %1157 ; [#uses=3]
- %1159 = fsub float -0.000000e+00, %1152 ; [#uses=2]
- %1160 = fsub float -0.000000e+00, %1155 ; [#uses=2]
- %1161 = fsub float -0.000000e+00, %1158 ; [#uses=2]
- %1162 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=2]
- store float %1161, float* %1162, align 4
- %1163 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=2]
- store float %1160, float* %1163, align 4
- %1164 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=2]
- store float %1159, float* %1164, align 4
- %1165 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1165, align 4
- %1166 = fmul float %1158, %1158 ; [#uses=1]
- %1167 = fmul float %1155, %1155 ; [#uses=1]
- %1168 = fadd float %1166, %1167 ; [#uses=1]
- %1169 = fmul float %1152, %1152 ; [#uses=1]
- %1170 = fadd float %1168, %1169 ; [#uses=2]
- %1171 = call float @sqrtf(float %1170) nounwind readonly ; [#uses=1]
- store float %1171, float* %4, align 4
- %1172 = call float @sqrtf(float %1170) nounwind readonly ; [#uses=1]
- %1173 = fdiv float 1.000000e+00, %1172 ; [#uses=3]
- %1174 = fmul float %1173, %1161 ; [#uses=1]
- store float %1174, float* %1162, align 4
- %1175 = fmul float %1173, %1160 ; [#uses=1]
- store float %1175, float* %1163, align 4
- %1176 = fmul float %1173, %1159 ; [#uses=1]
- store float %1176, float* %1164, align 4
- br label %bb67
-
-bb67: ; preds = %bb65, %bb42, %bb33, %_ZNK21btConeTwistConstraint33adjustSwingAxisToUseEllipseNormalER9btVector3.exit, %_ZN21btConeTwistConstraint20computeConeLimitInfoERK12btQuaternionRfR9btVector3S3_.exit
- %1177 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %1178 = load float* %1177, align 4 ; [#uses=4]
- %1179 = fcmp ult float %1178, 0.000000e+00 ; [#uses=1]
- %1180 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 19 ; [#uses=3]
- br i1 %1179, label %bb79, label %bb68
-
-bb68: ; preds = %bb67
- %1181 = fcmp olt float %740, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i.i = select i1 %1181, float -1.000000e+00, float %740 ; [#uses=2]
- %1182 = fcmp ogt float %x_addr.0.i.i.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i.i = select i1 %1182, float 1.000000e+00, float %x_addr.0.i.i.i ; [#uses=1]
- %1183 = call float @acosf(float %x_addr.1.i.i.i) nounwind readonly ; [#uses=1]
- %1184 = fmul float %1183, 2.000000e+00 ; [#uses=3]
- store float %1184, float* %1180, align 4
- %1185 = fcmp ogt float %1184, 0x400921FB60000000 ; [#uses=1]
- br i1 %1185, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb68
- %1186 = fsub float -0.000000e+00, %740 ; [#uses=2]
- %1187 = fsub float -0.000000e+00, %739 ; [#uses=1]
- %1188 = fsub float -0.000000e+00, %738 ; [#uses=1]
- %1189 = fsub float -0.000000e+00, %737 ; [#uses=1]
- %1190 = fcmp olt float %1186, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i7.i = select i1 %1190, float -1.000000e+00, float %1186 ; [#uses=2]
- %1191 = fcmp ogt float %x_addr.0.i.i7.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i8.i = select i1 %1191, float 1.000000e+00, float %x_addr.0.i.i7.i ; [#uses=1]
- %1192 = call float @acosf(float %x_addr.1.i.i8.i) nounwind readonly ; [#uses=1]
- %1193 = fmul float %1192, 2.000000e+00 ; [#uses=2]
- store float %1193, float* %1180, align 4
- br label %bb1.i
-
-bb1.i: ; preds = %bb.i, %bb68
- %1194 = phi float [ %1193, %bb.i ], [ %1184, %bb68 ] ; [#uses=5]
- %1195 = phi float [ %1189, %bb.i ], [ %737, %bb68 ] ; [#uses=4]
- %1196 = phi float [ %1188, %bb.i ], [ %738, %bb68 ] ; [#uses=4]
- %1197 = phi float [ %1187, %bb.i ], [ %739, %bb68 ] ; [#uses=4]
- %1198 = fcmp ogt float %1194, 0x3E80000000000000 ; [#uses=1]
- br i1 %1198, label %bb5.i, label %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit
-
-bb5.i: ; preds = %bb1.i
- %1199 = fmul float %1195, %1195 ; [#uses=1]
- %1200 = fmul float %1196, %1196 ; [#uses=1]
- %1201 = fadd float %1199, %1200 ; [#uses=1]
- %1202 = fmul float %1197, %1197 ; [#uses=1]
- %1203 = fadd float %1201, %1202 ; [#uses=1]
- %1204 = call float @sqrtf(float %1203) nounwind readonly ; [#uses=1]
- %1205 = fdiv float 1.000000e+00, %1204 ; [#uses=3]
- %1206 = fmul float %1195, %1205 ; [#uses=1]
- %1207 = fmul float %1196, %1205 ; [#uses=1]
- %1208 = fmul float %1197, %1205 ; [#uses=1]
- br label %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit
-
-_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit: ; preds = %bb5.i, %bb1.i
- %twistAxis.0.0.0 = phi float [ %1206, %bb5.i ], [ %1195, %bb1.i ] ; [#uses=4]
- %twistAxis.0.1.0 = phi float [ %1207, %bb5.i ], [ %1196, %bb1.i ] ; [#uses=2]
- %twistAxis.0.2.0 = phi float [ %1208, %bb5.i ], [ %1197, %bb1.i ] ; [#uses=2]
- %1209 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 4 ; [#uses=1]
- %1210 = load float* %1209, align 4 ; [#uses=2]
- %1211 = fmul float %1178, %1210 ; [#uses=4]
- %1212 = fcmp ogt float %1194, %1211 ; [#uses=1]
- br i1 %1212, label %bb70, label %bb75
-
-bb70: ; preds = %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit
- store i8 1, i8* %6, align 1
- %1213 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 27 ; [#uses=2]
- store float 1.000000e+00, float* %1213, align 4
- %1214 = fcmp olt float %1194, %1178 ; [#uses=1]
- %1215 = fcmp olt float %1210, 0x3FEFFFFFC0000000 ; [#uses=1]
- %or.cond247 = and i1 %1214, %1215 ; [#uses=1]
- br i1 %or.cond247, label %bb72, label %bb73
-
-bb72: ; preds = %bb70
- %1216 = fsub float %1194, %1211 ; [#uses=1]
- %1217 = fsub float %1178, %1211 ; [#uses=1]
- %1218 = fdiv float %1216, %1217 ; [#uses=1]
- store float %1218, float* %1213, align 4
- br label %bb73
-
-bb73: ; preds = %bb72, %bb70
- %1219 = fsub float %1194, %1211 ; [#uses=1]
- %1220 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store float %1219, float* %1220, align 4
- %1221 = fsub float -0.000000e+00, %twistAxis.0.2.0 ; [#uses=4]
- %1222 = fsub float -0.000000e+00, %twistAxis.0.1.0 ; [#uses=4]
- %1223 = fsub float -0.000000e+00, %twistAxis.0.0.0 ; [#uses=3]
- %1224 = fmul float %twistAxis.0.0.0, %554 ; [#uses=1]
- %1225 = fmul float %547, %1222 ; [#uses=1]
- %1226 = fsub float %1224, %1225 ; [#uses=1]
- %1227 = fmul float %540, %1221 ; [#uses=1]
- %1228 = fsub float %1226, %1227 ; [#uses=3]
- %1229 = fmul float %533, %1221 ; [#uses=1]
- %1230 = fmul float %554, %1222 ; [#uses=1]
- %1231 = fadd float %1229, %1230 ; [#uses=1]
- %1232 = fmul float %547, %1223 ; [#uses=1]
- %1233 = fsub float %1231, %1232 ; [#uses=3]
- %1234 = fmul float %533, %1222 ; [#uses=1]
- %1235 = fmul float %540, %1223 ; [#uses=1]
- %1236 = fadd float %1234, %1235 ; [#uses=1]
- %1237 = fmul float %554, %1221 ; [#uses=1]
- %1238 = fsub float %1236, %1237 ; [#uses=3]
- %1239 = fmul float %533, %1223 ; [#uses=1]
- %1240 = fmul float %547, %1221 ; [#uses=1]
- %1241 = fadd float %1239, %1240 ; [#uses=1]
- %1242 = fmul float %540, %1222 ; [#uses=1]
- %1243 = fsub float %1241, %1242 ; [#uses=3]
- %1244 = fmul float %1228, %555 ; [#uses=1]
- %1245 = fmul float %1233, %533 ; [#uses=1]
- %1246 = fadd float %1244, %1245 ; [#uses=1]
- %1247 = fmul float %1243, %556 ; [#uses=1]
- %1248 = fadd float %1246, %1247 ; [#uses=1]
- %1249 = fmul float %1238, %557 ; [#uses=1]
- %1250 = fsub float %1248, %1249 ; [#uses=9]
- %1251 = fmul float %1228, %556 ; [#uses=1]
- %1252 = fmul float %1238, %533 ; [#uses=1]
- %1253 = fadd float %1251, %1252 ; [#uses=1]
- %1254 = fmul float %1233, %557 ; [#uses=1]
- %1255 = fadd float %1253, %1254 ; [#uses=1]
- %1256 = fmul float %1243, %555 ; [#uses=1]
- %1257 = fsub float %1255, %1256 ; [#uses=9]
- %1258 = fmul float %1228, %557 ; [#uses=1]
- %1259 = fmul float %1243, %533 ; [#uses=1]
- %1260 = fadd float %1258, %1259 ; [#uses=1]
- %1261 = fmul float %1238, %555 ; [#uses=1]
- %1262 = fadd float %1260, %1261 ; [#uses=1]
- %1263 = fmul float %1233, %556 ; [#uses=1]
- %1264 = fsub float %1262, %1263 ; [#uses=9]
- %1265 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 0 ; [#uses=1]
- store float %1264, float* %1265, align 4
- %1266 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 1 ; [#uses=1]
- store float %1257, float* %1266, align 4
- %1267 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 2 ; [#uses=1]
- store float %1250, float* %1267, align 4
- %1268 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1268, align 4
- %1269 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1270 = load float* %1269, align 4 ; [#uses=1]
- %1271 = fmul float %1270, %1264 ; [#uses=1]
- %1272 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1273 = load float* %1272, align 4 ; [#uses=1]
- %1274 = fmul float %1273, %1257 ; [#uses=1]
- %1275 = fadd float %1271, %1274 ; [#uses=1]
- %1276 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1277 = load float* %1276, align 4 ; [#uses=1]
- %1278 = fmul float %1277, %1250 ; [#uses=1]
- %1279 = fadd float %1275, %1278 ; [#uses=1]
- %1280 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1281 = load float* %1280, align 4 ; [#uses=1]
- %1282 = fmul float %1281, %1264 ; [#uses=1]
- %1283 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1284 = load float* %1283, align 4 ; [#uses=1]
- %1285 = fmul float %1284, %1257 ; [#uses=1]
- %1286 = fadd float %1282, %1285 ; [#uses=1]
- %1287 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1288 = load float* %1287, align 4 ; [#uses=1]
- %1289 = fmul float %1288, %1250 ; [#uses=1]
- %1290 = fadd float %1286, %1289 ; [#uses=1]
- %1291 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1292 = load float* %1291, align 4 ; [#uses=1]
- %1293 = fmul float %1292, %1264 ; [#uses=1]
- %1294 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1295 = load float* %1294, align 4 ; [#uses=1]
- %1296 = fmul float %1295, %1257 ; [#uses=1]
- %1297 = fadd float %1293, %1296 ; [#uses=1]
- %1298 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldA, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1299 = load float* %1298, align 4 ; [#uses=1]
- %1300 = fmul float %1299, %1250 ; [#uses=1]
- %1301 = fadd float %1297, %1300 ; [#uses=1]
- %1302 = fmul float %1264, %1301 ; [#uses=1]
- %1303 = fmul float %1257, %1290 ; [#uses=1]
- %1304 = fadd float %1302, %1303 ; [#uses=1]
- %1305 = fmul float %1250, %1279 ; [#uses=1]
- %1306 = fadd float %1304, %1305 ; [#uses=1]
- %1307 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1308 = load float* %1307, align 4 ; [#uses=1]
- %1309 = fmul float %1308, %1264 ; [#uses=1]
- %1310 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1311 = load float* %1310, align 4 ; [#uses=1]
- %1312 = fmul float %1311, %1257 ; [#uses=1]
- %1313 = fadd float %1309, %1312 ; [#uses=1]
- %1314 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1315 = load float* %1314, align 4 ; [#uses=1]
- %1316 = fmul float %1315, %1250 ; [#uses=1]
- %1317 = fadd float %1313, %1316 ; [#uses=1]
- %1318 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1319 = load float* %1318, align 4 ; [#uses=1]
- %1320 = fmul float %1319, %1264 ; [#uses=1]
- %1321 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1322 = load float* %1321, align 4 ; [#uses=1]
- %1323 = fmul float %1322, %1257 ; [#uses=1]
- %1324 = fadd float %1320, %1323 ; [#uses=1]
- %1325 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1326 = load float* %1325, align 4 ; [#uses=1]
- %1327 = fmul float %1326, %1250 ; [#uses=1]
- %1328 = fadd float %1324, %1327 ; [#uses=1]
- %1329 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1330 = load float* %1329, align 4 ; [#uses=1]
- %1331 = fmul float %1330, %1264 ; [#uses=1]
- %1332 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1333 = load float* %1332, align 4 ; [#uses=1]
- %1334 = fmul float %1333, %1257 ; [#uses=1]
- %1335 = fadd float %1331, %1334 ; [#uses=1]
- %1336 = getelementptr inbounds %struct.btMatrix3x3* %invInertiaWorldB, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1337 = load float* %1336, align 4 ; [#uses=1]
- %1338 = fmul float %1337, %1250 ; [#uses=1]
- %1339 = fadd float %1335, %1338 ; [#uses=1]
- %1340 = fmul float %1264, %1339 ; [#uses=1]
- %1341 = fmul float %1257, %1328 ; [#uses=1]
- %1342 = fadd float %1340, %1341 ; [#uses=1]
- %1343 = fmul float %1250, %1317 ; [#uses=1]
- %1344 = fadd float %1342, %1343 ; [#uses=1]
- %1345 = fadd float %1306, %1344 ; [#uses=1]
- %1346 = fdiv float 1.000000e+00, %1345 ; [#uses=1]
- %1347 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 15 ; [#uses=1]
- store float %1346, float* %1347, align 4
- br label %bb75
-
-bb75: ; preds = %bb73, %_ZN21btConeTwistConstraint21computeTwistLimitInfoERK12btQuaternionRfR9btVector3.exit
- %1348 = load i8* %7, align 2 ; [#uses=1]
- %toBool76 = icmp eq i8 %1348, 0 ; [#uses=1]
- br i1 %toBool76, label %return, label %bb77
-
-bb77: ; preds = %bb75
- %1349 = fsub float -0.000000e+00, %twistAxis.0.2.0 ; [#uses=4]
- %1350 = fsub float -0.000000e+00, %twistAxis.0.1.0 ; [#uses=4]
- %1351 = fsub float -0.000000e+00, %twistAxis.0.0.0 ; [#uses=3]
- %1352 = fsub float -0.000000e+00, %508 ; [#uses=3]
- %1353 = fmul float %twistAxis.0.0.0, %508 ; [#uses=1]
- %1354 = fmul float %501, %1350 ; [#uses=1]
- %1355 = fsub float %1353, %1354 ; [#uses=1]
- %1356 = fmul float %494, %1349 ; [#uses=1]
- %1357 = fsub float %1355, %1356 ; [#uses=3]
- %1358 = fmul float %487, %1349 ; [#uses=1]
- %1359 = fmul float %508, %1350 ; [#uses=1]
- %1360 = fadd float %1358, %1359 ; [#uses=1]
- %1361 = fmul float %501, %1351 ; [#uses=1]
- %1362 = fsub float %1360, %1361 ; [#uses=3]
- %1363 = fmul float %487, %1350 ; [#uses=1]
- %1364 = fmul float %494, %1351 ; [#uses=1]
- %1365 = fadd float %1363, %1364 ; [#uses=1]
- %1366 = fmul float %508, %1349 ; [#uses=1]
- %1367 = fsub float %1365, %1366 ; [#uses=3]
- %1368 = fmul float %487, %1351 ; [#uses=1]
- %1369 = fmul float %501, %1349 ; [#uses=1]
- %1370 = fadd float %1368, %1369 ; [#uses=1]
- %1371 = fmul float %494, %1350 ; [#uses=1]
- %1372 = fsub float %1370, %1371 ; [#uses=3]
- %1373 = fsub float -0.000000e+00, %494 ; [#uses=3]
- %1374 = fsub float -0.000000e+00, %501 ; [#uses=3]
- %1375 = fmul float %1357, %1373 ; [#uses=1]
- %1376 = fmul float %1362, %487 ; [#uses=1]
- %1377 = fadd float %1375, %1376 ; [#uses=1]
- %1378 = fmul float %1372, %1374 ; [#uses=1]
- %1379 = fadd float %1377, %1378 ; [#uses=1]
- %1380 = fmul float %1367, %1352 ; [#uses=1]
- %1381 = fsub float %1379, %1380 ; [#uses=1]
- %1382 = fmul float %1357, %1374 ; [#uses=1]
- %1383 = fmul float %1367, %487 ; [#uses=1]
- %1384 = fadd float %1382, %1383 ; [#uses=1]
- %1385 = fmul float %1362, %1352 ; [#uses=1]
- %1386 = fadd float %1384, %1385 ; [#uses=1]
- %1387 = fmul float %1372, %1373 ; [#uses=1]
- %1388 = fsub float %1386, %1387 ; [#uses=1]
- %1389 = fmul float %1357, %1352 ; [#uses=1]
- %1390 = fmul float %1372, %487 ; [#uses=1]
- %1391 = fadd float %1389, %1390 ; [#uses=1]
- %1392 = fmul float %1367, %1373 ; [#uses=1]
- %1393 = fadd float %1391, %1392 ; [#uses=1]
- %1394 = fmul float %1362, %1374 ; [#uses=1]
- %1395 = fsub float %1393, %1394 ; [#uses=1]
- %1396 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 0 ; [#uses=1]
- store float %1395, float* %1396, align 4
- %1397 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 1 ; [#uses=1]
- store float %1388, float* %1397, align 4
- %1398 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 2 ; [#uses=1]
- store float %1381, float* %1398, align 4
- %1399 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 28, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1399, align 4
- ret void
-
-bb79: ; preds = %bb67
- store float 0.000000e+00, float* %1180, align 4
- ret void
-
-return: ; preds = %bb75, %bb5
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btConeTwistConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK11btMatrix3x3S8_(%struct.btConeTwistConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btMatrix3x3* nocapture %invInertiaWorldA, %struct.btMatrix3x3* nocapture %invInertiaWorldB) nounwind align 2 {
-entry:
- %a1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %a2 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- call void @_ZN21btConeTwistConstraint14calcAngleInfo2ERK11btTransformS2_RK11btMatrix3x3S5_(%struct.btConeTwistConstraint* %this, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btMatrix3x3* %invInertiaWorldA, %struct.btMatrix3x3* %invInertiaWorldB)
- %0 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %1 = load float** %0, align 4 ; [#uses=1]
- store float 1.000000e+00, float* %1, align 4
- %2 = load float** %0, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 6 ; [#uses=15]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = add nsw i32 %4, 1 ; [#uses=1]
- %6 = getelementptr inbounds float* %2, i32 %5 ; [#uses=1]
- store float 1.000000e+00, float* %6, align 4
- %7 = load float** %0, align 4 ; [#uses=1]
- %8 = load i32* %3, align 4 ; [#uses=1]
- %9 = shl i32 %8, 1 ; [#uses=1]
- %10 = add i32 %9, 2 ; [#uses=1]
- %11 = getelementptr inbounds float* %7, i32 %10 ; [#uses=1]
- store float 1.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = fadd float %16, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = fmul float %24, %26 ; [#uses=1]
- %28 = fadd float %22, %27 ; [#uses=4]
- %29 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fmul float %30, %15 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fmul float %33, %20 ; [#uses=1]
- %35 = fadd float %31, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fmul float %37, %26 ; [#uses=1]
- %39 = fadd float %35, %38 ; [#uses=4]
- %40 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fmul float %41, %15 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fmul float %44, %20 ; [#uses=1]
- %46 = fadd float %42, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fmul float %48, %26 ; [#uses=1]
- %50 = fadd float %46, %49 ; [#uses=4]
- %51 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %50, float* %51, align 8
- %52 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %39, float* %52, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %28, float* %53, align 8
- %54 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=3]
- %56 = load float** %55, align 4 ; [#uses=12]
- %57 = load i32* %3, align 4 ; [#uses=5]
- %58 = getelementptr inbounds float* %56, i32 %57 ; [#uses=1]
- %59 = shl i32 %57, 1 ; [#uses=4]
- %60 = getelementptr inbounds float* %56, i32 %59 ; [#uses=1]
- %61 = fsub float -0.000000e+00, %28 ; [#uses=1]
- %62 = fsub float -0.000000e+00, %39 ; [#uses=1]
- %63 = fsub float -0.000000e+00, %50 ; [#uses=1]
- store float 0.000000e+00, float* %56, align 4
- %64 = getelementptr inbounds float* %56, i32 1 ; [#uses=1]
- store float %28, float* %64, align 4
- %65 = getelementptr inbounds float* %56, i32 2 ; [#uses=1]
- store float %62, float* %65, align 4
- %66 = getelementptr inbounds float* %56, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %66, align 4
- store float %61, float* %58, align 4
- %.sum = add i32 %57, 1 ; [#uses=1]
- %67 = getelementptr inbounds float* %56, i32 %.sum ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- %.sum83 = add i32 %57, 2 ; [#uses=1]
- %68 = getelementptr inbounds float* %56, i32 %.sum83 ; [#uses=1]
- store float %50, float* %68, align 4
- %.sum84 = add i32 %57, 3 ; [#uses=1]
- %69 = getelementptr inbounds float* %56, i32 %.sum84 ; [#uses=1]
- store float 0.000000e+00, float* %69, align 4
- store float %39, float* %60, align 4
- %.sum8586 = or i32 %59, 1 ; [#uses=1]
- %70 = getelementptr inbounds float* %56, i32 %.sum8586 ; [#uses=1]
- store float %63, float* %70, align 4
- %.sum87 = add i32 %59, 2 ; [#uses=1]
- %71 = getelementptr inbounds float* %56, i32 %.sum87 ; [#uses=1]
- store float 0.000000e+00, float* %71, align 4
- %.sum88 = add i32 %59, 3 ; [#uses=1]
- %72 = getelementptr inbounds float* %56, i32 %.sum88 ; [#uses=1]
- store float 0.000000e+00, float* %72, align 4
- %73 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=3]
- %77 = fmul float %74, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=3]
- %82 = fmul float %79, %81 ; [#uses=1]
- %83 = fadd float %77, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=3]
- %88 = fmul float %85, %87 ; [#uses=1]
- %89 = fadd float %83, %88 ; [#uses=4]
- %90 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %91, %76 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %94, %81 ; [#uses=1]
- %96 = fadd float %92, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fmul float %98, %87 ; [#uses=1]
- %100 = fadd float %96, %99 ; [#uses=4]
- %101 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fmul float %102, %76 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %105, %81 ; [#uses=1]
- %107 = fadd float %103, %106 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %87 ; [#uses=1]
- %111 = fadd float %107, %110 ; [#uses=4]
- %112 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %111, float* %112, align 8
- %113 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %100, float* %113, align 4
- %114 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %89, float* %114, align 8
- %115 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %115, align 4
- %116 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=3]
- %117 = load float** %116, align 4 ; [#uses=12]
- %118 = load i32* %3, align 4 ; [#uses=5]
- %119 = getelementptr inbounds float* %117, i32 %118 ; [#uses=1]
- %120 = shl i32 %118, 1 ; [#uses=4]
- %121 = getelementptr inbounds float* %117, i32 %120 ; [#uses=1]
- %122 = fsub float -0.000000e+00, %89 ; [#uses=1]
- store float 0.000000e+00, float* %117, align 4
- %123 = getelementptr inbounds float* %117, i32 1 ; [#uses=1]
- store float %122, float* %123, align 4
- %124 = getelementptr inbounds float* %117, i32 2 ; [#uses=1]
- store float %100, float* %124, align 4
- %125 = getelementptr inbounds float* %117, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %125, align 4
- %126 = fsub float -0.000000e+00, %111 ; [#uses=1]
- store float %89, float* %119, align 4
- %.sum89 = add i32 %118, 1 ; [#uses=1]
- %127 = getelementptr inbounds float* %117, i32 %.sum89 ; [#uses=1]
- store float 0.000000e+00, float* %127, align 4
- %.sum90 = add i32 %118, 2 ; [#uses=1]
- %128 = getelementptr inbounds float* %117, i32 %.sum90 ; [#uses=1]
- store float %126, float* %128, align 4
- %.sum91 = add i32 %118, 3 ; [#uses=1]
- %129 = getelementptr inbounds float* %117, i32 %.sum91 ; [#uses=1]
- store float 0.000000e+00, float* %129, align 4
- %130 = fsub float -0.000000e+00, %100 ; [#uses=1]
- store float %130, float* %121, align 4
- %.sum9293 = or i32 %120, 1 ; [#uses=1]
- %131 = getelementptr inbounds float* %117, i32 %.sum9293 ; [#uses=1]
- store float %111, float* %131, align 4
- %.sum94 = add i32 %120, 2 ; [#uses=1]
- %132 = getelementptr inbounds float* %117, i32 %.sum94 ; [#uses=1]
- store float 0.000000e+00, float* %132, align 4
- %.sum95 = add i32 %120, 3 ; [#uses=1]
- %133 = getelementptr inbounds float* %117, i32 %.sum95 ; [#uses=1]
- store float 0.000000e+00, float* %133, align 4
- %134 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=6]
- %135 = load i32* %134, align 4 ; [#uses=1]
- %136 = and i32 %135, 2 ; [#uses=1]
- %137 = icmp eq i32 %136, 0 ; [#uses=1]
- br i1 %137, label %bb4, label %bb
-
-bb: ; preds = %entry
- %138 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 36 ; [#uses=1]
- br label %bb.nph
-
-bb4: ; preds = %entry
- %139 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- br label %bb.nph
-
-bb.nph: ; preds = %bb4, %bb
- %iftmp.176.0.in = phi float* [ %138, %bb ], [ %139, %bb4 ] ; [#uses=1]
- %iftmp.176.0 = load float* %iftmp.176.0.in, align 4 ; [#uses=1]
- %140 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=4]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = fmul float %141, %iftmp.176.0 ; [#uses=3]
- %143 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=3]
- %144 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=3]
- %145 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=3]
- %146 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=3]
- %147 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 35 ; [#uses=3]
- %scevgep97 = getelementptr %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep99 = getelementptr %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %148 = load float** %143, align 4 ; [#uses=1]
- %149 = load float* %scevgep97, align 4 ; [#uses=1]
- %150 = fadd float %111, %149 ; [#uses=1]
- %151 = fsub float %150, %50 ; [#uses=1]
- %152 = load float* %scevgep99, align 4 ; [#uses=1]
- %153 = fsub float %151, %152 ; [#uses=1]
- %154 = fmul float %153, %142 ; [#uses=1]
- store float %154, float* %148, align 4
- %155 = load float** %144, align 4 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %155, align 4
- %156 = load float** %145, align 4 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %156, align 4
- %157 = load i32* %134, align 4 ; [#uses=1]
- %158 = and i32 %157, 1 ; [#uses=1]
- %toBool = icmp eq i32 %158, 0 ; [#uses=1]
- br i1 %toBool, label %bb8, label %bb7
-
-bb7: ; preds = %bb.nph
- %159 = load float** %146, align 4 ; [#uses=1]
- %160 = load float* %147, align 4 ; [#uses=1]
- store float %160, float* %159, align 4
- br label %bb8
-
-bb8: ; preds = %bb7, %bb.nph
- %scevgep97.1 = getelementptr %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep99.1 = getelementptr %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %161 = load float** %143, align 4 ; [#uses=1]
- %162 = load i32* %3, align 4 ; [#uses=1]
- %163 = load float* %scevgep97.1, align 4 ; [#uses=1]
- %164 = fadd float %100, %163 ; [#uses=1]
- %165 = fsub float %164, %39 ; [#uses=1]
- %166 = load float* %scevgep99.1, align 4 ; [#uses=1]
- %167 = fsub float %165, %166 ; [#uses=1]
- %168 = fmul float %167, %142 ; [#uses=1]
- %169 = getelementptr inbounds float* %161, i32 %162 ; [#uses=1]
- store float %168, float* %169, align 4
- %170 = load float** %144, align 4 ; [#uses=1]
- %171 = load i32* %3, align 4 ; [#uses=1]
- %172 = getelementptr inbounds float* %170, i32 %171 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %172, align 4
- %173 = load float** %145, align 4 ; [#uses=1]
- %174 = load i32* %3, align 4 ; [#uses=1]
- %175 = getelementptr inbounds float* %173, i32 %174 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %175, align 4
- %176 = load i32* %134, align 4 ; [#uses=1]
- %177 = and i32 %176, 1 ; [#uses=1]
- %toBool.1 = icmp eq i32 %177, 0 ; [#uses=1]
- br i1 %toBool.1, label %bb8.1, label %bb7.1
-
-bb10: ; preds = %bb7.2, %bb8.1
- %178 = load i32* %3, align 4 ; [#uses=2]
- %179 = mul nsw i32 %178, 3 ; [#uses=18]
- %180 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=1]
- %181 = load i8* %180, align 2 ; [#uses=1]
- %toBool11 = icmp eq i8 %181, 0 ; [#uses=1]
- br i1 %toBool11, label %bb19, label %bb12
-
-bb12: ; preds = %bb10
- %182 = load float** %55, align 4 ; [#uses=9]
- %183 = load float** %116, align 4 ; [#uses=9]
- %184 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %185 = load float* %184, align 4 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=2]
- %188 = fcmp uge float %185, %187 ; [#uses=1]
- br i1 %188, label %bb15, label %bb13
-
-bb13: ; preds = %bb12
- %189 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %190 = load float* %189, align 4 ; [#uses=1]
- %191 = fcmp uge float %190, %187 ; [#uses=1]
- br i1 %191, label %bb15, label %bb14
-
-bb14: ; preds = %bb13
- %192 = load float* %12, align 4 ; [#uses=2]
- %193 = load float* %17, align 4 ; [#uses=2]
- %194 = load float* %23, align 4 ; [#uses=2]
- %195 = load float* %29, align 4 ; [#uses=2]
- %196 = load float* %32, align 4 ; [#uses=2]
- %197 = load float* %36, align 4 ; [#uses=2]
- %198 = load float* %40, align 4 ; [#uses=2]
- %199 = load float* %43, align 4 ; [#uses=2]
- %200 = load float* %47, align 4 ; [#uses=2]
- %201 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %202 = load float* %201, align 4 ; [#uses=3]
- %203 = fmul float %202, %192 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=3]
- %206 = fmul float %205, %193 ; [#uses=1]
- %207 = fadd float %203, %206 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=3]
- %210 = fmul float %209, %194 ; [#uses=1]
- %211 = fadd float %207, %210 ; [#uses=3]
- %212 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %213 = load float* %212, align 4 ; [#uses=3]
- %214 = fmul float %213, %192 ; [#uses=1]
- %215 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %216 = load float* %215, align 4 ; [#uses=3]
- %217 = fmul float %216, %193 ; [#uses=1]
- %218 = fadd float %214, %217 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=3]
- %221 = fmul float %220, %194 ; [#uses=1]
- %222 = fadd float %218, %221 ; [#uses=3]
- %223 = fmul float %202, %195 ; [#uses=1]
- %224 = fmul float %205, %196 ; [#uses=1]
- %225 = fadd float %223, %224 ; [#uses=1]
- %226 = fmul float %209, %197 ; [#uses=1]
- %227 = fadd float %225, %226 ; [#uses=3]
- %228 = fmul float %213, %195 ; [#uses=1]
- %229 = fmul float %216, %196 ; [#uses=1]
- %230 = fadd float %228, %229 ; [#uses=1]
- %231 = fmul float %220, %197 ; [#uses=1]
- %232 = fadd float %230, %231 ; [#uses=3]
- %233 = fmul float %202, %198 ; [#uses=1]
- %234 = fmul float %205, %199 ; [#uses=1]
- %235 = fadd float %233, %234 ; [#uses=1]
- %236 = fmul float %209, %200 ; [#uses=1]
- %237 = fadd float %235, %236 ; [#uses=3]
- %238 = fmul float %213, %198 ; [#uses=1]
- %239 = fmul float %216, %199 ; [#uses=1]
- %240 = fadd float %238, %239 ; [#uses=1]
- %241 = fmul float %220, %200 ; [#uses=1]
- %242 = fadd float %240, %241 ; [#uses=3]
- %243 = add nsw i32 %178, %179 ; [#uses=8]
- %244 = getelementptr inbounds float* %182, i32 %179 ; [#uses=1]
- store float %242, float* %244, align 4
- %245 = add nsw i32 %179, 1 ; [#uses=2]
- %246 = getelementptr inbounds float* %182, i32 %245 ; [#uses=1]
- store float %232, float* %246, align 4
- %247 = add nsw i32 %179, 2 ; [#uses=2]
- %248 = getelementptr inbounds float* %182, i32 %247 ; [#uses=1]
- store float %222, float* %248, align 4
- %249 = getelementptr inbounds float* %182, i32 %243 ; [#uses=1]
- store float %237, float* %249, align 4
- %250 = add nsw i32 %243, 1 ; [#uses=2]
- %251 = getelementptr inbounds float* %182, i32 %250 ; [#uses=1]
- store float %227, float* %251, align 4
- %252 = add nsw i32 %243, 2 ; [#uses=2]
- %253 = getelementptr inbounds float* %182, i32 %252 ; [#uses=1]
- store float %211, float* %253, align 4
- %254 = fsub float -0.000000e+00, %242 ; [#uses=1]
- %255 = getelementptr inbounds float* %183, i32 %179 ; [#uses=1]
- store float %254, float* %255, align 4
- %256 = fsub float -0.000000e+00, %232 ; [#uses=1]
- %257 = getelementptr inbounds float* %183, i32 %245 ; [#uses=1]
- store float %256, float* %257, align 4
- %258 = fsub float -0.000000e+00, %222 ; [#uses=1]
- %259 = getelementptr inbounds float* %183, i32 %247 ; [#uses=1]
- store float %258, float* %259, align 4
- %260 = fsub float -0.000000e+00, %237 ; [#uses=1]
- %261 = getelementptr inbounds float* %183, i32 %243 ; [#uses=1]
- store float %260, float* %261, align 4
- %262 = fsub float -0.000000e+00, %227 ; [#uses=1]
- %263 = getelementptr inbounds float* %183, i32 %250 ; [#uses=1]
- store float %262, float* %263, align 4
- %264 = fsub float -0.000000e+00, %211 ; [#uses=1]
- %265 = getelementptr inbounds float* %183, i32 %252 ; [#uses=1]
- store float %264, float* %265, align 4
- %266 = load float* %140, align 4 ; [#uses=1]
- %267 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %268 = load float* %267, align 4 ; [#uses=1]
- %269 = fmul float %266, %268 ; [#uses=2]
- %270 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=2]
- %271 = load float** %270, align 4 ; [#uses=1]
- %272 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=2]
- %273 = load float* %272, align 4 ; [#uses=1]
- %274 = fmul float %273, %242 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=2]
- %276 = load float* %275, align 4 ; [#uses=1]
- %277 = fmul float %276, %232 ; [#uses=1]
- %278 = fadd float %274, %277 ; [#uses=1]
- %279 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=2]
- %280 = load float* %279, align 4 ; [#uses=1]
- %281 = fmul float %280, %222 ; [#uses=1]
- %282 = fadd float %278, %281 ; [#uses=1]
- %283 = fmul float %282, %269 ; [#uses=1]
- %284 = getelementptr inbounds float* %271, i32 %179 ; [#uses=1]
- store float %283, float* %284, align 4
- %285 = load float** %270, align 4 ; [#uses=1]
- %286 = load float* %272, align 4 ; [#uses=1]
- %287 = fmul float %286, %237 ; [#uses=1]
- %288 = load float* %275, align 4 ; [#uses=1]
- %289 = fmul float %288, %227 ; [#uses=1]
- %290 = fadd float %287, %289 ; [#uses=1]
- %291 = load float* %279, align 4 ; [#uses=1]
- %292 = fmul float %291, %211 ; [#uses=1]
- %293 = fadd float %290, %292 ; [#uses=1]
- %294 = fmul float %293, %269 ; [#uses=1]
- %295 = getelementptr inbounds float* %285, i32 %243 ; [#uses=1]
- store float %294, float* %295, align 4
- %296 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=2]
- %297 = load float** %296, align 4 ; [#uses=1]
- %298 = getelementptr inbounds float* %297, i32 %179 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %298, align 4
- %299 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=2]
- %300 = load float** %299, align 4 ; [#uses=1]
- %301 = getelementptr inbounds float* %300, i32 %179 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %301, align 4
- %302 = load float** %296, align 4 ; [#uses=1]
- %303 = getelementptr inbounds float* %302, i32 %243 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %303, align 4
- %304 = load float** %299, align 4 ; [#uses=1]
- %305 = getelementptr inbounds float* %304, i32 %243 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %305, align 4
- %306 = load i32* %3, align 4 ; [#uses=1]
- %307 = add nsw i32 %306, %243 ; [#uses=1]
- br label %bb19
-
-bb15: ; preds = %bb13, %bb12
- %308 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %309 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=1]
- %310 = load float* %309, align 4 ; [#uses=1]
- %311 = load float* %308, align 4 ; [#uses=6]
- %312 = fmul float %310, %311 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=1]
- %314 = load float* %313, align 4 ; [#uses=1]
- %315 = fmul float %314, %311 ; [#uses=1]
- %316 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=1]
- %317 = load float* %316, align 4 ; [#uses=1]
- %318 = fmul float %317, %311 ; [#uses=1]
- %319 = fmul float %312, %311 ; [#uses=2]
- %320 = fmul float %315, %311 ; [#uses=2]
- %321 = fmul float %318, %311 ; [#uses=2]
- %322 = getelementptr inbounds float* %182, i32 %179 ; [#uses=1]
- store float %321, float* %322, align 4
- %323 = add nsw i32 %179, 1 ; [#uses=2]
- %324 = getelementptr inbounds float* %182, i32 %323 ; [#uses=1]
- store float %320, float* %324, align 4
- %325 = add nsw i32 %179, 2 ; [#uses=2]
- %326 = getelementptr inbounds float* %182, i32 %325 ; [#uses=1]
- store float %319, float* %326, align 4
- %327 = fsub float -0.000000e+00, %321 ; [#uses=1]
- %328 = getelementptr inbounds float* %183, i32 %179 ; [#uses=1]
- store float %327, float* %328, align 4
- %329 = fsub float -0.000000e+00, %320 ; [#uses=1]
- %330 = getelementptr inbounds float* %183, i32 %323 ; [#uses=1]
- store float %329, float* %330, align 4
- %331 = fsub float -0.000000e+00, %319 ; [#uses=1]
- %332 = getelementptr inbounds float* %183, i32 %325 ; [#uses=1]
- store float %331, float* %332, align 4
- %333 = load float* %140, align 4 ; [#uses=1]
- %334 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %335 = load float* %334, align 4 ; [#uses=1]
- %336 = fmul float %333, %335 ; [#uses=1]
- %337 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=1]
- %338 = load float** %337, align 4 ; [#uses=1]
- %339 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %340 = load float* %339, align 4 ; [#uses=1]
- %341 = fmul float %340, %336 ; [#uses=1]
- %342 = getelementptr inbounds float* %338, i32 %179 ; [#uses=1]
- store float %341, float* %342, align 4
- %343 = load i32* %134, align 4 ; [#uses=1]
- %344 = and i32 %343, 4 ; [#uses=1]
- %345 = icmp eq i32 %344, 0 ; [#uses=1]
- br i1 %345, label %bb18, label %bb17
-
-bb17: ; preds = %bb15
- %346 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %347 = load float** %346, align 4 ; [#uses=1]
- %348 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- %349 = load float* %348, align 4 ; [#uses=1]
- %350 = getelementptr inbounds float* %347, i32 %179 ; [#uses=1]
- store float %349, float* %350, align 4
- br label %bb18
-
-bb18: ; preds = %bb17, %bb15
- %351 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %352 = load float** %351, align 4 ; [#uses=1]
- %353 = getelementptr inbounds float* %352, i32 %179 ; [#uses=1]
- store float 0.000000e+00, float* %353, align 4
- %354 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %355 = load float** %354, align 4 ; [#uses=1]
- %356 = getelementptr inbounds float* %355, i32 %179 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %356, align 4
- %357 = load i32* %3, align 4 ; [#uses=1]
- %358 = add nsw i32 %357, %179 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb18, %bb14, %bb10
- %srow.0 = phi i32 [ %358, %bb18 ], [ %307, %bb14 ], [ %179, %bb10 ] ; [#uses=11]
- %359 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=1]
- %360 = load i8* %359, align 1 ; [#uses=1]
- %toBool20 = icmp eq i8 %360, 0 ; [#uses=1]
- br i1 %toBool20, label %bb35, label %bb21
-
-bb21: ; preds = %bb19
- %361 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %362 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 2 ; [#uses=1]
- %363 = load float* %362, align 4 ; [#uses=1]
- %364 = load float* %361, align 4 ; [#uses=6]
- %365 = fmul float %363, %364 ; [#uses=1]
- %366 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 1 ; [#uses=1]
- %367 = load float* %366, align 4 ; [#uses=1]
- %368 = fmul float %367, %364 ; [#uses=1]
- %369 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 13, i32 0, i32 0 ; [#uses=1]
- %370 = load float* %369, align 4 ; [#uses=1]
- %371 = fmul float %370, %364 ; [#uses=1]
- %372 = fmul float %365, %364 ; [#uses=2]
- %373 = fmul float %368, %364 ; [#uses=2]
- %374 = fmul float %371, %364 ; [#uses=2]
- %375 = load float** %55, align 4 ; [#uses=3]
- %376 = load float** %116, align 4 ; [#uses=3]
- %377 = getelementptr inbounds float* %375, i32 %srow.0 ; [#uses=1]
- store float %374, float* %377, align 4
- %378 = add nsw i32 %srow.0, 1 ; [#uses=2]
- %379 = getelementptr inbounds float* %375, i32 %378 ; [#uses=1]
- store float %373, float* %379, align 4
- %380 = add nsw i32 %srow.0, 2 ; [#uses=2]
- %381 = getelementptr inbounds float* %375, i32 %380 ; [#uses=1]
- store float %372, float* %381, align 4
- %382 = fsub float -0.000000e+00, %374 ; [#uses=1]
- %383 = getelementptr inbounds float* %376, i32 %srow.0 ; [#uses=1]
- store float %382, float* %383, align 4
- %384 = fsub float -0.000000e+00, %373 ; [#uses=1]
- %385 = getelementptr inbounds float* %376, i32 %378 ; [#uses=1]
- store float %384, float* %385, align 4
- %386 = fsub float -0.000000e+00, %372 ; [#uses=1]
- %387 = getelementptr inbounds float* %376, i32 %380 ; [#uses=1]
- store float %386, float* %387, align 4
- %388 = load float* %140, align 4 ; [#uses=1]
- %389 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %390 = load float* %389, align 4 ; [#uses=1]
- %391 = fmul float %388, %390 ; [#uses=1]
- %392 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=1]
- %393 = load float** %392, align 4 ; [#uses=1]
- %394 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 18 ; [#uses=2]
- %395 = load float* %394, align 4 ; [#uses=1]
- %396 = fmul float %395, %391 ; [#uses=1]
- %397 = getelementptr inbounds float* %393, i32 %srow.0 ; [#uses=1]
- store float %396, float* %397, align 4
- %398 = load i32* %134, align 4 ; [#uses=1]
- %399 = and i32 %398, 4 ; [#uses=1]
- %400 = icmp eq i32 %399, 0 ; [#uses=1]
- br i1 %400, label %bb30, label %bb29
-
-bb29: ; preds = %bb21
- %401 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %402 = load float** %401, align 4 ; [#uses=1]
- %403 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- %404 = load float* %403, align 4 ; [#uses=1]
- %405 = getelementptr inbounds float* %402, i32 %srow.0 ; [#uses=1]
- store float %404, float* %405, align 4
- br label %bb30
-
-bb30: ; preds = %bb29, %bb21
- %406 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %407 = load float* %406, align 4 ; [#uses=1]
- %408 = fcmp ogt float %407, 0.000000e+00 ; [#uses=1]
- br i1 %408, label %bb31, label %bb34
-
-bb31: ; preds = %bb30
- %409 = load float* %394, align 4 ; [#uses=1]
- %410 = fcmp ogt float %409, 0.000000e+00 ; [#uses=1]
- %411 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %412 = load float** %411, align 4 ; [#uses=1]
- %413 = getelementptr inbounds float* %412, i32 %srow.0 ; [#uses=2]
- br i1 %410, label %bb32, label %bb33
-
-bb32: ; preds = %bb31
- store float 0.000000e+00, float* %413, align 4
- %414 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %415 = load float** %414, align 4 ; [#uses=1]
- %416 = getelementptr inbounds float* %415, i32 %srow.0 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %416, align 4
- ret void
-
-bb33: ; preds = %bb31
- store float 0xC7EFFFFFE0000000, float* %413, align 4
- %417 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %418 = load float** %417, align 4 ; [#uses=1]
- %419 = getelementptr inbounds float* %418, i32 %srow.0 ; [#uses=1]
- store float 0.000000e+00, float* %419, align 4
- ret void
-
-bb34: ; preds = %bb30
- %420 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %421 = load float** %420, align 4 ; [#uses=1]
- %422 = getelementptr inbounds float* %421, i32 %srow.0 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %422, align 4
- %423 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %424 = load float** %423, align 4 ; [#uses=1]
- %425 = getelementptr inbounds float* %424, i32 %srow.0 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %425, align 4
- ret void
-
-bb35: ; preds = %bb19
- ret void
-
-bb8.1: ; preds = %bb7.1, %bb8
- %scevgep97.2 = getelementptr %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep99.2 = getelementptr %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %426 = load float** %143, align 4 ; [#uses=1]
- %427 = load i32* %3, align 4 ; [#uses=1]
- %428 = shl i32 %427, 1 ; [#uses=1]
- %429 = load float* %scevgep97.2, align 4 ; [#uses=1]
- %430 = fadd float %89, %429 ; [#uses=1]
- %431 = fsub float %430, %28 ; [#uses=1]
- %432 = load float* %scevgep99.2, align 4 ; [#uses=1]
- %433 = fsub float %431, %432 ; [#uses=1]
- %434 = fmul float %433, %142 ; [#uses=1]
- %435 = getelementptr inbounds float* %426, i32 %428 ; [#uses=1]
- store float %434, float* %435, align 4
- %436 = load float** %144, align 4 ; [#uses=1]
- %437 = load i32* %3, align 4 ; [#uses=1]
- %438 = shl i32 %437, 1 ; [#uses=1]
- %439 = getelementptr inbounds float* %436, i32 %438 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %439, align 4
- %440 = load float** %145, align 4 ; [#uses=1]
- %441 = load i32* %3, align 4 ; [#uses=1]
- %442 = shl i32 %441, 1 ; [#uses=1]
- %443 = getelementptr inbounds float* %440, i32 %442 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %443, align 4
- %444 = load i32* %134, align 4 ; [#uses=1]
- %445 = and i32 %444, 1 ; [#uses=1]
- %toBool.2 = icmp eq i32 %445, 0 ; [#uses=1]
- br i1 %toBool.2, label %bb10, label %bb7.2
-
-bb7.1: ; preds = %bb8
- %446 = load float** %146, align 4 ; [#uses=1]
- %447 = load i32* %3, align 4 ; [#uses=1]
- %448 = load float* %147, align 4 ; [#uses=1]
- %449 = getelementptr inbounds float* %446, i32 %447 ; [#uses=1]
- store float %448, float* %449, align 4
- br label %bb8.1
-
-bb7.2: ; preds = %bb8.1
- %450 = load float** %146, align 4 ; [#uses=1]
- %451 = load i32* %3, align 4 ; [#uses=1]
- %452 = shl i32 %451, 1 ; [#uses=1]
- %453 = load float* %147, align 4 ; [#uses=1]
- %454 = getelementptr inbounds float* %450, i32 %452 ; [#uses=1]
- store float %453, float* %454, align 4
- br label %bb10
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraintC2ER11btRigidBodyRK11btTransform(%struct.btConeTwistConstraint* %this, %struct.btRigidBody* %rbA, %struct.btTransform* nocapture %rbAFrame) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* %0, i32 5, %struct.btRigidBody* %rbA)
- %1 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV21btConeTwistConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=2]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=2]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=2]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=2]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store i8 0, i8* %51, align 1
- %52 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %4, float* %52, align 4
- %53 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %7, float* %53, align 4
- %54 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %10, float* %54, align 4
- %55 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %13, float* %55, align 4
- %56 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %16, float* %56, align 4
- %57 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %57, align 4
- %58 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %22, float* %58, align 4
- %59 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %25, float* %59, align 4
- %60 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %28, float* %60, align 4
- %61 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %31, float* %61, align 4
- %62 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %34, float* %62, align 4
- %63 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %37, float* %63, align 4
- %64 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %40, float* %64, align 4
- %65 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %43, float* %65, align 4
- %66 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %46, float* %66, align 4
- %67 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %49, float* %67, align 4
- store i8 0, i8* %50, align 4
- %68 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store i8 0, i8* %68, align 1
- %69 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=1]
- store i8 0, i8* %69, align 2
- %70 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store i8 0, i8* %70, align 4
- %71 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 32 ; [#uses=1]
- store float -1.000000e+00, float* %71, align 4
- %72 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %72, align 4
- %73 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %73, align 4
- %74 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %74, align 4
- %75 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %75, align 4
- %76 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float 0x3FD3333340000000, float* %76, align 4
- %77 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float 1.000000e+00, float* %77, align 4
- %78 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3F847AE140000000, float* %78, align 4
- %79 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x3FA99999A0000000, float* %79, align 4
- %80 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=1]
- store i32 0, i32* %80, align 4
- %81 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 35 ; [#uses=1]
- store float 0.000000e+00, float* %81, align 4
- %82 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store float 0x3FE6666660000000, float* %82, align 4
- %83 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- store float 0.000000e+00, float* %83, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraintC1ER11btRigidBodyRK11btTransform(%struct.btConeTwistConstraint* %this, %struct.btRigidBody* %rbA, %struct.btTransform* nocapture %rbAFrame) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* %0, i32 5, %struct.btRigidBody* %rbA)
- %1 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV21btConeTwistConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=2]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=2]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=2]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=2]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store i8 0, i8* %51, align 1
- %52 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %4, float* %52, align 4
- %53 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %7, float* %53, align 4
- %54 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %10, float* %54, align 4
- %55 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %13, float* %55, align 4
- %56 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %16, float* %56, align 4
- %57 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %19, float* %57, align 4
- %58 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %22, float* %58, align 4
- %59 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %25, float* %59, align 4
- %60 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %28, float* %60, align 4
- %61 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %31, float* %61, align 4
- %62 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %34, float* %62, align 4
- %63 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %37, float* %63, align 4
- %64 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %40, float* %64, align 4
- %65 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %43, float* %65, align 4
- %66 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %46, float* %66, align 4
- %67 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %49, float* %67, align 4
- store i8 0, i8* %50, align 4
- %68 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store i8 0, i8* %68, align 1
- %69 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 24 ; [#uses=1]
- store i8 0, i8* %69, align 2
- %70 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store i8 0, i8* %70, align 4
- %71 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 32 ; [#uses=1]
- store float -1.000000e+00, float* %71, align 4
- %72 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %72, align 4
- %73 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %73, align 4
- %74 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %74, align 4
- %75 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %75, align 4
- %76 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float 0x3FD3333340000000, float* %76, align 4
- %77 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float 1.000000e+00, float* %77, align 4
- %78 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3F847AE140000000, float* %78, align 4
- %79 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x3FA99999A0000000, float* %79, align 4
- %80 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 34 ; [#uses=1]
- store i32 0, i32* %80, align 4
- %81 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 35 ; [#uses=1]
- store float 0.000000e+00, float* %81, align 4
- %82 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store float 0x3FE6666660000000, float* %82, align 4
- %83 = getelementptr inbounds %struct.btConeTwistConstraint* %this, i32 0, i32 37 ; [#uses=1]
- store float 0.000000e+00, float* %83, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btConeTwistConstraintC1ER11btRigidBodyS1_RK11btTransformS4_(%struct.btConeTwistConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %rbAFrame, %struct.btTransform* nocapture %rbBFrame) align 2 {
-entry:
- tail call void @_ZN21btConeTwistConstraintC2ER11btRigidBodyS1_RK11btTransformS4_(%struct.btConeTwistConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %rbAFrame, %struct.btTransform* %rbBFrame)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btContactConstraintC2EP20btPersistentManifoldR11btRigidBodyS3_(%struct.btContactConstraint* %this, %struct.btPersistentManifold* nocapture %contactManifold, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 8, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV19btContactConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %3 = bitcast %struct.btPersistentManifold* %2 to i8* ; [#uses=1]
- %4 = bitcast %struct.btPersistentManifold* %contactManifold to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %3, i8* %4, i32 1140, i32 4, i1 false)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btContactConstraint18setContactManifoldEP20btPersistentManifold(%struct.btContactConstraint* nocapture %this, %struct.btPersistentManifold* nocapture %contactManifold) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %1 = bitcast %struct.btPersistentManifold* %0 to i8* ; [#uses=1]
- %2 = bitcast %struct.btPersistentManifold* %contactManifold to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %2, i32 1140, i32 4, i1 false)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btContactConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(%struct.btContactConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btContactConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btContactConstraint* nocapture %this, %"struct.btTypedConstraint::btConstraintInfo2"* nocapture %info) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btContactConstraint13buildJacobianEv(%struct.btContactConstraint* nocapture %this) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_Z22resolveSingleBilateralR11btRigidBodyRK9btVector3S0_S3_fS3_Rff(%struct.btRigidBody* nocapture %body1, %struct.btQuadWord* nocapture %pos1, %struct.btRigidBody* nocapture %body2, %struct.btQuadWord* nocapture %pos2, float %distance, %struct.btQuadWord* nocapture %normal, float* nocapture %impulse, float %timeStep) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=6]
- %2 = fmul float %1, %1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=6]
- %5 = fmul float %4, %4 ; [#uses=1]
- %6 = fadd float %2, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=6]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = fadd float %6, %9 ; [#uses=1]
- %11 = fcmp ogt float %10, 0x3FF19999A0000000 ; [#uses=1]
- br i1 %11, label %bb, label %bb1
-
-bb: ; preds = %entry
- store float 0.000000e+00, float* %impulse, align 4
- ret void
-
-bb1: ; preds = %entry
- %12 = getelementptr inbounds %struct.btQuadWord* %pos1, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float %13, %15 ; [#uses=4]
- %17 = getelementptr inbounds %struct.btQuadWord* %pos1, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %18, %20 ; [#uses=4]
- %22 = getelementptr inbounds %struct.btQuadWord* %pos1, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fsub float %23, %25 ; [#uses=4]
- %27 = getelementptr inbounds %struct.btQuadWord* %pos2, i32 0, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fsub float %28, %30 ; [#uses=4]
- %32 = getelementptr inbounds %struct.btQuadWord* %pos2, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fsub float %33, %35 ; [#uses=4]
- %37 = getelementptr inbounds %struct.btQuadWord* %pos2, i32 0, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fsub float %38, %40 ; [#uses=4]
- %42 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=2]
- %44 = fmul float %43, %21 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- %47 = fmul float %46, %26 ; [#uses=1]
- %48 = fsub float %44, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = fmul float %50, %26 ; [#uses=1]
- %52 = fmul float %43, %16 ; [#uses=1]
- %53 = fsub float %51, %52 ; [#uses=1]
- %54 = fmul float %46, %16 ; [#uses=1]
- %55 = fmul float %50, %21 ; [#uses=1]
- %56 = fsub float %54, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fadd float %58, %48 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fadd float %61, %53 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fadd float %64, %56 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=2]
- %68 = fmul float %67, %36 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=2]
- %71 = fmul float %70, %41 ; [#uses=1]
- %72 = fsub float %68, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=2]
- %75 = fmul float %74, %41 ; [#uses=1]
- %76 = fmul float %67, %31 ; [#uses=1]
- %77 = fsub float %75, %76 ; [#uses=1]
- %78 = fmul float %70, %31 ; [#uses=1]
- %79 = fmul float %74, %36 ; [#uses=1]
- %80 = fsub float %78, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = fadd float %82, %72 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fadd float %85, %77 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fadd float %88, %80 ; [#uses=1]
- %90 = fsub float %59, %83 ; [#uses=1]
- %91 = fsub float %62, %86 ; [#uses=1]
- %92 = fsub float %65, %89 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 4 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 4 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- %107 = load float* %104, align 4 ; [#uses=1]
- %108 = load float* %103, align 4 ; [#uses=1]
- %109 = load float* %102, align 4 ; [#uses=1]
- %110 = load float* %101, align 4 ; [#uses=1]
- %111 = load float* %100, align 4 ; [#uses=1]
- %112 = load float* %99, align 4 ; [#uses=1]
- %113 = load float* %98, align 4 ; [#uses=1]
- %114 = load float* %97, align 4 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- %125 = load float* %122, align 4 ; [#uses=1]
- %126 = load float* %121, align 4 ; [#uses=1]
- %127 = load float* %120, align 4 ; [#uses=1]
- %128 = load float* %119, align 4 ; [#uses=1]
- %129 = load float* %118, align 4 ; [#uses=1]
- %130 = load float* %117, align 4 ; [#uses=1]
- %131 = load float* %116, align 4 ; [#uses=1]
- %132 = load float* %115, align 4 ; [#uses=1]
- %133 = fmul float %26, %4 ; [#uses=1]
- %134 = fmul float %21, %1 ; [#uses=1]
- %135 = fsub float %133, %134 ; [#uses=3]
- %136 = fmul float %16, %1 ; [#uses=1]
- %137 = fmul float %26, %8 ; [#uses=1]
- %138 = fsub float %136, %137 ; [#uses=3]
- %139 = fmul float %21, %8 ; [#uses=1]
- %140 = fmul float %16, %4 ; [#uses=1]
- %141 = fsub float %139, %140 ; [#uses=3]
- %142 = fmul float %130, %141 ; [#uses=1]
- %143 = fmul float %131, %138 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = fmul float %132, %135 ; [#uses=1]
- %146 = fadd float %144, %145 ; [#uses=2]
- %147 = fmul float %127, %141 ; [#uses=1]
- %148 = fmul float %128, %138 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fmul float %129, %135 ; [#uses=1]
- %151 = fadd float %149, %150 ; [#uses=2]
- %152 = fmul float %124, %141 ; [#uses=1]
- %153 = fmul float %125, %138 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fmul float %126, %135 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=2]
- %157 = fsub float -0.000000e+00, %8 ; [#uses=2]
- %158 = fsub float -0.000000e+00, %4 ; [#uses=2]
- %159 = fsub float -0.000000e+00, %1 ; [#uses=2]
- %160 = fmul float %41, %158 ; [#uses=1]
- %161 = fmul float %36, %159 ; [#uses=1]
- %162 = fsub float %160, %161 ; [#uses=3]
- %163 = fmul float %31, %159 ; [#uses=1]
- %164 = fmul float %41, %157 ; [#uses=1]
- %165 = fsub float %163, %164 ; [#uses=3]
- %166 = fmul float %36, %157 ; [#uses=1]
- %167 = fmul float %31, %158 ; [#uses=1]
- %168 = fsub float %166, %167 ; [#uses=3]
- %169 = fmul float %112, %168 ; [#uses=1]
- %170 = fmul float %113, %165 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=1]
- %172 = fmul float %114, %162 ; [#uses=1]
- %173 = fadd float %171, %172 ; [#uses=2]
- %174 = fmul float %109, %168 ; [#uses=1]
- %175 = fmul float %110, %165 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=1]
- %177 = fmul float %111, %162 ; [#uses=1]
- %178 = fadd float %176, %177 ; [#uses=2]
- %179 = fmul float %106, %168 ; [#uses=1]
- %180 = fmul float %107, %165 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=1]
- %182 = fmul float %108, %162 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=2]
- %184 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %185 = load float* %184, align 4 ; [#uses=1]
- %186 = fmul float %185, %146 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %188 = load float* %187, align 4 ; [#uses=1]
- %189 = fmul float %188, %151 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=1]
- %192 = fmul float %191, %156 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %194 = load float* %193, align 4 ; [#uses=1]
- %195 = fmul float %194, %173 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %197 = load float* %196, align 4 ; [#uses=1]
- %198 = fmul float %197, %178 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %200 = load float* %199, align 4 ; [#uses=1]
- %201 = fmul float %200, %183 ; [#uses=1]
- %202 = fmul float %192, %156 ; [#uses=1]
- %203 = fmul float %189, %151 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=1]
- %205 = fmul float %186, %146 ; [#uses=1]
- %206 = fadd float %204, %205 ; [#uses=1]
- %207 = fadd float %206, %96 ; [#uses=1]
- %208 = fadd float %207, %94 ; [#uses=1]
- %209 = fmul float %201, %183 ; [#uses=1]
- %210 = fmul float %198, %178 ; [#uses=1]
- %211 = fadd float %209, %210 ; [#uses=1]
- %212 = fmul float %195, %173 ; [#uses=1]
- %213 = fadd float %211, %212 ; [#uses=1]
- %214 = fadd float %208, %213 ; [#uses=1]
- %215 = fdiv float 1.000000e+00, %214 ; [#uses=1]
- %216 = fmul float %1, %92 ; [#uses=1]
- %217 = fmul float %4, %91 ; [#uses=1]
- %218 = fadd float %216, %217 ; [#uses=1]
- %219 = fmul float %8, %90 ; [#uses=1]
- %220 = fadd float %218, %219 ; [#uses=1]
- %221 = fmul float %220, 0xBFC99999A0000000 ; [#uses=1]
- %222 = fmul float %221, %215 ; [#uses=1]
- store float %222, float* %impulse, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btContactConstraintD0Ev(%struct.btContactConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV19btContactConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btContactConstraint* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN19btContactConstraintD1Ev(%struct.btContactConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV19btContactConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btContactConstraintD2Ev(%struct.btContactConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV19btContactConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN19btContactConstraintC1EP20btPersistentManifoldR11btRigidBodyS3_(%struct.btContactConstraint* %this, %struct.btPersistentManifold* nocapture %contactManifold, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 8, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV19btContactConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btContactConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %3 = bitcast %struct.btPersistentManifold* %2 to i8* ; [#uses=1]
- %4 = bitcast %struct.btPersistentManifold* %contactManifold to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %3, i8* %4, i32 1140, i32 4, i1 false)
- ret void
-}
-
-; [#uses=4]
-define void @_ZN23btGeneric6DofConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInA, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-return:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 6, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- store float %88, float* %86, align 4
- %89 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- store float %91, float* %89, align 4
- %92 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- store float %94, float* %92, align 4
- %95 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- store float %97, float* %95, align 4
- %98 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %99, align 4
- %100 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %100, align 4
- %101 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %101, align 4
- %102 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %102, align 4
- %103 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 0 ; [#uses=1]
- %104 = bitcast %struct.btTranslationalLimitMotor* %98 to i8* ; [#uses=1]
- tail call void @llvm.memset.p0i8.i64(i8* %104, i8 0, i64 48, i32 4, i1 false) nounwind
- store float 0x3FC99999A0000000, float* %103, align 4
- %105 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 1 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %105, align 4
- %106 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 2 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %106, align 4
- %107 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %108, align 4
- %109 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %109, align 4
- %110 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %110, align 4
- %111 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- %112 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- store float 0x3FE6666660000000, float* %112, align 4
- %113 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %113, align 4
- %114 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 5 ; [#uses=1]
- store float 5.000000e-01, float* %114, align 4
- %scevgep.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 0 ; [#uses=1]
- %scevgep4.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 10, i32 0, i32 0 ; [#uses=1]
- %scevgep5.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 11, i32 0, i32 0 ; [#uses=1]
- store i8 0, i8* %scevgep.i.i, align 1
- store float 0.000000e+00, float* %scevgep4.i.i, align 4
- store float 0.000000e+00, float* %scevgep5.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 10, i32 0, i32 1 ; [#uses=1]
- %scevgep5.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 11, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %scevgep.1.i.i, align 1
- store float 0.000000e+00, float* %scevgep4.1.i.i, align 4
- store float 0.000000e+00, float* %scevgep5.1.i.i, align 4
- %scevgep.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 10, i32 0, i32 2 ; [#uses=1]
- %scevgep5.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 11, i32 0, i32 2 ; [#uses=1]
- store i8 0, i8* %scevgep.2.i.i, align 1
- store float 0.000000e+00, float* %scevgep4.2.i.i, align 4
- store float 0.000000e+00, float* %scevgep5.2.i.i, align 4
- %scevgep = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 15 ; [#uses=1]
- %scevgep32 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %scevgep34 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 4 ; [#uses=1]
- %scevgep3536 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %scevgep37 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %scevgep38 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 7 ; [#uses=1]
- %scevgep39 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 8 ; [#uses=1]
- %scevgep40 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 9 ; [#uses=1]
- %scevgep41 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 10 ; [#uses=1]
- %scevgep42 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 5 ; [#uses=1]
- %scevgep43 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 6 ; [#uses=1]
- %scevgep44 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 14 ; [#uses=1]
- %scevgep45 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 12 ; [#uses=1]
- %scevgep46 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep, align 4
- store float 0.000000e+00, float* %scevgep32, align 4
- store float 0x3FB99999A0000000, float* %scevgep33, align 4
- store float 3.000000e+02, float* %scevgep34, align 4
- store float 1.000000e+00, float* %scevgep3536, align 4
- store float -1.000000e+00, float* %scevgep37, align 4
- store float 0.000000e+00, float* %scevgep38, align 4
- store float 0x3FC99999A0000000, float* %scevgep39, align 4
- store float 0.000000e+00, float* %scevgep40, align 4
- store float 0.000000e+00, float* %scevgep41, align 4
- store float 1.000000e+00, float* %scevgep42, align 4
- store float 5.000000e-01, float* %scevgep43, align 4
- store i32 0, i32* %scevgep44, align 4
- store float 0.000000e+00, float* %scevgep45, align 4
- store i8 0, i8* %scevgep46, align 4
- %scevgep.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 15 ; [#uses=1]
- %scevgep32.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 2 ; [#uses=1]
- %scevgep33.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 3 ; [#uses=1]
- %scevgep34.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 4 ; [#uses=1]
- %scevgep3536.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 0 ; [#uses=1]
- %scevgep37.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 1 ; [#uses=1]
- %scevgep38.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 7 ; [#uses=1]
- %scevgep39.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 8 ; [#uses=1]
- %scevgep40.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 9 ; [#uses=1]
- %scevgep41.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 10 ; [#uses=1]
- %scevgep42.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 5 ; [#uses=1]
- %scevgep43.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 6 ; [#uses=1]
- %scevgep44.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 14 ; [#uses=1]
- %scevgep45.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 12 ; [#uses=1]
- %scevgep46.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep.1, align 4
- store float 0.000000e+00, float* %scevgep32.1, align 4
- store float 0x3FB99999A0000000, float* %scevgep33.1, align 4
- store float 3.000000e+02, float* %scevgep34.1, align 4
- store float 1.000000e+00, float* %scevgep3536.1, align 4
- store float -1.000000e+00, float* %scevgep37.1, align 4
- store float 0.000000e+00, float* %scevgep38.1, align 4
- store float 0x3FC99999A0000000, float* %scevgep39.1, align 4
- store float 0.000000e+00, float* %scevgep40.1, align 4
- store float 0.000000e+00, float* %scevgep41.1, align 4
- store float 1.000000e+00, float* %scevgep42.1, align 4
- store float 5.000000e-01, float* %scevgep43.1, align 4
- store i32 0, i32* %scevgep44.1, align 4
- store float 0.000000e+00, float* %scevgep45.1, align 4
- store i8 0, i8* %scevgep46.1, align 4
- %scevgep.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 15 ; [#uses=1]
- %scevgep32.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 2 ; [#uses=1]
- %scevgep33.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 3 ; [#uses=1]
- %scevgep34.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 4 ; [#uses=1]
- %scevgep3536.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 0 ; [#uses=1]
- %scevgep37.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 1 ; [#uses=1]
- %scevgep38.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 7 ; [#uses=1]
- %scevgep39.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 8 ; [#uses=1]
- %scevgep40.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 9 ; [#uses=1]
- %scevgep41.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 10 ; [#uses=1]
- %scevgep42.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 5 ; [#uses=1]
- %scevgep43.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 6 ; [#uses=1]
- %scevgep44.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 14 ; [#uses=1]
- %scevgep45.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 12 ; [#uses=1]
- %scevgep46.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep.2, align 4
- store float 0.000000e+00, float* %scevgep32.2, align 4
- store float 0x3FB99999A0000000, float* %scevgep33.2, align 4
- store float 3.000000e+02, float* %scevgep34.2, align 4
- store float 1.000000e+00, float* %scevgep3536.2, align 4
- store float -1.000000e+00, float* %scevgep37.2, align 4
- store float 0.000000e+00, float* %scevgep38.2, align 4
- store float 0x3FC99999A0000000, float* %scevgep39.2, align 4
- store float 0.000000e+00, float* %scevgep40.2, align 4
- store float 0.000000e+00, float* %scevgep41.2, align 4
- store float 1.000000e+00, float* %scevgep42.2, align 4
- store float 5.000000e-01, float* %scevgep43.2, align 4
- store i32 0, i32* %scevgep44.2, align 4
- store float 0.000000e+00, float* %scevgep45.2, align 4
- store i8 0, i8* %scevgep46.2, align 4
- %115 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store i8 %useLinearReferenceFrameA, i8* %115, align 4
- %116 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store i8 1, i8* %116, align 1
- %117 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store i32 0, i32* %117, align 4
- %118 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store i8 0, i8* %118, align 4
- %119 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %120 = load %struct.btRigidBody** %119, align 4 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btRigidBody* %120, i32 0, i32 0, i32 1 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %123 = load %struct.btRigidBody** %122, align 4 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btRigidBody* %123, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraint19calculateTransformsERK11btTransformS2_(%struct.btGeneric6DofConstraint* %this, %struct.btTransform* %124, %struct.btTransform* %121) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK23btGeneric6DofConstraint28calculateSerializeBufferSizeEv(%struct.btGeneric6DofConstraint* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 244
-}
-
-; [#uses=0]
-define float @_Z15btGetMatrixElemRK11btMatrix3x3i(%struct.btMatrix3x3* nocapture %mat, i32 %index) nounwind readonly {
-entry:
- %0 = srem i32 %index, 3 ; [#uses=1]
- %1 = sdiv i32 %index, 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 %0, i32 0, i32 %1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- ret float %3
-}
-
-; [#uses=0]
-define i32 @_ZN22btRotationalLimitMotor14testLimitValueEf(%struct.btRotationalLimitMotor* nocapture %this, float %test_value) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fcmp ogt float %1, %3 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 14 ; [#uses=1]
- store i32 0, i32* %5, align 4
- ret i32 0
-
-bb1: ; preds = %entry
- %6 = fcmp ogt float %1, %test_value ; [#uses=1]
- br i1 %6, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %7 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 14 ; [#uses=1]
- store i32 1, i32* %7, align 4
- %8 = fsub float %test_value, %1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 12 ; [#uses=1]
- store float %8, float* %9, align 4
- ret i32 1
-
-bb3: ; preds = %bb1
- %10 = fcmp olt float %3, %test_value ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 14 ; [#uses=2]
- br i1 %10, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- store i32 2, i32* %11, align 4
- %12 = fsub float %test_value, %3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 12 ; [#uses=1]
- store float %12, float* %13, align 4
- ret i32 2
-
-bb5: ; preds = %bb3
- store i32 0, i32* %11, align 4
- ret i32 0
-}
-
-; [#uses=0]
-define float @_ZN22btRotationalLimitMotor18solveAngularLimitsEfR9btVector3fP11btRigidBodyS3_(%struct.btRotationalLimitMotor* nocapture %this, float %timeStep, %struct.btQuadWord* nocapture %axis, float %jacDiagABInv, %struct.btRigidBody* nocapture %body0, %struct.btRigidBody* nocapture %body1) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 14 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit, label %bb4
-
-_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit: ; preds = %entry
- %3 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 11 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=1]
- %phitmp = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %phitmp, label %bb24, label %bb3.thread
-
-bb3.thread: ; preds = %_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit
- %5 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb5
-
-bb4: ; preds = %entry
- %8 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 8 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fsub float -0.000000e+00, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 12 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fmul float %12, %10 ; [#uses=1]
- %14 = fdiv float %13, %timeStep ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 4 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3.thread
- %target_velocity.0 = phi float [ %14, %bb4 ], [ %6, %bb3.thread ] ; [#uses=1]
- %maxMotorForce.0.in = phi float* [ %15, %bb4 ], [ %7, %bb3.thread ] ; [#uses=1]
- %maxMotorForce.0 = load float* %maxMotorForce.0.in, align 4 ; [#uses=1]
- %16 = fmul float %maxMotorForce.0, %timeStep ; [#uses=3]
- %17 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fadd float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fadd float %23, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fadd float %28, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fadd float %33, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fadd float %38, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fadd float %43, %45 ; [#uses=1]
- %47 = fsub float %21, %36 ; [#uses=1]
- %48 = fsub float %26, %41 ; [#uses=1]
- %49 = fsub float %31, %46 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 0 ; [#uses=3]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %51, %49 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 1 ; [#uses=3]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %48 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 2 ; [#uses=3]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fmul float %58, %47 ; [#uses=1]
- %60 = fadd float %56, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 6 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 5 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fmul float %64, %60 ; [#uses=1]
- %66 = fsub float %target_velocity.0, %65 ; [#uses=1]
- %67 = fmul float %62, %66 ; [#uses=3]
- %68 = fcmp olt float %67, 0x3E80000000000000 ; [#uses=1]
- %69 = fcmp ogt float %67, 0xBE80000000000000 ; [#uses=1]
- %or.cond = and i1 %68, %69 ; [#uses=1]
- br i1 %or.cond, label %bb24, label %bb8
-
-bb8: ; preds = %bb5
- %70 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 10 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = fadd float %71, 1.000000e+00 ; [#uses=1]
- %73 = fmul float %72, %67 ; [#uses=1]
- %74 = fmul float %73, %jacDiagABInv ; [#uses=5]
- %75 = fcmp ogt float %74, 0.000000e+00 ; [#uses=1]
- br i1 %75, label %bb9, label %bb13
-
-bb9: ; preds = %bb8
- %76 = fcmp ogt float %74, %16 ; [#uses=1]
- %iftmp.199.0 = select i1 %76, float %16, float %74 ; [#uses=1]
- br label %bb17
-
-bb13: ; preds = %bb8
- %77 = fsub float -0.000000e+00, %16 ; [#uses=2]
- %78 = fcmp olt float %74, %77 ; [#uses=1]
- br i1 %78, label %bb14, label %bb17
-
-bb14: ; preds = %bb13
- br label %bb17
-
-bb17: ; preds = %bb14, %bb13, %bb9
- %storemerge = phi float [ %iftmp.199.0, %bb9 ], [ %77, %bb14 ], [ %74, %bb13 ] ; [#uses=1]
- %79 = getelementptr inbounds %struct.btRotationalLimitMotor* %this, i32 0, i32 15 ; [#uses=2]
- %80 = load float* %79, align 4 ; [#uses=2]
- %81 = fadd float %80, %storemerge ; [#uses=3]
- %82 = fcmp ule float %81, 0x43ABC16D60000000 ; [#uses=1]
- br i1 %82, label %bb18, label %bb23
-
-bb18: ; preds = %bb17
- %83 = fcmp uge float %81, 0xC3ABC16D60000000 ; [#uses=1]
- %iftmp.203.0 = select i1 %83, float %81, float 0.000000e+00 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb18, %bb17
- %iftmp.202.0 = phi float [ %iftmp.203.0, %bb18 ], [ 0.000000e+00, %bb17 ] ; [#uses=2]
- store float %iftmp.202.0, float* %79, align 4
- %84 = fsub float %iftmp.202.0, %80 ; [#uses=8]
- %85 = load float* %50, align 4 ; [#uses=4]
- %86 = load float* %53, align 4 ; [#uses=4]
- %87 = load float* %57, align 4 ; [#uses=4]
- %88 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 4 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = fcmp une float %89, 0.000000e+00 ; [#uses=1]
- br i1 %90, label %bb.i28, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit30
-
-bb.i28: ; preds = %bb23
- %91 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %91, align 4 ; [#uses=1]
- %99 = load float* %92, align 4 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %101 = load float* %93, align 4 ; [#uses=1]
- %102 = load float* %94, align 4 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %104 = load float* %95, align 4 ; [#uses=1]
- %105 = load float* %96, align 4 ; [#uses=1]
- %106 = load float* %97, align 4 ; [#uses=1]
- %107 = fmul float %98, %86 ; [#uses=1]
- %108 = fmul float %99, %85 ; [#uses=1]
- %109 = load float* %100, align 4 ; [#uses=1]
- %110 = fmul float %101, %86 ; [#uses=1]
- %111 = fmul float %102, %85 ; [#uses=1]
- %112 = load float* %103, align 4 ; [#uses=1]
- %113 = fmul float %104, %86 ; [#uses=1]
- %114 = fmul float %105, %85 ; [#uses=1]
- %115 = fmul float %106, %87 ; [#uses=1]
- %116 = fadd float %108, %107 ; [#uses=1]
- %117 = fmul float %109, %87 ; [#uses=1]
- %118 = fadd float %111, %110 ; [#uses=1]
- %119 = fmul float %112, %87 ; [#uses=1]
- %120 = fadd float %114, %113 ; [#uses=1]
- %121 = fadd float %116, %115 ; [#uses=1]
- %122 = fadd float %118, %117 ; [#uses=1]
- %123 = fadd float %120, %119 ; [#uses=1]
- %124 = fmul float %84, 0.000000e+00 ; [#uses=3]
- %125 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %126 = load float* %125, align 4 ; [#uses=1]
- %127 = fadd float %126, %124 ; [#uses=1]
- store float %127, float* %125, align 4
- %128 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %129 = load float* %128, align 4 ; [#uses=1]
- %130 = fadd float %129, %124 ; [#uses=1]
- store float %130, float* %128, align 4
- %131 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = fadd float %132, %124 ; [#uses=1]
- store float %133, float* %131, align 4
- %134 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = fmul float %135, %84 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- %139 = fmul float %138, %84 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = fmul float %141, %84 ; [#uses=1]
- %143 = fmul float %123, %136 ; [#uses=1]
- %144 = fmul float %122, %139 ; [#uses=1]
- %145 = fmul float %121, %142 ; [#uses=1]
- %146 = load float* %29, align 4 ; [#uses=1]
- %147 = fadd float %146, %145 ; [#uses=1]
- store float %147, float* %29, align 4
- %148 = load float* %24, align 4 ; [#uses=1]
- %149 = fadd float %148, %144 ; [#uses=1]
- store float %149, float* %24, align 4
- %150 = load float* %19, align 4 ; [#uses=1]
- %151 = fadd float %150, %143 ; [#uses=1]
- store float %151, float* %19, align 4
- %.pre = load float* %50, align 4 ; [#uses=1]
- %.pre60 = load float* %53, align 4 ; [#uses=1]
- %.pre61 = load float* %57, align 4 ; [#uses=1]
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit30
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit30: ; preds = %bb.i28, %bb23
- %152 = phi float [ %87, %bb23 ], [ %.pre61, %bb.i28 ] ; [#uses=3]
- %153 = phi float [ %86, %bb23 ], [ %.pre60, %bb.i28 ] ; [#uses=3]
- %154 = phi float [ %85, %bb23 ], [ %.pre, %bb.i28 ] ; [#uses=3]
- %155 = fsub float -0.000000e+00, %84 ; [#uses=3]
- %156 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 4 ; [#uses=1]
- %157 = load float* %156, align 4 ; [#uses=1]
- %158 = fcmp une float %157, 0.000000e+00 ; [#uses=1]
- br i1 %158, label %bb.i27, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit
-
-bb.i27: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit30
- %159 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %166 = load float* %159, align 4 ; [#uses=1]
- %167 = load float* %160, align 4 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %169 = load float* %161, align 4 ; [#uses=1]
- %170 = load float* %162, align 4 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %172 = load float* %163, align 4 ; [#uses=1]
- %173 = load float* %164, align 4 ; [#uses=1]
- %174 = load float* %165, align 4 ; [#uses=1]
- %175 = fmul float %166, %153 ; [#uses=1]
- %176 = fmul float %167, %154 ; [#uses=1]
- %177 = load float* %168, align 4 ; [#uses=1]
- %178 = fmul float %169, %153 ; [#uses=1]
- %179 = fmul float %170, %154 ; [#uses=1]
- %180 = load float* %171, align 4 ; [#uses=1]
- %181 = fmul float %172, %153 ; [#uses=1]
- %182 = fmul float %173, %154 ; [#uses=1]
- %183 = fmul float %174, %152 ; [#uses=1]
- %184 = fadd float %176, %175 ; [#uses=1]
- %185 = fmul float %177, %152 ; [#uses=1]
- %186 = fadd float %179, %178 ; [#uses=1]
- %187 = fmul float %180, %152 ; [#uses=1]
- %188 = fadd float %182, %181 ; [#uses=1]
- %189 = fadd float %184, %183 ; [#uses=1]
- %190 = fadd float %186, %185 ; [#uses=1]
- %191 = fadd float %188, %187 ; [#uses=1]
- %192 = fmul float %84, -0.000000e+00 ; [#uses=3]
- %193 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %194 = load float* %193, align 4 ; [#uses=1]
- %195 = fadd float %194, %192 ; [#uses=1]
- store float %195, float* %193, align 4
- %196 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %197 = load float* %196, align 4 ; [#uses=1]
- %198 = fadd float %197, %192 ; [#uses=1]
- store float %198, float* %196, align 4
- %199 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %200 = load float* %199, align 4 ; [#uses=1]
- %201 = fadd float %200, %192 ; [#uses=1]
- store float %201, float* %199, align 4
- %202 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %203 = load float* %202, align 4 ; [#uses=1]
- %204 = fmul float %203, %155 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %206 = load float* %205, align 4 ; [#uses=1]
- %207 = fmul float %206, %155 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=1]
- %210 = fmul float %209, %155 ; [#uses=1]
- %211 = fmul float %191, %204 ; [#uses=1]
- %212 = fmul float %190, %207 ; [#uses=1]
- %213 = fmul float %189, %210 ; [#uses=1]
- %214 = load float* %44, align 4 ; [#uses=1]
- %215 = fadd float %214, %213 ; [#uses=1]
- store float %215, float* %44, align 4
- %216 = load float* %39, align 4 ; [#uses=1]
- %217 = fadd float %216, %212 ; [#uses=1]
- store float %217, float* %39, align 4
- %218 = load float* %34, align 4 ; [#uses=1]
- %219 = fadd float %218, %211 ; [#uses=1]
- store float %219, float* %34, align 4
- ret float %84
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit30
- ret float %84
-
-bb24: ; preds = %bb5, %_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit
- ret float 0.000000e+00
-}
-
-; [#uses=0]
-define i32 @_ZN25btTranslationalLimitMotor14testLimitValueEif(%struct.btTranslationalLimitMotor* nocapture %this, i32 %limitIndex, float %test_value) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 0, i32 0, i32 %limitIndex ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 1, i32 0, i32 %limitIndex ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fcmp ogt float %1, %3 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 14, i32 %limitIndex ; [#uses=1]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 12, i32 0, i32 %limitIndex ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- ret i32 0
-
-bb1: ; preds = %entry
- %7 = fcmp ogt float %1, %test_value ; [#uses=1]
- br i1 %7, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %8 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 14, i32 %limitIndex ; [#uses=1]
- store i32 2, i32* %8, align 4
- %9 = fsub float %test_value, %1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 12, i32 0, i32 %limitIndex ; [#uses=1]
- store float %9, float* %10, align 4
- ret i32 2
-
-bb3: ; preds = %bb1
- %11 = fcmp olt float %3, %test_value ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 14, i32 %limitIndex ; [#uses=2]
- br i1 %11, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- store i32 1, i32* %12, align 4
- %13 = fsub float %test_value, %3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 12, i32 0, i32 %limitIndex ; [#uses=1]
- store float %13, float* %14, align 4
- ret i32 1
-
-bb5: ; preds = %bb3
- store i32 0, i32* %12, align 4
- %15 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 12, i32 0, i32 %limitIndex ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- ret i32 0
-}
-
-; [#uses=0]
-define float @_ZN25btTranslationalLimitMotor15solveLinearAxisEffR11btRigidBodyRK9btVector3S1_S4_iS4_S4_(%struct.btTranslationalLimitMotor* nocapture %this, float %timeStep, float %jacDiagABInv, %struct.btRigidBody* %body1, %struct.btQuadWord* nocapture %pointInA, %struct.btRigidBody* %body2, %struct.btQuadWord* nocapture %pointInB, i32 %limit_index, %struct.btQuadWord* %axis_normal_on_a, %struct.btQuadWord* nocapture %anchorPos) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %anchorPos, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=4]
- %5 = getelementptr inbounds %struct.btQuadWord* %anchorPos, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btQuadWord* %anchorPos, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %1, %16 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %6, %19 ; [#uses=4]
- %21 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %11, %22 ; [#uses=4]
- %24 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fadd float %25, %27 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fadd float %35, %37 ; [#uses=2]
- %39 = fmul float %38, %9 ; [#uses=1]
- %40 = fmul float %33, %14 ; [#uses=1]
- %41 = fsub float %39, %40 ; [#uses=1]
- %42 = fmul float %28, %14 ; [#uses=1]
- %43 = fmul float %38, %4 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=1]
- %45 = fmul float %33, %4 ; [#uses=1]
- %46 = fmul float %28, %9 ; [#uses=1]
- %47 = fsub float %45, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fadd float %49, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = fadd float %54, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=1]
- %63 = fadd float %52, %41 ; [#uses=1]
- %64 = fadd float %57, %44 ; [#uses=1]
- %65 = fadd float %62, %47 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fadd float %67, %69 ; [#uses=2]
- %71 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fadd float %72, %74 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=2]
- %81 = fmul float %80, %20 ; [#uses=1]
- %82 = fmul float %75, %23 ; [#uses=1]
- %83 = fsub float %81, %82 ; [#uses=1]
- %84 = fmul float %70, %23 ; [#uses=1]
- %85 = fmul float %80, %17 ; [#uses=1]
- %86 = fsub float %84, %85 ; [#uses=1]
- %87 = fmul float %75, %17 ; [#uses=1]
- %88 = fmul float %70, %20 ; [#uses=1]
- %89 = fsub float %87, %88 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = fadd float %91, %93 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fadd float %96, %98 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %103 = load float* %102, align 4 ; [#uses=1]
- %104 = fadd float %101, %103 ; [#uses=1]
- %105 = fadd float %94, %83 ; [#uses=1]
- %106 = fadd float %99, %86 ; [#uses=1]
- %107 = fadd float %104, %89 ; [#uses=1]
- %108 = fsub float %63, %105 ; [#uses=1]
- %109 = fsub float %64, %106 ; [#uses=1]
- %110 = fsub float %65, %107 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btQuadWord* %axis_normal_on_a, i32 0, i32 0, i32 0 ; [#uses=3]
- %112 = load float* %111, align 4 ; [#uses=2]
- %113 = fmul float %112, %110 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btQuadWord* %axis_normal_on_a, i32 0, i32 0, i32 1 ; [#uses=3]
- %115 = load float* %114, align 4 ; [#uses=2]
- %116 = fmul float %115, %109 ; [#uses=1]
- %117 = fadd float %113, %116 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btQuadWord* %axis_normal_on_a, i32 0, i32 0, i32 2 ; [#uses=3]
- %119 = load float* %118, align 4 ; [#uses=2]
- %120 = fmul float %119, %108 ; [#uses=1]
- %121 = fadd float %117, %120 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btQuadWord* %pointInA, i32 0, i32 0, i32 2 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btQuadWord* %pointInB, i32 0, i32 0, i32 2 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=1]
- %126 = fsub float %123, %125 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btQuadWord* %pointInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btQuadWord* %pointInB, i32 0, i32 0, i32 1 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = fsub float %128, %130 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btQuadWord* %pointInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btQuadWord* %pointInB, i32 0, i32 0, i32 0 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = fsub float %133, %135 ; [#uses=1]
- %137 = fmul float %136, %112 ; [#uses=1]
- %138 = fmul float %131, %115 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %126, %119 ; [#uses=1]
- %141 = fadd float %139, %140 ; [#uses=1]
- %142 = fsub float -0.000000e+00, %141 ; [#uses=5]
- %143 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 0, i32 0, i32 %limit_index ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=3]
- %145 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 1, i32 0, i32 %limit_index ; [#uses=1]
- %146 = load float* %145, align 4 ; [#uses=3]
- %147 = fcmp olt float %144, %146 ; [#uses=1]
- br i1 %147, label %bb, label %bb5
-
-bb: ; preds = %entry
- %148 = fcmp olt float %146, %142 ; [#uses=1]
- br i1 %148, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %149 = fsub float %142, %146 ; [#uses=1]
- br label %bb5
-
-bb2: ; preds = %bb
- %150 = fcmp ogt float %144, %142 ; [#uses=1]
- br i1 %150, label %bb3, label %bb12
-
-bb3: ; preds = %bb2
- %151 = fsub float %142, %144 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb1, %entry
- %depth.0 = phi float [ %149, %bb1 ], [ %151, %bb3 ], [ %142, %entry ] ; [#uses=1]
- %lo.0 = phi float [ 0.000000e+00, %bb1 ], [ 0xC3ABC16D60000000, %bb3 ], [ 0xC3ABC16D60000000, %entry ] ; [#uses=1]
- %hi.0 = phi float [ 0x43ABC16D60000000, %bb1 ], [ 0.000000e+00, %bb3 ], [ 0x43ABC16D60000000, %entry ] ; [#uses=1]
- %152 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 3 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 5 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=1]
- %156 = fmul float %155, %depth.0 ; [#uses=1]
- %157 = fdiv float %156, %timeStep ; [#uses=1]
- %158 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 4 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fmul float %159, %121 ; [#uses=1]
- %161 = fsub float %157, %160 ; [#uses=1]
- %162 = fmul float %153, %161 ; [#uses=1]
- %163 = fmul float %162, %jacDiagABInv ; [#uses=1]
- %164 = getelementptr inbounds %struct.btTranslationalLimitMotor* %this, i32 0, i32 2, i32 0, i32 %limit_index ; [#uses=2]
- %165 = load float* %164, align 4 ; [#uses=2]
- %166 = fadd float %165, %163 ; [#uses=3]
- %167 = fcmp ule float %166, %hi.0 ; [#uses=1]
- br i1 %167, label %bb6, label %bb11
-
-bb6: ; preds = %bb5
- %168 = fcmp uge float %166, %lo.0 ; [#uses=1]
- %iftmp.212.0 = select i1 %168, float %166, float 0.000000e+00 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb6, %bb5
- %iftmp.211.0 = phi float [ %iftmp.212.0, %bb6 ], [ 0.000000e+00, %bb5 ] ; [#uses=2]
- store float %iftmp.211.0, float* %164, align 4
- %169 = fsub float %iftmp.211.0, %165 ; [#uses=9]
- %170 = load float* %114, align 4 ; [#uses=5]
- %171 = fmul float %14, %170 ; [#uses=1]
- %172 = load float* %111, align 4 ; [#uses=5]
- %173 = fmul float %9, %172 ; [#uses=1]
- %174 = fsub float %171, %173 ; [#uses=3]
- %175 = fmul float %4, %172 ; [#uses=1]
- %176 = load float* %118, align 4 ; [#uses=5]
- %177 = fmul float %14, %176 ; [#uses=1]
- %178 = fsub float %175, %177 ; [#uses=3]
- %179 = fmul float %9, %176 ; [#uses=1]
- %180 = fmul float %4, %170 ; [#uses=1]
- %181 = fsub float %179, %180 ; [#uses=3]
- %182 = fmul float %23, %170 ; [#uses=1]
- %183 = fmul float %20, %172 ; [#uses=1]
- %184 = fsub float %182, %183 ; [#uses=3]
- %185 = fmul float %17, %172 ; [#uses=1]
- %186 = fmul float %23, %176 ; [#uses=1]
- %187 = fsub float %185, %186 ; [#uses=3]
- %188 = fmul float %20, %176 ; [#uses=1]
- %189 = fmul float %17, %170 ; [#uses=1]
- %190 = fsub float %188, %189 ; [#uses=3]
- %191 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 4 ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=4]
- %193 = fcmp une float %192, 0.000000e+00 ; [#uses=1]
- br i1 %193, label %bb.i14, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit16
-
-bb.i14: ; preds = %bb11
- %194 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %201 = load float* %194, align 4 ; [#uses=1]
- %202 = load float* %195, align 4 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %204 = load float* %196, align 4 ; [#uses=1]
- %205 = load float* %197, align 4 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %207 = load float* %198, align 4 ; [#uses=1]
- %208 = load float* %199, align 4 ; [#uses=1]
- %209 = load float* %200, align 4 ; [#uses=1]
- %210 = fmul float %201, %178 ; [#uses=1]
- %211 = fmul float %202, %181 ; [#uses=1]
- %212 = load float* %203, align 4 ; [#uses=1]
- %213 = fmul float %204, %178 ; [#uses=1]
- %214 = fmul float %205, %181 ; [#uses=1]
- %215 = load float* %206, align 4 ; [#uses=1]
- %216 = fmul float %207, %178 ; [#uses=1]
- %217 = fmul float %208, %181 ; [#uses=1]
- %218 = fmul float %209, %174 ; [#uses=1]
- %219 = fadd float %211, %210 ; [#uses=1]
- %220 = fmul float %212, %174 ; [#uses=1]
- %221 = fadd float %214, %213 ; [#uses=1]
- %222 = fmul float %215, %174 ; [#uses=1]
- %223 = fadd float %217, %216 ; [#uses=1]
- %224 = fmul float %172, %192 ; [#uses=1]
- %225 = fmul float %170, %192 ; [#uses=1]
- %226 = fmul float %176, %192 ; [#uses=1]
- %227 = fadd float %219, %218 ; [#uses=1]
- %228 = fadd float %221, %220 ; [#uses=1]
- %229 = fadd float %223, %222 ; [#uses=1]
- %230 = fmul float %226, %169 ; [#uses=1]
- %231 = fmul float %225, %169 ; [#uses=1]
- %232 = fmul float %224, %169 ; [#uses=1]
- %233 = load float* %60, align 4 ; [#uses=1]
- %234 = fadd float %233, %232 ; [#uses=1]
- store float %234, float* %60, align 4
- %235 = load float* %55, align 4 ; [#uses=1]
- %236 = fadd float %235, %231 ; [#uses=1]
- store float %236, float* %55, align 4
- %237 = load float* %50, align 4 ; [#uses=1]
- %238 = fadd float %237, %230 ; [#uses=1]
- store float %238, float* %50, align 4
- %239 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %240 = load float* %239, align 4 ; [#uses=1]
- %241 = fmul float %240, %169 ; [#uses=1]
- %242 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %243 = load float* %242, align 4 ; [#uses=1]
- %244 = fmul float %243, %169 ; [#uses=1]
- %245 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %246 = load float* %245, align 4 ; [#uses=1]
- %247 = fmul float %246, %169 ; [#uses=1]
- %248 = fmul float %229, %241 ; [#uses=1]
- %249 = fmul float %228, %244 ; [#uses=1]
- %250 = fmul float %227, %247 ; [#uses=1]
- %251 = load float* %36, align 4 ; [#uses=1]
- %252 = fadd float %251, %250 ; [#uses=1]
- store float %252, float* %36, align 4
- %253 = load float* %31, align 4 ; [#uses=1]
- %254 = fadd float %253, %249 ; [#uses=1]
- store float %254, float* %31, align 4
- %255 = load float* %26, align 4 ; [#uses=1]
- %256 = fadd float %255, %248 ; [#uses=1]
- store float %256, float* %26, align 4
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit16
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit16: ; preds = %bb.i14, %bb11
- %257 = fsub float -0.000000e+00, %169 ; [#uses=6]
- %258 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 4 ; [#uses=1]
- %259 = load float* %258, align 4 ; [#uses=4]
- %260 = fcmp une float %259, 0.000000e+00 ; [#uses=1]
- br i1 %260, label %bb.i, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit
-
-bb.i: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit16
- %261 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %262 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %264 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %267 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %268 = load float* %261, align 4 ; [#uses=1]
- %269 = load float* %262, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %271 = load float* %263, align 4 ; [#uses=1]
- %272 = load float* %264, align 4 ; [#uses=1]
- %273 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %274 = load float* %265, align 4 ; [#uses=1]
- %275 = load float* %266, align 4 ; [#uses=1]
- %276 = load float* %267, align 4 ; [#uses=1]
- %277 = fmul float %268, %187 ; [#uses=1]
- %278 = fmul float %269, %190 ; [#uses=1]
- %279 = load float* %270, align 4 ; [#uses=1]
- %280 = fmul float %271, %187 ; [#uses=1]
- %281 = fmul float %272, %190 ; [#uses=1]
- %282 = load float* %273, align 4 ; [#uses=1]
- %283 = fmul float %274, %187 ; [#uses=1]
- %284 = fmul float %275, %190 ; [#uses=1]
- %285 = load float* %111, align 4 ; [#uses=1]
- %286 = load float* %114, align 4 ; [#uses=1]
- %287 = load float* %118, align 4 ; [#uses=1]
- %288 = fmul float %276, %184 ; [#uses=1]
- %289 = fadd float %278, %277 ; [#uses=1]
- %290 = fmul float %279, %184 ; [#uses=1]
- %291 = fadd float %281, %280 ; [#uses=1]
- %292 = fmul float %282, %184 ; [#uses=1]
- %293 = fadd float %284, %283 ; [#uses=1]
- %294 = fmul float %285, %259 ; [#uses=1]
- %295 = fmul float %286, %259 ; [#uses=1]
- %296 = fmul float %287, %259 ; [#uses=1]
- %297 = fadd float %289, %288 ; [#uses=1]
- %298 = fadd float %291, %290 ; [#uses=1]
- %299 = fadd float %293, %292 ; [#uses=1]
- %300 = fmul float %296, %257 ; [#uses=1]
- %301 = fmul float %295, %257 ; [#uses=1]
- %302 = fmul float %294, %257 ; [#uses=1]
- %303 = load float* %102, align 4 ; [#uses=1]
- %304 = fadd float %303, %302 ; [#uses=1]
- store float %304, float* %102, align 4
- %305 = load float* %97, align 4 ; [#uses=1]
- %306 = fadd float %305, %301 ; [#uses=1]
- store float %306, float* %97, align 4
- %307 = load float* %92, align 4 ; [#uses=1]
- %308 = fadd float %307, %300 ; [#uses=1]
- store float %308, float* %92, align 4
- %309 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %310 = load float* %309, align 4 ; [#uses=1]
- %311 = fmul float %310, %257 ; [#uses=1]
- %312 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %313 = load float* %312, align 4 ; [#uses=1]
- %314 = fmul float %313, %257 ; [#uses=1]
- %315 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %316 = load float* %315, align 4 ; [#uses=1]
- %317 = fmul float %316, %257 ; [#uses=1]
- %318 = fmul float %299, %311 ; [#uses=1]
- %319 = fmul float %298, %314 ; [#uses=1]
- %320 = fmul float %297, %317 ; [#uses=1]
- %321 = load float* %78, align 4 ; [#uses=1]
- %322 = fadd float %321, %320 ; [#uses=1]
- store float %322, float* %78, align 4
- %323 = load float* %73, align 4 ; [#uses=1]
- %324 = fadd float %323, %319 ; [#uses=1]
- store float %324, float* %73, align 4
- %325 = load float* %68, align 4 ; [#uses=1]
- %326 = fadd float %325, %318 ; [#uses=1]
- store float %326, float* %68, align 4
- ret float %169
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit16
- ret float %169
-
-bb12: ; preds = %bb2
- ret float 0.000000e+00
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint19buildLinearJacobianER15btJacobianEntryRK9btVector3S4_S4_(%struct.btGeneric6DofConstraint* nocapture %this, %struct.btJacobianEntry* %jacLinear, %struct.btQuadWord* nocapture %normalWorld, %struct.btQuadWord* nocapture %pivotAInW, %struct.btQuadWord* nocapture %pivotBInW) nounwind align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %3 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %4 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %5 = load %struct.btRigidBody** %4, align 4 ; [#uses=14]
- %6 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %15, float* %16, align 8
- %17 = load float* %13, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %17, float* %18, align 4
- %19 = load float* %12, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %20, align 8
- %21 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = load float* %11, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %22, float* %23, align 8
- %24 = load float* %10, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %24, float* %25, align 4
- %26 = load float* %9, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %26, float* %27, align 8
- %28 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- %29 = load float* %8, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %29, float* %30, align 8
- %31 = load float* %7, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %31, float* %32, align 4
- %33 = load float* %6, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %33, float* %34, align 8
- %35 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %37 = load %struct.btRigidBody** %36, align 4 ; [#uses=14]
- %38 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %47, float* %48, align 8
- %49 = load float* %45, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %49, float* %50, align 4
- %51 = load float* %44, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %51, float* %52, align 8
- %53 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 4
- %54 = load float* %43, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %54, float* %55, align 8
- %56 = load float* %42, align 4 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = load float* %41, align 4 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %58, float* %59, align 8
- %60 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- %61 = load float* %40, align 4 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %61, float* %62, align 8
- %63 = load float* %39, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %63, float* %64, align 4
- %65 = load float* %38, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %65, float* %66, align 8
- %67 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- %68 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = fsub float %69, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 1 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fsub float %74, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 0 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = fsub float %79, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %82, float* %83, align 8
- %84 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %77, float* %84, align 4
- %85 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %72, float* %85, align 8
- %86 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %86, align 4
- %87 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 2 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = fsub float %88, %90 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 1 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fsub float %93, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 0 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=1]
- %101 = fsub float %98, %100 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %101, float* %102, align 8
- %103 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %96, float* %103, align 4
- %104 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %91, float* %104, align 8
- %105 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %105, align 4
- %106 = icmp eq %struct.btJacobianEntry* %jacLinear, null ; [#uses=1]
- br i1 %106, label %bb1, label %bb
-
-bb: ; preds = %entry
- %107 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 4 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 4 ; [#uses=1]
- %109 = load float* %107, align 4 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 8 ; [#uses=1]
- %111 = load float* %108, align 4 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 8 ; [#uses=1]
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %jacLinear, %struct.btMatrix3x3* %3, %struct.btMatrix3x3* %2, %struct.btQuadWord* %1, %struct.btQuadWord* %0, %struct.btQuadWord* %normalWorld, %struct.btQuadWord* %112, float %111, %struct.btQuadWord* %110, float %109) nounwind
- ret void
-
-bb1: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint20buildAngularJacobianER15btJacobianEntryRK9btVector3(%struct.btGeneric6DofConstraint* nocapture %this, %struct.btJacobianEntry* %jacAngular, %struct.btQuadWord* nocapture %jointAxisW) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=12]
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %3 = load %struct.btRigidBody** %2, align 4 ; [#uses=12]
- %4 = icmp eq %struct.btJacobianEntry* %jacAngular, null ; [#uses=1]
- br i1 %4, label %bb1, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %13, align 4 ; [#uses=1]
- %24 = load float* %12, align 4 ; [#uses=1]
- %25 = load float* %11, align 4 ; [#uses=1]
- %26 = load float* %10, align 4 ; [#uses=1]
- %27 = load float* %9, align 4 ; [#uses=1]
- %28 = load float* %8, align 4 ; [#uses=1]
- %29 = load float* %7, align 4 ; [#uses=1]
- %30 = load float* %6, align 4 ; [#uses=1]
- %31 = load float* %5, align 4 ; [#uses=1]
- %32 = load float* %22, align 4 ; [#uses=1]
- %33 = load float* %21, align 4 ; [#uses=1]
- %34 = load float* %20, align 4 ; [#uses=1]
- %35 = load float* %19, align 4 ; [#uses=1]
- %36 = load float* %18, align 4 ; [#uses=1]
- %37 = load float* %17, align 4 ; [#uses=1]
- %38 = load float* %16, align 4 ; [#uses=1]
- %39 = load float* %15, align 4 ; [#uses=1]
- %40 = load float* %14, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 4
- %43 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- %44 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- %45 = getelementptr inbounds %struct.btQuadWord* %jointAxisW, i32 0, i32 0, i32 0 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=3]
- %47 = fmul float %34, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %jointAxisW, i32 0, i32 0, i32 1 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=3]
- %50 = fmul float %33, %49 ; [#uses=1]
- %51 = fadd float %47, %50 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btQuadWord* %jointAxisW, i32 0, i32 0, i32 2 ; [#uses=2]
- %53 = load float* %52, align 4 ; [#uses=3]
- %54 = fmul float %32, %53 ; [#uses=1]
- %55 = fadd float %51, %54 ; [#uses=3]
- %56 = fmul float %37, %46 ; [#uses=1]
- %57 = fmul float %36, %49 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=1]
- %59 = fmul float %35, %53 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=3]
- %61 = fmul float %40, %46 ; [#uses=1]
- %62 = fmul float %39, %49 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fmul float %38, %53 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=3]
- %66 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %65, float* %66, align 4
- %67 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %60, float* %67, align 4
- %68 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %55, float* %68, align 4
- %69 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %69, align 4
- %70 = load float* %52, align 4 ; [#uses=1]
- %71 = fsub float -0.000000e+00, %70 ; [#uses=3]
- %72 = load float* %48, align 4 ; [#uses=1]
- %73 = fsub float -0.000000e+00, %72 ; [#uses=3]
- %74 = load float* %45, align 4 ; [#uses=1]
- %75 = fsub float -0.000000e+00, %74 ; [#uses=3]
- %76 = fmul float %25, %75 ; [#uses=1]
- %77 = fmul float %24, %73 ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=1]
- %79 = fmul float %23, %71 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=3]
- %81 = fmul float %28, %75 ; [#uses=1]
- %82 = fmul float %27, %73 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = fmul float %26, %71 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=3]
- %86 = fmul float %31, %75 ; [#uses=1]
- %87 = fmul float %30, %73 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=1]
- %89 = fmul float %29, %71 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=3]
- %91 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %90, float* %91, align 4
- %92 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %85, float* %92, align 4
- %93 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %80, float* %93, align 4
- %94 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %94, align 4
- %95 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = fmul float %96, %55 ; [#uses=2]
- %98 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fmul float %99, %60 ; [#uses=2]
- %101 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fmul float %102, %65 ; [#uses=2]
- %104 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %103, float* %104, align 4
- %105 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %100, float* %105, align 4
- %106 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %97, float* %106, align 4
- %107 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %80 ; [#uses=2]
- %111 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fmul float %112, %85 ; [#uses=2]
- %114 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = fmul float %115, %90 ; [#uses=2]
- %117 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %116, float* %117, align 4
- %118 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %113, float* %118, align 4
- %119 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %110, float* %119, align 4
- %120 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %120, align 4
- %121 = fmul float %103, %65 ; [#uses=1]
- %122 = fmul float %100, %60 ; [#uses=1]
- %123 = fadd float %121, %122 ; [#uses=1]
- %124 = fmul float %97, %55 ; [#uses=1]
- %125 = fadd float %123, %124 ; [#uses=1]
- %126 = fmul float %116, %90 ; [#uses=1]
- %127 = fmul float %113, %85 ; [#uses=1]
- %128 = fadd float %126, %127 ; [#uses=1]
- %129 = fmul float %110, %80 ; [#uses=1]
- %130 = fadd float %128, %129 ; [#uses=1]
- %131 = fadd float %125, %130 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btJacobianEntry* %jacAngular, i32 0, i32 5 ; [#uses=1]
- store float %131, float* %132, align 4
- ret void
-
-bb1: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btGeneric6DofConstraint18getInfo1NonVirtualEPN17btTypedConstraint17btConstraintInfo1E(%struct.btGeneric6DofConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 20 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=2]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- store i32 6, i32* %2, align 4
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %4, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btGeneric6DofConstraint9updateRHSEf(%struct.btGeneric6DofConstraint* nocapture %this, float %timeStep) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK23btGeneric6DofConstraint7getAxisEi(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btGeneric6DofConstraint* nocapture %this, i32 %axis_index) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %axis_index, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %axis_index, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %axis_index, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %axis_index, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=0]
-define float @_ZNK23btGeneric6DofConstraint24getRelativePivotPositionEi(%struct.btGeneric6DofConstraint* nocapture %this, i32 %axisIndex) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 12, i32 0, i32 %axisIndex ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=2]
-define float @_ZNK23btGeneric6DofConstraint8getAngleEi(%struct.btGeneric6DofConstraint* nocapture %this, i32 %axisIndex) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 10, i32 0, i32 %axisIndex ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint13calcAnchorPosEv(%struct.btGeneric6DofConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 4 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %5 = load %struct.btRigidBody** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 4 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fcmp oeq float %7, 0.000000e+00 ; [#uses=1]
- br i1 %8, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %9 = fadd float %3, %7 ; [#uses=1]
- %10 = fdiv float %3, %9 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %entry
- %storemerge = phi float [ %10, %bb1 ], [ 1.000000e+00, %entry ] ; [#uses=4]
- %11 = fsub float 1.000000e+00, %storemerge ; [#uses=3]
- %12 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %13, %11 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %16, %11 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fmul float %19, %11 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %22, %storemerge ; [#uses=1]
- %24 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fmul float %25, %storemerge ; [#uses=1]
- %27 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %28, %storemerge ; [#uses=1]
- %30 = fadd float %23, %14 ; [#uses=1]
- %31 = fadd float %26, %17 ; [#uses=1]
- %32 = fadd float %29, %20 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- store float %32, float* %33, align 4
- %34 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- store float %31, float* %34, align 4
- %35 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- store float %30, float* %35, align 4
- %36 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint19calculateLinearInfoEv(%struct.btGeneric6DofConstraint* nocapture %this) nounwind align 2 {
-bb.nph:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %1, %3 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float %6, %8 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fsub float %11, %13 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 12, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 12, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 12, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 12, i32 0, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=4]
- %21 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=4]
- %23 = fmul float %20, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=4]
- %28 = fmul float %25, %27 ; [#uses=1]
- %29 = fsub float %23, %28 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=4]
- %32 = fmul float %31, %27 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=4]
- %35 = fmul float %20, %34 ; [#uses=1]
- %36 = fsub float %32, %35 ; [#uses=2]
- %37 = fmul float %25, %34 ; [#uses=1]
- %38 = fmul float %31, %22 ; [#uses=1]
- %39 = fsub float %37, %38 ; [#uses=2]
- %40 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=5]
- %42 = fmul float %41, %39 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=5]
- %45 = fmul float %44, %36 ; [#uses=1]
- %46 = fadd float %42, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=5]
- %49 = fmul float %48, %29 ; [#uses=1]
- %50 = fadd float %46, %49 ; [#uses=1]
- %51 = fdiv float 1.000000e+00, %50 ; [#uses=9]
- %52 = fmul float %41, %25 ; [#uses=1]
- %53 = fmul float %44, %20 ; [#uses=1]
- %54 = fsub float %52, %53 ; [#uses=1]
- %55 = fmul float %54, %51 ; [#uses=1]
- %56 = fmul float %44, %27 ; [#uses=1]
- %57 = fmul float %41, %22 ; [#uses=1]
- %58 = fsub float %56, %57 ; [#uses=1]
- %59 = fmul float %58, %51 ; [#uses=1]
- %60 = fmul float %29, %51 ; [#uses=1]
- %61 = fmul float %48, %20 ; [#uses=1]
- %62 = fmul float %41, %31 ; [#uses=1]
- %63 = fsub float %61, %62 ; [#uses=1]
- %64 = fmul float %63, %51 ; [#uses=1]
- %65 = fmul float %41, %34 ; [#uses=1]
- %66 = fmul float %48, %27 ; [#uses=1]
- %67 = fsub float %65, %66 ; [#uses=1]
- %68 = fmul float %67, %51 ; [#uses=1]
- %69 = fmul float %36, %51 ; [#uses=1]
- %70 = fmul float %44, %31 ; [#uses=1]
- %71 = fmul float %48, %25 ; [#uses=1]
- %72 = fsub float %70, %71 ; [#uses=1]
- %73 = fmul float %72, %51 ; [#uses=1]
- %74 = fmul float %48, %22 ; [#uses=1]
- %75 = fmul float %44, %34 ; [#uses=1]
- %76 = fsub float %74, %75 ; [#uses=1]
- %77 = fmul float %76, %51 ; [#uses=1]
- %78 = fmul float %39, %51 ; [#uses=1]
- %79 = fmul float %60, %14 ; [#uses=1]
- %80 = fmul float %59, %9 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = fmul float %55, %4 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=6]
- %84 = fmul float %69, %14 ; [#uses=1]
- %85 = fmul float %68, %9 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = fmul float %64, %4 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=6]
- %89 = fmul float %78, %14 ; [#uses=1]
- %90 = fmul float %77, %9 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %73, %4 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=6]
- store float %93, float* %15, align 4
- store float %88, float* %16, align 4
- store float %83, float* %17, align 4
- store float 0.000000e+00, float* %18, align 4
- %scevgep11 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 13, i32 0, i32 0 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep13 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 14, i32 0 ; [#uses=4]
- %scevgep15 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 12, i32 0, i32 0 ; [#uses=4]
- store float %93, float* %scevgep11, align 4
- %94 = load float* %scevgep12, align 4 ; [#uses=3]
- %95 = load float* %scevgep13, align 4 ; [#uses=3]
- %96 = fcmp ogt float %94, %95 ; [#uses=1]
- br i1 %96, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb.nph
- store i32 0, i32* %scevgep14, align 4
- store float 0.000000e+00, float* %scevgep15, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit
-
-bb1.i: ; preds = %bb.nph
- %97 = fcmp ogt float %94, %93 ; [#uses=1]
- br i1 %97, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb1.i
- store i32 2, i32* %scevgep14, align 4
- %98 = fsub float %93, %94 ; [#uses=1]
- store float %98, float* %scevgep15, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit
-
-bb3.i: ; preds = %bb1.i
- %99 = fcmp olt float %95, %93 ; [#uses=1]
- br i1 %99, label %bb4.i, label %bb5.i
-
-bb4.i: ; preds = %bb3.i
- store i32 1, i32* %scevgep14, align 4
- %100 = fsub float %93, %95 ; [#uses=1]
- store float %100, float* %scevgep15, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit
-
-bb5.i: ; preds = %bb3.i
- store i32 0, i32* %scevgep14, align 4
- store float 0.000000e+00, float* %scevgep15, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit
-
-_ZN25btTranslationalLimitMotor14testLimitValueEif.exit: ; preds = %bb5.i, %bb4.i, %bb2.i, %bb.i
- %scevgep11.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 13, i32 0, i32 1 ; [#uses=1]
- %scevgep12.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep13.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep14.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 14, i32 1 ; [#uses=4]
- %scevgep15.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 12, i32 0, i32 1 ; [#uses=4]
- store float %88, float* %scevgep11.1, align 4
- %101 = load float* %scevgep12.1, align 4 ; [#uses=3]
- %102 = load float* %scevgep13.1, align 4 ; [#uses=3]
- %103 = fcmp ogt float %101, %102 ; [#uses=1]
- br i1 %103, label %bb.i.1, label %bb1.i.1
-
-_ZN25btTranslationalLimitMotor14testLimitValueEif.exit.1: ; preds = %bb.i.1, %bb2.i.1, %bb4.i.1, %bb5.i.1
- %scevgep11.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 13, i32 0, i32 2 ; [#uses=1]
- %scevgep12.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep13.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep14.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 14, i32 2 ; [#uses=4]
- %scevgep15.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 12, i32 0, i32 2 ; [#uses=4]
- store float %83, float* %scevgep11.2, align 4
- %104 = load float* %scevgep12.2, align 4 ; [#uses=3]
- %105 = load float* %scevgep13.2, align 4 ; [#uses=3]
- %106 = fcmp ogt float %104, %105 ; [#uses=1]
- br i1 %106, label %bb.i.2, label %bb1.i.2
-
-bb5.i.1: ; preds = %bb3.i.1
- store i32 0, i32* %scevgep14.1, align 4
- store float 0.000000e+00, float* %scevgep15.1, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit.1
-
-bb3.i.1: ; preds = %bb1.i.1
- %107 = fcmp olt float %102, %88 ; [#uses=1]
- br i1 %107, label %bb4.i.1, label %bb5.i.1
-
-bb1.i.1: ; preds = %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit
- %108 = fcmp ogt float %101, %88 ; [#uses=1]
- br i1 %108, label %bb2.i.1, label %bb3.i.1
-
-bb4.i.1: ; preds = %bb3.i.1
- store i32 1, i32* %scevgep14.1, align 4
- %109 = fsub float %88, %102 ; [#uses=1]
- store float %109, float* %scevgep15.1, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit.1
-
-bb2.i.1: ; preds = %bb1.i.1
- store i32 2, i32* %scevgep14.1, align 4
- %110 = fsub float %88, %101 ; [#uses=1]
- store float %110, float* %scevgep15.1, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit.1
-
-bb.i.1: ; preds = %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit
- store i32 0, i32* %scevgep14.1, align 4
- store float 0.000000e+00, float* %scevgep15.1, align 4
- br label %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit.1
-
-bb5.i.2: ; preds = %bb3.i.2
- store i32 0, i32* %scevgep14.2, align 4
- store float 0.000000e+00, float* %scevgep15.2, align 4
- ret void
-
-bb3.i.2: ; preds = %bb1.i.2
- %111 = fcmp olt float %105, %83 ; [#uses=1]
- br i1 %111, label %bb4.i.2, label %bb5.i.2
-
-bb1.i.2: ; preds = %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit.1
- %112 = fcmp ogt float %104, %83 ; [#uses=1]
- br i1 %112, label %bb2.i.2, label %bb3.i.2
-
-bb4.i.2: ; preds = %bb3.i.2
- store i32 1, i32* %scevgep14.2, align 4
- %113 = fsub float %83, %105 ; [#uses=1]
- store float %113, float* %scevgep15.2, align 4
- ret void
-
-bb2.i.2: ; preds = %bb1.i.2
- store i32 2, i32* %scevgep14.2, align 4
- %114 = fsub float %83, %104 ; [#uses=1]
- store float %114, float* %scevgep15.2, align 4
- ret void
-
-bb.i.2: ; preds = %_ZN25btTranslationalLimitMotor14testLimitValueEif.exit.1
- store i32 0, i32* %scevgep14.2, align 4
- store float 0.000000e+00, float* %scevgep15.2, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint8setParamEifi(%struct.btGeneric6DofConstraint* nocapture %this, i32 %num, float %value, i32 %axis) nounwind align 2 {
-entry:
- %0 = icmp ult i32 %axis, 3 ; [#uses=1]
- br i1 %0, label %bb, label %bb4
-
-bb: ; preds = %entry
- switch i32 %num, label %return [
- i32 2, label %bb1
- i32 3, label %bb3
- i32 4, label %bb2
- ]
-
-bb1: ; preds = %bb
- %1 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 %axis ; [#uses=1]
- store float %value, float* %1, align 4
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = mul nsw i32 %axis, 3 ; [#uses=1]
- %5 = shl i32 4, %4 ; [#uses=1]
- %6 = or i32 %3, %5 ; [#uses=1]
- store i32 %6, i32* %2, align 4
- ret void
-
-bb2: ; preds = %bb
- %7 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 %axis ; [#uses=1]
- store float %value, float* %7, align 4
- %8 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=2]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = mul nsw i32 %axis, 3 ; [#uses=1]
- %11 = shl i32 2, %10 ; [#uses=1]
- %12 = or i32 %9, %11 ; [#uses=1]
- store i32 %12, i32* %8, align 4
- ret void
-
-bb3: ; preds = %bb
- %13 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 %axis ; [#uses=1]
- store float %value, float* %13, align 4
- %14 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=2]
- %15 = load i32* %14, align 4 ; [#uses=1]
- %16 = mul nsw i32 %axis, 3 ; [#uses=1]
- %17 = shl i32 1, %16 ; [#uses=1]
- %18 = or i32 %15, %17 ; [#uses=1]
- store i32 %18, i32* %14, align 4
- ret void
-
-bb4: ; preds = %entry
- %19 = add i32 %axis, -3 ; [#uses=4]
- %20 = icmp ult i32 %19, 3 ; [#uses=1]
- br i1 %20, label %bb5, label %return
-
-bb5: ; preds = %bb4
- switch i32 %num, label %return [
- i32 2, label %bb6
- i32 3, label %bb8
- i32 4, label %bb7
- ]
-
-bb6: ; preds = %bb5
- %21 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %19, i32 8 ; [#uses=1]
- store float %value, float* %21, align 4
- %22 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=2]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = mul nsw i32 %axis, 3 ; [#uses=1]
- %25 = shl i32 4, %24 ; [#uses=1]
- %26 = or i32 %23, %25 ; [#uses=1]
- store i32 %26, i32* %22, align 4
- ret void
-
-bb7: ; preds = %bb5
- %27 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %19, i32 9 ; [#uses=1]
- store float %value, float* %27, align 4
- %28 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=2]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %30 = mul nsw i32 %axis, 3 ; [#uses=1]
- %31 = shl i32 2, %30 ; [#uses=1]
- %32 = or i32 %29, %31 ; [#uses=1]
- store i32 %32, i32* %28, align 4
- ret void
-
-bb8: ; preds = %bb5
- %33 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %19, i32 7 ; [#uses=1]
- store float %value, float* %33, align 4
- %34 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=2]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = mul nsw i32 %axis, 3 ; [#uses=1]
- %37 = shl i32 1, %36 ; [#uses=1]
- %38 = or i32 %35, %37 ; [#uses=1]
- store i32 %38, i32* %34, align 4
- ret void
-
-return: ; preds = %bb5, %bb4, %bb
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK23btGeneric6DofConstraint8getParamEii(%struct.btGeneric6DofConstraint* nocapture %this, i32 %num, i32 %axis) nounwind readonly align 2 {
-entry:
- %0 = icmp ult i32 %axis, 3 ; [#uses=1]
- br i1 %0, label %bb, label %bb4
-
-bb: ; preds = %entry
- switch i32 %num, label %bb9 [
- i32 2, label %bb1
- i32 3, label %bb3
- i32 4, label %bb2
- ]
-
-bb1: ; preds = %bb
- %1 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 %axis ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- ret float %2
-
-bb2: ; preds = %bb
- %3 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 %axis ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- ret float %4
-
-bb3: ; preds = %bb
- %5 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 %axis ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- ret float %6
-
-bb4: ; preds = %entry
- %7 = add i32 %axis, -3 ; [#uses=4]
- %8 = icmp ult i32 %7, 3 ; [#uses=1]
- br i1 %8, label %bb5, label %bb9
-
-bb5: ; preds = %bb4
- switch i32 %num, label %bb9 [
- i32 2, label %bb6
- i32 3, label %bb8
- i32 4, label %bb7
- ]
-
-bb6: ; preds = %bb5
- %9 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %7, i32 8 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- ret float %10
-
-bb7: ; preds = %bb5
- %11 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %7, i32 9 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- ret float %12
-
-bb8: ; preds = %bb5
- %13 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %7, i32 7 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- ret float %14
-
-bb9: ; preds = %bb5, %bb4, %bb
- ret float 0.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK23btGeneric6DofConstraint9serializeEPvP12btSerializer(%struct.btGeneric6DofConstraint* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer(%struct.btTypedConstraint* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %scevgep.i.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %scevgep.1.i.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i = getelementptr i8* %dataBuffer, i32 48 ; [#uses=1]
- %3 = bitcast i8* %scevgep4.1.i.i.i to float* ; [#uses=1]
- %scevgep.2.i.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i = getelementptr i8* %dataBuffer, i32 52 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.2.i.i.i to float* ; [#uses=1]
- %scevgep.3.i.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i = getelementptr i8* %dataBuffer, i32 56 ; [#uses=1]
- %5 = bitcast i8* %scevgep4.3.i.i.i to float* ; [#uses=1]
- %6 = load float* %scevgep.i.i.i, align 4 ; [#uses=1]
- store float %6, float* %scevgep4.i.i.i, align 4
- %7 = load float* %scevgep.1.i.i.i, align 4 ; [#uses=1]
- store float %7, float* %3, align 4
- %8 = load float* %scevgep.2.i.i.i, align 4 ; [#uses=1]
- store float %8, float* %4, align 4
- %9 = load float* %scevgep.3.i.i.i, align 4 ; [#uses=1]
- store float %9, float* %5, align 4
- %scevgep.i.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i = getelementptr i8* %dataBuffer, i32 60 ; [#uses=1]
- %10 = bitcast i8* %scevgep4.i.1.i.i to float* ; [#uses=1]
- %scevgep.1.i.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i = getelementptr i8* %dataBuffer, i32 64 ; [#uses=1]
- %11 = bitcast i8* %scevgep4.1.i.1.i.i to float* ; [#uses=1]
- %scevgep.2.i.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i = getelementptr i8* %dataBuffer, i32 68 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.2.i.1.i.i to float* ; [#uses=1]
- %scevgep.3.i.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i = getelementptr i8* %dataBuffer, i32 72 ; [#uses=1]
- %13 = bitcast i8* %scevgep4.3.i.1.i.i to float* ; [#uses=1]
- %14 = load float* %scevgep.i.1.i.i, align 4 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = load float* %scevgep.1.i.1.i.i, align 4 ; [#uses=1]
- store float %15, float* %11, align 4
- %16 = load float* %scevgep.2.i.1.i.i, align 4 ; [#uses=1]
- store float %16, float* %12, align 4
- %17 = load float* %scevgep.3.i.1.i.i, align 4 ; [#uses=1]
- store float %17, float* %13, align 4
- %scevgep.i.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i = getelementptr i8* %dataBuffer, i32 76 ; [#uses=1]
- %18 = bitcast i8* %scevgep4.i.2.i.i to float* ; [#uses=1]
- %scevgep.1.i.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i = getelementptr i8* %dataBuffer, i32 80 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.1.i.2.i.i to float* ; [#uses=1]
- %scevgep.2.i.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i = getelementptr i8* %dataBuffer, i32 84 ; [#uses=1]
- %20 = bitcast i8* %scevgep4.2.i.2.i.i to float* ; [#uses=1]
- %scevgep.3.i.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i = getelementptr i8* %dataBuffer, i32 88 ; [#uses=1]
- %21 = bitcast i8* %scevgep4.3.i.2.i.i to float* ; [#uses=1]
- %22 = load float* %scevgep.i.2.i.i, align 4 ; [#uses=1]
- store float %22, float* %18, align 4
- %23 = load float* %scevgep.1.i.2.i.i, align 4 ; [#uses=1]
- store float %23, float* %19, align 4
- %24 = load float* %scevgep.2.i.2.i.i, align 4 ; [#uses=1]
- store float %24, float* %20, align 4
- %25 = load float* %scevgep.3.i.2.i.i, align 4 ; [#uses=1]
- store float %25, float* %21, align 4
- %scevgep.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = getelementptr i8* %dataBuffer, i32 92 ; [#uses=1]
- %26 = bitcast i8* %scevgep4.i.i to float* ; [#uses=1]
- %27 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %27, float* %26, align 4
- %scevgep.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 96 ; [#uses=1]
- %28 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %29 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %29, float* %28, align 4
- %scevgep.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 100 ; [#uses=1]
- %30 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %31 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %31, float* %30, align 4
- %scevgep.3.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 104 ; [#uses=1]
- %32 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %33 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %33, float* %32, align 4
- %34 = getelementptr inbounds i8* %dataBuffer, i32 108 ; [#uses=1]
- %scevgep.i.i.i11 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i12 = bitcast i8* %34 to float* ; [#uses=1]
- %scevgep.1.i.i.i13 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i14 = getelementptr i8* %dataBuffer, i32 112 ; [#uses=1]
- %35 = bitcast i8* %scevgep4.1.i.i.i14 to float* ; [#uses=1]
- %scevgep.2.i.i.i15 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i16 = getelementptr i8* %dataBuffer, i32 116 ; [#uses=1]
- %36 = bitcast i8* %scevgep4.2.i.i.i16 to float* ; [#uses=1]
- %scevgep.3.i.i.i17 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i18 = getelementptr i8* %dataBuffer, i32 120 ; [#uses=1]
- %37 = bitcast i8* %scevgep4.3.i.i.i18 to float* ; [#uses=1]
- %38 = load float* %scevgep.i.i.i11, align 4 ; [#uses=1]
- store float %38, float* %scevgep4.i.i.i12, align 4
- %39 = load float* %scevgep.1.i.i.i13, align 4 ; [#uses=1]
- store float %39, float* %35, align 4
- %40 = load float* %scevgep.2.i.i.i15, align 4 ; [#uses=1]
- store float %40, float* %36, align 4
- %41 = load float* %scevgep.3.i.i.i17, align 4 ; [#uses=1]
- store float %41, float* %37, align 4
- %scevgep.i.1.i.i19 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i20 = getelementptr i8* %dataBuffer, i32 124 ; [#uses=1]
- %42 = bitcast i8* %scevgep4.i.1.i.i20 to float* ; [#uses=1]
- %scevgep.1.i.1.i.i21 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i22 = getelementptr i8* %dataBuffer, i32 128 ; [#uses=1]
- %43 = bitcast i8* %scevgep4.1.i.1.i.i22 to float* ; [#uses=1]
- %scevgep.2.i.1.i.i23 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i24 = getelementptr i8* %dataBuffer, i32 132 ; [#uses=1]
- %44 = bitcast i8* %scevgep4.2.i.1.i.i24 to float* ; [#uses=1]
- %scevgep.3.i.1.i.i25 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i26 = getelementptr i8* %dataBuffer, i32 136 ; [#uses=1]
- %45 = bitcast i8* %scevgep4.3.i.1.i.i26 to float* ; [#uses=1]
- %46 = load float* %scevgep.i.1.i.i19, align 4 ; [#uses=1]
- store float %46, float* %42, align 4
- %47 = load float* %scevgep.1.i.1.i.i21, align 4 ; [#uses=1]
- store float %47, float* %43, align 4
- %48 = load float* %scevgep.2.i.1.i.i23, align 4 ; [#uses=1]
- store float %48, float* %44, align 4
- %49 = load float* %scevgep.3.i.1.i.i25, align 4 ; [#uses=1]
- store float %49, float* %45, align 4
- %scevgep.i.2.i.i27 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i28 = getelementptr i8* %dataBuffer, i32 140 ; [#uses=1]
- %50 = bitcast i8* %scevgep4.i.2.i.i28 to float* ; [#uses=1]
- %scevgep.1.i.2.i.i29 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i30 = getelementptr i8* %dataBuffer, i32 144 ; [#uses=1]
- %51 = bitcast i8* %scevgep4.1.i.2.i.i30 to float* ; [#uses=1]
- %scevgep.2.i.2.i.i31 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i32 = getelementptr i8* %dataBuffer, i32 148 ; [#uses=1]
- %52 = bitcast i8* %scevgep4.2.i.2.i.i32 to float* ; [#uses=1]
- %scevgep.3.i.2.i.i33 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i34 = getelementptr i8* %dataBuffer, i32 152 ; [#uses=1]
- %53 = bitcast i8* %scevgep4.3.i.2.i.i34 to float* ; [#uses=1]
- %54 = load float* %scevgep.i.2.i.i27, align 4 ; [#uses=1]
- store float %54, float* %50, align 4
- %55 = load float* %scevgep.1.i.2.i.i29, align 4 ; [#uses=1]
- store float %55, float* %51, align 4
- %56 = load float* %scevgep.2.i.2.i.i31, align 4 ; [#uses=1]
- store float %56, float* %52, align 4
- %57 = load float* %scevgep.3.i.2.i.i33, align 4 ; [#uses=1]
- store float %57, float* %53, align 4
- %scevgep.i.i35 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i36 = getelementptr i8* %dataBuffer, i32 156 ; [#uses=1]
- %58 = bitcast i8* %scevgep4.i.i36 to float* ; [#uses=1]
- %59 = load float* %scevgep.i.i35, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %scevgep.1.i.i37 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i38 = getelementptr i8* %dataBuffer, i32 160 ; [#uses=1]
- %60 = bitcast i8* %scevgep4.1.i.i38 to float* ; [#uses=1]
- %61 = load float* %scevgep.1.i.i37, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %scevgep.2.i.i39 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i40 = getelementptr i8* %dataBuffer, i32 164 ; [#uses=1]
- %62 = bitcast i8* %scevgep4.2.i.i40 to float* ; [#uses=1]
- %63 = load float* %scevgep.2.i.i39, align 4 ; [#uses=1]
- store float %63, float* %62, align 4
- %scevgep.3.i.i41 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i42 = getelementptr i8* %dataBuffer, i32 168 ; [#uses=1]
- %64 = bitcast i8* %scevgep4.3.i.i42 to float* ; [#uses=1]
- %65 = load float* %scevgep.3.i.i41, align 4 ; [#uses=1]
- store float %65, float* %64, align 4
- %scevgep = getelementptr i8* %dataBuffer, i32 220 ; [#uses=1]
- %scevgep45 = bitcast i8* %scevgep to float* ; [#uses=1]
- %scevgep47 = getelementptr i8* %dataBuffer, i32 204 ; [#uses=1]
- %scevgep4748 = bitcast i8* %scevgep47 to float* ; [#uses=1]
- %scevgep50 = getelementptr i8* %dataBuffer, i32 188 ; [#uses=1]
- %scevgep5051 = bitcast i8* %scevgep50 to float* ; [#uses=1]
- %scevgep53 = getelementptr i8* %dataBuffer, i32 172 ; [#uses=1]
- %scevgep5354 = bitcast i8* %scevgep53 to float* ; [#uses=1]
- %scevgep5556 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %scevgep57 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %scevgep58 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep59 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %scevgep5556, align 4 ; [#uses=1]
- store float %66, float* %scevgep45, align 4
- %67 = load float* %scevgep57, align 4 ; [#uses=1]
- store float %67, float* %scevgep4748, align 4
- %68 = load float* %scevgep58, align 4 ; [#uses=1]
- store float %68, float* %scevgep5051, align 4
- %69 = load float* %scevgep59, align 4 ; [#uses=1]
- store float %69, float* %scevgep5354, align 4
- %scevgep.1 = getelementptr i8* %dataBuffer, i32 224 ; [#uses=1]
- %scevgep45.1 = bitcast i8* %scevgep.1 to float* ; [#uses=1]
- %scevgep47.1 = getelementptr i8* %dataBuffer, i32 208 ; [#uses=1]
- %scevgep4748.1 = bitcast i8* %scevgep47.1 to float* ; [#uses=1]
- %scevgep50.1 = getelementptr i8* %dataBuffer, i32 192 ; [#uses=1]
- %scevgep5051.1 = bitcast i8* %scevgep50.1 to float* ; [#uses=1]
- %scevgep53.1 = getelementptr i8* %dataBuffer, i32 176 ; [#uses=1]
- %scevgep5354.1 = bitcast i8* %scevgep53.1 to float* ; [#uses=1]
- %scevgep5556.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 0 ; [#uses=1]
- %scevgep57.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 1 ; [#uses=1]
- %scevgep58.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep59.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %scevgep5556.1, align 4 ; [#uses=1]
- store float %70, float* %scevgep45.1, align 4
- %71 = load float* %scevgep57.1, align 4 ; [#uses=1]
- store float %71, float* %scevgep4748.1, align 4
- %72 = load float* %scevgep58.1, align 4 ; [#uses=1]
- store float %72, float* %scevgep5051.1, align 4
- %73 = load float* %scevgep59.1, align 4 ; [#uses=1]
- store float %73, float* %scevgep5354.1, align 4
- %scevgep.2 = getelementptr i8* %dataBuffer, i32 228 ; [#uses=1]
- %scevgep45.2 = bitcast i8* %scevgep.2 to float* ; [#uses=1]
- %scevgep47.2 = getelementptr i8* %dataBuffer, i32 212 ; [#uses=1]
- %scevgep4748.2 = bitcast i8* %scevgep47.2 to float* ; [#uses=1]
- %scevgep50.2 = getelementptr i8* %dataBuffer, i32 196 ; [#uses=1]
- %scevgep5051.2 = bitcast i8* %scevgep50.2 to float* ; [#uses=1]
- %scevgep53.2 = getelementptr i8* %dataBuffer, i32 180 ; [#uses=1]
- %scevgep5354.2 = bitcast i8* %scevgep53.2 to float* ; [#uses=1]
- %scevgep5556.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 0 ; [#uses=1]
- %scevgep57.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 1 ; [#uses=1]
- %scevgep58.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep59.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %scevgep5556.2, align 4 ; [#uses=1]
- store float %74, float* %scevgep45.2, align 4
- %75 = load float* %scevgep57.2, align 4 ; [#uses=1]
- store float %75, float* %scevgep4748.2, align 4
- %76 = load float* %scevgep58.2, align 4 ; [#uses=1]
- store float %76, float* %scevgep5051.2, align 4
- %77 = load float* %scevgep59.2, align 4 ; [#uses=1]
- store float %77, float* %scevgep5354.2, align 4
- %78 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %79 = load i8* %78, align 4 ; [#uses=1]
- %not.toBool = icmp ne i8 %79, 0 ; [#uses=1]
- %iftmp.186.0 = zext i1 %not.toBool to i32 ; [#uses=1]
- %80 = getelementptr inbounds i8* %dataBuffer, i32 236 ; [#uses=1]
- %81 = bitcast i8* %80 to i32* ; [#uses=1]
- store i32 %iftmp.186.0, i32* %81, align 4
- %82 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %83 = load i8* %82, align 1 ; [#uses=1]
- %not.toBool6 = icmp ne i8 %83, 0 ; [#uses=1]
- %iftmp.187.0 = zext i1 %not.toBool6 to i32 ; [#uses=1]
- %84 = getelementptr inbounds i8* %dataBuffer, i32 240 ; [#uses=1]
- %85 = bitcast i8* %84 to i32* ; [#uses=1]
- store i32 %iftmp.187.0, i32* %85, align 4
- ret i8* getelementptr inbounds ([28 x i8]* @.str114, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGeneric6DofConstraintD0Ev(%struct.btGeneric6DofConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btGeneric6DofConstraint* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btGeneric6DofConstraintD1Ev(%struct.btGeneric6DofConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint13buildJacobianEv(%struct.btGeneric6DofConstraint* %this) align 2 {
-entry:
- %pivotAInW = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pivotBInW = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %normalWorld = alloca %struct.btQuadWord, align 8 ; [#uses=10]
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 20 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb.nph30
-
-bb.nph30: ; preds = %entry
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %scevgep57 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep57, align 4
- %scevgep57.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep57.1, align 4
- %scevgep57.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep57.2, align 4
- %6 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %7 = load %struct.btRigidBody** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %10 = load %struct.btRigidBody** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %10, i32 0, i32 0, i32 1 ; [#uses=1]
- call void @_ZN23btGeneric6DofConstraint19calculateTransformsERK11btTransformS2_(%struct.btGeneric6DofConstraint* %this, %struct.btTransform* %11, %struct.btTransform* %8)
- %12 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 11 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %15 to void (%struct.btGeneric6DofConstraint*)* ; [#uses=1]
- call void %16(%struct.btGeneric6DofConstraint* %this)
- %17 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- store float %19, float* %17, align 8
- %20 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- store float %25, float* %23, align 8
- %26 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 16, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %19, float* %29, align 8
- %30 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %22, float* %30, align 4
- %31 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %25, float* %31, align 8
- %32 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %28, float* %32, align 4
- %33 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb12, %bb.nph30
- %i.129 = phi i32 [ 0, %bb.nph30 ], [ %42, %bb12 ] ; [#uses=10]
- %scevgep47 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 3, i32 %i.129 ; [#uses=1]
- %scevgep48 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 %i.129 ; [#uses=1]
- %scevgep49 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 %i.129 ; [#uses=1]
- %scevgep50 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 %i.129 ; [#uses=1]
- %scevgep51 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 %i.129 ; [#uses=1]
- %scevgep52 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 %i.129 ; [#uses=1]
- %scevgep53 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 %i.129 ; [#uses=1]
- %scevgep54 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 %i.129 ; [#uses=1]
- %scevgep55 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 %i.129 ; [#uses=1]
- %38 = load float* %scevgep48, align 4 ; [#uses=1]
- %39 = load float* %scevgep49, align 4 ; [#uses=1]
- %40 = fcmp ult float %38, %39 ; [#uses=1]
- br i1 %40, label %bb12, label %bb6
-
-bb6: ; preds = %bb4
- %41 = load i8* %33, align 4 ; [#uses=1]
- %toBool7 = icmp eq i8 %41, 0 ; [#uses=3]
- %storemerge59.in = select i1 %toBool7, float* %scevgep55, float* %scevgep52 ; [#uses=1]
- %storemerge58.in = select i1 %toBool7, float* %scevgep54, float* %scevgep51 ; [#uses=1]
- %storemerge.in = select i1 %toBool7, float* %scevgep53, float* %scevgep50 ; [#uses=1]
- %storemerge = load float* %storemerge.in, align 4 ; [#uses=1]
- %storemerge58 = load float* %storemerge58.in, align 4 ; [#uses=1]
- %storemerge59 = load float* %storemerge59.in, align 4 ; [#uses=1]
- store float %storemerge59, float* %34, align 8
- store float %storemerge58, float* %35, align 4
- store float %storemerge, float* %36, align 8
- store float 0.000000e+00, float* %37, align 4
- call void @_ZN23btGeneric6DofConstraint19buildLinearJacobianER15btJacobianEntryRK9btVector3S4_S4_(%struct.btGeneric6DofConstraint* %this, %struct.btJacobianEntry* %scevgep47, %struct.btQuadWord* %normalWorld, %struct.btQuadWord* %pivotAInW, %struct.btQuadWord* %pivotBInW)
- br label %bb12
-
-bb12: ; preds = %bb6, %bb4
- %42 = add nsw i32 %i.129, 1 ; [#uses=2]
- %exitcond46 = icmp eq i32 %42, 3 ; [#uses=1]
- br i1 %exitcond46, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %bb12
- %43 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 0 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 1 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btQuadWord* %normalWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb19, %bb.nph
- %i.228 = phi i32 [ 0, %bb.nph ], [ %61, %bb19 ] ; [#uses=13]
- %scevgep = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 4, i32 %i.228 ; [#uses=1]
- %scevgep3334 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.228, i32 0, i32 0 ; [#uses=1]
- %scevgep35 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.228, i32 0, i32 1 ; [#uses=1]
- %scevgep36 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.228, i32 0, i32 2 ; [#uses=1]
- %scevgep37 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.228, i32 0, i32 3 ; [#uses=1]
- %scevgep38 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 10, i32 0, i32 %i.228 ; [#uses=1]
- %scevgep39 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.228, i32 1 ; [#uses=1]
- %scevgep4041 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.228, i32 0 ; [#uses=1]
- %scevgep42 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.228, i32 13 ; [#uses=1]
- %scevgep43 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.228, i32 14 ; [#uses=3]
- %scevgep44 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.228, i32 12 ; [#uses=2]
- %scevgep45 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.228, i32 11 ; [#uses=1]
- %47 = load float* %scevgep38, align 4 ; [#uses=1]
- %48 = load float* %scevgep39, align 4 ; [#uses=4]
- %49 = load float* %scevgep4041, align 4 ; [#uses=4]
- %50 = call float @_Z21btAdjustAngleToLimitsfff(float %47, float %49, float %48) nounwind ; [#uses=5]
- store float %50, float* %scevgep42, align 4
- %51 = fcmp ogt float %49, %48 ; [#uses=1]
- br i1 %51, label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb15
- %52 = fcmp ogt float %49, %50 ; [#uses=1]
- br i1 %52, label %bb2.i.i, label %bb3.i.i
-
-bb2.i.i: ; preds = %bb1.i.i
- store i32 1, i32* %scevgep43, align 4
- %53 = fsub float %50, %49 ; [#uses=1]
- store float %53, float* %scevgep44, align 4
- br label %bb17
-
-bb3.i.i: ; preds = %bb1.i.i
- %54 = fcmp olt float %48, %50 ; [#uses=1]
- br i1 %54, label %bb4.i.i, label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
-
-bb4.i.i: ; preds = %bb3.i.i
- store i32 2, i32* %scevgep43, align 4
- %55 = fsub float %50, %48 ; [#uses=1]
- store float %55, float* %scevgep44, align 4
- br label %bb17
-
-_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit: ; preds = %bb3.i.i, %bb15
- store i32 0, i32* %scevgep43, align 4
- %56 = load i8* %scevgep45, align 4 ; [#uses=1]
- %phitmp = icmp eq i8 %56, 0 ; [#uses=1]
- br i1 %phitmp, label %bb19, label %bb17
-
-bb17: ; preds = %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit, %bb4.i.i, %bb2.i.i
- %57 = load float* %scevgep3334, align 4 ; [#uses=1]
- %58 = load float* %scevgep35, align 4 ; [#uses=1]
- %59 = load float* %scevgep36, align 4 ; [#uses=1]
- %60 = load float* %scevgep37, align 4 ; [#uses=1]
- store float %57, float* %43, align 8
- store float %58, float* %44, align 4
- store float %59, float* %45, align 8
- store float %60, float* %46, align 4
- call void @_ZN23btGeneric6DofConstraint20buildAngularJacobianER15btJacobianEntryRK9btVector3(%struct.btGeneric6DofConstraint* %this, %struct.btJacobianEntry* %scevgep, %struct.btQuadWord* %normalWorld)
- br label %bb19
-
-bb19: ; preds = %bb17, %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
- %61 = add nsw i32 %i.228, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %61, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb15
-
-return: ; preds = %bb19, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(%struct.btGeneric6DofConstraint* %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 20 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb.nph17, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb.nph17: ; preds = %entry
- %4 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %5 = load %struct.btRigidBody** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %8 = load %struct.btRigidBody** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %8, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraint19calculateTransformsERK11btTransformS2_(%struct.btGeneric6DofConstraint* %this, %struct.btTransform* %9, %struct.btTransform* %6)
- %10 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=6]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=6]
- store i32 6, i32* %11, align 4
- %scevgep26 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 14, i32 0 ; [#uses=1]
- %12 = load i32* %scevgep26, align 4 ; [#uses=1]
- %13 = icmp eq i32 %12, 0 ; [#uses=1]
- br i1 %13, label %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit, label %bb4
-
-_ZN25btTranslationalLimitMotor14needApplyForceEi.exit: ; preds = %bb.nph17
- %scevgep27 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 0 ; [#uses=1]
- %14 = load i8* %scevgep27, align 1 ; [#uses=1]
- %phitmp14 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %phitmp14, label %bb5, label %bb4
-
-bb4: ; preds = %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit, %bb.nph17
- store i32 1, i32* %10, align 4
- store i32 5, i32* %11, align 4
- br label %bb5
-
-bb5: ; preds = %bb4, %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit
- %15 = phi i32 [ 6, %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit ], [ 5, %bb4 ] ; [#uses=2]
- %16 = phi i32 [ 0, %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit ], [ 1, %bb4 ] ; [#uses=2]
- %scevgep26.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 14, i32 1 ; [#uses=1]
- %17 = load i32* %scevgep26.1, align 4 ; [#uses=1]
- %18 = icmp eq i32 %17, 0 ; [#uses=1]
- br i1 %18, label %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.1, label %bb4.1
-
-bb8: ; preds = %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.2, %bb4.2, %bb11
- %i.115 = phi i32 [ %33, %bb11 ], [ 0, %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.2 ], [ 0, %bb4.2 ] ; [#uses=8]
- %scevgep = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 10, i32 0, i32 %i.115 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.115, i32 1 ; [#uses=1]
- %scevgep1920 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.115, i32 0 ; [#uses=1]
- %scevgep21 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.115, i32 13 ; [#uses=1]
- %scevgep22 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.115, i32 14 ; [#uses=3]
- %scevgep23 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.115, i32 12 ; [#uses=2]
- %scevgep24 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.115, i32 11 ; [#uses=1]
- %19 = load float* %scevgep, align 4 ; [#uses=1]
- %20 = load float* %scevgep18, align 4 ; [#uses=4]
- %21 = load float* %scevgep1920, align 4 ; [#uses=4]
- %22 = tail call float @_Z21btAdjustAngleToLimitsfff(float %19, float %21, float %20) nounwind ; [#uses=5]
- store float %22, float* %scevgep21, align 4
- %23 = fcmp ogt float %21, %20 ; [#uses=1]
- br i1 %23, label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb8
- %24 = fcmp ogt float %21, %22 ; [#uses=1]
- br i1 %24, label %bb2.i.i, label %bb3.i.i
-
-bb2.i.i: ; preds = %bb1.i.i
- store i32 1, i32* %scevgep22, align 4
- %25 = fsub float %22, %21 ; [#uses=1]
- store float %25, float* %scevgep23, align 4
- br label %bb10
-
-bb3.i.i: ; preds = %bb1.i.i
- %26 = fcmp olt float %20, %22 ; [#uses=1]
- br i1 %26, label %bb4.i.i, label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
-
-bb4.i.i: ; preds = %bb3.i.i
- store i32 2, i32* %scevgep22, align 4
- %27 = fsub float %22, %20 ; [#uses=1]
- store float %27, float* %scevgep23, align 4
- br label %bb10
-
-_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit: ; preds = %bb3.i.i, %bb8
- store i32 0, i32* %scevgep22, align 4
- %28 = load i8* %scevgep24, align 4 ; [#uses=1]
- %phitmp = icmp eq i8 %28, 0 ; [#uses=1]
- br i1 %phitmp, label %bb11, label %bb10
-
-bb10: ; preds = %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit, %bb4.i.i, %bb2.i.i
- %29 = load i32* %10, align 4 ; [#uses=1]
- %30 = add nsw i32 %29, 1 ; [#uses=1]
- store i32 %30, i32* %10, align 4
- %31 = load i32* %11, align 4 ; [#uses=1]
- %32 = add nsw i32 %31, -1 ; [#uses=1]
- store i32 %32, i32* %11, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
- %33 = add nsw i32 %i.115, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %33, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb8
-
-return: ; preds = %bb11
- ret void
-
-bb5.1: ; preds = %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.1, %bb4.1
- %34 = phi i32 [ %15, %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.1 ], [ %39, %bb4.1 ] ; [#uses=1]
- %35 = phi i32 [ %16, %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.1 ], [ %38, %bb4.1 ] ; [#uses=1]
- %scevgep26.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 14, i32 2 ; [#uses=1]
- %36 = load i32* %scevgep26.2, align 4 ; [#uses=1]
- %37 = icmp eq i32 %36, 0 ; [#uses=1]
- br i1 %37, label %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.2, label %bb4.2
-
-bb4.1: ; preds = %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.1, %bb5
- %38 = add nsw i32 %16, 1 ; [#uses=2]
- store i32 %38, i32* %10, align 4
- %39 = add nsw i32 %15, -1 ; [#uses=2]
- store i32 %39, i32* %11, align 4
- br label %bb5.1
-
-_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.1: ; preds = %bb5
- %scevgep27.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 1 ; [#uses=1]
- %40 = load i8* %scevgep27.1, align 1 ; [#uses=1]
- %phitmp14.1 = icmp eq i8 %40, 0 ; [#uses=1]
- br i1 %phitmp14.1, label %bb5.1, label %bb4.1
-
-bb4.2: ; preds = %_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.2, %bb5.1
- %41 = add nsw i32 %35, 1 ; [#uses=1]
- store i32 %41, i32* %10, align 4
- %42 = add nsw i32 %34, -1 ; [#uses=1]
- store i32 %42, i32* %11, align 4
- br label %bb8
-
-_ZN25btTranslationalLimitMotor14needApplyForceEi.exit.2: ; preds = %bb5.1
- %scevgep27.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 2 ; [#uses=1]
- %43 = load i8* %scevgep27.2, align 1 ; [#uses=1]
- %phitmp14.2 = icmp eq i8 %43, 0 ; [#uses=1]
- br i1 %phitmp14.2, label %bb8, label %bb4.2
-}
-
-; [#uses=2]
-define void @_ZN23btGeneric6DofConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1 ; [#uses=4]
- %3 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %4 = load %struct.btRigidBody** %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 0, i32 1 ; [#uses=4]
- %6 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 2 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 2 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 3 ; [#uses=4]
- %9 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 3 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %11 = load i8* %10, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %12 = tail call i32 @_ZN23btGeneric6DofConstraint16setAngularLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, %struct.btTransform* %2, %struct.btTransform* %5, %struct.btQuadWord* %6, %struct.btQuadWord* %7, %struct.btQuadWord* %8, %struct.btQuadWord* %9) ; [#uses=1]
- %13 = tail call i32 @_ZN23btGeneric6DofConstraint15setLinearLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %12, %struct.btTransform* %2, %struct.btTransform* %5, %struct.btQuadWord* %6, %struct.btQuadWord* %7, %struct.btQuadWord* %8, %struct.btQuadWord* %9) ; [#uses=0]
- ret void
-
-bb1: ; preds = %entry
- %14 = tail call i32 @_ZN23btGeneric6DofConstraint15setLinearLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, %struct.btTransform* %2, %struct.btTransform* %5, %struct.btQuadWord* %6, %struct.btQuadWord* %7, %struct.btQuadWord* %8, %struct.btQuadWord* %9) ; [#uses=1]
- %15 = tail call i32 @_ZN23btGeneric6DofConstraint16setAngularLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %14, %struct.btTransform* %2, %struct.btTransform* %5, %struct.btQuadWord* %6, %struct.btQuadWord* %7, %struct.btQuadWord* %8, %struct.btQuadWord* %9) ; [#uses=0]
- ret void
-}
-
-; [#uses=3]
-define i32 @_ZN23btGeneric6DofConstraint21get_limit_motor_info2EP22btRotationalLimitMotorRK11btTransformS4_RK9btVector3S7_S7_S7_PN17btTypedConstraint17btConstraintInfo2EiRS5_ii(%struct.btGeneric6DofConstraint* %this, %struct.btRotationalLimitMotor* %limot, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB, %struct.btQuadWord* nocapture %linVelA, %struct.btQuadWord* nocapture %linVelB, %struct.btQuadWord* nocapture %angVelA, %struct.btQuadWord* nocapture %angVelB, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %row, %struct.btQuadWord* %ax1, i32 %rotational, i32 %rotAllowed) align 2 {
-entry:
- %tmpA = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmpB = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 6 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = mul nsw i32 %1, %row ; [#uses=23]
- %3 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 11 ; [#uses=1]
- %4 = load i8* %3, align 4 ; [#uses=2]
- %5 = zext i8 %4 to i32 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 14 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=3]
- %8 = or i32 %5, %7 ; [#uses=1]
- %9 = icmp eq i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb69, label %bb
-
-bb: ; preds = %entry
- %10 = icmp eq i32 %rotational, 0 ; [#uses=5]
- br i1 %10, label %bb3.thread, label %bb4
-
-bb3.thread: ; preds = %bb
- %11 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=1]
- br label %bb6
-
-bb4: ; preds = %bb
- %12 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=1]
- %14 = load float** %13, align 4 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb4, %bb3.thread
- %iftmp.244.0141.in = phi float** [ %12, %bb4 ], [ %11, %bb3.thread ] ; [#uses=1]
- %iftmp.245.0 = phi float* [ %14, %bb4 ], [ null, %bb3.thread ] ; [#uses=3]
- %iftmp.244.0141 = load float** %iftmp.244.0141.in, align 4 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btQuadWord* %ax1, i32 0, i32 0, i32 0 ; [#uses=7]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds float* %iftmp.244.0141, i32 %2 ; [#uses=1]
- store float %16, float* %17, align 4
- %18 = add nsw i32 %2, 1 ; [#uses=6]
- %19 = getelementptr inbounds %struct.btQuadWord* %ax1, i32 0, i32 0, i32 1 ; [#uses=7]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds float* %iftmp.244.0141, i32 %18 ; [#uses=1]
- store float %20, float* %21, align 4
- %22 = add nsw i32 %2, 2 ; [#uses=6]
- %23 = getelementptr inbounds %struct.btQuadWord* %ax1, i32 0, i32 0, i32 2 ; [#uses=7]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds float* %iftmp.244.0141, i32 %22 ; [#uses=1]
- store float %24, float* %25, align 4
- br i1 %10, label %bb9, label %bb7
-
-bb7: ; preds = %bb6
- %26 = load float* %15, align 4 ; [#uses=1]
- %27 = fsub float -0.000000e+00, %26 ; [#uses=1]
- %28 = getelementptr inbounds float* %iftmp.245.0, i32 %2 ; [#uses=1]
- store float %27, float* %28, align 4
- %29 = load float* %19, align 4 ; [#uses=1]
- %30 = fsub float -0.000000e+00, %29 ; [#uses=1]
- %31 = getelementptr inbounds float* %iftmp.245.0, i32 %18 ; [#uses=1]
- store float %30, float* %31, align 4
- %32 = load float* %23, align 4 ; [#uses=1]
- %33 = fsub float -0.000000e+00, %32 ; [#uses=1]
- %34 = getelementptr inbounds float* %iftmp.245.0, i32 %22 ; [#uses=1]
- store float %33, float* %34, align 4
- br label %bb31
-
-bb9: ; preds = %bb6
- %35 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %36 = load i8* %35, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %36, 0 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 2 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=2]
- br i1 %toBool, label %bb25, label %bb10
-
-bb10: ; preds = %bb9
- %39 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fsub float %38, %40 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fsub float %43, %45 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fsub float %48, %50 ; [#uses=2]
- %52 = load float* %15, align 4 ; [#uses=9]
- %53 = fmul float %51, %52 ; [#uses=1]
- %54 = load float* %19, align 4 ; [#uses=9]
- %55 = fmul float %46, %54 ; [#uses=1]
- %56 = fadd float %53, %55 ; [#uses=1]
- %57 = load float* %23, align 4 ; [#uses=9]
- %58 = fmul float %41, %57 ; [#uses=1]
- %59 = fadd float %56, %58 ; [#uses=3]
- %60 = fmul float %57, %59 ; [#uses=2]
- %61 = fmul float %54, %59 ; [#uses=2]
- %62 = fmul float %52, %59 ; [#uses=2]
- %63 = fsub float %41, %60 ; [#uses=1]
- %64 = fsub float %46, %61 ; [#uses=1]
- %65 = fsub float %51, %62 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 2 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fsub float %67, %69 ; [#uses=2]
- %71 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fsub float %72, %74 ; [#uses=2]
- %76 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = fsub float %77, %79 ; [#uses=2]
- %81 = fmul float %80, %52 ; [#uses=1]
- %82 = fmul float %75, %54 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = fmul float %70, %57 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=3]
- %86 = fmul float %57, %85 ; [#uses=2]
- %87 = fmul float %54, %85 ; [#uses=2]
- %88 = fmul float %52, %85 ; [#uses=2]
- %89 = fsub float %70, %86 ; [#uses=1]
- %90 = fsub float %75, %87 ; [#uses=1]
- %91 = fsub float %80, %88 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 13 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 12 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fsub float %93, %95 ; [#uses=3]
- %97 = fmul float %57, %96 ; [#uses=1]
- %98 = fmul float %54, %96 ; [#uses=1]
- %99 = fmul float %52, %96 ; [#uses=1]
- %100 = fadd float %86, %97 ; [#uses=1]
- %101 = fadd float %87, %98 ; [#uses=1]
- %102 = fadd float %88, %99 ; [#uses=1]
- %103 = fsub float %100, %60 ; [#uses=2]
- %104 = fsub float %101, %61 ; [#uses=2]
- %105 = fsub float %102, %62 ; [#uses=2]
- %106 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 13 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=6]
- %108 = fmul float %103, %107 ; [#uses=1]
- %109 = fmul float %104, %107 ; [#uses=1]
- %110 = fmul float %105, %107 ; [#uses=1]
- %111 = fadd float %89, %108 ; [#uses=2]
- %112 = fadd float %90, %109 ; [#uses=2]
- %113 = fadd float %91, %110 ; [#uses=2]
- %114 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 14 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=6]
- %116 = fmul float %103, %115 ; [#uses=1]
- %117 = fmul float %104, %115 ; [#uses=1]
- %118 = fmul float %105, %115 ; [#uses=1]
- %119 = fsub float %63, %116 ; [#uses=2]
- %120 = fsub float %64, %117 ; [#uses=2]
- %121 = fsub float %65, %118 ; [#uses=2]
- %122 = fmul float %113, %54 ; [#uses=1]
- %123 = fmul float %112, %52 ; [#uses=1]
- %124 = fsub float %122, %123 ; [#uses=3]
- %125 = fmul float %111, %52 ; [#uses=1]
- %126 = fmul float %113, %57 ; [#uses=1]
- %127 = fsub float %125, %126 ; [#uses=3]
- %128 = fmul float %112, %57 ; [#uses=1]
- %129 = fmul float %111, %54 ; [#uses=1]
- %130 = fsub float %128, %129 ; [#uses=3]
- %131 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %130, float* %131, align 8
- %132 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %127, float* %132, align 4
- %133 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %124, float* %133, align 8
- %134 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- %135 = fmul float %121, %54 ; [#uses=1]
- %136 = fmul float %120, %52 ; [#uses=1]
- %137 = fsub float %135, %136 ; [#uses=3]
- %138 = fmul float %119, %52 ; [#uses=1]
- %139 = fmul float %121, %57 ; [#uses=1]
- %140 = fsub float %138, %139 ; [#uses=3]
- %141 = fmul float %120, %57 ; [#uses=1]
- %142 = fmul float %119, %54 ; [#uses=1]
- %143 = fsub float %141, %142 ; [#uses=3]
- %144 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %143, float* %144, align 8
- %145 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %140, float* %145, align 4
- %146 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %137, float* %146, align 8
- %147 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %147, align 4
- %148 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 15 ; [#uses=1]
- %149 = load i8* %148, align 4 ; [#uses=1]
- %toBool16.not = icmp ne i8 %149, 0 ; [#uses=1]
- %150 = icmp eq i32 %rotAllowed, 0 ; [#uses=1]
- %or.cond = and i1 %toBool16.not, %150 ; [#uses=1]
- br i1 %or.cond, label %bb18, label %bb31.loopexit
-
-bb18: ; preds = %bb10
- %151 = fmul float %130, %107 ; [#uses=2]
- store float %151, float* %131, align 8
- %152 = fmul float %127, %107 ; [#uses=2]
- store float %152, float* %132, align 4
- %153 = fmul float %124, %107 ; [#uses=2]
- store float %153, float* %133, align 8
- %154 = fmul float %143, %115 ; [#uses=2]
- store float %154, float* %144, align 8
- %155 = fmul float %140, %115 ; [#uses=2]
- store float %155, float* %145, align 4
- %156 = fmul float %137, %115 ; [#uses=2]
- store float %156, float* %146, align 8
- br label %bb31.loopexit
-
-bb25: ; preds = %bb9
- %157 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- %159 = fsub float %38, %158 ; [#uses=2]
- %160 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 1 ; [#uses=2]
- %161 = load float* %160, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %164 = fsub float %161, %163 ; [#uses=2]
- %165 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 0 ; [#uses=2]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %168 = load float* %167, align 4 ; [#uses=1]
- %169 = fsub float %166, %168 ; [#uses=2]
- %170 = load float* %19, align 4 ; [#uses=2]
- %171 = fmul float %169, %170 ; [#uses=1]
- %172 = load float* %15, align 4 ; [#uses=2]
- %173 = fmul float %164, %172 ; [#uses=1]
- %174 = fsub float %171, %173 ; [#uses=1]
- %175 = fmul float %159, %172 ; [#uses=1]
- %176 = load float* %23, align 4 ; [#uses=2]
- %177 = fmul float %169, %176 ; [#uses=1]
- %178 = fsub float %175, %177 ; [#uses=1]
- %179 = fmul float %164, %176 ; [#uses=1]
- %180 = fmul float %159, %170 ; [#uses=1]
- %181 = fsub float %179, %180 ; [#uses=1]
- %182 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=3]
- %183 = load float** %182, align 4 ; [#uses=1]
- %184 = getelementptr inbounds float* %183, i32 %2 ; [#uses=1]
- store float %181, float* %184, align 4
- %185 = load float** %182, align 4 ; [#uses=1]
- %186 = getelementptr inbounds float* %185, i32 %18 ; [#uses=1]
- store float %178, float* %186, align 4
- %187 = load float** %182, align 4 ; [#uses=1]
- %188 = getelementptr inbounds float* %187, i32 %22 ; [#uses=1]
- store float %174, float* %188, align 4
- %189 = load float* %37, align 4 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=1]
- %192 = fsub float %189, %191 ; [#uses=2]
- %193 = load float* %160, align 4 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=1]
- %196 = fsub float %193, %195 ; [#uses=2]
- %197 = load float* %165, align 4 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %199 = load float* %198, align 4 ; [#uses=1]
- %200 = fsub float %197, %199 ; [#uses=2]
- %201 = load float* %19, align 4 ; [#uses=2]
- %202 = fmul float %200, %201 ; [#uses=1]
- %203 = load float* %15, align 4 ; [#uses=2]
- %204 = fmul float %196, %203 ; [#uses=1]
- %205 = fsub float %202, %204 ; [#uses=1]
- %206 = fmul float %192, %203 ; [#uses=1]
- %207 = load float* %23, align 4 ; [#uses=2]
- %208 = fmul float %200, %207 ; [#uses=1]
- %209 = fsub float %206, %208 ; [#uses=1]
- %210 = fmul float %196, %207 ; [#uses=1]
- %211 = fmul float %192, %201 ; [#uses=1]
- %212 = fsub float %210, %211 ; [#uses=1]
- %213 = fsub float -0.000000e+00, %205 ; [#uses=1]
- %214 = fsub float -0.000000e+00, %209 ; [#uses=1]
- %215 = fsub float -0.000000e+00, %212 ; [#uses=1]
- %216 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=3]
- %217 = load float** %216, align 4 ; [#uses=1]
- %218 = getelementptr inbounds float* %217, i32 %2 ; [#uses=1]
- store float %215, float* %218, align 4
- %219 = load float** %216, align 4 ; [#uses=1]
- %220 = getelementptr inbounds float* %219, i32 %18 ; [#uses=1]
- store float %214, float* %220, align 4
- %221 = load float** %216, align 4 ; [#uses=1]
- %222 = getelementptr inbounds float* %221, i32 %22 ; [#uses=1]
- store float %213, float* %222, align 4
- br label %bb31
-
-bb31.loopexit: ; preds = %bb18, %bb10
- %223 = phi float [ %130, %bb10 ], [ %151, %bb18 ] ; [#uses=1]
- %224 = phi float [ %127, %bb10 ], [ %152, %bb18 ] ; [#uses=1]
- %225 = phi float [ %124, %bb10 ], [ %153, %bb18 ] ; [#uses=1]
- %226 = phi float [ %143, %bb10 ], [ %154, %bb18 ] ; [#uses=1]
- %227 = phi float [ %140, %bb10 ], [ %155, %bb18 ] ; [#uses=1]
- %228 = phi float [ %137, %bb10 ], [ %156, %bb18 ] ; [#uses=1]
- %229 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=3]
- %230 = load float** %229, align 4 ; [#uses=1]
- %scevgep151 = getelementptr float* %230, i32 %2 ; [#uses=1]
- store float %223, float* %scevgep151, align 4
- %231 = load float** %229, align 4 ; [#uses=1]
- %scevgep151.1 = getelementptr float* %231, i32 %18 ; [#uses=1]
- store float %224, float* %scevgep151.1, align 4
- %232 = load float** %229, align 4 ; [#uses=1]
- %scevgep151.2 = getelementptr float* %232, i32 %22 ; [#uses=1]
- store float %225, float* %scevgep151.2, align 4
- %233 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=3]
- %234 = load float** %233, align 4 ; [#uses=1]
- %235 = fsub float -0.000000e+00, %226 ; [#uses=1]
- %scevgep147 = getelementptr float* %234, i32 %2 ; [#uses=1]
- store float %235, float* %scevgep147, align 4
- %236 = load float** %233, align 4 ; [#uses=1]
- %237 = fsub float -0.000000e+00, %227 ; [#uses=1]
- %scevgep147.1 = getelementptr float* %236, i32 %18 ; [#uses=1]
- store float %237, float* %scevgep147.1, align 4
- %238 = load float** %233, align 4 ; [#uses=1]
- %239 = fsub float -0.000000e+00, %228 ; [#uses=1]
- %scevgep147.2 = getelementptr float* %238, i32 %22 ; [#uses=1]
- store float %239, float* %scevgep147.2, align 4
- br label %bb31
-
-bb31: ; preds = %bb31.loopexit, %bb25, %bb7
- %240 = icmp eq i32 %7, 0 ; [#uses=3]
- br i1 %240, label %bb34, label %bb32
-
-bb32: ; preds = %bb31
- %241 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 0 ; [#uses=1]
- %242 = load float* %241, align 4 ; [#uses=1]
- %243 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 1 ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = fcmp oeq float %242, %244 ; [#uses=1]
- br i1 %245, label %bb42.thread142, label %bb34
-
-bb42.thread142: ; preds = %bb32
- %246 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=1]
- %247 = load float** %246, align 4 ; [#uses=1]
- %248 = getelementptr inbounds float* %247, i32 %2 ; [#uses=1]
- store float 0.000000e+00, float* %248, align 4
- br label %bb43
-
-bb34: ; preds = %bb32, %bb31
- %249 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=2]
- %250 = load float** %249, align 4 ; [#uses=1]
- %251 = getelementptr inbounds float* %250, i32 %2 ; [#uses=1]
- store float 0.000000e+00, float* %251, align 4
- %252 = icmp eq i8 %4, 0 ; [#uses=1]
- br i1 %252, label %bb42, label %bb35
-
-bb35: ; preds = %bb34
- %253 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %254 = load float** %253, align 4 ; [#uses=1]
- %255 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 7 ; [#uses=1]
- %256 = load float* %255, align 4 ; [#uses=1]
- %257 = getelementptr inbounds float* %254, i32 %2 ; [#uses=1]
- store float %256, float* %257, align 4
- br i1 %240, label %bb36, label %bb43
-
-bb36: ; preds = %bb35
- %258 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 2 ; [#uses=2]
- %259 = load float* %258, align 4 ; [#uses=2]
- br i1 %10, label %bb40, label %bb42.thread
-
-bb40: ; preds = %bb36
- %260 = fsub float -0.000000e+00, %259 ; [#uses=1]
- br label %bb42.thread
-
-bb42.thread: ; preds = %bb40, %bb36
- %iftmp.246.0 = phi float [ %260, %bb40 ], [ %259, %bb36 ] ; [#uses=1]
- %261 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=1]
- %262 = load float* %261, align 4 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 8 ; [#uses=1]
- %264 = load float* %263, align 4 ; [#uses=1]
- %265 = fmul float %262, %264 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 1 ; [#uses=1]
- %267 = load float* %266, align 4 ; [#uses=1]
- %268 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 0 ; [#uses=1]
- %269 = load float* %268, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 13 ; [#uses=1]
- %271 = load float* %270, align 4 ; [#uses=1]
- %272 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %273 = call float @_ZN17btTypedConstraint14getMotorFactorEfffff(%struct.btTypedConstraint* %272, float %271, float %269, float %267, float %iftmp.246.0, float %265) ; [#uses=1]
- %274 = load float** %249, align 4 ; [#uses=1]
- %275 = getelementptr inbounds float* %274, i32 %2 ; [#uses=2]
- %276 = load float* %275, align 4 ; [#uses=1]
- %277 = load float* %258, align 4 ; [#uses=1]
- %278 = fmul float %277, %273 ; [#uses=1]
- %279 = fadd float %276, %278 ; [#uses=1]
- store float %279, float* %275, align 4
- %280 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %281 = load float** %280, align 4 ; [#uses=1]
- %282 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 3 ; [#uses=2]
- %283 = load float* %282, align 4 ; [#uses=1]
- %284 = fsub float -0.000000e+00, %283 ; [#uses=1]
- %285 = getelementptr inbounds float* %281, i32 %2 ; [#uses=1]
- store float %284, float* %285, align 4
- %286 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %287 = load float** %286, align 4 ; [#uses=1]
- %288 = load float* %282, align 4 ; [#uses=1]
- %289 = getelementptr inbounds float* %287, i32 %2 ; [#uses=1]
- store float %288, float* %289, align 4
- ret i32 1
-
-bb42: ; preds = %bb34
- br i1 %240, label %bb69, label %bb43
-
-bb43: ; preds = %bb42, %bb35, %bb42.thread142
- %290 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=1]
- %291 = load float* %290, align 4 ; [#uses=1]
- %292 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 8 ; [#uses=1]
- %293 = load float* %292, align 4 ; [#uses=1]
- %294 = fmul float %291, %293 ; [#uses=2]
- %295 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=3]
- %296 = load float** %295, align 4 ; [#uses=1]
- %297 = getelementptr inbounds float* %296, i32 %2 ; [#uses=2]
- %298 = load float* %297, align 4 ; [#uses=1]
- br i1 %10, label %bb45, label %bb46
-
-bb45: ; preds = %bb43
- %299 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 12 ; [#uses=1]
- %300 = load float* %299, align 4 ; [#uses=1]
- %301 = fmul float %300, %294 ; [#uses=1]
- br label %bb47
-
-bb46: ; preds = %bb43
- %302 = fsub float -0.000000e+00, %294 ; [#uses=1]
- %303 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 12 ; [#uses=1]
- %304 = load float* %303, align 4 ; [#uses=1]
- %305 = fmul float %304, %302 ; [#uses=1]
- br label %bb47
-
-bb47: ; preds = %bb46, %bb45
- %.pn = phi float [ %305, %bb46 ], [ %301, %bb45 ] ; [#uses=1]
- %storemerge = fadd float %298, %.pn ; [#uses=1]
- store float %storemerge, float* %297, align 4
- %306 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %307 = load float** %306, align 4 ; [#uses=1]
- %308 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 9 ; [#uses=1]
- %309 = load float* %308, align 4 ; [#uses=1]
- %310 = getelementptr inbounds float* %307, i32 %2 ; [#uses=1]
- store float %309, float* %310, align 4
- %311 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 0 ; [#uses=1]
- %312 = load float* %311, align 4 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 1 ; [#uses=1]
- %314 = load float* %313, align 4 ; [#uses=1]
- %315 = fcmp oeq float %312, %314 ; [#uses=1]
- br i1 %315, label %bb48, label %bb49
-
-bb48: ; preds = %bb47
- %316 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %317 = load float** %316, align 4 ; [#uses=1]
- %318 = getelementptr inbounds float* %317, i32 %2 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %318, align 4
- %319 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %320 = load float** %319, align 4 ; [#uses=1]
- %321 = getelementptr inbounds float* %320, i32 %2 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %321, align 4
- ret i32 1
-
-bb49: ; preds = %bb47
- %322 = icmp eq i32 %7, 1 ; [#uses=2]
- %323 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %324 = load float** %323, align 4 ; [#uses=1]
- %325 = getelementptr inbounds float* %324, i32 %2 ; [#uses=2]
- br i1 %322, label %bb50, label %bb51
-
-bb50: ; preds = %bb49
- store float 0.000000e+00, float* %325, align 4
- %326 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %327 = load float** %326, align 4 ; [#uses=1]
- %328 = getelementptr inbounds float* %327, i32 %2 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %328, align 4
- br label %bb52
-
-bb51: ; preds = %bb49
- store float 0xC7EFFFFFE0000000, float* %325, align 4
- %329 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %330 = load float** %329, align 4 ; [#uses=1]
- %331 = getelementptr inbounds float* %330, i32 %2 ; [#uses=1]
- store float 0.000000e+00, float* %331, align 4
- br label %bb52
-
-bb52: ; preds = %bb51, %bb50
- %332 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 10 ; [#uses=1]
- %333 = load float* %332, align 4 ; [#uses=3]
- %334 = fcmp ogt float %333, 0.000000e+00 ; [#uses=1]
- br i1 %334, label %bb53, label %bb69
-
-bb53: ; preds = %bb52
- br i1 %10, label %bb56, label %bb55
-
-bb55: ; preds = %bb53
- %335 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 0 ; [#uses=1]
- %336 = load float* %335, align 4 ; [#uses=1]
- %337 = load float* %15, align 4 ; [#uses=2]
- %338 = fmul float %336, %337 ; [#uses=1]
- %339 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 1 ; [#uses=1]
- %340 = load float* %339, align 4 ; [#uses=1]
- %341 = load float* %19, align 4 ; [#uses=2]
- %342 = fmul float %340, %341 ; [#uses=1]
- %343 = fadd float %338, %342 ; [#uses=1]
- %344 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 2 ; [#uses=1]
- %345 = load float* %344, align 4 ; [#uses=1]
- %346 = load float* %23, align 4 ; [#uses=2]
- %347 = fmul float %345, %346 ; [#uses=1]
- %348 = fadd float %343, %347 ; [#uses=1]
- %349 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 0 ; [#uses=1]
- %350 = load float* %349, align 4 ; [#uses=1]
- %351 = fmul float %350, %337 ; [#uses=1]
- %352 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 1 ; [#uses=1]
- %353 = load float* %352, align 4 ; [#uses=1]
- %354 = fmul float %353, %341 ; [#uses=1]
- %355 = fadd float %351, %354 ; [#uses=1]
- %356 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 2 ; [#uses=1]
- %357 = load float* %356, align 4 ; [#uses=1]
- %358 = fmul float %357, %346 ; [#uses=1]
- %359 = fadd float %355, %358 ; [#uses=1]
- %360 = fsub float %348, %359 ; [#uses=1]
- br label %bb57
-
-bb56: ; preds = %bb53
- %361 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 0 ; [#uses=1]
- %362 = load float* %361, align 4 ; [#uses=1]
- %363 = load float* %15, align 4 ; [#uses=2]
- %364 = fmul float %362, %363 ; [#uses=1]
- %365 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 1 ; [#uses=1]
- %366 = load float* %365, align 4 ; [#uses=1]
- %367 = load float* %19, align 4 ; [#uses=2]
- %368 = fmul float %366, %367 ; [#uses=1]
- %369 = fadd float %364, %368 ; [#uses=1]
- %370 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 2 ; [#uses=1]
- %371 = load float* %370, align 4 ; [#uses=1]
- %372 = load float* %23, align 4 ; [#uses=2]
- %373 = fmul float %371, %372 ; [#uses=1]
- %374 = fadd float %369, %373 ; [#uses=1]
- %375 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 0 ; [#uses=1]
- %376 = load float* %375, align 4 ; [#uses=1]
- %377 = fmul float %376, %363 ; [#uses=1]
- %378 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 1 ; [#uses=1]
- %379 = load float* %378, align 4 ; [#uses=1]
- %380 = fmul float %379, %367 ; [#uses=1]
- %381 = fadd float %377, %380 ; [#uses=1]
- %382 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 2 ; [#uses=1]
- %383 = load float* %382, align 4 ; [#uses=1]
- %384 = fmul float %383, %372 ; [#uses=1]
- %385 = fadd float %381, %384 ; [#uses=1]
- %386 = fsub float %374, %385 ; [#uses=1]
- br label %bb57
-
-bb57: ; preds = %bb56, %bb55
- %vel.0 = phi float [ %360, %bb55 ], [ %386, %bb56 ] ; [#uses=4]
- br i1 %322, label %bb58, label %bb62
-
-bb58: ; preds = %bb57
- %387 = fcmp olt float %vel.0, 0.000000e+00 ; [#uses=1]
- br i1 %387, label %bb59, label %bb69
-
-bb59: ; preds = %bb58
- %388 = fsub float -0.000000e+00, %333 ; [#uses=1]
- %389 = fmul float %vel.0, %388 ; [#uses=2]
- %390 = load float** %295, align 4 ; [#uses=1]
- %391 = getelementptr inbounds float* %390, i32 %2 ; [#uses=2]
- %392 = load float* %391, align 4 ; [#uses=1]
- %393 = fcmp olt float %392, %389 ; [#uses=1]
- br i1 %393, label %bb61, label %bb69
-
-bb61: ; preds = %bb59
- store float %389, float* %391, align 4
- ret i32 1
-
-bb62: ; preds = %bb57
- %394 = fcmp ogt float %vel.0, 0.000000e+00 ; [#uses=1]
- br i1 %394, label %bb63, label %bb69
-
-bb63: ; preds = %bb62
- %395 = fsub float -0.000000e+00, %333 ; [#uses=1]
- %396 = fmul float %vel.0, %395 ; [#uses=2]
- %397 = load float** %295, align 4 ; [#uses=1]
- %398 = getelementptr inbounds float* %397, i32 %2 ; [#uses=2]
- %399 = load float* %398, align 4 ; [#uses=1]
- %400 = fcmp ogt float %399, %396 ; [#uses=1]
- br i1 %400, label %bb66, label %bb69
-
-bb66: ; preds = %bb63
- store float %396, float* %398, align 4
- ret i32 1
-
-bb69: ; preds = %bb63, %bb62, %bb59, %bb58, %bb52, %bb42, %entry
- %.0 = phi i32 [ 1, %bb42 ], [ 1, %bb63 ], [ 1, %bb62 ], [ 1, %bb59 ], [ 1, %bb58 ], [ 1, %bb52 ], [ 0, %entry ] ; [#uses=1]
- ret i32 %.0
-}
-
-; [#uses=4]
-define i32 @_ZN23btGeneric6DofConstraint16setAngularLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %row_offset, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB, %struct.btQuadWord* nocapture %linVelA, %struct.btQuadWord* nocapture %linVelB, %struct.btQuadWord* nocapture %angVelA, %struct.btQuadWord* nocapture %angVelB) align 2 {
-bb.nph:
- %axis = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 1 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=1]
- %5 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=2]
- %6 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb12, %bb.nph
- %i.017 = phi i32 [ 0, %bb.nph ], [ %28, %bb12 ] ; [#uses=12]
- %row.116 = phi i32 [ %row_offset, %bb.nph ], [ %row.0, %bb12 ] ; [#uses=3]
- %scevgep = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.017, i32 8 ; [#uses=1]
- %scevgep18 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.017, i32 9 ; [#uses=1]
- %scevgep19 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.017, i32 7 ; [#uses=1]
- %scevgep20 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.017 ; [#uses=1]
- %scevgep2122 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.017, i32 0, i32 0 ; [#uses=1]
- %scevgep23 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.017, i32 0, i32 1 ; [#uses=1]
- %scevgep24 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.017, i32 0, i32 2 ; [#uses=1]
- %scevgep25 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 %i.017, i32 0, i32 3 ; [#uses=1]
- %scevgep26 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.017, i32 14 ; [#uses=1]
- %tmp = mul i32 %i.017, 3 ; [#uses=1]
- %tmp28 = add i32 %tmp, 9 ; [#uses=1]
- %7 = load i32* %scevgep26, align 4 ; [#uses=1]
- %8 = icmp eq i32 %7, 0 ; [#uses=1]
- br i1 %8, label %_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit, label %bb1
-
-_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit: ; preds = %bb
- %scevgep27 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.017, i32 11 ; [#uses=1]
- %9 = load i8* %scevgep27, align 4 ; [#uses=1]
- %phitmp = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %phitmp, label %bb12, label %bb1
-
-bb1: ; preds = %_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit, %bb
- %10 = load float* %scevgep2122, align 4 ; [#uses=1]
- store float %10, float* %0, align 8
- %11 = load float* %scevgep23, align 4 ; [#uses=1]
- store float %11, float* %1, align 4
- %12 = load float* %scevgep24, align 4 ; [#uses=1]
- store float %12, float* %2, align 8
- %13 = load float* %scevgep25, align 4 ; [#uses=1]
- store float %13, float* %3, align 4
- %14 = load i32* %4, align 4 ; [#uses=1]
- %15 = ashr i32 %14, %tmp28 ; [#uses=3]
- %16 = and i32 %15, 1 ; [#uses=1]
- %toBool5 = icmp eq i32 %16, 0 ; [#uses=1]
- br i1 %toBool5, label %bb6, label %bb7
-
-bb6: ; preds = %bb1
- %17 = load float** %5, align 4 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %scevgep19, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb1
- %19 = and i32 %15, 2 ; [#uses=1]
- %20 = icmp eq i32 %19, 0 ; [#uses=1]
- br i1 %20, label %bb8, label %bb9
-
-bb8: ; preds = %bb7
- %21 = load float** %5, align 4 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %scevgep18, align 4
- br label %bb9
-
-bb9: ; preds = %bb8, %bb7
- %23 = and i32 %15, 4 ; [#uses=1]
- %24 = icmp eq i32 %23, 0 ; [#uses=1]
- br i1 %24, label %bb10, label %bb11
-
-bb10: ; preds = %bb9
- %25 = load float* %6, align 4 ; [#uses=1]
- store float %25, float* %scevgep, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9
- %26 = call i32 @_ZN23btGeneric6DofConstraint21get_limit_motor_info2EP22btRotationalLimitMotorRK11btTransformS4_RK9btVector3S7_S7_S7_PN17btTypedConstraint17btConstraintInfo2EiRS5_ii(%struct.btGeneric6DofConstraint* %this, %struct.btRotationalLimitMotor* %scevgep20, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %row.116, %struct.btQuadWord* %axis, i32 1, i32 0) ; [#uses=1]
- %27 = add nsw i32 %26, %row.116 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb11, %_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit
- %row.0 = phi i32 [ %27, %bb11 ], [ %row.116, %_ZN22btRotationalLimitMotor16needApplyTorquesEv.exit ] ; [#uses=2]
- %28 = add nsw i32 %i.017, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %28, 3 ; [#uses=1]
- br i1 %exitcond, label %bb14, label %bb
-
-bb14: ; preds = %bb12
- ret i32 %row.0
-}
-
-; [#uses=4]
-define i32 @_ZN23btGeneric6DofConstraint15setLinearLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %row, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB, %struct.btQuadWord* nocapture %linVelA, %struct.btQuadWord* nocapture %linVelB, %struct.btQuadWord* nocapture %angVelA, %struct.btQuadWord* nocapture %angVelB) align 2 {
-bb.nph:
- %limot = alloca %struct.btRotationalLimitMotor, align 8 ; [#uses=18]
- %axis = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 8
- %2 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 3 ; [#uses=2]
- store float 0x3FB99999A0000000, float* %2, align 4
- %3 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 4 ; [#uses=2]
- store float 3.000000e+02, float* %3, align 8
- %4 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 0 ; [#uses=2]
- store float 1.000000e+00, float* %4, align 8
- %5 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 1 ; [#uses=2]
- store float -1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 7 ; [#uses=2]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 8 ; [#uses=2]
- store float 0x3FC99999A0000000, float* %7, align 8
- %8 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 9 ; [#uses=2]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 10 ; [#uses=2]
- store float 0.000000e+00, float* %9, align 8
- %10 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 5 ; [#uses=2]
- store float 1.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 6 ; [#uses=2]
- store float 5.000000e-01, float* %11, align 8
- %12 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 14 ; [#uses=2]
- store i32 0, i32* %12, align 8
- %13 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 12 ; [#uses=2]
- store float 0.000000e+00, float* %13, align 8
- %14 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 11 ; [#uses=2]
- store i8 0, i8* %14, align 4
- %15 = getelementptr inbounds %struct.btRotationalLimitMotor* %limot, i32 0, i32 13 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=1]
- %23 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=2]
- %24 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb18, %bb.nph
- %i.023 = phi i32 [ 0, %bb.nph ], [ %62, %bb18 ] ; [#uses=18]
- %row_addr.122 = phi i32 [ %row, %bb.nph ], [ %row_addr.0, %bb18 ] ; [#uses=5]
- %scevgep = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 14, i32 %i.023 ; [#uses=1]
- %scevgep25 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 %i.023 ; [#uses=1]
- %scevgep26 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 13, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep27 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 12, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep28 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 1, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep29 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 0, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep30 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 11, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep31 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 10, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep32 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep33 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep34 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep35 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep36 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 %i.023 ; [#uses=1]
- %scevgep37 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 %i.023 ; [#uses=1]
- %tmp38 = mul i32 %i.023, 3 ; [#uses=1]
- %tmp39 = add i32 %i.023, 2 ; [#uses=1]
- %26 = load i32* %scevgep, align 4 ; [#uses=2]
- %27 = icmp eq i32 %26, 0 ; [#uses=1]
- %28 = load i8* %scevgep25, align 1 ; [#uses=2]
- %phitmp = icmp eq i8 %28, 0 ; [#uses=1]
- %or.cond = and i1 %27, %phitmp ; [#uses=1]
- br i1 %or.cond, label %bb18, label %bb1
-
-bb1: ; preds = %bb
- store float 0.000000e+00, float* %9, align 8
- store i32 %26, i32* %12, align 8
- %29 = load float* %scevgep26, align 4 ; [#uses=1]
- store float %29, float* %15, align 4
- %30 = load float* %scevgep27, align 4 ; [#uses=1]
- store float %30, float* %13, align 8
- %31 = load float* %16, align 4 ; [#uses=1]
- store float %31, float* %10, align 4
- store i8 %28, i8* %14, align 4
- %32 = load float* %scevgep28, align 4 ; [#uses=1]
- store float %32, float* %5, align 4
- %33 = load float* %17, align 4 ; [#uses=1]
- store float %33, float* %11, align 8
- %34 = load float* %scevgep29, align 4 ; [#uses=1]
- store float %34, float* %4, align 8
- store float 0.000000e+00, float* %3, align 8
- %35 = load float* %scevgep30, align 4 ; [#uses=1]
- store float %35, float* %2, align 4
- %36 = load float* %scevgep31, align 4 ; [#uses=1]
- store float %36, float* %1, align 8
- %37 = load float* %scevgep34, align 4 ; [#uses=1]
- store float %37, float* %18, align 8
- %38 = load float* %scevgep33, align 4 ; [#uses=1]
- store float %38, float* %19, align 4
- %39 = load float* %scevgep32, align 4 ; [#uses=1]
- store float %39, float* %20, align 8
- store float 0.000000e+00, float* %21, align 4
- %40 = load i32* %22, align 4 ; [#uses=1]
- %41 = ashr i32 %40, %tmp38 ; [#uses=3]
- %42 = and i32 %41, 1 ; [#uses=1]
- %toBool2 = icmp eq i32 %42, 0 ; [#uses=1]
- br i1 %toBool2, label %bb4, label %bb5
-
-bb4: ; preds = %bb1
- %43 = load float** %23, align 4 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb1
- %iftmp.233.0.in = phi float* [ %43, %bb4 ], [ %scevgep35, %bb1 ] ; [#uses=1]
- %iftmp.233.0 = load float* %iftmp.233.0.in, align 4 ; [#uses=1]
- store float %iftmp.233.0, float* %6, align 4
- %44 = and i32 %41, 2 ; [#uses=1]
- %45 = icmp eq i32 %44, 0 ; [#uses=1]
- br i1 %45, label %bb7, label %bb8
-
-bb7: ; preds = %bb5
- %46 = load float** %23, align 4 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb7, %bb5
- %iftmp.234.0.in = phi float* [ %46, %bb7 ], [ %scevgep36, %bb5 ] ; [#uses=1]
- %iftmp.234.0 = load float* %iftmp.234.0.in, align 4 ; [#uses=1]
- store float %iftmp.234.0, float* %8, align 4
- %47 = and i32 %41, 4 ; [#uses=1]
- %48 = icmp eq i32 %47, 0 ; [#uses=1]
- %iftmp.235.0.in = select i1 %48, float* %24, float* %scevgep37 ; [#uses=1]
- %iftmp.235.0 = load float* %iftmp.235.0.in, align 4 ; [#uses=1]
- store float %iftmp.235.0, float* %7, align 8
- %49 = load i8* %25, align 1 ; [#uses=1]
- %toBool12 = icmp eq i8 %49, 0 ; [#uses=1]
- br i1 %toBool12, label %bb17, label %bb13
-
-bb13: ; preds = %bb8
- %50 = add nsw i32 %i.023, 1 ; [#uses=2]
- %tmp = icmp eq i32 %50, 3 ; [#uses=1]
- %tmp24 = select i1 %tmp, i32 0, i32 %50 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %tmp24, i32 14 ; [#uses=1]
- %52 = load i32* %51, align 4 ; [#uses=1]
- %53 = icmp eq i32 %52, 0 ; [#uses=1]
- br i1 %53, label %bb16, label %bb14
-
-bb14: ; preds = %bb13
- %54 = srem i32 %tmp39, 3 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %54, i32 14 ; [#uses=1]
- %56 = load i32* %55, align 4 ; [#uses=1]
- %57 = icmp eq i32 %56, 0 ; [#uses=1]
- br i1 %57, label %bb16, label %bb15
-
-bb15: ; preds = %bb14
- br label %bb16
-
-bb16: ; preds = %bb15, %bb14, %bb13
- %rotAllowed.0 = phi i32 [ 0, %bb15 ], [ 1, %bb14 ], [ 1, %bb13 ] ; [#uses=1]
- %58 = call i32 @_ZN23btGeneric6DofConstraint21get_limit_motor_info2EP22btRotationalLimitMotorRK11btTransformS4_RK9btVector3S7_S7_S7_PN17btTypedConstraint17btConstraintInfo2EiRS5_ii(%struct.btGeneric6DofConstraint* %this, %struct.btRotationalLimitMotor* %limot, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %row_addr.122, %struct.btQuadWord* %axis, i32 0, i32 %rotAllowed.0) ; [#uses=1]
- %59 = add nsw i32 %58, %row_addr.122 ; [#uses=1]
- br label %bb18
-
-bb17: ; preds = %bb8
- %60 = call i32 @_ZN23btGeneric6DofConstraint21get_limit_motor_info2EP22btRotationalLimitMotorRK11btTransformS4_RK9btVector3S7_S7_S7_PN17btTypedConstraint17btConstraintInfo2EiRS5_ii(%struct.btGeneric6DofConstraint* %this, %struct.btRotationalLimitMotor* %limot, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %row_addr.122, %struct.btQuadWord* %axis, i32 0, i32 0) ; [#uses=1]
- %61 = add nsw i32 %60, %row_addr.122 ; [#uses=1]
- br label %bb18
-
-bb18: ; preds = %bb17, %bb16, %bb
- %row_addr.0 = phi i32 [ %59, %bb16 ], [ %61, %bb17 ], [ %row_addr.122, %bb ] ; [#uses=2]
- %62 = add nsw i32 %i.023, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %62, 3 ; [#uses=1]
- br i1 %exitcond, label %bb20, label %bb
-
-bb20: ; preds = %bb18
- ret i32 %row_addr.0
-}
-
-; [#uses=8]
-declare float @fmodf(float, float) nounwind readonly
-
-; [#uses=9]
-define linkonce_odr float @_Z21btAdjustAngleToLimitsfff(float %angleInRadians, float %angleLowerLimitInRadians, float %angleUpperLimitInRadians) nounwind readonly inlinehint {
-entry:
- %0 = fcmp ult float %angleLowerLimitInRadians, %angleUpperLimitInRadians ; [#uses=1]
- br i1 %0, label %bb1, label %bb14
-
-bb1: ; preds = %entry
- %1 = fcmp olt float %angleInRadians, %angleLowerLimitInRadians ; [#uses=1]
- br i1 %1, label %bb2, label %bb6
-
-bb2: ; preds = %bb1
- %2 = fsub float %angleLowerLimitInRadians, %angleInRadians ; [#uses=1]
- %3 = tail call float @fmodf(float %2, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %4 = fcmp olt float %3, 0xC00921FB60000000 ; [#uses=1]
- br i1 %4, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb2
- %5 = fadd float %3, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit
-
-bb1.i: ; preds = %bb2
- %6 = fcmp ogt float %3, 0x400921FB60000000 ; [#uses=1]
- br i1 %6, label %bb2.i, label %_Z16btNormalizeAnglef.exit
-
-bb2.i: ; preds = %bb1.i
- %7 = fadd float %3, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit
-
-_Z16btNormalizeAnglef.exit: ; preds = %bb2.i, %bb1.i, %bb.i
- %8 = phi float [ %7, %bb2.i ], [ %5, %bb.i ], [ %3, %bb1.i ] ; [#uses=1]
- %9 = tail call float @fabsf(float %8) nounwind readnone ; [#uses=1]
- %10 = fsub float %angleUpperLimitInRadians, %angleInRadians ; [#uses=1]
- %11 = tail call float @fmodf(float %10, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %12 = fcmp olt float %11, 0xC00921FB60000000 ; [#uses=1]
- br i1 %12, label %bb.i16, label %bb1.i17
-
-bb.i16: ; preds = %_Z16btNormalizeAnglef.exit
- %13 = fadd float %11, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit20
-
-bb1.i17: ; preds = %_Z16btNormalizeAnglef.exit
- %14 = fcmp ogt float %11, 0x400921FB60000000 ; [#uses=1]
- br i1 %14, label %bb2.i18, label %_Z16btNormalizeAnglef.exit20
-
-bb2.i18: ; preds = %bb1.i17
- %15 = fadd float %11, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit20
-
-_Z16btNormalizeAnglef.exit20: ; preds = %bb2.i18, %bb1.i17, %bb.i16
- %16 = phi float [ %15, %bb2.i18 ], [ %13, %bb.i16 ], [ %11, %bb1.i17 ] ; [#uses=1]
- %17 = tail call float @fabsf(float %16) nounwind readnone ; [#uses=1]
- %18 = fcmp uge float %9, %17 ; [#uses=1]
- br i1 %18, label %bb3, label %bb14
-
-bb3: ; preds = %_Z16btNormalizeAnglef.exit20
- %19 = fadd float %angleInRadians, 0x401921FB60000000 ; [#uses=1]
- ret float %19
-
-bb6: ; preds = %bb1
- %20 = fcmp ogt float %angleInRadians, %angleUpperLimitInRadians ; [#uses=1]
- br i1 %20, label %bb7, label %bb14
-
-bb7: ; preds = %bb6
- %21 = fsub float %angleInRadians, %angleUpperLimitInRadians ; [#uses=1]
- %22 = tail call float @fmodf(float %21, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %23 = fcmp olt float %22, 0xC00921FB60000000 ; [#uses=1]
- br i1 %23, label %bb.i21, label %bb1.i22
-
-bb.i21: ; preds = %bb7
- %24 = fadd float %22, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit25
-
-bb1.i22: ; preds = %bb7
- %25 = fcmp ogt float %22, 0x400921FB60000000 ; [#uses=1]
- br i1 %25, label %bb2.i23, label %_Z16btNormalizeAnglef.exit25
-
-bb2.i23: ; preds = %bb1.i22
- %26 = fadd float %22, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit25
-
-_Z16btNormalizeAnglef.exit25: ; preds = %bb2.i23, %bb1.i22, %bb.i21
- %27 = phi float [ %26, %bb2.i23 ], [ %24, %bb.i21 ], [ %22, %bb1.i22 ] ; [#uses=1]
- %28 = tail call float @fabsf(float %27) nounwind readnone ; [#uses=1]
- %29 = fsub float %angleInRadians, %angleLowerLimitInRadians ; [#uses=1]
- %30 = tail call float @fmodf(float %29, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %31 = fcmp olt float %30, 0xC00921FB60000000 ; [#uses=1]
- br i1 %31, label %bb.i26, label %bb1.i27
-
-bb.i26: ; preds = %_Z16btNormalizeAnglef.exit25
- %32 = fadd float %30, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit30
-
-bb1.i27: ; preds = %_Z16btNormalizeAnglef.exit25
- %33 = fcmp ogt float %30, 0x400921FB60000000 ; [#uses=1]
- br i1 %33, label %bb2.i28, label %_Z16btNormalizeAnglef.exit30
-
-bb2.i28: ; preds = %bb1.i27
- %34 = fadd float %30, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit30
-
-_Z16btNormalizeAnglef.exit30: ; preds = %bb2.i28, %bb1.i27, %bb.i26
- %35 = phi float [ %34, %bb2.i28 ], [ %32, %bb.i26 ], [ %30, %bb1.i27 ] ; [#uses=1]
- %36 = tail call float @fabsf(float %35) nounwind readnone ; [#uses=1]
- %37 = fcmp olt float %36, %28 ; [#uses=1]
- br i1 %37, label %bb10, label %bb14
-
-bb10: ; preds = %_Z16btNormalizeAnglef.exit30
- %38 = fadd float %angleInRadians, 0xC01921FB60000000 ; [#uses=1]
- ret float %38
-
-bb14: ; preds = %_Z16btNormalizeAnglef.exit30, %bb6, %_Z16btNormalizeAnglef.exit20, %entry
- ret float %angleInRadians
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi(%struct.btGeneric6DofConstraint* nocapture %this, i32 %axis_index) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 10, i32 0, i32 %axis_index ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=4]
- %6 = tail call float @_Z21btAdjustAngleToLimitsfff(float %1, float %5, float %3) nounwind ; [#uses=5]
- %7 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 13 ; [#uses=1]
- store float %6, float* %7, align 4
- %8 = fcmp ogt float %5, %3 ; [#uses=1]
- br i1 %8, label %bb.i3, label %bb1.i
-
-bb.i3: ; preds = %entry
- %9 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 14 ; [#uses=1]
- store i32 0, i32* %9, align 4
- br label %bb.i
-
-bb1.i: ; preds = %entry
- %10 = fcmp ogt float %5, %6 ; [#uses=1]
- br i1 %10, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb1.i
- %11 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 14 ; [#uses=1]
- store i32 1, i32* %11, align 4
- %12 = fsub float %6, %5 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 12 ; [#uses=1]
- store float %12, float* %13, align 4
- ret i8 1
-
-bb3.i: ; preds = %bb1.i
- %14 = fcmp olt float %3, %6 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 14 ; [#uses=2]
- br i1 %14, label %bb4.i, label %bb5.i4
-
-bb4.i: ; preds = %bb3.i
- store i32 2, i32* %15, align 4
- %16 = fsub float %6, %3 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 12 ; [#uses=1]
- store float %16, float* %17, align 4
- ret i8 1
-
-bb5.i4: ; preds = %bb3.i
- store i32 0, i32* %15, align 4
- br label %bb.i
-
-bb.i: ; preds = %bb5.i4, %bb.i3
- %18 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %axis_index, i32 11 ; [#uses=1]
- %19 = load i8* %18, align 4 ; [#uses=1]
- %not.toBoolnot.i = icmp ne i8 %19, 0 ; [#uses=1]
- %retval.i = zext i1 %not.toBoolnot.i to i8 ; [#uses=1]
- ret i8 %retval.i
-}
-
-; [#uses=1]
-declare float @asinf(float) nounwind readonly
-
-; [#uses=1]
-define zeroext i8 @_Z16matrixToEulerXYZRK11btMatrix3x3R9btVector3(%struct.btMatrix3x3* nocapture %mat, %struct.btQuadWord* nocapture %xyz) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fcmp olt float %1, 1.000000e+00 ; [#uses=1]
- br i1 %2, label %bb, label %bb3
-
-bb: ; preds = %entry
- %3 = fcmp ogt float %1, -1.000000e+00 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 0 ; [#uses=2]
- br i1 %3, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %5 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fsub float -0.000000e+00, %8 ; [#uses=1]
- %10 = tail call float @atan2f(float %9, float %6) nounwind readonly ; [#uses=1]
- store float %10, float* %4, align 4
- %11 = load float* %0, align 4 ; [#uses=2]
- %12 = fcmp olt float %11, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i = select i1 %12, float -1.000000e+00, float %11 ; [#uses=2]
- %13 = fcmp ogt float %x_addr.0.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i = select i1 %13, float 1.000000e+00, float %x_addr.0.i ; [#uses=1]
- %14 = tail call float @asinf(float %x_addr.1.i) nounwind readonly ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %14, float* %15, align 4
- %16 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float -0.000000e+00, %19 ; [#uses=1]
- %21 = tail call float @atan2f(float %20, float %17) nounwind readonly ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %22, align 4
- ret i8 1
-
-bb2: ; preds = %bb
- %23 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = tail call float @atan2f(float %26, float %24) nounwind readonly ; [#uses=1]
- %28 = fsub float -0.000000e+00, %27 ; [#uses=1]
- store float %28, float* %4, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xBFF921FB60000000, float* %29, align 4
- %30 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- ret i8 0
-
-bb3: ; preds = %entry
- %31 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btMatrix3x3* %mat, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = tail call float @atan2f(float %35, float %33) nounwind readonly ; [#uses=1]
- store float %36, float* %31, align 4
- %37 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x3FF921FB60000000, float* %37, align 4
- %38 = getelementptr inbounds %struct.btQuadWord* %xyz, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- ret i8 0
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraint18calculateAngleInfoEv(%struct.btGeneric6DofConstraint* %this) nounwind align 2 {
-entry:
- %relative_frame = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fsub float %4, %9 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=4]
- %13 = fmul float %12, %8 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=4]
- %16 = fmul float %1, %15 ; [#uses=1]
- %17 = fsub float %13, %16 ; [#uses=2]
- %18 = fmul float %6, %15 ; [#uses=1]
- %19 = fmul float %12, %3 ; [#uses=1]
- %20 = fsub float %18, %19 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=5]
- %23 = fmul float %22, %20 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=5]
- %26 = fmul float %25, %17 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %29 = load float* %28, align 4 ; [#uses=5]
- %30 = fmul float %29, %10 ; [#uses=1]
- %31 = fadd float %27, %30 ; [#uses=1]
- %32 = fdiv float 1.000000e+00, %31 ; [#uses=9]
- %33 = fmul float %22, %6 ; [#uses=1]
- %34 = fmul float %25, %1 ; [#uses=1]
- %35 = fsub float %33, %34 ; [#uses=1]
- %36 = fmul float %35, %32 ; [#uses=3]
- %37 = fmul float %25, %8 ; [#uses=1]
- %38 = fmul float %22, %3 ; [#uses=1]
- %39 = fsub float %37, %38 ; [#uses=1]
- %40 = fmul float %39, %32 ; [#uses=3]
- %41 = fmul float %10, %32 ; [#uses=3]
- %42 = fmul float %29, %1 ; [#uses=1]
- %43 = fmul float %22, %12 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=1]
- %45 = fmul float %44, %32 ; [#uses=3]
- %46 = fmul float %22, %15 ; [#uses=1]
- %47 = fmul float %29, %8 ; [#uses=1]
- %48 = fsub float %46, %47 ; [#uses=1]
- %49 = fmul float %48, %32 ; [#uses=3]
- %50 = fmul float %17, %32 ; [#uses=3]
- %51 = fmul float %25, %12 ; [#uses=1]
- %52 = fmul float %29, %6 ; [#uses=1]
- %53 = fsub float %51, %52 ; [#uses=1]
- %54 = fmul float %53, %32 ; [#uses=3]
- %55 = fmul float %29, %3 ; [#uses=1]
- %56 = fmul float %25, %15 ; [#uses=1]
- %57 = fsub float %55, %56 ; [#uses=1]
- %58 = fmul float %57, %32 ; [#uses=3]
- %59 = fmul float %20, %32 ; [#uses=3]
- %60 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=3]
- %62 = fmul float %61, %41 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=3]
- %65 = fmul float %64, %40 ; [#uses=1]
- %66 = fadd float %62, %65 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=3]
- %69 = fmul float %68, %36 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=3]
- %73 = fmul float %72, %41 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=3]
- %76 = fmul float %75, %40 ; [#uses=1]
- %77 = fadd float %73, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=3]
- %80 = fmul float %79, %36 ; [#uses=1]
- %81 = fadd float %77, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %83 = load float* %82, align 4 ; [#uses=3]
- %84 = fmul float %83, %41 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %86 = load float* %85, align 4 ; [#uses=3]
- %87 = fmul float %86, %40 ; [#uses=1]
- %88 = fadd float %84, %87 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %90 = load float* %89, align 4 ; [#uses=3]
- %91 = fmul float %90, %36 ; [#uses=1]
- %92 = fadd float %88, %91 ; [#uses=1]
- %93 = fmul float %61, %50 ; [#uses=1]
- %94 = fmul float %64, %49 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %68, %45 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %72, %50 ; [#uses=1]
- %99 = fmul float %75, %49 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %79, %45 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %83, %50 ; [#uses=1]
- %104 = fmul float %86, %49 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %90, %45 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %61, %59 ; [#uses=1]
- %109 = fmul float %64, %58 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %68, %54 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %72, %59 ; [#uses=1]
- %114 = fmul float %75, %58 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %79, %54 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %83, %59 ; [#uses=1]
- %119 = fmul float %86, %58 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %90, %54 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %122, float* %123, align 8
- %124 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %117, float* %124, align 4
- %125 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %112, float* %125, align 8
- %126 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %126, align 4
- %127 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %107, float* %127, align 8
- %128 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %102, float* %128, align 4
- %129 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %97, float* %129, align 8
- %130 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 4
- %131 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %92, float* %131, align 8
- %132 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %81, float* %132, align 4
- %133 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %70, float* %133, align 8
- %134 = getelementptr inbounds %struct.btMatrix3x3* %relative_frame, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- %135 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %136 = call zeroext i8 @_Z16matrixToEulerXYZRK11btMatrix3x3R9btVector3(%struct.btMatrix3x3* %relative_frame, %struct.btQuadWord* %135) nounwind ; [#uses=0]
- %137 = load float* %82, align 4 ; [#uses=4]
- %138 = load float* %85, align 4 ; [#uses=4]
- %139 = load float* %89, align 4 ; [#uses=4]
- %140 = load float* %28, align 4 ; [#uses=4]
- %141 = load float* %11, align 4 ; [#uses=4]
- %142 = load float* %14, align 4 ; [#uses=4]
- %143 = fmul float %140, %138 ; [#uses=1]
- %144 = fmul float %141, %137 ; [#uses=1]
- %145 = fsub float %143, %144 ; [#uses=8]
- %146 = fmul float %142, %137 ; [#uses=1]
- %147 = fmul float %140, %139 ; [#uses=1]
- %148 = fsub float %146, %147 ; [#uses=8]
- %149 = fmul float %141, %139 ; [#uses=1]
- %150 = fmul float %142, %138 ; [#uses=1]
- %151 = fsub float %149, %150 ; [#uses=8]
- %152 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 1, i32 0, i32 0 ; [#uses=2]
- store float %151, float* %152, align 4
- %153 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 1, i32 0, i32 1 ; [#uses=2]
- store float %148, float* %153, align 4
- %154 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 1, i32 0, i32 2 ; [#uses=2]
- store float %145, float* %154, align 4
- %155 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %155, align 4
- %156 = fmul float %151, %141 ; [#uses=1]
- %157 = fmul float %148, %140 ; [#uses=1]
- %158 = fsub float %156, %157 ; [#uses=4]
- %159 = fmul float %145, %140 ; [#uses=1]
- %160 = fmul float %151, %142 ; [#uses=1]
- %161 = fsub float %159, %160 ; [#uses=4]
- %162 = fmul float %148, %142 ; [#uses=1]
- %163 = fmul float %145, %141 ; [#uses=1]
- %164 = fsub float %162, %163 ; [#uses=4]
- %165 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %164, float* %165, align 4
- %166 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %161, float* %166, align 4
- %167 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %158, float* %167, align 4
- %168 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %168, align 4
- %169 = fmul float %137, %148 ; [#uses=1]
- %170 = fmul float %138, %151 ; [#uses=1]
- %171 = fsub float %169, %170 ; [#uses=4]
- %172 = fmul float %139, %151 ; [#uses=1]
- %173 = fmul float %137, %145 ; [#uses=1]
- %174 = fsub float %172, %173 ; [#uses=4]
- %175 = fmul float %138, %145 ; [#uses=1]
- %176 = fmul float %139, %148 ; [#uses=1]
- %177 = fsub float %175, %176 ; [#uses=4]
- %178 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 2, i32 0, i32 0 ; [#uses=2]
- store float %177, float* %178, align 4
- %179 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 2, i32 0, i32 1 ; [#uses=2]
- store float %174, float* %179, align 4
- %180 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 2, i32 0, i32 2 ; [#uses=2]
- store float %171, float* %180, align 4
- %181 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 11, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %181, align 4
- %182 = fmul float %164, %164 ; [#uses=1]
- %183 = fmul float %161, %161 ; [#uses=1]
- %184 = fadd float %182, %183 ; [#uses=1]
- %185 = fmul float %158, %158 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = call float @sqrtf(float %186) nounwind readonly ; [#uses=1]
- %188 = fdiv float 1.000000e+00, %187 ; [#uses=3]
- %189 = fmul float %164, %188 ; [#uses=1]
- store float %189, float* %165, align 4
- %190 = fmul float %161, %188 ; [#uses=1]
- store float %190, float* %166, align 4
- %191 = fmul float %158, %188 ; [#uses=1]
- store float %191, float* %167, align 4
- %192 = fmul float %151, %151 ; [#uses=1]
- %193 = fmul float %148, %148 ; [#uses=1]
- %194 = fadd float %192, %193 ; [#uses=1]
- %195 = fmul float %145, %145 ; [#uses=1]
- %196 = fadd float %194, %195 ; [#uses=1]
- %197 = call float @sqrtf(float %196) nounwind readonly ; [#uses=1]
- %198 = fdiv float 1.000000e+00, %197 ; [#uses=3]
- %199 = fmul float %151, %198 ; [#uses=1]
- store float %199, float* %152, align 4
- %200 = fmul float %148, %198 ; [#uses=1]
- store float %200, float* %153, align 4
- %201 = fmul float %145, %198 ; [#uses=1]
- store float %201, float* %154, align 4
- %202 = fmul float %177, %177 ; [#uses=1]
- %203 = fmul float %174, %174 ; [#uses=1]
- %204 = fadd float %202, %203 ; [#uses=1]
- %205 = fmul float %171, %171 ; [#uses=1]
- %206 = fadd float %204, %205 ; [#uses=1]
- %207 = call float @sqrtf(float %206) nounwind readonly ; [#uses=1]
- %208 = fdiv float 1.000000e+00, %207 ; [#uses=3]
- %209 = fmul float %177, %208 ; [#uses=1]
- store float %209, float* %178, align 4
- %210 = fmul float %174, %208 ; [#uses=1]
- store float %210, float* %179, align 4
- %211 = fmul float %171, %208 ; [#uses=1]
- store float %211, float* %180, align 4
- ret void
-}
-
-; [#uses=6]
-define void @_ZN23btGeneric6DofConstraint19calculateTransformsERK11btTransformS2_(%struct.btGeneric6DofConstraint* %this, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=4]
- %13 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %16, %18 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=4]
- %22 = fmul float %21, %3 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=4]
- %25 = fmul float %24, %8 ; [#uses=1]
- %26 = fadd float %22, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=4]
- %29 = fmul float %28, %14 ; [#uses=1]
- %30 = fadd float %26, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=4]
- %36 = fmul float %35, %3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=4]
- %39 = fmul float %38, %8 ; [#uses=1]
- %40 = fadd float %36, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=4]
- %43 = fmul float %42, %14 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %44, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=3]
- %50 = fmul float %49, %1 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=3]
- %53 = fmul float %52, %6 ; [#uses=1]
- %54 = fadd float %50, %53 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=3]
- %57 = fmul float %56, %12 ; [#uses=1]
- %58 = fadd float %54, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fmul float %60, %1 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=3]
- %64 = fmul float %63, %6 ; [#uses=1]
- %65 = fadd float %61, %64 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = fmul float %67, %12 ; [#uses=1]
- %69 = fadd float %65, %68 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=3]
- %72 = fmul float %71, %1 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=3]
- %75 = fmul float %74, %6 ; [#uses=1]
- %76 = fadd float %72, %75 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=3]
- %79 = fmul float %78, %12 ; [#uses=1]
- %80 = fadd float %76, %79 ; [#uses=1]
- %81 = fmul float %49, %21 ; [#uses=1]
- %82 = fmul float %52, %24 ; [#uses=1]
- %83 = fadd float %81, %82 ; [#uses=1]
- %84 = fmul float %56, %28 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %60, %21 ; [#uses=1]
- %87 = fmul float %63, %24 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=1]
- %89 = fmul float %67, %28 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %71, %21 ; [#uses=1]
- %92 = fmul float %74, %24 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fmul float %78, %28 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %49, %35 ; [#uses=1]
- %97 = fmul float %52, %38 ; [#uses=1]
- %98 = fadd float %96, %97 ; [#uses=1]
- %99 = fmul float %56, %42 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %60, %35 ; [#uses=1]
- %102 = fmul float %63, %38 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fmul float %67, %42 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %71, %35 ; [#uses=1]
- %107 = fmul float %74, %38 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %78, %42 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %110, float* %111, align 4
- %112 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %105, float* %112, align 4
- %113 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %113, align 4
- %114 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %114, align 4
- %115 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %95, float* %115, align 4
- %116 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %90, float* %116, align 4
- %117 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %85, float* %117, align 4
- %118 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %118, align 4
- %119 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %80, float* %119, align 4
- %120 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %69, float* %120, align 4
- %121 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %58, float* %121, align 4
- %122 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %122, align 4
- %123 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %47, float* %123, align 4
- %124 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %33, float* %124, align 4
- %125 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %19, float* %125, align 4
- %126 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 8, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %126, align 4
- %127 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=4]
- %129 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=3]
- %131 = fmul float %128, %130 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=4]
- %134 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=3]
- %136 = fmul float %133, %135 ; [#uses=1]
- %137 = fadd float %131, %136 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=4]
- %140 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=3]
- %142 = fmul float %139, %141 ; [#uses=1]
- %143 = fadd float %137, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = fadd float %143, %145 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=4]
- %149 = fmul float %148, %130 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=4]
- %152 = fmul float %151, %135 ; [#uses=1]
- %153 = fadd float %149, %152 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=4]
- %156 = fmul float %155, %141 ; [#uses=1]
- %157 = fadd float %153, %156 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fadd float %157, %159 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=4]
- %163 = fmul float %162, %130 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=4]
- %166 = fmul float %165, %135 ; [#uses=1]
- %167 = fadd float %163, %166 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=4]
- %170 = fmul float %169, %141 ; [#uses=1]
- %171 = fadd float %167, %170 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- %174 = fadd float %171, %173 ; [#uses=1]
- %175 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %176 = load float* %175, align 4 ; [#uses=3]
- %177 = fmul float %176, %128 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %179 = load float* %178, align 4 ; [#uses=3]
- %180 = fmul float %179, %133 ; [#uses=1]
- %181 = fadd float %177, %180 ; [#uses=1]
- %182 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %183 = load float* %182, align 4 ; [#uses=3]
- %184 = fmul float %183, %139 ; [#uses=1]
- %185 = fadd float %181, %184 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=3]
- %188 = fmul float %187, %128 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %190 = load float* %189, align 4 ; [#uses=3]
- %191 = fmul float %190, %133 ; [#uses=1]
- %192 = fadd float %188, %191 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %194 = load float* %193, align 4 ; [#uses=3]
- %195 = fmul float %194, %139 ; [#uses=1]
- %196 = fadd float %192, %195 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %198 = load float* %197, align 4 ; [#uses=3]
- %199 = fmul float %198, %128 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %201 = load float* %200, align 4 ; [#uses=3]
- %202 = fmul float %201, %133 ; [#uses=1]
- %203 = fadd float %199, %202 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=3]
- %206 = fmul float %205, %139 ; [#uses=1]
- %207 = fadd float %203, %206 ; [#uses=1]
- %208 = fmul float %176, %148 ; [#uses=1]
- %209 = fmul float %179, %151 ; [#uses=1]
- %210 = fadd float %208, %209 ; [#uses=1]
- %211 = fmul float %183, %155 ; [#uses=1]
- %212 = fadd float %210, %211 ; [#uses=1]
- %213 = fmul float %187, %148 ; [#uses=1]
- %214 = fmul float %190, %151 ; [#uses=1]
- %215 = fadd float %213, %214 ; [#uses=1]
- %216 = fmul float %194, %155 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=1]
- %218 = fmul float %198, %148 ; [#uses=1]
- %219 = fmul float %201, %151 ; [#uses=1]
- %220 = fadd float %218, %219 ; [#uses=1]
- %221 = fmul float %205, %155 ; [#uses=1]
- %222 = fadd float %220, %221 ; [#uses=1]
- %223 = fmul float %176, %162 ; [#uses=1]
- %224 = fmul float %179, %165 ; [#uses=1]
- %225 = fadd float %223, %224 ; [#uses=1]
- %226 = fmul float %183, %169 ; [#uses=1]
- %227 = fadd float %225, %226 ; [#uses=1]
- %228 = fmul float %187, %162 ; [#uses=1]
- %229 = fmul float %190, %165 ; [#uses=1]
- %230 = fadd float %228, %229 ; [#uses=1]
- %231 = fmul float %194, %169 ; [#uses=1]
- %232 = fadd float %230, %231 ; [#uses=1]
- %233 = fmul float %198, %162 ; [#uses=1]
- %234 = fmul float %201, %165 ; [#uses=1]
- %235 = fadd float %233, %234 ; [#uses=1]
- %236 = fmul float %205, %169 ; [#uses=1]
- %237 = fadd float %235, %236 ; [#uses=1]
- %238 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %237, float* %238, align 4
- %239 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %232, float* %239, align 4
- %240 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %227, float* %240, align 4
- %241 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %241, align 4
- %242 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %222, float* %242, align 4
- %243 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %217, float* %243, align 4
- %244 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %212, float* %244, align 4
- %245 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %245, align 4
- %246 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %207, float* %246, align 4
- %247 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %196, float* %247, align 4
- %248 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %185, float* %248, align 4
- %249 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %249, align 4
- %250 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %174, float* %250, align 4
- %251 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %160, float* %251, align 4
- %252 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %146, float* %252, align 4
- %253 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 9, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %253, align 4
- tail call void @_ZN23btGeneric6DofConstraint19calculateLinearInfoEv(%struct.btGeneric6DofConstraint* %this)
- tail call void @_ZN23btGeneric6DofConstraint18calculateAngleInfoEv(%struct.btGeneric6DofConstraint* %this)
- %254 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %255 = load i8* %254, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %255, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %256 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %257 = load %struct.btRigidBody** %256, align 4 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btRigidBody* %257, i32 0, i32 4 ; [#uses=1]
- %259 = load float* %258, align 4 ; [#uses=2]
- %260 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %261 = load %struct.btRigidBody** %260, align 4 ; [#uses=1]
- %262 = getelementptr inbounds %struct.btRigidBody* %261, i32 0, i32 4 ; [#uses=1]
- %263 = load float* %262, align 4 ; [#uses=3]
- %264 = fcmp olt float %259, 0x3E80000000000000 ; [#uses=1]
- %265 = fcmp olt float %263, 0x3E80000000000000 ; [#uses=1]
- %or.cond = or i1 %264, %265 ; [#uses=1]
- %iftmp.215.0 = zext i1 %or.cond to i8 ; [#uses=1]
- %266 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 15 ; [#uses=1]
- store i8 %iftmp.215.0, i8* %266, align 4
- %267 = fadd float %259, %263 ; [#uses=2]
- %268 = fcmp ogt float %267, 0.000000e+00 ; [#uses=1]
- br i1 %268, label %bb5, label %bb6
-
-bb5: ; preds = %bb
- %269 = fdiv float %263, %267 ; [#uses=2]
- %270 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 13 ; [#uses=1]
- store float %269, float* %270, align 4
- br label %bb7
-
-bb6: ; preds = %bb
- %271 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 13 ; [#uses=1]
- store float 5.000000e-01, float* %271, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %272 = phi float [ 5.000000e-01, %bb6 ], [ %269, %bb5 ] ; [#uses=1]
- %273 = fsub float 1.000000e+00, %272 ; [#uses=1]
- %274 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 14 ; [#uses=1]
- store float %273, float* %274, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btGeneric6DofConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB, %struct.btQuadWord* nocapture %linVelA, %struct.btQuadWord* nocapture %linVelB, %struct.btQuadWord* nocapture %angVelA, %struct.btQuadWord* nocapture %angVelB) align 2 {
-bb.nph:
- tail call void @_ZN23btGeneric6DofConstraint19calculateTransformsERK11btTransformS2_(%struct.btGeneric6DofConstraint* %this, %struct.btTransform* %transA, %struct.btTransform* %transB)
- br label %bb
-
-bb: ; preds = %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit, %bb.nph
- %i.07 = phi i32 [ 0, %bb.nph ], [ %9, %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit ] ; [#uses=7]
- %scevgep = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 10, i32 0, i32 %i.07 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.07, i32 1 ; [#uses=1]
- %scevgep910 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.07, i32 0 ; [#uses=1]
- %scevgep11 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.07, i32 13 ; [#uses=1]
- %scevgep12 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.07, i32 14 ; [#uses=4]
- %scevgep13 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 %i.07, i32 12 ; [#uses=2]
- %0 = load float* %scevgep, align 4 ; [#uses=1]
- %1 = load float* %scevgep8, align 4 ; [#uses=4]
- %2 = load float* %scevgep910, align 4 ; [#uses=4]
- %3 = tail call float @_Z21btAdjustAngleToLimitsfff(float %0, float %2, float %1) nounwind ; [#uses=5]
- store float %3, float* %scevgep11, align 4
- %4 = fcmp ogt float %2, %1 ; [#uses=1]
- br i1 %4, label %bb.i3.i, label %bb1.i.i
-
-bb.i3.i: ; preds = %bb
- store i32 0, i32* %scevgep12, align 4
- br label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
-
-bb1.i.i: ; preds = %bb
- %5 = fcmp ogt float %2, %3 ; [#uses=1]
- br i1 %5, label %bb2.i.i, label %bb3.i.i
-
-bb2.i.i: ; preds = %bb1.i.i
- store i32 1, i32* %scevgep12, align 4
- %6 = fsub float %3, %2 ; [#uses=1]
- store float %6, float* %scevgep13, align 4
- br label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
-
-bb3.i.i: ; preds = %bb1.i.i
- %7 = fcmp olt float %1, %3 ; [#uses=1]
- br i1 %7, label %bb4.i.i, label %bb5.i4.i
-
-bb4.i.i: ; preds = %bb3.i.i
- store i32 2, i32* %scevgep12, align 4
- %8 = fsub float %3, %1 ; [#uses=1]
- store float %8, float* %scevgep13, align 4
- br label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
-
-bb5.i4.i: ; preds = %bb3.i.i
- store i32 0, i32* %scevgep12, align 4
- br label %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
-
-_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit: ; preds = %bb5.i4.i, %bb4.i.i, %bb2.i.i, %bb.i3.i
- %9 = add nsw i32 %i.07, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %9, 3 ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %_ZN23btGeneric6DofConstraint21testAngularLimitMotorEi.exit
- %10 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %11 = load i8* %10, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %11, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb3
-
-bb3: ; preds = %bb2
- %12 = tail call i32 @_ZN23btGeneric6DofConstraint16setAngularLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB) ; [#uses=1]
- %13 = tail call i32 @_ZN23btGeneric6DofConstraint15setLinearLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %12, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB) ; [#uses=0]
- ret void
-
-bb4: ; preds = %bb2
- %14 = tail call i32 @_ZN23btGeneric6DofConstraint15setLinearLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB) ; [#uses=1]
- %15 = tail call i32 @_ZN23btGeneric6DofConstraint16setAngularLimitsEPN17btTypedConstraint17btConstraintInfo2EiRK11btTransformS5_RK9btVector3S8_S8_S8_(%struct.btGeneric6DofConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 %14, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %linVelA, %struct.btQuadWord* %linVelB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB) ; [#uses=0]
- ret void
-}
-
-; [#uses=2]
-define void @_ZN23btGeneric6DofConstraint19calculateTransformsEv(%struct.btGeneric6DofConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %4 = load %struct.btRigidBody** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraint19calculateTransformsERK11btTransformS2_(%struct.btGeneric6DofConstraint* %this, %struct.btTransform* %5, %struct.btTransform* %2)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btGeneric6DofConstraintC2ER11btRigidBodyRK11btTransformb(%struct.btGeneric6DofConstraint* %this, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameB) align 2 {
-return:
- %0 = tail call %struct.btRigidBody* @_ZN17btTypedConstraint12getFixedBodyEv() ; [#uses=1]
- %1 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %1, i32 6, %struct.btRigidBody* %0, %struct.btRigidBody* %rbB)
- %2 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %2, align 4
- %3 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=4]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=4]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=4]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=4]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=4]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=4]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=4]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=4]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=4]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=4]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %51 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 4
- %54 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %55, align 4
- %56 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 0 ; [#uses=1]
- %57 = bitcast %struct.btTranslationalLimitMotor* %51 to i8* ; [#uses=1]
- tail call void @llvm.memset.p0i8.i64(i8* %57, i8 0, i64 48, i32 4, i1 false) nounwind
- store float 0x3FC99999A0000000, float* %56, align 4
- %58 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 1 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %58, align 4
- %59 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 2 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %59, align 4
- %60 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 7, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- %61 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %61, align 4
- %62 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %62, align 4
- %63 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %63, align 4
- %64 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 8, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %64, align 4
- %65 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- store float 0x3FE6666660000000, float* %65, align 4
- %66 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store float 1.000000e+00, float* %66, align 4
- %67 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 5 ; [#uses=1]
- store float 5.000000e-01, float* %67, align 4
- %scevgep.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 0 ; [#uses=1]
- %scevgep4.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 10, i32 0, i32 0 ; [#uses=1]
- %scevgep5.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 11, i32 0, i32 0 ; [#uses=1]
- store i8 0, i8* %scevgep.i.i, align 1
- store float 0.000000e+00, float* %scevgep4.i.i, align 4
- store float 0.000000e+00, float* %scevgep5.i.i, align 4
- %scevgep.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 10, i32 0, i32 1 ; [#uses=1]
- %scevgep5.1.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 11, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %scevgep.1.i.i, align 1
- store float 0.000000e+00, float* %scevgep4.1.i.i, align 4
- store float 0.000000e+00, float* %scevgep5.1.i.i, align 4
- %scevgep.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 9, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 10, i32 0, i32 2 ; [#uses=1]
- %scevgep5.2.i.i = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 5, i32 11, i32 0, i32 2 ; [#uses=1]
- store i8 0, i8* %scevgep.2.i.i, align 1
- store float 0.000000e+00, float* %scevgep4.2.i.i, align 4
- store float 0.000000e+00, float* %scevgep5.2.i.i, align 4
- %scevgep = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 15 ; [#uses=1]
- %scevgep38 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %scevgep39 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %scevgep40 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 4 ; [#uses=1]
- %scevgep4142 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %scevgep43 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %scevgep44 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 7 ; [#uses=1]
- %scevgep45 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 8 ; [#uses=1]
- %scevgep46 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 9 ; [#uses=1]
- %scevgep47 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 10 ; [#uses=1]
- %scevgep48 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 5 ; [#uses=1]
- %scevgep49 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 6 ; [#uses=1]
- %scevgep50 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 14 ; [#uses=1]
- %scevgep51 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 12 ; [#uses=1]
- %scevgep52 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 0, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep, align 4
- store float 0.000000e+00, float* %scevgep38, align 4
- store float 0x3FB99999A0000000, float* %scevgep39, align 4
- store float 3.000000e+02, float* %scevgep40, align 4
- store float 1.000000e+00, float* %scevgep4142, align 4
- store float -1.000000e+00, float* %scevgep43, align 4
- store float 0.000000e+00, float* %scevgep44, align 4
- store float 0x3FC99999A0000000, float* %scevgep45, align 4
- store float 0.000000e+00, float* %scevgep46, align 4
- store float 0.000000e+00, float* %scevgep47, align 4
- store float 1.000000e+00, float* %scevgep48, align 4
- store float 5.000000e-01, float* %scevgep49, align 4
- store i32 0, i32* %scevgep50, align 4
- store float 0.000000e+00, float* %scevgep51, align 4
- store i8 0, i8* %scevgep52, align 4
- %scevgep.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 15 ; [#uses=1]
- %scevgep38.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 2 ; [#uses=1]
- %scevgep39.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 3 ; [#uses=1]
- %scevgep40.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 4 ; [#uses=1]
- %scevgep4142.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 0 ; [#uses=1]
- %scevgep43.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 1 ; [#uses=1]
- %scevgep44.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 7 ; [#uses=1]
- %scevgep45.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 8 ; [#uses=1]
- %scevgep46.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 9 ; [#uses=1]
- %scevgep47.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 10 ; [#uses=1]
- %scevgep48.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 5 ; [#uses=1]
- %scevgep49.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 6 ; [#uses=1]
- %scevgep50.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 14 ; [#uses=1]
- %scevgep51.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 12 ; [#uses=1]
- %scevgep52.1 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 1, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep.1, align 4
- store float 0.000000e+00, float* %scevgep38.1, align 4
- store float 0x3FB99999A0000000, float* %scevgep39.1, align 4
- store float 3.000000e+02, float* %scevgep40.1, align 4
- store float 1.000000e+00, float* %scevgep4142.1, align 4
- store float -1.000000e+00, float* %scevgep43.1, align 4
- store float 0.000000e+00, float* %scevgep44.1, align 4
- store float 0x3FC99999A0000000, float* %scevgep45.1, align 4
- store float 0.000000e+00, float* %scevgep46.1, align 4
- store float 0.000000e+00, float* %scevgep47.1, align 4
- store float 1.000000e+00, float* %scevgep48.1, align 4
- store float 5.000000e-01, float* %scevgep49.1, align 4
- store i32 0, i32* %scevgep50.1, align 4
- store float 0.000000e+00, float* %scevgep51.1, align 4
- store i8 0, i8* %scevgep52.1, align 4
- %scevgep.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 15 ; [#uses=1]
- %scevgep38.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 2 ; [#uses=1]
- %scevgep39.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 3 ; [#uses=1]
- %scevgep40.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 4 ; [#uses=1]
- %scevgep4142.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 0 ; [#uses=1]
- %scevgep43.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 1 ; [#uses=1]
- %scevgep44.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 7 ; [#uses=1]
- %scevgep45.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 8 ; [#uses=1]
- %scevgep46.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 9 ; [#uses=1]
- %scevgep47.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 10 ; [#uses=1]
- %scevgep48.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 5 ; [#uses=1]
- %scevgep49.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 6 ; [#uses=1]
- %scevgep50.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 14 ; [#uses=1]
- %scevgep51.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 12 ; [#uses=1]
- %scevgep52.2 = getelementptr %struct.btGeneric6DofConstraint* %this, i32 0, i32 6, i32 2, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep.2, align 4
- store float 0.000000e+00, float* %scevgep38.2, align 4
- store float 0x3FB99999A0000000, float* %scevgep39.2, align 4
- store float 3.000000e+02, float* %scevgep40.2, align 4
- store float 1.000000e+00, float* %scevgep4142.2, align 4
- store float -1.000000e+00, float* %scevgep43.2, align 4
- store float 0.000000e+00, float* %scevgep44.2, align 4
- store float 0x3FC99999A0000000, float* %scevgep45.2, align 4
- store float 0.000000e+00, float* %scevgep46.2, align 4
- store float 0.000000e+00, float* %scevgep47.2, align 4
- store float 1.000000e+00, float* %scevgep48.2, align 4
- store float 5.000000e-01, float* %scevgep49.2, align 4
- store i32 0, i32* %scevgep50.2, align 4
- store float 0.000000e+00, float* %scevgep51.2, align 4
- store i8 0, i8* %scevgep52.2, align 4
- %68 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store i8 %useLinearReferenceFrameB, i8* %68, align 4
- %69 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store i8 1, i8* %69, align 1
- %70 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store i32 0, i32* %70, align 4
- %71 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store i8 0, i8* %71, align 4
- %72 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=4]
- %74 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=4]
- %76 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=4]
- %78 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=4]
- %80 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=4]
- %82 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=4]
- %84 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=4]
- %86 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=4]
- %88 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=4]
- %90 = fmul float %87, %44 ; [#uses=1]
- %91 = fmul float %85, %41 ; [#uses=1]
- %92 = fmul float %81, %44 ; [#uses=1]
- %93 = fmul float %79, %41 ; [#uses=1]
- %94 = fmul float %75, %44 ; [#uses=1]
- %95 = fmul float %73, %41 ; [#uses=1]
- %96 = fmul float %17, %87 ; [#uses=1]
- %97 = fmul float %5, %85 ; [#uses=1]
- %98 = fmul float %20, %87 ; [#uses=1]
- %99 = fmul float %8, %85 ; [#uses=1]
- %100 = fmul float %23, %87 ; [#uses=1]
- %101 = fmul float %11, %85 ; [#uses=1]
- %102 = fmul float %17, %81 ; [#uses=1]
- %103 = fmul float %5, %79 ; [#uses=1]
- %104 = fmul float %20, %81 ; [#uses=1]
- %105 = fmul float %8, %79 ; [#uses=1]
- %106 = fmul float %23, %81 ; [#uses=1]
- %107 = fmul float %11, %79 ; [#uses=1]
- %108 = fmul float %17, %75 ; [#uses=1]
- %109 = fmul float %5, %73 ; [#uses=1]
- %110 = fmul float %20, %75 ; [#uses=1]
- %111 = fmul float %8, %73 ; [#uses=1]
- %112 = fmul float %23, %75 ; [#uses=1]
- %113 = fmul float %11, %73 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %115 = fmul float %89, %47 ; [#uses=1]
- %116 = fadd float %91, %90 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %118 = fmul float %83, %47 ; [#uses=1]
- %119 = fadd float %93, %92 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %121 = fmul float %77, %47 ; [#uses=1]
- %122 = fadd float %95, %94 ; [#uses=1]
- %123 = fmul float %29, %89 ; [#uses=1]
- %124 = fadd float %97, %96 ; [#uses=1]
- %125 = fmul float %32, %89 ; [#uses=1]
- %126 = fadd float %99, %98 ; [#uses=1]
- %127 = fmul float %35, %89 ; [#uses=1]
- %128 = fadd float %101, %100 ; [#uses=1]
- %129 = fmul float %29, %83 ; [#uses=1]
- %130 = fadd float %103, %102 ; [#uses=1]
- %131 = fmul float %32, %83 ; [#uses=1]
- %132 = fadd float %105, %104 ; [#uses=1]
- %133 = fmul float %35, %83 ; [#uses=1]
- %134 = fadd float %107, %106 ; [#uses=1]
- %135 = fmul float %29, %77 ; [#uses=1]
- %136 = fadd float %109, %108 ; [#uses=1]
- %137 = fmul float %32, %77 ; [#uses=1]
- %138 = fadd float %111, %110 ; [#uses=1]
- %139 = fmul float %35, %77 ; [#uses=1]
- %140 = fadd float %113, %112 ; [#uses=1]
- %141 = load float* %114, align 4 ; [#uses=1]
- %142 = fadd float %116, %115 ; [#uses=1]
- %143 = load float* %117, align 4 ; [#uses=1]
- %144 = fadd float %119, %118 ; [#uses=1]
- %145 = load float* %120, align 4 ; [#uses=1]
- %146 = fadd float %122, %121 ; [#uses=1]
- %147 = fadd float %124, %123 ; [#uses=1]
- %148 = fadd float %126, %125 ; [#uses=1]
- %149 = fadd float %128, %127 ; [#uses=1]
- %150 = fadd float %130, %129 ; [#uses=1]
- %151 = fadd float %132, %131 ; [#uses=1]
- %152 = fadd float %134, %133 ; [#uses=1]
- %153 = fadd float %136, %135 ; [#uses=1]
- %154 = fadd float %138, %137 ; [#uses=1]
- %155 = fadd float %140, %139 ; [#uses=1]
- %156 = fadd float %142, %141 ; [#uses=1]
- %157 = fadd float %144, %143 ; [#uses=1]
- %158 = fadd float %146, %145 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %147, float* %159, align 4
- %160 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %148, float* %160, align 4
- %161 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %149, float* %161, align 4
- %162 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %162, align 4
- %163 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %150, float* %163, align 4
- %164 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %151, float* %164, align 4
- %165 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %152, float* %165, align 4
- %166 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %166, align 4
- %167 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %153, float* %167, align 4
- %168 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %154, float* %168, align 4
- %169 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %155, float* %169, align 4
- %170 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %170, align 4
- %171 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %156, float* %171, align 4
- %172 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %157, float* %172, align 4
- %173 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %158, float* %173, align 4
- %174 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %174, align 4
- %175 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %176 = load %struct.btRigidBody** %175, align 4 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btRigidBody* %176, i32 0, i32 0, i32 1 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btGeneric6DofConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %179 = load %struct.btRigidBody** %178, align 4 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btRigidBody* %179, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraint19calculateTransformsERK11btTransformS2_(%struct.btGeneric6DofConstraint* %this, %struct.btTransform* %180, %struct.btTransform* %177) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btGeneric6DofConstraintC1ER11btRigidBodyRK11btTransformb(%struct.btGeneric6DofConstraint* %this, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameB) align 2 {
-entry:
- tail call void @_ZN23btGeneric6DofConstraintC2ER11btRigidBodyRK11btTransformb(%struct.btGeneric6DofConstraint* %this, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameB)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btGeneric6DofConstraintC1ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInA, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-entry:
- tail call void @_ZN23btGeneric6DofConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInA, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameA)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btGeneric6DofSpringConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofSpringConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInA, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-return:
- %0 = bitcast %struct.btGeneric6DofSpringConstraint* %this to %struct.btGeneric6DofConstraint* ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofConstraint* %0, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInA, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameA)
- %1 = bitcast %struct.btGeneric6DofSpringConstraint* %this to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV29btGeneric6DofSpringConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %scevgep = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %scevgep4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %scevgep5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- store i8 0, i8* %scevgep, align 1
- store float 0.000000e+00, float* %scevgep4, align 4
- store float 0.000000e+00, float* %scevgep5, align 4
- store float 1.000000e+00, float* %scevgep6, align 4
- %scevgep.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %scevgep4.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %scevgep5.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %scevgep6.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i8 0, i8* %scevgep.1, align 1
- store float 0.000000e+00, float* %scevgep4.1, align 4
- store float 0.000000e+00, float* %scevgep5.1, align 4
- store float 1.000000e+00, float* %scevgep6.1, align 4
- %scevgep.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %scevgep4.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- %scevgep5.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- %scevgep6.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i8 0, i8* %scevgep.2, align 1
- store float 0.000000e+00, float* %scevgep4.2, align 4
- store float 0.000000e+00, float* %scevgep5.2, align 4
- store float 1.000000e+00, float* %scevgep6.2, align 4
- %scevgep.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %scevgep4.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %scevgep5.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %scevgep6.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- store i8 0, i8* %scevgep.3, align 1
- store float 0.000000e+00, float* %scevgep4.3, align 4
- store float 0.000000e+00, float* %scevgep5.3, align 4
- store float 1.000000e+00, float* %scevgep6.3, align 4
- %scevgep.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %scevgep4.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %scevgep5.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %scevgep6.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 0, i8* %scevgep.4, align 1
- store float 0.000000e+00, float* %scevgep4.4, align 4
- store float 0.000000e+00, float* %scevgep5.4, align 4
- store float 1.000000e+00, float* %scevgep6.4, align 4
- %scevgep.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 5 ; [#uses=1]
- %scevgep4.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 5 ; [#uses=1]
- %scevgep5.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 5 ; [#uses=1]
- %scevgep6.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 5 ; [#uses=1]
- store i8 0, i8* %scevgep.5, align 1
- store float 0.000000e+00, float* %scevgep4.5, align 4
- store float 0.000000e+00, float* %scevgep5.5, align 4
- store float 1.000000e+00, float* %scevgep6.5, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btGeneric6DofSpringConstraint12enableSpringEib(%struct.btGeneric6DofSpringConstraint* nocapture %this, i32 %index, i8 zeroext %onOff) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 %index ; [#uses=1]
- store i8 %onOff, i8* %0, align 1
- %1 = icmp slt i32 %index, 3 ; [#uses=1]
- br i1 %1, label %bb, label %bb1
-
-bb: ; preds = %entry
- %.sum = add i32 %index, 776 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 %.sum ; [#uses=1]
- store i8 %onOff, i8* %2, align 1
- ret void
-
-bb1: ; preds = %entry
- %3 = add nsw i32 %index, -3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 856 ; [#uses=1]
- %5 = bitcast i8* %4 to [3 x %struct.btRotationalLimitMotor]* ; [#uses=1]
- %6 = getelementptr inbounds [3 x %struct.btRotationalLimitMotor]* %5, i32 0, i32 %3, i32 11 ; [#uses=1]
- store i8 %onOff, i8* %6, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btGeneric6DofSpringConstraint12setStiffnessEif(%struct.btGeneric6DofSpringConstraint* nocapture %this, i32 %index, float %stiffness) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 %index ; [#uses=1]
- store float %stiffness, float* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btGeneric6DofSpringConstraint10setDampingEif(%struct.btGeneric6DofSpringConstraint* nocapture %this, i32 %index, float %damping) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 %index ; [#uses=1]
- store float %damping, float* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN29btGeneric6DofSpringConstraint19setEquilibriumPointEif(%struct.btGeneric6DofSpringConstraint* nocapture %this, i32 %index, float %val) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 %index ; [#uses=1]
- store float %val, float* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btGeneric6DofSpringConstraint21internalUpdateSpringsEPN17btTypedConstraint17btConstraintInfo2E(%struct.btGeneric6DofSpringConstraint* nocapture %this, %"struct.btTypedConstraint::btConstraintInfo2"* nocapture %info) nounwind align 2 {
-bb.nph18:
- %0 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=6]
- %1 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 12 ; [#uses=3]
- %scevgep42 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %2 = load i8* %scevgep42, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb.nph18
- %scevgep40 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 796 ; [#uses=1]
- %scevgep37 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 780 ; [#uses=1]
- %scevgep34 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1244 ; [#uses=1]
- %scevgep45 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- %scevgep44 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- %scevgep43 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %scevgep4041 = bitcast i8* %scevgep40 to float* ; [#uses=1]
- %scevgep3738 = bitcast i8* %scevgep37 to float* ; [#uses=1]
- %scevgep3435 = bitcast i8* %scevgep34 to float* ; [#uses=1]
- %3 = load float* %scevgep3435, align 4 ; [#uses=1]
- %4 = load float* %scevgep43, align 4 ; [#uses=1]
- %5 = fsub float %3, %4 ; [#uses=1]
- %6 = load float* %scevgep44, align 4 ; [#uses=1]
- %7 = fmul float %6, %5 ; [#uses=2]
- %8 = load float* %0, align 4 ; [#uses=1]
- %9 = load float* %scevgep45, align 4 ; [#uses=1]
- %10 = fmul float %8, %9 ; [#uses=1]
- %11 = load i32* %1, align 4 ; [#uses=1]
- %12 = sitofp i32 %11 to float ; [#uses=1]
- %13 = fdiv float %10, %12 ; [#uses=1]
- %14 = fmul float %13, %7 ; [#uses=1]
- store float %14, float* %scevgep3738, align 4
- %15 = tail call float @fabsf(float %7) nounwind readnone ; [#uses=1]
- %16 = load float* %0, align 4 ; [#uses=1]
- %17 = fdiv float %15, %16 ; [#uses=1]
- store float %17, float* %scevgep4041, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb.nph18
- %scevgep42.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %18 = load i8* %scevgep42.1, align 1 ; [#uses=1]
- %toBool.1 = icmp eq i8 %18, 0 ; [#uses=1]
- br i1 %toBool.1, label %bb2.1, label %bb1.1
-
-bb.nph: ; preds = %bb1.2, %bb2.1
- %19 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=6]
- %20 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 12 ; [#uses=3]
- %scevgep29 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %21 = load i8* %scevgep29, align 1 ; [#uses=1]
- %toBool6 = icmp eq i8 %21, 0 ; [#uses=1]
- br i1 %toBool6, label %bb12, label %bb7
-
-bb7: ; preds = %bb.nph
- %scevgep26 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 868 ; [#uses=1]
- %scevgep23 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 864 ; [#uses=1]
- %scevgep = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1180 ; [#uses=1]
- %scevgep32 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %scevgep31 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %scevgep30 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %scevgep2627 = bitcast i8* %scevgep26 to float* ; [#uses=1]
- %scevgep2324 = bitcast i8* %scevgep23 to float* ; [#uses=1]
- %scevgep20 = bitcast i8* %scevgep to float* ; [#uses=1]
- %22 = load float* %scevgep20, align 4 ; [#uses=1]
- %23 = load float* %scevgep30, align 4 ; [#uses=1]
- %24 = fsub float %22, %23 ; [#uses=1]
- %25 = fsub float -0.000000e+00, %24 ; [#uses=1]
- %26 = load float* %scevgep31, align 4 ; [#uses=1]
- %27 = fmul float %26, %25 ; [#uses=2]
- %28 = load float* %19, align 4 ; [#uses=1]
- %29 = load float* %scevgep32, align 4 ; [#uses=1]
- %30 = fmul float %28, %29 ; [#uses=1]
- %31 = load i32* %20, align 4 ; [#uses=1]
- %32 = sitofp i32 %31 to float ; [#uses=1]
- %33 = fdiv float %30, %32 ; [#uses=1]
- %34 = fmul float %33, %27 ; [#uses=1]
- store float %34, float* %scevgep2324, align 4
- %35 = tail call float @fabsf(float %27) nounwind readnone ; [#uses=1]
- %36 = load float* %19, align 4 ; [#uses=1]
- %37 = fdiv float %35, %36 ; [#uses=1]
- store float %37, float* %scevgep2627, align 4
- br label %bb12
-
-bb12: ; preds = %bb7, %bb.nph
- %scevgep29.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %38 = load i8* %scevgep29.1, align 1 ; [#uses=1]
- %toBool6.1 = icmp eq i8 %38, 0 ; [#uses=1]
- br i1 %toBool6.1, label %bb12.1, label %bb7.1
-
-return: ; preds = %bb12.1
- ret void
-
-bb12.1: ; preds = %bb7.1, %bb12
- %scevgep29.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 5 ; [#uses=1]
- %39 = load i8* %scevgep29.2, align 1 ; [#uses=1]
- %toBool6.2 = icmp eq i8 %39, 0 ; [#uses=1]
- br i1 %toBool6.2, label %return, label %bb7.2
-
-bb7.1: ; preds = %bb12
- %scevgep26.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 932 ; [#uses=1]
- %scevgep23.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 928 ; [#uses=1]
- %scevgep.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1184 ; [#uses=1]
- %scevgep32.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %scevgep31.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %scevgep30.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %scevgep2627.1 = bitcast i8* %scevgep26.1 to float* ; [#uses=1]
- %scevgep2324.1 = bitcast i8* %scevgep23.1 to float* ; [#uses=1]
- %scevgep20.1 = bitcast i8* %scevgep.1 to float* ; [#uses=1]
- %40 = load float* %scevgep20.1, align 4 ; [#uses=1]
- %41 = load float* %scevgep30.1, align 4 ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=1]
- %43 = fsub float -0.000000e+00, %42 ; [#uses=1]
- %44 = load float* %scevgep31.1, align 4 ; [#uses=1]
- %45 = fmul float %44, %43 ; [#uses=2]
- %46 = load float* %19, align 4 ; [#uses=1]
- %47 = load float* %scevgep32.1, align 4 ; [#uses=1]
- %48 = fmul float %46, %47 ; [#uses=1]
- %49 = load i32* %20, align 4 ; [#uses=1]
- %50 = sitofp i32 %49 to float ; [#uses=1]
- %51 = fdiv float %48, %50 ; [#uses=1]
- %52 = fmul float %51, %45 ; [#uses=1]
- store float %52, float* %scevgep2324.1, align 4
- %53 = tail call float @fabsf(float %45) nounwind readnone ; [#uses=1]
- %54 = load float* %19, align 4 ; [#uses=1]
- %55 = fdiv float %53, %54 ; [#uses=1]
- store float %55, float* %scevgep2627.1, align 4
- br label %bb12.1
-
-bb7.2: ; preds = %bb12.1
- %scevgep26.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 996 ; [#uses=1]
- %scevgep23.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 992 ; [#uses=1]
- %scevgep.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1188 ; [#uses=1]
- %scevgep32.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 5 ; [#uses=1]
- %scevgep31.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 5 ; [#uses=1]
- %scevgep30.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 5 ; [#uses=1]
- %scevgep2627.2 = bitcast i8* %scevgep26.2 to float* ; [#uses=1]
- %scevgep2324.2 = bitcast i8* %scevgep23.2 to float* ; [#uses=1]
- %scevgep20.2 = bitcast i8* %scevgep.2 to float* ; [#uses=1]
- %56 = load float* %scevgep20.2, align 4 ; [#uses=1]
- %57 = load float* %scevgep30.2, align 4 ; [#uses=1]
- %58 = fsub float %56, %57 ; [#uses=1]
- %59 = fsub float -0.000000e+00, %58 ; [#uses=1]
- %60 = load float* %scevgep31.2, align 4 ; [#uses=1]
- %61 = fmul float %60, %59 ; [#uses=2]
- %62 = load float* %19, align 4 ; [#uses=1]
- %63 = load float* %scevgep32.2, align 4 ; [#uses=1]
- %64 = fmul float %62, %63 ; [#uses=1]
- %65 = load i32* %20, align 4 ; [#uses=1]
- %66 = sitofp i32 %65 to float ; [#uses=1]
- %67 = fdiv float %64, %66 ; [#uses=1]
- %68 = fmul float %67, %61 ; [#uses=1]
- store float %68, float* %scevgep2324.2, align 4
- %69 = tail call float @fabsf(float %61) nounwind readnone ; [#uses=1]
- %70 = load float* %19, align 4 ; [#uses=1]
- %71 = fdiv float %69, %70 ; [#uses=1]
- store float %71, float* %scevgep2627.2, align 4
- ret void
-
-bb2.1: ; preds = %bb1.1, %bb2
- %scevgep42.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %72 = load i8* %scevgep42.2, align 1 ; [#uses=1]
- %toBool.2 = icmp eq i8 %72, 0 ; [#uses=1]
- br i1 %toBool.2, label %bb.nph, label %bb1.2
-
-bb1.1: ; preds = %bb2
- %scevgep40.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 800 ; [#uses=1]
- %scevgep37.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 784 ; [#uses=1]
- %scevgep34.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1248 ; [#uses=1]
- %scevgep45.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %scevgep44.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %scevgep43.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %scevgep4041.1 = bitcast i8* %scevgep40.1 to float* ; [#uses=1]
- %scevgep3738.1 = bitcast i8* %scevgep37.1 to float* ; [#uses=1]
- %scevgep3435.1 = bitcast i8* %scevgep34.1 to float* ; [#uses=1]
- %73 = load float* %scevgep3435.1, align 4 ; [#uses=1]
- %74 = load float* %scevgep43.1, align 4 ; [#uses=1]
- %75 = fsub float %73, %74 ; [#uses=1]
- %76 = load float* %scevgep44.1, align 4 ; [#uses=1]
- %77 = fmul float %76, %75 ; [#uses=2]
- %78 = load float* %0, align 4 ; [#uses=1]
- %79 = load float* %scevgep45.1, align 4 ; [#uses=1]
- %80 = fmul float %78, %79 ; [#uses=1]
- %81 = load i32* %1, align 4 ; [#uses=1]
- %82 = sitofp i32 %81 to float ; [#uses=1]
- %83 = fdiv float %80, %82 ; [#uses=1]
- %84 = fmul float %83, %77 ; [#uses=1]
- store float %84, float* %scevgep3738.1, align 4
- %85 = tail call float @fabsf(float %77) nounwind readnone ; [#uses=1]
- %86 = load float* %0, align 4 ; [#uses=1]
- %87 = fdiv float %85, %86 ; [#uses=1]
- store float %87, float* %scevgep4041.1, align 4
- br label %bb2.1
-
-bb1.2: ; preds = %bb2.1
- %scevgep40.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 804 ; [#uses=1]
- %scevgep37.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 788 ; [#uses=1]
- %scevgep34.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1252 ; [#uses=1]
- %scevgep45.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- %scevgep44.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- %scevgep43.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- %scevgep4041.2 = bitcast i8* %scevgep40.2 to float* ; [#uses=1]
- %scevgep3738.2 = bitcast i8* %scevgep37.2 to float* ; [#uses=1]
- %scevgep3435.2 = bitcast i8* %scevgep34.2 to float* ; [#uses=1]
- %88 = load float* %scevgep3435.2, align 4 ; [#uses=1]
- %89 = load float* %scevgep43.2, align 4 ; [#uses=1]
- %90 = fsub float %88, %89 ; [#uses=1]
- %91 = load float* %scevgep44.2, align 4 ; [#uses=1]
- %92 = fmul float %91, %90 ; [#uses=2]
- %93 = load float* %0, align 4 ; [#uses=1]
- %94 = load float* %scevgep45.2, align 4 ; [#uses=1]
- %95 = fmul float %93, %94 ; [#uses=1]
- %96 = load i32* %1, align 4 ; [#uses=1]
- %97 = sitofp i32 %96 to float ; [#uses=1]
- %98 = fdiv float %95, %97 ; [#uses=1]
- %99 = fmul float %98, %92 ; [#uses=1]
- store float %99, float* %scevgep3738.2, align 4
- %100 = tail call float @fabsf(float %92) nounwind readnone ; [#uses=1]
- %101 = load float* %0, align 4 ; [#uses=1]
- %102 = fdiv float %100, %101 ; [#uses=1]
- store float %102, float* %scevgep4041.2, align 4
- br label %bb.nph
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN29btGeneric6DofSpringConstraintD0Ev(%struct.btGeneric6DofSpringConstraint* %this) nounwind align 2 {
-entry:
- %0 = bitcast %struct.btGeneric6DofSpringConstraint* %this to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN29btGeneric6DofSpringConstraintD1Ev(%struct.btGeneric6DofSpringConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = bitcast %struct.btGeneric6DofSpringConstraint* %this to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btGeneric6DofSpringConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btGeneric6DofSpringConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info) align 2 {
-entry:
- tail call void @_ZN29btGeneric6DofSpringConstraint21internalUpdateSpringsEPN17btTypedConstraint17btConstraintInfo2E(%struct.btGeneric6DofSpringConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info) nounwind
- %0 = bitcast %struct.btGeneric6DofSpringConstraint* %this to %struct.btGeneric6DofConstraint* ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btGeneric6DofConstraint* %0, %"struct.btTypedConstraint::btConstraintInfo2"* %info)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN29btGeneric6DofSpringConstraint19setEquilibriumPointEi(%struct.btGeneric6DofSpringConstraint* %this, i32 %index) align 2 {
-entry:
- %0 = bitcast %struct.btGeneric6DofSpringConstraint* %this to %struct.btGeneric6DofConstraint* ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraint19calculateTransformsEv(%struct.btGeneric6DofConstraint* %0)
- %1 = icmp slt i32 %index, 3 ; [#uses=1]
- br i1 %1, label %bb, label %bb1
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1244 ; [#uses=1]
- %3 = bitcast i8* %2 to float* ; [#uses=1]
- %4 = getelementptr inbounds float* %3, i32 %index ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 %index ; [#uses=1]
- store float %5, float* %6, align 4
- ret void
-
-bb1: ; preds = %entry
- %7 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1180 ; [#uses=1]
- %8 = bitcast i8* %7 to float* ; [#uses=1]
- %9 = add nsw i32 %index, -3 ; [#uses=1]
- %10 = getelementptr inbounds float* %8, i32 %9 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 %index ; [#uses=1]
- store float %11, float* %12, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN29btGeneric6DofSpringConstraint19setEquilibriumPointEv(%struct.btGeneric6DofSpringConstraint* %this) align 2 {
-return:
- %0 = bitcast %struct.btGeneric6DofSpringConstraint* %this to %struct.btGeneric6DofConstraint* ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraint19calculateTransformsEv(%struct.btGeneric6DofConstraint* %0)
- %scevgep14 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1244 ; [#uses=1]
- %scevgep1415 = bitcast i8* %scevgep14 to float* ; [#uses=1]
- %scevgep16 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %1 = load float* %scevgep1415, align 4 ; [#uses=1]
- store float %1, float* %scevgep16, align 4
- %scevgep14.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1248 ; [#uses=1]
- %scevgep1415.1 = bitcast i8* %scevgep14.1 to float* ; [#uses=1]
- %scevgep16.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %2 = load float* %scevgep1415.1, align 4 ; [#uses=1]
- store float %2, float* %scevgep16.1, align 4
- %scevgep14.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1252 ; [#uses=1]
- %scevgep1415.2 = bitcast i8* %scevgep14.2 to float* ; [#uses=1]
- %scevgep16.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- %3 = load float* %scevgep1415.2, align 4 ; [#uses=1]
- store float %3, float* %scevgep16.2, align 4
- %scevgep = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1180 ; [#uses=1]
- %scevgep10 = bitcast i8* %scevgep to float* ; [#uses=1]
- %scevgep12 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %4 = load float* %scevgep10, align 4 ; [#uses=1]
- store float %4, float* %scevgep12, align 4
- %scevgep.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1184 ; [#uses=1]
- %scevgep10.1 = bitcast i8* %scevgep.1 to float* ; [#uses=1]
- %scevgep12.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %5 = load float* %scevgep10.1, align 4 ; [#uses=1]
- store float %5, float* %scevgep12.1, align 4
- %scevgep.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 0, i32 1188 ; [#uses=1]
- %scevgep10.2 = bitcast i8* %scevgep.2 to float* ; [#uses=1]
- %scevgep12.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 5 ; [#uses=1]
- %6 = load float* %scevgep10.2, align 4 ; [#uses=1]
- store float %6, float* %scevgep12.2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN29btGeneric6DofSpringConstraintC1ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofSpringConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInA, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-return:
- %0 = bitcast %struct.btGeneric6DofSpringConstraint* %this to %struct.btGeneric6DofConstraint* ; [#uses=1]
- tail call void @_ZN23btGeneric6DofConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofConstraint* %0, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInA, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameA)
- %1 = bitcast %struct.btGeneric6DofSpringConstraint* %this to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV29btGeneric6DofSpringConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %scevgep = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %scevgep4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %scevgep5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- %scevgep6 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- store i8 0, i8* %scevgep, align 1
- store float 0.000000e+00, float* %scevgep4, align 4
- store float 0.000000e+00, float* %scevgep5, align 4
- store float 1.000000e+00, float* %scevgep6, align 4
- %scevgep.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %scevgep4.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %scevgep5.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %scevgep6.1 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i8 0, i8* %scevgep.1, align 1
- store float 0.000000e+00, float* %scevgep4.1, align 4
- store float 0.000000e+00, float* %scevgep5.1, align 4
- store float 1.000000e+00, float* %scevgep6.1, align 4
- %scevgep.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- %scevgep4.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- %scevgep5.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- %scevgep6.2 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i8 0, i8* %scevgep.2, align 1
- store float 0.000000e+00, float* %scevgep4.2, align 4
- store float 0.000000e+00, float* %scevgep5.2, align 4
- store float 1.000000e+00, float* %scevgep6.2, align 4
- %scevgep.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %scevgep4.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %scevgep5.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %scevgep6.3 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- store i8 0, i8* %scevgep.3, align 1
- store float 0.000000e+00, float* %scevgep4.3, align 4
- store float 0.000000e+00, float* %scevgep5.3, align 4
- store float 1.000000e+00, float* %scevgep6.3, align 4
- %scevgep.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %scevgep4.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %scevgep5.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %scevgep6.4 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 0, i8* %scevgep.4, align 1
- store float 0.000000e+00, float* %scevgep4.4, align 4
- store float 0.000000e+00, float* %scevgep5.4, align 4
- store float 1.000000e+00, float* %scevgep6.4, align 4
- %scevgep.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 1, i32 5 ; [#uses=1]
- %scevgep4.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 2, i32 5 ; [#uses=1]
- %scevgep5.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 3, i32 5 ; [#uses=1]
- %scevgep6.5 = getelementptr %struct.btGeneric6DofSpringConstraint* %this, i32 0, i32 4, i32 5 ; [#uses=1]
- store i8 0, i8* %scevgep.5, align 1
- store float 0.000000e+00, float* %scevgep4.5, align 4
- store float 0.000000e+00, float* %scevgep5.5, align 4
- store float 1.000000e+00, float* %scevgep6.5, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btHinge2ConstraintC2ER11btRigidBodyS1_R9btVector3S3_S3_(%struct.btHinge2Constraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %anchor, %struct.btQuadWord* nocapture %axis1, %struct.btQuadWord* nocapture %axis2) align 2 {
-invcont3:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = call %struct.btTransform* @_ZN11btTransform11getIdentityEv() ; [#uses=0]
- %3 = call %struct.btTransform* @_ZN11btTransform11getIdentityEv() ; [#uses=0]
- %4 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0 ; [#uses=5]
- call void @_ZN29btGeneric6DofSpringConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofSpringConstraint* %4, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, %struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i8 zeroext 1)
- %5 = bitcast %struct.btHinge2Constraint* %this to i32 (...)*** ; [#uses=2]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV18btHinge2Constraint, i32 0, i32 2), i32 (...)*** %5, align 4
- %6 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 0 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 2 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 3 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 0 ; [#uses=3]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 1 ; [#uses=3]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 2 ; [#uses=3]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 3 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 0 ; [#uses=3]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 1 ; [#uses=3]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 2 ; [#uses=3]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 3 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = load float* %19, align 4 ; [#uses=3]
- %43 = fmul float %42, %42 ; [#uses=1]
- %44 = load float* %22, align 4 ; [#uses=3]
- %45 = fmul float %44, %44 ; [#uses=1]
- %46 = fadd float %43, %45 ; [#uses=1]
- %47 = load float* %25, align 4 ; [#uses=3]
- %48 = fmul float %47, %47 ; [#uses=1]
- %49 = fadd float %46, %48 ; [#uses=1]
- %50 = call float @sqrtf(float %49) nounwind readonly ; [#uses=1]
- %51 = fdiv float 1.000000e+00, %50 ; [#uses=3]
- %52 = fmul float %42, %51 ; [#uses=9]
- store float %52, float* %19, align 4
- %53 = fmul float %44, %51 ; [#uses=9]
- store float %53, float* %22, align 4
- %54 = fmul float %47, %51 ; [#uses=9]
- store float %54, float* %25, align 4
- %55 = load float* %31, align 4 ; [#uses=3]
- %56 = fmul float %55, %55 ; [#uses=1]
- %57 = load float* %34, align 4 ; [#uses=3]
- %58 = fmul float %57, %57 ; [#uses=1]
- %59 = fadd float %56, %58 ; [#uses=1]
- %60 = load float* %37, align 4 ; [#uses=3]
- %61 = fmul float %60, %60 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=1]
- %63 = call float @sqrtf(float %62) nounwind readonly ; [#uses=1]
- %64 = fdiv float 1.000000e+00, %63 ; [#uses=3]
- %65 = fmul float %55, %64 ; [#uses=9]
- store float %65, float* %31, align 4
- %66 = fmul float %57, %64 ; [#uses=9]
- store float %66, float* %34, align 4
- %67 = fmul float %60, %64 ; [#uses=9]
- store float %67, float* %37, align 4
- %68 = fmul float %52, %66 ; [#uses=1]
- %69 = fmul float %53, %65 ; [#uses=1]
- %70 = fsub float %68, %69 ; [#uses=6]
- %71 = fmul float %54, %65 ; [#uses=1]
- %72 = fmul float %52, %67 ; [#uses=1]
- %73 = fsub float %71, %72 ; [#uses=6]
- %74 = fmul float %53, %67 ; [#uses=1]
- %75 = fmul float %54, %66 ; [#uses=1]
- %76 = fsub float %74, %75 ; [#uses=6]
- %77 = load float* %7, align 4 ; [#uses=6]
- %78 = load float* %10, align 4 ; [#uses=6]
- %79 = load float* %13, align 4 ; [#uses=6]
- %80 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=5]
- %90 = load float* %87, align 4 ; [#uses=5]
- %91 = load float* %86, align 4 ; [#uses=5]
- %92 = load float* %85, align 4 ; [#uses=5]
- %93 = load float* %84, align 4 ; [#uses=5]
- %94 = load float* %83, align 4 ; [#uses=5]
- %95 = load float* %82, align 4 ; [#uses=5]
- %96 = load float* %81, align 4 ; [#uses=5]
- %97 = load float* %80, align 4 ; [#uses=5]
- %98 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fsub float -0.000000e+00, %99 ; [#uses=3]
- %101 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fsub float -0.000000e+00, %102 ; [#uses=3]
- %104 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fsub float -0.000000e+00, %105 ; [#uses=3]
- %107 = fmul float %90, %78 ; [#uses=1]
- %108 = fmul float %89, %77 ; [#uses=1]
- %109 = fmul float %93, %78 ; [#uses=1]
- %110 = fmul float %92, %77 ; [#uses=1]
- %111 = fmul float %96, %78 ; [#uses=1]
- %112 = fmul float %95, %77 ; [#uses=1]
- %113 = fmul float %95, %106 ; [#uses=1]
- %114 = fmul float %96, %103 ; [#uses=1]
- %115 = fmul float %92, %106 ; [#uses=1]
- %116 = fmul float %93, %103 ; [#uses=1]
- %117 = fmul float %89, %106 ; [#uses=1]
- %118 = fmul float %90, %103 ; [#uses=1]
- %119 = fmul float %66, %90 ; [#uses=1]
- %120 = fmul float %65, %89 ; [#uses=1]
- %121 = fmul float %73, %90 ; [#uses=1]
- %122 = fmul float %76, %89 ; [#uses=1]
- %123 = fmul float %53, %90 ; [#uses=1]
- %124 = fmul float %52, %89 ; [#uses=1]
- %125 = fmul float %66, %93 ; [#uses=1]
- %126 = fmul float %65, %92 ; [#uses=1]
- %127 = fmul float %73, %93 ; [#uses=1]
- %128 = fmul float %76, %92 ; [#uses=1]
- %129 = fmul float %53, %93 ; [#uses=1]
- %130 = fmul float %52, %92 ; [#uses=1]
- %131 = fmul float %66, %96 ; [#uses=1]
- %132 = fmul float %65, %95 ; [#uses=1]
- %133 = fmul float %73, %96 ; [#uses=1]
- %134 = fmul float %76, %95 ; [#uses=1]
- %135 = fmul float %53, %96 ; [#uses=1]
- %136 = fmul float %52, %95 ; [#uses=1]
- %137 = fmul float %91, %79 ; [#uses=1]
- %138 = fadd float %108, %107 ; [#uses=1]
- %139 = fmul float %94, %79 ; [#uses=1]
- %140 = fadd float %110, %109 ; [#uses=1]
- %141 = fmul float %97, %79 ; [#uses=1]
- %142 = fadd float %112, %111 ; [#uses=1]
- %143 = fadd float %113, %114 ; [#uses=1]
- %144 = fmul float %97, %100 ; [#uses=1]
- %145 = fadd float %115, %116 ; [#uses=1]
- %146 = fmul float %94, %100 ; [#uses=1]
- %147 = fadd float %117, %118 ; [#uses=1]
- %148 = fmul float %91, %100 ; [#uses=1]
- %149 = fmul float %67, %91 ; [#uses=1]
- %150 = fadd float %120, %119 ; [#uses=1]
- %151 = fmul float %70, %91 ; [#uses=1]
- %152 = fadd float %122, %121 ; [#uses=1]
- %153 = fmul float %54, %91 ; [#uses=1]
- %154 = fadd float %124, %123 ; [#uses=1]
- %155 = fmul float %67, %94 ; [#uses=1]
- %156 = fadd float %126, %125 ; [#uses=1]
- %157 = fmul float %70, %94 ; [#uses=1]
- %158 = fadd float %128, %127 ; [#uses=1]
- %159 = fmul float %54, %94 ; [#uses=1]
- %160 = fadd float %130, %129 ; [#uses=1]
- %161 = fmul float %67, %97 ; [#uses=1]
- %162 = fadd float %132, %131 ; [#uses=1]
- %163 = fmul float %70, %97 ; [#uses=1]
- %164 = fadd float %134, %133 ; [#uses=1]
- %165 = fmul float %54, %97 ; [#uses=1]
- %166 = fadd float %136, %135 ; [#uses=1]
- %167 = fadd float %138, %137 ; [#uses=1]
- %168 = fadd float %140, %139 ; [#uses=1]
- %169 = fadd float %142, %141 ; [#uses=1]
- %170 = fadd float %143, %144 ; [#uses=1]
- %171 = fadd float %145, %146 ; [#uses=1]
- %172 = fadd float %147, %148 ; [#uses=1]
- %173 = fadd float %150, %149 ; [#uses=1]
- %174 = fadd float %152, %151 ; [#uses=1]
- %175 = fadd float %154, %153 ; [#uses=1]
- %176 = fadd float %156, %155 ; [#uses=1]
- %177 = fadd float %158, %157 ; [#uses=1]
- %178 = fadd float %160, %159 ; [#uses=1]
- %179 = fadd float %162, %161 ; [#uses=1]
- %180 = fadd float %164, %163 ; [#uses=1]
- %181 = fadd float %166, %165 ; [#uses=1]
- %182 = fadd float %167, %172 ; [#uses=1]
- %183 = fadd float %168, %171 ; [#uses=1]
- %184 = fadd float %169, %170 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 36 ; [#uses=1]
- %186 = bitcast i8* %185 to float* ; [#uses=1]
- store float %173, float* %186, align 4
- %187 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 40 ; [#uses=1]
- %188 = bitcast i8* %187 to float* ; [#uses=1]
- store float %174, float* %188, align 4
- %189 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 44 ; [#uses=1]
- %190 = bitcast i8* %189 to float* ; [#uses=1]
- store float %175, float* %190, align 4
- %191 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 48 ; [#uses=1]
- %192 = bitcast i8* %191 to float* ; [#uses=1]
- store float 0.000000e+00, float* %192, align 4
- %193 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 52 ; [#uses=1]
- %194 = bitcast i8* %193 to float* ; [#uses=1]
- store float %176, float* %194, align 4
- %195 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 56 ; [#uses=1]
- %196 = bitcast i8* %195 to float* ; [#uses=1]
- store float %177, float* %196, align 4
- %197 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 60 ; [#uses=1]
- %198 = bitcast i8* %197 to float* ; [#uses=1]
- store float %178, float* %198, align 4
- %199 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 64 ; [#uses=1]
- %200 = bitcast i8* %199 to float* ; [#uses=1]
- store float 0.000000e+00, float* %200, align 4
- %201 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 68 ; [#uses=1]
- %202 = bitcast i8* %201 to float* ; [#uses=1]
- store float %179, float* %202, align 4
- %203 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 72 ; [#uses=1]
- %204 = bitcast i8* %203 to float* ; [#uses=1]
- store float %180, float* %204, align 4
- %205 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 76 ; [#uses=1]
- %206 = bitcast i8* %205 to float* ; [#uses=1]
- store float %181, float* %206, align 4
- %207 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 80 ; [#uses=1]
- %208 = bitcast i8* %207 to float* ; [#uses=1]
- store float 0.000000e+00, float* %208, align 4
- %209 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 84 ; [#uses=1]
- %210 = bitcast i8* %209 to float* ; [#uses=1]
- store float %182, float* %210, align 4
- %211 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 88 ; [#uses=1]
- %212 = bitcast i8* %211 to float* ; [#uses=1]
- store float %183, float* %212, align 4
- %213 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 92 ; [#uses=1]
- %214 = bitcast i8* %213 to float* ; [#uses=1]
- store float %184, float* %214, align 4
- %215 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 96 ; [#uses=1]
- %216 = bitcast i8* %215 to float* ; [#uses=1]
- store float 0.000000e+00, float* %216, align 4
- %217 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %220 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %221 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %222 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %223 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %224 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %225 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %226 = load float* %225, align 4 ; [#uses=5]
- %227 = load float* %224, align 4 ; [#uses=5]
- %228 = load float* %223, align 4 ; [#uses=5]
- %229 = load float* %222, align 4 ; [#uses=5]
- %230 = load float* %221, align 4 ; [#uses=5]
- %231 = load float* %220, align 4 ; [#uses=5]
- %232 = load float* %219, align 4 ; [#uses=5]
- %233 = load float* %218, align 4 ; [#uses=5]
- %234 = load float* %217, align 4 ; [#uses=5]
- %235 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %236 = load float* %235, align 4 ; [#uses=1]
- %237 = fsub float -0.000000e+00, %236 ; [#uses=3]
- %238 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %239 = load float* %238, align 4 ; [#uses=1]
- %240 = fsub float -0.000000e+00, %239 ; [#uses=3]
- %241 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %242 = load float* %241, align 4 ; [#uses=1]
- %243 = fsub float -0.000000e+00, %242 ; [#uses=3]
- %244 = fmul float %227, %78 ; [#uses=1]
- %245 = fmul float %226, %77 ; [#uses=1]
- %246 = fmul float %230, %78 ; [#uses=1]
- %247 = fmul float %229, %77 ; [#uses=1]
- %248 = fmul float %233, %78 ; [#uses=1]
- %249 = fmul float %232, %77 ; [#uses=1]
- %250 = fmul float %232, %243 ; [#uses=1]
- %251 = fmul float %233, %240 ; [#uses=1]
- %252 = fmul float %229, %243 ; [#uses=1]
- %253 = fmul float %230, %240 ; [#uses=1]
- %254 = fmul float %226, %243 ; [#uses=1]
- %255 = fmul float %227, %240 ; [#uses=1]
- %256 = fmul float %66, %227 ; [#uses=1]
- %257 = fmul float %65, %226 ; [#uses=1]
- %258 = fmul float %73, %227 ; [#uses=1]
- %259 = fmul float %76, %226 ; [#uses=1]
- %260 = fmul float %53, %227 ; [#uses=1]
- %261 = fmul float %52, %226 ; [#uses=1]
- %262 = fmul float %66, %230 ; [#uses=1]
- %263 = fmul float %65, %229 ; [#uses=1]
- %264 = fmul float %73, %230 ; [#uses=1]
- %265 = fmul float %76, %229 ; [#uses=1]
- %266 = fmul float %53, %230 ; [#uses=1]
- %267 = fmul float %52, %229 ; [#uses=1]
- %268 = fmul float %66, %233 ; [#uses=1]
- %269 = fmul float %65, %232 ; [#uses=1]
- %270 = fmul float %73, %233 ; [#uses=1]
- %271 = fmul float %76, %232 ; [#uses=1]
- %272 = fmul float %53, %233 ; [#uses=1]
- %273 = fmul float %52, %232 ; [#uses=1]
- %274 = fmul float %228, %79 ; [#uses=1]
- %275 = fadd float %245, %244 ; [#uses=1]
- %276 = fmul float %231, %79 ; [#uses=1]
- %277 = fadd float %247, %246 ; [#uses=1]
- %278 = fmul float %234, %79 ; [#uses=1]
- %279 = fadd float %249, %248 ; [#uses=1]
- %280 = fadd float %250, %251 ; [#uses=1]
- %281 = fmul float %234, %237 ; [#uses=1]
- %282 = fadd float %252, %253 ; [#uses=1]
- %283 = fmul float %231, %237 ; [#uses=1]
- %284 = fadd float %254, %255 ; [#uses=1]
- %285 = fmul float %228, %237 ; [#uses=1]
- %286 = fmul float %67, %228 ; [#uses=1]
- %287 = fadd float %257, %256 ; [#uses=1]
- %288 = fmul float %70, %228 ; [#uses=1]
- %289 = fadd float %259, %258 ; [#uses=1]
- %290 = fmul float %54, %228 ; [#uses=1]
- %291 = fadd float %261, %260 ; [#uses=1]
- %292 = fmul float %67, %231 ; [#uses=1]
- %293 = fadd float %263, %262 ; [#uses=1]
- %294 = fmul float %70, %231 ; [#uses=1]
- %295 = fadd float %265, %264 ; [#uses=1]
- %296 = fmul float %54, %231 ; [#uses=1]
- %297 = fadd float %267, %266 ; [#uses=1]
- %298 = fmul float %67, %234 ; [#uses=1]
- %299 = fadd float %269, %268 ; [#uses=1]
- %300 = fmul float %70, %234 ; [#uses=1]
- %301 = fadd float %271, %270 ; [#uses=1]
- %302 = fmul float %54, %234 ; [#uses=1]
- %303 = fadd float %273, %272 ; [#uses=1]
- %304 = fadd float %275, %274 ; [#uses=1]
- %305 = fadd float %277, %276 ; [#uses=1]
- %306 = fadd float %279, %278 ; [#uses=1]
- %307 = fadd float %280, %281 ; [#uses=1]
- %308 = fadd float %282, %283 ; [#uses=1]
- %309 = fadd float %284, %285 ; [#uses=1]
- %310 = fadd float %287, %286 ; [#uses=1]
- %311 = fadd float %289, %288 ; [#uses=1]
- %312 = fadd float %291, %290 ; [#uses=1]
- %313 = fadd float %293, %292 ; [#uses=1]
- %314 = fadd float %295, %294 ; [#uses=1]
- %315 = fadd float %297, %296 ; [#uses=1]
- %316 = fadd float %299, %298 ; [#uses=1]
- %317 = fadd float %301, %300 ; [#uses=1]
- %318 = fadd float %303, %302 ; [#uses=1]
- %319 = fadd float %304, %309 ; [#uses=1]
- %320 = fadd float %305, %308 ; [#uses=1]
- %321 = fadd float %306, %307 ; [#uses=1]
- %322 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 100 ; [#uses=1]
- %323 = bitcast i8* %322 to float* ; [#uses=1]
- store float %310, float* %323, align 4
- %324 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 104 ; [#uses=1]
- %325 = bitcast i8* %324 to float* ; [#uses=1]
- store float %311, float* %325, align 4
- %326 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 108 ; [#uses=1]
- %327 = bitcast i8* %326 to float* ; [#uses=1]
- store float %312, float* %327, align 4
- %328 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 112 ; [#uses=1]
- %329 = bitcast i8* %328 to float* ; [#uses=1]
- store float 0.000000e+00, float* %329, align 4
- %330 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 116 ; [#uses=1]
- %331 = bitcast i8* %330 to float* ; [#uses=1]
- store float %313, float* %331, align 4
- %332 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 120 ; [#uses=1]
- %333 = bitcast i8* %332 to float* ; [#uses=1]
- store float %314, float* %333, align 4
- %334 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 124 ; [#uses=1]
- %335 = bitcast i8* %334 to float* ; [#uses=1]
- store float %315, float* %335, align 4
- %336 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 128 ; [#uses=1]
- %337 = bitcast i8* %336 to float* ; [#uses=1]
- store float 0.000000e+00, float* %337, align 4
- %338 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 132 ; [#uses=1]
- %339 = bitcast i8* %338 to float* ; [#uses=1]
- store float %316, float* %339, align 4
- %340 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 136 ; [#uses=1]
- %341 = bitcast i8* %340 to float* ; [#uses=1]
- store float %317, float* %341, align 4
- %342 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 140 ; [#uses=1]
- %343 = bitcast i8* %342 to float* ; [#uses=1]
- store float %318, float* %343, align 4
- %344 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 144 ; [#uses=1]
- %345 = bitcast i8* %344 to float* ; [#uses=1]
- store float 0.000000e+00, float* %345, align 4
- %346 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 148 ; [#uses=1]
- %347 = bitcast i8* %346 to float* ; [#uses=1]
- store float %319, float* %347, align 4
- %348 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 152 ; [#uses=1]
- %349 = bitcast i8* %348 to float* ; [#uses=1]
- store float %320, float* %349, align 4
- %350 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 156 ; [#uses=1]
- %351 = bitcast i8* %350 to float* ; [#uses=1]
- store float %321, float* %351, align 4
- %352 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 160 ; [#uses=1]
- %353 = bitcast i8* %352 to float* ; [#uses=1]
- store float 0.000000e+00, float* %353, align 4
- %354 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 668 ; [#uses=1]
- %355 = bitcast i8* %354 to float* ; [#uses=1]
- store float 0.000000e+00, float* %355, align 4
- %356 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 672 ; [#uses=1]
- %357 = bitcast i8* %356 to float* ; [#uses=1]
- store float 0.000000e+00, float* %357, align 4
- %358 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 676 ; [#uses=1]
- %359 = bitcast i8* %358 to float* ; [#uses=1]
- store float -1.000000e+00, float* %359, align 4
- %360 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 680 ; [#uses=1]
- %361 = bitcast i8* %360 to float* ; [#uses=1]
- store float 0.000000e+00, float* %361, align 4
- %362 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 684 ; [#uses=1]
- %363 = bitcast i8* %362 to float* ; [#uses=1]
- store float 0.000000e+00, float* %363, align 4
- %364 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 688 ; [#uses=1]
- %365 = bitcast i8* %364 to float* ; [#uses=1]
- store float 0.000000e+00, float* %365, align 4
- %366 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 692 ; [#uses=1]
- %367 = bitcast i8* %366 to float* ; [#uses=1]
- store float 1.000000e+00, float* %367, align 4
- %368 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 696 ; [#uses=1]
- %369 = bitcast i8* %368 to float* ; [#uses=1]
- store float 0.000000e+00, float* %369, align 4
- %370 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %370, align 8
- %371 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %371, align 4
- %372 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xBFE921FB60000000, float* %372, align 8
- %373 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %373, align 4
- br label %bb.i14
-
-bb.i14: ; preds = %_Z16btNormalizeAnglef.exit.i19.bb.i14_crit_edge, %invcont3
- %374 = phi float [ 1.000000e+00, %invcont3 ], [ %.pre, %_Z16btNormalizeAnglef.exit.i19.bb.i14_crit_edge ] ; [#uses=1]
- %i.03.i12 = phi i32 [ 0, %invcont3 ], [ %381, %_Z16btNormalizeAnglef.exit.i19.bb.i14_crit_edge ] ; [#uses=2]
- %tmp118 = shl i32 %i.03.i12, 6 ; [#uses=1]
- %tmp119 = add i32 %tmp118, 856 ; [#uses=1]
- %scevgep120 = getelementptr %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 %tmp119 ; [#uses=1]
- %scevgep4.i13 = bitcast i8* %scevgep120 to float* ; [#uses=1]
- %375 = call float @fmodf(float %374, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %376 = fcmp olt float %375, 0xC00921FB60000000 ; [#uses=1]
- br i1 %376, label %bb.i.i15, label %bb1.i.i16
-
-bb.i.i15: ; preds = %bb.i14
- %377 = fadd float %375, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i19
-
-bb1.i.i16: ; preds = %bb.i14
- %378 = fcmp ogt float %375, 0x400921FB60000000 ; [#uses=1]
- br i1 %378, label %bb2.i.i17, label %_Z16btNormalizeAnglef.exit.i19
-
-bb2.i.i17: ; preds = %bb1.i.i16
- %379 = fadd float %375, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i19
-
-_Z16btNormalizeAnglef.exit.i19: ; preds = %bb2.i.i17, %bb1.i.i16, %bb.i.i15
- %380 = phi float [ %379, %bb2.i.i17 ], [ %377, %bb.i.i15 ], [ %375, %bb1.i.i16 ] ; [#uses=1]
- store float %380, float* %scevgep4.i13, align 4
- %381 = add nsw i32 %i.03.i12, 1 ; [#uses=3]
- %exitcond116 = icmp eq i32 %381, 3 ; [#uses=1]
- br i1 %exitcond116, label %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit, label %_Z16btNormalizeAnglef.exit.i19.bb.i14_crit_edge
-
-_Z16btNormalizeAnglef.exit.i19.bb.i14_crit_edge: ; preds = %_Z16btNormalizeAnglef.exit.i19
- %scevgep5.i.phi.trans.insert = getelementptr %struct.btQuadWord* %1, i32 0, i32 0, i32 %381 ; [#uses=1]
- %.pre = load float* %scevgep5.i.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb.i14
-
-_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit: ; preds = %_Z16btNormalizeAnglef.exit.i19
- %382 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float -1.000000e+00, float* %382, align 8
- %383 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %383, align 4
- %384 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x3FE921FB60000000, float* %384, align 8
- %385 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %385, align 4
- br label %bb.i
-
-bb.i: ; preds = %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge, %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit
- %386 = phi float [ -1.000000e+00, %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit ], [ %.pre122, %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge ] ; [#uses=1]
- %i.03.i = phi i32 [ 0, %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit ], [ %393, %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge ] ; [#uses=2]
- %tmp = shl i32 %i.03.i, 6 ; [#uses=1]
- %tmp114 = add i32 %tmp, 860 ; [#uses=1]
- %scevgep = getelementptr %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 %tmp114 ; [#uses=1]
- %scevgep.i = bitcast i8* %scevgep to float* ; [#uses=1]
- %387 = call float @fmodf(float %386, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %388 = fcmp olt float %387, 0xC00921FB60000000 ; [#uses=1]
- br i1 %388, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i
- %389 = fadd float %387, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i
-
-bb1.i.i: ; preds = %bb.i
- %390 = fcmp ogt float %387, 0x400921FB60000000 ; [#uses=1]
- br i1 %390, label %bb2.i.i, label %_Z16btNormalizeAnglef.exit.i
-
-bb2.i.i: ; preds = %bb1.i.i
- %391 = fadd float %387, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i
-
-_Z16btNormalizeAnglef.exit.i: ; preds = %bb2.i.i, %bb1.i.i, %bb.i.i
- %392 = phi float [ %391, %bb2.i.i ], [ %389, %bb.i.i ], [ %387, %bb1.i.i ] ; [#uses=1]
- store float %392, float* %scevgep.i, align 4
- %393 = add nsw i32 %i.03.i, 1 ; [#uses=3]
- %exitcond = icmp eq i32 %393, 3 ; [#uses=1]
- br i1 %exitcond, label %_ZN23btGeneric6DofConstraint20setAngularUpperLimitERK9btVector3.exit, label %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge
-
-_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge: ; preds = %_Z16btNormalizeAnglef.exit.i
- %scevgep4.i.phi.trans.insert = getelementptr %struct.btQuadWord* %0, i32 0, i32 0, i32 %393 ; [#uses=1]
- %.pre122 = load float* %scevgep4.i.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb.i
-
-_ZN23btGeneric6DofConstraint20setAngularUpperLimitERK9btVector3.exit: ; preds = %_Z16btNormalizeAnglef.exit.i
- invoke void @_ZN29btGeneric6DofSpringConstraint12enableSpringEib(%struct.btGeneric6DofSpringConstraint* %4, i32 2, i8 zeroext 1)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %_ZN23btGeneric6DofConstraint20setAngularUpperLimitERK9btVector3.exit
- invoke void @_ZN29btGeneric6DofSpringConstraint12setStiffnessEif(%struct.btGeneric6DofSpringConstraint* %4, i32 2, float 0x4043BD3CE0000000)
- to label %invcont5 unwind label %lpad
-
-invcont5: ; preds = %invcont4
- invoke void @_ZN29btGeneric6DofSpringConstraint10setDampingEif(%struct.btGeneric6DofSpringConstraint* %4, i32 2, float 0x3F847AE140000000)
- to label %invcont6 unwind label %lpad
-
-invcont6: ; preds = %invcont5
- invoke void @_ZN29btGeneric6DofSpringConstraint19setEquilibriumPointEv(%struct.btGeneric6DofSpringConstraint* %4)
- to label %return unwind label %lpad
-
-return: ; preds = %invcont6
- ret void
-
-lpad: ; preds = %invcont6, %invcont5, %invcont4, %_ZN23btGeneric6DofConstraint20setAngularUpperLimitERK9btVector3.exit
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %5, align 4
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btHinge2ConstraintD0Ev(%struct.btHinge2Constraint* %this) nounwind align 2 {
-entry:
- %0 = bitcast %struct.btHinge2Constraint* %this to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btHinge2Constraint* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btHinge2ConstraintD1Ev(%struct.btHinge2Constraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = bitcast %struct.btHinge2Constraint* %this to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btHinge2ConstraintC1ER11btRigidBodyS1_R9btVector3S3_S3_(%struct.btHinge2Constraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %anchor, %struct.btQuadWord* nocapture %axis1, %struct.btQuadWord* nocapture %axis2) align 2 {
-entry:
- tail call void @_ZN18btHinge2ConstraintC2ER11btRigidBodyS1_R9btVector3S3_S3_(%struct.btHinge2Constraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* %anchor, %struct.btQuadWord* %axis1, %struct.btQuadWord* %axis2)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraintC2ER11btRigidBodyS1_RK9btVector3S4_S4_S4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %pivotInA, %struct.btQuadWord* nocapture %pivotInB, %struct.btQuadWord* nocapture %axisInA, %struct.btQuadWord* nocapture %axisInB, i8 zeroext %useReferenceFrameA) align 2 {
-bb5:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 4, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btHingeConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store i8 0, i8* %3, align 1
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store i8 0, i8* %4, align 1
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store i8 %useReferenceFrameA, i8* %6, align 1
- %7 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- %24 = load float* %21, align 4 ; [#uses=3]
- %25 = load float* %20, align 4 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 0 ; [#uses=3]
- %27 = load float* %26, align 4 ; [#uses=5]
- %28 = fmul float %27, %23 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 1 ; [#uses=3]
- %30 = load float* %29, align 4 ; [#uses=5]
- %31 = fmul float %30, %24 ; [#uses=1]
- %32 = fadd float %28, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 2 ; [#uses=3]
- %34 = load float* %33, align 4 ; [#uses=5]
- %35 = fmul float %34, %25 ; [#uses=1]
- %36 = fadd float %32, %35 ; [#uses=2]
- %37 = fcmp ult float %36, 0x3FEFFFFFC0000000 ; [#uses=1]
- br i1 %37, label %bb8, label %bb6
-
-bb6: ; preds = %bb5
- %38 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = load float* %39, align 4 ; [#uses=1]
- %43 = load float* %38, align 4 ; [#uses=1]
- %44 = fsub float -0.000000e+00, %43 ; [#uses=1]
- %45 = fsub float -0.000000e+00, %42 ; [#uses=1]
- %46 = fsub float -0.000000e+00, %41 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = load float* %48, align 4 ; [#uses=1]
- %52 = load float* %47, align 4 ; [#uses=1]
- br label %bb15
-
-bb8: ; preds = %bb5
- %53 = fcmp ugt float %36, 0xBFEFFFFFC0000000 ; [#uses=1]
- br i1 %53, label %bb12, label %bb9
-
-bb9: ; preds = %bb8
- %54 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = load float* %55, align 4 ; [#uses=1]
- %59 = load float* %54, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = load float* %61, align 4 ; [#uses=1]
- %65 = load float* %60, align 4 ; [#uses=1]
- br label %bb15
-
-bb12: ; preds = %bb8
- %66 = fmul float %27, %24 ; [#uses=1]
- %67 = fmul float %30, %23 ; [#uses=1]
- %68 = fsub float %66, %67 ; [#uses=3]
- %69 = fmul float %34, %23 ; [#uses=1]
- %70 = fmul float %27, %25 ; [#uses=1]
- %71 = fsub float %69, %70 ; [#uses=3]
- %72 = fmul float %30, %25 ; [#uses=1]
- %73 = fmul float %34, %24 ; [#uses=1]
- %74 = fsub float %72, %73 ; [#uses=3]
- %75 = fmul float %74, %30 ; [#uses=1]
- %76 = fmul float %71, %27 ; [#uses=1]
- %77 = fsub float %75, %76 ; [#uses=1]
- %78 = fmul float %68, %27 ; [#uses=1]
- %79 = fmul float %74, %34 ; [#uses=1]
- %80 = fsub float %78, %79 ; [#uses=1]
- %81 = fmul float %71, %34 ; [#uses=1]
- %82 = fmul float %68, %30 ; [#uses=1]
- %83 = fsub float %81, %82 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb12, %bb9, %bb6
- %rbAxisA2.0.2.0 = phi float [ %68, %bb12 ], [ %65, %bb9 ], [ %52, %bb6 ] ; [#uses=1]
- %rbAxisA2.0.1.0 = phi float [ %71, %bb12 ], [ %64, %bb9 ], [ %51, %bb6 ] ; [#uses=1]
- %rbAxisA2.0.0.0 = phi float [ %74, %bb12 ], [ %63, %bb9 ], [ %50, %bb6 ] ; [#uses=1]
- %rbAxisA1.0.2.0 = phi float [ %77, %bb12 ], [ %59, %bb9 ], [ %44, %bb6 ] ; [#uses=5]
- %rbAxisA1.0.1.0 = phi float [ %80, %bb12 ], [ %58, %bb9 ], [ %45, %bb6 ] ; [#uses=5]
- %rbAxisA1.0.0.0 = phi float [ %83, %bb12 ], [ %57, %bb9 ], [ %46, %bb6 ] ; [#uses=5]
- %84 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %rbAxisA1.0.0.0, float* %84, align 4
- %85 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %rbAxisA2.0.0.0, float* %85, align 4
- %86 = load float* %26, align 4 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %86, float* %87, align 4
- %88 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %88, align 4
- %89 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %rbAxisA1.0.1.0, float* %89, align 4
- %90 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %rbAxisA2.0.1.0, float* %90, align 4
- %91 = load float* %29, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %91, float* %92, align 4
- %93 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %93, align 4
- %94 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %rbAxisA1.0.2.0, float* %94, align 4
- %95 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %rbAxisA2.0.2.0, float* %95, align 4
- %96 = load float* %33, align 4 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %96, float* %97, align 4
- %98 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %98, align 4
- %99 = load float* %26, align 4 ; [#uses=6]
- %100 = getelementptr inbounds %struct.btQuadWord* %axisInB, i32 0, i32 0, i32 1 ; [#uses=2]
- %101 = load float* %100, align 4 ; [#uses=5]
- %102 = load float* %29, align 4 ; [#uses=9]
- %103 = getelementptr inbounds %struct.btQuadWord* %axisInB, i32 0, i32 0, i32 0 ; [#uses=2]
- %104 = load float* %103, align 4 ; [#uses=5]
- %105 = load float* %33, align 4 ; [#uses=7]
- %106 = getelementptr inbounds %struct.btQuadWord* %axisInB, i32 0, i32 0, i32 2 ; [#uses=2]
- %107 = load float* %106, align 4 ; [#uses=5]
- %108 = fmul float %99, %104 ; [#uses=1]
- %109 = fmul float %102, %101 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %105, %107 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=2]
- %113 = fcmp olt float %112, 0xBFEFFFFFC0000000 ; [#uses=1]
- br i1 %113, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb15
- %114 = tail call float @fabsf(float %105) nounwind readnone ; [#uses=1]
- %115 = fcmp ogt float %114, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %115, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i
- %116 = fmul float %102, %102 ; [#uses=1]
- %117 = fmul float %105, %105 ; [#uses=1]
- %118 = fadd float %116, %117 ; [#uses=1]
- %119 = tail call float @sqrtf(float %118) nounwind readonly ; [#uses=1]
- %120 = fdiv float 1.000000e+00, %119 ; [#uses=2]
- %121 = fsub float -0.000000e+00, %105 ; [#uses=1]
- %122 = fmul float %120, %121 ; [#uses=1]
- %123 = fmul float %102, %120 ; [#uses=1]
- br label %invcont
-
-bb1.i.i: ; preds = %bb.i
- %124 = fmul float %99, %99 ; [#uses=1]
- %125 = fmul float %102, %102 ; [#uses=1]
- %126 = fadd float %124, %125 ; [#uses=1]
- %127 = tail call float @sqrtf(float %126) nounwind readonly ; [#uses=1]
- %128 = fdiv float 1.000000e+00, %127 ; [#uses=2]
- %129 = fsub float -0.000000e+00, %102 ; [#uses=1]
- %130 = fmul float %128, %129 ; [#uses=1]
- %131 = fmul float %99, %128 ; [#uses=1]
- br label %invcont
-
-bb1.i: ; preds = %bb15
- %132 = fmul float %105, %101 ; [#uses=1]
- %133 = fmul float %102, %107 ; [#uses=1]
- %134 = fmul float %99, %107 ; [#uses=1]
- %135 = fmul float %105, %104 ; [#uses=1]
- %136 = fmul float %102, %104 ; [#uses=1]
- %137 = fmul float %99, %101 ; [#uses=1]
- %138 = fsub float %133, %132 ; [#uses=1]
- %139 = fsub float %135, %134 ; [#uses=1]
- %140 = fsub float %137, %136 ; [#uses=1]
- %141 = fadd float %112, 1.000000e+00 ; [#uses=1]
- %142 = fmul float %141, 2.000000e+00 ; [#uses=1]
- %143 = tail call float @sqrtf(float %142) nounwind readonly ; [#uses=2]
- %144 = fdiv float 1.000000e+00, %143 ; [#uses=3]
- %145 = fmul float %143, 5.000000e-01 ; [#uses=1]
- %146 = fmul float %140, %144 ; [#uses=1]
- %147 = fmul float %139, %144 ; [#uses=1]
- %148 = fmul float %138, %144 ; [#uses=1]
- br label %invcont
-
-invcont: ; preds = %bb1.i, %bb1.i.i, %bb.i.i
- %rotationArc.0.0.3.0 = phi float [ %145, %bb1.i ], [ 0.000000e+00, %bb1.i.i ], [ 0.000000e+00, %bb.i.i ] ; [#uses=6]
- %rotationArc.0.0.2.0 = phi float [ %146, %bb1.i ], [ 0.000000e+00, %bb1.i.i ], [ %123, %bb.i.i ] ; [#uses=4]
- %rotationArc.0.0.1.0 = phi float [ %147, %bb1.i ], [ %131, %bb1.i.i ], [ %122, %bb.i.i ] ; [#uses=4]
- %rotationArc.0.0.0.0 = phi float [ %148, %bb1.i ], [ %130, %bb1.i.i ], [ 0.000000e+00, %bb.i.i ] ; [#uses=3]
- %149 = fsub float -0.000000e+00, %rotationArc.0.0.0.0 ; [#uses=4]
- %150 = fmul float %rbAxisA1.0.0.0, %149 ; [#uses=1]
- %151 = fmul float %rotationArc.0.0.1.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %152 = fsub float %150, %151 ; [#uses=1]
- %153 = fmul float %rotationArc.0.0.2.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %154 = fsub float %152, %153 ; [#uses=3]
- %155 = fmul float %rotationArc.0.0.3.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %156 = fmul float %rotationArc.0.0.0.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=1]
- %158 = fmul float %rotationArc.0.0.1.0, %rbAxisA1.0.0.0 ; [#uses=1]
- %159 = fsub float %157, %158 ; [#uses=3]
- %160 = fmul float %rotationArc.0.0.3.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %161 = fmul float %rotationArc.0.0.2.0, %rbAxisA1.0.0.0 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fmul float %rotationArc.0.0.0.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %164 = fsub float %162, %163 ; [#uses=3]
- %165 = fmul float %rotationArc.0.0.3.0, %rbAxisA1.0.0.0 ; [#uses=1]
- %166 = fmul float %rotationArc.0.0.1.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %167 = fadd float %165, %166 ; [#uses=1]
- %168 = fmul float %rotationArc.0.0.2.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %169 = fsub float %167, %168 ; [#uses=3]
- %170 = fsub float -0.000000e+00, %rotationArc.0.0.2.0 ; [#uses=3]
- %171 = fsub float -0.000000e+00, %rotationArc.0.0.1.0 ; [#uses=3]
- %172 = fmul float %154, %170 ; [#uses=1]
- %173 = fmul float %159, %rotationArc.0.0.3.0 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=1]
- %175 = fmul float %169, %171 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=1]
- %177 = fmul float %164, %149 ; [#uses=1]
- %178 = fsub float %176, %177 ; [#uses=3]
- %179 = fmul float %154, %171 ; [#uses=1]
- %180 = fmul float %164, %rotationArc.0.0.3.0 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=1]
- %182 = fmul float %159, %149 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=1]
- %184 = fmul float %169, %170 ; [#uses=1]
- %185 = fsub float %183, %184 ; [#uses=3]
- %186 = fmul float %154, %149 ; [#uses=1]
- %187 = fmul float %169, %rotationArc.0.0.3.0 ; [#uses=1]
- %188 = fadd float %186, %187 ; [#uses=1]
- %189 = fmul float %164, %170 ; [#uses=1]
- %190 = fadd float %188, %189 ; [#uses=1]
- %191 = fmul float %159, %171 ; [#uses=1]
- %192 = fsub float %190, %191 ; [#uses=3]
- %193 = fmul float %104, %185 ; [#uses=1]
- %194 = fmul float %101, %192 ; [#uses=1]
- %195 = fsub float %193, %194 ; [#uses=1]
- %196 = fmul float %107, %192 ; [#uses=1]
- %197 = fmul float %104, %178 ; [#uses=1]
- %198 = fsub float %196, %197 ; [#uses=1]
- %199 = fmul float %101, %178 ; [#uses=1]
- %200 = fmul float %107, %185 ; [#uses=1]
- %201 = fsub float %199, %200 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 0 ; [#uses=1]
- %204 = load float* %203, align 4 ; [#uses=1]
- store float %204, float* %202, align 4
- %205 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 1 ; [#uses=1]
- %207 = load float* %206, align 4 ; [#uses=1]
- store float %207, float* %205, align 4
- %208 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 2 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=1]
- store float %210, float* %208, align 4
- %211 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 3 ; [#uses=1]
- %213 = load float* %212, align 4 ; [#uses=1]
- store float %213, float* %211, align 4
- %214 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %192, float* %214, align 4
- %215 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %201, float* %215, align 4
- %216 = load float* %103, align 4 ; [#uses=1]
- %217 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %216, float* %217, align 4
- %218 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %218, align 4
- %219 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %185, float* %219, align 4
- %220 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %198, float* %220, align 4
- %221 = load float* %100, align 4 ; [#uses=1]
- %222 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %221, float* %222, align 4
- %223 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %223, align 4
- %224 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %178, float* %224, align 4
- %225 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %195, float* %225, align 4
- %226 = load float* %106, align 4 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %226, float* %227, align 4
- %228 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %228, align 4
- %229 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %229, align 4
- %230 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float -1.000000e+00, float* %230, align 4
- %231 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %231, align 4
- %232 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 1.000000e+00, float* %232, align 4
- %233 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3FECCCCCC0000000, float* %233, align 4
- %234 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store i8 0, i8* %234, align 2
- %toBool = icmp eq i8 %useReferenceFrameA, 0 ; [#uses=1]
- %iftmp.174.0 = select i1 %toBool, float 1.000000e+00, float -1.000000e+00 ; [#uses=1]
- %235 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float %iftmp.174.0, float* %235, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK17btHingeConstraint28calculateSerializeBufferSizeEv(%struct.btHingeConstraint* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 212
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraint18getInfo1NonVirtualEPN17btTypedConstraint17btConstraintInfo1E(%struct.btHingeConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 21 ; [#uses=1]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=2]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- store i32 6, i32* %2, align 4
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %4, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraint9updateRHSEf(%struct.btHingeConstraint* nocapture %this, float %timeStep) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraint8setParamEifi(%struct.btHingeConstraint* nocapture %this, i32 %num, float %value, i32 %axis) nounwind align 2 {
-entry:
- switch i32 %axis, label %return [
- i32 5, label %bb
- i32 -1, label %bb
- ]
-
-bb: ; preds = %entry, %entry
- switch i32 %num, label %return [
- i32 2, label %bb3
- i32 3, label %bb5
- i32 4, label %bb4
- ]
-
-bb3: ; preds = %bb
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 28 ; [#uses=1]
- store float %value, float* %0, align 4
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = or i32 %2, 2 ; [#uses=1]
- store i32 %3, i32* %1, align 4
- ret void
-
-bb4: ; preds = %bb
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 27 ; [#uses=1]
- store float %value, float* %4, align 4
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = or i32 %6, 1 ; [#uses=1]
- store i32 %7, i32* %5, align 4
- ret void
-
-bb5: ; preds = %bb
- %8 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 26 ; [#uses=1]
- store float %value, float* %8, align 4
- %9 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=2]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = or i32 %10, 4 ; [#uses=1]
- store i32 %11, i32* %9, align 4
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK17btHingeConstraint8getParamEii(%struct.btHingeConstraint* nocapture %this, i32 %num, i32 %axis) nounwind readonly align 2 {
-entry:
- switch i32 %axis, label %bb6 [
- i32 5, label %bb
- i32 -1, label %bb
- ]
-
-bb: ; preds = %entry, %entry
- switch i32 %num, label %bb6 [
- i32 2, label %bb3
- i32 3, label %bb5
- i32 4, label %bb4
- ]
-
-bb3: ; preds = %bb
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 28 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-
-bb4: ; preds = %bb
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 27 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- ret float %3
-
-bb5: ; preds = %bb
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 26 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- ret float %5
-
-bb6: ; preds = %bb, %entry
- ret float 0.000000e+00
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK17btHingeConstraint9serializeEPvP12btSerializer(%struct.btHingeConstraint* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer(%struct.btTypedConstraint* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %scevgep.i.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %scevgep.1.i.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i = getelementptr i8* %dataBuffer, i32 48 ; [#uses=1]
- %3 = bitcast i8* %scevgep4.1.i.i.i to float* ; [#uses=1]
- %scevgep.2.i.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i = getelementptr i8* %dataBuffer, i32 52 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.2.i.i.i to float* ; [#uses=1]
- %scevgep.3.i.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i = getelementptr i8* %dataBuffer, i32 56 ; [#uses=1]
- %5 = bitcast i8* %scevgep4.3.i.i.i to float* ; [#uses=1]
- %6 = load float* %scevgep.i.i.i, align 4 ; [#uses=1]
- store float %6, float* %scevgep4.i.i.i, align 4
- %7 = load float* %scevgep.1.i.i.i, align 4 ; [#uses=1]
- store float %7, float* %3, align 4
- %8 = load float* %scevgep.2.i.i.i, align 4 ; [#uses=1]
- store float %8, float* %4, align 4
- %9 = load float* %scevgep.3.i.i.i, align 4 ; [#uses=1]
- store float %9, float* %5, align 4
- %scevgep.i.1.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i = getelementptr i8* %dataBuffer, i32 60 ; [#uses=1]
- %10 = bitcast i8* %scevgep4.i.1.i.i to float* ; [#uses=1]
- %scevgep.1.i.1.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i = getelementptr i8* %dataBuffer, i32 64 ; [#uses=1]
- %11 = bitcast i8* %scevgep4.1.i.1.i.i to float* ; [#uses=1]
- %scevgep.2.i.1.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i = getelementptr i8* %dataBuffer, i32 68 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.2.i.1.i.i to float* ; [#uses=1]
- %scevgep.3.i.1.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i = getelementptr i8* %dataBuffer, i32 72 ; [#uses=1]
- %13 = bitcast i8* %scevgep4.3.i.1.i.i to float* ; [#uses=1]
- %14 = load float* %scevgep.i.1.i.i, align 4 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = load float* %scevgep.1.i.1.i.i, align 4 ; [#uses=1]
- store float %15, float* %11, align 4
- %16 = load float* %scevgep.2.i.1.i.i, align 4 ; [#uses=1]
- store float %16, float* %12, align 4
- %17 = load float* %scevgep.3.i.1.i.i, align 4 ; [#uses=1]
- store float %17, float* %13, align 4
- %scevgep.i.2.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i = getelementptr i8* %dataBuffer, i32 76 ; [#uses=1]
- %18 = bitcast i8* %scevgep4.i.2.i.i to float* ; [#uses=1]
- %scevgep.1.i.2.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i = getelementptr i8* %dataBuffer, i32 80 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.1.i.2.i.i to float* ; [#uses=1]
- %scevgep.2.i.2.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i = getelementptr i8* %dataBuffer, i32 84 ; [#uses=1]
- %20 = bitcast i8* %scevgep4.2.i.2.i.i to float* ; [#uses=1]
- %scevgep.3.i.2.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i = getelementptr i8* %dataBuffer, i32 88 ; [#uses=1]
- %21 = bitcast i8* %scevgep4.3.i.2.i.i to float* ; [#uses=1]
- %22 = load float* %scevgep.i.2.i.i, align 4 ; [#uses=1]
- store float %22, float* %18, align 4
- %23 = load float* %scevgep.1.i.2.i.i, align 4 ; [#uses=1]
- store float %23, float* %19, align 4
- %24 = load float* %scevgep.2.i.2.i.i, align 4 ; [#uses=1]
- store float %24, float* %20, align 4
- %25 = load float* %scevgep.3.i.2.i.i, align 4 ; [#uses=1]
- store float %25, float* %21, align 4
- %scevgep.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = getelementptr i8* %dataBuffer, i32 92 ; [#uses=1]
- %26 = bitcast i8* %scevgep4.i.i to float* ; [#uses=1]
- %27 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %27, float* %26, align 4
- %scevgep.1.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 96 ; [#uses=1]
- %28 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %29 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %29, float* %28, align 4
- %scevgep.2.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 100 ; [#uses=1]
- %30 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %31 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %31, float* %30, align 4
- %scevgep.3.i.i = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 104 ; [#uses=1]
- %32 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %33 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %33, float* %32, align 4
- %34 = getelementptr inbounds i8* %dataBuffer, i32 108 ; [#uses=1]
- %scevgep.i.i.i2 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i3 = bitcast i8* %34 to float* ; [#uses=1]
- %scevgep.1.i.i.i4 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i5 = getelementptr i8* %dataBuffer, i32 112 ; [#uses=1]
- %35 = bitcast i8* %scevgep4.1.i.i.i5 to float* ; [#uses=1]
- %scevgep.2.i.i.i6 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i7 = getelementptr i8* %dataBuffer, i32 116 ; [#uses=1]
- %36 = bitcast i8* %scevgep4.2.i.i.i7 to float* ; [#uses=1]
- %scevgep.3.i.i.i8 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i9 = getelementptr i8* %dataBuffer, i32 120 ; [#uses=1]
- %37 = bitcast i8* %scevgep4.3.i.i.i9 to float* ; [#uses=1]
- %38 = load float* %scevgep.i.i.i2, align 4 ; [#uses=1]
- store float %38, float* %scevgep4.i.i.i3, align 4
- %39 = load float* %scevgep.1.i.i.i4, align 4 ; [#uses=1]
- store float %39, float* %35, align 4
- %40 = load float* %scevgep.2.i.i.i6, align 4 ; [#uses=1]
- store float %40, float* %36, align 4
- %41 = load float* %scevgep.3.i.i.i8, align 4 ; [#uses=1]
- store float %41, float* %37, align 4
- %scevgep.i.1.i.i10 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i11 = getelementptr i8* %dataBuffer, i32 124 ; [#uses=1]
- %42 = bitcast i8* %scevgep4.i.1.i.i11 to float* ; [#uses=1]
- %scevgep.1.i.1.i.i12 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i13 = getelementptr i8* %dataBuffer, i32 128 ; [#uses=1]
- %43 = bitcast i8* %scevgep4.1.i.1.i.i13 to float* ; [#uses=1]
- %scevgep.2.i.1.i.i14 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i15 = getelementptr i8* %dataBuffer, i32 132 ; [#uses=1]
- %44 = bitcast i8* %scevgep4.2.i.1.i.i15 to float* ; [#uses=1]
- %scevgep.3.i.1.i.i16 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i17 = getelementptr i8* %dataBuffer, i32 136 ; [#uses=1]
- %45 = bitcast i8* %scevgep4.3.i.1.i.i17 to float* ; [#uses=1]
- %46 = load float* %scevgep.i.1.i.i10, align 4 ; [#uses=1]
- store float %46, float* %42, align 4
- %47 = load float* %scevgep.1.i.1.i.i12, align 4 ; [#uses=1]
- store float %47, float* %43, align 4
- %48 = load float* %scevgep.2.i.1.i.i14, align 4 ; [#uses=1]
- store float %48, float* %44, align 4
- %49 = load float* %scevgep.3.i.1.i.i16, align 4 ; [#uses=1]
- store float %49, float* %45, align 4
- %scevgep.i.2.i.i18 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i19 = getelementptr i8* %dataBuffer, i32 140 ; [#uses=1]
- %50 = bitcast i8* %scevgep4.i.2.i.i19 to float* ; [#uses=1]
- %scevgep.1.i.2.i.i20 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i21 = getelementptr i8* %dataBuffer, i32 144 ; [#uses=1]
- %51 = bitcast i8* %scevgep4.1.i.2.i.i21 to float* ; [#uses=1]
- %scevgep.2.i.2.i.i22 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i23 = getelementptr i8* %dataBuffer, i32 148 ; [#uses=1]
- %52 = bitcast i8* %scevgep4.2.i.2.i.i23 to float* ; [#uses=1]
- %scevgep.3.i.2.i.i24 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i25 = getelementptr i8* %dataBuffer, i32 152 ; [#uses=1]
- %53 = bitcast i8* %scevgep4.3.i.2.i.i25 to float* ; [#uses=1]
- %54 = load float* %scevgep.i.2.i.i18, align 4 ; [#uses=1]
- store float %54, float* %50, align 4
- %55 = load float* %scevgep.1.i.2.i.i20, align 4 ; [#uses=1]
- store float %55, float* %51, align 4
- %56 = load float* %scevgep.2.i.2.i.i22, align 4 ; [#uses=1]
- store float %56, float* %52, align 4
- %57 = load float* %scevgep.3.i.2.i.i24, align 4 ; [#uses=1]
- store float %57, float* %53, align 4
- %scevgep.i.i26 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i27 = getelementptr i8* %dataBuffer, i32 156 ; [#uses=1]
- %58 = bitcast i8* %scevgep4.i.i27 to float* ; [#uses=1]
- %59 = load float* %scevgep.i.i26, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %scevgep.1.i.i28 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i29 = getelementptr i8* %dataBuffer, i32 160 ; [#uses=1]
- %60 = bitcast i8* %scevgep4.1.i.i29 to float* ; [#uses=1]
- %61 = load float* %scevgep.1.i.i28, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %scevgep.2.i.i30 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i31 = getelementptr i8* %dataBuffer, i32 164 ; [#uses=1]
- %62 = bitcast i8* %scevgep4.2.i.i31 to float* ; [#uses=1]
- %63 = load float* %scevgep.2.i.i30, align 4 ; [#uses=1]
- store float %63, float* %62, align 4
- %scevgep.3.i.i32 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i33 = getelementptr i8* %dataBuffer, i32 168 ; [#uses=1]
- %64 = bitcast i8* %scevgep4.3.i.i33 to float* ; [#uses=1]
- %65 = load float* %scevgep.3.i.i32, align 4 ; [#uses=1]
- store float %65, float* %64, align 4
- %66 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %67 = load i8* %66, align 4 ; [#uses=1]
- %68 = zext i8 %67 to i32 ; [#uses=1]
- %69 = getelementptr inbounds i8* %dataBuffer, i32 176 ; [#uses=1]
- %70 = bitcast i8* %69 to i32* ; [#uses=1]
- store i32 %68, i32* %70, align 4
- %71 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- %72 = load i8* %71, align 1 ; [#uses=1]
- %73 = zext i8 %72 to i32 ; [#uses=1]
- %74 = getelementptr inbounds i8* %dataBuffer, i32 180 ; [#uses=1]
- %75 = bitcast i8* %74 to i32* ; [#uses=1]
- store i32 %73, i32* %75, align 4
- %76 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = getelementptr inbounds i8* %dataBuffer, i32 188 ; [#uses=1]
- %79 = bitcast i8* %78 to float* ; [#uses=1]
- store float %77, float* %79, align 4
- %80 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = getelementptr inbounds i8* %dataBuffer, i32 184 ; [#uses=1]
- %83 = bitcast i8* %82 to float* ; [#uses=1]
- store float %81, float* %83, align 4
- %84 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 23 ; [#uses=1]
- %85 = load i8* %84, align 1 ; [#uses=1]
- %86 = zext i8 %85 to i32 ; [#uses=1]
- %87 = getelementptr inbounds i8* %dataBuffer, i32 172 ; [#uses=1]
- %88 = bitcast i8* %87 to i32* ; [#uses=1]
- store i32 %86, i32* %88, align 4
- %89 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = getelementptr inbounds i8* %dataBuffer, i32 192 ; [#uses=1]
- %92 = bitcast i8* %91 to float* ; [#uses=1]
- store float %90, float* %92, align 4
- %93 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = getelementptr inbounds i8* %dataBuffer, i32 196 ; [#uses=1]
- %96 = bitcast i8* %95 to float* ; [#uses=1]
- store float %94, float* %96, align 4
- %97 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = getelementptr inbounds i8* %dataBuffer, i32 200 ; [#uses=1]
- %100 = bitcast i8* %99 to float* ; [#uses=1]
- store float %98, float* %100, align 4
- %101 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = getelementptr inbounds i8* %dataBuffer, i32 204 ; [#uses=1]
- %104 = bitcast i8* %103 to float* ; [#uses=1]
- store float %102, float* %104, align 4
- %105 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- %107 = getelementptr inbounds i8* %dataBuffer, i32 208 ; [#uses=1]
- %108 = bitcast i8* %107 to float* ; [#uses=1]
- store float %106, float* %108, align 4
- ret i8* getelementptr inbounds ([27 x i8]* @.str417, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btHingeConstraintD0Ev(%struct.btHingeConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btHingeConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btHingeConstraint* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN17btHingeConstraintD1Ev(%struct.btHingeConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btHingeConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraint13buildJacobianEv(%struct.btHingeConstraint* %this) nounwind align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %3 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %normal = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=21]
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 21 ; [#uses=1]
- %5 = load i8* %4, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 24 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %9 = load i8* %8, align 4 ; [#uses=1]
- %toBool1not = icmp eq i8 %9, 0 ; [#uses=1]
- br i1 %toBool1not, label %bb8, label %bb19
-
-bb8: ; preds = %bb
- %10 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=2]
- %11 = load %struct.btRigidBody** %10, align 4 ; [#uses=12]
- %12 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = fadd float %16, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = fmul float %24, %26 ; [#uses=1]
- %28 = fadd float %22, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fadd float %28, %30 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fmul float %33, %15 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fmul float %36, %20 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fmul float %40, %26 ; [#uses=1]
- %42 = fadd float %38, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fadd float %42, %44 ; [#uses=2]
- %46 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fmul float %47, %15 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %50, %20 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %26 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fadd float %56, %58 ; [#uses=2]
- %60 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=2]
- %61 = load %struct.btRigidBody** %60, align 4 ; [#uses=12]
- %62 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=3]
- %66 = fmul float %63, %65 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=3]
- %71 = fmul float %68, %70 ; [#uses=1]
- %72 = fadd float %66, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=3]
- %77 = fmul float %74, %76 ; [#uses=1]
- %78 = fadd float %72, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fadd float %78, %80 ; [#uses=2]
- %82 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fmul float %83, %65 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = fmul float %86, %70 ; [#uses=1]
- %88 = fadd float %84, %87 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = fmul float %90, %76 ; [#uses=1]
- %92 = fadd float %88, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fadd float %92, %94 ; [#uses=2]
- %96 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- %98 = fmul float %97, %65 ; [#uses=1]
- %99 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=1]
- %101 = fmul float %100, %70 ; [#uses=1]
- %102 = fadd float %98, %101 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- %105 = fmul float %104, %76 ; [#uses=1]
- %106 = fadd float %102, %105 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btRigidBody* %61, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = fadd float %106, %108 ; [#uses=2]
- %110 = fsub float %81, %31 ; [#uses=3]
- %111 = fsub float %95, %45 ; [#uses=3]
- %112 = fsub float %109, %59 ; [#uses=3]
- %113 = fmul float %112, %112 ; [#uses=1]
- %114 = fmul float %111, %111 ; [#uses=1]
- %115 = fadd float %113, %114 ; [#uses=1]
- %116 = fmul float %110, %110 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=2]
- %118 = fcmp ogt float %117, 0x3E80000000000000 ; [#uses=1]
- br i1 %118, label %bb10, label %bb11
-
-bb10: ; preds = %bb8
- %119 = call float @sqrtf(float %117) nounwind readonly ; [#uses=1]
- %120 = fdiv float 1.000000e+00, %119 ; [#uses=3]
- %121 = fmul float %110, %120 ; [#uses=2]
- %122 = fmul float %111, %120 ; [#uses=2]
- %123 = fmul float %112, %120 ; [#uses=2]
- %124 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %123, float* %124, align 8
- %125 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %122, float* %125, align 4
- %126 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %121, float* %126, align 8
- %127 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %127, align 4
- br label %bb12
-
-bb11: ; preds = %bb8
- %128 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %128, align 8
- %129 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %129, align 4
- %130 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 8
- %131 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %131, align 4
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10
- %132 = phi float [ 1.000000e+00, %bb11 ], [ %123, %bb10 ] ; [#uses=5]
- %133 = phi float [ 0.000000e+00, %bb11 ], [ %122, %bb10 ] ; [#uses=6]
- %134 = phi float [ 0.000000e+00, %bb11 ], [ %121, %bb10 ] ; [#uses=6]
- %135 = call float @fabsf(float %134) nounwind readnone ; [#uses=1]
- %136 = fcmp ogt float %135, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %136, label %bb.i33, label %bb1.i34
-
-bb.i33: ; preds = %bb12
- %137 = fmul float %133, %133 ; [#uses=1]
- %138 = fmul float %134, %134 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=2]
- %140 = call float @sqrtf(float %139) nounwind readonly ; [#uses=1]
- %141 = fdiv float 1.000000e+00, %140 ; [#uses=3]
- %142 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %142, align 8
- %143 = fsub float -0.000000e+00, %134 ; [#uses=1]
- %144 = fmul float %141, %143 ; [#uses=2]
- %145 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %144, float* %145, align 4
- %146 = fmul float %133, %141 ; [#uses=2]
- %147 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %146, float* %147, align 8
- %148 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %149 = fmul float %139, %141 ; [#uses=1]
- store float %149, float* %148, align 8
- %150 = fsub float -0.000000e+00, %132 ; [#uses=1]
- %151 = fmul float %146, %150 ; [#uses=1]
- %152 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %151, float* %152, align 4
- %153 = fmul float %132, %144 ; [#uses=1]
- %154 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %153, float* %154, align 8
- br label %bb.nph
-
-bb1.i34: ; preds = %bb12
- %155 = fmul float %132, %132 ; [#uses=1]
- %156 = fmul float %133, %133 ; [#uses=1]
- %157 = fadd float %155, %156 ; [#uses=2]
- %158 = call float @sqrtf(float %157) nounwind readonly ; [#uses=1]
- %159 = fdiv float 1.000000e+00, %158 ; [#uses=3]
- %160 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %161 = fsub float -0.000000e+00, %133 ; [#uses=1]
- %162 = fmul float %159, %161 ; [#uses=2]
- store float %162, float* %160, align 8
- %163 = fmul float %132, %159 ; [#uses=2]
- %164 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %163, float* %164, align 4
- %165 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %165, align 8
- %166 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %167 = fsub float -0.000000e+00, %134 ; [#uses=1]
- %168 = fmul float %163, %167 ; [#uses=1]
- store float %168, float* %166, align 8
- %169 = fmul float %134, %162 ; [#uses=1]
- %170 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %169, float* %170, align 4
- %171 = fmul float %157, %159 ; [#uses=1]
- %172 = getelementptr inbounds [3 x %struct.btQuadWord]* %normal, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %171, float* %172, align 8
- br label %bb.nph
-
-bb.nph: ; preds = %bb1.i34, %bb.i33
- %173 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %175 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %176 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %182 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %183 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb17, %bb.nph
- %i.090 = phi i32 [ 0, %bb.nph ], [ %268, %bb17 ] ; [#uses=3]
- %scevgep93 = getelementptr %struct.btHingeConstraint* %this, i32 0, i32 1, i32 %i.090 ; [#uses=2]
- %205 = load %struct.btRigidBody** %10, align 4 ; [#uses=14]
- %206 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %207 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %210 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %213 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %215 = load float* %214, align 4 ; [#uses=1]
- store float %215, float* %173, align 8
- %216 = load float* %213, align 4 ; [#uses=1]
- store float %216, float* %174, align 4
- %217 = load float* %212, align 4 ; [#uses=1]
- store float %217, float* %175, align 8
- store float 0.000000e+00, float* %176, align 4
- %218 = load float* %211, align 4 ; [#uses=1]
- store float %218, float* %177, align 8
- %219 = load float* %210, align 4 ; [#uses=1]
- store float %219, float* %178, align 4
- %220 = load float* %209, align 4 ; [#uses=1]
- store float %220, float* %179, align 8
- store float 0.000000e+00, float* %180, align 4
- %221 = load float* %208, align 4 ; [#uses=1]
- store float %221, float* %181, align 8
- %222 = load float* %207, align 4 ; [#uses=1]
- store float %222, float* %182, align 4
- %223 = load float* %206, align 4 ; [#uses=1]
- store float %223, float* %183, align 8
- store float 0.000000e+00, float* %184, align 4
- %224 = load %struct.btRigidBody** %60, align 4 ; [#uses=14]
- %225 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %226 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %228 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %229 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %231 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %232 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %233 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %234 = load float* %233, align 4 ; [#uses=1]
- store float %234, float* %185, align 8
- %235 = load float* %232, align 4 ; [#uses=1]
- store float %235, float* %186, align 4
- %236 = load float* %231, align 4 ; [#uses=1]
- store float %236, float* %187, align 8
- store float 0.000000e+00, float* %188, align 4
- %237 = load float* %230, align 4 ; [#uses=1]
- store float %237, float* %189, align 8
- %238 = load float* %229, align 4 ; [#uses=1]
- store float %238, float* %190, align 4
- %239 = load float* %228, align 4 ; [#uses=1]
- store float %239, float* %191, align 8
- store float 0.000000e+00, float* %192, align 4
- %240 = load float* %227, align 4 ; [#uses=1]
- store float %240, float* %193, align 8
- %241 = load float* %226, align 4 ; [#uses=1]
- store float %241, float* %194, align 4
- %242 = load float* %225, align 4 ; [#uses=1]
- store float %242, float* %195, align 8
- store float 0.000000e+00, float* %196, align 4
- %243 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = fsub float %31, %244 ; [#uses=1]
- %246 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %247 = load float* %246, align 4 ; [#uses=1]
- %248 = fsub float %45, %247 ; [#uses=1]
- %249 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %250 = load float* %249, align 4 ; [#uses=1]
- %251 = fsub float %59, %250 ; [#uses=1]
- store float %251, float* %197, align 8
- store float %248, float* %198, align 4
- store float %245, float* %199, align 8
- store float 0.000000e+00, float* %200, align 4
- %252 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %253 = load float* %252, align 4 ; [#uses=1]
- %254 = fsub float %81, %253 ; [#uses=1]
- %255 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %256 = load float* %255, align 4 ; [#uses=1]
- %257 = fsub float %95, %256 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %259 = load float* %258, align 4 ; [#uses=1]
- %260 = fsub float %109, %259 ; [#uses=1]
- store float %260, float* %201, align 8
- store float %257, float* %202, align 4
- store float %254, float* %203, align 8
- store float 0.000000e+00, float* %204, align 4
- %261 = icmp eq %struct.btJacobianEntry* %scevgep93, null ; [#uses=1]
- br i1 %261, label %bb17, label %bb15
-
-bb15: ; preds = %bb14
- %scevgep = getelementptr [3 x %struct.btQuadWord]* %normal, i32 0, i32 %i.090 ; [#uses=1]
- %262 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 4 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 4 ; [#uses=1]
- %264 = load float* %262, align 4 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btRigidBody* %224, i32 0, i32 8 ; [#uses=1]
- %266 = load float* %263, align 4 ; [#uses=1]
- %267 = getelementptr inbounds %struct.btRigidBody* %205, i32 0, i32 8 ; [#uses=1]
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %scevgep93, %struct.btMatrix3x3* %3, %struct.btMatrix3x3* %2, %struct.btQuadWord* %1, %struct.btQuadWord* %0, %struct.btQuadWord* %scevgep, %struct.btQuadWord* %267, float %266, %struct.btQuadWord* %265, float %264) nounwind
- br label %bb17
-
-bb17: ; preds = %bb15, %bb14
- %268 = add nsw i32 %i.090, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %268, 3 ; [#uses=1]
- br i1 %exitcond, label %bb19, label %bb14
-
-bb19: ; preds = %bb17, %bb
- %269 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %271 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %272 = load float* %271, align 4 ; [#uses=11]
- %273 = load float* %270, align 4 ; [#uses=12]
- %274 = load float* %269, align 4 ; [#uses=12]
- %275 = call float @fabsf(float %274) nounwind readnone ; [#uses=1]
- %276 = fcmp ogt float %275, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %276, label %bb.i31, label %bb1.i32
-
-bb.i31: ; preds = %bb19
- %277 = fmul float %273, %273 ; [#uses=1]
- %278 = fmul float %274, %274 ; [#uses=1]
- %279 = fadd float %277, %278 ; [#uses=2]
- %280 = call float @sqrtf(float %279) nounwind readonly ; [#uses=1]
- %281 = fdiv float 1.000000e+00, %280 ; [#uses=3]
- %282 = fsub float -0.000000e+00, %274 ; [#uses=1]
- %283 = fmul float %281, %282 ; [#uses=2]
- %284 = fmul float %273, %281 ; [#uses=2]
- %285 = fmul float %279, %281 ; [#uses=1]
- %286 = fsub float -0.000000e+00, %272 ; [#uses=1]
- %287 = fmul float %284, %286 ; [#uses=1]
- %288 = fmul float %272, %283 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-bb1.i32: ; preds = %bb19
- %289 = fmul float %272, %272 ; [#uses=1]
- %290 = fmul float %273, %273 ; [#uses=1]
- %291 = fadd float %289, %290 ; [#uses=2]
- %292 = call float @sqrtf(float %291) nounwind readonly ; [#uses=1]
- %293 = fdiv float 1.000000e+00, %292 ; [#uses=3]
- %294 = fsub float -0.000000e+00, %273 ; [#uses=1]
- %295 = fmul float %293, %294 ; [#uses=2]
- %296 = fmul float %272, %293 ; [#uses=2]
- %297 = fsub float -0.000000e+00, %274 ; [#uses=1]
- %298 = fmul float %296, %297 ; [#uses=1]
- %299 = fmul float %274, %295 ; [#uses=1]
- %300 = fmul float %291, %293 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit: ; preds = %bb1.i32, %bb.i31
- %jointAxis0local.0.0.0 = phi float [ 0.000000e+00, %bb.i31 ], [ %295, %bb1.i32 ] ; [#uses=3]
- %jointAxis0local.0.1.0 = phi float [ %283, %bb.i31 ], [ %296, %bb1.i32 ] ; [#uses=3]
- %jointAxis0local.0.2.0 = phi float [ %284, %bb.i31 ], [ 0.000000e+00, %bb1.i32 ] ; [#uses=3]
- %jointAxis1local.0.0.0 = phi float [ %285, %bb.i31 ], [ %298, %bb1.i32 ] ; [#uses=3]
- %jointAxis1local.0.1.0 = phi float [ %287, %bb.i31 ], [ %299, %bb1.i32 ] ; [#uses=3]
- %jointAxis1local.0.2.0 = phi float [ %288, %bb.i31 ], [ %300, %bb1.i32 ] ; [#uses=3]
- %301 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %302 = load %struct.btRigidBody** %301, align 4 ; [#uses=28]
- %303 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=4]
- %304 = load float* %303, align 4 ; [#uses=4]
- %305 = fmul float %304, %jointAxis0local.0.0.0 ; [#uses=1]
- %306 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=4]
- %307 = load float* %306, align 4 ; [#uses=4]
- %308 = fmul float %307, %jointAxis0local.0.1.0 ; [#uses=1]
- %309 = fadd float %305, %308 ; [#uses=1]
- %310 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=4]
- %311 = load float* %310, align 4 ; [#uses=4]
- %312 = fmul float %311, %jointAxis0local.0.2.0 ; [#uses=1]
- %313 = fadd float %309, %312 ; [#uses=4]
- %314 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %315 = load float* %314, align 4 ; [#uses=4]
- %316 = fmul float %315, %jointAxis0local.0.0.0 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %318 = load float* %317, align 4 ; [#uses=4]
- %319 = fmul float %318, %jointAxis0local.0.1.0 ; [#uses=1]
- %320 = fadd float %316, %319 ; [#uses=1]
- %321 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %322 = load float* %321, align 4 ; [#uses=4]
- %323 = fmul float %322, %jointAxis0local.0.2.0 ; [#uses=1]
- %324 = fadd float %320, %323 ; [#uses=4]
- %325 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %326 = load float* %325, align 4 ; [#uses=4]
- %327 = fmul float %326, %jointAxis0local.0.0.0 ; [#uses=1]
- %328 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- %329 = load float* %328, align 4 ; [#uses=4]
- %330 = fmul float %329, %jointAxis0local.0.1.0 ; [#uses=1]
- %331 = fadd float %327, %330 ; [#uses=1]
- %332 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- %333 = load float* %332, align 4 ; [#uses=4]
- %334 = fmul float %333, %jointAxis0local.0.2.0 ; [#uses=1]
- %335 = fadd float %331, %334 ; [#uses=4]
- %336 = fmul float %304, %jointAxis1local.0.0.0 ; [#uses=1]
- %337 = fmul float %307, %jointAxis1local.0.1.0 ; [#uses=1]
- %338 = fadd float %336, %337 ; [#uses=1]
- %339 = fmul float %311, %jointAxis1local.0.2.0 ; [#uses=1]
- %340 = fadd float %338, %339 ; [#uses=4]
- %341 = fmul float %315, %jointAxis1local.0.0.0 ; [#uses=1]
- %342 = fmul float %318, %jointAxis1local.0.1.0 ; [#uses=1]
- %343 = fadd float %341, %342 ; [#uses=1]
- %344 = fmul float %322, %jointAxis1local.0.2.0 ; [#uses=1]
- %345 = fadd float %343, %344 ; [#uses=4]
- %346 = fmul float %326, %jointAxis1local.0.0.0 ; [#uses=1]
- %347 = fmul float %329, %jointAxis1local.0.1.0 ; [#uses=1]
- %348 = fadd float %346, %347 ; [#uses=1]
- %349 = fmul float %333, %jointAxis1local.0.2.0 ; [#uses=1]
- %350 = fadd float %348, %349 ; [#uses=4]
- %351 = fmul float %304, %272 ; [#uses=1]
- %352 = fmul float %307, %273 ; [#uses=1]
- %353 = fadd float %351, %352 ; [#uses=1]
- %354 = fmul float %311, %274 ; [#uses=1]
- %355 = fadd float %353, %354 ; [#uses=4]
- %356 = fmul float %315, %272 ; [#uses=1]
- %357 = fmul float %318, %273 ; [#uses=1]
- %358 = fadd float %356, %357 ; [#uses=1]
- %359 = fmul float %322, %274 ; [#uses=1]
- %360 = fadd float %358, %359 ; [#uses=4]
- %361 = fmul float %326, %272 ; [#uses=1]
- %362 = fmul float %329, %273 ; [#uses=1]
- %363 = fadd float %361, %362 ; [#uses=1]
- %364 = fmul float %333, %274 ; [#uses=1]
- %365 = fadd float %363, %364 ; [#uses=4]
- %366 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %367 = load %struct.btRigidBody** %366, align 4 ; [#uses=46]
- %368 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0 ; [#uses=1]
- %369 = icmp eq %struct.btJacobianEntry* %368, null ; [#uses=1]
- br i1 %369, label %bb22, label %bb20
-
-bb20: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %370 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %371 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %372 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %373 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %374 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %375 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %376 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %377 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %378 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %379 = load float* %378, align 4 ; [#uses=1]
- %380 = load float* %377, align 4 ; [#uses=1]
- %381 = load float* %376, align 4 ; [#uses=1]
- %382 = load float* %375, align 4 ; [#uses=1]
- %383 = load float* %374, align 4 ; [#uses=1]
- %384 = load float* %373, align 4 ; [#uses=1]
- %385 = load float* %372, align 4 ; [#uses=1]
- %386 = load float* %371, align 4 ; [#uses=1]
- %387 = load float* %370, align 4 ; [#uses=1]
- %388 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %388, align 4
- %389 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %389, align 4
- %390 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %390, align 4
- %391 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %391, align 4
- %392 = fmul float %333, %335 ; [#uses=1]
- %393 = fmul float %322, %324 ; [#uses=1]
- %394 = fadd float %392, %393 ; [#uses=1]
- %395 = fmul float %311, %313 ; [#uses=1]
- %396 = fadd float %394, %395 ; [#uses=3]
- %397 = fmul float %329, %335 ; [#uses=1]
- %398 = fmul float %318, %324 ; [#uses=1]
- %399 = fadd float %397, %398 ; [#uses=1]
- %400 = fmul float %307, %313 ; [#uses=1]
- %401 = fadd float %399, %400 ; [#uses=3]
- %402 = fmul float %326, %335 ; [#uses=1]
- %403 = fmul float %315, %324 ; [#uses=1]
- %404 = fadd float %402, %403 ; [#uses=1]
- %405 = fmul float %304, %313 ; [#uses=1]
- %406 = fadd float %404, %405 ; [#uses=3]
- %407 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %406, float* %407, align 4
- %408 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %401, float* %408, align 4
- %409 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %396, float* %409, align 4
- %410 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %410, align 4
- %411 = fsub float -0.000000e+00, %313 ; [#uses=3]
- %412 = fsub float -0.000000e+00, %324 ; [#uses=3]
- %413 = fsub float -0.000000e+00, %335 ; [#uses=3]
- %414 = fmul float %381, %413 ; [#uses=1]
- %415 = fmul float %380, %412 ; [#uses=1]
- %416 = fadd float %414, %415 ; [#uses=1]
- %417 = fmul float %379, %411 ; [#uses=1]
- %418 = fadd float %416, %417 ; [#uses=3]
- %419 = fmul float %384, %413 ; [#uses=1]
- %420 = fmul float %383, %412 ; [#uses=1]
- %421 = fadd float %419, %420 ; [#uses=1]
- %422 = fmul float %382, %411 ; [#uses=1]
- %423 = fadd float %421, %422 ; [#uses=3]
- %424 = fmul float %387, %413 ; [#uses=1]
- %425 = fmul float %386, %412 ; [#uses=1]
- %426 = fadd float %424, %425 ; [#uses=1]
- %427 = fmul float %385, %411 ; [#uses=1]
- %428 = fadd float %426, %427 ; [#uses=3]
- %429 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %428, float* %429, align 4
- %430 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %423, float* %430, align 4
- %431 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %418, float* %431, align 4
- %432 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %432, align 4
- %433 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %434 = load float* %433, align 4 ; [#uses=1]
- %435 = fmul float %434, %396 ; [#uses=2]
- %436 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %437 = load float* %436, align 4 ; [#uses=1]
- %438 = fmul float %437, %401 ; [#uses=2]
- %439 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %440 = load float* %439, align 4 ; [#uses=1]
- %441 = fmul float %440, %406 ; [#uses=2]
- %442 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %441, float* %442, align 4
- %443 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %438, float* %443, align 4
- %444 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %435, float* %444, align 4
- %445 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %445, align 4
- %446 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %447 = load float* %446, align 4 ; [#uses=1]
- %448 = fmul float %447, %418 ; [#uses=2]
- %449 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %450 = load float* %449, align 4 ; [#uses=1]
- %451 = fmul float %450, %423 ; [#uses=2]
- %452 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %453 = load float* %452, align 4 ; [#uses=1]
- %454 = fmul float %453, %428 ; [#uses=2]
- %455 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %454, float* %455, align 4
- %456 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %451, float* %456, align 4
- %457 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %448, float* %457, align 4
- %458 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %458, align 4
- %459 = fmul float %441, %406 ; [#uses=1]
- %460 = fmul float %438, %401 ; [#uses=1]
- %461 = fadd float %459, %460 ; [#uses=1]
- %462 = fmul float %435, %396 ; [#uses=1]
- %463 = fadd float %461, %462 ; [#uses=1]
- %464 = fmul float %454, %428 ; [#uses=1]
- %465 = fmul float %451, %423 ; [#uses=1]
- %466 = fadd float %464, %465 ; [#uses=1]
- %467 = fmul float %448, %418 ; [#uses=1]
- %468 = fadd float %466, %467 ; [#uses=1]
- %469 = fadd float %463, %468 ; [#uses=1]
- %470 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 0, i32 5 ; [#uses=1]
- store float %469, float* %470, align 4
- br label %bb22
-
-bb22: ; preds = %bb20, %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %471 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- %472 = icmp eq %struct.btJacobianEntry* %471, null ; [#uses=1]
- br i1 %472, label %bb25, label %bb23
-
-bb23: ; preds = %bb22
- %473 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %474 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %475 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %476 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %477 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %478 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %479 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %480 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %481 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %482 = load float* %481, align 4 ; [#uses=1]
- %483 = load float* %480, align 4 ; [#uses=1]
- %484 = load float* %479, align 4 ; [#uses=1]
- %485 = load float* %478, align 4 ; [#uses=1]
- %486 = load float* %477, align 4 ; [#uses=1]
- %487 = load float* %476, align 4 ; [#uses=1]
- %488 = load float* %475, align 4 ; [#uses=1]
- %489 = load float* %474, align 4 ; [#uses=1]
- %490 = load float* %473, align 4 ; [#uses=1]
- %491 = load float* %310, align 4 ; [#uses=1]
- %492 = load float* %321, align 4 ; [#uses=1]
- %493 = load float* %332, align 4 ; [#uses=1]
- %494 = load float* %306, align 4 ; [#uses=1]
- %495 = load float* %317, align 4 ; [#uses=1]
- %496 = load float* %328, align 4 ; [#uses=1]
- %497 = load float* %303, align 4 ; [#uses=1]
- %498 = load float* %314, align 4 ; [#uses=1]
- %499 = load float* %325, align 4 ; [#uses=1]
- %500 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %500, align 4
- %501 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %501, align 4
- %502 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %502, align 4
- %503 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %503, align 4
- %504 = fmul float %493, %350 ; [#uses=1]
- %505 = fmul float %492, %345 ; [#uses=1]
- %506 = fadd float %504, %505 ; [#uses=1]
- %507 = fmul float %491, %340 ; [#uses=1]
- %508 = fadd float %506, %507 ; [#uses=3]
- %509 = fmul float %496, %350 ; [#uses=1]
- %510 = fmul float %495, %345 ; [#uses=1]
- %511 = fadd float %509, %510 ; [#uses=1]
- %512 = fmul float %494, %340 ; [#uses=1]
- %513 = fadd float %511, %512 ; [#uses=3]
- %514 = fmul float %499, %350 ; [#uses=1]
- %515 = fmul float %498, %345 ; [#uses=1]
- %516 = fadd float %514, %515 ; [#uses=1]
- %517 = fmul float %497, %340 ; [#uses=1]
- %518 = fadd float %516, %517 ; [#uses=3]
- %519 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %518, float* %519, align 4
- %520 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %513, float* %520, align 4
- %521 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %508, float* %521, align 4
- %522 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %522, align 4
- %523 = fsub float -0.000000e+00, %340 ; [#uses=3]
- %524 = fsub float -0.000000e+00, %345 ; [#uses=3]
- %525 = fsub float -0.000000e+00, %350 ; [#uses=3]
- %526 = fmul float %484, %525 ; [#uses=1]
- %527 = fmul float %483, %524 ; [#uses=1]
- %528 = fadd float %526, %527 ; [#uses=1]
- %529 = fmul float %482, %523 ; [#uses=1]
- %530 = fadd float %528, %529 ; [#uses=3]
- %531 = fmul float %487, %525 ; [#uses=1]
- %532 = fmul float %486, %524 ; [#uses=1]
- %533 = fadd float %531, %532 ; [#uses=1]
- %534 = fmul float %485, %523 ; [#uses=1]
- %535 = fadd float %533, %534 ; [#uses=3]
- %536 = fmul float %490, %525 ; [#uses=1]
- %537 = fmul float %489, %524 ; [#uses=1]
- %538 = fadd float %536, %537 ; [#uses=1]
- %539 = fmul float %488, %523 ; [#uses=1]
- %540 = fadd float %538, %539 ; [#uses=3]
- %541 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %540, float* %541, align 4
- %542 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %535, float* %542, align 4
- %543 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %530, float* %543, align 4
- %544 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %544, align 4
- %545 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %546 = load float* %545, align 4 ; [#uses=1]
- %547 = fmul float %546, %508 ; [#uses=2]
- %548 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %549 = load float* %548, align 4 ; [#uses=1]
- %550 = fmul float %549, %513 ; [#uses=2]
- %551 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %552 = load float* %551, align 4 ; [#uses=1]
- %553 = fmul float %552, %518 ; [#uses=2]
- %554 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %553, float* %554, align 4
- %555 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %550, float* %555, align 4
- %556 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %547, float* %556, align 4
- %557 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %557, align 4
- %558 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %559 = load float* %558, align 4 ; [#uses=1]
- %560 = fmul float %559, %530 ; [#uses=2]
- %561 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %562 = load float* %561, align 4 ; [#uses=1]
- %563 = fmul float %562, %535 ; [#uses=2]
- %564 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %565 = load float* %564, align 4 ; [#uses=1]
- %566 = fmul float %565, %540 ; [#uses=2]
- %567 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %566, float* %567, align 4
- %568 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %563, float* %568, align 4
- %569 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %560, float* %569, align 4
- %570 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %570, align 4
- %571 = fmul float %553, %518 ; [#uses=1]
- %572 = fmul float %550, %513 ; [#uses=1]
- %573 = fadd float %571, %572 ; [#uses=1]
- %574 = fmul float %547, %508 ; [#uses=1]
- %575 = fadd float %573, %574 ; [#uses=1]
- %576 = fmul float %566, %540 ; [#uses=1]
- %577 = fmul float %563, %535 ; [#uses=1]
- %578 = fadd float %576, %577 ; [#uses=1]
- %579 = fmul float %560, %530 ; [#uses=1]
- %580 = fadd float %578, %579 ; [#uses=1]
- %581 = fadd float %575, %580 ; [#uses=1]
- %582 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 1, i32 5 ; [#uses=1]
- store float %581, float* %582, align 4
- br label %bb25
-
-bb25: ; preds = %bb23, %bb22
- %583 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- %584 = icmp eq %struct.btJacobianEntry* %583, null ; [#uses=1]
- br i1 %584, label %bb28, label %bb26
-
-bb26: ; preds = %bb25
- %585 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %586 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %587 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %588 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %589 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %590 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %591 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %592 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %593 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %594 = load float* %593, align 4 ; [#uses=1]
- %595 = load float* %592, align 4 ; [#uses=1]
- %596 = load float* %591, align 4 ; [#uses=1]
- %597 = load float* %590, align 4 ; [#uses=1]
- %598 = load float* %589, align 4 ; [#uses=1]
- %599 = load float* %588, align 4 ; [#uses=1]
- %600 = load float* %587, align 4 ; [#uses=1]
- %601 = load float* %586, align 4 ; [#uses=1]
- %602 = load float* %585, align 4 ; [#uses=1]
- %603 = load float* %310, align 4 ; [#uses=1]
- %604 = load float* %321, align 4 ; [#uses=1]
- %605 = load float* %332, align 4 ; [#uses=1]
- %606 = load float* %306, align 4 ; [#uses=1]
- %607 = load float* %317, align 4 ; [#uses=1]
- %608 = load float* %328, align 4 ; [#uses=1]
- %609 = load float* %303, align 4 ; [#uses=1]
- %610 = load float* %314, align 4 ; [#uses=1]
- %611 = load float* %325, align 4 ; [#uses=1]
- %612 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %612, align 4
- %613 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %613, align 4
- %614 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %614, align 4
- %615 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %615, align 4
- %616 = fmul float %605, %365 ; [#uses=1]
- %617 = fmul float %604, %360 ; [#uses=1]
- %618 = fadd float %616, %617 ; [#uses=1]
- %619 = fmul float %603, %355 ; [#uses=1]
- %620 = fadd float %618, %619 ; [#uses=3]
- %621 = fmul float %608, %365 ; [#uses=1]
- %622 = fmul float %607, %360 ; [#uses=1]
- %623 = fadd float %621, %622 ; [#uses=1]
- %624 = fmul float %606, %355 ; [#uses=1]
- %625 = fadd float %623, %624 ; [#uses=3]
- %626 = fmul float %611, %365 ; [#uses=1]
- %627 = fmul float %610, %360 ; [#uses=1]
- %628 = fadd float %626, %627 ; [#uses=1]
- %629 = fmul float %609, %355 ; [#uses=1]
- %630 = fadd float %628, %629 ; [#uses=3]
- %631 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %630, float* %631, align 4
- %632 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %625, float* %632, align 4
- %633 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %620, float* %633, align 4
- %634 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %634, align 4
- %635 = fsub float -0.000000e+00, %355 ; [#uses=3]
- %636 = fsub float -0.000000e+00, %360 ; [#uses=3]
- %637 = fsub float -0.000000e+00, %365 ; [#uses=3]
- %638 = fmul float %596, %637 ; [#uses=1]
- %639 = fmul float %595, %636 ; [#uses=1]
- %640 = fadd float %638, %639 ; [#uses=1]
- %641 = fmul float %594, %635 ; [#uses=1]
- %642 = fadd float %640, %641 ; [#uses=3]
- %643 = fmul float %599, %637 ; [#uses=1]
- %644 = fmul float %598, %636 ; [#uses=1]
- %645 = fadd float %643, %644 ; [#uses=1]
- %646 = fmul float %597, %635 ; [#uses=1]
- %647 = fadd float %645, %646 ; [#uses=3]
- %648 = fmul float %602, %637 ; [#uses=1]
- %649 = fmul float %601, %636 ; [#uses=1]
- %650 = fadd float %648, %649 ; [#uses=1]
- %651 = fmul float %600, %635 ; [#uses=1]
- %652 = fadd float %650, %651 ; [#uses=3]
- %653 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %652, float* %653, align 4
- %654 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %647, float* %654, align 4
- %655 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %642, float* %655, align 4
- %656 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %656, align 4
- %657 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %658 = load float* %657, align 4 ; [#uses=1]
- %659 = fmul float %658, %620 ; [#uses=2]
- %660 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %661 = load float* %660, align 4 ; [#uses=1]
- %662 = fmul float %661, %625 ; [#uses=2]
- %663 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %664 = load float* %663, align 4 ; [#uses=1]
- %665 = fmul float %664, %630 ; [#uses=2]
- %666 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %665, float* %666, align 4
- %667 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %662, float* %667, align 4
- %668 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %659, float* %668, align 4
- %669 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %669, align 4
- %670 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %671 = load float* %670, align 4 ; [#uses=1]
- %672 = fmul float %671, %642 ; [#uses=2]
- %673 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %674 = load float* %673, align 4 ; [#uses=1]
- %675 = fmul float %674, %647 ; [#uses=2]
- %676 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %677 = load float* %676, align 4 ; [#uses=1]
- %678 = fmul float %677, %652 ; [#uses=2]
- %679 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %678, float* %679, align 4
- %680 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %675, float* %680, align 4
- %681 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %672, float* %681, align 4
- %682 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %682, align 4
- %683 = fmul float %665, %630 ; [#uses=1]
- %684 = fmul float %662, %625 ; [#uses=1]
- %685 = fadd float %683, %684 ; [#uses=1]
- %686 = fmul float %659, %620 ; [#uses=1]
- %687 = fadd float %685, %686 ; [#uses=1]
- %688 = fmul float %678, %652 ; [#uses=1]
- %689 = fmul float %675, %647 ; [#uses=1]
- %690 = fadd float %688, %689 ; [#uses=1]
- %691 = fmul float %672, %642 ; [#uses=1]
- %692 = fadd float %690, %691 ; [#uses=1]
- %693 = fadd float %687, %692 ; [#uses=1]
- %694 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 2, i32 2, i32 5 ; [#uses=1]
- store float %693, float* %694, align 4
- br label %bb28
-
-bb28: ; preds = %bb26, %bb25
- %695 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %695, align 4
- %696 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 0, i32 1 ; [#uses=1]
- %697 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 0, i32 1 ; [#uses=1]
- %698 = call float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* %697, %struct.btTransform* %696) nounwind ; [#uses=2]
- %699 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 16 ; [#uses=2]
- store float %698, float* %699, align 4
- %700 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 14 ; [#uses=3]
- store float 0.000000e+00, float* %700, align 4
- %701 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 13 ; [#uses=3]
- store float 0.000000e+00, float* %701, align 4
- %702 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=3]
- store i8 0, i8* %702, align 2
- %703 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %704 = load float* %703, align 4 ; [#uses=4]
- %705 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %706 = load float* %705, align 4 ; [#uses=4]
- %707 = fcmp ugt float %704, %706 ; [#uses=1]
- br i1 %707, label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit, label %bb.i
-
-bb.i: ; preds = %bb28
- %708 = call float @_Z21btAdjustAngleToLimitsfff(float %698, float %704, float %706) nounwind ; [#uses=5]
- store float %708, float* %699, align 4
- %709 = fcmp ugt float %708, %704 ; [#uses=1]
- br i1 %709, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %710 = fsub float %704, %708 ; [#uses=1]
- store float %710, float* %700, align 4
- store float 1.000000e+00, float* %701, align 4
- store i8 1, i8* %702, align 2
- br label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit
-
-bb2.i: ; preds = %bb.i
- %711 = fcmp ult float %708, %706 ; [#uses=1]
- br i1 %711, label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %712 = fsub float %706, %708 ; [#uses=1]
- store float %712, float* %700, align 4
- store float -1.000000e+00, float* %701, align 4
- store i8 1, i8* %702, align 2
- br label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit
-
-_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit: ; preds = %bb3.i, %bb2.i, %bb1.i, %bb28
- %713 = load float* %303, align 4 ; [#uses=1]
- %714 = fmul float %713, %272 ; [#uses=1]
- %715 = load float* %306, align 4 ; [#uses=1]
- %716 = fmul float %715, %273 ; [#uses=1]
- %717 = fadd float %714, %716 ; [#uses=1]
- %718 = load float* %310, align 4 ; [#uses=1]
- %719 = fmul float %718, %274 ; [#uses=1]
- %720 = fadd float %717, %719 ; [#uses=8]
- %721 = load float* %314, align 4 ; [#uses=1]
- %722 = fmul float %721, %272 ; [#uses=1]
- %723 = load float* %317, align 4 ; [#uses=1]
- %724 = fmul float %723, %273 ; [#uses=1]
- %725 = fadd float %722, %724 ; [#uses=1]
- %726 = load float* %321, align 4 ; [#uses=1]
- %727 = fmul float %726, %274 ; [#uses=1]
- %728 = fadd float %725, %727 ; [#uses=8]
- %729 = load float* %325, align 4 ; [#uses=1]
- %730 = fmul float %729, %272 ; [#uses=1]
- %731 = load float* %328, align 4 ; [#uses=1]
- %732 = fmul float %731, %273 ; [#uses=1]
- %733 = fadd float %730, %732 ; [#uses=1]
- %734 = load float* %332, align 4 ; [#uses=1]
- %735 = fmul float %734, %274 ; [#uses=1]
- %736 = fadd float %733, %735 ; [#uses=8]
- %737 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %738 = load float* %737, align 4 ; [#uses=1]
- %739 = fmul float %738, %736 ; [#uses=1]
- %740 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %741 = load float* %740, align 4 ; [#uses=1]
- %742 = fmul float %741, %728 ; [#uses=1]
- %743 = fadd float %739, %742 ; [#uses=1]
- %744 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %745 = load float* %744, align 4 ; [#uses=1]
- %746 = fmul float %745, %720 ; [#uses=1]
- %747 = fadd float %743, %746 ; [#uses=1]
- %748 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %749 = load float* %748, align 4 ; [#uses=1]
- %750 = fmul float %749, %736 ; [#uses=1]
- %751 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %752 = load float* %751, align 4 ; [#uses=1]
- %753 = fmul float %752, %728 ; [#uses=1]
- %754 = fadd float %750, %753 ; [#uses=1]
- %755 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %756 = load float* %755, align 4 ; [#uses=1]
- %757 = fmul float %756, %720 ; [#uses=1]
- %758 = fadd float %754, %757 ; [#uses=1]
- %759 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %760 = load float* %759, align 4 ; [#uses=1]
- %761 = fmul float %760, %736 ; [#uses=1]
- %762 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %763 = load float* %762, align 4 ; [#uses=1]
- %764 = fmul float %763, %728 ; [#uses=1]
- %765 = fadd float %761, %764 ; [#uses=1]
- %766 = getelementptr inbounds %struct.btRigidBody* %302, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %767 = load float* %766, align 4 ; [#uses=1]
- %768 = fmul float %767, %720 ; [#uses=1]
- %769 = fadd float %765, %768 ; [#uses=1]
- %770 = fmul float %736, %769 ; [#uses=1]
- %771 = fmul float %728, %758 ; [#uses=1]
- %772 = fadd float %770, %771 ; [#uses=1]
- %773 = fmul float %720, %747 ; [#uses=1]
- %774 = fadd float %772, %773 ; [#uses=1]
- %775 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %776 = load float* %775, align 4 ; [#uses=1]
- %777 = fmul float %776, %736 ; [#uses=1]
- %778 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %779 = load float* %778, align 4 ; [#uses=1]
- %780 = fmul float %779, %728 ; [#uses=1]
- %781 = fadd float %777, %780 ; [#uses=1]
- %782 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %783 = load float* %782, align 4 ; [#uses=1]
- %784 = fmul float %783, %720 ; [#uses=1]
- %785 = fadd float %781, %784 ; [#uses=1]
- %786 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %787 = load float* %786, align 4 ; [#uses=1]
- %788 = fmul float %787, %736 ; [#uses=1]
- %789 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %790 = load float* %789, align 4 ; [#uses=1]
- %791 = fmul float %790, %728 ; [#uses=1]
- %792 = fadd float %788, %791 ; [#uses=1]
- %793 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %794 = load float* %793, align 4 ; [#uses=1]
- %795 = fmul float %794, %720 ; [#uses=1]
- %796 = fadd float %792, %795 ; [#uses=1]
- %797 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %798 = load float* %797, align 4 ; [#uses=1]
- %799 = fmul float %798, %736 ; [#uses=1]
- %800 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %801 = load float* %800, align 4 ; [#uses=1]
- %802 = fmul float %801, %728 ; [#uses=1]
- %803 = fadd float %799, %802 ; [#uses=1]
- %804 = getelementptr inbounds %struct.btRigidBody* %367, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %805 = load float* %804, align 4 ; [#uses=1]
- %806 = fmul float %805, %720 ; [#uses=1]
- %807 = fadd float %803, %806 ; [#uses=1]
- %808 = fmul float %736, %807 ; [#uses=1]
- %809 = fmul float %728, %796 ; [#uses=1]
- %810 = fadd float %808, %809 ; [#uses=1]
- %811 = fmul float %720, %785 ; [#uses=1]
- %812 = fadd float %810, %811 ; [#uses=1]
- %813 = fadd float %774, %812 ; [#uses=1]
- %814 = fdiv float 1.000000e+00, %813 ; [#uses=1]
- %815 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 12 ; [#uses=1]
- store float %814, float* %815, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(%struct.btHingeConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 21 ; [#uses=1]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=4]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- store i32 5, i32* %2, align 4
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=3]
- store i32 1, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %6 = load %struct.btRigidBody** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btRigidBody* %6, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %9 = load %struct.btRigidBody** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = tail call float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* %10, %struct.btTransform* %7) nounwind ; [#uses=2]
- %12 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 16 ; [#uses=2]
- store float %11, float* %12, align 4
- %13 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 14 ; [#uses=3]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 13 ; [#uses=3]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=3]
- store i8 0, i8* %15, align 2
- %16 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=4]
- %20 = fcmp ugt float %17, %19 ; [#uses=1]
- br i1 %20, label %bb2, label %bb.i
-
-bb.i: ; preds = %bb1
- %21 = tail call float @_Z21btAdjustAngleToLimitsfff(float %11, float %17, float %19) nounwind ; [#uses=5]
- store float %21, float* %12, align 4
- %22 = fcmp ugt float %21, %17 ; [#uses=1]
- br i1 %22, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %23 = fsub float %17, %21 ; [#uses=1]
- store float %23, float* %13, align 4
- store float 1.000000e+00, float* %14, align 4
- store i8 1, i8* %15, align 2
- br label %bb8
-
-bb2.i: ; preds = %bb.i
- %24 = fcmp ult float %21, %19 ; [#uses=1]
- br i1 %24, label %bb2, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %25 = fsub float %19, %21 ; [#uses=1]
- store float %25, float* %13, align 4
- store float -1.000000e+00, float* %14, align 4
- store i8 1, i8* %15, align 2
- br label %bb8
-
-bb2: ; preds = %bb2.i, %bb1
- %26 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- %27 = load i8* %26, align 1 ; [#uses=1]
- %toBool3 = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool3, label %bb5, label %bb8
-
-bb5: ; preds = %bb2
- ret void
-
-bb8: ; preds = %bb2, %bb3.i, %bb1.i
- %28 = load i32* %2, align 4 ; [#uses=1]
- %29 = add nsw i32 %28, 1 ; [#uses=1]
- store i32 %29, i32* %2, align 4
- %30 = load i32* %4, align 4 ; [#uses=1]
- %31 = add nsw i32 %30, -1 ; [#uses=1]
- store i32 %31, i32* %4, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btHingeConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %3 = load %struct.btRigidBody** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %6 = load %struct.btRigidBody** %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btRigidBody* %6, i32 0, i32 3 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btRigidBody* %6, i32 0, i32 0, i32 1 ; [#uses=2]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- tail call void @_ZN17btHingeConstraint32getInfo2InternalUsingFrameOffsetEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_(%struct.btHingeConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %9, %struct.btTransform* %8, %struct.btQuadWord* %7, %struct.btQuadWord* %4)
- ret void
-
-bb1: ; preds = %entry
- tail call void @_ZN17btHingeConstraint16getInfo2InternalEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_(%struct.btHingeConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %9, %struct.btTransform* %8, %struct.btQuadWord* %7, %struct.btQuadWord* %4)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN17btHingeConstraint16getInfo2InternalEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_(%struct.btHingeConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB, %struct.btQuadWord* nocapture %angVelA, %struct.btQuadWord* nocapture %angVelB) align 2 {
-entry:
- %pivotAInW = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %pivotBInW = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 6 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=9]
- %2 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- %9 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = fadd float %6, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fadd float %12, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fadd float %18, %20 ; [#uses=3]
- %22 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- %24 = fmul float %23, %5 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=4]
- %27 = fmul float %26, %10 ; [#uses=1]
- %28 = fadd float %24, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=4]
- %31 = fmul float %30, %16 ; [#uses=1]
- %32 = fadd float %28, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fadd float %32, %34 ; [#uses=3]
- %36 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=4]
- %38 = fmul float %37, %5 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=4]
- %41 = fmul float %40, %10 ; [#uses=1]
- %42 = fadd float %38, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=4]
- %45 = fmul float %44, %16 ; [#uses=1]
- %46 = fadd float %42, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=2]
- %49 = fadd float %46, %48 ; [#uses=3]
- %50 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = fmul float %51, %3 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=3]
- %55 = fmul float %54, %8 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=3]
- %59 = fmul float %58, %14 ; [#uses=1]
- %60 = fadd float %56, %59 ; [#uses=6]
- %61 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=3]
- %63 = fmul float %62, %3 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=3]
- %66 = fmul float %65, %8 ; [#uses=1]
- %67 = fadd float %63, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=3]
- %70 = fmul float %69, %14 ; [#uses=1]
- %71 = fadd float %67, %70 ; [#uses=3]
- %72 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=3]
- %74 = fmul float %73, %3 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=3]
- %77 = fmul float %76, %8 ; [#uses=1]
- %78 = fadd float %74, %77 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=3]
- %81 = fmul float %80, %14 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=3]
- %83 = fmul float %51, %23 ; [#uses=1]
- %84 = fmul float %54, %26 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %58, %30 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=6]
- %88 = fmul float %62, %23 ; [#uses=1]
- %89 = fmul float %65, %26 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = fmul float %69, %30 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=3]
- %93 = fmul float %73, %23 ; [#uses=1]
- %94 = fmul float %76, %26 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %80, %30 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=3]
- %98 = fmul float %51, %37 ; [#uses=1]
- %99 = fmul float %54, %40 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %58, %44 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=6]
- %103 = fmul float %62, %37 ; [#uses=1]
- %104 = fmul float %65, %40 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %69, %44 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=3]
- %108 = fmul float %73, %37 ; [#uses=1]
- %109 = fmul float %76, %40 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = fmul float %80, %44 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=3]
- %113 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=2]
- %115 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=3]
- %117 = fmul float %114, %116 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=2]
- %120 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=3]
- %122 = fmul float %119, %121 ; [#uses=1]
- %123 = fadd float %117, %122 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=2]
- %126 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=3]
- %128 = fmul float %125, %127 ; [#uses=1]
- %129 = fadd float %123, %128 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = fadd float %129, %131 ; [#uses=3]
- %133 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=2]
- %135 = fmul float %134, %116 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=2]
- %138 = fmul float %137, %121 ; [#uses=1]
- %139 = fadd float %135, %138 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=2]
- %142 = fmul float %141, %127 ; [#uses=1]
- %143 = fadd float %139, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = fadd float %143, %145 ; [#uses=3]
- %147 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=2]
- %149 = fmul float %148, %116 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=2]
- %152 = fmul float %151, %121 ; [#uses=1]
- %153 = fadd float %149, %152 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=2]
- %156 = fmul float %155, %127 ; [#uses=1]
- %157 = fadd float %153, %156 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fadd float %157, %159 ; [#uses=3]
- %161 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=3]
- %163 = fmul float %162, %114 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=3]
- %166 = fmul float %165, %119 ; [#uses=1]
- %167 = fadd float %163, %166 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=3]
- %170 = fmul float %169, %125 ; [#uses=1]
- %171 = fadd float %167, %170 ; [#uses=2]
- %172 = fmul float %162, %134 ; [#uses=1]
- %173 = fmul float %165, %137 ; [#uses=1]
- %174 = fadd float %172, %173 ; [#uses=1]
- %175 = fmul float %169, %141 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=2]
- %177 = fmul float %162, %148 ; [#uses=1]
- %178 = fmul float %165, %151 ; [#uses=1]
- %179 = fadd float %177, %178 ; [#uses=1]
- %180 = fmul float %169, %155 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=2]
- %182 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %49, float* %182, align 8
- %183 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %35, float* %183, align 4
- %184 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %21, float* %184, align 8
- %185 = getelementptr inbounds %struct.btQuadWord* %pivotAInW, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %185, align 4
- %186 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %160, float* %186, align 8
- %187 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %146, float* %187, align 4
- %188 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %132, float* %188, align 8
- %189 = getelementptr inbounds %struct.btQuadWord* %pivotBInW, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %189, align 4
- %190 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=2]
- %191 = load i8* %190, align 4 ; [#uses=1]
- %toBoolnot = icmp eq i8 %191, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb, label %bb4
-
-bb: ; preds = %entry
- %192 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %193 = load float** %192, align 4 ; [#uses=1]
- store float 1.000000e+00, float* %193, align 4
- %194 = load float** %192, align 4 ; [#uses=1]
- %195 = add nsw i32 %1, 1 ; [#uses=1]
- %196 = getelementptr inbounds float* %194, i32 %195 ; [#uses=1]
- store float 1.000000e+00, float* %196, align 4
- %197 = load float** %192, align 4 ; [#uses=1]
- %198 = shl i32 %1, 1 ; [#uses=1]
- %199 = add i32 %198, 2 ; [#uses=1]
- %200 = getelementptr inbounds float* %197, i32 %199 ; [#uses=1]
- store float 1.000000e+00, float* %200, align 4
- %.pre = load float* %19, align 4 ; [#uses=1]
- %.pre115 = load float* %33, align 4 ; [#uses=1]
- %.pre116 = load float* %47, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb, %entry
- %201 = phi float [ %.pre116, %bb ], [ %48, %entry ] ; [#uses=1]
- %202 = phi float [ %.pre115, %bb ], [ %34, %entry ] ; [#uses=1]
- %203 = phi float [ %.pre, %bb ], [ %20, %entry ] ; [#uses=1]
- %204 = fsub float %21, %203 ; [#uses=2]
- %205 = fsub float %35, %202 ; [#uses=2]
- %206 = fsub float %49, %201 ; [#uses=2]
- %207 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=10]
- %208 = load float** %207, align 4 ; [#uses=12]
- %209 = getelementptr inbounds float* %208, i32 %1 ; [#uses=1]
- %210 = shl i32 %1, 1 ; [#uses=6]
- %211 = getelementptr inbounds float* %208, i32 %210 ; [#uses=1]
- %212 = fsub float -0.000000e+00, %204 ; [#uses=1]
- %213 = fsub float -0.000000e+00, %205 ; [#uses=1]
- %214 = fsub float -0.000000e+00, %206 ; [#uses=1]
- store float 0.000000e+00, float* %208, align 4
- %215 = getelementptr inbounds float* %208, i32 1 ; [#uses=1]
- store float %204, float* %215, align 4
- %216 = getelementptr inbounds float* %208, i32 2 ; [#uses=1]
- store float %213, float* %216, align 4
- %217 = getelementptr inbounds float* %208, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %217, align 4
- store float %212, float* %209, align 4
- %.sum = add i32 %1, 1 ; [#uses=2]
- %218 = getelementptr inbounds float* %208, i32 %.sum ; [#uses=1]
- store float 0.000000e+00, float* %218, align 4
- %.sum99 = add i32 %1, 2 ; [#uses=2]
- %219 = getelementptr inbounds float* %208, i32 %.sum99 ; [#uses=1]
- store float %206, float* %219, align 4
- %.sum100 = add i32 %1, 3 ; [#uses=2]
- %220 = getelementptr inbounds float* %208, i32 %.sum100 ; [#uses=1]
- store float 0.000000e+00, float* %220, align 4
- store float %205, float* %211, align 4
- %.sum101102 = or i32 %210, 1 ; [#uses=2]
- %221 = getelementptr inbounds float* %208, i32 %.sum101102 ; [#uses=1]
- store float %214, float* %221, align 4
- %.sum103 = add i32 %210, 2 ; [#uses=2]
- %222 = getelementptr inbounds float* %208, i32 %.sum103 ; [#uses=1]
- store float 0.000000e+00, float* %222, align 4
- %.sum104 = add i32 %210, 3 ; [#uses=2]
- %223 = getelementptr inbounds float* %208, i32 %.sum104 ; [#uses=1]
- store float 0.000000e+00, float* %223, align 4
- %224 = load float* %130, align 4 ; [#uses=1]
- %225 = fsub float %132, %224 ; [#uses=2]
- %226 = load float* %144, align 4 ; [#uses=1]
- %227 = fsub float %146, %226 ; [#uses=2]
- %228 = load float* %158, align 4 ; [#uses=1]
- %229 = fsub float %160, %228 ; [#uses=2]
- %230 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=10]
- %231 = load float** %230, align 4 ; [#uses=12]
- %232 = getelementptr inbounds float* %231, i32 %1 ; [#uses=1]
- %233 = getelementptr inbounds float* %231, i32 %210 ; [#uses=1]
- %234 = fsub float -0.000000e+00, %225 ; [#uses=1]
- store float 0.000000e+00, float* %231, align 4
- %235 = getelementptr inbounds float* %231, i32 1 ; [#uses=1]
- store float %234, float* %235, align 4
- %236 = getelementptr inbounds float* %231, i32 2 ; [#uses=1]
- store float %227, float* %236, align 4
- %237 = getelementptr inbounds float* %231, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %237, align 4
- %238 = fsub float -0.000000e+00, %229 ; [#uses=1]
- store float %225, float* %232, align 4
- %239 = getelementptr inbounds float* %231, i32 %.sum ; [#uses=1]
- store float 0.000000e+00, float* %239, align 4
- %240 = getelementptr inbounds float* %231, i32 %.sum99 ; [#uses=1]
- store float %238, float* %240, align 4
- %241 = getelementptr inbounds float* %231, i32 %.sum100 ; [#uses=1]
- store float 0.000000e+00, float* %241, align 4
- %242 = fsub float -0.000000e+00, %227 ; [#uses=1]
- store float %242, float* %233, align 4
- %243 = getelementptr inbounds float* %231, i32 %.sum101102 ; [#uses=1]
- store float %229, float* %243, align 4
- %244 = getelementptr inbounds float* %231, i32 %.sum103 ; [#uses=1]
- store float 0.000000e+00, float* %244, align 4
- %245 = getelementptr inbounds float* %231, i32 %.sum104 ; [#uses=1]
- store float 0.000000e+00, float* %245, align 4
- %246 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=3]
- %247 = load float* %246, align 4 ; [#uses=1]
- %248 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=2]
- %249 = load float* %248, align 4 ; [#uses=1]
- %250 = fmul float %247, %249 ; [#uses=5]
- %251 = load i8* %190, align 4 ; [#uses=1]
- %toBool8not = icmp eq i8 %251, 0 ; [#uses=1]
- br i1 %toBool8not, label %bb15.loopexit, label %bb15
-
-bb15.loopexit: ; preds = %bb4
- %252 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=3]
- %253 = load float** %252, align 4 ; [#uses=1]
- %254 = fsub float %160, %49 ; [#uses=1]
- %255 = fmul float %254, %250 ; [#uses=1]
- store float %255, float* %253, align 4
- %256 = load float** %252, align 4 ; [#uses=1]
- %257 = fsub float %146, %35 ; [#uses=1]
- %258 = fmul float %257, %250 ; [#uses=1]
- %scevgep114.1 = getelementptr float* %256, i32 %1 ; [#uses=1]
- store float %258, float* %scevgep114.1, align 4
- %259 = load float** %252, align 4 ; [#uses=1]
- %260 = fsub float %132, %21 ; [#uses=1]
- %261 = fmul float %260, %250 ; [#uses=1]
- %scevgep114.2 = getelementptr float* %259, i32 %210 ; [#uses=1]
- store float %261, float* %scevgep114.2, align 4
- br label %bb15
-
-bb15: ; preds = %bb15.loopexit, %bb4
- %262 = load i32* %0, align 4 ; [#uses=2]
- %263 = mul nsw i32 %262, 3 ; [#uses=5]
- %264 = shl i32 %262, 2 ; [#uses=5]
- %265 = load float** %207, align 4 ; [#uses=1]
- %266 = getelementptr inbounds float* %265, i32 %263 ; [#uses=1]
- store float %112, float* %266, align 4
- %267 = load float** %207, align 4 ; [#uses=1]
- %268 = add nsw i32 %263, 1 ; [#uses=2]
- %269 = getelementptr inbounds float* %267, i32 %268 ; [#uses=1]
- store float %97, float* %269, align 4
- %270 = load float** %207, align 4 ; [#uses=1]
- %271 = add nsw i32 %263, 2 ; [#uses=2]
- %272 = getelementptr inbounds float* %270, i32 %271 ; [#uses=1]
- store float %82, float* %272, align 4
- %273 = load float** %207, align 4 ; [#uses=1]
- %274 = getelementptr inbounds float* %273, i32 %264 ; [#uses=1]
- store float %107, float* %274, align 4
- %275 = load float** %207, align 4 ; [#uses=1]
- %276 = or i32 %264, 1 ; [#uses=2]
- %277 = getelementptr inbounds float* %275, i32 %276 ; [#uses=1]
- store float %92, float* %277, align 4
- %278 = load float** %207, align 4 ; [#uses=1]
- %279 = or i32 %264, 2 ; [#uses=2]
- %280 = getelementptr inbounds float* %278, i32 %279 ; [#uses=1]
- store float %71, float* %280, align 4
- %281 = load float** %230, align 4 ; [#uses=1]
- %282 = fsub float -0.000000e+00, %112 ; [#uses=1]
- %283 = getelementptr inbounds float* %281, i32 %263 ; [#uses=1]
- store float %282, float* %283, align 4
- %284 = load float** %230, align 4 ; [#uses=1]
- %285 = fsub float -0.000000e+00, %97 ; [#uses=1]
- %286 = getelementptr inbounds float* %284, i32 %268 ; [#uses=1]
- store float %285, float* %286, align 4
- %287 = load float** %230, align 4 ; [#uses=1]
- %288 = fsub float -0.000000e+00, %82 ; [#uses=1]
- %289 = getelementptr inbounds float* %287, i32 %271 ; [#uses=1]
- store float %288, float* %289, align 4
- %290 = load float** %230, align 4 ; [#uses=1]
- %291 = fsub float -0.000000e+00, %107 ; [#uses=1]
- %292 = getelementptr inbounds float* %290, i32 %264 ; [#uses=1]
- store float %291, float* %292, align 4
- %293 = load float** %230, align 4 ; [#uses=1]
- %294 = fsub float -0.000000e+00, %92 ; [#uses=1]
- %295 = getelementptr inbounds float* %293, i32 %276 ; [#uses=1]
- store float %294, float* %295, align 4
- %296 = load float** %230, align 4 ; [#uses=1]
- %297 = fsub float -0.000000e+00, %71 ; [#uses=1]
- %298 = getelementptr inbounds float* %296, i32 %279 ; [#uses=1]
- store float %297, float* %298, align 4
- %299 = fmul float %102, %176 ; [#uses=1]
- %300 = fmul float %87, %181 ; [#uses=1]
- %301 = fsub float %299, %300 ; [#uses=2]
- %302 = fmul float %60, %181 ; [#uses=1]
- %303 = fmul float %102, %171 ; [#uses=1]
- %304 = fsub float %302, %303 ; [#uses=2]
- %305 = fmul float %87, %171 ; [#uses=1]
- %306 = fmul float %60, %176 ; [#uses=1]
- %307 = fsub float %305, %306 ; [#uses=2]
- %308 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=8]
- %309 = load float** %308, align 4 ; [#uses=1]
- %310 = fmul float %307, %112 ; [#uses=1]
- %311 = fmul float %304, %97 ; [#uses=1]
- %312 = fadd float %310, %311 ; [#uses=1]
- %313 = fmul float %301, %82 ; [#uses=1]
- %314 = fadd float %312, %313 ; [#uses=1]
- %315 = fmul float %314, %250 ; [#uses=1]
- %316 = getelementptr inbounds float* %309, i32 %263 ; [#uses=1]
- store float %315, float* %316, align 4
- %317 = load float** %308, align 4 ; [#uses=1]
- %318 = fmul float %307, %107 ; [#uses=1]
- %319 = fmul float %304, %92 ; [#uses=1]
- %320 = fadd float %318, %319 ; [#uses=1]
- %321 = fmul float %301, %71 ; [#uses=1]
- %322 = fadd float %320, %321 ; [#uses=1]
- %323 = fmul float %322, %250 ; [#uses=1]
- %324 = getelementptr inbounds float* %317, i32 %264 ; [#uses=1]
- store float %323, float* %324, align 4
- %325 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=1]
- %326 = load i8* %325, align 2 ; [#uses=1]
- %327 = icmp eq i8 %326, 0 ; [#uses=1]
- br i1 %327, label %bb21, label %bb17
-
-bb17: ; preds = %bb15
- %328 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 14 ; [#uses=1]
- %329 = load float* %328, align 4 ; [#uses=1]
- %330 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %331 = load float* %330, align 4 ; [#uses=1]
- %332 = fmul float %329, %331 ; [#uses=2]
- %333 = fcmp ogt float %332, 0.000000e+00 ; [#uses=1]
- %iftmp.200.0 = select i1 %333, i32 1, i32 2 ; [#uses=1]
- br label %bb21
-
-bb21: ; preds = %bb17, %bb15
- %limit_err.0 = phi float [ %332, %bb17 ], [ 0.000000e+00, %bb15 ] ; [#uses=1]
- %limit.0 = phi i32 [ %iftmp.200.0, %bb17 ], [ 0, %bb15 ] ; [#uses=5]
- %334 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- %335 = load i8* %334, align 1 ; [#uses=1]
- %not.toBool22 = icmp ne i8 %335, 0 ; [#uses=2]
- %powered.0 = zext i1 %not.toBool22 to i32 ; [#uses=1]
- %336 = or i32 %powered.0, %limit.0 ; [#uses=1]
- %337 = icmp eq i32 %336, 0 ; [#uses=1]
- br i1 %337, label %return, label %bb25
-
-bb25: ; preds = %bb21
- %338 = load i32* %0, align 4 ; [#uses=1]
- %339 = mul nsw i32 %338, 5 ; [#uses=19]
- %340 = load float** %207, align 4 ; [#uses=1]
- %341 = getelementptr inbounds float* %340, i32 %339 ; [#uses=1]
- store float %102, float* %341, align 4
- %342 = load float** %207, align 4 ; [#uses=1]
- %343 = add nsw i32 %339, 1 ; [#uses=2]
- %344 = getelementptr inbounds float* %342, i32 %343 ; [#uses=1]
- store float %87, float* %344, align 4
- %345 = load float** %207, align 4 ; [#uses=1]
- %346 = add nsw i32 %339, 2 ; [#uses=2]
- %347 = getelementptr inbounds float* %345, i32 %346 ; [#uses=1]
- store float %60, float* %347, align 4
- %348 = load float** %230, align 4 ; [#uses=1]
- %349 = fsub float -0.000000e+00, %102 ; [#uses=1]
- %350 = getelementptr inbounds float* %348, i32 %339 ; [#uses=1]
- store float %349, float* %350, align 4
- %351 = load float** %230, align 4 ; [#uses=1]
- %352 = fsub float -0.000000e+00, %87 ; [#uses=1]
- %353 = getelementptr inbounds float* %351, i32 %343 ; [#uses=1]
- store float %352, float* %353, align 4
- %354 = load float** %230, align 4 ; [#uses=1]
- %355 = fsub float -0.000000e+00, %60 ; [#uses=1]
- %356 = getelementptr inbounds float* %354, i32 %346 ; [#uses=1]
- store float %355, float* %356, align 4
- %357 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %358 = load float* %357, align 4 ; [#uses=2]
- %359 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %360 = load float* %359, align 4 ; [#uses=2]
- %.not = icmp ne i32 %limit.0, 0 ; [#uses=1]
- %361 = fcmp oeq float %358, %360 ; [#uses=2]
- %or.cond = and i1 %.not, %361 ; [#uses=1]
- %362 = load float** %308, align 4 ; [#uses=1]
- %363 = getelementptr inbounds float* %362, i32 %339 ; [#uses=1]
- store float 0.000000e+00, float* %363, align 4
- %364 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=2]
- %365 = load i32* %364, align 4 ; [#uses=2]
- %366 = and i32 %365, 2 ; [#uses=1]
- %367 = icmp eq i32 %366, 0 ; [#uses=1]
- br i1 %367, label %bb31, label %bb29
-
-bb29: ; preds = %bb25
- %368 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 28 ; [#uses=1]
- br label %bb31
-
-bb31: ; preds = %bb29, %bb25
- %iftmp.202.0.in = phi float* [ %368, %bb29 ], [ %248, %bb25 ] ; [#uses=1]
- %iftmp.202.0 = load float* %iftmp.202.0.in, align 4 ; [#uses=2]
- %369 = xor i1 %not.toBool22, true ; [#uses=1]
- %370 = or i1 %or.cond, %369 ; [#uses=1]
- br i1 %370, label %bb35, label %bb32
-
-bb32: ; preds = %bb31
- %371 = and i32 %365, 4 ; [#uses=1]
- %372 = icmp eq i32 %371, 0 ; [#uses=1]
- br i1 %372, label %bb34, label %bb33
-
-bb33: ; preds = %bb32
- %373 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %374 = load float** %373, align 4 ; [#uses=1]
- %375 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 26 ; [#uses=1]
- %376 = load float* %375, align 4 ; [#uses=1]
- %377 = getelementptr inbounds float* %374, i32 %339 ; [#uses=1]
- store float %376, float* %377, align 4
- br label %bb34
-
-bb34: ; preds = %bb33, %bb32
- %378 = load float* %246, align 4 ; [#uses=1]
- %379 = fmul float %378, %iftmp.202.0 ; [#uses=1]
- %380 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 5 ; [#uses=2]
- %381 = load float* %380, align 4 ; [#uses=1]
- %382 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 16 ; [#uses=1]
- %383 = load float* %382, align 4 ; [#uses=1]
- %384 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %385 = call float @_ZN17btTypedConstraint14getMotorFactorEfffff(%struct.btTypedConstraint* %384, float %383, float %358, float %360, float %381, float %379) ; [#uses=1]
- %386 = load float** %308, align 4 ; [#uses=1]
- %387 = getelementptr inbounds float* %386, i32 %339 ; [#uses=2]
- %388 = load float* %387, align 4 ; [#uses=1]
- %389 = load float* %380, align 4 ; [#uses=1]
- %390 = fmul float %389, %385 ; [#uses=1]
- %391 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %392 = load float* %391, align 4 ; [#uses=1]
- %393 = fmul float %390, %392 ; [#uses=1]
- %394 = fadd float %388, %393 ; [#uses=1]
- store float %394, float* %387, align 4
- %395 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %396 = load float** %395, align 4 ; [#uses=1]
- %397 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 6 ; [#uses=2]
- %398 = load float* %397, align 4 ; [#uses=1]
- %399 = fsub float -0.000000e+00, %398 ; [#uses=1]
- %400 = getelementptr inbounds float* %396, i32 %339 ; [#uses=1]
- store float %399, float* %400, align 4
- %401 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %402 = load float** %401, align 4 ; [#uses=1]
- %403 = load float* %397, align 4 ; [#uses=1]
- %404 = getelementptr inbounds float* %402, i32 %339 ; [#uses=1]
- store float %403, float* %404, align 4
- br label %bb35
-
-bb35: ; preds = %bb34, %bb31
- %405 = icmp eq i32 %limit.0, 0 ; [#uses=1]
- br i1 %405, label %return, label %bb36
-
-bb36: ; preds = %bb35
- %406 = load float* %246, align 4 ; [#uses=1]
- %407 = fmul float %406, %iftmp.202.0 ; [#uses=1]
- %408 = load float** %308, align 4 ; [#uses=1]
- %409 = getelementptr inbounds float* %408, i32 %339 ; [#uses=2]
- %410 = load float* %409, align 4 ; [#uses=1]
- %411 = fmul float %407, %limit_err.0 ; [#uses=1]
- %412 = fadd float %410, %411 ; [#uses=1]
- store float %412, float* %409, align 4
- %413 = load i32* %364, align 4 ; [#uses=1]
- %414 = and i32 %413, 1 ; [#uses=1]
- %toBool37 = icmp eq i32 %414, 0 ; [#uses=1]
- br i1 %toBool37, label %bb39, label %bb38
-
-bb38: ; preds = %bb36
- %415 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %416 = load float** %415, align 4 ; [#uses=1]
- %417 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 27 ; [#uses=1]
- %418 = load float* %417, align 4 ; [#uses=1]
- %419 = getelementptr inbounds float* %416, i32 %339 ; [#uses=1]
- store float %418, float* %419, align 4
- br label %bb39
-
-bb39: ; preds = %bb38, %bb36
- br i1 %361, label %bb40, label %bb41
-
-bb40: ; preds = %bb39
- %420 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %421 = load float** %420, align 4 ; [#uses=1]
- %422 = getelementptr inbounds float* %421, i32 %339 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %422, align 4
- %423 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %424 = load float** %423, align 4 ; [#uses=1]
- %425 = getelementptr inbounds float* %424, i32 %339 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %425, align 4
- br label %bb44
-
-bb41: ; preds = %bb39
- %426 = icmp eq i32 %limit.0, 1 ; [#uses=1]
- %427 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %428 = load float** %427, align 4 ; [#uses=1]
- %429 = getelementptr inbounds float* %428, i32 %339 ; [#uses=2]
- br i1 %426, label %bb42, label %bb43
-
-bb42: ; preds = %bb41
- store float 0.000000e+00, float* %429, align 4
- %430 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %431 = load float** %430, align 4 ; [#uses=1]
- %432 = getelementptr inbounds float* %431, i32 %339 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %432, align 4
- br label %bb44
-
-bb43: ; preds = %bb41
- store float 0xC7EFFFFFE0000000, float* %429, align 4
- %433 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %434 = load float** %433, align 4 ; [#uses=1]
- %435 = getelementptr inbounds float* %434, i32 %339 ; [#uses=1]
- store float 0.000000e+00, float* %435, align 4
- br label %bb44
-
-bb44: ; preds = %bb43, %bb42, %bb40
- %436 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %437 = load float* %436, align 4 ; [#uses=3]
- %438 = fcmp ogt float %437, 0.000000e+00 ; [#uses=1]
- br i1 %438, label %bb45, label %bb53
-
-bb45: ; preds = %bb44
- %439 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 0 ; [#uses=1]
- %440 = load float* %439, align 4 ; [#uses=1]
- %441 = fmul float %440, %102 ; [#uses=1]
- %442 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 1 ; [#uses=1]
- %443 = load float* %442, align 4 ; [#uses=1]
- %444 = fmul float %443, %87 ; [#uses=1]
- %445 = fadd float %441, %444 ; [#uses=1]
- %446 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 2 ; [#uses=1]
- %447 = load float* %446, align 4 ; [#uses=1]
- %448 = fmul float %447, %60 ; [#uses=1]
- %449 = fadd float %445, %448 ; [#uses=1]
- %450 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 0 ; [#uses=1]
- %451 = load float* %450, align 4 ; [#uses=1]
- %452 = fmul float %451, %102 ; [#uses=1]
- %453 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 1 ; [#uses=1]
- %454 = load float* %453, align 4 ; [#uses=1]
- %455 = fmul float %454, %87 ; [#uses=1]
- %456 = fadd float %452, %455 ; [#uses=1]
- %457 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 2 ; [#uses=1]
- %458 = load float* %457, align 4 ; [#uses=1]
- %459 = fmul float %458, %60 ; [#uses=1]
- %460 = fadd float %456, %459 ; [#uses=1]
- %461 = fsub float %449, %460 ; [#uses=4]
- %462 = icmp eq i32 %limit.0, 1 ; [#uses=1]
- br i1 %462, label %bb46, label %bb49
-
-bb46: ; preds = %bb45
- %463 = fcmp olt float %461, 0.000000e+00 ; [#uses=1]
- br i1 %463, label %bb47, label %bb53
-
-bb47: ; preds = %bb46
- %464 = fsub float -0.000000e+00, %437 ; [#uses=1]
- %465 = fmul float %461, %464 ; [#uses=2]
- %466 = load float** %308, align 4 ; [#uses=1]
- %467 = getelementptr inbounds float* %466, i32 %339 ; [#uses=2]
- %468 = load float* %467, align 4 ; [#uses=1]
- %469 = fcmp olt float %468, %465 ; [#uses=1]
- br i1 %469, label %bb48, label %bb53
-
-bb48: ; preds = %bb47
- store float %465, float* %467, align 4
- br label %bb53
-
-bb49: ; preds = %bb45
- %470 = fcmp ogt float %461, 0.000000e+00 ; [#uses=1]
- br i1 %470, label %bb50, label %bb53
-
-bb50: ; preds = %bb49
- %471 = fsub float -0.000000e+00, %437 ; [#uses=1]
- %472 = fmul float %461, %471 ; [#uses=2]
- %473 = load float** %308, align 4 ; [#uses=1]
- %474 = getelementptr inbounds float* %473, i32 %339 ; [#uses=2]
- %475 = load float* %474, align 4 ; [#uses=1]
- %476 = fcmp ogt float %475, %472 ; [#uses=1]
- br i1 %476, label %bb52, label %bb53
-
-bb52: ; preds = %bb50
- store float %472, float* %474, align 4
- br label %bb53
-
-bb53: ; preds = %bb52, %bb50, %bb49, %bb48, %bb47, %bb46, %bb44
- %477 = load float** %308, align 4 ; [#uses=1]
- %478 = getelementptr inbounds float* %477, i32 %339 ; [#uses=2]
- %479 = load float* %478, align 4 ; [#uses=1]
- %480 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %481 = load float* %480, align 4 ; [#uses=1]
- %482 = fmul float %479, %481 ; [#uses=1]
- store float %482, float* %478, align 4
- ret void
-
-return: ; preds = %bb35, %bb21
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraint32getInfo2InternalUsingFrameOffsetEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_(%struct.btHingeConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* nocapture %angVelA, %struct.btQuadWord* nocapture %angVelB) align 2 {
-entry:
- %ax1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmpA = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmpB = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %p = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %q = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 6 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=13]
- %2 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=3]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = fadd float %6, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fadd float %12, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fadd float %18, %20 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- %24 = fmul float %23, %5 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = fmul float %26, %10 ; [#uses=1]
- %28 = fadd float %24, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=3]
- %31 = fmul float %30, %16 ; [#uses=1]
- %32 = fadd float %28, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fadd float %32, %34 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=3]
- %38 = fmul float %37, %5 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=3]
- %41 = fmul float %40, %10 ; [#uses=1]
- %42 = fadd float %38, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=3]
- %45 = fmul float %44, %16 ; [#uses=1]
- %46 = fadd float %42, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=2]
- %49 = fadd float %46, %48 ; [#uses=2]
- %50 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=3]
- %52 = fmul float %51, %3 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=3]
- %55 = fmul float %54, %8 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=3]
- %59 = fmul float %58, %14 ; [#uses=1]
- %60 = fadd float %56, %59 ; [#uses=3]
- %61 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=3]
- %63 = fmul float %62, %3 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=3]
- %66 = fmul float %65, %8 ; [#uses=1]
- %67 = fadd float %63, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=3]
- %70 = fmul float %69, %14 ; [#uses=1]
- %71 = fadd float %67, %70 ; [#uses=2]
- %72 = fmul float %51, %23 ; [#uses=1]
- %73 = fmul float %54, %26 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = fmul float %58, %30 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=3]
- %77 = fmul float %62, %23 ; [#uses=1]
- %78 = fmul float %65, %26 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %69, %30 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=2]
- %82 = fmul float %51, %37 ; [#uses=1]
- %83 = fmul float %54, %40 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=1]
- %85 = fmul float %58, %44 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=3]
- %87 = fmul float %62, %37 ; [#uses=1]
- %88 = fmul float %65, %40 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=1]
- %90 = fmul float %69, %44 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=2]
- %92 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=2]
- %94 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=3]
- %96 = fmul float %93, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=2]
- %99 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=3]
- %101 = fmul float %98, %100 ; [#uses=1]
- %102 = fadd float %96, %101 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=2]
- %105 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=3]
- %107 = fmul float %104, %106 ; [#uses=1]
- %108 = fadd float %102, %107 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=2]
- %111 = fadd float %108, %110 ; [#uses=2]
- %112 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %113 = load float* %112, align 4 ; [#uses=2]
- %114 = fmul float %113, %95 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=2]
- %117 = fmul float %116, %100 ; [#uses=1]
- %118 = fadd float %114, %117 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=2]
- %121 = fmul float %120, %106 ; [#uses=1]
- %122 = fadd float %118, %121 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=2]
- %125 = fadd float %122, %124 ; [#uses=2]
- %126 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=2]
- %128 = fmul float %127, %95 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=2]
- %131 = fmul float %130, %100 ; [#uses=1]
- %132 = fadd float %128, %131 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=2]
- %135 = fmul float %134, %106 ; [#uses=1]
- %136 = fadd float %132, %135 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=2]
- %139 = fadd float %136, %138 ; [#uses=2]
- %140 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=3]
- %142 = fmul float %141, %93 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=3]
- %145 = fmul float %144, %98 ; [#uses=1]
- %146 = fadd float %142, %145 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=3]
- %149 = fmul float %148, %104 ; [#uses=1]
- %150 = fadd float %146, %149 ; [#uses=3]
- %151 = fmul float %141, %113 ; [#uses=1]
- %152 = fmul float %144, %116 ; [#uses=1]
- %153 = fadd float %151, %152 ; [#uses=1]
- %154 = fmul float %148, %120 ; [#uses=1]
- %155 = fadd float %153, %154 ; [#uses=3]
- %156 = fmul float %141, %127 ; [#uses=1]
- %157 = fmul float %144, %130 ; [#uses=1]
- %158 = fadd float %156, %157 ; [#uses=1]
- %159 = fmul float %148, %134 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=3]
- %161 = fsub float %111, %21 ; [#uses=3]
- %162 = fsub float %125, %35 ; [#uses=3]
- %163 = fsub float %139, %49 ; [#uses=3]
- %164 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %165 = load %struct.btRigidBody** %164, align 4 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btRigidBody* %165, i32 0, i32 4 ; [#uses=1]
- %167 = load float* %166, align 4 ; [#uses=2]
- %168 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %169 = load %struct.btRigidBody** %168, align 4 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btRigidBody* %169, i32 0, i32 4 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=3]
- %172 = fcmp olt float %167, 0x3E80000000000000 ; [#uses=1]
- %173 = fcmp olt float %171, 0x3E80000000000000 ; [#uses=1]
- %or.cond = or i1 %172, %173 ; [#uses=2]
- %174 = fadd float %167, %171 ; [#uses=2]
- %175 = fcmp ogt float %174, 0.000000e+00 ; [#uses=1]
- br i1 %175, label %bb4, label %bb6
-
-bb4: ; preds = %entry
- %176 = fdiv float %171, %174 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb4, %entry
- %storemerge = phi float [ %176, %bb4 ], [ 5.000000e-01, %entry ] ; [#uses=16]
- %177 = fsub float 1.000000e+00, %storemerge ; [#uses=15]
- %178 = fmul float %150, %177 ; [#uses=1]
- %179 = fmul float %155, %177 ; [#uses=1]
- %180 = fmul float %160, %177 ; [#uses=1]
- %181 = fmul float %60, %storemerge ; [#uses=1]
- %182 = fmul float %76, %storemerge ; [#uses=1]
- %183 = fmul float %86, %storemerge ; [#uses=1]
- %184 = fadd float %181, %178 ; [#uses=3]
- %185 = fadd float %182, %179 ; [#uses=3]
- %186 = fadd float %183, %180 ; [#uses=3]
- %187 = getelementptr inbounds %struct.btQuadWord* %ax1, i32 0, i32 0, i32 0 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btQuadWord* %ax1, i32 0, i32 0, i32 1 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btQuadWord* %ax1, i32 0, i32 0, i32 2 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btQuadWord* %ax1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %190, align 4
- %191 = fmul float %186, %186 ; [#uses=1]
- %192 = fmul float %185, %185 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- %194 = fmul float %184, %184 ; [#uses=1]
- %195 = fadd float %193, %194 ; [#uses=1]
- %196 = call float @sqrtf(float %195) nounwind readonly ; [#uses=1]
- %197 = fdiv float 1.000000e+00, %196 ; [#uses=3]
- %198 = fmul float %186, %197 ; [#uses=17]
- store float %198, float* %187, align 8
- %199 = fmul float %185, %197 ; [#uses=17]
- store float %199, float* %188, align 4
- %200 = fmul float %184, %197 ; [#uses=17]
- store float %200, float* %189, align 8
- %201 = shl i32 %1, 1 ; [#uses=10]
- %202 = fsub float %111, %110 ; [#uses=2]
- %203 = fsub float %125, %124 ; [#uses=2]
- %204 = fsub float %139, %138 ; [#uses=2]
- %205 = fmul float %204, %198 ; [#uses=1]
- %206 = fmul float %203, %199 ; [#uses=1]
- %207 = fadd float %205, %206 ; [#uses=1]
- %208 = fmul float %202, %200 ; [#uses=1]
- %209 = fadd float %207, %208 ; [#uses=3]
- %210 = fmul float %200, %209 ; [#uses=2]
- %211 = fmul float %199, %209 ; [#uses=2]
- %212 = fmul float %198, %209 ; [#uses=2]
- %213 = fsub float %202, %210 ; [#uses=2]
- %214 = fsub float %203, %211 ; [#uses=2]
- %215 = fsub float %204, %212 ; [#uses=2]
- %216 = fsub float %21, %20 ; [#uses=2]
- %217 = fsub float %35, %34 ; [#uses=2]
- %218 = fsub float %49, %48 ; [#uses=2]
- %219 = fmul float %218, %198 ; [#uses=1]
- %220 = fmul float %217, %199 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=1]
- %222 = fmul float %216, %200 ; [#uses=1]
- %223 = fadd float %221, %222 ; [#uses=3]
- %224 = fmul float %200, %223 ; [#uses=2]
- %225 = fmul float %199, %223 ; [#uses=2]
- %226 = fmul float %198, %223 ; [#uses=2]
- %227 = fsub float %216, %224 ; [#uses=2]
- %228 = fsub float %217, %225 ; [#uses=2]
- %229 = fsub float %218, %226 ; [#uses=2]
- %230 = fsub float %224, %210 ; [#uses=2]
- %231 = fsub float %225, %211 ; [#uses=2]
- %232 = fsub float %226, %212 ; [#uses=2]
- %233 = fmul float %230, %storemerge ; [#uses=1]
- %234 = fmul float %231, %storemerge ; [#uses=1]
- %235 = fmul float %232, %storemerge ; [#uses=1]
- %236 = fadd float %227, %233 ; [#uses=6]
- %237 = fadd float %228, %234 ; [#uses=6]
- %238 = fadd float %229, %235 ; [#uses=6]
- %239 = fmul float %230, %177 ; [#uses=1]
- %240 = fmul float %231, %177 ; [#uses=1]
- %241 = fmul float %232, %177 ; [#uses=1]
- %242 = fsub float %213, %239 ; [#uses=6]
- %243 = fsub float %214, %240 ; [#uses=6]
- %244 = fsub float %215, %241 ; [#uses=6]
- %245 = fmul float %227, %177 ; [#uses=1]
- %246 = fmul float %228, %177 ; [#uses=1]
- %247 = fmul float %229, %177 ; [#uses=1]
- %248 = fmul float %213, %storemerge ; [#uses=1]
- %249 = fmul float %214, %storemerge ; [#uses=1]
- %250 = fmul float %215, %storemerge ; [#uses=1]
- %251 = fadd float %248, %245 ; [#uses=4]
- %252 = fadd float %249, %246 ; [#uses=4]
- %253 = fadd float %250, %247 ; [#uses=4]
- %254 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %253, float* %254, align 8
- %255 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=4]
- store float %252, float* %255, align 4
- %256 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %251, float* %256, align 8
- %257 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %257, align 4
- %258 = fmul float %253, %253 ; [#uses=1]
- %259 = fmul float %252, %252 ; [#uses=1]
- %260 = fadd float %258, %259 ; [#uses=1]
- %261 = fmul float %251, %251 ; [#uses=1]
- %262 = fadd float %260, %261 ; [#uses=2]
- %263 = fcmp ogt float %262, 0x3E80000000000000 ; [#uses=1]
- br i1 %263, label %bb11, label %bb12
-
-bb11: ; preds = %bb6
- %264 = call float @sqrtf(float %262) nounwind readonly ; [#uses=1]
- %265 = fdiv float 1.000000e+00, %264 ; [#uses=3]
- %266 = fmul float %253, %265 ; [#uses=2]
- store float %266, float* %254, align 8
- %267 = fmul float %252, %265 ; [#uses=2]
- store float %267, float* %255, align 4
- %268 = fmul float %251, %265 ; [#uses=2]
- store float %268, float* %256, align 8
- br label %bb23
-
-bb12: ; preds = %bb6
- store float %91, float* %254, align 8
- store float %81, float* %255, align 4
- store float %71, float* %256, align 8
- store float 0.000000e+00, float* %257, align 4
- br label %bb23
-
-bb23: ; preds = %bb12, %bb11
- %269 = phi float [ %71, %bb12 ], [ %268, %bb11 ] ; [#uses=11]
- %270 = phi float [ %91, %bb12 ], [ %266, %bb11 ] ; [#uses=11]
- %271 = phi float [ %81, %bb12 ], [ %267, %bb11 ] ; [#uses=7]
- %272 = fmul float %198, %271 ; [#uses=1]
- %273 = fmul float %199, %270 ; [#uses=1]
- %274 = fsub float %272, %273 ; [#uses=10]
- %275 = fmul float %200, %270 ; [#uses=1]
- %276 = fmul float %198, %269 ; [#uses=1]
- %277 = fsub float %275, %276 ; [#uses=10]
- %278 = fmul float %199, %269 ; [#uses=1]
- %279 = fmul float %200, %271 ; [#uses=1]
- %280 = fsub float %278, %279 ; [#uses=10]
- %281 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %280, float* %281, align 8
- %282 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %277, float* %282, align 4
- %283 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %274, float* %283, align 8
- %284 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %284, align 4
- %285 = fmul float %238, %271 ; [#uses=1]
- %286 = fmul float %237, %270 ; [#uses=1]
- %287 = fsub float %285, %286 ; [#uses=1]
- %288 = fmul float %236, %270 ; [#uses=1]
- %289 = fmul float %238, %269 ; [#uses=1]
- %290 = fsub float %288, %289 ; [#uses=1]
- %291 = fmul float %237, %269 ; [#uses=1]
- %292 = fmul float %236, %271 ; [#uses=1]
- %293 = fsub float %291, %292 ; [#uses=1]
- %294 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 0 ; [#uses=4]
- %295 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 1 ; [#uses=6]
- store float %290, float* %295, align 4
- %296 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 2 ; [#uses=6]
- store float %287, float* %296, align 8
- %297 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 3 ; [#uses=2]
- %298 = fmul float %244, %271 ; [#uses=1]
- %299 = fmul float %243, %270 ; [#uses=1]
- %300 = fsub float %298, %299 ; [#uses=1]
- %301 = fmul float %242, %270 ; [#uses=1]
- %302 = fmul float %244, %269 ; [#uses=1]
- %303 = fsub float %301, %302 ; [#uses=1]
- %304 = fmul float %243, %269 ; [#uses=1]
- %305 = fmul float %242, %271 ; [#uses=1]
- %306 = fsub float %304, %305 ; [#uses=1]
- %307 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 0 ; [#uses=4]
- %308 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 1 ; [#uses=6]
- store float %303, float* %308, align 4
- %309 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 2 ; [#uses=6]
- store float %300, float* %309, align 8
- %310 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 3 ; [#uses=2]
- %311 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=3]
- %312 = load float** %311, align 4 ; [#uses=1]
- store float %293, float* %312, align 4
- %313 = load float** %311, align 4 ; [#uses=1]
- %314 = load float* %295, align 4 ; [#uses=1]
- %scevgep271.1 = getelementptr float* %313, i32 1 ; [#uses=1]
- store float %314, float* %scevgep271.1, align 4
- %315 = load float** %311, align 4 ; [#uses=1]
- %316 = load float* %296, align 8 ; [#uses=1]
- %scevgep271.2 = getelementptr float* %315, i32 2 ; [#uses=1]
- store float %316, float* %scevgep271.2, align 4
- %317 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=3]
- %318 = load float** %317, align 4 ; [#uses=1]
- %319 = fsub float -0.000000e+00, %306 ; [#uses=1]
- store float %319, float* %318, align 4
- %320 = load float** %317, align 4 ; [#uses=1]
- %321 = load float* %308, align 4 ; [#uses=1]
- %322 = fsub float -0.000000e+00, %321 ; [#uses=1]
- %scevgep269.1 = getelementptr float* %320, i32 1 ; [#uses=1]
- store float %322, float* %scevgep269.1, align 4
- %323 = load float** %317, align 4 ; [#uses=1]
- %324 = load float* %309, align 8 ; [#uses=1]
- %325 = fsub float -0.000000e+00, %324 ; [#uses=1]
- %scevgep269.2 = getelementptr float* %323, i32 2 ; [#uses=1]
- store float %325, float* %scevgep269.2, align 4
- %326 = fmul float %238, %277 ; [#uses=1]
- %327 = fmul float %237, %280 ; [#uses=1]
- %328 = fsub float %326, %327 ; [#uses=4]
- %329 = fmul float %236, %280 ; [#uses=1]
- %330 = fmul float %238, %274 ; [#uses=1]
- %331 = fsub float %329, %330 ; [#uses=4]
- %332 = fmul float %237, %274 ; [#uses=1]
- %333 = fmul float %236, %277 ; [#uses=1]
- %334 = fsub float %332, %333 ; [#uses=4]
- store float %334, float* %294, align 8
- store float %331, float* %295, align 4
- store float %328, float* %296, align 8
- store float 0.000000e+00, float* %297, align 4
- %335 = fmul float %244, %277 ; [#uses=1]
- %336 = fmul float %243, %280 ; [#uses=1]
- %337 = fsub float %335, %336 ; [#uses=4]
- %338 = fmul float %242, %280 ; [#uses=1]
- %339 = fmul float %244, %274 ; [#uses=1]
- %340 = fsub float %338, %339 ; [#uses=4]
- %341 = fmul float %243, %274 ; [#uses=1]
- %342 = fmul float %242, %277 ; [#uses=1]
- %343 = fsub float %341, %342 ; [#uses=4]
- store float %343, float* %307, align 8
- store float %340, float* %308, align 4
- store float %337, float* %309, align 8
- store float 0.000000e+00, float* %310, align 4
- br i1 %or.cond, label %bb29, label %bb41
-
-bb29: ; preds = %bb23
- %344 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=1]
- %345 = load i8* %344, align 2 ; [#uses=1]
- %346 = icmp eq i8 %345, 0 ; [#uses=1]
- br i1 %346, label %bb41, label %bb34
-
-bb34: ; preds = %bb29
- %347 = fmul float %343, %177 ; [#uses=2]
- store float %347, float* %307, align 8
- %348 = fmul float %340, %177 ; [#uses=2]
- store float %348, float* %308, align 4
- %349 = fmul float %337, %177 ; [#uses=2]
- store float %349, float* %309, align 8
- %350 = fmul float %334, %storemerge ; [#uses=2]
- store float %350, float* %294, align 8
- %351 = fmul float %331, %storemerge ; [#uses=2]
- store float %351, float* %295, align 4
- %352 = fmul float %328, %storemerge ; [#uses=2]
- store float %352, float* %296, align 8
- br label %bb41
-
-bb41: ; preds = %bb34, %bb29, %bb23
- %353 = phi float [ %350, %bb34 ], [ %334, %bb23 ], [ %334, %bb29 ] ; [#uses=1]
- %354 = phi float [ %351, %bb34 ], [ %331, %bb23 ], [ %331, %bb29 ] ; [#uses=1]
- %355 = phi float [ %352, %bb34 ], [ %328, %bb23 ], [ %328, %bb29 ] ; [#uses=1]
- %356 = phi float [ %347, %bb34 ], [ %343, %bb23 ], [ %343, %bb29 ] ; [#uses=1]
- %357 = phi float [ %348, %bb34 ], [ %340, %bb23 ], [ %340, %bb29 ] ; [#uses=1]
- %358 = phi float [ %349, %bb34 ], [ %337, %bb23 ], [ %337, %bb29 ] ; [#uses=1]
- %359 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=3]
- %360 = load float** %359, align 4 ; [#uses=1]
- %scevgep268 = getelementptr float* %360, i32 %1 ; [#uses=1]
- store float %353, float* %scevgep268, align 4
- %tmp267.1 = add i32 %1, 1 ; [#uses=1]
- %361 = load float** %359, align 4 ; [#uses=1]
- %scevgep268.1 = getelementptr float* %361, i32 %tmp267.1 ; [#uses=1]
- store float %354, float* %scevgep268.1, align 4
- %tmp267.2 = add i32 %1, 2 ; [#uses=1]
- %362 = load float** %359, align 4 ; [#uses=1]
- %scevgep268.2 = getelementptr float* %362, i32 %tmp267.2 ; [#uses=1]
- store float %355, float* %scevgep268.2, align 4
- %363 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=3]
- %364 = load float** %363, align 4 ; [#uses=1]
- %365 = fsub float -0.000000e+00, %356 ; [#uses=1]
- %scevgep265 = getelementptr float* %364, i32 %1 ; [#uses=1]
- store float %365, float* %scevgep265, align 4
- %tmp264.1 = add i32 %1, 1 ; [#uses=1]
- %366 = load float** %363, align 4 ; [#uses=1]
- %367 = fsub float -0.000000e+00, %357 ; [#uses=1]
- %scevgep265.1 = getelementptr float* %366, i32 %tmp264.1 ; [#uses=1]
- store float %367, float* %scevgep265.1, align 4
- %tmp264.2 = add i32 %1, 2 ; [#uses=1]
- %368 = load float** %363, align 4 ; [#uses=1]
- %369 = fsub float -0.000000e+00, %358 ; [#uses=1]
- %scevgep265.2 = getelementptr float* %368, i32 %tmp264.2 ; [#uses=1]
- store float %369, float* %scevgep265.2, align 4
- %370 = fmul float %238, %199 ; [#uses=1]
- %371 = fmul float %237, %198 ; [#uses=1]
- %372 = fsub float %370, %371 ; [#uses=3]
- %373 = fmul float %236, %198 ; [#uses=1]
- %374 = fmul float %238, %200 ; [#uses=1]
- %375 = fsub float %373, %374 ; [#uses=3]
- %376 = fmul float %237, %200 ; [#uses=1]
- %377 = fmul float %236, %199 ; [#uses=1]
- %378 = fsub float %376, %377 ; [#uses=3]
- store float %378, float* %294, align 8
- store float %375, float* %295, align 4
- store float %372, float* %296, align 8
- store float 0.000000e+00, float* %297, align 4
- %379 = fmul float %244, %199 ; [#uses=1]
- %380 = fmul float %243, %198 ; [#uses=1]
- %381 = fsub float %379, %380 ; [#uses=3]
- %382 = fmul float %242, %198 ; [#uses=1]
- %383 = fmul float %244, %200 ; [#uses=1]
- %384 = fsub float %382, %383 ; [#uses=3]
- %385 = fmul float %243, %200 ; [#uses=1]
- %386 = fmul float %242, %199 ; [#uses=1]
- %387 = fsub float %385, %386 ; [#uses=3]
- store float %387, float* %307, align 8
- store float %384, float* %308, align 4
- store float %381, float* %309, align 8
- store float 0.000000e+00, float* %310, align 4
- br i1 %or.cond, label %bb45, label %bb52
-
-bb45: ; preds = %bb41
- %388 = fmul float %387, %177 ; [#uses=2]
- store float %388, float* %307, align 8
- %389 = fmul float %384, %177 ; [#uses=2]
- store float %389, float* %308, align 4
- %390 = fmul float %381, %177 ; [#uses=2]
- store float %390, float* %309, align 8
- %391 = fmul float %378, %storemerge ; [#uses=2]
- store float %391, float* %294, align 8
- %392 = fmul float %375, %storemerge ; [#uses=2]
- store float %392, float* %295, align 4
- %393 = fmul float %372, %storemerge ; [#uses=2]
- store float %393, float* %296, align 8
- br label %bb52
-
-bb52: ; preds = %bb45, %bb41
- %394 = phi float [ %391, %bb45 ], [ %378, %bb41 ] ; [#uses=1]
- %395 = phi float [ %392, %bb45 ], [ %375, %bb41 ] ; [#uses=1]
- %396 = phi float [ %393, %bb45 ], [ %372, %bb41 ] ; [#uses=1]
- %397 = phi float [ %388, %bb45 ], [ %387, %bb41 ] ; [#uses=1]
- %398 = phi float [ %389, %bb45 ], [ %384, %bb41 ] ; [#uses=1]
- %399 = phi float [ %390, %bb45 ], [ %381, %bb41 ] ; [#uses=1]
- %400 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=3]
- %401 = load float** %400, align 4 ; [#uses=1]
- %scevgep262 = getelementptr float* %401, i32 %201 ; [#uses=1]
- store float %394, float* %scevgep262, align 4
- %tmp261.1273 = or i32 %201, 1 ; [#uses=1]
- %402 = load float** %400, align 4 ; [#uses=1]
- %scevgep262.1 = getelementptr float* %402, i32 %tmp261.1273 ; [#uses=1]
- store float %395, float* %scevgep262.1, align 4
- %tmp261.2 = add i32 %201, 2 ; [#uses=1]
- %403 = load float** %400, align 4 ; [#uses=1]
- %scevgep262.2 = getelementptr float* %403, i32 %tmp261.2 ; [#uses=1]
- store float %396, float* %scevgep262.2, align 4
- %404 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=3]
- %405 = load float** %404, align 4 ; [#uses=1]
- %406 = fsub float -0.000000e+00, %397 ; [#uses=1]
- %scevgep258 = getelementptr float* %405, i32 %201 ; [#uses=1]
- store float %406, float* %scevgep258, align 4
- %tmp257.1274 = or i32 %201, 1 ; [#uses=1]
- %407 = load float** %404, align 4 ; [#uses=1]
- %408 = fsub float -0.000000e+00, %398 ; [#uses=1]
- %scevgep258.1 = getelementptr float* %407, i32 %tmp257.1274 ; [#uses=1]
- store float %408, float* %scevgep258.1, align 4
- %tmp257.2 = add i32 %201, 2 ; [#uses=1]
- %409 = load float** %404, align 4 ; [#uses=1]
- %410 = fsub float -0.000000e+00, %399 ; [#uses=1]
- %scevgep258.2 = getelementptr float* %409, i32 %tmp257.2 ; [#uses=1]
- store float %410, float* %scevgep258.2, align 4
- %411 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=4]
- %412 = load float* %411, align 4 ; [#uses=1]
- %413 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=3]
- %414 = load float* %413, align 4 ; [#uses=1]
- %415 = fmul float %412, %414 ; [#uses=3]
- %416 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %417 = load i8* %416, align 4 ; [#uses=1]
- %toBool53not = icmp eq i8 %417, 0 ; [#uses=1]
- br i1 %toBool53not, label %bb67, label %bb68
-
-bb67: ; preds = %bb52
- %418 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %419 = load float** %418, align 4 ; [#uses=1]
- store float %270, float* %419, align 4
- %420 = load float** %418, align 4 ; [#uses=1]
- %421 = load float* %255, align 4 ; [#uses=3]
- %scevgep253.1 = getelementptr float* %420, i32 1 ; [#uses=1]
- store float %421, float* %scevgep253.1, align 4
- %422 = load float** %418, align 4 ; [#uses=1]
- %scevgep253.2 = getelementptr float* %422, i32 2 ; [#uses=1]
- store float %269, float* %scevgep253.2, align 4
- %423 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %424 = load float** %423, align 4 ; [#uses=1]
- %scevgep252 = getelementptr float* %424, i32 %1 ; [#uses=1]
- store float %280, float* %scevgep252, align 4
- %tmp251.1 = add i32 %1, 1 ; [#uses=1]
- %425 = load float** %423, align 4 ; [#uses=1]
- %scevgep252.1 = getelementptr float* %425, i32 %tmp251.1 ; [#uses=1]
- store float %277, float* %scevgep252.1, align 4
- %tmp251.2 = add i32 %1, 2 ; [#uses=1]
- %426 = load float** %423, align 4 ; [#uses=1]
- %scevgep252.2 = getelementptr float* %426, i32 %tmp251.2 ; [#uses=1]
- store float %274, float* %scevgep252.2, align 4
- %427 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %428 = load float** %427, align 4 ; [#uses=1]
- %scevgep249 = getelementptr float* %428, i32 %201 ; [#uses=1]
- store float %198, float* %scevgep249, align 4
- %tmp248.1275 = or i32 %201, 1 ; [#uses=1]
- %429 = load float** %427, align 4 ; [#uses=1]
- %scevgep249.1 = getelementptr float* %429, i32 %tmp248.1275 ; [#uses=1]
- store float %199, float* %scevgep249.1, align 4
- %tmp248.2 = add i32 %201, 2 ; [#uses=1]
- %430 = load float** %427, align 4 ; [#uses=1]
- %scevgep249.2 = getelementptr float* %430, i32 %tmp248.2 ; [#uses=1]
- store float %200, float* %scevgep249.2, align 4
- %431 = fmul float %270, %163 ; [#uses=1]
- %432 = fmul float %421, %162 ; [#uses=1]
- %433 = fadd float %431, %432 ; [#uses=1]
- %434 = fmul float %269, %161 ; [#uses=1]
- %435 = fadd float %433, %434 ; [#uses=1]
- %436 = fmul float %435, %415 ; [#uses=1]
- %437 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=3]
- %438 = load float** %437, align 4 ; [#uses=1]
- store float %436, float* %438, align 4
- %439 = fmul float %280, %163 ; [#uses=1]
- %440 = fmul float %277, %162 ; [#uses=1]
- %441 = fadd float %439, %440 ; [#uses=1]
- %442 = fmul float %274, %161 ; [#uses=1]
- %443 = fadd float %441, %442 ; [#uses=1]
- %444 = fmul float %443, %415 ; [#uses=1]
- %445 = load float** %437, align 4 ; [#uses=1]
- %446 = getelementptr inbounds float* %445, i32 %1 ; [#uses=1]
- store float %444, float* %446, align 4
- %447 = fmul float %198, %163 ; [#uses=1]
- %448 = fmul float %199, %162 ; [#uses=1]
- %449 = fadd float %447, %448 ; [#uses=1]
- %450 = fmul float %200, %161 ; [#uses=1]
- %451 = fadd float %449, %450 ; [#uses=1]
- %452 = fmul float %451, %415 ; [#uses=1]
- %453 = load float** %437, align 4 ; [#uses=1]
- %454 = getelementptr inbounds float* %453, i32 %201 ; [#uses=1]
- store float %452, float* %454, align 4
- br label %bb68
-
-bb68: ; preds = %bb67, %bb52
- %455 = phi float [ %421, %bb67 ], [ %271, %bb52 ] ; [#uses=3]
- %456 = mul nsw i32 %1, 3 ; [#uses=5]
- %457 = shl i32 %1, 2 ; [#uses=5]
- %458 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=9]
- %459 = load float** %458, align 4 ; [#uses=1]
- %460 = getelementptr inbounds float* %459, i32 %456 ; [#uses=1]
- store float %270, float* %460, align 4
- %461 = load float** %458, align 4 ; [#uses=1]
- %462 = add nsw i32 %456, 1 ; [#uses=2]
- %463 = getelementptr inbounds float* %461, i32 %462 ; [#uses=1]
- store float %455, float* %463, align 4
- %464 = load float** %458, align 4 ; [#uses=1]
- %465 = add nsw i32 %456, 2 ; [#uses=2]
- %466 = getelementptr inbounds float* %464, i32 %465 ; [#uses=1]
- store float %269, float* %466, align 4
- %467 = load float** %458, align 4 ; [#uses=1]
- %468 = getelementptr inbounds float* %467, i32 %457 ; [#uses=1]
- store float %280, float* %468, align 4
- %469 = load float** %458, align 4 ; [#uses=1]
- %470 = or i32 %457, 1 ; [#uses=2]
- %471 = getelementptr inbounds float* %469, i32 %470 ; [#uses=1]
- store float %277, float* %471, align 4
- %472 = load float** %458, align 4 ; [#uses=1]
- %473 = or i32 %457, 2 ; [#uses=2]
- %474 = getelementptr inbounds float* %472, i32 %473 ; [#uses=1]
- store float %274, float* %474, align 4
- %475 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=9]
- %476 = load float** %475, align 4 ; [#uses=1]
- %477 = fsub float -0.000000e+00, %270 ; [#uses=1]
- %478 = getelementptr inbounds float* %476, i32 %456 ; [#uses=1]
- store float %477, float* %478, align 4
- %479 = load float** %475, align 4 ; [#uses=1]
- %480 = fsub float -0.000000e+00, %455 ; [#uses=1]
- %481 = getelementptr inbounds float* %479, i32 %462 ; [#uses=1]
- store float %480, float* %481, align 4
- %482 = load float** %475, align 4 ; [#uses=1]
- %483 = fsub float -0.000000e+00, %269 ; [#uses=1]
- %484 = getelementptr inbounds float* %482, i32 %465 ; [#uses=1]
- store float %483, float* %484, align 4
- %485 = load float** %475, align 4 ; [#uses=1]
- %486 = fsub float -0.000000e+00, %280 ; [#uses=1]
- %487 = getelementptr inbounds float* %485, i32 %457 ; [#uses=1]
- store float %486, float* %487, align 4
- %488 = load float** %475, align 4 ; [#uses=1]
- %489 = fsub float -0.000000e+00, %277 ; [#uses=1]
- %490 = getelementptr inbounds float* %488, i32 %470 ; [#uses=1]
- store float %489, float* %490, align 4
- %491 = load float** %475, align 4 ; [#uses=1]
- %492 = fsub float -0.000000e+00, %274 ; [#uses=1]
- %493 = getelementptr inbounds float* %491, i32 %473 ; [#uses=1]
- store float %492, float* %493, align 4
- %494 = load float* %411, align 4 ; [#uses=1]
- %495 = load float* %413, align 4 ; [#uses=1]
- %496 = fmul float %494, %495 ; [#uses=2]
- %497 = fmul float %86, %155 ; [#uses=1]
- %498 = fmul float %76, %160 ; [#uses=1]
- %499 = fsub float %497, %498 ; [#uses=2]
- %500 = fmul float %60, %160 ; [#uses=1]
- %501 = fmul float %86, %150 ; [#uses=1]
- %502 = fsub float %500, %501 ; [#uses=2]
- %503 = fmul float %76, %150 ; [#uses=1]
- %504 = fmul float %60, %155 ; [#uses=1]
- %505 = fsub float %503, %504 ; [#uses=2]
- %506 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=8]
- %507 = load float** %506, align 4 ; [#uses=1]
- %508 = fmul float %505, %270 ; [#uses=1]
- %509 = fmul float %502, %455 ; [#uses=1]
- %510 = fadd float %508, %509 ; [#uses=1]
- %511 = fmul float %499, %269 ; [#uses=1]
- %512 = fadd float %510, %511 ; [#uses=1]
- %513 = fmul float %512, %496 ; [#uses=1]
- %514 = getelementptr inbounds float* %507, i32 %456 ; [#uses=1]
- store float %513, float* %514, align 4
- %515 = load float** %506, align 4 ; [#uses=1]
- %516 = fmul float %505, %280 ; [#uses=1]
- %517 = fmul float %502, %277 ; [#uses=1]
- %518 = fadd float %516, %517 ; [#uses=1]
- %519 = fmul float %499, %274 ; [#uses=1]
- %520 = fadd float %518, %519 ; [#uses=1]
- %521 = fmul float %520, %496 ; [#uses=1]
- %522 = getelementptr inbounds float* %515, i32 %457 ; [#uses=1]
- store float %521, float* %522, align 4
- %523 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=1]
- %524 = load i8* %523, align 2 ; [#uses=1]
- %525 = icmp eq i8 %524, 0 ; [#uses=1]
- br i1 %525, label %bb74, label %bb70
-
-bb70: ; preds = %bb68
- %526 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 14 ; [#uses=1]
- %527 = load float* %526, align 4 ; [#uses=1]
- %528 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %529 = load float* %528, align 4 ; [#uses=1]
- %530 = fmul float %527, %529 ; [#uses=2]
- %531 = fcmp ogt float %530, 0.000000e+00 ; [#uses=1]
- %iftmp.209.0 = select i1 %531, i32 1, i32 2 ; [#uses=1]
- br label %bb74
-
-bb74: ; preds = %bb70, %bb68
- %limit_err.0 = phi float [ %530, %bb70 ], [ 0.000000e+00, %bb68 ] ; [#uses=1]
- %limit.0 = phi i32 [ %iftmp.209.0, %bb70 ], [ 0, %bb68 ] ; [#uses=5]
- %532 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- %533 = load i8* %532, align 1 ; [#uses=1]
- %not.toBool75 = icmp ne i8 %533, 0 ; [#uses=2]
- %powered.0 = zext i1 %not.toBool75 to i32 ; [#uses=1]
- %534 = or i32 %powered.0, %limit.0 ; [#uses=1]
- %535 = icmp eq i32 %534, 0 ; [#uses=1]
- br i1 %535, label %return, label %bb78
-
-bb78: ; preds = %bb74
- %536 = load i32* %0, align 4 ; [#uses=1]
- %537 = mul nsw i32 %536, 5 ; [#uses=19]
- %538 = load float** %458, align 4 ; [#uses=1]
- %539 = getelementptr inbounds float* %538, i32 %537 ; [#uses=1]
- store float %198, float* %539, align 4
- %540 = load float** %458, align 4 ; [#uses=1]
- %541 = add nsw i32 %537, 1 ; [#uses=2]
- %542 = getelementptr inbounds float* %540, i32 %541 ; [#uses=1]
- store float %199, float* %542, align 4
- %543 = load float** %458, align 4 ; [#uses=1]
- %544 = add nsw i32 %537, 2 ; [#uses=2]
- %545 = getelementptr inbounds float* %543, i32 %544 ; [#uses=1]
- store float %200, float* %545, align 4
- %546 = load float** %475, align 4 ; [#uses=1]
- %547 = fsub float -0.000000e+00, %198 ; [#uses=1]
- %548 = getelementptr inbounds float* %546, i32 %537 ; [#uses=1]
- store float %547, float* %548, align 4
- %549 = load float** %475, align 4 ; [#uses=1]
- %550 = fsub float -0.000000e+00, %199 ; [#uses=1]
- %551 = getelementptr inbounds float* %549, i32 %541 ; [#uses=1]
- store float %550, float* %551, align 4
- %552 = load float** %475, align 4 ; [#uses=1]
- %553 = fsub float -0.000000e+00, %200 ; [#uses=1]
- %554 = getelementptr inbounds float* %552, i32 %544 ; [#uses=1]
- store float %553, float* %554, align 4
- %555 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %556 = load float* %555, align 4 ; [#uses=2]
- %557 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %558 = load float* %557, align 4 ; [#uses=2]
- %.not = icmp ne i32 %limit.0, 0 ; [#uses=1]
- %559 = fcmp oeq float %556, %558 ; [#uses=2]
- %or.cond116 = and i1 %.not, %559 ; [#uses=1]
- %560 = load float** %506, align 4 ; [#uses=1]
- %561 = getelementptr inbounds float* %560, i32 %537 ; [#uses=1]
- store float 0.000000e+00, float* %561, align 4
- %562 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=2]
- %563 = load i32* %562, align 4 ; [#uses=2]
- %564 = and i32 %563, 2 ; [#uses=1]
- %565 = icmp eq i32 %564, 0 ; [#uses=1]
- br i1 %565, label %bb87, label %bb85
-
-bb85: ; preds = %bb78
- %566 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 28 ; [#uses=1]
- br label %bb87
-
-bb87: ; preds = %bb85, %bb78
- %iftmp.211.0.in = phi float* [ %566, %bb85 ], [ %413, %bb78 ] ; [#uses=1]
- %iftmp.211.0 = load float* %iftmp.211.0.in, align 4 ; [#uses=2]
- %567 = xor i1 %not.toBool75, true ; [#uses=1]
- %568 = or i1 %or.cond116, %567 ; [#uses=1]
- br i1 %568, label %bb92, label %bb88
-
-bb88: ; preds = %bb87
- %569 = and i32 %563, 4 ; [#uses=1]
- %570 = icmp eq i32 %569, 0 ; [#uses=1]
- br i1 %570, label %bb91, label %bb90
-
-bb90: ; preds = %bb88
- %571 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %572 = load float** %571, align 4 ; [#uses=1]
- %573 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 26 ; [#uses=1]
- %574 = load float* %573, align 4 ; [#uses=1]
- %575 = getelementptr inbounds float* %572, i32 %537 ; [#uses=1]
- store float %574, float* %575, align 4
- br label %bb91
-
-bb91: ; preds = %bb90, %bb88
- %576 = load float* %411, align 4 ; [#uses=1]
- %577 = fmul float %576, %iftmp.211.0 ; [#uses=1]
- %578 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 5 ; [#uses=2]
- %579 = load float* %578, align 4 ; [#uses=1]
- %580 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 16 ; [#uses=1]
- %581 = load float* %580, align 4 ; [#uses=1]
- %582 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %583 = call float @_ZN17btTypedConstraint14getMotorFactorEfffff(%struct.btTypedConstraint* %582, float %581, float %556, float %558, float %579, float %577) ; [#uses=1]
- %584 = load float** %506, align 4 ; [#uses=1]
- %585 = getelementptr inbounds float* %584, i32 %537 ; [#uses=2]
- %586 = load float* %585, align 4 ; [#uses=1]
- %587 = load float* %578, align 4 ; [#uses=1]
- %588 = fmul float %587, %583 ; [#uses=1]
- %589 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %590 = load float* %589, align 4 ; [#uses=1]
- %591 = fmul float %588, %590 ; [#uses=1]
- %592 = fadd float %586, %591 ; [#uses=1]
- store float %592, float* %585, align 4
- %593 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %594 = load float** %593, align 4 ; [#uses=1]
- %595 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 6 ; [#uses=2]
- %596 = load float* %595, align 4 ; [#uses=1]
- %597 = fsub float -0.000000e+00, %596 ; [#uses=1]
- %598 = getelementptr inbounds float* %594, i32 %537 ; [#uses=1]
- store float %597, float* %598, align 4
- %599 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %600 = load float** %599, align 4 ; [#uses=1]
- %601 = load float* %595, align 4 ; [#uses=1]
- %602 = getelementptr inbounds float* %600, i32 %537 ; [#uses=1]
- store float %601, float* %602, align 4
- br label %bb92
-
-bb92: ; preds = %bb91, %bb87
- %603 = icmp eq i32 %limit.0, 0 ; [#uses=1]
- br i1 %603, label %return, label %bb93
-
-bb93: ; preds = %bb92
- %604 = load float* %411, align 4 ; [#uses=1]
- %605 = fmul float %604, %iftmp.211.0 ; [#uses=1]
- %606 = load float** %506, align 4 ; [#uses=1]
- %607 = getelementptr inbounds float* %606, i32 %537 ; [#uses=2]
- %608 = load float* %607, align 4 ; [#uses=1]
- %609 = fmul float %605, %limit_err.0 ; [#uses=1]
- %610 = fadd float %608, %609 ; [#uses=1]
- store float %610, float* %607, align 4
- %611 = load i32* %562, align 4 ; [#uses=1]
- %612 = and i32 %611, 1 ; [#uses=1]
- %toBool95 = icmp eq i32 %612, 0 ; [#uses=1]
- br i1 %toBool95, label %bb97, label %bb96
-
-bb96: ; preds = %bb93
- %613 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %614 = load float** %613, align 4 ; [#uses=1]
- %615 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 27 ; [#uses=1]
- %616 = load float* %615, align 4 ; [#uses=1]
- %617 = getelementptr inbounds float* %614, i32 %537 ; [#uses=1]
- store float %616, float* %617, align 4
- br label %bb97
-
-bb97: ; preds = %bb96, %bb93
- br i1 %559, label %bb98, label %bb99
-
-bb98: ; preds = %bb97
- %618 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %619 = load float** %618, align 4 ; [#uses=1]
- %620 = getelementptr inbounds float* %619, i32 %537 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %620, align 4
- %621 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %622 = load float** %621, align 4 ; [#uses=1]
- %623 = getelementptr inbounds float* %622, i32 %537 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %623, align 4
- br label %bb102
-
-bb99: ; preds = %bb97
- %624 = icmp eq i32 %limit.0, 1 ; [#uses=1]
- %625 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %626 = load float** %625, align 4 ; [#uses=1]
- %627 = getelementptr inbounds float* %626, i32 %537 ; [#uses=2]
- br i1 %624, label %bb100, label %bb101
-
-bb100: ; preds = %bb99
- store float 0.000000e+00, float* %627, align 4
- %628 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %629 = load float** %628, align 4 ; [#uses=1]
- %630 = getelementptr inbounds float* %629, i32 %537 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %630, align 4
- br label %bb102
-
-bb101: ; preds = %bb99
- store float 0xC7EFFFFFE0000000, float* %627, align 4
- %631 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %632 = load float** %631, align 4 ; [#uses=1]
- %633 = getelementptr inbounds float* %632, i32 %537 ; [#uses=1]
- store float 0.000000e+00, float* %633, align 4
- br label %bb102
-
-bb102: ; preds = %bb101, %bb100, %bb98
- %634 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %635 = load float* %634, align 4 ; [#uses=3]
- %636 = fcmp ogt float %635, 0.000000e+00 ; [#uses=1]
- br i1 %636, label %bb103, label %bb114
-
-bb103: ; preds = %bb102
- %637 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 0 ; [#uses=1]
- %638 = load float* %637, align 4 ; [#uses=1]
- %639 = fmul float %638, %198 ; [#uses=1]
- %640 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 1 ; [#uses=1]
- %641 = load float* %640, align 4 ; [#uses=1]
- %642 = fmul float %641, %199 ; [#uses=1]
- %643 = fadd float %639, %642 ; [#uses=1]
- %644 = getelementptr inbounds %struct.btQuadWord* %angVelA, i32 0, i32 0, i32 2 ; [#uses=1]
- %645 = load float* %644, align 4 ; [#uses=1]
- %646 = fmul float %645, %200 ; [#uses=1]
- %647 = fadd float %643, %646 ; [#uses=1]
- %648 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 0 ; [#uses=1]
- %649 = load float* %648, align 4 ; [#uses=1]
- %650 = fmul float %649, %198 ; [#uses=1]
- %651 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 1 ; [#uses=1]
- %652 = load float* %651, align 4 ; [#uses=1]
- %653 = fmul float %652, %199 ; [#uses=1]
- %654 = fadd float %650, %653 ; [#uses=1]
- %655 = getelementptr inbounds %struct.btQuadWord* %angVelB, i32 0, i32 0, i32 2 ; [#uses=1]
- %656 = load float* %655, align 4 ; [#uses=1]
- %657 = fmul float %656, %200 ; [#uses=1]
- %658 = fadd float %654, %657 ; [#uses=1]
- %659 = fsub float %647, %658 ; [#uses=4]
- %660 = icmp eq i32 %limit.0, 1 ; [#uses=1]
- br i1 %660, label %bb105, label %bb109
-
-bb105: ; preds = %bb103
- %661 = fcmp olt float %659, 0.000000e+00 ; [#uses=1]
- br i1 %661, label %bb106, label %bb114
-
-bb106: ; preds = %bb105
- %662 = fsub float -0.000000e+00, %635 ; [#uses=1]
- %663 = fmul float %659, %662 ; [#uses=2]
- %664 = load float** %506, align 4 ; [#uses=1]
- %665 = getelementptr inbounds float* %664, i32 %537 ; [#uses=2]
- %666 = load float* %665, align 4 ; [#uses=1]
- %667 = fcmp olt float %666, %663 ; [#uses=1]
- br i1 %667, label %bb108, label %bb114
-
-bb108: ; preds = %bb106
- store float %663, float* %665, align 4
- br label %bb114
-
-bb109: ; preds = %bb103
- %668 = fcmp ogt float %659, 0.000000e+00 ; [#uses=1]
- br i1 %668, label %bb110, label %bb114
-
-bb110: ; preds = %bb109
- %669 = fsub float -0.000000e+00, %635 ; [#uses=1]
- %670 = fmul float %659, %669 ; [#uses=2]
- %671 = load float** %506, align 4 ; [#uses=1]
- %672 = getelementptr inbounds float* %671, i32 %537 ; [#uses=2]
- %673 = load float* %672, align 4 ; [#uses=1]
- %674 = fcmp ogt float %673, %670 ; [#uses=1]
- br i1 %674, label %bb113, label %bb114
-
-bb113: ; preds = %bb110
- store float %670, float* %672, align 4
- br label %bb114
-
-bb114: ; preds = %bb113, %bb110, %bb109, %bb108, %bb106, %bb105, %bb102
- %675 = load float** %506, align 4 ; [#uses=1]
- %676 = getelementptr inbounds float* %675, i32 %537 ; [#uses=2]
- %677 = load float* %676, align 4 ; [#uses=1]
- %678 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %679 = load float* %678, align 4 ; [#uses=1]
- %680 = fmul float %677, %679 ; [#uses=1]
- store float %680, float* %676, align 4
- ret void
-
-return: ; preds = %bb92, %bb74
- ret void
-}
-
-; [#uses=7]
-define float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* nocapture %this, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = load float* %1, align 4 ; [#uses=3]
- %5 = load float* %0, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fmul float %7, %3 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = fmul float %10, %4 ; [#uses=1]
- %12 = fadd float %8, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fmul float %14, %5 ; [#uses=1]
- %16 = fadd float %12, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fmul float %18, %3 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=2]
- %22 = fmul float %21, %4 ; [#uses=1]
- %23 = fadd float %19, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = fmul float %25, %5 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fmul float %29, %3 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=2]
- %33 = fmul float %32, %4 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %5 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=3]
- %43 = load float* %40, align 4 ; [#uses=3]
- %44 = load float* %39, align 4 ; [#uses=3]
- %45 = fmul float %7, %42 ; [#uses=1]
- %46 = fmul float %10, %43 ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=1]
- %48 = fmul float %14, %44 ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=1]
- %50 = fmul float %18, %42 ; [#uses=1]
- %51 = fmul float %21, %43 ; [#uses=1]
- %52 = fadd float %50, %51 ; [#uses=1]
- %53 = fmul float %25, %44 ; [#uses=1]
- %54 = fadd float %52, %53 ; [#uses=1]
- %55 = fmul float %29, %42 ; [#uses=1]
- %56 = fmul float %32, %43 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=1]
- %58 = fmul float %36, %44 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=3]
- %64 = load float* %61, align 4 ; [#uses=3]
- %65 = load float* %60, align 4 ; [#uses=3]
- %66 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fmul float %67, %63 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %71 = fmul float %70, %64 ; [#uses=1]
- %72 = fadd float %68, %71 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fmul float %74, %65 ; [#uses=1]
- %76 = fadd float %72, %75 ; [#uses=2]
- %77 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fmul float %78, %63 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = fmul float %81, %64 ; [#uses=1]
- %83 = fadd float %79, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fmul float %85, %65 ; [#uses=1]
- %87 = fadd float %83, %86 ; [#uses=2]
- %88 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = fmul float %89, %63 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- %93 = fmul float %92, %64 ; [#uses=1]
- %94 = fadd float %90, %93 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = fmul float %96, %65 ; [#uses=1]
- %98 = fadd float %94, %97 ; [#uses=2]
- %99 = fmul float %98, %59 ; [#uses=1]
- %100 = fmul float %87, %54 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %76, %49 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fmul float %98, %38 ; [#uses=1]
- %105 = fmul float %87, %27 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fmul float %76, %16 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = tail call float @atan2f(float %108, float %103) nounwind readonly ; [#uses=1]
- %110 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- %112 = fmul float %111, %109 ; [#uses=1]
- ret float %112
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraint14setMotorTargetEff(%struct.btHingeConstraint* nocapture %this, float %targetAngle, float %dt) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = fcmp olt float %1, %3 ; [#uses=1]
- br i1 %4, label %bb, label %bb4
-
-bb: ; preds = %entry
- %5 = fcmp ogt float %1, %targetAngle ; [#uses=1]
- br i1 %5, label %bb4, label %bb2
-
-bb2: ; preds = %bb
- %6 = fcmp olt float %3, %targetAngle ; [#uses=1]
- br i1 %6, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2, %bb, %entry
- %targetAngle_addr.0 = phi float [ %3, %bb3 ], [ %targetAngle, %bb2 ], [ %targetAngle, %entry ], [ %1, %bb ] ; [#uses=1]
- %7 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %8 = load %struct.btRigidBody** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %8, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %11 = load %struct.btRigidBody** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = tail call float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* %12, %struct.btTransform* %9) nounwind ; [#uses=1]
- %14 = fsub float %targetAngle_addr.0, %13 ; [#uses=1]
- %15 = fdiv float %14, %dt ; [#uses=1]
- %16 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float %15, float* %16, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraint14setMotorTargetERK12btQuaternionf(%struct.btHingeConstraint* %this, %struct.btQuaternion* nocapture %qAinB, float %dt) nounwind align 2 {
-entry:
- %0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %2, %struct.btQuaternion* %1) nounwind
- %3 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0 ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %3, %struct.btQuaternion* %0) nounwind
- %4 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 8 ; [#uses=1]
- %7 = fsub float -0.000000e+00, %6 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fsub float -0.000000e+00, %9 ; [#uses=4]
- %11 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load float* %11, align 8 ; [#uses=1]
- %13 = fsub float -0.000000e+00, %12 ; [#uses=4]
- %14 = load float* %4, align 4 ; [#uses=4]
- %15 = getelementptr inbounds %struct.btQuaternion* %qAinB, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=4]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuaternion* %qAinB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=4]
- %20 = fmul float %19, %13 ; [#uses=1]
- %21 = fsub float %17, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuaternion* %qAinB, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=4]
- %24 = fmul float %23, %10 ; [#uses=1]
- %25 = fsub float %21, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuaternion* %qAinB, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=4]
- %28 = fmul float %27, %7 ; [#uses=1]
- %29 = fsub float %25, %28 ; [#uses=4]
- %30 = fmul float %14, %27 ; [#uses=1]
- %31 = fmul float %16, %7 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %23, %13 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=1]
- %35 = fmul float %19, %10 ; [#uses=1]
- %36 = fsub float %34, %35 ; [#uses=4]
- %37 = fmul float %14, %23 ; [#uses=1]
- %38 = fmul float %16, %10 ; [#uses=1]
- %39 = fadd float %37, %38 ; [#uses=1]
- %40 = fmul float %19, %7 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = fmul float %27, %13 ; [#uses=1]
- %43 = fsub float %41, %42 ; [#uses=4]
- %44 = fmul float %14, %19 ; [#uses=1]
- %45 = fmul float %16, %13 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=1]
- %47 = fmul float %27, %10 ; [#uses=1]
- %48 = fadd float %46, %47 ; [#uses=1]
- %49 = fmul float %23, %7 ; [#uses=1]
- %50 = fsub float %48, %49 ; [#uses=4]
- %51 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=4]
- %53 = fmul float %29, %52 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 8 ; [#uses=4]
- %56 = fmul float %50, %55 ; [#uses=1]
- %57 = fsub float %53, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=4]
- %60 = fmul float %43, %59 ; [#uses=1]
- %61 = fsub float %57, %60 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btQuaternion* %1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %62, align 8 ; [#uses=4]
- %64 = fmul float %36, %63 ; [#uses=1]
- %65 = fsub float %61, %64 ; [#uses=3]
- %66 = fmul float %29, %63 ; [#uses=1]
- %67 = fmul float %36, %52 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = fmul float %50, %59 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fmul float %43, %55 ; [#uses=1]
- %72 = fsub float %70, %71 ; [#uses=3]
- %73 = fmul float %29, %59 ; [#uses=1]
- %74 = fmul float %43, %52 ; [#uses=1]
- %75 = fadd float %73, %74 ; [#uses=1]
- %76 = fmul float %36, %55 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = fmul float %50, %63 ; [#uses=1]
- %79 = fsub float %77, %78 ; [#uses=3]
- %80 = fmul float %29, %55 ; [#uses=1]
- %81 = fmul float %50, %52 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = fmul float %43, %63 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=1]
- %85 = fmul float %36, %59 ; [#uses=1]
- %86 = fsub float %84, %85 ; [#uses=3]
- %87 = fmul float %86, %86 ; [#uses=1]
- %88 = fmul float %79, %79 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=1]
- %90 = fmul float %72, %72 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %65, %65 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = call float @sqrtf(float %93) nounwind readonly ; [#uses=1]
- %95 = fdiv float 1.000000e+00, %94 ; [#uses=4]
- %96 = fmul float %86, %95 ; [#uses=7]
- %97 = fmul float %79, %95 ; [#uses=8]
- %98 = fmul float %72, %95 ; [#uses=8]
- %99 = fmul float %65, %95 ; [#uses=10]
- %100 = fsub float -0.000000e+00, %96 ; [#uses=4]
- %101 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vHinge, i32 0, i32 0, i32 0), align 8 ; [#uses=10]
- %102 = fmul float %101, %100 ; [#uses=1]
- %103 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vHinge, i32 0, i32 0, i32 1), align 4 ; [#uses=13]
- %104 = fmul float %97, %103 ; [#uses=1]
- %105 = fsub float %102, %104 ; [#uses=1]
- %106 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZL6vHinge, i32 0, i32 0, i32 2), align 8 ; [#uses=11]
- %107 = fmul float %98, %106 ; [#uses=1]
- %108 = fsub float %105, %107 ; [#uses=3]
- %109 = fmul float %99, %106 ; [#uses=1]
- %110 = fmul float %96, %103 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = fmul float %97, %101 ; [#uses=1]
- %113 = fsub float %111, %112 ; [#uses=3]
- %114 = fmul float %99, %103 ; [#uses=1]
- %115 = fmul float %98, %101 ; [#uses=1]
- %116 = fadd float %114, %115 ; [#uses=1]
- %117 = fmul float %96, %106 ; [#uses=1]
- %118 = fsub float %116, %117 ; [#uses=3]
- %119 = fmul float %99, %101 ; [#uses=1]
- %120 = fmul float %97, %106 ; [#uses=1]
- %121 = fadd float %119, %120 ; [#uses=1]
- %122 = fmul float %98, %103 ; [#uses=1]
- %123 = fsub float %121, %122 ; [#uses=3]
- %124 = fsub float -0.000000e+00, %98 ; [#uses=3]
- %125 = fsub float -0.000000e+00, %97 ; [#uses=3]
- %126 = fmul float %108, %124 ; [#uses=1]
- %127 = fmul float %113, %99 ; [#uses=1]
- %128 = fadd float %126, %127 ; [#uses=1]
- %129 = fmul float %123, %125 ; [#uses=1]
- %130 = fadd float %128, %129 ; [#uses=1]
- %131 = fmul float %118, %100 ; [#uses=1]
- %132 = fsub float %130, %131 ; [#uses=3]
- %133 = fmul float %108, %125 ; [#uses=1]
- %134 = fmul float %118, %99 ; [#uses=1]
- %135 = fadd float %133, %134 ; [#uses=1]
- %136 = fmul float %113, %100 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %123, %124 ; [#uses=1]
- %139 = fsub float %137, %138 ; [#uses=3]
- %140 = fmul float %108, %100 ; [#uses=1]
- %141 = fmul float %123, %99 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=1]
- %143 = fmul float %118, %124 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = fmul float %113, %125 ; [#uses=1]
- %146 = fsub float %144, %145 ; [#uses=3]
- %147 = fmul float %146, %146 ; [#uses=1]
- %148 = fmul float %139, %139 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = fmul float %132, %132 ; [#uses=1]
- %151 = fadd float %149, %150 ; [#uses=1]
- %152 = call float @sqrtf(float %151) nounwind readonly ; [#uses=1]
- %153 = fdiv float 1.000000e+00, %152 ; [#uses=3]
- %154 = fmul float %146, %153 ; [#uses=3]
- %155 = fmul float %139, %153 ; [#uses=3]
- %156 = fmul float %132, %153 ; [#uses=3]
- %157 = fmul float %101, %154 ; [#uses=1]
- %158 = fmul float %103, %155 ; [#uses=1]
- %159 = fadd float %157, %158 ; [#uses=1]
- %160 = fmul float %106, %156 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=2]
- %162 = fcmp olt float %161, 0xBFEFFFFFC0000000 ; [#uses=1]
- br i1 %162, label %bb.i6, label %bb1.i
-
-bb.i6: ; preds = %entry
- %163 = call float @fabsf(float %106) nounwind readnone ; [#uses=1]
- %164 = fcmp ogt float %163, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %164, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i6
- %165 = fmul float %103, %103 ; [#uses=1]
- %166 = fmul float %106, %106 ; [#uses=1]
- %167 = fadd float %165, %166 ; [#uses=1]
- %168 = call float @sqrtf(float %167) nounwind readonly ; [#uses=1]
- %169 = fdiv float 1.000000e+00, %168 ; [#uses=2]
- %170 = fsub float -0.000000e+00, %106 ; [#uses=1]
- %171 = fmul float %169, %170 ; [#uses=1]
- %172 = fmul float %103, %169 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i.i: ; preds = %bb.i6
- %173 = fmul float %101, %101 ; [#uses=1]
- %174 = fmul float %103, %103 ; [#uses=1]
- %175 = fadd float %173, %174 ; [#uses=1]
- %176 = call float @sqrtf(float %175) nounwind readonly ; [#uses=1]
- %177 = fdiv float 1.000000e+00, %176 ; [#uses=2]
- %178 = fsub float -0.000000e+00, %103 ; [#uses=1]
- %179 = fmul float %177, %178 ; [#uses=1]
- %180 = fmul float %101, %177 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-bb1.i: ; preds = %entry
- %181 = fmul float %106, %155 ; [#uses=1]
- %182 = fmul float %103, %156 ; [#uses=1]
- %183 = fmul float %101, %156 ; [#uses=1]
- %184 = fmul float %106, %154 ; [#uses=1]
- %185 = fmul float %103, %154 ; [#uses=1]
- %186 = fmul float %101, %155 ; [#uses=1]
- %187 = fsub float %182, %181 ; [#uses=1]
- %188 = fsub float %184, %183 ; [#uses=1]
- %189 = fsub float %186, %185 ; [#uses=1]
- %190 = fadd float %161, 1.000000e+00 ; [#uses=1]
- %191 = fmul float %190, 2.000000e+00 ; [#uses=1]
- %192 = call float @sqrtf(float %191) nounwind readonly ; [#uses=2]
- %193 = fdiv float 1.000000e+00, %192 ; [#uses=3]
- %194 = fmul float %192, 5.000000e-01 ; [#uses=1]
- %195 = fmul float %189, %193 ; [#uses=1]
- %196 = fmul float %188, %193 ; [#uses=1]
- %197 = fmul float %187, %193 ; [#uses=1]
- br label %_Z15shortestArcQuatRK9btVector3S1_.exit
-
-_Z15shortestArcQuatRK9btVector3S1_.exit: ; preds = %bb1.i, %bb1.i.i, %bb.i.i
- %qNoHinge.0.0.0.0 = phi float [ %197, %bb1.i ], [ 0.000000e+00, %bb.i.i ], [ %179, %bb1.i.i ] ; [#uses=1]
- %qNoHinge.0.0.1.0 = phi float [ %196, %bb1.i ], [ %171, %bb.i.i ], [ %180, %bb1.i.i ] ; [#uses=1]
- %qNoHinge.0.0.2.0 = phi float [ %195, %bb1.i ], [ %172, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=1]
- %qNoHinge.0.0.3.0 = phi float [ %194, %bb1.i ], [ 0.000000e+00, %bb.i.i ], [ 0.000000e+00, %bb1.i.i ] ; [#uses=4]
- %198 = fsub float -0.000000e+00, %qNoHinge.0.0.2.0 ; [#uses=4]
- %199 = fsub float -0.000000e+00, %qNoHinge.0.0.1.0 ; [#uses=4]
- %200 = fsub float -0.000000e+00, %qNoHinge.0.0.0.0 ; [#uses=4]
- %201 = fmul float %qNoHinge.0.0.3.0, %99 ; [#uses=1]
- %202 = fmul float %96, %200 ; [#uses=1]
- %203 = fsub float %201, %202 ; [#uses=1]
- %204 = fmul float %97, %199 ; [#uses=1]
- %205 = fsub float %203, %204 ; [#uses=1]
- %206 = fmul float %98, %198 ; [#uses=1]
- %207 = fsub float %205, %206 ; [#uses=3]
- %208 = fmul float %qNoHinge.0.0.3.0, %98 ; [#uses=1]
- %209 = fmul float %99, %198 ; [#uses=1]
- %210 = fadd float %208, %209 ; [#uses=1]
- %211 = fmul float %97, %200 ; [#uses=1]
- %212 = fadd float %210, %211 ; [#uses=1]
- %213 = fmul float %96, %199 ; [#uses=1]
- %214 = fsub float %212, %213 ; [#uses=3]
- %215 = fmul float %qNoHinge.0.0.3.0, %97 ; [#uses=1]
- %216 = fmul float %99, %199 ; [#uses=1]
- %217 = fadd float %215, %216 ; [#uses=1]
- %218 = fmul float %96, %198 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=1]
- %220 = fmul float %98, %200 ; [#uses=1]
- %221 = fsub float %219, %220 ; [#uses=2]
- %222 = fmul float %qNoHinge.0.0.3.0, %96 ; [#uses=1]
- %223 = fmul float %99, %200 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=1]
- %225 = fmul float %98, %199 ; [#uses=1]
- %226 = fadd float %224, %225 ; [#uses=1]
- %227 = fmul float %97, %198 ; [#uses=1]
- %228 = fsub float %226, %227 ; [#uses=2]
- %229 = fmul float %228, %228 ; [#uses=1]
- %230 = fmul float %221, %221 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = fmul float %214, %214 ; [#uses=1]
- %233 = fadd float %231, %232 ; [#uses=1]
- %234 = fmul float %207, %207 ; [#uses=1]
- %235 = fadd float %233, %234 ; [#uses=1]
- %236 = call float @sqrtf(float %235) nounwind readonly ; [#uses=1]
- %237 = fdiv float 1.000000e+00, %236 ; [#uses=2]
- %238 = fmul float %214, %237 ; [#uses=2]
- %239 = fmul float %207, %237 ; [#uses=3]
- %240 = fcmp olt float %239, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i4 = select i1 %240, float -1.000000e+00, float %239 ; [#uses=2]
- %241 = fcmp ogt float %x_addr.0.i.i4, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i5 = select i1 %241, float 1.000000e+00, float %x_addr.0.i.i4 ; [#uses=1]
- %242 = call float @acosf(float %x_addr.1.i.i5) nounwind readonly ; [#uses=1]
- %243 = fmul float %242, 2.000000e+00 ; [#uses=2]
- %244 = fcmp ogt float %243, 0x400921FB60000000 ; [#uses=1]
- br i1 %244, label %bb, label %bb1
-
-bb: ; preds = %_Z15shortestArcQuatRK9btVector3S1_.exit
- %245 = fsub float -0.000000e+00, %239 ; [#uses=2]
- %246 = fsub float -0.000000e+00, %238 ; [#uses=1]
- %247 = fcmp olt float %245, -1.000000e+00 ; [#uses=1]
- %x_addr.0.i.i = select i1 %247, float -1.000000e+00, float %245 ; [#uses=2]
- %248 = fcmp ogt float %x_addr.0.i.i, 1.000000e+00 ; [#uses=1]
- %x_addr.1.i.i = select i1 %248, float 1.000000e+00, float %x_addr.0.i.i ; [#uses=1]
- %249 = call float @acosf(float %x_addr.1.i.i) nounwind readonly ; [#uses=1]
- %250 = fmul float %249, 2.000000e+00 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %_Z15shortestArcQuatRK9btVector3S1_.exit
- %qHinge.0.0.2.0 = phi float [ %246, %bb ], [ %238, %_Z15shortestArcQuatRK9btVector3S1_.exit ] ; [#uses=1]
- %targetAngle.0 = phi float [ %250, %bb ], [ %243, %_Z15shortestArcQuatRK9btVector3S1_.exit ] ; [#uses=2]
- %251 = fcmp olt float %qHinge.0.0.2.0, 0.000000e+00 ; [#uses=1]
- br i1 %251, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %252 = fsub float -0.000000e+00, %targetAngle.0 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %targetAngle.1 = phi float [ %252, %bb2 ], [ %targetAngle.0, %bb1 ] ; [#uses=4]
- %253 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %254 = load float* %253, align 4 ; [#uses=3]
- %255 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %256 = load float* %255, align 4 ; [#uses=3]
- %257 = fcmp olt float %254, %256 ; [#uses=1]
- br i1 %257, label %bb.i, label %_ZN17btHingeConstraint14setMotorTargetEff.exit
-
-bb.i: ; preds = %bb3
- %258 = fcmp ogt float %254, %targetAngle.1 ; [#uses=1]
- br i1 %258, label %_ZN17btHingeConstraint14setMotorTargetEff.exit, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %259 = fcmp olt float %256, %targetAngle.1 ; [#uses=1]
- br i1 %259, label %bb3.i, label %_ZN17btHingeConstraint14setMotorTargetEff.exit
-
-bb3.i: ; preds = %bb2.i
- br label %_ZN17btHingeConstraint14setMotorTargetEff.exit
-
-_ZN17btHingeConstraint14setMotorTargetEff.exit: ; preds = %bb3.i, %bb2.i, %bb.i, %bb3
- %targetAngle_addr.0.i = phi float [ %256, %bb3.i ], [ %targetAngle.1, %bb2.i ], [ %targetAngle.1, %bb3 ], [ %254, %bb.i ] ; [#uses=1]
- %260 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %261 = load %struct.btRigidBody** %260, align 4 ; [#uses=1]
- %262 = getelementptr inbounds %struct.btRigidBody* %261, i32 0, i32 0, i32 1 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %264 = load %struct.btRigidBody** %263, align 4 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btRigidBody* %264, i32 0, i32 0, i32 1 ; [#uses=1]
- %266 = call float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* %265, %struct.btTransform* %262) nounwind ; [#uses=1]
- %267 = fsub float %targetAngle_addr.0.i, %266 ; [#uses=1]
- %268 = fdiv float %267, %dt ; [#uses=1]
- %269 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float %268, float* %269, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraint9testLimitERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB) nounwind align 2 {
-entry:
- %0 = tail call float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* %transA, %struct.btTransform* %transB) nounwind ; [#uses=2]
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 16 ; [#uses=2]
- store float %0, float* %1, align 4
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 14 ; [#uses=3]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 13 ; [#uses=3]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=3]
- store i8 0, i8* %4, align 2
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %return, label %bb
-
-bb: ; preds = %entry
- %10 = tail call float @_Z21btAdjustAngleToLimitsfff(float %0, float %6, float %8) nounwind ; [#uses=5]
- store float %10, float* %1, align 4
- %11 = fcmp ugt float %10, %6 ; [#uses=1]
- br i1 %11, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %12 = fsub float %6, %10 ; [#uses=1]
- store float %12, float* %2, align 4
- store float 1.000000e+00, float* %3, align 4
- store i8 1, i8* %4, align 2
- ret void
-
-bb2: ; preds = %bb
- %13 = fcmp ult float %10, %8 ; [#uses=1]
- br i1 %13, label %return, label %bb3
-
-bb3: ; preds = %bb2
- %14 = fsub float %8, %10 ; [#uses=1]
- store float %14, float* %2, align 4
- store float -1.000000e+00, float* %3, align 4
- store i8 1, i8* %4, align 2
- ret void
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_(%struct.btHingeConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB, %struct.btQuadWord* nocapture %angVelA, %struct.btQuadWord* nocapture %angVelB) align 2 {
-entry:
- %0 = tail call float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* %transA, %struct.btTransform* %transB) nounwind ; [#uses=2]
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 16 ; [#uses=2]
- store float %0, float* %1, align 4
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 14 ; [#uses=3]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 13 ; [#uses=3]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=3]
- store i8 0, i8* %4, align 2
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- %7 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=4]
- %9 = fcmp ugt float %6, %8 ; [#uses=1]
- br i1 %9, label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit, label %bb.i
-
-bb.i: ; preds = %entry
- %10 = tail call float @_Z21btAdjustAngleToLimitsfff(float %0, float %6, float %8) nounwind ; [#uses=5]
- store float %10, float* %1, align 4
- %11 = fcmp ugt float %10, %6 ; [#uses=1]
- br i1 %11, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %12 = fsub float %6, %10 ; [#uses=1]
- store float %12, float* %2, align 4
- store float 1.000000e+00, float* %3, align 4
- store i8 1, i8* %4, align 2
- br label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit
-
-bb2.i: ; preds = %bb.i
- %13 = fcmp ult float %10, %8 ; [#uses=1]
- br i1 %13, label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit, label %bb3.i
-
-bb3.i: ; preds = %bb2.i
- %14 = fsub float %8, %10 ; [#uses=1]
- store float %14, float* %2, align 4
- store float -1.000000e+00, float* %3, align 4
- store i8 1, i8* %4, align 2
- br label %_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit
-
-_ZN17btHingeConstraint9testLimitERK11btTransformS2_.exit: ; preds = %bb3.i, %bb2.i, %bb1.i, %entry
- tail call void @_ZN17btHingeConstraint16getInfo2InternalEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_(%struct.btHingeConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %transA, %struct.btTransform* %transB, %struct.btQuadWord* %angVelA, %struct.btQuadWord* %angVelB)
- ret void
-}
-
-; [#uses=0]
-define float @_ZN17btHingeConstraint13getHingeAngleEv(%struct.btHingeConstraint* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %4 = load %struct.btRigidBody** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = tail call float @_ZN17btHingeConstraint13getHingeAngleERK11btTransformS2_(%struct.btHingeConstraint* %this, %struct.btTransform* %5, %struct.btTransform* %2) nounwind ; [#uses=1]
- ret float %6
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraintC2ER11btRigidBodyRK11btTransformb(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btTransform* %rbAFrame, i8 zeroext %useReferenceFrameA) align 2 {
-bb5:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* %0, i32 4, %struct.btRigidBody* %rbA)
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btHingeConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %40 = load float* %39, align 4 ; [#uses=4]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %43 = load float* %42, align 4 ; [#uses=4]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=4]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = load float* %3, align 4 ; [#uses=1]
- store float %51, float* %50, align 4
- %52 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %6, align 4 ; [#uses=1]
- store float %53, float* %52, align 4
- %54 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %9, align 4 ; [#uses=1]
- store float %55, float* %54, align 4
- %56 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %57 = load float* %12, align 4 ; [#uses=1]
- store float %57, float* %56, align 4
- %58 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %15, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %60 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %18, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %62 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %63 = load float* %21, align 4 ; [#uses=1]
- store float %63, float* %62, align 4
- %64 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %65 = load float* %24, align 4 ; [#uses=1]
- store float %65, float* %64, align 4
- %66 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %27, align 4 ; [#uses=1]
- store float %67, float* %66, align 4
- %68 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %30, align 4 ; [#uses=1]
- store float %69, float* %68, align 4
- %70 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %71 = load float* %33, align 4 ; [#uses=1]
- store float %71, float* %70, align 4
- %72 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %36, align 4 ; [#uses=1]
- store float %73, float* %72, align 4
- %74 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=2]
- %75 = load float* %39, align 4 ; [#uses=1]
- store float %75, float* %74, align 4
- %76 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=2]
- %77 = load float* %42, align 4 ; [#uses=1]
- store float %77, float* %76, align 4
- %78 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=2]
- %79 = load float* %45, align 4 ; [#uses=1]
- store float %79, float* %78, align 4
- %80 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=2]
- %81 = load float* %48, align 4 ; [#uses=1]
- store float %81, float* %80, align 4
- %82 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store i8 0, i8* %82, align 4
- %83 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store i8 0, i8* %83, align 1
- %84 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store i8 0, i8* %84, align 1
- %85 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store i8 1, i8* %85, align 4
- %86 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store i8 %useReferenceFrameA, i8* %86, align 1
- %87 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store i32 0, i32* %87, align 4
- %88 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %89 = load %struct.btRigidBody** %88, align 4 ; [#uses=12]
- %90 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %91, %40 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %94, %43 ; [#uses=1]
- %96 = fadd float %92, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fmul float %98, %46 ; [#uses=1]
- %100 = fadd float %96, %99 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fadd float %100, %102 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %105, %40 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = fmul float %108, %43 ; [#uses=1]
- %110 = fadd float %106, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fmul float %112, %46 ; [#uses=1]
- %114 = fadd float %110, %113 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=1]
- %117 = fadd float %114, %116 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=1]
- %120 = fmul float %119, %40 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- %123 = fmul float %122, %43 ; [#uses=1]
- %124 = fadd float %120, %123 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- %127 = fmul float %126, %46 ; [#uses=1]
- %128 = fadd float %124, %127 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = fadd float %128, %130 ; [#uses=1]
- store float %131, float* %74, align 4
- store float %117, float* %76, align 4
- store float %103, float* %78, align 4
- store float 0.000000e+00, float* %80, align 4
- %132 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %132, align 4
- %133 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float -1.000000e+00, float* %133, align 4
- %134 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %134, align 4
- %135 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 1.000000e+00, float* %135, align 4
- %136 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3FECCCCCC0000000, float* %136, align 4
- %137 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store i8 0, i8* %137, align 2
- %toBool = icmp eq i8 %useReferenceFrameA, 0 ; [#uses=1]
- %iftmp.186.0 = select i1 %toBool, float 1.000000e+00, float -1.000000e+00 ; [#uses=1]
- %138 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float %iftmp.186.0, float* %138, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraintC1ER11btRigidBodyRK11btTransformb(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btTransform* %rbAFrame, i8 zeroext %useReferenceFrameA) align 2 {
-entry:
- tail call void @_ZN17btHingeConstraintC2ER11btRigidBodyRK11btTransformb(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btTransform* %rbAFrame, i8 zeroext %useReferenceFrameA)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraintC2ER11btRigidBodyRK9btVector3S4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btQuadWord* nocapture %pivotInA, %struct.btQuadWord* nocapture %axisInA, i8 zeroext %useReferenceFrameA) align 2 {
-bb5:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* %0, i32 4, %struct.btRigidBody* %rbA)
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btHingeConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store i8 0, i8* %3, align 1
- %4 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store i8 0, i8* %4, align 1
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store i8 %useReferenceFrameA, i8* %6, align 1
- %7 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 2 ; [#uses=3]
- %9 = load float* %8, align 4 ; [#uses=6]
- %10 = tail call float @fabsf(float %9) nounwind readnone ; [#uses=1]
- %11 = fcmp ogt float %10, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %11, label %bb.i18, label %bb1.i19
-
-bb.i18: ; preds = %bb5
- %12 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = fmul float %13, %13 ; [#uses=1]
- %15 = fmul float %9, %9 ; [#uses=1]
- %16 = fadd float %14, %15 ; [#uses=2]
- %17 = tail call float @sqrtf(float %16) nounwind readonly ; [#uses=1]
- %18 = fdiv float 1.000000e+00, %17 ; [#uses=3]
- %19 = fsub float -0.000000e+00, %9 ; [#uses=1]
- %20 = fmul float %18, %19 ; [#uses=2]
- %21 = fmul float %13, %18 ; [#uses=2]
- %22 = fmul float %16, %18 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=2]
- %25 = fsub float -0.000000e+00, %24 ; [#uses=1]
- %26 = fmul float %21, %25 ; [#uses=1]
- %27 = fmul float %24, %20 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-bb1.i19: ; preds = %bb5
- %28 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=3]
- %30 = fmul float %29, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=3]
- %33 = fmul float %32, %32 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=2]
- %35 = tail call float @sqrtf(float %34) nounwind readonly ; [#uses=1]
- %36 = fdiv float 1.000000e+00, %35 ; [#uses=3]
- %37 = fsub float -0.000000e+00, %32 ; [#uses=1]
- %38 = fmul float %36, %37 ; [#uses=2]
- %39 = fmul float %29, %36 ; [#uses=2]
- %40 = fsub float -0.000000e+00, %9 ; [#uses=1]
- %41 = fmul float %39, %40 ; [#uses=1]
- %42 = fmul float %9, %38 ; [#uses=1]
- %43 = fmul float %34, %36 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit: ; preds = %bb1.i19, %bb.i18
- %rbAxisA2.0.2.0 = phi float [ %27, %bb.i18 ], [ %43, %bb1.i19 ] ; [#uses=1]
- %rbAxisA2.0.1.0 = phi float [ %26, %bb.i18 ], [ %42, %bb1.i19 ] ; [#uses=1]
- %rbAxisA2.0.0.0 = phi float [ %22, %bb.i18 ], [ %41, %bb1.i19 ] ; [#uses=1]
- %rbAxisA1.0.2.0 = phi float [ %21, %bb.i18 ], [ 0.000000e+00, %bb1.i19 ] ; [#uses=5]
- %rbAxisA1.0.1.0 = phi float [ %20, %bb.i18 ], [ %39, %bb1.i19 ] ; [#uses=5]
- %rbAxisA1.0.0.0 = phi float [ 0.000000e+00, %bb.i18 ], [ %38, %bb1.i19 ] ; [#uses=5]
- %44 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 0 ; [#uses=2]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 1 ; [#uses=2]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 2 ; [#uses=2]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 3 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 1 ; [#uses=2]
- %57 = getelementptr inbounds %struct.btQuadWord* %axisInA, i32 0, i32 0, i32 0 ; [#uses=2]
- %58 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %rbAxisA1.0.0.0, float* %58, align 4
- %59 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %rbAxisA2.0.0.0, float* %59, align 4
- %60 = load float* %57, align 4 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %60, float* %61, align 4
- %62 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %62, align 4
- %63 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %rbAxisA1.0.1.0, float* %63, align 4
- %64 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %rbAxisA2.0.1.0, float* %64, align 4
- %65 = load float* %56, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %65, float* %66, align 4
- %67 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- %68 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %rbAxisA1.0.2.0, float* %68, align 4
- %69 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %rbAxisA2.0.2.0, float* %69, align 4
- %70 = load float* %8, align 4 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %70, float* %71, align 4
- %72 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %72, align 4
- %73 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=2]
- %75 = load float* %57, align 4 ; [#uses=9]
- %76 = fmul float %74, %75 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=2]
- %79 = load float* %56, align 4 ; [#uses=12]
- %80 = fmul float %78, %79 ; [#uses=1]
- %81 = fadd float %76, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=2]
- %84 = load float* %8, align 4 ; [#uses=10]
- %85 = fmul float %83, %84 ; [#uses=1]
- %86 = fadd float %81, %85 ; [#uses=6]
- %87 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=2]
- %89 = fmul float %88, %75 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=2]
- %92 = fmul float %91, %79 ; [#uses=1]
- %93 = fadd float %89, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=2]
- %96 = fmul float %95, %84 ; [#uses=1]
- %97 = fadd float %93, %96 ; [#uses=6]
- %98 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=2]
- %100 = fmul float %99, %75 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=2]
- %103 = fmul float %102, %79 ; [#uses=1]
- %104 = fadd float %100, %103 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=2]
- %107 = fmul float %106, %84 ; [#uses=1]
- %108 = fadd float %104, %107 ; [#uses=6]
- %109 = fmul float %75, %108 ; [#uses=1]
- %110 = fmul float %79, %97 ; [#uses=1]
- %111 = fadd float %109, %110 ; [#uses=1]
- %112 = fmul float %84, %86 ; [#uses=1]
- %113 = fadd float %111, %112 ; [#uses=2]
- %114 = fcmp olt float %113, 0xBFEFFFFFC0000000 ; [#uses=1]
- br i1 %114, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %115 = tail call float @fabsf(float %84) nounwind readnone ; [#uses=1]
- %116 = fcmp ogt float %115, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %116, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i
- %117 = fmul float %79, %79 ; [#uses=1]
- %118 = fmul float %84, %84 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = tail call float @sqrtf(float %119) nounwind readonly ; [#uses=1]
- %121 = fdiv float 1.000000e+00, %120 ; [#uses=2]
- %122 = fsub float -0.000000e+00, %84 ; [#uses=1]
- %123 = fmul float %121, %122 ; [#uses=1]
- %124 = fmul float %79, %121 ; [#uses=1]
- br label %invcont
-
-bb1.i.i: ; preds = %bb.i
- %125 = fmul float %75, %75 ; [#uses=1]
- %126 = fmul float %79, %79 ; [#uses=1]
- %127 = fadd float %125, %126 ; [#uses=1]
- %128 = tail call float @sqrtf(float %127) nounwind readonly ; [#uses=1]
- %129 = fdiv float 1.000000e+00, %128 ; [#uses=2]
- %130 = fsub float -0.000000e+00, %79 ; [#uses=1]
- %131 = fmul float %129, %130 ; [#uses=1]
- %132 = fmul float %75, %129 ; [#uses=1]
- br label %invcont
-
-bb1.i: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %133 = fmul float %84, %97 ; [#uses=1]
- %134 = fmul float %79, %86 ; [#uses=1]
- %135 = fmul float %75, %86 ; [#uses=1]
- %136 = fmul float %84, %108 ; [#uses=1]
- %137 = fmul float %79, %108 ; [#uses=1]
- %138 = fmul float %75, %97 ; [#uses=1]
- %139 = fsub float %134, %133 ; [#uses=1]
- %140 = fsub float %136, %135 ; [#uses=1]
- %141 = fsub float %138, %137 ; [#uses=1]
- %142 = fadd float %113, 1.000000e+00 ; [#uses=1]
- %143 = fmul float %142, 2.000000e+00 ; [#uses=1]
- %144 = tail call float @sqrtf(float %143) nounwind readonly ; [#uses=2]
- %145 = fdiv float 1.000000e+00, %144 ; [#uses=3]
- %146 = fmul float %144, 5.000000e-01 ; [#uses=1]
- %147 = fmul float %141, %145 ; [#uses=1]
- %148 = fmul float %140, %145 ; [#uses=1]
- %149 = fmul float %139, %145 ; [#uses=1]
- br label %invcont
-
-invcont: ; preds = %bb1.i, %bb1.i.i, %bb.i.i
- %rotationArc.0.0.3.0 = phi float [ %146, %bb1.i ], [ 0.000000e+00, %bb1.i.i ], [ 0.000000e+00, %bb.i.i ] ; [#uses=6]
- %rotationArc.0.0.2.0 = phi float [ %147, %bb1.i ], [ 0.000000e+00, %bb1.i.i ], [ %124, %bb.i.i ] ; [#uses=4]
- %rotationArc.0.0.1.0 = phi float [ %148, %bb1.i ], [ %132, %bb1.i.i ], [ %123, %bb.i.i ] ; [#uses=4]
- %rotationArc.0.0.0.0 = phi float [ %149, %bb1.i ], [ %131, %bb1.i.i ], [ 0.000000e+00, %bb.i.i ] ; [#uses=3]
- %150 = fsub float -0.000000e+00, %rotationArc.0.0.0.0 ; [#uses=4]
- %151 = fmul float %rbAxisA1.0.0.0, %150 ; [#uses=1]
- %152 = fmul float %rotationArc.0.0.1.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %153 = fsub float %151, %152 ; [#uses=1]
- %154 = fmul float %rotationArc.0.0.2.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %155 = fsub float %153, %154 ; [#uses=3]
- %156 = fmul float %rotationArc.0.0.3.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %157 = fmul float %rotationArc.0.0.0.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %158 = fadd float %156, %157 ; [#uses=1]
- %159 = fmul float %rotationArc.0.0.1.0, %rbAxisA1.0.0.0 ; [#uses=1]
- %160 = fsub float %158, %159 ; [#uses=3]
- %161 = fmul float %rotationArc.0.0.3.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %162 = fmul float %rotationArc.0.0.2.0, %rbAxisA1.0.0.0 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fmul float %rotationArc.0.0.0.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %165 = fsub float %163, %164 ; [#uses=3]
- %166 = fmul float %rotationArc.0.0.3.0, %rbAxisA1.0.0.0 ; [#uses=1]
- %167 = fmul float %rotationArc.0.0.1.0, %rbAxisA1.0.2.0 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=1]
- %169 = fmul float %rotationArc.0.0.2.0, %rbAxisA1.0.1.0 ; [#uses=1]
- %170 = fsub float %168, %169 ; [#uses=3]
- %171 = fsub float -0.000000e+00, %rotationArc.0.0.2.0 ; [#uses=3]
- %172 = fsub float -0.000000e+00, %rotationArc.0.0.1.0 ; [#uses=3]
- %173 = fmul float %155, %171 ; [#uses=1]
- %174 = fmul float %160, %rotationArc.0.0.3.0 ; [#uses=1]
- %175 = fadd float %173, %174 ; [#uses=1]
- %176 = fmul float %170, %172 ; [#uses=1]
- %177 = fadd float %175, %176 ; [#uses=1]
- %178 = fmul float %165, %150 ; [#uses=1]
- %179 = fsub float %177, %178 ; [#uses=3]
- %180 = fmul float %155, %172 ; [#uses=1]
- %181 = fmul float %165, %rotationArc.0.0.3.0 ; [#uses=1]
- %182 = fadd float %180, %181 ; [#uses=1]
- %183 = fmul float %160, %150 ; [#uses=1]
- %184 = fadd float %182, %183 ; [#uses=1]
- %185 = fmul float %170, %171 ; [#uses=1]
- %186 = fsub float %184, %185 ; [#uses=3]
- %187 = fmul float %155, %150 ; [#uses=1]
- %188 = fmul float %170, %rotationArc.0.0.3.0 ; [#uses=1]
- %189 = fadd float %187, %188 ; [#uses=1]
- %190 = fmul float %165, %171 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = fmul float %160, %172 ; [#uses=1]
- %193 = fsub float %191, %192 ; [#uses=3]
- %194 = fmul float %108, %186 ; [#uses=1]
- %195 = fmul float %97, %193 ; [#uses=1]
- %196 = fsub float %194, %195 ; [#uses=1]
- %197 = fmul float %86, %193 ; [#uses=1]
- %198 = fmul float %108, %179 ; [#uses=1]
- %199 = fsub float %197, %198 ; [#uses=1]
- %200 = fmul float %97, %179 ; [#uses=1]
- %201 = fmul float %86, %186 ; [#uses=1]
- %202 = fsub float %200, %201 ; [#uses=1]
- %203 = load float* %45, align 4 ; [#uses=3]
- %204 = fmul float %74, %203 ; [#uses=1]
- %205 = load float* %48, align 4 ; [#uses=3]
- %206 = fmul float %78, %205 ; [#uses=1]
- %207 = fadd float %204, %206 ; [#uses=1]
- %208 = load float* %51, align 4 ; [#uses=3]
- %209 = fmul float %83, %208 ; [#uses=1]
- %210 = fadd float %207, %209 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=1]
- %213 = fadd float %210, %212 ; [#uses=1]
- %214 = fmul float %88, %203 ; [#uses=1]
- %215 = fmul float %91, %205 ; [#uses=1]
- %216 = fadd float %214, %215 ; [#uses=1]
- %217 = fmul float %95, %208 ; [#uses=1]
- %218 = fadd float %216, %217 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=1]
- %221 = fadd float %218, %220 ; [#uses=1]
- %222 = fmul float %99, %203 ; [#uses=1]
- %223 = fmul float %102, %205 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=1]
- %225 = fmul float %106, %208 ; [#uses=1]
- %226 = fadd float %224, %225 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %228 = load float* %227, align 4 ; [#uses=1]
- %229 = fadd float %226, %228 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %229, float* %230, align 4
- %231 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %221, float* %231, align 4
- %232 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %213, float* %232, align 4
- %233 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %233, align 4
- %234 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %193, float* %234, align 4
- %235 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %202, float* %235, align 4
- %236 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %108, float* %236, align 4
- %237 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %237, align 4
- %238 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %186, float* %238, align 4
- %239 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %199, float* %239, align 4
- %240 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %97, float* %240, align 4
- %241 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %241, align 4
- %242 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %179, float* %242, align 4
- %243 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %196, float* %243, align 4
- %244 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %86, float* %244, align 4
- %245 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %245, align 4
- %246 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %246, align 4
- %247 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float -1.000000e+00, float* %247, align 4
- %248 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %248, align 4
- %249 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 1.000000e+00, float* %249, align 4
- %250 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3FECCCCCC0000000, float* %250, align 4
- %251 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store i8 0, i8* %251, align 2
- %toBool = icmp eq i8 %useReferenceFrameA, 0 ; [#uses=1]
- %iftmp.178.0 = select i1 %toBool, float 1.000000e+00, float -1.000000e+00 ; [#uses=1]
- %252 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float %iftmp.178.0, float* %252, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraintC1ER11btRigidBodyRK9btVector3S4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btQuadWord* nocapture %pivotInA, %struct.btQuadWord* nocapture %axisInA, i8 zeroext %useReferenceFrameA) align 2 {
-entry:
- tail call void @_ZN17btHingeConstraintC2ER11btRigidBodyRK9btVector3S4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btQuadWord* %pivotInA, %struct.btQuadWord* %axisInA, i8 zeroext %useReferenceFrameA)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN17btHingeConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %rbAFrame, %struct.btTransform* nocapture %rbBFrame, i8 zeroext %useReferenceFrameA) align 2 {
-bb5:
- %0 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 4, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btHingeConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %rbAFrame, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- store float %88, float* %86, align 4
- %89 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- store float %91, float* %89, align 4
- %92 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- store float %94, float* %92, align 4
- %95 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btTransform* %rbBFrame, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=1]
- store float %97, float* %95, align 4
- %98 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store i8 0, i8* %98, align 4
- %99 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store i8 0, i8* %99, align 1
- %100 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store i8 0, i8* %100, align 1
- %101 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store i8 1, i8* %101, align 4
- %102 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store i8 %useReferenceFrameA, i8* %102, align 1
- %103 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store i32 0, i32* %103, align 4
- %104 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %104, align 4
- %105 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float -1.000000e+00, float* %105, align 4
- %106 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %106, align 4
- %107 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 1.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0x3FECCCCCC0000000, float* %108, align 4
- %109 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store i8 0, i8* %109, align 2
- %toBool = icmp eq i8 %useReferenceFrameA, 0 ; [#uses=1]
- %iftmp.182.0 = select i1 %toBool, float 1.000000e+00, float -1.000000e+00 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btHingeConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float %iftmp.182.0, float* %110, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraintC1ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %rbAFrame, %struct.btTransform* nocapture %rbBFrame, i8 zeroext %useReferenceFrameA) align 2 {
-entry:
- tail call void @_ZN17btHingeConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %rbAFrame, %struct.btTransform* %rbBFrame, i8 zeroext %useReferenceFrameA)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btHingeConstraintC1ER11btRigidBodyS1_RK9btVector3S4_S4_S4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %pivotInA, %struct.btQuadWord* nocapture %pivotInB, %struct.btQuadWord* nocapture %axisInA, %struct.btQuadWord* nocapture %axisInB, i8 zeroext %useReferenceFrameA) align 2 {
-entry:
- tail call void @_ZN17btHingeConstraintC2ER11btRigidBodyS1_RK9btVector3S4_S4_S4_b(%struct.btHingeConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* %pivotInA, %struct.btQuadWord* %pivotInB, %struct.btQuadWord* %axisInA, %struct.btQuadWord* %axisInB, i8 zeroext %useReferenceFrameA)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btPoint2PointConstraintC2ER11btRigidBodyS1_RK9btVector3S4_(%struct.btPoint2PointConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %pivotInA, %struct.btQuadWord* nocapture %pivotInB) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 3, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV23btPoint2PointConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store i8 0, i8* %27, align 4
- %28 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 0 ; [#uses=1]
- store float 0x3FD3333340000000, float* %28, align 4
- %29 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK23btPoint2PointConstraint28calculateSerializeBufferSizeEv(%struct.btPoint2PointConstraint* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 76
-}
-
-; [#uses=1]
-define void @_ZN23btPoint2PointConstraint13buildJacobianEv(%struct.btPoint2PointConstraint* %this) nounwind align 2 {
-bb.nph:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %3 = alloca %struct.btMatrix3x3, align 8 ; [#uses=13]
- %normal = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %4 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 8
- %6 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 8
- %8 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btMatrix3x3* %3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btMatrix3x3* %2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb3, %bb.nph
- %i.014 = phi i32 [ 0, %bb.nph ], [ %154, %bb3 ] ; [#uses=3]
- %scevgep = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 1, i32 %i.014 ; [#uses=2]
- %scevgep15 = getelementptr %struct.btQuadWord* %normal, i32 0, i32 0, i32 %i.014 ; [#uses=2]
- store float 1.000000e+00, float* %scevgep15, align 4
- %49 = load %struct.btRigidBody** %9, align 4 ; [#uses=14]
- %50 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=2]
- store float %59, float* %10, align 8
- %60 = load float* %57, align 4 ; [#uses=2]
- store float %60, float* %11, align 4
- %61 = load float* %56, align 4 ; [#uses=2]
- store float %61, float* %12, align 8
- store float 0.000000e+00, float* %13, align 4
- %62 = load float* %55, align 4 ; [#uses=2]
- store float %62, float* %14, align 8
- %63 = load float* %54, align 4 ; [#uses=2]
- store float %63, float* %15, align 4
- %64 = load float* %53, align 4 ; [#uses=2]
- store float %64, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- %65 = load float* %52, align 4 ; [#uses=2]
- store float %65, float* %18, align 8
- %66 = load float* %51, align 4 ; [#uses=2]
- store float %66, float* %19, align 4
- %67 = load float* %50, align 4 ; [#uses=2]
- store float %67, float* %20, align 8
- store float 0.000000e+00, float* %21, align 4
- %68 = load %struct.btRigidBody** %22, align 4 ; [#uses=14]
- %69 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=2]
- store float %78, float* %23, align 8
- %79 = load float* %76, align 4 ; [#uses=2]
- store float %79, float* %24, align 4
- %80 = load float* %75, align 4 ; [#uses=2]
- store float %80, float* %25, align 8
- store float 0.000000e+00, float* %26, align 4
- %81 = load float* %74, align 4 ; [#uses=2]
- store float %81, float* %27, align 8
- %82 = load float* %73, align 4 ; [#uses=2]
- store float %82, float* %28, align 4
- %83 = load float* %72, align 4 ; [#uses=2]
- store float %83, float* %29, align 8
- store float 0.000000e+00, float* %30, align 4
- %84 = load float* %71, align 4 ; [#uses=2]
- store float %84, float* %31, align 8
- %85 = load float* %70, align 4 ; [#uses=2]
- store float %85, float* %32, align 4
- %86 = load float* %69, align 4 ; [#uses=2]
- store float %86, float* %33, align 8
- store float 0.000000e+00, float* %34, align 4
- %87 = load float* %35, align 4 ; [#uses=3]
- %88 = fmul float %61, %87 ; [#uses=1]
- %89 = load float* %36, align 4 ; [#uses=3]
- %90 = fmul float %64, %89 ; [#uses=1]
- %91 = fadd float %88, %90 ; [#uses=1]
- %92 = load float* %37, align 4 ; [#uses=3]
- %93 = fmul float %67, %92 ; [#uses=1]
- %94 = fadd float %91, %93 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=2]
- %97 = fadd float %94, %96 ; [#uses=1]
- %98 = fmul float %60, %87 ; [#uses=1]
- %99 = fmul float %63, %89 ; [#uses=1]
- %100 = fadd float %98, %99 ; [#uses=1]
- %101 = fmul float %66, %92 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=2]
- %105 = fadd float %102, %104 ; [#uses=1]
- %106 = fmul float %59, %87 ; [#uses=1]
- %107 = fmul float %62, %89 ; [#uses=1]
- %108 = fadd float %106, %107 ; [#uses=1]
- %109 = fmul float %65, %92 ; [#uses=1]
- %110 = fadd float %108, %109 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=2]
- %113 = fadd float %110, %112 ; [#uses=1]
- %114 = fsub float %97, %96 ; [#uses=1]
- %115 = fsub float %105, %104 ; [#uses=1]
- %116 = fsub float %113, %112 ; [#uses=1]
- store float %116, float* %38, align 8
- store float %115, float* %39, align 4
- store float %114, float* %40, align 8
- store float 0.000000e+00, float* %41, align 4
- %117 = load float* %42, align 4 ; [#uses=3]
- %118 = fmul float %80, %117 ; [#uses=1]
- %119 = load float* %43, align 4 ; [#uses=3]
- %120 = fmul float %83, %119 ; [#uses=1]
- %121 = fadd float %118, %120 ; [#uses=1]
- %122 = load float* %44, align 4 ; [#uses=3]
- %123 = fmul float %86, %122 ; [#uses=1]
- %124 = fadd float %121, %123 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=2]
- %127 = fadd float %124, %126 ; [#uses=1]
- %128 = fmul float %79, %117 ; [#uses=1]
- %129 = fmul float %82, %119 ; [#uses=1]
- %130 = fadd float %128, %129 ; [#uses=1]
- %131 = fmul float %85, %122 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=2]
- %135 = fadd float %132, %134 ; [#uses=1]
- %136 = fmul float %78, %117 ; [#uses=1]
- %137 = fmul float %81, %119 ; [#uses=1]
- %138 = fadd float %136, %137 ; [#uses=1]
- %139 = fmul float %84, %122 ; [#uses=1]
- %140 = fadd float %138, %139 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=2]
- %143 = fadd float %140, %142 ; [#uses=1]
- %144 = fsub float %127, %126 ; [#uses=1]
- %145 = fsub float %135, %134 ; [#uses=1]
- %146 = fsub float %143, %142 ; [#uses=1]
- store float %146, float* %45, align 8
- store float %145, float* %46, align 4
- store float %144, float* %47, align 8
- store float 0.000000e+00, float* %48, align 4
- %147 = icmp eq %struct.btJacobianEntry* %scevgep, null ; [#uses=1]
- br i1 %147, label %bb3, label %bb1
-
-bb1: ; preds = %bb
- %148 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 4 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 4 ; [#uses=1]
- %150 = load float* %148, align 4 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btRigidBody* %68, i32 0, i32 8 ; [#uses=1]
- %152 = load float* %149, align 4 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btRigidBody* %49, i32 0, i32 8 ; [#uses=1]
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %scevgep, %struct.btMatrix3x3* %3, %struct.btMatrix3x3* %2, %struct.btQuadWord* %1, %struct.btQuadWord* %0, %struct.btQuadWord* %normal, %struct.btQuadWord* %153, float %152, %struct.btQuadWord* %151, float %150) nounwind
- br label %bb3
-
-bb3: ; preds = %bb1, %bb
- store float 0.000000e+00, float* %scevgep15, align 4
- %154 = add nsw i32 %i.014, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %154, 3 ; [#uses=1]
- br i1 %exitcond, label %return, label %bb
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btPoint2PointConstraint18getInfo1NonVirtualEPN17btTypedConstraint17btConstraintInfo1E(%struct.btPoint2PointConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=2]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- store i32 3, i32* %2, align 4
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 3, i32* %4, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btPoint2PointConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(%struct.btPoint2PointConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=2]
- br i1 %toBool.i, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %entry
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb1.i: ; preds = %entry
- store i32 3, i32* %2, align 4
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 3, i32* %4, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btPoint2PointConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_(%struct.btPoint2PointConstraint* nocapture %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* nocapture %body0_trans, %struct.btTransform* nocapture %body1_trans) nounwind align 2 {
-entry:
- %a1 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %a2 = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %1 = load float** %0, align 4 ; [#uses=1]
- store float 1.000000e+00, float* %1, align 4
- %2 = load float** %0, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 6 ; [#uses=12]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = add nsw i32 %4, 1 ; [#uses=1]
- %6 = getelementptr inbounds float* %2, i32 %5 ; [#uses=1]
- store float 1.000000e+00, float* %6, align 4
- %7 = load float** %0, align 4 ; [#uses=1]
- %8 = load i32* %3, align 4 ; [#uses=1]
- %9 = shl i32 %8, 1 ; [#uses=1]
- %10 = add i32 %9, 2 ; [#uses=1]
- %11 = getelementptr inbounds float* %7, i32 %10 ; [#uses=1]
- store float 1.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=3]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = fadd float %16, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = fmul float %24, %26 ; [#uses=1]
- %28 = fadd float %22, %27 ; [#uses=4]
- %29 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fmul float %30, %15 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fmul float %33, %20 ; [#uses=1]
- %35 = fadd float %31, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fmul float %37, %26 ; [#uses=1]
- %39 = fadd float %35, %38 ; [#uses=4]
- %40 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = fmul float %41, %15 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fmul float %44, %20 ; [#uses=1]
- %46 = fadd float %42, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %body0_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fmul float %48, %26 ; [#uses=1]
- %50 = fadd float %46, %49 ; [#uses=4]
- %51 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %50, float* %51, align 8
- %52 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %39, float* %52, align 4
- %53 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %28, float* %53, align 8
- %54 = getelementptr inbounds %struct.btQuadWord* %a1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=1]
- %56 = load float** %55, align 4 ; [#uses=12]
- %57 = load i32* %3, align 4 ; [#uses=5]
- %58 = getelementptr inbounds float* %56, i32 %57 ; [#uses=1]
- %59 = shl i32 %57, 1 ; [#uses=4]
- %60 = getelementptr inbounds float* %56, i32 %59 ; [#uses=1]
- %61 = fsub float -0.000000e+00, %28 ; [#uses=1]
- %62 = fsub float -0.000000e+00, %39 ; [#uses=1]
- %63 = fsub float -0.000000e+00, %50 ; [#uses=1]
- store float 0.000000e+00, float* %56, align 4
- %64 = getelementptr inbounds float* %56, i32 1 ; [#uses=1]
- store float %28, float* %64, align 4
- %65 = getelementptr inbounds float* %56, i32 2 ; [#uses=1]
- store float %62, float* %65, align 4
- %66 = getelementptr inbounds float* %56, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %66, align 4
- store float %61, float* %58, align 4
- %.sum = add i32 %57, 1 ; [#uses=1]
- %67 = getelementptr inbounds float* %56, i32 %.sum ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- %.sum21 = add i32 %57, 2 ; [#uses=1]
- %68 = getelementptr inbounds float* %56, i32 %.sum21 ; [#uses=1]
- store float %50, float* %68, align 4
- %.sum22 = add i32 %57, 3 ; [#uses=1]
- %69 = getelementptr inbounds float* %56, i32 %.sum22 ; [#uses=1]
- store float 0.000000e+00, float* %69, align 4
- store float %39, float* %60, align 4
- %.sum2324 = or i32 %59, 1 ; [#uses=1]
- %70 = getelementptr inbounds float* %56, i32 %.sum2324 ; [#uses=1]
- store float %63, float* %70, align 4
- %.sum25 = add i32 %59, 2 ; [#uses=1]
- %71 = getelementptr inbounds float* %56, i32 %.sum25 ; [#uses=1]
- store float 0.000000e+00, float* %71, align 4
- %.sum26 = add i32 %59, 3 ; [#uses=1]
- %72 = getelementptr inbounds float* %56, i32 %.sum26 ; [#uses=1]
- store float 0.000000e+00, float* %72, align 4
- %73 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=3]
- %77 = fmul float %74, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=3]
- %82 = fmul float %79, %81 ; [#uses=1]
- %83 = fadd float %77, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=3]
- %88 = fmul float %85, %87 ; [#uses=1]
- %89 = fadd float %83, %88 ; [#uses=4]
- %90 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %91, %76 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %94, %81 ; [#uses=1]
- %96 = fadd float %92, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fmul float %98, %87 ; [#uses=1]
- %100 = fadd float %96, %99 ; [#uses=4]
- %101 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fmul float %102, %76 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %105, %81 ; [#uses=1]
- %107 = fadd float %103, %106 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btTransform* %body1_trans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %87 ; [#uses=1]
- %111 = fadd float %107, %110 ; [#uses=4]
- %112 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %111, float* %112, align 8
- %113 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %100, float* %113, align 4
- %114 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %89, float* %114, align 8
- %115 = getelementptr inbounds %struct.btQuadWord* %a2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %115, align 4
- %116 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=1]
- %117 = load float** %116, align 4 ; [#uses=12]
- %118 = load i32* %3, align 4 ; [#uses=5]
- %119 = getelementptr inbounds float* %117, i32 %118 ; [#uses=1]
- %120 = shl i32 %118, 1 ; [#uses=4]
- %121 = getelementptr inbounds float* %117, i32 %120 ; [#uses=1]
- %122 = fsub float -0.000000e+00, %89 ; [#uses=1]
- store float 0.000000e+00, float* %117, align 4
- %123 = getelementptr inbounds float* %117, i32 1 ; [#uses=1]
- store float %122, float* %123, align 4
- %124 = getelementptr inbounds float* %117, i32 2 ; [#uses=1]
- store float %100, float* %124, align 4
- %125 = getelementptr inbounds float* %117, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %125, align 4
- %126 = fsub float -0.000000e+00, %111 ; [#uses=1]
- store float %89, float* %119, align 4
- %.sum27 = add i32 %118, 1 ; [#uses=1]
- %127 = getelementptr inbounds float* %117, i32 %.sum27 ; [#uses=1]
- store float 0.000000e+00, float* %127, align 4
- %.sum28 = add i32 %118, 2 ; [#uses=1]
- %128 = getelementptr inbounds float* %117, i32 %.sum28 ; [#uses=1]
- store float %126, float* %128, align 4
- %.sum29 = add i32 %118, 3 ; [#uses=1]
- %129 = getelementptr inbounds float* %117, i32 %.sum29 ; [#uses=1]
- store float 0.000000e+00, float* %129, align 4
- %130 = fsub float -0.000000e+00, %100 ; [#uses=1]
- store float %130, float* %121, align 4
- %.sum3031 = or i32 %120, 1 ; [#uses=1]
- %131 = getelementptr inbounds float* %117, i32 %.sum3031 ; [#uses=1]
- store float %111, float* %131, align 4
- %.sum32 = add i32 %120, 2 ; [#uses=1]
- %132 = getelementptr inbounds float* %117, i32 %.sum32 ; [#uses=1]
- store float 0.000000e+00, float* %132, align 4
- %.sum33 = add i32 %120, 3 ; [#uses=1]
- %133 = getelementptr inbounds float* %117, i32 %.sum33 ; [#uses=1]
- store float 0.000000e+00, float* %133, align 4
- %134 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 4 ; [#uses=2]
- %135 = load i32* %134, align 4 ; [#uses=1]
- %136 = and i32 %135, 1 ; [#uses=1]
- %toBool = icmp eq i32 %136, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb
-
-bb: ; preds = %entry
- %137 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 5 ; [#uses=1]
- br label %bb8
-
-bb4: ; preds = %entry
- %138 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb4, %bb
- %iftmp.179.0.in = phi float* [ %137, %bb ], [ %138, %bb4 ] ; [#uses=1]
- %iftmp.179.0 = load float* %iftmp.179.0.in, align 4 ; [#uses=1]
- %139 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=1]
- %140 = load float* %139, align 4 ; [#uses=1]
- %141 = fmul float %140, %iftmp.179.0 ; [#uses=3]
- %142 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=3]
- %scevgep39 = getelementptr %struct.btTransform* %body1_trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep41 = getelementptr %struct.btTransform* %body0_trans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %143 = load float** %142, align 4 ; [#uses=1]
- %144 = load float* %scevgep39, align 4 ; [#uses=1]
- %145 = fadd float %111, %144 ; [#uses=1]
- %146 = fsub float %145, %50 ; [#uses=1]
- %147 = load float* %scevgep41, align 4 ; [#uses=1]
- %148 = fsub float %146, %147 ; [#uses=1]
- %149 = fmul float %148, %141 ; [#uses=1]
- store float %149, float* %143, align 4
- %scevgep39.1 = getelementptr %struct.btTransform* %body1_trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep41.1 = getelementptr %struct.btTransform* %body0_trans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %150 = load float** %142, align 4 ; [#uses=1]
- %151 = load i32* %3, align 4 ; [#uses=1]
- %152 = load float* %scevgep39.1, align 4 ; [#uses=1]
- %153 = fadd float %100, %152 ; [#uses=1]
- %154 = fsub float %153, %39 ; [#uses=1]
- %155 = load float* %scevgep41.1, align 4 ; [#uses=1]
- %156 = fsub float %154, %155 ; [#uses=1]
- %157 = fmul float %156, %141 ; [#uses=1]
- %158 = getelementptr inbounds float* %150, i32 %151 ; [#uses=1]
- store float %157, float* %158, align 4
- %scevgep39.2 = getelementptr %struct.btTransform* %body1_trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep41.2 = getelementptr %struct.btTransform* %body0_trans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %159 = load float** %142, align 4 ; [#uses=1]
- %160 = load i32* %3, align 4 ; [#uses=1]
- %161 = shl i32 %160, 1 ; [#uses=1]
- %162 = load float* %scevgep39.2, align 4 ; [#uses=1]
- %163 = fadd float %89, %162 ; [#uses=1]
- %164 = fsub float %163, %28 ; [#uses=1]
- %165 = load float* %scevgep41.2, align 4 ; [#uses=1]
- %166 = fsub float %164, %165 ; [#uses=1]
- %167 = fmul float %166, %141 ; [#uses=1]
- %168 = getelementptr inbounds float* %159, i32 %161 ; [#uses=1]
- store float %167, float* %168, align 4
- %.pre = load i32* %134, align 4 ; [#uses=1]
- %169 = and i32 %.pre, 2 ; [#uses=1]
- %170 = icmp eq i32 %169, 0 ; [#uses=1]
- br i1 %170, label %bb.nph36, label %bb12.loopexit
-
-bb12.loopexit: ; preds = %bb8
- %171 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=3]
- %172 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 6 ; [#uses=3]
- %173 = load float** %171, align 4 ; [#uses=1]
- %174 = load float* %172, align 4 ; [#uses=1]
- store float %174, float* %173, align 4
- %175 = load float** %171, align 4 ; [#uses=1]
- %176 = load i32* %3, align 4 ; [#uses=1]
- %177 = load float* %172, align 4 ; [#uses=1]
- %178 = getelementptr inbounds float* %175, i32 %176 ; [#uses=1]
- store float %177, float* %178, align 4
- %179 = load float** %171, align 4 ; [#uses=1]
- %180 = load i32* %3, align 4 ; [#uses=1]
- %181 = shl i32 %180, 1 ; [#uses=1]
- %182 = load float* %172, align 4 ; [#uses=1]
- %183 = getelementptr inbounds float* %179, i32 %181 ; [#uses=1]
- store float %182, float* %183, align 4
- br label %bb.nph36
-
-bb.nph36: ; preds = %bb12.loopexit, %bb8
- %184 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 2 ; [#uses=3]
- %185 = load float* %184, align 4 ; [#uses=6]
- %186 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=3]
- %187 = fsub float -0.000000e+00, %185 ; [#uses=3]
- %188 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=3]
- %189 = fcmp ogt float %185, 0.000000e+00 ; [#uses=1]
- br i1 %189, label %bb14, label %bb15
-
-bb14: ; preds = %bb.nph36
- %190 = load float** %186, align 4 ; [#uses=1]
- store float %187, float* %190, align 4
- %191 = load float** %188, align 4 ; [#uses=1]
- store float %185, float* %191, align 4
- %.pre42 = load float* %184, align 4 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb14, %bb.nph36
- %192 = phi float [ %.pre42, %bb14 ], [ %185, %bb.nph36 ] ; [#uses=2]
- %193 = fcmp ogt float %192, 0.000000e+00 ; [#uses=1]
- br i1 %193, label %bb14.1, label %bb15.1
-
-bb17: ; preds = %bb14.2, %bb15.1
- %194 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=1]
- %196 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 13 ; [#uses=1]
- store float %195, float* %196, align 4
- ret void
-
-bb15.1: ; preds = %bb14.1, %bb15
- %197 = phi float [ %.pre43, %bb14.1 ], [ %192, %bb15 ] ; [#uses=1]
- %198 = fcmp ogt float %197, 0.000000e+00 ; [#uses=1]
- br i1 %198, label %bb14.2, label %bb17
-
-bb14.1: ; preds = %bb15
- %199 = load float** %186, align 4 ; [#uses=1]
- %200 = load i32* %3, align 4 ; [#uses=1]
- %201 = getelementptr inbounds float* %199, i32 %200 ; [#uses=1]
- store float %187, float* %201, align 4
- %202 = load float** %188, align 4 ; [#uses=1]
- %203 = load i32* %3, align 4 ; [#uses=1]
- %204 = getelementptr inbounds float* %202, i32 %203 ; [#uses=1]
- store float %185, float* %204, align 4
- %.pre43 = load float* %184, align 4 ; [#uses=1]
- br label %bb15.1
-
-bb14.2: ; preds = %bb15.1
- %205 = load float** %186, align 4 ; [#uses=1]
- %206 = load i32* %3, align 4 ; [#uses=1]
- %207 = shl i32 %206, 1 ; [#uses=1]
- %208 = getelementptr inbounds float* %205, i32 %207 ; [#uses=1]
- store float %187, float* %208, align 4
- %209 = load float** %188, align 4 ; [#uses=1]
- %210 = load i32* %3, align 4 ; [#uses=1]
- %211 = shl i32 %210, 1 ; [#uses=1]
- %212 = getelementptr inbounds float* %209, i32 %211 ; [#uses=1]
- store float %185, float* %212, align 4
- br label %bb17
-}
-
-; [#uses=1]
-define void @_ZN23btPoint2PointConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btPoint2PointConstraint* nocapture %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %4 = load %struct.btRigidBody** %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN23btPoint2PointConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_(%struct.btPoint2PointConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %5, %struct.btTransform* %2) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btPoint2PointConstraint9updateRHSEf(%struct.btPoint2PointConstraint* nocapture %this, float %timeStep) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btPoint2PointConstraint8setParamEifi(%struct.btPoint2PointConstraint* nocapture %this, i32 %num, float %value, i32 %axis) nounwind align 2 {
-entry:
- %0 = icmp eq i32 %axis, -1 ; [#uses=1]
- br i1 %0, label %bb, label %return
-
-bb: ; preds = %entry
- switch i32 %num, label %return [
- i32 1, label %bb1
- i32 2, label %bb1
- i32 3, label %bb2
- i32 4, label %bb2
- ]
-
-bb1: ; preds = %bb, %bb
- %1 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store float %value, float* %1, align 4
- %2 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 4 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = or i32 %3, 1 ; [#uses=1]
- store i32 %4, i32* %2, align 4
- ret void
-
-bb2: ; preds = %bb, %bb
- %5 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float %value, float* %5, align 4
- %6 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 4 ; [#uses=2]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = or i32 %7, 2 ; [#uses=1]
- store i32 %8, i32* %6, align 4
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK23btPoint2PointConstraint8getParamEii(%struct.btPoint2PointConstraint* nocapture %this, i32 %num, i32 %axis) nounwind readonly align 2 {
-entry:
- %0 = icmp eq i32 %axis, -1 ; [#uses=1]
- br i1 %0, label %bb, label %bb3
-
-bb: ; preds = %entry
- switch i32 %num, label %bb3 [
- i32 1, label %bb1
- i32 2, label %bb1
- i32 3, label %bb2
- i32 4, label %bb2
- ]
-
-bb1: ; preds = %bb, %bb
- %1 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- ret float %2
-
-bb2: ; preds = %bb, %bb
- %3 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- ret float %4
-
-bb3: ; preds = %bb, %entry
- ret float 0x47EFFFFFE0000000
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK23btPoint2PointConstraint9serializeEPvP12btSerializer(%struct.btPoint2PointConstraint* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer(%struct.btTypedConstraint* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %2 to float* ; [#uses=1]
- %3 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %3, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 48 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %5 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %5, float* %4, align 4
- %scevgep.2.i = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 52 ; [#uses=1]
- %6 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %7 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %7, float* %6, align 4
- %scevgep.3.i = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 56 ; [#uses=1]
- %8 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %9 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %9, float* %8, align 4
- %10 = getelementptr inbounds i8* %dataBuffer, i32 60 ; [#uses=1]
- %scevgep.i2 = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3 = bitcast i8* %10 to float* ; [#uses=1]
- %11 = load float* %scevgep.i2, align 4 ; [#uses=1]
- store float %11, float* %scevgep4.i3, align 4
- %scevgep.1.i4 = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5 = getelementptr i8* %dataBuffer, i32 64 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.1.i5 to float* ; [#uses=1]
- %13 = load float* %scevgep.1.i4, align 4 ; [#uses=1]
- store float %13, float* %12, align 4
- %scevgep.2.i6 = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7 = getelementptr i8* %dataBuffer, i32 68 ; [#uses=1]
- %14 = bitcast i8* %scevgep4.2.i7 to float* ; [#uses=1]
- %15 = load float* %scevgep.2.i6, align 4 ; [#uses=1]
- store float %15, float* %14, align 4
- %scevgep.3.i8 = getelementptr %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9 = getelementptr i8* %dataBuffer, i32 72 ; [#uses=1]
- %16 = bitcast i8* %scevgep4.3.i9 to float* ; [#uses=1]
- %17 = load float* %scevgep.3.i8, align 4 ; [#uses=1]
- store float %17, float* %16, align 4
- ret i8* getelementptr inbounds ([33 x i8]* @.str518, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btPoint2PointConstraintD0Ev(%struct.btPoint2PointConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV23btPoint2PointConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btPoint2PointConstraint* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btPoint2PointConstraintD1Ev(%struct.btPoint2PointConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV23btPoint2PointConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btPoint2PointConstraintC2ER11btRigidBodyRK9btVector3(%struct.btPoint2PointConstraint* %this, %struct.btRigidBody* %rbA, %struct.btQuadWord* nocapture %pivotInA) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* %0, i32 3, %struct.btRigidBody* %rbA)
- %1 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV23btPoint2PointConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 0 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = load float* %3, align 4 ; [#uses=3]
- %17 = fmul float %15, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = load float* %6, align 4 ; [#uses=3]
- %21 = fmul float %19, %20 ; [#uses=1]
- %22 = fadd float %17, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load float* %9, align 4 ; [#uses=3]
- %26 = fmul float %24, %25 ; [#uses=1]
- %27 = fadd float %22, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fadd float %27, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fmul float %32, %16 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fmul float %35, %20 ; [#uses=1]
- %37 = fadd float %33, %36 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %25 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %41, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, %16 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fmul float %49, %20 ; [#uses=1]
- %51 = fadd float %47, %50 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = fmul float %53, %25 ; [#uses=1]
- %55 = fadd float %51, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fadd float %55, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %58, float* %59, align 4
- %60 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %44, float* %60, align 4
- %61 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %30, float* %61, align 4
- %62 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %62, align 4
- %63 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %63, align 4
- %64 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store i8 0, i8* %64, align 4
- %65 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 0 ; [#uses=1]
- store float 0x3FD3333340000000, float* %65, align 4
- %66 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %66, align 4
- %67 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btPoint2PointConstraintC1ER11btRigidBodyRK9btVector3(%struct.btPoint2PointConstraint* %this, %struct.btRigidBody* %rbA, %struct.btQuadWord* nocapture %pivotInA) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* %0, i32 3, %struct.btRigidBody* %rbA)
- %1 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV23btPoint2PointConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 0 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = load float* %3, align 4 ; [#uses=3]
- %17 = fmul float %15, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = load float* %6, align 4 ; [#uses=3]
- %21 = fmul float %19, %20 ; [#uses=1]
- %22 = fadd float %17, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = load float* %9, align 4 ; [#uses=3]
- %26 = fmul float %24, %25 ; [#uses=1]
- %27 = fadd float %22, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fadd float %27, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fmul float %32, %16 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fmul float %35, %20 ; [#uses=1]
- %37 = fadd float %33, %36 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %25 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fadd float %41, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, %16 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fmul float %49, %20 ; [#uses=1]
- %51 = fadd float %47, %50 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = fmul float %53, %25 ; [#uses=1]
- %55 = fadd float %51, %54 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fadd float %55, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %58, float* %59, align 4
- %60 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %44, float* %60, align 4
- %61 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %30, float* %61, align 4
- %62 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %62, align 4
- %63 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %63, align 4
- %64 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store i8 0, i8* %64, align 4
- %65 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 0 ; [#uses=1]
- store float 0x3FD3333340000000, float* %65, align 4
- %66 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %66, align 4
- %67 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN23btPoint2PointConstraintC1ER11btRigidBodyS1_RK9btVector3S4_(%struct.btPoint2PointConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %pivotInA, %struct.btQuadWord* nocapture %pivotInB) align 2 {
-bb2:
- %0 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 3, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV23btPoint2PointConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %pivotInA, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %pivotInB, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store i8 0, i8* %27, align 4
- %28 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 0 ; [#uses=1]
- store float 0x3FD3333340000000, float* %28, align 4
- %29 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btPoint2PointConstraint* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btConstraintSolver12prepareSolveEii(%struct.btActionInterface* nocapture %this, i32 %unnamed_arg, i32 %unnamed_arg2) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btConstraintSolver9allSolvedERK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc(%struct.btActionInterface* nocapture %this, %struct.btContactSolverInfo* nocapture %unnamed_arg, %struct.btActionInterface* nocapture %unnamed_arg2, %struct.btStackAlloc* nocapture %unnamed_arg4) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btConstraintSolverD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTV18btConstraintSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btConstraintSolverD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([8 x i32 (...)*]* @_ZTV18btConstraintSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=5]
-define void @_ZN35btSequentialImpulseConstraintSolver33resolveSingleConstraintRowGenericER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btSolverConstraint* %c) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 14 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 6 ; [#uses=4]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 15 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = fsub float %1, %6 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fmul float %9, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fadd float %12, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %20, %22 ; [#uses=1]
- %24 = fadd float %18, %23 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %26, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fmul float %31, %33 ; [#uses=1]
- %35 = fadd float %29, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %37, %39 ; [#uses=1]
- %41 = fadd float %35, %40 ; [#uses=1]
- %42 = fadd float %24, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %44, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %49, %51 ; [#uses=1]
- %53 = fadd float %47, %52 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fmul float %55, %57 ; [#uses=1]
- %59 = fadd float %53, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %9, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fmul float %14, %64 ; [#uses=1]
- %66 = fadd float %62, %65 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %20, %68 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = fsub float %59, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 8 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=2]
- %74 = fmul float %73, %42 ; [#uses=1]
- %75 = fsub float %7, %74 ; [#uses=1]
- %76 = fmul float %73, %71 ; [#uses=1]
- %77 = fsub float %75, %76 ; [#uses=2]
- %78 = fadd float %3, %77 ; [#uses=3]
- %79 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 16 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=3]
- %81 = fcmp ogt float %80, %78 ; [#uses=1]
- br i1 %81, label %bb, label %bb1
-
-bb: ; preds = %entry
- %82 = fsub float %80, %3 ; [#uses=1]
- store float %80, float* %2, align 4
- br label %bb4
-
-bb1: ; preds = %entry
- %83 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 17 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=3]
- %85 = fcmp olt float %84, %78 ; [#uses=1]
- br i1 %85, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %86 = fsub float %84, %3 ; [#uses=1]
- store float %84, float* %2, align 4
- br label %bb4
-
-bb3: ; preds = %bb1
- store float %78, float* %2, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2, %bb
- %deltaImpulse.0 = phi float [ %82, %bb ], [ %86, %bb2 ], [ %77, %bb3 ] ; [#uses=12]
- %87 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 4 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fcmp une float %88, 0.000000e+00 ; [#uses=1]
- br i1 %89, label %bb.i5, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit7
-
-bb.i5: ; preds = %bb4
- %90 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 0 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %90, align 4 ; [#uses=1]
- %94 = load float* %91, align 4 ; [#uses=1]
- %95 = load float* %92, align 4 ; [#uses=1]
- %96 = fmul float %9, %93 ; [#uses=1]
- %97 = fmul float %14, %94 ; [#uses=1]
- %98 = fmul float %20, %95 ; [#uses=1]
- %99 = fmul float %98, %deltaImpulse.0 ; [#uses=1]
- %100 = fmul float %97, %deltaImpulse.0 ; [#uses=1]
- %101 = fmul float %96, %deltaImpulse.0 ; [#uses=1]
- %102 = load float* %10, align 4 ; [#uses=1]
- %103 = fadd float %102, %101 ; [#uses=1]
- store float %103, float* %10, align 4
- %104 = load float* %15, align 4 ; [#uses=1]
- %105 = fadd float %104, %100 ; [#uses=1]
- store float %105, float* %15, align 4
- %106 = load float* %21, align 4 ; [#uses=1]
- %107 = fadd float %106, %99 ; [#uses=1]
- store float %107, float* %21, align 4
- %108 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %deltaImpulse.0 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fmul float %112, %deltaImpulse.0 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = fmul float %115, %deltaImpulse.0 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fmul float %118, %110 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- %122 = fmul float %121, %113 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- %125 = fmul float %124, %116 ; [#uses=1]
- %126 = load float* %27, align 4 ; [#uses=1]
- %127 = fadd float %126, %125 ; [#uses=1]
- store float %127, float* %27, align 4
- %128 = load float* %32, align 4 ; [#uses=1]
- %129 = fadd float %128, %122 ; [#uses=1]
- store float %129, float* %32, align 4
- %130 = load float* %38, align 4 ; [#uses=1]
- %131 = fadd float %130, %119 ; [#uses=1]
- store float %131, float* %38, align 4
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit7
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit7: ; preds = %bb.i5, %bb4
- %132 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 4 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- %134 = fcmp une float %133, 0.000000e+00 ; [#uses=1]
- br i1 %134, label %bb.i, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit
-
-bb.i: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit7
- %135 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 0 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 1 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 2 ; [#uses=1]
- %138 = load float* %8, align 4 ; [#uses=1]
- %139 = load float* %13, align 4 ; [#uses=1]
- %140 = load float* %19, align 4 ; [#uses=1]
- %141 = load float* %135, align 4 ; [#uses=1]
- %142 = load float* %136, align 4 ; [#uses=1]
- %143 = load float* %137, align 4 ; [#uses=1]
- %144 = fsub float -0.000000e+00, %138 ; [#uses=1]
- %145 = fsub float -0.000000e+00, %139 ; [#uses=1]
- %146 = fsub float -0.000000e+00, %140 ; [#uses=1]
- %147 = fmul float %141, %144 ; [#uses=1]
- %148 = fmul float %142, %145 ; [#uses=1]
- %149 = fmul float %143, %146 ; [#uses=1]
- %150 = fmul float %149, %deltaImpulse.0 ; [#uses=1]
- %151 = fmul float %148, %deltaImpulse.0 ; [#uses=1]
- %152 = fmul float %147, %deltaImpulse.0 ; [#uses=1]
- %153 = load float* %60, align 4 ; [#uses=1]
- %154 = fadd float %153, %152 ; [#uses=1]
- store float %154, float* %60, align 4
- %155 = load float* %63, align 4 ; [#uses=1]
- %156 = fadd float %155, %151 ; [#uses=1]
- store float %156, float* %63, align 4
- %157 = load float* %67, align 4 ; [#uses=1]
- %158 = fadd float %157, %150 ; [#uses=1]
- store float %158, float* %67, align 4
- %159 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=1]
- %161 = fmul float %160, %deltaImpulse.0 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %164 = fmul float %163, %deltaImpulse.0 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = fmul float %166, %deltaImpulse.0 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- %170 = fmul float %169, %161 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %172 = load float* %171, align 4 ; [#uses=1]
- %173 = fmul float %172, %164 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = fmul float %175, %167 ; [#uses=1]
- %177 = load float* %45, align 4 ; [#uses=1]
- %178 = fadd float %177, %176 ; [#uses=1]
- store float %178, float* %45, align 4
- %179 = load float* %50, align 4 ; [#uses=1]
- %180 = fadd float %179, %173 ; [#uses=1]
- store float %180, float* %50, align 4
- %181 = load float* %56, align 4 ; [#uses=1]
- %182 = fadd float %181, %170 ; [#uses=1]
- store float %182, float* %56, align 4
- ret void
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit7
- ret void
-}
-
-; [#uses=0]
-define void @_ZN35btSequentialImpulseConstraintSolver37resolveSingleConstraintRowGenericSIMDER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btSolverConstraint* %c) nounwind align 2 {
-entry:
- tail call void @_ZN35btSequentialImpulseConstraintSolver33resolveSingleConstraintRowGenericER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %body1, %struct.btRigidBody* %body2, %struct.btSolverConstraint* %c) nounwind
- ret void
-}
-
-; [#uses=3]
-define void @_ZN35btSequentialImpulseConstraintSolver36resolveSingleConstraintRowLowerLimitER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btSolverConstraint* nocapture %c) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 14 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 6 ; [#uses=2]
- %3 = load float* %2, align 4 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 15 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = fsub float %1, %6 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=3]
- %10 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fmul float %9, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fadd float %12, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fmul float %20, %22 ; [#uses=1]
- %24 = fadd float %18, %23 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fmul float %26, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fmul float %31, %33 ; [#uses=1]
- %35 = fadd float %29, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %37, %39 ; [#uses=1]
- %41 = fadd float %35, %40 ; [#uses=1]
- %42 = fadd float %24, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 0 ; [#uses=3]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %44, %46 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 1 ; [#uses=3]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %49, %51 ; [#uses=1]
- %53 = fadd float %47, %52 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 25, i32 0, i32 2 ; [#uses=3]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fmul float %55, %57 ; [#uses=1]
- %59 = fadd float %53, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 0 ; [#uses=3]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %9, %61 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 1 ; [#uses=3]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fmul float %14, %64 ; [#uses=1]
- %66 = fadd float %62, %65 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 24, i32 0, i32 2 ; [#uses=3]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %20, %68 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = fsub float %59, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 8 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=2]
- %74 = fmul float %73, %42 ; [#uses=1]
- %75 = fsub float %7, %74 ; [#uses=1]
- %76 = fmul float %73, %71 ; [#uses=1]
- %77 = fsub float %75, %76 ; [#uses=2]
- %78 = fadd float %3, %77 ; [#uses=2]
- %79 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 16 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=3]
- %81 = fcmp ogt float %80, %78 ; [#uses=1]
- br i1 %81, label %bb, label %bb2
-
-bb: ; preds = %entry
- %82 = fsub float %80, %3 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %storemerge = phi float [ %80, %bb ], [ %78, %entry ] ; [#uses=1]
- %deltaImpulse.0 = phi float [ %82, %bb ], [ %77, %entry ] ; [#uses=12]
- store float %storemerge, float* %2, align 4
- %83 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 4 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = fcmp une float %84, 0.000000e+00 ; [#uses=1]
- br i1 %85, label %bb.i3, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit5
-
-bb.i3: ; preds = %bb2
- %86 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 1 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %86, align 4 ; [#uses=1]
- %90 = load float* %87, align 4 ; [#uses=1]
- %91 = load float* %88, align 4 ; [#uses=1]
- %92 = fmul float %9, %89 ; [#uses=1]
- %93 = fmul float %14, %90 ; [#uses=1]
- %94 = fmul float %20, %91 ; [#uses=1]
- %95 = fmul float %94, %deltaImpulse.0 ; [#uses=1]
- %96 = fmul float %93, %deltaImpulse.0 ; [#uses=1]
- %97 = fmul float %92, %deltaImpulse.0 ; [#uses=1]
- %98 = load float* %10, align 4 ; [#uses=1]
- %99 = fadd float %98, %97 ; [#uses=1]
- store float %99, float* %10, align 4
- %100 = load float* %15, align 4 ; [#uses=1]
- %101 = fadd float %100, %96 ; [#uses=1]
- store float %101, float* %15, align 4
- %102 = load float* %21, align 4 ; [#uses=1]
- %103 = fadd float %102, %95 ; [#uses=1]
- store float %103, float* %21, align 4
- %104 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %105, %deltaImpulse.0 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = fmul float %108, %deltaImpulse.0 ; [#uses=1]
- %110 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- %112 = fmul float %111, %deltaImpulse.0 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=1]
- %115 = fmul float %114, %106 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = fmul float %117, %109 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fmul float %120, %112 ; [#uses=1]
- %122 = load float* %27, align 4 ; [#uses=1]
- %123 = fadd float %122, %121 ; [#uses=1]
- store float %123, float* %27, align 4
- %124 = load float* %32, align 4 ; [#uses=1]
- %125 = fadd float %124, %118 ; [#uses=1]
- store float %125, float* %32, align 4
- %126 = load float* %38, align 4 ; [#uses=1]
- %127 = fadd float %126, %115 ; [#uses=1]
- store float %127, float* %38, align 4
- br label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit5
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit5: ; preds = %bb.i3, %bb2
- %128 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 4 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=1]
- %130 = fcmp une float %129, 0.000000e+00 ; [#uses=1]
- br i1 %130, label %bb.i, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit
-
-bb.i: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit5
- %131 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 0 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 1 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 2 ; [#uses=1]
- %134 = load float* %8, align 4 ; [#uses=1]
- %135 = load float* %13, align 4 ; [#uses=1]
- %136 = load float* %19, align 4 ; [#uses=1]
- %137 = load float* %131, align 4 ; [#uses=1]
- %138 = load float* %132, align 4 ; [#uses=1]
- %139 = load float* %133, align 4 ; [#uses=1]
- %140 = fsub float -0.000000e+00, %134 ; [#uses=1]
- %141 = fsub float -0.000000e+00, %135 ; [#uses=1]
- %142 = fsub float -0.000000e+00, %136 ; [#uses=1]
- %143 = fmul float %137, %140 ; [#uses=1]
- %144 = fmul float %138, %141 ; [#uses=1]
- %145 = fmul float %139, %142 ; [#uses=1]
- %146 = fmul float %145, %deltaImpulse.0 ; [#uses=1]
- %147 = fmul float %144, %deltaImpulse.0 ; [#uses=1]
- %148 = fmul float %143, %deltaImpulse.0 ; [#uses=1]
- %149 = load float* %60, align 4 ; [#uses=1]
- %150 = fadd float %149, %148 ; [#uses=1]
- store float %150, float* %60, align 4
- %151 = load float* %63, align 4 ; [#uses=1]
- %152 = fadd float %151, %147 ; [#uses=1]
- store float %152, float* %63, align 4
- %153 = load float* %67, align 4 ; [#uses=1]
- %154 = fadd float %153, %146 ; [#uses=1]
- store float %154, float* %67, align 4
- %155 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- %157 = fmul float %156, %deltaImpulse.0 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fmul float %159, %deltaImpulse.0 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fmul float %162, %deltaImpulse.0 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=1]
- %166 = fmul float %165, %157 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %168 = load float* %167, align 4 ; [#uses=1]
- %169 = fmul float %168, %160 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = fmul float %171, %163 ; [#uses=1]
- %173 = load float* %45, align 4 ; [#uses=1]
- %174 = fadd float %173, %172 ; [#uses=1]
- store float %174, float* %45, align 4
- %175 = load float* %50, align 4 ; [#uses=1]
- %176 = fadd float %175, %169 ; [#uses=1]
- store float %176, float* %50, align 4
- %177 = load float* %56, align 4 ; [#uses=1]
- %178 = fadd float %177, %166 ; [#uses=1]
- store float %178, float* %56, align 4
- ret void
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit: ; preds = %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit5
- ret void
-}
-
-; [#uses=0]
-define void @_ZN35btSequentialImpulseConstraintSolver40resolveSingleConstraintRowLowerLimitSIMDER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btSolverConstraint* nocapture %c) nounwind align 2 {
-entry:
- tail call void @_ZN35btSequentialImpulseConstraintSolver36resolveSingleConstraintRowLowerLimitER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %body1, %struct.btRigidBody* %body2, %struct.btSolverConstraint* %c) nounwind
- ret void
-}
-
-; [#uses=3]
-define void @_ZN35btSequentialImpulseConstraintSolver43resolveSplitPenetrationImpulseCacheFriendlyER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btSolverConstraint* nocapture %c) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 18 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fcmp une float %1, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %bb, label %_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit
-
-bb: ; preds = %entry
- %3 = load i32* @gNumSplitImpulseRecoveries, align 4 ; [#uses=1]
- %4 = add nsw i32 %3, 1 ; [#uses=1]
- store i32 %4, i32* @gNumSplitImpulseRecoveries, align 4
- %5 = load float* %0, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 5 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 15 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = fmul float %7, %9 ; [#uses=1]
- %11 = fsub float %5, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 28, i32 0, i32 0 ; [#uses=3]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fmul float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 28, i32 0, i32 1 ; [#uses=3]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fmul float %18, %20 ; [#uses=1]
- %22 = fadd float %16, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=3]
- %25 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 28, i32 0, i32 2 ; [#uses=3]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fmul float %24, %26 ; [#uses=1]
- %28 = fadd float %22, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 29, i32 0, i32 0 ; [#uses=3]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fmul float %30, %32 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 29, i32 0, i32 1 ; [#uses=3]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fmul float %35, %37 ; [#uses=1]
- %39 = fadd float %33, %38 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 29, i32 0, i32 2 ; [#uses=3]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fmul float %41, %43 ; [#uses=1]
- %45 = fadd float %39, %44 ; [#uses=1]
- %46 = fadd float %28, %45 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 29, i32 0, i32 0 ; [#uses=3]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %48, %50 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 29, i32 0, i32 1 ; [#uses=3]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %53, %55 ; [#uses=1]
- %57 = fadd float %51, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 29, i32 0, i32 2 ; [#uses=3]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %59, %61 ; [#uses=1]
- %63 = fadd float %57, %62 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 28, i32 0, i32 0 ; [#uses=3]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = fmul float %13, %65 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 28, i32 0, i32 1 ; [#uses=3]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %18, %68 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 28, i32 0, i32 2 ; [#uses=3]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %24, %72 ; [#uses=1]
- %74 = fadd float %70, %73 ; [#uses=1]
- %75 = fsub float %63, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 8 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=2]
- %78 = fmul float %77, %46 ; [#uses=1]
- %79 = fsub float %11, %78 ; [#uses=1]
- %80 = fmul float %77, %75 ; [#uses=1]
- %81 = fsub float %79, %80 ; [#uses=2]
- %82 = fadd float %7, %81 ; [#uses=2]
- %83 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 16 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=3]
- %85 = fcmp ogt float %84, %82 ; [#uses=1]
- br i1 %85, label %bb1, label %bb3
-
-bb1: ; preds = %bb
- %86 = fsub float %84, %7 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb1, %bb
- %storemerge = phi float [ %84, %bb1 ], [ %82, %bb ] ; [#uses=1]
- %deltaImpulse.0 = phi float [ %86, %bb1 ], [ %81, %bb ] ; [#uses=12]
- store float %storemerge, float* %6, align 4
- %87 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 4 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fcmp une float %88, 0.000000e+00 ; [#uses=1]
- br i1 %89, label %bb.i5, label %_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit7
-
-bb.i5: ; preds = %bb3
- %90 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 0 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 27, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %90, align 4 ; [#uses=1]
- %94 = load float* %91, align 4 ; [#uses=1]
- %95 = load float* %92, align 4 ; [#uses=1]
- %96 = fmul float %13, %93 ; [#uses=1]
- %97 = fmul float %18, %94 ; [#uses=1]
- %98 = fmul float %24, %95 ; [#uses=1]
- %99 = fmul float %98, %deltaImpulse.0 ; [#uses=1]
- %100 = fmul float %97, %deltaImpulse.0 ; [#uses=1]
- %101 = fmul float %96, %deltaImpulse.0 ; [#uses=1]
- %102 = load float* %14, align 4 ; [#uses=1]
- %103 = fadd float %102, %101 ; [#uses=1]
- store float %103, float* %14, align 4
- %104 = load float* %19, align 4 ; [#uses=1]
- %105 = fadd float %104, %100 ; [#uses=1]
- store float %105, float* %19, align 4
- %106 = load float* %25, align 4 ; [#uses=1]
- %107 = fadd float %106, %99 ; [#uses=1]
- store float %107, float* %25, align 4
- %108 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = fmul float %109, %deltaImpulse.0 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %112 = load float* %111, align 4 ; [#uses=1]
- %113 = fmul float %112, %deltaImpulse.0 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = fmul float %115, %deltaImpulse.0 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fmul float %118, %110 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- %122 = fmul float %121, %113 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- %125 = fmul float %124, %116 ; [#uses=1]
- %126 = load float* %31, align 4 ; [#uses=1]
- %127 = fadd float %126, %125 ; [#uses=1]
- store float %127, float* %31, align 4
- %128 = load float* %36, align 4 ; [#uses=1]
- %129 = fadd float %128, %122 ; [#uses=1]
- store float %129, float* %36, align 4
- %130 = load float* %42, align 4 ; [#uses=1]
- %131 = fadd float %130, %119 ; [#uses=1]
- store float %131, float* %42, align 4
- br label %_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit7
-
-_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit7: ; preds = %bb.i5, %bb3
- %132 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 4 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- %134 = fcmp une float %133, 0.000000e+00 ; [#uses=1]
- br i1 %134, label %bb.i, label %_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit
-
-bb.i: ; preds = %_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit7
- %135 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 0 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 1 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 27, i32 0, i32 2 ; [#uses=1]
- %138 = load float* %12, align 4 ; [#uses=1]
- %139 = load float* %17, align 4 ; [#uses=1]
- %140 = load float* %23, align 4 ; [#uses=1]
- %141 = load float* %135, align 4 ; [#uses=1]
- %142 = load float* %136, align 4 ; [#uses=1]
- %143 = load float* %137, align 4 ; [#uses=1]
- %144 = fsub float -0.000000e+00, %138 ; [#uses=1]
- %145 = fsub float -0.000000e+00, %139 ; [#uses=1]
- %146 = fsub float -0.000000e+00, %140 ; [#uses=1]
- %147 = fmul float %141, %144 ; [#uses=1]
- %148 = fmul float %142, %145 ; [#uses=1]
- %149 = fmul float %143, %146 ; [#uses=1]
- %150 = fmul float %149, %deltaImpulse.0 ; [#uses=1]
- %151 = fmul float %148, %deltaImpulse.0 ; [#uses=1]
- %152 = fmul float %147, %deltaImpulse.0 ; [#uses=1]
- %153 = load float* %64, align 4 ; [#uses=1]
- %154 = fadd float %153, %152 ; [#uses=1]
- store float %154, float* %64, align 4
- %155 = load float* %67, align 4 ; [#uses=1]
- %156 = fadd float %155, %151 ; [#uses=1]
- store float %156, float* %67, align 4
- %157 = load float* %71, align 4 ; [#uses=1]
- %158 = fadd float %157, %150 ; [#uses=1]
- store float %158, float* %71, align 4
- %159 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=1]
- %161 = fmul float %160, %deltaImpulse.0 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %164 = fmul float %163, %deltaImpulse.0 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = fmul float %166, %deltaImpulse.0 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- %170 = fmul float %169, %161 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %172 = load float* %171, align 4 ; [#uses=1]
- %173 = fmul float %172, %164 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btSolverConstraint* %c, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = fmul float %175, %167 ; [#uses=1]
- %177 = load float* %49, align 4 ; [#uses=1]
- %178 = fadd float %177, %176 ; [#uses=1]
- store float %178, float* %49, align 4
- %179 = load float* %54, align 4 ; [#uses=1]
- %180 = fadd float %179, %173 ; [#uses=1]
- store float %180, float* %54, align 4
- %181 = load float* %60, align 4 ; [#uses=1]
- %182 = fadd float %181, %170 ; [#uses=1]
- store float %182, float* %60, align 4
- ret void
-
-_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit: ; preds = %_ZN11btRigidBody24internalApplyPushImpulseERK9btVector3S2_f.exit7, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN35btSequentialImpulseConstraintSolver27resolveSplitPenetrationSIMDER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btSolverConstraint* nocapture %c) nounwind align 2 {
-entry:
- tail call void @_ZN35btSequentialImpulseConstraintSolver43resolveSplitPenetrationImpulseCacheFriendlyER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %body1, %struct.btRigidBody* %body2, %struct.btSolverConstraint* %c) nounwind
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN35btSequentialImpulseConstraintSolver7btRand2Ev(%struct.btSequentialImpulseConstraintSolver* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 7 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = mul i32 %1, 1664525 ; [#uses=1]
- %3 = add i32 %2, 1013904223 ; [#uses=2]
- store i32 %3, i32* %0, align 4
- ret i32 %3
-}
-
-; [#uses=0]
-define i32 @_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei(%struct.btSequentialImpulseConstraintSolver* nocapture %this, i32 %n) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 7 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = mul i32 %1, 1664525 ; [#uses=1]
- %3 = add i32 %2, 1013904223 ; [#uses=4]
- store i32 %3, i32* %0, align 4
- %4 = icmp ult i32 %n, 65537 ; [#uses=1]
- br i1 %4, label %bb, label %bb5
-
-bb: ; preds = %entry
- %5 = lshr i32 %3, 16 ; [#uses=1]
- %6 = xor i32 %5, %3 ; [#uses=3]
- %7 = icmp ult i32 %n, 257 ; [#uses=1]
- br i1 %7, label %bb1, label %bb5
-
-bb1: ; preds = %bb
- %8 = lshr i32 %6, 8 ; [#uses=1]
- %9 = xor i32 %8, %6 ; [#uses=3]
- %10 = icmp ult i32 %n, 17 ; [#uses=1]
- br i1 %10, label %bb2, label %bb5
-
-bb2: ; preds = %bb1
- %11 = lshr i32 %9, 4 ; [#uses=1]
- %12 = xor i32 %11, %9 ; [#uses=3]
- %13 = icmp ult i32 %n, 5 ; [#uses=1]
- br i1 %13, label %bb3, label %bb5
-
-bb3: ; preds = %bb2
- %14 = lshr i32 %12, 2 ; [#uses=1]
- %15 = xor i32 %14, %12 ; [#uses=3]
- %16 = icmp ult i32 %n, 3 ; [#uses=1]
- br i1 %16, label %bb4, label %bb5
-
-bb4: ; preds = %bb3
- %17 = lshr i32 %15, 1 ; [#uses=1]
- %18 = xor i32 %17, %15 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3, %bb2, %bb1, %bb, %entry
- %r.0 = phi i32 [ %18, %bb4 ], [ %15, %bb3 ], [ %12, %bb2 ], [ %9, %bb1 ], [ %6, %bb ], [ %3, %entry ] ; [#uses=1]
- %19 = urem i32 %r.0, %n ; [#uses=1]
- ret i32 %19
-}
-
-; [#uses=0]
-define float @_ZN35btSequentialImpulseConstraintSolver16restitutionCurveEff(%struct.btSequentialImpulseConstraintSolver* nocapture %this, float %rel_vel, float %restitution) nounwind readnone align 2 {
-entry:
- %0 = fsub float -0.000000e+00, %rel_vel ; [#uses=1]
- %1 = fmul float %0, %restitution ; [#uses=1]
- ret float %1
-}
-
-; [#uses=8]
-define void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %colObj, %struct.btQuadWord* nocapture %frictionDirection) nounwind {
-entry:
- %0 = icmp eq %struct.btCollisionObject* %colObj, null ; [#uses=1]
- br i1 %0, label %bb5, label %bb
-
-bb: ; preds = %entry
- %1 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 6 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb5, label %bb8
-
-bb5: ; preds = %bb, %entry
- ret void
-
-bb8: ; preds = %bb
- %4 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %frictionDirection, i32 0, i32 0, i32 0 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = fmul float %5, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuadWord* %frictionDirection, i32 0, i32 0, i32 1 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=3]
- %13 = fmul float %10, %12 ; [#uses=1]
- %14 = fadd float %8, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btQuadWord* %frictionDirection, i32 0, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fadd float %14, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fmul float %22, %7 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = fmul float %25, %12 ; [#uses=1]
- %27 = fadd float %23, %26 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=2]
- %30 = fmul float %29, %18 ; [#uses=1]
- %31 = fadd float %27, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = fmul float %33, %7 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %36, %12 ; [#uses=1]
- %38 = fadd float %34, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=2]
- %41 = fmul float %40, %18 ; [#uses=1]
- %42 = fadd float %38, %41 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fmul float %42, %44 ; [#uses=3]
- %46 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fmul float %31, %47 ; [#uses=3]
- %49 = getelementptr inbounds %struct.btCollisionObject* %colObj, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %20, %50 ; [#uses=3]
- %52 = fmul float %40, %45 ; [#uses=1]
- %53 = fmul float %29, %48 ; [#uses=1]
- %54 = fadd float %52, %53 ; [#uses=1]
- %55 = fmul float %16, %51 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %36, %45 ; [#uses=1]
- %58 = fmul float %25, %48 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = fmul float %10, %51 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %33, %45 ; [#uses=1]
- %63 = fmul float %22, %48 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %5, %51 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- store float %66, float* %6, align 4
- store float %61, float* %11, align 4
- store float %56, float* %17, align 4
- %67 = getelementptr inbounds %struct.btQuadWord* %frictionDirection, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %67, align 4
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN35btSequentialImpulseConstraintSolver19getOrInitSolverBodyER17btCollisionObject(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btCollisionObject* nocapture %body) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolver22setupContactConstraintER18btSolverConstraintP17btCollisionObjectS3_R15btManifoldPointRK19btContactSolverInfoR9btVector3RfSB_SA_SA_(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btSolverConstraint* %solverConstraint, %struct.btCollisionObject* %colObj0, %struct.btCollisionObject* %colObj1, %struct.btManifoldPoint* nocapture %cp, %struct.btContactSolverInfo* nocapture %infoGlobal, %struct.btQuadWord* nocapture %vel, float* nocapture %rel_vel, float* nocapture %relaxation, %struct.btQuadWord* nocapture %rel_pos1, %struct.btQuadWord* nocapture %rel_pos2) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 19 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %.lobit.i = and i32 %1, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool.i, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit, label %bb.i
-
-bb.i: ; preds = %entry
- %2 = bitcast %struct.btCollisionObject* %colObj0 to %struct.btRigidBody* ; [#uses=1]
- br label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit: ; preds = %bb.i, %entry
- %3 = phi %struct.btRigidBody* [ %2, %bb.i ], [ null, %entry ] ; [#uses=39]
- %4 = getelementptr inbounds %struct.btCollisionObject* %colObj1, i32 0, i32 19 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %.lobit.i66 = and i32 %5, 2 ; [#uses=1]
- %toBool.i67 = icmp eq i32 %.lobit.i66, 0 ; [#uses=1]
- br i1 %toBool.i67, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit70, label %bb.i68
-
-bb.i68: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %6 = bitcast %struct.btCollisionObject* %colObj1 to %struct.btRigidBody* ; [#uses=1]
- br label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit70
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit70: ; preds = %bb.i68, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %7 = phi %struct.btRigidBody* [ %6, %bb.i68 ], [ null, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit ] ; [#uses=39]
- %8 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fsub float %9, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %14, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fsub float %19, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 0 ; [#uses=5]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 1 ; [#uses=5]
- store float %17, float* %24, align 4
- %25 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 2 ; [#uses=5]
- store float %12, float* %25, align 4
- %26 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCollisionObject* %colObj1, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fsub float %28, %30 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btCollisionObject* %colObj1, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = fsub float %33, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btCollisionObject* %colObj1, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fsub float %38, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 0 ; [#uses=5]
- store float %41, float* %42, align 4
- %43 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 1 ; [#uses=5]
- store float %36, float* %43, align 4
- %44 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 2 ; [#uses=5]
- store float %31, float* %44, align 4
- %45 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- store float 1.000000e+00, float* %relaxation, align 4
- %46 = load float* %23, align 4 ; [#uses=2]
- %47 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 1 ; [#uses=8]
- %48 = load float* %47, align 4 ; [#uses=2]
- %49 = fmul float %46, %48 ; [#uses=1]
- %50 = load float* %24, align 4 ; [#uses=2]
- %51 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 0 ; [#uses=8]
- %52 = load float* %51, align 4 ; [#uses=2]
- %53 = fmul float %50, %52 ; [#uses=1]
- %54 = fsub float %49, %53 ; [#uses=3]
- %55 = load float* %25, align 4 ; [#uses=2]
- %56 = fmul float %55, %52 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 2 ; [#uses=8]
- %58 = load float* %57, align 4 ; [#uses=2]
- %59 = fmul float %46, %58 ; [#uses=1]
- %60 = fsub float %56, %59 ; [#uses=3]
- %61 = fmul float %50, %58 ; [#uses=1]
- %62 = fmul float %55, %48 ; [#uses=1]
- %63 = fsub float %61, %62 ; [#uses=3]
- %64 = icmp eq %struct.btRigidBody* %3, null ; [#uses=6]
- br i1 %64, label %bb3, label %bb
-
-bb: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit70
- %65 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fmul float %66, %63 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fmul float %69, %60 ; [#uses=1]
- %71 = fadd float %67, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fmul float %73, %54 ; [#uses=1]
- %75 = fadd float %71, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fmul float %77, %63 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fmul float %80, %60 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = fmul float %84, %54 ; [#uses=1]
- %86 = fadd float %82, %85 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fmul float %88, %63 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %91, %60 ; [#uses=1]
- %93 = fadd float %89, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fmul float %95, %54 ; [#uses=1]
- %97 = fadd float %93, %96 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fmul float %75, %99 ; [#uses=2]
- %101 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fmul float %86, %102 ; [#uses=2]
- %104 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fmul float %97, %105 ; [#uses=2]
- %107 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %106, float* %107, align 4
- %108 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %103, float* %108, align 4
- %109 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %100, float* %109, align 4
- %110 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %110, align 4
- br label %bb4
-
-bb3: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit70
- %111 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- %112 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %112, align 4
- %113 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 4
- %114 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %114, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %bb
- %115 = phi float [ 0.000000e+00, %bb3 ], [ %100, %bb ] ; [#uses=2]
- %116 = phi float [ 0.000000e+00, %bb3 ], [ %103, %bb ] ; [#uses=2]
- %117 = phi float [ 0.000000e+00, %bb3 ], [ %106, %bb ] ; [#uses=2]
- %118 = load float* %42, align 4 ; [#uses=2]
- %119 = load float* %47, align 4 ; [#uses=2]
- %120 = load float* %43, align 4 ; [#uses=2]
- %121 = load float* %51, align 4 ; [#uses=2]
- %122 = load float* %44, align 4 ; [#uses=2]
- %123 = load float* %57, align 4 ; [#uses=2]
- %124 = icmp eq %struct.btRigidBody* %7, null ; [#uses=6]
- br i1 %124, label %bb7, label %bb5
-
-bb5: ; preds = %bb4
- %125 = fmul float %122, %119 ; [#uses=1]
- %126 = fmul float %120, %123 ; [#uses=1]
- %127 = fmul float %118, %123 ; [#uses=1]
- %128 = fmul float %122, %121 ; [#uses=1]
- %129 = fmul float %120, %121 ; [#uses=1]
- %130 = fmul float %118, %119 ; [#uses=1]
- %131 = fsub float %126, %125 ; [#uses=1]
- %132 = fsub float %128, %127 ; [#uses=1]
- %133 = fsub float %130, %129 ; [#uses=1]
- %134 = fsub float -0.000000e+00, %133 ; [#uses=3]
- %135 = fsub float -0.000000e+00, %132 ; [#uses=3]
- %136 = fsub float -0.000000e+00, %131 ; [#uses=3]
- %137 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- %139 = fmul float %138, %136 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = fmul float %141, %135 ; [#uses=1]
- %143 = fadd float %139, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = fmul float %145, %134 ; [#uses=1]
- %147 = fadd float %143, %146 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=1]
- %150 = fmul float %149, %136 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=1]
- %153 = fmul float %152, %135 ; [#uses=1]
- %154 = fadd float %150, %153 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- %157 = fmul float %156, %134 ; [#uses=1]
- %158 = fadd float %154, %157 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=1]
- %161 = fmul float %160, %136 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %164 = fmul float %163, %135 ; [#uses=1]
- %165 = fadd float %161, %164 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %167 = load float* %166, align 4 ; [#uses=1]
- %168 = fmul float %167, %134 ; [#uses=1]
- %169 = fadd float %165, %168 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = fmul float %147, %171 ; [#uses=2]
- %173 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %174 = load float* %173, align 4 ; [#uses=1]
- %175 = fmul float %158, %174 ; [#uses=2]
- %176 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=1]
- %178 = fmul float %169, %177 ; [#uses=2]
- %179 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %178, float* %179, align 4
- %180 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %175, float* %180, align 4
- %181 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %172, float* %181, align 4
- %182 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %182, align 4
- br label %bb8
-
-bb7: ; preds = %bb4
- %183 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %183, align 4
- %184 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %184, align 4
- %185 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %185, align 4
- %186 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %186, align 4
- br label %bb8
-
-bb8: ; preds = %bb7, %bb5
- %187 = phi float [ 0.000000e+00, %bb7 ], [ %178, %bb5 ] ; [#uses=1]
- %188 = phi float [ 0.000000e+00, %bb7 ], [ %175, %bb5 ] ; [#uses=1]
- %189 = phi float [ 0.000000e+00, %bb7 ], [ %172, %bb5 ] ; [#uses=1]
- br i1 %64, label %bb15, label %bb13
-
-bb13: ; preds = %bb8
- %190 = load float* %24, align 4 ; [#uses=2]
- %191 = fmul float %117, %190 ; [#uses=1]
- %192 = load float* %23, align 4 ; [#uses=2]
- %193 = fmul float %116, %192 ; [#uses=1]
- %194 = fsub float %191, %193 ; [#uses=1]
- %195 = fmul float %115, %192 ; [#uses=1]
- %196 = load float* %25, align 4 ; [#uses=2]
- %197 = fmul float %117, %196 ; [#uses=1]
- %198 = fsub float %195, %197 ; [#uses=1]
- %199 = fmul float %116, %196 ; [#uses=1]
- %200 = fmul float %115, %190 ; [#uses=1]
- %201 = fsub float %199, %200 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 4 ; [#uses=1]
- %203 = load float* %202, align 4 ; [#uses=1]
- %204 = load float* %51, align 4 ; [#uses=1]
- %205 = fmul float %204, %201 ; [#uses=1]
- %206 = load float* %47, align 4 ; [#uses=1]
- %207 = fmul float %206, %198 ; [#uses=1]
- %208 = fadd float %205, %207 ; [#uses=1]
- %209 = load float* %57, align 4 ; [#uses=1]
- %210 = fmul float %209, %194 ; [#uses=1]
- %211 = fadd float %208, %210 ; [#uses=1]
- %212 = fadd float %203, %211 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb13, %bb8
- %denom0.0 = phi float [ %212, %bb13 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- br i1 %124, label %bb18, label %bb16
-
-bb16: ; preds = %bb15
- %213 = fsub float -0.000000e+00, %189 ; [#uses=2]
- %214 = fsub float -0.000000e+00, %188 ; [#uses=2]
- %215 = fsub float -0.000000e+00, %187 ; [#uses=2]
- %216 = load float* %43, align 4 ; [#uses=2]
- %217 = fmul float %216, %215 ; [#uses=1]
- %218 = load float* %42, align 4 ; [#uses=2]
- %219 = fmul float %218, %214 ; [#uses=1]
- %220 = fsub float %217, %219 ; [#uses=1]
- %221 = fmul float %218, %213 ; [#uses=1]
- %222 = load float* %44, align 4 ; [#uses=2]
- %223 = fmul float %222, %215 ; [#uses=1]
- %224 = fsub float %221, %223 ; [#uses=1]
- %225 = fmul float %222, %214 ; [#uses=1]
- %226 = fmul float %216, %213 ; [#uses=1]
- %227 = fsub float %225, %226 ; [#uses=1]
- %228 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 4 ; [#uses=1]
- %229 = load float* %228, align 4 ; [#uses=1]
- %230 = load float* %51, align 4 ; [#uses=1]
- %231 = fmul float %230, %227 ; [#uses=1]
- %232 = load float* %47, align 4 ; [#uses=1]
- %233 = fmul float %232, %224 ; [#uses=1]
- %234 = fadd float %231, %233 ; [#uses=1]
- %235 = load float* %57, align 4 ; [#uses=1]
- %236 = fmul float %235, %220 ; [#uses=1]
- %237 = fadd float %234, %236 ; [#uses=1]
- %238 = fadd float %229, %237 ; [#uses=1]
- br label %bb18
-
-bb18: ; preds = %bb16, %bb15
- %denom1.0 = phi float [ %238, %bb16 ], [ 0.000000e+00, %bb15 ] ; [#uses=1]
- %239 = load float* %relaxation, align 4 ; [#uses=1]
- %240 = fadd float %denom0.0, %denom1.0 ; [#uses=1]
- %241 = fdiv float %239, %240 ; [#uses=1]
- %242 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 8 ; [#uses=2]
- store float %241, float* %242, align 4
- %243 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 0 ; [#uses=4]
- %244 = load float* %51, align 4 ; [#uses=1]
- store float %244, float* %243, align 4
- %245 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 1 ; [#uses=4]
- %246 = load float* %47, align 4 ; [#uses=1]
- store float %246, float* %245, align 4
- %247 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 2 ; [#uses=4]
- %248 = load float* %57, align 4 ; [#uses=1]
- store float %248, float* %247, align 4
- %249 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %250 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %251 = load float* %250, align 4 ; [#uses=1]
- store float %251, float* %249, align 4
- %252 = load float* %23, align 4 ; [#uses=2]
- %253 = load float* %47, align 4 ; [#uses=2]
- %254 = fmul float %252, %253 ; [#uses=1]
- %255 = load float* %24, align 4 ; [#uses=2]
- %256 = load float* %51, align 4 ; [#uses=2]
- %257 = fmul float %255, %256 ; [#uses=1]
- %258 = fsub float %254, %257 ; [#uses=1]
- %259 = load float* %25, align 4 ; [#uses=2]
- %260 = fmul float %259, %256 ; [#uses=1]
- %261 = load float* %57, align 4 ; [#uses=2]
- %262 = fmul float %252, %261 ; [#uses=1]
- %263 = fsub float %260, %262 ; [#uses=1]
- %264 = fmul float %255, %261 ; [#uses=1]
- %265 = fmul float %259, %253 ; [#uses=1]
- %266 = fsub float %264, %265 ; [#uses=1]
- %267 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- store float %266, float* %267, align 4
- %268 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %263, float* %268, align 4
- %269 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- store float %258, float* %269, align 4
- %270 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %270, align 4
- %271 = load float* %57, align 4 ; [#uses=1]
- %272 = fsub float -0.000000e+00, %271 ; [#uses=2]
- %273 = load float* %47, align 4 ; [#uses=1]
- %274 = fsub float -0.000000e+00, %273 ; [#uses=2]
- %275 = load float* %51, align 4 ; [#uses=1]
- %276 = fsub float -0.000000e+00, %275 ; [#uses=2]
- %277 = load float* %42, align 4 ; [#uses=2]
- %278 = fmul float %277, %274 ; [#uses=1]
- %279 = load float* %43, align 4 ; [#uses=2]
- %280 = fmul float %279, %276 ; [#uses=1]
- %281 = fsub float %278, %280 ; [#uses=1]
- %282 = load float* %44, align 4 ; [#uses=2]
- %283 = fmul float %282, %276 ; [#uses=1]
- %284 = fmul float %277, %272 ; [#uses=1]
- %285 = fsub float %283, %284 ; [#uses=1]
- %286 = fmul float %279, %272 ; [#uses=1]
- %287 = fmul float %282, %274 ; [#uses=1]
- %288 = fsub float %286, %287 ; [#uses=1]
- %289 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float %288, float* %289, align 4
- %290 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float %285, float* %290, align 4
- %291 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float %281, float* %291, align 4
- %292 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %292, align 4
- br i1 %64, label %bb23, label %bb21
-
-bb21: ; preds = %bb18
- %293 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %294 = load float* %293, align 4 ; [#uses=2]
- %295 = load float* %24, align 4 ; [#uses=2]
- %296 = fmul float %294, %295 ; [#uses=1]
- %297 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %298 = load float* %297, align 4 ; [#uses=2]
- %299 = load float* %23, align 4 ; [#uses=2]
- %300 = fmul float %298, %299 ; [#uses=1]
- %301 = fsub float %296, %300 ; [#uses=1]
- %302 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %303 = load float* %302, align 4 ; [#uses=2]
- %304 = fmul float %303, %299 ; [#uses=1]
- %305 = load float* %25, align 4 ; [#uses=2]
- %306 = fmul float %294, %305 ; [#uses=1]
- %307 = fsub float %304, %306 ; [#uses=1]
- %308 = fmul float %298, %305 ; [#uses=1]
- %309 = fmul float %303, %295 ; [#uses=1]
- %310 = fsub float %308, %309 ; [#uses=1]
- %311 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %312 = load float* %311, align 4 ; [#uses=1]
- %313 = fadd float %312, %301 ; [#uses=1]
- %314 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %315 = load float* %314, align 4 ; [#uses=1]
- %316 = fadd float %315, %307 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %318 = load float* %317, align 4 ; [#uses=1]
- %319 = fadd float %318, %310 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb21, %bb18
- %vel1.0.0.0 = phi float [ %319, %bb21 ], [ 0.000000e+00, %bb18 ] ; [#uses=1]
- %vel1.0.1.0 = phi float [ %316, %bb21 ], [ 0.000000e+00, %bb18 ] ; [#uses=1]
- %vel1.0.2.0 = phi float [ %313, %bb21 ], [ 0.000000e+00, %bb18 ] ; [#uses=1]
- br i1 %124, label %bb26, label %bb24
-
-bb24: ; preds = %bb23
- %320 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %321 = load float* %320, align 4 ; [#uses=2]
- %322 = load float* %43, align 4 ; [#uses=2]
- %323 = fmul float %321, %322 ; [#uses=1]
- %324 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %325 = load float* %324, align 4 ; [#uses=2]
- %326 = load float* %42, align 4 ; [#uses=2]
- %327 = fmul float %325, %326 ; [#uses=1]
- %328 = fsub float %323, %327 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %330 = load float* %329, align 4 ; [#uses=2]
- %331 = fmul float %330, %326 ; [#uses=1]
- %332 = load float* %44, align 4 ; [#uses=2]
- %333 = fmul float %321, %332 ; [#uses=1]
- %334 = fsub float %331, %333 ; [#uses=1]
- %335 = fmul float %325, %332 ; [#uses=1]
- %336 = fmul float %330, %322 ; [#uses=1]
- %337 = fsub float %335, %336 ; [#uses=1]
- %338 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=1]
- %340 = fadd float %339, %328 ; [#uses=1]
- %341 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %342 = load float* %341, align 4 ; [#uses=1]
- %343 = fadd float %342, %334 ; [#uses=1]
- %344 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %345 = load float* %344, align 4 ; [#uses=1]
- %346 = fadd float %345, %337 ; [#uses=1]
- br label %bb26
-
-bb26: ; preds = %bb24, %bb23
- %vel2.0.0.0 = phi float [ %346, %bb24 ], [ 0.000000e+00, %bb23 ] ; [#uses=1]
- %vel2.0.1.0 = phi float [ %343, %bb24 ], [ 0.000000e+00, %bb23 ] ; [#uses=1]
- %vel2.0.2.0 = phi float [ %340, %bb24 ], [ 0.000000e+00, %bb23 ] ; [#uses=1]
- %347 = fsub float %vel1.0.2.0, %vel2.0.2.0 ; [#uses=2]
- %348 = fsub float %vel1.0.1.0, %vel2.0.1.0 ; [#uses=2]
- %349 = fsub float %vel1.0.0.0, %vel2.0.0.0 ; [#uses=2]
- %350 = getelementptr inbounds %struct.btQuadWord* %vel, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %349, float* %350, align 4
- %351 = getelementptr inbounds %struct.btQuadWord* %vel, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %348, float* %351, align 4
- %352 = getelementptr inbounds %struct.btQuadWord* %vel, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %347, float* %352, align 4
- %353 = getelementptr inbounds %struct.btQuadWord* %vel, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %353, align 4
- %354 = load float* %51, align 4 ; [#uses=1]
- %355 = fmul float %354, %349 ; [#uses=1]
- %356 = load float* %47, align 4 ; [#uses=1]
- %357 = fmul float %356, %348 ; [#uses=1]
- %358 = fadd float %355, %357 ; [#uses=1]
- %359 = load float* %57, align 4 ; [#uses=1]
- %360 = fmul float %359, %347 ; [#uses=1]
- %361 = fadd float %358, %360 ; [#uses=1]
- store float %361, float* %rel_vel, align 4
- %362 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 5 ; [#uses=1]
- %363 = load float* %362, align 4 ; [#uses=1]
- %364 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 13 ; [#uses=1]
- %365 = load float* %364, align 4 ; [#uses=1]
- %366 = fadd float %363, %365 ; [#uses=2]
- %367 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 6 ; [#uses=1]
- %368 = load float* %367, align 4 ; [#uses=1]
- %369 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 7 ; [#uses=1]
- store float %368, float* %369, align 4
- %370 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 21 ; [#uses=1]
- %371 = load i32* %370, align 4 ; [#uses=1]
- %372 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 16 ; [#uses=1]
- %373 = load i32* %372, align 4 ; [#uses=1]
- %374 = icmp sgt i32 %371, %373 ; [#uses=1]
- br i1 %374, label %bb31, label %bb29
-
-bb29: ; preds = %bb26
- %375 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 7 ; [#uses=1]
- %376 = load float* %375, align 4 ; [#uses=1]
- %377 = load float* %rel_vel, align 4 ; [#uses=1]
- %378 = fsub float -0.000000e+00, %377 ; [#uses=1]
- %379 = fmul float %376, %378 ; [#uses=2]
- %380 = fcmp ugt float %379, 0.000000e+00 ; [#uses=1]
- br i1 %380, label %bb31, label %bb30
-
-bb30: ; preds = %bb29
- br label %bb31
-
-bb31: ; preds = %bb30, %bb29, %bb26
- %restitution.0 = phi float [ 0.000000e+00, %bb30 ], [ %379, %bb29 ], [ 0.000000e+00, %bb26 ] ; [#uses=1]
- %381 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 15 ; [#uses=1]
- %382 = load i32* %381, align 4 ; [#uses=1]
- %383 = and i32 %382, 4 ; [#uses=1]
- %384 = icmp eq i32 %383, 0 ; [#uses=1]
- br i1 %384, label %bb36, label %bb32
-
-bb32: ; preds = %bb31
- %385 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 13 ; [#uses=1]
- %386 = load float* %385, align 4 ; [#uses=1]
- %387 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 14 ; [#uses=1]
- %388 = load float* %387, align 4 ; [#uses=1]
- %389 = fmul float %386, %388 ; [#uses=7]
- %390 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 6 ; [#uses=2]
- store float %389, float* %390, align 4
- br i1 %64, label %bb34, label %bb33
-
-bb33: ; preds = %bb32
- %391 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 4 ; [#uses=1]
- %392 = load float* %391, align 4 ; [#uses=4]
- %393 = fcmp une float %392, 0.000000e+00 ; [#uses=1]
- br i1 %393, label %bb.i63, label %bb34
-
-bb.i63: ; preds = %bb33
- %394 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %395 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %396 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %397 = load float* %243, align 4 ; [#uses=1]
- %398 = load float* %245, align 4 ; [#uses=1]
- %399 = load float* %247, align 4 ; [#uses=1]
- %400 = load float* %394, align 4 ; [#uses=1]
- %401 = load float* %395, align 4 ; [#uses=1]
- %402 = load float* %396, align 4 ; [#uses=1]
- %403 = fmul float %397, %392 ; [#uses=1]
- %404 = fmul float %398, %392 ; [#uses=1]
- %405 = fmul float %399, %392 ; [#uses=1]
- %406 = fmul float %403, %400 ; [#uses=1]
- %407 = fmul float %404, %401 ; [#uses=1]
- %408 = fmul float %405, %402 ; [#uses=1]
- %409 = fmul float %408, %389 ; [#uses=1]
- %410 = fmul float %407, %389 ; [#uses=1]
- %411 = fmul float %406, %389 ; [#uses=1]
- %412 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %413 = load float* %412, align 4 ; [#uses=1]
- %414 = fadd float %413, %411 ; [#uses=1]
- store float %414, float* %412, align 4
- %415 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %416 = load float* %415, align 4 ; [#uses=1]
- %417 = fadd float %416, %410 ; [#uses=1]
- store float %417, float* %415, align 4
- %418 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %419 = load float* %418, align 4 ; [#uses=1]
- %420 = fadd float %419, %409 ; [#uses=1]
- store float %420, float* %418, align 4
- %421 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %422 = load float* %421, align 4 ; [#uses=1]
- %423 = fmul float %422, %389 ; [#uses=1]
- %424 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %425 = load float* %424, align 4 ; [#uses=1]
- %426 = fmul float %425, %389 ; [#uses=1]
- %427 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %428 = load float* %427, align 4 ; [#uses=1]
- %429 = fmul float %428, %389 ; [#uses=1]
- %430 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %431 = load float* %430, align 4 ; [#uses=1]
- %432 = fmul float %431, %423 ; [#uses=1]
- %433 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %434 = load float* %433, align 4 ; [#uses=1]
- %435 = fmul float %434, %426 ; [#uses=1]
- %436 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %437 = load float* %436, align 4 ; [#uses=1]
- %438 = fmul float %437, %429 ; [#uses=1]
- %439 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 25, i32 0, i32 0 ; [#uses=2]
- %440 = load float* %439, align 4 ; [#uses=1]
- %441 = fadd float %440, %438 ; [#uses=1]
- store float %441, float* %439, align 4
- %442 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 25, i32 0, i32 1 ; [#uses=2]
- %443 = load float* %442, align 4 ; [#uses=1]
- %444 = fadd float %443, %435 ; [#uses=1]
- store float %444, float* %442, align 4
- %445 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 25, i32 0, i32 2 ; [#uses=2]
- %446 = load float* %445, align 4 ; [#uses=1]
- %447 = fadd float %446, %432 ; [#uses=1]
- store float %447, float* %445, align 4
- br label %bb34
-
-bb34: ; preds = %bb.i63, %bb33, %bb32
- br i1 %124, label %bb37, label %bb35
-
-bb35: ; preds = %bb34
- %448 = load float* %390, align 4 ; [#uses=1]
- %449 = fsub float -0.000000e+00, %448 ; [#uses=6]
- %450 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 4 ; [#uses=1]
- %451 = load float* %450, align 4 ; [#uses=4]
- %452 = fcmp une float %451, 0.000000e+00 ; [#uses=1]
- br i1 %452, label %bb.i62, label %bb37
-
-bb.i62: ; preds = %bb35
- %453 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %454 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %455 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %456 = load float* %243, align 4 ; [#uses=1]
- %457 = load float* %245, align 4 ; [#uses=1]
- %458 = load float* %247, align 4 ; [#uses=1]
- %459 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %460 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %461 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %462 = load float* %453, align 4 ; [#uses=1]
- %463 = load float* %454, align 4 ; [#uses=1]
- %464 = load float* %455, align 4 ; [#uses=1]
- %465 = fmul float %456, %451 ; [#uses=1]
- %466 = fmul float %457, %451 ; [#uses=1]
- %467 = fmul float %458, %451 ; [#uses=1]
- %468 = load float* %459, align 4 ; [#uses=1]
- %469 = load float* %460, align 4 ; [#uses=1]
- %470 = load float* %461, align 4 ; [#uses=1]
- %471 = fmul float %465, %462 ; [#uses=1]
- %472 = fmul float %466, %463 ; [#uses=1]
- %473 = fmul float %467, %464 ; [#uses=1]
- %474 = fsub float -0.000000e+00, %468 ; [#uses=1]
- %475 = fsub float -0.000000e+00, %469 ; [#uses=1]
- %476 = fsub float -0.000000e+00, %470 ; [#uses=1]
- %477 = fmul float %473, %449 ; [#uses=1]
- %478 = fmul float %472, %449 ; [#uses=1]
- %479 = fmul float %471, %449 ; [#uses=1]
- %480 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %481 = load float* %480, align 4 ; [#uses=1]
- %482 = fadd float %481, %479 ; [#uses=1]
- store float %482, float* %480, align 4
- %483 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %484 = load float* %483, align 4 ; [#uses=1]
- %485 = fadd float %484, %478 ; [#uses=1]
- store float %485, float* %483, align 4
- %486 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %487 = load float* %486, align 4 ; [#uses=1]
- %488 = fadd float %487, %477 ; [#uses=1]
- store float %488, float* %486, align 4
- %489 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %490 = load float* %489, align 4 ; [#uses=1]
- %491 = fmul float %490, %449 ; [#uses=1]
- %492 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %493 = load float* %492, align 4 ; [#uses=1]
- %494 = fmul float %493, %449 ; [#uses=1]
- %495 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %496 = load float* %495, align 4 ; [#uses=1]
- %497 = fmul float %496, %449 ; [#uses=1]
- %498 = fmul float %491, %476 ; [#uses=1]
- %499 = fmul float %494, %475 ; [#uses=1]
- %500 = fmul float %497, %474 ; [#uses=1]
- %501 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 25, i32 0, i32 0 ; [#uses=2]
- %502 = load float* %501, align 4 ; [#uses=1]
- %503 = fadd float %502, %500 ; [#uses=1]
- store float %503, float* %501, align 4
- %504 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 25, i32 0, i32 1 ; [#uses=2]
- %505 = load float* %504, align 4 ; [#uses=1]
- %506 = fadd float %505, %499 ; [#uses=1]
- store float %506, float* %504, align 4
- %507 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 25, i32 0, i32 2 ; [#uses=2]
- %508 = load float* %507, align 4 ; [#uses=1]
- %509 = fadd float %508, %498 ; [#uses=1]
- store float %509, float* %507, align 4
- br label %bb37
-
-bb36: ; preds = %bb31
- %510 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %510, align 4
- br label %bb37
-
-bb37: ; preds = %bb36, %bb.i62, %bb35, %bb34
- %511 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %511, align 4
- br i1 %64, label %bb48, label %bb46
-
-bb46: ; preds = %bb37
- %512 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %513 = load float* %512, align 4 ; [#uses=1]
- %514 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %515 = load float* %514, align 4 ; [#uses=1]
- %516 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %517 = load float* %516, align 4 ; [#uses=1]
- br label %bb48
-
-bb48: ; preds = %bb46, %bb37
- %.0.2176.0 = phi float [ %517, %bb46 ], [ 0.000000e+00, %bb37 ] ; [#uses=1]
- %.0.1175.0 = phi float [ %515, %bb46 ], [ 0.000000e+00, %bb37 ] ; [#uses=1]
- %.0.0174.0 = phi float [ %513, %bb46 ], [ 0.000000e+00, %bb37 ] ; [#uses=1]
- %518 = load float* %243, align 4 ; [#uses=2]
- %519 = fmul float %518, %.0.0174.0 ; [#uses=1]
- %520 = load float* %245, align 4 ; [#uses=2]
- %521 = fmul float %520, %.0.1175.0 ; [#uses=1]
- %522 = fadd float %519, %521 ; [#uses=1]
- %523 = load float* %247, align 4 ; [#uses=2]
- %524 = fmul float %523, %.0.2176.0 ; [#uses=1]
- %525 = fadd float %522, %524 ; [#uses=1]
- br i1 %64, label %bb51, label %bb49
-
-bb49: ; preds = %bb48
- %526 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %527 = load float* %526, align 4 ; [#uses=1]
- %528 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %529 = load float* %528, align 4 ; [#uses=1]
- %530 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %531 = load float* %530, align 4 ; [#uses=1]
- br label %bb51
-
-bb51: ; preds = %bb49, %bb48
- %.0.2183.0 = phi float [ %531, %bb49 ], [ 0.000000e+00, %bb48 ] ; [#uses=1]
- %.0.1182.0 = phi float [ %529, %bb49 ], [ 0.000000e+00, %bb48 ] ; [#uses=1]
- %.0.0181.0 = phi float [ %527, %bb49 ], [ 0.000000e+00, %bb48 ] ; [#uses=1]
- %532 = load float* %267, align 4 ; [#uses=1]
- %533 = fmul float %532, %.0.0181.0 ; [#uses=1]
- %534 = load float* %268, align 4 ; [#uses=1]
- %535 = fmul float %534, %.0.1182.0 ; [#uses=1]
- %536 = fadd float %533, %535 ; [#uses=1]
- %537 = load float* %269, align 4 ; [#uses=1]
- %538 = fmul float %537, %.0.2183.0 ; [#uses=1]
- %539 = fadd float %536, %538 ; [#uses=1]
- %540 = fadd float %525, %539 ; [#uses=1]
- br i1 %124, label %bb54, label %bb52
-
-bb52: ; preds = %bb51
- %541 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %542 = load float* %541, align 4 ; [#uses=1]
- %543 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %544 = load float* %543, align 4 ; [#uses=1]
- %545 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %546 = load float* %545, align 4 ; [#uses=1]
- br label %bb54
-
-bb54: ; preds = %bb52, %bb51
- %.0.2190.0 = phi float [ %546, %bb52 ], [ 0.000000e+00, %bb51 ] ; [#uses=1]
- %.0.1189.0 = phi float [ %544, %bb52 ], [ 0.000000e+00, %bb51 ] ; [#uses=1]
- %.0.0188.0 = phi float [ %542, %bb52 ], [ 0.000000e+00, %bb51 ] ; [#uses=1]
- %547 = load float* %289, align 4 ; [#uses=1]
- %548 = fmul float %547, %.0.0188.0 ; [#uses=1]
- %549 = load float* %290, align 4 ; [#uses=1]
- %550 = fmul float %549, %.0.1189.0 ; [#uses=1]
- %551 = fadd float %548, %550 ; [#uses=1]
- %552 = load float* %291, align 4 ; [#uses=1]
- %553 = fmul float %552, %.0.2190.0 ; [#uses=1]
- %554 = fadd float %551, %553 ; [#uses=1]
- br i1 %124, label %bb57, label %bb55
-
-bb55: ; preds = %bb54
- %555 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %556 = load float* %555, align 4 ; [#uses=1]
- %557 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %558 = load float* %557, align 4 ; [#uses=1]
- %559 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %560 = load float* %559, align 4 ; [#uses=1]
- br label %bb57
-
-bb57: ; preds = %bb55, %bb54
- %.0.2197.0 = phi float [ %560, %bb55 ], [ 0.000000e+00, %bb54 ] ; [#uses=1]
- %.0.1196.0 = phi float [ %558, %bb55 ], [ 0.000000e+00, %bb54 ] ; [#uses=1]
- %.0.0195.0 = phi float [ %556, %bb55 ], [ 0.000000e+00, %bb54 ] ; [#uses=1]
- %561 = fmul float %518, %.0.0195.0 ; [#uses=1]
- %562 = fmul float %520, %.0.1196.0 ; [#uses=1]
- %563 = fadd float %561, %562 ; [#uses=1]
- %564 = fmul float %523, %.0.2197.0 ; [#uses=1]
- %565 = fadd float %563, %564 ; [#uses=1]
- %566 = fsub float %554, %565 ; [#uses=1]
- %567 = fadd float %540, %566 ; [#uses=1]
- %568 = fsub float -0.000000e+00, %366 ; [#uses=1]
- %569 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 8 ; [#uses=1]
- %570 = load float* %569, align 4 ; [#uses=1]
- %571 = fmul float %570, %568 ; [#uses=1]
- %572 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 3 ; [#uses=1]
- %573 = load float* %572, align 4 ; [#uses=1]
- %574 = fdiv float %571, %573 ; [#uses=1]
- %575 = fsub float %restitution.0, %567 ; [#uses=1]
- %576 = load float* %242, align 4 ; [#uses=2]
- %577 = fmul float %576, %574 ; [#uses=2]
- %578 = fmul float %576, %575 ; [#uses=2]
- %579 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 11 ; [#uses=1]
- %580 = load i32* %579, align 4 ; [#uses=1]
- %581 = icmp eq i32 %580, 0 ; [#uses=1]
- br i1 %581, label %bb59, label %bb58
-
-bb58: ; preds = %bb57
- %582 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 12 ; [#uses=1]
- %583 = load float* %582, align 4 ; [#uses=1]
- %584 = fcmp olt float %583, %366 ; [#uses=1]
- br i1 %584, label %bb59, label %bb60
-
-bb59: ; preds = %bb58, %bb57
- %585 = fadd float %577, %578 ; [#uses=1]
- %586 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 14 ; [#uses=1]
- store float %585, float* %586, align 4
- %587 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 18 ; [#uses=1]
- store float 0.000000e+00, float* %587, align 4
- br label %bb61
-
-bb60: ; preds = %bb58
- %588 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 14 ; [#uses=1]
- store float %578, float* %588, align 4
- %589 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 18 ; [#uses=1]
- store float %577, float* %589, align 4
- br label %bb61
-
-bb61: ; preds = %bb60, %bb59
- %590 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 15 ; [#uses=1]
- store float 0.000000e+00, float* %590, align 4
- %591 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %591, align 4
- %592 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 17 ; [#uses=1]
- store float 1.000000e+10, float* %592, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolver5resetEv(%struct.btSequentialImpulseConstraintSolver* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolver28setFrictionConstraintImpulseER18btSolverConstraintP11btRigidBodyS3_R15btManifoldPointRK19btContactSolverInfo(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btSolverConstraint* nocapture %solverConstraint, %struct.btRigidBody* %rb0, %struct.btRigidBody* %rb1, %struct.btManifoldPoint* nocapture %cp, %struct.btContactSolverInfo* nocapture %infoGlobal) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 15 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = and i32 %1, 8 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 10, i32 0 ; [#uses=3]
- %5 = load i32* %4, align 4 ; [#uses=15]
- %6 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %7 = load %struct.btSolverConstraint** %6, align 4 ; [#uses=15]
- br i1 %3, label %bb13, label %bb
-
-bb: ; preds = %entry
- %8 = and i32 %1, 4 ; [#uses=1]
- %9 = icmp eq i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %10 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 15 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 14 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %11, %13 ; [#uses=7]
- %15 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 6 ; [#uses=2]
- store float %14, float* %15, align 4
- %16 = icmp eq %struct.btRigidBody* %rb0, null ; [#uses=1]
- br i1 %16, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %17 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 4 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=4]
- %19 = fcmp une float %18, 0.000000e+00 ; [#uses=1]
- br i1 %19, label %bb.i24, label %bb3
-
-bb.i24: ; preds = %bb2
- %20 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 1, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %20, align 4 ; [#uses=1]
- %27 = load float* %21, align 4 ; [#uses=1]
- %28 = load float* %22, align 4 ; [#uses=1]
- %29 = load float* %23, align 4 ; [#uses=1]
- %30 = load float* %24, align 4 ; [#uses=1]
- %31 = load float* %25, align 4 ; [#uses=1]
- %32 = fmul float %26, %18 ; [#uses=1]
- %33 = fmul float %27, %18 ; [#uses=1]
- %34 = fmul float %28, %18 ; [#uses=1]
- %35 = fmul float %32, %29 ; [#uses=1]
- %36 = fmul float %33, %30 ; [#uses=1]
- %37 = fmul float %34, %31 ; [#uses=1]
- %38 = fmul float %37, %14 ; [#uses=1]
- %39 = fmul float %36, %14 ; [#uses=1]
- %40 = fmul float %35, %14 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fadd float %42, %40 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fadd float %45, %39 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fadd float %48, %38 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %51, %14 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %14 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fmul float %57, %14 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 3, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = fmul float %60, %52 ; [#uses=1]
- %62 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 3, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = fmul float %63, %55 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 3, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fmul float %66, %58 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 25, i32 0, i32 0 ; [#uses=2]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fadd float %69, %67 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 25, i32 0, i32 1 ; [#uses=2]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fadd float %72, %64 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 25, i32 0, i32 2 ; [#uses=2]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fadd float %75, %61 ; [#uses=1]
- store float %76, float* %74, align 4
- br label %bb3
-
-bb3: ; preds = %bb.i24, %bb2, %bb1
- %77 = icmp eq %struct.btRigidBody* %rb1, null ; [#uses=1]
- br i1 %77, label %bb6, label %bb4
-
-bb4: ; preds = %bb3
- %78 = load float* %15, align 4 ; [#uses=1]
- %79 = fsub float -0.000000e+00, %78 ; [#uses=6]
- %80 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 4 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=4]
- %82 = fcmp une float %81, 0.000000e+00 ; [#uses=1]
- br i1 %82, label %bb.i21, label %bb6
-
-bb.i21: ; preds = %bb4
- %83 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 1, i32 0, i32 0 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 1, i32 0, i32 1 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 1, i32 0, i32 2 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %83, align 4 ; [#uses=1]
- %90 = load float* %84, align 4 ; [#uses=1]
- %91 = load float* %85, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 4, i32 0, i32 0 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 4, i32 0, i32 1 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 4, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %86, align 4 ; [#uses=1]
- %96 = load float* %87, align 4 ; [#uses=1]
- %97 = load float* %88, align 4 ; [#uses=1]
- %98 = fmul float %89, %81 ; [#uses=1]
- %99 = fmul float %90, %81 ; [#uses=1]
- %100 = fmul float %91, %81 ; [#uses=1]
- %101 = load float* %92, align 4 ; [#uses=1]
- %102 = load float* %93, align 4 ; [#uses=1]
- %103 = load float* %94, align 4 ; [#uses=1]
- %104 = fmul float %98, %95 ; [#uses=1]
- %105 = fmul float %99, %96 ; [#uses=1]
- %106 = fmul float %100, %97 ; [#uses=1]
- %107 = fsub float -0.000000e+00, %101 ; [#uses=1]
- %108 = fsub float -0.000000e+00, %102 ; [#uses=1]
- %109 = fsub float -0.000000e+00, %103 ; [#uses=1]
- %110 = fmul float %106, %79 ; [#uses=1]
- %111 = fmul float %105, %79 ; [#uses=1]
- %112 = fmul float %104, %79 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %114 = load float* %113, align 4 ; [#uses=1]
- %115 = fadd float %114, %112 ; [#uses=1]
- store float %115, float* %113, align 4
- %116 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = fadd float %117, %111 ; [#uses=1]
- store float %118, float* %116, align 4
- %119 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fadd float %120, %110 ; [#uses=1]
- store float %121, float* %119, align 4
- %122 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = fmul float %123, %79 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- %127 = fmul float %126, %79 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=1]
- %130 = fmul float %129, %79 ; [#uses=1]
- %131 = fmul float %124, %109 ; [#uses=1]
- %132 = fmul float %127, %108 ; [#uses=1]
- %133 = fmul float %130, %107 ; [#uses=1]
- %134 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 25, i32 0, i32 0 ; [#uses=2]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = fadd float %135, %133 ; [#uses=1]
- store float %136, float* %134, align 4
- %137 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 25, i32 0, i32 1 ; [#uses=2]
- %138 = load float* %137, align 4 ; [#uses=1]
- %139 = fadd float %138, %132 ; [#uses=1]
- store float %139, float* %137, align 4
- %140 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 25, i32 0, i32 2 ; [#uses=2]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = fadd float %141, %131 ; [#uses=1]
- store float %142, float* %140, align 4
- br label %bb6
-
-bb5: ; preds = %bb
- %143 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %143, align 4
- br label %bb6
-
-bb6: ; preds = %bb5, %bb.i21, %bb4, %bb3
- %144 = load i32* %0, align 4 ; [#uses=2]
- %145 = and i32 %144, 16 ; [#uses=1]
- %146 = icmp eq i32 %145, 0 ; [#uses=1]
- br i1 %146, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit, label %bb7
-
-bb7: ; preds = %bb6
- %147 = load i32* %4, align 4 ; [#uses=1]
- %148 = add nsw i32 %147, 1 ; [#uses=14]
- %149 = load %struct.btSolverConstraint** %6, align 4 ; [#uses=14]
- %150 = and i32 %144, 4 ; [#uses=1]
- %151 = icmp eq i32 %150, 0 ; [#uses=1]
- br i1 %151, label %bb12, label %bb8
-
-bb8: ; preds = %bb7
- %152 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 16 ; [#uses=1]
- %153 = load float* %152, align 4 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 14 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=1]
- %156 = fmul float %153, %155 ; [#uses=7]
- %157 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 6 ; [#uses=2]
- store float %156, float* %157, align 4
- %158 = icmp eq %struct.btRigidBody* %rb0, null ; [#uses=1]
- br i1 %158, label %bb10, label %bb9
-
-bb9: ; preds = %bb8
- %159 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 4 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=4]
- %161 = fcmp une float %160, 0.000000e+00 ; [#uses=1]
- br i1 %161, label %bb.i18, label %bb10
-
-bb.i18: ; preds = %bb9
- %162 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 1, i32 0, i32 0 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 1, i32 0, i32 1 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 1, i32 0, i32 2 ; [#uses=1]
- %165 = load float* %162, align 4 ; [#uses=1]
- %166 = load float* %163, align 4 ; [#uses=1]
- %167 = load float* %164, align 4 ; [#uses=1]
- %168 = fmul float %165, %160 ; [#uses=1]
- %169 = fmul float %166, %160 ; [#uses=1]
- %170 = fmul float %167, %160 ; [#uses=1]
- %171 = fmul float %170, %156 ; [#uses=1]
- %172 = fmul float %169, %156 ; [#uses=1]
- %173 = fmul float %168, %156 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = fadd float %175, %173 ; [#uses=1]
- store float %176, float* %174, align 4
- %177 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %178 = load float* %177, align 4 ; [#uses=1]
- %179 = fadd float %178, %172 ; [#uses=1]
- store float %179, float* %177, align 4
- %180 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %181 = load float* %180, align 4 ; [#uses=1]
- %182 = fadd float %181, %171 ; [#uses=1]
- store float %182, float* %180, align 4
- %183 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=1]
- %185 = fmul float %184, %156 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=1]
- %188 = fmul float %187, %156 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %190 = load float* %189, align 4 ; [#uses=1]
- %191 = fmul float %190, %156 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 3, i32 0, i32 2 ; [#uses=1]
- %193 = load float* %192, align 4 ; [#uses=1]
- %194 = fmul float %193, %185 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 3, i32 0, i32 1 ; [#uses=1]
- %196 = load float* %195, align 4 ; [#uses=1]
- %197 = fmul float %196, %188 ; [#uses=1]
- %198 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 3, i32 0, i32 0 ; [#uses=1]
- %199 = load float* %198, align 4 ; [#uses=1]
- %200 = fmul float %199, %191 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 25, i32 0, i32 0 ; [#uses=2]
- %202 = load float* %201, align 4 ; [#uses=1]
- %203 = fadd float %202, %200 ; [#uses=1]
- store float %203, float* %201, align 4
- %204 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 25, i32 0, i32 1 ; [#uses=2]
- %205 = load float* %204, align 4 ; [#uses=1]
- %206 = fadd float %205, %197 ; [#uses=1]
- store float %206, float* %204, align 4
- %207 = getelementptr inbounds %struct.btRigidBody* %rb0, i32 0, i32 25, i32 0, i32 2 ; [#uses=2]
- %208 = load float* %207, align 4 ; [#uses=1]
- %209 = fadd float %208, %194 ; [#uses=1]
- store float %209, float* %207, align 4
- br label %bb10
-
-bb10: ; preds = %bb.i18, %bb9, %bb8
- %210 = icmp eq %struct.btRigidBody* %rb1, null ; [#uses=1]
- br i1 %210, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit, label %bb11
-
-bb11: ; preds = %bb10
- %211 = load float* %157, align 4 ; [#uses=1]
- %212 = fsub float -0.000000e+00, %211 ; [#uses=6]
- %213 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 4 ; [#uses=1]
- %214 = load float* %213, align 4 ; [#uses=4]
- %215 = fcmp une float %214, 0.000000e+00 ; [#uses=1]
- br i1 %215, label %bb.i, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit
-
-bb.i: ; preds = %bb11
- %216 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 1, i32 0, i32 0 ; [#uses=1]
- %217 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 1, i32 0, i32 1 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 1, i32 0, i32 2 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 4, i32 0, i32 0 ; [#uses=1]
- %220 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 4, i32 0, i32 1 ; [#uses=1]
- %221 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 4, i32 0, i32 2 ; [#uses=1]
- %222 = load float* %216, align 4 ; [#uses=1]
- %223 = load float* %217, align 4 ; [#uses=1]
- %224 = load float* %218, align 4 ; [#uses=1]
- %225 = load float* %219, align 4 ; [#uses=1]
- %226 = load float* %220, align 4 ; [#uses=1]
- %227 = load float* %221, align 4 ; [#uses=1]
- %228 = fmul float %222, %214 ; [#uses=1]
- %229 = fmul float %223, %214 ; [#uses=1]
- %230 = fmul float %224, %214 ; [#uses=1]
- %231 = fsub float -0.000000e+00, %225 ; [#uses=1]
- %232 = fsub float -0.000000e+00, %226 ; [#uses=1]
- %233 = fsub float -0.000000e+00, %227 ; [#uses=1]
- %234 = fmul float %230, %212 ; [#uses=1]
- %235 = fmul float %229, %212 ; [#uses=1]
- %236 = fmul float %228, %212 ; [#uses=1]
- %237 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 24, i32 0, i32 0 ; [#uses=2]
- %238 = load float* %237, align 4 ; [#uses=1]
- %239 = fadd float %238, %236 ; [#uses=1]
- store float %239, float* %237, align 4
- %240 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 24, i32 0, i32 1 ; [#uses=2]
- %241 = load float* %240, align 4 ; [#uses=1]
- %242 = fadd float %241, %235 ; [#uses=1]
- store float %242, float* %240, align 4
- %243 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 24, i32 0, i32 2 ; [#uses=2]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = fadd float %244, %234 ; [#uses=1]
- store float %245, float* %243, align 4
- %246 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %247 = load float* %246, align 4 ; [#uses=1]
- %248 = fmul float %247, %212 ; [#uses=1]
- %249 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %250 = load float* %249, align 4 ; [#uses=1]
- %251 = fmul float %250, %212 ; [#uses=1]
- %252 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %253 = load float* %252, align 4 ; [#uses=1]
- %254 = fmul float %253, %212 ; [#uses=1]
- %255 = fmul float %248, %233 ; [#uses=1]
- %256 = fmul float %251, %232 ; [#uses=1]
- %257 = fmul float %254, %231 ; [#uses=1]
- %258 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 25, i32 0, i32 0 ; [#uses=2]
- %259 = load float* %258, align 4 ; [#uses=1]
- %260 = fadd float %259, %257 ; [#uses=1]
- store float %260, float* %258, align 4
- %261 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 25, i32 0, i32 1 ; [#uses=2]
- %262 = load float* %261, align 4 ; [#uses=1]
- %263 = fadd float %262, %256 ; [#uses=1]
- store float %263, float* %261, align 4
- %264 = getelementptr inbounds %struct.btRigidBody* %rb1, i32 0, i32 25, i32 0, i32 2 ; [#uses=2]
- %265 = load float* %264, align 4 ; [#uses=1]
- %266 = fadd float %265, %255 ; [#uses=1]
- store float %266, float* %264, align 4
- ret void
-
-_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit: ; preds = %bb13, %bb11, %bb10, %bb6
- ret void
-
-bb12: ; preds = %bb7
- %267 = getelementptr inbounds %struct.btSolverConstraint* %149, i32 %148, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %267, align 4
- ret void
-
-bb13: ; preds = %entry
- %268 = getelementptr inbounds %struct.btSolverConstraint* %7, i32 %5, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %268, align 4
- %269 = load i32* %0, align 4 ; [#uses=1]
- %270 = and i32 %269, 16 ; [#uses=1]
- %271 = icmp eq i32 %270, 0 ; [#uses=1]
- br i1 %271, label %_ZN11btRigidBody20internalApplyImpulseERK9btVector3S2_f.exit, label %bb15
-
-bb15: ; preds = %bb13
- %272 = load i32* %4, align 4 ; [#uses=1]
- %273 = add nsw i32 %272, 1 ; [#uses=1]
- %274 = load %struct.btSolverConstraint** %6, align 4 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btSolverConstraint* %274, i32 %273, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %275, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolver45solveGroupCacheFriendlySplitImpulseIterationsEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btCollisionObject** nocapture %bodies, i32 %numBodies, %struct.btPersistentManifold** nocapture %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** nocapture %constraints, i32 %numConstraints, %struct.btContactSolverInfo* nocapture %infoGlobal, %struct.btActionInterface* nocapture %debugDrawer, %struct.btStackAlloc* nocapture %stackAlloc) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 11 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %return, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 15 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = and i32 %4, 256 ; [#uses=1]
- %6 = icmp eq i32 %5, 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 5 ; [#uses=3]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %9 = icmp sgt i32 %8, 0 ; [#uses=2]
- br i1 %6, label %bb15.preheader, label %bb6.preheader
-
-bb15.preheader: ; preds = %bb
- br i1 %9, label %bb.nph24, label %return
-
-bb6.preheader: ; preds = %bb
- br i1 %9, label %bb.nph19, label %return
-
-bb.nph19: ; preds = %bb6.preheader
- %10 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb5, %bb.nph19
- %iteration.018 = phi i32 [ 0, %bb.nph19 ], [ %tmp, %bb5 ] ; [#uses=1]
- %tmp = add i32 %iteration.018, 1 ; [#uses=2]
- %13 = load i32* %10, align 4 ; [#uses=2]
- %14 = icmp sgt i32 %13, 0 ; [#uses=1]
- br i1 %14, label %bb3, label %bb5
-
-bb3: ; preds = %bb3, %bb2
- %j.017 = phi i32 [ %23, %bb3 ], [ 0, %bb2 ] ; [#uses=2]
- %15 = load i32** %11, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %15, i32 %j.017 ; [#uses=1]
- %16 = load i32* %scevgep, align 4 ; [#uses=3]
- %17 = load %struct.btSolverConstraint** %12, align 4 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btSolverConstraint* %17, i32 %16 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btSolverConstraint* %17, i32 %16, i32 12, i32 0 ; [#uses=1]
- %20 = load %struct.btRigidBody** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btSolverConstraint* %17, i32 %16, i32 11, i32 0 ; [#uses=1]
- %22 = load %struct.btRigidBody** %21, align 4 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver43resolveSplitPenetrationImpulseCacheFriendlyER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %22, %struct.btRigidBody* %20, %struct.btSolverConstraint* %18) nounwind
- %23 = add nsw i32 %j.017, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %23, %13 ; [#uses=1]
- br i1 %exitcond, label %bb5, label %bb3
-
-bb5: ; preds = %bb3, %bb2
- %24 = load i32* %7, align 4 ; [#uses=1]
- %25 = icmp sgt i32 %24, %tmp ; [#uses=1]
- br i1 %25, label %bb2, label %return
-
-bb.nph24: ; preds = %bb15.preheader
- %26 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb14, %bb.nph24
- %iteration.123 = phi i32 [ 0, %bb.nph24 ], [ %tmp27, %bb14 ] ; [#uses=1]
- %tmp27 = add i32 %iteration.123, 1 ; [#uses=2]
- %29 = load i32* %26, align 4 ; [#uses=2]
- %30 = icmp sgt i32 %29, 0 ; [#uses=1]
- br i1 %30, label %bb11, label %bb14
-
-bb11: ; preds = %bb11, %bb8
- %j10.020 = phi i32 [ %39, %bb11 ], [ 0, %bb8 ] ; [#uses=2]
- %31 = load i32** %27, align 4 ; [#uses=1]
- %scevgep26 = getelementptr i32* %31, i32 %j10.020 ; [#uses=1]
- %32 = load i32* %scevgep26, align 4 ; [#uses=3]
- %33 = load %struct.btSolverConstraint** %28, align 4 ; [#uses=3]
- %34 = getelementptr inbounds %struct.btSolverConstraint* %33, i32 %32 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btSolverConstraint* %33, i32 %32, i32 12, i32 0 ; [#uses=1]
- %36 = load %struct.btRigidBody** %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btSolverConstraint* %33, i32 %32, i32 11, i32 0 ; [#uses=1]
- %38 = load %struct.btRigidBody** %37, align 4 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver43resolveSplitPenetrationImpulseCacheFriendlyER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %38, %struct.btRigidBody* %36, %struct.btSolverConstraint* %34) nounwind
- %39 = add nsw i32 %j10.020, 1 ; [#uses=2]
- %exitcond25 = icmp eq i32 %39, %29 ; [#uses=1]
- br i1 %exitcond25, label %bb14, label %bb11
-
-bb14: ; preds = %bb11, %bb8
- %40 = load i32* %7, align 4 ; [#uses=1]
- %41 = icmp sgt i32 %40, %tmp27 ; [#uses=1]
- br i1 %41, label %bb8, label %return
-
-return: ; preds = %bb14, %bb5, %bb6.preheader, %bb15.preheader, %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZN35btSequentialImpulseConstraintSolver20solveSingleIterationEiPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc(%struct.btSequentialImpulseConstraintSolver* %this, i32 %iteration, %struct.btCollisionObject** nocapture %unnamed_arg, i32 %unnamed_arg2, %struct.btPersistentManifold** nocapture %unnamed_arg4, i32 %unnamed_arg6, %struct.btTypedConstraint** nocapture %constraints, i32 %numConstraints, %struct.btContactSolverInfo* nocapture %infoGlobal, %struct.btActionInterface* nocapture %unnamed_arg8, %struct.btStackAlloc* nocapture %unnamed_arg10) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=3]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 15 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=3]
- %6 = and i32 %5, 1 ; [#uses=1]
- %toBool = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %toBool, label %bb19, label %bb
-
-bb: ; preds = %entry
- %7 = and i32 %iteration, 7 ; [#uses=1]
- %8 = icmp eq i32 %7, 0 ; [#uses=1]
- br i1 %8, label %bb13.preheader, label %bb19
-
-bb13.preheader: ; preds = %bb
- %9 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %9, label %bb.nph68, label %bb18.preheader
-
-bb.nph68: ; preds = %bb13.preheader
- %10 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 7 ; [#uses=2]
- br label %bb12
-
-bb12: ; preds = %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit, %bb.nph68
- %j.067 = phi i32 [ 0, %bb.nph68 ], [ %tmp90, %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit ] ; [#uses=2]
- %tmp90 = add i32 %j.067, 1 ; [#uses=8]
- %12 = load i32** %10, align 4 ; [#uses=2]
- %scevgep88 = getelementptr i32* %12, i32 %j.067 ; [#uses=2]
- %13 = load i32* %scevgep88, align 4 ; [#uses=1]
- %14 = load i32* %11, align 4 ; [#uses=1]
- %15 = mul i32 %14, 1664525 ; [#uses=1]
- %16 = add i32 %15, 1013904223 ; [#uses=4]
- store i32 %16, i32* %11, align 4
- %17 = icmp ult i32 %tmp90, 65537 ; [#uses=1]
- br i1 %17, label %bb.i, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit
-
-bb.i: ; preds = %bb12
- %18 = lshr i32 %16, 16 ; [#uses=1]
- %19 = xor i32 %18, %16 ; [#uses=3]
- %20 = icmp ult i32 %tmp90, 257 ; [#uses=1]
- br i1 %20, label %bb1.i, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit
-
-bb1.i: ; preds = %bb.i
- %21 = lshr i32 %19, 8 ; [#uses=1]
- %22 = xor i32 %21, %19 ; [#uses=3]
- %23 = icmp ult i32 %tmp90, 17 ; [#uses=1]
- br i1 %23, label %bb2.i, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit
-
-bb2.i: ; preds = %bb1.i
- %24 = lshr i32 %22, 4 ; [#uses=1]
- %25 = xor i32 %24, %22 ; [#uses=3]
- %26 = icmp ult i32 %tmp90, 5 ; [#uses=1]
- br i1 %26, label %bb3.i, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit
-
-bb3.i: ; preds = %bb2.i
- %27 = lshr i32 %25, 2 ; [#uses=1]
- %28 = xor i32 %27, %25 ; [#uses=3]
- %29 = icmp ult i32 %tmp90, 3 ; [#uses=1]
- br i1 %29, label %bb4.i, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit
-
-bb4.i: ; preds = %bb3.i
- %30 = lshr i32 %28, 1 ; [#uses=1]
- %31 = xor i32 %30, %28 ; [#uses=1]
- br label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit
-
-_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit: ; preds = %bb4.i, %bb3.i, %bb2.i, %bb1.i, %bb.i, %bb12
- %r.0.i = phi i32 [ %31, %bb4.i ], [ %28, %bb3.i ], [ %25, %bb2.i ], [ %22, %bb1.i ], [ %19, %bb.i ], [ %16, %bb12 ] ; [#uses=1]
- %32 = urem i32 %r.0.i, %tmp90 ; [#uses=2]
- %33 = getelementptr inbounds i32* %12, i32 %32 ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=1]
- store i32 %34, i32* %scevgep88, align 4
- %35 = load i32** %10, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32* %35, i32 %32 ; [#uses=1]
- store i32 %13, i32* %36, align 4
- %exitcond87 = icmp eq i32 %tmp90, %1 ; [#uses=1]
- br i1 %exitcond87, label %bb18.preheader, label %bb12
-
-bb18.preheader: ; preds = %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit, %bb13.preheader
- %37 = icmp sgt i32 %3, 0 ; [#uses=1]
- br i1 %37, label %bb.nph, label %bb19.loopexit
-
-bb.nph: ; preds = %bb18.preheader
- %38 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=2]
- %39 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 7 ; [#uses=2]
- br label %bb15
-
-bb15: ; preds = %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65, %bb.nph
- %j.166 = phi i32 [ 0, %bb.nph ], [ %tmp, %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65 ] ; [#uses=2]
- %tmp = add i32 %j.166, 1 ; [#uses=8]
- %40 = load i32** %38, align 4 ; [#uses=2]
- %scevgep = getelementptr i32* %40, i32 %j.166 ; [#uses=2]
- %41 = load i32* %scevgep, align 4 ; [#uses=1]
- %42 = load i32* %39, align 4 ; [#uses=1]
- %43 = mul i32 %42, 1664525 ; [#uses=1]
- %44 = add i32 %43, 1013904223 ; [#uses=4]
- store i32 %44, i32* %39, align 4
- %45 = icmp ult i32 %tmp, 65537 ; [#uses=1]
- br i1 %45, label %bb.i59, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65
-
-bb.i59: ; preds = %bb15
- %46 = lshr i32 %44, 16 ; [#uses=1]
- %47 = xor i32 %46, %44 ; [#uses=3]
- %48 = icmp ult i32 %tmp, 257 ; [#uses=1]
- br i1 %48, label %bb1.i60, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65
-
-bb1.i60: ; preds = %bb.i59
- %49 = lshr i32 %47, 8 ; [#uses=1]
- %50 = xor i32 %49, %47 ; [#uses=3]
- %51 = icmp ult i32 %tmp, 17 ; [#uses=1]
- br i1 %51, label %bb2.i61, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65
-
-bb2.i61: ; preds = %bb1.i60
- %52 = lshr i32 %50, 4 ; [#uses=1]
- %53 = xor i32 %52, %50 ; [#uses=3]
- %54 = icmp ult i32 %tmp, 5 ; [#uses=1]
- br i1 %54, label %bb3.i62, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65
-
-bb3.i62: ; preds = %bb2.i61
- %55 = lshr i32 %53, 2 ; [#uses=1]
- %56 = xor i32 %55, %53 ; [#uses=3]
- %57 = icmp ult i32 %tmp, 3 ; [#uses=1]
- br i1 %57, label %bb4.i63, label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65
-
-bb4.i63: ; preds = %bb3.i62
- %58 = lshr i32 %56, 1 ; [#uses=1]
- %59 = xor i32 %58, %56 ; [#uses=1]
- br label %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65
-
-_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65: ; preds = %bb4.i63, %bb3.i62, %bb2.i61, %bb1.i60, %bb.i59, %bb15
- %r.0.i64 = phi i32 [ %59, %bb4.i63 ], [ %56, %bb3.i62 ], [ %53, %bb2.i61 ], [ %50, %bb1.i60 ], [ %47, %bb.i59 ], [ %44, %bb15 ] ; [#uses=1]
- %60 = urem i32 %r.0.i64, %tmp ; [#uses=2]
- %61 = getelementptr inbounds i32* %40, i32 %60 ; [#uses=1]
- %62 = load i32* %61, align 4 ; [#uses=1]
- store i32 %62, i32* %scevgep, align 4
- %63 = load i32** %38, align 4 ; [#uses=1]
- %64 = getelementptr inbounds i32* %63, i32 %60 ; [#uses=1]
- store i32 %41, i32* %64, align 4
- %exitcond = icmp eq i32 %tmp, %3 ; [#uses=1]
- br i1 %exitcond, label %bb19.loopexit, label %bb15
-
-bb19.loopexit: ; preds = %_ZN35btSequentialImpulseConstraintSolver10btRandInt2Ei.exit65, %bb18.preheader
- %.pre = load i32* %4, align 4 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb19.loopexit, %bb, %entry
- %65 = phi i32 [ %.pre, %bb19.loopexit ], [ %5, %entry ], [ %5, %bb ] ; [#uses=1]
- %66 = and i32 %65, 256 ; [#uses=1]
- %67 = icmp eq i32 %66, 0 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=3]
- %69 = load i32* %68, align 4 ; [#uses=1]
- %70 = icmp sgt i32 %69, 0 ; [#uses=2]
- br i1 %67, label %bb41.preheader, label %bb22.preheader
-
-bb41.preheader: ; preds = %bb19
- br i1 %70, label %bb.nph85, label %bb45.preheader
-
-bb22.preheader: ; preds = %bb19
- br i1 %70, label %bb.nph76, label %bb26.preheader
-
-bb.nph76: ; preds = %bb22.preheader
- %71 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- br label %bb21
-
-bb21: ; preds = %bb21, %bb.nph76
- %j.275 = phi i32 [ 0, %bb.nph76 ], [ %75, %bb21 ] ; [#uses=4]
- %72 = load %struct.btSolverConstraint** %71, align 4 ; [#uses=3]
- %scevgep98 = getelementptr %struct.btSolverConstraint* %72, i32 %j.275, i32 12, i32 0 ; [#uses=1]
- %73 = load %struct.btRigidBody** %scevgep98, align 4 ; [#uses=1]
- %scevgep99 = getelementptr %struct.btSolverConstraint* %72, i32 %j.275, i32 11, i32 0 ; [#uses=1]
- %74 = load %struct.btRigidBody** %scevgep99, align 4 ; [#uses=1]
- %scevgep97 = getelementptr %struct.btSolverConstraint* %72, i32 %j.275 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver33resolveSingleConstraintRowGenericER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %74, %struct.btRigidBody* %73, %struct.btSolverConstraint* %scevgep97) nounwind
- %75 = add nsw i32 %j.275, 1 ; [#uses=2]
- %76 = load i32* %68, align 4 ; [#uses=1]
- %77 = icmp sgt i32 %76, %75 ; [#uses=1]
- br i1 %77, label %bb21, label %bb26.preheader
-
-bb26.preheader: ; preds = %bb21, %bb22.preheader
- %78 = icmp sgt i32 %numConstraints, 0 ; [#uses=1]
- br i1 %78, label %bb.nph74, label %bb27
-
-bb.nph74: ; preds = %bb26.preheader
- %79 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb25
-
-bb25: ; preds = %bb25, %bb.nph74
- %j.373 = phi i32 [ 0, %bb.nph74 ], [ %91, %bb25 ] ; [#uses=2]
- %scevgep96 = getelementptr %struct.btTypedConstraint** %constraints, i32 %j.373 ; [#uses=1]
- %80 = load %struct.btTypedConstraint** %scevgep96, align 4 ; [#uses=4]
- %81 = getelementptr inbounds %struct.btTypedConstraint* %80, i32 0, i32 0 ; [#uses=1]
- %82 = load i32 (...)*** %81, align 4 ; [#uses=1]
- %83 = getelementptr inbounds i32 (...)** %82, i32 6 ; [#uses=1]
- %84 = load i32 (...)** %83, align 4 ; [#uses=1]
- %85 = load float* %79, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btTypedConstraint* %80, i32 0, i32 6 ; [#uses=1]
- %87 = load %struct.btRigidBody** %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btTypedConstraint* %80, i32 0, i32 5 ; [#uses=1]
- %89 = load %struct.btRigidBody** %88, align 4 ; [#uses=1]
- %90 = bitcast i32 (...)* %84 to void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* ; [#uses=1]
- tail call void %90(%struct.btTypedConstraint* %80, %struct.btRigidBody* %89, %struct.btRigidBody* %87, float %85)
- %91 = add nsw i32 %j.373, 1 ; [#uses=2]
- %exitcond95 = icmp eq i32 %91, %numConstraints ; [#uses=1]
- br i1 %exitcond95, label %bb27, label %bb25
-
-bb27: ; preds = %bb25, %bb26.preheader
- %92 = load i32* %0, align 4 ; [#uses=2]
- %93 = icmp sgt i32 %92, 0 ; [#uses=1]
- br i1 %93, label %bb.nph72, label %bb30
-
-bb.nph72: ; preds = %bb27
- %94 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb28
-
-bb28: ; preds = %bb28, %bb.nph72
- %j.471 = phi i32 [ 0, %bb.nph72 ], [ %104, %bb28 ] ; [#uses=2]
- %96 = load i32** %94, align 4 ; [#uses=1]
- %scevgep94 = getelementptr i32* %96, i32 %j.471 ; [#uses=1]
- %97 = load i32* %scevgep94, align 4 ; [#uses=3]
- %98 = load %struct.btSolverConstraint** %95, align 4 ; [#uses=3]
- %99 = getelementptr inbounds %struct.btSolverConstraint* %98, i32 %97 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btSolverConstraint* %98, i32 %97, i32 12, i32 0 ; [#uses=1]
- %101 = load %struct.btRigidBody** %100, align 4 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btSolverConstraint* %98, i32 %97, i32 11, i32 0 ; [#uses=1]
- %103 = load %struct.btRigidBody** %102, align 4 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver36resolveSingleConstraintRowLowerLimitER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %103, %struct.btRigidBody* %101, %struct.btSolverConstraint* %99) nounwind
- %104 = add nsw i32 %j.471, 1 ; [#uses=2]
- %exitcond93 = icmp eq i32 %104, %92 ; [#uses=1]
- br i1 %exitcond93, label %bb30, label %bb28
-
-bb30: ; preds = %bb28, %bb27
- %105 = load i32* %2, align 4 ; [#uses=2]
- %106 = icmp sgt i32 %105, 0 ; [#uses=1]
- br i1 %106, label %bb.nph70, label %bb57
-
-bb.nph70: ; preds = %bb30
- %107 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb31
-
-bb31: ; preds = %bb34, %bb.nph70
- %j.569 = phi i32 [ 0, %bb.nph70 ], [ %130, %bb34 ] ; [#uses=2]
- %110 = load i32** %107, align 4 ; [#uses=1]
- %scevgep92 = getelementptr i32* %110, i32 %j.569 ; [#uses=1]
- %111 = load i32* %scevgep92, align 4 ; [#uses=7]
- %112 = load %struct.btSolverConstraint** %108, align 4 ; [#uses=7]
- %113 = getelementptr inbounds %struct.btSolverConstraint* %112, i32 %111, i32 10, i32 0 ; [#uses=1]
- %114 = load i32* %113, align 4 ; [#uses=1]
- %115 = load %struct.btSolverConstraint** %109, align 4 ; [#uses=1]
- %116 = getelementptr inbounds %struct.btSolverConstraint* %115, i32 %114, i32 6 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=2]
- %118 = fcmp ogt float %117, 0.000000e+00 ; [#uses=1]
- br i1 %118, label %bb33, label %bb34
-
-bb33: ; preds = %bb31
- %119 = getelementptr inbounds %struct.btSolverConstraint* %112, i32 %111 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btSolverConstraint* %112, i32 %111, i32 7 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=1]
- %122 = fmul float %121, %117 ; [#uses=2]
- %123 = fsub float -0.000000e+00, %122 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btSolverConstraint* %112, i32 %111, i32 16 ; [#uses=1]
- store float %123, float* %124, align 4
- %125 = getelementptr inbounds %struct.btSolverConstraint* %112, i32 %111, i32 17 ; [#uses=1]
- store float %122, float* %125, align 4
- %126 = getelementptr inbounds %struct.btSolverConstraint* %112, i32 %111, i32 12, i32 0 ; [#uses=1]
- %127 = load %struct.btRigidBody** %126, align 4 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btSolverConstraint* %112, i32 %111, i32 11, i32 0 ; [#uses=1]
- %129 = load %struct.btRigidBody** %128, align 4 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver33resolveSingleConstraintRowGenericER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %129, %struct.btRigidBody* %127, %struct.btSolverConstraint* %119) nounwind
- br label %bb34
-
-bb34: ; preds = %bb33, %bb31
- %130 = add nsw i32 %j.569, 1 ; [#uses=2]
- %exitcond91 = icmp eq i32 %130, %105 ; [#uses=1]
- br i1 %exitcond91, label %bb57, label %bb31
-
-bb.nph85: ; preds = %bb41.preheader
- %131 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- br label %bb39
-
-bb39: ; preds = %bb39, %bb.nph85
- %j.684 = phi i32 [ 0, %bb.nph85 ], [ %135, %bb39 ] ; [#uses=4]
- %132 = load %struct.btSolverConstraint** %131, align 4 ; [#uses=3]
- %scevgep108 = getelementptr %struct.btSolverConstraint* %132, i32 %j.684, i32 12, i32 0 ; [#uses=1]
- %133 = load %struct.btRigidBody** %scevgep108, align 4 ; [#uses=1]
- %scevgep109 = getelementptr %struct.btSolverConstraint* %132, i32 %j.684, i32 11, i32 0 ; [#uses=1]
- %134 = load %struct.btRigidBody** %scevgep109, align 4 ; [#uses=1]
- %scevgep107 = getelementptr %struct.btSolverConstraint* %132, i32 %j.684 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver33resolveSingleConstraintRowGenericER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %134, %struct.btRigidBody* %133, %struct.btSolverConstraint* %scevgep107) nounwind
- %135 = add nsw i32 %j.684, 1 ; [#uses=2]
- %136 = load i32* %68, align 4 ; [#uses=1]
- %137 = icmp sgt i32 %136, %135 ; [#uses=1]
- br i1 %137, label %bb39, label %bb45.preheader
-
-bb45.preheader: ; preds = %bb39, %bb41.preheader
- %138 = icmp sgt i32 %numConstraints, 0 ; [#uses=1]
- br i1 %138, label %bb.nph83, label %bb46
-
-bb.nph83: ; preds = %bb45.preheader
- %139 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb44
-
-bb44: ; preds = %bb44, %bb.nph83
- %j.782 = phi i32 [ 0, %bb.nph83 ], [ %151, %bb44 ] ; [#uses=2]
- %scevgep106 = getelementptr %struct.btTypedConstraint** %constraints, i32 %j.782 ; [#uses=1]
- %140 = load %struct.btTypedConstraint** %scevgep106, align 4 ; [#uses=4]
- %141 = getelementptr inbounds %struct.btTypedConstraint* %140, i32 0, i32 0 ; [#uses=1]
- %142 = load i32 (...)*** %141, align 4 ; [#uses=1]
- %143 = getelementptr inbounds i32 (...)** %142, i32 6 ; [#uses=1]
- %144 = load i32 (...)** %143, align 4 ; [#uses=1]
- %145 = load float* %139, align 4 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btTypedConstraint* %140, i32 0, i32 6 ; [#uses=1]
- %147 = load %struct.btRigidBody** %146, align 4 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btTypedConstraint* %140, i32 0, i32 5 ; [#uses=1]
- %149 = load %struct.btRigidBody** %148, align 4 ; [#uses=1]
- %150 = bitcast i32 (...)* %144 to void (%struct.btTypedConstraint*, %struct.btRigidBody*, %struct.btRigidBody*, float)* ; [#uses=1]
- tail call void %150(%struct.btTypedConstraint* %140, %struct.btRigidBody* %149, %struct.btRigidBody* %147, float %145)
- %151 = add nsw i32 %j.782, 1 ; [#uses=2]
- %exitcond105 = icmp eq i32 %151, %numConstraints ; [#uses=1]
- br i1 %exitcond105, label %bb46, label %bb44
-
-bb46: ; preds = %bb44, %bb45.preheader
- %152 = load i32* %0, align 4 ; [#uses=2]
- %153 = icmp sgt i32 %152, 0 ; [#uses=1]
- br i1 %153, label %bb.nph81, label %bb50
-
-bb.nph81: ; preds = %bb46
- %154 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb47
-
-bb47: ; preds = %bb47, %bb.nph81
- %j.880 = phi i32 [ 0, %bb.nph81 ], [ %164, %bb47 ] ; [#uses=2]
- %156 = load i32** %154, align 4 ; [#uses=1]
- %scevgep104 = getelementptr i32* %156, i32 %j.880 ; [#uses=1]
- %157 = load i32* %scevgep104, align 4 ; [#uses=3]
- %158 = load %struct.btSolverConstraint** %155, align 4 ; [#uses=3]
- %159 = getelementptr inbounds %struct.btSolverConstraint* %158, i32 %157 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btSolverConstraint* %158, i32 %157, i32 12, i32 0 ; [#uses=1]
- %161 = load %struct.btRigidBody** %160, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btSolverConstraint* %158, i32 %157, i32 11, i32 0 ; [#uses=1]
- %163 = load %struct.btRigidBody** %162, align 4 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver36resolveSingleConstraintRowLowerLimitER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %163, %struct.btRigidBody* %161, %struct.btSolverConstraint* %159) nounwind
- %164 = add nsw i32 %j.880, 1 ; [#uses=2]
- %exitcond103 = icmp eq i32 %164, %152 ; [#uses=1]
- br i1 %exitcond103, label %bb50, label %bb47
-
-bb50: ; preds = %bb47, %bb46
- %165 = load i32* %2, align 4 ; [#uses=2]
- %166 = icmp sgt i32 %165, 0 ; [#uses=1]
- br i1 %166, label %bb.nph79, label %bb57
-
-bb.nph79: ; preds = %bb50
- %167 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %169 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb51
-
-bb51: ; preds = %bb55, %bb.nph79
- %j.978 = phi i32 [ 0, %bb.nph79 ], [ %190, %bb55 ] ; [#uses=2]
- %170 = load i32** %167, align 4 ; [#uses=1]
- %scevgep102 = getelementptr i32* %170, i32 %j.978 ; [#uses=1]
- %171 = load i32* %scevgep102, align 4 ; [#uses=7]
- %172 = load %struct.btSolverConstraint** %168, align 4 ; [#uses=7]
- %173 = getelementptr inbounds %struct.btSolverConstraint* %172, i32 %171, i32 10, i32 0 ; [#uses=1]
- %174 = load i32* %173, align 4 ; [#uses=1]
- %175 = load %struct.btSolverConstraint** %169, align 4 ; [#uses=1]
- %176 = getelementptr inbounds %struct.btSolverConstraint* %175, i32 %174, i32 6 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=2]
- %178 = fcmp ogt float %177, 0.000000e+00 ; [#uses=1]
- br i1 %178, label %bb54, label %bb55
-
-bb54: ; preds = %bb51
- %179 = getelementptr inbounds %struct.btSolverConstraint* %172, i32 %171 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btSolverConstraint* %172, i32 %171, i32 7 ; [#uses=1]
- %181 = load float* %180, align 4 ; [#uses=1]
- %182 = fmul float %181, %177 ; [#uses=2]
- %183 = fsub float -0.000000e+00, %182 ; [#uses=1]
- %184 = getelementptr inbounds %struct.btSolverConstraint* %172, i32 %171, i32 16 ; [#uses=1]
- store float %183, float* %184, align 4
- %185 = getelementptr inbounds %struct.btSolverConstraint* %172, i32 %171, i32 17 ; [#uses=1]
- store float %182, float* %185, align 4
- %186 = getelementptr inbounds %struct.btSolverConstraint* %172, i32 %171, i32 12, i32 0 ; [#uses=1]
- %187 = load %struct.btRigidBody** %186, align 4 ; [#uses=1]
- %188 = getelementptr inbounds %struct.btSolverConstraint* %172, i32 %171, i32 11, i32 0 ; [#uses=1]
- %189 = load %struct.btRigidBody** %188, align 4 ; [#uses=1]
- tail call void @_ZN35btSequentialImpulseConstraintSolver33resolveSingleConstraintRowGenericER11btRigidBodyS1_RK18btSolverConstraint(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btRigidBody* %189, %struct.btRigidBody* %187, %struct.btSolverConstraint* %179) nounwind
- br label %bb55
-
-bb55: ; preds = %bb54, %bb51
- %190 = add nsw i32 %j.978, 1 ; [#uses=2]
- %exitcond101 = icmp eq i32 %190, %165 ; [#uses=1]
- br i1 %exitcond101, label %bb57, label %bb51
-
-bb57: ; preds = %bb55, %bb50, %bb34, %bb30
- ret float 0.000000e+00
-}
-
-; [#uses=4]
-define %struct.btRigidBody* @_ZN35btSequentialImpulseConstraintSolver12getFixedBodyEv() align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = load i8* bitcast (i64* @_ZGVZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed to i8*), align 8 ; [#uses=1]
- %3 = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %bb9
-
-bb: ; preds = %entry
- %4 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed) nounwind ; [#uses=1]
- %5 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %5, label %bb9, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- invoke void @_ZN11btRigidBodyC1EfP13btMotionStateP16btCollisionShapeRK9btVector3(%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, float 0.000000e+00, %struct.btActionInterface* null, %struct.btCollisionShape* null, %struct.btQuadWord* %1)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb1
- call void @__cxa_guard_release(i64* @_ZGVZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed) nounwind
- %10 = call i32 @__cxa_atexit(void (i8*)* @__tcf_026, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- br label %bb9
-
-bb9: ; preds = %invcont, %bb, %entry
- %11 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 8
- %12 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 8
- %14 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- call void @_ZN11btRigidBody12setMassPropsEfRK9btVector3(%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, float 0.000000e+00, %struct.btQuadWord* %0)
- ret %struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed
-
-lpad: ; preds = %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- call void @__cxa_guard_abort(i64* @_ZGVZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed) nounwind
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define internal void @__tcf_026(i8* nocapture %unnamed_arg) {
-entry:
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV11btRigidBody, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 0, i32 0), align 32
- %0 = load %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4 ; [#uses=2]
- %1 = icmp eq %struct.btTypedConstraint** %0, null ; [#uses=1]
- br i1 %1, label %_ZN11btRigidBodyD1Ev.exit, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %entry
- %2 = load i8* getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 4), align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %3 = bitcast %struct.btTypedConstraint** %0 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %3)
- to label %bb2.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4
- br label %_ZN11btRigidBodyD1Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 0))
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN11btRigidBodyD1Ev.exit: ; preds = %bb2.i.i.i.i, %entry
- store i8 1, i8* getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 4), align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4
- store i32 0, i32* getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 1), align 4
- store i32 0, i32* getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 2), align 4
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* getelementptr inbounds (%struct.btRigidBody* @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, i32 0, i32 0))
- ret void
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolver23setupFrictionConstraintER18btSolverConstraintRK9btVector3P11btRigidBodyS6_R15btManifoldPointS4_S4_P17btCollisionObjectSA_fff(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btSolverConstraint* %solverConstraint, %struct.btQuadWord* nocapture %normalAxis, %struct.btRigidBody* nocapture %solverBodyA, %struct.btRigidBody* nocapture %solverBodyB, %struct.btManifoldPoint* nocapture %cp, %struct.btQuadWord* nocapture %rel_pos1, %struct.btQuadWord* nocapture %rel_pos2, %struct.btCollisionObject* %colObj0, %struct.btCollisionObject* %colObj1, float %relaxation, float %desiredVelocity, float %cfmSlip) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %colObj0, i32 0, i32 19 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %.lobit.i = and i32 %1, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool.i, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit, label %bb.i
-
-bb.i: ; preds = %entry
- %2 = bitcast %struct.btCollisionObject* %colObj0 to %struct.btRigidBody* ; [#uses=1]
- br label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit: ; preds = %bb.i, %entry
- %3 = phi %struct.btRigidBody* [ %2, %bb.i ], [ null, %entry ] ; [#uses=21]
- %4 = getelementptr inbounds %struct.btCollisionObject* %colObj1, i32 0, i32 19 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %.lobit.i38 = and i32 %5, 2 ; [#uses=1]
- %toBool.i39 = icmp eq i32 %.lobit.i38, 0 ; [#uses=1]
- br i1 %toBool.i39, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit42, label %bb.i40
-
-bb.i40: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %6 = bitcast %struct.btCollisionObject* %colObj1 to %struct.btRigidBody* ; [#uses=1]
- br label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit42
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit42: ; preds = %bb.i40, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %7 = phi %struct.btRigidBody* [ %6, %bb.i40 ], [ null, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit ] ; [#uses=21]
- %8 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %normalAxis, i32 0, i32 0, i32 0 ; [#uses=3]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btQuadWord* %normalAxis, i32 0, i32 0, i32 1 ; [#uses=3]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %normalAxis, i32 0, i32 0, i32 2 ; [#uses=3]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %normalAxis, i32 0, i32 0, i32 3 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = icmp eq %struct.btRigidBody* %3, null ; [#uses=4]
- br i1 %20, label %bb, label %bb2
-
-bb: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit42
- %21 = tail call %struct.btRigidBody* @_ZN35btSequentialImpulseConstraintSolver12getFixedBodyEv() ; [#uses=0]
- br label %bb2
-
-bb2: ; preds = %bb, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit42
- %iftmp.180.0 = phi %struct.btRigidBody* [ @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, %bb ], [ %3, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit42 ] ; [#uses=1]
- %22 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 11, i32 0 ; [#uses=1]
- store %struct.btRigidBody* %iftmp.180.0, %struct.btRigidBody** %22, align 4
- %23 = icmp eq %struct.btRigidBody* %7, null ; [#uses=4]
- br i1 %23, label %bb3, label %bb5
-
-bb3: ; preds = %bb2
- %24 = tail call %struct.btRigidBody* @_ZN35btSequentialImpulseConstraintSolver12getFixedBodyEv() ; [#uses=0]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb2
- %iftmp.181.0 = phi %struct.btRigidBody* [ @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, %bb3 ], [ %7, %bb2 ] ; [#uses=1]
- %25 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 12, i32 0 ; [#uses=1]
- store %struct.btRigidBody* %iftmp.181.0, %struct.btRigidBody** %25, align 4
- %26 = getelementptr inbounds %struct.btManifoldPoint* %cp, i32 0, i32 6 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 7 ; [#uses=1]
- store float %27, float* %28, align 4
- %29 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 13, i32 0 ; [#uses=1]
- store i8* null, i8** %29, align 4
- %30 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 0 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=2]
- %34 = load float* %11, align 4 ; [#uses=6]
- %35 = fmul float %33, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 1 ; [#uses=2]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = load float* %8, align 4 ; [#uses=6]
- %39 = fmul float %37, %38 ; [#uses=1]
- %40 = fsub float %35, %39 ; [#uses=5]
- %41 = getelementptr inbounds %struct.btQuadWord* %rel_pos1, i32 0, i32 0, i32 2 ; [#uses=2]
- %42 = load float* %41, align 4 ; [#uses=2]
- %43 = fmul float %42, %38 ; [#uses=1]
- %44 = load float* %14, align 4 ; [#uses=6]
- %45 = fmul float %33, %44 ; [#uses=1]
- %46 = fsub float %43, %45 ; [#uses=5]
- %47 = fmul float %37, %44 ; [#uses=1]
- %48 = fmul float %42, %34 ; [#uses=1]
- %49 = fsub float %47, %48 ; [#uses=5]
- %50 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %49, float* %50, align 4
- %51 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %51, align 4
- %52 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %40, float* %52, align 4
- %53 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %53, align 4
- br i1 %20, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %54 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %55, %49 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = fmul float %58, %46 ; [#uses=1]
- %60 = fadd float %56, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = fmul float %62, %40 ; [#uses=1]
- %64 = fadd float %60, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fmul float %66, %49 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fmul float %69, %46 ; [#uses=1]
- %71 = fadd float %67, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fmul float %73, %40 ; [#uses=1]
- %75 = fadd float %71, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fmul float %77, %49 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fmul float %80, %46 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = fmul float %84, %40 ; [#uses=1]
- %86 = fadd float %82, %85 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fmul float %64, %88 ; [#uses=2]
- %90 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = fmul float %75, %91 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %86, %94 ; [#uses=2]
- %96 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %95, float* %96, align 4
- %97 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %92, float* %97, align 4
- %98 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %89, float* %98, align 4
- %99 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %99, align 4
- br label %bb8
-
-bb7: ; preds = %bb5
- %100 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %100, align 4
- %101 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %101, align 4
- %102 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %102, align 4
- %103 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %103, align 4
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6
- %104 = phi float [ 0.000000e+00, %bb7 ], [ %89, %bb6 ] ; [#uses=2]
- %105 = phi float [ 0.000000e+00, %bb7 ], [ %92, %bb6 ] ; [#uses=2]
- %106 = phi float [ 0.000000e+00, %bb7 ], [ %95, %bb6 ] ; [#uses=2]
- %107 = fsub float -0.000000e+00, %44 ; [#uses=2]
- %108 = fsub float -0.000000e+00, %34 ; [#uses=2]
- %109 = fsub float -0.000000e+00, %38 ; [#uses=2]
- %110 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 0 ; [#uses=2]
- %111 = load float* %110, align 4 ; [#uses=2]
- %112 = fmul float %111, %108 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 1 ; [#uses=2]
- %114 = load float* %113, align 4 ; [#uses=2]
- %115 = fmul float %114, %109 ; [#uses=1]
- %116 = fsub float %112, %115 ; [#uses=6]
- %117 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 2 ; [#uses=2]
- %118 = load float* %117, align 4 ; [#uses=2]
- %119 = fmul float %118, %109 ; [#uses=1]
- %120 = fmul float %111, %107 ; [#uses=1]
- %121 = fsub float %119, %120 ; [#uses=6]
- %122 = fmul float %114, %107 ; [#uses=1]
- %123 = fmul float %118, %108 ; [#uses=1]
- %124 = fsub float %122, %123 ; [#uses=6]
- %125 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %124, float* %125, align 4
- %126 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %121, float* %126, align 4
- %127 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %116, float* %127, align 4
- %128 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %128, align 4
- br i1 %23, label %bb13, label %bb11
-
-bb11: ; preds = %bb8
- %129 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = fmul float %130, %124 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=1]
- %134 = fmul float %133, %121 ; [#uses=1]
- %135 = fadd float %131, %134 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=1]
- %138 = fmul float %137, %116 ; [#uses=1]
- %139 = fadd float %135, %138 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = fmul float %141, %124 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=1]
- %145 = fmul float %144, %121 ; [#uses=1]
- %146 = fadd float %142, %145 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=1]
- %149 = fmul float %148, %116 ; [#uses=1]
- %150 = fadd float %146, %149 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=1]
- %153 = fmul float %152, %124 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=1]
- %156 = fmul float %155, %121 ; [#uses=1]
- %157 = fadd float %153, %156 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fmul float %159, %116 ; [#uses=1]
- %161 = fadd float %157, %160 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %164 = fmul float %139, %163 ; [#uses=2]
- %165 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = fmul float %150, %166 ; [#uses=2]
- %168 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- %170 = fmul float %161, %169 ; [#uses=2]
- %171 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %170, float* %171, align 4
- %172 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %167, float* %172, align 4
- %173 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %164, float* %173, align 4
- %174 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %174, align 4
- br label %bb14
-
-bb13: ; preds = %bb8
- %175 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %175, align 4
- %176 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %176, align 4
- %177 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %177, align 4
- %178 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %178, align 4
- br label %bb14
-
-bb14: ; preds = %bb13, %bb11
- %179 = phi float [ 0.000000e+00, %bb13 ], [ %170, %bb11 ] ; [#uses=1]
- %180 = phi float [ 0.000000e+00, %bb13 ], [ %167, %bb11 ] ; [#uses=1]
- %181 = phi float [ 0.000000e+00, %bb13 ], [ %164, %bb11 ] ; [#uses=1]
- br i1 %20, label %bb17, label %bb15
-
-bb15: ; preds = %bb14
- %182 = load float* %36, align 4 ; [#uses=2]
- %183 = fmul float %106, %182 ; [#uses=1]
- %184 = load float* %32, align 4 ; [#uses=2]
- %185 = fmul float %105, %184 ; [#uses=1]
- %186 = fsub float %183, %185 ; [#uses=1]
- %187 = fmul float %104, %184 ; [#uses=1]
- %188 = load float* %41, align 4 ; [#uses=2]
- %189 = fmul float %106, %188 ; [#uses=1]
- %190 = fsub float %187, %189 ; [#uses=1]
- %191 = fmul float %105, %188 ; [#uses=1]
- %192 = fmul float %104, %182 ; [#uses=1]
- %193 = fsub float %191, %192 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 4 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=1]
- %196 = load float* %9, align 4 ; [#uses=1]
- %197 = fmul float %196, %193 ; [#uses=1]
- %198 = load float* %12, align 4 ; [#uses=1]
- %199 = fmul float %198, %190 ; [#uses=1]
- %200 = fadd float %197, %199 ; [#uses=1]
- %201 = load float* %15, align 4 ; [#uses=1]
- %202 = fmul float %201, %186 ; [#uses=1]
- %203 = fadd float %200, %202 ; [#uses=1]
- %204 = fadd float %195, %203 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb15, %bb14
- %denom0.0 = phi float [ %204, %bb15 ], [ 0.000000e+00, %bb14 ] ; [#uses=1]
- br i1 %23, label %bb20, label %bb18
-
-bb18: ; preds = %bb17
- %205 = fsub float -0.000000e+00, %181 ; [#uses=2]
- %206 = fsub float -0.000000e+00, %180 ; [#uses=2]
- %207 = fsub float -0.000000e+00, %179 ; [#uses=2]
- %208 = load float* %113, align 4 ; [#uses=2]
- %209 = fmul float %208, %207 ; [#uses=1]
- %210 = load float* %110, align 4 ; [#uses=2]
- %211 = fmul float %210, %206 ; [#uses=1]
- %212 = fsub float %209, %211 ; [#uses=1]
- %213 = fmul float %210, %205 ; [#uses=1]
- %214 = load float* %117, align 4 ; [#uses=2]
- %215 = fmul float %214, %207 ; [#uses=1]
- %216 = fsub float %213, %215 ; [#uses=1]
- %217 = fmul float %214, %206 ; [#uses=1]
- %218 = fmul float %208, %205 ; [#uses=1]
- %219 = fsub float %217, %218 ; [#uses=1]
- %220 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 4 ; [#uses=1]
- %221 = load float* %220, align 4 ; [#uses=1]
- %222 = load float* %9, align 4 ; [#uses=1]
- %223 = fmul float %222, %219 ; [#uses=1]
- %224 = load float* %12, align 4 ; [#uses=1]
- %225 = fmul float %224, %216 ; [#uses=1]
- %226 = fadd float %223, %225 ; [#uses=1]
- %227 = load float* %15, align 4 ; [#uses=1]
- %228 = fmul float %227, %212 ; [#uses=1]
- %229 = fadd float %226, %228 ; [#uses=1]
- %230 = fadd float %221, %229 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb18, %bb17
- %denom1.0 = phi float [ %230, %bb18 ], [ 0.000000e+00, %bb17 ] ; [#uses=1]
- %231 = fadd float %denom0.0, %denom1.0 ; [#uses=1]
- %232 = fdiv float %relaxation, %231 ; [#uses=2]
- %233 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 8 ; [#uses=1]
- store float %232, float* %233, align 4
- br i1 %20, label %bb28.thread, label %bb29
-
-bb28.thread: ; preds = %bb20
- %234 = fmul float %38, 0.000000e+00 ; [#uses=1]
- %235 = fmul float %34, 0.000000e+00 ; [#uses=1]
- %236 = fadd float %234, %235 ; [#uses=1]
- %237 = fmul float %44, 0.000000e+00 ; [#uses=1]
- %238 = fadd float %236, %237 ; [#uses=1]
- br label %bb31
-
-bb29: ; preds = %bb20
- %239 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %240 = load float* %239, align 4 ; [#uses=1]
- %241 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %242 = load float* %241, align 4 ; [#uses=1]
- %243 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = fmul float %38, %240 ; [#uses=1]
- %246 = fmul float %34, %242 ; [#uses=1]
- %247 = fadd float %245, %246 ; [#uses=1]
- %248 = fmul float %44, %244 ; [#uses=1]
- %249 = fadd float %247, %248 ; [#uses=1]
- %250 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %251 = load float* %250, align 4 ; [#uses=1]
- %252 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %253 = load float* %252, align 4 ; [#uses=1]
- %254 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=1]
- br label %bb31
-
-bb31: ; preds = %bb29, %bb28.thread
- %256 = phi float [ %249, %bb29 ], [ %238, %bb28.thread ] ; [#uses=1]
- %.0.2105.0 = phi float [ %255, %bb29 ], [ 0.000000e+00, %bb28.thread ] ; [#uses=1]
- %.0.1104.0 = phi float [ %253, %bb29 ], [ 0.000000e+00, %bb28.thread ] ; [#uses=1]
- %.0.0103.0 = phi float [ %251, %bb29 ], [ 0.000000e+00, %bb28.thread ] ; [#uses=1]
- %257 = fmul float %49, %.0.0103.0 ; [#uses=1]
- %258 = fmul float %46, %.0.1104.0 ; [#uses=1]
- %259 = fadd float %257, %258 ; [#uses=1]
- %260 = fmul float %40, %.0.2105.0 ; [#uses=1]
- %261 = fadd float %259, %260 ; [#uses=1]
- %262 = fadd float %256, %261 ; [#uses=1]
- br i1 %23, label %bb34.thread, label %bb35
-
-bb34.thread: ; preds = %bb31
- %263 = fmul float %124, 0.000000e+00 ; [#uses=1]
- %264 = fmul float %121, 0.000000e+00 ; [#uses=1]
- %265 = fadd float %263, %264 ; [#uses=1]
- %266 = fmul float %116, 0.000000e+00 ; [#uses=1]
- %267 = fadd float %265, %266 ; [#uses=1]
- br label %bb37
-
-bb35: ; preds = %bb31
- %268 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %269 = load float* %268, align 4 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %271 = load float* %270, align 4 ; [#uses=1]
- %272 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %273 = load float* %272, align 4 ; [#uses=1]
- %274 = fmul float %124, %269 ; [#uses=1]
- %275 = fmul float %121, %271 ; [#uses=1]
- %276 = fadd float %274, %275 ; [#uses=1]
- %277 = fmul float %116, %273 ; [#uses=1]
- %278 = fadd float %276, %277 ; [#uses=1]
- %279 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %280 = load float* %279, align 4 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %282 = load float* %281, align 4 ; [#uses=1]
- %283 = getelementptr inbounds %struct.btRigidBody* %7, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %284 = load float* %283, align 4 ; [#uses=1]
- br label %bb37
-
-bb37: ; preds = %bb35, %bb34.thread
- %285 = phi float [ %278, %bb35 ], [ %267, %bb34.thread ] ; [#uses=1]
- %.0.2119.0 = phi float [ %284, %bb35 ], [ 0.000000e+00, %bb34.thread ] ; [#uses=1]
- %.0.1118.0 = phi float [ %282, %bb35 ], [ 0.000000e+00, %bb34.thread ] ; [#uses=1]
- %.0.0117.0 = phi float [ %280, %bb35 ], [ 0.000000e+00, %bb34.thread ] ; [#uses=1]
- %286 = fmul float %38, %.0.0117.0 ; [#uses=1]
- %287 = fmul float %34, %.0.1118.0 ; [#uses=1]
- %288 = fadd float %286, %287 ; [#uses=1]
- %289 = fmul float %44, %.0.2119.0 ; [#uses=1]
- %290 = fadd float %288, %289 ; [#uses=1]
- %291 = fsub float %285, %290 ; [#uses=1]
- %292 = fadd float %262, %291 ; [#uses=1]
- %293 = fsub float %desiredVelocity, %292 ; [#uses=1]
- %294 = fmul float %232, %293 ; [#uses=1]
- %295 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 14 ; [#uses=1]
- store float %294, float* %295, align 4
- %296 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 15 ; [#uses=1]
- store float %cfmSlip, float* %296, align 4
- %297 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %297, align 4
- %298 = getelementptr inbounds %struct.btSolverConstraint* %solverConstraint, i32 0, i32 17 ; [#uses=1]
- store float 1.000000e+10, float* %298, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolverD0Ev(%struct.btSequentialImpulseConstraintSolver* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([12 x i32 (...)*]* @_ZTV35btSequentialImpulseConstraintSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 3 ; [#uses=3]
- %2 = load %struct.CONTACT_KEY_TOKEN** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.CONTACT_KEY_TOKEN* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.CONTACT_KEY_TOKEN* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad57
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- %8 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %11 = load i32** %10, align 4 ; [#uses=2]
- %12 = icmp eq i32* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i92
-
-bb.i.i.i92: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i91 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i91, label %bb2.i.i.i94, label %bb1.i.i.i93
-
-bb1.i.i.i93: ; preds = %bb.i.i.i92
- %15 = bitcast i32* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i94 unwind label %lpad53
-
-bb2.i.i.i94: ; preds = %bb1.i.i.i93, %bb.i.i.i92
- store i32* null, i32** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i94, %bb3
- %16 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store i32* null, i32** %10, align 4
- %17 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %20 = load i32** %19, align 4 ; [#uses=2]
- %21 = icmp eq i32* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i97
-
-bb.i.i.i97: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i96 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i96, label %bb2.i.i.i99, label %bb1.i.i.i98
-
-bb1.i.i.i98: ; preds = %bb.i.i.i97
- %24 = bitcast i32* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i99 unwind label %lpad49
-
-bb2.i.i.i99: ; preds = %bb1.i.i.i98, %bb.i.i.i97
- store i32* null, i32** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i99, %bb10
- %25 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store i32* null, i32** %19, align 4
- %26 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %29 = load %struct.btSolverConstraint** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btSolverConstraint* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i103
-
-bb.i.i.i103: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i102 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i102, label %bb2.i.i.i105, label %bb1.i.i.i104
-
-bb1.i.i.i104: ; preds = %bb.i.i.i103
- %33 = bitcast %struct.btSolverConstraint* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i105 unwind label %lpad45
-
-bb2.i.i.i105: ; preds = %bb1.i.i.i104, %bb.i.i.i103
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %28, align 4
- br label %bb28
-
-bb28: ; preds = %bb2.i.i.i105, %bb19
- %34 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %28, align 4
- %35 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- %37 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %38 = load %struct.btSolverConstraint** %37, align 4 ; [#uses=2]
- %39 = icmp eq %struct.btSolverConstraint* %38, null ; [#uses=1]
- br i1 %39, label %bb37, label %bb.i.i.i108
-
-bb.i.i.i108: ; preds = %bb28
- %40 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %41 = load i8* %40, align 4 ; [#uses=1]
- %toBool.i.i.i107 = icmp eq i8 %41, 0 ; [#uses=1]
- br i1 %toBool.i.i.i107, label %bb2.i.i.i110, label %bb1.i.i.i109
-
-bb1.i.i.i109: ; preds = %bb.i.i.i108
- %42 = bitcast %struct.btSolverConstraint* %38 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %42)
- to label %bb2.i.i.i110 unwind label %lpad
-
-bb2.i.i.i110: ; preds = %bb1.i.i.i109, %bb.i.i.i108
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %37, align 4
- br label %bb37
-
-invcont35: ; preds = %bb2.i.i.i127, %ppad
- %43 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %43, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %68, align 4
- %44 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %44, align 4
- %45 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %45, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.3)
- unreachable
-
-bb37: ; preds = %bb2.i.i.i110, %bb28
- %46 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %37, align 4
- %47 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %48, align 4
- %49 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %50 = load %struct.btSolverConstraint** %49, align 4 ; [#uses=2]
- %51 = icmp eq %struct.btSolverConstraint* %50, null ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit117, label %bb.i.i.i114
-
-bb.i.i.i114: ; preds = %bb37
- %52 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %53 = load i8* %52, align 4 ; [#uses=1]
- %toBool.i.i.i113 = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i113, label %bb2.i.i.i116, label %bb1.i.i.i115
-
-bb1.i.i.i115: ; preds = %bb.i.i.i114
- %54 = bitcast %struct.btSolverConstraint* %50 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %54)
- br label %bb2.i.i.i116
-
-bb2.i.i.i116: ; preds = %bb1.i.i.i115, %bb.i.i.i114
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %49, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit117
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit117: ; preds = %bb2.i.i.i116, %bb37
- %55 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %49, align 4
- %56 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- %58 = bitcast %struct.btSequentialImpulseConstraintSolver* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %58) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i109
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select44 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad45: ; preds = %bb1.i.i.i104
- %eh_ptr46 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select48 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr46, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad81
-
-lpad49: ; preds = %bb1.i.i.i98
- %eh_ptr50 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select52 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr50, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad82
-
-lpad53: ; preds = %bb1.i.i.i93
- %eh_ptr54 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select56 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr54, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad83
-
-lpad57: ; preds = %bb1.i.i.i
- %eh_ptr58 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select60 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr58, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %59 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %60 = load i32** %59, align 4 ; [#uses=2]
- %61 = icmp eq i32* %60, null ; [#uses=1]
- br i1 %61, label %_ZN20btAlignedObjectArrayIiED1Ev.exit123, label %bb.i.i.i119
-
-bb.i.i.i119: ; preds = %lpad57
- %62 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %63 = load i8* %62, align 4 ; [#uses=1]
- %toBool.i.i.i118 = icmp eq i8 %63, 0 ; [#uses=1]
- br i1 %toBool.i.i.i118, label %bb2.i.i.i121, label %bb1.i.i.i120
-
-bb1.i.i.i120: ; preds = %bb.i.i.i119
- %64 = bitcast i32* %60 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %64)
- to label %bb2.i.i.i121 unwind label %lpad61
-
-bb2.i.i.i121: ; preds = %bb1.i.i.i120, %bb.i.i.i119
- store i32* null, i32** %59, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit123
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit123: ; preds = %bb2.i.i.i121, %lpad57
- %65 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %65, align 4
- store i32* null, i32** %59, align 4
- %66 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %66, align 4
- %67 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %67, align 4
- br label %ppad83
-
-lpad61: ; preds = %bb1.i.i.i120
- %eh_ptr62 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select64 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr62, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad65: ; preds = %bb1.i.i.i144
- %eh_ptr66 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select68 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr66, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad69: ; preds = %bb1.i.i.i138
- %eh_ptr70 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select72 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr70, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad73: ; preds = %bb1.i.i.i132
- %eh_ptr74 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select76 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr74, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad77: ; preds = %bb1.i.i.i126
- %eh_ptr78 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select80 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr78, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135, %lpad
- %eh_exception.3 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.2, %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135 ] ; [#uses=1]
- %68 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %69 = load %struct.btSolverConstraint** %68, align 4 ; [#uses=2]
- %70 = icmp eq %struct.btSolverConstraint* %69, null ; [#uses=1]
- br i1 %70, label %invcont35, label %bb.i.i.i125
-
-bb.i.i.i125: ; preds = %ppad
- %71 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %72 = load i8* %71, align 4 ; [#uses=1]
- %toBool.i.i.i124 = icmp eq i8 %72, 0 ; [#uses=1]
- br i1 %toBool.i.i.i124, label %bb2.i.i.i127, label %bb1.i.i.i126
-
-bb1.i.i.i126: ; preds = %bb.i.i.i125
- %73 = bitcast %struct.btSolverConstraint* %69 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %73)
- to label %bb2.i.i.i127 unwind label %lpad77
-
-bb2.i.i.i127: ; preds = %bb1.i.i.i126, %bb.i.i.i125
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %68, align 4
- br label %invcont35
-
-ppad81: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141, %lpad45
- %eh_exception.2 = phi i8* [ %eh_ptr46, %lpad45 ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141 ] ; [#uses=1]
- %74 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %75 = load %struct.btSolverConstraint** %74, align 4 ; [#uses=2]
- %76 = icmp eq %struct.btSolverConstraint* %75, null ; [#uses=1]
- br i1 %76, label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135, label %bb.i.i.i131
-
-bb.i.i.i131: ; preds = %ppad81
- %77 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %78 = load i8* %77, align 4 ; [#uses=1]
- %toBool.i.i.i130 = icmp eq i8 %78, 0 ; [#uses=1]
- br i1 %toBool.i.i.i130, label %bb2.i.i.i133, label %bb1.i.i.i132
-
-bb1.i.i.i132: ; preds = %bb.i.i.i131
- %79 = bitcast %struct.btSolverConstraint* %75 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %79)
- to label %bb2.i.i.i133 unwind label %lpad73
-
-bb2.i.i.i133: ; preds = %bb1.i.i.i132, %bb.i.i.i131
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %74, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135: ; preds = %bb2.i.i.i133, %ppad81
- %80 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %80, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %74, align 4
- %81 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %81, align 4
- %82 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %82, align 4
- br label %ppad
-
-ppad82: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit147, %lpad49
- %eh_exception.1 = phi i8* [ %eh_ptr50, %lpad49 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIiED1Ev.exit147 ] ; [#uses=1]
- %83 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %84 = load %struct.btSolverConstraint** %83, align 4 ; [#uses=2]
- %85 = icmp eq %struct.btSolverConstraint* %84, null ; [#uses=1]
- br i1 %85, label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141, label %bb.i.i.i137
-
-bb.i.i.i137: ; preds = %ppad82
- %86 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %87 = load i8* %86, align 4 ; [#uses=1]
- %toBool.i.i.i136 = icmp eq i8 %87, 0 ; [#uses=1]
- br i1 %toBool.i.i.i136, label %bb2.i.i.i139, label %bb1.i.i.i138
-
-bb1.i.i.i138: ; preds = %bb.i.i.i137
- %88 = bitcast %struct.btSolverConstraint* %84 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %88)
- to label %bb2.i.i.i139 unwind label %lpad69
-
-bb2.i.i.i139: ; preds = %bb1.i.i.i138, %bb.i.i.i137
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %83, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141: ; preds = %bb2.i.i.i139, %ppad82
- %89 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %89, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %83, align 4
- %90 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %90, align 4
- %91 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %91, align 4
- br label %ppad81
-
-ppad83: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit123, %lpad53
- %eh_exception.0 = phi i8* [ %eh_ptr54, %lpad53 ], [ %eh_ptr58, %_ZN20btAlignedObjectArrayIiED1Ev.exit123 ] ; [#uses=1]
- %92 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %93 = load i32** %92, align 4 ; [#uses=2]
- %94 = icmp eq i32* %93, null ; [#uses=1]
- br i1 %94, label %_ZN20btAlignedObjectArrayIiED1Ev.exit147, label %bb.i.i.i143
-
-bb.i.i.i143: ; preds = %ppad83
- %95 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %96 = load i8* %95, align 4 ; [#uses=1]
- %toBool.i.i.i142 = icmp eq i8 %96, 0 ; [#uses=1]
- br i1 %toBool.i.i.i142, label %bb2.i.i.i145, label %bb1.i.i.i144
-
-bb1.i.i.i144: ; preds = %bb.i.i.i143
- %97 = bitcast i32* %93 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %97)
- to label %bb2.i.i.i145 unwind label %lpad65
-
-bb2.i.i.i145: ; preds = %bb1.i.i.i144, %bb.i.i.i143
- store i32* null, i32** %92, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit147
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit147: ; preds = %bb2.i.i.i145, %ppad83
- %98 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %98, align 4
- store i32* null, i32** %92, align 4
- %99 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %99, align 4
- %100 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %100, align 4
- br label %ppad82
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolverD1Ev(%struct.btSequentialImpulseConstraintSolver* nocapture %this) align 2 {
-entry:
- tail call void @_ZN35btSequentialImpulseConstraintSolverD2Ev(%struct.btSequentialImpulseConstraintSolver* %this)
- ret void
-}
-
-; [#uses=1]
-define float @_ZN35btSequentialImpulseConstraintSolver10solveGroupEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAllocP12btDispatcher(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** %constraints, i32 %numConstraints, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %debugDrawer, %struct.btStackAlloc* %stackAlloc, %struct.btActionInterface* nocapture %unnamed_arg) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([11 x i8]* @.str619, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 0, i32 0 ; [#uses=3]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 8 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to float (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* ; [#uses=1]
- %5 = invoke float %4(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** %constraints, i32 %numConstraints, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %debugDrawer, %struct.btStackAlloc* %stackAlloc)
- to label %invcont unwind label %lpad ; [#uses=0]
-
-invcont: ; preds = %entry
- %6 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 9 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to float (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* ; [#uses=1]
- %10 = invoke float %9(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** %constraints, i32 %numConstraints, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %debugDrawer, %struct.btStackAlloc* %stackAlloc)
- to label %invcont1 unwind label %lpad ; [#uses=0]
-
-invcont1: ; preds = %invcont
- %11 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 7 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to float (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* ; [#uses=1]
- %15 = invoke float %14(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** %constraints, i32 %numConstraints, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %debugDrawer, %struct.btStackAlloc* %stackAlloc)
- to label %invcont2 unwind label %lpad ; [#uses=0]
-
-invcont2: ; preds = %invcont1
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret float 0.000000e+00
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %invcont1, %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont3 unwind label %lpad8
-
-lpad8: ; preds = %lpad
- %eh_ptr9 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr9, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN35btSequentialImpulseConstraintSolver29solveGroupCacheFriendlyFinishEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btCollisionObject** nocapture %bodies, i32 %numBodies, %struct.btPersistentManifold** nocapture %unnamed_arg, i32 %unnamed_arg2, %struct.btTypedConstraint** nocapture %unnamed_arg4, i32 %unnamed_arg6, %struct.btContactSolverInfo* nocapture %infoGlobal, %struct.btActionInterface* nocapture %unnamed_arg8, %struct.btStackAlloc* nocapture %unnamed_arg10) align 2 {
-entry:
- %0 = alloca %struct.btSolverConstraint, align 8 ; [#uses=1]
- %1 = alloca %struct.btSolverConstraint, align 8 ; [#uses=1]
- %2 = alloca %struct.btSolverConstraint, align 8 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=3]
- %4 = load i32* %3, align 4 ; [#uses=2]
- %5 = icmp sgt i32 %4, 0 ; [#uses=1]
- br i1 %5, label %bb.nph103, label %bb14
-
-bb.nph103: ; preds = %entry
- %6 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 15 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb12, %bb.nph103
- %j.0102 = phi i32 [ 0, %bb.nph103 ], [ %30, %bb12 ] ; [#uses=4]
- %9 = load %struct.btSolverConstraint** %6, align 4 ; [#uses=3]
- %scevgep121 = getelementptr %struct.btSolverConstraint* %9, i32 %j.0102, i32 13, i32 0 ; [#uses=1]
- %10 = load i8** %scevgep121, align 4 ; [#uses=3]
- %scevgep122 = getelementptr %struct.btSolverConstraint* %9, i32 %j.0102, i32 6 ; [#uses=1]
- %11 = load float* %scevgep122, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i8* %10, i32 112 ; [#uses=1]
- %13 = bitcast i8* %12 to float* ; [#uses=1]
- store float %11, float* %13, align 4
- %14 = load i32* %7, align 4 ; [#uses=1]
- %15 = and i32 %14, 8 ; [#uses=1]
- %16 = icmp eq i32 %15, 0 ; [#uses=1]
- br i1 %16, label %bb12, label %bb11
-
-bb11: ; preds = %bb
- %scevgep123 = getelementptr %struct.btSolverConstraint* %9, i32 %j.0102, i32 10, i32 0 ; [#uses=2]
- %17 = load i32* %scevgep123, align 4 ; [#uses=1]
- %18 = load %struct.btSolverConstraint** %8, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btSolverConstraint* %18, i32 %17, i32 6 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i8* %10, i32 120 ; [#uses=1]
- %22 = bitcast i8* %21 to float* ; [#uses=1]
- store float %20, float* %22, align 4
- %23 = load i32* %scevgep123, align 4 ; [#uses=1]
- %24 = add nsw i32 %23, 1 ; [#uses=1]
- %25 = load %struct.btSolverConstraint** %8, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btSolverConstraint* %25, i32 %24, i32 6 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i8* %10, i32 124 ; [#uses=1]
- %29 = bitcast i8* %28 to float* ; [#uses=1]
- store float %27, float* %29, align 4
- br label %bb12
-
-bb12: ; preds = %bb11, %bb
- %30 = add nsw i32 %j.0102, 1 ; [#uses=2]
- %exitcond120 = icmp eq i32 %30, %4 ; [#uses=1]
- br i1 %exitcond120, label %bb14, label %bb
-
-bb14: ; preds = %bb12, %entry
- %31 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=3]
- %32 = load i32* %31, align 4 ; [#uses=2]
- %33 = icmp sgt i32 %32, 0 ; [#uses=1]
- br i1 %33, label %bb.nph101, label %bb17
-
-bb.nph101: ; preds = %bb14
- %34 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb15, %bb.nph101
- %j.1100 = phi i32 [ 0, %bb.nph101 ], [ %42, %bb15 ] ; [#uses=3]
- %35 = load %struct.btSolverConstraint** %34, align 4 ; [#uses=2]
- %scevgep118 = getelementptr %struct.btSolverConstraint* %35, i32 %j.1100, i32 13, i32 0 ; [#uses=1]
- %36 = load i8** %scevgep118, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i8* %36, i32 28 ; [#uses=1]
- %38 = bitcast i8* %37 to float* ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=1]
- %scevgep119 = getelementptr %struct.btSolverConstraint* %35, i32 %j.1100, i32 6 ; [#uses=1]
- %40 = load float* %scevgep119, align 4 ; [#uses=1]
- %41 = fadd float %40, %39 ; [#uses=1]
- store float %41, float* %38, align 4
- %42 = add nsw i32 %j.1100, 1 ; [#uses=2]
- %exitcond117 = icmp eq i32 %42, %32 ; [#uses=1]
- br i1 %exitcond117, label %bb17, label %bb15
-
-bb17: ; preds = %bb15, %bb14
- %43 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 11 ; [#uses=1]
- %44 = load i32* %43, align 4 ; [#uses=1]
- %45 = icmp eq i32 %44, 0 ; [#uses=1]
- %46 = icmp sgt i32 %numBodies, 0 ; [#uses=2]
- br i1 %45, label %bb28.preheader, label %bb22.preheader
-
-bb28.preheader: ; preds = %bb17
- br i1 %46, label %bb24, label %bb29
-
-bb22.preheader: ; preds = %bb17
- br i1 %46, label %bb.nph, label %bb29
-
-bb.nph: ; preds = %bb22.preheader
- %47 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb21, %bb.nph
- %i.096 = phi i32 [ 0, %bb.nph ], [ %54, %bb21 ] ; [#uses=2]
- %scevgep = getelementptr %struct.btCollisionObject** %bodies, i32 %i.096 ; [#uses=1]
- %48 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=3]
- %49 = getelementptr inbounds %struct.btCollisionObject* %48, i32 0, i32 19 ; [#uses=1]
- %50 = load i32* %49, align 4 ; [#uses=1]
- %.lobit.i = and i32 %50, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %51 = icmp eq %struct.btCollisionObject* %48, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %51 ; [#uses=1]
- br i1 %or.cond, label %bb21, label %bb20
-
-bb20: ; preds = %bb19
- %52 = bitcast %struct.btCollisionObject* %48 to %struct.btRigidBody* ; [#uses=1]
- %53 = load float* %47, align 4 ; [#uses=1]
- call void @_ZN11btRigidBody25internalWritebackVelocityEf(%struct.btRigidBody* %52, float %53)
- br label %bb21
-
-bb21: ; preds = %bb20, %bb19
- %54 = add nsw i32 %i.096, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %54, %numBodies ; [#uses=1]
- br i1 %exitcond, label %bb29, label %bb19
-
-bb24: ; preds = %bb27, %bb28.preheader
- %i.198 = phi i32 [ %96, %bb27 ], [ 0, %bb28.preheader ] ; [#uses=2]
- %scevgep116 = getelementptr %struct.btCollisionObject** %bodies, i32 %i.198 ; [#uses=1]
- %55 = load %struct.btCollisionObject** %scevgep116, align 4 ; [#uses=17]
- %56 = getelementptr inbounds %struct.btCollisionObject* %55, i32 0, i32 19 ; [#uses=1]
- %57 = load i32* %56, align 4 ; [#uses=1]
- %.lobit.i89 = and i32 %57, 2 ; [#uses=1]
- %toBool.i90 = icmp eq i32 %.lobit.i89, 0 ; [#uses=1]
- %58 = icmp eq %struct.btCollisionObject* %55, null ; [#uses=1]
- %or.cond95 = or i1 %toBool.i90, %58 ; [#uses=1]
- br i1 %or.cond95, label %bb27, label %bb26
-
-bb26: ; preds = %bb24
- %59 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = fcmp une float %60, 0.000000e+00 ; [#uses=1]
- br i1 %61, label %bb.i94, label %bb27
-
-bb.i94: ; preds = %bb26
- %62 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btCollisionObject* %55, i32 2 ; [#uses=1]
- %65 = bitcast %struct.btCollisionObject* %64 to float* ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fadd float %63, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 24 ; [#uses=1]
- %71 = bitcast i32* %70 to float* ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fadd float %69, %72 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 23 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fadd float %75, %77 ; [#uses=1]
- store float %78, float* %74, align 4
- store float %73, float* %68, align 4
- store float %67, float* %62, align 4
- %79 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %79, align 4
- %80 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btCollisionObject* %55, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fadd float %81, %83 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %86 = load float* %85, align 4 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btCollisionObject* %55, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fadd float %86, %88 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 1, i32 1, i32 0, i32 3 ; [#uses=2]
- %91 = load float* %90, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btCollisionObject* %55, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = fadd float %91, %93 ; [#uses=1]
- store float %94, float* %90, align 4
- store float %89, float* %85, align 4
- store float %84, float* %80, align 4
- %95 = getelementptr inbounds %struct.btCollisionObject* %55, i32 1, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %95, align 4
- br label %bb27
-
-bb27: ; preds = %bb.i94, %bb26, %bb24
- %96 = add nsw i32 %i.198, 1 ; [#uses=2]
- %exitcond115 = icmp eq i32 %96, %numBodies ; [#uses=1]
- br i1 %exitcond115, label %bb29, label %bb24
-
-bb29: ; preds = %bb27, %bb21, %bb22.preheader, %bb28.preheader
- %97 = load i32* %3, align 4 ; [#uses=4]
- %98 = icmp sgt i32 %97, 0 ; [#uses=1]
- %.not = xor i1 %98, true ; [#uses=1]
- %99 = icmp slt i32 %97, 0 ; [#uses=1]
- %or.cond125 = and i1 %.not, %99 ; [#uses=1]
- br i1 %or.cond125, label %bb4.i61, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit88
-
-bb4.i61: ; preds = %bb29
- %100 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %101 = load i32* %100, align 4 ; [#uses=1]
- %102 = icmp slt i32 %101, 0 ; [#uses=1]
- br i1 %102, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i63, label %bb.nph.i80
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i63: ; preds = %bb4.i61
- %103 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %104 = load %struct.btSolverConstraint** %103, align 4 ; [#uses=2]
- %105 = icmp eq %struct.btSolverConstraint* %104, null ; [#uses=1]
- br i1 %105, label %bb8.preheader.i78, label %bb.i.i.i75
-
-bb.i.i.i75: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i63
- %106 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %107 = load i8* %106, align 4 ; [#uses=1]
- %toBool.i.i.i74 = icmp eq i8 %107, 0 ; [#uses=1]
- br i1 %toBool.i.i.i74, label %bb2.i.i.i77, label %bb1.i.i.i76
-
-bb1.i.i.i76: ; preds = %bb.i.i.i75
- %108 = bitcast %struct.btSolverConstraint* %104 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %108)
- br label %bb2.i.i.i77
-
-bb2.i.i.i77: ; preds = %bb1.i.i.i76, %bb.i.i.i75
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %103, align 4
- br label %bb8.preheader.i78
-
-bb8.preheader.i78: ; preds = %bb2.i.i.i77, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i63
- %109 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %109, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %103, align 4
- store i32 0, i32* %100, align 4
- br label %bb.nph.i80
-
-bb.nph.i80: ; preds = %bb8.preheader.i78, %bb4.i61
- %110 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %111 = bitcast %struct.btSolverConstraint* %2 to i8* ; [#uses=1]
- %tmp.i79 = sub i32 0, %97 ; [#uses=1]
- br label %bb7.i87
-
-bb7.i87: ; preds = %bb7.i87, %bb.nph.i80
- %indvar.i81 = phi i32 [ 0, %bb.nph.i80 ], [ %indvar.next.i85, %bb7.i87 ] ; [#uses=2]
- %tmp = add i32 %97, %indvar.i81 ; [#uses=1]
- %112 = load %struct.btSolverConstraint** %110, align 4 ; [#uses=1]
- %scevgep105 = getelementptr %struct.btSolverConstraint* %112, i32 %tmp ; [#uses=1]
- %scevgep15.i84 = bitcast %struct.btSolverConstraint* %scevgep105 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep15.i84, i8* %111, i32 136, i32 4, i1 false)
- %indvar.next.i85 = add i32 %indvar.i81, 1 ; [#uses=2]
- %exitcond104 = icmp eq i32 %indvar.next.i85, %tmp.i79 ; [#uses=1]
- br i1 %exitcond104, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit88, label %bb7.i87
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit88: ; preds = %bb7.i87, %bb29
- store i32 0, i32* %3, align 4
- %113 = load i32* %31, align 4 ; [#uses=4]
- %114 = icmp sgt i32 %113, 0 ; [#uses=1]
- %.not126 = xor i1 %114, true ; [#uses=1]
- %115 = icmp slt i32 %113, 0 ; [#uses=1]
- %or.cond127 = and i1 %.not126, %115 ; [#uses=1]
- br i1 %or.cond127, label %bb4.i32, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit59
-
-bb4.i32: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit88
- %116 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- %117 = load i32* %116, align 4 ; [#uses=1]
- %118 = icmp slt i32 %117, 0 ; [#uses=1]
- br i1 %118, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i34, label %bb.nph.i51
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i34: ; preds = %bb4.i32
- %119 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %120 = load %struct.btSolverConstraint** %119, align 4 ; [#uses=2]
- %121 = icmp eq %struct.btSolverConstraint* %120, null ; [#uses=1]
- br i1 %121, label %bb8.preheader.i49, label %bb.i.i.i46
-
-bb.i.i.i46: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i34
- %122 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %123 = load i8* %122, align 4 ; [#uses=1]
- %toBool.i.i.i45 = icmp eq i8 %123, 0 ; [#uses=1]
- br i1 %toBool.i.i.i45, label %bb2.i.i.i48, label %bb1.i.i.i47
-
-bb1.i.i.i47: ; preds = %bb.i.i.i46
- %124 = bitcast %struct.btSolverConstraint* %120 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %124)
- br label %bb2.i.i.i48
-
-bb2.i.i.i48: ; preds = %bb1.i.i.i47, %bb.i.i.i46
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %119, align 4
- br label %bb8.preheader.i49
-
-bb8.preheader.i49: ; preds = %bb2.i.i.i48, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i34
- %125 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %125, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %119, align 4
- store i32 0, i32* %116, align 4
- br label %bb.nph.i51
-
-bb.nph.i51: ; preds = %bb8.preheader.i49, %bb4.i32
- %126 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %127 = bitcast %struct.btSolverConstraint* %1 to i8* ; [#uses=1]
- %tmp.i50 = sub i32 0, %113 ; [#uses=1]
- br label %bb7.i58
-
-bb7.i58: ; preds = %bb7.i58, %bb.nph.i51
- %indvar.i52 = phi i32 [ 0, %bb.nph.i51 ], [ %indvar.next.i56, %bb7.i58 ] ; [#uses=2]
- %tmp108 = add i32 %113, %indvar.i52 ; [#uses=1]
- %128 = load %struct.btSolverConstraint** %126, align 4 ; [#uses=1]
- %scevgep109 = getelementptr %struct.btSolverConstraint* %128, i32 %tmp108 ; [#uses=1]
- %scevgep15.i55 = bitcast %struct.btSolverConstraint* %scevgep109 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep15.i55, i8* %127, i32 136, i32 4, i1 false)
- %indvar.next.i56 = add i32 %indvar.i52, 1 ; [#uses=2]
- %exitcond107 = icmp eq i32 %indvar.next.i56, %tmp.i50 ; [#uses=1]
- br i1 %exitcond107, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit59, label %bb7.i58
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit59: ; preds = %bb7.i58, %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit88
- store i32 0, i32* %31, align 4
- %129 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=2]
- %130 = load i32* %129, align 4 ; [#uses=4]
- %131 = icmp sgt i32 %130, 0 ; [#uses=1]
- %.not128 = xor i1 %131, true ; [#uses=1]
- %132 = icmp slt i32 %130, 0 ; [#uses=1]
- %or.cond129 = and i1 %.not128, %132 ; [#uses=1]
- br i1 %or.cond129, label %bb4.i, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit
-
-bb4.i: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit59
- %133 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=2]
- %134 = load i32* %133, align 4 ; [#uses=1]
- %135 = icmp slt i32 %134, 0 ; [#uses=1]
- br i1 %135, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i: ; preds = %bb4.i
- %136 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %137 = load %struct.btSolverConstraint** %136, align 4 ; [#uses=2]
- %138 = icmp eq %struct.btSolverConstraint* %137, null ; [#uses=1]
- br i1 %138, label %bb8.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %139 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %140 = load i8* %139, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %140, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %141 = bitcast %struct.btSolverConstraint* %137 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %141)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %136, align 4
- br label %bb8.preheader.i
-
-bb8.preheader.i: ; preds = %bb2.i.i.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %142 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %142, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %136, align 4
- store i32 0, i32* %133, align 4
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb8.preheader.i, %bb4.i
- %143 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %144 = bitcast %struct.btSolverConstraint* %0 to i8* ; [#uses=1]
- %tmp.i = sub i32 0, %130 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb7.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb7.i ] ; [#uses=2]
- %tmp112 = add i32 %130, %indvar.i ; [#uses=1]
- %145 = load %struct.btSolverConstraint** %143, align 4 ; [#uses=1]
- %scevgep113 = getelementptr %struct.btSolverConstraint* %145, i32 %tmp112 ; [#uses=1]
- %scevgep15.i = bitcast %struct.btSolverConstraint* %scevgep113 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep15.i, i8* %144, i32 136, i32 4, i1 false)
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond111 = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond111, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit: ; preds = %bb7.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit59
- store i32 0, i32* %129, align 4
- ret float 0.000000e+00
-}
-
-; [#uses=1]
-define float @_ZN35btSequentialImpulseConstraintSolver28solveGroupCacheFriendlySetupEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btCollisionObject** nocapture %bodies, i32 %numBodies, %struct.btPersistentManifold** nocapture %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** nocapture %constraints, i32 %numConstraints, %struct.btContactSolverInfo* nocapture %infoGlobal, %struct.btActionInterface* nocapture %debugDrawer, %struct.btStackAlloc* nocapture %stackAlloc) align 2 {
-entry:
- %0 = alloca i32, align 4 ; [#uses=2]
- %1 = alloca i32, align 4 ; [#uses=2]
- %2 = alloca %struct.btSolverConstraint, align 8 ; [#uses=1]
- %3 = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %info2 = alloca %"struct.btTypedConstraint::btConstraintInfo2", align 8 ; [#uses=14]
- call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([29 x i8]* @.str28, i32 0, i32 0))
- %4 = sub i32 0, %numManifolds ; [#uses=1]
- %5 = icmp eq i32 %numConstraints, %4 ; [#uses=1]
- br i1 %5, label %bb77, label %bb1
-
-bb1: ; preds = %entry
- %6 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 11 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = icmp eq i32 %7, 0 ; [#uses=1]
- %9 = icmp sgt i32 %numBodies, 0 ; [#uses=2]
- br i1 %8, label %bb13.preheader, label %bb6.preheader
-
-bb13.preheader: ; preds = %bb1
- br i1 %9, label %bb9, label %bb16
-
-bb6.preheader: ; preds = %bb1
- br i1 %9, label %bb3, label %bb16
-
-bb3: ; preds = %bb5, %bb6.preheader
- %i.0168 = phi i32 [ %26, %bb5 ], [ 0, %bb6.preheader ] ; [#uses=2]
- %scevgep = getelementptr %struct.btCollisionObject** %bodies, i32 %i.0168 ; [#uses=1]
- %10 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=11]
- %11 = getelementptr inbounds %struct.btCollisionObject* %10, i32 0, i32 19 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %.lobit.i = and i32 %12, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %13 = icmp eq %struct.btCollisionObject* %10, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %13 ; [#uses=1]
- br i1 %or.cond, label %bb5, label %bb4
-
-bb4: ; preds = %bb3
- %14 = getelementptr inbounds %struct.btCollisionObject* %10, i32 1, i32 23 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btCollisionObject* %10, i32 1, i32 24 ; [#uses=1]
- %16 = bitcast i32* %15 to float* ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btCollisionObject* %10, i32 2 ; [#uses=1]
- %18 = bitcast %struct.btCollisionObject* %17 to float* ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btCollisionObject* %10, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btCollisionObject* %10, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btCollisionObject* %10, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btCollisionObject* %10, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btCollisionObject* %10, i32 2, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btCollisionObject* %10, i32 2, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = bitcast float* %24 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %25, i8 0, i64 32, i32 4, i1 false)
- br label %bb5
-
-bb5: ; preds = %bb4, %bb3
- %26 = add nsw i32 %i.0168, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %26, %numBodies ; [#uses=1]
- br i1 %exitcond, label %bb16, label %bb3
-
-bb9: ; preds = %bb12, %bb13.preheader
- %i8.0181 = phi i32 [ %41, %bb12 ], [ 0, %bb13.preheader ] ; [#uses=2]
- %scevgep253 = getelementptr %struct.btCollisionObject** %bodies, i32 %i8.0181 ; [#uses=1]
- %27 = load %struct.btCollisionObject** %scevgep253, align 4 ; [#uses=10]
- %28 = getelementptr inbounds %struct.btCollisionObject* %27, i32 0, i32 19 ; [#uses=1]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %.lobit.i108 = and i32 %29, 2 ; [#uses=1]
- %toBool.i109 = icmp eq i32 %.lobit.i108, 0 ; [#uses=1]
- %30 = icmp eq %struct.btCollisionObject* %27, null ; [#uses=1]
- %or.cond167 = or i1 %toBool.i109, %30 ; [#uses=1]
- br i1 %or.cond167, label %bb12, label %bb11
-
-bb11: ; preds = %bb9
- %31 = getelementptr inbounds %struct.btCollisionObject* %27, i32 1, i32 23 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btCollisionObject* %27, i32 1, i32 24 ; [#uses=1]
- %33 = bitcast i32* %32 to float* ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btCollisionObject* %27, i32 2 ; [#uses=1]
- %35 = bitcast %struct.btCollisionObject* %34 to float* ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btCollisionObject* %27, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 4
- %37 = getelementptr inbounds %struct.btCollisionObject* %27, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btCollisionObject* %27, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 4
- %39 = getelementptr inbounds %struct.btCollisionObject* %27, i32 2, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- %40 = getelementptr inbounds %struct.btCollisionObject* %27, i32 2, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 4
- br label %bb12
-
-bb12: ; preds = %bb11, %bb9
- %41 = add nsw i32 %i8.0181, 1 ; [#uses=2]
- %exitcond252 = icmp eq i32 %41, %numBodies ; [#uses=1]
- br i1 %exitcond252, label %bb16, label %bb9
-
-bb15: ; preds = %bb16
- %scevgep251 = getelementptr %struct.btTypedConstraint** %constraints, i32 %49 ; [#uses=1]
- %42 = load %struct.btTypedConstraint** %scevgep251, align 4 ; [#uses=2]
- %43 = getelementptr inbounds %struct.btTypedConstraint* %42, i32 0, i32 0 ; [#uses=1]
- %44 = load i32 (...)*** %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds i32 (...)** %44, i32 2 ; [#uses=1]
- %46 = load i32 (...)** %45, align 4 ; [#uses=1]
- %47 = bitcast i32 (...)* %46 to void (%struct.btTypedConstraint*)* ; [#uses=1]
- invoke void %47(%struct.btTypedConstraint* %42)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb15
- %48 = add nsw i32 %49, 1 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %invcont, %bb12, %bb5, %bb6.preheader, %bb13.preheader
- %49 = phi i32 [ %48, %invcont ], [ 0, %bb13.preheader ], [ 0, %bb12 ], [ 0, %bb6.preheader ], [ 0, %bb5 ] ; [#uses=3]
- %50 = icmp slt i32 %49, %numConstraints ; [#uses=1]
- br i1 %50, label %bb15, label %bb17
-
-bb17: ; preds = %bb16
- %51 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %3, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %51, align 8
- %52 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %3, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %52, align 4
- %53 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE6resizeEiRKS1_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %53, i32 %numConstraints, %struct.CONTACT_KEY_TOKEN* %3) inlinehint
- to label %bb22.preheader unwind label %lpad
-
-bb22.preheader: ; preds = %bb17
- %54 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 3 ; [#uses=3]
- br label %bb22
-
-bb20: ; preds = %bb22
- %scevgep250 = getelementptr %struct.btTypedConstraint** %constraints, i32 %65 ; [#uses=1]
- %55 = load %struct.CONTACT_KEY_TOKEN** %54, align 4 ; [#uses=2]
- %56 = load %struct.btTypedConstraint** %scevgep250, align 4 ; [#uses=2]
- %57 = getelementptr inbounds %struct.btTypedConstraint* %56, i32 0, i32 0 ; [#uses=1]
- %58 = load i32 (...)*** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 4 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to void (%struct.btTypedConstraint*, %struct.CONTACT_KEY_TOKEN*)* ; [#uses=1]
- %scevgep249 = getelementptr %struct.CONTACT_KEY_TOKEN* %55, i32 %65 ; [#uses=1]
- invoke void %61(%struct.btTypedConstraint* %56, %struct.CONTACT_KEY_TOKEN* %scevgep249)
- to label %invcont21 unwind label %lpad
-
-invcont21: ; preds = %bb20
- %scevgep247248 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %55, i32 %65, i32 0 ; [#uses=1]
- %62 = load i32* %scevgep247248, align 4 ; [#uses=1]
- %63 = add nsw i32 %62, %totalNumRows.0 ; [#uses=1]
- %64 = add nsw i32 %65, 1 ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %invcont21, %bb22.preheader
- %totalNumRows.0 = phi i32 [ %63, %invcont21 ], [ 0, %bb22.preheader ] ; [#uses=9]
- %65 = phi i32 [ %64, %invcont21 ], [ 0, %bb22.preheader ] ; [#uses=5]
- %66 = icmp slt i32 %65, %numConstraints ; [#uses=1]
- br i1 %66, label %bb20, label %bb23
-
-bb23: ; preds = %bb22
- %67 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=3]
- %68 = load i32* %67, align 4 ; [#uses=5]
- %69 = icmp sgt i32 %68, %totalNumRows.0 ; [#uses=1]
- br i1 %69, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit, label %bb3.i
-
-bb3.i: ; preds = %bb23
- %70 = icmp slt i32 %68, %totalNumRows.0 ; [#uses=2]
- br i1 %70, label %bb4.i, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit
-
-bb4.i: ; preds = %bb3.i
- %71 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- %72 = load i32* %71, align 4 ; [#uses=1]
- %73 = icmp slt i32 %72, %totalNumRows.0 ; [#uses=1]
- br i1 %73, label %bb.i.i, label %bb.nph.i
-
-bb.i.i: ; preds = %bb4.i
- %74 = icmp eq i32 %totalNumRows.0, 0 ; [#uses=1]
- br i1 %74, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %75 = mul i32 %totalNumRows.0, 136 ; [#uses=1]
- %76 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %75, i32 16)
- to label %.noexc unwind label %lpad ; [#uses=1]
-
-.noexc: ; preds = %bb.i2.i.i
- %phitmp.i.i = bitcast i8* %76 to %struct.btSolverConstraint* ; [#uses=1]
- %.pre.i = load i32* %67, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i: ; preds = %.noexc, %bb.i.i
- %77 = phi i32 [ %.pre.i, %.noexc ], [ %68, %bb.i.i ] ; [#uses=2]
- %78 = phi %struct.btSolverConstraint* [ %phitmp.i.i, %.noexc ], [ null, %bb.i.i ] ; [#uses=2]
- %79 = icmp sgt i32 %77, 0 ; [#uses=1]
- br i1 %79, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %80 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep191 = getelementptr %struct.btSolverConstraint* %78, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btSolverConstraint* %scevgep191 to i8* ; [#uses=1]
- %81 = load %struct.btSolverConstraint** %80, align 4 ; [#uses=1]
- %scevgep189 = getelementptr %struct.btSolverConstraint* %81, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btSolverConstraint* %scevgep189 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 136, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond188 = icmp eq i32 %indvar.next.i.i.i, %77 ; [#uses=1]
- br i1 %exitcond188, label %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %82 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %83 = load %struct.btSolverConstraint** %82, align 4 ; [#uses=2]
- %84 = icmp eq %struct.btSolverConstraint* %83, null ; [#uses=1]
- br i1 %84, label %bb8.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
- %85 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %86 = load i8* %85, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %86, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %87 = bitcast %struct.btSolverConstraint* %83 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %87)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %82, align 4
- br label %bb8.preheader.i
-
-bb8.preheader.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
- %88 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %88, align 4
- store %struct.btSolverConstraint* %78, %struct.btSolverConstraint** %82, align 4
- store i32 %totalNumRows.0, i32* %71, align 4
- br i1 %70, label %bb.nph.i, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit
-
-bb.nph.i: ; preds = %bb8.preheader.i, %bb4.i
- %89 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %90 = bitcast %struct.btSolverConstraint* %2 to i8* ; [#uses=1]
- %tmp183 = sub i32 %totalNumRows.0, %68 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb7.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb7.i ] ; [#uses=2]
- %tmp185 = add i32 %68, %indvar.i ; [#uses=1]
- %91 = load %struct.btSolverConstraint** %89, align 4 ; [#uses=1]
- %scevgep186 = getelementptr %struct.btSolverConstraint* %91, i32 %tmp185 ; [#uses=1]
- %scevgep15.i = bitcast %struct.btSolverConstraint* %scevgep186 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep15.i, i8* %90, i32 136, i32 4, i1 false)
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond184 = icmp eq i32 %indvar.next.i, %tmp183 ; [#uses=1]
- br i1 %exitcond184, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit: ; preds = %bb7.i, %bb8.preheader.i, %bb3.i, %bb23
- store i32 %totalNumRows.0, i32* %67, align 4
- %92 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 3 ; [#uses=1]
- %94 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 0 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 8 ; [#uses=1]
- %96 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 1 ; [#uses=1]
- %97 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 2 ; [#uses=1]
- %98 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 3 ; [#uses=1]
- %99 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 4 ; [#uses=1]
- %100 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 5 ; [#uses=1]
- %101 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 6 ; [#uses=1]
- %102 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 7 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 10 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 1 ; [#uses=1]
- %105 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 13 ; [#uses=2]
- %106 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 8 ; [#uses=1]
- %107 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 9 ; [#uses=1]
- %108 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 10 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 5 ; [#uses=1]
- %110 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info2, i32 0, i32 12 ; [#uses=1]
- br label %bb52
-
-bb25: ; preds = %bb52
- %111 = load %struct.CONTACT_KEY_TOKEN** %54, align 4 ; [#uses=1]
- %scevgep242243 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %111, i32 %405, i32 0 ; [#uses=4]
- %112 = load i32* %scevgep242243, align 4 ; [#uses=2]
- %113 = icmp eq i32 %112, 0 ; [#uses=1]
- br i1 %113, label %bb51, label %bb27
-
-bb27: ; preds = %bb25
- %114 = load %struct.btSolverConstraint** %92, align 4 ; [#uses=35]
- %115 = load %struct.btTypedConstraint** %scevgep244, align 4 ; [#uses=3]
- %116 = getelementptr inbounds %struct.btTypedConstraint* %115, i32 0, i32 5 ; [#uses=2]
- %117 = load %struct.btRigidBody** %116, align 4 ; [#uses=18]
- %118 = getelementptr inbounds %struct.btTypedConstraint* %115, i32 0, i32 6 ; [#uses=2]
- %119 = load %struct.btRigidBody** %118, align 4 ; [#uses=18]
- %120 = icmp sgt i32 %112, 0 ; [#uses=1]
- br i1 %120, label %bb30, label %bb32
-
-bb30: ; preds = %bb30, %bb27
- %j29.0173 = phi i32 [ %121, %bb30 ], [ 0, %bb27 ] ; [#uses=2]
- %tmp198 = add i32 %currentRow.0, %j29.0173 ; [#uses=7]
- %scevgep199 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp198 ; [#uses=1]
- %scevgep199200 = bitcast %struct.btSolverConstraint* %scevgep199 to i8* ; [#uses=1]
- %scevgep201 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp198, i32 16 ; [#uses=1]
- %scevgep202 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp198, i32 17 ; [#uses=1]
- %scevgep203 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp198, i32 6 ; [#uses=1]
- %scevgep204 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp198, i32 5 ; [#uses=1]
- %scevgep205 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp198, i32 11, i32 0 ; [#uses=1]
- %scevgep206 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp198, i32 12, i32 0 ; [#uses=1]
- call void @llvm.memset.p0i8.i32(i8* %scevgep199200, i8 0, i32 136, i32 4, i1 false)
- store float 0xC7EFFFFFE0000000, float* %scevgep201, align 4
- store float 0x47EFFFFFE0000000, float* %scevgep202, align 4
- store float 0.000000e+00, float* %scevgep203, align 4
- store float 0.000000e+00, float* %scevgep204, align 4
- store %struct.btRigidBody* %117, %struct.btRigidBody** %scevgep205, align 4
- store %struct.btRigidBody* %119, %struct.btRigidBody** %scevgep206, align 4
- %121 = add nsw i32 %j29.0173, 1 ; [#uses=2]
- %122 = load i32* %scevgep242243, align 4 ; [#uses=1]
- %123 = icmp sgt i32 %122, %121 ; [#uses=1]
- br i1 %123, label %bb30, label %bb32
-
-bb32: ; preds = %bb30, %bb27
- %124 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 24, i32 0, i32 0 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 24, i32 0, i32 0 ; [#uses=1]
- %126 = bitcast float* %124 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %126, i8 0, i64 32, i32 4, i1 false)
- %127 = bitcast float* %125 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %127, i8 0, i64 32, i32 4, i1 false)
- %128 = load float* %93, align 4 ; [#uses=1]
- %129 = fdiv float 1.000000e+00, %128 ; [#uses=1]
- store float %129, float* %94, align 8
- %130 = load float* %95, align 4 ; [#uses=1]
- store float %130, float* %96, align 4
- %131 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %currentRow.0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float* %131, float** %97, align 8
- %132 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %currentRow.0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float* %132, float** %98, align 4
- store float* null, float** %99, align 8
- %133 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %currentRow.0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float* %133, float** %100, align 4
- store i32 34, i32* %101, align 8
- %134 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %currentRow.0, i32 14 ; [#uses=1]
- store float* %134, float** %102, align 4
- %135 = load float* %103, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %currentRow.0, i32 15 ; [#uses=2]
- store float %135, float* %136, align 4
- %137 = load float* %104, align 4 ; [#uses=1]
- store float %137, float* %105, align 4
- store float* %136, float** %106, align 8
- %138 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %currentRow.0, i32 16 ; [#uses=1]
- store float* %138, float** %107, align 4
- %139 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %currentRow.0, i32 17 ; [#uses=1]
- store float* %139, float** %108, align 8
- %140 = load i32* %109, align 4 ; [#uses=1]
- store i32 %140, i32* %110, align 8
- %141 = load %struct.btTypedConstraint** %scevgep244, align 4 ; [#uses=2]
- %142 = getelementptr inbounds %struct.btTypedConstraint* %141, i32 0, i32 0 ; [#uses=1]
- %143 = load i32 (...)*** %142, align 4 ; [#uses=1]
- %144 = getelementptr inbounds i32 (...)** %143, i32 5 ; [#uses=1]
- %145 = load i32 (...)** %144, align 4 ; [#uses=1]
- %146 = bitcast i32 (...)* %145 to void (%struct.btTypedConstraint*, %"struct.btTypedConstraint::btConstraintInfo2"*)* ; [#uses=1]
- invoke void %146(%struct.btTypedConstraint* %141, %"struct.btTypedConstraint::btConstraintInfo2"* %info2)
- to label %bb50.preheader unwind label %lpad
-
-bb50.preheader: ; preds = %bb32
- %147 = load i32* %scevgep242243, align 4 ; [#uses=1]
- %148 = icmp sgt i32 %147, 0 ; [#uses=1]
- br i1 %148, label %bb.nph176, label %bb51.loopexit
-
-bb.nph176: ; preds = %bb50.preheader
- %149 = bitcast %struct.btTypedConstraint* %115 to i8* ; [#uses=1]
- %150 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 4 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 4 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %169 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %173 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %175 = getelementptr inbounds %struct.btRigidBody* %117, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %176 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %178 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %180 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- br label %bb34
-
-bb34: ; preds = %bb34, %bb.nph176
- %j29.1175 = phi i32 [ 0, %bb.nph176 ], [ %399, %bb34 ] ; [#uses=2]
- %tmp208 = add i32 %currentRow.0, %j29.1175 ; [#uses=21]
- %scevgep209 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 13, i32 0 ; [#uses=1]
- %scevgep210 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep211 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep212213 = getelementptr inbounds %struct.btSolverConstraint* %114, i32 %tmp208, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep214 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 3, i32 0, i32 0 ; [#uses=1]
- %scevgep215 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep216 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep217 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep218 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep219 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep220 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep221 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 4, i32 0, i32 0 ; [#uses=1]
- %scevgep222 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 4, i32 0, i32 1 ; [#uses=1]
- %scevgep223 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 4, i32 0, i32 2 ; [#uses=1]
- %scevgep224 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 4, i32 0, i32 3 ; [#uses=1]
- %scevgep225 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep226 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep227 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep228 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 8 ; [#uses=1]
- %scevgep229 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 14 ; [#uses=2]
- %scevgep230 = getelementptr %struct.btSolverConstraint* %114, i32 %tmp208, i32 6 ; [#uses=1]
- store i8* %149, i8** %scevgep209, align 4
- %182 = load %struct.btRigidBody** %116, align 4 ; [#uses=12]
- %183 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %184 = load float* %183, align 4 ; [#uses=1]
- %185 = load float* %scevgep212213, align 4 ; [#uses=8]
- %186 = fmul float %184, %185 ; [#uses=1]
- %187 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %188 = load float* %187, align 4 ; [#uses=1]
- %189 = load float* %scevgep211, align 4 ; [#uses=8]
- %190 = fmul float %188, %189 ; [#uses=1]
- %191 = fadd float %186, %190 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %193 = load float* %192, align 4 ; [#uses=1]
- %194 = load float* %scevgep210, align 4 ; [#uses=8]
- %195 = fmul float %193, %194 ; [#uses=1]
- %196 = fadd float %191, %195 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %198 = load float* %197, align 4 ; [#uses=1]
- %199 = fmul float %198, %185 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %201 = load float* %200, align 4 ; [#uses=1]
- %202 = fmul float %201, %189 ; [#uses=1]
- %203 = fadd float %199, %202 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=1]
- %206 = fmul float %205, %194 ; [#uses=1]
- %207 = fadd float %203, %206 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=1]
- %210 = fmul float %209, %185 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=1]
- %213 = fmul float %212, %189 ; [#uses=1]
- %214 = fadd float %210, %213 ; [#uses=1]
- %215 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %216 = load float* %215, align 4 ; [#uses=1]
- %217 = fmul float %216, %194 ; [#uses=1]
- %218 = fadd float %214, %217 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=1]
- %221 = fmul float %196, %220 ; [#uses=1]
- %222 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %223 = load float* %222, align 4 ; [#uses=1]
- %224 = fmul float %207, %223 ; [#uses=1]
- %225 = getelementptr inbounds %struct.btRigidBody* %182, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %226 = load float* %225, align 4 ; [#uses=1]
- %227 = fmul float %218, %226 ; [#uses=1]
- store float %227, float* %scevgep214, align 4
- store float %224, float* %scevgep215, align 4
- store float %221, float* %scevgep216, align 4
- store float 0.000000e+00, float* %scevgep217, align 4
- %228 = load %struct.btRigidBody** %118, align 4 ; [#uses=12]
- %229 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %230 = load float* %229, align 4 ; [#uses=1]
- %231 = load float* %scevgep220, align 4 ; [#uses=8]
- %232 = fmul float %230, %231 ; [#uses=1]
- %233 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %234 = load float* %233, align 4 ; [#uses=1]
- %235 = load float* %scevgep219, align 4 ; [#uses=8]
- %236 = fmul float %234, %235 ; [#uses=1]
- %237 = fadd float %232, %236 ; [#uses=1]
- %238 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %239 = load float* %238, align 4 ; [#uses=1]
- %240 = load float* %scevgep218, align 4 ; [#uses=8]
- %241 = fmul float %239, %240 ; [#uses=1]
- %242 = fadd float %237, %241 ; [#uses=1]
- %243 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %244 = load float* %243, align 4 ; [#uses=1]
- %245 = fmul float %244, %231 ; [#uses=1]
- %246 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %247 = load float* %246, align 4 ; [#uses=1]
- %248 = fmul float %247, %235 ; [#uses=1]
- %249 = fadd float %245, %248 ; [#uses=1]
- %250 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %251 = load float* %250, align 4 ; [#uses=1]
- %252 = fmul float %251, %240 ; [#uses=1]
- %253 = fadd float %249, %252 ; [#uses=1]
- %254 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=1]
- %256 = fmul float %255, %231 ; [#uses=1]
- %257 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %258 = load float* %257, align 4 ; [#uses=1]
- %259 = fmul float %258, %235 ; [#uses=1]
- %260 = fadd float %256, %259 ; [#uses=1]
- %261 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %262 = load float* %261, align 4 ; [#uses=1]
- %263 = fmul float %262, %240 ; [#uses=1]
- %264 = fadd float %260, %263 ; [#uses=1]
- %265 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %266 = load float* %265, align 4 ; [#uses=1]
- %267 = fmul float %242, %266 ; [#uses=1]
- %268 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %269 = load float* %268, align 4 ; [#uses=1]
- %270 = fmul float %253, %269 ; [#uses=1]
- %271 = getelementptr inbounds %struct.btRigidBody* %228, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %272 = load float* %271, align 4 ; [#uses=1]
- %273 = fmul float %264, %272 ; [#uses=1]
- store float %273, float* %scevgep221, align 4
- store float %270, float* %scevgep222, align 4
- store float %267, float* %scevgep223, align 4
- store float 0.000000e+00, float* %scevgep224, align 4
- %274 = load float* %150, align 4 ; [#uses=3]
- %275 = load float* %scevgep227, align 4 ; [#uses=6]
- %276 = fmul float %275, %274 ; [#uses=1]
- %277 = load float* %scevgep226, align 4 ; [#uses=6]
- %278 = fmul float %277, %274 ; [#uses=1]
- %279 = load float* %scevgep225, align 4 ; [#uses=6]
- %280 = fmul float %279, %274 ; [#uses=1]
- %281 = load float* %151, align 4 ; [#uses=1]
- %282 = fmul float %281, %185 ; [#uses=1]
- %283 = load float* %152, align 4 ; [#uses=1]
- %284 = fmul float %283, %189 ; [#uses=1]
- %285 = fadd float %282, %284 ; [#uses=1]
- %286 = load float* %153, align 4 ; [#uses=1]
- %287 = fmul float %286, %194 ; [#uses=1]
- %288 = fadd float %285, %287 ; [#uses=1]
- %289 = load float* %154, align 4 ; [#uses=1]
- %290 = fmul float %289, %185 ; [#uses=1]
- %291 = load float* %155, align 4 ; [#uses=1]
- %292 = fmul float %291, %189 ; [#uses=1]
- %293 = fadd float %290, %292 ; [#uses=1]
- %294 = load float* %156, align 4 ; [#uses=1]
- %295 = fmul float %294, %194 ; [#uses=1]
- %296 = fadd float %293, %295 ; [#uses=1]
- %297 = load float* %157, align 4 ; [#uses=1]
- %298 = fmul float %297, %185 ; [#uses=1]
- %299 = load float* %158, align 4 ; [#uses=1]
- %300 = fmul float %299, %189 ; [#uses=1]
- %301 = fadd float %298, %300 ; [#uses=1]
- %302 = load float* %159, align 4 ; [#uses=1]
- %303 = fmul float %302, %194 ; [#uses=1]
- %304 = fadd float %301, %303 ; [#uses=1]
- %305 = load float* %160, align 4 ; [#uses=3]
- %306 = fmul float %275, %305 ; [#uses=1]
- %307 = fmul float %277, %305 ; [#uses=1]
- %308 = fmul float %279, %305 ; [#uses=1]
- %309 = load float* %161, align 4 ; [#uses=1]
- %310 = fmul float %309, %231 ; [#uses=1]
- %311 = load float* %162, align 4 ; [#uses=1]
- %312 = fmul float %311, %235 ; [#uses=1]
- %313 = fadd float %310, %312 ; [#uses=1]
- %314 = load float* %163, align 4 ; [#uses=1]
- %315 = fmul float %314, %240 ; [#uses=1]
- %316 = fadd float %313, %315 ; [#uses=1]
- %317 = load float* %164, align 4 ; [#uses=1]
- %318 = fmul float %317, %231 ; [#uses=1]
- %319 = load float* %165, align 4 ; [#uses=1]
- %320 = fmul float %319, %235 ; [#uses=1]
- %321 = fadd float %318, %320 ; [#uses=1]
- %322 = load float* %166, align 4 ; [#uses=1]
- %323 = fmul float %322, %240 ; [#uses=1]
- %324 = fadd float %321, %323 ; [#uses=1]
- %325 = load float* %167, align 4 ; [#uses=1]
- %326 = fmul float %325, %231 ; [#uses=1]
- %327 = load float* %168, align 4 ; [#uses=1]
- %328 = fmul float %327, %235 ; [#uses=1]
- %329 = fadd float %326, %328 ; [#uses=1]
- %330 = load float* %169, align 4 ; [#uses=1]
- %331 = fmul float %330, %240 ; [#uses=1]
- %332 = fadd float %329, %331 ; [#uses=1]
- %333 = fmul float %280, %279 ; [#uses=1]
- %334 = fmul float %278, %277 ; [#uses=1]
- %335 = fadd float %333, %334 ; [#uses=1]
- %336 = fmul float %276, %275 ; [#uses=1]
- %337 = fadd float %335, %336 ; [#uses=1]
- %338 = fmul float %304, %185 ; [#uses=1]
- %339 = fmul float %296, %189 ; [#uses=1]
- %340 = fadd float %338, %339 ; [#uses=1]
- %341 = fmul float %288, %194 ; [#uses=1]
- %342 = fadd float %340, %341 ; [#uses=1]
- %343 = fadd float %342, %337 ; [#uses=1]
- %344 = fmul float %308, %279 ; [#uses=1]
- %345 = fmul float %307, %277 ; [#uses=1]
- %346 = fadd float %344, %345 ; [#uses=1]
- %347 = fmul float %306, %275 ; [#uses=1]
- %348 = fadd float %346, %347 ; [#uses=1]
- %349 = fadd float %348, %343 ; [#uses=1]
- %350 = fmul float %332, %231 ; [#uses=1]
- %351 = fmul float %324, %235 ; [#uses=1]
- %352 = fadd float %350, %351 ; [#uses=1]
- %353 = fmul float %316, %240 ; [#uses=1]
- %354 = fadd float %352, %353 ; [#uses=1]
- %355 = fadd float %354, %349 ; [#uses=1]
- %356 = fdiv float 1.000000e+00, %355 ; [#uses=3]
- store float %356, float* %scevgep228, align 4
- %357 = load float* %170, align 4 ; [#uses=1]
- %358 = fmul float %279, %357 ; [#uses=1]
- %359 = load float* %171, align 4 ; [#uses=1]
- %360 = fmul float %277, %359 ; [#uses=1]
- %361 = fadd float %358, %360 ; [#uses=1]
- %362 = load float* %172, align 4 ; [#uses=1]
- %363 = fmul float %275, %362 ; [#uses=1]
- %364 = fadd float %361, %363 ; [#uses=1]
- %365 = load float* %173, align 4 ; [#uses=1]
- %366 = fmul float %185, %365 ; [#uses=1]
- %367 = load float* %174, align 4 ; [#uses=1]
- %368 = fmul float %189, %367 ; [#uses=1]
- %369 = fadd float %366, %368 ; [#uses=1]
- %370 = load float* %175, align 4 ; [#uses=1]
- %371 = fmul float %194, %370 ; [#uses=1]
- %372 = fadd float %369, %371 ; [#uses=1]
- %373 = fadd float %364, %372 ; [#uses=1]
- %374 = load float* %176, align 4 ; [#uses=1]
- %375 = fmul float %231, %374 ; [#uses=1]
- %376 = load float* %177, align 4 ; [#uses=1]
- %377 = fmul float %235, %376 ; [#uses=1]
- %378 = fadd float %375, %377 ; [#uses=1]
- %379 = load float* %178, align 4 ; [#uses=1]
- %380 = fmul float %240, %379 ; [#uses=1]
- %381 = fadd float %378, %380 ; [#uses=1]
- %382 = load float* %179, align 4 ; [#uses=1]
- %383 = fmul float %279, %382 ; [#uses=1]
- %384 = load float* %180, align 4 ; [#uses=1]
- %385 = fmul float %277, %384 ; [#uses=1]
- %386 = fadd float %383, %385 ; [#uses=1]
- %387 = load float* %181, align 4 ; [#uses=1]
- %388 = fmul float %275, %387 ; [#uses=1]
- %389 = fadd float %386, %388 ; [#uses=1]
- %390 = fsub float %381, %389 ; [#uses=1]
- %391 = fadd float %373, %390 ; [#uses=1]
- %392 = load float* %scevgep229, align 4 ; [#uses=1]
- %393 = load float* %105, align 4 ; [#uses=1]
- %394 = fmul float %393, %391 ; [#uses=1]
- %395 = fsub float 0.000000e+00, %394 ; [#uses=1]
- %396 = fmul float %356, %392 ; [#uses=1]
- %397 = fmul float %356, %395 ; [#uses=1]
- %398 = fadd float %396, %397 ; [#uses=1]
- store float %398, float* %scevgep229, align 4
- store float 0.000000e+00, float* %scevgep230, align 4
- %399 = add nsw i32 %j29.1175, 1 ; [#uses=2]
- %400 = load i32* %scevgep242243, align 4 ; [#uses=1]
- %401 = icmp sgt i32 %400, %399 ; [#uses=1]
- br i1 %401, label %bb34, label %bb51.loopexit
-
-bb51.loopexit: ; preds = %bb34, %bb50.preheader
- %.pre = load %struct.CONTACT_KEY_TOKEN** %54, align 4 ; [#uses=1]
- %scevgep236237.phi.trans.insert = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %.pre, i32 %405, i32 0 ; [#uses=1]
- %.pre254 = load i32* %scevgep236237.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb51
-
-bb51: ; preds = %bb51.loopexit, %bb25
- %402 = phi i32 [ %.pre254, %bb51.loopexit ], [ 0, %bb25 ] ; [#uses=1]
- %403 = add nsw i32 %402, %currentRow.0 ; [#uses=1]
- %404 = add nsw i32 %405, 1 ; [#uses=1]
- br label %bb52
-
-bb52: ; preds = %bb51, %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit
- %405 = phi i32 [ %404, %bb51 ], [ 0, %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit ] ; [#uses=5]
- %currentRow.0 = phi i32 [ %403, %bb51 ], [ 0, %_ZN20btAlignedObjectArrayI18btSolverConstraintE6resizeEiRKS0_.exit ] ; [#uses=10]
- %scevgep244 = getelementptr %struct.btTypedConstraint** %constraints, i32 %405 ; [#uses=2]
- %406 = icmp slt i32 %405, %numConstraints ; [#uses=1]
- br i1 %406, label %bb25, label %bb59
-
-bb57: ; preds = %bb59
- %scevgep197 = getelementptr %struct.btPersistentManifold** %manifoldPtr, i32 %409 ; [#uses=1]
- %407 = load %struct.btPersistentManifold** %scevgep197, align 4 ; [#uses=1]
- invoke void @_ZN35btSequentialImpulseConstraintSolver14convertContactEP20btPersistentManifoldRK19btContactSolverInfo(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btPersistentManifold* %407, %struct.btContactSolverInfo* %infoGlobal)
- to label %invcont58 unwind label %lpad
-
-invcont58: ; preds = %bb57
- %408 = add nsw i32 %409, 1 ; [#uses=1]
- br label %bb59
-
-bb59: ; preds = %invcont58, %bb52
- %409 = phi i32 [ %408, %invcont58 ], [ 0, %bb52 ] ; [#uses=3]
- %410 = icmp slt i32 %409, %numManifolds ; [#uses=1]
- br i1 %410, label %bb57, label %bb60
-
-bb60: ; preds = %bb59
- %411 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- %412 = load i32* %411, align 4 ; [#uses=3]
- %413 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %414 = load i32* %413, align 4 ; [#uses=3]
- store i32 0, i32* %1, align 4
- %415 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %415, i32 %412, i32* %1) inlinehint
- to label %invcont62 unwind label %lpad
-
-invcont62: ; preds = %bb60
- store i32 0, i32* %0, align 4
- %416 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIiE6resizeEiRKi(%"struct.btAlignedObjectArray<int>"* %416, i32 %414, i32* %0) inlinehint
- to label %bb67.preheader unwind label %lpad
-
-bb67.preheader: ; preds = %invcont62
- %417 = icmp sgt i32 %412, 0 ; [#uses=1]
- br i1 %417, label %bb.nph172, label %bb70.preheader
-
-bb.nph172: ; preds = %bb67.preheader
- %418 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb66
-
-bb66: ; preds = %bb66, %bb.nph172
- %419 = phi i32 [ 0, %bb.nph172 ], [ %421, %bb66 ] ; [#uses=3]
- %420 = load i32** %418, align 4 ; [#uses=1]
- %scevgep196 = getelementptr i32* %420, i32 %419 ; [#uses=1]
- store i32 %419, i32* %scevgep196, align 4
- %421 = add nsw i32 %419, 1 ; [#uses=2]
- %exitcond195 = icmp eq i32 %421, %412 ; [#uses=1]
- br i1 %exitcond195, label %bb70.preheader, label %bb66
-
-bb70.preheader: ; preds = %bb66, %bb67.preheader
- %422 = icmp sgt i32 %414, 0 ; [#uses=1]
- br i1 %422, label %bb.nph170, label %bb77
-
-bb.nph170: ; preds = %bb70.preheader
- %423 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- br label %bb69
-
-bb69: ; preds = %bb69, %bb.nph170
- %424 = phi i32 [ 0, %bb.nph170 ], [ %426, %bb69 ] ; [#uses=3]
- %425 = load i32** %423, align 4 ; [#uses=1]
- %scevgep194 = getelementptr i32* %425, i32 %424 ; [#uses=1]
- store i32 %424, i32* %scevgep194, align 4
- %426 = add nsw i32 %424, 1 ; [#uses=2]
- %exitcond193 = icmp eq i32 %426, %414 ; [#uses=1]
- br i1 %exitcond193, label %bb77, label %bb69
-
-invcont75: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb77: ; preds = %bb69, %bb70.preheader, %entry
- call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret float 0.000000e+00
-
-lpad: ; preds = %invcont62, %bb60, %bb57, %bb32, %bb1.i.i.i, %bb.i2.i.i, %bb20, %bb17, %bb15
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select80 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont75 unwind label %lpad81
-
-lpad81: ; preds = %lpad
- %eh_ptr82 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select84 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr82, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define float @_ZN35btSequentialImpulseConstraintSolver33solveGroupCacheFriendlyIterationsEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** %constraints, i32 %numConstraints, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %debugDrawer, %struct.btStackAlloc* %stackAlloc) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([34 x i8]* @.str17, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 5 ; [#uses=1]
- br label %bb1
-
-bb: ; preds = %bb1
- %1 = invoke float @_ZN35btSequentialImpulseConstraintSolver20solveSingleIterationEiPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc(%struct.btSequentialImpulseConstraintSolver* %this, i32 %3, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** %constraints, i32 %numConstraints, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %debugDrawer, %struct.btStackAlloc* %stackAlloc)
- to label %invcont unwind label %lpad ; [#uses=0]
-
-invcont: ; preds = %bb
- %2 = add nsw i32 %3, 1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %invcont, %entry
- %3 = phi i32 [ 0, %entry ], [ %2, %invcont ] ; [#uses=3]
- %4 = load i32* %0, align 4 ; [#uses=1]
- %5 = icmp sgt i32 %4, %3 ; [#uses=1]
- br i1 %5, label %bb, label %bb2
-
-bb2: ; preds = %bb1
- %6 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 6 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btSequentialImpulseConstraintSolver*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* ; [#uses=1]
- invoke void %10(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifoldPtr, i32 %numManifolds, %struct.btTypedConstraint** %constraints, i32 %numConstraints, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %debugDrawer, %struct.btStackAlloc* %stackAlloc)
- to label %invcont3 unwind label %lpad
-
-invcont3: ; preds = %bb2
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret float 0.000000e+00
-
-invcont5: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %bb2, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select9 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont5 unwind label %lpad10
-
-lpad10: ; preds = %lpad
- %eh_ptr11 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select13 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr11, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolverD2Ev(%struct.btSequentialImpulseConstraintSolver* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([12 x i32 (...)*]* @_ZTV35btSequentialImpulseConstraintSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 3 ; [#uses=3]
- %2 = load %struct.CONTACT_KEY_TOKEN** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.CONTACT_KEY_TOKEN* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.CONTACT_KEY_TOKEN* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad57
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %1, align 4
- %8 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %11 = load i32** %10, align 4 ; [#uses=2]
- %12 = icmp eq i32* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i92
-
-bb.i.i.i92: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i91 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i91, label %bb2.i.i.i94, label %bb1.i.i.i93
-
-bb1.i.i.i93: ; preds = %bb.i.i.i92
- %15 = bitcast i32* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i94 unwind label %lpad53
-
-bb2.i.i.i94: ; preds = %bb1.i.i.i93, %bb.i.i.i92
- store i32* null, i32** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i94, %bb3
- %16 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store i32* null, i32** %10, align 4
- %17 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %20 = load i32** %19, align 4 ; [#uses=2]
- %21 = icmp eq i32* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i97
-
-bb.i.i.i97: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i96 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i96, label %bb2.i.i.i99, label %bb1.i.i.i98
-
-bb1.i.i.i98: ; preds = %bb.i.i.i97
- %24 = bitcast i32* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i99 unwind label %lpad49
-
-bb2.i.i.i99: ; preds = %bb1.i.i.i98, %bb.i.i.i97
- store i32* null, i32** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i99, %bb10
- %25 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store i32* null, i32** %19, align 4
- %26 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %29 = load %struct.btSolverConstraint** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btSolverConstraint* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i103
-
-bb.i.i.i103: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i102 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i102, label %bb2.i.i.i105, label %bb1.i.i.i104
-
-bb1.i.i.i104: ; preds = %bb.i.i.i103
- %33 = bitcast %struct.btSolverConstraint* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i105 unwind label %lpad45
-
-bb2.i.i.i105: ; preds = %bb1.i.i.i104, %bb.i.i.i103
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %28, align 4
- br label %bb28
-
-bb28: ; preds = %bb2.i.i.i105, %bb19
- %34 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %28, align 4
- %35 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- %37 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %38 = load %struct.btSolverConstraint** %37, align 4 ; [#uses=2]
- %39 = icmp eq %struct.btSolverConstraint* %38, null ; [#uses=1]
- br i1 %39, label %bb37, label %bb.i.i.i108
-
-bb.i.i.i108: ; preds = %bb28
- %40 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %41 = load i8* %40, align 4 ; [#uses=1]
- %toBool.i.i.i107 = icmp eq i8 %41, 0 ; [#uses=1]
- br i1 %toBool.i.i.i107, label %bb2.i.i.i110, label %bb1.i.i.i109
-
-bb1.i.i.i109: ; preds = %bb.i.i.i108
- %42 = bitcast %struct.btSolverConstraint* %38 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %42)
- to label %bb2.i.i.i110 unwind label %lpad
-
-bb2.i.i.i110: ; preds = %bb1.i.i.i109, %bb.i.i.i108
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %37, align 4
- br label %bb37
-
-invcont35: ; preds = %bb2.i.i.i127, %ppad
- %43 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %43, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %67, align 4
- %44 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %44, align 4
- %45 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %45, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.3)
- unreachable
-
-bb37: ; preds = %bb2.i.i.i110, %bb28
- %46 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %37, align 4
- %47 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %48, align 4
- %49 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %50 = load %struct.btSolverConstraint** %49, align 4 ; [#uses=2]
- %51 = icmp eq %struct.btSolverConstraint* %50, null ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit117, label %bb.i.i.i114
-
-bb.i.i.i114: ; preds = %bb37
- %52 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %53 = load i8* %52, align 4 ; [#uses=1]
- %toBool.i.i.i113 = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i113, label %bb2.i.i.i116, label %bb1.i.i.i115
-
-bb1.i.i.i115: ; preds = %bb.i.i.i114
- %54 = bitcast %struct.btSolverConstraint* %50 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %54)
- br label %bb2.i.i.i116
-
-bb2.i.i.i116: ; preds = %bb1.i.i.i115, %bb.i.i.i114
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %49, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit117
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit117: ; preds = %bb2.i.i.i116, %bb37
- %55 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %49, align 4
- %56 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i109
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select44 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad45: ; preds = %bb1.i.i.i104
- %eh_ptr46 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select48 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr46, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad81
-
-lpad49: ; preds = %bb1.i.i.i98
- %eh_ptr50 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select52 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr50, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad82
-
-lpad53: ; preds = %bb1.i.i.i93
- %eh_ptr54 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select56 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr54, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad83
-
-lpad57: ; preds = %bb1.i.i.i
- %eh_ptr58 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select60 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr58, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %58 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=3]
- %59 = load i32** %58, align 4 ; [#uses=2]
- %60 = icmp eq i32* %59, null ; [#uses=1]
- br i1 %60, label %_ZN20btAlignedObjectArrayIiED1Ev.exit123, label %bb.i.i.i119
-
-bb.i.i.i119: ; preds = %lpad57
- %61 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- %62 = load i8* %61, align 4 ; [#uses=1]
- %toBool.i.i.i118 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool.i.i.i118, label %bb2.i.i.i121, label %bb1.i.i.i120
-
-bb1.i.i.i120: ; preds = %bb.i.i.i119
- %63 = bitcast i32* %59 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %63)
- to label %bb2.i.i.i121 unwind label %lpad61
-
-bb2.i.i.i121: ; preds = %bb1.i.i.i120, %bb.i.i.i119
- store i32* null, i32** %58, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit123
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit123: ; preds = %bb2.i.i.i121, %lpad57
- %64 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %64, align 4
- store i32* null, i32** %58, align 4
- %65 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %65, align 4
- %66 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %66, align 4
- br label %ppad83
-
-lpad61: ; preds = %bb1.i.i.i120
- %eh_ptr62 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select64 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr62, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad65: ; preds = %bb1.i.i.i144
- %eh_ptr66 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select68 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr66, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad69: ; preds = %bb1.i.i.i138
- %eh_ptr70 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select72 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr70, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad73: ; preds = %bb1.i.i.i132
- %eh_ptr74 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select76 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr74, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad77: ; preds = %bb1.i.i.i126
- %eh_ptr78 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select80 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr78, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135, %lpad
- %eh_exception.3 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.2, %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135 ] ; [#uses=1]
- %67 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %68 = load %struct.btSolverConstraint** %67, align 4 ; [#uses=2]
- %69 = icmp eq %struct.btSolverConstraint* %68, null ; [#uses=1]
- br i1 %69, label %invcont35, label %bb.i.i.i125
-
-bb.i.i.i125: ; preds = %ppad
- %70 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %71 = load i8* %70, align 4 ; [#uses=1]
- %toBool.i.i.i124 = icmp eq i8 %71, 0 ; [#uses=1]
- br i1 %toBool.i.i.i124, label %bb2.i.i.i127, label %bb1.i.i.i126
-
-bb1.i.i.i126: ; preds = %bb.i.i.i125
- %72 = bitcast %struct.btSolverConstraint* %68 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %72)
- to label %bb2.i.i.i127 unwind label %lpad77
-
-bb2.i.i.i127: ; preds = %bb1.i.i.i126, %bb.i.i.i125
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %67, align 4
- br label %invcont35
-
-ppad81: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141, %lpad45
- %eh_exception.2 = phi i8* [ %eh_ptr46, %lpad45 ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141 ] ; [#uses=1]
- %73 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %74 = load %struct.btSolverConstraint** %73, align 4 ; [#uses=2]
- %75 = icmp eq %struct.btSolverConstraint* %74, null ; [#uses=1]
- br i1 %75, label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135, label %bb.i.i.i131
-
-bb.i.i.i131: ; preds = %ppad81
- %76 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %77 = load i8* %76, align 4 ; [#uses=1]
- %toBool.i.i.i130 = icmp eq i8 %77, 0 ; [#uses=1]
- br i1 %toBool.i.i.i130, label %bb2.i.i.i133, label %bb1.i.i.i132
-
-bb1.i.i.i132: ; preds = %bb.i.i.i131
- %78 = bitcast %struct.btSolverConstraint* %74 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %78)
- to label %bb2.i.i.i133 unwind label %lpad73
-
-bb2.i.i.i133: ; preds = %bb1.i.i.i132, %bb.i.i.i131
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %73, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit135: ; preds = %bb2.i.i.i133, %ppad81
- %79 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %79, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %73, align 4
- %80 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %80, align 4
- %81 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %81, align 4
- br label %ppad
-
-ppad82: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit147, %lpad49
- %eh_exception.1 = phi i8* [ %eh_ptr50, %lpad49 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIiED1Ev.exit147 ] ; [#uses=1]
- %82 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %83 = load %struct.btSolverConstraint** %82, align 4 ; [#uses=2]
- %84 = icmp eq %struct.btSolverConstraint* %83, null ; [#uses=1]
- br i1 %84, label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141, label %bb.i.i.i137
-
-bb.i.i.i137: ; preds = %ppad82
- %85 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %86 = load i8* %85, align 4 ; [#uses=1]
- %toBool.i.i.i136 = icmp eq i8 %86, 0 ; [#uses=1]
- br i1 %toBool.i.i.i136, label %bb2.i.i.i139, label %bb1.i.i.i138
-
-bb1.i.i.i138: ; preds = %bb.i.i.i137
- %87 = bitcast %struct.btSolverConstraint* %83 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %87)
- to label %bb2.i.i.i139 unwind label %lpad69
-
-bb2.i.i.i139: ; preds = %bb1.i.i.i138, %bb.i.i.i137
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %82, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintED1Ev.exit141: ; preds = %bb2.i.i.i139, %ppad82
- %88 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %88, align 4
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %82, align 4
- %89 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %89, align 4
- %90 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %90, align 4
- br label %ppad81
-
-ppad83: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit123, %lpad53
- %eh_exception.0 = phi i8* [ %eh_ptr54, %lpad53 ], [ %eh_ptr58, %_ZN20btAlignedObjectArrayIiED1Ev.exit123 ] ; [#uses=1]
- %91 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %92 = load i32** %91, align 4 ; [#uses=2]
- %93 = icmp eq i32* %92, null ; [#uses=1]
- br i1 %93, label %_ZN20btAlignedObjectArrayIiED1Ev.exit147, label %bb.i.i.i143
-
-bb.i.i.i143: ; preds = %ppad83
- %94 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %95 = load i8* %94, align 4 ; [#uses=1]
- %toBool.i.i.i142 = icmp eq i8 %95, 0 ; [#uses=1]
- br i1 %toBool.i.i.i142, label %bb2.i.i.i145, label %bb1.i.i.i144
-
-bb1.i.i.i144: ; preds = %bb.i.i.i143
- %96 = bitcast i32* %92 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %96)
- to label %bb2.i.i.i145 unwind label %lpad65
-
-bb2.i.i.i145: ; preds = %bb1.i.i.i144, %bb.i.i.i143
- store i32* null, i32** %91, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit147
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit147: ; preds = %bb2.i.i.i145, %ppad83
- %97 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %97, align 4
- store i32* null, i32** %91, align 4
- %98 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %98, align 4
- %99 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %99, align 4
- br label %ppad82
-}
-
-; [#uses=0]
-define void @_ZN35btSequentialImpulseConstraintSolverC2Ev(%struct.btSequentialImpulseConstraintSolver* nocapture %this) align 2 {
-invcont5:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([12 x i32 (...)*]* @_ZTV35btSequentialImpulseConstraintSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %2, align 4
- %3 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %6, align 4
- %7 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- %10 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %10, align 4
- %11 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- %14 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- store i32* null, i32** %14, align 4
- %15 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %17, align 4
- %18 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- store i32* null, i32** %18, align 4
- %19 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 4 ; [#uses=1]
- store i8 1, i8* %21, align 4
- %22 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 3 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %22, align 4
- %23 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 1 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 2 ; [#uses=1]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %25, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN35btSequentialImpulseConstraintSolverC1Ev(%struct.btSequentialImpulseConstraintSolver* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([12 x i32 (...)*]* @_ZTV35btSequentialImpulseConstraintSolver, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %2, align 4
- %3 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %6, align 4
- %7 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- %10 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %10, align 4
- %11 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- %14 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- store i32* null, i32** %14, align 4
- %15 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %17, align 4
- %18 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 3 ; [#uses=1]
- store i32* null, i32** %18, align 4
- %19 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 1 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 4 ; [#uses=1]
- store i8 1, i8* %21, align 4
- %22 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 3 ; [#uses=1]
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %22, align 4
- %23 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 1 ; [#uses=1]
- store i32 0, i32* %23, align 4
- %24 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 6, i32 2 ; [#uses=1]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 7 ; [#uses=1]
- store i32 0, i32* %25, align 4
- ret void
-}
-
-; [#uses=6]
-define %struct.btSolverConstraint* @_ZN35btSequentialImpulseConstraintSolver21addFrictionConstraintERK9btVector3P11btRigidBodyS4_iR15btManifoldPointS2_S2_P17btCollisionObjectS8_fff(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btQuadWord* nocapture %normalAxis, %struct.btRigidBody* nocapture %solverBodyA, %struct.btRigidBody* nocapture %solverBodyB, i32 %frictionIndex, %struct.btManifoldPoint* nocapture %cp, %struct.btQuadWord* nocapture %rel_pos1, %struct.btQuadWord* nocapture %rel_pos2, %struct.btCollisionObject* %colObj0, %struct.btCollisionObject* %colObj1, float %relaxation, float %desiredVelocity, float %cfmSlip) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=4]
- %1 = load i32* %0, align 4 ; [#uses=8]
- %2 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb.i, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
-
-bb.i: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.207.0.i.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.207.0.i.i ; [#uses=1]
- br i1 %7, label %bb.i.i, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
-
-bb.i.i: ; preds = %bb.i
- %8 = icmp eq i32 %iftmp.207.0.i.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %9 = mul i32 %iftmp.207.0.i.i, 136 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %10 to %struct.btSolverConstraint* ; [#uses=1]
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %11 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %1, %bb.i.i ] ; [#uses=2]
- %12 = phi %struct.btSolverConstraint* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %14 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb.i4.i.i ] ; [#uses=3]
- %scevgep3 = getelementptr %struct.btSolverConstraint* %12, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btSolverConstraint* %scevgep3 to i8* ; [#uses=1]
- %15 = load %struct.btSolverConstraint** %14, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btSolverConstraint* %15, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btSolverConstraint* %scevgep to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 136, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %16 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %17 = load %struct.btSolverConstraint** %16, align 4 ; [#uses=2]
- %18 = icmp eq %struct.btSolverConstraint* %17, null ; [#uses=1]
- br i1 %18, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
- %19 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %20 = load i8* %19, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %20, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %21 = bitcast %struct.btSolverConstraint* %17 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %21)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %16, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
- %22 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %22, align 4
- store %struct.btSolverConstraint* %12, %struct.btSolverConstraint** %16, align 4
- store i32 %iftmp.207.0.i.i, i32* %2, align 4
- %.pre6.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i, %bb.i, %entry
- %23 = phi i32 [ %.pre6.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i ], [ %1, %entry ], [ %1, %bb.i ] ; [#uses=1]
- %24 = add nsw i32 %23, 1 ; [#uses=1]
- store i32 %24, i32* %0, align 4
- %25 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %26 = load %struct.btSolverConstraint** %25, align 4 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btSolverConstraint* %26, i32 %1 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btSolverConstraint* %26, i32 %1, i32 10, i32 0 ; [#uses=1]
- store i32 %frictionIndex, i32* %28, align 4
- tail call void @_ZN35btSequentialImpulseConstraintSolver23setupFrictionConstraintER18btSolverConstraintRK9btVector3P11btRigidBodyS6_R15btManifoldPointS4_S4_P17btCollisionObjectSA_fff(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btSolverConstraint* %27, %struct.btQuadWord* %normalAxis, %struct.btRigidBody* %solverBodyA, %struct.btRigidBody* %solverBodyB, %struct.btManifoldPoint* %cp, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2, %struct.btCollisionObject* %colObj0, %struct.btCollisionObject* %colObj1, float %relaxation, float %desiredVelocity, float %cfmSlip)
- ret %struct.btSolverConstraint* %27
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE6resizeEiRKS1_(%"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* nocapture %this, i32 %newsize, %struct.CONTACT_KEY_TOKEN* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 3 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi %struct.CONTACT_KEY_TOKEN* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=4]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=6]
- %scevgep.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %11, i32 %indvar.i.i ; [#uses=1]
- %14 = icmp eq %struct.CONTACT_KEY_TOKEN* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep12.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %11, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep11.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %11, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %15 = load %struct.CONTACT_KEY_TOKEN** %13, align 4 ; [#uses=2]
- %scevgep89.i.i = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %15, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load i32* %scevgep89.i.i, align 4 ; [#uses=1]
- %scevgep10.i.i = getelementptr %struct.CONTACT_KEY_TOKEN* %15, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %17 = load i32* %scevgep10.i.i, align 4 ; [#uses=1]
- store i32 %16, i32* %scevgep11.i.i, align 4
- store i32 %17, i32* %scevgep12.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond21 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond21, label %_ZNK20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.CONTACT_KEY_TOKEN** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.CONTACT_KEY_TOKEN* %19, null ; [#uses=1]
- br i1 %20, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE4copyEiiPS1_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %struct.CONTACT_KEY_TOKEN* %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.CONTACT_KEY_TOKEN* null, %struct.CONTACT_KEY_TOKEN** %18, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIN17btTypedConstraint17btConstraintInfo1EE4copyEiiPS1_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.CONTACT_KEY_TOKEN* %11, %struct.CONTACT_KEY_TOKEN** %18, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<CONTACT_KEY_TOKEN>"* %this, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %fillData, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %fillData, i32 0, i32 1 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=3]
- %28 = load %struct.CONTACT_KEY_TOKEN** %25, align 4 ; [#uses=3]
- %scevgep = getelementptr %struct.CONTACT_KEY_TOKEN* %28, i32 %tmp17 ; [#uses=1]
- %29 = icmp eq %struct.CONTACT_KEY_TOKEN* %scevgep, null ; [#uses=1]
- br i1 %29, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %30 = load i32* %26, align 4 ; [#uses=1]
- %31 = load i32* %27, align 4 ; [#uses=1]
- %scevgep1819 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %28, i32 %tmp17, i32 0 ; [#uses=1]
- store i32 %30, i32* %scevgep1819, align 4
- %scevgep20 = getelementptr %struct.CONTACT_KEY_TOKEN* %28, i32 %tmp17, i32 1 ; [#uses=1]
- store i32 %31, i32* %scevgep20, align 4
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN35btSequentialImpulseConstraintSolver14convertContactEP20btPersistentManifoldRK19btContactSolverInfo(%struct.btSequentialImpulseConstraintSolver* nocapture %this, %struct.btPersistentManifold* %manifold, %struct.btContactSolverInfo* nocapture %infoGlobal) align 2 {
-entry:
- %rel_pos1 = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %rel_pos2 = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %relaxation = alloca float, align 4 ; [#uses=6]
- %rel_vel = alloca float, align 4 ; [#uses=2]
- %vel = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %struct.btPersistentManifold* %manifold, i32 0, i32 2 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=4]
- %2 = bitcast i8* %1 to %struct.btCollisionObject* ; [#uses=11]
- %3 = getelementptr inbounds %struct.btPersistentManifold* %manifold, i32 0, i32 3 ; [#uses=1]
- %4 = load i8** %3, align 4 ; [#uses=4]
- %5 = bitcast i8* %4 to %struct.btCollisionObject* ; [#uses=11]
- %6 = getelementptr inbounds i8* %1, i32 232 ; [#uses=1]
- %7 = bitcast i8* %6 to i32* ; [#uses=2]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %.lobit.i = and i32 %8, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool.i, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit, label %bb.i
-
-bb.i: ; preds = %entry
- %9 = bitcast i8* %1 to %struct.btRigidBody* ; [#uses=1]
- br label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit: ; preds = %bb.i, %entry
- %10 = phi %struct.btRigidBody* [ %9, %bb.i ], [ null, %entry ] ; [#uses=8]
- %11 = getelementptr inbounds i8* %4, i32 232 ; [#uses=1]
- %12 = bitcast i8* %11 to i32* ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %.lobit.i37 = and i32 %13, 2 ; [#uses=1]
- %toBool.i38 = icmp eq i32 %.lobit.i37, 0 ; [#uses=1]
- br i1 %toBool.i38, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit41, label %bb.i39
-
-bb.i39: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %14 = bitcast i8* %4 to %struct.btRigidBody* ; [#uses=1]
- br label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit41
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit41: ; preds = %bb.i39, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %15 = phi %struct.btRigidBody* [ %14, %bb.i39 ], [ null, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit ] ; [#uses=8]
- %16 = icmp eq %struct.btRigidBody* %10, null ; [#uses=1]
- br i1 %16, label %bb1, label %bb
-
-bb: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit41
- %17 = getelementptr inbounds %struct.btRigidBody* %10, i32 0, i32 4 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fcmp oeq float %18, 0.000000e+00 ; [#uses=1]
- br i1 %19, label %bb1, label %bb34.preheader
-
-bb1: ; preds = %bb, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit41
- %20 = icmp eq %struct.btRigidBody* %15, null ; [#uses=1]
- br i1 %20, label %return, label %bb2
-
-bb2: ; preds = %bb1
- %21 = getelementptr inbounds %struct.btRigidBody* %15, i32 0, i32 4 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fcmp oeq float %22, 0.000000e+00 ; [#uses=1]
- br i1 %23, label %return, label %bb34.preheader
-
-bb34.preheader: ; preds = %bb2, %bb
- %24 = getelementptr inbounds %struct.btPersistentManifold* %manifold, i32 0, i32 4 ; [#uses=2]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = icmp sgt i32 %25, 0 ; [#uses=1]
- br i1 %26, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb34.preheader
- %27 = getelementptr inbounds %struct.btPersistentManifold* %manifold, i32 0, i32 6 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 1 ; [#uses=4]
- %29 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %30 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 3 ; [#uses=5]
- %31 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 1, i32 4 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btSequentialImpulseConstraintSolver* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 15 ; [#uses=5]
- %34 = getelementptr inbounds %struct.btQuadWord* %vel, i32 0, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btQuadWord* %vel, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %vel, i32 0, i32 0, i32 0 ; [#uses=1]
- %37 = bitcast i8* %4 to %struct.btRigidBody* ; [#uses=1]
- %38 = bitcast i8* %1 to %struct.btRigidBody* ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb33, %bb.nph
- %j.061 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb33 ] ; [#uses=19]
- %scevgep65 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061 ; [#uses=9]
- %scevgep6566 = bitcast %struct.btManifoldPoint* %scevgep65 to i8* ; [#uses=1]
- %scevgep67 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 5 ; [#uses=1]
- %scevgep68 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 14 ; [#uses=3]
- %scevgep69 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 19 ; [#uses=1]
- %scevgep70 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 17 ; [#uses=1]
- %scevgep71 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 22, i32 0, i32 0 ; [#uses=5]
- %scevgep7172 = bitcast float* %scevgep71 to %struct.btQuadWord* ; [#uses=7]
- %scevgep73 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 20 ; [#uses=1]
- %scevgep74 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 18 ; [#uses=1]
- %scevgep75 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 23, i32 0, i32 0 ; [#uses=5]
- %scevgep7576 = bitcast float* %scevgep75 to %struct.btQuadWord* ; [#uses=7]
- %scevgep77 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 4, i32 0, i32 2 ; [#uses=1]
- %scevgep78 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 4, i32 0, i32 1 ; [#uses=1]
- %scevgep79 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 4, i32 0, i32 0 ; [#uses=1]
- %scevgep80 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 22, i32 0, i32 1 ; [#uses=4]
- %scevgep81 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 22, i32 0, i32 2 ; [#uses=4]
- %scevgep82 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 22, i32 0, i32 3 ; [#uses=1]
- %scevgep83 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 23, i32 0, i32 1 ; [#uses=4]
- %scevgep84 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 23, i32 0, i32 2 ; [#uses=3]
- %scevgep85 = getelementptr %struct.btPersistentManifold* %manifold, i32 0, i32 1, i32 %j.061, i32 23, i32 0, i32 3 ; [#uses=1]
- %tmp = add i32 %j.061, 1 ; [#uses=2]
- %39 = load float* %scevgep67, align 4 ; [#uses=1]
- %40 = load float* %27, align 4 ; [#uses=1]
- %41 = fcmp ugt float %39, %40 ; [#uses=1]
- br i1 %41, label %bb33, label %bb9
-
-bb9: ; preds = %bb7
- %42 = load i32* %28, align 4 ; [#uses=17]
- %43 = load i32* %29, align 4 ; [#uses=2]
- %44 = icmp eq i32 %43, %42 ; [#uses=1]
- br i1 %44, label %bb.i43, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
-
-bb.i43: ; preds = %bb9
- %45 = icmp eq i32 %42, 0 ; [#uses=1]
- %46 = shl i32 %42, 1 ; [#uses=1]
- %iftmp.207.0.i.i = select i1 %45, i32 1, i32 %46 ; [#uses=4]
- %47 = icmp slt i32 %43, %iftmp.207.0.i.i ; [#uses=1]
- br i1 %47, label %bb.i.i, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
-
-bb.i.i: ; preds = %bb.i43
- %48 = icmp eq i32 %iftmp.207.0.i.i, 0 ; [#uses=1]
- br i1 %48, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %49 = mul i32 %iftmp.207.0.i.i, 136 ; [#uses=1]
- %50 = call i8* @_Z22btAlignedAllocInternalji(i32 %49, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %50 to %struct.btSolverConstraint* ; [#uses=1]
- %.pre.i = load i32* %28, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %51 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %42, %bb.i.i ] ; [#uses=2]
- %52 = phi %struct.btSolverConstraint* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %53 = icmp sgt i32 %51, 0 ; [#uses=1]
- br i1 %53, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
-
-bb.i4.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb.i4.i.i ], [ 0, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep63 = getelementptr %struct.btSolverConstraint* %52, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep5.i.i.i = bitcast %struct.btSolverConstraint* %scevgep63 to i8* ; [#uses=1]
- %54 = load %struct.btSolverConstraint** %30, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btSolverConstraint* %54, i32 %indvar.i.i.i ; [#uses=1]
- %scevgep67.i.i.i = bitcast %struct.btSolverConstraint* %scevgep to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %scevgep5.i.i.i, i8* %scevgep67.i.i.i, i32 136, i32 4, i1 false) nounwind
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %51 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i: ; preds = %bb.i4.i.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE8allocateEi.exit.i.i
- %55 = load %struct.btSolverConstraint** %30, align 4 ; [#uses=2]
- %56 = icmp eq %struct.btSolverConstraint* %55, null ; [#uses=1]
- br i1 %56, label %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
- %57 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %57, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %58 = bitcast %struct.btSolverConstraint* %55 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %58)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btSolverConstraint* null, %struct.btSolverConstraint** %30, align 4
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayI18btSolverConstraintE4copyEiiPS0_.exit.i.i
- store i8 1, i8* %31, align 4
- store %struct.btSolverConstraint* %52, %struct.btSolverConstraint** %30, align 4
- store i32 %iftmp.207.0.i.i, i32* %29, align 4
- %.pre6.i = load i32* %28, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
-
-_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i, %bb.i43, %bb9
- %59 = phi i32 [ %.pre6.i, %_ZN20btAlignedObjectArrayI18btSolverConstraintE10deallocateEv.exit.i.i ], [ %42, %bb9 ], [ %42, %bb.i43 ] ; [#uses=1]
- %60 = add nsw i32 %59, 1 ; [#uses=1]
- store i32 %60, i32* %28, align 4
- %61 = load %struct.btSolverConstraint** %30, align 4 ; [#uses=5]
- %62 = getelementptr inbounds %struct.btSolverConstraint* %61, i32 %42 ; [#uses=2]
- %63 = load i32* %7, align 4 ; [#uses=1]
- %.lobit.i45 = and i32 %63, 2 ; [#uses=1]
- %toBool.i46 = icmp eq i32 %.lobit.i45, 0 ; [#uses=1]
- %64 = select i1 %toBool.i46, %struct.btRigidBody* null, %struct.btRigidBody* %38 ; [#uses=3]
- %65 = load i32* %12, align 4 ; [#uses=1]
- %.lobit.i50 = and i32 %65, 2 ; [#uses=1]
- %toBool.i51 = icmp eq i32 %.lobit.i50, 0 ; [#uses=1]
- %66 = select i1 %toBool.i51, %struct.btRigidBody* null, %struct.btRigidBody* %37 ; [#uses=3]
- %67 = icmp eq %struct.btRigidBody* %64, null ; [#uses=1]
- br i1 %67, label %bb10, label %bb12
-
-bb10: ; preds = %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
- %68 = call %struct.btRigidBody* @_ZN35btSequentialImpulseConstraintSolver12getFixedBodyEv() ; [#uses=0]
- br label %bb12
-
-bb12: ; preds = %bb10, %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit
- %iftmp.186.0 = phi %struct.btRigidBody* [ @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, %bb10 ], [ %64, %_ZN20btAlignedObjectArrayI18btSolverConstraintE21expandNonInitializingEv.exit ] ; [#uses=1]
- %69 = getelementptr inbounds %struct.btSolverConstraint* %61, i32 %42, i32 11, i32 0 ; [#uses=1]
- store %struct.btRigidBody* %iftmp.186.0, %struct.btRigidBody** %69, align 4
- %70 = icmp eq %struct.btRigidBody* %66, null ; [#uses=1]
- br i1 %70, label %bb13, label %bb15
-
-bb13: ; preds = %bb12
- %71 = call %struct.btRigidBody* @_ZN35btSequentialImpulseConstraintSolver12getFixedBodyEv() ; [#uses=0]
- br label %bb15
-
-bb15: ; preds = %bb13, %bb12
- %iftmp.187.0 = phi %struct.btRigidBody* [ @_ZZN35btSequentialImpulseConstraintSolver12getFixedBodyEvE7s_fixed, %bb13 ], [ %66, %bb12 ] ; [#uses=1]
- %72 = getelementptr inbounds %struct.btSolverConstraint* %61, i32 %42, i32 12, i32 0 ; [#uses=1]
- store %struct.btRigidBody* %iftmp.187.0, %struct.btRigidBody** %72, align 4
- %73 = getelementptr inbounds %struct.btSolverConstraint* %61, i32 %42, i32 13, i32 0 ; [#uses=1]
- store i8* %scevgep6566, i8** %73, align 4
- call void @_ZN35btSequentialImpulseConstraintSolver22setupContactConstraintER18btSolverConstraintP17btCollisionObjectS3_R15btManifoldPointRK19btContactSolverInfoR9btVector3RfSB_SA_SA_(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btSolverConstraint* %62, %struct.btCollisionObject* %2, %struct.btCollisionObject* %5, %struct.btManifoldPoint* %scevgep65, %struct.btContactSolverInfo* %infoGlobal, %struct.btQuadWord* %vel, float* %rel_vel, float* %relaxation, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2) nounwind
- %74 = load i32* %32, align 4 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btSolverConstraint* %61, i32 %42, i32 10, i32 0 ; [#uses=1]
- store i32 %74, i32* %75, align 4
- %76 = load i32* %33, align 4 ; [#uses=1]
- %77 = and i32 %76, 32 ; [#uses=1]
- %78 = icmp eq i32 %77, 0 ; [#uses=1]
- br i1 %78, label %bb21, label %bb16
-
-bb16: ; preds = %bb15
- %79 = load i8* %scevgep68, align 4 ; [#uses=1]
- %toBool17not = icmp eq i8 %79, 0 ; [#uses=1]
- br i1 %toBool17not, label %bb21, label %bb30
-
-bb21: ; preds = %bb16, %bb15
- %80 = load float* %scevgep77, align 4 ; [#uses=9]
- %81 = load float* %rel_vel, align 4 ; [#uses=3]
- %82 = fmul float %80, %81 ; [#uses=1]
- %83 = load float* %scevgep78, align 4 ; [#uses=9]
- %84 = fmul float %83, %81 ; [#uses=1]
- %85 = load float* %scevgep79, align 4 ; [#uses=8]
- %86 = fmul float %85, %81 ; [#uses=1]
- %87 = load float* %34, align 8 ; [#uses=1]
- %88 = fsub float %87, %82 ; [#uses=4]
- %89 = load float* %35, align 4 ; [#uses=1]
- %90 = fsub float %89, %84 ; [#uses=4]
- %91 = load float* %36, align 8 ; [#uses=1]
- %92 = fsub float %91, %86 ; [#uses=4]
- store float %92, float* %scevgep71, align 4
- store float %90, float* %scevgep80, align 4
- store float %88, float* %scevgep81, align 4
- store float 0.000000e+00, float* %scevgep82, align 4
- %93 = fmul float %92, %92 ; [#uses=1]
- %94 = fmul float %90, %90 ; [#uses=1]
- %95 = fadd float %93, %94 ; [#uses=1]
- %96 = fmul float %88, %88 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=2]
- %98 = load i32* %33, align 4 ; [#uses=1]
- %99 = and i32 %98, 64 ; [#uses=1]
- %.not = icmp ne i32 %99, 0 ; [#uses=1]
- %100 = fcmp ule float %97, 0x3E80000000000000 ; [#uses=1]
- %or.cond = or i1 %.not, %100 ; [#uses=1]
- br i1 %or.cond, label %bb27, label %bb23
-
-bb23: ; preds = %bb21
- %101 = call float @sqrtf(float %97) nounwind readonly ; [#uses=1]
- %102 = fdiv float 1.000000e+00, %101 ; [#uses=3]
- %103 = fmul float %92, %102 ; [#uses=3]
- store float %103, float* %scevgep71, align 4
- %104 = fmul float %90, %102 ; [#uses=3]
- store float %104, float* %scevgep80, align 4
- %105 = fmul float %88, %102 ; [#uses=3]
- store float %105, float* %scevgep81, align 4
- %106 = load i32* %33, align 4 ; [#uses=1]
- %107 = and i32 %106, 16 ; [#uses=1]
- %108 = icmp eq i32 %107, 0 ; [#uses=1]
- br i1 %108, label %bb23.bb26_crit_edge, label %bb24
-
-bb23.bb26_crit_edge: ; preds = %bb23
- %.pre86 = load float* %relaxation, align 4 ; [#uses=1]
- br label %bb26
-
-bb24: ; preds = %bb23
- %109 = fmul float %103, %83 ; [#uses=1]
- %110 = fmul float %104, %85 ; [#uses=1]
- %111 = fsub float %109, %110 ; [#uses=4]
- %112 = fmul float %105, %85 ; [#uses=1]
- %113 = fmul float %103, %80 ; [#uses=1]
- %114 = fsub float %112, %113 ; [#uses=4]
- %115 = fmul float %104, %80 ; [#uses=1]
- %116 = fmul float %105, %83 ; [#uses=1]
- %117 = fsub float %115, %116 ; [#uses=4]
- store float %117, float* %scevgep75, align 4
- store float %114, float* %scevgep83, align 4
- store float %111, float* %scevgep84, align 4
- store float 0.000000e+00, float* %scevgep85, align 4
- %118 = fmul float %117, %117 ; [#uses=1]
- %119 = fmul float %114, %114 ; [#uses=1]
- %120 = fadd float %118, %119 ; [#uses=1]
- %121 = fmul float %111, %111 ; [#uses=1]
- %122 = fadd float %120, %121 ; [#uses=1]
- %123 = call float @sqrtf(float %122) nounwind readonly ; [#uses=1]
- %124 = fdiv float 1.000000e+00, %123 ; [#uses=3]
- %125 = fmul float %117, %124 ; [#uses=1]
- store float %125, float* %scevgep75, align 4
- %126 = fmul float %114, %124 ; [#uses=1]
- store float %126, float* %scevgep83, align 4
- %127 = fmul float %111, %124 ; [#uses=1]
- store float %127, float* %scevgep84, align 4
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %2, %struct.btQuadWord* %scevgep7576) nounwind
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %5, %struct.btQuadWord* %scevgep7576) nounwind
- %128 = load float* %relaxation, align 4 ; [#uses=2]
- %129 = call %struct.btSolverConstraint* @_ZN35btSequentialImpulseConstraintSolver21addFrictionConstraintERK9btVector3P11btRigidBodyS4_iR15btManifoldPointS2_S2_P17btCollisionObjectS8_fff(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btQuadWord* %scevgep7576, %struct.btRigidBody* %10, %struct.btRigidBody* %15, i32 %42, %struct.btManifoldPoint* %scevgep65, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2, %struct.btCollisionObject* %2, %struct.btCollisionObject* %5, float %128, float 0.000000e+00, float 0.000000e+00) ; [#uses=0]
- br label %bb26
-
-bb26: ; preds = %bb24, %bb23.bb26_crit_edge
- %130 = phi float [ %.pre86, %bb23.bb26_crit_edge ], [ %128, %bb24 ] ; [#uses=1]
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %2, %struct.btQuadWord* %scevgep7172) nounwind
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %5, %struct.btQuadWord* %scevgep7172) nounwind
- %131 = call %struct.btSolverConstraint* @_ZN35btSequentialImpulseConstraintSolver21addFrictionConstraintERK9btVector3P11btRigidBodyS4_iR15btManifoldPointS2_S2_P17btCollisionObjectS8_fff(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btQuadWord* %scevgep7172, %struct.btRigidBody* %10, %struct.btRigidBody* %15, i32 %42, %struct.btManifoldPoint* %scevgep65, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2, %struct.btCollisionObject* %2, %struct.btCollisionObject* %5, float %130, float 0.000000e+00, float 0.000000e+00) ; [#uses=0]
- store i8 1, i8* %scevgep68, align 4
- br label %bb32
-
-bb27: ; preds = %bb21
- %132 = call float @fabsf(float %80) nounwind readnone ; [#uses=1]
- %133 = fcmp ogt float %132, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %133, label %bb.i42, label %bb1.i
-
-bb.i42: ; preds = %bb27
- %134 = fmul float %83, %83 ; [#uses=1]
- %135 = fmul float %80, %80 ; [#uses=1]
- %136 = fadd float %134, %135 ; [#uses=2]
- %137 = call float @sqrtf(float %136) nounwind readonly ; [#uses=1]
- %138 = fdiv float 1.000000e+00, %137 ; [#uses=3]
- store float 0.000000e+00, float* %scevgep71, align 4
- %139 = fsub float -0.000000e+00, %80 ; [#uses=1]
- %140 = fmul float %138, %139 ; [#uses=2]
- store float %140, float* %scevgep80, align 4
- %141 = fmul float %83, %138 ; [#uses=2]
- store float %141, float* %scevgep81, align 4
- %142 = fmul float %136, %138 ; [#uses=1]
- store float %142, float* %scevgep75, align 4
- %143 = fsub float -0.000000e+00, %85 ; [#uses=1]
- %144 = fmul float %141, %143 ; [#uses=1]
- store float %144, float* %scevgep83, align 4
- %145 = fmul float %85, %140 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-bb1.i: ; preds = %bb27
- %146 = fmul float %85, %85 ; [#uses=1]
- %147 = fmul float %83, %83 ; [#uses=1]
- %148 = fadd float %146, %147 ; [#uses=2]
- %149 = call float @sqrtf(float %148) nounwind readonly ; [#uses=1]
- %150 = fdiv float 1.000000e+00, %149 ; [#uses=3]
- %151 = fsub float -0.000000e+00, %83 ; [#uses=1]
- %152 = fmul float %150, %151 ; [#uses=2]
- store float %152, float* %scevgep71, align 4
- %153 = fmul float %85, %150 ; [#uses=2]
- store float %153, float* %scevgep80, align 4
- store float 0.000000e+00, float* %scevgep81, align 4
- %154 = fsub float -0.000000e+00, %80 ; [#uses=1]
- %155 = fmul float %153, %154 ; [#uses=1]
- store float %155, float* %scevgep75, align 4
- %156 = fmul float %80, %152 ; [#uses=1]
- store float %156, float* %scevgep83, align 4
- %157 = fmul float %148, %150 ; [#uses=1]
- br label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
-
-_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit: ; preds = %bb1.i, %bb.i42
- %storemerge = phi float [ %157, %bb1.i ], [ %145, %bb.i42 ] ; [#uses=1]
- store float %storemerge, float* %scevgep84, align 4
- %158 = load i32* %33, align 4 ; [#uses=1]
- %159 = and i32 %158, 16 ; [#uses=1]
- %160 = icmp eq i32 %159, 0 ; [#uses=1]
- br i1 %160, label %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit.bb29_crit_edge, label %bb28
-
-_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit.bb29_crit_edge: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- %.pre = load float* %relaxation, align 4 ; [#uses=1]
- br label %bb29
-
-bb28: ; preds = %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %2, %struct.btQuadWord* %scevgep7576) nounwind
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %5, %struct.btQuadWord* %scevgep7576) nounwind
- %161 = load float* %relaxation, align 4 ; [#uses=2]
- %162 = call %struct.btSolverConstraint* @_ZN35btSequentialImpulseConstraintSolver21addFrictionConstraintERK9btVector3P11btRigidBodyS4_iR15btManifoldPointS2_S2_P17btCollisionObjectS8_fff(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btQuadWord* %scevgep7576, %struct.btRigidBody* %10, %struct.btRigidBody* %15, i32 %42, %struct.btManifoldPoint* %scevgep65, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2, %struct.btCollisionObject* %2, %struct.btCollisionObject* %5, float %161, float 0.000000e+00, float 0.000000e+00) ; [#uses=0]
- br label %bb29
-
-bb29: ; preds = %bb28, %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit.bb29_crit_edge
- %163 = phi float [ %.pre, %_Z13btPlaneSpace1I9btVector3EvRKT_RS1_S4_.exit.bb29_crit_edge ], [ %161, %bb28 ] ; [#uses=1]
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %2, %struct.btQuadWord* %scevgep7172) nounwind
- call void @_Z24applyAnisotropicFrictionP17btCollisionObjectR9btVector3(%struct.btCollisionObject* %5, %struct.btQuadWord* %scevgep7172) nounwind
- %164 = call %struct.btSolverConstraint* @_ZN35btSequentialImpulseConstraintSolver21addFrictionConstraintERK9btVector3P11btRigidBodyS4_iR15btManifoldPointS2_S2_P17btCollisionObjectS8_fff(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btQuadWord* %scevgep7172, %struct.btRigidBody* %10, %struct.btRigidBody* %15, i32 %42, %struct.btManifoldPoint* %scevgep65, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2, %struct.btCollisionObject* %2, %struct.btCollisionObject* %5, float %163, float 0.000000e+00, float 0.000000e+00) ; [#uses=0]
- store i8 1, i8* %scevgep68, align 4
- br label %bb32
-
-bb30: ; preds = %bb16
- %165 = load float* %scevgep69, align 4 ; [#uses=1]
- %166 = load float* %scevgep70, align 4 ; [#uses=1]
- %167 = load float* %relaxation, align 4 ; [#uses=2]
- %168 = call %struct.btSolverConstraint* @_ZN35btSequentialImpulseConstraintSolver21addFrictionConstraintERK9btVector3P11btRigidBodyS4_iR15btManifoldPointS2_S2_P17btCollisionObjectS8_fff(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btQuadWord* %scevgep7172, %struct.btRigidBody* %10, %struct.btRigidBody* %15, i32 %42, %struct.btManifoldPoint* %scevgep65, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2, %struct.btCollisionObject* %2, %struct.btCollisionObject* %5, float %167, float %166, float %165) ; [#uses=0]
- %169 = load i32* %33, align 4 ; [#uses=1]
- %170 = and i32 %169, 16 ; [#uses=1]
- %171 = icmp eq i32 %170, 0 ; [#uses=1]
- br i1 %171, label %bb32, label %bb31
-
-bb31: ; preds = %bb30
- %172 = load float* %scevgep73, align 4 ; [#uses=1]
- %173 = load float* %scevgep74, align 4 ; [#uses=1]
- %174 = call %struct.btSolverConstraint* @_ZN35btSequentialImpulseConstraintSolver21addFrictionConstraintERK9btVector3P11btRigidBodyS4_iR15btManifoldPointS2_S2_P17btCollisionObjectS8_fff(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btQuadWord* %scevgep7576, %struct.btRigidBody* %10, %struct.btRigidBody* %15, i32 %42, %struct.btManifoldPoint* %scevgep65, %struct.btQuadWord* %rel_pos1, %struct.btQuadWord* %rel_pos2, %struct.btCollisionObject* %2, %struct.btCollisionObject* %5, float %167, float %173, float %172) ; [#uses=0]
- br label %bb32
-
-bb32: ; preds = %bb31, %bb30, %bb29, %bb26
- call void @_ZN35btSequentialImpulseConstraintSolver28setFrictionConstraintImpulseER18btSolverConstraintP11btRigidBodyS3_R15btManifoldPointRK19btContactSolverInfo(%struct.btSequentialImpulseConstraintSolver* %this, %struct.btSolverConstraint* %62, %struct.btRigidBody* %64, %struct.btRigidBody* %66, %struct.btManifoldPoint* %scevgep65, %struct.btContactSolverInfo* %infoGlobal)
- br label %bb33
-
-bb33: ; preds = %bb32, %bb7
- %175 = load i32* %24, align 4 ; [#uses=1]
- %176 = icmp sgt i32 %175, %tmp ; [#uses=1]
- br i1 %176, label %bb7, label %return
-
-return: ; preds = %bb33, %bb34.preheader, %bb2, %bb1
- ret void
-}
-
-; [#uses=2]
-declare void @llvm.memset.p0i8.i32(i8* nocapture, i8, i32, i32, i1) nounwind
-
-; [#uses=0]
-define void @_ZN18btSliderConstraint10initParamsEv(%struct.btSliderConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float 1.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float -1.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x3FE6666660000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 14 ; [#uses=1]
- store float 1.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 15 ; [#uses=1]
- store float 0x3FE6666660000000, float* %9, align 4
- %10 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %10, align 4
- %11 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 26 ; [#uses=1]
- store float 1.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 27 ; [#uses=1]
- store float 0x3FE6666660000000, float* %13, align 4
- %14 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 28 ; [#uses=1]
- store float 1.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store float 0.000000e+00, float* %15, align 4
- %16 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 30 ; [#uses=1]
- store float 1.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 31 ; [#uses=1]
- store float 0x3FE6666660000000, float* %17, align 4
- %18 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 32 ; [#uses=1]
- store float 1.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 33 ; [#uses=1]
- store float 0.000000e+00, float* %19, align 4
- %20 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store float 1.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store float 0x3FE6666660000000, float* %21, align 4
- %22 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store float 1.000000e+00, float* %22, align 4
- %23 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store float 1.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store float 0x3FE6666660000000, float* %25, align 4
- %26 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 24 ; [#uses=1]
- store float 1.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 55 ; [#uses=1]
- store i8 0, i8* %28, align 4
- %29 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 56 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 57 ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 58 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 59 ; [#uses=1]
- store i8 0, i8* %32, align 4
- %33 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 60 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 61 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 62 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store i32 0, i32* %36, align 4
- %37 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %37, align 1
- %38 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %39 = load %struct.btRigidBody** %38, align 4 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 0, i32 1 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %42 = load %struct.btRigidBody** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btRigidBody* %42, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN18btSliderConstraint19calculateTransformsERK11btTransformS2_(%struct.btSliderConstraint* %this, %struct.btTransform* %43, %struct.btTransform* %40)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK18btSliderConstraint28calculateSerializeBufferSizeEv(%struct.btSliderConstraint* nocapture %this) nounwind readnone inlinehint align 2 {
-entry:
- ret i32 196
-}
-
-; [#uses=0]
-define void @_ZN18btSliderConstraint18getInfo1NonVirtualEPN17btTypedConstraint17btConstraintInfo1E(%struct.btSliderConstraint* nocapture %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=1]
- store i32 6, i32* %0, align 4
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %1, align 4
- ret void
-}
-
-; [#uses=4]
-define void @_ZN18btSliderConstraint19calculateTransformsERK11btTransformS2_(%struct.btSliderConstraint* %this, %struct.btTransform* %transA, %struct.btTransform* %transB) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=2]
- br i1 %toBool, label %bb, label %bb5
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load i8* %2, align 4 ; [#uses=1]
- %toBool1not = icmp eq i8 %3, 0 ; [#uses=1]
- br i1 %toBool1not, label %bb5, label %bb6
-
-bb5: ; preds = %bb, %entry
- %4 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=4]
- %6 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = fmul float %5, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=4]
- %11 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=3]
- %13 = fmul float %10, %12 ; [#uses=1]
- %14 = fadd float %8, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=4]
- %17 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = fmul float %16, %18 ; [#uses=1]
- %20 = fadd float %14, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fadd float %20, %22 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=4]
- %26 = fmul float %25, %7 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=4]
- %29 = fmul float %28, %12 ; [#uses=1]
- %30 = fadd float %26, %29 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=4]
- %33 = fmul float %32, %18 ; [#uses=1]
- %34 = fadd float %30, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fadd float %34, %36 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=4]
- %40 = fmul float %39, %7 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=4]
- %43 = fmul float %42, %12 ; [#uses=1]
- %44 = fadd float %40, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=4]
- %47 = fmul float %46, %18 ; [#uses=1]
- %48 = fadd float %44, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fadd float %48, %50 ; [#uses=2]
- %52 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=3]
- %54 = fmul float %53, %5 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=3]
- %57 = fmul float %56, %10 ; [#uses=1]
- %58 = fadd float %54, %57 ; [#uses=1]
- %59 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fmul float %60, %16 ; [#uses=1]
- %62 = fadd float %58, %61 ; [#uses=2]
- %63 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=3]
- %65 = fmul float %64, %5 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = fmul float %67, %10 ; [#uses=1]
- %69 = fadd float %65, %68 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=3]
- %72 = fmul float %71, %16 ; [#uses=1]
- %73 = fadd float %69, %72 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=3]
- %76 = fmul float %75, %5 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=3]
- %79 = fmul float %78, %10 ; [#uses=1]
- %80 = fadd float %76, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=3]
- %83 = fmul float %82, %16 ; [#uses=1]
- %84 = fadd float %80, %83 ; [#uses=2]
- %85 = fmul float %53, %25 ; [#uses=1]
- %86 = fmul float %56, %28 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fmul float %60, %32 ; [#uses=1]
- %89 = fadd float %87, %88 ; [#uses=2]
- %90 = fmul float %64, %25 ; [#uses=1]
- %91 = fmul float %67, %28 ; [#uses=1]
- %92 = fadd float %90, %91 ; [#uses=1]
- %93 = fmul float %71, %32 ; [#uses=1]
- %94 = fadd float %92, %93 ; [#uses=2]
- %95 = fmul float %75, %25 ; [#uses=1]
- %96 = fmul float %78, %28 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %82, %32 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=2]
- %100 = fmul float %53, %39 ; [#uses=1]
- %101 = fmul float %56, %42 ; [#uses=1]
- %102 = fadd float %100, %101 ; [#uses=1]
- %103 = fmul float %60, %46 ; [#uses=1]
- %104 = fadd float %102, %103 ; [#uses=2]
- %105 = fmul float %64, %39 ; [#uses=1]
- %106 = fmul float %67, %42 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = fmul float %71, %46 ; [#uses=1]
- %109 = fadd float %107, %108 ; [#uses=2]
- %110 = fmul float %75, %39 ; [#uses=1]
- %111 = fmul float %78, %42 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %82, %46 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=2]
- %115 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %114, float* %115, align 4
- %116 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %109, float* %116, align 4
- %117 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %104, float* %117, align 4
- %118 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %118, align 4
- %119 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %99, float* %119, align 4
- %120 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %94, float* %120, align 4
- %121 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %89, float* %121, align 4
- %122 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %122, align 4
- %123 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %84, float* %123, align 4
- %124 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %73, float* %124, align 4
- %125 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %62, float* %125, align 4
- %126 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %126, align 4
- %127 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %51, float* %127, align 4
- %128 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %37, float* %128, align 4
- %129 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %23, float* %129, align 4
- %130 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 4
- %131 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=4]
- %133 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=3]
- %135 = fmul float %132, %134 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=4]
- %138 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %139 = load float* %138, align 4 ; [#uses=3]
- %140 = fmul float %137, %139 ; [#uses=1]
- %141 = fadd float %135, %140 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %143 = load float* %142, align 4 ; [#uses=4]
- %144 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=3]
- %146 = fmul float %143, %145 ; [#uses=1]
- %147 = fadd float %141, %146 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=1]
- %150 = fadd float %147, %149 ; [#uses=2]
- %151 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=4]
- %153 = fmul float %152, %134 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=4]
- %156 = fmul float %155, %139 ; [#uses=1]
- %157 = fadd float %153, %156 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=4]
- %160 = fmul float %159, %145 ; [#uses=1]
- %161 = fadd float %157, %160 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %163 = load float* %162, align 4 ; [#uses=1]
- %164 = fadd float %161, %163 ; [#uses=2]
- %165 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=4]
- %167 = fmul float %166, %134 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=4]
- %170 = fmul float %169, %139 ; [#uses=1]
- %171 = fadd float %167, %170 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=4]
- %174 = fmul float %173, %145 ; [#uses=1]
- %175 = fadd float %171, %174 ; [#uses=1]
- %176 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=1]
- %178 = fadd float %175, %177 ; [#uses=2]
- %179 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %180 = load float* %179, align 4 ; [#uses=3]
- %181 = fmul float %180, %132 ; [#uses=1]
- %182 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %183 = load float* %182, align 4 ; [#uses=3]
- %184 = fmul float %183, %137 ; [#uses=1]
- %185 = fadd float %181, %184 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=3]
- %188 = fmul float %187, %143 ; [#uses=1]
- %189 = fadd float %185, %188 ; [#uses=1]
- %190 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %191 = load float* %190, align 4 ; [#uses=3]
- %192 = fmul float %191, %132 ; [#uses=1]
- %193 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %194 = load float* %193, align 4 ; [#uses=3]
- %195 = fmul float %194, %137 ; [#uses=1]
- %196 = fadd float %192, %195 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %198 = load float* %197, align 4 ; [#uses=3]
- %199 = fmul float %198, %143 ; [#uses=1]
- %200 = fadd float %196, %199 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %202 = load float* %201, align 4 ; [#uses=3]
- %203 = fmul float %202, %132 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=3]
- %206 = fmul float %205, %137 ; [#uses=1]
- %207 = fadd float %203, %206 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=3]
- %210 = fmul float %209, %143 ; [#uses=1]
- %211 = fadd float %207, %210 ; [#uses=1]
- %212 = fmul float %180, %152 ; [#uses=1]
- %213 = fmul float %183, %155 ; [#uses=1]
- %214 = fadd float %212, %213 ; [#uses=1]
- %215 = fmul float %187, %159 ; [#uses=1]
- %216 = fadd float %214, %215 ; [#uses=1]
- %217 = fmul float %191, %152 ; [#uses=1]
- %218 = fmul float %194, %155 ; [#uses=1]
- %219 = fadd float %217, %218 ; [#uses=1]
- %220 = fmul float %198, %159 ; [#uses=1]
- %221 = fadd float %219, %220 ; [#uses=1]
- %222 = fmul float %202, %152 ; [#uses=1]
- %223 = fmul float %205, %155 ; [#uses=1]
- %224 = fadd float %222, %223 ; [#uses=1]
- %225 = fmul float %209, %159 ; [#uses=1]
- %226 = fadd float %224, %225 ; [#uses=1]
- %227 = fmul float %180, %166 ; [#uses=1]
- %228 = fmul float %183, %169 ; [#uses=1]
- %229 = fadd float %227, %228 ; [#uses=1]
- %230 = fmul float %187, %173 ; [#uses=1]
- %231 = fadd float %229, %230 ; [#uses=1]
- %232 = fmul float %191, %166 ; [#uses=1]
- %233 = fmul float %194, %169 ; [#uses=1]
- %234 = fadd float %232, %233 ; [#uses=1]
- %235 = fmul float %198, %173 ; [#uses=1]
- %236 = fadd float %234, %235 ; [#uses=1]
- %237 = fmul float %202, %166 ; [#uses=1]
- %238 = fmul float %205, %169 ; [#uses=1]
- %239 = fadd float %237, %238 ; [#uses=1]
- %240 = fmul float %209, %173 ; [#uses=1]
- %241 = fadd float %239, %240 ; [#uses=1]
- %242 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %241, float* %242, align 4
- %243 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %236, float* %243, align 4
- %244 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %231, float* %244, align 4
- %245 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %245, align 4
- %246 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %226, float* %246, align 4
- %247 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %221, float* %247, align 4
- %248 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %216, float* %248, align 4
- %249 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %249, align 4
- %250 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %211, float* %250, align 4
- %251 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %200, float* %251, align 4
- %252 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %189, float* %252, align 4
- %253 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %253, align 4
- %254 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %178, float* %254, align 4
- %255 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %164, float* %255, align 4
- %256 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %150, float* %256, align 4
- %257 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %257, align 4
- br label %bb7
-
-bb6: ; preds = %bb
- %258 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %259 = load float* %258, align 4 ; [#uses=4]
- %260 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %261 = load float* %260, align 4 ; [#uses=3]
- %262 = fmul float %259, %261 ; [#uses=1]
- %263 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %264 = load float* %263, align 4 ; [#uses=4]
- %265 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %266 = load float* %265, align 4 ; [#uses=3]
- %267 = fmul float %264, %266 ; [#uses=1]
- %268 = fadd float %262, %267 ; [#uses=1]
- %269 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %270 = load float* %269, align 4 ; [#uses=4]
- %271 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %272 = load float* %271, align 4 ; [#uses=3]
- %273 = fmul float %270, %272 ; [#uses=1]
- %274 = fadd float %268, %273 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %276 = load float* %275, align 4 ; [#uses=1]
- %277 = fadd float %274, %276 ; [#uses=2]
- %278 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %279 = load float* %278, align 4 ; [#uses=4]
- %280 = fmul float %279, %261 ; [#uses=1]
- %281 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %282 = load float* %281, align 4 ; [#uses=4]
- %283 = fmul float %282, %266 ; [#uses=1]
- %284 = fadd float %280, %283 ; [#uses=1]
- %285 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %286 = load float* %285, align 4 ; [#uses=4]
- %287 = fmul float %286, %272 ; [#uses=1]
- %288 = fadd float %284, %287 ; [#uses=1]
- %289 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %290 = load float* %289, align 4 ; [#uses=1]
- %291 = fadd float %288, %290 ; [#uses=2]
- %292 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %293 = load float* %292, align 4 ; [#uses=4]
- %294 = fmul float %293, %261 ; [#uses=1]
- %295 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %296 = load float* %295, align 4 ; [#uses=4]
- %297 = fmul float %296, %266 ; [#uses=1]
- %298 = fadd float %294, %297 ; [#uses=1]
- %299 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %300 = load float* %299, align 4 ; [#uses=4]
- %301 = fmul float %300, %272 ; [#uses=1]
- %302 = fadd float %298, %301 ; [#uses=1]
- %303 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %304 = load float* %303, align 4 ; [#uses=1]
- %305 = fadd float %302, %304 ; [#uses=2]
- %306 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %307 = load float* %306, align 4 ; [#uses=3]
- %308 = fmul float %307, %259 ; [#uses=1]
- %309 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %310 = load float* %309, align 4 ; [#uses=3]
- %311 = fmul float %310, %264 ; [#uses=1]
- %312 = fadd float %308, %311 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %314 = load float* %313, align 4 ; [#uses=3]
- %315 = fmul float %314, %270 ; [#uses=1]
- %316 = fadd float %312, %315 ; [#uses=2]
- %317 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %318 = load float* %317, align 4 ; [#uses=3]
- %319 = fmul float %318, %259 ; [#uses=1]
- %320 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %321 = load float* %320, align 4 ; [#uses=3]
- %322 = fmul float %321, %264 ; [#uses=1]
- %323 = fadd float %319, %322 ; [#uses=1]
- %324 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %325 = load float* %324, align 4 ; [#uses=3]
- %326 = fmul float %325, %270 ; [#uses=1]
- %327 = fadd float %323, %326 ; [#uses=2]
- %328 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %329 = load float* %328, align 4 ; [#uses=3]
- %330 = fmul float %329, %259 ; [#uses=1]
- %331 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %332 = load float* %331, align 4 ; [#uses=3]
- %333 = fmul float %332, %264 ; [#uses=1]
- %334 = fadd float %330, %333 ; [#uses=1]
- %335 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %336 = load float* %335, align 4 ; [#uses=3]
- %337 = fmul float %336, %270 ; [#uses=1]
- %338 = fadd float %334, %337 ; [#uses=2]
- %339 = fmul float %307, %279 ; [#uses=1]
- %340 = fmul float %310, %282 ; [#uses=1]
- %341 = fadd float %339, %340 ; [#uses=1]
- %342 = fmul float %314, %286 ; [#uses=1]
- %343 = fadd float %341, %342 ; [#uses=2]
- %344 = fmul float %318, %279 ; [#uses=1]
- %345 = fmul float %321, %282 ; [#uses=1]
- %346 = fadd float %344, %345 ; [#uses=1]
- %347 = fmul float %325, %286 ; [#uses=1]
- %348 = fadd float %346, %347 ; [#uses=2]
- %349 = fmul float %329, %279 ; [#uses=1]
- %350 = fmul float %332, %282 ; [#uses=1]
- %351 = fadd float %349, %350 ; [#uses=1]
- %352 = fmul float %336, %286 ; [#uses=1]
- %353 = fadd float %351, %352 ; [#uses=2]
- %354 = fmul float %307, %293 ; [#uses=1]
- %355 = fmul float %310, %296 ; [#uses=1]
- %356 = fadd float %354, %355 ; [#uses=1]
- %357 = fmul float %314, %300 ; [#uses=1]
- %358 = fadd float %356, %357 ; [#uses=2]
- %359 = fmul float %318, %293 ; [#uses=1]
- %360 = fmul float %321, %296 ; [#uses=1]
- %361 = fadd float %359, %360 ; [#uses=1]
- %362 = fmul float %325, %300 ; [#uses=1]
- %363 = fadd float %361, %362 ; [#uses=2]
- %364 = fmul float %329, %293 ; [#uses=1]
- %365 = fmul float %332, %296 ; [#uses=1]
- %366 = fadd float %364, %365 ; [#uses=1]
- %367 = fmul float %336, %300 ; [#uses=1]
- %368 = fadd float %366, %367 ; [#uses=2]
- %369 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %368, float* %369, align 4
- %370 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %363, float* %370, align 4
- %371 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %358, float* %371, align 4
- %372 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %372, align 4
- %373 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %353, float* %373, align 4
- %374 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %348, float* %374, align 4
- %375 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %343, float* %375, align 4
- %376 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %376, align 4
- %377 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %338, float* %377, align 4
- %378 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %327, float* %378, align 4
- %379 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %316, float* %379, align 4
- %380 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %380, align 4
- %381 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %305, float* %381, align 4
- %382 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %291, float* %382, align 4
- %383 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %277, float* %383, align 4
- %384 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %384, align 4
- %385 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %386 = load float* %385, align 4 ; [#uses=4]
- %387 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %388 = load float* %387, align 4 ; [#uses=3]
- %389 = fmul float %386, %388 ; [#uses=1]
- %390 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %391 = load float* %390, align 4 ; [#uses=4]
- %392 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %393 = load float* %392, align 4 ; [#uses=3]
- %394 = fmul float %391, %393 ; [#uses=1]
- %395 = fadd float %389, %394 ; [#uses=1]
- %396 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %397 = load float* %396, align 4 ; [#uses=4]
- %398 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %399 = load float* %398, align 4 ; [#uses=3]
- %400 = fmul float %397, %399 ; [#uses=1]
- %401 = fadd float %395, %400 ; [#uses=1]
- %402 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %403 = load float* %402, align 4 ; [#uses=1]
- %404 = fadd float %401, %403 ; [#uses=2]
- %405 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %406 = load float* %405, align 4 ; [#uses=4]
- %407 = fmul float %406, %388 ; [#uses=1]
- %408 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %409 = load float* %408, align 4 ; [#uses=4]
- %410 = fmul float %409, %393 ; [#uses=1]
- %411 = fadd float %407, %410 ; [#uses=1]
- %412 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %413 = load float* %412, align 4 ; [#uses=4]
- %414 = fmul float %413, %399 ; [#uses=1]
- %415 = fadd float %411, %414 ; [#uses=1]
- %416 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %417 = load float* %416, align 4 ; [#uses=1]
- %418 = fadd float %415, %417 ; [#uses=2]
- %419 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %420 = load float* %419, align 4 ; [#uses=4]
- %421 = fmul float %420, %388 ; [#uses=1]
- %422 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %423 = load float* %422, align 4 ; [#uses=4]
- %424 = fmul float %423, %393 ; [#uses=1]
- %425 = fadd float %421, %424 ; [#uses=1]
- %426 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %427 = load float* %426, align 4 ; [#uses=4]
- %428 = fmul float %427, %399 ; [#uses=1]
- %429 = fadd float %425, %428 ; [#uses=1]
- %430 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %431 = load float* %430, align 4 ; [#uses=1]
- %432 = fadd float %429, %431 ; [#uses=2]
- %433 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %434 = load float* %433, align 4 ; [#uses=3]
- %435 = fmul float %434, %386 ; [#uses=1]
- %436 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %437 = load float* %436, align 4 ; [#uses=3]
- %438 = fmul float %437, %391 ; [#uses=1]
- %439 = fadd float %435, %438 ; [#uses=1]
- %440 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %441 = load float* %440, align 4 ; [#uses=3]
- %442 = fmul float %441, %397 ; [#uses=1]
- %443 = fadd float %439, %442 ; [#uses=1]
- %444 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %445 = load float* %444, align 4 ; [#uses=3]
- %446 = fmul float %445, %386 ; [#uses=1]
- %447 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %448 = load float* %447, align 4 ; [#uses=3]
- %449 = fmul float %448, %391 ; [#uses=1]
- %450 = fadd float %446, %449 ; [#uses=1]
- %451 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %452 = load float* %451, align 4 ; [#uses=3]
- %453 = fmul float %452, %397 ; [#uses=1]
- %454 = fadd float %450, %453 ; [#uses=1]
- %455 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %456 = load float* %455, align 4 ; [#uses=3]
- %457 = fmul float %456, %386 ; [#uses=1]
- %458 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %459 = load float* %458, align 4 ; [#uses=3]
- %460 = fmul float %459, %391 ; [#uses=1]
- %461 = fadd float %457, %460 ; [#uses=1]
- %462 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %463 = load float* %462, align 4 ; [#uses=3]
- %464 = fmul float %463, %397 ; [#uses=1]
- %465 = fadd float %461, %464 ; [#uses=1]
- %466 = fmul float %434, %406 ; [#uses=1]
- %467 = fmul float %437, %409 ; [#uses=1]
- %468 = fadd float %466, %467 ; [#uses=1]
- %469 = fmul float %441, %413 ; [#uses=1]
- %470 = fadd float %468, %469 ; [#uses=1]
- %471 = fmul float %445, %406 ; [#uses=1]
- %472 = fmul float %448, %409 ; [#uses=1]
- %473 = fadd float %471, %472 ; [#uses=1]
- %474 = fmul float %452, %413 ; [#uses=1]
- %475 = fadd float %473, %474 ; [#uses=1]
- %476 = fmul float %456, %406 ; [#uses=1]
- %477 = fmul float %459, %409 ; [#uses=1]
- %478 = fadd float %476, %477 ; [#uses=1]
- %479 = fmul float %463, %413 ; [#uses=1]
- %480 = fadd float %478, %479 ; [#uses=1]
- %481 = fmul float %434, %420 ; [#uses=1]
- %482 = fmul float %437, %423 ; [#uses=1]
- %483 = fadd float %481, %482 ; [#uses=1]
- %484 = fmul float %441, %427 ; [#uses=1]
- %485 = fadd float %483, %484 ; [#uses=1]
- %486 = fmul float %445, %420 ; [#uses=1]
- %487 = fmul float %448, %423 ; [#uses=1]
- %488 = fadd float %486, %487 ; [#uses=1]
- %489 = fmul float %452, %427 ; [#uses=1]
- %490 = fadd float %488, %489 ; [#uses=1]
- %491 = fmul float %456, %420 ; [#uses=1]
- %492 = fmul float %459, %423 ; [#uses=1]
- %493 = fadd float %491, %492 ; [#uses=1]
- %494 = fmul float %463, %427 ; [#uses=1]
- %495 = fadd float %493, %494 ; [#uses=1]
- %496 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %495, float* %496, align 4
- %497 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %490, float* %497, align 4
- %498 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %485, float* %498, align 4
- %499 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %499, align 4
- %500 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %480, float* %500, align 4
- %501 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %475, float* %501, align 4
- %502 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %470, float* %502, align 4
- %503 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %503, align 4
- %504 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %465, float* %504, align 4
- %505 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %454, float* %505, align 4
- %506 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %443, float* %506, align 4
- %507 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %507, align 4
- %508 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %432, float* %508, align 4
- %509 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %418, float* %509, align 4
- %510 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %404, float* %510, align 4
- %511 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %511, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %512 = phi float [ %316, %bb6 ], [ %62, %bb5 ] ; [#uses=1]
- %513 = phi float [ %343, %bb6 ], [ %89, %bb5 ] ; [#uses=1]
- %514 = phi float [ %358, %bb6 ], [ %104, %bb5 ] ; [#uses=1]
- %515 = phi float [ %327, %bb6 ], [ %73, %bb5 ] ; [#uses=1]
- %516 = phi float [ %348, %bb6 ], [ %94, %bb5 ] ; [#uses=1]
- %517 = phi float [ %363, %bb6 ], [ %109, %bb5 ] ; [#uses=1]
- %518 = phi float [ %338, %bb6 ], [ %84, %bb5 ] ; [#uses=4]
- %519 = phi float [ %353, %bb6 ], [ %99, %bb5 ] ; [#uses=4]
- %520 = phi float [ %368, %bb6 ], [ %114, %bb5 ] ; [#uses=4]
- %521 = phi float [ %404, %bb6 ], [ %150, %bb5 ] ; [#uses=3]
- %522 = phi float [ %418, %bb6 ], [ %164, %bb5 ] ; [#uses=3]
- %523 = phi float [ %432, %bb6 ], [ %178, %bb5 ] ; [#uses=3]
- %524 = phi float [ %277, %bb6 ], [ %23, %bb5 ] ; [#uses=4]
- %525 = phi float [ %291, %bb6 ], [ %37, %bb5 ] ; [#uses=4]
- %526 = phi float [ %305, %bb6 ], [ %51, %bb5 ] ; [#uses=4]
- %527 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 44, i32 0, i32 0 ; [#uses=1]
- store float %526, float* %527, align 4
- %528 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 44, i32 0, i32 1 ; [#uses=1]
- store float %525, float* %528, align 4
- %529 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 44, i32 0, i32 2 ; [#uses=1]
- store float %524, float* %529, align 4
- %530 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 44, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %530, align 4
- %531 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 45, i32 0, i32 0 ; [#uses=1]
- store float %523, float* %531, align 4
- %532 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 45, i32 0, i32 1 ; [#uses=1]
- store float %522, float* %532, align 4
- %533 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 45, i32 0, i32 2 ; [#uses=1]
- store float %521, float* %533, align 4
- %534 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 45, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %534, align 4
- %535 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 43, i32 0, i32 0 ; [#uses=1]
- store float %520, float* %535, align 4
- %536 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 43, i32 0, i32 1 ; [#uses=1]
- store float %519, float* %536, align 4
- %537 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 43, i32 0, i32 2 ; [#uses=1]
- store float %518, float* %537, align 4
- %538 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 43, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %538, align 4
- br i1 %toBool, label %bb9, label %bb11
-
-bb9: ; preds = %bb7
- %539 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %540 = load i8* %539, align 4 ; [#uses=1]
- %toBool10 = icmp eq i8 %540, 0 ; [#uses=1]
- br i1 %toBool10, label %bb13, label %bb11
-
-bb11: ; preds = %bb9, %bb7
- %541 = fsub float %521, %524 ; [#uses=2]
- %542 = fsub float %522, %525 ; [#uses=2]
- %543 = fsub float %523, %526 ; [#uses=2]
- %544 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 0 ; [#uses=1]
- store float %543, float* %544, align 4
- %545 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 1 ; [#uses=1]
- store float %542, float* %545, align 4
- %546 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 2 ; [#uses=1]
- store float %541, float* %546, align 4
- %547 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %547, align 4
- br label %return
-
-bb13: ; preds = %bb9
- %548 = fsub float %524, %521 ; [#uses=2]
- %549 = fsub float %525, %522 ; [#uses=2]
- %550 = fsub float %526, %523 ; [#uses=2]
- %551 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 0 ; [#uses=1]
- store float %550, float* %551, align 4
- %552 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 1 ; [#uses=1]
- store float %549, float* %552, align 4
- %553 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 2 ; [#uses=1]
- store float %548, float* %553, align 4
- %554 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 47, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %554, align 4
- br label %return
-
-return: ; preds = %bb13, %bb11
- %555 = phi float [ %548, %bb13 ], [ %541, %bb11 ] ; [#uses=4]
- %556 = phi float [ %549, %bb13 ], [ %542, %bb11 ] ; [#uses=4]
- %557 = phi float [ %550, %bb13 ], [ %543, %bb11 ] ; [#uses=4]
- %558 = fmul float %520, %557 ; [#uses=1]
- %559 = fmul float %519, %556 ; [#uses=1]
- %560 = fadd float %558, %559 ; [#uses=1]
- %561 = fmul float %518, %555 ; [#uses=1]
- %562 = fadd float %560, %561 ; [#uses=3]
- %563 = fmul float %518, %562 ; [#uses=1]
- %564 = fmul float %519, %562 ; [#uses=1]
- %565 = fmul float %520, %562 ; [#uses=1]
- %566 = fadd float %524, %563 ; [#uses=1]
- %567 = fadd float %525, %564 ; [#uses=1]
- %568 = fadd float %526, %565 ; [#uses=1]
- %569 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 46, i32 0, i32 0 ; [#uses=1]
- store float %568, float* %569, align 4
- %570 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 46, i32 0, i32 1 ; [#uses=1]
- store float %567, float* %570, align 4
- %571 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 46, i32 0, i32 2 ; [#uses=1]
- store float %566, float* %571, align 4
- %572 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 46, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %572, align 4
- %scevgep102 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 48, i32 0, i32 0 ; [#uses=1]
- %573 = fmul float %557, %520 ; [#uses=1]
- %574 = fmul float %556, %519 ; [#uses=1]
- %575 = fadd float %573, %574 ; [#uses=1]
- %576 = fmul float %555, %518 ; [#uses=1]
- %577 = fadd float %575, %576 ; [#uses=1]
- store float %577, float* %scevgep102, align 4
- %scevgep102.1 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 48, i32 0, i32 1 ; [#uses=1]
- %578 = fmul float %557, %517 ; [#uses=1]
- %579 = fmul float %556, %516 ; [#uses=1]
- %580 = fadd float %578, %579 ; [#uses=1]
- %581 = fmul float %555, %515 ; [#uses=1]
- %582 = fadd float %580, %581 ; [#uses=1]
- store float %582, float* %scevgep102.1, align 4
- %scevgep102.2 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 48, i32 0, i32 2 ; [#uses=1]
- %583 = fmul float %557, %514 ; [#uses=1]
- %584 = fmul float %556, %513 ; [#uses=1]
- %585 = fadd float %583, %584 ; [#uses=1]
- %586 = fmul float %555, %512 ; [#uses=1]
- %587 = fadd float %585, %586 ; [#uses=1]
- store float %587, float* %scevgep102.2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btSliderConstraint13testLinLimitsEv(%struct.btSliderConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 34 ; [#uses=3]
- store i8 0, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 48, i32 0, i32 0 ; [#uses=5]
- %2 = load float* %1, align 4 ; [#uses=5]
- %3 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 51 ; [#uses=1]
- store float %2, float* %3, align 4
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = fcmp ugt float %5, %7 ; [#uses=1]
- br i1 %8, label %bb6, label %bb
-
-bb: ; preds = %entry
- %9 = fcmp ogt float %2, %7 ; [#uses=1]
- br i1 %9, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %10 = fsub float %2, %7 ; [#uses=1]
- store float %10, float* %1, align 4
- store i8 1, i8* %0, align 4
- ret void
-
-bb2: ; preds = %bb
- %11 = fcmp olt float %2, %5 ; [#uses=1]
- br i1 %11, label %bb4, label %bb5
-
-bb4: ; preds = %bb2
- %12 = fsub float %2, %5 ; [#uses=1]
- store float %12, float* %1, align 4
- store i8 1, i8* %0, align 4
- ret void
-
-bb5: ; preds = %bb2
- store float 0.000000e+00, float* %1, align 4
- ret void
-
-bb6: ; preds = %entry
- store float 0.000000e+00, float* %1, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btSliderConstraint11getAncorInAEv(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btSliderConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fadd float %1, %3 ; [#uses=1]
- %5 = fmul float %4, 5.000000e-01 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 43, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fmul float %7, %5 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 43, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %10, %5 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 43, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %13, %5 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 44, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fadd float %16, %8 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 44, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fadd float %19, %11 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 44, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fadd float %22, %14 ; [#uses=3]
- %24 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %29 = load %struct.btRigidBody** %28, align 4 ; [#uses=12]
- %30 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = load float* %37, align 4 ; [#uses=2]
- %41 = load float* %36, align 4 ; [#uses=2]
- %42 = load float* %35, align 4 ; [#uses=2]
- %43 = load float* %34, align 4 ; [#uses=2]
- %44 = load float* %33, align 4 ; [#uses=2]
- %45 = load float* %32, align 4 ; [#uses=2]
- %46 = load float* %31, align 4 ; [#uses=2]
- %47 = load float* %30, align 4 ; [#uses=2]
- %48 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fsub float -0.000000e+00, %49 ; [#uses=3]
- %51 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fsub float -0.000000e+00, %52 ; [#uses=3]
- %54 = getelementptr inbounds %struct.btRigidBody* %29, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fsub float -0.000000e+00, %55 ; [#uses=3]
- %57 = fmul float %45, %56 ; [#uses=1]
- %58 = fmul float %46, %53 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = fmul float %47, %50 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %42, %56 ; [#uses=1]
- %63 = fmul float %43, %53 ; [#uses=1]
- %64 = fadd float %62, %63 ; [#uses=1]
- %65 = fmul float %44, %50 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %39, %56 ; [#uses=1]
- %68 = fmul float %40, %53 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %41, %50 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %45, %23 ; [#uses=1]
- %73 = fmul float %46, %20 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = fmul float %47, %17 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = fadd float %76, %61 ; [#uses=1]
- %78 = fmul float %42, %23 ; [#uses=1]
- %79 = fmul float %43, %20 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=1]
- %81 = fmul float %44, %17 ; [#uses=1]
- %82 = fadd float %80, %81 ; [#uses=1]
- %83 = fadd float %82, %66 ; [#uses=1]
- %84 = fmul float %39, %23 ; [#uses=1]
- %85 = fmul float %40, %20 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = fmul float %41, %17 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=1]
- %89 = fadd float %88, %71 ; [#uses=1]
- store float %89, float* %24, align 4
- store float %83, float* %25, align 4
- store float %77, float* %26, align 4
- store float 0.000000e+00, float* %27, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btSliderConstraint11getAncorInBEv(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btSliderConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSliderConstraint8setParamEifi(%struct.btSliderConstraint* %this, i32 %num, float %value, i32 %axis) nounwind align 2 {
-entry:
- switch i32 %num, label %return [
- i32 2, label %bb
- i32 3, label %bb8
- i32 4, label %bb12
- ]
-
-bb: ; preds = %entry
- %0 = icmp slt i32 %axis, 1 ; [#uses=1]
- br i1 %0, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store float %value, float* %1, align 4
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=1]
- %4 = or i32 %3, 512 ; [#uses=1]
- store i32 %4, i32* %2, align 4
- ret void
-
-bb2: ; preds = %bb
- %5 = icmp slt i32 %axis, 3 ; [#uses=1]
- br i1 %5, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- %6 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 26 ; [#uses=1]
- store float %value, float* %6, align 4
- %7 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %9 = or i32 %8, 32 ; [#uses=1]
- store i32 %9, i32* %7, align 4
- ret void
-
-bb4: ; preds = %bb2
- %10 = icmp eq i32 %axis, 3 ; [#uses=1]
- br i1 %10, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- %11 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store float %value, float* %11, align 4
- %12 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = or i32 %13, 2048 ; [#uses=1]
- store i32 %14, i32* %12, align 4
- ret void
-
-bb6: ; preds = %bb4
- %15 = icmp slt i32 %axis, 6 ; [#uses=1]
- br i1 %15, label %bb7, label %return
-
-bb7: ; preds = %bb6
- %16 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 30 ; [#uses=1]
- store float %value, float* %16, align 4
- %17 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = or i32 %18, 128 ; [#uses=1]
- store i32 %19, i32* %17, align 4
- ret void
-
-bb8: ; preds = %entry
- %20 = icmp slt i32 %axis, 1 ; [#uses=1]
- br i1 %20, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- %21 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 13 ; [#uses=1]
- store float %value, float* %21, align 4
- %22 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %23 = load i32* %22, align 4 ; [#uses=1]
- %24 = or i32 %23, 1 ; [#uses=1]
- store i32 %24, i32* %22, align 4
- ret void
-
-bb10: ; preds = %bb8
- %25 = icmp eq i32 %axis, 3 ; [#uses=1]
- br i1 %25, label %bb11, label %return
-
-bb11: ; preds = %bb10
- %26 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float %value, float* %26, align 4
- %27 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %28 = load i32* %27, align 4 ; [#uses=1]
- %29 = or i32 %28, 4 ; [#uses=1]
- store i32 %29, i32* %27, align 4
- ret void
-
-bb12: ; preds = %entry
- %30 = icmp slt i32 %axis, 1 ; [#uses=1]
- br i1 %30, label %bb13, label %bb14
-
-bb13: ; preds = %bb12
- %31 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store float %value, float* %31, align 4
- %32 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = or i32 %33, 256 ; [#uses=1]
- store i32 %34, i32* %32, align 4
- ret void
-
-bb14: ; preds = %bb12
- %35 = icmp slt i32 %axis, 3 ; [#uses=1]
- br i1 %35, label %bb15, label %bb16
-
-bb15: ; preds = %bb14
- %36 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store float %value, float* %36, align 4
- %37 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %38 = load i32* %37, align 4 ; [#uses=1]
- %39 = or i32 %38, 16 ; [#uses=1]
- store i32 %39, i32* %37, align 4
- ret void
-
-bb16: ; preds = %bb14
- %40 = icmp eq i32 %axis, 3 ; [#uses=1]
- br i1 %40, label %bb17, label %bb18
-
-bb17: ; preds = %bb16
- %41 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store float %value, float* %41, align 4
- %42 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %43 = load i32* %42, align 4 ; [#uses=1]
- %44 = or i32 %43, 1024 ; [#uses=1]
- store i32 %44, i32* %42, align 4
- ret void
-
-bb18: ; preds = %bb16
- %45 = icmp slt i32 %axis, 6 ; [#uses=1]
- br i1 %45, label %bb19, label %return
-
-bb19: ; preds = %bb18
- %46 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 33 ; [#uses=1]
- store float %value, float* %46, align 4
- %47 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=2]
- %48 = load i32* %47, align 4 ; [#uses=1]
- %49 = or i32 %48, 64 ; [#uses=1]
- store i32 %49, i32* %47, align 4
- ret void
-
-return: ; preds = %bb18, %bb10, %bb6, %entry
- ret void
-}
-
-; [#uses=1]
-define float @_ZNK18btSliderConstraint8getParamEii(%struct.btSliderConstraint* nocapture %this, i32 %num, i32 %axis) nounwind readonly align 2 {
-entry:
- switch i32 %num, label %bb20 [
- i32 2, label %bb
- i32 3, label %bb8
- i32 4, label %bb12
- ]
-
-bb: ; preds = %entry
- %0 = icmp slt i32 %axis, 1 ; [#uses=1]
- br i1 %0, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- ret float %2
-
-bb2: ; preds = %bb
- %3 = icmp slt i32 %axis, 3 ; [#uses=1]
- br i1 %3, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 26 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- ret float %5
-
-bb4: ; preds = %bb2
- %6 = icmp eq i32 %axis, 3 ; [#uses=1]
- br i1 %6, label %bb5, label %bb6
-
-bb5: ; preds = %bb4
- %7 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- ret float %8
-
-bb6: ; preds = %bb4
- %9 = icmp slt i32 %axis, 6 ; [#uses=1]
- br i1 %9, label %bb7, label %bb20
-
-bb7: ; preds = %bb6
- %10 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 30 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- ret float %11
-
-bb8: ; preds = %entry
- %12 = icmp slt i32 %axis, 1 ; [#uses=1]
- br i1 %12, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- %13 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 13 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- ret float %14
-
-bb10: ; preds = %bb8
- %15 = icmp eq i32 %axis, 3 ; [#uses=1]
- br i1 %15, label %bb11, label %bb20
-
-bb11: ; preds = %bb10
- %16 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- ret float %17
-
-bb12: ; preds = %entry
- %18 = icmp slt i32 %axis, 1 ; [#uses=1]
- br i1 %18, label %bb13, label %bb14
-
-bb13: ; preds = %bb12
- %19 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 21 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- ret float %20
-
-bb14: ; preds = %bb12
- %21 = icmp slt i32 %axis, 3 ; [#uses=1]
- br i1 %21, label %bb15, label %bb16
-
-bb15: ; preds = %bb14
- %22 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 29 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- ret float %23
-
-bb16: ; preds = %bb14
- %24 = icmp eq i32 %axis, 3 ; [#uses=1]
- br i1 %24, label %bb17, label %bb18
-
-bb17: ; preds = %bb16
- %25 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 25 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- ret float %26
-
-bb18: ; preds = %bb16
- %27 = icmp slt i32 %axis, 6 ; [#uses=1]
- br i1 %27, label %bb19, label %bb20
-
-bb19: ; preds = %bb18
- %28 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 33 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- ret float %29
-
-bb20: ; preds = %bb18, %bb10, %bb6, %entry
- ret float 0x47EFFFFFE0000000
-}
-
-; [#uses=1]
-define linkonce_odr i8* @_ZNK18btSliderConstraint9serializeEPvP12btSerializer(%struct.btSliderConstraint* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer(%struct.btTypedConstraint* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 44 ; [#uses=1]
- %scevgep.i.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %scevgep.1.i.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i = getelementptr i8* %dataBuffer, i32 48 ; [#uses=1]
- %3 = bitcast i8* %scevgep4.1.i.i.i to float* ; [#uses=1]
- %scevgep.2.i.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i = getelementptr i8* %dataBuffer, i32 52 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.2.i.i.i to float* ; [#uses=1]
- %scevgep.3.i.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i = getelementptr i8* %dataBuffer, i32 56 ; [#uses=1]
- %5 = bitcast i8* %scevgep4.3.i.i.i to float* ; [#uses=1]
- %6 = load float* %scevgep.i.i.i, align 4 ; [#uses=1]
- store float %6, float* %scevgep4.i.i.i, align 4
- %7 = load float* %scevgep.1.i.i.i, align 4 ; [#uses=1]
- store float %7, float* %3, align 4
- %8 = load float* %scevgep.2.i.i.i, align 4 ; [#uses=1]
- store float %8, float* %4, align 4
- %9 = load float* %scevgep.3.i.i.i, align 4 ; [#uses=1]
- store float %9, float* %5, align 4
- %scevgep.i.1.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i = getelementptr i8* %dataBuffer, i32 60 ; [#uses=1]
- %10 = bitcast i8* %scevgep4.i.1.i.i to float* ; [#uses=1]
- %scevgep.1.i.1.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i = getelementptr i8* %dataBuffer, i32 64 ; [#uses=1]
- %11 = bitcast i8* %scevgep4.1.i.1.i.i to float* ; [#uses=1]
- %scevgep.2.i.1.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i = getelementptr i8* %dataBuffer, i32 68 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.2.i.1.i.i to float* ; [#uses=1]
- %scevgep.3.i.1.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i = getelementptr i8* %dataBuffer, i32 72 ; [#uses=1]
- %13 = bitcast i8* %scevgep4.3.i.1.i.i to float* ; [#uses=1]
- %14 = load float* %scevgep.i.1.i.i, align 4 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = load float* %scevgep.1.i.1.i.i, align 4 ; [#uses=1]
- store float %15, float* %11, align 4
- %16 = load float* %scevgep.2.i.1.i.i, align 4 ; [#uses=1]
- store float %16, float* %12, align 4
- %17 = load float* %scevgep.3.i.1.i.i, align 4 ; [#uses=1]
- store float %17, float* %13, align 4
- %scevgep.i.2.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i = getelementptr i8* %dataBuffer, i32 76 ; [#uses=1]
- %18 = bitcast i8* %scevgep4.i.2.i.i to float* ; [#uses=1]
- %scevgep.1.i.2.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i = getelementptr i8* %dataBuffer, i32 80 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.1.i.2.i.i to float* ; [#uses=1]
- %scevgep.2.i.2.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i = getelementptr i8* %dataBuffer, i32 84 ; [#uses=1]
- %20 = bitcast i8* %scevgep4.2.i.2.i.i to float* ; [#uses=1]
- %scevgep.3.i.2.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i = getelementptr i8* %dataBuffer, i32 88 ; [#uses=1]
- %21 = bitcast i8* %scevgep4.3.i.2.i.i to float* ; [#uses=1]
- %22 = load float* %scevgep.i.2.i.i, align 4 ; [#uses=1]
- store float %22, float* %18, align 4
- %23 = load float* %scevgep.1.i.2.i.i, align 4 ; [#uses=1]
- store float %23, float* %19, align 4
- %24 = load float* %scevgep.2.i.2.i.i, align 4 ; [#uses=1]
- store float %24, float* %20, align 4
- %25 = load float* %scevgep.3.i.2.i.i, align 4 ; [#uses=1]
- store float %25, float* %21, align 4
- %scevgep.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = getelementptr i8* %dataBuffer, i32 92 ; [#uses=1]
- %26 = bitcast i8* %scevgep4.i.i to float* ; [#uses=1]
- %27 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %27, float* %26, align 4
- %scevgep.1.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 96 ; [#uses=1]
- %28 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %29 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %29, float* %28, align 4
- %scevgep.2.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 100 ; [#uses=1]
- %30 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %31 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %31, float* %30, align 4
- %scevgep.3.i.i = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 104 ; [#uses=1]
- %32 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %33 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %33, float* %32, align 4
- %34 = getelementptr inbounds i8* %dataBuffer, i32 108 ; [#uses=1]
- %scevgep.i.i.i2 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i.i3 = bitcast i8* %34 to float* ; [#uses=1]
- %scevgep.1.i.i.i4 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i.i5 = getelementptr i8* %dataBuffer, i32 112 ; [#uses=1]
- %35 = bitcast i8* %scevgep4.1.i.i.i5 to float* ; [#uses=1]
- %scevgep.2.i.i.i6 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i.i7 = getelementptr i8* %dataBuffer, i32 116 ; [#uses=1]
- %36 = bitcast i8* %scevgep4.2.i.i.i7 to float* ; [#uses=1]
- %scevgep.3.i.i.i8 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i.i9 = getelementptr i8* %dataBuffer, i32 120 ; [#uses=1]
- %37 = bitcast i8* %scevgep4.3.i.i.i9 to float* ; [#uses=1]
- %38 = load float* %scevgep.i.i.i2, align 4 ; [#uses=1]
- store float %38, float* %scevgep4.i.i.i3, align 4
- %39 = load float* %scevgep.1.i.i.i4, align 4 ; [#uses=1]
- store float %39, float* %35, align 4
- %40 = load float* %scevgep.2.i.i.i6, align 4 ; [#uses=1]
- store float %40, float* %36, align 4
- %41 = load float* %scevgep.3.i.i.i8, align 4 ; [#uses=1]
- store float %41, float* %37, align 4
- %scevgep.i.1.i.i10 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i.i11 = getelementptr i8* %dataBuffer, i32 124 ; [#uses=1]
- %42 = bitcast i8* %scevgep4.i.1.i.i11 to float* ; [#uses=1]
- %scevgep.1.i.1.i.i12 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i.i13 = getelementptr i8* %dataBuffer, i32 128 ; [#uses=1]
- %43 = bitcast i8* %scevgep4.1.i.1.i.i13 to float* ; [#uses=1]
- %scevgep.2.i.1.i.i14 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i.i15 = getelementptr i8* %dataBuffer, i32 132 ; [#uses=1]
- %44 = bitcast i8* %scevgep4.2.i.1.i.i15 to float* ; [#uses=1]
- %scevgep.3.i.1.i.i16 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i.i17 = getelementptr i8* %dataBuffer, i32 136 ; [#uses=1]
- %45 = bitcast i8* %scevgep4.3.i.1.i.i17 to float* ; [#uses=1]
- %46 = load float* %scevgep.i.1.i.i10, align 4 ; [#uses=1]
- store float %46, float* %42, align 4
- %47 = load float* %scevgep.1.i.1.i.i12, align 4 ; [#uses=1]
- store float %47, float* %43, align 4
- %48 = load float* %scevgep.2.i.1.i.i14, align 4 ; [#uses=1]
- store float %48, float* %44, align 4
- %49 = load float* %scevgep.3.i.1.i.i16, align 4 ; [#uses=1]
- store float %49, float* %45, align 4
- %scevgep.i.2.i.i18 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i.i19 = getelementptr i8* %dataBuffer, i32 140 ; [#uses=1]
- %50 = bitcast i8* %scevgep4.i.2.i.i19 to float* ; [#uses=1]
- %scevgep.1.i.2.i.i20 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i.i21 = getelementptr i8* %dataBuffer, i32 144 ; [#uses=1]
- %51 = bitcast i8* %scevgep4.1.i.2.i.i21 to float* ; [#uses=1]
- %scevgep.2.i.2.i.i22 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i.i23 = getelementptr i8* %dataBuffer, i32 148 ; [#uses=1]
- %52 = bitcast i8* %scevgep4.2.i.2.i.i23 to float* ; [#uses=1]
- %scevgep.3.i.2.i.i24 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i.i25 = getelementptr i8* %dataBuffer, i32 152 ; [#uses=1]
- %53 = bitcast i8* %scevgep4.3.i.2.i.i25 to float* ; [#uses=1]
- %54 = load float* %scevgep.i.2.i.i18, align 4 ; [#uses=1]
- store float %54, float* %50, align 4
- %55 = load float* %scevgep.1.i.2.i.i20, align 4 ; [#uses=1]
- store float %55, float* %51, align 4
- %56 = load float* %scevgep.2.i.2.i.i22, align 4 ; [#uses=1]
- store float %56, float* %52, align 4
- %57 = load float* %scevgep.3.i.2.i.i24, align 4 ; [#uses=1]
- store float %57, float* %53, align 4
- %scevgep.i.i26 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i27 = getelementptr i8* %dataBuffer, i32 156 ; [#uses=1]
- %58 = bitcast i8* %scevgep4.i.i27 to float* ; [#uses=1]
- %59 = load float* %scevgep.i.i26, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %scevgep.1.i.i28 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i29 = getelementptr i8* %dataBuffer, i32 160 ; [#uses=1]
- %60 = bitcast i8* %scevgep4.1.i.i29 to float* ; [#uses=1]
- %61 = load float* %scevgep.1.i.i28, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %scevgep.2.i.i30 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i31 = getelementptr i8* %dataBuffer, i32 164 ; [#uses=1]
- %62 = bitcast i8* %scevgep4.2.i.i31 to float* ; [#uses=1]
- %63 = load float* %scevgep.2.i.i30, align 4 ; [#uses=1]
- store float %63, float* %62, align 4
- %scevgep.3.i.i32 = getelementptr %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i33 = getelementptr i8* %dataBuffer, i32 168 ; [#uses=1]
- %64 = bitcast i8* %scevgep4.3.i.i33 to float* ; [#uses=1]
- %65 = load float* %scevgep.3.i.i32, align 4 ; [#uses=1]
- store float %65, float* %64, align 4
- %66 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds i8* %dataBuffer, i32 172 ; [#uses=1]
- %69 = bitcast i8* %68 to float* ; [#uses=1]
- store float %67, float* %69, align 4
- %70 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds i8* %dataBuffer, i32 176 ; [#uses=1]
- %73 = bitcast i8* %72 to float* ; [#uses=1]
- store float %71, float* %73, align 4
- %74 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds i8* %dataBuffer, i32 180 ; [#uses=1]
- %77 = bitcast i8* %76 to float* ; [#uses=1]
- store float %75, float* %77, align 4
- %78 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = getelementptr inbounds i8* %dataBuffer, i32 184 ; [#uses=1]
- %81 = bitcast i8* %80 to float* ; [#uses=1]
- store float %79, float* %81, align 4
- %82 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %83 = load i8* %82, align 4 ; [#uses=1]
- %84 = zext i8 %83 to i32 ; [#uses=1]
- %85 = getelementptr inbounds i8* %dataBuffer, i32 188 ; [#uses=1]
- %86 = bitcast i8* %85 to i32* ; [#uses=1]
- store i32 %84, i32* %86, align 4
- %87 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 2 ; [#uses=1]
- %88 = load i8* %87, align 1 ; [#uses=1]
- %89 = zext i8 %88 to i32 ; [#uses=1]
- %90 = getelementptr inbounds i8* %dataBuffer, i32 192 ; [#uses=1]
- %91 = bitcast i8* %90 to i32* ; [#uses=1]
- store i32 %89, i32* %91, align 4
- ret i8* getelementptr inbounds ([23 x i8]* @.str920, i32 0, i32 0)
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btSliderConstraintD0Ev(%struct.btSliderConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV18btSliderConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btSliderConstraint* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN18btSliderConstraintD1Ev(%struct.btSliderConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV18btSliderConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSliderConstraint8getInfo1EPN17btTypedConstraint17btConstraintInfo1E(%struct.btSliderConstraint* %this, %struct.CONTACT_KEY_TOKEN* nocapture %info) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 0 ; [#uses=6]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- ret void
-
-bb1: ; preds = %entry
- store i32 4, i32* %2, align 4
- %4 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %info, i32 0, i32 1 ; [#uses=5]
- store i32 2, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %6 = load %struct.btRigidBody** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btRigidBody* %6, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %9 = load %struct.btRigidBody** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN18btSliderConstraint19calculateTransformsERK11btTransformS2_(%struct.btSliderConstraint* %this, %struct.btTransform* %10, %struct.btTransform* %7)
- tail call void @_ZN18btSliderConstraint13testAngLimitsEv(%struct.btSliderConstraint* %this) nounwind
- %11 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 34 ; [#uses=3]
- store i8 0, i8* %11, align 4
- %12 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 48, i32 0, i32 0 ; [#uses=5]
- %13 = load float* %12, align 4 ; [#uses=5]
- %14 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 51 ; [#uses=1]
- store float %13, float* %14, align 4
- %15 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=3]
- %17 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=3]
- %19 = fcmp ugt float %16, %18 ; [#uses=1]
- br i1 %19, label %bb6.i, label %bb.i
-
-bb.i: ; preds = %bb1
- %20 = fcmp ogt float %13, %18 ; [#uses=1]
- br i1 %20, label %bb1.i, label %bb2.i
-
-bb1.i: ; preds = %bb.i
- %21 = fsub float %13, %18 ; [#uses=1]
- store float %21, float* %12, align 4
- store i8 1, i8* %11, align 4
- br label %bb9
-
-bb2.i: ; preds = %bb.i
- %22 = fcmp olt float %13, %16 ; [#uses=1]
- br i1 %22, label %bb4.i, label %bb5.i
-
-bb4.i: ; preds = %bb2.i
- %23 = fsub float %13, %16 ; [#uses=1]
- store float %23, float* %12, align 4
- store i8 1, i8* %11, align 4
- br label %bb9
-
-bb5.i: ; preds = %bb2.i
- store float 0.000000e+00, float* %12, align 4
- br label %bb3
-
-bb6.i: ; preds = %bb1
- store float 0.000000e+00, float* %12, align 4
- br label %bb3
-
-bb3: ; preds = %bb6.i, %bb5.i
- %24 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 55 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool4 = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool4, label %bb10, label %bb9
-
-bb9: ; preds = %bb3, %bb4.i, %bb1.i
- %26 = load i32* %2, align 4 ; [#uses=1]
- %27 = add nsw i32 %26, 1 ; [#uses=1]
- store i32 %27, i32* %2, align 4
- %28 = load i32* %4, align 4 ; [#uses=1]
- %29 = add nsw i32 %28, -1 ; [#uses=1]
- store i32 %29, i32* %4, align 4
- br label %bb10
-
-bb10: ; preds = %bb9, %bb3
- %30 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 35 ; [#uses=1]
- %31 = load i8* %30, align 1 ; [#uses=1]
- %toBool11 = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool11, label %bb12, label %bb18
-
-bb12: ; preds = %bb10
- %32 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 59 ; [#uses=1]
- %33 = load i8* %32, align 4 ; [#uses=1]
- %toBool13 = icmp eq i8 %33, 0 ; [#uses=1]
- br i1 %toBool13, label %bb15, label %bb18
-
-bb15: ; preds = %bb12
- ret void
-
-bb18: ; preds = %bb12, %bb10
- %34 = load i32* %2, align 4 ; [#uses=1]
- %35 = add nsw i32 %34, 1 ; [#uses=1]
- store i32 %35, i32* %2, align 4
- %36 = load i32* %4, align 4 ; [#uses=1]
- %37 = add nsw i32 %36, -1 ; [#uses=1]
- store i32 %37, i32* %4, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSliderConstraint8getInfo2EPN17btTypedConstraint17btConstraintInfo2E(%struct.btSliderConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 4 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %5 = load %struct.btRigidBody** %4, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 4 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN18btSliderConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_ff(%struct.btSliderConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* %11, %struct.btTransform* %10, %struct.btQuadWord* %9, %struct.btQuadWord* %8, float %7, float %3)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSliderConstraint18getInfo2NonVirtualEPN17btTypedConstraint17btConstraintInfo2ERK11btTransformS5_RK9btVector3S8_ff(%struct.btSliderConstraint* %this, %"struct.btTypedConstraint::btConstraintInfo2"* %info, %struct.btTransform* nocapture %transA, %struct.btTransform* nocapture %transB, %struct.btQuadWord* nocapture %linVelA, %struct.btQuadWord* nocapture %linVelB, float %rbAinvMass, float %rbBinvMass) align 2 {
-entry:
- %p = alloca %struct.btQuadWord, align 8 ; [#uses=14]
- %q = alloca %struct.btQuadWord, align 8 ; [#uses=14]
- %tmpA = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmpB = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %tmp = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %0 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 6 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=8]
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 5 ; [#uses=1]
- %3 = load i8* %2, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %3, 0 ; [#uses=1]
- %iftmp.184.0 = select i1 %toBool, float -1.000000e+00, float 1.000000e+00 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 2 ; [#uses=2]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 2 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fsub float %5, %7 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 1 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 1 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fsub float %10, %12 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 1, i32 0, i32 0 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 1, i32 0, i32 0 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fsub float %15, %17 ; [#uses=2]
- %19 = fcmp olt float %rbAinvMass, 0x3E80000000000000 ; [#uses=1]
- %20 = fcmp olt float %rbBinvMass, 0x3E80000000000000 ; [#uses=1]
- %or.cond = or i1 %19, %20 ; [#uses=2]
- %21 = fadd float %rbAinvMass, %rbBinvMass ; [#uses=2]
- %22 = fcmp ogt float %21, 0.000000e+00 ; [#uses=1]
- br i1 %22, label %bb7, label %bb9
-
-bb7: ; preds = %entry
- %23 = fdiv float %rbBinvMass, %21 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb7, %entry
- %storemerge = phi float [ %23, %bb7 ], [ 5.000000e-01, %entry ] ; [#uses=22]
- %24 = fsub float 1.000000e+00, %storemerge ; [#uses=21]
- %25 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=4]
- %29 = load float* %26, align 4 ; [#uses=4]
- %30 = load float* %25, align 4 ; [#uses=4]
- %31 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=3]
- %35 = load float* %32, align 4 ; [#uses=3]
- %36 = load float* %31, align 4 ; [#uses=3]
- %37 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 2 ; [#uses=3]
- %38 = load i8* %37, align 1 ; [#uses=1]
- %toBool10 = icmp eq i8 %38, 0 ; [#uses=1]
- br i1 %toBool10, label %bb12, label %bb11
-
-bb11: ; preds = %bb9
- %39 = fmul float %36, %24 ; [#uses=1]
- %40 = fmul float %35, %24 ; [#uses=1]
- %41 = fmul float %34, %24 ; [#uses=1]
- %42 = fmul float %30, %storemerge ; [#uses=1]
- %43 = fmul float %29, %storemerge ; [#uses=1]
- %44 = fmul float %28, %storemerge ; [#uses=1]
- %45 = fadd float %42, %39 ; [#uses=3]
- %46 = fadd float %43, %40 ; [#uses=3]
- %47 = fadd float %44, %41 ; [#uses=3]
- %48 = fmul float %47, %47 ; [#uses=1]
- %49 = fmul float %46, %46 ; [#uses=1]
- %50 = fadd float %48, %49 ; [#uses=1]
- %51 = fmul float %45, %45 ; [#uses=1]
- %52 = fadd float %50, %51 ; [#uses=1]
- %53 = call float @sqrtf(float %52) nounwind readonly ; [#uses=1]
- %54 = fdiv float 1.000000e+00, %53 ; [#uses=3]
- %55 = fmul float %47, %54 ; [#uses=7]
- %56 = fmul float %46, %54 ; [#uses=8]
- %57 = fmul float %45, %54 ; [#uses=8]
- %58 = call float @fabsf(float %57) nounwind readnone ; [#uses=1]
- %59 = fcmp ogt float %58, 0x3FE6A09E60000000 ; [#uses=1]
- br i1 %59, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb11
- %60 = fmul float %56, %56 ; [#uses=1]
- %61 = fmul float %57, %57 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=2]
- %63 = call float @sqrtf(float %62) nounwind readonly ; [#uses=1]
- %64 = fdiv float 1.000000e+00, %63 ; [#uses=3]
- %65 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %65, align 8
- %66 = fsub float -0.000000e+00, %57 ; [#uses=1]
- %67 = fmul float %64, %66 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %67, float* %68, align 4
- %69 = fmul float %56, %64 ; [#uses=2]
- %70 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %69, float* %70, align 8
- %71 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 0 ; [#uses=1]
- %72 = fmul float %62, %64 ; [#uses=1]
- store float %72, float* %71, align 8
- %73 = fsub float -0.000000e+00, %55 ; [#uses=1]
- %74 = fmul float %69, %73 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %74, float* %75, align 4
- %76 = fmul float %55, %67 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %76, float* %77, align 8
- br label %bb16
-
-bb1.i: ; preds = %bb11
- %78 = fmul float %55, %55 ; [#uses=1]
- %79 = fmul float %56, %56 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=2]
- %81 = call float @sqrtf(float %80) nounwind readonly ; [#uses=1]
- %82 = fdiv float 1.000000e+00, %81 ; [#uses=3]
- %83 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %84 = fsub float -0.000000e+00, %56 ; [#uses=1]
- %85 = fmul float %82, %84 ; [#uses=3]
- store float %85, float* %83, align 8
- %86 = fmul float %55, %82 ; [#uses=2]
- %87 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %86, float* %87, align 4
- %88 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %88, align 8
- %89 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 0 ; [#uses=1]
- %90 = fsub float -0.000000e+00, %57 ; [#uses=1]
- %91 = fmul float %86, %90 ; [#uses=1]
- store float %91, float* %89, align 8
- %92 = fmul float %57, %85 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %92, float* %93, align 4
- %94 = fmul float %80, %82 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %94, float* %95, align 8
- br label %bb16
-
-bb12: ; preds = %bb9
- %96 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=2]
- %100 = load float* %97, align 4 ; [#uses=1]
- %101 = load float* %96, align 4 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %99, float* %102, align 8
- %103 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %100, float* %103, align 4
- %104 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %101, float* %104, align 8
- %105 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %105, align 4
- %106 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %107 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %108 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %109 = load float* %108, align 4 ; [#uses=1]
- %110 = load float* %107, align 4 ; [#uses=1]
- %111 = load float* %106, align 4 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %109, float* %112, align 8
- %113 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %110, float* %113, align 4
- %114 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %111, float* %114, align 8
- %115 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %115, align 4
- br label %bb16
-
-bb16: ; preds = %bb12, %bb1.i, %bb.i
- %116 = phi float [ %99, %bb12 ], [ 0.000000e+00, %bb.i ], [ %85, %bb1.i ] ; [#uses=1]
- %ax1.0.0.0 = phi float [ %28, %bb12 ], [ %55, %bb.i ], [ %55, %bb1.i ] ; [#uses=20]
- %ax1.0.1.0 = phi float [ %29, %bb12 ], [ %56, %bb.i ], [ %56, %bb1.i ] ; [#uses=20]
- %ax1.0.2.0 = phi float [ %30, %bb12 ], [ %57, %bb.i ], [ %57, %bb1.i ] ; [#uses=20]
- %117 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 3 ; [#uses=27]
- %118 = load float** %117, align 4 ; [#uses=1]
- %119 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=4]
- store float %116, float* %118, align 4
- %120 = load float** %117, align 4 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=6]
- %122 = load float* %121, align 4 ; [#uses=1]
- %123 = getelementptr inbounds float* %120, i32 1 ; [#uses=1]
- store float %122, float* %123, align 4
- %124 = load float** %117, align 4 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=6]
- %126 = load float* %125, align 8 ; [#uses=1]
- %127 = getelementptr inbounds float* %124, i32 2 ; [#uses=1]
- store float %126, float* %127, align 4
- %128 = load float** %117, align 4 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 0 ; [#uses=5]
- %130 = load float* %129, align 8 ; [#uses=1]
- %131 = getelementptr inbounds float* %128, i32 %1 ; [#uses=1]
- store float %130, float* %131, align 4
- %132 = load float** %117, align 4 ; [#uses=1]
- %133 = add nsw i32 %1, 1 ; [#uses=2]
- %134 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 1 ; [#uses=6]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = getelementptr inbounds float* %132, i32 %133 ; [#uses=1]
- store float %135, float* %136, align 4
- %137 = load float** %117, align 4 ; [#uses=1]
- %138 = add nsw i32 %1, 2 ; [#uses=2]
- %139 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 2 ; [#uses=6]
- %140 = load float* %139, align 8 ; [#uses=1]
- %141 = getelementptr inbounds float* %137, i32 %138 ; [#uses=1]
- store float %140, float* %141, align 4
- %142 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 5 ; [#uses=27]
- %143 = load float** %142, align 4 ; [#uses=1]
- %144 = load float* %119, align 8 ; [#uses=6]
- %145 = fsub float -0.000000e+00, %144 ; [#uses=1]
- store float %145, float* %143, align 4
- %146 = load float** %142, align 4 ; [#uses=1]
- %147 = load float* %121, align 4 ; [#uses=4]
- %148 = fsub float -0.000000e+00, %147 ; [#uses=1]
- %149 = getelementptr inbounds float* %146, i32 1 ; [#uses=1]
- store float %148, float* %149, align 4
- %150 = load float** %142, align 4 ; [#uses=1]
- %151 = load float* %125, align 8 ; [#uses=4]
- %152 = fsub float -0.000000e+00, %151 ; [#uses=1]
- %153 = getelementptr inbounds float* %150, i32 2 ; [#uses=1]
- store float %152, float* %153, align 4
- %154 = load float** %142, align 4 ; [#uses=1]
- %155 = load float* %129, align 8 ; [#uses=1]
- %156 = fsub float -0.000000e+00, %155 ; [#uses=1]
- %157 = getelementptr inbounds float* %154, i32 %1 ; [#uses=1]
- store float %156, float* %157, align 4
- %158 = load float** %142, align 4 ; [#uses=1]
- %159 = load float* %134, align 4 ; [#uses=1]
- %160 = fsub float -0.000000e+00, %159 ; [#uses=1]
- %161 = getelementptr inbounds float* %158, i32 %133 ; [#uses=1]
- store float %160, float* %161, align 4
- %162 = load float** %142, align 4 ; [#uses=1]
- %163 = load float* %139, align 8 ; [#uses=1]
- %164 = fsub float -0.000000e+00, %163 ; [#uses=1]
- %165 = getelementptr inbounds float* %162, i32 %138 ; [#uses=1]
- store float %164, float* %165, align 4
- %166 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=8]
- %167 = load i32* %166, align 4 ; [#uses=1]
- %168 = and i32 %167, 128 ; [#uses=1]
- %169 = icmp eq i32 %168, 0 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 30 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=2]
- br i1 %169, label %bb18, label %bb19
-
-bb18: ; preds = %bb16
- %172 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- %174 = fmul float %171, %173 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb18, %bb16
- %iftmp.187.0 = phi float [ %174, %bb18 ], [ %171, %bb16 ] ; [#uses=1]
- %175 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 0 ; [#uses=10]
- %176 = load float* %175, align 4 ; [#uses=1]
- %177 = fmul float %176, %iftmp.187.0 ; [#uses=2]
- %178 = fmul float %28, %35 ; [#uses=1]
- %179 = fmul float %29, %34 ; [#uses=1]
- %180 = fsub float %178, %179 ; [#uses=2]
- %181 = fmul float %30, %34 ; [#uses=1]
- %182 = fmul float %28, %36 ; [#uses=1]
- %183 = fsub float %181, %182 ; [#uses=2]
- %184 = fmul float %29, %36 ; [#uses=1]
- %185 = fmul float %30, %35 ; [#uses=1]
- %186 = fsub float %184, %185 ; [#uses=2]
- %187 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 7 ; [#uses=15]
- %188 = load float** %187, align 4 ; [#uses=1]
- %189 = fmul float %186, %144 ; [#uses=1]
- %190 = fmul float %183, %147 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = fmul float %180, %151 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- %194 = fmul float %193, %177 ; [#uses=1]
- store float %194, float* %188, align 4
- %195 = load float** %187, align 4 ; [#uses=1]
- %196 = load float* %129, align 8 ; [#uses=4]
- %197 = fmul float %186, %196 ; [#uses=1]
- %198 = load float* %134, align 4 ; [#uses=3]
- %199 = fmul float %183, %198 ; [#uses=1]
- %200 = fadd float %197, %199 ; [#uses=1]
- %201 = load float* %139, align 8 ; [#uses=3]
- %202 = fmul float %180, %201 ; [#uses=1]
- %203 = fadd float %200, %202 ; [#uses=1]
- %204 = fmul float %203, %177 ; [#uses=1]
- %205 = getelementptr inbounds float* %195, i32 %1 ; [#uses=1]
- store float %204, float* %205, align 4
- %206 = load i32* %166, align 4 ; [#uses=1]
- %207 = and i32 %206, 64 ; [#uses=1]
- %208 = icmp eq i32 %207, 0 ; [#uses=1]
- br i1 %208, label %bb21, label %bb20
-
-bb20: ; preds = %bb19
- %209 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=2]
- %210 = load float** %209, align 4 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 33 ; [#uses=2]
- %212 = load float* %211, align 4 ; [#uses=1]
- store float %212, float* %210, align 4
- %213 = load float** %209, align 4 ; [#uses=1]
- %214 = load float* %211, align 4 ; [#uses=1]
- %215 = getelementptr inbounds float* %213, i32 %1 ; [#uses=1]
- store float %214, float* %215, align 4
- br label %bb21
-
-bb21: ; preds = %bb20, %bb19
- %216 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %217 = load float* %216, align 4 ; [#uses=2]
- %218 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %219 = load float* %218, align 4 ; [#uses=2]
- %220 = getelementptr inbounds %struct.btTransform* %transA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %221 = load float* %220, align 4 ; [#uses=2]
- %222 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %223 = load float* %222, align 4 ; [#uses=2]
- %224 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %225 = load float* %224, align 4 ; [#uses=2]
- %226 = getelementptr inbounds %struct.btTransform* %transB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %227 = load float* %226, align 4 ; [#uses=2]
- %228 = shl i32 %1, 1 ; [#uses=20]
- %229 = mul nsw i32 %1, 3 ; [#uses=20]
- %230 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 0 ; [#uses=4]
- store float 0.000000e+00, float* %230, align 8
- %231 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 1 ; [#uses=5]
- store float 0.000000e+00, float* %231, align 4
- %232 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 2 ; [#uses=5]
- store float 0.000000e+00, float* %232, align 8
- %233 = getelementptr inbounds %struct.btQuadWord* %tmpA, i32 0, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %233, align 4
- %234 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 0 ; [#uses=5]
- store float 0.000000e+00, float* %234, align 8
- %235 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 1 ; [#uses=5]
- store float 0.000000e+00, float* %235, align 4
- %236 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 2 ; [#uses=5]
- store float 0.000000e+00, float* %236, align 8
- %237 = getelementptr inbounds %struct.btQuadWord* %tmpB, i32 0, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %237, align 4
- %238 = load i8* %37, align 1 ; [#uses=1]
- %toBool22 = icmp eq i8 %238, 0 ; [#uses=1]
- br i1 %toBool22, label %bb98.loopexit407, label %bb23
-
-bb23: ; preds = %bb21
- %239 = load float* %4, align 4 ; [#uses=1]
- %240 = fsub float %239, %227 ; [#uses=2]
- %241 = load float* %9, align 4 ; [#uses=1]
- %242 = fsub float %241, %225 ; [#uses=2]
- %243 = load float* %14, align 4 ; [#uses=1]
- %244 = fsub float %243, %223 ; [#uses=2]
- %245 = fmul float %244, %ax1.0.0.0 ; [#uses=1]
- %246 = fmul float %242, %ax1.0.1.0 ; [#uses=1]
- %247 = fadd float %245, %246 ; [#uses=1]
- %248 = fmul float %240, %ax1.0.2.0 ; [#uses=1]
- %249 = fadd float %247, %248 ; [#uses=3]
- %250 = fmul float %ax1.0.2.0, %249 ; [#uses=2]
- %251 = fmul float %ax1.0.1.0, %249 ; [#uses=2]
- %252 = fmul float %ax1.0.0.0, %249 ; [#uses=2]
- %253 = fsub float %240, %250 ; [#uses=2]
- %254 = fsub float %242, %251 ; [#uses=2]
- %255 = fsub float %244, %252 ; [#uses=2]
- %256 = load float* %6, align 4 ; [#uses=1]
- %257 = fsub float %256, %221 ; [#uses=2]
- %258 = load float* %11, align 4 ; [#uses=1]
- %259 = fsub float %258, %219 ; [#uses=2]
- %260 = load float* %16, align 4 ; [#uses=1]
- %261 = fsub float %260, %217 ; [#uses=2]
- %262 = fmul float %261, %ax1.0.0.0 ; [#uses=1]
- %263 = fmul float %259, %ax1.0.1.0 ; [#uses=1]
- %264 = fadd float %262, %263 ; [#uses=1]
- %265 = fmul float %257, %ax1.0.2.0 ; [#uses=1]
- %266 = fadd float %264, %265 ; [#uses=3]
- %267 = fmul float %ax1.0.2.0, %266 ; [#uses=2]
- %268 = fmul float %ax1.0.1.0, %266 ; [#uses=2]
- %269 = fmul float %ax1.0.0.0, %266 ; [#uses=2]
- %270 = fsub float %257, %267 ; [#uses=2]
- %271 = fsub float %259, %268 ; [#uses=2]
- %272 = fsub float %261, %269 ; [#uses=2]
- %273 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 51 ; [#uses=1]
- %274 = load float* %273, align 4 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 48, i32 0, i32 0 ; [#uses=1]
- %276 = load float* %275, align 4 ; [#uses=1]
- %277 = fsub float %274, %276 ; [#uses=3]
- %278 = fmul float %ax1.0.2.0, %277 ; [#uses=1]
- %279 = fmul float %ax1.0.1.0, %277 ; [#uses=1]
- %280 = fmul float %ax1.0.0.0, %277 ; [#uses=1]
- %281 = fadd float %267, %278 ; [#uses=1]
- %282 = fadd float %268, %279 ; [#uses=1]
- %283 = fadd float %269, %280 ; [#uses=1]
- %284 = fsub float %281, %250 ; [#uses=2]
- %285 = fsub float %282, %251 ; [#uses=2]
- %286 = fsub float %283, %252 ; [#uses=2]
- %287 = fmul float %284, %storemerge ; [#uses=1]
- %288 = fmul float %285, %storemerge ; [#uses=1]
- %289 = fmul float %286, %storemerge ; [#uses=1]
- %290 = fadd float %270, %287 ; [#uses=5]
- %291 = fadd float %271, %288 ; [#uses=5]
- %292 = fadd float %272, %289 ; [#uses=5]
- %293 = fmul float %284, %24 ; [#uses=1]
- %294 = fmul float %285, %24 ; [#uses=1]
- %295 = fmul float %286, %24 ; [#uses=1]
- %296 = fsub float %253, %293 ; [#uses=5]
- %297 = fsub float %254, %294 ; [#uses=5]
- %298 = fsub float %255, %295 ; [#uses=5]
- %299 = fmul float %270, %24 ; [#uses=1]
- %300 = fmul float %271, %24 ; [#uses=1]
- %301 = fmul float %272, %24 ; [#uses=1]
- %302 = fmul float %253, %storemerge ; [#uses=1]
- %303 = fmul float %254, %storemerge ; [#uses=1]
- %304 = fmul float %255, %storemerge ; [#uses=1]
- %305 = fadd float %302, %299 ; [#uses=4]
- %306 = fadd float %303, %300 ; [#uses=4]
- %307 = fadd float %304, %301 ; [#uses=4]
- store float %307, float* %119, align 8
- store float %306, float* %121, align 4
- store float %305, float* %125, align 8
- %308 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %308, align 4
- %309 = fmul float %307, %307 ; [#uses=1]
- %310 = fmul float %306, %306 ; [#uses=1]
- %311 = fadd float %309, %310 ; [#uses=1]
- %312 = fmul float %305, %305 ; [#uses=1]
- %313 = fadd float %311, %312 ; [#uses=2]
- %314 = fcmp ogt float %313, 0x3E80000000000000 ; [#uses=1]
- br i1 %314, label %bb36, label %bb37
-
-bb36: ; preds = %bb23
- %315 = call float @sqrtf(float %313) nounwind readonly ; [#uses=1]
- %316 = fdiv float 1.000000e+00, %315 ; [#uses=3]
- %317 = fmul float %307, %316 ; [#uses=2]
- store float %317, float* %119, align 8
- %318 = fmul float %306, %316 ; [#uses=2]
- store float %318, float* %121, align 4
- %319 = fmul float %305, %316 ; [#uses=2]
- store float %319, float* %125, align 8
- br label %bb48
-
-bb37: ; preds = %bb23
- %320 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %321 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %322 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %323 = load float* %322, align 4 ; [#uses=2]
- %324 = load float* %321, align 4 ; [#uses=2]
- %325 = load float* %320, align 4 ; [#uses=2]
- store float %323, float* %119, align 8
- store float %324, float* %121, align 4
- store float %325, float* %125, align 8
- store float 0.000000e+00, float* %308, align 4
- br label %bb48
-
-bb48: ; preds = %bb37, %bb36
- %326 = phi float [ %325, %bb37 ], [ %319, %bb36 ] ; [#uses=8]
- %327 = phi float [ %323, %bb37 ], [ %317, %bb36 ] ; [#uses=8]
- %328 = phi float [ %324, %bb37 ], [ %318, %bb36 ] ; [#uses=8]
- %329 = fmul float %ax1.0.0.0, %328 ; [#uses=1]
- %330 = fmul float %ax1.0.1.0, %327 ; [#uses=1]
- %331 = fsub float %329, %330 ; [#uses=6]
- %332 = fmul float %ax1.0.2.0, %327 ; [#uses=1]
- %333 = fmul float %ax1.0.0.0, %326 ; [#uses=1]
- %334 = fsub float %332, %333 ; [#uses=6]
- %335 = fmul float %ax1.0.1.0, %326 ; [#uses=1]
- %336 = fmul float %ax1.0.2.0, %328 ; [#uses=1]
- %337 = fsub float %335, %336 ; [#uses=6]
- store float %337, float* %129, align 8
- store float %334, float* %134, align 4
- store float %331, float* %139, align 8
- %338 = getelementptr inbounds %struct.btQuadWord* %q, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %338, align 4
- %339 = fmul float %292, %328 ; [#uses=1]
- %340 = fmul float %291, %327 ; [#uses=1]
- %341 = fsub float %339, %340 ; [#uses=1]
- %342 = fmul float %290, %327 ; [#uses=1]
- %343 = fmul float %292, %326 ; [#uses=1]
- %344 = fsub float %342, %343 ; [#uses=1]
- %345 = fmul float %291, %326 ; [#uses=1]
- %346 = fmul float %290, %328 ; [#uses=1]
- %347 = fsub float %345, %346 ; [#uses=1]
- %348 = fmul float %298, %328 ; [#uses=1]
- %349 = fmul float %297, %327 ; [#uses=1]
- %350 = fsub float %348, %349 ; [#uses=1]
- %351 = fmul float %296, %327 ; [#uses=1]
- %352 = fmul float %298, %326 ; [#uses=1]
- %353 = fsub float %351, %352 ; [#uses=1]
- %354 = fmul float %297, %326 ; [#uses=1]
- %355 = fmul float %296, %328 ; [#uses=1]
- %356 = fsub float %354, %355 ; [#uses=1]
- %357 = load float** %117, align 4 ; [#uses=1]
- %scevgep442 = getelementptr float* %357, i32 %228 ; [#uses=1]
- store float %347, float* %scevgep442, align 4
- %tmp441.1467 = or i32 %228, 1 ; [#uses=1]
- %358 = load float** %117, align 4 ; [#uses=1]
- %scevgep442.1 = getelementptr float* %358, i32 %tmp441.1467 ; [#uses=1]
- store float %344, float* %scevgep442.1, align 4
- %tmp441.2 = add i32 %228, 2 ; [#uses=1]
- %359 = load float** %117, align 4 ; [#uses=1]
- %scevgep442.2 = getelementptr float* %359, i32 %tmp441.2 ; [#uses=1]
- store float %341, float* %scevgep442.2, align 4
- %360 = load float** %142, align 4 ; [#uses=1]
- %361 = fsub float -0.000000e+00, %356 ; [#uses=1]
- %scevgep438 = getelementptr float* %360, i32 %228 ; [#uses=1]
- store float %361, float* %scevgep438, align 4
- %tmp437.1468 = or i32 %228, 1 ; [#uses=1]
- %362 = load float** %142, align 4 ; [#uses=1]
- %363 = fsub float -0.000000e+00, %353 ; [#uses=1]
- %scevgep438.1 = getelementptr float* %362, i32 %tmp437.1468 ; [#uses=1]
- store float %363, float* %scevgep438.1, align 4
- %tmp437.2 = add i32 %228, 2 ; [#uses=1]
- %364 = load float** %142, align 4 ; [#uses=1]
- %365 = fsub float -0.000000e+00, %350 ; [#uses=1]
- %scevgep438.2 = getelementptr float* %364, i32 %tmp437.2 ; [#uses=1]
- store float %365, float* %scevgep438.2, align 4
- %366 = fmul float %292, %334 ; [#uses=1]
- %367 = fmul float %291, %337 ; [#uses=1]
- %368 = fsub float %366, %367 ; [#uses=4]
- %369 = fmul float %290, %337 ; [#uses=1]
- %370 = fmul float %292, %331 ; [#uses=1]
- %371 = fsub float %369, %370 ; [#uses=4]
- %372 = fmul float %291, %331 ; [#uses=1]
- %373 = fmul float %290, %334 ; [#uses=1]
- %374 = fsub float %372, %373 ; [#uses=4]
- store float %374, float* %230, align 8
- store float %371, float* %231, align 4
- store float %368, float* %232, align 8
- store float 0.000000e+00, float* %233, align 4
- %375 = fmul float %298, %334 ; [#uses=1]
- %376 = fmul float %297, %337 ; [#uses=1]
- %377 = fsub float %375, %376 ; [#uses=4]
- %378 = fmul float %296, %337 ; [#uses=1]
- %379 = fmul float %298, %331 ; [#uses=1]
- %380 = fsub float %378, %379 ; [#uses=4]
- %381 = fmul float %297, %331 ; [#uses=1]
- %382 = fmul float %296, %334 ; [#uses=1]
- %383 = fsub float %381, %382 ; [#uses=4]
- store float %383, float* %234, align 8
- store float %380, float* %235, align 4
- store float %377, float* %236, align 8
- store float 0.000000e+00, float* %237, align 4
- br i1 %or.cond, label %bb55, label %bb98.loopexit
-
-bb55: ; preds = %bb48
- %384 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 35 ; [#uses=1]
- %385 = load i8* %384, align 1 ; [#uses=1]
- %toBool56not = icmp eq i8 %385, 0 ; [#uses=1]
- br i1 %toBool56not, label %bb98.loopexit, label %bb64
-
-bb64: ; preds = %bb55
- %386 = fmul float %383, %24 ; [#uses=2]
- store float %386, float* %234, align 8
- %387 = fmul float %380, %24 ; [#uses=2]
- store float %387, float* %235, align 4
- %388 = fmul float %377, %24 ; [#uses=2]
- store float %388, float* %236, align 8
- %389 = fmul float %374, %storemerge ; [#uses=2]
- store float %389, float* %230, align 8
- %390 = fmul float %371, %storemerge ; [#uses=2]
- store float %390, float* %231, align 4
- %391 = fmul float %368, %storemerge ; [#uses=2]
- store float %391, float* %232, align 8
- br label %bb98.loopexit
-
-bb98.loopexit: ; preds = %bb64, %bb55, %bb48
- %392 = phi float [ %389, %bb64 ], [ %374, %bb48 ], [ %374, %bb55 ] ; [#uses=1]
- %393 = phi float [ %390, %bb64 ], [ %371, %bb48 ], [ %371, %bb55 ] ; [#uses=1]
- %394 = phi float [ %391, %bb64 ], [ %368, %bb48 ], [ %368, %bb55 ] ; [#uses=1]
- %395 = phi float [ %386, %bb64 ], [ %383, %bb48 ], [ %383, %bb55 ] ; [#uses=1]
- %396 = phi float [ %387, %bb64 ], [ %380, %bb48 ], [ %380, %bb55 ] ; [#uses=1]
- %397 = phi float [ %388, %bb64 ], [ %377, %bb48 ], [ %377, %bb55 ] ; [#uses=1]
- %398 = load float** %117, align 4 ; [#uses=1]
- %scevgep434 = getelementptr float* %398, i32 %229 ; [#uses=1]
- store float %392, float* %scevgep434, align 4
- %tmp433.1 = add i32 %229, 1 ; [#uses=1]
- %399 = load float** %117, align 4 ; [#uses=1]
- %scevgep434.1 = getelementptr float* %399, i32 %tmp433.1 ; [#uses=1]
- store float %393, float* %scevgep434.1, align 4
- %tmp433.2 = add i32 %229, 2 ; [#uses=1]
- %400 = load float** %117, align 4 ; [#uses=1]
- %scevgep434.2 = getelementptr float* %400, i32 %tmp433.2 ; [#uses=1]
- store float %394, float* %scevgep434.2, align 4
- %401 = load float** %142, align 4 ; [#uses=1]
- %402 = fsub float -0.000000e+00, %395 ; [#uses=1]
- %scevgep430 = getelementptr float* %401, i32 %229 ; [#uses=1]
- store float %402, float* %scevgep430, align 4
- %tmp429.1 = add i32 %229, 1 ; [#uses=1]
- %403 = load float** %142, align 4 ; [#uses=1]
- %404 = fsub float -0.000000e+00, %396 ; [#uses=1]
- %scevgep430.1 = getelementptr float* %403, i32 %tmp429.1 ; [#uses=1]
- store float %404, float* %scevgep430.1, align 4
- %tmp429.2 = add i32 %229, 2 ; [#uses=1]
- %405 = load float** %142, align 4 ; [#uses=1]
- %406 = fsub float -0.000000e+00, %397 ; [#uses=1]
- %scevgep430.2 = getelementptr float* %405, i32 %tmp429.2 ; [#uses=1]
- store float %406, float* %scevgep430.2, align 4
- %407 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %408 = load float** %407, align 4 ; [#uses=1]
- %scevgep426 = getelementptr float* %408, i32 %228 ; [#uses=1]
- store float %327, float* %scevgep426, align 4
- %tmp425.1469 = or i32 %228, 1 ; [#uses=1]
- %409 = load float** %407, align 4 ; [#uses=1]
- %scevgep426.1 = getelementptr float* %409, i32 %tmp425.1469 ; [#uses=1]
- store float %328, float* %scevgep426.1, align 4
- %tmp425.2 = add i32 %228, 2 ; [#uses=1]
- %410 = load float** %407, align 4 ; [#uses=1]
- %scevgep426.2 = getelementptr float* %410, i32 %tmp425.2 ; [#uses=1]
- store float %326, float* %scevgep426.2, align 4
- %411 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %412 = load float** %411, align 4 ; [#uses=1]
- %scevgep422 = getelementptr float* %412, i32 %229 ; [#uses=1]
- store float %337, float* %scevgep422, align 4
- %tmp421.1 = add i32 %229, 1 ; [#uses=1]
- %413 = load float** %411, align 4 ; [#uses=1]
- %scevgep422.1 = getelementptr float* %413, i32 %tmp421.1 ; [#uses=1]
- store float %334, float* %scevgep422.1, align 4
- %tmp421.2 = add i32 %229, 2 ; [#uses=1]
- %414 = load float** %411, align 4 ; [#uses=1]
- %scevgep422.2 = getelementptr float* %414, i32 %tmp421.2 ; [#uses=1]
- store float %331, float* %scevgep422.2, align 4
- br label %bb98
-
-bb98.loopexit407: ; preds = %bb21
- %415 = fsub float %227, %221 ; [#uses=5]
- %416 = fsub float %225, %219 ; [#uses=5]
- %417 = fsub float %223, %217 ; [#uses=5]
- %418 = fmul float %417, %147 ; [#uses=1]
- %419 = fmul float %416, %144 ; [#uses=1]
- %420 = fsub float %418, %419 ; [#uses=2]
- %421 = fmul float %415, %144 ; [#uses=1]
- %422 = fmul float %417, %151 ; [#uses=1]
- %423 = fsub float %421, %422 ; [#uses=2]
- %424 = fmul float %416, %151 ; [#uses=1]
- %425 = fmul float %415, %147 ; [#uses=1]
- %426 = fsub float %424, %425 ; [#uses=2]
- %427 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 0 ; [#uses=1]
- %428 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 1 ; [#uses=1]
- %429 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 2 ; [#uses=1]
- %430 = getelementptr inbounds %struct.btQuadWord* %tmp, i32 0, i32 0, i32 3 ; [#uses=1]
- %431 = load float** %117, align 4 ; [#uses=1]
- %432 = fmul float %426, %storemerge ; [#uses=1]
- %scevgep466 = getelementptr float* %431, i32 %228 ; [#uses=1]
- store float %432, float* %scevgep466, align 4
- %tmp465.1470 = or i32 %228, 1 ; [#uses=1]
- %433 = load float** %117, align 4 ; [#uses=1]
- %434 = fmul float %423, %storemerge ; [#uses=1]
- %scevgep466.1 = getelementptr float* %433, i32 %tmp465.1470 ; [#uses=1]
- store float %434, float* %scevgep466.1, align 4
- %tmp465.2 = add i32 %228, 2 ; [#uses=1]
- %435 = load float** %117, align 4 ; [#uses=1]
- %436 = fmul float %420, %storemerge ; [#uses=1]
- %scevgep466.2 = getelementptr float* %435, i32 %tmp465.2 ; [#uses=1]
- store float %436, float* %scevgep466.2, align 4
- %437 = load float** %142, align 4 ; [#uses=1]
- %438 = fmul float %426, %24 ; [#uses=1]
- %scevgep462 = getelementptr float* %437, i32 %228 ; [#uses=1]
- store float %438, float* %scevgep462, align 4
- %tmp461.1471 = or i32 %228, 1 ; [#uses=1]
- %439 = load float** %142, align 4 ; [#uses=1]
- %440 = fmul float %423, %24 ; [#uses=1]
- %scevgep462.1 = getelementptr float* %439, i32 %tmp461.1471 ; [#uses=1]
- store float %440, float* %scevgep462.1, align 4
- %tmp461.2 = add i32 %228, 2 ; [#uses=1]
- %441 = load float** %142, align 4 ; [#uses=1]
- %442 = fmul float %420, %24 ; [#uses=1]
- %scevgep462.2 = getelementptr float* %441, i32 %tmp461.2 ; [#uses=1]
- store float %442, float* %scevgep462.2, align 4
- %443 = fmul float %417, %198 ; [#uses=1]
- %444 = fmul float %416, %196 ; [#uses=1]
- %445 = fsub float %443, %444 ; [#uses=3]
- %446 = fmul float %415, %196 ; [#uses=1]
- %447 = fmul float %417, %201 ; [#uses=1]
- %448 = fsub float %446, %447 ; [#uses=3]
- %449 = fmul float %416, %201 ; [#uses=1]
- %450 = fmul float %415, %198 ; [#uses=1]
- %451 = fsub float %449, %450 ; [#uses=3]
- store float %451, float* %427, align 8
- store float %448, float* %428, align 4
- store float %445, float* %429, align 8
- store float 0.000000e+00, float* %430, align 4
- %452 = load float** %117, align 4 ; [#uses=1]
- %453 = fmul float %451, %storemerge ; [#uses=1]
- %scevgep458 = getelementptr float* %452, i32 %229 ; [#uses=1]
- store float %453, float* %scevgep458, align 4
- %tmp457.1 = add i32 %229, 1 ; [#uses=1]
- %454 = load float** %117, align 4 ; [#uses=1]
- %455 = fmul float %448, %storemerge ; [#uses=1]
- %scevgep458.1 = getelementptr float* %454, i32 %tmp457.1 ; [#uses=1]
- store float %455, float* %scevgep458.1, align 4
- %tmp457.2 = add i32 %229, 2 ; [#uses=1]
- %456 = load float** %117, align 4 ; [#uses=1]
- %457 = fmul float %445, %storemerge ; [#uses=1]
- %scevgep458.2 = getelementptr float* %456, i32 %tmp457.2 ; [#uses=1]
- store float %457, float* %scevgep458.2, align 4
- %458 = load float** %142, align 4 ; [#uses=1]
- %459 = fmul float %451, %24 ; [#uses=1]
- %scevgep454 = getelementptr float* %458, i32 %229 ; [#uses=1]
- store float %459, float* %scevgep454, align 4
- %tmp453.1 = add i32 %229, 1 ; [#uses=1]
- %460 = load float** %142, align 4 ; [#uses=1]
- %461 = fmul float %448, %24 ; [#uses=1]
- %scevgep454.1 = getelementptr float* %460, i32 %tmp453.1 ; [#uses=1]
- store float %461, float* %scevgep454.1, align 4
- %tmp453.2 = add i32 %229, 2 ; [#uses=1]
- %462 = load float** %142, align 4 ; [#uses=1]
- %463 = fmul float %445, %24 ; [#uses=1]
- %scevgep454.2 = getelementptr float* %462, i32 %tmp453.2 ; [#uses=1]
- store float %463, float* %scevgep454.2, align 4
- %464 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %465 = load float** %464, align 4 ; [#uses=1]
- %scevgep450 = getelementptr float* %465, i32 %228 ; [#uses=1]
- store float %144, float* %scevgep450, align 4
- %tmp449.1472 = or i32 %228, 1 ; [#uses=1]
- %466 = load float** %464, align 4 ; [#uses=1]
- %467 = load float* %121, align 4 ; [#uses=2]
- %scevgep450.1 = getelementptr float* %466, i32 %tmp449.1472 ; [#uses=1]
- store float %467, float* %scevgep450.1, align 4
- %tmp449.2 = add i32 %228, 2 ; [#uses=1]
- %468 = load float** %464, align 4 ; [#uses=1]
- %469 = load float* %125, align 8 ; [#uses=2]
- %scevgep450.2 = getelementptr float* %468, i32 %tmp449.2 ; [#uses=1]
- store float %469, float* %scevgep450.2, align 4
- %470 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %471 = load float** %470, align 4 ; [#uses=1]
- %scevgep446 = getelementptr float* %471, i32 %229 ; [#uses=1]
- store float %196, float* %scevgep446, align 4
- %tmp445.1 = add i32 %229, 1 ; [#uses=1]
- %472 = load float** %470, align 4 ; [#uses=1]
- %473 = load float* %134, align 4 ; [#uses=1]
- %scevgep446.1 = getelementptr float* %472, i32 %tmp445.1 ; [#uses=1]
- store float %473, float* %scevgep446.1, align 4
- %tmp445.2 = add i32 %229, 2 ; [#uses=1]
- %474 = load float** %470, align 4 ; [#uses=1]
- %475 = load float* %139, align 8 ; [#uses=1]
- %scevgep446.2 = getelementptr float* %474, i32 %tmp445.2 ; [#uses=1]
- store float %475, float* %scevgep446.2, align 4
- br label %bb98
-
-bb98: ; preds = %bb98.loopexit407, %bb98.loopexit
- %476 = phi float [ %326, %bb98.loopexit ], [ %469, %bb98.loopexit407 ] ; [#uses=1]
- %477 = phi float [ %328, %bb98.loopexit ], [ %467, %bb98.loopexit407 ] ; [#uses=1]
- %478 = phi float [ %327, %bb98.loopexit ], [ %144, %bb98.loopexit407 ] ; [#uses=1]
- %relA.0.0.0 = phi float [ %292, %bb98.loopexit ], [ 0.000000e+00, %bb98.loopexit407 ] ; [#uses=2]
- %relA.0.1.0 = phi float [ %291, %bb98.loopexit ], [ 0.000000e+00, %bb98.loopexit407 ] ; [#uses=2]
- %relA.0.2.0 = phi float [ %290, %bb98.loopexit ], [ 0.000000e+00, %bb98.loopexit407 ] ; [#uses=2]
- %relB.0.0.0 = phi float [ %298, %bb98.loopexit ], [ 0.000000e+00, %bb98.loopexit407 ] ; [#uses=2]
- %relB.0.1.0 = phi float [ %297, %bb98.loopexit ], [ 0.000000e+00, %bb98.loopexit407 ] ; [#uses=2]
- %relB.0.2.0 = phi float [ %296, %bb98.loopexit ], [ 0.000000e+00, %bb98.loopexit407 ] ; [#uses=2]
- %c.0.0.0 = phi float [ 0.000000e+00, %bb98.loopexit ], [ %417, %bb98.loopexit407 ] ; [#uses=2]
- %c.0.1.0 = phi float [ 0.000000e+00, %bb98.loopexit ], [ %416, %bb98.loopexit407 ] ; [#uses=2]
- %c.0.2.0 = phi float [ 0.000000e+00, %bb98.loopexit ], [ %415, %bb98.loopexit407 ] ; [#uses=2]
- %479 = load i32* %166, align 4 ; [#uses=1]
- %480 = and i32 %479, 32 ; [#uses=1]
- %481 = icmp eq i32 %480, 0 ; [#uses=1]
- %482 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 26 ; [#uses=1]
- %483 = load float* %482, align 4 ; [#uses=2]
- br i1 %481, label %bb100, label %bb101
-
-bb100: ; preds = %bb98
- %484 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- %485 = load float* %484, align 4 ; [#uses=1]
- %486 = fmul float %483, %485 ; [#uses=1]
- br label %bb101
-
-bb101: ; preds = %bb100, %bb98
- %iftmp.194.0 = phi float [ %486, %bb100 ], [ %483, %bb98 ] ; [#uses=1]
- %487 = load float* %175, align 4 ; [#uses=1]
- %488 = fmul float %487, %iftmp.194.0 ; [#uses=2]
- %489 = fmul float %478, %18 ; [#uses=1]
- %490 = fmul float %477, %13 ; [#uses=1]
- %491 = fadd float %489, %490 ; [#uses=1]
- %492 = fmul float %476, %8 ; [#uses=1]
- %493 = fadd float %491, %492 ; [#uses=1]
- %494 = fmul float %493, %488 ; [#uses=1]
- %495 = load float** %187, align 4 ; [#uses=1]
- %496 = getelementptr inbounds float* %495, i32 %228 ; [#uses=1]
- store float %494, float* %496, align 4
- %497 = load float* %129, align 8 ; [#uses=1]
- %498 = fmul float %497, %18 ; [#uses=1]
- %499 = load float* %134, align 4 ; [#uses=1]
- %500 = fmul float %499, %13 ; [#uses=1]
- %501 = fadd float %498, %500 ; [#uses=1]
- %502 = load float* %139, align 8 ; [#uses=1]
- %503 = fmul float %502, %8 ; [#uses=1]
- %504 = fadd float %501, %503 ; [#uses=1]
- %505 = fmul float %504, %488 ; [#uses=1]
- %506 = load float** %187, align 4 ; [#uses=1]
- %507 = getelementptr inbounds float* %506, i32 %229 ; [#uses=1]
- store float %505, float* %507, align 4
- %508 = load i32* %166, align 4 ; [#uses=1]
- %509 = and i32 %508, 16 ; [#uses=1]
- %510 = icmp eq i32 %509, 0 ; [#uses=1]
- br i1 %510, label %bb103, label %bb102
-
-bb102: ; preds = %bb101
- %511 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=2]
- %512 = load float** %511, align 4 ; [#uses=1]
- %513 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 29 ; [#uses=2]
- %514 = load float* %513, align 4 ; [#uses=1]
- %515 = getelementptr inbounds float* %512, i32 %228 ; [#uses=1]
- store float %514, float* %515, align 4
- %516 = load float** %511, align 4 ; [#uses=1]
- %517 = load float* %513, align 4 ; [#uses=1]
- %518 = getelementptr inbounds float* %516, i32 %229 ; [#uses=1]
- store float %517, float* %518, align 4
- br label %bb103
-
-bb103: ; preds = %bb102, %bb101
- %519 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 34 ; [#uses=1]
- %520 = load i8* %519, align 4 ; [#uses=1]
- %toBool104 = icmp eq i8 %520, 0 ; [#uses=1]
- br i1 %toBool104, label %bb109, label %bb105
-
-bb105: ; preds = %bb103
- %521 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 48, i32 0, i32 0 ; [#uses=1]
- %522 = load float* %521, align 4 ; [#uses=1]
- %523 = fmul float %522, %iftmp.184.0 ; [#uses=2]
- %524 = fcmp ogt float %523, 0.000000e+00 ; [#uses=1]
- %iftmp.196.0 = select i1 %524, i32 2, i32 1 ; [#uses=1]
- br label %bb109
-
-bb109: ; preds = %bb105, %bb103
- %limit_err.0 = phi float [ %523, %bb105 ], [ 0.000000e+00, %bb103 ] ; [#uses=1]
- %limit.0 = phi i32 [ %iftmp.196.0, %bb105 ], [ 0, %bb103 ] ; [#uses=5]
- %525 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 55 ; [#uses=1]
- %526 = load i8* %525, align 4 ; [#uses=1]
- %not.toBool110 = icmp ne i8 %526, 0 ; [#uses=2]
- %powered.0 = zext i1 %not.toBool110 to i32 ; [#uses=1]
- %527 = or i32 %powered.0, %limit.0 ; [#uses=1]
- %528 = icmp eq i32 %527, 0 ; [#uses=1]
- br i1 %528, label %bb163, label %bb113
-
-bb113: ; preds = %bb109
- %529 = load i32* %0, align 4 ; [#uses=1]
- %530 = shl i32 %529, 2 ; [#uses=24]
- %531 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 2 ; [#uses=3]
- %532 = load float** %531, align 4 ; [#uses=1]
- %533 = getelementptr inbounds float* %532, i32 %530 ; [#uses=1]
- store float %ax1.0.0.0, float* %533, align 4
- %534 = load float** %531, align 4 ; [#uses=1]
- %535 = or i32 %530, 1 ; [#uses=5]
- %536 = getelementptr inbounds float* %534, i32 %535 ; [#uses=1]
- store float %ax1.0.1.0, float* %536, align 4
- %537 = load float** %531, align 4 ; [#uses=1]
- %538 = or i32 %530, 2 ; [#uses=5]
- %539 = getelementptr inbounds float* %537, i32 %538 ; [#uses=1]
- store float %ax1.0.2.0, float* %539, align 4
- %540 = load i8* %37, align 1 ; [#uses=1]
- %toBool116 = icmp eq i8 %540, 0 ; [#uses=1]
- br i1 %toBool116, label %bb125, label %bb117
-
-bb117: ; preds = %bb113
- br i1 %or.cond, label %bb128, label %bb122
-
-bb122: ; preds = %bb117
- %541 = fmul float %relA.0.0.0, %ax1.0.1.0 ; [#uses=1]
- %542 = fmul float %relA.0.1.0, %ax1.0.0.0 ; [#uses=1]
- %543 = fsub float %541, %542 ; [#uses=1]
- %544 = fmul float %relA.0.2.0, %ax1.0.0.0 ; [#uses=1]
- %545 = fmul float %relA.0.0.0, %ax1.0.2.0 ; [#uses=1]
- %546 = fsub float %544, %545 ; [#uses=1]
- %547 = fmul float %relA.0.1.0, %ax1.0.2.0 ; [#uses=1]
- %548 = fmul float %relA.0.2.0, %ax1.0.1.0 ; [#uses=1]
- %549 = fsub float %547, %548 ; [#uses=2]
- store float %549, float* %230, align 8
- store float %546, float* %231, align 4
- store float %543, float* %232, align 8
- store float 0.000000e+00, float* %233, align 4
- %550 = fmul float %relB.0.0.0, %ax1.0.1.0 ; [#uses=1]
- %551 = fmul float %relB.0.1.0, %ax1.0.0.0 ; [#uses=1]
- %552 = fsub float %550, %551 ; [#uses=1]
- %553 = fmul float %relB.0.2.0, %ax1.0.0.0 ; [#uses=1]
- %554 = fmul float %relB.0.0.0, %ax1.0.2.0 ; [#uses=1]
- %555 = fsub float %553, %554 ; [#uses=1]
- %556 = fmul float %relB.0.1.0, %ax1.0.2.0 ; [#uses=1]
- %557 = fmul float %relB.0.2.0, %ax1.0.1.0 ; [#uses=1]
- %558 = fsub float %556, %557 ; [#uses=1]
- store float %558, float* %234, align 8
- store float %555, float* %235, align 4
- store float %552, float* %236, align 8
- store float 0.000000e+00, float* %237, align 4
- %559 = load float** %117, align 4 ; [#uses=1]
- %560 = getelementptr inbounds float* %559, i32 %530 ; [#uses=1]
- store float %549, float* %560, align 4
- %561 = load float** %117, align 4 ; [#uses=1]
- %562 = load float* %231, align 4 ; [#uses=1]
- %563 = getelementptr inbounds float* %561, i32 %535 ; [#uses=1]
- store float %562, float* %563, align 4
- %564 = load float** %117, align 4 ; [#uses=1]
- %565 = load float* %232, align 8 ; [#uses=1]
- %566 = getelementptr inbounds float* %564, i32 %538 ; [#uses=1]
- store float %565, float* %566, align 4
- %567 = load float** %142, align 4 ; [#uses=1]
- %568 = load float* %234, align 8 ; [#uses=1]
- %569 = fsub float -0.000000e+00, %568 ; [#uses=1]
- %570 = getelementptr inbounds float* %567, i32 %530 ; [#uses=1]
- store float %569, float* %570, align 4
- %571 = load float** %142, align 4 ; [#uses=1]
- %572 = load float* %235, align 4 ; [#uses=1]
- %573 = fsub float -0.000000e+00, %572 ; [#uses=1]
- %574 = getelementptr inbounds float* %571, i32 %535 ; [#uses=1]
- store float %573, float* %574, align 4
- %575 = load float** %142, align 4 ; [#uses=1]
- %576 = load float* %236, align 8 ; [#uses=1]
- %577 = fsub float -0.000000e+00, %576 ; [#uses=1]
- %578 = getelementptr inbounds float* %575, i32 %538 ; [#uses=1]
- store float %577, float* %578, align 4
- br label %bb128
-
-bb125: ; preds = %bb113
- %579 = fmul float %c.0.0.0, %ax1.0.1.0 ; [#uses=1]
- %580 = fmul float %c.0.1.0, %ax1.0.0.0 ; [#uses=1]
- %581 = fsub float %579, %580 ; [#uses=2]
- %582 = fmul float %c.0.2.0, %ax1.0.0.0 ; [#uses=1]
- %583 = fmul float %c.0.0.0, %ax1.0.2.0 ; [#uses=1]
- %584 = fsub float %582, %583 ; [#uses=2]
- %585 = fmul float %c.0.1.0, %ax1.0.2.0 ; [#uses=1]
- %586 = fmul float %c.0.2.0, %ax1.0.1.0 ; [#uses=1]
- %587 = fsub float %585, %586 ; [#uses=2]
- %588 = load float** %117, align 4 ; [#uses=1]
- %589 = fmul float %587, %storemerge ; [#uses=1]
- %590 = getelementptr inbounds float* %588, i32 %530 ; [#uses=1]
- store float %589, float* %590, align 4
- %591 = load float** %117, align 4 ; [#uses=1]
- %592 = fmul float %584, %storemerge ; [#uses=1]
- %593 = getelementptr inbounds float* %591, i32 %535 ; [#uses=1]
- store float %592, float* %593, align 4
- %594 = load float** %117, align 4 ; [#uses=1]
- %595 = fmul float %581, %storemerge ; [#uses=1]
- %596 = getelementptr inbounds float* %594, i32 %538 ; [#uses=1]
- store float %595, float* %596, align 4
- %597 = load float** %142, align 4 ; [#uses=1]
- %598 = fmul float %587, %24 ; [#uses=1]
- %599 = getelementptr inbounds float* %597, i32 %530 ; [#uses=1]
- store float %598, float* %599, align 4
- %600 = load float** %142, align 4 ; [#uses=1]
- %601 = fmul float %584, %24 ; [#uses=1]
- %602 = getelementptr inbounds float* %600, i32 %535 ; [#uses=1]
- store float %601, float* %602, align 4
- %603 = load float** %142, align 4 ; [#uses=1]
- %604 = fmul float %581, %24 ; [#uses=1]
- %605 = getelementptr inbounds float* %603, i32 %538 ; [#uses=1]
- store float %604, float* %605, align 4
- br label %bb128
-
-bb128: ; preds = %bb125, %bb122, %bb117
- %606 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=2]
- %607 = load float* %606, align 4 ; [#uses=1]
- %608 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=2]
- %609 = load float* %608, align 4 ; [#uses=1]
- %.not = icmp ne i32 %limit.0, 0 ; [#uses=1]
- %610 = fcmp oeq float %607, %609 ; [#uses=2]
- %or.cond217 = and i1 %.not, %610 ; [#uses=1]
- %611 = load float** %187, align 4 ; [#uses=1]
- %612 = getelementptr inbounds float* %611, i32 %530 ; [#uses=1]
- store float 0.000000e+00, float* %612, align 4
- %613 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=4]
- %614 = load float** %613, align 4 ; [#uses=1]
- %615 = getelementptr inbounds float* %614, i32 %530 ; [#uses=1]
- store float 0.000000e+00, float* %615, align 4
- %616 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=5]
- %617 = load float** %616, align 4 ; [#uses=1]
- %618 = getelementptr inbounds float* %617, i32 %530 ; [#uses=1]
- store float 0.000000e+00, float* %618, align 4
- %619 = load i32* %166, align 4 ; [#uses=2]
- %620 = and i32 %619, 512 ; [#uses=1]
- %621 = icmp eq i32 %620, 0 ; [#uses=1]
- br i1 %621, label %bb133, label %bb132
-
-bb132: ; preds = %bb128
- %622 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 18 ; [#uses=1]
- br label %bb134
-
-bb133: ; preds = %bb128
- %623 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- br label %bb134
-
-bb134: ; preds = %bb133, %bb132
- %iftmp.204.0.in = phi float* [ %622, %bb132 ], [ %623, %bb133 ] ; [#uses=1]
- %iftmp.204.0 = load float* %iftmp.204.0.in, align 4 ; [#uses=2]
- %624 = xor i1 %not.toBool110, true ; [#uses=1]
- %625 = or i1 %or.cond217, %624 ; [#uses=1]
- br i1 %625, label %bb141, label %bb135
-
-bb135: ; preds = %bb134
- %626 = and i32 %619, 1 ; [#uses=1]
- %toBool138 = icmp eq i32 %626, 0 ; [#uses=1]
- br i1 %toBool138, label %bb140, label %bb139
-
-bb139: ; preds = %bb135
- %627 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %628 = load float** %627, align 4 ; [#uses=1]
- %629 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 13 ; [#uses=1]
- %630 = load float* %629, align 4 ; [#uses=1]
- %631 = getelementptr inbounds float* %628, i32 %530 ; [#uses=1]
- store float %630, float* %631, align 4
- br label %bb140
-
-bb140: ; preds = %bb139, %bb135
- %632 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 56 ; [#uses=2]
- %633 = load float* %632, align 4 ; [#uses=1]
- %634 = load float* %175, align 4 ; [#uses=1]
- %635 = fmul float %634, %iftmp.204.0 ; [#uses=1]
- %636 = load float* %608, align 4 ; [#uses=1]
- %637 = load float* %606, align 4 ; [#uses=1]
- %638 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 51 ; [#uses=1]
- %639 = load float* %638, align 4 ; [#uses=1]
- %640 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %641 = call float @_ZN17btTypedConstraint14getMotorFactorEfffff(%struct.btTypedConstraint* %640, float %639, float %637, float %636, float %633, float %635) ; [#uses=1]
- %642 = load float** %187, align 4 ; [#uses=1]
- %643 = getelementptr inbounds float* %642, i32 %530 ; [#uses=2]
- %644 = load float* %643, align 4 ; [#uses=1]
- %645 = fmul float %iftmp.184.0, %641 ; [#uses=1]
- %646 = load float* %632, align 4 ; [#uses=1]
- %647 = fmul float %645, %646 ; [#uses=1]
- %648 = fsub float %644, %647 ; [#uses=1]
- store float %648, float* %643, align 4
- %649 = load float** %613, align 4 ; [#uses=1]
- %650 = getelementptr inbounds float* %649, i32 %530 ; [#uses=2]
- %651 = load float* %650, align 4 ; [#uses=1]
- %652 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 57 ; [#uses=2]
- %653 = load float* %652, align 4 ; [#uses=1]
- %654 = fsub float -0.000000e+00, %653 ; [#uses=1]
- %655 = load float* %175, align 4 ; [#uses=1]
- %656 = fmul float %655, %654 ; [#uses=1]
- %657 = fadd float %651, %656 ; [#uses=1]
- store float %657, float* %650, align 4
- %658 = load float** %616, align 4 ; [#uses=1]
- %659 = getelementptr inbounds float* %658, i32 %530 ; [#uses=2]
- %660 = load float* %659, align 4 ; [#uses=1]
- %661 = load float* %652, align 4 ; [#uses=1]
- %662 = load float* %175, align 4 ; [#uses=1]
- %663 = fmul float %661, %662 ; [#uses=1]
- %664 = fadd float %660, %663 ; [#uses=1]
- store float %664, float* %659, align 4
- br label %bb141
-
-bb141: ; preds = %bb140, %bb134
- %665 = icmp eq i32 %limit.0, 0 ; [#uses=1]
- br i1 %665, label %bb163, label %bb142
-
-bb142: ; preds = %bb141
- %666 = load float* %175, align 4 ; [#uses=1]
- %667 = fmul float %666, %iftmp.204.0 ; [#uses=1]
- %668 = load float** %187, align 4 ; [#uses=1]
- %669 = getelementptr inbounds float* %668, i32 %530 ; [#uses=2]
- %670 = load float* %669, align 4 ; [#uses=1]
- %671 = fmul float %667, %limit_err.0 ; [#uses=1]
- %672 = fadd float %670, %671 ; [#uses=1]
- store float %672, float* %669, align 4
- %673 = load i32* %166, align 4 ; [#uses=1]
- %674 = and i32 %673, 256 ; [#uses=1]
- %675 = icmp eq i32 %674, 0 ; [#uses=1]
- br i1 %675, label %bb145, label %bb144
-
-bb144: ; preds = %bb142
- %676 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %677 = load float** %676, align 4 ; [#uses=1]
- %678 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 21 ; [#uses=1]
- %679 = load float* %678, align 4 ; [#uses=1]
- %680 = getelementptr inbounds float* %677, i32 %530 ; [#uses=1]
- store float %679, float* %680, align 4
- br label %bb145
-
-bb145: ; preds = %bb144, %bb142
- br i1 %610, label %bb146, label %bb147
-
-bb146: ; preds = %bb145
- %681 = load float** %613, align 4 ; [#uses=1]
- %682 = getelementptr inbounds float* %681, i32 %530 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %682, align 4
- %683 = load float** %616, align 4 ; [#uses=1]
- %684 = getelementptr inbounds float* %683, i32 %530 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %684, align 4
- br label %bb150
-
-bb147: ; preds = %bb145
- %685 = icmp eq i32 %limit.0, 1 ; [#uses=1]
- %686 = load float** %613, align 4 ; [#uses=1]
- %687 = getelementptr inbounds float* %686, i32 %530 ; [#uses=2]
- br i1 %685, label %bb148, label %bb149
-
-bb148: ; preds = %bb147
- store float 0xC7EFFFFFE0000000, float* %687, align 4
- %688 = load float** %616, align 4 ; [#uses=1]
- %689 = getelementptr inbounds float* %688, i32 %530 ; [#uses=1]
- store float 0.000000e+00, float* %689, align 4
- br label %bb150
-
-bb149: ; preds = %bb147
- store float 0.000000e+00, float* %687, align 4
- %690 = load float** %616, align 4 ; [#uses=1]
- %691 = getelementptr inbounds float* %690, i32 %530 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %691, align 4
- br label %bb150
-
-bb150: ; preds = %bb149, %bb148, %bb146
- %692 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 20 ; [#uses=1]
- %693 = load float* %692, align 4 ; [#uses=1]
- %694 = fsub float 1.000000e+00, %693 ; [#uses=1]
- %695 = call float @fabsf(float %694) nounwind readnone ; [#uses=3]
- %696 = fcmp ogt float %695, 0.000000e+00 ; [#uses=1]
- br i1 %696, label %bb151, label %bb162
-
-bb151: ; preds = %bb150
- %697 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 0 ; [#uses=1]
- %698 = load float* %697, align 4 ; [#uses=1]
- %699 = fmul float %698, %ax1.0.0.0 ; [#uses=1]
- %700 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 1 ; [#uses=1]
- %701 = load float* %700, align 4 ; [#uses=1]
- %702 = fmul float %701, %ax1.0.1.0 ; [#uses=1]
- %703 = fadd float %699, %702 ; [#uses=1]
- %704 = getelementptr inbounds %struct.btQuadWord* %linVelA, i32 0, i32 0, i32 2 ; [#uses=1]
- %705 = load float* %704, align 4 ; [#uses=1]
- %706 = fmul float %705, %ax1.0.2.0 ; [#uses=1]
- %707 = fadd float %703, %706 ; [#uses=1]
- %708 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 0 ; [#uses=1]
- %709 = load float* %708, align 4 ; [#uses=1]
- %710 = fmul float %709, %ax1.0.0.0 ; [#uses=1]
- %711 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 1 ; [#uses=1]
- %712 = load float* %711, align 4 ; [#uses=1]
- %713 = fmul float %712, %ax1.0.1.0 ; [#uses=1]
- %714 = fadd float %710, %713 ; [#uses=1]
- %715 = getelementptr inbounds %struct.btQuadWord* %linVelB, i32 0, i32 0, i32 2 ; [#uses=1]
- %716 = load float* %715, align 4 ; [#uses=1]
- %717 = fmul float %716, %ax1.0.2.0 ; [#uses=1]
- %718 = fadd float %714, %717 ; [#uses=1]
- %719 = fsub float %707, %718 ; [#uses=1]
- %720 = fmul float %719, %iftmp.184.0 ; [#uses=4]
- %721 = icmp eq i32 %limit.0, 1 ; [#uses=1]
- br i1 %721, label %bb153, label %bb157
-
-bb153: ; preds = %bb151
- %722 = fcmp olt float %720, 0.000000e+00 ; [#uses=1]
- br i1 %722, label %bb154, label %bb162
-
-bb154: ; preds = %bb153
- %723 = fsub float -0.000000e+00, %695 ; [#uses=1]
- %724 = fmul float %720, %723 ; [#uses=2]
- %725 = load float** %187, align 4 ; [#uses=1]
- %726 = getelementptr inbounds float* %725, i32 %530 ; [#uses=2]
- %727 = load float* %726, align 4 ; [#uses=1]
- %728 = fcmp olt float %727, %724 ; [#uses=1]
- br i1 %728, label %bb156, label %bb162
-
-bb156: ; preds = %bb154
- store float %724, float* %726, align 4
- br label %bb162
-
-bb157: ; preds = %bb151
- %729 = fcmp ogt float %720, 0.000000e+00 ; [#uses=1]
- br i1 %729, label %bb158, label %bb162
-
-bb158: ; preds = %bb157
- %730 = fsub float -0.000000e+00, %695 ; [#uses=1]
- %731 = fmul float %720, %730 ; [#uses=2]
- %732 = load float** %187, align 4 ; [#uses=1]
- %733 = getelementptr inbounds float* %732, i32 %530 ; [#uses=2]
- %734 = load float* %733, align 4 ; [#uses=1]
- %735 = fcmp ogt float %734, %731 ; [#uses=1]
- br i1 %735, label %bb161, label %bb162
-
-bb161: ; preds = %bb158
- store float %731, float* %733, align 4
- br label %bb162
-
-bb162: ; preds = %bb161, %bb158, %bb157, %bb156, %bb154, %bb153, %bb150
- %736 = load float** %187, align 4 ; [#uses=1]
- %737 = getelementptr inbounds float* %736, i32 %530 ; [#uses=2]
- %738 = load float* %737, align 4 ; [#uses=1]
- %739 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 18 ; [#uses=1]
- %740 = load float* %739, align 4 ; [#uses=1]
- %741 = fmul float %738, %740 ; [#uses=1]
- store float %741, float* %737, align 4
- br label %bb163
-
-bb163: ; preds = %bb162, %bb141, %bb109
- %nrow.0 = phi i32 [ 5, %bb162 ], [ 5, %bb141 ], [ 4, %bb109 ] ; [#uses=1]
- %742 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 35 ; [#uses=1]
- %743 = load i8* %742, align 1 ; [#uses=1]
- %toBool164 = icmp eq i8 %743, 0 ; [#uses=1]
- br i1 %toBool164, label %bb169, label %bb165
-
-bb165: ; preds = %bb163
- %744 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 53 ; [#uses=1]
- %745 = load float* %744, align 4 ; [#uses=2]
- %746 = fcmp ogt float %745, 0.000000e+00 ; [#uses=1]
- %iftmp.206.0 = select i1 %746, i32 1, i32 2 ; [#uses=1]
- br label %bb169
-
-bb169: ; preds = %bb165, %bb163
- %limit_err.1 = phi float [ %745, %bb165 ], [ 0.000000e+00, %bb163 ] ; [#uses=1]
- %limit.1 = phi i32 [ %iftmp.206.0, %bb165 ], [ 0, %bb163 ] ; [#uses=5]
- %747 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 59 ; [#uses=1]
- %748 = load i8* %747, align 4 ; [#uses=1]
- %not.toBool170 = icmp ne i8 %748, 0 ; [#uses=2]
- %powered.2 = zext i1 %not.toBool170 to i32 ; [#uses=1]
- %749 = or i32 %powered.2, %limit.1 ; [#uses=1]
- %750 = icmp eq i32 %749, 0 ; [#uses=1]
- br i1 %750, label %return, label %bb173
-
-bb173: ; preds = %bb169
- %751 = load i32* %0, align 4 ; [#uses=1]
- %752 = mul nsw i32 %751, %nrow.0 ; [#uses=18]
- %753 = load float** %117, align 4 ; [#uses=1]
- %754 = getelementptr inbounds float* %753, i32 %752 ; [#uses=1]
- store float %ax1.0.0.0, float* %754, align 4
- %755 = load float** %117, align 4 ; [#uses=1]
- %756 = add nsw i32 %752, 1 ; [#uses=2]
- %757 = getelementptr inbounds float* %755, i32 %756 ; [#uses=1]
- store float %ax1.0.1.0, float* %757, align 4
- %758 = load float** %117, align 4 ; [#uses=1]
- %759 = add nsw i32 %752, 2 ; [#uses=2]
- %760 = getelementptr inbounds float* %758, i32 %759 ; [#uses=1]
- store float %ax1.0.2.0, float* %760, align 4
- %761 = load float** %142, align 4 ; [#uses=1]
- %762 = fsub float -0.000000e+00, %ax1.0.0.0 ; [#uses=1]
- %763 = getelementptr inbounds float* %761, i32 %752 ; [#uses=1]
- store float %762, float* %763, align 4
- %764 = load float** %142, align 4 ; [#uses=1]
- %765 = fsub float -0.000000e+00, %ax1.0.1.0 ; [#uses=1]
- %766 = getelementptr inbounds float* %764, i32 %756 ; [#uses=1]
- store float %765, float* %766, align 4
- %767 = load float** %142, align 4 ; [#uses=1]
- %768 = fsub float -0.000000e+00, %ax1.0.2.0 ; [#uses=1]
- %769 = getelementptr inbounds float* %767, i32 %759 ; [#uses=1]
- store float %768, float* %769, align 4
- %770 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 8 ; [#uses=2]
- %771 = load float* %770, align 4 ; [#uses=2]
- %772 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 9 ; [#uses=2]
- %773 = load float* %772, align 4 ; [#uses=2]
- %.not218 = icmp ne i32 %limit.1, 0 ; [#uses=1]
- %774 = fcmp oeq float %771, %773 ; [#uses=2]
- %or.cond219 = and i1 %.not218, %774 ; [#uses=1]
- %775 = load i32* %166, align 4 ; [#uses=2]
- %776 = and i32 %775, 2048 ; [#uses=1]
- %777 = icmp eq i32 %776, 0 ; [#uses=1]
- br i1 %777, label %bb182, label %bb181
-
-bb181: ; preds = %bb173
- %778 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 22 ; [#uses=1]
- br label %bb183
-
-bb182: ; preds = %bb173
- %779 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 1 ; [#uses=1]
- br label %bb183
-
-bb183: ; preds = %bb182, %bb181
- %iftmp.208.0.in = phi float* [ %778, %bb181 ], [ %779, %bb182 ] ; [#uses=1]
- %iftmp.208.0 = load float* %iftmp.208.0.in, align 4 ; [#uses=2]
- %780 = xor i1 %not.toBool170, true ; [#uses=1]
- %781 = or i1 %or.cond219, %780 ; [#uses=1]
- br i1 %781, label %bb189, label %bb184
-
-bb184: ; preds = %bb183
- %782 = and i32 %775, 4 ; [#uses=1]
- %783 = icmp eq i32 %782, 0 ; [#uses=1]
- br i1 %783, label %bb188, label %bb187
-
-bb187: ; preds = %bb184
- %784 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %785 = load float** %784, align 4 ; [#uses=1]
- %786 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 17 ; [#uses=1]
- %787 = load float* %786, align 4 ; [#uses=1]
- %788 = getelementptr inbounds float* %785, i32 %752 ; [#uses=1]
- store float %787, float* %788, align 4
- %.pre = load float* %772, align 4 ; [#uses=1]
- %.pre473 = load float* %770, align 4 ; [#uses=1]
- br label %bb188
-
-bb188: ; preds = %bb187, %bb184
- %789 = phi float [ %771, %bb184 ], [ %.pre473, %bb187 ] ; [#uses=1]
- %790 = phi float [ %773, %bb184 ], [ %.pre, %bb187 ] ; [#uses=1]
- %791 = load float* %175, align 4 ; [#uses=1]
- %792 = fmul float %791, %iftmp.208.0 ; [#uses=1]
- %793 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 60 ; [#uses=2]
- %794 = load float* %793, align 4 ; [#uses=1]
- %795 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 52 ; [#uses=1]
- %796 = load float* %795, align 4 ; [#uses=1]
- %797 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %798 = call float @_ZN17btTypedConstraint14getMotorFactorEfffff(%struct.btTypedConstraint* %797, float %796, float %789, float %790, float %794, float %792) ; [#uses=1]
- %799 = load float** %187, align 4 ; [#uses=1]
- %800 = load float* %793, align 4 ; [#uses=1]
- %801 = fmul float %800, %798 ; [#uses=1]
- %802 = getelementptr inbounds float* %799, i32 %752 ; [#uses=1]
- store float %801, float* %802, align 4
- %803 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %804 = load float** %803, align 4 ; [#uses=1]
- %805 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 61 ; [#uses=2]
- %806 = load float* %805, align 4 ; [#uses=1]
- %807 = fsub float -0.000000e+00, %806 ; [#uses=1]
- %808 = load float* %175, align 4 ; [#uses=1]
- %809 = fmul float %808, %807 ; [#uses=1]
- %810 = getelementptr inbounds float* %804, i32 %752 ; [#uses=1]
- store float %809, float* %810, align 4
- %811 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %812 = load float** %811, align 4 ; [#uses=1]
- %813 = load float* %805, align 4 ; [#uses=1]
- %814 = load float* %175, align 4 ; [#uses=1]
- %815 = fmul float %813, %814 ; [#uses=1]
- %816 = getelementptr inbounds float* %812, i32 %752 ; [#uses=1]
- store float %815, float* %816, align 4
- br label %bb189
-
-bb189: ; preds = %bb188, %bb183
- %817 = icmp eq i32 %limit.1, 0 ; [#uses=1]
- br i1 %817, label %return, label %bb190
-
-bb190: ; preds = %bb189
- %818 = load float* %175, align 4 ; [#uses=1]
- %819 = fmul float %818, %iftmp.208.0 ; [#uses=1]
- %820 = load float** %187, align 4 ; [#uses=1]
- %821 = getelementptr inbounds float* %820, i32 %752 ; [#uses=2]
- %822 = load float* %821, align 4 ; [#uses=1]
- %823 = fmul float %819, %limit_err.1 ; [#uses=1]
- %824 = fadd float %822, %823 ; [#uses=1]
- store float %824, float* %821, align 4
- %825 = load i32* %166, align 4 ; [#uses=1]
- %826 = and i32 %825, 1024 ; [#uses=1]
- %827 = icmp eq i32 %826, 0 ; [#uses=1]
- br i1 %827, label %bb194, label %bb193
-
-bb193: ; preds = %bb190
- %828 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 8 ; [#uses=1]
- %829 = load float** %828, align 4 ; [#uses=1]
- %830 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 25 ; [#uses=1]
- %831 = load float* %830, align 4 ; [#uses=1]
- %832 = getelementptr inbounds float* %829, i32 %752 ; [#uses=1]
- store float %831, float* %832, align 4
- br label %bb194
-
-bb194: ; preds = %bb193, %bb190
- br i1 %774, label %bb195, label %bb196
-
-bb195: ; preds = %bb194
- %833 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %834 = load float** %833, align 4 ; [#uses=1]
- %835 = getelementptr inbounds float* %834, i32 %752 ; [#uses=1]
- store float 0xC7EFFFFFE0000000, float* %835, align 4
- %836 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %837 = load float** %836, align 4 ; [#uses=1]
- %838 = getelementptr inbounds float* %837, i32 %752 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %838, align 4
- br label %bb199
-
-bb196: ; preds = %bb194
- %839 = icmp eq i32 %limit.1, 1 ; [#uses=1]
- %840 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 9 ; [#uses=1]
- %841 = load float** %840, align 4 ; [#uses=1]
- %842 = getelementptr inbounds float* %841, i32 %752 ; [#uses=2]
- br i1 %839, label %bb197, label %bb198
-
-bb197: ; preds = %bb196
- store float 0.000000e+00, float* %842, align 4
- %843 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %844 = load float** %843, align 4 ; [#uses=1]
- %845 = getelementptr inbounds float* %844, i32 %752 ; [#uses=1]
- store float 0x47EFFFFFE0000000, float* %845, align 4
- br label %bb199
-
-bb198: ; preds = %bb196
- store float 0xC7EFFFFFE0000000, float* %842, align 4
- %846 = getelementptr inbounds %"struct.btTypedConstraint::btConstraintInfo2"* %info, i32 0, i32 10 ; [#uses=1]
- %847 = load float** %846, align 4 ; [#uses=1]
- %848 = getelementptr inbounds float* %847, i32 %752 ; [#uses=1]
- store float 0.000000e+00, float* %848, align 4
- br label %bb199
-
-bb199: ; preds = %bb198, %bb197, %bb195
- %849 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 24 ; [#uses=1]
- %850 = load float* %849, align 4 ; [#uses=1]
- %851 = fsub float 1.000000e+00, %850 ; [#uses=1]
- %852 = call float @fabsf(float %851) nounwind readnone ; [#uses=3]
- %853 = fcmp ogt float %852, 0.000000e+00 ; [#uses=1]
- br i1 %853, label %bb200, label %bb213
-
-bb200: ; preds = %bb199
- %854 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %855 = load %struct.btRigidBody** %854, align 4 ; [#uses=3]
- %856 = getelementptr inbounds %struct.btRigidBody* %855, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %857 = load float* %856, align 4 ; [#uses=1]
- %858 = fmul float %857, %ax1.0.0.0 ; [#uses=1]
- %859 = getelementptr inbounds %struct.btRigidBody* %855, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %860 = load float* %859, align 4 ; [#uses=1]
- %861 = fmul float %860, %ax1.0.1.0 ; [#uses=1]
- %862 = fadd float %858, %861 ; [#uses=1]
- %863 = getelementptr inbounds %struct.btRigidBody* %855, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %864 = load float* %863, align 4 ; [#uses=1]
- %865 = fmul float %864, %ax1.0.2.0 ; [#uses=1]
- %866 = fadd float %862, %865 ; [#uses=1]
- %867 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %868 = load %struct.btRigidBody** %867, align 4 ; [#uses=3]
- %869 = getelementptr inbounds %struct.btRigidBody* %868, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %870 = load float* %869, align 4 ; [#uses=1]
- %871 = fmul float %870, %ax1.0.0.0 ; [#uses=1]
- %872 = getelementptr inbounds %struct.btRigidBody* %868, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %873 = load float* %872, align 4 ; [#uses=1]
- %874 = fmul float %873, %ax1.0.1.0 ; [#uses=1]
- %875 = fadd float %871, %874 ; [#uses=1]
- %876 = getelementptr inbounds %struct.btRigidBody* %868, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %877 = load float* %876, align 4 ; [#uses=1]
- %878 = fmul float %877, %ax1.0.2.0 ; [#uses=1]
- %879 = fadd float %875, %878 ; [#uses=1]
- %880 = fsub float %866, %879 ; [#uses=4]
- %881 = icmp eq i32 %limit.1, 1 ; [#uses=1]
- br i1 %881, label %bb203, label %bb208
-
-bb203: ; preds = %bb200
- %882 = fcmp olt float %880, 0.000000e+00 ; [#uses=1]
- br i1 %882, label %bb204, label %bb213
-
-bb204: ; preds = %bb203
- %883 = fsub float -0.000000e+00, %852 ; [#uses=1]
- %884 = fmul float %880, %883 ; [#uses=2]
- %885 = load float** %187, align 4 ; [#uses=1]
- %886 = getelementptr inbounds float* %885, i32 %752 ; [#uses=2]
- %887 = load float* %886, align 4 ; [#uses=1]
- %888 = fcmp olt float %887, %884 ; [#uses=1]
- br i1 %888, label %bb207, label %bb213
-
-bb207: ; preds = %bb204
- store float %884, float* %886, align 4
- br label %bb213
-
-bb208: ; preds = %bb200
- %889 = fcmp ogt float %880, 0.000000e+00 ; [#uses=1]
- br i1 %889, label %bb209, label %bb213
-
-bb209: ; preds = %bb208
- %890 = fsub float -0.000000e+00, %852 ; [#uses=1]
- %891 = fmul float %880, %890 ; [#uses=2]
- %892 = load float** %187, align 4 ; [#uses=1]
- %893 = getelementptr inbounds float* %892, i32 %752 ; [#uses=2]
- %894 = load float* %893, align 4 ; [#uses=1]
- %895 = fcmp ogt float %894, %891 ; [#uses=1]
- br i1 %895, label %bb212, label %bb213
-
-bb212: ; preds = %bb209
- store float %891, float* %893, align 4
- br label %bb213
-
-bb213: ; preds = %bb212, %bb209, %bb208, %bb207, %bb204, %bb203, %bb199
- %896 = load float** %187, align 4 ; [#uses=1]
- %897 = getelementptr inbounds float* %896, i32 %752 ; [#uses=2]
- %898 = load float* %897, align 4 ; [#uses=1]
- %899 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 22 ; [#uses=1]
- %900 = load float* %899, align 4 ; [#uses=1]
- %901 = fmul float %898, %900 ; [#uses=1]
- store float %901, float* %897, align 4
- ret void
-
-return: ; preds = %bb189, %bb169
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSliderConstraint13testAngLimitsEv(%struct.btSliderConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 53 ; [#uses=3]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 35 ; [#uses=3]
- store i8 0, i8* %1, align 1
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 9 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=4]
- %6 = fcmp ugt float %3, %5 ; [#uses=1]
- br i1 %6, label %return, label %bb
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = load float* %8, align 4 ; [#uses=1]
- %12 = load float* %7, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 41, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = load float* %14, align 4 ; [#uses=1]
- %18 = load float* %13, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 42, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = load float* %20, align 4 ; [#uses=2]
- %24 = load float* %19, align 4 ; [#uses=2]
- %25 = fmul float %22, %10 ; [#uses=1]
- %26 = fmul float %23, %11 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = fmul float %24, %12 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = fmul float %22, %16 ; [#uses=1]
- %31 = fmul float %23, %17 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %24, %18 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=1]
- %35 = tail call float @atan2f(float %34, float %29) nounwind readonly ; [#uses=1]
- %36 = tail call float @_Z21btAdjustAngleToLimitsfff(float %35, float %3, float %5) nounwind ; [#uses=5]
- %37 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 52 ; [#uses=1]
- store float %36, float* %37, align 4
- %38 = fcmp ogt float %3, %36 ; [#uses=1]
- br i1 %38, label %bb1, label %bb2
-
-bb1: ; preds = %bb
- %39 = fsub float %36, %3 ; [#uses=1]
- store float %39, float* %0, align 4
- store i8 1, i8* %1, align 1
- ret void
-
-bb2: ; preds = %bb
- %40 = fcmp olt float %5, %36 ; [#uses=1]
- br i1 %40, label %bb3, label %return
-
-bb3: ; preds = %bb2
- %41 = fsub float %36, %5 ; [#uses=1]
- store float %41, float* %0, align 4
- store i8 1, i8* %1, align 1
- ret void
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSliderConstraintC2ER11btRigidBodyRK11btTransformb(%struct.btSliderConstraint* %this, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-return:
- %0 = tail call %struct.btRigidBody* @_ZN17btTypedConstraint12getFixedBodyEv() ; [#uses=1]
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %1, i32 7, %struct.btRigidBody* %0, %struct.btRigidBody* %rbB)
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV18btSliderConstraint, i32 0, i32 2), i32 (...)*** %2, align 4
- %3 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %3, align 4
- %4 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=4]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=4]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=4]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=4]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=4]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=4]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=4]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=4]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=4]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=4]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=4]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %52 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store i8 %useLinearReferenceFrameA, i8* %52, align 4
- %53 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=4]
- %55 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=4]
- %57 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=4]
- %59 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=4]
- %61 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=4]
- %63 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=4]
- %65 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=4]
- %67 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=4]
- %69 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=4]
- %71 = fmul float %68, %45 ; [#uses=1]
- %72 = fmul float %66, %42 ; [#uses=1]
- %73 = fmul float %62, %45 ; [#uses=1]
- %74 = fmul float %60, %42 ; [#uses=1]
- %75 = fmul float %56, %45 ; [#uses=1]
- %76 = fmul float %54, %42 ; [#uses=1]
- %77 = fmul float %18, %68 ; [#uses=1]
- %78 = fmul float %6, %66 ; [#uses=1]
- %79 = fmul float %21, %68 ; [#uses=1]
- %80 = fmul float %9, %66 ; [#uses=1]
- %81 = fmul float %24, %68 ; [#uses=1]
- %82 = fmul float %12, %66 ; [#uses=1]
- %83 = fmul float %18, %62 ; [#uses=1]
- %84 = fmul float %6, %60 ; [#uses=1]
- %85 = fmul float %21, %62 ; [#uses=1]
- %86 = fmul float %9, %60 ; [#uses=1]
- %87 = fmul float %24, %62 ; [#uses=1]
- %88 = fmul float %12, %60 ; [#uses=1]
- %89 = fmul float %18, %56 ; [#uses=1]
- %90 = fmul float %6, %54 ; [#uses=1]
- %91 = fmul float %21, %56 ; [#uses=1]
- %92 = fmul float %9, %54 ; [#uses=1]
- %93 = fmul float %24, %56 ; [#uses=1]
- %94 = fmul float %12, %54 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %96 = fmul float %70, %48 ; [#uses=1]
- %97 = fadd float %72, %71 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %99 = fmul float %64, %48 ; [#uses=1]
- %100 = fadd float %74, %73 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %102 = fmul float %58, %48 ; [#uses=1]
- %103 = fadd float %76, %75 ; [#uses=1]
- %104 = fmul float %30, %70 ; [#uses=1]
- %105 = fadd float %78, %77 ; [#uses=1]
- %106 = fmul float %33, %70 ; [#uses=1]
- %107 = fadd float %80, %79 ; [#uses=1]
- %108 = fmul float %36, %70 ; [#uses=1]
- %109 = fadd float %82, %81 ; [#uses=1]
- %110 = fmul float %30, %64 ; [#uses=1]
- %111 = fadd float %84, %83 ; [#uses=1]
- %112 = fmul float %33, %64 ; [#uses=1]
- %113 = fadd float %86, %85 ; [#uses=1]
- %114 = fmul float %36, %64 ; [#uses=1]
- %115 = fadd float %88, %87 ; [#uses=1]
- %116 = fmul float %30, %58 ; [#uses=1]
- %117 = fadd float %90, %89 ; [#uses=1]
- %118 = fmul float %33, %58 ; [#uses=1]
- %119 = fadd float %92, %91 ; [#uses=1]
- %120 = fmul float %36, %58 ; [#uses=1]
- %121 = fadd float %94, %93 ; [#uses=1]
- %122 = load float* %95, align 4 ; [#uses=1]
- %123 = fadd float %97, %96 ; [#uses=1]
- %124 = load float* %98, align 4 ; [#uses=1]
- %125 = fadd float %100, %99 ; [#uses=1]
- %126 = load float* %101, align 4 ; [#uses=1]
- %127 = fadd float %103, %102 ; [#uses=1]
- %128 = fadd float %105, %104 ; [#uses=1]
- %129 = fadd float %107, %106 ; [#uses=1]
- %130 = fadd float %109, %108 ; [#uses=1]
- %131 = fadd float %111, %110 ; [#uses=1]
- %132 = fadd float %113, %112 ; [#uses=1]
- %133 = fadd float %115, %114 ; [#uses=1]
- %134 = fadd float %117, %116 ; [#uses=1]
- %135 = fadd float %119, %118 ; [#uses=1]
- %136 = fadd float %121, %120 ; [#uses=1]
- %137 = fadd float %123, %122 ; [#uses=1]
- %138 = fadd float %125, %124 ; [#uses=1]
- %139 = fadd float %127, %126 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %128, float* %140, align 4
- %141 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %129, float* %141, align 4
- %142 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %130, float* %142, align 4
- %143 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %143, align 4
- %144 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %131, float* %144, align 4
- %145 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %132, float* %145, align 4
- %146 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %133, float* %146, align 4
- %147 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %147, align 4
- %148 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %134, float* %148, align 4
- %149 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %135, float* %149, align 4
- %150 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %136, float* %150, align 4
- %151 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %151, align 4
- %152 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %137, float* %152, align 4
- %153 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %138, float* %153, align 4
- %154 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %139, float* %154, align 4
- %155 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %155, align 4
- %156 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float 1.000000e+00, float* %156, align 4
- %157 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float -1.000000e+00, float* %157, align 4
- %158 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0.000000e+00, float* %158, align 4
- %159 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 0.000000e+00, float* %159, align 4
- %160 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %160, align 4
- %161 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x3FE6666660000000, float* %161, align 4
- %162 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %162, align 4
- %163 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %163, align 4
- %164 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 14 ; [#uses=1]
- store float 1.000000e+00, float* %164, align 4
- %165 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 15 ; [#uses=1]
- store float 0x3FE6666660000000, float* %165, align 4
- %166 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %166, align 4
- %167 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float 0.000000e+00, float* %167, align 4
- %168 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 26 ; [#uses=1]
- store float 1.000000e+00, float* %168, align 4
- %169 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 27 ; [#uses=1]
- store float 0x3FE6666660000000, float* %169, align 4
- %170 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 28 ; [#uses=1]
- store float 1.000000e+00, float* %170, align 4
- %171 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store float 0.000000e+00, float* %171, align 4
- %172 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 30 ; [#uses=1]
- store float 1.000000e+00, float* %172, align 4
- %173 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 31 ; [#uses=1]
- store float 0x3FE6666660000000, float* %173, align 4
- %174 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 32 ; [#uses=1]
- store float 1.000000e+00, float* %174, align 4
- %175 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 33 ; [#uses=1]
- store float 0.000000e+00, float* %175, align 4
- %176 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store float 1.000000e+00, float* %176, align 4
- %177 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store float 0x3FE6666660000000, float* %177, align 4
- %178 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store float 1.000000e+00, float* %178, align 4
- %179 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store float 0.000000e+00, float* %179, align 4
- %180 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store float 1.000000e+00, float* %180, align 4
- %181 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store float 0x3FE6666660000000, float* %181, align 4
- %182 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 24 ; [#uses=1]
- store float 1.000000e+00, float* %182, align 4
- %183 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store float 0.000000e+00, float* %183, align 4
- %184 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 55 ; [#uses=1]
- store i8 0, i8* %184, align 4
- %185 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 56 ; [#uses=1]
- store float 0.000000e+00, float* %185, align 4
- %186 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 57 ; [#uses=1]
- store float 0.000000e+00, float* %186, align 4
- %187 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 58 ; [#uses=1]
- store float 0.000000e+00, float* %187, align 4
- %188 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 59 ; [#uses=1]
- store i8 0, i8* %188, align 4
- %189 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 60 ; [#uses=1]
- store float 0.000000e+00, float* %189, align 4
- %190 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 61 ; [#uses=1]
- store float 0.000000e+00, float* %190, align 4
- %191 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 62 ; [#uses=1]
- store float 0.000000e+00, float* %191, align 4
- %192 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store i32 0, i32* %192, align 4
- %193 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %193, align 1
- %194 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %195 = load %struct.btRigidBody** %194, align 4 ; [#uses=1]
- %196 = getelementptr inbounds %struct.btRigidBody* %195, i32 0, i32 0, i32 1 ; [#uses=1]
- %197 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %198 = load %struct.btRigidBody** %197, align 4 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btRigidBody* %198, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN18btSliderConstraint19calculateTransformsERK11btTransformS2_(%struct.btSliderConstraint* %this, %struct.btTransform* %199, %struct.btTransform* %196) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btSliderConstraintC1ER11btRigidBodyRK11btTransformb(%struct.btSliderConstraint* %this, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-entry:
- tail call void @_ZN18btSliderConstraintC2ER11btRigidBodyRK11btTransformb(%struct.btSliderConstraint* %this, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameA)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN18btSliderConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btSliderConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInA, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-return:
- %0 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* %0, i32 7, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB)
- %1 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV18btSliderConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 1 ; [#uses=1]
- store i8 0, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 3, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btTransform* %frameInA, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %51 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 4
- %54 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 4
- %57 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 4
- %63 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 4
- %69 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 4
- %75 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 4
- %81 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %86 = load float* %85, align 4 ; [#uses=1]
- store float %86, float* %84, align 4
- %87 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- store float %92, float* %90, align 4
- %93 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 2 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- store float %95, float* %93, align 4
- %96 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 4, i32 1, i32 0, i32 3 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btTransform* %frameInB, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- store float %98, float* %96, align 4
- %99 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store i8 %useLinearReferenceFrameA, i8* %99, align 4
- %100 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store float 1.000000e+00, float* %100, align 4
- %101 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float -1.000000e+00, float* %101, align 4
- %102 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0.000000e+00, float* %102, align 4
- %103 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 9 ; [#uses=1]
- store float 0.000000e+00, float* %103, align 4
- %104 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %104, align 4
- %105 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 11 ; [#uses=1]
- store float 0x3FE6666660000000, float* %105, align 4
- %106 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %106, align 4
- %107 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 14 ; [#uses=1]
- store float 1.000000e+00, float* %108, align 4
- %109 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 15 ; [#uses=1]
- store float 0x3FE6666660000000, float* %109, align 4
- %110 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %110, align 4
- %111 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 17 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- %112 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 26 ; [#uses=1]
- store float 1.000000e+00, float* %112, align 4
- %113 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 27 ; [#uses=1]
- store float 0x3FE6666660000000, float* %113, align 4
- %114 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 28 ; [#uses=1]
- store float 1.000000e+00, float* %114, align 4
- %115 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 29 ; [#uses=1]
- store float 0.000000e+00, float* %115, align 4
- %116 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 30 ; [#uses=1]
- store float 1.000000e+00, float* %116, align 4
- %117 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 31 ; [#uses=1]
- store float 0x3FE6666660000000, float* %117, align 4
- %118 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 32 ; [#uses=1]
- store float 1.000000e+00, float* %118, align 4
- %119 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 33 ; [#uses=1]
- store float 0.000000e+00, float* %119, align 4
- %120 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 18 ; [#uses=1]
- store float 1.000000e+00, float* %120, align 4
- %121 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 19 ; [#uses=1]
- store float 0x3FE6666660000000, float* %121, align 4
- %122 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 20 ; [#uses=1]
- store float 1.000000e+00, float* %122, align 4
- %123 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 21 ; [#uses=1]
- store float 0.000000e+00, float* %123, align 4
- %124 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 22 ; [#uses=1]
- store float 1.000000e+00, float* %124, align 4
- %125 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 23 ; [#uses=1]
- store float 0x3FE6666660000000, float* %125, align 4
- %126 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 24 ; [#uses=1]
- store float 1.000000e+00, float* %126, align 4
- %127 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 25 ; [#uses=1]
- store float 0.000000e+00, float* %127, align 4
- %128 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 55 ; [#uses=1]
- store i8 0, i8* %128, align 4
- %129 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 56 ; [#uses=1]
- store float 0.000000e+00, float* %129, align 4
- %130 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 57 ; [#uses=1]
- store float 0.000000e+00, float* %130, align 4
- %131 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 58 ; [#uses=1]
- store float 0.000000e+00, float* %131, align 4
- %132 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 59 ; [#uses=1]
- store i8 0, i8* %132, align 4
- %133 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 60 ; [#uses=1]
- store float 0.000000e+00, float* %133, align 4
- %134 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 61 ; [#uses=1]
- store float 0.000000e+00, float* %134, align 4
- %135 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 62 ; [#uses=1]
- store float 0.000000e+00, float* %135, align 4
- %136 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 36 ; [#uses=1]
- store i32 0, i32* %136, align 4
- %137 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 2 ; [#uses=1]
- store i8 1, i8* %137, align 1
- %138 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %139 = load %struct.btRigidBody** %138, align 4 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btRigidBody* %139, i32 0, i32 0, i32 1 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btSliderConstraint* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- %142 = load %struct.btRigidBody** %141, align 4 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btRigidBody* %142, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN18btSliderConstraint19calculateTransformsERK11btTransformS2_(%struct.btSliderConstraint* %this, %struct.btTransform* %143, %struct.btTransform* %140) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN18btSliderConstraintC1ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btSliderConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* nocapture %frameInA, %struct.btTransform* nocapture %frameInB, i8 zeroext %useLinearReferenceFrameA) align 2 {
-entry:
- tail call void @_ZN18btSliderConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btSliderConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* %frameInA, %struct.btTransform* %frameInB, i8 zeroext %useLinearReferenceFrameA)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN24btSolve2LinearConstraint31resolveUnilateralPairConstraintEP11btRigidBodyS1_RK11btMatrix3x3S4_RK9btVector3fS7_S7_S7_S7_fS7_S7_S7_fS7_S7_S7_fS7_RfS8_(%struct.btSolve2LinearConstraint* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btMatrix3x3* nocapture %world2A, %struct.btMatrix3x3* nocapture %world2B, %struct.btQuadWord* nocapture %invInertiaADiag, float %invMassA, %struct.btQuadWord* nocapture %linvelA, %struct.btQuadWord* nocapture %angvelA, %struct.btQuadWord* nocapture %rel_posA1, %struct.btQuadWord* nocapture %invInertiaBDiag, float %invMassB, %struct.btQuadWord* nocapture %linvelB, %struct.btQuadWord* nocapture %angvelB, %struct.btQuadWord* nocapture %rel_posA2, float %depthA, %struct.btQuadWord* nocapture %normalA, %struct.btQuadWord* nocapture %rel_posB1, %struct.btQuadWord* nocapture %rel_posB2, float %depthB, %struct.btQuadWord* nocapture %normalB, float* nocapture %imp0, float* nocapture %imp1) nounwind align 2 {
-entry:
- %jacA = alloca %struct.btJacobianEntry, align 8 ; [#uses=11]
- %jacB = alloca %struct.btJacobianEntry, align 8 ; [#uses=11]
- store float 0.000000e+00, float* %imp0, align 4
- store float 0.000000e+00, float* %imp1, align 4
- %0 = getelementptr inbounds %struct.btQuadWord* %normalA, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fmul float %1, %1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %normalA, i32 0, i32 0, i32 1 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=2]
- %5 = fmul float %4, %4 ; [#uses=1]
- %6 = fadd float %2, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %normalA, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = fadd float %6, %9 ; [#uses=1]
- %11 = call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = call float @fabsf(float %11) nounwind readnone ; [#uses=1]
- %13 = fadd float %12, -1.000000e+00 ; [#uses=1]
- %14 = call float @fabsf(float %13) nounwind readnone ; [#uses=1]
- %15 = fcmp ult float %14, 0x3E80000000000000 ; [#uses=1]
- br i1 %15, label %bb, label %return
-
-bb: ; preds = %entry
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %jacA, %struct.btMatrix3x3* %world2A, %struct.btMatrix3x3* %world2B, %struct.btQuadWord* %rel_posA1, %struct.btQuadWord* %rel_posA2, %struct.btQuadWord* %normalA, %struct.btQuadWord* %invInertiaADiag, float %invMassA, %struct.btQuadWord* %invInertiaBDiag, float %invMassB) nounwind
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %jacB, %struct.btMatrix3x3* %world2A, %struct.btMatrix3x3* %world2B, %struct.btQuadWord* %rel_posB1, %struct.btQuadWord* %rel_posB2, %struct.btQuadWord* %normalB, %struct.btQuadWord* %invInertiaADiag, float %invMassA, %struct.btQuadWord* %invInertiaBDiag, float %invMassB) nounwind
- %16 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btQuadWord* %rel_posA1, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=4]
- %20 = fmul float %17, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=4]
- %23 = getelementptr inbounds %struct.btQuadWord* %rel_posA1, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=4]
- %25 = fmul float %22, %24 ; [#uses=1]
- %26 = fsub float %20, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=4]
- %29 = fmul float %28, %24 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %rel_posA1, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=4]
- %32 = fmul float %17, %31 ; [#uses=1]
- %33 = fsub float %29, %32 ; [#uses=1]
- %34 = fmul float %22, %31 ; [#uses=1]
- %35 = fmul float %28, %19 ; [#uses=1]
- %36 = fsub float %34, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = fadd float %38, %26 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=2]
- %42 = fadd float %41, %33 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = fadd float %44, %36 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=4]
- %48 = fmul float %47, %19 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=4]
- %51 = fmul float %50, %24 ; [#uses=1]
- %52 = fsub float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=4]
- %55 = fmul float %54, %24 ; [#uses=1]
- %56 = fmul float %47, %31 ; [#uses=1]
- %57 = fsub float %55, %56 ; [#uses=1]
- %58 = fmul float %50, %31 ; [#uses=1]
- %59 = fmul float %54, %19 ; [#uses=1]
- %60 = fsub float %58, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=2]
- %63 = fadd float %62, %52 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=2]
- %66 = fadd float %65, %57 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=2]
- %69 = fadd float %68, %60 ; [#uses=1]
- %70 = fsub float %63, %39 ; [#uses=1]
- %71 = fsub float %66, %42 ; [#uses=1]
- %72 = fsub float %69, %45 ; [#uses=1]
- %73 = load float* %0, align 4 ; [#uses=1]
- %74 = fmul float %73, %72 ; [#uses=1]
- %75 = load float* %3, align 4 ; [#uses=1]
- %76 = fmul float %75, %71 ; [#uses=1]
- %77 = fadd float %74, %76 ; [#uses=1]
- %78 = load float* %7, align 4 ; [#uses=1]
- %79 = fmul float %78, %70 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btQuadWord* %rel_posB1, i32 0, i32 0, i32 1 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=4]
- %83 = fmul float %17, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %rel_posB1, i32 0, i32 0, i32 0 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=4]
- %86 = fmul float %22, %85 ; [#uses=1]
- %87 = fsub float %83, %86 ; [#uses=1]
- %88 = fmul float %28, %85 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btQuadWord* %rel_posB1, i32 0, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=4]
- %91 = fmul float %17, %90 ; [#uses=1]
- %92 = fsub float %88, %91 ; [#uses=1]
- %93 = fmul float %22, %90 ; [#uses=1]
- %94 = fmul float %28, %82 ; [#uses=1]
- %95 = fsub float %93, %94 ; [#uses=1]
- %96 = fadd float %38, %87 ; [#uses=1]
- %97 = fadd float %41, %92 ; [#uses=1]
- %98 = fadd float %44, %95 ; [#uses=1]
- %99 = fmul float %47, %82 ; [#uses=1]
- %100 = fmul float %50, %85 ; [#uses=1]
- %101 = fsub float %99, %100 ; [#uses=1]
- %102 = fmul float %54, %85 ; [#uses=1]
- %103 = fmul float %47, %90 ; [#uses=1]
- %104 = fsub float %102, %103 ; [#uses=1]
- %105 = fmul float %50, %90 ; [#uses=1]
- %106 = fmul float %54, %82 ; [#uses=1]
- %107 = fsub float %105, %106 ; [#uses=1]
- %108 = fadd float %62, %101 ; [#uses=1]
- %109 = fadd float %65, %104 ; [#uses=1]
- %110 = fadd float %68, %107 ; [#uses=1]
- %111 = fsub float %108, %96 ; [#uses=1]
- %112 = fsub float %109, %97 ; [#uses=1]
- %113 = fsub float %110, %98 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btQuadWord* %normalB, i32 0, i32 0, i32 0 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = fmul float %115, %113 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btQuadWord* %normalB, i32 0, i32 0, i32 1 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fmul float %118, %112 ; [#uses=1]
- %120 = fadd float %116, %119 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btQuadWord* %normalB, i32 0, i32 0, i32 2 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- %123 = fmul float %122, %111 ; [#uses=1]
- %124 = fadd float %120, %123 ; [#uses=1]
- %125 = fadd float %invMassA, %invMassB ; [#uses=1]
- %126 = fdiv float 1.000000e+00, %125 ; [#uses=2]
- %127 = getelementptr inbounds %struct.btSolve2LinearConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=2]
- %129 = fmul float %128, %depthA ; [#uses=1]
- %130 = fmul float %129, %126 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btSolve2LinearConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=2]
- %133 = fmul float %132, %80 ; [#uses=1]
- %134 = fsub float %130, %133 ; [#uses=2]
- %135 = fmul float %128, %depthB ; [#uses=1]
- %136 = fmul float %135, %126 ; [#uses=1]
- %137 = fmul float %132, %124 ; [#uses=1]
- %138 = fsub float %136, %137 ; [#uses=2]
- %139 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %140 = load float* %139, align 8 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %142 = load float* %141, align 8 ; [#uses=1]
- %143 = fmul float %140, %142 ; [#uses=2]
- %144 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %147 = load float* %146, align 4 ; [#uses=1]
- %148 = fmul float %145, %147 ; [#uses=2]
- %149 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %150 = load float* %149, align 8 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %152 = load float* %151, align 8 ; [#uses=1]
- %153 = fmul float %150, %152 ; [#uses=2]
- %154 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %155 = load float* %154, align 8 ; [#uses=1]
- %156 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %157 = load float* %156, align 8 ; [#uses=1]
- %158 = fmul float %155, %157 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %160 = load float* %159, align 4 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fmul float %160, %162 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %165 = load float* %164, align 8 ; [#uses=1]
- %166 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %167 = load float* %166, align 8 ; [#uses=1]
- %168 = fmul float %165, %167 ; [#uses=1]
- %169 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %170 = load float* %169, align 8 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %172 = load float* %171, align 8 ; [#uses=1]
- %173 = fmul float %170, %172 ; [#uses=1]
- %174 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %177 = load float* %176, align 4 ; [#uses=1]
- %178 = fmul float %175, %177 ; [#uses=1]
- %179 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %180 = load float* %179, align 8 ; [#uses=1]
- %181 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %182 = load float* %181, align 8 ; [#uses=1]
- %183 = fmul float %180, %182 ; [#uses=1]
- %184 = fmul float %143, %invMassA ; [#uses=1]
- %185 = fmul float %148, %invMassA ; [#uses=1]
- %186 = fmul float %153, %invMassA ; [#uses=1]
- %187 = fmul float %143, %invMassB ; [#uses=1]
- %188 = fmul float %148, %invMassB ; [#uses=1]
- %189 = fmul float %153, %invMassB ; [#uses=1]
- %190 = fadd float %158, %173 ; [#uses=1]
- %191 = fadd float %163, %178 ; [#uses=1]
- %192 = fadd float %168, %183 ; [#uses=1]
- %193 = fadd float %190, %184 ; [#uses=1]
- %194 = fadd float %191, %185 ; [#uses=1]
- %195 = fadd float %192, %186 ; [#uses=1]
- %196 = fadd float %193, %187 ; [#uses=1]
- %197 = fadd float %194, %188 ; [#uses=1]
- %198 = fadd float %195, %189 ; [#uses=1]
- %199 = fadd float %198, %197 ; [#uses=1]
- %200 = fadd float %199, %196 ; [#uses=3]
- %201 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 5 ; [#uses=1]
- %202 = load float* %201, align 8 ; [#uses=2]
- %203 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 5 ; [#uses=1]
- %204 = load float* %203, align 8 ; [#uses=2]
- %205 = fmul float %202, %204 ; [#uses=1]
- %206 = fmul float %200, %200 ; [#uses=1]
- %207 = fsub float %205, %206 ; [#uses=1]
- %208 = fdiv float 1.000000e+00, %207 ; [#uses=4]
- %209 = fmul float %202, %134 ; [#uses=1]
- %210 = fmul float %209, %208 ; [#uses=1]
- %211 = fsub float -0.000000e+00, %200 ; [#uses=2]
- %212 = fmul float %138, %211 ; [#uses=1]
- %213 = fmul float %212, %208 ; [#uses=1]
- %214 = fadd float %210, %213 ; [#uses=1]
- store float %214, float* %imp0, align 4
- %215 = fmul float %204, %138 ; [#uses=1]
- %216 = fmul float %215, %208 ; [#uses=1]
- %217 = fmul float %134, %211 ; [#uses=1]
- %218 = fmul float %217, %208 ; [#uses=1]
- %219 = fadd float %216, %218 ; [#uses=1]
- store float %219, float* %imp1, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN24btSolve2LinearConstraint30resolveBilateralPairConstraintEP11btRigidBodyS1_RK11btMatrix3x3S4_RK9btVector3fS7_S7_S7_S7_fS7_S7_S7_fS7_S7_S7_fS7_RfS8_(%struct.btSolve2LinearConstraint* nocapture %this, %struct.btRigidBody* nocapture %body1, %struct.btRigidBody* nocapture %body2, %struct.btMatrix3x3* nocapture %world2A, %struct.btMatrix3x3* nocapture %world2B, %struct.btQuadWord* nocapture %invInertiaADiag, float %invMassA, %struct.btQuadWord* nocapture %linvelA, %struct.btQuadWord* nocapture %angvelA, %struct.btQuadWord* nocapture %rel_posA1, %struct.btQuadWord* nocapture %invInertiaBDiag, float %invMassB, %struct.btQuadWord* nocapture %linvelB, %struct.btQuadWord* nocapture %angvelB, %struct.btQuadWord* nocapture %rel_posA2, float %depthA, %struct.btQuadWord* nocapture %normalA, %struct.btQuadWord* nocapture %rel_posB1, %struct.btQuadWord* nocapture %rel_posB2, float %depthB, %struct.btQuadWord* nocapture %normalB, float* nocapture %imp0, float* nocapture %imp1) nounwind align 2 {
-entry:
- %jacA = alloca %struct.btJacobianEntry, align 8 ; [#uses=11]
- %jacB = alloca %struct.btJacobianEntry, align 8 ; [#uses=11]
- store float 0.000000e+00, float* %imp0, align 4
- store float 0.000000e+00, float* %imp1, align 4
- %0 = getelementptr inbounds %struct.btQuadWord* %normalA, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fmul float %1, %1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %normalA, i32 0, i32 0, i32 1 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=2]
- %5 = fmul float %4, %4 ; [#uses=1]
- %6 = fadd float %2, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %normalA, i32 0, i32 0, i32 2 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = fadd float %6, %9 ; [#uses=1]
- %11 = call float @sqrtf(float %10) nounwind readonly ; [#uses=1]
- %12 = call float @fabsf(float %11) nounwind readnone ; [#uses=1]
- %13 = fadd float %12, -1.000000e+00 ; [#uses=1]
- %14 = call float @fabsf(float %13) nounwind readnone ; [#uses=1]
- %15 = fcmp ult float %14, 0x3E80000000000000 ; [#uses=1]
- br i1 %15, label %bb, label %return
-
-bb: ; preds = %entry
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %jacA, %struct.btMatrix3x3* %world2A, %struct.btMatrix3x3* %world2B, %struct.btQuadWord* %rel_posA1, %struct.btQuadWord* %rel_posA2, %struct.btQuadWord* %normalA, %struct.btQuadWord* %invInertiaADiag, float %invMassA, %struct.btQuadWord* %invInertiaBDiag, float %invMassB) nounwind
- call void @_ZN15btJacobianEntryC2ERK11btMatrix3x3S2_RK9btVector3S5_S5_S5_fS5_f(%struct.btJacobianEntry* %jacB, %struct.btMatrix3x3* %world2A, %struct.btMatrix3x3* %world2B, %struct.btQuadWord* %rel_posB1, %struct.btQuadWord* %rel_posB2, %struct.btQuadWord* %normalB, %struct.btQuadWord* %invInertiaADiag, float %invMassA, %struct.btQuadWord* %invInertiaBDiag, float %invMassB) nounwind
- %16 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btQuadWord* %rel_posA1, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=4]
- %20 = fmul float %17, %19 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=4]
- %23 = getelementptr inbounds %struct.btQuadWord* %rel_posA1, i32 0, i32 0, i32 0 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=4]
- %25 = fmul float %22, %24 ; [#uses=1]
- %26 = fsub float %20, %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=4]
- %29 = fmul float %28, %24 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %rel_posA1, i32 0, i32 0, i32 2 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=4]
- %32 = fmul float %17, %31 ; [#uses=1]
- %33 = fsub float %29, %32 ; [#uses=1]
- %34 = fmul float %22, %31 ; [#uses=1]
- %35 = fmul float %28, %19 ; [#uses=1]
- %36 = fsub float %34, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = fadd float %38, %26 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=2]
- %42 = fadd float %41, %33 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btRigidBody* %body2, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=2]
- %45 = fadd float %44, %36 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=4]
- %48 = fmul float %47, %19 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=4]
- %51 = fmul float %50, %24 ; [#uses=1]
- %52 = fsub float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=4]
- %55 = fmul float %54, %24 ; [#uses=1]
- %56 = fmul float %47, %31 ; [#uses=1]
- %57 = fsub float %55, %56 ; [#uses=1]
- %58 = fmul float %50, %31 ; [#uses=1]
- %59 = fmul float %54, %19 ; [#uses=1]
- %60 = fsub float %58, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=2]
- %63 = fadd float %62, %52 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=2]
- %66 = fadd float %65, %57 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=2]
- %69 = fadd float %68, %60 ; [#uses=1]
- %70 = fsub float %63, %39 ; [#uses=1]
- %71 = fsub float %66, %42 ; [#uses=1]
- %72 = fsub float %69, %45 ; [#uses=1]
- %73 = load float* %0, align 4 ; [#uses=1]
- %74 = fmul float %73, %72 ; [#uses=1]
- %75 = load float* %3, align 4 ; [#uses=1]
- %76 = fmul float %75, %71 ; [#uses=1]
- %77 = fadd float %74, %76 ; [#uses=1]
- %78 = load float* %7, align 4 ; [#uses=1]
- %79 = fmul float %78, %70 ; [#uses=1]
- %80 = fadd float %77, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btQuadWord* %rel_posB1, i32 0, i32 0, i32 1 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=4]
- %83 = fmul float %17, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %rel_posB1, i32 0, i32 0, i32 0 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=4]
- %86 = fmul float %22, %85 ; [#uses=1]
- %87 = fsub float %83, %86 ; [#uses=1]
- %88 = fmul float %28, %85 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btQuadWord* %rel_posB1, i32 0, i32 0, i32 2 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=4]
- %91 = fmul float %17, %90 ; [#uses=1]
- %92 = fsub float %88, %91 ; [#uses=1]
- %93 = fmul float %22, %90 ; [#uses=1]
- %94 = fmul float %28, %82 ; [#uses=1]
- %95 = fsub float %93, %94 ; [#uses=1]
- %96 = fadd float %38, %87 ; [#uses=1]
- %97 = fadd float %41, %92 ; [#uses=1]
- %98 = fadd float %44, %95 ; [#uses=1]
- %99 = fmul float %47, %82 ; [#uses=1]
- %100 = fmul float %50, %85 ; [#uses=1]
- %101 = fsub float %99, %100 ; [#uses=1]
- %102 = fmul float %54, %85 ; [#uses=1]
- %103 = fmul float %47, %90 ; [#uses=1]
- %104 = fsub float %102, %103 ; [#uses=1]
- %105 = fmul float %50, %90 ; [#uses=1]
- %106 = fmul float %54, %82 ; [#uses=1]
- %107 = fsub float %105, %106 ; [#uses=1]
- %108 = fadd float %62, %101 ; [#uses=1]
- %109 = fadd float %65, %104 ; [#uses=1]
- %110 = fadd float %68, %107 ; [#uses=1]
- %111 = fsub float %108, %96 ; [#uses=1]
- %112 = fsub float %109, %97 ; [#uses=1]
- %113 = fsub float %110, %98 ; [#uses=1]
- %114 = getelementptr inbounds %struct.btQuadWord* %normalB, i32 0, i32 0, i32 0 ; [#uses=1]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = fmul float %115, %113 ; [#uses=1]
- %117 = getelementptr inbounds %struct.btQuadWord* %normalB, i32 0, i32 0, i32 1 ; [#uses=1]
- %118 = load float* %117, align 4 ; [#uses=1]
- %119 = fmul float %118, %112 ; [#uses=1]
- %120 = fadd float %116, %119 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btQuadWord* %normalB, i32 0, i32 0, i32 2 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- %123 = fmul float %122, %111 ; [#uses=1]
- %124 = fadd float %120, %123 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btSolve2LinearConstraint* %this, i32 0, i32 0 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=2]
- %127 = fmul float %126, %depthA ; [#uses=1]
- %128 = getelementptr inbounds %struct.btSolve2LinearConstraint* %this, i32 0, i32 1 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=2]
- %130 = fmul float %129, %80 ; [#uses=1]
- %131 = fsub float %127, %130 ; [#uses=4]
- %132 = fmul float %126, %depthB ; [#uses=1]
- %133 = fmul float %129, %124 ; [#uses=1]
- %134 = fsub float %132, %133 ; [#uses=3]
- %135 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %136 = load float* %135, align 8 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %138 = load float* %137, align 8 ; [#uses=1]
- %139 = fmul float %136, %138 ; [#uses=2]
- %140 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %143 = load float* %142, align 4 ; [#uses=1]
- %144 = fmul float %141, %143 ; [#uses=2]
- %145 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %146 = load float* %145, align 8 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %148 = load float* %147, align 8 ; [#uses=1]
- %149 = fmul float %146, %148 ; [#uses=2]
- %150 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %151 = load float* %150, align 8 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %153 = load float* %152, align 8 ; [#uses=1]
- %154 = fmul float %151, %153 ; [#uses=1]
- %155 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %156 = load float* %155, align 4 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %158 = load float* %157, align 4 ; [#uses=1]
- %159 = fmul float %156, %158 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %161 = load float* %160, align 8 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %163 = load float* %162, align 8 ; [#uses=1]
- %164 = fmul float %161, %163 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %166 = load float* %165, align 8 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %168 = load float* %167, align 8 ; [#uses=1]
- %169 = fmul float %166, %168 ; [#uses=1]
- %170 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- %174 = fmul float %171, %173 ; [#uses=1]
- %175 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %176 = load float* %175, align 8 ; [#uses=1]
- %177 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %178 = load float* %177, align 8 ; [#uses=1]
- %179 = fmul float %176, %178 ; [#uses=1]
- %180 = fmul float %139, %invMassA ; [#uses=1]
- %181 = fmul float %144, %invMassA ; [#uses=1]
- %182 = fmul float %149, %invMassA ; [#uses=1]
- %183 = fmul float %139, %invMassB ; [#uses=1]
- %184 = fmul float %144, %invMassB ; [#uses=1]
- %185 = fmul float %149, %invMassB ; [#uses=1]
- %186 = fadd float %154, %169 ; [#uses=1]
- %187 = fadd float %159, %174 ; [#uses=1]
- %188 = fadd float %164, %179 ; [#uses=1]
- %189 = fadd float %186, %180 ; [#uses=1]
- %190 = fadd float %187, %181 ; [#uses=1]
- %191 = fadd float %188, %182 ; [#uses=1]
- %192 = fadd float %189, %183 ; [#uses=1]
- %193 = fadd float %190, %184 ; [#uses=1]
- %194 = fadd float %191, %185 ; [#uses=1]
- %195 = fadd float %194, %193 ; [#uses=1]
- %196 = fadd float %195, %192 ; [#uses=3]
- %197 = getelementptr inbounds %struct.btJacobianEntry* %jacA, i32 0, i32 5 ; [#uses=1]
- %198 = load float* %197, align 8 ; [#uses=4]
- %199 = getelementptr inbounds %struct.btJacobianEntry* %jacB, i32 0, i32 5 ; [#uses=1]
- %200 = load float* %199, align 8 ; [#uses=3]
- %201 = fmul float %198, %200 ; [#uses=1]
- %202 = fmul float %196, %196 ; [#uses=1]
- %203 = fsub float %201, %202 ; [#uses=1]
- %204 = fdiv float 1.000000e+00, %203 ; [#uses=4]
- %205 = fmul float %198, %131 ; [#uses=1]
- %206 = fmul float %205, %204 ; [#uses=1]
- %207 = fsub float -0.000000e+00, %196 ; [#uses=2]
- %208 = fmul float %134, %207 ; [#uses=1]
- %209 = fmul float %208, %204 ; [#uses=1]
- %210 = fadd float %206, %209 ; [#uses=1]
- store float %210, float* %imp0, align 4
- %211 = fmul float %200, %134 ; [#uses=1]
- %212 = fmul float %211, %204 ; [#uses=1]
- %213 = fmul float %131, %207 ; [#uses=1]
- %214 = fmul float %213, %204 ; [#uses=1]
- %215 = fadd float %212, %214 ; [#uses=2]
- store float %215, float* %imp1, align 4
- %216 = load float* %imp0, align 4 ; [#uses=1]
- %217 = fcmp ogt float %216, 0.000000e+00 ; [#uses=1]
- br i1 %217, label %bb1, label %bb4
-
-bb1: ; preds = %bb
- %218 = fcmp ule float %215, 0.000000e+00 ; [#uses=1]
- br i1 %218, label %bb2, label %return
-
-bb2: ; preds = %bb1
- store float 0.000000e+00, float* %imp1, align 4
- %219 = fdiv float %131, %198 ; [#uses=2]
- store float %219, float* %imp0, align 4
- %220 = fcmp ule float %219, 0.000000e+00 ; [#uses=1]
- br i1 %220, label %bb3, label %return
-
-bb3: ; preds = %bb2
- store float 0.000000e+00, float* %imp0, align 4
- ret void
-
-bb4: ; preds = %bb
- store float 0.000000e+00, float* %imp0, align 4
- %221 = fdiv float %134, %200 ; [#uses=2]
- store float %221, float* %imp1, align 4
- %222 = fcmp ugt float %221, 0.000000e+00 ; [#uses=1]
- br i1 %222, label %return, label %bb5
-
-bb5: ; preds = %bb4
- store float 0.000000e+00, float* %imp1, align 4
- %223 = fdiv float %131, %198 ; [#uses=2]
- store float %223, float* %imp0, align 4
- %224 = fcmp ule float %223, 0.000000e+00 ; [#uses=1]
- br i1 %224, label %bb6, label %return
-
-bb6: ; preds = %bb5
- store float 0.000000e+00, float* %imp0, align 4
- ret void
-
-return: ; preds = %bb5, %bb4, %bb2, %bb1, %entry
- ret void
-}
-
-; [#uses=6]
-define void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* nocapture %this, i32 %type, %struct.btRigidBody* %rbA) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 %type, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btTypedConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 -1, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btRigidBody* %rbA, %struct.btRigidBody** %5, align 4
- %6 = tail call %struct.btRigidBody* @_ZN17btTypedConstraint12getFixedBodyEv() ; [#uses=0]
- %7 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, %struct.btRigidBody** %7, align 4
- %8 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %9, align 4
- ret void
-}
-
-; [#uses=11]
-define void @_ZN17btTypedConstraintC2E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* nocapture %this, i32 %type, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 %type, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btTypedConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 -1, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btRigidBody* %rbA, %struct.btRigidBody** %5, align 4
- %6 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btRigidBody* %rbB, %struct.btRigidBody** %6, align 4
- %7 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %8, align 4
- ret void
-}
-
-; [#uses=6]
-define i8* @_ZNK17btTypedConstraint9serializeEPvP12btSerializer(%struct.btTypedConstraint* %this, i8* nocapture %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=5]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 7 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 5 ; [#uses=3]
- %5 = load %struct.btRigidBody** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %3 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %7 = bitcast %struct.btRigidBody* %5 to i8* ; [#uses=1]
- %8 = tail call i8* %6(%struct.btActionInterface* %serializer, i8* %7) ; [#uses=1]
- %9 = bitcast i8* %8 to %struct.btRigidBodyFloatData* ; [#uses=1]
- %10 = bitcast i8* %dataBuffer to %struct.btRigidBodyFloatData** ; [#uses=1]
- store %struct.btRigidBodyFloatData* %9, %struct.btRigidBodyFloatData** %10, align 4
- %11 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 7 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 6 ; [#uses=3]
- %15 = load %struct.btRigidBody** %14, align 4 ; [#uses=1]
- %16 = bitcast i32 (...)* %13 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %17 = bitcast %struct.btRigidBody* %15 to i8* ; [#uses=1]
- %18 = tail call i8* %16(%struct.btActionInterface* %serializer, i8* %17) ; [#uses=1]
- %19 = bitcast i8* %18 to %struct.btRigidBodyFloatData* ; [#uses=1]
- %20 = getelementptr inbounds i8* %dataBuffer, i32 4 ; [#uses=1]
- %21 = bitcast i8* %20 to %struct.btRigidBodyFloatData** ; [#uses=1]
- store %struct.btRigidBodyFloatData* %19, %struct.btRigidBodyFloatData** %21, align 4
- %22 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 10 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %24 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %26 = bitcast %struct.btTypedConstraint* %this to i8* ; [#uses=1]
- %27 = tail call i8* %25(%struct.btActionInterface* %serializer, i8* %26) ; [#uses=2]
- %28 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 7 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to i8* (%struct.btActionInterface*, i8*)* ; [#uses=1]
- %32 = tail call i8* %31(%struct.btActionInterface* %serializer, i8* %27) ; [#uses=2]
- %33 = getelementptr inbounds i8* %dataBuffer, i32 8 ; [#uses=1]
- %34 = bitcast i8* %33 to i8** ; [#uses=1]
- store i8* %32, i8** %34, align 4
- %35 = icmp eq i8* %32, null ; [#uses=1]
- br i1 %35, label %bb1, label %bb
-
-bb: ; preds = %entry
- %36 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 12 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = bitcast i32 (...)* %38 to void (%struct.btActionInterface*, i8*)* ; [#uses=1]
- tail call void %39(%struct.btActionInterface* %serializer, i8* %27)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %40 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i8* %dataBuffer, i32 12 ; [#uses=1]
- %43 = bitcast i8* %42 to i32* ; [#uses=1]
- store i32 %41, i32* %43, align 4
- %44 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 4 ; [#uses=1]
- %45 = load i8* %44, align 4 ; [#uses=1]
- %46 = zext i8 %45 to i32 ; [#uses=1]
- %47 = getelementptr inbounds i8* %dataBuffer, i32 24 ; [#uses=1]
- %48 = bitcast i8* %47 to i32* ; [#uses=1]
- store i32 %46, i32* %48, align 4
- %49 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- %50 = load i32* %49, align 4 ; [#uses=1]
- %51 = getelementptr inbounds i8* %dataBuffer, i32 20 ; [#uses=1]
- %52 = bitcast i8* %51 to i32* ; [#uses=1]
- store i32 %50, i32* %52, align 4
- %53 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 2 ; [#uses=1]
- %54 = load i32* %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds i8* %dataBuffer, i32 16 ; [#uses=1]
- %56 = bitcast i8* %55 to i32* ; [#uses=1]
- store i32 %54, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 7 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i8* %dataBuffer, i32 28 ; [#uses=1]
- %60 = bitcast i8* %59 to float* ; [#uses=1]
- store float %58, float* %60, align 4
- %61 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 8 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds i8* %dataBuffer, i32 32 ; [#uses=1]
- %64 = bitcast i8* %63 to float* ; [#uses=1]
- store float %62, float* %64, align 4
- %65 = getelementptr inbounds i8* %dataBuffer, i32 36 ; [#uses=1]
- %66 = bitcast i8* %65 to i32* ; [#uses=3]
- store i32 0, i32* %66, align 4
- %67 = load %struct.btRigidBody** %4, align 4 ; [#uses=2]
- %68 = getelementptr inbounds %struct.btRigidBody* %67, i32 0, i32 21, i32 1 ; [#uses=1]
- %69 = load i32* %68, align 4 ; [#uses=1]
- %70 = icmp sgt i32 %69, 0 ; [#uses=1]
- br i1 %70, label %bb2, label %bb12.preheader
-
-bb2: ; preds = %bb4, %bb1
- %71 = phi %struct.btRigidBody* [ %76, %bb4 ], [ %67, %bb1 ] ; [#uses=1]
- %i.017 = phi i32 [ %tmp20, %bb4 ], [ 0, %bb1 ] ; [#uses=2]
- %tmp20 = add i32 %i.017, 1 ; [#uses=2]
- %72 = getelementptr inbounds %struct.btRigidBody* %71, i32 0, i32 21, i32 3 ; [#uses=1]
- %73 = load %struct.btTypedConstraint*** %72, align 4 ; [#uses=1]
- %scevgep19 = getelementptr %struct.btTypedConstraint** %73, i32 %i.017 ; [#uses=1]
- %74 = load %struct.btTypedConstraint** %scevgep19, align 4 ; [#uses=1]
- %75 = icmp eq %struct.btTypedConstraint* %74, %this ; [#uses=1]
- br i1 %75, label %bb3, label %bb4
-
-bb3: ; preds = %bb2
- store i32 1, i32* %66, align 4
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %76 = load %struct.btRigidBody** %4, align 4 ; [#uses=2]
- %77 = getelementptr inbounds %struct.btRigidBody* %76, i32 0, i32 21, i32 1 ; [#uses=1]
- %78 = load i32* %77, align 4 ; [#uses=1]
- %79 = icmp sgt i32 %78, %tmp20 ; [#uses=1]
- br i1 %79, label %bb2, label %bb12.preheader
-
-bb12.preheader: ; preds = %bb4, %bb1
- %80 = load %struct.btRigidBody** %14, align 4 ; [#uses=2]
- %81 = getelementptr inbounds %struct.btRigidBody* %80, i32 0, i32 21, i32 1 ; [#uses=1]
- %82 = load i32* %81, align 4 ; [#uses=1]
- %83 = icmp sgt i32 %82, 0 ; [#uses=1]
- br i1 %83, label %bb8, label %bb14
-
-bb8: ; preds = %bb11, %bb12.preheader
- %84 = phi %struct.btRigidBody* [ %89, %bb11 ], [ %80, %bb12.preheader ] ; [#uses=1]
- %i.116 = phi i32 [ %tmp, %bb11 ], [ 0, %bb12.preheader ] ; [#uses=2]
- %tmp = add i32 %i.116, 1 ; [#uses=2]
- %85 = getelementptr inbounds %struct.btRigidBody* %84, i32 0, i32 21, i32 3 ; [#uses=1]
- %86 = load %struct.btTypedConstraint*** %85, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btTypedConstraint** %86, i32 %i.116 ; [#uses=1]
- %87 = load %struct.btTypedConstraint** %scevgep, align 4 ; [#uses=1]
- %88 = icmp eq %struct.btTypedConstraint* %87, %this ; [#uses=1]
- br i1 %88, label %bb10, label %bb11
-
-bb10: ; preds = %bb8
- store i32 1, i32* %66, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb8
- %89 = load %struct.btRigidBody** %14, align 4 ; [#uses=2]
- %90 = getelementptr inbounds %struct.btRigidBody* %89, i32 0, i32 21, i32 1 ; [#uses=1]
- %91 = load i32* %90, align 4 ; [#uses=1]
- %92 = icmp sgt i32 %91, %tmp ; [#uses=1]
- br i1 %92, label %bb8, label %bb14
-
-bb14: ; preds = %bb11, %bb12.preheader
- ret i8* getelementptr inbounds ([22 x i8]* @.str1021, i32 0, i32 0)
-}
-
-; [#uses=0]
-define void @_ZN17btTypedConstraintC1E21btTypedConstraintTypeR11btRigidBodyS2_(%struct.btTypedConstraint* nocapture %this, i32 %type, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 %type, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btTypedConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 -1, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btRigidBody* %rbA, %struct.btRigidBody** %5, align 4
- %6 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btRigidBody* %rbB, %struct.btRigidBody** %6, align 4
- %7 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %8, align 4
- ret void
-}
-
-; [#uses=5]
-define float @_ZN17btTypedConstraint14getMotorFactorEfffff(%struct.btTypedConstraint* nocapture %this, float %pos, float %lowLim, float %uppLim, float %vel, float %timeFact) nounwind readnone align 2 {
-entry:
- %0 = fcmp ogt float %lowLim, %uppLim ; [#uses=1]
- br i1 %0, label %bb19, label %bb1
-
-bb1: ; preds = %entry
- %1 = fcmp oeq float %lowLim, %uppLim ; [#uses=1]
- br i1 %1, label %bb19, label %bb3
-
-bb3: ; preds = %bb1
- %2 = fdiv float %vel, %timeFact ; [#uses=6]
- %3 = fcmp olt float %2, 0.000000e+00 ; [#uses=1]
- br i1 %3, label %bb4, label %bb10
-
-bb4: ; preds = %bb3
- %4 = fcmp ult float %pos, %lowLim ; [#uses=1]
- br i1 %4, label %bb7, label %bb5
-
-bb5: ; preds = %bb4
- %5 = fsub float %lowLim, %2 ; [#uses=1]
- %6 = fcmp ule float %5, %pos ; [#uses=1]
- br i1 %6, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %7 = fsub float %lowLim, %pos ; [#uses=1]
- %8 = fdiv float %7, %2 ; [#uses=1]
- ret float %8
-
-bb7: ; preds = %bb5, %bb4
- %9 = fcmp olt float %pos, %lowLim ; [#uses=1]
- %retval = select i1 %9, float 0.000000e+00, float 1.000000e+00 ; [#uses=1]
- ret float %retval
-
-bb10: ; preds = %bb3
- %10 = fcmp ogt float %2, 0.000000e+00 ; [#uses=1]
- br i1 %10, label %bb11, label %bb19
-
-bb11: ; preds = %bb10
- %11 = fcmp ugt float %pos, %uppLim ; [#uses=1]
- br i1 %11, label %bb14, label %bb12
-
-bb12: ; preds = %bb11
- %12 = fsub float %uppLim, %2 ; [#uses=1]
- %13 = fcmp uge float %12, %pos ; [#uses=1]
- br i1 %13, label %bb14, label %bb13
-
-bb13: ; preds = %bb12
- %14 = fsub float %uppLim, %pos ; [#uses=1]
- %15 = fdiv float %14, %2 ; [#uses=1]
- ret float %15
-
-bb14: ; preds = %bb12, %bb11
- %16 = fcmp ogt float %pos, %uppLim ; [#uses=1]
- %retval21 = select i1 %16, float 0.000000e+00, float 1.000000e+00 ; [#uses=1]
- ret float %retval21
-
-bb19: ; preds = %bb10, %bb1, %entry
- %.0 = phi float [ 1.000000e+00, %entry ], [ 0.000000e+00, %bb1 ], [ 0.000000e+00, %bb10 ] ; [#uses=1]
- ret float %.0
-}
-
-; [#uses=4]
-define %struct.btRigidBody* @_ZN17btTypedConstraint12getFixedBodyEv() align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = load i8* bitcast (i64* @_ZGVZN17btTypedConstraint12getFixedBodyEvE7s_fixed to i8*), align 8 ; [#uses=1]
- %3 = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %bb9
-
-bb: ; preds = %entry
- %4 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN17btTypedConstraint12getFixedBodyEvE7s_fixed) nounwind ; [#uses=1]
- %5 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %5, label %bb9, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- invoke void @_ZN11btRigidBodyC1EfP13btMotionStateP16btCollisionShapeRK9btVector3(%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, float 0.000000e+00, %struct.btActionInterface* null, %struct.btCollisionShape* null, %struct.btQuadWord* %1)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb1
- call void @__cxa_guard_release(i64* @_ZGVZN17btTypedConstraint12getFixedBodyEvE7s_fixed) nounwind
- %10 = call i32 @__cxa_atexit(void (i8*)* @__tcf_016, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- br label %bb9
-
-bb9: ; preds = %invcont, %bb, %entry
- %11 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 8
- %12 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 8
- %14 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- call void @_ZN11btRigidBody12setMassPropsEfRK9btVector3(%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, float 0.000000e+00, %struct.btQuadWord* %0)
- ret %struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed
-
-lpad: ; preds = %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- call void @__cxa_guard_abort(i64* @_ZGVZN17btTypedConstraint12getFixedBodyEvE7s_fixed) nounwind
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define internal void @__tcf_016(i8* nocapture %unnamed_arg) {
-entry:
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV11btRigidBody, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 0, i32 0), align 32
- %0 = load %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4 ; [#uses=2]
- %1 = icmp eq %struct.btTypedConstraint** %0, null ; [#uses=1]
- br i1 %1, label %_ZN11btRigidBodyD1Ev.exit, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %entry
- %2 = load i8* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 4), align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %3 = bitcast %struct.btTypedConstraint** %0 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %3)
- to label %bb2.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4
- br label %_ZN11btRigidBodyD1Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 0))
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN11btRigidBodyD1Ev.exit: ; preds = %bb2.i.i.i.i, %entry
- store i8 1, i8* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 4), align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4
- store i32 0, i32* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 1), align 4
- store i32 0, i32* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 2), align 4
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, i32 0, i32 0))
- ret void
-}
-
-; [#uses=0]
-define void @_ZN17btTypedConstraintC1E21btTypedConstraintTypeR11btRigidBody(%struct.btTypedConstraint* nocapture %this, i32 %type, %struct.btRigidBody* %rbA) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 %type, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([13 x i32 (...)*]* @_ZTV17btTypedConstraint, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 3, i32 0 ; [#uses=1]
- store i32 -1, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 4 ; [#uses=1]
- store i8 0, i8* %4, align 4
- %5 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.btRigidBody* %rbA, %struct.btRigidBody** %5, align 4
- %6 = tail call %struct.btRigidBody* @_ZN17btTypedConstraint12getFixedBodyEv() ; [#uses=0]
- %7 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.btRigidBody* @_ZZN17btTypedConstraint12getFixedBodyEvE7s_fixed, %struct.btRigidBody** %7, align 4
- %8 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btTypedConstraint* %this, i32 0, i32 8 ; [#uses=1]
- store float 0x3FD3333340000000, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btUniversalConstraintC2ER11btRigidBodyS1_R9btVector3S3_S3_(%struct.btUniversalConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %anchor, %struct.btQuadWord* nocapture %axis1, %struct.btQuadWord* nocapture %axis2) align 2 {
-invcont3:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = call %struct.btTransform* @_ZN11btTransform11getIdentityEv() ; [#uses=0]
- %3 = call %struct.btTransform* @_ZN11btTransform11getIdentityEv() ; [#uses=0]
- %4 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btGeneric6DofConstraintC2ER11btRigidBodyS1_RK11btTransformS4_b(%struct.btGeneric6DofConstraint* %4, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, %struct.btTransform* @_ZZN11btTransform11getIdentityEvE17identityTransform, i8 zeroext 1)
- %5 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV21btUniversalConstraint, i32 0, i32 2), i32 (...)*** %5, align 4
- %6 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 0 ; [#uses=2]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 1 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 2 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %anchor, i32 0, i32 0, i32 3 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 0 ; [#uses=3]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 1 ; [#uses=3]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 2 ; [#uses=3]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 3 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 0 ; [#uses=3]
- %32 = load float* %31, align 4 ; [#uses=1]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 1 ; [#uses=3]
- %35 = load float* %34, align 4 ; [#uses=1]
- store float %35, float* %33, align 4
- %36 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 2 ; [#uses=3]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %axis2, i32 0, i32 0, i32 3 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- store float %41, float* %39, align 4
- %42 = load float* %19, align 4 ; [#uses=3]
- %43 = fmul float %42, %42 ; [#uses=1]
- %44 = load float* %22, align 4 ; [#uses=3]
- %45 = fmul float %44, %44 ; [#uses=1]
- %46 = fadd float %43, %45 ; [#uses=1]
- %47 = load float* %25, align 4 ; [#uses=3]
- %48 = fmul float %47, %47 ; [#uses=1]
- %49 = fadd float %46, %48 ; [#uses=1]
- %50 = call float @sqrtf(float %49) nounwind readonly ; [#uses=1]
- %51 = fdiv float 1.000000e+00, %50 ; [#uses=3]
- %52 = fmul float %42, %51 ; [#uses=9]
- store float %52, float* %19, align 4
- %53 = fmul float %44, %51 ; [#uses=9]
- store float %53, float* %22, align 4
- %54 = fmul float %47, %51 ; [#uses=9]
- store float %54, float* %25, align 4
- %55 = load float* %31, align 4 ; [#uses=3]
- %56 = fmul float %55, %55 ; [#uses=1]
- %57 = load float* %34, align 4 ; [#uses=3]
- %58 = fmul float %57, %57 ; [#uses=1]
- %59 = fadd float %56, %58 ; [#uses=1]
- %60 = load float* %37, align 4 ; [#uses=3]
- %61 = fmul float %60, %60 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=1]
- %63 = call float @sqrtf(float %62) nounwind readonly ; [#uses=1]
- %64 = fdiv float 1.000000e+00, %63 ; [#uses=3]
- %65 = fmul float %55, %64 ; [#uses=9]
- store float %65, float* %31, align 4
- %66 = fmul float %57, %64 ; [#uses=9]
- store float %66, float* %34, align 4
- %67 = fmul float %60, %64 ; [#uses=9]
- store float %67, float* %37, align 4
- %68 = fmul float %65, %53 ; [#uses=1]
- %69 = fmul float %66, %52 ; [#uses=1]
- %70 = fsub float %68, %69 ; [#uses=6]
- %71 = fmul float %67, %52 ; [#uses=1]
- %72 = fmul float %65, %54 ; [#uses=1]
- %73 = fsub float %71, %72 ; [#uses=6]
- %74 = fmul float %66, %54 ; [#uses=1]
- %75 = fmul float %67, %53 ; [#uses=1]
- %76 = fsub float %74, %75 ; [#uses=6]
- %77 = load float* %7, align 4 ; [#uses=6]
- %78 = load float* %10, align 4 ; [#uses=6]
- %79 = load float* %13, align 4 ; [#uses=6]
- %80 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=5]
- %90 = load float* %87, align 4 ; [#uses=5]
- %91 = load float* %86, align 4 ; [#uses=5]
- %92 = load float* %85, align 4 ; [#uses=5]
- %93 = load float* %84, align 4 ; [#uses=5]
- %94 = load float* %83, align 4 ; [#uses=5]
- %95 = load float* %82, align 4 ; [#uses=5]
- %96 = load float* %81, align 4 ; [#uses=5]
- %97 = load float* %80, align 4 ; [#uses=5]
- %98 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fsub float -0.000000e+00, %99 ; [#uses=3]
- %101 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fsub float -0.000000e+00, %102 ; [#uses=3]
- %104 = getelementptr inbounds %struct.btRigidBody* %rbA, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fsub float -0.000000e+00, %105 ; [#uses=3]
- %107 = fmul float %90, %78 ; [#uses=1]
- %108 = fmul float %89, %77 ; [#uses=1]
- %109 = fmul float %93, %78 ; [#uses=1]
- %110 = fmul float %92, %77 ; [#uses=1]
- %111 = fmul float %96, %78 ; [#uses=1]
- %112 = fmul float %95, %77 ; [#uses=1]
- %113 = fmul float %95, %106 ; [#uses=1]
- %114 = fmul float %96, %103 ; [#uses=1]
- %115 = fmul float %92, %106 ; [#uses=1]
- %116 = fmul float %93, %103 ; [#uses=1]
- %117 = fmul float %89, %106 ; [#uses=1]
- %118 = fmul float %90, %103 ; [#uses=1]
- %119 = fmul float %73, %90 ; [#uses=1]
- %120 = fmul float %76, %89 ; [#uses=1]
- %121 = fmul float %66, %90 ; [#uses=1]
- %122 = fmul float %65, %89 ; [#uses=1]
- %123 = fmul float %53, %90 ; [#uses=1]
- %124 = fmul float %52, %89 ; [#uses=1]
- %125 = fmul float %73, %93 ; [#uses=1]
- %126 = fmul float %76, %92 ; [#uses=1]
- %127 = fmul float %66, %93 ; [#uses=1]
- %128 = fmul float %65, %92 ; [#uses=1]
- %129 = fmul float %53, %93 ; [#uses=1]
- %130 = fmul float %52, %92 ; [#uses=1]
- %131 = fmul float %73, %96 ; [#uses=1]
- %132 = fmul float %76, %95 ; [#uses=1]
- %133 = fmul float %66, %96 ; [#uses=1]
- %134 = fmul float %65, %95 ; [#uses=1]
- %135 = fmul float %53, %96 ; [#uses=1]
- %136 = fmul float %52, %95 ; [#uses=1]
- %137 = fmul float %91, %79 ; [#uses=1]
- %138 = fadd float %108, %107 ; [#uses=1]
- %139 = fmul float %94, %79 ; [#uses=1]
- %140 = fadd float %110, %109 ; [#uses=1]
- %141 = fmul float %97, %79 ; [#uses=1]
- %142 = fadd float %112, %111 ; [#uses=1]
- %143 = fadd float %113, %114 ; [#uses=1]
- %144 = fmul float %97, %100 ; [#uses=1]
- %145 = fadd float %115, %116 ; [#uses=1]
- %146 = fmul float %94, %100 ; [#uses=1]
- %147 = fadd float %117, %118 ; [#uses=1]
- %148 = fmul float %91, %100 ; [#uses=1]
- %149 = fmul float %70, %91 ; [#uses=1]
- %150 = fadd float %120, %119 ; [#uses=1]
- %151 = fmul float %67, %91 ; [#uses=1]
- %152 = fadd float %122, %121 ; [#uses=1]
- %153 = fmul float %54, %91 ; [#uses=1]
- %154 = fadd float %124, %123 ; [#uses=1]
- %155 = fmul float %70, %94 ; [#uses=1]
- %156 = fadd float %126, %125 ; [#uses=1]
- %157 = fmul float %67, %94 ; [#uses=1]
- %158 = fadd float %128, %127 ; [#uses=1]
- %159 = fmul float %54, %94 ; [#uses=1]
- %160 = fadd float %130, %129 ; [#uses=1]
- %161 = fmul float %70, %97 ; [#uses=1]
- %162 = fadd float %132, %131 ; [#uses=1]
- %163 = fmul float %67, %97 ; [#uses=1]
- %164 = fadd float %134, %133 ; [#uses=1]
- %165 = fmul float %54, %97 ; [#uses=1]
- %166 = fadd float %136, %135 ; [#uses=1]
- %167 = fadd float %138, %137 ; [#uses=1]
- %168 = fadd float %140, %139 ; [#uses=1]
- %169 = fadd float %142, %141 ; [#uses=1]
- %170 = fadd float %143, %144 ; [#uses=1]
- %171 = fadd float %145, %146 ; [#uses=1]
- %172 = fadd float %147, %148 ; [#uses=1]
- %173 = fadd float %150, %149 ; [#uses=1]
- %174 = fadd float %152, %151 ; [#uses=1]
- %175 = fadd float %154, %153 ; [#uses=1]
- %176 = fadd float %156, %155 ; [#uses=1]
- %177 = fadd float %158, %157 ; [#uses=1]
- %178 = fadd float %160, %159 ; [#uses=1]
- %179 = fadd float %162, %161 ; [#uses=1]
- %180 = fadd float %164, %163 ; [#uses=1]
- %181 = fadd float %166, %165 ; [#uses=1]
- %182 = fadd float %167, %172 ; [#uses=1]
- %183 = fadd float %168, %171 ; [#uses=1]
- %184 = fadd float %169, %170 ; [#uses=1]
- %185 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %173, float* %185, align 4
- %186 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %174, float* %186, align 4
- %187 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %175, float* %187, align 4
- %188 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %188, align 4
- %189 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %176, float* %189, align 4
- %190 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %177, float* %190, align 4
- %191 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %178, float* %191, align 4
- %192 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %192, align 4
- %193 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %179, float* %193, align 4
- %194 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %180, float* %194, align 4
- %195 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %181, float* %195, align 4
- %196 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %196, align 4
- %197 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %182, float* %197, align 4
- %198 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %183, float* %198, align 4
- %199 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %184, float* %199, align 4
- %200 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %200, align 4
- %201 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %202 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %207 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=5]
- %211 = load float* %208, align 4 ; [#uses=5]
- %212 = load float* %207, align 4 ; [#uses=5]
- %213 = load float* %206, align 4 ; [#uses=5]
- %214 = load float* %205, align 4 ; [#uses=5]
- %215 = load float* %204, align 4 ; [#uses=5]
- %216 = load float* %203, align 4 ; [#uses=5]
- %217 = load float* %202, align 4 ; [#uses=5]
- %218 = load float* %201, align 4 ; [#uses=5]
- %219 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=1]
- %221 = fsub float -0.000000e+00, %220 ; [#uses=3]
- %222 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %223 = load float* %222, align 4 ; [#uses=1]
- %224 = fsub float -0.000000e+00, %223 ; [#uses=3]
- %225 = getelementptr inbounds %struct.btRigidBody* %rbB, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %226 = load float* %225, align 4 ; [#uses=1]
- %227 = fsub float -0.000000e+00, %226 ; [#uses=3]
- %228 = fmul float %211, %78 ; [#uses=1]
- %229 = fmul float %210, %77 ; [#uses=1]
- %230 = fmul float %214, %78 ; [#uses=1]
- %231 = fmul float %213, %77 ; [#uses=1]
- %232 = fmul float %217, %78 ; [#uses=1]
- %233 = fmul float %216, %77 ; [#uses=1]
- %234 = fmul float %216, %227 ; [#uses=1]
- %235 = fmul float %217, %224 ; [#uses=1]
- %236 = fmul float %213, %227 ; [#uses=1]
- %237 = fmul float %214, %224 ; [#uses=1]
- %238 = fmul float %210, %227 ; [#uses=1]
- %239 = fmul float %211, %224 ; [#uses=1]
- %240 = fmul float %73, %211 ; [#uses=1]
- %241 = fmul float %76, %210 ; [#uses=1]
- %242 = fmul float %66, %211 ; [#uses=1]
- %243 = fmul float %65, %210 ; [#uses=1]
- %244 = fmul float %53, %211 ; [#uses=1]
- %245 = fmul float %52, %210 ; [#uses=1]
- %246 = fmul float %73, %214 ; [#uses=1]
- %247 = fmul float %76, %213 ; [#uses=1]
- %248 = fmul float %66, %214 ; [#uses=1]
- %249 = fmul float %65, %213 ; [#uses=1]
- %250 = fmul float %53, %214 ; [#uses=1]
- %251 = fmul float %52, %213 ; [#uses=1]
- %252 = fmul float %73, %217 ; [#uses=1]
- %253 = fmul float %76, %216 ; [#uses=1]
- %254 = fmul float %66, %217 ; [#uses=1]
- %255 = fmul float %65, %216 ; [#uses=1]
- %256 = fmul float %53, %217 ; [#uses=1]
- %257 = fmul float %52, %216 ; [#uses=1]
- %258 = fmul float %212, %79 ; [#uses=1]
- %259 = fadd float %229, %228 ; [#uses=1]
- %260 = fmul float %215, %79 ; [#uses=1]
- %261 = fadd float %231, %230 ; [#uses=1]
- %262 = fmul float %218, %79 ; [#uses=1]
- %263 = fadd float %233, %232 ; [#uses=1]
- %264 = fadd float %234, %235 ; [#uses=1]
- %265 = fmul float %218, %221 ; [#uses=1]
- %266 = fadd float %236, %237 ; [#uses=1]
- %267 = fmul float %215, %221 ; [#uses=1]
- %268 = fadd float %238, %239 ; [#uses=1]
- %269 = fmul float %212, %221 ; [#uses=1]
- %270 = fmul float %70, %212 ; [#uses=1]
- %271 = fadd float %241, %240 ; [#uses=1]
- %272 = fmul float %67, %212 ; [#uses=1]
- %273 = fadd float %243, %242 ; [#uses=1]
- %274 = fmul float %54, %212 ; [#uses=1]
- %275 = fadd float %245, %244 ; [#uses=1]
- %276 = fmul float %70, %215 ; [#uses=1]
- %277 = fadd float %247, %246 ; [#uses=1]
- %278 = fmul float %67, %215 ; [#uses=1]
- %279 = fadd float %249, %248 ; [#uses=1]
- %280 = fmul float %54, %215 ; [#uses=1]
- %281 = fadd float %251, %250 ; [#uses=1]
- %282 = fmul float %70, %218 ; [#uses=1]
- %283 = fadd float %253, %252 ; [#uses=1]
- %284 = fmul float %67, %218 ; [#uses=1]
- %285 = fadd float %255, %254 ; [#uses=1]
- %286 = fmul float %54, %218 ; [#uses=1]
- %287 = fadd float %257, %256 ; [#uses=1]
- %288 = fadd float %259, %258 ; [#uses=1]
- %289 = fadd float %261, %260 ; [#uses=1]
- %290 = fadd float %263, %262 ; [#uses=1]
- %291 = fadd float %264, %265 ; [#uses=1]
- %292 = fadd float %266, %267 ; [#uses=1]
- %293 = fadd float %268, %269 ; [#uses=1]
- %294 = fadd float %271, %270 ; [#uses=1]
- %295 = fadd float %273, %272 ; [#uses=1]
- %296 = fadd float %275, %274 ; [#uses=1]
- %297 = fadd float %277, %276 ; [#uses=1]
- %298 = fadd float %279, %278 ; [#uses=1]
- %299 = fadd float %281, %280 ; [#uses=1]
- %300 = fadd float %283, %282 ; [#uses=1]
- %301 = fadd float %285, %284 ; [#uses=1]
- %302 = fadd float %287, %286 ; [#uses=1]
- %303 = fadd float %288, %293 ; [#uses=1]
- %304 = fadd float %289, %292 ; [#uses=1]
- %305 = fadd float %290, %291 ; [#uses=1]
- %306 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %294, float* %306, align 4
- %307 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %295, float* %307, align 4
- %308 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %296, float* %308, align 4
- %309 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %309, align 4
- %310 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %297, float* %310, align 4
- %311 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %298, float* %311, align 4
- %312 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %299, float* %312, align 4
- %313 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %313, align 4
- %314 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %300, float* %314, align 4
- %315 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %301, float* %315, align 4
- %316 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %302, float* %316, align 4
- %317 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %317, align 4
- %318 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %303, float* %318, align 4
- %319 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %304, float* %319, align 4
- %320 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %305, float* %320, align 4
- %321 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %321, align 4
- %322 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 5, i32 0, i32 0, i32 0 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %324 = bitcast float* %322 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %324, i8 0, i64 32, i32 4, i1 false)
- store float 0.000000e+00, float* %323, align 8
- %325 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0xBFF8F905A0000000, float* %325, align 4
- %326 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0xC0090D8080000000, float* %326, align 8
- %327 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %327, align 4
- br label %bb.i9
-
-bb.i9: ; preds = %_Z16btNormalizeAnglef.exit.i14.bb.i9_crit_edge, %invcont3
- %328 = phi float [ 0.000000e+00, %invcont3 ], [ %.pre, %_Z16btNormalizeAnglef.exit.i14.bb.i9_crit_edge ] ; [#uses=1]
- %i.03.i7 = phi i32 [ 0, %invcont3 ], [ %335, %_Z16btNormalizeAnglef.exit.i14.bb.i9_crit_edge ] ; [#uses=2]
- %scevgep4.i8 = getelementptr %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 6, i32 %i.03.i7, i32 0 ; [#uses=1]
- %329 = call float @fmodf(float %328, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %330 = fcmp olt float %329, 0xC00921FB60000000 ; [#uses=1]
- br i1 %330, label %bb.i.i10, label %bb1.i.i11
-
-bb.i.i10: ; preds = %bb.i9
- %331 = fadd float %329, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i14
-
-bb1.i.i11: ; preds = %bb.i9
- %332 = fcmp ogt float %329, 0x400921FB60000000 ; [#uses=1]
- br i1 %332, label %bb2.i.i12, label %_Z16btNormalizeAnglef.exit.i14
-
-bb2.i.i12: ; preds = %bb1.i.i11
- %333 = fadd float %329, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i14
-
-_Z16btNormalizeAnglef.exit.i14: ; preds = %bb2.i.i12, %bb1.i.i11, %bb.i.i10
- %334 = phi float [ %333, %bb2.i.i12 ], [ %331, %bb.i.i10 ], [ %329, %bb1.i.i11 ] ; [#uses=1]
- store float %334, float* %scevgep4.i8, align 4
- %335 = add nsw i32 %i.03.i7, 1 ; [#uses=3]
- %exitcond109 = icmp eq i32 %335, 3 ; [#uses=1]
- br i1 %exitcond109, label %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit, label %_Z16btNormalizeAnglef.exit.i14.bb.i9_crit_edge
-
-_Z16btNormalizeAnglef.exit.i14.bb.i9_crit_edge: ; preds = %_Z16btNormalizeAnglef.exit.i14
- %scevgep5.i.phi.trans.insert = getelementptr %struct.btQuadWord* %1, i32 0, i32 0, i32 %335 ; [#uses=1]
- %.pre = load float* %scevgep5.i.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb.i9
-
-_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit: ; preds = %_Z16btNormalizeAnglef.exit.i14
- %336 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %336, align 8
- %337 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0x3FF8F905A0000000, float* %337, align 4
- %338 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x40090D8080000000, float* %338, align 8
- %339 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %339, align 4
- br label %bb.i
-
-bb.i: ; preds = %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge, %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit
- %340 = phi float [ 0.000000e+00, %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit ], [ %.pre112, %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge ] ; [#uses=1]
- %i.03.i = phi i32 [ 0, %_ZN23btGeneric6DofConstraint20setAngularLowerLimitERK9btVector3.exit ], [ %347, %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge ] ; [#uses=2]
- %scevgep.i = getelementptr %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 6, i32 %i.03.i, i32 1 ; [#uses=1]
- %341 = call float @fmodf(float %340, float 0x401921FB60000000) nounwind readonly ; [#uses=5]
- %342 = fcmp olt float %341, 0xC00921FB60000000 ; [#uses=1]
- br i1 %342, label %bb.i.i, label %bb1.i.i
-
-bb.i.i: ; preds = %bb.i
- %343 = fadd float %341, 0x401921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i
-
-bb1.i.i: ; preds = %bb.i
- %344 = fcmp ogt float %341, 0x400921FB60000000 ; [#uses=1]
- br i1 %344, label %bb2.i.i, label %_Z16btNormalizeAnglef.exit.i
-
-bb2.i.i: ; preds = %bb1.i.i
- %345 = fadd float %341, 0xC01921FB60000000 ; [#uses=1]
- br label %_Z16btNormalizeAnglef.exit.i
-
-_Z16btNormalizeAnglef.exit.i: ; preds = %bb2.i.i, %bb1.i.i, %bb.i.i
- %346 = phi float [ %345, %bb2.i.i ], [ %343, %bb.i.i ], [ %341, %bb1.i.i ] ; [#uses=1]
- store float %346, float* %scevgep.i, align 4
- %347 = add nsw i32 %i.03.i, 1 ; [#uses=3]
- %exitcond = icmp eq i32 %347, 3 ; [#uses=1]
- br i1 %exitcond, label %_ZN23btGeneric6DofConstraint20setAngularUpperLimitERK9btVector3.exit, label %_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge
-
-_Z16btNormalizeAnglef.exit.i.bb.i_crit_edge: ; preds = %_Z16btNormalizeAnglef.exit.i
- %scevgep4.i.phi.trans.insert = getelementptr %struct.btQuadWord* %0, i32 0, i32 0, i32 %347 ; [#uses=1]
- %.pre112 = load float* %scevgep4.i.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb.i
-
-_ZN23btGeneric6DofConstraint20setAngularUpperLimitERK9btVector3.exit: ; preds = %_Z16btNormalizeAnglef.exit.i
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btUniversalConstraintD0Ev(%struct.btUniversalConstraint* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btUniversalConstraint* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN21btUniversalConstraintD1Ev(%struct.btUniversalConstraint* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btUniversalConstraint* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([14 x i32 (...)*]* @_ZTV23btGeneric6DofConstraint, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btUniversalConstraintC1ER11btRigidBodyS1_R9btVector3S3_S3_(%struct.btUniversalConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* nocapture %anchor, %struct.btQuadWord* nocapture %axis1, %struct.btQuadWord* nocapture %axis2) align 2 {
-entry:
- tail call void @_ZN21btUniversalConstraintC2ER11btRigidBodyS1_R9btVector3S3_S3_(%struct.btUniversalConstraint* %this, %struct.btRigidBody* %rbA, %struct.btRigidBody* %rbB, %struct.btQuadWord* %anchor, %struct.btQuadWord* %axis1, %struct.btQuadWord* %axis2)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btContinuousDynamicsWorldC2EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btContinuousDynamicsWorld* %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btDiscreteDynamicsWorldC2EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btDiscreteDynamicsWorld* %0, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration)
- %1 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([46 x i32 (...)*]* @_ZTV25btContinuousDynamicsWorld, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btDiscreteDynamicsWorld11setNumTasksEi(%struct.btDiscreteDynamicsWorld* nocapture %this, i32 %numTasks) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK25btContinuousDynamicsWorld12getWorldTypeEv(%struct.btContinuousDynamicsWorld* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 3
-}
-
-; [#uses=1]
-define void @_ZN25btContinuousDynamicsWorld19updateTemporalAabbsEf(%struct.btContinuousDynamicsWorld* nocapture %this, float %timeStep) align 2 {
-entry:
- %temporalAabbMin = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %temporalAabbMax = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb16
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 0 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 0 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %temporalAabbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 5 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb13, %bb.nph
- %i.031 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb13 ] ; [#uses=2]
- %tmp = add i32 %i.031, 1 ; [#uses=2]
- %14 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %14, i32 %i.031 ; [#uses=1]
- %15 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=8]
- %16 = getelementptr inbounds %struct.btCollisionObject* %15, i32 0, i32 19 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %.lobit.i = and i32 %17, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %18 = icmp eq %struct.btCollisionObject* %15, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %18 ; [#uses=1]
- br i1 %or.cond, label %bb13, label %bb1
-
-bb1: ; preds = %bb
- %19 = getelementptr inbounds %struct.btCollisionObject* %15, i32 0, i32 9 ; [#uses=1]
- %20 = load %struct.btCollisionShape** %19, align 4 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btCollisionShape* %20, i32 0, i32 0 ; [#uses=1]
- %22 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 2 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btCollisionObject* %15, i32 0, i32 1 ; [#uses=1]
- %26 = bitcast i32 (...)* %24 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %26(%struct.btCollisionShape* %20, %struct.btTransform* %25, %struct.btQuadWord* %temporalAabbMin, %struct.btQuadWord* %temporalAabbMax)
- %27 = load float* %4, align 8 ; [#uses=2]
- %28 = load float* %5, align 4 ; [#uses=2]
- %29 = load float* %6, align 8 ; [#uses=2]
- %30 = load float* %7, align 8 ; [#uses=2]
- %31 = load float* %8, align 4 ; [#uses=2]
- %32 = load float* %9, align 8 ; [#uses=2]
- %33 = getelementptr inbounds %struct.btCollisionObject* %15, i32 1, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fmul float %34, %timeStep ; [#uses=3]
- %36 = getelementptr inbounds %struct.btCollisionObject* %15, i32 1, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fmul float %37, %timeStep ; [#uses=3]
- %39 = getelementptr inbounds %struct.btCollisionObject* %15, i32 1, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fmul float %40, %timeStep ; [#uses=3]
- %42 = fcmp ogt float %41, 0.000000e+00 ; [#uses=1]
- br i1 %42, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %43 = fadd float %41, %27 ; [#uses=1]
- br label %bb4
-
-bb3: ; preds = %bb1
- %44 = fadd float %41, %30 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %temporalAabbMinx.0 = phi float [ %30, %bb2 ], [ %44, %bb3 ] ; [#uses=1]
- %temporalAabbMaxx.0 = phi float [ %43, %bb2 ], [ %27, %bb3 ] ; [#uses=1]
- %45 = fcmp ogt float %38, 0.000000e+00 ; [#uses=1]
- br i1 %45, label %bb6, label %bb7
-
-bb6: ; preds = %bb4
- %46 = fadd float %38, %28 ; [#uses=1]
- br label %bb8
-
-bb7: ; preds = %bb4
- %47 = fadd float %38, %31 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb7, %bb6
- %temporalAabbMiny.0 = phi float [ %31, %bb6 ], [ %47, %bb7 ] ; [#uses=1]
- %temporalAabbMaxy.0 = phi float [ %46, %bb6 ], [ %28, %bb7 ] ; [#uses=1]
- %48 = fcmp ogt float %35, 0.000000e+00 ; [#uses=1]
- br i1 %48, label %bb10, label %bb11
-
-bb10: ; preds = %bb8
- %49 = fadd float %35, %29 ; [#uses=1]
- br label %bb12
-
-bb11: ; preds = %bb8
- %50 = fadd float %35, %32 ; [#uses=1]
- br label %bb12
-
-bb12: ; preds = %bb11, %bb10
- %temporalAabbMaxz.0 = phi float [ %49, %bb10 ], [ %29, %bb11 ] ; [#uses=1]
- %temporalAabbMinz.0 = phi float [ %32, %bb10 ], [ %50, %bb11 ] ; [#uses=1]
- store float %temporalAabbMinx.0, float* %7, align 8
- store float %temporalAabbMiny.0, float* %8, align 4
- store float %temporalAabbMinz.0, float* %9, align 8
- store float 0.000000e+00, float* %10, align 4
- store float 0.000000e+00, float* %11, align 4
- %51 = fadd float %temporalAabbMaxx.0, 0.000000e+00 ; [#uses=1]
- store float %51, float* %4, align 8
- %52 = fadd float %temporalAabbMaxy.0, 0.000000e+00 ; [#uses=1]
- store float %52, float* %5, align 4
- %53 = fadd float %temporalAabbMaxz.0, 0.000000e+00 ; [#uses=1]
- store float %53, float* %6, align 8
- %54 = load %struct.btActionInterface** %12, align 4 ; [#uses=2]
- %55 = getelementptr inbounds %struct.btActionInterface* %54, i32 0, i32 0 ; [#uses=1]
- %56 = load i32 (...)*** %55, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 4 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = load %struct.btActionInterface** %13, align 4 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btCollisionObject* %15, i32 0, i32 8 ; [#uses=1]
- %61 = load %struct.btBroadphaseProxy** %60, align 4 ; [#uses=1]
- %62 = bitcast i32 (...)* %58 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- call void %62(%struct.btActionInterface* %54, %struct.btBroadphaseProxy* %61, %struct.btQuadWord* %temporalAabbMin, %struct.btQuadWord* %temporalAabbMax, %struct.btActionInterface* %59)
- br label %bb13
-
-bb13: ; preds = %bb12, %bb
- %63 = load i32* %0, align 4 ; [#uses=1]
- %64 = icmp sgt i32 %63, %tmp ; [#uses=1]
- br i1 %64, label %bb, label %bb16
-
-bb16: ; preds = %bb13, %entry
- %65 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 5 ; [#uses=1]
- %66 = load %struct.btActionInterface** %65, align 4 ; [#uses=2]
- %67 = getelementptr inbounds %struct.btActionInterface* %66, i32 0, i32 0 ; [#uses=1]
- %68 = load i32 (...)*** %67, align 4 ; [#uses=1]
- %69 = getelementptr inbounds i32 (...)** %68, i32 8 ; [#uses=1]
- %70 = load i32 (...)** %69, align 4 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %72 = load %struct.btActionInterface** %71, align 4 ; [#uses=1]
- %73 = bitcast i32 (...)* %70 to void (%struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- call void %73(%struct.btActionInterface* %66, %struct.btActionInterface* %72)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btContinuousDynamicsWorld22calculateTimeOfImpactsEf(%struct.btContinuousDynamicsWorld* %this, float %timeStep) align 2 {
-entry:
- tail call void @_ZN25btContinuousDynamicsWorld19updateTemporalAabbsEf(%struct.btContinuousDynamicsWorld* %this, float %timeStep)
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 0 ; [#uses=1]
- store float %timeStep, float* %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 3 ; [#uses=1]
- store float 1.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %2, align 4
- %3 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 2 ; [#uses=2]
- store i32 2, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load %struct.btActionInterface** %4, align 4 ; [#uses=4]
- %6 = icmp eq %struct.btActionInterface* %5, null ; [#uses=1]
- br i1 %6, label %bb1, label %bb
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btActionInterface* %5, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 8 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 5 ; [#uses=1]
- %13 = load %struct.btActionInterface** %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btActionInterface* %13, i32 0, i32 0 ; [#uses=1]
- %15 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 9 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btActionInterface*)* ; [#uses=1]
- %19 = tail call %struct..0btMultiSapOverlapFilterCallback* %18(%struct.btActionInterface* %13) ; [#uses=1]
- %20 = bitcast i32 (...)* %11 to void (%struct.btActionInterface*, %struct..0btMultiSapOverlapFilterCallback*, %struct.btDispatcherInfo*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %20(%struct.btActionInterface* %5, %struct..0btMultiSapOverlapFilterCallback* %19, %struct.btDispatcherInfo* %7, %struct.btActionInterface* %5)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- store i32 1, i32* %3, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN23btDiscreteDynamicsWorld14updateVehiclesEf(%struct.btDiscreteDynamicsWorld* %this, float %timeStep) align 2 {
-entry:
- tail call void @_ZN23btDiscreteDynamicsWorld13updateActionsEf(%struct.btDiscreteDynamicsWorld* %this, float %timeStep)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btContinuousDynamicsWorld28internalSingleStepSimulationEf(%struct.btContinuousDynamicsWorld* %this, float %timeStep) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0 ; [#uses=7]
- tail call void @_ZN23btDiscreteDynamicsWorld14startProfilingEf(%struct.btDiscreteDynamicsWorld* %0, float %timeStep)
- %1 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %2 = load void (%struct.btDynamicsWorld*, float)** %1, align 4 ; [#uses=2]
- %3 = icmp eq void (%struct.btDynamicsWorld*, float)* %2, null ; [#uses=1]
- br i1 %3, label %bb1, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void %2(%struct.btDynamicsWorld* %4, float %timeStep)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %5 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=8]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 2 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %10 = bitcast i32 (...)* %8 to void (%struct.btCollisionWorld*)* ; [#uses=1]
- tail call void %10(%struct.btCollisionWorld* %9)
- %11 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 33 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to void (%struct.btDiscreteDynamicsWorld*, float)* ; [#uses=1]
- tail call void %14(%struct.btDiscreteDynamicsWorld* %0, float %timeStep)
- %15 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 0 ; [#uses=1]
- store float %timeStep, float* %15, align 4
- %16 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 4 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %19 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %21 = tail call %struct.btActionInterface* %20(%struct.btCollisionWorld* %9) ; [#uses=1]
- %22 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 5 ; [#uses=1]
- store %struct.btActionInterface* %21, %struct.btActionInterface** %22, align 4
- %23 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %24 = getelementptr inbounds i32 (...)** %23, i32 10 ; [#uses=1]
- %25 = load i32 (...)** %24, align 4 ; [#uses=1]
- %26 = bitcast i32 (...)* %25 to void (%struct.btCollisionWorld*)* ; [#uses=1]
- tail call void %26(%struct.btCollisionWorld* %9)
- %27 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 35 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to void (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- tail call void %30(%struct.btDiscreteDynamicsWorld* %0)
- %31 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float %timeStep, float* %31, align 4
- %32 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 36 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 4 ; [#uses=1]
- %36 = bitcast i32 (...)* %34 to void (%struct.btDiscreteDynamicsWorld*, %struct.btContactSolverInfo*)* ; [#uses=1]
- tail call void %36(%struct.btDiscreteDynamicsWorld* %0, %struct.btContactSolverInfo* %35)
- %37 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 43 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to void (%struct.btContinuousDynamicsWorld*, float)* ; [#uses=1]
- tail call void %40(%struct.btContinuousDynamicsWorld* %this, float %timeStep)
- %41 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 3, i32 3 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=3]
- %43 = fcmp olt float %42, 0.000000e+00 ; [#uses=1]
- br i1 %43, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %44 = fpext float %42 to double ; [#uses=1]
- %45 = tail call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([10 x i8]* @.str19, i32 0, i32 0), double %44) ; [#uses=0]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- %46 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %47 = getelementptr inbounds i32 (...)** %46, i32 34 ; [#uses=1]
- %48 = load i32 (...)** %47, align 4 ; [#uses=1]
- %49 = fmul float %42, %timeStep ; [#uses=1]
- %50 = bitcast i32 (...)* %48 to void (%struct.btDiscreteDynamicsWorld*, float)* ; [#uses=1]
- tail call void %50(%struct.btDiscreteDynamicsWorld* %0, float %49)
- tail call void @_ZN23btDiscreteDynamicsWorld13updateActionsEf(%struct.btDiscreteDynamicsWorld* %0, float %timeStep)
- tail call void @_ZN23btDiscreteDynamicsWorld21updateActivationStateEf(%struct.btDiscreteDynamicsWorld* %0, float %timeStep)
- %51 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %52 = load void (%struct.btDynamicsWorld*, float)** %51, align 4 ; [#uses=2]
- %53 = icmp eq void (%struct.btDynamicsWorld*, float)* %52, null ; [#uses=1]
- br i1 %53, label %return, label %bb4
-
-bb4: ; preds = %bb3
- %54 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void %52(%struct.btDynamicsWorld* %54, float %timeStep)
- ret void
-
-return: ; preds = %bb3
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btContinuousDynamicsWorldD0Ev(%struct.btContinuousDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([46 x i32 (...)*]* @_ZTV25btContinuousDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btDiscreteDynamicsWorldD2Ev(%struct.btDiscreteDynamicsWorld* %1)
- %2 = bitcast %struct.btContinuousDynamicsWorld* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN25btContinuousDynamicsWorldD1Ev(%struct.btContinuousDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([46 x i32 (...)*]* @_ZTV25btContinuousDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btDiscreteDynamicsWorldD2Ev(%struct.btDiscreteDynamicsWorld* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btContinuousDynamicsWorldD2Ev(%struct.btContinuousDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([46 x i32 (...)*]* @_ZTV25btContinuousDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btDiscreteDynamicsWorldD2Ev(%struct.btDiscreteDynamicsWorld* %1)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN25btContinuousDynamicsWorldC1EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btContinuousDynamicsWorld* %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN23btDiscreteDynamicsWorldC2EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btDiscreteDynamicsWorld* %0, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration)
- %1 = getelementptr inbounds %struct.btContinuousDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([46 x i32 (...)*]* @_ZTV25btContinuousDynamicsWorld, i32 0, i32 2), i32 (...)*** %1, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN23btDiscreteDynamicsWorldC2EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration) align 2 {
-invcont2:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN16btCollisionWorldC2EP12btDispatcherP21btBroadphaseInterfaceP24btCollisionConfiguration(%struct.btCollisionWorld* %0, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %collisionConfiguration)
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store void (%struct.btDynamicsWorld*, float)* null, void (%struct.btDynamicsWorld*, float)** %2, align 4
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store void (%struct.btDynamicsWorld*, float)* null, void (%struct.btDynamicsWorld*, float)** %3, align 4
- %4 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store i8* null, i8** %4, align 4
- %5 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float 0x3FE3333340000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float 0x3FD3333340000000, float* %7, align 4
- %8 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 6 ; [#uses=1]
- store float 2.000000e+01, float* %9, align 4
- %10 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 5 ; [#uses=1]
- store i32 10, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 8 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %11, align 4
- %12 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 9 ; [#uses=1]
- store float 0x3FB99999A0000000, float* %12, align 4
- %13 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 10 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 7 ; [#uses=1]
- store float 1.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 12 ; [#uses=1]
- store float 0xBF947AE140000000, float* %16, align 4
- %17 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 14 ; [#uses=1]
- store float 0x3FEB333340000000, float* %18, align 4
- %19 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 15 ; [#uses=1]
- store i32 260, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 16 ; [#uses=1]
- store i32 2, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 17 ; [#uses=1]
- store i32 128, i32* %21, align 4
- store i32 (...)** getelementptr inbounds ([45 x i32 (...)*]* @_ZTV23btDiscreteDynamicsWorld, i32 0, i32 2), i32 (...)*** %1, align 4
- %22 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 1 ; [#uses=2]
- store %struct.btActionInterface* %constraintSolver, %struct.btActionInterface** %22, align 4
- %23 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=3]
- store i8 1, i8* %23, align 4
- %24 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=4]
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %24, align 4
- %25 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=2]
- store i32 0, i32* %25, align 4
- %26 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 2 ; [#uses=2]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=3]
- store i8 1, i8* %27, align 4
- %28 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=4]
- store %struct.btRigidBody** null, %struct.btRigidBody*** %28, align 4
- %29 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=2]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 0, i32* %30, align 4
- %31 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %31, align 4
- %32 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float -1.000000e+01, float* %32, align 4
- %33 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 9 ; [#uses=1]
- store i8 0, i8* %36, align 2
- %37 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=3]
- store i8 1, i8* %37, align 4
- %38 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=4]
- store %struct.btActionInterface** null, %struct.btActionInterface*** %38, align 4
- %39 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=2]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 2 ; [#uses=2]
- store i32 0, i32* %40, align 4
- %41 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %41, align 4
- %42 = icmp eq %struct.btActionInterface* %constraintSolver, null ; [#uses=1]
- br i1 %42, label %bb, label %bb10
-
-bb: ; preds = %invcont2
- %43 = invoke i8* @_Z22btAlignedAllocInternalji(i32 128, i32 16)
- to label %invcont3 unwind label %lpad52 ; [#uses=3]
-
-invcont3: ; preds = %bb
- %44 = icmp eq i8* %43, null ; [#uses=1]
- br i1 %44, label %bb9, label %bb4
-
-bb4: ; preds = %invcont3
- %45 = bitcast i8* %43 to %struct.btSequentialImpulseConstraintSolver* ; [#uses=1]
- invoke void @_ZN35btSequentialImpulseConstraintSolverC1Ev(%struct.btSequentialImpulseConstraintSolver* %45)
- to label %bb9 unwind label %lpad56
-
-bb9: ; preds = %bb4, %invcont3
- %46 = bitcast i8* %43 to %struct.btActionInterface* ; [#uses=1]
- store %struct.btActionInterface* %46, %struct.btActionInterface** %22, align 4
- %47 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 8 ; [#uses=1]
- store i8 1, i8* %47, align 1
- br label %bb11
-
-bb10: ; preds = %invcont2
- %48 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 8 ; [#uses=1]
- store i8 0, i8* %48, align 1
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9
- %49 = invoke i8* @_Z22btAlignedAllocInternalji(i32 68, i32 16)
- to label %invcont13 unwind label %lpad52 ; [#uses=2]
-
-invcont13: ; preds = %bb11
- %50 = bitcast i8* %49 to %struct.btSimulationIslandManager* ; [#uses=2]
- %51 = icmp eq i8* %49, null ; [#uses=1]
- br i1 %51, label %bb21, label %bb14
-
-bb14: ; preds = %invcont13
- invoke void @_ZN25btSimulationIslandManagerC1Ev(%struct.btSimulationIslandManager* %50)
- to label %bb21 unwind label %lpad60
-
-bb21: ; preds = %bb14, %invcont13
- %52 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 2 ; [#uses=1]
- store %struct.btSimulationIslandManager* %50, %struct.btSimulationIslandManager** %52, align 4
- %53 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 7 ; [#uses=1]
- store i8 1, i8* %53, align 4
- ret void
-
-invcont40: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-lpad52: ; preds = %bb11, %bb
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad82
-
-lpad56: ; preds = %bb4
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad82
-
-lpad60: ; preds = %bb14
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad82
-
-lpad64: ; preds = %bb1.i.i.i
- %eh_ptr65 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select67 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr65, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad68: ; preds = %bb1.i.i.i92
- %eh_ptr69 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select71 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr69, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad72: ; preds = %bb1.i.i.i97
- %eh_ptr73 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select75 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr73, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad76: ; preds = %ppad
- %eh_ptr77 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select79 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr77, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i98, %ppad80
- store i8 1, i8* %23, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %24, align 4
- store i32 0, i32* %25, align 4
- store i32 0, i32* %26, align 4
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %1, align 4
- invoke void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %0)
- to label %invcont40 unwind label %lpad76
-
-ppad80: ; preds = %bb2.i.i.i93, %ppad81
- store i8 1, i8* %27, align 4
- store %struct.btRigidBody** null, %struct.btRigidBody*** %28, align 4
- store i32 0, i32* %29, align 4
- store i32 0, i32* %30, align 4
- %54 = load %struct.btTypedConstraint*** %24, align 4 ; [#uses=2]
- %55 = icmp eq %struct.btTypedConstraint** %54, null ; [#uses=1]
- br i1 %55, label %ppad, label %bb.i.i.i96
-
-bb.i.i.i96: ; preds = %ppad80
- %56 = load i8* %23, align 4 ; [#uses=1]
- %toBool.i.i.i95 = icmp eq i8 %56, 0 ; [#uses=1]
- br i1 %toBool.i.i.i95, label %bb2.i.i.i98, label %bb1.i.i.i97
-
-bb1.i.i.i97: ; preds = %bb.i.i.i96
- %57 = bitcast %struct.btTypedConstraint** %54 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %57)
- to label %bb2.i.i.i98 unwind label %lpad72
-
-bb2.i.i.i98: ; preds = %bb1.i.i.i97, %bb.i.i.i96
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %24, align 4
- br label %ppad
-
-ppad81: ; preds = %bb2.i.i.i, %ppad82
- store i8 1, i8* %37, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %38, align 4
- store i32 0, i32* %39, align 4
- store i32 0, i32* %40, align 4
- %58 = load %struct.btRigidBody*** %28, align 4 ; [#uses=2]
- %59 = icmp eq %struct.btRigidBody** %58, null ; [#uses=1]
- br i1 %59, label %ppad80, label %bb.i.i.i91
-
-bb.i.i.i91: ; preds = %ppad81
- %60 = load i8* %27, align 4 ; [#uses=1]
- %toBool.i.i.i90 = icmp eq i8 %60, 0 ; [#uses=1]
- br i1 %toBool.i.i.i90, label %bb2.i.i.i93, label %bb1.i.i.i92
-
-bb1.i.i.i92: ; preds = %bb.i.i.i91
- %61 = bitcast %struct.btRigidBody** %58 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %61)
- to label %bb2.i.i.i93 unwind label %lpad68
-
-bb2.i.i.i93: ; preds = %bb1.i.i.i92, %bb.i.i.i91
- store %struct.btRigidBody** null, %struct.btRigidBody*** %28, align 4
- br label %ppad80
-
-ppad82: ; preds = %lpad60, %lpad56, %lpad52
- %eh_exception.0 = phi i8* [ %eh_ptr61, %lpad60 ], [ %eh_ptr53, %lpad52 ], [ %eh_ptr57, %lpad56 ] ; [#uses=1]
- %62 = load %struct.btActionInterface*** %38, align 4 ; [#uses=2]
- %63 = icmp eq %struct.btActionInterface** %62, null ; [#uses=1]
- br i1 %63, label %ppad81, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad82
- %64 = load i8* %37, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %64, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %65 = bitcast %struct.btActionInterface** %62 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %65)
- to label %bb2.i.i.i unwind label %lpad64
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btActionInterface** null, %struct.btActionInterface*** %38, align 4
- br label %ppad81
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorld13addConstraintEP17btTypedConstraintb(%struct.btDynamicsWorld* nocapture %this, %struct.btTypedConstraint* nocapture %constraint, i8 zeroext %disableCollisionsBetweenLinkedBodies) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorld16removeConstraintEP17btTypedConstraint(%struct.btDynamicsWorld* nocapture %this, %struct.btTypedConstraint* nocapture %constraint) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK15btDynamicsWorld17getNumConstraintsEv(%struct.btDynamicsWorld* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 0
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btTypedConstraint* @_ZN15btDynamicsWorld13getConstraintEi(%struct.btDynamicsWorld* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret %struct.btTypedConstraint* null
-}
-
-; [#uses=1]
-define linkonce_odr noalias %struct.btTypedConstraint* @_ZNK15btDynamicsWorld13getConstraintEi(%struct.btDynamicsWorld* nocapture %this, i32 %index) nounwind readnone align 2 {
-entry:
- ret %struct.btTypedConstraint* null
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorld10addVehicleEP17btActionInterface(%struct.btDynamicsWorld* nocapture %this, %struct.btActionInterface* nocapture %vehicle) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorld13removeVehicleEP17btActionInterface(%struct.btDynamicsWorld* nocapture %this, %struct.btActionInterface* nocapture %vehicle) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorld12addCharacterEP17btActionInterface(%struct.btDynamicsWorld* nocapture %this, %struct.btActionInterface* nocapture %character) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorld15removeCharacterEP17btActionInterface(%struct.btDynamicsWorld* nocapture %this, %struct.btActionInterface* nocapture %character) nounwind readnone align 2 {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK23btDiscreteDynamicsWorld12getWorldTypeEv(%struct.btDiscreteDynamicsWorld* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 2
-}
-
-; [#uses=1]
-define void @_ZNK23btDiscreteDynamicsWorld10getGravityEv(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btDiscreteDynamicsWorld* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld10addVehicleEP17btActionInterface(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %vehicle) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 15 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %4(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %vehicle)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld13removeVehicleEP17btActionInterface(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %vehicle) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %4(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %vehicle)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld12addCharacterEP17btActionInterface(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %character) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 15 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %4(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %character)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld15removeCharacterEP17btActionInterface(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %character) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 16 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btDiscreteDynamicsWorld*, %struct.btActionInterface*)* ; [#uses=1]
- tail call void %4(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %character)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btSimulationIslandManager14IslandCallbackD1Ev(%struct.btActionInterface* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN25btSimulationIslandManager14IslandCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btSimulationIslandManager14IslandCallbackD0Ev(%struct.btActionInterface* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %this, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVN25btSimulationIslandManager14IslandCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btActionInterface* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btClosestNotMeConvexResultCallbackD1Ev(%struct.btClosestNotMeConvexResultCallback* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN34btClosestNotMeConvexResultCallbackD0Ev(%struct.btClosestNotMeConvexResultCallback* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btClosestNotMeConvexResultCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr zeroext i8 @_ZNK34btClosestNotMeConvexResultCallback14needsCollisionEP17btBroadphaseProxy(%struct.btClosestNotMeConvexResultCallback* nocapture %this, %struct.btBroadphaseProxy* %proxy0) align 2 {
-entry:
- %manifoldArray = alloca %"struct.btAlignedObjectArray<btPersistentManifold*>", align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 0 ; [#uses=1]
- %1 = load i8** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 1 ; [#uses=2]
- %3 = load %struct.btCollisionObject** %2, align 4 ; [#uses=2]
- %4 = bitcast %struct.btCollisionObject* %3 to i8* ; [#uses=1]
- %5 = icmp eq i8* %1, %4 ; [#uses=1]
- br i1 %5, label %bb24, label %bb1
-
-bb1: ; preds = %entry
- %6 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 1 ; [#uses=1]
- %7 = load i16* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %9 = load i16* %8, align 2 ; [#uses=1]
- %10 = and i16 %9, %7 ; [#uses=1]
- %toBoolnot.i = icmp eq i16 %10, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %bb24, label %_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy.exit
-
-_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy.exit: ; preds = %bb1
- %11 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load i16* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btBroadphaseProxy* %proxy0, i32 0, i32 2 ; [#uses=1]
- %14 = load i16* %13, align 2 ; [#uses=1]
- %15 = and i16 %14, %12 ; [#uses=1]
- %phitmp = icmp eq i16 %15, 0 ; [#uses=1]
- br i1 %phitmp, label %bb24, label %bb5
-
-bb5: ; preds = %_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy.exit
- %16 = bitcast i8* %1 to %struct.btCollisionObject* ; [#uses=1]
- %17 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 4 ; [#uses=1]
- %18 = load %struct.btActionInterface** %17, align 4 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btActionInterface* %18, i32 0, i32 0 ; [#uses=1]
- %20 = load i32 (...)*** %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32 (...)** %20, i32 7 ; [#uses=1]
- %22 = load i32 (...)** %21, align 4 ; [#uses=1]
- %23 = bitcast i32 (...)* %22 to i8 (%struct.btActionInterface*, %struct.btCollisionObject*, %struct.btCollisionObject*)* ; [#uses=1]
- %24 = call zeroext i8 %23(%struct.btActionInterface* %18, %struct.btCollisionObject* %3, %struct.btCollisionObject* %16) ; [#uses=1]
- %toBool6 = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool6, label %bb24, label %bb7
-
-bb7: ; preds = %bb5
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 4 ; [#uses=7]
- store i8 1, i8* %25, align 8
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 3 ; [#uses=12]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %26, align 4
- %27 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 1 ; [#uses=5]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray, i32 0, i32 2 ; [#uses=4]
- store i32 0, i32* %28, align 8
- %29 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 3 ; [#uses=1]
- %30 = load %struct..0btMultiSapOverlapFilterCallback** %29, align 4 ; [#uses=2]
- %31 = getelementptr inbounds %struct..0btMultiSapOverlapFilterCallback* %30, i32 0, i32 0, i32 0 ; [#uses=1]
- %32 = load i32 (...)*** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 13 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btCollisionObject* %35, i32 0, i32 8 ; [#uses=1]
- %37 = load %struct.btBroadphaseProxy** %36, align 4 ; [#uses=1]
- %38 = bitcast i32 (...)* %34 to %struct.btBroadphasePair* (%struct..0btMultiSapOverlapFilterCallback*, %struct.btBroadphaseProxy*, %struct.btBroadphaseProxy*)* ; [#uses=1]
- %39 = invoke %struct.btBroadphasePair* %38(%struct..0btMultiSapOverlapFilterCallback* %30, %struct.btBroadphaseProxy* %37, %struct.btBroadphaseProxy* %proxy0)
- to label %invcont unwind label %lpad ; [#uses=2]
-
-invcont: ; preds = %bb7
- %40 = icmp eq %struct.btBroadphasePair* %39, null ; [#uses=1]
- br i1 %40, label %bb22, label %bb8
-
-bb8: ; preds = %invcont
- %41 = getelementptr inbounds %struct.btBroadphasePair* %39, i32 0, i32 2 ; [#uses=2]
- %42 = load %struct.btCollisionAlgorithm** %41, align 4 ; [#uses=1]
- %43 = icmp eq %struct.btCollisionAlgorithm* %42, null ; [#uses=1]
- br i1 %43, label %bb22, label %bb9
-
-bb9: ; preds = %bb8
- %44 = load i32* %27, align 4 ; [#uses=4]
- %45 = icmp sgt i32 %44, 0 ; [#uses=1]
- %.not = xor i1 %45, true ; [#uses=1]
- %46 = icmp slt i32 %44, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %46 ; [#uses=1]
- br i1 %or.cond, label %bb4.i, label %invcont10
-
-bb4.i: ; preds = %bb9
- %47 = load i32* %28, align 8 ; [#uses=1]
- %48 = icmp slt i32 %47, 0 ; [#uses=1]
- br i1 %48, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i: ; preds = %bb4.i
- %49 = load %struct.btPersistentManifold*** %26, align 4 ; [#uses=2]
- %50 = icmp eq %struct.btPersistentManifold** %49, null ; [#uses=1]
- br i1 %50, label %bb11.preheader.i, label %bb.i.i.i46
-
-bb.i.i.i46: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %51 = load i8* %25, align 8 ; [#uses=1]
- %toBool.i.i.i45 = icmp eq i8 %51, 0 ; [#uses=1]
- br i1 %toBool.i.i.i45, label %bb2.i.i.i48, label %bb1.i.i.i47
-
-bb1.i.i.i47: ; preds = %bb.i.i.i46
- %52 = bitcast %struct.btPersistentManifold** %49 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %52)
- to label %bb2.i.i.i48 unwind label %lpad
-
-bb2.i.i.i48: ; preds = %bb1.i.i.i47, %bb.i.i.i46
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %26, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i48, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- store i8 1, i8* %25, align 8
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %26, align 4
- store i32 0, i32* %28, align 8
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb11.preheader.i, %bb4.i
- %tmp.i = sub i32 0, %44 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp = add i32 %44, %indvar.i ; [#uses=1]
- %53 = load %struct.btPersistentManifold*** %26, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btPersistentManifold** %53, i32 %tmp ; [#uses=2]
- %54 = icmp eq %struct.btPersistentManifold** %scevgep, null ; [#uses=1]
- br i1 %54, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %scevgep, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond, label %invcont10, label %bb7.i
-
-invcont10: ; preds = %bb10.i, %bb9
- store i32 0, i32* %27, align 4
- %55 = load %struct.btCollisionAlgorithm** %41, align 4 ; [#uses=2]
- %56 = getelementptr inbounds %struct.btCollisionAlgorithm* %55, i32 0, i32 0 ; [#uses=1]
- %57 = load i32 (...)*** %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds i32 (...)** %57, i32 4 ; [#uses=1]
- %59 = load i32 (...)** %58, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %59 to void (%struct.btCollisionAlgorithm*, %"struct.btAlignedObjectArray<btPersistentManifold*>"*)* ; [#uses=1]
- invoke void %60(%struct.btCollisionAlgorithm* %55, %"struct.btAlignedObjectArray<btPersistentManifold*>"* %manifoldArray)
- to label %bb16.preheader unwind label %lpad
-
-bb16.preheader: ; preds = %invcont10
- %61 = load i32* %27, align 4 ; [#uses=1]
- br label %bb16
-
-bb12: ; preds = %bb16
- %62 = load %struct.btPersistentManifold*** %26, align 4 ; [#uses=3]
- %scevgep50 = getelementptr %struct.btPersistentManifold** %62, i32 %68 ; [#uses=1]
- %63 = load %struct.btPersistentManifold** %scevgep50, align 4 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btPersistentManifold* %63, i32 0, i32 4 ; [#uses=1]
- %65 = load i32* %64, align 4 ; [#uses=1]
- %66 = icmp sgt i32 %65, 0 ; [#uses=1]
- br i1 %66, label %bb24.critedge, label %bb15
-
-bb15: ; preds = %bb12
- %67 = add nsw i32 %68, 1 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb15, %bb16.preheader
- %68 = phi i32 [ %67, %bb15 ], [ 0, %bb16.preheader ] ; [#uses=3]
- %69 = icmp sgt i32 %61, %68 ; [#uses=1]
- br i1 %69, label %bb12, label %bb22
-
-invcont20: ; preds = %bb2.i.i.i, %lpad
- store i8 1, i8* %25, align 8
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %26, align 4
- store i32 0, i32* %27, align 4
- store i32 0, i32* %28, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb22: ; preds = %bb16, %bb8, %invcont
- %70 = load %struct.btPersistentManifold*** %26, align 4 ; [#uses=2]
- %71 = icmp eq %struct.btPersistentManifold** %70, null ; [#uses=1]
- br i1 %71, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44, label %bb.i.i.i41
-
-bb.i.i.i41: ; preds = %bb22
- %72 = load i8* %25, align 8 ; [#uses=1]
- %toBool.i.i.i40 = icmp eq i8 %72, 0 ; [#uses=1]
- br i1 %toBool.i.i.i40, label %bb2.i.i.i43, label %bb1.i.i.i42
-
-bb1.i.i.i42: ; preds = %bb.i.i.i41
- %73 = bitcast %struct.btPersistentManifold** %70 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %73)
- br label %bb2.i.i.i43
-
-bb2.i.i.i43: ; preds = %bb1.i.i.i42, %bb.i.i.i41
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %26, align 4
- ret i8 1
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit44: ; preds = %bb22
- ret i8 1
-
-bb24.critedge: ; preds = %bb12
- %74 = icmp eq %struct.btPersistentManifold** %62, null ; [#uses=1]
- br i1 %74, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit39, label %bb.i.i.i36
-
-bb.i.i.i36: ; preds = %bb24.critedge
- %75 = load i8* %25, align 8 ; [#uses=1]
- %toBool.i.i.i35 = icmp eq i8 %75, 0 ; [#uses=1]
- br i1 %toBool.i.i.i35, label %bb2.i.i.i38, label %bb1.i.i.i37
-
-bb1.i.i.i37: ; preds = %bb.i.i.i36
- %76 = bitcast %struct.btPersistentManifold** %62 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %76)
- br label %bb2.i.i.i38
-
-bb2.i.i.i38: ; preds = %bb1.i.i.i37, %bb.i.i.i36
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %26, align 4
- ret i8 0
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit39: ; preds = %bb24.critedge
- ret i8 0
-
-bb24: ; preds = %bb5, %_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy.exit, %bb1, %entry
- %.0 = phi i8 [ 0, %entry ], [ 0, %_ZNK16btCollisionWorld20ConvexResultCallback14needsCollisionEP17btBroadphaseProxy.exit ], [ 1, %bb5 ], [ 0, %bb1 ] ; [#uses=1]
- ret i8 %.0
-
-lpad: ; preds = %invcont10, %bb1.i.i.i47, %bb7
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select28 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %77 = load %struct.btPersistentManifold*** %26, align 4 ; [#uses=2]
- %78 = icmp eq %struct.btPersistentManifold** %77, null ; [#uses=1]
- br i1 %78, label %invcont20, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad
- %79 = load i8* %25, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %79, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %80 = bitcast %struct.btPersistentManifold** %77 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %80)
- to label %bb2.i.i.i unwind label %lpad29
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %26, align 4
- br label %invcont20
-
-lpad29: ; preds = %bb1.i.i.i
- %eh_ptr30 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select32 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr30, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZN34btClosestNotMeConvexResultCallback15addSingleResultERN16btCollisionWorld17LocalConvexResultEb(%struct.btClosestNotMeConvexResultCallback* nocapture %this, %"struct.btCollisionWorld::LocalConvexResult"* nocapture %convexResult, i8 zeroext %normalInWorldSpace) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 0 ; [#uses=2]
- %1 = load %struct.btCollisionObject** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btCollisionObject** %2, align 4 ; [#uses=1]
- %4 = icmp eq %struct.btCollisionObject* %1, %3 ; [#uses=1]
- br i1 %4, label %bb9, label %bb1
-
-bb1: ; preds = %entry
- %5 = getelementptr inbounds %struct.btCollisionObject* %1, i32 0, i32 12 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %.lobit.i = and i32 %6, 4 ; [#uses=1]
- %toBoolnot = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb5, label %bb9
-
-bb5: ; preds = %bb1
- %7 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fsub float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fmul float %23, %21 ; [#uses=1]
- %25 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fmul float %26, %16 ; [#uses=1]
- %28 = fadd float %24, %27 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = fmul float %30, %11 ; [#uses=1]
- %32 = fadd float %28, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fsub float -0.000000e+00, %34 ; [#uses=1]
- %36 = fcmp ult float %32, %35 ; [#uses=1]
- br i1 %36, label %bb8, label %bb9
-
-bb8: ; preds = %bb5
- %37 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 4 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %39, align 4
- %40 = load %struct.btCollisionObject** %0, align 4 ; [#uses=10]
- %41 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 5 ; [#uses=1]
- store %struct.btCollisionObject* %40, %struct.btCollisionObject** %41, align 4
- %toBool.i = icmp eq i8 %normalInWorldSpace, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb1.i, label %bb.i
-
-bb.i: ; preds = %bb8
- %42 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %22, align 4 ; [#uses=1]
- store float %43, float* %42, align 4
- %44 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %45 = load float* %25, align 4 ; [#uses=1]
- store float %45, float* %44, align 4
- %46 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %29, align 4 ; [#uses=1]
- store float %47, float* %46, align 4
- %48 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %49 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- br label %_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb.exit
-
-bb1.i: ; preds = %bb8
- %51 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = load float* %22, align 4 ; [#uses=3]
- %54 = fmul float %52, %53 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- %57 = load float* %25, align 4 ; [#uses=3]
- %58 = fmul float %56, %57 ; [#uses=1]
- %59 = fadd float %54, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = load float* %29, align 4 ; [#uses=3]
- %63 = fmul float %61, %62 ; [#uses=1]
- %64 = fadd float %59, %63 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fmul float %66, %53 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- %70 = fmul float %69, %57 ; [#uses=1]
- %71 = fadd float %67, %70 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fmul float %73, %62 ; [#uses=1]
- %75 = fadd float %71, %74 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fmul float %77, %53 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fmul float %80, %57 ; [#uses=1]
- %82 = fadd float %78, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btCollisionObject* %40, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- %85 = fmul float %84, %62 ; [#uses=1]
- %86 = fadd float %82, %85 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %86, float* %87, align 4
- %88 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %75, float* %88, align 4
- %89 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %64, float* %89, align 4
- %90 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %90, align 4
- br label %_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb.exit
-
-_ZN16btCollisionWorld27ClosestConvexResultCallback15addSingleResultERNS_17LocalConvexResultEb.exit: ; preds = %bb1.i, %bb.i
- %91 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %92 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %95 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %98 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- %100 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %this, i32 0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %101 = getelementptr inbounds %"struct.btCollisionWorld::LocalConvexResult"* %convexResult, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- store float %102, float* %100, align 4
- %103 = load float* %37, align 4 ; [#uses=1]
- ret float %103
-
-bb9: ; preds = %bb5, %bb1, %entry
- ret float 1.000000e+00
-}
-
-; [#uses=1]
-define %struct.btActionInterface* @_ZN23btDiscreteDynamicsWorld19getConstraintSolverEv(%struct.btDiscreteDynamicsWorld* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=1]
- ret %struct.btActionInterface* %1
-}
-
-; [#uses=1]
-define %struct.btTypedConstraint* @_ZN23btDiscreteDynamicsWorld13getConstraintEi(%struct.btDiscreteDynamicsWorld* nocapture %this, i32 %index) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %1 = load %struct.btTypedConstraint*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTypedConstraint** %1, i32 %index ; [#uses=1]
- %3 = load %struct.btTypedConstraint** %2, align 4 ; [#uses=1]
- ret %struct.btTypedConstraint* %3
-}
-
-; [#uses=1]
-define i32 @_ZNK23btDiscreteDynamicsWorld17getNumConstraintsEv(%struct.btDiscreteDynamicsWorld* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- ret i32 %1
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld20serializeRigidBodiesEP12btSerializer(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph14, label %bb9.preheader
-
-bb.nph14: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph14
- %i.013 = phi i32 [ 0, %bb.nph14 ], [ %tmp16, %bb2 ] ; [#uses=2]
- %tmp16 = add i32 %i.013, 1 ; [#uses=2]
- %5 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep15 = getelementptr %struct.btCollisionObject** %5, i32 %i.013 ; [#uses=1]
- %6 = load %struct.btCollisionObject** %scevgep15, align 4 ; [#uses=5]
- %7 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 19 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %.lobit = and i32 %8, 2 ; [#uses=1]
- %toBool = icmp eq i32 %.lobit, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %9 = getelementptr inbounds %struct.btCollisionObject* %6, i32 0, i32 0 ; [#uses=2]
- %10 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds i32 (...)** %10, i32 4 ; [#uses=1]
- %12 = load i32 (...)** %11, align 4 ; [#uses=1]
- %13 = bitcast i32 (...)* %12 to i32 (%struct.btCollisionObject*)* ; [#uses=1]
- %14 = tail call i32 %13(%struct.btCollisionObject* %6) ; [#uses=1]
- %15 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %16 = getelementptr inbounds i32 (...)** %15, i32 4 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %19 = tail call %struct.btChunk* %18(%struct.btActionInterface* %serializer, i32 %14, i32 1) ; [#uses=2]
- %20 = load i32 (...)*** %9, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32 (...)** %20, i32 5 ; [#uses=1]
- %22 = load i32 (...)** %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btChunk* %19, i32 0, i32 2 ; [#uses=1]
- %24 = load i8** %23, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %22 to i8* (%struct.btCollisionObject*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %26 = tail call i8* %25(%struct.btCollisionObject* %6, i8* %24, %struct.btActionInterface* %serializer) ; [#uses=1]
- %27 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 5 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = bitcast i32 (...)* %29 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %31 = bitcast %struct.btCollisionObject* %6 to i8* ; [#uses=1]
- tail call void %30(%struct.btActionInterface* %serializer, %struct.btChunk* %19, i8* %26, i32 1497645650, i8* %31)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %32 = load i32* %0, align 4 ; [#uses=1]
- %33 = icmp sgt i32 %32, %tmp16 ; [#uses=1]
- br i1 %33, label %bb, label %bb9.preheader
-
-bb9.preheader: ; preds = %bb2, %entry
- %34 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=2]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = icmp sgt i32 %35, 0 ; [#uses=1]
- br i1 %36, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb9.preheader
- %37 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- br label %bb6
-
-bb6: ; preds = %bb6, %bb.nph
- %i.112 = phi i32 [ 0, %bb.nph ], [ %64, %bb6 ] ; [#uses=2]
- %39 = load %struct.btTypedConstraint*** %37, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btTypedConstraint** %39, i32 %i.112 ; [#uses=1]
- %40 = load %struct.btTypedConstraint** %scevgep, align 4 ; [#uses=4]
- %41 = getelementptr inbounds %struct.btTypedConstraint* %40, i32 0, i32 0 ; [#uses=2]
- %42 = load i32 (...)*** %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds i32 (...)** %42, i32 9 ; [#uses=1]
- %44 = load i32 (...)** %43, align 4 ; [#uses=1]
- %45 = bitcast i32 (...)* %44 to i32 (%struct.btTypedConstraint*)* ; [#uses=1]
- %46 = tail call i32 %45(%struct.btTypedConstraint* %40) ; [#uses=1]
- %47 = load i32 (...)*** %38, align 4 ; [#uses=1]
- %48 = getelementptr inbounds i32 (...)** %47, i32 4 ; [#uses=1]
- %49 = load i32 (...)** %48, align 4 ; [#uses=1]
- %50 = bitcast i32 (...)* %49 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %51 = tail call %struct.btChunk* %50(%struct.btActionInterface* %serializer, i32 %46, i32 1) ; [#uses=2]
- %52 = load i32 (...)*** %41, align 4 ; [#uses=1]
- %53 = getelementptr inbounds i32 (...)** %52, i32 10 ; [#uses=1]
- %54 = load i32 (...)** %53, align 4 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btChunk* %51, i32 0, i32 2 ; [#uses=1]
- %56 = load i8** %55, align 4 ; [#uses=1]
- %57 = bitcast i32 (...)* %54 to i8* (%struct.btTypedConstraint*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %58 = tail call i8* %57(%struct.btTypedConstraint* %40, i8* %56, %struct.btActionInterface* %serializer) ; [#uses=1]
- %59 = load i32 (...)*** %38, align 4 ; [#uses=1]
- %60 = getelementptr inbounds i32 (...)** %59, i32 5 ; [#uses=1]
- %61 = load i32 (...)** %60, align 4 ; [#uses=1]
- %62 = bitcast i32 (...)* %61 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- %63 = bitcast %struct.btTypedConstraint* %40 to i8* ; [#uses=1]
- tail call void %62(%struct.btActionInterface* %serializer, %struct.btChunk* %51, i8* %58, i32 1397641027, i8* %63)
- %64 = add nsw i32 %i.112, 1 ; [#uses=2]
- %65 = load i32* %34, align 4 ; [#uses=1]
- %66 = icmp sgt i32 %65, %64 ; [#uses=1]
- br i1 %66, label %bb6, label %return
-
-return: ; preds = %bb6, %bb9.preheader
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld11clearForcesEv(%struct.btDiscreteDynamicsWorld* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.03 = phi i32 [ 0, %bb.nph ], [ %8, %bb ] ; [#uses=2]
- %4 = load %struct.btRigidBody*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btRigidBody** %4, i32 %i.03 ; [#uses=1]
- %5 = load %struct.btRigidBody** %scevgep, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 9, i32 0, i32 0 ; [#uses=1]
- %7 = bitcast float* %6 to i8* ; [#uses=1]
- tail call void @llvm.memset.p0i8.i64(i8* %7, i8 0, i64 32, i32 4, i1 false) nounwind
- %8 = add nsw i32 %i.03, 1 ; [#uses=2]
- %9 = load i32* %0, align 4 ; [#uses=1]
- %10 = icmp sgt i32 %9, %8 ; [#uses=1]
- br i1 %10, label %bb, label %return
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define %struct.btTypedConstraint* @_ZNK23btDiscreteDynamicsWorld13getConstraintEi(%struct.btDiscreteDynamicsWorld* nocapture %this, i32 %index) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %1 = load %struct.btTypedConstraint*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTypedConstraint** %1, i32 %index ; [#uses=1]
- %3 = load %struct.btTypedConstraint** %2, align 4 ; [#uses=1]
- ret %struct.btTypedConstraint* %3
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld12removeActionEP17btActionInterface(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btActionInterface* %action) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- br label %bb3.i.i
-
-bb.i.i: ; preds = %bb3.i.i
- %3 = load %struct.btActionInterface*** %2, align 4 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btActionInterface** %3, i32 %7 ; [#uses=1]
- %4 = load %struct.btActionInterface** %scevgep.i.i, align 4 ; [#uses=1]
- %5 = icmp eq %struct.btActionInterface* %4, %action ; [#uses=1]
- br i1 %5, label %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE16findLinearSearchERKS1_.exit.i, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb.i.i
- %6 = add nsw i32 %7, 1 ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %entry
- %7 = phi i32 [ 0, %entry ], [ %6, %bb2.i.i ] ; [#uses=4]
- %8 = icmp sgt i32 %1, %7 ; [#uses=1]
- br i1 %8, label %bb.i.i, label %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE16findLinearSearchERKS1_.exit.i
-
-_ZNK20btAlignedObjectArrayIP17btActionInterfaceE16findLinearSearchERKS1_.exit.i: ; preds = %bb3.i.i, %bb.i.i
- %index.0.i.i = phi i32 [ %1, %bb3.i.i ], [ %7, %bb.i.i ] ; [#uses=2]
- %9 = icmp sgt i32 %1, %index.0.i.i ; [#uses=1]
- br i1 %9, label %bb.i, label %_ZN20btAlignedObjectArrayIP17btActionInterfaceE6removeERKS1_.exit
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE16findLinearSearchERKS1_.exit.i
- %10 = add nsw i32 %1, -1 ; [#uses=2]
- %11 = load %struct.btActionInterface*** %2, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btActionInterface** %11, i32 %index.0.i.i ; [#uses=2]
- %13 = load %struct.btActionInterface** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btActionInterface** %11, i32 %10 ; [#uses=1]
- %15 = load %struct.btActionInterface** %14, align 4 ; [#uses=1]
- store %struct.btActionInterface* %15, %struct.btActionInterface** %12, align 4
- %16 = load %struct.btActionInterface*** %2, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btActionInterface** %16, i32 %10 ; [#uses=1]
- store %struct.btActionInterface* %13, %struct.btActionInterface** %17, align 4
- %18 = load i32* %0, align 4 ; [#uses=1]
- %19 = add nsw i32 %18, -1 ; [#uses=1]
- store i32 %19, i32* %0, align 4
- ret void
-
-_ZN20btAlignedObjectArrayIP17btActionInterfaceE6removeERKS1_.exit: ; preds = %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE16findLinearSearchERKS1_.exit.i
- ret void
-}
-
-; [#uses=3]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP17btTypedConstraintE17quickSortInternalI33btSortConstraintOnIslandPredicateEEvT_ii(%"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* nocapture byval align 4 %CompareFunc, i32 %lo, i32 %hi) nounwind align 2 {
-entry:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %1 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 3 ; [#uses=3]
- %3 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %4 = add nsw i32 %hi, %lo ; [#uses=1]
- %5 = sdiv i32 %4, 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTypedConstraint** %3, i32 %5 ; [#uses=1]
- %7 = load %struct.btTypedConstraint** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btTypedConstraint* %7, i32 0, i32 5 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTypedConstraint* %7, i32 0, i32 6 ; [#uses=2]
- br label %bb1.outer
-
-bb1.outer: ; preds = %bb7, %entry
- %i.0.ph = phi i32 [ %lo, %entry ], [ %i.1, %bb7 ] ; [#uses=2]
- %j.1.ph = phi i32 [ %hi, %entry ], [ %j.2, %bb7 ] ; [#uses=2]
- %10 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=5]
- %11 = load %struct.btRigidBody** %8, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %11, i32 0, i32 0, i32 13 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=3]
- %14 = icmp sgt i32 %13, -1 ; [#uses=2]
- br i1 %14, label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i.us, label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i
-
-bb.us: ; preds = %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit.us
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i.us
-
-_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit.us: ; preds = %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i.us, %bb1.i4.i.us
- %15 = phi i32 [ %20, %bb1.i4.i.us ], [ %25, %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i.us ] ; [#uses=1]
- %16 = icmp slt i32 %15, %13 ; [#uses=1]
- br i1 %16, label %bb.us, label %bb3.preheader
-
-bb1.i4.i.us: ; preds = %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i.us
- %17 = getelementptr inbounds %struct.btTypedConstraint* %21, i32 0, i32 6 ; [#uses=1]
- %18 = load %struct.btRigidBody** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 0, i32 13 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=1]
- br label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit.us
-
-_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i.us: ; preds = %bb.us, %bb1.outer
- %indvar = phi i32 [ %indvar.next, %bb.us ], [ 0, %bb1.outer ] ; [#uses=2]
- %i.0.us = add i32 %i.0.ph, %indvar ; [#uses=2]
- %scevgep = getelementptr %struct.btTypedConstraint** %10, i32 %i.0.us ; [#uses=1]
- %21 = load %struct.btTypedConstraint** %scevgep, align 4 ; [#uses=3]
- %22 = getelementptr inbounds %struct.btTypedConstraint* %21, i32 0, i32 5 ; [#uses=1]
- %23 = load %struct.btRigidBody** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btRigidBody* %23, i32 0, i32 0, i32 13 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=2]
- %26 = icmp sgt i32 %25, -1 ; [#uses=1]
- br i1 %26, label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit.us, label %bb1.i4.i.us
-
-bb: ; preds = %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit
- %indvar.next30 = add i32 %indvar29, 1 ; [#uses=1]
- br label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i
-
-_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i: ; preds = %bb, %bb1.outer
- %indvar29 = phi i32 [ %indvar.next30, %bb ], [ 0, %bb1.outer ] ; [#uses=2]
- %i.0 = add i32 %i.0.ph, %indvar29 ; [#uses=2]
- %scevgep32 = getelementptr %struct.btTypedConstraint** %10, i32 %i.0 ; [#uses=1]
- %27 = load %struct.btTypedConstraint** %scevgep32, align 4 ; [#uses=3]
- %28 = load %struct.btRigidBody** %9, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btRigidBody* %28, i32 0, i32 0, i32 13 ; [#uses=1]
- %30 = load i32* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btTypedConstraint* %27, i32 0, i32 5 ; [#uses=1]
- %32 = load %struct.btRigidBody** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btRigidBody* %32, i32 0, i32 0, i32 13 ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=2]
- %35 = icmp sgt i32 %34, -1 ; [#uses=1]
- br i1 %35, label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit, label %bb1.i4.i
-
-bb1.i4.i: ; preds = %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i
- %36 = getelementptr inbounds %struct.btTypedConstraint* %27, i32 0, i32 6 ; [#uses=1]
- %37 = load %struct.btRigidBody** %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %37, i32 0, i32 0, i32 13 ; [#uses=1]
- %39 = load i32* %38, align 4 ; [#uses=1]
- br label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit
-
-_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit: ; preds = %bb1.i4.i, %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i
- %40 = phi i32 [ %39, %bb1.i4.i ], [ %34, %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit.i ] ; [#uses=1]
- %41 = icmp slt i32 %40, %30 ; [#uses=1]
- br i1 %41, label %bb, label %bb3.preheader
-
-bb3.preheader: ; preds = %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit.us
- %42 = phi %struct.btTypedConstraint* [ %21, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit.us ], [ %27, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit ] ; [#uses=1]
- %i.0.lcssa = phi i32 [ %i.0.us, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit.us ], [ %i.0, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit ] ; [#uses=4]
- br i1 %14, label %bb3.us, label %bb3
-
-bb3.us: ; preds = %bb2.us, %bb3.preheader
- %indvar18 = phi i32 [ %indvar.next19, %bb2.us ], [ 0, %bb3.preheader ] ; [#uses=2]
- %j.0.us = sub i32 %j.1.ph, %indvar18 ; [#uses=2]
- %scevgep21 = getelementptr %struct.btTypedConstraint** %10, i32 %j.0.us ; [#uses=1]
- %43 = load %struct.btTypedConstraint** %scevgep21, align 4 ; [#uses=3]
- %44 = getelementptr inbounds %struct.btTypedConstraint* %43, i32 0, i32 5 ; [#uses=1]
- %45 = load %struct.btRigidBody** %44, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btRigidBody* %45, i32 0, i32 0, i32 13 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=2]
- %48 = icmp sgt i32 %47, -1 ; [#uses=1]
- br i1 %48, label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17.us, label %bb1.i.i13.us
-
-bb2.us: ; preds = %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17.us
- %indvar.next19 = add i32 %indvar18, 1 ; [#uses=1]
- br label %bb3.us
-
-_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17.us: ; preds = %bb1.i.i13.us, %bb3.us
- %49 = phi i32 [ %54, %bb1.i.i13.us ], [ %47, %bb3.us ] ; [#uses=1]
- %50 = icmp slt i32 %13, %49 ; [#uses=1]
- br i1 %50, label %bb2.us, label %bb5
-
-bb1.i.i13.us: ; preds = %bb3.us
- %51 = getelementptr inbounds %struct.btTypedConstraint* %43, i32 0, i32 6 ; [#uses=1]
- %52 = load %struct.btRigidBody** %51, align 4 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %52, i32 0, i32 0, i32 13 ; [#uses=1]
- %54 = load i32* %53, align 4 ; [#uses=1]
- br label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17.us
-
-bb2: ; preds = %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17
- %indvar.next24 = add i32 %indvar23, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %bb3.preheader
- %indvar23 = phi i32 [ %indvar.next24, %bb2 ], [ 0, %bb3.preheader ] ; [#uses=2]
- %j.0 = sub i32 %j.1.ph, %indvar23 ; [#uses=2]
- %scevgep27 = getelementptr %struct.btTypedConstraint** %10, i32 %j.0 ; [#uses=1]
- %55 = load %struct.btTypedConstraint** %scevgep27, align 4 ; [#uses=3]
- %56 = getelementptr inbounds %struct.btTypedConstraint* %55, i32 0, i32 5 ; [#uses=1]
- %57 = load %struct.btRigidBody** %56, align 4 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btRigidBody* %57, i32 0, i32 0, i32 13 ; [#uses=1]
- %59 = load i32* %58, align 4 ; [#uses=2]
- %60 = icmp sgt i32 %59, -1 ; [#uses=1]
- br i1 %60, label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17, label %bb1.i.i13
-
-bb1.i.i13: ; preds = %bb3
- %61 = getelementptr inbounds %struct.btTypedConstraint* %55, i32 0, i32 6 ; [#uses=1]
- %62 = load %struct.btRigidBody** %61, align 4 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btRigidBody* %62, i32 0, i32 0, i32 13 ; [#uses=1]
- %64 = load i32* %63, align 4 ; [#uses=1]
- br label %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17
-
-_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17: ; preds = %bb1.i.i13, %bb3
- %65 = phi i32 [ %64, %bb1.i.i13 ], [ %59, %bb3 ] ; [#uses=1]
- %66 = load %struct.btRigidBody** %9, align 4 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %66, i32 0, i32 0, i32 13 ; [#uses=1]
- %68 = load i32* %67, align 4 ; [#uses=1]
- %69 = icmp slt i32 %68, %65 ; [#uses=1]
- br i1 %69, label %bb2, label %bb5
-
-bb5: ; preds = %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17.us
- %70 = phi %struct.btTypedConstraint* [ %43, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17.us ], [ %55, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17 ] ; [#uses=1]
- %j.0.lcssa = phi i32 [ %j.0.us, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17.us ], [ %j.0, %_ZN33btSortConstraintOnIslandPredicateclEPK17btTypedConstraintS2_.exit17 ] ; [#uses=4]
- %71 = icmp sgt i32 %i.0.lcssa, %j.0.lcssa ; [#uses=1]
- br i1 %71, label %bb7, label %bb6
-
-bb6: ; preds = %bb5
- %72 = getelementptr inbounds %struct.btTypedConstraint** %10, i32 %i.0.lcssa ; [#uses=1]
- store %struct.btTypedConstraint* %70, %struct.btTypedConstraint** %72, align 4
- %73 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btTypedConstraint** %73, i32 %j.0.lcssa ; [#uses=1]
- store %struct.btTypedConstraint* %42, %struct.btTypedConstraint** %74, align 4
- %75 = add nsw i32 %i.0.lcssa, 1 ; [#uses=1]
- %76 = add nsw i32 %j.0.lcssa, -1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5
- %i.1 = phi i32 [ %75, %bb6 ], [ %i.0.lcssa, %bb5 ] ; [#uses=4]
- %j.2 = phi i32 [ %76, %bb6 ], [ %j.0.lcssa, %bb5 ] ; [#uses=4]
- %77 = icmp sgt i32 %i.1, %j.2 ; [#uses=1]
- br i1 %77, label %bb8, label %bb1.outer
-
-bb8: ; preds = %bb7
- %78 = icmp sgt i32 %j.2, %lo ; [#uses=1]
- br i1 %78, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- call void @_ZN20btAlignedObjectArrayIP17btTypedConstraintE17quickSortInternalI33btSortConstraintOnIslandPredicateEEvT_ii(%"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %1, i32 %lo, i32 %j.2)
- br label %bb10
-
-bb10: ; preds = %bb9, %bb8
- %79 = icmp slt i32 %i.1, %hi ; [#uses=1]
- br i1 %79, label %bb11, label %return
-
-bb11: ; preds = %bb10
- call void @_ZN20btAlignedObjectArrayIP17btTypedConstraintE17quickSortInternalI33btSortConstraintOnIslandPredicateEEvT_ii(%"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 %i.1, i32 %hi)
- ret void
-
-return: ; preds = %bb10
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld9serializeEP12btSerializer(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 8 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btActionInterface*)* ; [#uses=1]
- tail call void %4(%struct.btActionInterface* %serializer)
- tail call void @_ZN23btDiscreteDynamicsWorld20serializeRigidBodiesEP12btSerializer(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %serializer)
- %5 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld25serializeCollisionObjectsEP12btSerializer(%struct.btCollisionWorld* %5, %struct.btActionInterface* %serializer)
- %6 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 9 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct.btActionInterface*)* ; [#uses=1]
- tail call void %9(%struct.btActionInterface* %serializer)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld19setConstraintSolverEP18btConstraintSolver(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btActionInterface* %solver) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 8 ; [#uses=2]
- %1 = load i8* %0, align 1 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btActionInterface** %2, align 4 ; [#uses=1]
- %4 = bitcast %struct.btActionInterface* %3 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %4)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- store i8 0, i8* %0, align 1
- %5 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %solver, %struct.btActionInterface** %5, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld19debugDrawConstraintEP17btTypedConstraint(%struct.btDiscreteDynamicsWorld* %this, %struct.btTypedConstraint* %constraint) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %4 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %5 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %6 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %7 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %8 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %9 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %tr = alloca %struct.btTransform, align 8 ; [#uses=18]
- %tr7 = alloca %struct.btTransform, align 8 ; [#uses=19]
- %normal = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %axis = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %tr28 = alloca %struct.btTransform, align 8 ; [#uses=19]
- %pPrev = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %pivot44 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %normal46 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %axis1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %pCur = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %tr64 = alloca %struct.btTransform, align 8 ; [#uses=19]
- %up = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %axis77 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %ref = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %normal90 = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %bbMin = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %bbMax = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %tr103 = alloca %struct.btTransform, align 8 ; [#uses=18]
- %li_min = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %li_max = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %normal117 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %axis119 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %10 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=22]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 4 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=22]
- %15 = bitcast i32 (...)* %13 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %16 = call %struct.btActionInterface* %15(%struct.btCollisionWorld* %14) ; [#uses=2]
- %17 = getelementptr inbounds %struct.btActionInterface* %16, i32 0, i32 0 ; [#uses=1]
- %18 = load i32 (...)*** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 12 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %22 = call i32 %21(%struct.btActionInterface* %16) ; [#uses=1]
- %23 = lshr i32 %22, 11 ; [#uses=1]
- %.lobit = and i32 %23, 1 ; [#uses=1]
- %24 = trunc i32 %.lobit to i8 ; [#uses=5]
- %25 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %26 = getelementptr inbounds i32 (...)** %25, i32 4 ; [#uses=1]
- %27 = load i32 (...)** %26, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %27 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %29 = call %struct.btActionInterface* %28(%struct.btCollisionWorld* %14) ; [#uses=2]
- %30 = getelementptr inbounds %struct.btActionInterface* %29, i32 0, i32 0 ; [#uses=1]
- %31 = load i32 (...)*** %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds i32 (...)** %31, i32 12 ; [#uses=1]
- %33 = load i32 (...)** %32, align 4 ; [#uses=1]
- %34 = bitcast i32 (...)* %33 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %35 = call i32 %34(%struct.btActionInterface* %29) ; [#uses=1]
- %36 = lshr i32 %35, 12 ; [#uses=1]
- %.lobit129 = and i32 %36, 1 ; [#uses=1]
- %37 = trunc i32 %.lobit129 to i8 ; [#uses=4]
- %38 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 8 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=24]
- %40 = fcmp ugt float %39, 0.000000e+00 ; [#uses=1]
- br i1 %40, label %bb, label %return
-
-bb: ; preds = %entry
- %41 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 1, i32 0 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- switch i32 %42, label %return [
- i32 3, label %bb1
- i32 4, label %bb4
- i32 5, label %bb25
- i32 6, label %bb61
- i32 7, label %bb100
- ]
-
-bb1: ; preds = %bb
- %43 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %43, align 8
- %44 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 4
- %45 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 8
- %46 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %46, align 4
- %47 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 8
- %48 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %48, align 4
- %49 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %49, align 8
- %50 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %50, align 4
- %51 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 8
- %52 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %53, align 8
- %54 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- store float 0.000000e+00, float* %55, align 8
- %56 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 1 ; [#uses=3]
- store float 0.000000e+00, float* %56, align 4
- %57 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- store float 0.000000e+00, float* %57, align 8
- %58 = getelementptr inbounds %struct.btTransform* %tr, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %58, align 4
- %59 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8 ; [#uses=1]
- %60 = bitcast %struct.btTypedConstraint* %59 to float* ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=3]
- %62 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 1 ; [#uses=1]
- %63 = bitcast %struct.btHashInt* %62 to float* ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=3]
- %65 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 2 ; [#uses=1]
- %66 = bitcast i32* %65 to float* ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=3]
- %68 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 5 ; [#uses=1]
- %69 = load %struct.btRigidBody** %68, align 4 ; [#uses=12]
- %70 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = fmul float %71, %61 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fmul float %74, %64 ; [#uses=1]
- %76 = fadd float %72, %75 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fmul float %78, %67 ; [#uses=1]
- %80 = fadd float %76, %79 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = fadd float %80, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fmul float %85, %61 ; [#uses=1]
- %87 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=1]
- %89 = fmul float %88, %64 ; [#uses=1]
- %90 = fadd float %86, %89 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- %93 = fmul float %92, %67 ; [#uses=1]
- %94 = fadd float %90, %93 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = fadd float %94, %96 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fmul float %99, %61 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fmul float %102, %64 ; [#uses=1]
- %104 = fadd float %100, %103 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- %107 = fmul float %106, %67 ; [#uses=1]
- %108 = fadd float %104, %107 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btRigidBody* %69, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- %111 = fadd float %108, %110 ; [#uses=1]
- store float %111, float* %55, align 8
- store float %97, float* %56, align 4
- store float %83, float* %57, align 8
- store float 0.000000e+00, float* %58, align 4
- %112 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %113 = getelementptr inbounds i32 (...)** %112, i32 4 ; [#uses=1]
- %114 = load i32 (...)** %113, align 4 ; [#uses=1]
- %115 = bitcast i32 (...)* %114 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %116 = call %struct.btActionInterface* %115(%struct.btCollisionWorld* %14) ; [#uses=2]
- %117 = getelementptr inbounds %struct.btActionInterface* %116, i32 0, i32 0 ; [#uses=1]
- %118 = load i32 (...)*** %117, align 4 ; [#uses=1]
- %119 = getelementptr inbounds i32 (...)** %118, i32 14 ; [#uses=1]
- %120 = load i32 (...)** %119, align 4 ; [#uses=1]
- %121 = bitcast i32 (...)* %120 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %121(%struct.btActionInterface* %116, %struct.btTransform* %tr, float %39)
- %122 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 4 ; [#uses=3]
- %123 = bitcast i8* %122 to float* ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=3]
- %125 = getelementptr inbounds i8* %122, i32 4 ; [#uses=1]
- %126 = bitcast i8* %125 to float* ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=3]
- %128 = getelementptr inbounds i8* %122, i32 8 ; [#uses=1]
- %129 = bitcast i8* %128 to float* ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=3]
- %131 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 6 ; [#uses=1]
- %132 = load %struct.btRigidBody** %131, align 4 ; [#uses=12]
- %133 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=1]
- %135 = fmul float %134, %124 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=1]
- %138 = fmul float %137, %127 ; [#uses=1]
- %139 = fadd float %135, %138 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = fmul float %141, %130 ; [#uses=1]
- %143 = fadd float %139, %142 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = fadd float %143, %145 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %148 = load float* %147, align 4 ; [#uses=1]
- %149 = fmul float %148, %124 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=1]
- %152 = fmul float %151, %127 ; [#uses=1]
- %153 = fadd float %149, %152 ; [#uses=1]
- %154 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %155 = load float* %154, align 4 ; [#uses=1]
- %156 = fmul float %155, %130 ; [#uses=1]
- %157 = fadd float %153, %156 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=1]
- %160 = fadd float %157, %159 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fmul float %162, %124 ; [#uses=1]
- %164 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=1]
- %166 = fmul float %165, %127 ; [#uses=1]
- %167 = fadd float %163, %166 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- %170 = fmul float %169, %130 ; [#uses=1]
- %171 = fadd float %167, %170 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btRigidBody* %132, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- %174 = fadd float %171, %173 ; [#uses=1]
- store float %174, float* %55, align 8
- store float %160, float* %56, align 4
- store float %146, float* %57, align 8
- store float 0.000000e+00, float* %58, align 4
- %toBool = icmp eq i8 %24, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb3
-
-bb3: ; preds = %bb1
- %175 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %176 = getelementptr inbounds i32 (...)** %175, i32 4 ; [#uses=1]
- %177 = load i32 (...)** %176, align 4 ; [#uses=1]
- %178 = bitcast i32 (...)* %177 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %179 = call %struct.btActionInterface* %178(%struct.btCollisionWorld* %14) ; [#uses=2]
- %180 = getelementptr inbounds %struct.btActionInterface* %179, i32 0, i32 0 ; [#uses=1]
- %181 = load i32 (...)*** %180, align 4 ; [#uses=1]
- %182 = getelementptr inbounds i32 (...)** %181, i32 14 ; [#uses=1]
- %183 = load i32 (...)** %182, align 4 ; [#uses=1]
- %184 = bitcast i32 (...)* %183 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %184(%struct.btActionInterface* %179, %struct.btTransform* %tr, float %39)
- ret void
-
-bb4: ; preds = %bb
- %185 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 15 ; [#uses=1]
- %186 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 5 ; [#uses=1]
- %187 = load %struct.btRigidBody** %186, align 4 ; [#uses=12]
- %188 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %189 = load float* %188, align 4 ; [#uses=4]
- %190 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 16, i32 3 ; [#uses=1]
- %191 = bitcast %struct.btHashInt* %190 to float* ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=3]
- %193 = fmul float %189, %192 ; [#uses=1]
- %194 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %195 = load float* %194, align 4 ; [#uses=4]
- %196 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 16, i32 4 ; [#uses=1]
- %197 = bitcast i8* %196 to float* ; [#uses=1]
- %198 = load float* %197, align 4 ; [#uses=3]
- %199 = fmul float %195, %198 ; [#uses=1]
- %200 = fadd float %193, %199 ; [#uses=1]
- %201 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %202 = load float* %201, align 4 ; [#uses=4]
- %203 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 16, i32 5 ; [#uses=1]
- %204 = bitcast %struct.btRigidBody** %203 to float* ; [#uses=1]
- %205 = load float* %204, align 4 ; [#uses=3]
- %206 = fmul float %202, %205 ; [#uses=1]
- %207 = fadd float %200, %206 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=1]
- %210 = fadd float %207, %209 ; [#uses=1]
- %211 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %212 = load float* %211, align 4 ; [#uses=4]
- %213 = fmul float %212, %192 ; [#uses=1]
- %214 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %215 = load float* %214, align 4 ; [#uses=4]
- %216 = fmul float %215, %198 ; [#uses=1]
- %217 = fadd float %213, %216 ; [#uses=1]
- %218 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %219 = load float* %218, align 4 ; [#uses=4]
- %220 = fmul float %219, %205 ; [#uses=1]
- %221 = fadd float %217, %220 ; [#uses=1]
- %222 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %223 = load float* %222, align 4 ; [#uses=1]
- %224 = fadd float %221, %223 ; [#uses=1]
- %225 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %226 = load float* %225, align 4 ; [#uses=4]
- %227 = fmul float %226, %192 ; [#uses=1]
- %228 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %229 = load float* %228, align 4 ; [#uses=4]
- %230 = fmul float %229, %198 ; [#uses=1]
- %231 = fadd float %227, %230 ; [#uses=1]
- %232 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %233 = load float* %232, align 4 ; [#uses=4]
- %234 = fmul float %233, %205 ; [#uses=1]
- %235 = fadd float %231, %234 ; [#uses=1]
- %236 = getelementptr inbounds %struct.btRigidBody* %187, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %237 = load float* %236, align 4 ; [#uses=1]
- %238 = fadd float %235, %237 ; [#uses=1]
- %239 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 15, i32 2 ; [#uses=1]
- %240 = bitcast i32* %239 to float* ; [#uses=1]
- %241 = load float* %240, align 4 ; [#uses=3]
- %242 = fmul float %241, %189 ; [#uses=1]
- %243 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 15, i32 6 ; [#uses=1]
- %244 = bitcast %struct.btRigidBody** %243 to float* ; [#uses=1]
- %245 = load float* %244, align 4 ; [#uses=3]
- %246 = fmul float %245, %195 ; [#uses=1]
- %247 = fadd float %242, %246 ; [#uses=1]
- %248 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 16, i32 1 ; [#uses=1]
- %249 = bitcast %struct.btHashInt* %248 to float* ; [#uses=1]
- %250 = load float* %249, align 4 ; [#uses=3]
- %251 = fmul float %250, %202 ; [#uses=1]
- %252 = fadd float %247, %251 ; [#uses=1]
- %253 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 15, i32 1 ; [#uses=1]
- %254 = bitcast %struct.btHashInt* %253 to float* ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=3]
- %256 = fmul float %255, %189 ; [#uses=1]
- %257 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 15, i32 5 ; [#uses=1]
- %258 = bitcast %struct.btRigidBody** %257 to float* ; [#uses=1]
- %259 = load float* %258, align 4 ; [#uses=3]
- %260 = fmul float %259, %195 ; [#uses=1]
- %261 = fadd float %256, %260 ; [#uses=1]
- %262 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 16 ; [#uses=1]
- %263 = bitcast %struct.btTypedConstraint* %262 to float* ; [#uses=1]
- %264 = load float* %263, align 4 ; [#uses=3]
- %265 = fmul float %264, %202 ; [#uses=1]
- %266 = fadd float %261, %265 ; [#uses=1]
- %267 = bitcast %struct.btTypedConstraint* %185 to float* ; [#uses=1]
- %268 = load float* %267, align 4 ; [#uses=3]
- %269 = fmul float %268, %189 ; [#uses=1]
- %270 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 15, i32 4 ; [#uses=1]
- %271 = bitcast i8* %270 to float* ; [#uses=1]
- %272 = load float* %271, align 4 ; [#uses=3]
- %273 = fmul float %272, %195 ; [#uses=1]
- %274 = fadd float %269, %273 ; [#uses=1]
- %275 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 15, i32 8 ; [#uses=1]
- %276 = load float* %275, align 4 ; [#uses=3]
- %277 = fmul float %276, %202 ; [#uses=1]
- %278 = fadd float %274, %277 ; [#uses=1]
- %279 = fmul float %241, %212 ; [#uses=1]
- %280 = fmul float %245, %215 ; [#uses=1]
- %281 = fadd float %279, %280 ; [#uses=1]
- %282 = fmul float %250, %219 ; [#uses=1]
- %283 = fadd float %281, %282 ; [#uses=1]
- %284 = fmul float %255, %212 ; [#uses=1]
- %285 = fmul float %259, %215 ; [#uses=1]
- %286 = fadd float %284, %285 ; [#uses=1]
- %287 = fmul float %264, %219 ; [#uses=1]
- %288 = fadd float %286, %287 ; [#uses=1]
- %289 = fmul float %268, %212 ; [#uses=1]
- %290 = fmul float %272, %215 ; [#uses=1]
- %291 = fadd float %289, %290 ; [#uses=1]
- %292 = fmul float %276, %219 ; [#uses=1]
- %293 = fadd float %291, %292 ; [#uses=1]
- %294 = fmul float %241, %226 ; [#uses=1]
- %295 = fmul float %245, %229 ; [#uses=1]
- %296 = fadd float %294, %295 ; [#uses=1]
- %297 = fmul float %250, %233 ; [#uses=1]
- %298 = fadd float %296, %297 ; [#uses=1]
- %299 = fmul float %255, %226 ; [#uses=1]
- %300 = fmul float %259, %229 ; [#uses=1]
- %301 = fadd float %299, %300 ; [#uses=1]
- %302 = fmul float %264, %233 ; [#uses=1]
- %303 = fadd float %301, %302 ; [#uses=1]
- %304 = fmul float %268, %226 ; [#uses=1]
- %305 = fmul float %272, %229 ; [#uses=1]
- %306 = fadd float %304, %305 ; [#uses=1]
- %307 = fmul float %276, %233 ; [#uses=1]
- %308 = fadd float %306, %307 ; [#uses=1]
- %309 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %308, float* %309, align 8
- %310 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- store float %303, float* %310, align 4
- %311 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %298, float* %311, align 8
- %312 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %312, align 4
- %313 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=3]
- store float %293, float* %313, align 8
- %314 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float %288, float* %314, align 4
- %315 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=3]
- store float %283, float* %315, align 8
- %316 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %316, align 4
- %317 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- store float %278, float* %317, align 8
- %318 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float %266, float* %318, align 4
- %319 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- store float %252, float* %319, align 8
- %320 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %320, align 4
- %321 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float %238, float* %321, align 8
- %322 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float %224, float* %322, align 4
- %323 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float %210, float* %323, align 8
- %324 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %324, align 4
- %toBool11 = icmp eq i8 %24, 0 ; [#uses=2]
- br i1 %toBool11, label %bb13, label %bb12
-
-bb12: ; preds = %bb4
- %325 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %326 = getelementptr inbounds i32 (...)** %325, i32 4 ; [#uses=1]
- %327 = load i32 (...)** %326, align 4 ; [#uses=1]
- %328 = bitcast i32 (...)* %327 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %329 = call %struct.btActionInterface* %328(%struct.btCollisionWorld* %14) ; [#uses=2]
- %330 = getelementptr inbounds %struct.btActionInterface* %329, i32 0, i32 0 ; [#uses=1]
- %331 = load i32 (...)*** %330, align 4 ; [#uses=1]
- %332 = getelementptr inbounds i32 (...)** %331, i32 14 ; [#uses=1]
- %333 = load i32 (...)** %332, align 4 ; [#uses=1]
- %334 = bitcast i32 (...)* %333 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %334(%struct.btActionInterface* %329, %struct.btTransform* %tr7, float %39)
- br label %bb13
-
-bb13: ; preds = %bb12, %bb4
- %335 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 16, i32 7 ; [#uses=12]
- %336 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 6 ; [#uses=1]
- %337 = load %struct.btRigidBody** %336, align 4 ; [#uses=12]
- %338 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=4]
- %340 = getelementptr inbounds float* %335, i32 12 ; [#uses=1]
- %341 = load float* %340, align 4 ; [#uses=3]
- %342 = fmul float %339, %341 ; [#uses=1]
- %343 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %344 = load float* %343, align 4 ; [#uses=4]
- %345 = getelementptr inbounds float* %335, i32 13 ; [#uses=1]
- %346 = load float* %345, align 4 ; [#uses=3]
- %347 = fmul float %344, %346 ; [#uses=1]
- %348 = fadd float %342, %347 ; [#uses=1]
- %349 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %350 = load float* %349, align 4 ; [#uses=4]
- %351 = getelementptr inbounds float* %335, i32 14 ; [#uses=1]
- %352 = load float* %351, align 4 ; [#uses=3]
- %353 = fmul float %350, %352 ; [#uses=1]
- %354 = fadd float %348, %353 ; [#uses=1]
- %355 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %356 = load float* %355, align 4 ; [#uses=1]
- %357 = fadd float %354, %356 ; [#uses=1]
- %358 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %359 = load float* %358, align 4 ; [#uses=4]
- %360 = fmul float %359, %341 ; [#uses=1]
- %361 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %362 = load float* %361, align 4 ; [#uses=4]
- %363 = fmul float %362, %346 ; [#uses=1]
- %364 = fadd float %360, %363 ; [#uses=1]
- %365 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %366 = load float* %365, align 4 ; [#uses=4]
- %367 = fmul float %366, %352 ; [#uses=1]
- %368 = fadd float %364, %367 ; [#uses=1]
- %369 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %370 = load float* %369, align 4 ; [#uses=1]
- %371 = fadd float %368, %370 ; [#uses=1]
- %372 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %373 = load float* %372, align 4 ; [#uses=4]
- %374 = fmul float %373, %341 ; [#uses=1]
- %375 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %376 = load float* %375, align 4 ; [#uses=4]
- %377 = fmul float %376, %346 ; [#uses=1]
- %378 = fadd float %374, %377 ; [#uses=1]
- %379 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %380 = load float* %379, align 4 ; [#uses=4]
- %381 = fmul float %380, %352 ; [#uses=1]
- %382 = fadd float %378, %381 ; [#uses=1]
- %383 = getelementptr inbounds %struct.btRigidBody* %337, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %384 = load float* %383, align 4 ; [#uses=1]
- %385 = fadd float %382, %384 ; [#uses=1]
- %386 = getelementptr inbounds float* %335, i32 2 ; [#uses=1]
- %387 = load float* %386, align 4 ; [#uses=3]
- %388 = fmul float %387, %339 ; [#uses=1]
- %389 = getelementptr inbounds float* %335, i32 6 ; [#uses=1]
- %390 = load float* %389, align 4 ; [#uses=3]
- %391 = fmul float %390, %344 ; [#uses=1]
- %392 = fadd float %388, %391 ; [#uses=1]
- %393 = getelementptr inbounds float* %335, i32 10 ; [#uses=1]
- %394 = load float* %393, align 4 ; [#uses=3]
- %395 = fmul float %394, %350 ; [#uses=1]
- %396 = fadd float %392, %395 ; [#uses=1]
- %397 = getelementptr inbounds float* %335, i32 1 ; [#uses=1]
- %398 = load float* %397, align 4 ; [#uses=3]
- %399 = fmul float %398, %339 ; [#uses=1]
- %400 = getelementptr inbounds float* %335, i32 5 ; [#uses=1]
- %401 = load float* %400, align 4 ; [#uses=3]
- %402 = fmul float %401, %344 ; [#uses=1]
- %403 = fadd float %399, %402 ; [#uses=1]
- %404 = getelementptr inbounds float* %335, i32 9 ; [#uses=1]
- %405 = load float* %404, align 4 ; [#uses=3]
- %406 = fmul float %405, %350 ; [#uses=1]
- %407 = fadd float %403, %406 ; [#uses=1]
- %408 = load float* %335, align 4 ; [#uses=3]
- %409 = fmul float %408, %339 ; [#uses=1]
- %410 = getelementptr inbounds float* %335, i32 4 ; [#uses=1]
- %411 = load float* %410, align 4 ; [#uses=3]
- %412 = fmul float %411, %344 ; [#uses=1]
- %413 = fadd float %409, %412 ; [#uses=1]
- %414 = getelementptr inbounds float* %335, i32 8 ; [#uses=1]
- %415 = load float* %414, align 4 ; [#uses=3]
- %416 = fmul float %415, %350 ; [#uses=1]
- %417 = fadd float %413, %416 ; [#uses=1]
- %418 = fmul float %387, %359 ; [#uses=1]
- %419 = fmul float %390, %362 ; [#uses=1]
- %420 = fadd float %418, %419 ; [#uses=1]
- %421 = fmul float %394, %366 ; [#uses=1]
- %422 = fadd float %420, %421 ; [#uses=1]
- %423 = fmul float %398, %359 ; [#uses=1]
- %424 = fmul float %401, %362 ; [#uses=1]
- %425 = fadd float %423, %424 ; [#uses=1]
- %426 = fmul float %405, %366 ; [#uses=1]
- %427 = fadd float %425, %426 ; [#uses=1]
- %428 = fmul float %408, %359 ; [#uses=1]
- %429 = fmul float %411, %362 ; [#uses=1]
- %430 = fadd float %428, %429 ; [#uses=1]
- %431 = fmul float %415, %366 ; [#uses=1]
- %432 = fadd float %430, %431 ; [#uses=1]
- %433 = fmul float %387, %373 ; [#uses=1]
- %434 = fmul float %390, %376 ; [#uses=1]
- %435 = fadd float %433, %434 ; [#uses=1]
- %436 = fmul float %394, %380 ; [#uses=1]
- %437 = fadd float %435, %436 ; [#uses=1]
- %438 = fmul float %398, %373 ; [#uses=1]
- %439 = fmul float %401, %376 ; [#uses=1]
- %440 = fadd float %438, %439 ; [#uses=1]
- %441 = fmul float %405, %380 ; [#uses=1]
- %442 = fadd float %440, %441 ; [#uses=1]
- %443 = fmul float %408, %373 ; [#uses=1]
- %444 = fmul float %411, %376 ; [#uses=1]
- %445 = fadd float %443, %444 ; [#uses=1]
- %446 = fmul float %415, %380 ; [#uses=1]
- %447 = fadd float %445, %446 ; [#uses=1]
- store float %447, float* %309, align 8
- store float %442, float* %310, align 4
- store float %437, float* %311, align 8
- store float 0.000000e+00, float* %312, align 4
- store float %432, float* %313, align 8
- store float %427, float* %314, align 4
- store float %422, float* %315, align 8
- store float 0.000000e+00, float* %316, align 4
- store float %417, float* %317, align 8
- store float %407, float* %318, align 4
- store float %396, float* %319, align 8
- store float 0.000000e+00, float* %320, align 4
- store float %385, float* %321, align 8
- store float %371, float* %322, align 4
- store float %357, float* %323, align 8
- store float 0.000000e+00, float* %324, align 4
- br i1 %toBool11, label %bb16, label %bb15
-
-bb15: ; preds = %bb13
- %448 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %449 = getelementptr inbounds i32 (...)** %448, i32 4 ; [#uses=1]
- %450 = load i32 (...)** %449, align 4 ; [#uses=1]
- %451 = bitcast i32 (...)* %450 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %452 = call %struct.btActionInterface* %451(%struct.btCollisionWorld* %14) ; [#uses=2]
- %453 = getelementptr inbounds %struct.btActionInterface* %452, i32 0, i32 0 ; [#uses=1]
- %454 = load i32 (...)*** %453, align 4 ; [#uses=1]
- %455 = getelementptr inbounds i32 (...)** %454, i32 14 ; [#uses=1]
- %456 = load i32 (...)** %455, align 4 ; [#uses=1]
- %457 = bitcast i32 (...)* %456 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %457(%struct.btActionInterface* %452, %struct.btTransform* %tr7, float %39)
- br label %bb16
-
-bb16: ; preds = %bb15, %bb13
- %458 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 19, i32 1 ; [#uses=1]
- %459 = bitcast %struct.btHashInt* %458 to float* ; [#uses=1]
- %460 = load float* %459, align 4 ; [#uses=3]
- %461 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 19, i32 2 ; [#uses=1]
- %462 = bitcast i32* %461 to float* ; [#uses=1]
- %463 = load float* %462, align 4 ; [#uses=3]
- %464 = fcmp oeq float %460, %463 ; [#uses=1]
- br i1 %464, label %return, label %bb17
-
-bb17: ; preds = %bb16
- %465 = fcmp ogt float %460, %463 ; [#uses=3]
- %toBool20 = icmp eq i8 %37, 0 ; [#uses=1]
- br i1 %toBool20, label %return, label %bb21
-
-bb21: ; preds = %bb17
- %466 = zext i1 %465 to i8 ; [#uses=1]
- %drawSect.0 = xor i8 %466, 1 ; [#uses=1]
- %maxAng.0 = select i1 %465, float 0x401921FB60000000, float %463 ; [#uses=1]
- %minAng.0 = select i1 %465, float 0.000000e+00, float %460 ; [#uses=1]
- %467 = getelementptr inbounds %struct.btTransform* %tr7, i32 0, i32 1 ; [#uses=1]
- %468 = load float* %311, align 8 ; [#uses=1]
- %469 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %468, float* %469, align 8
- %470 = load float* %315, align 8 ; [#uses=1]
- %471 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %470, float* %471, align 4
- %472 = load float* %319, align 8 ; [#uses=1]
- %473 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %472, float* %473, align 8
- %474 = getelementptr inbounds %struct.btQuadWord* %normal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %474, align 4
- %475 = load float* %309, align 8 ; [#uses=1]
- %476 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %475, float* %476, align 8
- %477 = load float* %313, align 8 ; [#uses=1]
- %478 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %477, float* %478, align 4
- %479 = load float* %317, align 8 ; [#uses=1]
- %480 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %479, float* %480, align 8
- %481 = getelementptr inbounds %struct.btQuadWord* %axis, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %481, align 4
- %482 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %483 = getelementptr inbounds i32 (...)** %482, i32 4 ; [#uses=1]
- %484 = load i32 (...)** %483, align 4 ; [#uses=1]
- %485 = bitcast i32 (...)* %484 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %486 = call %struct.btActionInterface* %485(%struct.btCollisionWorld* %14) ; [#uses=2]
- %487 = getelementptr inbounds %struct.btActionInterface* %486, i32 0, i32 0 ; [#uses=1]
- %488 = load i32 (...)*** %487, align 4 ; [#uses=1]
- %489 = getelementptr inbounds i32 (...)** %488, i32 15 ; [#uses=1]
- %490 = load i32 (...)** %489, align 4 ; [#uses=1]
- %491 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %491, align 8
- %492 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %492, align 4
- %493 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %493, align 8
- %494 = getelementptr inbounds %struct.btQuadWord* %9, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %494, align 4
- %495 = bitcast i32 (...)* %490 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %495(%struct.btActionInterface* %486, %struct.btQuadWord* %467, %struct.btQuadWord* %normal, %struct.btQuadWord* %axis, float %39, float %39, float %minAng.0, float %maxAng.0, %struct.btQuadWord* %9, i8 zeroext %drawSect.0, float 1.000000e+01)
- ret void
-
-bb25: ; preds = %bb
- %496 = bitcast %struct.btTypedConstraint* %constraint to %struct.btConeTwistConstraint* ; [#uses=2]
- %497 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8 ; [#uses=1]
- %498 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 5 ; [#uses=2]
- %499 = load %struct.btRigidBody** %498, align 4 ; [#uses=12]
- %500 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %501 = load float* %500, align 4 ; [#uses=4]
- %502 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 9, i32 3 ; [#uses=1]
- %503 = bitcast %struct.btHashInt* %502 to float* ; [#uses=2]
- %504 = load float* %503, align 4 ; [#uses=3]
- %505 = fmul float %501, %504 ; [#uses=1]
- %506 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %507 = load float* %506, align 4 ; [#uses=4]
- %508 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 9, i32 4 ; [#uses=1]
- %509 = bitcast i8* %508 to float* ; [#uses=2]
- %510 = load float* %509, align 4 ; [#uses=3]
- %511 = fmul float %507, %510 ; [#uses=1]
- %512 = fadd float %505, %511 ; [#uses=1]
- %513 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %514 = load float* %513, align 4 ; [#uses=4]
- %515 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 9, i32 5 ; [#uses=1]
- %516 = bitcast %struct.btRigidBody** %515 to float* ; [#uses=2]
- %517 = load float* %516, align 4 ; [#uses=3]
- %518 = fmul float %514, %517 ; [#uses=1]
- %519 = fadd float %512, %518 ; [#uses=1]
- %520 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %521 = load float* %520, align 4 ; [#uses=1]
- %522 = fadd float %519, %521 ; [#uses=1]
- %523 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %524 = load float* %523, align 4 ; [#uses=4]
- %525 = fmul float %524, %504 ; [#uses=1]
- %526 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %527 = load float* %526, align 4 ; [#uses=4]
- %528 = fmul float %527, %510 ; [#uses=1]
- %529 = fadd float %525, %528 ; [#uses=1]
- %530 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %531 = load float* %530, align 4 ; [#uses=4]
- %532 = fmul float %531, %517 ; [#uses=1]
- %533 = fadd float %529, %532 ; [#uses=1]
- %534 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %535 = load float* %534, align 4 ; [#uses=1]
- %536 = fadd float %533, %535 ; [#uses=1]
- %537 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %538 = load float* %537, align 4 ; [#uses=4]
- %539 = fmul float %538, %504 ; [#uses=1]
- %540 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %541 = load float* %540, align 4 ; [#uses=4]
- %542 = fmul float %541, %510 ; [#uses=1]
- %543 = fadd float %539, %542 ; [#uses=1]
- %544 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %545 = load float* %544, align 4 ; [#uses=4]
- %546 = fmul float %545, %517 ; [#uses=1]
- %547 = fadd float %543, %546 ; [#uses=1]
- %548 = getelementptr inbounds %struct.btRigidBody* %499, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %549 = load float* %548, align 4 ; [#uses=1]
- %550 = fadd float %547, %549 ; [#uses=1]
- %551 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 2 ; [#uses=1]
- %552 = bitcast i32* %551 to float* ; [#uses=2]
- %553 = load float* %552, align 4 ; [#uses=3]
- %554 = fmul float %553, %501 ; [#uses=1]
- %555 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 6 ; [#uses=1]
- %556 = bitcast %struct.btRigidBody** %555 to float* ; [#uses=2]
- %557 = load float* %556, align 4 ; [#uses=3]
- %558 = fmul float %557, %507 ; [#uses=1]
- %559 = fadd float %554, %558 ; [#uses=1]
- %560 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 9, i32 1 ; [#uses=1]
- %561 = bitcast %struct.btHashInt* %560 to float* ; [#uses=2]
- %562 = load float* %561, align 4 ; [#uses=3]
- %563 = fmul float %562, %514 ; [#uses=1]
- %564 = fadd float %559, %563 ; [#uses=1]
- %565 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 1 ; [#uses=1]
- %566 = bitcast %struct.btHashInt* %565 to float* ; [#uses=2]
- %567 = load float* %566, align 4 ; [#uses=3]
- %568 = fmul float %567, %501 ; [#uses=1]
- %569 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 5 ; [#uses=1]
- %570 = bitcast %struct.btRigidBody** %569 to float* ; [#uses=2]
- %571 = load float* %570, align 4 ; [#uses=3]
- %572 = fmul float %571, %507 ; [#uses=1]
- %573 = fadd float %568, %572 ; [#uses=1]
- %574 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 9 ; [#uses=1]
- %575 = bitcast %struct.btTypedConstraint* %574 to float* ; [#uses=2]
- %576 = load float* %575, align 4 ; [#uses=3]
- %577 = fmul float %576, %514 ; [#uses=1]
- %578 = fadd float %573, %577 ; [#uses=1]
- %579 = bitcast %struct.btTypedConstraint* %497 to float* ; [#uses=2]
- %580 = load float* %579, align 4 ; [#uses=3]
- %581 = fmul float %580, %501 ; [#uses=1]
- %582 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 4 ; [#uses=1]
- %583 = bitcast i8* %582 to float* ; [#uses=2]
- %584 = load float* %583, align 4 ; [#uses=3]
- %585 = fmul float %584, %507 ; [#uses=1]
- %586 = fadd float %581, %585 ; [#uses=1]
- %587 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 8, i32 8 ; [#uses=2]
- %588 = load float* %587, align 4 ; [#uses=3]
- %589 = fmul float %588, %514 ; [#uses=1]
- %590 = fadd float %586, %589 ; [#uses=1]
- %591 = fmul float %553, %524 ; [#uses=1]
- %592 = fmul float %557, %527 ; [#uses=1]
- %593 = fadd float %591, %592 ; [#uses=1]
- %594 = fmul float %562, %531 ; [#uses=1]
- %595 = fadd float %593, %594 ; [#uses=1]
- %596 = fmul float %567, %524 ; [#uses=1]
- %597 = fmul float %571, %527 ; [#uses=1]
- %598 = fadd float %596, %597 ; [#uses=1]
- %599 = fmul float %576, %531 ; [#uses=1]
- %600 = fadd float %598, %599 ; [#uses=1]
- %601 = fmul float %580, %524 ; [#uses=1]
- %602 = fmul float %584, %527 ; [#uses=1]
- %603 = fadd float %601, %602 ; [#uses=1]
- %604 = fmul float %588, %531 ; [#uses=1]
- %605 = fadd float %603, %604 ; [#uses=1]
- %606 = fmul float %553, %538 ; [#uses=1]
- %607 = fmul float %557, %541 ; [#uses=1]
- %608 = fadd float %606, %607 ; [#uses=1]
- %609 = fmul float %562, %545 ; [#uses=1]
- %610 = fadd float %608, %609 ; [#uses=1]
- %611 = fmul float %567, %538 ; [#uses=1]
- %612 = fmul float %571, %541 ; [#uses=1]
- %613 = fadd float %611, %612 ; [#uses=1]
- %614 = fmul float %576, %545 ; [#uses=1]
- %615 = fadd float %613, %614 ; [#uses=1]
- %616 = fmul float %580, %538 ; [#uses=1]
- %617 = fmul float %584, %541 ; [#uses=1]
- %618 = fadd float %616, %617 ; [#uses=1]
- %619 = fmul float %588, %545 ; [#uses=1]
- %620 = fadd float %618, %619 ; [#uses=1]
- %621 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=5]
- store float %620, float* %621, align 8
- %622 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=5]
- store float %615, float* %622, align 4
- %623 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=5]
- store float %610, float* %623, align 8
- %624 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %624, align 4
- %625 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=5]
- store float %605, float* %625, align 8
- %626 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=5]
- store float %600, float* %626, align 4
- %627 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=5]
- store float %595, float* %627, align 8
- %628 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %628, align 4
- %629 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=5]
- store float %590, float* %629, align 8
- %630 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=5]
- store float %578, float* %630, align 4
- %631 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=5]
- store float %564, float* %631, align 8
- %632 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %632, align 4
- %633 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 1, i32 0, i32 0 ; [#uses=5]
- store float %550, float* %633, align 8
- %634 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 1, i32 0, i32 1 ; [#uses=5]
- store float %536, float* %634, align 4
- %635 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 1, i32 0, i32 2 ; [#uses=5]
- store float %522, float* %635, align 8
- %636 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %636, align 4
- %toBool29 = icmp eq i8 %24, 0 ; [#uses=2]
- br i1 %toBool29, label %bb31, label %bb30
-
-bb30: ; preds = %bb25
- %637 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %638 = getelementptr inbounds i32 (...)** %637, i32 4 ; [#uses=1]
- %639 = load i32 (...)** %638, align 4 ; [#uses=1]
- %640 = bitcast i32 (...)* %639 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %641 = call %struct.btActionInterface* %640(%struct.btCollisionWorld* %14) ; [#uses=2]
- %642 = getelementptr inbounds %struct.btActionInterface* %641, i32 0, i32 0 ; [#uses=1]
- %643 = load i32 (...)*** %642, align 4 ; [#uses=1]
- %644 = getelementptr inbounds i32 (...)** %643, i32 14 ; [#uses=1]
- %645 = load i32 (...)** %644, align 4 ; [#uses=1]
- %646 = bitcast i32 (...)* %645 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %646(%struct.btActionInterface* %641, %struct.btTransform* %tr28, float %39)
- br label %bb31
-
-bb31: ; preds = %bb30, %bb25
- %647 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 9, i32 7 ; [#uses=13]
- %648 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 6 ; [#uses=2]
- %649 = load %struct.btRigidBody** %648, align 4 ; [#uses=12]
- %650 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %651 = load float* %650, align 4 ; [#uses=4]
- %652 = getelementptr inbounds float* %647, i32 12 ; [#uses=2]
- %653 = load float* %652, align 4 ; [#uses=3]
- %654 = fmul float %651, %653 ; [#uses=1]
- %655 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %656 = load float* %655, align 4 ; [#uses=4]
- %657 = getelementptr inbounds float* %647, i32 13 ; [#uses=2]
- %658 = load float* %657, align 4 ; [#uses=3]
- %659 = fmul float %656, %658 ; [#uses=1]
- %660 = fadd float %654, %659 ; [#uses=1]
- %661 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %662 = load float* %661, align 4 ; [#uses=4]
- %663 = getelementptr inbounds float* %647, i32 14 ; [#uses=2]
- %664 = load float* %663, align 4 ; [#uses=3]
- %665 = fmul float %662, %664 ; [#uses=1]
- %666 = fadd float %660, %665 ; [#uses=1]
- %667 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %668 = load float* %667, align 4 ; [#uses=1]
- %669 = fadd float %666, %668 ; [#uses=1]
- %670 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %671 = load float* %670, align 4 ; [#uses=4]
- %672 = fmul float %671, %653 ; [#uses=1]
- %673 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %674 = load float* %673, align 4 ; [#uses=4]
- %675 = fmul float %674, %658 ; [#uses=1]
- %676 = fadd float %672, %675 ; [#uses=1]
- %677 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %678 = load float* %677, align 4 ; [#uses=4]
- %679 = fmul float %678, %664 ; [#uses=1]
- %680 = fadd float %676, %679 ; [#uses=1]
- %681 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %682 = load float* %681, align 4 ; [#uses=1]
- %683 = fadd float %680, %682 ; [#uses=1]
- %684 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %685 = load float* %684, align 4 ; [#uses=4]
- %686 = fmul float %685, %653 ; [#uses=1]
- %687 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %688 = load float* %687, align 4 ; [#uses=4]
- %689 = fmul float %688, %658 ; [#uses=1]
- %690 = fadd float %686, %689 ; [#uses=1]
- %691 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %692 = load float* %691, align 4 ; [#uses=4]
- %693 = fmul float %692, %664 ; [#uses=1]
- %694 = fadd float %690, %693 ; [#uses=1]
- %695 = getelementptr inbounds %struct.btRigidBody* %649, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %696 = load float* %695, align 4 ; [#uses=1]
- %697 = fadd float %694, %696 ; [#uses=1]
- %698 = getelementptr inbounds float* %647, i32 2 ; [#uses=2]
- %699 = load float* %698, align 4 ; [#uses=3]
- %700 = fmul float %699, %651 ; [#uses=1]
- %701 = getelementptr inbounds float* %647, i32 6 ; [#uses=2]
- %702 = load float* %701, align 4 ; [#uses=3]
- %703 = fmul float %702, %656 ; [#uses=1]
- %704 = fadd float %700, %703 ; [#uses=1]
- %705 = getelementptr inbounds float* %647, i32 10 ; [#uses=2]
- %706 = load float* %705, align 4 ; [#uses=3]
- %707 = fmul float %706, %662 ; [#uses=1]
- %708 = fadd float %704, %707 ; [#uses=1]
- %709 = getelementptr inbounds float* %647, i32 1 ; [#uses=2]
- %710 = load float* %709, align 4 ; [#uses=3]
- %711 = fmul float %710, %651 ; [#uses=1]
- %712 = getelementptr inbounds float* %647, i32 5 ; [#uses=2]
- %713 = load float* %712, align 4 ; [#uses=3]
- %714 = fmul float %713, %656 ; [#uses=1]
- %715 = fadd float %711, %714 ; [#uses=1]
- %716 = getelementptr inbounds float* %647, i32 9 ; [#uses=2]
- %717 = load float* %716, align 4 ; [#uses=3]
- %718 = fmul float %717, %662 ; [#uses=1]
- %719 = fadd float %715, %718 ; [#uses=1]
- %720 = load float* %647, align 4 ; [#uses=3]
- %721 = fmul float %720, %651 ; [#uses=1]
- %722 = getelementptr inbounds float* %647, i32 4 ; [#uses=2]
- %723 = load float* %722, align 4 ; [#uses=3]
- %724 = fmul float %723, %656 ; [#uses=1]
- %725 = fadd float %721, %724 ; [#uses=1]
- %726 = getelementptr inbounds float* %647, i32 8 ; [#uses=2]
- %727 = load float* %726, align 4 ; [#uses=3]
- %728 = fmul float %727, %662 ; [#uses=1]
- %729 = fadd float %725, %728 ; [#uses=1]
- %730 = fmul float %699, %671 ; [#uses=1]
- %731 = fmul float %702, %674 ; [#uses=1]
- %732 = fadd float %730, %731 ; [#uses=1]
- %733 = fmul float %706, %678 ; [#uses=1]
- %734 = fadd float %732, %733 ; [#uses=1]
- %735 = fmul float %710, %671 ; [#uses=1]
- %736 = fmul float %713, %674 ; [#uses=1]
- %737 = fadd float %735, %736 ; [#uses=1]
- %738 = fmul float %717, %678 ; [#uses=1]
- %739 = fadd float %737, %738 ; [#uses=1]
- %740 = fmul float %720, %671 ; [#uses=1]
- %741 = fmul float %723, %674 ; [#uses=1]
- %742 = fadd float %740, %741 ; [#uses=1]
- %743 = fmul float %727, %678 ; [#uses=1]
- %744 = fadd float %742, %743 ; [#uses=1]
- %745 = fmul float %699, %685 ; [#uses=1]
- %746 = fmul float %702, %688 ; [#uses=1]
- %747 = fadd float %745, %746 ; [#uses=1]
- %748 = fmul float %706, %692 ; [#uses=1]
- %749 = fadd float %747, %748 ; [#uses=1]
- %750 = fmul float %710, %685 ; [#uses=1]
- %751 = fmul float %713, %688 ; [#uses=1]
- %752 = fadd float %750, %751 ; [#uses=1]
- %753 = fmul float %717, %692 ; [#uses=1]
- %754 = fadd float %752, %753 ; [#uses=1]
- %755 = fmul float %720, %685 ; [#uses=1]
- %756 = fmul float %723, %688 ; [#uses=1]
- %757 = fadd float %755, %756 ; [#uses=1]
- %758 = fmul float %727, %692 ; [#uses=1]
- %759 = fadd float %757, %758 ; [#uses=1]
- store float %759, float* %621, align 8
- store float %754, float* %622, align 4
- store float %749, float* %623, align 8
- store float 0.000000e+00, float* %624, align 4
- store float %744, float* %625, align 8
- store float %739, float* %626, align 4
- store float %734, float* %627, align 8
- store float 0.000000e+00, float* %628, align 4
- store float %729, float* %629, align 8
- store float %719, float* %630, align 4
- store float %708, float* %631, align 8
- store float 0.000000e+00, float* %632, align 4
- store float %697, float* %633, align 8
- store float %683, float* %634, align 4
- store float %669, float* %635, align 8
- store float 0.000000e+00, float* %636, align 4
- br i1 %toBool29, label %bb34, label %bb33
-
-bb33: ; preds = %bb31
- %760 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %761 = getelementptr inbounds i32 (...)** %760, i32 4 ; [#uses=1]
- %762 = load i32 (...)** %761, align 4 ; [#uses=1]
- %763 = bitcast i32 (...)* %762 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %764 = call %struct.btActionInterface* %763(%struct.btCollisionWorld* %14) ; [#uses=2]
- %765 = getelementptr inbounds %struct.btActionInterface* %764, i32 0, i32 0 ; [#uses=1]
- %766 = load i32 (...)*** %765, align 4 ; [#uses=1]
- %767 = getelementptr inbounds i32 (...)** %766, i32 14 ; [#uses=1]
- %768 = load i32 (...)** %767, align 4 ; [#uses=1]
- %769 = bitcast i32 (...)* %768 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %769(%struct.btActionInterface* %764, %struct.btTransform* %tr28, float %39)
- br label %bb34
-
-bb34: ; preds = %bb33, %bb31
- %toBool35 = icmp eq i8 %37, 0 ; [#uses=1]
- br i1 %toBool35, label %return, label %bb.nph
-
-bb.nph: ; preds = %bb34
- call void @_ZNK21btConeTwistConstraint16GetPointForAngleEff(%struct.btQuadWord* noalias sret %pPrev, %struct.btConeTwistConstraint* %496, float 0x401858EB60000000, float %39)
- %770 = load float* %629, align 8 ; [#uses=1]
- %771 = getelementptr inbounds %struct.btQuadWord* %pPrev, i32 0, i32 0, i32 0 ; [#uses=3]
- %772 = load float* %771, align 8 ; [#uses=3]
- %773 = fmul float %770, %772 ; [#uses=1]
- %774 = load float* %630, align 4 ; [#uses=1]
- %775 = getelementptr inbounds %struct.btQuadWord* %pPrev, i32 0, i32 0, i32 1 ; [#uses=3]
- %776 = load float* %775, align 4 ; [#uses=3]
- %777 = fmul float %774, %776 ; [#uses=1]
- %778 = fadd float %773, %777 ; [#uses=1]
- %779 = load float* %631, align 8 ; [#uses=1]
- %780 = getelementptr inbounds %struct.btQuadWord* %pPrev, i32 0, i32 0, i32 2 ; [#uses=3]
- %781 = load float* %780, align 8 ; [#uses=3]
- %782 = fmul float %779, %781 ; [#uses=1]
- %783 = fadd float %778, %782 ; [#uses=1]
- %784 = load float* %635, align 8 ; [#uses=1]
- %785 = fadd float %783, %784 ; [#uses=1]
- %786 = load float* %625, align 8 ; [#uses=1]
- %787 = fmul float %786, %772 ; [#uses=1]
- %788 = load float* %626, align 4 ; [#uses=1]
- %789 = fmul float %788, %776 ; [#uses=1]
- %790 = fadd float %787, %789 ; [#uses=1]
- %791 = load float* %627, align 8 ; [#uses=1]
- %792 = fmul float %791, %781 ; [#uses=1]
- %793 = fadd float %790, %792 ; [#uses=1]
- %794 = load float* %634, align 4 ; [#uses=1]
- %795 = fadd float %793, %794 ; [#uses=1]
- %796 = load float* %621, align 8 ; [#uses=1]
- %797 = fmul float %796, %772 ; [#uses=1]
- %798 = load float* %622, align 4 ; [#uses=1]
- %799 = fmul float %798, %776 ; [#uses=1]
- %800 = fadd float %797, %799 ; [#uses=1]
- %801 = load float* %623, align 8 ; [#uses=1]
- %802 = fmul float %801, %781 ; [#uses=1]
- %803 = fadd float %800, %802 ; [#uses=1]
- %804 = load float* %633, align 8 ; [#uses=1]
- %805 = fadd float %803, %804 ; [#uses=1]
- store float %805, float* %771, align 8
- store float %795, float* %775, align 4
- store float %785, float* %780, align 8
- %806 = getelementptr inbounds %struct.btQuadWord* %pPrev, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %806, align 4
- %807 = getelementptr inbounds %struct.btQuadWord* %pCur, i32 0, i32 0, i32 0 ; [#uses=3]
- %808 = getelementptr inbounds %struct.btQuadWord* %pCur, i32 0, i32 0, i32 1 ; [#uses=3]
- %809 = getelementptr inbounds %struct.btQuadWord* %pCur, i32 0, i32 0, i32 2 ; [#uses=3]
- %810 = getelementptr inbounds %struct.btQuadWord* %pCur, i32 0, i32 0, i32 3 ; [#uses=2]
- %811 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 0 ; [#uses=1]
- %812 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 1 ; [#uses=1]
- %813 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 2 ; [#uses=1]
- %814 = getelementptr inbounds %struct.btQuadWord* %8, i32 0, i32 0, i32 3 ; [#uses=1]
- %815 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 0 ; [#uses=1]
- %816 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 1 ; [#uses=1]
- %817 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 2 ; [#uses=1]
- %818 = getelementptr inbounds %struct.btQuadWord* %7, i32 0, i32 0, i32 3 ; [#uses=1]
- %819 = getelementptr inbounds %struct.btTransform* %tr28, i32 0, i32 1 ; [#uses=1]
- br label %bb50
-
-bb50: ; preds = %bb54, %bb.nph
- %820 = phi i32 [ 0, %bb.nph ], [ %883, %bb54 ] ; [#uses=3]
- %821 = sitofp i32 %820 to float ; [#uses=1]
- %822 = fmul float %821, 0x401921FB40000000 ; [#uses=1]
- %823 = fdiv float %822, 3.200000e+01 ; [#uses=1]
- call void @_ZNK21btConeTwistConstraint16GetPointForAngleEff(%struct.btQuadWord* noalias sret %pCur, %struct.btConeTwistConstraint* %496, float %823, float %39)
- %824 = load float* %629, align 8 ; [#uses=1]
- %825 = load float* %807, align 8 ; [#uses=3]
- %826 = fmul float %824, %825 ; [#uses=1]
- %827 = load float* %630, align 4 ; [#uses=1]
- %828 = load float* %808, align 4 ; [#uses=3]
- %829 = fmul float %827, %828 ; [#uses=1]
- %830 = fadd float %826, %829 ; [#uses=1]
- %831 = load float* %631, align 8 ; [#uses=1]
- %832 = load float* %809, align 8 ; [#uses=3]
- %833 = fmul float %831, %832 ; [#uses=1]
- %834 = fadd float %830, %833 ; [#uses=1]
- %835 = load float* %635, align 8 ; [#uses=1]
- %836 = fadd float %834, %835 ; [#uses=1]
- %837 = load float* %625, align 8 ; [#uses=1]
- %838 = fmul float %837, %825 ; [#uses=1]
- %839 = load float* %626, align 4 ; [#uses=1]
- %840 = fmul float %839, %828 ; [#uses=1]
- %841 = fadd float %838, %840 ; [#uses=1]
- %842 = load float* %627, align 8 ; [#uses=1]
- %843 = fmul float %842, %832 ; [#uses=1]
- %844 = fadd float %841, %843 ; [#uses=1]
- %845 = load float* %634, align 4 ; [#uses=1]
- %846 = fadd float %844, %845 ; [#uses=1]
- %847 = load float* %621, align 8 ; [#uses=1]
- %848 = fmul float %847, %825 ; [#uses=1]
- %849 = load float* %622, align 4 ; [#uses=1]
- %850 = fmul float %849, %828 ; [#uses=1]
- %851 = fadd float %848, %850 ; [#uses=1]
- %852 = load float* %623, align 8 ; [#uses=1]
- %853 = fmul float %852, %832 ; [#uses=1]
- %854 = fadd float %851, %853 ; [#uses=1]
- %855 = load float* %633, align 8 ; [#uses=1]
- %856 = fadd float %854, %855 ; [#uses=1]
- store float %856, float* %807, align 8
- store float %846, float* %808, align 4
- store float %836, float* %809, align 8
- store float 0.000000e+00, float* %810, align 4
- %857 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %858 = getelementptr inbounds i32 (...)** %857, i32 4 ; [#uses=1]
- %859 = load i32 (...)** %858, align 4 ; [#uses=1]
- %860 = bitcast i32 (...)* %859 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %861 = call %struct.btActionInterface* %860(%struct.btCollisionWorld* %14) ; [#uses=2]
- %862 = getelementptr inbounds %struct.btActionInterface* %861, i32 0, i32 0 ; [#uses=1]
- %863 = load i32 (...)*** %862, align 4 ; [#uses=1]
- %864 = getelementptr inbounds i32 (...)** %863, i32 2 ; [#uses=1]
- %865 = load i32 (...)** %864, align 4 ; [#uses=1]
- store float 0.000000e+00, float* %811, align 8
- store float 0.000000e+00, float* %812, align 4
- store float 0.000000e+00, float* %813, align 8
- store float 0.000000e+00, float* %814, align 4
- %866 = bitcast i32 (...)* %865 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %866(%struct.btActionInterface* %861, %struct.btQuadWord* %pPrev, %struct.btQuadWord* %pCur, %struct.btQuadWord* %8)
- %867 = and i32 %820, 3 ; [#uses=1]
- %868 = icmp eq i32 %867, 0 ; [#uses=1]
- br i1 %868, label %bb53, label %bb54
-
-bb53: ; preds = %bb50
- %869 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %870 = getelementptr inbounds i32 (...)** %869, i32 4 ; [#uses=1]
- %871 = load i32 (...)** %870, align 4 ; [#uses=1]
- %872 = bitcast i32 (...)* %871 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %873 = call %struct.btActionInterface* %872(%struct.btCollisionWorld* %14) ; [#uses=2]
- %874 = getelementptr inbounds %struct.btActionInterface* %873, i32 0, i32 0 ; [#uses=1]
- %875 = load i32 (...)*** %874, align 4 ; [#uses=1]
- %876 = getelementptr inbounds i32 (...)** %875, i32 2 ; [#uses=1]
- %877 = load i32 (...)** %876, align 4 ; [#uses=1]
- store float 0.000000e+00, float* %815, align 8
- store float 0.000000e+00, float* %816, align 4
- store float 0.000000e+00, float* %817, align 8
- store float 0.000000e+00, float* %818, align 4
- %878 = bitcast i32 (...)* %877 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %878(%struct.btActionInterface* %873, %struct.btQuadWord* %819, %struct.btQuadWord* %pCur, %struct.btQuadWord* %7)
- br label %bb54
-
-bb54: ; preds = %bb53, %bb50
- %879 = load float* %807, align 8 ; [#uses=1]
- store float %879, float* %771, align 8
- %880 = load float* %808, align 4 ; [#uses=1]
- store float %880, float* %775, align 4
- %881 = load float* %809, align 8 ; [#uses=1]
- store float %881, float* %780, align 8
- %882 = load float* %810, align 4 ; [#uses=1]
- store float %882, float* %806, align 4
- %883 = add nsw i32 %820, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %883, 32 ; [#uses=1]
- br i1 %exitcond, label %bb56, label %bb50
-
-bb56: ; preds = %bb54
- %884 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 12, i32 2 ; [#uses=1]
- %885 = bitcast i32* %884 to float* ; [#uses=1]
- %886 = load float* %885, align 4 ; [#uses=2]
- %887 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 13, i32 8 ; [#uses=1]
- %888 = load float* %887, align 4 ; [#uses=2]
- %889 = load %struct.btRigidBody** %648, align 4 ; [#uses=13]
- %890 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 4 ; [#uses=1]
- %891 = load float* %890, align 4 ; [#uses=1]
- %892 = fcmp ogt float %891, 0.000000e+00 ; [#uses=1]
- br i1 %892, label %bb58, label %bb59
-
-bb58: ; preds = %bb56
- %893 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %894 = load float* %893, align 4 ; [#uses=4]
- %895 = load float* %652, align 4 ; [#uses=3]
- %896 = fmul float %894, %895 ; [#uses=1]
- %897 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %898 = load float* %897, align 4 ; [#uses=4]
- %899 = load float* %657, align 4 ; [#uses=3]
- %900 = fmul float %898, %899 ; [#uses=1]
- %901 = fadd float %896, %900 ; [#uses=1]
- %902 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %903 = load float* %902, align 4 ; [#uses=4]
- %904 = load float* %663, align 4 ; [#uses=3]
- %905 = fmul float %903, %904 ; [#uses=1]
- %906 = fadd float %901, %905 ; [#uses=1]
- %907 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %908 = load float* %907, align 4 ; [#uses=1]
- %909 = fadd float %906, %908 ; [#uses=1]
- %910 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %911 = load float* %910, align 4 ; [#uses=4]
- %912 = fmul float %911, %895 ; [#uses=1]
- %913 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %914 = load float* %913, align 4 ; [#uses=4]
- %915 = fmul float %914, %899 ; [#uses=1]
- %916 = fadd float %912, %915 ; [#uses=1]
- %917 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %918 = load float* %917, align 4 ; [#uses=4]
- %919 = fmul float %918, %904 ; [#uses=1]
- %920 = fadd float %916, %919 ; [#uses=1]
- %921 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %922 = load float* %921, align 4 ; [#uses=1]
- %923 = fadd float %920, %922 ; [#uses=1]
- %924 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %925 = load float* %924, align 4 ; [#uses=4]
- %926 = fmul float %925, %895 ; [#uses=1]
- %927 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %928 = load float* %927, align 4 ; [#uses=4]
- %929 = fmul float %928, %899 ; [#uses=1]
- %930 = fadd float %926, %929 ; [#uses=1]
- %931 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %932 = load float* %931, align 4 ; [#uses=4]
- %933 = fmul float %932, %904 ; [#uses=1]
- %934 = fadd float %930, %933 ; [#uses=1]
- %935 = getelementptr inbounds %struct.btRigidBody* %889, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %936 = load float* %935, align 4 ; [#uses=1]
- %937 = fadd float %934, %936 ; [#uses=1]
- %938 = load float* %698, align 4 ; [#uses=3]
- %939 = fmul float %938, %894 ; [#uses=1]
- %940 = load float* %701, align 4 ; [#uses=3]
- %941 = fmul float %940, %898 ; [#uses=1]
- %942 = fadd float %939, %941 ; [#uses=1]
- %943 = load float* %705, align 4 ; [#uses=3]
- %944 = fmul float %943, %903 ; [#uses=1]
- %945 = fadd float %942, %944 ; [#uses=1]
- %946 = load float* %709, align 4 ; [#uses=3]
- %947 = fmul float %946, %894 ; [#uses=1]
- %948 = load float* %712, align 4 ; [#uses=3]
- %949 = fmul float %948, %898 ; [#uses=1]
- %950 = fadd float %947, %949 ; [#uses=1]
- %951 = load float* %716, align 4 ; [#uses=3]
- %952 = fmul float %951, %903 ; [#uses=1]
- %953 = fadd float %950, %952 ; [#uses=1]
- %954 = load float* %647, align 4 ; [#uses=3]
- %955 = fmul float %954, %894 ; [#uses=1]
- %956 = load float* %722, align 4 ; [#uses=3]
- %957 = fmul float %956, %898 ; [#uses=1]
- %958 = fadd float %955, %957 ; [#uses=1]
- %959 = load float* %726, align 4 ; [#uses=3]
- %960 = fmul float %959, %903 ; [#uses=1]
- %961 = fadd float %958, %960 ; [#uses=1]
- %962 = fmul float %938, %911 ; [#uses=1]
- %963 = fmul float %940, %914 ; [#uses=1]
- %964 = fadd float %962, %963 ; [#uses=1]
- %965 = fmul float %943, %918 ; [#uses=1]
- %966 = fadd float %964, %965 ; [#uses=1]
- %967 = fmul float %946, %911 ; [#uses=1]
- %968 = fmul float %948, %914 ; [#uses=1]
- %969 = fadd float %967, %968 ; [#uses=1]
- %970 = fmul float %951, %918 ; [#uses=1]
- %971 = fadd float %969, %970 ; [#uses=1]
- %972 = fmul float %954, %911 ; [#uses=1]
- %973 = fmul float %956, %914 ; [#uses=1]
- %974 = fadd float %972, %973 ; [#uses=1]
- %975 = fmul float %959, %918 ; [#uses=1]
- %976 = fadd float %974, %975 ; [#uses=1]
- %977 = fmul float %938, %925 ; [#uses=1]
- %978 = fmul float %940, %928 ; [#uses=1]
- %979 = fadd float %977, %978 ; [#uses=1]
- %980 = fmul float %943, %932 ; [#uses=1]
- %981 = fadd float %979, %980 ; [#uses=1]
- %982 = fmul float %946, %925 ; [#uses=1]
- %983 = fmul float %948, %928 ; [#uses=1]
- %984 = fadd float %982, %983 ; [#uses=1]
- %985 = fmul float %951, %932 ; [#uses=1]
- %986 = fadd float %984, %985 ; [#uses=1]
- %987 = fmul float %954, %925 ; [#uses=1]
- %988 = fmul float %956, %928 ; [#uses=1]
- %989 = fadd float %987, %988 ; [#uses=1]
- %990 = fmul float %959, %932 ; [#uses=1]
- %991 = fadd float %989, %990 ; [#uses=1]
- br label %bb60
-
-bb59: ; preds = %bb56
- %992 = load %struct.btRigidBody** %498, align 4 ; [#uses=12]
- %993 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %994 = load float* %993, align 4 ; [#uses=4]
- %995 = load float* %503, align 4 ; [#uses=3]
- %996 = fmul float %994, %995 ; [#uses=1]
- %997 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %998 = load float* %997, align 4 ; [#uses=4]
- %999 = load float* %509, align 4 ; [#uses=3]
- %1000 = fmul float %998, %999 ; [#uses=1]
- %1001 = fadd float %996, %1000 ; [#uses=1]
- %1002 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1003 = load float* %1002, align 4 ; [#uses=4]
- %1004 = load float* %516, align 4 ; [#uses=3]
- %1005 = fmul float %1003, %1004 ; [#uses=1]
- %1006 = fadd float %1001, %1005 ; [#uses=1]
- %1007 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %1008 = load float* %1007, align 4 ; [#uses=1]
- %1009 = fadd float %1006, %1008 ; [#uses=1]
- %1010 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1011 = load float* %1010, align 4 ; [#uses=4]
- %1012 = fmul float %1011, %995 ; [#uses=1]
- %1013 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1014 = load float* %1013, align 4 ; [#uses=4]
- %1015 = fmul float %1014, %999 ; [#uses=1]
- %1016 = fadd float %1012, %1015 ; [#uses=1]
- %1017 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1018 = load float* %1017, align 4 ; [#uses=4]
- %1019 = fmul float %1018, %1004 ; [#uses=1]
- %1020 = fadd float %1016, %1019 ; [#uses=1]
- %1021 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %1022 = load float* %1021, align 4 ; [#uses=1]
- %1023 = fadd float %1020, %1022 ; [#uses=1]
- %1024 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1025 = load float* %1024, align 4 ; [#uses=4]
- %1026 = fmul float %1025, %995 ; [#uses=1]
- %1027 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1028 = load float* %1027, align 4 ; [#uses=4]
- %1029 = fmul float %1028, %999 ; [#uses=1]
- %1030 = fadd float %1026, %1029 ; [#uses=1]
- %1031 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1032 = load float* %1031, align 4 ; [#uses=4]
- %1033 = fmul float %1032, %1004 ; [#uses=1]
- %1034 = fadd float %1030, %1033 ; [#uses=1]
- %1035 = getelementptr inbounds %struct.btRigidBody* %992, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %1036 = load float* %1035, align 4 ; [#uses=1]
- %1037 = fadd float %1034, %1036 ; [#uses=1]
- %1038 = load float* %552, align 4 ; [#uses=3]
- %1039 = fmul float %1038, %994 ; [#uses=1]
- %1040 = load float* %556, align 4 ; [#uses=3]
- %1041 = fmul float %1040, %998 ; [#uses=1]
- %1042 = fadd float %1039, %1041 ; [#uses=1]
- %1043 = load float* %561, align 4 ; [#uses=3]
- %1044 = fmul float %1043, %1003 ; [#uses=1]
- %1045 = fadd float %1042, %1044 ; [#uses=1]
- %1046 = load float* %566, align 4 ; [#uses=3]
- %1047 = fmul float %1046, %994 ; [#uses=1]
- %1048 = load float* %570, align 4 ; [#uses=3]
- %1049 = fmul float %1048, %998 ; [#uses=1]
- %1050 = fadd float %1047, %1049 ; [#uses=1]
- %1051 = load float* %575, align 4 ; [#uses=3]
- %1052 = fmul float %1051, %1003 ; [#uses=1]
- %1053 = fadd float %1050, %1052 ; [#uses=1]
- %1054 = load float* %579, align 4 ; [#uses=3]
- %1055 = fmul float %1054, %994 ; [#uses=1]
- %1056 = load float* %583, align 4 ; [#uses=3]
- %1057 = fmul float %1056, %998 ; [#uses=1]
- %1058 = fadd float %1055, %1057 ; [#uses=1]
- %1059 = load float* %587, align 4 ; [#uses=3]
- %1060 = fmul float %1059, %1003 ; [#uses=1]
- %1061 = fadd float %1058, %1060 ; [#uses=1]
- %1062 = fmul float %1038, %1011 ; [#uses=1]
- %1063 = fmul float %1040, %1014 ; [#uses=1]
- %1064 = fadd float %1062, %1063 ; [#uses=1]
- %1065 = fmul float %1043, %1018 ; [#uses=1]
- %1066 = fadd float %1064, %1065 ; [#uses=1]
- %1067 = fmul float %1046, %1011 ; [#uses=1]
- %1068 = fmul float %1048, %1014 ; [#uses=1]
- %1069 = fadd float %1067, %1068 ; [#uses=1]
- %1070 = fmul float %1051, %1018 ; [#uses=1]
- %1071 = fadd float %1069, %1070 ; [#uses=1]
- %1072 = fmul float %1054, %1011 ; [#uses=1]
- %1073 = fmul float %1056, %1014 ; [#uses=1]
- %1074 = fadd float %1072, %1073 ; [#uses=1]
- %1075 = fmul float %1059, %1018 ; [#uses=1]
- %1076 = fadd float %1074, %1075 ; [#uses=1]
- %1077 = fmul float %1038, %1025 ; [#uses=1]
- %1078 = fmul float %1040, %1028 ; [#uses=1]
- %1079 = fadd float %1077, %1078 ; [#uses=1]
- %1080 = fmul float %1043, %1032 ; [#uses=1]
- %1081 = fadd float %1079, %1080 ; [#uses=1]
- %1082 = fmul float %1046, %1025 ; [#uses=1]
- %1083 = fmul float %1048, %1028 ; [#uses=1]
- %1084 = fadd float %1082, %1083 ; [#uses=1]
- %1085 = fmul float %1051, %1032 ; [#uses=1]
- %1086 = fadd float %1084, %1085 ; [#uses=1]
- %1087 = fmul float %1054, %1025 ; [#uses=1]
- %1088 = fmul float %1056, %1028 ; [#uses=1]
- %1089 = fadd float %1087, %1088 ; [#uses=1]
- %1090 = fmul float %1059, %1032 ; [#uses=1]
- %1091 = fadd float %1089, %1090 ; [#uses=1]
- br label %bb60
-
-bb60: ; preds = %bb59, %bb58
- %storemerge244 = phi float [ %991, %bb58 ], [ %1091, %bb59 ] ; [#uses=2]
- %storemerge243 = phi float [ %986, %bb58 ], [ %1086, %bb59 ] ; [#uses=2]
- %storemerge242 = phi float [ %981, %bb58 ], [ %1081, %bb59 ] ; [#uses=1]
- %storemerge241 = phi float [ %976, %bb58 ], [ %1076, %bb59 ] ; [#uses=2]
- %storemerge240 = phi float [ %971, %bb58 ], [ %1071, %bb59 ] ; [#uses=2]
- %storemerge239 = phi float [ %966, %bb58 ], [ %1066, %bb59 ] ; [#uses=1]
- %storemerge238 = phi float [ %961, %bb58 ], [ %1061, %bb59 ] ; [#uses=2]
- %storemerge237 = phi float [ %953, %bb58 ], [ %1053, %bb59 ] ; [#uses=2]
- %storemerge236 = phi float [ %945, %bb58 ], [ %1045, %bb59 ] ; [#uses=1]
- %storemerge235 = phi float [ %937, %bb58 ], [ %1037, %bb59 ] ; [#uses=2]
- %storemerge234 = phi float [ %923, %bb58 ], [ %1023, %bb59 ] ; [#uses=2]
- %storemerge = phi float [ %909, %bb58 ], [ %1009, %bb59 ] ; [#uses=2]
- store float %storemerge244, float* %621, align 8
- store float %storemerge243, float* %622, align 4
- store float %storemerge242, float* %623, align 8
- store float 0.000000e+00, float* %624, align 4
- store float %storemerge241, float* %625, align 8
- store float %storemerge240, float* %626, align 4
- store float %storemerge239, float* %627, align 8
- store float 0.000000e+00, float* %628, align 4
- store float %storemerge238, float* %629, align 8
- store float %storemerge237, float* %630, align 4
- store float %storemerge236, float* %631, align 8
- store float 0.000000e+00, float* %632, align 4
- store float %storemerge235, float* %633, align 8
- store float %storemerge234, float* %634, align 4
- store float %storemerge, float* %635, align 8
- store float 0.000000e+00, float* %636, align 4
- %1092 = getelementptr inbounds %struct.btQuadWord* %pivot44, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %storemerge235, float* %1092, align 8
- %1093 = getelementptr inbounds %struct.btQuadWord* %pivot44, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %storemerge234, float* %1093, align 4
- %1094 = getelementptr inbounds %struct.btQuadWord* %pivot44, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %storemerge, float* %1094, align 8
- %1095 = getelementptr inbounds %struct.btQuadWord* %pivot44, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1095, align 4
- %1096 = getelementptr inbounds %struct.btQuadWord* %normal46, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %storemerge244, float* %1096, align 8
- %1097 = getelementptr inbounds %struct.btQuadWord* %normal46, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %storemerge241, float* %1097, align 4
- %1098 = getelementptr inbounds %struct.btQuadWord* %normal46, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %storemerge238, float* %1098, align 8
- %1099 = getelementptr inbounds %struct.btQuadWord* %normal46, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1099, align 4
- %1100 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %storemerge243, float* %1100, align 8
- %1101 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %storemerge240, float* %1101, align 4
- %1102 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %storemerge237, float* %1102, align 8
- %1103 = getelementptr inbounds %struct.btQuadWord* %axis1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1103, align 4
- %1104 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1105 = getelementptr inbounds i32 (...)** %1104, i32 4 ; [#uses=1]
- %1106 = load i32 (...)** %1105, align 4 ; [#uses=1]
- %1107 = bitcast i32 (...)* %1106 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1108 = call %struct.btActionInterface* %1107(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1109 = getelementptr inbounds %struct.btActionInterface* %1108, i32 0, i32 0 ; [#uses=1]
- %1110 = load i32 (...)*** %1109, align 4 ; [#uses=1]
- %1111 = getelementptr inbounds i32 (...)** %1110, i32 15 ; [#uses=1]
- %1112 = load i32 (...)** %1111, align 4 ; [#uses=1]
- %1113 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1113, align 8
- %1114 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1114, align 4
- %1115 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1115, align 8
- %1116 = getelementptr inbounds %struct.btQuadWord* %6, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1116, align 4
- %1117 = fsub float %886, %888 ; [#uses=1]
- %1118 = fsub float -0.000000e+00, %888 ; [#uses=1]
- %1119 = fsub float %1118, %886 ; [#uses=1]
- %1120 = bitcast i32 (...)* %1112 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %1120(%struct.btActionInterface* %1108, %struct.btQuadWord* %pivot44, %struct.btQuadWord* %normal46, %struct.btQuadWord* %axis1, float %39, float %39, float %1119, float %1117, %struct.btQuadWord* %6, i8 zeroext 1, float 1.000000e+01)
- ret void
-
-bb61: ; preds = %bb
- %1121 = bitcast %struct.btTypedConstraint* %constraint to %struct.btGeneric6DofConstraint* ; [#uses=2]
- %1122 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 29, i32 2 ; [#uses=16]
- %1123 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=5]
- %1124 = bitcast i32* %1122 to float* ; [#uses=3]
- %1125 = load float* %1124, align 4 ; [#uses=1]
- store float %1125, float* %1123, align 8
- %1126 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=6]
- %1127 = getelementptr inbounds i32* %1122, i32 1 ; [#uses=1]
- %1128 = bitcast i32* %1127 to float* ; [#uses=3]
- %1129 = load float* %1128, align 4 ; [#uses=1]
- store float %1129, float* %1126, align 4
- %1130 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=5]
- %1131 = getelementptr inbounds i32* %1122, i32 2 ; [#uses=1]
- %1132 = bitcast i32* %1131 to float* ; [#uses=3]
- %1133 = load float* %1132, align 4 ; [#uses=1]
- store float %1133, float* %1130, align 8
- %1134 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=5]
- %1135 = getelementptr inbounds i32* %1122, i32 3 ; [#uses=1]
- %1136 = bitcast i32* %1135 to float* ; [#uses=3]
- %1137 = load float* %1136, align 4 ; [#uses=1]
- store float %1137, float* %1134, align 4
- %1138 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=5]
- %1139 = getelementptr inbounds i32* %1122, i32 4 ; [#uses=1]
- %1140 = bitcast i32* %1139 to float* ; [#uses=3]
- %1141 = load float* %1140, align 4 ; [#uses=1]
- store float %1141, float* %1138, align 8
- %1142 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=6]
- %1143 = getelementptr inbounds i32* %1122, i32 5 ; [#uses=1]
- %1144 = bitcast i32* %1143 to float* ; [#uses=3]
- %1145 = load float* %1144, align 4 ; [#uses=1]
- store float %1145, float* %1142, align 4
- %1146 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=5]
- %1147 = getelementptr inbounds i32* %1122, i32 6 ; [#uses=1]
- %1148 = bitcast i32* %1147 to float* ; [#uses=3]
- %1149 = load float* %1148, align 4 ; [#uses=1]
- store float %1149, float* %1146, align 8
- %1150 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=5]
- %1151 = getelementptr inbounds i32* %1122, i32 7 ; [#uses=1]
- %1152 = bitcast i32* %1151 to float* ; [#uses=3]
- %1153 = load float* %1152, align 4 ; [#uses=1]
- store float %1153, float* %1150, align 4
- %1154 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=5]
- %1155 = getelementptr inbounds i32* %1122, i32 8 ; [#uses=1]
- %1156 = bitcast i32* %1155 to float* ; [#uses=3]
- %1157 = load float* %1156, align 4 ; [#uses=1]
- store float %1157, float* %1154, align 8
- %1158 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=6]
- %1159 = getelementptr inbounds i32* %1122, i32 9 ; [#uses=1]
- %1160 = bitcast i32* %1159 to float* ; [#uses=3]
- %1161 = load float* %1160, align 4 ; [#uses=1]
- store float %1161, float* %1158, align 4
- %1162 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=5]
- %1163 = getelementptr inbounds i32* %1122, i32 10 ; [#uses=1]
- %1164 = bitcast i32* %1163 to float* ; [#uses=3]
- %1165 = load float* %1164, align 4 ; [#uses=1]
- store float %1165, float* %1162, align 8
- %1166 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=5]
- %1167 = getelementptr inbounds i32* %1122, i32 11 ; [#uses=1]
- %1168 = bitcast i32* %1167 to float* ; [#uses=3]
- %1169 = load float* %1168, align 4 ; [#uses=1]
- store float %1169, float* %1166, align 4
- %1170 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 1, i32 0, i32 0 ; [#uses=5]
- %1171 = getelementptr inbounds i32* %1122, i32 12 ; [#uses=1]
- %1172 = bitcast i32* %1171 to float* ; [#uses=3]
- %1173 = load float* %1172, align 4 ; [#uses=1]
- store float %1173, float* %1170, align 8
- %1174 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 1, i32 0, i32 1 ; [#uses=5]
- %1175 = getelementptr inbounds i32* %1122, i32 13 ; [#uses=1]
- %1176 = bitcast i32* %1175 to float* ; [#uses=3]
- %1177 = load float* %1176, align 4 ; [#uses=1]
- store float %1177, float* %1174, align 4
- %1178 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 1, i32 0, i32 2 ; [#uses=5]
- %1179 = getelementptr inbounds i32* %1122, i32 14 ; [#uses=1]
- %1180 = bitcast i32* %1179 to float* ; [#uses=3]
- %1181 = load float* %1180, align 4 ; [#uses=1]
- store float %1181, float* %1178, align 8
- %1182 = getelementptr inbounds %struct.btTransform* %tr64, i32 0, i32 1, i32 0, i32 3 ; [#uses=5]
- %1183 = getelementptr inbounds i32* %1122, i32 15 ; [#uses=1]
- %1184 = bitcast i32* %1183 to float* ; [#uses=3]
- %1185 = load float* %1184, align 4 ; [#uses=1]
- store float %1185, float* %1182, align 4
- %toBool65 = icmp eq i8 %24, 0 ; [#uses=2]
- br i1 %toBool65, label %bb67, label %bb66
-
-bb66: ; preds = %bb61
- %1186 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1187 = getelementptr inbounds i32 (...)** %1186, i32 4 ; [#uses=1]
- %1188 = load i32 (...)** %1187, align 4 ; [#uses=1]
- %1189 = bitcast i32 (...)* %1188 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1190 = call %struct.btActionInterface* %1189(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1191 = getelementptr inbounds %struct.btActionInterface* %1190, i32 0, i32 0 ; [#uses=1]
- %1192 = load i32 (...)*** %1191, align 4 ; [#uses=1]
- %1193 = getelementptr inbounds i32 (...)** %1192, i32 14 ; [#uses=1]
- %1194 = load i32 (...)** %1193, align 4 ; [#uses=1]
- %1195 = bitcast i32 (...)* %1194 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %1195(%struct.btActionInterface* %1190, %struct.btTransform* %tr64, float %39)
- br label %bb67
-
-bb67: ; preds = %bb66, %bb61
- %1196 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31 ; [#uses=1]
- %1197 = bitcast %struct.btTypedConstraint* %1196 to float* ; [#uses=2]
- %1198 = load float* %1197, align 4 ; [#uses=1]
- store float %1198, float* %1123, align 8
- %1199 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 1 ; [#uses=1]
- %1200 = bitcast %struct.btHashInt* %1199 to float* ; [#uses=2]
- %1201 = load float* %1200, align 4 ; [#uses=1]
- store float %1201, float* %1126, align 4
- %1202 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 2 ; [#uses=1]
- %1203 = bitcast i32* %1202 to float* ; [#uses=2]
- %1204 = load float* %1203, align 4 ; [#uses=1]
- store float %1204, float* %1130, align 8
- %1205 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 3 ; [#uses=1]
- %1206 = bitcast %struct.btHashInt* %1205 to float* ; [#uses=2]
- %1207 = load float* %1206, align 4 ; [#uses=1]
- store float %1207, float* %1134, align 4
- %1208 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 4 ; [#uses=1]
- %1209 = bitcast i8* %1208 to float* ; [#uses=2]
- %1210 = load float* %1209, align 4 ; [#uses=1]
- store float %1210, float* %1138, align 8
- %1211 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 5 ; [#uses=1]
- %1212 = bitcast %struct.btRigidBody** %1211 to float* ; [#uses=2]
- %1213 = load float* %1212, align 4 ; [#uses=1]
- store float %1213, float* %1142, align 4
- %1214 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 6 ; [#uses=1]
- %1215 = bitcast %struct.btRigidBody** %1214 to float* ; [#uses=2]
- %1216 = load float* %1215, align 4 ; [#uses=1]
- store float %1216, float* %1146, align 8
- %1217 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 7 ; [#uses=2]
- %1218 = load float* %1217, align 4 ; [#uses=1]
- store float %1218, float* %1150, align 4
- %1219 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 31, i32 8 ; [#uses=2]
- %1220 = load float* %1219, align 4 ; [#uses=1]
- store float %1220, float* %1154, align 8
- %1221 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 32 ; [#uses=1]
- %1222 = bitcast %struct.btTypedConstraint* %1221 to float* ; [#uses=2]
- %1223 = load float* %1222, align 4 ; [#uses=1]
- store float %1223, float* %1158, align 4
- %1224 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 32, i32 1 ; [#uses=1]
- %1225 = bitcast %struct.btHashInt* %1224 to float* ; [#uses=2]
- %1226 = load float* %1225, align 4 ; [#uses=1]
- store float %1226, float* %1162, align 8
- %1227 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 32, i32 2 ; [#uses=1]
- %1228 = bitcast i32* %1227 to float* ; [#uses=2]
- %1229 = load float* %1228, align 4 ; [#uses=1]
- store float %1229, float* %1166, align 4
- %1230 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 32, i32 3 ; [#uses=2]
- %1231 = bitcast %struct.btHashInt* %1230 to float* ; [#uses=2]
- %1232 = load float* %1231, align 4 ; [#uses=1]
- store float %1232, float* %1170, align 8
- %1233 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 32, i32 4 ; [#uses=1]
- %1234 = bitcast i8* %1233 to float* ; [#uses=2]
- %1235 = load float* %1234, align 4 ; [#uses=1]
- store float %1235, float* %1174, align 4
- %1236 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 32, i32 5 ; [#uses=1]
- %1237 = bitcast %struct.btRigidBody** %1236 to float* ; [#uses=2]
- %1238 = load float* %1237, align 4 ; [#uses=1]
- store float %1238, float* %1178, align 8
- %1239 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 32, i32 6 ; [#uses=1]
- %1240 = bitcast %struct.btRigidBody** %1239 to float* ; [#uses=2]
- %1241 = load float* %1240, align 4 ; [#uses=1]
- store float %1241, float* %1182, align 4
- br i1 %toBool65, label %bb70, label %bb69
-
-bb69: ; preds = %bb67
- %1242 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1243 = getelementptr inbounds i32 (...)** %1242, i32 4 ; [#uses=1]
- %1244 = load i32 (...)** %1243, align 4 ; [#uses=1]
- %1245 = bitcast i32 (...)* %1244 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1246 = call %struct.btActionInterface* %1245(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1247 = getelementptr inbounds %struct.btActionInterface* %1246, i32 0, i32 0 ; [#uses=1]
- %1248 = load i32 (...)*** %1247, align 4 ; [#uses=1]
- %1249 = getelementptr inbounds i32 (...)** %1248, i32 14 ; [#uses=1]
- %1250 = load i32 (...)** %1249, align 4 ; [#uses=1]
- %1251 = bitcast i32 (...)* %1250 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %1251(%struct.btActionInterface* %1246, %struct.btTransform* %tr64, float %39)
- br label %bb70
-
-bb70: ; preds = %bb69, %bb67
- %toBool71 = icmp eq i8 %37, 0 ; [#uses=1]
- br i1 %toBool71, label %return, label %bb72
-
-bb72: ; preds = %bb70
- %1252 = load float* %1124, align 4 ; [#uses=2]
- store float %1252, float* %1123, align 8
- %1253 = load float* %1128, align 4 ; [#uses=1]
- store float %1253, float* %1126, align 4
- %1254 = load float* %1132, align 4 ; [#uses=2]
- store float %1254, float* %1130, align 8
- %1255 = load float* %1136, align 4 ; [#uses=1]
- store float %1255, float* %1134, align 4
- %1256 = load float* %1140, align 4 ; [#uses=2]
- store float %1256, float* %1138, align 8
- %1257 = load float* %1144, align 4 ; [#uses=1]
- store float %1257, float* %1142, align 4
- %1258 = load float* %1148, align 4 ; [#uses=2]
- store float %1258, float* %1146, align 8
- %1259 = load float* %1152, align 4 ; [#uses=1]
- store float %1259, float* %1150, align 4
- %1260 = load float* %1156, align 4 ; [#uses=2]
- store float %1260, float* %1154, align 8
- %1261 = load float* %1160, align 4 ; [#uses=1]
- store float %1261, float* %1158, align 4
- %1262 = load float* %1164, align 4 ; [#uses=2]
- store float %1262, float* %1162, align 8
- %1263 = load float* %1168, align 4 ; [#uses=1]
- store float %1263, float* %1166, align 4
- %1264 = load float* %1172, align 4 ; [#uses=1]
- store float %1264, float* %1170, align 8
- %1265 = load float* %1176, align 4 ; [#uses=1]
- store float %1265, float* %1174, align 4
- %1266 = load float* %1180, align 4 ; [#uses=1]
- store float %1266, float* %1178, align 8
- %1267 = load float* %1184, align 4 ; [#uses=1]
- store float %1267, float* %1182, align 4
- %1268 = bitcast %struct.btHashInt* %1230 to %struct.btQuadWord* ; [#uses=3]
- %1269 = getelementptr inbounds %struct.btQuadWord* %up, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1254, float* %1269, align 8
- %1270 = getelementptr inbounds %struct.btQuadWord* %up, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1258, float* %1270, align 4
- %1271 = getelementptr inbounds %struct.btQuadWord* %up, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1262, float* %1271, align 8
- %1272 = getelementptr inbounds %struct.btQuadWord* %up, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1272, align 4
- %1273 = getelementptr inbounds %struct.btQuadWord* %axis77, i32 0, i32 0, i32 0 ; [#uses=3]
- store float %1252, float* %1273, align 8
- %1274 = getelementptr inbounds %struct.btQuadWord* %axis77, i32 0, i32 0, i32 1 ; [#uses=3]
- store float %1256, float* %1274, align 4
- %1275 = getelementptr inbounds %struct.btQuadWord* %axis77, i32 0, i32 0, i32 2 ; [#uses=3]
- store float %1260, float* %1275, align 8
- %1276 = getelementptr inbounds %struct.btQuadWord* %axis77, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %1276, align 4
- %1277 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 25, i32 5 ; [#uses=2]
- %1278 = bitcast %struct.btRigidBody** %1277 to float* ; [#uses=1]
- %1279 = load float* %1278, align 4 ; [#uses=1]
- %1280 = getelementptr inbounds %struct.btRigidBody** %1277, i32 1 ; [#uses=1]
- %1281 = bitcast %struct.btRigidBody** %1280 to float* ; [#uses=1]
- %1282 = load float* %1281, align 4 ; [#uses=1]
- %1283 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 27, i32 3 ; [#uses=2]
- %1284 = bitcast %struct.btHashInt* %1283 to float* ; [#uses=1]
- %1285 = load float* %1284, align 4 ; [#uses=1]
- %1286 = getelementptr inbounds %struct.btHashInt* %1283, i32 1 ; [#uses=1]
- %1287 = bitcast %struct.btHashInt* %1286 to float* ; [#uses=1]
- %1288 = load float* %1287, align 4 ; [#uses=1]
- %1289 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1290 = getelementptr inbounds i32 (...)** %1289, i32 4 ; [#uses=1]
- %1291 = load i32 (...)** %1290, align 4 ; [#uses=1]
- %1292 = bitcast i32 (...)* %1291 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1293 = call %struct.btActionInterface* %1292(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1294 = getelementptr inbounds %struct.btActionInterface* %1293, i32 0, i32 0 ; [#uses=1]
- %1295 = load i32 (...)*** %1294, align 4 ; [#uses=1]
- %1296 = getelementptr inbounds i32 (...)** %1295, i32 16 ; [#uses=1]
- %1297 = load i32 (...)** %1296, align 4 ; [#uses=1]
- %1298 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1298, align 8
- %1299 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1299, align 4
- %1300 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1300, align 8
- %1301 = getelementptr inbounds %struct.btQuadWord* %5, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1301, align 4
- %1302 = fmul float %39, 0x3FECCCCCC0000000 ; [#uses=1]
- %1303 = bitcast i32 (...)* %1297 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, float, %struct.btQuadWord*, float)* ; [#uses=1]
- call void %1303(%struct.btActionInterface* %1293, %struct.btQuadWord* %1268, %struct.btQuadWord* %up, %struct.btQuadWord* %axis77, float %1302, float %1279, float %1282, float %1285, float %1288, %struct.btQuadWord* %5, float 1.000000e+01)
- %1304 = load float* %1126, align 4 ; [#uses=1]
- %1305 = load float* %1142, align 4 ; [#uses=1]
- %1306 = load float* %1158, align 4 ; [#uses=1]
- store float %1304, float* %1273, align 8
- store float %1305, float* %1274, align 4
- store float %1306, float* %1275, align 8
- store float 0.000000e+00, float* %1276, align 4
- %1307 = call float @_ZNK23btGeneric6DofConstraint8getAngleEi(%struct.btGeneric6DofConstraint* %1121, i32 1) ; [#uses=2]
- %1308 = call float @_ZNK23btGeneric6DofConstraint8getAngleEi(%struct.btGeneric6DofConstraint* %1121, i32 2) ; [#uses=2]
- %1309 = call float @cosf(float %1307) nounwind readonly ; [#uses=3]
- %1310 = call float @sinf(float %1307) nounwind readonly ; [#uses=3]
- %1311 = call float @cosf(float %1308) nounwind readonly ; [#uses=3]
- %1312 = call float @sinf(float %1308) nounwind readonly ; [#uses=3]
- %1313 = getelementptr inbounds %struct.btQuadWord* %ref, i32 0, i32 0, i32 0 ; [#uses=1]
- %1314 = fmul float %1309, %1311 ; [#uses=1]
- %1315 = load float* %1273, align 8 ; [#uses=3]
- %1316 = fmul float %1314, %1315 ; [#uses=1]
- %1317 = fmul float %1309, %1312 ; [#uses=1]
- %1318 = load float* %1274, align 4 ; [#uses=3]
- %1319 = fmul float %1317, %1318 ; [#uses=1]
- %1320 = fadd float %1316, %1319 ; [#uses=1]
- %1321 = load float* %1275, align 8 ; [#uses=2]
- %1322 = fmul float %1321, %1310 ; [#uses=1]
- %1323 = fsub float %1320, %1322 ; [#uses=1]
- store float %1323, float* %1313, align 8
- %1324 = fsub float -0.000000e+00, %1312 ; [#uses=1]
- %1325 = fmul float %1315, %1324 ; [#uses=1]
- %1326 = fmul float %1318, %1311 ; [#uses=1]
- %1327 = fadd float %1325, %1326 ; [#uses=1]
- %1328 = getelementptr inbounds %struct.btQuadWord* %ref, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1327, float* %1328, align 4
- %1329 = fmul float %1311, %1310 ; [#uses=1]
- %1330 = fmul float %1329, %1315 ; [#uses=1]
- %1331 = fmul float %1312, %1310 ; [#uses=1]
- %1332 = fmul float %1331, %1318 ; [#uses=1]
- %1333 = fadd float %1330, %1332 ; [#uses=1]
- %1334 = fmul float %1321, %1309 ; [#uses=1]
- %1335 = fadd float %1333, %1334 ; [#uses=1]
- %1336 = getelementptr inbounds %struct.btQuadWord* %ref, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1335, float* %1336, align 8
- %1337 = load float* %1197, align 4 ; [#uses=2]
- store float %1337, float* %1123, align 8
- %1338 = load float* %1200, align 4 ; [#uses=1]
- store float %1338, float* %1126, align 4
- %1339 = load float* %1203, align 4 ; [#uses=1]
- store float %1339, float* %1130, align 8
- %1340 = load float* %1206, align 4 ; [#uses=1]
- store float %1340, float* %1134, align 4
- %1341 = load float* %1209, align 4 ; [#uses=2]
- store float %1341, float* %1138, align 8
- %1342 = load float* %1212, align 4 ; [#uses=1]
- store float %1342, float* %1142, align 4
- %1343 = load float* %1215, align 4 ; [#uses=1]
- store float %1343, float* %1146, align 8
- %1344 = load float* %1217, align 4 ; [#uses=1]
- store float %1344, float* %1150, align 4
- %1345 = load float* %1219, align 4 ; [#uses=2]
- store float %1345, float* %1154, align 8
- %1346 = load float* %1222, align 4 ; [#uses=1]
- store float %1346, float* %1158, align 4
- %1347 = load float* %1225, align 4 ; [#uses=1]
- store float %1347, float* %1162, align 8
- %1348 = load float* %1228, align 4 ; [#uses=1]
- store float %1348, float* %1166, align 4
- %1349 = load float* %1231, align 4 ; [#uses=1]
- store float %1349, float* %1170, align 8
- %1350 = load float* %1234, align 4 ; [#uses=1]
- store float %1350, float* %1174, align 4
- %1351 = load float* %1237, align 4 ; [#uses=1]
- store float %1351, float* %1178, align 8
- %1352 = load float* %1240, align 4 ; [#uses=1]
- store float %1352, float* %1182, align 4
- %1353 = fsub float -0.000000e+00, %1345 ; [#uses=1]
- %1354 = fsub float -0.000000e+00, %1341 ; [#uses=1]
- %1355 = fsub float -0.000000e+00, %1337 ; [#uses=1]
- %1356 = getelementptr inbounds %struct.btQuadWord* %normal90, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1355, float* %1356, align 8
- %1357 = getelementptr inbounds %struct.btQuadWord* %normal90, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1354, float* %1357, align 4
- %1358 = getelementptr inbounds %struct.btQuadWord* %normal90, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1353, float* %1358, align 8
- %1359 = getelementptr inbounds %struct.btQuadWord* %normal90, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1359, align 4
- %1360 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 23, i32 7 ; [#uses=2]
- %1361 = load float* %1360, align 4 ; [#uses=3]
- %1362 = getelementptr inbounds float* %1360, i32 1 ; [#uses=1]
- %1363 = load float* %1362, align 4 ; [#uses=3]
- %1364 = fcmp ogt float %1361, %1363 ; [#uses=1]
- br i1 %1364, label %bb96, label %bb97
-
-bb96: ; preds = %bb72
- %1365 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1366 = getelementptr inbounds i32 (...)** %1365, i32 4 ; [#uses=1]
- %1367 = load i32 (...)** %1366, align 4 ; [#uses=1]
- %1368 = bitcast i32 (...)* %1367 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1369 = call %struct.btActionInterface* %1368(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1370 = getelementptr inbounds %struct.btActionInterface* %1369, i32 0, i32 0 ; [#uses=1]
- %1371 = load i32 (...)*** %1370, align 4 ; [#uses=1]
- %1372 = getelementptr inbounds i32 (...)** %1371, i32 15 ; [#uses=1]
- %1373 = load i32 (...)** %1372, align 4 ; [#uses=1]
- %1374 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1374, align 8
- %1375 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1375, align 4
- %1376 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1376, align 8
- %1377 = getelementptr inbounds %struct.btQuadWord* %4, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1377, align 4
- %1378 = bitcast i32 (...)* %1373 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %1378(%struct.btActionInterface* %1369, %struct.btQuadWord* %1268, %struct.btQuadWord* %normal90, %struct.btQuadWord* %ref, float %39, float %39, float 0xC00921FB60000000, float 0x400921FB60000000, %struct.btQuadWord* %4, i8 zeroext 0, float 1.000000e+01)
- br label %bb99
-
-bb97: ; preds = %bb72
- %1379 = fcmp olt float %1361, %1363 ; [#uses=1]
- br i1 %1379, label %bb98, label %bb99
-
-bb98: ; preds = %bb97
- %1380 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1381 = getelementptr inbounds i32 (...)** %1380, i32 4 ; [#uses=1]
- %1382 = load i32 (...)** %1381, align 4 ; [#uses=1]
- %1383 = bitcast i32 (...)* %1382 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1384 = call %struct.btActionInterface* %1383(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1385 = getelementptr inbounds %struct.btActionInterface* %1384, i32 0, i32 0 ; [#uses=1]
- %1386 = load i32 (...)*** %1385, align 4 ; [#uses=1]
- %1387 = getelementptr inbounds i32 (...)** %1386, i32 15 ; [#uses=1]
- %1388 = load i32 (...)** %1387, align 4 ; [#uses=1]
- %1389 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1389, align 8
- %1390 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1390, align 4
- %1391 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1391, align 8
- %1392 = getelementptr inbounds %struct.btQuadWord* %3, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1392, align 4
- %1393 = bitcast i32 (...)* %1388 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %1393(%struct.btActionInterface* %1384, %struct.btQuadWord* %1268, %struct.btQuadWord* %normal90, %struct.btQuadWord* %ref, float %39, float %39, float %1361, float %1363, %struct.btQuadWord* %3, i8 zeroext 1, float 1.000000e+01)
- br label %bb99
-
-bb99: ; preds = %bb98, %bb97, %bb96
- %1394 = load float* %1124, align 4 ; [#uses=1]
- store float %1394, float* %1123, align 8
- %1395 = load float* %1128, align 4 ; [#uses=1]
- store float %1395, float* %1126, align 4
- %1396 = load float* %1132, align 4 ; [#uses=1]
- store float %1396, float* %1130, align 8
- %1397 = load float* %1136, align 4 ; [#uses=1]
- store float %1397, float* %1134, align 4
- %1398 = load float* %1140, align 4 ; [#uses=1]
- store float %1398, float* %1138, align 8
- %1399 = load float* %1144, align 4 ; [#uses=1]
- store float %1399, float* %1142, align 4
- %1400 = load float* %1148, align 4 ; [#uses=1]
- store float %1400, float* %1146, align 8
- %1401 = load float* %1152, align 4 ; [#uses=1]
- store float %1401, float* %1150, align 4
- %1402 = load float* %1156, align 4 ; [#uses=1]
- store float %1402, float* %1154, align 8
- %1403 = load float* %1160, align 4 ; [#uses=1]
- store float %1403, float* %1158, align 4
- %1404 = load float* %1164, align 4 ; [#uses=1]
- store float %1404, float* %1162, align 8
- %1405 = load float* %1168, align 4 ; [#uses=1]
- store float %1405, float* %1166, align 4
- %1406 = load float* %1172, align 4 ; [#uses=1]
- store float %1406, float* %1170, align 8
- %1407 = load float* %1176, align 4 ; [#uses=1]
- store float %1407, float* %1174, align 4
- %1408 = load float* %1180, align 4 ; [#uses=1]
- store float %1408, float* %1178, align 8
- %1409 = load float* %1184, align 4 ; [#uses=1]
- store float %1409, float* %1182, align 4
- %1410 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 18, i32 5 ; [#uses=8]
- %1411 = getelementptr inbounds %struct.btQuadWord* %bbMin, i32 0, i32 0, i32 0 ; [#uses=1]
- %1412 = bitcast %struct.btRigidBody** %1410 to float* ; [#uses=1]
- %1413 = load float* %1412, align 4 ; [#uses=1]
- store float %1413, float* %1411, align 8
- %1414 = getelementptr inbounds %struct.btQuadWord* %bbMin, i32 0, i32 0, i32 1 ; [#uses=1]
- %1415 = getelementptr inbounds %struct.btRigidBody** %1410, i32 1 ; [#uses=1]
- %1416 = bitcast %struct.btRigidBody** %1415 to float* ; [#uses=1]
- %1417 = load float* %1416, align 4 ; [#uses=1]
- store float %1417, float* %1414, align 4
- %1418 = getelementptr inbounds %struct.btQuadWord* %bbMin, i32 0, i32 0, i32 2 ; [#uses=1]
- %1419 = getelementptr inbounds %struct.btRigidBody** %1410, i32 2 ; [#uses=1]
- %1420 = bitcast %struct.btRigidBody** %1419 to float* ; [#uses=1]
- %1421 = load float* %1420, align 4 ; [#uses=1]
- store float %1421, float* %1418, align 8
- %1422 = getelementptr inbounds %struct.btQuadWord* %bbMin, i32 0, i32 0, i32 3 ; [#uses=1]
- %1423 = getelementptr inbounds %struct.btRigidBody** %1410, i32 3 ; [#uses=1]
- %1424 = bitcast %struct.btRigidBody** %1423 to float* ; [#uses=1]
- %1425 = load float* %1424, align 4 ; [#uses=1]
- store float %1425, float* %1422, align 4
- %1426 = getelementptr inbounds %struct.btQuadWord* %bbMax, i32 0, i32 0, i32 0 ; [#uses=1]
- %1427 = getelementptr inbounds %struct.btRigidBody** %1410, i32 4 ; [#uses=1]
- %1428 = bitcast %struct.btRigidBody** %1427 to float* ; [#uses=1]
- %1429 = load float* %1428, align 4 ; [#uses=1]
- store float %1429, float* %1426, align 8
- %1430 = getelementptr inbounds %struct.btQuadWord* %bbMax, i32 0, i32 0, i32 1 ; [#uses=1]
- %1431 = getelementptr inbounds %struct.btRigidBody** %1410, i32 5 ; [#uses=1]
- %1432 = bitcast %struct.btRigidBody** %1431 to float* ; [#uses=1]
- %1433 = load float* %1432, align 4 ; [#uses=1]
- store float %1433, float* %1430, align 4
- %1434 = getelementptr inbounds %struct.btQuadWord* %bbMax, i32 0, i32 0, i32 2 ; [#uses=1]
- %1435 = getelementptr inbounds %struct.btRigidBody** %1410, i32 6 ; [#uses=1]
- %1436 = bitcast %struct.btRigidBody** %1435 to float* ; [#uses=1]
- %1437 = load float* %1436, align 4 ; [#uses=1]
- store float %1437, float* %1434, align 8
- %1438 = getelementptr inbounds %struct.btQuadWord* %bbMax, i32 0, i32 0, i32 3 ; [#uses=1]
- %1439 = getelementptr inbounds %struct.btRigidBody** %1410, i32 7 ; [#uses=1]
- %1440 = bitcast %struct.btRigidBody** %1439 to float* ; [#uses=1]
- %1441 = load float* %1440, align 4 ; [#uses=1]
- store float %1441, float* %1438, align 4
- %1442 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1443 = getelementptr inbounds i32 (...)** %1442, i32 4 ; [#uses=1]
- %1444 = load i32 (...)** %1443, align 4 ; [#uses=1]
- %1445 = bitcast i32 (...)* %1444 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1446 = call %struct.btActionInterface* %1445(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1447 = getelementptr inbounds %struct.btActionInterface* %1446, i32 0, i32 0 ; [#uses=1]
- %1448 = load i32 (...)*** %1447, align 4 ; [#uses=1]
- %1449 = getelementptr inbounds i32 (...)** %1448, i32 18 ; [#uses=1]
- %1450 = load i32 (...)** %1449, align 4 ; [#uses=1]
- %1451 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1451, align 8
- %1452 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1452, align 4
- %1453 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1453, align 8
- %1454 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1454, align 4
- %1455 = bitcast i32 (...)* %1450 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btTransform*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1455(%struct.btActionInterface* %1446, %struct.btQuadWord* %bbMin, %struct.btQuadWord* %bbMax, %struct.btTransform* %tr64, %struct.btQuadWord* %2)
- ret void
-
-bb100: ; preds = %bb
- %1456 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 22, i32 5 ; [#uses=17]
- %1457 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %1458 = bitcast %struct.btRigidBody** %1456 to float* ; [#uses=1]
- %1459 = load float* %1458, align 4 ; [#uses=1]
- store float %1459, float* %1457, align 8
- %1460 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %1461 = getelementptr inbounds %struct.btRigidBody** %1456, i32 1 ; [#uses=1]
- %1462 = bitcast %struct.btRigidBody** %1461 to float* ; [#uses=1]
- %1463 = load float* %1462, align 4 ; [#uses=1]
- store float %1463, float* %1460, align 4
- %1464 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %1465 = getelementptr inbounds %struct.btRigidBody** %1456, i32 2 ; [#uses=1]
- %1466 = bitcast %struct.btRigidBody** %1465 to float* ; [#uses=1]
- %1467 = load float* %1466, align 4 ; [#uses=1]
- store float %1467, float* %1464, align 8
- %1468 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %1469 = getelementptr inbounds %struct.btRigidBody** %1456, i32 3 ; [#uses=1]
- %1470 = bitcast %struct.btRigidBody** %1469 to float* ; [#uses=1]
- %1471 = load float* %1470, align 4 ; [#uses=1]
- store float %1471, float* %1468, align 4
- %1472 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %1473 = getelementptr inbounds %struct.btRigidBody** %1456, i32 4 ; [#uses=1]
- %1474 = bitcast %struct.btRigidBody** %1473 to float* ; [#uses=1]
- %1475 = load float* %1474, align 4 ; [#uses=1]
- store float %1475, float* %1472, align 8
- %1476 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %1477 = getelementptr inbounds %struct.btRigidBody** %1456, i32 5 ; [#uses=1]
- %1478 = bitcast %struct.btRigidBody** %1477 to float* ; [#uses=1]
- %1479 = load float* %1478, align 4 ; [#uses=1]
- store float %1479, float* %1476, align 4
- %1480 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %1481 = getelementptr inbounds %struct.btRigidBody** %1456, i32 6 ; [#uses=1]
- %1482 = bitcast %struct.btRigidBody** %1481 to float* ; [#uses=1]
- %1483 = load float* %1482, align 4 ; [#uses=1]
- store float %1483, float* %1480, align 8
- %1484 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %1485 = getelementptr inbounds %struct.btRigidBody** %1456, i32 7 ; [#uses=1]
- %1486 = bitcast %struct.btRigidBody** %1485 to float* ; [#uses=1]
- %1487 = load float* %1486, align 4 ; [#uses=1]
- store float %1487, float* %1484, align 4
- %1488 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %1489 = getelementptr inbounds %struct.btRigidBody** %1456, i32 8 ; [#uses=1]
- %1490 = bitcast %struct.btRigidBody** %1489 to float* ; [#uses=1]
- %1491 = load float* %1490, align 4 ; [#uses=1]
- store float %1491, float* %1488, align 8
- %1492 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %1493 = getelementptr inbounds %struct.btRigidBody** %1456, i32 9 ; [#uses=1]
- %1494 = bitcast %struct.btRigidBody** %1493 to float* ; [#uses=1]
- %1495 = load float* %1494, align 4 ; [#uses=1]
- store float %1495, float* %1492, align 4
- %1496 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %1497 = getelementptr inbounds %struct.btRigidBody** %1456, i32 10 ; [#uses=1]
- %1498 = bitcast %struct.btRigidBody** %1497 to float* ; [#uses=1]
- %1499 = load float* %1498, align 4 ; [#uses=1]
- store float %1499, float* %1496, align 8
- %1500 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %1501 = getelementptr inbounds %struct.btRigidBody** %1456, i32 11 ; [#uses=1]
- %1502 = bitcast %struct.btRigidBody** %1501 to float* ; [#uses=1]
- %1503 = load float* %1502, align 4 ; [#uses=1]
- store float %1503, float* %1500, align 4
- %1504 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %1505 = getelementptr inbounds %struct.btRigidBody** %1456, i32 12 ; [#uses=1]
- %1506 = bitcast %struct.btRigidBody** %1505 to float* ; [#uses=1]
- %1507 = load float* %1506, align 4 ; [#uses=1]
- store float %1507, float* %1504, align 8
- %1508 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %1509 = getelementptr inbounds %struct.btRigidBody** %1456, i32 13 ; [#uses=1]
- %1510 = bitcast %struct.btRigidBody** %1509 to float* ; [#uses=1]
- %1511 = load float* %1510, align 4 ; [#uses=1]
- store float %1511, float* %1508, align 4
- %1512 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %1513 = getelementptr inbounds %struct.btRigidBody** %1456, i32 14 ; [#uses=1]
- %1514 = bitcast %struct.btRigidBody** %1513 to float* ; [#uses=1]
- %1515 = load float* %1514, align 4 ; [#uses=1]
- store float %1515, float* %1512, align 8
- %1516 = getelementptr inbounds %struct.btTransform* %tr103, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %1517 = getelementptr inbounds %struct.btRigidBody** %1456, i32 15 ; [#uses=1]
- %1518 = bitcast %struct.btRigidBody** %1517 to float* ; [#uses=1]
- %1519 = load float* %1518, align 4 ; [#uses=1]
- store float %1519, float* %1516, align 4
- %toBool104 = icmp eq i8 %24, 0 ; [#uses=2]
- br i1 %toBool104, label %bb106, label %bb105
-
-bb105: ; preds = %bb100
- %1520 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1521 = getelementptr inbounds i32 (...)** %1520, i32 4 ; [#uses=1]
- %1522 = load i32 (...)** %1521, align 4 ; [#uses=1]
- %1523 = bitcast i32 (...)* %1522 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1524 = call %struct.btActionInterface* %1523(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1525 = getelementptr inbounds %struct.btActionInterface* %1524, i32 0, i32 0 ; [#uses=1]
- %1526 = load i32 (...)*** %1525, align 4 ; [#uses=1]
- %1527 = getelementptr inbounds i32 (...)** %1526, i32 14 ; [#uses=1]
- %1528 = load i32 (...)** %1527, align 4 ; [#uses=1]
- %1529 = bitcast i32 (...)* %1528 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %1529(%struct.btActionInterface* %1524, %struct.btTransform* %tr103, float %39)
- br label %bb106
-
-bb106: ; preds = %bb105, %bb100
- %1530 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 24, i32 3 ; [#uses=17]
- %1531 = bitcast %struct.btHashInt* %1530 to float* ; [#uses=1]
- %1532 = load float* %1531, align 4 ; [#uses=1]
- store float %1532, float* %1457, align 8
- %1533 = getelementptr inbounds %struct.btHashInt* %1530, i32 1 ; [#uses=1]
- %1534 = bitcast %struct.btHashInt* %1533 to float* ; [#uses=1]
- %1535 = load float* %1534, align 4 ; [#uses=1]
- store float %1535, float* %1460, align 4
- %1536 = getelementptr inbounds %struct.btHashInt* %1530, i32 2 ; [#uses=1]
- %1537 = bitcast %struct.btHashInt* %1536 to float* ; [#uses=1]
- %1538 = load float* %1537, align 4 ; [#uses=1]
- store float %1538, float* %1464, align 8
- %1539 = getelementptr inbounds %struct.btHashInt* %1530, i32 3 ; [#uses=1]
- %1540 = bitcast %struct.btHashInt* %1539 to float* ; [#uses=1]
- %1541 = load float* %1540, align 4 ; [#uses=1]
- store float %1541, float* %1468, align 4
- %1542 = getelementptr inbounds %struct.btHashInt* %1530, i32 4 ; [#uses=1]
- %1543 = bitcast %struct.btHashInt* %1542 to float* ; [#uses=1]
- %1544 = load float* %1543, align 4 ; [#uses=1]
- store float %1544, float* %1472, align 8
- %1545 = getelementptr inbounds %struct.btHashInt* %1530, i32 5 ; [#uses=1]
- %1546 = bitcast %struct.btHashInt* %1545 to float* ; [#uses=1]
- %1547 = load float* %1546, align 4 ; [#uses=1]
- store float %1547, float* %1476, align 4
- %1548 = getelementptr inbounds %struct.btHashInt* %1530, i32 6 ; [#uses=1]
- %1549 = bitcast %struct.btHashInt* %1548 to float* ; [#uses=1]
- %1550 = load float* %1549, align 4 ; [#uses=1]
- store float %1550, float* %1480, align 8
- %1551 = getelementptr inbounds %struct.btHashInt* %1530, i32 7 ; [#uses=1]
- %1552 = bitcast %struct.btHashInt* %1551 to float* ; [#uses=1]
- %1553 = load float* %1552, align 4 ; [#uses=1]
- store float %1553, float* %1484, align 4
- %1554 = getelementptr inbounds %struct.btHashInt* %1530, i32 8 ; [#uses=1]
- %1555 = bitcast %struct.btHashInt* %1554 to float* ; [#uses=1]
- %1556 = load float* %1555, align 4 ; [#uses=1]
- store float %1556, float* %1488, align 8
- %1557 = getelementptr inbounds %struct.btHashInt* %1530, i32 9 ; [#uses=1]
- %1558 = bitcast %struct.btHashInt* %1557 to float* ; [#uses=1]
- %1559 = load float* %1558, align 4 ; [#uses=1]
- store float %1559, float* %1492, align 4
- %1560 = getelementptr inbounds %struct.btHashInt* %1530, i32 10 ; [#uses=1]
- %1561 = bitcast %struct.btHashInt* %1560 to float* ; [#uses=1]
- %1562 = load float* %1561, align 4 ; [#uses=1]
- store float %1562, float* %1496, align 8
- %1563 = getelementptr inbounds %struct.btHashInt* %1530, i32 11 ; [#uses=1]
- %1564 = bitcast %struct.btHashInt* %1563 to float* ; [#uses=1]
- %1565 = load float* %1564, align 4 ; [#uses=1]
- store float %1565, float* %1500, align 4
- %1566 = getelementptr inbounds %struct.btHashInt* %1530, i32 12 ; [#uses=2]
- %1567 = bitcast %struct.btHashInt* %1566 to float* ; [#uses=1]
- %1568 = load float* %1567, align 4 ; [#uses=1]
- store float %1568, float* %1504, align 8
- %1569 = getelementptr inbounds %struct.btHashInt* %1530, i32 13 ; [#uses=1]
- %1570 = bitcast %struct.btHashInt* %1569 to float* ; [#uses=1]
- %1571 = load float* %1570, align 4 ; [#uses=1]
- store float %1571, float* %1508, align 4
- %1572 = getelementptr inbounds %struct.btHashInt* %1530, i32 14 ; [#uses=1]
- %1573 = bitcast %struct.btHashInt* %1572 to float* ; [#uses=1]
- %1574 = load float* %1573, align 4 ; [#uses=1]
- store float %1574, float* %1512, align 8
- %1575 = getelementptr inbounds %struct.btHashInt* %1530, i32 15 ; [#uses=1]
- %1576 = bitcast %struct.btHashInt* %1575 to float* ; [#uses=1]
- %1577 = load float* %1576, align 4 ; [#uses=1]
- store float %1577, float* %1516, align 4
- br i1 %toBool104, label %bb109, label %bb108
-
-bb108: ; preds = %bb106
- %1578 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1579 = getelementptr inbounds i32 (...)** %1578, i32 4 ; [#uses=1]
- %1580 = load i32 (...)** %1579, align 4 ; [#uses=1]
- %1581 = bitcast i32 (...)* %1580 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1582 = call %struct.btActionInterface* %1581(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1583 = getelementptr inbounds %struct.btActionInterface* %1582, i32 0, i32 0 ; [#uses=1]
- %1584 = load i32 (...)*** %1583, align 4 ; [#uses=1]
- %1585 = getelementptr inbounds i32 (...)** %1584, i32 14 ; [#uses=1]
- %1586 = load i32 (...)** %1585, align 4 ; [#uses=1]
- %1587 = bitcast i32 (...)* %1586 to void (%struct.btActionInterface*, %struct.btTransform*, float)* ; [#uses=1]
- call void %1587(%struct.btActionInterface* %1582, %struct.btTransform* %tr103, float %39)
- br label %bb109
-
-bb109: ; preds = %bb108, %bb106
- %toBool110 = icmp eq i8 %37, 0 ; [#uses=1]
- br i1 %toBool110, label %return, label %bb111
-
-bb111: ; preds = %bb109
- %1588 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 4, i32 6 ; [#uses=1]
- %1589 = bitcast %struct.btRigidBody** %1588 to i8* ; [#uses=1]
- %1590 = load i8* %1589, align 4 ; [#uses=1]
- %toBool124 = icmp eq i8 %1590, 0 ; [#uses=1]
- br i1 %toBool124, label %bb126, label %bb125
-
-bb125: ; preds = %bb111
- %1591 = bitcast %struct.btRigidBody** %1456 to %struct.btTransform* ; [#uses=1]
- br label %bb127
-
-bb126: ; preds = %bb111
- %1592 = bitcast %struct.btHashInt* %1530 to %struct.btTransform* ; [#uses=1]
- br label %bb127
-
-bb127: ; preds = %bb126, %bb125
- %iftmp.430.0 = phi %struct.btTransform* [ %1591, %bb125 ], [ %1592, %bb126 ] ; [#uses=12]
- %1593 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1594 = load float* %1593, align 4 ; [#uses=3]
- %1595 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %1596 = load float* %1595, align 4 ; [#uses=2]
- %1597 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %1598 = load float* %1597, align 4 ; [#uses=1]
- %1599 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1600 = load float* %1599, align 4 ; [#uses=3]
- %1601 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1602 = load float* %1601, align 4 ; [#uses=2]
- %1603 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1604 = load float* %1603, align 4 ; [#uses=1]
- %1605 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %1606 = load float* %1605, align 4 ; [#uses=3]
- %1607 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %1608 = load float* %1607, align 4 ; [#uses=2]
- %1609 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1610 = load float* %1609, align 4 ; [#uses=1]
- %1611 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %1612 = load float* %1611, align 4 ; [#uses=2]
- %1613 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %1614 = load float* %1613, align 4 ; [#uses=2]
- %1615 = getelementptr inbounds %struct.btTransform* %iftmp.430.0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %1616 = load float* %1615, align 4 ; [#uses=2]
- %1617 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 4, i32 7 ; [#uses=1]
- %1618 = load float* %1617, align 4 ; [#uses=3]
- %1619 = fmul float %1606, %1618 ; [#uses=1]
- %1620 = fmul float %1608, 0.000000e+00 ; [#uses=2]
- %1621 = fadd float %1619, %1620 ; [#uses=1]
- %1622 = fmul float %1610, 0.000000e+00 ; [#uses=2]
- %1623 = fadd float %1621, %1622 ; [#uses=1]
- %1624 = fadd float %1623, %1616 ; [#uses=1]
- %1625 = fmul float %1600, %1618 ; [#uses=1]
- %1626 = fmul float %1602, 0.000000e+00 ; [#uses=2]
- %1627 = fadd float %1625, %1626 ; [#uses=1]
- %1628 = fmul float %1604, 0.000000e+00 ; [#uses=2]
- %1629 = fadd float %1627, %1628 ; [#uses=1]
- %1630 = fadd float %1629, %1614 ; [#uses=1]
- %1631 = fmul float %1594, %1618 ; [#uses=1]
- %1632 = fmul float %1596, 0.000000e+00 ; [#uses=2]
- %1633 = fadd float %1631, %1632 ; [#uses=1]
- %1634 = fmul float %1598, 0.000000e+00 ; [#uses=2]
- %1635 = fadd float %1633, %1634 ; [#uses=1]
- %1636 = fadd float %1635, %1612 ; [#uses=1]
- %1637 = getelementptr inbounds %struct.btQuadWord* %li_min, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1636, float* %1637, align 8
- %1638 = getelementptr inbounds %struct.btQuadWord* %li_min, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1630, float* %1638, align 4
- %1639 = getelementptr inbounds %struct.btQuadWord* %li_min, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1624, float* %1639, align 8
- %1640 = getelementptr inbounds %struct.btQuadWord* %li_min, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1640, align 4
- %1641 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 4, i32 8 ; [#uses=1]
- %1642 = load float* %1641, align 4 ; [#uses=3]
- %1643 = fmul float %1606, %1642 ; [#uses=1]
- %1644 = fadd float %1643, %1620 ; [#uses=1]
- %1645 = fadd float %1644, %1622 ; [#uses=1]
- %1646 = fadd float %1645, %1616 ; [#uses=1]
- %1647 = fmul float %1600, %1642 ; [#uses=1]
- %1648 = fadd float %1647, %1626 ; [#uses=1]
- %1649 = fadd float %1648, %1628 ; [#uses=1]
- %1650 = fadd float %1649, %1614 ; [#uses=1]
- %1651 = fmul float %1594, %1642 ; [#uses=1]
- %1652 = fadd float %1651, %1632 ; [#uses=1]
- %1653 = fadd float %1652, %1634 ; [#uses=1]
- %1654 = fadd float %1653, %1612 ; [#uses=1]
- %1655 = getelementptr inbounds %struct.btQuadWord* %li_max, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1654, float* %1655, align 8
- %1656 = getelementptr inbounds %struct.btQuadWord* %li_max, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1650, float* %1656, align 4
- %1657 = getelementptr inbounds %struct.btQuadWord* %li_max, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1646, float* %1657, align 8
- %1658 = getelementptr inbounds %struct.btQuadWord* %li_max, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1658, align 4
- %1659 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1660 = getelementptr inbounds i32 (...)** %1659, i32 4 ; [#uses=1]
- %1661 = load i32 (...)** %1660, align 4 ; [#uses=1]
- %1662 = bitcast i32 (...)* %1661 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1663 = call %struct.btActionInterface* %1662(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1664 = getelementptr inbounds %struct.btActionInterface* %1663, i32 0, i32 0 ; [#uses=1]
- %1665 = load i32 (...)*** %1664, align 4 ; [#uses=1]
- %1666 = getelementptr inbounds i32 (...)** %1665, i32 2 ; [#uses=1]
- %1667 = load i32 (...)** %1666, align 4 ; [#uses=1]
- %1668 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1668, align 8
- %1669 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1669, align 4
- %1670 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1670, align 8
- %1671 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1671, align 4
- %1672 = bitcast i32 (...)* %1667 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %1672(%struct.btActionInterface* %1663, %struct.btQuadWord* %li_min, %struct.btQuadWord* %li_max, %struct.btQuadWord* %1)
- %1673 = getelementptr inbounds %struct.btQuadWord* %normal117, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1594, float* %1673, align 8
- %1674 = getelementptr inbounds %struct.btQuadWord* %normal117, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1600, float* %1674, align 4
- %1675 = getelementptr inbounds %struct.btQuadWord* %normal117, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1606, float* %1675, align 8
- %1676 = getelementptr inbounds %struct.btQuadWord* %normal117, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1676, align 4
- %1677 = getelementptr inbounds %struct.btQuadWord* %axis119, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %1596, float* %1677, align 8
- %1678 = getelementptr inbounds %struct.btQuadWord* %axis119, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1602, float* %1678, align 4
- %1679 = getelementptr inbounds %struct.btQuadWord* %axis119, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %1608, float* %1679, align 8
- %1680 = getelementptr inbounds %struct.btQuadWord* %axis119, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1680, align 4
- %1681 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 5 ; [#uses=1]
- %1682 = bitcast %struct.btTypedConstraint* %1681 to float* ; [#uses=1]
- %1683 = load float* %1682, align 4 ; [#uses=1]
- %1684 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 5, i32 1 ; [#uses=1]
- %1685 = bitcast %struct.btHashInt* %1684 to float* ; [#uses=1]
- %1686 = load float* %1685, align 4 ; [#uses=1]
- %1687 = bitcast %struct.btHashInt* %1566 to %struct.btQuadWord* ; [#uses=1]
- %1688 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %1689 = getelementptr inbounds i32 (...)** %1688, i32 4 ; [#uses=1]
- %1690 = load i32 (...)** %1689, align 4 ; [#uses=1]
- %1691 = bitcast i32 (...)* %1690 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %1692 = call %struct.btActionInterface* %1691(%struct.btCollisionWorld* %14) ; [#uses=2]
- %1693 = getelementptr inbounds %struct.btActionInterface* %1692, i32 0, i32 0 ; [#uses=1]
- %1694 = load i32 (...)*** %1693, align 4 ; [#uses=1]
- %1695 = getelementptr inbounds i32 (...)** %1694, i32 15 ; [#uses=1]
- %1696 = load i32 (...)** %1695, align 4 ; [#uses=1]
- %1697 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %1697, align 8
- %1698 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %1698, align 4
- %1699 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1699, align 8
- %1700 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %1700, align 4
- %1701 = bitcast i32 (...)* %1696 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*, float, float, float, float, %struct.btQuadWord*, i8, float)* ; [#uses=1]
- call void %1701(%struct.btActionInterface* %1692, %struct.btQuadWord* %1687, %struct.btQuadWord* %normal117, %struct.btQuadWord* %axis119, float %39, float %39, float %1683, float %1686, %struct.btQuadWord* %0, i8 zeroext 1, float 1.000000e+01)
- ret void
-
-return: ; preds = %bb109, %bb70, %bb34, %bb17, %bb16, %bb1, %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld14startProfilingEf(%struct.btDiscreteDynamicsWorld* nocapture %this, float %timeStep) align 2 {
-entry:
- tail call void @_ZN15CProfileManager5ResetEv()
- ret void
-}
-
-; [#uses=3]
-define void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallbackD1Ev(%struct..0InplaceSolverIslandCallback* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %2 = load %struct.btTypedConstraint*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btTypedConstraint** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btTypedConstraint** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- %8 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %11 = load %struct.btPersistentManifold*** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btPersistentManifold** %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btPersistentManifold** %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %bb2.i.i.i52, %ppad
- %16 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %40, align 4
- %17 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %19 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- %20 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %23 = load %struct.btCollisionObject*** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btCollisionObject** %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %bb10
- %25 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %27 = bitcast %struct.btCollisionObject** %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i42
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %22, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit: ; preds = %bb2.i.i.i42, %bb10
- %28 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %22, align 4
- %29 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %30, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %32 = load %struct.btPersistentManifold*** %31, align 4 ; [#uses=2]
- %33 = icmp eq %struct.btPersistentManifold** %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48, label %bb.i.i.i44
-
-bb.i.i.i44: ; preds = %lpad18
- %34 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i43 = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i43, label %bb2.i.i.i46, label %bb1.i.i.i45
-
-bb1.i.i.i45: ; preds = %bb.i.i.i44
- %36 = bitcast %struct.btPersistentManifold** %32 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %36)
- to label %bb2.i.i.i46 unwind label %lpad22
-
-bb2.i.i.i46: ; preds = %bb1.i.i.i45, %bb.i.i.i44
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %31, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48: ; preds = %bb2.i.i.i46, %lpad18
- %37 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %31, align 4
- %38 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i45
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %bb1.i.i.i51
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48 ] ; [#uses=1]
- %40 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %41 = load %struct.btCollisionObject*** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btCollisionObject** %41, null ; [#uses=1]
- br i1 %42, label %invcont8, label %bb.i.i.i50
-
-bb.i.i.i50: ; preds = %ppad
- %43 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i49 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i49, label %bb2.i.i.i52, label %bb1.i.i.i51
-
-bb1.i.i.i51: ; preds = %bb.i.i.i50
- %45 = bitcast %struct.btCollisionObject** %41 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %45)
- to label %bb2.i.i.i52 unwind label %lpad26
-
-bb2.i.i.i52: ; preds = %bb1.i.i.i51, %bb.i.i.i50
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %40, align 4
- br label %invcont8
-}
-
-; [#uses=1]
-define void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallbackD0Ev(%struct..0InplaceSolverIslandCallback* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %2 = load %struct.btTypedConstraint*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btTypedConstraint** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btTypedConstraint** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- %8 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %11 = load %struct.btPersistentManifold*** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btPersistentManifold** %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btPersistentManifold** %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %bb2.i.i.i52, %ppad
- %16 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %41, align 4
- %17 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %19 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- %20 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %23 = load %struct.btCollisionObject*** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btCollisionObject** %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %bb10
- %25 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %27 = bitcast %struct.btCollisionObject** %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i42
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %22, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit: ; preds = %bb2.i.i.i42, %bb10
- %28 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %22, align 4
- %29 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %30, align 4
- %31 = bitcast %struct..0InplaceSolverIslandCallback* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %31) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %32 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %33 = load %struct.btPersistentManifold*** %32, align 4 ; [#uses=2]
- %34 = icmp eq %struct.btPersistentManifold** %33, null ; [#uses=1]
- br i1 %34, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48, label %bb.i.i.i44
-
-bb.i.i.i44: ; preds = %lpad18
- %35 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %36 = load i8* %35, align 4 ; [#uses=1]
- %toBool.i.i.i43 = icmp eq i8 %36, 0 ; [#uses=1]
- br i1 %toBool.i.i.i43, label %bb2.i.i.i46, label %bb1.i.i.i45
-
-bb1.i.i.i45: ; preds = %bb.i.i.i44
- %37 = bitcast %struct.btPersistentManifold** %33 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %37)
- to label %bb2.i.i.i46 unwind label %lpad22
-
-bb2.i.i.i46: ; preds = %bb1.i.i.i45, %bb.i.i.i44
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %32, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48: ; preds = %bb2.i.i.i46, %lpad18
- %38 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %38, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %32, align 4
- %39 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %40, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i45
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %bb1.i.i.i51
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48 ] ; [#uses=1]
- %41 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %42 = load %struct.btCollisionObject*** %41, align 4 ; [#uses=2]
- %43 = icmp eq %struct.btCollisionObject** %42, null ; [#uses=1]
- br i1 %43, label %invcont8, label %bb.i.i.i50
-
-bb.i.i.i50: ; preds = %ppad
- %44 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %45 = load i8* %44, align 4 ; [#uses=1]
- %toBool.i.i.i49 = icmp eq i8 %45, 0 ; [#uses=1]
- br i1 %toBool.i.i.i49, label %bb2.i.i.i52, label %bb1.i.i.i51
-
-bb1.i.i.i51: ; preds = %bb.i.i.i50
- %46 = bitcast %struct.btCollisionObject** %42 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %46)
- to label %bb2.i.i.i52 unwind label %lpad26
-
-bb2.i.i.i52: ; preds = %bb1.i.i.i51, %bb.i.i.i50
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %41, align 4
- br label %invcont8
-}
-
-; [#uses=1]
-define internal void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallback13ProcessIslandEPP17btCollisionObjectiPP20btPersistentManifoldii(%struct..0InplaceSolverIslandCallback* %this, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifolds, i32 %numManifolds, i32 %islandId) align 2 {
-entry:
- %0 = icmp slt i32 %islandId, 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 4 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=5]
- br i1 %0, label %bb, label %bb6.preheader
-
-bb6.preheader: ; preds = %entry
- %3 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 3 ; [#uses=2]
- br label %bb6
-
-bb: ; preds = %entry
- %4 = sub i32 0, %numManifolds ; [#uses=1]
- %5 = icmp eq i32 %2, %4 ; [#uses=1]
- br i1 %5, label %return, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 2 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 3 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 7 ; [#uses=1]
- %13 = load %struct.btActionInterface** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 6 ; [#uses=1]
- %15 = load %struct.btStackAlloc** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 5 ; [#uses=1]
- %17 = load %struct.btActionInterface** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 1 ; [#uses=1]
- %19 = load %struct.btContactSolverInfo** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 3 ; [#uses=1]
- %21 = load %struct.btTypedConstraint*** %20, align 4 ; [#uses=1]
- %22 = bitcast i32 (...)* %11 to float (%struct.btActionInterface*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*, %struct.btActionInterface*)* ; [#uses=1]
- %23 = tail call float %22(%struct.btActionInterface* %7, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifolds, i32 %numManifolds, %struct.btTypedConstraint** %21, i32 %2, %struct.btContactSolverInfo* %19, %struct.btActionInterface* %17, %struct.btStackAlloc* %15, %struct.btActionInterface* %13) ; [#uses=0]
- ret void
-
-bb3: ; preds = %bb6
- %24 = load %struct.btTypedConstraint*** %3, align 4 ; [#uses=1]
- %scevgep53 = getelementptr %struct.btTypedConstraint** %24, i32 %38 ; [#uses=2]
- %25 = load %struct.btTypedConstraint** %scevgep53, align 4 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btTypedConstraint* %25, i32 0, i32 5 ; [#uses=1]
- %27 = load %struct.btRigidBody** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btRigidBody* %27, i32 0, i32 0, i32 13 ; [#uses=1]
- %29 = load i32* %28, align 4 ; [#uses=2]
- %30 = icmp sgt i32 %29, -1 ; [#uses=1]
- br i1 %30, label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit, label %bb1.i
-
-bb1.i: ; preds = %bb3
- %31 = getelementptr inbounds %struct.btTypedConstraint* %25, i32 0, i32 6 ; [#uses=1]
- %32 = load %struct.btRigidBody** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btRigidBody* %32, i32 0, i32 0, i32 13 ; [#uses=1]
- %34 = load i32* %33, align 4 ; [#uses=1]
- br label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit
-
-_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit: ; preds = %bb1.i, %bb3
- %35 = phi i32 [ %34, %bb1.i ], [ %29, %bb3 ] ; [#uses=1]
- %36 = icmp eq i32 %35, %islandId ; [#uses=1]
- br i1 %36, label %bb.nph38, label %bb5
-
-bb5: ; preds = %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit
- %37 = add nsw i32 %38, 1 ; [#uses=1]
- br label %bb6
-
-bb6: ; preds = %bb5, %bb6.preheader
- %38 = phi i32 [ %37, %bb5 ], [ 0, %bb6.preheader ] ; [#uses=6]
- %39 = icmp sgt i32 %2, %38 ; [#uses=1]
- br i1 %39, label %bb3, label %bb12
-
-bb.nph38: ; preds = %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit
- %40 = load %struct.btTypedConstraint*** %3, align 4 ; [#uses=1]
- %tmp = add i32 %38, 1 ; [#uses=2]
- %tmp45 = icmp sgt i32 %2, %tmp ; [#uses=1]
- %smax = select i1 %tmp45, i32 %2, i32 %tmp ; [#uses=1]
- %tmp47 = sub i32 %smax, %38 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30, %bb.nph38
- %indvar = phi i32 [ 0, %bb.nph38 ], [ %indvar.next, %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30 ] ; [#uses=2]
- %numCurConstraints.136 = phi i32 [ 0, %bb.nph38 ], [ %.numCurConstraints.1, %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30 ] ; [#uses=1]
- %tmp49 = add i32 %38, %indvar ; [#uses=1]
- %scevgep50 = getelementptr %struct.btTypedConstraint** %40, i32 %tmp49 ; [#uses=1]
- %41 = load %struct.btTypedConstraint** %scevgep50, align 4 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btTypedConstraint* %41, i32 0, i32 5 ; [#uses=1]
- %43 = load %struct.btRigidBody** %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btRigidBody* %43, i32 0, i32 0, i32 13 ; [#uses=1]
- %45 = load i32* %44, align 4 ; [#uses=2]
- %46 = icmp sgt i32 %45, -1 ; [#uses=1]
- br i1 %46, label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30, label %bb1.i29
-
-bb1.i29: ; preds = %bb7
- %47 = getelementptr inbounds %struct.btTypedConstraint* %41, i32 0, i32 6 ; [#uses=1]
- %48 = load %struct.btRigidBody** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %48, i32 0, i32 0, i32 13 ; [#uses=1]
- %50 = load i32* %49, align 4 ; [#uses=1]
- br label %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30
-
-_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30: ; preds = %bb1.i29, %bb7
- %51 = phi i32 [ %50, %bb1.i29 ], [ %45, %bb7 ] ; [#uses=1]
- %52 = icmp eq i32 %51, %islandId ; [#uses=1]
- %53 = zext i1 %52 to i32 ; [#uses=1]
- %.numCurConstraints.1 = add i32 %53, %numCurConstraints.136 ; [#uses=2]
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond48 = icmp eq i32 %indvar.next, %tmp47 ; [#uses=1]
- br i1 %exitcond48, label %bb12, label %bb7
-
-bb12: ; preds = %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30, %bb6
- %startConstraint.0.ph54 = phi %struct.btTypedConstraint** [ %scevgep53, %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30 ], [ null, %bb6 ] ; [#uses=2]
- %numCurConstraints.1.lcssa = phi i32 [ %.numCurConstraints.1, %_Z23btGetConstraintIslandIdPK17btTypedConstraint.exit30 ], [ 0, %bb6 ] ; [#uses=4]
- %54 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 1 ; [#uses=2]
- %55 = load %struct.btContactSolverInfo** %54, align 4 ; [#uses=2]
- %56 = getelementptr inbounds %struct.btContactSolverInfo* %55, i32 0, i32 0, i32 17 ; [#uses=1]
- %57 = load i32* %56, align 4 ; [#uses=1]
- %58 = icmp slt i32 %57, 2 ; [#uses=1]
- br i1 %58, label %bb13, label %bb17.preheader
-
-bb17.preheader: ; preds = %bb12
- %59 = icmp sgt i32 %numBodies, 0 ; [#uses=1]
- br i1 %59, label %bb.nph35, label %bb20.preheader
-
-bb13: ; preds = %bb12
- %60 = sub i32 0, %numManifolds ; [#uses=1]
- %61 = icmp eq i32 %numCurConstraints.1.lcssa, %60 ; [#uses=1]
- br i1 %61, label %return, label %bb14
-
-bb14: ; preds = %bb13
- %62 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 2 ; [#uses=1]
- %63 = load %struct.btActionInterface** %62, align 4 ; [#uses=2]
- %64 = getelementptr inbounds %struct.btActionInterface* %63, i32 0, i32 0 ; [#uses=1]
- %65 = load i32 (...)*** %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds i32 (...)** %65, i32 3 ; [#uses=1]
- %67 = load i32 (...)** %66, align 4 ; [#uses=1]
- %68 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 7 ; [#uses=1]
- %69 = load %struct.btActionInterface** %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 6 ; [#uses=1]
- %71 = load %struct.btStackAlloc** %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 5 ; [#uses=1]
- %73 = load %struct.btActionInterface** %72, align 4 ; [#uses=1]
- %74 = bitcast i32 (...)* %67 to float (%struct.btActionInterface*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*, %struct.btActionInterface*)* ; [#uses=1]
- %75 = tail call float %74(%struct.btActionInterface* %63, %struct.btCollisionObject** %bodies, i32 %numBodies, %struct.btPersistentManifold** %manifolds, i32 %numManifolds, %struct.btTypedConstraint** %startConstraint.0.ph54, i32 %numCurConstraints.1.lcssa, %struct.btContactSolverInfo* %55, %struct.btActionInterface* %73, %struct.btStackAlloc* %71, %struct.btActionInterface* %69) ; [#uses=0]
- ret void
-
-bb.nph35: ; preds = %bb17.preheader
- %76 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb16, %bb.nph35
- %i.234 = phi i32 [ 0, %bb.nph35 ], [ %77, %bb16 ] ; [#uses=2]
- %scevgep44 = getelementptr %struct.btCollisionObject** %bodies, i32 %i.234 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_(%"struct.btAlignedObjectArray<btCollisionObject*>"* %76, %struct.btCollisionObject** %scevgep44) inlinehint
- %77 = add nsw i32 %i.234, 1 ; [#uses=2]
- %exitcond43 = icmp eq i32 %77, %numBodies ; [#uses=1]
- br i1 %exitcond43, label %bb20.preheader, label %bb16
-
-bb20.preheader: ; preds = %bb16, %bb17.preheader
- %78 = icmp sgt i32 %numManifolds, 0 ; [#uses=1]
- br i1 %78, label %bb.nph33, label %bb23.preheader
-
-bb.nph33: ; preds = %bb20.preheader
- %79 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9 ; [#uses=1]
- br label %bb19
-
-bb19: ; preds = %bb19, %bb.nph33
- %i.332 = phi i32 [ 0, %bb.nph33 ], [ %80, %bb19 ] ; [#uses=2]
- %scevgep42 = getelementptr %struct.btPersistentManifold** %manifolds, i32 %i.332 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayIP20btPersistentManifoldE9push_backERKS1_(%"struct.btAlignedObjectArray<btPersistentManifold*>"* %79, %struct.btPersistentManifold** %scevgep42) inlinehint
- %80 = add nsw i32 %i.332, 1 ; [#uses=2]
- %exitcond41 = icmp eq i32 %80, %numManifolds ; [#uses=1]
- br i1 %exitcond41, label %bb23.preheader, label %bb19
-
-bb23.preheader: ; preds = %bb19, %bb20.preheader
- %81 = icmp sgt i32 %numCurConstraints.1.lcssa, 0 ; [#uses=1]
- br i1 %81, label %bb.nph, label %bb24
-
-bb.nph: ; preds = %bb23.preheader
- %82 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10 ; [#uses=1]
- br label %bb22
-
-bb22: ; preds = %bb22, %bb.nph
- %i.431 = phi i32 [ 0, %bb.nph ], [ %83, %bb22 ] ; [#uses=2]
- %scevgep = getelementptr %struct.btTypedConstraint** %startConstraint.0.ph54, i32 %i.431 ; [#uses=1]
- tail call void @_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_(%"struct.btAlignedObjectArray<btTypedConstraint*>"* %82, %struct.btTypedConstraint** %scevgep) inlinehint
- %83 = add nsw i32 %i.431, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %83, %numCurConstraints.1.lcssa ; [#uses=1]
- br i1 %exitcond, label %bb24, label %bb22
-
-bb24: ; preds = %bb22, %bb23.preheader
- %84 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- %85 = load i32* %84, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- %87 = load i32* %86, align 4 ; [#uses=1]
- %88 = add nsw i32 %87, %85 ; [#uses=1]
- %89 = load %struct.btContactSolverInfo** %54, align 4 ; [#uses=1]
- %90 = getelementptr inbounds %struct.btContactSolverInfo* %89, i32 0, i32 0, i32 17 ; [#uses=1]
- %91 = load i32* %90, align 4 ; [#uses=1]
- %92 = icmp sgt i32 %88, %91 ; [#uses=1]
- br i1 %92, label %bb26, label %return
-
-bb26: ; preds = %bb24
- tail call fastcc void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallback18processConstraintsEv(%struct..0InplaceSolverIslandCallback* %this)
- ret void
-
-return: ; preds = %bb24, %bb13, %bb
- ret void
-}
-
-; [#uses=0]
-define void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallbackD2Ev(%struct..0InplaceSolverIslandCallback* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %2 = load %struct.btTypedConstraint*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btTypedConstraint** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btTypedConstraint** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad18
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- %8 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %11 = load %struct.btPersistentManifold*** %10, align 4 ; [#uses=2]
- %12 = icmp eq %struct.btPersistentManifold** %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i35
-
-bb.i.i.i35: ; preds = %bb3
- %13 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i34 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i34, label %bb2.i.i.i37, label %bb1.i.i.i36
-
-bb1.i.i.i36: ; preds = %bb.i.i.i35
- %15 = bitcast %struct.btPersistentManifold** %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i37 unwind label %lpad
-
-bb2.i.i.i37: ; preds = %bb1.i.i.i36, %bb.i.i.i35
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- br label %bb10
-
-invcont8: ; preds = %bb2.i.i.i52, %ppad
- %16 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %40, align 4
- %17 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb10: ; preds = %bb2.i.i.i37, %bb3
- %19 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %10, align 4
- %20 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %23 = load %struct.btCollisionObject*** %22, align 4 ; [#uses=2]
- %24 = icmp eq %struct.btCollisionObject** %23, null ; [#uses=1]
- br i1 %24, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit, label %bb.i.i.i40
-
-bb.i.i.i40: ; preds = %bb10
- %25 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %26 = load i8* %25, align 4 ; [#uses=1]
- %toBool.i.i.i39 = icmp eq i8 %26, 0 ; [#uses=1]
- br i1 %toBool.i.i.i39, label %bb2.i.i.i42, label %bb1.i.i.i41
-
-bb1.i.i.i41: ; preds = %bb.i.i.i40
- %27 = bitcast %struct.btCollisionObject** %23 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %27)
- br label %bb2.i.i.i42
-
-bb2.i.i.i42: ; preds = %bb1.i.i.i41, %bb.i.i.i40
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %22, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectED1Ev.exit: ; preds = %bb2.i.i.i42, %bb10
- %28 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %28, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %22, align 4
- %29 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %30, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i36
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad18: ; preds = %bb1.i.i.i
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %31 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %32 = load %struct.btPersistentManifold*** %31, align 4 ; [#uses=2]
- %33 = icmp eq %struct.btPersistentManifold** %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48, label %bb.i.i.i44
-
-bb.i.i.i44: ; preds = %lpad18
- %34 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i43 = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i43, label %bb2.i.i.i46, label %bb1.i.i.i45
-
-bb1.i.i.i45: ; preds = %bb.i.i.i44
- %36 = bitcast %struct.btPersistentManifold** %32 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %36)
- to label %bb2.i.i.i46 unwind label %lpad22
-
-bb2.i.i.i46: ; preds = %bb1.i.i.i45, %bb.i.i.i44
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %31, align 4
- br label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48: ; preds = %bb2.i.i.i46, %lpad18
- %37 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %31, align 4
- %38 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- br label %ppad
-
-lpad22: ; preds = %bb1.i.i.i45
- %eh_ptr23 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad26: ; preds = %bb1.i.i.i51
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr19, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldED1Ev.exit48 ] ; [#uses=1]
- %40 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %41 = load %struct.btCollisionObject*** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btCollisionObject** %41, null ; [#uses=1]
- br i1 %42, label %invcont8, label %bb.i.i.i50
-
-bb.i.i.i50: ; preds = %ppad
- %43 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i49 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i49, label %bb2.i.i.i52, label %bb1.i.i.i51
-
-bb1.i.i.i51: ; preds = %bb.i.i.i50
- %45 = bitcast %struct.btCollisionObject** %41 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %45)
- to label %bb2.i.i.i52 unwind label %lpad26
-
-bb2.i.i.i52: ; preds = %bb1.i.i.i51, %bb.i.i.i50
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %40, align 4
- br label %invcont8
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld25predictUnconstraintMotionEf(%struct.btDiscreteDynamicsWorld* nocapture %this, float %timeStep) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([26 x i8]* @.str20, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb7
-
-bb: ; preds = %bb7
- %2 = load %struct.btRigidBody*** %1, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btRigidBody** %2, i32 %10 ; [#uses=1]
- %3 = load %struct.btRigidBody** %scevgep, align 4 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 12 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = and i32 %5, 3 ; [#uses=1]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb3, label %bb6
-
-bb3: ; preds = %bb
- invoke void @_ZN11btRigidBody19integrateVelocitiesEf(%struct.btRigidBody* %3, float %timeStep)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb3
- invoke void @_ZN11btRigidBody12applyDampingEf(%struct.btRigidBody* %3, float %timeStep)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %invcont
- %8 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %3, float %timeStep, %struct.btTransform* %8)
- to label %bb6 unwind label %lpad
-
-bb6: ; preds = %invcont4, %bb
- %9 = add nsw i32 %10, 1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %entry
- %10 = phi i32 [ 0, %entry ], [ %9, %bb6 ] ; [#uses=3]
- %11 = load i32* %0, align 4 ; [#uses=1]
- %12 = icmp sgt i32 %11, %10 ; [#uses=1]
- br i1 %12, label %bb, label %bb12
-
-invcont10: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb12: ; preds = %bb7
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %invcont4, %invcont, %bb3
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont10 unwind label %lpad15
-
-lpad15: ; preds = %lpad
- %eh_ptr16 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select18 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr16, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld26calculateSimulationIslandsEv(%struct.btDiscreteDynamicsWorld* %this) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([27 x i8]* @.str121, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 2 ; [#uses=3]
- %1 = load %struct.btSimulationIslandManager** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btSimulationIslandManager* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %9 = bitcast i32 (...)* %5 to void (%struct.btSimulationIslandManager*, %struct.btCollisionWorld*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %9(%struct.btSimulationIslandManager* %1, %struct.btCollisionWorld* %8, %struct.btActionInterface* %7)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %10 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=2]
- %12 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %12, label %bb.nph, label %bb33
-
-bb.nph: ; preds = %invcont
- %13 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb31, %bb.nph
- %i.059 = phi i32 [ 0, %bb.nph ], [ %77, %bb31 ] ; [#uses=2]
- %14 = load %struct.btTypedConstraint*** %13, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btTypedConstraint** %14, i32 %i.059 ; [#uses=1]
- %15 = load %struct.btTypedConstraint** %scevgep, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btTypedConstraint* %15, i32 0, i32 5 ; [#uses=1]
- %17 = load %struct.btRigidBody** %16, align 4 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btTypedConstraint* %15, i32 0, i32 6 ; [#uses=1]
- %19 = load %struct.btRigidBody** %18, align 4 ; [#uses=4]
- %20 = icmp eq %struct.btRigidBody* %17, null ; [#uses=1]
- br i1 %20, label %bb31, label %bb1
-
-bb1: ; preds = %bb
- %21 = getelementptr inbounds %struct.btRigidBody* %17, i32 0, i32 0, i32 12 ; [#uses=1]
- %22 = load i32* %21, align 4 ; [#uses=1]
- %23 = and i32 %22, 3 ; [#uses=1]
- %24 = icmp ne i32 %23, 0 ; [#uses=1]
- %25 = icmp eq %struct.btRigidBody* %19, null ; [#uses=1]
- %or.cond = or i1 %24, %25 ; [#uses=1]
- br i1 %or.cond, label %bb31, label %bb9
-
-bb9: ; preds = %bb1
- %26 = getelementptr inbounds %struct.btRigidBody* %19, i32 0, i32 0, i32 12 ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = and i32 %27, 3 ; [#uses=1]
- %29 = icmp eq i32 %28, 0 ; [#uses=1]
- br i1 %29, label %bb21, label %bb31
-
-bb21: ; preds = %bb9
- %30 = getelementptr inbounds %struct.btRigidBody* %17, i32 0, i32 0, i32 15 ; [#uses=1]
- %31 = load i32* %30, align 4 ; [#uses=1]
- switch i32 %31, label %bb29 [
- i32 2, label %bb23
- i32 5, label %bb23
- ]
-
-bb23: ; preds = %bb21, %bb21
- %32 = getelementptr inbounds %struct.btRigidBody* %19, i32 0, i32 0, i32 15 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- switch i32 %33, label %bb29 [
- i32 2, label %bb31
- i32 5, label %bb31
- ]
-
-bb29: ; preds = %bb23, %bb21
- %34 = getelementptr inbounds %struct.btRigidBody* %19, i32 0, i32 0, i32 13 ; [#uses=1]
- %35 = load i32* %34, align 4 ; [#uses=4]
- %36 = getelementptr inbounds %struct.btRigidBody* %17, i32 0, i32 0, i32 13 ; [#uses=1]
- %37 = load i32* %36, align 4 ; [#uses=4]
- %38 = load %struct.btSimulationIslandManager** %0, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btSimulationIslandManager* %38, i32 0, i32 1, i32 0, i32 3 ; [#uses=4]
- %40 = load %struct.CONTACT_KEY_TOKEN** %39, align 4 ; [#uses=3]
- %41 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %40, i32 %37, i32 0 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=2]
- %43 = icmp eq i32 %42, %37 ; [#uses=1]
- br i1 %43, label %_ZN11btUnionFind4findEi.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %bb.i.i, %bb29
- %44 = phi i32 [ %52, %bb.i.i ], [ %42, %bb29 ] ; [#uses=1]
- %45 = phi %struct.CONTACT_KEY_TOKEN* [ %50, %bb.i.i ], [ %40, %bb29 ] ; [#uses=2]
- %x_addr.04.i.i = phi i32 [ %49, %bb.i.i ], [ %37, %bb29 ] ; [#uses=1]
- %46 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %45, i32 %x_addr.04.i.i, i32 0 ; [#uses=1]
- %47 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %45, i32 %44, i32 0 ; [#uses=2]
- %48 = load i32* %47, align 4 ; [#uses=1]
- store i32 %48, i32* %46, align 4
- %49 = load i32* %47, align 4 ; [#uses=4]
- %50 = load %struct.CONTACT_KEY_TOKEN** %39, align 4 ; [#uses=3]
- %51 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %50, i32 %49, i32 0 ; [#uses=1]
- %52 = load i32* %51, align 4 ; [#uses=2]
- %53 = icmp eq i32 %52, %49 ; [#uses=1]
- br i1 %53, label %_ZN11btUnionFind4findEi.exit.i, label %bb.i.i
-
-_ZN11btUnionFind4findEi.exit.i: ; preds = %bb.i.i, %bb29
- %54 = phi %struct.CONTACT_KEY_TOKEN* [ %40, %bb29 ], [ %50, %bb.i.i ] ; [#uses=3]
- %x_addr.0.lcssa.i.i = phi i32 [ %37, %bb29 ], [ %49, %bb.i.i ] ; [#uses=3]
- %55 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %54, i32 %35, i32 0 ; [#uses=1]
- %56 = load i32* %55, align 4 ; [#uses=2]
- %57 = icmp eq i32 %56, %35 ; [#uses=1]
- br i1 %57, label %_ZN11btUnionFind4findEi.exit5.i, label %bb.i3.i
-
-bb.i3.i: ; preds = %bb.i3.i, %_ZN11btUnionFind4findEi.exit.i
- %58 = phi i32 [ %66, %bb.i3.i ], [ %56, %_ZN11btUnionFind4findEi.exit.i ] ; [#uses=1]
- %59 = phi %struct.CONTACT_KEY_TOKEN* [ %64, %bb.i3.i ], [ %54, %_ZN11btUnionFind4findEi.exit.i ] ; [#uses=2]
- %x_addr.04.i2.i = phi i32 [ %63, %bb.i3.i ], [ %35, %_ZN11btUnionFind4findEi.exit.i ] ; [#uses=1]
- %60 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %59, i32 %x_addr.04.i2.i, i32 0 ; [#uses=1]
- %61 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %59, i32 %58, i32 0 ; [#uses=2]
- %62 = load i32* %61, align 4 ; [#uses=1]
- store i32 %62, i32* %60, align 4
- %63 = load i32* %61, align 4 ; [#uses=4]
- %64 = load %struct.CONTACT_KEY_TOKEN** %39, align 4 ; [#uses=3]
- %65 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %64, i32 %63, i32 0 ; [#uses=1]
- %66 = load i32* %65, align 4 ; [#uses=2]
- %67 = icmp eq i32 %66, %63 ; [#uses=1]
- br i1 %67, label %_ZN11btUnionFind4findEi.exit5.i, label %bb.i3.i
-
-_ZN11btUnionFind4findEi.exit5.i: ; preds = %bb.i3.i, %_ZN11btUnionFind4findEi.exit.i
- %68 = phi %struct.CONTACT_KEY_TOKEN* [ %54, %_ZN11btUnionFind4findEi.exit.i ], [ %64, %bb.i3.i ] ; [#uses=1]
- %x_addr.0.lcssa.i4.i = phi i32 [ %35, %_ZN11btUnionFind4findEi.exit.i ], [ %63, %bb.i3.i ] ; [#uses=3]
- %69 = icmp eq i32 %x_addr.0.lcssa.i.i, %x_addr.0.lcssa.i4.i ; [#uses=1]
- br i1 %69, label %bb31, label %bb.i
-
-bb.i: ; preds = %_ZN11btUnionFind4findEi.exit5.i
- %70 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %68, i32 %x_addr.0.lcssa.i.i, i32 0 ; [#uses=1]
- store i32 %x_addr.0.lcssa.i4.i, i32* %70, align 4
- %71 = load %struct.CONTACT_KEY_TOKEN** %39, align 4 ; [#uses=2]
- %72 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %71, i32 %x_addr.0.lcssa.i4.i, i32 1 ; [#uses=2]
- %73 = load i32* %72, align 4 ; [#uses=1]
- %74 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %71, i32 %x_addr.0.lcssa.i.i, i32 1 ; [#uses=1]
- %75 = load i32* %74, align 4 ; [#uses=1]
- %76 = add nsw i32 %75, %73 ; [#uses=1]
- store i32 %76, i32* %72, align 4
- br label %bb31
-
-bb31: ; preds = %bb.i, %_ZN11btUnionFind4findEi.exit5.i, %bb23, %bb23, %bb9, %bb1, %bb
- %77 = add nsw i32 %i.059, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %77, %11 ; [#uses=1]
- br i1 %exitcond, label %bb33, label %bb
-
-bb33: ; preds = %bb31, %invcont
- %78 = load %struct.btSimulationIslandManager** %0, align 4 ; [#uses=2]
- %79 = getelementptr inbounds %struct.btSimulationIslandManager* %78, i32 0, i32 0 ; [#uses=1]
- %80 = load i32 (...)*** %79, align 4 ; [#uses=1]
- %81 = getelementptr inbounds i32 (...)** %80, i32 3 ; [#uses=1]
- %82 = load i32 (...)** %81, align 4 ; [#uses=1]
- %83 = bitcast i32 (...)* %82 to void (%struct.btSimulationIslandManager*, %struct.btCollisionWorld*)* ; [#uses=1]
- invoke void %83(%struct.btSimulationIslandManager* %78, %struct.btCollisionWorld* %8)
- to label %bb38 unwind label %lpad
-
-invcont36: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb38: ; preds = %bb33
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb33, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select40 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont36 unwind label %lpad41
-
-lpad41: ; preds = %lpad
- %eh_ptr42 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select44 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr42, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=3]
-define void @_ZN23btDiscreteDynamicsWorld13updateActionsEf(%struct.btDiscreteDynamicsWorld* %this, float %timeStep) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([14 x i8]* @.str222, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb1
-
-bb: ; preds = %bb1
- %3 = load %struct.btActionInterface*** %1, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btActionInterface** %3, i32 %11 ; [#uses=1]
- %4 = load %struct.btActionInterface** %scevgep, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btActionInterface* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds i32 (...)** %6, i32 2 ; [#uses=1]
- %8 = load i32 (...)** %7, align 4 ; [#uses=1]
- %9 = bitcast i32 (...)* %8 to void (%struct.btActionInterface*, %struct.btCollisionWorld*, float)* ; [#uses=1]
- invoke void %9(%struct.btActionInterface* %4, %struct.btCollisionWorld* %2, float %timeStep)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb
- %10 = add nsw i32 %11, 1 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %invcont, %entry
- %11 = phi i32 [ 0, %entry ], [ %10, %invcont ] ; [#uses=3]
- %12 = load i32* %0, align 4 ; [#uses=1]
- %13 = icmp sgt i32 %12, %11 ; [#uses=1]
- br i1 %13, label %bb, label %bb5
-
-invcont3: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb5: ; preds = %bb1
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select7 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont3 unwind label %lpad8
-
-lpad8: ; preds = %lpad
- %eh_ptr9 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select11 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr9, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_(%"struct.btAlignedObjectArray<btTypedConstraint*>"* nocapture %this, %struct.btTypedConstraint** nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.528.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.528.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.528.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.528.0.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btTypedConstraint** ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btTypedConstraint** [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr %struct.btTypedConstraint** %12, i32 %indvar.i.i ; [#uses=2]
- %15 = icmp eq %struct.btTypedConstraint** %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %16 = load %struct.btTypedConstraint*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btTypedConstraint** %16, i32 %indvar.i.i ; [#uses=1]
- %17 = load %struct.btTypedConstraint** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btTypedConstraint* %17, %struct.btTypedConstraint** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.btTypedConstraint*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btTypedConstraint** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %struct.btTypedConstraint** %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btTypedConstraint** %12, %struct.btTypedConstraint*** %18, align 4
- store i32 %iftmp.528.0.i, i32* %2, align 4
- %.pre5 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i, %bb, %entry
- %25 = phi i32 [ %.pre5, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=2]
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %this, i32 0, i32 3 ; [#uses=1]
- %27 = load %struct.btTypedConstraint*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTypedConstraint** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btTypedConstraint** %28, null ; [#uses=1]
- br i1 %29, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %30 = load %struct.btTypedConstraint** %_Val, align 4 ; [#uses=1]
- store %struct.btTypedConstraint* %30, %struct.btTypedConstraint** %28, align 4
- %.pre6 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %31 = phi i32 [ %25, %bb1 ], [ %.pre6, %bb2 ] ; [#uses=1]
- %32 = add nsw i32 %31, 1 ; [#uses=1]
- store i32 %32, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIP17btCollisionObjectE9push_backERKS1_(%"struct.btAlignedObjectArray<btCollisionObject*>"* nocapture %this, %struct.btCollisionObject** nocapture %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.472.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.472.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.472.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = shl i32 %iftmp.472.0.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btCollisionObject** ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btCollisionObject** [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr %struct.btCollisionObject** %12, i32 %indvar.i.i ; [#uses=2]
- %15 = icmp eq %struct.btCollisionObject** %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %16 = load %struct.btCollisionObject*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btCollisionObject** %16, i32 %indvar.i.i ; [#uses=1]
- %17 = load %struct.btCollisionObject** %scevgep8.i.i, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %17, %struct.btCollisionObject** %scevgep.i.i, align 4
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.btCollisionObject*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btCollisionObject** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %23 = bitcast %struct.btCollisionObject** %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIP17btCollisionObjectE4copyEiiPS1_.exit.i
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btCollisionObject** %12, %struct.btCollisionObject*** %18, align 4
- store i32 %iftmp.472.0.i, i32* %2, align 4
- %.pre5 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i, %bb, %entry
- %25 = phi i32 [ %.pre5, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=2]
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<btCollisionObject*>"* %this, i32 0, i32 3 ; [#uses=1]
- %27 = load %struct.btCollisionObject*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btCollisionObject** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btCollisionObject** %28, null ; [#uses=1]
- br i1 %29, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- %30 = load %struct.btCollisionObject** %_Val, align 4 ; [#uses=1]
- store %struct.btCollisionObject* %30, %struct.btCollisionObject** %28, align 4
- %.pre6 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %31 = phi i32 [ %25, %bb1 ], [ %.pre6, %bb2 ] ; [#uses=1]
- %32 = add nsw i32 %31, 1 ; [#uses=1]
- store i32 %32, i32* %0, align 4
- ret void
-}
-
-; [#uses=2]
-define internal fastcc void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallback18processConstraintsEv(%struct..0InplaceSolverIslandCallback* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 1 ; [#uses=3]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = add nsw i32 %3, %1 ; [#uses=1]
- %5 = icmp sgt i32 %4, 0 ; [#uses=1]
- br i1 %5, label %bb, label %bb1
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 2 ; [#uses=1]
- %7 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btActionInterface* %7, i32 0, i32 0 ; [#uses=1]
- %9 = load i32 (...)*** %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds i32 (...)** %9, i32 3 ; [#uses=1]
- %11 = load i32 (...)** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 7 ; [#uses=1]
- %13 = load %struct.btActionInterface** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 6 ; [#uses=1]
- %15 = load %struct.btStackAlloc** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 5 ; [#uses=1]
- %17 = load %struct.btActionInterface** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 1 ; [#uses=1]
- %19 = load %struct.btContactSolverInfo** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %21 = load %struct.btTypedConstraint*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- %23 = load %struct.btPersistentManifold*** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %27 = load %struct.btCollisionObject*** %26, align 4 ; [#uses=1]
- %28 = bitcast i32 (...)* %11 to float (%struct.btActionInterface*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*, %struct.btActionInterface*)* ; [#uses=1]
- %29 = tail call float %28(%struct.btActionInterface* %7, %struct.btCollisionObject** %27, i32 %25, %struct.btPersistentManifold** %23, i32 %1, %struct.btTypedConstraint** %21, i32 %3, %struct.btContactSolverInfo* %19, %struct.btActionInterface* %17, %struct.btStackAlloc* %15, %struct.btActionInterface* %13) ; [#uses=0]
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %30 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 1 ; [#uses=2]
- %31 = load i32* %30, align 4 ; [#uses=4]
- %32 = icmp sgt i32 %31, 0 ; [#uses=1]
- %.not = xor i1 %32, true ; [#uses=1]
- %33 = icmp slt i32 %31, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %33 ; [#uses=1]
- br i1 %or.cond, label %bb4.i30, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit
-
-bb4.i30: ; preds = %bb1
- %34 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 2 ; [#uses=2]
- %35 = load i32* %34, align 4 ; [#uses=1]
- %36 = icmp slt i32 %35, 0 ; [#uses=1]
- br i1 %36, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i, label %bb.nph.i47
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i: ; preds = %bb4.i30
- %37 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=3]
- %38 = load %struct.btCollisionObject*** %37, align 4 ; [#uses=2]
- %39 = icmp eq %struct.btCollisionObject** %38, null ; [#uses=1]
- br i1 %39, label %bb11.preheader.i45, label %bb.i.i.i42
-
-bb.i.i.i42: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %40 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- %41 = load i8* %40, align 4 ; [#uses=1]
- %toBool.i.i.i41 = icmp eq i8 %41, 0 ; [#uses=1]
- br i1 %toBool.i.i.i41, label %bb2.i.i.i44, label %bb1.i.i.i43
-
-bb1.i.i.i43: ; preds = %bb.i.i.i42
- %42 = bitcast %struct.btCollisionObject** %38 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %42)
- br label %bb2.i.i.i44
-
-bb2.i.i.i44: ; preds = %bb1.i.i.i43, %bb.i.i.i42
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %37, align 4
- br label %bb11.preheader.i45
-
-bb11.preheader.i45: ; preds = %bb2.i.i.i44, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE8allocateEi.exit.i.i
- %43 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %43, align 4
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %37, align 4
- store i32 0, i32* %34, align 4
- br label %bb.nph.i47
-
-bb.nph.i47: ; preds = %bb11.preheader.i45, %bb4.i30
- %44 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 8, i32 3 ; [#uses=1]
- %tmp.i46 = sub i32 0, %31 ; [#uses=1]
- br label %bb7.i51
-
-bb7.i51: ; preds = %bb10.i55, %bb.nph.i47
- %indvar.i48 = phi i32 [ 0, %bb.nph.i47 ], [ %indvar.next.i53, %bb10.i55 ] ; [#uses=2]
- %tmp = add i32 %31, %indvar.i48 ; [#uses=1]
- %45 = load %struct.btCollisionObject*** %44, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %45, i32 %tmp ; [#uses=2]
- %46 = icmp eq %struct.btCollisionObject** %scevgep, null ; [#uses=1]
- br i1 %46, label %bb10.i55, label %bb8.i52
-
-bb8.i52: ; preds = %bb7.i51
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %scevgep, align 4
- br label %bb10.i55
-
-bb10.i55: ; preds = %bb8.i52, %bb7.i51
- %indvar.next.i53 = add i32 %indvar.i48, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i53, %tmp.i46 ; [#uses=1]
- br i1 %exitcond, label %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit, label %bb7.i51
-
-_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit: ; preds = %bb10.i55, %bb1
- store i32 0, i32* %30, align 4
- %47 = load i32* %0, align 4 ; [#uses=4]
- %48 = icmp sgt i32 %47, 0 ; [#uses=1]
- %.not64 = xor i1 %48, true ; [#uses=1]
- %49 = icmp slt i32 %47, 0 ; [#uses=1]
- %or.cond65 = and i1 %.not64, %49 ; [#uses=1]
- br i1 %or.cond65, label %bb4.i3, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit
-
-bb4.i3: ; preds = %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit
- %50 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 2 ; [#uses=2]
- %51 = load i32* %50, align 4 ; [#uses=1]
- %52 = icmp slt i32 %51, 0 ; [#uses=1]
- br i1 %52, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i, label %bb.nph.i20
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i: ; preds = %bb4.i3
- %53 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=3]
- %54 = load %struct.btPersistentManifold*** %53, align 4 ; [#uses=2]
- %55 = icmp eq %struct.btPersistentManifold** %54, null ; [#uses=1]
- br i1 %55, label %bb11.preheader.i18, label %bb.i.i.i15
-
-bb.i.i.i15: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %56 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- %57 = load i8* %56, align 4 ; [#uses=1]
- %toBool.i.i.i14 = icmp eq i8 %57, 0 ; [#uses=1]
- br i1 %toBool.i.i.i14, label %bb2.i.i.i17, label %bb1.i.i.i16
-
-bb1.i.i.i16: ; preds = %bb.i.i.i15
- %58 = bitcast %struct.btPersistentManifold** %54 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %58)
- br label %bb2.i.i.i17
-
-bb2.i.i.i17: ; preds = %bb1.i.i.i16, %bb.i.i.i15
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %53, align 4
- br label %bb11.preheader.i18
-
-bb11.preheader.i18: ; preds = %bb2.i.i.i17, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE8allocateEi.exit.i.i
- %59 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %59, align 4
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %53, align 4
- store i32 0, i32* %50, align 4
- br label %bb.nph.i20
-
-bb.nph.i20: ; preds = %bb11.preheader.i18, %bb4.i3
- %60 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 9, i32 3 ; [#uses=1]
- %tmp.i19 = sub i32 0, %47 ; [#uses=1]
- br label %bb7.i24
-
-bb7.i24: ; preds = %bb10.i28, %bb.nph.i20
- %indvar.i21 = phi i32 [ 0, %bb.nph.i20 ], [ %indvar.next.i26, %bb10.i28 ] ; [#uses=2]
- %tmp57 = add i32 %47, %indvar.i21 ; [#uses=1]
- %61 = load %struct.btPersistentManifold*** %60, align 4 ; [#uses=1]
- %scevgep59 = getelementptr %struct.btPersistentManifold** %61, i32 %tmp57 ; [#uses=2]
- %62 = icmp eq %struct.btPersistentManifold** %scevgep59, null ; [#uses=1]
- br i1 %62, label %bb10.i28, label %bb8.i25
-
-bb8.i25: ; preds = %bb7.i24
- store %struct.btPersistentManifold* null, %struct.btPersistentManifold** %scevgep59, align 4
- br label %bb10.i28
-
-bb10.i28: ; preds = %bb8.i25, %bb7.i24
- %indvar.next.i26 = add i32 %indvar.i21, 1 ; [#uses=2]
- %exitcond56 = icmp eq i32 %indvar.next.i26, %tmp.i19 ; [#uses=1]
- br i1 %exitcond56, label %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit, label %bb7.i24
-
-_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit: ; preds = %bb10.i28, %_ZN20btAlignedObjectArrayIP17btCollisionObjectE6resizeEiRKS1_.exit
- store i32 0, i32* %0, align 4
- %63 = load i32* %2, align 4 ; [#uses=4]
- %64 = icmp sgt i32 %63, 0 ; [#uses=1]
- %.not66 = xor i1 %64, true ; [#uses=1]
- %65 = icmp slt i32 %63, 0 ; [#uses=1]
- %or.cond67 = and i1 %.not66, %65 ; [#uses=1]
- br i1 %or.cond67, label %bb4.i, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit
-
-bb4.i: ; preds = %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit
- %66 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 2 ; [#uses=2]
- %67 = load i32* %66, align 4 ; [#uses=1]
- %68 = icmp slt i32 %67, 0 ; [#uses=1]
- br i1 %68, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i: ; preds = %bb4.i
- %69 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %70 = load %struct.btTypedConstraint*** %69, align 4 ; [#uses=2]
- %71 = icmp eq %struct.btTypedConstraint** %70, null ; [#uses=1]
- br i1 %71, label %bb11.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %72 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %73 = load i8* %72, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %73, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %74 = bitcast %struct.btTypedConstraint** %70 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %74)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %69, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %75 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %75, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %69, align 4
- store i32 0, i32* %66, align 4
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb11.preheader.i, %bb4.i
- %76 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %tmp.i = sub i32 0, %63 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp61 = add i32 %63, %indvar.i ; [#uses=1]
- %77 = load %struct.btTypedConstraint*** %76, align 4 ; [#uses=1]
- %scevgep63 = getelementptr %struct.btTypedConstraint** %77, i32 %tmp61 ; [#uses=2]
- %78 = icmp eq %struct.btTypedConstraint** %scevgep63, null ; [#uses=1]
- br i1 %78, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store %struct.btTypedConstraint* null, %struct.btTypedConstraint** %scevgep63, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond60 = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond60, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit: ; preds = %bb10.i, %_ZN20btAlignedObjectArrayIP20btPersistentManifoldE6resizeEiRKS1_.exit
- store i32 0, i32* %2, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld9addActionEP17btActionInterface(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btActionInterface* %action) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.531.0.i.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.531.0.i.i ; [#uses=1]
- br i1 %7, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %8 = icmp eq i32 %iftmp.531.0.i.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIP17btActionInterfaceE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %9 = shl i32 %iftmp.531.0.i.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %10 to %struct.btActionInterface** ; [#uses=1]
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btActionInterfaceE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btActionInterfaceE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %11 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %1, %bb.i.i ] ; [#uses=2]
- %12 = phi %struct.btActionInterface** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP17btActionInterfaceE8allocateEi.exit.i.i
- %14 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btActionInterface** %12, i32 %indvar.i.i.i ; [#uses=2]
- %15 = icmp eq %struct.btActionInterface** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %16 = load %struct.btActionInterface*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btActionInterface** %16, i32 %indvar.i.i.i ; [#uses=1]
- %17 = load %struct.btActionInterface** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btActionInterface* %17, %struct.btActionInterface** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP17btActionInterfaceE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btActionInterfaceE8allocateEi.exit.i.i
- %18 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %19 = load %struct.btActionInterface*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btActionInterface** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIP17btActionInterfaceE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE4copyEiiPS1_.exit.i.i
- %21 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %23 = bitcast %struct.btActionInterface** %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btActionInterface** null, %struct.btActionInterface*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIP17btActionInterfaceE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btActionInterfaceE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP17btActionInterfaceE4copyEiiPS1_.exit.i.i
- %24 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btActionInterface** %12, %struct.btActionInterface*** %18, align 4
- store i32 %iftmp.531.0.i.i, i32* %2, align 4
- %.pre5.i = load i32* %0, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP17btActionInterfaceE10deallocateEv.exit.i.i, %bb.i, %entry
- %25 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP17btActionInterfaceE10deallocateEv.exit.i.i ], [ %1, %entry ], [ %1, %bb.i ] ; [#uses=2]
- %26 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %27 = load %struct.btActionInterface*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btActionInterface** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btActionInterface** %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIP17btActionInterfaceE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btActionInterface* %action, %struct.btActionInterface** %28, align 4
- %.pre6.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btActionInterfaceE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btActionInterfaceE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %30 = phi i32 [ %25, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %31 = add nsw i32 %30, 1 ; [#uses=1]
- store i32 %31, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld19integrateTransformsEf(%struct.btDiscreteDynamicsWorld* %this, float %timeStep) align 2 {
-entry:
- %predictedTrans = alloca %struct.btTransform, align 8 ; [#uses=8]
- %sweepResults = alloca %struct.btClosestNotMeConvexResultCallback, align 8 ; [#uses=18]
- %tmpSphere = alloca %struct.btPolyhedralConvexShape, align 8 ; [#uses=6]
- call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([20 x i8]* @.str323, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %predictedTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btTransform* %predictedTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btTransform* %predictedTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btTransform* %predictedTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 5 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btPolyhedralConvexShape* %tmpSphere, i32 0, i32 0 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btPolyhedralConvexShape* %tmpSphere, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- %27 = getelementptr inbounds %struct.btPolyhedralConvexShape* %tmpSphere, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btPolyhedralConvexShape* %tmpSphere, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btPolyhedralConvexShape* %tmpSphere, i32 0, i32 0, i32 3 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btPolyhedralConvexShape* %tmpSphere, i32 0, i32 0, i32 0 ; [#uses=3]
- %32 = getelementptr inbounds %struct.btClosestNotMeConvexResultCallback* %sweepResults, i32 0, i32 0, i32 0 ; [#uses=1]
- br label %bb61
-
-bb: ; preds = %bb61
- %33 = load %struct.btRigidBody*** %1, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btRigidBody** %33, i32 %104 ; [#uses=1]
- %34 = load %struct.btRigidBody** %scevgep, align 4 ; [#uses=16]
- %35 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 21 ; [#uses=3]
- store float 1.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 15 ; [#uses=1]
- %37 = load i32* %36, align 4 ; [#uses=1]
- switch i32 %37, label %bb4 [
- i32 2, label %bb60
- i32 5, label %bb60
- ]
-
-bb4: ; preds = %bb
- %38 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 12 ; [#uses=1]
- %39 = load i32* %38, align 4 ; [#uses=1]
- %40 = and i32 %39, 3 ; [#uses=1]
- %41 = icmp eq i32 %40, 0 ; [#uses=1]
- br i1 %41, label %bb16, label %bb60
-
-bb16: ; preds = %bb4
- invoke void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %34, float %timeStep, %struct.btTransform* %predictedTrans)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb16
- %42 = load float* %2, align 8 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = fsub float %42, %44 ; [#uses=2]
- %46 = load float* %3, align 4 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fsub float %46, %48 ; [#uses=2]
- %50 = load float* %4, align 8 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fsub float %50, %52 ; [#uses=2]
- %54 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 23 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=2]
- %56 = fmul float %55, %55 ; [#uses=2]
- %57 = fcmp oeq float %56, 0.000000e+00 ; [#uses=1]
- br i1 %57, label %bb58, label %bb17
-
-bb17: ; preds = %invcont
- %58 = fmul float %49, %49 ; [#uses=1]
- %59 = fmul float %53, %53 ; [#uses=1]
- %60 = fmul float %45, %45 ; [#uses=1]
- %61 = fadd float %59, %58 ; [#uses=1]
- %62 = fadd float %61, %60 ; [#uses=1]
- %63 = fcmp uge float %56, %62 ; [#uses=1]
- br i1 %63, label %bb58, label %bb22
-
-bb22: ; preds = %bb17
- invoke void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([20 x i8]* @.str424, i32 0, i32 0))
- to label %invcont25 unwind label %lpad
-
-invcont25: ; preds = %bb22
- %64 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 9 ; [#uses=1]
- %65 = load %struct.btCollisionShape** %64, align 4 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btCollisionShape* %65, i32 0, i32 1 ; [#uses=1]
- %67 = load i32* %66, align 4 ; [#uses=1]
- %68 = icmp slt i32 %67, 20 ; [#uses=1]
- br i1 %68, label %bb27, label %bb56
-
-bb27: ; preds = %invcont25
- %69 = load i32* @gNumClampedCcdMotions, align 4 ; [#uses=1]
- %70 = add nsw i32 %69, 1 ; [#uses=1]
- store i32 %70, i32* @gNumClampedCcdMotions, align 4
- %71 = load %struct.btActionInterface** %5, align 4 ; [#uses=1]
- %72 = load %struct.btActionInterface** %6, align 4 ; [#uses=2]
- %73 = getelementptr inbounds %struct.btActionInterface* %72, i32 0, i32 0 ; [#uses=1]
- %74 = load i32 (...)*** %73, align 4 ; [#uses=1]
- %75 = getelementptr inbounds i32 (...)** %74, i32 9 ; [#uses=1]
- %76 = load i32 (...)** %75, align 4 ; [#uses=1]
- %77 = bitcast i32 (...)* %76 to %struct..0btMultiSapOverlapFilterCallback* (%struct.btActionInterface*)* ; [#uses=1]
- %78 = invoke %struct..0btMultiSapOverlapFilterCallback* %77(%struct.btActionInterface* %72)
- to label %invcont28 unwind label %lpad71 ; [#uses=1]
-
-invcont28: ; preds = %bb27
- %79 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %8, align 4
- store i16 1, i16* %9, align 8
- store i16 -1, i16* %10, align 2
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %7, align 8
- %80 = load float* %51, align 4 ; [#uses=1]
- store float %80, float* %11, align 4
- %81 = load float* %47, align 4 ; [#uses=1]
- store float %81, float* %12, align 4
- %82 = load float* %43, align 4 ; [#uses=1]
- store float %82, float* %13, align 4
- %83 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %14, align 4
- %85 = load float* %4, align 8 ; [#uses=1]
- store float %85, float* %15, align 4
- %86 = load float* %3, align 4 ; [#uses=1]
- store float %86, float* %16, align 4
- %87 = load float* %2, align 8 ; [#uses=1]
- store float %87, float* %17, align 4
- %88 = load float* %19, align 4 ; [#uses=1]
- store float %88, float* %18, align 4
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %20, align 4
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTV34btClosestNotMeConvexResultCallback, i32 0, i32 2), i32 (...)*** %7, align 8
- store %struct.btCollisionObject* %79, %struct.btCollisionObject** %21, align 8
- store float 0.000000e+00, float* %22, align 4
- store %struct..0btMultiSapOverlapFilterCallback* %78, %struct..0btMultiSapOverlapFilterCallback** %23, align 8
- store %struct.btActionInterface* %71, %struct.btActionInterface** %24, align 4
- %89 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 22 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=2]
- invoke void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %25)
- to label %invcont29 unwind label %lpad75
-
-invcont29: ; preds = %invcont28
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %26, align 8
- store i32 8, i32* %27, align 4
- store float %90, float* %28, align 4
- store float %90, float* %29, align 4
- %91 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 8 ; [#uses=2]
- %92 = load %struct.btBroadphaseProxy** %91, align 4 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btBroadphaseProxy* %92, i32 0, i32 1 ; [#uses=1]
- %94 = load i16* %93, align 4 ; [#uses=1]
- store i16 %94, i16* %9, align 8
- %95 = load %struct.btBroadphaseProxy** %91, align 4 ; [#uses=1]
- %96 = getelementptr inbounds %struct.btBroadphaseProxy* %95, i32 0, i32 2 ; [#uses=1]
- %97 = load i16* %96, align 2 ; [#uses=1]
- store i16 %97, i16* %10, align 2
- %98 = getelementptr inbounds %struct.btRigidBody* %34, i32 0, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZNK16btCollisionWorld15convexSweepTestEPK13btConvexShapeRK11btTransformS5_RNS_20ConvexResultCallbackEf(%struct.btCollisionWorld* %30, %struct.btConvexShape* %31, %struct.btTransform* %98, %struct.btTransform* %predictedTrans, %"struct.btCollisionWorld::ConvexResultCallback"* %32, float 0.000000e+00)
- to label %invcont30 unwind label %lpad79
-
-invcont30: ; preds = %invcont29
- %99 = load float* %8, align 4 ; [#uses=4]
- %100 = fcmp olt float %99, 1.000000e+00 ; [#uses=1]
- %.not = xor i1 %100, true ; [#uses=1]
- %101 = fcmp uge float %99, 1.000000e+00 ; [#uses=1]
- %or.cond = or i1 %.not, %101 ; [#uses=1]
- br i1 %or.cond, label %bb45, label %bb40
-
-bb40: ; preds = %invcont30
- store float %99, float* %35, align 4
- %102 = fmul float %99, %timeStep ; [#uses=1]
- invoke void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %34, float %102, %struct.btTransform* %predictedTrans)
- to label %invcont41 unwind label %lpad79
-
-invcont41: ; preds = %bb40
- store float 0.000000e+00, float* %35, align 4
- br label %bb45
-
-bb45: ; preds = %invcont41, %invcont30
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %26, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %31)
- to label %bb50 unwind label %lpad75
-
-bb50: ; preds = %bb45
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %7, align 8
- br label %bb56
-
-bb56: ; preds = %bb50, %invcont25
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %bb58 unwind label %lpad
-
-bb58: ; preds = %bb56, %bb17, %invcont
- invoke void @_ZN11btRigidBody18proceedToTransformERK11btTransform(%struct.btRigidBody* %34, %struct.btTransform* %predictedTrans)
- to label %bb60 unwind label %lpad
-
-bb60: ; preds = %bb58, %bb4, %bb, %bb
- %103 = add nsw i32 %104, 1 ; [#uses=1]
- br label %bb61
-
-bb61: ; preds = %bb60, %entry
- %104 = phi i32 [ 0, %entry ], [ %103, %bb60 ] ; [#uses=3]
- %105 = load i32* %0, align 4 ; [#uses=1]
- %106 = icmp sgt i32 %105, %104 ; [#uses=1]
- br i1 %106, label %bb, label %bb68
-
-invcont66: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb68: ; preds = %bb61
- call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb58, %bb56, %bb22, %bb16
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select70 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad71: ; preds = %bb27
- %eh_ptr72 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select74 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr72, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad95
-
-lpad75: ; preds = %bb45, %invcont28
- %eh_ptr76 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select78 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr76, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad96
-
-lpad79: ; preds = %bb40, %invcont29
- %eh_ptr80 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select82 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr80, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %26, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %31)
- to label %ppad96 unwind label %lpad83
-
-lpad83: ; preds = %lpad79
- %eh_ptr84 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select86 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr84, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad87: ; preds = %ppad95
- %eh_ptr88 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select90 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr88, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad91: ; preds = %ppad
- %eh_ptr92 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select94 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr92, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %ppad95, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %ppad95 ] ; [#uses=1]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont66 unwind label %lpad91
-
-ppad95: ; preds = %ppad96, %lpad71
- %eh_exception.1 = phi i8* [ %eh_exception.0, %ppad96 ], [ %eh_ptr72, %lpad71 ] ; [#uses=1]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %ppad unwind label %lpad87
-
-ppad96: ; preds = %lpad79, %lpad75
- %eh_exception.0 = phi i8* [ %eh_ptr76, %lpad75 ], [ %eh_ptr80, %lpad79 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld27ClosestConvexResultCallbackE, i32 0, i32 2), i32 (...)*** %7, align 8
- br label %ppad95
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfo(%struct.btDiscreteDynamicsWorld* %this, %struct.btContactSolverInfo* %solverInfo) align 2 {
-invcont:
- %0 = alloca %struct.CONTACT_KEY_TOKEN_COMP, align 8 ; [#uses=1]
- %sortedConstraints = alloca %"struct.btAlignedObjectArray<btTypedConstraint*>", align 8 ; [#uses=5]
- %solverCallback = alloca %struct..0InplaceSolverIslandCallback, align 8 ; [#uses=24]
- call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([17 x i8]* @.str525, i32 0, i32 0))
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %sortedConstraints, i32 0, i32 4 ; [#uses=7]
- store i8 1, i8* %1, align 8
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %sortedConstraints, i32 0, i32 3 ; [#uses=14]
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %2, align 4
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %sortedConstraints, i32 0, i32 1 ; [#uses=7]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<btTypedConstraint*>"* %sortedConstraints, i32 0, i32 2 ; [#uses=4]
- store i32 0, i32* %4, align 8
- %5 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=6]
- %7 = icmp slt i32 %6, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit, label %bb3.i
-
-bb3.i: ; preds = %invcont
- %8 = icmp sgt i32 %6, 0 ; [#uses=2]
- br i1 %8, label %bb.i2.i.i, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit
-
-bb.i2.i.i: ; preds = %bb3.i
- %9 = shl i32 %6, 2 ; [#uses=1]
- %10 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16)
- to label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i unwind label %lpad37 ; [#uses=1]
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i
- %phitmp.i.i = bitcast i8* %10 to %struct.btTypedConstraint** ; [#uses=2]
- %.pre.i = load i32* %3, align 4 ; [#uses=2]
- %11 = icmp sgt i32 %.pre.i, 0 ; [#uses=1]
- br i1 %11, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btTypedConstraint** %phitmp.i.i, i32 %indvar.i.i.i ; [#uses=2]
- %12 = icmp eq %struct.btTypedConstraint** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %12, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %13 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btTypedConstraint** %13, i32 %indvar.i.i.i ; [#uses=1]
- %14 = load %struct.btTypedConstraint** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btTypedConstraint* %14, %struct.btTypedConstraint** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond79 = icmp eq i32 %indvar.next.i.i.i, %.pre.i ; [#uses=1]
- br i1 %exitcond79, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %15 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=2]
- %16 = icmp eq %struct.btTypedConstraint** %15, null ; [#uses=1]
- br i1 %16, label %bb11.preheader.i, label %bb.i.i.i65
-
-bb.i.i.i65: ; preds = %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
- %17 = load i8* %1, align 8 ; [#uses=1]
- %toBool.i.i.i64 = icmp eq i8 %17, 0 ; [#uses=1]
- br i1 %toBool.i.i.i64, label %bb2.i.i.i67, label %bb1.i.i.i66
-
-bb1.i.i.i66: ; preds = %bb.i.i.i65
- %18 = bitcast %struct.btTypedConstraint** %15 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %18)
- to label %bb2.i.i.i67 unwind label %lpad37
-
-bb2.i.i.i67: ; preds = %bb1.i.i.i66, %bb.i.i.i65
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %2, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i67, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
- store i8 1, i8* %1, align 8
- store %struct.btTypedConstraint** %phitmp.i.i, %struct.btTypedConstraint*** %2, align 4
- store i32 %6, i32* %4, align 8
- br i1 %8, label %bb7.i, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit
-
-bb7.i: ; preds = %bb10.i, %bb11.preheader.i
- %indvar.i = phi i32 [ %indvar.next.i, %bb10.i ], [ 0, %bb11.preheader.i ] ; [#uses=2]
- %19 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btTypedConstraint** %19, i32 %indvar.i ; [#uses=2]
- %20 = icmp eq %struct.btTypedConstraint** %scevgep, null ; [#uses=1]
- br i1 %20, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store %struct.btTypedConstraint* null, %struct.btTypedConstraint** %scevgep, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %6 ; [#uses=1]
- br i1 %exitcond, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit: ; preds = %bb10.i, %bb11.preheader.i, %bb3.i, %invcont
- store i32 %6, i32* %3, align 4
- %21 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- br label %bb2
-
-bb: ; preds = %invcont3
- %23 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %24 = load %struct.btTypedConstraint*** %22, align 4 ; [#uses=1]
- %scevgep82 = getelementptr %struct.btTypedConstraint** %24, i32 %27 ; [#uses=1]
- %25 = load %struct.btTypedConstraint** %scevgep82, align 4 ; [#uses=1]
- %scevgep83 = getelementptr %struct.btTypedConstraint** %23, i32 %27 ; [#uses=1]
- store %struct.btTypedConstraint* %25, %struct.btTypedConstraint** %scevgep83, align 4
- %26 = add nsw i32 %27, 1 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit
- %27 = phi i32 [ %26, %bb ], [ 0, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6resizeEiRKS1_.exit ] ; [#uses=4]
- %28 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 24 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to i32 (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- %32 = invoke i32 %31(%struct.btDiscreteDynamicsWorld* %this)
- to label %invcont3 unwind label %lpad37 ; [#uses=1]
-
-invcont3: ; preds = %bb2
- %33 = icmp sgt i32 %32, %27 ; [#uses=1]
- br i1 %33, label %bb, label %bb4
-
-bb4: ; preds = %invcont3
- %34 = load i32* %3, align 4 ; [#uses=2]
- %35 = icmp sgt i32 %34, 1 ; [#uses=1]
- br i1 %35, label %bb.i, label %invcont5
-
-bb.i: ; preds = %bb4
- %36 = add nsw i32 %34, -1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIP17btTypedConstraintE17quickSortInternalI33btSortConstraintOnIslandPredicateEEvT_ii(%"struct.btAlignedObjectArray<btTypedConstraint*>"* %sortedConstraints, %struct.CONTACT_KEY_TOKEN_COMP* byval align 4 %0, i32 0, i32 %36) nounwind
- br label %invcont5
-
-invcont5: ; preds = %bb.i, %bb4
- %37 = load i32 (...)*** %21, align 4 ; [#uses=1]
- %38 = getelementptr inbounds i32 (...)** %37, i32 24 ; [#uses=1]
- %39 = load i32 (...)** %38, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %39 to i32 (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- %41 = invoke i32 %40(%struct.btDiscreteDynamicsWorld* %this)
- to label %invcont6 unwind label %lpad37 ; [#uses=1]
-
-invcont6: ; preds = %invcont5
- %42 = icmp eq i32 %41, 0 ; [#uses=1]
- br i1 %42, label %invcont10, label %bb7
-
-bb7: ; preds = %invcont6
- %43 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- br label %invcont10
-
-invcont10: ; preds = %bb7, %invcont6
- %iftmp.398.0 = phi %struct.btTypedConstraint** [ %43, %bb7 ], [ null, %invcont6 ] ; [#uses=1]
- %44 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %45 = load %struct.btActionInterface** %44, align 4 ; [#uses=3]
- %46 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 4 ; [#uses=2]
- %47 = load %struct.btStackAlloc** %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 6 ; [#uses=2]
- %49 = load %struct.btActionInterface** %48, align 4 ; [#uses=1]
- %50 = load i32* %3, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 1 ; [#uses=3]
- %52 = load %struct.btActionInterface** %51, align 4 ; [#uses=2]
- %53 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTVZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoE27InplaceSolverIslandCallback, i32 0, i32 2), i32 (...)*** %53, align 8
- %54 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 1 ; [#uses=1]
- store %struct.btContactSolverInfo* %solverInfo, %struct.btContactSolverInfo** %54, align 4
- %55 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 2 ; [#uses=1]
- store %struct.btActionInterface* %52, %struct.btActionInterface** %55, align 8
- %56 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 3 ; [#uses=1]
- store %struct.btTypedConstraint** %iftmp.398.0, %struct.btTypedConstraint*** %56, align 4
- %57 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 4 ; [#uses=1]
- store i32 %50, i32* %57, align 8
- %58 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 5 ; [#uses=1]
- store %struct.btActionInterface* %49, %struct.btActionInterface** %58, align 4
- %59 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 6 ; [#uses=1]
- store %struct.btStackAlloc* %47, %struct.btStackAlloc** %59, align 8
- %60 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 7 ; [#uses=1]
- store %struct.btActionInterface* %45, %struct.btActionInterface** %60, align 4
- %61 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 8, i32 4 ; [#uses=1]
- store i8 1, i8* %61, align 8
- %62 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 8, i32 3 ; [#uses=1]
- store %struct.btCollisionObject** null, %struct.btCollisionObject*** %62, align 4
- %63 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 8, i32 1 ; [#uses=1]
- store i32 0, i32* %63, align 4
- %64 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 8, i32 2 ; [#uses=1]
- store i32 0, i32* %64, align 8
- %65 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 9, i32 4 ; [#uses=1]
- store i8 1, i8* %65, align 4
- %66 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 9, i32 3 ; [#uses=1]
- store %struct.btPersistentManifold** null, %struct.btPersistentManifold*** %66, align 4
- %67 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 9, i32 1 ; [#uses=1]
- store i32 0, i32* %67, align 4
- %68 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 9, i32 2 ; [#uses=1]
- store i32 0, i32* %68, align 4
- %69 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %69, align 8
- %70 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 10, i32 3 ; [#uses=1]
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %70, align 4
- %71 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %71, align 4
- %72 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %72, align 8
- %73 = getelementptr inbounds %struct.btActionInterface* %52, i32 0, i32 0 ; [#uses=1]
- %74 = load i32 (...)*** %73, align 4 ; [#uses=1]
- %75 = getelementptr inbounds i32 (...)** %74, i32 2 ; [#uses=1]
- %76 = load i32 (...)** %75, align 4 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btActionInterface* %45, i32 0, i32 0 ; [#uses=1]
- %78 = load i32 (...)*** %77, align 4 ; [#uses=1]
- %79 = getelementptr inbounds i32 (...)** %78, i32 9 ; [#uses=1]
- %80 = load i32 (...)** %79, align 4 ; [#uses=1]
- %81 = bitcast i32 (...)* %80 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %82 = invoke i32 %81(%struct.btActionInterface* %45)
- to label %invcont12 unwind label %lpad41 ; [#uses=1]
-
-invcont12: ; preds = %invcont10
- %83 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- %84 = load i32* %83, align 4 ; [#uses=1]
- %85 = load %struct.btActionInterface** %51, align 4 ; [#uses=1]
- %86 = bitcast i32 (...)* %76 to void (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- invoke void %86(%struct.btActionInterface* %85, i32 %84, i32 %82)
- to label %invcont13 unwind label %lpad41
-
-invcont13: ; preds = %invcont12
- %87 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %88 = load %struct.btActionInterface** %44, align 4 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 2 ; [#uses=1]
- %90 = load %struct.btSimulationIslandManager** %89, align 4 ; [#uses=1]
- %91 = getelementptr inbounds %struct..0InplaceSolverIslandCallback* %solverCallback, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN25btSimulationIslandManager22buildAndProcessIslandsEP12btDispatcherP16btCollisionWorldPNS_14IslandCallbackE(%struct.btSimulationIslandManager* %90, %struct.btActionInterface* %88, %struct.btCollisionWorld* %87, %struct.btActionInterface* %91)
- to label %invcont14 unwind label %lpad41
-
-invcont14: ; preds = %invcont13
- invoke fastcc void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallback18processConstraintsEv(%struct..0InplaceSolverIslandCallback* %solverCallback)
- to label %invcont15 unwind label %lpad41
-
-invcont15: ; preds = %invcont14
- %92 = load %struct.btActionInterface** %51, align 4 ; [#uses=2]
- %93 = getelementptr inbounds %struct.btActionInterface* %92, i32 0, i32 0 ; [#uses=1]
- %94 = load i32 (...)*** %93, align 4 ; [#uses=1]
- %95 = getelementptr inbounds i32 (...)** %94, i32 4 ; [#uses=1]
- %96 = load i32 (...)** %95, align 4 ; [#uses=1]
- %97 = load %struct.btStackAlloc** %46, align 4 ; [#uses=1]
- %98 = load %struct.btActionInterface** %48, align 4 ; [#uses=1]
- %99 = bitcast i32 (...)* %96 to void (%struct.btActionInterface*, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* ; [#uses=1]
- invoke void %99(%struct.btActionInterface* %92, %struct.btContactSolverInfo* %solverInfo, %struct.btActionInterface* %98, %struct.btStackAlloc* %97)
- to label %bb20 unwind label %lpad41
-
-bb20: ; preds = %invcont15
- invoke void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallbackD1Ev(%struct..0InplaceSolverIslandCallback* %solverCallback)
- to label %bb27 unwind label %lpad37
-
-bb27: ; preds = %bb20
- %100 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=2]
- %101 = icmp eq %struct.btTypedConstraint** %100, null ; [#uses=1]
- br i1 %101, label %bb34, label %bb.i.i.i72
-
-bb.i.i.i72: ; preds = %bb27
- %102 = load i8* %1, align 8 ; [#uses=1]
- %toBool.i.i.i71 = icmp eq i8 %102, 0 ; [#uses=1]
- br i1 %toBool.i.i.i71, label %bb2.i.i.i74, label %bb1.i.i.i73
-
-bb1.i.i.i73: ; preds = %bb.i.i.i72
- %103 = bitcast %struct.btTypedConstraint** %100 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %103)
- to label %bb2.i.i.i74 unwind label %lpad
-
-bb2.i.i.i74: ; preds = %bb1.i.i.i73, %bb.i.i.i72
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %2, align 4
- br label %bb34
-
-invcont32: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-
-bb34: ; preds = %bb2.i.i.i74, %bb27
- store i8 1, i8* %1, align 8
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 8
- call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb1.i.i.i73
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select36 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad37: ; preds = %bb20, %invcont5, %bb2, %bb1.i.i.i66, %bb.i2.i.i
- %eh_ptr38 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select40 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr38, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad57
-
-lpad41: ; preds = %invcont15, %invcont14, %invcont13, %invcont12, %invcont10
- %eh_ptr42 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select44 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr42, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZZN23btDiscreteDynamicsWorld16solveConstraintsER19btContactSolverInfoEN27InplaceSolverIslandCallbackD1Ev(%struct..0InplaceSolverIslandCallback* %solverCallback)
- to label %ppad57 unwind label %lpad45
-
-lpad45: ; preds = %lpad41
- %eh_ptr46 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select48 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr46, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad49: ; preds = %bb1.i.i.i
- %eh_ptr50 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select52 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr50, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad53: ; preds = %ppad
- %eh_ptr54 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select56 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr54, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit, %lpad
- %eh_exception.1 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit ] ; [#uses=1]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont32 unwind label %lpad53
-
-ppad57: ; preds = %lpad41, %lpad37
- %eh_exception.0 = phi i8* [ %eh_ptr38, %lpad37 ], [ %eh_ptr42, %lpad41 ] ; [#uses=1]
- %104 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=2]
- %105 = icmp eq %struct.btTypedConstraint** %104, null ; [#uses=1]
- br i1 %105, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad57
- %106 = load i8* %1, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %106, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %107 = bitcast %struct.btTypedConstraint** %104 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %107)
- to label %bb2.i.i.i unwind label %lpad49
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %2, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit: ; preds = %bb2.i.i.i, %ppad57
- store i8 1, i8* %1, align 8
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %2, align 4
- store i32 0, i32* %3, align 4
- store i32 0, i32* %4, align 8
- br label %ppad
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld16removeConstraintEP17btTypedConstraint(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btTypedConstraint* %constraint) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- br label %bb3.i.i
-
-bb.i.i: ; preds = %bb3.i.i
- %3 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btTypedConstraint** %3, i32 %7 ; [#uses=1]
- %4 = load %struct.btTypedConstraint** %scevgep.i.i, align 4 ; [#uses=1]
- %5 = icmp eq %struct.btTypedConstraint* %4, %constraint ; [#uses=1]
- br i1 %5, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb.i.i
- %6 = add nsw i32 %7, 1 ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %entry
- %7 = phi i32 [ 0, %entry ], [ %6, %bb2.i.i ] ; [#uses=4]
- %8 = icmp sgt i32 %1, %7 ; [#uses=1]
- br i1 %8, label %bb.i.i, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i
-
-_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i: ; preds = %bb3.i.i, %bb.i.i
- %index.0.i.i = phi i32 [ %1, %bb3.i.i ], [ %7, %bb.i.i ] ; [#uses=2]
- %9 = icmp sgt i32 %1, %index.0.i.i ; [#uses=1]
- br i1 %9, label %bb.i, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6removeERKS1_.exit
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i
- %10 = add nsw i32 %1, -1 ; [#uses=2]
- %11 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btTypedConstraint** %11, i32 %index.0.i.i ; [#uses=2]
- %13 = load %struct.btTypedConstraint** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTypedConstraint** %11, i32 %10 ; [#uses=1]
- %15 = load %struct.btTypedConstraint** %14, align 4 ; [#uses=1]
- store %struct.btTypedConstraint* %15, %struct.btTypedConstraint** %12, align 4
- %16 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTypedConstraint** %16, i32 %10 ; [#uses=1]
- store %struct.btTypedConstraint* %13, %struct.btTypedConstraint** %17, align 4
- %18 = load i32* %0, align 4 ; [#uses=1]
- %19 = add nsw i32 %18, -1 ; [#uses=1]
- store i32 %19, i32* %0, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6removeERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE6removeERKS1_.exit: ; preds = %bb.i, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i
- %20 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 5 ; [#uses=1]
- %21 = load %struct.btRigidBody** %20, align 4 ; [#uses=1]
- tail call void @_ZN11btRigidBody19removeConstraintRefEP17btTypedConstraint(%struct.btRigidBody* %21, %struct.btTypedConstraint* %constraint)
- %22 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 6 ; [#uses=1]
- %23 = load %struct.btRigidBody** %22, align 4 ; [#uses=1]
- tail call void @_ZN11btRigidBody19removeConstraintRefEP17btTypedConstraint(%struct.btRigidBody* %23, %struct.btTypedConstraint* %constraint)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld13addConstraintEP17btTypedConstraintb(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btTypedConstraint* %constraint, i8 zeroext %disableCollisionsBetweenLinkedBodies) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.528.0.i.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.528.0.i.i ; [#uses=1]
- br i1 %7, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %8 = icmp eq i32 %iftmp.528.0.i.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %9 = shl i32 %iftmp.528.0.i.i, 2 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %10 to %struct.btTypedConstraint** ; [#uses=1]
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %11 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %1, %bb.i.i ] ; [#uses=2]
- %12 = phi %struct.btTypedConstraint** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %14 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btTypedConstraint** %12, i32 %indvar.i.i.i ; [#uses=2]
- %15 = icmp eq %struct.btTypedConstraint** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %16 = load %struct.btTypedConstraint*** %14, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btTypedConstraint** %16, i32 %indvar.i.i.i ; [#uses=1]
- %17 = load %struct.btTypedConstraint** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btTypedConstraint* %17, %struct.btTypedConstraint** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %18 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %19 = load %struct.btTypedConstraint*** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btTypedConstraint** %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
- %21 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %23 = bitcast %struct.btTypedConstraint** %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %18, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
- %24 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btTypedConstraint** %12, %struct.btTypedConstraint*** %18, align 4
- store i32 %iftmp.528.0.i.i, i32* %2, align 4
- %.pre5.i = load i32* %0, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i, %bb.i, %entry
- %25 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i ], [ %1, %entry ], [ %1, %bb.i ] ; [#uses=2]
- %26 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %27 = load %struct.btTypedConstraint*** %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btTypedConstraint** %27, i32 %25 ; [#uses=2]
- %29 = icmp eq %struct.btTypedConstraint** %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btTypedConstraint* %constraint, %struct.btTypedConstraint** %28, align 4
- %.pre6.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %30 = phi i32 [ %25, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %31 = add nsw i32 %30, 1 ; [#uses=1]
- store i32 %31, i32* %0, align 4
- %toBool = icmp eq i8 %disableCollisionsBetweenLinkedBodies, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit
- %32 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 5 ; [#uses=1]
- %33 = load %struct.btRigidBody** %32, align 4 ; [#uses=1]
- tail call void @_ZN11btRigidBody16addConstraintRefEP17btTypedConstraint(%struct.btRigidBody* %33, %struct.btTypedConstraint* %constraint)
- %34 = getelementptr inbounds %struct.btTypedConstraint* %constraint, i32 0, i32 6 ; [#uses=1]
- %35 = load %struct.btRigidBody** %34, align 4 ; [#uses=1]
- tail call void @_ZN11btRigidBody16addConstraintRefEP17btTypedConstraint(%struct.btRigidBody* %35, %struct.btTypedConstraint* %constraint)
- ret void
-
-return: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit
- ret void
-}
-
-; [#uses=2]
-define void @_ZN23btDiscreteDynamicsWorld21updateActivationStateEf(%struct.btDiscreteDynamicsWorld* nocapture %this, float %timeStep) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([22 x i8]* @.str626, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb18
-
-bb: ; preds = %bb18
- %2 = load %struct.btRigidBody*** %1, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btRigidBody** %2, i32 %63 ; [#uses=1]
- %3 = load %struct.btRigidBody** %scevgep, align 4 ; [#uses=19]
- %4 = icmp eq %struct.btRigidBody* %3, null ; [#uses=1]
- br i1 %4, label %bb17, label %bb1
-
-bb1: ; preds = %bb
- %5 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 15 ; [#uses=3]
- %6 = load i32* %5, align 4 ; [#uses=4]
- switch i32 %6, label %bb4.critedge.i [
- i32 2, label %invcont
- i32 4, label %invcont
- ]
-
-bb4.critedge.i: ; preds = %bb1
- %7 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %8, %8 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fmul float %11, %11 ; [#uses=1]
- %13 = fadd float %9, %12 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=2]
- %16 = fmul float %15, %15 ; [#uses=1]
- %17 = fadd float %13, %16 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 18 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fmul float %19, %19 ; [#uses=1]
- %21 = fcmp uge float %17, %20 ; [#uses=1]
- br i1 %21, label %bb11.i, label %bb5.i
-
-bb5.i: ; preds = %bb4.critedge.i
- %22 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fmul float %23, %23 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=2]
- %27 = fmul float %26, %26 ; [#uses=1]
- %28 = fadd float %24, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=2]
- %31 = fmul float %30, %30 ; [#uses=1]
- %32 = fadd float %28, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 19 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fmul float %34, %34 ; [#uses=1]
- %36 = fcmp uge float %32, %35 ; [#uses=1]
- br i1 %36, label %bb11.i, label %bb10.i
-
-bb10.i: ; preds = %bb5.i
- %37 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 16 ; [#uses=2]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fadd float %38, %timeStep ; [#uses=1]
- store float %39, float* %37, align 4
- br label %invcont
-
-bb11.i: ; preds = %bb5.i, %bb4.critedge.i
- %40 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 16 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 4
- %41 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %41, i32 0)
- to label %bb11.i.invcont_crit_edge unwind label %lpad
-
-bb11.i.invcont_crit_edge: ; preds = %bb11.i
- %.pre = load i32* %5, align 4 ; [#uses=1]
- br label %invcont
-
-invcont: ; preds = %bb11.i.invcont_crit_edge, %bb10.i, %bb1, %bb1
- %42 = phi i32 [ %.pre, %bb11.i.invcont_crit_edge ], [ %6, %bb10.i ], [ %6, %bb1 ], [ %6, %bb1 ] ; [#uses=4]
- %43 = icmp eq i32 %42, 4 ; [#uses=1]
- br i1 %43, label %bb17, label %bb1.i
-
-bb1.i: ; preds = %invcont
- %44 = load i8* @gDisableDeactivation, align 1 ; [#uses=1]
- %toBool2.i = icmp ne i8 %44, 0 ; [#uses=1]
- %45 = load float* @gDeactivationTime, align 4 ; [#uses=2]
- %46 = fcmp oeq float %45, 0.000000e+00 ; [#uses=1]
- %or.cond.i = or i1 %toBool2.i, %46 ; [#uses=1]
- br i1 %or.cond.i, label %bb15, label %bb5.i32
-
-bb5.i32: ; preds = %bb1.i
- switch i32 %42, label %_ZN11btRigidBody13wantsSleepingEv.exit [
- i32 2, label %bb2
- i32 3, label %bb2
- ]
-
-_ZN11btRigidBody13wantsSleepingEv.exit: ; preds = %bb5.i32
- %47 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 16 ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = fcmp ogt float %48, %45 ; [#uses=1]
- br i1 %49, label %bb2, label %bb15
-
-bb2: ; preds = %_ZN11btRigidBody13wantsSleepingEv.exit, %bb5.i32, %bb5.i32
- %50 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0, i32 12 ; [#uses=1]
- %51 = load i32* %50, align 4 ; [#uses=1]
- %52 = and i32 %51, 3 ; [#uses=1]
- %53 = icmp eq i32 %52, 0 ; [#uses=1]
- br i1 %53, label %bb6, label %bb4
-
-bb4: ; preds = %bb2
- %54 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %54, i32 2)
- to label %bb17 unwind label %lpad
-
-bb6: ; preds = %bb2
- %55 = icmp eq i32 %42, 1 ; [#uses=1]
- br i1 %55, label %bb8, label %bb10
-
-bb8: ; preds = %bb6
- %56 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %56, i32 3)
- to label %bb8.bb10_crit_edge unwind label %lpad
-
-bb8.bb10_crit_edge: ; preds = %bb8
- %.pre45 = load i32* %5, align 4 ; [#uses=1]
- br label %bb10
-
-bb10: ; preds = %bb8.bb10_crit_edge, %bb6
- %57 = phi i32 [ %.pre45, %bb8.bb10_crit_edge ], [ %42, %bb6 ] ; [#uses=1]
- %58 = icmp eq i32 %57, 2 ; [#uses=1]
- br i1 %58, label %bb12, label %bb17
-
-bb12: ; preds = %bb10
- %59 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %60 = bitcast float* %59 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %60, i8 0, i64 32, i32 4, i1 false)
- br label %bb17
-
-bb15: ; preds = %_ZN11btRigidBody13wantsSleepingEv.exit, %bb1.i
- %61 = getelementptr inbounds %struct.btRigidBody* %3, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %61, i32 1)
- to label %bb17 unwind label %lpad
-
-bb17: ; preds = %bb15, %bb12, %bb10, %bb4, %invcont, %bb
- %62 = add nsw i32 %63, 1 ; [#uses=1]
- br label %bb18
-
-bb18: ; preds = %bb17, %entry
- %63 = phi i32 [ 0, %entry ], [ %62, %bb17 ] ; [#uses=3]
- %64 = load i32* %0, align 4 ; [#uses=1]
- %65 = icmp sgt i32 %64, %63 ; [#uses=1]
- br i1 %65, label %bb, label %bb23
-
-invcont21: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb23: ; preds = %bb18
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb15, %bb8, %bb4, %bb11.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select25 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont21 unwind label %lpad26
-
-lpad26: ; preds = %lpad
- %eh_ptr27 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select29 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr27, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld28internalSingleStepSimulationEf(%struct.btDiscreteDynamicsWorld* %this, float %timeStep) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([29 x i8]* @.str723, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load void (%struct.btDynamicsWorld*, float)** %0, align 4 ; [#uses=2]
- %2 = icmp eq void (%struct.btDynamicsWorld*, float)* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- invoke void %1(%struct.btDynamicsWorld* %3, float %timeStep)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %bb, %entry
- %4 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=6]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 33 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btDiscreteDynamicsWorld*, float)* ; [#uses=1]
- invoke void %8(%struct.btDiscreteDynamicsWorld* %this, float %timeStep)
- to label %invcont2 unwind label %lpad
-
-invcont2: ; preds = %bb1
- %9 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 3, i32 0 ; [#uses=1]
- store float %timeStep, float* %9, align 4
- %10 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 4 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %15 = bitcast i32 (...)* %13 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %16 = invoke %struct.btActionInterface* %15(%struct.btCollisionWorld* %14)
- to label %invcont3 unwind label %lpad ; [#uses=1]
-
-invcont3: ; preds = %invcont2
- %17 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 3, i32 5 ; [#uses=1]
- store %struct.btActionInterface* %16, %struct.btActionInterface** %17, align 4
- %18 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %19 = getelementptr inbounds i32 (...)** %18, i32 10 ; [#uses=1]
- %20 = load i32 (...)** %19, align 4 ; [#uses=1]
- %21 = bitcast i32 (...)* %20 to void (%struct.btCollisionWorld*)* ; [#uses=1]
- invoke void %21(%struct.btCollisionWorld* %14)
- to label %invcont4 unwind label %lpad
-
-invcont4: ; preds = %invcont3
- %22 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %23 = getelementptr inbounds i32 (...)** %22, i32 35 ; [#uses=1]
- %24 = load i32 (...)** %23, align 4 ; [#uses=1]
- %25 = bitcast i32 (...)* %24 to void (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- invoke void %25(%struct.btDiscreteDynamicsWorld* %this)
- to label %invcont5 unwind label %lpad
-
-invcont5: ; preds = %invcont4
- %26 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float %timeStep, float* %26, align 4
- %27 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %28 = getelementptr inbounds i32 (...)** %27, i32 36 ; [#uses=1]
- %29 = load i32 (...)** %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %29 to void (%struct.btDiscreteDynamicsWorld*, %struct.btContactSolverInfo*)* ; [#uses=1]
- invoke void %31(%struct.btDiscreteDynamicsWorld* %this, %struct.btContactSolverInfo* %30)
- to label %invcont6 unwind label %lpad
-
-invcont6: ; preds = %invcont5
- %32 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 34 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to void (%struct.btDiscreteDynamicsWorld*, float)* ; [#uses=1]
- invoke void %35(%struct.btDiscreteDynamicsWorld* %this, float %timeStep)
- to label %invcont7 unwind label %lpad
-
-invcont7: ; preds = %invcont6
- invoke void @_ZN23btDiscreteDynamicsWorld13updateActionsEf(%struct.btDiscreteDynamicsWorld* %this, float %timeStep)
- to label %invcont8 unwind label %lpad
-
-invcont8: ; preds = %invcont7
- invoke void @_ZN23btDiscreteDynamicsWorld21updateActivationStateEf(%struct.btDiscreteDynamicsWorld* %this, float %timeStep)
- to label %invcont9 unwind label %lpad
-
-invcont9: ; preds = %invcont8
- %36 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %37 = load void (%struct.btDynamicsWorld*, float)** %36, align 4 ; [#uses=2]
- %38 = icmp eq void (%struct.btDynamicsWorld*, float)* %37, null ; [#uses=1]
- br i1 %38, label %bb15, label %bb10
-
-bb10: ; preds = %invcont9
- %39 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- invoke void %37(%struct.btDynamicsWorld* %39, float %timeStep)
- to label %bb15 unwind label %lpad
-
-invcont13: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb15: ; preds = %bb10, %invcont9
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb10, %invcont8, %invcont7, %invcont6, %invcont5, %invcont4, %invcont3, %invcont2, %bb1, %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select17 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont13 unwind label %lpad18
-
-lpad18: ; preds = %lpad
- %eh_ptr19 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select21 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr19, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBodyss(%struct.btDiscreteDynamicsWorld* %this, %struct.btRigidBody* %body, i16 signext %group, i16 signext %mask) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 12 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = and i32 %1, 3 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %bb19
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 22 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = and i32 %5, 1 ; [#uses=1]
- %toBool13 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %toBool13, label %bb18, label %bb19
-
-bb18: ; preds = %bb
- %7 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5 ; [#uses=1]
- tail call void @_ZN11btRigidBody10setGravityERK9btVector3(%struct.btRigidBody* %body, %struct.btQuadWord* %7)
- br label %bb19
-
-bb19: ; preds = %bb18, %bb, %entry
- %8 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 9 ; [#uses=1]
- %9 = load %struct.btCollisionShape** %8, align 4 ; [#uses=1]
- %10 = icmp eq %struct.btCollisionShape* %9, null ; [#uses=1]
- br i1 %10, label %return, label %bb21
-
-bb21: ; preds = %bb19
- %11 = load i32* %0, align 4 ; [#uses=1]
- %12 = and i32 %11, 1 ; [#uses=1]
- %toBool22not = icmp eq i32 %12, 0 ; [#uses=1]
- br i1 %toBool22not, label %bb25, label %bb26
-
-bb25: ; preds = %bb21
- %13 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=5]
- %14 = load i32* %13, align 4 ; [#uses=6]
- %15 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 2 ; [#uses=2]
- %16 = load i32* %15, align 4 ; [#uses=2]
- %17 = icmp eq i32 %16, %14 ; [#uses=1]
- br i1 %17, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb25
- %18 = icmp eq i32 %14, 0 ; [#uses=1]
- %19 = shl i32 %14, 1 ; [#uses=1]
- %iftmp.526.0.i.i = select i1 %18, i32 1, i32 %19 ; [#uses=4]
- %20 = icmp slt i32 %16, %iftmp.526.0.i.i ; [#uses=1]
- br i1 %20, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %21 = icmp eq i32 %iftmp.526.0.i.i, 0 ; [#uses=1]
- br i1 %21, label %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %22 = shl i32 %iftmp.526.0.i.i, 2 ; [#uses=1]
- %23 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %22, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %23 to %struct.btRigidBody** ; [#uses=1]
- %.pre.i = load i32* %13, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %24 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %14, %bb.i.i ] ; [#uses=2]
- %25 = phi %struct.btRigidBody** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %26 = icmp sgt i32 %24, 0 ; [#uses=1]
- br i1 %26, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i
- %27 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btRigidBody** %25, i32 %indvar.i.i.i ; [#uses=2]
- %28 = icmp eq %struct.btRigidBody** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %28, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %29 = load %struct.btRigidBody*** %27, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btRigidBody** %29, i32 %indvar.i.i.i ; [#uses=1]
- %30 = load %struct.btRigidBody** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btRigidBody* %30, %struct.btRigidBody** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %24 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i
- %31 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %32 = load %struct.btRigidBody*** %31, align 4 ; [#uses=2]
- %33 = icmp eq %struct.btRigidBody** %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i
- %34 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %36 = bitcast %struct.btRigidBody** %32 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %36)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btRigidBody** null, %struct.btRigidBody*** %31, align 4
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i
- %37 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btRigidBody** %25, %struct.btRigidBody*** %31, align 4
- store i32 %iftmp.526.0.i.i, i32* %15, align 4
- %.pre5.i = load i32* %13, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i, %bb.i, %bb25
- %38 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i ], [ %14, %bb25 ], [ %14, %bb.i ] ; [#uses=2]
- %39 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %40 = load %struct.btRigidBody*** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody** %40, i32 %38 ; [#uses=2]
- %42 = icmp eq %struct.btRigidBody** %41, null ; [#uses=1]
- br i1 %42, label %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btRigidBody* %body, %struct.btRigidBody** %41, align 4
- %.pre6.i = load i32* %13, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %43 = phi i32 [ %38, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %44 = add nsw i32 %43, 1 ; [#uses=1]
- store i32 %44, i32* %13, align 4
- %.pre = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0 ; [#uses=1]
- br label %bb27
-
-bb26: ; preds = %bb21
- %45 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %45, i32 2)
- br label %bb27
-
-bb27: ; preds = %bb26, %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit
- %.pre-phi = phi %struct.btCollisionObject* [ %45, %bb26 ], [ %.pre, %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit ] ; [#uses=1]
- %46 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load i32 (...)*** %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds i32 (...)** %47, i32 8 ; [#uses=1]
- %49 = load i32 (...)** %48, align 4 ; [#uses=1]
- %50 = bitcast i32 (...)* %49 to void (%struct.btDiscreteDynamicsWorld*, %struct.btCollisionObject*, i16, i16)* ; [#uses=1]
- tail call void %50(%struct.btDiscreteDynamicsWorld* %this, %struct.btCollisionObject* %.pre-phi, i16 signext %group, i16 signext %mask)
- ret void
-
-return: ; preds = %bb19
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld12addRigidBodyEP11btRigidBody(%struct.btDiscreteDynamicsWorld* %this, %struct.btRigidBody* %body) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 12 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = and i32 %1, 3 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %bb19
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 22 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = and i32 %5, 1 ; [#uses=1]
- %toBool13 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %toBool13, label %bb18, label %bb19
-
-bb18: ; preds = %bb
- %7 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5 ; [#uses=1]
- tail call void @_ZN11btRigidBody10setGravityERK9btVector3(%struct.btRigidBody* %body, %struct.btQuadWord* %7)
- br label %bb19
-
-bb19: ; preds = %bb18, %bb, %entry
- %8 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 9 ; [#uses=1]
- %9 = load %struct.btCollisionShape** %8, align 4 ; [#uses=1]
- %10 = icmp eq %struct.btCollisionShape* %9, null ; [#uses=1]
- br i1 %10, label %return, label %bb21
-
-bb21: ; preds = %bb19
- %11 = load i32* %0, align 4 ; [#uses=1]
- %12 = and i32 %11, 1 ; [#uses=1]
- %toBool22not = icmp eq i32 %12, 0 ; [#uses=1]
- br i1 %toBool22not, label %bb25, label %bb26
-
-bb25: ; preds = %bb21
- %13 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=5]
- %14 = load i32* %13, align 4 ; [#uses=6]
- %15 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 2 ; [#uses=2]
- %16 = load i32* %15, align 4 ; [#uses=2]
- %17 = icmp eq i32 %16, %14 ; [#uses=1]
- br i1 %17, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb25
- %18 = icmp eq i32 %14, 0 ; [#uses=1]
- %19 = shl i32 %14, 1 ; [#uses=1]
- %iftmp.526.0.i.i = select i1 %18, i32 1, i32 %19 ; [#uses=4]
- %20 = icmp slt i32 %16, %iftmp.526.0.i.i ; [#uses=1]
- br i1 %20, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %21 = icmp eq i32 %iftmp.526.0.i.i, 0 ; [#uses=1]
- br i1 %21, label %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %22 = shl i32 %iftmp.526.0.i.i, 2 ; [#uses=1]
- %23 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %22, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %23 to %struct.btRigidBody** ; [#uses=1]
- %.pre.i = load i32* %13, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %24 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %14, %bb.i.i ] ; [#uses=2]
- %25 = phi %struct.btRigidBody** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %26 = icmp sgt i32 %24, 0 ; [#uses=1]
- br i1 %26, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i
- %27 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btRigidBody** %25, i32 %indvar.i.i.i ; [#uses=2]
- %28 = icmp eq %struct.btRigidBody** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %28, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %29 = load %struct.btRigidBody*** %27, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btRigidBody** %29, i32 %indvar.i.i.i ; [#uses=1]
- %30 = load %struct.btRigidBody** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btRigidBody* %30, %struct.btRigidBody** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %24 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP11btRigidBodyE8allocateEi.exit.i.i
- %31 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %32 = load %struct.btRigidBody*** %31, align 4 ; [#uses=2]
- %33 = icmp eq %struct.btRigidBody** %32, null ; [#uses=1]
- br i1 %33, label %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i
- %34 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %35, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %36 = bitcast %struct.btRigidBody** %32 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %36)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btRigidBody** null, %struct.btRigidBody*** %31, align 4
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP11btRigidBodyE4copyEiiPS1_.exit.i.i
- %37 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btRigidBody** %25, %struct.btRigidBody*** %31, align 4
- store i32 %iftmp.526.0.i.i, i32* %15, align 4
- %.pre5.i = load i32* %13, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i, %bb.i, %bb25
- %38 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP11btRigidBodyE10deallocateEv.exit.i.i ], [ %14, %bb25 ], [ %14, %bb.i ] ; [#uses=2]
- %39 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %40 = load %struct.btRigidBody*** %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody** %40, i32 %38 ; [#uses=2]
- %42 = icmp eq %struct.btRigidBody** %41, null ; [#uses=1]
- br i1 %42, label %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btRigidBody* %body, %struct.btRigidBody** %41, align 4
- %.pre6.i = load i32* %13, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %43 = phi i32 [ %38, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %44 = add nsw i32 %43, 1 ; [#uses=1]
- store i32 %44, i32* %13, align 4
- br label %bb27
-
-bb26: ; preds = %bb21
- %45 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObject18setActivationStateEi(%struct.btCollisionObject* %45, i32 2)
- br label %bb27
-
-bb27: ; preds = %bb26, %_ZN20btAlignedObjectArrayIP11btRigidBodyE9push_backERKS1_.exit
- %46 = load i32* %0, align 4 ; [#uses=2]
- %47 = and i32 %46, 1 ; [#uses=1]
- %toBool31not = icmp eq i32 %47, 0 ; [#uses=1]
- %.lobit.i = and i32 %46, 2 ; [#uses=1]
- %toBool39not = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %or.cond = and i1 %toBool31not, %toBool39not ; [#uses=1]
- %iftmp.357.0 = select i1 %or.cond, i1 false, i1 true ; [#uses=2]
- %iftmp.360.0 = select i1 %iftmp.357.0, i16 2, i16 1 ; [#uses=1]
- %iftmp.361.0 = select i1 %iftmp.357.0, i16 -3, i16 -1 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %49 = load i32 (...)*** %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds i32 (...)** %49, i32 8 ; [#uses=1]
- %51 = load i32 (...)** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0 ; [#uses=1]
- %53 = bitcast i32 (...)* %51 to void (%struct.btDiscreteDynamicsWorld*, %struct.btCollisionObject*, i16, i16)* ; [#uses=1]
- tail call void %53(%struct.btDiscreteDynamicsWorld* %this, %struct.btCollisionObject* %52, i16 signext %iftmp.360.0, i16 signext %iftmp.361.0)
- ret void
-
-return: ; preds = %bb19
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld10setGravityERK9btVector3(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btQuadWord* %gravity) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = icmp sgt i32 %13, 0 ; [#uses=1]
- br i1 %14, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %15 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb17, %bb.nph
- %i.021 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb17 ] ; [#uses=2]
- %tmp = add i32 %i.021, 1 ; [#uses=2]
- %16 = load %struct.btRigidBody*** %15, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btRigidBody** %16, i32 %i.021 ; [#uses=1]
- %17 = load %struct.btRigidBody** %scevgep, align 4 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btRigidBody* %17, i32 0, i32 0, i32 15 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- switch i32 %19, label %bb4 [
- i32 2, label %bb17
- i32 5, label %bb17
- ]
-
-bb4: ; preds = %bb
- %20 = getelementptr inbounds %struct.btRigidBody* %17, i32 0, i32 22 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %22 = and i32 %21, 1 ; [#uses=1]
- %toBool11 = icmp eq i32 %22, 0 ; [#uses=1]
- br i1 %toBool11, label %bb16, label %bb17
-
-bb16: ; preds = %bb4
- tail call void @_ZN11btRigidBody10setGravityERK9btVector3(%struct.btRigidBody* %17, %struct.btQuadWord* %gravity)
- br label %bb17
-
-bb17: ; preds = %bb16, %bb4, %bb, %bb
- %23 = load i32* %12, align 4 ; [#uses=1]
- %24 = icmp sgt i32 %23, %tmp ; [#uses=1]
- br i1 %24, label %bb, label %return
-
-return: ; preds = %bb17, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld15removeRigidBodyEP11btRigidBody(%struct.btDiscreteDynamicsWorld* %this, %struct.btRigidBody* %body) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=4]
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- br label %bb3.i.i
-
-bb.i.i: ; preds = %bb3.i.i
- %3 = load %struct.btRigidBody*** %2, align 4 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btRigidBody** %3, i32 %7 ; [#uses=1]
- %4 = load %struct.btRigidBody** %scevgep.i.i, align 4 ; [#uses=1]
- %5 = icmp eq %struct.btRigidBody* %4, %body ; [#uses=1]
- br i1 %5, label %_ZNK20btAlignedObjectArrayIP11btRigidBodyE16findLinearSearchERKS1_.exit.i, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb.i.i
- %6 = add nsw i32 %7, 1 ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %entry
- %7 = phi i32 [ 0, %entry ], [ %6, %bb2.i.i ] ; [#uses=4]
- %8 = icmp sgt i32 %1, %7 ; [#uses=1]
- br i1 %8, label %bb.i.i, label %_ZNK20btAlignedObjectArrayIP11btRigidBodyE16findLinearSearchERKS1_.exit.i
-
-_ZNK20btAlignedObjectArrayIP11btRigidBodyE16findLinearSearchERKS1_.exit.i: ; preds = %bb3.i.i, %bb.i.i
- %index.0.i.i = phi i32 [ %1, %bb3.i.i ], [ %7, %bb.i.i ] ; [#uses=2]
- %9 = icmp sgt i32 %1, %index.0.i.i ; [#uses=1]
- br i1 %9, label %bb.i, label %_ZN20btAlignedObjectArrayIP11btRigidBodyE6removeERKS1_.exit
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayIP11btRigidBodyE16findLinearSearchERKS1_.exit.i
- %10 = add nsw i32 %1, -1 ; [#uses=2]
- %11 = load %struct.btRigidBody*** %2, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btRigidBody** %11, i32 %index.0.i.i ; [#uses=2]
- %13 = load %struct.btRigidBody** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody** %11, i32 %10 ; [#uses=1]
- %15 = load %struct.btRigidBody** %14, align 4 ; [#uses=1]
- store %struct.btRigidBody* %15, %struct.btRigidBody** %12, align 4
- %16 = load %struct.btRigidBody*** %2, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btRigidBody** %16, i32 %10 ; [#uses=1]
- store %struct.btRigidBody* %13, %struct.btRigidBody** %17, align 4
- %18 = load i32* %0, align 4 ; [#uses=1]
- %19 = add nsw i32 %18, -1 ; [#uses=1]
- store i32 %19, i32* %0, align 4
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyE6removeERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyE6removeERKS1_.exit: ; preds = %bb.i, %_ZNK20btAlignedObjectArrayIP11btRigidBodyE16findLinearSearchERKS1_.exit.i
- %20 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld21removeCollisionObjectEP17btCollisionObject(%struct.btCollisionWorld* %21, %struct.btCollisionObject* %20)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld21removeCollisionObjectEP17btCollisionObject(%struct.btDiscreteDynamicsWorld* %this, %struct.btCollisionObject* %collisionObject) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 19 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %.lobit.i = and i32 %1, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %2 = icmp eq %struct.btCollisionObject* %collisionObject, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %2 ; [#uses=1]
- br i1 %or.cond, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = bitcast %struct.btCollisionObject* %collisionObject to %struct.btRigidBody* ; [#uses=1]
- %4 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 21 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btDiscreteDynamicsWorld*, %struct.btRigidBody*)* ; [#uses=1]
- tail call void %8(%struct.btDiscreteDynamicsWorld* %this, %struct.btRigidBody* %3)
- ret void
-
-bb1: ; preds = %entry
- %9 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld21removeCollisionObjectEP17btCollisionObject(%struct.btCollisionWorld* %9, %struct.btCollisionObject* %collisionObject)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld18addCollisionObjectEP17btCollisionObjectss(%struct.btDiscreteDynamicsWorld* %this, %struct.btCollisionObject* %collisionObject, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld18addCollisionObjectEP17btCollisionObjectss(%struct.btCollisionWorld* %0, %struct.btCollisionObject* %collisionObject, i16 signext %collisionFilterGroup, i16 signext %collisionFilterMask)
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN23btDiscreteDynamicsWorld14stepSimulationEfif(%struct.btDiscreteDynamicsWorld* %this, float %timeStep, i32 %maxSubSteps, float %fixedTimeStep) align 2 {
-entry:
- tail call void @_ZN15CProfileManager5ResetEv()
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([15 x i8]* @.str824, i32 0, i32 0))
- %0 = icmp eq i32 %maxSubSteps, 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 6 ; [#uses=4]
- br i1 %0, label %bb2, label %bb
-
-bb: ; preds = %entry
- %2 = load float* %1, align 4 ; [#uses=1]
- %3 = fadd float %2, %timeStep ; [#uses=4]
- store float %3, float* %1, align 4
- %4 = fcmp ult float %3, %fixedTimeStep ; [#uses=1]
- br i1 %4, label %bb5, label %bb1
-
-bb1: ; preds = %bb
- %5 = fdiv float %3, %fixedTimeStep ; [#uses=1]
- %6 = fptosi float %5 to i32 ; [#uses=2]
- %7 = sitofp i32 %6 to float ; [#uses=1]
- %8 = fmul float %7, %fixedTimeStep ; [#uses=1]
- %9 = fsub float %3, %8 ; [#uses=1]
- store float %9, float* %1, align 4
- br label %bb5
-
-bb2: ; preds = %entry
- store float %timeStep, float* %1, align 4
- %10 = tail call float @fabsf(float %timeStep) nounwind readnone ; [#uses=1]
- %11 = fcmp olt float %10, 0x3E80000000000000 ; [#uses=1]
- br i1 %11, label %bb5, label %bb4
-
-bb4: ; preds = %bb2
- br label %bb5
-
-bb5: ; preds = %bb4, %bb2, %bb1, %bb
- %numSimulationSubSteps.0 = phi i32 [ %6, %bb1 ], [ 0, %bb ], [ 1, %bb4 ], [ 0, %bb2 ] ; [#uses=4]
- %fixedTimeStep_addr.0 = phi float [ %fixedTimeStep, %bb1 ], [ %fixedTimeStep, %bb ], [ %timeStep, %bb4 ], [ %timeStep, %bb2 ] ; [#uses=2]
- %maxSubSteps_addr.0 = phi i32 [ %maxSubSteps, %bb1 ], [ %maxSubSteps, %bb ], [ 1, %bb4 ], [ 0, %bb2 ] ; [#uses=2]
- %12 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=8]
- %13 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds i32 (...)** %13, i32 4 ; [#uses=1]
- %15 = load i32 (...)** %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %17 = bitcast i32 (...)* %15 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %18 = invoke %struct.btActionInterface* %17(%struct.btCollisionWorld* %16)
- to label %invcont unwind label %lpad ; [#uses=1]
-
-invcont: ; preds = %bb5
- %19 = icmp eq %struct.btActionInterface* %18, null ; [#uses=1]
- br i1 %19, label %bb10, label %bb7
-
-bb7: ; preds = %invcont
- %20 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %21 = getelementptr inbounds i32 (...)** %20, i32 4 ; [#uses=1]
- %22 = load i32 (...)** %21, align 4 ; [#uses=1]
- %23 = bitcast i32 (...)* %22 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %24 = invoke %struct.btActionInterface* %23(%struct.btCollisionWorld* %16)
- to label %invcont8 unwind label %lpad ; [#uses=2]
-
-invcont8: ; preds = %bb7
- %25 = getelementptr inbounds %struct.btActionInterface* %24, i32 0, i32 0 ; [#uses=1]
- %26 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 12 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %28 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %30 = invoke i32 %29(%struct.btActionInterface* %24)
- to label %invcont9 unwind label %lpad ; [#uses=1]
-
-invcont9: ; preds = %invcont8
- %31 = lshr i32 %30, 4 ; [#uses=1]
- %.lobit = and i32 %31, 1 ; [#uses=1]
- %32 = trunc i32 %.lobit to i8 ; [#uses=1]
- store i8 %32, i8* @gDisableDeactivation, align 1
- br label %bb10
-
-bb10: ; preds = %invcont9, %invcont
- %33 = icmp eq i32 %numSimulationSubSteps.0, 0 ; [#uses=1]
- br i1 %33, label %bb21, label %bb11
-
-bb11: ; preds = %bb10
- %34 = icmp sgt i32 %numSimulationSubSteps.0, %maxSubSteps_addr.0 ; [#uses=1]
- %iftmp.341.0 = select i1 %34, i32 %maxSubSteps_addr.0, i32 %numSimulationSubSteps.0 ; [#uses=2]
- %35 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32 (...)** %35, i32 38 ; [#uses=1]
- %37 = load i32 (...)** %36, align 4 ; [#uses=1]
- %38 = sitofp i32 %iftmp.341.0 to float ; [#uses=1]
- %39 = fmul float %38, %fixedTimeStep_addr.0 ; [#uses=1]
- %40 = bitcast i32 (...)* %37 to void (%struct.btDiscreteDynamicsWorld*, float)* ; [#uses=1]
- invoke void %40(%struct.btDiscreteDynamicsWorld* %this, float %39)
- to label %invcont15 unwind label %lpad
-
-invcont15: ; preds = %bb11
- %41 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %42 = getelementptr inbounds i32 (...)** %41, i32 40 ; [#uses=1]
- %43 = load i32 (...)** %42, align 4 ; [#uses=1]
- %44 = bitcast i32 (...)* %43 to void (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- invoke void %44(%struct.btDiscreteDynamicsWorld* %this)
- to label %bb20 unwind label %lpad
-
-bb17: ; preds = %bb20
- %45 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %46 = getelementptr inbounds i32 (...)** %45, i32 37 ; [#uses=1]
- %47 = load i32 (...)** %46, align 4 ; [#uses=1]
- %48 = bitcast i32 (...)* %47 to void (%struct.btDiscreteDynamicsWorld*, float)* ; [#uses=1]
- invoke void %48(%struct.btDiscreteDynamicsWorld* %this, float %fixedTimeStep_addr.0)
- to label %invcont18 unwind label %lpad
-
-invcont18: ; preds = %bb17
- %49 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %50 = getelementptr inbounds i32 (...)** %49, i32 19 ; [#uses=1]
- %51 = load i32 (...)** %50, align 4 ; [#uses=1]
- %52 = bitcast i32 (...)* %51 to void (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- invoke void %52(%struct.btDiscreteDynamicsWorld* %this)
- to label %invcont19 unwind label %lpad
-
-invcont19: ; preds = %invcont18
- %53 = add nsw i32 %54, 1 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %invcont19, %invcont15
- %54 = phi i32 [ %53, %invcont19 ], [ 0, %invcont15 ] ; [#uses=2]
- %55 = icmp slt i32 %54, %iftmp.341.0 ; [#uses=1]
- br i1 %55, label %bb17, label %bb23
-
-bb21: ; preds = %bb10
- %56 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %57 = getelementptr inbounds i32 (...)** %56, i32 19 ; [#uses=1]
- %58 = load i32 (...)** %57, align 4 ; [#uses=1]
- %59 = bitcast i32 (...)* %58 to void (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- invoke void %59(%struct.btDiscreteDynamicsWorld* %this)
- to label %bb23 unwind label %lpad
-
-bb23: ; preds = %bb21, %bb20
- %60 = load i32 (...)*** %12, align 4 ; [#uses=1]
- %61 = getelementptr inbounds i32 (...)** %60, i32 28 ; [#uses=1]
- %62 = load i32 (...)** %61, align 4 ; [#uses=1]
- %63 = bitcast i32 (...)* %62 to void (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- invoke void %63(%struct.btDiscreteDynamicsWorld* %this)
- to label %invcont24 unwind label %lpad
-
-invcont24: ; preds = %bb23
- invoke void @_ZN15CProfileManager23Increment_Frame_CounterEv()
- to label %invcont25 unwind label %lpad
-
-invcont25: ; preds = %invcont24
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret i32 %numSimulationSubSteps.0
-
-invcont27: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-lpad: ; preds = %invcont24, %bb23, %bb21, %invcont18, %bb17, %invcont15, %bb11, %invcont8, %bb7, %bb5
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select31 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont27 unwind label %lpad32
-
-lpad32: ; preds = %lpad
- %eh_ptr33 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr33, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN23btDiscreteDynamicsWorld28synchronizeSingleMotionStateEP11btRigidBody(%struct.btDiscreteDynamicsWorld* nocapture %this, %struct.btRigidBody* %body) align 2 {
-entry:
- %interpolatedTransform = alloca %struct.btTransform, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 20 ; [#uses=2]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.btActionInterface* %1, null ; [#uses=1]
- br i1 %2, label %bb8, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 12 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = and i32 %4, 3 ; [#uses=1]
- %6 = icmp eq i32 %5, 0 ; [#uses=1]
- br i1 %6, label %bb11, label %bb8
-
-bb8: ; preds = %bb, %entry
- ret void
-
-bb11: ; preds = %bb
- %7 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 6 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 21 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 2 ; [#uses=1]
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %14, %struct.btQuadWord* %13, %struct.btQuadWord* %12, float %11, %struct.btTransform* %interpolatedTransform)
- %15 = load %struct.btActionInterface** %0, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btActionInterface* %15, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 3 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = bitcast i32 (...)* %19 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- call void %20(%struct.btActionInterface* %15, %struct.btTransform* %interpolatedTransform)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld23synchronizeMotionStatesEv(%struct.btDiscreteDynamicsWorld* nocapture %this) align 2 {
-entry:
- %interpolatedTransform.i29 = alloca %struct.btTransform, align 8 ; [#uses=2]
- %interpolatedTransform.i = alloca %struct.btTransform, align 8 ; [#uses=2]
- call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([24 x i8]* @.str927, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 9 ; [#uses=1]
- %1 = load i8* %0, align 2 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb14.preheader, label %bb4.preheader
-
-bb14.preheader: ; preds = %entry
- %2 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 6 ; [#uses=1]
- br label %bb14
-
-bb4.preheader: ; preds = %entry
- %5 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 6 ; [#uses=1]
- br label %bb4
-
-bb1: ; preds = %bb4
- %8 = load %struct.btCollisionObject*** %6, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %8, i32 %35 ; [#uses=1]
- %9 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=8]
- %10 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 19 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %.lobit.i = and i32 %11, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %12 = icmp eq %struct.btCollisionObject* %9, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %12 ; [#uses=1]
- br i1 %or.cond, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- %13 = getelementptr inbounds %struct.btCollisionObject* %9, i32 1, i32 15 ; [#uses=1]
- %14 = bitcast i32* %13 to %struct.btActionInterface** ; [#uses=2]
- %15 = load %struct.btActionInterface** %14, align 4 ; [#uses=1]
- %16 = icmp eq %struct.btActionInterface* %15, null ; [#uses=1]
- br i1 %16, label %bb3, label %bb.i28
-
-bb.i28: ; preds = %bb2
- %17 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 12 ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = and i32 %18, 3 ; [#uses=1]
- %20 = icmp eq i32 %19, 0 ; [#uses=1]
- br i1 %20, label %bb11.i, label %bb3
-
-bb11.i: ; preds = %bb.i28
- %21 = load float* %7, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 21 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fmul float %21, %23 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btCollisionObject* %9, i32 0, i32 2 ; [#uses=1]
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %27, %struct.btQuadWord* %26, %struct.btQuadWord* %25, float %24, %struct.btTransform* %interpolatedTransform.i)
- %28 = load %struct.btActionInterface** %14, align 4 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btActionInterface* %28, i32 0, i32 0 ; [#uses=1]
- %30 = load i32 (...)*** %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds i32 (...)** %30, i32 3 ; [#uses=1]
- %32 = load i32 (...)** %31, align 4 ; [#uses=1]
- %33 = bitcast i32 (...)* %32 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- invoke void %33(%struct.btActionInterface* %28, %struct.btTransform* %interpolatedTransform.i)
- to label %bb3 unwind label %lpad
-
-bb3: ; preds = %bb11.i, %bb.i28, %bb2, %bb1
- %34 = add nsw i32 %35, 1 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb4.preheader
- %35 = phi i32 [ %34, %bb3 ], [ 0, %bb4.preheader ] ; [#uses=3]
- %36 = load i32* %5, align 4 ; [#uses=1]
- %37 = icmp sgt i32 %36, %35 ; [#uses=1]
- br i1 %37, label %bb1, label %bb19
-
-bb8: ; preds = %bb14
- %38 = load %struct.btRigidBody*** %3, align 4 ; [#uses=1]
- %scevgep39 = getelementptr %struct.btRigidBody** %38, i32 %63 ; [#uses=1]
- %39 = load %struct.btRigidBody** %scevgep39, align 4 ; [#uses=7]
- %40 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 0, i32 15 ; [#uses=1]
- %41 = load i32* %40, align 4 ; [#uses=1]
- switch i32 %41, label %bb11 [
- i32 2, label %bb13
- i32 5, label %bb13
- ]
-
-bb11: ; preds = %bb8
- %42 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 20 ; [#uses=2]
- %43 = load %struct.btActionInterface** %42, align 4 ; [#uses=1]
- %44 = icmp eq %struct.btActionInterface* %43, null ; [#uses=1]
- br i1 %44, label %bb13, label %bb.i30
-
-bb.i30: ; preds = %bb11
- %45 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 0, i32 12 ; [#uses=1]
- %46 = load i32* %45, align 4 ; [#uses=1]
- %47 = and i32 %46, 3 ; [#uses=1]
- %48 = icmp eq i32 %47, 0 ; [#uses=1]
- br i1 %48, label %bb11.i32, label %bb13
-
-bb11.i32: ; preds = %bb.i30
- %49 = load float* %4, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 0, i32 21 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fmul float %49, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 0, i32 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 0, i32 3 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btRigidBody* %39, i32 0, i32 0, i32 2 ; [#uses=1]
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %55, %struct.btQuadWord* %54, %struct.btQuadWord* %53, float %52, %struct.btTransform* %interpolatedTransform.i29)
- %56 = load %struct.btActionInterface** %42, align 4 ; [#uses=2]
- %57 = getelementptr inbounds %struct.btActionInterface* %56, i32 0, i32 0 ; [#uses=1]
- %58 = load i32 (...)*** %57, align 4 ; [#uses=1]
- %59 = getelementptr inbounds i32 (...)** %58, i32 3 ; [#uses=1]
- %60 = load i32 (...)** %59, align 4 ; [#uses=1]
- %61 = bitcast i32 (...)* %60 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- invoke void %61(%struct.btActionInterface* %56, %struct.btTransform* %interpolatedTransform.i29)
- to label %bb13 unwind label %lpad
-
-bb13: ; preds = %bb11.i32, %bb.i30, %bb11, %bb8, %bb8
- %62 = add nsw i32 %63, 1 ; [#uses=1]
- br label %bb14
-
-bb14: ; preds = %bb13, %bb14.preheader
- %63 = phi i32 [ %62, %bb13 ], [ 0, %bb14.preheader ] ; [#uses=3]
- %64 = load i32* %2, align 4 ; [#uses=1]
- %65 = icmp sgt i32 %64, %63 ; [#uses=1]
- br i1 %65, label %bb8, label %bb19
-
-invcont17: ; preds = %lpad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb19: ; preds = %bb14, %bb4
- call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb11.i32, %bb11.i
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select21 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont17 unwind label %lpad22
-
-lpad22: ; preds = %lpad
- %eh_ptr23 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select25 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr23, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld12applyGravityEv(%struct.btDiscreteDynamicsWorld* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.06 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=2]
- %tmp = add i32 %i.06, 1 ; [#uses=2]
- %4 = load %struct.btRigidBody*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btRigidBody** %4, i32 %i.06 ; [#uses=1]
- %5 = load %struct.btRigidBody** %scevgep, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btRigidBody* %5, i32 0, i32 0, i32 15 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- switch i32 %7, label %bb1 [
- i32 2, label %bb2
- i32 5, label %bb2
- ]
-
-bb1: ; preds = %bb
- tail call void @_ZN11btRigidBody12applyGravityEv(%struct.btRigidBody* %5)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb, %bb
- %8 = load i32* %0, align 4 ; [#uses=1]
- %9 = icmp sgt i32 %8, %tmp ; [#uses=1]
- br i1 %9, label %bb, label %return
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld14debugDrawWorldEv(%struct.btDiscreteDynamicsWorld* %this) align 2 {
-entry:
- tail call void @_ZN15CProfileManager13Start_ProfileEPKc(i8* getelementptr inbounds ([15 x i8]* @.str1028, i32 0, i32 0))
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=7]
- invoke void @_ZN16btCollisionWorld14debugDrawWorldEv(%struct.btCollisionWorld* %0)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=8]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 4 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %6 = invoke %struct.btActionInterface* %5(%struct.btCollisionWorld* %0)
- to label %invcont1 unwind label %lpad ; [#uses=1]
-
-invcont1: ; preds = %invcont
- %7 = icmp eq %struct.btActionInterface* %6, null ; [#uses=1]
- br i1 %7, label %bb13, label %bb
-
-bb: ; preds = %invcont1
- %8 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %9 = getelementptr inbounds i32 (...)** %8, i32 4 ; [#uses=1]
- %10 = load i32 (...)** %9, align 4 ; [#uses=1]
- %11 = bitcast i32 (...)* %10 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %12 = invoke %struct.btActionInterface* %11(%struct.btCollisionWorld* %0)
- to label %invcont2 unwind label %lpad ; [#uses=2]
-
-invcont2: ; preds = %bb
- %13 = getelementptr inbounds %struct.btActionInterface* %12, i32 0, i32 0 ; [#uses=1]
- %14 = load i32 (...)*** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds i32 (...)** %14, i32 12 ; [#uses=1]
- %16 = load i32 (...)** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %16 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %18 = invoke i32 %17(%struct.btActionInterface* %12)
- to label %invcont3 unwind label %lpad ; [#uses=1]
-
-invcont3: ; preds = %invcont2
- %19 = and i32 %18, 6144 ; [#uses=1]
- %20 = icmp eq i32 %19, 0 ; [#uses=1]
- br i1 %20, label %bb13, label %bb7.critedge
-
-bb7.critedge: ; preds = %invcont3
- %21 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 24 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = bitcast i32 (...)* %23 to i32 (%struct.btDiscreteDynamicsWorld*)* ; [#uses=1]
- %25 = invoke i32 %24(%struct.btDiscreteDynamicsWorld* %this)
- to label %bb12.preheader unwind label %lpad ; [#uses=1]
-
-bb12.preheader: ; preds = %bb7.critedge
- %tmp51 = add i32 %25, -1 ; [#uses=1]
- br label %bb12
-
-bb9: ; preds = %bb12
- %26 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 25 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = bitcast i32 (...)* %28 to %struct.btTypedConstraint* (%struct.btDiscreteDynamicsWorld*, i32)* ; [#uses=1]
- %30 = invoke %struct.btTypedConstraint* %29(%struct.btDiscreteDynamicsWorld* %this, i32 %i.0)
- to label %invcont10 unwind label %lpad ; [#uses=1]
-
-invcont10: ; preds = %bb9
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- invoke void @_ZN23btDiscreteDynamicsWorld19debugDrawConstraintEP17btTypedConstraint(%struct.btDiscreteDynamicsWorld* %this, %struct.btTypedConstraint* %30)
- to label %bb12 unwind label %lpad
-
-bb12: ; preds = %invcont10, %bb12.preheader
- %indvar = phi i32 [ 0, %bb12.preheader ], [ %indvar.next, %invcont10 ] ; [#uses=2]
- %i.0 = sub i32 %tmp51, %indvar ; [#uses=2]
- %31 = icmp sgt i32 %i.0, -1 ; [#uses=1]
- br i1 %31, label %bb9, label %bb13
-
-bb13: ; preds = %bb12, %invcont3, %invcont1
- %32 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 4 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %36 = invoke %struct.btActionInterface* %35(%struct.btCollisionWorld* %0)
- to label %invcont14 unwind label %lpad ; [#uses=1]
-
-invcont14: ; preds = %bb13
- %37 = icmp eq %struct.btActionInterface* %36, null ; [#uses=1]
- br i1 %37, label %bb40, label %bb15
-
-bb15: ; preds = %invcont14
- %38 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %39 = getelementptr inbounds i32 (...)** %38, i32 4 ; [#uses=1]
- %40 = load i32 (...)** %39, align 4 ; [#uses=1]
- %41 = bitcast i32 (...)* %40 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %42 = invoke %struct.btActionInterface* %41(%struct.btCollisionWorld* %0)
- to label %invcont16 unwind label %lpad ; [#uses=2]
-
-invcont16: ; preds = %bb15
- %43 = getelementptr inbounds %struct.btActionInterface* %42, i32 0, i32 0 ; [#uses=1]
- %44 = load i32 (...)*** %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds i32 (...)** %44, i32 12 ; [#uses=1]
- %46 = load i32 (...)** %45, align 4 ; [#uses=1]
- %47 = bitcast i32 (...)* %46 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %48 = invoke i32 %47(%struct.btActionInterface* %42)
- to label %invcont17 unwind label %lpad ; [#uses=1]
-
-invcont17: ; preds = %invcont16
- %49 = and i32 %48, 3 ; [#uses=1]
- %50 = icmp eq i32 %49, 0 ; [#uses=1]
- br i1 %50, label %bb40, label %bb22
-
-bb22: ; preds = %invcont17
- %51 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %52 = getelementptr inbounds i32 (...)** %51, i32 4 ; [#uses=1]
- %53 = load i32 (...)** %52, align 4 ; [#uses=1]
- %54 = bitcast i32 (...)* %53 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %55 = invoke %struct.btActionInterface* %54(%struct.btCollisionWorld* %0)
- to label %invcont24 unwind label %lpad ; [#uses=1]
-
-invcont24: ; preds = %bb22
- %56 = icmp eq %struct.btActionInterface* %55, null ; [#uses=1]
- br i1 %56, label %bb40, label %bb25
-
-bb25: ; preds = %invcont24
- %57 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %58 = getelementptr inbounds i32 (...)** %57, i32 4 ; [#uses=1]
- %59 = load i32 (...)** %58, align 4 ; [#uses=1]
- %60 = bitcast i32 (...)* %59 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %61 = invoke %struct.btActionInterface* %60(%struct.btCollisionWorld* %0)
- to label %invcont26 unwind label %lpad ; [#uses=2]
-
-invcont26: ; preds = %bb25
- %62 = getelementptr inbounds %struct.btActionInterface* %61, i32 0, i32 0 ; [#uses=1]
- %63 = load i32 (...)*** %62, align 4 ; [#uses=1]
- %64 = getelementptr inbounds i32 (...)** %63, i32 12 ; [#uses=1]
- %65 = load i32 (...)** %64, align 4 ; [#uses=1]
- %66 = bitcast i32 (...)* %65 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %67 = invoke i32 %66(%struct.btActionInterface* %61)
- to label %invcont27 unwind label %lpad ; [#uses=1]
-
-invcont27: ; preds = %invcont26
- %68 = icmp eq i32 %67, 0 ; [#uses=1]
- br i1 %68, label %bb40, label %bb35.preheader
-
-bb35.preheader: ; preds = %invcont27
- %69 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 6 ; [#uses=1]
- br label %bb35
-
-bb33: ; preds = %bb35
- %72 = load %struct.btActionInterface*** %70, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btActionInterface** %72, i32 %81 ; [#uses=1]
- %73 = load %struct.btActionInterface** %scevgep, align 4 ; [#uses=2]
- %74 = getelementptr inbounds %struct.btActionInterface* %73, i32 0, i32 0 ; [#uses=1]
- %75 = load i32 (...)*** %74, align 4 ; [#uses=1]
- %76 = getelementptr inbounds i32 (...)** %75, i32 3 ; [#uses=1]
- %77 = load i32 (...)** %76, align 4 ; [#uses=1]
- %78 = load %struct.btActionInterface** %71, align 4 ; [#uses=1]
- %79 = bitcast i32 (...)* %77 to void (%struct.btActionInterface*, %struct.btActionInterface*)* ; [#uses=1]
- invoke void %79(%struct.btActionInterface* %73, %struct.btActionInterface* %78)
- to label %invcont34 unwind label %lpad
-
-invcont34: ; preds = %bb33
- %80 = add nsw i32 %81, 1 ; [#uses=1]
- br label %bb35
-
-bb35: ; preds = %invcont34, %bb35.preheader
- %81 = phi i32 [ %80, %invcont34 ], [ 0, %bb35.preheader ] ; [#uses=3]
- %82 = load i32* %69, align 4 ; [#uses=1]
- %83 = icmp sgt i32 %82, %81 ; [#uses=1]
- br i1 %83, label %bb33, label %bb40
-
-invcont38: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb40: ; preds = %bb35, %invcont27, %invcont24, %invcont17, %invcont14
- tail call void @_ZN15CProfileManager12Stop_ProfileEv()
- ret void
-
-lpad: ; preds = %bb33, %invcont26, %bb25, %bb22, %invcont16, %bb15, %bb13, %invcont10, %bb9, %bb7.critedge, %invcont2, %bb, %invcont, %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select42 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN15CProfileManager12Stop_ProfileEv()
- to label %invcont38 unwind label %lpad43
-
-lpad43: ; preds = %lpad
- %eh_ptr44 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select46 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr44, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorld18saveKinematicStateEf(%struct.btDiscreteDynamicsWorld* nocapture %this, float %timeStep) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb8, %bb.nph
- %i.013 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb8 ] ; [#uses=2]
- %tmp = add i32 %i.013, 1 ; [#uses=2]
- %4 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %4, i32 %i.013 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=5]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 19 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %.lobit.i12 = and i32 %7, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i12, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb8, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit: ; preds = %bb
- %8 = bitcast %struct.btCollisionObject* %5 to %struct.btRigidBody* ; [#uses=1]
- %9 = icmp eq %struct.btCollisionObject* %5, null ; [#uses=1]
- br i1 %9, label %bb8, label %bb1
-
-bb1: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %10 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 15 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = icmp eq i32 %11, 2 ; [#uses=1]
- br i1 %12, label %bb8, label %bb5
-
-bb5: ; preds = %bb1
- %13 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 12 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %.lobit.i = and i32 %14, 2 ; [#uses=1]
- %toBool6 = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool6, label %bb8, label %bb7
-
-bb7: ; preds = %bb5
- tail call void @_ZN11btRigidBody18saveKinematicStateEf(%struct.btRigidBody* %8, float %timeStep)
- br label %bb8
-
-bb8: ; preds = %bb7, %bb5, %bb1, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit, %bb
- %15 = load i32* %0, align 4 ; [#uses=1]
- %16 = icmp sgt i32 %15, %tmp ; [#uses=1]
- br i1 %16, label %bb, label %return
-
-return: ; preds = %bb8, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorldD1Ev(%struct.btDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %1)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN15btDynamicsWorldD0Ev(%struct.btDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDynamicsWorld* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %1)
- %2 = bitcast %struct.btDynamicsWorld* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorldD0Ev(%struct.btDiscreteDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([45 x i32 (...)*]* @_ZTV23btDiscreteDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 7 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 2 ; [#uses=2]
- %4 = load %struct.btSimulationIslandManager** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btSimulationIslandManager* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btSimulationIslandManager*)* ; [#uses=1]
- invoke void %8(%struct.btSimulationIslandManager* %4)
- to label %invcont unwind label %lpad52
-
-invcont: ; preds = %bb
- %9 = load %struct.btSimulationIslandManager** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct.btSimulationIslandManager* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb2 unwind label %lpad52
-
-bb2: ; preds = %invcont, %entry
- %11 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 8 ; [#uses=1]
- %12 = load i8* %11, align 1 ; [#uses=1]
- %toBool3 = icmp eq i8 %12, 0 ; [#uses=1]
- br i1 %toBool3, label %bb10, label %bb4
-
-bb4: ; preds = %bb2
- %13 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 1 ; [#uses=2]
- %14 = load %struct.btActionInterface** %13, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btActionInterface* %14, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to void (%struct.btActionInterface*)* ; [#uses=1]
- invoke void %18(%struct.btActionInterface* %14)
- to label %invcont5 unwind label %lpad52
-
-invcont5: ; preds = %bb4
- %19 = load %struct.btActionInterface** %13, align 4 ; [#uses=1]
- %20 = bitcast %struct.btActionInterface* %19 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %20)
- to label %bb10 unwind label %lpad52
-
-bb10: ; preds = %invcont5, %bb2
- %21 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %22 = load %struct.btActionInterface*** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btActionInterface** %22, null ; [#uses=1]
- br i1 %23, label %bb17, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb10
- %24 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %26 = bitcast %struct.btActionInterface** %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %26)
- to label %bb2.i.i.i unwind label %lpad48
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btActionInterface** null, %struct.btActionInterface*** %21, align 4
- br label %bb17
-
-bb17: ; preds = %bb2.i.i.i, %bb10
- %27 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %21, align 4
- %28 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %31 = load %struct.btRigidBody*** %30, align 4 ; [#uses=2]
- %32 = icmp eq %struct.btRigidBody** %31, null ; [#uses=1]
- br i1 %32, label %bb26, label %bb.i.i.i81
-
-bb.i.i.i81: ; preds = %bb17
- %33 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %34 = load i8* %33, align 4 ; [#uses=1]
- %toBool.i.i.i80 = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i80, label %bb2.i.i.i83, label %bb1.i.i.i82
-
-bb1.i.i.i82: ; preds = %bb.i.i.i81
- %35 = bitcast %struct.btRigidBody** %31 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %35)
- to label %bb2.i.i.i83 unwind label %lpad44
-
-bb2.i.i.i83: ; preds = %bb1.i.i.i82, %bb.i.i.i81
- store %struct.btRigidBody** null, %struct.btRigidBody*** %30, align 4
- br label %bb26
-
-bb26: ; preds = %bb2.i.i.i83, %bb17
- %36 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %36, align 4
- store %struct.btRigidBody** null, %struct.btRigidBody*** %30, align 4
- %37 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %37, align 4
- %38 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %40 = load %struct.btTypedConstraint*** %39, align 4 ; [#uses=2]
- %41 = icmp eq %struct.btTypedConstraint** %40, null ; [#uses=1]
- br i1 %41, label %bb35, label %bb.i.i.i86
-
-bb.i.i.i86: ; preds = %bb26
- %42 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %43 = load i8* %42, align 4 ; [#uses=1]
- %toBool.i.i.i85 = icmp eq i8 %43, 0 ; [#uses=1]
- br i1 %toBool.i.i.i85, label %bb2.i.i.i88, label %bb1.i.i.i87
-
-bb1.i.i.i87: ; preds = %bb.i.i.i86
- %44 = bitcast %struct.btTypedConstraint** %40 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %44)
- to label %bb2.i.i.i88 unwind label %lpad
-
-bb2.i.i.i88: ; preds = %bb1.i.i.i87, %bb.i.i.i86
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %39, align 4
- br label %bb35
-
-invcont33: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb35: ; preds = %bb2.i.i.i88, %bb26
- %45 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %45, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %39, align 4
- %46 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %46, align 4
- %47 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %47, align 4
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %48 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %48)
- %49 = bitcast %struct.btDiscreteDynamicsWorld* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %49) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i87
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad44: ; preds = %bb1.i.i.i82
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad72
-
-lpad48: ; preds = %bb1.i.i.i
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad73
-
-lpad52: ; preds = %invcont5, %bb4, %invcont, %bb
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %50 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %51 = load %struct.btActionInterface*** %50, align 4 ; [#uses=2]
- %52 = icmp eq %struct.btActionInterface** %51, null ; [#uses=1]
- br i1 %52, label %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95, label %bb.i.i.i91
-
-bb.i.i.i91: ; preds = %lpad52
- %53 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %54 = load i8* %53, align 4 ; [#uses=1]
- %toBool.i.i.i90 = icmp eq i8 %54, 0 ; [#uses=1]
- br i1 %toBool.i.i.i90, label %bb2.i.i.i93, label %bb1.i.i.i92
-
-bb1.i.i.i92: ; preds = %bb.i.i.i91
- %55 = bitcast %struct.btActionInterface** %51 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %55)
- to label %bb2.i.i.i93 unwind label %lpad56
-
-bb2.i.i.i93: ; preds = %bb1.i.i.i92, %bb.i.i.i91
- store %struct.btActionInterface** null, %struct.btActionInterface*** %50, align 4
- br label %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95
-
-_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95: ; preds = %bb2.i.i.i93, %lpad52
- %56 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %56, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %50, align 4
- %57 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %57, align 4
- %58 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %58, align 4
- br label %ppad73
-
-lpad56: ; preds = %bb1.i.i.i92
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %bb1.i.i.i105
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad64: ; preds = %bb1.i.i.i99
- %eh_ptr65 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select67 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr65, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad68: ; preds = %ppad
- %eh_ptr69 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select71 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr69, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %59 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %59)
- to label %invcont33 unwind label %lpad68
-
-ppad72: ; preds = %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108, %lpad44
- %eh_exception.1 = phi i8* [ %eh_ptr45, %lpad44 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108 ] ; [#uses=1]
- %60 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %61 = load %struct.btTypedConstraint*** %60, align 4 ; [#uses=2]
- %62 = icmp eq %struct.btTypedConstraint** %61, null ; [#uses=1]
- br i1 %62, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102, label %bb.i.i.i98
-
-bb.i.i.i98: ; preds = %ppad72
- %63 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %64 = load i8* %63, align 4 ; [#uses=1]
- %toBool.i.i.i97 = icmp eq i8 %64, 0 ; [#uses=1]
- br i1 %toBool.i.i.i97, label %bb2.i.i.i100, label %bb1.i.i.i99
-
-bb1.i.i.i99: ; preds = %bb.i.i.i98
- %65 = bitcast %struct.btTypedConstraint** %61 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %65)
- to label %bb2.i.i.i100 unwind label %lpad64
-
-bb2.i.i.i100: ; preds = %bb1.i.i.i99, %bb.i.i.i98
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %60, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102: ; preds = %bb2.i.i.i100, %ppad72
- %66 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %66, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %60, align 4
- %67 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %67, align 4
- %68 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %68, align 4
- br label %ppad
-
-ppad73: ; preds = %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95, %lpad48
- %eh_exception.0 = phi i8* [ %eh_ptr49, %lpad48 ], [ %eh_ptr53, %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95 ] ; [#uses=1]
- %69 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %70 = load %struct.btRigidBody*** %69, align 4 ; [#uses=2]
- %71 = icmp eq %struct.btRigidBody** %70, null ; [#uses=1]
- br i1 %71, label %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108, label %bb.i.i.i104
-
-bb.i.i.i104: ; preds = %ppad73
- %72 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %73 = load i8* %72, align 4 ; [#uses=1]
- %toBool.i.i.i103 = icmp eq i8 %73, 0 ; [#uses=1]
- br i1 %toBool.i.i.i103, label %bb2.i.i.i106, label %bb1.i.i.i105
-
-bb1.i.i.i105: ; preds = %bb.i.i.i104
- %74 = bitcast %struct.btRigidBody** %70 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %74)
- to label %bb2.i.i.i106 unwind label %lpad60
-
-bb2.i.i.i106: ; preds = %bb1.i.i.i105, %bb.i.i.i104
- store %struct.btRigidBody** null, %struct.btRigidBody*** %69, align 4
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108: ; preds = %bb2.i.i.i106, %ppad73
- %75 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %75, align 4
- store %struct.btRigidBody** null, %struct.btRigidBody*** %69, align 4
- %76 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %76, align 4
- %77 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %77, align 4
- br label %ppad72
-}
-
-; [#uses=1]
-define void @_ZN23btDiscreteDynamicsWorldD1Ev(%struct.btDiscreteDynamicsWorld* %this) align 2 {
-entry:
- tail call void @_ZN23btDiscreteDynamicsWorldD2Ev(%struct.btDiscreteDynamicsWorld* %this)
- ret void
-}
-
-; [#uses=4]
-define void @_ZN23btDiscreteDynamicsWorldD2Ev(%struct.btDiscreteDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([45 x i32 (...)*]* @_ZTV23btDiscreteDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 7 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb2, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 2 ; [#uses=2]
- %4 = load %struct.btSimulationIslandManager** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btSimulationIslandManager* %4, i32 0, i32 0 ; [#uses=1]
- %6 = load i32 (...)*** %5, align 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btSimulationIslandManager*)* ; [#uses=1]
- invoke void %8(%struct.btSimulationIslandManager* %4)
- to label %invcont unwind label %lpad52
-
-invcont: ; preds = %bb
- %9 = load %struct.btSimulationIslandManager** %3, align 4 ; [#uses=1]
- %10 = bitcast %struct.btSimulationIslandManager* %9 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %10)
- to label %bb2 unwind label %lpad52
-
-bb2: ; preds = %invcont, %entry
- %11 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 8 ; [#uses=1]
- %12 = load i8* %11, align 1 ; [#uses=1]
- %toBool3 = icmp eq i8 %12, 0 ; [#uses=1]
- br i1 %toBool3, label %bb10, label %bb4
-
-bb4: ; preds = %bb2
- %13 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 1 ; [#uses=2]
- %14 = load %struct.btActionInterface** %13, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btActionInterface* %14, i32 0, i32 0 ; [#uses=1]
- %16 = load i32 (...)*** %15, align 4 ; [#uses=1]
- %17 = load i32 (...)** %16, align 4 ; [#uses=1]
- %18 = bitcast i32 (...)* %17 to void (%struct.btActionInterface*)* ; [#uses=1]
- invoke void %18(%struct.btActionInterface* %14)
- to label %invcont5 unwind label %lpad52
-
-invcont5: ; preds = %bb4
- %19 = load %struct.btActionInterface** %13, align 4 ; [#uses=1]
- %20 = bitcast %struct.btActionInterface* %19 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %20)
- to label %bb10 unwind label %lpad52
-
-bb10: ; preds = %invcont5, %bb2
- %21 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %22 = load %struct.btActionInterface*** %21, align 4 ; [#uses=2]
- %23 = icmp eq %struct.btActionInterface** %22, null ; [#uses=1]
- br i1 %23, label %bb17, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %bb10
- %24 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %25 = load i8* %24, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %25, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %26 = bitcast %struct.btActionInterface** %22 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %26)
- to label %bb2.i.i.i unwind label %lpad48
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btActionInterface** null, %struct.btActionInterface*** %21, align 4
- br label %bb17
-
-bb17: ; preds = %bb2.i.i.i, %bb10
- %27 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %27, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %21, align 4
- %28 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %28, align 4
- %29 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %29, align 4
- %30 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %31 = load %struct.btRigidBody*** %30, align 4 ; [#uses=2]
- %32 = icmp eq %struct.btRigidBody** %31, null ; [#uses=1]
- br i1 %32, label %bb26, label %bb.i.i.i81
-
-bb.i.i.i81: ; preds = %bb17
- %33 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %34 = load i8* %33, align 4 ; [#uses=1]
- %toBool.i.i.i80 = icmp eq i8 %34, 0 ; [#uses=1]
- br i1 %toBool.i.i.i80, label %bb2.i.i.i83, label %bb1.i.i.i82
-
-bb1.i.i.i82: ; preds = %bb.i.i.i81
- %35 = bitcast %struct.btRigidBody** %31 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %35)
- to label %bb2.i.i.i83 unwind label %lpad44
-
-bb2.i.i.i83: ; preds = %bb1.i.i.i82, %bb.i.i.i81
- store %struct.btRigidBody** null, %struct.btRigidBody*** %30, align 4
- br label %bb26
-
-bb26: ; preds = %bb2.i.i.i83, %bb17
- %36 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %36, align 4
- store %struct.btRigidBody** null, %struct.btRigidBody*** %30, align 4
- %37 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %37, align 4
- %38 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %40 = load %struct.btTypedConstraint*** %39, align 4 ; [#uses=2]
- %41 = icmp eq %struct.btTypedConstraint** %40, null ; [#uses=1]
- br i1 %41, label %bb35, label %bb.i.i.i86
-
-bb.i.i.i86: ; preds = %bb26
- %42 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %43 = load i8* %42, align 4 ; [#uses=1]
- %toBool.i.i.i85 = icmp eq i8 %43, 0 ; [#uses=1]
- br i1 %toBool.i.i.i85, label %bb2.i.i.i88, label %bb1.i.i.i87
-
-bb1.i.i.i87: ; preds = %bb.i.i.i86
- %44 = bitcast %struct.btTypedConstraint** %40 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %44)
- to label %bb2.i.i.i88 unwind label %lpad
-
-bb2.i.i.i88: ; preds = %bb1.i.i.i87, %bb.i.i.i86
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %39, align 4
- br label %bb35
-
-invcont33: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb35: ; preds = %bb2.i.i.i88, %bb26
- %45 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %45, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %39, align 4
- %46 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %46, align 4
- %47 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %47, align 4
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %48 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %48)
- ret void
-
-lpad: ; preds = %bb1.i.i.i87
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad44: ; preds = %bb1.i.i.i82
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad72
-
-lpad48: ; preds = %bb1.i.i.i
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad73
-
-lpad52: ; preds = %invcont5, %bb4, %invcont, %bb
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %49 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 3 ; [#uses=3]
- %50 = load %struct.btActionInterface*** %49, align 4 ; [#uses=2]
- %51 = icmp eq %struct.btActionInterface** %50, null ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95, label %bb.i.i.i91
-
-bb.i.i.i91: ; preds = %lpad52
- %52 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- %53 = load i8* %52, align 4 ; [#uses=1]
- %toBool.i.i.i90 = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i90, label %bb2.i.i.i93, label %bb1.i.i.i92
-
-bb1.i.i.i92: ; preds = %bb.i.i.i91
- %54 = bitcast %struct.btActionInterface** %50 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %54)
- to label %bb2.i.i.i93 unwind label %lpad56
-
-bb2.i.i.i93: ; preds = %bb1.i.i.i92, %bb.i.i.i91
- store %struct.btActionInterface** null, %struct.btActionInterface*** %49, align 4
- br label %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95
-
-_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95: ; preds = %bb2.i.i.i93, %lpad52
- %55 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 4
- store %struct.btActionInterface** null, %struct.btActionInterface*** %49, align 4
- %56 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 10, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- br label %ppad73
-
-lpad56: ; preds = %bb1.i.i.i92
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %bb1.i.i.i105
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad64: ; preds = %bb1.i.i.i99
- %eh_ptr65 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select67 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr65, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad68: ; preds = %ppad
- %eh_ptr69 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select71 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr69, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %58 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %58)
- to label %invcont33 unwind label %lpad68
-
-ppad72: ; preds = %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108, %lpad44
- %eh_exception.1 = phi i8* [ %eh_ptr45, %lpad44 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108 ] ; [#uses=1]
- %59 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %60 = load %struct.btTypedConstraint*** %59, align 4 ; [#uses=2]
- %61 = icmp eq %struct.btTypedConstraint** %60, null ; [#uses=1]
- br i1 %61, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102, label %bb.i.i.i98
-
-bb.i.i.i98: ; preds = %ppad72
- %62 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %63 = load i8* %62, align 4 ; [#uses=1]
- %toBool.i.i.i97 = icmp eq i8 %63, 0 ; [#uses=1]
- br i1 %toBool.i.i.i97, label %bb2.i.i.i100, label %bb1.i.i.i99
-
-bb1.i.i.i99: ; preds = %bb.i.i.i98
- %64 = bitcast %struct.btTypedConstraint** %60 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %64)
- to label %bb2.i.i.i100 unwind label %lpad64
-
-bb2.i.i.i100: ; preds = %bb1.i.i.i99, %bb.i.i.i98
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %59, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintED1Ev.exit102: ; preds = %bb2.i.i.i100, %ppad72
- %65 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %65, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %59, align 4
- %66 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %66, align 4
- %67 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %67, align 4
- br label %ppad
-
-ppad73: ; preds = %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95, %lpad48
- %eh_exception.0 = phi i8* [ %eh_ptr49, %lpad48 ], [ %eh_ptr53, %_ZN20btAlignedObjectArrayIP17btActionInterfaceED1Ev.exit95 ] ; [#uses=1]
- %68 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %69 = load %struct.btRigidBody*** %68, align 4 ; [#uses=2]
- %70 = icmp eq %struct.btRigidBody** %69, null ; [#uses=1]
- br i1 %70, label %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108, label %bb.i.i.i104
-
-bb.i.i.i104: ; preds = %ppad73
- %71 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %72 = load i8* %71, align 4 ; [#uses=1]
- %toBool.i.i.i103 = icmp eq i8 %72, 0 ; [#uses=1]
- br i1 %toBool.i.i.i103, label %bb2.i.i.i106, label %bb1.i.i.i105
-
-bb1.i.i.i105: ; preds = %bb.i.i.i104
- %73 = bitcast %struct.btRigidBody** %69 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %73)
- to label %bb2.i.i.i106 unwind label %lpad60
-
-bb2.i.i.i106: ; preds = %bb1.i.i.i105, %bb.i.i.i104
- store %struct.btRigidBody** null, %struct.btRigidBody*** %68, align 4
- br label %_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108
-
-_ZN20btAlignedObjectArrayIP11btRigidBodyED1Ev.exit108: ; preds = %bb2.i.i.i106, %ppad73
- %74 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %74, align 4
- store %struct.btRigidBody** null, %struct.btRigidBody*** %68, align 4
- %75 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %75, align 4
- %76 = getelementptr inbounds %struct.btDiscreteDynamicsWorld* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %76, align 4
- br label %ppad72
-}
-
-; [#uses=2]
-define void @_ZN23btDiscreteDynamicsWorldC1EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- tail call void @_ZN23btDiscreteDynamicsWorldC2EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btDiscreteDynamicsWorld* %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration)
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK11btRigidBody7getAabbER9btVector3S1_(%struct.btRigidBody* %this, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 9 ; [#uses=1]
- %1 = load %struct.btCollisionShape** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btCollisionShape* %1, i32 0, i32 0 ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 2 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = bitcast i32 (...)* %5 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- tail call void %7(%struct.btCollisionShape* %1, %struct.btTransform* %6, %struct.btQuadWord* %aabbMin, %struct.btQuadWord* %aabbMax)
- ret void
-}
-
-; [#uses=5]
-define void @_ZN11btRigidBody10setGravityERK9btVector3(%struct.btRigidBody* nocapture %this, %struct.btQuadWord* nocapture %acceleration) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fcmp une float %1, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %bb, label %bb1
-
-bb: ; preds = %entry
- %3 = fdiv float 1.000000e+00, %1 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btQuadWord* %acceleration, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %5, %3 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %acceleration, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %8, %3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %acceleration, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fmul float %11, %3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- store float %12, float* %13, align 4
- %14 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- store float %9, float* %14, align 4
- %15 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- store float %6, float* %15, align 4
- %16 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %17 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %acceleration, i32 0, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %acceleration, i32 0, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %acceleration, i32 0, i32 0, i32 2 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %acceleration, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN11btRigidBody12applyGravityEv(%struct.btRigidBody* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = and i32 %1, 3 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %return
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fmul float %5, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fmul float %10, %12 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fmul float %15, %17 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 0 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fadd float %20, %18 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 1 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fadd float %23, %13 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 2 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fadd float %26, %8 ; [#uses=1]
- store float %27, float* %25, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=3]
-define void @_ZN11btRigidBody12setMassPropsEfRK9btVector3(%struct.btRigidBody* nocapture %this, float %mass, %struct.btQuadWord* nocapture %inertia) nounwind align 2 {
-entry:
- %0 = fcmp oeq float %mass, 0.000000e+00 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 12 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=2]
- br i1 %0, label %bb, label %bb1
-
-bb: ; preds = %entry
- %3 = or i32 %2, 1 ; [#uses=1]
- store i32 %3, i32* %1, align 4
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %4, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- %5 = and i32 %2, -2 ; [#uses=1]
- store i32 %5, i32* %1, align 4
- %6 = fdiv float 1.000000e+00, %mass ; [#uses=2]
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- store float %6, float* %7, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %8 = phi float [ %6, %bb1 ], [ 0.000000e+00, %bb ] ; [#uses=3]
- %9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %10, %mass ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = fmul float %13, %mass ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %16, %mass ; [#uses=1]
- %18 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- store float %17, float* %18, align 4
- %19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- store float %14, float* %19, align 4
- %20 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- store float %11, float* %20, align 4
- %21 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fcmp une float %23, 0.000000e+00 ; [#uses=1]
- br i1 %24, label %bb3, label %bb5
-
-bb3: ; preds = %bb2
- %25 = fdiv float 1.000000e+00, %23 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb3, %bb2
- %iftmp.265.0 = phi float [ %25, %bb3 ], [ 0.000000e+00, %bb2 ] ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=2]
- %28 = fcmp une float %27, 0.000000e+00 ; [#uses=1]
- br i1 %28, label %bb6, label %bb8
-
-bb6: ; preds = %bb5
- %29 = fdiv float 1.000000e+00, %27 ; [#uses=1]
- br label %bb8
-
-bb8: ; preds = %bb6, %bb5
- %iftmp.266.0 = phi float [ %29, %bb6 ], [ 0.000000e+00, %bb5 ] ; [#uses=1]
- %30 = getelementptr inbounds %struct.btQuadWord* %inertia, i32 0, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fcmp une float %31, 0.000000e+00 ; [#uses=1]
- br i1 %32, label %bb9, label %bb11
-
-bb9: ; preds = %bb8
- %33 = fdiv float 1.000000e+00, %31 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb9, %bb8
- %iftmp.267.0 = phi float [ %33, %bb9 ], [ 0.000000e+00, %bb8 ] ; [#uses=1]
- %34 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- store float %iftmp.267.0, float* %34, align 4
- %35 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- store float %iftmp.266.0, float* %35, align 4
- %36 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- store float %iftmp.265.0, float* %36, align 4
- %37 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %8 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fmul float %42, %8 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=1]
- %46 = fmul float %45, %8 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 0 ; [#uses=1]
- store float %46, float* %47, align 4
- %48 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 1 ; [#uses=1]
- store float %43, float* %48, align 4
- %49 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 2 ; [#uses=1]
- store float %40, float* %49, align 4
- %50 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %50, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN11btRigidBody19updateInertiaTensorEv(%struct.btRigidBody* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- %10 = load float* %7, align 4 ; [#uses=4]
- %11 = load float* %6, align 4 ; [#uses=4]
- %12 = load float* %5, align 4 ; [#uses=4]
- %13 = load float* %4, align 4 ; [#uses=4]
- %14 = load float* %3, align 4 ; [#uses=4]
- %15 = load float* %2, align 4 ; [#uses=4]
- %16 = load float* %1, align 4 ; [#uses=4]
- %17 = load float* %0, align 4 ; [#uses=4]
- %18 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=3]
- %20 = fmul float %17, %19 ; [#uses=3]
- %21 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=3]
- %23 = fmul float %14, %22 ; [#uses=3]
- %24 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=3]
- %26 = fmul float %11, %25 ; [#uses=3]
- %27 = fmul float %16, %19 ; [#uses=3]
- %28 = fmul float %13, %22 ; [#uses=3]
- %29 = fmul float %10, %25 ; [#uses=3]
- %30 = fmul float %15, %19 ; [#uses=3]
- %31 = fmul float %12, %22 ; [#uses=3]
- %32 = fmul float %9, %25 ; [#uses=3]
- %33 = fmul float %11, %26 ; [#uses=1]
- %34 = fmul float %14, %23 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fmul float %17, %20 ; [#uses=1]
- %37 = fadd float %35, %36 ; [#uses=1]
- %38 = fmul float %10, %26 ; [#uses=1]
- %39 = fmul float %13, %23 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = fmul float %16, %20 ; [#uses=1]
- %42 = fadd float %40, %41 ; [#uses=1]
- %43 = fmul float %9, %26 ; [#uses=1]
- %44 = fmul float %12, %23 ; [#uses=1]
- %45 = fadd float %43, %44 ; [#uses=1]
- %46 = fmul float %15, %20 ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=1]
- %48 = fmul float %11, %29 ; [#uses=1]
- %49 = fmul float %14, %28 ; [#uses=1]
- %50 = fadd float %48, %49 ; [#uses=1]
- %51 = fmul float %17, %27 ; [#uses=1]
- %52 = fadd float %50, %51 ; [#uses=1]
- %53 = fmul float %10, %29 ; [#uses=1]
- %54 = fmul float %13, %28 ; [#uses=1]
- %55 = fadd float %53, %54 ; [#uses=1]
- %56 = fmul float %16, %27 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=1]
- %58 = fmul float %9, %29 ; [#uses=1]
- %59 = fmul float %12, %28 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %15, %27 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = fmul float %11, %32 ; [#uses=1]
- %64 = fmul float %14, %31 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fmul float %17, %30 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=1]
- %68 = fmul float %10, %32 ; [#uses=1]
- %69 = fmul float %13, %31 ; [#uses=1]
- %70 = fadd float %68, %69 ; [#uses=1]
- %71 = fmul float %16, %30 ; [#uses=1]
- %72 = fadd float %70, %71 ; [#uses=1]
- %73 = fmul float %9, %32 ; [#uses=1]
- %74 = fmul float %12, %31 ; [#uses=1]
- %75 = fadd float %73, %74 ; [#uses=1]
- %76 = fmul float %15, %30 ; [#uses=1]
- %77 = fadd float %75, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %77, float* %78, align 4
- %79 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %79, align 4
- %80 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %67, float* %80, align 4
- %81 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %81, align 4
- %82 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %62, float* %82, align 4
- %83 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %57, float* %83, align 4
- %84 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %52, float* %84, align 4
- %85 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %85, align 4
- %86 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %47, float* %86, align 4
- %87 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %42, float* %87, align 4
- %88 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %37, float* %88, align 4
- %89 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %89, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN11btRigidBody24setCenterOfMassTransformERK11btTransform(%struct.btRigidBody* %this, %struct.btTransform* %xform) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = and i32 %1, 3 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- br i1 %3, label %bb1, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %6 = load float* %5, align 4 ; [#uses=1]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=1]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=1]
- store float %15, float* %13, align 4
- %16 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %21 = load float* %20, align 4 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %24 = load float* %23, align 4 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %27 = load float* %26, align 4 ; [#uses=1]
- store float %27, float* %25, align 4
- %28 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- store float %33, float* %31, align 4
- %34 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %36 = load float* %35, align 4 ; [#uses=1]
- store float %36, float* %34, align 4
- %37 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %39 = load float* %38, align 4 ; [#uses=1]
- store float %39, float* %37, align 4
- %40 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %42 = load float* %41, align 4 ; [#uses=1]
- store float %42, float* %40, align 4
- %43 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %45 = load float* %44, align 4 ; [#uses=1]
- store float %45, float* %43, align 4
- %46 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %48 = load float* %47, align 4 ; [#uses=1]
- store float %48, float* %46, align 4
- %49 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=2]
- %51 = load float* %50, align 4 ; [#uses=1]
- store float %51, float* %49, align 4
- %.pre3 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre7 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre11 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre15 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %.pre19 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre23 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre27 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre31 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %.pre35 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %.pre39 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %.pre43 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %.pre47 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %.pre51 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre55 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre59 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre63 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- br label %bb2
-
-bb1: ; preds = %entry
- %52 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %4, align 4
- %54 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 4
- %57 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %59 = load float* %58, align 4 ; [#uses=1]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- %62 = load float* %61, align 4 ; [#uses=1]
- store float %62, float* %60, align 4
- %63 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %65 = load float* %64, align 4 ; [#uses=1]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 4
- %69 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %71 = load float* %70, align 4 ; [#uses=1]
- store float %71, float* %69, align 4
- %72 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %73 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %74 = load float* %73, align 4 ; [#uses=1]
- store float %74, float* %72, align 4
- %75 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %77 = load float* %76, align 4 ; [#uses=1]
- store float %77, float* %75, align 4
- %78 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %80 = load float* %79, align 4 ; [#uses=1]
- store float %80, float* %78, align 4
- %81 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %83 = load float* %82, align 4 ; [#uses=1]
- store float %83, float* %81, align 4
- %84 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- %86 = load float* %85, align 4 ; [#uses=1]
- store float %86, float* %84, align 4
- %87 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %89 = load float* %88, align 4 ; [#uses=1]
- store float %89, float* %87, align 4
- %90 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %92 = load float* %91, align 4 ; [#uses=1]
- store float %92, float* %90, align 4
- %93 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %95 = load float* %94, align 4 ; [#uses=1]
- store float %95, float* %93, align 4
- %96 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btTransform* %xform, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- %98 = load float* %97, align 4 ; [#uses=1]
- store float %98, float* %96, align 4
- %.pre = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %.pre17 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre21 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre25 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre29 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %.pre33 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %.pre37 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %.pre41 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %.pre45 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %.pre49 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre53 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre57 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre61 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %.pre-phi64 = phi float* [ %97, %bb1 ], [ %.pre63, %bb ] ; [#uses=1]
- %.pre-phi62 = phi float* [ %.pre61, %bb1 ], [ %50, %bb ] ; [#uses=1]
- %.pre-phi60 = phi float* [ %94, %bb1 ], [ %.pre59, %bb ] ; [#uses=1]
- %.pre-phi58 = phi float* [ %.pre57, %bb1 ], [ %47, %bb ] ; [#uses=1]
- %.pre-phi56 = phi float* [ %91, %bb1 ], [ %.pre55, %bb ] ; [#uses=1]
- %.pre-phi54 = phi float* [ %.pre53, %bb1 ], [ %44, %bb ] ; [#uses=1]
- %.pre-phi52 = phi float* [ %88, %bb1 ], [ %.pre51, %bb ] ; [#uses=1]
- %.pre-phi50 = phi float* [ %.pre49, %bb1 ], [ %41, %bb ] ; [#uses=1]
- %.pre-phi48 = phi float* [ %85, %bb1 ], [ %.pre47, %bb ] ; [#uses=1]
- %.pre-phi46 = phi float* [ %.pre45, %bb1 ], [ %38, %bb ] ; [#uses=1]
- %.pre-phi44 = phi float* [ %82, %bb1 ], [ %.pre43, %bb ] ; [#uses=1]
- %.pre-phi42 = phi float* [ %.pre41, %bb1 ], [ %35, %bb ] ; [#uses=1]
- %.pre-phi40 = phi float* [ %79, %bb1 ], [ %.pre39, %bb ] ; [#uses=1]
- %.pre-phi38 = phi float* [ %.pre37, %bb1 ], [ %32, %bb ] ; [#uses=1]
- %.pre-phi36 = phi float* [ %76, %bb1 ], [ %.pre35, %bb ] ; [#uses=1]
- %.pre-phi34 = phi float* [ %.pre33, %bb1 ], [ %29, %bb ] ; [#uses=1]
- %.pre-phi32 = phi float* [ %73, %bb1 ], [ %.pre31, %bb ] ; [#uses=1]
- %.pre-phi30 = phi float* [ %.pre29, %bb1 ], [ %26, %bb ] ; [#uses=1]
- %.pre-phi28 = phi float* [ %70, %bb1 ], [ %.pre27, %bb ] ; [#uses=1]
- %.pre-phi26 = phi float* [ %.pre25, %bb1 ], [ %23, %bb ] ; [#uses=1]
- %.pre-phi24 = phi float* [ %67, %bb1 ], [ %.pre23, %bb ] ; [#uses=1]
- %.pre-phi22 = phi float* [ %.pre21, %bb1 ], [ %20, %bb ] ; [#uses=1]
- %.pre-phi20 = phi float* [ %64, %bb1 ], [ %.pre19, %bb ] ; [#uses=1]
- %.pre-phi18 = phi float* [ %.pre17, %bb1 ], [ %17, %bb ] ; [#uses=1]
- %.pre-phi16 = phi float* [ %61, %bb1 ], [ %.pre15, %bb ] ; [#uses=1]
- %.pre-phi14 = phi float* [ %.pre13, %bb1 ], [ %14, %bb ] ; [#uses=1]
- %.pre-phi12 = phi float* [ %58, %bb1 ], [ %.pre11, %bb ] ; [#uses=1]
- %.pre-phi10 = phi float* [ %.pre9, %bb1 ], [ %11, %bb ] ; [#uses=1]
- %.pre-phi8 = phi float* [ %55, %bb1 ], [ %.pre7, %bb ] ; [#uses=1]
- %.pre-phi6 = phi float* [ %.pre5, %bb1 ], [ %8, %bb ] ; [#uses=1]
- %.pre-phi4 = phi float* [ %52, %bb1 ], [ %.pre3, %bb ] ; [#uses=1]
- %.pre-phi = phi float* [ %.pre, %bb1 ], [ %5, %bb ] ; [#uses=1]
- %99 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- store float %101, float* %99, align 4
- %102 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- store float %104, float* %102, align 4
- %105 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=1]
- store float %107, float* %105, align 4
- %108 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- store float %110, float* %108, align 4
- %111 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %113 = load float* %112, align 4 ; [#uses=1]
- store float %113, float* %111, align 4
- %114 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=1]
- store float %116, float* %114, align 4
- %117 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %119 = load float* %118, align 4 ; [#uses=1]
- store float %119, float* %117, align 4
- %120 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- store float %122, float* %120, align 4
- %123 = load float* %.pre-phi4, align 4 ; [#uses=5]
- store float %123, float* %.pre-phi, align 4
- %124 = load float* %.pre-phi8, align 4 ; [#uses=5]
- store float %124, float* %.pre-phi6, align 4
- %125 = load float* %.pre-phi12, align 4 ; [#uses=5]
- store float %125, float* %.pre-phi10, align 4
- %126 = load float* %.pre-phi16, align 4 ; [#uses=1]
- store float %126, float* %.pre-phi14, align 4
- %127 = load float* %.pre-phi20, align 4 ; [#uses=5]
- store float %127, float* %.pre-phi18, align 4
- %128 = load float* %.pre-phi24, align 4 ; [#uses=5]
- store float %128, float* %.pre-phi22, align 4
- %129 = load float* %.pre-phi28, align 4 ; [#uses=5]
- store float %129, float* %.pre-phi26, align 4
- %130 = load float* %.pre-phi32, align 4 ; [#uses=1]
- store float %130, float* %.pre-phi30, align 4
- %131 = load float* %.pre-phi36, align 4 ; [#uses=5]
- store float %131, float* %.pre-phi34, align 4
- %132 = load float* %.pre-phi40, align 4 ; [#uses=5]
- store float %132, float* %.pre-phi38, align 4
- %133 = load float* %.pre-phi44, align 4 ; [#uses=5]
- store float %133, float* %.pre-phi42, align 4
- %134 = load float* %.pre-phi48, align 4 ; [#uses=1]
- store float %134, float* %.pre-phi46, align 4
- %135 = load float* %.pre-phi52, align 4 ; [#uses=1]
- store float %135, float* %.pre-phi50, align 4
- %136 = load float* %.pre-phi56, align 4 ; [#uses=1]
- store float %136, float* %.pre-phi54, align 4
- %137 = load float* %.pre-phi60, align 4 ; [#uses=1]
- store float %137, float* %.pre-phi58, align 4
- %138 = load float* %.pre-phi64, align 4 ; [#uses=1]
- store float %138, float* %.pre-phi62, align 4
- %139 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %140 = load float* %139, align 4 ; [#uses=3]
- %141 = fmul float %133, %140 ; [#uses=3]
- %142 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %143 = load float* %142, align 4 ; [#uses=3]
- %144 = fmul float %132, %143 ; [#uses=3]
- %145 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %146 = load float* %145, align 4 ; [#uses=3]
- %147 = fmul float %131, %146 ; [#uses=3]
- %148 = fmul float %129, %140 ; [#uses=3]
- %149 = fmul float %128, %143 ; [#uses=3]
- %150 = fmul float %127, %146 ; [#uses=3]
- %151 = fmul float %125, %140 ; [#uses=3]
- %152 = fmul float %124, %143 ; [#uses=3]
- %153 = fmul float %123, %146 ; [#uses=3]
- %154 = fmul float %131, %147 ; [#uses=1]
- %155 = fmul float %132, %144 ; [#uses=1]
- %156 = fadd float %154, %155 ; [#uses=1]
- %157 = fmul float %133, %141 ; [#uses=1]
- %158 = fadd float %156, %157 ; [#uses=1]
- %159 = fmul float %127, %147 ; [#uses=1]
- %160 = fmul float %128, %144 ; [#uses=1]
- %161 = fadd float %159, %160 ; [#uses=1]
- %162 = fmul float %129, %141 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fmul float %123, %147 ; [#uses=1]
- %165 = fmul float %124, %144 ; [#uses=1]
- %166 = fadd float %164, %165 ; [#uses=1]
- %167 = fmul float %125, %141 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=1]
- %169 = fmul float %131, %150 ; [#uses=1]
- %170 = fmul float %132, %149 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=1]
- %172 = fmul float %133, %148 ; [#uses=1]
- %173 = fadd float %171, %172 ; [#uses=1]
- %174 = fmul float %127, %150 ; [#uses=1]
- %175 = fmul float %128, %149 ; [#uses=1]
- %176 = fadd float %174, %175 ; [#uses=1]
- %177 = fmul float %129, %148 ; [#uses=1]
- %178 = fadd float %176, %177 ; [#uses=1]
- %179 = fmul float %123, %150 ; [#uses=1]
- %180 = fmul float %124, %149 ; [#uses=1]
- %181 = fadd float %179, %180 ; [#uses=1]
- %182 = fmul float %125, %148 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=1]
- %184 = fmul float %131, %153 ; [#uses=1]
- %185 = fmul float %132, %152 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = fmul float %133, %151 ; [#uses=1]
- %188 = fadd float %186, %187 ; [#uses=1]
- %189 = fmul float %127, %153 ; [#uses=1]
- %190 = fmul float %128, %152 ; [#uses=1]
- %191 = fadd float %189, %190 ; [#uses=1]
- %192 = fmul float %129, %151 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- %194 = fmul float %123, %153 ; [#uses=1]
- %195 = fmul float %124, %152 ; [#uses=1]
- %196 = fadd float %194, %195 ; [#uses=1]
- %197 = fmul float %125, %151 ; [#uses=1]
- %198 = fadd float %196, %197 ; [#uses=1]
- %199 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %198, float* %199, align 4
- %200 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %193, float* %200, align 4
- %201 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %188, float* %201, align 4
- %202 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %202, align 4
- %203 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %183, float* %203, align 4
- %204 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %178, float* %204, align 4
- %205 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %173, float* %205, align 4
- %206 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %206, align 4
- %207 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %168, float* %207, align 4
- %208 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %163, float* %208, align 4
- %209 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %158, float* %209, align 4
- %210 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %210, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN11btRigidBody18proceedToTransformERK11btTransform(%struct.btRigidBody* %this, %struct.btTransform* %newTrans) nounwind align 2 {
-entry:
- tail call void @_ZN11btRigidBody24setCenterOfMassTransformERK11btTransform(%struct.btRigidBody* %this, %struct.btTransform* %newTrans)
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZNK11btRigidBody28calculateSerializeBufferSizeEv(%struct.btRigidBody* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 480
-}
-
-; [#uses=1]
-define void @_ZNK11btRigidBody21serializeSingleObjectEP12btSerializer(%struct.btRigidBody* %this, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btActionInterface* %serializer, i32 0, i32 0 ; [#uses=2]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 4 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 4 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to i32 (%struct.btRigidBody*)* ; [#uses=1]
- %9 = tail call i32 %8(%struct.btRigidBody* %this) ; [#uses=1]
- %10 = bitcast i32 (...)* %3 to %struct.btChunk* (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- %11 = tail call %struct.btChunk* %10(%struct.btActionInterface* %serializer, i32 %9, i32 1) ; [#uses=2]
- %12 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %13 = getelementptr inbounds i32 (...)** %12, i32 5 ; [#uses=1]
- %14 = load i32 (...)** %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btChunk* %11, i32 0, i32 2 ; [#uses=1]
- %16 = load i8** %15, align 4 ; [#uses=1]
- %17 = bitcast i32 (...)* %14 to i8* (%struct.btRigidBody*, i8*, %struct.btActionInterface*)* ; [#uses=1]
- %18 = tail call i8* %17(%struct.btRigidBody* %this, i8* %16, %struct.btActionInterface* %serializer) ; [#uses=1]
- %19 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 5 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = bitcast %struct.btRigidBody* %this to i8* ; [#uses=1]
- %23 = bitcast i32 (...)* %21 to void (%struct.btActionInterface*, %struct.btChunk*, i8*, i32, i8*)* ; [#uses=1]
- tail call void %23(%struct.btActionInterface* %serializer, %struct.btChunk* %11, i8* %18, i32 1497645650, i8* %22)
- ret void
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN11btRigidBody24checkCollideWithOverrideEP17btCollisionObject(%struct.btRigidBody* nocapture %this, %struct.btCollisionObject* %co) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %co, i32 0, i32 19 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %.lobit.i = and i32 %1, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb12, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit: ; preds = %entry
- %2 = bitcast %struct.btCollisionObject* %co to %struct.btRigidBody* ; [#uses=2]
- %3 = icmp eq %struct.btCollisionObject* %co, null ; [#uses=1]
- br i1 %3, label %bb12, label %bb9.preheader
-
-bb9.preheader: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- br label %bb9
-
-bb2: ; preds = %bb9
- %7 = load %struct.btTypedConstraint*** %4, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btTypedConstraint** %7, i32 %16 ; [#uses=1]
- %8 = load %struct.btTypedConstraint** %scevgep, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btTypedConstraint* %8, i32 0, i32 5 ; [#uses=1]
- %10 = load %struct.btRigidBody** %9, align 4 ; [#uses=1]
- %11 = icmp eq %struct.btRigidBody* %10, %2 ; [#uses=1]
- br i1 %11, label %bb12, label %bb3
-
-bb3: ; preds = %bb2
- %12 = getelementptr inbounds %struct.btTypedConstraint* %8, i32 0, i32 6 ; [#uses=1]
- %13 = load %struct.btRigidBody** %12, align 4 ; [#uses=1]
- %14 = icmp eq %struct.btRigidBody* %13, %2 ; [#uses=1]
- br i1 %14, label %bb12, label %bb5
-
-bb5: ; preds = %bb3
- %15 = add nsw i32 %16, 1 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb5, %bb9.preheader
- %16 = phi i32 [ %15, %bb5 ], [ 0, %bb9.preheader ] ; [#uses=3]
- %17 = icmp sgt i32 %6, %16 ; [#uses=1]
- br i1 %17, label %bb2, label %bb12
-
-bb12: ; preds = %bb9, %bb3, %bb2, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit, %entry
- %.0 = phi i8 [ 1, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit ], [ 1, %entry ], [ 1, %bb9 ], [ 0, %bb2 ], [ 0, %bb3 ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=0]
-define void @_ZN11btRigidBody10setDampingEff(%struct.btRigidBody* nocapture %this, float %lin_damping, float %ang_damping) nounwind align 2 {
-entry:
- %lin_damping_addr = alloca float, align 4 ; [#uses=2]
- %ang_damping_addr = alloca float, align 4 ; [#uses=2]
- %0 = alloca float, align 4 ; [#uses=2]
- %1 = alloca float, align 4 ; [#uses=2]
- store float %lin_damping, float* %lin_damping_addr, align 4
- store float %ang_damping, float* %ang_damping_addr, align 4
- store float 1.000000e+00, float* %1, align 4
- %2 = fcmp uge float %lin_damping, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %bb.i, label %_Z9btClampedIfERKT_S2_S2_S2_.exit
-
-bb.i: ; preds = %entry
- %3 = fcmp ogt float %lin_damping, 1.000000e+00 ; [#uses=1]
- %.val6 = load float* %1, align 4 ; [#uses=1]
- %lin_damping_addr.val = load float* %lin_damping_addr, align 4 ; [#uses=1]
- %.pre = select i1 %3, float %.val6, float %lin_damping_addr.val ; [#uses=1]
- br label %_Z9btClampedIfERKT_S2_S2_S2_.exit
-
-_Z9btClampedIfERKT_S2_S2_S2_.exit: ; preds = %bb.i, %entry
- %4 = phi float [ %.pre, %bb.i ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 11 ; [#uses=1]
- store float %4, float* %5, align 4
- store float 1.000000e+00, float* %0, align 4
- %6 = fcmp uge float %ang_damping, 0.000000e+00 ; [#uses=1]
- br i1 %6, label %bb.i2, label %_Z9btClampedIfERKT_S2_S2_S2_.exit4
-
-bb.i2: ; preds = %_Z9btClampedIfERKT_S2_S2_S2_.exit
- %7 = fcmp ogt float %ang_damping, 1.000000e+00 ; [#uses=1]
- %.val = load float* %0, align 4 ; [#uses=1]
- %ang_damping_addr.val = load float* %ang_damping_addr, align 4 ; [#uses=1]
- %.pre5 = select i1 %7, float %.val, float %ang_damping_addr.val ; [#uses=1]
- br label %_Z9btClampedIfERKT_S2_S2_S2_.exit4
-
-_Z9btClampedIfERKT_S2_S2_S2_.exit4: ; preds = %bb.i2, %_Z9btClampedIfERKT_S2_S2_S2_.exit
- %8 = phi float [ %.pre5, %bb.i2 ], [ 0.000000e+00, %_Z9btClampedIfERKT_S2_S2_S2_.exit ] ; [#uses=1]
- %9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 12 ; [#uses=1]
- store float %8, float* %9, align 4
- ret void
-}
-
-; [#uses=2]
-define void @_ZN11btRigidBody14setupRigidBodyERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %this, %"struct.btRigidBody::btRigidBodyConstructionInfo"* nocapture %constructionInfo) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 19 ; [#uses=1]
- store i32 2, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %3 = bitcast float* %1 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %3, i8 0, i64 32, i32 4, i1 false)
- store float 1.000000e+00, float* %2, align 4
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %4, align 4
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %5, align 4
- %6 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=2]
- store float 1.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=2]
- store float 1.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=2]
- store float 1.000000e+00, float* %9, align 4
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 11 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 12 ; [#uses=2]
- %21 = bitcast float* %10 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %21, i8 0, i64 36, i32 4, i1 false)
- %22 = bitcast float* %18 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %22, i8 0, i64 36, i32 4, i1 false)
- store float 5.000000e-01, float* %20, align 4
- %23 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 9 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 18 ; [#uses=1]
- store float %24, float* %25, align 4
- %26 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 10 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 19 ; [#uses=1]
- store float %27, float* %28, align 4
- %29 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 1 ; [#uses=1]
- %30 = load %struct.btActionInterface** %29, align 4 ; [#uses=4]
- %31 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 20 ; [#uses=1]
- store %struct.btActionInterface* %30, %struct.btActionInterface** %31, align 4
- %32 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 30 ; [#uses=1]
- store i32 0, i32* %32, align 4
- %33 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 31 ; [#uses=1]
- store i32 0, i32* %33, align 4
- %34 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 11 ; [#uses=1]
- %35 = load i8* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 13 ; [#uses=1]
- store i8 %35, i8* %36, align 4
- %37 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 12 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 14 ; [#uses=1]
- store float %38, float* %39, align 4
- %40 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 13 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 15 ; [#uses=1]
- store float %41, float* %42, align 4
- %43 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 14 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 16 ; [#uses=1]
- store float %44, float* %45, align 4
- %46 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 15 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 17 ; [#uses=1]
- store float %47, float* %48, align 4
- %49 = icmp eq %struct.btActionInterface* %30, null ; [#uses=1]
- br i1 %49, label %bb1, label %bb
-
-bb: ; preds = %entry
- %50 = getelementptr inbounds %struct.btActionInterface* %30, i32 0, i32 0 ; [#uses=1]
- %51 = load i32 (...)*** %50, align 4 ; [#uses=1]
- %52 = getelementptr inbounds i32 (...)** %51, i32 2 ; [#uses=1]
- %53 = load i32 (...)** %52, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %55 = bitcast i32 (...)* %53 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- tail call void %55(%struct.btActionInterface* %30, %struct.btTransform* %54)
- %.phi.trans.insert = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %.pre = load float* %.phi.trans.insert, align 4 ; [#uses=1]
- %.phi.trans.insert5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre6 = load float* %.phi.trans.insert5, align 4 ; [#uses=1]
- %.phi.trans.insert7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %.pre8 = load float* %.phi.trans.insert7, align 4 ; [#uses=1]
- %.phi.trans.insert9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %.pre10 = load float* %.phi.trans.insert9, align 4 ; [#uses=1]
- %.phi.trans.insert11 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre12 = load float* %.phi.trans.insert11, align 4 ; [#uses=1]
- %.phi.trans.insert13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre14 = load float* %.phi.trans.insert13, align 4 ; [#uses=1]
- %.phi.trans.insert15 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre16 = load float* %.phi.trans.insert15, align 4 ; [#uses=1]
- %.phi.trans.insert17 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %.pre18 = load float* %.phi.trans.insert17, align 4 ; [#uses=1]
- %.phi.trans.insert19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %.pre20 = load float* %.phi.trans.insert19, align 4 ; [#uses=1]
- %.phi.trans.insert21 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %.pre22 = load float* %.phi.trans.insert21, align 4 ; [#uses=1]
- %.phi.trans.insert23 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %.pre24 = load float* %.phi.trans.insert23, align 4 ; [#uses=1]
- %.phi.trans.insert25 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %.pre26 = load float* %.phi.trans.insert25, align 4 ; [#uses=1]
- %.phi.trans.insert27 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %.pre28 = load float* %.phi.trans.insert27, align 4 ; [#uses=1]
- %.phi.trans.insert29 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %.pre30 = load float* %.phi.trans.insert29, align 4 ; [#uses=1]
- %.phi.trans.insert31 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %.pre32 = load float* %.phi.trans.insert31, align 4 ; [#uses=1]
- %.phi.trans.insert33 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %.pre34 = load float* %.phi.trans.insert33, align 4 ; [#uses=1]
- br label %bb2
-
-bb1: ; preds = %entry
- %56 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=2]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %60 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=2]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %63 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=2]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %66 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=2]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %69 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=2]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %72 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=2]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %75 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=2]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %78 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=2]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %81 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=2]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %84 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=2]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %87 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %88 = load float* %87, align 4 ; [#uses=2]
- store float %88, float* %86, align 4
- %89 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %90 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %91 = load float* %90, align 4 ; [#uses=2]
- store float %91, float* %89, align 4
- %92 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %93 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=2]
- store float %94, float* %92, align 4
- %95 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %96 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- %97 = load float* %96, align 4 ; [#uses=2]
- store float %97, float* %95, align 4
- %98 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %99 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=2]
- store float %100, float* %98, align 4
- %101 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %102 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=2]
- store float %103, float* %101, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %104 = phi float [ %103, %bb1 ], [ %.pre34, %bb ] ; [#uses=1]
- %105 = phi float [ %100, %bb1 ], [ %.pre32, %bb ] ; [#uses=1]
- %106 = phi float [ %97, %bb1 ], [ %.pre30, %bb ] ; [#uses=1]
- %107 = phi float [ %94, %bb1 ], [ %.pre28, %bb ] ; [#uses=1]
- %108 = phi float [ %91, %bb1 ], [ %.pre26, %bb ] ; [#uses=1]
- %109 = phi float [ %88, %bb1 ], [ %.pre24, %bb ] ; [#uses=1]
- %110 = phi float [ %85, %bb1 ], [ %.pre22, %bb ] ; [#uses=1]
- %111 = phi float [ %82, %bb1 ], [ %.pre20, %bb ] ; [#uses=1]
- %112 = phi float [ %79, %bb1 ], [ %.pre18, %bb ] ; [#uses=1]
- %113 = phi float [ %76, %bb1 ], [ %.pre16, %bb ] ; [#uses=1]
- %114 = phi float [ %73, %bb1 ], [ %.pre14, %bb ] ; [#uses=1]
- %115 = phi float [ %70, %bb1 ], [ %.pre12, %bb ] ; [#uses=1]
- %116 = phi float [ %67, %bb1 ], [ %.pre10, %bb ] ; [#uses=1]
- %117 = phi float [ %64, %bb1 ], [ %.pre8, %bb ] ; [#uses=1]
- %118 = phi float [ %61, %bb1 ], [ %.pre6, %bb ] ; [#uses=1]
- %119 = phi float [ %58, %bb1 ], [ %.pre, %bb ] ; [#uses=1]
- %120 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %119, float* %120, align 4
- %122 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %123 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %118, float* %122, align 4
- %124 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %117, float* %124, align 4
- %126 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %116, float* %126, align 4
- %127 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %115, float* %127, align 4
- %129 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %114, float* %129, align 4
- %131 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %132 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %113, float* %131, align 4
- %133 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %112, float* %133, align 4
- %134 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %111, float* %134, align 4
- %136 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %110, float* %136, align 4
- %138 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %109, float* %138, align 4
- %140 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %108, float* %140, align 4
- %141 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %107, float* %141, align 4
- %142 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %106, float* %142, align 4
- %143 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %105, float* %143, align 4
- %144 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float %104, float* %144, align 4
- %145 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %146 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 7 ; [#uses=1]
- %147 = bitcast float* %145 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %147, i8 0, i64 32, i32 4, i1 false)
- %148 = load float* %146, align 4 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 17 ; [#uses=1]
- store float %148, float* %149, align 4
- %150 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 8 ; [#uses=1]
- %151 = load float* %150, align 4 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 18 ; [#uses=1]
- store float %151, float* %152, align 4
- %153 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %154 = load i32 (...)*** %153, align 4 ; [#uses=1]
- %155 = getelementptr inbounds i32 (...)** %154, i32 3 ; [#uses=1]
- %156 = load i32 (...)** %155, align 4 ; [#uses=1]
- %157 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 3 ; [#uses=1]
- %158 = load %struct.btCollisionShape** %157, align 4 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=1]
- %160 = bitcast i32 (...)* %156 to void (%struct.btCollisionObject*, %struct.btCollisionShape*)* ; [#uses=1]
- tail call void %160(%struct.btCollisionObject* %159, %struct.btCollisionShape* %158)
- %161 = load i32* @_ZL8uniqueId, align 4 ; [#uses=2]
- %162 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 23 ; [#uses=1]
- store i32 %161, i32* %162, align 4
- %163 = add nsw i32 %161, 1 ; [#uses=1]
- store i32 %163, i32* @_ZL8uniqueId, align 4
- %164 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 0 ; [#uses=1]
- %165 = load float* %164, align 4 ; [#uses=5]
- %166 = fcmp oeq float %165, 0.000000e+00 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 12 ; [#uses=3]
- %168 = load i32* %167, align 4 ; [#uses=2]
- br i1 %166, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb2
- %169 = or i32 %168, 1 ; [#uses=1]
- store i32 %169, i32* %167, align 4
- %170 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %170, align 4
- br label %bb2.i
-
-bb1.i: ; preds = %bb2
- %171 = and i32 %168, -2 ; [#uses=1]
- store i32 %171, i32* %167, align 4
- %172 = fdiv float 1.000000e+00, %165 ; [#uses=2]
- %173 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- store float %172, float* %173, align 4
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- %174 = phi float [ %172, %bb1.i ], [ 0.000000e+00, %bb.i ] ; [#uses=3]
- %175 = load float* %17, align 4 ; [#uses=1]
- %176 = fmul float %175, %165 ; [#uses=1]
- %177 = load float* %16, align 4 ; [#uses=1]
- %178 = fmul float %177, %165 ; [#uses=1]
- %179 = load float* %15, align 4 ; [#uses=1]
- %180 = fmul float %179, %165 ; [#uses=1]
- store float %180, float* %11, align 4
- store float %178, float* %12, align 4
- store float %176, float* %13, align 4
- store float 0.000000e+00, float* %14, align 4
- %181 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=2]
- %183 = fcmp une float %182, 0.000000e+00 ; [#uses=1]
- br i1 %183, label %bb3.i, label %bb5.i
-
-bb3.i: ; preds = %bb2.i
- %184 = fdiv float 1.000000e+00, %182 ; [#uses=1]
- br label %bb5.i
-
-bb5.i: ; preds = %bb3.i, %bb2.i
- %185 = phi float [ %184, %bb3.i ], [ 0.000000e+00, %bb2.i ] ; [#uses=4]
- %186 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %187 = load float* %186, align 4 ; [#uses=2]
- %188 = fcmp une float %187, 0.000000e+00 ; [#uses=1]
- br i1 %188, label %bb6.i, label %bb8.i
-
-bb6.i: ; preds = %bb5.i
- %189 = fdiv float 1.000000e+00, %187 ; [#uses=1]
- br label %bb8.i
-
-bb8.i: ; preds = %bb6.i, %bb5.i
- %190 = phi float [ %189, %bb6.i ], [ 0.000000e+00, %bb5.i ] ; [#uses=4]
- %191 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=2]
- %193 = fcmp une float %192, 0.000000e+00 ; [#uses=1]
- br i1 %193, label %bb9.i, label %_ZN11btRigidBody12setMassPropsEfRK9btVector3.exit
-
-bb9.i: ; preds = %bb8.i
- %194 = fdiv float 1.000000e+00, %192 ; [#uses=1]
- br label %_ZN11btRigidBody12setMassPropsEfRK9btVector3.exit
-
-_ZN11btRigidBody12setMassPropsEfRK9btVector3.exit: ; preds = %bb9.i, %bb8.i
- %195 = phi float [ %194, %bb9.i ], [ 0.000000e+00, %bb8.i ] ; [#uses=4]
- %196 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- store float %195, float* %196, align 4
- %197 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- store float %190, float* %197, align 4
- %198 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- store float %185, float* %198, align 4
- %199 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %199, align 4
- %200 = load float* %9, align 4 ; [#uses=1]
- %201 = fmul float %200, %174 ; [#uses=2]
- %202 = load float* %8, align 4 ; [#uses=1]
- %203 = fmul float %202, %174 ; [#uses=2]
- %204 = load float* %7, align 4 ; [#uses=1]
- %205 = fmul float %204, %174 ; [#uses=2]
- %206 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 0 ; [#uses=2]
- store float %205, float* %206, align 4
- %207 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 1 ; [#uses=2]
- store float %203, float* %207, align 4
- %208 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 2 ; [#uses=2]
- store float %201, float* %208, align 4
- %209 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 27, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %209, align 4
- %210 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 6 ; [#uses=1]
- %211 = load float* %210, align 4 ; [#uses=3]
- %212 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo, i32 0, i32 5 ; [#uses=1]
- %213 = load float* %212, align 4 ; [#uses=3]
- %214 = fcmp uge float %213, 0.000000e+00 ; [#uses=1]
- br i1 %214, label %bb.i.i, label %_Z9btClampedIfERKT_S2_S2_S2_.exit.i
-
-bb.i.i: ; preds = %_ZN11btRigidBody12setMassPropsEfRK9btVector3.exit
- %215 = fcmp ogt float %213, 1.000000e+00 ; [#uses=1]
- %.pre.i = select i1 %215, float 1.000000e+00, float %213 ; [#uses=1]
- br label %_Z9btClampedIfERKT_S2_S2_S2_.exit.i
-
-_Z9btClampedIfERKT_S2_S2_S2_.exit.i: ; preds = %bb.i.i, %_ZN11btRigidBody12setMassPropsEfRK9btVector3.exit
- %216 = phi float [ %.pre.i, %bb.i.i ], [ 0.000000e+00, %_ZN11btRigidBody12setMassPropsEfRK9btVector3.exit ] ; [#uses=1]
- store float %216, float* %19, align 4
- %217 = fcmp uge float %211, 0.000000e+00 ; [#uses=1]
- br i1 %217, label %bb.i2.i, label %_ZN11btRigidBody10setDampingEff.exit
-
-bb.i2.i: ; preds = %_Z9btClampedIfERKT_S2_S2_S2_.exit.i
- %218 = fcmp ogt float %211, 1.000000e+00 ; [#uses=1]
- %.pre5.i = select i1 %218, float 1.000000e+00, float %211 ; [#uses=1]
- br label %_ZN11btRigidBody10setDampingEff.exit
-
-_ZN11btRigidBody10setDampingEff.exit: ; preds = %bb.i2.i, %_Z9btClampedIfERKT_S2_S2_S2_.exit.i
- %219 = phi float [ %.pre5.i, %bb.i2.i ], [ 0.000000e+00, %_Z9btClampedIfERKT_S2_S2_S2_.exit.i ] ; [#uses=1]
- store float %219, float* %20, align 4
- %220 = load float* %121, align 4 ; [#uses=4]
- %221 = load float* %128, align 4 ; [#uses=4]
- %222 = load float* %135, align 4 ; [#uses=4]
- %223 = load float* %123, align 4 ; [#uses=4]
- %224 = load float* %130, align 4 ; [#uses=4]
- %225 = load float* %137, align 4 ; [#uses=4]
- %226 = load float* %125, align 4 ; [#uses=4]
- %227 = load float* %132, align 4 ; [#uses=4]
- %228 = load float* %139, align 4 ; [#uses=4]
- %229 = fmul float %228, %185 ; [#uses=3]
- %230 = fmul float %225, %190 ; [#uses=3]
- %231 = fmul float %222, %195 ; [#uses=3]
- %232 = fmul float %227, %185 ; [#uses=3]
- %233 = fmul float %224, %190 ; [#uses=3]
- %234 = fmul float %221, %195 ; [#uses=3]
- %235 = fmul float %226, %185 ; [#uses=3]
- %236 = fmul float %223, %190 ; [#uses=3]
- %237 = fmul float %220, %195 ; [#uses=3]
- %238 = fmul float %222, %231 ; [#uses=1]
- %239 = fmul float %225, %230 ; [#uses=1]
- %240 = fadd float %238, %239 ; [#uses=1]
- %241 = fmul float %228, %229 ; [#uses=1]
- %242 = fadd float %240, %241 ; [#uses=1]
- %243 = fmul float %221, %231 ; [#uses=1]
- %244 = fmul float %224, %230 ; [#uses=1]
- %245 = fadd float %243, %244 ; [#uses=1]
- %246 = fmul float %227, %229 ; [#uses=1]
- %247 = fadd float %245, %246 ; [#uses=1]
- %248 = fmul float %220, %231 ; [#uses=1]
- %249 = fmul float %223, %230 ; [#uses=1]
- %250 = fadd float %248, %249 ; [#uses=1]
- %251 = fmul float %226, %229 ; [#uses=1]
- %252 = fadd float %250, %251 ; [#uses=1]
- %253 = fmul float %222, %234 ; [#uses=1]
- %254 = fmul float %225, %233 ; [#uses=1]
- %255 = fadd float %253, %254 ; [#uses=1]
- %256 = fmul float %228, %232 ; [#uses=1]
- %257 = fadd float %255, %256 ; [#uses=1]
- %258 = fmul float %221, %234 ; [#uses=1]
- %259 = fmul float %224, %233 ; [#uses=1]
- %260 = fadd float %258, %259 ; [#uses=1]
- %261 = fmul float %227, %232 ; [#uses=1]
- %262 = fadd float %260, %261 ; [#uses=1]
- %263 = fmul float %220, %234 ; [#uses=1]
- %264 = fmul float %223, %233 ; [#uses=1]
- %265 = fadd float %263, %264 ; [#uses=1]
- %266 = fmul float %226, %232 ; [#uses=1]
- %267 = fadd float %265, %266 ; [#uses=1]
- %268 = fmul float %222, %237 ; [#uses=1]
- %269 = fmul float %225, %236 ; [#uses=1]
- %270 = fadd float %268, %269 ; [#uses=1]
- %271 = fmul float %228, %235 ; [#uses=1]
- %272 = fadd float %270, %271 ; [#uses=1]
- %273 = fmul float %221, %237 ; [#uses=1]
- %274 = fmul float %224, %236 ; [#uses=1]
- %275 = fadd float %273, %274 ; [#uses=1]
- %276 = fmul float %227, %235 ; [#uses=1]
- %277 = fadd float %275, %276 ; [#uses=1]
- %278 = fmul float %220, %237 ; [#uses=1]
- %279 = fmul float %223, %236 ; [#uses=1]
- %280 = fadd float %278, %279 ; [#uses=1]
- %281 = fmul float %226, %235 ; [#uses=1]
- %282 = fadd float %280, %281 ; [#uses=1]
- %283 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %282, float* %283, align 4
- %284 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %277, float* %284, align 4
- %285 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %272, float* %285, align 4
- %286 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %286, align 4
- %287 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %267, float* %287, align 4
- %288 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %262, float* %288, align 4
- %289 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %257, float* %289, align 4
- %290 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %290, align 4
- %291 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %252, float* %291, align 4
- %292 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %247, float* %292, align 4
- %293 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %242, float* %293, align 4
- %294 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %294, align 4
- %295 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 22 ; [#uses=1]
- store i32 0, i32* %295, align 4
- %296 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 24, i32 0, i32 0 ; [#uses=1]
- %297 = bitcast float* %296 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %297, i8 0, i64 32, i32 4, i1 false)
- store float %205, float* %206, align 4
- store float %203, float* %207, align 4
- store float %201, float* %208, align 4
- %298 = bitcast float* %209 to i8* ; [#uses=1]
- call void @llvm.memset.p0i8.i64(i8* %298, i8 0, i64 36, i32 4, i1 false)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN11btRigidBody19removeConstraintRefEP17btTypedConstraint(%struct.btRigidBody* nocapture %this, %struct.btTypedConstraint* %c) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 3 ; [#uses=3]
- br label %bb3.i.i
-
-bb.i.i: ; preds = %bb3.i.i
- %3 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btTypedConstraint** %3, i32 %7 ; [#uses=1]
- %4 = load %struct.btTypedConstraint** %scevgep.i.i, align 4 ; [#uses=1]
- %5 = icmp eq %struct.btTypedConstraint* %4, %c ; [#uses=1]
- br i1 %5, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i, label %bb2.i.i
-
-bb2.i.i: ; preds = %bb.i.i
- %6 = add nsw i32 %7, 1 ; [#uses=1]
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb2.i.i, %entry
- %7 = phi i32 [ 0, %entry ], [ %6, %bb2.i.i ] ; [#uses=4]
- %8 = icmp sgt i32 %1, %7 ; [#uses=1]
- br i1 %8, label %bb.i.i, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i
-
-_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i: ; preds = %bb3.i.i, %bb.i.i
- %index.0.i.i = phi i32 [ %1, %bb3.i.i ], [ %7, %bb.i.i ] ; [#uses=2]
- %9 = icmp sgt i32 %1, %index.0.i.i ; [#uses=1]
- br i1 %9, label %bb.i, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6removeERKS1_.exit
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i
- %10 = add nsw i32 %1, -1 ; [#uses=2]
- %11 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btTypedConstraint** %11, i32 %index.0.i.i ; [#uses=2]
- %13 = load %struct.btTypedConstraint** %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTypedConstraint** %11, i32 %10 ; [#uses=1]
- %15 = load %struct.btTypedConstraint** %14, align 4 ; [#uses=1]
- store %struct.btTypedConstraint* %15, %struct.btTypedConstraint** %12, align 4
- %16 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTypedConstraint** %16, i32 %10 ; [#uses=1]
- store %struct.btTypedConstraint* %13, %struct.btTypedConstraint** %17, align 4
- %18 = load i32* %0, align 4 ; [#uses=1]
- %19 = add nsw i32 %18, -1 ; [#uses=2]
- store i32 %19, i32* %0, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE6removeERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE6removeERKS1_.exit: ; preds = %bb.i, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i
- %20 = phi i32 [ %1, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit.i ], [ %19, %bb.i ] ; [#uses=1]
- %21 = icmp sgt i32 %20, 0 ; [#uses=1]
- %22 = zext i1 %21 to i32 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 24 ; [#uses=1]
- store i32 %22, i32* %23, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN11btRigidBodyD0Ev(%struct.btRigidBody* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV11btRigidBody, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 3 ; [#uses=3]
- %2 = load %struct.btTypedConstraint*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btTypedConstraint** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btTypedConstraint** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- %8 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %10)
- %11 = bitcast %struct.btRigidBody* %this to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %11)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %12 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %12)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN11btRigidBodyD1Ev(%struct.btRigidBody* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV11btRigidBody, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 3 ; [#uses=3]
- %2 = load %struct.btTypedConstraint*** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btTypedConstraint** %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btTypedConstraint** %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- br label %bb3
-
-invcont1: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %1, align 4
- %8 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %10)
- ret void
-
-lpad: ; preds = %bb1.i.i.i
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %11 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %11)
- to label %invcont1 unwind label %lpad9
-
-lpad9: ; preds = %lpad
- %eh_ptr10 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define i8* @_ZNK11btRigidBody9serializeEPvP12btSerializer(%struct.btRigidBody* %this, i8* %dataBuffer, %struct.btActionInterface* %serializer) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=1]
- %1 = tail call i8* @_ZNK17btCollisionObject9serializeEPvP12btSerializer(%struct.btCollisionObject* %0, i8* %dataBuffer, %struct.btActionInterface* %serializer) ; [#uses=0]
- %2 = getelementptr inbounds i8* %dataBuffer, i32 248 ; [#uses=1]
- %scevgep.i.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.i = bitcast i8* %2 to float* ; [#uses=1]
- %scevgep.1.i.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.i = getelementptr i8* %dataBuffer, i32 252 ; [#uses=1]
- %3 = bitcast i8* %scevgep4.1.i.i to float* ; [#uses=1]
- %scevgep.2.i.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.i = getelementptr i8* %dataBuffer, i32 256 ; [#uses=1]
- %4 = bitcast i8* %scevgep4.2.i.i to float* ; [#uses=1]
- %scevgep.3.i.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.i = getelementptr i8* %dataBuffer, i32 260 ; [#uses=1]
- %5 = bitcast i8* %scevgep4.3.i.i to float* ; [#uses=1]
- %6 = load float* %scevgep.i.i, align 4 ; [#uses=1]
- store float %6, float* %scevgep4.i.i, align 4
- %7 = load float* %scevgep.1.i.i, align 4 ; [#uses=1]
- store float %7, float* %3, align 4
- %8 = load float* %scevgep.2.i.i, align 4 ; [#uses=1]
- store float %8, float* %4, align 4
- %9 = load float* %scevgep.3.i.i, align 4 ; [#uses=1]
- store float %9, float* %5, align 4
- %scevgep.i.1.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.1.i = getelementptr i8* %dataBuffer, i32 264 ; [#uses=1]
- %10 = bitcast i8* %scevgep4.i.1.i to float* ; [#uses=1]
- %scevgep.1.i.1.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.1.i = getelementptr i8* %dataBuffer, i32 268 ; [#uses=1]
- %11 = bitcast i8* %scevgep4.1.i.1.i to float* ; [#uses=1]
- %scevgep.2.i.1.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.1.i = getelementptr i8* %dataBuffer, i32 272 ; [#uses=1]
- %12 = bitcast i8* %scevgep4.2.i.1.i to float* ; [#uses=1]
- %scevgep.3.i.1.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.1.i = getelementptr i8* %dataBuffer, i32 276 ; [#uses=1]
- %13 = bitcast i8* %scevgep4.3.i.1.i to float* ; [#uses=1]
- %14 = load float* %scevgep.i.1.i, align 4 ; [#uses=1]
- store float %14, float* %10, align 4
- %15 = load float* %scevgep.1.i.1.i, align 4 ; [#uses=1]
- store float %15, float* %11, align 4
- %16 = load float* %scevgep.2.i.1.i, align 4 ; [#uses=1]
- store float %16, float* %12, align 4
- %17 = load float* %scevgep.3.i.1.i, align 4 ; [#uses=1]
- store float %17, float* %13, align 4
- %scevgep.i.2.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i.2.i = getelementptr i8* %dataBuffer, i32 280 ; [#uses=1]
- %18 = bitcast i8* %scevgep4.i.2.i to float* ; [#uses=1]
- %scevgep.1.i.2.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i.2.i = getelementptr i8* %dataBuffer, i32 284 ; [#uses=1]
- %19 = bitcast i8* %scevgep4.1.i.2.i to float* ; [#uses=1]
- %scevgep.2.i.2.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i.2.i = getelementptr i8* %dataBuffer, i32 288 ; [#uses=1]
- %20 = bitcast i8* %scevgep4.2.i.2.i to float* ; [#uses=1]
- %scevgep.3.i.2.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i.2.i = getelementptr i8* %dataBuffer, i32 292 ; [#uses=1]
- %21 = bitcast i8* %scevgep4.3.i.2.i to float* ; [#uses=1]
- %22 = load float* %scevgep.i.2.i, align 4 ; [#uses=1]
- store float %22, float* %18, align 4
- %23 = load float* %scevgep.1.i.2.i, align 4 ; [#uses=1]
- store float %23, float* %19, align 4
- %24 = load float* %scevgep.2.i.2.i, align 4 ; [#uses=1]
- store float %24, float* %20, align 4
- %25 = load float* %scevgep.3.i.2.i, align 4 ; [#uses=1]
- store float %25, float* %21, align 4
- %26 = getelementptr inbounds i8* %dataBuffer, i32 296 ; [#uses=1]
- %scevgep.i58 = getelementptr %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i59 = bitcast i8* %26 to float* ; [#uses=1]
- %27 = load float* %scevgep.i58, align 4 ; [#uses=1]
- store float %27, float* %scevgep4.i59, align 4
- %scevgep.1.i60 = getelementptr %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i61 = getelementptr i8* %dataBuffer, i32 300 ; [#uses=1]
- %28 = bitcast i8* %scevgep4.1.i61 to float* ; [#uses=1]
- %29 = load float* %scevgep.1.i60, align 4 ; [#uses=1]
- store float %29, float* %28, align 4
- %scevgep.2.i62 = getelementptr %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i63 = getelementptr i8* %dataBuffer, i32 304 ; [#uses=1]
- %30 = bitcast i8* %scevgep4.2.i63 to float* ; [#uses=1]
- %31 = load float* %scevgep.2.i62, align 4 ; [#uses=1]
- store float %31, float* %30, align 4
- %scevgep.3.i64 = getelementptr %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i65 = getelementptr i8* %dataBuffer, i32 308 ; [#uses=1]
- %32 = bitcast i8* %scevgep4.3.i65 to float* ; [#uses=1]
- %33 = load float* %scevgep.3.i64, align 4 ; [#uses=1]
- store float %33, float* %32, align 4
- %34 = getelementptr inbounds i8* %dataBuffer, i32 312 ; [#uses=1]
- %scevgep.i50 = getelementptr %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i51 = bitcast i8* %34 to float* ; [#uses=1]
- %35 = load float* %scevgep.i50, align 4 ; [#uses=1]
- store float %35, float* %scevgep4.i51, align 4
- %scevgep.1.i52 = getelementptr %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i53 = getelementptr i8* %dataBuffer, i32 316 ; [#uses=1]
- %36 = bitcast i8* %scevgep4.1.i53 to float* ; [#uses=1]
- %37 = load float* %scevgep.1.i52, align 4 ; [#uses=1]
- store float %37, float* %36, align 4
- %scevgep.2.i54 = getelementptr %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i55 = getelementptr i8* %dataBuffer, i32 320 ; [#uses=1]
- %38 = bitcast i8* %scevgep4.2.i55 to float* ; [#uses=1]
- %39 = load float* %scevgep.2.i54, align 4 ; [#uses=1]
- store float %39, float* %38, align 4
- %scevgep.3.i56 = getelementptr %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i57 = getelementptr i8* %dataBuffer, i32 324 ; [#uses=1]
- %40 = bitcast i8* %scevgep4.3.i57 to float* ; [#uses=1]
- %41 = load float* %scevgep.3.i56, align 4 ; [#uses=1]
- store float %41, float* %40, align 4
- %42 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds i8* %dataBuffer, i32 440 ; [#uses=1]
- %45 = bitcast i8* %44 to float* ; [#uses=1]
- store float %43, float* %45, align 4
- %46 = getelementptr inbounds i8* %dataBuffer, i32 328 ; [#uses=1]
- %scevgep.i42 = getelementptr %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i43 = bitcast i8* %46 to float* ; [#uses=1]
- %47 = load float* %scevgep.i42, align 4 ; [#uses=1]
- store float %47, float* %scevgep4.i43, align 4
- %scevgep.1.i44 = getelementptr %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i45 = getelementptr i8* %dataBuffer, i32 332 ; [#uses=1]
- %48 = bitcast i8* %scevgep4.1.i45 to float* ; [#uses=1]
- %49 = load float* %scevgep.1.i44, align 4 ; [#uses=1]
- store float %49, float* %48, align 4
- %scevgep.2.i46 = getelementptr %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i47 = getelementptr i8* %dataBuffer, i32 336 ; [#uses=1]
- %50 = bitcast i8* %scevgep4.2.i47 to float* ; [#uses=1]
- %51 = load float* %scevgep.2.i46, align 4 ; [#uses=1]
- store float %51, float* %50, align 4
- %scevgep.3.i48 = getelementptr %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i49 = getelementptr i8* %dataBuffer, i32 340 ; [#uses=1]
- %52 = bitcast i8* %scevgep4.3.i49 to float* ; [#uses=1]
- %53 = load float* %scevgep.3.i48, align 4 ; [#uses=1]
- store float %53, float* %52, align 4
- %54 = getelementptr inbounds i8* %dataBuffer, i32 344 ; [#uses=1]
- %scevgep.i34 = getelementptr %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i35 = bitcast i8* %54 to float* ; [#uses=1]
- %55 = load float* %scevgep.i34, align 4 ; [#uses=1]
- store float %55, float* %scevgep4.i35, align 4
- %scevgep.1.i36 = getelementptr %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i37 = getelementptr i8* %dataBuffer, i32 348 ; [#uses=1]
- %56 = bitcast i8* %scevgep4.1.i37 to float* ; [#uses=1]
- %57 = load float* %scevgep.1.i36, align 4 ; [#uses=1]
- store float %57, float* %56, align 4
- %scevgep.2.i38 = getelementptr %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i39 = getelementptr i8* %dataBuffer, i32 352 ; [#uses=1]
- %58 = bitcast i8* %scevgep4.2.i39 to float* ; [#uses=1]
- %59 = load float* %scevgep.2.i38, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %scevgep.3.i40 = getelementptr %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i41 = getelementptr i8* %dataBuffer, i32 356 ; [#uses=1]
- %60 = bitcast i8* %scevgep4.3.i41 to float* ; [#uses=1]
- %61 = load float* %scevgep.3.i40, align 4 ; [#uses=1]
- store float %61, float* %60, align 4
- %62 = getelementptr inbounds i8* %dataBuffer, i32 360 ; [#uses=1]
- %scevgep.i26 = getelementptr %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i27 = bitcast i8* %62 to float* ; [#uses=1]
- %63 = load float* %scevgep.i26, align 4 ; [#uses=1]
- store float %63, float* %scevgep4.i27, align 4
- %scevgep.1.i28 = getelementptr %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i29 = getelementptr i8* %dataBuffer, i32 364 ; [#uses=1]
- %64 = bitcast i8* %scevgep4.1.i29 to float* ; [#uses=1]
- %65 = load float* %scevgep.1.i28, align 4 ; [#uses=1]
- store float %65, float* %64, align 4
- %scevgep.2.i30 = getelementptr %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i31 = getelementptr i8* %dataBuffer, i32 368 ; [#uses=1]
- %66 = bitcast i8* %scevgep4.2.i31 to float* ; [#uses=1]
- %67 = load float* %scevgep.2.i30, align 4 ; [#uses=1]
- store float %67, float* %66, align 4
- %scevgep.3.i32 = getelementptr %struct.btRigidBody* %this, i32 0, i32 6, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i33 = getelementptr i8* %dataBuffer, i32 372 ; [#uses=1]
- %68 = bitcast i8* %scevgep4.3.i33 to float* ; [#uses=1]
- %69 = load float* %scevgep.3.i32, align 4 ; [#uses=1]
- store float %69, float* %68, align 4
- %70 = getelementptr inbounds i8* %dataBuffer, i32 376 ; [#uses=1]
- %scevgep.i18 = getelementptr %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i19 = bitcast i8* %70 to float* ; [#uses=1]
- %71 = load float* %scevgep.i18, align 4 ; [#uses=1]
- store float %71, float* %scevgep4.i19, align 4
- %scevgep.1.i20 = getelementptr %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i21 = getelementptr i8* %dataBuffer, i32 380 ; [#uses=1]
- %72 = bitcast i8* %scevgep4.1.i21 to float* ; [#uses=1]
- %73 = load float* %scevgep.1.i20, align 4 ; [#uses=1]
- store float %73, float* %72, align 4
- %scevgep.2.i22 = getelementptr %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i23 = getelementptr i8* %dataBuffer, i32 384 ; [#uses=1]
- %74 = bitcast i8* %scevgep4.2.i23 to float* ; [#uses=1]
- %75 = load float* %scevgep.2.i22, align 4 ; [#uses=1]
- store float %75, float* %74, align 4
- %scevgep.3.i24 = getelementptr %struct.btRigidBody* %this, i32 0, i32 7, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i25 = getelementptr i8* %dataBuffer, i32 388 ; [#uses=1]
- %76 = bitcast i8* %scevgep4.3.i25 to float* ; [#uses=1]
- %77 = load float* %scevgep.3.i24, align 4 ; [#uses=1]
- store float %77, float* %76, align 4
- %78 = getelementptr inbounds i8* %dataBuffer, i32 392 ; [#uses=1]
- %scevgep.i10 = getelementptr %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i11 = bitcast i8* %78 to float* ; [#uses=1]
- %79 = load float* %scevgep.i10, align 4 ; [#uses=1]
- store float %79, float* %scevgep4.i11, align 4
- %scevgep.1.i12 = getelementptr %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i13 = getelementptr i8* %dataBuffer, i32 396 ; [#uses=1]
- %80 = bitcast i8* %scevgep4.1.i13 to float* ; [#uses=1]
- %81 = load float* %scevgep.1.i12, align 4 ; [#uses=1]
- store float %81, float* %80, align 4
- %scevgep.2.i14 = getelementptr %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i15 = getelementptr i8* %dataBuffer, i32 400 ; [#uses=1]
- %82 = bitcast i8* %scevgep4.2.i15 to float* ; [#uses=1]
- %83 = load float* %scevgep.2.i14, align 4 ; [#uses=1]
- store float %83, float* %82, align 4
- %scevgep.3.i16 = getelementptr %struct.btRigidBody* %this, i32 0, i32 8, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i17 = getelementptr i8* %dataBuffer, i32 404 ; [#uses=1]
- %84 = bitcast i8* %scevgep4.3.i17 to float* ; [#uses=1]
- %85 = load float* %scevgep.3.i16, align 4 ; [#uses=1]
- store float %85, float* %84, align 4
- %86 = getelementptr inbounds i8* %dataBuffer, i32 408 ; [#uses=1]
- %scevgep.i2 = getelementptr %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i3 = bitcast i8* %86 to float* ; [#uses=1]
- %87 = load float* %scevgep.i2, align 4 ; [#uses=1]
- store float %87, float* %scevgep4.i3, align 4
- %scevgep.1.i4 = getelementptr %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i5 = getelementptr i8* %dataBuffer, i32 412 ; [#uses=1]
- %88 = bitcast i8* %scevgep4.1.i5 to float* ; [#uses=1]
- %89 = load float* %scevgep.1.i4, align 4 ; [#uses=1]
- store float %89, float* %88, align 4
- %scevgep.2.i6 = getelementptr %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i7 = getelementptr i8* %dataBuffer, i32 416 ; [#uses=1]
- %90 = bitcast i8* %scevgep4.2.i7 to float* ; [#uses=1]
- %91 = load float* %scevgep.2.i6, align 4 ; [#uses=1]
- store float %91, float* %90, align 4
- %scevgep.3.i8 = getelementptr %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i9 = getelementptr i8* %dataBuffer, i32 420 ; [#uses=1]
- %92 = bitcast i8* %scevgep4.3.i9 to float* ; [#uses=1]
- %93 = load float* %scevgep.3.i8, align 4 ; [#uses=1]
- store float %93, float* %92, align 4
- %94 = getelementptr inbounds i8* %dataBuffer, i32 424 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 10, i32 0, i32 0 ; [#uses=1]
- %scevgep4.i = bitcast i8* %94 to float* ; [#uses=1]
- %95 = load float* %scevgep.i, align 4 ; [#uses=1]
- store float %95, float* %scevgep4.i, align 4
- %scevgep.1.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 10, i32 0, i32 1 ; [#uses=1]
- %scevgep4.1.i = getelementptr i8* %dataBuffer, i32 428 ; [#uses=1]
- %96 = bitcast i8* %scevgep4.1.i to float* ; [#uses=1]
- %97 = load float* %scevgep.1.i, align 4 ; [#uses=1]
- store float %97, float* %96, align 4
- %scevgep.2.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 10, i32 0, i32 2 ; [#uses=1]
- %scevgep4.2.i = getelementptr i8* %dataBuffer, i32 432 ; [#uses=1]
- %98 = bitcast i8* %scevgep4.2.i to float* ; [#uses=1]
- %99 = load float* %scevgep.2.i, align 4 ; [#uses=1]
- store float %99, float* %98, align 4
- %scevgep.3.i = getelementptr %struct.btRigidBody* %this, i32 0, i32 10, i32 0, i32 3 ; [#uses=1]
- %scevgep4.3.i = getelementptr i8* %dataBuffer, i32 436 ; [#uses=1]
- %100 = bitcast i8* %scevgep4.3.i to float* ; [#uses=1]
- %101 = load float* %scevgep.3.i, align 4 ; [#uses=1]
- store float %101, float* %100, align 4
- %102 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 11 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=1]
- %104 = getelementptr inbounds i8* %dataBuffer, i32 444 ; [#uses=1]
- %105 = bitcast i8* %104 to float* ; [#uses=1]
- store float %103, float* %105, align 4
- %106 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 12 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=1]
- %108 = getelementptr inbounds i8* %dataBuffer, i32 448 ; [#uses=1]
- %109 = bitcast i8* %108 to float* ; [#uses=1]
- store float %107, float* %109, align 4
- %110 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 13 ; [#uses=1]
- %111 = load i8* %110, align 4 ; [#uses=1]
- %112 = zext i8 %111 to i32 ; [#uses=1]
- %113 = getelementptr inbounds i8* %dataBuffer, i32 476 ; [#uses=1]
- %114 = bitcast i8* %113 to i32* ; [#uses=1]
- store i32 %112, i32* %114, align 4
- %115 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 14 ; [#uses=1]
- %116 = load float* %115, align 4 ; [#uses=1]
- %117 = getelementptr inbounds i8* %dataBuffer, i32 452 ; [#uses=1]
- %118 = bitcast i8* %117 to float* ; [#uses=1]
- store float %116, float* %118, align 4
- %119 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 15 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = getelementptr inbounds i8* %dataBuffer, i32 456 ; [#uses=1]
- %122 = bitcast i8* %121 to float* ; [#uses=1]
- store float %120, float* %122, align 4
- %123 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 16 ; [#uses=1]
- %124 = load float* %123, align 4 ; [#uses=1]
- %125 = getelementptr inbounds i8* %dataBuffer, i32 460 ; [#uses=1]
- %126 = bitcast i8* %125 to float* ; [#uses=1]
- store float %124, float* %126, align 4
- %127 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 17 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=1]
- %129 = getelementptr inbounds i8* %dataBuffer, i32 464 ; [#uses=1]
- %130 = bitcast i8* %129 to float* ; [#uses=1]
- store float %128, float* %130, align 4
- %131 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 18 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = getelementptr inbounds i8* %dataBuffer, i32 468 ; [#uses=1]
- %134 = bitcast i8* %133 to float* ; [#uses=1]
- store float %132, float* %134, align 4
- %135 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 19 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- %137 = getelementptr inbounds i8* %dataBuffer, i32 472 ; [#uses=1]
- %138 = bitcast i8* %137 to float* ; [#uses=1]
- store float %136, float* %138, align 4
- ret i8* getelementptr inbounds ([21 x i8]* @.str68, i32 0, i32 0)
-}
-
-; [#uses=2]
-define void @_ZN11btRigidBody16addConstraintRefEP17btTypedConstraint(%struct.btRigidBody* nocapture %this, %struct.btTypedConstraint* %c) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=9]
- %2 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 3 ; [#uses=6]
- br label %bb3.i
-
-bb.i: ; preds = %bb3.i
- %3 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btTypedConstraint** %3, i32 %7 ; [#uses=1]
- %4 = load %struct.btTypedConstraint** %scevgep.i, align 4 ; [#uses=1]
- %5 = icmp eq %struct.btTypedConstraint* %4, %c ; [#uses=1]
- br i1 %5, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %6 = add nsw i32 %7, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %entry
- %7 = phi i32 [ 0, %entry ], [ %6, %bb2.i ] ; [#uses=4]
- %8 = icmp sgt i32 %1, %7 ; [#uses=1]
- br i1 %8, label %bb.i, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit
-
-_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit: ; preds = %bb3.i, %bb.i
- %index.0.i = phi i32 [ %1, %bb3.i ], [ %7, %bb.i ] ; [#uses=1]
- %9 = icmp eq i32 %1, %index.0.i ; [#uses=1]
- br i1 %9, label %bb, label %bb1
-
-bb: ; preds = %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 2 ; [#uses=2]
- %11 = load i32* %10, align 4 ; [#uses=2]
- %12 = icmp eq i32 %11, %1 ; [#uses=1]
- br i1 %12, label %bb.i2, label %bb1.i
-
-bb.i2: ; preds = %bb
- %13 = icmp eq i32 %1, 0 ; [#uses=1]
- %14 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.341.0.i.i = select i1 %13, i32 1, i32 %14 ; [#uses=4]
- %15 = icmp slt i32 %11, %iftmp.341.0.i.i ; [#uses=1]
- br i1 %15, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i2
- %16 = icmp eq i32 %iftmp.341.0.i.i, 0 ; [#uses=1]
- br i1 %16, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %17 = shl i32 %iftmp.341.0.i.i, 2 ; [#uses=1]
- %18 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %17, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %18 to %struct.btTypedConstraint** ; [#uses=1]
- %.pre.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %19 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %1, %bb.i.i ] ; [#uses=2]
- %20 = phi %struct.btTypedConstraint** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %21 = icmp sgt i32 %19, 0 ; [#uses=1]
- br i1 %21, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btTypedConstraint** %20, i32 %indvar.i.i.i ; [#uses=2]
- %22 = icmp eq %struct.btTypedConstraint** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %22, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %23 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btTypedConstraint** %23, i32 %indvar.i.i.i ; [#uses=1]
- %24 = load %struct.btTypedConstraint** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btTypedConstraint* %24, %struct.btTypedConstraint** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %19 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE8allocateEi.exit.i.i
- %25 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=2]
- %26 = icmp eq %struct.btTypedConstraint** %25, null ; [#uses=1]
- br i1 %26, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
- %27 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=1]
- %28 = load i8* %27, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %28, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %29 = bitcast %struct.btTypedConstraint** %25 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %29)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %2, align 4
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE4copyEiiPS1_.exit.i.i
- %30 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=1]
- store i8 1, i8* %30, align 4
- store %struct.btTypedConstraint** %20, %struct.btTypedConstraint*** %2, align 4
- store i32 %iftmp.341.0.i.i, i32* %10, align 4
- %.pre5.i = load i32* %0, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i, %bb.i2, %bb
- %31 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP17btTypedConstraintE10deallocateEv.exit.i.i ], [ %1, %bb ], [ %1, %bb.i2 ] ; [#uses=2]
- %32 = load %struct.btTypedConstraint*** %2, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btTypedConstraint** %32, i32 %31 ; [#uses=2]
- %34 = icmp eq %struct.btTypedConstraint** %33, null ; [#uses=1]
- br i1 %34, label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit, label %bb2.i3
-
-bb2.i3: ; preds = %bb1.i
- store %struct.btTypedConstraint* %c, %struct.btTypedConstraint** %33, align 4
- %.pre6.i = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit: ; preds = %bb2.i3, %bb1.i
- %35 = phi i32 [ %31, %bb1.i ], [ %.pre6.i, %bb2.i3 ] ; [#uses=1]
- %36 = add nsw i32 %35, 1 ; [#uses=1]
- store i32 %36, i32* %0, align 4
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayIP17btTypedConstraintE9push_backERKS1_.exit, %_ZNK20btAlignedObjectArrayIP17btTypedConstraintE16findLinearSearchERKS1_.exit
- %37 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 24 ; [#uses=1]
- store i32 1, i32* %37, align 4
- ret void
-}
-
-; [#uses=3]
-define void @_ZN11btRigidBody19integrateVelocitiesEf(%struct.btRigidBody* nocapture %this, float %step) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 12 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = and i32 %1, 3 ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %return
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %5, %step ; [#uses=3]
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %8, %6 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fmul float %11, %6 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 9, i32 0, i32 0 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %14, %6 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fadd float %17, %15 ; [#uses=1]
- store float %18, float* %16, align 4
- %19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fadd float %20, %12 ; [#uses=1]
- store float %21, float* %19, align 4
- %22 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fadd float %23, %9 ; [#uses=1]
- store float %24, float* %22, align 4
- %25 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 10, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=3]
- %29 = fmul float %26, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 10, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=3]
- %34 = fmul float %31, %33 ; [#uses=1]
- %35 = fadd float %29, %34 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 10, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=3]
- %40 = fmul float %37, %39 ; [#uses=1]
- %41 = fadd float %35, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fmul float %43, %28 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fmul float %46, %33 ; [#uses=1]
- %48 = fadd float %44, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %50, %39 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %28 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fmul float %57, %33 ; [#uses=1]
- %59 = fadd float %55, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %61, %39 ; [#uses=1]
- %63 = fadd float %59, %62 ; [#uses=1]
- %64 = fmul float %41, %step ; [#uses=1]
- %65 = fmul float %52, %step ; [#uses=1]
- %66 = fmul float %63, %step ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=3]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fadd float %68, %66 ; [#uses=4]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=3]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = fadd float %71, %65 ; [#uses=4]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=3]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fadd float %74, %64 ; [#uses=4]
- store float %75, float* %73, align 4
- %76 = fmul float %69, %69 ; [#uses=1]
- %77 = fmul float %72, %72 ; [#uses=1]
- %78 = fadd float %76, %77 ; [#uses=1]
- %79 = fmul float %75, %75 ; [#uses=1]
- %80 = fadd float %78, %79 ; [#uses=1]
- %81 = tail call float @sqrtf(float %80) nounwind readonly ; [#uses=2]
- %82 = fmul float %81, %step ; [#uses=1]
- %83 = fcmp ogt float %82, 0x3FF921FB60000000 ; [#uses=1]
- br i1 %83, label %bb1, label %return
-
-bb1: ; preds = %bb
- %84 = fdiv float 0x3FF921FB60000000, %step ; [#uses=1]
- %85 = fdiv float %84, %81 ; [#uses=3]
- %86 = fmul float %69, %85 ; [#uses=1]
- store float %86, float* %67, align 4
- %87 = fmul float %72, %85 ; [#uses=1]
- store float %87, float* %70, align 4
- %88 = fmul float %75, %85 ; [#uses=1]
- store float %88, float* %73, align 4
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZNK11btRigidBody14getOrientationEv(%struct.btQuaternion* noalias nocapture sret %agg.result, %struct.btRigidBody* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0 ; [#uses=1]
- tail call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %0, %struct.btQuaternion* %agg.result) nounwind
- ret void
-}
-
-; [#uses=1]
-define void @_ZN11btRigidBody25internalWritebackVelocityEf(%struct.btRigidBody* %this, float %timeStep) nounwind align 2 {
-entry:
- %newTransform = alloca %struct.btTransform, align 8 ; [#uses=17]
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = fcmp une float %1, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 24, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = fadd float %4, %6 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 24, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fadd float %9, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 24, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fadd float %14, %16 ; [#uses=1]
- store float %17, float* %13, align 4
- store float %12, float* %8, align 4
- store float %7, float* %3, align 4
- %18 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 25, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fadd float %20, %22 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 25, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fadd float %25, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 25, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fadd float %30, %32 ; [#uses=1]
- store float %33, float* %29, align 4
- store float %28, float* %24, align 4
- store float %23, float* %19, align 4
- %34 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 4
- %35 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 29 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 28 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %37, %struct.btQuadWord* %36, %struct.btQuadWord* %35, float %timeStep, %struct.btTransform* %newTransform)
- %38 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 8 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 8 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 8 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 8 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 8 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 8 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 8 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 8 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btTransform* %newTransform, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=7]
-define void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %this, float %timeStep, %struct.btTransform* nocapture %predictedTransform) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- tail call void @_ZN15btTransformUtil18integrateTransformERK11btTransformRK9btVector3S5_fRS0_(%struct.btTransform* %2, %struct.btQuadWord* %1, %struct.btQuadWord* %0, float %timeStep, %struct.btTransform* %predictedTransform)
- ret void
-}
-
-; [#uses=2]
-declare float @llvm.pow.f32(float, float) nounwind readonly
-
-; [#uses=3]
-define void @_ZN11btRigidBody12applyDampingEf(%struct.btRigidBody* %this, float %timeStep) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 11 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = fsub float 1.000000e+00, %1 ; [#uses=1]
- %3 = tail call float @llvm.pow.f32(float %2, float %timeStep) nounwind ; [#uses=3]
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=5]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %5, %3 ; [#uses=6]
- store float %6, float* %4, align 4
- %7 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=5]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %8, %3 ; [#uses=6]
- store float %9, float* %7, align 4
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=5]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fmul float %11, %3 ; [#uses=6]
- store float %12, float* %10, align 4
- %13 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 12 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fsub float 1.000000e+00, %14 ; [#uses=1]
- %16 = tail call float @llvm.pow.f32(float %15, float %timeStep) nounwind ; [#uses=3]
- %17 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=5]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %18, %16 ; [#uses=6]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=5]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fmul float %21, %16 ; [#uses=6]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=5]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = fmul float %24, %16 ; [#uses=6]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 13 ; [#uses=1]
- %27 = load i8* %26, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool, label %return, label %bb
-
-bb: ; preds = %entry
- %28 = fmul float %19, %19 ; [#uses=1]
- %29 = fmul float %22, %22 ; [#uses=1]
- %30 = fadd float %28, %29 ; [#uses=1]
- %31 = fmul float %25, %25 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 16 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = fcmp uge float %32, %34 ; [#uses=1]
- br i1 %35, label %bb7, label %bb1
-
-bb1: ; preds = %bb
- %36 = fmul float %6, %6 ; [#uses=1]
- %37 = fmul float %9, %9 ; [#uses=1]
- %38 = fadd float %36, %37 ; [#uses=1]
- %39 = fmul float %12, %12 ; [#uses=1]
- %40 = fadd float %38, %39 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 15 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=1]
- %43 = fcmp uge float %40, %42 ; [#uses=1]
- br i1 %43, label %bb7, label %bb6
-
-bb6: ; preds = %bb1
- %44 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 14 ; [#uses=1]
- %45 = load float* %44, align 4 ; [#uses=6]
- %46 = fmul float %19, %45 ; [#uses=2]
- store float %46, float* %17, align 4
- %47 = fmul float %22, %45 ; [#uses=2]
- store float %47, float* %20, align 4
- %48 = fmul float %25, %45 ; [#uses=2]
- store float %48, float* %23, align 4
- %49 = fmul float %6, %45 ; [#uses=2]
- store float %49, float* %4, align 4
- %50 = fmul float %9, %45 ; [#uses=2]
- store float %50, float* %7, align 4
- %51 = fmul float %12, %45 ; [#uses=2]
- store float %51, float* %10, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb1, %bb
- %52 = phi float [ %25, %bb ], [ %25, %bb1 ], [ %48, %bb6 ] ; [#uses=4]
- %53 = phi float [ %22, %bb ], [ %22, %bb1 ], [ %47, %bb6 ] ; [#uses=4]
- %54 = phi float [ %19, %bb ], [ %19, %bb1 ], [ %46, %bb6 ] ; [#uses=4]
- %55 = phi float [ %12, %bb ], [ %12, %bb1 ], [ %51, %bb6 ] ; [#uses=4]
- %56 = phi float [ %9, %bb ], [ %9, %bb1 ], [ %50, %bb6 ] ; [#uses=4]
- %57 = phi float [ %6, %bb ], [ %6, %bb1 ], [ %49, %bb6 ] ; [#uses=4]
- %58 = fmul float %57, %57 ; [#uses=1]
- %59 = fmul float %56, %56 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %55, %55 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = tail call float @sqrtf(float %62) nounwind readonly ; [#uses=3]
- %64 = fcmp ogt float %1, %63 ; [#uses=1]
- br i1 %64, label %bb8, label %bb11
-
-bb8: ; preds = %bb7
- %65 = fcmp ogt float %63, 0x3F747AE140000000 ; [#uses=1]
- br i1 %65, label %bb9, label %bb10
-
-bb9: ; preds = %bb8
- %66 = fdiv float 1.000000e+00, %63 ; [#uses=3]
- %67 = fmul float %55, %66 ; [#uses=1]
- %68 = fmul float %56, %66 ; [#uses=1]
- %69 = fmul float %57, %66 ; [#uses=1]
- %70 = fmul float %67, 0x3F747AE140000000 ; [#uses=1]
- %71 = fmul float %68, 0x3F747AE140000000 ; [#uses=1]
- %72 = fmul float %69, 0x3F747AE140000000 ; [#uses=1]
- %73 = fsub float %57, %72 ; [#uses=1]
- store float %73, float* %4, align 4
- %74 = fsub float %56, %71 ; [#uses=1]
- store float %74, float* %7, align 4
- %75 = fsub float %55, %70 ; [#uses=1]
- store float %75, float* %10, align 4
- br label %bb11
-
-bb10: ; preds = %bb8
- store float 0.000000e+00, float* %4, align 4
- store float 0.000000e+00, float* %7, align 4
- store float 0.000000e+00, float* %10, align 4
- %76 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %76, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9, %bb7
- %77 = fmul float %54, %54 ; [#uses=1]
- %78 = fmul float %53, %53 ; [#uses=1]
- %79 = fadd float %77, %78 ; [#uses=1]
- %80 = fmul float %52, %52 ; [#uses=1]
- %81 = fadd float %79, %80 ; [#uses=1]
- %82 = tail call float @sqrtf(float %81) nounwind readonly ; [#uses=3]
- %83 = fcmp ogt float %14, %82 ; [#uses=1]
- br i1 %83, label %bb12, label %return
-
-bb12: ; preds = %bb11
- %84 = fcmp ogt float %82, 0x3F747AE140000000 ; [#uses=1]
- br i1 %84, label %bb13, label %bb15
-
-bb13: ; preds = %bb12
- %85 = fdiv float 1.000000e+00, %82 ; [#uses=3]
- %86 = fmul float %52, %85 ; [#uses=1]
- %87 = fmul float %53, %85 ; [#uses=1]
- %88 = fmul float %54, %85 ; [#uses=1]
- %89 = fmul float %86, 0x3F747AE140000000 ; [#uses=1]
- %90 = fmul float %87, 0x3F747AE140000000 ; [#uses=1]
- %91 = fmul float %88, 0x3F747AE140000000 ; [#uses=1]
- %92 = fsub float %54, %91 ; [#uses=1]
- store float %92, float* %17, align 4
- %93 = fsub float %53, %90 ; [#uses=1]
- store float %93, float* %20, align 4
- %94 = fsub float %52, %89 ; [#uses=1]
- store float %94, float* %23, align 4
- ret void
-
-bb15: ; preds = %bb12
- store float 0.000000e+00, float* %17, align 4
- store float 0.000000e+00, float* %20, align 4
- store float 0.000000e+00, float* %23, align 4
- %95 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %95, align 4
- ret void
-
-return: ; preds = %bb11, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN11btRigidBody18saveKinematicStateEf(%struct.btRigidBody* %this, float %timeStep) align 2 {
-entry:
- %axis.i = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %angle.i = alloca float, align 4 ; [#uses=2]
- %0 = fcmp une float %timeStep, 0.000000e+00 ; [#uses=1]
- br i1 %0, label %bb, label %return
-
-bb: ; preds = %entry
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 20 ; [#uses=1]
- %2 = load %struct.btActionInterface** %1, align 4 ; [#uses=3]
- %3 = icmp eq %struct.btActionInterface* %2, null ; [#uses=1]
- br i1 %3, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %4 = getelementptr inbounds %struct.btActionInterface* %2, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 2 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = bitcast i32 (...)* %7 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- call void %9(%struct.btActionInterface* %2, %struct.btTransform* %8)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=2]
- %13 = load float* %12, align 4 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=2]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float %13, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=2]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %18, %20 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fsub float %23, %25 ; [#uses=1]
- %27 = fdiv float 1.000000e+00, %timeStep ; [#uses=6]
- %28 = fmul float %16, %27 ; [#uses=1]
- %29 = fmul float %21, %27 ; [#uses=1]
- %30 = fmul float %26, %27 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- store float %30, float* %31, align 4
- %32 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- store float %29, float* %32, align 4
- %33 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- store float %28, float* %33, align 4
- %34 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %34, align 4
- call void @_ZN15btTransformUtil22calculateDiffAxisAngleERK11btTransformS2_R9btVector3Rf(%struct.btTransform* %11, %struct.btTransform* %10, %struct.btQuadWord* %axis.i, float* %angle.i) nounwind
- %35 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %36 = load float* %35, align 8 ; [#uses=1]
- %37 = load float* %angle.i, align 4 ; [#uses=3]
- %38 = fmul float %36, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = fmul float %40, %37 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %axis.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 8 ; [#uses=1]
- %44 = fmul float %43, %37 ; [#uses=1]
- %45 = fmul float %38, %27 ; [#uses=2]
- %46 = fmul float %41, %27 ; [#uses=2]
- %47 = fmul float %44, %27 ; [#uses=2]
- %48 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %47, float* %48, align 4
- %49 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %49, align 4
- %50 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %45, float* %50, align 4
- %51 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 4
- %52 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %31, align 4 ; [#uses=1]
- store float %53, float* %52, align 4
- %54 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %32, align 4 ; [#uses=1]
- store float %55, float* %54, align 4
- %56 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %33, align 4 ; [#uses=1]
- store float %57, float* %56, align 4
- %58 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %59 = load float* %34, align 4 ; [#uses=1]
- store float %59, float* %58, align 4
- %60 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %47, float* %60, align 4
- %61 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %61, align 4
- %62 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %45, float* %62, align 4
- %63 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %63, align 4
- %64 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- store float %66, float* %64, align 4
- %67 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=1]
- store float %69, float* %67, align 4
- %70 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- store float %72, float* %70, align 4
- %73 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- store float %75, float* %73, align 4
- %76 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %76, align 4
- %79 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- store float %81, float* %79, align 4
- %82 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %84 = load float* %83, align 4 ; [#uses=1]
- store float %84, float* %82, align 4
- %85 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- store float %87, float* %85, align 4
- %88 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- store float %90, float* %88, align 4
- %91 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %92 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- store float %93, float* %91, align 4
- %94 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %98 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- store float %99, float* %97, align 4
- %100 = load float* %22, align 4 ; [#uses=1]
- store float %100, float* %24, align 4
- %101 = load float* %17, align 4 ; [#uses=1]
- store float %101, float* %19, align 4
- %102 = load float* %12, align 4 ; [#uses=1]
- store float %102, float* %14, align 4
- %103 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- %104 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- store float %105, float* %103, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN11btRigidBodyC2EfP13btMotionStateP16btCollisionShapeRK9btVector3(%struct.btRigidBody* %this, float %mass, %struct.btActionInterface* %motionState, %struct.btCollisionShape* %collisionShape, %struct.btQuadWord* nocapture %localInertia) align 2 {
-invcont:
- %cinfo = alloca %"struct.btRigidBody::btRigidBodyConstructionInfo", align 8 ; [#uses=35]
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=2]
- call void @_ZN17btCollisionObjectC2Ev(%struct.btCollisionObject* %0)
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV11btRigidBody, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=3]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 3 ; [#uses=4]
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %3, align 4
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 1 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 2 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 0 ; [#uses=1]
- store float %mass, float* %6, align 8
- %7 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %motionState, %struct.btActionInterface** %7, align 4
- %8 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 3 ; [#uses=1]
- store %struct.btCollisionShape* %collisionShape, %struct.btCollisionShape** %8, align 8
- %9 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 3 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %22, align 8
- %23 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 7 ; [#uses=1]
- store float 5.000000e-01, float* %23, align 4
- %24 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 8 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 8
- %25 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 9 ; [#uses=1]
- store float 0x3FE99999A0000000, float* %25, align 4
- %26 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %26, align 8
- %27 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 11 ; [#uses=1]
- store i8 0, i8* %27, align 4
- %28 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 12 ; [#uses=1]
- store float 0x3F747AE140000000, float* %28, align 8
- %29 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 13 ; [#uses=1]
- store float 0x3F847AE140000000, float* %29, align 4
- %30 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 14 ; [#uses=1]
- store float 0x3F847AE140000000, float* %30, align 8
- %31 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 15 ; [#uses=1]
- store float 0x3F847AE140000000, float* %31, align 4
- %32 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %32, align 8
- %33 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %33, align 4
- %34 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %34, align 8
- %35 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 8
- %37 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 8
- %39 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %39, align 4
- %40 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 8
- %41 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %42, align 8
- %43 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- %44 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %44, align 8
- %45 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- %46 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %46, align 8
- %47 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 4
- invoke void @_ZN11btRigidBody14setupRigidBodyERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %this, %"struct.btRigidBody::btRigidBodyConstructionInfo"* %cinfo)
- to label %return unwind label %lpad12
-
-invcont7: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr13)
- unreachable
-
-return: ; preds = %invcont
- ret void
-
-lpad12: ; preds = %invcont
- %eh_ptr13 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %48 = load %struct.btTypedConstraint*** %3, align 4 ; [#uses=2]
- %49 = icmp eq %struct.btTypedConstraint** %48, null ; [#uses=1]
- br i1 %49, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad12
- %50 = load i8* %2, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %50, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %51 = bitcast %struct.btTypedConstraint** %48 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %51)
- to label %bb2.i.i.i unwind label %lpad16
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %3, align 4
- br label %ppad
-
-lpad16: ; preds = %bb1.i.i.i
- %eh_ptr17 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad20: ; preds = %ppad
- %eh_ptr21 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select23 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad12
- store i8 1, i8* %2, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %3, align 4
- store i32 0, i32* %4, align 4
- store i32 0, i32* %5, align 4
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %0)
- to label %invcont7 unwind label %lpad20
-}
-
-; [#uses=3]
-define void @_ZN11btRigidBodyC1EfP13btMotionStateP16btCollisionShapeRK9btVector3(%struct.btRigidBody* %this, float %mass, %struct.btActionInterface* %motionState, %struct.btCollisionShape* %collisionShape, %struct.btQuadWord* nocapture %localInertia) align 2 {
-entry:
- tail call void @_ZN11btRigidBodyC2EfP13btMotionStateP16btCollisionShapeRK9btVector3(%struct.btRigidBody* %this, float %mass, %struct.btActionInterface* %motionState, %struct.btCollisionShape* %collisionShape, %struct.btQuadWord* %localInertia)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN11btRigidBodyC2ERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %this, %"struct.btRigidBody::btRigidBodyConstructionInfo"* nocapture %constructionInfo) align 2 {
-invcont:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0 ; [#uses=2]
- tail call void @_ZN17btCollisionObjectC2Ev(%struct.btCollisionObject* %0)
- %1 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV11btRigidBody, i32 0, i32 2), i32 (...)*** %1, align 4
- %2 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 4 ; [#uses=3]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 3 ; [#uses=4]
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %3, align 4
- %4 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 1 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 21, i32 2 ; [#uses=2]
- store i32 0, i32* %5, align 4
- invoke void @_ZN11btRigidBody14setupRigidBodyERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %this, %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo)
- to label %return unwind label %lpad12
-
-invcont7: ; preds = %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr13)
- unreachable
-
-return: ; preds = %invcont
- ret void
-
-lpad12: ; preds = %invcont
- %eh_ptr13 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select15 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr13, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %6 = load %struct.btTypedConstraint*** %3, align 4 ; [#uses=2]
- %7 = icmp eq %struct.btTypedConstraint** %6, null ; [#uses=1]
- br i1 %7, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %lpad12
- %8 = load i8* %2, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %8, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %9 = bitcast %struct.btTypedConstraint** %6 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %9)
- to label %bb2.i.i.i unwind label %lpad16
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %3, align 4
- br label %ppad
-
-lpad16: ; preds = %bb1.i.i.i
- %eh_ptr17 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select19 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr17, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad20: ; preds = %ppad
- %eh_ptr21 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select23 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr21, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %lpad12
- store i8 1, i8* %2, align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** %3, align 4
- store i32 0, i32* %4, align 4
- store i32 0, i32* %5, align 4
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* %0)
- to label %invcont7 unwind label %lpad20
-}
-
-; [#uses=3]
-define void @_ZN11btRigidBodyC1ERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %this, %"struct.btRigidBody::btRigidBodyConstructionInfo"* nocapture %constructionInfo) align 2 {
-entry:
- tail call void @_ZN11btRigidBodyC2ERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %this, %"struct.btRigidBody::btRigidBodyConstructionInfo"* %constructionInfo)
- ret void
-}
-
-; [#uses=0]
-define void @btBulletDynamicsProbe() nounwind readnone {
-entry:
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr i32 @_ZNK21btSimpleDynamicsWorld12getWorldTypeEv(%struct.btSimpleDynamicsWorld* nocapture %this) nounwind readnone align 2 {
-entry:
- ret i32 1
-}
-
-; [#uses=1]
-define void @_ZNK21btSimpleDynamicsWorld10getGravityEv(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btSimpleDynamicsWorld* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- ret void
-}
-
-; [#uses=1]
-define %struct.btActionInterface* @_ZN21btSimpleDynamicsWorld19getConstraintSolverEv(%struct.btSimpleDynamicsWorld* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.btActionInterface** %0, align 4 ; [#uses=1]
- ret %struct.btActionInterface* %1
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld23synchronizeMotionStatesEv(%struct.btSimpleDynamicsWorld* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb8, %bb.nph
- %i.012 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb8 ] ; [#uses=2]
- %tmp = add i32 %i.012, 1 ; [#uses=2]
- %4 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %4, i32 %i.012 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=5]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 19 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %.lobit.i = and i32 %7, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %8 = icmp eq %struct.btCollisionObject* %5, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %8 ; [#uses=1]
- br i1 %or.cond, label %bb8, label %bb1
-
-bb1: ; preds = %bb
- %9 = getelementptr inbounds %struct.btCollisionObject* %5, i32 1, i32 15 ; [#uses=1]
- %10 = bitcast i32* %9 to %struct.btActionInterface** ; [#uses=1]
- %11 = load %struct.btActionInterface** %10, align 4 ; [#uses=3]
- %12 = icmp eq %struct.btActionInterface* %11, null ; [#uses=1]
- br i1 %12, label %bb8, label %bb5
-
-bb5: ; preds = %bb1
- %13 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 15 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %15 = icmp eq i32 %14, 2 ; [#uses=1]
- br i1 %15, label %bb8, label %bb7
-
-bb7: ; preds = %bb5
- %16 = getelementptr inbounds %struct.btActionInterface* %11, i32 0, i32 0 ; [#uses=1]
- %17 = load i32 (...)*** %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds i32 (...)** %17, i32 3 ; [#uses=1]
- %19 = load i32 (...)** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 1 ; [#uses=1]
- %21 = bitcast i32 (...)* %19 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- tail call void %21(%struct.btActionInterface* %11, %struct.btTransform* %20)
- br label %bb8
-
-bb8: ; preds = %bb7, %bb5, %bb1, %bb
- %22 = load i32* %0, align 4 ; [#uses=1]
- %23 = icmp sgt i32 %22, %tmp ; [#uses=1]
- br i1 %23, label %bb, label %return
-
-return: ; preds = %bb8, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld11updateAabbsEv(%struct.btSimpleDynamicsWorld* nocapture %this) align 2 {
-entry:
- %minAabb = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %maxAabb = alloca %struct.btQuadWord, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 5 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb18, %bb.nph
- %i.024 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb18 ] ; [#uses=2]
- %tmp = add i32 %i.024, 1 ; [#uses=2]
- %6 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %6, i32 %i.024 ; [#uses=1]
- %7 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=7]
- %8 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 19 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %.lobit.i = and i32 %9, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %10 = icmp eq %struct.btCollisionObject* %7, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %10 ; [#uses=1]
- br i1 %or.cond, label %bb18, label %bb1
-
-bb1: ; preds = %bb
- %11 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 15 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- switch i32 %12, label %bb5 [
- i32 2, label %bb18
- i32 5, label %bb18
- ]
-
-bb5: ; preds = %bb1
- %13 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 12 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %15 = and i32 %14, 1 ; [#uses=1]
- %toBool9not = icmp eq i32 %15, 0 ; [#uses=1]
- br i1 %toBool9not, label %bb17, label %bb18
-
-bb17: ; preds = %bb5
- %16 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 9 ; [#uses=1]
- %17 = load %struct.btCollisionShape** %16, align 4 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btCollisionShape* %17, i32 0, i32 0 ; [#uses=1]
- %19 = load i32 (...)*** %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i32 (...)** %19, i32 2 ; [#uses=1]
- %21 = load i32 (...)** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 1 ; [#uses=1]
- %23 = bitcast i32 (...)* %21 to void (%struct.btCollisionShape*, %struct.btTransform*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %23(%struct.btCollisionShape* %17, %struct.btTransform* %22, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb)
- %24 = load %struct.btActionInterface** %4, align 4 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btActionInterface* %24, i32 0, i32 0 ; [#uses=1]
- %26 = load i32 (...)*** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds i32 (...)** %26, i32 4 ; [#uses=1]
- %28 = load i32 (...)** %27, align 4 ; [#uses=1]
- %29 = load %struct.btActionInterface** %5, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btCollisionObject* %7, i32 0, i32 8 ; [#uses=1]
- %31 = load %struct.btBroadphaseProxy** %30, align 4 ; [#uses=1]
- %32 = bitcast i32 (...)* %28 to void (%struct.btActionInterface*, %struct.btBroadphaseProxy*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btActionInterface*)* ; [#uses=1]
- call void %32(%struct.btActionInterface* %24, %struct.btBroadphaseProxy* %31, %struct.btQuadWord* %minAabb, %struct.btQuadWord* %maxAabb, %struct.btActionInterface* %29)
- br label %bb18
-
-bb18: ; preds = %bb17, %bb5, %bb1, %bb1, %bb
- %33 = load i32* %0, align 4 ; [#uses=1]
- %34 = icmp sgt i32 %33, %tmp ; [#uses=1]
- br i1 %34, label %bb, label %return
-
-return: ; preds = %bb18, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld11clearForcesEv(%struct.btSimpleDynamicsWorld* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=2]
- %tmp = add i32 %i.05, 1 ; [#uses=2]
- %4 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %4, i32 %i.05 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 19 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %.lobit.i = and i32 %7, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %8 = icmp eq %struct.btCollisionObject* %5, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %8 ; [#uses=1]
- br i1 %or.cond, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %9 = getelementptr inbounds %struct.btCollisionObject* %5, i32 1, i32 4, i32 0, i32 0 ; [#uses=1]
- %10 = bitcast float* %9 to i8* ; [#uses=1]
- tail call void @llvm.memset.p0i8.i64(i8* %10, i8 0, i64 32, i32 4, i1 false) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %11 = load i32* %0, align 4 ; [#uses=1]
- %12 = icmp sgt i32 %11, %tmp ; [#uses=1]
- br i1 %12, label %bb, label %return
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld19setConstraintSolverEP18btConstraintSolver(%struct.btSimpleDynamicsWorld* nocapture %this, %struct.btActionInterface* %solver) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- %3 = load %struct.btActionInterface** %2, align 4 ; [#uses=1]
- %4 = bitcast %struct.btActionInterface* %3 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %4)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- store i8 0, i8* %0, align 4
- %5 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %solver, %struct.btActionInterface** %5, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf(%struct.btSimpleDynamicsWorld* nocapture %this, float %timeStep) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7, %bb.nph
- %i.013 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb7 ] ; [#uses=2]
- %tmp = add i32 %i.013, 1 ; [#uses=2]
- %4 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %4, i32 %i.013 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=6]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 19 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %.lobit.i = and i32 %7, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb7, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit: ; preds = %bb
- %8 = bitcast %struct.btCollisionObject* %5 to %struct.btRigidBody* ; [#uses=4]
- %9 = icmp eq %struct.btCollisionObject* %5, null ; [#uses=1]
- br i1 %9, label %bb7, label %bb1
-
-bb1: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %10 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 12 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = and i32 %11, 1 ; [#uses=1]
- %toBoolnot = icmp eq i32 %12, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb4, label %bb7
-
-bb4: ; preds = %bb1
- %13 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 15 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- switch i32 %14, label %bb6 [
- i32 2, label %bb7
- i32 5, label %bb7
- ]
-
-bb6: ; preds = %bb4
- tail call void @_ZN11btRigidBody12applyGravityEv(%struct.btRigidBody* %8)
- tail call void @_ZN11btRigidBody19integrateVelocitiesEf(%struct.btRigidBody* %8, float %timeStep)
- tail call void @_ZN11btRigidBody12applyDampingEf(%struct.btRigidBody* %8, float %timeStep)
- %15 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 2 ; [#uses=1]
- tail call void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %8, float %timeStep, %struct.btTransform* %15)
- br label %bb7
-
-bb7: ; preds = %bb6, %bb4, %bb4, %bb1, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit, %bb
- %16 = load i32* %0, align 4 ; [#uses=1]
- %17 = icmp sgt i32 %16, %tmp ; [#uses=1]
- br i1 %17, label %bb, label %return
-
-return: ; preds = %bb7, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btSimpleDynamicsWorld19integrateTransformsEf(%struct.btSimpleDynamicsWorld* nocapture %this, float %timeStep) align 2 {
-entry:
- %predictedTrans = alloca %struct.btTransform, align 8 ; [#uses=2]
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb18, %bb.nph
- %i.024 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb18 ] ; [#uses=2]
- %tmp = add i32 %i.024, 1 ; [#uses=2]
- %4 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %4, i32 %i.024 ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=5]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 19 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %.lobit.i = and i32 %7, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb18, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit: ; preds = %bb
- %8 = bitcast %struct.btCollisionObject* %5 to %struct.btRigidBody* ; [#uses=2]
- %9 = icmp eq %struct.btCollisionObject* %5, null ; [#uses=1]
- br i1 %9, label %bb18, label %bb1
-
-bb1: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit
- %10 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 15 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- switch i32 %11, label %bb5 [
- i32 2, label %bb18
- i32 5, label %bb18
- ]
-
-bb5: ; preds = %bb1
- %12 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 12 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = and i32 %13, 1 ; [#uses=1]
- %toBool9not = icmp eq i32 %14, 0 ; [#uses=1]
- br i1 %toBool9not, label %bb17, label %bb18
-
-bb17: ; preds = %bb5
- call void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %8, float %timeStep, %struct.btTransform* %predictedTrans)
- call void @_ZN11btRigidBody18proceedToTransformERK11btTransform(%struct.btRigidBody* %8, %struct.btTransform* %predictedTrans)
- br label %bb18
-
-bb18: ; preds = %bb17, %bb5, %bb1, %bb1, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit, %bb
- %15 = load i32* %0, align 4 ; [#uses=1]
- %16 = icmp sgt i32 %15, %tmp ; [#uses=1]
- br i1 %16, label %bb, label %return
-
-return: ; preds = %bb18, %entry
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN21btSimpleDynamicsWorld14stepSimulationEfif(%struct.btSimpleDynamicsWorld* %this, float %timeStep, i32 %maxSubSteps, float %fixedTimeStep) align 2 {
-entry:
- %predictedTrans.i = alloca %struct.btTransform, align 8 ; [#uses=2]
- %infoGlobal = alloca %struct.btContactSolverInfo, align 8 ; [#uses=20]
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=4]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph.i, label %_ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf.exit
-
-bb.nph.i: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb7.i, %bb.nph.i
- %i.013.i = phi i32 [ 0, %bb.nph.i ], [ %tmp.i, %bb7.i ] ; [#uses=2]
- %tmp.i = add i32 %i.013.i, 1 ; [#uses=2]
- %4 = load %struct.btCollisionObject*** %3, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btCollisionObject** %4, i32 %i.013.i ; [#uses=1]
- %5 = load %struct.btCollisionObject** %scevgep.i, align 4 ; [#uses=6]
- %6 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 19 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %.lobit.i.i = and i32 %7, 2 ; [#uses=1]
- %toBool.i.i = icmp eq i32 %.lobit.i.i, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb7.i, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i: ; preds = %bb.i
- %8 = bitcast %struct.btCollisionObject* %5 to %struct.btRigidBody* ; [#uses=4]
- %9 = icmp eq %struct.btCollisionObject* %5, null ; [#uses=1]
- br i1 %9, label %bb7.i, label %bb1.i
-
-bb1.i: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i
- %10 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 12 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = and i32 %11, 1 ; [#uses=1]
- %toBoolnot.i = icmp eq i32 %12, 0 ; [#uses=1]
- br i1 %toBoolnot.i, label %bb4.i, label %bb7.i
-
-bb4.i: ; preds = %bb1.i
- %13 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 15 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- switch i32 %14, label %bb6.i [
- i32 2, label %bb7.i
- i32 5, label %bb7.i
- ]
-
-bb6.i: ; preds = %bb4.i
- call void @_ZN11btRigidBody12applyGravityEv(%struct.btRigidBody* %8)
- call void @_ZN11btRigidBody19integrateVelocitiesEf(%struct.btRigidBody* %8, float %timeStep)
- call void @_ZN11btRigidBody12applyDampingEf(%struct.btRigidBody* %8, float %timeStep)
- %15 = getelementptr inbounds %struct.btCollisionObject* %5, i32 0, i32 2 ; [#uses=1]
- call void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %8, float %timeStep, %struct.btTransform* %15)
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb4.i, %bb4.i, %bb1.i, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i, %bb.i
- %16 = load i32* %0, align 4 ; [#uses=1]
- %17 = icmp sgt i32 %16, %tmp.i ; [#uses=1]
- br i1 %17, label %bb.i, label %_ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf.exit
-
-_ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf.exit: ; preds = %bb7.i, %entry
- %18 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 3, i32 0 ; [#uses=1]
- store float %timeStep, float* %18, align 4
- %19 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=5]
- %21 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds i32 (...)** %21, i32 4 ; [#uses=1]
- %23 = load i32 (...)** %22, align 4 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- %25 = bitcast i32 (...)* %23 to %struct.btActionInterface* (%struct.btCollisionWorld*)* ; [#uses=1]
- %26 = call %struct.btActionInterface* %25(%struct.btCollisionWorld* %24) ; [#uses=1]
- %27 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 3, i32 5 ; [#uses=1]
- store %struct.btActionInterface* %26, %struct.btActionInterface** %27, align 4
- %28 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %29 = getelementptr inbounds i32 (...)** %28, i32 10 ; [#uses=1]
- %30 = load i32 (...)** %29, align 4 ; [#uses=1]
- %31 = bitcast i32 (...)* %30 to void (%struct.btCollisionWorld*)* ; [#uses=1]
- call void %31(%struct.btCollisionWorld* %24)
- %32 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 2 ; [#uses=3]
- %33 = load %struct.btActionInterface** %32, align 4 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btActionInterface* %33, i32 0, i32 0 ; [#uses=1]
- %35 = load i32 (...)*** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds i32 (...)** %35, i32 9 ; [#uses=1]
- %37 = load i32 (...)** %36, align 4 ; [#uses=1]
- %38 = bitcast i32 (...)* %37 to i32 (%struct.btActionInterface*)* ; [#uses=1]
- %39 = call i32 %38(%struct.btActionInterface* %33) ; [#uses=3]
- %40 = icmp eq i32 %39, 0 ; [#uses=1]
- br i1 %40, label %bb1, label %bb
-
-bb: ; preds = %_ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf.exit
- %41 = load %struct.btActionInterface** %32, align 4 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btActionInterface* %41, i32 0, i32 0 ; [#uses=1]
- %43 = load i32 (...)*** %42, align 4 ; [#uses=1]
- %44 = getelementptr inbounds i32 (...)** %43, i32 11 ; [#uses=1]
- %45 = load i32 (...)** %44, align 4 ; [#uses=1]
- %46 = bitcast %struct.btActionInterface* %41 to %struct.btCollisionDispatcher* ; [#uses=1]
- %47 = bitcast i32 (...)* %45 to %struct.btPersistentManifold** (%struct.btCollisionDispatcher*)* ; [#uses=1]
- %48 = call %struct.btPersistentManifold** %47(%struct.btCollisionDispatcher* %46) ; [#uses=1]
- %49 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0x3FE3333340000000, float* %49, align 8
- %50 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %50, align 4
- %51 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0x3FD3333340000000, float* %51, align 8
- %52 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 8
- %53 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 6 ; [#uses=1]
- store float 2.000000e+01, float* %53, align 8
- %54 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 5 ; [#uses=1]
- store i32 10, i32* %54, align 4
- %55 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 8 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %55, align 8
- %56 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 9 ; [#uses=1]
- store float 0x3FB99999A0000000, float* %56, align 4
- %57 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 10 ; [#uses=1]
- store float 0.000000e+00, float* %57, align 8
- %58 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 7 ; [#uses=1]
- store float 1.000000e+00, float* %58, align 4
- %59 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %59, align 4
- %60 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 12 ; [#uses=1]
- store float 0xBF947AE140000000, float* %60, align 8
- %61 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %61, align 4
- %62 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 14 ; [#uses=1]
- store float 0x3FEB333340000000, float* %62, align 8
- %63 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 15 ; [#uses=1]
- store i32 260, i32* %63, align 4
- %64 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 16 ; [#uses=1]
- store i32 2, i32* %64, align 8
- %65 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 17 ; [#uses=1]
- store i32 128, i32* %65, align 4
- %66 = getelementptr inbounds %struct.btContactSolverInfo* %infoGlobal, i32 0, i32 0, i32 3 ; [#uses=1]
- store float %timeStep, float* %66, align 4
- %67 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=3]
- %68 = load %struct.btActionInterface** %67, align 4 ; [#uses=2]
- %69 = getelementptr inbounds %struct.btActionInterface* %68, i32 0, i32 0 ; [#uses=1]
- %70 = load i32 (...)*** %69, align 4 ; [#uses=1]
- %71 = getelementptr inbounds i32 (...)** %70, i32 2 ; [#uses=1]
- %72 = load i32 (...)** %71, align 4 ; [#uses=1]
- %73 = bitcast i32 (...)* %72 to void (%struct.btActionInterface*, i32, i32)* ; [#uses=1]
- call void %73(%struct.btActionInterface* %68, i32 0, i32 %39)
- %74 = load %struct.btActionInterface** %67, align 4 ; [#uses=2]
- %75 = getelementptr inbounds %struct.btActionInterface* %74, i32 0, i32 0 ; [#uses=1]
- %76 = load i32 (...)*** %75, align 4 ; [#uses=1]
- %77 = getelementptr inbounds i32 (...)** %76, i32 3 ; [#uses=1]
- %78 = load i32 (...)** %77, align 4 ; [#uses=1]
- %79 = load %struct.btActionInterface** %32, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 4 ; [#uses=2]
- %81 = load %struct.btStackAlloc** %80, align 4 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 6 ; [#uses=2]
- %83 = load %struct.btActionInterface** %82, align 4 ; [#uses=1]
- %84 = bitcast i32 (...)* %78 to float (%struct.btActionInterface*, %struct.btCollisionObject**, i32, %struct.btPersistentManifold**, i32, %struct.btTypedConstraint**, i32, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*, %struct.btActionInterface*)* ; [#uses=1]
- %85 = call float %84(%struct.btActionInterface* %74, %struct.btCollisionObject** null, i32 0, %struct.btPersistentManifold** %48, i32 %39, %struct.btTypedConstraint** null, i32 0, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %83, %struct.btStackAlloc* %81, %struct.btActionInterface* %79) ; [#uses=0]
- %86 = load %struct.btActionInterface** %67, align 4 ; [#uses=2]
- %87 = getelementptr inbounds %struct.btActionInterface* %86, i32 0, i32 0 ; [#uses=1]
- %88 = load i32 (...)*** %87, align 4 ; [#uses=1]
- %89 = getelementptr inbounds i32 (...)** %88, i32 4 ; [#uses=1]
- %90 = load i32 (...)** %89, align 4 ; [#uses=1]
- %91 = load %struct.btStackAlloc** %80, align 4 ; [#uses=1]
- %92 = load %struct.btActionInterface** %82, align 4 ; [#uses=1]
- %93 = bitcast i32 (...)* %90 to void (%struct.btActionInterface*, %struct.btContactSolverInfo*, %struct.btActionInterface*, %struct.btStackAlloc*)* ; [#uses=1]
- call void %93(%struct.btActionInterface* %86, %struct.btContactSolverInfo* %infoGlobal, %struct.btActionInterface* %92, %struct.btStackAlloc* %91)
- br label %bb1
-
-bb1: ; preds = %bb, %_ZN21btSimpleDynamicsWorld25predictUnconstraintMotionEf.exit
- %94 = load i32* %0, align 4 ; [#uses=1]
- %95 = icmp sgt i32 %94, 0 ; [#uses=1]
- br i1 %95, label %bb.nph.i3, label %_ZN21btSimpleDynamicsWorld19integrateTransformsEf.exit
-
-bb.nph.i3: ; preds = %bb1
- %96 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb.i8
-
-bb.i8: ; preds = %bb18.i, %bb.nph.i3
- %i.024.i = phi i32 [ 0, %bb.nph.i3 ], [ %tmp.i4, %bb18.i ] ; [#uses=2]
- %tmp.i4 = add i32 %i.024.i, 1 ; [#uses=2]
- %97 = load %struct.btCollisionObject*** %96, align 4 ; [#uses=1]
- %scevgep.i5 = getelementptr %struct.btCollisionObject** %97, i32 %i.024.i ; [#uses=1]
- %98 = load %struct.btCollisionObject** %scevgep.i5, align 4 ; [#uses=5]
- %99 = getelementptr inbounds %struct.btCollisionObject* %98, i32 0, i32 19 ; [#uses=1]
- %100 = load i32* %99, align 4 ; [#uses=1]
- %.lobit.i.i6 = and i32 %100, 2 ; [#uses=1]
- %toBool.i.i7 = icmp eq i32 %.lobit.i.i6, 0 ; [#uses=1]
- br i1 %toBool.i.i7, label %bb18.i, label %_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i9
-
-_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i9: ; preds = %bb.i8
- %101 = bitcast %struct.btCollisionObject* %98 to %struct.btRigidBody* ; [#uses=2]
- %102 = icmp eq %struct.btCollisionObject* %98, null ; [#uses=1]
- br i1 %102, label %bb18.i, label %bb1.i10
-
-bb1.i10: ; preds = %_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i9
- %103 = getelementptr inbounds %struct.btCollisionObject* %98, i32 0, i32 15 ; [#uses=1]
- %104 = load i32* %103, align 4 ; [#uses=1]
- switch i32 %104, label %bb5.i [
- i32 2, label %bb18.i
- i32 5, label %bb18.i
- ]
-
-bb5.i: ; preds = %bb1.i10
- %105 = getelementptr inbounds %struct.btCollisionObject* %98, i32 0, i32 12 ; [#uses=1]
- %106 = load i32* %105, align 4 ; [#uses=1]
- %107 = and i32 %106, 1 ; [#uses=1]
- %toBool9not.i = icmp eq i32 %107, 0 ; [#uses=1]
- br i1 %toBool9not.i, label %bb17.i, label %bb18.i
-
-bb17.i: ; preds = %bb5.i
- call void @_ZN11btRigidBody26predictIntegratedTransformEfR11btTransform(%struct.btRigidBody* %101, float %timeStep, %struct.btTransform* %predictedTrans.i)
- call void @_ZN11btRigidBody18proceedToTransformERK11btTransform(%struct.btRigidBody* %101, %struct.btTransform* %predictedTrans.i)
- br label %bb18.i
-
-bb18.i: ; preds = %bb17.i, %bb5.i, %bb1.i10, %bb1.i10, %_ZN11btRigidBody6upcastEP17btCollisionObject.exit.i9, %bb.i8
- %108 = load i32* %0, align 4 ; [#uses=1]
- %109 = icmp sgt i32 %108, %tmp.i4 ; [#uses=1]
- br i1 %109, label %bb.i8, label %_ZN21btSimpleDynamicsWorld19integrateTransformsEf.exit
-
-_ZN21btSimpleDynamicsWorld19integrateTransformsEf.exit: ; preds = %bb18.i, %bb1
- %110 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %111 = getelementptr inbounds i32 (...)** %110, i32 2 ; [#uses=1]
- %112 = load i32 (...)** %111, align 4 ; [#uses=1]
- %113 = bitcast i32 (...)* %112 to void (%struct.btSimpleDynamicsWorld*)* ; [#uses=1]
- call void %113(%struct.btSimpleDynamicsWorld* %this)
- %114 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %115 = getelementptr inbounds i32 (...)** %114, i32 19 ; [#uses=1]
- %116 = load i32 (...)** %115, align 4 ; [#uses=1]
- %117 = bitcast i32 (...)* %116 to void (%struct.btSimpleDynamicsWorld*)* ; [#uses=1]
- call void %117(%struct.btSimpleDynamicsWorld* %this)
- %118 = load i32 (...)*** %20, align 4 ; [#uses=1]
- %119 = getelementptr inbounds i32 (...)** %118, i32 28 ; [#uses=1]
- %120 = load i32 (...)** %119, align 4 ; [#uses=1]
- %121 = bitcast i32 (...)* %120 to void (%struct.btSimpleDynamicsWorld*)* ; [#uses=1]
- call void %121(%struct.btSimpleDynamicsWorld* %this)
- ret i32 1
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld12addRigidBodyEP11btRigidBody(%struct.btSimpleDynamicsWorld* %this, %struct.btRigidBody* %body) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3 ; [#uses=1]
- tail call void @_ZN11btRigidBody10setGravityERK9btVector3(%struct.btRigidBody* %body, %struct.btQuadWord* %0)
- %1 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0, i32 9 ; [#uses=1]
- %2 = load %struct.btCollisionShape** %1, align 4 ; [#uses=1]
- %3 = icmp eq %struct.btCollisionShape* %2, null ; [#uses=1]
- br i1 %3, label %return, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 8 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = bitcast i32 (...)* %7 to void (%struct.btCollisionWorld*, %struct.btCollisionObject*, i16, i16)* ; [#uses=1]
- tail call void %10(%struct.btCollisionWorld* %9, %struct.btCollisionObject* %8, i16 signext 1, i16 signext -1)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld10setGravityERK9btVector3(%struct.btSimpleDynamicsWorld* nocapture %this, %struct.btQuadWord* %gravity) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %0, align 4
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- store float %5, float* %3, align 4
- %6 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %gravity, i32 0, i32 0, i32 3 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 1 ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = icmp sgt i32 %13, 0 ; [#uses=1]
- br i1 %14, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %15 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb2, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb2 ] ; [#uses=2]
- %tmp = add i32 %i.05, 1 ; [#uses=2]
- %16 = load %struct.btCollisionObject*** %15, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btCollisionObject** %16, i32 %i.05 ; [#uses=1]
- %17 = load %struct.btCollisionObject** %scevgep, align 4 ; [#uses=3]
- %18 = getelementptr inbounds %struct.btCollisionObject* %17, i32 0, i32 19 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %.lobit.i = and i32 %19, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %20 = icmp eq %struct.btCollisionObject* %17, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %20 ; [#uses=1]
- br i1 %or.cond, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %21 = bitcast %struct.btCollisionObject* %17 to %struct.btRigidBody* ; [#uses=1]
- tail call void @_ZN11btRigidBody10setGravityERK9btVector3(%struct.btRigidBody* %21, %struct.btQuadWord* %gravity)
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %22 = load i32* %12, align 4 ; [#uses=1]
- %23 = icmp sgt i32 %22, %tmp ; [#uses=1]
- br i1 %23, label %bb, label %return
-
-return: ; preds = %bb2, %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld21removeCollisionObjectEP17btCollisionObject(%struct.btSimpleDynamicsWorld* %this, %struct.btCollisionObject* %collisionObject) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btCollisionObject* %collisionObject, i32 0, i32 19 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %.lobit.i = and i32 %1, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- %2 = icmp eq %struct.btCollisionObject* %collisionObject, null ; [#uses=1]
- %or.cond = or i1 %toBool.i, %2 ; [#uses=1]
- br i1 %or.cond, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = bitcast %struct.btCollisionObject* %collisionObject to %struct.btRigidBody* ; [#uses=1]
- %4 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32 (...)*** %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds i32 (...)** %5, i32 21 ; [#uses=1]
- %7 = load i32 (...)** %6, align 4 ; [#uses=1]
- %8 = bitcast i32 (...)* %7 to void (%struct.btSimpleDynamicsWorld*, %struct.btRigidBody*)* ; [#uses=1]
- tail call void %8(%struct.btSimpleDynamicsWorld* %this, %struct.btRigidBody* %3)
- ret void
-
-bb1: ; preds = %entry
- %9 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld21removeCollisionObjectEP17btCollisionObject(%struct.btCollisionWorld* %9, %struct.btCollisionObject* %collisionObject)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorld15removeRigidBodyEP11btRigidBody(%struct.btSimpleDynamicsWorld* %this, %struct.btRigidBody* %body) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %body, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorld21removeCollisionObjectEP17btCollisionObject(%struct.btCollisionWorld* %1, %struct.btCollisionObject* %0)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorldD0Ev(%struct.btSimpleDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV21btSimpleDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 2 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btActionInterface* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %bb, %entry
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %6 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %6)
- %7 = bitcast %struct.btSimpleDynamicsWorld* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %7) nounwind
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %8 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %8)
- to label %invcont2 unwind label %lpad11
-
-lpad11: ; preds = %lpad
- %eh_ptr12 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN21btSimpleDynamicsWorldD1Ev(%struct.btSimpleDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV21btSimpleDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 2 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btActionInterface* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %bb, %entry
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %6 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %6)
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %7 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %7)
- to label %invcont2 unwind label %lpad11
-
-lpad11: ; preds = %lpad
- %eh_ptr12 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN21btSimpleDynamicsWorldD2Ev(%struct.btSimpleDynamicsWorld* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV21btSimpleDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 2 ; [#uses=1]
- %2 = load i8* %1, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- %4 = load %struct.btActionInterface** %3, align 4 ; [#uses=1]
- %5 = bitcast %struct.btActionInterface* %4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %5)
- to label %bb4 unwind label %lpad
-
-invcont2: ; preds = %lpad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-
-bb4: ; preds = %bb, %entry
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %6 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %6)
- ret void
-
-lpad: ; preds = %bb
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select10 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV15btDynamicsWorld, i32 0, i32 2), i32 (...)*** %0, align 4
- %7 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN16btCollisionWorldD2Ev(%struct.btCollisionWorld* %7)
- to label %invcont2 unwind label %lpad11
-
-lpad11: ; preds = %lpad
- %eh_ptr12 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select14 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr12, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define void @_ZN21btSimpleDynamicsWorldC1EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btSimpleDynamicsWorld* %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldC2EP12btDispatcherP21btBroadphaseInterfaceP24btCollisionConfiguration(%struct.btCollisionWorld* %0, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %collisionConfiguration)
- %1 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store void (%struct.btDynamicsWorld*, float)* null, void (%struct.btDynamicsWorld*, float)** %2, align 4
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store void (%struct.btDynamicsWorld*, float)* null, void (%struct.btDynamicsWorld*, float)** %3, align 4
- %4 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store i8* null, i8** %4, align 4
- %5 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float 0x3FE3333340000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float 0x3FD3333340000000, float* %7, align 4
- %8 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 6 ; [#uses=1]
- store float 2.000000e+01, float* %9, align 4
- %10 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 5 ; [#uses=1]
- store i32 10, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 8 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %11, align 4
- %12 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 9 ; [#uses=1]
- store float 0x3FB99999A0000000, float* %12, align 4
- %13 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 10 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 7 ; [#uses=1]
- store float 1.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 12 ; [#uses=1]
- store float 0xBF947AE140000000, float* %16, align 4
- %17 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 14 ; [#uses=1]
- store float 0x3FEB333340000000, float* %18, align 4
- %19 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 15 ; [#uses=1]
- store i32 260, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 16 ; [#uses=1]
- store i32 2, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 17 ; [#uses=1]
- store i32 128, i32* %21, align 4
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV21btSimpleDynamicsWorld, i32 0, i32 2), i32 (...)*** %1, align 4
- %22 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %constraintSolver, %struct.btActionInterface** %22, align 4
- %23 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 2 ; [#uses=1]
- store i8 0, i8* %23, align 4
- %24 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+01, float* %26, align 4
- %27 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN21btSimpleDynamicsWorldC2EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btSimpleDynamicsWorld* %this, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %constraintSolver, %struct.btActionInterface* %collisionConfiguration) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- tail call void @_ZN16btCollisionWorldC2EP12btDispatcherP21btBroadphaseInterfaceP24btCollisionConfiguration(%struct.btCollisionWorld* %0, %struct.btActionInterface* %dispatcher, %struct.btActionInterface* %pairCache, %struct.btActionInterface* %collisionConfiguration)
- %1 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store void (%struct.btDynamicsWorld*, float)* null, void (%struct.btDynamicsWorld*, float)** %2, align 4
- %3 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store void (%struct.btDynamicsWorld*, float)* null, void (%struct.btDynamicsWorld*, float)** %3, align 4
- %4 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- store i8* null, i8** %4, align 4
- %5 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float 0x3FE3333340000000, float* %5, align 4
- %6 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float 0x3FD3333340000000, float* %7, align 4
- %8 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 4 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 6 ; [#uses=1]
- store float 2.000000e+01, float* %9, align 4
- %10 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 5 ; [#uses=1]
- store i32 10, i32* %10, align 4
- %11 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 8 ; [#uses=1]
- store float 0x3FC99999A0000000, float* %11, align 4
- %12 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 9 ; [#uses=1]
- store float 0x3FB99999A0000000, float* %12, align 4
- %13 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 10 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 4
- %14 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 7 ; [#uses=1]
- store float 1.000000e+00, float* %14, align 4
- %15 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 11 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 12 ; [#uses=1]
- store float 0xBF947AE140000000, float* %16, align 4
- %17 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- %18 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 14 ; [#uses=1]
- store float 0x3FEB333340000000, float* %18, align 4
- %19 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 15 ; [#uses=1]
- store i32 260, i32* %19, align 4
- %20 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 16 ; [#uses=1]
- store i32 2, i32* %20, align 4
- %21 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 0, i32 4, i32 0, i32 17 ; [#uses=1]
- store i32 128, i32* %21, align 4
- store i32 (...)** getelementptr inbounds ([35 x i32 (...)*]* @_ZTV21btSimpleDynamicsWorld, i32 0, i32 2), i32 (...)*** %1, align 4
- %22 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* %constraintSolver, %struct.btActionInterface** %22, align 4
- %23 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 2 ; [#uses=1]
- store i8 0, i8* %23, align 4
- %24 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float -1.000000e+01, float* %26, align 4
- %27 = getelementptr inbounds %struct.btSimpleDynamicsWorld* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- ret void
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewBulletSdk() {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 32, i32 16) ; [#uses=10]
- %1 = icmp eq i8* %0, null ; [#uses=1]
- br i1 %1, label %bb2, label %bb
-
-bb: ; preds = %entry
- %2 = bitcast i8* %0 to float* ; [#uses=1]
- store float -1.000000e+03, float* %2, align 4
- %3 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %4 = bitcast i8* %3 to float* ; [#uses=1]
- store float -1.000000e+03, float* %4, align 4
- %5 = getelementptr inbounds i8* %0, i32 8 ; [#uses=1]
- %6 = bitcast i8* %5 to float* ; [#uses=1]
- store float -1.000000e+03, float* %6, align 4
- %7 = getelementptr inbounds i8* %0, i32 12 ; [#uses=1]
- %8 = bitcast i8* %7 to float* ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds i8* %0, i32 16 ; [#uses=1]
- %10 = bitcast i8* %9 to float* ; [#uses=1]
- store float 1.000000e+03, float* %10, align 4
- %11 = getelementptr inbounds i8* %0, i32 20 ; [#uses=1]
- %12 = bitcast i8* %11 to float* ; [#uses=1]
- store float 1.000000e+03, float* %12, align 4
- %13 = getelementptr inbounds i8* %0, i32 24 ; [#uses=1]
- %14 = bitcast i8* %13 to float* ; [#uses=1]
- store float 1.000000e+03, float* %14, align 4
- %15 = getelementptr inbounds i8* %0, i32 28 ; [#uses=1]
- %16 = bitcast i8* %15 to float* ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %iftmp.454.0 = bitcast i8* %0 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %iftmp.454.0
-}
-
-; [#uses=0]
-define void @plStepSimulation(%struct.btHashInt* %world, float %timeStep) {
-entry:
- %0 = bitcast %struct.btHashInt* %world to %struct.btDynamicsWorld* ; [#uses=1]
- %1 = bitcast %struct.btHashInt* %world to i32 (...)*** ; [#uses=1]
- %2 = load i32 (...)*** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds i32 (...)** %2, i32 12 ; [#uses=1]
- %4 = load i32 (...)** %3, align 4 ; [#uses=1]
- %5 = bitcast i32 (...)* %4 to i32 (%struct.btDynamicsWorld*, float, i32, float)* ; [#uses=1]
- %6 = tail call i32 %5(%struct.btDynamicsWorld* %0, float %timeStep, i32 1, float 0x3F91111120000000) ; [#uses=0]
- ret void
-}
-
-; [#uses=0]
-define void @plAddRigidBody(%struct.btHashInt* %world, %struct.btHashInt* %object) {
-entry:
- %0 = bitcast %struct.btHashInt* %world to %struct.btDynamicsWorld* ; [#uses=1]
- %1 = bitcast %struct.btHashInt* %object to %struct.btRigidBody* ; [#uses=1]
- %2 = bitcast %struct.btHashInt* %world to i32 (...)*** ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 20 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btDynamicsWorld*, %struct.btRigidBody*)* ; [#uses=1]
- tail call void %6(%struct.btDynamicsWorld* %0, %struct.btRigidBody* %1)
- ret void
-}
-
-; [#uses=0]
-define void @plRemoveRigidBody(%struct.btHashInt* %world, %struct.btHashInt* %object) {
-entry:
- %0 = bitcast %struct.btHashInt* %world to %struct.btDynamicsWorld* ; [#uses=1]
- %1 = bitcast %struct.btHashInt* %object to %struct.btRigidBody* ; [#uses=1]
- %2 = bitcast %struct.btHashInt* %world to i32 (...)*** ; [#uses=1]
- %3 = load i32 (...)*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32 (...)** %3, i32 21 ; [#uses=1]
- %5 = load i32 (...)** %4, align 4 ; [#uses=1]
- %6 = bitcast i32 (...)* %5 to void (%struct.btDynamicsWorld*, %struct.btRigidBody*)* ; [#uses=1]
- tail call void %6(%struct.btDynamicsWorld* %0, %struct.btRigidBody* %1)
- ret void
-}
-
-; [#uses=0]
-define noalias %struct.btHashInt* @plNewMeshInterface() nounwind readnone {
-entry:
- ret %struct.btHashInt* null
-}
-
-; [#uses=0]
-define void @plSetScaling(%struct.btHashInt* %cshape, float* nocapture %cscaling) {
-entry:
- %scaling = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = bitcast %struct.btHashInt* %cshape to %struct.btCollisionShape* ; [#uses=1]
- %1 = getelementptr inbounds float* %cscaling, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds float* %cscaling, i32 1 ; [#uses=1]
- %3 = load float* %cscaling, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %3, float* %4, align 8
- %5 = load float* %2, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %5, float* %6, align 4
- %7 = load float* %1, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %7, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %scaling, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- %10 = bitcast %struct.btHashInt* %cshape to i32 (...)*** ; [#uses=1]
- %11 = load i32 (...)*** %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds i32 (...)** %11, i32 6 ; [#uses=1]
- %13 = load i32 (...)** %12, align 4 ; [#uses=1]
- %14 = bitcast i32 (...)* %13 to void (%struct.btCollisionShape*, %struct.btQuadWord*)* ; [#uses=1]
- call void %14(%struct.btCollisionShape* %0, %struct.btQuadWord* %scaling)
- ret void
-}
-
-; [#uses=0]
-define void @plSetPosition(%struct.btHashInt* nocapture %object, float* nocapture %position) nounwind {
-entry:
- %0 = getelementptr inbounds float* %position, i32 2 ; [#uses=1]
- %1 = getelementptr inbounds float* %position, i32 1 ; [#uses=1]
- %2 = load float* %position, align 4 ; [#uses=1]
- %3 = load float* %1, align 4 ; [#uses=1]
- %4 = load float* %0, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btHashInt* %object, i32 13 ; [#uses=1]
- %6 = bitcast %struct.btHashInt* %5 to float* ; [#uses=1]
- store float %2, float* %6, align 4
- %7 = getelementptr inbounds %struct.btHashInt* %object, i32 14 ; [#uses=1]
- %8 = bitcast %struct.btHashInt* %7 to float* ; [#uses=1]
- store float %3, float* %8, align 4
- %9 = getelementptr inbounds %struct.btHashInt* %object, i32 15 ; [#uses=1]
- %10 = bitcast %struct.btHashInt* %9 to float* ; [#uses=1]
- store float %4, float* %10, align 4
- %11 = getelementptr inbounds %struct.btHashInt* %object, i32 16 ; [#uses=1]
- %12 = bitcast %struct.btHashInt* %11 to float* ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- ret void
-}
-
-; [#uses=0]
-define void @plSetOrientation(%struct.btHashInt* nocapture %object, float* nocapture %orientation) nounwind {
-entry:
- %0 = getelementptr inbounds float* %orientation, i32 3 ; [#uses=1]
- %1 = getelementptr inbounds float* %orientation, i32 2 ; [#uses=1]
- %2 = getelementptr inbounds float* %orientation, i32 1 ; [#uses=1]
- %3 = load float* %orientation, align 4 ; [#uses=6]
- %4 = load float* %2, align 4 ; [#uses=5]
- %5 = load float* %1, align 4 ; [#uses=4]
- %6 = load float* %0, align 4 ; [#uses=5]
- %7 = fmul float %3, %3 ; [#uses=1]
- %8 = fmul float %4, %4 ; [#uses=1]
- %9 = fadd float %7, %8 ; [#uses=1]
- %10 = fmul float %5, %5 ; [#uses=1]
- %11 = fadd float %9, %10 ; [#uses=1]
- %12 = fmul float %6, %6 ; [#uses=1]
- %13 = fadd float %11, %12 ; [#uses=1]
- %14 = fdiv float 2.000000e+00, %13 ; [#uses=3]
- %15 = fmul float %3, %14 ; [#uses=2]
- %16 = fmul float %4, %14 ; [#uses=3]
- %17 = fmul float %5, %14 ; [#uses=4]
- %18 = fmul float %6, %15 ; [#uses=2]
- %19 = fmul float %6, %16 ; [#uses=2]
- %20 = fmul float %6, %17 ; [#uses=2]
- %21 = fmul float %3, %15 ; [#uses=2]
- %22 = fmul float %3, %16 ; [#uses=2]
- %23 = fmul float %3, %17 ; [#uses=2]
- %24 = fmul float %4, %16 ; [#uses=2]
- %25 = fmul float %4, %17 ; [#uses=2]
- %26 = fmul float %5, %17 ; [#uses=2]
- %27 = fadd float %21, %24 ; [#uses=1]
- %28 = fsub float 1.000000e+00, %27 ; [#uses=1]
- %29 = fadd float %25, %18 ; [#uses=1]
- %30 = fsub float %23, %19 ; [#uses=1]
- %31 = fsub float %25, %18 ; [#uses=1]
- %32 = fadd float %21, %26 ; [#uses=1]
- %33 = fsub float 1.000000e+00, %32 ; [#uses=1]
- %34 = fadd float %22, %20 ; [#uses=1]
- %35 = fadd float %23, %19 ; [#uses=1]
- %36 = fsub float %22, %20 ; [#uses=1]
- %37 = fadd float %24, %26 ; [#uses=1]
- %38 = fsub float 1.000000e+00, %37 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btHashInt* %object, i32 1 ; [#uses=1]
- %40 = bitcast %struct.btHashInt* %39 to float* ; [#uses=1]
- store float %38, float* %40, align 4
- %41 = getelementptr inbounds %struct.btHashInt* %object, i32 2 ; [#uses=1]
- %42 = bitcast %struct.btHashInt* %41 to float* ; [#uses=1]
- store float %36, float* %42, align 4
- %43 = getelementptr inbounds %struct.btHashInt* %object, i32 3 ; [#uses=1]
- %44 = bitcast %struct.btHashInt* %43 to float* ; [#uses=1]
- store float %35, float* %44, align 4
- %45 = getelementptr inbounds %struct.btHashInt* %object, i32 4 ; [#uses=1]
- %46 = bitcast %struct.btHashInt* %45 to float* ; [#uses=1]
- store float 0.000000e+00, float* %46, align 4
- %47 = getelementptr inbounds %struct.btHashInt* %object, i32 5 ; [#uses=1]
- %48 = bitcast %struct.btHashInt* %47 to float* ; [#uses=1]
- store float %34, float* %48, align 4
- %49 = getelementptr inbounds %struct.btHashInt* %object, i32 6 ; [#uses=1]
- %50 = bitcast %struct.btHashInt* %49 to float* ; [#uses=1]
- store float %33, float* %50, align 4
- %51 = getelementptr inbounds %struct.btHashInt* %object, i32 7 ; [#uses=1]
- %52 = bitcast %struct.btHashInt* %51 to float* ; [#uses=1]
- store float %31, float* %52, align 4
- %53 = getelementptr inbounds %struct.btHashInt* %object, i32 8 ; [#uses=1]
- %54 = bitcast %struct.btHashInt* %53 to float* ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds %struct.btHashInt* %object, i32 9 ; [#uses=1]
- %56 = bitcast %struct.btHashInt* %55 to float* ; [#uses=1]
- store float %30, float* %56, align 4
- %57 = getelementptr inbounds %struct.btHashInt* %object, i32 10 ; [#uses=1]
- %58 = bitcast %struct.btHashInt* %57 to float* ; [#uses=1]
- store float %29, float* %58, align 4
- %59 = getelementptr inbounds %struct.btHashInt* %object, i32 11 ; [#uses=1]
- %60 = bitcast %struct.btHashInt* %59 to float* ; [#uses=1]
- store float %28, float* %60, align 4
- %61 = getelementptr inbounds %struct.btHashInt* %object, i32 12 ; [#uses=1]
- %62 = bitcast %struct.btHashInt* %61 to float* ; [#uses=1]
- store float 0.000000e+00, float* %62, align 4
- ret void
-}
-
-; [#uses=0]
-define void @plSetOpenGLMatrix(%struct.btHashInt* nocapture %object, float* nocapture %matrix) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btHashInt* %object, i32 1 ; [#uses=1]
- %1 = getelementptr inbounds float* %matrix, i32 8 ; [#uses=1]
- %2 = getelementptr inbounds float* %matrix, i32 4 ; [#uses=1]
- %3 = load float* %matrix, align 4 ; [#uses=1]
- %4 = bitcast %struct.btHashInt* %0 to float* ; [#uses=1]
- store float %3, float* %4, align 4
- %5 = load float* %2, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btHashInt* %object, i32 2 ; [#uses=1]
- %7 = bitcast %struct.btHashInt* %6 to float* ; [#uses=1]
- store float %5, float* %7, align 4
- %8 = load float* %1, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btHashInt* %object, i32 3 ; [#uses=1]
- %10 = bitcast %struct.btHashInt* %9 to float* ; [#uses=1]
- store float %8, float* %10, align 4
- %11 = getelementptr inbounds %struct.btHashInt* %object, i32 4 ; [#uses=1]
- %12 = bitcast %struct.btHashInt* %11 to float* ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds float* %matrix, i32 9 ; [#uses=1]
- %14 = getelementptr inbounds float* %matrix, i32 5 ; [#uses=1]
- %15 = getelementptr inbounds float* %matrix, i32 1 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btHashInt* %object, i32 5 ; [#uses=1]
- %18 = bitcast %struct.btHashInt* %17 to float* ; [#uses=1]
- store float %16, float* %18, align 4
- %19 = load float* %14, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btHashInt* %object, i32 6 ; [#uses=1]
- %21 = bitcast %struct.btHashInt* %20 to float* ; [#uses=1]
- store float %19, float* %21, align 4
- %22 = load float* %13, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btHashInt* %object, i32 7 ; [#uses=1]
- %24 = bitcast %struct.btHashInt* %23 to float* ; [#uses=1]
- store float %22, float* %24, align 4
- %25 = getelementptr inbounds %struct.btHashInt* %object, i32 8 ; [#uses=1]
- %26 = bitcast %struct.btHashInt* %25 to float* ; [#uses=1]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds float* %matrix, i32 10 ; [#uses=1]
- %28 = getelementptr inbounds float* %matrix, i32 6 ; [#uses=1]
- %29 = getelementptr inbounds float* %matrix, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btHashInt* %object, i32 9 ; [#uses=1]
- %32 = bitcast %struct.btHashInt* %31 to float* ; [#uses=1]
- store float %30, float* %32, align 4
- %33 = load float* %28, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btHashInt* %object, i32 10 ; [#uses=1]
- %35 = bitcast %struct.btHashInt* %34 to float* ; [#uses=1]
- store float %33, float* %35, align 4
- %36 = load float* %27, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btHashInt* %object, i32 11 ; [#uses=1]
- %38 = bitcast %struct.btHashInt* %37 to float* ; [#uses=1]
- store float %36, float* %38, align 4
- %39 = getelementptr inbounds %struct.btHashInt* %object, i32 12 ; [#uses=1]
- %40 = bitcast %struct.btHashInt* %39 to float* ; [#uses=1]
- store float 0.000000e+00, float* %40, align 4
- %41 = getelementptr inbounds float* %matrix, i32 14 ; [#uses=1]
- %42 = getelementptr inbounds float* %matrix, i32 13 ; [#uses=1]
- %43 = getelementptr inbounds float* %matrix, i32 12 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btHashInt* %object, i32 13 ; [#uses=1]
- %46 = bitcast %struct.btHashInt* %45 to float* ; [#uses=1]
- store float %44, float* %46, align 4
- %47 = load float* %42, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btHashInt* %object, i32 14 ; [#uses=1]
- %49 = bitcast %struct.btHashInt* %48 to float* ; [#uses=1]
- store float %47, float* %49, align 4
- %50 = load float* %41, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btHashInt* %object, i32 15 ; [#uses=1]
- %52 = bitcast %struct.btHashInt* %51 to float* ; [#uses=1]
- store float %50, float* %52, align 4
- %53 = getelementptr inbounds %struct.btHashInt* %object, i32 16 ; [#uses=1]
- %54 = bitcast %struct.btHashInt* %53 to float* ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- ret void
-}
-
-; [#uses=0]
-define void @plGetOpenGLMatrix(%struct.btHashInt* nocapture %object, float* nocapture %matrix) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btHashInt* %object, i32 1 ; [#uses=1]
- %1 = bitcast %struct.btHashInt* %0 to float* ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %matrix, align 4
- %3 = getelementptr inbounds %struct.btHashInt* %object, i32 5 ; [#uses=1]
- %4 = bitcast %struct.btHashInt* %3 to float* ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds float* %matrix, i32 1 ; [#uses=1]
- store float %5, float* %6, align 4
- %7 = getelementptr inbounds %struct.btHashInt* %object, i32 9 ; [#uses=1]
- %8 = bitcast %struct.btHashInt* %7 to float* ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds float* %matrix, i32 2 ; [#uses=1]
- store float %9, float* %10, align 4
- %11 = getelementptr inbounds float* %matrix, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 4
- %12 = getelementptr inbounds %struct.btHashInt* %object, i32 2 ; [#uses=1]
- %13 = bitcast %struct.btHashInt* %12 to float* ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds float* %matrix, i32 4 ; [#uses=1]
- store float %14, float* %15, align 4
- %16 = getelementptr inbounds %struct.btHashInt* %object, i32 6 ; [#uses=1]
- %17 = bitcast %struct.btHashInt* %16 to float* ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds float* %matrix, i32 5 ; [#uses=1]
- store float %18, float* %19, align 4
- %20 = getelementptr inbounds %struct.btHashInt* %object, i32 10 ; [#uses=1]
- %21 = bitcast %struct.btHashInt* %20 to float* ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds float* %matrix, i32 6 ; [#uses=1]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds float* %matrix, i32 7 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 4
- %25 = getelementptr inbounds %struct.btHashInt* %object, i32 3 ; [#uses=1]
- %26 = bitcast %struct.btHashInt* %25 to float* ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = getelementptr inbounds float* %matrix, i32 8 ; [#uses=1]
- store float %27, float* %28, align 4
- %29 = getelementptr inbounds %struct.btHashInt* %object, i32 7 ; [#uses=1]
- %30 = bitcast %struct.btHashInt* %29 to float* ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds float* %matrix, i32 9 ; [#uses=1]
- store float %31, float* %32, align 4
- %33 = getelementptr inbounds %struct.btHashInt* %object, i32 11 ; [#uses=1]
- %34 = bitcast %struct.btHashInt* %33 to float* ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds float* %matrix, i32 10 ; [#uses=1]
- store float %35, float* %36, align 4
- %37 = getelementptr inbounds float* %matrix, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %struct.btHashInt* %object, i32 13 ; [#uses=1]
- %39 = bitcast %struct.btHashInt* %38 to float* ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- %41 = getelementptr inbounds float* %matrix, i32 12 ; [#uses=1]
- store float %40, float* %41, align 4
- %42 = getelementptr inbounds %struct.btHashInt* %object, i32 14 ; [#uses=1]
- %43 = bitcast %struct.btHashInt* %42 to float* ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=1]
- %45 = getelementptr inbounds float* %matrix, i32 13 ; [#uses=1]
- store float %44, float* %45, align 4
- %46 = getelementptr inbounds %struct.btHashInt* %object, i32 15 ; [#uses=1]
- %47 = bitcast %struct.btHashInt* %46 to float* ; [#uses=1]
- %48 = load float* %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds float* %matrix, i32 14 ; [#uses=1]
- store float %48, float* %49, align 4
- %50 = getelementptr inbounds float* %matrix, i32 15 ; [#uses=1]
- store float 1.000000e+00, float* %50, align 4
- ret void
-}
-
-; [#uses=0]
-define void @plGetPosition(%struct.btHashInt* nocapture %object, float* nocapture %position) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btHashInt* %object, i32 13 ; [#uses=1]
- %1 = bitcast %struct.btHashInt* %0 to float* ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- store float %2, float* %position, align 4
- %3 = getelementptr inbounds %struct.btHashInt* %object, i32 14 ; [#uses=1]
- %4 = bitcast %struct.btHashInt* %3 to float* ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds float* %position, i32 1 ; [#uses=1]
- store float %5, float* %6, align 4
- %7 = getelementptr inbounds %struct.btHashInt* %object, i32 15 ; [#uses=1]
- %8 = bitcast %struct.btHashInt* %7 to float* ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds float* %position, i32 2 ; [#uses=1]
- store float %9, float* %10, align 4
- ret void
-}
-
-; [#uses=1]
-define internal void @__tcf_1(i8* nocapture %unnamed_arg) nounwind {
-entry:
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV33btMinkowskiPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct..0btMultiSapOverlapFilterCallback* @_ZZ15plNearestPointsE7Solver1, i32 0, i32 0, i32 0), align 8
- ret void
-}
-
-; [#uses=1]
-define internal void @__tcf_087(i8* nocapture %unnamed_arg) nounwind {
-entry:
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct..0btMultiSapOverlapFilterCallback* @_ZZ15plNearestPointsE7Solver0, i32 0, i32 0, i32 0), align 8
- ret void
-}
-
-; [#uses=0]
-define void @plDeleteShape(%struct.btHashInt* %cshape) {
-entry:
- %0 = bitcast %struct.btHashInt* %cshape to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %0)
- ret void
-}
-
-; [#uses=0]
-define void @plDeleteRigidBody(%struct.btHashInt* %cbody) {
-entry:
- %0 = bitcast %struct.btHashInt* %cbody to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %0)
- ret void
-}
-
-; [#uses=0]
-define void @plDeleteDynamicsWorld(%struct.btHashInt* %world) {
-entry:
- %0 = bitcast %struct.btHashInt* %world to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %0)
- ret void
-}
-
-; [#uses=0]
-define void @plDeletePhysicsSdk(%struct.btHashInt* %physicsSdk) {
-entry:
- %0 = bitcast %struct.btHashInt* %physicsSdk to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %0)
- ret void
-}
-
-; [#uses=0]
-define void @plGetOrientation(%struct.btHashInt* %object, float* nocapture %orientation) nounwind {
-entry:
- %0 = alloca %struct.btQuaternion, align 8 ; [#uses=5]
- %1 = getelementptr inbounds %struct.btHashInt* %object, i32 1 ; [#uses=1]
- %2 = bitcast %struct.btHashInt* %1 to %struct.btMatrix3x3* ; [#uses=1]
- call void @_ZNK11btMatrix3x311getRotationER12btQuaternion(%struct.btMatrix3x3* %2, %struct.btQuaternion* %0) nounwind
- %3 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 8 ; [#uses=1]
- store float %4, float* %orientation, align 4
- %5 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds float* %orientation, i32 1 ; [#uses=1]
- store float %6, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 8 ; [#uses=1]
- %10 = getelementptr inbounds float* %orientation, i32 2 ; [#uses=1]
- store float %9, float* %10, align 4
- %11 = getelementptr inbounds %struct.btQuaternion* %0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds float* %orientation, i32 3 ; [#uses=1]
- store float %12, float* %13, align 4
- ret void
-}
-
-; [#uses=0]
-define double @plNearestPoints(float* nocapture %p1, float* nocapture %p2, float* nocapture %p3, float* nocapture %q1, float* nocapture %q2, float* nocapture %q3, float* nocapture %pa, float* nocapture %pb, float* nocapture %normal) {
-entry:
- %trishapeA = alloca %struct.btTriangleShape, align 8 ; [#uses=18]
- %trishapeB = alloca %struct.btTriangleShape, align 8 ; [#uses=18]
- %convexConvex = alloca %struct.btGjkPairDetector, align 8 ; [#uses=3]
- %gjkOutput = alloca %struct..0btIntermediateResult, align 8 ; [#uses=10]
- %input = alloca %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput", align 8 ; [#uses=35]
- %0 = getelementptr inbounds float* %p1, i32 2 ; [#uses=1]
- %1 = getelementptr inbounds float* %p1, i32 1 ; [#uses=1]
- %2 = load float* %p1, align 4 ; [#uses=1]
- %3 = load float* %1, align 4 ; [#uses=1]
- %4 = load float* %0, align 4 ; [#uses=1]
- %5 = getelementptr inbounds float* %p3, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds float* %p3, i32 1 ; [#uses=1]
- %7 = load float* %p3, align 4 ; [#uses=1]
- %8 = load float* %6, align 4 ; [#uses=1]
- %9 = load float* %5, align 4 ; [#uses=1]
- %10 = getelementptr inbounds float* %p2, i32 2 ; [#uses=1]
- %11 = getelementptr inbounds float* %p2, i32 1 ; [#uses=1]
- %12 = load float* %p2, align 4 ; [#uses=1]
- %13 = load float* %11, align 4 ; [#uses=1]
- %14 = load float* %10, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 0 ; [#uses=1]
- call void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %15)
- %16 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV15btTriangleShape, i32 0, i32 2), i32 (...)*** %16, align 8
- %17 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %2, float* %18, align 4
- %19 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %3, float* %19, align 4
- %20 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %4, float* %20, align 4
- %21 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %12, float* %22, align 4
- %23 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %13, float* %23, align 4
- %24 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %14, float* %24, align 4
- %25 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %25, align 4
- %26 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %7, float* %26, align 4
- %27 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %8, float* %27, align 4
- %28 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %9, float* %28, align 4
- %29 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- %30 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0x3EB0C6F7A0000000, float* %30, align 4
- %31 = getelementptr inbounds float* %q1, i32 2 ; [#uses=1]
- %32 = getelementptr inbounds float* %q1, i32 1 ; [#uses=1]
- %33 = load float* %q1, align 4 ; [#uses=1]
- %34 = load float* %32, align 4 ; [#uses=1]
- %35 = load float* %31, align 4 ; [#uses=1]
- %36 = getelementptr inbounds float* %q3, i32 2 ; [#uses=1]
- %37 = getelementptr inbounds float* %q3, i32 1 ; [#uses=1]
- %38 = load float* %q3, align 4 ; [#uses=1]
- %39 = load float* %37, align 4 ; [#uses=1]
- %40 = load float* %36, align 4 ; [#uses=1]
- %41 = getelementptr inbounds float* %q2, i32 2 ; [#uses=1]
- %42 = getelementptr inbounds float* %q2, i32 1 ; [#uses=1]
- %43 = load float* %q2, align 4 ; [#uses=1]
- %44 = load float* %42, align 4 ; [#uses=1]
- %45 = load float* %41, align 4 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %46)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %47 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV15btTriangleShape, i32 0, i32 2), i32 (...)*** %47, align 8
- %48 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 1, i32* %48, align 4
- %49 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %33, float* %49, align 4
- %50 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %34, float* %50, align 4
- %51 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %35, float* %51, align 4
- %52 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %43, float* %53, align 4
- %54 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %44, float* %54, align 4
- %55 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %45, float* %55, align 4
- %56 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %56, align 4
- %57 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %38, float* %57, align 4
- %58 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %39, float* %58, align 4
- %59 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %40, float* %59, align 4
- %60 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 1, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- %61 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0x3EB0C6F7A0000000, float* %61, align 4
- %62 = load i8* bitcast (i64* @_ZGVZ15plNearestPointsE17sGjkSimplexSolver to i8*), align 8 ; [#uses=1]
- %63 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %63, label %bb, label %bb10
-
-bb: ; preds = %invcont
- %64 = call i32 @__cxa_guard_acquire(i64* @_ZGVZ15plNearestPointsE17sGjkSimplexSolver) nounwind ; [#uses=1]
- %65 = icmp eq i32 %64, 0 ; [#uses=1]
- br i1 %65, label %bb10, label %invcont2
-
-invcont2: ; preds = %bb
- store float 0x3F1A36E2E0000000, float* getelementptr inbounds (%struct.btVoronoiSimplexSolver* @_ZZ15plNearestPointsE17sGjkSimplexSolver, i32 0, i32 8), align 4
- %66 = load i8* getelementptr inbounds (%struct.btVoronoiSimplexSolver* @_ZZ15plNearestPointsE17sGjkSimplexSolver, i32 0, i32 10, i32 1, i32 0), align 4 ; [#uses=1]
- %67 = and i8 %66, -16 ; [#uses=1]
- store i8 %67, i8* getelementptr inbounds (%struct.btVoronoiSimplexSolver* @_ZZ15plNearestPointsE17sGjkSimplexSolver, i32 0, i32 10, i32 1, i32 0), align 4
- call void @__cxa_guard_release(i64* @_ZGVZ15plNearestPointsE17sGjkSimplexSolver) nounwind
- br label %bb10
-
-bb10: ; preds = %invcont2, %bb, %invcont
- invoke void @_ZN22btVoronoiSimplexSolver5resetEv(%struct.btVoronoiSimplexSolver* @_ZZ15plNearestPointsE17sGjkSimplexSolver)
- to label %invcont11 unwind label %lpad44
-
-invcont11: ; preds = %bb10
- %68 = load i8* bitcast (i64* @_ZGVZ15plNearestPointsE7Solver0 to i8*), align 8 ; [#uses=1]
- %69 = icmp eq i8 %68, 0 ; [#uses=1]
- br i1 %69, label %bb12, label %bb15
-
-bb12: ; preds = %invcont11
- %70 = call i32 @__cxa_guard_acquire(i64* @_ZGVZ15plNearestPointsE7Solver0) nounwind ; [#uses=1]
- %71 = icmp eq i32 %70, 0 ; [#uses=1]
- br i1 %71, label %bb15, label %bb14
-
-bb14: ; preds = %bb12
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV30btGjkEpaPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct..0btMultiSapOverlapFilterCallback* @_ZZ15plNearestPointsE7Solver0, i32 0, i32 0, i32 0), align 8
- call void @__cxa_guard_release(i64* @_ZGVZ15plNearestPointsE7Solver0) nounwind
- %72 = call i32 @__cxa_atexit(void (i8*)* @__tcf_087, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- br label %bb15
-
-bb15: ; preds = %bb14, %bb12, %invcont11
- %73 = load i8* bitcast (i64* @_ZGVZ15plNearestPointsE7Solver1 to i8*), align 8 ; [#uses=1]
- %74 = icmp eq i8 %73, 0 ; [#uses=1]
- br i1 %74, label %bb16, label %bb19
-
-bb16: ; preds = %bb15
- %75 = call i32 @__cxa_guard_acquire(i64* @_ZGVZ15plNearestPointsE7Solver1) nounwind ; [#uses=1]
- %76 = icmp eq i32 %75, 0 ; [#uses=1]
- br i1 %76, label %bb19, label %bb18
-
-bb18: ; preds = %bb16
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV33btMinkowskiPenetrationDepthSolver, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct..0btMultiSapOverlapFilterCallback* @_ZZ15plNearestPointsE7Solver1, i32 0, i32 0, i32 0), align 8
- call void @__cxa_guard_release(i64* @_ZGVZ15plNearestPointsE7Solver1) nounwind
- %77 = call i32 @__cxa_atexit(void (i8*)* @__tcf_1, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- br label %bb19
-
-bb19: ; preds = %bb18, %bb16, %bb15
- %78 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %79 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- invoke void @_ZN17btGjkPairDetectorC1EPK13btConvexShapeS2_P22btVoronoiSimplexSolverP30btConvexPenetrationDepthSolver(%struct.btGjkPairDetector* %convexConvex, %struct.btConvexShape* %78, %struct.btConvexShape* %79, %struct.btVoronoiSimplexSolver* @_ZZ15plNearestPointsE17sGjkSimplexSolver, %struct.btActionInterface* getelementptr inbounds (%struct..0btMultiSapOverlapFilterCallback* @_ZZ15plNearestPointsE7Solver1, i32 0, i32 0))
- to label %invcont20 unwind label %lpad44
-
-invcont20: ; preds = %bb19
- %80 = getelementptr inbounds %struct.btGjkPairDetector* %convexConvex, i32 0, i32 15 ; [#uses=1]
- store i32 1, i32* %80, align 8
- %81 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 0, i32 0 ; [#uses=3]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %81, align 8
- %82 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 3 ; [#uses=2]
- store float 0x43ABC16D60000000, float* %82, align 4
- %83 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 4 ; [#uses=2]
- store i8 0, i8* %83, align 8
- %84 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 2 ; [#uses=1]
- store float 0x43ABC16D60000000, float* %84, align 8
- %85 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 3 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %85, align 4
- %86 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %86, align 8
- %87 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %87, align 4
- %88 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %88, align 8
- %89 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %89, align 4
- %90 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %90, align 8
- %91 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %91, align 4
- %92 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %92, align 8
- %93 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %93, align 4
- %94 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %94, align 8
- %95 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %95, align 4
- %96 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %96, align 8
- %97 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %97, align 4
- %98 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %98, align 8
- %99 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %99, align 4
- %100 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %100, align 8
- %101 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %101, align 4
- %102 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %102, align 8
- %103 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %103, align 4
- %104 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %104, align 8
- %105 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %105, align 4
- %106 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %106, align 8
- %107 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %107, align 4
- %108 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %108, align 8
- %109 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %109, align 4
- %110 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %110, align 8
- %111 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %111, align 4
- %112 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %112, align 8
- %113 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %113, align 4
- %114 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %114, align 8
- %115 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %115, align 4
- %116 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %116, align 8
- %117 = getelementptr inbounds %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %117, align 4
- %118 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN17btGjkPairDetector16getClosestPointsERKN36btDiscreteCollisionDetectorInterface17ClosestPointInputERNS0_6ResultEP12btIDebugDrawb(%struct.btGjkPairDetector* %convexConvex, %"struct.btDiscreteCollisionDetectorInterface::ClosestPointInput"* %input, %struct.btActionInterface* %118, %struct.btActionInterface* null, i8 zeroext 0)
- to label %invcont21 unwind label %lpad52
-
-invcont21: ; preds = %invcont20
- %119 = load i8* %83, align 8 ; [#uses=1]
- %toBool22 = icmp eq i8 %119, 0 ; [#uses=1]
- br i1 %toBool22, label %bb28, label %bb23
-
-bb23: ; preds = %invcont21
- %120 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %121 = load float* %120, align 4 ; [#uses=2]
- store float %121, float* %pa, align 4
- store float %121, float* %pb, align 4
- %122 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=2]
- %124 = getelementptr inbounds float* %pa, i32 1 ; [#uses=1]
- store float %123, float* %124, align 4
- %125 = getelementptr inbounds float* %pb, i32 1 ; [#uses=3]
- store float %123, float* %125, align 4
- %126 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=2]
- %128 = getelementptr inbounds float* %pa, i32 2 ; [#uses=1]
- store float %127, float* %128, align 4
- %129 = getelementptr inbounds float* %pb, i32 2 ; [#uses=1]
- %130 = load float* %pb, align 4 ; [#uses=1]
- %131 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=2]
- %133 = load float* %82, align 4 ; [#uses=4]
- %134 = fmul float %132, %133 ; [#uses=1]
- %135 = fadd float %130, %134 ; [#uses=1]
- store float %135, float* %pb, align 4
- %136 = load float* %125, align 4 ; [#uses=1]
- %137 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=2]
- %139 = fmul float %138, %133 ; [#uses=1]
- %140 = fadd float %136, %139 ; [#uses=1]
- store float %140, float* %125, align 4
- %141 = getelementptr inbounds %struct..0btIntermediateResult* %gjkOutput, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=2]
- %143 = fmul float %142, %133 ; [#uses=1]
- %144 = fadd float %127, %143 ; [#uses=1]
- store float %144, float* %129, align 4
- store float %132, float* %normal, align 4
- %145 = getelementptr inbounds float* %normal, i32 1 ; [#uses=1]
- store float %138, float* %145, align 4
- %146 = getelementptr inbounds float* %normal, i32 2 ; [#uses=1]
- store float %142, float* %146, align 4
- %147 = fpext float %133 to double ; [#uses=1]
- br label %bb28
-
-bb28: ; preds = %bb23, %invcont21
- %.0 = phi double [ %147, %bb23 ], [ -1.000000e+00, %invcont21 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %81, align 8
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %47, align 8
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %79)
- to label %bb40 unwind label %lpad
-
-invcont38: ; preds = %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-
-bb40: ; preds = %bb28
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %16, align 8
- call void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %78)
- ret double %.0
-
-lpad: ; preds = %bb28, %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad44: ; preds = %bb19, %bb10
- %eh_ptr45 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad64
-
-lpad52: ; preds = %invcont20
- %eh_ptr53 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select55 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([7 x i32 (...)*]* @_ZTV16btPointCollector, i32 0, i32 2), i32 (...)*** %81, align 8
- br label %ppad64
-
-lpad56: ; preds = %ppad64
- %eh_ptr57 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %ppad
- %eh_ptr61 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %ppad64, %lpad
- %eh_exception.1 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.0, %ppad64 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %16, align 8
- %148 = getelementptr inbounds %struct.btTriangleShape* %trishapeA, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %148)
- to label %invcont38 unwind label %lpad60
-
-ppad64: ; preds = %lpad52, %lpad44
- %eh_exception.0 = phi i8* [ %eh_ptr53, %lpad52 ], [ %eh_ptr45, %lpad44 ] ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV21btConvexInternalShape, i32 0, i32 2), i32 (...)*** %47, align 8
- %149 = getelementptr inbounds %struct.btTriangleShape* %trishapeB, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN13btConvexShapeD2Ev(%struct.btConvexShape* %149)
- to label %ppad unwind label %lpad56
-}
-
-; [#uses=0]
-define void @plAddVertex(%struct.btHashInt* %cshape, float %x, float %y, float %z) {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = bitcast %struct.btHashInt* %cshape to %struct.btConvexHullShape* ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %x, float* %2, align 8
- %3 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %y, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %z, float* %4, align 8
- %5 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- call void @_ZN17btConvexHullShape8addPointERK9btVector3(%struct.btConvexHullShape* %1, %struct.btQuadWord* %0)
- ret void
-}
-
-; [#uses=0]
-define void @plSetEuler(float %yaw, float %pitch, float %roll, float* nocapture %orient) nounwind {
-entry:
- %0 = fmul float %yaw, 5.000000e-01 ; [#uses=2]
- %1 = fmul float %pitch, 5.000000e-01 ; [#uses=2]
- %2 = fmul float %roll, 5.000000e-01 ; [#uses=2]
- %3 = tail call float @cosf(float %0) nounwind readonly ; [#uses=4]
- %4 = tail call float @sinf(float %0) nounwind readonly ; [#uses=4]
- %5 = tail call float @cosf(float %1) nounwind readonly ; [#uses=2]
- %6 = tail call float @sinf(float %1) nounwind readonly ; [#uses=2]
- %7 = tail call float @cosf(float %2) nounwind readonly ; [#uses=2]
- %8 = tail call float @sinf(float %2) nounwind readonly ; [#uses=2]
- %9 = fmul float %7, %5 ; [#uses=2]
- %10 = fmul float %9, %3 ; [#uses=1]
- %11 = fmul float %8, %6 ; [#uses=2]
- %12 = fmul float %11, %4 ; [#uses=1]
- %13 = fadd float %10, %12 ; [#uses=1]
- %14 = fmul float %8, %5 ; [#uses=2]
- %15 = fmul float %14, %3 ; [#uses=1]
- %16 = fmul float %7, %6 ; [#uses=2]
- %17 = fmul float %16, %4 ; [#uses=1]
- %18 = fsub float %15, %17 ; [#uses=1]
- %19 = fmul float %9, %4 ; [#uses=1]
- %20 = fmul float %11, %3 ; [#uses=1]
- %21 = fsub float %19, %20 ; [#uses=1]
- %22 = fmul float %16, %3 ; [#uses=1]
- %23 = fmul float %14, %4 ; [#uses=1]
- %24 = fadd float %22, %23 ; [#uses=1]
- store float %24, float* %orient, align 4
- %25 = getelementptr inbounds float* %orient, i32 1 ; [#uses=1]
- store float %21, float* %25, align 4
- %26 = getelementptr inbounds float* %orient, i32 2 ; [#uses=1]
- store float %18, float* %26, align 4
- %27 = getelementptr inbounds float* %orient, i32 3 ; [#uses=1]
- store float %13, float* %27, align 4
- ret void
-}
-
-; [#uses=0]
-define void @plAddChildShape(%struct.btHashInt* %compoundShapeHandle, %struct.btHashInt* %childShapeHandle, float* nocapture %childPos, float* nocapture %childOrn) {
-entry:
- %localTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %0 = bitcast %struct.btHashInt* %compoundShapeHandle to %struct.btCompoundShape* ; [#uses=1]
- %1 = bitcast %struct.btHashInt* %childShapeHandle to %struct.btCollisionShape* ; [#uses=1]
- %2 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btTransform* %localTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %18 = getelementptr inbounds float* %childPos, i32 2 ; [#uses=1]
- %19 = getelementptr inbounds float* %childPos, i32 1 ; [#uses=1]
- %20 = load float* %childPos, align 4 ; [#uses=1]
- %21 = load float* %19, align 4 ; [#uses=1]
- %22 = load float* %18, align 4 ; [#uses=1]
- store float %20, float* %14, align 8
- store float %21, float* %15, align 4
- store float %22, float* %16, align 8
- store float 0.000000e+00, float* %17, align 4
- %23 = getelementptr inbounds float* %childOrn, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds float* %childOrn, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds float* %childOrn, i32 1 ; [#uses=1]
- %26 = load float* %childOrn, align 4 ; [#uses=6]
- %27 = load float* %25, align 4 ; [#uses=5]
- %28 = load float* %24, align 4 ; [#uses=4]
- %29 = load float* %23, align 4 ; [#uses=5]
- %30 = fmul float %26, %26 ; [#uses=1]
- %31 = fmul float %27, %27 ; [#uses=1]
- %32 = fadd float %30, %31 ; [#uses=1]
- %33 = fmul float %28, %28 ; [#uses=1]
- %34 = fadd float %32, %33 ; [#uses=1]
- %35 = fmul float %29, %29 ; [#uses=1]
- %36 = fadd float %34, %35 ; [#uses=1]
- %37 = fdiv float 2.000000e+00, %36 ; [#uses=3]
- %38 = fmul float %26, %37 ; [#uses=2]
- %39 = fmul float %27, %37 ; [#uses=3]
- %40 = fmul float %28, %37 ; [#uses=4]
- %41 = fmul float %29, %38 ; [#uses=2]
- %42 = fmul float %29, %39 ; [#uses=2]
- %43 = fmul float %29, %40 ; [#uses=2]
- %44 = fmul float %26, %38 ; [#uses=2]
- %45 = fmul float %26, %39 ; [#uses=2]
- %46 = fmul float %26, %40 ; [#uses=2]
- %47 = fmul float %27, %39 ; [#uses=2]
- %48 = fmul float %27, %40 ; [#uses=2]
- %49 = fmul float %28, %40 ; [#uses=2]
- %50 = fadd float %44, %47 ; [#uses=1]
- %51 = fsub float 1.000000e+00, %50 ; [#uses=1]
- %52 = fadd float %48, %41 ; [#uses=1]
- %53 = fsub float %46, %42 ; [#uses=1]
- %54 = fsub float %48, %41 ; [#uses=1]
- %55 = fadd float %44, %49 ; [#uses=1]
- %56 = fsub float 1.000000e+00, %55 ; [#uses=1]
- %57 = fadd float %45, %43 ; [#uses=1]
- %58 = fadd float %46, %42 ; [#uses=1]
- %59 = fsub float %45, %43 ; [#uses=1]
- %60 = fadd float %47, %49 ; [#uses=1]
- %61 = fsub float 1.000000e+00, %60 ; [#uses=1]
- store float %61, float* %2, align 8
- store float %59, float* %3, align 4
- store float %58, float* %4, align 8
- store float 0.000000e+00, float* %5, align 4
- store float %57, float* %6, align 8
- store float %56, float* %7, align 4
- store float %54, float* %8, align 8
- store float 0.000000e+00, float* %9, align 4
- store float %53, float* %10, align 8
- store float %52, float* %11, align 4
- store float %51, float* %12, align 8
- store float 0.000000e+00, float* %13, align 4
- call void @_ZN15btCompoundShape13addChildShapeERK11btTransformP16btCollisionShape(%struct.btCompoundShape* %0, %struct.btTransform* %localTrans, %struct.btCollisionShape* %1)
- ret void
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewBoxShape(float %x, float %y, float %z) {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 52, i32 16) ; [#uses=12]
- %1 = bitcast i8* %0 to %struct.btPolyhedralConvexShape* ; [#uses=1]
- invoke void @_ZN23btPolyhedralConvexShapeC2Ev(%struct.btPolyhedralConvexShape* %1)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- %2 = bitcast i8* %0 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([31 x i32 (...)*]* @_ZTV10btBoxShape, i32 0, i32 2), i32 (...)*** %2, align 4
- %3 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %4 = bitcast i8* %3 to i32* ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds i8* %0, i32 44 ; [#uses=1]
- %6 = bitcast i8* %5 to float* ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=3]
- %8 = getelementptr inbounds i8* %0, i32 20 ; [#uses=1]
- %9 = bitcast i8* %8 to float* ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %10, %z ; [#uses=1]
- %12 = getelementptr inbounds i8* %0, i32 16 ; [#uses=1]
- %13 = bitcast i8* %12 to float* ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %14, %y ; [#uses=1]
- %16 = getelementptr inbounds i8* %0, i32 12 ; [#uses=1]
- %17 = bitcast i8* %16 to float* ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fmul float %18, %x ; [#uses=1]
- %20 = fsub float %11, %7 ; [#uses=1]
- %21 = fsub float %15, %7 ; [#uses=1]
- %22 = fsub float %19, %7 ; [#uses=1]
- %23 = getelementptr inbounds i8* %0, i32 28 ; [#uses=1]
- %24 = bitcast i8* %23 to float* ; [#uses=1]
- store float %22, float* %24, align 4
- %25 = getelementptr inbounds i8* %0, i32 32 ; [#uses=1]
- %26 = bitcast i8* %25 to float* ; [#uses=1]
- store float %21, float* %26, align 4
- %27 = getelementptr inbounds i8* %0, i32 36 ; [#uses=1]
- %28 = bitcast i8* %27 to float* ; [#uses=1]
- store float %20, float* %28, align 4
- %29 = getelementptr inbounds i8* %0, i32 40 ; [#uses=1]
- %30 = bitcast i8* %29 to float* ; [#uses=1]
- store float 0.000000e+00, float* %30, align 4
- %31 = bitcast i8* %0 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %31
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewCompoundShape() {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 92, i32 16) ; [#uses=2]
- %1 = bitcast i8* %0 to %struct.btCompoundShape* ; [#uses=1]
- invoke void @_ZN15btCompoundShapeC1Eb(%struct.btCompoundShape* %1, i8 zeroext 1)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- %2 = bitcast i8* %0 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %2
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewConvexHullShape() {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 108, i32 16) ; [#uses=2]
- %1 = bitcast i8* %0 to %struct.btConvexHullShape* ; [#uses=1]
- invoke void @_ZN17btConvexHullShapeC1EPKfii(%struct.btConvexHullShape* %1, float* null, i32 0, i32 16)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- %2 = bitcast i8* %0 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %2
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewCylinderShape(float %radius, float %height) {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = call i8* @_Z22btAlignedAllocInternalji(i32 56, i32 16) ; [#uses=2]
- %2 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %radius, float* %2, align 8
- %3 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %height, float* %3, align 4
- %4 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %radius, float* %4, align 8
- %5 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 4
- %6 = bitcast i8* %1 to %struct.btCapsuleShape* ; [#uses=1]
- invoke void @_ZN15btCylinderShapeC1ERK9btVector3(%struct.btCapsuleShape* %6, %struct.btQuadWord* %0)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- %7 = bitcast i8* %1 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %7
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewConeShape(float %radius, float %height) {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 76, i32 16) ; [#uses=2]
- %1 = bitcast i8* %0 to %struct.btConeShape* ; [#uses=1]
- invoke void @_ZN11btConeShapeC1Eff(%struct.btConeShape* %1, float %radius, float %height)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- %2 = bitcast i8* %0 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %2
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewCapsuleShape(float %radius, float %height) {
-entry:
- %positions = alloca [2 x %struct.btQuadWord], align 8 ; [#uses=9]
- %radi = alloca [2 x float], align 4 ; [#uses=2]
- %0 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 8
- %1 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %height, float* %1, align 4
- %2 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %3, align 4
- %4 = fsub float -0.000000e+00, %height ; [#uses=1]
- %5 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %5, align 8
- %6 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %4, float* %6, align 4
- %7 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 8
- %8 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 4
- %9 = getelementptr inbounds [2 x float]* %radi, i32 0, i32 0 ; [#uses=2]
- %10 = getelementptr inbounds [2 x float]* %radi, i32 0, i32 1 ; [#uses=1]
- store float %radius, float* %9, align 4
- store float %radius, float* %10, align 4
- %11 = call i8* @_Z22btAlignedAllocInternalji(i32 128, i32 16) ; [#uses=2]
- %12 = bitcast i8* %11 to %struct.btMultiSphereShape* ; [#uses=1]
- %13 = getelementptr inbounds [2 x %struct.btQuadWord]* %positions, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN18btMultiSphereShapeC1EPK9btVector3PKfi(%struct.btMultiSphereShape* %12, %struct.btQuadWord* %13, float* %9, i32 2)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- %14 = bitcast i8* %11 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %14
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plNewSphereShape(float %radius) {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 52, i32 16) ; [#uses=6]
- %1 = bitcast i8* %0 to %struct.btConvexInternalShape* ; [#uses=1]
- invoke void @_ZN21btConvexInternalShapeC2Ev(%struct.btConvexInternalShape* %1)
- to label %bb1 unwind label %lpad
-
-bb1: ; preds = %entry
- %2 = bitcast i8* %0 to i32 (...)*** ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([23 x i32 (...)*]* @_ZTV13btSphereShape, i32 0, i32 2), i32 (...)*** %2, align 4
- %3 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %4 = bitcast i8* %3 to i32* ; [#uses=1]
- store i32 8, i32* %4, align 4
- %5 = getelementptr inbounds i8* %0, i32 28 ; [#uses=1]
- %6 = bitcast i8* %5 to float* ; [#uses=1]
- store float %radius, float* %6, align 4
- %7 = getelementptr inbounds i8* %0, i32 44 ; [#uses=1]
- %8 = bitcast i8* %7 to float* ; [#uses=1]
- store float %radius, float* %8, align 4
- %9 = bitcast i8* %0 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %9
-
-lpad: ; preds = %entry
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select4 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plCreateRigidBody(i8* %user_data, float %mass, %struct.btHashInt* %cshape) {
-entry:
- %localInertia = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %rbci = alloca %"struct.btRigidBody::btRigidBodyConstructionInfo", align 8 ; [#uses=35]
- %0 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 0 ; [#uses=2]
- store float 0.000000e+00, float* %0, align 8
- %1 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 2 ; [#uses=2]
- store float 0.000000e+00, float* %2, align 8
- %3 = getelementptr inbounds %struct.btQuadWord* %localInertia, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %3, align 4
- %4 = bitcast %struct.btHashInt* %cshape to %struct.btCollisionShape* ; [#uses=2]
- %5 = fcmp une float %mass, 0.000000e+00 ; [#uses=1]
- br i1 %5, label %bb, label %bb1
-
-bb: ; preds = %entry
- %6 = bitcast %struct.btHashInt* %cshape to i32 (...)*** ; [#uses=1]
- %7 = load i32 (...)*** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds i32 (...)** %7, i32 8 ; [#uses=1]
- %9 = load i32 (...)** %8, align 4 ; [#uses=1]
- %10 = bitcast i32 (...)* %9 to void (%struct.btCollisionShape*, float, %struct.btQuadWord*)* ; [#uses=1]
- call void %10(%struct.btCollisionShape* %4, float %mass, %struct.btQuadWord* %localInertia)
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %11 = call i8* @_Z22btAlignedAllocInternalji(i32 608, i32 16) ; [#uses=19]
- %12 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 0 ; [#uses=1]
- store float %mass, float* %12, align 8
- %13 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 1 ; [#uses=1]
- store %struct.btActionInterface* null, %struct.btActionInterface** %13, align 4
- %14 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 3 ; [#uses=1]
- store %struct.btCollisionShape* %4, %struct.btCollisionShape** %14, align 8
- %15 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %0, align 8 ; [#uses=1]
- store float %16, float* %15, align 4
- %17 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %1, align 4 ; [#uses=1]
- store float %18, float* %17, align 4
- %19 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %2, align 8 ; [#uses=1]
- store float %20, float* %19, align 4
- %21 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %22 = load float* %3, align 4 ; [#uses=1]
- store float %22, float* %21, align 4
- %23 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 5 ; [#uses=1]
- store float 0.000000e+00, float* %23, align 4
- %24 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 6 ; [#uses=1]
- store float 0.000000e+00, float* %24, align 8
- %25 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 7 ; [#uses=1]
- store float 5.000000e-01, float* %25, align 4
- %26 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 8 ; [#uses=1]
- store float 0.000000e+00, float* %26, align 8
- %27 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 9 ; [#uses=1]
- store float 0x3FE99999A0000000, float* %27, align 4
- %28 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 10 ; [#uses=1]
- store float 1.000000e+00, float* %28, align 8
- %29 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 11 ; [#uses=1]
- store i8 0, i8* %29, align 4
- %30 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 12 ; [#uses=1]
- store float 0x3F747AE140000000, float* %30, align 8
- %31 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 13 ; [#uses=1]
- store float 0x3F847AE140000000, float* %31, align 4
- %32 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 14 ; [#uses=1]
- store float 0x3F847AE140000000, float* %32, align 8
- %33 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 15 ; [#uses=1]
- store float 0x3F847AE140000000, float* %33, align 4
- %34 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %34, align 8
- %35 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- %36 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %36, align 8
- %37 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %37, align 4
- %38 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %38, align 8
- %39 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %39, align 4
- %40 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %40, align 8
- %41 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 8
- %43 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- %44 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %44, align 8
- %45 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %45, align 4
- %46 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 1, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %46, align 8
- %47 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 1, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %47, align 4
- %48 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 1, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %48, align 8
- %49 = getelementptr inbounds %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci, i32 0, i32 2, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %49, align 4
- %50 = bitcast i8* %11 to %struct.btRigidBody* ; [#uses=1]
- invoke void @_ZN11btRigidBodyC1ERKNS_27btRigidBodyConstructionInfoE(%struct.btRigidBody* %50, %"struct.btRigidBody::btRigidBodyConstructionInfo"* %rbci)
- to label %bb3 unwind label %lpad
-
-bb3: ; preds = %bb1
- %51 = getelementptr inbounds i8* %11, i32 4 ; [#uses=1]
- %52 = bitcast i8* %51 to float* ; [#uses=1]
- store float 1.000000e+00, float* %52, align 4
- %53 = getelementptr inbounds i8* %11, i32 8 ; [#uses=1]
- %54 = bitcast i8* %53 to float* ; [#uses=1]
- store float 0.000000e+00, float* %54, align 4
- %55 = getelementptr inbounds i8* %11, i32 12 ; [#uses=1]
- %56 = bitcast i8* %55 to float* ; [#uses=1]
- store float 0.000000e+00, float* %56, align 4
- %57 = getelementptr inbounds i8* %11, i32 16 ; [#uses=1]
- %58 = bitcast i8* %57 to float* ; [#uses=1]
- store float 0.000000e+00, float* %58, align 4
- %59 = getelementptr inbounds i8* %11, i32 20 ; [#uses=1]
- %60 = bitcast i8* %59 to float* ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- %61 = getelementptr inbounds i8* %11, i32 24 ; [#uses=1]
- %62 = bitcast i8* %61 to float* ; [#uses=1]
- store float 1.000000e+00, float* %62, align 4
- %63 = getelementptr inbounds i8* %11, i32 28 ; [#uses=1]
- %64 = bitcast i8* %63 to float* ; [#uses=1]
- store float 0.000000e+00, float* %64, align 4
- %65 = getelementptr inbounds i8* %11, i32 32 ; [#uses=1]
- %66 = bitcast i8* %65 to float* ; [#uses=1]
- store float 0.000000e+00, float* %66, align 4
- %67 = getelementptr inbounds i8* %11, i32 36 ; [#uses=1]
- %68 = bitcast i8* %67 to float* ; [#uses=1]
- store float 0.000000e+00, float* %68, align 4
- %69 = getelementptr inbounds i8* %11, i32 40 ; [#uses=1]
- %70 = bitcast i8* %69 to float* ; [#uses=1]
- store float 0.000000e+00, float* %70, align 4
- %71 = getelementptr inbounds i8* %11, i32 44 ; [#uses=1]
- %72 = bitcast i8* %71 to float* ; [#uses=1]
- store float 1.000000e+00, float* %72, align 4
- %73 = getelementptr inbounds i8* %11, i32 48 ; [#uses=1]
- %74 = bitcast i8* %73 to float* ; [#uses=1]
- store float 0.000000e+00, float* %74, align 4
- %75 = getelementptr inbounds i8* %11, i32 52 ; [#uses=1]
- %76 = bitcast i8* %75 to float* ; [#uses=1]
- store float 0.000000e+00, float* %76, align 4
- %77 = getelementptr inbounds i8* %11, i32 56 ; [#uses=1]
- %78 = bitcast i8* %77 to float* ; [#uses=1]
- store float 0.000000e+00, float* %78, align 4
- %79 = getelementptr inbounds i8* %11, i32 60 ; [#uses=1]
- %80 = bitcast i8* %79 to float* ; [#uses=1]
- store float 0.000000e+00, float* %80, align 4
- %81 = getelementptr inbounds i8* %11, i32 64 ; [#uses=1]
- %82 = bitcast i8* %81 to float* ; [#uses=1]
- store float 0.000000e+00, float* %82, align 4
- %83 = getelementptr inbounds i8* %11, i32 236 ; [#uses=1]
- %84 = bitcast i8* %83 to i8** ; [#uses=1]
- store i8* %user_data, i8** %84, align 4
- %85 = bitcast i8* %11 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %85
-
-lpad: ; preds = %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select6 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=0]
-define %struct.btHashInt* @plCreateDynamicsWorld(%struct.btHashInt* %physicsSdkHandle) {
-entry:
- %0 = alloca %struct.btDefaultCollisionConstructionInfo, align 8 ; [#uses=9]
- %1 = call i8* @_Z22btAlignedAllocInternalji(i32 88, i32 16) ; [#uses=4]
- %2 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 0 ; [#uses=1]
- store %struct.btStackAlloc* null, %struct.btStackAlloc** %2, align 8
- %3 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 1 ; [#uses=1]
- store %struct.btPoolAllocator* null, %struct.btPoolAllocator** %3, align 4
- %4 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 2 ; [#uses=1]
- store %struct.btPoolAllocator* null, %struct.btPoolAllocator** %4, align 8
- %5 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 3 ; [#uses=1]
- store i32 4096, i32* %5, align 4
- %6 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 4 ; [#uses=1]
- store i32 4096, i32* %6, align 8
- %7 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 5 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 6 ; [#uses=1]
- store i32 0, i32* %8, align 8
- %9 = getelementptr inbounds %struct.btDefaultCollisionConstructionInfo* %0, i32 0, i32 7 ; [#uses=1]
- store i32 1, i32* %9, align 4
- %10 = icmp eq i8* %1, null ; [#uses=1]
- br i1 %10, label %bb4, label %bb
-
-bb: ; preds = %entry
- %11 = bitcast i8* %1 to %struct.btDefaultCollisionConfiguration* ; [#uses=1]
- invoke void @_ZN31btDefaultCollisionConfigurationC1ERK34btDefaultCollisionConstructionInfo(%struct.btDefaultCollisionConfiguration* %11, %struct.btDefaultCollisionConstructionInfo* %0)
- to label %bb4 unwind label %lpad
-
-bb4: ; preds = %bb, %entry
- %12 = call i8* @_Z22btAlignedAllocInternalji(i32 5388, i32 16) ; [#uses=3]
- %13 = icmp eq i8* %12, null ; [#uses=1]
- br i1 %13, label %bb12, label %bb5
-
-bb5: ; preds = %bb4
- %14 = bitcast i8* %12 to %struct.btCollisionDispatcher* ; [#uses=1]
- %15 = bitcast i8* %1 to %struct.btActionInterface* ; [#uses=1]
- invoke void @_ZN21btCollisionDispatcherC1EP24btCollisionConfiguration(%struct.btCollisionDispatcher* %14, %struct.btActionInterface* %15)
- to label %bb12 unwind label %lpad37
-
-bb12: ; preds = %bb5, %bb4
- %16 = bitcast i8* %12 to %struct.btActionInterface* ; [#uses=1]
- %17 = call i8* @_Z22btAlignedAllocInternalji(i32 116, i32 16) ; [#uses=2]
- %18 = bitcast i8* %17 to %struct.btAxisSweep3* ; [#uses=1]
- %19 = getelementptr inbounds %struct.btHashInt* %physicsSdkHandle, i32 4 ; [#uses=1]
- %20 = bitcast %struct.btHashInt* %19 to %struct.btQuadWord* ; [#uses=1]
- %21 = bitcast %struct.btHashInt* %physicsSdkHandle to %struct.btQuadWord* ; [#uses=1]
- invoke void @_ZN12btAxisSweep3C1ERK9btVector3S2_tP22btOverlappingPairCacheb(%struct.btAxisSweep3* %18, %struct.btQuadWord* %21, %struct.btQuadWord* %20, i16 zeroext 16384, %struct..0btMultiSapOverlapFilterCallback* null, i8 zeroext 0)
- to label %bb17 unwind label %lpad41
-
-bb17: ; preds = %bb12
- %22 = bitcast i8* %17 to %struct.btActionInterface* ; [#uses=1]
- %23 = call i8* @_Z22btAlignedAllocInternalji(i32 128, i32 16) ; [#uses=3]
- %24 = icmp eq i8* %23, null ; [#uses=1]
- br i1 %24, label %bb25, label %bb18
-
-bb18: ; preds = %bb17
- %25 = bitcast i8* %23 to %struct.btSequentialImpulseConstraintSolver* ; [#uses=1]
- invoke void @_ZN35btSequentialImpulseConstraintSolverC1Ev(%struct.btSequentialImpulseConstraintSolver* %25)
- to label %bb25 unwind label %lpad45
-
-bb25: ; preds = %bb18, %bb17
- %26 = call i8* @_Z22btAlignedAllocInternalji(i32 272, i32 16) ; [#uses=3]
- %27 = icmp eq i8* %26, null ; [#uses=1]
- br i1 %27, label %bb33, label %bb26
-
-bb26: ; preds = %bb25
- %28 = bitcast i8* %26 to %struct.btDiscreteDynamicsWorld* ; [#uses=1]
- %29 = bitcast i8* %23 to %struct.btActionInterface* ; [#uses=1]
- %30 = bitcast i8* %1 to %struct.btActionInterface* ; [#uses=1]
- invoke void @_ZN23btDiscreteDynamicsWorldC1EP12btDispatcherP21btBroadphaseInterfaceP18btConstraintSolverP24btCollisionConfiguration(%struct.btDiscreteDynamicsWorld* %28, %struct.btActionInterface* %16, %struct.btActionInterface* %22, %struct.btActionInterface* %29, %struct.btActionInterface* %30)
- to label %bb33 unwind label %lpad49
-
-bb33: ; preds = %bb26, %bb25
- %iftmp.459.0 = bitcast i8* %26 to %struct.btHashInt* ; [#uses=1]
- ret %struct.btHashInt* %iftmp.459.0
-
-lpad: ; preds = %bb
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select36 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-lpad37: ; preds = %bb5
- %eh_ptr38 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select40 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr38, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-lpad41: ; preds = %bb12
- %eh_ptr42 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select44 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr42, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-lpad45: ; preds = %bb18
- %eh_ptr46 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select48 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr46, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-lpad49: ; preds = %bb26
- %eh_ptr50 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select52 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr50, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %Unwind
-
-Unwind: ; preds = %lpad49, %lpad45, %lpad41, %lpad37, %lpad
- %eh_exception.0 = phi i8* [ %eh_ptr50, %lpad49 ], [ %eh_ptr46, %lpad45 ], [ %eh_ptr42, %lpad41 ], [ %eh_ptr38, %lpad37 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-}
-
-; [#uses=1]
-define %struct.btRigidBody* @_ZN17btActionInterface12getFixedBodyEv() align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = load i8* bitcast (i64* @_ZGVZN17btActionInterface12getFixedBodyEvE7s_fixed to i8*), align 8 ; [#uses=1]
- %3 = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %bb9
-
-bb: ; preds = %entry
- %4 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN17btActionInterface12getFixedBodyEvE7s_fixed) nounwind ; [#uses=1]
- %5 = icmp eq i32 %4, 0 ; [#uses=1]
- br i1 %5, label %bb9, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %6, align 8
- %7 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %8 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %8, align 8
- %9 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %9, align 4
- invoke void @_ZN11btRigidBodyC1EfP13btMotionStateP16btCollisionShapeRK9btVector3(%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, float 0.000000e+00, %struct.btActionInterface* null, %struct.btCollisionShape* null, %struct.btQuadWord* %1)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %bb1
- call void @__cxa_guard_release(i64* @_ZGVZN17btActionInterface12getFixedBodyEvE7s_fixed) nounwind
- %10 = call i32 @__cxa_atexit(void (i8*)* @__tcf_088, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- br label %bb9
-
-bb9: ; preds = %invcont, %bb, %entry
- %11 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 0.000000e+00, float* %11, align 8
- %12 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %13, align 8
- %14 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %14, align 4
- call void @_ZN11btRigidBody12setMassPropsEfRK9btVector3(%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, float 0.000000e+00, %struct.btQuadWord* %0)
- ret %struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed
-
-lpad: ; preds = %bb1
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select12 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- call void @__cxa_guard_abort(i64* @_ZGVZN17btActionInterface12getFixedBodyEvE7s_fixed) nounwind
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=4]
-define linkonce_odr void @_ZN11btRigidBody12applyImpulseERK9btVector3S2_(%struct.btRigidBody* %this, %struct.btQuadWord* nocapture %impulse, %struct.btQuadWord* nocapture %rel_pos) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 4 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=4]
- %2 = fcmp une float %1, 0.000000e+00 ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.btQuadWord* %impulse, i32 0, i32 0, i32 2 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = fmul float %4, %6 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %impulse, i32 0, i32 0, i32 1 ; [#uses=2]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fmul float %9, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %impulse, i32 0, i32 0, i32 0 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fmul float %7, %1 ; [#uses=1]
- %19 = fmul float %12, %1 ; [#uses=1]
- %20 = fmul float %17, %1 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fadd float %22, %20 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = fadd float %25, %19 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fadd float %28, %18 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 0 ; [#uses=2]
- %31 = icmp eq float* %30, null ; [#uses=1]
- br i1 %31, label %return, label %bb1
-
-bb1: ; preds = %bb
- %32 = load float* %3, align 4 ; [#uses=1]
- %33 = fmul float %32, %6 ; [#uses=2]
- %34 = load float* %8, align 4 ; [#uses=1]
- %35 = fmul float %34, %11 ; [#uses=2]
- %36 = load float* %13, align 4 ; [#uses=1]
- %37 = fmul float %36, %16 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 0 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = fmul float %39, %35 ; [#uses=1]
- %41 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 1 ; [#uses=1]
- %42 = load float* %41, align 4 ; [#uses=2]
- %43 = fmul float %42, %37 ; [#uses=1]
- %44 = fsub float %40, %43 ; [#uses=3]
- %45 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=2]
- %47 = fmul float %46, %37 ; [#uses=1]
- %48 = fmul float %39, %33 ; [#uses=1]
- %49 = fsub float %47, %48 ; [#uses=3]
- %50 = fmul float %42, %33 ; [#uses=1]
- %51 = fmul float %46, %35 ; [#uses=1]
- %52 = fsub float %50, %51 ; [#uses=3]
- %53 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %52 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fmul float %57, %49 ; [#uses=1]
- %59 = fadd float %55, %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- %62 = fmul float %61, %44 ; [#uses=1]
- %63 = fadd float %59, %62 ; [#uses=1]
- %64 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=1]
- %66 = fmul float %65, %52 ; [#uses=1]
- %67 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- %69 = fmul float %68, %49 ; [#uses=1]
- %70 = fadd float %66, %69 ; [#uses=1]
- %71 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %72, %44 ; [#uses=1]
- %74 = fadd float %70, %73 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fmul float %76, %52 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- %80 = fmul float %79, %49 ; [#uses=1]
- %81 = fadd float %77, %80 ; [#uses=1]
- %82 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fmul float %83, %44 ; [#uses=1]
- %85 = fadd float %81, %84 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 2 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = fmul float %63, %87 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 26, i32 0, i32 1 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = fmul float %74, %90 ; [#uses=1]
- %92 = load float* %30, align 4 ; [#uses=1]
- %93 = fmul float %85, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=2]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fadd float %95, %93 ; [#uses=1]
- store float %96, float* %94, align 4
- %97 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=2]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fadd float %98, %91 ; [#uses=1]
- store float %99, float* %97, align 4
- %100 = getelementptr inbounds %struct.btRigidBody* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=2]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = fadd float %101, %88 ; [#uses=1]
- store float %102, float* %100, align 4
- ret void
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btRaycastVehicle12updateActionEP16btCollisionWorldf(%struct.btRaycastVehicle* %this, %struct.btCollisionWorld* nocapture %collisionWorld, float %step) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32 (...)*** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds i32 (...)** %1, i32 4 ; [#uses=1]
- %3 = load i32 (...)** %2, align 4 ; [#uses=1]
- %4 = bitcast i32 (...)* %3 to void (%struct.btRaycastVehicle*, float)* ; [#uses=1]
- tail call void %4(%struct.btRaycastVehicle* %this, float %step)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btRaycastVehicle19setCoordinateSystemEiii(%struct.btRaycastVehicle* nocapture %this, i32 %rightIndex, i32 %upIndex, i32 %forwardIndex) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 14 ; [#uses=1]
- store i32 %rightIndex, i32* %0, align 4
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 15 ; [#uses=1]
- store i32 %upIndex, i32* %1, align 4
- %2 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 16 ; [#uses=1]
- store i32 %forwardIndex, i32* %2, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld24ClosestRayResultCallbackD1Ev(%"struct.btCollisionWorld::ClosestRayResultCallback"* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld24ClosestRayResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN16btCollisionWorld24ClosestRayResultCallbackD0Ev(%"struct.btCollisionWorld::ClosestRayResultCallback"* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld24ClosestRayResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %"struct.btCollisionWorld::ClosestRayResultCallback"* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr float @_ZN16btCollisionWorld24ClosestRayResultCallback15addSingleResultERNS_14LocalRayResultEb(%"struct.btCollisionWorld::ClosestRayResultCallback"* nocapture %this, %"struct.btCollisionWorld::LocalRayResult"* nocapture %rayResult, i8 zeroext %normalInWorldSpace) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 3 ; [#uses=3]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %1, float* %2, align 4
- %3 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btCollisionObject** %3, align 4 ; [#uses=10]
- %5 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store %struct.btCollisionObject* %4, %struct.btCollisionObject** %5, align 4
- %toBool = icmp eq i8 %normalInWorldSpace, 0 ; [#uses=1]
- br i1 %toBool, label %bb1, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- br label %bb2
-
-bb1: ; preds = %entry
- %18 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=3]
- %22 = fmul float %19, %21 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=3]
- %27 = fmul float %24, %26 ; [#uses=1]
- %28 = fadd float %22, %27 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btCollisionWorld::LocalRayResult"* %rayResult, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=3]
- %33 = fmul float %30, %32 ; [#uses=1]
- %34 = fadd float %28, %33 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = fmul float %36, %21 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=1]
- %40 = fmul float %39, %26 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- %44 = fmul float %43, %32 ; [#uses=1]
- %45 = fadd float %41, %44 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- %48 = fmul float %47, %21 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fmul float %50, %26 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btCollisionObject* %4, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fmul float %54, %32 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %56, float* %57, align 4
- %58 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %45, float* %58, align 4
- %59 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %34, float* %59, align 4
- %60 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 4
- br label %bb2
-
-bb2: ; preds = %bb1, %bb
- %61 = load float* %0, align 4 ; [#uses=4]
- %62 = fsub float 1.000000e+00, %61 ; [#uses=3]
- %63 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- %65 = fmul float %64, %62 ; [#uses=1]
- %66 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- %68 = fmul float %67, %61 ; [#uses=1]
- %69 = fadd float %65, %68 ; [#uses=1]
- %70 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %69, float* %70, align 4
- %71 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=1]
- %73 = fmul float %72, %62 ; [#uses=1]
- %74 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fmul float %75, %61 ; [#uses=1]
- %77 = fadd float %73, %76 ; [#uses=1]
- %78 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %77, float* %78, align 4
- %79 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = fmul float %80, %62 ; [#uses=1]
- %82 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %82, align 4 ; [#uses=1]
- %84 = fmul float %83, %61 ; [#uses=1]
- %85 = fadd float %81, %84 ; [#uses=1]
- %86 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %85, float* %86, align 4
- %87 = load float* %0, align 4 ; [#uses=1]
- ret float %87
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicle11defaultInitERKNS_15btVehicleTuningE(%struct.btRaycastVehicle* nocapture %this, %"struct.btRaycastVehicle::btVehicleTuning"* nocapture %tuning) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %0, align 4
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- ret void
-}
-
-; [#uses=2]
-define linkonce_odr void @_ZN11btWheelInfoC1ERKS_(%struct.btWheelInfo* %this, %struct.btWheelInfo* %unnamed_arg) nounwind align 2 {
-entry:
- %0 = bitcast %struct.btWheelInfo* %this to i8* ; [#uses=1]
- %1 = bitcast %struct.btWheelInfo* %unnamed_arg to i8* ; [#uses=1]
- tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %0, i8* %1, i32 92, i32 4, i1 false)
- %2 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- store float %28, float* %26, align 4
- %29 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- store float %31, float* %29, align 4
- %32 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- store float %34, float* %32, align 4
- %35 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- store float %37, float* %35, align 4
- %38 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %39 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %40 = load float* %39, align 4 ; [#uses=1]
- store float %40, float* %38, align 4
- %41 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %43 = load float* %42, align 4 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- store float %55, float* %53, align 4
- %56 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=1]
- store float %58, float* %56, align 4
- %59 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %61 = load float* %60, align 4 ; [#uses=1]
- store float %61, float* %59, align 4
- %62 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %63 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %64 = load float* %63, align 4 ; [#uses=1]
- store float %64, float* %62, align 4
- %65 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %66 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %67 = load float* %66, align 4 ; [#uses=1]
- store float %67, float* %65, align 4
- %68 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- store float %70, float* %68, align 4
- %71 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- store float %73, float* %71, align 4
- %74 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- store float %76, float* %74, align 4
- %77 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=1]
- store float %79, float* %77, align 4
- %80 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- store float %82, float* %80, align 4
- %83 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- store float %85, float* %83, align 4
- %86 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 5 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 5 ; [#uses=1]
- store float %87, float* %88, align 4
- %89 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 6 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 6 ; [#uses=1]
- store float %90, float* %91, align 4
- %92 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 7 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 7 ; [#uses=1]
- store float %93, float* %94, align 4
- %95 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 8 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 8 ; [#uses=1]
- store float %96, float* %97, align 4
- %98 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 9 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 9 ; [#uses=1]
- store float %99, float* %100, align 4
- %101 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 10 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 10 ; [#uses=1]
- store float %102, float* %103, align 4
- %104 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 11 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 11 ; [#uses=1]
- store float %105, float* %106, align 4
- %107 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 12 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 12 ; [#uses=1]
- store float %108, float* %109, align 4
- %110 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 13 ; [#uses=1]
- %111 = load float* %110, align 4 ; [#uses=1]
- %112 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 13 ; [#uses=1]
- store float %111, float* %112, align 4
- %113 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 14 ; [#uses=1]
- %114 = load float* %113, align 4 ; [#uses=1]
- %115 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 14 ; [#uses=1]
- store float %114, float* %115, align 4
- %116 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 15 ; [#uses=1]
- %117 = load float* %116, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 15 ; [#uses=1]
- store float %117, float* %118, align 4
- %119 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 16 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 16 ; [#uses=1]
- store float %120, float* %121, align 4
- %122 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 17 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 17 ; [#uses=1]
- store float %123, float* %124, align 4
- %125 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 18 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 18 ; [#uses=1]
- store float %126, float* %127, align 4
- %128 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 19 ; [#uses=1]
- %129 = load i8* %128, align 4 ; [#uses=1]
- %130 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 19 ; [#uses=1]
- store i8 %129, i8* %130, align 4
- %131 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 20 ; [#uses=1]
- %132 = load i8** %131, align 4 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 20 ; [#uses=1]
- store i8* %132, i8** %133, align 4
- %134 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 21 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=1]
- %136 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 21 ; [#uses=1]
- store float %135, float* %136, align 4
- %137 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 22 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 22 ; [#uses=1]
- store float %138, float* %139, align 4
- %140 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 23 ; [#uses=1]
- %141 = load float* %140, align 4 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 23 ; [#uses=1]
- store float %141, float* %142, align 4
- %143 = getelementptr inbounds %struct.btWheelInfo* %unnamed_arg, i32 0, i32 24 ; [#uses=1]
- %144 = load float* %143, align 4 ; [#uses=1]
- %145 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 24 ; [#uses=1]
- store float %144, float* %145, align 4
- ret void
-}
-
-; [#uses=0]
-define %struct.btTransform* @_ZNK16btRaycastVehicle24getChassisWorldTransformEv(%struct.btRaycastVehicle* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- ret %struct.btTransform* %2
-}
-
-; [#uses=3]
-define void @_ZN16btRaycastVehicle23updateWheelTransformsWSER11btWheelInfob(%struct.btRaycastVehicle* nocapture %this, %struct.btWheelInfo* nocapture %wheel, i8 zeroext %interpolatedTransform) align 2 {
-entry:
- %chassisTrans = alloca %struct.btTransform, align 8 ; [#uses=17]
- %0 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 6 ; [#uses=1]
- store i8 0, i8* %0, align 4
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- %2 = load %struct.btRigidBody** %1, align 4 ; [#uses=17]
- %3 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=3]
- store float %5, float* %3, align 8
- %6 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=3]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=3]
- store float %11, float* %9, align 8
- %12 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=3]
- store float %17, float* %15, align 8
- %18 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=3]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=3]
- store float %23, float* %21, align 8
- %24 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=3]
- store float %29, float* %27, align 8
- %30 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=3]
- store float %32, float* %30, align 4
- %33 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=3]
- store float %35, float* %33, align 8
- %36 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- store float %38, float* %36, align 4
- %39 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %40 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %41 = load float* %40, align 4 ; [#uses=3]
- store float %41, float* %39, align 8
- %42 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %43 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %44 = load float* %43, align 4 ; [#uses=3]
- store float %44, float* %42, align 4
- %45 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %46 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=3]
- store float %47, float* %45, align 8
- %48 = getelementptr inbounds %struct.btTransform* %chassisTrans, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 0, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %toBoolnot = icmp eq i8 %interpolatedTransform, 0 ; [#uses=1]
- br i1 %toBoolnot, label %bb9, label %bb
-
-bb: ; preds = %entry
- %51 = getelementptr inbounds %struct.btRigidBody* %2, i32 0, i32 20 ; [#uses=1]
- %52 = load %struct.btActionInterface** %51, align 4 ; [#uses=3]
- %53 = icmp eq %struct.btActionInterface* %52, null ; [#uses=1]
- br i1 %53, label %bb9, label %bb8
-
-bb8: ; preds = %bb
- %54 = getelementptr inbounds %struct.btActionInterface* %52, i32 0, i32 0 ; [#uses=1]
- %55 = load i32 (...)*** %54, align 4 ; [#uses=1]
- %56 = getelementptr inbounds i32 (...)** %55, i32 2 ; [#uses=1]
- %57 = load i32 (...)** %56, align 4 ; [#uses=1]
- %58 = bitcast i32 (...)* %57 to void (%struct.btActionInterface*, %struct.btTransform*)* ; [#uses=1]
- call void %58(%struct.btActionInterface* %52, %struct.btTransform* %chassisTrans)
- %.pre = load float* %27, align 8 ; [#uses=1]
- %.pre18 = load float* %30, align 4 ; [#uses=1]
- %.pre19 = load float* %33, align 8 ; [#uses=1]
- %.pre20 = load float* %45, align 8 ; [#uses=1]
- %.pre21 = load float* %15, align 8 ; [#uses=1]
- %.pre22 = load float* %18, align 4 ; [#uses=1]
- %.pre23 = load float* %21, align 8 ; [#uses=1]
- %.pre24 = load float* %42, align 4 ; [#uses=1]
- %.pre25 = load float* %3, align 8 ; [#uses=1]
- %.pre26 = load float* %6, align 4 ; [#uses=1]
- %.pre27 = load float* %9, align 8 ; [#uses=1]
- %.pre28 = load float* %39, align 8 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb8, %bb, %entry
- %59 = phi float [ %41, %entry ], [ %41, %bb ], [ %.pre28, %bb8 ] ; [#uses=1]
- %60 = phi float [ %11, %entry ], [ %11, %bb ], [ %.pre27, %bb8 ] ; [#uses=3]
- %61 = phi float [ %8, %entry ], [ %8, %bb ], [ %.pre26, %bb8 ] ; [#uses=3]
- %62 = phi float [ %5, %entry ], [ %5, %bb ], [ %.pre25, %bb8 ] ; [#uses=3]
- %63 = phi float [ %44, %entry ], [ %44, %bb ], [ %.pre24, %bb8 ] ; [#uses=1]
- %64 = phi float [ %23, %entry ], [ %23, %bb ], [ %.pre23, %bb8 ] ; [#uses=3]
- %65 = phi float [ %20, %entry ], [ %20, %bb ], [ %.pre22, %bb8 ] ; [#uses=3]
- %66 = phi float [ %17, %entry ], [ %17, %bb ], [ %.pre21, %bb8 ] ; [#uses=3]
- %67 = phi float [ %47, %entry ], [ %47, %bb ], [ %.pre20, %bb8 ] ; [#uses=1]
- %68 = phi float [ %35, %entry ], [ %35, %bb ], [ %.pre19, %bb8 ] ; [#uses=3]
- %69 = phi float [ %32, %entry ], [ %32, %bb ], [ %.pre18, %bb8 ] ; [#uses=3]
- %70 = phi float [ %29, %entry ], [ %29, %bb ], [ %.pre, %bb8 ] ; [#uses=3]
- %71 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %72 = load float* %71, align 4 ; [#uses=3]
- %73 = fmul float %70, %72 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=3]
- %76 = fmul float %69, %75 ; [#uses=1]
- %77 = fadd float %73, %76 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %79 = load float* %78, align 4 ; [#uses=3]
- %80 = fmul float %68, %79 ; [#uses=1]
- %81 = fadd float %77, %80 ; [#uses=1]
- %82 = fadd float %81, %67 ; [#uses=1]
- %83 = fmul float %66, %72 ; [#uses=1]
- %84 = fmul float %65, %75 ; [#uses=1]
- %85 = fadd float %83, %84 ; [#uses=1]
- %86 = fmul float %64, %79 ; [#uses=1]
- %87 = fadd float %85, %86 ; [#uses=1]
- %88 = fadd float %87, %63 ; [#uses=1]
- %89 = fmul float %62, %72 ; [#uses=1]
- %90 = fmul float %61, %75 ; [#uses=1]
- %91 = fadd float %89, %90 ; [#uses=1]
- %92 = fmul float %60, %79 ; [#uses=1]
- %93 = fadd float %91, %92 ; [#uses=1]
- %94 = fadd float %93, %59 ; [#uses=1]
- %95 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %94, float* %95, align 4
- %96 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %88, float* %96, align 4
- %97 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %82, float* %97, align 4
- %98 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %98, align 4
- %99 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=3]
- %101 = fmul float %70, %100 ; [#uses=1]
- %102 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %103 = load float* %102, align 4 ; [#uses=3]
- %104 = fmul float %69, %103 ; [#uses=1]
- %105 = fadd float %101, %104 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=3]
- %108 = fmul float %68, %107 ; [#uses=1]
- %109 = fadd float %105, %108 ; [#uses=1]
- %110 = fmul float %66, %100 ; [#uses=1]
- %111 = fmul float %65, %103 ; [#uses=1]
- %112 = fadd float %110, %111 ; [#uses=1]
- %113 = fmul float %64, %107 ; [#uses=1]
- %114 = fadd float %112, %113 ; [#uses=1]
- %115 = fmul float %62, %100 ; [#uses=1]
- %116 = fmul float %61, %103 ; [#uses=1]
- %117 = fadd float %115, %116 ; [#uses=1]
- %118 = fmul float %60, %107 ; [#uses=1]
- %119 = fadd float %117, %118 ; [#uses=1]
- %120 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %119, float* %120, align 4
- %121 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %114, float* %121, align 4
- %122 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %109, float* %122, align 4
- %123 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %123, align 4
- %124 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %125 = load float* %124, align 4 ; [#uses=3]
- %126 = fmul float %70, %125 ; [#uses=1]
- %127 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %128 = load float* %127, align 4 ; [#uses=3]
- %129 = fmul float %69, %128 ; [#uses=1]
- %130 = fadd float %126, %129 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=3]
- %133 = fmul float %68, %132 ; [#uses=1]
- %134 = fadd float %130, %133 ; [#uses=1]
- %135 = fmul float %66, %125 ; [#uses=1]
- %136 = fmul float %65, %128 ; [#uses=1]
- %137 = fadd float %135, %136 ; [#uses=1]
- %138 = fmul float %64, %132 ; [#uses=1]
- %139 = fadd float %137, %138 ; [#uses=1]
- %140 = fmul float %62, %125 ; [#uses=1]
- %141 = fmul float %61, %128 ; [#uses=1]
- %142 = fadd float %140, %141 ; [#uses=1]
- %143 = fmul float %60, %132 ; [#uses=1]
- %144 = fadd float %142, %143 ; [#uses=1]
- %145 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- store float %144, float* %145, align 4
- %146 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- store float %139, float* %146, align 4
- %147 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- store float %134, float* %147, align 4
- %148 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 5, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %148, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN19btWheelContactPointC1EP11btRigidBodyS1_RK9btVector3S4_f(%struct.btWheelContactPoint* nocapture %this, %struct.btRigidBody* %body0, %struct.btRigidBody* %body1, %struct.btQuadWord* nocapture %frictionPosWorld, %struct.btQuadWord* nocapture %frictionDirectionWorld, float %maxImpulse) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btRigidBody* %body0, %struct.btRigidBody** %0, align 4
- %1 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.btRigidBody* %body1, %struct.btRigidBody** %1, align 4
- %2 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %frictionPosWorld, i32 0, i32 0, i32 0 ; [#uses=2]
- %4 = load float* %3, align 4 ; [#uses=1]
- store float %4, float* %2, align 4
- %5 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %frictionPosWorld, i32 0, i32 0, i32 1 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- store float %7, float* %5, align 4
- %8 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %frictionPosWorld, i32 0, i32 0, i32 2 ; [#uses=2]
- %10 = load float* %9, align 4 ; [#uses=1]
- store float %10, float* %8, align 4
- %11 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %frictionPosWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=1]
- store float %13, float* %11, align 4
- %14 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %frictionDirectionWorld, i32 0, i32 0, i32 0 ; [#uses=2]
- %16 = load float* %15, align 4 ; [#uses=1]
- store float %16, float* %14, align 4
- %17 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %frictionDirectionWorld, i32 0, i32 0, i32 1 ; [#uses=2]
- %19 = load float* %18, align 4 ; [#uses=1]
- store float %19, float* %17, align 4
- %20 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %frictionDirectionWorld, i32 0, i32 0, i32 2 ; [#uses=2]
- %22 = load float* %21, align 4 ; [#uses=1]
- store float %22, float* %20, align 4
- %23 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btQuadWord* %frictionDirectionWorld, i32 0, i32 0, i32 3 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- store float %25, float* %23, align 4
- %26 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 5 ; [#uses=1]
- store float %maxImpulse, float* %26, align 4
- %27 = load float* %9, align 4 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = fsub float %27, %29 ; [#uses=4]
- %31 = load float* %6, align 4 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %31, %33 ; [#uses=4]
- %35 = load float* %3, align 4 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = fsub float %35, %37 ; [#uses=4]
- %39 = load float* %18, align 4 ; [#uses=6]
- %40 = fmul float %38, %39 ; [#uses=1]
- %41 = load float* %15, align 4 ; [#uses=6]
- %42 = fmul float %34, %41 ; [#uses=1]
- %43 = fsub float %40, %42 ; [#uses=3]
- %44 = fmul float %30, %41 ; [#uses=1]
- %45 = load float* %21, align 4 ; [#uses=6]
- %46 = fmul float %38, %45 ; [#uses=1]
- %47 = fsub float %44, %46 ; [#uses=3]
- %48 = fmul float %34, %45 ; [#uses=1]
- %49 = fmul float %30, %39 ; [#uses=1]
- %50 = fsub float %48, %49 ; [#uses=3]
- %51 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fmul float %52, %50 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=1]
- %56 = fmul float %55, %47 ; [#uses=1]
- %57 = fadd float %53, %56 ; [#uses=1]
- %58 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=1]
- %60 = fmul float %59, %43 ; [#uses=1]
- %61 = fadd float %57, %60 ; [#uses=2]
- %62 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %63 = load float* %62, align 4 ; [#uses=1]
- %64 = fmul float %63, %50 ; [#uses=1]
- %65 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %66 = load float* %65, align 4 ; [#uses=1]
- %67 = fmul float %66, %47 ; [#uses=1]
- %68 = fadd float %64, %67 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %71 = fmul float %70, %43 ; [#uses=1]
- %72 = fadd float %68, %71 ; [#uses=2]
- %73 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=1]
- %75 = fmul float %74, %50 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %77 = load float* %76, align 4 ; [#uses=1]
- %78 = fmul float %77, %47 ; [#uses=1]
- %79 = fadd float %75, %78 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = fmul float %81, %43 ; [#uses=1]
- %83 = fadd float %79, %82 ; [#uses=2]
- %84 = fmul float %83, %34 ; [#uses=1]
- %85 = fmul float %72, %38 ; [#uses=1]
- %86 = fsub float %84, %85 ; [#uses=1]
- %87 = fmul float %61, %38 ; [#uses=1]
- %88 = fmul float %83, %30 ; [#uses=1]
- %89 = fsub float %87, %88 ; [#uses=1]
- %90 = fmul float %72, %30 ; [#uses=1]
- %91 = fmul float %61, %34 ; [#uses=1]
- %92 = fsub float %90, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btRigidBody* %body0, i32 0, i32 4 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %41, %92 ; [#uses=1]
- %96 = fmul float %39, %89 ; [#uses=1]
- %97 = fadd float %95, %96 ; [#uses=1]
- %98 = fmul float %45, %86 ; [#uses=1]
- %99 = fadd float %97, %98 ; [#uses=1]
- %100 = fadd float %94, %99 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fsub float %27, %102 ; [#uses=4]
- %104 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=1]
- %106 = fsub float %31, %105 ; [#uses=4]
- %107 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %108 = load float* %107, align 4 ; [#uses=1]
- %109 = fsub float %35, %108 ; [#uses=4]
- %110 = fmul float %109, %39 ; [#uses=1]
- %111 = fmul float %106, %41 ; [#uses=1]
- %112 = fsub float %110, %111 ; [#uses=3]
- %113 = fmul float %103, %41 ; [#uses=1]
- %114 = fmul float %109, %45 ; [#uses=1]
- %115 = fsub float %113, %114 ; [#uses=3]
- %116 = fmul float %106, %45 ; [#uses=1]
- %117 = fmul float %103, %39 ; [#uses=1]
- %118 = fsub float %116, %117 ; [#uses=3]
- %119 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %120 = load float* %119, align 4 ; [#uses=1]
- %121 = fmul float %120, %118 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %123 = load float* %122, align 4 ; [#uses=1]
- %124 = fmul float %123, %115 ; [#uses=1]
- %125 = fadd float %121, %124 ; [#uses=1]
- %126 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %127 = load float* %126, align 4 ; [#uses=1]
- %128 = fmul float %127, %112 ; [#uses=1]
- %129 = fadd float %125, %128 ; [#uses=2]
- %130 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %131 = load float* %130, align 4 ; [#uses=1]
- %132 = fmul float %131, %118 ; [#uses=1]
- %133 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %134 = load float* %133, align 4 ; [#uses=1]
- %135 = fmul float %134, %115 ; [#uses=1]
- %136 = fadd float %132, %135 ; [#uses=1]
- %137 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %138 = load float* %137, align 4 ; [#uses=1]
- %139 = fmul float %138, %112 ; [#uses=1]
- %140 = fadd float %136, %139 ; [#uses=2]
- %141 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %142 = load float* %141, align 4 ; [#uses=1]
- %143 = fmul float %142, %118 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %145 = load float* %144, align 4 ; [#uses=1]
- %146 = fmul float %145, %115 ; [#uses=1]
- %147 = fadd float %143, %146 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %149 = load float* %148, align 4 ; [#uses=1]
- %150 = fmul float %149, %112 ; [#uses=1]
- %151 = fadd float %147, %150 ; [#uses=2]
- %152 = fmul float %151, %106 ; [#uses=1]
- %153 = fmul float %140, %109 ; [#uses=1]
- %154 = fsub float %152, %153 ; [#uses=1]
- %155 = fmul float %129, %109 ; [#uses=1]
- %156 = fmul float %151, %103 ; [#uses=1]
- %157 = fsub float %155, %156 ; [#uses=1]
- %158 = fmul float %140, %103 ; [#uses=1]
- %159 = fmul float %129, %106 ; [#uses=1]
- %160 = fsub float %158, %159 ; [#uses=1]
- %161 = getelementptr inbounds %struct.btRigidBody* %body1, i32 0, i32 4 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = fmul float %41, %160 ; [#uses=1]
- %164 = fmul float %39, %157 ; [#uses=1]
- %165 = fadd float %163, %164 ; [#uses=1]
- %166 = fmul float %45, %154 ; [#uses=1]
- %167 = fadd float %165, %166 ; [#uses=1]
- %168 = fadd float %162, %167 ; [#uses=1]
- %169 = fadd float %100, %168 ; [#uses=1]
- %170 = fdiv float 1.000000e+00, %169 ; [#uses=1]
- %171 = getelementptr inbounds %struct.btWheelContactPoint* %this, i32 0, i32 4 ; [#uses=1]
- store float %170, float* %171, align 4
- ret void
-}
-
-; [#uses=0]
-define float @_Z19calcRollingFrictionR19btWheelContactPoint(%struct.btWheelContactPoint* nocapture %contactPoint) nounwind readonly {
-entry:
- %0 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=9]
- %2 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fsub float %3, %5 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fsub float %8, %10 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fsub float %13, %15 ; [#uses=2]
- %17 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 1 ; [#uses=1]
- %18 = load %struct.btRigidBody** %17, align 4 ; [#uses=9]
- %19 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = fsub float %3, %20 ; [#uses=2]
- %22 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fsub float %8, %23 ; [#uses=2]
- %25 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = fsub float %13, %26 ; [#uses=2]
- %28 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 5 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=3]
- %30 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=2]
- %32 = fmul float %31, %11 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=2]
- %35 = fmul float %34, %16 ; [#uses=1]
- %36 = fsub float %32, %35 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=2]
- %39 = fmul float %38, %16 ; [#uses=1]
- %40 = fmul float %31, %6 ; [#uses=1]
- %41 = fsub float %39, %40 ; [#uses=1]
- %42 = fmul float %34, %6 ; [#uses=1]
- %43 = fmul float %38, %11 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=1]
- %45 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- %47 = fadd float %46, %36 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %49 = load float* %48, align 4 ; [#uses=1]
- %50 = fadd float %49, %41 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- %53 = fadd float %52, %44 ; [#uses=1]
- %54 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %54, align 4 ; [#uses=2]
- %56 = fmul float %55, %24 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %58 = load float* %57, align 4 ; [#uses=2]
- %59 = fmul float %58, %27 ; [#uses=1]
- %60 = fsub float %56, %59 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=2]
- %63 = fmul float %62, %27 ; [#uses=1]
- %64 = fmul float %55, %21 ; [#uses=1]
- %65 = fsub float %63, %64 ; [#uses=1]
- %66 = fmul float %58, %21 ; [#uses=1]
- %67 = fmul float %62, %24 ; [#uses=1]
- %68 = fsub float %66, %67 ; [#uses=1]
- %69 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %70 = load float* %69, align 4 ; [#uses=1]
- %71 = fadd float %70, %60 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %73 = load float* %72, align 4 ; [#uses=1]
- %74 = fadd float %73, %65 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btRigidBody* %18, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %76 = load float* %75, align 4 ; [#uses=1]
- %77 = fadd float %76, %68 ; [#uses=1]
- %78 = fsub float %47, %71 ; [#uses=1]
- %79 = fsub float %50, %74 ; [#uses=1]
- %80 = fsub float %53, %77 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = fmul float %82, %80 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fmul float %85, %79 ; [#uses=1]
- %87 = fadd float %83, %86 ; [#uses=1]
- %88 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %89 = load float* %88, align 4 ; [#uses=1]
- %90 = fmul float %89, %78 ; [#uses=1]
- %91 = fadd float %87, %90 ; [#uses=1]
- %92 = fsub float -0.000000e+00, %91 ; [#uses=1]
- %93 = getelementptr inbounds %struct.btWheelContactPoint* %contactPoint, i32 0, i32 4 ; [#uses=1]
- %94 = load float* %93, align 4 ; [#uses=1]
- %95 = fmul float %94, %92 ; [#uses=2]
- %96 = fcmp olt float %29, %95 ; [#uses=1]
- %j1.1 = select i1 %96, float %29, float %95 ; [#uses=2]
- %97 = fsub float -0.000000e+00, %29 ; [#uses=2]
- %98 = fcmp olt float %j1.1, %97 ; [#uses=1]
- %j1.0 = select i1 %98, float %97, float %j1.1 ; [#uses=1]
- ret float %j1.0
-}
-
-; [#uses=0]
-define %struct.btWheelInfo* @_ZN16btRaycastVehicle12getWheelInfoEi(%struct.btRaycastVehicle* nocapture %this, i32 %index) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %index ; [#uses=1]
- ret %struct.btWheelInfo* %2
-}
-
-; [#uses=1]
-define void @_ZN16btRaycastVehicle9debugDrawEP12btIDebugDraw(%struct.btRaycastVehicle* nocapture %this, %struct.btActionInterface* %debugDrawer) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %wheelColor = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %wheelPosWS = alloca %struct.btQuadWord, align 8 ; [#uses=6]
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=2]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = icmp sgt i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %4 = getelementptr inbounds %struct.btQuadWord* %wheelColor, i32 0, i32 0, i32 0 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %wheelColor, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %wheelColor, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %wheelColor, i32 0, i32 0, i32 3 ; [#uses=2]
- %8 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btQuadWord* %wheelPosWS, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %wheelPosWS, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %wheelPosWS, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %wheelPosWS, i32 0, i32 0, i32 3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 14 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btActionInterface* %debugDrawer, i32 0, i32 0 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %v.09 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb ] ; [#uses=10]
- %tmp = add i32 %v.09, 1 ; [#uses=2]
- store float 0.000000e+00, float* %4, align 8
- store float 1.000000e+00, float* %5, align 4
- store float 1.000000e+00, float* %6, align 8
- store float 0.000000e+00, float* %7, align 4
- %19 = load %struct.btWheelInfo** %8, align 4 ; [#uses=8]
- %scevgep = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 0, i32 6 ; [#uses=1]
- %20 = load i8* %scevgep, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %20, 0 ; [#uses=1]
- %storemerge = select i1 %toBool, float 1.000000e+00, float 0.000000e+00 ; [#uses=1]
- store float %storemerge, float* %4, align 8
- store float 0.000000e+00, float* %5, align 4
- store float 1.000000e+00, float* %6, align 8
- store float 0.000000e+00, float* %7, align 4
- %scevgep10 = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %scevgep10, align 4 ; [#uses=2]
- store float %21, float* %9, align 8
- %scevgep11 = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %22 = load float* %scevgep11, align 4 ; [#uses=2]
- store float %22, float* %10, align 4
- %scevgep12 = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %23 = load float* %scevgep12, align 4 ; [#uses=2]
- store float %23, float* %11, align 8
- %scevgep13 = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %scevgep13, align 4 ; [#uses=1]
- store float %24, float* %12, align 4
- %25 = load i32* %13, align 4 ; [#uses=3]
- %scevgep16 = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 1, i32 0, i32 0, i32 0, i32 0, i32 %25 ; [#uses=1]
- %26 = load float* %scevgep16, align 4 ; [#uses=1]
- %scevgep15 = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 1, i32 0, i32 0, i32 1, i32 0, i32 %25 ; [#uses=1]
- %27 = load float* %scevgep15, align 4 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btWheelInfo* %19, i32 %v.09, i32 1, i32 0, i32 0, i32 2, i32 0, i32 %25 ; [#uses=1]
- %28 = load float* %scevgep14, align 4 ; [#uses=1]
- %29 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %30 = getelementptr inbounds i32 (...)** %29, i32 2 ; [#uses=1]
- %31 = load i32 (...)** %30, align 4 ; [#uses=1]
- %32 = fadd float %23, %28 ; [#uses=1]
- %33 = fadd float %22, %27 ; [#uses=1]
- %34 = fadd float %21, %26 ; [#uses=1]
- store float %34, float* %15, align 8
- store float %33, float* %16, align 4
- store float %32, float* %17, align 8
- store float 0.000000e+00, float* %18, align 4
- %35 = bitcast i32 (...)* %31 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- call void %35(%struct.btActionInterface* %debugDrawer, %struct.btQuadWord* %wheelPosWS, %struct.btQuadWord* %0, %struct.btQuadWord* %wheelColor)
- %36 = load i32 (...)*** %14, align 4 ; [#uses=1]
- %37 = getelementptr inbounds i32 (...)** %36, i32 2 ; [#uses=1]
- %38 = load i32 (...)** %37, align 4 ; [#uses=1]
- %39 = load %struct.btWheelInfo** %8, align 4 ; [#uses=1]
- %40 = bitcast i32 (...)* %38 to void (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %struct.btQuadWord*)* ; [#uses=1]
- %scevgep17 = getelementptr %struct.btWheelInfo* %39, i32 %v.09, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep1718 = bitcast float* %scevgep17 to %struct.btQuadWord* ; [#uses=1]
- call void %40(%struct.btActionInterface* %debugDrawer, %struct.btQuadWord* %wheelPosWS, %struct.btQuadWord* %scevgep1718, %struct.btQuadWord* %wheelColor)
- %41 = load i32* %1, align 4 ; [#uses=1]
- %42 = icmp sgt i32 %41, %tmp ; [#uses=1]
- br i1 %42, label %bb, label %return
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicle8setBrakeEfi(%struct.btRaycastVehicle* nocapture %this, float %brake, i32 %wheelIndex) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 18 ; [#uses=1]
- store float %brake, float* %2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicle16applyEngineForceEfi(%struct.btRaycastVehicle* nocapture %this, float %force, i32 %wheel) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheel, i32 17 ; [#uses=1]
- store float %force, float* %2, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicle16setSteeringValueEfi(%struct.btRaycastVehicle* nocapture %this, float %steering, i32 %wheel) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheel, i32 12 ; [#uses=1]
- store float %steering, float* %2, align 4
- ret void
-}
-
-; [#uses=0]
-define %struct.btWheelInfo* @_ZNK16btRaycastVehicle12getWheelInfoEi(%struct.btRaycastVehicle* nocapture %this, i32 %index) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %index ; [#uses=1]
- ret %struct.btWheelInfo* %2
-}
-
-; [#uses=0]
-define float @_ZNK16btRaycastVehicle16getSteeringValueEi(%struct.btRaycastVehicle* nocapture %this, i32 %wheel) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheel, i32 12 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- ret float %3
-}
-
-; [#uses=0]
-define %struct.btTransform* @_ZNK16btRaycastVehicle19getWheelTransformWSEi(%struct.btRaycastVehicle* nocapture %this, i32 %wheelIndex) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1 ; [#uses=1]
- ret %struct.btTransform* %2
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btDefaultVehicleRaycasterD0Ev(%struct.btDefaultVehicleRaycaster* %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultVehicleRaycaster* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV25btDefaultVehicleRaycaster, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = bitcast %struct.btDefaultVehicleRaycaster* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN25btDefaultVehicleRaycasterD1Ev(%struct.btDefaultVehicleRaycaster* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btDefaultVehicleRaycaster* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([5 x i32 (...)*]* @_ZTV25btDefaultVehicleRaycaster, i32 0, i32 2), i32 (...)*** %0, align 4
- ret void
-}
-
-; [#uses=1]
-define i8* @_ZN25btDefaultVehicleRaycaster7castRayERK9btVector3S2_RN18btVehicleRaycaster24btVehicleRaycasterResultE(%struct.btDefaultVehicleRaycaster* nocapture %this, %struct.btQuadWord* %from, %struct.btQuadWord* %to, %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* nocapture %result) align 2 {
-entry:
- %rayCallback = alloca %"struct.btCollisionWorld::ClosestRayResultCallback", align 8 ; [#uses=23]
- %0 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 0, i32 0 ; [#uses=2]
- %1 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 0, i32 1 ; [#uses=2]
- store float 1.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 0, i32 2 ; [#uses=2]
- store %struct.btCollisionObject* null, %struct.btCollisionObject** %2, align 8
- %3 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 0, i32 3 ; [#uses=1]
- store i16 1, i16* %3, align 4
- %4 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 0, i32 4 ; [#uses=1]
- store i16 -1, i16* %4, align 2
- %5 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 0, i32 5 ; [#uses=1]
- store i32 0, i32* %5, align 8
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld24ClosestRayResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 8
- %6 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- store float %8, float* %6, align 4
- %9 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- store float %11, float* %9, align 4
- %12 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- store float %14, float* %12, align 4
- %15 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %from, i32 0, i32 0, i32 3 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- store float %17, float* %15, align 4
- %18 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- store float %20, float* %18, align 4
- %21 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=1]
- store float %23, float* %21, align 4
- %24 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 2 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- store float %26, float* %24, align 4
- %27 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %to, i32 0, i32 0, i32 3 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- store float %29, float* %27, align 4
- %30 = getelementptr inbounds %struct.btDefaultVehicleRaycaster* %this, i32 0, i32 1 ; [#uses=1]
- %31 = load %struct.btDynamicsWorld** %30, align 4 ; [#uses=2]
- %32 = getelementptr inbounds %struct.btDynamicsWorld* %31, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = load i32 (...)*** %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds i32 (...)** %33, i32 7 ; [#uses=1]
- %35 = load i32 (...)** %34, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btDynamicsWorld* %31, i32 0, i32 0 ; [#uses=1]
- %37 = bitcast i32 (...)* %35 to void (%struct.btCollisionWorld*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btCollisionWorld::RayResultCallback"*)* ; [#uses=1]
- %38 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 0 ; [#uses=1]
- invoke void %37(%struct.btCollisionWorld* %36, %struct.btQuadWord* %from, %struct.btQuadWord* %to, %"struct.btCollisionWorld::RayResultCallback"* %38)
- to label %invcont unwind label %lpad
-
-invcont: ; preds = %entry
- %39 = load %struct.btCollisionObject** %2, align 8 ; [#uses=4]
- %40 = icmp eq %struct.btCollisionObject* %39, null ; [#uses=1]
- br i1 %40, label %bb13, label %bb
-
-bb: ; preds = %invcont
- %41 = getelementptr inbounds %struct.btCollisionObject* %39, i32 0, i32 19 ; [#uses=1]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %.lobit.i19 = and i32 %42, 2 ; [#uses=1]
- %toBool.i = icmp eq i32 %.lobit.i19, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb13, label %bb1
-
-bb1: ; preds = %bb
- %43 = getelementptr inbounds %struct.btCollisionObject* %39, i32 0, i32 12 ; [#uses=1]
- %44 = load i32* %43, align 4 ; [#uses=1]
- %.lobit.i = and i32 %44, 4 ; [#uses=1]
- %toBool2not = icmp eq i32 %.lobit.i, 0 ; [#uses=1]
- br i1 %toBool2not, label %bb10, label %bb13
-
-bb10: ; preds = %bb1
- %45 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %47 = load float* %46, align 4 ; [#uses=1]
- store float %47, float* %45, align 4
- %48 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- store float %50, float* %48, align 4
- %51 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %52 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %53 = load float* %52, align 4 ; [#uses=1]
- store float %53, float* %51, align 4
- %54 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %55 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- %56 = load float* %55, align 4 ; [#uses=1]
- store float %56, float* %54, align 4
- %57 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %58 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %59 = load float* %58, align 4 ; [#uses=4]
- store float %59, float* %57, align 4
- %60 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %61 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=4]
- store float %62, float* %60, align 4
- %63 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %64 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %65 = load float* %64, align 4 ; [#uses=4]
- store float %65, float* %63, align 4
- %66 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %67 = getelementptr inbounds %"struct.btCollisionWorld::ClosestRayResultCallback"* %rayCallback, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- %68 = load float* %67, align 4 ; [#uses=1]
- store float %68, float* %66, align 4
- %69 = fmul float %59, %59 ; [#uses=1]
- %70 = fmul float %62, %62 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=1]
- %72 = fmul float %65, %65 ; [#uses=1]
- %73 = fadd float %71, %72 ; [#uses=1]
- %74 = call float @sqrtf(float %73) nounwind readonly ; [#uses=1]
- %75 = fdiv float 1.000000e+00, %74 ; [#uses=3]
- %76 = fmul float %59, %75 ; [#uses=1]
- store float %76, float* %57, align 4
- %77 = fmul float %62, %75 ; [#uses=1]
- store float %77, float* %60, align 4
- %78 = fmul float %65, %75 ; [#uses=1]
- store float %78, float* %63, align 4
- %79 = load float* %1, align 4 ; [#uses=1]
- %80 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %result, i32 0, i32 2 ; [#uses=1]
- store float %79, float* %80, align 4
- %81 = bitcast %struct.btCollisionObject* %39 to i8* ; [#uses=1]
- ret i8* %81
-
-bb13: ; preds = %bb1, %bb, %invcont
- ret i8* null
-
-lpad: ; preds = %entry
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select16 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- store i32 (...)** getelementptr inbounds ([6 x i32 (...)*]* @_ZTVN16btCollisionWorld24ClosestRayResultCallbackE, i32 0, i32 2), i32 (...)*** %0, align 8
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr)
- unreachable
-}
-
-; [#uses=1]
-define void @_ZN16btRaycastVehicle14updateFrictionEf(%struct.btRaycastVehicle* %this, float %timeStep) align 2 {
-entry:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca float, align 4 ; [#uses=2]
- %3 = alloca float, align 4 ; [#uses=2]
- %4 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %5 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %wheelBasis0 = alloca %struct.btMatrix3x3, align 8 ; [#uses=15]
- %contactPt = alloca %struct.btWheelContactPoint, align 8 ; [#uses=11]
- %rel_pos = alloca %struct.btQuadWord, align 8 ; [#uses=7]
- %rel_pos2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %sideImp = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %6 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=7]
- %7 = load i32* %6, align 4 ; [#uses=5]
- %8 = icmp eq i32 %7, 0 ; [#uses=1]
- br i1 %8, label %return, label %bb
-
-bb: ; preds = %entry
- %9 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %9, i32 %7, %struct.btQuadWord* %5) inlinehint
- %10 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %10, i32 %7, %struct.btQuadWord* %4) inlinehint
- store float 0.000000e+00, float* %3, align 4
- %11 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIfE6resizeEiRKf(%"struct.btAlignedObjectArray<float>"* %11, i32 %7, float* %3) inlinehint
- store float 0.000000e+00, float* %2, align 4
- %12 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayIfE6resizeEiRKf(%"struct.btAlignedObjectArray<float>"* %12, i32 %7, float* %2) inlinehint
- %13 = load i32* %6, align 4 ; [#uses=1]
- %14 = icmp sgt i32 %13, 0 ; [#uses=1]
- br i1 %14, label %bb.nph96, label %return
-
-bb.nph96: ; preds = %bb
- %15 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb1, %bb.nph96
- %i.095 = phi i32 [ 0, %bb.nph96 ], [ %19, %bb1 ] ; [#uses=3]
- %17 = load float** %15, align 4 ; [#uses=1]
- %scevgep220 = getelementptr float* %17, i32 %i.095 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep220, align 4
- %18 = load float** %16, align 4 ; [#uses=1]
- %scevgep221 = getelementptr float* %18, i32 %i.095 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep221, align 4
- %19 = add nsw i32 %i.095, 1 ; [#uses=2]
- %20 = load i32* %6, align 4 ; [#uses=2]
- %21 = icmp sgt i32 %20, %19 ; [#uses=1]
- br i1 %21, label %bb1, label %bb12.preheader
-
-bb12.preheader: ; preds = %bb1
- %22 = icmp sgt i32 %20, 0 ; [#uses=1]
- br i1 %22, label %bb.nph94, label %return
-
-bb.nph94: ; preds = %bb12.preheader
- %23 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %24 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %25 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %35 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=5]
- %37 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 14 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=2]
- %39 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=2]
- %40 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb11, %bb.nph94
- %i6.093 = phi i32 [ 0, %bb.nph94 ], [ %tmp219, %bb11 ] ; [#uses=41]
- %tmp219 = add i32 %i6.093, 1 ; [#uses=2]
- %41 = load %struct.btWheelInfo** %23, align 4 ; [#uses=17]
- %scevgep148 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 0, i32 7 ; [#uses=1]
- %42 = load i8** %scevgep148, align 4 ; [#uses=2]
- %43 = icmp eq i8* %42, null ; [#uses=1]
- br i1 %43, label %bb11, label %bb10
-
-bb10: ; preds = %bb7
- %44 = bitcast i8* %42 to %struct.btRigidBody* ; [#uses=1]
- %scevgep149150 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %45 = load float* %scevgep149150, align 4 ; [#uses=1]
- store float %45, float* %24, align 8
- %scevgep151 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %scevgep151, align 4 ; [#uses=1]
- store float %46, float* %25, align 4
- %scevgep152 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %47 = load float* %scevgep152, align 4 ; [#uses=1]
- store float %47, float* %26, align 8
- %scevgep153 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %48 = load float* %scevgep153, align 4 ; [#uses=1]
- store float %48, float* %27, align 4
- %scevgep154155 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %49 = load float* %scevgep154155, align 4 ; [#uses=1]
- store float %49, float* %28, align 8
- %scevgep156 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %50 = load float* %scevgep156, align 4 ; [#uses=1]
- store float %50, float* %29, align 4
- %scevgep157 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %scevgep157, align 4 ; [#uses=1]
- store float %51, float* %30, align 8
- %scevgep158 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %52 = load float* %scevgep158, align 4 ; [#uses=1]
- store float %52, float* %31, align 4
- %scevgep159160 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %53 = load float* %scevgep159160, align 4 ; [#uses=1]
- store float %53, float* %32, align 8
- %scevgep161 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %scevgep161, align 4 ; [#uses=1]
- store float %54, float* %33, align 4
- %scevgep162 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %55 = load float* %scevgep162, align 4 ; [#uses=1]
- store float %55, float* %34, align 8
- %scevgep163 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- %56 = load float* %scevgep163, align 4 ; [#uses=1]
- store float %56, float* %35, align 4
- %57 = load %struct.btQuadWord** %36, align 4 ; [#uses=4]
- %58 = load i32* %37, align 4 ; [#uses=3]
- %59 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 2, i32 0, i32 %58 ; [#uses=1]
- %60 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 1, i32 0, i32 %58 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btMatrix3x3* %wheelBasis0, i32 0, i32 0, i32 0, i32 0, i32 %58 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=1]
- %63 = load float* %60, align 4 ; [#uses=1]
- %64 = load float* %59, align 4 ; [#uses=1]
- %scevgep164165 = getelementptr inbounds %struct.btQuadWord* %57, i32 %i6.093, i32 0, i32 0 ; [#uses=1]
- store float %62, float* %scevgep164165, align 4
- %scevgep166 = getelementptr %struct.btQuadWord* %57, i32 %i6.093, i32 0, i32 1 ; [#uses=1]
- store float %63, float* %scevgep166, align 4
- %scevgep167 = getelementptr %struct.btQuadWord* %57, i32 %i6.093, i32 0, i32 2 ; [#uses=1]
- store float %64, float* %scevgep167, align 4
- %scevgep168 = getelementptr %struct.btQuadWord* %57, i32 %i6.093, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep168, align 4
- %65 = load %struct.btQuadWord** %36, align 4 ; [#uses=3]
- %scevgep169170 = getelementptr inbounds %struct.btQuadWord* %65, i32 %i6.093, i32 0, i32 0 ; [#uses=2]
- %66 = load float* %scevgep169170, align 4 ; [#uses=2]
- %scevgep171172 = getelementptr inbounds %struct.btWheelInfo* %41, i32 %i6.093, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %67 = load float* %scevgep171172, align 4 ; [#uses=2]
- %68 = fmul float %66, %67 ; [#uses=1]
- %scevgep173 = getelementptr %struct.btQuadWord* %65, i32 %i6.093, i32 0, i32 1 ; [#uses=2]
- %69 = load float* %scevgep173, align 4 ; [#uses=2]
- %scevgep174 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %70 = load float* %scevgep174, align 4 ; [#uses=2]
- %71 = fmul float %69, %70 ; [#uses=1]
- %72 = fadd float %68, %71 ; [#uses=1]
- %scevgep175 = getelementptr %struct.btQuadWord* %65, i32 %i6.093, i32 0, i32 2 ; [#uses=2]
- %73 = load float* %scevgep175, align 4 ; [#uses=2]
- %scevgep176 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %74 = load float* %scevgep176, align 4 ; [#uses=2]
- %75 = fmul float %73, %74 ; [#uses=1]
- %76 = fadd float %72, %75 ; [#uses=3]
- %77 = fmul float %74, %76 ; [#uses=1]
- %78 = fmul float %70, %76 ; [#uses=1]
- %79 = fmul float %67, %76 ; [#uses=1]
- %80 = fsub float %66, %79 ; [#uses=1]
- store float %80, float* %scevgep169170, align 4
- %81 = fsub float %69, %78 ; [#uses=1]
- store float %81, float* %scevgep173, align 4
- %82 = fsub float %73, %77 ; [#uses=1]
- store float %82, float* %scevgep175, align 4
- %83 = load %struct.btQuadWord** %36, align 4 ; [#uses=3]
- %scevgep190191 = getelementptr inbounds %struct.btQuadWord* %83, i32 %i6.093, i32 0, i32 0 ; [#uses=2]
- %84 = load float* %scevgep190191, align 4 ; [#uses=3]
- %85 = fmul float %84, %84 ; [#uses=1]
- %scevgep193 = getelementptr %struct.btQuadWord* %83, i32 %i6.093, i32 0, i32 1 ; [#uses=2]
- %86 = load float* %scevgep193, align 4 ; [#uses=3]
- %87 = fmul float %86, %86 ; [#uses=1]
- %88 = fadd float %85, %87 ; [#uses=1]
- %scevgep194 = getelementptr %struct.btQuadWord* %83, i32 %i6.093, i32 0, i32 2 ; [#uses=2]
- %89 = load float* %scevgep194, align 4 ; [#uses=3]
- %90 = fmul float %89, %89 ; [#uses=1]
- %91 = fadd float %88, %90 ; [#uses=1]
- %92 = call float @sqrtf(float %91) nounwind readonly ; [#uses=1]
- %93 = fdiv float 1.000000e+00, %92 ; [#uses=3]
- %94 = fmul float %84, %93 ; [#uses=1]
- store float %94, float* %scevgep190191, align 4
- %95 = fmul float %86, %93 ; [#uses=1]
- store float %95, float* %scevgep193, align 4
- %96 = fmul float %89, %93 ; [#uses=1]
- store float %96, float* %scevgep194, align 4
- %97 = load %struct.btQuadWord** %38, align 4 ; [#uses=4]
- %98 = load %struct.btQuadWord** %36, align 4 ; [#uses=3]
- %99 = load float* %scevgep171172, align 4 ; [#uses=2]
- %scevgep198 = getelementptr %struct.btQuadWord* %98, i32 %i6.093, i32 0, i32 1 ; [#uses=1]
- %100 = load float* %scevgep198, align 4 ; [#uses=2]
- %101 = fmul float %99, %100 ; [#uses=1]
- %102 = load float* %scevgep174, align 4 ; [#uses=2]
- %scevgep200201 = getelementptr inbounds %struct.btQuadWord* %98, i32 %i6.093, i32 0, i32 0 ; [#uses=1]
- %103 = load float* %scevgep200201, align 4 ; [#uses=2]
- %104 = fmul float %102, %103 ; [#uses=1]
- %105 = fsub float %101, %104 ; [#uses=1]
- %106 = load float* %scevgep176, align 4 ; [#uses=2]
- %107 = fmul float %106, %103 ; [#uses=1]
- %scevgep203 = getelementptr %struct.btQuadWord* %98, i32 %i6.093, i32 0, i32 2 ; [#uses=1]
- %108 = load float* %scevgep203, align 4 ; [#uses=2]
- %109 = fmul float %99, %108 ; [#uses=1]
- %110 = fsub float %107, %109 ; [#uses=1]
- %111 = fmul float %102, %108 ; [#uses=1]
- %112 = fmul float %106, %100 ; [#uses=1]
- %113 = fsub float %111, %112 ; [#uses=1]
- %scevgep204205 = getelementptr inbounds %struct.btQuadWord* %97, i32 %i6.093, i32 0, i32 0 ; [#uses=1]
- store float %113, float* %scevgep204205, align 4
- %scevgep206 = getelementptr %struct.btQuadWord* %97, i32 %i6.093, i32 0, i32 1 ; [#uses=1]
- store float %110, float* %scevgep206, align 4
- %scevgep207 = getelementptr %struct.btQuadWord* %97, i32 %i6.093, i32 0, i32 2 ; [#uses=1]
- store float %105, float* %scevgep207, align 4
- %scevgep208 = getelementptr %struct.btQuadWord* %97, i32 %i6.093, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep208, align 4
- %114 = load %struct.btQuadWord** %38, align 4 ; [#uses=3]
- %scevgep211212 = getelementptr inbounds %struct.btQuadWord* %114, i32 %i6.093, i32 0, i32 0 ; [#uses=2]
- %115 = load float* %scevgep211212, align 4 ; [#uses=3]
- %116 = fmul float %115, %115 ; [#uses=1]
- %scevgep214 = getelementptr %struct.btQuadWord* %114, i32 %i6.093, i32 0, i32 1 ; [#uses=2]
- %117 = load float* %scevgep214, align 4 ; [#uses=3]
- %118 = fmul float %117, %117 ; [#uses=1]
- %119 = fadd float %116, %118 ; [#uses=1]
- %scevgep216 = getelementptr %struct.btQuadWord* %114, i32 %i6.093, i32 0, i32 2 ; [#uses=2]
- %120 = load float* %scevgep216, align 4 ; [#uses=3]
- %121 = fmul float %120, %120 ; [#uses=1]
- %122 = fadd float %119, %121 ; [#uses=1]
- %123 = call float @sqrtf(float %122) nounwind readonly ; [#uses=1]
- %124 = fdiv float 1.000000e+00, %123 ; [#uses=3]
- %125 = fmul float %115, %124 ; [#uses=1]
- store float %125, float* %scevgep211212, align 4
- %126 = fmul float %117, %124 ; [#uses=1]
- store float %126, float* %scevgep214, align 4
- %127 = fmul float %120, %124 ; [#uses=1]
- store float %127, float* %scevgep216, align 4
- %128 = load float** %39, align 4 ; [#uses=1]
- %129 = load %struct.btQuadWord** %36, align 4 ; [#uses=1]
- %130 = load %struct.btRigidBody** %40, align 4 ; [#uses=1]
- %scevgep146 = getelementptr %struct.btQuadWord* %129, i32 %i6.093 ; [#uses=1]
- %scevgep147 = getelementptr float* %128, i32 %i6.093 ; [#uses=1]
- %scevgep217 = getelementptr %struct.btWheelInfo* %41, i32 %i6.093, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep217218 = bitcast float* %scevgep217 to %struct.btQuadWord* ; [#uses=2]
- call void @_Z22resolveSingleBilateralR11btRigidBodyRK9btVector3S0_S3_fS3_Rff(%struct.btRigidBody* %130, %struct.btQuadWord* %scevgep217218, %struct.btRigidBody* %44, %struct.btQuadWord* %scevgep217218, float 0.000000e+00, %struct.btQuadWord* %scevgep146, float* %scevgep147, float %timeStep)
- %131 = load float** %39, align 4 ; [#uses=1]
- %scevgep145 = getelementptr float* %131, i32 %i6.093 ; [#uses=2]
- %132 = load float* %scevgep145, align 4 ; [#uses=1]
- %133 = load float* @sideFrictionStiffness2, align 4 ; [#uses=1]
- %134 = fmul float %132, %133 ; [#uses=1]
- store float %134, float* %scevgep145, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb7
- %135 = load i32* %6, align 4 ; [#uses=2]
- %136 = icmp sgt i32 %135, %tmp219 ; [#uses=1]
- br i1 %136, label %bb7, label %bb42.preheader
-
-bb42.preheader: ; preds = %bb11
- %137 = icmp sgt i32 %135, 0 ; [#uses=1]
- br i1 %137, label %bb.nph92, label %return
-
-bb.nph92: ; preds = %bb42.preheader
- %138 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=5]
- %139 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=4]
- %140 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %142 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- %143 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 0 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %145 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %147 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 1 ; [#uses=1]
- %148 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 5 ; [#uses=1]
- %149 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %150 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %151 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btWheelContactPoint* %contactPt, i32 0, i32 4 ; [#uses=1]
- br label %bb16
-
-bb16: ; preds = %bb41, %bb.nph92
- %wheel.091 = phi i32 [ 0, %bb.nph92 ], [ %tmp143, %bb41 ] ; [#uses=17]
- %sliding.190 = phi i8 [ 0, %bb.nph92 ], [ %sliding.0, %bb41 ] ; [#uses=2]
- %tmp143 = add i32 %wheel.091, 1 ; [#uses=2]
- %153 = load %struct.btWheelInfo** %138, align 4 ; [#uses=6]
- %scevgep130 = getelementptr %struct.btWheelInfo* %153, i32 %wheel.091, i32 0, i32 7 ; [#uses=1]
- %154 = load i8** %scevgep130, align 4 ; [#uses=2]
- %155 = bitcast i8* %154 to %struct.btRigidBody* ; [#uses=1]
- %156 = icmp eq i8* %154, null ; [#uses=1]
- br i1 %156, label %bb31, label %bb22
-
-bb22: ; preds = %bb16
- %scevgep131 = getelementptr %struct.btWheelInfo* %153, i32 %wheel.091, i32 17 ; [#uses=1]
- %157 = load float* %scevgep131, align 4 ; [#uses=2]
- %158 = fcmp une float %157, 0.000000e+00 ; [#uses=1]
- br i1 %158, label %bb23, label %bb24
-
-bb23: ; preds = %bb22
- %159 = fmul float %157, %timeStep ; [#uses=1]
- br label %bb32
-
-bb24: ; preds = %bb22
- %scevgep132 = getelementptr %struct.btWheelInfo* %153, i32 %wheel.091, i32 18 ; [#uses=1]
- %160 = load float* %scevgep132, align 4 ; [#uses=2]
- %161 = fcmp une float %160, 0.000000e+00 ; [#uses=1]
- %iftmp.218.0 = select i1 %161, float %160, float 0.000000e+00 ; [#uses=1]
- %162 = load %struct.btQuadWord** %141, align 4 ; [#uses=1]
- %163 = load %struct.btRigidBody** %142, align 4 ; [#uses=1]
- %scevgep129 = getelementptr %struct.btQuadWord* %162, i32 %wheel.091 ; [#uses=1]
- %scevgep133 = getelementptr %struct.btWheelInfo* %153, i32 %wheel.091, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %scevgep133134 = bitcast float* %scevgep133 to %struct.btQuadWord* ; [#uses=1]
- call void @_ZN19btWheelContactPointC1EP11btRigidBodyS1_RK9btVector3S4_f(%struct.btWheelContactPoint* %contactPt, %struct.btRigidBody* %163, %struct.btRigidBody* %155, %struct.btQuadWord* %scevgep133134, %struct.btQuadWord* %scevgep129, float %iftmp.218.0) nounwind
- %164 = load %struct.btRigidBody** %143, align 8 ; [#uses=9]
- %165 = load float* %144, align 8 ; [#uses=2]
- %166 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %167 = load float* %166, align 4 ; [#uses=1]
- %168 = fsub float %165, %167 ; [#uses=2]
- %169 = load float* %145, align 4 ; [#uses=2]
- %170 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %171 = load float* %170, align 4 ; [#uses=1]
- %172 = fsub float %169, %171 ; [#uses=2]
- %173 = load float* %146, align 8 ; [#uses=2]
- %174 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %175 = load float* %174, align 4 ; [#uses=1]
- %176 = fsub float %173, %175 ; [#uses=2]
- %177 = load %struct.btRigidBody** %147, align 4 ; [#uses=9]
- %178 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %179 = load float* %178, align 4 ; [#uses=1]
- %180 = fsub float %165, %179 ; [#uses=2]
- %181 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %182 = load float* %181, align 4 ; [#uses=1]
- %183 = fsub float %169, %182 ; [#uses=2]
- %184 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %185 = load float* %184, align 4 ; [#uses=1]
- %186 = fsub float %173, %185 ; [#uses=2]
- %187 = load float* %148, align 4 ; [#uses=3]
- %188 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %189 = load float* %188, align 4 ; [#uses=2]
- %190 = fmul float %189, %172 ; [#uses=1]
- %191 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %192 = load float* %191, align 4 ; [#uses=2]
- %193 = fmul float %192, %176 ; [#uses=1]
- %194 = fsub float %190, %193 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %196 = load float* %195, align 4 ; [#uses=2]
- %197 = fmul float %196, %176 ; [#uses=1]
- %198 = fmul float %189, %168 ; [#uses=1]
- %199 = fsub float %197, %198 ; [#uses=1]
- %200 = fmul float %192, %168 ; [#uses=1]
- %201 = fmul float %196, %172 ; [#uses=1]
- %202 = fsub float %200, %201 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %204 = load float* %203, align 4 ; [#uses=1]
- %205 = fadd float %204, %194 ; [#uses=1]
- %206 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %207 = load float* %206, align 4 ; [#uses=1]
- %208 = fadd float %207, %199 ; [#uses=1]
- %209 = getelementptr inbounds %struct.btRigidBody* %164, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %210 = load float* %209, align 4 ; [#uses=1]
- %211 = fadd float %210, %202 ; [#uses=1]
- %212 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %213 = load float* %212, align 4 ; [#uses=2]
- %214 = fmul float %213, %183 ; [#uses=1]
- %215 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %216 = load float* %215, align 4 ; [#uses=2]
- %217 = fmul float %216, %186 ; [#uses=1]
- %218 = fsub float %214, %217 ; [#uses=1]
- %219 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %220 = load float* %219, align 4 ; [#uses=2]
- %221 = fmul float %220, %186 ; [#uses=1]
- %222 = fmul float %213, %180 ; [#uses=1]
- %223 = fsub float %221, %222 ; [#uses=1]
- %224 = fmul float %216, %180 ; [#uses=1]
- %225 = fmul float %220, %183 ; [#uses=1]
- %226 = fsub float %224, %225 ; [#uses=1]
- %227 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %228 = load float* %227, align 4 ; [#uses=1]
- %229 = fadd float %228, %218 ; [#uses=1]
- %230 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %231 = load float* %230, align 4 ; [#uses=1]
- %232 = fadd float %231, %223 ; [#uses=1]
- %233 = getelementptr inbounds %struct.btRigidBody* %177, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %234 = load float* %233, align 4 ; [#uses=1]
- %235 = fadd float %234, %226 ; [#uses=1]
- %236 = fsub float %205, %229 ; [#uses=1]
- %237 = fsub float %208, %232 ; [#uses=1]
- %238 = fsub float %211, %235 ; [#uses=1]
- %239 = load float* %149, align 8 ; [#uses=1]
- %240 = fmul float %239, %238 ; [#uses=1]
- %241 = load float* %150, align 4 ; [#uses=1]
- %242 = fmul float %241, %237 ; [#uses=1]
- %243 = fadd float %240, %242 ; [#uses=1]
- %244 = load float* %151, align 8 ; [#uses=1]
- %245 = fmul float %244, %236 ; [#uses=1]
- %246 = fadd float %243, %245 ; [#uses=1]
- %247 = fsub float -0.000000e+00, %246 ; [#uses=1]
- %248 = load float* %152, align 8 ; [#uses=1]
- %249 = fmul float %248, %247 ; [#uses=2]
- %250 = fcmp olt float %187, %249 ; [#uses=1]
- %j1.1.i = select i1 %250, float %187, float %249 ; [#uses=2]
- %251 = fsub float -0.000000e+00, %187 ; [#uses=2]
- %252 = fcmp olt float %j1.1.i, %251 ; [#uses=1]
- %j1.0.i = select i1 %252, float %251, float %j1.1.i ; [#uses=1]
- br label %bb32
-
-bb31: ; preds = %bb16
- %253 = load float** %139, align 4 ; [#uses=1]
- %scevgep128 = getelementptr float* %253, i32 %wheel.091 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep128, align 4
- %254 = load %struct.btWheelInfo** %138, align 4 ; [#uses=1]
- %scevgep135 = getelementptr %struct.btWheelInfo* %254, i32 %wheel.091, i32 24 ; [#uses=1]
- store float 1.000000e+00, float* %scevgep135, align 4
- br label %bb41
-
-bb32: ; preds = %bb24, %bb23
- %rollingFriction.0.ph = phi float [ %j1.0.i, %bb24 ], [ %159, %bb23 ] ; [#uses=1]
- %255 = load float** %139, align 4 ; [#uses=1]
- %scevgep128223 = getelementptr float* %255, i32 %wheel.091 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep128223, align 4
- %256 = load %struct.btWheelInfo** %138, align 4 ; [#uses=1]
- %scevgep135224 = getelementptr %struct.btWheelInfo* %256, i32 %wheel.091, i32 24 ; [#uses=1]
- store float 1.000000e+00, float* %scevgep135224, align 4
- %257 = load %struct.btWheelInfo** %138, align 4 ; [#uses=1]
- %scevgep136 = getelementptr %struct.btWheelInfo* %257, i32 %wheel.091, i32 24 ; [#uses=1]
- store float 1.000000e+00, float* %scevgep136, align 4
- %scevgep137 = getelementptr %struct.btWheelInfo* %153, i32 %wheel.091, i32 23 ; [#uses=1]
- %258 = load float* %scevgep137, align 4 ; [#uses=1]
- %259 = fmul float %258, %timeStep ; [#uses=1]
- %scevgep138 = getelementptr %struct.btWheelInfo* %153, i32 %wheel.091, i32 11 ; [#uses=1]
- %260 = load float* %scevgep138, align 4 ; [#uses=1]
- %261 = fmul float %259, %260 ; [#uses=3]
- %262 = fmul float %261, %261 ; [#uses=1]
- %263 = load float** %139, align 4 ; [#uses=1]
- %scevgep127 = getelementptr float* %263, i32 %wheel.091 ; [#uses=1]
- store float %rollingFriction.0.ph, float* %scevgep127, align 4
- %264 = load float** %139, align 4 ; [#uses=1]
- %scevgep126 = getelementptr float* %264, i32 %wheel.091 ; [#uses=1]
- %265 = load float* %scevgep126, align 4 ; [#uses=1]
- %266 = fmul float %265, 5.000000e-01 ; [#uses=2]
- %267 = load float** %140, align 4 ; [#uses=1]
- %scevgep125 = getelementptr float* %267, i32 %wheel.091 ; [#uses=1]
- %268 = load float* %scevgep125, align 4 ; [#uses=2]
- %269 = fmul float %266, %266 ; [#uses=1]
- %270 = fmul float %268, %268 ; [#uses=1]
- %271 = fadd float %269, %270 ; [#uses=2]
- %272 = fcmp ogt float %271, %262 ; [#uses=1]
- br i1 %272, label %bb39, label %bb41
-
-bb39: ; preds = %bb32
- %273 = call float @sqrtf(float %271) nounwind readonly ; [#uses=1]
- %274 = fdiv float %261, %273 ; [#uses=1]
- %275 = load %struct.btWheelInfo** %138, align 4 ; [#uses=1]
- %scevgep139 = getelementptr %struct.btWheelInfo* %275, i32 %wheel.091, i32 24 ; [#uses=2]
- %276 = load float* %scevgep139, align 4 ; [#uses=1]
- %277 = fmul float %276, %274 ; [#uses=1]
- store float %277, float* %scevgep139, align 4
- br label %bb41
-
-bb41: ; preds = %bb39, %bb32, %bb31
- %sliding.0 = phi i8 [ 1, %bb39 ], [ %sliding.190, %bb32 ], [ %sliding.190, %bb31 ] ; [#uses=2]
- %278 = load i32* %6, align 4 ; [#uses=3]
- %279 = icmp sgt i32 %278, %tmp143 ; [#uses=1]
- br i1 %279, label %bb16, label %bb44
-
-bb44: ; preds = %bb41
- %toBool45 = icmp eq i8 %sliding.0, 0 ; [#uses=1]
- br i1 %toBool45, label %bb74.preheader, label %bb55.preheader
-
-bb55.preheader: ; preds = %bb44
- %280 = icmp sgt i32 %278, 0 ; [#uses=1]
- br i1 %280, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb55.preheader
- %281 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=2]
- %282 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=2]
- %283 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- br label %bb49
-
-bb49: ; preds = %bb54, %bb.nph
- %wheel48.087 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb54 ] ; [#uses=6]
- %tmp = add i32 %wheel48.087, 1 ; [#uses=2]
- %284 = load float** %281, align 4 ; [#uses=1]
- %scevgep100 = getelementptr float* %284, i32 %wheel48.087 ; [#uses=1]
- %285 = load float* %scevgep100, align 4 ; [#uses=1]
- %286 = fcmp une float %285, 0.000000e+00 ; [#uses=1]
- br i1 %286, label %bb51, label %bb54
-
-bb51: ; preds = %bb49
- %287 = load %struct.btWheelInfo** %282, align 4 ; [#uses=1]
- %scevgep101 = getelementptr %struct.btWheelInfo* %287, i32 %wheel48.087, i32 24 ; [#uses=1]
- %288 = load float* %scevgep101, align 4 ; [#uses=2]
- %289 = fcmp olt float %288, 1.000000e+00 ; [#uses=1]
- br i1 %289, label %bb53, label %bb54
-
-bb53: ; preds = %bb51
- %290 = load float** %283, align 4 ; [#uses=1]
- %scevgep99 = getelementptr float* %290, i32 %wheel48.087 ; [#uses=2]
- %291 = load float* %scevgep99, align 4 ; [#uses=1]
- %292 = fmul float %291, %288 ; [#uses=1]
- store float %292, float* %scevgep99, align 4
- %293 = load float** %281, align 4 ; [#uses=1]
- %scevgep97 = getelementptr float* %293, i32 %wheel48.087 ; [#uses=2]
- %294 = load float* %scevgep97, align 4 ; [#uses=1]
- %295 = load %struct.btWheelInfo** %282, align 4 ; [#uses=1]
- %scevgep103 = getelementptr %struct.btWheelInfo* %295, i32 %wheel48.087, i32 24 ; [#uses=1]
- %296 = load float* %scevgep103, align 4 ; [#uses=1]
- %297 = fmul float %294, %296 ; [#uses=1]
- store float %297, float* %scevgep97, align 4
- br label %bb54
-
-bb54: ; preds = %bb53, %bb51, %bb49
- %298 = load i32* %6, align 4 ; [#uses=2]
- %299 = icmp sgt i32 %298, %tmp ; [#uses=1]
- br i1 %299, label %bb49, label %bb74.preheader
-
-bb.nph89: ; preds = %bb74.preheader
- %300 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=2]
- %301 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=2]
- %302 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 0 ; [#uses=1]
- %303 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 1 ; [#uses=1]
- %304 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 2 ; [#uses=1]
- %305 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 3 ; [#uses=1]
- %306 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- %307 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %308 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- %309 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- %310 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- %311 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- %312 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- %313 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 0 ; [#uses=1]
- %314 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 1 ; [#uses=1]
- %315 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 2 ; [#uses=1]
- %316 = getelementptr inbounds %struct.btQuadWord* %rel_pos2, i32 0, i32 0, i32 3 ; [#uses=1]
- %317 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- %318 = getelementptr inbounds %struct.btQuadWord* %sideImp, i32 0, i32 0, i32 0 ; [#uses=2]
- %319 = getelementptr inbounds %struct.btQuadWord* %sideImp, i32 0, i32 0, i32 1 ; [#uses=2]
- %320 = getelementptr inbounds %struct.btQuadWord* %sideImp, i32 0, i32 0, i32 2 ; [#uses=2]
- %321 = getelementptr inbounds %struct.btQuadWord* %sideImp, i32 0, i32 0, i32 3 ; [#uses=1]
- %322 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 15 ; [#uses=1]
- %323 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- %324 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- %325 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- %326 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb60
-
-bb60: ; preds = %bb73, %bb.nph89
- %wheel59.088 = phi i32 [ 0, %bb.nph89 ], [ %tmp124, %bb73 ] ; [#uses=14]
- %tmp124 = add i32 %wheel59.088, 1 ; [#uses=2]
- %327 = load %struct.btWheelInfo** %300, align 4 ; [#uses=4]
- %328 = load %struct.btRigidBody** %301, align 4 ; [#uses=4]
- %scevgep108 = getelementptr %struct.btWheelInfo* %327, i32 %wheel59.088, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- %329 = load float* %scevgep108, align 4 ; [#uses=1]
- %330 = getelementptr inbounds %struct.btRigidBody* %328, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %331 = load float* %330, align 4 ; [#uses=1]
- %332 = fsub float %329, %331 ; [#uses=1]
- %scevgep109 = getelementptr %struct.btWheelInfo* %327, i32 %wheel59.088, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- %333 = load float* %scevgep109, align 4 ; [#uses=1]
- %334 = getelementptr inbounds %struct.btRigidBody* %328, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %335 = load float* %334, align 4 ; [#uses=1]
- %336 = fsub float %333, %335 ; [#uses=1]
- %scevgep110 = getelementptr %struct.btWheelInfo* %327, i32 %wheel59.088, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- %337 = load float* %scevgep110, align 4 ; [#uses=1]
- %338 = getelementptr inbounds %struct.btRigidBody* %328, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %339 = load float* %338, align 4 ; [#uses=1]
- %340 = fsub float %337, %339 ; [#uses=1]
- store float %340, float* %302, align 8
- store float %336, float* %303, align 4
- store float %332, float* %304, align 8
- store float 0.000000e+00, float* %305, align 4
- %341 = load float** %306, align 4 ; [#uses=1]
- %scevgep107 = getelementptr float* %341, i32 %wheel59.088 ; [#uses=1]
- %342 = load float* %scevgep107, align 4 ; [#uses=4]
- %343 = fcmp une float %342, 0.000000e+00 ; [#uses=1]
- br i1 %343, label %bb65, label %bb66
-
-bb65: ; preds = %bb60
- %344 = load %struct.btQuadWord** %307, align 4 ; [#uses=3]
- %scevgep120 = getelementptr %struct.btQuadWord* %344, i32 %wheel59.088, i32 0, i32 2 ; [#uses=1]
- %345 = load float* %scevgep120, align 4 ; [#uses=1]
- %346 = fmul float %345, %342 ; [#uses=1]
- %scevgep121 = getelementptr %struct.btQuadWord* %344, i32 %wheel59.088, i32 0, i32 1 ; [#uses=1]
- %347 = load float* %scevgep121, align 4 ; [#uses=1]
- %348 = fmul float %347, %342 ; [#uses=1]
- %scevgep122123 = getelementptr inbounds %struct.btQuadWord* %344, i32 %wheel59.088, i32 0, i32 0 ; [#uses=1]
- %349 = load float* %scevgep122123, align 4 ; [#uses=1]
- %350 = fmul float %349, %342 ; [#uses=1]
- store float %350, float* %308, align 8
- store float %348, float* %309, align 4
- store float %346, float* %310, align 8
- store float 0.000000e+00, float* %311, align 4
- call void @_ZN11btRigidBody12applyImpulseERK9btVector3S2_(%struct.btRigidBody* %328, %struct.btQuadWord* %1, %struct.btQuadWord* %rel_pos) nounwind
- br label %bb66
-
-bb66: ; preds = %bb65, %bb60
- %351 = load float** %312, align 4 ; [#uses=1]
- %scevgep105 = getelementptr float* %351, i32 %wheel59.088 ; [#uses=1]
- %352 = load float* %scevgep105, align 4 ; [#uses=4]
- %353 = fcmp une float %352, 0.000000e+00 ; [#uses=1]
- br i1 %353, label %bb68, label %bb73
-
-bb68: ; preds = %bb66
- %354 = load %struct.btWheelInfo** %300, align 4 ; [#uses=1]
- %scevgep111 = getelementptr %struct.btWheelInfo* %354, i32 %wheel59.088, i32 0, i32 7 ; [#uses=1]
- %355 = load i8** %scevgep111, align 4 ; [#uses=4]
- %356 = bitcast i8* %355 to %struct.btRigidBody* ; [#uses=1]
- %357 = getelementptr inbounds i8* %355, i32 52 ; [#uses=1]
- %358 = load float* %scevgep108, align 4 ; [#uses=1]
- %359 = getelementptr inbounds i8* %355, i32 60 ; [#uses=1]
- %360 = bitcast i8* %359 to float* ; [#uses=1]
- %361 = load float* %360, align 4 ; [#uses=1]
- %362 = fsub float %358, %361 ; [#uses=1]
- %363 = load float* %scevgep109, align 4 ; [#uses=1]
- %364 = getelementptr inbounds i8* %355, i32 56 ; [#uses=1]
- %365 = bitcast i8* %364 to float* ; [#uses=1]
- %366 = load float* %365, align 4 ; [#uses=1]
- %367 = fsub float %363, %366 ; [#uses=1]
- %368 = load float* %scevgep110, align 4 ; [#uses=1]
- %369 = bitcast i8* %357 to float* ; [#uses=1]
- %370 = load float* %369, align 4 ; [#uses=1]
- %371 = fsub float %368, %370 ; [#uses=1]
- store float %371, float* %313, align 8
- store float %367, float* %314, align 4
- store float %362, float* %315, align 8
- store float 0.000000e+00, float* %316, align 4
- %372 = load %struct.btQuadWord** %317, align 4 ; [#uses=3]
- %scevgep115 = getelementptr %struct.btQuadWord* %372, i32 %wheel59.088, i32 0, i32 2 ; [#uses=1]
- %373 = load float* %scevgep115, align 4 ; [#uses=1]
- %374 = fmul float %373, %352 ; [#uses=1]
- %scevgep116 = getelementptr %struct.btQuadWord* %372, i32 %wheel59.088, i32 0, i32 1 ; [#uses=1]
- %375 = load float* %scevgep116, align 4 ; [#uses=1]
- %376 = fmul float %375, %352 ; [#uses=1]
- %scevgep117118 = getelementptr inbounds %struct.btQuadWord* %372, i32 %wheel59.088, i32 0, i32 0 ; [#uses=1]
- %377 = load float* %scevgep117118, align 4 ; [#uses=1]
- %378 = fmul float %377, %352 ; [#uses=1]
- store float %378, float* %318, align 8
- store float %376, float* %319, align 4
- store float %374, float* %320, align 8
- store float 0.000000e+00, float* %321, align 4
- %379 = load i32* %322, align 4 ; [#uses=1]
- %380 = getelementptr inbounds %struct.btQuadWord* %rel_pos, i32 0, i32 0, i32 %379 ; [#uses=2]
- %381 = load float* %380, align 4 ; [#uses=1]
- %scevgep119 = getelementptr %struct.btWheelInfo* %327, i32 %wheel59.088, i32 15 ; [#uses=1]
- %382 = load float* %scevgep119, align 4 ; [#uses=1]
- %383 = fmul float %381, %382 ; [#uses=1]
- store float %383, float* %380, align 4
- %384 = load %struct.btRigidBody** %301, align 4 ; [#uses=1]
- call void @_ZN11btRigidBody12applyImpulseERK9btVector3S2_(%struct.btRigidBody* %384, %struct.btQuadWord* %sideImp, %struct.btQuadWord* %rel_pos) nounwind
- %385 = load float* %320, align 8 ; [#uses=1]
- %386 = fsub float -0.000000e+00, %385 ; [#uses=1]
- %387 = load float* %319, align 4 ; [#uses=1]
- %388 = fsub float -0.000000e+00, %387 ; [#uses=1]
- %389 = load float* %318, align 8 ; [#uses=1]
- %390 = fsub float -0.000000e+00, %389 ; [#uses=1]
- store float %390, float* %323, align 8
- store float %388, float* %324, align 4
- store float %386, float* %325, align 8
- store float 0.000000e+00, float* %326, align 4
- call void @_ZN11btRigidBody12applyImpulseERK9btVector3S2_(%struct.btRigidBody* %356, %struct.btQuadWord* %0, %struct.btQuadWord* %rel_pos2) nounwind
- br label %bb73
-
-bb73: ; preds = %bb68, %bb66
- %391 = load i32* %6, align 4 ; [#uses=1]
- %392 = icmp sgt i32 %391, %tmp124 ; [#uses=1]
- br i1 %392, label %bb60, label %return
-
-bb74.preheader: ; preds = %bb54, %bb44
- %393 = phi i32 [ %278, %bb44 ], [ %298, %bb54 ] ; [#uses=1]
- %394 = icmp sgt i32 %393, 0 ; [#uses=1]
- br i1 %394, label %bb.nph89, label %return
-
-return: ; preds = %bb74.preheader, %bb73, %bb55.preheader, %bb42.preheader, %bb12.preheader, %bb, %entry
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI11btWheelInfoE9push_backERKS0_(%"struct.btAlignedObjectArray<btWheelInfo>"* nocapture %this, %struct.btWheelInfo* %_Val) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btWheelInfo>"* %this, i32 0, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btWheelInfo>"* %this, i32 0, i32 2 ; [#uses=2]
- %3 = load i32* %2, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %1 ; [#uses=1]
- br i1 %4, label %bb, label %bb1
-
-bb: ; preds = %entry
- %5 = icmp eq i32 %1, 0 ; [#uses=1]
- %6 = shl i32 %1, 1 ; [#uses=1]
- %iftmp.250.0.i = select i1 %5, i32 1, i32 %6 ; [#uses=4]
- %7 = icmp slt i32 %3, %iftmp.250.0.i ; [#uses=1]
- br i1 %7, label %bb.i, label %bb1
-
-bb.i: ; preds = %bb
- %8 = icmp eq i32 %iftmp.250.0.i, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayI11btWheelInfoE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %9 = mul i32 %iftmp.250.0.i, 284 ; [#uses=1]
- %10 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %9, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %10 to %struct.btWheelInfo* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI11btWheelInfoE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayI11btWheelInfoE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %11 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %12 = phi %struct.btWheelInfo* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=2]
- %13 = icmp sgt i32 %11, 0 ; [#uses=1]
- br i1 %13, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayI11btWheelInfoE4copyEiiPS0_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayI11btWheelInfoE8allocateEi.exit.i
- %14 = getelementptr inbounds %"struct.btAlignedObjectArray<btWheelInfo>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=3]
- %scevgep.i.i = getelementptr %struct.btWheelInfo* %12, i32 %indvar.i.i ; [#uses=2]
- %15 = icmp eq %struct.btWheelInfo* %scevgep.i.i, null ; [#uses=1]
- br i1 %15, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %16 = load %struct.btWheelInfo** %14, align 4 ; [#uses=1]
- %scevgep8.i.i = getelementptr %struct.btWheelInfo* %16, i32 %indvar.i.i ; [#uses=1]
- tail call void @_ZN11btWheelInfoC1ERKS_(%struct.btWheelInfo* %scevgep.i.i, %struct.btWheelInfo* %scevgep8.i.i) nounwind
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i, %11 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI11btWheelInfoE4copyEiiPS0_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayI11btWheelInfoE4copyEiiPS0_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayI11btWheelInfoE8allocateEi.exit.i
- %17 = getelementptr inbounds %"struct.btAlignedObjectArray<btWheelInfo>"* %this, i32 0, i32 3 ; [#uses=3]
- %18 = load %struct.btWheelInfo** %17, align 4 ; [#uses=2]
- %19 = icmp eq %struct.btWheelInfo* %18, null ; [#uses=1]
- br i1 %19, label %_ZN20btAlignedObjectArrayI11btWheelInfoE10deallocateEv.exit.i, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayI11btWheelInfoE4copyEiiPS0_.exit.i
- %20 = getelementptr inbounds %"struct.btAlignedObjectArray<btWheelInfo>"* %this, i32 0, i32 4 ; [#uses=1]
- %21 = load i8* %20, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %21, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %22 = bitcast %struct.btWheelInfo* %18 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %22)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %struct.btWheelInfo* null, %struct.btWheelInfo** %17, align 4
- br label %_ZN20btAlignedObjectArrayI11btWheelInfoE10deallocateEv.exit.i
-
-_ZN20btAlignedObjectArrayI11btWheelInfoE10deallocateEv.exit.i: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayI11btWheelInfoE4copyEiiPS0_.exit.i
- %23 = getelementptr inbounds %"struct.btAlignedObjectArray<btWheelInfo>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %23, align 4
- store %struct.btWheelInfo* %12, %struct.btWheelInfo** %17, align 4
- store i32 %iftmp.250.0.i, i32* %2, align 4
- %.pre5 = load i32* %0, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI11btWheelInfoE10deallocateEv.exit.i, %bb, %entry
- %24 = phi i32 [ %.pre5, %_ZN20btAlignedObjectArrayI11btWheelInfoE10deallocateEv.exit.i ], [ %1, %entry ], [ %1, %bb ] ; [#uses=2]
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<btWheelInfo>"* %this, i32 0, i32 3 ; [#uses=1]
- %26 = load %struct.btWheelInfo** %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btWheelInfo* %26, i32 %24 ; [#uses=2]
- %28 = icmp eq %struct.btWheelInfo* %27, null ; [#uses=1]
- br i1 %28, label %bb4, label %bb2
-
-bb2: ; preds = %bb1
- tail call void @_ZN11btWheelInfoC1ERKS_(%struct.btWheelInfo* %27, %struct.btWheelInfo* %_Val) nounwind
- %.pre6 = load i32* %0, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb2, %bb1
- %29 = phi i32 [ %24, %bb1 ], [ %.pre6, %bb2 ] ; [#uses=1]
- %30 = add nsw i32 %29, 1 ; [#uses=1]
- store i32 %30, i32* %0, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicle16updateSuspensionEf(%struct.btRaycastVehicle* nocapture %this, float %deltaTime) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- %1 = load %struct.btRigidBody** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btRigidBody* %1, i32 0, i32 4 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fdiv float 1.000000e+00, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=2]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp sgt i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %8 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7, %bb.nph
- %w_it.011 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb7 ] ; [#uses=11]
- %tmp = add i32 %w_it.011, 1 ; [#uses=2]
- %9 = load %struct.btWheelInfo** %8, align 4 ; [#uses=10]
- %scevgep12 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 0, i32 6 ; [#uses=1]
- %10 = load i8* %scevgep12, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %10, 0 ; [#uses=1]
- br i1 %toBool, label %bb6, label %bb1
-
-bb1: ; preds = %bb
- %scevgep = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011 ; [#uses=1]
- %11 = tail call float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* %scevgep) ; [#uses=1]
- %scevgep13 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %scevgep13, align 4 ; [#uses=1]
- %13 = fsub float %11, %12 ; [#uses=1]
- %scevgep14 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 8 ; [#uses=1]
- %14 = load float* %scevgep14, align 4 ; [#uses=1]
- %15 = fmul float %14, %13 ; [#uses=1]
- %scevgep15 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 21 ; [#uses=1]
- %16 = load float* %scevgep15, align 4 ; [#uses=1]
- %17 = fmul float %15, %16 ; [#uses=1]
- %scevgep16 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 22 ; [#uses=1]
- %18 = load float* %scevgep16, align 4 ; [#uses=2]
- %19 = fcmp olt float %18, 0.000000e+00 ; [#uses=1]
- br i1 %19, label %bb2, label %bb3
-
-bb2: ; preds = %bb1
- %20 = getelementptr inbounds %struct.btWheelInfo* %9, i32 %w_it.011, i32 9 ; [#uses=1]
- br label %bb4
-
-bb3: ; preds = %bb1
- %scevgep17 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 10 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %susp_damping.0.in = phi float* [ %20, %bb2 ], [ %scevgep17, %bb3 ] ; [#uses=1]
- %susp_damping.0 = load float* %susp_damping.0.in, align 4 ; [#uses=1]
- %21 = fmul float %susp_damping.0, %18 ; [#uses=1]
- %22 = fsub float %17, %21 ; [#uses=1]
- %23 = fmul float %22, %4 ; [#uses=2]
- %scevgep18 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 23 ; [#uses=2]
- store float %23, float* %scevgep18, align 4
- %24 = fcmp olt float %23, 0.000000e+00 ; [#uses=1]
- br i1 %24, label %bb5, label %bb7
-
-bb5: ; preds = %bb4
- store float 0.000000e+00, float* %scevgep18, align 4
- br label %bb7
-
-bb6: ; preds = %bb
- %scevgep20 = getelementptr %struct.btWheelInfo* %9, i32 %w_it.011, i32 23 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep20, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb5, %bb4
- %25 = load i32* %5, align 4 ; [#uses=1]
- %26 = icmp sgt i32 %25, %tmp ; [#uses=1]
- br i1 %26, label %bb, label %return
-
-return: ; preds = %bb7, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicle15resetSuspensionEv(%struct.btRaycastVehicle* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %return
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %12, %bb ] ; [#uses=12]
- %4 = load %struct.btWheelInfo** %3, align 4 ; [#uses=11]
- %scevgep = getelementptr %struct.btWheelInfo* %4, i32 %i.05 ; [#uses=1]
- %5 = tail call float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* %scevgep) ; [#uses=1]
- %scevgep6 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- store float %5, float* %scevgep6, align 4
- %scevgep7 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 22 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep7, align 4
- %scevgep8 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %scevgep8, align 4 ; [#uses=1]
- %7 = fsub float -0.000000e+00, %6 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %scevgep9, align 4 ; [#uses=1]
- %9 = fsub float -0.000000e+00, %8 ; [#uses=1]
- %scevgep10 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %scevgep10, align 4 ; [#uses=1]
- %11 = fsub float -0.000000e+00, %10 ; [#uses=1]
- %scevgep1112 = getelementptr inbounds %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %11, float* %scevgep1112, align 4
- %scevgep13 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %9, float* %scevgep13, align 4
- %scevgep14 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %7, float* %scevgep14, align 4
- %scevgep15 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep15, align 4
- %scevgep16 = getelementptr %struct.btWheelInfo* %4, i32 %i.05, i32 21 ; [#uses=1]
- store float 1.000000e+00, float* %scevgep16, align 4
- %12 = add nsw i32 %i.05, 1 ; [#uses=2]
- %13 = load i32* %0, align 4 ; [#uses=1]
- %14 = icmp sgt i32 %13, %12 ; [#uses=1]
- br i1 %14, label %bb, label %return
-
-return: ; preds = %bb, %entry
- ret void
-}
-
-; [#uses=2]
-define void @_ZN16btRaycastVehicle20updateWheelTransformEib(%struct.btRaycastVehicle* nocapture %this, i32 %wheelIndex, i8 zeroext %interpolatedTransform) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %1 = load %struct.btWheelInfo** %0, align 4 ; [#uses=29]
- %2 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex ; [#uses=1]
- tail call void @_ZN16btRaycastVehicle23updateWheelTransformsWSER11btWheelInfob(%struct.btRaycastVehicle* %this, %struct.btWheelInfo* %2, i8 zeroext %interpolatedTransform)
- %3 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=4]
- %5 = fsub float -0.000000e+00, %4 ; [#uses=6]
- %6 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=4]
- %8 = fsub float -0.000000e+00, %7 ; [#uses=6]
- %9 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=4]
- %11 = fsub float -0.000000e+00, %10 ; [#uses=6]
- %12 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 5, i32 0, i32 1 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=8]
- %14 = fmul float %13, %11 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 5, i32 0, i32 0 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=8]
- %17 = fmul float %16, %8 ; [#uses=1]
- %18 = fsub float %14, %17 ; [#uses=3]
- %19 = fmul float %16, %5 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 5, i32 0, i32 2 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=8]
- %22 = fmul float %21, %11 ; [#uses=1]
- %23 = fsub float %19, %22 ; [#uses=3]
- %24 = fmul float %21, %8 ; [#uses=1]
- %25 = fmul float %13, %5 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=3]
- %27 = fmul float %26, %26 ; [#uses=1]
- %28 = fmul float %23, %23 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = fmul float %18, %18 ; [#uses=1]
- %31 = fadd float %29, %30 ; [#uses=1]
- %32 = tail call float @sqrtf(float %31) nounwind readonly ; [#uses=1]
- %33 = fdiv float 1.000000e+00, %32 ; [#uses=3]
- %34 = fmul float %26, %33 ; [#uses=3]
- %35 = fmul float %23, %33 ; [#uses=3]
- %36 = fmul float %18, %33 ; [#uses=3]
- %37 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 12 ; [#uses=1]
- %38 = load float* %37, align 4 ; [#uses=1]
- %39 = fmul float %10, %10 ; [#uses=1]
- %40 = fmul float %7, %7 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = fmul float %4, %4 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=1]
- %44 = tail call float @sqrtf(float %43) nounwind readonly ; [#uses=1]
- %45 = fmul float %38, 5.000000e-01 ; [#uses=2]
- %46 = tail call float @sinf(float %45) nounwind readonly ; [#uses=1]
- %47 = fdiv float %46, %44 ; [#uses=3]
- %48 = tail call float @cosf(float %45) nounwind readonly ; [#uses=5]
- %49 = fmul float %47, %5 ; [#uses=4]
- %50 = fmul float %47, %8 ; [#uses=5]
- %51 = fmul float %47, %11 ; [#uses=6]
- %52 = fmul float %51, %51 ; [#uses=1]
- %53 = fmul float %50, %50 ; [#uses=1]
- %54 = fadd float %52, %53 ; [#uses=1]
- %55 = fmul float %49, %49 ; [#uses=1]
- %56 = fadd float %54, %55 ; [#uses=1]
- %57 = fmul float %48, %48 ; [#uses=1]
- %58 = fadd float %56, %57 ; [#uses=1]
- %59 = fdiv float 2.000000e+00, %58 ; [#uses=3]
- %60 = fmul float %51, %59 ; [#uses=2]
- %61 = fmul float %50, %59 ; [#uses=3]
- %62 = fmul float %49, %59 ; [#uses=4]
- %63 = fmul float %48, %60 ; [#uses=2]
- %64 = fmul float %48, %61 ; [#uses=2]
- %65 = fmul float %48, %62 ; [#uses=2]
- %66 = fmul float %51, %60 ; [#uses=2]
- %67 = fmul float %51, %61 ; [#uses=2]
- %68 = fmul float %51, %62 ; [#uses=2]
- %69 = fmul float %50, %61 ; [#uses=2]
- %70 = fmul float %50, %62 ; [#uses=2]
- %71 = fmul float %49, %62 ; [#uses=2]
- %72 = fadd float %66, %69 ; [#uses=1]
- %73 = fsub float 1.000000e+00, %72 ; [#uses=3]
- %74 = fadd float %70, %63 ; [#uses=3]
- %75 = fsub float %68, %64 ; [#uses=3]
- %76 = fsub float %70, %63 ; [#uses=3]
- %77 = fadd float %66, %71 ; [#uses=1]
- %78 = fsub float 1.000000e+00, %77 ; [#uses=3]
- %79 = fadd float %67, %65 ; [#uses=3]
- %80 = fadd float %68, %64 ; [#uses=3]
- %81 = fsub float %67, %65 ; [#uses=3]
- %82 = fadd float %69, %71 ; [#uses=1]
- %83 = fsub float 1.000000e+00, %82 ; [#uses=3]
- %84 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 13 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fmul float %16, %16 ; [#uses=1]
- %87 = fmul float %13, %13 ; [#uses=1]
- %88 = fadd float %86, %87 ; [#uses=1]
- %89 = fmul float %21, %21 ; [#uses=1]
- %90 = fadd float %88, %89 ; [#uses=1]
- %91 = tail call float @sqrtf(float %90) nounwind readonly ; [#uses=1]
- %92 = fmul float %85, -5.000000e-01 ; [#uses=2]
- %93 = tail call float @sinf(float %92) nounwind readonly ; [#uses=1]
- %94 = fdiv float %93, %91 ; [#uses=3]
- %95 = tail call float @cosf(float %92) nounwind readonly ; [#uses=5]
- %96 = fmul float %21, %94 ; [#uses=4]
- %97 = fmul float %13, %94 ; [#uses=5]
- %98 = fmul float %16, %94 ; [#uses=6]
- %99 = fmul float %98, %98 ; [#uses=1]
- %100 = fmul float %97, %97 ; [#uses=1]
- %101 = fadd float %99, %100 ; [#uses=1]
- %102 = fmul float %96, %96 ; [#uses=1]
- %103 = fadd float %101, %102 ; [#uses=1]
- %104 = fmul float %95, %95 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fdiv float 2.000000e+00, %105 ; [#uses=3]
- %107 = fmul float %98, %106 ; [#uses=2]
- %108 = fmul float %97, %106 ; [#uses=3]
- %109 = fmul float %96, %106 ; [#uses=4]
- %110 = fmul float %95, %107 ; [#uses=2]
- %111 = fmul float %95, %108 ; [#uses=2]
- %112 = fmul float %95, %109 ; [#uses=2]
- %113 = fmul float %98, %107 ; [#uses=2]
- %114 = fmul float %98, %108 ; [#uses=2]
- %115 = fmul float %98, %109 ; [#uses=2]
- %116 = fmul float %97, %108 ; [#uses=2]
- %117 = fmul float %97, %109 ; [#uses=2]
- %118 = fmul float %96, %109 ; [#uses=2]
- %119 = fadd float %113, %116 ; [#uses=1]
- %120 = fsub float 1.000000e+00, %119 ; [#uses=3]
- %121 = fadd float %117, %110 ; [#uses=3]
- %122 = fsub float %115, %111 ; [#uses=3]
- %123 = fsub float %117, %110 ; [#uses=3]
- %124 = fadd float %113, %118 ; [#uses=1]
- %125 = fsub float 1.000000e+00, %124 ; [#uses=3]
- %126 = fadd float %114, %112 ; [#uses=3]
- %127 = fadd float %115, %111 ; [#uses=3]
- %128 = fsub float %114, %112 ; [#uses=3]
- %129 = fadd float %116, %118 ; [#uses=1]
- %130 = fsub float 1.000000e+00, %129 ; [#uses=3]
- %131 = fmul float %127, %75 ; [#uses=1]
- %132 = fmul float %123, %74 ; [#uses=1]
- %133 = fadd float %131, %132 ; [#uses=1]
- %134 = fmul float %120, %73 ; [#uses=1]
- %135 = fadd float %133, %134 ; [#uses=3]
- %136 = fmul float %128, %75 ; [#uses=1]
- %137 = fmul float %125, %74 ; [#uses=1]
- %138 = fadd float %136, %137 ; [#uses=1]
- %139 = fmul float %121, %73 ; [#uses=1]
- %140 = fadd float %138, %139 ; [#uses=3]
- %141 = fmul float %130, %75 ; [#uses=1]
- %142 = fmul float %126, %74 ; [#uses=1]
- %143 = fadd float %141, %142 ; [#uses=1]
- %144 = fmul float %122, %73 ; [#uses=1]
- %145 = fadd float %143, %144 ; [#uses=3]
- %146 = fmul float %127, %79 ; [#uses=1]
- %147 = fmul float %123, %78 ; [#uses=1]
- %148 = fadd float %146, %147 ; [#uses=1]
- %149 = fmul float %120, %76 ; [#uses=1]
- %150 = fadd float %148, %149 ; [#uses=3]
- %151 = fmul float %128, %79 ; [#uses=1]
- %152 = fmul float %125, %78 ; [#uses=1]
- %153 = fadd float %151, %152 ; [#uses=1]
- %154 = fmul float %121, %76 ; [#uses=1]
- %155 = fadd float %153, %154 ; [#uses=3]
- %156 = fmul float %130, %79 ; [#uses=1]
- %157 = fmul float %126, %78 ; [#uses=1]
- %158 = fadd float %156, %157 ; [#uses=1]
- %159 = fmul float %122, %76 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=3]
- %161 = fmul float %127, %83 ; [#uses=1]
- %162 = fmul float %123, %81 ; [#uses=1]
- %163 = fadd float %161, %162 ; [#uses=1]
- %164 = fmul float %120, %80 ; [#uses=1]
- %165 = fadd float %163, %164 ; [#uses=3]
- %166 = fmul float %128, %83 ; [#uses=1]
- %167 = fmul float %125, %81 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=1]
- %169 = fmul float %121, %80 ; [#uses=1]
- %170 = fadd float %168, %169 ; [#uses=3]
- %171 = fmul float %130, %83 ; [#uses=1]
- %172 = fmul float %126, %81 ; [#uses=1]
- %173 = fadd float %171, %172 ; [#uses=1]
- %174 = fmul float %122, %80 ; [#uses=1]
- %175 = fadd float %173, %174 ; [#uses=3]
- %176 = fmul float %145, %11 ; [#uses=1]
- %177 = fmul float %140, %8 ; [#uses=1]
- %178 = fadd float %176, %177 ; [#uses=1]
- %179 = fmul float %135, %5 ; [#uses=1]
- %180 = fadd float %178, %179 ; [#uses=1]
- %181 = fmul float %34, %145 ; [#uses=1]
- %182 = fmul float %35, %140 ; [#uses=1]
- %183 = fadd float %181, %182 ; [#uses=1]
- %184 = fmul float %36, %135 ; [#uses=1]
- %185 = fadd float %183, %184 ; [#uses=1]
- %186 = fmul float %16, %145 ; [#uses=1]
- %187 = fmul float %13, %140 ; [#uses=1]
- %188 = fadd float %186, %187 ; [#uses=1]
- %189 = fmul float %21, %135 ; [#uses=1]
- %190 = fadd float %188, %189 ; [#uses=1]
- %191 = fmul float %160, %11 ; [#uses=1]
- %192 = fmul float %155, %8 ; [#uses=1]
- %193 = fadd float %191, %192 ; [#uses=1]
- %194 = fmul float %150, %5 ; [#uses=1]
- %195 = fadd float %193, %194 ; [#uses=1]
- %196 = fmul float %34, %160 ; [#uses=1]
- %197 = fmul float %35, %155 ; [#uses=1]
- %198 = fadd float %196, %197 ; [#uses=1]
- %199 = fmul float %36, %150 ; [#uses=1]
- %200 = fadd float %198, %199 ; [#uses=1]
- %201 = fmul float %16, %160 ; [#uses=1]
- %202 = fmul float %13, %155 ; [#uses=1]
- %203 = fadd float %201, %202 ; [#uses=1]
- %204 = fmul float %21, %150 ; [#uses=1]
- %205 = fadd float %203, %204 ; [#uses=1]
- %206 = fmul float %175, %11 ; [#uses=1]
- %207 = fmul float %170, %8 ; [#uses=1]
- %208 = fadd float %206, %207 ; [#uses=1]
- %209 = fmul float %165, %5 ; [#uses=1]
- %210 = fadd float %208, %209 ; [#uses=1]
- %211 = fmul float %34, %175 ; [#uses=1]
- %212 = fmul float %35, %170 ; [#uses=1]
- %213 = fadd float %211, %212 ; [#uses=1]
- %214 = fmul float %36, %165 ; [#uses=1]
- %215 = fadd float %213, %214 ; [#uses=1]
- %216 = fmul float %16, %175 ; [#uses=1]
- %217 = fmul float %13, %170 ; [#uses=1]
- %218 = fadd float %216, %217 ; [#uses=1]
- %219 = fmul float %21, %165 ; [#uses=1]
- %220 = fadd float %218, %219 ; [#uses=1]
- %221 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %220, float* %221, align 4
- %222 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %215, float* %222, align 4
- %223 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %210, float* %223, align 4
- %224 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %224, align 4
- %225 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %205, float* %225, align 4
- %226 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %200, float* %226, align 4
- %227 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %195, float* %227, align 4
- %228 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %228, align 4
- %229 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %190, float* %229, align 4
- %230 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %185, float* %230, align 4
- %231 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %180, float* %231, align 4
- %232 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %232, align 4
- %233 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 2 ; [#uses=1]
- %234 = load float* %233, align 4 ; [#uses=3]
- %235 = fmul float %4, %234 ; [#uses=1]
- %236 = fmul float %7, %234 ; [#uses=1]
- %237 = fmul float %10, %234 ; [#uses=1]
- %238 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %239 = load float* %238, align 4 ; [#uses=1]
- %240 = fadd float %239, %235 ; [#uses=1]
- %241 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %242 = load float* %241, align 4 ; [#uses=1]
- %243 = fadd float %242, %236 ; [#uses=1]
- %244 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %245 = load float* %244, align 4 ; [#uses=1]
- %246 = fadd float %245, %237 ; [#uses=1]
- %247 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- store float %246, float* %247, align 4
- %248 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- store float %243, float* %248, align 4
- %249 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- store float %240, float* %249, align 4
- %250 = getelementptr inbounds %struct.btWheelInfo* %1, i32 %wheelIndex, i32 1, i32 1, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %250, align 4
- ret void
-}
-
-; [#uses=0]
-define %struct.btWheelInfo* @_ZN16btRaycastVehicle8addWheelERK9btVector3S2_S2_ffRKNS_15btVehicleTuningEb(%struct.btRaycastVehicle* nocapture %this, %struct.btQuadWord* nocapture %connectionPointCS, %struct.btQuadWord* nocapture %wheelDirectionCS0, %struct.btQuadWord* nocapture %wheelAxleCS, float %suspensionRestLength, float %wheelRadius, %"struct.btRaycastVehicle::btVehicleTuning"* nocapture %tuning, i8 zeroext %isFrontWheel) align 2 {
-entry:
- %0 = alloca %struct.btWheelInfo, align 8 ; [#uses=28]
- %1 = getelementptr inbounds %struct.btQuadWord* %connectionPointCS, i32 0, i32 0, i32 0 ; [#uses=1]
- %2 = load float* %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %connectionPointCS, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %connectionPointCS, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %connectionPointCS, i32 0, i32 0, i32 3 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %wheelDirectionCS0, i32 0, i32 0, i32 0 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %wheelDirectionCS0, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %wheelDirectionCS0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %wheelDirectionCS0, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btQuadWord* %wheelAxleCS, i32 0, i32 0, i32 0 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btQuadWord* %wheelAxleCS, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btQuadWord* %wheelAxleCS, i32 0, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btQuadWord* %wheelAxleCS, i32 0, i32 0, i32 3 ; [#uses=1]
- %24 = load float* %23, align 4 ; [#uses=1]
- %25 = getelementptr inbounds %"struct.btRaycastVehicle::btVehicleTuning"* %tuning, i32 0, i32 0 ; [#uses=1]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %"struct.btRaycastVehicle::btVehicleTuning"* %tuning, i32 0, i32 1 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.btRaycastVehicle::btVehicleTuning"* %tuning, i32 0, i32 2 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %"struct.btRaycastVehicle::btVehicleTuning"* %tuning, i32 0, i32 4 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds %"struct.btRaycastVehicle::btVehicleTuning"* %tuning, i32 0, i32 3 ; [#uses=1]
- %34 = load float* %33, align 4 ; [#uses=1]
- %35 = getelementptr inbounds %"struct.btRaycastVehicle::btVehicleTuning"* %tuning, i32 0, i32 5 ; [#uses=1]
- %36 = load float* %35, align 4 ; [#uses=1]
- %37 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 5 ; [#uses=1]
- store float %suspensionRestLength, float* %37, align 4
- %38 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 6 ; [#uses=1]
- store float %34, float* %38, align 8
- %39 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 7 ; [#uses=1]
- store float %wheelRadius, float* %39, align 4
- %40 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 8 ; [#uses=1]
- store float %26, float* %40, align 8
- %41 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 9 ; [#uses=1]
- store float %28, float* %41, align 4
- %42 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 10 ; [#uses=1]
- store float %30, float* %42, align 8
- %43 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- store float %2, float* %43, align 4
- %44 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- store float %4, float* %44, align 4
- %45 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- store float %6, float* %45, align 4
- %46 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 2, i32 0, i32 3 ; [#uses=1]
- store float %8, float* %46, align 4
- %47 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- store float %10, float* %47, align 4
- %48 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %48, align 4
- %49 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- store float %14, float* %49, align 4
- %50 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 3, i32 0, i32 3 ; [#uses=1]
- store float %16, float* %50, align 4
- %51 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- store float %18, float* %51, align 4
- %52 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- store float %20, float* %52, align 4
- %53 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- store float %22, float* %53, align 4
- %54 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 4, i32 0, i32 3 ; [#uses=1]
- store float %24, float* %54, align 4
- %55 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 11 ; [#uses=1]
- store float %32, float* %55, align 4
- %56 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %56, align 8
- %57 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 17 ; [#uses=1]
- store float 0.000000e+00, float* %57, align 4
- %58 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 13 ; [#uses=1]
- store float 0.000000e+00, float* %58, align 4
- %59 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 14 ; [#uses=1]
- store float 0.000000e+00, float* %59, align 8
- %60 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 18 ; [#uses=1]
- store float 0.000000e+00, float* %60, align 8
- %61 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 15 ; [#uses=1]
- store float 0x3FB99999A0000000, float* %61, align 4
- %62 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 19 ; [#uses=1]
- store i8 %isFrontWheel, i8* %62, align 4
- %63 = getelementptr inbounds %struct.btWheelInfo* %0, i32 0, i32 16 ; [#uses=1]
- store float %36, float* %63, align 8
- %64 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17 ; [#uses=1]
- call void @_ZN20btAlignedObjectArrayI11btWheelInfoE9push_backERKS0_(%"struct.btAlignedObjectArray<btWheelInfo>"* %64, %struct.btWheelInfo* %0) inlinehint
- %65 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=2]
- %66 = load i32* %65, align 4 ; [#uses=1]
- %67 = add nsw i32 %66, -1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %69 = load %struct.btWheelInfo** %68, align 4 ; [#uses=1]
- %70 = getelementptr inbounds %struct.btWheelInfo* %69, i32 %67 ; [#uses=2]
- call void @_ZN16btRaycastVehicle23updateWheelTransformsWSER11btWheelInfob(%struct.btRaycastVehicle* %this, %struct.btWheelInfo* %70, i8 zeroext 0)
- %71 = load i32* %65, align 4 ; [#uses=1]
- %72 = add nsw i32 %71, -1 ; [#uses=1]
- call void @_ZN16btRaycastVehicle20updateWheelTransformEib(%struct.btRaycastVehicle* %this, i32 %72, i8 zeroext 0)
- ret %struct.btWheelInfo* %70
-}
-
-; [#uses=1]
-define void @_ZN16btRaycastVehicleD0Ev(%struct.btRaycastVehicle* %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV16btRaycastVehicle, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=3]
- %2 = load %struct.btWheelInfo** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btWheelInfo* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btWheelInfo* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad44
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btWheelInfo* null, %struct.btWheelInfo** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btWheelInfo* null, %struct.btWheelInfo** %1, align 4
- %8 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %11 = load float** %10, align 4 ; [#uses=2]
- %12 = icmp eq float* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i73
-
-bb.i.i.i73: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i72 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i72, label %bb2.i.i.i75, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %bb.i.i.i73
- %15 = bitcast float* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i75 unwind label %lpad40
-
-bb2.i.i.i75: ; preds = %bb1.i.i.i74, %bb.i.i.i73
- store float* null, float** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i75, %bb3
- %16 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store float* null, float** %10, align 4
- %17 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %20 = load float** %19, align 4 ; [#uses=2]
- %21 = icmp eq float* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i78
-
-bb.i.i.i78: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i77 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i77, label %bb2.i.i.i80, label %bb1.i.i.i79
-
-bb1.i.i.i79: ; preds = %bb.i.i.i78
- %24 = bitcast float* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i80 unwind label %lpad36
-
-bb2.i.i.i80: ; preds = %bb1.i.i.i79, %bb.i.i.i78
- store float* null, float** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i80, %bb10
- %25 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store float* null, float** %19, align 4
- %26 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %29 = load %struct.btQuadWord** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btQuadWord* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i84
-
-bb.i.i.i84: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i83 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i83, label %bb2.i.i.i86, label %bb1.i.i.i85
-
-bb1.i.i.i85: ; preds = %bb.i.i.i84
- %33 = bitcast %struct.btQuadWord* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i86 unwind label %lpad
-
-bb2.i.i.i86: ; preds = %bb1.i.i.i85, %bb.i.i.i84
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- br label %bb28
-
-invcont26: ; preds = %bb2.i.i.i102, %ppad
- %34 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %59, align 4
- %35 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb28: ; preds = %bb2.i.i.i86, %bb19
- %37 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- %38 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %41 = load %struct.btQuadWord** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btQuadWord* %41, null ; [#uses=1]
- br i1 %42, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit92, label %bb.i.i.i89
-
-bb.i.i.i89: ; preds = %bb28
- %43 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i88 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i88, label %bb2.i.i.i91, label %bb1.i.i.i90
-
-bb1.i.i.i90: ; preds = %bb.i.i.i89
- %45 = bitcast %struct.btQuadWord* %41 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %45)
- br label %bb2.i.i.i91
-
-bb2.i.i.i91: ; preds = %bb1.i.i.i90, %bb.i.i.i89
- store %struct.btQuadWord* null, %struct.btQuadWord** %40, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit92
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit92: ; preds = %bb2.i.i.i91, %bb28
- %46 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %40, align 4
- %47 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %48, align 4
- %49 = bitcast %struct.btRaycastVehicle* %this to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %49) nounwind
- ret void
-
-lpad: ; preds = %bb1.i.i.i85
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad36: ; preds = %bb1.i.i.i79
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad64
-
-lpad40: ; preds = %bb1.i.i.i74
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad65
-
-lpad44: ; preds = %bb1.i.i.i
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %50 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %51 = load float** %50, align 4 ; [#uses=2]
- %52 = icmp eq float* %51, null ; [#uses=1]
- br i1 %52, label %_ZN20btAlignedObjectArrayIfED1Ev.exit98, label %bb.i.i.i94
-
-bb.i.i.i94: ; preds = %lpad44
- %53 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %54 = load i8* %53, align 4 ; [#uses=1]
- %toBool.i.i.i93 = icmp eq i8 %54, 0 ; [#uses=1]
- br i1 %toBool.i.i.i93, label %bb2.i.i.i96, label %bb1.i.i.i95
-
-bb1.i.i.i95: ; preds = %bb.i.i.i94
- %55 = bitcast float* %51 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %55)
- to label %bb2.i.i.i96 unwind label %lpad48
-
-bb2.i.i.i96: ; preds = %bb1.i.i.i95, %bb.i.i.i94
- store float* null, float** %50, align 4
- br label %_ZN20btAlignedObjectArrayIfED1Ev.exit98
-
-_ZN20btAlignedObjectArrayIfED1Ev.exit98: ; preds = %bb2.i.i.i96, %lpad44
- %56 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %56, align 4
- store float* null, float** %50, align 4
- %57 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %57, align 4
- %58 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %58, align 4
- br label %ppad65
-
-lpad48: ; preds = %bb1.i.i.i95
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad52: ; preds = %bb1.i.i.i113
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad56: ; preds = %bb1.i.i.i107
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %bb1.i.i.i101
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110 ] ; [#uses=1]
- %59 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %60 = load %struct.btQuadWord** %59, align 4 ; [#uses=2]
- %61 = icmp eq %struct.btQuadWord* %60, null ; [#uses=1]
- br i1 %61, label %invcont26, label %bb.i.i.i100
-
-bb.i.i.i100: ; preds = %ppad
- %62 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %63 = load i8* %62, align 4 ; [#uses=1]
- %toBool.i.i.i99 = icmp eq i8 %63, 0 ; [#uses=1]
- br i1 %toBool.i.i.i99, label %bb2.i.i.i102, label %bb1.i.i.i101
-
-bb1.i.i.i101: ; preds = %bb.i.i.i100
- %64 = bitcast %struct.btQuadWord* %60 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %64)
- to label %bb2.i.i.i102 unwind label %lpad60
-
-bb2.i.i.i102: ; preds = %bb1.i.i.i101, %bb.i.i.i100
- store %struct.btQuadWord* null, %struct.btQuadWord** %59, align 4
- br label %invcont26
-
-ppad64: ; preds = %_ZN20btAlignedObjectArrayIfED1Ev.exit116, %lpad36
- %eh_exception.1 = phi i8* [ %eh_ptr37, %lpad36 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIfED1Ev.exit116 ] ; [#uses=1]
- %65 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %66 = load %struct.btQuadWord** %65, align 4 ; [#uses=2]
- %67 = icmp eq %struct.btQuadWord* %66, null ; [#uses=1]
- br i1 %67, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110, label %bb.i.i.i106
-
-bb.i.i.i106: ; preds = %ppad64
- %68 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %69 = load i8* %68, align 4 ; [#uses=1]
- %toBool.i.i.i105 = icmp eq i8 %69, 0 ; [#uses=1]
- br i1 %toBool.i.i.i105, label %bb2.i.i.i108, label %bb1.i.i.i107
-
-bb1.i.i.i107: ; preds = %bb.i.i.i106
- %70 = bitcast %struct.btQuadWord* %66 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %70)
- to label %bb2.i.i.i108 unwind label %lpad56
-
-bb2.i.i.i108: ; preds = %bb1.i.i.i107, %bb.i.i.i106
- store %struct.btQuadWord* null, %struct.btQuadWord** %65, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110: ; preds = %bb2.i.i.i108, %ppad64
- %71 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %71, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %65, align 4
- %72 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %72, align 4
- %73 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %73, align 4
- br label %ppad
-
-ppad65: ; preds = %_ZN20btAlignedObjectArrayIfED1Ev.exit98, %lpad40
- %eh_exception.0 = phi i8* [ %eh_ptr41, %lpad40 ], [ %eh_ptr45, %_ZN20btAlignedObjectArrayIfED1Ev.exit98 ] ; [#uses=1]
- %74 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %75 = load float** %74, align 4 ; [#uses=2]
- %76 = icmp eq float* %75, null ; [#uses=1]
- br i1 %76, label %_ZN20btAlignedObjectArrayIfED1Ev.exit116, label %bb.i.i.i112
-
-bb.i.i.i112: ; preds = %ppad65
- %77 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %78 = load i8* %77, align 4 ; [#uses=1]
- %toBool.i.i.i111 = icmp eq i8 %78, 0 ; [#uses=1]
- br i1 %toBool.i.i.i111, label %bb2.i.i.i114, label %bb1.i.i.i113
-
-bb1.i.i.i113: ; preds = %bb.i.i.i112
- %79 = bitcast float* %75 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %79)
- to label %bb2.i.i.i114 unwind label %lpad52
-
-bb2.i.i.i114: ; preds = %bb1.i.i.i113, %bb.i.i.i112
- store float* null, float** %74, align 4
- br label %_ZN20btAlignedObjectArrayIfED1Ev.exit116
-
-_ZN20btAlignedObjectArrayIfED1Ev.exit116: ; preds = %bb2.i.i.i114, %ppad65
- %80 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %80, align 4
- store float* null, float** %74, align 4
- %81 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %81, align 4
- %82 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %82, align 4
- br label %ppad64
-}
-
-; [#uses=1]
-define void @_ZN16btRaycastVehicleD1Ev(%struct.btRaycastVehicle* nocapture %this) align 2 {
-entry:
- tail call void @_ZN16btRaycastVehicleD2Ev(%struct.btRaycastVehicle* %this)
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btRaycastVehicle13updateVehicleEf(%struct.btRaycastVehicle* %this, float %step) align 2 {
-entry:
- %impulse = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %relpos = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=7]
- %1 = load i32* %0, align 4 ; [#uses=2]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb, label %bb3
-
-bb: ; preds = %bb, %entry
- %3 = phi i32 [ %4, %bb ], [ 0, %entry ] ; [#uses=2]
- call void @_ZN16btRaycastVehicle20updateWheelTransformEib(%struct.btRaycastVehicle* %this, i32 %3, i8 zeroext 0)
- %4 = add nsw i32 %3, 1 ; [#uses=2]
- %5 = load i32* %0, align 4 ; [#uses=2]
- %6 = icmp sgt i32 %5, %4 ; [#uses=1]
- br i1 %6, label %bb, label %bb3
-
-bb3: ; preds = %bb, %entry
- %7 = phi i32 [ %1, %entry ], [ %5, %bb ] ; [#uses=1]
- %8 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=4]
- %9 = load %struct.btRigidBody** %8, align 4 ; [#uses=6]
- %10 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 2, i32 0, i32 0 ; [#uses=2]
- %11 = load float* %10, align 4 ; [#uses=2]
- %12 = fmul float %11, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 2, i32 0, i32 1 ; [#uses=2]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fmul float %14, %14 ; [#uses=1]
- %16 = fadd float %12, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 2, i32 0, i32 2 ; [#uses=2]
- %18 = load float* %17, align 4 ; [#uses=2]
- %19 = fmul float %18, %18 ; [#uses=1]
- %20 = fadd float %16, %19 ; [#uses=1]
- %21 = call float @sqrtf(float %20) nounwind readonly ; [#uses=1]
- %22 = fmul float %21, 0x400CCCCCC0000000 ; [#uses=2]
- %23 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 12 ; [#uses=2]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 16 ; [#uses=2]
- %25 = load i32* %24, align 4 ; [#uses=3]
- %26 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 %25 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 %25 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btRigidBody* %9, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 %25 ; [#uses=1]
- %29 = load float* %28, align 4 ; [#uses=1]
- %30 = load float* %27, align 4 ; [#uses=1]
- %31 = load float* %26, align 4 ; [#uses=1]
- %32 = load float* %10, align 4 ; [#uses=1]
- %33 = fmul float %29, %32 ; [#uses=1]
- %34 = load float* %13, align 4 ; [#uses=1]
- %35 = fmul float %30, %34 ; [#uses=1]
- %36 = fadd float %33, %35 ; [#uses=1]
- %37 = load float* %17, align 4 ; [#uses=1]
- %38 = fmul float %31, %37 ; [#uses=1]
- %39 = fadd float %36, %38 ; [#uses=1]
- %40 = fcmp olt float %39, 0.000000e+00 ; [#uses=1]
- br i1 %40, label %bb5, label %bb8.preheader
-
-bb5: ; preds = %bb3
- %41 = fsub float -0.000000e+00, %22 ; [#uses=1]
- store float %41, float* %23, align 4
- br label %bb8.preheader
-
-bb8.preheader: ; preds = %bb5, %bb3
- %42 = icmp sgt i32 %7, 0 ; [#uses=1]
- br i1 %42, label %bb.nph49, label %bb16
-
-bb.nph49: ; preds = %bb8.preheader
- %43 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb7, %bb.nph49
- %i.048 = phi i32 [ 0, %bb.nph49 ], [ %46, %bb7 ] ; [#uses=2]
- %44 = load %struct.btWheelInfo** %43, align 4 ; [#uses=1]
- %scevgep93 = getelementptr %struct.btWheelInfo* %44, i32 %i.048 ; [#uses=1]
- %45 = call float @_ZN16btRaycastVehicle7rayCastER11btWheelInfo(%struct.btRaycastVehicle* %this, %struct.btWheelInfo* %scevgep93) ; [#uses=0]
- %46 = add nsw i32 %i.048, 1 ; [#uses=2]
- %47 = load i32* %0, align 4 ; [#uses=2]
- %48 = icmp sgt i32 %47, %46 ; [#uses=1]
- br i1 %48, label %bb7, label %bb10
-
-bb10: ; preds = %bb7
- %.pre = load %struct.btRigidBody** %8, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btRigidBody* %.pre, i32 0, i32 4 ; [#uses=1]
- %50 = load float* %49, align 4 ; [#uses=1]
- %51 = fdiv float 1.000000e+00, %50 ; [#uses=1]
- %52 = icmp sgt i32 %47, 0 ; [#uses=1]
- br i1 %52, label %bb.nph.i, label %bb16
-
-bb.nph.i: ; preds = %bb10
- %53 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- br label %bb.i
-
-bb.i: ; preds = %bb7.i, %bb.nph.i
- %w_it.011.i = phi i32 [ 0, %bb.nph.i ], [ %tmp.i, %bb7.i ] ; [#uses=11]
- %tmp.i = add i32 %w_it.011.i, 1 ; [#uses=2]
- %54 = load %struct.btWheelInfo** %53, align 4 ; [#uses=10]
- %scevgep12.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 0, i32 6 ; [#uses=1]
- %55 = load i8* %scevgep12.i, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %55, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb6.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %scevgep.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i ; [#uses=1]
- %56 = call float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* %scevgep.i) ; [#uses=1]
- %scevgep13.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 0, i32 2 ; [#uses=1]
- %57 = load float* %scevgep13.i, align 4 ; [#uses=1]
- %58 = fsub float %56, %57 ; [#uses=1]
- %scevgep14.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 8 ; [#uses=1]
- %59 = load float* %scevgep14.i, align 4 ; [#uses=1]
- %60 = fmul float %59, %58 ; [#uses=1]
- %scevgep15.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 21 ; [#uses=1]
- %61 = load float* %scevgep15.i, align 4 ; [#uses=1]
- %62 = fmul float %60, %61 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 22 ; [#uses=1]
- %63 = load float* %scevgep16.i, align 4 ; [#uses=2]
- %64 = fcmp olt float %63, 0.000000e+00 ; [#uses=1]
- br i1 %64, label %bb2.i, label %bb3.i
-
-bb2.i: ; preds = %bb1.i
- %65 = getelementptr inbounds %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 9 ; [#uses=1]
- br label %bb4.i
-
-bb3.i: ; preds = %bb1.i
- %scevgep17.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 10 ; [#uses=1]
- br label %bb4.i
-
-bb4.i: ; preds = %bb3.i, %bb2.i
- %susp_damping.0.in.i = phi float* [ %65, %bb2.i ], [ %scevgep17.i, %bb3.i ] ; [#uses=1]
- %susp_damping.0.i = load float* %susp_damping.0.in.i, align 4 ; [#uses=1]
- %66 = fmul float %susp_damping.0.i, %63 ; [#uses=1]
- %67 = fsub float %62, %66 ; [#uses=1]
- %68 = fmul float %67, %51 ; [#uses=2]
- %scevgep85 = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 23 ; [#uses=2]
- store float %68, float* %scevgep85, align 4
- %69 = fcmp olt float %68, 0.000000e+00 ; [#uses=1]
- br i1 %69, label %bb5.i, label %bb7.i
-
-bb5.i: ; preds = %bb4.i
- store float 0.000000e+00, float* %scevgep85, align 4
- br label %bb7.i
-
-bb6.i: ; preds = %bb.i
- %scevgep20.i = getelementptr %struct.btWheelInfo* %54, i32 %w_it.011.i, i32 23 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep20.i, align 4
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb5.i, %bb4.i
- %70 = load i32* %0, align 4 ; [#uses=2]
- %71 = icmp sgt i32 %70, %tmp.i ; [#uses=1]
- br i1 %71, label %bb.i, label %bb14.preheader
-
-bb14.preheader: ; preds = %bb7.i
- %72 = icmp sgt i32 %70, 0 ; [#uses=1]
- br i1 %72, label %bb.nph47, label %bb16
-
-bb.nph47: ; preds = %bb14.preheader
- %73 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- %74 = getelementptr inbounds %struct.btQuadWord* %impulse, i32 0, i32 0, i32 0 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btQuadWord* %impulse, i32 0, i32 0, i32 1 ; [#uses=1]
- %76 = getelementptr inbounds %struct.btQuadWord* %impulse, i32 0, i32 0, i32 2 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btQuadWord* %impulse, i32 0, i32 0, i32 3 ; [#uses=1]
- %78 = getelementptr inbounds %struct.btQuadWord* %relpos, i32 0, i32 0, i32 0 ; [#uses=1]
- %79 = getelementptr inbounds %struct.btQuadWord* %relpos, i32 0, i32 0, i32 1 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btQuadWord* %relpos, i32 0, i32 0, i32 2 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btQuadWord* %relpos, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %bb11, %bb.nph47
- %i.146 = phi i32 [ 0, %bb.nph47 ], [ %tmp81, %bb11 ] ; [#uses=9]
- %tmp81 = add i32 %i.146, 1 ; [#uses=2]
- %82 = load %struct.btWheelInfo** %73, align 4 ; [#uses=8]
- %scevgep71 = getelementptr %struct.btWheelInfo* %82, i32 %i.146, i32 23 ; [#uses=1]
- %83 = load float* %scevgep71, align 4 ; [#uses=2]
- %scevgep72 = getelementptr %struct.btWheelInfo* %82, i32 %i.146, i32 16 ; [#uses=1]
- %84 = load float* %scevgep72, align 4 ; [#uses=2]
- %85 = fcmp olt float %84, %83 ; [#uses=1]
- %suspensionForce.0 = select i1 %85, float %84, float %83 ; [#uses=3]
- %scevgep73 = getelementptr %struct.btWheelInfo* %82, i32 %i.146, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %86 = load float* %scevgep73, align 4 ; [#uses=1]
- %87 = fmul float %86, %suspensionForce.0 ; [#uses=1]
- %scevgep74 = getelementptr %struct.btWheelInfo* %82, i32 %i.146, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %88 = load float* %scevgep74, align 4 ; [#uses=1]
- %89 = fmul float %88, %suspensionForce.0 ; [#uses=1]
- %scevgep7576 = getelementptr inbounds %struct.btWheelInfo* %82, i32 %i.146, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %scevgep7576, align 4 ; [#uses=1]
- %91 = fmul float %90, %suspensionForce.0 ; [#uses=1]
- %92 = fmul float %87, %step ; [#uses=1]
- %93 = fmul float %89, %step ; [#uses=1]
- %94 = fmul float %91, %step ; [#uses=1]
- store float %94, float* %74, align 8
- store float %93, float* %75, align 4
- store float %92, float* %76, align 8
- store float 0.000000e+00, float* %77, align 4
- %95 = load %struct.btRigidBody** %8, align 4 ; [#uses=4]
- %scevgep77 = getelementptr %struct.btWheelInfo* %82, i32 %i.146, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %96 = load float* %scevgep77, align 4 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btRigidBody* %95, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fsub float %96, %98 ; [#uses=1]
- %scevgep78 = getelementptr %struct.btWheelInfo* %82, i32 %i.146, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %100 = load float* %scevgep78, align 4 ; [#uses=1]
- %101 = getelementptr inbounds %struct.btRigidBody* %95, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=1]
- %103 = fsub float %100, %102 ; [#uses=1]
- %scevgep79 = getelementptr %struct.btWheelInfo* %82, i32 %i.146, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %104 = load float* %scevgep79, align 4 ; [#uses=1]
- %105 = getelementptr inbounds %struct.btRigidBody* %95, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=1]
- %107 = fsub float %104, %106 ; [#uses=1]
- store float %107, float* %78, align 8
- store float %103, float* %79, align 4
- store float %99, float* %80, align 8
- store float 0.000000e+00, float* %81, align 4
- call void @_ZN11btRigidBody12applyImpulseERK9btVector3S2_(%struct.btRigidBody* %95, %struct.btQuadWord* %impulse, %struct.btQuadWord* %relpos) nounwind
- %108 = load i32* %0, align 4 ; [#uses=1]
- %109 = icmp sgt i32 %108, %tmp81 ; [#uses=1]
- br i1 %109, label %bb11, label %bb16
-
-bb16: ; preds = %bb11, %bb14.preheader, %bb10, %bb8.preheader
- %110 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- %111 = load i32 (...)*** %110, align 4 ; [#uses=1]
- %112 = getelementptr inbounds i32 (...)** %111, i32 5 ; [#uses=1]
- %113 = load i32 (...)** %112, align 4 ; [#uses=1]
- %114 = bitcast i32 (...)* %113 to void (%struct.btRaycastVehicle*, float)* ; [#uses=1]
- call void %114(%struct.btRaycastVehicle* %this, float %step)
- %115 = load i32* %0, align 4 ; [#uses=1]
- %116 = icmp sgt i32 %115, 0 ; [#uses=1]
- br i1 %116, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb16
- %117 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- br label %bb17
-
-bb17: ; preds = %bb23, %bb.nph
- %i.245 = phi i32 [ 0, %bb.nph ], [ %tmp, %bb23 ] ; [#uses=14]
- %tmp = add i32 %i.245, 1 ; [#uses=2]
- %118 = load %struct.btWheelInfo** %117, align 4 ; [#uses=13]
- %119 = load %struct.btRigidBody** %8, align 4 ; [#uses=12]
- %scevgep = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %120 = load float* %scevgep, align 4 ; [#uses=1]
- %121 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %122 = load float* %121, align 4 ; [#uses=1]
- %123 = fsub float %120, %122 ; [#uses=2]
- %scevgep52 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %124 = load float* %scevgep52, align 4 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %126 = load float* %125, align 4 ; [#uses=1]
- %127 = fsub float %124, %126 ; [#uses=2]
- %scevgep53 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %128 = load float* %scevgep53, align 4 ; [#uses=1]
- %129 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %130 = load float* %129, align 4 ; [#uses=1]
- %131 = fsub float %128, %130 ; [#uses=2]
- %132 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %133 = load float* %132, align 4 ; [#uses=2]
- %134 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %135 = load float* %134, align 4 ; [#uses=2]
- %136 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %137 = load float* %136, align 4 ; [#uses=2]
- %scevgep54 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 0, i32 6 ; [#uses=1]
- %138 = load i8* %scevgep54, align 4 ; [#uses=1]
- %toBool20 = icmp eq i8 %138, 0 ; [#uses=1]
- br i1 %toBool20, label %bb22, label %bb21
-
-bb21: ; preds = %bb17
- %139 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %141 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %142 = fmul float %137, %127 ; [#uses=1]
- %143 = fmul float %135, %123 ; [#uses=1]
- %144 = fmul float %133, %123 ; [#uses=1]
- %145 = fmul float %137, %131 ; [#uses=1]
- %146 = fmul float %135, %131 ; [#uses=1]
- %147 = fmul float %133, %127 ; [#uses=1]
- %148 = load float* %139, align 4 ; [#uses=1]
- %149 = load float* %140, align 4 ; [#uses=1]
- %150 = load float* %141, align 4 ; [#uses=1]
- %151 = fsub float %143, %142 ; [#uses=1]
- %152 = fsub float %145, %144 ; [#uses=1]
- %153 = fsub float %147, %146 ; [#uses=1]
- %154 = fadd float %148, %151 ; [#uses=1]
- %155 = fadd float %149, %152 ; [#uses=1]
- %156 = fadd float %150, %153 ; [#uses=1]
- %157 = load i32* %24, align 4 ; [#uses=3]
- %158 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 %157 ; [#uses=1]
- %159 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 %157 ; [#uses=1]
- %160 = getelementptr inbounds %struct.btRigidBody* %119, i32 0, i32 0, i32 1, i32 0, i32 0, i32 0, i32 0, i32 %157 ; [#uses=1]
- %161 = load float* %160, align 4 ; [#uses=2]
- %162 = load float* %159, align 4 ; [#uses=2]
- %163 = load float* %158, align 4 ; [#uses=2]
- %scevgep5556 = getelementptr inbounds %struct.btWheelInfo* %118, i32 %i.245, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %164 = load float* %scevgep5556, align 4 ; [#uses=2]
- %165 = fmul float %161, %164 ; [#uses=1]
- %scevgep57 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %166 = load float* %scevgep57, align 4 ; [#uses=2]
- %167 = fmul float %162, %166 ; [#uses=1]
- %168 = fadd float %165, %167 ; [#uses=1]
- %scevgep58 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %169 = load float* %scevgep58, align 4 ; [#uses=2]
- %170 = fmul float %163, %169 ; [#uses=1]
- %171 = fadd float %168, %170 ; [#uses=3]
- %172 = fmul float %169, %171 ; [#uses=1]
- %173 = fmul float %166, %171 ; [#uses=1]
- %174 = fmul float %164, %171 ; [#uses=1]
- %175 = fsub float %161, %174 ; [#uses=1]
- %176 = fsub float %162, %173 ; [#uses=1]
- %177 = fsub float %163, %172 ; [#uses=1]
- %178 = fmul float %175, %154 ; [#uses=1]
- %179 = fmul float %176, %155 ; [#uses=1]
- %180 = fadd float %178, %179 ; [#uses=1]
- %181 = fmul float %177, %156 ; [#uses=1]
- %182 = fadd float %180, %181 ; [#uses=1]
- %183 = fmul float %182, %step ; [#uses=1]
- %scevgep62 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 7 ; [#uses=1]
- %184 = load float* %scevgep62, align 4 ; [#uses=1]
- %185 = fdiv float %183, %184 ; [#uses=3]
- %scevgep63 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 14 ; [#uses=1]
- store float %185, float* %scevgep63, align 4
- %scevgep64 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 13 ; [#uses=2]
- %186 = load float* %scevgep64, align 4 ; [#uses=1]
- %187 = fadd float %186, %185 ; [#uses=1]
- store float %187, float* %scevgep64, align 4
- br label %bb23
-
-bb22: ; preds = %bb17
- %scevgep68 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 13 ; [#uses=2]
- %188 = load float* %scevgep68, align 4 ; [#uses=1]
- %scevgep69 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 14 ; [#uses=1]
- %189 = load float* %scevgep69, align 4 ; [#uses=2]
- %190 = fadd float %188, %189 ; [#uses=1]
- store float %190, float* %scevgep68, align 4
- br label %bb23
-
-bb23: ; preds = %bb22, %bb21
- %191 = phi float [ %189, %bb22 ], [ %185, %bb21 ] ; [#uses=1]
- %scevgep66 = getelementptr %struct.btWheelInfo* %118, i32 %i.245, i32 14 ; [#uses=1]
- %192 = fmul float %191, 0x3FEFAE1480000000 ; [#uses=1]
- store float %192, float* %scevgep66, align 4
- %193 = load i32* %0, align 4 ; [#uses=1]
- %194 = icmp sgt i32 %193, %tmp ; [#uses=1]
- br i1 %194, label %bb17, label %return
-
-return: ; preds = %bb23, %bb16
- ret void
-}
-
-; [#uses=1]
-define void @_ZN16btRaycastVehicleD2Ev(%struct.btRaycastVehicle* nocapture %this) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV16btRaycastVehicle, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=3]
- %2 = load %struct.btWheelInfo** %1, align 4 ; [#uses=2]
- %3 = icmp eq %struct.btWheelInfo* %2, null ; [#uses=1]
- br i1 %3, label %bb3, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %entry
- %4 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 4 ; [#uses=1]
- %5 = load i8* %4, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %5, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %6 = bitcast %struct.btWheelInfo* %2 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %6)
- to label %bb2.i.i.i unwind label %lpad44
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btWheelInfo* null, %struct.btWheelInfo** %1, align 4
- br label %bb3
-
-bb3: ; preds = %bb2.i.i.i, %entry
- %7 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 4 ; [#uses=1]
- store i8 1, i8* %7, align 4
- store %struct.btWheelInfo* null, %struct.btWheelInfo** %1, align 4
- %8 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 2 ; [#uses=1]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %11 = load float** %10, align 4 ; [#uses=2]
- %12 = icmp eq float* %11, null ; [#uses=1]
- br i1 %12, label %bb10, label %bb.i.i.i73
-
-bb.i.i.i73: ; preds = %bb3
- %13 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %14 = load i8* %13, align 4 ; [#uses=1]
- %toBool.i.i.i72 = icmp eq i8 %14, 0 ; [#uses=1]
- br i1 %toBool.i.i.i72, label %bb2.i.i.i75, label %bb1.i.i.i74
-
-bb1.i.i.i74: ; preds = %bb.i.i.i73
- %15 = bitcast float* %11 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %15)
- to label %bb2.i.i.i75 unwind label %lpad40
-
-bb2.i.i.i75: ; preds = %bb1.i.i.i74, %bb.i.i.i73
- store float* null, float** %10, align 4
- br label %bb10
-
-bb10: ; preds = %bb2.i.i.i75, %bb3
- %16 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %16, align 4
- store float* null, float** %10, align 4
- %17 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %17, align 4
- %18 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %20 = load float** %19, align 4 ; [#uses=2]
- %21 = icmp eq float* %20, null ; [#uses=1]
- br i1 %21, label %bb19, label %bb.i.i.i78
-
-bb.i.i.i78: ; preds = %bb10
- %22 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i.i77 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i77, label %bb2.i.i.i80, label %bb1.i.i.i79
-
-bb1.i.i.i79: ; preds = %bb.i.i.i78
- %24 = bitcast float* %20 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i80 unwind label %lpad36
-
-bb2.i.i.i80: ; preds = %bb1.i.i.i79, %bb.i.i.i78
- store float* null, float** %19, align 4
- br label %bb19
-
-bb19: ; preds = %bb2.i.i.i80, %bb10
- %25 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store float* null, float** %19, align 4
- %26 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %27, align 4
- %28 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %29 = load %struct.btQuadWord** %28, align 4 ; [#uses=2]
- %30 = icmp eq %struct.btQuadWord* %29, null ; [#uses=1]
- br i1 %30, label %bb28, label %bb.i.i.i84
-
-bb.i.i.i84: ; preds = %bb19
- %31 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %32 = load i8* %31, align 4 ; [#uses=1]
- %toBool.i.i.i83 = icmp eq i8 %32, 0 ; [#uses=1]
- br i1 %toBool.i.i.i83, label %bb2.i.i.i86, label %bb1.i.i.i85
-
-bb1.i.i.i85: ; preds = %bb.i.i.i84
- %33 = bitcast %struct.btQuadWord* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %33)
- to label %bb2.i.i.i86 unwind label %lpad
-
-bb2.i.i.i86: ; preds = %bb1.i.i.i85, %bb.i.i.i84
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- br label %bb28
-
-invcont26: ; preds = %bb2.i.i.i102, %ppad
- %34 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %34, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %58, align 4
- %35 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %35, align 4
- %36 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %36, align 4
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.2)
- unreachable
-
-bb28: ; preds = %bb2.i.i.i86, %bb19
- %37 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %37, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %28, align 4
- %38 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %38, align 4
- %39 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %39, align 4
- %40 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %41 = load %struct.btQuadWord** %40, align 4 ; [#uses=2]
- %42 = icmp eq %struct.btQuadWord* %41, null ; [#uses=1]
- br i1 %42, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit92, label %bb.i.i.i89
-
-bb.i.i.i89: ; preds = %bb28
- %43 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %44 = load i8* %43, align 4 ; [#uses=1]
- %toBool.i.i.i88 = icmp eq i8 %44, 0 ; [#uses=1]
- br i1 %toBool.i.i.i88, label %bb2.i.i.i91, label %bb1.i.i.i90
-
-bb1.i.i.i90: ; preds = %bb.i.i.i89
- %45 = bitcast %struct.btQuadWord* %41 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %45)
- br label %bb2.i.i.i91
-
-bb2.i.i.i91: ; preds = %bb1.i.i.i90, %bb.i.i.i89
- store %struct.btQuadWord* null, %struct.btQuadWord** %40, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit92
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit92: ; preds = %bb2.i.i.i91, %bb28
- %46 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %46, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %40, align 4
- %47 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %47, align 4
- %48 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %48, align 4
- ret void
-
-lpad: ; preds = %bb1.i.i.i85
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select35 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad36: ; preds = %bb1.i.i.i79
- %eh_ptr37 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select39 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad64
-
-lpad40: ; preds = %bb1.i.i.i74
- %eh_ptr41 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select43 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr41, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad65
-
-lpad44: ; preds = %bb1.i.i.i
- %eh_ptr45 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select47 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr45, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %49 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=3]
- %50 = load float** %49, align 4 ; [#uses=2]
- %51 = icmp eq float* %50, null ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayIfED1Ev.exit98, label %bb.i.i.i94
-
-bb.i.i.i94: ; preds = %lpad44
- %52 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- %53 = load i8* %52, align 4 ; [#uses=1]
- %toBool.i.i.i93 = icmp eq i8 %53, 0 ; [#uses=1]
- br i1 %toBool.i.i.i93, label %bb2.i.i.i96, label %bb1.i.i.i95
-
-bb1.i.i.i95: ; preds = %bb.i.i.i94
- %54 = bitcast float* %50 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %54)
- to label %bb2.i.i.i96 unwind label %lpad48
-
-bb2.i.i.i96: ; preds = %bb1.i.i.i95, %bb.i.i.i94
- store float* null, float** %49, align 4
- br label %_ZN20btAlignedObjectArrayIfED1Ev.exit98
-
-_ZN20btAlignedObjectArrayIfED1Ev.exit98: ; preds = %bb2.i.i.i96, %lpad44
- %55 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %55, align 4
- store float* null, float** %49, align 4
- %56 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %56, align 4
- %57 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %57, align 4
- br label %ppad65
-
-lpad48: ; preds = %bb1.i.i.i95
- %eh_ptr49 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select51 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr49, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad52: ; preds = %bb1.i.i.i113
- %eh_ptr53 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select55 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr53, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad56: ; preds = %bb1.i.i.i107
- %eh_ptr57 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select59 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr57, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad60: ; preds = %bb1.i.i.i101
- %eh_ptr61 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select63 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr61, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110, %lpad
- %eh_exception.2 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.1, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110 ] ; [#uses=1]
- %58 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %59 = load %struct.btQuadWord** %58, align 4 ; [#uses=2]
- %60 = icmp eq %struct.btQuadWord* %59, null ; [#uses=1]
- br i1 %60, label %invcont26, label %bb.i.i.i100
-
-bb.i.i.i100: ; preds = %ppad
- %61 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %62 = load i8* %61, align 4 ; [#uses=1]
- %toBool.i.i.i99 = icmp eq i8 %62, 0 ; [#uses=1]
- br i1 %toBool.i.i.i99, label %bb2.i.i.i102, label %bb1.i.i.i101
-
-bb1.i.i.i101: ; preds = %bb.i.i.i100
- %63 = bitcast %struct.btQuadWord* %59 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %63)
- to label %bb2.i.i.i102 unwind label %lpad60
-
-bb2.i.i.i102: ; preds = %bb1.i.i.i101, %bb.i.i.i100
- store %struct.btQuadWord* null, %struct.btQuadWord** %58, align 4
- br label %invcont26
-
-ppad64: ; preds = %_ZN20btAlignedObjectArrayIfED1Ev.exit116, %lpad36
- %eh_exception.1 = phi i8* [ %eh_ptr37, %lpad36 ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayIfED1Ev.exit116 ] ; [#uses=1]
- %64 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=3]
- %65 = load %struct.btQuadWord** %64, align 4 ; [#uses=2]
- %66 = icmp eq %struct.btQuadWord* %65, null ; [#uses=1]
- br i1 %66, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110, label %bb.i.i.i106
-
-bb.i.i.i106: ; preds = %ppad64
- %67 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- %68 = load i8* %67, align 4 ; [#uses=1]
- %toBool.i.i.i105 = icmp eq i8 %68, 0 ; [#uses=1]
- br i1 %toBool.i.i.i105, label %bb2.i.i.i108, label %bb1.i.i.i107
-
-bb1.i.i.i107: ; preds = %bb.i.i.i106
- %69 = bitcast %struct.btQuadWord* %65 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %69)
- to label %bb2.i.i.i108 unwind label %lpad56
-
-bb2.i.i.i108: ; preds = %bb1.i.i.i107, %bb.i.i.i106
- store %struct.btQuadWord* null, %struct.btQuadWord** %64, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit110: ; preds = %bb2.i.i.i108, %ppad64
- %70 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %70, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %64, align 4
- %71 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %71, align 4
- %72 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %72, align 4
- br label %ppad
-
-ppad65: ; preds = %_ZN20btAlignedObjectArrayIfED1Ev.exit98, %lpad40
- %eh_exception.0 = phi i8* [ %eh_ptr41, %lpad40 ], [ %eh_ptr45, %_ZN20btAlignedObjectArrayIfED1Ev.exit98 ] ; [#uses=1]
- %73 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=3]
- %74 = load float** %73, align 4 ; [#uses=2]
- %75 = icmp eq float* %74, null ; [#uses=1]
- br i1 %75, label %_ZN20btAlignedObjectArrayIfED1Ev.exit116, label %bb.i.i.i112
-
-bb.i.i.i112: ; preds = %ppad65
- %76 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- %77 = load i8* %76, align 4 ; [#uses=1]
- %toBool.i.i.i111 = icmp eq i8 %77, 0 ; [#uses=1]
- br i1 %toBool.i.i.i111, label %bb2.i.i.i114, label %bb1.i.i.i113
-
-bb1.i.i.i113: ; preds = %bb.i.i.i112
- %78 = bitcast float* %74 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %78)
- to label %bb2.i.i.i114 unwind label %lpad52
-
-bb2.i.i.i114: ; preds = %bb1.i.i.i113, %bb.i.i.i112
- store float* null, float** %73, align 4
- br label %_ZN20btAlignedObjectArrayIfED1Ev.exit116
-
-_ZN20btAlignedObjectArrayIfED1Ev.exit116: ; preds = %bb2.i.i.i114, %ppad65
- %79 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %79, align 4
- store float* null, float** %73, align 4
- %80 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %80, align 4
- %81 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %81, align 4
- br label %ppad64
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicleC2ERKNS_15btVehicleTuningEP11btRigidBodyP18btVehicleRaycaster(%struct.btRaycastVehicle* nocapture %this, %"struct.btRaycastVehicle::btVehicleTuning"* nocapture %tuning, %struct.btRigidBody* %chassis, %struct.btActionInterface* %raycaster) align 2 {
-invcont4:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV16btRaycastVehicle, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %2, align 4
- %3 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %6, align 4
- %7 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- %10 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store float* null, float** %10, align 4
- %11 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- %14 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- store float* null, float** %14, align 4
- %15 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 9 ; [#uses=1]
- store %struct.btActionInterface* %raycaster, %struct.btActionInterface** %17, align 4
- %18 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 10 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- %20 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- store %struct.btWheelInfo* null, %struct.btWheelInfo** %20, align 4
- %21 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 2 ; [#uses=1]
- store i32 0, i32* %22, align 4
- %23 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- store %struct.btRigidBody* %chassis, %struct.btRigidBody** %23, align 4
- %24 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 14 ; [#uses=1]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 15 ; [#uses=1]
- store i32 2, i32* %25, align 4
- %26 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 16 ; [#uses=1]
- store i32 1, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16btRaycastVehicleC1ERKNS_15btVehicleTuningEP11btRigidBodyP18btVehicleRaycaster(%struct.btRaycastVehicle* %this, %"struct.btRaycastVehicle::btVehicleTuning"* nocapture %tuning, %struct.btRigidBody* %chassis, %struct.btActionInterface* %raycaster) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV16btRaycastVehicle, i32 0, i32 2), i32 (...)*** %0, align 4
- %1 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %1, align 4
- %2 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %2, align 4
- %3 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %5, align 4
- %6 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 3 ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %6, align 4
- %7 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 1 ; [#uses=1]
- store i32 0, i32* %7, align 4
- %8 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- %10 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 3 ; [#uses=1]
- store float* null, float** %10, align 4
- %11 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 1 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 3, i32 2 ; [#uses=1]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %13, align 4
- %14 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 3 ; [#uses=1]
- store float* null, float** %14, align 4
- %15 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 1 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 9 ; [#uses=1]
- store %struct.btActionInterface* %raycaster, %struct.btActionInterface** %17, align 4
- %18 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 10 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 4 ; [#uses=1]
- store i8 1, i8* %19, align 4
- %20 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 3 ; [#uses=1]
- store %struct.btWheelInfo* null, %struct.btWheelInfo** %20, align 4
- %21 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 1 ; [#uses=1]
- store i32 0, i32* %21, align 4
- %22 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 17, i32 2 ; [#uses=1]
- store i32 0, i32* %22, align 4
- %23 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- store %struct.btRigidBody* %chassis, %struct.btRigidBody** %23, align 4
- %24 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 14 ; [#uses=1]
- store i32 0, i32* %24, align 4
- %25 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 15 ; [#uses=1]
- store i32 2, i32* %25, align 4
- %26 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 16 ; [#uses=1]
- store i32 1, i32* %26, align 4
- %27 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 12 ; [#uses=1]
- store float 0.000000e+00, float* %27, align 4
- %28 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 11 ; [#uses=1]
- store float 0.000000e+00, float* %28, align 4
- ret void
-}
-
-; [#uses=1]
-define internal void @__tcf_088(i8* nocapture %unnamed_arg) {
-entry:
- store i32 (...)** getelementptr inbounds ([9 x i32 (...)*]* @_ZTV11btRigidBody, i32 0, i32 2), i32 (...)*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 0, i32 0), align 32
- %0 = load %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4 ; [#uses=2]
- %1 = icmp eq %struct.btTypedConstraint** %0, null ; [#uses=1]
- br i1 %1, label %_ZN11btRigidBodyD1Ev.exit, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %entry
- %2 = load i8* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 4), align 4 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %2, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %3 = bitcast %struct.btTypedConstraint** %0 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %3)
- to label %bb2.i.i.i.i unwind label %lpad.i
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4
- br label %_ZN11btRigidBodyD1Ev.exit
-
-invcont1.i: ; preds = %lpad.i
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr.i)
- unreachable
-
-lpad.i: ; preds = %bb1.i.i.i.i
- %eh_ptr.i = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select8.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- invoke void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 0))
- to label %invcont1.i unwind label %lpad9.i
-
-lpad9.i: ; preds = %lpad.i
- %eh_ptr10.i = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select12.i = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr10.i, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-_ZN11btRigidBodyD1Ev.exit: ; preds = %bb2.i.i.i.i, %entry
- store i8 1, i8* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 4), align 4
- store %struct.btTypedConstraint** null, %struct.btTypedConstraint*** getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 3), align 4
- store i32 0, i32* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 1), align 4
- store i32 0, i32* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 21, i32 2), align 4
- tail call void @_ZN17btCollisionObjectD2Ev(%struct.btCollisionObject* getelementptr inbounds (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed, i32 0, i32 0))
- ret void
-}
-
-; [#uses=1]
-define float @_ZN16btRaycastVehicle7rayCastER11btWheelInfo(%struct.btRaycastVehicle* nocapture %this, %struct.btWheelInfo* %wheel) align 2 {
-entry:
- %rayResults = alloca %"struct.btVehicleRaycaster::btVehicleRaycasterResult", align 8 ; [#uses=10]
- call void @_ZN16btRaycastVehicle23updateWheelTransformsWSER11btWheelInfob(%struct.btRaycastVehicle* %this, %struct.btWheelInfo* %wheel, i8 zeroext 0)
- %0 = call float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* %wheel) ; [#uses=1]
- %1 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 7 ; [#uses=2]
- %2 = load float* %1, align 4 ; [#uses=1]
- %3 = fadd float %0, %2 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=3]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %5, %3 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=3]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %8, %3 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=3]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fmul float %11, %3 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3 ; [#uses=1]
- %14 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = fadd float %15, %6 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %18, %9 ; [#uses=1]
- %20 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = fadd float %21, %12 ; [#uses=1]
- %23 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=2]
- store float %22, float* %23, align 4
- %24 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=2]
- store float %19, float* %24, align 4
- %25 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=2]
- store float %16, float* %25, align 4
- %26 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 1, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %26, align 4
- %27 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 1 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 2 ; [#uses=2]
- store float -1.000000e+00, float* %28, align 8
- %29 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 9 ; [#uses=1]
- %30 = load %struct.btActionInterface** %29, align 4 ; [#uses=2]
- %31 = getelementptr inbounds %struct.btActionInterface* %30, i32 0, i32 0 ; [#uses=1]
- %32 = load i32 (...)*** %31, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32 (...)** %32, i32 2 ; [#uses=1]
- %34 = load i32 (...)** %33, align 4 ; [#uses=1]
- %35 = bitcast i32 (...)* %34 to i8* (%struct.btActionInterface*, %struct.btQuadWord*, %struct.btQuadWord*, %"struct.btVehicleRaycaster::btVehicleRaycasterResult"*)* ; [#uses=1]
- %36 = call i8* %35(%struct.btActionInterface* %30, %struct.btQuadWord* %13, %struct.btQuadWord* %27, %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults) ; [#uses=1]
- %37 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 7 ; [#uses=2]
- store i8* null, i8** %37, align 4
- %38 = icmp eq i8* %36, null ; [#uses=1]
- br i1 %38, label %bb16, label %bb
-
-bb: ; preds = %entry
- %39 = load float* %28, align 8 ; [#uses=1]
- %40 = fmul float %39, %3 ; [#uses=3]
- %41 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=2]
- %42 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %43 = load float* %42, align 8 ; [#uses=1]
- store float %43, float* %41, align 4
- %44 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=2]
- %45 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %46 = load float* %45, align 4 ; [#uses=1]
- store float %46, float* %44, align 4
- %47 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=2]
- %48 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %49 = load float* %48, align 8 ; [#uses=1]
- store float %49, float* %47, align 4
- %50 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %51 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 1, i32 0, i32 3 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=1]
- store float %52, float* %50, align 4
- %53 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 6 ; [#uses=1]
- store i8 1, i8* %53, align 4
- %54 = call %struct.btRigidBody* @_ZN17btActionInterface12getFixedBodyEv() ; [#uses=0]
- store i8* bitcast (%struct.btRigidBody* @_ZZN17btActionInterface12getFixedBodyEvE7s_fixed to i8*), i8** %37, align 4
- %55 = load float* %1, align 4 ; [#uses=1]
- %56 = fsub float %40, %55 ; [#uses=1]
- %57 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 2 ; [#uses=4]
- store float %56, float* %57, align 4
- %58 = call float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* %wheel) ; [#uses=1]
- %59 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 6 ; [#uses=2]
- %60 = load float* %59, align 4 ; [#uses=1]
- %61 = fmul float %60, 0xBF847AE140000000 ; [#uses=1]
- %62 = fadd float %58, %61 ; [#uses=3]
- %63 = call float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* %wheel) ; [#uses=1]
- %64 = load float* %59, align 4 ; [#uses=1]
- %65 = fmul float %64, 0x3F847AE140000000 ; [#uses=1]
- %66 = fadd float %63, %65 ; [#uses=2]
- %67 = load float* %57, align 4 ; [#uses=2]
- %68 = fcmp olt float %67, %62 ; [#uses=1]
- br i1 %68, label %bb8, label %bb9
-
-bb8: ; preds = %bb
- store float %62, float* %57, align 4
- br label %bb9
-
-bb9: ; preds = %bb8, %bb
- %69 = phi float [ %62, %bb8 ], [ %67, %bb ] ; [#uses=1]
- %70 = fcmp ogt float %69, %66 ; [#uses=1]
- br i1 %70, label %bb10, label %bb11
-
-bb10: ; preds = %bb9
- store float %66, float* %57, align 4
- br label %bb11
-
-bb11: ; preds = %bb10, %bb9
- %71 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %72 = load float* %71, align 8 ; [#uses=2]
- store float %72, float* %23, align 4
- %73 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %74 = load float* %73, align 4 ; [#uses=2]
- store float %74, float* %24, align 4
- %75 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %76 = load float* %75, align 8 ; [#uses=2]
- store float %76, float* %25, align 4
- %77 = getelementptr inbounds %"struct.btVehicleRaycaster::btVehicleRaycasterResult"* %rayResults, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- store float %78, float* %26, align 4
- %79 = load float* %41, align 4 ; [#uses=2]
- %80 = load float* %10, align 4 ; [#uses=1]
- %81 = fmul float %79, %80 ; [#uses=1]
- %82 = load float* %44, align 4 ; [#uses=2]
- %83 = load float* %7, align 4 ; [#uses=1]
- %84 = fmul float %82, %83 ; [#uses=1]
- %85 = fadd float %81, %84 ; [#uses=1]
- %86 = load float* %47, align 4 ; [#uses=2]
- %87 = load float* %4, align 4 ; [#uses=1]
- %88 = fmul float %86, %87 ; [#uses=1]
- %89 = fadd float %85, %88 ; [#uses=2]
- %90 = getelementptr inbounds %struct.btRaycastVehicle* %this, i32 0, i32 13 ; [#uses=1]
- %91 = load %struct.btRigidBody** %90, align 4 ; [#uses=9]
- %92 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %93 = load float* %92, align 4 ; [#uses=1]
- %94 = fsub float %76, %93 ; [#uses=2]
- %95 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %96 = load float* %95, align 4 ; [#uses=1]
- %97 = fsub float %74, %96 ; [#uses=2]
- %98 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %99 = load float* %98, align 4 ; [#uses=1]
- %100 = fsub float %72, %99 ; [#uses=2]
- %101 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %102 = load float* %101, align 4 ; [#uses=2]
- %103 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=2]
- %105 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %106 = load float* %105, align 4 ; [#uses=2]
- %107 = fcmp ult float %89, 0xBFB99999A0000000 ; [#uses=1]
- br i1 %107, label %bb14, label %bb13
-
-bb13: ; preds = %bb11
- %108 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 22 ; [#uses=1]
- store float 0.000000e+00, float* %108, align 4
- %109 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 21 ; [#uses=1]
- store float 1.000000e+01, float* %109, align 4
- ret float %40
-
-bb14: ; preds = %bb11
- %110 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %111 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %112 = fmul float %106, %97 ; [#uses=1]
- %113 = fmul float %104, %94 ; [#uses=1]
- %114 = fmul float %102, %94 ; [#uses=1]
- %115 = fmul float %106, %100 ; [#uses=1]
- %116 = load float* %110, align 4 ; [#uses=1]
- %117 = load float* %111, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btRigidBody* %91, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %119 = fsub float %113, %112 ; [#uses=1]
- %120 = fsub float %115, %114 ; [#uses=1]
- %121 = fmul float %104, %100 ; [#uses=1]
- %122 = fmul float %102, %97 ; [#uses=1]
- %123 = fadd float %116, %119 ; [#uses=1]
- %124 = fadd float %117, %120 ; [#uses=1]
- %125 = load float* %118, align 4 ; [#uses=1]
- %126 = fsub float %122, %121 ; [#uses=1]
- %127 = fmul float %82, %124 ; [#uses=1]
- %128 = fmul float %79, %123 ; [#uses=1]
- %129 = fadd float %125, %126 ; [#uses=1]
- %130 = fmul float %86, %129 ; [#uses=1]
- %131 = fadd float %128, %127 ; [#uses=1]
- %132 = fadd float %131, %130 ; [#uses=1]
- %133 = fdiv float -1.000000e+00, %89 ; [#uses=2]
- %134 = fmul float %132, %133 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 22 ; [#uses=1]
- store float %134, float* %135, align 4
- %136 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 21 ; [#uses=1]
- store float %133, float* %136, align 4
- ret float %40
-
-bb16: ; preds = %entry
- %137 = call float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* %wheel) ; [#uses=1]
- %138 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %137, float* %138, align 4
- %139 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 22 ; [#uses=1]
- store float 0.000000e+00, float* %139, align 4
- %140 = load float* %4, align 4 ; [#uses=1]
- %141 = fsub float -0.000000e+00, %140 ; [#uses=1]
- %142 = load float* %7, align 4 ; [#uses=1]
- %143 = fsub float -0.000000e+00, %142 ; [#uses=1]
- %144 = load float* %10, align 4 ; [#uses=1]
- %145 = fsub float -0.000000e+00, %144 ; [#uses=1]
- %146 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %145, float* %146, align 4
- %147 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %143, float* %147, align 4
- %148 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %141, float* %148, align 4
- %149 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %149, align 4
- %150 = getelementptr inbounds %struct.btWheelInfo* %wheel, i32 0, i32 21 ; [#uses=1]
- store float 1.000000e+00, float* %150, align 4
- ret float -1.000000e+00
-}
-
-; [#uses=7]
-define float @_ZNK11btWheelInfo23getSuspensionRestLengthEv(%struct.btWheelInfo* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 5 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- ret float %1
-}
-
-; [#uses=0]
-define void @_ZN11btWheelInfo11updateWheelERK11btRigidBodyRNS_11RaycastInfoE(%struct.btWheelInfo* nocapture %this, %struct.btRigidBody* nocapture %chassis, %"struct.btWheelInfo::RaycastInfo"* nocapture %raycastInfo) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 6 ; [#uses=1]
- %1 = load i8* %0, align 4 ; [#uses=1]
- %toBool = icmp eq i8 %1, 0 ; [#uses=1]
- br i1 %toBool, label %bb4, label %bb
-
-bb: ; preds = %entry
- %2 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = fmul float %3, %5 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = fmul float %8, %10 ; [#uses=1]
- %12 = fadd float %6, %11 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fmul float %14, %16 ; [#uses=1]
- %18 = fadd float %12, %17 ; [#uses=2]
- %19 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 1, i32 0, i32 2 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=1]
- %21 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 0, i32 1, i32 1, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %20, %22 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 1, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 0, i32 1, i32 1, i32 0, i32 1 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=1]
- %28 = fsub float %25, %27 ; [#uses=2]
- %29 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 1, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- %31 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 0, i32 1, i32 1, i32 0, i32 0 ; [#uses=1]
- %32 = load float* %31, align 4 ; [#uses=1]
- %33 = fsub float %30, %32 ; [#uses=2]
- %34 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 3, i32 0, i32 0 ; [#uses=1]
- %35 = load float* %34, align 4 ; [#uses=2]
- %36 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 3, i32 0, i32 1 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=2]
- %38 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 3, i32 0, i32 2 ; [#uses=1]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = fcmp ult float %18, 0xBFB99999A0000000 ; [#uses=1]
- br i1 %40, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- %41 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 22 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 21 ; [#uses=1]
- store float 1.000000e+01, float* %42, align 4
- ret void
-
-bb2: ; preds = %bb
- %43 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 2, i32 0, i32 0 ; [#uses=1]
- %44 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 2, i32 0, i32 1 ; [#uses=1]
- %45 = fmul float %39, %28 ; [#uses=1]
- %46 = fmul float %37, %23 ; [#uses=1]
- %47 = fmul float %35, %23 ; [#uses=1]
- %48 = fmul float %39, %33 ; [#uses=1]
- %49 = load float* %43, align 4 ; [#uses=1]
- %50 = load float* %44, align 4 ; [#uses=1]
- %51 = getelementptr inbounds %struct.btRigidBody* %chassis, i32 0, i32 2, i32 0, i32 2 ; [#uses=1]
- %52 = fsub float %46, %45 ; [#uses=1]
- %53 = fsub float %48, %47 ; [#uses=1]
- %54 = fmul float %37, %33 ; [#uses=1]
- %55 = fmul float %35, %28 ; [#uses=1]
- %56 = fadd float %49, %52 ; [#uses=1]
- %57 = fadd float %50, %53 ; [#uses=1]
- %58 = load float* %51, align 4 ; [#uses=1]
- %59 = fsub float %55, %54 ; [#uses=1]
- %60 = fmul float %8, %57 ; [#uses=1]
- %61 = fmul float %3, %56 ; [#uses=1]
- %62 = fadd float %58, %59 ; [#uses=1]
- %63 = fmul float %14, %62 ; [#uses=1]
- %64 = fadd float %61, %60 ; [#uses=1]
- %65 = fadd float %64, %63 ; [#uses=1]
- %66 = fdiv float -1.000000e+00, %18 ; [#uses=2]
- %67 = fmul float %65, %66 ; [#uses=1]
- %68 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 22 ; [#uses=1]
- store float %67, float* %68, align 4
- %69 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 21 ; [#uses=1]
- store float %66, float* %69, align 4
- ret void
-
-bb4: ; preds = %entry
- %70 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 5 ; [#uses=1]
- %71 = load float* %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %71, float* %72, align 4
- %73 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 22 ; [#uses=1]
- store float 0.000000e+00, float* %73, align 4
- %74 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 4, i32 0, i32 2 ; [#uses=1]
- %75 = load float* %74, align 4 ; [#uses=1]
- %76 = fsub float -0.000000e+00, %75 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 4, i32 0, i32 1 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fsub float -0.000000e+00, %78 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 4, i32 0, i32 0 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = fsub float -0.000000e+00, %81 ; [#uses=1]
- %83 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %82, float* %83, align 4
- %84 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %79, float* %84, align 4
- %85 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %76, float* %85, align 4
- %86 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %86, align 4
- %87 = getelementptr inbounds %struct.btWheelInfo* %this, i32 0, i32 21 ; [#uses=1]
- store float 1.000000e+00, float* %87, align 4
- ret void
-}
-
-; [#uses=2]
-define internal i8* @_ZL21btAlignedAllocDefaultji(i32 %size, i32 %alignment) inlinehint {
-entry:
- %0 = load i8* (i32)** @_ZL10sAllocFunc, align 4 ; [#uses=1]
- %1 = add i32 %size, 3 ; [#uses=1]
- %2 = add i32 %1, %alignment ; [#uses=1]
- %3 = tail call i8* %0(i32 %2) ; [#uses=6]
- %4 = icmp eq i8* %3, null ; [#uses=1]
- br i1 %4, label %bb2, label %bb
-
-bb: ; preds = %entry
- %5 = getelementptr inbounds i8* %3, i32 4 ; [#uses=1]
- %6 = ptrtoint i8* %5 to i32 ; [#uses=1]
- %7 = sub i32 %alignment, %6 ; [#uses=1]
- %8 = add nsw i32 %alignment, -1 ; [#uses=1]
- %9 = and i32 %7, %8 ; [#uses=2]
- %.sum = add i32 %9, 4 ; [#uses=1]
- %10 = getelementptr inbounds i8* %3, i32 %.sum ; [#uses=1]
- %11 = getelementptr inbounds i8* %3, i32 %9 ; [#uses=1]
- %12 = bitcast i8* %11 to i8** ; [#uses=1]
- store i8* %3, i8** %12, align 4
- ret i8* %10
-
-bb2: ; preds = %entry
- ret i8* %3
-}
-
-; [#uses=2]
-define internal noalias i8* @_ZL14btAllocDefaultj(i32 %size) nounwind {
-entry:
- %0 = tail call noalias i8* @malloc(i32 %size) nounwind ; [#uses=1]
- ret i8* %0
-}
-
-; [#uses=2]
-define internal void @_ZL20btAlignedFreeDefaultPv(i8* %ptr) inlinehint {
-entry:
- %0 = icmp eq i8* %ptr, null ; [#uses=1]
- br i1 %0, label %return, label %bb
-
-bb: ; preds = %entry
- %1 = getelementptr inbounds i8* %ptr, i32 -4 ; [#uses=1]
- %2 = bitcast i8* %1 to i8** ; [#uses=1]
- %3 = load i8** %2, align 4 ; [#uses=1]
- %4 = load void (i8*)** @_ZL9sFreeFunc, align 4 ; [#uses=1]
- tail call void %4(i8* %3)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=2]
-define internal void @_ZL13btFreeDefaultPv(i8* nocapture %ptr) nounwind {
-entry:
- tail call void @free(i8* %ptr) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_Z30btAlignedAllocSetCustomAlignedPFPvjiEPFvS_E(i8* (i32, i32)* %allocFunc, void (i8*)* %freeFunc) nounwind {
-entry:
- %0 = icmp eq i8* (i32, i32)* %allocFunc, null ; [#uses=1]
- %iftmp.19.0 = select i1 %0, i8* (i32, i32)* @_ZL21btAlignedAllocDefaultji, i8* (i32, i32)* %allocFunc ; [#uses=1]
- store i8* (i32, i32)* %iftmp.19.0, i8* (i32, i32)** @_ZL17sAlignedAllocFunc, align 4
- %1 = icmp eq void (i8*)* %freeFunc, null ; [#uses=1]
- %iftmp.20.0 = select i1 %1, void (i8*)* @_ZL20btAlignedFreeDefaultPv, void (i8*)* %freeFunc ; [#uses=1]
- store void (i8*)* %iftmp.20.0, void (i8*)** @_ZL16sAlignedFreeFunc, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z23btAlignedAllocSetCustomPFPvjEPFvS_E(i8* (i32)* %allocFunc, void (i8*)* %freeFunc) nounwind {
-entry:
- %0 = icmp eq i8* (i32)* %allocFunc, null ; [#uses=1]
- %iftmp.21.0 = select i1 %0, i8* (i32)* @_ZL14btAllocDefaultj, i8* (i32)* %allocFunc ; [#uses=1]
- store i8* (i32)* %iftmp.21.0, i8* (i32)** @_ZL10sAllocFunc, align 4
- %1 = icmp eq void (i8*)* %freeFunc, null ; [#uses=1]
- %iftmp.22.0 = select i1 %1, void (i8*)* @_ZL13btFreeDefaultPv, void (i8*)* %freeFunc ; [#uses=1]
- store void (i8*)* %iftmp.22.0, void (i8*)** @_ZL9sFreeFunc, align 4
- ret void
-}
-
-; [#uses=186]
-define i8* @_Z22btAlignedAllocInternalji(i32 %size, i32 %alignment) {
-entry:
- %0 = load i32* @gNumAlignedAllocs, align 4 ; [#uses=1]
- %1 = add nsw i32 %0, 1 ; [#uses=1]
- store i32 %1, i32* @gNumAlignedAllocs, align 4
- %2 = load i8* (i32, i32)** @_ZL17sAlignedAllocFunc, align 4 ; [#uses=1]
- %3 = tail call i8* %2(i32 %size, i32 %alignment) ; [#uses=1]
- ret i8* %3
-}
-
-; [#uses=651]
-define void @_Z21btAlignedFreeInternalPv(i8* %ptr) {
-entry:
- %0 = icmp eq i8* %ptr, null ; [#uses=1]
- br i1 %0, label %return, label %bb
-
-bb: ; preds = %entry
- %1 = load i32* @gNumAlignedFree, align 4 ; [#uses=1]
- %2 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* @gNumAlignedFree, align 4
- %3 = load void (i8*)** @_ZL16sAlignedFreeFunc, align 4 ; [#uses=1]
- tail call void %3(i8* %ptr)
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=0]
-define void @_Z22ThreePlaneIntersectionRK7btPlaneS1_S1_(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btPlane* nocapture %p0, %struct.btPlane* nocapture %p1, %struct.btPlane* nocapture %p2) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btPlane* %p0, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=5]
- %2 = getelementptr inbounds %struct.btPlane* %p0, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=5]
- %4 = getelementptr inbounds %struct.btPlane* %p0, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=5]
- %6 = getelementptr inbounds %struct.btPlane* %p1, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=4]
- %8 = getelementptr inbounds %struct.btPlane* %p1, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=4]
- %10 = getelementptr inbounds %struct.btPlane* %p1, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=4]
- %12 = getelementptr inbounds %struct.btPlane* %p2, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=4]
- %14 = getelementptr inbounds %struct.btPlane* %p2, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=4]
- %16 = getelementptr inbounds %struct.btPlane* %p2, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=4]
- %18 = fmul float %7, %15 ; [#uses=1]
- %19 = fmul float %9, %13 ; [#uses=1]
- %20 = fsub float %18, %19 ; [#uses=2]
- %21 = fmul float %11, %13 ; [#uses=1]
- %22 = fmul float %7, %17 ; [#uses=1]
- %23 = fsub float %21, %22 ; [#uses=2]
- %24 = fmul float %9, %17 ; [#uses=1]
- %25 = fmul float %11, %15 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=2]
- %27 = fmul float %13, %3 ; [#uses=1]
- %28 = fmul float %15, %1 ; [#uses=1]
- %29 = fsub float %27, %28 ; [#uses=1]
- %30 = fmul float %17, %1 ; [#uses=1]
- %31 = fmul float %13, %5 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=1]
- %33 = fmul float %15, %5 ; [#uses=1]
- %34 = fmul float %17, %3 ; [#uses=1]
- %35 = fsub float %33, %34 ; [#uses=1]
- %36 = fmul float %1, %9 ; [#uses=1]
- %37 = fmul float %3, %7 ; [#uses=1]
- %38 = fsub float %36, %37 ; [#uses=1]
- %39 = fmul float %5, %7 ; [#uses=1]
- %40 = fmul float %1, %11 ; [#uses=1]
- %41 = fsub float %39, %40 ; [#uses=1]
- %42 = fmul float %3, %11 ; [#uses=1]
- %43 = fmul float %5, %9 ; [#uses=1]
- %44 = fsub float %42, %43 ; [#uses=1]
- %45 = fmul float %1, %26 ; [#uses=1]
- %46 = fmul float %3, %23 ; [#uses=1]
- %47 = fadd float %45, %46 ; [#uses=1]
- %48 = fmul float %5, %20 ; [#uses=1]
- %49 = fadd float %47, %48 ; [#uses=1]
- %50 = fdiv float -1.000000e+00, %49 ; [#uses=3]
- %51 = getelementptr inbounds %struct.btPlane* %p0, i32 0, i32 1 ; [#uses=1]
- %52 = load float* %51, align 4 ; [#uses=3]
- %53 = fmul float %26, %52 ; [#uses=1]
- %54 = fmul float %23, %52 ; [#uses=1]
- %55 = fmul float %20, %52 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btPlane* %p1, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=3]
- %58 = fmul float %35, %57 ; [#uses=1]
- %59 = fmul float %32, %57 ; [#uses=1]
- %60 = fmul float %29, %57 ; [#uses=1]
- %61 = getelementptr inbounds %struct.btPlane* %p2, i32 0, i32 1 ; [#uses=1]
- %62 = load float* %61, align 4 ; [#uses=3]
- %63 = fmul float %44, %62 ; [#uses=1]
- %64 = fmul float %41, %62 ; [#uses=1]
- %65 = fmul float %38, %62 ; [#uses=1]
- %66 = fadd float %53, %58 ; [#uses=1]
- %67 = fadd float %54, %59 ; [#uses=1]
- %68 = fadd float %55, %60 ; [#uses=1]
- %69 = fadd float %66, %63 ; [#uses=1]
- %70 = fadd float %67, %64 ; [#uses=1]
- %71 = fadd float %68, %65 ; [#uses=1]
- %72 = fmul float %69, %50 ; [#uses=1]
- %73 = fmul float %70, %50 ; [#uses=1]
- %74 = fmul float %71, %50 ; [#uses=1]
- %75 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %72, float* %75, align 4
- %76 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %73, float* %76, align 4
- %77 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %74, float* %77, align 4
- %78 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %78, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z12PlaneProjectRK7btPlaneRK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btPlane* nocapture %plane, %struct.btQuadWord* nocapture %point) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %16, %18 ; [#uses=3]
- %20 = fmul float %14, %19 ; [#uses=1]
- %21 = fmul float %8, %19 ; [#uses=1]
- %22 = fmul float %3, %19 ; [#uses=1]
- %23 = fsub float %12, %20 ; [#uses=1]
- %24 = fsub float %6, %21 ; [#uses=1]
- %25 = fsub float %1, %22 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %25, float* %26, align 4
- %27 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %24, float* %27, align 4
- %28 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %23, float* %28, align 4
- %29 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %29, align 4
- ret void
-}
-
-; [#uses=0]
-define i32 @_Z9PlaneTestRK7btPlaneRK9btVector3(%struct.btPlane* nocapture %p, %struct.btQuadWord* nocapture %v) nounwind readonly {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btPlane* %p, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fmul float %1, %3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btPlane* %p, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = fmul float %6, %8 ; [#uses=1]
- %10 = fadd float %4, %9 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btPlane* %p, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=1]
- %15 = fmul float %12, %14 ; [#uses=1]
- %16 = fadd float %10, %15 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btPlane* %p, i32 0, i32 1 ; [#uses=1]
- %18 = load float* %17, align 4 ; [#uses=1]
- %19 = fadd float %16, %18 ; [#uses=2]
- %20 = load float* @planetestepsilon, align 4 ; [#uses=2]
- %21 = fcmp ule float %19, %20 ; [#uses=1]
- br i1 %21, label %bb, label %bb5
-
-bb: ; preds = %entry
- %22 = fsub float -0.000000e+00, %20 ; [#uses=1]
- %23 = fcmp olt float %19, %22 ; [#uses=1]
- %iftmp.49.0 = zext i1 %23 to i32 ; [#uses=1]
- ret i32 %iftmp.49.0
-
-bb5: ; preds = %entry
- ret i32 2
-}
-
-; [#uses=0]
-define i32 @_ZeqRK4int3S1_(%struct.int3* nocapture %a, %struct.int3* nocapture %b) nounwind readonly {
-entry:
- %b7 = bitcast %struct.int3* %b to i8* ; [#uses=1]
- %a9 = bitcast %struct.int3* %a to i8* ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %bb3
- %uglygep10 = getelementptr i8* %a9, i32 %tmp ; [#uses=1]
- %uglygep = getelementptr i8* %b7, i32 %tmp ; [#uses=1]
- %uglygep1011 = bitcast i8* %uglygep10 to i32* ; [#uses=1]
- %uglygep8 = bitcast i8* %uglygep to i32* ; [#uses=1]
- %0 = load i32* %uglygep1011, align 4 ; [#uses=1]
- %1 = load i32* %uglygep8, align 4 ; [#uses=1]
- %2 = icmp eq i32 %0, %1 ; [#uses=1]
- br i1 %2, label %bb2, label %bb5
-
-bb2: ; preds = %bb
- %3 = add nsw i32 %4, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- %4 = phi i32 [ 0, %entry ], [ %3, %bb2 ] ; [#uses=3]
- %tmp = shl i32 %4, 2 ; [#uses=2]
- %5 = icmp slt i32 %4, 3 ; [#uses=1]
- br i1 %5, label %bb, label %bb5
-
-bb5: ; preds = %bb3, %bb
- %.0 = phi i32 [ 0, %bb ], [ 1, %bb3 ] ; [#uses=1]
- ret i32 %.0
-}
-
-; [#uses=0]
-define i32 @_Z7hasedgeRK4int3ii(%struct.int3* nocapture %t, i32 %a, i32 %b) nounwind readonly {
-entry:
- %t11 = bitcast %struct.int3* %t to i8* ; [#uses=1]
- %0 = getelementptr inbounds %struct.int3* %t, i32 0, i32 0 ; [#uses=1]
- br label %bb7
-
-bb: ; preds = %bb7
- %tmp12 = shl i32 %7, 2 ; [#uses=1]
- %uglygep = getelementptr i8* %t11, i32 %tmp12 ; [#uses=1]
- %uglygep13 = bitcast i8* %uglygep to i32* ; [#uses=1]
- %1 = load i32* %uglygep13, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, %a ; [#uses=1]
- br i1 %2, label %bb1, label %bb7
-
-bb1: ; preds = %bb
- %3 = srem i32 %tmp, 3 ; [#uses=1]
- %4 = getelementptr inbounds i32* %0, i32 %3 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp eq i32 %5, %b ; [#uses=1]
- br i1 %6, label %bb9, label %bb7
-
-bb7: ; preds = %bb1, %bb, %entry
- %7 = phi i32 [ 0, %entry ], [ %tmp, %bb1 ], [ %tmp, %bb ] ; [#uses=3]
- %tmp = add i32 %7, 1 ; [#uses=3]
- %8 = icmp slt i32 %7, 3 ; [#uses=1]
- br i1 %8, label %bb, label %bb9
-
-bb9: ; preds = %bb7, %bb1
- %.0 = phi i32 [ 1, %bb1 ], [ 0, %bb7 ] ; [#uses=1]
- ret i32 %.0
-}
-
-; [#uses=0]
-define i32 @_Z7hasvertRK4int3i(%struct.int3* nocapture %t, i32 %v) nounwind readonly {
-entry:
- %0 = getelementptr inbounds %struct.int3* %t, i32 0, i32 0 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, %v ; [#uses=1]
- br i1 %2, label %bb4, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds i32* %0, i32 1 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = icmp eq i32 %4, %v ; [#uses=1]
- br i1 %5, label %bb4, label %bb1
-
-bb1: ; preds = %bb
- %6 = getelementptr inbounds i32* %0, i32 2 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = icmp eq i32 %7, %v ; [#uses=1]
- %retval = zext i1 %8 to i32 ; [#uses=1]
- ret i32 %retval
-
-bb4: ; preds = %bb, %entry
- ret i32 1
-}
-
-; [#uses=0]
-define i32 @_Z9shareedgeRK4int3S1_(%struct.int3* nocapture %a, %struct.int3* nocapture %b) nounwind readonly {
-entry:
- %t11.i = bitcast %struct.int3* %a to i8* ; [#uses=1]
- %b10 = bitcast %struct.int3* %b to i8* ; [#uses=1]
- %0 = getelementptr inbounds %struct.int3* %b, i32 0, i32 0 ; [#uses=1]
- %1 = getelementptr inbounds %struct.int3* %a, i32 0, i32 0 ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %bb3
- %tmp11 = shl i32 %14, 2 ; [#uses=1]
- %uglygep12 = getelementptr i8* %b10, i32 %tmp11 ; [#uses=1]
- %uglygep1213 = bitcast i8* %uglygep12 to i32* ; [#uses=1]
- %tmp9 = add i32 %14, 1 ; [#uses=2]
- %2 = srem i32 %tmp9, 3 ; [#uses=1]
- %3 = load i32* %uglygep1213, align 4 ; [#uses=1]
- %4 = getelementptr inbounds i32* %0, i32 %2 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- br label %bb7.i
-
-bb.i: ; preds = %bb7.i
- %tmp = shl i32 %12, 2 ; [#uses=1]
- %uglygep = getelementptr i8* %t11.i, i32 %tmp ; [#uses=1]
- %uglygep13.i = bitcast i8* %uglygep to i32* ; [#uses=1]
- %6 = load i32* %uglygep13.i, align 4 ; [#uses=1]
- %7 = icmp eq i32 %6, %5 ; [#uses=1]
- br i1 %7, label %bb1.i, label %bb7.i
-
-bb1.i: ; preds = %bb.i
- %8 = srem i32 %tmp.i, 3 ; [#uses=1]
- %9 = getelementptr inbounds i32* %1, i32 %8 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = icmp eq i32 %10, %3 ; [#uses=1]
- br i1 %11, label %bb5, label %bb7.i
-
-bb7.i: ; preds = %bb1.i, %bb.i, %bb
- %12 = phi i32 [ 0, %bb ], [ %tmp.i, %bb.i ], [ %tmp.i, %bb1.i ] ; [#uses=3]
- %tmp.i = add i32 %12, 1 ; [#uses=3]
- %13 = icmp slt i32 %12, 3 ; [#uses=1]
- br i1 %13, label %bb.i, label %bb3
-
-bb3: ; preds = %bb7.i, %entry
- %14 = phi i32 [ 0, %entry ], [ %tmp9, %bb7.i ] ; [#uses=3]
- %15 = icmp slt i32 %14, 3 ; [#uses=1]
- br i1 %15, label %bb, label %bb5
-
-bb5: ; preds = %bb3, %bb1.i
- %.0 = phi i32 [ 1, %bb1.i ], [ 0, %bb3 ] ; [#uses=1]
- ret i32 %.0
-}
-
-; [#uses=0]
-define i32* @_ZN14btHullTriangle4neibEii(%struct.btHullTriangle* %this, i32 %a, i32 %b) nounwind readonly align 2 {
-entry:
- %this21 = bitcast %struct.btHullTriangle* %this to i8* ; [#uses=1]
- %0 = getelementptr inbounds %struct.btHullTriangle* %this, i32 0, i32 0, i32 0 ; [#uses=2]
- br label %bb14
-
-bb: ; preds = %bb14
- %tmp22 = shl i32 %16, 2 ; [#uses=1]
- %uglygep = getelementptr i8* %this21, i32 %tmp22 ; [#uses=1]
- %uglygep23 = bitcast i8* %uglygep to i32* ; [#uses=1]
- %tmp20 = add i32 %16, 1 ; [#uses=3]
- %tmp = add i32 %16, 2 ; [#uses=1]
- %1 = srem i32 %tmp20, 3 ; [#uses=2]
- %2 = srem i32 %tmp, 3 ; [#uses=2]
- %3 = load i32* %uglygep23, align 4 ; [#uses=2]
- %4 = icmp eq i32 %3, %a ; [#uses=1]
- br i1 %4, label %bb1, label %bb3
-
-bb1: ; preds = %bb
- %5 = getelementptr inbounds i32* %0, i32 %1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp eq i32 %6, %b ; [#uses=1]
- br i1 %7, label %bb5, label %bb3
-
-bb3: ; preds = %bb1, %bb
- %8 = icmp eq i32 %3, %b ; [#uses=1]
- br i1 %8, label %bb7, label %bb14
-
-bb5: ; preds = %bb1
- %9 = getelementptr inbounds %struct.btHullTriangle* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %10 = getelementptr inbounds i32* %9, i32 %2 ; [#uses=1]
- ret i32* %10
-
-bb7: ; preds = %bb3
- %11 = getelementptr inbounds i32* %0, i32 %1 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = icmp eq i32 %12, %a ; [#uses=1]
- br i1 %13, label %bb12, label %bb14
-
-bb12: ; preds = %bb7
- %14 = getelementptr inbounds %struct.btHullTriangle* %this, i32 0, i32 1, i32 0 ; [#uses=1]
- %15 = getelementptr inbounds i32* %14, i32 %2 ; [#uses=1]
- ret i32* %15
-
-bb14: ; preds = %bb7, %bb3, %entry
- %16 = phi i32 [ 0, %entry ], [ %tmp20, %bb7 ], [ %tmp20, %bb3 ] ; [#uses=4]
- %17 = icmp slt i32 %16, 3 ; [#uses=1]
- br i1 %17, label %bb, label %bb16
-
-bb16: ; preds = %bb14
- ret i32* @_ZZN14btHullTriangle4neibEiiE2er
-}
-
-; [#uses=0]
-define void @_ZN11HullLibrary7checkitEP14btHullTriangle(%struct.HullLibrary* nocapture %this, %struct.btHullTriangle* nocapture %t) nounwind readnone align 2 {
-return:
- ret void
-}
-
-; [#uses=0]
-define float @_Z7GetDistfffPKf(float %px, float %py, float %pz, float* nocapture %p2) nounwind readonly {
-entry:
- %0 = load float* %p2, align 4 ; [#uses=1]
- %1 = fsub float %px, %0 ; [#uses=2]
- %2 = getelementptr inbounds float* %p2, i32 1 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=1]
- %4 = fsub float %py, %3 ; [#uses=2]
- %5 = getelementptr inbounds float* %p2, i32 2 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = fsub float %pz, %6 ; [#uses=2]
- %8 = fmul float %1, %1 ; [#uses=1]
- %9 = fmul float %4, %4 ; [#uses=1]
- %10 = fadd float %8, %9 ; [#uses=1]
- %11 = fmul float %7, %7 ; [#uses=1]
- %12 = fadd float %10, %11 ; [#uses=1]
- ret float %12
-}
-
-; [#uses=0]
-define i32 @_Z9SplitTestR7ConvexHRK7btPlane(%struct.ConvexH* nocapture %convex, %struct.btPlane* nocapture %plane) nounwind readonly {
-entry:
- %0 = getelementptr inbounds %struct.ConvexH* %convex, i32 0, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb2
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.ConvexH* %convex, i32 0, i32 0, i32 3 ; [#uses=1]
- %4 = load %struct.btQuadWord** %3, align 4 ; [#uses=3]
- %5 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = load float* @planetestepsilon, align 4 ; [#uses=2]
- %14 = fsub float -0.000000e+00, %13 ; [#uses=1]
- %tmp = icmp sgt i32 %1, 1 ; [#uses=1]
- %smax = select i1 %tmp, i32 %1, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %_Z9PlaneTestRK7btPlaneRK9btVector3.exit, %bb.nph
- %i.05 = phi i32 [ 0, %bb.nph ], [ %28, %_Z9PlaneTestRK7btPlaneRK9btVector3.exit ] ; [#uses=4]
- %flag.04 = phi i32 [ 0, %bb.nph ], [ %27, %_Z9PlaneTestRK7btPlaneRK9btVector3.exit ] ; [#uses=1]
- %scevgep6 = getelementptr inbounds %struct.btQuadWord* %4, i32 %i.05, i32 0, i32 0 ; [#uses=1]
- %scevgep7 = getelementptr %struct.btQuadWord* %4, i32 %i.05, i32 0, i32 1 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %4, i32 %i.05, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %scevgep6, align 4 ; [#uses=1]
- %16 = fmul float %15, %6 ; [#uses=1]
- %17 = load float* %scevgep7, align 4 ; [#uses=1]
- %18 = fmul float %17, %8 ; [#uses=1]
- %19 = fadd float %16, %18 ; [#uses=1]
- %20 = load float* %scevgep8, align 4 ; [#uses=1]
- %21 = fmul float %20, %10 ; [#uses=1]
- %22 = fadd float %19, %21 ; [#uses=1]
- %23 = fadd float %22, %12 ; [#uses=2]
- %24 = fcmp ule float %23, %13 ; [#uses=1]
- br i1 %24, label %bb.i, label %_Z9PlaneTestRK7btPlaneRK9btVector3.exit
-
-bb.i: ; preds = %bb
- %25 = fcmp olt float %23, %14 ; [#uses=1]
- %iftmp.49.0.i = zext i1 %25 to i32 ; [#uses=1]
- br label %_Z9PlaneTestRK7btPlaneRK9btVector3.exit
-
-_Z9PlaneTestRK7btPlaneRK9btVector3.exit: ; preds = %bb.i, %bb
- %26 = phi i32 [ %iftmp.49.0.i, %bb.i ], [ 2, %bb ] ; [#uses=1]
- %27 = or i32 %26, %flag.04 ; [#uses=2]
- %28 = add nsw i32 %i.05, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %28, %smax ; [#uses=1]
- br i1 %exitcond, label %bb2, label %bb
-
-bb2: ; preds = %_Z9PlaneTestRK7btPlaneRK9btVector3.exit, %entry
- %flag.0.lcssa = phi i32 [ 0, %entry ], [ %27, %_Z9PlaneTestRK7btPlaneRK9btVector3.exit ] ; [#uses=1]
- ret i32 %flag.0.lcssa
-}
-
-; [#uses=4]
-define void @_ZN11HullLibrary6b2bfixEP14btHullTriangleS1_(%struct.HullLibrary* nocapture %this, %struct.btHullTriangle* nocapture %s, %struct.btHullTriangle* nocapture %t) nounwind align 2 {
-bb.nph:
- %this21.i63 = bitcast %struct.btHullTriangle* %s to i8* ; [#uses=2]
- %this21.i33 = bitcast %struct.btHullTriangle* %t to i8* ; [#uses=2]
- %0 = getelementptr inbounds %struct.btHullTriangle* %s, i32 0, i32 0, i32 0 ; [#uses=6]
- %1 = getelementptr inbounds %struct.btHullTriangle* %s, i32 0, i32 1, i32 0 ; [#uses=4]
- %2 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btHullTriangle* %t, i32 0, i32 0, i32 0 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btHullTriangle* %t, i32 0, i32 1, i32 0 ; [#uses=4]
- br label %bb
-
-bb: ; preds = %_ZN14btHullTriangle4neibEii.exit, %bb.nph
- %i.089 = phi i32 [ 0, %bb.nph ], [ %5, %_ZN14btHullTriangle4neibEii.exit ] ; [#uses=2]
- %tmp129 = add i32 %i.089, 2 ; [#uses=1]
- %5 = add nsw i32 %i.089, 1 ; [#uses=3]
- %tmp127 = icmp eq i32 %5, 3 ; [#uses=2]
- %tmp128 = select i1 %tmp127, i32 0, i32 %5 ; [#uses=1]
- %6 = srem i32 %tmp129, 3 ; [#uses=1]
- %7 = getelementptr inbounds i32* %0, i32 %tmp128 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=12]
- %9 = getelementptr inbounds i32* %0, i32 %6 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=12]
- br label %bb14.i75
-
-bb.i69: ; preds = %bb14.i75
- %tmp = shl i32 %24, 2 ; [#uses=1]
- %uglygep = getelementptr i8* %this21.i63, i32 %tmp ; [#uses=1]
- %uglygep23.i66 = bitcast i8* %uglygep to i32* ; [#uses=1]
- %tmp20.i67 = add i32 %24, 1 ; [#uses=3]
- %tmp.i68 = add i32 %24, 2 ; [#uses=1]
- %11 = srem i32 %tmp20.i67, 3 ; [#uses=2]
- %12 = srem i32 %tmp.i68, 3 ; [#uses=2]
- %13 = load i32* %uglygep23.i66, align 4 ; [#uses=2]
- %14 = icmp eq i32 %13, %8 ; [#uses=1]
- br i1 %14, label %bb1.i70, label %bb3.i71
-
-bb1.i70: ; preds = %bb.i69
- %15 = getelementptr inbounds i32* %0, i32 %11 ; [#uses=1]
- %16 = load i32* %15, align 4 ; [#uses=1]
- %17 = icmp eq i32 %16, %10 ; [#uses=1]
- br i1 %17, label %bb5.i72, label %bb3.i71
-
-bb3.i71: ; preds = %bb1.i70, %bb.i69
- %18 = icmp eq i32 %13, %10 ; [#uses=1]
- br i1 %18, label %bb7.i73, label %bb14.i75
-
-bb5.i72: ; preds = %bb1.i70
- %19 = getelementptr inbounds i32* %1, i32 %12 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit77
-
-bb7.i73: ; preds = %bb3.i71
- %20 = getelementptr inbounds i32* %0, i32 %11 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %22 = icmp eq i32 %21, %8 ; [#uses=1]
- br i1 %22, label %bb12.i74, label %bb14.i75
-
-bb12.i74: ; preds = %bb7.i73
- %23 = getelementptr inbounds i32* %1, i32 %12 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit77
-
-bb14.i75: ; preds = %bb7.i73, %bb3.i71, %bb
- %24 = phi i32 [ 0, %bb ], [ %tmp20.i67, %bb3.i71 ], [ %tmp20.i67, %bb7.i73 ] ; [#uses=4]
- %25 = icmp slt i32 %24, 3 ; [#uses=1]
- br i1 %25, label %bb.i69, label %_ZN14btHullTriangle4neibEii.exit77
-
-_ZN14btHullTriangle4neibEii.exit77: ; preds = %bb14.i75, %bb12.i74, %bb5.i72
- %26 = phi i32* [ %23, %bb12.i74 ], [ %19, %bb5.i72 ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i75 ] ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = load %struct.btHullTriangle*** %2, align 4 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btHullTriangle** %28, i32 %27 ; [#uses=1]
- %30 = load %struct.btHullTriangle** %29, align 4 ; [#uses=4]
- %this21.i48 = bitcast %struct.btHullTriangle* %30 to i8* ; [#uses=1]
- %31 = getelementptr inbounds %struct.btHullTriangle* %30, i32 0, i32 0, i32 0 ; [#uses=2]
- br label %bb14.i60
-
-bb.i54: ; preds = %bb14.i60
- %tmp96 = shl i32 %47, 2 ; [#uses=1]
- %uglygep97 = getelementptr i8* %this21.i48, i32 %tmp96 ; [#uses=1]
- %uglygep23.i51 = bitcast i8* %uglygep97 to i32* ; [#uses=1]
- %tmp20.i52 = add i32 %47, 1 ; [#uses=3]
- %tmp.i53 = add i32 %47, 2 ; [#uses=1]
- %32 = srem i32 %tmp20.i52, 3 ; [#uses=2]
- %33 = srem i32 %tmp.i53, 3 ; [#uses=2]
- %34 = load i32* %uglygep23.i51, align 4 ; [#uses=2]
- %35 = icmp eq i32 %34, %10 ; [#uses=1]
- br i1 %35, label %bb1.i55, label %bb3.i56
-
-bb1.i55: ; preds = %bb.i54
- %36 = getelementptr inbounds i32* %31, i32 %32 ; [#uses=1]
- %37 = load i32* %36, align 4 ; [#uses=1]
- %38 = icmp eq i32 %37, %8 ; [#uses=1]
- br i1 %38, label %bb5.i57, label %bb3.i56
-
-bb3.i56: ; preds = %bb1.i55, %bb.i54
- %39 = icmp eq i32 %34, %8 ; [#uses=1]
- br i1 %39, label %bb7.i58, label %bb14.i60
-
-bb5.i57: ; preds = %bb1.i55
- %40 = getelementptr inbounds %struct.btHullTriangle* %30, i32 0, i32 1, i32 0 ; [#uses=1]
- %41 = getelementptr inbounds i32* %40, i32 %33 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit62
-
-bb7.i58: ; preds = %bb3.i56
- %42 = getelementptr inbounds i32* %31, i32 %32 ; [#uses=1]
- %43 = load i32* %42, align 4 ; [#uses=1]
- %44 = icmp eq i32 %43, %10 ; [#uses=1]
- br i1 %44, label %bb12.i59, label %bb14.i60
-
-bb12.i59: ; preds = %bb7.i58
- %45 = getelementptr inbounds %struct.btHullTriangle* %30, i32 0, i32 1, i32 0 ; [#uses=1]
- %46 = getelementptr inbounds i32* %45, i32 %33 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit62
-
-bb14.i60: ; preds = %bb7.i58, %bb3.i56, %_ZN14btHullTriangle4neibEii.exit77
- %47 = phi i32 [ 0, %_ZN14btHullTriangle4neibEii.exit77 ], [ %tmp20.i52, %bb3.i56 ], [ %tmp20.i52, %bb7.i58 ] ; [#uses=4]
- %48 = icmp slt i32 %47, 3 ; [#uses=1]
- br i1 %48, label %bb.i54, label %_ZN14btHullTriangle4neibEii.exit62
-
-_ZN14btHullTriangle4neibEii.exit62: ; preds = %bb14.i60, %bb12.i59, %bb5.i57
- %49 = phi i32* [ %46, %bb12.i59 ], [ %41, %bb5.i57 ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i60 ] ; [#uses=1]
- br label %bb14.i45
-
-bb.i39: ; preds = %bb14.i45
- %tmp103 = shl i32 %63, 2 ; [#uses=1]
- %uglygep104 = getelementptr i8* %this21.i33, i32 %tmp103 ; [#uses=1]
- %uglygep23.i36 = bitcast i8* %uglygep104 to i32* ; [#uses=1]
- %tmp20.i37 = add i32 %63, 1 ; [#uses=3]
- %tmp.i38 = add i32 %63, 2 ; [#uses=1]
- %50 = srem i32 %tmp20.i37, 3 ; [#uses=2]
- %51 = srem i32 %tmp.i38, 3 ; [#uses=2]
- %52 = load i32* %uglygep23.i36, align 4 ; [#uses=2]
- %53 = icmp eq i32 %52, %10 ; [#uses=1]
- br i1 %53, label %bb1.i40, label %bb3.i41
-
-bb1.i40: ; preds = %bb.i39
- %54 = getelementptr inbounds i32* %3, i32 %50 ; [#uses=1]
- %55 = load i32* %54, align 4 ; [#uses=1]
- %56 = icmp eq i32 %55, %8 ; [#uses=1]
- br i1 %56, label %bb5.i42, label %bb3.i41
-
-bb3.i41: ; preds = %bb1.i40, %bb.i39
- %57 = icmp eq i32 %52, %8 ; [#uses=1]
- br i1 %57, label %bb7.i43, label %bb14.i45
-
-bb5.i42: ; preds = %bb1.i40
- %58 = getelementptr inbounds i32* %4, i32 %51 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit47
-
-bb7.i43: ; preds = %bb3.i41
- %59 = getelementptr inbounds i32* %3, i32 %50 ; [#uses=1]
- %60 = load i32* %59, align 4 ; [#uses=1]
- %61 = icmp eq i32 %60, %10 ; [#uses=1]
- br i1 %61, label %bb12.i44, label %bb14.i45
-
-bb12.i44: ; preds = %bb7.i43
- %62 = getelementptr inbounds i32* %4, i32 %51 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit47
-
-bb14.i45: ; preds = %bb7.i43, %bb3.i41, %_ZN14btHullTriangle4neibEii.exit62
- %63 = phi i32 [ 0, %_ZN14btHullTriangle4neibEii.exit62 ], [ %tmp20.i37, %bb3.i41 ], [ %tmp20.i37, %bb7.i43 ] ; [#uses=4]
- %64 = icmp slt i32 %63, 3 ; [#uses=1]
- br i1 %64, label %bb.i39, label %_ZN14btHullTriangle4neibEii.exit47
-
-_ZN14btHullTriangle4neibEii.exit47: ; preds = %bb14.i45, %bb12.i44, %bb5.i42
- %65 = phi i32* [ %62, %bb12.i44 ], [ %58, %bb5.i42 ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i45 ] ; [#uses=1]
- %66 = load i32* %65, align 4 ; [#uses=1]
- store i32 %66, i32* %49, align 4
- br label %bb14.i30
-
-bb.i24: ; preds = %bb14.i30
- %tmp110 = shl i32 %80, 2 ; [#uses=1]
- %uglygep111 = getelementptr i8* %this21.i33, i32 %tmp110 ; [#uses=1]
- %uglygep23.i21 = bitcast i8* %uglygep111 to i32* ; [#uses=1]
- %tmp20.i22 = add i32 %80, 1 ; [#uses=3]
- %tmp.i23 = add i32 %80, 2 ; [#uses=1]
- %67 = srem i32 %tmp20.i22, 3 ; [#uses=2]
- %68 = srem i32 %tmp.i23, 3 ; [#uses=2]
- %69 = load i32* %uglygep23.i21, align 4 ; [#uses=2]
- %70 = icmp eq i32 %69, %10 ; [#uses=1]
- br i1 %70, label %bb1.i25, label %bb3.i26
-
-bb1.i25: ; preds = %bb.i24
- %71 = getelementptr inbounds i32* %3, i32 %67 ; [#uses=1]
- %72 = load i32* %71, align 4 ; [#uses=1]
- %73 = icmp eq i32 %72, %8 ; [#uses=1]
- br i1 %73, label %bb5.i27, label %bb3.i26
-
-bb3.i26: ; preds = %bb1.i25, %bb.i24
- %74 = icmp eq i32 %69, %8 ; [#uses=1]
- br i1 %74, label %bb7.i28, label %bb14.i30
-
-bb5.i27: ; preds = %bb1.i25
- %75 = getelementptr inbounds i32* %4, i32 %68 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit32
-
-bb7.i28: ; preds = %bb3.i26
- %76 = getelementptr inbounds i32* %3, i32 %67 ; [#uses=1]
- %77 = load i32* %76, align 4 ; [#uses=1]
- %78 = icmp eq i32 %77, %10 ; [#uses=1]
- br i1 %78, label %bb12.i29, label %bb14.i30
-
-bb12.i29: ; preds = %bb7.i28
- %79 = getelementptr inbounds i32* %4, i32 %68 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit32
-
-bb14.i30: ; preds = %bb7.i28, %bb3.i26, %_ZN14btHullTriangle4neibEii.exit47
- %80 = phi i32 [ 0, %_ZN14btHullTriangle4neibEii.exit47 ], [ %tmp20.i22, %bb3.i26 ], [ %tmp20.i22, %bb7.i28 ] ; [#uses=4]
- %81 = icmp slt i32 %80, 3 ; [#uses=1]
- br i1 %81, label %bb.i24, label %_ZN14btHullTriangle4neibEii.exit32
-
-_ZN14btHullTriangle4neibEii.exit32: ; preds = %bb14.i30, %bb12.i29, %bb5.i27
- %82 = phi i32* [ %79, %bb12.i29 ], [ %75, %bb5.i27 ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i30 ] ; [#uses=1]
- %83 = load i32* %82, align 4 ; [#uses=1]
- %84 = load %struct.btHullTriangle*** %2, align 4 ; [#uses=1]
- %85 = getelementptr inbounds %struct.btHullTriangle** %84, i32 %83 ; [#uses=1]
- %86 = load %struct.btHullTriangle** %85, align 4 ; [#uses=4]
- %this21.i3 = bitcast %struct.btHullTriangle* %86 to i8* ; [#uses=1]
- %87 = getelementptr inbounds %struct.btHullTriangle* %86, i32 0, i32 0, i32 0 ; [#uses=2]
- br label %bb14.i15
-
-bb.i9: ; preds = %bb14.i15
- %tmp117 = shl i32 %103, 2 ; [#uses=1]
- %uglygep118 = getelementptr i8* %this21.i3, i32 %tmp117 ; [#uses=1]
- %uglygep23.i6 = bitcast i8* %uglygep118 to i32* ; [#uses=1]
- %tmp20.i7 = add i32 %103, 1 ; [#uses=3]
- %tmp.i8 = add i32 %103, 2 ; [#uses=1]
- %88 = srem i32 %tmp20.i7, 3 ; [#uses=2]
- %89 = srem i32 %tmp.i8, 3 ; [#uses=2]
- %90 = load i32* %uglygep23.i6, align 4 ; [#uses=2]
- %91 = icmp eq i32 %90, %8 ; [#uses=1]
- br i1 %91, label %bb1.i10, label %bb3.i11
-
-bb1.i10: ; preds = %bb.i9
- %92 = getelementptr inbounds i32* %87, i32 %88 ; [#uses=1]
- %93 = load i32* %92, align 4 ; [#uses=1]
- %94 = icmp eq i32 %93, %10 ; [#uses=1]
- br i1 %94, label %bb5.i12, label %bb3.i11
-
-bb3.i11: ; preds = %bb1.i10, %bb.i9
- %95 = icmp eq i32 %90, %10 ; [#uses=1]
- br i1 %95, label %bb7.i13, label %bb14.i15
-
-bb5.i12: ; preds = %bb1.i10
- %96 = getelementptr inbounds %struct.btHullTriangle* %86, i32 0, i32 1, i32 0 ; [#uses=1]
- %97 = getelementptr inbounds i32* %96, i32 %89 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit17
-
-bb7.i13: ; preds = %bb3.i11
- %98 = getelementptr inbounds i32* %87, i32 %88 ; [#uses=1]
- %99 = load i32* %98, align 4 ; [#uses=1]
- %100 = icmp eq i32 %99, %8 ; [#uses=1]
- br i1 %100, label %bb12.i14, label %bb14.i15
-
-bb12.i14: ; preds = %bb7.i13
- %101 = getelementptr inbounds %struct.btHullTriangle* %86, i32 0, i32 1, i32 0 ; [#uses=1]
- %102 = getelementptr inbounds i32* %101, i32 %89 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit17
-
-bb14.i15: ; preds = %bb7.i13, %bb3.i11, %_ZN14btHullTriangle4neibEii.exit32
- %103 = phi i32 [ 0, %_ZN14btHullTriangle4neibEii.exit32 ], [ %tmp20.i7, %bb3.i11 ], [ %tmp20.i7, %bb7.i13 ] ; [#uses=4]
- %104 = icmp slt i32 %103, 3 ; [#uses=1]
- br i1 %104, label %bb.i9, label %_ZN14btHullTriangle4neibEii.exit17
-
-_ZN14btHullTriangle4neibEii.exit17: ; preds = %bb14.i15, %bb12.i14, %bb5.i12
- %105 = phi i32* [ %102, %bb12.i14 ], [ %97, %bb5.i12 ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i15 ] ; [#uses=1]
- br label %bb14.i
-
-bb.i: ; preds = %bb14.i
- %tmp124 = shl i32 %119, 2 ; [#uses=1]
- %uglygep125 = getelementptr i8* %this21.i63, i32 %tmp124 ; [#uses=1]
- %uglygep23.i = bitcast i8* %uglygep125 to i32* ; [#uses=1]
- %tmp20.i = add i32 %119, 1 ; [#uses=3]
- %tmp.i = add i32 %119, 2 ; [#uses=1]
- %106 = srem i32 %tmp20.i, 3 ; [#uses=2]
- %107 = srem i32 %tmp.i, 3 ; [#uses=2]
- %108 = load i32* %uglygep23.i, align 4 ; [#uses=2]
- %109 = icmp eq i32 %108, %8 ; [#uses=1]
- br i1 %109, label %bb1.i, label %bb3.i
-
-bb1.i: ; preds = %bb.i
- %110 = getelementptr inbounds i32* %0, i32 %106 ; [#uses=1]
- %111 = load i32* %110, align 4 ; [#uses=1]
- %112 = icmp eq i32 %111, %10 ; [#uses=1]
- br i1 %112, label %bb5.i, label %bb3.i
-
-bb3.i: ; preds = %bb1.i, %bb.i
- %113 = icmp eq i32 %108, %10 ; [#uses=1]
- br i1 %113, label %bb7.i, label %bb14.i
-
-bb5.i: ; preds = %bb1.i
- %114 = getelementptr inbounds i32* %1, i32 %107 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit
-
-bb7.i: ; preds = %bb3.i
- %115 = getelementptr inbounds i32* %0, i32 %106 ; [#uses=1]
- %116 = load i32* %115, align 4 ; [#uses=1]
- %117 = icmp eq i32 %116, %8 ; [#uses=1]
- br i1 %117, label %bb12.i, label %bb14.i
-
-bb12.i: ; preds = %bb7.i
- %118 = getelementptr inbounds i32* %1, i32 %107 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit
-
-bb14.i: ; preds = %bb7.i, %bb3.i, %_ZN14btHullTriangle4neibEii.exit17
- %119 = phi i32 [ 0, %_ZN14btHullTriangle4neibEii.exit17 ], [ %tmp20.i, %bb3.i ], [ %tmp20.i, %bb7.i ] ; [#uses=4]
- %120 = icmp slt i32 %119, 3 ; [#uses=1]
- br i1 %120, label %bb.i, label %_ZN14btHullTriangle4neibEii.exit
-
-_ZN14btHullTriangle4neibEii.exit: ; preds = %bb14.i, %bb12.i, %bb5.i
- %121 = phi i32* [ %118, %bb12.i ], [ %114, %bb5.i ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i ] ; [#uses=1]
- %122 = load i32* %121, align 4 ; [#uses=1]
- store i32 %122, i32* %105, align 4
- br i1 %tmp127, label %return, label %bb
-
-return: ; preds = %_ZN14btHullTriangle4neibEii.exit
- ret void
-}
-
-; [#uses=0]
-define %struct.btHullTriangle* @_ZN11HullLibrary10extrudableEf(%struct.HullLibrary* nocapture %this, float %epsilon) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph, label %bb10
-
-bb.nph: ; preds = %entry
- %3 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- %tmp = icmp sgt i32 %1, 1 ; [#uses=1]
- %smax = select i1 %tmp, i32 %1, i32 1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb7, %bb.nph
- %t.116 = phi %struct.btHullTriangle* [ null, %bb.nph ], [ %t.0, %bb7 ] ; [#uses=4]
- %i.015 = phi i32 [ 0, %bb.nph ], [ %15, %bb7 ] ; [#uses=3]
- %4 = icmp eq %struct.btHullTriangle* %t.116, null ; [#uses=1]
- br i1 %4, label %bb6, label %bb1
-
-bb1: ; preds = %bb
- %5 = load %struct.btHullTriangle*** %3, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btHullTriangle** %5, i32 %i.015 ; [#uses=1]
- %6 = load %struct.btHullTriangle** %scevgep, align 4 ; [#uses=2]
- %7 = icmp eq %struct.btHullTriangle* %6, null ; [#uses=1]
- br i1 %7, label %bb7, label %bb2
-
-bb2: ; preds = %bb1
- %8 = getelementptr inbounds %struct.btHullTriangle* %t.116, i32 0, i32 4 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btHullTriangle* %6, i32 0, i32 4 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = fcmp olt float %9, %11 ; [#uses=1]
- br i1 %12, label %bb6, label %bb7
-
-bb6: ; preds = %bb2, %bb
- %13 = load %struct.btHullTriangle*** %3, align 4 ; [#uses=1]
- %scevgep17 = getelementptr %struct.btHullTriangle** %13, i32 %i.015 ; [#uses=1]
- %14 = load %struct.btHullTriangle** %scevgep17, align 4 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %bb2, %bb1
- %t.0 = phi %struct.btHullTriangle* [ %14, %bb6 ], [ %t.116, %bb2 ], [ %t.116, %bb1 ] ; [#uses=2]
- %15 = add nsw i32 %i.015, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %15, %smax ; [#uses=1]
- br i1 %exitcond, label %bb10, label %bb
-
-bb10: ; preds = %bb7, %entry
- %t.1.lcssa = phi %struct.btHullTriangle* [ null, %entry ], [ %t.0, %bb7 ] ; [#uses=2]
- %16 = getelementptr inbounds %struct.btHullTriangle* %t.1.lcssa, i32 0, i32 4 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fcmp ogt float %17, %epsilon ; [#uses=1]
- %iftmp.70.0 = select i1 %18, %struct.btHullTriangle* %t.1.lcssa, %struct.btHullTriangle* null ; [#uses=1]
- ret %struct.btHullTriangle* %iftmp.70.0
-}
-
-; [#uses=1]
-define zeroext i8 @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(%struct.HullLibrary* nocapture %this, i32 %svcount, %struct.btQuadWord* nocapture %svertices, i32 %stride, i32* %vcount, %struct.btQuadWord* %vertices, float %normalepsilon, %struct.btQuadWord* %scale) align 2 {
-entry:
- %0 = bitcast %struct.btQuadWord* %svertices to i8* ; [#uses=2]
- %bmin = alloca [3 x float], align 4 ; [#uses=3]
- %bmax = alloca [3 x float], align 4 ; [#uses=3]
- %bmin63 = alloca [3 x float], align 4 ; [#uses=3]
- %bmax64 = alloca [3 x float], align 4 ; [#uses=3]
- %1 = icmp eq i32 %svcount, 0 ; [#uses=1]
- br i1 %1, label %bb112, label %bb1
-
-bb1: ; preds = %entry
- %2 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 1 ; [#uses=7]
- %3 = load i32* %2, align 4 ; [#uses=4]
- %4 = icmp sgt i32 %3, 0 ; [#uses=1]
- %.not224 = xor i1 %4, true ; [#uses=1]
- %5 = icmp slt i32 %3, 0 ; [#uses=1]
- %or.cond225 = and i1 %.not224, %5 ; [#uses=1]
- br i1 %or.cond225, label %bb4.i, label %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit
-
-bb4.i: ; preds = %bb1
- %6 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = icmp slt i32 %7, 0 ; [#uses=1]
- br i1 %8, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %bb4.i
- %9 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 3 ; [#uses=3]
- %10 = load i32** %9, align 4 ; [#uses=2]
- %11 = icmp eq i32* %10, null ; [#uses=1]
- br i1 %11, label %bb11.preheader.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %12 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- %13 = load i8* %12, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %13, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %14 = bitcast i32* %10 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %14)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store i32* null, i32** %9, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %15 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 4 ; [#uses=1]
- store i8 1, i8* %15, align 4
- store i32* null, i32** %9, align 4
- store i32 0, i32* %6, align 4
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb11.preheader.i, %bb4.i
- %16 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- %tmp.i = sub i32 0, %3 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp = add i32 %3, %indvar.i ; [#uses=1]
- %17 = load i32** %16, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %17, i32 %tmp ; [#uses=2]
- %18 = icmp eq i32* %scevgep, null ; [#uses=1]
- br i1 %18, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store i32 0, i32* %scevgep, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond, label %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit: ; preds = %bb10.i, %bb1
- store i32 0, i32* %2, align 4
- store i32 0, i32* %vcount, align 4
- %19 = icmp eq %struct.btQuadWord* %scale, null ; [#uses=3]
- br i1 %19, label %bb.nph173, label %bb2
-
-bb2: ; preds = %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit
- %20 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %20, align 4
- %21 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 1.000000e+00, float* %21, align 4
- %22 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 1.000000e+00, float* %22, align 4
- br label %bb.nph173
-
-bb.nph173: ; preds = %bb2, %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit
- %23 = getelementptr inbounds [3 x float]* %bmin, i32 0, i32 0 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %23, align 4
- %24 = getelementptr inbounds [3 x float]* %bmin, i32 0, i32 1 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %24, align 4
- %25 = getelementptr inbounds [3 x float]* %bmin, i32 0, i32 2 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %25, align 4
- %26 = getelementptr inbounds [3 x float]* %bmax, i32 0, i32 0 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %26, align 4
- %27 = getelementptr inbounds [3 x float]* %bmax, i32 0, i32 1 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %27, align 4
- %28 = getelementptr inbounds [3 x float]* %bmax, i32 0, i32 2 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %28, align 4
- %scevgep213 = getelementptr %struct.btQuadWord* %svertices, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep213214 = bitcast float* %scevgep213 to i8* ; [#uses=1]
- %scevgep218 = getelementptr %struct.btQuadWord* %svertices, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep218219 = bitcast float* %scevgep218 to i8* ; [#uses=1]
- br label %bb.nph170
-
-bb.nph170: ; preds = %bb11, %bb.nph173
- %29 = phi float [ 0x47EFFFFFE0000000, %bb.nph173 ], [ %307, %bb11 ] ; [#uses=2]
- %30 = phi float [ 0xC7EFFFFFE0000000, %bb.nph173 ], [ %42, %bb11 ] ; [#uses=2]
- %31 = phi float [ 0x47EFFFFFE0000000, %bb.nph173 ], [ %305, %bb11 ] ; [#uses=2]
- %32 = phi float [ 0xC7EFFFFFE0000000, %bb.nph173 ], [ %302, %bb11 ] ; [#uses=2]
- %33 = phi float [ 0x47EFFFFFE0000000, %bb.nph173 ], [ %37, %bb11 ] ; [#uses=2]
- %34 = phi float [ 0xC7EFFFFFE0000000, %bb.nph173 ], [ %39, %bb11 ] ; [#uses=2]
- %i.0172 = phi i32 [ 0, %bb.nph173 ], [ %43, %bb11 ] ; [#uses=2]
- %tmp215 = mul i32 %i.0172, %stride ; [#uses=3]
- %uglygep216 = getelementptr i8* %scevgep213214, i32 %tmp215 ; [#uses=1]
- %uglygep208209.2 = bitcast i8* %uglygep216 to float* ; [#uses=1]
- %uglygep220 = getelementptr i8* %scevgep218219, i32 %tmp215 ; [#uses=1]
- %uglygep208209.1 = bitcast i8* %uglygep220 to float* ; [#uses=1]
- %uglygep222 = getelementptr i8* %0, i32 %tmp215 ; [#uses=1]
- %uglygep208209 = bitcast i8* %uglygep222 to float* ; [#uses=1]
- %35 = load float* %uglygep208209, align 4 ; [#uses=6]
- %36 = fcmp olt float %35, %33 ; [#uses=1]
- br i1 %36, label %bb6, label %bb7
-
-bb6: ; preds = %bb.nph170
- store float %35, float* %23, align 4
- br label %bb7
-
-bb7: ; preds = %bb6, %bb.nph170
- %37 = phi float [ %35, %bb6 ], [ %33, %bb.nph170 ] ; [#uses=3]
- %38 = fcmp ogt float %35, %34 ; [#uses=1]
- br i1 %38, label %bb8, label %bb9
-
-bb8: ; preds = %bb7
- store float %35, float* %26, align 4
- br label %bb9
-
-bb9: ; preds = %bb8, %bb7
- %39 = phi float [ %35, %bb8 ], [ %34, %bb7 ] ; [#uses=2]
- %40 = load float* %uglygep208209.1, align 4 ; [#uses=6]
- %41 = fcmp olt float %40, %31 ; [#uses=1]
- br i1 %41, label %bb6.1, label %bb7.1
-
-bb11: ; preds = %bb8.2, %bb7.2
- %42 = phi float [ %303, %bb8.2 ], [ %30, %bb7.2 ] ; [#uses=2]
- %43 = add i32 %i.0172, 1 ; [#uses=2]
- %exitcond212 = icmp eq i32 %43, %svcount ; [#uses=1]
- br i1 %exitcond212, label %bb13, label %bb.nph170
-
-bb13: ; preds = %bb11
- %44 = fsub float %39, %37 ; [#uses=8]
- %45 = fsub float %302, %305 ; [#uses=8]
- %46 = fsub float %42, %307 ; [#uses=9]
- %47 = fmul float %44, 5.000000e-01 ; [#uses=1]
- %48 = fadd float %47, %37 ; [#uses=4]
- %49 = fmul float %45, 5.000000e-01 ; [#uses=1]
- %50 = fadd float %49, %305 ; [#uses=4]
- %51 = fmul float %46, 5.000000e-01 ; [#uses=1]
- %52 = fadd float %51, %307 ; [#uses=4]
- %53 = fcmp olt float %44, 0x3EB0C6F7A0000000 ; [#uses=2]
- %54 = fcmp olt float %45, 0x3EB0C6F7A0000000 ; [#uses=2]
- %or.cond = or i1 %53, %54 ; [#uses=1]
- br i1 %or.cond, label %bb19, label %bb15
-
-bb15: ; preds = %bb13
- %55 = fcmp olt float %46, 0x3EB0C6F7A0000000 ; [#uses=1]
- %56 = icmp ult i32 %svcount, 3 ; [#uses=1]
- %57 = or i1 %55, %56 ; [#uses=1]
- br i1 %57, label %bb19, label %bb37
-
-bb19: ; preds = %bb15, %bb13
- %58 = fcmp ogt float %44, 0x3EB0C6F7A0000000 ; [#uses=1]
- %59 = fcmp olt float %44, 0x47EFFFFFE0000000 ; [#uses=1]
- %or.cond115 = and i1 %58, %59 ; [#uses=1]
- %len.0 = select i1 %or.cond115, float %44, float 0x47EFFFFFE0000000 ; [#uses=2]
- %60 = fcmp ogt float %45, 0x3EB0C6F7A0000000 ; [#uses=1]
- %61 = fcmp olt float %45, %len.0 ; [#uses=1]
- %or.cond116 = and i1 %60, %61 ; [#uses=1]
- %len.1 = select i1 %or.cond116, float %45, float %len.0 ; [#uses=2]
- %62 = fcmp ogt float %46, 0x3EB0C6F7A0000000 ; [#uses=1]
- %63 = fcmp olt float %46, %len.1 ; [#uses=1]
- %or.cond117 = and i1 %62, %63 ; [#uses=1]
- %len.2 = select i1 %or.cond117, float %46, float %len.1 ; [#uses=4]
- %64 = fcmp oeq float %len.2, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %64, label %bb36, label %bb30
-
-bb30: ; preds = %bb19
- br i1 %53, label %bb31, label %bb32
-
-bb31: ; preds = %bb30
- %65 = fmul float %len.2, 0x3FA99999A0000000 ; [#uses=1]
- br label %bb32
-
-bb32: ; preds = %bb31, %bb30
- %dx.1 = phi float [ %65, %bb31 ], [ %44, %bb30 ] ; [#uses=2]
- br i1 %54, label %bb33, label %bb34
-
-bb33: ; preds = %bb32
- %66 = fmul float %len.2, 0x3FA99999A0000000 ; [#uses=1]
- br label %bb34
-
-bb34: ; preds = %bb33, %bb32
- %dy.1 = phi float [ %66, %bb33 ], [ %45, %bb32 ] ; [#uses=2]
- %67 = fcmp olt float %46, 0x3EB0C6F7A0000000 ; [#uses=1]
- br i1 %67, label %bb35, label %bb36
-
-bb35: ; preds = %bb34
- %68 = fmul float %len.2, 0x3FA99999A0000000 ; [#uses=1]
- br label %bb36
-
-bb36: ; preds = %bb35, %bb34, %bb19
- %dz.0 = phi float [ %68, %bb35 ], [ 0x3F847AE140000000, %bb19 ], [ %46, %bb34 ] ; [#uses=2]
- %dy.0 = phi float [ %dy.1, %bb35 ], [ 0x3F847AE140000000, %bb19 ], [ %dy.1, %bb34 ] ; [#uses=2]
- %dx.0 = phi float [ %dx.1, %bb35 ], [ 0x3F847AE140000000, %bb19 ], [ %dx.1, %bb34 ] ; [#uses=2]
- %69 = fsub float %48, %dx.0 ; [#uses=4]
- %70 = fadd float %48, %dx.0 ; [#uses=4]
- %71 = fsub float %50, %dy.0 ; [#uses=4]
- %72 = fadd float %50, %dy.0 ; [#uses=4]
- %73 = fsub float %52, %dz.0 ; [#uses=4]
- %74 = fadd float %52, %dz.0 ; [#uses=4]
- %75 = load i32* %vcount, align 4 ; [#uses=3]
- %76 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %75, i32 0, i32 0 ; [#uses=1]
- store float %69, float* %76, align 4
- %77 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %75, i32 0, i32 1 ; [#uses=1]
- store float %71, float* %77, align 4
- %78 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %75, i32 0, i32 2 ; [#uses=1]
- store float %73, float* %78, align 4
- %79 = load i32* %vcount, align 4 ; [#uses=1]
- %80 = add i32 %79, 1 ; [#uses=4]
- store i32 %80, i32* %vcount, align 4
- %81 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %80, i32 0, i32 0 ; [#uses=1]
- store float %70, float* %81, align 4
- %82 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %80, i32 0, i32 1 ; [#uses=1]
- store float %71, float* %82, align 4
- %83 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %80, i32 0, i32 2 ; [#uses=1]
- store float %73, float* %83, align 4
- %84 = load i32* %vcount, align 4 ; [#uses=1]
- %85 = add i32 %84, 1 ; [#uses=4]
- store i32 %85, i32* %vcount, align 4
- %86 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %85, i32 0, i32 0 ; [#uses=1]
- store float %70, float* %86, align 4
- %87 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %85, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %87, align 4
- %88 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %85, i32 0, i32 2 ; [#uses=1]
- store float %73, float* %88, align 4
- %89 = load i32* %vcount, align 4 ; [#uses=1]
- %90 = add i32 %89, 1 ; [#uses=4]
- store i32 %90, i32* %vcount, align 4
- %91 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %90, i32 0, i32 0 ; [#uses=1]
- store float %69, float* %91, align 4
- %92 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %90, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %92, align 4
- %93 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %90, i32 0, i32 2 ; [#uses=1]
- store float %73, float* %93, align 4
- %94 = load i32* %vcount, align 4 ; [#uses=1]
- %95 = add i32 %94, 1 ; [#uses=4]
- store i32 %95, i32* %vcount, align 4
- %96 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %95, i32 0, i32 0 ; [#uses=1]
- store float %69, float* %96, align 4
- %97 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %95, i32 0, i32 1 ; [#uses=1]
- store float %71, float* %97, align 4
- %98 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %95, i32 0, i32 2 ; [#uses=1]
- store float %74, float* %98, align 4
- %99 = load i32* %vcount, align 4 ; [#uses=1]
- %100 = add i32 %99, 1 ; [#uses=4]
- store i32 %100, i32* %vcount, align 4
- %101 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %100, i32 0, i32 0 ; [#uses=1]
- store float %70, float* %101, align 4
- %102 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %100, i32 0, i32 1 ; [#uses=1]
- store float %71, float* %102, align 4
- %103 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %100, i32 0, i32 2 ; [#uses=1]
- store float %74, float* %103, align 4
- %104 = load i32* %vcount, align 4 ; [#uses=1]
- %105 = add i32 %104, 1 ; [#uses=4]
- store i32 %105, i32* %vcount, align 4
- %106 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %105, i32 0, i32 0 ; [#uses=1]
- store float %70, float* %106, align 4
- %107 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %105, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %107, align 4
- %108 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %105, i32 0, i32 2 ; [#uses=1]
- store float %74, float* %108, align 4
- %109 = load i32* %vcount, align 4 ; [#uses=1]
- %110 = add i32 %109, 1 ; [#uses=4]
- store i32 %110, i32* %vcount, align 4
- %111 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %110, i32 0, i32 0 ; [#uses=1]
- store float %69, float* %111, align 4
- %112 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %110, i32 0, i32 1 ; [#uses=1]
- store float %72, float* %112, align 4
- %113 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %110, i32 0, i32 2 ; [#uses=1]
- store float %74, float* %113, align 4
- %114 = load i32* %vcount, align 4 ; [#uses=1]
- %115 = add i32 %114, 1 ; [#uses=1]
- store i32 %115, i32* %vcount, align 4
- ret i8 1
-
-bb37: ; preds = %bb15
- br i1 %19, label %bb.nph168, label %bb39
-
-bb39: ; preds = %bb37
- %116 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %44, float* %116, align 4
- %117 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %45, float* %117, align 4
- %118 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %46, float* %118, align 4
- %119 = fdiv float 1.000000e+00, %44 ; [#uses=2]
- %120 = fdiv float 1.000000e+00, %45 ; [#uses=2]
- %121 = fdiv float 1.000000e+00, %46 ; [#uses=2]
- %122 = fmul float %48, %119 ; [#uses=1]
- %123 = fmul float %50, %120 ; [#uses=1]
- %124 = fmul float %52, %121 ; [#uses=1]
- br label %bb.nph168
-
-bb.nph168: ; preds = %bb39, %bb37
- %recip.0.0 = phi float [ 0.000000e+00, %bb37 ], [ %119, %bb39 ] ; [#uses=1]
- %recip.1.0 = phi float [ 0.000000e+00, %bb37 ], [ %120, %bb39 ] ; [#uses=1]
- %recip.2.0 = phi float [ 0.000000e+00, %bb37 ], [ %121, %bb39 ] ; [#uses=1]
- %center.0.0.0 = phi float [ %48, %bb37 ], [ %122, %bb39 ] ; [#uses=2]
- %center.0.1.0 = phi float [ %50, %bb37 ], [ %123, %bb39 ] ; [#uses=2]
- %center.0.2.0 = phi float [ %52, %bb37 ], [ %124, %bb39 ] ; [#uses=2]
- %125 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- %126 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 3 ; [#uses=5]
- %127 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 4 ; [#uses=2]
- %scevgep196 = getelementptr %struct.btQuadWord* %svertices, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep196197 = bitcast float* %scevgep196 to i8* ; [#uses=1]
- %scevgep200 = getelementptr %struct.btQuadWord* %svertices, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep200201 = bitcast float* %scevgep200 to i8* ; [#uses=1]
- br label %bb42
-
-bb42: ; preds = %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, %bb.nph168
- %i41.0167 = phi i32 [ 0, %bb.nph168 ], [ %199, %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit ] ; [#uses=2]
- %tmp194 = mul i32 %i41.0167, %stride ; [#uses=3]
- %uglygep = getelementptr i8* %0, i32 %tmp194 ; [#uses=1]
- %uglygep195 = bitcast i8* %uglygep to float* ; [#uses=1]
- %uglygep198 = getelementptr i8* %scevgep196197, i32 %tmp194 ; [#uses=1]
- %uglygep198199 = bitcast i8* %uglygep198 to float* ; [#uses=1]
- %uglygep202 = getelementptr i8* %scevgep200201, i32 %tmp194 ; [#uses=1]
- %uglygep202203 = bitcast i8* %uglygep202 to float* ; [#uses=1]
- %128 = load float* %uglygep195, align 4 ; [#uses=2]
- %129 = load float* %uglygep198199, align 4 ; [#uses=2]
- %130 = load float* %uglygep202203, align 4 ; [#uses=2]
- br i1 %19, label %bb46, label %bb45
-
-bb45: ; preds = %bb42
- %131 = fmul float %recip.0.0, %128 ; [#uses=1]
- %132 = fmul float %recip.1.0, %129 ; [#uses=1]
- %133 = fmul float %recip.2.0, %130 ; [#uses=1]
- br label %bb46
-
-bb46: ; preds = %bb45, %bb42
- %px.0 = phi float [ %131, %bb45 ], [ %128, %bb42 ] ; [#uses=4]
- %py.0 = phi float [ %132, %bb45 ], [ %129, %bb42 ] ; [#uses=4]
- %pz.0 = phi float [ %133, %bb45 ], [ %130, %bb42 ] ; [#uses=4]
- %134 = load i32* %vcount, align 4 ; [#uses=3]
- br label %bb57
-
-bb48: ; preds = %bb57
- %scevgep191192 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %165, i32 0, i32 0 ; [#uses=2]
- %scevgep190 = getelementptr %struct.btQuadWord* %vertices, i32 %165, i32 0, i32 1 ; [#uses=2]
- %scevgep189 = getelementptr %struct.btQuadWord* %vertices, i32 %165, i32 0, i32 2 ; [#uses=2]
- %135 = load float* %scevgep191192, align 4 ; [#uses=2]
- %136 = load float* %scevgep190, align 4 ; [#uses=2]
- %137 = load float* %scevgep189, align 4 ; [#uses=2]
- %138 = fsub float %135, %px.0 ; [#uses=1]
- %139 = call float @fabsf(float %138) nounwind readnone ; [#uses=1]
- %140 = fsub float %136, %py.0 ; [#uses=1]
- %141 = call float @fabsf(float %140) nounwind readnone ; [#uses=1]
- %142 = fsub float %137, %pz.0 ; [#uses=1]
- %143 = call float @fabsf(float %142) nounwind readnone ; [#uses=1]
- %144 = fcmp olt float %139, %normalepsilon ; [#uses=1]
- %145 = fcmp olt float %141, %normalepsilon ; [#uses=1]
- %or.cond118 = and i1 %144, %145 ; [#uses=1]
- %146 = fcmp olt float %143, %normalepsilon ; [#uses=1]
- %or.cond119 = and i1 %or.cond118, %146 ; [#uses=1]
- br i1 %or.cond119, label %bb54, label %bb56
-
-bb54: ; preds = %bb48
- %147 = fsub float %px.0, %center.0.0.0 ; [#uses=2]
- %148 = fsub float %py.0, %center.0.1.0 ; [#uses=2]
- %149 = fsub float %pz.0, %center.0.2.0 ; [#uses=2]
- %150 = fmul float %147, %147 ; [#uses=1]
- %151 = fmul float %148, %148 ; [#uses=1]
- %152 = fadd float %150, %151 ; [#uses=1]
- %153 = fmul float %149, %149 ; [#uses=1]
- %154 = fadd float %152, %153 ; [#uses=1]
- %155 = fsub float %135, %center.0.0.0 ; [#uses=2]
- %156 = fsub float %136, %center.0.1.0 ; [#uses=2]
- %157 = fsub float %137, %center.0.2.0 ; [#uses=2]
- %158 = fmul float %155, %155 ; [#uses=1]
- %159 = fmul float %156, %156 ; [#uses=1]
- %160 = fadd float %158, %159 ; [#uses=1]
- %161 = fmul float %157, %157 ; [#uses=1]
- %162 = fadd float %160, %161 ; [#uses=1]
- %163 = fcmp ogt float %154, %162 ; [#uses=1]
- br i1 %163, label %bb55, label %bb58
-
-bb55: ; preds = %bb54
- store float %px.0, float* %scevgep191192, align 4
- store float %py.0, float* %scevgep190, align 4
- store float %pz.0, float* %scevgep189, align 4
- %.pre = load i32* %vcount, align 4 ; [#uses=1]
- br label %bb58
-
-bb56: ; preds = %bb48
- %164 = add i32 %165, 1 ; [#uses=1]
- br label %bb57
-
-bb57: ; preds = %bb56, %bb46
- %165 = phi i32 [ 0, %bb46 ], [ %164, %bb56 ] ; [#uses=7]
- %166 = icmp ugt i32 %134, %165 ; [#uses=1]
- br i1 %166, label %bb48, label %bb58
-
-bb58: ; preds = %bb57, %bb55, %bb54
- %167 = phi i32 [ %.pre, %bb55 ], [ %134, %bb54 ], [ %134, %bb57 ] ; [#uses=4]
- %168 = icmp eq i32 %167, %165 ; [#uses=1]
- br i1 %168, label %bb59, label %bb60
-
-bb59: ; preds = %bb58
- %169 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %167, i32 0, i32 0 ; [#uses=1]
- store float %px.0, float* %169, align 4
- %170 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %167, i32 0, i32 1 ; [#uses=1]
- store float %py.0, float* %170, align 4
- %171 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %167, i32 0, i32 2 ; [#uses=1]
- store float %pz.0, float* %171, align 4
- %172 = load i32* %vcount, align 4 ; [#uses=1]
- %173 = add i32 %172, 1 ; [#uses=1]
- store i32 %173, i32* %vcount, align 4
- br label %bb60
-
-bb60: ; preds = %bb59, %bb58
- %174 = load i32* %2, align 4 ; [#uses=6]
- %175 = load i32* %125, align 4 ; [#uses=2]
- %176 = icmp eq i32 %175, %174 ; [#uses=1]
- br i1 %176, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb60
- %177 = icmp eq i32 %174, 0 ; [#uses=1]
- %178 = shl i32 %174, 1 ; [#uses=1]
- %iftmp.190.0.i.i = select i1 %177, i32 1, i32 %178 ; [#uses=4]
- %179 = icmp slt i32 %175, %iftmp.190.0.i.i ; [#uses=1]
- br i1 %179, label %bb.i.i127, label %bb1.i
-
-bb.i.i127: ; preds = %bb.i
- %180 = icmp eq i32 %iftmp.190.0.i.i, 0 ; [#uses=1]
- br i1 %180, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i128, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i127
- %181 = shl i32 %iftmp.190.0.i.i, 2 ; [#uses=1]
- %182 = call i8* @_Z22btAlignedAllocInternalji(i32 %181, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %182 to i32* ; [#uses=1]
- %.pre.i = load i32* %2, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i128
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i128: ; preds = %bb.i2.i.i, %bb.i.i127
- %183 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %174, %bb.i.i127 ] ; [#uses=2]
- %184 = phi i32* [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i127 ] ; [#uses=2]
- %185 = icmp sgt i32 %183, 0 ; [#uses=1]
- br i1 %185, label %bb.i4.i.i132, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i138
-
-bb.i4.i.i132: ; preds = %bb3.i.i.i137, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i128
- %indvar.i.i.i130 = phi i32 [ %indvar.next.i.i.i135, %bb3.i.i.i137 ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i128 ] ; [#uses=3]
- %scevgep.i.i.i131 = getelementptr i32* %184, i32 %indvar.i.i.i130 ; [#uses=2]
- %186 = icmp eq i32* %scevgep.i.i.i131, null ; [#uses=1]
- br i1 %186, label %bb3.i.i.i137, label %bb1.i5.i.i134
-
-bb1.i5.i.i134: ; preds = %bb.i4.i.i132
- %187 = load i32** %126, align 4 ; [#uses=1]
- %scevgep8.i.i.i133 = getelementptr i32* %187, i32 %indvar.i.i.i130 ; [#uses=1]
- %188 = load i32* %scevgep8.i.i.i133, align 4 ; [#uses=1]
- store i32 %188, i32* %scevgep.i.i.i131, align 4
- br label %bb3.i.i.i137
-
-bb3.i.i.i137: ; preds = %bb1.i5.i.i134, %bb.i4.i.i132
- %indvar.next.i.i.i135 = add i32 %indvar.i.i.i130, 1 ; [#uses=2]
- %exitcond184 = icmp eq i32 %indvar.next.i.i.i135, %183 ; [#uses=1]
- br i1 %exitcond184, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i138, label %bb.i4.i.i132
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i138: ; preds = %bb3.i.i.i137, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i128
- %189 = load i32** %126, align 4 ; [#uses=2]
- %190 = icmp eq i32* %189, null ; [#uses=1]
- br i1 %190, label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, label %bb.i.i.i140
-
-bb.i.i.i140: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i138
- %191 = load i8* %127, align 4 ; [#uses=1]
- %toBool.i.i.i139 = icmp eq i8 %191, 0 ; [#uses=1]
- br i1 %toBool.i.i.i139, label %bb2.i.i.i142, label %bb1.i.i.i141
-
-bb1.i.i.i141: ; preds = %bb.i.i.i140
- %192 = bitcast i32* %189 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %192)
- br label %bb2.i.i.i142
-
-bb2.i.i.i142: ; preds = %bb1.i.i.i141, %bb.i.i.i140
- store i32* null, i32** %126, align 4
- br label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i142, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i138
- store i8 1, i8* %127, align 4
- store i32* %184, i32** %126, align 4
- store i32 %iftmp.190.0.i.i, i32* %125, align 4
- %.pre5.i = load i32* %2, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, %bb.i, %bb60
- %193 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i ], [ %174, %bb60 ], [ %174, %bb.i ] ; [#uses=2]
- %194 = load i32** %126, align 4 ; [#uses=1]
- %195 = getelementptr inbounds i32* %194, i32 %193 ; [#uses=2]
- %196 = icmp eq i32* %195, null ; [#uses=1]
- br i1 %196, label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 %165, i32* %195, align 4
- %.pre6.i = load i32* %2, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit
-
-_ZN20btAlignedObjectArrayIiE9push_backERKi.exit: ; preds = %bb2.i, %bb1.i
- %197 = phi i32 [ %193, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %198 = add nsw i32 %197, 1 ; [#uses=1]
- store i32 %198, i32* %2, align 4
- %199 = add i32 %i41.0167, 1 ; [#uses=2]
- %exitcond193 = icmp eq i32 %199, %svcount ; [#uses=1]
- br i1 %exitcond193, label %bb62, label %bb42
-
-bb62: ; preds = %_ZN20btAlignedObjectArrayIiE9push_backERKi.exit
- %200 = getelementptr inbounds [3 x float]* %bmin63, i32 0, i32 0 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %200, align 4
- %201 = getelementptr inbounds [3 x float]* %bmin63, i32 0, i32 1 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %201, align 4
- %202 = getelementptr inbounds [3 x float]* %bmin63, i32 0, i32 2 ; [#uses=2]
- store float 0x47EFFFFFE0000000, float* %202, align 4
- %203 = getelementptr inbounds [3 x float]* %bmax64, i32 0, i32 0 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %203, align 4
- %204 = getelementptr inbounds [3 x float]* %bmax64, i32 0, i32 1 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %204, align 4
- %205 = getelementptr inbounds [3 x float]* %bmax64, i32 0, i32 2 ; [#uses=2]
- store float 0xC7EFFFFFE0000000, float* %205, align 4
- %206 = load i32* %vcount, align 4 ; [#uses=4]
- %207 = icmp eq i32 %206, 0 ; [#uses=1]
- br i1 %207, label %bb82, label %bb.nph163
-
-bb.nph: ; preds = %bb.nph163, %bb80
- %208 = phi float [ 0x47EFFFFFE0000000, %bb.nph163 ], [ %300, %bb80 ] ; [#uses=2]
- %209 = phi float [ 0xC7EFFFFFE0000000, %bb.nph163 ], [ %221, %bb80 ] ; [#uses=2]
- %210 = phi float [ 0x47EFFFFFE0000000, %bb.nph163 ], [ %298, %bb80 ] ; [#uses=2]
- %211 = phi float [ 0xC7EFFFFFE0000000, %bb.nph163 ], [ %295, %bb80 ] ; [#uses=2]
- %212 = phi float [ 0x47EFFFFFE0000000, %bb.nph163 ], [ %216, %bb80 ] ; [#uses=2]
- %213 = phi float [ 0xC7EFFFFFE0000000, %bb.nph163 ], [ %218, %bb80 ] ; [#uses=2]
- %i68.0162 = phi i32 [ 0, %bb.nph163 ], [ %222, %bb80 ] ; [#uses=4]
- %scevgep177.2 = getelementptr %struct.btQuadWord* %vertices, i32 %i68.0162, i32 0, i32 2 ; [#uses=1]
- %scevgep177.1 = getelementptr %struct.btQuadWord* %vertices, i32 %i68.0162, i32 0, i32 1 ; [#uses=1]
- %scevgep177 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %i68.0162, i32 0, i32 0 ; [#uses=1]
- %214 = load float* %scevgep177, align 4 ; [#uses=6]
- %215 = fcmp olt float %214, %212 ; [#uses=1]
- br i1 %215, label %bb74, label %bb75
-
-bb74: ; preds = %bb.nph
- store float %214, float* %200, align 4
- br label %bb75
-
-bb75: ; preds = %bb74, %bb.nph
- %216 = phi float [ %214, %bb74 ], [ %212, %bb.nph ] ; [#uses=2]
- %217 = fcmp ogt float %214, %213 ; [#uses=1]
- br i1 %217, label %bb77, label %bb78
-
-bb77: ; preds = %bb75
- store float %214, float* %203, align 4
- br label %bb78
-
-bb78: ; preds = %bb77, %bb75
- %218 = phi float [ %214, %bb77 ], [ %213, %bb75 ] ; [#uses=2]
- %219 = load float* %scevgep177.1, align 4 ; [#uses=6]
- %220 = fcmp olt float %219, %210 ; [#uses=1]
- br i1 %220, label %bb74.1, label %bb75.1
-
-bb80: ; preds = %bb77.2, %bb75.2
- %221 = phi float [ %296, %bb77.2 ], [ %209, %bb75.2 ] ; [#uses=2]
- %222 = add i32 %i68.0162, 1 ; [#uses=2]
- %exitcond179 = icmp eq i32 %222, %umax ; [#uses=1]
- br i1 %exitcond179, label %bb82, label %bb.nph
-
-bb.nph163: ; preds = %bb62
- %tmp178 = icmp ugt i32 %206, 1 ; [#uses=1]
- %umax = select i1 %tmp178, i32 %206, i32 1 ; [#uses=1]
- br label %bb.nph
-
-bb82: ; preds = %bb80, %bb62
- %223 = phi float [ 0x47EFFFFFE0000000, %bb62 ], [ %300, %bb80 ] ; [#uses=2]
- %224 = phi float [ 0xC7EFFFFFE0000000, %bb62 ], [ %221, %bb80 ] ; [#uses=1]
- %225 = phi float [ 0x47EFFFFFE0000000, %bb62 ], [ %298, %bb80 ] ; [#uses=2]
- %226 = phi float [ 0xC7EFFFFFE0000000, %bb62 ], [ %295, %bb80 ] ; [#uses=1]
- %227 = phi float [ 0x47EFFFFFE0000000, %bb62 ], [ %216, %bb80 ] ; [#uses=2]
- %228 = phi float [ 0xC7EFFFFFE0000000, %bb62 ], [ %218, %bb80 ] ; [#uses=1]
- %229 = fsub float %228, %227 ; [#uses=6]
- %230 = fsub float %226, %225 ; [#uses=6]
- %231 = fsub float %224, %223 ; [#uses=6]
- %232 = fcmp olt float %229, 0x3EB0C6F7A0000000 ; [#uses=2]
- %233 = fcmp olt float %230, 0x3EB0C6F7A0000000 ; [#uses=2]
- %or.cond120 = or i1 %232, %233 ; [#uses=1]
- %234 = fcmp olt float %231, 0x3EB0C6F7A0000000 ; [#uses=2]
- %or.cond121 = or i1 %or.cond120, %234 ; [#uses=1]
- %235 = icmp ult i32 %206, 3 ; [#uses=1]
- %or.cond226 = or i1 %or.cond121, %235 ; [#uses=1]
- br i1 %or.cond226, label %bb86, label %bb112
-
-bb86: ; preds = %bb82
- %236 = fmul float %229, 5.000000e-01 ; [#uses=1]
- %237 = fadd float %236, %227 ; [#uses=2]
- %238 = fmul float %230, 5.000000e-01 ; [#uses=1]
- %239 = fadd float %238, %225 ; [#uses=2]
- %240 = fmul float %231, 5.000000e-01 ; [#uses=1]
- %241 = fadd float %240, %223 ; [#uses=2]
- %.not = fcmp oge float %229, 0x3EB0C6F7A0000000 ; [#uses=1]
- %242 = fcmp olt float %229, 0x47EFFFFFE0000000 ; [#uses=1]
- %or.cond122 = and i1 %.not, %242 ; [#uses=1]
- %len87.0 = select i1 %or.cond122, float %229, float 0x47EFFFFFE0000000 ; [#uses=2]
- %.not123 = fcmp oge float %230, 0x3EB0C6F7A0000000 ; [#uses=1]
- %243 = fcmp olt float %230, %len87.0 ; [#uses=1]
- %or.cond124 = and i1 %.not123, %243 ; [#uses=1]
- %len87.1 = select i1 %or.cond124, float %230, float %len87.0 ; [#uses=2]
- %.not125 = fcmp oge float %231, 0x3EB0C6F7A0000000 ; [#uses=1]
- %244 = fcmp olt float %231, %len87.1 ; [#uses=1]
- %or.cond126 = and i1 %.not125, %244 ; [#uses=1]
- %len87.2 = select i1 %or.cond126, float %231, float %len87.1 ; [#uses=4]
- %245 = fcmp oeq float %len87.2, 0x47EFFFFFE0000000 ; [#uses=1]
- br i1 %245, label %bb110, label %bb104
-
-bb104: ; preds = %bb86
- br i1 %232, label %bb105, label %bb106
-
-bb105: ; preds = %bb104
- %246 = fmul float %len87.2, 0x3FA99999A0000000 ; [#uses=1]
- br label %bb106
-
-bb106: ; preds = %bb105, %bb104
- %dx65.1 = phi float [ %246, %bb105 ], [ %229, %bb104 ] ; [#uses=2]
- br i1 %233, label %bb107, label %bb108
-
-bb107: ; preds = %bb106
- %247 = fmul float %len87.2, 0x3FA99999A0000000 ; [#uses=1]
- br label %bb108
-
-bb108: ; preds = %bb107, %bb106
- %dy66.1 = phi float [ %247, %bb107 ], [ %230, %bb106 ] ; [#uses=2]
- br i1 %234, label %bb109, label %bb110
-
-bb109: ; preds = %bb108
- %248 = fmul float %len87.2, 0x3FA99999A0000000 ; [#uses=1]
- br label %bb110
-
-bb110: ; preds = %bb109, %bb108, %bb86
- %dx65.0 = phi float [ %dx65.1, %bb109 ], [ %dx65.1, %bb108 ], [ 0x3F847AE140000000, %bb86 ] ; [#uses=2]
- %dy66.0 = phi float [ %dy66.1, %bb109 ], [ %dy66.1, %bb108 ], [ 0x3F847AE140000000, %bb86 ] ; [#uses=2]
- %dz67.0 = phi float [ %248, %bb109 ], [ %231, %bb108 ], [ 0x3F847AE140000000, %bb86 ] ; [#uses=2]
- %249 = fsub float %237, %dx65.0 ; [#uses=4]
- %250 = fadd float %237, %dx65.0 ; [#uses=4]
- %251 = fsub float %239, %dy66.0 ; [#uses=4]
- %252 = fadd float %239, %dy66.0 ; [#uses=4]
- %253 = fsub float %241, %dz67.0 ; [#uses=4]
- %254 = fadd float %241, %dz67.0 ; [#uses=4]
- store i32 0, i32* %vcount, align 4
- %255 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %249, float* %255, align 4
- %256 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %251, float* %256, align 4
- %257 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %253, float* %257, align 4
- %258 = load i32* %vcount, align 4 ; [#uses=1]
- %259 = add i32 %258, 1 ; [#uses=4]
- store i32 %259, i32* %vcount, align 4
- %260 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %259, i32 0, i32 0 ; [#uses=1]
- store float %250, float* %260, align 4
- %261 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %259, i32 0, i32 1 ; [#uses=1]
- store float %251, float* %261, align 4
- %262 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %259, i32 0, i32 2 ; [#uses=1]
- store float %253, float* %262, align 4
- %263 = load i32* %vcount, align 4 ; [#uses=1]
- %264 = add i32 %263, 1 ; [#uses=4]
- store i32 %264, i32* %vcount, align 4
- %265 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %264, i32 0, i32 0 ; [#uses=1]
- store float %250, float* %265, align 4
- %266 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %264, i32 0, i32 1 ; [#uses=1]
- store float %252, float* %266, align 4
- %267 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %264, i32 0, i32 2 ; [#uses=1]
- store float %253, float* %267, align 4
- %268 = load i32* %vcount, align 4 ; [#uses=1]
- %269 = add i32 %268, 1 ; [#uses=4]
- store i32 %269, i32* %vcount, align 4
- %270 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %269, i32 0, i32 0 ; [#uses=1]
- store float %249, float* %270, align 4
- %271 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %269, i32 0, i32 1 ; [#uses=1]
- store float %252, float* %271, align 4
- %272 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %269, i32 0, i32 2 ; [#uses=1]
- store float %253, float* %272, align 4
- %273 = load i32* %vcount, align 4 ; [#uses=1]
- %274 = add i32 %273, 1 ; [#uses=4]
- store i32 %274, i32* %vcount, align 4
- %275 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %274, i32 0, i32 0 ; [#uses=1]
- store float %249, float* %275, align 4
- %276 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %274, i32 0, i32 1 ; [#uses=1]
- store float %251, float* %276, align 4
- %277 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %274, i32 0, i32 2 ; [#uses=1]
- store float %254, float* %277, align 4
- %278 = load i32* %vcount, align 4 ; [#uses=1]
- %279 = add i32 %278, 1 ; [#uses=4]
- store i32 %279, i32* %vcount, align 4
- %280 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %279, i32 0, i32 0 ; [#uses=1]
- store float %250, float* %280, align 4
- %281 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %279, i32 0, i32 1 ; [#uses=1]
- store float %251, float* %281, align 4
- %282 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %279, i32 0, i32 2 ; [#uses=1]
- store float %254, float* %282, align 4
- %283 = load i32* %vcount, align 4 ; [#uses=1]
- %284 = add i32 %283, 1 ; [#uses=4]
- store i32 %284, i32* %vcount, align 4
- %285 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %284, i32 0, i32 0 ; [#uses=1]
- store float %250, float* %285, align 4
- %286 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %284, i32 0, i32 1 ; [#uses=1]
- store float %252, float* %286, align 4
- %287 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %284, i32 0, i32 2 ; [#uses=1]
- store float %254, float* %287, align 4
- %288 = load i32* %vcount, align 4 ; [#uses=1]
- %289 = add i32 %288, 1 ; [#uses=4]
- store i32 %289, i32* %vcount, align 4
- %290 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %289, i32 0, i32 0 ; [#uses=1]
- store float %249, float* %290, align 4
- %291 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %289, i32 0, i32 1 ; [#uses=1]
- store float %252, float* %291, align 4
- %292 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %289, i32 0, i32 2 ; [#uses=1]
- store float %254, float* %292, align 4
- %293 = load i32* %vcount, align 4 ; [#uses=1]
- %294 = add i32 %293, 1 ; [#uses=1]
- store i32 %294, i32* %vcount, align 4
- ret i8 1
-
-bb112: ; preds = %bb82, %entry
- %.0 = phi i8 [ 0, %entry ], [ 1, %bb82 ] ; [#uses=1]
- ret i8 %.0
-
-bb78.1: ; preds = %bb77.1, %bb75.1
- %295 = phi float [ %219, %bb77.1 ], [ %211, %bb75.1 ] ; [#uses=2]
- %296 = load float* %scevgep177.2, align 4 ; [#uses=6]
- %297 = fcmp olt float %296, %208 ; [#uses=1]
- br i1 %297, label %bb74.2, label %bb75.2
-
-bb75.1: ; preds = %bb74.1, %bb78
- %298 = phi float [ %219, %bb74.1 ], [ %210, %bb78 ] ; [#uses=2]
- %299 = fcmp ogt float %219, %211 ; [#uses=1]
- br i1 %299, label %bb77.1, label %bb78.1
-
-bb74.1: ; preds = %bb78
- store float %219, float* %201, align 4
- br label %bb75.1
-
-bb77.1: ; preds = %bb75.1
- store float %219, float* %204, align 4
- br label %bb78.1
-
-bb75.2: ; preds = %bb74.2, %bb78.1
- %300 = phi float [ %296, %bb74.2 ], [ %208, %bb78.1 ] ; [#uses=2]
- %301 = fcmp ogt float %296, %209 ; [#uses=1]
- br i1 %301, label %bb77.2, label %bb80
-
-bb74.2: ; preds = %bb78.1
- store float %296, float* %202, align 4
- br label %bb75.2
-
-bb77.2: ; preds = %bb75.2
- store float %296, float* %205, align 4
- br label %bb80
-
-bb9.1: ; preds = %bb8.1, %bb7.1
- %302 = phi float [ %40, %bb8.1 ], [ %32, %bb7.1 ] ; [#uses=2]
- %303 = load float* %uglygep208209.2, align 4 ; [#uses=6]
- %304 = fcmp olt float %303, %29 ; [#uses=1]
- br i1 %304, label %bb6.2, label %bb7.2
-
-bb7.1: ; preds = %bb6.1, %bb9
- %305 = phi float [ %40, %bb6.1 ], [ %31, %bb9 ] ; [#uses=3]
- %306 = fcmp ogt float %40, %32 ; [#uses=1]
- br i1 %306, label %bb8.1, label %bb9.1
-
-bb6.1: ; preds = %bb9
- store float %40, float* %24, align 4
- br label %bb7.1
-
-bb8.1: ; preds = %bb7.1
- store float %40, float* %27, align 4
- br label %bb9.1
-
-bb7.2: ; preds = %bb6.2, %bb9.1
- %307 = phi float [ %303, %bb6.2 ], [ %29, %bb9.1 ] ; [#uses=3]
- %308 = fcmp ogt float %303, %30 ; [#uses=1]
- br i1 %308, label %bb8.2, label %bb11
-
-bb6.2: ; preds = %bb9.1
- store float %303, float* %25, align 4
- br label %bb7.2
-
-bb8.2: ; preds = %bb7.2
- store float %303, float* %28, align 4
- br label %bb11
-}
-
-; [#uses=1]
-define void @_ZN11HullLibrary16BringOutYourDeadEPK9btVector3jPS0_RjPjj(%struct.HullLibrary* nocapture %this, %struct.btQuadWord* nocapture %verts, i32 %vcount, %struct.btQuadWord* nocapture %overts, i32* nocapture %ocount, i32* nocapture %indices, i32 %indexcount) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 1 ; [#uses=5]
- %1 = load i32* %0, align 4 ; [#uses=3]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.i2.i.i, label %invcont3
-
-bb.i2.i.i: ; preds = %entry
- %3 = shl i32 %1, 2 ; [#uses=1]
- %4 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %3, i32 16)
- to label %bb7.i unwind label %lpad ; [#uses=2]
-
-bb7.i: ; preds = %bb10.i, %bb.i2.i.i
- %indvar.i = phi i32 [ %indvar.next.i, %bb10.i ], [ 0, %bb.i2.i.i ] ; [#uses=2]
- %tmp118 = shl i32 %indvar.i, 2 ; [#uses=1]
- %scevgep119 = getelementptr i8* %4, i32 %tmp118 ; [#uses=2]
- %5 = icmp eq i8* %scevgep119, null ; [#uses=1]
- br i1 %5, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- %scevgep18.i = bitcast i8* %scevgep119 to i32* ; [#uses=1]
- store i32 0, i32* %scevgep18.i, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond117 = icmp eq i32 %indvar.next.i, %1 ; [#uses=1]
- br i1 %exitcond117, label %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit, label %bb7.i
-
-_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit: ; preds = %bb10.i
- %phitmp.i.i = bitcast i8* %4 to i32* ; [#uses=3]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- %6 = icmp sgt i32 %.pre, 0 ; [#uses=1]
- br i1 %6, label %bb.nph107, label %invcont3
-
-bb.nph107: ; preds = %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit
- %7 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph107
- %i.0106 = phi i32 [ 0, %bb.nph107 ], [ %10, %bb ] ; [#uses=3]
- %scevgep114 = getelementptr i32* %phitmp.i.i, i32 %i.0106 ; [#uses=1]
- %8 = load i32** %7, align 4 ; [#uses=1]
- %scevgep115 = getelementptr i32* %8, i32 %i.0106 ; [#uses=1]
- %9 = load i32* %scevgep115, align 4 ; [#uses=1]
- store i32 %9, i32* %scevgep114, align 4
- %10 = add nsw i32 %i.0106, 1 ; [#uses=2]
- %11 = load i32* %0, align 4 ; [#uses=1]
- %12 = icmp sgt i32 %11, %10 ; [#uses=1]
- br i1 %12, label %bb, label %invcont3
-
-invcont3: ; preds = %bb, %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit, %entry
- %tmpIndices.3.1121 = phi i32* [ %phitmp.i.i, %_ZN20btAlignedObjectArrayIiE6resizeEiRKi.exit ], [ %phitmp.i.i, %bb ], [ null, %entry ] ; [#uses=5]
- %13 = icmp sgt i32 %vcount, 0 ; [#uses=1]
- br i1 %13, label %bb.i2.i.i74, label %invcont4
-
-bb.i2.i.i74: ; preds = %invcont3
- %14 = shl i32 %vcount, 2 ; [#uses=1]
- %15 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %14, i32 16)
- to label %bb7.i94 unwind label %_ZN20btAlignedObjectArrayIjED1Ev.exit ; [#uses=2]
-
-bb7.i94: ; preds = %bb10.i98, %bb.i2.i.i74
- %indvar.i91 = phi i32 [ %indvar.next.i96, %bb10.i98 ], [ 0, %bb.i2.i.i74 ] ; [#uses=2]
- %tmp111 = shl i32 %indvar.i91, 2 ; [#uses=1]
- %scevgep112 = getelementptr i8* %15, i32 %tmp111 ; [#uses=2]
- %16 = icmp eq i8* %scevgep112, null ; [#uses=1]
- br i1 %16, label %bb10.i98, label %bb8.i95
-
-bb8.i95: ; preds = %bb7.i94
- %scevgep18.i93 = bitcast i8* %scevgep112 to i32* ; [#uses=1]
- store i32 0, i32* %scevgep18.i93, align 4
- br label %bb10.i98
-
-bb10.i98: ; preds = %bb8.i95, %bb7.i94
- %indvar.next.i96 = add i32 %indvar.i91, 1 ; [#uses=2]
- %exitcond110 = icmp eq i32 %indvar.next.i96, %vcount ; [#uses=1]
- br i1 %exitcond110, label %invcont4.loopexit, label %bb7.i94
-
-invcont4.loopexit: ; preds = %bb10.i98
- %phitmp.i.i72 = bitcast i8* %15 to i32* ; [#uses=1]
- br label %invcont4
-
-invcont4: ; preds = %invcont4.loopexit, %invcont3
- %usedIndices.3.1 = phi i32* [ null, %invcont3 ], [ %phitmp.i.i72, %invcont4.loopexit ] ; [#uses=3]
- %17 = shl i32 %vcount, 2 ; [#uses=1]
- %18 = bitcast i32* %usedIndices.3.1 to i8* ; [#uses=2]
- tail call void @llvm.memset.p0i8.i32(i8* %18, i8 0, i32 %17, i32 4, i1 false)
- store i32 0, i32* %ocount, align 4
- %19 = icmp sgt i32 %indexcount, 0 ; [#uses=1]
- br i1 %19, label %bb.nph105, label %bb21
-
-bb.nph105: ; preds = %invcont4
- %20 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 1, i32 3 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb16, %bb.nph105
- %i.1104 = phi i32 [ 0, %bb.nph105 ], [ %49, %bb16 ] ; [#uses=2]
- %scevgep109 = getelementptr i32* %indices, i32 %i.1104 ; [#uses=3]
- %21 = load i32* %scevgep109, align 4 ; [#uses=5]
- %22 = getelementptr inbounds i32* %usedIndices.3.1, i32 %21 ; [#uses=2]
- %23 = load i32* %22, align 4 ; [#uses=2]
- %24 = icmp eq i32 %23, 0 ; [#uses=1]
- br i1 %24, label %bb8, label %bb7
-
-bb7: ; preds = %bb5
- %25 = add i32 %23, -1 ; [#uses=1]
- store i32 %25, i32* %scevgep109, align 4
- br label %bb16
-
-bb8: ; preds = %bb5
- %26 = load i32* %ocount, align 4 ; [#uses=1]
- store i32 %26, i32* %scevgep109, align 4
- %27 = load i32* %ocount, align 4 ; [#uses=1]
- %28 = getelementptr inbounds %struct.btQuadWord* %overts, i32 %27, i32 0, i32 0 ; [#uses=1]
- %29 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %21, i32 0, i32 0 ; [#uses=1]
- %30 = load float* %29, align 4 ; [#uses=1]
- store float %30, float* %28, align 4
- %31 = load i32* %ocount, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %21, i32 0, i32 1 ; [#uses=1]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %overts, i32 %31, i32 0, i32 1 ; [#uses=1]
- store float %33, float* %34, align 4
- %35 = load i32* %ocount, align 4 ; [#uses=1]
- %36 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %21, i32 0, i32 2 ; [#uses=1]
- %37 = load float* %36, align 4 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %overts, i32 %35, i32 0, i32 2 ; [#uses=1]
- store float %37, float* %38, align 4
- %39 = load i32* %0, align 4 ; [#uses=1]
- %40 = icmp sgt i32 %39, 0 ; [#uses=1]
- br i1 %40, label %bb9, label %bb15
-
-bb9: ; preds = %bb12, %bb8
- %k.0103 = phi i32 [ %tmp, %bb12 ], [ 0, %bb8 ] ; [#uses=3]
- %scevgep108 = getelementptr i32* %tmpIndices.3.1121, i32 %k.0103 ; [#uses=1]
- %tmp = add i32 %k.0103, 1 ; [#uses=2]
- %41 = load i32* %scevgep108, align 4 ; [#uses=1]
- %42 = icmp eq i32 %41, %21 ; [#uses=1]
- br i1 %42, label %bb11, label %bb12
-
-bb11: ; preds = %bb9
- %43 = load i32** %20, align 4 ; [#uses=1]
- %44 = load i32* %ocount, align 4 ; [#uses=1]
- %scevgep = getelementptr i32* %43, i32 %k.0103 ; [#uses=1]
- store i32 %44, i32* %scevgep, align 4
- br label %bb12
-
-bb12: ; preds = %bb11, %bb9
- %45 = load i32* %0, align 4 ; [#uses=1]
- %46 = icmp sgt i32 %45, %tmp ; [#uses=1]
- br i1 %46, label %bb9, label %bb15
-
-bb15: ; preds = %bb12, %bb8
- %47 = load i32* %ocount, align 4 ; [#uses=1]
- %48 = add i32 %47, 1 ; [#uses=2]
- store i32 %48, i32* %ocount, align 4
- store i32 %48, i32* %22, align 4
- br label %bb16
-
-bb16: ; preds = %bb15, %bb7
- %49 = add nsw i32 %i.1104, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %49, %indexcount ; [#uses=1]
- br i1 %exitcond, label %bb21, label %bb5
-
-bb21: ; preds = %bb16, %invcont4
- %50 = icmp eq i32* %usedIndices.3.1, null ; [#uses=1]
- br i1 %50, label %bb28, label %bb1.i.i.i65
-
-bb1.i.i.i65: ; preds = %bb21
- invoke void @_Z21btAlignedFreeInternalPv(i8* %18)
- to label %bb28 unwind label %lpad
-
-invcont26: ; preds = %bb1.i.i.i, %ppad
- tail call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb28: ; preds = %bb1.i.i.i65, %bb21
- %51 = icmp eq i32* %tmpIndices.3.1121, null ; [#uses=1]
- br i1 %51, label %_ZN20btAlignedObjectArrayIiED1Ev.exit62, label %bb2.i.i.i61
-
-bb2.i.i.i61: ; preds = %bb28
- %52 = bitcast i32* %tmpIndices.3.1121 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %52)
- ret void
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit62: ; preds = %bb28
- ret void
-
-lpad: ; preds = %bb1.i.i.i65, %bb.i2.i.i
- %tmpIndices.3.2 = phi i32* [ %tmpIndices.3.1121, %bb1.i.i.i65 ], [ null, %bb.i2.i.i ] ; [#uses=1]
- %eh_ptr = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select30 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-_ZN20btAlignedObjectArrayIjED1Ev.exit: ; preds = %bb.i2.i.i74
- %eh_ptr32 = tail call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select34 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr32, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad39: ; preds = %bb1.i.i.i
- %eh_ptr40 = tail call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select42 = tail call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr40, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- tail call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIjED1Ev.exit, %lpad
- %tmpIndices.3.3 = phi i32* [ %tmpIndices.3.2, %lpad ], [ %tmpIndices.3.1121, %_ZN20btAlignedObjectArrayIjED1Ev.exit ] ; [#uses=2]
- %eh_exception.0 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr32, %_ZN20btAlignedObjectArrayIjED1Ev.exit ] ; [#uses=1]
- %53 = icmp eq i32* %tmpIndices.3.3, null ; [#uses=1]
- br i1 %53, label %invcont26, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %ppad
- %54 = bitcast i32* %tmpIndices.3.3 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %54)
- to label %invcont26 unwind label %lpad39
-}
-
-; [#uses=0]
-define void @_Z11ReleaseHullR11PHullResult(%struct.PHullResult* nocapture %result) {
-entry:
- %0 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 4, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 4, i32 3 ; [#uses=3]
- %4 = load i32** %3, align 4 ; [#uses=2]
- %5 = icmp eq i32* %4, null ; [#uses=1]
- br i1 %5, label %_ZN20btAlignedObjectArrayIjE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %bb
- %6 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 4, i32 4 ; [#uses=1]
- %7 = load i8* %6, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %7, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %8 = bitcast i32* %4 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %8)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store i32* null, i32** %3, align 4
- br label %_ZN20btAlignedObjectArrayIjE5clearEv.exit
-
-_ZN20btAlignedObjectArrayIjE5clearEv.exit: ; preds = %bb2.i.i, %bb
- %9 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 4, i32 4 ; [#uses=1]
- store i8 1, i8* %9, align 4
- store i32* null, i32** %3, align 4
- store i32 0, i32* %0, align 4
- %10 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 4, i32 2 ; [#uses=1]
- store i32 0, i32* %10, align 4
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayIjE5clearEv.exit, %entry
- %11 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 0 ; [#uses=1]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 3 ; [#uses=1]
- store %struct.btQuadWord* null, %struct.btQuadWord** %13, align 4
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN11HullLibrary13ReleaseResultER10HullResult(%struct.HullLibrary* nocapture %this, %struct.HullResult* nocapture %result) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- %3 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2, i32 3 ; [#uses=3]
- %5 = load %struct.btQuadWord** %4, align 4 ; [#uses=2]
- %6 = icmp eq %struct.btQuadWord* %5, null ; [#uses=1]
- br i1 %6, label %_ZN20btAlignedObjectArrayI9btVector3E5clearEv.exit, label %bb.i.i7
-
-bb.i.i7: ; preds = %bb
- %7 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2, i32 4 ; [#uses=1]
- %8 = load i8* %7, align 4 ; [#uses=1]
- %toBool.i.i6 = icmp eq i8 %8, 0 ; [#uses=1]
- br i1 %toBool.i.i6, label %bb2.i.i9, label %bb1.i.i8
-
-bb1.i.i8: ; preds = %bb.i.i7
- %9 = bitcast %struct.btQuadWord* %5 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %9)
- br label %bb2.i.i9
-
-bb2.i.i9: ; preds = %bb1.i.i8, %bb.i.i7
- store %struct.btQuadWord* null, %struct.btQuadWord** %4, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3E5clearEv.exit
-
-_ZN20btAlignedObjectArrayI9btVector3E5clearEv.exit: ; preds = %bb2.i.i9, %bb
- %10 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2, i32 4 ; [#uses=1]
- store i8 1, i8* %10, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %4, align 4
- store i32 0, i32* %0, align 4
- %11 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2, i32 2 ; [#uses=1]
- store i32 0, i32* %11, align 4
- br label %bb1
-
-bb1: ; preds = %_ZN20btAlignedObjectArrayI9btVector3E5clearEv.exit, %entry
- %12 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 1 ; [#uses=2]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = icmp eq i32 %13, 0 ; [#uses=1]
- br i1 %14, label %bb4, label %bb3
-
-bb3: ; preds = %bb1
- %15 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %15, align 4
- %16 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 3 ; [#uses=3]
- %17 = load i32** %16, align 4 ; [#uses=2]
- %18 = icmp eq i32* %17, null ; [#uses=1]
- br i1 %18, label %_ZN20btAlignedObjectArrayIjE5clearEv.exit, label %bb.i.i
-
-bb.i.i: ; preds = %bb3
- %19 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 4 ; [#uses=1]
- %20 = load i8* %19, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %20, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %21 = bitcast i32* %17 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %21)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store i32* null, i32** %16, align 4
- br label %_ZN20btAlignedObjectArrayIjE5clearEv.exit
-
-_ZN20btAlignedObjectArrayIjE5clearEv.exit: ; preds = %bb2.i.i, %bb3
- %22 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 4 ; [#uses=1]
- store i8 1, i8* %22, align 4
- store i32* null, i32** %16, align 4
- store i32 0, i32* %12, align 4
- %23 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 2 ; [#uses=1]
- store i32 0, i32* %23, align 4
- ret i32 0
-
-bb4: ; preds = %bb1
- ret i32 0
-}
-
-; [#uses=7]
-define %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* nocapture %this, i32 %a, i32 %b, i32 %c) align 2 {
-entry:
- %0 = tail call i8* @_Z22btAlignedAllocInternalji(i32 36, i32 16) ; [#uses=11]
- %1 = bitcast i8* %0 to %struct.btHullTriangle* ; [#uses=2]
- %2 = icmp eq i8* %0, null ; [#uses=1]
- br i1 %2, label %bb2, label %bb
-
-bb: ; preds = %entry
- %3 = bitcast i8* %0 to i32* ; [#uses=1]
- store i32 %a, i32* %3, align 4
- %4 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %5 = bitcast i8* %4 to i32* ; [#uses=1]
- store i32 %b, i32* %5, align 4
- %6 = getelementptr inbounds i8* %0, i32 8 ; [#uses=1]
- %7 = bitcast i8* %6 to i32* ; [#uses=1]
- store i32 %c, i32* %7, align 4
- %8 = getelementptr inbounds i8* %0, i32 12 ; [#uses=1]
- %9 = bitcast i8* %8 to i32* ; [#uses=1]
- store i32 -1, i32* %9, align 4
- %10 = getelementptr inbounds i8* %0, i32 16 ; [#uses=1]
- %11 = bitcast i8* %10 to i32* ; [#uses=1]
- store i32 -1, i32* %11, align 4
- %12 = getelementptr inbounds i8* %0, i32 20 ; [#uses=1]
- %13 = bitcast i8* %12 to i32* ; [#uses=1]
- store i32 -1, i32* %13, align 4
- %14 = getelementptr inbounds i8* %0, i32 28 ; [#uses=1]
- %15 = bitcast i8* %14 to i32* ; [#uses=1]
- store i32 -1, i32* %15, align 4
- %16 = getelementptr inbounds i8* %0, i32 32 ; [#uses=1]
- %17 = bitcast i8* %16 to float* ; [#uses=1]
- store float 0.000000e+00, float* %17, align 4
- br label %bb2
-
-bb2: ; preds = %bb, %entry
- %18 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 1 ; [#uses=6]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds i8* %0, i32 24 ; [#uses=1]
- %21 = bitcast i8* %20 to i32* ; [#uses=1]
- store i32 %19, i32* %21, align 4
- %22 = load i32* %18, align 4 ; [#uses=6]
- %23 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 2 ; [#uses=2]
- %24 = load i32* %23, align 4 ; [#uses=2]
- %25 = icmp eq i32 %24, %22 ; [#uses=1]
- br i1 %25, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb2
- %26 = icmp eq i32 %22, 0 ; [#uses=1]
- %27 = shl i32 %22, 1 ; [#uses=1]
- %iftmp.185.0.i.i = select i1 %26, i32 1, i32 %27 ; [#uses=4]
- %28 = icmp slt i32 %24, %iftmp.185.0.i.i ; [#uses=1]
- br i1 %28, label %bb.i.i, label %bb1.i
-
-bb.i.i: ; preds = %bb.i
- %29 = icmp eq i32 %iftmp.185.0.i.i, 0 ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i
- %30 = shl i32 %iftmp.185.0.i.i, 2 ; [#uses=1]
- %31 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %30, i32 16) ; [#uses=1]
- %phitmp.i.i = bitcast i8* %31 to %struct.btHullTriangle** ; [#uses=1]
- %.pre.i = load i32* %18, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i: ; preds = %bb.i2.i.i, %bb.i.i
- %32 = phi i32 [ %.pre.i, %bb.i2.i.i ], [ %22, %bb.i.i ] ; [#uses=2]
- %33 = phi %struct.btHullTriangle** [ %phitmp.i.i, %bb.i2.i.i ], [ null, %bb.i.i ] ; [#uses=2]
- %34 = icmp sgt i32 %32, 0 ; [#uses=1]
- br i1 %34, label %bb.nph.i.i.i, label %_ZNK20btAlignedObjectArrayIP14btHullTriangleE4copyEiiPS1_.exit.i.i
-
-bb.nph.i.i.i: ; preds = %_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i
- %35 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %bb.nph.i.i.i
- %indvar.i.i.i = phi i32 [ 0, %bb.nph.i.i.i ], [ %indvar.next.i.i.i, %bb3.i.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr %struct.btHullTriangle** %33, i32 %indvar.i.i.i ; [#uses=2]
- %36 = icmp eq %struct.btHullTriangle** %scevgep.i.i.i, null ; [#uses=1]
- br i1 %36, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %37 = load %struct.btHullTriangle*** %35, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr %struct.btHullTriangle** %37, i32 %indvar.i.i.i ; [#uses=1]
- %38 = load %struct.btHullTriangle** %scevgep8.i.i.i, align 4 ; [#uses=1]
- store %struct.btHullTriangle* %38, %struct.btHullTriangle** %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i.i.i, %32 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayIP14btHullTriangleE4copyEiiPS1_.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIP14btHullTriangleE4copyEiiPS1_.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i
- %39 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=3]
- %40 = load %struct.btHullTriangle*** %39, align 4 ; [#uses=2]
- %41 = icmp eq %struct.btHullTriangle** %40, null ; [#uses=1]
- br i1 %41, label %_ZN20btAlignedObjectArrayIP14btHullTriangleE10deallocateEv.exit.i.i, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %_ZNK20btAlignedObjectArrayIP14btHullTriangleE4copyEiiPS1_.exit.i.i
- %42 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %43 = load i8* %42, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %43, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %44 = bitcast %struct.btHullTriangle** %40 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %44)
- br label %bb2.i.i.i
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %39, align 4
- br label %_ZN20btAlignedObjectArrayIP14btHullTriangleE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIP14btHullTriangleE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i, %_ZNK20btAlignedObjectArrayIP14btHullTriangleE4copyEiiPS1_.exit.i.i
- %45 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %45, align 4
- store %struct.btHullTriangle** %33, %struct.btHullTriangle*** %39, align 4
- store i32 %iftmp.185.0.i.i, i32* %23, align 4
- %.pre5.i = load i32* %18, align 4 ; [#uses=1]
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIP14btHullTriangleE10deallocateEv.exit.i.i, %bb.i, %bb2
- %46 = phi i32 [ %.pre5.i, %_ZN20btAlignedObjectArrayIP14btHullTriangleE10deallocateEv.exit.i.i ], [ %22, %bb2 ], [ %22, %bb.i ] ; [#uses=2]
- %47 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %48 = load %struct.btHullTriangle*** %47, align 4 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btHullTriangle** %48, i32 %46 ; [#uses=2]
- %50 = icmp eq %struct.btHullTriangle** %49, null ; [#uses=1]
- br i1 %50, label %_ZN20btAlignedObjectArrayIP14btHullTriangleE9push_backERKS1_.exit, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store %struct.btHullTriangle* %1, %struct.btHullTriangle** %49, align 4
- %.pre6.i = load i32* %18, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIP14btHullTriangleE9push_backERKS1_.exit
-
-_ZN20btAlignedObjectArrayIP14btHullTriangleE9push_backERKS1_.exit: ; preds = %bb2.i, %bb1.i
- %51 = phi i32 [ %46, %bb1.i ], [ %.pre6.i, %bb2.i ] ; [#uses=1]
- %52 = add nsw i32 %51, 1 ; [#uses=1]
- store i32 %52, i32* %18, align 4
- ret %struct.btHullTriangle* %1
-}
-
-; [#uses=0]
-define void @_ZN11HullLibrary18deAllocateTriangleEP14btHullTriangle(%struct.HullLibrary* nocapture %this, %struct.btHullTriangle* %tri) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHullTriangle* %tri, i32 0, i32 2 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %3 = load %struct.btHullTriangle*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btHullTriangle** %3, i32 %1 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %4, align 4
- %5 = bitcast %struct.btHullTriangle* %tri to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %5)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN11HullLibrary9removeb2bEP14btHullTriangleS1_(%struct.HullLibrary* nocapture %this, %struct.btHullTriangle* %s, %struct.btHullTriangle* %t) align 2 {
-entry:
- tail call void @_ZN11HullLibrary6b2bfixEP14btHullTriangleS1_(%struct.HullLibrary* %this, %struct.btHullTriangle* %s, %struct.btHullTriangle* %t)
- %0 = getelementptr inbounds %struct.btHullTriangle* %s, i32 0, i32 2 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=2]
- %3 = load %struct.btHullTriangle*** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btHullTriangle** %3, i32 %1 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %4, align 4
- %5 = bitcast %struct.btHullTriangle* %s to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %5)
- %6 = getelementptr inbounds %struct.btHullTriangle* %t, i32 0, i32 2 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = load %struct.btHullTriangle*** %2, align 4 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btHullTriangle** %8, i32 %7 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %9, align 4
- %10 = bitcast %struct.btHullTriangle* %t to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %10)
- ret void
-}
-
-; [#uses=2]
-define void @_ZN11HullLibrary7extrudeEP14btHullTrianglei(%struct.HullLibrary* nocapture %this, %struct.btHullTriangle* %t0, i32 %v) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btHullTriangle* %t0, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = getelementptr inbounds %struct.btHullTriangle* %t0, i32 0, i32 0, i32 1 ; [#uses=1]
- %3 = load i32* %2, align 4 ; [#uses=6]
- %4 = getelementptr inbounds %struct.btHullTriangle* %t0, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=6]
- %6 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=5]
- %8 = tail call %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* %this, i32 %v, i32 %3, i32 %5) ; [#uses=6]
- %9 = add nsw i32 %7, 2 ; [#uses=3]
- %10 = add nsw i32 %7, 1 ; [#uses=3]
- %11 = getelementptr inbounds %struct.btHullTriangle* %t0, i32 0, i32 1, i32 0 ; [#uses=4]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btHullTriangle* %8, i32 0, i32 1, i32 0 ; [#uses=2]
- store i32 %12, i32* %13, align 4
- %14 = getelementptr inbounds %struct.btHullTriangle* %8, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 %10, i32* %14, align 4
- %15 = getelementptr inbounds %struct.btHullTriangle* %8, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 %9, i32* %15, align 4
- %16 = load i32* %11, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=13]
- %18 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btHullTriangle** %18, i32 %16 ; [#uses=1]
- %20 = load %struct.btHullTriangle** %19, align 4 ; [#uses=4]
- %this21.i = bitcast %struct.btHullTriangle* %20 to i8* ; [#uses=1]
- %21 = getelementptr inbounds %struct.btHullTriangle* %20, i32 0, i32 0, i32 0 ; [#uses=2]
- br label %bb14.i
-
-bb.i13: ; preds = %bb14.i
- %tmp79 = shl i32 %37, 2 ; [#uses=1]
- %uglygep80 = getelementptr i8* %this21.i, i32 %tmp79 ; [#uses=1]
- %uglygep23.i = bitcast i8* %uglygep80 to i32* ; [#uses=1]
- %tmp20.i = add i32 %37, 1 ; [#uses=3]
- %tmp.i = add i32 %37, 2 ; [#uses=1]
- %22 = srem i32 %tmp20.i, 3 ; [#uses=2]
- %23 = srem i32 %tmp.i, 3 ; [#uses=2]
- %24 = load i32* %uglygep23.i, align 4 ; [#uses=2]
- %25 = icmp eq i32 %24, %3 ; [#uses=1]
- br i1 %25, label %bb1.i14, label %bb3.i
-
-bb1.i14: ; preds = %bb.i13
- %26 = getelementptr inbounds i32* %21, i32 %22 ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = icmp eq i32 %27, %5 ; [#uses=1]
- br i1 %28, label %bb5.i, label %bb3.i
-
-bb3.i: ; preds = %bb1.i14, %bb.i13
- %29 = icmp eq i32 %24, %5 ; [#uses=1]
- br i1 %29, label %bb7.i, label %bb14.i
-
-bb5.i: ; preds = %bb1.i14
- %30 = getelementptr inbounds %struct.btHullTriangle* %20, i32 0, i32 1, i32 0 ; [#uses=1]
- %31 = getelementptr inbounds i32* %30, i32 %23 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit
-
-bb7.i: ; preds = %bb3.i
- %32 = getelementptr inbounds i32* %21, i32 %22 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = icmp eq i32 %33, %3 ; [#uses=1]
- br i1 %34, label %bb12.i, label %bb14.i
-
-bb12.i: ; preds = %bb7.i
- %35 = getelementptr inbounds %struct.btHullTriangle* %20, i32 0, i32 1, i32 0 ; [#uses=1]
- %36 = getelementptr inbounds i32* %35, i32 %23 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit
-
-bb14.i: ; preds = %bb7.i, %bb3.i, %entry
- %37 = phi i32 [ 0, %entry ], [ %tmp20.i, %bb3.i ], [ %tmp20.i, %bb7.i ] ; [#uses=4]
- %38 = icmp slt i32 %37, 3 ; [#uses=1]
- br i1 %38, label %bb.i13, label %_ZN14btHullTriangle4neibEii.exit
-
-_ZN14btHullTriangle4neibEii.exit: ; preds = %bb14.i, %bb12.i, %bb5.i
- %39 = phi i32* [ %36, %bb12.i ], [ %31, %bb5.i ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i ] ; [#uses=1]
- store i32 %7, i32* %39, align 4
- %40 = tail call %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* %this, i32 %v, i32 %5, i32 %1) ; [#uses=6]
- %41 = getelementptr inbounds i32* %11, i32 1 ; [#uses=2]
- %42 = load i32* %41, align 4 ; [#uses=1]
- %43 = getelementptr inbounds %struct.btHullTriangle* %40, i32 0, i32 1, i32 0 ; [#uses=2]
- store i32 %42, i32* %43, align 4
- %44 = getelementptr inbounds %struct.btHullTriangle* %40, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 %9, i32* %44, align 4
- %45 = getelementptr inbounds %struct.btHullTriangle* %40, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 %7, i32* %45, align 4
- %46 = load i32* %41, align 4 ; [#uses=1]
- %47 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btHullTriangle** %47, i32 %46 ; [#uses=1]
- %49 = load %struct.btHullTriangle** %48, align 4 ; [#uses=4]
- %this21.i35 = bitcast %struct.btHullTriangle* %49 to i8* ; [#uses=1]
- %50 = getelementptr inbounds %struct.btHullTriangle* %49, i32 0, i32 0, i32 0 ; [#uses=2]
- br label %bb14.i47
-
-bb.i41: ; preds = %bb14.i47
- %tmp72 = shl i32 %66, 2 ; [#uses=1]
- %uglygep73 = getelementptr i8* %this21.i35, i32 %tmp72 ; [#uses=1]
- %uglygep23.i38 = bitcast i8* %uglygep73 to i32* ; [#uses=1]
- %tmp20.i39 = add i32 %66, 1 ; [#uses=3]
- %tmp.i40 = add i32 %66, 2 ; [#uses=1]
- %51 = srem i32 %tmp20.i39, 3 ; [#uses=2]
- %52 = srem i32 %tmp.i40, 3 ; [#uses=2]
- %53 = load i32* %uglygep23.i38, align 4 ; [#uses=2]
- %54 = icmp eq i32 %53, %5 ; [#uses=1]
- br i1 %54, label %bb1.i42, label %bb3.i43
-
-bb1.i42: ; preds = %bb.i41
- %55 = getelementptr inbounds i32* %50, i32 %51 ; [#uses=1]
- %56 = load i32* %55, align 4 ; [#uses=1]
- %57 = icmp eq i32 %56, %1 ; [#uses=1]
- br i1 %57, label %bb5.i44, label %bb3.i43
-
-bb3.i43: ; preds = %bb1.i42, %bb.i41
- %58 = icmp eq i32 %53, %1 ; [#uses=1]
- br i1 %58, label %bb7.i45, label %bb14.i47
-
-bb5.i44: ; preds = %bb1.i42
- %59 = getelementptr inbounds %struct.btHullTriangle* %49, i32 0, i32 1, i32 0 ; [#uses=1]
- %60 = getelementptr inbounds i32* %59, i32 %52 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit49
-
-bb7.i45: ; preds = %bb3.i43
- %61 = getelementptr inbounds i32* %50, i32 %51 ; [#uses=1]
- %62 = load i32* %61, align 4 ; [#uses=1]
- %63 = icmp eq i32 %62, %5 ; [#uses=1]
- br i1 %63, label %bb12.i46, label %bb14.i47
-
-bb12.i46: ; preds = %bb7.i45
- %64 = getelementptr inbounds %struct.btHullTriangle* %49, i32 0, i32 1, i32 0 ; [#uses=1]
- %65 = getelementptr inbounds i32* %64, i32 %52 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit49
-
-bb14.i47: ; preds = %bb7.i45, %bb3.i43, %_ZN14btHullTriangle4neibEii.exit
- %66 = phi i32 [ 0, %_ZN14btHullTriangle4neibEii.exit ], [ %tmp20.i39, %bb3.i43 ], [ %tmp20.i39, %bb7.i45 ] ; [#uses=4]
- %67 = icmp slt i32 %66, 3 ; [#uses=1]
- br i1 %67, label %bb.i41, label %_ZN14btHullTriangle4neibEii.exit49
-
-_ZN14btHullTriangle4neibEii.exit49: ; preds = %bb14.i47, %bb12.i46, %bb5.i44
- %68 = phi i32* [ %65, %bb12.i46 ], [ %60, %bb5.i44 ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i47 ] ; [#uses=1]
- store i32 %10, i32* %68, align 4
- %69 = tail call %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* %this, i32 %v, i32 %1, i32 %3) ; [#uses=6]
- %70 = getelementptr inbounds i32* %11, i32 2 ; [#uses=2]
- %71 = load i32* %70, align 4 ; [#uses=1]
- %72 = getelementptr inbounds %struct.btHullTriangle* %69, i32 0, i32 1, i32 0 ; [#uses=2]
- store i32 %71, i32* %72, align 4
- %73 = getelementptr inbounds %struct.btHullTriangle* %69, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 %7, i32* %73, align 4
- %74 = getelementptr inbounds %struct.btHullTriangle* %69, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 %10, i32* %74, align 4
- %75 = load i32* %70, align 4 ; [#uses=1]
- %76 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btHullTriangle** %76, i32 %75 ; [#uses=1]
- %78 = load %struct.btHullTriangle** %77, align 4 ; [#uses=4]
- %this21.i20 = bitcast %struct.btHullTriangle* %78 to i8* ; [#uses=1]
- %79 = getelementptr inbounds %struct.btHullTriangle* %78, i32 0, i32 0, i32 0 ; [#uses=2]
- br label %bb14.i32
-
-bb.i26: ; preds = %bb14.i32
- %tmp = shl i32 %95, 2 ; [#uses=1]
- %uglygep = getelementptr i8* %this21.i20, i32 %tmp ; [#uses=1]
- %uglygep23.i23 = bitcast i8* %uglygep to i32* ; [#uses=1]
- %tmp20.i24 = add i32 %95, 1 ; [#uses=3]
- %tmp.i25 = add i32 %95, 2 ; [#uses=1]
- %80 = srem i32 %tmp20.i24, 3 ; [#uses=2]
- %81 = srem i32 %tmp.i25, 3 ; [#uses=2]
- %82 = load i32* %uglygep23.i23, align 4 ; [#uses=2]
- %83 = icmp eq i32 %82, %1 ; [#uses=1]
- br i1 %83, label %bb1.i27, label %bb3.i28
-
-bb1.i27: ; preds = %bb.i26
- %84 = getelementptr inbounds i32* %79, i32 %80 ; [#uses=1]
- %85 = load i32* %84, align 4 ; [#uses=1]
- %86 = icmp eq i32 %85, %3 ; [#uses=1]
- br i1 %86, label %bb5.i29, label %bb3.i28
-
-bb3.i28: ; preds = %bb1.i27, %bb.i26
- %87 = icmp eq i32 %82, %3 ; [#uses=1]
- br i1 %87, label %bb7.i30, label %bb14.i32
-
-bb5.i29: ; preds = %bb1.i27
- %88 = getelementptr inbounds %struct.btHullTriangle* %78, i32 0, i32 1, i32 0 ; [#uses=1]
- %89 = getelementptr inbounds i32* %88, i32 %81 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit34
-
-bb7.i30: ; preds = %bb3.i28
- %90 = getelementptr inbounds i32* %79, i32 %80 ; [#uses=1]
- %91 = load i32* %90, align 4 ; [#uses=1]
- %92 = icmp eq i32 %91, %1 ; [#uses=1]
- br i1 %92, label %bb12.i31, label %bb14.i32
-
-bb12.i31: ; preds = %bb7.i30
- %93 = getelementptr inbounds %struct.btHullTriangle* %78, i32 0, i32 1, i32 0 ; [#uses=1]
- %94 = getelementptr inbounds i32* %93, i32 %81 ; [#uses=1]
- br label %_ZN14btHullTriangle4neibEii.exit34
-
-bb14.i32: ; preds = %bb7.i30, %bb3.i28, %_ZN14btHullTriangle4neibEii.exit49
- %95 = phi i32 [ 0, %_ZN14btHullTriangle4neibEii.exit49 ], [ %tmp20.i24, %bb3.i28 ], [ %tmp20.i24, %bb7.i30 ] ; [#uses=4]
- %96 = icmp slt i32 %95, 3 ; [#uses=1]
- br i1 %96, label %bb.i26, label %_ZN14btHullTriangle4neibEii.exit34
-
-_ZN14btHullTriangle4neibEii.exit34: ; preds = %bb14.i32, %bb12.i31, %bb5.i29
- %97 = phi i32* [ %94, %bb12.i31 ], [ %89, %bb5.i29 ], [ @_ZZN14btHullTriangle4neibEiiE2er, %bb14.i32 ] ; [#uses=1]
- store i32 %9, i32* %97, align 4
- %98 = load i32* %13, align 4 ; [#uses=1]
- %99 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=2]
- %100 = getelementptr inbounds %struct.btHullTriangle** %99, i32 %98 ; [#uses=1]
- %101 = load %struct.btHullTriangle** %100, align 4 ; [#uses=4]
- %102 = getelementptr inbounds %struct.btHullTriangle* %101, i32 0, i32 0, i32 0 ; [#uses=3]
- %103 = load i32* %102, align 4 ; [#uses=1]
- %104 = icmp eq i32 %103, %v ; [#uses=1]
- br i1 %104, label %bb, label %bb.i15
-
-bb.i15: ; preds = %_ZN14btHullTriangle4neibEii.exit34
- %105 = getelementptr inbounds i32* %102, i32 1 ; [#uses=1]
- %106 = load i32* %105, align 4 ; [#uses=1]
- %107 = icmp eq i32 %106, %v ; [#uses=1]
- br i1 %107, label %bb, label %_Z7hasvertRK4int3i.exit19
-
-_Z7hasvertRK4int3i.exit19: ; preds = %bb.i15
- %108 = getelementptr inbounds i32* %102, i32 2 ; [#uses=1]
- %109 = load i32* %108, align 4 ; [#uses=1]
- %phitmp = icmp eq i32 %109, %v ; [#uses=1]
- br i1 %phitmp, label %bb, label %bb1
-
-bb: ; preds = %_Z7hasvertRK4int3i.exit19, %bb.i15, %_ZN14btHullTriangle4neibEii.exit34
- tail call void @_ZN11HullLibrary6b2bfixEP14btHullTriangleS1_(%struct.HullLibrary* %this, %struct.btHullTriangle* %8, %struct.btHullTriangle* %101)
- %110 = getelementptr inbounds %struct.btHullTriangle* %8, i32 0, i32 2 ; [#uses=1]
- %111 = load i32* %110, align 4 ; [#uses=1]
- %112 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %113 = getelementptr inbounds %struct.btHullTriangle** %112, i32 %111 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %113, align 4
- %114 = bitcast %struct.btHullTriangle* %8 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %114)
- %115 = getelementptr inbounds %struct.btHullTriangle* %101, i32 0, i32 2 ; [#uses=1]
- %116 = load i32* %115, align 4 ; [#uses=1]
- %117 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %118 = getelementptr inbounds %struct.btHullTriangle** %117, i32 %116 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %118, align 4
- %119 = bitcast %struct.btHullTriangle* %101 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %119)
- %.pre = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb, %_Z7hasvertRK4int3i.exit19
- %120 = phi %struct.btHullTriangle** [ %99, %_Z7hasvertRK4int3i.exit19 ], [ %.pre, %bb ] ; [#uses=2]
- %121 = load i32* %43, align 4 ; [#uses=1]
- %122 = getelementptr inbounds %struct.btHullTriangle** %120, i32 %121 ; [#uses=1]
- %123 = load %struct.btHullTriangle** %122, align 4 ; [#uses=4]
- %124 = getelementptr inbounds %struct.btHullTriangle* %123, i32 0, i32 0, i32 0 ; [#uses=3]
- %125 = load i32* %124, align 4 ; [#uses=1]
- %126 = icmp eq i32 %125, %v ; [#uses=1]
- br i1 %126, label %bb3, label %bb.i8
-
-bb.i8: ; preds = %bb1
- %127 = getelementptr inbounds i32* %124, i32 1 ; [#uses=1]
- %128 = load i32* %127, align 4 ; [#uses=1]
- %129 = icmp eq i32 %128, %v ; [#uses=1]
- br i1 %129, label %bb3, label %_Z7hasvertRK4int3i.exit12
-
-_Z7hasvertRK4int3i.exit12: ; preds = %bb.i8
- %130 = getelementptr inbounds i32* %124, i32 2 ; [#uses=1]
- %131 = load i32* %130, align 4 ; [#uses=1]
- %phitmp59 = icmp eq i32 %131, %v ; [#uses=1]
- br i1 %phitmp59, label %bb3, label %bb4
-
-bb3: ; preds = %_Z7hasvertRK4int3i.exit12, %bb.i8, %bb1
- tail call void @_ZN11HullLibrary6b2bfixEP14btHullTriangleS1_(%struct.HullLibrary* %this, %struct.btHullTriangle* %40, %struct.btHullTriangle* %123)
- %132 = getelementptr inbounds %struct.btHullTriangle* %40, i32 0, i32 2 ; [#uses=1]
- %133 = load i32* %132, align 4 ; [#uses=1]
- %134 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btHullTriangle** %134, i32 %133 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %135, align 4
- %136 = bitcast %struct.btHullTriangle* %40 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %136)
- %137 = getelementptr inbounds %struct.btHullTriangle* %123, i32 0, i32 2 ; [#uses=1]
- %138 = load i32* %137, align 4 ; [#uses=1]
- %139 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %140 = getelementptr inbounds %struct.btHullTriangle** %139, i32 %138 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %140, align 4
- %141 = bitcast %struct.btHullTriangle* %123 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %141)
- %.pre82 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %_Z7hasvertRK4int3i.exit12
- %142 = phi %struct.btHullTriangle** [ %120, %_Z7hasvertRK4int3i.exit12 ], [ %.pre82, %bb3 ] ; [#uses=2]
- %143 = load i32* %72, align 4 ; [#uses=1]
- %144 = getelementptr inbounds %struct.btHullTriangle** %142, i32 %143 ; [#uses=1]
- %145 = load %struct.btHullTriangle** %144, align 4 ; [#uses=4]
- %146 = getelementptr inbounds %struct.btHullTriangle* %145, i32 0, i32 0, i32 0 ; [#uses=3]
- %147 = load i32* %146, align 4 ; [#uses=1]
- %148 = icmp eq i32 %147, %v ; [#uses=1]
- br i1 %148, label %bb6, label %bb.i
-
-bb.i: ; preds = %bb4
- %149 = getelementptr inbounds i32* %146, i32 1 ; [#uses=1]
- %150 = load i32* %149, align 4 ; [#uses=1]
- %151 = icmp eq i32 %150, %v ; [#uses=1]
- br i1 %151, label %bb6, label %_Z7hasvertRK4int3i.exit
-
-_Z7hasvertRK4int3i.exit: ; preds = %bb.i
- %152 = getelementptr inbounds i32* %146, i32 2 ; [#uses=1]
- %153 = load i32* %152, align 4 ; [#uses=1]
- %phitmp60 = icmp eq i32 %153, %v ; [#uses=1]
- br i1 %phitmp60, label %bb6, label %bb7
-
-bb6: ; preds = %_Z7hasvertRK4int3i.exit, %bb.i, %bb4
- tail call void @_ZN11HullLibrary6b2bfixEP14btHullTriangleS1_(%struct.HullLibrary* %this, %struct.btHullTriangle* %69, %struct.btHullTriangle* %145)
- %154 = getelementptr inbounds %struct.btHullTriangle* %69, i32 0, i32 2 ; [#uses=1]
- %155 = load i32* %154, align 4 ; [#uses=1]
- %156 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %157 = getelementptr inbounds %struct.btHullTriangle** %156, i32 %155 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %157, align 4
- %158 = bitcast %struct.btHullTriangle* %69 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %158)
- %159 = getelementptr inbounds %struct.btHullTriangle* %145, i32 0, i32 2 ; [#uses=1]
- %160 = load i32* %159, align 4 ; [#uses=1]
- %161 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- %162 = getelementptr inbounds %struct.btHullTriangle** %161, i32 %160 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %162, align 4
- %163 = bitcast %struct.btHullTriangle* %145 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %163)
- %.pre83 = load %struct.btHullTriangle*** %17, align 4 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb6, %_Z7hasvertRK4int3i.exit
- %164 = phi %struct.btHullTriangle** [ %142, %_Z7hasvertRK4int3i.exit ], [ %.pre83, %bb6 ] ; [#uses=1]
- %165 = getelementptr inbounds %struct.btHullTriangle* %t0, i32 0, i32 2 ; [#uses=1]
- %166 = load i32* %165, align 4 ; [#uses=1]
- %167 = getelementptr inbounds %struct.btHullTriangle** %164, i32 %166 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %167, align 4
- %168 = bitcast %struct.btHullTriangle* %t0 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %168)
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE6resizeEiRKS1_(%"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* nocapture %this, i32 %newsize, %"struct.ConvexH::HalfEdge"* nocapture %fillData) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %this, i32 0, i32 1 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=5]
- %2 = icmp sgt i32 %1, %newsize ; [#uses=1]
- br i1 %2, label %bb12, label %bb3
-
-bb3: ; preds = %entry
- %3 = icmp slt i32 %1, %newsize ; [#uses=2]
- br i1 %3, label %bb4, label %bb12
-
-bb4: ; preds = %bb3
- %4 = getelementptr inbounds %"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %this, i32 0, i32 2 ; [#uses=2]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp slt i32 %5, %newsize ; [#uses=1]
- br i1 %6, label %bb.i, label %bb.nph
-
-bb.i: ; preds = %bb4
- %7 = icmp eq i32 %newsize, 0 ; [#uses=1]
- br i1 %7, label %_ZN20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE8allocateEi.exit.i, label %bb.i2.i
-
-bb.i2.i: ; preds = %bb.i
- %8 = shl i32 %newsize, 2 ; [#uses=1]
- %9 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16) ; [#uses=1]
- %phitmp.i = bitcast i8* %9 to %"struct.ConvexH::HalfEdge"* ; [#uses=1]
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE8allocateEi.exit.i
-
-_ZN20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE8allocateEi.exit.i: ; preds = %bb.i2.i, %bb.i
- %10 = phi i32 [ %.pre, %bb.i2.i ], [ %1, %bb.i ] ; [#uses=2]
- %11 = phi %"struct.ConvexH::HalfEdge"* [ %phitmp.i, %bb.i2.i ], [ null, %bb.i ] ; [#uses=5]
- %12 = icmp sgt i32 %10, 0 ; [#uses=1]
- br i1 %12, label %bb.nph.i.i, label %_ZNK20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE4copyEiiPS1_.exit.i
-
-bb.nph.i.i: ; preds = %_ZN20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE8allocateEi.exit.i
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4.i
-
-bb.i4.i: ; preds = %bb3.i.i, %bb.nph.i.i
- %indvar.i.i = phi i32 [ 0, %bb.nph.i.i ], [ %indvar.next.i.i, %bb3.i.i ] ; [#uses=8]
- %scevgep.i.i = getelementptr %"struct.ConvexH::HalfEdge"* %11, i32 %indvar.i.i ; [#uses=1]
- %14 = icmp eq %"struct.ConvexH::HalfEdge"* %scevgep.i.i, null ; [#uses=1]
- br i1 %14, label %bb3.i.i, label %bb1.i5.i
-
-bb1.i5.i: ; preds = %bb.i4.i
- %scevgep13.i.i = getelementptr %"struct.ConvexH::HalfEdge"* %11, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %scevgep14.i.i = getelementptr %"struct.ConvexH::HalfEdge"* %11, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %scevgep12.i.i = getelementptr inbounds %"struct.ConvexH::HalfEdge"* %11, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %15 = load %"struct.ConvexH::HalfEdge"** %13, align 4 ; [#uses=3]
- %scevgep89.i.i = getelementptr inbounds %"struct.ConvexH::HalfEdge"* %15, i32 %indvar.i.i, i32 0 ; [#uses=1]
- %16 = load i16* %scevgep89.i.i, align 2 ; [#uses=1]
- %scevgep10.i.i = getelementptr %"struct.ConvexH::HalfEdge"* %15, i32 %indvar.i.i, i32 1 ; [#uses=1]
- %17 = load i8* %scevgep10.i.i, align 2 ; [#uses=1]
- %scevgep11.i.i = getelementptr %"struct.ConvexH::HalfEdge"* %15, i32 %indvar.i.i, i32 2 ; [#uses=1]
- %18 = load i8* %scevgep11.i.i, align 1 ; [#uses=1]
- store i16 %16, i16* %scevgep12.i.i, align 2
- store i8 %17, i8* %scevgep13.i.i, align 2
- store i8 %18, i8* %scevgep14.i.i, align 1
- br label %bb3.i.i
-
-bb3.i.i: ; preds = %bb1.i5.i, %bb.i4.i
- %indvar.next.i.i = add i32 %indvar.i.i, 1 ; [#uses=2]
- %exitcond22 = icmp eq i32 %indvar.next.i.i, %10 ; [#uses=1]
- br i1 %exitcond22, label %_ZNK20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE4copyEiiPS1_.exit.i, label %bb.i4.i
-
-_ZNK20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE4copyEiiPS1_.exit.i: ; preds = %bb3.i.i, %_ZN20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE8allocateEi.exit.i
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %this, i32 0, i32 3 ; [#uses=3]
- %20 = load %"struct.ConvexH::HalfEdge"** %19, align 4 ; [#uses=2]
- %21 = icmp eq %"struct.ConvexH::HalfEdge"* %20, null ; [#uses=1]
- br i1 %21, label %bb11.preheader, label %bb.i.i
-
-bb.i.i: ; preds = %_ZNK20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE4copyEiiPS1_.exit.i
- %22 = getelementptr inbounds %"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %this, i32 0, i32 4 ; [#uses=1]
- %23 = load i8* %22, align 4 ; [#uses=1]
- %toBool.i.i = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i, label %bb2.i.i, label %bb1.i.i
-
-bb1.i.i: ; preds = %bb.i.i
- %24 = bitcast %"struct.ConvexH::HalfEdge"* %20 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %24)
- br label %bb2.i.i
-
-bb2.i.i: ; preds = %bb1.i.i, %bb.i.i
- store %"struct.ConvexH::HalfEdge"* null, %"struct.ConvexH::HalfEdge"** %19, align 4
- br label %bb11.preheader
-
-bb11.preheader: ; preds = %bb2.i.i, %_ZNK20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE4copyEiiPS1_.exit.i
- %25 = getelementptr inbounds %"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %25, align 4
- store %"struct.ConvexH::HalfEdge"* %11, %"struct.ConvexH::HalfEdge"** %19, align 4
- store i32 %newsize, i32* %4, align 4
- br i1 %3, label %bb.nph, label %bb12
-
-bb.nph: ; preds = %bb11.preheader, %bb4
- %26 = getelementptr inbounds %"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %this, i32 0, i32 3 ; [#uses=1]
- %27 = getelementptr inbounds %"struct.ConvexH::HalfEdge"* %fillData, i32 0, i32 0 ; [#uses=1]
- %28 = getelementptr inbounds %"struct.ConvexH::HalfEdge"* %fillData, i32 0, i32 1 ; [#uses=1]
- %29 = getelementptr inbounds %"struct.ConvexH::HalfEdge"* %fillData, i32 0, i32 2 ; [#uses=1]
- %tmp = sub i32 %newsize, %1 ; [#uses=1]
- br label %bb7
-
-bb7: ; preds = %bb10, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb10 ] ; [#uses=2]
- %tmp17 = add i32 %1, %indvar ; [#uses=4]
- %30 = load %"struct.ConvexH::HalfEdge"** %26, align 4 ; [#uses=4]
- %scevgep = getelementptr %"struct.ConvexH::HalfEdge"* %30, i32 %tmp17 ; [#uses=1]
- %31 = icmp eq %"struct.ConvexH::HalfEdge"* %scevgep, null ; [#uses=1]
- br i1 %31, label %bb10, label %bb8
-
-bb8: ; preds = %bb7
- %32 = load i16* %27, align 2 ; [#uses=1]
- %33 = load i8* %28, align 2 ; [#uses=1]
- %34 = load i8* %29, align 1 ; [#uses=1]
- %scevgep1819 = getelementptr inbounds %"struct.ConvexH::HalfEdge"* %30, i32 %tmp17, i32 0 ; [#uses=1]
- store i16 %32, i16* %scevgep1819, align 2
- %scevgep20 = getelementptr %"struct.ConvexH::HalfEdge"* %30, i32 %tmp17, i32 1 ; [#uses=1]
- store i8 %33, i8* %scevgep20, align 2
- %scevgep21 = getelementptr %"struct.ConvexH::HalfEdge"* %30, i32 %tmp17, i32 2 ; [#uses=1]
- store i8 %34, i8* %scevgep21, align 1
- br label %bb10
-
-bb10: ; preds = %bb8, %bb7
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp ; [#uses=1]
- br i1 %exitcond, label %bb12, label %bb7
-
-bb12: ; preds = %bb10, %bb11.preheader, %bb3, %entry
- store i32 %newsize, i32* %0, align 4
- ret void
-}
-
-; [#uses=1]
-define linkonce_odr void @_ZN20btAlignedObjectArrayI7btPlaneE7reserveEi(%"struct.btAlignedObjectArray<btPlane>"* nocapture %this, i32 %_Count) inlinehint align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btPlane>"* %this, i32 0, i32 2 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = icmp slt i32 %1, %_Count ; [#uses=1]
- br i1 %2, label %bb, label %return
-
-bb: ; preds = %entry
- %3 = icmp eq i32 %_Count, 0 ; [#uses=1]
- br i1 %3, label %_ZN20btAlignedObjectArrayI7btPlaneE8allocateEi.exit, label %bb.i2
-
-bb.i2: ; preds = %bb
- %4 = mul i32 %_Count, 20 ; [#uses=1]
- %5 = tail call i8* @_Z22btAlignedAllocInternalji(i32 %4, i32 16) ; [#uses=1]
- %phitmp = bitcast i8* %5 to %struct.btPlane* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayI7btPlaneE8allocateEi.exit
-
-_ZN20btAlignedObjectArrayI7btPlaneE8allocateEi.exit: ; preds = %bb.i2, %bb
- %6 = phi %struct.btPlane* [ %phitmp, %bb.i2 ], [ null, %bb ] ; [#uses=7]
- %7 = getelementptr inbounds %"struct.btAlignedObjectArray<btPlane>"* %this, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=2]
- %9 = icmp sgt i32 %8, 0 ; [#uses=1]
- br i1 %9, label %bb.nph.i, label %_ZNK20btAlignedObjectArrayI7btPlaneE4copyEiiPS0_.exit
-
-bb.nph.i: ; preds = %_ZN20btAlignedObjectArrayI7btPlaneE8allocateEi.exit
- %10 = getelementptr inbounds %"struct.btAlignedObjectArray<btPlane>"* %this, i32 0, i32 3 ; [#uses=1]
- br label %bb.i4
-
-bb.i4: ; preds = %bb3.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb3.i ] ; [#uses=12]
- %scevgep.i = getelementptr %struct.btPlane* %6, i32 %indvar.i ; [#uses=1]
- %11 = icmp eq %struct.btPlane* %scevgep.i, null ; [#uses=1]
- br i1 %11, label %bb3.i, label %bb1.i5
-
-bb1.i5: ; preds = %bb.i4
- %scevgep15.i = getelementptr %struct.btPlane* %6, i32 %indvar.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.btPlane* %6, i32 %indvar.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.btPlane* %6, i32 %indvar.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %scevgep18.i = getelementptr %struct.btPlane* %6, i32 %indvar.i, i32 1 ; [#uses=1]
- %scevgep14.i = getelementptr inbounds %struct.btPlane* %6, i32 %indvar.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load %struct.btPlane** %10, align 4 ; [#uses=5]
- %scevgep89.i = getelementptr inbounds %struct.btPlane* %12, i32 %indvar.i, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %scevgep89.i, align 4 ; [#uses=1]
- store float %13, float* %scevgep14.i, align 4
- %scevgep10.i = getelementptr %struct.btPlane* %12, i32 %indvar.i, i32 0, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %scevgep10.i, align 4 ; [#uses=1]
- store float %14, float* %scevgep15.i, align 4
- %scevgep11.i = getelementptr %struct.btPlane* %12, i32 %indvar.i, i32 0, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %scevgep11.i, align 4 ; [#uses=1]
- store float %15, float* %scevgep16.i, align 4
- %scevgep12.i = getelementptr %struct.btPlane* %12, i32 %indvar.i, i32 0, i32 0, i32 3 ; [#uses=1]
- %16 = load float* %scevgep12.i, align 4 ; [#uses=1]
- store float %16, float* %scevgep17.i, align 4
- %scevgep13.i = getelementptr %struct.btPlane* %12, i32 %indvar.i, i32 1 ; [#uses=1]
- %17 = load float* %scevgep13.i, align 4 ; [#uses=1]
- store float %17, float* %scevgep18.i, align 4
- br label %bb3.i
-
-bb3.i: ; preds = %bb1.i5, %bb.i4
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %8 ; [#uses=1]
- br i1 %exitcond, label %_ZNK20btAlignedObjectArrayI7btPlaneE4copyEiiPS0_.exit, label %bb.i4
-
-_ZNK20btAlignedObjectArrayI7btPlaneE4copyEiiPS0_.exit: ; preds = %bb3.i, %_ZN20btAlignedObjectArrayI7btPlaneE8allocateEi.exit
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btPlane>"* %this, i32 0, i32 3 ; [#uses=3]
- %19 = load %struct.btPlane** %18, align 4 ; [#uses=2]
- %20 = icmp eq %struct.btPlane* %19, null ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayI7btPlaneE10deallocateEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZNK20btAlignedObjectArrayI7btPlaneE4copyEiiPS0_.exit
- %21 = getelementptr inbounds %"struct.btAlignedObjectArray<btPlane>"* %this, i32 0, i32 4 ; [#uses=1]
- %22 = load i8* %21, align 4 ; [#uses=1]
- %toBool.i = icmp eq i8 %22, 0 ; [#uses=1]
- br i1 %toBool.i, label %bb2.i, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- %23 = bitcast %struct.btPlane* %19 to i8* ; [#uses=1]
- tail call void @_Z21btAlignedFreeInternalPv(i8* %23)
- br label %bb2.i
-
-bb2.i: ; preds = %bb1.i, %bb.i
- store %struct.btPlane* null, %struct.btPlane** %18, align 4
- br label %_ZN20btAlignedObjectArrayI7btPlaneE10deallocateEv.exit
-
-_ZN20btAlignedObjectArrayI7btPlaneE10deallocateEv.exit: ; preds = %bb2.i, %_ZNK20btAlignedObjectArrayI7btPlaneE4copyEiiPS0_.exit
- %24 = getelementptr inbounds %"struct.btAlignedObjectArray<btPlane>"* %this, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %24, align 4
- store %struct.btPlane* %6, %struct.btPlane** %18, align 4
- store i32 %_Count, i32* %0, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=1]
-define void @_ZN7ConvexHC2Eiii(%struct.ConvexH* nocapture %this, i32 %vertices_size, i32 %edges_size, i32 %facets_size) align 2 {
-invcont1:
- %0 = alloca %"struct.ConvexH::HalfEdge", align 8 ; [#uses=1]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %2 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 0, i32 4 ; [#uses=3]
- store i8 1, i8* %2, align 4
- %3 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 0, i32 3 ; [#uses=4]
- store %struct.btQuadWord* null, %struct.btQuadWord** %3, align 4
- %4 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 0, i32 1 ; [#uses=2]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 0, i32 2 ; [#uses=2]
- store i32 0, i32* %5, align 4
- %6 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 1, i32 4 ; [#uses=3]
- store i8 1, i8* %6, align 4
- %7 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 1, i32 3 ; [#uses=4]
- store %"struct.ConvexH::HalfEdge"* null, %"struct.ConvexH::HalfEdge"** %7, align 4
- %8 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 1, i32 1 ; [#uses=2]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 1, i32 2 ; [#uses=2]
- store i32 0, i32* %9, align 4
- %10 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 2, i32 4 ; [#uses=3]
- store i8 1, i8* %10, align 4
- %11 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 2, i32 3 ; [#uses=5]
- store %struct.btPlane* null, %struct.btPlane** %11, align 4
- %12 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 2, i32 1 ; [#uses=4]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 2, i32 2 ; [#uses=2]
- store i32 0, i32* %13, align 4
- %14 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 0 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %14, i32 %vertices_size, %struct.btQuadWord* %1) inlinehint
- to label %invcont2 unwind label %lpad24
-
-invcont2: ; preds = %invcont1
- %15 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 1 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIN7ConvexH8HalfEdgeEE6resizeEiRKS1_(%"struct.btAlignedObjectArray<ConvexH::HalfEdge>"* %15, i32 %edges_size, %"struct.ConvexH::HalfEdge"* %0) inlinehint
- to label %invcont3 unwind label %lpad24
-
-invcont3: ; preds = %invcont2
- %16 = load i32* %12, align 4 ; [#uses=3]
- %17 = icmp slt i32 %16, %facets_size ; [#uses=1]
- br i1 %17, label %bb.nph.i, label %return
-
-bb.nph.i: ; preds = %invcont3
- %18 = getelementptr inbounds %struct.ConvexH* %this, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI7btPlaneE7reserveEi(%"struct.btAlignedObjectArray<btPlane>"* %18, i32 %facets_size) inlinehint
- to label %.noexc56 unwind label %lpad24
-
-.noexc56: ; preds = %bb.nph.i
- %tmp.i = sub i32 %facets_size, %16 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %.noexc56
- %indvar.i = phi i32 [ 0, %.noexc56 ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp = add i32 %16, %indvar.i ; [#uses=2]
- %19 = load %struct.btPlane** %11, align 4 ; [#uses=2]
- %scevgep.i = getelementptr %struct.btPlane* %19, i32 %tmp ; [#uses=1]
- %20 = icmp eq %struct.btPlane* %scevgep.i, null ; [#uses=1]
- br i1 %20, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- %scevgep23.i = getelementptr %struct.btPlane* %19, i32 %tmp, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %scevgep23.i, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond, label %return, label %bb7.i
-
-invcont15: ; preds = %bb2.i.i.i49, %ppad
- store i8 1, i8* %2, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %3, align 4
- store i32 0, i32* %4, align 4
- store i32 0, i32* %5, align 4
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr25)
- unreachable
-
-return: ; preds = %bb10.i, %invcont3
- store i32 %facets_size, i32* %12, align 4
- ret void
-
-lpad24: ; preds = %bb.nph.i, %invcont2, %invcont1
- %eh_ptr25 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select27 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr25, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %21 = load %struct.btPlane** %11, align 4 ; [#uses=2]
- %22 = icmp eq %struct.btPlane* %21, null ; [#uses=1]
- br i1 %22, label %ppad40, label %bb.i.i.i52
-
-bb.i.i.i52: ; preds = %lpad24
- %23 = load i8* %10, align 4 ; [#uses=1]
- %toBool.i.i.i51 = icmp eq i8 %23, 0 ; [#uses=1]
- br i1 %toBool.i.i.i51, label %bb2.i.i.i54, label %bb1.i.i.i53
-
-bb1.i.i.i53: ; preds = %bb.i.i.i52
- %24 = bitcast %struct.btPlane* %21 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %24)
- to label %bb2.i.i.i54 unwind label %lpad28
-
-bb2.i.i.i54: ; preds = %bb1.i.i.i53, %bb.i.i.i52
- store %struct.btPlane* null, %struct.btPlane** %11, align 4
- br label %ppad40
-
-lpad28: ; preds = %bb1.i.i.i53
- %eh_ptr29 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select31 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr29, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad32: ; preds = %bb1.i.i.i
- %eh_ptr33 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select35 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr33, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad36: ; preds = %bb1.i.i.i48
- %eh_ptr37 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select39 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr37, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %bb2.i.i.i, %ppad40
- store i8 1, i8* %6, align 4
- store %"struct.ConvexH::HalfEdge"* null, %"struct.ConvexH::HalfEdge"** %7, align 4
- store i32 0, i32* %8, align 4
- store i32 0, i32* %9, align 4
- %25 = load %struct.btQuadWord** %3, align 4 ; [#uses=2]
- %26 = icmp eq %struct.btQuadWord* %25, null ; [#uses=1]
- br i1 %26, label %invcont15, label %bb.i.i.i47
-
-bb.i.i.i47: ; preds = %ppad
- %27 = load i8* %2, align 4 ; [#uses=1]
- %toBool.i.i.i46 = icmp eq i8 %27, 0 ; [#uses=1]
- br i1 %toBool.i.i.i46, label %bb2.i.i.i49, label %bb1.i.i.i48
-
-bb1.i.i.i48: ; preds = %bb.i.i.i47
- %28 = bitcast %struct.btQuadWord* %25 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %28)
- to label %bb2.i.i.i49 unwind label %lpad36
-
-bb2.i.i.i49: ; preds = %bb1.i.i.i48, %bb.i.i.i47
- store %struct.btQuadWord* null, %struct.btQuadWord** %3, align 4
- br label %invcont15
-
-ppad40: ; preds = %bb2.i.i.i54, %lpad24
- store i8 1, i8* %10, align 4
- store %struct.btPlane* null, %struct.btPlane** %11, align 4
- store i32 0, i32* %12, align 4
- store i32 0, i32* %13, align 4
- %29 = load %"struct.ConvexH::HalfEdge"** %7, align 4 ; [#uses=2]
- %30 = icmp eq %"struct.ConvexH::HalfEdge"* %29, null ; [#uses=1]
- br i1 %30, label %ppad, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad40
- %31 = load i8* %6, align 4 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %31, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %32 = bitcast %"struct.ConvexH::HalfEdge"* %29 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %32)
- to label %bb2.i.i.i unwind label %lpad32
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %"struct.ConvexH::HalfEdge"* null, %"struct.ConvexH::HalfEdge"** %7, align 4
- br label %ppad
-}
-
-; [#uses=0]
-define void @_ZN7ConvexHC1Eiii(%struct.ConvexH* nocapture %this, i32 %vertices_size, i32 %edges_size, i32 %facets_size) align 2 {
-entry:
- tail call void @_ZN7ConvexHC2Eiii(%struct.ConvexH* %this, i32 %vertices_size, i32 %edges_size, i32 %facets_size)
- ret void
-}
-
-; [#uses=0]
-define void @_Z4orthRK9btVector3(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btQuadWord* nocapture %v) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 0 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=3]
- %2 = fmul float %1, 0.000000e+00 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 1 ; [#uses=1]
- %4 = load float* %3, align 4 ; [#uses=2]
- %5 = fmul float %4, 0.000000e+00 ; [#uses=3]
- %6 = fsub float %2, %5 ; [#uses=3]
- %7 = getelementptr inbounds %struct.btQuadWord* %v, i32 0, i32 0, i32 2 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fmul float %8, 0.000000e+00 ; [#uses=3]
- %10 = fsub float %9, %1 ; [#uses=3]
- %11 = fsub float %4, %9 ; [#uses=3]
- %12 = fsub float %1, %5 ; [#uses=3]
- %13 = fsub float %9, %2 ; [#uses=3]
- %14 = fsub float %5, %8 ; [#uses=3]
- %15 = fmul float %11, %11 ; [#uses=1]
- %16 = fmul float %10, %10 ; [#uses=1]
- %17 = fadd float %15, %16 ; [#uses=1]
- %18 = fmul float %6, %6 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = tail call float @sqrtf(float %19) nounwind readonly ; [#uses=2]
- %21 = fmul float %14, %14 ; [#uses=1]
- %22 = fmul float %13, %13 ; [#uses=1]
- %23 = fadd float %21, %22 ; [#uses=1]
- %24 = fmul float %12, %12 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = tail call float @sqrtf(float %25) nounwind readonly ; [#uses=2]
- %27 = fcmp ogt float %20, %26 ; [#uses=1]
- br i1 %27, label %bb, label %bb1
-
-bb: ; preds = %entry
- %28 = fdiv float 1.000000e+00, %20 ; [#uses=3]
- %29 = fmul float %6, %28 ; [#uses=1]
- %30 = fmul float %10, %28 ; [#uses=1]
- %31 = fmul float %11, %28 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %31, float* %32, align 4
- %33 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %30, float* %33, align 4
- %34 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %29, float* %34, align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %35, align 4
- ret void
-
-bb1: ; preds = %entry
- %36 = fdiv float 1.000000e+00, %26 ; [#uses=3]
- %37 = fmul float %12, %36 ; [#uses=1]
- %38 = fmul float %13, %36 ; [#uses=1]
- %39 = fmul float %14, %36 ; [#uses=1]
- %40 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %39, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %38, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %37, float* %42, align 4
- %43 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_Z9TriNormalRK9btVector3S1_S1_(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btQuadWord* nocapture %v0, %struct.btQuadWord* nocapture %v1, %struct.btQuadWord* nocapture %v2) nounwind {
-entry:
- %0 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 2 ; [#uses=1]
- %1 = load float* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 2 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = fsub float %1, %3 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = load float* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load float* %7, align 4 ; [#uses=2]
- %9 = fsub float %6, %8 ; [#uses=2]
- %10 = getelementptr inbounds %struct.btQuadWord* %v2, i32 0, i32 0, i32 0 ; [#uses=1]
- %11 = load float* %10, align 4 ; [#uses=1]
- %12 = getelementptr inbounds %struct.btQuadWord* %v1, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load float* %12, align 4 ; [#uses=2]
- %14 = fsub float %11, %13 ; [#uses=2]
- %15 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %15, align 4 ; [#uses=1]
- %17 = fsub float %3, %16 ; [#uses=2]
- %18 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=1]
- %20 = fsub float %8, %19 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %v0, i32 0, i32 0, i32 0 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = fsub float %13, %22 ; [#uses=2]
- %24 = fmul float %23, %9 ; [#uses=1]
- %25 = fmul float %20, %14 ; [#uses=1]
- %26 = fsub float %24, %25 ; [#uses=3]
- %27 = fmul float %17, %14 ; [#uses=1]
- %28 = fmul float %23, %4 ; [#uses=1]
- %29 = fsub float %27, %28 ; [#uses=3]
- %30 = fmul float %20, %4 ; [#uses=1]
- %31 = fmul float %17, %9 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=3]
- %33 = fmul float %32, %32 ; [#uses=1]
- %34 = fmul float %29, %29 ; [#uses=1]
- %35 = fadd float %33, %34 ; [#uses=1]
- %36 = fmul float %26, %26 ; [#uses=1]
- %37 = fadd float %35, %36 ; [#uses=1]
- %38 = tail call float @sqrtf(float %37) nounwind readonly ; [#uses=2]
- %39 = fcmp oeq float %38, 0.000000e+00 ; [#uses=1]
- br i1 %39, label %bb, label %bb1
-
-bb: ; preds = %entry
- %40 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float 1.000000e+00, float* %40, align 4
- %41 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float 0.000000e+00, float* %41, align 4
- %42 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %42, align 4
- %43 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %43, align 4
- ret void
-
-bb1: ; preds = %entry
- %44 = fdiv float 1.000000e+00, %38 ; [#uses=3]
- %45 = fmul float %26, %44 ; [#uses=1]
- %46 = fmul float %29, %44 ; [#uses=1]
- %47 = fmul float %32, %44 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %47, float* %48, align 4
- %49 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %46, float* %49, align 4
- %50 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %45, float* %50, align 4
- %51 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %51, align 4
- ret void
-}
-
-; [#uses=0]
-define i32 @_Z5aboveP9btVector3RK4int3RKS_f(%struct.btQuadWord* nocapture %vertices, %struct.int3* nocapture %t, %struct.btQuadWord* nocapture %p, float %epsilon) nounwind readonly {
-entry:
- %0 = getelementptr inbounds %struct.int3* %t, i32 0, i32 0 ; [#uses=3]
- %1 = getelementptr inbounds i32* %0, i32 2 ; [#uses=1]
- %2 = load i32* %1, align 4 ; [#uses=3]
- %3 = getelementptr inbounds i32* %0, i32 1 ; [#uses=1]
- %4 = load i32* %3, align 4 ; [#uses=3]
- %5 = load i32* %0, align 4 ; [#uses=3]
- %6 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %2, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %4, i32 0, i32 2 ; [#uses=1]
- %9 = load float* %8, align 4 ; [#uses=2]
- %10 = fsub float %7, %9 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %2, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %4, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %13, align 4 ; [#uses=2]
- %15 = fsub float %12, %14 ; [#uses=2]
- %16 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %2, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %4, i32 0, i32 0 ; [#uses=1]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fsub float %17, %19 ; [#uses=2]
- %21 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %5, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=2]
- %23 = fsub float %9, %22 ; [#uses=2]
- %24 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %5, i32 0, i32 1 ; [#uses=1]
- %25 = load float* %24, align 4 ; [#uses=2]
- %26 = fsub float %14, %25 ; [#uses=2]
- %27 = getelementptr inbounds %struct.btQuadWord* %vertices, i32 %5, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=2]
- %29 = fsub float %19, %28 ; [#uses=2]
- %30 = fmul float %29, %15 ; [#uses=1]
- %31 = fmul float %26, %20 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=3]
- %33 = fmul float %23, %20 ; [#uses=1]
- %34 = fmul float %29, %10 ; [#uses=1]
- %35 = fsub float %33, %34 ; [#uses=3]
- %36 = fmul float %26, %10 ; [#uses=1]
- %37 = fmul float %23, %15 ; [#uses=1]
- %38 = fsub float %36, %37 ; [#uses=3]
- %39 = fmul float %38, %38 ; [#uses=1]
- %40 = fmul float %35, %35 ; [#uses=1]
- %41 = fadd float %39, %40 ; [#uses=1]
- %42 = fmul float %32, %32 ; [#uses=1]
- %43 = fadd float %41, %42 ; [#uses=1]
- %44 = tail call float @sqrtf(float %43) nounwind readonly ; [#uses=2]
- %45 = fcmp oeq float %44, 0.000000e+00 ; [#uses=1]
- br i1 %45, label %_Z9TriNormalRK9btVector3S1_S1_.exit, label %bb1.i
-
-bb1.i: ; preds = %entry
- %46 = fdiv float 1.000000e+00, %44 ; [#uses=3]
- %47 = fmul float %32, %46 ; [#uses=1]
- %48 = fmul float %35, %46 ; [#uses=1]
- %49 = fmul float %38, %46 ; [#uses=1]
- br label %_Z9TriNormalRK9btVector3S1_S1_.exit
-
-_Z9TriNormalRK9btVector3S1_S1_.exit: ; preds = %bb1.i, %entry
- %n.0.0.0 = phi float [ %49, %bb1.i ], [ 1.000000e+00, %entry ] ; [#uses=1]
- %n.0.1.0 = phi float [ %48, %bb1.i ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %n.0.2.0 = phi float [ %47, %bb1.i ], [ 0.000000e+00, %entry ] ; [#uses=1]
- %50 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 2 ; [#uses=1]
- %51 = load float* %50, align 4 ; [#uses=1]
- %52 = fsub float %51, %22 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 1 ; [#uses=1]
- %54 = load float* %53, align 4 ; [#uses=1]
- %55 = fsub float %54, %25 ; [#uses=1]
- %56 = getelementptr inbounds %struct.btQuadWord* %p, i32 0, i32 0, i32 0 ; [#uses=1]
- %57 = load float* %56, align 4 ; [#uses=1]
- %58 = fsub float %57, %28 ; [#uses=1]
- %59 = fmul float %n.0.0.0, %58 ; [#uses=1]
- %60 = fmul float %n.0.1.0, %55 ; [#uses=1]
- %61 = fadd float %59, %60 ; [#uses=1]
- %62 = fmul float %n.0.2.0, %52 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fcmp ogt float %63, %epsilon ; [#uses=1]
- %65 = zext i1 %64 to i32 ; [#uses=1]
- ret i32 %65
-}
-
-; [#uses=8]
-define linkonce_odr i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* nocapture %p, i32 %count, %struct.btQuadWord* nocapture %dir, %"struct.btAlignedObjectArray<int>"* nocapture %allow) nounwind {
-entry:
- %0 = icmp sgt i32 %count, 0 ; [#uses=3]
- %1 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %allow, i32 0, i32 3 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %dir, i32 0, i32 0, i32 0 ; [#uses=2]
- %3 = getelementptr inbounds %struct.btQuadWord* %dir, i32 0, i32 0, i32 1 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btQuadWord* %dir, i32 0, i32 0, i32 2 ; [#uses=2]
- br label %bb25
-
-bb2: ; preds = %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit
- %5 = load float* %2, align 4 ; [#uses=7]
- %6 = fmul float %5, 0.000000e+00 ; [#uses=2]
- %7 = load float* %3, align 4 ; [#uses=6]
- %8 = fmul float %7, 0.000000e+00 ; [#uses=3]
- %9 = fsub float %6, %8 ; [#uses=3]
- %10 = load float* %4, align 4 ; [#uses=6]
- %11 = fmul float %10, 0.000000e+00 ; [#uses=3]
- %12 = fsub float %11, %5 ; [#uses=3]
- %13 = fsub float %7, %11 ; [#uses=3]
- %14 = fsub float %5, %8 ; [#uses=3]
- %15 = fsub float %11, %6 ; [#uses=3]
- %16 = fsub float %8, %10 ; [#uses=3]
- %17 = fmul float %13, %13 ; [#uses=1]
- %18 = fmul float %12, %12 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fmul float %9, %9 ; [#uses=1]
- %21 = fadd float %19, %20 ; [#uses=1]
- %22 = tail call float @sqrtf(float %21) nounwind readonly ; [#uses=2]
- %23 = fmul float %16, %16 ; [#uses=1]
- %24 = fmul float %15, %15 ; [#uses=1]
- %25 = fadd float %23, %24 ; [#uses=1]
- %26 = fmul float %14, %14 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = tail call float @sqrtf(float %27) nounwind readonly ; [#uses=2]
- %29 = fcmp ogt float %22, %28 ; [#uses=1]
- br i1 %29, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb2
- %30 = fdiv float 1.000000e+00, %22 ; [#uses=3]
- %31 = fmul float %9, %30 ; [#uses=1]
- %32 = fmul float %12, %30 ; [#uses=1]
- %33 = fmul float %13, %30 ; [#uses=1]
- br label %_Z4orthRK9btVector3.exit
-
-bb1.i: ; preds = %bb2
- %34 = fdiv float 1.000000e+00, %28 ; [#uses=3]
- %35 = fmul float %14, %34 ; [#uses=1]
- %36 = fmul float %15, %34 ; [#uses=1]
- %37 = fmul float %16, %34 ; [#uses=1]
- br label %_Z4orthRK9btVector3.exit
-
-_Z4orthRK9btVector3.exit: ; preds = %bb1.i, %bb.i
- %u.0.0.0 = phi float [ %33, %bb.i ], [ %37, %bb1.i ] ; [#uses=4]
- %u.0.1.0 = phi float [ %32, %bb.i ], [ %36, %bb1.i ] ; [#uses=4]
- %u.0.2.0 = phi float [ %31, %bb.i ], [ %35, %bb1.i ] ; [#uses=4]
- %38 = fmul float %u.0.0.0, %7 ; [#uses=1]
- %39 = fmul float %u.0.1.0, %5 ; [#uses=1]
- %40 = fsub float %38, %39 ; [#uses=2]
- %41 = fmul float %u.0.2.0, %5 ; [#uses=1]
- %42 = fmul float %u.0.0.0, %10 ; [#uses=1]
- %43 = fsub float %41, %42 ; [#uses=2]
- %44 = fmul float %u.0.1.0, %10 ; [#uses=1]
- %45 = fmul float %u.0.2.0, %7 ; [#uses=1]
- %46 = fsub float %44, %45 ; [#uses=2]
- br label %bb23
-
-bb3: ; preds = %bb23
- %47 = fmul float %x.0, 0x3F91DF46A0000000 ; [#uses=2]
- %48 = tail call float @sinf(float %47) nounwind readonly ; [#uses=3]
- %49 = tail call float @cosf(float %47) nounwind readonly ; [#uses=3]
- %50 = fmul float %40, %49 ; [#uses=1]
- %51 = fmul float %43, %49 ; [#uses=1]
- %52 = fmul float %46, %49 ; [#uses=1]
- %53 = fmul float %u.0.2.0, %48 ; [#uses=1]
- %54 = fmul float %u.0.1.0, %48 ; [#uses=1]
- %55 = fmul float %u.0.0.0, %48 ; [#uses=1]
- %56 = fadd float %53, %50 ; [#uses=1]
- %57 = fadd float %54, %51 ; [#uses=1]
- %58 = fadd float %55, %52 ; [#uses=1]
- %59 = fmul float %56, 0x3F999999A0000000 ; [#uses=1]
- %60 = fmul float %57, 0x3F999999A0000000 ; [#uses=1]
- %61 = fmul float %58, 0x3F999999A0000000 ; [#uses=1]
- %62 = fadd float %10, %59 ; [#uses=2]
- %63 = fadd float %7, %60 ; [#uses=2]
- %64 = fadd float %5, %61 ; [#uses=2]
- br i1 %0, label %bb.i52, label %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit60
-
-bb.i52: ; preds = %bb8.i58, %bb3
- %65 = phi i32 [ %89, %bb8.i58 ], [ 0, %bb3 ] ; [#uses=7]
- %m.112.i47 = phi i32 [ %m.0.i56, %bb8.i58 ], [ -1, %bb3 ] ; [#uses=6]
- %scevgep17.i51 = getelementptr %struct.btQuadWord* %p, i32 %65, i32 0, i32 2 ; [#uses=1]
- %scevgep16.i50 = getelementptr %struct.btQuadWord* %p, i32 %65, i32 0, i32 1 ; [#uses=1]
- %scevgep1415.i49 = getelementptr inbounds %struct.btQuadWord* %p, i32 %65, i32 0, i32 0 ; [#uses=1]
- %scevgep.i48 = getelementptr i32* %178, i32 %65 ; [#uses=1]
- %66 = load i32* %scevgep.i48, align 4 ; [#uses=1]
- %67 = icmp eq i32 %66, 0 ; [#uses=1]
- br i1 %67, label %bb8.i58, label %bb1.i53
-
-bb1.i53: ; preds = %bb.i52
- %68 = icmp eq i32 %m.112.i47, -1 ; [#uses=1]
- br i1 %68, label %bb8.i58, label %bb2.i54
-
-bb2.i54: ; preds = %bb1.i53
- %69 = load float* %scevgep1415.i49, align 4 ; [#uses=1]
- %70 = fmul float %69, %64 ; [#uses=1]
- %71 = load float* %scevgep16.i50, align 4 ; [#uses=1]
- %72 = fmul float %71, %63 ; [#uses=1]
- %73 = fadd float %70, %72 ; [#uses=1]
- %74 = load float* %scevgep17.i51, align 4 ; [#uses=1]
- %75 = fmul float %74, %62 ; [#uses=1]
- %76 = fadd float %73, %75 ; [#uses=1]
- %77 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i47, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %77, align 4 ; [#uses=1]
- %79 = fmul float %78, %64 ; [#uses=1]
- %80 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i47, i32 0, i32 1 ; [#uses=1]
- %81 = load float* %80, align 4 ; [#uses=1]
- %82 = fmul float %81, %63 ; [#uses=1]
- %83 = fadd float %79, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i47, i32 0, i32 2 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = fmul float %85, %62 ; [#uses=1]
- %87 = fadd float %83, %86 ; [#uses=1]
- %88 = fcmp ogt float %76, %87 ; [#uses=1]
- br i1 %88, label %bb8.i58, label %bb4.i55
-
-bb4.i55: ; preds = %bb2.i54
- br label %bb8.i58
-
-bb8.i58: ; preds = %bb4.i55, %bb2.i54, %bb1.i53, %bb.i52
- %m.0.i56 = phi i32 [ %m.112.i47, %bb.i52 ], [ %65, %bb2.i54 ], [ %65, %bb1.i53 ], [ %m.112.i47, %bb4.i55 ] ; [#uses=2]
- %89 = add nsw i32 %65, 1 ; [#uses=2]
- %exitcond135 = icmp eq i32 %89, %count ; [#uses=1]
- br i1 %exitcond135, label %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit60, label %bb.i52
-
-_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit60: ; preds = %bb8.i58, %bb3
- %m.1.lcssa.i59 = phi i32 [ -1, %bb3 ], [ %m.0.i56, %bb8.i58 ] ; [#uses=3]
- %90 = icmp eq i32 %ma.0, %m.1.lcssa.i ; [#uses=1]
- %91 = icmp eq i32 %m.1.lcssa.i59, %m.1.lcssa.i ; [#uses=1]
- %92 = and i1 %90, %91 ; [#uses=1]
- br i1 %92, label %bb7, label %bb8
-
-bb7: ; preds = %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit60
- %93 = getelementptr inbounds i32* %178, i32 %m.1.lcssa.i ; [#uses=1]
- store i32 3, i32* %93, align 4
- ret i32 %m.1.lcssa.i
-
-bb8: ; preds = %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit60
- %94 = icmp ne i32 %ma.0, -1 ; [#uses=1]
- %95 = icmp ne i32 %ma.0, %m.1.lcssa.i59 ; [#uses=1]
- %96 = and i1 %94, %95 ; [#uses=1]
- br i1 %96, label %bb12, label %bb22
-
-bb12: ; preds = %bb8
- %97 = fadd float %x.0, -4.000000e+01 ; [#uses=1]
- br label %bb21
-
-bb13: ; preds = %bb21
- %98 = fmul float %xx.0, 0x3F91DF46A0000000 ; [#uses=2]
- %99 = tail call float @sinf(float %98) nounwind readonly ; [#uses=3]
- %100 = tail call float @cosf(float %98) nounwind readonly ; [#uses=3]
- %101 = fmul float %40, %100 ; [#uses=1]
- %102 = fmul float %43, %100 ; [#uses=1]
- %103 = fmul float %46, %100 ; [#uses=1]
- %104 = fmul float %u.0.2.0, %99 ; [#uses=1]
- %105 = fmul float %u.0.1.0, %99 ; [#uses=1]
- %106 = fmul float %u.0.0.0, %99 ; [#uses=1]
- %107 = fadd float %104, %101 ; [#uses=1]
- %108 = fadd float %105, %102 ; [#uses=1]
- %109 = fadd float %106, %103 ; [#uses=1]
- %110 = fmul float %107, 0x3F999999A0000000 ; [#uses=1]
- %111 = fmul float %108, 0x3F999999A0000000 ; [#uses=1]
- %112 = fmul float %109, 0x3F999999A0000000 ; [#uses=1]
- %113 = fadd float %10, %110 ; [#uses=2]
- %114 = fadd float %7, %111 ; [#uses=2]
- %115 = fadd float %5, %112 ; [#uses=2]
- br i1 %0, label %bb.i37, label %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit45
-
-bb.i37: ; preds = %bb8.i43, %bb13
- %116 = phi i32 [ %140, %bb8.i43 ], [ 0, %bb13 ] ; [#uses=7]
- %m.112.i32 = phi i32 [ %m.0.i41, %bb8.i43 ], [ -1, %bb13 ] ; [#uses=6]
- %scevgep17.i36 = getelementptr %struct.btQuadWord* %p, i32 %116, i32 0, i32 2 ; [#uses=1]
- %scevgep16.i35 = getelementptr %struct.btQuadWord* %p, i32 %116, i32 0, i32 1 ; [#uses=1]
- %scevgep1415.i34 = getelementptr inbounds %struct.btQuadWord* %p, i32 %116, i32 0, i32 0 ; [#uses=1]
- %scevgep.i33 = getelementptr i32* %178, i32 %116 ; [#uses=1]
- %117 = load i32* %scevgep.i33, align 4 ; [#uses=1]
- %118 = icmp eq i32 %117, 0 ; [#uses=1]
- br i1 %118, label %bb8.i43, label %bb1.i38
-
-bb1.i38: ; preds = %bb.i37
- %119 = icmp eq i32 %m.112.i32, -1 ; [#uses=1]
- br i1 %119, label %bb8.i43, label %bb2.i39
-
-bb2.i39: ; preds = %bb1.i38
- %120 = load float* %scevgep1415.i34, align 4 ; [#uses=1]
- %121 = fmul float %120, %115 ; [#uses=1]
- %122 = load float* %scevgep16.i35, align 4 ; [#uses=1]
- %123 = fmul float %122, %114 ; [#uses=1]
- %124 = fadd float %121, %123 ; [#uses=1]
- %125 = load float* %scevgep17.i36, align 4 ; [#uses=1]
- %126 = fmul float %125, %113 ; [#uses=1]
- %127 = fadd float %124, %126 ; [#uses=1]
- %128 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i32, i32 0, i32 0 ; [#uses=1]
- %129 = load float* %128, align 4 ; [#uses=1]
- %130 = fmul float %129, %115 ; [#uses=1]
- %131 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i32, i32 0, i32 1 ; [#uses=1]
- %132 = load float* %131, align 4 ; [#uses=1]
- %133 = fmul float %132, %114 ; [#uses=1]
- %134 = fadd float %130, %133 ; [#uses=1]
- %135 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i32, i32 0, i32 2 ; [#uses=1]
- %136 = load float* %135, align 4 ; [#uses=1]
- %137 = fmul float %136, %113 ; [#uses=1]
- %138 = fadd float %134, %137 ; [#uses=1]
- %139 = fcmp ogt float %127, %138 ; [#uses=1]
- br i1 %139, label %bb8.i43, label %bb4.i40
-
-bb4.i40: ; preds = %bb2.i39
- br label %bb8.i43
-
-bb8.i43: ; preds = %bb4.i40, %bb2.i39, %bb1.i38, %bb.i37
- %m.0.i41 = phi i32 [ %m.112.i32, %bb.i37 ], [ %116, %bb2.i39 ], [ %116, %bb1.i38 ], [ %m.112.i32, %bb4.i40 ] ; [#uses=2]
- %140 = add nsw i32 %116, 1 ; [#uses=2]
- %exitcond129 = icmp eq i32 %140, %count ; [#uses=1]
- br i1 %exitcond129, label %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit45, label %bb.i37
-
-_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit45: ; preds = %bb8.i43, %bb13
- %m.1.lcssa.i44 = phi i32 [ -1, %bb13 ], [ %m.0.i41, %bb8.i43 ] ; [#uses=2]
- %141 = icmp eq i32 %mc.0, %m.1.lcssa.i ; [#uses=1]
- %142 = icmp eq i32 %m.1.lcssa.i44, %m.1.lcssa.i ; [#uses=1]
- %143 = and i1 %141, %142 ; [#uses=1]
- br i1 %143, label %bb19, label %bb20
-
-bb19: ; preds = %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit45
- store i32 3, i32* %179, align 4
- ret i32 %m.1.lcssa.i
-
-bb20: ; preds = %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit45
- %144 = fadd float %xx.0, 5.000000e+00 ; [#uses=1]
- br label %bb21
-
-bb21: ; preds = %bb20, %bb12
- %mc.0 = phi i32 [ %ma.0, %bb12 ], [ %m.1.lcssa.i44, %bb20 ] ; [#uses=1]
- %xx.0 = phi float [ %97, %bb12 ], [ %144, %bb20 ] ; [#uses=3]
- %145 = fcmp ugt float %xx.0, %x.0 ; [#uses=1]
- br i1 %145, label %bb22, label %bb13
-
-bb22: ; preds = %bb21, %bb8
- %146 = fadd float %x.0, 4.500000e+01 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb22, %_Z4orthRK9btVector3.exit
- %ma.0 = phi i32 [ -1, %_Z4orthRK9btVector3.exit ], [ %m.1.lcssa.i59, %bb22 ] ; [#uses=4]
- %x.0 = phi float [ 0.000000e+00, %_Z4orthRK9btVector3.exit ], [ %146, %bb22 ] ; [#uses=5]
- %147 = fcmp ugt float %x.0, 3.600000e+02 ; [#uses=1]
- br i1 %147, label %bb24, label %bb3
-
-bb24: ; preds = %bb23
- %148 = getelementptr inbounds i32* %178, i32 %m.1.lcssa.i ; [#uses=1]
- store i32 0, i32* %148, align 4
- br label %bb25
-
-bb25: ; preds = %bb24, %entry
- %149 = load i32** %1, align 4 ; [#uses=3]
- br i1 %0, label %bb.i29, label %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit
-
-bb.i29: ; preds = %bb8.i, %bb25
- %150 = phi i32 [ %177, %bb8.i ], [ 0, %bb25 ] ; [#uses=7]
- %m.112.i = phi i32 [ %m.0.i, %bb8.i ], [ -1, %bb25 ] ; [#uses=6]
- %scevgep17.i = getelementptr %struct.btQuadWord* %p, i32 %150, i32 0, i32 2 ; [#uses=1]
- %scevgep16.i = getelementptr %struct.btQuadWord* %p, i32 %150, i32 0, i32 1 ; [#uses=1]
- %scevgep1415.i = getelementptr inbounds %struct.btQuadWord* %p, i32 %150, i32 0, i32 0 ; [#uses=1]
- %scevgep.i = getelementptr i32* %149, i32 %150 ; [#uses=1]
- %151 = load i32* %scevgep.i, align 4 ; [#uses=1]
- %152 = icmp eq i32 %151, 0 ; [#uses=1]
- br i1 %152, label %bb8.i, label %bb1.i30
-
-bb1.i30: ; preds = %bb.i29
- %153 = icmp eq i32 %m.112.i, -1 ; [#uses=1]
- br i1 %153, label %bb8.i, label %bb2.i
-
-bb2.i: ; preds = %bb1.i30
- %154 = load float* %scevgep1415.i, align 4 ; [#uses=1]
- %155 = load float* %2, align 4 ; [#uses=2]
- %156 = fmul float %154, %155 ; [#uses=1]
- %157 = load float* %scevgep16.i, align 4 ; [#uses=1]
- %158 = load float* %3, align 4 ; [#uses=2]
- %159 = fmul float %157, %158 ; [#uses=1]
- %160 = fadd float %156, %159 ; [#uses=1]
- %161 = load float* %scevgep17.i, align 4 ; [#uses=1]
- %162 = load float* %4, align 4 ; [#uses=2]
- %163 = fmul float %161, %162 ; [#uses=1]
- %164 = fadd float %160, %163 ; [#uses=1]
- %165 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i, i32 0, i32 0 ; [#uses=1]
- %166 = load float* %165, align 4 ; [#uses=1]
- %167 = fmul float %166, %155 ; [#uses=1]
- %168 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i, i32 0, i32 1 ; [#uses=1]
- %169 = load float* %168, align 4 ; [#uses=1]
- %170 = fmul float %169, %158 ; [#uses=1]
- %171 = fadd float %167, %170 ; [#uses=1]
- %172 = getelementptr inbounds %struct.btQuadWord* %p, i32 %m.112.i, i32 0, i32 2 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- %174 = fmul float %173, %162 ; [#uses=1]
- %175 = fadd float %171, %174 ; [#uses=1]
- %176 = fcmp ogt float %164, %175 ; [#uses=1]
- br i1 %176, label %bb8.i, label %bb4.i
-
-bb4.i: ; preds = %bb2.i
- br label %bb8.i
-
-bb8.i: ; preds = %bb4.i, %bb2.i, %bb1.i30, %bb.i29
- %m.0.i = phi i32 [ %m.112.i, %bb.i29 ], [ %150, %bb2.i ], [ %150, %bb1.i30 ], [ %m.112.i, %bb4.i ] ; [#uses=2]
- %177 = add nsw i32 %150, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %177, %count ; [#uses=1]
- br i1 %exitcond, label %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit, label %bb.i29
-
-_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit: ; preds = %bb8.i, %bb25
- %178 = phi i32* [ %149, %bb8.i ], [ %149, %bb25 ] ; [#uses=5]
- %m.1.lcssa.i = phi i32 [ %m.0.i, %bb8.i ], [ -1, %bb25 ] ; [#uses=10]
- %179 = getelementptr inbounds i32* %178, i32 %m.1.lcssa.i ; [#uses=2]
- %180 = load i32* %179, align 4 ; [#uses=1]
- %181 = icmp eq i32 %180, 3 ; [#uses=1]
- br i1 %181, label %bb27, label %bb2
-
-bb27: ; preds = %_Z14maxdirfilteredI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE.exit
- ret i32 %m.1.lcssa.i
-}
-
-; [#uses=1]
-define void @_ZN11HullLibrary11FindSimplexEP9btVector3iR20btAlignedObjectArrayIiE(%struct.int4* noalias nocapture sret %agg.result, %struct.HullLibrary* nocapture %this, %struct.btQuadWord* nocapture %verts, i32 %verts_count, %"struct.btAlignedObjectArray<int>"* nocapture %allow) nounwind align 2 {
-bb2:
- %0 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %2 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %basis = alloca [3 x %struct.btQuadWord], align 8 ; [#uses=15]
- %3 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 0, i32 0, i32 0 ; [#uses=4]
- store float 0x3F847AE140000000, float* %3, align 8
- %4 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 0, i32 0, i32 1 ; [#uses=4]
- store float 0x3F947AE140000000, float* %4, align 4
- %5 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 0, i32 0, i32 2 ; [#uses=4]
- store float 1.000000e+00, float* %5, align 8
- %6 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 0, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %6, align 4
- %7 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 0 ; [#uses=1]
- %8 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %7, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=9]
- %9 = load float* %5, align 8 ; [#uses=1]
- %10 = fsub float -0.000000e+00, %9 ; [#uses=1]
- %11 = load float* %4, align 4 ; [#uses=1]
- %12 = fsub float -0.000000e+00, %11 ; [#uses=1]
- %13 = load float* %3, align 8 ; [#uses=1]
- %14 = fsub float -0.000000e+00, %13 ; [#uses=1]
- %15 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %14, float* %15, align 8
- %16 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %12, float* %16, align 4
- %17 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %10, float* %17, align 8
- %18 = getelementptr inbounds %struct.btQuadWord* %2, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %18, align 4
- %19 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %2, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=9]
- %20 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %8, i32 0, i32 2 ; [#uses=3]
- %21 = load float* %20, align 4 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %19, i32 0, i32 2 ; [#uses=2]
- %23 = load float* %22, align 4 ; [#uses=1]
- %24 = fsub float %21, %23 ; [#uses=6]
- %25 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %8, i32 0, i32 1 ; [#uses=3]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %19, i32 0, i32 1 ; [#uses=2]
- %28 = load float* %27, align 4 ; [#uses=1]
- %29 = fsub float %26, %28 ; [#uses=5]
- %30 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %8, i32 0, i32 0 ; [#uses=3]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %19, i32 0, i32 0 ; [#uses=2]
- %33 = load float* %32, align 4 ; [#uses=1]
- %34 = fsub float %31, %33 ; [#uses=5]
- store float %34, float* %3, align 8
- store float %29, float* %4, align 4
- store float %24, float* %5, align 8
- store float 0.000000e+00, float* %6, align 4
- %35 = icmp eq i32 %8, %19 ; [#uses=1]
- br i1 %35, label %bb8, label %bb.i
-
-bb.i: ; preds = %bb2
- %36 = fcmp une float %24, 0.000000e+00 ; [#uses=1]
- %37 = fcmp une float %29, 0.000000e+00 ; [#uses=1]
- %or.cond84 = or i1 %36, %37 ; [#uses=1]
- %phitmp = fcmp une float %34, 0.000000e+00 ; [#uses=1]
- %or.cond85 = or i1 %or.cond84, %phitmp ; [#uses=1]
- br i1 %or.cond85, label %bb5, label %bb8
-
-bb5: ; preds = %bb.i
- %38 = fmul float %34, 0x3F947AE140000000 ; [#uses=1]
- %39 = fsub float %29, %38 ; [#uses=4]
- %40 = fmul float %34, 0.000000e+00 ; [#uses=2]
- %41 = fsub float %40, %24 ; [#uses=4]
- %42 = fmul float %24, 0x3F947AE140000000 ; [#uses=1]
- %43 = fmul float %29, 0.000000e+00 ; [#uses=2]
- %44 = fsub float %42, %43 ; [#uses=4]
- %45 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 1, i32 0, i32 0 ; [#uses=5]
- store float %44, float* %45, align 8
- %46 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 1, i32 0, i32 1 ; [#uses=5]
- store float %41, float* %46, align 4
- %47 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 1, i32 0, i32 2 ; [#uses=5]
- store float %39, float* %47, align 8
- %48 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 1, i32 0, i32 3 ; [#uses=3]
- store float 0.000000e+00, float* %48, align 4
- %49 = fmul float %29, 0xBF947AE140000000 ; [#uses=1]
- %50 = fsub float %49, %34 ; [#uses=5]
- %51 = fmul float %24, 0xBF947AE140000000 ; [#uses=1]
- %52 = fsub float %40, %51 ; [#uses=4]
- %53 = fsub float %24, %43 ; [#uses=4]
- %54 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 2, i32 0, i32 0 ; [#uses=3]
- store float %53, float* %54, align 8
- %55 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 2, i32 0, i32 1 ; [#uses=3]
- store float %52, float* %55, align 4
- %56 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 2, i32 0, i32 2 ; [#uses=3]
- store float %50, float* %56, align 8
- %57 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 2, i32 0, i32 3 ; [#uses=2]
- store float 0.000000e+00, float* %57, align 4
- %58 = fmul float %44, %44 ; [#uses=1]
- %59 = fmul float %41, %41 ; [#uses=1]
- %60 = fadd float %58, %59 ; [#uses=1]
- %61 = fmul float %39, %39 ; [#uses=1]
- %62 = fadd float %60, %61 ; [#uses=1]
- %63 = call float @sqrtf(float %62) nounwind readonly ; [#uses=2]
- %64 = fmul float %53, %53 ; [#uses=1]
- %65 = fmul float %52, %52 ; [#uses=1]
- %66 = fadd float %64, %65 ; [#uses=1]
- %67 = fmul float %50, %50 ; [#uses=1]
- %68 = fadd float %66, %67 ; [#uses=1]
- %69 = call float @sqrtf(float %68) nounwind readonly ; [#uses=2]
- %70 = fcmp ogt float %63, %69 ; [#uses=1]
- br i1 %70, label %bb13, label %bb14
-
-bb8: ; preds = %bb.i, %bb2
- %71 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 0 ; [#uses=1]
- store i32 -1, i32* %71, align 4
- %72 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 1 ; [#uses=1]
- store i32 -1, i32* %72, align 4
- %73 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %73, align 4
- %74 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 3 ; [#uses=1]
- store i32 -1, i32* %74, align 4
- ret void
-
-bb13: ; preds = %bb5
- %75 = fdiv float 1.000000e+00, %63 ; [#uses=3]
- %76 = fmul float %44, %75 ; [#uses=1]
- store float %76, float* %45, align 8
- %77 = fmul float %41, %75 ; [#uses=1]
- store float %77, float* %46, align 4
- %78 = fmul float %39, %75 ; [#uses=1]
- br label %bb15
-
-bb14: ; preds = %bb5
- store float %50, float* %47, align 8
- store float 0.000000e+00, float* %48, align 4
- %79 = fdiv float 1.000000e+00, %69 ; [#uses=3]
- %80 = fmul float %53, %79 ; [#uses=1]
- store float %80, float* %45, align 8
- %81 = fmul float %52, %79 ; [#uses=1]
- store float %81, float* %46, align 4
- %82 = fmul float %50, %79 ; [#uses=1]
- br label %bb15
-
-bb15: ; preds = %bb14, %bb13
- %storemerge = phi float [ %82, %bb14 ], [ %78, %bb13 ] ; [#uses=1]
- store float %storemerge, float* %47, align 8
- %83 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 1 ; [#uses=1]
- %84 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %83, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=3]
- %85 = icmp eq i32 %84, %8 ; [#uses=1]
- %86 = icmp eq i32 %84, %19 ; [#uses=1]
- %87 = or i1 %85, %86 ; [#uses=1]
- br i1 %87, label %bb19, label %bb20
-
-bb19: ; preds = %bb15
- %88 = load float* %47, align 8 ; [#uses=1]
- %89 = fsub float -0.000000e+00, %88 ; [#uses=1]
- %90 = load float* %46, align 4 ; [#uses=1]
- %91 = fsub float -0.000000e+00, %90 ; [#uses=1]
- %92 = load float* %45, align 8 ; [#uses=1]
- %93 = fsub float -0.000000e+00, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %93, float* %94, align 8
- %95 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %91, float* %95, align 4
- %96 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %89, float* %96, align 8
- %97 = getelementptr inbounds %struct.btQuadWord* %1, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %97, align 4
- %98 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %1, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %bb19, %bb15
- %p2.0 = phi i32 [ %98, %bb19 ], [ %84, %bb15 ] ; [#uses=9]
- %99 = icmp eq i32 %p2.0, %8 ; [#uses=1]
- %100 = icmp eq i32 %p2.0, %19 ; [#uses=1]
- %101 = or i1 %99, %100 ; [#uses=1]
- br i1 %101, label %bb24, label %bb25
-
-bb24: ; preds = %bb20
- %102 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 0 ; [#uses=1]
- store i32 -1, i32* %102, align 4
- %103 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 1 ; [#uses=1]
- store i32 -1, i32* %103, align 4
- %104 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %104, align 4
- %105 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 3 ; [#uses=1]
- store i32 -1, i32* %105, align 4
- ret void
-
-bb25: ; preds = %bb20
- %106 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %p2.0, i32 0, i32 2 ; [#uses=2]
- %107 = load float* %106, align 4 ; [#uses=1]
- %108 = load float* %20, align 4 ; [#uses=1]
- %109 = fsub float %107, %108 ; [#uses=3]
- %110 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %p2.0, i32 0, i32 1 ; [#uses=2]
- %111 = load float* %110, align 4 ; [#uses=1]
- %112 = load float* %25, align 4 ; [#uses=1]
- %113 = fsub float %111, %112 ; [#uses=3]
- %114 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %p2.0, i32 0, i32 0 ; [#uses=2]
- %115 = load float* %114, align 4 ; [#uses=1]
- %116 = load float* %30, align 4 ; [#uses=1]
- %117 = fsub float %115, %116 ; [#uses=3]
- store float %117, float* %45, align 8
- store float %113, float* %46, align 4
- store float %109, float* %47, align 8
- store float 0.000000e+00, float* %48, align 4
- %118 = load float* %4, align 4 ; [#uses=2]
- %119 = fmul float %117, %118 ; [#uses=1]
- %120 = load float* %3, align 8 ; [#uses=2]
- %121 = fmul float %113, %120 ; [#uses=1]
- %122 = fsub float %119, %121 ; [#uses=3]
- %123 = fmul float %109, %120 ; [#uses=1]
- %124 = load float* %5, align 8 ; [#uses=2]
- %125 = fmul float %117, %124 ; [#uses=1]
- %126 = fsub float %123, %125 ; [#uses=3]
- %127 = fmul float %113, %124 ; [#uses=1]
- %128 = fmul float %109, %118 ; [#uses=1]
- %129 = fsub float %127, %128 ; [#uses=3]
- %130 = fmul float %129, %129 ; [#uses=1]
- %131 = fmul float %126, %126 ; [#uses=1]
- %132 = fadd float %130, %131 ; [#uses=1]
- %133 = fmul float %122, %122 ; [#uses=1]
- %134 = fadd float %132, %133 ; [#uses=1]
- %135 = call float @sqrtf(float %134) nounwind readonly ; [#uses=1]
- %136 = fdiv float 1.000000e+00, %135 ; [#uses=3]
- %137 = fmul float %122, %136 ; [#uses=1]
- %138 = fmul float %126, %136 ; [#uses=1]
- %139 = fmul float %129, %136 ; [#uses=1]
- store float %139, float* %54, align 8
- store float %138, float* %55, align 4
- store float %137, float* %56, align 8
- store float 0.000000e+00, float* %57, align 4
- %140 = getelementptr inbounds [3 x %struct.btQuadWord]* %basis, i32 0, i32 2 ; [#uses=1]
- %141 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %140, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=4]
- %142 = icmp eq i32 %141, %8 ; [#uses=1]
- %143 = icmp eq i32 %141, %19 ; [#uses=1]
- %144 = or i1 %142, %143 ; [#uses=1]
- %145 = icmp eq i32 %141, %p2.0 ; [#uses=1]
- %or.cond = or i1 %144, %145 ; [#uses=1]
- br i1 %or.cond, label %bb32, label %bb33
-
-bb32: ; preds = %bb25
- %146 = load float* %56, align 8 ; [#uses=1]
- %147 = fsub float -0.000000e+00, %146 ; [#uses=1]
- %148 = load float* %55, align 4 ; [#uses=1]
- %149 = fsub float -0.000000e+00, %148 ; [#uses=1]
- %150 = load float* %54, align 8 ; [#uses=1]
- %151 = fsub float -0.000000e+00, %150 ; [#uses=1]
- %152 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %151, float* %152, align 8
- %153 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %149, float* %153, align 4
- %154 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %147, float* %154, align 8
- %155 = getelementptr inbounds %struct.btQuadWord* %0, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %155, align 4
- %156 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %0, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=1]
- br label %bb33
-
-bb33: ; preds = %bb32, %bb25
- %p3.0 = phi i32 [ %156, %bb32 ], [ %141, %bb25 ] ; [#uses=8]
- %157 = icmp eq i32 %p3.0, %8 ; [#uses=1]
- %158 = icmp eq i32 %p3.0, %19 ; [#uses=1]
- %159 = or i1 %157, %158 ; [#uses=1]
- %160 = icmp eq i32 %p3.0, %p2.0 ; [#uses=1]
- %or.cond82 = or i1 %159, %160 ; [#uses=1]
- br i1 %or.cond82, label %bb38, label %bb39
-
-bb38: ; preds = %bb33
- %161 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 0 ; [#uses=1]
- store i32 -1, i32* %161, align 4
- %162 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 1 ; [#uses=1]
- store i32 -1, i32* %162, align 4
- %163 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 2 ; [#uses=1]
- store i32 -1, i32* %163, align 4
- %164 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 3 ; [#uses=1]
- store i32 -1, i32* %164, align 4
- ret void
-
-bb39: ; preds = %bb33
- %165 = load float* %106, align 4 ; [#uses=1]
- %166 = load float* %20, align 4 ; [#uses=3]
- %167 = fsub float %165, %166 ; [#uses=2]
- %168 = load float* %110, align 4 ; [#uses=1]
- %169 = load float* %25, align 4 ; [#uses=3]
- %170 = fsub float %168, %169 ; [#uses=2]
- %171 = load float* %114, align 4 ; [#uses=1]
- %172 = load float* %30, align 4 ; [#uses=3]
- %173 = fsub float %171, %172 ; [#uses=2]
- %174 = load float* %22, align 4 ; [#uses=1]
- %175 = fsub float %174, %166 ; [#uses=2]
- %176 = load float* %27, align 4 ; [#uses=1]
- %177 = fsub float %176, %169 ; [#uses=2]
- %178 = load float* %32, align 4 ; [#uses=1]
- %179 = fsub float %178, %172 ; [#uses=2]
- %180 = fmul float %179, %170 ; [#uses=1]
- %181 = fmul float %177, %173 ; [#uses=1]
- %182 = fsub float %180, %181 ; [#uses=1]
- %183 = fmul float %175, %173 ; [#uses=1]
- %184 = fmul float %179, %167 ; [#uses=1]
- %185 = fsub float %183, %184 ; [#uses=1]
- %186 = fmul float %177, %167 ; [#uses=1]
- %187 = fmul float %175, %170 ; [#uses=1]
- %188 = fsub float %186, %187 ; [#uses=1]
- %189 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %p3.0, i32 0, i32 2 ; [#uses=1]
- %190 = load float* %189, align 4 ; [#uses=1]
- %191 = fsub float %190, %166 ; [#uses=1]
- %192 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %p3.0, i32 0, i32 1 ; [#uses=1]
- %193 = load float* %192, align 4 ; [#uses=1]
- %194 = fsub float %193, %169 ; [#uses=1]
- %195 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %p3.0, i32 0, i32 0 ; [#uses=1]
- %196 = load float* %195, align 4 ; [#uses=1]
- %197 = fsub float %196, %172 ; [#uses=1]
- %198 = fmul float %197, %188 ; [#uses=1]
- %199 = fmul float %194, %185 ; [#uses=1]
- %200 = fadd float %198, %199 ; [#uses=1]
- %201 = fmul float %191, %182 ; [#uses=1]
- %202 = fadd float %200, %201 ; [#uses=1]
- %203 = fcmp olt float %202, 0.000000e+00 ; [#uses=2]
- %p2.1 = select i1 %203, i32 %p3.0, i32 %p2.0 ; [#uses=1]
- %p3.1 = select i1 %203, i32 %p2.0, i32 %p3.0 ; [#uses=1]
- %204 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 0 ; [#uses=1]
- store i32 %8, i32* %204, align 4
- %205 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 1 ; [#uses=1]
- store i32 %19, i32* %205, align 4
- %206 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 2 ; [#uses=1]
- store i32 %p2.1, i32* %206, align 4
- %207 = getelementptr inbounds %struct.int4* %agg.result, i32 0, i32 3 ; [#uses=1]
- store i32 %p3.1, i32* %207, align 4
- ret void
-}
-
-; [#uses=1]
-define i32 @_ZN11HullLibrary11calchullgenEP9btVector3ii(%struct.HullLibrary* %this, %struct.btQuadWord* %verts, i32 %verts_count, i32 %vlimit) align 2 {
-entry:
- %allow = alloca %"struct.btAlignedObjectArray<int>", align 8 ; [#uses=7]
- %p = alloca %struct.int4, align 8 ; [#uses=2]
- %n = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %n52 = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = icmp slt i32 %verts_count, 4 ; [#uses=1]
- br i1 %0, label %bb81, label %bb.i2.i
-
-bb.i2.i: ; preds = %entry
- %1 = icmp eq i32 %vlimit, 0 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btQuadWord* %verts, i32 0, i32 0, i32 0 ; [#uses=1]
- %3 = load float* %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btQuadWord* %verts, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %verts, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = shl i32 %verts_count, 2 ; [#uses=2]
- %9 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16)
- to label %bb.i2.i105 unwind label %lpad ; [#uses=1]
-
-bb.i2.i105: ; preds = %bb.i2.i
- %phitmp.i = bitcast i8* %9 to i32* ; [#uses=2]
- %10 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %allow, i32 0, i32 4 ; [#uses=8]
- store i8 1, i8* %10, align 8
- %11 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %allow, i32 0, i32 3 ; [#uses=13]
- store i32* null, i32** %11, align 4
- %12 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %allow, i32 0, i32 1 ; [#uses=5]
- store i32 0, i32* %12, align 4
- %13 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %allow, i32 0, i32 2 ; [#uses=6]
- store i32 0, i32* %13, align 8
- %14 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %8, i32 16)
- to label %bb11.preheader unwind label %lpad85 ; [#uses=1]
-
-bb11.preheader: ; preds = %bb.i2.i105
- %phitmp.i104 = bitcast i8* %14 to i32* ; [#uses=1]
- store i8 1, i8* %10, align 8
- store i32* %phitmp.i104, i32** %11, align 4
- store i32 %verts_count, i32* %13, align 8
- br label %bb11
-
-bb6: ; preds = %bb11
- %15 = load i32* %13, align 8 ; [#uses=2]
- %16 = icmp eq i32 %15, %.pre6.i ; [#uses=1]
- br i1 %16, label %bb.i126, label %bb1.i
-
-bb.i126: ; preds = %bb6
- %17 = icmp eq i32 %.pre6.i, 0 ; [#uses=1]
- %18 = shl i32 %.pre6.i, 1 ; [#uses=1]
- %iftmp.190.0.i.i = select i1 %17, i32 1, i32 %18 ; [#uses=4]
- %19 = icmp slt i32 %15, %iftmp.190.0.i.i ; [#uses=1]
- br i1 %19, label %bb.i.i127, label %bb1.i
-
-bb.i.i127: ; preds = %bb.i126
- %20 = icmp eq i32 %iftmp.190.0.i.i, 0 ; [#uses=1]
- br i1 %20, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i127
- %21 = shl i32 %iftmp.190.0.i.i, 2 ; [#uses=1]
- %22 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %21, i32 16)
- to label %.noexc133 unwind label %lpad85 ; [#uses=1]
-
-.noexc133: ; preds = %bb.i2.i.i
- %phitmp.i.i = bitcast i8* %22 to i32* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %.noexc133, %bb.i.i127
- %23 = phi i32* [ %phitmp.i.i, %.noexc133 ], [ null, %bb.i.i127 ] ; [#uses=2]
- %24 = icmp sgt i32 %.pre6.i, 0 ; [#uses=1]
- br i1 %24, label %bb.i4.i.i, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
-
-bb.i4.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %indvar.i.i.i = phi i32 [ %indvar.next.i.i.i, %bb3.i.i.i ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i = getelementptr i32* %23, i32 %indvar.i.i.i ; [#uses=2]
- %25 = icmp eq i32* %scevgep.i.i.i, null ; [#uses=1]
- br i1 %25, label %bb3.i.i.i, label %bb1.i5.i.i
-
-bb1.i5.i.i: ; preds = %bb.i4.i.i
- %26 = load i32** %11, align 4 ; [#uses=1]
- %scevgep8.i.i.i = getelementptr i32* %26, i32 %indvar.i.i.i ; [#uses=1]
- %27 = load i32* %scevgep8.i.i.i, align 4 ; [#uses=1]
- store i32 %27, i32* %scevgep.i.i.i, align 4
- br label %bb3.i.i.i
-
-bb3.i.i.i: ; preds = %bb1.i5.i.i, %bb.i4.i.i
- %indvar.next.i.i.i = add i32 %indvar.i.i.i, 1 ; [#uses=2]
- %exitcond291 = icmp eq i32 %indvar.next.i.i.i, %.pre6.i ; [#uses=1]
- br i1 %exitcond291, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, label %bb.i4.i.i
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i: ; preds = %bb3.i.i.i, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %28 = load i32** %11, align 4 ; [#uses=2]
- %29 = icmp eq i32* %28, null ; [#uses=1]
- br i1 %29, label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, label %bb.i.i.i130
-
-bb.i.i.i130: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- %30 = load i8* %10, align 8 ; [#uses=1]
- %toBool.i.i.i129 = icmp eq i8 %30, 0 ; [#uses=1]
- br i1 %toBool.i.i.i129, label %bb2.i.i.i132, label %bb1.i.i.i131
-
-bb1.i.i.i131: ; preds = %bb.i.i.i130
- %31 = bitcast i32* %28 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %31)
- to label %bb2.i.i.i132 unwind label %lpad85
-
-bb2.i.i.i132: ; preds = %bb1.i.i.i131, %bb.i.i.i130
- store i32* null, i32** %11, align 4
- br label %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i: ; preds = %bb2.i.i.i132, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- store i8 1, i8* %10, align 8
- store i32* %23, i32** %11, align 4
- store i32 %iftmp.190.0.i.i, i32* %13, align 8
- br label %bb1.i
-
-bb1.i: ; preds = %_ZN20btAlignedObjectArrayIiE10deallocateEv.exit.i.i, %bb.i126, %bb6
- %32 = load i32** %11, align 4 ; [#uses=1]
- %33 = getelementptr inbounds i32* %32, i32 %.pre6.i ; [#uses=2]
- %34 = icmp eq i32* %33, null ; [#uses=1]
- br i1 %34, label %invcont7, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- store i32 1, i32* %33, align 4
- br label %invcont7
-
-invcont7: ; preds = %bb2.i, %bb1.i
- %35 = add nsw i32 %.pre6.i, 1 ; [#uses=2]
- store i32 %35, i32* %12, align 4
- %36 = icmp eq i32 %isextreme.2.1, %j.0 ; [#uses=1]
- br i1 %36, label %bb.i136, label %bb1.i158
-
-bb.i136: ; preds = %invcont7
- %37 = icmp eq i32 %j.0, 0 ; [#uses=1]
- %iftmp.190.0.i.i135 = select i1 %37, i32 1, i32 %tmp303 ; [#uses=5]
- %38 = icmp slt i32 %isextreme.2.1, %iftmp.190.0.i.i135 ; [#uses=1]
- br i1 %38, label %bb.i.i137, label %bb1.i158
-
-bb.i.i137: ; preds = %bb.i136
- %39 = icmp eq i32 %iftmp.190.0.i.i135, 0 ; [#uses=1]
- br i1 %39, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i141, label %bb.i2.i.i140
-
-bb.i2.i.i140: ; preds = %bb.i.i137
- %40 = shl i32 %iftmp.190.0.i.i135, 2 ; [#uses=1]
- %41 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %40, i32 16)
- to label %.noexc161 unwind label %lpad85 ; [#uses=1]
-
-.noexc161: ; preds = %bb.i2.i.i140
- %phitmp.i.i138 = bitcast i8* %41 to i32* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i141
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i141: ; preds = %.noexc161, %bb.i.i137
- %42 = phi i32* [ %phitmp.i.i138, %.noexc161 ], [ null, %bb.i.i137 ] ; [#uses=3]
- %43 = icmp sgt i32 %j.0, 0 ; [#uses=1]
- br i1 %43, label %bb.i4.i.i145, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i151
-
-bb.i4.i.i145: ; preds = %bb3.i.i.i150, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i141
- %indvar.i.i.i143 = phi i32 [ %indvar.next.i.i.i148, %bb3.i.i.i150 ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i141 ] ; [#uses=3]
- %scevgep.i.i.i144 = getelementptr i32* %42, i32 %indvar.i.i.i143 ; [#uses=2]
- %44 = icmp eq i32* %scevgep.i.i.i144, null ; [#uses=1]
- br i1 %44, label %bb3.i.i.i150, label %bb1.i5.i.i147
-
-bb1.i5.i.i147: ; preds = %bb.i4.i.i145
- %scevgep8.i.i.i146 = getelementptr i32* %isextreme.3.1, i32 %indvar.i.i.i143 ; [#uses=1]
- %45 = load i32* %scevgep8.i.i.i146, align 4 ; [#uses=1]
- store i32 %45, i32* %scevgep.i.i.i144, align 4
- br label %bb3.i.i.i150
-
-bb3.i.i.i150: ; preds = %bb1.i5.i.i147, %bb.i4.i.i145
- %indvar.next.i.i.i148 = add i32 %indvar.i.i.i143, 1 ; [#uses=2]
- %exitcond288 = icmp eq i32 %indvar.next.i.i.i148, %j.0 ; [#uses=1]
- br i1 %exitcond288, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i151, label %bb.i4.i.i145
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i151: ; preds = %bb3.i.i.i150, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i141
- %46 = icmp eq i32* %isextreme.3.1, null ; [#uses=1]
- br i1 %46, label %bb1.i158, label %bb1.i.i.i154
-
-bb1.i.i.i154: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i151
- %47 = bitcast i32* %isextreme.3.1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %47)
- to label %bb1.i158 unwind label %lpad85
-
-bb1.i158: ; preds = %bb1.i.i.i154, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i151, %bb.i136, %invcont7
- %isextreme.2.0 = phi i32 [ %isextreme.2.1, %bb.i136 ], [ %isextreme.2.1, %invcont7 ], [ %iftmp.190.0.i.i135, %bb1.i.i.i154 ], [ %iftmp.190.0.i.i135, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i151 ] ; [#uses=1]
- %isextreme.3.0 = phi i32* [ %isextreme.3.1, %bb.i136 ], [ %isextreme.3.1, %invcont7 ], [ %42, %bb1.i.i.i154 ], [ %42, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i151 ] ; [#uses=2]
- %scevgep302 = getelementptr i32* %isextreme.3.0, i32 %j.0 ; [#uses=2]
- %48 = icmp eq i32* %scevgep302, null ; [#uses=1]
- br i1 %48, label %invcont8, label %bb2.i160
-
-bb2.i160: ; preds = %bb1.i158
- store i32 0, i32* %scevgep302, align 4
- %.pre.pre = load i32* %12, align 4 ; [#uses=1]
- br label %invcont8
-
-invcont8: ; preds = %bb2.i160, %bb1.i158
- %.pre = phi i32 [ %.pre.pre, %bb2.i160 ], [ %35, %bb1.i158 ] ; [#uses=1]
- %49 = add nsw i32 %j.0, 1 ; [#uses=1]
- %50 = load float* %scevgep307308, align 4 ; [#uses=4]
- %51 = fcmp olt float %50, %bmin.0.0.1 ; [#uses=1]
- %bmin.0.0.0 = select i1 %51, float %50, float %bmin.0.0.1 ; [#uses=1]
- %52 = load float* %scevgep306, align 4 ; [#uses=4]
- %53 = fcmp olt float %52, %bmin.0.1.1 ; [#uses=1]
- %bmin.0.1.0 = select i1 %53, float %52, float %bmin.0.1.1 ; [#uses=1]
- %54 = load float* %scevgep305, align 4 ; [#uses=4]
- %55 = fcmp olt float %54, %bmin.0.2.1 ; [#uses=1]
- %bmin.0.2.0 = select i1 %55, float %54, float %bmin.0.2.1 ; [#uses=1]
- %56 = fcmp olt float %bmax.0.0.1, %50 ; [#uses=1]
- %bmax.0.0.0 = select i1 %56, float %50, float %bmax.0.0.1 ; [#uses=1]
- %57 = fcmp olt float %bmax.0.1.1, %52 ; [#uses=1]
- %bmax.0.1.0 = select i1 %57, float %52, float %bmax.0.1.1 ; [#uses=1]
- %58 = fcmp olt float %bmax.0.2.1, %54 ; [#uses=1]
- %bmax.0.2.0 = select i1 %58, float %54, float %bmax.0.2.1 ; [#uses=1]
- br label %bb11
-
-bb11: ; preds = %invcont8, %bb11.preheader
- %.pre6.i = phi i32 [ %.pre, %invcont8 ], [ 0, %bb11.preheader ] ; [#uses=7]
- %bmin.0.0.1 = phi float [ %bmin.0.0.0, %invcont8 ], [ %3, %bb11.preheader ] ; [#uses=3]
- %bmin.0.1.1 = phi float [ %bmin.0.1.0, %invcont8 ], [ %5, %bb11.preheader ] ; [#uses=3]
- %bmin.0.2.1 = phi float [ %bmin.0.2.0, %invcont8 ], [ %7, %bb11.preheader ] ; [#uses=3]
- %bmax.0.0.1 = phi float [ %bmax.0.0.0, %invcont8 ], [ %3, %bb11.preheader ] ; [#uses=3]
- %bmax.0.1.1 = phi float [ %bmax.0.1.0, %invcont8 ], [ %5, %bb11.preheader ] ; [#uses=3]
- %bmax.0.2.1 = phi float [ %bmax.0.2.0, %invcont8 ], [ %7, %bb11.preheader ] ; [#uses=3]
- %j.0 = phi i32 [ %49, %invcont8 ], [ 0, %bb11.preheader ] ; [#uses=11]
- %isextreme.2.1 = phi i32 [ %isextreme.2.0, %invcont8 ], [ %verts_count, %bb11.preheader ] ; [#uses=4]
- %isextreme.3.1 = phi i32* [ %isextreme.3.0, %invcont8 ], [ %phitmp.i, %bb11.preheader ] ; [#uses=24]
- %tmp303 = shl i32 %j.0, 1 ; [#uses=1]
- %scevgep305 = getelementptr %struct.btQuadWord* %verts, i32 %j.0, i32 0, i32 2 ; [#uses=1]
- %scevgep306 = getelementptr %struct.btQuadWord* %verts, i32 %j.0, i32 0, i32 1 ; [#uses=1]
- %scevgep307308 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %j.0, i32 0, i32 0 ; [#uses=1]
- %59 = icmp slt i32 %j.0, %verts_count ; [#uses=1]
- br i1 %59, label %bb6, label %invcont13
-
-invcont13: ; preds = %bb11
- %60 = fsub float %bmax.0.2.1, %bmin.0.2.1 ; [#uses=2]
- %61 = fsub float %bmax.0.1.1, %bmin.0.1.1 ; [#uses=2]
- %62 = fsub float %bmax.0.0.1, %bmin.0.0.1 ; [#uses=2]
- %63 = fmul float %62, %62 ; [#uses=1]
- %64 = fmul float %61, %61 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fmul float %60, %60 ; [#uses=1]
- %67 = fadd float %65, %66 ; [#uses=1]
- %68 = call float @sqrtf(float %67) nounwind readonly ; [#uses=1]
- %69 = fmul float %68, 0x3F50624DE0000000 ; [#uses=4]
- call void @_ZN11HullLibrary11FindSimplexEP9btVector3iR20btAlignedObjectArrayIiE(%struct.int4* noalias sret %p, %struct.HullLibrary* %this, %struct.btQuadWord* %verts, i32 %verts_count, %"struct.btAlignedObjectArray<int>"* %allow)
- %70 = getelementptr inbounds %struct.int4* %p, i32 0, i32 0 ; [#uses=4]
- %71 = load i32* %70, align 8 ; [#uses=8]
- %72 = icmp eq i32 %71, -1 ; [#uses=1]
- br i1 %72, label %bb73, label %bb15
-
-bb15: ; preds = %invcont13
- %73 = getelementptr inbounds i32* %70, i32 3 ; [#uses=1]
- %74 = load i32* %73, align 4 ; [#uses=7]
- %75 = getelementptr inbounds i32* %70, i32 2 ; [#uses=1]
- %76 = load i32* %75, align 8 ; [#uses=7]
- %77 = getelementptr inbounds i32* %70, i32 1 ; [#uses=1]
- %78 = load i32* %77, align 4 ; [#uses=7]
- %79 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %71, i32 0, i32 2 ; [#uses=1]
- %80 = load float* %79, align 4 ; [#uses=1]
- %81 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %78, i32 0, i32 2 ; [#uses=1]
- %82 = load float* %81, align 4 ; [#uses=1]
- %83 = fadd float %80, %82 ; [#uses=1]
- %84 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %71, i32 0, i32 1 ; [#uses=1]
- %85 = load float* %84, align 4 ; [#uses=1]
- %86 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %78, i32 0, i32 1 ; [#uses=1]
- %87 = load float* %86, align 4 ; [#uses=1]
- %88 = fadd float %85, %87 ; [#uses=1]
- %89 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %71, i32 0, i32 0 ; [#uses=1]
- %90 = load float* %89, align 4 ; [#uses=1]
- %91 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %78, i32 0, i32 0 ; [#uses=1]
- %92 = load float* %91, align 4 ; [#uses=1]
- %93 = fadd float %90, %92 ; [#uses=1]
- %94 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %76, i32 0, i32 2 ; [#uses=1]
- %95 = load float* %94, align 4 ; [#uses=1]
- %96 = fadd float %83, %95 ; [#uses=1]
- %97 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %76, i32 0, i32 1 ; [#uses=1]
- %98 = load float* %97, align 4 ; [#uses=1]
- %99 = fadd float %88, %98 ; [#uses=1]
- %100 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %76, i32 0, i32 0 ; [#uses=1]
- %101 = load float* %100, align 4 ; [#uses=1]
- %102 = fadd float %93, %101 ; [#uses=1]
- %103 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %74, i32 0, i32 2 ; [#uses=1]
- %104 = load float* %103, align 4 ; [#uses=1]
- %105 = fadd float %96, %104 ; [#uses=1]
- %106 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %74, i32 0, i32 1 ; [#uses=1]
- %107 = load float* %106, align 4 ; [#uses=1]
- %108 = fadd float %99, %107 ; [#uses=1]
- %109 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %74, i32 0, i32 0 ; [#uses=1]
- %110 = load float* %109, align 4 ; [#uses=1]
- %111 = fadd float %102, %110 ; [#uses=1]
- %112 = fmul float %105, 2.500000e-01 ; [#uses=1]
- %113 = fmul float %108, 2.500000e-01 ; [#uses=1]
- %114 = fmul float %111, 2.500000e-01 ; [#uses=1]
- %115 = invoke %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* %this, i32 %76, i32 %74, i32 %78)
- to label %invcont16 unwind label %lpad85 ; [#uses=3]
-
-invcont16: ; preds = %bb15
- %116 = getelementptr inbounds %struct.btHullTriangle* %115, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 2, i32* %116, align 4
- %117 = getelementptr inbounds %struct.btHullTriangle* %115, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 3, i32* %117, align 4
- %118 = getelementptr inbounds %struct.btHullTriangle* %115, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 1, i32* %118, align 4
- %119 = invoke %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* %this, i32 %74, i32 %76, i32 %71)
- to label %invcont17 unwind label %lpad85 ; [#uses=3]
-
-invcont17: ; preds = %invcont16
- %120 = getelementptr inbounds %struct.btHullTriangle* %119, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 3, i32* %120, align 4
- %121 = getelementptr inbounds %struct.btHullTriangle* %119, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 2, i32* %121, align 4
- %122 = getelementptr inbounds %struct.btHullTriangle* %119, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 0, i32* %122, align 4
- %123 = invoke %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* %this, i32 %71, i32 %78, i32 %74)
- to label %invcont18 unwind label %lpad85 ; [#uses=3]
-
-invcont18: ; preds = %invcont17
- %124 = getelementptr inbounds %struct.btHullTriangle* %123, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 0, i32* %124, align 4
- %125 = getelementptr inbounds %struct.btHullTriangle* %123, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 1, i32* %125, align 4
- %126 = getelementptr inbounds %struct.btHullTriangle* %123, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 3, i32* %126, align 4
- %127 = invoke %struct.btHullTriangle* @_ZN11HullLibrary16allocateTriangleEiii(%struct.HullLibrary* %this, i32 %78, i32 %71, i32 %76)
- to label %invcont19 unwind label %lpad85 ; [#uses=3]
-
-invcont19: ; preds = %invcont18
- %128 = getelementptr inbounds %struct.btHullTriangle* %127, i32 0, i32 1, i32 0 ; [#uses=1]
- store i32 1, i32* %128, align 4
- %129 = getelementptr inbounds %struct.btHullTriangle* %127, i32 0, i32 1, i32 1 ; [#uses=1]
- store i32 0, i32* %129, align 4
- %130 = getelementptr inbounds %struct.btHullTriangle* %127, i32 0, i32 1, i32 2 ; [#uses=1]
- store i32 2, i32* %130, align 4
- %131 = getelementptr inbounds i32* %isextreme.3.1, i32 %71 ; [#uses=1]
- %132 = getelementptr inbounds i32* %isextreme.3.1, i32 %78 ; [#uses=1]
- %133 = getelementptr inbounds i32* %isextreme.3.1, i32 %76 ; [#uses=1]
- %134 = getelementptr inbounds i32* %isextreme.3.1, i32 %74 ; [#uses=1]
- store i32 1, i32* %134, align 4
- store i32 1, i32* %133, align 4
- store i32 1, i32* %132, align 4
- store i32 1, i32* %131, align 4
- %135 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 1 ; [#uses=6]
- %136 = load i32* %135, align 4 ; [#uses=1]
- %137 = icmp sgt i32 %136, 0 ; [#uses=1]
- br i1 %137, label %bb.nph, label %bb23
-
-bb.nph: ; preds = %invcont19
- %138 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=1]
- %139 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 0 ; [#uses=2]
- %140 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 1 ; [#uses=2]
- %141 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 2 ; [#uses=2]
- %142 = getelementptr inbounds %struct.btQuadWord* %n, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb20
-
-bb20: ; preds = %invcont21, %bb.nph
- %j.1260 = phi i32 [ 0, %bb.nph ], [ %tmp287, %invcont21 ] ; [#uses=2]
- %tmp287 = add i32 %j.1260, 1 ; [#uses=2]
- %143 = load %struct.btHullTriangle*** %138, align 4 ; [#uses=1]
- %scevgep286 = getelementptr %struct.btHullTriangle** %143, i32 %j.1260 ; [#uses=1]
- %144 = load %struct.btHullTriangle** %scevgep286, align 4 ; [#uses=3]
- %145 = getelementptr inbounds %struct.btHullTriangle* %144, i32 0, i32 0, i32 0 ; [#uses=4]
- %146 = getelementptr inbounds i32* %145, i32 2 ; [#uses=1]
- %147 = load i32* %146, align 4 ; [#uses=3]
- %148 = getelementptr inbounds i32* %145, i32 1 ; [#uses=1]
- %149 = load i32* %148, align 4 ; [#uses=3]
- %150 = load i32* %145, align 4 ; [#uses=3]
- %151 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %147, i32 0, i32 2 ; [#uses=1]
- %152 = load float* %151, align 4 ; [#uses=1]
- %153 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %149, i32 0, i32 2 ; [#uses=1]
- %154 = load float* %153, align 4 ; [#uses=2]
- %155 = fsub float %152, %154 ; [#uses=2]
- %156 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %147, i32 0, i32 1 ; [#uses=1]
- %157 = load float* %156, align 4 ; [#uses=1]
- %158 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %149, i32 0, i32 1 ; [#uses=1]
- %159 = load float* %158, align 4 ; [#uses=2]
- %160 = fsub float %157, %159 ; [#uses=2]
- %161 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %147, i32 0, i32 0 ; [#uses=1]
- %162 = load float* %161, align 4 ; [#uses=1]
- %163 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %149, i32 0, i32 0 ; [#uses=1]
- %164 = load float* %163, align 4 ; [#uses=2]
- %165 = fsub float %162, %164 ; [#uses=2]
- %166 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %150, i32 0, i32 2 ; [#uses=1]
- %167 = load float* %166, align 4 ; [#uses=1]
- %168 = fsub float %154, %167 ; [#uses=2]
- %169 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %150, i32 0, i32 1 ; [#uses=1]
- %170 = load float* %169, align 4 ; [#uses=1]
- %171 = fsub float %159, %170 ; [#uses=2]
- %172 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %150, i32 0, i32 0 ; [#uses=1]
- %173 = load float* %172, align 4 ; [#uses=1]
- %174 = fsub float %164, %173 ; [#uses=2]
- %175 = fmul float %174, %160 ; [#uses=1]
- %176 = fmul float %171, %165 ; [#uses=1]
- %177 = fsub float %175, %176 ; [#uses=3]
- %178 = fmul float %168, %165 ; [#uses=1]
- %179 = fmul float %174, %155 ; [#uses=1]
- %180 = fsub float %178, %179 ; [#uses=3]
- %181 = fmul float %171, %155 ; [#uses=1]
- %182 = fmul float %168, %160 ; [#uses=1]
- %183 = fsub float %181, %182 ; [#uses=3]
- %184 = fmul float %183, %183 ; [#uses=1]
- %185 = fmul float %180, %180 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = fmul float %177, %177 ; [#uses=1]
- %188 = fadd float %186, %187 ; [#uses=1]
- %189 = call float @sqrtf(float %188) nounwind readonly ; [#uses=2]
- %190 = fcmp oeq float %189, 0.000000e+00 ; [#uses=1]
- br i1 %190, label %invcont21, label %bb1.i202
-
-bb1.i202: ; preds = %bb20
- %191 = fdiv float 1.000000e+00, %189 ; [#uses=3]
- %192 = fmul float %177, %191 ; [#uses=1]
- %193 = fmul float %180, %191 ; [#uses=1]
- %194 = fmul float %183, %191 ; [#uses=1]
- br label %invcont21
-
-invcont21: ; preds = %bb1.i202, %bb20
- %storemerge320 = phi float [ %194, %bb1.i202 ], [ 1.000000e+00, %bb20 ] ; [#uses=1]
- %storemerge319 = phi float [ %193, %bb1.i202 ], [ 0.000000e+00, %bb20 ] ; [#uses=1]
- %storemerge316 = phi float [ %192, %bb1.i202 ], [ 0.000000e+00, %bb20 ] ; [#uses=1]
- store float %storemerge320, float* %139, align 8
- store float %storemerge319, float* %140, align 4
- store float %storemerge316, float* %141, align 8
- store float 0.000000e+00, float* %142, align 4
- %195 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %n, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=4]
- %196 = getelementptr inbounds %struct.btHullTriangle* %144, i32 0, i32 3 ; [#uses=1]
- store i32 %195, i32* %196, align 4
- %197 = load i32* %145, align 4 ; [#uses=3]
- %198 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %195, i32 0, i32 2 ; [#uses=1]
- %199 = load float* %198, align 4 ; [#uses=1]
- %200 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %197, i32 0, i32 2 ; [#uses=1]
- %201 = load float* %200, align 4 ; [#uses=1]
- %202 = fsub float %199, %201 ; [#uses=1]
- %203 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %195, i32 0, i32 1 ; [#uses=1]
- %204 = load float* %203, align 4 ; [#uses=1]
- %205 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %197, i32 0, i32 1 ; [#uses=1]
- %206 = load float* %205, align 4 ; [#uses=1]
- %207 = fsub float %204, %206 ; [#uses=1]
- %208 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %195, i32 0, i32 0 ; [#uses=1]
- %209 = load float* %208, align 4 ; [#uses=1]
- %210 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %197, i32 0, i32 0 ; [#uses=1]
- %211 = load float* %210, align 4 ; [#uses=1]
- %212 = fsub float %209, %211 ; [#uses=1]
- %213 = load float* %139, align 8 ; [#uses=1]
- %214 = fmul float %213, %212 ; [#uses=1]
- %215 = load float* %140, align 4 ; [#uses=1]
- %216 = fmul float %215, %207 ; [#uses=1]
- %217 = fadd float %214, %216 ; [#uses=1]
- %218 = load float* %141, align 8 ; [#uses=1]
- %219 = fmul float %218, %202 ; [#uses=1]
- %220 = fadd float %217, %219 ; [#uses=1]
- %221 = getelementptr inbounds %struct.btHullTriangle* %144, i32 0, i32 4 ; [#uses=1]
- store float %220, float* %221, align 4
- %222 = load i32* %135, align 4 ; [#uses=1]
- %223 = icmp sgt i32 %222, %tmp287 ; [#uses=1]
- br i1 %223, label %bb20, label %bb23
-
-bb23: ; preds = %invcont21, %invcont19
- %vlimit.op = add i32 %vlimit, -4 ; [#uses=1]
- %224 = select i1 %1, i32 999999996, i32 %vlimit.op ; [#uses=1]
- %225 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=5]
- %226 = fmul float %69, 0x3F847AE140000000 ; [#uses=2]
- %227 = fmul float %69, %69 ; [#uses=1]
- %228 = fmul float %227, 0x3FB99999A0000000 ; [#uses=1]
- %229 = getelementptr inbounds %struct.btQuadWord* %n52, i32 0, i32 0, i32 0 ; [#uses=2]
- %230 = getelementptr inbounds %struct.btQuadWord* %n52, i32 0, i32 0, i32 1 ; [#uses=2]
- %231 = getelementptr inbounds %struct.btQuadWord* %n52, i32 0, i32 0, i32 2 ; [#uses=2]
- %232 = getelementptr inbounds %struct.btQuadWord* %n52, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb62
-
-bb24: ; preds = %invcont64
- %233 = getelementptr inbounds %struct.btHullTriangle* %iftmp.70.0.i, i32 0, i32 3 ; [#uses=1]
- %234 = load i32* %233, align 4 ; [#uses=9]
- %235 = getelementptr inbounds i32* %isextreme.3.1, i32 %234 ; [#uses=1]
- store i32 1, i32* %235, align 4
- %236 = load i32* %135, align 4 ; [#uses=1]
- %237 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %234, i32 0, i32 2 ; [#uses=1]
- %238 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %234, i32 0, i32 1 ; [#uses=1]
- %239 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %234, i32 0, i32 0 ; [#uses=1]
- %tmp272 = add i32 %236, -1 ; [#uses=1]
- br label %bb32
-
-bb25: ; preds = %bb32
- %240 = load %struct.btHullTriangle*** %225, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btHullTriangle** %240, i32 %tmp273 ; [#uses=1]
- %241 = load %struct.btHullTriangle** %scevgep, align 4 ; [#uses=5]
- %242 = icmp eq %struct.btHullTriangle* %241, null ; [#uses=1]
- br i1 %242, label %bb32.backedge, label %bb28
-
-bb32.backedge: ; preds = %bb30, %_Z5aboveP9btVector3RK4int3RKS_f.exit200, %bb25
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br label %bb32
-
-bb28: ; preds = %bb25
- %243 = getelementptr inbounds %struct.btHullTriangle* %241, i32 0, i32 0, i32 0 ; [#uses=1]
- %244 = load i32* %243, align 4 ; [#uses=3]
- %245 = getelementptr inbounds %struct.btHullTriangle* %241, i32 0, i32 0, i32 1 ; [#uses=1]
- %246 = load i32* %245, align 4 ; [#uses=3]
- %247 = getelementptr inbounds %struct.btHullTriangle* %241, i32 0, i32 0, i32 2 ; [#uses=1]
- %248 = load i32* %247, align 4 ; [#uses=3]
- %249 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %248, i32 0, i32 2 ; [#uses=1]
- %250 = load float* %249, align 4 ; [#uses=1]
- %251 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %246, i32 0, i32 2 ; [#uses=1]
- %252 = load float* %251, align 4 ; [#uses=2]
- %253 = fsub float %250, %252 ; [#uses=2]
- %254 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %248, i32 0, i32 1 ; [#uses=1]
- %255 = load float* %254, align 4 ; [#uses=1]
- %256 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %246, i32 0, i32 1 ; [#uses=1]
- %257 = load float* %256, align 4 ; [#uses=2]
- %258 = fsub float %255, %257 ; [#uses=2]
- %259 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %248, i32 0, i32 0 ; [#uses=1]
- %260 = load float* %259, align 4 ; [#uses=1]
- %261 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %246, i32 0, i32 0 ; [#uses=1]
- %262 = load float* %261, align 4 ; [#uses=2]
- %263 = fsub float %260, %262 ; [#uses=2]
- %264 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %244, i32 0, i32 2 ; [#uses=1]
- %265 = load float* %264, align 4 ; [#uses=2]
- %266 = fsub float %252, %265 ; [#uses=2]
- %267 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %244, i32 0, i32 1 ; [#uses=1]
- %268 = load float* %267, align 4 ; [#uses=2]
- %269 = fsub float %257, %268 ; [#uses=2]
- %270 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %244, i32 0, i32 0 ; [#uses=1]
- %271 = load float* %270, align 4 ; [#uses=2]
- %272 = fsub float %262, %271 ; [#uses=2]
- %273 = fmul float %272, %258 ; [#uses=1]
- %274 = fmul float %269, %263 ; [#uses=1]
- %275 = fsub float %273, %274 ; [#uses=3]
- %276 = fmul float %266, %263 ; [#uses=1]
- %277 = fmul float %272, %253 ; [#uses=1]
- %278 = fsub float %276, %277 ; [#uses=3]
- %279 = fmul float %269, %253 ; [#uses=1]
- %280 = fmul float %266, %258 ; [#uses=1]
- %281 = fsub float %279, %280 ; [#uses=3]
- %282 = fmul float %281, %281 ; [#uses=1]
- %283 = fmul float %278, %278 ; [#uses=1]
- %284 = fadd float %282, %283 ; [#uses=1]
- %285 = fmul float %275, %275 ; [#uses=1]
- %286 = fadd float %284, %285 ; [#uses=1]
- %287 = call float @sqrtf(float %286) nounwind readonly ; [#uses=2]
- %288 = fcmp oeq float %287, 0.000000e+00 ; [#uses=1]
- br i1 %288, label %_Z5aboveP9btVector3RK4int3RKS_f.exit200, label %bb1.i.i196
-
-bb1.i.i196: ; preds = %bb28
- %289 = fdiv float 1.000000e+00, %287 ; [#uses=3]
- %290 = fmul float %275, %289 ; [#uses=1]
- %291 = fmul float %278, %289 ; [#uses=1]
- %292 = fmul float %281, %289 ; [#uses=1]
- br label %_Z5aboveP9btVector3RK4int3RKS_f.exit200
-
-_Z5aboveP9btVector3RK4int3RKS_f.exit200: ; preds = %bb1.i.i196, %bb28
- %n.0.0.0.i197 = phi float [ %292, %bb1.i.i196 ], [ 1.000000e+00, %bb28 ] ; [#uses=1]
- %n.0.1.0.i198 = phi float [ %291, %bb1.i.i196 ], [ 0.000000e+00, %bb28 ] ; [#uses=1]
- %n.0.2.0.i199 = phi float [ %290, %bb1.i.i196 ], [ 0.000000e+00, %bb28 ] ; [#uses=1]
- %293 = load float* %237, align 4 ; [#uses=1]
- %294 = fsub float %293, %265 ; [#uses=1]
- %295 = load float* %238, align 4 ; [#uses=1]
- %296 = fsub float %295, %268 ; [#uses=1]
- %297 = load float* %239, align 4 ; [#uses=1]
- %298 = fsub float %297, %271 ; [#uses=1]
- %299 = fmul float %n.0.0.0.i197, %298 ; [#uses=1]
- %300 = fmul float %n.0.1.0.i198, %296 ; [#uses=1]
- %301 = fadd float %299, %300 ; [#uses=1]
- %302 = fmul float %n.0.2.0.i199, %294 ; [#uses=1]
- %303 = fadd float %301, %302 ; [#uses=1]
- %304 = fcmp ogt float %303, %226 ; [#uses=1]
- br i1 %304, label %bb30, label %bb32.backedge
-
-bb30: ; preds = %_Z5aboveP9btVector3RK4int3RKS_f.exit200
- invoke void @_ZN11HullLibrary7extrudeEP14btHullTrianglei(%struct.HullLibrary* %this, %struct.btHullTriangle* %241, i32 %234)
- to label %bb32.backedge unwind label %lpad85
-
-bb32: ; preds = %bb32.backedge, %bb24
- %indvar = phi i32 [ %indvar.next, %bb32.backedge ], [ 0, %bb24 ] ; [#uses=2]
- %tmp273 = sub i32 %tmp272, %indvar ; [#uses=2]
- %305 = icmp eq i32 %tmp273, -1 ; [#uses=1]
- br i1 %305, label %bb34, label %bb25
-
-bb34: ; preds = %bb32
- %306 = load i32* %135, align 4 ; [#uses=2]
- br label %bb47
-
-bb35: ; preds = %bb47
- %307 = load %struct.btHullTriangle*** %225, align 4 ; [#uses=2]
- %308 = getelementptr inbounds %struct.btHullTriangle** %307, i32 %382 ; [#uses=1]
- %309 = load %struct.btHullTriangle** %308, align 4 ; [#uses=5]
- %310 = icmp eq %struct.btHullTriangle* %309, null ; [#uses=1]
- br i1 %310, label %bb47, label %bb37
-
-bb37: ; preds = %bb35
- %311 = getelementptr inbounds %struct.btHullTriangle* %309, i32 0, i32 0, i32 0 ; [#uses=3]
- %312 = load i32* %311, align 4 ; [#uses=4]
- %313 = icmp eq i32 %312, %234 ; [#uses=1]
- br i1 %313, label %bb37.bb39_crit_edge, label %bb.i194
-
-bb37.bb39_crit_edge: ; preds = %bb37
- %.phi.trans.insert = getelementptr inbounds %struct.btHullTriangle* %309, i32 0, i32 0, i32 1 ; [#uses=1]
- %.pre315 = load i32* %.phi.trans.insert, align 4 ; [#uses=1]
- br label %bb39
-
-bb.i194: ; preds = %bb37
- %314 = getelementptr inbounds i32* %311, i32 1 ; [#uses=1]
- %315 = load i32* %314, align 4 ; [#uses=3]
- %316 = icmp eq i32 %315, %234 ; [#uses=1]
- br i1 %316, label %bb39, label %_Z7hasvertRK4int3i.exit
-
-_Z7hasvertRK4int3i.exit: ; preds = %bb.i194
- %317 = getelementptr inbounds i32* %311, i32 2 ; [#uses=1]
- %318 = load i32* %317, align 4 ; [#uses=1]
- %phitmp = icmp eq i32 %318, %234 ; [#uses=1]
- br i1 %phitmp, label %bb39, label %bb49
-
-bb39: ; preds = %_Z7hasvertRK4int3i.exit, %bb.i194, %bb37.bb39_crit_edge
- %319 = phi i32 [ %.pre315, %bb37.bb39_crit_edge ], [ %315, %_Z7hasvertRK4int3i.exit ], [ %315, %bb.i194 ] ; [#uses=3]
- %320 = getelementptr inbounds %struct.btHullTriangle* %309, i32 0, i32 0, i32 2 ; [#uses=1]
- %321 = load i32* %320, align 4 ; [#uses=3]
- %322 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %321, i32 0, i32 2 ; [#uses=1]
- %323 = load float* %322, align 4 ; [#uses=1]
- %324 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %319, i32 0, i32 2 ; [#uses=1]
- %325 = load float* %324, align 4 ; [#uses=2]
- %326 = fsub float %323, %325 ; [#uses=2]
- %327 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %321, i32 0, i32 1 ; [#uses=1]
- %328 = load float* %327, align 4 ; [#uses=1]
- %329 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %319, i32 0, i32 1 ; [#uses=1]
- %330 = load float* %329, align 4 ; [#uses=2]
- %331 = fsub float %328, %330 ; [#uses=2]
- %332 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %321, i32 0, i32 0 ; [#uses=1]
- %333 = load float* %332, align 4 ; [#uses=1]
- %334 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %319, i32 0, i32 0 ; [#uses=1]
- %335 = load float* %334, align 4 ; [#uses=2]
- %336 = fsub float %333, %335 ; [#uses=2]
- %337 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %312, i32 0, i32 2 ; [#uses=1]
- %338 = load float* %337, align 4 ; [#uses=2]
- %339 = fsub float %325, %338 ; [#uses=2]
- %340 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %312, i32 0, i32 1 ; [#uses=1]
- %341 = load float* %340, align 4 ; [#uses=2]
- %342 = fsub float %330, %341 ; [#uses=2]
- %343 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %312, i32 0, i32 0 ; [#uses=1]
- %344 = load float* %343, align 4 ; [#uses=2]
- %345 = fsub float %335, %344 ; [#uses=2]
- %346 = fmul float %345, %331 ; [#uses=1]
- %347 = fmul float %342, %336 ; [#uses=1]
- %348 = fsub float %346, %347 ; [#uses=3]
- %349 = fmul float %339, %336 ; [#uses=1]
- %350 = fmul float %345, %326 ; [#uses=1]
- %351 = fsub float %349, %350 ; [#uses=3]
- %352 = fmul float %342, %326 ; [#uses=1]
- %353 = fmul float %339, %331 ; [#uses=1]
- %354 = fsub float %352, %353 ; [#uses=3]
- %355 = fmul float %354, %354 ; [#uses=1]
- %356 = fmul float %351, %351 ; [#uses=1]
- %357 = fadd float %355, %356 ; [#uses=1]
- %358 = fmul float %348, %348 ; [#uses=1]
- %359 = fadd float %357, %358 ; [#uses=1]
- %360 = call float @sqrtf(float %359) nounwind readonly ; [#uses=3]
- %361 = fcmp oeq float %360, 0.000000e+00 ; [#uses=1]
- br i1 %361, label %_Z5aboveP9btVector3RK4int3RKS_f.exit, label %bb1.i.i193
-
-bb1.i.i193: ; preds = %bb39
- %362 = fdiv float 1.000000e+00, %360 ; [#uses=3]
- %363 = fmul float %348, %362 ; [#uses=1]
- %364 = fmul float %351, %362 ; [#uses=1]
- %365 = fmul float %354, %362 ; [#uses=1]
- br label %_Z5aboveP9btVector3RK4int3RKS_f.exit
-
-_Z5aboveP9btVector3RK4int3RKS_f.exit: ; preds = %bb1.i.i193, %bb39
- %n.0.0.0.i = phi float [ %365, %bb1.i.i193 ], [ 1.000000e+00, %bb39 ] ; [#uses=1]
- %n.0.1.0.i = phi float [ %364, %bb1.i.i193 ], [ 0.000000e+00, %bb39 ] ; [#uses=1]
- %n.0.2.0.i = phi float [ %363, %bb1.i.i193 ], [ 0.000000e+00, %bb39 ] ; [#uses=1]
- %366 = fsub float %112, %338 ; [#uses=1]
- %367 = fsub float %113, %341 ; [#uses=1]
- %368 = fsub float %114, %344 ; [#uses=1]
- %369 = fmul float %n.0.0.0.i, %368 ; [#uses=1]
- %370 = fmul float %n.0.1.0.i, %367 ; [#uses=1]
- %371 = fadd float %369, %370 ; [#uses=1]
- %372 = fmul float %n.0.2.0.i, %366 ; [#uses=1]
- %373 = fadd float %371, %372 ; [#uses=1]
- %374 = fcmp ogt float %373, %226 ; [#uses=1]
- %375 = fcmp olt float %360, %228 ; [#uses=1]
- %or.cond = or i1 %374, %375 ; [#uses=1]
- br i1 %or.cond, label %bb45, label %bb47
-
-bb45: ; preds = %_Z5aboveP9btVector3RK4int3RKS_f.exit
- %376 = getelementptr inbounds %struct.btHullTriangle* %309, i32 0, i32 1, i32 0 ; [#uses=1]
- %377 = load i32* %376, align 4 ; [#uses=1]
- %378 = getelementptr inbounds %struct.btHullTriangle** %307, i32 %377 ; [#uses=1]
- %379 = load %struct.btHullTriangle** %378, align 4 ; [#uses=1]
- invoke void @_ZN11HullLibrary7extrudeEP14btHullTrianglei(%struct.HullLibrary* %this, %struct.btHullTriangle* %379, i32 %234)
- to label %invcont46 unwind label %lpad85
-
-invcont46: ; preds = %bb45
- %380 = load i32* %135, align 4 ; [#uses=2]
- br label %bb47
-
-bb47: ; preds = %invcont46, %_Z5aboveP9btVector3RK4int3RKS_f.exit, %bb35, %bb34
- %381 = phi i32 [ %306, %bb34 ], [ %381, %bb35 ], [ %380, %invcont46 ], [ %381, %_Z5aboveP9btVector3RK4int3RKS_f.exit ] ; [#uses=3]
- %j.3 = phi i32 [ %306, %bb34 ], [ %382, %bb35 ], [ %380, %invcont46 ], [ %382, %_Z5aboveP9btVector3RK4int3RKS_f.exit ] ; [#uses=1]
- %382 = add nsw i32 %j.3, -1 ; [#uses=4]
- %383 = icmp eq i32 %382, -1 ; [#uses=1]
- br i1 %383, label %bb49, label %bb35
-
-bb49: ; preds = %bb47, %_Z7hasvertRK4int3i.exit
- %tmp279 = add i32 %381, -1 ; [#uses=1]
- br label %bb59
-
-bb50: ; preds = %bb59
- %384 = load %struct.btHullTriangle*** %225, align 4 ; [#uses=1]
- %scevgep281 = getelementptr %struct.btHullTriangle** %384, i32 %tmp280 ; [#uses=1]
- %385 = load %struct.btHullTriangle** %scevgep281, align 4 ; [#uses=4]
- %386 = icmp eq %struct.btHullTriangle* %385, null ; [#uses=1]
- br i1 %386, label %bb59.backedge, label %bb53
-
-bb59.backedge: ; preds = %bb58, %bb57, %bb50
- %indvar.next277 = add i32 %indvar276, 1 ; [#uses=1]
- br label %bb59
-
-bb53: ; preds = %bb50
- %387 = getelementptr inbounds %struct.btHullTriangle* %385, i32 0, i32 3 ; [#uses=3]
- %388 = load i32* %387, align 4 ; [#uses=1]
- %389 = icmp sgt i32 %388, -1 ; [#uses=1]
- br i1 %389, label %bb61, label %bb54
-
-bb54: ; preds = %bb53
- %390 = getelementptr inbounds %struct.btHullTriangle* %385, i32 0, i32 0, i32 0 ; [#uses=4]
- %391 = getelementptr inbounds i32* %390, i32 2 ; [#uses=1]
- %392 = load i32* %391, align 4 ; [#uses=3]
- %393 = getelementptr inbounds i32* %390, i32 1 ; [#uses=1]
- %394 = load i32* %393, align 4 ; [#uses=3]
- %395 = load i32* %390, align 4 ; [#uses=3]
- %396 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %392, i32 0, i32 2 ; [#uses=1]
- %397 = load float* %396, align 4 ; [#uses=1]
- %398 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %394, i32 0, i32 2 ; [#uses=1]
- %399 = load float* %398, align 4 ; [#uses=2]
- %400 = fsub float %397, %399 ; [#uses=2]
- %401 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %392, i32 0, i32 1 ; [#uses=1]
- %402 = load float* %401, align 4 ; [#uses=1]
- %403 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %394, i32 0, i32 1 ; [#uses=1]
- %404 = load float* %403, align 4 ; [#uses=2]
- %405 = fsub float %402, %404 ; [#uses=2]
- %406 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %392, i32 0, i32 0 ; [#uses=1]
- %407 = load float* %406, align 4 ; [#uses=1]
- %408 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %394, i32 0, i32 0 ; [#uses=1]
- %409 = load float* %408, align 4 ; [#uses=2]
- %410 = fsub float %407, %409 ; [#uses=2]
- %411 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %395, i32 0, i32 2 ; [#uses=1]
- %412 = load float* %411, align 4 ; [#uses=1]
- %413 = fsub float %399, %412 ; [#uses=2]
- %414 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %395, i32 0, i32 1 ; [#uses=1]
- %415 = load float* %414, align 4 ; [#uses=1]
- %416 = fsub float %404, %415 ; [#uses=2]
- %417 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %395, i32 0, i32 0 ; [#uses=1]
- %418 = load float* %417, align 4 ; [#uses=1]
- %419 = fsub float %409, %418 ; [#uses=2]
- %420 = fmul float %419, %405 ; [#uses=1]
- %421 = fmul float %416, %410 ; [#uses=1]
- %422 = fsub float %420, %421 ; [#uses=3]
- %423 = fmul float %413, %410 ; [#uses=1]
- %424 = fmul float %419, %400 ; [#uses=1]
- %425 = fsub float %423, %424 ; [#uses=3]
- %426 = fmul float %416, %400 ; [#uses=1]
- %427 = fmul float %413, %405 ; [#uses=1]
- %428 = fsub float %426, %427 ; [#uses=3]
- %429 = fmul float %428, %428 ; [#uses=1]
- %430 = fmul float %425, %425 ; [#uses=1]
- %431 = fadd float %429, %430 ; [#uses=1]
- %432 = fmul float %422, %422 ; [#uses=1]
- %433 = fadd float %431, %432 ; [#uses=1]
- %434 = call float @sqrtf(float %433) nounwind readonly ; [#uses=2]
- %435 = fcmp oeq float %434, 0.000000e+00 ; [#uses=1]
- br i1 %435, label %invcont55, label %bb1.i192
-
-bb1.i192: ; preds = %bb54
- %436 = fdiv float 1.000000e+00, %434 ; [#uses=3]
- %437 = fmul float %422, %436 ; [#uses=1]
- %438 = fmul float %425, %436 ; [#uses=1]
- %439 = fmul float %428, %436 ; [#uses=1]
- br label %invcont55
-
-invcont55: ; preds = %bb1.i192, %bb54
- %storemerge318 = phi float [ %439, %bb1.i192 ], [ 1.000000e+00, %bb54 ] ; [#uses=1]
- %storemerge317 = phi float [ %438, %bb1.i192 ], [ 0.000000e+00, %bb54 ] ; [#uses=1]
- %storemerge = phi float [ %437, %bb1.i192 ], [ 0.000000e+00, %bb54 ] ; [#uses=1]
- store float %storemerge318, float* %229, align 8
- store float %storemerge317, float* %230, align 4
- store float %storemerge, float* %231, align 8
- store float 0.000000e+00, float* %232, align 4
- %440 = call i32 @_Z12maxdirsteridI9btVector3EiPKT_iRS2_R20btAlignedObjectArrayIiE(%struct.btQuadWord* %verts, i32 %verts_count, %struct.btQuadWord* %n52, %"struct.btAlignedObjectArray<int>"* %allow) ; [#uses=5]
- store i32 %440, i32* %387, align 4
- %441 = getelementptr inbounds i32* %isextreme.3.1, i32 %440 ; [#uses=1]
- %442 = load i32* %441, align 4 ; [#uses=1]
- %443 = icmp eq i32 %442, 0 ; [#uses=1]
- br i1 %443, label %bb58, label %bb57
-
-bb57: ; preds = %invcont55
- store i32 -1, i32* %387, align 4
- br label %bb59.backedge
-
-bb58: ; preds = %invcont55
- %444 = load i32* %390, align 4 ; [#uses=3]
- %445 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %440, i32 0, i32 2 ; [#uses=1]
- %446 = load float* %445, align 4 ; [#uses=1]
- %447 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %444, i32 0, i32 2 ; [#uses=1]
- %448 = load float* %447, align 4 ; [#uses=1]
- %449 = fsub float %446, %448 ; [#uses=1]
- %450 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %440, i32 0, i32 1 ; [#uses=1]
- %451 = load float* %450, align 4 ; [#uses=1]
- %452 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %444, i32 0, i32 1 ; [#uses=1]
- %453 = load float* %452, align 4 ; [#uses=1]
- %454 = fsub float %451, %453 ; [#uses=1]
- %455 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %440, i32 0, i32 0 ; [#uses=1]
- %456 = load float* %455, align 4 ; [#uses=1]
- %457 = getelementptr inbounds %struct.btQuadWord* %verts, i32 %444, i32 0, i32 0 ; [#uses=1]
- %458 = load float* %457, align 4 ; [#uses=1]
- %459 = fsub float %456, %458 ; [#uses=1]
- %460 = load float* %229, align 8 ; [#uses=1]
- %461 = fmul float %460, %459 ; [#uses=1]
- %462 = load float* %230, align 4 ; [#uses=1]
- %463 = fmul float %462, %454 ; [#uses=1]
- %464 = fadd float %461, %463 ; [#uses=1]
- %465 = load float* %231, align 8 ; [#uses=1]
- %466 = fmul float %465, %449 ; [#uses=1]
- %467 = fadd float %464, %466 ; [#uses=1]
- %468 = getelementptr inbounds %struct.btHullTriangle* %385, i32 0, i32 4 ; [#uses=1]
- store float %467, float* %468, align 4
- br label %bb59.backedge
-
-bb59: ; preds = %bb59.backedge, %bb49
- %indvar276 = phi i32 [ %indvar.next277, %bb59.backedge ], [ 0, %bb49 ] ; [#uses=2]
- %tmp280 = sub i32 %tmp279, %indvar276 ; [#uses=2]
- %469 = icmp eq i32 %tmp280, -1 ; [#uses=1]
- br i1 %469, label %bb61, label %bb50
-
-bb61: ; preds = %bb59, %bb53
- %indvar.next283 = add i32 %indvar282, 1 ; [#uses=1]
- br label %bb62
-
-bb62: ; preds = %bb61, %bb23
- %indvar282 = phi i32 [ %indvar.next283, %bb61 ], [ 0, %bb23 ] ; [#uses=2]
- %vlimit_addr.1 = sub i32 %224, %indvar282 ; [#uses=1]
- %470 = icmp slt i32 %vlimit_addr.1, 1 ; [#uses=1]
- br i1 %470, label %bb73, label %bb63
-
-bb63: ; preds = %bb62
- %471 = load i32* %135, align 4 ; [#uses=3]
- %472 = icmp sgt i32 %471, 0 ; [#uses=1]
- br i1 %472, label %bb.nph.i, label %invcont64
-
-bb.nph.i: ; preds = %bb63
- %tmp = icmp sgt i32 %471, 1 ; [#uses=1]
- %smax = select i1 %tmp, i32 %471, i32 1 ; [#uses=1]
- br label %bb.i187
-
-bb.i187: ; preds = %bb7.i, %bb.nph.i
- %t.116.i = phi %struct.btHullTriangle* [ null, %bb.nph.i ], [ %t.0.i, %bb7.i ] ; [#uses=4]
- %i.015.i = phi i32 [ 0, %bb.nph.i ], [ %484, %bb7.i ] ; [#uses=3]
- %473 = icmp eq %struct.btHullTriangle* %t.116.i, null ; [#uses=1]
- br i1 %473, label %bb6.i, label %bb1.i188
-
-bb1.i188: ; preds = %bb.i187
- %474 = load %struct.btHullTriangle*** %225, align 4 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btHullTriangle** %474, i32 %i.015.i ; [#uses=1]
- %475 = load %struct.btHullTriangle** %scevgep.i, align 4 ; [#uses=2]
- %476 = icmp eq %struct.btHullTriangle* %475, null ; [#uses=1]
- br i1 %476, label %bb7.i, label %bb2.i189
-
-bb2.i189: ; preds = %bb1.i188
- %477 = getelementptr inbounds %struct.btHullTriangle* %t.116.i, i32 0, i32 4 ; [#uses=1]
- %478 = load float* %477, align 4 ; [#uses=1]
- %479 = getelementptr inbounds %struct.btHullTriangle* %475, i32 0, i32 4 ; [#uses=1]
- %480 = load float* %479, align 4 ; [#uses=1]
- %481 = fcmp olt float %478, %480 ; [#uses=1]
- br i1 %481, label %bb6.i, label %bb7.i
-
-bb6.i: ; preds = %bb2.i189, %bb.i187
- %482 = load %struct.btHullTriangle*** %225, align 4 ; [#uses=1]
- %scevgep17.i = getelementptr %struct.btHullTriangle** %482, i32 %i.015.i ; [#uses=1]
- %483 = load %struct.btHullTriangle** %scevgep17.i, align 4 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb6.i, %bb2.i189, %bb1.i188
- %t.0.i = phi %struct.btHullTriangle* [ %483, %bb6.i ], [ %t.116.i, %bb2.i189 ], [ %t.116.i, %bb1.i188 ] ; [#uses=2]
- %484 = add nsw i32 %i.015.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %484, %smax ; [#uses=1]
- br i1 %exitcond, label %invcont64, label %bb.i187
-
-invcont64: ; preds = %bb7.i, %bb63
- %t.1.lcssa.i = phi %struct.btHullTriangle* [ null, %bb63 ], [ %t.0.i, %bb7.i ] ; [#uses=2]
- %485 = getelementptr inbounds %struct.btHullTriangle* %t.1.lcssa.i, i32 0, i32 4 ; [#uses=1]
- %486 = load float* %485, align 4 ; [#uses=1]
- %487 = fcmp ogt float %486, %69 ; [#uses=1]
- %iftmp.70.0.i = select i1 %487, %struct.btHullTriangle* %t.1.lcssa.i, %struct.btHullTriangle* null ; [#uses=2]
- %488 = icmp eq %struct.btHullTriangle* %iftmp.70.0.i, null ; [#uses=1]
- br i1 %488, label %bb73, label %bb24
-
-bb73: ; preds = %invcont64, %bb62, %invcont13
- %.1 = phi i32 [ 0, %invcont13 ], [ 1, %bb62 ], [ 1, %invcont64 ] ; [#uses=2]
- %489 = load i32** %11, align 4 ; [#uses=2]
- %490 = icmp eq i32* %489, null ; [#uses=1]
- br i1 %490, label %bb80, label %bb.i.i.i182
-
-bb.i.i.i182: ; preds = %bb73
- %491 = load i8* %10, align 8 ; [#uses=1]
- %toBool.i.i.i181 = icmp eq i8 %491, 0 ; [#uses=1]
- br i1 %toBool.i.i.i181, label %bb2.i.i.i184, label %bb1.i.i.i183
-
-bb1.i.i.i183: ; preds = %bb.i.i.i182
- %492 = bitcast i32* %489 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %492)
- to label %bb2.i.i.i184 unwind label %lpad
-
-bb2.i.i.i184: ; preds = %bb1.i.i.i183, %bb.i.i.i182
- store i32* null, i32** %11, align 4
- br label %bb80
-
-invcont78: ; preds = %bb1.i.i.i, %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.0)
- unreachable
-
-bb80: ; preds = %bb2.i.i.i184, %bb73
- store i8 1, i8* %10, align 8
- store i32* null, i32** %11, align 4
- store i32 0, i32* %12, align 4
- store i32 0, i32* %13, align 8
- %493 = icmp eq i32* %isextreme.3.1, null ; [#uses=1]
- br i1 %493, label %_ZN20btAlignedObjectArrayIiED1Ev.exit180, label %bb2.i.i.i179
-
-bb2.i.i.i179: ; preds = %bb80
- %494 = bitcast i32* %isextreme.3.1 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %494)
- ret i32 %.1
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit180: ; preds = %bb80
- ret i32 %.1
-
-bb81: ; preds = %entry
- ret i32 0
-
-lpad: ; preds = %bb1.i.i.i183, %bb.i2.i
- %isextreme.3.2 = phi i32* [ %isextreme.3.1, %bb1.i.i.i183 ], [ null, %bb.i2.i ] ; [#uses=1]
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select84 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad85: ; preds = %bb45, %bb30, %invcont18, %invcont17, %invcont16, %bb15, %bb1.i.i.i154, %bb.i2.i.i140, %bb1.i.i.i131, %bb.i2.i.i, %bb.i2.i105
- %isextreme.3.3 = phi i32* [ %isextreme.3.1, %invcont18 ], [ %isextreme.3.1, %invcont17 ], [ %isextreme.3.1, %invcont16 ], [ %isextreme.3.1, %bb15 ], [ %phitmp.i, %bb.i2.i105 ], [ %isextreme.3.1, %bb30 ], [ %isextreme.3.1, %bb45 ], [ %isextreme.3.1, %bb.i2.i.i ], [ %isextreme.3.1, %bb1.i.i.i131 ], [ %isextreme.3.1, %bb.i2.i.i140 ], [ %isextreme.3.1, %bb1.i.i.i154 ] ; [#uses=1]
- %eh_ptr86 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select88 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr86, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %495 = load i32** %11, align 4 ; [#uses=2]
- %496 = icmp eq i32* %495, null ; [#uses=1]
- br i1 %496, label %_ZN20btAlignedObjectArrayIiED1Ev.exit175, label %bb.i.i.i171
-
-bb.i.i.i171: ; preds = %lpad85
- %497 = load i8* %10, align 8 ; [#uses=1]
- %toBool.i.i.i170 = icmp eq i8 %497, 0 ; [#uses=1]
- br i1 %toBool.i.i.i170, label %bb2.i.i.i173, label %bb1.i.i.i172
-
-bb1.i.i.i172: ; preds = %bb.i.i.i171
- %498 = bitcast i32* %495 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %498)
- to label %bb2.i.i.i173 unwind label %lpad89
-
-bb2.i.i.i173: ; preds = %bb1.i.i.i172, %bb.i.i.i171
- store i32* null, i32** %11, align 4
- br label %_ZN20btAlignedObjectArrayIiED1Ev.exit175
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit175: ; preds = %bb2.i.i.i173, %lpad85
- store i8 1, i8* %10, align 8
- store i32* null, i32** %11, align 4
- store i32 0, i32* %12, align 4
- store i32 0, i32* %13, align 8
- br label %ppad
-
-lpad89: ; preds = %bb1.i.i.i172
- %eh_ptr90 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select92 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr90, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad93: ; preds = %bb1.i.i.i
- %eh_ptr94 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select96 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr94, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayIiED1Ev.exit175, %lpad
- %isextreme.3.4 = phi i32* [ %isextreme.3.3, %_ZN20btAlignedObjectArrayIiED1Ev.exit175 ], [ %isextreme.3.2, %lpad ] ; [#uses=2]
- %eh_exception.0 = phi i8* [ %eh_ptr86, %_ZN20btAlignedObjectArrayIiED1Ev.exit175 ], [ %eh_ptr, %lpad ] ; [#uses=1]
- %499 = icmp eq i32* %isextreme.3.4, null ; [#uses=1]
- br i1 %499, label %invcont78, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %ppad
- %500 = bitcast i32* %isextreme.3.4 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %500)
- to label %invcont78 unwind label %lpad93
-}
-
-; [#uses=2]
-define i32 @_ZN11HullLibrary8calchullEP9btVector3iR20btAlignedObjectArrayIjERii(%struct.HullLibrary* %this, %struct.btQuadWord* %verts, i32 %verts_count, %"struct.btAlignedObjectArray<int>"* nocapture %tris_out, i32* nocapture %tris_count, i32 %vlimit) align 2 {
-entry:
- %0 = alloca i32, align 4 ; [#uses=2]
- %1 = call i32 @_ZN11HullLibrary11calchullgenEP9btVector3ii(%struct.HullLibrary* %this, %struct.btQuadWord* %verts, i32 %verts_count, i32 %vlimit) ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb21, label %bb9.preheader
-
-bb9.preheader: ; preds = %entry
- %3 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 1 ; [#uses=3]
- %4 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 3 ; [#uses=6]
- br label %bb9
-
-bb2: ; preds = %bb9
- %5 = load %struct.btHullTriangle*** %4, align 4 ; [#uses=1]
- %scevgep111 = getelementptr %struct.btHullTriangle** %5, i32 %32 ; [#uses=1]
- %6 = load %struct.btHullTriangle** %scevgep111, align 4 ; [#uses=1]
- %7 = icmp eq %struct.btHullTriangle* %6, null ; [#uses=1]
- br i1 %7, label %bb8, label %bb5.preheader
-
-bb5.preheader: ; preds = %bb2
- %tmp99 = shl i32 %ts.1.2, 1 ; [#uses=1]
- br label %bb5
-
-bb4: ; preds = %bb5
- %8 = icmp eq i32 %ts.2.1, %tmp83 ; [#uses=1]
- br i1 %8, label %bb.i, label %bb1.i
-
-bb.i: ; preds = %bb4
- %9 = icmp eq i32 %tmp83, 0 ; [#uses=1]
- %iftmp.190.0.i.i = select i1 %9, i32 1, i32 %tmp100 ; [#uses=5]
- %10 = icmp slt i32 %ts.2.1, %iftmp.190.0.i.i ; [#uses=1]
- br i1 %10, label %bb.i.i41, label %bb1.i
-
-bb.i.i41: ; preds = %bb.i
- %11 = icmp eq i32 %iftmp.190.0.i.i, 0 ; [#uses=1]
- br i1 %11, label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i, label %bb.i2.i.i
-
-bb.i2.i.i: ; preds = %bb.i.i41
- %12 = shl i32 %iftmp.190.0.i.i, 2 ; [#uses=1]
- %13 = invoke i8* @_Z22btAlignedAllocInternalji(i32 %12, i32 16)
- to label %.noexc56 unwind label %lpad ; [#uses=1]
-
-.noexc56: ; preds = %bb.i2.i.i
- %phitmp.i.i = bitcast i8* %13 to i32* ; [#uses=1]
- br label %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
-
-_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i: ; preds = %.noexc56, %bb.i.i41
- %14 = phi i32* [ %phitmp.i.i, %.noexc56 ], [ null, %bb.i.i41 ] ; [#uses=3]
- %15 = icmp sgt i32 %tmp83, 0 ; [#uses=1]
- br i1 %15, label %bb.i4.i.i45, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
-
-bb.i4.i.i45: ; preds = %bb3.i.i.i50, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %indvar.i.i.i43 = phi i32 [ %indvar.next.i.i.i48, %bb3.i.i.i50 ], [ 0, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i ] ; [#uses=3]
- %scevgep.i.i.i44 = getelementptr i32* %14, i32 %indvar.i.i.i43 ; [#uses=2]
- %16 = icmp eq i32* %scevgep.i.i.i44, null ; [#uses=1]
- br i1 %16, label %bb3.i.i.i50, label %bb1.i5.i.i47
-
-bb1.i5.i.i47: ; preds = %bb.i4.i.i45
- %scevgep8.i.i.i46 = getelementptr i32* %ts.3.1, i32 %indvar.i.i.i43 ; [#uses=1]
- %17 = load i32* %scevgep8.i.i.i46, align 4 ; [#uses=1]
- store i32 %17, i32* %scevgep.i.i.i44, align 4
- br label %bb3.i.i.i50
-
-bb3.i.i.i50: ; preds = %bb1.i5.i.i47, %bb.i4.i.i45
- %indvar.next.i.i.i48 = add i32 %indvar.i.i.i43, 1 ; [#uses=2]
- %exitcond84 = icmp eq i32 %indvar.next.i.i.i48, %tmp83 ; [#uses=1]
- br i1 %exitcond84, label %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, label %bb.i4.i.i45
-
-_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i: ; preds = %bb3.i.i.i50, %_ZN20btAlignedObjectArrayIiE8allocateEi.exit.i.i
- %18 = icmp eq i32* %ts.3.1, null ; [#uses=1]
- br i1 %18, label %bb1.i, label %bb1.i.i.i53
-
-bb1.i.i.i53: ; preds = %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i
- %19 = bitcast i32* %ts.3.1 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %19)
- to label %bb1.i unwind label %lpad.thread
-
-lpad.thread: ; preds = %bb1.i.i.i53
- %eh_ptr59 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select2460 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr59, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %bb1.i.i.i
-
-bb1.i: ; preds = %bb1.i.i.i53, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i, %bb.i, %bb4
- %ts.3.0 = phi i32* [ %ts.3.1, %bb.i ], [ %ts.3.1, %bb4 ], [ %14, %bb1.i.i.i53 ], [ %14, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i ] ; [#uses=2]
- %ts.2.0 = phi i32 [ %ts.2.1, %bb.i ], [ %ts.2.1, %bb4 ], [ %iftmp.190.0.i.i, %bb1.i.i.i53 ], [ %iftmp.190.0.i.i, %_ZNK20btAlignedObjectArrayIiE4copyEiiPi.exit.i.i ] ; [#uses=1]
- %scevgep97 = getelementptr i32* %ts.3.0, i32 %tmp83 ; [#uses=2]
- %20 = icmp eq i32* %scevgep97, null ; [#uses=1]
- br i1 %20, label %invcont, label %bb2.i
-
-bb2.i: ; preds = %bb1.i
- %uglygep = getelementptr i8* %27, i32 %tmp101 ; [#uses=1]
- %uglygep102 = bitcast i8* %uglygep to i32* ; [#uses=1]
- %21 = load i32* %uglygep102, align 4 ; [#uses=1]
- store i32 %21, i32* %scevgep97, align 4
- br label %invcont
-
-invcont: ; preds = %bb2.i, %bb1.i
- %22 = add nsw i32 %23, 1 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %invcont, %bb5.preheader
- %ts.3.1 = phi i32* [ %ts.3.0, %invcont ], [ %ts.3.4, %bb5.preheader ] ; [#uses=9]
- %ts.2.1 = phi i32 [ %ts.2.0, %invcont ], [ %ts.2.3, %bb5.preheader ] ; [#uses=5]
- %23 = phi i32 [ %22, %invcont ], [ 0, %bb5.preheader ] ; [#uses=5]
- %tmp83 = add i32 %ts.1.2, %23 ; [#uses=6]
- %tmp98 = shl i32 %23, 1 ; [#uses=1]
- %tmp100 = add i32 %tmp99, %tmp98 ; [#uses=1]
- %tmp101 = shl i32 %23, 2 ; [#uses=1]
- %24 = icmp slt i32 %23, 3 ; [#uses=1]
- %25 = load %struct.btHullTriangle*** %4, align 4 ; [#uses=2]
- %scevgep110 = getelementptr %struct.btHullTriangle** %25, i32 %32 ; [#uses=1]
- %26 = load %struct.btHullTriangle** %scevgep110, align 4 ; [#uses=2]
- %27 = bitcast %struct.btHullTriangle* %26 to i8* ; [#uses=2]
- br i1 %24, label %bb4, label %bb6
-
-bb6: ; preds = %bb5
- %28 = getelementptr inbounds %struct.btHullTriangle* %26, i32 0, i32 2 ; [#uses=1]
- %29 = load i32* %28, align 4 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btHullTriangle** %25, i32 %29 ; [#uses=1]
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %30, align 4
- invoke void @_Z21btAlignedFreeInternalPv(i8* %27)
- to label %bb8 unwind label %lpad
-
-bb8: ; preds = %bb6, %bb2
- %ts.3.2 = phi i32* [ %ts.3.4, %bb2 ], [ %ts.3.1, %bb6 ] ; [#uses=1]
- %ts.2.2 = phi i32 [ %ts.2.3, %bb2 ], [ %ts.2.1, %bb6 ] ; [#uses=1]
- %ts.1.1 = phi i32 [ %ts.1.2, %bb2 ], [ %tmp83, %bb6 ] ; [#uses=1]
- %31 = add nsw i32 %32, 1 ; [#uses=1]
- br label %bb9
-
-bb9: ; preds = %bb8, %bb9.preheader
- %ts.3.4 = phi i32* [ %ts.3.2, %bb8 ], [ null, %bb9.preheader ] ; [#uses=7]
- %ts.2.3 = phi i32 [ %ts.2.2, %bb8 ], [ 0, %bb9.preheader ] ; [#uses=2]
- %ts.1.2 = phi i32 [ %ts.1.1, %bb8 ], [ 0, %bb9.preheader ] ; [#uses=7]
- %32 = phi i32 [ %31, %bb8 ], [ 0, %bb9.preheader ] ; [#uses=4]
- %33 = load i32* %3, align 4 ; [#uses=1]
- %34 = icmp sgt i32 %33, %32 ; [#uses=1]
- br i1 %34, label %bb2, label %bb11
-
-bb11: ; preds = %bb9
- %35 = sdiv i32 %ts.1.2, 3 ; [#uses=1]
- store i32 %35, i32* %tris_count, align 4
- store i32 0, i32* %0, align 4
- invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(%"struct.btAlignedObjectArray<int>"* %tris_out, i32 %ts.1.2, i32* %0) inlinehint
- to label %bb14.preheader unwind label %lpad
-
-bb14.preheader: ; preds = %bb11
- %36 = icmp sgt i32 %ts.1.2, 0 ; [#uses=1]
- br i1 %36, label %bb.nph, label %bb16
-
-bb.nph: ; preds = %bb14.preheader
- %37 = getelementptr inbounds %"struct.btAlignedObjectArray<int>"* %tris_out, i32 0, i32 3 ; [#uses=1]
- br label %bb13
-
-bb13: ; preds = %bb13, %bb.nph
- %i.164 = phi i32 [ 0, %bb.nph ], [ %40, %bb13 ] ; [#uses=3]
- %scevgep81 = getelementptr i32* %ts.3.4, i32 %i.164 ; [#uses=1]
- %38 = load i32** %37, align 4 ; [#uses=1]
- %39 = load i32* %scevgep81, align 4 ; [#uses=1]
- %scevgep82 = getelementptr i32* %38, i32 %i.164 ; [#uses=1]
- store i32 %39, i32* %scevgep82, align 4
- %40 = add nsw i32 %i.164, 1 ; [#uses=2]
- %exitcond80 = icmp eq i32 %40, %ts.1.2 ; [#uses=1]
- br i1 %exitcond80, label %bb16, label %bb13
-
-bb16: ; preds = %bb13, %bb14.preheader
- %41 = load i32* %3, align 4 ; [#uses=4]
- %42 = icmp sgt i32 %41, 0 ; [#uses=1]
- %.not = xor i1 %42, true ; [#uses=1]
- %43 = icmp slt i32 %41, 0 ; [#uses=1]
- %or.cond = and i1 %.not, %43 ; [#uses=1]
- br i1 %or.cond, label %bb4.i, label %invcont17
-
-bb4.i: ; preds = %bb16
- %44 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 2 ; [#uses=2]
- %45 = load i32* %44, align 4 ; [#uses=1]
- %46 = icmp slt i32 %45, 0 ; [#uses=1]
- br i1 %46, label %_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i, label %bb.nph.i
-
-_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i: ; preds = %bb4.i
- %47 = load %struct.btHullTriangle*** %4, align 4 ; [#uses=2]
- %48 = icmp eq %struct.btHullTriangle** %47, null ; [#uses=1]
- br i1 %48, label %bb11.preheader.i, label %bb.i.i.i37
-
-bb.i.i.i37: ; preds = %_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i
- %49 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- %50 = load i8* %49, align 4 ; [#uses=1]
- %toBool.i.i.i36 = icmp eq i8 %50, 0 ; [#uses=1]
- br i1 %toBool.i.i.i36, label %bb2.i.i.i39, label %bb1.i.i.i38
-
-bb1.i.i.i38: ; preds = %bb.i.i.i37
- %51 = bitcast %struct.btHullTriangle** %47 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %51)
- to label %bb2.i.i.i39 unwind label %lpad
-
-bb2.i.i.i39: ; preds = %bb1.i.i.i38, %bb.i.i.i37
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %4, align 4
- br label %bb11.preheader.i
-
-bb11.preheader.i: ; preds = %bb2.i.i.i39, %_ZN20btAlignedObjectArrayIP14btHullTriangleE8allocateEi.exit.i.i
- %52 = getelementptr inbounds %struct.HullLibrary* %this, i32 0, i32 0, i32 4 ; [#uses=1]
- store i8 1, i8* %52, align 4
- store %struct.btHullTriangle** null, %struct.btHullTriangle*** %4, align 4
- store i32 0, i32* %44, align 4
- br label %bb.nph.i
-
-bb.nph.i: ; preds = %bb11.preheader.i, %bb4.i
- %tmp.i = sub i32 0, %41 ; [#uses=1]
- br label %bb7.i
-
-bb7.i: ; preds = %bb10.i, %bb.nph.i
- %indvar.i = phi i32 [ 0, %bb.nph.i ], [ %indvar.next.i, %bb10.i ] ; [#uses=2]
- %tmp = add i32 %41, %indvar.i ; [#uses=1]
- %53 = load %struct.btHullTriangle*** %4, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btHullTriangle** %53, i32 %tmp ; [#uses=2]
- %54 = icmp eq %struct.btHullTriangle** %scevgep, null ; [#uses=1]
- br i1 %54, label %bb10.i, label %bb8.i
-
-bb8.i: ; preds = %bb7.i
- store %struct.btHullTriangle* null, %struct.btHullTriangle** %scevgep, align 4
- br label %bb10.i
-
-bb10.i: ; preds = %bb8.i, %bb7.i
- %indvar.next.i = add i32 %indvar.i, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next.i, %tmp.i ; [#uses=1]
- br i1 %exitcond, label %invcont17, label %bb7.i
-
-invcont17: ; preds = %bb10.i, %bb16
- store i32 0, i32* %3, align 4
- %55 = icmp eq i32* %ts.3.4, null ; [#uses=1]
- br i1 %55, label %_ZN20btAlignedObjectArrayIiED1Ev.exit35, label %bb2.i.i.i34
-
-bb2.i.i.i34: ; preds = %invcont17
- %56 = bitcast i32* %ts.3.4 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %56)
- ret i32 1
-
-_ZN20btAlignedObjectArrayIiED1Ev.exit35: ; preds = %invcont17
- ret i32 1
-
-invcont19: ; preds = %bb1.i.i.i, %lpad
- %eh_ptr63 = phi i8* [ %eh_ptr, %lpad ], [ %eh_ptr62, %bb1.i.i.i ] ; [#uses=1]
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_ptr63)
- unreachable
-
-bb21: ; preds = %entry
- ret i32 0
-
-lpad: ; preds = %bb1.i.i.i38, %bb11, %bb6, %bb.i2.i.i
- %ts.3.3 = phi i32* [ %ts.3.4, %bb1.i.i.i38 ], [ %ts.3.4, %bb11 ], [ %ts.3.1, %bb.i2.i.i ], [ %ts.3.1, %bb6 ] ; [#uses=2]
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=3]
- %eh_select24 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %57 = icmp eq i32* %ts.3.3, null ; [#uses=1]
- br i1 %57, label %invcont19, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %lpad, %lpad.thread
- %ts.3.361 = phi i32* [ %ts.3.1, %lpad.thread ], [ %ts.3.3, %lpad ] ; [#uses=1]
- %eh_ptr62 = phi i8* [ %eh_ptr59, %lpad.thread ], [ %eh_ptr, %lpad ] ; [#uses=1]
- %58 = bitcast i32* %ts.3.361 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %58)
- to label %invcont19 unwind label %lpad25
-
-lpad25: ; preds = %bb1.i.i.i
- %eh_ptr26 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select28 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr26, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN11HullLibrary11ComputeHullEjPK9btVector3R11PHullResultj(%struct.HullLibrary* %this, i32 %vcount, %struct.btQuadWord* %vertices, %struct.PHullResult* nocapture %result, i32 %vlimit) align 2 {
-entry:
- %tris_count = alloca i32, align 4 ; [#uses=2]
- %0 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 4 ; [#uses=1]
- %1 = call i32 @_ZN11HullLibrary8calchullEP9btVector3iR20btAlignedObjectArrayIjERii(%struct.HullLibrary* %this, %struct.btQuadWord* %vertices, i32 %vcount, %"struct.btAlignedObjectArray<int>"* %0, i32* %tris_count, i32 %vlimit) ; [#uses=1]
- %2 = icmp eq i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb2, label %bb1
-
-bb1: ; preds = %entry
- %3 = load i32* %tris_count, align 4 ; [#uses=2]
- %4 = mul nsw i32 %3, 3 ; [#uses=1]
- %5 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 1 ; [#uses=1]
- store i32 %4, i32* %5, align 4
- %6 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 2 ; [#uses=1]
- store i32 %3, i32* %6, align 4
- %7 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 3 ; [#uses=1]
- store %struct.btQuadWord* %vertices, %struct.btQuadWord** %7, align 4
- %8 = getelementptr inbounds %struct.PHullResult* %result, i32 0, i32 0 ; [#uses=1]
- store i32 %vcount, i32* %8, align 4
- ret i8 1
-
-bb2: ; preds = %entry
- ret i8 0
-}
-
-; [#uses=1]
-define i32 @_ZN11HullLibrary16CreateConvexHullERK8HullDescR10HullResult(%struct.HullLibrary* %this, %struct.HullDesc* nocapture %desc, %struct.HullResult* nocapture %result) align 2 {
-invcont:
- %tris_count.i = alloca i32, align 4 ; [#uses=2]
- %0 = alloca i32, align 4 ; [#uses=2]
- %1 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %2 = alloca i32, align 4 ; [#uses=2]
- %3 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %4 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %5 = alloca %struct.btQuadWord, align 8 ; [#uses=1]
- %hr = alloca %struct.PHullResult, align 8 ; [#uses=9]
- %vertexSource = alloca %"struct.btAlignedObjectArray<btVector3>", align 8 ; [#uses=5]
- %scale = alloca %struct.btQuadWord, align 8 ; [#uses=4]
- %ovcount = alloca i32, align 4 ; [#uses=8]
- %vertexScratch = alloca %"struct.btAlignedObjectArray<btVector3>", align 8 ; [#uses=5]
- %6 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 4, i32 4 ; [#uses=5]
- store i8 1, i8* %6, align 8
- %7 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 4, i32 3 ; [#uses=8]
- store i32* null, i32** %7, align 4
- %8 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 4, i32 1 ; [#uses=3]
- store i32 0, i32* %8, align 4
- %9 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 4, i32 2 ; [#uses=2]
- store i32 0, i32* %9, align 8
- %10 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 0 ; [#uses=3]
- store i32 0, i32* %10, align 8
- %11 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 1 ; [#uses=3]
- store i32 0, i32* %11, align 4
- %12 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 2 ; [#uses=4]
- store i32 0, i32* %12, align 8
- %13 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 3 ; [#uses=3]
- store %struct.btQuadWord* null, %struct.btQuadWord** %13, align 4
- %14 = getelementptr inbounds %struct.HullDesc* %desc, i32 0, i32 1 ; [#uses=2]
- %15 = load i32* %14, align 4 ; [#uses=2]
- %16 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexSource, i32 0, i32 4 ; [#uses=5]
- store i8 1, i8* %16, align 8
- %17 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexSource, i32 0, i32 3 ; [#uses=7]
- store %struct.btQuadWord* null, %struct.btQuadWord** %17, align 4
- %18 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexSource, i32 0, i32 1 ; [#uses=3]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexSource, i32 0, i32 2 ; [#uses=3]
- store i32 0, i32* %19, align 8
- %20 = icmp ult i32 %15, 8 ; [#uses=1]
- %vcount.0 = select i1 %20, i32 8, i32 %15 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %vertexSource, i32 %vcount.0, %struct.btQuadWord* %5) inlinehint
- to label %invcont2 unwind label %invcont.lpad59_crit_edge
-
-invcont.lpad59_crit_edge: ; preds = %invcont
- %.pre.pre = load %struct.btQuadWord** %17, align 4 ; [#uses=1]
- br label %lpad59
-
-invcont2: ; preds = %invcont
- %21 = getelementptr inbounds %struct.HullDesc* %desc, i32 0, i32 4 ; [#uses=1]
- %22 = load float* %21, align 4 ; [#uses=1]
- %23 = load %struct.btQuadWord** %17, align 4 ; [#uses=13]
- %24 = getelementptr inbounds %struct.HullDesc* %desc, i32 0, i32 3 ; [#uses=1]
- %25 = load i32* %24, align 4 ; [#uses=1]
- %26 = getelementptr inbounds %struct.HullDesc* %desc, i32 0, i32 2 ; [#uses=1]
- %27 = load %struct.btQuadWord** %26, align 4 ; [#uses=1]
- %28 = load i32* %14, align 4 ; [#uses=1]
- %29 = invoke zeroext i8 @_ZN11HullLibrary15CleanupVerticesEjPK9btVector3jRjPS0_fRS0_(%struct.HullLibrary* %this, i32 %28, %struct.btQuadWord* %27, i32 %25, i32* %ovcount, %struct.btQuadWord* %23, float %22, %struct.btQuadWord* %scale)
- to label %invcont3 unwind label %lpad59 ; [#uses=1]
-
-invcont3: ; preds = %invcont2
- %toBool = icmp eq i8 %29, 0 ; [#uses=1]
- br i1 %toBool, label %bb43, label %bb6.preheader
-
-bb6.preheader: ; preds = %invcont3
- %30 = load i32* %ovcount, align 4 ; [#uses=1]
- %31 = icmp eq i32 %30, 0 ; [#uses=1]
- br i1 %31, label %bb7, label %bb.nph130
-
-bb.nph130: ; preds = %bb6.preheader
- %32 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 0 ; [#uses=1]
- %33 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 1 ; [#uses=1]
- %34 = getelementptr inbounds %struct.btQuadWord* %scale, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb5, %bb.nph130
- %i.0129 = phi i32 [ 0, %bb.nph130 ], [ %44, %bb5 ] ; [#uses=4]
- %scevgep154155 = getelementptr inbounds %struct.btQuadWord* %23, i32 %i.0129, i32 0, i32 0 ; [#uses=2]
- %scevgep156 = getelementptr %struct.btQuadWord* %23, i32 %i.0129, i32 0, i32 1 ; [#uses=2]
- %scevgep157 = getelementptr %struct.btQuadWord* %23, i32 %i.0129, i32 0, i32 2 ; [#uses=2]
- %35 = load float* %scevgep154155, align 4 ; [#uses=1]
- %36 = load float* %32, align 8 ; [#uses=1]
- %37 = fmul float %35, %36 ; [#uses=1]
- store float %37, float* %scevgep154155, align 4
- %38 = load float* %scevgep156, align 4 ; [#uses=1]
- %39 = load float* %33, align 4 ; [#uses=1]
- %40 = fmul float %38, %39 ; [#uses=1]
- store float %40, float* %scevgep156, align 4
- %41 = load float* %scevgep157, align 4 ; [#uses=1]
- %42 = load float* %34, align 8 ; [#uses=1]
- %43 = fmul float %41, %42 ; [#uses=1]
- store float %43, float* %scevgep157, align 4
- %44 = add i32 %i.0129, 1 ; [#uses=2]
- %45 = load i32* %ovcount, align 4 ; [#uses=2]
- %46 = icmp ult i32 %44, %45 ; [#uses=1]
- br i1 %46, label %bb5, label %bb7
-
-bb7: ; preds = %bb5, %bb6.preheader
- %47 = phi i32 [ 0, %bb6.preheader ], [ %45, %bb5 ] ; [#uses=4]
- %48 = getelementptr inbounds %struct.HullDesc* %desc, i32 0, i32 5 ; [#uses=1]
- %49 = load i32* %48, align 4 ; [#uses=1]
- %50 = getelementptr inbounds %struct.PHullResult* %hr, i32 0, i32 4 ; [#uses=1]
- %51 = invoke i32 @_ZN11HullLibrary8calchullEP9btVector3iR20btAlignedObjectArrayIjERii(%struct.HullLibrary* %this, %struct.btQuadWord* %23, i32 %47, %"struct.btAlignedObjectArray<int>"* %50, i32* %tris_count.i, i32 %49)
- to label %.noexc118 unwind label %lpad59 ; [#uses=1]
-
-.noexc118: ; preds = %bb7
- %52 = icmp eq i32 %51, 0 ; [#uses=1]
- br i1 %52, label %bb43, label %invcont11
-
-invcont11: ; preds = %.noexc118
- %53 = load i32* %tris_count.i, align 4 ; [#uses=8]
- %54 = mul nsw i32 %53, 3 ; [#uses=5]
- store i32 %54, i32* %11, align 4
- store i32 %53, i32* %12, align 8
- store %struct.btQuadWord* %23, %struct.btQuadWord** %13, align 4
- store i32 %47, i32* %10, align 8
- %55 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexScratch, i32 0, i32 4 ; [#uses=5]
- store i8 1, i8* %55, align 8
- %56 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexScratch, i32 0, i32 3 ; [#uses=7]
- store %struct.btQuadWord* null, %struct.btQuadWord** %56, align 4
- %57 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexScratch, i32 0, i32 1 ; [#uses=3]
- store i32 0, i32* %57, align 4
- %58 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertexScratch, i32 0, i32 2 ; [#uses=3]
- store i32 0, i32* %58, align 8
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %vertexScratch, i32 %47, %struct.btQuadWord* %4) inlinehint
- to label %invcont12 unwind label %invcont11.lpad63_crit_edge
-
-invcont11.lpad63_crit_edge: ; preds = %invcont11
- %.pre164 = load %struct.btQuadWord** %56, align 4 ; [#uses=1]
- br label %lpad63
-
-invcont12: ; preds = %invcont11
- %59 = load i32** %7, align 4 ; [#uses=10]
- %60 = load %struct.btQuadWord** %56, align 4 ; [#uses=11]
- invoke void @_ZN11HullLibrary16BringOutYourDeadEPK9btVector3jPS0_RjPjj(%struct.HullLibrary* %this, %struct.btQuadWord* %23, i32 %47, %struct.btQuadWord* %60, i32* %ovcount, i32* %59, i32 %54)
- to label %invcont13 unwind label %lpad63
-
-invcont13: ; preds = %invcont12
- %61 = getelementptr inbounds %struct.HullDesc* %desc, i32 0, i32 0 ; [#uses=3]
- %62 = load i32* %61, align 4 ; [#uses=1]
- %63 = and i32 %62, 1 ; [#uses=1]
- %toBool14 = icmp eq i32 %63, 0 ; [#uses=1]
- %64 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 0 ; [#uses=2]
- br i1 %toBool14, label %bb24, label %bb15
-
-bb15: ; preds = %invcont13
- store i8 0, i8* %64, align 4
- %65 = load i32* %ovcount, align 4 ; [#uses=2]
- %66 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 1 ; [#uses=1]
- store i32 %65, i32* %66, align 4
- %67 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %67, i32 %65, %struct.btQuadWord* %3) inlinehint
- to label %invcont16 unwind label %lpad63
-
-invcont16: ; preds = %bb15
- %68 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 3 ; [#uses=1]
- store i32 %53, i32* %68, align 4
- %69 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 4 ; [#uses=1]
- store i32 %54, i32* %69, align 4
- store i32 0, i32* %2, align 4
- %70 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(%"struct.btAlignedObjectArray<int>"* %70, i32 %54, i32* %2) inlinehint
- to label %invcont17 unwind label %lpad63
-
-invcont17: ; preds = %invcont16
- %71 = load i32* %ovcount, align 4 ; [#uses=1]
- %72 = shl i32 %71, 4 ; [#uses=1]
- %73 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- %74 = load %struct.btQuadWord** %73, align 4 ; [#uses=1]
- %75 = bitcast %struct.btQuadWord* %74 to i8* ; [#uses=1]
- %76 = bitcast %struct.btQuadWord* %60 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %75, i8* %76, i32 %72, i32 4, i1 false)
- %77 = load i32* %61, align 4 ; [#uses=1]
- %.lobit = and i32 %77, 2 ; [#uses=1]
- %toBool18 = icmp eq i32 %.lobit, 0 ; [#uses=1]
- br i1 %toBool18, label %bb23, label %bb19
-
-bb19: ; preds = %invcont17
- %78 = icmp eq i32 %53, 0 ; [#uses=1]
- br i1 %78, label %bb36, label %bb.nph
-
-bb.nph: ; preds = %bb19
- %79 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 3 ; [#uses=1]
- %80 = load i32** %79, align 4 ; [#uses=3]
- br label %bb21
-
-bb21: ; preds = %bb21, %bb.nph
- %i20.0123 = phi i32 [ 0, %bb.nph ], [ %84, %bb21 ] ; [#uses=2]
- %tmp131 = mul i32 %i20.0123, 3 ; [#uses=4]
- %tmp132 = add i32 %tmp131, 1 ; [#uses=2]
- %scevgep = getelementptr i32* %80, i32 %tmp132 ; [#uses=1]
- %tmp133 = add i32 %tmp131, 2 ; [#uses=2]
- %scevgep134 = getelementptr i32* %80, i32 %tmp133 ; [#uses=1]
- %dest.0122 = getelementptr i32* %80, i32 %tmp131 ; [#uses=1]
- %scevgep136 = getelementptr i32* %59, i32 %tmp133 ; [#uses=1]
- %scevgep137 = getelementptr i32* %59, i32 %tmp132 ; [#uses=1]
- %source.0121 = getelementptr i32* %59, i32 %tmp131 ; [#uses=1]
- %81 = load i32* %scevgep136, align 4 ; [#uses=1]
- store i32 %81, i32* %dest.0122, align 4
- %82 = load i32* %scevgep137, align 4 ; [#uses=1]
- store i32 %82, i32* %scevgep, align 4
- %83 = load i32* %source.0121, align 4 ; [#uses=1]
- store i32 %83, i32* %scevgep134, align 4
- %84 = add i32 %i20.0123, 1 ; [#uses=2]
- %85 = icmp ugt i32 %53, %84 ; [#uses=1]
- br i1 %85, label %bb21, label %bb36
-
-bb23: ; preds = %invcont17
- %86 = mul i32 %53, 12 ; [#uses=1]
- %87 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 3 ; [#uses=1]
- %88 = load i32** %87, align 4 ; [#uses=1]
- %89 = bitcast i32* %88 to i8* ; [#uses=1]
- %90 = bitcast i32* %59 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %89, i8* %90, i32 %86, i32 4, i1 false)
- br label %bb36
-
-bb24: ; preds = %invcont13
- store i8 1, i8* %64, align 4
- %91 = load i32* %ovcount, align 4 ; [#uses=2]
- %92 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 1 ; [#uses=1]
- store i32 %91, i32* %92, align 4
- %93 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayI9btVector3E6resizeEiRKS0_(%"struct.btAlignedObjectArray<btVector3>"* %93, i32 %91, %struct.btQuadWord* %1) inlinehint
- to label %invcont25 unwind label %lpad63
-
-invcont25: ; preds = %bb24
- %94 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 3 ; [#uses=1]
- store i32 %53, i32* %94, align 4
- %95 = add i32 %53, %54 ; [#uses=2]
- %96 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 4 ; [#uses=1]
- store i32 %95, i32* %96, align 4
- store i32 0, i32* %0, align 4
- %97 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5 ; [#uses=1]
- invoke void @_ZN20btAlignedObjectArrayIjE6resizeEiRKj(%"struct.btAlignedObjectArray<int>"* %97, i32 %95, i32* %0) inlinehint
- to label %invcont26 unwind label %lpad63
-
-invcont26: ; preds = %invcont25
- %98 = load i32* %ovcount, align 4 ; [#uses=1]
- %99 = shl i32 %98, 4 ; [#uses=1]
- %100 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 2, i32 3 ; [#uses=1]
- %101 = load %struct.btQuadWord** %100, align 4 ; [#uses=1]
- %102 = bitcast %struct.btQuadWord* %101 to i8* ; [#uses=1]
- %103 = bitcast %struct.btQuadWord* %60 to i8* ; [#uses=1]
- call void @llvm.memcpy.p0i8.p0i8.i32(i8* %102, i8* %103, i32 %99, i32 4, i1 false)
- %104 = load i32* %12, align 8 ; [#uses=1]
- %105 = icmp eq i32 %104, 0 ; [#uses=1]
- br i1 %105, label %bb36, label %bb.nph128
-
-bb.nph128: ; preds = %invcont26
- %106 = getelementptr inbounds %struct.HullResult* %result, i32 0, i32 5, i32 3 ; [#uses=1]
- %107 = load i32** %106, align 4 ; [#uses=4]
- br label %bb30
-
-bb30: ; preds = %bb30, %bb.nph128
- %i29.0127 = phi i32 [ 0, %bb.nph128 ], [ %tmp139, %bb30 ] ; [#uses=3]
- %tmp139 = add i32 %i29.0127, 1 ; [#uses=2]
- %tmp140 = shl i32 %i29.0127, 2 ; [#uses=4]
- %tmp141159 = or i32 %tmp140, 1 ; [#uses=1]
- %scevgep142 = getelementptr i32* %107, i32 %tmp141159 ; [#uses=1]
- %tmp143160 = or i32 %tmp140, 2 ; [#uses=1]
- %scevgep144 = getelementptr i32* %107, i32 %tmp143160 ; [#uses=1]
- %tmp145161 = or i32 %tmp140, 3 ; [#uses=1]
- %scevgep146 = getelementptr i32* %107, i32 %tmp145161 ; [#uses=1]
- %dest28.0126 = getelementptr i32* %107, i32 %tmp140 ; [#uses=1]
- %tmp148 = mul i32 %i29.0127, 3 ; [#uses=3]
- %tmp149 = add i32 %tmp148, 2 ; [#uses=1]
- %scevgep150 = getelementptr i32* %59, i32 %tmp149 ; [#uses=2]
- %tmp151 = add i32 %tmp148, 1 ; [#uses=1]
- %scevgep152 = getelementptr i32* %59, i32 %tmp151 ; [#uses=1]
- %source27.0125 = getelementptr i32* %59, i32 %tmp148 ; [#uses=2]
- store i32 3, i32* %dest28.0126, align 4
- %108 = load i32* %61, align 4 ; [#uses=1]
- %.lobit119 = and i32 %108, 2 ; [#uses=1]
- %toBool31 = icmp eq i32 %.lobit119, 0 ; [#uses=2]
- %storemerge163.in = select i1 %toBool31, i32* %source27.0125, i32* %scevgep150 ; [#uses=1]
- %storemerge.in = select i1 %toBool31, i32* %scevgep150, i32* %source27.0125 ; [#uses=1]
- %storemerge163 = load i32* %storemerge163.in, align 4 ; [#uses=1]
- store i32 %storemerge163, i32* %scevgep142, align 4
- %storemerge162 = load i32* %scevgep152, align 4 ; [#uses=1]
- store i32 %storemerge162, i32* %scevgep144, align 4
- %storemerge = load i32* %storemerge.in, align 4 ; [#uses=1]
- store i32 %storemerge, i32* %scevgep146, align 4
- %109 = load i32* %12, align 8 ; [#uses=1]
- %110 = icmp ugt i32 %109, %tmp139 ; [#uses=1]
- br i1 %110, label %bb30, label %bb36
-
-bb36: ; preds = %bb30, %invcont26, %bb23, %bb21, %bb19
- %111 = load i32* %8, align 4 ; [#uses=1]
- %112 = icmp eq i32 %111, 0 ; [#uses=1]
- br i1 %112, label %bb41, label %bb.i
-
-bb.i: ; preds = %bb36
- %113 = icmp eq i32* %59, null ; [#uses=1]
- br i1 %113, label %_ZN20btAlignedObjectArrayIjE5clearEv.exit.i, label %bb.i.i.i110
-
-bb.i.i.i110: ; preds = %bb.i
- %114 = load i8* %6, align 8 ; [#uses=1]
- %toBool.i.i.i109 = icmp eq i8 %114, 0 ; [#uses=1]
- br i1 %toBool.i.i.i109, label %bb2.i.i.i112, label %bb1.i.i.i111
-
-bb1.i.i.i111: ; preds = %bb.i.i.i110
- %115 = bitcast i32* %59 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %115)
- to label %bb2.i.i.i112 unwind label %lpad63
-
-bb2.i.i.i112: ; preds = %bb1.i.i.i111, %bb.i.i.i110
- store i32* null, i32** %7, align 4
- br label %_ZN20btAlignedObjectArrayIjE5clearEv.exit.i
-
-_ZN20btAlignedObjectArrayIjE5clearEv.exit.i: ; preds = %bb2.i.i.i112, %bb.i
- store i8 1, i8* %6, align 8
- store i32* null, i32** %7, align 4
- store i32 0, i32* %8, align 4
- store i32 0, i32* %9, align 8
- br label %bb41
-
-bb41: ; preds = %_ZN20btAlignedObjectArrayIjE5clearEv.exit.i, %bb36
- store i32 0, i32* %10, align 8
- store i32 0, i32* %11, align 4
- store %struct.btQuadWord* null, %struct.btQuadWord** %13, align 4
- %116 = icmp eq %struct.btQuadWord* %60, null ; [#uses=1]
- br i1 %116, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit108, label %bb.i.i.i104
-
-bb.i.i.i104: ; preds = %bb41
- %117 = load i8* %55, align 8 ; [#uses=1]
- %toBool.i.i.i103 = icmp eq i8 %117, 0 ; [#uses=1]
- br i1 %toBool.i.i.i103, label %bb2.i.i.i106, label %bb1.i.i.i105
-
-bb1.i.i.i105: ; preds = %bb.i.i.i104
- %118 = bitcast %struct.btQuadWord* %60 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %118)
- to label %bb2.i.i.i106 unwind label %lpad59
-
-bb2.i.i.i106: ; preds = %bb1.i.i.i105, %bb.i.i.i104
- store %struct.btQuadWord* null, %struct.btQuadWord** %56, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit108
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit108: ; preds = %bb2.i.i.i106, %bb41
- store i8 1, i8* %55, align 8
- store %struct.btQuadWord* null, %struct.btQuadWord** %56, align 4
- store i32 0, i32* %57, align 4
- store i32 0, i32* %58, align 8
- br label %bb43
-
-bb43: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit108, %.noexc118, %invcont3
- %ret.0 = phi i32 [ 0, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit108 ], [ 1, %invcont3 ], [ 1, %.noexc118 ] ; [#uses=2]
- %119 = icmp eq %struct.btQuadWord* %23, null ; [#uses=1]
- br i1 %119, label %bb55, label %bb.i.i.i98
-
-bb.i.i.i98: ; preds = %bb43
- %120 = load i8* %16, align 8 ; [#uses=1]
- %toBool.i.i.i97 = icmp eq i8 %120, 0 ; [#uses=1]
- br i1 %toBool.i.i.i97, label %bb2.i.i.i100, label %bb1.i.i.i99
-
-bb1.i.i.i99: ; preds = %bb.i.i.i98
- %121 = bitcast %struct.btQuadWord* %23 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %121)
- to label %bb2.i.i.i100 unwind label %lpad
-
-bb2.i.i.i100: ; preds = %bb1.i.i.i99, %bb.i.i.i98
- store %struct.btQuadWord* null, %struct.btQuadWord** %17, align 4
- br label %bb55
-
-invcont53: ; preds = %bb2.i.i.i.i, %ppad
- call void @_Unwind_Resume_or_Rethrow(i8* %eh_exception.1)
- unreachable
-
-bb55: ; preds = %bb2.i.i.i100, %bb43
- store i8 1, i8* %16, align 8
- store %struct.btQuadWord* null, %struct.btQuadWord** %17, align 4
- store i32 0, i32* %18, align 4
- store i32 0, i32* %19, align 8
- %122 = load i32** %7, align 4 ; [#uses=2]
- %123 = icmp eq i32* %122, null ; [#uses=1]
- br i1 %123, label %_ZN11PHullResultD1Ev.exit96, label %bb.i.i.i.i93
-
-bb.i.i.i.i93: ; preds = %bb55
- %124 = load i8* %6, align 8 ; [#uses=1]
- %toBool.i.i.i.i92 = icmp eq i8 %124, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i92, label %bb2.i.i.i.i95, label %bb1.i.i.i.i94
-
-bb1.i.i.i.i94: ; preds = %bb.i.i.i.i93
- %125 = bitcast i32* %122 to i8* ; [#uses=1]
- call void @_Z21btAlignedFreeInternalPv(i8* %125)
- br label %bb2.i.i.i.i95
-
-bb2.i.i.i.i95: ; preds = %bb1.i.i.i.i94, %bb.i.i.i.i93
- store i32* null, i32** %7, align 4
- ret i32 %ret.0
-
-_ZN11PHullResultD1Ev.exit96: ; preds = %bb55
- ret i32 %ret.0
-
-lpad: ; preds = %bb1.i.i.i99
- %eh_ptr = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select58 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad
-
-lpad59: ; preds = %bb1.i.i.i105, %bb7, %invcont2, %invcont.lpad59_crit_edge
- %.pre = phi %struct.btQuadWord* [ %.pre.pre, %invcont.lpad59_crit_edge ], [ %23, %bb7 ], [ %23, %bb1.i.i.i105 ], [ %23, %invcont2 ] ; [#uses=1]
- %eh_ptr60 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select62 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr60, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- br label %ppad79
-
-lpad63: ; preds = %bb1.i.i.i111, %invcont25, %bb24, %invcont16, %bb15, %invcont12, %invcont11.lpad63_crit_edge
- %126 = phi %struct.btQuadWord* [ %.pre164, %invcont11.lpad63_crit_edge ], [ %60, %bb1.i.i.i111 ], [ %60, %invcont25 ], [ %60, %bb24 ], [ %60, %invcont16 ], [ %60, %bb15 ], [ %60, %invcont12 ] ; [#uses=2]
- %eh_ptr64 = call i8* @llvm.eh.exception() ; [#uses=2]
- %eh_select66 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr64, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 0) ; [#uses=0]
- %127 = icmp eq %struct.btQuadWord* %126, null ; [#uses=1]
- br i1 %127, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit91, label %bb.i.i.i87
-
-bb.i.i.i87: ; preds = %lpad63
- %128 = load i8* %55, align 8 ; [#uses=1]
- %toBool.i.i.i86 = icmp eq i8 %128, 0 ; [#uses=1]
- br i1 %toBool.i.i.i86, label %bb2.i.i.i89, label %bb1.i.i.i88
-
-bb1.i.i.i88: ; preds = %bb.i.i.i87
- %129 = bitcast %struct.btQuadWord* %126 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %129)
- to label %bb2.i.i.i89 unwind label %lpad67
-
-bb2.i.i.i89: ; preds = %bb1.i.i.i88, %bb.i.i.i87
- store %struct.btQuadWord* null, %struct.btQuadWord** %56, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit91
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit91: ; preds = %bb2.i.i.i89, %lpad63
- store i8 1, i8* %55, align 8
- store %struct.btQuadWord* null, %struct.btQuadWord** %56, align 4
- store i32 0, i32* %57, align 4
- store i32 0, i32* %58, align 8
- br label %ppad79
-
-lpad67: ; preds = %bb1.i.i.i88
- %eh_ptr68 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select70 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr68, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad71: ; preds = %bb1.i.i.i
- %eh_ptr72 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select74 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr72, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-lpad75: ; preds = %bb1.i.i.i.i
- %eh_ptr76 = call i8* @llvm.eh.exception() ; [#uses=1]
- %eh_select78 = call i32 (i8*, i8*, ...)* @llvm.eh.selector(i8* %eh_ptr76, i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*), i32 1) ; [#uses=0]
- call void @_ZSt9terminatev() noreturn nounwind
- unreachable
-
-ppad: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit, %lpad
- %eh_exception.1 = phi i8* [ %eh_ptr, %lpad ], [ %eh_exception.0, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit ] ; [#uses=1]
- %130 = load i32** %7, align 4 ; [#uses=2]
- %131 = icmp eq i32* %130, null ; [#uses=1]
- br i1 %131, label %invcont53, label %bb.i.i.i.i
-
-bb.i.i.i.i: ; preds = %ppad
- %132 = load i8* %6, align 8 ; [#uses=1]
- %toBool.i.i.i.i = icmp eq i8 %132, 0 ; [#uses=1]
- br i1 %toBool.i.i.i.i, label %bb2.i.i.i.i, label %bb1.i.i.i.i
-
-bb1.i.i.i.i: ; preds = %bb.i.i.i.i
- %133 = bitcast i32* %130 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %133)
- to label %bb2.i.i.i.i unwind label %lpad75
-
-bb2.i.i.i.i: ; preds = %bb1.i.i.i.i, %bb.i.i.i.i
- store i32* null, i32** %7, align 4
- br label %invcont53
-
-ppad79: ; preds = %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit91, %lpad59
- %134 = phi %struct.btQuadWord* [ %.pre, %lpad59 ], [ %23, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit91 ] ; [#uses=2]
- %eh_exception.0 = phi i8* [ %eh_ptr60, %lpad59 ], [ %eh_ptr64, %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit91 ] ; [#uses=1]
- %135 = icmp eq %struct.btQuadWord* %134, null ; [#uses=1]
- br i1 %135, label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit, label %bb.i.i.i
-
-bb.i.i.i: ; preds = %ppad79
- %136 = load i8* %16, align 8 ; [#uses=1]
- %toBool.i.i.i = icmp eq i8 %136, 0 ; [#uses=1]
- br i1 %toBool.i.i.i, label %bb2.i.i.i, label %bb1.i.i.i
-
-bb1.i.i.i: ; preds = %bb.i.i.i
- %137 = bitcast %struct.btQuadWord* %134 to i8* ; [#uses=1]
- invoke void @_Z21btAlignedFreeInternalPv(i8* %137)
- to label %bb2.i.i.i unwind label %lpad71
-
-bb2.i.i.i: ; preds = %bb1.i.i.i, %bb.i.i.i
- store %struct.btQuadWord* null, %struct.btQuadWord** %17, align 4
- br label %_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit
-
-_ZN20btAlignedObjectArrayI9btVector3ED1Ev.exit: ; preds = %bb2.i.i.i, %ppad79
- store i8 1, i8* %16, align 8
- store %struct.btQuadWord* null, %struct.btQuadWord** %17, align 4
- store i32 0, i32* %18, align 4
- store i32 0, i32* %19, align 8
- br label %ppad
-}
-
-; [#uses=0]
-define void @_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_(%struct.btQuadWord* noalias nocapture sret %agg.result, %struct.btPlane* nocapture %plane, %struct.btQuadWord* nocapture %p0, %struct.btQuadWord* nocapture %p1) nounwind {
-entry:
- %0 = load i8* bitcast (i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif to i8*), align 8 ; [#uses=1]
- %1 = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb2
-
-bb: ; preds = %entry
- %2 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif) nounwind ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- tail call void @__cxa_guard_release(i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb, %entry
- %4 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 2 ; [#uses=1]
- %5 = load float* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %p0, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = load float* %6, align 4 ; [#uses=1]
- %8 = fsub float %5, %7 ; [#uses=3]
- %9 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btQuadWord* %p0, i32 0, i32 0, i32 1 ; [#uses=2]
- %12 = load float* %11, align 4 ; [#uses=1]
- %13 = fsub float %10, %12 ; [#uses=3]
- %14 = getelementptr inbounds %struct.btQuadWord* %p1, i32 0, i32 0, i32 0 ; [#uses=1]
- %15 = load float* %14, align 4 ; [#uses=1]
- %16 = getelementptr inbounds %struct.btQuadWord* %p0, i32 0, i32 0, i32 0 ; [#uses=2]
- %17 = load float* %16, align 4 ; [#uses=1]
- %18 = fsub float %15, %17 ; [#uses=3]
- store float %18, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 0), align 8
- store float %13, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 1), align 4
- store float %8, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 3), align 4
- %19 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 0 ; [#uses=1]
- %20 = load float* %19, align 4 ; [#uses=2]
- %21 = fmul float %20, %18 ; [#uses=1]
- %22 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 1 ; [#uses=1]
- %23 = load float* %22, align 4 ; [#uses=2]
- %24 = fmul float %23, %13 ; [#uses=1]
- %25 = fadd float %21, %24 ; [#uses=1]
- %26 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 0, i32 0, i32 2 ; [#uses=1]
- %27 = load float* %26, align 4 ; [#uses=2]
- %28 = fmul float %27, %8 ; [#uses=1]
- %29 = fadd float %25, %28 ; [#uses=1]
- %30 = getelementptr inbounds %struct.btPlane* %plane, i32 0, i32 1 ; [#uses=1]
- %31 = load float* %30, align 4 ; [#uses=1]
- %32 = load float* %16, align 4 ; [#uses=2]
- %33 = fmul float %20, %32 ; [#uses=1]
- %34 = load float* %11, align 4 ; [#uses=2]
- %35 = fmul float %23, %34 ; [#uses=1]
- %36 = fadd float %33, %35 ; [#uses=1]
- %37 = load float* %6, align 4 ; [#uses=2]
- %38 = fmul float %27, %37 ; [#uses=1]
- %39 = fadd float %36, %38 ; [#uses=1]
- %40 = fadd float %31, %39 ; [#uses=1]
- %41 = fsub float -0.000000e+00, %40 ; [#uses=1]
- %42 = fdiv float %41, %29 ; [#uses=3]
- %43 = fmul float %8, %42 ; [#uses=1]
- %44 = fmul float %13, %42 ; [#uses=1]
- %45 = fmul float %18, %42 ; [#uses=1]
- %46 = fadd float %37, %43 ; [#uses=1]
- %47 = fadd float %34, %44 ; [#uses=1]
- %48 = fadd float %32, %45 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %48, float* %49, align 4
- %50 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %47, float* %50, align 4
- %51 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %46, float* %51, align 4
- %52 = getelementptr inbounds %struct.btQuadWord* %agg.result, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %52, align 4
- ret void
-}
-
-; [#uses=0]
-define float @_Z20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_(%struct.btQuadWord* nocapture %ustart, %struct.btQuadWord* nocapture %udir, %struct.btQuadWord* nocapture %vstart, %struct.btQuadWord* nocapture %vdir, %struct.btQuadWord* %upoint, %struct.btQuadWord* %vpoint) nounwind {
-entry:
- %0 = load i8* bitcast (i64* @_ZGVZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp to i8*), align 8 ; [#uses=1]
- %1 = icmp eq i8 %0, 0 ; [#uses=1]
- br i1 %1, label %bb, label %bb2
-
-bb: ; preds = %entry
- %2 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp) nounwind ; [#uses=1]
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb2, label %bb1
-
-bb1: ; preds = %bb
- tail call void @__cxa_guard_release(i64* @_ZGVZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp) nounwind
- br label %bb2
-
-bb2: ; preds = %bb1, %bb, %entry
- %4 = getelementptr inbounds %struct.btQuadWord* %udir, i32 0, i32 0, i32 0 ; [#uses=3]
- %5 = load float* %4, align 4 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 1 ; [#uses=3]
- %7 = load float* %6, align 4 ; [#uses=2]
- %8 = fmul float %5, %7 ; [#uses=1]
- %9 = getelementptr inbounds %struct.btQuadWord* %udir, i32 0, i32 0, i32 1 ; [#uses=3]
- %10 = load float* %9, align 4 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 0 ; [#uses=3]
- %12 = load float* %11, align 4 ; [#uses=2]
- %13 = fmul float %10, %12 ; [#uses=1]
- %14 = fsub float %8, %13 ; [#uses=3]
- %15 = getelementptr inbounds %struct.btQuadWord* %udir, i32 0, i32 0, i32 2 ; [#uses=3]
- %16 = load float* %15, align 4 ; [#uses=2]
- %17 = fmul float %16, %12 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btQuadWord* %vdir, i32 0, i32 0, i32 2 ; [#uses=3]
- %19 = load float* %18, align 4 ; [#uses=2]
- %20 = fmul float %5, %19 ; [#uses=1]
- %21 = fsub float %17, %20 ; [#uses=3]
- %22 = fmul float %10, %19 ; [#uses=1]
- %23 = fmul float %16, %7 ; [#uses=1]
- %24 = fsub float %22, %23 ; [#uses=3]
- %25 = fmul float %24, %24 ; [#uses=1]
- %26 = fmul float %21, %21 ; [#uses=1]
- %27 = fadd float %25, %26 ; [#uses=1]
- %28 = fmul float %14, %14 ; [#uses=1]
- %29 = fadd float %27, %28 ; [#uses=1]
- %30 = tail call float @sqrtf(float %29) nounwind readonly ; [#uses=1]
- %31 = fdiv float 1.000000e+00, %30 ; [#uses=3]
- %32 = fmul float %14, %31 ; [#uses=5]
- %33 = fmul float %21, %31 ; [#uses=5]
- %34 = fmul float %24, %31 ; [#uses=5]
- store float %34, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp, i32 0, i32 0, i32 0), align 8
- store float %33, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp, i32 0, i32 0, i32 1), align 4
- store float %32, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp, i32 0, i32 0, i32 3), align 4
- %35 = getelementptr inbounds %struct.btQuadWord* %ustart, i32 0, i32 0, i32 0 ; [#uses=4]
- %36 = load float* %35, align 4 ; [#uses=2]
- %37 = fmul float %34, %36 ; [#uses=1]
- %38 = getelementptr inbounds %struct.btQuadWord* %ustart, i32 0, i32 0, i32 1 ; [#uses=4]
- %39 = load float* %38, align 4 ; [#uses=2]
- %40 = fmul float %33, %39 ; [#uses=1]
- %41 = fadd float %37, %40 ; [#uses=1]
- %42 = getelementptr inbounds %struct.btQuadWord* %ustart, i32 0, i32 0, i32 2 ; [#uses=4]
- %43 = load float* %42, align 4 ; [#uses=2]
- %44 = fmul float %32, %43 ; [#uses=1]
- %45 = fadd float %41, %44 ; [#uses=1]
- %46 = getelementptr inbounds %struct.btQuadWord* %vstart, i32 0, i32 0, i32 0 ; [#uses=4]
- %47 = load float* %46, align 4 ; [#uses=2]
- %48 = fmul float %34, %47 ; [#uses=1]
- %49 = getelementptr inbounds %struct.btQuadWord* %vstart, i32 0, i32 0, i32 1 ; [#uses=4]
- %50 = load float* %49, align 4 ; [#uses=2]
- %51 = fmul float %33, %50 ; [#uses=1]
- %52 = fadd float %48, %51 ; [#uses=1]
- %53 = getelementptr inbounds %struct.btQuadWord* %vstart, i32 0, i32 0, i32 2 ; [#uses=4]
- %54 = load float* %53, align 4 ; [#uses=2]
- %55 = fmul float %32, %54 ; [#uses=1]
- %56 = fadd float %52, %55 ; [#uses=1]
- %57 = fsub float %56, %45 ; [#uses=1]
- %58 = tail call float @fabsf(float %57) nounwind readnone ; [#uses=2]
- %59 = icmp eq %struct.btQuadWord* %upoint, null ; [#uses=1]
- br i1 %59, label %bb7, label %bb3
-
-bb3: ; preds = %bb2
- %60 = load float* %11, align 4 ; [#uses=2]
- %61 = fmul float %60, %33 ; [#uses=1]
- %62 = load float* %6, align 4 ; [#uses=2]
- %63 = fmul float %62, %34 ; [#uses=1]
- %64 = fsub float %61, %63 ; [#uses=3]
- %65 = load float* %18, align 4 ; [#uses=2]
- %66 = fmul float %65, %34 ; [#uses=1]
- %67 = fmul float %60, %32 ; [#uses=1]
- %68 = fsub float %66, %67 ; [#uses=3]
- %69 = fmul float %62, %32 ; [#uses=1]
- %70 = fmul float %65, %33 ; [#uses=1]
- %71 = fsub float %69, %70 ; [#uses=3]
- %72 = fmul float %71, %71 ; [#uses=1]
- %73 = fmul float %68, %68 ; [#uses=1]
- %74 = fadd float %72, %73 ; [#uses=1]
- %75 = fmul float %64, %64 ; [#uses=1]
- %76 = fadd float %74, %75 ; [#uses=1]
- %77 = tail call float @sqrtf(float %76) nounwind readonly ; [#uses=1]
- %78 = fdiv float 1.000000e+00, %77 ; [#uses=3]
- %79 = fmul float %64, %78 ; [#uses=3]
- %80 = fmul float %68, %78 ; [#uses=3]
- %81 = fmul float %71, %78 ; [#uses=3]
- %82 = fmul float %81, %47 ; [#uses=1]
- %83 = fmul float %80, %50 ; [#uses=1]
- %84 = fadd float %82, %83 ; [#uses=1]
- %85 = fmul float %79, %54 ; [#uses=1]
- %86 = fadd float %84, %85 ; [#uses=1]
- %87 = load float* %15, align 4 ; [#uses=1]
- %88 = fadd float %43, %87 ; [#uses=1]
- %89 = load float* %9, align 4 ; [#uses=1]
- %90 = fadd float %39, %89 ; [#uses=1]
- %91 = load float* %4, align 4 ; [#uses=1]
- %92 = fadd float %36, %91 ; [#uses=1]
- %93 = load i8* bitcast (i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif to i8*), align 8 ; [#uses=1]
- %94 = icmp eq i8 %93, 0 ; [#uses=1]
- br i1 %94, label %bb.i15, label %_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit17
-
-bb.i15: ; preds = %bb3
- %95 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif) nounwind ; [#uses=1]
- %96 = icmp eq i32 %95, 0 ; [#uses=1]
- br i1 %96, label %_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit17, label %bb1.i16
-
-bb1.i16: ; preds = %bb.i15
- tail call void @__cxa_guard_release(i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif) nounwind
- br label %_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit17
-
-_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit17: ; preds = %bb1.i16, %bb.i15, %bb3
- %97 = load float* %42, align 4 ; [#uses=1]
- %98 = fsub float %88, %97 ; [#uses=3]
- %99 = load float* %38, align 4 ; [#uses=1]
- %100 = fsub float %90, %99 ; [#uses=3]
- %101 = load float* %35, align 4 ; [#uses=1]
- %102 = fsub float %92, %101 ; [#uses=3]
- store float %102, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 0), align 8
- store float %100, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 1), align 4
- store float %98, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 3), align 4
- %103 = fmul float %81, %102 ; [#uses=1]
- %104 = fmul float %80, %100 ; [#uses=1]
- %105 = fadd float %103, %104 ; [#uses=1]
- %106 = fmul float %79, %98 ; [#uses=1]
- %107 = fadd float %105, %106 ; [#uses=1]
- %108 = load float* %35, align 4 ; [#uses=2]
- %109 = fmul float %81, %108 ; [#uses=1]
- %110 = load float* %38, align 4 ; [#uses=2]
- %111 = fmul float %80, %110 ; [#uses=1]
- %112 = fadd float %109, %111 ; [#uses=1]
- %113 = load float* %42, align 4 ; [#uses=2]
- %114 = fmul float %79, %113 ; [#uses=1]
- %115 = fadd float %112, %114 ; [#uses=1]
- %116 = fsub float %115, %86 ; [#uses=1]
- %117 = fsub float -0.000000e+00, %116 ; [#uses=1]
- %118 = fdiv float %117, %107 ; [#uses=3]
- %119 = fmul float %98, %118 ; [#uses=1]
- %120 = fmul float %100, %118 ; [#uses=1]
- %121 = fmul float %102, %118 ; [#uses=1]
- %122 = fadd float %113, %119 ; [#uses=1]
- %123 = fadd float %110, %120 ; [#uses=1]
- %124 = fadd float %108, %121 ; [#uses=1]
- %125 = getelementptr inbounds %struct.btQuadWord* %upoint, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %124, float* %125, align 4
- %126 = getelementptr inbounds %struct.btQuadWord* %upoint, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %123, float* %126, align 4
- %127 = getelementptr inbounds %struct.btQuadWord* %upoint, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %122, float* %127, align 4
- %128 = getelementptr inbounds %struct.btQuadWord* %upoint, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %128, align 4
- br label %bb7
-
-bb7: ; preds = %_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit17, %bb2
- %129 = icmp eq %struct.btQuadWord* %vpoint, null ; [#uses=1]
- br i1 %129, label %bb13, label %bb8
-
-bb8: ; preds = %bb7
- %130 = load float* %4, align 4 ; [#uses=2]
- %131 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp, i32 0, i32 0, i32 1), align 4 ; [#uses=2]
- %132 = fmul float %130, %131 ; [#uses=1]
- %133 = load float* %9, align 4 ; [#uses=2]
- %134 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp, i32 0, i32 0, i32 0), align 8 ; [#uses=2]
- %135 = fmul float %133, %134 ; [#uses=1]
- %136 = fsub float %132, %135 ; [#uses=3]
- %137 = load float* %15, align 4 ; [#uses=2]
- %138 = fmul float %137, %134 ; [#uses=1]
- %139 = load float* getelementptr inbounds (%struct.btQuadWord* @_ZZ20DistanceBetweenLinesRK9btVector3S1_S1_S1_PS_S2_E2cp, i32 0, i32 0, i32 2), align 8 ; [#uses=2]
- %140 = fmul float %130, %139 ; [#uses=1]
- %141 = fsub float %138, %140 ; [#uses=3]
- %142 = fmul float %133, %139 ; [#uses=1]
- %143 = fmul float %137, %131 ; [#uses=1]
- %144 = fsub float %142, %143 ; [#uses=3]
- %145 = fmul float %144, %144 ; [#uses=1]
- %146 = fmul float %141, %141 ; [#uses=1]
- %147 = fadd float %145, %146 ; [#uses=1]
- %148 = fmul float %136, %136 ; [#uses=1]
- %149 = fadd float %147, %148 ; [#uses=1]
- %150 = tail call float @sqrtf(float %149) nounwind readonly ; [#uses=1]
- %151 = fdiv float 1.000000e+00, %150 ; [#uses=3]
- %152 = fmul float %136, %151 ; [#uses=3]
- %153 = fmul float %141, %151 ; [#uses=3]
- %154 = fmul float %144, %151 ; [#uses=3]
- %155 = load float* %35, align 4 ; [#uses=1]
- %156 = fmul float %154, %155 ; [#uses=1]
- %157 = load float* %38, align 4 ; [#uses=1]
- %158 = fmul float %153, %157 ; [#uses=1]
- %159 = fadd float %156, %158 ; [#uses=1]
- %160 = load float* %42, align 4 ; [#uses=1]
- %161 = fmul float %152, %160 ; [#uses=1]
- %162 = fadd float %159, %161 ; [#uses=1]
- %163 = load float* %53, align 4 ; [#uses=1]
- %164 = load float* %18, align 4 ; [#uses=1]
- %165 = fadd float %163, %164 ; [#uses=1]
- %166 = load float* %49, align 4 ; [#uses=1]
- %167 = load float* %6, align 4 ; [#uses=1]
- %168 = fadd float %166, %167 ; [#uses=1]
- %169 = load float* %46, align 4 ; [#uses=1]
- %170 = load float* %11, align 4 ; [#uses=1]
- %171 = fadd float %169, %170 ; [#uses=1]
- %172 = load i8* bitcast (i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif to i8*), align 8 ; [#uses=1]
- %173 = icmp eq i8 %172, 0 ; [#uses=1]
- br i1 %173, label %bb.i, label %_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit
-
-bb.i: ; preds = %bb8
- %174 = tail call i32 @__cxa_guard_acquire(i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif) nounwind ; [#uses=1]
- %175 = icmp eq i32 %174, 0 ; [#uses=1]
- br i1 %175, label %_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit, label %bb1.i
-
-bb1.i: ; preds = %bb.i
- tail call void @__cxa_guard_release(i64* @_ZGVZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif) nounwind
- br label %_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit
-
-_Z21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_.exit: ; preds = %bb1.i, %bb.i, %bb8
- %176 = load float* %53, align 4 ; [#uses=1]
- %177 = fsub float %165, %176 ; [#uses=3]
- %178 = load float* %49, align 4 ; [#uses=1]
- %179 = fsub float %168, %178 ; [#uses=3]
- %180 = load float* %46, align 4 ; [#uses=1]
- %181 = fsub float %171, %180 ; [#uses=3]
- store float %181, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 0), align 8
- store float %179, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 1), align 4
- store float %177, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 2), align 8
- store float 0.000000e+00, float* getelementptr inbounds (%struct.btQuadWord* @_ZZ21PlaneLineIntersectionRK7btPlaneRK9btVector3S4_E3dif, i32 0, i32 0, i32 3), align 4
- %182 = fmul float %154, %181 ; [#uses=1]
- %183 = fmul float %153, %179 ; [#uses=1]
- %184 = fadd float %182, %183 ; [#uses=1]
- %185 = fmul float %152, %177 ; [#uses=1]
- %186 = fadd float %184, %185 ; [#uses=1]
- %187 = load float* %46, align 4 ; [#uses=2]
- %188 = fmul float %154, %187 ; [#uses=1]
- %189 = load float* %49, align 4 ; [#uses=2]
- %190 = fmul float %153, %189 ; [#uses=1]
- %191 = fadd float %188, %190 ; [#uses=1]
- %192 = load float* %53, align 4 ; [#uses=2]
- %193 = fmul float %152, %192 ; [#uses=1]
- %194 = fadd float %191, %193 ; [#uses=1]
- %195 = fsub float %194, %162 ; [#uses=1]
- %196 = fsub float -0.000000e+00, %195 ; [#uses=1]
- %197 = fdiv float %196, %186 ; [#uses=3]
- %198 = fmul float %177, %197 ; [#uses=1]
- %199 = fmul float %179, %197 ; [#uses=1]
- %200 = fmul float %181, %197 ; [#uses=1]
- %201 = fadd float %192, %198 ; [#uses=1]
- %202 = fadd float %189, %199 ; [#uses=1]
- %203 = fadd float %187, %200 ; [#uses=1]
- %204 = getelementptr inbounds %struct.btQuadWord* %vpoint, i32 0, i32 0, i32 0 ; [#uses=1]
- store float %203, float* %204, align 4
- %205 = getelementptr inbounds %struct.btQuadWord* %vpoint, i32 0, i32 0, i32 1 ; [#uses=1]
- store float %202, float* %205, align 4
- %206 = getelementptr inbounds %struct.btQuadWord* %vpoint, i32 0, i32 0, i32 2 ; [#uses=1]
- store float %201, float* %206, align 4
- %207 = getelementptr inbounds %struct.btQuadWord* %vpoint, i32 0, i32 0, i32 3 ; [#uses=1]
- store float 0.000000e+00, float* %207, align 4
- ret float %58
-
-bb13: ; preds = %bb7
- ret float %58
-}
-
-; [#uses=0]
-define void @btBulletMathProbe() nounwind readnone {
-entry:
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_Z8notExistRK9btVector3RK20btAlignedObjectArrayIS_E(%struct.btQuadWord* nocapture %planeEquation, %"struct.btAlignedObjectArray<btVector3>"* nocapture %planeEquations) nounwind readonly {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquations, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquations, i32 0, i32 3 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %planeEquation, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %planeEquation, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %planeEquation, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %bb3
- %6 = load %struct.btQuadWord** %2, align 4 ; [#uses=3]
- %7 = load float* %3, align 4 ; [#uses=1]
- %scevgep910 = getelementptr inbounds %struct.btQuadWord* %6, i32 %20, i32 0, i32 0 ; [#uses=1]
- %8 = load float* %scevgep910, align 4 ; [#uses=1]
- %9 = fmul float %7, %8 ; [#uses=1]
- %10 = load float* %4, align 4 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %6, i32 %20, i32 0, i32 1 ; [#uses=1]
- %11 = load float* %scevgep8, align 4 ; [#uses=1]
- %12 = fmul float %10, %11 ; [#uses=1]
- %13 = fadd float %9, %12 ; [#uses=1]
- %14 = load float* %5, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btQuadWord* %6, i32 %20, i32 0, i32 2 ; [#uses=1]
- %15 = load float* %scevgep, align 4 ; [#uses=1]
- %16 = fmul float %14, %15 ; [#uses=1]
- %17 = fadd float %13, %16 ; [#uses=1]
- %18 = fcmp ogt float %17, 0x3FEFF7CEE0000000 ; [#uses=1]
- br i1 %18, label %bb5, label %bb2
-
-bb2: ; preds = %bb
- %19 = add nsw i32 %20, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- %20 = phi i32 [ 0, %entry ], [ %19, %bb2 ] ; [#uses=5]
- %21 = icmp slt i32 %20, %1 ; [#uses=1]
- br i1 %21, label %bb, label %bb5
-
-bb5: ; preds = %bb3, %bb
- %.0 = phi i8 [ 0, %bb ], [ 1, %bb3 ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN14btGeometryUtil22areVerticesBehindPlaneERK9btVector3RK20btAlignedObjectArrayIS0_Ef(%struct.btQuadWord* nocapture %planeNormal, %"struct.btAlignedObjectArray<btVector3>"* nocapture %vertices, float %margin) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertices, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertices, i32 0, i32 3 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 2 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %planeNormal, i32 0, i32 0, i32 3 ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %bb3
- %7 = load %struct.btQuadWord** %2, align 4 ; [#uses=3]
- %8 = load float* %3, align 4 ; [#uses=1]
- %scevgep910 = getelementptr inbounds %struct.btQuadWord* %7, i32 %24, i32 0, i32 0 ; [#uses=1]
- %9 = load float* %scevgep910, align 4 ; [#uses=1]
- %10 = fmul float %8, %9 ; [#uses=1]
- %11 = load float* %4, align 4 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %7, i32 %24, i32 0, i32 1 ; [#uses=1]
- %12 = load float* %scevgep8, align 4 ; [#uses=1]
- %13 = fmul float %11, %12 ; [#uses=1]
- %14 = fadd float %10, %13 ; [#uses=1]
- %15 = load float* %5, align 4 ; [#uses=1]
- %scevgep = getelementptr %struct.btQuadWord* %7, i32 %24, i32 0, i32 2 ; [#uses=1]
- %16 = load float* %scevgep, align 4 ; [#uses=1]
- %17 = fmul float %15, %16 ; [#uses=1]
- %18 = fadd float %14, %17 ; [#uses=1]
- %19 = load float* %6, align 4 ; [#uses=1]
- %20 = fadd float %18, %19 ; [#uses=1]
- %21 = fsub float %20, %margin ; [#uses=1]
- %22 = fcmp ogt float %21, 0.000000e+00 ; [#uses=1]
- br i1 %22, label %bb5, label %bb2
-
-bb2: ; preds = %bb
- %23 = add nsw i32 %24, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- %24 = phi i32 [ 0, %entry ], [ %23, %bb2 ] ; [#uses=5]
- %25 = icmp slt i32 %24, %1 ; [#uses=1]
- br i1 %25, label %bb, label %bb5
-
-bb5: ; preds = %bb3, %bb
- %.0 = phi i8 [ 0, %bb ], [ 1, %bb3 ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN14btGeometryUtil19isPointInsidePlanesERK20btAlignedObjectArrayI9btVector3ERKS1_f(%"struct.btAlignedObjectArray<btVector3>"* nocapture %planeEquations, %struct.btQuadWord* nocapture %point, float %margin) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquations, i32 0, i32 1 ; [#uses=1]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquations, i32 0, i32 3 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 0 ; [#uses=1]
- %4 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 1 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %point, i32 0, i32 0, i32 2 ; [#uses=1]
- br label %bb3
-
-bb: ; preds = %bb3
- %6 = load %struct.btQuadWord** %2, align 4 ; [#uses=4]
- %scevgep1011 = getelementptr inbounds %struct.btQuadWord* %6, i32 %23, i32 0, i32 0 ; [#uses=1]
- %7 = load float* %scevgep1011, align 4 ; [#uses=1]
- %8 = load float* %3, align 4 ; [#uses=1]
- %9 = fmul float %7, %8 ; [#uses=1]
- %scevgep9 = getelementptr %struct.btQuadWord* %6, i32 %23, i32 0, i32 1 ; [#uses=1]
- %10 = load float* %scevgep9, align 4 ; [#uses=1]
- %11 = load float* %4, align 4 ; [#uses=1]
- %12 = fmul float %10, %11 ; [#uses=1]
- %13 = fadd float %9, %12 ; [#uses=1]
- %scevgep8 = getelementptr %struct.btQuadWord* %6, i32 %23, i32 0, i32 2 ; [#uses=1]
- %14 = load float* %scevgep8, align 4 ; [#uses=1]
- %15 = load float* %5, align 4 ; [#uses=1]
- %16 = fmul float %14, %15 ; [#uses=1]
- %17 = fadd float %13, %16 ; [#uses=1]
- %scevgep = getelementptr %struct.btQuadWord* %6, i32 %23, i32 0, i32 3 ; [#uses=1]
- %18 = load float* %scevgep, align 4 ; [#uses=1]
- %19 = fadd float %17, %18 ; [#uses=1]
- %20 = fsub float %19, %margin ; [#uses=1]
- %21 = fcmp ogt float %20, 0.000000e+00 ; [#uses=1]
- br i1 %21, label %bb5, label %bb2
-
-bb2: ; preds = %bb
- %22 = add nsw i32 %23, 1 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- %23 = phi i32 [ 0, %entry ], [ %22, %bb2 ] ; [#uses=6]
- %24 = icmp slt i32 %23, %1 ; [#uses=1]
- br i1 %24, label %bb, label %bb5
-
-bb5: ; preds = %bb3, %bb
- %.0 = phi i8 [ 0, %bb ], [ 1, %bb3 ] ; [#uses=1]
- ret i8 %.0
-}
-
-; [#uses=0]
-define void @_ZN14btGeometryUtil29getVerticesFromPlaneEquationsERK20btAlignedObjectArrayI9btVector3ERS2_(%"struct.btAlignedObjectArray<btVector3>"* nocapture %planeEquations, %"struct.btAlignedObjectArray<btVector3>"* nocapture %verticesOut) align 2 {
-entry:
- %potentialVertex = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquations, i32 0, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph49, label %return
-
-bb.nph49: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquations, i32 0, i32 3 ; [#uses=3]
- %4 = getelementptr inbounds %struct.btQuadWord* %potentialVertex, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = getelementptr inbounds %struct.btQuadWord* %potentialVertex, i32 0, i32 0, i32 1 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btQuadWord* %potentialVertex, i32 0, i32 0, i32 2 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btQuadWord* %potentialVertex, i32 0, i32 0, i32 3 ; [#uses=1]
- %tmp54 = add i32 %1, -2 ; [#uses=1]
- %tmp70 = add i32 %1, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb21, %bb.nph49
- %i.048 = phi i32 [ 0, %bb.nph49 ], [ %j.044, %bb21 ] ; [#uses=8]
- %j.044 = add i32 %i.048, 1 ; [#uses=4]
- %tmp102 = add i32 %i.048, 2 ; [#uses=1]
- %tmp116 = sub i32 %tmp54, %i.048 ; [#uses=1]
- %tmp71 = sub i32 %tmp70, %i.048 ; [#uses=1]
- %8 = load %struct.btQuadWord** %3, align 4 ; [#uses=4]
- %9 = icmp slt i32 %j.044, %1 ; [#uses=1]
- br i1 %9, label %bb.nph47, label %bb21
-
-bb.nph47: ; preds = %bb
- %scevgep119 = getelementptr %struct.btQuadWord* %8, i32 %i.048, i32 0, i32 1 ; [#uses=1]
- %scevgep120121 = getelementptr inbounds %struct.btQuadWord* %8, i32 %i.048, i32 0, i32 0 ; [#uses=1]
- %scevgep122 = getelementptr %struct.btQuadWord* %8, i32 %i.048, i32 0, i32 2 ; [#uses=1]
- %scevgep123 = getelementptr %struct.btQuadWord* %8, i32 %i.048, i32 0, i32 3 ; [#uses=1]
- br label %bb1
-
-bb1: ; preds = %bb20.loopexit, %bb.nph47
- %indvar51 = phi i32 [ 0, %bb.nph47 ], [ %indvar.next52, %bb20.loopexit ] ; [#uses=4]
- %tmp96 = add i32 %j.044, %indvar51 ; [#uses=4]
- %tmp74 = add i32 %tmp102, %indvar51 ; [#uses=2]
- %tmp56 = sub i32 %tmp116, %indvar51 ; [#uses=1]
- %10 = load %struct.btQuadWord** %3, align 4 ; [#uses=4]
- %11 = icmp slt i32 %tmp74, %1 ; [#uses=1]
- br i1 %11, label %bb.nph, label %bb20.loopexit
-
-bb.nph: ; preds = %bb1
- %scevgep94 = getelementptr %struct.btQuadWord* %10, i32 %tmp96, i32 0, i32 3 ; [#uses=1]
- %scevgep93 = getelementptr %struct.btQuadWord* %10, i32 %tmp96, i32 0, i32 2 ; [#uses=1]
- %scevgep92 = getelementptr %struct.btQuadWord* %10, i32 %tmp96, i32 0, i32 1 ; [#uses=1]
- %scevgep9091 = getelementptr inbounds %struct.btQuadWord* %10, i32 %tmp96, i32 0, i32 0 ; [#uses=1]
- br label %bb2
-
-bb2: ; preds = %bb17, %bb.nph
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb17 ] ; [#uses=2]
- %tmp104 = add i32 %tmp74, %indvar ; [#uses=4]
- %12 = load %struct.btQuadWord** %3, align 4 ; [#uses=8]
- %13 = load float* %scevgep9091, align 4 ; [#uses=4]
- %scevgep60 = getelementptr %struct.btQuadWord* %12, i32 %tmp104, i32 0, i32 1 ; [#uses=1]
- %14 = load float* %scevgep60, align 4 ; [#uses=4]
- %15 = fmul float %13, %14 ; [#uses=1]
- %16 = load float* %scevgep92, align 4 ; [#uses=4]
- %scevgep6162 = getelementptr inbounds %struct.btQuadWord* %12, i32 %tmp104, i32 0, i32 0 ; [#uses=1]
- %17 = load float* %scevgep6162, align 4 ; [#uses=4]
- %18 = fmul float %16, %17 ; [#uses=1]
- %19 = fsub float %15, %18 ; [#uses=4]
- %20 = load float* %scevgep93, align 4 ; [#uses=4]
- %21 = fmul float %20, %17 ; [#uses=1]
- %scevgep63 = getelementptr %struct.btQuadWord* %12, i32 %tmp104, i32 0, i32 2 ; [#uses=1]
- %22 = load float* %scevgep63, align 4 ; [#uses=4]
- %23 = fmul float %13, %22 ; [#uses=1]
- %24 = fsub float %21, %23 ; [#uses=4]
- %25 = fmul float %16, %22 ; [#uses=1]
- %26 = fmul float %20, %14 ; [#uses=1]
- %27 = fsub float %25, %26 ; [#uses=4]
- %28 = load float* %scevgep119, align 4 ; [#uses=5]
- %29 = fmul float %17, %28 ; [#uses=1]
- %30 = load float* %scevgep120121, align 4 ; [#uses=5]
- %31 = fmul float %14, %30 ; [#uses=1]
- %32 = fsub float %29, %31 ; [#uses=3]
- %33 = fmul float %22, %30 ; [#uses=1]
- %34 = load float* %scevgep122, align 4 ; [#uses=5]
- %35 = fmul float %17, %34 ; [#uses=1]
- %36 = fsub float %33, %35 ; [#uses=3]
- %37 = fmul float %14, %34 ; [#uses=1]
- %38 = fmul float %22, %28 ; [#uses=1]
- %39 = fsub float %37, %38 ; [#uses=3]
- %40 = fmul float %30, %16 ; [#uses=1]
- %41 = fmul float %28, %13 ; [#uses=1]
- %42 = fsub float %40, %41 ; [#uses=3]
- %43 = fmul float %34, %13 ; [#uses=1]
- %44 = fmul float %30, %20 ; [#uses=1]
- %45 = fsub float %43, %44 ; [#uses=3]
- %46 = fmul float %28, %20 ; [#uses=1]
- %47 = fmul float %34, %16 ; [#uses=1]
- %48 = fsub float %46, %47 ; [#uses=3]
- %49 = fmul float %27, %27 ; [#uses=1]
- %50 = fmul float %24, %24 ; [#uses=1]
- %51 = fadd float %49, %50 ; [#uses=1]
- %52 = fmul float %19, %19 ; [#uses=1]
- %53 = fadd float %51, %52 ; [#uses=1]
- %54 = fcmp ule float %53, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %54, label %bb17, label %bb5
-
-bb5: ; preds = %bb2
- %55 = fmul float %39, %39 ; [#uses=1]
- %56 = fmul float %36, %36 ; [#uses=1]
- %57 = fadd float %55, %56 ; [#uses=1]
- %58 = fmul float %32, %32 ; [#uses=1]
- %59 = fadd float %57, %58 ; [#uses=1]
- %60 = fcmp ule float %59, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %60, label %bb17, label %bb6
-
-bb6: ; preds = %bb5
- %61 = fmul float %48, %48 ; [#uses=1]
- %62 = fmul float %45, %45 ; [#uses=1]
- %63 = fadd float %61, %62 ; [#uses=1]
- %64 = fmul float %42, %42 ; [#uses=1]
- %65 = fadd float %63, %64 ; [#uses=1]
- %66 = fcmp ule float %65, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %66, label %bb17, label %bb10
-
-bb10: ; preds = %bb6
- %67 = fmul float %30, %27 ; [#uses=1]
- %68 = fmul float %28, %24 ; [#uses=1]
- %69 = fadd float %67, %68 ; [#uses=1]
- %70 = fmul float %34, %19 ; [#uses=1]
- %71 = fadd float %69, %70 ; [#uses=2]
- %72 = call float @fabsf(float %71) nounwind readnone ; [#uses=1]
- %73 = fcmp ogt float %72, 0x3EB0C6F7A0000000 ; [#uses=1]
- br i1 %73, label %bb13, label %bb17
-
-bb13: ; preds = %bb10
- %74 = fdiv float -1.000000e+00, %71 ; [#uses=3]
- %75 = load float* %scevgep123, align 4 ; [#uses=3]
- %76 = fmul float %27, %75 ; [#uses=1]
- %77 = fmul float %24, %75 ; [#uses=1]
- %78 = fmul float %19, %75 ; [#uses=1]
- %79 = load float* %scevgep94, align 4 ; [#uses=3]
- %80 = fmul float %39, %79 ; [#uses=1]
- %81 = fmul float %36, %79 ; [#uses=1]
- %82 = fmul float %32, %79 ; [#uses=1]
- %scevgep68 = getelementptr %struct.btQuadWord* %12, i32 %tmp104, i32 0, i32 3 ; [#uses=1]
- %83 = load float* %scevgep68, align 4 ; [#uses=3]
- %84 = fmul float %48, %83 ; [#uses=1]
- %85 = fmul float %45, %83 ; [#uses=1]
- %86 = fmul float %42, %83 ; [#uses=1]
- store float 0.000000e+00, float* %7, align 4
- %87 = fadd float %76, %80 ; [#uses=1]
- %88 = fadd float %77, %81 ; [#uses=1]
- %89 = fadd float %78, %82 ; [#uses=1]
- %90 = fadd float %87, %84 ; [#uses=1]
- %91 = fadd float %88, %85 ; [#uses=1]
- %92 = fadd float %89, %86 ; [#uses=1]
- %93 = fmul float %90, %74 ; [#uses=2]
- store float %93, float* %4, align 8
- %94 = fmul float %91, %74 ; [#uses=2]
- store float %94, float* %5, align 4
- %95 = fmul float %92, %74 ; [#uses=2]
- store float %95, float* %6, align 8
- %96 = load i32* %0, align 4 ; [#uses=1]
- br label %bb3.i
-
-bb.i: ; preds = %bb3.i
- %scevgep1011.i = getelementptr inbounds %struct.btQuadWord* %12, i32 %110, i32 0, i32 0 ; [#uses=1]
- %97 = load float* %scevgep1011.i, align 4 ; [#uses=1]
- %98 = fmul float %97, %93 ; [#uses=1]
- %scevgep9.i = getelementptr %struct.btQuadWord* %12, i32 %110, i32 0, i32 1 ; [#uses=1]
- %99 = load float* %scevgep9.i, align 4 ; [#uses=1]
- %100 = fmul float %99, %94 ; [#uses=1]
- %101 = fadd float %98, %100 ; [#uses=1]
- %scevgep8.i = getelementptr %struct.btQuadWord* %12, i32 %110, i32 0, i32 2 ; [#uses=1]
- %102 = load float* %scevgep8.i, align 4 ; [#uses=1]
- %103 = fmul float %102, %95 ; [#uses=1]
- %104 = fadd float %101, %103 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btQuadWord* %12, i32 %110, i32 0, i32 3 ; [#uses=1]
- %105 = load float* %scevgep.i, align 4 ; [#uses=1]
- %106 = fadd float %104, %105 ; [#uses=1]
- %107 = fadd float %106, 0xBF847AE140000000 ; [#uses=1]
- %108 = fcmp ogt float %107, 0.000000e+00 ; [#uses=1]
- br i1 %108, label %bb17, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %109 = add nsw i32 %110, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb13
- %110 = phi i32 [ 0, %bb13 ], [ %109, %bb2.i ] ; [#uses=6]
- %111 = icmp slt i32 %110, %96 ; [#uses=1]
- br i1 %111, label %bb.i, label %bb16
-
-bb16: ; preds = %bb3.i
- call void @_ZN20btAlignedObjectArrayI9btVector3E9push_backERKS0_(%"struct.btAlignedObjectArray<btVector3>"* %verticesOut, %struct.btQuadWord* %potentialVertex) inlinehint
- br label %bb17
-
-bb17: ; preds = %bb16, %bb.i, %bb10, %bb6, %bb5, %bb2
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %indvar.next, %tmp56 ; [#uses=1]
- br i1 %exitcond, label %bb20.loopexit, label %bb2
-
-bb20.loopexit: ; preds = %bb17, %bb1
- %indvar.next52 = add i32 %indvar51, 1 ; [#uses=2]
- %exitcond72 = icmp eq i32 %indvar.next52, %tmp71 ; [#uses=1]
- br i1 %exitcond72, label %bb21, label %bb1
-
-bb21: ; preds = %bb20.loopexit, %bb
- %exitcond95 = icmp eq i32 %j.044, %1 ; [#uses=1]
- br i1 %exitcond95, label %return, label %bb
-
-return: ; preds = %bb21, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN14btGeometryUtil29getPlaneEquationsFromVerticesER20btAlignedObjectArrayI9btVector3ES3_(%"struct.btAlignedObjectArray<btVector3>"* nocapture %vertices, %"struct.btAlignedObjectArray<btVector3>"* nocapture %planeEquationsOut) align 2 {
-entry:
- %planeEquation = alloca %struct.btQuadWord, align 8 ; [#uses=5]
- %0 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertices, i32 0, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=6]
- %2 = icmp sgt i32 %1, 0 ; [#uses=1]
- br i1 %2, label %bb.nph50, label %return
-
-bb.nph50: ; preds = %entry
- %3 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %vertices, i32 0, i32 3 ; [#uses=4]
- %4 = getelementptr inbounds %struct.btQuadWord* %planeEquation, i32 0, i32 0, i32 0 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btQuadWord* %planeEquation, i32 0, i32 0, i32 1 ; [#uses=2]
- %6 = getelementptr inbounds %struct.btQuadWord* %planeEquation, i32 0, i32 0, i32 2 ; [#uses=2]
- %7 = getelementptr inbounds %struct.btQuadWord* %planeEquation, i32 0, i32 0, i32 3 ; [#uses=2]
- %8 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquationsOut, i32 0, i32 1 ; [#uses=1]
- %9 = getelementptr inbounds %"struct.btAlignedObjectArray<btVector3>"* %planeEquationsOut, i32 0, i32 3 ; [#uses=1]
- %tmp59 = add i32 %1, -2 ; [#uses=1]
- %tmp71 = add i32 %1, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb18, %bb.nph50
- %i.049 = phi i32 [ 0, %bb.nph50 ], [ %j.045, %bb18 ] ; [#uses=7]
- %j.045 = add i32 %i.049, 1 ; [#uses=4]
- %tmp96 = add i32 %i.049, 2 ; [#uses=1]
- %tmp105 = sub i32 %tmp59, %i.049 ; [#uses=1]
- %tmp72 = sub i32 %tmp71, %i.049 ; [#uses=1]
- %10 = load %struct.btQuadWord** %3, align 4 ; [#uses=3]
- %11 = icmp slt i32 %j.045, %1 ; [#uses=1]
- br i1 %11, label %bb.nph48, label %bb18
-
-bb.nph48: ; preds = %bb
- %scevgep108 = getelementptr %struct.btQuadWord* %10, i32 %i.049, i32 0, i32 2 ; [#uses=2]
- %scevgep109 = getelementptr %struct.btQuadWord* %10, i32 %i.049, i32 0, i32 1 ; [#uses=2]
- %scevgep110111 = getelementptr inbounds %struct.btQuadWord* %10, i32 %i.049, i32 0, i32 0 ; [#uses=2]
- br label %bb1
-
-bb1: ; preds = %bb17.loopexit, %bb.nph48
- %indvar56 = phi i32 [ 0, %bb.nph48 ], [ %indvar.next57, %bb17.loopexit ] ; [#uses=4]
- %tmp91 = add i32 %j.045, %indvar56 ; [#uses=3]
- %tmp75 = add i32 %tmp96, %indvar56 ; [#uses=2]
- %tmp61 = sub i32 %tmp105, %indvar56 ; [#uses=1]
- %12 = load %struct.btQuadWord** %3, align 4 ; [#uses=3]
- %13 = icmp slt i32 %tmp75, %1 ; [#uses=1]
- br i1 %13, label %bb.nph44, label %bb17.loopexit
-
-bb.nph44: ; preds = %bb1
- %scevgep8889 = getelementptr inbounds %struct.btQuadWord* %12, i32 %tmp91, i32 0, i32 0 ; [#uses=1]
- %scevgep87 = getelementptr %struct.btQuadWord* %12, i32 %tmp91, i32 0, i32 1 ; [#uses=1]
- %scevgep86 = getelementptr %struct.btQuadWord* %12, i32 %tmp91, i32 0, i32 2 ; [#uses=1]
- br label %bb.nph
-
-bb.nph: ; preds = %bb14, %bb.nph44
- %indvar = phi i32 [ 0, %bb.nph44 ], [ %indvar.next, %bb14 ] ; [#uses=2]
- %tmp98 = add i32 %tmp75, %indvar ; [#uses=3]
- %14 = load %struct.btQuadWord** %3, align 4 ; [#uses=3]
- %15 = load float* %scevgep86, align 4 ; [#uses=1]
- %16 = load float* %scevgep108, align 4 ; [#uses=2]
- %17 = fsub float %15, %16 ; [#uses=2]
- %18 = load float* %scevgep87, align 4 ; [#uses=1]
- %19 = load float* %scevgep109, align 4 ; [#uses=2]
- %20 = fsub float %18, %19 ; [#uses=2]
- %21 = load float* %scevgep8889, align 4 ; [#uses=1]
- %22 = load float* %scevgep110111, align 4 ; [#uses=2]
- %23 = fsub float %21, %22 ; [#uses=2]
- %scevgep66 = getelementptr %struct.btQuadWord* %14, i32 %tmp98, i32 0, i32 2 ; [#uses=1]
- %24 = load float* %scevgep66, align 4 ; [#uses=1]
- %25 = fsub float %24, %16 ; [#uses=2]
- %scevgep67 = getelementptr %struct.btQuadWord* %14, i32 %tmp98, i32 0, i32 1 ; [#uses=1]
- %26 = load float* %scevgep67, align 4 ; [#uses=1]
- %27 = fsub float %26, %19 ; [#uses=2]
- %scevgep6869 = getelementptr inbounds %struct.btQuadWord* %14, i32 %tmp98, i32 0, i32 0 ; [#uses=1]
- %28 = load float* %scevgep6869, align 4 ; [#uses=1]
- %29 = fsub float %28, %22 ; [#uses=2]
- %30 = fmul float %23, %27 ; [#uses=1]
- %31 = fmul float %20, %29 ; [#uses=1]
- %32 = fsub float %30, %31 ; [#uses=1]
- %33 = fmul float %17, %29 ; [#uses=1]
- %34 = fmul float %23, %25 ; [#uses=1]
- %35 = fsub float %33, %34 ; [#uses=1]
- %36 = fmul float %20, %25 ; [#uses=1]
- %37 = fmul float %17, %27 ; [#uses=1]
- %38 = fsub float %36, %37 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb12, %bb.nph
- %ww.042 = phi i32 [ 0, %bb.nph ], [ %92, %bb12 ] ; [#uses=1]
- %normalSign.041 = phi float [ 1.000000e+00, %bb.nph ], [ -1.000000e+00, %bb12 ] ; [#uses=3]
- %39 = fmul float %32, %normalSign.041 ; [#uses=4]
- %40 = fmul float %35, %normalSign.041 ; [#uses=4]
- %41 = fmul float %38, %normalSign.041 ; [#uses=4]
- store float %41, float* %4, align 8
- store float %40, float* %5, align 4
- store float %39, float* %6, align 8
- store float 0.000000e+00, float* %7, align 4
- %42 = fmul float %41, %41 ; [#uses=1]
- %43 = fmul float %40, %40 ; [#uses=1]
- %44 = fadd float %42, %43 ; [#uses=1]
- %45 = fmul float %39, %39 ; [#uses=1]
- %46 = fadd float %44, %45 ; [#uses=2]
- %47 = fcmp ogt float %46, 0x3F1A36E2E0000000 ; [#uses=1]
- br i1 %47, label %bb7, label %bb12
-
-bb7: ; preds = %bb5
- %48 = call float @sqrtf(float %46) nounwind readonly ; [#uses=1]
- %49 = fdiv float 1.000000e+00, %48 ; [#uses=3]
- %50 = fmul float %41, %49 ; [#uses=4]
- store float %50, float* %4, align 8
- %51 = fmul float %40, %49 ; [#uses=4]
- store float %51, float* %5, align 4
- %52 = fmul float %39, %49 ; [#uses=4]
- store float %52, float* %6, align 8
- %53 = load i32* %8, align 4 ; [#uses=1]
- br label %bb3.i26
-
-bb.i24: ; preds = %bb3.i26
- %54 = load %struct.btQuadWord** %9, align 4 ; [#uses=3]
- %scevgep910.i21 = getelementptr inbounds %struct.btQuadWord* %54, i32 %65, i32 0, i32 0 ; [#uses=1]
- %55 = load float* %scevgep910.i21, align 4 ; [#uses=1]
- %56 = fmul float %50, %55 ; [#uses=1]
- %scevgep8.i22 = getelementptr %struct.btQuadWord* %54, i32 %65, i32 0, i32 1 ; [#uses=1]
- %57 = load float* %scevgep8.i22, align 4 ; [#uses=1]
- %58 = fmul float %51, %57 ; [#uses=1]
- %59 = fadd float %56, %58 ; [#uses=1]
- %scevgep.i23 = getelementptr %struct.btQuadWord* %54, i32 %65, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %scevgep.i23, align 4 ; [#uses=1]
- %61 = fmul float %52, %60 ; [#uses=1]
- %62 = fadd float %59, %61 ; [#uses=1]
- %63 = fcmp ogt float %62, 0x3FEFF7CEE0000000 ; [#uses=1]
- br i1 %63, label %bb12, label %bb2.i25
-
-bb2.i25: ; preds = %bb.i24
- %64 = add nsw i32 %65, 1 ; [#uses=1]
- br label %bb3.i26
-
-bb3.i26: ; preds = %bb2.i25, %bb7
- %65 = phi i32 [ 0, %bb7 ], [ %64, %bb2.i25 ] ; [#uses=5]
- %66 = icmp slt i32 %65, %53 ; [#uses=1]
- br i1 %66, label %bb.i24, label %bb9
-
-bb9: ; preds = %bb3.i26
- %67 = load float* %scevgep110111, align 4 ; [#uses=1]
- %68 = fmul float %50, %67 ; [#uses=1]
- %69 = load float* %scevgep109, align 4 ; [#uses=1]
- %70 = fmul float %51, %69 ; [#uses=1]
- %71 = fadd float %68, %70 ; [#uses=1]
- %72 = load float* %scevgep108, align 4 ; [#uses=1]
- %73 = fmul float %52, %72 ; [#uses=1]
- %74 = fadd float %71, %73 ; [#uses=2]
- %75 = fsub float -0.000000e+00, %74 ; [#uses=1]
- store float %75, float* %7, align 4
- %76 = load i32* %0, align 4 ; [#uses=1]
- br label %bb3.i
-
-bb.i: ; preds = %bb3.i
- %77 = load %struct.btQuadWord** %3, align 4 ; [#uses=3]
- %scevgep910.i = getelementptr inbounds %struct.btQuadWord* %77, i32 %90, i32 0, i32 0 ; [#uses=1]
- %78 = load float* %scevgep910.i, align 4 ; [#uses=1]
- %79 = fmul float %50, %78 ; [#uses=1]
- %scevgep8.i = getelementptr %struct.btQuadWord* %77, i32 %90, i32 0, i32 1 ; [#uses=1]
- %80 = load float* %scevgep8.i, align 4 ; [#uses=1]
- %81 = fmul float %51, %80 ; [#uses=1]
- %82 = fadd float %79, %81 ; [#uses=1]
- %scevgep.i = getelementptr %struct.btQuadWord* %77, i32 %90, i32 0, i32 2 ; [#uses=1]
- %83 = load float* %scevgep.i, align 4 ; [#uses=1]
- %84 = fmul float %52, %83 ; [#uses=1]
- %85 = fadd float %82, %84 ; [#uses=1]
- %86 = fsub float %85, %74 ; [#uses=1]
- %87 = fadd float %86, 0xBF847AE140000000 ; [#uses=1]
- %88 = fcmp ogt float %87, 0.000000e+00 ; [#uses=1]
- br i1 %88, label %bb12, label %bb2.i
-
-bb2.i: ; preds = %bb.i
- %89 = add nsw i32 %90, 1 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb9
- %90 = phi i32 [ 0, %bb9 ], [ %89, %bb2.i ] ; [#uses=5]
- %91 = icmp slt i32 %90, %76 ; [#uses=1]
- br i1 %91, label %bb.i, label %bb11
-
-bb11: ; preds = %bb3.i
- call void @_ZN20btAlignedObjectArrayI9btVector3E9push_backERKS0_(%"struct.btAlignedObjectArray<btVector3>"* %planeEquationsOut, %struct.btQuadWord* %planeEquation) inlinehint
- br label %bb12
-
-bb12: ; preds = %bb11, %bb.i, %bb.i24, %bb5
- %92 = add nsw i32 %ww.042, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %92, 2 ; [#uses=1]
- br i1 %exitcond, label %bb14, label %bb5
-
-bb14: ; preds = %bb12
- %indvar.next = add i32 %indvar, 1 ; [#uses=2]
- %exitcond62 = icmp eq i32 %indvar.next, %tmp61 ; [#uses=1]
- br i1 %exitcond62, label %bb17.loopexit, label %bb.nph
-
-bb17.loopexit: ; preds = %bb14, %bb1
- %indvar.next57 = add i32 %indvar56, 1 ; [#uses=2]
- %exitcond73 = icmp eq i32 %indvar.next57, %tmp72 ; [#uses=1]
- br i1 %exitcond73, label %bb18, label %bb1
-
-bb18: ; preds = %bb17.loopexit, %bb
- %exitcond90 = icmp eq i32 %j.045, %1 ; [#uses=1]
- br i1 %exitcond90, label %return, label %bb
-
-return: ; preds = %bb18, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN7btClockC2Ev(%struct.btClock* nocapture %this) align 2 {
-entry:
- %0 = tail call i8* @_Znwj(i32 8) ; [#uses=2]
- %1 = bitcast i8* %0 to %struct.btClockData* ; [#uses=1]
- %2 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btClockData* %1, %struct.btClockData** %2, align 4
- %3 = bitcast i8* %0 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %4 = tail call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %3, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- ret void
-}
-
-; [#uses=1]
-define internal void @_GLOBAL__I__ZN7btClockC2Ev() {
-entry:
- %0 = tail call i8* @_Znwj(i32 8) ; [#uses=2]
- %1 = bitcast i8* %0 to %struct.btClockData* ; [#uses=1]
- store %struct.btClockData* %1, %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8
- %2 = bitcast i8* %0 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %3 = tail call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %2, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %4 = tail call i32 @__cxa_atexit(void (i8*)* @__tcf_040, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- store i8* getelementptr inbounds ([5 x i8]* @.str633, i32 0, i32 0), i8** getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 0), align 32
- store i32 0, i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 1), align 4
- store float 0.000000e+00, float* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 2), align 8
- store i32 0, i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 3), align 4
- store i32 0, i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 4), align 16
- store %struct.CProfileNode* null, %struct.CProfileNode** getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 5), align 4
- store %struct.CProfileNode* null, %struct.CProfileNode** getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 6), align 8
- store %struct.CProfileNode* null, %struct.CProfileNode** getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 7), align 4
- tail call void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* @_ZN15CProfileManager4RootE) nounwind
- %5 = tail call i32 @__cxa_atexit(void (i8*)* @__tcf_139, i8* null, i8* bitcast (i8** @__dso_handle to i8*)) nounwind ; [#uses=0]
- ret void
-}
-
-; [#uses=0]
-define %struct.btClock* @_ZN7btClockaSERKS_(%struct.btClock* %this, %struct.btClock* nocapture %other) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btClockData** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.btClock* %other, i32 0, i32 0 ; [#uses=1]
- %3 = load %struct.btClockData** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btClockData* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = getelementptr inbounds %struct.btClockData* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- %7 = load i32* %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.btClockData* %1, i32 0, i32 0, i32 0 ; [#uses=1]
- store i32 %5, i32* %8, align 4
- %9 = getelementptr inbounds %struct.btClockData* %1, i32 0, i32 0, i32 1 ; [#uses=1]
- store i32 %7, i32* %9, align 4
- ret %struct.btClock* %this
-}
-
-; [#uses=7]
-define void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* nocapture %this) nounwind align 2 {
-entry:
- br label %tailrecurse
-
-tailrecurse: ; preds = %bb1, %entry
- %this.tr = phi %struct.CProfileNode* [ %this, %entry ], [ %6, %bb1 ] ; [#uses=4]
- %0 = getelementptr inbounds %struct.CProfileNode* %this.tr, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %0, align 4
- %1 = getelementptr inbounds %struct.CProfileNode* %this.tr, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %1, align 4
- %2 = getelementptr inbounds %struct.CProfileNode* %this.tr, i32 0, i32 6 ; [#uses=1]
- %3 = load %struct.CProfileNode** %2, align 4 ; [#uses=2]
- %4 = icmp eq %struct.CProfileNode* %3, null ; [#uses=1]
- br i1 %4, label %bb1, label %bb
-
-bb: ; preds = %tailrecurse
- tail call void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* %3)
- br label %bb1
-
-bb1: ; preds = %bb, %tailrecurse
- %5 = getelementptr inbounds %struct.CProfileNode* %this.tr, i32 0, i32 7 ; [#uses=1]
- %6 = load %struct.CProfileNode** %5, align 4 ; [#uses=2]
- %7 = icmp eq %struct.CProfileNode* %6, null ; [#uses=1]
- br i1 %7, label %return, label %tailrecurse
-
-return: ; preds = %bb1
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12CProfileNodeC1EPKcPS_(%struct.CProfileNode* nocapture %this, i8* %name, %struct.CProfileNode* %parent) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 0 ; [#uses=1]
- store i8* %name, i8** %0, align 4
- %1 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %1, align 4
- %2 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.CProfileNode* %parent, %struct.CProfileNode** %5, align 4
- %6 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.CProfileNode* null, %struct.CProfileNode** %6, align 4
- %7 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 7 ; [#uses=1]
- store %struct.CProfileNode* null, %struct.CProfileNode** %7, align 4
- tail call void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* %this)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12CProfileNodeC2EPKcPS_(%struct.CProfileNode* nocapture %this, i8* %name, %struct.CProfileNode* %parent) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 0 ; [#uses=1]
- store i8* %name, i8** %0, align 4
- %1 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 1 ; [#uses=1]
- store i32 0, i32* %1, align 4
- %2 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 2 ; [#uses=1]
- store float 0.000000e+00, float* %2, align 4
- %3 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 3 ; [#uses=1]
- store i32 0, i32* %3, align 4
- %4 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 4 ; [#uses=1]
- store i32 0, i32* %4, align 4
- %5 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 5 ; [#uses=1]
- store %struct.CProfileNode* %parent, %struct.CProfileNode** %5, align 4
- %6 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 6 ; [#uses=1]
- store %struct.CProfileNode* null, %struct.CProfileNode** %6, align 4
- %7 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 7 ; [#uses=1]
- store %struct.CProfileNode* null, %struct.CProfileNode** %7, align 4
- tail call void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* %this)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16CProfileIteratorC2EP12CProfileNode(%struct.CProfileIterator* nocapture %this, %struct.CProfileNode* %start) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.CProfileNode* %start, %struct.CProfileNode** %0, align 4
- %1 = getelementptr inbounds %struct.CProfileNode* %start, i32 0, i32 6 ; [#uses=1]
- %2 = load %struct.CProfileNode** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.CProfileNode* %2, %struct.CProfileNode** %3, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16CProfileIteratorC1EP12CProfileNode(%struct.CProfileIterator* nocapture %this, %struct.CProfileNode* %start) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.CProfileNode* %start, %struct.CProfileNode** %0, align 4
- %1 = getelementptr inbounds %struct.CProfileNode* %start, i32 0, i32 6 ; [#uses=1]
- %2 = load %struct.CProfileNode** %1, align 4 ; [#uses=1]
- %3 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.CProfileNode* %2, %struct.CProfileNode** %3, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16CProfileIterator5FirstEv(%struct.CProfileIterator* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CProfileNode* %1, i32 0, i32 6 ; [#uses=1]
- %3 = load %struct.CProfileNode** %2, align 4 ; [#uses=1]
- %4 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.CProfileNode* %3, %struct.CProfileNode** %4, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16CProfileIterator4NextEv(%struct.CProfileIterator* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CProfileNode* %1, i32 0, i32 7 ; [#uses=1]
- %3 = load %struct.CProfileNode** %2, align 4 ; [#uses=1]
- store %struct.CProfileNode* %3, %struct.CProfileNode** %0, align 4
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN16CProfileIterator7Is_DoneEv(%struct.CProfileIterator* nocapture %this) nounwind readonly align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 1 ; [#uses=1]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=1]
- %2 = icmp eq %struct.CProfileNode* %1, null ; [#uses=1]
- %retval12 = zext i1 %2 to i8 ; [#uses=1]
- ret i8 %retval12
-}
-
-; [#uses=0]
-define void @_ZN16CProfileIterator11Enter_ChildEi(%struct.CProfileIterator* nocapture %this, i32 %index) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 0 ; [#uses=2]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.CProfileNode* %1, i32 0, i32 6 ; [#uses=1]
- %3 = load %struct.CProfileNode** %2, align 4 ; [#uses=4]
- %4 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 1 ; [#uses=3]
- store %struct.CProfileNode* %3, %struct.CProfileNode** %4, align 4
- %5 = icmp ne %struct.CProfileNode* %3, null ; [#uses=1]
- %6 = icmp ne i32 %index, 0 ; [#uses=1]
- %7 = and i1 %5, %6 ; [#uses=1]
- br i1 %7, label %bb.nph, label %bb4
-
-bb.nph: ; preds = %entry
- %tmp8 = add i32 %index, -1 ; [#uses=1]
- br label %bb
-
-bb: ; preds = %bb, %bb.nph
- %8 = phi %struct.CProfileNode* [ %3, %bb.nph ], [ %10, %bb ] ; [#uses=1]
- %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb ] ; [#uses=2]
- %9 = getelementptr inbounds %struct.CProfileNode* %8, i32 0, i32 7 ; [#uses=1]
- %10 = load %struct.CProfileNode** %9, align 4 ; [#uses=4]
- store %struct.CProfileNode* %10, %struct.CProfileNode** %4, align 4
- %11 = icmp ne %struct.CProfileNode* %10, null ; [#uses=1]
- %12 = icmp ne i32 %tmp8, %indvar ; [#uses=1]
- %13 = and i1 %11, %12 ; [#uses=1]
- %indvar.next = add i32 %indvar, 1 ; [#uses=1]
- br i1 %13, label %bb, label %bb4
-
-bb4: ; preds = %bb, %entry
- %14 = phi %struct.CProfileNode* [ %3, %entry ], [ %10, %bb ] ; [#uses=3]
- %15 = icmp eq %struct.CProfileNode* %14, null ; [#uses=1]
- br i1 %15, label %return, label %bb5
-
-bb5: ; preds = %bb4
- store %struct.CProfileNode* %14, %struct.CProfileNode** %0, align 4
- %16 = getelementptr inbounds %struct.CProfileNode* %14, i32 0, i32 6 ; [#uses=1]
- %17 = load %struct.CProfileNode** %16, align 4 ; [#uses=1]
- store %struct.CProfileNode* %17, %struct.CProfileNode** %4, align 4
- ret void
-
-return: ; preds = %bb4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN16CProfileIterator12Enter_ParentEv(%struct.CProfileIterator* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 0 ; [#uses=2]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=2]
- %2 = getelementptr inbounds %struct.CProfileNode* %1, i32 0, i32 5 ; [#uses=1]
- %3 = load %struct.CProfileNode** %2, align 4 ; [#uses=3]
- %4 = icmp eq %struct.CProfileNode* %3, null ; [#uses=1]
- br i1 %4, label %bb1, label %bb
-
-bb: ; preds = %entry
- store %struct.CProfileNode* %3, %struct.CProfileNode** %0, align 4
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %5 = phi %struct.CProfileNode* [ %1, %entry ], [ %3, %bb ] ; [#uses=1]
- %6 = getelementptr inbounds %struct.CProfileNode* %5, i32 0, i32 6 ; [#uses=1]
- %7 = load %struct.CProfileNode** %6, align 4 ; [#uses=1]
- %8 = getelementptr inbounds %struct.CProfileIterator* %this, i32 0, i32 1 ; [#uses=1]
- store %struct.CProfileNode* %7, %struct.CProfileNode** %8, align 4
- ret void
-}
-
-; [#uses=1]
-define void @_ZN15CProfileManager23Increment_Frame_CounterEv() nounwind align 2 {
-entry:
- %0 = load i32* @_ZN15CProfileManager12FrameCounterE, align 4 ; [#uses=1]
- %1 = add nsw i32 %0, 1 ; [#uses=1]
- store i32 %1, i32* @_ZN15CProfileManager12FrameCounterE, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN7btClockC1ERKS_(%struct.btClock* nocapture %this, %struct.btClock* nocapture %other) align 2 {
-entry:
- %0 = tail call i8* @_Znwj(i32 8) ; [#uses=3]
- %1 = bitcast i8* %0 to %struct.btClockData* ; [#uses=1]
- %2 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btClockData* %1, %struct.btClockData** %2, align 4
- %3 = getelementptr inbounds %struct.btClock* %other, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btClockData** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %9 = bitcast i8* %0 to i32* ; [#uses=1]
- store i32 %6, i32* %9, align 4
- %10 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %11 = bitcast i8* %10 to i32* ; [#uses=1]
- store i32 %8, i32* %11, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN7btClockC2ERKS_(%struct.btClock* nocapture %this, %struct.btClock* nocapture %other) align 2 {
-entry:
- %0 = tail call i8* @_Znwj(i32 8) ; [#uses=3]
- %1 = bitcast i8* %0 to %struct.btClockData* ; [#uses=1]
- %2 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btClockData* %1, %struct.btClockData** %2, align 4
- %3 = getelementptr inbounds %struct.btClock* %other, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btClockData** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %8 = load i32* %7, align 4 ; [#uses=1]
- %9 = bitcast i8* %0 to i32* ; [#uses=1]
- store i32 %6, i32* %9, align 4
- %10 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %11 = bitcast i8* %10 to i32* ; [#uses=1]
- store i32 %8, i32* %11, align 4
- ret void
-}
-
-; [#uses=0]
-define %struct.CProfileNode* @_ZN12CProfileNode12Get_Sub_NodeEPKc(%struct.CProfileNode* %this, i8* %name) align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 6 ; [#uses=3]
- br label %bb3
-
-bb: ; preds = %bb3
- %1 = getelementptr inbounds %struct.CProfileNode* %child.0, i32 0, i32 0 ; [#uses=1]
- %2 = load i8** %1, align 4 ; [#uses=1]
- %3 = icmp eq i8* %2, %name ; [#uses=1]
- br i1 %3, label %bb7, label %bb2
-
-bb2: ; preds = %bb
- %4 = getelementptr inbounds %struct.CProfileNode* %child.0, i32 0, i32 7 ; [#uses=1]
- br label %bb3
-
-bb3: ; preds = %bb2, %entry
- %child.0.in = phi %struct.CProfileNode** [ %0, %entry ], [ %4, %bb2 ] ; [#uses=1]
- %child.0 = load %struct.CProfileNode** %child.0.in, align 4 ; [#uses=4]
- %5 = icmp eq %struct.CProfileNode* %child.0, null ; [#uses=1]
- br i1 %5, label %bb6, label %bb
-
-bb6: ; preds = %bb3
- %6 = tail call i8* @_Znwj(i32 32) ; [#uses=9]
- %7 = bitcast i8* %6 to %struct.CProfileNode* ; [#uses=3]
- %8 = bitcast i8* %6 to i8** ; [#uses=1]
- store i8* %name, i8** %8, align 4
- %9 = getelementptr inbounds i8* %6, i32 4 ; [#uses=1]
- %10 = bitcast i8* %9 to i32* ; [#uses=1]
- store i32 0, i32* %10, align 4
- %11 = getelementptr inbounds i8* %6, i32 8 ; [#uses=1]
- %12 = bitcast i8* %11 to float* ; [#uses=1]
- store float 0.000000e+00, float* %12, align 4
- %13 = getelementptr inbounds i8* %6, i32 12 ; [#uses=1]
- %14 = bitcast i8* %13 to i32* ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds i8* %6, i32 16 ; [#uses=1]
- %16 = bitcast i8* %15 to i32* ; [#uses=1]
- store i32 0, i32* %16, align 4
- %17 = getelementptr inbounds i8* %6, i32 20 ; [#uses=1]
- %18 = bitcast i8* %17 to %struct.CProfileNode** ; [#uses=1]
- store %struct.CProfileNode* %this, %struct.CProfileNode** %18, align 4
- %19 = getelementptr inbounds i8* %6, i32 24 ; [#uses=1]
- %20 = bitcast i8* %19 to %struct.CProfileNode** ; [#uses=1]
- store %struct.CProfileNode* null, %struct.CProfileNode** %20, align 4
- %21 = getelementptr inbounds i8* %6, i32 28 ; [#uses=1]
- %22 = bitcast i8* %21 to %struct.CProfileNode** ; [#uses=2]
- store %struct.CProfileNode* null, %struct.CProfileNode** %22, align 4
- tail call void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* %7) nounwind
- %23 = load %struct.CProfileNode** %0, align 4 ; [#uses=1]
- store %struct.CProfileNode* %23, %struct.CProfileNode** %22, align 4
- store %struct.CProfileNode* %7, %struct.CProfileNode** %0, align 4
- ret %struct.CProfileNode* %7
-
-bb7: ; preds = %bb
- ret %struct.CProfileNode* %child.0
-}
-
-; [#uses=7]
-define void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.CProfileNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- tail call void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* %1)
- %3 = bitcast %struct.CProfileNode* %1 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %3) nounwind
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %4 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 7 ; [#uses=1]
- %5 = load %struct.CProfileNode** %4, align 4 ; [#uses=3]
- %6 = icmp eq %struct.CProfileNode* %5, null ; [#uses=1]
- br i1 %6, label %return, label %bb2
-
-bb2: ; preds = %bb1
- tail call void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* %5)
- %7 = bitcast %struct.CProfileNode* %5 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %7) nounwind
- ret void
-
-return: ; preds = %bb1
- ret void
-}
-
-; [#uses=1]
-define internal void @__tcf_139(i8* nocapture %unnamed_arg) nounwind {
-entry:
- tail call void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* @_ZN15CProfileManager4RootE)
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12CProfileNodeD2Ev(%struct.CProfileNode* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 6 ; [#uses=1]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.CProfileNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- tail call void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* %1)
- %3 = bitcast %struct.CProfileNode* %1 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %3) nounwind
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- %4 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 7 ; [#uses=1]
- %5 = load %struct.CProfileNode** %4, align 4 ; [#uses=3]
- %6 = icmp eq %struct.CProfileNode* %5, null ; [#uses=1]
- br i1 %6, label %return, label %bb2
-
-bb2: ; preds = %bb1
- tail call void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* %5)
- %7 = bitcast %struct.CProfileNode* %5 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %7) nounwind
- ret void
-
-return: ; preds = %bb1
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12CProfileNode13CleanupMemoryEv(%struct.CProfileNode* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 6 ; [#uses=2]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=3]
- %2 = icmp eq %struct.CProfileNode* %1, null ; [#uses=1]
- br i1 %2, label %bb1, label %bb
-
-bb: ; preds = %entry
- tail call void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* %1)
- %3 = bitcast %struct.CProfileNode* %1 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %3) nounwind
- br label %bb1
-
-bb1: ; preds = %bb, %entry
- store %struct.CProfileNode* null, %struct.CProfileNode** %0, align 4
- %4 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 7 ; [#uses=2]
- %5 = load %struct.CProfileNode** %4, align 4 ; [#uses=3]
- %6 = icmp eq %struct.CProfileNode* %5, null ; [#uses=1]
- br i1 %6, label %bb3, label %bb2
-
-bb2: ; preds = %bb1
- tail call void @_ZN12CProfileNodeD1Ev(%struct.CProfileNode* %5)
- %7 = bitcast %struct.CProfileNode* %5 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %7) nounwind
- br label %bb3
-
-bb3: ; preds = %bb2, %bb1
- store %struct.CProfileNode* null, %struct.CProfileNode** %4, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN7btClockD1Ev(%struct.btClock* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btClockData** %0, align 4 ; [#uses=1]
- %2 = bitcast %struct.btClockData* %1 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=1]
-define internal void @__tcf_040(i8* nocapture %unnamed_arg) nounwind {
-entry:
- %0 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=1]
- %1 = bitcast %struct.btClockData* %0 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %1) nounwind
- ret void
-}
-
-; [#uses=0]
-define void @_ZN7btClockD2Ev(%struct.btClock* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btClockData** %0, align 4 ; [#uses=1]
- %2 = bitcast %struct.btClockData* %1 to i8* ; [#uses=1]
- tail call void @_ZdlPv(i8* %2) nounwind
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN7btClock19getTimeMicrosecondsEv(%struct.btClock* nocapture %this) nounwind align 2 {
-entry:
- %currentTime = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime, i32 0, i32 0 ; [#uses=1]
- %2 = load i32* %1, align 8 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btClockData** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = sub nsw i32 %2, %6 ; [#uses=1]
- %8 = mul nsw i32 %7, 1000000 ; [#uses=1]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime, i32 0, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = add i32 %8, %10 ; [#uses=1]
- %14 = sub i32 %13, %12 ; [#uses=1]
- ret i32 %14
-}
-
-; [#uses=15]
-declare i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias, %struct.CONTACT_KEY_TOKEN* noalias) nounwind
-
-; [#uses=0]
-define float @_ZN15CProfileManager20Get_Time_Since_ResetEv() nounwind align 2 {
-entry:
- %currentTime.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 0 ; [#uses=1]
- %2 = load i32* %1, align 8 ; [#uses=1]
- %3 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %4 = getelementptr inbounds %struct.btClockData* %3, i32 0, i32 0, i32 0 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = sub nsw i32 %2, %5 ; [#uses=1]
- %7 = mul nsw i32 %6, 1000000 ; [#uses=1]
- %8 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 1 ; [#uses=1]
- %9 = load i32* %8, align 4 ; [#uses=1]
- %10 = getelementptr inbounds %struct.btClockData* %3, i32 0, i32 0, i32 1 ; [#uses=1]
- %11 = load i32* %10, align 4 ; [#uses=1]
- %12 = load i32* @_ZN15CProfileManager9ResetTimeE, align 4 ; [#uses=1]
- %13 = add i32 %7, %9 ; [#uses=1]
- %14 = sub i32 %13, %11 ; [#uses=1]
- %15 = sub i32 %14, %12 ; [#uses=1]
- %16 = uitofp i32 %15 to float ; [#uses=1]
- %17 = fdiv float %16, 1.000000e+03 ; [#uses=1]
- ret float %17
-}
-
-; [#uses=2]
-define void @_ZN15CProfileManager13dumpRecursiveEP16CProfileIteratori(%struct.CProfileIterator* %profileIterator, i32 %spacing) nounwind align 2 {
-entry:
- %currentTime.i.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.CProfileIterator* %profileIterator, i32 0, i32 0 ; [#uses=6]
- %1 = load %struct.CProfileNode** %0, align 4 ; [#uses=3]
- %2 = getelementptr inbounds %struct.CProfileNode* %1, i32 0, i32 6 ; [#uses=1]
- %3 = load %struct.CProfileNode** %2, align 4 ; [#uses=2]
- %4 = getelementptr inbounds %struct.CProfileIterator* %profileIterator, i32 0, i32 1 ; [#uses=16]
- store %struct.CProfileNode* %3, %struct.CProfileNode** %4, align 4
- %5 = icmp eq %struct.CProfileNode* %3, null ; [#uses=1]
- br i1 %5, label %return, label %bb
-
-bb: ; preds = %entry
- %6 = getelementptr inbounds %struct.CProfileNode* %1, i32 0, i32 5 ; [#uses=1]
- %7 = load %struct.CProfileNode** %6, align 4 ; [#uses=1]
- %8 = icmp eq %struct.CProfileNode* %7, null ; [#uses=1]
- br i1 %8, label %bb2, label %bb3
-
-bb2: ; preds = %bb
- %9 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %10 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 0 ; [#uses=1]
- %11 = load i32* %10, align 8 ; [#uses=1]
- %12 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %13 = getelementptr inbounds %struct.btClockData* %12, i32 0, i32 0, i32 0 ; [#uses=1]
- %14 = load i32* %13, align 4 ; [#uses=1]
- %15 = sub nsw i32 %11, %14 ; [#uses=1]
- %16 = mul nsw i32 %15, 1000000 ; [#uses=1]
- %17 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 1 ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.btClockData* %12, i32 0, i32 0, i32 1 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=1]
- %21 = load i32* @_ZN15CProfileManager9ResetTimeE, align 4 ; [#uses=1]
- %22 = sub i32 %18, %20 ; [#uses=1]
- %23 = add i32 %22, %16 ; [#uses=1]
- %24 = sub i32 %23, %21 ; [#uses=1]
- %25 = uitofp i32 %24 to float ; [#uses=1]
- %26 = fdiv float %25, 1.000000e+03 ; [#uses=1]
- br label %bb4
-
-bb3: ; preds = %bb
- %27 = getelementptr inbounds %struct.CProfileNode* %1, i32 0, i32 2 ; [#uses=1]
- %28 = load float* %27, align 4 ; [#uses=1]
- br label %bb4
-
-bb4: ; preds = %bb3, %bb2
- %iftmp.33.0 = phi float [ %26, %bb2 ], [ %28, %bb3 ] ; [#uses=8]
- %29 = load i32* @_ZN15CProfileManager12FrameCounterE, align 4 ; [#uses=1]
- %30 = icmp sgt i32 %spacing, 0 ; [#uses=5]
- br i1 %30, label %bb5, label %bb7.thread
-
-bb7.thread: ; preds = %bb4
- %31 = call i32 @puts(i8* getelementptr inbounds ([35 x i8]* @.str27, i32 0, i32 0)) ; [#uses=0]
- br label %bb10
-
-bb5: ; preds = %bb5, %bb4
- %i.067 = phi i32 [ %33, %bb5 ], [ 0, %bb4 ] ; [#uses=1]
- %32 = call i32 @putchar(i32 46) ; [#uses=0]
- %33 = add nsw i32 %i.067, 1 ; [#uses=2]
- %exitcond85 = icmp eq i32 %33, %spacing ; [#uses=1]
- br i1 %exitcond85, label %bb7, label %bb5
-
-bb7: ; preds = %bb5
- %34 = call i32 @puts(i8* getelementptr inbounds ([35 x i8]* @.str27, i32 0, i32 0)) ; [#uses=0]
- br i1 %30, label %bb8, label %bb10
-
-bb8: ; preds = %bb8, %bb7
- %i.165 = phi i32 [ %36, %bb8 ], [ 0, %bb7 ] ; [#uses=1]
- %35 = call i32 @putchar(i32 46) ; [#uses=0]
- %36 = add nsw i32 %i.165, 1 ; [#uses=2]
- %exitcond84 = icmp eq i32 %36, %spacing ; [#uses=1]
- br i1 %exitcond84, label %bb10, label %bb8
-
-bb10: ; preds = %bb8, %bb7, %bb7.thread
- %37 = fpext float %iftmp.33.0 to double ; [#uses=1]
- %38 = load %struct.CProfileNode** %0, align 4 ; [#uses=1]
- %39 = getelementptr inbounds %struct.CProfileNode* %38, i32 0, i32 0 ; [#uses=1]
- %40 = load i8** %39, align 4 ; [#uses=1]
- %41 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([49 x i8]* @.str128, i32 0, i32 0), i8* %40, double %37) ; [#uses=0]
- %42 = load %struct.CProfileNode** %4, align 4 ; [#uses=5]
- %43 = icmp eq %struct.CProfileNode* %42, null ; [#uses=1]
- br i1 %43, label %bb23, label %bb.nph48
-
-bb.nph48: ; preds = %bb10
- %44 = fcmp ogt float %iftmp.33.0, 0x3E80000000000000 ; [#uses=1]
- %45 = sitofp i32 %29 to double ; [#uses=4]
- br i1 %44, label %bb.nph48.split.us, label %bb.nph48.bb.nph48.split_crit_edge
-
-bb.nph48.bb.nph48.split_crit_edge: ; preds = %bb.nph48
- br i1 %30, label %bb.nph44.us63, label %bb18
-
-bb.nph48.split.us: ; preds = %bb.nph48
- br i1 %30, label %bb.nph44.us.us, label %bb18.us
-
-bb18.us.us: ; preds = %bb16.us.us
- %.pre86 = load %struct.CProfileNode** %4, align 4 ; [#uses=2]
- %46 = getelementptr inbounds %struct.CProfileNode* %.pre86, i32 0, i32 1 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = fpext float %60 to double ; [#uses=1]
- %49 = fdiv double %48, %45 ; [#uses=1]
- %50 = getelementptr inbounds %struct.CProfileNode* %.pre86, i32 0, i32 0 ; [#uses=1]
- %51 = load i8** %50, align 4 ; [#uses=1]
- %52 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([50 x i8]* @.str229, i32 0, i32 0), i32 %i.246.us.us, i8* %51, double %phitmp35.us.us, double %49, i32 %47) ; [#uses=0]
- %53 = load %struct.CProfileNode** %4, align 4 ; [#uses=1]
- %54 = getelementptr inbounds %struct.CProfileNode* %53, i32 0, i32 7 ; [#uses=1]
- %55 = load %struct.CProfileNode** %54, align 4 ; [#uses=3]
- store %struct.CProfileNode* %55, %struct.CProfileNode** %4, align 4
- %56 = icmp eq %struct.CProfileNode* %55, null ; [#uses=1]
- br i1 %56, label %bb19.bb23_crit_edge, label %bb.nph44.us.us
-
-bb.nph44.us.us: ; preds = %bb18.us.us, %bb.nph48.split.us
- %57 = phi %struct.CProfileNode* [ %55, %bb18.us.us ], [ %42, %bb.nph48.split.us ] ; [#uses=1]
- %i.246.us.us = phi i32 [ %58, %bb18.us.us ], [ 0, %bb.nph48.split.us ] ; [#uses=3]
- %accumulated_time.045.us.us = phi float [ %61, %bb18.us.us ], [ 0.000000e+00, %bb.nph48.split.us ] ; [#uses=1]
- %58 = add nsw i32 %i.246.us.us, 1 ; [#uses=1]
- %59 = getelementptr inbounds %struct.CProfileNode* %57, i32 0, i32 2 ; [#uses=1]
- %60 = load float* %59, align 4 ; [#uses=3]
- %61 = fadd float %accumulated_time.045.us.us, %60 ; [#uses=2]
- %62 = fdiv float %60, %iftmp.33.0 ; [#uses=1]
- %63 = fmul float %62, 1.000000e+02 ; [#uses=1]
- %phitmp35.us.us = fpext float %63 to double ; [#uses=1]
- br label %bb16.us.us
-
-bb16.us.us: ; preds = %bb16.us.us, %bb.nph44.us.us
- %i15.043.us.us = phi i32 [ 0, %bb.nph44.us.us ], [ %65, %bb16.us.us ] ; [#uses=1]
- %64 = call i32 @putchar(i32 46) ; [#uses=0]
- %65 = add nsw i32 %i15.043.us.us, 1 ; [#uses=2]
- %exitcond = icmp eq i32 %65, %spacing ; [#uses=1]
- br i1 %exitcond, label %bb18.us.us, label %bb16.us.us
-
-bb18.us: ; preds = %bb18.us, %bb.nph48.split.us
- %66 = phi %struct.CProfileNode* [ %82, %bb18.us ], [ %42, %bb.nph48.split.us ] ; [#uses=3]
- %i.246.us = phi i32 [ %67, %bb18.us ], [ 0, %bb.nph48.split.us ] ; [#uses=3]
- %accumulated_time.045.us = phi float [ %70, %bb18.us ], [ 0.000000e+00, %bb.nph48.split.us ] ; [#uses=1]
- %67 = add nsw i32 %i.246.us, 1 ; [#uses=1]
- %68 = getelementptr inbounds %struct.CProfileNode* %66, i32 0, i32 2 ; [#uses=1]
- %69 = load float* %68, align 4 ; [#uses=3]
- %70 = fadd float %accumulated_time.045.us, %69 ; [#uses=2]
- %71 = fdiv float %69, %iftmp.33.0 ; [#uses=1]
- %72 = fmul float %71, 1.000000e+02 ; [#uses=1]
- %phitmp35.us = fpext float %72 to double ; [#uses=1]
- %73 = getelementptr inbounds %struct.CProfileNode* %66, i32 0, i32 1 ; [#uses=1]
- %74 = load i32* %73, align 4 ; [#uses=1]
- %75 = fpext float %69 to double ; [#uses=1]
- %76 = fdiv double %75, %45 ; [#uses=1]
- %77 = getelementptr inbounds %struct.CProfileNode* %66, i32 0, i32 0 ; [#uses=1]
- %78 = load i8** %77, align 4 ; [#uses=1]
- %79 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([50 x i8]* @.str229, i32 0, i32 0), i32 %i.246.us, i8* %78, double %phitmp35.us, double %76, i32 %74) ; [#uses=0]
- %80 = load %struct.CProfileNode** %4, align 4 ; [#uses=1]
- %81 = getelementptr inbounds %struct.CProfileNode* %80, i32 0, i32 7 ; [#uses=1]
- %82 = load %struct.CProfileNode** %81, align 4 ; [#uses=3]
- store %struct.CProfileNode* %82, %struct.CProfileNode** %4, align 4
- %83 = icmp eq %struct.CProfileNode* %82, null ; [#uses=1]
- br i1 %83, label %bb19.bb23_crit_edge, label %bb18.us
-
-bb18.us54: ; preds = %bb16.us61
- %.pre87 = load %struct.CProfileNode** %4, align 4 ; [#uses=2]
- %84 = getelementptr inbounds %struct.CProfileNode* %.pre87, i32 0, i32 1 ; [#uses=1]
- %85 = load i32* %84, align 4 ; [#uses=1]
- %86 = fpext float %100 to double ; [#uses=1]
- %87 = fdiv double %86, %45 ; [#uses=1]
- %88 = getelementptr inbounds %struct.CProfileNode* %.pre87, i32 0, i32 0 ; [#uses=1]
- %89 = load i8** %88, align 4 ; [#uses=1]
- %90 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([50 x i8]* @.str229, i32 0, i32 0), i32 %i.246.us52, i8* %89, double 0.000000e+00, double %87, i32 %85) ; [#uses=0]
- %91 = load %struct.CProfileNode** %4, align 4 ; [#uses=1]
- %92 = getelementptr inbounds %struct.CProfileNode* %91, i32 0, i32 7 ; [#uses=1]
- %93 = load %struct.CProfileNode** %92, align 4 ; [#uses=3]
- store %struct.CProfileNode* %93, %struct.CProfileNode** %4, align 4
- %94 = icmp eq %struct.CProfileNode* %93, null ; [#uses=1]
- br i1 %94, label %bb19.bb23_crit_edge, label %bb.nph44.us63
-
-bb16.us61: ; preds = %bb.nph44.us63, %bb16.us61
- %i15.043.us62 = phi i32 [ 0, %bb.nph44.us63 ], [ %96, %bb16.us61 ] ; [#uses=1]
- %95 = call i32 @putchar(i32 46) ; [#uses=0]
- %96 = add nsw i32 %i15.043.us62, 1 ; [#uses=2]
- %exitcond70 = icmp eq i32 %96, %spacing ; [#uses=1]
- br i1 %exitcond70, label %bb18.us54, label %bb16.us61
-
-bb.nph44.us63: ; preds = %bb18.us54, %bb.nph48.bb.nph48.split_crit_edge
- %97 = phi %struct.CProfileNode* [ %93, %bb18.us54 ], [ %42, %bb.nph48.bb.nph48.split_crit_edge ] ; [#uses=1]
- %i.246.us52 = phi i32 [ %98, %bb18.us54 ], [ 0, %bb.nph48.bb.nph48.split_crit_edge ] ; [#uses=3]
- %accumulated_time.045.us53 = phi float [ %101, %bb18.us54 ], [ 0.000000e+00, %bb.nph48.bb.nph48.split_crit_edge ] ; [#uses=1]
- %98 = add nsw i32 %i.246.us52, 1 ; [#uses=1]
- %99 = getelementptr inbounds %struct.CProfileNode* %97, i32 0, i32 2 ; [#uses=1]
- %100 = load float* %99, align 4 ; [#uses=2]
- %101 = fadd float %accumulated_time.045.us53, %100 ; [#uses=2]
- br label %bb16.us61
-
-bb18: ; preds = %bb18, %bb.nph48.bb.nph48.split_crit_edge
- %102 = phi %struct.CProfileNode* [ %116, %bb18 ], [ %42, %bb.nph48.bb.nph48.split_crit_edge ] ; [#uses=3]
- %i.246 = phi i32 [ %103, %bb18 ], [ 0, %bb.nph48.bb.nph48.split_crit_edge ] ; [#uses=3]
- %accumulated_time.045 = phi float [ %106, %bb18 ], [ 0.000000e+00, %bb.nph48.bb.nph48.split_crit_edge ] ; [#uses=1]
- %103 = add nsw i32 %i.246, 1 ; [#uses=1]
- %104 = getelementptr inbounds %struct.CProfileNode* %102, i32 0, i32 2 ; [#uses=1]
- %105 = load float* %104, align 4 ; [#uses=2]
- %106 = fadd float %accumulated_time.045, %105 ; [#uses=2]
- %107 = getelementptr inbounds %struct.CProfileNode* %102, i32 0, i32 1 ; [#uses=1]
- %108 = load i32* %107, align 4 ; [#uses=1]
- %109 = fpext float %105 to double ; [#uses=1]
- %110 = fdiv double %109, %45 ; [#uses=1]
- %111 = getelementptr inbounds %struct.CProfileNode* %102, i32 0, i32 0 ; [#uses=1]
- %112 = load i8** %111, align 4 ; [#uses=1]
- %113 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([50 x i8]* @.str229, i32 0, i32 0), i32 %i.246, i8* %112, double 0.000000e+00, double %110, i32 %108) ; [#uses=0]
- %114 = load %struct.CProfileNode** %4, align 4 ; [#uses=1]
- %115 = getelementptr inbounds %struct.CProfileNode* %114, i32 0, i32 7 ; [#uses=1]
- %116 = load %struct.CProfileNode** %115, align 4 ; [#uses=3]
- store %struct.CProfileNode* %116, %struct.CProfileNode** %4, align 4
- %117 = icmp eq %struct.CProfileNode* %116, null ; [#uses=1]
- br i1 %117, label %bb19.bb23_crit_edge, label %bb18
-
-bb19.bb23_crit_edge: ; preds = %bb18, %bb18.us54, %bb18.us, %bb18.us.us
- %split.in = phi i32 [ %i.246.us.us, %bb18.us.us ], [ %i.246.us, %bb18.us ], [ %i.246.us52, %bb18.us54 ], [ %i.246, %bb18 ] ; [#uses=1]
- %split49 = phi float [ %61, %bb18.us.us ], [ %70, %bb18.us ], [ %101, %bb18.us54 ], [ %106, %bb18 ] ; [#uses=1]
- %split = add i32 %split.in, 1 ; [#uses=1]
- br label %bb23
-
-bb23: ; preds = %bb19.bb23_crit_edge, %bb10
- %numChildren.0.lcssa = phi i32 [ %split, %bb19.bb23_crit_edge ], [ 0, %bb10 ] ; [#uses=2]
- %accumulated_time.0.lcssa = phi float [ %split49, %bb19.bb23_crit_edge ], [ 0.000000e+00, %bb10 ] ; [#uses=2]
- %118 = fcmp olt float %iftmp.33.0, %accumulated_time.0.lcssa ; [#uses=1]
- br i1 %118, label %bb24, label %bb27.preheader
-
-bb24: ; preds = %bb23
- %119 = call i32 @puts(i8* getelementptr inbounds ([13 x i8]* @.str330, i32 0, i32 0)) ; [#uses=0]
- br label %bb27.preheader
-
-bb27.preheader: ; preds = %bb24, %bb23
- br i1 %30, label %bb26, label %bb28
-
-bb26: ; preds = %bb26, %bb27.preheader
- %i.341 = phi i32 [ %121, %bb26 ], [ 0, %bb27.preheader ] ; [#uses=1]
- %120 = call i32 @putchar(i32 46) ; [#uses=0]
- %121 = add nsw i32 %i.341, 1 ; [#uses=2]
- %exitcond80 = icmp eq i32 %121, %spacing ; [#uses=1]
- br i1 %exitcond80, label %bb28, label %bb26
-
-bb28: ; preds = %bb26, %bb27.preheader
- %122 = fsub float %iftmp.33.0, %accumulated_time.0.lcssa ; [#uses=2]
- %123 = fpext float %122 to double ; [#uses=1]
- %124 = fcmp ogt float %iftmp.33.0, 0x3E80000000000000 ; [#uses=1]
- br i1 %124, label %bb29, label %bb31
-
-bb29: ; preds = %bb28
- %125 = fdiv float %122, %iftmp.33.0 ; [#uses=1]
- %126 = fmul float %125, 1.000000e+02 ; [#uses=1]
- %phitmp = fpext float %126 to double ; [#uses=1]
- br label %bb31
-
-bb31: ; preds = %bb29, %bb28
- %iftmp.36.0 = phi double [ %phitmp, %bb29 ], [ 0.000000e+00, %bb28 ] ; [#uses=1]
- %127 = call i32 (i8*, ...)* @printf(i8* noalias getelementptr inbounds ([25 x i8]* @.str431, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8]* @.str532, i32 0, i32 0), double %iftmp.36.0, double %123) ; [#uses=0]
- %128 = icmp sgt i32 %numChildren.0.lcssa, 0 ; [#uses=1]
- br i1 %128, label %bb.nph, label %return
-
-bb.nph: ; preds = %bb31
- %129 = add nsw i32 %spacing, 3 ; [#uses=1]
- %.pre = load %struct.CProfileNode** %0, align 4 ; [#uses=1]
- br label %bb32
-
-bb32: ; preds = %_ZN16CProfileIterator12Enter_ParentEv.exit, %bb.nph
- %130 = phi %struct.CProfileNode* [ %.pre, %bb.nph ], [ %152, %_ZN16CProfileIterator12Enter_ParentEv.exit ] ; [#uses=1]
- %131 = phi i32 [ 0, %bb.nph ], [ %155, %_ZN16CProfileIterator12Enter_ParentEv.exit ] ; [#uses=3]
- %tmp8.i = add i32 %131, -1 ; [#uses=1]
- %132 = getelementptr inbounds %struct.CProfileNode* %130, i32 0, i32 6 ; [#uses=1]
- %133 = load %struct.CProfileNode** %132, align 4 ; [#uses=4]
- store %struct.CProfileNode* %133, %struct.CProfileNode** %4, align 4
- %134 = icmp ne %struct.CProfileNode* %133, null ; [#uses=1]
- %135 = icmp ne i32 %131, 0 ; [#uses=1]
- %136 = and i1 %134, %135 ; [#uses=1]
- br i1 %136, label %bb.i36, label %bb4.i
-
-bb.i36: ; preds = %bb.i36, %bb32
- %137 = phi %struct.CProfileNode* [ %140, %bb.i36 ], [ %133, %bb32 ] ; [#uses=1]
- %138 = phi i32 [ %indvar.next.i, %bb.i36 ], [ 0, %bb32 ] ; [#uses=2]
- %139 = getelementptr inbounds %struct.CProfileNode* %137, i32 0, i32 7 ; [#uses=1]
- %140 = load %struct.CProfileNode** %139, align 4 ; [#uses=4]
- store %struct.CProfileNode* %140, %struct.CProfileNode** %4, align 4
- %141 = icmp ne %struct.CProfileNode* %140, null ; [#uses=1]
- %142 = icmp ne i32 %tmp8.i, %138 ; [#uses=1]
- %143 = and i1 %141, %142 ; [#uses=1]
- %indvar.next.i = add i32 %138, 1 ; [#uses=1]
- br i1 %143, label %bb.i36, label %bb4.i
-
-bb4.i: ; preds = %bb.i36, %bb32
- %144 = phi %struct.CProfileNode* [ %133, %bb32 ], [ %140, %bb.i36 ] ; [#uses=3]
- %145 = icmp eq %struct.CProfileNode* %144, null ; [#uses=1]
- br i1 %145, label %_ZN16CProfileIterator11Enter_ChildEi.exit, label %bb5.i
-
-bb5.i: ; preds = %bb4.i
- store %struct.CProfileNode* %144, %struct.CProfileNode** %0, align 4
- %146 = getelementptr inbounds %struct.CProfileNode* %144, i32 0, i32 6 ; [#uses=1]
- %147 = load %struct.CProfileNode** %146, align 4 ; [#uses=1]
- store %struct.CProfileNode* %147, %struct.CProfileNode** %4, align 4
- br label %_ZN16CProfileIterator11Enter_ChildEi.exit
-
-_ZN16CProfileIterator11Enter_ChildEi.exit: ; preds = %bb5.i, %bb4.i
- call void @_ZN15CProfileManager13dumpRecursiveEP16CProfileIteratori(%struct.CProfileIterator* %profileIterator, i32 %129)
- %148 = load %struct.CProfileNode** %0, align 4 ; [#uses=2]
- %149 = getelementptr inbounds %struct.CProfileNode* %148, i32 0, i32 5 ; [#uses=1]
- %150 = load %struct.CProfileNode** %149, align 4 ; [#uses=3]
- %151 = icmp eq %struct.CProfileNode* %150, null ; [#uses=1]
- br i1 %151, label %_ZN16CProfileIterator12Enter_ParentEv.exit, label %bb.i
-
-bb.i: ; preds = %_ZN16CProfileIterator11Enter_ChildEi.exit
- store %struct.CProfileNode* %150, %struct.CProfileNode** %0, align 4
- br label %_ZN16CProfileIterator12Enter_ParentEv.exit
-
-_ZN16CProfileIterator12Enter_ParentEv.exit: ; preds = %bb.i, %_ZN16CProfileIterator11Enter_ChildEi.exit
- %152 = phi %struct.CProfileNode* [ %148, %_ZN16CProfileIterator11Enter_ChildEi.exit ], [ %150, %bb.i ] ; [#uses=2]
- %153 = getelementptr inbounds %struct.CProfileNode* %152, i32 0, i32 6 ; [#uses=1]
- %154 = load %struct.CProfileNode** %153, align 4 ; [#uses=1]
- store %struct.CProfileNode* %154, %struct.CProfileNode** %4, align 4
- %155 = add nsw i32 %131, 1 ; [#uses=2]
- %exitcond78 = icmp eq i32 %155, %numChildren.0.lcssa ; [#uses=1]
- br i1 %exitcond78, label %return, label %bb32
-
-return: ; preds = %_ZN16CProfileIterator12Enter_ParentEv.exit, %bb31, %entry
- ret void
-}
-
-; [#uses=5]
-declare i32 @putchar(i32) nounwind
-
-; [#uses=3]
-declare i32 @puts(i8* nocapture) nounwind
-
-; [#uses=0]
-define void @_ZN15CProfileManager7dumpAllEv() align 2 {
-entry:
- %0 = tail call i8* @_Znwj(i32 8) ; [#uses=4]
- %1 = bitcast i8* %0 to %struct.CProfileIterator* ; [#uses=1]
- %2 = bitcast i8* %0 to %struct.CProfileNode** ; [#uses=1]
- store %struct.CProfileNode* @_ZN15CProfileManager4RootE, %struct.CProfileNode** %2, align 4
- %3 = load %struct.CProfileNode** getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 6), align 8 ; [#uses=1]
- %4 = getelementptr inbounds i8* %0, i32 4 ; [#uses=1]
- %5 = bitcast i8* %4 to %struct.CProfileNode** ; [#uses=1]
- store %struct.CProfileNode* %3, %struct.CProfileNode** %5, align 4
- tail call void @_ZN15CProfileManager13dumpRecursiveEP16CProfileIteratori(%struct.CProfileIterator* %1, i32 0)
- tail call void @_ZdlPv(i8* %0) nounwind
- ret void
-}
-
-; [#uses=0]
-define zeroext i8 @_ZN12CProfileNode6ReturnEv(%struct.CProfileNode* nocapture %this) nounwind align 2 {
-entry:
- %currentTime.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 4 ; [#uses=3]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add nsw i32 %1, -1 ; [#uses=3]
- store i32 %2, i32* %0, align 4
- %3 = icmp eq i32 %2, 0 ; [#uses=1]
- br i1 %3, label %bb, label %bb5
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 1 ; [#uses=1]
- %5 = load i32* %4, align 4 ; [#uses=1]
- %6 = icmp eq i32 %5, 0 ; [#uses=1]
- br i1 %6, label %bb5, label %bb4
-
-bb4: ; preds = %bb
- %7 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %8 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 0 ; [#uses=1]
- %9 = load i32* %8, align 8 ; [#uses=1]
- %10 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %11 = getelementptr inbounds %struct.btClockData* %10, i32 0, i32 0, i32 0 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = sub nsw i32 %9, %12 ; [#uses=1]
- %14 = mul nsw i32 %13, 1000000 ; [#uses=1]
- %15 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 1 ; [#uses=1]
- %16 = load i32* %15, align 4 ; [#uses=1]
- %17 = getelementptr inbounds %struct.btClockData* %10, i32 0, i32 0, i32 1 ; [#uses=1]
- %18 = load i32* %17, align 4 ; [#uses=1]
- %19 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 3 ; [#uses=1]
- %20 = load i32* %19, align 4 ; [#uses=1]
- %21 = add i32 %14, %16 ; [#uses=1]
- %22 = sub i32 %21, %18 ; [#uses=1]
- %23 = sub i32 %22, %20 ; [#uses=1]
- %24 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 2 ; [#uses=2]
- %25 = load float* %24, align 4 ; [#uses=1]
- %26 = uitofp i32 %23 to float ; [#uses=1]
- %27 = fdiv float %26, 1.000000e+03 ; [#uses=1]
- %28 = fadd float %25, %27 ; [#uses=1]
- store float %28, float* %24, align 4
- %.pre = load i32* %0, align 4 ; [#uses=1]
- br label %bb5
-
-bb5: ; preds = %bb4, %bb, %entry
- %29 = phi i32 [ 0, %bb ], [ %2, %entry ], [ %.pre, %bb4 ] ; [#uses=1]
- %30 = icmp eq i32 %29, 0 ; [#uses=1]
- %retval67 = zext i1 %30 to i8 ; [#uses=1]
- ret i8 %retval67
-}
-
-; [#uses=44]
-define void @_ZN15CProfileManager12Stop_ProfileEv() nounwind align 2 {
-entry:
- %currentTime.i.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = load %struct.CProfileNode** @_ZN15CProfileManager11CurrentNodeE, align 4 ; [#uses=4]
- %1 = getelementptr inbounds %struct.CProfileNode* %0, i32 0, i32 4 ; [#uses=3]
- %2 = load i32* %1, align 4 ; [#uses=1]
- %3 = add nsw i32 %2, -1 ; [#uses=2]
- store i32 %3, i32* %1, align 4
- %4 = icmp eq i32 %3, 0 ; [#uses=1]
- br i1 %4, label %bb.i, label %return
-
-bb.i: ; preds = %entry
- %5 = getelementptr inbounds %struct.CProfileNode* %0, i32 0, i32 1 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = icmp eq i32 %6, 0 ; [#uses=1]
- br i1 %7, label %bb, label %_ZN12CProfileNode6ReturnEv.exit
-
-_ZN12CProfileNode6ReturnEv.exit: ; preds = %bb.i
- %8 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 0 ; [#uses=1]
- %10 = load i32* %9, align 8 ; [#uses=1]
- %11 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btClockData* %11, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = sub nsw i32 %10, %13 ; [#uses=1]
- %15 = mul nsw i32 %14, 1000000 ; [#uses=1]
- %16 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 1 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btClockData* %11, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = getelementptr inbounds %struct.CProfileNode* %0, i32 0, i32 3 ; [#uses=1]
- %21 = load i32* %20, align 4 ; [#uses=1]
- %22 = sub i32 %17, %19 ; [#uses=1]
- %23 = add i32 %22, %15 ; [#uses=1]
- %24 = sub i32 %23, %21 ; [#uses=1]
- %25 = getelementptr inbounds %struct.CProfileNode* %0, i32 0, i32 2 ; [#uses=2]
- %26 = load float* %25, align 4 ; [#uses=1]
- %27 = uitofp i32 %24 to float ; [#uses=1]
- %28 = fdiv float %27, 1.000000e+03 ; [#uses=1]
- %29 = fadd float %26, %28 ; [#uses=1]
- store float %29, float* %25, align 4
- %.pre.i = load i32* %1, align 4 ; [#uses=1]
- %30 = icmp eq i32 %.pre.i, 0 ; [#uses=1]
- br i1 %30, label %bb, label %return
-
-bb: ; preds = %_ZN12CProfileNode6ReturnEv.exit, %bb.i
- %31 = load %struct.CProfileNode** @_ZN15CProfileManager11CurrentNodeE, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.CProfileNode* %31, i32 0, i32 5 ; [#uses=1]
- %33 = load %struct.CProfileNode** %32, align 4 ; [#uses=1]
- store %struct.CProfileNode* %33, %struct.CProfileNode** @_ZN15CProfileManager11CurrentNodeE, align 4
- ret void
-
-return: ; preds = %_ZN12CProfileNode6ReturnEv.exit, %entry
- ret void
-}
-
-; [#uses=0]
-define void @_ZN12CProfileNode4CallEv(%struct.CProfileNode* nocapture %this) nounwind align 2 {
-entry:
- %currentTime.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 1 ; [#uses=2]
- %1 = load i32* %0, align 4 ; [#uses=1]
- %2 = add nsw i32 %1, 1 ; [#uses=1]
- store i32 %2, i32* %0, align 4
- %3 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 4 ; [#uses=2]
- %4 = load i32* %3, align 4 ; [#uses=1]
- %5 = add nsw i32 %4, 1 ; [#uses=2]
- store i32 %5, i32* %3, align 4
- %6 = icmp eq i32 %5, 1 ; [#uses=1]
- br i1 %6, label %bb, label %return
-
-bb: ; preds = %entry
- %7 = getelementptr inbounds %struct.CProfileNode* %this, i32 0, i32 3 ; [#uses=1]
- %8 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 0 ; [#uses=1]
- %10 = load i32* %9, align 8 ; [#uses=1]
- %11 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btClockData* %11, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = sub nsw i32 %10, %13 ; [#uses=1]
- %15 = mul nsw i32 %14, 1000000 ; [#uses=1]
- %16 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 1 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btClockData* %11, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = add i32 %15, %17 ; [#uses=1]
- %21 = sub i32 %20, %19 ; [#uses=1]
- store i32 %21, i32* %7, align 4
- ret void
-
-return: ; preds = %entry
- ret void
-}
-
-; [#uses=22]
-define void @_ZN15CProfileManager13Start_ProfileEPKc(i8* %name) align 2 {
-entry:
- %currentTime.i.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = load %struct.CProfileNode** @_ZN15CProfileManager11CurrentNodeE, align 4 ; [#uses=4]
- %1 = getelementptr inbounds %struct.CProfileNode* %0, i32 0, i32 0 ; [#uses=1]
- %2 = load i8** %1, align 4 ; [#uses=1]
- %3 = icmp eq i8* %2, %name ; [#uses=1]
- br i1 %3, label %bb1, label %bb
-
-bb: ; preds = %entry
- %4 = getelementptr inbounds %struct.CProfileNode* %0, i32 0, i32 6 ; [#uses=3]
- br label %bb3.i
-
-bb.i2: ; preds = %bb3.i
- %5 = getelementptr inbounds %struct.CProfileNode* %child.0.i, i32 0, i32 0 ; [#uses=1]
- %6 = load i8** %5, align 4 ; [#uses=1]
- %7 = icmp eq i8* %6, %name ; [#uses=1]
- br i1 %7, label %_ZN12CProfileNode12Get_Sub_NodeEPKc.exit, label %bb2.i
-
-bb2.i: ; preds = %bb.i2
- %8 = getelementptr inbounds %struct.CProfileNode* %child.0.i, i32 0, i32 7 ; [#uses=1]
- br label %bb3.i
-
-bb3.i: ; preds = %bb2.i, %bb
- %child.0.in.i = phi %struct.CProfileNode** [ %4, %bb ], [ %8, %bb2.i ] ; [#uses=1]
- %child.0.i = load %struct.CProfileNode** %child.0.in.i, align 4 ; [#uses=4]
- %9 = icmp eq %struct.CProfileNode* %child.0.i, null ; [#uses=1]
- br i1 %9, label %bb6.i, label %bb.i2
-
-bb6.i: ; preds = %bb3.i
- %10 = call i8* @_Znwj(i32 32) ; [#uses=9]
- %11 = bitcast i8* %10 to %struct.CProfileNode* ; [#uses=3]
- %12 = bitcast i8* %10 to i8** ; [#uses=1]
- store i8* %name, i8** %12, align 4
- %13 = getelementptr inbounds i8* %10, i32 4 ; [#uses=1]
- %14 = bitcast i8* %13 to i32* ; [#uses=1]
- store i32 0, i32* %14, align 4
- %15 = getelementptr inbounds i8* %10, i32 8 ; [#uses=1]
- %16 = bitcast i8* %15 to float* ; [#uses=1]
- store float 0.000000e+00, float* %16, align 4
- %17 = getelementptr inbounds i8* %10, i32 12 ; [#uses=1]
- %18 = bitcast i8* %17 to i32* ; [#uses=1]
- store i32 0, i32* %18, align 4
- %19 = getelementptr inbounds i8* %10, i32 16 ; [#uses=1]
- %20 = bitcast i8* %19 to i32* ; [#uses=1]
- store i32 0, i32* %20, align 4
- %21 = getelementptr inbounds i8* %10, i32 20 ; [#uses=1]
- %22 = bitcast i8* %21 to %struct.CProfileNode** ; [#uses=1]
- store %struct.CProfileNode* %0, %struct.CProfileNode** %22, align 4
- %23 = getelementptr inbounds i8* %10, i32 24 ; [#uses=1]
- %24 = bitcast i8* %23 to %struct.CProfileNode** ; [#uses=1]
- store %struct.CProfileNode* null, %struct.CProfileNode** %24, align 4
- %25 = getelementptr inbounds i8* %10, i32 28 ; [#uses=1]
- %26 = bitcast i8* %25 to %struct.CProfileNode** ; [#uses=2]
- store %struct.CProfileNode* null, %struct.CProfileNode** %26, align 4
- call void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* %11) nounwind
- %27 = load %struct.CProfileNode** %4, align 4 ; [#uses=1]
- store %struct.CProfileNode* %27, %struct.CProfileNode** %26, align 4
- store %struct.CProfileNode* %11, %struct.CProfileNode** %4, align 4
- br label %_ZN12CProfileNode12Get_Sub_NodeEPKc.exit
-
-_ZN12CProfileNode12Get_Sub_NodeEPKc.exit: ; preds = %bb6.i, %bb.i2
- %28 = phi %struct.CProfileNode* [ %11, %bb6.i ], [ %child.0.i, %bb.i2 ] ; [#uses=2]
- store %struct.CProfileNode* %28, %struct.CProfileNode** @_ZN15CProfileManager11CurrentNodeE, align 4
- br label %bb1
-
-bb1: ; preds = %_ZN12CProfileNode12Get_Sub_NodeEPKc.exit, %entry
- %29 = phi %struct.CProfileNode* [ %0, %entry ], [ %28, %_ZN12CProfileNode12Get_Sub_NodeEPKc.exit ] ; [#uses=3]
- %30 = getelementptr inbounds %struct.CProfileNode* %29, i32 0, i32 1 ; [#uses=2]
- %31 = load i32* %30, align 4 ; [#uses=1]
- %32 = add nsw i32 %31, 1 ; [#uses=1]
- store i32 %32, i32* %30, align 4
- %33 = getelementptr inbounds %struct.CProfileNode* %29, i32 0, i32 4 ; [#uses=2]
- %34 = load i32* %33, align 4 ; [#uses=1]
- %35 = add nsw i32 %34, 1 ; [#uses=2]
- store i32 %35, i32* %33, align 4
- %36 = icmp eq i32 %35, 1 ; [#uses=1]
- br i1 %36, label %bb.i, label %_ZN12CProfileNode4CallEv.exit
-
-bb.i: ; preds = %bb1
- %37 = getelementptr inbounds %struct.CProfileNode* %29, i32 0, i32 3 ; [#uses=1]
- %38 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %39 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 0 ; [#uses=1]
- %40 = load i32* %39, align 8 ; [#uses=1]
- %41 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %42 = getelementptr inbounds %struct.btClockData* %41, i32 0, i32 0, i32 0 ; [#uses=1]
- %43 = load i32* %42, align 4 ; [#uses=1]
- %44 = sub nsw i32 %40, %43 ; [#uses=1]
- %45 = mul nsw i32 %44, 1000000 ; [#uses=1]
- %46 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 1 ; [#uses=1]
- %47 = load i32* %46, align 4 ; [#uses=1]
- %48 = getelementptr inbounds %struct.btClockData* %41, i32 0, i32 0, i32 1 ; [#uses=1]
- %49 = load i32* %48, align 4 ; [#uses=1]
- %50 = sub i32 %47, %49 ; [#uses=1]
- %51 = add i32 %50, %45 ; [#uses=1]
- store i32 %51, i32* %37, align 4
- ret void
-
-_ZN12CProfileNode4CallEv.exit: ; preds = %bb1
- ret void
-}
-
-; [#uses=0]
-define i32 @_ZN7btClock19getTimeMillisecondsEv(%struct.btClock* nocapture %this) nounwind align 2 {
-entry:
- %currentTime = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %1 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime, i32 0, i32 0 ; [#uses=1]
- %2 = load i32* %1, align 8 ; [#uses=1]
- %3 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- %4 = load %struct.btClockData** %3, align 4 ; [#uses=2]
- %5 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 0 ; [#uses=1]
- %6 = load i32* %5, align 4 ; [#uses=1]
- %7 = sub nsw i32 %2, %6 ; [#uses=1]
- %8 = mul nsw i32 %7, 1000 ; [#uses=1]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime, i32 0, i32 1 ; [#uses=1]
- %10 = load i32* %9, align 4 ; [#uses=1]
- %11 = getelementptr inbounds %struct.btClockData* %4, i32 0, i32 0, i32 1 ; [#uses=1]
- %12 = load i32* %11, align 4 ; [#uses=1]
- %13 = sub nsw i32 %10, %12 ; [#uses=1]
- %14 = sdiv i32 %13, 1000 ; [#uses=1]
- %15 = add nsw i32 %14, %8 ; [#uses=1]
- ret i32 %15
-}
-
-; [#uses=0]
-define void @_ZN7btClock5resetEv(%struct.btClock* nocapture %this) nounwind align 2 {
-entry:
- %0 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- %1 = load %struct.btClockData** %0, align 4 ; [#uses=1]
- %2 = getelementptr inbounds %struct.btClockData* %1, i32 0, i32 0 ; [#uses=1]
- %3 = tail call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %2, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- ret void
-}
-
-; [#uses=2]
-define void @_ZN15CProfileManager5ResetEv() nounwind align 2 {
-entry:
- %currentTime.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %currentTime.i.i.i = alloca %struct.CONTACT_KEY_TOKEN, align 8 ; [#uses=3]
- %0 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=1]
- %1 = getelementptr inbounds %struct.btClockData* %0, i32 0, i32 0 ; [#uses=1]
- %2 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %1, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- call void @_ZN12CProfileNode5ResetEv(%struct.CProfileNode* @_ZN15CProfileManager4RootE)
- %3 = load i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 1), align 4 ; [#uses=1]
- %4 = add nsw i32 %3, 1 ; [#uses=1]
- store i32 %4, i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 1), align 4
- %5 = load i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 4), align 16 ; [#uses=1]
- %6 = add nsw i32 %5, 1 ; [#uses=2]
- store i32 %6, i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 4), align 16
- %7 = icmp eq i32 %6, 1 ; [#uses=1]
- br i1 %7, label %bb.i, label %_ZN12CProfileNode4CallEv.exit
-
-bb.i: ; preds = %entry
- %8 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %9 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 0 ; [#uses=1]
- %10 = load i32* %9, align 8 ; [#uses=1]
- %11 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %12 = getelementptr inbounds %struct.btClockData* %11, i32 0, i32 0, i32 0 ; [#uses=1]
- %13 = load i32* %12, align 4 ; [#uses=1]
- %14 = sub nsw i32 %10, %13 ; [#uses=1]
- %15 = mul nsw i32 %14, 1000000 ; [#uses=1]
- %16 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i.i, i32 0, i32 1 ; [#uses=1]
- %17 = load i32* %16, align 4 ; [#uses=1]
- %18 = getelementptr inbounds %struct.btClockData* %11, i32 0, i32 0, i32 1 ; [#uses=1]
- %19 = load i32* %18, align 4 ; [#uses=1]
- %20 = sub i32 %17, %19 ; [#uses=1]
- %21 = add i32 %20, %15 ; [#uses=1]
- store i32 %21, i32* getelementptr inbounds (%struct.CProfileNode* @_ZN15CProfileManager4RootE, i32 0, i32 3), align 4
- br label %_ZN12CProfileNode4CallEv.exit
-
-_ZN12CProfileNode4CallEv.exit: ; preds = %bb.i, %entry
- store i32 0, i32* @_ZN15CProfileManager12FrameCounterE, align 4
- %22 = call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %currentTime.i.i, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- %23 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 0 ; [#uses=1]
- %24 = load i32* %23, align 8 ; [#uses=1]
- %25 = load %struct.btClockData** getelementptr inbounds (%struct.btClock* @_ZL13gProfileClock, i32 0, i32 0), align 8 ; [#uses=2]
- %26 = getelementptr inbounds %struct.btClockData* %25, i32 0, i32 0, i32 0 ; [#uses=1]
- %27 = load i32* %26, align 4 ; [#uses=1]
- %28 = sub nsw i32 %24, %27 ; [#uses=1]
- %29 = mul nsw i32 %28, 1000000 ; [#uses=1]
- %30 = getelementptr inbounds %struct.CONTACT_KEY_TOKEN* %currentTime.i.i, i32 0, i32 1 ; [#uses=1]
- %31 = load i32* %30, align 4 ; [#uses=1]
- %32 = getelementptr inbounds %struct.btClockData* %25, i32 0, i32 0, i32 1 ; [#uses=1]
- %33 = load i32* %32, align 4 ; [#uses=1]
- %34 = add i32 %29, %31 ; [#uses=1]
- %35 = sub i32 %34, %33 ; [#uses=1]
- store i32 %35, i32* @_ZN15CProfileManager9ResetTimeE, align 4
- ret void
-}
-
-; [#uses=0]
-define void @_ZN7btClockC1Ev(%struct.btClock* nocapture %this) align 2 {
-entry:
- %0 = tail call i8* @_Znwj(i32 8) ; [#uses=2]
- %1 = bitcast i8* %0 to %struct.btClockData* ; [#uses=1]
- %2 = getelementptr inbounds %struct.btClock* %this, i32 0, i32 0 ; [#uses=1]
- store %struct.btClockData* %1, %struct.btClockData** %2, align 4
- %3 = bitcast i8* %0 to %struct.CONTACT_KEY_TOKEN* ; [#uses=1]
- %4 = tail call i32 @gettimeofday(%struct.CONTACT_KEY_TOKEN* noalias %3, %struct.CONTACT_KEY_TOKEN* noalias null) nounwind ; [#uses=0]
- ret void
-}
diff --git a/tests/bullet/compile b/tests/bullet/compile
new file mode 100755
index 00000000..1b1d2321
--- /dev/null
+++ b/tests/bullet/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/tests/bullet/config.guess b/tests/bullet/config.guess
new file mode 100755
index 00000000..396482d6
--- /dev/null
+++ b/tests/bullet/config.guess
@@ -0,0 +1,1500 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-07-02'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ x86:Interix*:[3456]*)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T:Interix*:[3456]*)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/tests/bullet/config.h.in b/tests/bullet/config.h.in
new file mode 100644
index 00000000..043b7bba
--- /dev/null
+++ b/tests/bullet/config.h.in
@@ -0,0 +1,99 @@
+/* config.h.in. Generated from configure.ac by autoheader. */
+
+/* Architecture is PowerPC */
+#undef ARCH_PPC
+
+/* Architecture is x86 */
+#undef ARCH_X86
+
+/* Architecture is x86-64 */
+#undef ARCH_X86_64
+
+/* Use the Apple OpenGL framework. */
+#undef HAVE_APPLE_OPENGL_FRAMEWORK
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <GL/glext.h> header file. */
+#undef HAVE_GL_GLEXT_H
+
+/* Define to 1 if you have the <GL/glut.h> header file. */
+#undef HAVE_GL_GLUT_H
+
+/* Define to 1 if you have the <GL/glu.h> header file. */
+#undef HAVE_GL_GLU_H
+
+/* Define to 1 if you have the <GL/gl.h> header file. */
+#undef HAVE_GL_GL_H
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Platform is Apple */
+#undef PLATFORM_APPLE
+
+/* Platform is Linux */
+#undef PLATFORM_LINUX
+
+/* Platform is Win32 */
+#undef PLATFORM_WIN32
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
diff --git a/tests/bullet/config.sub b/tests/bullet/config.sub
new file mode 100755
index 00000000..fab0aa35
--- /dev/null
+++ b/tests/bullet/config.sub
@@ -0,0 +1,1616 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2006-09-20'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/tests/bullet/configure b/tests/bullet/configure
new file mode 100755
index 00000000..c959d7d3
--- /dev/null
+++ b/tests/bullet/configure
@@ -0,0 +1,18392 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.61 for bullet 2.78.
+#
+# Report bugs to <bullet@erwincoumans.com>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p'
+elif mkdirs . 2>/dev/null; then
+ as_mkdir_p='mkdirs'
+else
+ as_mkdir_p=''
+fi
+test -d ./-p && rmdir ./-p
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='bullet'
+PACKAGE_TARNAME='bullet'
+PACKAGE_VERSION='2.78'
+PACKAGE_STRING='bullet 2.78'
+PACKAGE_BUGREPORT='bullet@erwincoumans.com'
+
+ac_unique_file="configure.ac"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+am__isrc
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+CXX
+CXXFLAGS
+ac_ct_CXX
+CXXDEPMODE
+am__fastdepCXX_TRUE
+am__fastdepCXX_FALSE
+LIBTOOL
+SED
+GREP
+EGREP
+FGREP
+LD
+DUMPBIN
+ac_ct_DUMPBIN
+NM
+LN_S
+AR
+RANLIB
+lt_ECHO
+DSYMUTIL
+NMEDIT
+LIPO
+OTOOL
+OTOOL64
+CPP
+CXXCPP
+opengl_LIBS
+CONDITIONAL_BUILD_MULTITHREADED_TRUE
+CONDITIONAL_BUILD_MULTITHREADED_FALSE
+CONDITIONAL_BUILD_DEMOS_TRUE
+CONDITIONAL_BUILD_DEMOS_FALSE
+GL_LIBS
+LIBOBJS
+LTLIBOBJS'
+ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CXX
+CXXFLAGS
+CCC
+CPP
+CXXCPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures bullet 2.78 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/bullet]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of bullet 2.78:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-multithreaded build BulletMultiThreaded (default NO)
+ --disable-demos disable Bullet demos
+ --enable-debug build with debugging information (default NO)
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CPP C preprocessor
+ CXXCPP C++ preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <bullet@erwincoumans.com>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" || continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+bullet configure 2.78
+generated by GNU Autoconf 2.61
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by bullet $as_me 2.78, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
+fi
+shift
+for ac_site_file
+do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+am__api_version='1.10'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+done
+IFS=$as_save_IFS
+
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t $srcdir/configure conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
+alias in your environment" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $. echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm -f conftest.sed
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ SET_MAKE=
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='bullet'
+ VERSION='2.78'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+ am__include=include
+ am__quote=
+ _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ fi
+fi
+
+
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CC" am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test "x$CC" != xcc; then
+ { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; }
+else
+ { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; }
+fi
+set dummy $CC; ac_cc=`echo $2 |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest2.$ac_objext && { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ test -f conftest2.$ac_objext && { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f -r core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CXXFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.4'
+macro_revision='1.2976'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; }
+if test "${ac_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" | sed 99q >conftest.sed
+ $as_unset ac_script || ac_script=
+ # Extract the first word of "sed gsed" to use in msg output
+if test -z "$SED"; then
+set dummy sed gsed; ac_prog_name=$2
+if test "${ac_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_SED_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ # Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_SED_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+SED="$ac_cv_path_SED"
+if test -z "$SED"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+echo "${ECHO_T}$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for fgrep" >&5
+echo $ECHO_N "checking for fgrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ # Extract the first word of "fgrep" to use in msg output
+if test -z "$FGREP"; then
+set dummy fgrep; ac_prog_name=$2
+if test "${ac_cv_path_FGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_FGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ # Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_FGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+FGREP="$ac_cv_path_FGREP"
+if test -z "$FGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
+echo "${ECHO_T}$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+ { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+echo $ECHO_N "checking for BSD- or MS-compatible name lister (nm)... $ECHO_C" >&6; }
+if test "${lt_cv_path_NM+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+echo "${ECHO_T}$DUMPBIN" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+echo "${ECHO_T}$ac_ct_DUMPBIN" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+echo $ECHO_N "checking the name lister ($NM) interface... $ECHO_C" >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:4873: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4876: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:4879: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -r -f conftest*
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+echo "${ECHO_T}$lt_cv_nm_interface" >&6; }
+
+{ echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+echo $ECHO_N "checking whether the shell understands some XSI constructs... $ECHO_C" >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ echo "$as_me:$LINENO: result: $xsi_shell" >&5
+echo "${ECHO_T}$xsi_shell" >&6; }
+
+
+{ echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+echo $ECHO_N "checking whether the shell understands \"+=\"... $ECHO_C" >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+echo "${ECHO_T}$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -r -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { echo "$as_me:$LINENO: result: failed" >&5
+echo "${ECHO_T}failed" >&6; }
+else
+ { echo "$as_me:$LINENO: result: ok" >&5
+echo "${ECHO_T}ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 5990 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ lt_cv_cc_needs_belf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ lt_cv_cc_needs_belf=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+echo "${ECHO_T}$DSYMUTIL" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { echo "$as_me:$LINENO: result: $NMEDIT" >&5
+echo "${ECHO_T}$NMEDIT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+echo "${ECHO_T}$ac_ct_NMEDIT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { echo "$as_me:$LINENO: result: $LIPO" >&5
+echo "${ECHO_T}$LIPO" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
+echo "${ECHO_T}$ac_ct_LIPO" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { echo "$as_me:$LINENO: result: $OTOOL" >&5
+echo "${ECHO_T}$OTOOL" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
+echo "${ECHO_T}$ac_ct_OTOOL" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { echo "$as_me:$LINENO: result: $OTOOL64" >&5
+echo "${ECHO_T}$OTOOL64" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
+echo "${ECHO_T}$ac_ct_OTOOL64" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; }
+ { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5
+echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ lt_cv_ld_exported_symbols_list=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ lt_cv_ld_exported_symbols_list=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f -r conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f -r conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+ if test -n "$CCC"; then
+ CXX=$CCC
+ else
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ { echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CXX"; then
+ ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+ fi
+fi
+# Provide some information about the compiler.
+echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; }
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+ ac_cxx_werror_flag=yes
+ ac_cv_prog_cxx_g=no
+ CXXFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CXXFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+ CXXFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+ if test "$GXX" = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-g"
+ fi
+else
+ if test "$GXX" = yes; then
+ CXXFLAGS="-O2"
+ else
+ CXXFLAGS=
+ fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX" am_compiler_list=
+
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CXX_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ case $depmode in
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ none) break ;;
+ esac
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this.
+ if depmode=$depmode \
+ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CXX_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+ am__fastdepCXX_TRUE=
+ am__fastdepCXX_FALSE='#'
+else
+ am__fastdepCXX_TRUE='#'
+ am__fastdepCXX_FALSE=
+fi
+
+
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; }
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CXXCPP needs to be expanded
+ for CXXCPP in "$CXX -E" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+ CXXCPP=$ac_cv_prog_CXXCPP
+else
+ ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ _lt_caught_CXX_error=yes
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+else
+ _lt_caught_CXX_error=yes
+fi
+
+
+
+
+
+# Set options
+
+
+
+ enable_dlopen=no
+
+
+ enable_win32_dll=no
+
+
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6; }
+if test "${lt_cv_objdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8542: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8546: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM -r conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ icc* | ecc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8866: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8870: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM -r conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8971: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8975: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM -r conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM -r conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:9026: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:9030: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM -r conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM -r conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+ hard_links=yes
+ $RM -r conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ if test "$GCC" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ $RM -r conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM -r conftest*
+ { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext ${libname}${release}${versuffix}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+ shlibpath_overrides_runpath=yes
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ { echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_shl_load || defined __stub___shl_load
+choke me
+#endif
+
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6; }
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
+else
+ { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dld_shl_load=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ { echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_dlopen || defined __stub___dlopen
+choke me
+#endif
+
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6; }
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dl_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_svld_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_svld_dlopen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; }
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_dld_dld_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dld_dld_link=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; }
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 11774 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 11874 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ exit (status);
+}
+_LT_EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+ else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ fi
+ ;;
+ *)
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6; }
+
+ { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6; }
+
+ { echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+ # save warnings/boilerplate of simple test code
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+ ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ compiler_CXX=$CC
+ for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+ else
+ lt_prog_compiler_no_builtin_flag_CXX=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
+else
+ { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_CXX=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+ ld_shlibs_CXX=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ file_list_spec_CXX='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct_CXX=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ always_export_symbols_CXX=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_CXX="-z nodefs"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX='$convenience'
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_CXX=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ allow_undefined_flag_CXX=unsupported
+ always_export_symbols_CXX=no
+ enable_shared_with_static_runtimes_CXX=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc_CXX=no
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ whole_archive_flag_spec_CXX=''
+ link_all_deplibs_CXX=yes
+ allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ if test "$GCC" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+
+ else
+ ld_shlibs_CXX=no
+ fi
+
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ ld_shlibs_CXX=no
+ ;;
+
+ freebsd-elf*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_direct_absolute_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ link_all_deplibs_CXX=yes
+ ;;
+ esac
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ inherit_rpath_CXX=yes
+ ;;
+
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ archive_cmds_need_lc_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+ prelink_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ old_archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ archive_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object_CXX=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ ld_shlibs_CXX=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ ld_shlibs_CXX=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct_CXX=yes
+ hardcode_shlibpath_var_CXX=no
+ hardcode_direct_absolute_CXX=yes
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ allow_undefined_flag_CXX=' -expect_unresolved \*'
+ archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+ ;;
+ esac
+
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ archive_cmds_need_lc_CXX=yes
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ hardcode_libdir_flag_spec_CXX='-R$libdir'
+ hardcode_shlibpath_var_CXX=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag_CXX='${wl}-z,text'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag_CXX='${wl}-z,text'
+ allow_undefined_flag_CXX='${wl}-z,nodefs'
+ archive_cmds_need_lc_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+ export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
+
+ { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+ test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+ GCC_CXX="$GXX"
+ LD_CXX="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
+
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$compiler_lib_search_path_CXX"; then
+ compiler_lib_search_path_CXX="${prev}${p}"
+ else
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$postdeps_CXX"; then
+ postdeps_CXX="${prev}${p}"
+ else
+ postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$predep_objects_CXX"; then
+ predep_objects_CXX="$p"
+ else
+ predep_objects_CXX="$predep_objects_CXX $p"
+ fi
+ else
+ if test -z "$postdep_objects_CXX"; then
+ postdep_objects_CXX="$p"
+ else
+ postdep_objects_CXX="$postdep_objects_CXX $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling CXX test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+case $host_os in
+interix[3-9]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ predep_objects_CXX=
+ postdep_objects_CXX=
+ postdeps_CXX=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ postdeps_CXX='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+{ echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; }
+
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_CXX='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ lt_prog_compiler_pic_CXX=
+ ;;
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[4-9]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_CXX='-Bstatic'
+ else
+ lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ lt_prog_compiler_pic_CXX='+Z'
+ fi
+ ;;
+ aCC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-fpic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-qpic'
+ lt_prog_compiler_static_CXX='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic_CXX='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_static_CXX='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ lt_prog_compiler_wl_CXX='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ lt_prog_compiler_pic_CXX='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ lt_prog_compiler_pic_CXX='-pic'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ lt_prog_compiler_pic_CXX='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_CXX=
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+ ;;
+esac
+{ echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; }
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+ { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:13877: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:13881: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+ case $lt_prog_compiler_pic_CXX in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
+ esac
+else
+ lt_prog_compiler_pic_CXX=
+ lt_prog_compiler_can_build_shared_CXX=no
+fi
+
+fi
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_static_works_CXX=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works_CXX=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+ :
+else
+ lt_prog_compiler_static_CXX=
+fi
+
+
+
+
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:13976: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:13980: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM -r conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM -r conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+ { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14028: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:14032: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM -r conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM -r conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; }
+ hard_links=yes
+ $RM -r conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+ { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; }
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[4-9]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+
+{ echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+with_gnu_ld_CXX=$with_gnu_ld
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_CXX=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_CXX in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; }
+ $RM -r conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_CXX
+ pic_flag=$lt_prog_compiler_pic_CXX
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+ allow_undefined_flag_CXX=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc_CXX=no
+ else
+ archive_cmds_need_lc_CXX=yes
+ fi
+ allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM -r conftest*
+ { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; }
+
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext ${libname}${release}${versuffix}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+ shlibpath_overrides_runpath=yes
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+ test -n "$runpath_var_CXX" ||
+ test "X$hardcode_automatic_CXX" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct_CXX" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+ test "$hardcode_minus_L_CXX" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_CXX=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_CXX=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_CXX=unsupported
+fi
+{ echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6; }
+
+if test "$hardcode_action_CXX" = relink ||
+ test "$inherit_rpath_CXX" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+
+cat >>confdefs.h <<\_ACEOF
+#define PLATFORM_WIN32 1
+_ACEOF
+
+ opengl_LIBS="-lunsupported_platform"
+ PLATFORM_STRING="Win32"
+ ;;
+ *-*-linux*)
+
+cat >>confdefs.h <<\_ACEOF
+#define PLATFORM_LINUX 1
+_ACEOF
+
+ opengl_LIBS="-lGL -lGLU -lglut"
+ PLATFORM_STRING="Linux"
+ ;;
+ *-*-darwin*)
+
+cat >>confdefs.h <<\_ACEOF
+#define PLATFORM_APPLE 1
+_ACEOF
+
+ opengl_LIBS="-framework AGL -framework OpenGL -framework GLUT"
+ PLATFORM_STRING="Apple"
+ ;;
+ *)
+ { echo "$as_me:$LINENO: WARNING: *** Please add $host to configure.ac checks!" >&5
+echo "$as_me: WARNING: *** Please add $host to configure.ac checks!" >&2;}
+ ;;
+esac
+
+
+case "$host" in
+ i?86-* | k?-* | athlon-* | pentium*-)
+
+cat >>confdefs.h <<\_ACEOF
+#define ARCH_X86 1
+_ACEOF
+
+ ARCH_SPECIFIC_CFLAGS=""
+ ARCH_STRING="X86"
+ ;;
+ x86_64-*)
+
+cat >>confdefs.h <<\_ACEOF
+#define ARCH_X86_64 1
+_ACEOF
+
+ ARCH_SPECIFIC_CFLAGS="-DUSE_ADDR64"
+ ARCH_STRING="X86-64"
+ ;;
+ ppc-* | powerpc-*)
+
+cat >>confdefs.h <<\_ACEOF
+#define ARCH_PPC 1
+_ACEOF
+
+ ARCH_SPECIFIC_CFLAGS=""
+ ARCH_STRING="PowerPC"
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: Unknown Architecture" >&5
+echo "$as_me: error: Unknown Architecture" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+ && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
+ bogus endian macros
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_bigendian=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_bigendian=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+ # try to guess the endianness by grepping values into an object file
+ ac_cv_c_bigendian=unknown
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+ ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
+case $ac_cv_c_bigendian in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+ no)
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
+
+
+#----------------------------------------------------------------------------
+# Setup for the configuration header.
+#----------------------------------------------------------------------------
+ac_config_headers="$ac_config_headers config.h"
+
+#----------------------------------------------------------------------------
+# Package configuration switches.
+#----------------------------------------------------------------------------
+# Check whether --enable-multithreaded was given.
+if test "${enable_multithreaded+set}" = set; then
+ enableval=$enable_multithreaded; disable_multithreaded=no
+else
+ disable_multithreaded=yes
+fi
+
+{ echo "$as_me:$LINENO: checking BulletMultiThreaded" >&5
+echo $ECHO_N "checking BulletMultiThreaded... $ECHO_C" >&6; }
+if test "$disable_multithreaded" = yes; then
+ build_multithreaded=no
+else
+ build_multithreaded=yes
+fi
+
+{ echo "$as_me:$LINENO: result: $build_multithreaded" >&5
+echo "${ECHO_T}$build_multithreaded" >&6; }
+ if test "$build_multithreaded" = yes; then
+ CONDITIONAL_BUILD_MULTITHREADED_TRUE=
+ CONDITIONAL_BUILD_MULTITHREADED_FALSE='#'
+else
+ CONDITIONAL_BUILD_MULTITHREADED_TRUE='#'
+ CONDITIONAL_BUILD_MULTITHREADED_FALSE=
+fi
+
+
+# Check whether --enable-demos was given.
+if test "${enable_demos+set}" = set; then
+ enableval=$enable_demos;
+else
+ enable_demos=yes
+fi
+
+ if false; then
+ CONDITIONAL_BUILD_DEMOS_TRUE=
+ CONDITIONAL_BUILD_DEMOS_FALSE='#'
+else
+ CONDITIONAL_BUILD_DEMOS_TRUE='#'
+ CONDITIONAL_BUILD_DEMOS_FALSE=
+fi
+
+
+if test "x$drawstuff" = "xOSX"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_APPLE_OPENGL_FRAMEWORK 1
+_ACEOF
+
+ GL_LIBS="-framework GLUT -framework OpenGL -framework Carbon -framework AGL"
+ have_glut=yes
+else
+ have_gl_headers=yes
+
+
+
+
+for ac_header in GL/gl.h GL/glu.h GL/glext.h GL/glut.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef WIN32
+ #include <windows.h>
+ #endif
+ #if HAVE_GL_GL_H
+ #include <GL/gl.h>
+ #endif
+ #if HAVE_GL_GLU_H
+ #include <GL/glu.h>
+ #endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ have_gl_headers=no
+fi
+
+done
+
+ have_gl=no
+ have_glu=no
+ have_glut=no
+ TEMP_LDFLAGS="$LDFLAGS"
+ { echo "$as_me:$LINENO: checking for main in -lGL" >&5
+echo $ECHO_N "checking for main in -lGL... $ECHO_C" >&6; }
+if test "${ac_cv_lib_GL_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGL $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_GL_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_GL_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_GL_main" >&5
+echo "${ECHO_T}$ac_cv_lib_GL_main" >&6; }
+if test $ac_cv_lib_GL_main = yes; then
+ GL_LIBS="-lGL"; have_gl=yes
+fi
+
+ { echo "$as_me:$LINENO: checking for main in -lGLU" >&5
+echo $ECHO_N "checking for main in -lGLU... $ECHO_C" >&6; }
+if test "${ac_cv_lib_GLU_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGLU -lGL $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_GLU_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_GLU_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLU_main" >&5
+echo "${ECHO_T}$ac_cv_lib_GLU_main" >&6; }
+if test $ac_cv_lib_GLU_main = yes; then
+ GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes
+fi
+
+ { echo "$as_me:$LINENO: checking for main in -lGLUT" >&5
+echo $ECHO_N "checking for main in -lGLUT... $ECHO_C" >&6; }
+if test "${ac_cv_lib_GLUT_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lGLUT -lGLUT $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_GLUT_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_GLUT_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_GLUT_main" >&5
+echo "${ECHO_T}$ac_cv_lib_GLUT_main" >&6; }
+if test $ac_cv_lib_GLUT_main = yes; then
+ GL_LIBS="-lGLUT -LGLU $GL_LIBS"; have_glut=yes
+fi
+
+ { echo "$as_me:$LINENO: checking for main in -lopengl32" >&5
+echo $ECHO_N "checking for main in -lopengl32... $ECHO_C" >&6; }
+if test "${ac_cv_lib_opengl32_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lopengl32 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_opengl32_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_opengl32_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_opengl32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_opengl32_main" >&6; }
+if test $ac_cv_lib_opengl32_main = yes; then
+ GL_LIBS="-lopengl32"; have_gl=yes
+fi
+
+ { echo "$as_me:$LINENO: checking for main in -lglu32" >&5
+echo $ECHO_N "checking for main in -lglu32... $ECHO_C" >&6; }
+if test "${ac_cv_lib_glu32_main+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lglu32 -lopengl32 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+
+int
+main ()
+{
+return main ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_glu32_main=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_glu32_main=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_glu32_main" >&5
+echo "${ECHO_T}$ac_cv_lib_glu32_main" >&6; }
+if test $ac_cv_lib_glu32_main = yes; then
+ GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes
+fi
+
+ LDFLAGS="$TEMP_LDFLAGS"
+ if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then
+ if test x$enable_demos = xyes; then
+ { echo "$as_me:$LINENO: WARNING: Demos and Extras will not be built because OpenGL and GLUT doesn't seem to work. See \`config.log' for details." >&5
+echo "$as_me: WARNING: Demos and Extras will not be built because OpenGL and GLUT doesn't seem to work. See \`config.log' for details." >&2;}
+ fi
+ enable_demos=no
+ else
+ { echo "$as_me:$LINENO: Found OpenGL" >&5
+echo "$as_me: Found OpenGL" >&6;}
+ fi
+fi
+
+
+
+if test "x$enable_demos" != xno; then
+ { echo "$as_me:$LINENO: Building Bullet demos" >&5
+echo "$as_me: Building Bullet demos" >&6;}
+ if true; then
+ CONDITIONAL_BUILD_DEMOS_TRUE=
+ CONDITIONAL_BUILD_DEMOS_FALSE='#'
+else
+ CONDITIONAL_BUILD_DEMOS_TRUE='#'
+ CONDITIONAL_BUILD_DEMOS_FALSE=
+fi
+
+fi
+
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then
+ enableval=$enable_debug;
+else
+ enable_debug=no
+fi
+
+
+{ echo "$as_me:$LINENO: checking build mode" >&5
+echo $ECHO_N "checking build mode... $ECHO_C" >&6; }
+if test $enable_debug = yes; then
+ build_mode=debug
+else
+ build_mode=optimize
+fi
+
+{ echo "$as_me:$LINENO: result: $build_mode" >&5
+echo "${ECHO_T}$build_mode" >&6; }
+
+
+
+CFLAGS="$ARCH_SPECIFIC_CFLAGS $CFLAGS"
+CXXFLAGS="$ARCH_SPECIFIC_CFLAGS $CXXFLAGS $CFLAGS"
+#----------------------------------------------------------------------------
+# Emit generated files.
+#----------------------------------------------------------------------------
+ac_config_files="$ac_config_files bullet.pc Makefile src/Makefile Extras/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${CONDITIONAL_BUILD_MULTITHREADED_TRUE}" && test -z "${CONDITIONAL_BUILD_MULTITHREADED_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"CONDITIONAL_BUILD_MULTITHREADED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CONDITIONAL_BUILD_MULTITHREADED\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${CONDITIONAL_BUILD_DEMOS_TRUE}" && test -z "${CONDITIONAL_BUILD_DEMOS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"CONDITIONAL_BUILD_DEMOS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CONDITIONAL_BUILD_DEMOS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${CONDITIONAL_BUILD_DEMOS_TRUE}" && test -z "${CONDITIONAL_BUILD_DEMOS_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"CONDITIONAL_BUILD_DEMOS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CONDITIONAL_BUILD_DEMOS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p'
+elif mkdirs . 2>/dev/null; then
+ as_mkdir_p='mkdirs'
+else
+ as_mkdir_p=''
+fi
+test -d ./-p && rmdir ./-p
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by bullet $as_me 2.78, which was
+generated by GNU Autoconf 2.61. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+bullet config.status 2.78
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2006 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+compiler_CXX \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_static_CXX \
+lt_cv_prog_compiler_c_o_CXX \
+export_dynamic_flag_spec_CXX \
+whole_archive_flag_spec_CXX \
+compiler_needs_object_CXX \
+with_gnu_ld_CXX \
+allow_undefined_flag_CXX \
+no_undefined_flag_CXX \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_separator_CXX \
+fix_srcfile_path_CXX \
+exclude_expsyms_CXX \
+include_expsyms_CXX \
+file_list_spec_CXX \
+compiler_lib_search_dirs_CXX \
+predep_objects_CXX \
+postdep_objects_CXX \
+predeps_CXX \
+postdeps_CXX \
+compiler_lib_search_path_CXX; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_from_new_cmds_CXX \
+old_archive_from_expsyms_cmds_CXX \
+archive_cmds_CXX \
+archive_expsym_cmds_CXX \
+module_cmds_CXX \
+module_expsym_cmds_CXX \
+export_symbols_cmds_CXX \
+prelink_cmds_CXX; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "bullet.pc") CONFIG_FILES="$CONFIG_FILES bullet.pc" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "Extras/Makefile") CONFIG_FILES="$CONFIG_FILES Extras/Makefile" ;;
+
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+#
+# Set up the sed scripts for CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+CXX!$CXX$ac_delim
+CXXFLAGS!$CXXFLAGS$ac_delim
+ac_ct_CXX!$ac_ct_CXX$ac_delim
+CXXDEPMODE!$CXXDEPMODE$ac_delim
+am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim
+am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim
+LIBTOOL!$LIBTOOL$ac_delim
+SED!$SED$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+FGREP!$FGREP$ac_delim
+LD!$LD$ac_delim
+DUMPBIN!$DUMPBIN$ac_delim
+ac_ct_DUMPBIN!$ac_ct_DUMPBIN$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+NM!$NM$ac_delim
+LN_S!$LN_S$ac_delim
+AR!$AR$ac_delim
+RANLIB!$RANLIB$ac_delim
+lt_ECHO!$lt_ECHO$ac_delim
+DSYMUTIL!$DSYMUTIL$ac_delim
+NMEDIT!$NMEDIT$ac_delim
+LIPO!$LIPO$ac_delim
+OTOOL!$OTOOL$ac_delim
+OTOOL64!$OTOOL64$ac_delim
+CPP!$CPP$ac_delim
+CXXCPP!$CXXCPP$ac_delim
+opengl_LIBS!$opengl_LIBS$ac_delim
+CONDITIONAL_BUILD_MULTITHREADED_TRUE!$CONDITIONAL_BUILD_MULTITHREADED_TRUE$ac_delim
+CONDITIONAL_BUILD_MULTITHREADED_FALSE!$CONDITIONAL_BUILD_MULTITHREADED_FALSE$ac_delim
+CONDITIONAL_BUILD_DEMOS_TRUE!$CONDITIONAL_BUILD_DEMOS_TRUE$ac_delim
+CONDITIONAL_BUILD_DEMOS_FALSE!$CONDITIONAL_BUILD_DEMOS_FALSE$ac_delim
+GL_LIBS!$GL_LIBS$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 20; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { if test -n "$as_mkdir_p"; then
+ $as_mkdir_p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
+ esac
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+_ACEOF
+
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
+ac_dC=' '
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
+do
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines conftest.tail
+
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
+cat >>$CONFIG_STATUS <<\_ACEOF
+ if test x"$ac_file" != x-; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f $ac_file
+ mv "$tmp/config.h" $ac_file
+ fi
+ else
+ echo "/* $configure_input */"
+ cat "$ac_result"
+ fi
+ rm -f "$tmp/out12"
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $ac_file | $ac_file:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
+echo X$ac_file |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { if test -n "$as_mkdir_p"; then
+ $as_mkdir_p $dirpart/$fdir
+ else
+ as_dir=$dirpart/$fdir
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+done
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM -f \"$cfgfile\"; exit 1" 1 2 15
+ $RM -f "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+
+ cat <<_LT_EOF >> "$ofile"
+
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
+
+# A language specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
+
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
+
+ ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+{ echo "$as_me:$LINENO:
+
+Please type 'make' to build Bullet
+" >&5
+echo "$as_me:
+
+Please type 'make' to build Bullet
+" >&6;}
diff --git a/tests/bullet/configure.ac b/tests/bullet/configure.ac
new file mode 100644
index 00000000..b63e12a4
--- /dev/null
+++ b/tests/bullet/configure.ac
@@ -0,0 +1,160 @@
+#----------------------------------------------------------------------------
+# Autoconf input script. Invoke the ./autogen.sh script to generate a
+# configure script from this file.
+#----------------------------------------------------------------------------
+AC_PREREQ([2.54])
+
+#----------------------------------------------------------------------------
+# Initialize Autoconf.
+#----------------------------------------------------------------------------
+AC_INIT(
+ [bullet],
+ [2.78],
+ [bullet@erwincoumans.com])
+AC_CANONICAL_HOST
+AC_CONFIG_SRCDIR([configure.ac])
+AM_INIT_AUTOMAKE
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+
+case "$host" in
+ *-*-mingw*|*-*-cygwin*)
+ AC_DEFINE(PLATFORM_WIN32, 1, [Platform is Win32])
+ opengl_LIBS="-lunsupported_platform"
+ PLATFORM_STRING="Win32"
+ ;;
+ *-*-linux*)
+ AC_DEFINE(PLATFORM_LINUX, 1, [Platform is Linux])
+ opengl_LIBS="-lGL -lGLU -lglut"
+ PLATFORM_STRING="Linux"
+ ;;
+ *-*-darwin*)
+ AC_DEFINE(PLATFORM_APPLE, 1, [Platform is Apple])
+ opengl_LIBS="-framework AGL -framework OpenGL -framework GLUT"
+ PLATFORM_STRING="Apple"
+ ;;
+ *)
+ AC_MSG_WARN([*** Please add $host to configure.ac checks!])
+ ;;
+esac
+AC_SUBST(opengl_LIBS)
+
+case "$host" in
+ i?86-* | k?-* | athlon-* | pentium*-)
+ AC_DEFINE(ARCH_X86, 1, [Architecture is x86])
+ ARCH_SPECIFIC_CFLAGS=""
+ ARCH_STRING="X86"
+ ;;
+ x86_64-*)
+ AC_DEFINE(ARCH_X86_64, 1, [Architecture is x86-64])
+ ARCH_SPECIFIC_CFLAGS="-DUSE_ADDR64"
+ ARCH_STRING="X86-64"
+ ;;
+ ppc-* | powerpc-*)
+ AC_DEFINE(ARCH_PPC, 1, [Architecture is PowerPC])
+ ARCH_SPECIFIC_CFLAGS=""
+ ARCH_STRING="PowerPC"
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown Architecture])
+ ;;
+esac
+AC_C_BIGENDIAN
+
+
+#----------------------------------------------------------------------------
+# Setup for the configuration header.
+#----------------------------------------------------------------------------
+AC_CONFIG_HEADERS([config.h])
+#----------------------------------------------------------------------------
+# Package configuration switches.
+#----------------------------------------------------------------------------
+AC_ARG_ENABLE([multithreaded],
+ [AC_HELP_STRING([--enable-multithreaded],
+ [build BulletMultiThreaded (default NO)])],
+ [disable_multithreaded=no], [disable_multithreaded=yes])
+AC_MSG_CHECKING([BulletMultiThreaded])
+AS_IF([test "$disable_multithreaded" = yes], [build_multithreaded=no], [build_multithreaded=yes])
+AC_MSG_RESULT([$build_multithreaded])
+AM_CONDITIONAL([CONDITIONAL_BUILD_MULTITHREADED], [test "$build_multithreaded" = yes])
+
+AC_ARG_ENABLE([demos],
+ [AS_HELP_STRING([--disable-demos],
+ [disable Bullet demos])],
+ [],
+ [enable_demos=yes])
+AM_CONDITIONAL([CONDITIONAL_BUILD_DEMOS], [false])
+
+dnl Check for OpenGL and GLUT
+if test "x$drawstuff" = "xOSX"; then
+ AC_DEFINE([HAVE_APPLE_OPENGL_FRAMEWORK], [1],
+ [Use the Apple OpenGL framework.])
+ GL_LIBS="-framework GLUT -framework OpenGL -framework Carbon -framework AGL"
+ have_glut=yes
+else
+ have_gl_headers=yes
+ AC_CHECK_HEADERS(GL/gl.h GL/glu.h GL/glext.h GL/glut.h, ,
+ [have_gl_headers=no],
+ [[#ifdef WIN32
+ #include <windows.h>
+ #endif
+ #if HAVE_GL_GL_H
+ #include <GL/gl.h>
+ #endif
+ #if HAVE_GL_GLU_H
+ #include <GL/glu.h>
+ #endif
+ ]])
+ have_gl=no
+ have_glu=no
+ have_glut=no
+ TEMP_LDFLAGS="$LDFLAGS"
+ AC_CHECK_LIB(GL, main, [GL_LIBS="-lGL"; have_gl=yes])
+ AC_CHECK_LIB(GLU, main, [GL_LIBS="-lGLU $GL_LIBS"; have_glu=yes], , -lGL)
+ AC_CHECK_LIB(GLUT, main, [GL_LIBS="-lGLUT -LGLU $GL_LIBS"; have_glut=yes], ,-lGLUT)
+ AC_CHECK_LIB(opengl32, main, [GL_LIBS="-lopengl32"; have_gl=yes])
+ AC_CHECK_LIB(glu32, main, [GL_LIBS="-lglu32 $GL_LIBS"; have_glu=yes], , -lopengl32)
+ LDFLAGS="$TEMP_LDFLAGS"
+ if test $have_gl = no -o $have_glu = no -o $have_gl_headers = no; then
+ if test x$enable_demos = xyes; then
+ AC_MSG_WARN([Demos and Extras will not be built because OpenGL and GLUT doesn't seem to work. See `config.log' for details.])
+ fi
+ enable_demos=no
+ else
+ AC_MSG_NOTICE([Found OpenGL])
+ fi
+fi
+AC_SUBST(GL_LIBS)
+
+
+if test "x$enable_demos" != xno; then
+ AC_MSG_NOTICE([Building Bullet demos])
+ AM_CONDITIONAL([CONDITIONAL_BUILD_DEMOS],[true])
+fi
+
+
+
+AC_ARG_ENABLE([debug],
+ [AC_HELP_STRING([--enable-debug],
+ [build with debugging information (default NO)])],
+ [], [enable_debug=no])
+
+AC_MSG_CHECKING([build mode])
+AS_IF([test $enable_debug = yes], [build_mode=debug], [build_mode=optimize])
+AC_MSG_RESULT([$build_mode])
+
+
+
+CFLAGS="$ARCH_SPECIFIC_CFLAGS $CFLAGS"
+CXXFLAGS="$ARCH_SPECIFIC_CFLAGS $CXXFLAGS $CFLAGS"
+#----------------------------------------------------------------------------
+# Emit generated files.
+#----------------------------------------------------------------------------
+AC_CONFIG_FILES([bullet.pc Makefile src/Makefile Extras/Makefile])
+AC_OUTPUT
+
+AC_MSG_NOTICE([
+
+Please type 'make' to build Bullet
+])
diff --git a/tests/bullet/convex0.bin b/tests/bullet/convex0.bin
new file mode 100644
index 00000000..83493fca
--- /dev/null
+++ b/tests/bullet/convex0.bin
Binary files differ
diff --git a/tests/bullet/depcomp b/tests/bullet/depcomp
new file mode 100755
index 00000000..ca5ea4e1
--- /dev/null
+++ b/tests/bullet/depcomp
@@ -0,0 +1,584 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2006-10-15.18
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
+# Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by `PROGRAMS ARGS'.
+ object Object file output by `PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputing dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+ tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'. On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like `#:fec' to the end of the
+ # dependency line.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+ tr '
+' ' ' >> $depfile
+ echo >> $depfile
+
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' '
+' < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> $depfile
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts `$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+ tmpdepfile="$stripped.u"
+ if test "$libtool" = yes; then
+ "$@" -Wc,-M
+ else
+ "$@" -M
+ fi
+ stat=$?
+
+ if test -f "$tmpdepfile"; then :
+ else
+ stripped=`echo "$stripped" | sed 's,^.*/,,'`
+ tmpdepfile="$stripped.u"
+ fi
+
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+
+ if test -f "$tmpdepfile"; then
+ outname="$stripped.o"
+ # Each line is of the form `foo.o: dependent.h'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+ sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ else
+ # The sourcefile does not contain any dependencies, so just
+ # store a dummy comment line, to avoid errors with the Makefile
+ # "include basename.Plo" scheme.
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+icc)
+ # Intel's C compiler understands `-MD -MF file'. However on
+ # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+ # ICC 7.0 will fill foo.d with something like
+ # foo.o: sub/foo.c
+ # foo.o: sub/foo.h
+ # which is wrong. We want:
+ # sub/foo.o: sub/foo.c
+ # sub/foo.o: sub/foo.h
+ # sub/foo.c:
+ # sub/foo.h:
+ # ICC 7.1 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using \ :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in `foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+ if test "$libtool" = yes; then
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for `:'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ "$@" $dashmflag |
+ sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no
+ for arg in "$@"; do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix="`echo $object | sed 's/^.*\././'`"
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test $1 != '--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove `-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o,
+ # because we must use -o when running libtool.
+ "$@" || exit $?
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ echo " " >> "$depfile"
+ . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/tests/bullet/file.obj b/tests/bullet/file.obj
new file mode 100644
index 00000000..15047b02
--- /dev/null
+++ b/tests/bullet/file.obj
@@ -0,0 +1,3578 @@
+v 0.000118 -0.390977 -0.478607
+v 0.017389 -0.390977 -0.478271
+v 0.029547 -0.390983 -0.429828
+v 0.000118 -0.390983 -0.429848
+v 0.017389 -0.390977 -0.478271
+v 0.017389 -0.342855 -0.474044
+v 0.029547 -0.317820 -0.429577
+v 0.029547 -0.390983 -0.429828
+v 0.017389 -0.342855 -0.474044
+v 0.000118 -0.331762 -0.473074
+v 0.000118 -0.306727 -0.429520
+v 0.029547 -0.317820 -0.429577
+v -0.017152 -0.342855 -0.474044
+v -0.029311 -0.317820 -0.429577
+v -0.017152 -0.342855 -0.474044
+v -0.017152 -0.390977 -0.478271
+v -0.029311 -0.390983 -0.429828
+v -0.029311 -0.317820 -0.429577
+v -0.017152 -0.390977 -0.478271
+v -0.029311 -0.390983 -0.429828
+v 0.017389 -0.391071 -0.377731
+v 0.000118 -0.391100 -0.378066
+v 0.017389 -0.336012 -0.378305
+v 0.017389 -0.391071 -0.377731
+v 0.029547 -0.317820 -0.429577
+v 0.000118 -0.306727 -0.429520
+v 0.000118 -0.324876 -0.378305
+v 0.017389 -0.336012 -0.378305
+v 0.000118 -0.306727 -0.429520
+v -0.029311 -0.317820 -0.429577
+v -0.017152 -0.336012 -0.378305
+v 0.000118 -0.324876 -0.378305
+v -0.017152 -0.391071 -0.377731
+v -0.017152 -0.336012 -0.378305
+v -0.017152 -0.391071 -0.377731
+v 0.017389 -0.355018 -0.311310
+v 0.000118 -0.358745 -0.310312
+v 0.017389 -0.313071 -0.327714
+v 0.017389 -0.355018 -0.311310
+v 0.000118 -0.302315 -0.330597
+v 0.017389 -0.313071 -0.327714
+v -0.017152 -0.313071 -0.327714
+v 0.000118 -0.302315 -0.330597
+v -0.017152 -0.355018 -0.311310
+v -0.017152 -0.313071 -0.327714
+v -0.017152 -0.355018 -0.311310
+v 0.027414 -0.282077 -0.242925
+v 0.000118 -0.286749 -0.239005
+v 0.027414 -0.244765 -0.265699
+v 0.027414 -0.282077 -0.242925
+v 0.000118 -0.231283 -0.277012
+v 0.027414 -0.244765 -0.265699
+v -0.027178 -0.244765 -0.265699
+v 0.000118 -0.231283 -0.277012
+v -0.027178 -0.282077 -0.242925
+v -0.027178 -0.244765 -0.265699
+v -0.027178 -0.282077 -0.242925
+v 0.035601 -0.254040 -0.188841
+v 0.000118 -0.261848 -0.187464
+v 0.035601 -0.172486 -0.190596
+v 0.035601 -0.254040 -0.188841
+v 0.000118 -0.149955 -0.194569
+v 0.035601 -0.172486 -0.190596
+v -0.035364 -0.172486 -0.190596
+v 0.000118 -0.149955 -0.194569
+v -0.035364 -0.254040 -0.188841
+v -0.035364 -0.172486 -0.190596
+v -0.035364 -0.254040 -0.188841
+v 0.000118 -0.360973 -0.484897
+v 0.017389 -0.390977 -0.478271
+v 0.000118 -0.390977 -0.478607
+v 0.017389 -0.342855 -0.474044
+v 0.000118 -0.331762 -0.473074
+v -0.017152 -0.342855 -0.474044
+v -0.017152 -0.390977 -0.478271
+v 0.035601 -0.232880 -0.098411
+v 0.000118 -0.240808 -0.098411
+v 0.035601 -0.144967 -0.098411
+v 0.035601 -0.232880 -0.098411
+v 0.000118 -0.122088 -0.098411
+v 0.035601 -0.144967 -0.098411
+v -0.035364 -0.144967 -0.098411
+v 0.000118 -0.122088 -0.098411
+v -0.035364 -0.232880 -0.098411
+v -0.035364 -0.144967 -0.098411
+v -0.035364 -0.232880 -0.098411
+v 0.478607 -0.390977 0.000118
+v 0.478271 -0.390977 0.017389
+v 0.429828 -0.390983 0.029547
+v 0.429848 -0.390983 0.000118
+v 0.478271 -0.390977 0.017389
+v 0.474044 -0.342855 0.017389
+v 0.429577 -0.317820 0.029547
+v 0.429828 -0.390983 0.029547
+v 0.474044 -0.342855 0.017389
+v 0.473074 -0.331762 0.000118
+v 0.429520 -0.306727 0.000118
+v 0.429577 -0.317820 0.029547
+v 0.474044 -0.342855 -0.017152
+v 0.429577 -0.317820 -0.029311
+v 0.474044 -0.342855 -0.017152
+v 0.478271 -0.390977 -0.017152
+v 0.429828 -0.390983 -0.029311
+v 0.429577 -0.317820 -0.029311
+v 0.478271 -0.390977 -0.017152
+v 0.429828 -0.390983 -0.029311
+v 0.377731 -0.391071 0.017389
+v 0.378066 -0.391100 0.000118
+v 0.378305 -0.336012 0.017389
+v 0.377731 -0.391071 0.017389
+v 0.429577 -0.317820 0.029547
+v 0.429520 -0.306727 0.000118
+v 0.378305 -0.324876 0.000118
+v 0.378305 -0.336012 0.017389
+v 0.429520 -0.306727 0.000118
+v 0.429577 -0.317820 -0.029311
+v 0.378305 -0.336012 -0.017152
+v 0.378305 -0.324876 0.000118
+v 0.377731 -0.391071 -0.017152
+v 0.378305 -0.336012 -0.017152
+v 0.377731 -0.391071 -0.017152
+v 0.311310 -0.355018 0.017389
+v 0.310312 -0.358745 0.000118
+v 0.327714 -0.313071 0.017389
+v 0.311310 -0.355018 0.017389
+v 0.330597 -0.302315 0.000118
+v 0.327714 -0.313071 0.017389
+v 0.327714 -0.313071 -0.017152
+v 0.330597 -0.302315 0.000118
+v 0.311310 -0.355018 -0.017152
+v 0.327714 -0.313071 -0.017152
+v 0.311310 -0.355018 -0.017152
+v 0.242925 -0.282077 0.027414
+v 0.239005 -0.286749 0.000118
+v 0.265699 -0.244765 0.027414
+v 0.242925 -0.282077 0.027414
+v 0.277012 -0.231283 0.000118
+v 0.265699 -0.244765 0.027414
+v 0.265699 -0.244765 -0.027178
+v 0.277012 -0.231283 0.000118
+v 0.242925 -0.282077 -0.027178
+v 0.265699 -0.244765 -0.027178
+v 0.242925 -0.282077 -0.027178
+v 0.188841 -0.254040 0.035601
+v 0.187464 -0.261848 0.000118
+v 0.190596 -0.172486 0.035601
+v 0.188841 -0.254040 0.035601
+v 0.194569 -0.149955 0.000118
+v 0.190596 -0.172486 0.035601
+v 0.190596 -0.172486 -0.035364
+v 0.194569 -0.149955 0.000118
+v 0.188841 -0.254040 -0.035364
+v 0.190596 -0.172486 -0.035364
+v 0.188841 -0.254040 -0.035364
+v 0.484897 -0.360973 0.000118
+v 0.478271 -0.390977 0.017389
+v 0.478607 -0.390977 0.000118
+v 0.474044 -0.342855 0.017389
+v 0.473074 -0.331762 0.000118
+v 0.474044 -0.342855 -0.017152
+v 0.478271 -0.390977 -0.017152
+v 0.098411 -0.232880 0.035601
+v 0.098411 -0.240808 0.000118
+v 0.098411 -0.144967 0.035601
+v 0.098411 -0.232880 0.035601
+v 0.098411 -0.122088 0.000118
+v 0.098411 -0.144967 0.035601
+v 0.098411 -0.144967 -0.035364
+v 0.098411 -0.122088 0.000118
+v 0.098411 -0.232880 -0.035364
+v 0.098411 -0.144967 -0.035364
+v 0.098411 -0.232880 -0.035364
+v -0.000118 -0.390977 0.478607
+v -0.017389 -0.390977 0.478271
+v -0.029547 -0.390983 0.429828
+v -0.000118 -0.390983 0.429848
+v -0.017389 -0.390977 0.478271
+v -0.017389 -0.342855 0.474044
+v -0.029547 -0.317820 0.429577
+v -0.029547 -0.390983 0.429828
+v -0.017389 -0.342855 0.474044
+v -0.000118 -0.331762 0.473074
+v -0.000118 -0.306727 0.429520
+v -0.029547 -0.317820 0.429577
+v 0.017152 -0.342855 0.474044
+v 0.029310 -0.317820 0.429577
+v 0.017152 -0.342855 0.474044
+v 0.017152 -0.390977 0.478271
+v 0.029310 -0.390983 0.429828
+v 0.029310 -0.317820 0.429577
+v 0.017152 -0.390977 0.478271
+v 0.029310 -0.390983 0.429828
+v -0.017389 -0.391071 0.377731
+v -0.000118 -0.391100 0.378066
+v -0.017389 -0.336012 0.378305
+v -0.017389 -0.391071 0.377731
+v -0.029547 -0.317820 0.429577
+v -0.000118 -0.306727 0.429520
+v -0.000118 -0.324876 0.378305
+v -0.017389 -0.336012 0.378305
+v -0.000118 -0.306727 0.429520
+v 0.029310 -0.317820 0.429577
+v 0.017152 -0.336012 0.378305
+v -0.000118 -0.324876 0.378305
+v 0.017152 -0.391071 0.377731
+v 0.017152 -0.336012 0.378305
+v 0.017152 -0.391071 0.377731
+v -0.017389 -0.355018 0.311310
+v -0.000118 -0.358745 0.310312
+v -0.017389 -0.313071 0.327714
+v -0.017389 -0.355018 0.311310
+v -0.000118 -0.302315 0.330597
+v -0.017389 -0.313071 0.327714
+v 0.017152 -0.313071 0.327714
+v -0.000118 -0.302315 0.330597
+v 0.017152 -0.355018 0.311310
+v 0.017152 -0.313071 0.327714
+v 0.017152 -0.355018 0.311310
+v -0.027414 -0.282077 0.242925
+v -0.000118 -0.286749 0.239005
+v -0.027414 -0.244765 0.265699
+v -0.027414 -0.282077 0.242925
+v -0.000118 -0.231283 0.277012
+v -0.027414 -0.244765 0.265699
+v 0.027178 -0.244765 0.265699
+v -0.000118 -0.231283 0.277012
+v 0.027178 -0.282077 0.242925
+v 0.027178 -0.244765 0.265699
+v 0.027178 -0.282077 0.242925
+v -0.035601 -0.254040 0.188841
+v -0.000118 -0.261848 0.187464
+v -0.035601 -0.172486 0.190596
+v -0.035601 -0.254040 0.188841
+v -0.000118 -0.149955 0.194569
+v -0.035601 -0.172486 0.190596
+v 0.035364 -0.172486 0.190596
+v -0.000118 -0.149955 0.194569
+v 0.035364 -0.254040 0.188841
+v 0.035364 -0.172486 0.190596
+v 0.035364 -0.254040 0.188841
+v -0.000118 -0.360973 0.484897
+v -0.017389 -0.390977 0.478271
+v -0.000118 -0.390977 0.478607
+v -0.017389 -0.342855 0.474044
+v -0.000118 -0.331762 0.473074
+v 0.017152 -0.342855 0.474044
+v 0.017152 -0.390977 0.478271
+v -0.035601 -0.232880 0.098411
+v -0.000118 -0.240808 0.098411
+v -0.035601 -0.144967 0.098411
+v -0.035601 -0.232880 0.098411
+v -0.000118 -0.122088 0.098411
+v -0.035601 -0.144967 0.098411
+v 0.035364 -0.144967 0.098411
+v -0.000118 -0.122088 0.098411
+v 0.035364 -0.232880 0.098411
+v 0.035364 -0.144967 0.098411
+v 0.035364 -0.232880 0.098411
+v -0.478607 -0.390977 -0.000118
+v -0.478271 -0.390977 -0.017389
+v -0.429828 -0.390983 -0.029547
+v -0.429848 -0.390983 -0.000118
+v -0.478271 -0.390977 -0.017389
+v -0.474044 -0.342855 -0.017389
+v -0.429577 -0.317820 -0.029547
+v -0.429828 -0.390983 -0.029547
+v -0.474044 -0.342855 -0.017389
+v -0.473074 -0.331762 -0.000118
+v -0.429520 -0.306727 -0.000118
+v -0.429577 -0.317820 -0.029547
+v -0.474044 -0.342855 0.017152
+v -0.429577 -0.317820 0.029310
+v -0.474044 -0.342855 0.017152
+v -0.478271 -0.390977 0.017152
+v -0.429828 -0.390983 0.029310
+v -0.429577 -0.317820 0.029310
+v -0.478271 -0.390977 0.017152
+v -0.429828 -0.390983 0.029310
+v -0.377731 -0.391071 -0.017389
+v -0.378066 -0.391100 -0.000118
+v -0.378305 -0.336012 -0.017389
+v -0.377731 -0.391071 -0.017389
+v -0.429577 -0.317820 -0.029547
+v -0.429520 -0.306727 -0.000118
+v -0.378305 -0.324876 -0.000118
+v -0.378305 -0.336012 -0.017389
+v -0.429520 -0.306727 -0.000118
+v -0.429577 -0.317820 0.029310
+v -0.378305 -0.336012 0.017152
+v -0.378305 -0.324876 -0.000118
+v -0.377731 -0.391071 0.017152
+v -0.378305 -0.336012 0.017152
+v -0.377731 -0.391071 0.017152
+v -0.311310 -0.355018 -0.017389
+v -0.310312 -0.358745 -0.000118
+v -0.327714 -0.313071 -0.017389
+v -0.311310 -0.355018 -0.017389
+v -0.330597 -0.302315 -0.000118
+v -0.327714 -0.313071 -0.017389
+v -0.327714 -0.313071 0.017152
+v -0.330597 -0.302315 -0.000118
+v -0.311310 -0.355018 0.017152
+v -0.327714 -0.313071 0.017152
+v -0.311310 -0.355018 0.017152
+v -0.242925 -0.282077 -0.027414
+v -0.239005 -0.286749 -0.000118
+v -0.265699 -0.244765 -0.027414
+v -0.242925 -0.282077 -0.027414
+v -0.277012 -0.231283 -0.000118
+v -0.265699 -0.244765 -0.027414
+v -0.265699 -0.244765 0.027178
+v -0.277012 -0.231283 -0.000118
+v -0.242925 -0.282077 0.027178
+v -0.265699 -0.244765 0.027178
+v -0.242925 -0.282077 0.027178
+v -0.188841 -0.254040 -0.035601
+v -0.187464 -0.261848 -0.000118
+v -0.190596 -0.172486 -0.035601
+v -0.188841 -0.254040 -0.035601
+v -0.194569 -0.149955 -0.000118
+v -0.190596 -0.172486 -0.035601
+v -0.190596 -0.172486 0.035364
+v -0.194569 -0.149955 -0.000118
+v -0.188841 -0.254040 0.035364
+v -0.190596 -0.172486 0.035364
+v -0.188841 -0.254040 0.035364
+v -0.484897 -0.360973 -0.000118
+v -0.478271 -0.390977 -0.017389
+v -0.478607 -0.390977 -0.000118
+v -0.474044 -0.342855 -0.017389
+v -0.473074 -0.331762 -0.000118
+v -0.474044 -0.342855 0.017152
+v -0.478271 -0.390977 0.017152
+v -0.098411 -0.232880 -0.035601
+v -0.098411 -0.240808 -0.000118
+v -0.098411 -0.144967 -0.035601
+v -0.098411 -0.232880 -0.035601
+v -0.098411 -0.122088 -0.000118
+v -0.098411 -0.144967 -0.035601
+v -0.098411 -0.144967 0.035364
+v -0.098411 -0.122088 -0.000118
+v -0.098411 -0.232880 0.035364
+v -0.098411 -0.144967 0.035364
+v -0.098411 -0.232880 0.035364
+v 0.000000 -0.094464 0.000000
+v 0.043796 -0.094464 0.105844
+v 0.105811 -0.094464 0.043875
+v -0.043875 -0.094464 0.105811
+v -0.105844 -0.094464 0.043796
+v -0.105811 -0.094464 -0.043875
+v -0.043796 -0.094464 -0.105844
+v 0.043875 -0.094464 -0.105811
+v 0.105844 -0.094464 -0.043796
+v 0.043796 -0.255563 0.105844
+v 0.105811 -0.255563 0.043875
+v 0.105811 -0.094464 0.043875
+v 0.043796 -0.094464 0.105844
+v -0.043875 -0.255563 0.105811
+v 0.043796 -0.255563 0.105844
+v 0.043796 -0.094464 0.105844
+v -0.043875 -0.094464 0.105811
+v -0.105844 -0.255563 0.043796
+v -0.043875 -0.255563 0.105811
+v -0.043875 -0.094464 0.105811
+v -0.105844 -0.094464 0.043796
+v -0.105811 -0.255563 -0.043875
+v -0.105844 -0.255563 0.043796
+v -0.105844 -0.094464 0.043796
+v -0.105811 -0.094464 -0.043875
+v -0.043796 -0.255563 -0.105844
+v -0.105811 -0.255563 -0.043875
+v -0.105811 -0.094464 -0.043875
+v -0.043796 -0.094464 -0.105844
+v 0.043875 -0.255563 -0.105811
+v -0.043796 -0.255563 -0.105844
+v -0.043796 -0.094464 -0.105844
+v 0.043875 -0.094464 -0.105811
+v 0.105844 -0.255563 -0.043796
+v 0.043875 -0.255563 -0.105811
+v 0.043875 -0.094464 -0.105811
+v 0.105844 -0.094464 -0.043796
+v 0.105811 -0.255563 0.043875
+v 0.105844 -0.255563 -0.043796
+v 0.105844 -0.094464 -0.043796
+v 0.105811 -0.094464 0.043875
+v 0.000000 -0.255563 0.000000
+v 0.105811 -0.255563 0.043875
+v 0.043796 -0.255563 0.105844
+v -0.043875 -0.255563 0.105811
+v -0.105844 -0.255563 0.043796
+v -0.105811 -0.255563 -0.043875
+v -0.043796 -0.255563 -0.105844
+v 0.043875 -0.255563 -0.105811
+v 0.105844 -0.255563 -0.043796
+v -0.275954 0.604340 0.275954
+v -0.275954 0.604340 -0.275954
+v -0.275954 0.612392 -0.275954
+v -0.275954 0.612392 0.275954
+v -0.275954 0.604340 -0.275954
+v 0.275954 0.604340 -0.275954
+v 0.275954 0.612392 -0.275954
+v -0.275954 0.612392 -0.275954
+v 0.275954 0.604340 -0.275954
+v 0.275954 0.604340 0.275954
+v 0.275954 0.612392 0.275954
+v 0.275954 0.612392 -0.275954
+v 0.275954 0.604340 0.275954
+v -0.275954 0.604340 0.275954
+v -0.275954 0.612392 0.275954
+v 0.275954 0.612392 0.275954
+v -0.275954 0.612392 0.275954
+v -0.275954 0.612392 -0.275954
+v -0.284007 0.611587 -0.284007
+v -0.284007 0.611587 0.284007
+v -0.275954 0.612392 -0.275954
+v 0.275954 0.612392 -0.275954
+v 0.284007 0.611587 -0.284007
+v -0.284007 0.611587 -0.284007
+v 0.275954 0.612392 -0.275954
+v 0.275954 0.612392 0.275954
+v 0.284007 0.611587 0.284007
+v 0.284007 0.611587 -0.284007
+v 0.275954 0.612392 0.275954
+v -0.275954 0.612392 0.275954
+v -0.284007 0.611587 0.284007
+v 0.284007 0.611587 0.284007
+v -0.284007 0.611587 0.284007
+v -0.284007 0.611587 -0.284007
+v -0.284007 0.603535 -0.284007
+v -0.284007 0.603535 0.284007
+v -0.284007 0.611587 -0.284007
+v 0.284007 0.611587 -0.284007
+v 0.284007 0.603535 -0.284007
+v -0.284007 0.603535 -0.284007
+v 0.284007 0.611587 -0.284007
+v 0.284007 0.611587 0.284007
+v 0.284007 0.603535 0.284007
+v 0.284007 0.603535 -0.284007
+v 0.284007 0.611587 0.284007
+v -0.284007 0.611587 0.284007
+v -0.284007 0.603535 0.284007
+v 0.284007 0.603535 0.284007
+v -0.507297 0.549194 0.507297
+v 0.507297 0.549194 0.507297
+v 0.507297 0.550000 0.507297
+v -0.507297 0.550000 0.507297
+v 0.507297 0.549194 0.507297
+v 0.507297 0.549194 -0.507297
+v 0.507297 0.550000 -0.507297
+v 0.507297 0.550000 0.507297
+v 0.507297 0.549194 -0.507297
+v -0.507297 0.549194 -0.507297
+v -0.507297 0.550000 -0.507297
+v 0.507297 0.550000 -0.507297
+v -0.507297 0.549194 -0.507297
+v -0.507297 0.549194 0.507297
+v -0.507297 0.550000 0.507297
+v -0.507297 0.550000 -0.507297
+v 0.507297 0.558052 0.507297
+v -0.507297 0.558052 0.507297
+v 0.507297 0.558052 -0.507297
+v 0.507297 0.558052 0.507297
+v -0.507297 0.558052 -0.507297
+v 0.507297 0.558052 -0.507297
+v -0.507297 0.558052 0.507297
+v -0.507297 0.558052 -0.507297
+v 0.499245 0.566104 0.499245
+v -0.499245 0.566104 0.499245
+v 0.499245 0.566104 -0.499245
+v 0.499245 0.566104 0.499245
+v -0.499245 0.566104 -0.499245
+v 0.499245 0.566104 -0.499245
+v -0.499245 0.566104 0.499245
+v -0.499245 0.566104 -0.499245
+v 0.499245 0.574157 0.499245
+v -0.499245 0.574157 0.499245
+v 0.499245 0.574157 -0.499245
+v 0.499245 0.574157 0.499245
+v -0.499245 0.574157 -0.499245
+v 0.499245 0.574157 -0.499245
+v -0.499245 0.574157 0.499245
+v -0.499245 0.574157 -0.499245
+v 0.491193 0.582209 0.491193
+v -0.491193 0.582209 0.491193
+v 0.491193 0.582209 -0.491193
+v 0.491193 0.582209 0.491193
+v -0.491193 0.582209 -0.491193
+v 0.491193 0.582209 -0.491193
+v -0.491193 0.582209 0.491193
+v -0.491193 0.582209 -0.491193
+v -0.491193 0.582209 0.491193
+v 0.491193 0.582209 0.491193
+v 0.483140 0.583014 0.483140
+v -0.483140 0.583014 0.483140
+v 0.491193 0.582209 0.491193
+v 0.491193 0.582209 -0.491193
+v 0.483140 0.583014 -0.483140
+v 0.483140 0.583014 0.483140
+v 0.491193 0.582209 -0.491193
+v -0.491193 0.582209 -0.491193
+v -0.483140 0.583014 -0.483140
+v 0.483140 0.583014 -0.483140
+v -0.491193 0.582209 -0.491193
+v -0.491193 0.582209 0.491193
+v -0.483140 0.583014 0.483140
+v -0.483140 0.583014 -0.483140
+v -0.314041 0.591939 -0.314041
+v -0.314041 0.591939 0.314041
+v 0.314041 0.591939 -0.314041
+v -0.314041 0.591939 -0.314041
+v 0.314041 0.591939 0.314041
+v 0.314041 0.591939 -0.314041
+v -0.314041 0.591939 0.314041
+v 0.314041 0.591939 0.314041
+v -0.322094 0.591134 -0.322094
+v -0.322094 0.591134 0.322094
+v 0.322094 0.591134 -0.322094
+v -0.322094 0.591134 -0.322094
+v 0.322094 0.591134 0.322094
+v 0.322094 0.591134 -0.322094
+v -0.322094 0.591134 0.322094
+v 0.322094 0.591134 0.322094
+v -0.322094 0.583082 -0.322094
+v -0.322094 0.583082 0.322094
+v 0.322094 0.583082 -0.322094
+v -0.322094 0.583082 -0.322094
+v 0.322094 0.583082 0.322094
+v 0.322094 0.583082 -0.322094
+v -0.322094 0.583082 0.322094
+v 0.322094 0.583082 0.322094
+v -0.322094 0.583082 0.322094
+v -0.322094 0.583082 -0.322094
+v -0.483140 0.575029 -0.483140
+v -0.483140 0.575029 0.483140
+v -0.322094 0.583082 -0.322094
+v 0.322094 0.583082 -0.322094
+v 0.483140 0.575029 -0.483140
+v -0.483140 0.575029 -0.483140
+v 0.322094 0.583082 -0.322094
+v 0.322094 0.583082 0.322094
+v 0.483140 0.575029 0.483140
+v 0.483140 0.575029 -0.483140
+v 0.322094 0.583082 0.322094
+v -0.322094 0.583082 0.322094
+v -0.483140 0.575029 0.483140
+v 0.483140 0.575029 0.483140
+v -0.483140 0.575029 0.483140
+v -0.483140 0.575029 -0.483140
+v -0.483140 0.583014 -0.483140
+v -0.483140 0.583014 0.483140
+v -0.483140 0.575029 -0.483140
+v 0.483140 0.575029 -0.483140
+v 0.483140 0.583014 -0.483140
+v -0.483140 0.583014 -0.483140
+v 0.483140 0.575029 -0.483140
+v 0.483140 0.575029 0.483140
+v 0.483140 0.583014 0.483140
+v 0.483140 0.583014 -0.483140
+v 0.483140 0.575029 0.483140
+v -0.483140 0.575029 0.483140
+v -0.483140 0.583014 0.483140
+v 0.483140 0.583014 0.483140
+v 0.275954 0.604340 -0.275954
+v -0.275954 0.604340 -0.275954
+v -0.275954 0.604340 0.275954
+v 0.275954 0.604340 0.275954
+v 0.507297 0.549194 -0.507297
+v 0.507297 0.549194 0.507297
+v -0.507297 0.549194 0.507297
+v -0.507297 0.549194 -0.507297
+v 0.061122 0.493612 0.044408
+v 0.075551 0.493612 0.000000
+v 0.153763 0.549783 0.000000
+v 0.124397 0.549782 0.090379
+v 0.023346 0.493612 0.071853
+v 0.047515 0.549782 0.146237
+v -0.023346 0.493612 0.071853
+v -0.047515 0.549782 0.146237
+v -0.061122 0.493612 0.044408
+v -0.124396 0.549782 0.090380
+v -0.075551 0.493612 0.000000
+v -0.153763 0.549783 0.000000
+v -0.061122 0.493612 -0.044407
+v -0.124397 0.549783 -0.090379
+v -0.023346 0.493612 -0.071853
+v -0.047515 0.549783 -0.146237
+v 0.023346 0.493612 -0.071853
+v 0.047515 0.549783 -0.146237
+v 0.061122 0.493612 -0.044407
+v 0.124396 0.549783 -0.090379
+v 0.039643 0.457110 0.028802
+v 0.049002 0.457110 0.000000
+v 0.015142 0.457110 0.046603
+v -0.015142 0.457110 0.046603
+v -0.039643 0.457110 0.028802
+v -0.049002 0.457110 0.000000
+v -0.039643 0.457110 -0.028802
+v -0.015142 0.457110 -0.046603
+v 0.015142 0.457110 -0.046603
+v 0.039643 0.457110 -0.028802
+v 0.065534 -0.100432 0.047613
+v 0.081005 -0.100432 0.000000
+v 0.081005 -0.082613 0.000000
+v 0.065534 -0.082613 0.047613
+v 0.025032 -0.100432 0.077040
+v 0.065534 -0.100432 0.047613
+v 0.065534 -0.082613 0.047613
+v 0.025032 -0.082613 0.077040
+v -0.025032 -0.100432 0.077040
+v 0.025032 -0.100432 0.077040
+v 0.025032 -0.082613 0.077040
+v -0.025032 -0.082613 0.077040
+v -0.065534 -0.100432 0.047613
+v -0.025032 -0.100432 0.077040
+v -0.025032 -0.082613 0.077040
+v -0.065534 -0.082613 0.047613
+v -0.081005 -0.100432 0.000000
+v -0.065534 -0.100432 0.047613
+v -0.065534 -0.082613 0.047613
+v -0.081005 -0.082613 0.000000
+v -0.065534 -0.100432 -0.047613
+v -0.081005 -0.100432 0.000000
+v -0.081005 -0.082613 0.000000
+v -0.065534 -0.082613 -0.047613
+v -0.025032 -0.100432 -0.077040
+v -0.065534 -0.100432 -0.047613
+v -0.065534 -0.082613 -0.047613
+v -0.025032 -0.082613 -0.077040
+v 0.025032 -0.100432 -0.077040
+v -0.025032 -0.100432 -0.077040
+v -0.025032 -0.082613 -0.077040
+v 0.025032 -0.082613 -0.077040
+v 0.065534 -0.100432 -0.047613
+v 0.025032 -0.100432 -0.077040
+v 0.025032 -0.082613 -0.077040
+v 0.065534 -0.082613 -0.047613
+v 0.081005 -0.100432 0.000000
+v 0.065534 -0.100432 -0.047613
+v 0.065534 -0.082613 -0.047613
+v 0.081005 -0.082613 0.000000
+v 0.065534 -0.082613 0.047613
+v 0.081005 -0.082613 0.000000
+v 0.062269 -0.081722 0.000000
+v 0.050377 -0.081722 0.036601
+v 0.025032 -0.082613 0.077040
+v 0.065534 -0.082613 0.047613
+v 0.050377 -0.081722 0.036601
+v 0.019242 -0.081722 0.059221
+v -0.025032 -0.082613 0.077040
+v 0.025032 -0.082613 0.077040
+v 0.019242 -0.081722 0.059221
+v -0.019242 -0.081722 0.059221
+v -0.065534 -0.082613 0.047613
+v -0.025032 -0.082613 0.077040
+v -0.019242 -0.081722 0.059221
+v -0.050377 -0.081722 0.036601
+v -0.081005 -0.082613 0.000000
+v -0.065534 -0.082613 0.047613
+v -0.050377 -0.081722 0.036601
+v -0.062269 -0.081722 0.000000
+v -0.065534 -0.082613 -0.047613
+v -0.081005 -0.082613 0.000000
+v -0.062269 -0.081722 0.000000
+v -0.050377 -0.081722 -0.036601
+v -0.025032 -0.082613 -0.077040
+v -0.065534 -0.082613 -0.047613
+v -0.050377 -0.081722 -0.036601
+v -0.019242 -0.081722 -0.059221
+v 0.025032 -0.082613 -0.077040
+v -0.025032 -0.082613 -0.077040
+v -0.019242 -0.081722 -0.059221
+v 0.019242 -0.081722 -0.059221
+v 0.065534 -0.082613 -0.047613
+v 0.025032 -0.082613 -0.077040
+v 0.019242 -0.081722 -0.059221
+v 0.050377 -0.081722 -0.036601
+v 0.081005 -0.082613 0.000000
+v 0.065534 -0.082613 -0.047613
+v 0.050377 -0.081722 -0.036601
+v 0.062269 -0.081722 0.000000
+v 0.050377 -0.081722 0.036601
+v 0.062269 -0.081722 0.000000
+v 0.062269 -0.063904 0.000000
+v 0.050377 -0.063904 0.036601
+v 0.019242 -0.081722 0.059221
+v 0.050377 -0.081722 0.036601
+v 0.050377 -0.063904 0.036601
+v 0.019242 -0.063904 0.059221
+v -0.019242 -0.081722 0.059221
+v 0.019242 -0.081722 0.059221
+v 0.019242 -0.063904 0.059221
+v -0.019242 -0.063904 0.059221
+v -0.050377 -0.081722 0.036601
+v -0.019242 -0.081722 0.059221
+v -0.019242 -0.063904 0.059221
+v -0.050377 -0.063904 0.036601
+v -0.062269 -0.081722 0.000000
+v -0.050377 -0.081722 0.036601
+v -0.050377 -0.063904 0.036601
+v -0.062269 -0.063904 0.000000
+v -0.050377 -0.081722 -0.036601
+v -0.062269 -0.081722 0.000000
+v -0.062269 -0.063904 0.000000
+v -0.050377 -0.063904 -0.036601
+v -0.019242 -0.081722 -0.059221
+v -0.050377 -0.081722 -0.036601
+v -0.050377 -0.063904 -0.036601
+v -0.019242 -0.063904 -0.059221
+v 0.019242 -0.081722 -0.059221
+v -0.019242 -0.081722 -0.059221
+v -0.019242 -0.063904 -0.059221
+v 0.019242 -0.063904 -0.059221
+v 0.050377 -0.081722 -0.036601
+v 0.019242 -0.081722 -0.059221
+v 0.019242 -0.063904 -0.059221
+v 0.050377 -0.063904 -0.036601
+v 0.062269 -0.081722 0.000000
+v 0.050377 -0.081722 -0.036601
+v 0.050377 -0.063904 -0.036601
+v 0.062269 -0.063904 0.000000
+v 0.050377 -0.063904 0.036601
+v 0.062269 -0.063904 0.000000
+v 0.071637 -0.059449 0.000000
+v 0.057955 -0.059449 0.042107
+v 0.019242 -0.063904 0.059221
+v 0.050377 -0.063904 0.036601
+v 0.057955 -0.059449 0.042107
+v 0.022137 -0.059449 0.068131
+v -0.019242 -0.063904 0.059221
+v 0.019242 -0.063904 0.059221
+v 0.022137 -0.059449 0.068131
+v -0.022137 -0.059449 0.068131
+v -0.050377 -0.063904 0.036601
+v -0.019242 -0.063904 0.059221
+v -0.022137 -0.059449 0.068131
+v -0.057955 -0.059449 0.042107
+v -0.062269 -0.063904 0.000000
+v -0.050377 -0.063904 0.036601
+v -0.057955 -0.059449 0.042107
+v -0.071637 -0.059449 0.000000
+v -0.050377 -0.063904 -0.036601
+v -0.062269 -0.063904 0.000000
+v -0.071637 -0.059449 0.000000
+v -0.057955 -0.059449 -0.042107
+v -0.019242 -0.063904 -0.059221
+v -0.050377 -0.063904 -0.036601
+v -0.057955 -0.059449 -0.042107
+v -0.022137 -0.059449 -0.068131
+v 0.019242 -0.063904 -0.059221
+v -0.019242 -0.063904 -0.059221
+v -0.022137 -0.059449 -0.068131
+v 0.022137 -0.059449 -0.068131
+v 0.050377 -0.063904 -0.036601
+v 0.019242 -0.063904 -0.059221
+v 0.022137 -0.059449 -0.068131
+v 0.057955 -0.059449 -0.042107
+v 0.062269 -0.063904 0.000000
+v 0.050377 -0.063904 -0.036601
+v 0.057955 -0.059449 -0.042107
+v 0.071637 -0.059449 0.000000
+v 0.057955 -0.059449 0.042107
+v 0.071637 -0.059449 0.000000
+v 0.071637 -0.050540 0.000000
+v 0.057955 -0.050540 0.042107
+v 0.022137 -0.059449 0.068131
+v 0.057955 -0.059449 0.042107
+v 0.057955 -0.050540 0.042107
+v 0.022137 -0.050540 0.068131
+v -0.022137 -0.059449 0.068131
+v 0.022137 -0.059449 0.068131
+v 0.022137 -0.050540 0.068131
+v -0.022137 -0.050540 0.068131
+v -0.057955 -0.059449 0.042107
+v -0.022137 -0.059449 0.068131
+v -0.022137 -0.050540 0.068131
+v -0.057955 -0.050540 0.042107
+v -0.071637 -0.059449 0.000000
+v -0.057955 -0.059449 0.042107
+v -0.057955 -0.050540 0.042107
+v -0.071637 -0.050540 0.000000
+v -0.057955 -0.059449 -0.042107
+v -0.071637 -0.059449 0.000000
+v -0.071637 -0.050540 0.000000
+v -0.057955 -0.050540 -0.042107
+v -0.022137 -0.059449 -0.068131
+v -0.057955 -0.059449 -0.042107
+v -0.057955 -0.050540 -0.042107
+v -0.022137 -0.050540 -0.068131
+v 0.022137 -0.059449 -0.068131
+v -0.022137 -0.059449 -0.068131
+v -0.022137 -0.050540 -0.068131
+v 0.022137 -0.050540 -0.068131
+v 0.057955 -0.059449 -0.042107
+v 0.022137 -0.059449 -0.068131
+v 0.022137 -0.050540 -0.068131
+v 0.057955 -0.050540 -0.042107
+v 0.071637 -0.059449 0.000000
+v 0.057955 -0.059449 -0.042107
+v 0.057955 -0.050540 -0.042107
+v 0.071637 -0.050540 0.000000
+v 0.057955 -0.050540 0.042107
+v 0.071637 -0.050540 0.000000
+v 0.062269 -0.046085 0.000000
+v 0.050377 -0.046085 0.036601
+v 0.022137 -0.050540 0.068131
+v 0.057955 -0.050540 0.042107
+v 0.050377 -0.046085 0.036601
+v 0.019242 -0.046085 0.059221
+v -0.022137 -0.050540 0.068131
+v 0.022137 -0.050540 0.068131
+v 0.019242 -0.046085 0.059221
+v -0.019242 -0.046085 0.059221
+v -0.057955 -0.050540 0.042107
+v -0.022137 -0.050540 0.068131
+v -0.019242 -0.046085 0.059221
+v -0.050377 -0.046085 0.036601
+v -0.071637 -0.050540 0.000000
+v -0.057955 -0.050540 0.042107
+v -0.050377 -0.046085 0.036601
+v -0.062269 -0.046085 0.000000
+v -0.057955 -0.050540 -0.042107
+v -0.071637 -0.050540 0.000000
+v -0.062269 -0.046085 0.000000
+v -0.050377 -0.046085 -0.036601
+v -0.022137 -0.050540 -0.068131
+v -0.057955 -0.050540 -0.042107
+v -0.050377 -0.046085 -0.036601
+v -0.019242 -0.046085 -0.059221
+v 0.022137 -0.050540 -0.068131
+v -0.022137 -0.050540 -0.068131
+v -0.019242 -0.046085 -0.059221
+v 0.019242 -0.046085 -0.059221
+v 0.057955 -0.050540 -0.042107
+v 0.022137 -0.050540 -0.068131
+v 0.019242 -0.046085 -0.059221
+v 0.050377 -0.046085 -0.036601
+v 0.071637 -0.050540 0.000000
+v 0.057955 -0.050540 -0.042107
+v 0.050377 -0.046085 -0.036601
+v 0.062269 -0.046085 0.000000
+v 0.050377 -0.046085 0.036601
+v 0.062269 -0.046085 0.000000
+v 0.062269 -0.037015 0.000000
+v 0.050377 -0.037015 0.036601
+v 0.019242 -0.046085 0.059221
+v 0.050377 -0.046085 0.036601
+v 0.050377 -0.037015 0.036601
+v 0.019242 -0.037015 0.059221
+v -0.019242 -0.046085 0.059221
+v 0.019242 -0.046085 0.059221
+v 0.019242 -0.037015 0.059221
+v -0.019242 -0.037015 0.059221
+v -0.050377 -0.046085 0.036601
+v -0.019242 -0.046085 0.059221
+v -0.019242 -0.037015 0.059221
+v -0.050377 -0.037015 0.036601
+v -0.062269 -0.046085 0.000000
+v -0.050377 -0.046085 0.036601
+v -0.050377 -0.037015 0.036601
+v -0.062269 -0.037015 0.000000
+v -0.050377 -0.046085 -0.036601
+v -0.062269 -0.046085 0.000000
+v -0.062269 -0.037015 0.000000
+v -0.050377 -0.037015 -0.036601
+v -0.019242 -0.046085 -0.059221
+v -0.050377 -0.046085 -0.036601
+v -0.050377 -0.037015 -0.036601
+v -0.019242 -0.037015 -0.059221
+v 0.019242 -0.046085 -0.059221
+v -0.019242 -0.046085 -0.059221
+v -0.019242 -0.037015 -0.059221
+v 0.019242 -0.037015 -0.059221
+v 0.050377 -0.046085 -0.036601
+v 0.019242 -0.046085 -0.059221
+v 0.019242 -0.037015 -0.059221
+v 0.050377 -0.037015 -0.036601
+v 0.062269 -0.046085 0.000000
+v 0.050377 -0.046085 -0.036601
+v 0.050377 -0.037015 -0.036601
+v 0.062269 -0.037015 0.000000
+v 0.035221 0.414309 0.025590
+v 0.043536 0.414309 0.000000
+v 0.049002 0.457110 0.000000
+v 0.039643 0.457110 0.028802
+v 0.013453 0.414309 0.041405
+v 0.015142 0.457110 0.046603
+v -0.013453 0.414309 0.041405
+v -0.015142 0.457110 0.046603
+v -0.035221 0.414309 0.025590
+v -0.039643 0.457110 0.028802
+v -0.043536 0.414309 0.000000
+v -0.049002 0.457110 0.000000
+v -0.035221 0.414309 -0.025590
+v -0.039643 0.457110 -0.028802
+v -0.013453 0.414309 -0.041405
+v -0.015142 0.457110 -0.046603
+v 0.013453 0.414309 -0.041405
+v 0.015142 0.457110 -0.046603
+v 0.035221 0.414309 -0.025590
+v 0.013453 0.414309 -0.041405
+v 0.015142 0.457110 -0.046603
+v 0.039643 0.457110 -0.028802
+v 0.051175 0.223460 0.037181
+v 0.063256 0.223460 0.000000
+v 0.019547 0.223460 0.060160
+v -0.019547 0.223460 0.060160
+v -0.051175 0.223460 0.037181
+v -0.063256 0.223460 0.000000
+v -0.051175 0.223460 -0.037181
+v -0.019547 0.223460 -0.060160
+v 0.019547 0.223460 -0.060160
+v 0.051176 0.223460 -0.037181
+v 0.019547 0.223460 -0.060160
+v 0.076220 0.102045 0.055377
+v 0.094213 0.102045 0.000000
+v 0.029113 0.102045 0.089602
+v -0.029113 0.102045 0.089602
+v -0.076220 0.102045 0.055377
+v -0.094213 0.102045 0.000000
+v -0.076220 0.102045 -0.055377
+v -0.029113 0.102045 -0.089602
+v 0.029113 0.102045 -0.089602
+v 0.076220 0.102045 -0.055377
+v 0.029113 0.102045 -0.089602
+v 0.068919 -0.002139 0.050073
+v 0.085189 -0.002139 0.000000
+v 0.026325 -0.002139 0.081019
+v -0.026325 -0.002139 0.081019
+v -0.068919 -0.002139 0.050073
+v -0.085189 -0.002139 0.000000
+v -0.068919 -0.002139 -0.050073
+v -0.026325 -0.002139 -0.081019
+v 0.026325 -0.002139 -0.081019
+v 0.068919 -0.002139 -0.050073
+v 0.026325 -0.002139 -0.081019
+v 0.050377 -0.037015 0.036601
+v 0.062269 -0.037015 0.000000
+v 0.019242 -0.037015 0.059221
+v -0.019242 -0.037015 0.059221
+v -0.050377 -0.037015 0.036601
+v -0.062269 -0.037015 0.000000
+v -0.050377 -0.037015 -0.036601
+v -0.019242 -0.037015 -0.059221
+v 0.019242 -0.037015 -0.059221
+v 0.050377 -0.037015 -0.036601
+v 0.019242 -0.037015 -0.059221
+vt 0.017083 0.467481
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077277 0.475172
+vt 0.017498 0.425773
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.077301 0.425780
+vt 0.022716 0.366365
+vt 0.023914 0.320840
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077611 0.335458
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.141617 0.425888
+vt 0.141203 0.458853
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.077611 0.335458
+vt 0.077682 0.295421
+vt 0.140908 0.303558
+vt 0.140908 0.357917
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.140908 0.357917
+vt 0.140908 0.303558
+vt 0.141617 0.425888
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.223614 0.381380
+vt 0.233628 0.407934
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.187732 0.293268
+vt 0.203363 0.329596
+vt 0.203363 0.329596
+vt 0.187732 0.293268
+vt 0.223614 0.381380
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.308037 0.291333
+vt 0.324950 0.321248
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.264859 0.213261
+vt 0.279922 0.245271
+vt 0.279922 0.245271
+vt 0.264859 0.213261
+vt 0.308037 0.291333
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.377000 0.255623
+vt 0.378700 0.295995
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.367735 0.111762
+vt 0.372639 0.156040
+vt 0.372639 0.156040
+vt 0.367735 0.111762
+vt 0.377000 0.255623
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.393655 0.410963
+vt 0.467714 0.453591
+vt 0.467714 0.410963
+vt 0.348935 0.453591
+vt 0.321554 0.410963
+vt 0.348935 0.368334
+vt 0.467714 0.368334
+vt 0.486443 0.230599
+vt 0.486443 0.273314
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.486443 0.071872
+vt 0.486443 0.122067
+vt 0.486443 0.122067
+vt 0.486443 0.071872
+vt 0.486443 0.230599
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.017083 0.467481
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077277 0.475172
+vt 0.017498 0.425773
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.077301 0.425780
+vt 0.022716 0.366365
+vt 0.023914 0.320840
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077611 0.335458
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.141617 0.425888
+vt 0.141203 0.458853
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.077611 0.335458
+vt 0.077682 0.295421
+vt 0.140908 0.303558
+vt 0.140908 0.357917
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.140908 0.357917
+vt 0.140908 0.303558
+vt 0.141617 0.425888
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.223614 0.381380
+vt 0.233628 0.407934
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.187732 0.293268
+vt 0.203363 0.329596
+vt 0.203363 0.329596
+vt 0.187732 0.293268
+vt 0.223614 0.381380
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.308037 0.291333
+vt 0.324950 0.321248
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.264859 0.213261
+vt 0.279922 0.245271
+vt 0.279922 0.245271
+vt 0.264859 0.213261
+vt 0.308037 0.291333
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.377000 0.255623
+vt 0.378700 0.295995
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.367735 0.111762
+vt 0.372639 0.156040
+vt 0.372639 0.156040
+vt 0.367735 0.111762
+vt 0.377000 0.255623
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.393655 0.410963
+vt 0.467714 0.453591
+vt 0.467714 0.410963
+vt 0.348935 0.453591
+vt 0.321554 0.410963
+vt 0.348935 0.368334
+vt 0.467714 0.368334
+vt 0.486443 0.230599
+vt 0.486443 0.273314
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.486443 0.071872
+vt 0.486443 0.122067
+vt 0.486443 0.122067
+vt 0.486443 0.071872
+vt 0.486443 0.230599
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.017083 0.467481
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077277 0.475172
+vt 0.017498 0.425773
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.077301 0.425780
+vt 0.022716 0.366365
+vt 0.023914 0.320840
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077611 0.335458
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.141617 0.425888
+vt 0.141203 0.458853
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.077611 0.335458
+vt 0.077682 0.295421
+vt 0.140908 0.303558
+vt 0.140908 0.357917
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.140908 0.357917
+vt 0.140908 0.303558
+vt 0.141617 0.425888
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.223614 0.381380
+vt 0.233628 0.407934
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.187732 0.293268
+vt 0.203363 0.329596
+vt 0.203363 0.329596
+vt 0.187732 0.293268
+vt 0.223614 0.381380
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.308037 0.291333
+vt 0.324950 0.321248
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.264859 0.213261
+vt 0.279922 0.245271
+vt 0.279922 0.245271
+vt 0.264859 0.213261
+vt 0.308037 0.291333
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.377000 0.255623
+vt 0.378700 0.295995
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.367735 0.111762
+vt 0.372639 0.156040
+vt 0.372639 0.156040
+vt 0.367735 0.111762
+vt 0.377000 0.255623
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.393655 0.410963
+vt 0.467714 0.453591
+vt 0.467714 0.410963
+vt 0.348935 0.453591
+vt 0.321554 0.410963
+vt 0.348935 0.368334
+vt 0.467714 0.368334
+vt 0.486443 0.230599
+vt 0.486443 0.273314
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.486443 0.071872
+vt 0.486443 0.122067
+vt 0.486443 0.122067
+vt 0.486443 0.071872
+vt 0.486443 0.230599
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.017083 0.467481
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077277 0.475172
+vt 0.017498 0.425773
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.077301 0.425780
+vt 0.022716 0.366365
+vt 0.023914 0.320840
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.077611 0.335458
+vt 0.022716 0.366365
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.077611 0.335458
+vt 0.017498 0.425773
+vt 0.077301 0.425780
+vt 0.141617 0.425888
+vt 0.141203 0.458853
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.077611 0.335458
+vt 0.077682 0.295421
+vt 0.140908 0.303558
+vt 0.140908 0.357917
+vt 0.077682 0.295421
+vt 0.077611 0.335458
+vt 0.140908 0.357917
+vt 0.140908 0.303558
+vt 0.141617 0.425888
+vt 0.140908 0.357917
+vt 0.141617 0.425888
+vt 0.223614 0.381380
+vt 0.233628 0.407934
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.187732 0.293268
+vt 0.203363 0.329596
+vt 0.203363 0.329596
+vt 0.187732 0.293268
+vt 0.223614 0.381380
+vt 0.203363 0.329596
+vt 0.223614 0.381380
+vt 0.308037 0.291333
+vt 0.324950 0.321248
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.264859 0.213261
+vt 0.279922 0.245271
+vt 0.279922 0.245271
+vt 0.264859 0.213261
+vt 0.308037 0.291333
+vt 0.279922 0.245271
+vt 0.308037 0.291333
+vt 0.377000 0.255623
+vt 0.378700 0.295995
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.367735 0.111762
+vt 0.372639 0.156040
+vt 0.372639 0.156040
+vt 0.367735 0.111762
+vt 0.377000 0.255623
+vt 0.372639 0.156040
+vt 0.377000 0.255623
+vt 0.393655 0.410963
+vt 0.467714 0.453591
+vt 0.467714 0.410963
+vt 0.348935 0.453591
+vt 0.321554 0.410963
+vt 0.348935 0.368334
+vt 0.467714 0.368334
+vt 0.486443 0.230599
+vt 0.486443 0.273314
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.486443 0.071872
+vt 0.486443 0.122067
+vt 0.486443 0.122067
+vt 0.486443 0.071872
+vt 0.486443 0.230599
+vt 0.486443 0.122067
+vt 0.486443 0.230599
+vt 0.000000 1.000000
+vt 0.312949 0.385343
+vt 0.374010 0.385343
+vt 0.251887 0.385343
+vt 0.190825 0.385343
+vt 0.129763 0.385343
+vt 0.068702 0.385343
+vt 0.496134 0.385343
+vt 0.435072 0.385343
+vt 0.312949 0.498276
+vt 0.374010 0.498276
+vt 0.374010 0.385343
+vt 0.312949 0.385343
+vt 0.251887 0.498276
+vt 0.312949 0.498276
+vt 0.312949 0.385343
+vt 0.251887 0.385343
+vt 0.190825 0.498276
+vt 0.251887 0.498276
+vt 0.251887 0.385343
+vt 0.190825 0.385343
+vt 0.129763 0.498276
+vt 0.190825 0.498276
+vt 0.190825 0.385343
+vt 0.129763 0.385343
+vt 0.068702 0.498276
+vt 0.129763 0.498276
+vt 0.129763 0.385343
+vt 0.068702 0.385343
+vt 0.007640 0.498276
+vt 0.068702 0.498276
+vt 0.068702 0.385343
+vt 0.007640 0.385343
+vt 0.435072 0.498276
+vt 0.496134 0.498276
+vt 0.496134 0.385343
+vt 0.435072 0.385343
+vt 0.321935 0.273341
+vt 0.321962 0.201250
+vt 0.321962 0.201250
+vt 0.321935 0.273341
+vt 0.234927 0.237263
+vt 0.321935 0.273341
+vt 0.270940 0.324298
+vt 0.198849 0.324271
+vt 0.147891 0.273276
+vt 0.147918 0.201184
+vt 0.198914 0.150227
+vt 0.271005 0.150254
+vt 0.321962 0.201250
+vt 0.143227 0.361033
+vt 0.143227 0.144695
+vt 0.135916 0.138034
+vt 0.135916 0.368993
+vt 0.143227 0.144695
+vt 0.359565 0.144695
+vt 0.366875 0.138034
+vt 0.135916 0.138034
+vt 0.359565 0.144695
+vt 0.359565 0.361033
+vt 0.366875 0.368993
+vt 0.366875 0.138034
+vt 0.359565 0.361033
+vt 0.143227 0.361033
+vt 0.135916 0.368993
+vt 0.366875 0.368993
+vt 0.135916 0.368993
+vt 0.135916 0.138034
+vt 0.113352 0.114821
+vt 0.113352 0.390908
+vt 0.135916 0.138034
+vt 0.366875 0.138034
+vt 0.389439 0.114821
+vt 0.113352 0.114821
+vt 0.366875 0.138034
+vt 0.366875 0.368993
+vt 0.389439 0.390908
+vt 0.389439 0.114821
+vt 0.366875 0.368993
+vt 0.135916 0.368993
+vt 0.113352 0.390908
+vt 0.389439 0.390908
+vt 0.113352 0.390908
+vt 0.113352 0.114821
+vt 0.121903 0.123372
+vt 0.121903 0.382356
+vt 0.113352 0.114821
+vt 0.389439 0.114821
+vt 0.380888 0.123372
+vt 0.121903 0.123372
+vt 0.389439 0.114821
+vt 0.389439 0.390908
+vt 0.380888 0.382356
+vt 0.380888 0.123372
+vt 0.389439 0.390908
+vt 0.113352 0.390908
+vt 0.121903 0.382356
+vt 0.380888 0.382356
+vt 0.004820 0.499440
+vt 0.497971 0.499440
+vt 0.497971 0.499440
+vt 0.004820 0.499440
+vt 0.497971 0.499440
+vt 0.497971 0.006289
+vt 0.497971 0.006289
+vt 0.497971 0.499440
+vt 0.497971 0.006289
+vt 0.004820 0.006289
+vt 0.004820 0.006289
+vt 0.497971 0.006289
+vt 0.004820 0.006289
+vt 0.004820 0.499440
+vt 0.004820 0.499440
+vt 0.004820 0.006289
+vt 0.497971 0.499440
+vt 0.004820 0.499440
+vt 0.497971 0.006289
+vt 0.497971 0.499440
+vt 0.004820 0.006289
+vt 0.497971 0.006289
+vt 0.004820 0.499440
+vt 0.004820 0.006289
+vt 0.491654 0.493123
+vt 0.011137 0.493123
+vt 0.491654 0.012605
+vt 0.491654 0.493123
+vt 0.011137 0.012605
+vt 0.491654 0.012605
+vt 0.011137 0.493123
+vt 0.011137 0.012605
+vt 0.482370 0.483838
+vt 0.020421 0.483838
+vt 0.482370 0.021890
+vt 0.482370 0.483838
+vt 0.020421 0.021890
+vt 0.482370 0.021890
+vt 0.020421 0.483838
+vt 0.020421 0.021890
+vt 0.470567 0.472035
+vt 0.032224 0.472035
+vt 0.470567 0.033693
+vt 0.470567 0.472035
+vt 0.032224 0.033693
+vt 0.470567 0.033693
+vt 0.032224 0.472035
+vt 0.032224 0.033693
+vt 0.032224 0.472035
+vt 0.470567 0.472035
+vt 0.459013 0.460481
+vt 0.043778 0.460481
+vt 0.470567 0.472035
+vt 0.470567 0.033693
+vt 0.459013 0.045247
+vt 0.459013 0.460481
+vt 0.470567 0.033693
+vt 0.032224 0.033693
+vt 0.043778 0.045247
+vt 0.459013 0.045247
+vt 0.032224 0.033693
+vt 0.032224 0.472035
+vt 0.043778 0.460481
+vt 0.043778 0.045247
+vt 0.098754 0.100222
+vt 0.098754 0.405506
+vt 0.404037 0.100222
+vt 0.098754 0.100222
+vt 0.404037 0.405506
+vt 0.404037 0.100222
+vt 0.098754 0.405506
+vt 0.404037 0.405506
+vt 0.094840 0.096308
+vt 0.094840 0.409420
+vt 0.407951 0.096308
+vt 0.094840 0.096308
+vt 0.407951 0.409420
+vt 0.407951 0.096308
+vt 0.094840 0.409420
+vt 0.407951 0.409420
+vt 0.087012 0.088481
+vt 0.087012 0.417248
+vt 0.415779 0.088481
+vt 0.087012 0.088481
+vt 0.415779 0.417248
+vt 0.415779 0.088481
+vt 0.087012 0.417248
+vt 0.415779 0.417248
+vt 0.586243 0.413570
+vt 0.586243 0.086583
+vt 0.504496 0.004836
+vt 0.504496 0.495317
+vt 0.586243 0.086583
+vt 0.913231 0.086583
+vt 0.994978 0.004836
+vt 0.504496 0.004836
+vt 0.913231 0.086583
+vt 0.913231 0.413570
+vt 0.994978 0.495317
+vt 0.994978 0.004836
+vt 0.913231 0.413570
+vt 0.586243 0.413570
+vt 0.504496 0.495317
+vt 0.994978 0.495317
+vt 0.052083 0.452177
+vt 0.052083 0.053552
+vt 0.043778 0.045247
+vt 0.043778 0.460481
+vt 0.052083 0.053552
+vt 0.450708 0.053552
+vt 0.459013 0.045247
+vt 0.043778 0.045247
+vt 0.450708 0.053552
+vt 0.450708 0.452177
+vt 0.459013 0.460481
+vt 0.459013 0.045247
+vt 0.450708 0.452177
+vt 0.052083 0.452177
+vt 0.043778 0.460481
+vt 0.459013 0.460481
+vt 0.997798 0.502710
+vt 0.503545 0.502710
+vt 0.503545 0.996963
+vt 0.997798 0.996963
+vt 0.497971 0.006289
+vt 0.497971 0.499440
+vt 0.004820 0.499440
+vt 0.004820 0.006289
+vt 0.366183 0.254192
+vt 0.376207 0.221754
+vt 0.430543 0.221754
+vt 0.410142 0.287774
+vt 0.339940 0.274240
+vt 0.356731 0.328576
+vt 0.307501 0.274241
+vt 0.290711 0.328576
+vt 0.281258 0.254192
+vt 0.237300 0.287774
+vt 0.271234 0.221754
+vt 0.216899 0.221754
+vt 0.281258 0.189315
+vt 0.237300 0.155734
+vt 0.307501 0.169267
+vt 0.290711 0.114932
+vt 0.339940 0.169267
+vt 0.356731 0.114932
+vt 0.366183 0.189315
+vt 0.410142 0.155734
+vt 0.351262 0.242793
+vt 0.357763 0.221754
+vt 0.334240 0.255796
+vt 0.313201 0.255796
+vt 0.296180 0.242793
+vt 0.289678 0.221754
+vt 0.296180 0.200714
+vt 0.313201 0.187711
+vt 0.334240 0.187711
+vt 0.351262 0.200714
+vt 0.350121 0.494170
+vt 0.396949 0.494170
+vt 0.396949 0.469050
+vt 0.350121 0.469050
+vt 0.300793 0.494170
+vt 0.350121 0.494170
+vt 0.350121 0.469050
+vt 0.300793 0.469050
+vt 0.249801 0.494170
+vt 0.300793 0.494170
+vt 0.300793 0.469050
+vt 0.249801 0.469050
+vt 0.200473 0.494170
+vt 0.249801 0.494170
+vt 0.249801 0.469050
+vt 0.200473 0.469050
+vt 0.153645 0.494170
+vt 0.200473 0.494170
+vt 0.200473 0.469050
+vt 0.153645 0.469050
+vt 0.106818 0.494170
+vt 0.153645 0.494170
+vt 0.153645 0.469050
+vt 0.106818 0.469050
+vt 0.057489 0.494170
+vt 0.106818 0.494170
+vt 0.106818 0.469050
+vt 0.057489 0.469050
+vt 0.006498 0.494170
+vt 0.057489 0.494170
+vt 0.057489 0.469050
+vt 0.006498 0.469050
+vt 0.443776 0.494170
+vt 0.493105 0.494170
+vt 0.493105 0.469050
+vt 0.443776 0.469050
+vt 0.396949 0.494170
+vt 0.443776 0.494170
+vt 0.443776 0.469050
+vt 0.396949 0.469050
+vt 0.350121 0.469050
+vt 0.396949 0.469050
+vt 0.396949 0.467794
+vt 0.350121 0.467794
+vt 0.300793 0.469050
+vt 0.350121 0.469050
+vt 0.350121 0.467794
+vt 0.300793 0.467794
+vt 0.249801 0.469050
+vt 0.300793 0.469050
+vt 0.300793 0.467794
+vt 0.249801 0.467794
+vt 0.200473 0.469050
+vt 0.249801 0.469050
+vt 0.249801 0.467794
+vt 0.200473 0.467794
+vt 0.153645 0.469050
+vt 0.200473 0.469050
+vt 0.200473 0.467794
+vt 0.153645 0.467794
+vt 0.106818 0.469050
+vt 0.153645 0.469050
+vt 0.153645 0.467794
+vt 0.106818 0.467794
+vt 0.057489 0.469050
+vt 0.106818 0.469050
+vt 0.106818 0.467794
+vt 0.057489 0.467794
+vt 0.006498 0.469050
+vt 0.057489 0.469050
+vt 0.057489 0.467794
+vt 0.006498 0.467794
+vt 0.443776 0.469050
+vt 0.493105 0.469050
+vt 0.493105 0.467794
+vt 0.443776 0.467794
+vt 0.396949 0.469050
+vt 0.443776 0.469050
+vt 0.443776 0.467794
+vt 0.396949 0.467794
+vt 0.350121 0.467794
+vt 0.396949 0.467794
+vt 0.396949 0.442675
+vt 0.350121 0.442675
+vt 0.300793 0.467794
+vt 0.350121 0.467794
+vt 0.350121 0.442675
+vt 0.300793 0.442675
+vt 0.249801 0.467794
+vt 0.300793 0.467794
+vt 0.300793 0.442675
+vt 0.249801 0.442675
+vt 0.200473 0.467794
+vt 0.249801 0.467794
+vt 0.249801 0.442675
+vt 0.200473 0.442675
+vt 0.153645 0.467794
+vt 0.200473 0.467794
+vt 0.200473 0.442675
+vt 0.153645 0.442675
+vt 0.106818 0.467794
+vt 0.153645 0.467794
+vt 0.153645 0.442675
+vt 0.106818 0.442675
+vt 0.057489 0.467794
+vt 0.106818 0.467794
+vt 0.106818 0.442675
+vt 0.057489 0.442675
+vt 0.006498 0.467794
+vt 0.057489 0.467794
+vt 0.057489 0.442675
+vt 0.006498 0.442675
+vt 0.443776 0.467794
+vt 0.493105 0.467794
+vt 0.493105 0.442675
+vt 0.443776 0.442675
+vt 0.396949 0.467794
+vt 0.443776 0.467794
+vt 0.443776 0.442675
+vt 0.396949 0.442675
+vt 0.350121 0.442675
+vt 0.396949 0.442675
+vt 0.396949 0.436395
+vt 0.350121 0.436395
+vt 0.300793 0.442675
+vt 0.350121 0.442675
+vt 0.350121 0.436395
+vt 0.300793 0.436395
+vt 0.249801 0.442675
+vt 0.300793 0.442675
+vt 0.300793 0.436395
+vt 0.249801 0.436395
+vt 0.200473 0.442675
+vt 0.249801 0.442675
+vt 0.249801 0.436395
+vt 0.200473 0.436395
+vt 0.153645 0.442675
+vt 0.200473 0.442675
+vt 0.200473 0.436395
+vt 0.153645 0.436395
+vt 0.106818 0.442675
+vt 0.153645 0.442675
+vt 0.153645 0.436395
+vt 0.106818 0.436395
+vt 0.057489 0.442675
+vt 0.106818 0.442675
+vt 0.106818 0.436395
+vt 0.057489 0.436395
+vt 0.006498 0.442675
+vt 0.057489 0.442675
+vt 0.057489 0.436395
+vt 0.006498 0.436395
+vt 0.443776 0.442675
+vt 0.493105 0.442675
+vt 0.493105 0.436395
+vt 0.443776 0.436395
+vt 0.396949 0.442675
+vt 0.443776 0.442675
+vt 0.443776 0.436395
+vt 0.396949 0.436395
+vt 0.350121 0.436395
+vt 0.396949 0.436395
+vt 0.396949 0.423835
+vt 0.350121 0.423835
+vt 0.300793 0.436395
+vt 0.350121 0.436395
+vt 0.350121 0.423835
+vt 0.300793 0.423835
+vt 0.249801 0.436395
+vt 0.300793 0.436395
+vt 0.300793 0.423835
+vt 0.249801 0.423835
+vt 0.200473 0.436395
+vt 0.249801 0.436395
+vt 0.249801 0.423835
+vt 0.200473 0.423835
+vt 0.153645 0.436395
+vt 0.200473 0.436395
+vt 0.200473 0.423835
+vt 0.153645 0.423835
+vt 0.106818 0.436395
+vt 0.153645 0.436395
+vt 0.153645 0.423835
+vt 0.106818 0.423835
+vt 0.057489 0.436395
+vt 0.106818 0.436395
+vt 0.106818 0.423835
+vt 0.057489 0.423835
+vt 0.006498 0.436395
+vt 0.057489 0.436395
+vt 0.057489 0.423835
+vt 0.006498 0.423835
+vt 0.443776 0.436395
+vt 0.493105 0.436395
+vt 0.493105 0.423835
+vt 0.443776 0.423835
+vt 0.396949 0.436395
+vt 0.443776 0.436395
+vt 0.443776 0.423835
+vt 0.396949 0.423835
+vt 0.350121 0.423835
+vt 0.396949 0.423835
+vt 0.396949 0.417555
+vt 0.350121 0.417555
+vt 0.300793 0.423835
+vt 0.350121 0.423835
+vt 0.350121 0.417555
+vt 0.300793 0.417555
+vt 0.249801 0.423835
+vt 0.300793 0.423835
+vt 0.300793 0.417555
+vt 0.249801 0.417555
+vt 0.200473 0.423835
+vt 0.249801 0.423835
+vt 0.249801 0.417555
+vt 0.200473 0.417555
+vt 0.153645 0.423835
+vt 0.200473 0.423835
+vt 0.200473 0.417555
+vt 0.153645 0.417555
+vt 0.106818 0.423835
+vt 0.153645 0.423835
+vt 0.153645 0.417555
+vt 0.106818 0.417555
+vt 0.057489 0.423835
+vt 0.106818 0.423835
+vt 0.106818 0.417555
+vt 0.057489 0.417555
+vt 0.006498 0.423835
+vt 0.057489 0.423835
+vt 0.057489 0.417555
+vt 0.006498 0.417555
+vt 0.443776 0.423835
+vt 0.493105 0.423835
+vt 0.493105 0.417555
+vt 0.443776 0.417555
+vt 0.396949 0.423835
+vt 0.443776 0.423835
+vt 0.443776 0.417555
+vt 0.396949 0.417555
+vt 0.350121 0.417555
+vt 0.396949 0.417555
+vt 0.396949 0.404768
+vt 0.350121 0.404768
+vt 0.300793 0.417555
+vt 0.350121 0.417555
+vt 0.350121 0.404768
+vt 0.300793 0.404768
+vt 0.249801 0.417555
+vt 0.300793 0.417555
+vt 0.300793 0.404768
+vt 0.249801 0.404768
+vt 0.200473 0.417555
+vt 0.249801 0.417555
+vt 0.249801 0.404768
+vt 0.200473 0.404768
+vt 0.153645 0.417555
+vt 0.200473 0.417555
+vt 0.200473 0.404768
+vt 0.153645 0.404768
+vt 0.106818 0.417555
+vt 0.153645 0.417555
+vt 0.153645 0.404768
+vt 0.106818 0.404768
+vt 0.057489 0.417555
+vt 0.106818 0.417555
+vt 0.106818 0.404768
+vt 0.057489 0.404768
+vt 0.006498 0.417555
+vt 0.057489 0.417555
+vt 0.057489 0.404768
+vt 0.006498 0.404768
+vt 0.443776 0.417555
+vt 0.493105 0.417555
+vt 0.493105 0.404768
+vt 0.443776 0.404768
+vt 0.396949 0.417555
+vt 0.443776 0.417555
+vt 0.443776 0.404768
+vt 0.396949 0.404768
+vt 0.350998 0.547962
+vt 0.398319 0.547961
+vt 0.398319 0.498824
+vt 0.350998 0.498825
+vt 0.301150 0.547961
+vt 0.301150 0.498825
+vt 0.249620 0.547961
+vt 0.249620 0.498825
+vt 0.199772 0.547962
+vt 0.199772 0.498825
+vt 0.152451 0.547962
+vt 0.152451 0.498824
+vt 0.105130 0.547961
+vt 0.105130 0.498824
+vt 0.055282 0.547962
+vt 0.055282 0.498824
+vt 0.003753 0.547962
+vt 0.003753 0.498824
+vt 0.445640 0.547961
+vt 0.495488 0.547962
+vt 0.495488 0.498824
+vt 0.445640 0.498824
+vt 0.350998 0.737698
+vt 0.398319 0.737698
+vt 0.301150 0.737698
+vt 0.249620 0.737698
+vt 0.199772 0.737698
+vt 0.152451 0.737698
+vt 0.105130 0.737698
+vt 0.055282 0.737698
+vt 0.003753 0.737698
+vt 0.445640 0.737698
+vt 0.495488 0.737698
+vt 0.350998 0.858405
+vt 0.398319 0.858405
+vt 0.301150 0.858405
+vt 0.249620 0.858405
+vt 0.199772 0.858405
+vt 0.152451 0.858405
+vt 0.105130 0.858405
+vt 0.055282 0.858405
+vt 0.003753 0.858405
+vt 0.445640 0.858405
+vt 0.495488 0.858405
+vt 0.350998 0.961982
+vt 0.398319 0.961982
+vt 0.301150 0.961982
+vt 0.249620 0.961982
+vt 0.199772 0.961982
+vt 0.152451 0.961982
+vt 0.105130 0.961982
+vt 0.055282 0.961982
+vt 0.003753 0.961982
+vt 0.445640 0.961982
+vt 0.495488 0.961982
+vt 0.350998 0.996654
+vt 0.398319 0.996654
+vt 0.301150 0.996654
+vt 0.249620 0.996654
+vt 0.199772 0.996654
+vt 0.152451 0.996654
+vt 0.105130 0.996654
+vt 0.055282 0.996654
+vt 0.003753 0.996654
+vt 0.445640 0.996654
+vt 0.495488 0.996654
+vn 0.000001 -0.000117 -1.000000
+vn 0.000007 -0.000119 -1.000000
+vn 0.000004 -0.000642 -1.000000
+vn 0.000290 -0.001097 -0.999999
+vn 0.965539 -0.259953 0.012557
+vn 0.960748 -0.276359 0.024272
+vn 0.995038 -0.099144 0.008333
+vn 0.997311 0.073275 0.000826
+vn 0.384905 -0.746403 0.542891
+vn -0.062420 -0.728758 0.681921
+vn 0.161475 -0.510903 0.844336
+vn 0.298440 -0.528902 0.794478
+vn -0.388088 -0.822360 0.416066
+vn -0.374937 -0.503238 0.778571
+vn -0.967185 -0.253827 0.011142
+vn -0.969696 -0.243379 0.021376
+vn -0.995359 -0.095953 0.007360
+vn -0.997773 0.066697 0.000871
+vn -0.000005 -0.000117 -1.000000
+vn -0.000578 -0.001225 -0.999999
+vn -0.002059 0.162154 -0.986763
+vn 0.036715 0.227361 -0.973118
+vn 0.988150 0.153490 0.000530
+vn 0.997092 0.076202 0.000795
+vn 0.419290 0.355620 0.835302
+vn 0.335340 0.314686 0.887986
+vn 0.476829 0.120448 0.870704
+vn 0.548589 -0.115983 0.828008
+vn -0.425538 0.336785 0.839936
+vn -0.326355 0.383871 0.863791
+vn -0.479491 0.111072 0.870489
+vn -0.546378 -0.151051 0.823805
+vn -0.988094 0.153853 0.000548
+vn -0.996980 0.077652 0.000810
+vn -0.071204 0.307808 -0.948780
+vn 0.134041 0.542848 -0.829065
+vn 0.038742 0.586621 -0.808935
+vn 0.999191 -0.037450 -0.014645
+vn 0.997224 -0.066926 -0.032638
+vn 0.508477 -0.486691 0.710340
+vn 0.518399 -0.586423 0.622391
+vn -0.510691 -0.477362 0.715067
+vn -0.519541 -0.586094 0.621748
+vn -0.999321 -0.034320 -0.013421
+vn -0.997248 -0.066385 -0.032993
+vn -0.208233 0.626135 -0.751394
+vn 0.208454 0.614903 -0.760553
+vn 0.003597 0.581754 -0.813357
+vn 0.994885 -0.089661 -0.046525
+vn 0.994269 -0.101688 -0.032983
+vn 0.510524 -0.657019 0.554699
+vn 0.512927 -0.632907 0.579944
+vn -0.512007 -0.660652 0.548989
+vn -0.514396 -0.638014 0.573004
+vn -0.992961 -0.104288 -0.056137
+vn -0.993472 -0.105450 -0.043510
+vn -0.215729 0.522222 -0.825073
+vn 0.214294 0.359182 -0.908332
+vn 0.000134 0.334072 -0.942548
+vn 0.997269 -0.072312 -0.015018
+vn 0.998775 -0.049471 -0.001064
+vn 0.525393 -0.499573 0.688759
+vn 0.520961 -0.381681 0.763491
+vn -0.527026 -0.502395 0.685451
+vn -0.522284 -0.373646 0.766556
+vn -0.997005 -0.073521 -0.023992
+vn -0.999371 -0.035442 -0.000762
+vn -0.214604 0.292047 -0.932016
+vn -0.000002 -0.996240 0.086630
+vn 0.254654 -0.964745 -0.066466
+vn -0.000002 -0.978728 -0.205161
+vn 0.384905 -0.746403 0.542891
+vn -0.062420 -0.728758 0.681921
+vn -0.388088 -0.822360 0.416066
+vn -0.254657 -0.964744 -0.066466
+vn 0.215116 0.223526 -0.950664
+vn -0.074129 0.228601 -0.970694
+vn 1.000000 0.000000 -0.000000
+vn 1.000000 0.000000 -0.000000
+vn 0.532664 -0.238851 0.811923
+vn 0.525606 -0.243348 0.815181
+vn -0.532938 -0.238769 0.811767
+vn -0.526504 -0.236645 0.816574
+vn -1.000000 -0.000000 0.000000
+vn -1.000000 -0.000000 0.000000
+vn -0.212589 0.222631 -0.951442
+vn 0.000117 0.000000 -1.000000
+vn 0.000118 0.000007 -1.000000
+vn 0.000642 0.000004 -1.000000
+vn 0.001097 0.000289 -0.999999
+vn 0.259953 0.965539 0.012557
+vn 0.276358 0.960748 0.024272
+vn 0.099144 0.995038 0.008333
+vn -0.073275 0.997311 0.000826
+vn 0.746403 0.384905 0.542891
+vn 0.728758 -0.062420 0.681921
+vn 0.510903 0.161476 0.844336
+vn 0.528902 0.298440 0.794478
+vn 0.822360 -0.388088 0.416066
+vn 0.503238 -0.374936 0.778572
+vn 0.253827 -0.967185 0.011142
+vn 0.243379 -0.969696 0.021376
+vn 0.095953 -0.995359 0.007360
+vn -0.066697 -0.997773 0.000871
+vn 0.000117 -0.000006 -1.000000
+vn 0.001225 -0.000578 -0.999999
+vn -0.162154 -0.002061 -0.986763
+vn -0.227361 0.036714 -0.973118
+vn -0.153490 0.988150 0.000530
+vn -0.076202 0.997092 0.000795
+vn -0.355620 0.419290 0.835302
+vn -0.314686 0.335340 0.887986
+vn -0.120448 0.476829 0.870704
+vn 0.115983 0.548589 0.828008
+vn -0.336785 -0.425537 0.839937
+vn -0.383871 -0.326354 0.863792
+vn -0.111072 -0.479490 0.870490
+vn 0.151051 -0.546377 0.823805
+vn -0.153853 -0.988094 0.000549
+vn -0.077652 -0.996980 0.000810
+vn -0.307808 -0.071204 -0.948780
+vn -0.542849 0.134040 -0.829065
+vn -0.586621 0.038742 -0.808935
+vn 0.037450 0.999191 -0.014646
+vn 0.066926 0.997224 -0.032638
+vn 0.486691 0.508477 0.710340
+vn 0.586423 0.518399 0.622390
+vn 0.477362 -0.510691 0.715067
+vn 0.586095 -0.519541 0.621748
+vn 0.034320 -0.999321 -0.013421
+vn 0.066385 -0.997248 -0.032993
+vn -0.626135 -0.208233 -0.751394
+vn -0.614903 0.208454 -0.760553
+vn -0.581754 0.003596 -0.813357
+vn 0.089661 0.994885 -0.046525
+vn 0.101687 0.994269 -0.032983
+vn 0.657019 0.510524 0.554699
+vn 0.632907 0.512927 0.579944
+vn 0.660652 -0.512006 0.548989
+vn 0.638015 -0.514396 0.573004
+vn 0.104288 -0.992961 -0.056137
+vn 0.105450 -0.993472 -0.043510
+vn -0.522222 -0.215730 -0.825073
+vn -0.359182 0.214294 -0.908332
+vn -0.334072 0.000134 -0.942547
+vn 0.072312 0.997269 -0.015018
+vn 0.049471 0.998775 -0.001064
+vn 0.499573 0.525393 0.688759
+vn 0.381681 0.520961 0.763491
+vn 0.502395 -0.527026 0.685451
+vn 0.373646 -0.522284 0.766556
+vn 0.073521 -0.997005 -0.023992
+vn 0.035442 -0.999371 -0.000762
+vn -0.292047 -0.214604 -0.932016
+vn 0.996240 -0.000002 0.086630
+vn 0.964745 0.254654 -0.066466
+vn 0.978728 -0.000002 -0.205161
+vn 0.746403 0.384905 0.542891
+vn 0.728758 -0.062420 0.681921
+vn 0.822360 -0.388088 0.416066
+vn 0.964744 -0.254658 -0.066466
+vn -0.223526 0.215116 -0.950664
+vn -0.228601 -0.074129 -0.970694
+vn -0.000000 1.000000 -0.000000
+vn -0.000000 1.000000 -0.000000
+vn 0.238851 0.532664 0.811923
+vn 0.243348 0.525606 0.815181
+vn 0.238770 -0.532938 0.811767
+vn 0.236645 -0.526504 0.816574
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn -0.222631 -0.212589 -0.951442
+vn -0.000001 0.000116 -1.000000
+vn -0.000009 0.000119 -1.000000
+vn -0.000005 0.000642 -1.000000
+vn -0.000289 0.001096 -0.999999
+vn -0.965539 0.259953 0.012557
+vn -0.960748 0.276358 0.024272
+vn -0.995038 0.099144 0.008333
+vn -0.997311 -0.073275 0.000826
+vn -0.384905 0.746403 0.542891
+vn 0.062420 0.728758 0.681921
+vn -0.161475 0.510903 0.844336
+vn -0.298440 0.528902 0.794478
+vn 0.388088 0.822361 0.416066
+vn 0.374936 0.503239 0.778571
+vn 0.967185 0.253827 0.011142
+vn 0.969696 0.243379 0.021376
+vn 0.995359 0.095953 0.007360
+vn 0.997773 -0.066696 0.000871
+vn 0.000006 0.000116 -1.000000
+vn 0.000578 0.001225 -0.999999
+vn 0.002061 -0.162154 -0.986763
+vn -0.036715 -0.227361 -0.973118
+vn -0.988150 -0.153490 0.000530
+vn -0.997092 -0.076202 0.000795
+vn -0.419290 -0.355620 0.835302
+vn -0.335340 -0.314686 0.887986
+vn -0.476829 -0.120448 0.870704
+vn -0.548589 0.115983 0.828008
+vn 0.425538 -0.336785 0.839937
+vn 0.326355 -0.383871 0.863791
+vn 0.479490 -0.111072 0.870490
+vn 0.546377 0.151051 0.823806
+vn 0.988094 -0.153853 0.000549
+vn 0.996980 -0.077652 0.000810
+vn 0.071202 -0.307807 -0.948781
+vn -0.134041 -0.542849 -0.829065
+vn -0.038743 -0.586621 -0.808935
+vn -0.999191 0.037450 -0.014645
+vn -0.997224 0.066925 -0.032638
+vn -0.508477 0.486691 0.710340
+vn -0.518400 0.586423 0.622390
+vn 0.510690 0.477362 0.715067
+vn 0.519540 0.586095 0.621748
+vn 0.999321 0.034320 -0.013421
+vn 0.997248 0.066385 -0.032993
+vn 0.208233 -0.626135 -0.751394
+vn -0.208455 -0.614903 -0.760553
+vn -0.003597 -0.581754 -0.813357
+vn -0.994885 0.089660 -0.046525
+vn -0.994269 0.101687 -0.032983
+vn -0.510524 0.657019 0.554699
+vn -0.512927 0.632907 0.579944
+vn 0.512006 0.660652 0.548989
+vn 0.514396 0.638015 0.573004
+vn 0.992961 0.104288 -0.056137
+vn 0.993472 0.105451 -0.043510
+vn 0.215730 -0.522222 -0.825072
+vn -0.214294 -0.359182 -0.908332
+vn -0.000134 -0.334072 -0.942547
+vn -0.997269 0.072312 -0.015018
+vn -0.998775 0.049471 -0.001064
+vn -0.525393 0.499573 0.688759
+vn -0.520961 0.381681 0.763491
+vn 0.527026 0.502395 0.685451
+vn 0.522284 0.373646 0.766556
+vn 0.997005 0.073521 -0.023992
+vn 0.999371 0.035442 -0.000762
+vn 0.214604 -0.292047 -0.932016
+vn 0.000002 0.996240 0.086630
+vn -0.254654 0.964745 -0.066466
+vn 0.000002 0.978728 -0.205161
+vn -0.384905 0.746403 0.542891
+vn 0.062420 0.728758 0.681921
+vn 0.388088 0.822361 0.416066
+vn 0.254658 0.964744 -0.066466
+vn -0.215116 -0.223526 -0.950664
+vn 0.074129 -0.228601 -0.970694
+vn -1.000000 -0.000000 -0.000000
+vn -1.000000 -0.000000 -0.000000
+vn -0.532664 0.238851 0.811923
+vn -0.525606 0.243348 0.815181
+vn 0.532938 0.238770 0.811767
+vn 0.526504 0.236645 0.816574
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.212589 -0.222631 -0.951442
+vn -0.000117 -0.000002 -1.000000
+vn -0.000120 -0.000009 -1.000000
+vn -0.000642 -0.000005 -1.000000
+vn -0.001096 -0.000290 -0.999999
+vn -0.259953 -0.965540 0.012557
+vn -0.276358 -0.960748 0.024272
+vn -0.099144 -0.995038 0.008333
+vn 0.073275 -0.997311 0.000826
+vn -0.746403 -0.384905 0.542891
+vn -0.728758 0.062420 0.681921
+vn -0.510903 -0.161475 0.844336
+vn -0.528903 -0.298440 0.794478
+vn -0.822360 0.388088 0.416066
+vn -0.503238 0.374937 0.778571
+vn -0.253827 0.967185 0.011142
+vn -0.243379 0.969696 0.021376
+vn -0.095953 0.995359 0.007360
+vn 0.066697 0.997773 0.000871
+vn -0.000116 0.000005 -1.000000
+vn -0.001225 0.000578 -0.999999
+vn 0.162155 0.002059 -0.986763
+vn 0.227361 -0.036715 -0.973118
+vn 0.153490 -0.988150 0.000530
+vn 0.076203 -0.997092 0.000795
+vn 0.355621 -0.419290 0.835302
+vn 0.314686 -0.335340 0.887986
+vn 0.120448 -0.476829 0.870704
+vn -0.115983 -0.548589 0.828008
+vn 0.336785 0.425538 0.839937
+vn 0.383871 0.326355 0.863791
+vn 0.111072 0.479490 0.870490
+vn -0.151051 0.546377 0.823805
+vn 0.153853 0.988094 0.000548
+vn 0.077652 0.996980 0.000810
+vn 0.307808 0.071202 -0.948781
+vn 0.542849 -0.134041 -0.829065
+vn 0.586621 -0.038743 -0.808934
+vn -0.037450 -0.999191 -0.014645
+vn -0.066925 -0.997224 -0.032638
+vn -0.486691 -0.508477 0.710340
+vn -0.586423 -0.518400 0.622390
+vn -0.477362 0.510691 0.715067
+vn -0.586095 0.519541 0.621748
+vn -0.034320 0.999321 -0.013421
+vn -0.066385 0.997248 -0.032993
+vn 0.626135 0.208232 -0.751395
+vn 0.614903 -0.208454 -0.760553
+vn 0.581754 -0.003597 -0.813357
+vn -0.089660 -0.994885 -0.046525
+vn -0.101687 -0.994269 -0.032983
+vn -0.657019 -0.510525 0.554699
+vn -0.632907 -0.512927 0.579944
+vn -0.660652 0.512007 0.548988
+vn -0.638015 0.514396 0.573004
+vn -0.104288 0.992961 -0.056137
+vn -0.105451 0.993472 -0.043510
+vn 0.522222 0.215729 -0.825072
+vn 0.359182 -0.214295 -0.908331
+vn 0.334072 -0.000134 -0.942547
+vn -0.072312 -0.997269 -0.015018
+vn -0.049471 -0.998775 -0.001064
+vn -0.499573 -0.525393 0.688759
+vn -0.381681 -0.520961 0.763491
+vn -0.502395 0.527026 0.685451
+vn -0.373646 0.522284 0.766556
+vn -0.073521 0.997005 -0.023992
+vn -0.035442 0.999371 -0.000763
+vn 0.292047 0.214604 -0.932016
+vn -0.996240 0.000002 0.086630
+vn -0.964745 -0.254654 -0.066466
+vn -0.978728 0.000002 -0.205161
+vn -0.746403 -0.384905 0.542891
+vn -0.728758 0.062420 0.681921
+vn -0.822360 0.388088 0.416066
+vn -0.964744 0.254657 -0.066466
+vn 0.223526 -0.215116 -0.950664
+vn 0.228601 0.074129 -0.970694
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 -0.000000
+vn -0.238851 -0.532664 0.811923
+vn -0.243348 -0.525606 0.815181
+vn -0.238770 0.532938 0.811767
+vn -0.236645 0.526504 0.816574
+vn -0.000000 1.000000 0.000000
+vn -0.000000 1.000000 0.000000
+vn 0.222631 0.212589 -0.951442
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.706842 0.707371 0.000000
+vn 0.706842 0.707371 0.000000
+vn 0.706842 0.707371 0.000000
+vn 0.706842 0.707371 0.000000
+vn -0.000374 1.000000 0.000000
+vn -0.000374 1.000000 0.000000
+vn -0.000374 1.000000 0.000000
+vn -0.000374 1.000000 0.000000
+vn -0.707371 0.706842 0.000000
+vn -0.707371 0.706842 0.000000
+vn -0.707371 0.706842 0.000000
+vn -0.707371 0.706842 0.000000
+vn -1.000000 -0.000374 0.000000
+vn -1.000000 -0.000374 0.000000
+vn -1.000000 -0.000374 0.000000
+vn -1.000000 -0.000374 0.000000
+vn -0.706842 -0.707371 -0.000000
+vn -0.706842 -0.707371 -0.000000
+vn -0.706842 -0.707371 -0.000000
+vn -0.706842 -0.707371 0.000000
+vn 0.000374 -1.000000 -0.000000
+vn 0.000374 -1.000000 0.000000
+vn 0.000374 -1.000000 -0.000000
+vn 0.000374 -1.000000 -0.000000
+vn 0.707371 -0.706842 -0.000000
+vn 0.707371 -0.706842 -0.000000
+vn 0.707371 -0.706842 -0.000000
+vn 0.707371 -0.706842 -0.000000
+vn 1.000000 0.000374 0.000000
+vn 1.000000 0.000374 0.000000
+vn 1.000000 0.000374 0.000000
+vn 1.000000 0.000374 0.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn -0.099506 0.000000 0.995037
+vn -0.099506 0.000000 0.995037
+vn -0.099506 0.000000 0.995037
+vn -0.099506 0.000000 0.995037
+vn 0.000000 -0.099506 0.995037
+vn 0.000000 -0.099506 0.995037
+vn 0.000000 -0.099506 0.995037
+vn 0.000000 -0.099506 0.995037
+vn 0.099506 0.000000 0.995037
+vn 0.099506 0.000000 0.995037
+vn 0.099506 0.000000 0.995037
+vn 0.099506 0.000000 0.995037
+vn 0.000000 0.099506 0.995037
+vn 0.000000 0.099506 0.995037
+vn 0.000000 0.099506 0.995037
+vn 0.000000 0.099506 0.995037
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -0.929987 0.000000 0.367592
+vn -0.677867 0.000000 0.735184
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -0.929987 0.367592
+vn 0.000000 -0.677867 0.735184
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.929987 0.000000 0.367592
+vn 0.677867 0.000000 0.735184
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 0.929987 0.367592
+vn 0.000000 0.677867 0.735184
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn -0.000000 -1.000000 0.000000
+vn -0.000000 -1.000000 0.000000
+vn -0.000000 -1.000000 0.000000
+vn -0.000000 -1.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.967538 0.252725
+vn 0.000000 0.862856 0.505449
+vn 0.967538 0.000000 0.252725
+vn 0.862856 0.000000 0.505449
+vn -0.000000 -0.967538 0.252725
+vn -0.000000 -0.862856 0.505449
+vn -0.967538 0.000000 0.252725
+vn -0.862856 0.000000 0.505449
+vn 0.000000 0.862856 0.505449
+vn 0.000000 0.967538 0.252725
+vn 0.862856 0.000000 0.505449
+vn 0.967538 0.000000 0.252725
+vn -0.000000 -0.862856 0.505449
+vn -0.000000 -0.967538 0.252725
+vn -0.862856 0.000000 0.505449
+vn -0.967538 0.000000 0.252725
+vn 0.000000 0.967538 0.252725
+vn 0.000000 0.862856 0.505449
+vn 0.967538 0.000000 0.252724
+vn 0.862857 0.000000 0.505449
+vn -0.000000 -0.967538 0.252724
+vn -0.000000 -0.862857 0.505448
+vn -0.967538 0.000000 0.252725
+vn -0.862857 0.000000 0.505449
+vn 0.000000 0.707107 0.707107
+vn 0.000000 0.707107 0.707107
+vn 0.707108 0.000000 0.707106
+vn 0.707107 0.000000 0.707107
+vn -0.000000 -0.707108 0.707105
+vn -0.000000 -0.707108 0.707105
+vn -0.707108 0.000000 0.707106
+vn -0.707108 0.000000 0.707105
+vn 0.000000 0.099506 0.995037
+vn 0.000000 0.099506 0.995037
+vn 0.000000 0.099506 0.995037
+vn 0.000000 0.099506 0.995037
+vn 0.099506 0.000000 0.995037
+vn 0.099501 0.000000 0.995037
+vn 0.099506 0.000000 0.995037
+vn 0.099506 0.000000 0.995037
+vn -0.000000 -0.099501 0.995037
+vn -0.000000 -0.099501 0.995037
+vn -0.000000 -0.099501 0.995037
+vn -0.000000 -0.099501 0.995037
+vn -0.099501 0.000000 0.995037
+vn -0.099506 0.000000 0.995037
+vn -0.099501 0.000000 0.995037
+vn -0.099501 0.000000 0.995037
+vn -0.275482 0.000000 0.961306
+vn -0.187896 0.000000 0.982189
+vn 0.000000 -0.275482 0.961306
+vn 0.000000 -0.187896 0.982189
+vn 0.275482 0.000000 0.961306
+vn 0.187896 0.000000 0.982189
+vn 0.000000 0.275482 0.961306
+vn 0.000000 0.187896 0.982189
+vn -0.516067 0.000000 0.856548
+vn -0.903649 0.000000 0.428274
+vn 0.000000 -0.516067 0.856548
+vn 0.000000 -0.903649 0.428274
+vn 0.516067 0.000000 0.856548
+vn 0.903649 0.000000 0.428274
+vn 0.000000 0.516067 0.856548
+vn 0.000000 0.903649 0.428274
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn -0.049938 0.000000 0.998752
+vn -0.049938 0.000000 0.998752
+vn -0.049938 0.000000 0.998752
+vn -0.049938 0.000000 0.998752
+vn 0.000000 -0.049938 0.998752
+vn 0.000000 -0.049938 0.998752
+vn 0.000000 -0.049938 0.998752
+vn 0.000000 -0.049938 0.998752
+vn 0.049938 0.000000 0.998752
+vn 0.049938 0.000000 0.998752
+vn 0.049938 0.000000 0.998752
+vn 0.049938 0.000000 0.998752
+vn 0.000000 0.049938 0.998752
+vn 0.000000 0.049938 0.998752
+vn 0.000000 0.049938 0.998752
+vn 0.000000 0.049938 0.998752
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 1.000000 -0.000002
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 -0.000002
+vn 0.000000 1.000000 -0.000005
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -0.000000 -1.000000 0.000002
+vn 0.000000 -1.000000 0.000005
+vn -0.000000 -1.000000 0.000002
+vn -0.000000 -1.000000 0.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.562661 0.423331 -0.710072
+vn 0.704032 0.011758 -0.710070
+vn 0.582173 0.063049 -0.810617
+vn 0.433925 0.393201 -0.810618
+vn 0.206373 0.673207 -0.710072
+vn 0.119934 0.573161 -0.810618
+vn -0.228742 0.665939 -0.710072
+vn -0.239867 0.534192 -0.810618
+vn -0.576487 0.404302 -0.710072
+vn -0.508049 0.291177 -0.810618
+vn -0.704032 -0.011763 -0.710070
+vn -0.582173 -0.063055 -0.810616
+vn -0.562662 -0.423334 -0.710070
+vn -0.433926 -0.393204 -0.810616
+vn -0.206373 -0.673209 -0.710070
+vn -0.119934 -0.573164 -0.810616
+vn 0.228743 -0.665941 -0.710070
+vn 0.239869 -0.534195 -0.810616
+vn 0.576487 -0.404306 -0.710070
+vn 0.508049 -0.291182 -0.810616
+vn 0.745732 0.553468 -0.370886
+vn 0.928631 0.009435 -0.370885
+vn 0.277988 0.886096 -0.370886
+vn -0.295936 0.880264 -0.370886
+vn -0.756825 0.538201 -0.370886
+vn -0.928631 -0.009437 -0.370885
+vn -0.745732 -0.553469 -0.370885
+vn -0.277989 -0.886096 -0.370885
+vn 0.295937 -0.880265 -0.370885
+vn 0.756824 -0.538202 -0.370885
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 -0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.951056 -0.309017 0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.047494 0.015432 0.998752
+vn 0.047493 0.015432 0.998752
+vn 0.047494 0.015432 0.998752
+vn 0.047494 0.015432 0.998752
+vn 0.029353 0.040401 0.998752
+vn 0.029353 0.040401 0.998752
+vn 0.029353 0.040401 0.998752
+vn 0.029353 0.040401 0.998752
+vn 0.000000 0.049938 0.998752
+vn 0.000000 0.049938 0.998752
+vn 0.000000 0.049938 0.998752
+vn 0.000000 0.049938 0.998752
+vn -0.029353 0.040401 0.998752
+vn -0.029353 0.040401 0.998752
+vn -0.029353 0.040401 0.998752
+vn -0.029353 0.040401 0.998752
+vn -0.047493 0.015431 0.998752
+vn -0.047494 0.015432 0.998752
+vn -0.047493 0.015431 0.998752
+vn -0.047493 0.015431 0.998752
+vn -0.047493 -0.015432 0.998752
+vn -0.047493 -0.015432 0.998752
+vn -0.047493 -0.015432 0.998752
+vn -0.047493 -0.015432 0.998752
+vn -0.029353 -0.040400 0.998752
+vn -0.029353 -0.040400 0.998752
+vn -0.029353 -0.040400 0.998752
+vn -0.029353 -0.040400 0.998752
+vn 0.000000 -0.049937 0.998752
+vn 0.000000 -0.049937 0.998752
+vn 0.000000 -0.049937 0.998752
+vn 0.000000 -0.049937 0.998752
+vn 0.029353 -0.040399 0.998752
+vn 0.029353 -0.040400 0.998752
+vn 0.029353 -0.040399 0.998752
+vn 0.029353 -0.040399 0.998752
+vn 0.047493 -0.015432 0.998752
+vn 0.047493 -0.015432 0.998752
+vn 0.047493 -0.015432 0.998752
+vn 0.047493 -0.015432 0.998752
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 -0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.951056 -0.309017 0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.425325 0.138196 -0.894427
+vn 0.425326 0.138197 -0.894427
+vn 0.425325 0.138196 -0.894427
+vn 0.425325 0.138196 -0.894427
+vn 0.262866 0.361804 -0.894427
+vn 0.262865 0.361803 -0.894427
+vn 0.262866 0.361804 -0.894427
+vn 0.262866 0.361804 -0.894427
+vn -0.000000 0.447215 -0.894427
+vn 0.000000 0.447214 -0.894427
+vn -0.000000 0.447215 -0.894427
+vn -0.000000 0.447215 -0.894427
+vn -0.262865 0.361803 -0.894427
+vn -0.262866 0.361804 -0.894427
+vn -0.262865 0.361803 -0.894427
+vn -0.262865 0.361803 -0.894427
+vn -0.425326 0.138196 -0.894427
+vn -0.425325 0.138196 -0.894427
+vn -0.425326 0.138196 -0.894427
+vn -0.425326 0.138196 -0.894427
+vn -0.425326 -0.138196 -0.894427
+vn -0.425326 -0.138196 -0.894427
+vn -0.425326 -0.138196 -0.894427
+vn -0.425326 -0.138196 -0.894427
+vn -0.262865 -0.361804 -0.894427
+vn -0.262865 -0.361804 -0.894427
+vn -0.262865 -0.361804 -0.894427
+vn -0.262865 -0.361804 -0.894427
+vn 0.000000 -0.447214 -0.894427
+vn 0.000000 -0.447214 -0.894427
+vn 0.000000 -0.447214 -0.894427
+vn 0.000000 -0.447214 -0.894427
+vn 0.262865 -0.361804 -0.894427
+vn 0.262865 -0.361804 -0.894427
+vn 0.262865 -0.361804 -0.894427
+vn 0.262865 -0.361804 -0.894427
+vn 0.425326 -0.138196 -0.894427
+vn 0.425326 -0.138196 -0.894427
+vn 0.425326 -0.138196 -0.894427
+vn 0.425326 -0.138196 -0.894427
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.587786 0.809017 -0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587786 0.809017 -0.000000
+vn 0.587786 0.809017 -0.000000
+vn -0.000000 1.000000 0.000000
+vn -0.000000 1.000000 -0.000001
+vn -0.000000 1.000000 0.000000
+vn -0.000000 1.000000 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 -0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.951056 -0.309017 0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.951056 -0.309017 -0.000000
+vn 0.425325 0.138197 0.894427
+vn 0.425326 0.138197 0.894427
+vn 0.425325 0.138197 0.894427
+vn 0.425325 0.138197 0.894427
+vn 0.262866 0.361803 0.894427
+vn 0.262866 0.361804 0.894427
+vn 0.262866 0.361803 0.894427
+vn 0.262866 0.361803 0.894427
+vn 0.000000 0.447214 0.894427
+vn -0.000000 0.447213 0.894427
+vn 0.000000 0.447214 0.894427
+vn 0.000000 0.447214 0.894427
+vn -0.262866 0.361804 0.894427
+vn -0.262865 0.361804 0.894427
+vn -0.262866 0.361804 0.894427
+vn -0.262866 0.361804 0.894427
+vn -0.425326 0.138197 0.894427
+vn -0.425326 0.138197 0.894427
+vn -0.425326 0.138197 0.894427
+vn -0.425326 0.138197 0.894427
+vn -0.425324 -0.138197 0.894428
+vn -0.425326 -0.138197 0.894427
+vn -0.425324 -0.138197 0.894428
+vn -0.425324 -0.138197 0.894428
+vn -0.262866 -0.361803 0.894427
+vn -0.262865 -0.361802 0.894428
+vn -0.262866 -0.361803 0.894427
+vn -0.262866 -0.361803 0.894427
+vn 0.000000 -0.447213 0.894427
+vn 0.000000 -0.447213 0.894427
+vn 0.000000 -0.447213 0.894427
+vn 0.000000 -0.447213 0.894427
+vn 0.262866 -0.361802 0.894427
+vn 0.262866 -0.361803 0.894427
+vn 0.262866 -0.361802 0.894427
+vn 0.262866 -0.361802 0.894427
+vn 0.425326 -0.138198 0.894427
+vn 0.425325 -0.138197 0.894427
+vn 0.425326 -0.138198 0.894427
+vn 0.425326 -0.138198 0.894427
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000001
+vn 0.951056 0.309017 0.000000
+vn 0.951056 0.309017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.587785 0.809017 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn 0.000000 1.000000 0.000000
+vn -0.587785 0.809017 0.000001
+vn -0.587785 0.809017 0.000000
+vn -0.587785 0.809017 0.000001
+vn -0.587785 0.809017 0.000001
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000001
+vn -0.951056 0.309017 0.000000
+vn -0.951056 0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 -0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.951056 -0.309017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn -0.587785 -0.809017 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.587785 -0.809017 0.000000
+vn 0.951056 -0.309017 0.000001
+vn 0.951056 -0.309017 0.000000
+vn 0.951056 -0.309017 0.000001
+vn 0.951056 -0.309017 0.000001
+vn 0.808878 0.587853 -0.012040
+vn 0.999927 0.000136 -0.012040
+vn 0.928631 0.009435 -0.370885
+vn 0.745732 0.553468 -0.370886
+vn 0.308865 0.951030 -0.012040
+vn 0.277988 0.886096 -0.370886
+vn -0.309124 0.950945 -0.012040
+vn -0.295936 0.880264 -0.370886
+vn -0.809038 0.587632 -0.012040
+vn -0.756825 0.538201 -0.370886
+vn -0.999927 -0.000136 -0.012040
+vn -0.928631 -0.009437 -0.370885
+vn -0.808878 -0.587853 -0.012040
+vn -0.745732 -0.553469 -0.370885
+vn -0.308865 -0.951030 -0.012040
+vn -0.277989 -0.886096 -0.370885
+vn 0.309124 -0.950945 -0.012040
+vn 0.295937 -0.880265 -0.370885
+vn 0.809038 -0.587632 -0.012040
+vn 0.309124 -0.950945 -0.012040
+vn 0.295937 -0.880265 -0.370885
+vn 0.756824 -0.538202 -0.370885
+vn 0.797207 0.577639 0.175482
+vn 0.984482 -0.001267 0.175482
+vn 0.305427 0.935906 0.175482
+vn -0.303017 0.936689 0.175482
+vn -0.795718 0.579689 0.175482
+vn -0.984482 0.001267 0.175482
+vn -0.797207 -0.577639 0.175482
+vn -0.305426 -0.935906 0.175482
+vn 0.303017 -0.936689 0.175482
+vn 0.795718 -0.579689 0.175482
+vn 0.303017 -0.936689 0.175482
+vn 0.805510 0.586917 0.081747
+vn 0.996652 0.001359 0.081747
+vn 0.306690 0.948292 0.081747
+vn -0.309275 0.947452 0.081747
+vn -0.807107 0.584718 0.081747
+vn -0.996652 -0.001359 0.081747
+vn -0.805510 -0.586917 0.081747
+vn -0.306690 -0.948292 0.081747
+vn 0.309275 -0.947452 0.081747
+vn 0.807107 -0.584718 0.081747
+vn 0.309275 -0.947452 0.081747
+vn 0.768673 0.548289 -0.329426
+vn 0.944145 -0.008240 -0.329426
+vn 0.299593 0.895389 -0.329426
+vn -0.283921 0.900482 -0.329426
+vn -0.758987 0.561621 -0.329426
+vn -0.944145 0.008240 -0.329426
+vn -0.768673 -0.548289 -0.329426
+vn -0.299593 -0.895389 -0.329426
+vn 0.283921 -0.900482 -0.329426
+vn 0.758987 -0.561620 -0.329426
+vn 0.283921 -0.900482 -0.329426
+vn 0.726320 0.416280 -0.546965
+vn 0.832289 -0.090142 -0.546964
+vn 0.342922 0.763698 -0.546965
+vn -0.171461 0.819409 -0.546965
+vn -0.620351 0.562133 -0.546965
+vn -0.832288 0.090142 -0.546965
+vn -0.726320 -0.416280 -0.546965
+vn -0.342922 -0.763698 -0.546965
+vn 0.171461 -0.819409 -0.546965
+vn 0.620351 -0.562134 -0.546965
+vn 0.171461 -0.819409 -0.546965
+f 1/1/1 2/2/2 3/3/3
+f 3/3/3 4/4/4 1/1/1
+f 5/5/5 6/6/6 7/7/7
+f 7/7/7 8/8/8 5/5/5
+f 9/9/9 10/10/10 11/11/11
+f 11/11/11 12/12/12 9/9/9
+f 10/10/10 13/13/13 14/14/14
+f 14/14/14 11/11/11 10/10/10
+f 15/15/15 16/16/16 17/17/17
+f 17/17/17 18/18/18 15/15/15
+f 19/19/19 1/1/1 4/4/4
+f 4/4/4 20/20/20 19/19/19
+f 4/4/4 3/3/3 21/21/21
+f 21/21/21 22/22/22 4/4/4
+f 8/8/8 7/7/7 23/23/23
+f 23/23/23 24/24/24 8/8/8
+f 25/25/25 26/26/26 27/27/27
+f 27/27/27 28/28/28 25/25/25
+f 29/29/29 30/30/30 31/31/31
+f 31/31/31 32/32/32 29/29/29
+f 18/18/18 17/17/17 33/33/33
+f 33/33/33 34/34/34 18/18/18
+f 20/20/20 4/4/4 22/22/22
+f 22/22/22 35/35/35 20/20/20
+f 22/22/22 21/21/21 36/36/36
+f 36/36/36 37/37/37 22/22/22
+f 24/24/24 23/23/23 38/38/38
+f 38/38/38 39/39/39 24/24/24
+f 28/28/28 27/27/27 40/40/40
+f 40/40/40 41/41/41 28/28/28
+f 32/32/32 31/31/31 42/42/42
+f 42/42/42 43/43/43 32/32/32
+f 34/34/34 33/33/33 44/44/44
+f 44/44/44 45/45/45 34/34/34
+f 35/35/35 22/22/22 37/37/37
+f 37/37/37 46/46/46 35/35/35
+f 37/37/37 36/36/36 47/47/47
+f 47/47/47 48/48/48 37/37/37
+f 39/39/39 38/38/38 49/49/49
+f 49/49/49 50/50/50 39/39/39
+f 41/41/41 40/40/40 51/51/51
+f 51/51/51 52/52/52 41/41/41
+f 43/43/43 42/42/42 53/53/53
+f 53/53/53 54/54/54 43/43/43
+f 45/45/45 44/44/44 55/55/55
+f 55/55/55 56/56/56 45/45/45
+f 46/46/46 37/37/37 48/48/48
+f 48/48/48 57/57/57 46/46/46
+f 48/48/48 47/47/47 58/58/58
+f 58/58/58 59/59/59 48/48/48
+f 50/50/50 49/49/49 60/60/60
+f 60/60/60 61/61/61 50/50/50
+f 52/52/52 51/51/51 62/62/62
+f 62/62/62 63/63/63 52/52/52
+f 54/54/54 53/53/53 64/64/64
+f 64/64/64 65/65/65 54/54/54
+f 56/56/56 55/55/55 66/66/66
+f 66/66/66 67/67/67 56/56/56
+f 57/57/57 48/48/48 59/59/59
+f 59/59/59 68/68/68 57/57/57
+f 69/69/69 70/70/70 71/71/71
+f 69/69/69 72/72/72 70/70/70
+f 69/69/69 73/73/73 72/72/72
+f 69/69/69 74/74/74 73/73/73
+f 69/69/69 75/75/75 74/74/74
+f 69/69/69 71/71/71 75/75/75
+f 76/76/76 77/77/77 59/59/59
+f 76/76/76 59/59/59 58/58/58
+f 78/78/78 79/79/79 61/61/61
+f 78/78/78 61/61/61 60/60/60
+f 80/80/80 81/81/81 63/63/63
+f 80/80/80 63/63/63 62/62/62
+f 82/82/82 83/83/83 65/65/65
+f 82/82/82 65/65/65 64/64/64
+f 84/84/84 85/85/85 67/67/67
+f 84/84/84 67/67/67 66/66/66
+f 77/77/77 86/86/86 68/68/68
+f 77/77/77 68/68/68 59/59/59
+f 87/87/87 88/88/88 89/89/89
+f 89/89/89 90/90/90 87/87/87
+f 91/91/91 92/92/92 93/93/93
+f 93/93/93 94/94/94 91/91/91
+f 95/95/95 96/96/96 97/97/97
+f 97/97/97 98/98/98 95/95/95
+f 96/96/96 99/99/99 100/100/100
+f 100/100/100 97/97/97 96/96/96
+f 101/101/101 102/102/102 103/103/103
+f 103/103/103 104/104/104 101/101/101
+f 105/105/105 87/87/87 90/90/90
+f 90/90/90 106/106/106 105/105/105
+f 90/90/90 89/89/89 107/107/107
+f 107/107/107 108/108/108 90/90/90
+f 94/94/94 93/93/93 109/109/109
+f 109/109/109 110/110/110 94/94/94
+f 111/111/111 112/112/112 113/113/113
+f 113/113/113 114/114/114 111/111/111
+f 115/115/115 116/116/116 117/117/117
+f 117/117/117 118/118/118 115/115/115
+f 104/104/104 103/103/103 119/119/119
+f 119/119/119 120/120/120 104/104/104
+f 106/106/106 90/90/90 108/108/108
+f 108/108/108 121/121/121 106/106/106
+f 108/108/108 107/107/107 122/122/122
+f 122/122/122 123/123/123 108/108/108
+f 110/110/110 109/109/109 124/124/124
+f 124/124/124 125/125/125 110/110/110
+f 114/114/114 113/113/113 126/126/126
+f 126/126/126 127/127/127 114/114/114
+f 118/118/118 117/117/117 128/128/128
+f 128/128/128 129/129/129 118/118/118
+f 120/120/120 119/119/119 130/130/130
+f 130/130/130 131/131/131 120/120/120
+f 121/121/121 108/108/108 123/123/123
+f 123/123/123 132/132/132 121/121/121
+f 123/123/123 122/122/122 133/133/133
+f 133/133/133 134/134/134 123/123/123
+f 125/125/125 124/124/124 135/135/135
+f 135/135/135 136/136/136 125/125/125
+f 127/127/127 126/126/126 137/137/137
+f 137/137/137 138/138/138 127/127/127
+f 129/129/129 128/128/128 139/139/139
+f 139/139/139 140/140/140 129/129/129
+f 131/131/131 130/130/130 141/141/141
+f 141/141/141 142/142/142 131/131/131
+f 132/132/132 123/123/123 134/134/134
+f 134/134/134 143/143/143 132/132/132
+f 134/134/134 133/133/133 144/144/144
+f 144/144/144 145/145/145 134/134/134
+f 136/136/136 135/135/135 146/146/146
+f 146/146/146 147/147/147 136/136/136
+f 138/138/138 137/137/137 148/148/148
+f 148/148/148 149/149/149 138/138/138
+f 140/140/140 139/139/139 150/150/150
+f 150/150/150 151/151/151 140/140/140
+f 142/142/142 141/141/141 152/152/152
+f 152/152/152 153/153/153 142/142/142
+f 143/143/143 134/134/134 145/145/145
+f 145/145/145 154/154/154 143/143/143
+f 155/155/155 156/156/156 157/157/157
+f 155/155/155 158/158/158 156/156/156
+f 155/155/155 159/159/159 158/158/158
+f 155/155/155 160/160/160 159/159/159
+f 155/155/155 161/161/161 160/160/160
+f 155/155/155 157/157/157 161/161/161
+f 162/162/162 163/163/163 145/145/145
+f 162/162/162 145/145/145 144/144/144
+f 164/164/164 165/165/165 147/147/147
+f 164/164/164 147/147/147 146/146/146
+f 166/166/166 167/167/167 149/149/149
+f 166/166/166 149/149/149 148/148/148
+f 168/168/168 169/169/169 151/151/151
+f 168/168/168 151/151/151 150/150/150
+f 170/170/170 171/171/171 153/153/153
+f 170/170/170 153/153/153 152/152/152
+f 163/163/163 172/172/172 154/154/154
+f 163/163/163 154/154/154 145/145/145
+f 173/173/173 174/174/174 175/175/175
+f 175/175/175 176/176/176 173/173/173
+f 177/177/177 178/178/178 179/179/179
+f 179/179/179 180/180/180 177/177/177
+f 181/181/181 182/182/182 183/183/183
+f 183/183/183 184/184/184 181/181/181
+f 182/182/182 185/185/185 186/186/186
+f 186/186/186 183/183/183 182/182/182
+f 187/187/187 188/188/188 189/189/189
+f 189/189/189 190/190/190 187/187/187
+f 191/191/191 173/173/173 176/176/176
+f 176/176/176 192/192/192 191/191/191
+f 176/176/176 175/175/175 193/193/193
+f 193/193/193 194/194/194 176/176/176
+f 180/180/180 179/179/179 195/195/195
+f 195/195/195 196/196/196 180/180/180
+f 197/197/197 198/198/198 199/199/199
+f 199/199/199 200/200/200 197/197/197
+f 201/201/201 202/202/202 203/203/203
+f 203/203/203 204/204/204 201/201/201
+f 190/190/190 189/189/189 205/205/205
+f 205/205/205 206/206/206 190/190/190
+f 192/192/192 176/176/176 194/194/194
+f 194/194/194 207/207/207 192/192/192
+f 194/194/194 193/193/193 208/208/208
+f 208/208/208 209/209/209 194/194/194
+f 196/196/196 195/195/195 210/210/210
+f 210/210/210 211/211/211 196/196/196
+f 200/200/200 199/199/199 212/212/212
+f 212/212/212 213/213/213 200/200/200
+f 204/204/204 203/203/203 214/214/214
+f 214/214/214 215/215/215 204/204/204
+f 206/206/206 205/205/205 216/216/216
+f 216/216/216 217/217/217 206/206/206
+f 207/207/207 194/194/194 209/209/209
+f 209/209/209 218/218/218 207/207/207
+f 209/209/209 208/208/208 219/219/219
+f 219/219/219 220/220/220 209/209/209
+f 211/211/211 210/210/210 221/221/221
+f 221/221/221 222/222/222 211/211/211
+f 213/213/213 212/212/212 223/223/223
+f 223/223/223 224/224/224 213/213/213
+f 215/215/215 214/214/214 225/225/225
+f 225/225/225 226/226/226 215/215/215
+f 217/217/217 216/216/216 227/227/227
+f 227/227/227 228/228/228 217/217/217
+f 218/218/218 209/209/209 220/220/220
+f 220/220/220 229/229/229 218/218/218
+f 220/220/220 219/219/219 230/230/230
+f 230/230/230 231/231/231 220/220/220
+f 222/222/222 221/221/221 232/232/232
+f 232/232/232 233/233/233 222/222/222
+f 224/224/224 223/223/223 234/234/234
+f 234/234/234 235/235/235 224/224/224
+f 226/226/226 225/225/225 236/236/236
+f 236/236/236 237/237/237 226/226/226
+f 228/228/228 227/227/227 238/238/238
+f 238/238/238 239/239/239 228/228/228
+f 229/229/229 220/220/220 231/231/231
+f 231/231/231 240/240/240 229/229/229
+f 241/241/241 242/242/242 243/243/243
+f 241/241/241 244/244/244 242/242/242
+f 241/241/241 245/245/245 244/244/244
+f 241/241/241 246/246/246 245/245/245
+f 241/241/241 247/247/247 246/246/246
+f 241/241/241 243/243/243 247/247/247
+f 248/248/248 249/249/249 231/231/231
+f 248/248/248 231/231/231 230/230/230
+f 250/250/250 251/251/251 233/233/233
+f 250/250/250 233/233/233 232/232/232
+f 252/252/252 253/253/253 235/235/235
+f 252/252/252 235/235/235 234/234/234
+f 254/254/254 255/255/255 237/237/237
+f 254/254/254 237/237/237 236/236/236
+f 256/256/256 257/257/257 239/239/239
+f 256/256/256 239/239/239 238/238/238
+f 249/249/249 258/258/258 240/240/240
+f 249/249/249 240/240/240 231/231/231
+f 259/259/259 260/260/260 261/261/261
+f 261/261/261 262/262/262 259/259/259
+f 263/263/263 264/264/264 265/265/265
+f 265/265/265 266/266/266 263/263/263
+f 267/267/267 268/268/268 269/269/269
+f 269/269/269 270/270/270 267/267/267
+f 268/268/268 271/271/271 272/272/272
+f 272/272/272 269/269/269 268/268/268
+f 273/273/273 274/274/274 275/275/275
+f 275/275/275 276/276/276 273/273/273
+f 277/277/277 259/259/259 262/262/262
+f 262/262/262 278/278/278 277/277/277
+f 262/262/262 261/261/261 279/279/279
+f 279/279/279 280/280/280 262/262/262
+f 266/266/266 265/265/265 281/281/281
+f 281/281/281 282/282/282 266/266/266
+f 283/283/283 284/284/284 285/285/285
+f 285/285/285 286/286/286 283/283/283
+f 287/287/287 288/288/288 289/289/289
+f 289/289/289 290/290/290 287/287/287
+f 276/276/276 275/275/275 291/291/291
+f 291/291/291 292/292/292 276/276/276
+f 278/278/278 262/262/262 280/280/280
+f 280/280/280 293/293/293 278/278/278
+f 280/280/280 279/279/279 294/294/294
+f 294/294/294 295/295/295 280/280/280
+f 282/282/282 281/281/281 296/296/296
+f 296/296/296 297/297/297 282/282/282
+f 286/286/286 285/285/285 298/298/298
+f 298/298/298 299/299/299 286/286/286
+f 290/290/290 289/289/289 300/300/300
+f 300/300/300 301/301/301 290/290/290
+f 292/292/292 291/291/291 302/302/302
+f 302/302/302 303/303/303 292/292/292
+f 293/293/293 280/280/280 295/295/295
+f 295/295/295 304/304/304 293/293/293
+f 295/295/295 294/294/294 305/305/305
+f 305/305/305 306/306/306 295/295/295
+f 297/297/297 296/296/296 307/307/307
+f 307/307/307 308/308/308 297/297/297
+f 299/299/299 298/298/298 309/309/309
+f 309/309/309 310/310/310 299/299/299
+f 301/301/301 300/300/300 311/311/311
+f 311/311/311 312/312/312 301/301/301
+f 303/303/303 302/302/302 313/313/313
+f 313/313/313 314/314/314 303/303/303
+f 304/304/304 295/295/295 306/306/306
+f 306/306/306 315/315/315 304/304/304
+f 306/306/306 305/305/305 316/316/316
+f 316/316/316 317/317/317 306/306/306
+f 308/308/308 307/307/307 318/318/318
+f 318/318/318 319/319/319 308/308/308
+f 310/310/310 309/309/309 320/320/320
+f 320/320/320 321/321/321 310/310/310
+f 312/312/312 311/311/311 322/322/322
+f 322/322/322 323/323/323 312/312/312
+f 314/314/314 313/313/313 324/324/324
+f 324/324/324 325/325/325 314/314/314
+f 315/315/315 306/306/306 317/317/317
+f 317/317/317 326/326/326 315/315/315
+f 327/327/327 328/328/328 329/329/329
+f 327/327/327 330/330/330 328/328/328
+f 327/327/327 331/331/331 330/330/330
+f 327/327/327 332/332/332 331/331/331
+f 327/327/327 333/333/333 332/332/332
+f 327/327/327 329/329/329 333/333/333
+f 334/334/334 335/335/335 317/317/317
+f 334/334/334 317/317/317 316/316/316
+f 336/336/336 337/337/337 319/319/319
+f 336/336/336 319/319/319 318/318/318
+f 338/338/338 339/339/339 321/321/321
+f 338/338/338 321/321/321 320/320/320
+f 340/340/340 341/341/341 323/323/323
+f 340/340/340 323/323/323 322/322/322
+f 342/342/342 343/343/343 325/325/325
+f 342/342/342 325/325/325 324/324/324
+f 335/335/335 344/344/344 326/326/326
+f 335/335/335 326/326/326 317/317/317
+f 345/345/345 346/346/346 347/347/347
+f 345/345/345 348/348/348 346/346/346
+f 345/345/345 349/349/349 348/348/348
+f 345/345/345 350/350/350 349/349/349
+f 345/345/345 351/351/351 350/350/350
+f 345/345/345 352/352/352 351/351/351
+f 345/345/345 353/353/353 352/352/352
+f 345/345/345 347/347/347 353/353/353
+f 354/354/354 355/355/355 356/356/356
+f 354/354/354 356/356/356 357/357/357
+f 358/358/358 359/359/359 360/360/360
+f 358/358/358 360/360/360 361/361/361
+f 362/362/362 363/363/363 364/364/364
+f 362/362/362 364/364/364 365/365/365
+f 366/366/366 367/367/367 368/368/368
+f 366/366/366 368/368/368 369/369/369
+f 370/370/370 371/371/371 372/372/372
+f 370/370/370 372/372/372 373/373/373
+f 374/374/374 375/375/375 376/376/376
+f 374/374/374 376/376/376 377/377/377
+f 378/378/378 379/379/379 380/380/380
+f 378/378/378 380/380/380 381/381/381
+f 382/382/382 383/383/383 384/384/384
+f 382/382/382 384/384/384 385/385/385
+f 386/386/386 387/387/387 388/388/388
+f 386/386/386 388/388/388 389/389/389
+f 386/386/386 389/389/389 390/390/390
+f 386/386/386 390/390/390 391/391/391
+f 386/386/386 391/391/391 392/392/392
+f 386/386/386 392/392/392 393/393/393
+f 386/386/386 393/393/393 394/394/394
+f 386/386/386 394/394/394 387/387/387
+f 395/395/395 396/396/396 397/397/397
+f 397/397/397 398/398/398 395/395/395
+f 399/399/399 400/400/400 401/401/401
+f 401/401/401 402/402/402 399/399/399
+f 403/403/403 404/404/404 405/405/405
+f 405/405/405 406/406/406 403/403/403
+f 407/407/407 408/408/408 409/409/409
+f 409/409/409 410/410/410 407/407/407
+f 411/411/411 412/412/412 413/413/413
+f 413/413/413 414/414/414 411/411/411
+f 415/415/415 416/416/416 417/417/417
+f 417/417/417 418/418/418 415/415/415
+f 419/419/419 420/420/420 421/421/421
+f 421/421/421 422/422/422 419/419/419
+f 423/423/423 424/424/424 425/425/425
+f 425/425/425 426/426/426 423/423/423
+f 427/427/427 428/428/428 429/429/429
+f 429/429/429 430/430/430 427/427/427
+f 431/431/431 432/432/432 433/433/433
+f 433/433/433 434/434/434 431/431/431
+f 435/435/435 436/436/436 437/437/437
+f 437/437/437 438/438/438 435/435/435
+f 439/439/439 440/440/440 441/441/441
+f 441/441/441 442/442/442 439/439/439
+f 443/443/443 444/444/444 445/445/445
+f 445/445/445 446/446/446 443/443/443
+f 447/447/447 448/448/448 449/449/449
+f 449/449/449 450/450/450 447/447/447
+f 451/451/451 452/452/452 453/453/453
+f 453/453/453 454/454/454 451/451/451
+f 455/455/455 456/456/456 457/457/457
+f 457/457/457 458/458/458 455/455/455
+f 446/446/446 445/445/445 459/459/459
+f 459/459/459 460/460/460 446/446/446
+f 450/450/450 449/449/449 461/461/461
+f 461/461/461 462/462/462 450/450/450
+f 454/454/454 453/453/453 463/463/463
+f 463/463/463 464/464/464 454/454/454
+f 458/458/458 457/457/457 465/465/465
+f 465/465/465 466/466/466 458/458/458
+f 460/460/460 459/459/459 467/467/467
+f 467/467/467 468/468/468 460/460/460
+f 462/462/462 461/461/461 469/469/469
+f 469/469/469 470/470/470 462/462/462
+f 464/464/464 463/463/463 471/471/471
+f 471/471/471 472/472/472 464/464/464
+f 466/466/466 465/465/465 473/473/473
+f 473/473/473 474/474/474 466/466/466
+f 468/468/468 467/467/467 475/475/475
+f 475/475/475 476/476/476 468/468/468
+f 470/470/470 469/469/469 477/477/477
+f 477/477/477 478/478/478 470/470/470
+f 472/472/472 471/471/471 479/479/479
+f 479/479/479 480/480/480 472/472/472
+f 474/474/474 473/473/473 481/481/481
+f 481/481/481 482/482/482 474/474/474
+f 476/476/476 475/475/475 483/483/483
+f 483/483/483 484/484/484 476/476/476
+f 478/478/478 477/477/477 485/485/485
+f 485/485/485 486/486/486 478/478/478
+f 480/480/480 479/479/479 487/487/487
+f 487/487/487 488/488/488 480/480/480
+f 482/482/482 481/481/481 489/489/489
+f 489/489/489 490/490/490 482/482/482
+f 491/491/491 492/492/492 493/493/493
+f 493/493/493 494/494/494 491/491/491
+f 495/495/495 496/496/496 497/497/497
+f 497/497/497 498/498/498 495/495/495
+f 499/499/499 500/500/500 501/501/501
+f 501/501/501 502/502/502 499/499/499
+f 503/503/503 504/504/504 505/505/505
+f 505/505/505 506/506/506 503/503/503
+f 430/430/430 429/429/429 507/507/507
+f 507/507/507 508/508/508 430/430/430
+f 434/434/434 433/433/433 509/509/509
+f 509/509/509 510/510/510 434/434/434
+f 438/438/438 437/437/437 511/511/511
+f 511/511/511 512/512/512 438/438/438
+f 442/442/442 441/441/441 513/513/513
+f 513/513/513 514/514/514 442/442/442
+f 508/508/508 507/507/507 515/515/515
+f 515/515/515 516/516/516 508/508/508
+f 510/510/510 509/509/509 517/517/517
+f 517/517/517 518/518/518 510/510/510
+f 512/512/512 511/511/511 519/519/519
+f 519/519/519 520/520/520 512/512/512
+f 514/514/514 513/513/513 521/521/521
+f 521/521/521 522/522/522 514/514/514
+f 516/516/516 515/515/515 523/523/523
+f 523/523/523 524/524/524 516/516/516
+f 518/518/518 517/517/517 525/525/525
+f 525/525/525 526/526/526 518/518/518
+f 520/520/520 519/519/519 527/527/527
+f 527/527/527 528/528/528 520/520/520
+f 522/522/522 521/521/521 529/529/529
+f 529/529/529 530/530/530 522/522/522
+f 531/531/531 532/532/532 533/533/533
+f 533/533/533 534/534/534 531/531/531
+f 535/535/535 536/536/536 537/537/537
+f 537/537/537 538/538/538 535/535/535
+f 539/539/539 540/540/540 541/541/541
+f 541/541/541 542/542/542 539/539/539
+f 543/543/543 544/544/544 545/545/545
+f 545/545/545 546/546/546 543/543/543
+f 547/547/547 548/548/548 549/549/549
+f 549/549/549 550/550/550 547/547/547
+f 551/551/551 552/552/552 553/553/553
+f 553/553/553 554/554/554 551/551/551
+f 555/555/555 556/556/556 557/557/557
+f 557/557/557 558/558/558 555/555/555
+f 559/559/559 560/560/560 561/561/561
+f 561/561/561 562/562/562 559/559/559
+f 563/563/563 564/564/564 565/565/565
+f 565/565/565 566/566/566 563/563/563
+f 567/567/567 568/568/568 569/569/569
+f 569/569/569 570/570/570 567/567/567
+f 571/571/571 572/572/572 573/573/573
+f 573/573/573 574/574/574 571/571/571
+f 575/575/575 571/571/571 574/574/574
+f 574/574/574 576/576/576 575/575/575
+f 577/577/577 575/575/575 576/576/576
+f 576/576/576 578/578/578 577/577/577
+f 579/579/579 577/577/577 578/578/578
+f 578/578/578 580/580/580 579/579/579
+f 581/581/581 579/579/579 580/580/580
+f 580/580/580 582/582/582 581/581/581
+f 583/583/583 581/581/581 582/582/582
+f 582/582/582 584/584/584 583/583/583
+f 585/585/585 583/583/583 584/584/584
+f 584/584/584 586/586/586 585/585/585
+f 587/587/587 585/585/585 586/586/586
+f 586/586/586 588/588/588 587/587/587
+f 589/589/589 587/587/587 588/588/588
+f 588/588/588 590/590/590 589/589/589
+f 572/572/572 589/589/589 590/590/590
+f 590/590/590 573/573/573 572/572/572
+f 591/591/591 592/592/592 572/572/572
+f 572/572/572 571/571/571 591/591/591
+f 593/593/593 591/591/591 571/571/571
+f 571/571/571 575/575/575 593/593/593
+f 594/594/594 593/593/593 575/575/575
+f 575/575/575 577/577/577 594/594/594
+f 595/595/595 594/594/594 577/577/577
+f 577/577/577 579/579/579 595/595/595
+f 596/596/596 595/595/595 579/579/579
+f 579/579/579 581/581/581 596/596/596
+f 597/597/597 596/596/596 581/581/581
+f 581/581/581 583/583/583 597/597/597
+f 598/598/598 597/597/597 583/583/583
+f 583/583/583 585/585/585 598/598/598
+f 599/599/599 598/598/598 585/585/585
+f 585/585/585 587/587/587 599/599/599
+f 600/600/600 599/599/599 587/587/587
+f 587/587/587 589/589/589 600/600/600
+f 592/592/592 600/600/600 589/589/589
+f 589/589/589 572/572/572 592/592/592
+f 601/601/601 602/602/602 603/603/603
+f 603/603/603 604/604/604 601/601/601
+f 605/605/605 606/606/606 607/607/607
+f 607/607/607 608/608/608 605/605/605
+f 609/609/609 610/610/610 611/611/611
+f 611/611/611 612/612/612 609/609/609
+f 613/613/613 614/614/614 615/615/615
+f 615/615/615 616/616/616 613/613/613
+f 617/617/617 618/618/618 619/619/619
+f 619/619/619 620/620/620 617/617/617
+f 621/621/621 622/622/622 623/623/623
+f 623/623/623 624/624/624 621/621/621
+f 625/625/625 626/626/626 627/627/627
+f 627/627/627 628/628/628 625/625/625
+f 629/629/629 630/630/630 631/631/631
+f 631/631/631 632/632/632 629/629/629
+f 633/633/633 634/634/634 635/635/635
+f 635/635/635 636/636/636 633/633/633
+f 637/637/637 638/638/638 639/639/639
+f 639/639/639 640/640/640 637/637/637
+f 641/641/641 642/642/642 643/643/643
+f 643/643/643 644/644/644 641/641/641
+f 645/645/645 646/646/646 647/647/647
+f 647/647/647 648/648/648 645/645/645
+f 649/649/649 650/650/650 651/651/651
+f 651/651/651 652/652/652 649/649/649
+f 653/653/653 654/654/654 655/655/655
+f 655/655/655 656/656/656 653/653/653
+f 657/657/657 658/658/658 659/659/659
+f 659/659/659 660/660/660 657/657/657
+f 661/661/661 662/662/662 663/663/663
+f 663/663/663 664/664/664 661/661/661
+f 665/665/665 666/666/666 667/667/667
+f 667/667/667 668/668/668 665/665/665
+f 669/669/669 670/670/670 671/671/671
+f 671/671/671 672/672/672 669/669/669
+f 673/673/673 674/674/674 675/675/675
+f 675/675/675 676/676/676 673/673/673
+f 677/677/677 678/678/678 679/679/679
+f 679/679/679 680/680/680 677/677/677
+f 681/681/681 682/682/682 683/683/683
+f 683/683/683 684/684/684 681/681/681
+f 685/685/685 686/686/686 687/687/687
+f 687/687/687 688/688/688 685/685/685
+f 689/689/689 690/690/690 691/691/691
+f 691/691/691 692/692/692 689/689/689
+f 693/693/693 694/694/694 695/695/695
+f 695/695/695 696/696/696 693/693/693
+f 697/697/697 698/698/698 699/699/699
+f 699/699/699 700/700/700 697/697/697
+f 701/701/701 702/702/702 703/703/703
+f 703/703/703 704/704/704 701/701/701
+f 705/705/705 706/706/706 707/707/707
+f 707/707/707 708/708/708 705/705/705
+f 709/709/709 710/710/710 711/711/711
+f 711/711/711 712/712/712 709/709/709
+f 713/713/713 714/714/714 715/715/715
+f 715/715/715 716/716/716 713/713/713
+f 717/717/717 718/718/718 719/719/719
+f 719/719/719 720/720/720 717/717/717
+f 721/721/721 722/722/722 723/723/723
+f 723/723/723 724/724/724 721/721/721
+f 725/725/725 726/726/726 727/727/727
+f 727/727/727 728/728/728 725/725/725
+f 729/729/729 730/730/730 731/731/731
+f 731/731/731 732/732/732 729/729/729
+f 733/733/733 734/734/734 735/735/735
+f 735/735/735 736/736/736 733/733/733
+f 737/737/737 738/738/738 739/739/739
+f 739/739/739 740/740/740 737/737/737
+f 741/741/741 742/742/742 743/743/743
+f 743/743/743 744/744/744 741/741/741
+f 745/745/745 746/746/746 747/747/747
+f 747/747/747 748/748/748 745/745/745
+f 749/749/749 750/750/750 751/751/751
+f 751/751/751 752/752/752 749/749/749
+f 753/753/753 754/754/754 755/755/755
+f 755/755/755 756/756/756 753/753/753
+f 757/757/757 758/758/758 759/759/759
+f 759/759/759 760/760/760 757/757/757
+f 761/761/761 762/762/762 763/763/763
+f 763/763/763 764/764/764 761/761/761
+f 765/765/765 766/766/766 767/767/767
+f 767/767/767 768/768/768 765/765/765
+f 769/769/769 770/770/770 771/771/771
+f 771/771/771 772/772/772 769/769/769
+f 773/773/773 774/774/774 775/775/775
+f 775/775/775 776/776/776 773/773/773
+f 777/777/777 778/778/778 779/779/779
+f 779/779/779 780/780/780 777/777/777
+f 781/781/781 782/782/782 783/783/783
+f 783/783/783 784/784/784 781/781/781
+f 785/785/785 786/786/786 787/787/787
+f 787/787/787 788/788/788 785/785/785
+f 789/789/789 790/790/790 791/791/791
+f 791/791/791 792/792/792 789/789/789
+f 793/793/793 794/794/794 795/795/795
+f 795/795/795 796/796/796 793/793/793
+f 797/797/797 798/798/798 799/799/799
+f 799/799/799 800/800/800 797/797/797
+f 801/801/801 802/802/802 803/803/803
+f 803/803/803 804/804/804 801/801/801
+f 805/805/805 806/806/806 807/807/807
+f 807/807/807 808/808/808 805/805/805
+f 809/809/809 810/810/810 811/811/811
+f 811/811/811 812/812/812 809/809/809
+f 813/813/813 814/814/814 815/815/815
+f 815/815/815 816/816/816 813/813/813
+f 817/817/817 818/818/818 819/819/819
+f 819/819/819 820/820/820 817/817/817
+f 821/821/821 822/822/822 823/823/823
+f 823/823/823 824/824/824 821/821/821
+f 825/825/825 826/826/826 827/827/827
+f 827/827/827 828/828/828 825/825/825
+f 829/829/829 830/830/830 831/831/831
+f 831/831/831 832/832/832 829/829/829
+f 833/833/833 834/834/834 835/835/835
+f 835/835/835 836/836/836 833/833/833
+f 837/837/837 838/838/838 839/839/839
+f 839/839/839 840/840/840 837/837/837
+f 841/841/841 842/842/842 843/843/843
+f 843/843/843 844/844/844 841/841/841
+f 845/845/845 846/846/846 847/847/847
+f 847/847/847 848/848/848 845/845/845
+f 849/849/849 850/850/850 851/851/851
+f 851/851/851 852/852/852 849/849/849
+f 853/853/853 854/854/854 855/855/855
+f 855/855/855 856/856/856 853/853/853
+f 857/857/857 858/858/858 859/859/859
+f 859/859/859 860/860/860 857/857/857
+f 861/861/861 862/862/862 863/863/863
+f 863/863/863 864/864/864 861/861/861
+f 865/865/865 866/866/866 867/867/867
+f 867/867/867 868/868/868 865/865/865
+f 869/869/869 870/870/870 871/871/871
+f 871/871/871 872/872/872 869/869/869
+f 873/873/873 874/874/874 875/875/875
+f 875/875/875 876/876/876 873/873/873
+f 877/877/877 878/878/878 879/879/879
+f 879/879/879 880/880/880 877/877/877
+f 881/881/881 882/882/882 883/883/883
+f 881/881/881 883/883/883 884/884/884
+f 885/885/885 881/881/881 884/884/884
+f 885/885/885 884/884/884 886/886/886
+f 887/887/887 885/885/885 886/886/886
+f 887/887/887 886/886/886 888/888/888
+f 889/889/889 887/887/887 888/888/888
+f 889/889/889 888/888/888 890/890/890
+f 891/891/891 889/889/889 890/890/890
+f 891/891/891 890/890/890 892/892/892
+f 893/893/893 891/891/891 892/892/892
+f 893/893/893 892/892/892 894/894/894
+f 895/895/895 893/893/893 894/894/894
+f 895/895/895 894/894/894 896/896/896
+f 897/897/897 895/895/895 896/896/896
+f 897/897/897 896/896/896 898/898/898
+f 899/899/899 900/900/900 901/901/901
+f 899/899/899 901/901/901 902/902/902
+f 882/882/882 899/899/899 902/902/902
+f 882/882/882 902/902/902 883/883/883
+f 903/903/903 904/904/904 882/882/882
+f 903/903/903 882/882/882 881/881/881
+f 905/905/905 903/903/903 881/881/881
+f 905/905/905 881/881/881 885/885/885
+f 906/906/906 905/905/905 885/885/885
+f 906/906/906 885/885/885 887/887/887
+f 907/907/907 906/906/906 887/887/887
+f 907/907/907 887/887/887 889/889/889
+f 908/908/908 907/907/907 889/889/889
+f 908/908/908 889/889/889 891/891/891
+f 909/909/909 908/908/908 891/891/891
+f 909/909/909 891/891/891 893/893/893
+f 910/910/910 909/909/909 893/893/893
+f 910/910/910 893/893/893 895/895/895
+f 911/911/911 910/910/910 895/895/895
+f 911/911/911 895/895/895 897/897/897
+f 912/912/912 913/913/913 900/900/900
+f 912/912/912 900/900/900 899/899/899
+f 904/904/904 912/912/912 899/899/899
+f 904/904/904 899/899/899 882/882/882
+f 914/914/914 915/915/915 904/904/904
+f 914/914/914 904/904/904 903/903/903
+f 916/916/916 914/914/914 903/903/903
+f 916/916/916 903/903/903 905/905/905
+f 917/917/917 916/916/916 905/905/905
+f 917/917/917 905/905/905 906/906/906
+f 918/918/918 917/917/917 906/906/906
+f 918/918/918 906/906/906 907/907/907
+f 919/919/919 918/918/918 907/907/907
+f 919/919/919 907/907/907 908/908/908
+f 920/920/920 919/919/919 908/908/908
+f 920/920/920 908/908/908 909/909/909
+f 921/921/921 920/920/920 909/909/909
+f 921/921/921 909/909/909 910/910/910
+f 922/922/922 921/921/921 910/910/910
+f 922/922/922 910/910/910 911/911/911
+f 923/923/923 924/924/924 913/913/913
+f 923/923/923 913/913/913 912/912/912
+f 915/915/915 923/923/923 912/912/912
+f 915/915/915 912/912/912 904/904/904
+f 925/925/925 926/926/926 915/915/915
+f 925/925/925 915/915/915 914/914/914
+f 927/927/927 925/925/925 914/914/914
+f 927/927/927 914/914/914 916/916/916
+f 928/928/928 927/927/927 916/916/916
+f 928/928/928 916/916/916 917/917/917
+f 929/929/929 928/928/928 917/917/917
+f 929/929/929 917/917/917 918/918/918
+f 930/930/930 929/929/929 918/918/918
+f 930/930/930 918/918/918 919/919/919
+f 931/931/931 930/930/930 919/919/919
+f 931/931/931 919/919/919 920/920/920
+f 932/932/932 931/931/931 920/920/920
+f 932/932/932 920/920/920 921/921/921
+f 933/933/933 932/932/932 921/921/921
+f 933/933/933 921/921/921 922/922/922
+f 934/934/934 935/935/935 924/924/924
+f 934/934/934 924/924/924 923/923/923
+f 926/926/926 934/934/934 923/923/923
+f 926/926/926 923/923/923 915/915/915
+f 936/936/936 937/937/937 926/926/926
+f 936/936/936 926/926/926 925/925/925
+f 938/938/938 936/936/936 925/925/925
+f 938/938/938 925/925/925 927/927/927
+f 939/939/939 938/938/938 927/927/927
+f 939/939/939 927/927/927 928/928/928
+f 940/940/940 939/939/939 928/928/928
+f 940/940/940 928/928/928 929/929/929
+f 941/941/941 940/940/940 929/929/929
+f 941/941/941 929/929/929 930/930/930
+f 942/942/942 941/941/941 930/930/930
+f 942/942/942 930/930/930 931/931/931
+f 943/943/943 942/942/942 931/931/931
+f 943/943/943 931/931/931 932/932/932
+f 944/944/944 943/943/943 932/932/932
+f 944/944/944 932/932/932 933/933/933
+f 945/945/945 946/946/946 935/935/935
+f 945/945/945 935/935/935 934/934/934
+f 937/937/937 945/945/945 934/934/934
+f 937/937/937 934/934/934 926/926/926
diff --git a/tests/bullet/install-sh b/tests/bullet/install-sh
new file mode 100755
index 00000000..b777f124
--- /dev/null
+++ b/tests/bullet/install-sh
@@ -0,0 +1,322 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2004-07-05.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch. It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+chmodcmd="$chmodprog 0755"
+chowncmd=
+chgrpcmd=
+stripcmd=
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=
+dst=
+dir_arg=
+dstarg=
+no_target_directory=
+
+usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+-c (ignored)
+-d create directories instead of installing files.
+-g GROUP $chgrpprog installed files to GROUP.
+-m MODE $chmodprog installed files to MODE.
+-o USER $chownprog installed files to USER.
+-s $stripprog installed files.
+-t DIRECTORY install into DIRECTORY.
+-T report an error if DSTFILE is a directory.
+--help display this help and exit.
+--version display version info and exit.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
+"
+
+while test -n "$1"; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ --help) echo "$usage"; exit 0;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd=$stripprog
+ shift
+ continue;;
+
+ -t) dstarg=$2
+ shift
+ shift
+ continue;;
+
+ -T) no_target_directory=true
+ shift
+ continue;;
+
+ --version) echo "$0 $scriptversion"; exit 0;;
+
+ *) # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ test -n "$dir_arg$dstarg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
+ esac
+done
+
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
+
+ if test -d "$dst"; then
+ mkdircmd=:
+ chmodcmd=
+ else
+ mkdircmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dstarg: Is a directory" >&2
+ exit 1
+ fi
+ dst=$dst/`basename "$src"`
+ fi
+ fi
+
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp"
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test -d "$pathcomp" || exit
+ fi
+ pathcomp=$pathcomp/
+ done
+ fi
+
+ if test -n "$dir_arg"; then
+ $doit $mkdircmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Copy the file name to the temp name.
+ $doit $cpprog "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now rename the file to the real destination.
+ { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
+ || {
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ }
+ }
+ fi || { (exit 1); exit; }
+done
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+{
+ (exit 0); exit
+}
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/tests/bullet/lib/readme.txt b/tests/bullet/lib/readme.txt
new file mode 100644
index 00000000..9c19ebd1
--- /dev/null
+++ b/tests/bullet/lib/readme.txt
@@ -0,0 +1,13 @@
+At the moment there are no binary packages from Bullet library.
+Once this is done, 3 libraries will be placed here:
+
+bulletmath.a
+bulletcollision.a
+bulletdynamics.a
+
+The C-API will be available in the include folder.
+
+For now, there is only C++ files, see src/btBulletCollisionCommon.h and src/btBulletDynamicsCommon.h
+
+http://bullet.sf.net
+Erwin Coumans
diff --git a/tests/bullet/ltmain.sh b/tests/bullet/ltmain.sh
new file mode 100755
index 00000000..174e4923
--- /dev/null
+++ b/tests/bullet/ltmain.sh
@@ -0,0 +1,7874 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.4
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.2.4
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=2.2.4
+TIMESTAMP=""
+package_revision=1.2976
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/usr/bin/grep -E"}
+: ${FGREP="/usr/bin/grep -F"}
+: ${GREP="/usr/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/opt/local/bin/gsed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ $ECHO "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ $ECHO "enable shared libraries"
+ else
+ $ECHO "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ $ECHO "enable static libraries"
+ else
+ $ECHO "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ case $host in
+ *cygwin* | *mingw* | *pw32*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $ECHO
+ $ECHO "If you ever happen to want to link against installed libraries"
+ $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+ $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $ECHO "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
+
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin*|*mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper arg
+#
+# emit a libtool wrapper script on stdout
+# don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variable
+# set therein.
+#
+# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the '.lib' directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+# end: func_emit_wrapper
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "$SHELL $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+static const char *script_text =
+EOF
+
+ func_emit_wrapper yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+
+ cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *shwrapper_name;
+ intptr_t rval = 127;
+ FILE *shwrapper;
+
+ const char *dumpscript_opt = "--lt-dump-script";
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+ /* very simple arg parsing; don't want to rely on getopt */
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<EOF
+ printf ("%s", script_text);
+ return 0;
+ }
+ }
+
+ newargz = XMALLOC (char *, argc + 2);
+EOF
+
+ if test -n "$TARGETSHELL" ; then
+ # no path translation at all
+ lt_newargv0=$TARGETSHELL
+ else
+ case "$host" in
+ *mingw* )
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ lt_newargv0=`( cmd //c echo $SHELL | $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo $SHELL`
+ case $lt_newargv0 in
+ *.exe | *.EXE) ;;
+ *) lt_newargv0=$lt_newargv0.exe ;;
+ esac
+ ;;
+ * ) lt_newargv0=$SHELL ;;
+ esac
+ fi
+
+ cat <<EOF
+ newargz[0] = (char *) xstrdup ("$lt_newargv0");
+EOF
+
+ cat <<"EOF"
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal ("Couldn't find %s", argv[0]);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+ tmp_pathspec));
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+ actual_cwrapper_path));
+ XFREE (tmp_pathspec);
+
+ shwrapper_name = (char *) xstrdup (base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, shwrapper_name);
+
+ /* shwrapper_name transforms */
+ strendzap (shwrapper_name, ".exe");
+ tmp_pathspec = XMALLOC (char, (strlen (shwrapper_name) +
+ strlen ("_ltshwrapperTMP") + 1));
+ strcpy (tmp_pathspec, shwrapper_name);
+ strcat (tmp_pathspec, "_ltshwrapperTMP");
+ XFREE (shwrapper_name);
+ shwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+ LTWRAPPER_DEBUGPRINTF (("(main) libtool shell wrapper name: %s\n",
+ shwrapper_name));
+EOF
+
+ cat <<EOF
+ newargz[1] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (shwrapper_name) + 1));
+ strcpy (newargz[1], actual_cwrapper_path);
+ strcat (newargz[1], "$objdir");
+ strcat (newargz[1], "/");
+ strcat (newargz[1], shwrapper_name);
+EOF
+
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[1], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (shwrapper_name);
+ XFREE (actual_cwrapper_path);
+
+ /* always write in binary mode */
+ if ((shwrapper = fopen (newargz[1], FOPEN_WB)) == 0)
+ {
+ lt_fatal ("Could not open %s for writing", newargz[1]);
+ }
+ fprintf (shwrapper, "%s", script_text);
+ fclose (shwrapper);
+
+ make_executable (newargz[1]);
+
+ for (i = 1; i < argc; i++)
+ newargz[i + 1] = xstrdup (argv[i]);
+ newargz[argc + 1] = NULL;
+
+ for (i = 0; i < argc + 1; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, newargz[i]));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<EOF
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, "$lt_newargv0", (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"$lt_newargv0\": errno = %d\n", errno));
+ return 127;
+ }
+ return rval;
+}
+EOF
+ ;;
+ *)
+ cat <<EOF
+ execv ("$lt_newargv0", newargz);
+ return rval; /* =127, but avoids unused variable warning */
+}
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+ tmp_pathspec));
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("Could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which I believe you do not have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ $ECHO "*** make it link in! You will probably need to install it or some"
+ $ECHO "*** library that it depends on before this library will be fully"
+ $ECHO "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $ECHO "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $ECHO "*** The inter-library dependencies that have been dropped here will be"
+ $ECHO "*** automatically added whenever a program is linked with this library"
+ $ECHO "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $ECHO
+ $ECHO "*** Since this library must not contain undefined symbols,"
+ $ECHO "*** because either the platform does not support them or"
+ $ECHO "*** it was explicitly requested with -no-undefined,"
+ $ECHO "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=$obj
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/tests/bullet/missing b/tests/bullet/missing
new file mode 100755
index 00000000..1c8ff704
--- /dev/null
+++ b/tests/bullet/missing
@@ -0,0 +1,367 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+
+scriptversion=2006-05-10.23
+
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
+# Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+ configure_ac=configure.ac
+else
+ configure_ac=configure.in
+fi
+
+msg="missing on your system"
+
+case $1 in
+--run)
+ # Try to run requested program, and just exit if it succeeds.
+ run=
+ shift
+ "$@" && exit 0
+ # Exit code 63 means version mismatch. This often happens
+ # when the user try to use an ancient version of a tool on
+ # a file that requires a minimum version. In this case we
+ # we should proceed has if the program had been absent, or
+ # if --run hadn't been passed.
+ if test $? = 63; then
+ run=:
+ msg="probably too old"
+ fi
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+ --run try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ help2man touch the output file
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ tar try tar, gnutar, gtar, then tar without non-portable flags
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+
+Send bug reports to <bug-automake@gnu.org>."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program).
+case $1 in
+ lex|yacc)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
+ if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+ # We have it, but it failed.
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
+ fi
+ ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $1 in
+ aclocal*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acinclude.m4' or \`${configure_ac}'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`${configure_ac}'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`acconfig.h' or \`${configure_ac}'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+ test -z "$files" && files="config.h"
+ touch_files=
+ for f in $files; do
+ case $f in
+ *:*) touch_files="$touch_files "`echo "$f" |
+ sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+ *) touch_files="$touch_files $f.in";;
+ esac
+ done
+ touch $touch_files
+ ;;
+
+ automake*)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print |
+ sed 's/\.am$/.in/' |
+ while read f; do touch "$f"; done
+ ;;
+
+ autom4te)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, but is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them.
+ You can get \`$1' as part of \`Autoconf' from any GNU
+ archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo "#! /bin/sh"
+ echo "# Created by GNU Automake missing as a replacement of"
+ echo "# $ $@"
+ echo "exit 0"
+ chmod +x $file
+ exit 1
+ fi
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' $msg. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f y.tab.h; then
+ echo >y.tab.h
+ fi
+ if test ! -f y.tab.c; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if test $# -ne 1; then
+ eval LASTARG="\${$#}"
+ case $LASTARG in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if test -f "$SRCFILE"; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if test ! -f lex.yy.c; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ help2man)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a dependency of a manual page. You may need the
+ \`Help2man' package in order for those modifications to take
+ effect. You can get \`Help2man' from any GNU archive site."
+
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
+ touch $file
+ else
+ test -z "$file" || exec >$file
+ echo ".ab help2man is required to generate this page"
+ exit 1
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is $msg. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -z "$file"; then
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
+ fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
+ touch $file
+ ;;
+
+ tar)
+ shift
+
+ # We have already tried tar in the generic part.
+ # Look for gnutar/gtar before invocation to avoid ugly error
+ # messages.
+ if (gnutar --version > /dev/null 2>&1); then
+ gnutar "$@" && exit 0
+ fi
+ if (gtar --version > /dev/null 2>&1); then
+ gtar "$@" && exit 0
+ fi
+ firstarg="$1"
+ if shift; then
+ case $firstarg in
+ *o*)
+ firstarg=`echo "$firstarg" | sed s/o//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ case $firstarg in
+ *h*)
+ firstarg=`echo "$firstarg" | sed s/h//`
+ tar "$firstarg" "$@" && exit 0
+ ;;
+ esac
+ fi
+
+ echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+ You may want to install GNU tar or Free paxutils, or check the
+ command line arguments."
+ exit 1
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and is $msg.
+ You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequisites for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/tests/bullet/output.txt b/tests/bullet/output.txt
index 6219fafe..9e8143a0 100644
--- a/tests/bullet/output.txt
+++ b/tests/bullet/output.txt
@@ -1,200 +1,270 @@
-world pos = 2.00000,9.99722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.99167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.98333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.97222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.95833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.94167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.92222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.90000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.87500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.84722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.81667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.78333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.74722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.70833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.66667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.62222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.57500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.52500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.47222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.41667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.35833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.29722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.23333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.16667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.09722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,9.02500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.95000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.87222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.79167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.70833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.62222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.53333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.44167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.34722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.25000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.15000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,8.04722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.94167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.83333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.72222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.60833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.49167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.37222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.25000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,7.12500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.99722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.86667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.73333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.59722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.45833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.31667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.17222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,6.02500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,5.87500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,5.72222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,5.56667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,5.40833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,5.24722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,5.08333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,4.91667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,4.74722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,4.57500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,4.40000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,4.22222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,4.04167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,3.85833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,3.67222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,3.48333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,3.29167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,3.09722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,2.90000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,2.70000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,2.49722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,2.29167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,2.08333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,1.87222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,1.65833,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,1.44167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,1.22222,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,1.00000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,0.77500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,0.54722,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,0.31667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,0.08333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-0.15278,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-0.39167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-0.63333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-0.87778,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-1.12500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-1.37500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-1.62778,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-1.88333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-2.14167,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-2.40278,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-2.66667,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-2.93333,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-3.20278,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-3.47500,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-3.75000,0.00000
-world pos = 0.00000,-56.00000,0.00000
-world pos = 2.00000,-4.02778,0.00000
-world pos = 0.00000,-56.00000,0.00000
+world pos = 2.00,10.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.99,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.98,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.97,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.96,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.94,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.92,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.90,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.87,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.85,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.82,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.78,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.75,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.71,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.67,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.62,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.57,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.52,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.47,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.42,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.36,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.30,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.23,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.17,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.10,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,9.02,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.95,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.87,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.79,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.71,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.62,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.53,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.44,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.35,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.25,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.15,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,8.05,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.94,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.83,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.72,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.61,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.49,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.37,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.25,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.12,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,7.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,6.87,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,6.73,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,6.60,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,6.46,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,6.32,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,6.17,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,6.02,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,5.87,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,5.72,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,5.57,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,5.41,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,5.25,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,5.08,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,4.92,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,4.75,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,4.57,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,4.40,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,4.22,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,4.04,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,3.86,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,3.67,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,3.48,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,3.29,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,3.10,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,2.90,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,2.70,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,2.50,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,2.29,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,2.08,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,1.87,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,1.66,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,1.44,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,1.22,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,1.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,0.77,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,0.55,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,0.32,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,0.08,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-0.15,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-0.39,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-0.63,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-0.88,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-1.13,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-1.38,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-1.63,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-1.88,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-2.14,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-2.40,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-2.67,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-2.93,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-3.20,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-3.48,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-3.75,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.03,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.31,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.59,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.88,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.17,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.13,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.10,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.08,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.05,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.03,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.01,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.99,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.98,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.97,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.96,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.95,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.95,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.95,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.95,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.96,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.97,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.98,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-4.99,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
+world pos = 2.00,-5.00,0.00
+world pos = 0.00,-56.00,0.00
diff --git a/tests/bullet/readme.txt b/tests/bullet/readme.txt
index b486b941..b524e36f 100644
--- a/tests/bullet/readme.txt
+++ b/tests/bullet/readme.txt
@@ -1,29 +1,4 @@
-The files in this directory were generated from the Bullet Physics library, version 2.77,
+The files in this directory are the Bullet Physics library, version 2.78.
- http://bulletphysics.org/
-
-which is zlib licensed.
-
-To get the build system to generate .ll files, this was added to the CMakeLists.txt:
-
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
-
-+ SET(CMAKE_C_COMPILER "/..PATH../llvm-gcc-4.2-2.8.source/cbuild/install/bin/llvm-gcc")
-+ SET(CMAKE_CXX_COMPILER "/..PATH../llvm-gcc-4.2-2.8.source/cbuild/install/bin/llvm-g++")
-+ SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -emit-llvm)
-+ SET(CMAKE_LINKER "/..PATH../llvm-2.8/cbuild/Release/bin/llvm-link")
-+ SET(CMAKE_CXX_LINKER "/..PATH../llvm-2.8/cbuild/Release/bin/llvm-link")
-+ SET(CMAKE_C_LINK_EXECUTABLE "/..PATH../llvm-2.8/cbuild/Release/bin/llvm-link")
-+ SET(CMAKE_CXX_LINK_EXECUTABLE "/..PATH../llvm-2.8/cbuild/Release/bin/llvm-link")
-+ SET(CMAKE_AR "/..PATH../llvm-2.8/cbuild/Release/bin/llvm-link")
-+ SET(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> -S -o <TARGET> <LINK_FLAGS> <OBJECTS>")
-+ SET(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> -S -o <TARGET> <LINK_FLAGS> <OBJECTS>")
-+ SET(CMAKE_RANLIB "echo") # Hackish way to disable it
-
- MESSAGE("CMAKE_CXX_FLAGS_DEBUG="+${CMAKE_CXX_FLAGS_DEBUG})
-
-
-Afterwards they were combined using llvm-link, and disassembled with
-
- llvm-dis -show-annotations
+See README and LICENSE files for details.
diff --git a/tests/bullet/src/Bullet-C-Api.h b/tests/bullet/src/Bullet-C-Api.h
new file mode 100644
index 00000000..f27a17d5
--- /dev/null
+++ b/tests/bullet/src/Bullet-C-Api.h
@@ -0,0 +1,176 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/*
+ Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's.
+ Work in progress, functionality will be added on demand.
+
+ If possible, use the richer Bullet C++ API, by including "btBulletDynamicsCommon.h"
+*/
+
+#ifndef BULLET_C_API_H
+#define BULLET_C_API_H
+
+#define PL_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
+
+#ifdef BT_USE_DOUBLE_PRECISION
+typedef double plReal;
+#else
+typedef float plReal;
+#endif
+
+typedef plReal plVector3[3];
+typedef plReal plQuaternion[4];
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** Particular physics SDK (C-API) */
+ PL_DECLARE_HANDLE(plPhysicsSdkHandle);
+
+/** Dynamics world, belonging to some physics SDK (C-API)*/
+ PL_DECLARE_HANDLE(plDynamicsWorldHandle);
+
+/** Rigid Body that can be part of a Dynamics World (C-API)*/
+ PL_DECLARE_HANDLE(plRigidBodyHandle);
+
+/** Collision Shape/Geometry, property of a Rigid Body (C-API)*/
+ PL_DECLARE_HANDLE(plCollisionShapeHandle);
+
+/** Constraint for Rigid Bodies (C-API)*/
+ PL_DECLARE_HANDLE(plConstraintHandle);
+
+/** Triangle Mesh interface (C-API)*/
+ PL_DECLARE_HANDLE(plMeshInterfaceHandle);
+
+/** Broadphase Scene/Proxy Handles (C-API)*/
+ PL_DECLARE_HANDLE(plCollisionBroadphaseHandle);
+ PL_DECLARE_HANDLE(plBroadphaseProxyHandle);
+ PL_DECLARE_HANDLE(plCollisionWorldHandle);
+
+/**
+ Create and Delete a Physics SDK
+*/
+
+ extern plPhysicsSdkHandle plNewBulletSdk(void); //this could be also another sdk, like ODE, PhysX etc.
+ extern void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk);
+
+/** Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
+
+ typedef void(*btBroadphaseCallback)(void* clientData, void* object1,void* object2);
+
+ extern plCollisionBroadphaseHandle plCreateSapBroadphase(btBroadphaseCallback beginCallback,btBroadphaseCallback endCallback);
+
+ extern void plDestroyBroadphase(plCollisionBroadphaseHandle bp);
+
+ extern plBroadphaseProxyHandle plCreateProxy(plCollisionBroadphaseHandle bp, void* clientData, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ);
+
+ extern void plDestroyProxy(plCollisionBroadphaseHandle bp, plBroadphaseProxyHandle proxyHandle);
+
+ extern void plSetBoundingBox(plBroadphaseProxyHandle proxyHandle, plReal minX,plReal minY,plReal minZ, plReal maxX,plReal maxY, plReal maxZ);
+
+/* todo: add pair cache support with queries like add/remove/find pair */
+
+ extern plCollisionWorldHandle plCreateCollisionWorld(plPhysicsSdkHandle physicsSdk);
+
+/* todo: add/remove objects */
+
+
+/* Dynamics World */
+
+ extern plDynamicsWorldHandle plCreateDynamicsWorld(plPhysicsSdkHandle physicsSdk);
+
+ extern void plDeleteDynamicsWorld(plDynamicsWorldHandle world);
+
+ extern void plStepSimulation(plDynamicsWorldHandle, plReal timeStep);
+
+ extern void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object);
+
+ extern void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object);
+
+
+/* Rigid Body */
+
+ extern plRigidBodyHandle plCreateRigidBody( void* user_data, float mass, plCollisionShapeHandle cshape );
+
+ extern void plDeleteRigidBody(plRigidBodyHandle body);
+
+
+/* Collision Shape definition */
+
+ extern plCollisionShapeHandle plNewSphereShape(plReal radius);
+ extern plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plReal z);
+ extern plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height);
+ extern plCollisionShapeHandle plNewConeShape(plReal radius, plReal height);
+ extern plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height);
+ extern plCollisionShapeHandle plNewCompoundShape(void);
+ extern void plAddChildShape(plCollisionShapeHandle compoundShape,plCollisionShapeHandle childShape, plVector3 childPos,plQuaternion childOrn);
+
+ extern void plDeleteShape(plCollisionShapeHandle shape);
+
+ /* Convex Meshes */
+ extern plCollisionShapeHandle plNewConvexHullShape(void);
+ extern void plAddVertex(plCollisionShapeHandle convexHull, plReal x,plReal y,plReal z);
+/* Concave static triangle meshes */
+ extern plMeshInterfaceHandle plNewMeshInterface(void);
+ extern void plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2);
+ extern plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle);
+
+ extern void plSetScaling(plCollisionShapeHandle shape, plVector3 scaling);
+
+/* SOLID has Response Callback/Table/Management */
+/* PhysX has Triggers, User Callbacks and filtering */
+/* ODE has the typedef void dNearCallback (void *data, dGeomID o1, dGeomID o2); */
+
+/* typedef void plUpdatedPositionCallback(void* userData, plRigidBodyHandle rbHandle, plVector3 pos); */
+/* typedef void plUpdatedOrientationCallback(void* userData, plRigidBodyHandle rbHandle, plQuaternion orientation); */
+
+ /* get world transform */
+ extern void plGetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix);
+ extern void plGetPosition(plRigidBodyHandle object,plVector3 position);
+ extern void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation);
+
+ /* set world transform (position/orientation) */
+ extern void plSetPosition(plRigidBodyHandle object, const plVector3 position);
+ extern void plSetOrientation(plRigidBodyHandle object, const plQuaternion orientation);
+ extern void plSetEuler(plReal yaw,plReal pitch,plReal roll, plQuaternion orient);
+ extern void plSetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix);
+
+ typedef struct plRayCastResult {
+ plRigidBodyHandle m_body;
+ plCollisionShapeHandle m_shape;
+ plVector3 m_positionWorld;
+ plVector3 m_normalWorld;
+ } plRayCastResult;
+
+ extern int plRayCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plRayCastResult res);
+
+ /* Sweep API */
+
+ /* extern plRigidBodyHandle plObjectCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal); */
+
+ /* Continuous Collision Detection API */
+
+ // needed for source/blender/blenkernel/intern/collision.c
+ double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3]);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif //BULLET_C_API_H
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
new file mode 100644
index 00000000..77763305
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
@@ -0,0 +1,37 @@
+
+//Bullet Continuous Collision Detection and Physics Library
+//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+
+//
+// btAxisSweep3
+//
+// Copyright (c) 2006 Simon Hobbs
+//
+// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+#include "btAxisSweep3.h"
+
+
+btAxisSweep3::btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator)
+:btAxisSweep3Internal<unsigned short int>(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache,disableRaycastAccelerator)
+{
+ // 1 handle is reserved as sentinel
+ btAssert(maxHandles > 1 && maxHandles < 32767);
+
+}
+
+
+bt32BitAxisSweep3::bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache , bool disableRaycastAccelerator)
+:btAxisSweep3Internal<unsigned int>(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache,disableRaycastAccelerator)
+{
+ // 1 handle is reserved as sentinel
+ btAssert(maxHandles > 1 && maxHandles < 2147483647);
+}
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h
new file mode 100644
index 00000000..4f4d94b3
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h
@@ -0,0 +1,1051 @@
+//Bullet Continuous Collision Detection and Physics Library
+//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+//
+// btAxisSweep3.h
+//
+// Copyright (c) 2006 Simon Hobbs
+//
+// This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
+//
+// Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
+//
+// 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+//
+// 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+//
+// 3. This notice may not be removed or altered from any source distribution.
+
+#ifndef BT_AXIS_SWEEP_3_H
+#define BT_AXIS_SWEEP_3_H
+
+#include "LinearMath/btVector3.h"
+#include "btOverlappingPairCache.h"
+#include "btBroadphaseInterface.h"
+#include "btBroadphaseProxy.h"
+#include "btOverlappingPairCallback.h"
+#include "btDbvtBroadphase.h"
+
+//#define DEBUG_BROADPHASE 1
+#define USE_OVERLAP_TEST_ON_REMOVES 1
+
+/// The internal templace class btAxisSweep3Internal implements the sweep and prune broadphase.
+/// It uses quantized integers to represent the begin and end points for each of the 3 axis.
+/// Dont use this class directly, use btAxisSweep3 or bt32BitAxisSweep3 instead.
+template <typename BP_FP_INT_TYPE>
+class btAxisSweep3Internal : public btBroadphaseInterface
+{
+protected:
+
+ BP_FP_INT_TYPE m_bpHandleMask;
+ BP_FP_INT_TYPE m_handleSentinel;
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ class Edge
+ {
+ public:
+ BP_FP_INT_TYPE m_pos; // low bit is min/max
+ BP_FP_INT_TYPE m_handle;
+
+ BP_FP_INT_TYPE IsMax() const {return static_cast<BP_FP_INT_TYPE>(m_pos & 1);}
+ };
+
+public:
+ class Handle : public btBroadphaseProxy
+ {
+ public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ // indexes into the edge arrays
+ BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3]; // 6 * 2 = 12
+// BP_FP_INT_TYPE m_uniqueId;
+ btBroadphaseProxy* m_dbvtProxy;//for faster raycast
+ //void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject
+
+ SIMD_FORCE_INLINE void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;}
+ SIMD_FORCE_INLINE BP_FP_INT_TYPE GetNextFree() const {return m_minEdges[0];}
+ }; // 24 bytes + 24 for Edge structures = 44 bytes total per entry
+
+
+protected:
+ btVector3 m_worldAabbMin; // overall system bounds
+ btVector3 m_worldAabbMax; // overall system bounds
+
+ btVector3 m_quantize; // scaling factor for quantization
+
+ BP_FP_INT_TYPE m_numHandles; // number of active handles
+ BP_FP_INT_TYPE m_maxHandles; // max number of handles
+ Handle* m_pHandles; // handles pool
+
+ BP_FP_INT_TYPE m_firstFreeHandle; // free handles list
+
+ Edge* m_pEdges[3]; // edge arrays for the 3 axes (each array has m_maxHandles * 2 + 2 sentinel entries)
+ void* m_pEdgesRawPtr[3];
+
+ btOverlappingPairCache* m_pairCache;
+
+ ///btOverlappingPairCallback is an additional optional user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.
+ btOverlappingPairCallback* m_userPairCallback;
+
+ bool m_ownsPairCache;
+
+ int m_invalidPair;
+
+ ///additional dynamic aabb structure, used to accelerate ray cast queries.
+ ///can be disabled using a optional argument in the constructor
+ btDbvtBroadphase* m_raycastAccelerator;
+ btOverlappingPairCache* m_nullPairCache;
+
+
+ // allocation/deallocation
+ BP_FP_INT_TYPE allocHandle();
+ void freeHandle(BP_FP_INT_TYPE handle);
+
+
+ bool testOverlap2D(const Handle* pHandleA, const Handle* pHandleB,int axis0,int axis1);
+
+#ifdef DEBUG_BROADPHASE
+ void debugPrintAxis(int axis,bool checkCardinality=true);
+#endif //DEBUG_BROADPHASE
+
+ //Overlap* AddOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB);
+ //void RemoveOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB);
+
+
+
+ void sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
+ void sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
+ void sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
+ void sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
+
+public:
+
+ btAxisSweep3Internal(const btVector3& worldAabbMin,const btVector3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0,bool disableRaycastAccelerator = false);
+
+ virtual ~btAxisSweep3Internal();
+
+ BP_FP_INT_TYPE getNumHandles() const
+ {
+ return m_numHandles;
+ }
+
+ virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
+
+ BP_FP_INT_TYPE addHandle(const btVector3& aabbMin,const btVector3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
+ void removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher);
+ void updateHandle(BP_FP_INT_TYPE handle, const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
+ SIMD_FORCE_INLINE Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;}
+
+ virtual void resetPool(btDispatcher* dispatcher);
+
+ void processAllOverlappingPairs(btOverlapCallback* callback);
+
+ //Broadphase Interface
+ virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
+ virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+ virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
+ virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
+
+ virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0));
+ virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback);
+
+
+ void quantize(BP_FP_INT_TYPE* out, const btVector3& point, int isMax) const;
+ ///unQuantize should be conservative: aabbMin/aabbMax should be larger then 'getAabb' result
+ void unQuantize(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
+
+ bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
+
+ btOverlappingPairCache* getOverlappingPairCache()
+ {
+ return m_pairCache;
+ }
+ const btOverlappingPairCache* getOverlappingPairCache() const
+ {
+ return m_pairCache;
+ }
+
+ void setOverlappingPairUserCallback(btOverlappingPairCallback* pairCallback)
+ {
+ m_userPairCallback = pairCallback;
+ }
+ const btOverlappingPairCallback* getOverlappingPairUserCallback() const
+ {
+ return m_userPairCallback;
+ }
+
+ ///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
+ ///will add some transform later
+ virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ aabbMin = m_worldAabbMin;
+ aabbMax = m_worldAabbMax;
+ }
+
+ virtual void printStats()
+ {
+/* printf("btAxisSweep3.h\n");
+ printf("numHandles = %d, maxHandles = %d\n",m_numHandles,m_maxHandles);
+ printf("aabbMin=%f,%f,%f,aabbMax=%f,%f,%f\n",m_worldAabbMin.getX(),m_worldAabbMin.getY(),m_worldAabbMin.getZ(),
+ m_worldAabbMax.getX(),m_worldAabbMax.getY(),m_worldAabbMax.getZ());
+ */
+
+ }
+
+};
+
+////////////////////////////////////////////////////////////////////
+
+
+
+
+#ifdef DEBUG_BROADPHASE
+#include <stdio.h>
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3<BP_FP_INT_TYPE>::debugPrintAxis(int axis, bool checkCardinality)
+{
+ int numEdges = m_pHandles[0].m_maxEdges[axis];
+ printf("SAP Axis %d, numEdges=%d\n",axis,numEdges);
+
+ int i;
+ for (i=0;i<numEdges+1;i++)
+ {
+ Edge* pEdge = m_pEdges[axis] + i;
+ Handle* pHandlePrev = getHandle(pEdge->m_handle);
+ int handleIndex = pEdge->IsMax()? pHandlePrev->m_maxEdges[axis] : pHandlePrev->m_minEdges[axis];
+ char beginOrEnd;
+ beginOrEnd=pEdge->IsMax()?'E':'B';
+ printf(" [%c,h=%d,p=%x,i=%d]\n",beginOrEnd,pEdge->m_handle,pEdge->m_pos,handleIndex);
+ }
+
+ if (checkCardinality)
+ btAssert(numEdges == m_numHandles*2+1);
+}
+#endif //DEBUG_BROADPHASE
+
+template <typename BP_FP_INT_TYPE>
+btBroadphaseProxy* btAxisSweep3Internal<BP_FP_INT_TYPE>::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy)
+{
+ (void)shapeType;
+ BP_FP_INT_TYPE handleId = addHandle(aabbMin,aabbMax, userPtr,collisionFilterGroup,collisionFilterMask,dispatcher,multiSapProxy);
+
+ Handle* handle = getHandle(handleId);
+
+ if (m_raycastAccelerator)
+ {
+ btBroadphaseProxy* rayProxy = m_raycastAccelerator->createProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask,dispatcher,0);
+ handle->m_dbvtProxy = rayProxy;
+ }
+ return handle;
+}
+
+
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
+{
+ Handle* handle = static_cast<Handle*>(proxy);
+ if (m_raycastAccelerator)
+ m_raycastAccelerator->destroyProxy(handle->m_dbvtProxy,dispatcher);
+ removeHandle(static_cast<BP_FP_INT_TYPE>(handle->m_uniqueId), dispatcher);
+}
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher)
+{
+ Handle* handle = static_cast<Handle*>(proxy);
+ handle->m_aabbMin = aabbMin;
+ handle->m_aabbMax = aabbMax;
+ updateHandle(static_cast<BP_FP_INT_TYPE>(handle->m_uniqueId), aabbMin, aabbMax,dispatcher);
+ if (m_raycastAccelerator)
+ m_raycastAccelerator->setAabb(handle->m_dbvtProxy,aabbMin,aabbMax,dispatcher);
+
+}
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ if (m_raycastAccelerator)
+ {
+ m_raycastAccelerator->rayTest(rayFrom,rayTo,rayCallback,aabbMin,aabbMax);
+ } else
+ {
+ //choose axis?
+ BP_FP_INT_TYPE axis = 0;
+ //for each proxy
+ for (BP_FP_INT_TYPE i=1;i<m_numHandles*2+1;i++)
+ {
+ if (m_pEdges[axis][i].IsMax())
+ {
+ rayCallback.process(getHandle(m_pEdges[axis][i].m_handle));
+ }
+ }
+ }
+}
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback)
+{
+ if (m_raycastAccelerator)
+ {
+ m_raycastAccelerator->aabbTest(aabbMin,aabbMax,callback);
+ } else
+ {
+ //choose axis?
+ BP_FP_INT_TYPE axis = 0;
+ //for each proxy
+ for (BP_FP_INT_TYPE i=1;i<m_numHandles*2+1;i++)
+ {
+ if (m_pEdges[axis][i].IsMax())
+ {
+ Handle* handle = getHandle(m_pEdges[axis][i].m_handle);
+ if (TestAabbAgainstAabb2(aabbMin,aabbMax,handle->m_aabbMin,handle->m_aabbMax))
+ {
+ callback.process(handle);
+ }
+ }
+ }
+ }
+}
+
+
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
+{
+ Handle* pHandle = static_cast<Handle*>(proxy);
+ aabbMin = pHandle->m_aabbMin;
+ aabbMax = pHandle->m_aabbMax;
+}
+
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::unQuantize(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
+{
+ Handle* pHandle = static_cast<Handle*>(proxy);
+
+ unsigned short vecInMin[3];
+ unsigned short vecInMax[3];
+
+ vecInMin[0] = m_pEdges[0][pHandle->m_minEdges[0]].m_pos ;
+ vecInMax[0] = m_pEdges[0][pHandle->m_maxEdges[0]].m_pos +1 ;
+ vecInMin[1] = m_pEdges[1][pHandle->m_minEdges[1]].m_pos ;
+ vecInMax[1] = m_pEdges[1][pHandle->m_maxEdges[1]].m_pos +1 ;
+ vecInMin[2] = m_pEdges[2][pHandle->m_minEdges[2]].m_pos ;
+ vecInMax[2] = m_pEdges[2][pHandle->m_maxEdges[2]].m_pos +1 ;
+
+ aabbMin.setValue((btScalar)(vecInMin[0]) / (m_quantize.getX()),(btScalar)(vecInMin[1]) / (m_quantize.getY()),(btScalar)(vecInMin[2]) / (m_quantize.getZ()));
+ aabbMin += m_worldAabbMin;
+
+ aabbMax.setValue((btScalar)(vecInMax[0]) / (m_quantize.getX()),(btScalar)(vecInMax[1]) / (m_quantize.getY()),(btScalar)(vecInMax[2]) / (m_quantize.getZ()));
+ aabbMax += m_worldAabbMin;
+}
+
+
+
+
+template <typename BP_FP_INT_TYPE>
+btAxisSweep3Internal<BP_FP_INT_TYPE>::btAxisSweep3Internal(const btVector3& worldAabbMin,const btVector3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE userMaxHandles, btOverlappingPairCache* pairCache , bool disableRaycastAccelerator)
+:m_bpHandleMask(handleMask),
+m_handleSentinel(handleSentinel),
+m_pairCache(pairCache),
+m_userPairCallback(0),
+m_ownsPairCache(false),
+m_invalidPair(0),
+m_raycastAccelerator(0)
+{
+ BP_FP_INT_TYPE maxHandles = static_cast<BP_FP_INT_TYPE>(userMaxHandles+1);//need to add one sentinel handle
+
+ if (!m_pairCache)
+ {
+ void* ptr = btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16);
+ m_pairCache = new(ptr) btHashedOverlappingPairCache();
+ m_ownsPairCache = true;
+ }
+
+ if (!disableRaycastAccelerator)
+ {
+ m_nullPairCache = new (btAlignedAlloc(sizeof(btNullPairCache),16)) btNullPairCache();
+ m_raycastAccelerator = new (btAlignedAlloc(sizeof(btDbvtBroadphase),16)) btDbvtBroadphase(m_nullPairCache);//m_pairCache);
+ m_raycastAccelerator->m_deferedcollide = true;//don't add/remove pairs
+ }
+
+ //btAssert(bounds.HasVolume());
+
+ // init bounds
+ m_worldAabbMin = worldAabbMin;
+ m_worldAabbMax = worldAabbMax;
+
+ btVector3 aabbSize = m_worldAabbMax - m_worldAabbMin;
+
+ BP_FP_INT_TYPE maxInt = m_handleSentinel;
+
+ m_quantize = btVector3(btScalar(maxInt),btScalar(maxInt),btScalar(maxInt)) / aabbSize;
+
+ // allocate handles buffer, using btAlignedAlloc, and put all handles on free list
+ m_pHandles = new Handle[maxHandles];
+
+ m_maxHandles = maxHandles;
+ m_numHandles = 0;
+
+ // handle 0 is reserved as the null index, and is also used as the sentinel
+ m_firstFreeHandle = 1;
+ {
+ for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < maxHandles; i++)
+ m_pHandles[i].SetNextFree(static_cast<BP_FP_INT_TYPE>(i + 1));
+ m_pHandles[maxHandles - 1].SetNextFree(0);
+ }
+
+ {
+ // allocate edge buffers
+ for (int i = 0; i < 3; i++)
+ {
+ m_pEdgesRawPtr[i] = btAlignedAlloc(sizeof(Edge)*maxHandles*2,16);
+ m_pEdges[i] = new(m_pEdgesRawPtr[i]) Edge[maxHandles * 2];
+ }
+ }
+ //removed overlap management
+
+ // make boundary sentinels
+
+ m_pHandles[0].m_clientObject = 0;
+
+ for (int axis = 0; axis < 3; axis++)
+ {
+ m_pHandles[0].m_minEdges[axis] = 0;
+ m_pHandles[0].m_maxEdges[axis] = 1;
+
+ m_pEdges[axis][0].m_pos = 0;
+ m_pEdges[axis][0].m_handle = 0;
+ m_pEdges[axis][1].m_pos = m_handleSentinel;
+ m_pEdges[axis][1].m_handle = 0;
+#ifdef DEBUG_BROADPHASE
+ debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+
+ }
+
+}
+
+template <typename BP_FP_INT_TYPE>
+btAxisSweep3Internal<BP_FP_INT_TYPE>::~btAxisSweep3Internal()
+{
+ if (m_raycastAccelerator)
+ {
+ m_nullPairCache->~btOverlappingPairCache();
+ btAlignedFree(m_nullPairCache);
+ m_raycastAccelerator->~btDbvtBroadphase();
+ btAlignedFree (m_raycastAccelerator);
+ }
+
+ for (int i = 2; i >= 0; i--)
+ {
+ btAlignedFree(m_pEdgesRawPtr[i]);
+ }
+ delete [] m_pHandles;
+
+ if (m_ownsPairCache)
+ {
+ m_pairCache->~btOverlappingPairCache();
+ btAlignedFree(m_pairCache);
+ }
+}
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::quantize(BP_FP_INT_TYPE* out, const btVector3& point, int isMax) const
+{
+#ifdef OLD_CLAMPING_METHOD
+ ///problem with this clamping method is that the floating point during quantization might still go outside the range [(0|isMax) .. (m_handleSentinel&m_bpHandleMask]|isMax]
+ ///see http://code.google.com/p/bullet/issues/detail?id=87
+ btVector3 clampedPoint(point);
+ clampedPoint.setMax(m_worldAabbMin);
+ clampedPoint.setMin(m_worldAabbMax);
+ btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize;
+ out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & m_bpHandleMask) | isMax);
+ out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & m_bpHandleMask) | isMax);
+ out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & m_bpHandleMask) | isMax);
+#else
+ btVector3 v = (point - m_worldAabbMin) * m_quantize;
+ out[0]=(v[0]<=0)?(BP_FP_INT_TYPE)isMax:(v[0]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[0]&m_bpHandleMask)|isMax);
+ out[1]=(v[1]<=0)?(BP_FP_INT_TYPE)isMax:(v[1]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[1]&m_bpHandleMask)|isMax);
+ out[2]=(v[2]<=0)?(BP_FP_INT_TYPE)isMax:(v[2]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[2]&m_bpHandleMask)|isMax);
+#endif //OLD_CLAMPING_METHOD
+}
+
+
+template <typename BP_FP_INT_TYPE>
+BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::allocHandle()
+{
+ btAssert(m_firstFreeHandle);
+
+ BP_FP_INT_TYPE handle = m_firstFreeHandle;
+ m_firstFreeHandle = getHandle(handle)->GetNextFree();
+ m_numHandles++;
+
+ return handle;
+}
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::freeHandle(BP_FP_INT_TYPE handle)
+{
+ btAssert(handle > 0 && handle < m_maxHandles);
+
+ getHandle(handle)->SetNextFree(m_firstFreeHandle);
+ m_firstFreeHandle = handle;
+
+ m_numHandles--;
+}
+
+
+template <typename BP_FP_INT_TYPE>
+BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::addHandle(const btVector3& aabbMin,const btVector3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy)
+{
+ // quantize the bounds
+ BP_FP_INT_TYPE min[3], max[3];
+ quantize(min, aabbMin, 0);
+ quantize(max, aabbMax, 1);
+
+ // allocate a handle
+ BP_FP_INT_TYPE handle = allocHandle();
+
+
+ Handle* pHandle = getHandle(handle);
+
+ pHandle->m_uniqueId = static_cast<int>(handle);
+ //pHandle->m_pOverlaps = 0;
+ pHandle->m_clientObject = pOwner;
+ pHandle->m_collisionFilterGroup = collisionFilterGroup;
+ pHandle->m_collisionFilterMask = collisionFilterMask;
+ pHandle->m_multiSapParentProxy = multiSapProxy;
+
+ // compute current limit of edge arrays
+ BP_FP_INT_TYPE limit = static_cast<BP_FP_INT_TYPE>(m_numHandles * 2);
+
+
+ // insert new edges just inside the max boundary edge
+ for (BP_FP_INT_TYPE axis = 0; axis < 3; axis++)
+ {
+
+ m_pHandles[0].m_maxEdges[axis] += 2;
+
+ m_pEdges[axis][limit + 1] = m_pEdges[axis][limit - 1];
+
+ m_pEdges[axis][limit - 1].m_pos = min[axis];
+ m_pEdges[axis][limit - 1].m_handle = handle;
+
+ m_pEdges[axis][limit].m_pos = max[axis];
+ m_pEdges[axis][limit].m_handle = handle;
+
+ pHandle->m_minEdges[axis] = static_cast<BP_FP_INT_TYPE>(limit - 1);
+ pHandle->m_maxEdges[axis] = limit;
+ }
+
+ // now sort the new edges to their correct position
+ sortMinDown(0, pHandle->m_minEdges[0], dispatcher,false);
+ sortMaxDown(0, pHandle->m_maxEdges[0], dispatcher,false);
+ sortMinDown(1, pHandle->m_minEdges[1], dispatcher,false);
+ sortMaxDown(1, pHandle->m_maxEdges[1], dispatcher,false);
+ sortMinDown(2, pHandle->m_minEdges[2], dispatcher,true);
+ sortMaxDown(2, pHandle->m_maxEdges[2], dispatcher,true);
+
+
+ return handle;
+}
+
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher)
+{
+
+ Handle* pHandle = getHandle(handle);
+
+ //explicitly remove the pairs containing the proxy
+ //we could do it also in the sortMinUp (passing true)
+ ///@todo: compare performance
+ if (!m_pairCache->hasDeferredRemoval())
+ {
+ m_pairCache->removeOverlappingPairsContainingProxy(pHandle,dispatcher);
+ }
+
+ // compute current limit of edge arrays
+ int limit = static_cast<int>(m_numHandles * 2);
+
+ int axis;
+
+ for (axis = 0;axis<3;axis++)
+ {
+ m_pHandles[0].m_maxEdges[axis] -= 2;
+ }
+
+ // remove the edges by sorting them up to the end of the list
+ for ( axis = 0; axis < 3; axis++)
+ {
+ Edge* pEdges = m_pEdges[axis];
+ BP_FP_INT_TYPE max = pHandle->m_maxEdges[axis];
+ pEdges[max].m_pos = m_handleSentinel;
+
+ sortMaxUp(axis,max,dispatcher,false);
+
+
+ BP_FP_INT_TYPE i = pHandle->m_minEdges[axis];
+ pEdges[i].m_pos = m_handleSentinel;
+
+
+ sortMinUp(axis,i,dispatcher,false);
+
+ pEdges[limit-1].m_handle = 0;
+ pEdges[limit-1].m_pos = m_handleSentinel;
+
+#ifdef DEBUG_BROADPHASE
+ debugPrintAxis(axis,false);
+#endif //DEBUG_BROADPHASE
+
+
+ }
+
+
+ // free the handle
+ freeHandle(handle);
+
+
+}
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::resetPool(btDispatcher* dispatcher)
+{
+ if (m_numHandles == 0)
+ {
+ m_firstFreeHandle = 1;
+ {
+ for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < m_maxHandles; i++)
+ m_pHandles[i].SetNextFree(static_cast<BP_FP_INT_TYPE>(i + 1));
+ m_pHandles[m_maxHandles - 1].SetNextFree(0);
+ }
+ }
+}
+
+
+extern int gOverlappingPairs;
+//#include <stdio.h>
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::calculateOverlappingPairs(btDispatcher* dispatcher)
+{
+
+ if (m_pairCache->hasDeferredRemoval())
+ {
+
+ btBroadphasePairArray& overlappingPairArray = m_pairCache->getOverlappingPairArray();
+
+ //perform a sort, to find duplicates and to sort 'invalid' pairs to the end
+ overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
+
+ overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
+ m_invalidPair = 0;
+
+
+ int i;
+
+ btBroadphasePair previousPair;
+ previousPair.m_pProxy0 = 0;
+ previousPair.m_pProxy1 = 0;
+ previousPair.m_algorithm = 0;
+
+
+ for (i=0;i<overlappingPairArray.size();i++)
+ {
+
+ btBroadphasePair& pair = overlappingPairArray[i];
+
+ bool isDuplicate = (pair == previousPair);
+
+ previousPair = pair;
+
+ bool needsRemoval = false;
+
+ if (!isDuplicate)
+ {
+ ///important to use an AABB test that is consistent with the broadphase
+ bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1);
+
+ if (hasOverlap)
+ {
+ needsRemoval = false;//callback->processOverlap(pair);
+ } else
+ {
+ needsRemoval = true;
+ }
+ } else
+ {
+ //remove duplicate
+ needsRemoval = true;
+ //should have no algorithm
+ btAssert(!pair.m_algorithm);
+ }
+
+ if (needsRemoval)
+ {
+ m_pairCache->cleanOverlappingPair(pair,dispatcher);
+
+ // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
+ // m_overlappingPairArray.pop_back();
+ pair.m_pProxy0 = 0;
+ pair.m_pProxy1 = 0;
+ m_invalidPair++;
+ gOverlappingPairs--;
+ }
+
+ }
+
+ ///if you don't like to skip the invalid pairs in the array, execute following code:
+ #define CLEAN_INVALID_PAIRS 1
+ #ifdef CLEAN_INVALID_PAIRS
+
+ //perform a sort, to sort 'invalid' pairs to the end
+ overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
+
+ overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
+ m_invalidPair = 0;
+ #endif//CLEAN_INVALID_PAIRS
+
+ //printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size());
+ }
+
+}
+
+
+template <typename BP_FP_INT_TYPE>
+bool btAxisSweep3Internal<BP_FP_INT_TYPE>::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+{
+ const Handle* pHandleA = static_cast<Handle*>(proxy0);
+ const Handle* pHandleB = static_cast<Handle*>(proxy1);
+
+ //optimization 1: check the array index (memory address), instead of the m_pos
+
+ for (int axis = 0; axis < 3; axis++)
+ {
+ if (pHandleA->m_maxEdges[axis] < pHandleB->m_minEdges[axis] ||
+ pHandleB->m_maxEdges[axis] < pHandleA->m_minEdges[axis])
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+template <typename BP_FP_INT_TYPE>
+bool btAxisSweep3Internal<BP_FP_INT_TYPE>::testOverlap2D(const Handle* pHandleA, const Handle* pHandleB,int axis0,int axis1)
+{
+ //optimization 1: check the array index (memory address), instead of the m_pos
+
+ if (pHandleA->m_maxEdges[axis0] < pHandleB->m_minEdges[axis0] ||
+ pHandleB->m_maxEdges[axis0] < pHandleA->m_minEdges[axis0] ||
+ pHandleA->m_maxEdges[axis1] < pHandleB->m_minEdges[axis1] ||
+ pHandleB->m_maxEdges[axis1] < pHandleA->m_minEdges[axis1])
+ {
+ return false;
+ }
+ return true;
+}
+
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::updateHandle(BP_FP_INT_TYPE handle, const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher)
+{
+// btAssert(bounds.IsFinite());
+ //btAssert(bounds.HasVolume());
+
+ Handle* pHandle = getHandle(handle);
+
+ // quantize the new bounds
+ BP_FP_INT_TYPE min[3], max[3];
+ quantize(min, aabbMin, 0);
+ quantize(max, aabbMax, 1);
+
+ // update changed edges
+ for (int axis = 0; axis < 3; axis++)
+ {
+ BP_FP_INT_TYPE emin = pHandle->m_minEdges[axis];
+ BP_FP_INT_TYPE emax = pHandle->m_maxEdges[axis];
+
+ int dmin = (int)min[axis] - (int)m_pEdges[axis][emin].m_pos;
+ int dmax = (int)max[axis] - (int)m_pEdges[axis][emax].m_pos;
+
+ m_pEdges[axis][emin].m_pos = min[axis];
+ m_pEdges[axis][emax].m_pos = max[axis];
+
+ // expand (only adds overlaps)
+ if (dmin < 0)
+ sortMinDown(axis, emin,dispatcher,true);
+
+ if (dmax > 0)
+ sortMaxUp(axis, emax,dispatcher,true);
+
+ // shrink (only removes overlaps)
+ if (dmin > 0)
+ sortMinUp(axis, emin,dispatcher,true);
+
+ if (dmax < 0)
+ sortMaxDown(axis, emax,dispatcher,true);
+
+#ifdef DEBUG_BROADPHASE
+ debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+ }
+
+
+}
+
+
+
+
+// sorting a min edge downwards can only ever *add* overlaps
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* /* dispatcher */, bool updateOverlaps)
+{
+
+ Edge* pEdge = m_pEdges[axis] + edge;
+ Edge* pPrev = pEdge - 1;
+ Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+ while (pEdge->m_pos < pPrev->m_pos)
+ {
+ Handle* pHandlePrev = getHandle(pPrev->m_handle);
+
+ if (pPrev->IsMax())
+ {
+ // if previous edge is a maximum check the bounds and add an overlap if necessary
+ const int axis1 = (1 << axis) & 3;
+ const int axis2 = (1 << axis1) & 3;
+ if (updateOverlaps && testOverlap2D(pHandleEdge, pHandlePrev,axis1,axis2))
+ {
+ m_pairCache->addOverlappingPair(pHandleEdge,pHandlePrev);
+ if (m_userPairCallback)
+ m_userPairCallback->addOverlappingPair(pHandleEdge,pHandlePrev);
+
+ //AddOverlap(pEdge->m_handle, pPrev->m_handle);
+
+ }
+
+ // update edge reference in other handle
+ pHandlePrev->m_maxEdges[axis]++;
+ }
+ else
+ pHandlePrev->m_minEdges[axis]++;
+
+ pHandleEdge->m_minEdges[axis]--;
+
+ // swap the edges
+ Edge swap = *pEdge;
+ *pEdge = *pPrev;
+ *pPrev = swap;
+
+ // decrement
+ pEdge--;
+ pPrev--;
+ }
+
+#ifdef DEBUG_BROADPHASE
+ debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+
+}
+
+// sorting a min edge upwards can only ever *remove* overlaps
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps)
+{
+ Edge* pEdge = m_pEdges[axis] + edge;
+ Edge* pNext = pEdge + 1;
+ Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+ while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos))
+ {
+ Handle* pHandleNext = getHandle(pNext->m_handle);
+
+ if (pNext->IsMax())
+ {
+ Handle* handle0 = getHandle(pEdge->m_handle);
+ Handle* handle1 = getHandle(pNext->m_handle);
+ const int axis1 = (1 << axis) & 3;
+ const int axis2 = (1 << axis1) & 3;
+
+ // if next edge is maximum remove any overlap between the two handles
+ if (updateOverlaps
+#ifdef USE_OVERLAP_TEST_ON_REMOVES
+ && testOverlap2D(handle0,handle1,axis1,axis2)
+#endif //USE_OVERLAP_TEST_ON_REMOVES
+ )
+ {
+
+
+ m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher);
+ if (m_userPairCallback)
+ m_userPairCallback->removeOverlappingPair(handle0,handle1,dispatcher);
+
+ }
+
+
+ // update edge reference in other handle
+ pHandleNext->m_maxEdges[axis]--;
+ }
+ else
+ pHandleNext->m_minEdges[axis]--;
+
+ pHandleEdge->m_minEdges[axis]++;
+
+ // swap the edges
+ Edge swap = *pEdge;
+ *pEdge = *pNext;
+ *pNext = swap;
+
+ // increment
+ pEdge++;
+ pNext++;
+ }
+
+
+}
+
+// sorting a max edge downwards can only ever *remove* overlaps
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMaxDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps)
+{
+
+ Edge* pEdge = m_pEdges[axis] + edge;
+ Edge* pPrev = pEdge - 1;
+ Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+ while (pEdge->m_pos < pPrev->m_pos)
+ {
+ Handle* pHandlePrev = getHandle(pPrev->m_handle);
+
+ if (!pPrev->IsMax())
+ {
+ // if previous edge was a minimum remove any overlap between the two handles
+ Handle* handle0 = getHandle(pEdge->m_handle);
+ Handle* handle1 = getHandle(pPrev->m_handle);
+ const int axis1 = (1 << axis) & 3;
+ const int axis2 = (1 << axis1) & 3;
+
+ if (updateOverlaps
+#ifdef USE_OVERLAP_TEST_ON_REMOVES
+ && testOverlap2D(handle0,handle1,axis1,axis2)
+#endif //USE_OVERLAP_TEST_ON_REMOVES
+ )
+ {
+ //this is done during the overlappingpairarray iteration/narrowphase collision
+
+
+ m_pairCache->removeOverlappingPair(handle0,handle1,dispatcher);
+ if (m_userPairCallback)
+ m_userPairCallback->removeOverlappingPair(handle0,handle1,dispatcher);
+
+
+
+ }
+
+ // update edge reference in other handle
+ pHandlePrev->m_minEdges[axis]++;;
+ }
+ else
+ pHandlePrev->m_maxEdges[axis]++;
+
+ pHandleEdge->m_maxEdges[axis]--;
+
+ // swap the edges
+ Edge swap = *pEdge;
+ *pEdge = *pPrev;
+ *pPrev = swap;
+
+ // decrement
+ pEdge--;
+ pPrev--;
+ }
+
+
+#ifdef DEBUG_BROADPHASE
+ debugPrintAxis(axis);
+#endif //DEBUG_BROADPHASE
+
+}
+
+// sorting a max edge upwards can only ever *add* overlaps
+template <typename BP_FP_INT_TYPE>
+void btAxisSweep3Internal<BP_FP_INT_TYPE>::sortMaxUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* /* dispatcher */, bool updateOverlaps)
+{
+ Edge* pEdge = m_pEdges[axis] + edge;
+ Edge* pNext = pEdge + 1;
+ Handle* pHandleEdge = getHandle(pEdge->m_handle);
+
+ while (pNext->m_handle && (pEdge->m_pos >= pNext->m_pos))
+ {
+ Handle* pHandleNext = getHandle(pNext->m_handle);
+
+ const int axis1 = (1 << axis) & 3;
+ const int axis2 = (1 << axis1) & 3;
+
+ if (!pNext->IsMax())
+ {
+ // if next edge is a minimum check the bounds and add an overlap if necessary
+ if (updateOverlaps && testOverlap2D(pHandleEdge, pHandleNext,axis1,axis2))
+ {
+ Handle* handle0 = getHandle(pEdge->m_handle);
+ Handle* handle1 = getHandle(pNext->m_handle);
+ m_pairCache->addOverlappingPair(handle0,handle1);
+ if (m_userPairCallback)
+ m_userPairCallback->addOverlappingPair(handle0,handle1);
+ }
+
+ // update edge reference in other handle
+ pHandleNext->m_minEdges[axis]--;
+ }
+ else
+ pHandleNext->m_maxEdges[axis]--;
+
+ pHandleEdge->m_maxEdges[axis]++;
+
+ // swap the edges
+ Edge swap = *pEdge;
+ *pEdge = *pNext;
+ *pNext = swap;
+
+ // increment
+ pEdge++;
+ pNext++;
+ }
+
+}
+
+
+
+////////////////////////////////////////////////////////////////////
+
+
+/// The btAxisSweep3 is an efficient implementation of the 3d axis sweep and prune broadphase.
+/// It uses arrays rather then lists for storage of the 3 axis. Also it operates using 16 bit integer coordinates instead of floats.
+/// For large worlds and many objects, use bt32BitAxisSweep3 or btDbvtBroadphase instead. bt32BitAxisSweep3 has higher precision and allows more then 16384 objects at the cost of more memory and bit of performance.
+class btAxisSweep3 : public btAxisSweep3Internal<unsigned short int>
+{
+public:
+
+ btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false);
+
+};
+
+/// The bt32BitAxisSweep3 allows higher precision quantization and more objects compared to the btAxisSweep3 sweep and prune.
+/// This comes at the cost of more memory per handle, and a bit slower performance.
+/// It uses arrays rather then lists for storage of the 3 axis.
+class bt32BitAxisSweep3 : public btAxisSweep3Internal<unsigned int>
+{
+public:
+
+ bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false);
+
+};
+
+#endif
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h
new file mode 100644
index 00000000..f1bf0059
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseInterface.h
@@ -0,0 +1,82 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_BROADPHASE_INTERFACE_H
+#define BT_BROADPHASE_INTERFACE_H
+
+
+
+struct btDispatcherInfo;
+class btDispatcher;
+#include "btBroadphaseProxy.h"
+
+class btOverlappingPairCache;
+
+
+
+struct btBroadphaseAabbCallback
+{
+ virtual ~btBroadphaseAabbCallback() {}
+ virtual bool process(const btBroadphaseProxy* proxy) = 0;
+};
+
+
+struct btBroadphaseRayCallback : public btBroadphaseAabbCallback
+{
+ ///added some cached data to accelerate ray-AABB tests
+ btVector3 m_rayDirectionInverse;
+ unsigned int m_signs[3];
+ btScalar m_lambda_max;
+
+ virtual ~btBroadphaseRayCallback() {}
+};
+
+#include "LinearMath/btVector3.h"
+
+///The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs.
+///Some implementations for this broadphase interface include btAxisSweep3, bt32BitAxisSweep3 and btDbvtBroadphase.
+///The actual overlapping pair management, storage, adding and removing of pairs is dealt by the btOverlappingPairCache class.
+class btBroadphaseInterface
+{
+public:
+ virtual ~btBroadphaseInterface() {}
+
+ virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy) =0;
+ virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0;
+ virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0;
+ virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const =0;
+
+ virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0)) = 0;
+
+ virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback) = 0;
+
+ ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
+ virtual void calculateOverlappingPairs(btDispatcher* dispatcher)=0;
+
+ virtual btOverlappingPairCache* getOverlappingPairCache()=0;
+ virtual const btOverlappingPairCache* getOverlappingPairCache() const =0;
+
+ ///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
+ ///will add some transform later
+ virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const =0;
+
+ ///reset broadphase internal structures, to ensure determinism/reproducability
+ virtual void resetPool(btDispatcher* dispatcher) { (void) dispatcher; };
+
+ virtual void printStats() = 0;
+
+};
+
+#endif //BT_BROADPHASE_INTERFACE_H
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
new file mode 100644
index 00000000..f4d7341f
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
@@ -0,0 +1,17 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btBroadphaseProxy.h"
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h
new file mode 100644
index 00000000..32e8f032
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btBroadphaseProxy.h
@@ -0,0 +1,270 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_BROADPHASE_PROXY_H
+#define BT_BROADPHASE_PROXY_H
+
+#include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btAlignedAllocator.h"
+
+
+/// btDispatcher uses these types
+/// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave
+/// to facilitate type checking
+/// CUSTOM_POLYHEDRAL_SHAPE_TYPE,CUSTOM_CONVEX_SHAPE_TYPE and CUSTOM_CONCAVE_SHAPE_TYPE can be used to extend Bullet without modifying source code
+enum BroadphaseNativeTypes
+{
+ // polyhedral convex shapes
+ BOX_SHAPE_PROXYTYPE,
+ TRIANGLE_SHAPE_PROXYTYPE,
+ TETRAHEDRAL_SHAPE_PROXYTYPE,
+ CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE,
+ CONVEX_HULL_SHAPE_PROXYTYPE,
+ CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE,
+ CUSTOM_POLYHEDRAL_SHAPE_TYPE,
+//implicit convex shapes
+IMPLICIT_CONVEX_SHAPES_START_HERE,
+ SPHERE_SHAPE_PROXYTYPE,
+ MULTI_SPHERE_SHAPE_PROXYTYPE,
+ CAPSULE_SHAPE_PROXYTYPE,
+ CONE_SHAPE_PROXYTYPE,
+ CONVEX_SHAPE_PROXYTYPE,
+ CYLINDER_SHAPE_PROXYTYPE,
+ UNIFORM_SCALING_SHAPE_PROXYTYPE,
+ MINKOWSKI_SUM_SHAPE_PROXYTYPE,
+ MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE,
+ BOX_2D_SHAPE_PROXYTYPE,
+ CONVEX_2D_SHAPE_PROXYTYPE,
+ CUSTOM_CONVEX_SHAPE_TYPE,
+//concave shapes
+CONCAVE_SHAPES_START_HERE,
+ //keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy!
+ TRIANGLE_MESH_SHAPE_PROXYTYPE,
+ SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE,
+ ///used for demo integration FAST/Swift collision library and Bullet
+ FAST_CONCAVE_MESH_PROXYTYPE,
+ //terrain
+ TERRAIN_SHAPE_PROXYTYPE,
+///Used for GIMPACT Trimesh integration
+ GIMPACT_SHAPE_PROXYTYPE,
+///Multimaterial mesh
+ MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE,
+
+ EMPTY_SHAPE_PROXYTYPE,
+ STATIC_PLANE_PROXYTYPE,
+ CUSTOM_CONCAVE_SHAPE_TYPE,
+CONCAVE_SHAPES_END_HERE,
+
+ COMPOUND_SHAPE_PROXYTYPE,
+
+ SOFTBODY_SHAPE_PROXYTYPE,
+ HFFLUID_SHAPE_PROXYTYPE,
+ HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE,
+ INVALID_SHAPE_PROXYTYPE,
+
+ MAX_BROADPHASE_COLLISION_TYPES
+
+};
+
+
+///The btBroadphaseProxy is the main class that can be used with the Bullet broadphases.
+///It stores collision shape type information, collision filter information and a client object, typically a btCollisionObject or btRigidBody.
+ATTRIBUTE_ALIGNED16(struct) btBroadphaseProxy
+{
+
+BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ ///optional filtering to cull potential collisions
+ enum CollisionFilterGroups
+ {
+ DefaultFilter = 1,
+ StaticFilter = 2,
+ KinematicFilter = 4,
+ DebrisFilter = 8,
+ SensorTrigger = 16,
+ CharacterFilter = 32,
+ AllFilter = -1 //all bits sets: DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
+ };
+
+ //Usually the client btCollisionObject or Rigidbody class
+ void* m_clientObject;
+ short int m_collisionFilterGroup;
+ short int m_collisionFilterMask;
+ void* m_multiSapParentProxy;
+ int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
+
+ btVector3 m_aabbMin;
+ btVector3 m_aabbMax;
+
+ SIMD_FORCE_INLINE int getUid() const
+ {
+ return m_uniqueId;
+ }
+
+ //used for memory pools
+ btBroadphaseProxy() :m_clientObject(0),m_multiSapParentProxy(0)
+ {
+ }
+
+ btBroadphaseProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
+ :m_clientObject(userPtr),
+ m_collisionFilterGroup(collisionFilterGroup),
+ m_collisionFilterMask(collisionFilterMask),
+ m_aabbMin(aabbMin),
+ m_aabbMax(aabbMax)
+ {
+ m_multiSapParentProxy = multiSapParentProxy;
+ }
+
+
+
+ static SIMD_FORCE_INLINE bool isPolyhedral(int proxyType)
+ {
+ return (proxyType < IMPLICIT_CONVEX_SHAPES_START_HERE);
+ }
+
+ static SIMD_FORCE_INLINE bool isConvex(int proxyType)
+ {
+ return (proxyType < CONCAVE_SHAPES_START_HERE);
+ }
+
+ static SIMD_FORCE_INLINE bool isNonMoving(int proxyType)
+ {
+ return (isConcave(proxyType) && !(proxyType==GIMPACT_SHAPE_PROXYTYPE));
+ }
+
+ static SIMD_FORCE_INLINE bool isConcave(int proxyType)
+ {
+ return ((proxyType > CONCAVE_SHAPES_START_HERE) &&
+ (proxyType < CONCAVE_SHAPES_END_HERE));
+ }
+ static SIMD_FORCE_INLINE bool isCompound(int proxyType)
+ {
+ return (proxyType == COMPOUND_SHAPE_PROXYTYPE);
+ }
+
+ static SIMD_FORCE_INLINE bool isSoftBody(int proxyType)
+ {
+ return (proxyType == SOFTBODY_SHAPE_PROXYTYPE);
+ }
+
+ static SIMD_FORCE_INLINE bool isInfinite(int proxyType)
+ {
+ return (proxyType == STATIC_PLANE_PROXYTYPE);
+ }
+
+ static SIMD_FORCE_INLINE bool isConvex2d(int proxyType)
+ {
+ return (proxyType == BOX_2D_SHAPE_PROXYTYPE) || (proxyType == CONVEX_2D_SHAPE_PROXYTYPE);
+ }
+
+
+}
+;
+
+class btCollisionAlgorithm;
+
+struct btBroadphaseProxy;
+
+
+
+///The btBroadphasePair class contains a pair of aabb-overlapping objects.
+///A btDispatcher can search a btCollisionAlgorithm that performs exact/narrowphase collision detection on the actual collision shapes.
+ATTRIBUTE_ALIGNED16(struct) btBroadphasePair
+{
+ btBroadphasePair ()
+ :
+ m_pProxy0(0),
+ m_pProxy1(0),
+ m_algorithm(0),
+ m_internalInfo1(0)
+ {
+ }
+
+BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btBroadphasePair(const btBroadphasePair& other)
+ : m_pProxy0(other.m_pProxy0),
+ m_pProxy1(other.m_pProxy1),
+ m_algorithm(other.m_algorithm),
+ m_internalInfo1(other.m_internalInfo1)
+ {
+ }
+ btBroadphasePair(btBroadphaseProxy& proxy0,btBroadphaseProxy& proxy1)
+ {
+
+ //keep them sorted, so the std::set operations work
+ if (proxy0.m_uniqueId < proxy1.m_uniqueId)
+ {
+ m_pProxy0 = &proxy0;
+ m_pProxy1 = &proxy1;
+ }
+ else
+ {
+ m_pProxy0 = &proxy1;
+ m_pProxy1 = &proxy0;
+ }
+
+ m_algorithm = 0;
+ m_internalInfo1 = 0;
+
+ }
+
+ btBroadphaseProxy* m_pProxy0;
+ btBroadphaseProxy* m_pProxy1;
+
+ mutable btCollisionAlgorithm* m_algorithm;
+ union { void* m_internalInfo1; int m_internalTmpValue;};//don't use this data, it will be removed in future version.
+
+};
+
+/*
+//comparison for set operation, see Solid DT_Encounter
+SIMD_FORCE_INLINE bool operator<(const btBroadphasePair& a, const btBroadphasePair& b)
+{
+ return a.m_pProxy0 < b.m_pProxy0 ||
+ (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 < b.m_pProxy1);
+}
+*/
+
+
+
+class btBroadphasePairSortPredicate
+{
+ public:
+
+ bool operator() ( const btBroadphasePair& a, const btBroadphasePair& b )
+ {
+ const int uidA0 = a.m_pProxy0 ? a.m_pProxy0->m_uniqueId : -1;
+ const int uidB0 = b.m_pProxy0 ? b.m_pProxy0->m_uniqueId : -1;
+ const int uidA1 = a.m_pProxy1 ? a.m_pProxy1->m_uniqueId : -1;
+ const int uidB1 = b.m_pProxy1 ? b.m_pProxy1->m_uniqueId : -1;
+
+ return uidA0 > uidB0 ||
+ (a.m_pProxy0 == b.m_pProxy0 && uidA1 > uidB1) ||
+ (a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 == b.m_pProxy1 && a.m_algorithm > b.m_algorithm);
+ }
+};
+
+
+SIMD_FORCE_INLINE bool operator==(const btBroadphasePair& a, const btBroadphasePair& b)
+{
+ return (a.m_pProxy0 == b.m_pProxy0) && (a.m_pProxy1 == b.m_pProxy1);
+}
+
+
+#endif //BT_BROADPHASE_PROXY_H
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
new file mode 100644
index 00000000..c95d1be0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
@@ -0,0 +1,23 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btCollisionAlgorithm.h"
+#include "btDispatcher.h"
+
+btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
+{
+ m_dispatcher = ci.m_dispatcher1;
+}
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h
new file mode 100644
index 00000000..36eec971
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h
@@ -0,0 +1,80 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COLLISION_ALGORITHM_H
+#define BT_COLLISION_ALGORITHM_H
+
+#include "LinearMath/btScalar.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+struct btBroadphaseProxy;
+class btDispatcher;
+class btManifoldResult;
+class btCollisionObject;
+struct btDispatcherInfo;
+class btPersistentManifold;
+
+typedef btAlignedObjectArray<btPersistentManifold*> btManifoldArray;
+
+struct btCollisionAlgorithmConstructionInfo
+{
+ btCollisionAlgorithmConstructionInfo()
+ :m_dispatcher1(0),
+ m_manifold(0)
+ {
+ }
+ btCollisionAlgorithmConstructionInfo(btDispatcher* dispatcher,int temp)
+ :m_dispatcher1(dispatcher)
+ {
+ (void)temp;
+ }
+
+ btDispatcher* m_dispatcher1;
+ btPersistentManifold* m_manifold;
+
+// int getDispatcherId();
+
+};
+
+
+///btCollisionAlgorithm is an collision interface that is compatible with the Broadphase and btDispatcher.
+///It is persistent over frames
+class btCollisionAlgorithm
+{
+
+protected:
+
+ btDispatcher* m_dispatcher;
+
+protected:
+// int getDispatcherId();
+
+public:
+
+ btCollisionAlgorithm() {};
+
+ btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci);
+
+ virtual ~btCollisionAlgorithm() {};
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0;
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut) = 0;
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray) = 0;
+};
+
+
+#endif //BT_COLLISION_ALGORITHM_H
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.cpp
new file mode 100644
index 00000000..95443af5
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.cpp
@@ -0,0 +1,1295 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///btDbvt implementation by Nathanael Presson
+
+#include "btDbvt.h"
+
+//
+typedef btAlignedObjectArray<btDbvtNode*> tNodeArray;
+typedef btAlignedObjectArray<const btDbvtNode*> tConstNodeArray;
+
+//
+struct btDbvtNodeEnumerator : btDbvt::ICollide
+{
+ tConstNodeArray nodes;
+ void Process(const btDbvtNode* n) { nodes.push_back(n); }
+};
+
+//
+static DBVT_INLINE int indexof(const btDbvtNode* node)
+{
+ return(node->parent->childs[1]==node);
+}
+
+//
+static DBVT_INLINE btDbvtVolume merge( const btDbvtVolume& a,
+ const btDbvtVolume& b)
+{
+#if (DBVT_MERGE_IMPL==DBVT_IMPL_SSE)
+ ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtAabbMm)]);
+ btDbvtVolume& res=*(btDbvtVolume*)locals;
+#else
+ btDbvtVolume res;
+#endif
+ Merge(a,b,res);
+ return(res);
+}
+
+// volume+edge lengths
+static DBVT_INLINE btScalar size(const btDbvtVolume& a)
+{
+ const btVector3 edges=a.Lengths();
+ return( edges.x()*edges.y()*edges.z()+
+ edges.x()+edges.y()+edges.z());
+}
+
+//
+static void getmaxdepth(const btDbvtNode* node,int depth,int& maxdepth)
+{
+ if(node->isinternal())
+ {
+ getmaxdepth(node->childs[0],depth+1,maxdepth);
+ getmaxdepth(node->childs[1],depth+1,maxdepth);
+ } else maxdepth=btMax(maxdepth,depth);
+}
+
+//
+static DBVT_INLINE void deletenode( btDbvt* pdbvt,
+ btDbvtNode* node)
+{
+ btAlignedFree(pdbvt->m_free);
+ pdbvt->m_free=node;
+}
+
+//
+static void recursedeletenode( btDbvt* pdbvt,
+ btDbvtNode* node)
+{
+ if(!node->isleaf())
+ {
+ recursedeletenode(pdbvt,node->childs[0]);
+ recursedeletenode(pdbvt,node->childs[1]);
+ }
+ if(node==pdbvt->m_root) pdbvt->m_root=0;
+ deletenode(pdbvt,node);
+}
+
+//
+static DBVT_INLINE btDbvtNode* createnode( btDbvt* pdbvt,
+ btDbvtNode* parent,
+ void* data)
+{
+ btDbvtNode* node;
+ if(pdbvt->m_free)
+ { node=pdbvt->m_free;pdbvt->m_free=0; }
+ else
+ { node=new(btAlignedAlloc(sizeof(btDbvtNode),16)) btDbvtNode(); }
+ node->parent = parent;
+ node->data = data;
+ node->childs[1] = 0;
+ return(node);
+}
+
+//
+static DBVT_INLINE btDbvtNode* createnode( btDbvt* pdbvt,
+ btDbvtNode* parent,
+ const btDbvtVolume& volume,
+ void* data)
+{
+ btDbvtNode* node=createnode(pdbvt,parent,data);
+ node->volume=volume;
+ return(node);
+}
+
+//
+static DBVT_INLINE btDbvtNode* createnode( btDbvt* pdbvt,
+ btDbvtNode* parent,
+ const btDbvtVolume& volume0,
+ const btDbvtVolume& volume1,
+ void* data)
+{
+ btDbvtNode* node=createnode(pdbvt,parent,data);
+ Merge(volume0,volume1,node->volume);
+ return(node);
+}
+
+//
+static void insertleaf( btDbvt* pdbvt,
+ btDbvtNode* root,
+ btDbvtNode* leaf)
+{
+ if(!pdbvt->m_root)
+ {
+ pdbvt->m_root = leaf;
+ leaf->parent = 0;
+ }
+ else
+ {
+ if(!root->isleaf())
+ {
+ do {
+ root=root->childs[Select( leaf->volume,
+ root->childs[0]->volume,
+ root->childs[1]->volume)];
+ } while(!root->isleaf());
+ }
+ btDbvtNode* prev=root->parent;
+ btDbvtNode* node=createnode(pdbvt,prev,leaf->volume,root->volume,0);
+ if(prev)
+ {
+ prev->childs[indexof(root)] = node;
+ node->childs[0] = root;root->parent=node;
+ node->childs[1] = leaf;leaf->parent=node;
+ do {
+ if(!prev->volume.Contain(node->volume))
+ Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume);
+ else
+ break;
+ node=prev;
+ } while(0!=(prev=node->parent));
+ }
+ else
+ {
+ node->childs[0] = root;root->parent=node;
+ node->childs[1] = leaf;leaf->parent=node;
+ pdbvt->m_root = node;
+ }
+ }
+}
+
+//
+static btDbvtNode* removeleaf( btDbvt* pdbvt,
+ btDbvtNode* leaf)
+{
+ if(leaf==pdbvt->m_root)
+ {
+ pdbvt->m_root=0;
+ return(0);
+ }
+ else
+ {
+ btDbvtNode* parent=leaf->parent;
+ btDbvtNode* prev=parent->parent;
+ btDbvtNode* sibling=parent->childs[1-indexof(leaf)];
+ if(prev)
+ {
+ prev->childs[indexof(parent)]=sibling;
+ sibling->parent=prev;
+ deletenode(pdbvt,parent);
+ while(prev)
+ {
+ const btDbvtVolume pb=prev->volume;
+ Merge(prev->childs[0]->volume,prev->childs[1]->volume,prev->volume);
+ if(NotEqual(pb,prev->volume))
+ {
+ prev=prev->parent;
+ } else break;
+ }
+ return(prev?prev:pdbvt->m_root);
+ }
+ else
+ {
+ pdbvt->m_root=sibling;
+ sibling->parent=0;
+ deletenode(pdbvt,parent);
+ return(pdbvt->m_root);
+ }
+ }
+}
+
+//
+static void fetchleaves(btDbvt* pdbvt,
+ btDbvtNode* root,
+ tNodeArray& leaves,
+ int depth=-1)
+{
+ if(root->isinternal()&&depth)
+ {
+ fetchleaves(pdbvt,root->childs[0],leaves,depth-1);
+ fetchleaves(pdbvt,root->childs[1],leaves,depth-1);
+ deletenode(pdbvt,root);
+ }
+ else
+ {
+ leaves.push_back(root);
+ }
+}
+
+//
+static void split( const tNodeArray& leaves,
+ tNodeArray& left,
+ tNodeArray& right,
+ const btVector3& org,
+ const btVector3& axis)
+{
+ left.resize(0);
+ right.resize(0);
+ for(int i=0,ni=leaves.size();i<ni;++i)
+ {
+ if(btDot(axis,leaves[i]->volume.Center()-org)<0)
+ left.push_back(leaves[i]);
+ else
+ right.push_back(leaves[i]);
+ }
+}
+
+//
+static btDbvtVolume bounds( const tNodeArray& leaves)
+{
+#if DBVT_MERGE_IMPL==DBVT_IMPL_SSE
+ ATTRIBUTE_ALIGNED16(char locals[sizeof(btDbvtVolume)]);
+ btDbvtVolume& volume=*(btDbvtVolume*)locals;
+ volume=leaves[0]->volume;
+#else
+ btDbvtVolume volume=leaves[0]->volume;
+#endif
+ for(int i=1,ni=leaves.size();i<ni;++i)
+ {
+ Merge(volume,leaves[i]->volume,volume);
+ }
+ return(volume);
+}
+
+//
+static void bottomup( btDbvt* pdbvt,
+ tNodeArray& leaves)
+{
+ while(leaves.size()>1)
+ {
+ btScalar minsize=SIMD_INFINITY;
+ int minidx[2]={-1,-1};
+ for(int i=0;i<leaves.size();++i)
+ {
+ for(int j=i+1;j<leaves.size();++j)
+ {
+ const btScalar sz=size(merge(leaves[i]->volume,leaves[j]->volume));
+ if(sz<minsize)
+ {
+ minsize = sz;
+ minidx[0] = i;
+ minidx[1] = j;
+ }
+ }
+ }
+ btDbvtNode* n[] = {leaves[minidx[0]],leaves[minidx[1]]};
+ btDbvtNode* p = createnode(pdbvt,0,n[0]->volume,n[1]->volume,0);
+ p->childs[0] = n[0];
+ p->childs[1] = n[1];
+ n[0]->parent = p;
+ n[1]->parent = p;
+ leaves[minidx[0]] = p;
+ leaves.swap(minidx[1],leaves.size()-1);
+ leaves.pop_back();
+ }
+}
+
+//
+static btDbvtNode* topdown(btDbvt* pdbvt,
+ tNodeArray& leaves,
+ int bu_treshold)
+{
+ static const btVector3 axis[]={btVector3(1,0,0),
+ btVector3(0,1,0),
+ btVector3(0,0,1)};
+ if(leaves.size()>1)
+ {
+ if(leaves.size()>bu_treshold)
+ {
+ const btDbvtVolume vol=bounds(leaves);
+ const btVector3 org=vol.Center();
+ tNodeArray sets[2];
+ int bestaxis=-1;
+ int bestmidp=leaves.size();
+ int splitcount[3][2]={{0,0},{0,0},{0,0}};
+ int i;
+ for( i=0;i<leaves.size();++i)
+ {
+ const btVector3 x=leaves[i]->volume.Center()-org;
+ for(int j=0;j<3;++j)
+ {
+ ++splitcount[j][btDot(x,axis[j])>0?1:0];
+ }
+ }
+ for( i=0;i<3;++i)
+ {
+ if((splitcount[i][0]>0)&&(splitcount[i][1]>0))
+ {
+ const int midp=(int)btFabs(btScalar(splitcount[i][0]-splitcount[i][1]));
+ if(midp<bestmidp)
+ {
+ bestaxis=i;
+ bestmidp=midp;
+ }
+ }
+ }
+ if(bestaxis>=0)
+ {
+ sets[0].reserve(splitcount[bestaxis][0]);
+ sets[1].reserve(splitcount[bestaxis][1]);
+ split(leaves,sets[0],sets[1],org,axis[bestaxis]);
+ }
+ else
+ {
+ sets[0].reserve(leaves.size()/2+1);
+ sets[1].reserve(leaves.size()/2);
+ for(int i=0,ni=leaves.size();i<ni;++i)
+ {
+ sets[i&1].push_back(leaves[i]);
+ }
+ }
+ btDbvtNode* node=createnode(pdbvt,0,vol,0);
+ node->childs[0]=topdown(pdbvt,sets[0],bu_treshold);
+ node->childs[1]=topdown(pdbvt,sets[1],bu_treshold);
+ node->childs[0]->parent=node;
+ node->childs[1]->parent=node;
+ return(node);
+ }
+ else
+ {
+ bottomup(pdbvt,leaves);
+ return(leaves[0]);
+ }
+ }
+ return(leaves[0]);
+}
+
+//
+static DBVT_INLINE btDbvtNode* sort(btDbvtNode* n,btDbvtNode*& r)
+{
+ btDbvtNode* p=n->parent;
+ btAssert(n->isinternal());
+ if(p>n)
+ {
+ const int i=indexof(n);
+ const int j=1-i;
+ btDbvtNode* s=p->childs[j];
+ btDbvtNode* q=p->parent;
+ btAssert(n==p->childs[i]);
+ if(q) q->childs[indexof(p)]=n; else r=n;
+ s->parent=n;
+ p->parent=n;
+ n->parent=q;
+ p->childs[0]=n->childs[0];
+ p->childs[1]=n->childs[1];
+ n->childs[0]->parent=p;
+ n->childs[1]->parent=p;
+ n->childs[i]=p;
+ n->childs[j]=s;
+ btSwap(p->volume,n->volume);
+ return(p);
+ }
+ return(n);
+}
+
+#if 0
+static DBVT_INLINE btDbvtNode* walkup(btDbvtNode* n,int count)
+{
+ while(n&&(count--)) n=n->parent;
+ return(n);
+}
+#endif
+
+//
+// Api
+//
+
+//
+btDbvt::btDbvt()
+{
+ m_root = 0;
+ m_free = 0;
+ m_lkhd = -1;
+ m_leaves = 0;
+ m_opath = 0;
+}
+
+//
+btDbvt::~btDbvt()
+{
+ clear();
+}
+
+//
+void btDbvt::clear()
+{
+ if(m_root)
+ recursedeletenode(this,m_root);
+ btAlignedFree(m_free);
+ m_free=0;
+ m_lkhd = -1;
+ m_stkStack.clear();
+ m_opath = 0;
+
+}
+
+//
+void btDbvt::optimizeBottomUp()
+{
+ if(m_root)
+ {
+ tNodeArray leaves;
+ leaves.reserve(m_leaves);
+ fetchleaves(this,m_root,leaves);
+ bottomup(this,leaves);
+ m_root=leaves[0];
+ }
+}
+
+//
+void btDbvt::optimizeTopDown(int bu_treshold)
+{
+ if(m_root)
+ {
+ tNodeArray leaves;
+ leaves.reserve(m_leaves);
+ fetchleaves(this,m_root,leaves);
+ m_root=topdown(this,leaves,bu_treshold);
+ }
+}
+
+//
+void btDbvt::optimizeIncremental(int passes)
+{
+ if(passes<0) passes=m_leaves;
+ if(m_root&&(passes>0))
+ {
+ do {
+ btDbvtNode* node=m_root;
+ unsigned bit=0;
+ while(node->isinternal())
+ {
+ node=sort(node,m_root)->childs[(m_opath>>bit)&1];
+ bit=(bit+1)&(sizeof(unsigned)*8-1);
+ }
+ update(node);
+ ++m_opath;
+ } while(--passes);
+ }
+}
+
+//
+btDbvtNode* btDbvt::insert(const btDbvtVolume& volume,void* data)
+{
+ btDbvtNode* leaf=createnode(this,0,volume,data);
+ insertleaf(this,m_root,leaf);
+ ++m_leaves;
+ return(leaf);
+}
+
+//
+void btDbvt::update(btDbvtNode* leaf,int lookahead)
+{
+ btDbvtNode* root=removeleaf(this,leaf);
+ if(root)
+ {
+ if(lookahead>=0)
+ {
+ for(int i=0;(i<lookahead)&&root->parent;++i)
+ {
+ root=root->parent;
+ }
+ } else root=m_root;
+ }
+ insertleaf(this,root,leaf);
+}
+
+//
+void btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume)
+{
+ btDbvtNode* root=removeleaf(this,leaf);
+ if(root)
+ {
+ if(m_lkhd>=0)
+ {
+ for(int i=0;(i<m_lkhd)&&root->parent;++i)
+ {
+ root=root->parent;
+ }
+ } else root=m_root;
+ }
+ leaf->volume=volume;
+ insertleaf(this,root,leaf);
+}
+
+//
+bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity,btScalar margin)
+{
+ if(leaf->volume.Contain(volume)) return(false);
+ volume.Expand(btVector3(margin,margin,margin));
+ volume.SignedExpand(velocity);
+ update(leaf,volume);
+ return(true);
+}
+
+//
+bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity)
+{
+ if(leaf->volume.Contain(volume)) return(false);
+ volume.SignedExpand(velocity);
+ update(leaf,volume);
+ return(true);
+}
+
+//
+bool btDbvt::update(btDbvtNode* leaf,btDbvtVolume& volume,btScalar margin)
+{
+ if(leaf->volume.Contain(volume)) return(false);
+ volume.Expand(btVector3(margin,margin,margin));
+ update(leaf,volume);
+ return(true);
+}
+
+//
+void btDbvt::remove(btDbvtNode* leaf)
+{
+ removeleaf(this,leaf);
+ deletenode(this,leaf);
+ --m_leaves;
+}
+
+//
+void btDbvt::write(IWriter* iwriter) const
+{
+ btDbvtNodeEnumerator nodes;
+ nodes.nodes.reserve(m_leaves*2);
+ enumNodes(m_root,nodes);
+ iwriter->Prepare(m_root,nodes.nodes.size());
+ for(int i=0;i<nodes.nodes.size();++i)
+ {
+ const btDbvtNode* n=nodes.nodes[i];
+ int p=-1;
+ if(n->parent) p=nodes.nodes.findLinearSearch(n->parent);
+ if(n->isinternal())
+ {
+ const int c0=nodes.nodes.findLinearSearch(n->childs[0]);
+ const int c1=nodes.nodes.findLinearSearch(n->childs[1]);
+ iwriter->WriteNode(n,i,p,c0,c1);
+ }
+ else
+ {
+ iwriter->WriteLeaf(n,i,p);
+ }
+ }
+}
+
+//
+void btDbvt::clone(btDbvt& dest,IClone* iclone) const
+{
+ dest.clear();
+ if(m_root!=0)
+ {
+ btAlignedObjectArray<sStkCLN> stack;
+ stack.reserve(m_leaves);
+ stack.push_back(sStkCLN(m_root,0));
+ do {
+ const int i=stack.size()-1;
+ const sStkCLN e=stack[i];
+ btDbvtNode* n=createnode(&dest,e.parent,e.node->volume,e.node->data);
+ stack.pop_back();
+ if(e.parent!=0)
+ e.parent->childs[i&1]=n;
+ else
+ dest.m_root=n;
+ if(e.node->isinternal())
+ {
+ stack.push_back(sStkCLN(e.node->childs[0],n));
+ stack.push_back(sStkCLN(e.node->childs[1],n));
+ }
+ else
+ {
+ iclone->CloneLeaf(n);
+ }
+ } while(stack.size()>0);
+ }
+}
+
+//
+int btDbvt::maxdepth(const btDbvtNode* node)
+{
+ int depth=0;
+ if(node) getmaxdepth(node,1,depth);
+ return(depth);
+}
+
+//
+int btDbvt::countLeaves(const btDbvtNode* node)
+{
+ if(node->isinternal())
+ return(countLeaves(node->childs[0])+countLeaves(node->childs[1]));
+ else
+ return(1);
+}
+
+//
+void btDbvt::extractLeaves(const btDbvtNode* node,btAlignedObjectArray<const btDbvtNode*>& leaves)
+{
+ if(node->isinternal())
+ {
+ extractLeaves(node->childs[0],leaves);
+ extractLeaves(node->childs[1],leaves);
+ }
+ else
+ {
+ leaves.push_back(node);
+ }
+}
+
+//
+#if DBVT_ENABLE_BENCHMARK
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "LinearMath/btQuickProf.h"
+
+/*
+q6600,2.4ghz
+
+/Ox /Ob2 /Oi /Ot /I "." /I "..\.." /I "..\..\src" /D "NDEBUG" /D "_LIB" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "WIN32"
+/GF /FD /MT /GS- /Gy /arch:SSE2 /Zc:wchar_t- /Fp"..\..\out\release8\build\libbulletcollision\libbulletcollision.pch"
+/Fo"..\..\out\release8\build\libbulletcollision\\"
+/Fd"..\..\out\release8\build\libbulletcollision\bulletcollision.pdb"
+/W3 /nologo /c /Wp64 /Zi /errorReport:prompt
+
+Benchmarking dbvt...
+World scale: 100.000000
+Extents base: 1.000000
+Extents range: 4.000000
+Leaves: 8192
+sizeof(btDbvtVolume): 32 bytes
+sizeof(btDbvtNode): 44 bytes
+[1] btDbvtVolume intersections: 3499 ms (-1%)
+[2] btDbvtVolume merges: 1934 ms (0%)
+[3] btDbvt::collideTT: 5485 ms (-21%)
+[4] btDbvt::collideTT self: 2814 ms (-20%)
+[5] btDbvt::collideTT xform: 7379 ms (-1%)
+[6] btDbvt::collideTT xform,self: 7270 ms (-2%)
+[7] btDbvt::rayTest: 6314 ms (0%),(332143 r/s)
+[8] insert/remove: 2093 ms (0%),(1001983 ir/s)
+[9] updates (teleport): 1879 ms (-3%),(1116100 u/s)
+[10] updates (jitter): 1244 ms (-4%),(1685813 u/s)
+[11] optimize (incremental): 2514 ms (0%),(1668000 o/s)
+[12] btDbvtVolume notequal: 3659 ms (0%)
+[13] culling(OCL+fullsort): 2218 ms (0%),(461 t/s)
+[14] culling(OCL+qsort): 3688 ms (5%),(2221 t/s)
+[15] culling(KDOP+qsort): 1139 ms (-1%),(7192 t/s)
+[16] insert/remove batch(256): 5092 ms (0%),(823704 bir/s)
+[17] btDbvtVolume select: 3419 ms (0%)
+*/
+
+struct btDbvtBenchmark
+{
+ struct NilPolicy : btDbvt::ICollide
+ {
+ NilPolicy() : m_pcount(0),m_depth(-SIMD_INFINITY),m_checksort(true) {}
+ void Process(const btDbvtNode*,const btDbvtNode*) { ++m_pcount; }
+ void Process(const btDbvtNode*) { ++m_pcount; }
+ void Process(const btDbvtNode*,btScalar depth)
+ {
+ ++m_pcount;
+ if(m_checksort)
+ { if(depth>=m_depth) m_depth=depth; else printf("wrong depth: %f (should be >= %f)\r\n",depth,m_depth); }
+ }
+ int m_pcount;
+ btScalar m_depth;
+ bool m_checksort;
+ };
+ struct P14 : btDbvt::ICollide
+ {
+ struct Node
+ {
+ const btDbvtNode* leaf;
+ btScalar depth;
+ };
+ void Process(const btDbvtNode* leaf,btScalar depth)
+ {
+ Node n;
+ n.leaf = leaf;
+ n.depth = depth;
+ }
+ static int sortfnc(const Node& a,const Node& b)
+ {
+ if(a.depth<b.depth) return(+1);
+ if(a.depth>b.depth) return(-1);
+ return(0);
+ }
+ btAlignedObjectArray<Node> m_nodes;
+ };
+ struct P15 : btDbvt::ICollide
+ {
+ struct Node
+ {
+ const btDbvtNode* leaf;
+ btScalar depth;
+ };
+ void Process(const btDbvtNode* leaf)
+ {
+ Node n;
+ n.leaf = leaf;
+ n.depth = dot(leaf->volume.Center(),m_axis);
+ }
+ static int sortfnc(const Node& a,const Node& b)
+ {
+ if(a.depth<b.depth) return(+1);
+ if(a.depth>b.depth) return(-1);
+ return(0);
+ }
+ btAlignedObjectArray<Node> m_nodes;
+ btVector3 m_axis;
+ };
+ static btScalar RandUnit()
+ {
+ return(rand()/(btScalar)RAND_MAX);
+ }
+ static btVector3 RandVector3()
+ {
+ return(btVector3(RandUnit(),RandUnit(),RandUnit()));
+ }
+ static btVector3 RandVector3(btScalar cs)
+ {
+ return(RandVector3()*cs-btVector3(cs,cs,cs)/2);
+ }
+ static btDbvtVolume RandVolume(btScalar cs,btScalar eb,btScalar es)
+ {
+ return(btDbvtVolume::FromCE(RandVector3(cs),btVector3(eb,eb,eb)+RandVector3()*es));
+ }
+ static btTransform RandTransform(btScalar cs)
+ {
+ btTransform t;
+ t.setOrigin(RandVector3(cs));
+ t.setRotation(btQuaternion(RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2,RandUnit()*SIMD_PI*2).normalized());
+ return(t);
+ }
+ static void RandTree(btScalar cs,btScalar eb,btScalar es,int leaves,btDbvt& dbvt)
+ {
+ dbvt.clear();
+ for(int i=0;i<leaves;++i)
+ {
+ dbvt.insert(RandVolume(cs,eb,es),0);
+ }
+ }
+};
+
+void btDbvt::benchmark()
+{
+ static const btScalar cfgVolumeCenterScale = 100;
+ static const btScalar cfgVolumeExentsBase = 1;
+ static const btScalar cfgVolumeExentsScale = 4;
+ static const int cfgLeaves = 8192;
+ static const bool cfgEnable = true;
+
+ //[1] btDbvtVolume intersections
+ bool cfgBenchmark1_Enable = cfgEnable;
+ static const int cfgBenchmark1_Iterations = 8;
+ static const int cfgBenchmark1_Reference = 3499;
+ //[2] btDbvtVolume merges
+ bool cfgBenchmark2_Enable = cfgEnable;
+ static const int cfgBenchmark2_Iterations = 4;
+ static const int cfgBenchmark2_Reference = 1945;
+ //[3] btDbvt::collideTT
+ bool cfgBenchmark3_Enable = cfgEnable;
+ static const int cfgBenchmark3_Iterations = 512;
+ static const int cfgBenchmark3_Reference = 5485;
+ //[4] btDbvt::collideTT self
+ bool cfgBenchmark4_Enable = cfgEnable;
+ static const int cfgBenchmark4_Iterations = 512;
+ static const int cfgBenchmark4_Reference = 2814;
+ //[5] btDbvt::collideTT xform
+ bool cfgBenchmark5_Enable = cfgEnable;
+ static const int cfgBenchmark5_Iterations = 512;
+ static const btScalar cfgBenchmark5_OffsetScale = 2;
+ static const int cfgBenchmark5_Reference = 7379;
+ //[6] btDbvt::collideTT xform,self
+ bool cfgBenchmark6_Enable = cfgEnable;
+ static const int cfgBenchmark6_Iterations = 512;
+ static const btScalar cfgBenchmark6_OffsetScale = 2;
+ static const int cfgBenchmark6_Reference = 7270;
+ //[7] btDbvt::rayTest
+ bool cfgBenchmark7_Enable = cfgEnable;
+ static const int cfgBenchmark7_Passes = 32;
+ static const int cfgBenchmark7_Iterations = 65536;
+ static const int cfgBenchmark7_Reference = 6307;
+ //[8] insert/remove
+ bool cfgBenchmark8_Enable = cfgEnable;
+ static const int cfgBenchmark8_Passes = 32;
+ static const int cfgBenchmark8_Iterations = 65536;
+ static const int cfgBenchmark8_Reference = 2105;
+ //[9] updates (teleport)
+ bool cfgBenchmark9_Enable = cfgEnable;
+ static const int cfgBenchmark9_Passes = 32;
+ static const int cfgBenchmark9_Iterations = 65536;
+ static const int cfgBenchmark9_Reference = 1879;
+ //[10] updates (jitter)
+ bool cfgBenchmark10_Enable = cfgEnable;
+ static const btScalar cfgBenchmark10_Scale = cfgVolumeCenterScale/10000;
+ static const int cfgBenchmark10_Passes = 32;
+ static const int cfgBenchmark10_Iterations = 65536;
+ static const int cfgBenchmark10_Reference = 1244;
+ //[11] optimize (incremental)
+ bool cfgBenchmark11_Enable = cfgEnable;
+ static const int cfgBenchmark11_Passes = 64;
+ static const int cfgBenchmark11_Iterations = 65536;
+ static const int cfgBenchmark11_Reference = 2510;
+ //[12] btDbvtVolume notequal
+ bool cfgBenchmark12_Enable = cfgEnable;
+ static const int cfgBenchmark12_Iterations = 32;
+ static const int cfgBenchmark12_Reference = 3677;
+ //[13] culling(OCL+fullsort)
+ bool cfgBenchmark13_Enable = cfgEnable;
+ static const int cfgBenchmark13_Iterations = 1024;
+ static const int cfgBenchmark13_Reference = 2231;
+ //[14] culling(OCL+qsort)
+ bool cfgBenchmark14_Enable = cfgEnable;
+ static const int cfgBenchmark14_Iterations = 8192;
+ static const int cfgBenchmark14_Reference = 3500;
+ //[15] culling(KDOP+qsort)
+ bool cfgBenchmark15_Enable = cfgEnable;
+ static const int cfgBenchmark15_Iterations = 8192;
+ static const int cfgBenchmark15_Reference = 1151;
+ //[16] insert/remove batch
+ bool cfgBenchmark16_Enable = cfgEnable;
+ static const int cfgBenchmark16_BatchCount = 256;
+ static const int cfgBenchmark16_Passes = 16384;
+ static const int cfgBenchmark16_Reference = 5138;
+ //[17] select
+ bool cfgBenchmark17_Enable = cfgEnable;
+ static const int cfgBenchmark17_Iterations = 4;
+ static const int cfgBenchmark17_Reference = 3390;
+
+ btClock wallclock;
+ printf("Benchmarking dbvt...\r\n");
+ printf("\tWorld scale: %f\r\n",cfgVolumeCenterScale);
+ printf("\tExtents base: %f\r\n",cfgVolumeExentsBase);
+ printf("\tExtents range: %f\r\n",cfgVolumeExentsScale);
+ printf("\tLeaves: %u\r\n",cfgLeaves);
+ printf("\tsizeof(btDbvtVolume): %u bytes\r\n",sizeof(btDbvtVolume));
+ printf("\tsizeof(btDbvtNode): %u bytes\r\n",sizeof(btDbvtNode));
+ if(cfgBenchmark1_Enable)
+ {// Benchmark 1
+ srand(380843);
+ btAlignedObjectArray<btDbvtVolume> volumes;
+ btAlignedObjectArray<bool> results;
+ volumes.resize(cfgLeaves);
+ results.resize(cfgLeaves);
+ for(int i=0;i<cfgLeaves;++i)
+ {
+ volumes[i]=btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale);
+ }
+ printf("[1] btDbvtVolume intersections: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark1_Iterations;++i)
+ {
+ for(int j=0;j<cfgLeaves;++j)
+ {
+ for(int k=0;k<cfgLeaves;++k)
+ {
+ results[k]=Intersect(volumes[j],volumes[k]);
+ }
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark1_Reference)*100/time);
+ }
+ if(cfgBenchmark2_Enable)
+ {// Benchmark 2
+ srand(380843);
+ btAlignedObjectArray<btDbvtVolume> volumes;
+ btAlignedObjectArray<btDbvtVolume> results;
+ volumes.resize(cfgLeaves);
+ results.resize(cfgLeaves);
+ for(int i=0;i<cfgLeaves;++i)
+ {
+ volumes[i]=btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale);
+ }
+ printf("[2] btDbvtVolume merges: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark2_Iterations;++i)
+ {
+ for(int j=0;j<cfgLeaves;++j)
+ {
+ for(int k=0;k<cfgLeaves;++k)
+ {
+ Merge(volumes[j],volumes[k],results[k]);
+ }
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark2_Reference)*100/time);
+ }
+ if(cfgBenchmark3_Enable)
+ {// Benchmark 3
+ srand(380843);
+ btDbvt dbvt[2];
+ btDbvtBenchmark::NilPolicy policy;
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt[0]);
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt[1]);
+ dbvt[0].optimizeTopDown();
+ dbvt[1].optimizeTopDown();
+ printf("[3] btDbvt::collideTT: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark3_Iterations;++i)
+ {
+ btDbvt::collideTT(dbvt[0].m_root,dbvt[1].m_root,policy);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark3_Reference)*100/time);
+ }
+ if(cfgBenchmark4_Enable)
+ {// Benchmark 4
+ srand(380843);
+ btDbvt dbvt;
+ btDbvtBenchmark::NilPolicy policy;
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ printf("[4] btDbvt::collideTT self: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark4_Iterations;++i)
+ {
+ btDbvt::collideTT(dbvt.m_root,dbvt.m_root,policy);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark4_Reference)*100/time);
+ }
+ if(cfgBenchmark5_Enable)
+ {// Benchmark 5
+ srand(380843);
+ btDbvt dbvt[2];
+ btAlignedObjectArray<btTransform> transforms;
+ btDbvtBenchmark::NilPolicy policy;
+ transforms.resize(cfgBenchmark5_Iterations);
+ for(int i=0;i<transforms.size();++i)
+ {
+ transforms[i]=btDbvtBenchmark::RandTransform(cfgVolumeCenterScale*cfgBenchmark5_OffsetScale);
+ }
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt[0]);
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt[1]);
+ dbvt[0].optimizeTopDown();
+ dbvt[1].optimizeTopDown();
+ printf("[5] btDbvt::collideTT xform: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark5_Iterations;++i)
+ {
+ btDbvt::collideTT(dbvt[0].m_root,dbvt[1].m_root,transforms[i],policy);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark5_Reference)*100/time);
+ }
+ if(cfgBenchmark6_Enable)
+ {// Benchmark 6
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<btTransform> transforms;
+ btDbvtBenchmark::NilPolicy policy;
+ transforms.resize(cfgBenchmark6_Iterations);
+ for(int i=0;i<transforms.size();++i)
+ {
+ transforms[i]=btDbvtBenchmark::RandTransform(cfgVolumeCenterScale*cfgBenchmark6_OffsetScale);
+ }
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ printf("[6] btDbvt::collideTT xform,self: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark6_Iterations;++i)
+ {
+ btDbvt::collideTT(dbvt.m_root,dbvt.m_root,transforms[i],policy);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark6_Reference)*100/time);
+ }
+ if(cfgBenchmark7_Enable)
+ {// Benchmark 7
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<btVector3> rayorg;
+ btAlignedObjectArray<btVector3> raydir;
+ btDbvtBenchmark::NilPolicy policy;
+ rayorg.resize(cfgBenchmark7_Iterations);
+ raydir.resize(cfgBenchmark7_Iterations);
+ for(int i=0;i<rayorg.size();++i)
+ {
+ rayorg[i]=btDbvtBenchmark::RandVector3(cfgVolumeCenterScale*2);
+ raydir[i]=btDbvtBenchmark::RandVector3(cfgVolumeCenterScale*2);
+ }
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ printf("[7] btDbvt::rayTest: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark7_Passes;++i)
+ {
+ for(int j=0;j<cfgBenchmark7_Iterations;++j)
+ {
+ btDbvt::rayTest(dbvt.m_root,rayorg[j],rayorg[j]+raydir[j],policy);
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ unsigned rays=cfgBenchmark7_Passes*cfgBenchmark7_Iterations;
+ printf("%u ms (%i%%),(%u r/s)\r\n",time,(time-cfgBenchmark7_Reference)*100/time,(rays*1000)/time);
+ }
+ if(cfgBenchmark8_Enable)
+ {// Benchmark 8
+ srand(380843);
+ btDbvt dbvt;
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ printf("[8] insert/remove: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark8_Passes;++i)
+ {
+ for(int j=0;j<cfgBenchmark8_Iterations;++j)
+ {
+ dbvt.remove(dbvt.insert(btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale),0));
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int ir=cfgBenchmark8_Passes*cfgBenchmark8_Iterations;
+ printf("%u ms (%i%%),(%u ir/s)\r\n",time,(time-cfgBenchmark8_Reference)*100/time,ir*1000/time);
+ }
+ if(cfgBenchmark9_Enable)
+ {// Benchmark 9
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<const btDbvtNode*> leaves;
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ dbvt.extractLeaves(dbvt.m_root,leaves);
+ printf("[9] updates (teleport): ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark9_Passes;++i)
+ {
+ for(int j=0;j<cfgBenchmark9_Iterations;++j)
+ {
+ dbvt.update(const_cast<btDbvtNode*>(leaves[rand()%cfgLeaves]),
+ btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale));
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int up=cfgBenchmark9_Passes*cfgBenchmark9_Iterations;
+ printf("%u ms (%i%%),(%u u/s)\r\n",time,(time-cfgBenchmark9_Reference)*100/time,up*1000/time);
+ }
+ if(cfgBenchmark10_Enable)
+ {// Benchmark 10
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<const btDbvtNode*> leaves;
+ btAlignedObjectArray<btVector3> vectors;
+ vectors.resize(cfgBenchmark10_Iterations);
+ for(int i=0;i<vectors.size();++i)
+ {
+ vectors[i]=(btDbvtBenchmark::RandVector3()*2-btVector3(1,1,1))*cfgBenchmark10_Scale;
+ }
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ dbvt.extractLeaves(dbvt.m_root,leaves);
+ printf("[10] updates (jitter): ");
+ wallclock.reset();
+
+ for(int i=0;i<cfgBenchmark10_Passes;++i)
+ {
+ for(int j=0;j<cfgBenchmark10_Iterations;++j)
+ {
+ const btVector3& d=vectors[j];
+ btDbvtNode* l=const_cast<btDbvtNode*>(leaves[rand()%cfgLeaves]);
+ btDbvtVolume v=btDbvtVolume::FromMM(l->volume.Mins()+d,l->volume.Maxs()+d);
+ dbvt.update(l,v);
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int up=cfgBenchmark10_Passes*cfgBenchmark10_Iterations;
+ printf("%u ms (%i%%),(%u u/s)\r\n",time,(time-cfgBenchmark10_Reference)*100/time,up*1000/time);
+ }
+ if(cfgBenchmark11_Enable)
+ {// Benchmark 11
+ srand(380843);
+ btDbvt dbvt;
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ printf("[11] optimize (incremental): ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark11_Passes;++i)
+ {
+ dbvt.optimizeIncremental(cfgBenchmark11_Iterations);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int op=cfgBenchmark11_Passes*cfgBenchmark11_Iterations;
+ printf("%u ms (%i%%),(%u o/s)\r\n",time,(time-cfgBenchmark11_Reference)*100/time,op/time*1000);
+ }
+ if(cfgBenchmark12_Enable)
+ {// Benchmark 12
+ srand(380843);
+ btAlignedObjectArray<btDbvtVolume> volumes;
+ btAlignedObjectArray<bool> results;
+ volumes.resize(cfgLeaves);
+ results.resize(cfgLeaves);
+ for(int i=0;i<cfgLeaves;++i)
+ {
+ volumes[i]=btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale);
+ }
+ printf("[12] btDbvtVolume notequal: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark12_Iterations;++i)
+ {
+ for(int j=0;j<cfgLeaves;++j)
+ {
+ for(int k=0;k<cfgLeaves;++k)
+ {
+ results[k]=NotEqual(volumes[j],volumes[k]);
+ }
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark12_Reference)*100/time);
+ }
+ if(cfgBenchmark13_Enable)
+ {// Benchmark 13
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<btVector3> vectors;
+ btDbvtBenchmark::NilPolicy policy;
+ vectors.resize(cfgBenchmark13_Iterations);
+ for(int i=0;i<vectors.size();++i)
+ {
+ vectors[i]=(btDbvtBenchmark::RandVector3()*2-btVector3(1,1,1)).normalized();
+ }
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ printf("[13] culling(OCL+fullsort): ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark13_Iterations;++i)
+ {
+ static const btScalar offset=0;
+ policy.m_depth=-SIMD_INFINITY;
+ dbvt.collideOCL(dbvt.m_root,&vectors[i],&offset,vectors[i],1,policy);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int t=cfgBenchmark13_Iterations;
+ printf("%u ms (%i%%),(%u t/s)\r\n",time,(time-cfgBenchmark13_Reference)*100/time,(t*1000)/time);
+ }
+ if(cfgBenchmark14_Enable)
+ {// Benchmark 14
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<btVector3> vectors;
+ btDbvtBenchmark::P14 policy;
+ vectors.resize(cfgBenchmark14_Iterations);
+ for(int i=0;i<vectors.size();++i)
+ {
+ vectors[i]=(btDbvtBenchmark::RandVector3()*2-btVector3(1,1,1)).normalized();
+ }
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ policy.m_nodes.reserve(cfgLeaves);
+ printf("[14] culling(OCL+qsort): ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark14_Iterations;++i)
+ {
+ static const btScalar offset=0;
+ policy.m_nodes.resize(0);
+ dbvt.collideOCL(dbvt.m_root,&vectors[i],&offset,vectors[i],1,policy,false);
+ policy.m_nodes.quickSort(btDbvtBenchmark::P14::sortfnc);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int t=cfgBenchmark14_Iterations;
+ printf("%u ms (%i%%),(%u t/s)\r\n",time,(time-cfgBenchmark14_Reference)*100/time,(t*1000)/time);
+ }
+ if(cfgBenchmark15_Enable)
+ {// Benchmark 15
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<btVector3> vectors;
+ btDbvtBenchmark::P15 policy;
+ vectors.resize(cfgBenchmark15_Iterations);
+ for(int i=0;i<vectors.size();++i)
+ {
+ vectors[i]=(btDbvtBenchmark::RandVector3()*2-btVector3(1,1,1)).normalized();
+ }
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ policy.m_nodes.reserve(cfgLeaves);
+ printf("[15] culling(KDOP+qsort): ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark15_Iterations;++i)
+ {
+ static const btScalar offset=0;
+ policy.m_nodes.resize(0);
+ policy.m_axis=vectors[i];
+ dbvt.collideKDOP(dbvt.m_root,&vectors[i],&offset,1,policy);
+ policy.m_nodes.quickSort(btDbvtBenchmark::P15::sortfnc);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int t=cfgBenchmark15_Iterations;
+ printf("%u ms (%i%%),(%u t/s)\r\n",time,(time-cfgBenchmark15_Reference)*100/time,(t*1000)/time);
+ }
+ if(cfgBenchmark16_Enable)
+ {// Benchmark 16
+ srand(380843);
+ btDbvt dbvt;
+ btAlignedObjectArray<btDbvtNode*> batch;
+ btDbvtBenchmark::RandTree(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale,cfgLeaves,dbvt);
+ dbvt.optimizeTopDown();
+ batch.reserve(cfgBenchmark16_BatchCount);
+ printf("[16] insert/remove batch(%u): ",cfgBenchmark16_BatchCount);
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark16_Passes;++i)
+ {
+ for(int j=0;j<cfgBenchmark16_BatchCount;++j)
+ {
+ batch.push_back(dbvt.insert(btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale),0));
+ }
+ for(int j=0;j<cfgBenchmark16_BatchCount;++j)
+ {
+ dbvt.remove(batch[j]);
+ }
+ batch.resize(0);
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ const int ir=cfgBenchmark16_Passes*cfgBenchmark16_BatchCount;
+ printf("%u ms (%i%%),(%u bir/s)\r\n",time,(time-cfgBenchmark16_Reference)*100/time,int(ir*1000.0/time));
+ }
+ if(cfgBenchmark17_Enable)
+ {// Benchmark 17
+ srand(380843);
+ btAlignedObjectArray<btDbvtVolume> volumes;
+ btAlignedObjectArray<int> results;
+ btAlignedObjectArray<int> indices;
+ volumes.resize(cfgLeaves);
+ results.resize(cfgLeaves);
+ indices.resize(cfgLeaves);
+ for(int i=0;i<cfgLeaves;++i)
+ {
+ indices[i]=i;
+ volumes[i]=btDbvtBenchmark::RandVolume(cfgVolumeCenterScale,cfgVolumeExentsBase,cfgVolumeExentsScale);
+ }
+ for(int i=0;i<cfgLeaves;++i)
+ {
+ btSwap(indices[i],indices[rand()%cfgLeaves]);
+ }
+ printf("[17] btDbvtVolume select: ");
+ wallclock.reset();
+ for(int i=0;i<cfgBenchmark17_Iterations;++i)
+ {
+ for(int j=0;j<cfgLeaves;++j)
+ {
+ for(int k=0;k<cfgLeaves;++k)
+ {
+ const int idx=indices[k];
+ results[idx]=Select(volumes[idx],volumes[j],volumes[k]);
+ }
+ }
+ }
+ const int time=(int)wallclock.getTimeMilliseconds();
+ printf("%u ms (%i%%)\r\n",time,(time-cfgBenchmark17_Reference)*100/time);
+ }
+ printf("\r\n\r\n");
+}
+#endif
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.h
new file mode 100644
index 00000000..2bb8ef5d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvt.h
@@ -0,0 +1,1256 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///btDbvt implementation by Nathanael Presson
+
+#ifndef BT_DYNAMIC_BOUNDING_VOLUME_TREE_H
+#define BT_DYNAMIC_BOUNDING_VOLUME_TREE_H
+
+#include "LinearMath/btAlignedObjectArray.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btAabbUtil2.h"
+
+//
+// Compile time configuration
+//
+
+
+// Implementation profiles
+#define DBVT_IMPL_GENERIC 0 // Generic implementation
+#define DBVT_IMPL_SSE 1 // SSE
+
+// Template implementation of ICollide
+#ifdef _WIN32
+#if (defined (_MSC_VER) && _MSC_VER >= 1400)
+#define DBVT_USE_TEMPLATE 1
+#else
+#define DBVT_USE_TEMPLATE 0
+#endif
+#else
+#define DBVT_USE_TEMPLATE 0
+#endif
+
+// Use only intrinsics instead of inline asm
+#define DBVT_USE_INTRINSIC_SSE 1
+
+// Using memmov for collideOCL
+#define DBVT_USE_MEMMOVE 1
+
+// Enable benchmarking code
+#define DBVT_ENABLE_BENCHMARK 0
+
+// Inlining
+#define DBVT_INLINE SIMD_FORCE_INLINE
+
+// Specific methods implementation
+
+//SSE gives errors on a MSVC 7.1
+#if defined (BT_USE_SSE) && defined (_WIN32)
+#define DBVT_SELECT_IMPL DBVT_IMPL_SSE
+#define DBVT_MERGE_IMPL DBVT_IMPL_SSE
+#define DBVT_INT0_IMPL DBVT_IMPL_SSE
+#else
+#define DBVT_SELECT_IMPL DBVT_IMPL_GENERIC
+#define DBVT_MERGE_IMPL DBVT_IMPL_GENERIC
+#define DBVT_INT0_IMPL DBVT_IMPL_GENERIC
+#endif
+
+#if (DBVT_SELECT_IMPL==DBVT_IMPL_SSE)|| \
+ (DBVT_MERGE_IMPL==DBVT_IMPL_SSE)|| \
+ (DBVT_INT0_IMPL==DBVT_IMPL_SSE)
+#include <emmintrin.h>
+#endif
+
+//
+// Auto config and checks
+//
+
+#if DBVT_USE_TEMPLATE
+#define DBVT_VIRTUAL
+#define DBVT_VIRTUAL_DTOR(a)
+#define DBVT_PREFIX template <typename T>
+#define DBVT_IPOLICY T& policy
+#define DBVT_CHECKTYPE static const ICollide& typechecker=*(T*)1;(void)typechecker;
+#else
+#define DBVT_VIRTUAL_DTOR(a) virtual ~a() {}
+#define DBVT_VIRTUAL virtual
+#define DBVT_PREFIX
+#define DBVT_IPOLICY ICollide& policy
+#define DBVT_CHECKTYPE
+#endif
+
+#if DBVT_USE_MEMMOVE
+#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
+#include <memory.h>
+#endif
+#include <string.h>
+#endif
+
+#ifndef DBVT_USE_TEMPLATE
+#error "DBVT_USE_TEMPLATE undefined"
+#endif
+
+#ifndef DBVT_USE_MEMMOVE
+#error "DBVT_USE_MEMMOVE undefined"
+#endif
+
+#ifndef DBVT_ENABLE_BENCHMARK
+#error "DBVT_ENABLE_BENCHMARK undefined"
+#endif
+
+#ifndef DBVT_SELECT_IMPL
+#error "DBVT_SELECT_IMPL undefined"
+#endif
+
+#ifndef DBVT_MERGE_IMPL
+#error "DBVT_MERGE_IMPL undefined"
+#endif
+
+#ifndef DBVT_INT0_IMPL
+#error "DBVT_INT0_IMPL undefined"
+#endif
+
+//
+// Defaults volumes
+//
+
+/* btDbvtAabbMm */
+struct btDbvtAabbMm
+{
+ DBVT_INLINE btVector3 Center() const { return((mi+mx)/2); }
+ DBVT_INLINE btVector3 Lengths() const { return(mx-mi); }
+ DBVT_INLINE btVector3 Extents() const { return((mx-mi)/2); }
+ DBVT_INLINE const btVector3& Mins() const { return(mi); }
+ DBVT_INLINE const btVector3& Maxs() const { return(mx); }
+ static inline btDbvtAabbMm FromCE(const btVector3& c,const btVector3& e);
+ static inline btDbvtAabbMm FromCR(const btVector3& c,btScalar r);
+ static inline btDbvtAabbMm FromMM(const btVector3& mi,const btVector3& mx);
+ static inline btDbvtAabbMm FromPoints(const btVector3* pts,int n);
+ static inline btDbvtAabbMm FromPoints(const btVector3** ppts,int n);
+ DBVT_INLINE void Expand(const btVector3& e);
+ DBVT_INLINE void SignedExpand(const btVector3& e);
+ DBVT_INLINE bool Contain(const btDbvtAabbMm& a) const;
+ DBVT_INLINE int Classify(const btVector3& n,btScalar o,int s) const;
+ DBVT_INLINE btScalar ProjectMinimum(const btVector3& v,unsigned signs) const;
+ DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b);
+
+ DBVT_INLINE friend bool Intersect( const btDbvtAabbMm& a,
+ const btVector3& b);
+
+ DBVT_INLINE friend btScalar Proximity( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b);
+ DBVT_INLINE friend int Select( const btDbvtAabbMm& o,
+ const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b);
+ DBVT_INLINE friend void Merge( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b,
+ btDbvtAabbMm& r);
+ DBVT_INLINE friend bool NotEqual( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b);
+private:
+ DBVT_INLINE void AddSpan(const btVector3& d,btScalar& smi,btScalar& smx) const;
+private:
+ btVector3 mi,mx;
+};
+
+// Types
+typedef btDbvtAabbMm btDbvtVolume;
+
+/* btDbvtNode */
+struct btDbvtNode
+{
+ btDbvtVolume volume;
+ btDbvtNode* parent;
+ DBVT_INLINE bool isleaf() const { return(childs[1]==0); }
+ DBVT_INLINE bool isinternal() const { return(!isleaf()); }
+ union
+ {
+ btDbvtNode* childs[2];
+ void* data;
+ int dataAsInt;
+ };
+};
+
+///The btDbvt class implements a fast dynamic bounding volume tree based on axis aligned bounding boxes (aabb tree).
+///This btDbvt is used for soft body collision detection and for the btDbvtBroadphase. It has a fast insert, remove and update of nodes.
+///Unlike the btQuantizedBvh, nodes can be dynamically moved around, which allows for change in topology of the underlying data structure.
+struct btDbvt
+{
+ /* Stack element */
+ struct sStkNN
+ {
+ const btDbvtNode* a;
+ const btDbvtNode* b;
+ sStkNN() {}
+ sStkNN(const btDbvtNode* na,const btDbvtNode* nb) : a(na),b(nb) {}
+ };
+ struct sStkNP
+ {
+ const btDbvtNode* node;
+ int mask;
+ sStkNP(const btDbvtNode* n,unsigned m) : node(n),mask(m) {}
+ };
+ struct sStkNPS
+ {
+ const btDbvtNode* node;
+ int mask;
+ btScalar value;
+ sStkNPS() {}
+ sStkNPS(const btDbvtNode* n,unsigned m,btScalar v) : node(n),mask(m),value(v) {}
+ };
+ struct sStkCLN
+ {
+ const btDbvtNode* node;
+ btDbvtNode* parent;
+ sStkCLN(const btDbvtNode* n,btDbvtNode* p) : node(n),parent(p) {}
+ };
+ // Policies/Interfaces
+
+ /* ICollide */
+ struct ICollide
+ {
+ DBVT_VIRTUAL_DTOR(ICollide)
+ DBVT_VIRTUAL void Process(const btDbvtNode*,const btDbvtNode*) {}
+ DBVT_VIRTUAL void Process(const btDbvtNode*) {}
+ DBVT_VIRTUAL void Process(const btDbvtNode* n,btScalar) { Process(n); }
+ DBVT_VIRTUAL bool Descent(const btDbvtNode*) { return(true); }
+ DBVT_VIRTUAL bool AllLeaves(const btDbvtNode*) { return(true); }
+ };
+ /* IWriter */
+ struct IWriter
+ {
+ virtual ~IWriter() {}
+ virtual void Prepare(const btDbvtNode* root,int numnodes)=0;
+ virtual void WriteNode(const btDbvtNode*,int index,int parent,int child0,int child1)=0;
+ virtual void WriteLeaf(const btDbvtNode*,int index,int parent)=0;
+ };
+ /* IClone */
+ struct IClone
+ {
+ virtual ~IClone() {}
+ virtual void CloneLeaf(btDbvtNode*) {}
+ };
+
+ // Constants
+ enum {
+ SIMPLE_STACKSIZE = 64,
+ DOUBLE_STACKSIZE = SIMPLE_STACKSIZE*2
+ };
+
+ // Fields
+ btDbvtNode* m_root;
+ btDbvtNode* m_free;
+ int m_lkhd;
+ int m_leaves;
+ unsigned m_opath;
+
+
+ btAlignedObjectArray<sStkNN> m_stkStack;
+
+
+ // Methods
+ btDbvt();
+ ~btDbvt();
+ void clear();
+ bool empty() const { return(0==m_root); }
+ void optimizeBottomUp();
+ void optimizeTopDown(int bu_treshold=128);
+ void optimizeIncremental(int passes);
+ btDbvtNode* insert(const btDbvtVolume& box,void* data);
+ void update(btDbvtNode* leaf,int lookahead=-1);
+ void update(btDbvtNode* leaf,btDbvtVolume& volume);
+ bool update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity,btScalar margin);
+ bool update(btDbvtNode* leaf,btDbvtVolume& volume,const btVector3& velocity);
+ bool update(btDbvtNode* leaf,btDbvtVolume& volume,btScalar margin);
+ void remove(btDbvtNode* leaf);
+ void write(IWriter* iwriter) const;
+ void clone(btDbvt& dest,IClone* iclone=0) const;
+ static int maxdepth(const btDbvtNode* node);
+ static int countLeaves(const btDbvtNode* node);
+ static void extractLeaves(const btDbvtNode* node,btAlignedObjectArray<const btDbvtNode*>& leaves);
+#if DBVT_ENABLE_BENCHMARK
+ static void benchmark();
+#else
+ static void benchmark(){}
+#endif
+ // DBVT_IPOLICY must support ICollide policy/interface
+ DBVT_PREFIX
+ static void enumNodes( const btDbvtNode* root,
+ DBVT_IPOLICY);
+ DBVT_PREFIX
+ static void enumLeaves( const btDbvtNode* root,
+ DBVT_IPOLICY);
+ DBVT_PREFIX
+ void collideTT( const btDbvtNode* root0,
+ const btDbvtNode* root1,
+ DBVT_IPOLICY);
+
+ DBVT_PREFIX
+ void collideTTpersistentStack( const btDbvtNode* root0,
+ const btDbvtNode* root1,
+ DBVT_IPOLICY);
+#if 0
+ DBVT_PREFIX
+ void collideTT( const btDbvtNode* root0,
+ const btDbvtNode* root1,
+ const btTransform& xform,
+ DBVT_IPOLICY);
+ DBVT_PREFIX
+ void collideTT( const btDbvtNode* root0,
+ const btTransform& xform0,
+ const btDbvtNode* root1,
+ const btTransform& xform1,
+ DBVT_IPOLICY);
+#endif
+
+ DBVT_PREFIX
+ void collideTV( const btDbvtNode* root,
+ const btDbvtVolume& volume,
+ DBVT_IPOLICY);
+ ///rayTest is a re-entrant ray test, and can be called in parallel as long as the btAlignedAlloc is thread-safe (uses locking etc)
+ ///rayTest is slower than rayTestInternal, because it builds a local stack, using memory allocations, and it recomputes signs/rayDirectionInverses each time
+ DBVT_PREFIX
+ static void rayTest( const btDbvtNode* root,
+ const btVector3& rayFrom,
+ const btVector3& rayTo,
+ DBVT_IPOLICY);
+ ///rayTestInternal is faster than rayTest, because it uses a persistent stack (to reduce dynamic memory allocations to a minimum) and it uses precomputed signs/rayInverseDirections
+ ///rayTestInternal is used by btDbvtBroadphase to accelerate world ray casts
+ DBVT_PREFIX
+ void rayTestInternal( const btDbvtNode* root,
+ const btVector3& rayFrom,
+ const btVector3& rayTo,
+ const btVector3& rayDirectionInverse,
+ unsigned int signs[3],
+ btScalar lambda_max,
+ const btVector3& aabbMin,
+ const btVector3& aabbMax,
+ DBVT_IPOLICY) const;
+
+ DBVT_PREFIX
+ static void collideKDOP(const btDbvtNode* root,
+ const btVector3* normals,
+ const btScalar* offsets,
+ int count,
+ DBVT_IPOLICY);
+ DBVT_PREFIX
+ static void collideOCL( const btDbvtNode* root,
+ const btVector3* normals,
+ const btScalar* offsets,
+ const btVector3& sortaxis,
+ int count,
+ DBVT_IPOLICY,
+ bool fullsort=true);
+ DBVT_PREFIX
+ static void collideTU( const btDbvtNode* root,
+ DBVT_IPOLICY);
+ // Helpers
+ static DBVT_INLINE int nearest(const int* i,const btDbvt::sStkNPS* a,btScalar v,int l,int h)
+ {
+ int m=0;
+ while(l<h)
+ {
+ m=(l+h)>>1;
+ if(a[i[m]].value>=v) l=m+1; else h=m;
+ }
+ return(h);
+ }
+ static DBVT_INLINE int allocate( btAlignedObjectArray<int>& ifree,
+ btAlignedObjectArray<sStkNPS>& stock,
+ const sStkNPS& value)
+ {
+ int i;
+ if(ifree.size()>0)
+ { i=ifree[ifree.size()-1];ifree.pop_back();stock[i]=value; }
+ else
+ { i=stock.size();stock.push_back(value); }
+ return(i);
+ }
+ //
+private:
+ btDbvt(const btDbvt&) {}
+};
+
+//
+// Inline's
+//
+
+//
+inline btDbvtAabbMm btDbvtAabbMm::FromCE(const btVector3& c,const btVector3& e)
+{
+ btDbvtAabbMm box;
+ box.mi=c-e;box.mx=c+e;
+ return(box);
+}
+
+//
+inline btDbvtAabbMm btDbvtAabbMm::FromCR(const btVector3& c,btScalar r)
+{
+ return(FromCE(c,btVector3(r,r,r)));
+}
+
+//
+inline btDbvtAabbMm btDbvtAabbMm::FromMM(const btVector3& mi,const btVector3& mx)
+{
+ btDbvtAabbMm box;
+ box.mi=mi;box.mx=mx;
+ return(box);
+}
+
+//
+inline btDbvtAabbMm btDbvtAabbMm::FromPoints(const btVector3* pts,int n)
+{
+ btDbvtAabbMm box;
+ box.mi=box.mx=pts[0];
+ for(int i=1;i<n;++i)
+ {
+ box.mi.setMin(pts[i]);
+ box.mx.setMax(pts[i]);
+ }
+ return(box);
+}
+
+//
+inline btDbvtAabbMm btDbvtAabbMm::FromPoints(const btVector3** ppts,int n)
+{
+ btDbvtAabbMm box;
+ box.mi=box.mx=*ppts[0];
+ for(int i=1;i<n;++i)
+ {
+ box.mi.setMin(*ppts[i]);
+ box.mx.setMax(*ppts[i]);
+ }
+ return(box);
+}
+
+//
+DBVT_INLINE void btDbvtAabbMm::Expand(const btVector3& e)
+{
+ mi-=e;mx+=e;
+}
+
+//
+DBVT_INLINE void btDbvtAabbMm::SignedExpand(const btVector3& e)
+{
+ if(e.x()>0) mx.setX(mx.x()+e[0]); else mi.setX(mi.x()+e[0]);
+ if(e.y()>0) mx.setY(mx.y()+e[1]); else mi.setY(mi.y()+e[1]);
+ if(e.z()>0) mx.setZ(mx.z()+e[2]); else mi.setZ(mi.z()+e[2]);
+}
+
+//
+DBVT_INLINE bool btDbvtAabbMm::Contain(const btDbvtAabbMm& a) const
+{
+ return( (mi.x()<=a.mi.x())&&
+ (mi.y()<=a.mi.y())&&
+ (mi.z()<=a.mi.z())&&
+ (mx.x()>=a.mx.x())&&
+ (mx.y()>=a.mx.y())&&
+ (mx.z()>=a.mx.z()));
+}
+
+//
+DBVT_INLINE int btDbvtAabbMm::Classify(const btVector3& n,btScalar o,int s) const
+{
+ btVector3 pi,px;
+ switch(s)
+ {
+ case (0+0+0): px=btVector3(mi.x(),mi.y(),mi.z());
+ pi=btVector3(mx.x(),mx.y(),mx.z());break;
+ case (1+0+0): px=btVector3(mx.x(),mi.y(),mi.z());
+ pi=btVector3(mi.x(),mx.y(),mx.z());break;
+ case (0+2+0): px=btVector3(mi.x(),mx.y(),mi.z());
+ pi=btVector3(mx.x(),mi.y(),mx.z());break;
+ case (1+2+0): px=btVector3(mx.x(),mx.y(),mi.z());
+ pi=btVector3(mi.x(),mi.y(),mx.z());break;
+ case (0+0+4): px=btVector3(mi.x(),mi.y(),mx.z());
+ pi=btVector3(mx.x(),mx.y(),mi.z());break;
+ case (1+0+4): px=btVector3(mx.x(),mi.y(),mx.z());
+ pi=btVector3(mi.x(),mx.y(),mi.z());break;
+ case (0+2+4): px=btVector3(mi.x(),mx.y(),mx.z());
+ pi=btVector3(mx.x(),mi.y(),mi.z());break;
+ case (1+2+4): px=btVector3(mx.x(),mx.y(),mx.z());
+ pi=btVector3(mi.x(),mi.y(),mi.z());break;
+ }
+ if((btDot(n,px)+o)<0) return(-1);
+ if((btDot(n,pi)+o)>=0) return(+1);
+ return(0);
+}
+
+//
+DBVT_INLINE btScalar btDbvtAabbMm::ProjectMinimum(const btVector3& v,unsigned signs) const
+{
+ const btVector3* b[]={&mx,&mi};
+ const btVector3 p( b[(signs>>0)&1]->x(),
+ b[(signs>>1)&1]->y(),
+ b[(signs>>2)&1]->z());
+ return(btDot(p,v));
+}
+
+//
+DBVT_INLINE void btDbvtAabbMm::AddSpan(const btVector3& d,btScalar& smi,btScalar& smx) const
+{
+ for(int i=0;i<3;++i)
+ {
+ if(d[i]<0)
+ { smi+=mx[i]*d[i];smx+=mi[i]*d[i]; }
+ else
+ { smi+=mi[i]*d[i];smx+=mx[i]*d[i]; }
+ }
+}
+
+//
+DBVT_INLINE bool Intersect( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b)
+{
+#if DBVT_INT0_IMPL == DBVT_IMPL_SSE
+ const __m128 rt(_mm_or_ps( _mm_cmplt_ps(_mm_load_ps(b.mx),_mm_load_ps(a.mi)),
+ _mm_cmplt_ps(_mm_load_ps(a.mx),_mm_load_ps(b.mi))));
+ const __int32* pu((const __int32*)&rt);
+ return((pu[0]|pu[1]|pu[2])==0);
+#else
+ return( (a.mi.x()<=b.mx.x())&&
+ (a.mx.x()>=b.mi.x())&&
+ (a.mi.y()<=b.mx.y())&&
+ (a.mx.y()>=b.mi.y())&&
+ (a.mi.z()<=b.mx.z())&&
+ (a.mx.z()>=b.mi.z()));
+#endif
+}
+
+
+
+//
+DBVT_INLINE bool Intersect( const btDbvtAabbMm& a,
+ const btVector3& b)
+{
+ return( (b.x()>=a.mi.x())&&
+ (b.y()>=a.mi.y())&&
+ (b.z()>=a.mi.z())&&
+ (b.x()<=a.mx.x())&&
+ (b.y()<=a.mx.y())&&
+ (b.z()<=a.mx.z()));
+}
+
+
+
+
+
+//////////////////////////////////////
+
+
+//
+DBVT_INLINE btScalar Proximity( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b)
+{
+ const btVector3 d=(a.mi+a.mx)-(b.mi+b.mx);
+ return(btFabs(d.x())+btFabs(d.y())+btFabs(d.z()));
+}
+
+
+
+//
+DBVT_INLINE int Select( const btDbvtAabbMm& o,
+ const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b)
+{
+#if DBVT_SELECT_IMPL == DBVT_IMPL_SSE
+ static ATTRIBUTE_ALIGNED16(const unsigned __int32) mask[]={0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff};
+ ///@todo: the intrinsic version is 11% slower
+#if DBVT_USE_INTRINSIC_SSE
+
+ union btSSEUnion ///NOTE: if we use more intrinsics, move btSSEUnion into the LinearMath directory
+ {
+ __m128 ssereg;
+ float floats[4];
+ int ints[4];
+ };
+
+ __m128 omi(_mm_load_ps(o.mi));
+ omi=_mm_add_ps(omi,_mm_load_ps(o.mx));
+ __m128 ami(_mm_load_ps(a.mi));
+ ami=_mm_add_ps(ami,_mm_load_ps(a.mx));
+ ami=_mm_sub_ps(ami,omi);
+ ami=_mm_and_ps(ami,_mm_load_ps((const float*)mask));
+ __m128 bmi(_mm_load_ps(b.mi));
+ bmi=_mm_add_ps(bmi,_mm_load_ps(b.mx));
+ bmi=_mm_sub_ps(bmi,omi);
+ bmi=_mm_and_ps(bmi,_mm_load_ps((const float*)mask));
+ __m128 t0(_mm_movehl_ps(ami,ami));
+ ami=_mm_add_ps(ami,t0);
+ ami=_mm_add_ss(ami,_mm_shuffle_ps(ami,ami,1));
+ __m128 t1(_mm_movehl_ps(bmi,bmi));
+ bmi=_mm_add_ps(bmi,t1);
+ bmi=_mm_add_ss(bmi,_mm_shuffle_ps(bmi,bmi,1));
+
+ btSSEUnion tmp;
+ tmp.ssereg = _mm_cmple_ss(bmi,ami);
+ return tmp.ints[0]&1;
+
+#else
+ ATTRIBUTE_ALIGNED16(__int32 r[1]);
+ __asm
+ {
+ mov eax,o
+ mov ecx,a
+ mov edx,b
+ movaps xmm0,[eax]
+ movaps xmm5,mask
+ addps xmm0,[eax+16]
+ movaps xmm1,[ecx]
+ movaps xmm2,[edx]
+ addps xmm1,[ecx+16]
+ addps xmm2,[edx+16]
+ subps xmm1,xmm0
+ subps xmm2,xmm0
+ andps xmm1,xmm5
+ andps xmm2,xmm5
+ movhlps xmm3,xmm1
+ movhlps xmm4,xmm2
+ addps xmm1,xmm3
+ addps xmm2,xmm4
+ pshufd xmm3,xmm1,1
+ pshufd xmm4,xmm2,1
+ addss xmm1,xmm3
+ addss xmm2,xmm4
+ cmpless xmm2,xmm1
+ movss r,xmm2
+ }
+ return(r[0]&1);
+#endif
+#else
+ return(Proximity(o,a)<Proximity(o,b)?0:1);
+#endif
+}
+
+//
+DBVT_INLINE void Merge( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b,
+ btDbvtAabbMm& r)
+{
+#if DBVT_MERGE_IMPL==DBVT_IMPL_SSE
+ __m128 ami(_mm_load_ps(a.mi));
+ __m128 amx(_mm_load_ps(a.mx));
+ __m128 bmi(_mm_load_ps(b.mi));
+ __m128 bmx(_mm_load_ps(b.mx));
+ ami=_mm_min_ps(ami,bmi);
+ amx=_mm_max_ps(amx,bmx);
+ _mm_store_ps(r.mi,ami);
+ _mm_store_ps(r.mx,amx);
+#else
+ for(int i=0;i<3;++i)
+ {
+ if(a.mi[i]<b.mi[i]) r.mi[i]=a.mi[i]; else r.mi[i]=b.mi[i];
+ if(a.mx[i]>b.mx[i]) r.mx[i]=a.mx[i]; else r.mx[i]=b.mx[i];
+ }
+#endif
+}
+
+//
+DBVT_INLINE bool NotEqual( const btDbvtAabbMm& a,
+ const btDbvtAabbMm& b)
+{
+ return( (a.mi.x()!=b.mi.x())||
+ (a.mi.y()!=b.mi.y())||
+ (a.mi.z()!=b.mi.z())||
+ (a.mx.x()!=b.mx.x())||
+ (a.mx.y()!=b.mx.y())||
+ (a.mx.z()!=b.mx.z()));
+}
+
+//
+// Inline's
+//
+
+//
+DBVT_PREFIX
+inline void btDbvt::enumNodes( const btDbvtNode* root,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ policy.Process(root);
+ if(root->isinternal())
+ {
+ enumNodes(root->childs[0],policy);
+ enumNodes(root->childs[1],policy);
+ }
+}
+
+//
+DBVT_PREFIX
+inline void btDbvt::enumLeaves( const btDbvtNode* root,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root->isinternal())
+ {
+ enumLeaves(root->childs[0],policy);
+ enumLeaves(root->childs[1],policy);
+ }
+ else
+ {
+ policy.Process(root);
+ }
+}
+
+//
+DBVT_PREFIX
+inline void btDbvt::collideTT( const btDbvtNode* root0,
+ const btDbvtNode* root1,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root0&&root1)
+ {
+ int depth=1;
+ int treshold=DOUBLE_STACKSIZE-4;
+ btAlignedObjectArray<sStkNN> stkStack;
+ stkStack.resize(DOUBLE_STACKSIZE);
+ stkStack[0]=sStkNN(root0,root1);
+ do {
+ sStkNN p=stkStack[--depth];
+ if(depth>treshold)
+ {
+ stkStack.resize(stkStack.size()*2);
+ treshold=stkStack.size()-4;
+ }
+ if(p.a==p.b)
+ {
+ if(p.a->isinternal())
+ {
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[0]);
+ stkStack[depth++]=sStkNN(p.a->childs[1],p.a->childs[1]);
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[1]);
+ }
+ }
+ else if(Intersect(p.a->volume,p.b->volume))
+ {
+ if(p.a->isinternal())
+ {
+ if(p.b->isinternal())
+ {
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]);
+ stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]);
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]);
+ stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]);
+ }
+ else
+ {
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.b);
+ stkStack[depth++]=sStkNN(p.a->childs[1],p.b);
+ }
+ }
+ else
+ {
+ if(p.b->isinternal())
+ {
+ stkStack[depth++]=sStkNN(p.a,p.b->childs[0]);
+ stkStack[depth++]=sStkNN(p.a,p.b->childs[1]);
+ }
+ else
+ {
+ policy.Process(p.a,p.b);
+ }
+ }
+ }
+ } while(depth);
+ }
+}
+
+
+
+DBVT_PREFIX
+inline void btDbvt::collideTTpersistentStack( const btDbvtNode* root0,
+ const btDbvtNode* root1,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root0&&root1)
+ {
+ int depth=1;
+ int treshold=DOUBLE_STACKSIZE-4;
+
+ m_stkStack.resize(DOUBLE_STACKSIZE);
+ m_stkStack[0]=sStkNN(root0,root1);
+ do {
+ sStkNN p=m_stkStack[--depth];
+ if(depth>treshold)
+ {
+ m_stkStack.resize(m_stkStack.size()*2);
+ treshold=m_stkStack.size()-4;
+ }
+ if(p.a==p.b)
+ {
+ if(p.a->isinternal())
+ {
+ m_stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[0]);
+ m_stkStack[depth++]=sStkNN(p.a->childs[1],p.a->childs[1]);
+ m_stkStack[depth++]=sStkNN(p.a->childs[0],p.a->childs[1]);
+ }
+ }
+ else if(Intersect(p.a->volume,p.b->volume))
+ {
+ if(p.a->isinternal())
+ {
+ if(p.b->isinternal())
+ {
+ m_stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]);
+ m_stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]);
+ m_stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]);
+ m_stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]);
+ }
+ else
+ {
+ m_stkStack[depth++]=sStkNN(p.a->childs[0],p.b);
+ m_stkStack[depth++]=sStkNN(p.a->childs[1],p.b);
+ }
+ }
+ else
+ {
+ if(p.b->isinternal())
+ {
+ m_stkStack[depth++]=sStkNN(p.a,p.b->childs[0]);
+ m_stkStack[depth++]=sStkNN(p.a,p.b->childs[1]);
+ }
+ else
+ {
+ policy.Process(p.a,p.b);
+ }
+ }
+ }
+ } while(depth);
+ }
+}
+
+#if 0
+//
+DBVT_PREFIX
+inline void btDbvt::collideTT( const btDbvtNode* root0,
+ const btDbvtNode* root1,
+ const btTransform& xform,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root0&&root1)
+ {
+ int depth=1;
+ int treshold=DOUBLE_STACKSIZE-4;
+ btAlignedObjectArray<sStkNN> stkStack;
+ stkStack.resize(DOUBLE_STACKSIZE);
+ stkStack[0]=sStkNN(root0,root1);
+ do {
+ sStkNN p=stkStack[--depth];
+ if(Intersect(p.a->volume,p.b->volume,xform))
+ {
+ if(depth>treshold)
+ {
+ stkStack.resize(stkStack.size()*2);
+ treshold=stkStack.size()-4;
+ }
+ if(p.a->isinternal())
+ {
+ if(p.b->isinternal())
+ {
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[0]);
+ stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[0]);
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.b->childs[1]);
+ stkStack[depth++]=sStkNN(p.a->childs[1],p.b->childs[1]);
+ }
+ else
+ {
+ stkStack[depth++]=sStkNN(p.a->childs[0],p.b);
+ stkStack[depth++]=sStkNN(p.a->childs[1],p.b);
+ }
+ }
+ else
+ {
+ if(p.b->isinternal())
+ {
+ stkStack[depth++]=sStkNN(p.a,p.b->childs[0]);
+ stkStack[depth++]=sStkNN(p.a,p.b->childs[1]);
+ }
+ else
+ {
+ policy.Process(p.a,p.b);
+ }
+ }
+ }
+ } while(depth);
+ }
+}
+//
+DBVT_PREFIX
+inline void btDbvt::collideTT( const btDbvtNode* root0,
+ const btTransform& xform0,
+ const btDbvtNode* root1,
+ const btTransform& xform1,
+ DBVT_IPOLICY)
+{
+ const btTransform xform=xform0.inverse()*xform1;
+ collideTT(root0,root1,xform,policy);
+}
+#endif
+
+//
+DBVT_PREFIX
+inline void btDbvt::collideTV( const btDbvtNode* root,
+ const btDbvtVolume& vol,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root)
+ {
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) volume(vol);
+ btAlignedObjectArray<const btDbvtNode*> stack;
+ stack.resize(0);
+ stack.reserve(SIMPLE_STACKSIZE);
+ stack.push_back(root);
+ do {
+ const btDbvtNode* n=stack[stack.size()-1];
+ stack.pop_back();
+ if(Intersect(n->volume,volume))
+ {
+ if(n->isinternal())
+ {
+ stack.push_back(n->childs[0]);
+ stack.push_back(n->childs[1]);
+ }
+ else
+ {
+ policy.Process(n);
+ }
+ }
+ } while(stack.size()>0);
+ }
+}
+
+DBVT_PREFIX
+inline void btDbvt::rayTestInternal( const btDbvtNode* root,
+ const btVector3& rayFrom,
+ const btVector3& rayTo,
+ const btVector3& rayDirectionInverse,
+ unsigned int signs[3],
+ btScalar lambda_max,
+ const btVector3& aabbMin,
+ const btVector3& aabbMax,
+ DBVT_IPOLICY) const
+{
+ (void) rayTo;
+ DBVT_CHECKTYPE
+ if(root)
+ {
+ btVector3 resultNormal;
+
+ int depth=1;
+ int treshold=DOUBLE_STACKSIZE-2;
+ btAlignedObjectArray<const btDbvtNode*> stack;
+ stack.resize(DOUBLE_STACKSIZE);
+ stack[0]=root;
+ btVector3 bounds[2];
+ do
+ {
+ const btDbvtNode* node=stack[--depth];
+ bounds[0] = node->volume.Mins()-aabbMax;
+ bounds[1] = node->volume.Maxs()-aabbMin;
+ btScalar tmin=1.f,lambda_min=0.f;
+ unsigned int result1=false;
+ result1 = btRayAabb2(rayFrom,rayDirectionInverse,signs,bounds,tmin,lambda_min,lambda_max);
+ if(result1)
+ {
+ if(node->isinternal())
+ {
+ if(depth>treshold)
+ {
+ stack.resize(stack.size()*2);
+ treshold=stack.size()-2;
+ }
+ stack[depth++]=node->childs[0];
+ stack[depth++]=node->childs[1];
+ }
+ else
+ {
+ policy.Process(node);
+ }
+ }
+ } while(depth);
+ }
+}
+
+//
+DBVT_PREFIX
+inline void btDbvt::rayTest( const btDbvtNode* root,
+ const btVector3& rayFrom,
+ const btVector3& rayTo,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root)
+ {
+ btVector3 rayDir = (rayTo-rayFrom);
+ rayDir.normalize ();
+
+ ///what about division by zero? --> just set rayDirection[i] to INF/BT_LARGE_FLOAT
+ btVector3 rayDirectionInverse;
+ rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[0];
+ rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[1];
+ rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[2];
+ unsigned int signs[3] = { rayDirectionInverse[0] < 0.0, rayDirectionInverse[1] < 0.0, rayDirectionInverse[2] < 0.0};
+
+ btScalar lambda_max = rayDir.dot(rayTo-rayFrom);
+
+ btVector3 resultNormal;
+
+ btAlignedObjectArray<const btDbvtNode*> stack;
+
+ int depth=1;
+ int treshold=DOUBLE_STACKSIZE-2;
+
+ stack.resize(DOUBLE_STACKSIZE);
+ stack[0]=root;
+ btVector3 bounds[2];
+ do {
+ const btDbvtNode* node=stack[--depth];
+
+ bounds[0] = node->volume.Mins();
+ bounds[1] = node->volume.Maxs();
+
+ btScalar tmin=1.f,lambda_min=0.f;
+ unsigned int result1 = btRayAabb2(rayFrom,rayDirectionInverse,signs,bounds,tmin,lambda_min,lambda_max);
+
+#ifdef COMPARE_BTRAY_AABB2
+ btScalar param=1.f;
+ bool result2 = btRayAabb(rayFrom,rayTo,node->volume.Mins(),node->volume.Maxs(),param,resultNormal);
+ btAssert(result1 == result2);
+#endif //TEST_BTRAY_AABB2
+
+ if(result1)
+ {
+ if(node->isinternal())
+ {
+ if(depth>treshold)
+ {
+ stack.resize(stack.size()*2);
+ treshold=stack.size()-2;
+ }
+ stack[depth++]=node->childs[0];
+ stack[depth++]=node->childs[1];
+ }
+ else
+ {
+ policy.Process(node);
+ }
+ }
+ } while(depth);
+
+ }
+}
+
+//
+DBVT_PREFIX
+inline void btDbvt::collideKDOP(const btDbvtNode* root,
+ const btVector3* normals,
+ const btScalar* offsets,
+ int count,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root)
+ {
+ const int inside=(1<<count)-1;
+ btAlignedObjectArray<sStkNP> stack;
+ int signs[sizeof(unsigned)*8];
+ btAssert(count<int (sizeof(signs)/sizeof(signs[0])));
+ for(int i=0;i<count;++i)
+ {
+ signs[i]= ((normals[i].x()>=0)?1:0)+
+ ((normals[i].y()>=0)?2:0)+
+ ((normals[i].z()>=0)?4:0);
+ }
+ stack.reserve(SIMPLE_STACKSIZE);
+ stack.push_back(sStkNP(root,0));
+ do {
+ sStkNP se=stack[stack.size()-1];
+ bool out=false;
+ stack.pop_back();
+ for(int i=0,j=1;(!out)&&(i<count);++i,j<<=1)
+ {
+ if(0==(se.mask&j))
+ {
+ const int side=se.node->volume.Classify(normals[i],offsets[i],signs[i]);
+ switch(side)
+ {
+ case -1: out=true;break;
+ case +1: se.mask|=j;break;
+ }
+ }
+ }
+ if(!out)
+ {
+ if((se.mask!=inside)&&(se.node->isinternal()))
+ {
+ stack.push_back(sStkNP(se.node->childs[0],se.mask));
+ stack.push_back(sStkNP(se.node->childs[1],se.mask));
+ }
+ else
+ {
+ if(policy.AllLeaves(se.node)) enumLeaves(se.node,policy);
+ }
+ }
+ } while(stack.size());
+ }
+}
+
+//
+DBVT_PREFIX
+inline void btDbvt::collideOCL( const btDbvtNode* root,
+ const btVector3* normals,
+ const btScalar* offsets,
+ const btVector3& sortaxis,
+ int count,
+ DBVT_IPOLICY,
+ bool fsort)
+{
+ DBVT_CHECKTYPE
+ if(root)
+ {
+ const unsigned srtsgns=(sortaxis[0]>=0?1:0)+
+ (sortaxis[1]>=0?2:0)+
+ (sortaxis[2]>=0?4:0);
+ const int inside=(1<<count)-1;
+ btAlignedObjectArray<sStkNPS> stock;
+ btAlignedObjectArray<int> ifree;
+ btAlignedObjectArray<int> stack;
+ int signs[sizeof(unsigned)*8];
+ btAssert(count<int (sizeof(signs)/sizeof(signs[0])));
+ for(int i=0;i<count;++i)
+ {
+ signs[i]= ((normals[i].x()>=0)?1:0)+
+ ((normals[i].y()>=0)?2:0)+
+ ((normals[i].z()>=0)?4:0);
+ }
+ stock.reserve(SIMPLE_STACKSIZE);
+ stack.reserve(SIMPLE_STACKSIZE);
+ ifree.reserve(SIMPLE_STACKSIZE);
+ stack.push_back(allocate(ifree,stock,sStkNPS(root,0,root->volume.ProjectMinimum(sortaxis,srtsgns))));
+ do {
+ const int id=stack[stack.size()-1];
+ sStkNPS se=stock[id];
+ stack.pop_back();ifree.push_back(id);
+ if(se.mask!=inside)
+ {
+ bool out=false;
+ for(int i=0,j=1;(!out)&&(i<count);++i,j<<=1)
+ {
+ if(0==(se.mask&j))
+ {
+ const int side=se.node->volume.Classify(normals[i],offsets[i],signs[i]);
+ switch(side)
+ {
+ case -1: out=true;break;
+ case +1: se.mask|=j;break;
+ }
+ }
+ }
+ if(out) continue;
+ }
+ if(policy.Descent(se.node))
+ {
+ if(se.node->isinternal())
+ {
+ const btDbvtNode* pns[]={ se.node->childs[0],se.node->childs[1]};
+ sStkNPS nes[]={ sStkNPS(pns[0],se.mask,pns[0]->volume.ProjectMinimum(sortaxis,srtsgns)),
+ sStkNPS(pns[1],se.mask,pns[1]->volume.ProjectMinimum(sortaxis,srtsgns))};
+ const int q=nes[0].value<nes[1].value?1:0;
+ int j=stack.size();
+ if(fsort&&(j>0))
+ {
+ /* Insert 0 */
+ j=nearest(&stack[0],&stock[0],nes[q].value,0,stack.size());
+ stack.push_back(0);
+#if DBVT_USE_MEMMOVE
+ memmove(&stack[j+1],&stack[j],sizeof(int)*(stack.size()-j-1));
+#else
+ for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1];
+#endif
+ stack[j]=allocate(ifree,stock,nes[q]);
+ /* Insert 1 */
+ j=nearest(&stack[0],&stock[0],nes[1-q].value,j,stack.size());
+ stack.push_back(0);
+#if DBVT_USE_MEMMOVE
+ memmove(&stack[j+1],&stack[j],sizeof(int)*(stack.size()-j-1));
+#else
+ for(int k=stack.size()-1;k>j;--k) stack[k]=stack[k-1];
+#endif
+ stack[j]=allocate(ifree,stock,nes[1-q]);
+ }
+ else
+ {
+ stack.push_back(allocate(ifree,stock,nes[q]));
+ stack.push_back(allocate(ifree,stock,nes[1-q]));
+ }
+ }
+ else
+ {
+ policy.Process(se.node,se.value);
+ }
+ }
+ } while(stack.size());
+ }
+}
+
+//
+DBVT_PREFIX
+inline void btDbvt::collideTU( const btDbvtNode* root,
+ DBVT_IPOLICY)
+{
+ DBVT_CHECKTYPE
+ if(root)
+ {
+ btAlignedObjectArray<const btDbvtNode*> stack;
+ stack.reserve(SIMPLE_STACKSIZE);
+ stack.push_back(root);
+ do {
+ const btDbvtNode* n=stack[stack.size()-1];
+ stack.pop_back();
+ if(policy.Descent(n))
+ {
+ if(n->isinternal())
+ { stack.push_back(n->childs[0]);stack.push_back(n->childs[1]); }
+ else
+ { policy.Process(n); }
+ }
+ } while(stack.size()>0);
+ }
+}
+
+//
+// PP Cleanup
+//
+
+#undef DBVT_USE_MEMMOVE
+#undef DBVT_USE_TEMPLATE
+#undef DBVT_VIRTUAL_DTOR
+#undef DBVT_VIRTUAL
+#undef DBVT_PREFIX
+#undef DBVT_IPOLICY
+#undef DBVT_CHECKTYPE
+#undef DBVT_IMPL_GENERIC
+#undef DBVT_IMPL_SSE
+#undef DBVT_USE_INTRINSIC_SSE
+#undef DBVT_SELECT_IMPL
+#undef DBVT_MERGE_IMPL
+#undef DBVT_INT0_IMPL
+
+#endif
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
new file mode 100644
index 00000000..75cfac64
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
@@ -0,0 +1,796 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///btDbvtBroadphase implementation by Nathanael Presson
+
+#include "btDbvtBroadphase.h"
+
+//
+// Profiling
+//
+
+#if DBVT_BP_PROFILE||DBVT_BP_ENABLE_BENCHMARK
+#include <stdio.h>
+#endif
+
+#if DBVT_BP_PROFILE
+struct ProfileScope
+{
+ __forceinline ProfileScope(btClock& clock,unsigned long& value) :
+ m_clock(&clock),m_value(&value),m_base(clock.getTimeMicroseconds())
+ {
+ }
+ __forceinline ~ProfileScope()
+ {
+ (*m_value)+=m_clock->getTimeMicroseconds()-m_base;
+ }
+ btClock* m_clock;
+ unsigned long* m_value;
+ unsigned long m_base;
+};
+#define SPC(_value_) ProfileScope spc_scope(m_clock,_value_)
+#else
+#define SPC(_value_)
+#endif
+
+//
+// Helpers
+//
+
+//
+template <typename T>
+static inline void listappend(T* item,T*& list)
+{
+ item->links[0]=0;
+ item->links[1]=list;
+ if(list) list->links[0]=item;
+ list=item;
+}
+
+//
+template <typename T>
+static inline void listremove(T* item,T*& list)
+{
+ if(item->links[0]) item->links[0]->links[1]=item->links[1]; else list=item->links[1];
+ if(item->links[1]) item->links[1]->links[0]=item->links[0];
+}
+
+//
+template <typename T>
+static inline int listcount(T* root)
+{
+ int n=0;
+ while(root) { ++n;root=root->links[1]; }
+ return(n);
+}
+
+//
+template <typename T>
+static inline void clear(T& value)
+{
+ static const struct ZeroDummy : T {} zerodummy;
+ value=zerodummy;
+}
+
+//
+// Colliders
+//
+
+/* Tree collider */
+struct btDbvtTreeCollider : btDbvt::ICollide
+{
+ btDbvtBroadphase* pbp;
+ btDbvtProxy* proxy;
+ btDbvtTreeCollider(btDbvtBroadphase* p) : pbp(p) {}
+ void Process(const btDbvtNode* na,const btDbvtNode* nb)
+ {
+ if(na!=nb)
+ {
+ btDbvtProxy* pa=(btDbvtProxy*)na->data;
+ btDbvtProxy* pb=(btDbvtProxy*)nb->data;
+#if DBVT_BP_SORTPAIRS
+ if(pa->m_uniqueId>pb->m_uniqueId)
+ btSwap(pa,pb);
+#endif
+ pbp->m_paircache->addOverlappingPair(pa,pb);
+ ++pbp->m_newpairs;
+ }
+ }
+ void Process(const btDbvtNode* n)
+ {
+ Process(n,proxy->leaf);
+ }
+};
+
+//
+// btDbvtBroadphase
+//
+
+//
+btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache* paircache)
+{
+ m_deferedcollide = false;
+ m_needcleanup = true;
+ m_releasepaircache = (paircache!=0)?false:true;
+ m_prediction = 0;
+ m_stageCurrent = 0;
+ m_fixedleft = 0;
+ m_fupdates = 1;
+ m_dupdates = 0;
+ m_cupdates = 10;
+ m_newpairs = 1;
+ m_updates_call = 0;
+ m_updates_done = 0;
+ m_updates_ratio = 0;
+ m_paircache = paircache? paircache : new(btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache();
+ m_gid = 0;
+ m_pid = 0;
+ m_cid = 0;
+ for(int i=0;i<=STAGECOUNT;++i)
+ {
+ m_stageRoots[i]=0;
+ }
+#if DBVT_BP_PROFILE
+ clear(m_profiling);
+#endif
+}
+
+//
+btDbvtBroadphase::~btDbvtBroadphase()
+{
+ if(m_releasepaircache)
+ {
+ m_paircache->~btOverlappingPairCache();
+ btAlignedFree(m_paircache);
+ }
+}
+
+//
+btBroadphaseProxy* btDbvtBroadphase::createProxy( const btVector3& aabbMin,
+ const btVector3& aabbMax,
+ int /*shapeType*/,
+ void* userPtr,
+ short int collisionFilterGroup,
+ short int collisionFilterMask,
+ btDispatcher* /*dispatcher*/,
+ void* /*multiSapProxy*/)
+{
+ btDbvtProxy* proxy=new(btAlignedAlloc(sizeof(btDbvtProxy),16)) btDbvtProxy( aabbMin,aabbMax,userPtr,
+ collisionFilterGroup,
+ collisionFilterMask);
+
+ btDbvtAabbMm aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
+
+ //bproxy->aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
+ proxy->stage = m_stageCurrent;
+ proxy->m_uniqueId = ++m_gid;
+ proxy->leaf = m_sets[0].insert(aabb,proxy);
+ listappend(proxy,m_stageRoots[m_stageCurrent]);
+ if(!m_deferedcollide)
+ {
+ btDbvtTreeCollider collider(this);
+ collider.proxy=proxy;
+ m_sets[0].collideTV(m_sets[0].m_root,aabb,collider);
+ m_sets[1].collideTV(m_sets[1].m_root,aabb,collider);
+ }
+ return(proxy);
+}
+
+//
+void btDbvtBroadphase::destroyProxy( btBroadphaseProxy* absproxy,
+ btDispatcher* dispatcher)
+{
+ btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
+ if(proxy->stage==STAGECOUNT)
+ m_sets[1].remove(proxy->leaf);
+ else
+ m_sets[0].remove(proxy->leaf);
+ listremove(proxy,m_stageRoots[proxy->stage]);
+ m_paircache->removeOverlappingPairsContainingProxy(proxy,dispatcher);
+ btAlignedFree(proxy);
+ m_needcleanup=true;
+}
+
+void btDbvtBroadphase::getAabb(btBroadphaseProxy* absproxy,btVector3& aabbMin, btVector3& aabbMax ) const
+{
+ btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
+ aabbMin = proxy->m_aabbMin;
+ aabbMax = proxy->m_aabbMax;
+}
+
+struct BroadphaseRayTester : btDbvt::ICollide
+{
+ btBroadphaseRayCallback& m_rayCallback;
+ BroadphaseRayTester(btBroadphaseRayCallback& orgCallback)
+ :m_rayCallback(orgCallback)
+ {
+ }
+ void Process(const btDbvtNode* leaf)
+ {
+ btDbvtProxy* proxy=(btDbvtProxy*)leaf->data;
+ m_rayCallback.process(proxy);
+ }
+};
+
+void btDbvtBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ BroadphaseRayTester callback(rayCallback);
+
+ m_sets[0].rayTestInternal( m_sets[0].m_root,
+ rayFrom,
+ rayTo,
+ rayCallback.m_rayDirectionInverse,
+ rayCallback.m_signs,
+ rayCallback.m_lambda_max,
+ aabbMin,
+ aabbMax,
+ callback);
+
+ m_sets[1].rayTestInternal( m_sets[1].m_root,
+ rayFrom,
+ rayTo,
+ rayCallback.m_rayDirectionInverse,
+ rayCallback.m_signs,
+ rayCallback.m_lambda_max,
+ aabbMin,
+ aabbMax,
+ callback);
+
+}
+
+
+struct BroadphaseAabbTester : btDbvt::ICollide
+{
+ btBroadphaseAabbCallback& m_aabbCallback;
+ BroadphaseAabbTester(btBroadphaseAabbCallback& orgCallback)
+ :m_aabbCallback(orgCallback)
+ {
+ }
+ void Process(const btDbvtNode* leaf)
+ {
+ btDbvtProxy* proxy=(btDbvtProxy*)leaf->data;
+ m_aabbCallback.process(proxy);
+ }
+};
+
+void btDbvtBroadphase::aabbTest(const btVector3& aabbMin,const btVector3& aabbMax,btBroadphaseAabbCallback& aabbCallback)
+{
+ BroadphaseAabbTester callback(aabbCallback);
+
+ const ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(aabbMin,aabbMax);
+ //process all children, that overlap with the given AABB bounds
+ m_sets[0].collideTV(m_sets[0].m_root,bounds,callback);
+ m_sets[1].collideTV(m_sets[1].m_root,bounds,callback);
+
+}
+
+
+
+//
+void btDbvtBroadphase::setAabb( btBroadphaseProxy* absproxy,
+ const btVector3& aabbMin,
+ const btVector3& aabbMax,
+ btDispatcher* /*dispatcher*/)
+{
+ btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax);
+#if DBVT_BP_PREVENTFALSEUPDATE
+ if(NotEqual(aabb,proxy->leaf->volume))
+#endif
+ {
+ bool docollide=false;
+ if(proxy->stage==STAGECOUNT)
+ {/* fixed -> dynamic set */
+ m_sets[1].remove(proxy->leaf);
+ proxy->leaf=m_sets[0].insert(aabb,proxy);
+ docollide=true;
+ }
+ else
+ {/* dynamic set */
+ ++m_updates_call;
+ if(Intersect(proxy->leaf->volume,aabb))
+ {/* Moving */
+
+ const btVector3 delta=aabbMin-proxy->m_aabbMin;
+ btVector3 velocity(((proxy->m_aabbMax-proxy->m_aabbMin)/2)*m_prediction);
+ if(delta[0]<0) velocity[0]=-velocity[0];
+ if(delta[1]<0) velocity[1]=-velocity[1];
+ if(delta[2]<0) velocity[2]=-velocity[2];
+ if (
+#ifdef DBVT_BP_MARGIN
+ m_sets[0].update(proxy->leaf,aabb,velocity,DBVT_BP_MARGIN)
+#else
+ m_sets[0].update(proxy->leaf,aabb,velocity)
+#endif
+ )
+ {
+ ++m_updates_done;
+ docollide=true;
+ }
+ }
+ else
+ {/* Teleporting */
+ m_sets[0].update(proxy->leaf,aabb);
+ ++m_updates_done;
+ docollide=true;
+ }
+ }
+ listremove(proxy,m_stageRoots[proxy->stage]);
+ proxy->m_aabbMin = aabbMin;
+ proxy->m_aabbMax = aabbMax;
+ proxy->stage = m_stageCurrent;
+ listappend(proxy,m_stageRoots[m_stageCurrent]);
+ if(docollide)
+ {
+ m_needcleanup=true;
+ if(!m_deferedcollide)
+ {
+ btDbvtTreeCollider collider(this);
+ m_sets[1].collideTTpersistentStack(m_sets[1].m_root,proxy->leaf,collider);
+ m_sets[0].collideTTpersistentStack(m_sets[0].m_root,proxy->leaf,collider);
+ }
+ }
+ }
+}
+
+
+//
+void btDbvtBroadphase::setAabbForceUpdate( btBroadphaseProxy* absproxy,
+ const btVector3& aabbMin,
+ const btVector3& aabbMax,
+ btDispatcher* /*dispatcher*/)
+{
+ btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax);
+ bool docollide=false;
+ if(proxy->stage==STAGECOUNT)
+ {/* fixed -> dynamic set */
+ m_sets[1].remove(proxy->leaf);
+ proxy->leaf=m_sets[0].insert(aabb,proxy);
+ docollide=true;
+ }
+ else
+ {/* dynamic set */
+ ++m_updates_call;
+ /* Teleporting */
+ m_sets[0].update(proxy->leaf,aabb);
+ ++m_updates_done;
+ docollide=true;
+ }
+ listremove(proxy,m_stageRoots[proxy->stage]);
+ proxy->m_aabbMin = aabbMin;
+ proxy->m_aabbMax = aabbMax;
+ proxy->stage = m_stageCurrent;
+ listappend(proxy,m_stageRoots[m_stageCurrent]);
+ if(docollide)
+ {
+ m_needcleanup=true;
+ if(!m_deferedcollide)
+ {
+ btDbvtTreeCollider collider(this);
+ m_sets[1].collideTTpersistentStack(m_sets[1].m_root,proxy->leaf,collider);
+ m_sets[0].collideTTpersistentStack(m_sets[0].m_root,proxy->leaf,collider);
+ }
+ }
+}
+
+//
+void btDbvtBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
+{
+ collide(dispatcher);
+#if DBVT_BP_PROFILE
+ if(0==(m_pid%DBVT_BP_PROFILING_RATE))
+ {
+ printf("fixed(%u) dynamics(%u) pairs(%u)\r\n",m_sets[1].m_leaves,m_sets[0].m_leaves,m_paircache->getNumOverlappingPairs());
+ unsigned int total=m_profiling.m_total;
+ if(total<=0) total=1;
+ printf("ddcollide: %u%% (%uus)\r\n",(50+m_profiling.m_ddcollide*100)/total,m_profiling.m_ddcollide/DBVT_BP_PROFILING_RATE);
+ printf("fdcollide: %u%% (%uus)\r\n",(50+m_profiling.m_fdcollide*100)/total,m_profiling.m_fdcollide/DBVT_BP_PROFILING_RATE);
+ printf("cleanup: %u%% (%uus)\r\n",(50+m_profiling.m_cleanup*100)/total,m_profiling.m_cleanup/DBVT_BP_PROFILING_RATE);
+ printf("total: %uus\r\n",total/DBVT_BP_PROFILING_RATE);
+ const unsigned long sum=m_profiling.m_ddcollide+
+ m_profiling.m_fdcollide+
+ m_profiling.m_cleanup;
+ printf("leaked: %u%% (%uus)\r\n",100-((50+sum*100)/total),(total-sum)/DBVT_BP_PROFILING_RATE);
+ printf("job counts: %u%%\r\n",(m_profiling.m_jobcount*100)/((m_sets[0].m_leaves+m_sets[1].m_leaves)*DBVT_BP_PROFILING_RATE));
+ clear(m_profiling);
+ m_clock.reset();
+ }
+#endif
+
+ performDeferredRemoval(dispatcher);
+
+}
+
+void btDbvtBroadphase::performDeferredRemoval(btDispatcher* dispatcher)
+{
+
+ if (m_paircache->hasDeferredRemoval())
+ {
+
+ btBroadphasePairArray& overlappingPairArray = m_paircache->getOverlappingPairArray();
+
+ //perform a sort, to find duplicates and to sort 'invalid' pairs to the end
+ overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
+
+ int invalidPair = 0;
+
+
+ int i;
+
+ btBroadphasePair previousPair;
+ previousPair.m_pProxy0 = 0;
+ previousPair.m_pProxy1 = 0;
+ previousPair.m_algorithm = 0;
+
+
+ for (i=0;i<overlappingPairArray.size();i++)
+ {
+
+ btBroadphasePair& pair = overlappingPairArray[i];
+
+ bool isDuplicate = (pair == previousPair);
+
+ previousPair = pair;
+
+ bool needsRemoval = false;
+
+ if (!isDuplicate)
+ {
+ //important to perform AABB check that is consistent with the broadphase
+ btDbvtProxy* pa=(btDbvtProxy*)pair.m_pProxy0;
+ btDbvtProxy* pb=(btDbvtProxy*)pair.m_pProxy1;
+ bool hasOverlap = Intersect(pa->leaf->volume,pb->leaf->volume);
+
+ if (hasOverlap)
+ {
+ needsRemoval = false;
+ } else
+ {
+ needsRemoval = true;
+ }
+ } else
+ {
+ //remove duplicate
+ needsRemoval = true;
+ //should have no algorithm
+ btAssert(!pair.m_algorithm);
+ }
+
+ if (needsRemoval)
+ {
+ m_paircache->cleanOverlappingPair(pair,dispatcher);
+
+ pair.m_pProxy0 = 0;
+ pair.m_pProxy1 = 0;
+ invalidPair++;
+ }
+
+ }
+
+ //perform a sort, to sort 'invalid' pairs to the end
+ overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
+ overlappingPairArray.resize(overlappingPairArray.size() - invalidPair);
+ }
+}
+
+//
+void btDbvtBroadphase::collide(btDispatcher* dispatcher)
+{
+ /*printf("---------------------------------------------------------\n");
+ printf("m_sets[0].m_leaves=%d\n",m_sets[0].m_leaves);
+ printf("m_sets[1].m_leaves=%d\n",m_sets[1].m_leaves);
+ printf("numPairs = %d\n",getOverlappingPairCache()->getNumOverlappingPairs());
+ {
+ int i;
+ for (i=0;i<getOverlappingPairCache()->getNumOverlappingPairs();i++)
+ {
+ printf("pair[%d]=(%d,%d),",i,getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy0->getUid(),
+ getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy1->getUid());
+ }
+ printf("\n");
+ }
+*/
+
+
+
+ SPC(m_profiling.m_total);
+ /* optimize */
+ m_sets[0].optimizeIncremental(1+(m_sets[0].m_leaves*m_dupdates)/100);
+ if(m_fixedleft)
+ {
+ const int count=1+(m_sets[1].m_leaves*m_fupdates)/100;
+ m_sets[1].optimizeIncremental(1+(m_sets[1].m_leaves*m_fupdates)/100);
+ m_fixedleft=btMax<int>(0,m_fixedleft-count);
+ }
+ /* dynamic -> fixed set */
+ m_stageCurrent=(m_stageCurrent+1)%STAGECOUNT;
+ btDbvtProxy* current=m_stageRoots[m_stageCurrent];
+ if(current)
+ {
+ btDbvtTreeCollider collider(this);
+ do {
+ btDbvtProxy* next=current->links[1];
+ listremove(current,m_stageRoots[current->stage]);
+ listappend(current,m_stageRoots[STAGECOUNT]);
+#if DBVT_BP_ACCURATESLEEPING
+ m_paircache->removeOverlappingPairsContainingProxy(current,dispatcher);
+ collider.proxy=current;
+ btDbvt::collideTV(m_sets[0].m_root,current->aabb,collider);
+ btDbvt::collideTV(m_sets[1].m_root,current->aabb,collider);
+#endif
+ m_sets[0].remove(current->leaf);
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) curAabb=btDbvtVolume::FromMM(current->m_aabbMin,current->m_aabbMax);
+ current->leaf = m_sets[1].insert(curAabb,current);
+ current->stage = STAGECOUNT;
+ current = next;
+ } while(current);
+ m_fixedleft=m_sets[1].m_leaves;
+ m_needcleanup=true;
+ }
+ /* collide dynamics */
+ {
+ btDbvtTreeCollider collider(this);
+ if(m_deferedcollide)
+ {
+ SPC(m_profiling.m_fdcollide);
+ m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[1].m_root,collider);
+ }
+ if(m_deferedcollide)
+ {
+ SPC(m_profiling.m_ddcollide);
+ m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[0].m_root,collider);
+ }
+ }
+ /* clean up */
+ if(m_needcleanup)
+ {
+ SPC(m_profiling.m_cleanup);
+ btBroadphasePairArray& pairs=m_paircache->getOverlappingPairArray();
+ if(pairs.size()>0)
+ {
+
+ int ni=btMin(pairs.size(),btMax<int>(m_newpairs,(pairs.size()*m_cupdates)/100));
+ for(int i=0;i<ni;++i)
+ {
+ btBroadphasePair& p=pairs[(m_cid+i)%pairs.size()];
+ btDbvtProxy* pa=(btDbvtProxy*)p.m_pProxy0;
+ btDbvtProxy* pb=(btDbvtProxy*)p.m_pProxy1;
+ if(!Intersect(pa->leaf->volume,pb->leaf->volume))
+ {
+#if DBVT_BP_SORTPAIRS
+ if(pa->m_uniqueId>pb->m_uniqueId)
+ btSwap(pa,pb);
+#endif
+ m_paircache->removeOverlappingPair(pa,pb,dispatcher);
+ --ni;--i;
+ }
+ }
+ if(pairs.size()>0) m_cid=(m_cid+ni)%pairs.size(); else m_cid=0;
+ }
+ }
+ ++m_pid;
+ m_newpairs=1;
+ m_needcleanup=false;
+ if(m_updates_call>0)
+ { m_updates_ratio=m_updates_done/(btScalar)m_updates_call; }
+ else
+ { m_updates_ratio=0; }
+ m_updates_done/=2;
+ m_updates_call/=2;
+}
+
+//
+void btDbvtBroadphase::optimize()
+{
+ m_sets[0].optimizeTopDown();
+ m_sets[1].optimizeTopDown();
+}
+
+//
+btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache()
+{
+ return(m_paircache);
+}
+
+//
+const btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache() const
+{
+ return(m_paircache);
+}
+
+//
+void btDbvtBroadphase::getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
+{
+
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds;
+
+ if(!m_sets[0].empty())
+ if(!m_sets[1].empty()) Merge( m_sets[0].m_root->volume,
+ m_sets[1].m_root->volume,bounds);
+ else
+ bounds=m_sets[0].m_root->volume;
+ else if(!m_sets[1].empty()) bounds=m_sets[1].m_root->volume;
+ else
+ bounds=btDbvtVolume::FromCR(btVector3(0,0,0),0);
+ aabbMin=bounds.Mins();
+ aabbMax=bounds.Maxs();
+}
+
+void btDbvtBroadphase::resetPool(btDispatcher* dispatcher)
+{
+
+ int totalObjects = m_sets[0].m_leaves + m_sets[1].m_leaves;
+ if (!totalObjects)
+ {
+ //reset internal dynamic tree data structures
+ m_sets[0].clear();
+ m_sets[1].clear();
+
+ m_deferedcollide = false;
+ m_needcleanup = true;
+ m_stageCurrent = 0;
+ m_fixedleft = 0;
+ m_fupdates = 1;
+ m_dupdates = 0;
+ m_cupdates = 10;
+ m_newpairs = 1;
+ m_updates_call = 0;
+ m_updates_done = 0;
+ m_updates_ratio = 0;
+
+ m_gid = 0;
+ m_pid = 0;
+ m_cid = 0;
+ for(int i=0;i<=STAGECOUNT;++i)
+ {
+ m_stageRoots[i]=0;
+ }
+ }
+}
+
+//
+void btDbvtBroadphase::printStats()
+{}
+
+//
+#if DBVT_BP_ENABLE_BENCHMARK
+
+struct btBroadphaseBenchmark
+{
+ struct Experiment
+ {
+ const char* name;
+ int object_count;
+ int update_count;
+ int spawn_count;
+ int iterations;
+ btScalar speed;
+ btScalar amplitude;
+ };
+ struct Object
+ {
+ btVector3 center;
+ btVector3 extents;
+ btBroadphaseProxy* proxy;
+ btScalar time;
+ void update(btScalar speed,btScalar amplitude,btBroadphaseInterface* pbi)
+ {
+ time += speed;
+ center[0] = btCos(time*(btScalar)2.17)*amplitude+
+ btSin(time)*amplitude/2;
+ center[1] = btCos(time*(btScalar)1.38)*amplitude+
+ btSin(time)*amplitude;
+ center[2] = btSin(time*(btScalar)0.777)*amplitude;
+ pbi->setAabb(proxy,center-extents,center+extents,0);
+ }
+ };
+ static int UnsignedRand(int range=RAND_MAX-1) { return(rand()%(range+1)); }
+ static btScalar UnitRand() { return(UnsignedRand(16384)/(btScalar)16384); }
+ static void OutputTime(const char* name,btClock& c,unsigned count=0)
+ {
+ const unsigned long us=c.getTimeMicroseconds();
+ const unsigned long ms=(us+500)/1000;
+ const btScalar sec=us/(btScalar)(1000*1000);
+ if(count>0)
+ printf("%s : %u us (%u ms), %.2f/s\r\n",name,us,ms,count/sec);
+ else
+ printf("%s : %u us (%u ms)\r\n",name,us,ms);
+ }
+};
+
+void btDbvtBroadphase::benchmark(btBroadphaseInterface* pbi)
+{
+ static const btBroadphaseBenchmark::Experiment experiments[]=
+ {
+ {"1024o.10%",1024,10,0,8192,(btScalar)0.005,(btScalar)100},
+ /*{"4096o.10%",4096,10,0,8192,(btScalar)0.005,(btScalar)100},
+ {"8192o.10%",8192,10,0,8192,(btScalar)0.005,(btScalar)100},*/
+ };
+ static const int nexperiments=sizeof(experiments)/sizeof(experiments[0]);
+ btAlignedObjectArray<btBroadphaseBenchmark::Object*> objects;
+ btClock wallclock;
+ /* Begin */
+ for(int iexp=0;iexp<nexperiments;++iexp)
+ {
+ const btBroadphaseBenchmark::Experiment& experiment=experiments[iexp];
+ const int object_count=experiment.object_count;
+ const int update_count=(object_count*experiment.update_count)/100;
+ const int spawn_count=(object_count*experiment.spawn_count)/100;
+ const btScalar speed=experiment.speed;
+ const btScalar amplitude=experiment.amplitude;
+ printf("Experiment #%u '%s':\r\n",iexp,experiment.name);
+ printf("\tObjects: %u\r\n",object_count);
+ printf("\tUpdate: %u\r\n",update_count);
+ printf("\tSpawn: %u\r\n",spawn_count);
+ printf("\tSpeed: %f\r\n",speed);
+ printf("\tAmplitude: %f\r\n",amplitude);
+ srand(180673);
+ /* Create objects */
+ wallclock.reset();
+ objects.reserve(object_count);
+ for(int i=0;i<object_count;++i)
+ {
+ btBroadphaseBenchmark::Object* po=new btBroadphaseBenchmark::Object();
+ po->center[0]=btBroadphaseBenchmark::UnitRand()*50;
+ po->center[1]=btBroadphaseBenchmark::UnitRand()*50;
+ po->center[2]=btBroadphaseBenchmark::UnitRand()*50;
+ po->extents[0]=btBroadphaseBenchmark::UnitRand()*2+2;
+ po->extents[1]=btBroadphaseBenchmark::UnitRand()*2+2;
+ po->extents[2]=btBroadphaseBenchmark::UnitRand()*2+2;
+ po->time=btBroadphaseBenchmark::UnitRand()*2000;
+ po->proxy=pbi->createProxy(po->center-po->extents,po->center+po->extents,0,po,1,1,0,0);
+ objects.push_back(po);
+ }
+ btBroadphaseBenchmark::OutputTime("\tInitialization",wallclock);
+ /* First update */
+ wallclock.reset();
+ for(int i=0;i<objects.size();++i)
+ {
+ objects[i]->update(speed,amplitude,pbi);
+ }
+ btBroadphaseBenchmark::OutputTime("\tFirst update",wallclock);
+ /* Updates */
+ wallclock.reset();
+ for(int i=0;i<experiment.iterations;++i)
+ {
+ for(int j=0;j<update_count;++j)
+ {
+ objects[j]->update(speed,amplitude,pbi);
+ }
+ pbi->calculateOverlappingPairs(0);
+ }
+ btBroadphaseBenchmark::OutputTime("\tUpdate",wallclock,experiment.iterations);
+ /* Clean up */
+ wallclock.reset();
+ for(int i=0;i<objects.size();++i)
+ {
+ pbi->destroyProxy(objects[i]->proxy,0);
+ delete objects[i];
+ }
+ objects.resize(0);
+ btBroadphaseBenchmark::OutputTime("\tRelease",wallclock);
+ }
+
+}
+#else
+void btDbvtBroadphase::benchmark(btBroadphaseInterface*)
+{}
+#endif
+
+#if DBVT_BP_PROFILE
+#undef SPC
+#endif
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h
new file mode 100644
index 00000000..18b64ad0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDbvtBroadphase.h
@@ -0,0 +1,146 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///btDbvtBroadphase implementation by Nathanael Presson
+#ifndef BT_DBVT_BROADPHASE_H
+#define BT_DBVT_BROADPHASE_H
+
+#include "BulletCollision/BroadphaseCollision/btDbvt.h"
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
+
+//
+// Compile time config
+//
+
+#define DBVT_BP_PROFILE 0
+//#define DBVT_BP_SORTPAIRS 1
+#define DBVT_BP_PREVENTFALSEUPDATE 0
+#define DBVT_BP_ACCURATESLEEPING 0
+#define DBVT_BP_ENABLE_BENCHMARK 0
+#define DBVT_BP_MARGIN (btScalar)0.05
+
+#if DBVT_BP_PROFILE
+#define DBVT_BP_PROFILING_RATE 256
+#include "LinearMath/btQuickprof.h"
+#endif
+
+//
+// btDbvtProxy
+//
+struct btDbvtProxy : btBroadphaseProxy
+{
+ /* Fields */
+ //btDbvtAabbMm aabb;
+ btDbvtNode* leaf;
+ btDbvtProxy* links[2];
+ int stage;
+ /* ctor */
+ btDbvtProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask) :
+ btBroadphaseProxy(aabbMin,aabbMax,userPtr,collisionFilterGroup,collisionFilterMask)
+ {
+ links[0]=links[1]=0;
+ }
+};
+
+typedef btAlignedObjectArray<btDbvtProxy*> btDbvtProxyArray;
+
+///The btDbvtBroadphase implements a broadphase using two dynamic AABB bounding volume hierarchies/trees (see btDbvt).
+///One tree is used for static/non-moving objects, and another tree is used for dynamic objects. Objects can move from one tree to the other.
+///This is a very fast broadphase, especially for very dynamic worlds where many objects are moving. Its insert/add and remove of objects is generally faster than the sweep and prune broadphases btAxisSweep3 and bt32BitAxisSweep3.
+struct btDbvtBroadphase : btBroadphaseInterface
+{
+ /* Config */
+ enum {
+ DYNAMIC_SET = 0, /* Dynamic set index */
+ FIXED_SET = 1, /* Fixed set index */
+ STAGECOUNT = 2 /* Number of stages */
+ };
+ /* Fields */
+ btDbvt m_sets[2]; // Dbvt sets
+ btDbvtProxy* m_stageRoots[STAGECOUNT+1]; // Stages list
+ btOverlappingPairCache* m_paircache; // Pair cache
+ btScalar m_prediction; // Velocity prediction
+ int m_stageCurrent; // Current stage
+ int m_fupdates; // % of fixed updates per frame
+ int m_dupdates; // % of dynamic updates per frame
+ int m_cupdates; // % of cleanup updates per frame
+ int m_newpairs; // Number of pairs created
+ int m_fixedleft; // Fixed optimization left
+ unsigned m_updates_call; // Number of updates call
+ unsigned m_updates_done; // Number of updates done
+ btScalar m_updates_ratio; // m_updates_done/m_updates_call
+ int m_pid; // Parse id
+ int m_cid; // Cleanup index
+ int m_gid; // Gen id
+ bool m_releasepaircache; // Release pair cache on delete
+ bool m_deferedcollide; // Defere dynamic/static collision to collide call
+ bool m_needcleanup; // Need to run cleanup?
+#if DBVT_BP_PROFILE
+ btClock m_clock;
+ struct {
+ unsigned long m_total;
+ unsigned long m_ddcollide;
+ unsigned long m_fdcollide;
+ unsigned long m_cleanup;
+ unsigned long m_jobcount;
+ } m_profiling;
+#endif
+ /* Methods */
+ btDbvtBroadphase(btOverlappingPairCache* paircache=0);
+ ~btDbvtBroadphase();
+ void collide(btDispatcher* dispatcher);
+ void optimize();
+
+ /* btBroadphaseInterface Implementation */
+ btBroadphaseProxy* createProxy(const btVector3& aabbMin,const btVector3& aabbMax,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
+ virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+ virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
+ virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0));
+ virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback);
+
+ virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
+ virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
+ virtual btOverlappingPairCache* getOverlappingPairCache();
+ virtual const btOverlappingPairCache* getOverlappingPairCache() const;
+ virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const;
+ virtual void printStats();
+
+
+ ///reset broadphase internal structures, to ensure determinism/reproducability
+ virtual void resetPool(btDispatcher* dispatcher);
+
+ void performDeferredRemoval(btDispatcher* dispatcher);
+
+ void setVelocityPrediction(btScalar prediction)
+ {
+ m_prediction = prediction;
+ }
+ btScalar getVelocityPrediction() const
+ {
+ return m_prediction;
+ }
+
+ ///this setAabbForceUpdate is similar to setAabb but always forces the aabb update.
+ ///it is not part of the btBroadphaseInterface but specific to btDbvtBroadphase.
+ ///it bypasses certain optimizations that prevent aabb updates (when the aabb shrinks), see
+ ///http://code.google.com/p/bullet/issues/detail?id=223
+ void setAabbForceUpdate( btBroadphaseProxy* absproxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* /*dispatcher*/);
+
+ static void benchmark(btBroadphaseInterface*);
+
+
+};
+
+#endif
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp
new file mode 100644
index 00000000..20768225
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.cpp
@@ -0,0 +1,22 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btDispatcher.h"
+
+btDispatcher::~btDispatcher()
+{
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.h
new file mode 100644
index 00000000..a79cf940
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btDispatcher.h
@@ -0,0 +1,110 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_DISPATCHER_H
+#define BT_DISPATCHER_H
+#include "LinearMath/btScalar.h"
+
+class btCollisionAlgorithm;
+struct btBroadphaseProxy;
+class btRigidBody;
+class btCollisionObject;
+class btOverlappingPairCache;
+
+
+class btPersistentManifold;
+class btStackAlloc;
+class btPoolAllocator;
+
+struct btDispatcherInfo
+{
+ enum DispatchFunc
+ {
+ DISPATCH_DISCRETE = 1,
+ DISPATCH_CONTINUOUS
+ };
+ btDispatcherInfo()
+ :m_timeStep(btScalar(0.)),
+ m_stepCount(0),
+ m_dispatchFunc(DISPATCH_DISCRETE),
+ m_timeOfImpact(btScalar(1.)),
+ m_useContinuous(true),
+ m_debugDraw(0),
+ m_enableSatConvex(false),
+ m_enableSPU(true),
+ m_useEpa(true),
+ m_allowedCcdPenetration(btScalar(0.04)),
+ m_useConvexConservativeDistanceUtil(false),
+ m_convexConservativeDistanceThreshold(0.0f),
+ m_stackAllocator(0)
+ {
+
+ }
+ btScalar m_timeStep;
+ int m_stepCount;
+ int m_dispatchFunc;
+ mutable btScalar m_timeOfImpact;
+ bool m_useContinuous;
+ class btIDebugDraw* m_debugDraw;
+ bool m_enableSatConvex;
+ bool m_enableSPU;
+ bool m_useEpa;
+ btScalar m_allowedCcdPenetration;
+ bool m_useConvexConservativeDistanceUtil;
+ btScalar m_convexConservativeDistanceThreshold;
+ btStackAlloc* m_stackAllocator;
+};
+
+///The btDispatcher interface class can be used in combination with broadphase to dispatch calculations for overlapping pairs.
+///For example for pairwise collision detection, calculating contact points stored in btPersistentManifold or user callbacks (game logic).
+class btDispatcher
+{
+
+
+public:
+ virtual ~btDispatcher() ;
+
+ virtual btCollisionAlgorithm* findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold=0) = 0;
+
+ virtual btPersistentManifold* getNewManifold(void* body0,void* body1)=0;
+
+ virtual void releaseManifold(btPersistentManifold* manifold)=0;
+
+ virtual void clearManifold(btPersistentManifold* manifold)=0;
+
+ virtual bool needsCollision(btCollisionObject* body0,btCollisionObject* body1) = 0;
+
+ virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1)=0;
+
+ virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) =0;
+
+ virtual int getNumManifolds() const = 0;
+
+ virtual btPersistentManifold* getManifoldByIndexInternal(int index) = 0;
+
+ virtual btPersistentManifold** getInternalManifoldPointer() = 0;
+
+ virtual btPoolAllocator* getInternalManifoldPool() = 0;
+
+ virtual const btPoolAllocator* getInternalManifoldPool() const = 0;
+
+ virtual void* allocateCollisionAlgorithm(int size) = 0;
+
+ virtual void freeCollisionAlgorithm(void* ptr) = 0;
+
+};
+
+
+#endif //BT_DISPATCHER_H
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp
new file mode 100644
index 00000000..6712f528
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp
@@ -0,0 +1,489 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btMultiSapBroadphase.h"
+
+#include "btSimpleBroadphase.h"
+#include "LinearMath/btAabbUtil2.h"
+#include "btQuantizedBvh.h"
+
+/// btSapBroadphaseArray m_sapBroadphases;
+
+/// btOverlappingPairCache* m_overlappingPairs;
+extern int gOverlappingPairs;
+
+/*
+class btMultiSapSortedOverlappingPairCache : public btSortedOverlappingPairCache
+{
+public:
+
+ virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+ {
+ return btSortedOverlappingPairCache::addOverlappingPair((btBroadphaseProxy*)proxy0->m_multiSapParentProxy,(btBroadphaseProxy*)proxy1->m_multiSapParentProxy);
+ }
+};
+
+*/
+
+btMultiSapBroadphase::btMultiSapBroadphase(int /*maxProxies*/,btOverlappingPairCache* pairCache)
+:m_overlappingPairs(pairCache),
+m_optimizedAabbTree(0),
+m_ownsPairCache(false),
+m_invalidPair(0)
+{
+ if (!m_overlappingPairs)
+ {
+ m_ownsPairCache = true;
+ void* mem = btAlignedAlloc(sizeof(btSortedOverlappingPairCache),16);
+ m_overlappingPairs = new (mem)btSortedOverlappingPairCache();
+ }
+
+ struct btMultiSapOverlapFilterCallback : public btOverlapFilterCallback
+ {
+ virtual ~btMultiSapOverlapFilterCallback()
+ {}
+ // return true when pairs need collision
+ virtual bool needBroadphaseCollision(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1) const
+ {
+ btBroadphaseProxy* multiProxy0 = (btBroadphaseProxy*)childProxy0->m_multiSapParentProxy;
+ btBroadphaseProxy* multiProxy1 = (btBroadphaseProxy*)childProxy1->m_multiSapParentProxy;
+
+ bool collides = (multiProxy0->m_collisionFilterGroup & multiProxy1->m_collisionFilterMask) != 0;
+ collides = collides && (multiProxy1->m_collisionFilterGroup & multiProxy0->m_collisionFilterMask);
+
+ return collides;
+ }
+ };
+
+ void* mem = btAlignedAlloc(sizeof(btMultiSapOverlapFilterCallback),16);
+ m_filterCallback = new (mem)btMultiSapOverlapFilterCallback();
+
+ m_overlappingPairs->setOverlapFilterCallback(m_filterCallback);
+// mem = btAlignedAlloc(sizeof(btSimpleBroadphase),16);
+// m_simpleBroadphase = new (mem) btSimpleBroadphase(maxProxies,m_overlappingPairs);
+}
+
+btMultiSapBroadphase::~btMultiSapBroadphase()
+{
+ if (m_ownsPairCache)
+ {
+ m_overlappingPairs->~btOverlappingPairCache();
+ btAlignedFree(m_overlappingPairs);
+ }
+}
+
+
+void btMultiSapBroadphase::buildTree(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax)
+{
+ m_optimizedAabbTree = new btQuantizedBvh();
+ m_optimizedAabbTree->setQuantizationValues(bvhAabbMin,bvhAabbMax);
+ QuantizedNodeArray& nodes = m_optimizedAabbTree->getLeafNodeArray();
+ for (int i=0;i<m_sapBroadphases.size();i++)
+ {
+ btQuantizedBvhNode node;
+ btVector3 aabbMin,aabbMax;
+ m_sapBroadphases[i]->getBroadphaseAabb(aabbMin,aabbMax);
+ m_optimizedAabbTree->quantize(&node.m_quantizedAabbMin[0],aabbMin,0);
+ m_optimizedAabbTree->quantize(&node.m_quantizedAabbMax[0],aabbMax,1);
+ int partId = 0;
+ node.m_escapeIndexOrTriangleIndex = (partId<<(31-MAX_NUM_PARTS_IN_BITS)) | i;
+ nodes.push_back(node);
+ }
+ m_optimizedAabbTree->buildInternal();
+}
+
+btBroadphaseProxy* btMultiSapBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* /*ignoreMe*/)
+{
+ //void* ignoreMe -> we could think of recursive multi-sap, if someone is interested
+
+ void* mem = btAlignedAlloc(sizeof(btMultiSapProxy),16);
+ btMultiSapProxy* proxy = new (mem)btMultiSapProxy(aabbMin, aabbMax,shapeType,userPtr, collisionFilterGroup,collisionFilterMask);
+ m_multiSapProxies.push_back(proxy);
+
+ ///this should deal with inserting/removal into child broadphases
+ setAabb(proxy,aabbMin,aabbMax,dispatcher);
+ return proxy;
+}
+
+void btMultiSapBroadphase::destroyProxy(btBroadphaseProxy* /*proxy*/,btDispatcher* /*dispatcher*/)
+{
+ ///not yet
+ btAssert(0);
+
+}
+
+
+void btMultiSapBroadphase::addToChildBroadphase(btMultiSapProxy* parentMultiSapProxy, btBroadphaseProxy* childProxy, btBroadphaseInterface* childBroadphase)
+{
+ void* mem = btAlignedAlloc(sizeof(btBridgeProxy),16);
+ btBridgeProxy* bridgeProxyRef = new(mem) btBridgeProxy;
+ bridgeProxyRef->m_childProxy = childProxy;
+ bridgeProxyRef->m_childBroadphase = childBroadphase;
+ parentMultiSapProxy->m_bridgeProxies.push_back(bridgeProxyRef);
+}
+
+
+bool boxIsContainedWithinBox(const btVector3& amin,const btVector3& amax,const btVector3& bmin,const btVector3& bmax);
+bool boxIsContainedWithinBox(const btVector3& amin,const btVector3& amax,const btVector3& bmin,const btVector3& bmax)
+{
+return
+amin.getX() >= bmin.getX() && amax.getX() <= bmax.getX() &&
+amin.getY() >= bmin.getY() && amax.getY() <= bmax.getY() &&
+amin.getZ() >= bmin.getZ() && amax.getZ() <= bmax.getZ();
+}
+
+
+
+
+
+
+void btMultiSapBroadphase::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
+{
+ btMultiSapProxy* multiProxy = static_cast<btMultiSapProxy*>(proxy);
+ aabbMin = multiProxy->m_aabbMin;
+ aabbMax = multiProxy->m_aabbMax;
+}
+
+void btMultiSapBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ for (int i=0;i<m_multiSapProxies.size();i++)
+ {
+ rayCallback.process(m_multiSapProxies[i]);
+ }
+}
+
+
+//#include <stdio.h>
+
+void btMultiSapBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)
+{
+ btMultiSapProxy* multiProxy = static_cast<btMultiSapProxy*>(proxy);
+ multiProxy->m_aabbMin = aabbMin;
+ multiProxy->m_aabbMax = aabbMax;
+
+
+// bool fullyContained = false;
+// bool alreadyInSimple = false;
+
+
+
+
+ struct MyNodeOverlapCallback : public btNodeOverlapCallback
+ {
+ btMultiSapBroadphase* m_multiSap;
+ btMultiSapProxy* m_multiProxy;
+ btDispatcher* m_dispatcher;
+
+ MyNodeOverlapCallback(btMultiSapBroadphase* multiSap,btMultiSapProxy* multiProxy,btDispatcher* dispatcher)
+ :m_multiSap(multiSap),
+ m_multiProxy(multiProxy),
+ m_dispatcher(dispatcher)
+ {
+
+ }
+
+ virtual void processNode(int /*nodeSubPart*/, int broadphaseIndex)
+ {
+ btBroadphaseInterface* childBroadphase = m_multiSap->getBroadphaseArray()[broadphaseIndex];
+
+ int containingBroadphaseIndex = -1;
+ //already found?
+ for (int i=0;i<m_multiProxy->m_bridgeProxies.size();i++)
+ {
+
+ if (m_multiProxy->m_bridgeProxies[i]->m_childBroadphase == childBroadphase)
+ {
+ containingBroadphaseIndex = i;
+ break;
+ }
+ }
+ if (containingBroadphaseIndex<0)
+ {
+ //add it
+ btBroadphaseProxy* childProxy = childBroadphase->createProxy(m_multiProxy->m_aabbMin,m_multiProxy->m_aabbMax,m_multiProxy->m_shapeType,m_multiProxy->m_clientObject,m_multiProxy->m_collisionFilterGroup,m_multiProxy->m_collisionFilterMask, m_dispatcher,m_multiProxy);
+ m_multiSap->addToChildBroadphase(m_multiProxy,childProxy,childBroadphase);
+
+ }
+ }
+ };
+
+ MyNodeOverlapCallback myNodeCallback(this,multiProxy,dispatcher);
+
+
+
+
+ if (m_optimizedAabbTree)
+ m_optimizedAabbTree->reportAabbOverlappingNodex(&myNodeCallback,aabbMin,aabbMax);
+
+ int i;
+
+ for ( i=0;i<multiProxy->m_bridgeProxies.size();i++)
+ {
+ btVector3 worldAabbMin,worldAabbMax;
+ multiProxy->m_bridgeProxies[i]->m_childBroadphase->getBroadphaseAabb(worldAabbMin,worldAabbMax);
+ bool overlapsBroadphase = TestAabbAgainstAabb2(worldAabbMin,worldAabbMax,multiProxy->m_aabbMin,multiProxy->m_aabbMax);
+ if (!overlapsBroadphase)
+ {
+ //remove it now
+ btBridgeProxy* bridgeProxy = multiProxy->m_bridgeProxies[i];
+
+ btBroadphaseProxy* childProxy = bridgeProxy->m_childProxy;
+ bridgeProxy->m_childBroadphase->destroyProxy(childProxy,dispatcher);
+
+ multiProxy->m_bridgeProxies.swap( i,multiProxy->m_bridgeProxies.size()-1);
+ multiProxy->m_bridgeProxies.pop_back();
+
+ }
+ }
+
+
+ /*
+
+ if (1)
+ {
+
+ //find broadphase that contain this multiProxy
+ int numChildBroadphases = getBroadphaseArray().size();
+ for (int i=0;i<numChildBroadphases;i++)
+ {
+ btBroadphaseInterface* childBroadphase = getBroadphaseArray()[i];
+ btVector3 worldAabbMin,worldAabbMax;
+ childBroadphase->getBroadphaseAabb(worldAabbMin,worldAabbMax);
+ bool overlapsBroadphase = TestAabbAgainstAabb2(worldAabbMin,worldAabbMax,multiProxy->m_aabbMin,multiProxy->m_aabbMax);
+
+ // fullyContained = fullyContained || boxIsContainedWithinBox(worldAabbMin,worldAabbMax,multiProxy->m_aabbMin,multiProxy->m_aabbMax);
+ int containingBroadphaseIndex = -1;
+
+ //if already contains this
+
+ for (int i=0;i<multiProxy->m_bridgeProxies.size();i++)
+ {
+ if (multiProxy->m_bridgeProxies[i]->m_childBroadphase == childBroadphase)
+ {
+ containingBroadphaseIndex = i;
+ }
+ alreadyInSimple = alreadyInSimple || (multiProxy->m_bridgeProxies[i]->m_childBroadphase == m_simpleBroadphase);
+ }
+
+ if (overlapsBroadphase)
+ {
+ if (containingBroadphaseIndex<0)
+ {
+ btBroadphaseProxy* childProxy = childBroadphase->createProxy(aabbMin,aabbMax,multiProxy->m_shapeType,multiProxy->m_clientObject,multiProxy->m_collisionFilterGroup,multiProxy->m_collisionFilterMask, dispatcher);
+ childProxy->m_multiSapParentProxy = multiProxy;
+ addToChildBroadphase(multiProxy,childProxy,childBroadphase);
+ }
+ } else
+ {
+ if (containingBroadphaseIndex>=0)
+ {
+ //remove
+ btBridgeProxy* bridgeProxy = multiProxy->m_bridgeProxies[containingBroadphaseIndex];
+
+ btBroadphaseProxy* childProxy = bridgeProxy->m_childProxy;
+ bridgeProxy->m_childBroadphase->destroyProxy(childProxy,dispatcher);
+
+ multiProxy->m_bridgeProxies.swap( containingBroadphaseIndex,multiProxy->m_bridgeProxies.size()-1);
+ multiProxy->m_bridgeProxies.pop_back();
+ }
+ }
+ }
+
+
+ ///If we are in no other child broadphase, stick the proxy in the global 'simple' broadphase (brute force)
+ ///hopefully we don't end up with many entries here (can assert/provide feedback on stats)
+ if (0)//!multiProxy->m_bridgeProxies.size())
+ {
+ ///we don't pass the userPtr but our multisap proxy. We need to patch this, before processing an actual collision
+ ///this is needed to be able to calculate the aabb overlap
+ btBroadphaseProxy* childProxy = m_simpleBroadphase->createProxy(aabbMin,aabbMax,multiProxy->m_shapeType,multiProxy->m_clientObject,multiProxy->m_collisionFilterGroup,multiProxy->m_collisionFilterMask, dispatcher);
+ childProxy->m_multiSapParentProxy = multiProxy;
+ addToChildBroadphase(multiProxy,childProxy,m_simpleBroadphase);
+ }
+ }
+
+ if (!multiProxy->m_bridgeProxies.size())
+ {
+ ///we don't pass the userPtr but our multisap proxy. We need to patch this, before processing an actual collision
+ ///this is needed to be able to calculate the aabb overlap
+ btBroadphaseProxy* childProxy = m_simpleBroadphase->createProxy(aabbMin,aabbMax,multiProxy->m_shapeType,multiProxy->m_clientObject,multiProxy->m_collisionFilterGroup,multiProxy->m_collisionFilterMask, dispatcher);
+ childProxy->m_multiSapParentProxy = multiProxy;
+ addToChildBroadphase(multiProxy,childProxy,m_simpleBroadphase);
+ }
+*/
+
+
+ //update
+ for ( i=0;i<multiProxy->m_bridgeProxies.size();i++)
+ {
+ btBridgeProxy* bridgeProxyRef = multiProxy->m_bridgeProxies[i];
+ bridgeProxyRef->m_childBroadphase->setAabb(bridgeProxyRef->m_childProxy,aabbMin,aabbMax,dispatcher);
+ }
+
+}
+bool stopUpdating=false;
+
+
+
+class btMultiSapBroadphasePairSortPredicate
+{
+ public:
+
+ bool operator() ( const btBroadphasePair& a1, const btBroadphasePair& b1 )
+ {
+ btMultiSapBroadphase::btMultiSapProxy* aProxy0 = a1.m_pProxy0 ? (btMultiSapBroadphase::btMultiSapProxy*)a1.m_pProxy0->m_multiSapParentProxy : 0;
+ btMultiSapBroadphase::btMultiSapProxy* aProxy1 = a1.m_pProxy1 ? (btMultiSapBroadphase::btMultiSapProxy*)a1.m_pProxy1->m_multiSapParentProxy : 0;
+ btMultiSapBroadphase::btMultiSapProxy* bProxy0 = b1.m_pProxy0 ? (btMultiSapBroadphase::btMultiSapProxy*)b1.m_pProxy0->m_multiSapParentProxy : 0;
+ btMultiSapBroadphase::btMultiSapProxy* bProxy1 = b1.m_pProxy1 ? (btMultiSapBroadphase::btMultiSapProxy*)b1.m_pProxy1->m_multiSapParentProxy : 0;
+
+ return aProxy0 > bProxy0 ||
+ (aProxy0 == bProxy0 && aProxy1 > bProxy1) ||
+ (aProxy0 == bProxy0 && aProxy1 == bProxy1 && a1.m_algorithm > b1.m_algorithm);
+ }
+};
+
+
+ ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
+void btMultiSapBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
+{
+
+// m_simpleBroadphase->calculateOverlappingPairs(dispatcher);
+
+ if (!stopUpdating && getOverlappingPairCache()->hasDeferredRemoval())
+ {
+
+ btBroadphasePairArray& overlappingPairArray = getOverlappingPairCache()->getOverlappingPairArray();
+
+ // quicksort(overlappingPairArray,0,overlappingPairArray.size());
+
+ overlappingPairArray.quickSort(btMultiSapBroadphasePairSortPredicate());
+
+ //perform a sort, to find duplicates and to sort 'invalid' pairs to the end
+ // overlappingPairArray.heapSort(btMultiSapBroadphasePairSortPredicate());
+
+ overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
+ m_invalidPair = 0;
+
+
+ int i;
+
+ btBroadphasePair previousPair;
+ previousPair.m_pProxy0 = 0;
+ previousPair.m_pProxy1 = 0;
+ previousPair.m_algorithm = 0;
+
+
+ for (i=0;i<overlappingPairArray.size();i++)
+ {
+
+ btBroadphasePair& pair = overlappingPairArray[i];
+
+ btMultiSapProxy* aProxy0 = pair.m_pProxy0 ? (btMultiSapProxy*)pair.m_pProxy0->m_multiSapParentProxy : 0;
+ btMultiSapProxy* aProxy1 = pair.m_pProxy1 ? (btMultiSapProxy*)pair.m_pProxy1->m_multiSapParentProxy : 0;
+ btMultiSapProxy* bProxy0 = previousPair.m_pProxy0 ? (btMultiSapProxy*)previousPair.m_pProxy0->m_multiSapParentProxy : 0;
+ btMultiSapProxy* bProxy1 = previousPair.m_pProxy1 ? (btMultiSapProxy*)previousPair.m_pProxy1->m_multiSapParentProxy : 0;
+
+ bool isDuplicate = (aProxy0 == bProxy0) && (aProxy1 == bProxy1);
+
+ previousPair = pair;
+
+ bool needsRemoval = false;
+
+ if (!isDuplicate)
+ {
+ bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1);
+
+ if (hasOverlap)
+ {
+ needsRemoval = false;//callback->processOverlap(pair);
+ } else
+ {
+ needsRemoval = true;
+ }
+ } else
+ {
+ //remove duplicate
+ needsRemoval = true;
+ //should have no algorithm
+ btAssert(!pair.m_algorithm);
+ }
+
+ if (needsRemoval)
+ {
+ getOverlappingPairCache()->cleanOverlappingPair(pair,dispatcher);
+
+ // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
+ // m_overlappingPairArray.pop_back();
+ pair.m_pProxy0 = 0;
+ pair.m_pProxy1 = 0;
+ m_invalidPair++;
+ gOverlappingPairs--;
+ }
+
+ }
+
+ ///if you don't like to skip the invalid pairs in the array, execute following code:
+ #define CLEAN_INVALID_PAIRS 1
+ #ifdef CLEAN_INVALID_PAIRS
+
+ //perform a sort, to sort 'invalid' pairs to the end
+ //overlappingPairArray.heapSort(btMultiSapBroadphasePairSortPredicate());
+ overlappingPairArray.quickSort(btMultiSapBroadphasePairSortPredicate());
+
+ overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
+ m_invalidPair = 0;
+ #endif//CLEAN_INVALID_PAIRS
+
+ //printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size());
+ }
+
+
+}
+
+
+bool btMultiSapBroadphase::testAabbOverlap(btBroadphaseProxy* childProxy0,btBroadphaseProxy* childProxy1)
+{
+ btMultiSapProxy* multiSapProxy0 = (btMultiSapProxy*)childProxy0->m_multiSapParentProxy;
+ btMultiSapProxy* multiSapProxy1 = (btMultiSapProxy*)childProxy1->m_multiSapParentProxy;
+
+ return TestAabbAgainstAabb2(multiSapProxy0->m_aabbMin,multiSapProxy0->m_aabbMax,
+ multiSapProxy1->m_aabbMin,multiSapProxy1->m_aabbMax);
+
+}
+
+
+void btMultiSapBroadphase::printStats()
+{
+/* printf("---------------------------------\n");
+
+ printf("btMultiSapBroadphase.h\n");
+ printf("numHandles = %d\n",m_multiSapProxies.size());
+ //find broadphase that contain this multiProxy
+ int numChildBroadphases = getBroadphaseArray().size();
+ for (int i=0;i<numChildBroadphases;i++)
+ {
+
+ btBroadphaseInterface* childBroadphase = getBroadphaseArray()[i];
+ childBroadphase->printStats();
+
+ }
+ */
+
+}
+
+void btMultiSapBroadphase::resetPool(btDispatcher* dispatcher)
+{
+ // not yet
+}
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h
new file mode 100644
index 00000000..7bcfe6b1
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h
@@ -0,0 +1,151 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef BT_MULTI_SAP_BROADPHASE
+#define BT_MULTI_SAP_BROADPHASE
+
+#include "btBroadphaseInterface.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "btOverlappingPairCache.h"
+
+
+class btBroadphaseInterface;
+class btSimpleBroadphase;
+
+
+typedef btAlignedObjectArray<btBroadphaseInterface*> btSapBroadphaseArray;
+
+///The btMultiSapBroadphase is a research project, not recommended to use in production. Use btAxisSweep3 or btDbvtBroadphase instead.
+///The btMultiSapBroadphase is a broadphase that contains multiple SAP broadphases.
+///The user can add SAP broadphases that cover the world. A btBroadphaseProxy can be in multiple child broadphases at the same time.
+///A btQuantizedBvh acceleration structures finds overlapping SAPs for each btBroadphaseProxy.
+///See http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=328
+///and http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1329
+class btMultiSapBroadphase :public btBroadphaseInterface
+{
+ btSapBroadphaseArray m_sapBroadphases;
+
+ btSimpleBroadphase* m_simpleBroadphase;
+
+ btOverlappingPairCache* m_overlappingPairs;
+
+ class btQuantizedBvh* m_optimizedAabbTree;
+
+
+ bool m_ownsPairCache;
+
+ btOverlapFilterCallback* m_filterCallback;
+
+ int m_invalidPair;
+
+ struct btBridgeProxy
+ {
+ btBroadphaseProxy* m_childProxy;
+ btBroadphaseInterface* m_childBroadphase;
+ };
+
+
+public:
+
+ struct btMultiSapProxy : public btBroadphaseProxy
+ {
+
+ ///array with all the entries that this proxy belongs to
+ btAlignedObjectArray<btBridgeProxy*> m_bridgeProxies;
+ btVector3 m_aabbMin;
+ btVector3 m_aabbMax;
+
+ int m_shapeType;
+
+/* void* m_userPtr;
+ short int m_collisionFilterGroup;
+ short int m_collisionFilterMask;
+*/
+ btMultiSapProxy(const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask)
+ :btBroadphaseProxy(aabbMin,aabbMax,userPtr,collisionFilterGroup,collisionFilterMask),
+ m_aabbMin(aabbMin),
+ m_aabbMax(aabbMax),
+ m_shapeType(shapeType)
+ {
+ m_multiSapParentProxy =this;
+ }
+
+
+ };
+
+protected:
+
+
+ btAlignedObjectArray<btMultiSapProxy*> m_multiSapProxies;
+
+public:
+
+ btMultiSapBroadphase(int maxProxies = 16384,btOverlappingPairCache* pairCache=0);
+
+
+ btSapBroadphaseArray& getBroadphaseArray()
+ {
+ return m_sapBroadphases;
+ }
+
+ const btSapBroadphaseArray& getBroadphaseArray() const
+ {
+ return m_sapBroadphases;
+ }
+
+ virtual ~btMultiSapBroadphase();
+
+ virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy);
+ virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+ virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher);
+ virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
+
+ virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin=btVector3(0,0,0),const btVector3& aabbMax=btVector3(0,0,0));
+
+ void addToChildBroadphase(btMultiSapProxy* parentMultiSapProxy, btBroadphaseProxy* childProxy, btBroadphaseInterface* childBroadphase);
+
+ ///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
+ virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
+
+ bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
+
+ virtual btOverlappingPairCache* getOverlappingPairCache()
+ {
+ return m_overlappingPairs;
+ }
+ virtual const btOverlappingPairCache* getOverlappingPairCache() const
+ {
+ return m_overlappingPairs;
+ }
+
+ ///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
+ ///will add some transform later
+ virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ aabbMin.setValue(-BT_LARGE_FLOAT,-BT_LARGE_FLOAT,-BT_LARGE_FLOAT);
+ aabbMax.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOAT);
+ }
+
+ void buildTree(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax);
+
+ virtual void printStats();
+
+ void quicksort (btBroadphasePairArray& a, int lo, int hi);
+
+ ///reset broadphase internal structures, to ensure determinism/reproducability
+ virtual void resetPool(btDispatcher* dispatcher);
+
+};
+
+#endif //BT_MULTI_SAP_BROADPHASE
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
new file mode 100644
index 00000000..041bbe05
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
@@ -0,0 +1,633 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btOverlappingPairCache.h"
+
+#include "btDispatcher.h"
+#include "btCollisionAlgorithm.h"
+#include "LinearMath/btAabbUtil2.h"
+
+#include <stdio.h>
+
+int gOverlappingPairs = 0;
+
+int gRemovePairs =0;
+int gAddedPairs =0;
+int gFindPairs =0;
+
+
+
+
+btHashedOverlappingPairCache::btHashedOverlappingPairCache():
+ m_overlapFilterCallback(0),
+ m_blockedForChanges(false),
+ m_ghostPairCallback(0)
+{
+ int initialAllocatedSize= 2;
+ m_overlappingPairArray.reserve(initialAllocatedSize);
+ growTables();
+}
+
+
+
+
+btHashedOverlappingPairCache::~btHashedOverlappingPairCache()
+{
+}
+
+
+
+void btHashedOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher)
+{
+ if (pair.m_algorithm)
+ {
+ {
+ pair.m_algorithm->~btCollisionAlgorithm();
+ dispatcher->freeCollisionAlgorithm(pair.m_algorithm);
+ pair.m_algorithm=0;
+ }
+ }
+}
+
+
+
+
+void btHashedOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
+{
+
+ class CleanPairCallback : public btOverlapCallback
+ {
+ btBroadphaseProxy* m_cleanProxy;
+ btOverlappingPairCache* m_pairCache;
+ btDispatcher* m_dispatcher;
+
+ public:
+ CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache,btDispatcher* dispatcher)
+ :m_cleanProxy(cleanProxy),
+ m_pairCache(pairCache),
+ m_dispatcher(dispatcher)
+ {
+ }
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ if ((pair.m_pProxy0 == m_cleanProxy) ||
+ (pair.m_pProxy1 == m_cleanProxy))
+ {
+ m_pairCache->cleanOverlappingPair(pair,m_dispatcher);
+ }
+ return false;
+ }
+
+ };
+
+ CleanPairCallback cleanPairs(proxy,this,dispatcher);
+
+ processAllOverlappingPairs(&cleanPairs,dispatcher);
+
+}
+
+
+
+
+void btHashedOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
+{
+
+ class RemovePairCallback : public btOverlapCallback
+ {
+ btBroadphaseProxy* m_obsoleteProxy;
+
+ public:
+ RemovePairCallback(btBroadphaseProxy* obsoleteProxy)
+ :m_obsoleteProxy(obsoleteProxy)
+ {
+ }
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ return ((pair.m_pProxy0 == m_obsoleteProxy) ||
+ (pair.m_pProxy1 == m_obsoleteProxy));
+ }
+
+ };
+
+
+ RemovePairCallback removeCallback(proxy);
+
+ processAllOverlappingPairs(&removeCallback,dispatcher);
+}
+
+
+
+
+
+btBroadphasePair* btHashedOverlappingPairCache::findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1)
+{
+ gFindPairs++;
+ if(proxy0->m_uniqueId>proxy1->m_uniqueId)
+ btSwap(proxy0,proxy1);
+ int proxyId1 = proxy0->getUid();
+ int proxyId2 = proxy1->getUid();
+
+ /*if (proxyId1 > proxyId2)
+ btSwap(proxyId1, proxyId2);*/
+
+ int hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1), static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1));
+
+ if (hash >= m_hashTable.size())
+ {
+ return NULL;
+ }
+
+ int index = m_hashTable[hash];
+ while (index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false)
+ {
+ index = m_next[index];
+ }
+
+ if (index == BT_NULL_PAIR)
+ {
+ return NULL;
+ }
+
+ btAssert(index < m_overlappingPairArray.size());
+
+ return &m_overlappingPairArray[index];
+}
+
+//#include <stdio.h>
+
+void btHashedOverlappingPairCache::growTables()
+{
+
+ int newCapacity = m_overlappingPairArray.capacity();
+
+ if (m_hashTable.size() < newCapacity)
+ {
+ //grow hashtable and next table
+ int curHashtableSize = m_hashTable.size();
+
+ m_hashTable.resize(newCapacity);
+ m_next.resize(newCapacity);
+
+
+ int i;
+
+ for (i= 0; i < newCapacity; ++i)
+ {
+ m_hashTable[i] = BT_NULL_PAIR;
+ }
+ for (i = 0; i < newCapacity; ++i)
+ {
+ m_next[i] = BT_NULL_PAIR;
+ }
+
+ for(i=0;i<curHashtableSize;i++)
+ {
+
+ const btBroadphasePair& pair = m_overlappingPairArray[i];
+ int proxyId1 = pair.m_pProxy0->getUid();
+ int proxyId2 = pair.m_pProxy1->getUid();
+ /*if (proxyId1 > proxyId2)
+ btSwap(proxyId1, proxyId2);*/
+ int hashValue = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1)); // New hash value with new mask
+ m_next[i] = m_hashTable[hashValue];
+ m_hashTable[hashValue] = i;
+ }
+
+
+ }
+}
+
+btBroadphasePair* btHashedOverlappingPairCache::internalAddPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1)
+{
+ if(proxy0->m_uniqueId>proxy1->m_uniqueId)
+ btSwap(proxy0,proxy1);
+ int proxyId1 = proxy0->getUid();
+ int proxyId2 = proxy1->getUid();
+
+ /*if (proxyId1 > proxyId2)
+ btSwap(proxyId1, proxyId2);*/
+
+ int hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1)); // New hash value with new mask
+
+
+ btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash);
+ if (pair != NULL)
+ {
+ return pair;
+ }
+ /*for(int i=0;i<m_overlappingPairArray.size();++i)
+ {
+ if( (m_overlappingPairArray[i].m_pProxy0==proxy0)&&
+ (m_overlappingPairArray[i].m_pProxy1==proxy1))
+ {
+ printf("Adding duplicated %u<>%u\r\n",proxyId1,proxyId2);
+ internalFindPair(proxy0, proxy1, hash);
+ }
+ }*/
+ int count = m_overlappingPairArray.size();
+ int oldCapacity = m_overlappingPairArray.capacity();
+ void* mem = &m_overlappingPairArray.expandNonInitializing();
+
+ //this is where we add an actual pair, so also call the 'ghost'
+ if (m_ghostPairCallback)
+ m_ghostPairCallback->addOverlappingPair(proxy0,proxy1);
+
+ int newCapacity = m_overlappingPairArray.capacity();
+
+ if (oldCapacity < newCapacity)
+ {
+ growTables();
+ //hash with new capacity
+ hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1));
+ }
+
+ pair = new (mem) btBroadphasePair(*proxy0,*proxy1);
+// pair->m_pProxy0 = proxy0;
+// pair->m_pProxy1 = proxy1;
+ pair->m_algorithm = 0;
+ pair->m_internalTmpValue = 0;
+
+
+ m_next[count] = m_hashTable[hash];
+ m_hashTable[hash] = count;
+
+ return pair;
+}
+
+
+
+void* btHashedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1,btDispatcher* dispatcher)
+{
+ gRemovePairs++;
+ if(proxy0->m_uniqueId>proxy1->m_uniqueId)
+ btSwap(proxy0,proxy1);
+ int proxyId1 = proxy0->getUid();
+ int proxyId2 = proxy1->getUid();
+
+ /*if (proxyId1 > proxyId2)
+ btSwap(proxyId1, proxyId2);*/
+
+ int hash = static_cast<int>(getHash(static_cast<unsigned int>(proxyId1),static_cast<unsigned int>(proxyId2)) & (m_overlappingPairArray.capacity()-1));
+
+ btBroadphasePair* pair = internalFindPair(proxy0, proxy1, hash);
+ if (pair == NULL)
+ {
+ return 0;
+ }
+
+ cleanOverlappingPair(*pair,dispatcher);
+
+ void* userData = pair->m_internalInfo1;
+
+ btAssert(pair->m_pProxy0->getUid() == proxyId1);
+ btAssert(pair->m_pProxy1->getUid() == proxyId2);
+
+ int pairIndex = int(pair - &m_overlappingPairArray[0]);
+ btAssert(pairIndex < m_overlappingPairArray.size());
+
+ // Remove the pair from the hash table.
+ int index = m_hashTable[hash];
+ btAssert(index != BT_NULL_PAIR);
+
+ int previous = BT_NULL_PAIR;
+ while (index != pairIndex)
+ {
+ previous = index;
+ index = m_next[index];
+ }
+
+ if (previous != BT_NULL_PAIR)
+ {
+ btAssert(m_next[previous] == pairIndex);
+ m_next[previous] = m_next[pairIndex];
+ }
+ else
+ {
+ m_hashTable[hash] = m_next[pairIndex];
+ }
+
+ // We now move the last pair into spot of the
+ // pair being removed. We need to fix the hash
+ // table indices to support the move.
+
+ int lastPairIndex = m_overlappingPairArray.size() - 1;
+
+ if (m_ghostPairCallback)
+ m_ghostPairCallback->removeOverlappingPair(proxy0, proxy1,dispatcher);
+
+ // If the removed pair is the last pair, we are done.
+ if (lastPairIndex == pairIndex)
+ {
+ m_overlappingPairArray.pop_back();
+ return userData;
+ }
+
+ // Remove the last pair from the hash table.
+ const btBroadphasePair* last = &m_overlappingPairArray[lastPairIndex];
+ /* missing swap here too, Nat. */
+ int lastHash = static_cast<int>(getHash(static_cast<unsigned int>(last->m_pProxy0->getUid()), static_cast<unsigned int>(last->m_pProxy1->getUid())) & (m_overlappingPairArray.capacity()-1));
+
+ index = m_hashTable[lastHash];
+ btAssert(index != BT_NULL_PAIR);
+
+ previous = BT_NULL_PAIR;
+ while (index != lastPairIndex)
+ {
+ previous = index;
+ index = m_next[index];
+ }
+
+ if (previous != BT_NULL_PAIR)
+ {
+ btAssert(m_next[previous] == lastPairIndex);
+ m_next[previous] = m_next[lastPairIndex];
+ }
+ else
+ {
+ m_hashTable[lastHash] = m_next[lastPairIndex];
+ }
+
+ // Copy the last pair into the remove pair's spot.
+ m_overlappingPairArray[pairIndex] = m_overlappingPairArray[lastPairIndex];
+
+ // Insert the last pair into the hash table
+ m_next[pairIndex] = m_hashTable[lastHash];
+ m_hashTable[lastHash] = pairIndex;
+
+ m_overlappingPairArray.pop_back();
+
+ return userData;
+}
+//#include <stdio.h>
+
+void btHashedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher)
+{
+
+ int i;
+
+// printf("m_overlappingPairArray.size()=%d\n",m_overlappingPairArray.size());
+ for (i=0;i<m_overlappingPairArray.size();)
+ {
+
+ btBroadphasePair* pair = &m_overlappingPairArray[i];
+ if (callback->processOverlap(*pair))
+ {
+ removeOverlappingPair(pair->m_pProxy0,pair->m_pProxy1,dispatcher);
+
+ gOverlappingPairs--;
+ } else
+ {
+ i++;
+ }
+ }
+}
+
+void btHashedOverlappingPairCache::sortOverlappingPairs(btDispatcher* dispatcher)
+{
+ ///need to keep hashmap in sync with pair address, so rebuild all
+ btBroadphasePairArray tmpPairs;
+ int i;
+ for (i=0;i<m_overlappingPairArray.size();i++)
+ {
+ tmpPairs.push_back(m_overlappingPairArray[i]);
+ }
+
+ for (i=0;i<tmpPairs.size();i++)
+ {
+ removeOverlappingPair(tmpPairs[i].m_pProxy0,tmpPairs[i].m_pProxy1,dispatcher);
+ }
+
+ for (i = 0; i < m_next.size(); i++)
+ {
+ m_next[i] = BT_NULL_PAIR;
+ }
+
+ tmpPairs.quickSort(btBroadphasePairSortPredicate());
+
+ for (i=0;i<tmpPairs.size();i++)
+ {
+ addOverlappingPair(tmpPairs[i].m_pProxy0,tmpPairs[i].m_pProxy1);
+ }
+
+
+}
+
+
+void* btSortedOverlappingPairCache::removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1, btDispatcher* dispatcher )
+{
+ if (!hasDeferredRemoval())
+ {
+ btBroadphasePair findPair(*proxy0,*proxy1);
+
+ int findIndex = m_overlappingPairArray.findLinearSearch(findPair);
+ if (findIndex < m_overlappingPairArray.size())
+ {
+ gOverlappingPairs--;
+ btBroadphasePair& pair = m_overlappingPairArray[findIndex];
+ void* userData = pair.m_internalInfo1;
+ cleanOverlappingPair(pair,dispatcher);
+ if (m_ghostPairCallback)
+ m_ghostPairCallback->removeOverlappingPair(proxy0, proxy1,dispatcher);
+
+ m_overlappingPairArray.swap(findIndex,m_overlappingPairArray.capacity()-1);
+ m_overlappingPairArray.pop_back();
+ return userData;
+ }
+ }
+
+ return 0;
+}
+
+
+
+
+
+
+
+
+btBroadphasePair* btSortedOverlappingPairCache::addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+{
+ //don't add overlap with own
+ btAssert(proxy0 != proxy1);
+
+ if (!needsBroadphaseCollision(proxy0,proxy1))
+ return 0;
+
+ void* mem = &m_overlappingPairArray.expandNonInitializing();
+ btBroadphasePair* pair = new (mem) btBroadphasePair(*proxy0,*proxy1);
+
+ gOverlappingPairs++;
+ gAddedPairs++;
+
+ if (m_ghostPairCallback)
+ m_ghostPairCallback->addOverlappingPair(proxy0, proxy1);
+ return pair;
+
+}
+
+///this findPair becomes really slow. Either sort the list to speedup the query, or
+///use a different solution. It is mainly used for Removing overlapping pairs. Removal could be delayed.
+///we could keep a linked list in each proxy, and store pair in one of the proxies (with lowest memory address)
+///Also we can use a 2D bitmap, which can be useful for a future GPU implementation
+ btBroadphasePair* btSortedOverlappingPairCache::findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+{
+ if (!needsBroadphaseCollision(proxy0,proxy1))
+ return 0;
+
+ btBroadphasePair tmpPair(*proxy0,*proxy1);
+ int findIndex = m_overlappingPairArray.findLinearSearch(tmpPair);
+
+ if (findIndex < m_overlappingPairArray.size())
+ {
+ //btAssert(it != m_overlappingPairSet.end());
+ btBroadphasePair* pair = &m_overlappingPairArray[findIndex];
+ return pair;
+ }
+ return 0;
+}
+
+
+
+
+
+
+
+
+
+
+//#include <stdio.h>
+
+void btSortedOverlappingPairCache::processAllOverlappingPairs(btOverlapCallback* callback,btDispatcher* dispatcher)
+{
+
+ int i;
+
+ for (i=0;i<m_overlappingPairArray.size();)
+ {
+
+ btBroadphasePair* pair = &m_overlappingPairArray[i];
+ if (callback->processOverlap(*pair))
+ {
+ cleanOverlappingPair(*pair,dispatcher);
+ pair->m_pProxy0 = 0;
+ pair->m_pProxy1 = 0;
+ m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
+ m_overlappingPairArray.pop_back();
+ gOverlappingPairs--;
+ } else
+ {
+ i++;
+ }
+ }
+}
+
+
+
+
+btSortedOverlappingPairCache::btSortedOverlappingPairCache():
+ m_blockedForChanges(false),
+ m_hasDeferredRemoval(true),
+ m_overlapFilterCallback(0),
+ m_ghostPairCallback(0)
+{
+ int initialAllocatedSize= 2;
+ m_overlappingPairArray.reserve(initialAllocatedSize);
+}
+
+btSortedOverlappingPairCache::~btSortedOverlappingPairCache()
+{
+}
+
+void btSortedOverlappingPairCache::cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher)
+{
+ if (pair.m_algorithm)
+ {
+ {
+ pair.m_algorithm->~btCollisionAlgorithm();
+ dispatcher->freeCollisionAlgorithm(pair.m_algorithm);
+ pair.m_algorithm=0;
+ gRemovePairs--;
+ }
+ }
+}
+
+
+void btSortedOverlappingPairCache::cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
+{
+
+ class CleanPairCallback : public btOverlapCallback
+ {
+ btBroadphaseProxy* m_cleanProxy;
+ btOverlappingPairCache* m_pairCache;
+ btDispatcher* m_dispatcher;
+
+ public:
+ CleanPairCallback(btBroadphaseProxy* cleanProxy,btOverlappingPairCache* pairCache,btDispatcher* dispatcher)
+ :m_cleanProxy(cleanProxy),
+ m_pairCache(pairCache),
+ m_dispatcher(dispatcher)
+ {
+ }
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ if ((pair.m_pProxy0 == m_cleanProxy) ||
+ (pair.m_pProxy1 == m_cleanProxy))
+ {
+ m_pairCache->cleanOverlappingPair(pair,m_dispatcher);
+ }
+ return false;
+ }
+
+ };
+
+ CleanPairCallback cleanPairs(proxy,this,dispatcher);
+
+ processAllOverlappingPairs(&cleanPairs,dispatcher);
+
+}
+
+
+void btSortedOverlappingPairCache::removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
+{
+
+ class RemovePairCallback : public btOverlapCallback
+ {
+ btBroadphaseProxy* m_obsoleteProxy;
+
+ public:
+ RemovePairCallback(btBroadphaseProxy* obsoleteProxy)
+ :m_obsoleteProxy(obsoleteProxy)
+ {
+ }
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ return ((pair.m_pProxy0 == m_obsoleteProxy) ||
+ (pair.m_pProxy1 == m_obsoleteProxy));
+ }
+
+ };
+
+ RemovePairCallback removeCallback(proxy);
+
+ processAllOverlappingPairs(&removeCallback,dispatcher);
+}
+
+void btSortedOverlappingPairCache::sortOverlappingPairs(btDispatcher* dispatcher)
+{
+ //should already be sorted
+}
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
new file mode 100644
index 00000000..7a3806c1
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCache.h
@@ -0,0 +1,469 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_OVERLAPPING_PAIR_CACHE_H
+#define BT_OVERLAPPING_PAIR_CACHE_H
+
+
+#include "btBroadphaseInterface.h"
+#include "btBroadphaseProxy.h"
+#include "btOverlappingPairCallback.h"
+
+#include "LinearMath/btAlignedObjectArray.h"
+class btDispatcher;
+
+typedef btAlignedObjectArray<btBroadphasePair> btBroadphasePairArray;
+
+struct btOverlapCallback
+{
+ virtual ~btOverlapCallback()
+ {}
+ //return true for deletion of the pair
+ virtual bool processOverlap(btBroadphasePair& pair) = 0;
+
+};
+
+struct btOverlapFilterCallback
+{
+ virtual ~btOverlapFilterCallback()
+ {}
+ // return true when pairs need collision
+ virtual bool needBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const = 0;
+};
+
+
+
+
+
+
+
+extern int gRemovePairs;
+extern int gAddedPairs;
+extern int gFindPairs;
+
+const int BT_NULL_PAIR=0xffffffff;
+
+///The btOverlappingPairCache provides an interface for overlapping pair management (add, remove, storage), used by the btBroadphaseInterface broadphases.
+///The btHashedOverlappingPairCache and btSortedOverlappingPairCache classes are two implementations.
+class btOverlappingPairCache : public btOverlappingPairCallback
+{
+public:
+ virtual ~btOverlappingPairCache() {} // this is needed so we can get to the derived class destructor
+
+ virtual btBroadphasePair* getOverlappingPairArrayPtr() = 0;
+
+ virtual const btBroadphasePair* getOverlappingPairArrayPtr() const = 0;
+
+ virtual btBroadphasePairArray& getOverlappingPairArray() = 0;
+
+ virtual void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher) = 0;
+
+ virtual int getNumOverlappingPairs() const = 0;
+
+ virtual void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher) = 0;
+
+ virtual void setOverlapFilterCallback(btOverlapFilterCallback* callback) = 0;
+
+ virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher) = 0;
+
+ virtual btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1) = 0;
+
+ virtual bool hasDeferredRemoval() = 0;
+
+ virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)=0;
+
+ virtual void sortOverlappingPairs(btDispatcher* dispatcher) = 0;
+
+
+};
+
+/// Hash-space based Pair Cache, thanks to Erin Catto, Box2D, http://www.box2d.org, and Pierre Terdiman, Codercorner, http://codercorner.com
+class btHashedOverlappingPairCache : public btOverlappingPairCache
+{
+ btBroadphasePairArray m_overlappingPairArray;
+ btOverlapFilterCallback* m_overlapFilterCallback;
+ bool m_blockedForChanges;
+
+
+public:
+ btHashedOverlappingPairCache();
+ virtual ~btHashedOverlappingPairCache();
+
+
+ void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+
+ virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher);
+
+ SIMD_FORCE_INLINE bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const
+ {
+ if (m_overlapFilterCallback)
+ return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1);
+
+ bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
+ collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
+
+ return collides;
+ }
+
+ // Add a pair and return the new pair. If the pair already exists,
+ // no new pair is created and the old one is returned.
+ virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+ {
+ gAddedPairs++;
+
+ if (!needsBroadphaseCollision(proxy0,proxy1))
+ return 0;
+
+ return internalAddPair(proxy0,proxy1);
+ }
+
+
+
+ void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+
+
+ virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher);
+
+ virtual btBroadphasePair* getOverlappingPairArrayPtr()
+ {
+ return &m_overlappingPairArray[0];
+ }
+
+ const btBroadphasePair* getOverlappingPairArrayPtr() const
+ {
+ return &m_overlappingPairArray[0];
+ }
+
+ btBroadphasePairArray& getOverlappingPairArray()
+ {
+ return m_overlappingPairArray;
+ }
+
+ const btBroadphasePairArray& getOverlappingPairArray() const
+ {
+ return m_overlappingPairArray;
+ }
+
+ void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher);
+
+
+
+ btBroadphasePair* findPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1);
+
+ int GetCount() const { return m_overlappingPairArray.size(); }
+// btBroadphasePair* GetPairs() { return m_pairs; }
+
+ btOverlapFilterCallback* getOverlapFilterCallback()
+ {
+ return m_overlapFilterCallback;
+ }
+
+ void setOverlapFilterCallback(btOverlapFilterCallback* callback)
+ {
+ m_overlapFilterCallback = callback;
+ }
+
+ int getNumOverlappingPairs() const
+ {
+ return m_overlappingPairArray.size();
+ }
+private:
+
+ btBroadphasePair* internalAddPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
+
+ void growTables();
+
+ SIMD_FORCE_INLINE bool equalsPair(const btBroadphasePair& pair, int proxyId1, int proxyId2)
+ {
+ return pair.m_pProxy0->getUid() == proxyId1 && pair.m_pProxy1->getUid() == proxyId2;
+ }
+
+ /*
+ // Thomas Wang's hash, see: http://www.concentric.net/~Ttwang/tech/inthash.htm
+ // This assumes proxyId1 and proxyId2 are 16-bit.
+ SIMD_FORCE_INLINE int getHash(int proxyId1, int proxyId2)
+ {
+ int key = (proxyId2 << 16) | proxyId1;
+ key = ~key + (key << 15);
+ key = key ^ (key >> 12);
+ key = key + (key << 2);
+ key = key ^ (key >> 4);
+ key = key * 2057;
+ key = key ^ (key >> 16);
+ return key;
+ }
+ */
+
+
+
+ SIMD_FORCE_INLINE unsigned int getHash(unsigned int proxyId1, unsigned int proxyId2)
+ {
+ int key = static_cast<int>(((unsigned int)proxyId1) | (((unsigned int)proxyId2) <<16));
+ // Thomas Wang's hash
+
+ key += ~(key << 15);
+ key ^= (key >> 10);
+ key += (key << 3);
+ key ^= (key >> 6);
+ key += ~(key << 11);
+ key ^= (key >> 16);
+ return static_cast<unsigned int>(key);
+ }
+
+
+
+
+
+ SIMD_FORCE_INLINE btBroadphasePair* internalFindPair(btBroadphaseProxy* proxy0, btBroadphaseProxy* proxy1, int hash)
+ {
+ int proxyId1 = proxy0->getUid();
+ int proxyId2 = proxy1->getUid();
+ #if 0 // wrong, 'equalsPair' use unsorted uids, copy-past devil striked again. Nat.
+ if (proxyId1 > proxyId2)
+ btSwap(proxyId1, proxyId2);
+ #endif
+
+ int index = m_hashTable[hash];
+
+ while( index != BT_NULL_PAIR && equalsPair(m_overlappingPairArray[index], proxyId1, proxyId2) == false)
+ {
+ index = m_next[index];
+ }
+
+ if ( index == BT_NULL_PAIR )
+ {
+ return NULL;
+ }
+
+ btAssert(index < m_overlappingPairArray.size());
+
+ return &m_overlappingPairArray[index];
+ }
+
+ virtual bool hasDeferredRemoval()
+ {
+ return false;
+ }
+
+ virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)
+ {
+ m_ghostPairCallback = ghostPairCallback;
+ }
+
+ virtual void sortOverlappingPairs(btDispatcher* dispatcher);
+
+
+protected:
+
+ btAlignedObjectArray<int> m_hashTable;
+ btAlignedObjectArray<int> m_next;
+ btOverlappingPairCallback* m_ghostPairCallback;
+
+};
+
+
+
+
+///btSortedOverlappingPairCache maintains the objects with overlapping AABB
+///Typically managed by the Broadphase, Axis3Sweep or btSimpleBroadphase
+class btSortedOverlappingPairCache : public btOverlappingPairCache
+{
+ protected:
+ //avoid brute-force finding all the time
+ btBroadphasePairArray m_overlappingPairArray;
+
+ //during the dispatch, check that user doesn't destroy/create proxy
+ bool m_blockedForChanges;
+
+ ///by default, do the removal during the pair traversal
+ bool m_hasDeferredRemoval;
+
+ //if set, use the callback instead of the built in filter in needBroadphaseCollision
+ btOverlapFilterCallback* m_overlapFilterCallback;
+
+ btOverlappingPairCallback* m_ghostPairCallback;
+
+ public:
+
+ btSortedOverlappingPairCache();
+ virtual ~btSortedOverlappingPairCache();
+
+ virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* dispatcher);
+
+ void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher);
+
+ void cleanOverlappingPair(btBroadphasePair& pair,btDispatcher* dispatcher);
+
+ btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
+
+ btBroadphasePair* findPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
+
+
+ void cleanProxyFromPairs(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+
+ void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+
+
+ inline bool needsBroadphaseCollision(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) const
+ {
+ if (m_overlapFilterCallback)
+ return m_overlapFilterCallback->needBroadphaseCollision(proxy0,proxy1);
+
+ bool collides = (proxy0->m_collisionFilterGroup & proxy1->m_collisionFilterMask) != 0;
+ collides = collides && (proxy1->m_collisionFilterGroup & proxy0->m_collisionFilterMask);
+
+ return collides;
+ }
+
+ btBroadphasePairArray& getOverlappingPairArray()
+ {
+ return m_overlappingPairArray;
+ }
+
+ const btBroadphasePairArray& getOverlappingPairArray() const
+ {
+ return m_overlappingPairArray;
+ }
+
+
+
+
+ btBroadphasePair* getOverlappingPairArrayPtr()
+ {
+ return &m_overlappingPairArray[0];
+ }
+
+ const btBroadphasePair* getOverlappingPairArrayPtr() const
+ {
+ return &m_overlappingPairArray[0];
+ }
+
+ int getNumOverlappingPairs() const
+ {
+ return m_overlappingPairArray.size();
+ }
+
+ btOverlapFilterCallback* getOverlapFilterCallback()
+ {
+ return m_overlapFilterCallback;
+ }
+
+ void setOverlapFilterCallback(btOverlapFilterCallback* callback)
+ {
+ m_overlapFilterCallback = callback;
+ }
+
+ virtual bool hasDeferredRemoval()
+ {
+ return m_hasDeferredRemoval;
+ }
+
+ virtual void setInternalGhostPairCallback(btOverlappingPairCallback* ghostPairCallback)
+ {
+ m_ghostPairCallback = ghostPairCallback;
+ }
+
+ virtual void sortOverlappingPairs(btDispatcher* dispatcher);
+
+
+};
+
+
+
+///btNullPairCache skips add/removal of overlapping pairs. Userful for benchmarking and unit testing.
+class btNullPairCache : public btOverlappingPairCache
+{
+
+ btBroadphasePairArray m_overlappingPairArray;
+
+public:
+
+ virtual btBroadphasePair* getOverlappingPairArrayPtr()
+ {
+ return &m_overlappingPairArray[0];
+ }
+ const btBroadphasePair* getOverlappingPairArrayPtr() const
+ {
+ return &m_overlappingPairArray[0];
+ }
+ btBroadphasePairArray& getOverlappingPairArray()
+ {
+ return m_overlappingPairArray;
+ }
+
+ virtual void cleanOverlappingPair(btBroadphasePair& /*pair*/,btDispatcher* /*dispatcher*/)
+ {
+
+ }
+
+ virtual int getNumOverlappingPairs() const
+ {
+ return 0;
+ }
+
+ virtual void cleanProxyFromPairs(btBroadphaseProxy* /*proxy*/,btDispatcher* /*dispatcher*/)
+ {
+
+ }
+
+ virtual void setOverlapFilterCallback(btOverlapFilterCallback* /*callback*/)
+ {
+ }
+
+ virtual void processAllOverlappingPairs(btOverlapCallback*,btDispatcher* /*dispatcher*/)
+ {
+ }
+
+ virtual btBroadphasePair* findPair(btBroadphaseProxy* /*proxy0*/, btBroadphaseProxy* /*proxy1*/)
+ {
+ return 0;
+ }
+
+ virtual bool hasDeferredRemoval()
+ {
+ return true;
+ }
+
+ virtual void setInternalGhostPairCallback(btOverlappingPairCallback* /* ghostPairCallback */)
+ {
+
+ }
+
+ virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* /*proxy0*/,btBroadphaseProxy* /*proxy1*/)
+ {
+ return 0;
+ }
+
+ virtual void* removeOverlappingPair(btBroadphaseProxy* /*proxy0*/,btBroadphaseProxy* /*proxy1*/,btDispatcher* /*dispatcher*/)
+ {
+ return 0;
+ }
+
+ virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* /*proxy0*/,btDispatcher* /*dispatcher*/)
+ {
+ }
+
+ virtual void sortOverlappingPairs(btDispatcher* dispatcher)
+ {
+ (void) dispatcher;
+ }
+
+
+};
+
+
+#endif //BT_OVERLAPPING_PAIR_CACHE_H
+
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h
new file mode 100644
index 00000000..9c7b6f81
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h
@@ -0,0 +1,40 @@
+
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef OVERLAPPING_PAIR_CALLBACK_H
+#define OVERLAPPING_PAIR_CALLBACK_H
+
+class btDispatcher;
+struct btBroadphasePair;
+
+///The btOverlappingPairCallback class is an additional optional broadphase user callback for adding/removing overlapping pairs, similar interface to btOverlappingPairCache.
+class btOverlappingPairCallback
+{
+public:
+ virtual ~btOverlappingPairCallback()
+ {
+
+ }
+
+ virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1) = 0;
+
+ virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher) = 0;
+
+ virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* proxy0,btDispatcher* dispatcher) = 0;
+
+};
+
+#endif //OVERLAPPING_PAIR_CALLBACK_H
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
new file mode 100644
index 00000000..c911435a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
@@ -0,0 +1,1375 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btQuantizedBvh.h"
+
+#include "LinearMath/btAabbUtil2.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "LinearMath/btSerializer.h"
+
+#define RAYAABB2
+
+btQuantizedBvh::btQuantizedBvh() :
+ m_bulletVersion(BT_BULLET_VERSION),
+ m_useQuantization(false),
+ //m_traversalMode(TRAVERSAL_STACKLESS_CACHE_FRIENDLY)
+ m_traversalMode(TRAVERSAL_STACKLESS)
+ //m_traversalMode(TRAVERSAL_RECURSIVE)
+ ,m_subtreeHeaderCount(0) //PCK: add this line
+{
+ m_bvhAabbMin.setValue(-SIMD_INFINITY,-SIMD_INFINITY,-SIMD_INFINITY);
+ m_bvhAabbMax.setValue(SIMD_INFINITY,SIMD_INFINITY,SIMD_INFINITY);
+}
+
+
+
+
+
+void btQuantizedBvh::buildInternal()
+{
+ ///assumes that caller filled in the m_quantizedLeafNodes
+ m_useQuantization = true;
+ int numLeafNodes = 0;
+
+ if (m_useQuantization)
+ {
+ //now we have an array of leafnodes in m_leafNodes
+ numLeafNodes = m_quantizedLeafNodes.size();
+
+ m_quantizedContiguousNodes.resize(2*numLeafNodes);
+
+ }
+
+ m_curNodeIndex = 0;
+
+ buildTree(0,numLeafNodes);
+
+ ///if the entire tree is small then subtree size, we need to create a header info for the tree
+ if(m_useQuantization && !m_SubtreeHeaders.size())
+ {
+ btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand();
+ subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[0]);
+ subtree.m_rootNodeIndex = 0;
+ subtree.m_subtreeSize = m_quantizedContiguousNodes[0].isLeafNode() ? 1 : m_quantizedContiguousNodes[0].getEscapeIndex();
+ }
+
+ //PCK: update the copy of the size
+ m_subtreeHeaderCount = m_SubtreeHeaders.size();
+
+ //PCK: clear m_quantizedLeafNodes and m_leafNodes, they are temporary
+ m_quantizedLeafNodes.clear();
+ m_leafNodes.clear();
+}
+
+
+
+///just for debugging, to visualize the individual patches/subtrees
+#ifdef DEBUG_PATCH_COLORS
+btVector3 color[4]=
+{
+ btVector3(1,0,0),
+ btVector3(0,1,0),
+ btVector3(0,0,1),
+ btVector3(0,1,1)
+};
+#endif //DEBUG_PATCH_COLORS
+
+
+
+void btQuantizedBvh::setQuantizationValues(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,btScalar quantizationMargin)
+{
+ //enlarge the AABB to avoid division by zero when initializing the quantization values
+ btVector3 clampValue(quantizationMargin,quantizationMargin,quantizationMargin);
+ m_bvhAabbMin = bvhAabbMin - clampValue;
+ m_bvhAabbMax = bvhAabbMax + clampValue;
+ btVector3 aabbSize = m_bvhAabbMax - m_bvhAabbMin;
+ m_bvhQuantization = btVector3(btScalar(65533.0),btScalar(65533.0),btScalar(65533.0)) / aabbSize;
+ m_useQuantization = true;
+}
+
+
+
+
+btQuantizedBvh::~btQuantizedBvh()
+{
+}
+
+#ifdef DEBUG_TREE_BUILDING
+int gStackDepth = 0;
+int gMaxStackDepth = 0;
+#endif //DEBUG_TREE_BUILDING
+
+void btQuantizedBvh::buildTree (int startIndex,int endIndex)
+{
+#ifdef DEBUG_TREE_BUILDING
+ gStackDepth++;
+ if (gStackDepth > gMaxStackDepth)
+ gMaxStackDepth = gStackDepth;
+#endif //DEBUG_TREE_BUILDING
+
+
+ int splitAxis, splitIndex, i;
+ int numIndices =endIndex-startIndex;
+ int curIndex = m_curNodeIndex;
+
+ btAssert(numIndices>0);
+
+ if (numIndices==1)
+ {
+#ifdef DEBUG_TREE_BUILDING
+ gStackDepth--;
+#endif //DEBUG_TREE_BUILDING
+
+ assignInternalNodeFromLeafNode(m_curNodeIndex,startIndex);
+
+ m_curNodeIndex++;
+ return;
+ }
+ //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'.
+
+ splitAxis = calcSplittingAxis(startIndex,endIndex);
+
+ splitIndex = sortAndCalcSplittingIndex(startIndex,endIndex,splitAxis);
+
+ int internalNodeIndex = m_curNodeIndex;
+
+ //set the min aabb to 'inf' or a max value, and set the max aabb to a -inf/minimum value.
+ //the aabb will be expanded during buildTree/mergeInternalNodeAabb with actual node values
+ setInternalNodeAabbMin(m_curNodeIndex,m_bvhAabbMax);//can't use btVector3(SIMD_INFINITY,SIMD_INFINITY,SIMD_INFINITY)) because of quantization
+ setInternalNodeAabbMax(m_curNodeIndex,m_bvhAabbMin);//can't use btVector3(-SIMD_INFINITY,-SIMD_INFINITY,-SIMD_INFINITY)) because of quantization
+
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ mergeInternalNodeAabb(m_curNodeIndex,getAabbMin(i),getAabbMax(i));
+ }
+
+ m_curNodeIndex++;
+
+
+ //internalNode->m_escapeIndex;
+
+ int leftChildNodexIndex = m_curNodeIndex;
+
+ //build left child tree
+ buildTree(startIndex,splitIndex);
+
+ int rightChildNodexIndex = m_curNodeIndex;
+ //build right child tree
+ buildTree(splitIndex,endIndex);
+
+#ifdef DEBUG_TREE_BUILDING
+ gStackDepth--;
+#endif //DEBUG_TREE_BUILDING
+
+ int escapeIndex = m_curNodeIndex - curIndex;
+
+ if (m_useQuantization)
+ {
+ //escapeIndex is the number of nodes of this subtree
+ const int sizeQuantizedNode =sizeof(btQuantizedBvhNode);
+ const int treeSizeInBytes = escapeIndex * sizeQuantizedNode;
+ if (treeSizeInBytes > MAX_SUBTREE_SIZE_IN_BYTES)
+ {
+ updateSubtreeHeaders(leftChildNodexIndex,rightChildNodexIndex);
+ }
+ } else
+ {
+
+ }
+
+ setInternalNodeEscapeIndex(internalNodeIndex,escapeIndex);
+
+}
+
+void btQuantizedBvh::updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex)
+{
+ btAssert(m_useQuantization);
+
+ btQuantizedBvhNode& leftChildNode = m_quantizedContiguousNodes[leftChildNodexIndex];
+ int leftSubTreeSize = leftChildNode.isLeafNode() ? 1 : leftChildNode.getEscapeIndex();
+ int leftSubTreeSizeInBytes = leftSubTreeSize * static_cast<int>(sizeof(btQuantizedBvhNode));
+
+ btQuantizedBvhNode& rightChildNode = m_quantizedContiguousNodes[rightChildNodexIndex];
+ int rightSubTreeSize = rightChildNode.isLeafNode() ? 1 : rightChildNode.getEscapeIndex();
+ int rightSubTreeSizeInBytes = rightSubTreeSize * static_cast<int>(sizeof(btQuantizedBvhNode));
+
+ if(leftSubTreeSizeInBytes <= MAX_SUBTREE_SIZE_IN_BYTES)
+ {
+ btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand();
+ subtree.setAabbFromQuantizeNode(leftChildNode);
+ subtree.m_rootNodeIndex = leftChildNodexIndex;
+ subtree.m_subtreeSize = leftSubTreeSize;
+ }
+
+ if(rightSubTreeSizeInBytes <= MAX_SUBTREE_SIZE_IN_BYTES)
+ {
+ btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand();
+ subtree.setAabbFromQuantizeNode(rightChildNode);
+ subtree.m_rootNodeIndex = rightChildNodexIndex;
+ subtree.m_subtreeSize = rightSubTreeSize;
+ }
+
+ //PCK: update the copy of the size
+ m_subtreeHeaderCount = m_SubtreeHeaders.size();
+}
+
+
+int btQuantizedBvh::sortAndCalcSplittingIndex(int startIndex,int endIndex,int splitAxis)
+{
+ int i;
+ int splitIndex =startIndex;
+ int numIndices = endIndex - startIndex;
+ btScalar splitValue;
+
+ btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.));
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(getAabbMax(i)+getAabbMin(i));
+ means+=center;
+ }
+ means *= (btScalar(1.)/(btScalar)numIndices);
+
+ splitValue = means[splitAxis];
+
+ //sort leafNodes so all values larger then splitValue comes first, and smaller values start from 'splitIndex'.
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(getAabbMax(i)+getAabbMin(i));
+ if (center[splitAxis] > splitValue)
+ {
+ //swap
+ swapLeafNodes(i,splitIndex);
+ splitIndex++;
+ }
+ }
+
+ //if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex
+ //otherwise the tree-building might fail due to stack-overflows in certain cases.
+ //unbalanced1 is unsafe: it can cause stack overflows
+ //bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1)));
+
+ //unbalanced2 should work too: always use center (perfect balanced trees)
+ //bool unbalanced2 = true;
+
+ //this should be safe too:
+ int rangeBalancedIndices = numIndices/3;
+ bool unbalanced = ((splitIndex<=(startIndex+rangeBalancedIndices)) || (splitIndex >=(endIndex-1-rangeBalancedIndices)));
+
+ if (unbalanced)
+ {
+ splitIndex = startIndex+ (numIndices>>1);
+ }
+
+ bool unbal = (splitIndex==startIndex) || (splitIndex == (endIndex));
+ (void)unbal;
+ btAssert(!unbal);
+
+ return splitIndex;
+}
+
+
+int btQuantizedBvh::calcSplittingAxis(int startIndex,int endIndex)
+{
+ int i;
+
+ btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.));
+ btVector3 variance(btScalar(0.),btScalar(0.),btScalar(0.));
+ int numIndices = endIndex-startIndex;
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(getAabbMax(i)+getAabbMin(i));
+ means+=center;
+ }
+ means *= (btScalar(1.)/(btScalar)numIndices);
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(getAabbMax(i)+getAabbMin(i));
+ btVector3 diff2 = center-means;
+ diff2 = diff2 * diff2;
+ variance += diff2;
+ }
+ variance *= (btScalar(1.)/ ((btScalar)numIndices-1) );
+
+ return variance.maxAxis();
+}
+
+
+
+void btQuantizedBvh::reportAabbOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ //either choose recursive traversal (walkTree) or stackless (walkStacklessTree)
+
+ if (m_useQuantization)
+ {
+ ///quantize query AABB
+ unsigned short int quantizedQueryAabbMin[3];
+ unsigned short int quantizedQueryAabbMax[3];
+ quantizeWithClamp(quantizedQueryAabbMin,aabbMin,0);
+ quantizeWithClamp(quantizedQueryAabbMax,aabbMax,1);
+
+ switch (m_traversalMode)
+ {
+ case TRAVERSAL_STACKLESS:
+ walkStacklessQuantizedTree(nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax,0,m_curNodeIndex);
+ break;
+ case TRAVERSAL_STACKLESS_CACHE_FRIENDLY:
+ walkStacklessQuantizedTreeCacheFriendly(nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax);
+ break;
+ case TRAVERSAL_RECURSIVE:
+ {
+ const btQuantizedBvhNode* rootNode = &m_quantizedContiguousNodes[0];
+ walkRecursiveQuantizedTreeAgainstQueryAabb(rootNode,nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax);
+ }
+ break;
+ default:
+ //unsupported
+ btAssert(0);
+ }
+ } else
+ {
+ walkStacklessTree(nodeCallback,aabbMin,aabbMax);
+ }
+}
+
+
+int maxIterations = 0;
+
+
+void btQuantizedBvh::walkStacklessTree(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ btAssert(!m_useQuantization);
+
+ const btOptimizedBvhNode* rootNode = &m_contiguousNodes[0];
+ int escapeIndex, curIndex = 0;
+ int walkIterations = 0;
+ bool isLeafNode;
+ //PCK: unsigned instead of bool
+ unsigned aabbOverlap;
+
+ while (curIndex < m_curNodeIndex)
+ {
+ //catch bugs in tree data
+ btAssert (walkIterations < m_curNodeIndex);
+
+ walkIterations++;
+ aabbOverlap = TestAabbAgainstAabb2(aabbMin,aabbMax,rootNode->m_aabbMinOrg,rootNode->m_aabbMaxOrg);
+ isLeafNode = rootNode->m_escapeIndex == -1;
+
+ //PCK: unsigned instead of bool
+ if (isLeafNode && (aabbOverlap != 0))
+ {
+ nodeCallback->processNode(rootNode->m_subPart,rootNode->m_triangleIndex);
+ }
+
+ //PCK: unsigned instead of bool
+ if ((aabbOverlap != 0) || isLeafNode)
+ {
+ rootNode++;
+ curIndex++;
+ } else
+ {
+ escapeIndex = rootNode->m_escapeIndex;
+ rootNode += escapeIndex;
+ curIndex += escapeIndex;
+ }
+ }
+ if (maxIterations < walkIterations)
+ maxIterations = walkIterations;
+
+}
+
+/*
+///this was the original recursive traversal, before we optimized towards stackless traversal
+void btQuantizedBvh::walkTree(btOptimizedBvhNode* rootNode,btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ bool isLeafNode, aabbOverlap = TestAabbAgainstAabb2(aabbMin,aabbMax,rootNode->m_aabbMin,rootNode->m_aabbMax);
+ if (aabbOverlap)
+ {
+ isLeafNode = (!rootNode->m_leftChild && !rootNode->m_rightChild);
+ if (isLeafNode)
+ {
+ nodeCallback->processNode(rootNode);
+ } else
+ {
+ walkTree(rootNode->m_leftChild,nodeCallback,aabbMin,aabbMax);
+ walkTree(rootNode->m_rightChild,nodeCallback,aabbMin,aabbMax);
+ }
+ }
+
+}
+*/
+
+void btQuantizedBvh::walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantizedBvhNode* currentNode,btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const
+{
+ btAssert(m_useQuantization);
+
+ bool isLeafNode;
+ //PCK: unsigned instead of bool
+ unsigned aabbOverlap;
+
+ //PCK: unsigned instead of bool
+ aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,currentNode->m_quantizedAabbMin,currentNode->m_quantizedAabbMax);
+ isLeafNode = currentNode->isLeafNode();
+
+ //PCK: unsigned instead of bool
+ if (aabbOverlap != 0)
+ {
+ if (isLeafNode)
+ {
+ nodeCallback->processNode(currentNode->getPartId(),currentNode->getTriangleIndex());
+ } else
+ {
+ //process left and right children
+ const btQuantizedBvhNode* leftChildNode = currentNode+1;
+ walkRecursiveQuantizedTreeAgainstQueryAabb(leftChildNode,nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax);
+
+ const btQuantizedBvhNode* rightChildNode = leftChildNode->isLeafNode() ? leftChildNode+1:leftChildNode+leftChildNode->getEscapeIndex();
+ walkRecursiveQuantizedTreeAgainstQueryAabb(rightChildNode,nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax);
+ }
+ }
+}
+
+
+
+void btQuantizedBvh::walkStacklessTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const
+{
+ btAssert(!m_useQuantization);
+
+ const btOptimizedBvhNode* rootNode = &m_contiguousNodes[0];
+ int escapeIndex, curIndex = 0;
+ int walkIterations = 0;
+ bool isLeafNode;
+ //PCK: unsigned instead of bool
+ unsigned aabbOverlap=0;
+ unsigned rayBoxOverlap=0;
+ btScalar lambda_max = 1.0;
+
+ /* Quick pruning by quantized box */
+ btVector3 rayAabbMin = raySource;
+ btVector3 rayAabbMax = raySource;
+ rayAabbMin.setMin(rayTarget);
+ rayAabbMax.setMax(rayTarget);
+
+ /* Add box cast extents to bounding box */
+ rayAabbMin += aabbMin;
+ rayAabbMax += aabbMax;
+
+#ifdef RAYAABB2
+ btVector3 rayDir = (rayTarget-raySource);
+ rayDir.normalize ();
+ lambda_max = rayDir.dot(rayTarget-raySource);
+ ///what about division by zero? --> just set rayDirection[i] to 1.0
+ btVector3 rayDirectionInverse;
+ rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[0];
+ rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[1];
+ rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[2];
+ unsigned int sign[3] = { rayDirectionInverse[0] < 0.0, rayDirectionInverse[1] < 0.0, rayDirectionInverse[2] < 0.0};
+#endif
+
+ btVector3 bounds[2];
+
+ while (curIndex < m_curNodeIndex)
+ {
+ btScalar param = 1.0;
+ //catch bugs in tree data
+ btAssert (walkIterations < m_curNodeIndex);
+
+ walkIterations++;
+
+ bounds[0] = rootNode->m_aabbMinOrg;
+ bounds[1] = rootNode->m_aabbMaxOrg;
+ /* Add box cast extents */
+ bounds[0] -= aabbMax;
+ bounds[1] -= aabbMin;
+
+ aabbOverlap = TestAabbAgainstAabb2(rayAabbMin,rayAabbMax,rootNode->m_aabbMinOrg,rootNode->m_aabbMaxOrg);
+ //perhaps profile if it is worth doing the aabbOverlap test first
+
+#ifdef RAYAABB2
+ ///careful with this check: need to check division by zero (above) and fix the unQuantize method
+ ///thanks Joerg/hiker for the reproduction case!
+ ///http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1858
+ rayBoxOverlap = aabbOverlap ? btRayAabb2 (raySource, rayDirectionInverse, sign, bounds, param, 0.0f, lambda_max) : false;
+
+#else
+ btVector3 normal;
+ rayBoxOverlap = btRayAabb(raySource, rayTarget,bounds[0],bounds[1],param, normal);
+#endif
+
+ isLeafNode = rootNode->m_escapeIndex == -1;
+
+ //PCK: unsigned instead of bool
+ if (isLeafNode && (rayBoxOverlap != 0))
+ {
+ nodeCallback->processNode(rootNode->m_subPart,rootNode->m_triangleIndex);
+ }
+
+ //PCK: unsigned instead of bool
+ if ((rayBoxOverlap != 0) || isLeafNode)
+ {
+ rootNode++;
+ curIndex++;
+ } else
+ {
+ escapeIndex = rootNode->m_escapeIndex;
+ rootNode += escapeIndex;
+ curIndex += escapeIndex;
+ }
+ }
+ if (maxIterations < walkIterations)
+ maxIterations = walkIterations;
+
+}
+
+
+
+void btQuantizedBvh::walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const
+{
+ btAssert(m_useQuantization);
+
+ int curIndex = startNodeIndex;
+ int walkIterations = 0;
+ int subTreeSize = endNodeIndex - startNodeIndex;
+ (void)subTreeSize;
+
+ const btQuantizedBvhNode* rootNode = &m_quantizedContiguousNodes[startNodeIndex];
+ int escapeIndex;
+
+ bool isLeafNode;
+ //PCK: unsigned instead of bool
+ unsigned boxBoxOverlap = 0;
+ unsigned rayBoxOverlap = 0;
+
+ btScalar lambda_max = 1.0;
+
+#ifdef RAYAABB2
+ btVector3 rayDirection = (rayTarget-raySource);
+ rayDirection.normalize ();
+ lambda_max = rayDirection.dot(rayTarget-raySource);
+ ///what about division by zero? --> just set rayDirection[i] to 1.0
+ rayDirection[0] = rayDirection[0] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDirection[0];
+ rayDirection[1] = rayDirection[1] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDirection[1];
+ rayDirection[2] = rayDirection[2] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDirection[2];
+ unsigned int sign[3] = { rayDirection[0] < 0.0, rayDirection[1] < 0.0, rayDirection[2] < 0.0};
+#endif
+
+ /* Quick pruning by quantized box */
+ btVector3 rayAabbMin = raySource;
+ btVector3 rayAabbMax = raySource;
+ rayAabbMin.setMin(rayTarget);
+ rayAabbMax.setMax(rayTarget);
+
+ /* Add box cast extents to bounding box */
+ rayAabbMin += aabbMin;
+ rayAabbMax += aabbMax;
+
+ unsigned short int quantizedQueryAabbMin[3];
+ unsigned short int quantizedQueryAabbMax[3];
+ quantizeWithClamp(quantizedQueryAabbMin,rayAabbMin,0);
+ quantizeWithClamp(quantizedQueryAabbMax,rayAabbMax,1);
+
+ while (curIndex < endNodeIndex)
+ {
+
+//#define VISUALLY_ANALYZE_BVH 1
+#ifdef VISUALLY_ANALYZE_BVH
+ //some code snippet to debugDraw aabb, to visually analyze bvh structure
+ static int drawPatch = 0;
+ //need some global access to a debugDrawer
+ extern btIDebugDraw* debugDrawerPtr;
+ if (curIndex==drawPatch)
+ {
+ btVector3 aabbMin,aabbMax;
+ aabbMin = unQuantize(rootNode->m_quantizedAabbMin);
+ aabbMax = unQuantize(rootNode->m_quantizedAabbMax);
+ btVector3 color(1,0,0);
+ debugDrawerPtr->drawAabb(aabbMin,aabbMax,color);
+ }
+#endif//VISUALLY_ANALYZE_BVH
+
+ //catch bugs in tree data
+ btAssert (walkIterations < subTreeSize);
+
+ walkIterations++;
+ //PCK: unsigned instead of bool
+ // only interested if this is closer than any previous hit
+ btScalar param = 1.0;
+ rayBoxOverlap = 0;
+ boxBoxOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,rootNode->m_quantizedAabbMin,rootNode->m_quantizedAabbMax);
+ isLeafNode = rootNode->isLeafNode();
+ if (boxBoxOverlap)
+ {
+ btVector3 bounds[2];
+ bounds[0] = unQuantize(rootNode->m_quantizedAabbMin);
+ bounds[1] = unQuantize(rootNode->m_quantizedAabbMax);
+ /* Add box cast extents */
+ bounds[0] -= aabbMax;
+ bounds[1] -= aabbMin;
+ btVector3 normal;
+#if 0
+ bool ra2 = btRayAabb2 (raySource, rayDirection, sign, bounds, param, 0.0, lambda_max);
+ bool ra = btRayAabb (raySource, rayTarget, bounds[0], bounds[1], param, normal);
+ if (ra2 != ra)
+ {
+ printf("functions don't match\n");
+ }
+#endif
+#ifdef RAYAABB2
+ ///careful with this check: need to check division by zero (above) and fix the unQuantize method
+ ///thanks Joerg/hiker for the reproduction case!
+ ///http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=9&t=1858
+
+ //BT_PROFILE("btRayAabb2");
+ rayBoxOverlap = btRayAabb2 (raySource, rayDirection, sign, bounds, param, 0.0f, lambda_max);
+
+#else
+ rayBoxOverlap = true;//btRayAabb(raySource, rayTarget, bounds[0], bounds[1], param, normal);
+#endif
+ }
+
+ if (isLeafNode && rayBoxOverlap)
+ {
+ nodeCallback->processNode(rootNode->getPartId(),rootNode->getTriangleIndex());
+ }
+
+ //PCK: unsigned instead of bool
+ if ((rayBoxOverlap != 0) || isLeafNode)
+ {
+ rootNode++;
+ curIndex++;
+ } else
+ {
+ escapeIndex = rootNode->getEscapeIndex();
+ rootNode += escapeIndex;
+ curIndex += escapeIndex;
+ }
+ }
+ if (maxIterations < walkIterations)
+ maxIterations = walkIterations;
+
+}
+
+void btQuantizedBvh::walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const
+{
+ btAssert(m_useQuantization);
+
+ int curIndex = startNodeIndex;
+ int walkIterations = 0;
+ int subTreeSize = endNodeIndex - startNodeIndex;
+ (void)subTreeSize;
+
+ const btQuantizedBvhNode* rootNode = &m_quantizedContiguousNodes[startNodeIndex];
+ int escapeIndex;
+
+ bool isLeafNode;
+ //PCK: unsigned instead of bool
+ unsigned aabbOverlap;
+
+ while (curIndex < endNodeIndex)
+ {
+
+//#define VISUALLY_ANALYZE_BVH 1
+#ifdef VISUALLY_ANALYZE_BVH
+ //some code snippet to debugDraw aabb, to visually analyze bvh structure
+ static int drawPatch = 0;
+ //need some global access to a debugDrawer
+ extern btIDebugDraw* debugDrawerPtr;
+ if (curIndex==drawPatch)
+ {
+ btVector3 aabbMin,aabbMax;
+ aabbMin = unQuantize(rootNode->m_quantizedAabbMin);
+ aabbMax = unQuantize(rootNode->m_quantizedAabbMax);
+ btVector3 color(1,0,0);
+ debugDrawerPtr->drawAabb(aabbMin,aabbMax,color);
+ }
+#endif//VISUALLY_ANALYZE_BVH
+
+ //catch bugs in tree data
+ btAssert (walkIterations < subTreeSize);
+
+ walkIterations++;
+ //PCK: unsigned instead of bool
+ aabbOverlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,rootNode->m_quantizedAabbMin,rootNode->m_quantizedAabbMax);
+ isLeafNode = rootNode->isLeafNode();
+
+ if (isLeafNode && aabbOverlap)
+ {
+ nodeCallback->processNode(rootNode->getPartId(),rootNode->getTriangleIndex());
+ }
+
+ //PCK: unsigned instead of bool
+ if ((aabbOverlap != 0) || isLeafNode)
+ {
+ rootNode++;
+ curIndex++;
+ } else
+ {
+ escapeIndex = rootNode->getEscapeIndex();
+ rootNode += escapeIndex;
+ curIndex += escapeIndex;
+ }
+ }
+ if (maxIterations < walkIterations)
+ maxIterations = walkIterations;
+
+}
+
+//This traversal can be called from Playstation 3 SPU
+void btQuantizedBvh::walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const
+{
+ btAssert(m_useQuantization);
+
+ int i;
+
+
+ for (i=0;i<this->m_SubtreeHeaders.size();i++)
+ {
+ const btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i];
+
+ //PCK: unsigned instead of bool
+ unsigned overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax);
+ if (overlap != 0)
+ {
+ walkStacklessQuantizedTree(nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax,
+ subtree.m_rootNodeIndex,
+ subtree.m_rootNodeIndex+subtree.m_subtreeSize);
+ }
+ }
+}
+
+
+void btQuantizedBvh::reportRayOverlappingNodex (btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget) const
+{
+ reportBoxCastOverlappingNodex(nodeCallback,raySource,rayTarget,btVector3(0,0,0),btVector3(0,0,0));
+}
+
+
+void btQuantizedBvh::reportBoxCastOverlappingNodex(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ //always use stackless
+
+ if (m_useQuantization)
+ {
+ walkStacklessQuantizedTreeAgainstRay(nodeCallback, raySource, rayTarget, aabbMin, aabbMax, 0, m_curNodeIndex);
+ }
+ else
+ {
+ walkStacklessTreeAgainstRay(nodeCallback, raySource, rayTarget, aabbMin, aabbMax, 0, m_curNodeIndex);
+ }
+ /*
+ {
+ //recursive traversal
+ btVector3 qaabbMin = raySource;
+ btVector3 qaabbMax = raySource;
+ qaabbMin.setMin(rayTarget);
+ qaabbMax.setMax(rayTarget);
+ qaabbMin += aabbMin;
+ qaabbMax += aabbMax;
+ reportAabbOverlappingNodex(nodeCallback,qaabbMin,qaabbMax);
+ }
+ */
+
+}
+
+
+void btQuantizedBvh::swapLeafNodes(int i,int splitIndex)
+{
+ if (m_useQuantization)
+ {
+ btQuantizedBvhNode tmp = m_quantizedLeafNodes[i];
+ m_quantizedLeafNodes[i] = m_quantizedLeafNodes[splitIndex];
+ m_quantizedLeafNodes[splitIndex] = tmp;
+ } else
+ {
+ btOptimizedBvhNode tmp = m_leafNodes[i];
+ m_leafNodes[i] = m_leafNodes[splitIndex];
+ m_leafNodes[splitIndex] = tmp;
+ }
+}
+
+void btQuantizedBvh::assignInternalNodeFromLeafNode(int internalNode,int leafNodeIndex)
+{
+ if (m_useQuantization)
+ {
+ m_quantizedContiguousNodes[internalNode] = m_quantizedLeafNodes[leafNodeIndex];
+ } else
+ {
+ m_contiguousNodes[internalNode] = m_leafNodes[leafNodeIndex];
+ }
+}
+
+//PCK: include
+#include <new>
+
+#if 0
+//PCK: consts
+static const unsigned BVH_ALIGNMENT = 16;
+static const unsigned BVH_ALIGNMENT_MASK = BVH_ALIGNMENT-1;
+
+static const unsigned BVH_ALIGNMENT_BLOCKS = 2;
+#endif
+
+
+unsigned int btQuantizedBvh::getAlignmentSerializationPadding()
+{
+ // I changed this to 0 since the extra padding is not needed or used.
+ return 0;//BVH_ALIGNMENT_BLOCKS * BVH_ALIGNMENT;
+}
+
+unsigned btQuantizedBvh::calculateSerializeBufferSize() const
+{
+ unsigned baseSize = sizeof(btQuantizedBvh) + getAlignmentSerializationPadding();
+ baseSize += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount;
+ if (m_useQuantization)
+ {
+ return baseSize + m_curNodeIndex * sizeof(btQuantizedBvhNode);
+ }
+ return baseSize + m_curNodeIndex * sizeof(btOptimizedBvhNode);
+}
+
+bool btQuantizedBvh::serialize(void *o_alignedDataBuffer, unsigned /*i_dataBufferSize */, bool i_swapEndian) const
+{
+ btAssert(m_subtreeHeaderCount == m_SubtreeHeaders.size());
+ m_subtreeHeaderCount = m_SubtreeHeaders.size();
+
+/* if (i_dataBufferSize < calculateSerializeBufferSize() || o_alignedDataBuffer == NULL || (((unsigned)o_alignedDataBuffer & BVH_ALIGNMENT_MASK) != 0))
+ {
+ ///check alignedment for buffer?
+ btAssert(0);
+ return false;
+ }
+*/
+
+ btQuantizedBvh *targetBvh = (btQuantizedBvh *)o_alignedDataBuffer;
+
+ // construct the class so the virtual function table, etc will be set up
+ // Also, m_leafNodes and m_quantizedLeafNodes will be initialized to default values by the constructor
+ new (targetBvh) btQuantizedBvh;
+
+ if (i_swapEndian)
+ {
+ targetBvh->m_curNodeIndex = static_cast<int>(btSwapEndian(m_curNodeIndex));
+
+
+ btSwapVector3Endian(m_bvhAabbMin,targetBvh->m_bvhAabbMin);
+ btSwapVector3Endian(m_bvhAabbMax,targetBvh->m_bvhAabbMax);
+ btSwapVector3Endian(m_bvhQuantization,targetBvh->m_bvhQuantization);
+
+ targetBvh->m_traversalMode = (btTraversalMode)btSwapEndian(m_traversalMode);
+ targetBvh->m_subtreeHeaderCount = static_cast<int>(btSwapEndian(m_subtreeHeaderCount));
+ }
+ else
+ {
+ targetBvh->m_curNodeIndex = m_curNodeIndex;
+ targetBvh->m_bvhAabbMin = m_bvhAabbMin;
+ targetBvh->m_bvhAabbMax = m_bvhAabbMax;
+ targetBvh->m_bvhQuantization = m_bvhQuantization;
+ targetBvh->m_traversalMode = m_traversalMode;
+ targetBvh->m_subtreeHeaderCount = m_subtreeHeaderCount;
+ }
+
+ targetBvh->m_useQuantization = m_useQuantization;
+
+ unsigned char *nodeData = (unsigned char *)targetBvh;
+ nodeData += sizeof(btQuantizedBvh);
+
+ unsigned sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK;
+ nodeData += sizeToAdd;
+
+ int nodeCount = m_curNodeIndex;
+
+ if (m_useQuantization)
+ {
+ targetBvh->m_quantizedContiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount);
+
+ if (i_swapEndian)
+ {
+ for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++)
+ {
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]);
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]);
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]);
+
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]);
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]);
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]);
+
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = static_cast<int>(btSwapEndian(m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex));
+ }
+ }
+ else
+ {
+ for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++)
+ {
+
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0];
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1];
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2];
+
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0];
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1];
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2];
+
+ targetBvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex;
+
+
+ }
+ }
+ nodeData += sizeof(btQuantizedBvhNode) * nodeCount;
+
+ // this clears the pointer in the member variable it doesn't really do anything to the data
+ // it does call the destructor on the contained objects, but they are all classes with no destructor defined
+ // so the memory (which is not freed) is left alone
+ targetBvh->m_quantizedContiguousNodes.initializeFromBuffer(NULL, 0, 0);
+ }
+ else
+ {
+ targetBvh->m_contiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount);
+
+ if (i_swapEndian)
+ {
+ for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++)
+ {
+ btSwapVector3Endian(m_contiguousNodes[nodeIndex].m_aabbMinOrg, targetBvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg);
+ btSwapVector3Endian(m_contiguousNodes[nodeIndex].m_aabbMaxOrg, targetBvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg);
+
+ targetBvh->m_contiguousNodes[nodeIndex].m_escapeIndex = static_cast<int>(btSwapEndian(m_contiguousNodes[nodeIndex].m_escapeIndex));
+ targetBvh->m_contiguousNodes[nodeIndex].m_subPart = static_cast<int>(btSwapEndian(m_contiguousNodes[nodeIndex].m_subPart));
+ targetBvh->m_contiguousNodes[nodeIndex].m_triangleIndex = static_cast<int>(btSwapEndian(m_contiguousNodes[nodeIndex].m_triangleIndex));
+ }
+ }
+ else
+ {
+ for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++)
+ {
+ targetBvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg = m_contiguousNodes[nodeIndex].m_aabbMinOrg;
+ targetBvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg = m_contiguousNodes[nodeIndex].m_aabbMaxOrg;
+
+ targetBvh->m_contiguousNodes[nodeIndex].m_escapeIndex = m_contiguousNodes[nodeIndex].m_escapeIndex;
+ targetBvh->m_contiguousNodes[nodeIndex].m_subPart = m_contiguousNodes[nodeIndex].m_subPart;
+ targetBvh->m_contiguousNodes[nodeIndex].m_triangleIndex = m_contiguousNodes[nodeIndex].m_triangleIndex;
+ }
+ }
+ nodeData += sizeof(btOptimizedBvhNode) * nodeCount;
+
+ // this clears the pointer in the member variable it doesn't really do anything to the data
+ // it does call the destructor on the contained objects, but they are all classes with no destructor defined
+ // so the memory (which is not freed) is left alone
+ targetBvh->m_contiguousNodes.initializeFromBuffer(NULL, 0, 0);
+ }
+
+ sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK;
+ nodeData += sizeToAdd;
+
+ // Now serialize the subtree headers
+ targetBvh->m_SubtreeHeaders.initializeFromBuffer(nodeData, m_subtreeHeaderCount, m_subtreeHeaderCount);
+ if (i_swapEndian)
+ {
+ for (int i = 0; i < m_subtreeHeaderCount; i++)
+ {
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[0]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[1]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMin[2]);
+
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[0]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[1]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = btSwapEndian(m_SubtreeHeaders[i].m_quantizedAabbMax[2]);
+
+ targetBvh->m_SubtreeHeaders[i].m_rootNodeIndex = static_cast<int>(btSwapEndian(m_SubtreeHeaders[i].m_rootNodeIndex));
+ targetBvh->m_SubtreeHeaders[i].m_subtreeSize = static_cast<int>(btSwapEndian(m_SubtreeHeaders[i].m_subtreeSize));
+ }
+ }
+ else
+ {
+ for (int i = 0; i < m_subtreeHeaderCount; i++)
+ {
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = (m_SubtreeHeaders[i].m_quantizedAabbMin[0]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = (m_SubtreeHeaders[i].m_quantizedAabbMin[1]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = (m_SubtreeHeaders[i].m_quantizedAabbMin[2]);
+
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = (m_SubtreeHeaders[i].m_quantizedAabbMax[0]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = (m_SubtreeHeaders[i].m_quantizedAabbMax[1]);
+ targetBvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = (m_SubtreeHeaders[i].m_quantizedAabbMax[2]);
+
+ targetBvh->m_SubtreeHeaders[i].m_rootNodeIndex = (m_SubtreeHeaders[i].m_rootNodeIndex);
+ targetBvh->m_SubtreeHeaders[i].m_subtreeSize = (m_SubtreeHeaders[i].m_subtreeSize);
+
+ // need to clear padding in destination buffer
+ targetBvh->m_SubtreeHeaders[i].m_padding[0] = 0;
+ targetBvh->m_SubtreeHeaders[i].m_padding[1] = 0;
+ targetBvh->m_SubtreeHeaders[i].m_padding[2] = 0;
+ }
+ }
+ nodeData += sizeof(btBvhSubtreeInfo) * m_subtreeHeaderCount;
+
+ // this clears the pointer in the member variable it doesn't really do anything to the data
+ // it does call the destructor on the contained objects, but they are all classes with no destructor defined
+ // so the memory (which is not freed) is left alone
+ targetBvh->m_SubtreeHeaders.initializeFromBuffer(NULL, 0, 0);
+
+ // this wipes the virtual function table pointer at the start of the buffer for the class
+ *((void**)o_alignedDataBuffer) = NULL;
+
+ return true;
+}
+
+btQuantizedBvh *btQuantizedBvh::deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian)
+{
+
+ if (i_alignedDataBuffer == NULL)// || (((unsigned)i_alignedDataBuffer & BVH_ALIGNMENT_MASK) != 0))
+ {
+ return NULL;
+ }
+ btQuantizedBvh *bvh = (btQuantizedBvh *)i_alignedDataBuffer;
+
+ if (i_swapEndian)
+ {
+ bvh->m_curNodeIndex = static_cast<int>(btSwapEndian(bvh->m_curNodeIndex));
+
+ btUnSwapVector3Endian(bvh->m_bvhAabbMin);
+ btUnSwapVector3Endian(bvh->m_bvhAabbMax);
+ btUnSwapVector3Endian(bvh->m_bvhQuantization);
+
+ bvh->m_traversalMode = (btTraversalMode)btSwapEndian(bvh->m_traversalMode);
+ bvh->m_subtreeHeaderCount = static_cast<int>(btSwapEndian(bvh->m_subtreeHeaderCount));
+ }
+
+ unsigned int calculatedBufSize = bvh->calculateSerializeBufferSize();
+ btAssert(calculatedBufSize <= i_dataBufferSize);
+
+ if (calculatedBufSize > i_dataBufferSize)
+ {
+ return NULL;
+ }
+
+ unsigned char *nodeData = (unsigned char *)bvh;
+ nodeData += sizeof(btQuantizedBvh);
+
+ unsigned sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK;
+ nodeData += sizeToAdd;
+
+ int nodeCount = bvh->m_curNodeIndex;
+
+ // Must call placement new to fill in virtual function table, etc, but we don't want to overwrite most data, so call a special version of the constructor
+ // Also, m_leafNodes and m_quantizedLeafNodes will be initialized to default values by the constructor
+ new (bvh) btQuantizedBvh(*bvh, false);
+
+ if (bvh->m_useQuantization)
+ {
+ bvh->m_quantizedContiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount);
+
+ if (i_swapEndian)
+ {
+ for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++)
+ {
+ bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0]);
+ bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[1]);
+ bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[2]);
+
+ bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0]);
+ bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[1]);
+ bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2] = btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[2]);
+
+ bvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = static_cast<int>(btSwapEndian(bvh->m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex));
+ }
+ }
+ nodeData += sizeof(btQuantizedBvhNode) * nodeCount;
+ }
+ else
+ {
+ bvh->m_contiguousNodes.initializeFromBuffer(nodeData, nodeCount, nodeCount);
+
+ if (i_swapEndian)
+ {
+ for (int nodeIndex = 0; nodeIndex < nodeCount; nodeIndex++)
+ {
+ btUnSwapVector3Endian(bvh->m_contiguousNodes[nodeIndex].m_aabbMinOrg);
+ btUnSwapVector3Endian(bvh->m_contiguousNodes[nodeIndex].m_aabbMaxOrg);
+
+ bvh->m_contiguousNodes[nodeIndex].m_escapeIndex = static_cast<int>(btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_escapeIndex));
+ bvh->m_contiguousNodes[nodeIndex].m_subPart = static_cast<int>(btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_subPart));
+ bvh->m_contiguousNodes[nodeIndex].m_triangleIndex = static_cast<int>(btSwapEndian(bvh->m_contiguousNodes[nodeIndex].m_triangleIndex));
+ }
+ }
+ nodeData += sizeof(btOptimizedBvhNode) * nodeCount;
+ }
+
+ sizeToAdd = 0;//(BVH_ALIGNMENT-((unsigned)nodeData & BVH_ALIGNMENT_MASK))&BVH_ALIGNMENT_MASK;
+ nodeData += sizeToAdd;
+
+ // Now serialize the subtree headers
+ bvh->m_SubtreeHeaders.initializeFromBuffer(nodeData, bvh->m_subtreeHeaderCount, bvh->m_subtreeHeaderCount);
+ if (i_swapEndian)
+ {
+ for (int i = 0; i < bvh->m_subtreeHeaderCount; i++)
+ {
+ bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[0]);
+ bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[1]);
+ bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMin[2]);
+
+ bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[0]);
+ bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[1]);
+ bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2] = btSwapEndian(bvh->m_SubtreeHeaders[i].m_quantizedAabbMax[2]);
+
+ bvh->m_SubtreeHeaders[i].m_rootNodeIndex = static_cast<int>(btSwapEndian(bvh->m_SubtreeHeaders[i].m_rootNodeIndex));
+ bvh->m_SubtreeHeaders[i].m_subtreeSize = static_cast<int>(btSwapEndian(bvh->m_SubtreeHeaders[i].m_subtreeSize));
+ }
+ }
+
+ return bvh;
+}
+
+// Constructor that prevents btVector3's default constructor from being called
+btQuantizedBvh::btQuantizedBvh(btQuantizedBvh &self, bool /* ownsMemory */) :
+m_bvhAabbMin(self.m_bvhAabbMin),
+m_bvhAabbMax(self.m_bvhAabbMax),
+m_bvhQuantization(self.m_bvhQuantization),
+m_bulletVersion(BT_BULLET_VERSION)
+{
+
+}
+
+void btQuantizedBvh::deSerializeFloat(struct btQuantizedBvhFloatData& quantizedBvhFloatData)
+{
+ m_bvhAabbMax.deSerializeFloat(quantizedBvhFloatData.m_bvhAabbMax);
+ m_bvhAabbMin.deSerializeFloat(quantizedBvhFloatData.m_bvhAabbMin);
+ m_bvhQuantization.deSerializeFloat(quantizedBvhFloatData.m_bvhQuantization);
+
+ m_curNodeIndex = quantizedBvhFloatData.m_curNodeIndex;
+ m_useQuantization = quantizedBvhFloatData.m_useQuantization!=0;
+
+ {
+ int numElem = quantizedBvhFloatData.m_numContiguousLeafNodes;
+ m_contiguousNodes.resize(numElem);
+
+ if (numElem)
+ {
+ btOptimizedBvhNodeFloatData* memPtr = quantizedBvhFloatData.m_contiguousNodesPtr;
+
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_contiguousNodes[i].m_aabbMaxOrg.deSerializeFloat(memPtr->m_aabbMaxOrg);
+ m_contiguousNodes[i].m_aabbMinOrg.deSerializeFloat(memPtr->m_aabbMinOrg);
+ m_contiguousNodes[i].m_escapeIndex = memPtr->m_escapeIndex;
+ m_contiguousNodes[i].m_subPart = memPtr->m_subPart;
+ m_contiguousNodes[i].m_triangleIndex = memPtr->m_triangleIndex;
+ }
+ }
+ }
+
+ {
+ int numElem = quantizedBvhFloatData.m_numQuantizedContiguousNodes;
+ m_quantizedContiguousNodes.resize(numElem);
+
+ if (numElem)
+ {
+ btQuantizedBvhNodeData* memPtr = quantizedBvhFloatData.m_quantizedContiguousNodesPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_quantizedContiguousNodes[i].m_escapeIndexOrTriangleIndex = memPtr->m_escapeIndexOrTriangleIndex;
+ m_quantizedContiguousNodes[i].m_quantizedAabbMax[0] = memPtr->m_quantizedAabbMax[0];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMax[1] = memPtr->m_quantizedAabbMax[1];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMax[2] = memPtr->m_quantizedAabbMax[2];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMin[0] = memPtr->m_quantizedAabbMin[0];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMin[1] = memPtr->m_quantizedAabbMin[1];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMin[2] = memPtr->m_quantizedAabbMin[2];
+ }
+ }
+ }
+
+ m_traversalMode = btTraversalMode(quantizedBvhFloatData.m_traversalMode);
+
+ {
+ int numElem = quantizedBvhFloatData.m_numSubtreeHeaders;
+ m_SubtreeHeaders.resize(numElem);
+ if (numElem)
+ {
+ btBvhSubtreeInfoData* memPtr = quantizedBvhFloatData.m_subTreeInfoPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_SubtreeHeaders[i].m_quantizedAabbMax[0] = memPtr->m_quantizedAabbMax[0] ;
+ m_SubtreeHeaders[i].m_quantizedAabbMax[1] = memPtr->m_quantizedAabbMax[1];
+ m_SubtreeHeaders[i].m_quantizedAabbMax[2] = memPtr->m_quantizedAabbMax[2];
+ m_SubtreeHeaders[i].m_quantizedAabbMin[0] = memPtr->m_quantizedAabbMin[0];
+ m_SubtreeHeaders[i].m_quantizedAabbMin[1] = memPtr->m_quantizedAabbMin[1];
+ m_SubtreeHeaders[i].m_quantizedAabbMin[2] = memPtr->m_quantizedAabbMin[2];
+ m_SubtreeHeaders[i].m_rootNodeIndex = memPtr->m_rootNodeIndex;
+ m_SubtreeHeaders[i].m_subtreeSize = memPtr->m_subtreeSize;
+ }
+ }
+ }
+}
+
+void btQuantizedBvh::deSerializeDouble(struct btQuantizedBvhDoubleData& quantizedBvhDoubleData)
+{
+ m_bvhAabbMax.deSerializeDouble(quantizedBvhDoubleData.m_bvhAabbMax);
+ m_bvhAabbMin.deSerializeDouble(quantizedBvhDoubleData.m_bvhAabbMin);
+ m_bvhQuantization.deSerializeDouble(quantizedBvhDoubleData.m_bvhQuantization);
+
+ m_curNodeIndex = quantizedBvhDoubleData.m_curNodeIndex;
+ m_useQuantization = quantizedBvhDoubleData.m_useQuantization!=0;
+
+ {
+ int numElem = quantizedBvhDoubleData.m_numContiguousLeafNodes;
+ m_contiguousNodes.resize(numElem);
+
+ if (numElem)
+ {
+ btOptimizedBvhNodeDoubleData* memPtr = quantizedBvhDoubleData.m_contiguousNodesPtr;
+
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_contiguousNodes[i].m_aabbMaxOrg.deSerializeDouble(memPtr->m_aabbMaxOrg);
+ m_contiguousNodes[i].m_aabbMinOrg.deSerializeDouble(memPtr->m_aabbMinOrg);
+ m_contiguousNodes[i].m_escapeIndex = memPtr->m_escapeIndex;
+ m_contiguousNodes[i].m_subPart = memPtr->m_subPart;
+ m_contiguousNodes[i].m_triangleIndex = memPtr->m_triangleIndex;
+ }
+ }
+ }
+
+ {
+ int numElem = quantizedBvhDoubleData.m_numQuantizedContiguousNodes;
+ m_quantizedContiguousNodes.resize(numElem);
+
+ if (numElem)
+ {
+ btQuantizedBvhNodeData* memPtr = quantizedBvhDoubleData.m_quantizedContiguousNodesPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_quantizedContiguousNodes[i].m_escapeIndexOrTriangleIndex = memPtr->m_escapeIndexOrTriangleIndex;
+ m_quantizedContiguousNodes[i].m_quantizedAabbMax[0] = memPtr->m_quantizedAabbMax[0];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMax[1] = memPtr->m_quantizedAabbMax[1];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMax[2] = memPtr->m_quantizedAabbMax[2];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMin[0] = memPtr->m_quantizedAabbMin[0];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMin[1] = memPtr->m_quantizedAabbMin[1];
+ m_quantizedContiguousNodes[i].m_quantizedAabbMin[2] = memPtr->m_quantizedAabbMin[2];
+ }
+ }
+ }
+
+ m_traversalMode = btTraversalMode(quantizedBvhDoubleData.m_traversalMode);
+
+ {
+ int numElem = quantizedBvhDoubleData.m_numSubtreeHeaders;
+ m_SubtreeHeaders.resize(numElem);
+ if (numElem)
+ {
+ btBvhSubtreeInfoData* memPtr = quantizedBvhDoubleData.m_subTreeInfoPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_SubtreeHeaders[i].m_quantizedAabbMax[0] = memPtr->m_quantizedAabbMax[0] ;
+ m_SubtreeHeaders[i].m_quantizedAabbMax[1] = memPtr->m_quantizedAabbMax[1];
+ m_SubtreeHeaders[i].m_quantizedAabbMax[2] = memPtr->m_quantizedAabbMax[2];
+ m_SubtreeHeaders[i].m_quantizedAabbMin[0] = memPtr->m_quantizedAabbMin[0];
+ m_SubtreeHeaders[i].m_quantizedAabbMin[1] = memPtr->m_quantizedAabbMin[1];
+ m_SubtreeHeaders[i].m_quantizedAabbMin[2] = memPtr->m_quantizedAabbMin[2];
+ m_SubtreeHeaders[i].m_rootNodeIndex = memPtr->m_rootNodeIndex;
+ m_SubtreeHeaders[i].m_subtreeSize = memPtr->m_subtreeSize;
+ }
+ }
+ }
+
+}
+
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btQuantizedBvh::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btQuantizedBvhData* quantizedData = (btQuantizedBvhData*)dataBuffer;
+
+ m_bvhAabbMax.serialize(quantizedData->m_bvhAabbMax);
+ m_bvhAabbMin.serialize(quantizedData->m_bvhAabbMin);
+ m_bvhQuantization.serialize(quantizedData->m_bvhQuantization);
+
+ quantizedData->m_curNodeIndex = m_curNodeIndex;
+ quantizedData->m_useQuantization = m_useQuantization;
+
+ quantizedData->m_numContiguousLeafNodes = m_contiguousNodes.size();
+ quantizedData->m_contiguousNodesPtr = (btOptimizedBvhNodeData*) (m_contiguousNodes.size() ? serializer->getUniquePointer((void*)&m_contiguousNodes[0]) : 0);
+ if (quantizedData->m_contiguousNodesPtr)
+ {
+ int sz = sizeof(btOptimizedBvhNodeData);
+ int numElem = m_contiguousNodes.size();
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btOptimizedBvhNodeData* memPtr = (btOptimizedBvhNodeData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_contiguousNodes[i].m_aabbMaxOrg.serialize(memPtr->m_aabbMaxOrg);
+ m_contiguousNodes[i].m_aabbMinOrg.serialize(memPtr->m_aabbMinOrg);
+ memPtr->m_escapeIndex = m_contiguousNodes[i].m_escapeIndex;
+ memPtr->m_subPart = m_contiguousNodes[i].m_subPart;
+ memPtr->m_triangleIndex = m_contiguousNodes[i].m_triangleIndex;
+ }
+ serializer->finalizeChunk(chunk,"btOptimizedBvhNodeData",BT_ARRAY_CODE,(void*)&m_contiguousNodes[0]);
+ }
+
+ quantizedData->m_numQuantizedContiguousNodes = m_quantizedContiguousNodes.size();
+// printf("quantizedData->m_numQuantizedContiguousNodes=%d\n",quantizedData->m_numQuantizedContiguousNodes);
+ quantizedData->m_quantizedContiguousNodesPtr =(btQuantizedBvhNodeData*) (m_quantizedContiguousNodes.size() ? serializer->getUniquePointer((void*)&m_quantizedContiguousNodes[0]) : 0);
+ if (quantizedData->m_quantizedContiguousNodesPtr)
+ {
+ int sz = sizeof(btQuantizedBvhNodeData);
+ int numElem = m_quantizedContiguousNodes.size();
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btQuantizedBvhNodeData* memPtr = (btQuantizedBvhNodeData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ memPtr->m_escapeIndexOrTriangleIndex = m_quantizedContiguousNodes[i].m_escapeIndexOrTriangleIndex;
+ memPtr->m_quantizedAabbMax[0] = m_quantizedContiguousNodes[i].m_quantizedAabbMax[0];
+ memPtr->m_quantizedAabbMax[1] = m_quantizedContiguousNodes[i].m_quantizedAabbMax[1];
+ memPtr->m_quantizedAabbMax[2] = m_quantizedContiguousNodes[i].m_quantizedAabbMax[2];
+ memPtr->m_quantizedAabbMin[0] = m_quantizedContiguousNodes[i].m_quantizedAabbMin[0];
+ memPtr->m_quantizedAabbMin[1] = m_quantizedContiguousNodes[i].m_quantizedAabbMin[1];
+ memPtr->m_quantizedAabbMin[2] = m_quantizedContiguousNodes[i].m_quantizedAabbMin[2];
+ }
+ serializer->finalizeChunk(chunk,"btQuantizedBvhNodeData",BT_ARRAY_CODE,(void*)&m_quantizedContiguousNodes[0]);
+ }
+
+ quantizedData->m_traversalMode = int(m_traversalMode);
+ quantizedData->m_numSubtreeHeaders = m_SubtreeHeaders.size();
+
+ quantizedData->m_subTreeInfoPtr = (btBvhSubtreeInfoData*) (m_SubtreeHeaders.size() ? serializer->getUniquePointer((void*)&m_SubtreeHeaders[0]) : 0);
+ if (quantizedData->m_subTreeInfoPtr)
+ {
+ int sz = sizeof(btBvhSubtreeInfoData);
+ int numElem = m_SubtreeHeaders.size();
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btBvhSubtreeInfoData* memPtr = (btBvhSubtreeInfoData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ memPtr->m_quantizedAabbMax[0] = m_SubtreeHeaders[i].m_quantizedAabbMax[0];
+ memPtr->m_quantizedAabbMax[1] = m_SubtreeHeaders[i].m_quantizedAabbMax[1];
+ memPtr->m_quantizedAabbMax[2] = m_SubtreeHeaders[i].m_quantizedAabbMax[2];
+ memPtr->m_quantizedAabbMin[0] = m_SubtreeHeaders[i].m_quantizedAabbMin[0];
+ memPtr->m_quantizedAabbMin[1] = m_SubtreeHeaders[i].m_quantizedAabbMin[1];
+ memPtr->m_quantizedAabbMin[2] = m_SubtreeHeaders[i].m_quantizedAabbMin[2];
+
+ memPtr->m_rootNodeIndex = m_SubtreeHeaders[i].m_rootNodeIndex;
+ memPtr->m_subtreeSize = m_SubtreeHeaders[i].m_subtreeSize;
+ }
+ serializer->finalizeChunk(chunk,"btBvhSubtreeInfoData",BT_ARRAY_CODE,(void*)&m_SubtreeHeaders[0]);
+ }
+ return btQuantizedBvhDataName;
+}
+
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
new file mode 100644
index 00000000..bedb100a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
@@ -0,0 +1,579 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_QUANTIZED_BVH_H
+#define BT_QUANTIZED_BVH_H
+
+class btSerializer;
+
+//#define DEBUG_CHECK_DEQUANTIZATION 1
+#ifdef DEBUG_CHECK_DEQUANTIZATION
+#ifdef __SPU__
+#define printf spu_printf
+#endif //__SPU__
+
+#include <stdio.h>
+#include <stdlib.h>
+#endif //DEBUG_CHECK_DEQUANTIZATION
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btAlignedAllocator.h"
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btQuantizedBvhData btQuantizedBvhDoubleData
+#define btOptimizedBvhNodeData btOptimizedBvhNodeDoubleData
+#define btQuantizedBvhDataName "btQuantizedBvhDoubleData"
+#else
+#define btQuantizedBvhData btQuantizedBvhFloatData
+#define btOptimizedBvhNodeData btOptimizedBvhNodeFloatData
+#define btQuantizedBvhDataName "btQuantizedBvhFloatData"
+#endif
+
+
+
+//http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/vclrf__m128.asp
+
+
+//Note: currently we have 16 bytes per quantized node
+#define MAX_SUBTREE_SIZE_IN_BYTES 2048
+
+// 10 gives the potential for 1024 parts, with at most 2^21 (2097152) (minus one
+// actually) triangles each (since the sign bit is reserved
+#define MAX_NUM_PARTS_IN_BITS 10
+
+///btQuantizedBvhNode is a compressed aabb node, 16 bytes.
+///Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range).
+ATTRIBUTE_ALIGNED16 (struct) btQuantizedBvhNode
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ //12 bytes
+ unsigned short int m_quantizedAabbMin[3];
+ unsigned short int m_quantizedAabbMax[3];
+ //4 bytes
+ int m_escapeIndexOrTriangleIndex;
+
+ bool isLeafNode() const
+ {
+ //skipindex is negative (internal node), triangleindex >=0 (leafnode)
+ return (m_escapeIndexOrTriangleIndex >= 0);
+ }
+ int getEscapeIndex() const
+ {
+ btAssert(!isLeafNode());
+ return -m_escapeIndexOrTriangleIndex;
+ }
+ int getTriangleIndex() const
+ {
+ btAssert(isLeafNode());
+ // Get only the lower bits where the triangle index is stored
+ return (m_escapeIndexOrTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
+ }
+ int getPartId() const
+ {
+ btAssert(isLeafNode());
+ // Get only the highest bits where the part index is stored
+ return (m_escapeIndexOrTriangleIndex>>(31-MAX_NUM_PARTS_IN_BITS));
+ }
+}
+;
+
+/// btOptimizedBvhNode contains both internal and leaf node information.
+/// Total node size is 44 bytes / node. You can use the compressed version of 16 bytes.
+ATTRIBUTE_ALIGNED16 (struct) btOptimizedBvhNode
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ //32 bytes
+ btVector3 m_aabbMinOrg;
+ btVector3 m_aabbMaxOrg;
+
+ //4
+ int m_escapeIndex;
+
+ //8
+ //for child nodes
+ int m_subPart;
+ int m_triangleIndex;
+ int m_padding[5];//bad, due to alignment
+
+
+};
+
+
+///btBvhSubtreeInfo provides info to gather a subtree of limited size
+ATTRIBUTE_ALIGNED16(class) btBvhSubtreeInfo
+{
+public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ //12 bytes
+ unsigned short int m_quantizedAabbMin[3];
+ unsigned short int m_quantizedAabbMax[3];
+ //4 bytes, points to the root of the subtree
+ int m_rootNodeIndex;
+ //4 bytes
+ int m_subtreeSize;
+ int m_padding[3];
+
+ btBvhSubtreeInfo()
+ {
+ //memset(&m_padding[0], 0, sizeof(m_padding));
+ }
+
+
+ void setAabbFromQuantizeNode(const btQuantizedBvhNode& quantizedNode)
+ {
+ m_quantizedAabbMin[0] = quantizedNode.m_quantizedAabbMin[0];
+ m_quantizedAabbMin[1] = quantizedNode.m_quantizedAabbMin[1];
+ m_quantizedAabbMin[2] = quantizedNode.m_quantizedAabbMin[2];
+ m_quantizedAabbMax[0] = quantizedNode.m_quantizedAabbMax[0];
+ m_quantizedAabbMax[1] = quantizedNode.m_quantizedAabbMax[1];
+ m_quantizedAabbMax[2] = quantizedNode.m_quantizedAabbMax[2];
+ }
+}
+;
+
+
+class btNodeOverlapCallback
+{
+public:
+ virtual ~btNodeOverlapCallback() {};
+
+ virtual void processNode(int subPart, int triangleIndex) = 0;
+};
+
+#include "LinearMath/btAlignedAllocator.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+
+///for code readability:
+typedef btAlignedObjectArray<btOptimizedBvhNode> NodeArray;
+typedef btAlignedObjectArray<btQuantizedBvhNode> QuantizedNodeArray;
+typedef btAlignedObjectArray<btBvhSubtreeInfo> BvhSubtreeInfoArray;
+
+
+///The btQuantizedBvh class stores an AABB tree that can be quickly traversed on CPU and Cell SPU.
+///It is used by the btBvhTriangleMeshShape as midphase, and by the btMultiSapBroadphase.
+///It is recommended to use quantization for better performance and lower memory requirements.
+ATTRIBUTE_ALIGNED16(class) btQuantizedBvh
+{
+public:
+ enum btTraversalMode
+ {
+ TRAVERSAL_STACKLESS = 0,
+ TRAVERSAL_STACKLESS_CACHE_FRIENDLY,
+ TRAVERSAL_RECURSIVE
+ };
+
+protected:
+
+
+ btVector3 m_bvhAabbMin;
+ btVector3 m_bvhAabbMax;
+ btVector3 m_bvhQuantization;
+
+ int m_bulletVersion; //for serialization versioning. It could also be used to detect endianess.
+
+ int m_curNodeIndex;
+ //quantization data
+ bool m_useQuantization;
+
+
+
+ NodeArray m_leafNodes;
+ NodeArray m_contiguousNodes;
+ QuantizedNodeArray m_quantizedLeafNodes;
+ QuantizedNodeArray m_quantizedContiguousNodes;
+
+ btTraversalMode m_traversalMode;
+ BvhSubtreeInfoArray m_SubtreeHeaders;
+
+ //This is only used for serialization so we don't have to add serialization directly to btAlignedObjectArray
+ mutable int m_subtreeHeaderCount;
+
+
+
+
+
+ ///two versions, one for quantized and normal nodes. This allows code-reuse while maintaining readability (no template/macro!)
+ ///this might be refactored into a virtual, it is usually not calculated at run-time
+ void setInternalNodeAabbMin(int nodeIndex, const btVector3& aabbMin)
+ {
+ if (m_useQuantization)
+ {
+ quantize(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[0] ,aabbMin,0);
+ } else
+ {
+ m_contiguousNodes[nodeIndex].m_aabbMinOrg = aabbMin;
+
+ }
+ }
+ void setInternalNodeAabbMax(int nodeIndex,const btVector3& aabbMax)
+ {
+ if (m_useQuantization)
+ {
+ quantize(&m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[0],aabbMax,1);
+ } else
+ {
+ m_contiguousNodes[nodeIndex].m_aabbMaxOrg = aabbMax;
+ }
+ }
+
+ btVector3 getAabbMin(int nodeIndex) const
+ {
+ if (m_useQuantization)
+ {
+ return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMin[0]);
+ }
+ //non-quantized
+ return m_leafNodes[nodeIndex].m_aabbMinOrg;
+
+ }
+ btVector3 getAabbMax(int nodeIndex) const
+ {
+ if (m_useQuantization)
+ {
+ return unQuantize(&m_quantizedLeafNodes[nodeIndex].m_quantizedAabbMax[0]);
+ }
+ //non-quantized
+ return m_leafNodes[nodeIndex].m_aabbMaxOrg;
+
+ }
+
+
+ void setInternalNodeEscapeIndex(int nodeIndex, int escapeIndex)
+ {
+ if (m_useQuantization)
+ {
+ m_quantizedContiguousNodes[nodeIndex].m_escapeIndexOrTriangleIndex = -escapeIndex;
+ }
+ else
+ {
+ m_contiguousNodes[nodeIndex].m_escapeIndex = escapeIndex;
+ }
+
+ }
+
+ void mergeInternalNodeAabb(int nodeIndex,const btVector3& newAabbMin,const btVector3& newAabbMax)
+ {
+ if (m_useQuantization)
+ {
+ unsigned short int quantizedAabbMin[3];
+ unsigned short int quantizedAabbMax[3];
+ quantize(quantizedAabbMin,newAabbMin,0);
+ quantize(quantizedAabbMax,newAabbMax,1);
+ for (int i=0;i<3;i++)
+ {
+ if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] > quantizedAabbMin[i])
+ m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMin[i] = quantizedAabbMin[i];
+
+ if (m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] < quantizedAabbMax[i])
+ m_quantizedContiguousNodes[nodeIndex].m_quantizedAabbMax[i] = quantizedAabbMax[i];
+
+ }
+ } else
+ {
+ //non-quantized
+ m_contiguousNodes[nodeIndex].m_aabbMinOrg.setMin(newAabbMin);
+ m_contiguousNodes[nodeIndex].m_aabbMaxOrg.setMax(newAabbMax);
+ }
+ }
+
+ void swapLeafNodes(int firstIndex,int secondIndex);
+
+ void assignInternalNodeFromLeafNode(int internalNode,int leafNodeIndex);
+
+protected:
+
+
+
+ void buildTree (int startIndex,int endIndex);
+
+ int calcSplittingAxis(int startIndex,int endIndex);
+
+ int sortAndCalcSplittingIndex(int startIndex,int endIndex,int splitAxis);
+
+ void walkStacklessTree(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ void walkStacklessQuantizedTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const;
+ void walkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,int startNodeIndex,int endNodeIndex) const;
+ void walkStacklessTreeAgainstRay(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax, int startNodeIndex,int endNodeIndex) const;
+
+ ///tree traversal designed for small-memory processors like PS3 SPU
+ void walkStacklessQuantizedTreeCacheFriendly(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const;
+
+ ///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal
+ void walkRecursiveQuantizedTreeAgainstQueryAabb(const btQuantizedBvhNode* currentNode,btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax) const;
+
+ ///use the 16-byte stackless 'skipindex' node tree to do a recursive traversal
+ void walkRecursiveQuantizedTreeAgainstQuantizedTree(const btQuantizedBvhNode* treeNodeA,const btQuantizedBvhNode* treeNodeB,btNodeOverlapCallback* nodeCallback) const;
+
+
+
+
+ void updateSubtreeHeaders(int leftChildNodexIndex,int rightChildNodexIndex);
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btQuantizedBvh();
+
+ virtual ~btQuantizedBvh();
+
+
+ ///***************************************** expert/internal use only *************************
+ void setQuantizationValues(const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,btScalar quantizationMargin=btScalar(1.0));
+ QuantizedNodeArray& getLeafNodeArray() { return m_quantizedLeafNodes; }
+ ///buildInternal is expert use only: assumes that setQuantizationValues and LeafNodeArray are initialized
+ void buildInternal();
+ ///***************************************** expert/internal use only *************************
+
+ void reportAabbOverlappingNodex(btNodeOverlapCallback* nodeCallback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+ void reportRayOverlappingNodex (btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget) const;
+ void reportBoxCastOverlappingNodex(btNodeOverlapCallback* nodeCallback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ SIMD_FORCE_INLINE void quantize(unsigned short* out, const btVector3& point,int isMax) const
+ {
+
+ btAssert(m_useQuantization);
+
+ btAssert(point.getX() <= m_bvhAabbMax.getX());
+ btAssert(point.getY() <= m_bvhAabbMax.getY());
+ btAssert(point.getZ() <= m_bvhAabbMax.getZ());
+
+ btAssert(point.getX() >= m_bvhAabbMin.getX());
+ btAssert(point.getY() >= m_bvhAabbMin.getY());
+ btAssert(point.getZ() >= m_bvhAabbMin.getZ());
+
+ btVector3 v = (point - m_bvhAabbMin) * m_bvhQuantization;
+ ///Make sure rounding is done in a way that unQuantize(quantizeWithClamp(...)) is conservative
+ ///end-points always set the first bit, so that they are sorted properly (so that neighbouring AABBs overlap properly)
+ ///@todo: double-check this
+ if (isMax)
+ {
+ out[0] = (unsigned short) (((unsigned short)(v.getX()+btScalar(1.)) | 1));
+ out[1] = (unsigned short) (((unsigned short)(v.getY()+btScalar(1.)) | 1));
+ out[2] = (unsigned short) (((unsigned short)(v.getZ()+btScalar(1.)) | 1));
+ } else
+ {
+ out[0] = (unsigned short) (((unsigned short)(v.getX()) & 0xfffe));
+ out[1] = (unsigned short) (((unsigned short)(v.getY()) & 0xfffe));
+ out[2] = (unsigned short) (((unsigned short)(v.getZ()) & 0xfffe));
+ }
+
+
+#ifdef DEBUG_CHECK_DEQUANTIZATION
+ btVector3 newPoint = unQuantize(out);
+ if (isMax)
+ {
+ if (newPoint.getX() < point.getX())
+ {
+ printf("unconservative X, diffX = %f, oldX=%f,newX=%f\n",newPoint.getX()-point.getX(), newPoint.getX(),point.getX());
+ }
+ if (newPoint.getY() < point.getY())
+ {
+ printf("unconservative Y, diffY = %f, oldY=%f,newY=%f\n",newPoint.getY()-point.getY(), newPoint.getY(),point.getY());
+ }
+ if (newPoint.getZ() < point.getZ())
+ {
+
+ printf("unconservative Z, diffZ = %f, oldZ=%f,newZ=%f\n",newPoint.getZ()-point.getZ(), newPoint.getZ(),point.getZ());
+ }
+ } else
+ {
+ if (newPoint.getX() > point.getX())
+ {
+ printf("unconservative X, diffX = %f, oldX=%f,newX=%f\n",newPoint.getX()-point.getX(), newPoint.getX(),point.getX());
+ }
+ if (newPoint.getY() > point.getY())
+ {
+ printf("unconservative Y, diffY = %f, oldY=%f,newY=%f\n",newPoint.getY()-point.getY(), newPoint.getY(),point.getY());
+ }
+ if (newPoint.getZ() > point.getZ())
+ {
+ printf("unconservative Z, diffZ = %f, oldZ=%f,newZ=%f\n",newPoint.getZ()-point.getZ(), newPoint.getZ(),point.getZ());
+ }
+ }
+#endif //DEBUG_CHECK_DEQUANTIZATION
+
+ }
+
+
+ SIMD_FORCE_INLINE void quantizeWithClamp(unsigned short* out, const btVector3& point2,int isMax) const
+ {
+
+ btAssert(m_useQuantization);
+
+ btVector3 clampedPoint(point2);
+ clampedPoint.setMax(m_bvhAabbMin);
+ clampedPoint.setMin(m_bvhAabbMax);
+
+ quantize(out,clampedPoint,isMax);
+
+ }
+
+ SIMD_FORCE_INLINE btVector3 unQuantize(const unsigned short* vecIn) const
+ {
+ btVector3 vecOut;
+ vecOut.setValue(
+ (btScalar)(vecIn[0]) / (m_bvhQuantization.getX()),
+ (btScalar)(vecIn[1]) / (m_bvhQuantization.getY()),
+ (btScalar)(vecIn[2]) / (m_bvhQuantization.getZ()));
+ vecOut += m_bvhAabbMin;
+ return vecOut;
+ }
+
+ ///setTraversalMode let's you choose between stackless, recursive or stackless cache friendly tree traversal. Note this is only implemented for quantized trees.
+ void setTraversalMode(btTraversalMode traversalMode)
+ {
+ m_traversalMode = traversalMode;
+ }
+
+
+ SIMD_FORCE_INLINE QuantizedNodeArray& getQuantizedNodeArray()
+ {
+ return m_quantizedContiguousNodes;
+ }
+
+
+ SIMD_FORCE_INLINE BvhSubtreeInfoArray& getSubtreeInfoArray()
+ {
+ return m_SubtreeHeaders;
+ }
+
+////////////////////////////////////////////////////////////////////
+
+ /////Calculate space needed to store BVH for serialization
+ unsigned calculateSerializeBufferSize() const;
+
+ /// Data buffer MUST be 16 byte aligned
+ virtual bool serialize(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const;
+
+ ///deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'
+ static btQuantizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian);
+
+ static unsigned int getAlignmentSerializationPadding();
+//////////////////////////////////////////////////////////////////////
+
+
+ virtual int calculateSerializeBufferSizeNew() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+ virtual void deSerializeFloat(struct btQuantizedBvhFloatData& quantizedBvhFloatData);
+
+ virtual void deSerializeDouble(struct btQuantizedBvhDoubleData& quantizedBvhDoubleData);
+
+
+////////////////////////////////////////////////////////////////////
+
+ SIMD_FORCE_INLINE bool isQuantized()
+ {
+ return m_useQuantization;
+ }
+
+private:
+ // Special "copy" constructor that allows for in-place deserialization
+ // Prevents btVector3's default constructor from being called, but doesn't inialize much else
+ // ownsMemory should most likely be false if deserializing, and if you are not, don't call this (it also changes the function signature, which we need)
+ btQuantizedBvh(btQuantizedBvh &other, bool ownsMemory);
+
+}
+;
+
+
+struct btBvhSubtreeInfoData
+{
+ int m_rootNodeIndex;
+ int m_subtreeSize;
+ unsigned short m_quantizedAabbMin[3];
+ unsigned short m_quantizedAabbMax[3];
+};
+
+struct btOptimizedBvhNodeFloatData
+{
+ btVector3FloatData m_aabbMinOrg;
+ btVector3FloatData m_aabbMaxOrg;
+ int m_escapeIndex;
+ int m_subPart;
+ int m_triangleIndex;
+ char m_pad[4];
+};
+
+struct btOptimizedBvhNodeDoubleData
+{
+ btVector3DoubleData m_aabbMinOrg;
+ btVector3DoubleData m_aabbMaxOrg;
+ int m_escapeIndex;
+ int m_subPart;
+ int m_triangleIndex;
+ char m_pad[4];
+};
+
+
+struct btQuantizedBvhNodeData
+{
+ unsigned short m_quantizedAabbMin[3];
+ unsigned short m_quantizedAabbMax[3];
+ int m_escapeIndexOrTriangleIndex;
+};
+
+struct btQuantizedBvhFloatData
+{
+ btVector3FloatData m_bvhAabbMin;
+ btVector3FloatData m_bvhAabbMax;
+ btVector3FloatData m_bvhQuantization;
+ int m_curNodeIndex;
+ int m_useQuantization;
+ int m_numContiguousLeafNodes;
+ int m_numQuantizedContiguousNodes;
+ btOptimizedBvhNodeFloatData *m_contiguousNodesPtr;
+ btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
+ btBvhSubtreeInfoData *m_subTreeInfoPtr;
+ int m_traversalMode;
+ int m_numSubtreeHeaders;
+
+};
+
+struct btQuantizedBvhDoubleData
+{
+ btVector3DoubleData m_bvhAabbMin;
+ btVector3DoubleData m_bvhAabbMax;
+ btVector3DoubleData m_bvhQuantization;
+ int m_curNodeIndex;
+ int m_useQuantization;
+ int m_numContiguousLeafNodes;
+ int m_numQuantizedContiguousNodes;
+ btOptimizedBvhNodeDoubleData *m_contiguousNodesPtr;
+ btQuantizedBvhNodeData *m_quantizedContiguousNodesPtr;
+
+ int m_traversalMode;
+ int m_numSubtreeHeaders;
+ btBvhSubtreeInfoData *m_subTreeInfoPtr;
+};
+
+
+SIMD_FORCE_INLINE int btQuantizedBvh::calculateSerializeBufferSizeNew() const
+{
+ return sizeof(btQuantizedBvhData);
+}
+
+
+
+#endif //BT_QUANTIZED_BVH_H
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp b/tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
new file mode 100644
index 00000000..752fcd0f
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
@@ -0,0 +1,349 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSimpleBroadphase.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "LinearMath/btAabbUtil2.h"
+
+#include <new>
+
+extern int gOverlappingPairs;
+
+void btSimpleBroadphase::validate()
+{
+ for (int i=0;i<m_numHandles;i++)
+ {
+ for (int j=i+1;j<m_numHandles;j++)
+ {
+ btAssert(&m_pHandles[i] != &m_pHandles[j]);
+ }
+ }
+
+}
+
+btSimpleBroadphase::btSimpleBroadphase(int maxProxies, btOverlappingPairCache* overlappingPairCache)
+ :m_pairCache(overlappingPairCache),
+ m_ownsPairCache(false),
+ m_invalidPair(0)
+{
+
+ if (!overlappingPairCache)
+ {
+ void* mem = btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16);
+ m_pairCache = new (mem)btHashedOverlappingPairCache();
+ m_ownsPairCache = true;
+ }
+
+ // allocate handles buffer and put all handles on free list
+ m_pHandlesRawPtr = btAlignedAlloc(sizeof(btSimpleBroadphaseProxy)*maxProxies,16);
+ m_pHandles = new(m_pHandlesRawPtr) btSimpleBroadphaseProxy[maxProxies];
+ m_maxHandles = maxProxies;
+ m_numHandles = 0;
+ m_firstFreeHandle = 0;
+ m_LastHandleIndex = -1;
+
+
+ {
+ for (int i = m_firstFreeHandle; i < maxProxies; i++)
+ {
+ m_pHandles[i].SetNextFree(i + 1);
+ m_pHandles[i].m_uniqueId = i+2;//any UID will do, we just avoid too trivial values (0,1) for debugging purposes
+ }
+ m_pHandles[maxProxies - 1].SetNextFree(0);
+
+ }
+
+}
+
+btSimpleBroadphase::~btSimpleBroadphase()
+{
+ btAlignedFree(m_pHandlesRawPtr);
+
+ if (m_ownsPairCache)
+ {
+ m_pairCache->~btOverlappingPairCache();
+ btAlignedFree(m_pairCache);
+ }
+}
+
+
+btBroadphaseProxy* btSimpleBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* /*dispatcher*/,void* multiSapProxy)
+{
+ if (m_numHandles >= m_maxHandles)
+ {
+ btAssert(0);
+ return 0; //should never happen, but don't let the game crash ;-)
+ }
+ btAssert(aabbMin[0]<= aabbMax[0] && aabbMin[1]<= aabbMax[1] && aabbMin[2]<= aabbMax[2]);
+
+ int newHandleIndex = allocHandle();
+ btSimpleBroadphaseProxy* proxy = new (&m_pHandles[newHandleIndex])btSimpleBroadphaseProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy);
+
+ return proxy;
+}
+
+class RemovingOverlapCallback : public btOverlapCallback
+{
+protected:
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ (void)pair;
+ btAssert(0);
+ return false;
+ }
+};
+
+class RemovePairContainingProxy
+{
+
+ btBroadphaseProxy* m_targetProxy;
+ public:
+ virtual ~RemovePairContainingProxy()
+ {
+ }
+protected:
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy0);
+ btSimpleBroadphaseProxy* proxy1 = static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy1);
+
+ return ((m_targetProxy == proxy0 || m_targetProxy == proxy1));
+ };
+};
+
+void btSimpleBroadphase::destroyProxy(btBroadphaseProxy* proxyOrg,btDispatcher* dispatcher)
+{
+
+ btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(proxyOrg);
+ freeHandle(proxy0);
+
+ m_pairCache->removeOverlappingPairsContainingProxy(proxyOrg,dispatcher);
+
+ //validate();
+
+}
+
+void btSimpleBroadphase::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
+{
+ const btSimpleBroadphaseProxy* sbp = getSimpleProxyFromProxy(proxy);
+ aabbMin = sbp->m_aabbMin;
+ aabbMax = sbp->m_aabbMax;
+}
+
+void btSimpleBroadphase::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* /*dispatcher*/)
+{
+ btSimpleBroadphaseProxy* sbp = getSimpleProxyFromProxy(proxy);
+ sbp->m_aabbMin = aabbMin;
+ sbp->m_aabbMax = aabbMax;
+}
+
+void btSimpleBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ for (int i=0; i <= m_LastHandleIndex; i++)
+ {
+ btSimpleBroadphaseProxy* proxy = &m_pHandles[i];
+ if(!proxy->m_clientObject)
+ {
+ continue;
+ }
+ rayCallback.process(proxy);
+ }
+}
+
+
+void btSimpleBroadphase::aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback)
+{
+ for (int i=0; i <= m_LastHandleIndex; i++)
+ {
+ btSimpleBroadphaseProxy* proxy = &m_pHandles[i];
+ if(!proxy->m_clientObject)
+ {
+ continue;
+ }
+ if (TestAabbAgainstAabb2(aabbMin,aabbMax,proxy->m_aabbMin,proxy->m_aabbMax))
+ {
+ callback.process(proxy);
+ }
+ }
+}
+
+
+
+
+
+
+
+bool btSimpleBroadphase::aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1)
+{
+ return proxy0->m_aabbMin[0] <= proxy1->m_aabbMax[0] && proxy1->m_aabbMin[0] <= proxy0->m_aabbMax[0] &&
+ proxy0->m_aabbMin[1] <= proxy1->m_aabbMax[1] && proxy1->m_aabbMin[1] <= proxy0->m_aabbMax[1] &&
+ proxy0->m_aabbMin[2] <= proxy1->m_aabbMax[2] && proxy1->m_aabbMin[2] <= proxy0->m_aabbMax[2];
+
+}
+
+
+
+//then remove non-overlapping ones
+class CheckOverlapCallback : public btOverlapCallback
+{
+public:
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ return (!btSimpleBroadphase::aabbOverlap(static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy0),static_cast<btSimpleBroadphaseProxy*>(pair.m_pProxy1)));
+ }
+};
+
+void btSimpleBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
+{
+ //first check for new overlapping pairs
+ int i,j;
+ if (m_numHandles >= 0)
+ {
+ int new_largest_index = -1;
+ for (i=0; i <= m_LastHandleIndex; i++)
+ {
+ btSimpleBroadphaseProxy* proxy0 = &m_pHandles[i];
+ if(!proxy0->m_clientObject)
+ {
+ continue;
+ }
+ new_largest_index = i;
+ for (j=i+1; j <= m_LastHandleIndex; j++)
+ {
+ btSimpleBroadphaseProxy* proxy1 = &m_pHandles[j];
+ btAssert(proxy0 != proxy1);
+ if(!proxy1->m_clientObject)
+ {
+ continue;
+ }
+
+ btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0);
+ btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1);
+
+ if (aabbOverlap(p0,p1))
+ {
+ if ( !m_pairCache->findPair(proxy0,proxy1))
+ {
+ m_pairCache->addOverlappingPair(proxy0,proxy1);
+ }
+ } else
+ {
+ if (!m_pairCache->hasDeferredRemoval())
+ {
+ if ( m_pairCache->findPair(proxy0,proxy1))
+ {
+ m_pairCache->removeOverlappingPair(proxy0,proxy1,dispatcher);
+ }
+ }
+ }
+ }
+ }
+
+ m_LastHandleIndex = new_largest_index;
+
+ if (m_ownsPairCache && m_pairCache->hasDeferredRemoval())
+ {
+
+ btBroadphasePairArray& overlappingPairArray = m_pairCache->getOverlappingPairArray();
+
+ //perform a sort, to find duplicates and to sort 'invalid' pairs to the end
+ overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
+
+ overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
+ m_invalidPair = 0;
+
+
+ btBroadphasePair previousPair;
+ previousPair.m_pProxy0 = 0;
+ previousPair.m_pProxy1 = 0;
+ previousPair.m_algorithm = 0;
+
+
+ for (i=0;i<overlappingPairArray.size();i++)
+ {
+
+ btBroadphasePair& pair = overlappingPairArray[i];
+
+ bool isDuplicate = (pair == previousPair);
+
+ previousPair = pair;
+
+ bool needsRemoval = false;
+
+ if (!isDuplicate)
+ {
+ bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1);
+
+ if (hasOverlap)
+ {
+ needsRemoval = false;//callback->processOverlap(pair);
+ } else
+ {
+ needsRemoval = true;
+ }
+ } else
+ {
+ //remove duplicate
+ needsRemoval = true;
+ //should have no algorithm
+ btAssert(!pair.m_algorithm);
+ }
+
+ if (needsRemoval)
+ {
+ m_pairCache->cleanOverlappingPair(pair,dispatcher);
+
+ // m_overlappingPairArray.swap(i,m_overlappingPairArray.size()-1);
+ // m_overlappingPairArray.pop_back();
+ pair.m_pProxy0 = 0;
+ pair.m_pProxy1 = 0;
+ m_invalidPair++;
+ gOverlappingPairs--;
+ }
+
+ }
+
+ ///if you don't like to skip the invalid pairs in the array, execute following code:
+#define CLEAN_INVALID_PAIRS 1
+#ifdef CLEAN_INVALID_PAIRS
+
+ //perform a sort, to sort 'invalid' pairs to the end
+ overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
+
+ overlappingPairArray.resize(overlappingPairArray.size() - m_invalidPair);
+ m_invalidPair = 0;
+#endif//CLEAN_INVALID_PAIRS
+
+ }
+ }
+}
+
+
+bool btSimpleBroadphase::testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+{
+ btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0);
+ btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1);
+ return aabbOverlap(p0,p1);
+}
+
+void btSimpleBroadphase::resetPool(btDispatcher* dispatcher)
+{
+ //not yet
+}
diff --git a/tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h b/tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h
new file mode 100644
index 00000000..7cb3c40a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/BroadphaseCollision/btSimpleBroadphase.h
@@ -0,0 +1,171 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SIMPLE_BROADPHASE_H
+#define BT_SIMPLE_BROADPHASE_H
+
+
+#include "btOverlappingPairCache.h"
+
+
+struct btSimpleBroadphaseProxy : public btBroadphaseProxy
+{
+ int m_nextFree;
+
+// int m_handleId;
+
+
+ btSimpleBroadphaseProxy() {};
+
+ btSimpleBroadphaseProxy(const btVector3& minpt,const btVector3& maxpt,int shapeType,void* userPtr,short int collisionFilterGroup,short int collisionFilterMask,void* multiSapProxy)
+ :btBroadphaseProxy(minpt,maxpt,userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy)
+ {
+ (void)shapeType;
+ }
+
+
+ SIMD_FORCE_INLINE void SetNextFree(int next) {m_nextFree = next;}
+ SIMD_FORCE_INLINE int GetNextFree() const {return m_nextFree;}
+
+
+
+
+};
+
+///The SimpleBroadphase is just a unit-test for btAxisSweep3, bt32BitAxisSweep3, or btDbvtBroadphase, so use those classes instead.
+///It is a brute force aabb culling broadphase based on O(n^2) aabb checks
+class btSimpleBroadphase : public btBroadphaseInterface
+{
+
+protected:
+
+ int m_numHandles; // number of active handles
+ int m_maxHandles; // max number of handles
+ int m_LastHandleIndex;
+
+ btSimpleBroadphaseProxy* m_pHandles; // handles pool
+
+ void* m_pHandlesRawPtr;
+ int m_firstFreeHandle; // free handles list
+
+ int allocHandle()
+ {
+ btAssert(m_numHandles < m_maxHandles);
+ int freeHandle = m_firstFreeHandle;
+ m_firstFreeHandle = m_pHandles[freeHandle].GetNextFree();
+ m_numHandles++;
+ if(freeHandle > m_LastHandleIndex)
+ {
+ m_LastHandleIndex = freeHandle;
+ }
+ return freeHandle;
+ }
+
+ void freeHandle(btSimpleBroadphaseProxy* proxy)
+ {
+ int handle = int(proxy-m_pHandles);
+ btAssert(handle >= 0 && handle < m_maxHandles);
+ if(handle == m_LastHandleIndex)
+ {
+ m_LastHandleIndex--;
+ }
+ proxy->SetNextFree(m_firstFreeHandle);
+ m_firstFreeHandle = handle;
+
+ proxy->m_clientObject = 0;
+
+ m_numHandles--;
+ }
+
+ btOverlappingPairCache* m_pairCache;
+ bool m_ownsPairCache;
+
+ int m_invalidPair;
+
+
+
+ inline btSimpleBroadphaseProxy* getSimpleProxyFromProxy(btBroadphaseProxy* proxy)
+ {
+ btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(proxy);
+ return proxy0;
+ }
+
+ inline const btSimpleBroadphaseProxy* getSimpleProxyFromProxy(btBroadphaseProxy* proxy) const
+ {
+ const btSimpleBroadphaseProxy* proxy0 = static_cast<const btSimpleBroadphaseProxy*>(proxy);
+ return proxy0;
+ }
+
+ ///reset broadphase internal structures, to ensure determinism/reproducability
+ virtual void resetPool(btDispatcher* dispatcher);
+
+
+ void validate();
+
+protected:
+
+
+
+
+public:
+ btSimpleBroadphase(int maxProxies=16384,btOverlappingPairCache* overlappingPairCache=0);
+ virtual ~btSimpleBroadphase();
+
+
+ static bool aabbOverlap(btSimpleBroadphaseProxy* proxy0,btSimpleBroadphaseProxy* proxy1);
+
+
+ virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy);
+
+ virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
+
+ virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+ virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher);
+ virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
+
+ virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0),const btVector3& aabbMax=btVector3(0,0,0));
+ virtual void aabbTest(const btVector3& aabbMin, const btVector3& aabbMax, btBroadphaseAabbCallback& callback);
+
+ btOverlappingPairCache* getOverlappingPairCache()
+ {
+ return m_pairCache;
+ }
+ const btOverlappingPairCache* getOverlappingPairCache() const
+ {
+ return m_pairCache;
+ }
+
+ bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
+
+
+ ///getAabb returns the axis aligned bounding box in the 'global' coordinate frame
+ ///will add some transform later
+ virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ aabbMin.setValue(-BT_LARGE_FLOAT,-BT_LARGE_FLOAT,-BT_LARGE_FLOAT);
+ aabbMax.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOAT);
+ }
+
+ virtual void printStats()
+ {
+// printf("btSimpleBroadphase.h\n");
+// printf("numHandles = %d, maxHandles = %d\n",m_numHandles,m_maxHandles);
+ }
+};
+
+
+
+#endif //BT_SIMPLE_BROADPHASE_H
+
diff --git a/tests/bullet/src/BulletCollision/CMakeLists.txt b/tests/bullet/src/BulletCollision/CMakeLists.txt
new file mode 100644
index 00000000..cef6293e
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CMakeLists.txt
@@ -0,0 +1,279 @@
+INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src )
+
+SET(BulletCollision_SRCS
+ BroadphaseCollision/btAxisSweep3.cpp
+ BroadphaseCollision/btBroadphaseProxy.cpp
+ BroadphaseCollision/btCollisionAlgorithm.cpp
+ BroadphaseCollision/btDbvt.cpp
+ BroadphaseCollision/btDbvtBroadphase.cpp
+ BroadphaseCollision/btDispatcher.cpp
+ BroadphaseCollision/btMultiSapBroadphase.cpp
+ BroadphaseCollision/btOverlappingPairCache.cpp
+ BroadphaseCollision/btQuantizedBvh.cpp
+ BroadphaseCollision/btSimpleBroadphase.cpp
+ CollisionDispatch/btActivatingCollisionAlgorithm.cpp
+ CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
+ CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
+ CollisionDispatch/btBoxBoxDetector.cpp
+ CollisionDispatch/btCollisionDispatcher.cpp
+ CollisionDispatch/btCollisionObject.cpp
+ CollisionDispatch/btCollisionWorld.cpp
+ CollisionDispatch/btCompoundCollisionAlgorithm.cpp
+ CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
+ CollisionDispatch/btConvexConvexAlgorithm.cpp
+ CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
+ CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
+ CollisionDispatch/btDefaultCollisionConfiguration.cpp
+ CollisionDispatch/btEmptyCollisionAlgorithm.cpp
+ CollisionDispatch/btGhostObject.cpp
+ CollisionDispatch/btInternalEdgeUtility.cpp
+ CollisionDispatch/btInternalEdgeUtility.h
+ CollisionDispatch/btManifoldResult.cpp
+ CollisionDispatch/btSimulationIslandManager.cpp
+ CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
+ CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
+ CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
+ CollisionDispatch/btUnionFind.cpp
+ CollisionDispatch/SphereTriangleDetector.cpp
+ CollisionShapes/btBoxShape.cpp
+ CollisionShapes/btBox2dShape.cpp
+ CollisionShapes/btBvhTriangleMeshShape.cpp
+ CollisionShapes/btCapsuleShape.cpp
+ CollisionShapes/btCollisionShape.cpp
+ CollisionShapes/btCompoundShape.cpp
+ CollisionShapes/btConcaveShape.cpp
+ CollisionShapes/btConeShape.cpp
+ CollisionShapes/btConvexHullShape.cpp
+ CollisionShapes/btConvexInternalShape.cpp
+ CollisionShapes/btConvexPointCloudShape.cpp
+ CollisionShapes/btConvexPolyhedron.cpp
+ CollisionShapes/btConvexShape.cpp
+ CollisionShapes/btConvex2dShape.cpp
+ CollisionShapes/btConvexTriangleMeshShape.cpp
+ CollisionShapes/btCylinderShape.cpp
+ CollisionShapes/btEmptyShape.cpp
+ CollisionShapes/btHeightfieldTerrainShape.cpp
+ CollisionShapes/btMinkowskiSumShape.cpp
+ CollisionShapes/btMultimaterialTriangleMeshShape.cpp
+ CollisionShapes/btMultiSphereShape.cpp
+ CollisionShapes/btOptimizedBvh.cpp
+ CollisionShapes/btPolyhedralConvexShape.cpp
+ CollisionShapes/btScaledBvhTriangleMeshShape.cpp
+ CollisionShapes/btShapeHull.cpp
+ CollisionShapes/btSphereShape.cpp
+ CollisionShapes/btStaticPlaneShape.cpp
+ CollisionShapes/btStridingMeshInterface.cpp
+ CollisionShapes/btTetrahedronShape.cpp
+ CollisionShapes/btTriangleBuffer.cpp
+ CollisionShapes/btTriangleCallback.cpp
+ CollisionShapes/btTriangleIndexVertexArray.cpp
+ CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
+ CollisionShapes/btTriangleMesh.cpp
+ CollisionShapes/btTriangleMeshShape.cpp
+ CollisionShapes/btUniformScalingShape.cpp
+ Gimpact/btContactProcessing.cpp
+ Gimpact/btGenericPoolAllocator.cpp
+ Gimpact/btGImpactBvh.cpp
+ Gimpact/btGImpactCollisionAlgorithm.cpp
+ Gimpact/btGImpactQuantizedBvh.cpp
+ Gimpact/btGImpactShape.cpp
+ Gimpact/btTriangleShapeEx.cpp
+ Gimpact/gim_box_set.cpp
+ Gimpact/gim_contact.cpp
+ Gimpact/gim_memory.cpp
+ Gimpact/gim_tri_collision.cpp
+ NarrowPhaseCollision/btContinuousConvexCollision.cpp
+ NarrowPhaseCollision/btConvexCast.cpp
+ NarrowPhaseCollision/btGjkConvexCast.cpp
+ NarrowPhaseCollision/btGjkEpa2.cpp
+ NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
+ NarrowPhaseCollision/btGjkPairDetector.cpp
+ NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
+ NarrowPhaseCollision/btPersistentManifold.cpp
+ NarrowPhaseCollision/btRaycastCallback.cpp
+ NarrowPhaseCollision/btSubSimplexConvexCast.cpp
+ NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
+ NarrowPhaseCollision/btPolyhedralContactClipping.cpp
+)
+
+SET(Root_HDRS
+ ../btBulletCollisionCommon.h
+)
+SET(BroadphaseCollision_HDRS
+ BroadphaseCollision/btAxisSweep3.h
+ BroadphaseCollision/btBroadphaseInterface.h
+ BroadphaseCollision/btBroadphaseProxy.h
+ BroadphaseCollision/btCollisionAlgorithm.h
+ BroadphaseCollision/btDbvt.h
+ BroadphaseCollision/btDbvtBroadphase.h
+ BroadphaseCollision/btDispatcher.h
+ BroadphaseCollision/btMultiSapBroadphase.h
+ BroadphaseCollision/btOverlappingPairCache.h
+ BroadphaseCollision/btOverlappingPairCallback.h
+ BroadphaseCollision/btQuantizedBvh.h
+ BroadphaseCollision/btSimpleBroadphase.h
+)
+SET(CollisionDispatch_HDRS
+ CollisionDispatch/btActivatingCollisionAlgorithm.h
+ CollisionDispatch/btBoxBoxCollisionAlgorithm.h
+ CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
+ CollisionDispatch/btBoxBoxDetector.h
+ CollisionDispatch/btCollisionConfiguration.h
+ CollisionDispatch/btCollisionCreateFunc.h
+ CollisionDispatch/btCollisionDispatcher.h
+ CollisionDispatch/btCollisionObject.h
+ CollisionDispatch/btCollisionWorld.h
+ CollisionDispatch/btCompoundCollisionAlgorithm.h
+ CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
+ CollisionDispatch/btConvexConvexAlgorithm.h
+ CollisionDispatch/btConvex2dConvex2dAlgorithm.h
+ CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
+ CollisionDispatch/btDefaultCollisionConfiguration.h
+ CollisionDispatch/btEmptyCollisionAlgorithm.h
+ CollisionDispatch/btGhostObject.h
+ CollisionDispatch/btManifoldResult.h
+ CollisionDispatch/btSimulationIslandManager.h
+ CollisionDispatch/btSphereBoxCollisionAlgorithm.h
+ CollisionDispatch/btSphereSphereCollisionAlgorithm.h
+ CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
+ CollisionDispatch/btUnionFind.h
+ CollisionDispatch/SphereTriangleDetector.h
+)
+SET(CollisionShapes_HDRS
+ CollisionShapes/btBoxShape.h
+ CollisionShapes/btBox2dShape.h
+ CollisionShapes/btBvhTriangleMeshShape.h
+ CollisionShapes/btCapsuleShape.h
+ CollisionShapes/btCollisionMargin.h
+ CollisionShapes/btCollisionShape.h
+ CollisionShapes/btCompoundShape.h
+ CollisionShapes/btConcaveShape.h
+ CollisionShapes/btConeShape.h
+ CollisionShapes/btConvexHullShape.h
+ CollisionShapes/btConvexInternalShape.h
+ CollisionShapes/btConvexPointCloudShape.h
+ CollisionShapes/btConvexPolyhedron.h
+ CollisionShapes/btConvexShape.h
+ CollisionShapes/btConvex2dShape.h
+ CollisionShapes/btConvexTriangleMeshShape.h
+ CollisionShapes/btCylinderShape.h
+ CollisionShapes/btEmptyShape.h
+ CollisionShapes/btHeightfieldTerrainShape.h
+ CollisionShapes/btMaterial.h
+ CollisionShapes/btMinkowskiSumShape.h
+ CollisionShapes/btMultimaterialTriangleMeshShape.h
+ CollisionShapes/btMultiSphereShape.h
+ CollisionShapes/btOptimizedBvh.h
+ CollisionShapes/btPolyhedralConvexShape.h
+ CollisionShapes/btScaledBvhTriangleMeshShape.h
+ CollisionShapes/btShapeHull.h
+ CollisionShapes/btSphereShape.h
+ CollisionShapes/btStaticPlaneShape.h
+ CollisionShapes/btStridingMeshInterface.h
+ CollisionShapes/btTetrahedronShape.h
+ CollisionShapes/btTriangleBuffer.h
+ CollisionShapes/btTriangleCallback.h
+ CollisionShapes/btTriangleIndexVertexArray.h
+ CollisionShapes/btTriangleIndexVertexMaterialArray.h
+ CollisionShapes/btTriangleInfoMap.h
+ CollisionShapes/btTriangleMesh.h
+ CollisionShapes/btTriangleMeshShape.h
+ CollisionShapes/btTriangleShape.h
+ CollisionShapes/btUniformScalingShape.h
+)
+SET(Gimpact_HDRS
+ Gimpact/btBoxCollision.h
+ Gimpact/btClipPolygon.h
+ Gimpact/btContactProcessing.h
+ Gimpact/btGenericPoolAllocator.h
+ Gimpact/btGeometryOperations.h
+ Gimpact/btGImpactBvh.h
+ Gimpact/btGImpactCollisionAlgorithm.h
+ Gimpact/btGImpactMassUtil.h
+ Gimpact/btGImpactQuantizedBvh.h
+ Gimpact/btGImpactShape.h
+ Gimpact/btQuantization.h
+ Gimpact/btTriangleShapeEx.h
+ Gimpact/gim_array.h
+ Gimpact/gim_basic_geometry_operations.h
+ Gimpact/gim_bitset.h
+ Gimpact/gim_box_collision.h
+ Gimpact/gim_box_set.h
+ Gimpact/gim_clip_polygon.h
+ Gimpact/gim_contact.h
+ Gimpact/gim_geom_types.h
+ Gimpact/gim_geometry.h
+ Gimpact/gim_hash_table.h
+ Gimpact/gim_linear_math.h
+ Gimpact/gim_math.h
+ Gimpact/gim_memory.h
+ Gimpact/gim_radixsort.h
+ Gimpact/gim_tri_collision.h
+)
+SET(NarrowPhaseCollision_HDRS
+ NarrowPhaseCollision/btContinuousConvexCollision.h
+ NarrowPhaseCollision/btConvexCast.h
+ NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
+ NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
+ NarrowPhaseCollision/btGjkConvexCast.h
+ NarrowPhaseCollision/btGjkEpa2.h
+ NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
+ NarrowPhaseCollision/btGjkPairDetector.h
+ NarrowPhaseCollision/btManifoldPoint.h
+ NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
+ NarrowPhaseCollision/btPersistentManifold.h
+ NarrowPhaseCollision/btPointCollector.h
+ NarrowPhaseCollision/btRaycastCallback.h
+ NarrowPhaseCollision/btSimplexSolverInterface.h
+ NarrowPhaseCollision/btSubSimplexConvexCast.h
+ NarrowPhaseCollision/btVoronoiSimplexSolver.h
+ NarrowPhaseCollision/btPolyhedralContactClipping.h
+)
+
+SET(BulletCollision_HDRS
+ ${Root_HDRS}
+ ${BroadphaseCollision_HDRS}
+ ${CollisionDispatch_HDRS}
+ ${CollisionShapes_HDRS}
+ ${Gimpact_HDRS}
+ ${NarrowPhaseCollision_HDRS}
+)
+
+
+ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS})
+SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletCollision LinearMath)
+ENDIF (BUILD_SHARED_LIBS)
+
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ #INSTALL of other files requires CMake 2.6
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletCollision DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletCollision DESTINATION lib${LIB_SUFFIX})
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
+ INSTALL(FILES ../btBulletCollisionCommon.h
+DESTINATION ${INCLUDE_INSTALL_DIR}/BulletCollision)
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletCollision PROPERTIES FRAMEWORK true)
+
+ SET_TARGET_PROPERTIES(BulletCollision PROPERTIES PUBLIC_HEADER ${Root_HDRS})
+ # Have to list out sub-directories manually:
+ SET_PROPERTY(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision)
+ SET_PROPERTY(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch)
+ SET_PROPERTY(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes)
+ SET_PROPERTY(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact)
+ SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision)
+
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
new file mode 100644
index 00000000..23a5c752
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
@@ -0,0 +1,201 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "LinearMath/btScalar.h"
+#include "SphereTriangleDetector.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+
+
+SphereTriangleDetector::SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle,btScalar contactBreakingThreshold)
+:m_sphere(sphere),
+m_triangle(triangle),
+m_contactBreakingThreshold(contactBreakingThreshold)
+{
+
+}
+
+void SphereTriangleDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults)
+{
+
+ (void)debugDraw;
+ const btTransform& transformA = input.m_transformA;
+ const btTransform& transformB = input.m_transformB;
+
+ btVector3 point,normal;
+ btScalar timeOfImpact = btScalar(1.);
+ btScalar depth = btScalar(0.);
+// output.m_distance = btScalar(BT_LARGE_FLOAT);
+ //move sphere into triangle space
+ btTransform sphereInTr = transformB.inverseTimes(transformA);
+
+ if (collide(sphereInTr.getOrigin(),point,normal,depth,timeOfImpact,m_contactBreakingThreshold))
+ {
+ if (swapResults)
+ {
+ btVector3 normalOnB = transformB.getBasis()*normal;
+ btVector3 normalOnA = -normalOnB;
+ btVector3 pointOnA = transformB*point+normalOnB*depth;
+ output.addContactPoint(normalOnA,pointOnA,depth);
+ } else
+ {
+ output.addContactPoint(transformB.getBasis()*normal,transformB*point,depth);
+ }
+ }
+
+}
+
+
+
+// See also geometrictools.com
+// Basic idea: D = |p - (lo + t0*lv)| where t0 = lv . (p - lo) / lv . lv
+btScalar SegmentSqrDistance(const btVector3& from, const btVector3& to,const btVector3 &p, btVector3 &nearest);
+
+btScalar SegmentSqrDistance(const btVector3& from, const btVector3& to,const btVector3 &p, btVector3 &nearest) {
+ btVector3 diff = p - from;
+ btVector3 v = to - from;
+ btScalar t = v.dot(diff);
+
+ if (t > 0) {
+ btScalar dotVV = v.dot(v);
+ if (t < dotVV) {
+ t /= dotVV;
+ diff -= t*v;
+ } else {
+ t = 1;
+ diff -= v;
+ }
+ } else
+ t = 0;
+
+ nearest = from + t*v;
+ return diff.dot(diff);
+}
+
+bool SphereTriangleDetector::facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal) {
+ btVector3 lp(p);
+ btVector3 lnormal(normal);
+
+ return pointInTriangle(vertices, lnormal, &lp);
+}
+
+bool SphereTriangleDetector::collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold)
+{
+
+ const btVector3* vertices = &m_triangle->getVertexPtr(0);
+
+ btScalar radius = m_sphere->getRadius();
+ btScalar radiusWithThreshold = radius + contactBreakingThreshold;
+
+ btVector3 normal = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[0]);
+ normal.normalize();
+ btVector3 p1ToCentre = sphereCenter - vertices[0];
+ btScalar distanceFromPlane = p1ToCentre.dot(normal);
+
+ if (distanceFromPlane < btScalar(0.))
+ {
+ //triangle facing the other way
+ distanceFromPlane *= btScalar(-1.);
+ normal *= btScalar(-1.);
+ }
+
+ bool isInsideContactPlane = distanceFromPlane < radiusWithThreshold;
+
+ // Check for contact / intersection
+ bool hasContact = false;
+ btVector3 contactPoint;
+ if (isInsideContactPlane) {
+ if (facecontains(sphereCenter,vertices,normal)) {
+ // Inside the contact wedge - touches a point on the shell plane
+ hasContact = true;
+ contactPoint = sphereCenter - normal*distanceFromPlane;
+ } else {
+ // Could be inside one of the contact capsules
+ btScalar contactCapsuleRadiusSqr = radiusWithThreshold*radiusWithThreshold;
+ btVector3 nearestOnEdge;
+ for (int i = 0; i < m_triangle->getNumEdges(); i++) {
+
+ btVector3 pa;
+ btVector3 pb;
+
+ m_triangle->getEdge(i,pa,pb);
+
+ btScalar distanceSqr = SegmentSqrDistance(pa,pb,sphereCenter, nearestOnEdge);
+ if (distanceSqr < contactCapsuleRadiusSqr) {
+ // Yep, we're inside a capsule
+ hasContact = true;
+ contactPoint = nearestOnEdge;
+ }
+
+ }
+ }
+ }
+
+ if (hasContact) {
+ btVector3 contactToCentre = sphereCenter - contactPoint;
+ btScalar distanceSqr = contactToCentre.length2();
+
+ if (distanceSqr < radiusWithThreshold*radiusWithThreshold)
+ {
+ if (distanceSqr>SIMD_EPSILON)
+ {
+ btScalar distance = btSqrt(distanceSqr);
+ resultNormal = contactToCentre;
+ resultNormal.normalize();
+ point = contactPoint;
+ depth = -(radius-distance);
+ } else
+ {
+ btScalar distance = 0.f;
+ resultNormal = normal;
+ point = contactPoint;
+ depth = -radius;
+ }
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
+bool SphereTriangleDetector::pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p )
+{
+ const btVector3* p1 = &vertices[0];
+ const btVector3* p2 = &vertices[1];
+ const btVector3* p3 = &vertices[2];
+
+ btVector3 edge1( *p2 - *p1 );
+ btVector3 edge2( *p3 - *p2 );
+ btVector3 edge3( *p1 - *p3 );
+
+ btVector3 p1_to_p( *p - *p1 );
+ btVector3 p2_to_p( *p - *p2 );
+ btVector3 p3_to_p( *p - *p3 );
+
+ btVector3 edge1_normal( edge1.cross(normal));
+ btVector3 edge2_normal( edge2.cross(normal));
+ btVector3 edge3_normal( edge3.cross(normal));
+
+ btScalar r1, r2, r3;
+ r1 = edge1_normal.dot( p1_to_p );
+ r2 = edge2_normal.dot( p2_to_p );
+ r3 = edge3_normal.dot( p3_to_p );
+ if ( ( r1 > 0 && r2 > 0 && r3 > 0 ) ||
+ ( r1 <= 0 && r2 <= 0 && r3 <= 0 ) )
+ return true;
+ return false;
+
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h b/tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h
new file mode 100644
index 00000000..22953af4
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/SphereTriangleDetector.h
@@ -0,0 +1,51 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPHERE_TRIANGLE_DETECTOR_H
+#define BT_SPHERE_TRIANGLE_DETECTOR_H
+
+#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
+
+
+
+class btSphereShape;
+class btTriangleShape;
+
+
+
+/// sphere-triangle to match the btDiscreteCollisionDetectorInterface
+struct SphereTriangleDetector : public btDiscreteCollisionDetectorInterface
+{
+ virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false);
+
+ SphereTriangleDetector(btSphereShape* sphere,btTriangleShape* triangle, btScalar contactBreakingThreshold);
+
+ virtual ~SphereTriangleDetector() {};
+
+ bool collide(const btVector3& sphereCenter,btVector3 &point, btVector3& resultNormal, btScalar& depth, btScalar &timeOfImpact, btScalar contactBreakingThreshold);
+
+private:
+
+
+ bool pointInTriangle(const btVector3 vertices[], const btVector3 &normal, btVector3 *p );
+ bool facecontains(const btVector3 &p,const btVector3* vertices,btVector3& normal);
+
+ btSphereShape* m_sphere;
+ btTriangleShape* m_triangle;
+ btScalar m_contactBreakingThreshold;
+
+};
+#endif //BT_SPHERE_TRIANGLE_DETECTOR_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp
new file mode 100644
index 00000000..7e5da6c5
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp
@@ -0,0 +1,47 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "btCollisionDispatcher.h"
+#include "btCollisionObject.h"
+
+btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci)
+:btCollisionAlgorithm(ci)
+//,
+//m_colObj0(0),
+//m_colObj1(0)
+{
+}
+btActivatingCollisionAlgorithm::btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* colObj0,btCollisionObject* colObj1)
+:btCollisionAlgorithm(ci)
+//,
+//m_colObj0(0),
+//m_colObj1(0)
+{
+// if (ci.m_dispatcher1->needsCollision(colObj0,colObj1))
+// {
+// m_colObj0 = colObj0;
+// m_colObj1 = colObj1;
+//
+// m_colObj0->activate();
+// m_colObj1->activate();
+// }
+}
+
+btActivatingCollisionAlgorithm::~btActivatingCollisionAlgorithm()
+{
+// m_colObj0->activate();
+// m_colObj1->activate();
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h
new file mode 100644
index 00000000..25fe0889
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h
@@ -0,0 +1,36 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef __BT_ACTIVATING_COLLISION_ALGORITHM_H
+#define __BT_ACTIVATING_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+
+///This class is not enabled yet (work-in-progress) to more aggressively activate objects.
+class btActivatingCollisionAlgorithm : public btCollisionAlgorithm
+{
+// btCollisionObject* m_colObj0;
+// btCollisionObject* m_colObj1;
+
+public:
+
+ btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci);
+
+ btActivatingCollisionAlgorithm (const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* colObj0,btCollisionObject* colObj1);
+
+ virtual ~btActivatingCollisionAlgorithm();
+
+};
+#endif //__BT_ACTIVATING_COLLISION_ALGORITHM_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
new file mode 100644
index 00000000..2182d0d7
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
@@ -0,0 +1,435 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+* The b2CollidePolygons routines are Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///btBox2dBox2dCollisionAlgorithm, with modified b2CollidePolygons routines from the Box2D library.
+///The modifications include: switching from b2Vec to btVector3, redefinition of b2Dot, b2Cross
+
+#include "btBox2dBox2dCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionDispatch/btBoxBoxDetector.h"
+#include "BulletCollision/CollisionShapes/btBox2dShape.h"
+
+#define USE_PERSISTENT_CONTACTS 1
+
+btBox2dBox2dCollisionAlgorithm::btBox2dBox2dCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* obj0,btCollisionObject* obj1)
+: btActivatingCollisionAlgorithm(ci,obj0,obj1),
+m_ownManifold(false),
+m_manifoldPtr(mf)
+{
+ if (!m_manifoldPtr && m_dispatcher->needsCollision(obj0,obj1))
+ {
+ m_manifoldPtr = m_dispatcher->getNewManifold(obj0,obj1);
+ m_ownManifold = true;
+ }
+}
+
+btBox2dBox2dCollisionAlgorithm::~btBox2dBox2dCollisionAlgorithm()
+{
+
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+
+}
+
+
+void b2CollidePolygons(btManifoldResult* manifold, const btBox2dShape* polyA, const btTransform& xfA, const btBox2dShape* polyB, const btTransform& xfB);
+
+//#include <stdio.h>
+void btBox2dBox2dCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ if (!m_manifoldPtr)
+ return;
+
+ btCollisionObject* col0 = body0;
+ btCollisionObject* col1 = body1;
+ btBox2dShape* box0 = (btBox2dShape*)col0->getCollisionShape();
+ btBox2dShape* box1 = (btBox2dShape*)col1->getCollisionShape();
+
+ resultOut->setPersistentManifold(m_manifoldPtr);
+
+ b2CollidePolygons(resultOut,box0,col0->getWorldTransform(),box1,col1->getWorldTransform());
+
+ // refreshContactPoints is only necessary when using persistent contact points. otherwise all points are newly added
+ if (m_ownManifold)
+ {
+ resultOut->refreshContactPoints();
+ }
+
+}
+
+btScalar btBox2dBox2dCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* /*body0*/,btCollisionObject* /*body1*/,const btDispatcherInfo& /*dispatchInfo*/,btManifoldResult* /*resultOut*/)
+{
+ //not yet
+ return 1.f;
+}
+
+
+struct ClipVertex
+{
+ btVector3 v;
+ int id;
+ //b2ContactID id;
+ //b2ContactID id;
+};
+
+#define b2Dot(a,b) (a).dot(b)
+#define b2Mul(a,b) (a)*(b)
+#define b2MulT(a,b) (a).transpose()*(b)
+#define b2Cross(a,b) (a).cross(b)
+#define btCrossS(a,s) btVector3(s * a.getY(), -s * a.getX(),0.f)
+
+int b2_maxManifoldPoints =2;
+
+static int ClipSegmentToLine(ClipVertex vOut[2], ClipVertex vIn[2],
+ const btVector3& normal, btScalar offset)
+{
+ // Start with no output points
+ int numOut = 0;
+
+ // Calculate the distance of end points to the line
+ btScalar distance0 = b2Dot(normal, vIn[0].v) - offset;
+ btScalar distance1 = b2Dot(normal, vIn[1].v) - offset;
+
+ // If the points are behind the plane
+ if (distance0 <= 0.0f) vOut[numOut++] = vIn[0];
+ if (distance1 <= 0.0f) vOut[numOut++] = vIn[1];
+
+ // If the points are on different sides of the plane
+ if (distance0 * distance1 < 0.0f)
+ {
+ // Find intersection point of edge and plane
+ btScalar interp = distance0 / (distance0 - distance1);
+ vOut[numOut].v = vIn[0].v + interp * (vIn[1].v - vIn[0].v);
+ if (distance0 > 0.0f)
+ {
+ vOut[numOut].id = vIn[0].id;
+ }
+ else
+ {
+ vOut[numOut].id = vIn[1].id;
+ }
+ ++numOut;
+ }
+
+ return numOut;
+}
+
+// Find the separation between poly1 and poly2 for a give edge normal on poly1.
+static btScalar EdgeSeparation(const btBox2dShape* poly1, const btTransform& xf1, int edge1,
+ const btBox2dShape* poly2, const btTransform& xf2)
+{
+ const btVector3* vertices1 = poly1->getVertices();
+ const btVector3* normals1 = poly1->getNormals();
+
+ int count2 = poly2->getVertexCount();
+ const btVector3* vertices2 = poly2->getVertices();
+
+ btAssert(0 <= edge1 && edge1 < poly1->getVertexCount());
+
+ // Convert normal from poly1's frame into poly2's frame.
+ btVector3 normal1World = b2Mul(xf1.getBasis(), normals1[edge1]);
+ btVector3 normal1 = b2MulT(xf2.getBasis(), normal1World);
+
+ // Find support vertex on poly2 for -normal.
+ int index = 0;
+ btScalar minDot = BT_LARGE_FLOAT;
+
+ for (int i = 0; i < count2; ++i)
+ {
+ btScalar dot = b2Dot(vertices2[i], normal1);
+ if (dot < minDot)
+ {
+ minDot = dot;
+ index = i;
+ }
+ }
+
+ btVector3 v1 = b2Mul(xf1, vertices1[edge1]);
+ btVector3 v2 = b2Mul(xf2, vertices2[index]);
+ btScalar separation = b2Dot(v2 - v1, normal1World);
+ return separation;
+}
+
+// Find the max separation between poly1 and poly2 using edge normals from poly1.
+static btScalar FindMaxSeparation(int* edgeIndex,
+ const btBox2dShape* poly1, const btTransform& xf1,
+ const btBox2dShape* poly2, const btTransform& xf2)
+{
+ int count1 = poly1->getVertexCount();
+ const btVector3* normals1 = poly1->getNormals();
+
+ // Vector pointing from the centroid of poly1 to the centroid of poly2.
+ btVector3 d = b2Mul(xf2, poly2->getCentroid()) - b2Mul(xf1, poly1->getCentroid());
+ btVector3 dLocal1 = b2MulT(xf1.getBasis(), d);
+
+ // Find edge normal on poly1 that has the largest projection onto d.
+ int edge = 0;
+ btScalar maxDot = -BT_LARGE_FLOAT;
+ for (int i = 0; i < count1; ++i)
+ {
+ btScalar dot = b2Dot(normals1[i], dLocal1);
+ if (dot > maxDot)
+ {
+ maxDot = dot;
+ edge = i;
+ }
+ }
+
+ // Get the separation for the edge normal.
+ btScalar s = EdgeSeparation(poly1, xf1, edge, poly2, xf2);
+ if (s > 0.0f)
+ {
+ return s;
+ }
+
+ // Check the separation for the previous edge normal.
+ int prevEdge = edge - 1 >= 0 ? edge - 1 : count1 - 1;
+ btScalar sPrev = EdgeSeparation(poly1, xf1, prevEdge, poly2, xf2);
+ if (sPrev > 0.0f)
+ {
+ return sPrev;
+ }
+
+ // Check the separation for the next edge normal.
+ int nextEdge = edge + 1 < count1 ? edge + 1 : 0;
+ btScalar sNext = EdgeSeparation(poly1, xf1, nextEdge, poly2, xf2);
+ if (sNext > 0.0f)
+ {
+ return sNext;
+ }
+
+ // Find the best edge and the search direction.
+ int bestEdge;
+ btScalar bestSeparation;
+ int increment;
+ if (sPrev > s && sPrev > sNext)
+ {
+ increment = -1;
+ bestEdge = prevEdge;
+ bestSeparation = sPrev;
+ }
+ else if (sNext > s)
+ {
+ increment = 1;
+ bestEdge = nextEdge;
+ bestSeparation = sNext;
+ }
+ else
+ {
+ *edgeIndex = edge;
+ return s;
+ }
+
+ // Perform a local search for the best edge normal.
+ for ( ; ; )
+ {
+ if (increment == -1)
+ edge = bestEdge - 1 >= 0 ? bestEdge - 1 : count1 - 1;
+ else
+ edge = bestEdge + 1 < count1 ? bestEdge + 1 : 0;
+
+ s = EdgeSeparation(poly1, xf1, edge, poly2, xf2);
+ if (s > 0.0f)
+ {
+ return s;
+ }
+
+ if (s > bestSeparation)
+ {
+ bestEdge = edge;
+ bestSeparation = s;
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ *edgeIndex = bestEdge;
+ return bestSeparation;
+}
+
+static void FindIncidentEdge(ClipVertex c[2],
+ const btBox2dShape* poly1, const btTransform& xf1, int edge1,
+ const btBox2dShape* poly2, const btTransform& xf2)
+{
+ const btVector3* normals1 = poly1->getNormals();
+
+ int count2 = poly2->getVertexCount();
+ const btVector3* vertices2 = poly2->getVertices();
+ const btVector3* normals2 = poly2->getNormals();
+
+ btAssert(0 <= edge1 && edge1 < poly1->getVertexCount());
+
+ // Get the normal of the reference edge in poly2's frame.
+ btVector3 normal1 = b2MulT(xf2.getBasis(), b2Mul(xf1.getBasis(), normals1[edge1]));
+
+ // Find the incident edge on poly2.
+ int index = 0;
+ btScalar minDot = BT_LARGE_FLOAT;
+ for (int i = 0; i < count2; ++i)
+ {
+ btScalar dot = b2Dot(normal1, normals2[i]);
+ if (dot < minDot)
+ {
+ minDot = dot;
+ index = i;
+ }
+ }
+
+ // Build the clip vertices for the incident edge.
+ int i1 = index;
+ int i2 = i1 + 1 < count2 ? i1 + 1 : 0;
+
+ c[0].v = b2Mul(xf2, vertices2[i1]);
+// c[0].id.features.referenceEdge = (unsigned char)edge1;
+// c[0].id.features.incidentEdge = (unsigned char)i1;
+// c[0].id.features.incidentVertex = 0;
+
+ c[1].v = b2Mul(xf2, vertices2[i2]);
+// c[1].id.features.referenceEdge = (unsigned char)edge1;
+// c[1].id.features.incidentEdge = (unsigned char)i2;
+// c[1].id.features.incidentVertex = 1;
+}
+
+// Find edge normal of max separation on A - return if separating axis is found
+// Find edge normal of max separation on B - return if separation axis is found
+// Choose reference edge as min(minA, minB)
+// Find incident edge
+// Clip
+
+// The normal points from 1 to 2
+void b2CollidePolygons(btManifoldResult* manifold,
+ const btBox2dShape* polyA, const btTransform& xfA,
+ const btBox2dShape* polyB, const btTransform& xfB)
+{
+
+ int edgeA = 0;
+ btScalar separationA = FindMaxSeparation(&edgeA, polyA, xfA, polyB, xfB);
+ if (separationA > 0.0f)
+ return;
+
+ int edgeB = 0;
+ btScalar separationB = FindMaxSeparation(&edgeB, polyB, xfB, polyA, xfA);
+ if (separationB > 0.0f)
+ return;
+
+ const btBox2dShape* poly1; // reference poly
+ const btBox2dShape* poly2; // incident poly
+ btTransform xf1, xf2;
+ int edge1; // reference edge
+ unsigned char flip;
+ const btScalar k_relativeTol = 0.98f;
+ const btScalar k_absoluteTol = 0.001f;
+
+ // TODO_ERIN use "radius" of poly for absolute tolerance.
+ if (separationB > k_relativeTol * separationA + k_absoluteTol)
+ {
+ poly1 = polyB;
+ poly2 = polyA;
+ xf1 = xfB;
+ xf2 = xfA;
+ edge1 = edgeB;
+ flip = 1;
+ }
+ else
+ {
+ poly1 = polyA;
+ poly2 = polyB;
+ xf1 = xfA;
+ xf2 = xfB;
+ edge1 = edgeA;
+ flip = 0;
+ }
+
+ ClipVertex incidentEdge[2];
+ FindIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2);
+
+ int count1 = poly1->getVertexCount();
+ const btVector3* vertices1 = poly1->getVertices();
+
+ btVector3 v11 = vertices1[edge1];
+ btVector3 v12 = edge1 + 1 < count1 ? vertices1[edge1+1] : vertices1[0];
+
+ btVector3 dv = v12 - v11;
+ btVector3 sideNormal = b2Mul(xf1.getBasis(), v12 - v11);
+ sideNormal.normalize();
+ btVector3 frontNormal = btCrossS(sideNormal, 1.0f);
+
+
+ v11 = b2Mul(xf1, v11);
+ v12 = b2Mul(xf1, v12);
+
+ btScalar frontOffset = b2Dot(frontNormal, v11);
+ btScalar sideOffset1 = -b2Dot(sideNormal, v11);
+ btScalar sideOffset2 = b2Dot(sideNormal, v12);
+
+ // Clip incident edge against extruded edge1 side edges.
+ ClipVertex clipPoints1[2];
+ clipPoints1[0].v.setValue(0,0,0);
+ clipPoints1[1].v.setValue(0,0,0);
+
+ ClipVertex clipPoints2[2];
+ clipPoints2[0].v.setValue(0,0,0);
+ clipPoints2[1].v.setValue(0,0,0);
+
+
+ int np;
+
+ // Clip to box side 1
+ np = ClipSegmentToLine(clipPoints1, incidentEdge, -sideNormal, sideOffset1);
+
+ if (np < 2)
+ return;
+
+ // Clip to negative box side 1
+ np = ClipSegmentToLine(clipPoints2, clipPoints1, sideNormal, sideOffset2);
+
+ if (np < 2)
+ {
+ return;
+ }
+
+ // Now clipPoints2 contains the clipped points.
+ btVector3 manifoldNormal = flip ? -frontNormal : frontNormal;
+
+ int pointCount = 0;
+ for (int i = 0; i < b2_maxManifoldPoints; ++i)
+ {
+ btScalar separation = b2Dot(frontNormal, clipPoints2[i].v) - frontOffset;
+
+ if (separation <= 0.0f)
+ {
+
+ //b2ManifoldPoint* cp = manifold->points + pointCount;
+ //btScalar separation = separation;
+ //cp->localPoint1 = b2MulT(xfA, clipPoints2[i].v);
+ //cp->localPoint2 = b2MulT(xfB, clipPoints2[i].v);
+
+ manifold->addContactPoint(-manifoldNormal,clipPoints2[i].v,separation);
+
+// cp->id = clipPoints2[i].id;
+// cp->id.features.flip = flip;
+ ++pointCount;
+ }
+ }
+
+// manifold->pointCount = pointCount;}
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
new file mode 100644
index 00000000..97c5be77
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h
@@ -0,0 +1,66 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
+#define BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
+
+#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+
+class btPersistentManifold;
+
+///box-box collision detection
+class btBox2dBox2dCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+
+public:
+ btBox2dBox2dCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
+ : btActivatingCollisionAlgorithm(ci) {}
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ btBox2dBox2dCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1);
+
+ virtual ~btBox2dBox2dCollisionAlgorithm();
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr && m_ownManifold)
+ {
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+ }
+
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ int bbsize = sizeof(btBox2dBox2dCollisionAlgorithm);
+ void* ptr = ci.m_dispatcher1->allocateCollisionAlgorithm(bbsize);
+ return new(ptr) btBox2dBox2dCollisionAlgorithm(0,ci,body0,body1);
+ }
+ };
+
+};
+
+#endif //BT_BOX_2D_BOX_2D__COLLISION_ALGORITHM_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
new file mode 100644
index 00000000..49628853
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
@@ -0,0 +1,85 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btBoxBoxCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "btBoxBoxDetector.h"
+
+#define USE_PERSISTENT_CONTACTS 1
+
+btBoxBoxCollisionAlgorithm::btBoxBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* obj0,btCollisionObject* obj1)
+: btActivatingCollisionAlgorithm(ci,obj0,obj1),
+m_ownManifold(false),
+m_manifoldPtr(mf)
+{
+ if (!m_manifoldPtr && m_dispatcher->needsCollision(obj0,obj1))
+ {
+ m_manifoldPtr = m_dispatcher->getNewManifold(obj0,obj1);
+ m_ownManifold = true;
+ }
+}
+
+btBoxBoxCollisionAlgorithm::~btBoxBoxCollisionAlgorithm()
+{
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+}
+
+void btBoxBoxCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ if (!m_manifoldPtr)
+ return;
+
+ btCollisionObject* col0 = body0;
+ btCollisionObject* col1 = body1;
+ btBoxShape* box0 = (btBoxShape*)col0->getCollisionShape();
+ btBoxShape* box1 = (btBoxShape*)col1->getCollisionShape();
+
+
+
+ /// report a contact. internally this will be kept persistent, and contact reduction is done
+ resultOut->setPersistentManifold(m_manifoldPtr);
+#ifndef USE_PERSISTENT_CONTACTS
+ m_manifoldPtr->clearManifold();
+#endif //USE_PERSISTENT_CONTACTS
+
+ btDiscreteCollisionDetectorInterface::ClosestPointInput input;
+ input.m_maximumDistanceSquared = BT_LARGE_FLOAT;
+ input.m_transformA = body0->getWorldTransform();
+ input.m_transformB = body1->getWorldTransform();
+
+ btBoxBoxDetector detector(box0,box1);
+ detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);
+
+#ifdef USE_PERSISTENT_CONTACTS
+ // refreshContactPoints is only necessary when using persistent contact points. otherwise all points are newly added
+ if (m_ownManifold)
+ {
+ resultOut->refreshContactPoints();
+ }
+#endif //USE_PERSISTENT_CONTACTS
+
+}
+
+btScalar btBoxBoxCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* /*body0*/,btCollisionObject* /*body1*/,const btDispatcherInfo& /*dispatchInfo*/,btManifoldResult* /*resultOut*/)
+{
+ //not yet
+ return 1.f;
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h
new file mode 100644
index 00000000..f0bbae61
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h
@@ -0,0 +1,66 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_BOX_BOX__COLLISION_ALGORITHM_H
+#define BT_BOX_BOX__COLLISION_ALGORITHM_H
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+
+class btPersistentManifold;
+
+///box-box collision detection
+class btBoxBoxCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+
+public:
+ btBoxBoxCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
+ : btActivatingCollisionAlgorithm(ci) {}
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ btBoxBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1);
+
+ virtual ~btBoxBoxCollisionAlgorithm();
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr && m_ownManifold)
+ {
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+ }
+
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ int bbsize = sizeof(btBoxBoxCollisionAlgorithm);
+ void* ptr = ci.m_dispatcher1->allocateCollisionAlgorithm(bbsize);
+ return new(ptr) btBoxBoxCollisionAlgorithm(0,ci,body0,body1);
+ }
+ };
+
+};
+
+#endif //BT_BOX_BOX__COLLISION_ALGORITHM_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp
new file mode 100644
index 00000000..a7c8cf14
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp
@@ -0,0 +1,718 @@
+/*
+ * Box-Box collision detection re-distributed under the ZLib license with permission from Russell L. Smith
+ * Original version is from Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith.
+ * All rights reserved. Email: russ@q12.org Web: www.q12.org
+ Bullet Continuous Collision Detection and Physics Library
+ Bullet is Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///ODE box-box collision detection is adapted to work with Bullet
+
+#include "btBoxBoxDetector.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+
+#include <float.h>
+#include <string.h>
+
+btBoxBoxDetector::btBoxBoxDetector(btBoxShape* box1,btBoxShape* box2)
+: m_box1(box1),
+m_box2(box2)
+{
+
+}
+
+
+// given two boxes (p1,R1,side1) and (p2,R2,side2), collide them together and
+// generate contact points. this returns 0 if there is no contact otherwise
+// it returns the number of contacts generated.
+// `normal' returns the contact normal.
+// `depth' returns the maximum penetration depth along that normal.
+// `return_code' returns a number indicating the type of contact that was
+// detected:
+// 1,2,3 = box 2 intersects with a face of box 1
+// 4,5,6 = box 1 intersects with a face of box 2
+// 7..15 = edge-edge contact
+// `maxc' is the maximum number of contacts allowed to be generated, i.e.
+// the size of the `contact' array.
+// `contact' and `skip' are the contact array information provided to the
+// collision functions. this function only fills in the position and depth
+// fields.
+struct dContactGeom;
+#define dDOTpq(a,b,p,q) ((a)[0]*(b)[0] + (a)[p]*(b)[q] + (a)[2*(p)]*(b)[2*(q)])
+#define dInfinity FLT_MAX
+
+
+/*PURE_INLINE btScalar dDOT (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,1); }
+PURE_INLINE btScalar dDOT13 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,3); }
+PURE_INLINE btScalar dDOT31 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,3,1); }
+PURE_INLINE btScalar dDOT33 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,3,3); }
+*/
+static btScalar dDOT (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,1); }
+static btScalar dDOT44 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,4,4); }
+static btScalar dDOT41 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,4,1); }
+static btScalar dDOT14 (const btScalar *a, const btScalar *b) { return dDOTpq(a,b,1,4); }
+#define dMULTIPLYOP1_331(A,op,B,C) \
+{\
+ (A)[0] op dDOT41((B),(C)); \
+ (A)[1] op dDOT41((B+1),(C)); \
+ (A)[2] op dDOT41((B+2),(C)); \
+}
+
+#define dMULTIPLYOP0_331(A,op,B,C) \
+{ \
+ (A)[0] op dDOT((B),(C)); \
+ (A)[1] op dDOT((B+4),(C)); \
+ (A)[2] op dDOT((B+8),(C)); \
+}
+
+#define dMULTIPLY1_331(A,B,C) dMULTIPLYOP1_331(A,=,B,C)
+#define dMULTIPLY0_331(A,B,C) dMULTIPLYOP0_331(A,=,B,C)
+
+typedef btScalar dMatrix3[4*3];
+
+void dLineClosestApproach (const btVector3& pa, const btVector3& ua,
+ const btVector3& pb, const btVector3& ub,
+ btScalar *alpha, btScalar *beta);
+void dLineClosestApproach (const btVector3& pa, const btVector3& ua,
+ const btVector3& pb, const btVector3& ub,
+ btScalar *alpha, btScalar *beta)
+{
+ btVector3 p;
+ p[0] = pb[0] - pa[0];
+ p[1] = pb[1] - pa[1];
+ p[2] = pb[2] - pa[2];
+ btScalar uaub = dDOT(ua,ub);
+ btScalar q1 = dDOT(ua,p);
+ btScalar q2 = -dDOT(ub,p);
+ btScalar d = 1-uaub*uaub;
+ if (d <= btScalar(0.0001f)) {
+ // @@@ this needs to be made more robust
+ *alpha = 0;
+ *beta = 0;
+ }
+ else {
+ d = 1.f/d;
+ *alpha = (q1 + uaub*q2)*d;
+ *beta = (uaub*q1 + q2)*d;
+ }
+}
+
+
+
+// find all the intersection points between the 2D rectangle with vertices
+// at (+/-h[0],+/-h[1]) and the 2D quadrilateral with vertices (p[0],p[1]),
+// (p[2],p[3]),(p[4],p[5]),(p[6],p[7]).
+//
+// the intersection points are returned as x,y pairs in the 'ret' array.
+// the number of intersection points is returned by the function (this will
+// be in the range 0 to 8).
+
+static int intersectRectQuad2 (btScalar h[2], btScalar p[8], btScalar ret[16])
+{
+ // q (and r) contain nq (and nr) coordinate points for the current (and
+ // chopped) polygons
+ int nq=4,nr=0;
+ btScalar buffer[16];
+ btScalar *q = p;
+ btScalar *r = ret;
+ for (int dir=0; dir <= 1; dir++) {
+ // direction notation: xy[0] = x axis, xy[1] = y axis
+ for (int sign=-1; sign <= 1; sign += 2) {
+ // chop q along the line xy[dir] = sign*h[dir]
+ btScalar *pq = q;
+ btScalar *pr = r;
+ nr = 0;
+ for (int i=nq; i > 0; i--) {
+ // go through all points in q and all lines between adjacent points
+ if (sign*pq[dir] < h[dir]) {
+ // this point is inside the chopping line
+ pr[0] = pq[0];
+ pr[1] = pq[1];
+ pr += 2;
+ nr++;
+ if (nr & 8) {
+ q = r;
+ goto done;
+ }
+ }
+ btScalar *nextq = (i > 1) ? pq+2 : q;
+ if ((sign*pq[dir] < h[dir]) ^ (sign*nextq[dir] < h[dir])) {
+ // this line crosses the chopping line
+ pr[1-dir] = pq[1-dir] + (nextq[1-dir]-pq[1-dir]) /
+ (nextq[dir]-pq[dir]) * (sign*h[dir]-pq[dir]);
+ pr[dir] = sign*h[dir];
+ pr += 2;
+ nr++;
+ if (nr & 8) {
+ q = r;
+ goto done;
+ }
+ }
+ pq += 2;
+ }
+ q = r;
+ r = (q==ret) ? buffer : ret;
+ nq = nr;
+ }
+ }
+ done:
+ if (q != ret) memcpy (ret,q,nr*2*sizeof(btScalar));
+ return nr;
+}
+
+
+#define M__PI 3.14159265f
+
+// given n points in the plane (array p, of size 2*n), generate m points that
+// best represent the whole set. the definition of 'best' here is not
+// predetermined - the idea is to select points that give good box-box
+// collision detection behavior. the chosen point indexes are returned in the
+// array iret (of size m). 'i0' is always the first entry in the array.
+// n must be in the range [1..8]. m must be in the range [1..n]. i0 must be
+// in the range [0..n-1].
+
+void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[]);
+void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[])
+{
+ // compute the centroid of the polygon in cx,cy
+ int i,j;
+ btScalar a,cx,cy,q;
+ if (n==1) {
+ cx = p[0];
+ cy = p[1];
+ }
+ else if (n==2) {
+ cx = btScalar(0.5)*(p[0] + p[2]);
+ cy = btScalar(0.5)*(p[1] + p[3]);
+ }
+ else {
+ a = 0;
+ cx = 0;
+ cy = 0;
+ for (i=0; i<(n-1); i++) {
+ q = p[i*2]*p[i*2+3] - p[i*2+2]*p[i*2+1];
+ a += q;
+ cx += q*(p[i*2]+p[i*2+2]);
+ cy += q*(p[i*2+1]+p[i*2+3]);
+ }
+ q = p[n*2-2]*p[1] - p[0]*p[n*2-1];
+ if (btFabs(a+q) > SIMD_EPSILON)
+ {
+ a = 1.f/(btScalar(3.0)*(a+q));
+ } else
+ {
+ a=BT_LARGE_FLOAT;
+ }
+ cx = a*(cx + q*(p[n*2-2]+p[0]));
+ cy = a*(cy + q*(p[n*2-1]+p[1]));
+ }
+
+ // compute the angle of each point w.r.t. the centroid
+ btScalar A[8];
+ for (i=0; i<n; i++) A[i] = btAtan2(p[i*2+1]-cy,p[i*2]-cx);
+
+ // search for points that have angles closest to A[i0] + i*(2*pi/m).
+ int avail[8];
+ for (i=0; i<n; i++) avail[i] = 1;
+ avail[i0] = 0;
+ iret[0] = i0;
+ iret++;
+ for (j=1; j<m; j++) {
+ a = btScalar(j)*(2*M__PI/m) + A[i0];
+ if (a > M__PI) a -= 2*M__PI;
+ btScalar maxdiff=1e9,diff;
+
+ *iret = i0; // iret is not allowed to keep this value, but it sometimes does, when diff=#QNAN0
+
+ for (i=0; i<n; i++) {
+ if (avail[i]) {
+ diff = btFabs (A[i]-a);
+ if (diff > M__PI) diff = 2*M__PI - diff;
+ if (diff < maxdiff) {
+ maxdiff = diff;
+ *iret = i;
+ }
+ }
+ }
+#if defined(DEBUG) || defined (_DEBUG)
+ btAssert (*iret != i0); // ensure iret got set
+#endif
+ avail[*iret] = 0;
+ iret++;
+ }
+}
+
+
+
+int dBoxBox2 (const btVector3& p1, const dMatrix3 R1,
+ const btVector3& side1, const btVector3& p2,
+ const dMatrix3 R2, const btVector3& side2,
+ btVector3& normal, btScalar *depth, int *return_code,
+ int maxc, dContactGeom * /*contact*/, int /*skip*/,btDiscreteCollisionDetectorInterface::Result& output);
+int dBoxBox2 (const btVector3& p1, const dMatrix3 R1,
+ const btVector3& side1, const btVector3& p2,
+ const dMatrix3 R2, const btVector3& side2,
+ btVector3& normal, btScalar *depth, int *return_code,
+ int maxc, dContactGeom * /*contact*/, int /*skip*/,btDiscreteCollisionDetectorInterface::Result& output)
+{
+ const btScalar fudge_factor = btScalar(1.05);
+ btVector3 p,pp,normalC(0.f,0.f,0.f);
+ const btScalar *normalR = 0;
+ btScalar A[3],B[3],R11,R12,R13,R21,R22,R23,R31,R32,R33,
+ Q11,Q12,Q13,Q21,Q22,Q23,Q31,Q32,Q33,s,s2,l;
+ int i,j,invert_normal,code;
+
+ // get vector from centers of box 1 to box 2, relative to box 1
+ p = p2 - p1;
+ dMULTIPLY1_331 (pp,R1,p); // get pp = p relative to body 1
+
+ // get side lengths / 2
+ A[0] = side1[0]*btScalar(0.5);
+ A[1] = side1[1]*btScalar(0.5);
+ A[2] = side1[2]*btScalar(0.5);
+ B[0] = side2[0]*btScalar(0.5);
+ B[1] = side2[1]*btScalar(0.5);
+ B[2] = side2[2]*btScalar(0.5);
+
+ // Rij is R1'*R2, i.e. the relative rotation between R1 and R2
+ R11 = dDOT44(R1+0,R2+0); R12 = dDOT44(R1+0,R2+1); R13 = dDOT44(R1+0,R2+2);
+ R21 = dDOT44(R1+1,R2+0); R22 = dDOT44(R1+1,R2+1); R23 = dDOT44(R1+1,R2+2);
+ R31 = dDOT44(R1+2,R2+0); R32 = dDOT44(R1+2,R2+1); R33 = dDOT44(R1+2,R2+2);
+
+ Q11 = btFabs(R11); Q12 = btFabs(R12); Q13 = btFabs(R13);
+ Q21 = btFabs(R21); Q22 = btFabs(R22); Q23 = btFabs(R23);
+ Q31 = btFabs(R31); Q32 = btFabs(R32); Q33 = btFabs(R33);
+
+ // for all 15 possible separating axes:
+ // * see if the axis separates the boxes. if so, return 0.
+ // * find the depth of the penetration along the separating axis (s2)
+ // * if this is the largest depth so far, record it.
+ // the normal vector will be set to the separating axis with the smallest
+ // depth. note: normalR is set to point to a column of R1 or R2 if that is
+ // the smallest depth normal so far. otherwise normalR is 0 and normalC is
+ // set to a vector relative to body 1. invert_normal is 1 if the sign of
+ // the normal should be flipped.
+
+#define TST(expr1,expr2,norm,cc) \
+ s2 = btFabs(expr1) - (expr2); \
+ if (s2 > 0) return 0; \
+ if (s2 > s) { \
+ s = s2; \
+ normalR = norm; \
+ invert_normal = ((expr1) < 0); \
+ code = (cc); \
+ }
+
+ s = -dInfinity;
+ invert_normal = 0;
+ code = 0;
+
+ // separating axis = u1,u2,u3
+ TST (pp[0],(A[0] + B[0]*Q11 + B[1]*Q12 + B[2]*Q13),R1+0,1);
+ TST (pp[1],(A[1] + B[0]*Q21 + B[1]*Q22 + B[2]*Q23),R1+1,2);
+ TST (pp[2],(A[2] + B[0]*Q31 + B[1]*Q32 + B[2]*Q33),R1+2,3);
+
+ // separating axis = v1,v2,v3
+ TST (dDOT41(R2+0,p),(A[0]*Q11 + A[1]*Q21 + A[2]*Q31 + B[0]),R2+0,4);
+ TST (dDOT41(R2+1,p),(A[0]*Q12 + A[1]*Q22 + A[2]*Q32 + B[1]),R2+1,5);
+ TST (dDOT41(R2+2,p),(A[0]*Q13 + A[1]*Q23 + A[2]*Q33 + B[2]),R2+2,6);
+
+ // note: cross product axes need to be scaled when s is computed.
+ // normal (n1,n2,n3) is relative to box 1.
+#undef TST
+#define TST(expr1,expr2,n1,n2,n3,cc) \
+ s2 = btFabs(expr1) - (expr2); \
+ if (s2 > SIMD_EPSILON) return 0; \
+ l = btSqrt((n1)*(n1) + (n2)*(n2) + (n3)*(n3)); \
+ if (l > SIMD_EPSILON) { \
+ s2 /= l; \
+ if (s2*fudge_factor > s) { \
+ s = s2; \
+ normalR = 0; \
+ normalC[0] = (n1)/l; normalC[1] = (n2)/l; normalC[2] = (n3)/l; \
+ invert_normal = ((expr1) < 0); \
+ code = (cc); \
+ } \
+ }
+
+ btScalar fudge2 (1.0e-5f);
+
+ Q11 += fudge2;
+ Q12 += fudge2;
+ Q13 += fudge2;
+
+ Q21 += fudge2;
+ Q22 += fudge2;
+ Q23 += fudge2;
+
+ Q31 += fudge2;
+ Q32 += fudge2;
+ Q33 += fudge2;
+
+ // separating axis = u1 x (v1,v2,v3)
+ TST(pp[2]*R21-pp[1]*R31,(A[1]*Q31+A[2]*Q21+B[1]*Q13+B[2]*Q12),0,-R31,R21,7);
+ TST(pp[2]*R22-pp[1]*R32,(A[1]*Q32+A[2]*Q22+B[0]*Q13+B[2]*Q11),0,-R32,R22,8);
+ TST(pp[2]*R23-pp[1]*R33,(A[1]*Q33+A[2]*Q23+B[0]*Q12+B[1]*Q11),0,-R33,R23,9);
+
+ // separating axis = u2 x (v1,v2,v3)
+ TST(pp[0]*R31-pp[2]*R11,(A[0]*Q31+A[2]*Q11+B[1]*Q23+B[2]*Q22),R31,0,-R11,10);
+ TST(pp[0]*R32-pp[2]*R12,(A[0]*Q32+A[2]*Q12+B[0]*Q23+B[2]*Q21),R32,0,-R12,11);
+ TST(pp[0]*R33-pp[2]*R13,(A[0]*Q33+A[2]*Q13+B[0]*Q22+B[1]*Q21),R33,0,-R13,12);
+
+ // separating axis = u3 x (v1,v2,v3)
+ TST(pp[1]*R11-pp[0]*R21,(A[0]*Q21+A[1]*Q11+B[1]*Q33+B[2]*Q32),-R21,R11,0,13);
+ TST(pp[1]*R12-pp[0]*R22,(A[0]*Q22+A[1]*Q12+B[0]*Q33+B[2]*Q31),-R22,R12,0,14);
+ TST(pp[1]*R13-pp[0]*R23,(A[0]*Q23+A[1]*Q13+B[0]*Q32+B[1]*Q31),-R23,R13,0,15);
+
+#undef TST
+
+ if (!code) return 0;
+
+ // if we get to this point, the boxes interpenetrate. compute the normal
+ // in global coordinates.
+ if (normalR) {
+ normal[0] = normalR[0];
+ normal[1] = normalR[4];
+ normal[2] = normalR[8];
+ }
+ else {
+ dMULTIPLY0_331 (normal,R1,normalC);
+ }
+ if (invert_normal) {
+ normal[0] = -normal[0];
+ normal[1] = -normal[1];
+ normal[2] = -normal[2];
+ }
+ *depth = -s;
+
+ // compute contact point(s)
+
+ if (code > 6) {
+ // an edge from box 1 touches an edge from box 2.
+ // find a point pa on the intersecting edge of box 1
+ btVector3 pa;
+ btScalar sign;
+ for (i=0; i<3; i++) pa[i] = p1[i];
+ for (j=0; j<3; j++) {
+ sign = (dDOT14(normal,R1+j) > 0) ? btScalar(1.0) : btScalar(-1.0);
+ for (i=0; i<3; i++) pa[i] += sign * A[j] * R1[i*4+j];
+ }
+
+ // find a point pb on the intersecting edge of box 2
+ btVector3 pb;
+ for (i=0; i<3; i++) pb[i] = p2[i];
+ for (j=0; j<3; j++) {
+ sign = (dDOT14(normal,R2+j) > 0) ? btScalar(-1.0) : btScalar(1.0);
+ for (i=0; i<3; i++) pb[i] += sign * B[j] * R2[i*4+j];
+ }
+
+ btScalar alpha,beta;
+ btVector3 ua,ub;
+ for (i=0; i<3; i++) ua[i] = R1[((code)-7)/3 + i*4];
+ for (i=0; i<3; i++) ub[i] = R2[((code)-7)%3 + i*4];
+
+ dLineClosestApproach (pa,ua,pb,ub,&alpha,&beta);
+ for (i=0; i<3; i++) pa[i] += ua[i]*alpha;
+ for (i=0; i<3; i++) pb[i] += ub[i]*beta;
+
+ {
+
+ //contact[0].pos[i] = btScalar(0.5)*(pa[i]+pb[i]);
+ //contact[0].depth = *depth;
+ btVector3 pointInWorld;
+
+#ifdef USE_CENTER_POINT
+ for (i=0; i<3; i++)
+ pointInWorld[i] = (pa[i]+pb[i])*btScalar(0.5);
+ output.addContactPoint(-normal,pointInWorld,-*depth);
+#else
+ output.addContactPoint(-normal,pb,-*depth);
+
+#endif //
+ *return_code = code;
+ }
+ return 1;
+ }
+
+ // okay, we have a face-something intersection (because the separating
+ // axis is perpendicular to a face). define face 'a' to be the reference
+ // face (i.e. the normal vector is perpendicular to this) and face 'b' to be
+ // the incident face (the closest face of the other box).
+
+ const btScalar *Ra,*Rb,*pa,*pb,*Sa,*Sb;
+ if (code <= 3) {
+ Ra = R1;
+ Rb = R2;
+ pa = p1;
+ pb = p2;
+ Sa = A;
+ Sb = B;
+ }
+ else {
+ Ra = R2;
+ Rb = R1;
+ pa = p2;
+ pb = p1;
+ Sa = B;
+ Sb = A;
+ }
+
+ // nr = normal vector of reference face dotted with axes of incident box.
+ // anr = absolute values of nr.
+ btVector3 normal2,nr,anr;
+ if (code <= 3) {
+ normal2[0] = normal[0];
+ normal2[1] = normal[1];
+ normal2[2] = normal[2];
+ }
+ else {
+ normal2[0] = -normal[0];
+ normal2[1] = -normal[1];
+ normal2[2] = -normal[2];
+ }
+ dMULTIPLY1_331 (nr,Rb,normal2);
+ anr[0] = btFabs (nr[0]);
+ anr[1] = btFabs (nr[1]);
+ anr[2] = btFabs (nr[2]);
+
+ // find the largest compontent of anr: this corresponds to the normal
+ // for the indident face. the other axis numbers of the indicent face
+ // are stored in a1,a2.
+ int lanr,a1,a2;
+ if (anr[1] > anr[0]) {
+ if (anr[1] > anr[2]) {
+ a1 = 0;
+ lanr = 1;
+ a2 = 2;
+ }
+ else {
+ a1 = 0;
+ a2 = 1;
+ lanr = 2;
+ }
+ }
+ else {
+ if (anr[0] > anr[2]) {
+ lanr = 0;
+ a1 = 1;
+ a2 = 2;
+ }
+ else {
+ a1 = 0;
+ a2 = 1;
+ lanr = 2;
+ }
+ }
+
+ // compute center point of incident face, in reference-face coordinates
+ btVector3 center;
+ if (nr[lanr] < 0) {
+ for (i=0; i<3; i++) center[i] = pb[i] - pa[i] + Sb[lanr] * Rb[i*4+lanr];
+ }
+ else {
+ for (i=0; i<3; i++) center[i] = pb[i] - pa[i] - Sb[lanr] * Rb[i*4+lanr];
+ }
+
+ // find the normal and non-normal axis numbers of the reference box
+ int codeN,code1,code2;
+ if (code <= 3) codeN = code-1; else codeN = code-4;
+ if (codeN==0) {
+ code1 = 1;
+ code2 = 2;
+ }
+ else if (codeN==1) {
+ code1 = 0;
+ code2 = 2;
+ }
+ else {
+ code1 = 0;
+ code2 = 1;
+ }
+
+ // find the four corners of the incident face, in reference-face coordinates
+ btScalar quad[8]; // 2D coordinate of incident face (x,y pairs)
+ btScalar c1,c2,m11,m12,m21,m22;
+ c1 = dDOT14 (center,Ra+code1);
+ c2 = dDOT14 (center,Ra+code2);
+ // optimize this? - we have already computed this data above, but it is not
+ // stored in an easy-to-index format. for now it's quicker just to recompute
+ // the four dot products.
+ m11 = dDOT44 (Ra+code1,Rb+a1);
+ m12 = dDOT44 (Ra+code1,Rb+a2);
+ m21 = dDOT44 (Ra+code2,Rb+a1);
+ m22 = dDOT44 (Ra+code2,Rb+a2);
+ {
+ btScalar k1 = m11*Sb[a1];
+ btScalar k2 = m21*Sb[a1];
+ btScalar k3 = m12*Sb[a2];
+ btScalar k4 = m22*Sb[a2];
+ quad[0] = c1 - k1 - k3;
+ quad[1] = c2 - k2 - k4;
+ quad[2] = c1 - k1 + k3;
+ quad[3] = c2 - k2 + k4;
+ quad[4] = c1 + k1 + k3;
+ quad[5] = c2 + k2 + k4;
+ quad[6] = c1 + k1 - k3;
+ quad[7] = c2 + k2 - k4;
+ }
+
+ // find the size of the reference face
+ btScalar rect[2];
+ rect[0] = Sa[code1];
+ rect[1] = Sa[code2];
+
+ // intersect the incident and reference faces
+ btScalar ret[16];
+ int n = intersectRectQuad2 (rect,quad,ret);
+ if (n < 1) return 0; // this should never happen
+
+ // convert the intersection points into reference-face coordinates,
+ // and compute the contact position and depth for each point. only keep
+ // those points that have a positive (penetrating) depth. delete points in
+ // the 'ret' array as necessary so that 'point' and 'ret' correspond.
+ btScalar point[3*8]; // penetrating contact points
+ btScalar dep[8]; // depths for those points
+ btScalar det1 = 1.f/(m11*m22 - m12*m21);
+ m11 *= det1;
+ m12 *= det1;
+ m21 *= det1;
+ m22 *= det1;
+ int cnum = 0; // number of penetrating contact points found
+ for (j=0; j < n; j++) {
+ btScalar k1 = m22*(ret[j*2]-c1) - m12*(ret[j*2+1]-c2);
+ btScalar k2 = -m21*(ret[j*2]-c1) + m11*(ret[j*2+1]-c2);
+ for (i=0; i<3; i++) point[cnum*3+i] =
+ center[i] + k1*Rb[i*4+a1] + k2*Rb[i*4+a2];
+ dep[cnum] = Sa[codeN] - dDOT(normal2,point+cnum*3);
+ if (dep[cnum] >= 0) {
+ ret[cnum*2] = ret[j*2];
+ ret[cnum*2+1] = ret[j*2+1];
+ cnum++;
+ }
+ }
+ if (cnum < 1) return 0; // this should never happen
+
+ // we can't generate more contacts than we actually have
+ if (maxc > cnum) maxc = cnum;
+ if (maxc < 1) maxc = 1;
+
+ if (cnum <= maxc) {
+
+ if (code<4)
+ {
+ // we have less contacts than we need, so we use them all
+ for (j=0; j < cnum; j++)
+ {
+ btVector3 pointInWorld;
+ for (i=0; i<3; i++)
+ pointInWorld[i] = point[j*3+i] + pa[i];
+ output.addContactPoint(-normal,pointInWorld,-dep[j]);
+
+ }
+ } else
+ {
+ // we have less contacts than we need, so we use them all
+ for (j=0; j < cnum; j++)
+ {
+ btVector3 pointInWorld;
+ for (i=0; i<3; i++)
+ pointInWorld[i] = point[j*3+i] + pa[i]-normal[i]*dep[j];
+ //pointInWorld[i] = point[j*3+i] + pa[i];
+ output.addContactPoint(-normal,pointInWorld,-dep[j]);
+ }
+ }
+ }
+ else {
+ // we have more contacts than are wanted, some of them must be culled.
+ // find the deepest point, it is always the first contact.
+ int i1 = 0;
+ btScalar maxdepth = dep[0];
+ for (i=1; i<cnum; i++) {
+ if (dep[i] > maxdepth) {
+ maxdepth = dep[i];
+ i1 = i;
+ }
+ }
+
+ int iret[8];
+ cullPoints2 (cnum,ret,maxc,i1,iret);
+
+ for (j=0; j < maxc; j++) {
+// dContactGeom *con = CONTACT(contact,skip*j);
+ // for (i=0; i<3; i++) con->pos[i] = point[iret[j]*3+i] + pa[i];
+ // con->depth = dep[iret[j]];
+
+ btVector3 posInWorld;
+ for (i=0; i<3; i++)
+ posInWorld[i] = point[iret[j]*3+i] + pa[i];
+ if (code<4)
+ {
+ output.addContactPoint(-normal,posInWorld,-dep[iret[j]]);
+ } else
+ {
+ output.addContactPoint(-normal,posInWorld-normal*dep[iret[j]],-dep[iret[j]]);
+ }
+ }
+ cnum = maxc;
+ }
+
+ *return_code = code;
+ return cnum;
+}
+
+void btBoxBoxDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* /*debugDraw*/,bool /*swapResults*/)
+{
+
+ const btTransform& transformA = input.m_transformA;
+ const btTransform& transformB = input.m_transformB;
+
+ int skip = 0;
+ dContactGeom *contact = 0;
+
+ dMatrix3 R1;
+ dMatrix3 R2;
+
+ for (int j=0;j<3;j++)
+ {
+ R1[0+4*j] = transformA.getBasis()[j].x();
+ R2[0+4*j] = transformB.getBasis()[j].x();
+
+ R1[1+4*j] = transformA.getBasis()[j].y();
+ R2[1+4*j] = transformB.getBasis()[j].y();
+
+
+ R1[2+4*j] = transformA.getBasis()[j].z();
+ R2[2+4*j] = transformB.getBasis()[j].z();
+
+ }
+
+
+
+ btVector3 normal;
+ btScalar depth;
+ int return_code;
+ int maxc = 4;
+
+
+ dBoxBox2 (transformA.getOrigin(),
+ R1,
+ 2.f*m_box1->getHalfExtentsWithMargin(),
+ transformB.getOrigin(),
+ R2,
+ 2.f*m_box2->getHalfExtentsWithMargin(),
+ normal, &depth, &return_code,
+ maxc, contact, skip,
+ output
+ );
+
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.h
new file mode 100644
index 00000000..3c941f7d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.h
@@ -0,0 +1,44 @@
+/*
+ * Box-Box collision detection re-distributed under the ZLib license with permission from Russell L. Smith
+ * Original version is from Open Dynamics Engine, Copyright (C) 2001,2002 Russell L. Smith.
+ * All rights reserved. Email: russ@q12.org Web: www.q12.org
+
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef BT_BOX_BOX_DETECTOR_H
+#define BT_BOX_BOX_DETECTOR_H
+
+
+class btBoxShape;
+#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
+
+
+/// btBoxBoxDetector wraps the ODE box-box collision detector
+/// re-distributed under the Zlib license with permission from Russell L. Smith
+struct btBoxBoxDetector : public btDiscreteCollisionDetectorInterface
+{
+ btBoxShape* m_box1;
+ btBoxShape* m_box2;
+
+public:
+
+ btBoxBoxDetector(btBoxShape* box1,btBoxShape* box2);
+
+ virtual ~btBoxBoxDetector() {};
+
+ virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false);
+
+};
+
+#endif //BT_BOX_BOX_DETECTOR_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h
new file mode 100644
index 00000000..f63e0923
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionConfiguration.h
@@ -0,0 +1,48 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COLLISION_CONFIGURATION
+#define BT_COLLISION_CONFIGURATION
+
+struct btCollisionAlgorithmCreateFunc;
+
+class btStackAlloc;
+class btPoolAllocator;
+
+///btCollisionConfiguration allows to configure Bullet collision detection
+///stack allocator size, default collision algorithms and persistent manifold pool size
+///@todo: describe the meaning
+class btCollisionConfiguration
+{
+
+public:
+
+ virtual ~btCollisionConfiguration()
+ {
+ }
+
+ ///memory pools
+ virtual btPoolAllocator* getPersistentManifoldPool() = 0;
+
+ virtual btPoolAllocator* getCollisionAlgorithmPool() = 0;
+
+ virtual btStackAlloc* getStackAllocator() = 0;
+
+ virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1) =0;
+
+};
+
+#endif //BT_COLLISION_CONFIGURATION
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h
new file mode 100644
index 00000000..1d7e7440
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionCreateFunc.h
@@ -0,0 +1,45 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COLLISION_CREATE_FUNC
+#define BT_COLLISION_CREATE_FUNC
+
+#include "LinearMath/btAlignedObjectArray.h"
+class btCollisionAlgorithm;
+class btCollisionObject;
+
+struct btCollisionAlgorithmConstructionInfo;
+
+///Used by the btCollisionDispatcher to register and create instances for btCollisionAlgorithm
+struct btCollisionAlgorithmCreateFunc
+{
+ bool m_swapped;
+
+ btCollisionAlgorithmCreateFunc()
+ :m_swapped(false)
+ {
+ }
+ virtual ~btCollisionAlgorithmCreateFunc(){};
+
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& , btCollisionObject* body0,btCollisionObject* body1)
+ {
+
+ (void)body0;
+ (void)body1;
+ return 0;
+ }
+};
+#endif //BT_COLLISION_CREATE_FUNC
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
new file mode 100644
index 00000000..29674f3b
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
@@ -0,0 +1,310 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btCollisionDispatcher.h"
+
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
+#include "LinearMath/btPoolAllocator.h"
+#include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h"
+
+int gNumManifold = 0;
+
+#ifdef BT_DEBUG
+#include <stdio.h>
+#endif
+
+
+btCollisionDispatcher::btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration):
+m_dispatcherFlags(btCollisionDispatcher::CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD),
+ m_collisionConfiguration(collisionConfiguration)
+{
+ int i;
+
+ setNearCallback(defaultNearCallback);
+
+ m_collisionAlgorithmPoolAllocator = collisionConfiguration->getCollisionAlgorithmPool();
+
+ m_persistentManifoldPoolAllocator = collisionConfiguration->getPersistentManifoldPool();
+
+ for (i=0;i<MAX_BROADPHASE_COLLISION_TYPES;i++)
+ {
+ for (int j=0;j<MAX_BROADPHASE_COLLISION_TYPES;j++)
+ {
+ m_doubleDispatch[i][j] = m_collisionConfiguration->getCollisionAlgorithmCreateFunc(i,j);
+ btAssert(m_doubleDispatch[i][j]);
+ }
+ }
+
+
+}
+
+
+void btCollisionDispatcher::registerCollisionCreateFunc(int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc *createFunc)
+{
+ m_doubleDispatch[proxyType0][proxyType1] = createFunc;
+}
+
+btCollisionDispatcher::~btCollisionDispatcher()
+{
+}
+
+btPersistentManifold* btCollisionDispatcher::getNewManifold(void* b0,void* b1)
+{
+ gNumManifold++;
+
+ //btAssert(gNumManifold < 65535);
+
+
+ btCollisionObject* body0 = (btCollisionObject*)b0;
+ btCollisionObject* body1 = (btCollisionObject*)b1;
+
+ //optional relative contact breaking threshold, turned on by default (use setDispatcherFlags to switch off feature for improved performance)
+
+ btScalar contactBreakingThreshold = (m_dispatcherFlags & btCollisionDispatcher::CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD) ?
+ btMin(body0->getCollisionShape()->getContactBreakingThreshold(gContactBreakingThreshold) , body1->getCollisionShape()->getContactBreakingThreshold(gContactBreakingThreshold))
+ : gContactBreakingThreshold ;
+
+ btScalar contactProcessingThreshold = btMin(body0->getContactProcessingThreshold(),body1->getContactProcessingThreshold());
+
+ void* mem = 0;
+
+ if (m_persistentManifoldPoolAllocator->getFreeCount())
+ {
+ mem = m_persistentManifoldPoolAllocator->allocate(sizeof(btPersistentManifold));
+ } else
+ {
+ //we got a pool memory overflow, by default we fallback to dynamically allocate memory. If we require a contiguous contact pool then assert.
+ if ((m_dispatcherFlags&CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION)==0)
+ {
+ mem = btAlignedAlloc(sizeof(btPersistentManifold),16);
+ } else
+ {
+ btAssert(0);
+ //make sure to increase the m_defaultMaxPersistentManifoldPoolSize in the btDefaultCollisionConstructionInfo/btDefaultCollisionConfiguration
+ return 0;
+ }
+ }
+ btPersistentManifold* manifold = new(mem) btPersistentManifold (body0,body1,0,contactBreakingThreshold,contactProcessingThreshold);
+ manifold->m_index1a = m_manifoldsPtr.size();
+ m_manifoldsPtr.push_back(manifold);
+
+ return manifold;
+}
+
+void btCollisionDispatcher::clearManifold(btPersistentManifold* manifold)
+{
+ manifold->clearManifold();
+}
+
+
+void btCollisionDispatcher::releaseManifold(btPersistentManifold* manifold)
+{
+
+ gNumManifold--;
+
+ //printf("releaseManifold: gNumManifold %d\n",gNumManifold);
+ clearManifold(manifold);
+
+ int findIndex = manifold->m_index1a;
+ btAssert(findIndex < m_manifoldsPtr.size());
+ m_manifoldsPtr.swap(findIndex,m_manifoldsPtr.size()-1);
+ m_manifoldsPtr[findIndex]->m_index1a = findIndex;
+ m_manifoldsPtr.pop_back();
+
+ manifold->~btPersistentManifold();
+ if (m_persistentManifoldPoolAllocator->validPtr(manifold))
+ {
+ m_persistentManifoldPoolAllocator->freeMemory(manifold);
+ } else
+ {
+ btAlignedFree(manifold);
+ }
+
+}
+
+
+
+btCollisionAlgorithm* btCollisionDispatcher::findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold)
+{
+
+ btCollisionAlgorithmConstructionInfo ci;
+
+ ci.m_dispatcher1 = this;
+ ci.m_manifold = sharedManifold;
+ btCollisionAlgorithm* algo = m_doubleDispatch[body0->getCollisionShape()->getShapeType()][body1->getCollisionShape()->getShapeType()]->CreateCollisionAlgorithm(ci,body0,body1);
+
+ return algo;
+}
+
+
+
+
+bool btCollisionDispatcher::needsResponse(btCollisionObject* body0,btCollisionObject* body1)
+{
+ //here you can do filtering
+ bool hasResponse =
+ (body0->hasContactResponse() && body1->hasContactResponse());
+ //no response between two static/kinematic bodies:
+ hasResponse = hasResponse &&
+ ((!body0->isStaticOrKinematicObject()) ||(! body1->isStaticOrKinematicObject()));
+ return hasResponse;
+}
+
+bool btCollisionDispatcher::needsCollision(btCollisionObject* body0,btCollisionObject* body1)
+{
+ btAssert(body0);
+ btAssert(body1);
+
+ bool needsCollision = true;
+
+#ifdef BT_DEBUG
+ if (!(m_dispatcherFlags & btCollisionDispatcher::CD_STATIC_STATIC_REPORTED))
+ {
+ //broadphase filtering already deals with this
+ if (body0->isStaticOrKinematicObject() && body1->isStaticOrKinematicObject())
+ {
+ m_dispatcherFlags |= btCollisionDispatcher::CD_STATIC_STATIC_REPORTED;
+ printf("warning btCollisionDispatcher::needsCollision: static-static collision!\n");
+ }
+ }
+#endif //BT_DEBUG
+
+ if ((!body0->isActive()) && (!body1->isActive()))
+ needsCollision = false;
+ else if (!body0->checkCollideWith(body1))
+ needsCollision = false;
+
+ return needsCollision ;
+
+}
+
+
+
+///interface for iterating all overlapping collision pairs, no matter how those pairs are stored (array, set, map etc)
+///this is useful for the collision dispatcher.
+class btCollisionPairCallback : public btOverlapCallback
+{
+ const btDispatcherInfo& m_dispatchInfo;
+ btCollisionDispatcher* m_dispatcher;
+
+public:
+
+ btCollisionPairCallback(const btDispatcherInfo& dispatchInfo,btCollisionDispatcher* dispatcher)
+ :m_dispatchInfo(dispatchInfo),
+ m_dispatcher(dispatcher)
+ {
+ }
+
+ /*btCollisionPairCallback& operator=(btCollisionPairCallback& other)
+ {
+ m_dispatchInfo = other.m_dispatchInfo;
+ m_dispatcher = other.m_dispatcher;
+ return *this;
+ }
+ */
+
+
+ virtual ~btCollisionPairCallback() {}
+
+
+ virtual bool processOverlap(btBroadphasePair& pair)
+ {
+ (*m_dispatcher->getNearCallback())(pair,*m_dispatcher,m_dispatchInfo);
+
+ return false;
+ }
+};
+
+
+
+void btCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher)
+{
+ //m_blockedForChanges = true;
+
+ btCollisionPairCallback collisionCallback(dispatchInfo,this);
+
+ pairCache->processAllOverlappingPairs(&collisionCallback,dispatcher);
+
+ //m_blockedForChanges = false;
+
+}
+
+
+
+
+//by default, Bullet will use this near callback
+void btCollisionDispatcher::defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, const btDispatcherInfo& dispatchInfo)
+{
+ btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject;
+ btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject;
+
+ if (dispatcher.needsCollision(colObj0,colObj1))
+ {
+ //dispatcher will keep algorithms persistent in the collision pair
+ if (!collisionPair.m_algorithm)
+ {
+ collisionPair.m_algorithm = dispatcher.findAlgorithm(colObj0,colObj1);
+ }
+
+ if (collisionPair.m_algorithm)
+ {
+ btManifoldResult contactPointResult(colObj0,colObj1);
+
+ if (dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE)
+ {
+ //discrete collision detection query
+ collisionPair.m_algorithm->processCollision(colObj0,colObj1,dispatchInfo,&contactPointResult);
+ } else
+ {
+ //continuous collision detection query, time of impact (toi)
+ btScalar toi = collisionPair.m_algorithm->calculateTimeOfImpact(colObj0,colObj1,dispatchInfo,&contactPointResult);
+ if (dispatchInfo.m_timeOfImpact > toi)
+ dispatchInfo.m_timeOfImpact = toi;
+
+ }
+ }
+ }
+
+}
+
+
+void* btCollisionDispatcher::allocateCollisionAlgorithm(int size)
+{
+ if (m_collisionAlgorithmPoolAllocator->getFreeCount())
+ {
+ return m_collisionAlgorithmPoolAllocator->allocate(size);
+ }
+
+ //warn user for overflow?
+ return btAlignedAlloc(static_cast<size_t>(size), 16);
+}
+
+void btCollisionDispatcher::freeCollisionAlgorithm(void* ptr)
+{
+ if (m_collisionAlgorithmPoolAllocator->validPtr(ptr))
+ {
+ m_collisionAlgorithmPoolAllocator->freeMemory(ptr);
+ } else
+ {
+ btAlignedFree(ptr);
+ }
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h
new file mode 100644
index 00000000..2fca43f8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionDispatcher.h
@@ -0,0 +1,172 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COLLISION__DISPATCHER_H
+#define BT_COLLISION__DISPATCHER_H
+
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+
+#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
+
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+class btIDebugDraw;
+class btOverlappingPairCache;
+class btPoolAllocator;
+class btCollisionConfiguration;
+
+#include "btCollisionCreateFunc.h"
+
+#define USE_DISPATCH_REGISTRY_ARRAY 1
+
+class btCollisionDispatcher;
+///user can override this nearcallback for collision filtering and more finegrained control over collision detection
+typedef void (*btNearCallback)(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, const btDispatcherInfo& dispatchInfo);
+
+
+///btCollisionDispatcher supports algorithms that handle ConvexConvex and ConvexConcave collision pairs.
+///Time of Impact, Closest Points and Penetration Depth.
+class btCollisionDispatcher : public btDispatcher
+{
+
+protected:
+
+ int m_dispatcherFlags;
+
+ btAlignedObjectArray<btPersistentManifold*> m_manifoldsPtr;
+
+ btManifoldResult m_defaultManifoldResult;
+
+ btNearCallback m_nearCallback;
+
+ btPoolAllocator* m_collisionAlgorithmPoolAllocator;
+
+ btPoolAllocator* m_persistentManifoldPoolAllocator;
+
+ btCollisionAlgorithmCreateFunc* m_doubleDispatch[MAX_BROADPHASE_COLLISION_TYPES][MAX_BROADPHASE_COLLISION_TYPES];
+
+ btCollisionConfiguration* m_collisionConfiguration;
+
+
+public:
+
+ enum DispatcherFlags
+ {
+ CD_STATIC_STATIC_REPORTED = 1,
+ CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2,
+ CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION = 4
+ };
+
+ int getDispatcherFlags() const
+ {
+ return m_dispatcherFlags;
+ }
+
+ void setDispatcherFlags(int flags)
+ {
+ m_dispatcherFlags = flags;
+ }
+
+ ///registerCollisionCreateFunc allows registration of custom/alternative collision create functions
+ void registerCollisionCreateFunc(int proxyType0,int proxyType1, btCollisionAlgorithmCreateFunc* createFunc);
+
+ int getNumManifolds() const
+ {
+ return int( m_manifoldsPtr.size());
+ }
+
+ btPersistentManifold** getInternalManifoldPointer()
+ {
+ return &m_manifoldsPtr[0];
+ }
+
+ btPersistentManifold* getManifoldByIndexInternal(int index)
+ {
+ return m_manifoldsPtr[index];
+ }
+
+ const btPersistentManifold* getManifoldByIndexInternal(int index) const
+ {
+ return m_manifoldsPtr[index];
+ }
+
+ btCollisionDispatcher (btCollisionConfiguration* collisionConfiguration);
+
+ virtual ~btCollisionDispatcher();
+
+ virtual btPersistentManifold* getNewManifold(void* b0,void* b1);
+
+ virtual void releaseManifold(btPersistentManifold* manifold);
+
+
+ virtual void clearManifold(btPersistentManifold* manifold);
+
+
+ btCollisionAlgorithm* findAlgorithm(btCollisionObject* body0,btCollisionObject* body1,btPersistentManifold* sharedManifold = 0);
+
+ virtual bool needsCollision(btCollisionObject* body0,btCollisionObject* body1);
+
+ virtual bool needsResponse(btCollisionObject* body0,btCollisionObject* body1);
+
+ virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) ;
+
+ void setNearCallback(btNearCallback nearCallback)
+ {
+ m_nearCallback = nearCallback;
+ }
+
+ btNearCallback getNearCallback() const
+ {
+ return m_nearCallback;
+ }
+
+ //by default, Bullet will use this near callback
+ static void defaultNearCallback(btBroadphasePair& collisionPair, btCollisionDispatcher& dispatcher, const btDispatcherInfo& dispatchInfo);
+
+ virtual void* allocateCollisionAlgorithm(int size);
+
+ virtual void freeCollisionAlgorithm(void* ptr);
+
+ btCollisionConfiguration* getCollisionConfiguration()
+ {
+ return m_collisionConfiguration;
+ }
+
+ const btCollisionConfiguration* getCollisionConfiguration() const
+ {
+ return m_collisionConfiguration;
+ }
+
+ void setCollisionConfiguration(btCollisionConfiguration* config)
+ {
+ m_collisionConfiguration = config;
+ }
+
+ virtual btPoolAllocator* getInternalManifoldPool()
+ {
+ return m_persistentManifoldPoolAllocator;
+ }
+
+ virtual const btPoolAllocator* getInternalManifoldPool() const
+ {
+ return m_persistentManifoldPoolAllocator;
+ }
+
+};
+
+#endif //BT_COLLISION__DISPATCHER_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp
new file mode 100644
index 00000000..580ea345
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.cpp
@@ -0,0 +1,116 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btCollisionObject.h"
+#include "LinearMath/btSerializer.h"
+
+btCollisionObject::btCollisionObject()
+ : m_anisotropicFriction(1.f,1.f,1.f),
+ m_hasAnisotropicFriction(false),
+ m_contactProcessingThreshold(BT_LARGE_FLOAT),
+ m_broadphaseHandle(0),
+ m_collisionShape(0),
+ m_extensionPointer(0),
+ m_rootCollisionShape(0),
+ m_collisionFlags(btCollisionObject::CF_STATIC_OBJECT),
+ m_islandTag1(-1),
+ m_companionId(-1),
+ m_activationState1(1),
+ m_deactivationTime(btScalar(0.)),
+ m_friction(btScalar(0.5)),
+ m_restitution(btScalar(0.)),
+ m_internalType(CO_COLLISION_OBJECT),
+ m_userObjectPointer(0),
+ m_hitFraction(btScalar(1.)),
+ m_ccdSweptSphereRadius(btScalar(0.)),
+ m_ccdMotionThreshold(btScalar(0.)),
+ m_checkCollideWith(false)
+{
+ m_worldTransform.setIdentity();
+}
+
+btCollisionObject::~btCollisionObject()
+{
+}
+
+void btCollisionObject::setActivationState(int newState)
+{
+ if ( (m_activationState1 != DISABLE_DEACTIVATION) && (m_activationState1 != DISABLE_SIMULATION))
+ m_activationState1 = newState;
+}
+
+void btCollisionObject::forceActivationState(int newState)
+{
+ m_activationState1 = newState;
+}
+
+void btCollisionObject::activate(bool forceActivation)
+{
+ if (forceActivation || !(m_collisionFlags & (CF_STATIC_OBJECT|CF_KINEMATIC_OBJECT)))
+ {
+ setActivationState(ACTIVE_TAG);
+ m_deactivationTime = btScalar(0.);
+ }
+}
+
+const char* btCollisionObject::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+
+ btCollisionObjectData* dataOut = (btCollisionObjectData*)dataBuffer;
+
+ m_worldTransform.serialize(dataOut->m_worldTransform);
+ m_interpolationWorldTransform.serialize(dataOut->m_interpolationWorldTransform);
+ m_interpolationLinearVelocity.serialize(dataOut->m_interpolationLinearVelocity);
+ m_interpolationAngularVelocity.serialize(dataOut->m_interpolationAngularVelocity);
+ m_anisotropicFriction.serialize(dataOut->m_anisotropicFriction);
+ dataOut->m_hasAnisotropicFriction = m_hasAnisotropicFriction;
+ dataOut->m_contactProcessingThreshold = m_contactProcessingThreshold;
+ dataOut->m_broadphaseHandle = 0;
+ dataOut->m_collisionShape = serializer->getUniquePointer(m_collisionShape);
+ dataOut->m_rootCollisionShape = 0;//@todo
+ dataOut->m_collisionFlags = m_collisionFlags;
+ dataOut->m_islandTag1 = m_islandTag1;
+ dataOut->m_companionId = m_companionId;
+ dataOut->m_activationState1 = m_activationState1;
+ dataOut->m_activationState1 = m_activationState1;
+ dataOut->m_deactivationTime = m_deactivationTime;
+ dataOut->m_friction = m_friction;
+ dataOut->m_restitution = m_restitution;
+ dataOut->m_internalType = m_internalType;
+
+ char* name = (char*) serializer->findNameForPointer(this);
+ dataOut->m_name = (char*)serializer->getUniquePointer(name);
+ if (dataOut->m_name)
+ {
+ serializer->serializeName(name);
+ }
+ dataOut->m_hitFraction = m_hitFraction;
+ dataOut->m_ccdSweptSphereRadius = m_ccdSweptSphereRadius;
+ dataOut->m_ccdMotionThreshold = m_ccdMotionThreshold;
+ dataOut->m_ccdMotionThreshold = m_ccdMotionThreshold;
+ dataOut->m_checkCollideWith = m_checkCollideWith;
+
+ return btCollisionObjectDataName;
+}
+
+
+void btCollisionObject::serializeSingleObject(class btSerializer* serializer) const
+{
+ int len = calculateSerializeBufferSize();
+ btChunk* chunk = serializer->allocate(len,1);
+ const char* structType = serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_COLLISIONOBJECT_CODE,(void*)this);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.h
new file mode 100644
index 00000000..3a11c967
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionObject.h
@@ -0,0 +1,524 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COLLISION_OBJECT_H
+#define BT_COLLISION_OBJECT_H
+
+#include "LinearMath/btTransform.h"
+
+//island management, m_activationState1
+#define ACTIVE_TAG 1
+#define ISLAND_SLEEPING 2
+#define WANTS_DEACTIVATION 3
+#define DISABLE_DEACTIVATION 4
+#define DISABLE_SIMULATION 5
+
+struct btBroadphaseProxy;
+class btCollisionShape;
+struct btCollisionShapeData;
+#include "LinearMath/btMotionState.h"
+#include "LinearMath/btAlignedAllocator.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+typedef btAlignedObjectArray<class btCollisionObject*> btCollisionObjectArray;
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btCollisionObjectData btCollisionObjectDoubleData
+#define btCollisionObjectDataName "btCollisionObjectDoubleData"
+#else
+#define btCollisionObjectData btCollisionObjectFloatData
+#define btCollisionObjectDataName "btCollisionObjectFloatData"
+#endif
+
+
+/// btCollisionObject can be used to manage collision detection objects.
+/// btCollisionObject maintains all information that is needed for a collision detection: Shape, Transform and AABB proxy.
+/// They can be added to the btCollisionWorld.
+ATTRIBUTE_ALIGNED16(class) btCollisionObject
+{
+
+protected:
+
+ btTransform m_worldTransform;
+
+ ///m_interpolationWorldTransform is used for CCD and interpolation
+ ///it can be either previous or future (predicted) transform
+ btTransform m_interpolationWorldTransform;
+ //those two are experimental: just added for bullet time effect, so you can still apply impulses (directly modifying velocities)
+ //without destroying the continuous interpolated motion (which uses this interpolation velocities)
+ btVector3 m_interpolationLinearVelocity;
+ btVector3 m_interpolationAngularVelocity;
+
+ btVector3 m_anisotropicFriction;
+ int m_hasAnisotropicFriction;
+ btScalar m_contactProcessingThreshold;
+
+ btBroadphaseProxy* m_broadphaseHandle;
+ btCollisionShape* m_collisionShape;
+ ///m_extensionPointer is used by some internal low-level Bullet extensions.
+ void* m_extensionPointer;
+
+ ///m_rootCollisionShape is temporarily used to store the original collision shape
+ ///The m_collisionShape might be temporarily replaced by a child collision shape during collision detection purposes
+ ///If it is NULL, the m_collisionShape is not temporarily replaced.
+ btCollisionShape* m_rootCollisionShape;
+
+ int m_collisionFlags;
+
+ int m_islandTag1;
+ int m_companionId;
+
+ int m_activationState1;
+ btScalar m_deactivationTime;
+
+ btScalar m_friction;
+ btScalar m_restitution;
+
+ ///m_internalType is reserved to distinguish Bullet's btCollisionObject, btRigidBody, btSoftBody, btGhostObject etc.
+ ///do not assign your own m_internalType unless you write a new dynamics object class.
+ int m_internalType;
+
+ ///users can point to their objects, m_userPointer is not used by Bullet, see setUserPointer/getUserPointer
+ void* m_userObjectPointer;
+
+ ///time of impact calculation
+ btScalar m_hitFraction;
+
+ ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
+ btScalar m_ccdSweptSphereRadius;
+
+ /// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
+ btScalar m_ccdMotionThreshold;
+
+ /// If some object should have elaborate collision filtering by sub-classes
+ int m_checkCollideWith;
+
+ virtual bool checkCollideWithOverride(btCollisionObject* /* co */)
+ {
+ return true;
+ }
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ enum CollisionFlags
+ {
+ CF_STATIC_OBJECT= 1,
+ CF_KINEMATIC_OBJECT= 2,
+ CF_NO_CONTACT_RESPONSE = 4,
+ CF_CUSTOM_MATERIAL_CALLBACK = 8,//this allows per-triangle material (friction/restitution)
+ CF_CHARACTER_OBJECT = 16,
+ CF_DISABLE_VISUALIZE_OBJECT = 32, //disable debug drawing
+ CF_DISABLE_SPU_COLLISION_PROCESSING = 64//disable parallel/SPU processing
+ };
+
+ enum CollisionObjectTypes
+ {
+ CO_COLLISION_OBJECT =1,
+ CO_RIGID_BODY=2,
+ ///CO_GHOST_OBJECT keeps track of all objects overlapping its AABB and that pass its collision filter
+ ///It is useful for collision sensors, explosion objects, character controller etc.
+ CO_GHOST_OBJECT=4,
+ CO_SOFT_BODY=8,
+ CO_HF_FLUID=16,
+ CO_USER_TYPE=32
+ };
+
+ SIMD_FORCE_INLINE bool mergesSimulationIslands() const
+ {
+ ///static objects, kinematic and object without contact response don't merge islands
+ return ((m_collisionFlags & (CF_STATIC_OBJECT | CF_KINEMATIC_OBJECT | CF_NO_CONTACT_RESPONSE) )==0);
+ }
+
+ const btVector3& getAnisotropicFriction() const
+ {
+ return m_anisotropicFriction;
+ }
+ void setAnisotropicFriction(const btVector3& anisotropicFriction)
+ {
+ m_anisotropicFriction = anisotropicFriction;
+ m_hasAnisotropicFriction = (anisotropicFriction[0]!=1.f) || (anisotropicFriction[1]!=1.f) || (anisotropicFriction[2]!=1.f);
+ }
+ bool hasAnisotropicFriction() const
+ {
+ return m_hasAnisotropicFriction!=0;
+ }
+
+ ///the constraint solver can discard solving contacts, if the distance is above this threshold. 0 by default.
+ ///Note that using contacts with positive distance can improve stability. It increases, however, the chance of colliding with degerate contacts, such as 'interior' triangle edges
+ void setContactProcessingThreshold( btScalar contactProcessingThreshold)
+ {
+ m_contactProcessingThreshold = contactProcessingThreshold;
+ }
+ btScalar getContactProcessingThreshold() const
+ {
+ return m_contactProcessingThreshold;
+ }
+
+ SIMD_FORCE_INLINE bool isStaticObject() const {
+ return (m_collisionFlags & CF_STATIC_OBJECT) != 0;
+ }
+
+ SIMD_FORCE_INLINE bool isKinematicObject() const
+ {
+ return (m_collisionFlags & CF_KINEMATIC_OBJECT) != 0;
+ }
+
+ SIMD_FORCE_INLINE bool isStaticOrKinematicObject() const
+ {
+ return (m_collisionFlags & (CF_KINEMATIC_OBJECT | CF_STATIC_OBJECT)) != 0 ;
+ }
+
+ SIMD_FORCE_INLINE bool hasContactResponse() const {
+ return (m_collisionFlags & CF_NO_CONTACT_RESPONSE)==0;
+ }
+
+
+ btCollisionObject();
+
+ virtual ~btCollisionObject();
+
+ virtual void setCollisionShape(btCollisionShape* collisionShape)
+ {
+ m_collisionShape = collisionShape;
+ m_rootCollisionShape = collisionShape;
+ }
+
+ SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const
+ {
+ return m_collisionShape;
+ }
+
+ SIMD_FORCE_INLINE btCollisionShape* getCollisionShape()
+ {
+ return m_collisionShape;
+ }
+
+ SIMD_FORCE_INLINE const btCollisionShape* getRootCollisionShape() const
+ {
+ return m_rootCollisionShape;
+ }
+
+ SIMD_FORCE_INLINE btCollisionShape* getRootCollisionShape()
+ {
+ return m_rootCollisionShape;
+ }
+
+ ///Avoid using this internal API call
+ ///internalSetTemporaryCollisionShape is used to temporary replace the actual collision shape by a child collision shape.
+ void internalSetTemporaryCollisionShape(btCollisionShape* collisionShape)
+ {
+ m_collisionShape = collisionShape;
+ }
+
+ ///Avoid using this internal API call, the extension pointer is used by some Bullet extensions.
+ ///If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
+ void* internalGetExtensionPointer() const
+ {
+ return m_extensionPointer;
+ }
+ ///Avoid using this internal API call, the extension pointer is used by some Bullet extensions
+ ///If you need to store your own user pointer, use 'setUserPointer/getUserPointer' instead.
+ void internalSetExtensionPointer(void* pointer)
+ {
+ m_extensionPointer = pointer;
+ }
+
+ SIMD_FORCE_INLINE int getActivationState() const { return m_activationState1;}
+
+ void setActivationState(int newState);
+
+ void setDeactivationTime(btScalar time)
+ {
+ m_deactivationTime = time;
+ }
+ btScalar getDeactivationTime() const
+ {
+ return m_deactivationTime;
+ }
+
+ void forceActivationState(int newState);
+
+ void activate(bool forceActivation = false);
+
+ SIMD_FORCE_INLINE bool isActive() const
+ {
+ return ((getActivationState() != ISLAND_SLEEPING) && (getActivationState() != DISABLE_SIMULATION));
+ }
+
+ void setRestitution(btScalar rest)
+ {
+ m_restitution = rest;
+ }
+ btScalar getRestitution() const
+ {
+ return m_restitution;
+ }
+ void setFriction(btScalar frict)
+ {
+ m_friction = frict;
+ }
+ btScalar getFriction() const
+ {
+ return m_friction;
+ }
+
+ ///reserved for Bullet internal usage
+ int getInternalType() const
+ {
+ return m_internalType;
+ }
+
+ btTransform& getWorldTransform()
+ {
+ return m_worldTransform;
+ }
+
+ const btTransform& getWorldTransform() const
+ {
+ return m_worldTransform;
+ }
+
+ void setWorldTransform(const btTransform& worldTrans)
+ {
+ m_worldTransform = worldTrans;
+ }
+
+
+ SIMD_FORCE_INLINE btBroadphaseProxy* getBroadphaseHandle()
+ {
+ return m_broadphaseHandle;
+ }
+
+ SIMD_FORCE_INLINE const btBroadphaseProxy* getBroadphaseHandle() const
+ {
+ return m_broadphaseHandle;
+ }
+
+ void setBroadphaseHandle(btBroadphaseProxy* handle)
+ {
+ m_broadphaseHandle = handle;
+ }
+
+
+ const btTransform& getInterpolationWorldTransform() const
+ {
+ return m_interpolationWorldTransform;
+ }
+
+ btTransform& getInterpolationWorldTransform()
+ {
+ return m_interpolationWorldTransform;
+ }
+
+ void setInterpolationWorldTransform(const btTransform& trans)
+ {
+ m_interpolationWorldTransform = trans;
+ }
+
+ void setInterpolationLinearVelocity(const btVector3& linvel)
+ {
+ m_interpolationLinearVelocity = linvel;
+ }
+
+ void setInterpolationAngularVelocity(const btVector3& angvel)
+ {
+ m_interpolationAngularVelocity = angvel;
+ }
+
+ const btVector3& getInterpolationLinearVelocity() const
+ {
+ return m_interpolationLinearVelocity;
+ }
+
+ const btVector3& getInterpolationAngularVelocity() const
+ {
+ return m_interpolationAngularVelocity;
+ }
+
+ SIMD_FORCE_INLINE int getIslandTag() const
+ {
+ return m_islandTag1;
+ }
+
+ void setIslandTag(int tag)
+ {
+ m_islandTag1 = tag;
+ }
+
+ SIMD_FORCE_INLINE int getCompanionId() const
+ {
+ return m_companionId;
+ }
+
+ void setCompanionId(int id)
+ {
+ m_companionId = id;
+ }
+
+ SIMD_FORCE_INLINE btScalar getHitFraction() const
+ {
+ return m_hitFraction;
+ }
+
+ void setHitFraction(btScalar hitFraction)
+ {
+ m_hitFraction = hitFraction;
+ }
+
+
+ SIMD_FORCE_INLINE int getCollisionFlags() const
+ {
+ return m_collisionFlags;
+ }
+
+ void setCollisionFlags(int flags)
+ {
+ m_collisionFlags = flags;
+ }
+
+ ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
+ btScalar getCcdSweptSphereRadius() const
+ {
+ return m_ccdSweptSphereRadius;
+ }
+
+ ///Swept sphere radius (0.0 by default), see btConvexConvexAlgorithm::
+ void setCcdSweptSphereRadius(btScalar radius)
+ {
+ m_ccdSweptSphereRadius = radius;
+ }
+
+ btScalar getCcdMotionThreshold() const
+ {
+ return m_ccdMotionThreshold;
+ }
+
+ btScalar getCcdSquareMotionThreshold() const
+ {
+ return m_ccdMotionThreshold*m_ccdMotionThreshold;
+ }
+
+
+
+ /// Don't do continuous collision detection if the motion (in one step) is less then m_ccdMotionThreshold
+ void setCcdMotionThreshold(btScalar ccdMotionThreshold)
+ {
+ m_ccdMotionThreshold = ccdMotionThreshold;
+ }
+
+ ///users can point to their objects, userPointer is not used by Bullet
+ void* getUserPointer() const
+ {
+ return m_userObjectPointer;
+ }
+
+ ///users can point to their objects, userPointer is not used by Bullet
+ void setUserPointer(void* userPointer)
+ {
+ m_userObjectPointer = userPointer;
+ }
+
+
+ inline bool checkCollideWith(btCollisionObject* co)
+ {
+ if (m_checkCollideWith)
+ return checkCollideWithOverride(co);
+
+ return true;
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, class btSerializer* serializer) const;
+
+ virtual void serializeSingleObject(class btSerializer* serializer) const;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btCollisionObjectDoubleData
+{
+ void *m_broadphaseHandle;
+ void *m_collisionShape;
+ btCollisionShapeData *m_rootCollisionShape;
+ char *m_name;
+
+ btTransformDoubleData m_worldTransform;
+ btTransformDoubleData m_interpolationWorldTransform;
+ btVector3DoubleData m_interpolationLinearVelocity;
+ btVector3DoubleData m_interpolationAngularVelocity;
+ btVector3DoubleData m_anisotropicFriction;
+ double m_contactProcessingThreshold;
+ double m_deactivationTime;
+ double m_friction;
+ double m_restitution;
+ double m_hitFraction;
+ double m_ccdSweptSphereRadius;
+ double m_ccdMotionThreshold;
+
+ int m_hasAnisotropicFriction;
+ int m_collisionFlags;
+ int m_islandTag1;
+ int m_companionId;
+ int m_activationState1;
+ int m_internalType;
+ int m_checkCollideWith;
+
+ char m_padding[4];
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btCollisionObjectFloatData
+{
+ void *m_broadphaseHandle;
+ void *m_collisionShape;
+ btCollisionShapeData *m_rootCollisionShape;
+ char *m_name;
+
+ btTransformFloatData m_worldTransform;
+ btTransformFloatData m_interpolationWorldTransform;
+ btVector3FloatData m_interpolationLinearVelocity;
+ btVector3FloatData m_interpolationAngularVelocity;
+ btVector3FloatData m_anisotropicFriction;
+ float m_contactProcessingThreshold;
+ float m_deactivationTime;
+ float m_friction;
+ float m_restitution;
+ float m_hitFraction;
+ float m_ccdSweptSphereRadius;
+ float m_ccdMotionThreshold;
+
+ int m_hasAnisotropicFriction;
+ int m_collisionFlags;
+ int m_islandTag1;
+ int m_companionId;
+ int m_activationState1;
+ int m_internalType;
+ int m_checkCollideWith;
+};
+
+
+
+SIMD_FORCE_INLINE int btCollisionObject::calculateSerializeBufferSize() const
+{
+ return sizeof(btCollisionObjectData);
+}
+
+
+
+#endif //BT_COLLISION_OBJECT_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
new file mode 100644
index 00000000..807b3d66
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.cpp
@@ -0,0 +1,1513 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btCollisionWorld.h"
+#include "btCollisionDispatcher.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h" //for raycasting
+#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h" //for raycasting
+#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h"
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/BroadphaseCollision/btDbvt.h"
+#include "LinearMath/btAabbUtil2.h"
+#include "LinearMath/btQuickprof.h"
+#include "LinearMath/btStackAlloc.h"
+#include "LinearMath/btSerializer.h"
+#include "BulletCollision/CollisionShapes/btConvexPolyhedron.h"
+
+//#define DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION
+
+
+//#define USE_BRUTEFORCE_RAYBROADPHASE 1
+//RECALCULATE_AABB is slower, but benefit is that you don't need to call 'stepSimulation' or 'updateAabbs' before using a rayTest
+//#define RECALCULATE_AABB_RAYCAST 1
+
+//When the user doesn't provide dispatcher or broadphase, create basic versions (and delete them in destructor)
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
+#include "BulletCollision/CollisionDispatch/btCollisionConfiguration.h"
+
+
+///for debug drawing
+
+//for debug rendering
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include "BulletCollision/CollisionShapes/btConeShape.h"
+#include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btCylinderShape.h"
+#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
+#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleCallback.h"
+#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+
+
+
+btCollisionWorld::btCollisionWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache, btCollisionConfiguration* collisionConfiguration)
+:m_dispatcher1(dispatcher),
+m_broadphasePairCache(pairCache),
+m_debugDrawer(0),
+m_forceUpdateAllAabbs(true)
+{
+ m_stackAlloc = collisionConfiguration->getStackAllocator();
+ m_dispatchInfo.m_stackAllocator = m_stackAlloc;
+}
+
+
+btCollisionWorld::~btCollisionWorld()
+{
+
+ //clean up remaining objects
+ int i;
+ for (i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* collisionObject= m_collisionObjects[i];
+
+ btBroadphaseProxy* bp = collisionObject->getBroadphaseHandle();
+ if (bp)
+ {
+ //
+ // only clear the cached algorithms
+ //
+ getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1);
+ getBroadphase()->destroyProxy(bp,m_dispatcher1);
+ collisionObject->setBroadphaseHandle(0);
+ }
+ }
+
+
+}
+
+
+
+
+
+
+
+
+
+
+void btCollisionWorld::addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup,short int collisionFilterMask)
+{
+
+ btAssert(collisionObject);
+
+ //check that the object isn't already added
+ btAssert( m_collisionObjects.findLinearSearch(collisionObject) == m_collisionObjects.size());
+
+ m_collisionObjects.push_back(collisionObject);
+
+ //calculate new AABB
+ btTransform trans = collisionObject->getWorldTransform();
+
+ btVector3 minAabb;
+ btVector3 maxAabb;
+ collisionObject->getCollisionShape()->getAabb(trans,minAabb,maxAabb);
+
+ int type = collisionObject->getCollisionShape()->getShapeType();
+ collisionObject->setBroadphaseHandle( getBroadphase()->createProxy(
+ minAabb,
+ maxAabb,
+ type,
+ collisionObject,
+ collisionFilterGroup,
+ collisionFilterMask,
+ m_dispatcher1,0
+ )) ;
+
+
+
+
+
+}
+
+
+
+void btCollisionWorld::updateSingleAabb(btCollisionObject* colObj)
+{
+ btVector3 minAabb,maxAabb;
+ colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb);
+ //need to increase the aabb for contact thresholds
+ btVector3 contactThreshold(gContactBreakingThreshold,gContactBreakingThreshold,gContactBreakingThreshold);
+ minAabb -= contactThreshold;
+ maxAabb += contactThreshold;
+
+ if(getDispatchInfo().m_useContinuous && colObj->getInternalType()==btCollisionObject::CO_RIGID_BODY)
+ {
+ btVector3 minAabb2,maxAabb2;
+ colObj->getCollisionShape()->getAabb(colObj->getInterpolationWorldTransform(),minAabb2,maxAabb2);
+ minAabb2 -= contactThreshold;
+ maxAabb2 += contactThreshold;
+ minAabb.setMin(minAabb2);
+ maxAabb.setMax(maxAabb2);
+ }
+
+ btBroadphaseInterface* bp = (btBroadphaseInterface*)m_broadphasePairCache;
+
+ //moving objects should be moderately sized, probably something wrong if not
+ if ( colObj->isStaticObject() || ((maxAabb-minAabb).length2() < btScalar(1e12)))
+ {
+ bp->setAabb(colObj->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1);
+ } else
+ {
+ //something went wrong, investigate
+ //this assert is unwanted in 3D modelers (danger of loosing work)
+ colObj->setActivationState(DISABLE_SIMULATION);
+
+ static bool reportMe = true;
+ if (reportMe && m_debugDrawer)
+ {
+ reportMe = false;
+ m_debugDrawer->reportErrorWarning("Overflow in AABB, object removed from simulation");
+ m_debugDrawer->reportErrorWarning("If you can reproduce this, please email bugs@continuousphysics.com\n");
+ m_debugDrawer->reportErrorWarning("Please include above information, your Platform, version of OS.\n");
+ m_debugDrawer->reportErrorWarning("Thanks.\n");
+ }
+ }
+}
+
+void btCollisionWorld::updateAabbs()
+{
+ BT_PROFILE("updateAabbs");
+
+ btTransform predictedTrans;
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+
+ //only update aabb of active objects
+ if (m_forceUpdateAllAabbs || colObj->isActive())
+ {
+ updateSingleAabb(colObj);
+ }
+ }
+}
+
+
+
+void btCollisionWorld::performDiscreteCollisionDetection()
+{
+ BT_PROFILE("performDiscreteCollisionDetection");
+
+ btDispatcherInfo& dispatchInfo = getDispatchInfo();
+
+ updateAabbs();
+
+ {
+ BT_PROFILE("calculateOverlappingPairs");
+ m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1);
+ }
+
+
+ btDispatcher* dispatcher = getDispatcher();
+ {
+ BT_PROFILE("dispatchAllCollisionPairs");
+ if (dispatcher)
+ dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache->getOverlappingPairCache(),dispatchInfo,m_dispatcher1);
+ }
+
+}
+
+
+
+void btCollisionWorld::removeCollisionObject(btCollisionObject* collisionObject)
+{
+
+
+ //bool removeFromBroadphase = false;
+
+ {
+
+ btBroadphaseProxy* bp = collisionObject->getBroadphaseHandle();
+ if (bp)
+ {
+ //
+ // only clear the cached algorithms
+ //
+ getBroadphase()->getOverlappingPairCache()->cleanProxyFromPairs(bp,m_dispatcher1);
+ getBroadphase()->destroyProxy(bp,m_dispatcher1);
+ collisionObject->setBroadphaseHandle(0);
+ }
+ }
+
+
+ //swapremove
+ m_collisionObjects.remove(collisionObject);
+
+}
+
+
+
+void btCollisionWorld::rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
+ btCollisionObject* collisionObject,
+ const btCollisionShape* collisionShape,
+ const btTransform& colObjWorldTransform,
+ RayResultCallback& resultCallback)
+{
+ btSphereShape pointShape(btScalar(0.0));
+ pointShape.setMargin(0.f);
+ const btConvexShape* castShape = &pointShape;
+
+ if (collisionShape->isConvex())
+ {
+ // BT_PROFILE("rayTestConvex");
+ btConvexCast::CastResult castResult;
+ castResult.m_fraction = resultCallback.m_closestHitFraction;
+
+ btConvexShape* convexShape = (btConvexShape*) collisionShape;
+ btVoronoiSimplexSolver simplexSolver;
+#define USE_SUBSIMPLEX_CONVEX_CAST 1
+#ifdef USE_SUBSIMPLEX_CONVEX_CAST
+ btSubsimplexConvexCast convexCaster(castShape,convexShape,&simplexSolver);
+#else
+ //btGjkConvexCast convexCaster(castShape,convexShape,&simplexSolver);
+ //btContinuousConvexCollision convexCaster(castShape,convexShape,&simplexSolver,0);
+#endif //#USE_SUBSIMPLEX_CONVEX_CAST
+
+ if (convexCaster.calcTimeOfImpact(rayFromTrans,rayToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
+ {
+ //add hit
+ if (castResult.m_normal.length2() > btScalar(0.0001))
+ {
+ if (castResult.m_fraction < resultCallback.m_closestHitFraction)
+ {
+#ifdef USE_SUBSIMPLEX_CONVEX_CAST
+ //rotate normal into worldspace
+ castResult.m_normal = rayFromTrans.getBasis() * castResult.m_normal;
+#endif //USE_SUBSIMPLEX_CONVEX_CAST
+
+ castResult.m_normal.normalize();
+ btCollisionWorld::LocalRayResult localRayResult
+ (
+ collisionObject,
+ 0,
+ castResult.m_normal,
+ castResult.m_fraction
+ );
+
+ bool normalInWorldSpace = true;
+ resultCallback.addSingleResult(localRayResult, normalInWorldSpace);
+
+ }
+ }
+ }
+ } else {
+ if (collisionShape->isConcave())
+ {
+ // BT_PROFILE("rayTestConcave");
+ if (collisionShape->getShapeType()==TRIANGLE_MESH_SHAPE_PROXYTYPE)
+ {
+ ///optimized version for btBvhTriangleMeshShape
+ btBvhTriangleMeshShape* triangleMesh = (btBvhTriangleMeshShape*)collisionShape;
+ btTransform worldTocollisionObject = colObjWorldTransform.inverse();
+ btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin();
+ btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin();
+
+ //ConvexCast::CastResult
+ struct BridgeTriangleRaycastCallback : public btTriangleRaycastCallback
+ {
+ btCollisionWorld::RayResultCallback* m_resultCallback;
+ btCollisionObject* m_collisionObject;
+ btTriangleMeshShape* m_triangleMesh;
+
+ btTransform m_colObjWorldTransform;
+
+ BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to,
+ btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh,const btTransform& colObjWorldTransform):
+ //@BP Mod
+ btTriangleRaycastCallback(from,to, resultCallback->m_flags),
+ m_resultCallback(resultCallback),
+ m_collisionObject(collisionObject),
+ m_triangleMesh(triangleMesh),
+ m_colObjWorldTransform(colObjWorldTransform)
+ {
+ }
+
+
+ virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex )
+ {
+ btCollisionWorld::LocalShapeInfo shapeInfo;
+ shapeInfo.m_shapePart = partId;
+ shapeInfo.m_triangleIndex = triangleIndex;
+
+ btVector3 hitNormalWorld = m_colObjWorldTransform.getBasis() * hitNormalLocal;
+
+ btCollisionWorld::LocalRayResult rayResult
+ (m_collisionObject,
+ &shapeInfo,
+ hitNormalWorld,
+ hitFraction);
+
+ bool normalInWorldSpace = true;
+ return m_resultCallback->addSingleResult(rayResult,normalInWorldSpace);
+ }
+
+ };
+
+ BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObject,triangleMesh,colObjWorldTransform);
+ rcb.m_hitFraction = resultCallback.m_closestHitFraction;
+ triangleMesh->performRaycast(&rcb,rayFromLocal,rayToLocal);
+ } else
+ {
+ //generic (slower) case
+ btConcaveShape* concaveShape = (btConcaveShape*)collisionShape;
+
+ btTransform worldTocollisionObject = colObjWorldTransform.inverse();
+
+ btVector3 rayFromLocal = worldTocollisionObject * rayFromTrans.getOrigin();
+ btVector3 rayToLocal = worldTocollisionObject * rayToTrans.getOrigin();
+
+ //ConvexCast::CastResult
+
+ struct BridgeTriangleRaycastCallback : public btTriangleRaycastCallback
+ {
+ btCollisionWorld::RayResultCallback* m_resultCallback;
+ btCollisionObject* m_collisionObject;
+ btConcaveShape* m_triangleMesh;
+
+ btTransform m_colObjWorldTransform;
+
+ BridgeTriangleRaycastCallback( const btVector3& from,const btVector3& to,
+ btCollisionWorld::RayResultCallback* resultCallback, btCollisionObject* collisionObject,btConcaveShape* triangleMesh, const btTransform& colObjWorldTransform):
+ //@BP Mod
+ btTriangleRaycastCallback(from,to, resultCallback->m_flags),
+ m_resultCallback(resultCallback),
+ m_collisionObject(collisionObject),
+ m_triangleMesh(triangleMesh),
+ m_colObjWorldTransform(colObjWorldTransform)
+ {
+ }
+
+
+ virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex )
+ {
+ btCollisionWorld::LocalShapeInfo shapeInfo;
+ shapeInfo.m_shapePart = partId;
+ shapeInfo.m_triangleIndex = triangleIndex;
+
+ btVector3 hitNormalWorld = m_colObjWorldTransform.getBasis() * hitNormalLocal;
+
+ btCollisionWorld::LocalRayResult rayResult
+ (m_collisionObject,
+ &shapeInfo,
+ hitNormalWorld,
+ hitFraction);
+
+ bool normalInWorldSpace = true;
+ return m_resultCallback->addSingleResult(rayResult,normalInWorldSpace);
+ }
+
+ };
+
+
+ BridgeTriangleRaycastCallback rcb(rayFromLocal,rayToLocal,&resultCallback,collisionObject,concaveShape, colObjWorldTransform);
+ rcb.m_hitFraction = resultCallback.m_closestHitFraction;
+
+ btVector3 rayAabbMinLocal = rayFromLocal;
+ rayAabbMinLocal.setMin(rayToLocal);
+ btVector3 rayAabbMaxLocal = rayFromLocal;
+ rayAabbMaxLocal.setMax(rayToLocal);
+
+ concaveShape->processAllTriangles(&rcb,rayAabbMinLocal,rayAabbMaxLocal);
+ }
+ } else {
+ // BT_PROFILE("rayTestCompound");
+ if (collisionShape->isCompound())
+ {
+ struct LocalInfoAdder2 : public RayResultCallback
+ {
+ RayResultCallback* m_userCallback;
+ int m_i;
+
+ LocalInfoAdder2 (int i, RayResultCallback *user)
+ : m_userCallback(user), m_i(i)
+ {
+ m_closestHitFraction = m_userCallback->m_closestHitFraction;
+ }
+ virtual bool needsCollision(btBroadphaseProxy* p) const
+ {
+ return m_userCallback->needsCollision(p);
+ }
+
+ virtual btScalar addSingleResult (btCollisionWorld::LocalRayResult &r, bool b)
+ {
+ btCollisionWorld::LocalShapeInfo shapeInfo;
+ shapeInfo.m_shapePart = -1;
+ shapeInfo.m_triangleIndex = m_i;
+ if (r.m_localShapeInfo == NULL)
+ r.m_localShapeInfo = &shapeInfo;
+
+ const btScalar result = m_userCallback->addSingleResult(r, b);
+ m_closestHitFraction = m_userCallback->m_closestHitFraction;
+ return result;
+ }
+ };
+
+ struct RayTester : btDbvt::ICollide
+ {
+ btCollisionObject* m_collisionObject;
+ const btCompoundShape* m_compoundShape;
+ const btTransform& m_colObjWorldTransform;
+ const btTransform& m_rayFromTrans;
+ const btTransform& m_rayToTrans;
+ RayResultCallback& m_resultCallback;
+
+ RayTester(btCollisionObject* collisionObject,
+ const btCompoundShape* compoundShape,
+ const btTransform& colObjWorldTransform,
+ const btTransform& rayFromTrans,
+ const btTransform& rayToTrans,
+ RayResultCallback& resultCallback):
+ m_collisionObject(collisionObject),
+ m_compoundShape(compoundShape),
+ m_colObjWorldTransform(colObjWorldTransform),
+ m_rayFromTrans(rayFromTrans),
+ m_rayToTrans(rayToTrans),
+ m_resultCallback(resultCallback)
+ {
+
+ }
+
+ void Process(int i)
+ {
+ const btCollisionShape* childCollisionShape = m_compoundShape->getChildShape(i);
+ const btTransform& childTrans = m_compoundShape->getChildTransform(i);
+ btTransform childWorldTrans = m_colObjWorldTransform * childTrans;
+
+ // replace collision shape so that callback can determine the triangle
+ btCollisionShape* saveCollisionShape = m_collisionObject->getCollisionShape();
+ m_collisionObject->internalSetTemporaryCollisionShape((btCollisionShape*)childCollisionShape);
+
+ LocalInfoAdder2 my_cb(i, &m_resultCallback);
+
+ rayTestSingle(
+ m_rayFromTrans,
+ m_rayToTrans,
+ m_collisionObject,
+ childCollisionShape,
+ childWorldTrans,
+ my_cb);
+
+ // restore
+ m_collisionObject->internalSetTemporaryCollisionShape(saveCollisionShape);
+ }
+
+ void Process(const btDbvtNode* leaf)
+ {
+ Process(leaf->dataAsInt);
+ }
+ };
+
+ const btCompoundShape* compoundShape = static_cast<const btCompoundShape*>(collisionShape);
+ const btDbvt* dbvt = compoundShape->getDynamicAabbTree();
+
+
+ RayTester rayCB(
+ collisionObject,
+ compoundShape,
+ colObjWorldTransform,
+ rayFromTrans,
+ rayToTrans,
+ resultCallback);
+#ifndef DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION
+ if (dbvt)
+ {
+ btVector3 localRayFrom = colObjWorldTransform.inverseTimes(rayFromTrans).getOrigin();
+ btVector3 localRayTo = colObjWorldTransform.inverseTimes(rayToTrans).getOrigin();
+ btDbvt::rayTest(dbvt->m_root, localRayFrom , localRayTo, rayCB);
+ }
+ else
+#endif //DISABLE_DBVT_COMPOUNDSHAPE_RAYCAST_ACCELERATION
+ {
+ for (int i = 0, n = compoundShape->getNumChildShapes(); i < n; ++i)
+ {
+ rayCB.Process(i);
+ }
+ }
+ }
+ }
+ }
+}
+
+void btCollisionWorld::objectQuerySingle(const btConvexShape* castShape,const btTransform& convexFromTrans,const btTransform& convexToTrans,
+ btCollisionObject* collisionObject,
+ const btCollisionShape* collisionShape,
+ const btTransform& colObjWorldTransform,
+ ConvexResultCallback& resultCallback, btScalar allowedPenetration)
+{
+ if (collisionShape->isConvex())
+ {
+ //BT_PROFILE("convexSweepConvex");
+ btConvexCast::CastResult castResult;
+ castResult.m_allowedPenetration = allowedPenetration;
+ castResult.m_fraction = resultCallback.m_closestHitFraction;//btScalar(1.);//??
+
+ btConvexShape* convexShape = (btConvexShape*) collisionShape;
+ btVoronoiSimplexSolver simplexSolver;
+ btGjkEpaPenetrationDepthSolver gjkEpaPenetrationSolver;
+
+ btContinuousConvexCollision convexCaster1(castShape,convexShape,&simplexSolver,&gjkEpaPenetrationSolver);
+ //btGjkConvexCast convexCaster2(castShape,convexShape,&simplexSolver);
+ //btSubsimplexConvexCast convexCaster3(castShape,convexShape,&simplexSolver);
+
+ btConvexCast* castPtr = &convexCaster1;
+
+
+
+ if (castPtr->calcTimeOfImpact(convexFromTrans,convexToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
+ {
+ //add hit
+ if (castResult.m_normal.length2() > btScalar(0.0001))
+ {
+ if (castResult.m_fraction < resultCallback.m_closestHitFraction)
+ {
+ castResult.m_normal.normalize();
+ btCollisionWorld::LocalConvexResult localConvexResult
+ (
+ collisionObject,
+ 0,
+ castResult.m_normal,
+ castResult.m_hitPoint,
+ castResult.m_fraction
+ );
+
+ bool normalInWorldSpace = true;
+ resultCallback.addSingleResult(localConvexResult, normalInWorldSpace);
+
+ }
+ }
+ }
+ } else {
+ if (collisionShape->isConcave())
+ {
+ if (collisionShape->getShapeType()==TRIANGLE_MESH_SHAPE_PROXYTYPE)
+ {
+ //BT_PROFILE("convexSweepbtBvhTriangleMesh");
+ btBvhTriangleMeshShape* triangleMesh = (btBvhTriangleMeshShape*)collisionShape;
+ btTransform worldTocollisionObject = colObjWorldTransform.inverse();
+ btVector3 convexFromLocal = worldTocollisionObject * convexFromTrans.getOrigin();
+ btVector3 convexToLocal = worldTocollisionObject * convexToTrans.getOrigin();
+ // rotation of box in local mesh space = MeshRotation^-1 * ConvexToRotation
+ btTransform rotationXform = btTransform(worldTocollisionObject.getBasis() * convexToTrans.getBasis());
+
+ //ConvexCast::CastResult
+ struct BridgeTriangleConvexcastCallback : public btTriangleConvexcastCallback
+ {
+ btCollisionWorld::ConvexResultCallback* m_resultCallback;
+ btCollisionObject* m_collisionObject;
+ btTriangleMeshShape* m_triangleMesh;
+
+ BridgeTriangleConvexcastCallback(const btConvexShape* castShape, const btTransform& from,const btTransform& to,
+ btCollisionWorld::ConvexResultCallback* resultCallback, btCollisionObject* collisionObject,btTriangleMeshShape* triangleMesh, const btTransform& triangleToWorld):
+ btTriangleConvexcastCallback(castShape, from,to, triangleToWorld, triangleMesh->getMargin()),
+ m_resultCallback(resultCallback),
+ m_collisionObject(collisionObject),
+ m_triangleMesh(triangleMesh)
+ {
+ }
+
+
+ virtual btScalar reportHit(const btVector3& hitNormalLocal, const btVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleIndex )
+ {
+ btCollisionWorld::LocalShapeInfo shapeInfo;
+ shapeInfo.m_shapePart = partId;
+ shapeInfo.m_triangleIndex = triangleIndex;
+ if (hitFraction <= m_resultCallback->m_closestHitFraction)
+ {
+
+ btCollisionWorld::LocalConvexResult convexResult
+ (m_collisionObject,
+ &shapeInfo,
+ hitNormalLocal,
+ hitPointLocal,
+ hitFraction);
+
+ bool normalInWorldSpace = true;
+
+
+ return m_resultCallback->addSingleResult(convexResult,normalInWorldSpace);
+ }
+ return hitFraction;
+ }
+
+ };
+
+ BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,collisionObject,triangleMesh, colObjWorldTransform);
+ tccb.m_hitFraction = resultCallback.m_closestHitFraction;
+ tccb.m_allowedPenetration = allowedPenetration;
+ btVector3 boxMinLocal, boxMaxLocal;
+ castShape->getAabb(rotationXform, boxMinLocal, boxMaxLocal);
+ triangleMesh->performConvexcast(&tccb,convexFromLocal,convexToLocal,boxMinLocal, boxMaxLocal);
+ } else
+ {
+ if (collisionShape->getShapeType()==STATIC_PLANE_PROXYTYPE)
+ {
+ btConvexCast::CastResult castResult;
+ castResult.m_allowedPenetration = allowedPenetration;
+ castResult.m_fraction = resultCallback.m_closestHitFraction;
+ btStaticPlaneShape* planeShape = (btStaticPlaneShape*) collisionShape;
+ btContinuousConvexCollision convexCaster1(castShape,planeShape);
+ btConvexCast* castPtr = &convexCaster1;
+
+ if (castPtr->calcTimeOfImpact(convexFromTrans,convexToTrans,colObjWorldTransform,colObjWorldTransform,castResult))
+ {
+ //add hit
+ if (castResult.m_normal.length2() > btScalar(0.0001))
+ {
+ if (castResult.m_fraction < resultCallback.m_closestHitFraction)
+ {
+ castResult.m_normal.normalize();
+ btCollisionWorld::LocalConvexResult localConvexResult
+ (
+ collisionObject,
+ 0,
+ castResult.m_normal,
+ castResult.m_hitPoint,
+ castResult.m_fraction
+ );
+
+ bool normalInWorldSpace = true;
+ resultCallback.addSingleResult(localConvexResult, normalInWorldSpace);
+ }
+ }
+ }
+
+ } else
+ {
+ //BT_PROFILE("convexSweepConcave");
+ btConcaveShape* concaveShape = (btConcaveShape*)collisionShape;
+ btTransform worldTocollisionObject = colObjWorldTransform.inverse();
+ btVector3 convexFromLocal = worldTocollisionObject * convexFromTrans.getOrigin();
+ btVector3 convexToLocal = worldTocollisionObject * convexToTrans.getOrigin();
+ // rotation of box in local mesh space = MeshRotation^-1 * ConvexToRotation
+ btTransform rotationXform = btTransform(worldTocollisionObject.getBasis() * convexToTrans.getBasis());
+
+ //ConvexCast::CastResult
+ struct BridgeTriangleConvexcastCallback : public btTriangleConvexcastCallback
+ {
+ btCollisionWorld::ConvexResultCallback* m_resultCallback;
+ btCollisionObject* m_collisionObject;
+ btConcaveShape* m_triangleMesh;
+
+ BridgeTriangleConvexcastCallback(const btConvexShape* castShape, const btTransform& from,const btTransform& to,
+ btCollisionWorld::ConvexResultCallback* resultCallback, btCollisionObject* collisionObject,btConcaveShape* triangleMesh, const btTransform& triangleToWorld):
+ btTriangleConvexcastCallback(castShape, from,to, triangleToWorld, triangleMesh->getMargin()),
+ m_resultCallback(resultCallback),
+ m_collisionObject(collisionObject),
+ m_triangleMesh(triangleMesh)
+ {
+ }
+
+
+ virtual btScalar reportHit(const btVector3& hitNormalLocal, const btVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleIndex )
+ {
+ btCollisionWorld::LocalShapeInfo shapeInfo;
+ shapeInfo.m_shapePart = partId;
+ shapeInfo.m_triangleIndex = triangleIndex;
+ if (hitFraction <= m_resultCallback->m_closestHitFraction)
+ {
+
+ btCollisionWorld::LocalConvexResult convexResult
+ (m_collisionObject,
+ &shapeInfo,
+ hitNormalLocal,
+ hitPointLocal,
+ hitFraction);
+
+ bool normalInWorldSpace = false;
+
+ return m_resultCallback->addSingleResult(convexResult,normalInWorldSpace);
+ }
+ return hitFraction;
+ }
+
+ };
+
+ BridgeTriangleConvexcastCallback tccb(castShape, convexFromTrans,convexToTrans,&resultCallback,collisionObject,concaveShape, colObjWorldTransform);
+ tccb.m_hitFraction = resultCallback.m_closestHitFraction;
+ tccb.m_allowedPenetration = allowedPenetration;
+ btVector3 boxMinLocal, boxMaxLocal;
+ castShape->getAabb(rotationXform, boxMinLocal, boxMaxLocal);
+
+ btVector3 rayAabbMinLocal = convexFromLocal;
+ rayAabbMinLocal.setMin(convexToLocal);
+ btVector3 rayAabbMaxLocal = convexFromLocal;
+ rayAabbMaxLocal.setMax(convexToLocal);
+ rayAabbMinLocal += boxMinLocal;
+ rayAabbMaxLocal += boxMaxLocal;
+ concaveShape->processAllTriangles(&tccb,rayAabbMinLocal,rayAabbMaxLocal);
+ }
+ }
+ } else {
+ ///@todo : use AABB tree or other BVH acceleration structure!
+ if (collisionShape->isCompound())
+ {
+ BT_PROFILE("convexSweepCompound");
+ const btCompoundShape* compoundShape = static_cast<const btCompoundShape*>(collisionShape);
+ int i=0;
+ for (i=0;i<compoundShape->getNumChildShapes();i++)
+ {
+ btTransform childTrans = compoundShape->getChildTransform(i);
+ const btCollisionShape* childCollisionShape = compoundShape->getChildShape(i);
+ btTransform childWorldTrans = colObjWorldTransform * childTrans;
+ // replace collision shape so that callback can determine the triangle
+ btCollisionShape* saveCollisionShape = collisionObject->getCollisionShape();
+ collisionObject->internalSetTemporaryCollisionShape((btCollisionShape*)childCollisionShape);
+ struct LocalInfoAdder : public ConvexResultCallback {
+ ConvexResultCallback* m_userCallback;
+ int m_i;
+
+ LocalInfoAdder (int i, ConvexResultCallback *user)
+ : m_userCallback(user), m_i(i)
+ {
+ m_closestHitFraction = m_userCallback->m_closestHitFraction;
+ }
+ virtual bool needsCollision(btBroadphaseProxy* p) const
+ {
+ return m_userCallback->needsCollision(p);
+ }
+ virtual btScalar addSingleResult (btCollisionWorld::LocalConvexResult& r, bool b)
+ {
+ btCollisionWorld::LocalShapeInfo shapeInfo;
+ shapeInfo.m_shapePart = -1;
+ shapeInfo.m_triangleIndex = m_i;
+ if (r.m_localShapeInfo == NULL)
+ r.m_localShapeInfo = &shapeInfo;
+ const btScalar result = m_userCallback->addSingleResult(r, b);
+ m_closestHitFraction = m_userCallback->m_closestHitFraction;
+ return result;
+
+ }
+ };
+
+ LocalInfoAdder my_cb(i, &resultCallback);
+
+
+ objectQuerySingle(castShape, convexFromTrans,convexToTrans,
+ collisionObject,
+ childCollisionShape,
+ childWorldTrans,
+ my_cb, allowedPenetration);
+ // restore
+ collisionObject->internalSetTemporaryCollisionShape(saveCollisionShape);
+ }
+ }
+ }
+ }
+}
+
+
+struct btSingleRayCallback : public btBroadphaseRayCallback
+{
+
+ btVector3 m_rayFromWorld;
+ btVector3 m_rayToWorld;
+ btTransform m_rayFromTrans;
+ btTransform m_rayToTrans;
+ btVector3 m_hitNormal;
+
+ const btCollisionWorld* m_world;
+ btCollisionWorld::RayResultCallback& m_resultCallback;
+
+ btSingleRayCallback(const btVector3& rayFromWorld,const btVector3& rayToWorld,const btCollisionWorld* world,btCollisionWorld::RayResultCallback& resultCallback)
+ :m_rayFromWorld(rayFromWorld),
+ m_rayToWorld(rayToWorld),
+ m_world(world),
+ m_resultCallback(resultCallback)
+ {
+ m_rayFromTrans.setIdentity();
+ m_rayFromTrans.setOrigin(m_rayFromWorld);
+ m_rayToTrans.setIdentity();
+ m_rayToTrans.setOrigin(m_rayToWorld);
+
+ btVector3 rayDir = (rayToWorld-rayFromWorld);
+
+ rayDir.normalize ();
+ ///what about division by zero? --> just set rayDirection[i] to INF/BT_LARGE_FLOAT
+ m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[0];
+ m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[1];
+ m_rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[2];
+ m_signs[0] = m_rayDirectionInverse[0] < 0.0;
+ m_signs[1] = m_rayDirectionInverse[1] < 0.0;
+ m_signs[2] = m_rayDirectionInverse[2] < 0.0;
+
+ m_lambda_max = rayDir.dot(m_rayToWorld-m_rayFromWorld);
+
+ }
+
+
+
+ virtual bool process(const btBroadphaseProxy* proxy)
+ {
+ ///terminate further ray tests, once the closestHitFraction reached zero
+ if (m_resultCallback.m_closestHitFraction == btScalar(0.f))
+ return false;
+
+ btCollisionObject* collisionObject = (btCollisionObject*)proxy->m_clientObject;
+
+ //only perform raycast if filterMask matches
+ if(m_resultCallback.needsCollision(collisionObject->getBroadphaseHandle()))
+ {
+ //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject();
+ //btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+#if 0
+#ifdef RECALCULATE_AABB
+ btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+ collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax);
+#else
+ //getBroadphase()->getAabb(collisionObject->getBroadphaseHandle(),collisionObjectAabbMin,collisionObjectAabbMax);
+ const btVector3& collisionObjectAabbMin = collisionObject->getBroadphaseHandle()->m_aabbMin;
+ const btVector3& collisionObjectAabbMax = collisionObject->getBroadphaseHandle()->m_aabbMax;
+#endif
+#endif
+ //btScalar hitLambda = m_resultCallback.m_closestHitFraction;
+ //culling already done by broadphase
+ //if (btRayAabb(m_rayFromWorld,m_rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,m_hitNormal))
+ {
+ m_world->rayTestSingle(m_rayFromTrans,m_rayToTrans,
+ collisionObject,
+ collisionObject->getCollisionShape(),
+ collisionObject->getWorldTransform(),
+ m_resultCallback);
+ }
+ }
+ return true;
+ }
+};
+
+void btCollisionWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const
+{
+ //BT_PROFILE("rayTest");
+ /// use the broadphase to accelerate the search for objects, based on their aabb
+ /// and for each object with ray-aabb overlap, perform an exact ray test
+ btSingleRayCallback rayCB(rayFromWorld,rayToWorld,this,resultCallback);
+
+#ifndef USE_BRUTEFORCE_RAYBROADPHASE
+ m_broadphasePairCache->rayTest(rayFromWorld,rayToWorld,rayCB);
+#else
+ for (int i=0;i<this->getNumCollisionObjects();i++)
+ {
+ rayCB.process(m_collisionObjects[i]->getBroadphaseHandle());
+ }
+#endif //USE_BRUTEFORCE_RAYBROADPHASE
+
+}
+
+
+struct btSingleSweepCallback : public btBroadphaseRayCallback
+{
+
+ btTransform m_convexFromTrans;
+ btTransform m_convexToTrans;
+ btVector3 m_hitNormal;
+ const btCollisionWorld* m_world;
+ btCollisionWorld::ConvexResultCallback& m_resultCallback;
+ btScalar m_allowedCcdPenetration;
+ const btConvexShape* m_castShape;
+
+
+ btSingleSweepCallback(const btConvexShape* castShape, const btTransform& convexFromTrans,const btTransform& convexToTrans,const btCollisionWorld* world,btCollisionWorld::ConvexResultCallback& resultCallback,btScalar allowedPenetration)
+ :m_convexFromTrans(convexFromTrans),
+ m_convexToTrans(convexToTrans),
+ m_world(world),
+ m_resultCallback(resultCallback),
+ m_allowedCcdPenetration(allowedPenetration),
+ m_castShape(castShape)
+ {
+ btVector3 unnormalizedRayDir = (m_convexToTrans.getOrigin()-m_convexFromTrans.getOrigin());
+ btVector3 rayDir = unnormalizedRayDir.normalized();
+ ///what about division by zero? --> just set rayDirection[i] to INF/BT_LARGE_FLOAT
+ m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[0];
+ m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[1];
+ m_rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(BT_LARGE_FLOAT) : btScalar(1.0) / rayDir[2];
+ m_signs[0] = m_rayDirectionInverse[0] < 0.0;
+ m_signs[1] = m_rayDirectionInverse[1] < 0.0;
+ m_signs[2] = m_rayDirectionInverse[2] < 0.0;
+
+ m_lambda_max = rayDir.dot(unnormalizedRayDir);
+
+ }
+
+ virtual bool process(const btBroadphaseProxy* proxy)
+ {
+ ///terminate further convex sweep tests, once the closestHitFraction reached zero
+ if (m_resultCallback.m_closestHitFraction == btScalar(0.f))
+ return false;
+
+ btCollisionObject* collisionObject = (btCollisionObject*)proxy->m_clientObject;
+
+ //only perform raycast if filterMask matches
+ if(m_resultCallback.needsCollision(collisionObject->getBroadphaseHandle())) {
+ //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject();
+ m_world->objectQuerySingle(m_castShape, m_convexFromTrans,m_convexToTrans,
+ collisionObject,
+ collisionObject->getCollisionShape(),
+ collisionObject->getWorldTransform(),
+ m_resultCallback,
+ m_allowedCcdPenetration);
+ }
+
+ return true;
+ }
+};
+
+
+
+void btCollisionWorld::convexSweepTest(const btConvexShape* castShape, const btTransform& convexFromWorld, const btTransform& convexToWorld, ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration) const
+{
+
+ BT_PROFILE("convexSweepTest");
+ /// use the broadphase to accelerate the search for objects, based on their aabb
+ /// and for each object with ray-aabb overlap, perform an exact ray test
+ /// unfortunately the implementation for rayTest and convexSweepTest duplicated, albeit practically identical
+
+
+
+ btTransform convexFromTrans,convexToTrans;
+ convexFromTrans = convexFromWorld;
+ convexToTrans = convexToWorld;
+ btVector3 castShapeAabbMin, castShapeAabbMax;
+ /* Compute AABB that encompasses angular movement */
+ {
+ btVector3 linVel, angVel;
+ btTransformUtil::calculateVelocity (convexFromTrans, convexToTrans, 1.0, linVel, angVel);
+ btVector3 zeroLinVel;
+ zeroLinVel.setValue(0,0,0);
+ btTransform R;
+ R.setIdentity ();
+ R.setRotation (convexFromTrans.getRotation());
+ castShape->calculateTemporalAabb (R, zeroLinVel, angVel, 1.0, castShapeAabbMin, castShapeAabbMax);
+ }
+
+#ifndef USE_BRUTEFORCE_RAYBROADPHASE
+
+ btSingleSweepCallback convexCB(castShape,convexFromWorld,convexToWorld,this,resultCallback,allowedCcdPenetration);
+
+ m_broadphasePairCache->rayTest(convexFromTrans.getOrigin(),convexToTrans.getOrigin(),convexCB,castShapeAabbMin,castShapeAabbMax);
+
+#else
+ /// go over all objects, and if the ray intersects their aabb + cast shape aabb,
+ // do a ray-shape query using convexCaster (CCD)
+ int i;
+ for (i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* collisionObject= m_collisionObjects[i];
+ //only perform raycast if filterMask matches
+ if(resultCallback.needsCollision(collisionObject->getBroadphaseHandle())) {
+ //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject();
+ btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+ collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax);
+ AabbExpand (collisionObjectAabbMin, collisionObjectAabbMax, castShapeAabbMin, castShapeAabbMax);
+ btScalar hitLambda = btScalar(1.); //could use resultCallback.m_closestHitFraction, but needs testing
+ btVector3 hitNormal;
+ if (btRayAabb(convexFromWorld.getOrigin(),convexToWorld.getOrigin(),collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal))
+ {
+ objectQuerySingle(castShape, convexFromTrans,convexToTrans,
+ collisionObject,
+ collisionObject->getCollisionShape(),
+ collisionObject->getWorldTransform(),
+ resultCallback,
+ allowedCcdPenetration);
+ }
+ }
+ }
+#endif //USE_BRUTEFORCE_RAYBROADPHASE
+}
+
+
+
+struct btBridgedManifoldResult : public btManifoldResult
+{
+
+ btCollisionWorld::ContactResultCallback& m_resultCallback;
+
+ btBridgedManifoldResult( btCollisionObject* obj0,btCollisionObject* obj1,btCollisionWorld::ContactResultCallback& resultCallback )
+ :btManifoldResult(obj0,obj1),
+ m_resultCallback(resultCallback)
+ {
+ }
+
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+ {
+ bool isSwapped = m_manifoldPtr->getBody0() != m_body0;
+ btVector3 pointA = pointInWorld + normalOnBInWorld * depth;
+ btVector3 localA;
+ btVector3 localB;
+ if (isSwapped)
+ {
+ localA = m_rootTransB.invXform(pointA );
+ localB = m_rootTransA.invXform(pointInWorld);
+ } else
+ {
+ localA = m_rootTransA.invXform(pointA );
+ localB = m_rootTransB.invXform(pointInWorld);
+ }
+
+ btManifoldPoint newPt(localA,localB,normalOnBInWorld,depth);
+ newPt.m_positionWorldOnA = pointA;
+ newPt.m_positionWorldOnB = pointInWorld;
+
+ //BP mod, store contact triangles.
+ if (isSwapped)
+ {
+ newPt.m_partId0 = m_partId1;
+ newPt.m_partId1 = m_partId0;
+ newPt.m_index0 = m_index1;
+ newPt.m_index1 = m_index0;
+ } else
+ {
+ newPt.m_partId0 = m_partId0;
+ newPt.m_partId1 = m_partId1;
+ newPt.m_index0 = m_index0;
+ newPt.m_index1 = m_index1;
+ }
+
+ //experimental feature info, for per-triangle material etc.
+ btCollisionObject* obj0 = isSwapped? m_body1 : m_body0;
+ btCollisionObject* obj1 = isSwapped? m_body0 : m_body1;
+ m_resultCallback.addSingleResult(newPt,obj0,newPt.m_partId0,newPt.m_index0,obj1,newPt.m_partId1,newPt.m_index1);
+
+ }
+
+};
+
+
+
+struct btSingleContactCallback : public btBroadphaseAabbCallback
+{
+
+ btCollisionObject* m_collisionObject;
+ btCollisionWorld* m_world;
+ btCollisionWorld::ContactResultCallback& m_resultCallback;
+
+
+ btSingleContactCallback(btCollisionObject* collisionObject, btCollisionWorld* world,btCollisionWorld::ContactResultCallback& resultCallback)
+ :m_collisionObject(collisionObject),
+ m_world(world),
+ m_resultCallback(resultCallback)
+ {
+ }
+
+ virtual bool process(const btBroadphaseProxy* proxy)
+ {
+ btCollisionObject* collisionObject = (btCollisionObject*)proxy->m_clientObject;
+ if (collisionObject == m_collisionObject)
+ return true;
+
+ //only perform raycast if filterMask matches
+ if(m_resultCallback.needsCollision(collisionObject->getBroadphaseHandle()))
+ {
+ btCollisionAlgorithm* algorithm = m_world->getDispatcher()->findAlgorithm(m_collisionObject,collisionObject);
+ if (algorithm)
+ {
+ btBridgedManifoldResult contactPointResult(m_collisionObject,collisionObject, m_resultCallback);
+ //discrete collision detection query
+ algorithm->processCollision(m_collisionObject,collisionObject, m_world->getDispatchInfo(),&contactPointResult);
+
+ algorithm->~btCollisionAlgorithm();
+ m_world->getDispatcher()->freeCollisionAlgorithm(algorithm);
+ }
+ }
+ return true;
+ }
+};
+
+
+///contactTest performs a discrete collision test against all objects in the btCollisionWorld, and calls the resultCallback.
+///it reports one or more contact points for every overlapping object (including the one with deepest penetration)
+void btCollisionWorld::contactTest( btCollisionObject* colObj, ContactResultCallback& resultCallback)
+{
+ btVector3 aabbMin,aabbMax;
+ colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(),aabbMin,aabbMax);
+ btSingleContactCallback contactCB(colObj,this,resultCallback);
+
+ m_broadphasePairCache->aabbTest(aabbMin,aabbMax,contactCB);
+}
+
+
+///contactTest performs a discrete collision test between two collision objects and calls the resultCallback if overlap if detected.
+///it reports one or more contact points (including the one with deepest penetration)
+void btCollisionWorld::contactPairTest(btCollisionObject* colObjA, btCollisionObject* colObjB, ContactResultCallback& resultCallback)
+{
+ btCollisionAlgorithm* algorithm = getDispatcher()->findAlgorithm(colObjA,colObjB);
+ if (algorithm)
+ {
+ btBridgedManifoldResult contactPointResult(colObjA,colObjB, resultCallback);
+ //discrete collision detection query
+ algorithm->processCollision(colObjA,colObjB, getDispatchInfo(),&contactPointResult);
+
+ algorithm->~btCollisionAlgorithm();
+ getDispatcher()->freeCollisionAlgorithm(algorithm);
+ }
+
+}
+
+
+
+
+class DebugDrawcallback : public btTriangleCallback, public btInternalTriangleIndexCallback
+{
+ btIDebugDraw* m_debugDrawer;
+ btVector3 m_color;
+ btTransform m_worldTrans;
+
+public:
+
+ DebugDrawcallback(btIDebugDraw* debugDrawer,const btTransform& worldTrans,const btVector3& color) :
+ m_debugDrawer(debugDrawer),
+ m_color(color),
+ m_worldTrans(worldTrans)
+ {
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex)
+ {
+ processTriangle(triangle,partId,triangleIndex);
+ }
+
+ virtual void processTriangle(btVector3* triangle,int partId, int triangleIndex)
+ {
+ (void)partId;
+ (void)triangleIndex;
+
+ btVector3 wv0,wv1,wv2;
+ wv0 = m_worldTrans*triangle[0];
+ wv1 = m_worldTrans*triangle[1];
+ wv2 = m_worldTrans*triangle[2];
+ btVector3 center = (wv0+wv1+wv2)*btScalar(1./3.);
+
+ btVector3 normal = (wv1-wv0).cross(wv2-wv0);
+ normal.normalize();
+ btVector3 normalColor(1,1,0);
+ m_debugDrawer->drawLine(center,center+normal,normalColor);
+
+
+
+
+ m_debugDrawer->drawLine(wv0,wv1,m_color);
+ m_debugDrawer->drawLine(wv1,wv2,m_color);
+ m_debugDrawer->drawLine(wv2,wv0,m_color);
+ }
+};
+
+
+void btCollisionWorld::debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color)
+{
+ // Draw a small simplex at the center of the object
+ getDebugDrawer()->drawTransform(worldTransform,1);
+
+ if (shape->getShapeType() == COMPOUND_SHAPE_PROXYTYPE)
+ {
+ const btCompoundShape* compoundShape = static_cast<const btCompoundShape*>(shape);
+ for (int i=compoundShape->getNumChildShapes()-1;i>=0;i--)
+ {
+ btTransform childTrans = compoundShape->getChildTransform(i);
+ const btCollisionShape* colShape = compoundShape->getChildShape(i);
+ debugDrawObject(worldTransform*childTrans,colShape,color);
+ }
+
+ } else
+ {
+ switch (shape->getShapeType())
+ {
+
+ case BOX_SHAPE_PROXYTYPE:
+ {
+ const btBoxShape* boxShape = static_cast<const btBoxShape*>(shape);
+ btVector3 halfExtents = boxShape->getHalfExtentsWithMargin();
+ getDebugDrawer()->drawBox(-halfExtents,halfExtents,worldTransform,color);
+ break;
+ }
+
+ case SPHERE_SHAPE_PROXYTYPE:
+ {
+ const btSphereShape* sphereShape = static_cast<const btSphereShape*>(shape);
+ btScalar radius = sphereShape->getMargin();//radius doesn't include the margin, so draw with margin
+
+ getDebugDrawer()->drawSphere(radius, worldTransform, color);
+ break;
+ }
+ case MULTI_SPHERE_SHAPE_PROXYTYPE:
+ {
+ const btMultiSphereShape* multiSphereShape = static_cast<const btMultiSphereShape*>(shape);
+
+ btTransform childTransform;
+ childTransform.setIdentity();
+
+ for (int i = multiSphereShape->getSphereCount()-1; i>=0;i--)
+ {
+ childTransform.setOrigin(multiSphereShape->getSpherePosition(i));
+ getDebugDrawer()->drawSphere(multiSphereShape->getSphereRadius(i), worldTransform*childTransform, color);
+ }
+
+ break;
+ }
+ case CAPSULE_SHAPE_PROXYTYPE:
+ {
+ const btCapsuleShape* capsuleShape = static_cast<const btCapsuleShape*>(shape);
+
+ btScalar radius = capsuleShape->getRadius();
+ btScalar halfHeight = capsuleShape->getHalfHeight();
+
+ int upAxis = capsuleShape->getUpAxis();
+ getDebugDrawer()->drawCapsule(radius, halfHeight, upAxis, worldTransform, color);
+ break;
+ }
+ case CONE_SHAPE_PROXYTYPE:
+ {
+ const btConeShape* coneShape = static_cast<const btConeShape*>(shape);
+ btScalar radius = coneShape->getRadius();//+coneShape->getMargin();
+ btScalar height = coneShape->getHeight();//+coneShape->getMargin();
+
+ int upAxis= coneShape->getConeUpIndex();
+ getDebugDrawer()->drawCone(radius, height, upAxis, worldTransform, color);
+ break;
+
+ }
+ case CYLINDER_SHAPE_PROXYTYPE:
+ {
+ const btCylinderShape* cylinder = static_cast<const btCylinderShape*>(shape);
+ int upAxis = cylinder->getUpAxis();
+ btScalar radius = cylinder->getRadius();
+ btScalar halfHeight = cylinder->getHalfExtentsWithMargin()[upAxis];
+ getDebugDrawer()->drawCylinder(radius, halfHeight, upAxis, worldTransform, color);
+ break;
+ }
+
+ case STATIC_PLANE_PROXYTYPE:
+ {
+ const btStaticPlaneShape* staticPlaneShape = static_cast<const btStaticPlaneShape*>(shape);
+ btScalar planeConst = staticPlaneShape->getPlaneConstant();
+ const btVector3& planeNormal = staticPlaneShape->getPlaneNormal();
+ getDebugDrawer()->drawPlane(planeNormal, planeConst,worldTransform, color);
+ break;
+
+ }
+ default:
+ {
+
+ if (shape->isConcave())
+ {
+ btConcaveShape* concaveMesh = (btConcaveShape*) shape;
+
+ ///@todo pass camera, for some culling? no -> we are not a graphics lib
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ btVector3 aabbMin(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+
+ DebugDrawcallback drawCallback(getDebugDrawer(),worldTransform,color);
+ concaveMesh->processAllTriangles(&drawCallback,aabbMin,aabbMax);
+
+ }
+
+ if (shape->getShapeType() == CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE)
+ {
+ btConvexTriangleMeshShape* convexMesh = (btConvexTriangleMeshShape*) shape;
+ //todo: pass camera for some culling
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ btVector3 aabbMin(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ //DebugDrawcallback drawCallback;
+ DebugDrawcallback drawCallback(getDebugDrawer(),worldTransform,color);
+ convexMesh->getMeshInterface()->InternalProcessAllTriangles(&drawCallback,aabbMin,aabbMax);
+ }
+
+
+ /// for polyhedral shapes
+ if (shape->isPolyhedral())
+ {
+ btPolyhedralConvexShape* polyshape = (btPolyhedralConvexShape*) shape;
+
+ int i;
+ if (polyshape->getConvexPolyhedron())
+ {
+ const btConvexPolyhedron* poly = polyshape->getConvexPolyhedron();
+ for (i=0;i<poly->m_faces.size();i++)
+ {
+ btVector3 centroid(0,0,0);
+ int numVerts = poly->m_faces[i].m_indices.size();
+ if (numVerts)
+ {
+ int lastV = poly->m_faces[i].m_indices[numVerts-1];
+ for (int v=0;v<poly->m_faces[i].m_indices.size();v++)
+ {
+ int curVert = poly->m_faces[i].m_indices[v];
+ centroid+=poly->m_vertices[curVert];
+ getDebugDrawer()->drawLine(worldTransform*poly->m_vertices[lastV],worldTransform*poly->m_vertices[curVert],color);
+ lastV = curVert;
+ }
+ }
+ centroid*= 1./btScalar(numVerts);
+
+ btVector3 normalColor(1,1,0);
+ btVector3 faceNormal(poly->m_faces[i].m_plane[0],poly->m_faces[i].m_plane[1],poly->m_faces[i].m_plane[2]);
+ getDebugDrawer()->drawLine(worldTransform*centroid,worldTransform*(centroid+faceNormal),normalColor);
+
+
+ }
+
+
+ } else
+ {
+ for (i=0;i<polyshape->getNumEdges();i++)
+ {
+ btVector3 a,b;
+ polyshape->getEdge(i,a,b);
+ btVector3 wa = worldTransform * a;
+ btVector3 wb = worldTransform * b;
+ getDebugDrawer()->drawLine(wa,wb,color);
+ }
+ }
+
+
+ }
+ }
+ }
+ }
+}
+
+
+void btCollisionWorld::debugDrawWorld()
+{
+ if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawContactPoints)
+ {
+ int numManifolds = getDispatcher()->getNumManifolds();
+ btVector3 color(0,0,0);
+ for (int i=0;i<numManifolds;i++)
+ {
+ btPersistentManifold* contactManifold = getDispatcher()->getManifoldByIndexInternal(i);
+ //btCollisionObject* obA = static_cast<btCollisionObject*>(contactManifold->getBody0());
+ //btCollisionObject* obB = static_cast<btCollisionObject*>(contactManifold->getBody1());
+
+ int numContacts = contactManifold->getNumContacts();
+ for (int j=0;j<numContacts;j++)
+ {
+ btManifoldPoint& cp = contactManifold->getContactPoint(j);
+ getDebugDrawer()->drawContactPoint(cp.m_positionWorldOnB,cp.m_normalWorldOnB,cp.getDistance(),cp.getLifeTime(),color);
+ }
+ }
+ }
+
+ if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & (btIDebugDraw::DBG_DrawWireframe | btIDebugDraw::DBG_DrawAabb))
+ {
+ int i;
+
+ for ( i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ if ((colObj->getCollisionFlags() & btCollisionObject::CF_DISABLE_VISUALIZE_OBJECT)==0)
+ {
+ if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawWireframe)
+ {
+ btVector3 color(btScalar(1.),btScalar(1.),btScalar(1.));
+ switch(colObj->getActivationState())
+ {
+ case ACTIVE_TAG:
+ color = btVector3(btScalar(1.),btScalar(1.),btScalar(1.)); break;
+ case ISLAND_SLEEPING:
+ color = btVector3(btScalar(0.),btScalar(1.),btScalar(0.));break;
+ case WANTS_DEACTIVATION:
+ color = btVector3(btScalar(0.),btScalar(1.),btScalar(1.));break;
+ case DISABLE_DEACTIVATION:
+ color = btVector3(btScalar(1.),btScalar(0.),btScalar(0.));break;
+ case DISABLE_SIMULATION:
+ color = btVector3(btScalar(1.),btScalar(1.),btScalar(0.));break;
+ default:
+ {
+ color = btVector3(btScalar(1),btScalar(0.),btScalar(0.));
+ }
+ };
+
+ debugDrawObject(colObj->getWorldTransform(),colObj->getCollisionShape(),color);
+ }
+ if (m_debugDrawer && (m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_DrawAabb))
+ {
+ btVector3 minAabb,maxAabb;
+ btVector3 colorvec(1,0,0);
+ colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb);
+ btVector3 contactThreshold(gContactBreakingThreshold,gContactBreakingThreshold,gContactBreakingThreshold);
+ minAabb -= contactThreshold;
+ maxAabb += contactThreshold;
+
+ btVector3 minAabb2,maxAabb2;
+
+ if(colObj->getInternalType()==btCollisionObject::CO_RIGID_BODY)
+ {
+ colObj->getCollisionShape()->getAabb(colObj->getInterpolationWorldTransform(),minAabb2,maxAabb2);
+ minAabb2 -= contactThreshold;
+ maxAabb2 += contactThreshold;
+ minAabb.setMin(minAabb2);
+ maxAabb.setMax(maxAabb2);
+ }
+
+ m_debugDrawer->drawAabb(minAabb,maxAabb,colorvec);
+ }
+ }
+
+ }
+ }
+}
+
+
+void btCollisionWorld::serializeCollisionObjects(btSerializer* serializer)
+{
+ int i;
+ //serialize all collision objects
+ for (i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ if (colObj->getInternalType() == btCollisionObject::CO_COLLISION_OBJECT)
+ {
+ colObj->serializeSingleObject(serializer);
+ }
+ }
+
+ ///keep track of shapes already serialized
+ btHashMap<btHashPtr,btCollisionShape*> serializedShapes;
+
+ for (i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btCollisionShape* shape = colObj->getCollisionShape();
+
+ if (!serializedShapes.find(shape))
+ {
+ serializedShapes.insert(shape,shape);
+ shape->serializeSingleShape(serializer);
+ }
+ }
+
+}
+
+
+void btCollisionWorld::serialize(btSerializer* serializer)
+{
+
+ serializer->startSerialization();
+
+ serializeCollisionObjects(serializer);
+
+ serializer->finishSerialization();
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
new file mode 100644
index 00000000..0a92d2d6
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCollisionWorld.h
@@ -0,0 +1,509 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://bulletphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+/**
+ * @mainpage Bullet Documentation
+ *
+ * @section intro_sec Introduction
+ * Bullet Collision Detection & Physics SDK
+ *
+ * Bullet is a Collision Detection and Rigid Body Dynamics Library. The Library is Open Source and free for commercial use, under the ZLib license ( http://opensource.org/licenses/zlib-license.php ).
+ *
+ * The main documentation is Bullet_User_Manual.pdf, included in the source code distribution.
+ * There is the Physics Forum for feedback and general Collision Detection and Physics discussions.
+ * Please visit http://www.bulletphysics.com
+ *
+ * @section install_sec Installation
+ *
+ * @subsection step1 Step 1: Download
+ * You can download the Bullet Physics Library from the Google Code repository: http://code.google.com/p/bullet/downloads/list
+ *
+ * @subsection step2 Step 2: Building
+ * Bullet main build system for all platforms is cmake, you can download http://www.cmake.org
+ * cmake can autogenerate projectfiles for Microsoft Visual Studio, Apple Xcode, KDevelop and Unix Makefiles.
+ * The easiest is to run the CMake cmake-gui graphical user interface and choose the options and generate projectfiles.
+ * You can also use cmake in the command-line. Here are some examples for various platforms:
+ * cmake . -G "Visual Studio 9 2008"
+ * cmake . -G Xcode
+ * cmake . -G "Unix Makefiles"
+ * Although cmake is recommended, you can also use autotools for UNIX: ./autogen.sh ./configure to create a Makefile and then run make.
+ *
+ * @subsection step3 Step 3: Testing demos
+ * Try to run and experiment with BasicDemo executable as a starting point.
+ * Bullet can be used in several ways, as Full Rigid Body simulation, as Collision Detector Library or Low Level / Snippets like the GJK Closest Point calculation.
+ * The Dependencies can be seen in this documentation under Directories
+ *
+ * @subsection step4 Step 4: Integrating in your application, full Rigid Body and Soft Body simulation
+ * Check out BasicDemo how to create a btDynamicsWorld, btRigidBody and btCollisionShape, Stepping the simulation and synchronizing your graphics object transform.
+ * Check out SoftDemo how to use soft body dynamics, using btSoftRigidDynamicsWorld.
+ * @subsection step5 Step 5 : Integrate the Collision Detection Library (without Dynamics and other Extras)
+ * Bullet Collision Detection can also be used without the Dynamics/Extras.
+ * Check out btCollisionWorld and btCollisionObject, and the CollisionInterfaceDemo.
+ * @subsection step6 Step 6 : Use Snippets like the GJK Closest Point calculation.
+ * Bullet has been designed in a modular way keeping dependencies to a minimum. The ConvexHullDistance demo demonstrates direct use of btGjkPairDetector.
+ *
+ * @section copyright Copyright
+ * For up-to-data information and copyright and contributors list check out the Bullet_User_Manual.pdf
+ *
+ */
+
+
+
+#ifndef BT_COLLISION_WORLD_H
+#define BT_COLLISION_WORLD_H
+
+class btStackAlloc;
+class btCollisionShape;
+class btConvexShape;
+class btBroadphaseInterface;
+class btSerializer;
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "btCollisionObject.h"
+#include "btCollisionDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+///CollisionWorld is interface and container for the collision detection
+class btCollisionWorld
+{
+
+
+protected:
+
+ btAlignedObjectArray<btCollisionObject*> m_collisionObjects;
+
+ btDispatcher* m_dispatcher1;
+
+ btDispatcherInfo m_dispatchInfo;
+
+ btStackAlloc* m_stackAlloc;
+
+ btBroadphaseInterface* m_broadphasePairCache;
+
+ btIDebugDraw* m_debugDrawer;
+
+ ///m_forceUpdateAllAabbs can be set to false as an optimization to only update active object AABBs
+ ///it is true by default, because it is error-prone (setting the position of static objects wouldn't update their AABB)
+ bool m_forceUpdateAllAabbs;
+
+ void serializeCollisionObjects(btSerializer* serializer);
+
+public:
+
+ //this constructor doesn't own the dispatcher and paircache/broadphase
+ btCollisionWorld(btDispatcher* dispatcher,btBroadphaseInterface* broadphasePairCache, btCollisionConfiguration* collisionConfiguration);
+
+ virtual ~btCollisionWorld();
+
+ void setBroadphase(btBroadphaseInterface* pairCache)
+ {
+ m_broadphasePairCache = pairCache;
+ }
+
+ const btBroadphaseInterface* getBroadphase() const
+ {
+ return m_broadphasePairCache;
+ }
+
+ btBroadphaseInterface* getBroadphase()
+ {
+ return m_broadphasePairCache;
+ }
+
+ btOverlappingPairCache* getPairCache()
+ {
+ return m_broadphasePairCache->getOverlappingPairCache();
+ }
+
+
+ btDispatcher* getDispatcher()
+ {
+ return m_dispatcher1;
+ }
+
+ const btDispatcher* getDispatcher() const
+ {
+ return m_dispatcher1;
+ }
+
+ void updateSingleAabb(btCollisionObject* colObj);
+
+ virtual void updateAabbs();
+
+ virtual void setDebugDrawer(btIDebugDraw* debugDrawer)
+ {
+ m_debugDrawer = debugDrawer;
+ }
+
+ virtual btIDebugDraw* getDebugDrawer()
+ {
+ return m_debugDrawer;
+ }
+
+ virtual void debugDrawWorld();
+
+ virtual void debugDrawObject(const btTransform& worldTransform, const btCollisionShape* shape, const btVector3& color);
+
+
+ ///LocalShapeInfo gives extra information for complex shapes
+ ///Currently, only btTriangleMeshShape is available, so it just contains triangleIndex and subpart
+ struct LocalShapeInfo
+ {
+ int m_shapePart;
+ int m_triangleIndex;
+
+ //const btCollisionShape* m_shapeTemp;
+ //const btTransform* m_shapeLocalTransform;
+ };
+
+ struct LocalRayResult
+ {
+ LocalRayResult(btCollisionObject* collisionObject,
+ LocalShapeInfo* localShapeInfo,
+ const btVector3& hitNormalLocal,
+ btScalar hitFraction)
+ :m_collisionObject(collisionObject),
+ m_localShapeInfo(localShapeInfo),
+ m_hitNormalLocal(hitNormalLocal),
+ m_hitFraction(hitFraction)
+ {
+ }
+
+ btCollisionObject* m_collisionObject;
+ LocalShapeInfo* m_localShapeInfo;
+ btVector3 m_hitNormalLocal;
+ btScalar m_hitFraction;
+
+ };
+
+ ///RayResultCallback is used to report new raycast results
+ struct RayResultCallback
+ {
+ btScalar m_closestHitFraction;
+ btCollisionObject* m_collisionObject;
+ short int m_collisionFilterGroup;
+ short int m_collisionFilterMask;
+ //@BP Mod - Custom flags, currently used to enable backface culling on tri-meshes, see btRaycastCallback
+ unsigned int m_flags;
+
+ virtual ~RayResultCallback()
+ {
+ }
+ bool hasHit() const
+ {
+ return (m_collisionObject != 0);
+ }
+
+ RayResultCallback()
+ :m_closestHitFraction(btScalar(1.)),
+ m_collisionObject(0),
+ m_collisionFilterGroup(btBroadphaseProxy::DefaultFilter),
+ m_collisionFilterMask(btBroadphaseProxy::AllFilter),
+ //@BP Mod
+ m_flags(0)
+ {
+ }
+
+ virtual bool needsCollision(btBroadphaseProxy* proxy0) const
+ {
+ bool collides = (proxy0->m_collisionFilterGroup & m_collisionFilterMask) != 0;
+ collides = collides && (m_collisionFilterGroup & proxy0->m_collisionFilterMask);
+ return collides;
+ }
+
+
+ virtual btScalar addSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace) = 0;
+ };
+
+ struct ClosestRayResultCallback : public RayResultCallback
+ {
+ ClosestRayResultCallback(const btVector3& rayFromWorld,const btVector3& rayToWorld)
+ :m_rayFromWorld(rayFromWorld),
+ m_rayToWorld(rayToWorld)
+ {
+ }
+
+ btVector3 m_rayFromWorld;//used to calculate hitPointWorld from hitFraction
+ btVector3 m_rayToWorld;
+
+ btVector3 m_hitNormalWorld;
+ btVector3 m_hitPointWorld;
+
+ virtual btScalar addSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace)
+ {
+ //caller already does the filter on the m_closestHitFraction
+ btAssert(rayResult.m_hitFraction <= m_closestHitFraction);
+
+ m_closestHitFraction = rayResult.m_hitFraction;
+ m_collisionObject = rayResult.m_collisionObject;
+ if (normalInWorldSpace)
+ {
+ m_hitNormalWorld = rayResult.m_hitNormalLocal;
+ } else
+ {
+ ///need to transform normal into worldspace
+ m_hitNormalWorld = m_collisionObject->getWorldTransform().getBasis()*rayResult.m_hitNormalLocal;
+ }
+ m_hitPointWorld.setInterpolate3(m_rayFromWorld,m_rayToWorld,rayResult.m_hitFraction);
+ return rayResult.m_hitFraction;
+ }
+ };
+
+ struct AllHitsRayResultCallback : public RayResultCallback
+ {
+ AllHitsRayResultCallback(const btVector3& rayFromWorld,const btVector3& rayToWorld)
+ :m_rayFromWorld(rayFromWorld),
+ m_rayToWorld(rayToWorld)
+ {
+ }
+
+ btAlignedObjectArray<btCollisionObject*> m_collisionObjects;
+
+ btVector3 m_rayFromWorld;//used to calculate hitPointWorld from hitFraction
+ btVector3 m_rayToWorld;
+
+ btAlignedObjectArray<btVector3> m_hitNormalWorld;
+ btAlignedObjectArray<btVector3> m_hitPointWorld;
+ btAlignedObjectArray<btScalar> m_hitFractions;
+
+ virtual btScalar addSingleResult(LocalRayResult& rayResult,bool normalInWorldSpace)
+ {
+ m_collisionObject = rayResult.m_collisionObject;
+ m_collisionObjects.push_back(rayResult.m_collisionObject);
+ btVector3 hitNormalWorld;
+ if (normalInWorldSpace)
+ {
+ hitNormalWorld = rayResult.m_hitNormalLocal;
+ } else
+ {
+ ///need to transform normal into worldspace
+ hitNormalWorld = m_collisionObject->getWorldTransform().getBasis()*rayResult.m_hitNormalLocal;
+ }
+ m_hitNormalWorld.push_back(hitNormalWorld);
+ btVector3 hitPointWorld;
+ hitPointWorld.setInterpolate3(m_rayFromWorld,m_rayToWorld,rayResult.m_hitFraction);
+ m_hitPointWorld.push_back(hitPointWorld);
+ m_hitFractions.push_back(rayResult.m_hitFraction);
+ return m_closestHitFraction;
+ }
+ };
+
+
+ struct LocalConvexResult
+ {
+ LocalConvexResult(btCollisionObject* hitCollisionObject,
+ LocalShapeInfo* localShapeInfo,
+ const btVector3& hitNormalLocal,
+ const btVector3& hitPointLocal,
+ btScalar hitFraction
+ )
+ :m_hitCollisionObject(hitCollisionObject),
+ m_localShapeInfo(localShapeInfo),
+ m_hitNormalLocal(hitNormalLocal),
+ m_hitPointLocal(hitPointLocal),
+ m_hitFraction(hitFraction)
+ {
+ }
+
+ btCollisionObject* m_hitCollisionObject;
+ LocalShapeInfo* m_localShapeInfo;
+ btVector3 m_hitNormalLocal;
+ btVector3 m_hitPointLocal;
+ btScalar m_hitFraction;
+ };
+
+ ///RayResultCallback is used to report new raycast results
+ struct ConvexResultCallback
+ {
+ btScalar m_closestHitFraction;
+ short int m_collisionFilterGroup;
+ short int m_collisionFilterMask;
+
+ ConvexResultCallback()
+ :m_closestHitFraction(btScalar(1.)),
+ m_collisionFilterGroup(btBroadphaseProxy::DefaultFilter),
+ m_collisionFilterMask(btBroadphaseProxy::AllFilter)
+ {
+ }
+
+ virtual ~ConvexResultCallback()
+ {
+ }
+
+ bool hasHit() const
+ {
+ return (m_closestHitFraction < btScalar(1.));
+ }
+
+
+
+ virtual bool needsCollision(btBroadphaseProxy* proxy0) const
+ {
+ bool collides = (proxy0->m_collisionFilterGroup & m_collisionFilterMask) != 0;
+ collides = collides && (m_collisionFilterGroup & proxy0->m_collisionFilterMask);
+ return collides;
+ }
+
+ virtual btScalar addSingleResult(LocalConvexResult& convexResult,bool normalInWorldSpace) = 0;
+ };
+
+ struct ClosestConvexResultCallback : public ConvexResultCallback
+ {
+ ClosestConvexResultCallback(const btVector3& convexFromWorld,const btVector3& convexToWorld)
+ :m_convexFromWorld(convexFromWorld),
+ m_convexToWorld(convexToWorld),
+ m_hitCollisionObject(0)
+ {
+ }
+
+ btVector3 m_convexFromWorld;//used to calculate hitPointWorld from hitFraction
+ btVector3 m_convexToWorld;
+
+ btVector3 m_hitNormalWorld;
+ btVector3 m_hitPointWorld;
+ btCollisionObject* m_hitCollisionObject;
+
+ virtual btScalar addSingleResult(LocalConvexResult& convexResult,bool normalInWorldSpace)
+ {
+//caller already does the filter on the m_closestHitFraction
+ btAssert(convexResult.m_hitFraction <= m_closestHitFraction);
+
+ m_closestHitFraction = convexResult.m_hitFraction;
+ m_hitCollisionObject = convexResult.m_hitCollisionObject;
+ if (normalInWorldSpace)
+ {
+ m_hitNormalWorld = convexResult.m_hitNormalLocal;
+ } else
+ {
+ ///need to transform normal into worldspace
+ m_hitNormalWorld = m_hitCollisionObject->getWorldTransform().getBasis()*convexResult.m_hitNormalLocal;
+ }
+ m_hitPointWorld = convexResult.m_hitPointLocal;
+ return convexResult.m_hitFraction;
+ }
+ };
+
+ ///ContactResultCallback is used to report contact points
+ struct ContactResultCallback
+ {
+ short int m_collisionFilterGroup;
+ short int m_collisionFilterMask;
+
+ ContactResultCallback()
+ :m_collisionFilterGroup(btBroadphaseProxy::DefaultFilter),
+ m_collisionFilterMask(btBroadphaseProxy::AllFilter)
+ {
+ }
+
+ virtual ~ContactResultCallback()
+ {
+ }
+
+ virtual bool needsCollision(btBroadphaseProxy* proxy0) const
+ {
+ bool collides = (proxy0->m_collisionFilterGroup & m_collisionFilterMask) != 0;
+ collides = collides && (m_collisionFilterGroup & proxy0->m_collisionFilterMask);
+ return collides;
+ }
+
+ virtual btScalar addSingleResult(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1) = 0;
+ };
+
+
+
+ int getNumCollisionObjects() const
+ {
+ return int(m_collisionObjects.size());
+ }
+
+ /// rayTest performs a raycast on all objects in the btCollisionWorld, and calls the resultCallback
+ /// This allows for several queries: first hit, all hits, any hit, dependent on the value returned by the callback.
+ virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;
+
+ /// convexTest performs a swept convex cast on all objects in the btCollisionWorld, and calls the resultCallback
+ /// This allows for several queries: first hit, all hits, any hit, dependent on the value return by the callback.
+ void convexSweepTest (const btConvexShape* castShape, const btTransform& from, const btTransform& to, ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration = btScalar(0.)) const;
+
+ ///contactTest performs a discrete collision test between colObj against all objects in the btCollisionWorld, and calls the resultCallback.
+ ///it reports one or more contact points for every overlapping object (including the one with deepest penetration)
+ void contactTest(btCollisionObject* colObj, ContactResultCallback& resultCallback);
+
+ ///contactTest performs a discrete collision test between two collision objects and calls the resultCallback if overlap if detected.
+ ///it reports one or more contact points (including the one with deepest penetration)
+ void contactPairTest(btCollisionObject* colObjA, btCollisionObject* colObjB, ContactResultCallback& resultCallback);
+
+
+ /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest.
+ /// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape.
+ /// This allows more customization.
+ static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
+ btCollisionObject* collisionObject,
+ const btCollisionShape* collisionShape,
+ const btTransform& colObjWorldTransform,
+ RayResultCallback& resultCallback);
+
+ /// objectQuerySingle performs a collision detection query and calls the resultCallback. It is used internally by rayTest.
+ static void objectQuerySingle(const btConvexShape* castShape, const btTransform& rayFromTrans,const btTransform& rayToTrans,
+ btCollisionObject* collisionObject,
+ const btCollisionShape* collisionShape,
+ const btTransform& colObjWorldTransform,
+ ConvexResultCallback& resultCallback, btScalar allowedPenetration);
+
+ virtual void addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter,short int collisionFilterMask=btBroadphaseProxy::AllFilter);
+
+ btCollisionObjectArray& getCollisionObjectArray()
+ {
+ return m_collisionObjects;
+ }
+
+ const btCollisionObjectArray& getCollisionObjectArray() const
+ {
+ return m_collisionObjects;
+ }
+
+
+ virtual void removeCollisionObject(btCollisionObject* collisionObject);
+
+ virtual void performDiscreteCollisionDetection();
+
+ btDispatcherInfo& getDispatchInfo()
+ {
+ return m_dispatchInfo;
+ }
+
+ const btDispatcherInfo& getDispatchInfo() const
+ {
+ return m_dispatchInfo;
+ }
+
+ bool getForceUpdateAllAabbs() const
+ {
+ return m_forceUpdateAllAabbs;
+ }
+ void setForceUpdateAllAabbs( bool forceUpdateAllAabbs)
+ {
+ m_forceUpdateAllAabbs = forceUpdateAllAabbs;
+ }
+
+ ///Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (Bullet/Demos/SerializeDemo)
+ virtual void serialize(btSerializer* serializer);
+
+};
+
+
+#endif //BT_COLLISION_WORLD_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
new file mode 100644
index 00000000..54889a63
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
@@ -0,0 +1,353 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include "BulletCollision/BroadphaseCollision/btDbvt.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "LinearMath/btAabbUtil2.h"
+#include "btManifoldResult.h"
+
+btCompoundCollisionAlgorithm::btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped)
+:btActivatingCollisionAlgorithm(ci,body0,body1),
+m_isSwapped(isSwapped),
+m_sharedManifold(ci.m_manifold)
+{
+ m_ownsManifold = false;
+
+ btCollisionObject* colObj = m_isSwapped? body1 : body0;
+ btAssert (colObj->getCollisionShape()->isCompound());
+
+ btCompoundShape* compoundShape = static_cast<btCompoundShape*>(colObj->getCollisionShape());
+ m_compoundShapeRevision = compoundShape->getUpdateRevision();
+
+ preallocateChildAlgorithms(body0,body1);
+}
+
+void btCompoundCollisionAlgorithm::preallocateChildAlgorithms(btCollisionObject* body0,btCollisionObject* body1)
+{
+ btCollisionObject* colObj = m_isSwapped? body1 : body0;
+ btCollisionObject* otherObj = m_isSwapped? body0 : body1;
+ btAssert (colObj->getCollisionShape()->isCompound());
+
+ btCompoundShape* compoundShape = static_cast<btCompoundShape*>(colObj->getCollisionShape());
+
+ int numChildren = compoundShape->getNumChildShapes();
+ int i;
+
+ m_childCollisionAlgorithms.resize(numChildren);
+ for (i=0;i<numChildren;i++)
+ {
+ if (compoundShape->getDynamicAabbTree())
+ {
+ m_childCollisionAlgorithms[i] = 0;
+ } else
+ {
+ btCollisionShape* tmpShape = colObj->getCollisionShape();
+ btCollisionShape* childShape = compoundShape->getChildShape(i);
+ colObj->internalSetTemporaryCollisionShape( childShape );
+ m_childCollisionAlgorithms[i] = m_dispatcher->findAlgorithm(colObj,otherObj,m_sharedManifold);
+ colObj->internalSetTemporaryCollisionShape( tmpShape );
+ }
+ }
+}
+
+void btCompoundCollisionAlgorithm::removeChildAlgorithms()
+{
+ int numChildren = m_childCollisionAlgorithms.size();
+ int i;
+ for (i=0;i<numChildren;i++)
+ {
+ if (m_childCollisionAlgorithms[i])
+ {
+ m_childCollisionAlgorithms[i]->~btCollisionAlgorithm();
+ m_dispatcher->freeCollisionAlgorithm(m_childCollisionAlgorithms[i]);
+ }
+ }
+}
+
+btCompoundCollisionAlgorithm::~btCompoundCollisionAlgorithm()
+{
+ removeChildAlgorithms();
+}
+
+
+
+
+struct btCompoundLeafCallback : btDbvt::ICollide
+{
+
+public:
+
+ btCollisionObject* m_compoundColObj;
+ btCollisionObject* m_otherObj;
+ btDispatcher* m_dispatcher;
+ const btDispatcherInfo& m_dispatchInfo;
+ btManifoldResult* m_resultOut;
+ btCollisionAlgorithm** m_childCollisionAlgorithms;
+ btPersistentManifold* m_sharedManifold;
+
+
+
+
+ btCompoundLeafCallback (btCollisionObject* compoundObj,btCollisionObject* otherObj,btDispatcher* dispatcher,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut,btCollisionAlgorithm** childCollisionAlgorithms,btPersistentManifold* sharedManifold)
+ :m_compoundColObj(compoundObj),m_otherObj(otherObj),m_dispatcher(dispatcher),m_dispatchInfo(dispatchInfo),m_resultOut(resultOut),
+ m_childCollisionAlgorithms(childCollisionAlgorithms),
+ m_sharedManifold(sharedManifold)
+ {
+
+ }
+
+
+ void ProcessChildShape(btCollisionShape* childShape,int index)
+ {
+ btAssert(index>=0);
+ btCompoundShape* compoundShape = static_cast<btCompoundShape*>(m_compoundColObj->getCollisionShape());
+ btAssert(index<compoundShape->getNumChildShapes());
+
+
+ //backup
+ btTransform orgTrans = m_compoundColObj->getWorldTransform();
+ btTransform orgInterpolationTrans = m_compoundColObj->getInterpolationWorldTransform();
+ const btTransform& childTrans = compoundShape->getChildTransform(index);
+ btTransform newChildWorldTrans = orgTrans*childTrans ;
+
+ //perform an AABB check first
+ btVector3 aabbMin0,aabbMax0,aabbMin1,aabbMax1;
+ childShape->getAabb(newChildWorldTrans,aabbMin0,aabbMax0);
+ m_otherObj->getCollisionShape()->getAabb(m_otherObj->getWorldTransform(),aabbMin1,aabbMax1);
+
+ if (TestAabbAgainstAabb2(aabbMin0,aabbMax0,aabbMin1,aabbMax1))
+ {
+
+ m_compoundColObj->setWorldTransform( newChildWorldTrans);
+ m_compoundColObj->setInterpolationWorldTransform(newChildWorldTrans);
+
+ //the contactpoint is still projected back using the original inverted worldtrans
+ btCollisionShape* tmpShape = m_compoundColObj->getCollisionShape();
+ m_compoundColObj->internalSetTemporaryCollisionShape( childShape );
+
+ if (!m_childCollisionAlgorithms[index])
+ m_childCollisionAlgorithms[index] = m_dispatcher->findAlgorithm(m_compoundColObj,m_otherObj,m_sharedManifold);
+
+ ///detect swapping case
+ if (m_resultOut->getBody0Internal() == m_compoundColObj)
+ {
+ m_resultOut->setShapeIdentifiersA(-1,index);
+ } else
+ {
+ m_resultOut->setShapeIdentifiersB(-1,index);
+ }
+
+ m_childCollisionAlgorithms[index]->processCollision(m_compoundColObj,m_otherObj,m_dispatchInfo,m_resultOut);
+ if (m_dispatchInfo.m_debugDraw && (m_dispatchInfo.m_debugDraw->getDebugMode() & btIDebugDraw::DBG_DrawAabb))
+ {
+ btVector3 worldAabbMin,worldAabbMax;
+ m_dispatchInfo.m_debugDraw->drawAabb(aabbMin0,aabbMax0,btVector3(1,1,1));
+ m_dispatchInfo.m_debugDraw->drawAabb(aabbMin1,aabbMax1,btVector3(1,1,1));
+ }
+
+ //revert back transform
+ m_compoundColObj->internalSetTemporaryCollisionShape( tmpShape);
+ m_compoundColObj->setWorldTransform( orgTrans );
+ m_compoundColObj->setInterpolationWorldTransform(orgInterpolationTrans);
+ }
+ }
+ void Process(const btDbvtNode* leaf)
+ {
+ int index = leaf->dataAsInt;
+
+ btCompoundShape* compoundShape = static_cast<btCompoundShape*>(m_compoundColObj->getCollisionShape());
+ btCollisionShape* childShape = compoundShape->getChildShape(index);
+ if (m_dispatchInfo.m_debugDraw && (m_dispatchInfo.m_debugDraw->getDebugMode() & btIDebugDraw::DBG_DrawAabb))
+ {
+ btVector3 worldAabbMin,worldAabbMax;
+ btTransform orgTrans = m_compoundColObj->getWorldTransform();
+ btTransformAabb(leaf->volume.Mins(),leaf->volume.Maxs(),0.,orgTrans,worldAabbMin,worldAabbMax);
+ m_dispatchInfo.m_debugDraw->drawAabb(worldAabbMin,worldAabbMax,btVector3(1,0,0));
+ }
+ ProcessChildShape(childShape,index);
+
+ }
+};
+
+
+
+
+
+
+void btCompoundCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ btCollisionObject* colObj = m_isSwapped? body1 : body0;
+ btCollisionObject* otherObj = m_isSwapped? body0 : body1;
+
+
+
+ btAssert (colObj->getCollisionShape()->isCompound());
+ btCompoundShape* compoundShape = static_cast<btCompoundShape*>(colObj->getCollisionShape());
+
+ ///btCompoundShape might have changed:
+ ////make sure the internal child collision algorithm caches are still valid
+ if (compoundShape->getUpdateRevision() != m_compoundShapeRevision)
+ {
+ ///clear and update all
+ removeChildAlgorithms();
+
+ preallocateChildAlgorithms(body0,body1);
+ }
+
+
+ btDbvt* tree = compoundShape->getDynamicAabbTree();
+ //use a dynamic aabb tree to cull potential child-overlaps
+ btCompoundLeafCallback callback(colObj,otherObj,m_dispatcher,dispatchInfo,resultOut,&m_childCollisionAlgorithms[0],m_sharedManifold);
+
+ ///we need to refresh all contact manifolds
+ ///note that we should actually recursively traverse all children, btCompoundShape can nested more then 1 level deep
+ ///so we should add a 'refreshManifolds' in the btCollisionAlgorithm
+ {
+ int i;
+ btManifoldArray manifoldArray;
+ for (i=0;i<m_childCollisionAlgorithms.size();i++)
+ {
+ if (m_childCollisionAlgorithms[i])
+ {
+ m_childCollisionAlgorithms[i]->getAllContactManifolds(manifoldArray);
+ for (int m=0;m<manifoldArray.size();m++)
+ {
+ if (manifoldArray[m]->getNumContacts())
+ {
+ resultOut->setPersistentManifold(manifoldArray[m]);
+ resultOut->refreshContactPoints();
+ resultOut->setPersistentManifold(0);//??necessary?
+ }
+ }
+ manifoldArray.resize(0);
+ }
+ }
+ }
+
+ if (tree)
+ {
+
+ btVector3 localAabbMin,localAabbMax;
+ btTransform otherInCompoundSpace;
+ otherInCompoundSpace = colObj->getWorldTransform().inverse() * otherObj->getWorldTransform();
+ otherObj->getCollisionShape()->getAabb(otherInCompoundSpace,localAabbMin,localAabbMax);
+
+ const ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
+ //process all children, that overlap with the given AABB bounds
+ tree->collideTV(tree->m_root,bounds,callback);
+
+ } else
+ {
+ //iterate over all children, perform an AABB check inside ProcessChildShape
+ int numChildren = m_childCollisionAlgorithms.size();
+ int i;
+ for (i=0;i<numChildren;i++)
+ {
+ callback.ProcessChildShape(compoundShape->getChildShape(i),i);
+ }
+ }
+
+ {
+ //iterate over all children, perform an AABB check inside ProcessChildShape
+ int numChildren = m_childCollisionAlgorithms.size();
+ int i;
+ btManifoldArray manifoldArray;
+ btCollisionShape* childShape = 0;
+ btTransform orgTrans;
+ btTransform orgInterpolationTrans;
+ btTransform newChildWorldTrans;
+ btVector3 aabbMin0,aabbMax0,aabbMin1,aabbMax1;
+
+ for (i=0;i<numChildren;i++)
+ {
+ if (m_childCollisionAlgorithms[i])
+ {
+ childShape = compoundShape->getChildShape(i);
+ //if not longer overlapping, remove the algorithm
+ orgTrans = colObj->getWorldTransform();
+ orgInterpolationTrans = colObj->getInterpolationWorldTransform();
+ const btTransform& childTrans = compoundShape->getChildTransform(i);
+ newChildWorldTrans = orgTrans*childTrans ;
+
+ //perform an AABB check first
+ childShape->getAabb(newChildWorldTrans,aabbMin0,aabbMax0);
+ otherObj->getCollisionShape()->getAabb(otherObj->getWorldTransform(),aabbMin1,aabbMax1);
+
+ if (!TestAabbAgainstAabb2(aabbMin0,aabbMax0,aabbMin1,aabbMax1))
+ {
+ m_childCollisionAlgorithms[i]->~btCollisionAlgorithm();
+ m_dispatcher->freeCollisionAlgorithm(m_childCollisionAlgorithms[i]);
+ m_childCollisionAlgorithms[i] = 0;
+ }
+ }
+ }
+ }
+}
+
+btScalar btCompoundCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+
+ btCollisionObject* colObj = m_isSwapped? body1 : body0;
+ btCollisionObject* otherObj = m_isSwapped? body0 : body1;
+
+ btAssert (colObj->getCollisionShape()->isCompound());
+
+ btCompoundShape* compoundShape = static_cast<btCompoundShape*>(colObj->getCollisionShape());
+
+ //We will use the OptimizedBVH, AABB tree to cull potential child-overlaps
+ //If both proxies are Compound, we will deal with that directly, by performing sequential/parallel tree traversals
+ //given Proxy0 and Proxy1, if both have a tree, Tree0 and Tree1, this means:
+ //determine overlapping nodes of Proxy1 using Proxy0 AABB against Tree1
+ //then use each overlapping node AABB against Tree0
+ //and vise versa.
+
+ btScalar hitFraction = btScalar(1.);
+
+ int numChildren = m_childCollisionAlgorithms.size();
+ int i;
+ btTransform orgTrans;
+ btScalar frac;
+ for (i=0;i<numChildren;i++)
+ {
+ //temporarily exchange parent btCollisionShape with childShape, and recurse
+ btCollisionShape* childShape = compoundShape->getChildShape(i);
+
+ //backup
+ orgTrans = colObj->getWorldTransform();
+
+ const btTransform& childTrans = compoundShape->getChildTransform(i);
+ //btTransform newChildWorldTrans = orgTrans*childTrans ;
+ colObj->setWorldTransform( orgTrans*childTrans );
+
+ btCollisionShape* tmpShape = colObj->getCollisionShape();
+ colObj->internalSetTemporaryCollisionShape( childShape );
+ frac = m_childCollisionAlgorithms[i]->calculateTimeOfImpact(colObj,otherObj,dispatchInfo,resultOut);
+ if (frac<hitFraction)
+ {
+ hitFraction = frac;
+ }
+ //revert back
+ colObj->internalSetTemporaryCollisionShape( tmpShape);
+ colObj->setWorldTransform( orgTrans);
+ }
+ return hitFraction;
+
+}
+
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
new file mode 100644
index 00000000..40457498
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h
@@ -0,0 +1,86 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COMPOUND_COLLISION_ALGORITHM_H
+#define BT_COMPOUND_COLLISION_ALGORITHM_H
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+class btDispatcher;
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "btCollisionCreateFunc.h"
+#include "LinearMath/btAlignedObjectArray.h"
+class btDispatcher;
+class btCollisionObject;
+
+/// btCompoundCollisionAlgorithm supports collision between CompoundCollisionShapes and other collision shapes
+class btCompoundCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+ btAlignedObjectArray<btCollisionAlgorithm*> m_childCollisionAlgorithms;
+ bool m_isSwapped;
+
+ class btPersistentManifold* m_sharedManifold;
+ bool m_ownsManifold;
+
+ int m_compoundShapeRevision;//to keep track of changes, so that childAlgorithm array can be updated
+
+ void removeChildAlgorithms();
+
+ void preallocateChildAlgorithms(btCollisionObject* body0,btCollisionObject* body1);
+
+public:
+
+ btCompoundCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped);
+
+ virtual ~btCompoundCollisionAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ int i;
+ for (i=0;i<m_childCollisionAlgorithms.size();i++)
+ {
+ if (m_childCollisionAlgorithms[i])
+ m_childCollisionAlgorithms[i]->getAllContactManifolds(manifoldArray);
+ }
+ }
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCollisionAlgorithm));
+ return new(mem) btCompoundCollisionAlgorithm(ci,body0,body1,false);
+ }
+ };
+
+ struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btCompoundCollisionAlgorithm));
+ return new(mem) btCompoundCollisionAlgorithm(ci,body0,body1,true);
+ }
+ };
+
+};
+
+#endif //BT_COMPOUND_COLLISION_ALGORITHM_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
new file mode 100644
index 00000000..db7f884a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
@@ -0,0 +1,247 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvex2dConvex2dAlgorithm.h"
+
+//#include <stdio.h>
+#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+
+
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h"
+
+
+
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
+
+
+btConvex2dConvex2dAlgorithm::CreateFunc::CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver)
+{
+ m_numPerturbationIterations = 0;
+ m_minimumPointsPerturbationThreshold = 3;
+ m_simplexSolver = simplexSolver;
+ m_pdSolver = pdSolver;
+}
+
+btConvex2dConvex2dAlgorithm::CreateFunc::~CreateFunc()
+{
+}
+
+btConvex2dConvex2dAlgorithm::btConvex2dConvex2dAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver,int numPerturbationIterations, int minimumPointsPerturbationThreshold)
+: btActivatingCollisionAlgorithm(ci,body0,body1),
+m_simplexSolver(simplexSolver),
+m_pdSolver(pdSolver),
+m_ownManifold (false),
+m_manifoldPtr(mf),
+m_lowLevelOfDetail(false),
+ m_numPerturbationIterations(numPerturbationIterations),
+m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold)
+{
+ (void)body0;
+ (void)body1;
+}
+
+
+
+
+btConvex2dConvex2dAlgorithm::~btConvex2dConvex2dAlgorithm()
+{
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+}
+
+void btConvex2dConvex2dAlgorithm ::setLowLevelOfDetail(bool useLowLevel)
+{
+ m_lowLevelOfDetail = useLowLevel;
+}
+
+
+
+extern btScalar gContactBreakingThreshold;
+
+
+//
+// Convex-Convex collision algorithm
+//
+void btConvex2dConvex2dAlgorithm ::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+
+ if (!m_manifoldPtr)
+ {
+ //swapped?
+ m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1);
+ m_ownManifold = true;
+ }
+ resultOut->setPersistentManifold(m_manifoldPtr);
+
+ //comment-out next line to test multi-contact generation
+ //resultOut->getPersistentManifold()->clearManifold();
+
+
+ btConvexShape* min0 = static_cast<btConvexShape*>(body0->getCollisionShape());
+ btConvexShape* min1 = static_cast<btConvexShape*>(body1->getCollisionShape());
+
+ btVector3 normalOnB;
+ btVector3 pointOnBWorld;
+
+ {
+
+
+ btGjkPairDetector::ClosestPointInput input;
+
+ btGjkPairDetector gjkPairDetector(min0,min1,m_simplexSolver,m_pdSolver);
+ //TODO: if (dispatchInfo.m_useContinuous)
+ gjkPairDetector.setMinkowskiA(min0);
+ gjkPairDetector.setMinkowskiB(min1);
+
+ {
+ input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold();
+ input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
+ }
+
+ input.m_stackAlloc = dispatchInfo.m_stackAllocator;
+ input.m_transformA = body0->getWorldTransform();
+ input.m_transformB = body1->getWorldTransform();
+
+ gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);
+
+ btVector3 v0,v1;
+ btVector3 sepNormalWorldSpace;
+
+ }
+
+ if (m_ownManifold)
+ {
+ resultOut->refreshContactPoints();
+ }
+
+}
+
+
+
+
+btScalar btConvex2dConvex2dAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ ///Rather then checking ALL pairs, only calculate TOI when motion exceeds threshold
+
+ ///Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold
+ ///col0->m_worldTransform,
+ btScalar resultFraction = btScalar(1.);
+
+
+ btScalar squareMot0 = (col0->getInterpolationWorldTransform().getOrigin() - col0->getWorldTransform().getOrigin()).length2();
+ btScalar squareMot1 = (col1->getInterpolationWorldTransform().getOrigin() - col1->getWorldTransform().getOrigin()).length2();
+
+ if (squareMot0 < col0->getCcdSquareMotionThreshold() &&
+ squareMot1 < col1->getCcdSquareMotionThreshold())
+ return resultFraction;
+
+
+ //An adhoc way of testing the Continuous Collision Detection algorithms
+ //One object is approximated as a sphere, to simplify things
+ //Starting in penetration should report no time of impact
+ //For proper CCD, better accuracy and handling of 'allowed' penetration should be added
+ //also the mainloop of the physics should have a kind of toi queue (something like Brian Mirtich's application of Timewarp for Rigidbodies)
+
+
+ /// Convex0 against sphere for Convex1
+ {
+ btConvexShape* convex0 = static_cast<btConvexShape*>(col0->getCollisionShape());
+
+ btSphereShape sphere1(col1->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation
+ btConvexCast::CastResult result;
+ btVoronoiSimplexSolver voronoiSimplex;
+ //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex);
+ ///Simplification, one object is simplified as a sphere
+ btGjkConvexCast ccd1( convex0 ,&sphere1,&voronoiSimplex);
+ //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0);
+ if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(),
+ col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result))
+ {
+
+ //store result.m_fraction in both bodies
+
+ if (col0->getHitFraction()> result.m_fraction)
+ col0->setHitFraction( result.m_fraction );
+
+ if (col1->getHitFraction() > result.m_fraction)
+ col1->setHitFraction( result.m_fraction);
+
+ if (resultFraction > result.m_fraction)
+ resultFraction = result.m_fraction;
+
+ }
+
+
+
+
+ }
+
+ /// Sphere (for convex0) against Convex1
+ {
+ btConvexShape* convex1 = static_cast<btConvexShape*>(col1->getCollisionShape());
+
+ btSphereShape sphere0(col0->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation
+ btConvexCast::CastResult result;
+ btVoronoiSimplexSolver voronoiSimplex;
+ //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex);
+ ///Simplification, one object is simplified as a sphere
+ btGjkConvexCast ccd1(&sphere0,convex1,&voronoiSimplex);
+ //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0);
+ if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(),
+ col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result))
+ {
+
+ //store result.m_fraction in both bodies
+
+ if (col0->getHitFraction() > result.m_fraction)
+ col0->setHitFraction( result.m_fraction);
+
+ if (col1->getHitFraction() > result.m_fraction)
+ col1->setHitFraction( result.m_fraction);
+
+ if (resultFraction > result.m_fraction)
+ resultFraction = result.m_fraction;
+
+ }
+ }
+
+ return resultFraction;
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h
new file mode 100644
index 00000000..53d13b87
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h
@@ -0,0 +1,95 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
+#define BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
+
+#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "LinearMath/btTransformUtil.h" //for btConvexSeparatingDistanceUtil
+
+class btConvexPenetrationDepthSolver;
+
+
+///The convex2dConvex2dAlgorithm collision algorithm support 2d collision detection for btConvex2dShape
+///Currently it requires the btMinkowskiPenetrationDepthSolver, it has support for 2d penetration depth computation
+class btConvex2dConvex2dAlgorithm : public btActivatingCollisionAlgorithm
+{
+ btSimplexSolverInterface* m_simplexSolver;
+ btConvexPenetrationDepthSolver* m_pdSolver;
+
+
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+ bool m_lowLevelOfDetail;
+
+ int m_numPerturbationIterations;
+ int m_minimumPointsPerturbationThreshold;
+
+public:
+
+ btConvex2dConvex2dAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold);
+
+
+ virtual ~btConvex2dConvex2dAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ ///should we use m_ownManifold to avoid adding duplicates?
+ if (m_manifoldPtr && m_ownManifold)
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+
+
+ void setLowLevelOfDetail(bool useLowLevel);
+
+
+ const btPersistentManifold* getManifold()
+ {
+ return m_manifoldPtr;
+ }
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+
+ btConvexPenetrationDepthSolver* m_pdSolver;
+ btSimplexSolverInterface* m_simplexSolver;
+ int m_numPerturbationIterations;
+ int m_minimumPointsPerturbationThreshold;
+
+ CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver);
+
+ virtual ~CreateFunc();
+
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvex2dConvex2dAlgorithm));
+ return new(mem) btConvex2dConvex2dAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold);
+ }
+ };
+
+
+};
+
+#endif //BT_CONVEX_2D_CONVEX_2D_ALGORITHM_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
new file mode 100644
index 00000000..d2b2c221
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
@@ -0,0 +1,312 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btConvexConcaveCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionShapes/btConcaveShape.h"
+#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
+#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+
+btConvexConcaveCollisionAlgorithm::btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1,bool isSwapped)
+: btActivatingCollisionAlgorithm(ci,body0,body1),
+m_isSwapped(isSwapped),
+m_btConvexTriangleCallback(ci.m_dispatcher1,body0,body1,isSwapped)
+{
+}
+
+btConvexConcaveCollisionAlgorithm::~btConvexConcaveCollisionAlgorithm()
+{
+}
+
+void btConvexConcaveCollisionAlgorithm::getAllContactManifolds(btManifoldArray& manifoldArray)
+{
+ if (m_btConvexTriangleCallback.m_manifoldPtr)
+ {
+ manifoldArray.push_back(m_btConvexTriangleCallback.m_manifoldPtr);
+ }
+}
+
+
+btConvexTriangleCallback::btConvexTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped):
+ m_dispatcher(dispatcher),
+ m_dispatchInfoPtr(0)
+{
+ m_convexBody = isSwapped? body1:body0;
+ m_triBody = isSwapped? body0:body1;
+
+ //
+ // create the manifold from the dispatcher 'manifold pool'
+ //
+ m_manifoldPtr = m_dispatcher->getNewManifold(m_convexBody,m_triBody);
+
+ clearCache();
+}
+
+btConvexTriangleCallback::~btConvexTriangleCallback()
+{
+ clearCache();
+ m_dispatcher->releaseManifold( m_manifoldPtr );
+
+}
+
+
+void btConvexTriangleCallback::clearCache()
+{
+ m_dispatcher->clearManifold(m_manifoldPtr);
+}
+
+
+
+void btConvexTriangleCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex)
+{
+
+ //just for debugging purposes
+ //printf("triangle %d",m_triangleCount++);
+
+
+ //aabb filter is already applied!
+
+ btCollisionAlgorithmConstructionInfo ci;
+ ci.m_dispatcher1 = m_dispatcher;
+
+ btCollisionObject* ob = static_cast<btCollisionObject*>(m_triBody);
+
+
+#if 0
+ ///debug drawing of the overlapping triangles
+ if (m_dispatchInfoPtr && m_dispatchInfoPtr->m_debugDraw && (m_dispatchInfoPtr->m_debugDraw->getDebugMode() &btIDebugDraw::DBG_DrawWireframe ))
+ {
+ btVector3 color(1,1,0);
+ btTransform& tr = ob->getWorldTransform();
+ m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(triangle[1]),color);
+ m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]),tr(triangle[2]),color);
+ m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]),tr(triangle[0]),color);
+ }
+#endif
+
+ if (m_convexBody->getCollisionShape()->isConvex())
+ {
+ btTriangleShape tm(triangle[0],triangle[1],triangle[2]);
+ tm.setMargin(m_collisionMarginTriangle);
+
+ btCollisionShape* tmpShape = ob->getCollisionShape();
+ ob->internalSetTemporaryCollisionShape( &tm );
+
+ btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_convexBody,m_triBody,m_manifoldPtr);
+
+ if (m_resultOut->getBody0Internal() == m_triBody)
+ {
+ m_resultOut->setShapeIdentifiersA(partId,triangleIndex);
+ }
+ else
+ {
+ m_resultOut->setShapeIdentifiersB(partId,triangleIndex);
+ }
+
+ colAlgo->processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut);
+ colAlgo->~btCollisionAlgorithm();
+ ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo);
+ ob->internalSetTemporaryCollisionShape( tmpShape);
+ }
+
+
+}
+
+
+
+void btConvexTriangleCallback::setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ m_dispatchInfoPtr = &dispatchInfo;
+ m_collisionMarginTriangle = collisionMarginTriangle;
+ m_resultOut = resultOut;
+
+ //recalc aabbs
+ btTransform convexInTriangleSpace;
+ convexInTriangleSpace = m_triBody->getWorldTransform().inverse() * m_convexBody->getWorldTransform();
+ btCollisionShape* convexShape = static_cast<btCollisionShape*>(m_convexBody->getCollisionShape());
+ //CollisionShape* triangleShape = static_cast<btCollisionShape*>(triBody->m_collisionShape);
+ convexShape->getAabb(convexInTriangleSpace,m_aabbMin,m_aabbMax);
+ btScalar extraMargin = collisionMarginTriangle;
+ btVector3 extra(extraMargin,extraMargin,extraMargin);
+
+ m_aabbMax += extra;
+ m_aabbMin -= extra;
+
+}
+
+void btConvexConcaveCollisionAlgorithm::clearCache()
+{
+ m_btConvexTriangleCallback.clearCache();
+
+}
+
+void btConvexConcaveCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+
+
+ btCollisionObject* convexBody = m_isSwapped ? body1 : body0;
+ btCollisionObject* triBody = m_isSwapped ? body0 : body1;
+
+ if (triBody->getCollisionShape()->isConcave())
+ {
+
+
+ btCollisionObject* triOb = triBody;
+ btConcaveShape* concaveShape = static_cast<btConcaveShape*>( triOb->getCollisionShape());
+
+ if (convexBody->getCollisionShape()->isConvex())
+ {
+ btScalar collisionMarginTriangle = concaveShape->getMargin();
+
+ resultOut->setPersistentManifold(m_btConvexTriangleCallback.m_manifoldPtr);
+ m_btConvexTriangleCallback.setTimeStepAndCounters(collisionMarginTriangle,dispatchInfo,resultOut);
+
+ //Disable persistency. previously, some older algorithm calculated all contacts in one go, so you can clear it here.
+ //m_dispatcher->clearManifold(m_btConvexTriangleCallback.m_manifoldPtr);
+
+ m_btConvexTriangleCallback.m_manifoldPtr->setBodies(convexBody,triBody);
+
+ concaveShape->processAllTriangles( &m_btConvexTriangleCallback,m_btConvexTriangleCallback.getAabbMin(),m_btConvexTriangleCallback.getAabbMax());
+
+ resultOut->refreshContactPoints();
+
+ }
+
+ }
+
+}
+
+
+btScalar btConvexConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ btCollisionObject* convexbody = m_isSwapped ? body1 : body0;
+ btCollisionObject* triBody = m_isSwapped ? body0 : body1;
+
+
+ //quick approximation using raycast, todo: hook up to the continuous collision detection (one of the btConvexCast)
+
+ //only perform CCD above a certain threshold, this prevents blocking on the long run
+ //because object in a blocked ccd state (hitfraction<1) get their linear velocity halved each frame...
+ btScalar squareMot0 = (convexbody->getInterpolationWorldTransform().getOrigin() - convexbody->getWorldTransform().getOrigin()).length2();
+ if (squareMot0 < convexbody->getCcdSquareMotionThreshold())
+ {
+ return btScalar(1.);
+ }
+
+ //const btVector3& from = convexbody->m_worldTransform.getOrigin();
+ //btVector3 to = convexbody->m_interpolationWorldTransform.getOrigin();
+ //todo: only do if the motion exceeds the 'radius'
+
+ btTransform triInv = triBody->getWorldTransform().inverse();
+ btTransform convexFromLocal = triInv * convexbody->getWorldTransform();
+ btTransform convexToLocal = triInv * convexbody->getInterpolationWorldTransform();
+
+ struct LocalTriangleSphereCastCallback : public btTriangleCallback
+ {
+ btTransform m_ccdSphereFromTrans;
+ btTransform m_ccdSphereToTrans;
+ btTransform m_meshTransform;
+
+ btScalar m_ccdSphereRadius;
+ btScalar m_hitFraction;
+
+
+ LocalTriangleSphereCastCallback(const btTransform& from,const btTransform& to,btScalar ccdSphereRadius,btScalar hitFraction)
+ :m_ccdSphereFromTrans(from),
+ m_ccdSphereToTrans(to),
+ m_ccdSphereRadius(ccdSphereRadius),
+ m_hitFraction(hitFraction)
+ {
+ }
+
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex)
+ {
+ (void)partId;
+ (void)triangleIndex;
+ //do a swept sphere for now
+ btTransform ident;
+ ident.setIdentity();
+ btConvexCast::CastResult castResult;
+ castResult.m_fraction = m_hitFraction;
+ btSphereShape pointShape(m_ccdSphereRadius);
+ btTriangleShape triShape(triangle[0],triangle[1],triangle[2]);
+ btVoronoiSimplexSolver simplexSolver;
+ btSubsimplexConvexCast convexCaster(&pointShape,&triShape,&simplexSolver);
+ //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
+ //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0);
+ //local space?
+
+ if (convexCaster.calcTimeOfImpact(m_ccdSphereFromTrans,m_ccdSphereToTrans,
+ ident,ident,castResult))
+ {
+ if (m_hitFraction > castResult.m_fraction)
+ m_hitFraction = castResult.m_fraction;
+ }
+
+ }
+
+ };
+
+
+
+
+
+ if (triBody->getCollisionShape()->isConcave())
+ {
+ btVector3 rayAabbMin = convexFromLocal.getOrigin();
+ rayAabbMin.setMin(convexToLocal.getOrigin());
+ btVector3 rayAabbMax = convexFromLocal.getOrigin();
+ rayAabbMax.setMax(convexToLocal.getOrigin());
+ btScalar ccdRadius0 = convexbody->getCcdSweptSphereRadius();
+ rayAabbMin -= btVector3(ccdRadius0,ccdRadius0,ccdRadius0);
+ rayAabbMax += btVector3(ccdRadius0,ccdRadius0,ccdRadius0);
+
+ btScalar curHitFraction = btScalar(1.); //is this available?
+ LocalTriangleSphereCastCallback raycastCallback(convexFromLocal,convexToLocal,
+ convexbody->getCcdSweptSphereRadius(),curHitFraction);
+
+ raycastCallback.m_hitFraction = convexbody->getHitFraction();
+
+ btCollisionObject* concavebody = triBody;
+
+ btConcaveShape* triangleMesh = (btConcaveShape*) concavebody->getCollisionShape();
+
+ if (triangleMesh)
+ {
+ triangleMesh->processAllTriangles(&raycastCallback,rayAabbMin,rayAabbMax);
+ }
+
+
+
+ if (raycastCallback.m_hitFraction < convexbody->getHitFraction())
+ {
+ convexbody->setHitFraction( raycastCallback.m_hitFraction);
+ return raycastCallback.m_hitFraction;
+ }
+ }
+
+ return btScalar(1.);
+
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
new file mode 100644
index 00000000..f718d1de
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h
@@ -0,0 +1,116 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
+#define BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/CollisionShapes/btTriangleCallback.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+class btDispatcher;
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "btCollisionCreateFunc.h"
+
+///For each triangle in the concave mesh that overlaps with the AABB of a convex (m_convexProxy), processTriangle is called.
+class btConvexTriangleCallback : public btTriangleCallback
+{
+ btCollisionObject* m_convexBody;
+ btCollisionObject* m_triBody;
+
+ btVector3 m_aabbMin;
+ btVector3 m_aabbMax ;
+
+
+ btManifoldResult* m_resultOut;
+ btDispatcher* m_dispatcher;
+ const btDispatcherInfo* m_dispatchInfoPtr;
+ btScalar m_collisionMarginTriangle;
+
+public:
+int m_triangleCount;
+
+ btPersistentManifold* m_manifoldPtr;
+
+ btConvexTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped);
+
+ void setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual ~btConvexTriangleCallback();
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex);
+
+ void clearCache();
+
+ SIMD_FORCE_INLINE const btVector3& getAabbMin() const
+ {
+ return m_aabbMin;
+ }
+ SIMD_FORCE_INLINE const btVector3& getAabbMax() const
+ {
+ return m_aabbMax;
+ }
+
+};
+
+
+
+
+/// btConvexConcaveCollisionAlgorithm supports collision between convex shapes and (concave) trianges meshes.
+class btConvexConcaveCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+
+ bool m_isSwapped;
+
+ btConvexTriangleCallback m_btConvexTriangleCallback;
+
+
+
+public:
+
+ btConvexConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped);
+
+ virtual ~btConvexConcaveCollisionAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray);
+
+ void clearCache();
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConcaveCollisionAlgorithm));
+ return new(mem) btConvexConcaveCollisionAlgorithm(ci,body0,body1,false);
+ }
+ };
+
+ struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConcaveCollisionAlgorithm));
+ return new(mem) btConvexConcaveCollisionAlgorithm(ci,body0,body1,true);
+ }
+ };
+
+};
+
+#endif //BT_CONVEX_CONCAVE_COLLISION_ALGORITHM_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
new file mode 100644
index 00000000..79353a47
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
@@ -0,0 +1,679 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///Specialized capsule-capsule collision algorithm has been added for Bullet 2.75 release to increase ragdoll performance
+///If you experience problems with capsule-capsule collision, try to define BT_DISABLE_CAPSULE_CAPSULE_COLLIDER and report it in the Bullet forums
+///with reproduction case
+//define BT_DISABLE_CAPSULE_CAPSULE_COLLIDER 1
+
+#include "btConvexConvexAlgorithm.h"
+
+//#include <stdio.h>
+#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+
+
+
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h"
+
+
+
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h"
+
+
+///////////
+
+
+
+static SIMD_FORCE_INLINE void segmentsClosestPoints(
+ btVector3& ptsVector,
+ btVector3& offsetA,
+ btVector3& offsetB,
+ btScalar& tA, btScalar& tB,
+ const btVector3& translation,
+ const btVector3& dirA, btScalar hlenA,
+ const btVector3& dirB, btScalar hlenB )
+{
+ // compute the parameters of the closest points on each line segment
+
+ btScalar dirA_dot_dirB = btDot(dirA,dirB);
+ btScalar dirA_dot_trans = btDot(dirA,translation);
+ btScalar dirB_dot_trans = btDot(dirB,translation);
+
+ btScalar denom = 1.0f - dirA_dot_dirB * dirA_dot_dirB;
+
+ if ( denom == 0.0f ) {
+ tA = 0.0f;
+ } else {
+ tA = ( dirA_dot_trans - dirB_dot_trans * dirA_dot_dirB ) / denom;
+ if ( tA < -hlenA )
+ tA = -hlenA;
+ else if ( tA > hlenA )
+ tA = hlenA;
+ }
+
+ tB = tA * dirA_dot_dirB - dirB_dot_trans;
+
+ if ( tB < -hlenB ) {
+ tB = -hlenB;
+ tA = tB * dirA_dot_dirB + dirA_dot_trans;
+
+ if ( tA < -hlenA )
+ tA = -hlenA;
+ else if ( tA > hlenA )
+ tA = hlenA;
+ } else if ( tB > hlenB ) {
+ tB = hlenB;
+ tA = tB * dirA_dot_dirB + dirA_dot_trans;
+
+ if ( tA < -hlenA )
+ tA = -hlenA;
+ else if ( tA > hlenA )
+ tA = hlenA;
+ }
+
+ // compute the closest points relative to segment centers.
+
+ offsetA = dirA * tA;
+ offsetB = dirB * tB;
+
+ ptsVector = translation - offsetA + offsetB;
+}
+
+
+static SIMD_FORCE_INLINE btScalar capsuleCapsuleDistance(
+ btVector3& normalOnB,
+ btVector3& pointOnB,
+ btScalar capsuleLengthA,
+ btScalar capsuleRadiusA,
+ btScalar capsuleLengthB,
+ btScalar capsuleRadiusB,
+ int capsuleAxisA,
+ int capsuleAxisB,
+ const btTransform& transformA,
+ const btTransform& transformB,
+ btScalar distanceThreshold )
+{
+ btVector3 directionA = transformA.getBasis().getColumn(capsuleAxisA);
+ btVector3 translationA = transformA.getOrigin();
+ btVector3 directionB = transformB.getBasis().getColumn(capsuleAxisB);
+ btVector3 translationB = transformB.getOrigin();
+
+ // translation between centers
+
+ btVector3 translation = translationB - translationA;
+
+ // compute the closest points of the capsule line segments
+
+ btVector3 ptsVector; // the vector between the closest points
+
+ btVector3 offsetA, offsetB; // offsets from segment centers to their closest points
+ btScalar tA, tB; // parameters on line segment
+
+ segmentsClosestPoints( ptsVector, offsetA, offsetB, tA, tB, translation,
+ directionA, capsuleLengthA, directionB, capsuleLengthB );
+
+ btScalar distance = ptsVector.length() - capsuleRadiusA - capsuleRadiusB;
+
+ if ( distance > distanceThreshold )
+ return distance;
+
+ btScalar lenSqr = ptsVector.length2();
+ if (lenSqr<= (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ //degenerate case where 2 capsules are likely at the same location: take a vector tangential to 'directionA'
+ btVector3 q;
+ btPlaneSpace1(directionA,normalOnB,q);
+ } else
+ {
+ // compute the contact normal
+ normalOnB = ptsVector*-btRecipSqrt(lenSqr);
+ }
+ pointOnB = transformB.getOrigin()+offsetB + normalOnB * capsuleRadiusB;
+
+ return distance;
+}
+
+
+
+
+
+
+
+//////////
+
+
+
+
+
+btConvexConvexAlgorithm::CreateFunc::CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver)
+{
+ m_numPerturbationIterations = 0;
+ m_minimumPointsPerturbationThreshold = 3;
+ m_simplexSolver = simplexSolver;
+ m_pdSolver = pdSolver;
+}
+
+btConvexConvexAlgorithm::CreateFunc::~CreateFunc()
+{
+}
+
+btConvexConvexAlgorithm::btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver,int numPerturbationIterations, int minimumPointsPerturbationThreshold)
+: btActivatingCollisionAlgorithm(ci,body0,body1),
+m_simplexSolver(simplexSolver),
+m_pdSolver(pdSolver),
+m_ownManifold (false),
+m_manifoldPtr(mf),
+m_lowLevelOfDetail(false),
+#ifdef USE_SEPDISTANCE_UTIL2
+m_sepDistance((static_cast<btConvexShape*>(body0->getCollisionShape()))->getAngularMotionDisc(),
+ (static_cast<btConvexShape*>(body1->getCollisionShape()))->getAngularMotionDisc()),
+#endif
+m_numPerturbationIterations(numPerturbationIterations),
+m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold)
+{
+ (void)body0;
+ (void)body1;
+}
+
+
+
+
+btConvexConvexAlgorithm::~btConvexConvexAlgorithm()
+{
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+}
+
+void btConvexConvexAlgorithm ::setLowLevelOfDetail(bool useLowLevel)
+{
+ m_lowLevelOfDetail = useLowLevel;
+}
+
+
+struct btPerturbedContactResult : public btManifoldResult
+{
+ btManifoldResult* m_originalManifoldResult;
+ btTransform m_transformA;
+ btTransform m_transformB;
+ btTransform m_unPerturbedTransform;
+ bool m_perturbA;
+ btIDebugDraw* m_debugDrawer;
+
+
+ btPerturbedContactResult(btManifoldResult* originalResult,const btTransform& transformA,const btTransform& transformB,const btTransform& unPerturbedTransform,bool perturbA,btIDebugDraw* debugDrawer)
+ :m_originalManifoldResult(originalResult),
+ m_transformA(transformA),
+ m_transformB(transformB),
+ m_unPerturbedTransform(unPerturbedTransform),
+ m_perturbA(perturbA),
+ m_debugDrawer(debugDrawer)
+ {
+ }
+ virtual ~ btPerturbedContactResult()
+ {
+ }
+
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar orgDepth)
+ {
+ btVector3 endPt,startPt;
+ btScalar newDepth;
+ btVector3 newNormal;
+
+ if (m_perturbA)
+ {
+ btVector3 endPtOrg = pointInWorld + normalOnBInWorld*orgDepth;
+ endPt = (m_unPerturbedTransform*m_transformA.inverse())(endPtOrg);
+ newDepth = (endPt - pointInWorld).dot(normalOnBInWorld);
+ startPt = endPt+normalOnBInWorld*newDepth;
+ } else
+ {
+ endPt = pointInWorld + normalOnBInWorld*orgDepth;
+ startPt = (m_unPerturbedTransform*m_transformB.inverse())(pointInWorld);
+ newDepth = (endPt - startPt).dot(normalOnBInWorld);
+
+ }
+
+//#define DEBUG_CONTACTS 1
+#ifdef DEBUG_CONTACTS
+ m_debugDrawer->drawLine(startPt,endPt,btVector3(1,0,0));
+ m_debugDrawer->drawSphere(startPt,0.05,btVector3(0,1,0));
+ m_debugDrawer->drawSphere(endPt,0.05,btVector3(0,0,1));
+#endif //DEBUG_CONTACTS
+
+
+ m_originalManifoldResult->addContactPoint(normalOnBInWorld,startPt,newDepth);
+ }
+
+};
+
+extern btScalar gContactBreakingThreshold;
+
+
+//
+// Convex-Convex collision algorithm
+//
+void btConvexConvexAlgorithm ::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+
+ if (!m_manifoldPtr)
+ {
+ //swapped?
+ m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1);
+ m_ownManifold = true;
+ }
+ resultOut->setPersistentManifold(m_manifoldPtr);
+
+ //comment-out next line to test multi-contact generation
+ //resultOut->getPersistentManifold()->clearManifold();
+
+
+ btConvexShape* min0 = static_cast<btConvexShape*>(body0->getCollisionShape());
+ btConvexShape* min1 = static_cast<btConvexShape*>(body1->getCollisionShape());
+
+ btVector3 normalOnB;
+ btVector3 pointOnBWorld;
+#ifndef BT_DISABLE_CAPSULE_CAPSULE_COLLIDER
+ if ((min0->getShapeType() == CAPSULE_SHAPE_PROXYTYPE) && (min1->getShapeType() == CAPSULE_SHAPE_PROXYTYPE))
+ {
+ btCapsuleShape* capsuleA = (btCapsuleShape*) min0;
+ btCapsuleShape* capsuleB = (btCapsuleShape*) min1;
+ btVector3 localScalingA = capsuleA->getLocalScaling();
+ btVector3 localScalingB = capsuleB->getLocalScaling();
+
+ btScalar threshold = m_manifoldPtr->getContactBreakingThreshold();
+
+ btScalar dist = capsuleCapsuleDistance(normalOnB, pointOnBWorld,capsuleA->getHalfHeight(),capsuleA->getRadius(),
+ capsuleB->getHalfHeight(),capsuleB->getRadius(),capsuleA->getUpAxis(),capsuleB->getUpAxis(),
+ body0->getWorldTransform(),body1->getWorldTransform(),threshold);
+
+ if (dist<threshold)
+ {
+ btAssert(normalOnB.length2()>=(SIMD_EPSILON*SIMD_EPSILON));
+ resultOut->addContactPoint(normalOnB,pointOnBWorld,dist);
+ }
+ resultOut->refreshContactPoints();
+ return;
+ }
+#endif //BT_DISABLE_CAPSULE_CAPSULE_COLLIDER
+
+
+
+
+#ifdef USE_SEPDISTANCE_UTIL2
+ if (dispatchInfo.m_useConvexConservativeDistanceUtil)
+ {
+ m_sepDistance.updateSeparatingDistance(body0->getWorldTransform(),body1->getWorldTransform());
+ }
+
+ if (!dispatchInfo.m_useConvexConservativeDistanceUtil || m_sepDistance.getConservativeSeparatingDistance()<=0.f)
+#endif //USE_SEPDISTANCE_UTIL2
+
+ {
+
+
+ btGjkPairDetector::ClosestPointInput input;
+
+ btGjkPairDetector gjkPairDetector(min0,min1,m_simplexSolver,m_pdSolver);
+ //TODO: if (dispatchInfo.m_useContinuous)
+ gjkPairDetector.setMinkowskiA(min0);
+ gjkPairDetector.setMinkowskiB(min1);
+
+#ifdef USE_SEPDISTANCE_UTIL2
+ if (dispatchInfo.m_useConvexConservativeDistanceUtil)
+ {
+ input.m_maximumDistanceSquared = BT_LARGE_FLOAT;
+ } else
+#endif //USE_SEPDISTANCE_UTIL2
+ {
+ //if (dispatchInfo.m_convexMaxDistanceUseCPT)
+ //{
+ // input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactProcessingThreshold();
+ //} else
+ //{
+ input.m_maximumDistanceSquared = min0->getMargin() + min1->getMargin() + m_manifoldPtr->getContactBreakingThreshold();
+// }
+
+ input.m_maximumDistanceSquared*= input.m_maximumDistanceSquared;
+ }
+
+ input.m_stackAlloc = dispatchInfo.m_stackAllocator;
+ input.m_transformA = body0->getWorldTransform();
+ input.m_transformB = body1->getWorldTransform();
+
+
+
+
+
+#ifdef USE_SEPDISTANCE_UTIL2
+ btScalar sepDist = 0.f;
+ if (dispatchInfo.m_useConvexConservativeDistanceUtil)
+ {
+ sepDist = gjkPairDetector.getCachedSeparatingDistance();
+ if (sepDist>SIMD_EPSILON)
+ {
+ sepDist += dispatchInfo.m_convexConservativeDistanceThreshold;
+ //now perturbe directions to get multiple contact points
+
+ }
+ }
+#endif //USE_SEPDISTANCE_UTIL2
+
+ if (min0->isPolyhedral() && min1->isPolyhedral())
+ {
+
+
+ struct btDummyResult : public btDiscreteCollisionDetectorInterface::Result
+ {
+ virtual void setShapeIdentifiersA(int partId0,int index0){}
+ virtual void setShapeIdentifiersB(int partId1,int index1){}
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+ {
+ }
+ };
+
+ btDummyResult dummy;
+
+
+ btPolyhedralConvexShape* polyhedronA = (btPolyhedralConvexShape*) min0;
+ btPolyhedralConvexShape* polyhedronB = (btPolyhedralConvexShape*) min1;
+ if (polyhedronA->getConvexPolyhedron() && polyhedronB->getConvexPolyhedron())
+ {
+
+
+ gjkPairDetector.getClosestPoints(input,dummy,dispatchInfo.m_debugDraw);
+
+
+ btScalar threshold = m_manifoldPtr->getContactBreakingThreshold();
+
+ btScalar minDist = 0.f;
+ btVector3 sepNormalWorldSpace;
+ bool foundSepAxis = true;
+
+ if (dispatchInfo.m_enableSatConvex)
+ {
+ foundSepAxis = btPolyhedralContactClipping::findSeparatingAxis(
+ *polyhedronA->getConvexPolyhedron(), *polyhedronB->getConvexPolyhedron(),
+ body0->getWorldTransform(),
+ body1->getWorldTransform(),
+ sepNormalWorldSpace);
+ } else
+ {
+ sepNormalWorldSpace = gjkPairDetector.getCachedSeparatingAxis().normalized();
+ minDist = gjkPairDetector.getCachedSeparatingDistance();
+ }
+ if (foundSepAxis)
+ {
+// printf("sepNormalWorldSpace=%f,%f,%f\n",sepNormalWorldSpace.getX(),sepNormalWorldSpace.getY(),sepNormalWorldSpace.getZ());
+
+ btPolyhedralContactClipping::clipHullAgainstHull(sepNormalWorldSpace, *polyhedronA->getConvexPolyhedron(), *polyhedronB->getConvexPolyhedron(),
+ body0->getWorldTransform(),
+ body1->getWorldTransform(), minDist-threshold, threshold, *resultOut);
+
+ }
+ if (m_ownManifold)
+ {
+ resultOut->refreshContactPoints();
+ }
+ return;
+
+ } else
+ {
+ //we can also deal with convex versus triangle (without connectivity data)
+ if (polyhedronA->getConvexPolyhedron() && polyhedronB->getShapeType()==TRIANGLE_SHAPE_PROXYTYPE)
+ {
+ gjkPairDetector.getClosestPoints(input,dummy,dispatchInfo.m_debugDraw);
+
+ btVector3 sepNormalWorldSpace = gjkPairDetector.getCachedSeparatingAxis().normalized();
+
+ btVertexArray vertices;
+ btTriangleShape* tri = (btTriangleShape*)polyhedronB;
+ vertices.push_back( body1->getWorldTransform()*tri->m_vertices1[0]);
+ vertices.push_back( body1->getWorldTransform()*tri->m_vertices1[1]);
+ vertices.push_back( body1->getWorldTransform()*tri->m_vertices1[2]);
+
+ btScalar threshold = m_manifoldPtr->getContactBreakingThreshold();
+ btScalar minDist = gjkPairDetector.getCachedSeparatingDistance();
+ btPolyhedralContactClipping::clipFaceAgainstHull(sepNormalWorldSpace, *polyhedronA->getConvexPolyhedron(),
+ body0->getWorldTransform(), vertices, minDist-threshold, threshold, *resultOut);
+
+
+ if (m_ownManifold)
+ {
+ resultOut->refreshContactPoints();
+ }
+
+ return;
+ }
+
+ }
+
+
+ }
+
+ gjkPairDetector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw);
+
+ //now perform 'm_numPerturbationIterations' collision queries with the perturbated collision objects
+
+ //perform perturbation when more then 'm_minimumPointsPerturbationThreshold' points
+ if (m_numPerturbationIterations && resultOut->getPersistentManifold()->getNumContacts() < m_minimumPointsPerturbationThreshold)
+ {
+
+ int i;
+ btVector3 v0,v1;
+ btVector3 sepNormalWorldSpace;
+
+ sepNormalWorldSpace = gjkPairDetector.getCachedSeparatingAxis().normalized();
+ btPlaneSpace1(sepNormalWorldSpace,v0,v1);
+
+
+ bool perturbeA = true;
+ const btScalar angleLimit = 0.125f * SIMD_PI;
+ btScalar perturbeAngle;
+ btScalar radiusA = min0->getAngularMotionDisc();
+ btScalar radiusB = min1->getAngularMotionDisc();
+ if (radiusA < radiusB)
+ {
+ perturbeAngle = gContactBreakingThreshold /radiusA;
+ perturbeA = true;
+ } else
+ {
+ perturbeAngle = gContactBreakingThreshold / radiusB;
+ perturbeA = false;
+ }
+ if ( perturbeAngle > angleLimit )
+ perturbeAngle = angleLimit;
+
+ btTransform unPerturbedTransform;
+ if (perturbeA)
+ {
+ unPerturbedTransform = input.m_transformA;
+ } else
+ {
+ unPerturbedTransform = input.m_transformB;
+ }
+
+ for ( i=0;i<m_numPerturbationIterations;i++)
+ {
+ if (v0.length2()>SIMD_EPSILON)
+ {
+ btQuaternion perturbeRot(v0,perturbeAngle);
+ btScalar iterationAngle = i*(SIMD_2_PI/btScalar(m_numPerturbationIterations));
+ btQuaternion rotq(sepNormalWorldSpace,iterationAngle);
+
+
+ if (perturbeA)
+ {
+ input.m_transformA.setBasis( btMatrix3x3(rotq.inverse()*perturbeRot*rotq)*body0->getWorldTransform().getBasis());
+ input.m_transformB = body1->getWorldTransform();
+#ifdef DEBUG_CONTACTS
+ dispatchInfo.m_debugDraw->drawTransform(input.m_transformA,10.0);
+#endif //DEBUG_CONTACTS
+ } else
+ {
+ input.m_transformA = body0->getWorldTransform();
+ input.m_transformB.setBasis( btMatrix3x3(rotq.inverse()*perturbeRot*rotq)*body1->getWorldTransform().getBasis());
+#ifdef DEBUG_CONTACTS
+ dispatchInfo.m_debugDraw->drawTransform(input.m_transformB,10.0);
+#endif
+ }
+
+ btPerturbedContactResult perturbedResultOut(resultOut,input.m_transformA,input.m_transformB,unPerturbedTransform,perturbeA,dispatchInfo.m_debugDraw);
+ gjkPairDetector.getClosestPoints(input,perturbedResultOut,dispatchInfo.m_debugDraw);
+ }
+
+ }
+ }
+
+
+
+#ifdef USE_SEPDISTANCE_UTIL2
+ if (dispatchInfo.m_useConvexConservativeDistanceUtil && (sepDist>SIMD_EPSILON))
+ {
+ m_sepDistance.initSeparatingDistance(gjkPairDetector.getCachedSeparatingAxis(),sepDist,body0->getWorldTransform(),body1->getWorldTransform());
+ }
+#endif //USE_SEPDISTANCE_UTIL2
+
+
+ }
+
+ if (m_ownManifold)
+ {
+ resultOut->refreshContactPoints();
+ }
+
+}
+
+
+
+bool disableCcd = false;
+btScalar btConvexConvexAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ ///Rather then checking ALL pairs, only calculate TOI when motion exceeds threshold
+
+ ///Linear motion for one of objects needs to exceed m_ccdSquareMotionThreshold
+ ///col0->m_worldTransform,
+ btScalar resultFraction = btScalar(1.);
+
+
+ btScalar squareMot0 = (col0->getInterpolationWorldTransform().getOrigin() - col0->getWorldTransform().getOrigin()).length2();
+ btScalar squareMot1 = (col1->getInterpolationWorldTransform().getOrigin() - col1->getWorldTransform().getOrigin()).length2();
+
+ if (squareMot0 < col0->getCcdSquareMotionThreshold() &&
+ squareMot1 < col1->getCcdSquareMotionThreshold())
+ return resultFraction;
+
+ if (disableCcd)
+ return btScalar(1.);
+
+
+ //An adhoc way of testing the Continuous Collision Detection algorithms
+ //One object is approximated as a sphere, to simplify things
+ //Starting in penetration should report no time of impact
+ //For proper CCD, better accuracy and handling of 'allowed' penetration should be added
+ //also the mainloop of the physics should have a kind of toi queue (something like Brian Mirtich's application of Timewarp for Rigidbodies)
+
+
+ /// Convex0 against sphere for Convex1
+ {
+ btConvexShape* convex0 = static_cast<btConvexShape*>(col0->getCollisionShape());
+
+ btSphereShape sphere1(col1->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation
+ btConvexCast::CastResult result;
+ btVoronoiSimplexSolver voronoiSimplex;
+ //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex);
+ ///Simplification, one object is simplified as a sphere
+ btGjkConvexCast ccd1( convex0 ,&sphere1,&voronoiSimplex);
+ //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0);
+ if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(),
+ col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result))
+ {
+
+ //store result.m_fraction in both bodies
+
+ if (col0->getHitFraction()> result.m_fraction)
+ col0->setHitFraction( result.m_fraction );
+
+ if (col1->getHitFraction() > result.m_fraction)
+ col1->setHitFraction( result.m_fraction);
+
+ if (resultFraction > result.m_fraction)
+ resultFraction = result.m_fraction;
+
+ }
+
+
+
+
+ }
+
+ /// Sphere (for convex0) against Convex1
+ {
+ btConvexShape* convex1 = static_cast<btConvexShape*>(col1->getCollisionShape());
+
+ btSphereShape sphere0(col0->getCcdSweptSphereRadius()); //todo: allow non-zero sphere sizes, for better approximation
+ btConvexCast::CastResult result;
+ btVoronoiSimplexSolver voronoiSimplex;
+ //SubsimplexConvexCast ccd0(&sphere,min0,&voronoiSimplex);
+ ///Simplification, one object is simplified as a sphere
+ btGjkConvexCast ccd1(&sphere0,convex1,&voronoiSimplex);
+ //ContinuousConvexCollision ccd(min0,min1,&voronoiSimplex,0);
+ if (ccd1.calcTimeOfImpact(col0->getWorldTransform(),col0->getInterpolationWorldTransform(),
+ col1->getWorldTransform(),col1->getInterpolationWorldTransform(),result))
+ {
+
+ //store result.m_fraction in both bodies
+
+ if (col0->getHitFraction() > result.m_fraction)
+ col0->setHitFraction( result.m_fraction);
+
+ if (col1->getHitFraction() > result.m_fraction)
+ col1->setHitFraction( result.m_fraction);
+
+ if (resultFraction > result.m_fraction)
+ resultFraction = result.m_fraction;
+
+ }
+ }
+
+ return resultFraction;
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h
new file mode 100644
index 00000000..4380b80e
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h
@@ -0,0 +1,109 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_CONVEX_ALGORITHM_H
+#define BT_CONVEX_CONVEX_ALGORITHM_H
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "btCollisionCreateFunc.h"
+#include "btCollisionDispatcher.h"
+#include "LinearMath/btTransformUtil.h" //for btConvexSeparatingDistanceUtil
+
+class btConvexPenetrationDepthSolver;
+
+///Enabling USE_SEPDISTANCE_UTIL2 requires 100% reliable distance computation. However, when using large size ratios GJK can be imprecise
+///so the distance is not conservative. In that case, enabling this USE_SEPDISTANCE_UTIL2 would result in failing/missing collisions.
+///Either improve GJK for large size ratios (testing a 100 units versus a 0.1 unit object) or only enable the util
+///for certain pairs that have a small size ratio
+
+//#define USE_SEPDISTANCE_UTIL2 1
+
+///The convexConvexAlgorithm collision algorithm implements time of impact, convex closest points and penetration depth calculations between two convex objects.
+///Multiple contact points are calculated by perturbing the orientation of the smallest object orthogonal to the separating normal.
+///This idea was described by Gino van den Bergen in this forum topic http://www.bulletphysics.com/Bullet/phpBB3/viewtopic.php?f=4&t=288&p=888#p888
+class btConvexConvexAlgorithm : public btActivatingCollisionAlgorithm
+{
+#ifdef USE_SEPDISTANCE_UTIL2
+ btConvexSeparatingDistanceUtil m_sepDistance;
+#endif
+ btSimplexSolverInterface* m_simplexSolver;
+ btConvexPenetrationDepthSolver* m_pdSolver;
+
+
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+ bool m_lowLevelOfDetail;
+
+ int m_numPerturbationIterations;
+ int m_minimumPointsPerturbationThreshold;
+
+
+ ///cache separating vector to speedup collision detection
+
+
+public:
+
+ btConvexConvexAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1, btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold);
+
+
+ virtual ~btConvexConvexAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ ///should we use m_ownManifold to avoid adding duplicates?
+ if (m_manifoldPtr && m_ownManifold)
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+
+
+ void setLowLevelOfDetail(bool useLowLevel);
+
+
+ const btPersistentManifold* getManifold()
+ {
+ return m_manifoldPtr;
+ }
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+
+ btConvexPenetrationDepthSolver* m_pdSolver;
+ btSimplexSolverInterface* m_simplexSolver;
+ int m_numPerturbationIterations;
+ int m_minimumPointsPerturbationThreshold;
+
+ CreateFunc(btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* pdSolver);
+
+ virtual ~CreateFunc();
+
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexConvexAlgorithm));
+ return new(mem) btConvexConvexAlgorithm(ci.m_manifold,ci,body0,body1,m_simplexSolver,m_pdSolver,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold);
+ }
+ };
+
+
+};
+
+#endif //BT_CONVEX_CONVEX_ALGORITHM_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
new file mode 100644
index 00000000..dda85dc6
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
@@ -0,0 +1,155 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvexPlaneCollisionAlgorithm.h"
+
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+
+//#include <stdio.h>
+
+btConvexPlaneCollisionAlgorithm::btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped, int numPerturbationIterations,int minimumPointsPerturbationThreshold)
+: btCollisionAlgorithm(ci),
+m_ownManifold(false),
+m_manifoldPtr(mf),
+m_isSwapped(isSwapped),
+m_numPerturbationIterations(numPerturbationIterations),
+m_minimumPointsPerturbationThreshold(minimumPointsPerturbationThreshold)
+{
+ btCollisionObject* convexObj = m_isSwapped? col1 : col0;
+ btCollisionObject* planeObj = m_isSwapped? col0 : col1;
+
+ if (!m_manifoldPtr && m_dispatcher->needsCollision(convexObj,planeObj))
+ {
+ m_manifoldPtr = m_dispatcher->getNewManifold(convexObj,planeObj);
+ m_ownManifold = true;
+ }
+}
+
+
+btConvexPlaneCollisionAlgorithm::~btConvexPlaneCollisionAlgorithm()
+{
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+}
+
+void btConvexPlaneCollisionAlgorithm::collideSingleContact (const btQuaternion& perturbeRot, btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ btCollisionObject* convexObj = m_isSwapped? body1 : body0;
+ btCollisionObject* planeObj = m_isSwapped? body0: body1;
+
+ btConvexShape* convexShape = (btConvexShape*) convexObj->getCollisionShape();
+ btStaticPlaneShape* planeShape = (btStaticPlaneShape*) planeObj->getCollisionShape();
+
+ bool hasCollision = false;
+ const btVector3& planeNormal = planeShape->getPlaneNormal();
+ const btScalar& planeConstant = planeShape->getPlaneConstant();
+
+ btTransform convexWorldTransform = convexObj->getWorldTransform();
+ btTransform convexInPlaneTrans;
+ convexInPlaneTrans= planeObj->getWorldTransform().inverse() * convexWorldTransform;
+ //now perturbe the convex-world transform
+ convexWorldTransform.getBasis()*=btMatrix3x3(perturbeRot);
+ btTransform planeInConvex;
+ planeInConvex= convexWorldTransform.inverse() * planeObj->getWorldTransform();
+
+ btVector3 vtx = convexShape->localGetSupportingVertex(planeInConvex.getBasis()*-planeNormal);
+
+ btVector3 vtxInPlane = convexInPlaneTrans(vtx);
+ btScalar distance = (planeNormal.dot(vtxInPlane) - planeConstant);
+
+ btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal;
+ btVector3 vtxInPlaneWorld = planeObj->getWorldTransform() * vtxInPlaneProjected;
+
+ hasCollision = distance < m_manifoldPtr->getContactBreakingThreshold();
+ resultOut->setPersistentManifold(m_manifoldPtr);
+ if (hasCollision)
+ {
+ /// report a contact. internally this will be kept persistent, and contact reduction is done
+ btVector3 normalOnSurfaceB = planeObj->getWorldTransform().getBasis() * planeNormal;
+ btVector3 pOnB = vtxInPlaneWorld;
+ resultOut->addContactPoint(normalOnSurfaceB,pOnB,distance);
+ }
+}
+
+
+void btConvexPlaneCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)dispatchInfo;
+ if (!m_manifoldPtr)
+ return;
+
+ btCollisionObject* convexObj = m_isSwapped? body1 : body0;
+ btCollisionObject* planeObj = m_isSwapped? body0: body1;
+
+ btConvexShape* convexShape = (btConvexShape*) convexObj->getCollisionShape();
+ btStaticPlaneShape* planeShape = (btStaticPlaneShape*) planeObj->getCollisionShape();
+
+
+ const btVector3& planeNormal = planeShape->getPlaneNormal();
+ //const btScalar& planeConstant = planeShape->getPlaneConstant();
+
+ //first perform a collision query with the non-perturbated collision objects
+ {
+ btQuaternion rotq(0,0,0,1);
+ collideSingleContact(rotq,body0,body1,dispatchInfo,resultOut);
+ }
+
+ if (resultOut->getPersistentManifold()->getNumContacts()<m_minimumPointsPerturbationThreshold)
+ {
+ btVector3 v0,v1;
+ btPlaneSpace1(planeNormal,v0,v1);
+ //now perform 'm_numPerturbationIterations' collision queries with the perturbated collision objects
+
+ const btScalar angleLimit = 0.125f * SIMD_PI;
+ btScalar perturbeAngle;
+ btScalar radius = convexShape->getAngularMotionDisc();
+ perturbeAngle = gContactBreakingThreshold / radius;
+ if ( perturbeAngle > angleLimit )
+ perturbeAngle = angleLimit;
+
+ btQuaternion perturbeRot(v0,perturbeAngle);
+ for (int i=0;i<m_numPerturbationIterations;i++)
+ {
+ btScalar iterationAngle = i*(SIMD_2_PI/btScalar(m_numPerturbationIterations));
+ btQuaternion rotq(planeNormal,iterationAngle);
+ collideSingleContact(rotq.inverse()*perturbeRot*rotq,body0,body1,dispatchInfo,resultOut);
+ }
+ }
+
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr->getNumContacts())
+ {
+ resultOut->refreshContactPoints();
+ }
+ }
+}
+
+btScalar btConvexPlaneCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ (void)col0;
+ (void)col1;
+
+ //not yet
+ return btScalar(1.);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
new file mode 100644
index 00000000..a3d59f43
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h
@@ -0,0 +1,84 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
+#define BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+class btPersistentManifold;
+#include "btCollisionDispatcher.h"
+
+#include "LinearMath/btVector3.h"
+
+/// btSphereBoxCollisionAlgorithm provides sphere-box collision detection.
+/// Other features are frame-coherency (persistent data) and collision response.
+class btConvexPlaneCollisionAlgorithm : public btCollisionAlgorithm
+{
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+ bool m_isSwapped;
+ int m_numPerturbationIterations;
+ int m_minimumPointsPerturbationThreshold;
+
+public:
+
+ btConvexPlaneCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped, int numPerturbationIterations,int minimumPointsPerturbationThreshold);
+
+ virtual ~btConvexPlaneCollisionAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ void collideSingleContact (const btQuaternion& perturbeRot, btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr && m_ownManifold)
+ {
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+ }
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ int m_numPerturbationIterations;
+ int m_minimumPointsPerturbationThreshold;
+
+ CreateFunc()
+ : m_numPerturbationIterations(1),
+ m_minimumPointsPerturbationThreshold(1)
+ {
+ }
+
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btConvexPlaneCollisionAlgorithm));
+ if (!m_swapped)
+ {
+ return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,false,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold);
+ } else
+ {
+ return new(mem) btConvexPlaneCollisionAlgorithm(0,ci,body0,body1,true,m_numPerturbationIterations,m_minimumPointsPerturbationThreshold);
+ }
+ }
+ };
+
+};
+
+#endif //BT_CONVEX_PLANE_COLLISION_ALGORITHM_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
new file mode 100644
index 00000000..c27d8ce0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
@@ -0,0 +1,298 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btDefaultCollisionConfiguration.h"
+
+#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h"
+#ifdef USE_BUGGY_SPHERE_BOX_ALGORITHM
+#include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h"
+#endif //USE_BUGGY_SPHERE_BOX_ALGORITHM
+#include "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+
+
+
+#include "LinearMath/btStackAlloc.h"
+#include "LinearMath/btPoolAllocator.h"
+
+
+
+
+
+btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(const btDefaultCollisionConstructionInfo& constructionInfo)
+//btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btStackAlloc* stackAlloc,btPoolAllocator* persistentManifoldPool,btPoolAllocator* collisionAlgorithmPool)
+{
+
+ void* mem = btAlignedAlloc(sizeof(btVoronoiSimplexSolver),16);
+ m_simplexSolver = new (mem)btVoronoiSimplexSolver();
+
+ if (constructionInfo.m_useEpaPenetrationAlgorithm)
+ {
+ mem = btAlignedAlloc(sizeof(btGjkEpaPenetrationDepthSolver),16);
+ m_pdSolver = new (mem)btGjkEpaPenetrationDepthSolver;
+ }else
+ {
+ mem = btAlignedAlloc(sizeof(btMinkowskiPenetrationDepthSolver),16);
+ m_pdSolver = new (mem)btMinkowskiPenetrationDepthSolver;
+ }
+
+ //default CreationFunctions, filling the m_doubleDispatch table
+ mem = btAlignedAlloc(sizeof(btConvexConvexAlgorithm::CreateFunc),16);
+ m_convexConvexCreateFunc = new(mem) btConvexConvexAlgorithm::CreateFunc(m_simplexSolver,m_pdSolver);
+ mem = btAlignedAlloc(sizeof(btConvexConcaveCollisionAlgorithm::CreateFunc),16);
+ m_convexConcaveCreateFunc = new (mem)btConvexConcaveCollisionAlgorithm::CreateFunc;
+ mem = btAlignedAlloc(sizeof(btConvexConcaveCollisionAlgorithm::CreateFunc),16);
+ m_swappedConvexConcaveCreateFunc = new (mem)btConvexConcaveCollisionAlgorithm::SwappedCreateFunc;
+ mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::CreateFunc),16);
+ m_compoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::CreateFunc;
+ mem = btAlignedAlloc(sizeof(btCompoundCollisionAlgorithm::SwappedCreateFunc),16);
+ m_swappedCompoundCreateFunc = new (mem)btCompoundCollisionAlgorithm::SwappedCreateFunc;
+ mem = btAlignedAlloc(sizeof(btEmptyAlgorithm::CreateFunc),16);
+ m_emptyCreateFunc = new(mem) btEmptyAlgorithm::CreateFunc;
+
+ mem = btAlignedAlloc(sizeof(btSphereSphereCollisionAlgorithm::CreateFunc),16);
+ m_sphereSphereCF = new(mem) btSphereSphereCollisionAlgorithm::CreateFunc;
+#ifdef USE_BUGGY_SPHERE_BOX_ALGORITHM
+ mem = btAlignedAlloc(sizeof(btSphereBoxCollisionAlgorithm::CreateFunc),16);
+ m_sphereBoxCF = new(mem) btSphereBoxCollisionAlgorithm::CreateFunc;
+ mem = btAlignedAlloc(sizeof(btSphereBoxCollisionAlgorithm::CreateFunc),16);
+ m_boxSphereCF = new (mem)btSphereBoxCollisionAlgorithm::CreateFunc;
+ m_boxSphereCF->m_swapped = true;
+#endif //USE_BUGGY_SPHERE_BOX_ALGORITHM
+
+ mem = btAlignedAlloc(sizeof(btSphereTriangleCollisionAlgorithm::CreateFunc),16);
+ m_sphereTriangleCF = new (mem)btSphereTriangleCollisionAlgorithm::CreateFunc;
+ mem = btAlignedAlloc(sizeof(btSphereTriangleCollisionAlgorithm::CreateFunc),16);
+ m_triangleSphereCF = new (mem)btSphereTriangleCollisionAlgorithm::CreateFunc;
+ m_triangleSphereCF->m_swapped = true;
+
+ mem = btAlignedAlloc(sizeof(btBoxBoxCollisionAlgorithm::CreateFunc),16);
+ m_boxBoxCF = new(mem)btBoxBoxCollisionAlgorithm::CreateFunc;
+
+ //convex versus plane
+ mem = btAlignedAlloc (sizeof(btConvexPlaneCollisionAlgorithm::CreateFunc),16);
+ m_convexPlaneCF = new (mem) btConvexPlaneCollisionAlgorithm::CreateFunc;
+ mem = btAlignedAlloc (sizeof(btConvexPlaneCollisionAlgorithm::CreateFunc),16);
+ m_planeConvexCF = new (mem) btConvexPlaneCollisionAlgorithm::CreateFunc;
+ m_planeConvexCF->m_swapped = true;
+
+ ///calculate maximum element size, big enough to fit any collision algorithm in the memory pool
+ int maxSize = sizeof(btConvexConvexAlgorithm);
+ int maxSize2 = sizeof(btConvexConcaveCollisionAlgorithm);
+ int maxSize3 = sizeof(btCompoundCollisionAlgorithm);
+ int sl = sizeof(btConvexSeparatingDistanceUtil);
+ sl = sizeof(btGjkPairDetector);
+ int collisionAlgorithmMaxElementSize = btMax(maxSize,constructionInfo.m_customCollisionAlgorithmMaxElementSize);
+ collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize2);
+ collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize3);
+
+ if (constructionInfo.m_stackAlloc)
+ {
+ m_ownsStackAllocator = false;
+ this->m_stackAlloc = constructionInfo.m_stackAlloc;
+ } else
+ {
+ m_ownsStackAllocator = true;
+ void* mem = btAlignedAlloc(sizeof(btStackAlloc),16);
+ m_stackAlloc = new(mem)btStackAlloc(constructionInfo.m_defaultStackAllocatorSize);
+ }
+
+ if (constructionInfo.m_persistentManifoldPool)
+ {
+ m_ownsPersistentManifoldPool = false;
+ m_persistentManifoldPool = constructionInfo.m_persistentManifoldPool;
+ } else
+ {
+ m_ownsPersistentManifoldPool = true;
+ void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16);
+ m_persistentManifoldPool = new (mem) btPoolAllocator(sizeof(btPersistentManifold),constructionInfo.m_defaultMaxPersistentManifoldPoolSize);
+ }
+
+ if (constructionInfo.m_collisionAlgorithmPool)
+ {
+ m_ownsCollisionAlgorithmPool = false;
+ m_collisionAlgorithmPool = constructionInfo.m_collisionAlgorithmPool;
+ } else
+ {
+ m_ownsCollisionAlgorithmPool = true;
+ void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16);
+ m_collisionAlgorithmPool = new(mem) btPoolAllocator(collisionAlgorithmMaxElementSize,constructionInfo.m_defaultMaxCollisionAlgorithmPoolSize);
+ }
+
+
+}
+
+btDefaultCollisionConfiguration::~btDefaultCollisionConfiguration()
+{
+ if (m_ownsStackAllocator)
+ {
+ m_stackAlloc->destroy();
+ m_stackAlloc->~btStackAlloc();
+ btAlignedFree(m_stackAlloc);
+ }
+ if (m_ownsCollisionAlgorithmPool)
+ {
+ m_collisionAlgorithmPool->~btPoolAllocator();
+ btAlignedFree(m_collisionAlgorithmPool);
+ }
+ if (m_ownsPersistentManifoldPool)
+ {
+ m_persistentManifoldPool->~btPoolAllocator();
+ btAlignedFree(m_persistentManifoldPool);
+ }
+
+ m_convexConvexCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_convexConvexCreateFunc);
+
+ m_convexConcaveCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_convexConcaveCreateFunc);
+ m_swappedConvexConcaveCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_swappedConvexConcaveCreateFunc);
+
+ m_compoundCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_compoundCreateFunc);
+
+ m_swappedCompoundCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_swappedCompoundCreateFunc);
+
+ m_emptyCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_emptyCreateFunc);
+
+ m_sphereSphereCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_sphereSphereCF);
+
+#ifdef USE_BUGGY_SPHERE_BOX_ALGORITHM
+ m_sphereBoxCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_sphereBoxCF);
+ m_boxSphereCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_boxSphereCF);
+#endif //USE_BUGGY_SPHERE_BOX_ALGORITHM
+
+ m_sphereTriangleCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_sphereTriangleCF);
+ m_triangleSphereCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_triangleSphereCF);
+ m_boxBoxCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_boxBoxCF);
+
+ m_convexPlaneCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_convexPlaneCF);
+ m_planeConvexCF->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_planeConvexCF);
+
+ m_simplexSolver->~btVoronoiSimplexSolver();
+ btAlignedFree(m_simplexSolver);
+
+ m_pdSolver->~btConvexPenetrationDepthSolver();
+
+ btAlignedFree(m_pdSolver);
+
+
+}
+
+
+btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration::getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1)
+{
+
+
+
+ if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE) && (proxyType1==SPHERE_SHAPE_PROXYTYPE))
+ {
+ return m_sphereSphereCF;
+ }
+#ifdef USE_BUGGY_SPHERE_BOX_ALGORITHM
+ if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE) && (proxyType1==BOX_SHAPE_PROXYTYPE))
+ {
+ return m_sphereBoxCF;
+ }
+
+ if ((proxyType0 == BOX_SHAPE_PROXYTYPE ) && (proxyType1==SPHERE_SHAPE_PROXYTYPE))
+ {
+ return m_boxSphereCF;
+ }
+#endif //USE_BUGGY_SPHERE_BOX_ALGORITHM
+
+
+ if ((proxyType0 == SPHERE_SHAPE_PROXYTYPE ) && (proxyType1==TRIANGLE_SHAPE_PROXYTYPE))
+ {
+ return m_sphereTriangleCF;
+ }
+
+ if ((proxyType0 == TRIANGLE_SHAPE_PROXYTYPE ) && (proxyType1==SPHERE_SHAPE_PROXYTYPE))
+ {
+ return m_triangleSphereCF;
+ }
+
+ if ((proxyType0 == BOX_SHAPE_PROXYTYPE) && (proxyType1 == BOX_SHAPE_PROXYTYPE))
+ {
+ return m_boxBoxCF;
+ }
+
+ if (btBroadphaseProxy::isConvex(proxyType0) && (proxyType1 == STATIC_PLANE_PROXYTYPE))
+ {
+ return m_convexPlaneCF;
+ }
+
+ if (btBroadphaseProxy::isConvex(proxyType1) && (proxyType0 == STATIC_PLANE_PROXYTYPE))
+ {
+ return m_planeConvexCF;
+ }
+
+
+
+ if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConvex(proxyType1))
+ {
+ return m_convexConvexCreateFunc;
+ }
+
+ if (btBroadphaseProxy::isConvex(proxyType0) && btBroadphaseProxy::isConcave(proxyType1))
+ {
+ return m_convexConcaveCreateFunc;
+ }
+
+ if (btBroadphaseProxy::isConvex(proxyType1) && btBroadphaseProxy::isConcave(proxyType0))
+ {
+ return m_swappedConvexConcaveCreateFunc;
+ }
+
+ if (btBroadphaseProxy::isCompound(proxyType0))
+ {
+ return m_compoundCreateFunc;
+ } else
+ {
+ if (btBroadphaseProxy::isCompound(proxyType1))
+ {
+ return m_swappedCompoundCreateFunc;
+ }
+ }
+
+ //failed to find an algorithm
+ return m_emptyCreateFunc;
+}
+
+void btDefaultCollisionConfiguration::setConvexConvexMultipointIterations(int numPerturbationIterations, int minimumPointsPerturbationThreshold)
+{
+ btConvexConvexAlgorithm::CreateFunc* convexConvex = (btConvexConvexAlgorithm::CreateFunc*) m_convexConvexCreateFunc;
+ convexConvex->m_numPerturbationIterations = numPerturbationIterations;
+ convexConvex->m_minimumPointsPerturbationThreshold = minimumPointsPerturbationThreshold;
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h
new file mode 100644
index 00000000..6aa0d8c2
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h
@@ -0,0 +1,135 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_DEFAULT_COLLISION_CONFIGURATION
+#define BT_DEFAULT_COLLISION_CONFIGURATION
+
+#include "btCollisionConfiguration.h"
+class btVoronoiSimplexSolver;
+class btConvexPenetrationDepthSolver;
+
+struct btDefaultCollisionConstructionInfo
+{
+ btStackAlloc* m_stackAlloc;
+ btPoolAllocator* m_persistentManifoldPool;
+ btPoolAllocator* m_collisionAlgorithmPool;
+ int m_defaultMaxPersistentManifoldPoolSize;
+ int m_defaultMaxCollisionAlgorithmPoolSize;
+ int m_customCollisionAlgorithmMaxElementSize;
+ int m_defaultStackAllocatorSize;
+ int m_useEpaPenetrationAlgorithm;
+
+ btDefaultCollisionConstructionInfo()
+ :m_stackAlloc(0),
+ m_persistentManifoldPool(0),
+ m_collisionAlgorithmPool(0),
+ m_defaultMaxPersistentManifoldPoolSize(4096),
+ m_defaultMaxCollisionAlgorithmPoolSize(4096),
+ m_customCollisionAlgorithmMaxElementSize(0),
+ m_defaultStackAllocatorSize(0),
+ m_useEpaPenetrationAlgorithm(true)
+ {
+ }
+};
+
+
+
+///btCollisionConfiguration allows to configure Bullet collision detection
+///stack allocator, pool memory allocators
+///@todo: describe the meaning
+class btDefaultCollisionConfiguration : public btCollisionConfiguration
+{
+
+protected:
+
+ int m_persistentManifoldPoolSize;
+
+ btStackAlloc* m_stackAlloc;
+ bool m_ownsStackAllocator;
+
+ btPoolAllocator* m_persistentManifoldPool;
+ bool m_ownsPersistentManifoldPool;
+
+
+ btPoolAllocator* m_collisionAlgorithmPool;
+ bool m_ownsCollisionAlgorithmPool;
+
+ //default simplex/penetration depth solvers
+ btVoronoiSimplexSolver* m_simplexSolver;
+ btConvexPenetrationDepthSolver* m_pdSolver;
+
+ //default CreationFunctions, filling the m_doubleDispatch table
+ btCollisionAlgorithmCreateFunc* m_convexConvexCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_convexConcaveCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_swappedConvexConcaveCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_compoundCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_swappedCompoundCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_emptyCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_sphereSphereCF;
+#ifdef USE_BUGGY_SPHERE_BOX_ALGORITHM
+ btCollisionAlgorithmCreateFunc* m_sphereBoxCF;
+ btCollisionAlgorithmCreateFunc* m_boxSphereCF;
+#endif //USE_BUGGY_SPHERE_BOX_ALGORITHM
+
+ btCollisionAlgorithmCreateFunc* m_boxBoxCF;
+ btCollisionAlgorithmCreateFunc* m_sphereTriangleCF;
+ btCollisionAlgorithmCreateFunc* m_triangleSphereCF;
+ btCollisionAlgorithmCreateFunc* m_planeConvexCF;
+ btCollisionAlgorithmCreateFunc* m_convexPlaneCF;
+
+public:
+
+
+ btDefaultCollisionConfiguration(const btDefaultCollisionConstructionInfo& constructionInfo = btDefaultCollisionConstructionInfo());
+
+ virtual ~btDefaultCollisionConfiguration();
+
+ ///memory pools
+ virtual btPoolAllocator* getPersistentManifoldPool()
+ {
+ return m_persistentManifoldPool;
+ }
+
+ virtual btPoolAllocator* getCollisionAlgorithmPool()
+ {
+ return m_collisionAlgorithmPool;
+ }
+
+ virtual btStackAlloc* getStackAllocator()
+ {
+ return m_stackAlloc;
+ }
+
+ virtual btVoronoiSimplexSolver* getSimplexSolver()
+ {
+ return m_simplexSolver;
+ }
+
+
+ virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1);
+
+ ///Use this method to allow to generate multiple contact points between at once, between two objects using the generic convex-convex algorithm.
+ ///By default, this feature is disabled for best performance.
+ ///@param numPerturbationIterations controls the number of collision queries. Set it to zero to disable the feature.
+ ///@param minimumPointsPerturbationThreshold is the minimum number of points in the contact cache, above which the feature is disabled
+ ///3 is a good value for both params, if you want to enable the feature. This is because the default contact cache contains a maximum of 4 points, and one collision query at the unperturbed orientation is performed first.
+ ///See Bullet/Demos/CollisionDemo for an example how this feature gathers multiple points.
+ ///@todo we could add a per-object setting of those parameters, for level-of-detail collision detection.
+ void setConvexConvexMultipointIterations(int numPerturbationIterations=3, int minimumPointsPerturbationThreshold = 3);
+
+};
+
+#endif //BT_DEFAULT_COLLISION_CONFIGURATION
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp
new file mode 100644
index 00000000..93605438
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp
@@ -0,0 +1,34 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btEmptyCollisionAlgorithm.h"
+
+
+
+btEmptyAlgorithm::btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
+ : btCollisionAlgorithm(ci)
+{
+}
+
+void btEmptyAlgorithm::processCollision (btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* )
+{
+}
+
+btScalar btEmptyAlgorithm::calculateTimeOfImpact(btCollisionObject* ,btCollisionObject* ,const btDispatcherInfo& ,btManifoldResult* )
+{
+ return btScalar(1.);
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h
new file mode 100644
index 00000000..f03c9dc3
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h
@@ -0,0 +1,54 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_EMPTY_ALGORITH
+#define BT_EMPTY_ALGORITH
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "btCollisionCreateFunc.h"
+#include "btCollisionDispatcher.h"
+
+#define ATTRIBUTE_ALIGNED(a)
+
+///EmptyAlgorithm is a stub for unsupported collision pairs.
+///The dispatcher can dispatch a persistent btEmptyAlgorithm to avoid a search every frame.
+class btEmptyAlgorithm : public btCollisionAlgorithm
+{
+
+public:
+
+ btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci);
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ }
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ (void)body0;
+ (void)body1;
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btEmptyAlgorithm));
+ return new(mem) btEmptyAlgorithm(ci);
+ }
+ };
+
+} ATTRIBUTE_ALIGNED(16);
+
+#endif //BT_EMPTY_ALGORITH
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.cpp
new file mode 100644
index 00000000..86141fa6
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.cpp
@@ -0,0 +1,171 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btGhostObject.h"
+#include "btCollisionWorld.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "LinearMath/btAabbUtil2.h"
+
+btGhostObject::btGhostObject()
+{
+ m_internalType = CO_GHOST_OBJECT;
+}
+
+btGhostObject::~btGhostObject()
+{
+ ///btGhostObject should have been removed from the world, so no overlapping objects
+ btAssert(!m_overlappingObjects.size());
+}
+
+
+void btGhostObject::addOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btBroadphaseProxy* thisProxy)
+{
+ btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject;
+ btAssert(otherObject);
+ ///if this linearSearch becomes too slow (too many overlapping objects) we should add a more appropriate data structure
+ int index = m_overlappingObjects.findLinearSearch(otherObject);
+ if (index==m_overlappingObjects.size())
+ {
+ //not found
+ m_overlappingObjects.push_back(otherObject);
+ }
+}
+
+void btGhostObject::removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy)
+{
+ btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject;
+ btAssert(otherObject);
+ int index = m_overlappingObjects.findLinearSearch(otherObject);
+ if (index<m_overlappingObjects.size())
+ {
+ m_overlappingObjects[index] = m_overlappingObjects[m_overlappingObjects.size()-1];
+ m_overlappingObjects.pop_back();
+ }
+}
+
+
+btPairCachingGhostObject::btPairCachingGhostObject()
+{
+ m_hashPairCache = new (btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache();
+}
+
+btPairCachingGhostObject::~btPairCachingGhostObject()
+{
+ m_hashPairCache->~btHashedOverlappingPairCache();
+ btAlignedFree( m_hashPairCache );
+}
+
+void btPairCachingGhostObject::addOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btBroadphaseProxy* thisProxy)
+{
+ btBroadphaseProxy*actualThisProxy = thisProxy ? thisProxy : getBroadphaseHandle();
+ btAssert(actualThisProxy);
+
+ btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject;
+ btAssert(otherObject);
+ int index = m_overlappingObjects.findLinearSearch(otherObject);
+ if (index==m_overlappingObjects.size())
+ {
+ m_overlappingObjects.push_back(otherObject);
+ m_hashPairCache->addOverlappingPair(actualThisProxy,otherProxy);
+ }
+}
+
+void btPairCachingGhostObject::removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy1)
+{
+ btCollisionObject* otherObject = (btCollisionObject*)otherProxy->m_clientObject;
+ btBroadphaseProxy* actualThisProxy = thisProxy1 ? thisProxy1 : getBroadphaseHandle();
+ btAssert(actualThisProxy);
+
+ btAssert(otherObject);
+ int index = m_overlappingObjects.findLinearSearch(otherObject);
+ if (index<m_overlappingObjects.size())
+ {
+ m_overlappingObjects[index] = m_overlappingObjects[m_overlappingObjects.size()-1];
+ m_overlappingObjects.pop_back();
+ m_hashPairCache->removeOverlappingPair(actualThisProxy,otherProxy,dispatcher);
+ }
+}
+
+
+void btGhostObject::convexSweepTest(const btConvexShape* castShape, const btTransform& convexFromWorld, const btTransform& convexToWorld, btCollisionWorld::ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration) const
+{
+ btTransform convexFromTrans,convexToTrans;
+ convexFromTrans = convexFromWorld;
+ convexToTrans = convexToWorld;
+ btVector3 castShapeAabbMin, castShapeAabbMax;
+ /* Compute AABB that encompasses angular movement */
+ {
+ btVector3 linVel, angVel;
+ btTransformUtil::calculateVelocity (convexFromTrans, convexToTrans, 1.0, linVel, angVel);
+ btTransform R;
+ R.setIdentity ();
+ R.setRotation (convexFromTrans.getRotation());
+ castShape->calculateTemporalAabb (R, linVel, angVel, 1.0, castShapeAabbMin, castShapeAabbMax);
+ }
+
+ /// go over all objects, and if the ray intersects their aabb + cast shape aabb,
+ // do a ray-shape query using convexCaster (CCD)
+ int i;
+ for (i=0;i<m_overlappingObjects.size();i++)
+ {
+ btCollisionObject* collisionObject= m_overlappingObjects[i];
+ //only perform raycast if filterMask matches
+ if(resultCallback.needsCollision(collisionObject->getBroadphaseHandle())) {
+ //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject();
+ btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+ collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax);
+ AabbExpand (collisionObjectAabbMin, collisionObjectAabbMax, castShapeAabbMin, castShapeAabbMax);
+ btScalar hitLambda = btScalar(1.); //could use resultCallback.m_closestHitFraction, but needs testing
+ btVector3 hitNormal;
+ if (btRayAabb(convexFromWorld.getOrigin(),convexToWorld.getOrigin(),collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,hitNormal))
+ {
+ btCollisionWorld::objectQuerySingle(castShape, convexFromTrans,convexToTrans,
+ collisionObject,
+ collisionObject->getCollisionShape(),
+ collisionObject->getWorldTransform(),
+ resultCallback,
+ allowedCcdPenetration);
+ }
+ }
+ }
+
+}
+
+void btGhostObject::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, btCollisionWorld::RayResultCallback& resultCallback) const
+{
+ btTransform rayFromTrans;
+ rayFromTrans.setIdentity();
+ rayFromTrans.setOrigin(rayFromWorld);
+ btTransform rayToTrans;
+ rayToTrans.setIdentity();
+ rayToTrans.setOrigin(rayToWorld);
+
+
+ int i;
+ for (i=0;i<m_overlappingObjects.size();i++)
+ {
+ btCollisionObject* collisionObject= m_overlappingObjects[i];
+ //only perform raycast if filterMask matches
+ if(resultCallback.needsCollision(collisionObject->getBroadphaseHandle()))
+ {
+ btCollisionWorld::rayTestSingle(rayFromTrans,rayToTrans,
+ collisionObject,
+ collisionObject->getCollisionShape(),
+ collisionObject->getWorldTransform(),
+ resultCallback);
+ }
+ }
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.h
new file mode 100644
index 00000000..8ec86138
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btGhostObject.h
@@ -0,0 +1,175 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_GHOST_OBJECT_H
+#define BT_GHOST_OBJECT_H
+
+
+#include "btCollisionObject.h"
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h"
+#include "LinearMath/btAlignedAllocator.h"
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
+#include "btCollisionWorld.h"
+
+class btConvexShape;
+
+class btDispatcher;
+
+///The btGhostObject can keep track of all objects that are overlapping
+///By default, this overlap is based on the AABB
+///This is useful for creating a character controller, collision sensors/triggers, explosions etc.
+///We plan on adding rayTest and other queries for the btGhostObject
+ATTRIBUTE_ALIGNED16(class) btGhostObject : public btCollisionObject
+{
+protected:
+
+ btAlignedObjectArray<btCollisionObject*> m_overlappingObjects;
+
+public:
+
+ btGhostObject();
+
+ virtual ~btGhostObject();
+
+ void convexSweepTest(const class btConvexShape* castShape, const btTransform& convexFromWorld, const btTransform& convexToWorld, btCollisionWorld::ConvexResultCallback& resultCallback, btScalar allowedCcdPenetration = 0.f) const;
+
+ void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, btCollisionWorld::RayResultCallback& resultCallback) const;
+
+ ///this method is mainly for expert/internal use only.
+ virtual void addOverlappingObjectInternal(btBroadphaseProxy* otherProxy, btBroadphaseProxy* thisProxy=0);
+ ///this method is mainly for expert/internal use only.
+ virtual void removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy=0);
+
+ int getNumOverlappingObjects() const
+ {
+ return m_overlappingObjects.size();
+ }
+
+ btCollisionObject* getOverlappingObject(int index)
+ {
+ return m_overlappingObjects[index];
+ }
+
+ const btCollisionObject* getOverlappingObject(int index) const
+ {
+ return m_overlappingObjects[index];
+ }
+
+ btAlignedObjectArray<btCollisionObject*>& getOverlappingPairs()
+ {
+ return m_overlappingObjects;
+ }
+
+ const btAlignedObjectArray<btCollisionObject*> getOverlappingPairs() const
+ {
+ return m_overlappingObjects;
+ }
+
+ //
+ // internal cast
+ //
+
+ static const btGhostObject* upcast(const btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()==CO_GHOST_OBJECT)
+ return (const btGhostObject*)colObj;
+ return 0;
+ }
+ static btGhostObject* upcast(btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()==CO_GHOST_OBJECT)
+ return (btGhostObject*)colObj;
+ return 0;
+ }
+
+};
+
+class btPairCachingGhostObject : public btGhostObject
+{
+ btHashedOverlappingPairCache* m_hashPairCache;
+
+public:
+
+ btPairCachingGhostObject();
+
+ virtual ~btPairCachingGhostObject();
+
+ ///this method is mainly for expert/internal use only.
+ virtual void addOverlappingObjectInternal(btBroadphaseProxy* otherProxy, btBroadphaseProxy* thisProxy=0);
+
+ virtual void removeOverlappingObjectInternal(btBroadphaseProxy* otherProxy,btDispatcher* dispatcher,btBroadphaseProxy* thisProxy=0);
+
+ btHashedOverlappingPairCache* getOverlappingPairCache()
+ {
+ return m_hashPairCache;
+ }
+
+};
+
+
+
+///The btGhostPairCallback interfaces and forwards adding and removal of overlapping pairs from the btBroadphaseInterface to btGhostObject.
+class btGhostPairCallback : public btOverlappingPairCallback
+{
+
+public:
+ btGhostPairCallback()
+ {
+ }
+
+ virtual ~btGhostPairCallback()
+ {
+
+ }
+
+ virtual btBroadphasePair* addOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1)
+ {
+ btCollisionObject* colObj0 = (btCollisionObject*) proxy0->m_clientObject;
+ btCollisionObject* colObj1 = (btCollisionObject*) proxy1->m_clientObject;
+ btGhostObject* ghost0 = btGhostObject::upcast(colObj0);
+ btGhostObject* ghost1 = btGhostObject::upcast(colObj1);
+ if (ghost0)
+ ghost0->addOverlappingObjectInternal(proxy1, proxy0);
+ if (ghost1)
+ ghost1->addOverlappingObjectInternal(proxy0, proxy1);
+ return 0;
+ }
+
+ virtual void* removeOverlappingPair(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1,btDispatcher* dispatcher)
+ {
+ btCollisionObject* colObj0 = (btCollisionObject*) proxy0->m_clientObject;
+ btCollisionObject* colObj1 = (btCollisionObject*) proxy1->m_clientObject;
+ btGhostObject* ghost0 = btGhostObject::upcast(colObj0);
+ btGhostObject* ghost1 = btGhostObject::upcast(colObj1);
+ if (ghost0)
+ ghost0->removeOverlappingObjectInternal(proxy1,dispatcher,proxy0);
+ if (ghost1)
+ ghost1->removeOverlappingObjectInternal(proxy0,dispatcher,proxy1);
+ return 0;
+ }
+
+ virtual void removeOverlappingPairsContainingProxy(btBroadphaseProxy* /*proxy0*/,btDispatcher* /*dispatcher*/)
+ {
+ btAssert(0);
+ //need to keep track of all ghost objects and call them here
+ //m_hashPairCache->removeOverlappingPairsContainingProxy(proxy0,dispatcher);
+ }
+
+
+
+};
+
+#endif
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp
new file mode 100644
index 00000000..3ebe3ed8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp
@@ -0,0 +1,842 @@
+#include "btInternalEdgeUtility.h"
+
+#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
+#include "LinearMath/btIDebugDraw.h"
+
+
+//#define DEBUG_INTERNAL_EDGE
+
+#ifdef DEBUG_INTERNAL_EDGE
+#include <stdio.h>
+#endif //DEBUG_INTERNAL_EDGE
+
+
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+static btIDebugDraw* gDebugDrawer = 0;
+
+void btSetDebugDrawer(btIDebugDraw* debugDrawer)
+{
+ gDebugDrawer = debugDrawer;
+}
+
+static void btDebugDrawLine(const btVector3& from,const btVector3& to, const btVector3& color)
+{
+ if (gDebugDrawer)
+ gDebugDrawer->drawLine(from,to,color);
+}
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+
+static int btGetHash(int partId, int triangleIndex)
+{
+ int hash = (partId<<(31-MAX_NUM_PARTS_IN_BITS)) | triangleIndex;
+ return hash;
+}
+
+
+
+static btScalar btGetAngle(const btVector3& edgeA, const btVector3& normalA,const btVector3& normalB)
+{
+ const btVector3 refAxis0 = edgeA;
+ const btVector3 refAxis1 = normalA;
+ const btVector3 swingAxis = normalB;
+ btScalar angle = btAtan2(swingAxis.dot(refAxis0), swingAxis.dot(refAxis1));
+ return angle;
+}
+
+
+struct btConnectivityProcessor : public btTriangleCallback
+{
+ int m_partIdA;
+ int m_triangleIndexA;
+ btVector3* m_triangleVerticesA;
+ btTriangleInfoMap* m_triangleInfoMap;
+
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex)
+ {
+ //skip self-collisions
+ if ((m_partIdA == partId) && (m_triangleIndexA == triangleIndex))
+ return;
+
+ //skip duplicates (disabled for now)
+ //if ((m_partIdA <= partId) && (m_triangleIndexA <= triangleIndex))
+ // return;
+
+ //search for shared vertices and edges
+ int numshared = 0;
+ int sharedVertsA[3]={-1,-1,-1};
+ int sharedVertsB[3]={-1,-1,-1};
+
+ ///skip degenerate triangles
+ btScalar crossBSqr = ((triangle[1]-triangle[0]).cross(triangle[2]-triangle[0])).length2();
+ if (crossBSqr < m_triangleInfoMap->m_equalVertexThreshold)
+ return;
+
+
+ btScalar crossASqr = ((m_triangleVerticesA[1]-m_triangleVerticesA[0]).cross(m_triangleVerticesA[2]-m_triangleVerticesA[0])).length2();
+ ///skip degenerate triangles
+ if (crossASqr< m_triangleInfoMap->m_equalVertexThreshold)
+ return;
+
+#if 0
+ printf("triangle A[0] = (%f,%f,%f)\ntriangle A[1] = (%f,%f,%f)\ntriangle A[2] = (%f,%f,%f)\n",
+ m_triangleVerticesA[0].getX(),m_triangleVerticesA[0].getY(),m_triangleVerticesA[0].getZ(),
+ m_triangleVerticesA[1].getX(),m_triangleVerticesA[1].getY(),m_triangleVerticesA[1].getZ(),
+ m_triangleVerticesA[2].getX(),m_triangleVerticesA[2].getY(),m_triangleVerticesA[2].getZ());
+
+ printf("partId=%d, triangleIndex=%d\n",partId,triangleIndex);
+ printf("triangle B[0] = (%f,%f,%f)\ntriangle B[1] = (%f,%f,%f)\ntriangle B[2] = (%f,%f,%f)\n",
+ triangle[0].getX(),triangle[0].getY(),triangle[0].getZ(),
+ triangle[1].getX(),triangle[1].getY(),triangle[1].getZ(),
+ triangle[2].getX(),triangle[2].getY(),triangle[2].getZ());
+#endif
+
+ for (int i=0;i<3;i++)
+ {
+ for (int j=0;j<3;j++)
+ {
+ if ( (m_triangleVerticesA[i]-triangle[j]).length2() < m_triangleInfoMap->m_equalVertexThreshold)
+ {
+ sharedVertsA[numshared] = i;
+ sharedVertsB[numshared] = j;
+ numshared++;
+ ///degenerate case
+ if(numshared >= 3)
+ return;
+ }
+ }
+ ///degenerate case
+ if(numshared >= 3)
+ return;
+ }
+ switch (numshared)
+ {
+ case 0:
+ {
+ break;
+ }
+ case 1:
+ {
+ //shared vertex
+ break;
+ }
+ case 2:
+ {
+ //shared edge
+ //we need to make sure the edge is in the order V2V0 and not V0V2 so that the signs are correct
+ if (sharedVertsA[0] == 0 && sharedVertsA[1] == 2)
+ {
+ sharedVertsA[0] = 2;
+ sharedVertsA[1] = 0;
+ int tmp = sharedVertsB[1];
+ sharedVertsB[1] = sharedVertsB[0];
+ sharedVertsB[0] = tmp;
+ }
+
+ int hash = btGetHash(m_partIdA,m_triangleIndexA);
+
+ btTriangleInfo* info = m_triangleInfoMap->find(hash);
+ if (!info)
+ {
+ btTriangleInfo tmp;
+ m_triangleInfoMap->insert(hash,tmp);
+ info = m_triangleInfoMap->find(hash);
+ }
+
+ int sumvertsA = sharedVertsA[0]+sharedVertsA[1];
+ int otherIndexA = 3-sumvertsA;
+
+
+ btVector3 edge(m_triangleVerticesA[sharedVertsA[1]]-m_triangleVerticesA[sharedVertsA[0]]);
+
+ btTriangleShape tA(m_triangleVerticesA[0],m_triangleVerticesA[1],m_triangleVerticesA[2]);
+ int otherIndexB = 3-(sharedVertsB[0]+sharedVertsB[1]);
+
+ btTriangleShape tB(triangle[sharedVertsB[1]],triangle[sharedVertsB[0]],triangle[otherIndexB]);
+ //btTriangleShape tB(triangle[0],triangle[1],triangle[2]);
+
+ btVector3 normalA;
+ btVector3 normalB;
+ tA.calcNormal(normalA);
+ tB.calcNormal(normalB);
+ edge.normalize();
+ btVector3 edgeCrossA = edge.cross(normalA).normalize();
+
+ {
+ btVector3 tmp = m_triangleVerticesA[otherIndexA]-m_triangleVerticesA[sharedVertsA[0]];
+ if (edgeCrossA.dot(tmp) < 0)
+ {
+ edgeCrossA*=-1;
+ }
+ }
+
+ btVector3 edgeCrossB = edge.cross(normalB).normalize();
+
+ {
+ btVector3 tmp = triangle[otherIndexB]-triangle[sharedVertsB[0]];
+ if (edgeCrossB.dot(tmp) < 0)
+ {
+ edgeCrossB*=-1;
+ }
+ }
+
+ btScalar angle2 = 0;
+ btScalar ang4 = 0.f;
+
+
+ btVector3 calculatedEdge = edgeCrossA.cross(edgeCrossB);
+ btScalar len2 = calculatedEdge.length2();
+
+ btScalar correctedAngle(0);
+ btVector3 calculatedNormalB = normalA;
+ bool isConvex = false;
+
+ if (len2<m_triangleInfoMap->m_planarEpsilon)
+ {
+ angle2 = 0.f;
+ ang4 = 0.f;
+ } else
+ {
+
+ calculatedEdge.normalize();
+ btVector3 calculatedNormalA = calculatedEdge.cross(edgeCrossA);
+ calculatedNormalA.normalize();
+ angle2 = btGetAngle(calculatedNormalA,edgeCrossA,edgeCrossB);
+ ang4 = SIMD_PI-angle2;
+ btScalar dotA = normalA.dot(edgeCrossB);
+ ///@todo: check if we need some epsilon, due to floating point imprecision
+ isConvex = (dotA<0.);
+
+ correctedAngle = isConvex ? ang4 : -ang4;
+ btQuaternion orn2(calculatedEdge,-correctedAngle);
+ calculatedNormalB = btMatrix3x3(orn2)*normalA;
+
+
+ }
+
+
+
+
+
+ //alternatively use
+ //btVector3 calculatedNormalB2 = quatRotate(orn,normalA);
+
+
+ switch (sumvertsA)
+ {
+ case 1:
+ {
+ btVector3 edge = m_triangleVerticesA[0]-m_triangleVerticesA[1];
+ btQuaternion orn(edge,-correctedAngle);
+ btVector3 computedNormalB = quatRotate(orn,normalA);
+ btScalar bla = computedNormalB.dot(normalB);
+ if (bla<0)
+ {
+ computedNormalB*=-1;
+ info->m_flags |= TRI_INFO_V0V1_SWAP_NORMALB;
+ }
+#ifdef DEBUG_INTERNAL_EDGE
+ if ((computedNormalB-normalB).length()>0.0001)
+ {
+ printf("warning: normals not identical\n");
+ }
+#endif//DEBUG_INTERNAL_EDGE
+
+ info->m_edgeV0V1Angle = -correctedAngle;
+
+ if (isConvex)
+ info->m_flags |= TRI_INFO_V0V1_CONVEX;
+ break;
+ }
+ case 2:
+ {
+ btVector3 edge = m_triangleVerticesA[2]-m_triangleVerticesA[0];
+ btQuaternion orn(edge,-correctedAngle);
+ btVector3 computedNormalB = quatRotate(orn,normalA);
+ if (computedNormalB.dot(normalB)<0)
+ {
+ computedNormalB*=-1;
+ info->m_flags |= TRI_INFO_V2V0_SWAP_NORMALB;
+ }
+
+#ifdef DEBUG_INTERNAL_EDGE
+ if ((computedNormalB-normalB).length()>0.0001)
+ {
+ printf("warning: normals not identical\n");
+ }
+#endif //DEBUG_INTERNAL_EDGE
+ info->m_edgeV2V0Angle = -correctedAngle;
+ if (isConvex)
+ info->m_flags |= TRI_INFO_V2V0_CONVEX;
+ break;
+ }
+ case 3:
+ {
+ btVector3 edge = m_triangleVerticesA[1]-m_triangleVerticesA[2];
+ btQuaternion orn(edge,-correctedAngle);
+ btVector3 computedNormalB = quatRotate(orn,normalA);
+ if (computedNormalB.dot(normalB)<0)
+ {
+ info->m_flags |= TRI_INFO_V1V2_SWAP_NORMALB;
+ computedNormalB*=-1;
+ }
+#ifdef DEBUG_INTERNAL_EDGE
+ if ((computedNormalB-normalB).length()>0.0001)
+ {
+ printf("warning: normals not identical\n");
+ }
+#endif //DEBUG_INTERNAL_EDGE
+ info->m_edgeV1V2Angle = -correctedAngle;
+
+ if (isConvex)
+ info->m_flags |= TRI_INFO_V1V2_CONVEX;
+ break;
+ }
+ }
+
+ break;
+ }
+ default:
+ {
+ // printf("warning: duplicate triangle\n");
+ }
+
+ }
+ }
+};
+/////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////
+
+void btGenerateInternalEdgeInfo (btBvhTriangleMeshShape*trimeshShape, btTriangleInfoMap* triangleInfoMap)
+{
+ //the user pointer shouldn't already be used for other purposes, we intend to store connectivity info there!
+ if (trimeshShape->getTriangleInfoMap())
+ return;
+
+ trimeshShape->setTriangleInfoMap(triangleInfoMap);
+
+ btStridingMeshInterface* meshInterface = trimeshShape->getMeshInterface();
+ const btVector3& meshScaling = meshInterface->getScaling();
+
+ for (int partId = 0; partId< meshInterface->getNumSubParts();partId++)
+ {
+ const unsigned char *vertexbase = 0;
+ int numverts = 0;
+ PHY_ScalarType type = PHY_INTEGER;
+ int stride = 0;
+ const unsigned char *indexbase = 0;
+ int indexstride = 0;
+ int numfaces = 0;
+ PHY_ScalarType indicestype = PHY_INTEGER;
+ //PHY_ScalarType indexType=0;
+
+ btVector3 triangleVerts[3];
+ meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,partId);
+ btVector3 aabbMin,aabbMax;
+
+ for (int triangleIndex = 0 ; triangleIndex < numfaces;triangleIndex++)
+ {
+ unsigned int* gfxbase = (unsigned int*)(indexbase+triangleIndex*indexstride);
+
+ for (int j=2;j>=0;j--)
+ {
+
+ int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:gfxbase[j];
+ if (type == PHY_FLOAT)
+ {
+ float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
+ triangleVerts[j] = btVector3(
+ graphicsbase[0]*meshScaling.getX(),
+ graphicsbase[1]*meshScaling.getY(),
+ graphicsbase[2]*meshScaling.getZ());
+ }
+ else
+ {
+ double* graphicsbase = (double*)(vertexbase+graphicsindex*stride);
+ triangleVerts[j] = btVector3( btScalar(graphicsbase[0]*meshScaling.getX()), btScalar(graphicsbase[1]*meshScaling.getY()), btScalar(graphicsbase[2]*meshScaling.getZ()));
+ }
+ }
+ aabbMin.setValue(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ aabbMax.setValue(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ aabbMin.setMin(triangleVerts[0]);
+ aabbMax.setMax(triangleVerts[0]);
+ aabbMin.setMin(triangleVerts[1]);
+ aabbMax.setMax(triangleVerts[1]);
+ aabbMin.setMin(triangleVerts[2]);
+ aabbMax.setMax(triangleVerts[2]);
+
+ btConnectivityProcessor connectivityProcessor;
+ connectivityProcessor.m_partIdA = partId;
+ connectivityProcessor.m_triangleIndexA = triangleIndex;
+ connectivityProcessor.m_triangleVerticesA = &triangleVerts[0];
+ connectivityProcessor.m_triangleInfoMap = triangleInfoMap;
+
+ trimeshShape->processAllTriangles(&connectivityProcessor,aabbMin,aabbMax);
+ }
+
+ }
+
+}
+
+
+
+
+// Given a point and a line segment (defined by two points), compute the closest point
+// in the line. Cap the point at the endpoints of the line segment.
+void btNearestPointInLineSegment(const btVector3 &point, const btVector3& line0, const btVector3& line1, btVector3& nearestPoint)
+{
+ btVector3 lineDelta = line1 - line0;
+
+ // Handle degenerate lines
+ if ( lineDelta.fuzzyZero())
+ {
+ nearestPoint = line0;
+ }
+ else
+ {
+ btScalar delta = (point-line0).dot(lineDelta) / (lineDelta).dot(lineDelta);
+
+ // Clamp the point to conform to the segment's endpoints
+ if ( delta < 0 )
+ delta = 0;
+ else if ( delta > 1 )
+ delta = 1;
+
+ nearestPoint = line0 + lineDelta*delta;
+ }
+}
+
+
+
+
+bool btClampNormal(const btVector3& edge,const btVector3& tri_normal_org,const btVector3& localContactNormalOnB, btScalar correctedEdgeAngle, btVector3 & clampedLocalNormal)
+{
+ btVector3 tri_normal = tri_normal_org;
+ //we only have a local triangle normal, not a local contact normal -> only normal in world space...
+ //either compute the current angle all in local space, or all in world space
+
+ btVector3 edgeCross = edge.cross(tri_normal).normalize();
+ btScalar curAngle = btGetAngle(edgeCross,tri_normal,localContactNormalOnB);
+
+ if (correctedEdgeAngle<0)
+ {
+ if (curAngle < correctedEdgeAngle)
+ {
+ btScalar diffAngle = correctedEdgeAngle-curAngle;
+ btQuaternion rotation(edge,diffAngle );
+ clampedLocalNormal = btMatrix3x3(rotation)*localContactNormalOnB;
+ return true;
+ }
+ }
+
+ if (correctedEdgeAngle>=0)
+ {
+ if (curAngle > correctedEdgeAngle)
+ {
+ btScalar diffAngle = correctedEdgeAngle-curAngle;
+ btQuaternion rotation(edge,diffAngle );
+ clampedLocalNormal = btMatrix3x3(rotation)*localContactNormalOnB;
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+/// Changes a btManifoldPoint collision normal to the normal from the mesh.
+void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject* colObj0,const btCollisionObject* colObj1, int partId0, int index0, int normalAdjustFlags)
+{
+ //btAssert(colObj0->getCollisionShape()->getShapeType() == TRIANGLE_SHAPE_PROXYTYPE);
+ if (colObj0->getCollisionShape()->getShapeType() != TRIANGLE_SHAPE_PROXYTYPE)
+ return;
+
+ btBvhTriangleMeshShape* trimesh = 0;
+
+ if( colObj0->getRootCollisionShape()->getShapeType() == SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE )
+ trimesh = ((btScaledBvhTriangleMeshShape*)colObj0->getRootCollisionShape())->getChildShape();
+ else
+ trimesh = (btBvhTriangleMeshShape*)colObj0->getRootCollisionShape();
+
+ btTriangleInfoMap* triangleInfoMapPtr = (btTriangleInfoMap*) trimesh->getTriangleInfoMap();
+ if (!triangleInfoMapPtr)
+ return;
+
+ int hash = btGetHash(partId0,index0);
+
+
+ btTriangleInfo* info = triangleInfoMapPtr->find(hash);
+ if (!info)
+ return;
+
+ btScalar frontFacing = (normalAdjustFlags & BT_TRIANGLE_CONVEX_BACKFACE_MODE)==0? 1.f : -1.f;
+
+ const btTriangleShape* tri_shape = static_cast<const btTriangleShape*>(colObj0->getCollisionShape());
+ btVector3 v0,v1,v2;
+ tri_shape->getVertex(0,v0);
+ tri_shape->getVertex(1,v1);
+ tri_shape->getVertex(2,v2);
+
+ btVector3 center = (v0+v1+v2)*btScalar(1./3.);
+
+ btVector3 red(1,0,0), green(0,1,0),blue(0,0,1),white(1,1,1),black(0,0,0);
+ btVector3 tri_normal;
+ tri_shape->calcNormal(tri_normal);
+
+ //btScalar dot = tri_normal.dot(cp.m_normalWorldOnB);
+ btVector3 nearest;
+ btNearestPointInLineSegment(cp.m_localPointB,v0,v1,nearest);
+
+ btVector3 contact = cp.m_localPointB;
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ const btTransform& tr = colObj0->getWorldTransform();
+ btDebugDrawLine(tr*nearest,tr*cp.m_localPointB,red);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+
+
+ bool isNearEdge = false;
+
+ int numConcaveEdgeHits = 0;
+ int numConvexEdgeHits = 0;
+
+ btVector3 localContactNormalOnB = colObj0->getWorldTransform().getBasis().transpose() * cp.m_normalWorldOnB;
+ localContactNormalOnB.normalize();//is this necessary?
+
+ // Get closest edge
+ int bestedge=-1;
+ float disttobestedge=BT_LARGE_FLOAT;
+ //
+ // Edge 0 -> 1
+ if (btFabs(info->m_edgeV0V1Angle)< triangleInfoMapPtr->m_maxEdgeAngleThreshold)
+ {
+ btVector3 nearest;
+ btNearestPointInLineSegment( cp.m_localPointB, v0, v1, nearest );
+ float len=(contact-nearest).length();
+ //
+ if( len < disttobestedge )
+ {
+ bestedge=0;
+ disttobestedge=len;
+ }
+ }
+ // Edge 1 -> 2
+ if (btFabs(info->m_edgeV1V2Angle)< triangleInfoMapPtr->m_maxEdgeAngleThreshold)
+ {
+ btVector3 nearest;
+ btNearestPointInLineSegment( cp.m_localPointB, v1, v2, nearest );
+ float len=(contact-nearest).length();
+ //
+ if( len < disttobestedge )
+ {
+ bestedge=1;
+ disttobestedge=len;
+ }
+ }
+ // Edge 2 -> 0
+ if (btFabs(info->m_edgeV2V0Angle)< triangleInfoMapPtr->m_maxEdgeAngleThreshold)
+ {
+ btVector3 nearest;
+ btNearestPointInLineSegment( cp.m_localPointB, v2, v0, nearest );
+ float len=(contact-nearest).length();
+ //
+ if( len < disttobestedge )
+ {
+ bestedge=2;
+ disttobestedge=len;
+ }
+ }
+
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btVector3 upfix=tri_normal * btVector3(0.1f,0.1f,0.1f);
+ btDebugDrawLine(tr * v0 + upfix, tr * v1 + upfix, red );
+#endif
+ if (btFabs(info->m_edgeV0V1Angle)< triangleInfoMapPtr->m_maxEdgeAngleThreshold)
+ {
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*contact,tr*(contact+cp.m_normalWorldOnB*10),black);
+#endif
+ btScalar len = (contact-nearest).length();
+ if(len<triangleInfoMapPtr->m_edgeDistanceThreshold)
+ if( bestedge==0 )
+ {
+ btVector3 edge(v0-v1);
+ isNearEdge = true;
+
+ if (info->m_edgeV0V1Angle==btScalar(0))
+ {
+ numConcaveEdgeHits++;
+ } else
+ {
+
+ bool isEdgeConvex = (info->m_flags & TRI_INFO_V0V1_CONVEX);
+ btScalar swapFactor = isEdgeConvex ? btScalar(1) : btScalar(-1);
+ #ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*nearest,tr*(nearest+swapFactor*tri_normal*10),white);
+ #endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+ btVector3 nA = swapFactor * tri_normal;
+
+ btQuaternion orn(edge,info->m_edgeV0V1Angle);
+ btVector3 computedNormalB = quatRotate(orn,tri_normal);
+ if (info->m_flags & TRI_INFO_V0V1_SWAP_NORMALB)
+ computedNormalB*=-1;
+ btVector3 nB = swapFactor*computedNormalB;
+
+ btScalar NdotA = localContactNormalOnB.dot(nA);
+ btScalar NdotB = localContactNormalOnB.dot(nB);
+ bool backFacingNormal = (NdotA< triangleInfoMapPtr->m_convexEpsilon) && (NdotB<triangleInfoMapPtr->m_convexEpsilon);
+
+#ifdef DEBUG_INTERNAL_EDGE
+ {
+
+ btDebugDrawLine(cp.getPositionWorldOnB(),cp.getPositionWorldOnB()+tr.getBasis()*(nB*20),red);
+ }
+#endif //DEBUG_INTERNAL_EDGE
+
+
+ if (backFacingNormal)
+ {
+ numConcaveEdgeHits++;
+ }
+ else
+ {
+ numConvexEdgeHits++;
+ btVector3 clampedLocalNormal;
+ bool isClamped = btClampNormal(edge,swapFactor*tri_normal,localContactNormalOnB, info->m_edgeV0V1Angle,clampedLocalNormal);
+ if (isClamped)
+ {
+ if (((normalAdjustFlags & BT_TRIANGLE_CONVEX_DOUBLE_SIDED)!=0) || (clampedLocalNormal.dot(frontFacing*tri_normal)>0))
+ {
+ btVector3 newNormal = colObj0->getWorldTransform().getBasis() * clampedLocalNormal;
+ // cp.m_distance1 = cp.m_distance1 * newNormal.dot(cp.m_normalWorldOnB);
+ cp.m_normalWorldOnB = newNormal;
+ // Reproject collision point along normal. (what about cp.m_distance1?)
+ cp.m_positionWorldOnB = cp.m_positionWorldOnA - cp.m_normalWorldOnB * cp.m_distance1;
+ cp.m_localPointB = colObj0->getWorldTransform().invXform(cp.m_positionWorldOnB);
+
+ }
+ }
+ }
+ }
+ }
+ }
+
+ btNearestPointInLineSegment(contact,v1,v2,nearest);
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*nearest,tr*cp.m_localPointB,green);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr * v1 + upfix, tr * v2 + upfix , green );
+#endif
+
+ if (btFabs(info->m_edgeV1V2Angle)< triangleInfoMapPtr->m_maxEdgeAngleThreshold)
+ {
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*contact,tr*(contact+cp.m_normalWorldOnB*10),black);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+
+
+ btScalar len = (contact-nearest).length();
+ if(len<triangleInfoMapPtr->m_edgeDistanceThreshold)
+ if( bestedge==1 )
+ {
+ isNearEdge = true;
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*nearest,tr*(nearest+tri_normal*10),white);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+ btVector3 edge(v1-v2);
+
+ isNearEdge = true;
+
+ if (info->m_edgeV1V2Angle == btScalar(0))
+ {
+ numConcaveEdgeHits++;
+ } else
+ {
+ bool isEdgeConvex = (info->m_flags & TRI_INFO_V1V2_CONVEX)!=0;
+ btScalar swapFactor = isEdgeConvex ? btScalar(1) : btScalar(-1);
+ #ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*nearest,tr*(nearest+swapFactor*tri_normal*10),white);
+ #endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+ btVector3 nA = swapFactor * tri_normal;
+
+ btQuaternion orn(edge,info->m_edgeV1V2Angle);
+ btVector3 computedNormalB = quatRotate(orn,tri_normal);
+ if (info->m_flags & TRI_INFO_V1V2_SWAP_NORMALB)
+ computedNormalB*=-1;
+ btVector3 nB = swapFactor*computedNormalB;
+
+#ifdef DEBUG_INTERNAL_EDGE
+ {
+ btDebugDrawLine(cp.getPositionWorldOnB(),cp.getPositionWorldOnB()+tr.getBasis()*(nB*20),red);
+ }
+#endif //DEBUG_INTERNAL_EDGE
+
+
+ btScalar NdotA = localContactNormalOnB.dot(nA);
+ btScalar NdotB = localContactNormalOnB.dot(nB);
+ bool backFacingNormal = (NdotA< triangleInfoMapPtr->m_convexEpsilon) && (NdotB<triangleInfoMapPtr->m_convexEpsilon);
+
+ if (backFacingNormal)
+ {
+ numConcaveEdgeHits++;
+ }
+ else
+ {
+ numConvexEdgeHits++;
+ btVector3 localContactNormalOnB = colObj0->getWorldTransform().getBasis().transpose() * cp.m_normalWorldOnB;
+ btVector3 clampedLocalNormal;
+ bool isClamped = btClampNormal(edge,swapFactor*tri_normal,localContactNormalOnB, info->m_edgeV1V2Angle,clampedLocalNormal);
+ if (isClamped)
+ {
+ if (((normalAdjustFlags & BT_TRIANGLE_CONVEX_DOUBLE_SIDED)!=0) || (clampedLocalNormal.dot(frontFacing*tri_normal)>0))
+ {
+ btVector3 newNormal = colObj0->getWorldTransform().getBasis() * clampedLocalNormal;
+ // cp.m_distance1 = cp.m_distance1 * newNormal.dot(cp.m_normalWorldOnB);
+ cp.m_normalWorldOnB = newNormal;
+ // Reproject collision point along normal.
+ cp.m_positionWorldOnB = cp.m_positionWorldOnA - cp.m_normalWorldOnB * cp.m_distance1;
+ cp.m_localPointB = colObj0->getWorldTransform().invXform(cp.m_positionWorldOnB);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ btNearestPointInLineSegment(contact,v2,v0,nearest);
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*nearest,tr*cp.m_localPointB,blue);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr * v2 + upfix, tr * v0 + upfix , blue );
+#endif
+
+ if (btFabs(info->m_edgeV2V0Angle)< triangleInfoMapPtr->m_maxEdgeAngleThreshold)
+ {
+
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*contact,tr*(contact+cp.m_normalWorldOnB*10),black);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+ btScalar len = (contact-nearest).length();
+ if(len<triangleInfoMapPtr->m_edgeDistanceThreshold)
+ if( bestedge==2 )
+ {
+ isNearEdge = true;
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*nearest,tr*(nearest+tri_normal*10),white);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+ btVector3 edge(v2-v0);
+
+ if (info->m_edgeV2V0Angle==btScalar(0))
+ {
+ numConcaveEdgeHits++;
+ } else
+ {
+
+ bool isEdgeConvex = (info->m_flags & TRI_INFO_V2V0_CONVEX)!=0;
+ btScalar swapFactor = isEdgeConvex ? btScalar(1) : btScalar(-1);
+ #ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+ btDebugDrawLine(tr*nearest,tr*(nearest+swapFactor*tri_normal*10),white);
+ #endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+ btVector3 nA = swapFactor * tri_normal;
+ btQuaternion orn(edge,info->m_edgeV2V0Angle);
+ btVector3 computedNormalB = quatRotate(orn,tri_normal);
+ if (info->m_flags & TRI_INFO_V2V0_SWAP_NORMALB)
+ computedNormalB*=-1;
+ btVector3 nB = swapFactor*computedNormalB;
+
+#ifdef DEBUG_INTERNAL_EDGE
+ {
+ btDebugDrawLine(cp.getPositionWorldOnB(),cp.getPositionWorldOnB()+tr.getBasis()*(nB*20),red);
+ }
+#endif //DEBUG_INTERNAL_EDGE
+
+ btScalar NdotA = localContactNormalOnB.dot(nA);
+ btScalar NdotB = localContactNormalOnB.dot(nB);
+ bool backFacingNormal = (NdotA< triangleInfoMapPtr->m_convexEpsilon) && (NdotB<triangleInfoMapPtr->m_convexEpsilon);
+
+ if (backFacingNormal)
+ {
+ numConcaveEdgeHits++;
+ }
+ else
+ {
+ numConvexEdgeHits++;
+ // printf("hitting convex edge\n");
+
+
+ btVector3 localContactNormalOnB = colObj0->getWorldTransform().getBasis().transpose() * cp.m_normalWorldOnB;
+ btVector3 clampedLocalNormal;
+ bool isClamped = btClampNormal(edge,swapFactor*tri_normal,localContactNormalOnB,info->m_edgeV2V0Angle,clampedLocalNormal);
+ if (isClamped)
+ {
+ if (((normalAdjustFlags & BT_TRIANGLE_CONVEX_DOUBLE_SIDED)!=0) || (clampedLocalNormal.dot(frontFacing*tri_normal)>0))
+ {
+ btVector3 newNormal = colObj0->getWorldTransform().getBasis() * clampedLocalNormal;
+ // cp.m_distance1 = cp.m_distance1 * newNormal.dot(cp.m_normalWorldOnB);
+ cp.m_normalWorldOnB = newNormal;
+ // Reproject collision point along normal.
+ cp.m_positionWorldOnB = cp.m_positionWorldOnA - cp.m_normalWorldOnB * cp.m_distance1;
+ cp.m_localPointB = colObj0->getWorldTransform().invXform(cp.m_positionWorldOnB);
+ }
+ }
+ }
+ }
+
+
+ }
+ }
+
+#ifdef DEBUG_INTERNAL_EDGE
+ {
+ btVector3 color(0,1,1);
+ btDebugDrawLine(cp.getPositionWorldOnB(),cp.getPositionWorldOnB()+cp.m_normalWorldOnB*10,color);
+ }
+#endif //DEBUG_INTERNAL_EDGE
+
+ if (isNearEdge)
+ {
+
+ if (numConcaveEdgeHits>0)
+ {
+ if ((normalAdjustFlags & BT_TRIANGLE_CONCAVE_DOUBLE_SIDED)!=0)
+ {
+ //fix tri_normal so it pointing the same direction as the current local contact normal
+ if (tri_normal.dot(localContactNormalOnB) < 0)
+ {
+ tri_normal *= -1;
+ }
+ cp.m_normalWorldOnB = colObj0->getWorldTransform().getBasis()*tri_normal;
+ } else
+ {
+ btVector3 newNormal = tri_normal *frontFacing;
+ //if the tri_normal is pointing opposite direction as the current local contact normal, skip it
+ btScalar d = newNormal.dot(localContactNormalOnB) ;
+ if (d< 0)
+ {
+ return;
+ }
+ //modify the normal to be the triangle normal (or backfacing normal)
+ cp.m_normalWorldOnB = colObj0->getWorldTransform().getBasis() *newNormal;
+ }
+
+ // Reproject collision point along normal.
+ cp.m_positionWorldOnB = cp.m_positionWorldOnA - cp.m_normalWorldOnB * cp.m_distance1;
+ cp.m_localPointB = colObj0->getWorldTransform().invXform(cp.m_positionWorldOnB);
+ }
+ }
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h
new file mode 100644
index 00000000..9efb0122
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btInternalEdgeUtility.h
@@ -0,0 +1,46 @@
+
+#ifndef BT_INTERNAL_EDGE_UTILITY_H
+#define BT_INTERNAL_EDGE_UTILITY_H
+
+#include "LinearMath/btHashMap.h"
+#include "LinearMath/btVector3.h"
+
+#include "BulletCollision/CollisionShapes/btTriangleInfoMap.h"
+
+///The btInternalEdgeUtility helps to avoid or reduce artifacts due to wrong collision normals caused by internal edges.
+///See also http://code.google.com/p/bullet/issues/detail?id=27
+
+class btBvhTriangleMeshShape;
+class btCollisionObject;
+class btManifoldPoint;
+class btIDebugDraw;
+
+
+
+enum btInternalEdgeAdjustFlags
+{
+ BT_TRIANGLE_CONVEX_BACKFACE_MODE = 1,
+ BT_TRIANGLE_CONCAVE_DOUBLE_SIDED = 2, //double sided options are experimental, single sided is recommended
+ BT_TRIANGLE_CONVEX_DOUBLE_SIDED = 4
+};
+
+
+///Call btGenerateInternalEdgeInfo to create triangle info, store in the shape 'userInfo'
+void btGenerateInternalEdgeInfo (btBvhTriangleMeshShape*trimeshShape, btTriangleInfoMap* triangleInfoMap);
+
+
+///Call the btFixMeshNormal to adjust the collision normal, using the triangle info map (generated using btGenerateInternalEdgeInfo)
+///If this info map is missing, or the triangle is not store in this map, nothing will be done
+void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject* trimeshColObj0,const btCollisionObject* otherColObj1, int partId0, int index0, int normalAdjustFlags = 0);
+
+///Enable the BT_INTERNAL_EDGE_DEBUG_DRAW define and call btSetDebugDrawer, to get visual info to see if the internal edge utility works properly.
+///If the utility doesn't work properly, you might have to adjust the threshold values in btTriangleInfoMap
+//#define BT_INTERNAL_EDGE_DEBUG_DRAW
+
+#ifdef BT_INTERNAL_EDGE_DEBUG_DRAW
+void btSetDebugDrawer(btIDebugDraw* debugDrawer);
+#endif //BT_INTERNAL_EDGE_DEBUG_DRAW
+
+
+#endif //BT_INTERNAL_EDGE_UTILITY_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp
new file mode 100644
index 00000000..fd684c05
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.cpp
@@ -0,0 +1,135 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btManifoldResult.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+
+///This is to allow MaterialCombiner/Custom Friction/Restitution values
+ContactAddedCallback gContactAddedCallback=0;
+
+///User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback;
+inline btScalar calculateCombinedFriction(const btCollisionObject* body0,const btCollisionObject* body1)
+{
+ btScalar friction = body0->getFriction() * body1->getFriction();
+
+ const btScalar MAX_FRICTION = btScalar(10.);
+ if (friction < -MAX_FRICTION)
+ friction = -MAX_FRICTION;
+ if (friction > MAX_FRICTION)
+ friction = MAX_FRICTION;
+ return friction;
+
+}
+
+inline btScalar calculateCombinedRestitution(const btCollisionObject* body0,const btCollisionObject* body1)
+{
+ return body0->getRestitution() * body1->getRestitution();
+}
+
+
+
+btManifoldResult::btManifoldResult(btCollisionObject* body0,btCollisionObject* body1)
+ :m_manifoldPtr(0),
+ m_body0(body0),
+ m_body1(body1)
+#ifdef DEBUG_PART_INDEX
+ ,m_partId0(-1),
+ m_partId1(-1),
+ m_index0(-1),
+ m_index1(-1)
+#endif //DEBUG_PART_INDEX
+{
+ m_rootTransA = body0->getWorldTransform();
+ m_rootTransB = body1->getWorldTransform();
+}
+
+
+void btManifoldResult::addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+{
+ btAssert(m_manifoldPtr);
+ //order in manifold needs to match
+
+// if (depth > m_manifoldPtr->getContactBreakingThreshold())
+ if (depth > m_manifoldPtr->getContactProcessingThreshold())
+ return;
+
+ bool isSwapped = m_manifoldPtr->getBody0() != m_body0;
+
+ btVector3 pointA = pointInWorld + normalOnBInWorld * depth;
+
+ btVector3 localA;
+ btVector3 localB;
+
+ if (isSwapped)
+ {
+ localA = m_rootTransB.invXform(pointA );
+ localB = m_rootTransA.invXform(pointInWorld);
+ } else
+ {
+ localA = m_rootTransA.invXform(pointA );
+ localB = m_rootTransB.invXform(pointInWorld);
+ }
+
+ btManifoldPoint newPt(localA,localB,normalOnBInWorld,depth);
+ newPt.m_positionWorldOnA = pointA;
+ newPt.m_positionWorldOnB = pointInWorld;
+
+ int insertIndex = m_manifoldPtr->getCacheEntry(newPt);
+
+ newPt.m_combinedFriction = calculateCombinedFriction(m_body0,m_body1);
+ newPt.m_combinedRestitution = calculateCombinedRestitution(m_body0,m_body1);
+
+ //BP mod, store contact triangles.
+ if (isSwapped)
+ {
+ newPt.m_partId0 = m_partId1;
+ newPt.m_partId1 = m_partId0;
+ newPt.m_index0 = m_index1;
+ newPt.m_index1 = m_index0;
+ } else
+ {
+ newPt.m_partId0 = m_partId0;
+ newPt.m_partId1 = m_partId1;
+ newPt.m_index0 = m_index0;
+ newPt.m_index1 = m_index1;
+ }
+ //printf("depth=%f\n",depth);
+ ///@todo, check this for any side effects
+ if (insertIndex >= 0)
+ {
+ //const btManifoldPoint& oldPoint = m_manifoldPtr->getContactPoint(insertIndex);
+ m_manifoldPtr->replaceContactPoint(newPt,insertIndex);
+ } else
+ {
+ insertIndex = m_manifoldPtr->addManifoldPoint(newPt);
+ }
+
+ //User can override friction and/or restitution
+ if (gContactAddedCallback &&
+ //and if either of the two bodies requires custom material
+ ((m_body0->getCollisionFlags() & btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK) ||
+ (m_body1->getCollisionFlags() & btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK)))
+ {
+ //experimental feature info, for per-triangle material etc.
+ btCollisionObject* obj0 = isSwapped? m_body1 : m_body0;
+ btCollisionObject* obj1 = isSwapped? m_body0 : m_body1;
+ (*gContactAddedCallback)(m_manifoldPtr->getContactPoint(insertIndex),obj0,newPt.m_partId0,newPt.m_index0,obj1,newPt.m_partId1,newPt.m_index1);
+ }
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.h
new file mode 100644
index 00000000..18199b49
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btManifoldResult.h
@@ -0,0 +1,128 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_MANIFOLD_RESULT_H
+#define BT_MANIFOLD_RESULT_H
+
+class btCollisionObject;
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+class btManifoldPoint;
+
+#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
+
+#include "LinearMath/btTransform.h"
+
+typedef bool (*ContactAddedCallback)(btManifoldPoint& cp, const btCollisionObject* colObj0,int partId0,int index0,const btCollisionObject* colObj1,int partId1,int index1);
+extern ContactAddedCallback gContactAddedCallback;
+
+//#define DEBUG_PART_INDEX 1
+
+
+///btManifoldResult is a helper class to manage contact results.
+class btManifoldResult : public btDiscreteCollisionDetectorInterface::Result
+{
+protected:
+
+ btPersistentManifold* m_manifoldPtr;
+
+ //we need this for compounds
+ btTransform m_rootTransA;
+ btTransform m_rootTransB;
+
+ btCollisionObject* m_body0;
+ btCollisionObject* m_body1;
+ int m_partId0;
+ int m_partId1;
+ int m_index0;
+ int m_index1;
+
+
+public:
+
+ btManifoldResult()
+#ifdef DEBUG_PART_INDEX
+ :
+ m_partId0(-1),
+ m_partId1(-1),
+ m_index0(-1),
+ m_index1(-1)
+#endif //DEBUG_PART_INDEX
+ {
+ }
+
+ btManifoldResult(btCollisionObject* body0,btCollisionObject* body1);
+
+ virtual ~btManifoldResult() {};
+
+ void setPersistentManifold(btPersistentManifold* manifoldPtr)
+ {
+ m_manifoldPtr = manifoldPtr;
+ }
+
+ const btPersistentManifold* getPersistentManifold() const
+ {
+ return m_manifoldPtr;
+ }
+ btPersistentManifold* getPersistentManifold()
+ {
+ return m_manifoldPtr;
+ }
+
+ virtual void setShapeIdentifiersA(int partId0,int index0)
+ {
+ m_partId0=partId0;
+ m_index0=index0;
+ }
+
+ virtual void setShapeIdentifiersB( int partId1,int index1)
+ {
+ m_partId1=partId1;
+ m_index1=index1;
+ }
+
+
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth);
+
+ SIMD_FORCE_INLINE void refreshContactPoints()
+ {
+ btAssert(m_manifoldPtr);
+ if (!m_manifoldPtr->getNumContacts())
+ return;
+
+ bool isSwapped = m_manifoldPtr->getBody0() != m_body0;
+
+ if (isSwapped)
+ {
+ m_manifoldPtr->refreshContactPoints(m_rootTransB,m_rootTransA);
+ } else
+ {
+ m_manifoldPtr->refreshContactPoints(m_rootTransA,m_rootTransB);
+ }
+ }
+
+ const btCollisionObject* getBody0Internal() const
+ {
+ return m_body0;
+ }
+
+ const btCollisionObject* getBody1Internal() const
+ {
+ return m_body1;
+ }
+
+};
+
+#endif //BT_MANIFOLD_RESULT_H
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp
new file mode 100644
index 00000000..bb2a7f23
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp
@@ -0,0 +1,443 @@
+
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "LinearMath/btScalar.h"
+#include "btSimulationIslandManager.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
+
+//#include <stdio.h>
+#include "LinearMath/btQuickprof.h"
+
+btSimulationIslandManager::btSimulationIslandManager():
+m_splitIslands(true)
+{
+}
+
+btSimulationIslandManager::~btSimulationIslandManager()
+{
+}
+
+
+void btSimulationIslandManager::initUnionFind(int n)
+{
+ m_unionFind.reset(n);
+}
+
+
+void btSimulationIslandManager::findUnions(btDispatcher* /* dispatcher */,btCollisionWorld* colWorld)
+{
+
+ {
+ btOverlappingPairCache* pairCachePtr = colWorld->getPairCache();
+ const int numOverlappingPairs = pairCachePtr->getNumOverlappingPairs();
+ btBroadphasePair* pairPtr = pairCachePtr->getOverlappingPairArrayPtr();
+
+ for (int i=0;i<numOverlappingPairs;i++)
+ {
+ const btBroadphasePair& collisionPair = pairPtr[i];
+ btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject;
+ btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject;
+
+ if (((colObj0) && ((colObj0)->mergesSimulationIslands())) &&
+ ((colObj1) && ((colObj1)->mergesSimulationIslands())))
+ {
+
+ m_unionFind.unite((colObj0)->getIslandTag(),
+ (colObj1)->getIslandTag());
+ }
+ }
+ }
+}
+
+#ifdef STATIC_SIMULATION_ISLAND_OPTIMIZATION
+void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher)
+{
+
+ // put the index into m_controllers into m_tag
+ int index = 0;
+ {
+
+ int i;
+ for (i=0;i<colWorld->getCollisionObjectArray().size(); i++)
+ {
+ btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i];
+ //Adding filtering here
+ if (!collisionObject->isStaticOrKinematicObject())
+ {
+ collisionObject->setIslandTag(index++);
+ }
+ collisionObject->setCompanionId(-1);
+ collisionObject->setHitFraction(btScalar(1.));
+ }
+ }
+ // do the union find
+
+ initUnionFind( index );
+
+ findUnions(dispatcher,colWorld);
+}
+
+void btSimulationIslandManager::storeIslandActivationState(btCollisionWorld* colWorld)
+{
+ // put the islandId ('find' value) into m_tag
+ {
+ int index = 0;
+ int i;
+ for (i=0;i<colWorld->getCollisionObjectArray().size();i++)
+ {
+ btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i];
+ if (!collisionObject->isStaticOrKinematicObject())
+ {
+ collisionObject->setIslandTag( m_unionFind.find(index) );
+ //Set the correct object offset in Collision Object Array
+ m_unionFind.getElement(index).m_sz = i;
+ collisionObject->setCompanionId(-1);
+ index++;
+ } else
+ {
+ collisionObject->setIslandTag(-1);
+ collisionObject->setCompanionId(-2);
+ }
+ }
+ }
+}
+
+
+#else //STATIC_SIMULATION_ISLAND_OPTIMIZATION
+void btSimulationIslandManager::updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher)
+{
+
+ initUnionFind( int (colWorld->getCollisionObjectArray().size()));
+
+ // put the index into m_controllers into m_tag
+ {
+
+ int index = 0;
+ int i;
+ for (i=0;i<colWorld->getCollisionObjectArray().size(); i++)
+ {
+ btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i];
+ collisionObject->setIslandTag(index);
+ collisionObject->setCompanionId(-1);
+ collisionObject->setHitFraction(btScalar(1.));
+ index++;
+
+ }
+ }
+ // do the union find
+
+ findUnions(dispatcher,colWorld);
+}
+
+void btSimulationIslandManager::storeIslandActivationState(btCollisionWorld* colWorld)
+{
+ // put the islandId ('find' value) into m_tag
+ {
+
+
+ int index = 0;
+ int i;
+ for (i=0;i<colWorld->getCollisionObjectArray().size();i++)
+ {
+ btCollisionObject* collisionObject= colWorld->getCollisionObjectArray()[i];
+ if (!collisionObject->isStaticOrKinematicObject())
+ {
+ collisionObject->setIslandTag( m_unionFind.find(index) );
+ collisionObject->setCompanionId(-1);
+ } else
+ {
+ collisionObject->setIslandTag(-1);
+ collisionObject->setCompanionId(-2);
+ }
+ index++;
+ }
+ }
+}
+
+#endif //STATIC_SIMULATION_ISLAND_OPTIMIZATION
+
+inline int getIslandId(const btPersistentManifold* lhs)
+{
+ int islandId;
+ const btCollisionObject* rcolObj0 = static_cast<const btCollisionObject*>(lhs->getBody0());
+ const btCollisionObject* rcolObj1 = static_cast<const btCollisionObject*>(lhs->getBody1());
+ islandId= rcolObj0->getIslandTag()>=0?rcolObj0->getIslandTag():rcolObj1->getIslandTag();
+ return islandId;
+
+}
+
+
+
+/// function object that routes calls to operator<
+class btPersistentManifoldSortPredicate
+{
+ public:
+
+ SIMD_FORCE_INLINE bool operator() ( const btPersistentManifold* lhs, const btPersistentManifold* rhs )
+ {
+ return getIslandId(lhs) < getIslandId(rhs);
+ }
+};
+
+
+void btSimulationIslandManager::buildIslands(btDispatcher* dispatcher,btCollisionWorld* collisionWorld)
+{
+
+ BT_PROFILE("islandUnionFindAndQuickSort");
+
+ btCollisionObjectArray& collisionObjects = collisionWorld->getCollisionObjectArray();
+
+ m_islandmanifold.resize(0);
+
+ //we are going to sort the unionfind array, and store the element id in the size
+ //afterwards, we clean unionfind, to make sure no-one uses it anymore
+
+ getUnionFind().sortIslands();
+ int numElem = getUnionFind().getNumElements();
+
+ int endIslandIndex=1;
+ int startIslandIndex;
+
+
+ //update the sleeping state for bodies, if all are sleeping
+ for ( startIslandIndex=0;startIslandIndex<numElem;startIslandIndex = endIslandIndex)
+ {
+ int islandId = getUnionFind().getElement(startIslandIndex).m_id;
+ for (endIslandIndex = startIslandIndex+1;(endIslandIndex<numElem) && (getUnionFind().getElement(endIslandIndex).m_id == islandId);endIslandIndex++)
+ {
+ }
+
+ //int numSleeping = 0;
+
+ bool allSleeping = true;
+
+ int idx;
+ for (idx=startIslandIndex;idx<endIslandIndex;idx++)
+ {
+ int i = getUnionFind().getElement(idx).m_sz;
+
+ btCollisionObject* colObj0 = collisionObjects[i];
+ if ((colObj0->getIslandTag() != islandId) && (colObj0->getIslandTag() != -1))
+ {
+// printf("error in island management\n");
+ }
+
+ btAssert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1));
+ if (colObj0->getIslandTag() == islandId)
+ {
+ if (colObj0->getActivationState()== ACTIVE_TAG)
+ {
+ allSleeping = false;
+ }
+ if (colObj0->getActivationState()== DISABLE_DEACTIVATION)
+ {
+ allSleeping = false;
+ }
+ }
+ }
+
+
+ if (allSleeping)
+ {
+ int idx;
+ for (idx=startIslandIndex;idx<endIslandIndex;idx++)
+ {
+ int i = getUnionFind().getElement(idx).m_sz;
+ btCollisionObject* colObj0 = collisionObjects[i];
+ if ((colObj0->getIslandTag() != islandId) && (colObj0->getIslandTag() != -1))
+ {
+// printf("error in island management\n");
+ }
+
+ btAssert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1));
+
+ if (colObj0->getIslandTag() == islandId)
+ {
+ colObj0->setActivationState( ISLAND_SLEEPING );
+ }
+ }
+ } else
+ {
+
+ int idx;
+ for (idx=startIslandIndex;idx<endIslandIndex;idx++)
+ {
+ int i = getUnionFind().getElement(idx).m_sz;
+
+ btCollisionObject* colObj0 = collisionObjects[i];
+ if ((colObj0->getIslandTag() != islandId) && (colObj0->getIslandTag() != -1))
+ {
+// printf("error in island management\n");
+ }
+
+ btAssert((colObj0->getIslandTag() == islandId) || (colObj0->getIslandTag() == -1));
+
+ if (colObj0->getIslandTag() == islandId)
+ {
+ if ( colObj0->getActivationState() == ISLAND_SLEEPING)
+ {
+ colObj0->setActivationState( WANTS_DEACTIVATION);
+ colObj0->setDeactivationTime(0.f);
+ }
+ }
+ }
+ }
+ }
+
+
+ int i;
+ int maxNumManifolds = dispatcher->getNumManifolds();
+
+//#define SPLIT_ISLANDS 1
+//#ifdef SPLIT_ISLANDS
+
+
+//#endif //SPLIT_ISLANDS
+
+
+ for (i=0;i<maxNumManifolds ;i++)
+ {
+ btPersistentManifold* manifold = dispatcher->getManifoldByIndexInternal(i);
+
+ btCollisionObject* colObj0 = static_cast<btCollisionObject*>(manifold->getBody0());
+ btCollisionObject* colObj1 = static_cast<btCollisionObject*>(manifold->getBody1());
+
+ ///@todo: check sleeping conditions!
+ if (((colObj0) && colObj0->getActivationState() != ISLAND_SLEEPING) ||
+ ((colObj1) && colObj1->getActivationState() != ISLAND_SLEEPING))
+ {
+
+ //kinematic objects don't merge islands, but wake up all connected objects
+ if (colObj0->isKinematicObject() && colObj0->getActivationState() != ISLAND_SLEEPING)
+ {
+ colObj1->activate();
+ }
+ if (colObj1->isKinematicObject() && colObj1->getActivationState() != ISLAND_SLEEPING)
+ {
+ colObj0->activate();
+ }
+ if(m_splitIslands)
+ {
+ //filtering for response
+ if (dispatcher->needsResponse(colObj0,colObj1))
+ m_islandmanifold.push_back(manifold);
+ }
+ }
+ }
+}
+
+
+
+///@todo: this is random access, it can be walked 'cache friendly'!
+void btSimulationIslandManager::buildAndProcessIslands(btDispatcher* dispatcher,btCollisionWorld* collisionWorld, IslandCallback* callback)
+{
+ btCollisionObjectArray& collisionObjects = collisionWorld->getCollisionObjectArray();
+
+ buildIslands(dispatcher,collisionWorld);
+
+ int endIslandIndex=1;
+ int startIslandIndex;
+ int numElem = getUnionFind().getNumElements();
+
+ BT_PROFILE("processIslands");
+
+ if(!m_splitIslands)
+ {
+ btPersistentManifold** manifold = dispatcher->getInternalManifoldPointer();
+ int maxNumManifolds = dispatcher->getNumManifolds();
+ callback->ProcessIsland(&collisionObjects[0],collisionObjects.size(),manifold,maxNumManifolds, -1);
+ }
+ else
+ {
+ // Sort manifolds, based on islands
+ // Sort the vector using predicate and std::sort
+ //std::sort(islandmanifold.begin(), islandmanifold.end(), btPersistentManifoldSortPredicate);
+
+ int numManifolds = int (m_islandmanifold.size());
+
+ //we should do radix sort, it it much faster (O(n) instead of O (n log2(n))
+ m_islandmanifold.quickSort(btPersistentManifoldSortPredicate());
+
+ //now process all active islands (sets of manifolds for now)
+
+ int startManifoldIndex = 0;
+ int endManifoldIndex = 1;
+
+ //int islandId;
+
+
+
+ // printf("Start Islands\n");
+
+ //traverse the simulation islands, and call the solver, unless all objects are sleeping/deactivated
+ for ( startIslandIndex=0;startIslandIndex<numElem;startIslandIndex = endIslandIndex)
+ {
+ int islandId = getUnionFind().getElement(startIslandIndex).m_id;
+
+
+ bool islandSleeping = true;
+
+ for (endIslandIndex = startIslandIndex;(endIslandIndex<numElem) && (getUnionFind().getElement(endIslandIndex).m_id == islandId);endIslandIndex++)
+ {
+ int i = getUnionFind().getElement(endIslandIndex).m_sz;
+ btCollisionObject* colObj0 = collisionObjects[i];
+ m_islandBodies.push_back(colObj0);
+ if (colObj0->isActive())
+ islandSleeping = false;
+ }
+
+
+ //find the accompanying contact manifold for this islandId
+ int numIslandManifolds = 0;
+ btPersistentManifold** startManifold = 0;
+
+ if (startManifoldIndex<numManifolds)
+ {
+ int curIslandId = getIslandId(m_islandmanifold[startManifoldIndex]);
+ if (curIslandId == islandId)
+ {
+ startManifold = &m_islandmanifold[startManifoldIndex];
+
+ for (endManifoldIndex = startManifoldIndex+1;(endManifoldIndex<numManifolds) && (islandId == getIslandId(m_islandmanifold[endManifoldIndex]));endManifoldIndex++)
+ {
+
+ }
+ /// Process the actual simulation, only if not sleeping/deactivated
+ numIslandManifolds = endManifoldIndex-startManifoldIndex;
+ }
+
+ }
+
+ if (!islandSleeping)
+ {
+ callback->ProcessIsland(&m_islandBodies[0],m_islandBodies.size(),startManifold,numIslandManifolds, islandId);
+ // printf("Island callback of size:%d bodies, %d manifolds\n",islandBodies.size(),numIslandManifolds);
+ }
+
+ if (numIslandManifolds)
+ {
+ startManifoldIndex = endManifoldIndex;
+ }
+
+ m_islandBodies.resize(0);
+ }
+ } // else if(!splitIslands)
+
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h
new file mode 100644
index 00000000..84b0c6a4
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSimulationIslandManager.h
@@ -0,0 +1,81 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SIMULATION_ISLAND_MANAGER_H
+#define BT_SIMULATION_ISLAND_MANAGER_H
+
+#include "BulletCollision/CollisionDispatch/btUnionFind.h"
+#include "btCollisionCreateFunc.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "btCollisionObject.h"
+
+class btCollisionObject;
+class btCollisionWorld;
+class btDispatcher;
+class btPersistentManifold;
+
+
+///SimulationIslandManager creates and handles simulation islands, using btUnionFind
+class btSimulationIslandManager
+{
+ btUnionFind m_unionFind;
+
+ btAlignedObjectArray<btPersistentManifold*> m_islandmanifold;
+ btAlignedObjectArray<btCollisionObject* > m_islandBodies;
+
+ bool m_splitIslands;
+
+public:
+ btSimulationIslandManager();
+ virtual ~btSimulationIslandManager();
+
+
+ void initUnionFind(int n);
+
+
+ btUnionFind& getUnionFind() { return m_unionFind;}
+
+ virtual void updateActivationState(btCollisionWorld* colWorld,btDispatcher* dispatcher);
+ virtual void storeIslandActivationState(btCollisionWorld* world);
+
+
+ void findUnions(btDispatcher* dispatcher,btCollisionWorld* colWorld);
+
+
+
+ struct IslandCallback
+ {
+ virtual ~IslandCallback() {};
+
+ virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,class btPersistentManifold** manifolds,int numManifolds, int islandId) = 0;
+ };
+
+ void buildAndProcessIslands(btDispatcher* dispatcher,btCollisionWorld* collisionWorld, IslandCallback* callback);
+
+ void buildIslands(btDispatcher* dispatcher,btCollisionWorld* colWorld);
+
+ bool getSplitIslands()
+ {
+ return m_splitIslands;
+ }
+ void setSplitIslands(bool doSplitIslands)
+ {
+ m_splitIslands = doSplitIslands;
+ }
+
+};
+
+#endif //BT_SIMULATION_ISLAND_MANAGER_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
new file mode 100644
index 00000000..8df87692
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
@@ -0,0 +1,260 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSphereBoxCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+//#include <stdio.h>
+
+btSphereBoxCollisionAlgorithm::btSphereBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped)
+: btActivatingCollisionAlgorithm(ci,col0,col1),
+m_ownManifold(false),
+m_manifoldPtr(mf),
+m_isSwapped(isSwapped)
+{
+ btCollisionObject* sphereObj = m_isSwapped? col1 : col0;
+ btCollisionObject* boxObj = m_isSwapped? col0 : col1;
+
+ if (!m_manifoldPtr && m_dispatcher->needsCollision(sphereObj,boxObj))
+ {
+ m_manifoldPtr = m_dispatcher->getNewManifold(sphereObj,boxObj);
+ m_ownManifold = true;
+ }
+}
+
+
+btSphereBoxCollisionAlgorithm::~btSphereBoxCollisionAlgorithm()
+{
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+}
+
+
+
+void btSphereBoxCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)dispatchInfo;
+ (void)resultOut;
+ if (!m_manifoldPtr)
+ return;
+
+ btCollisionObject* sphereObj = m_isSwapped? body1 : body0;
+ btCollisionObject* boxObj = m_isSwapped? body0 : body1;
+
+
+ btSphereShape* sphere0 = (btSphereShape*)sphereObj->getCollisionShape();
+
+ btVector3 normalOnSurfaceB;
+ btVector3 pOnBox,pOnSphere;
+ btVector3 sphereCenter = sphereObj->getWorldTransform().getOrigin();
+ btScalar radius = sphere0->getRadius();
+
+ btScalar dist = getSphereDistance(boxObj,pOnBox,pOnSphere,sphereCenter,radius);
+
+ resultOut->setPersistentManifold(m_manifoldPtr);
+
+ if (dist < SIMD_EPSILON)
+ {
+ btVector3 normalOnSurfaceB = (pOnBox- pOnSphere).normalize();
+
+ /// report a contact. internally this will be kept persistent, and contact reduction is done
+
+ resultOut->addContactPoint(normalOnSurfaceB,pOnBox,dist);
+
+ }
+
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr->getNumContacts())
+ {
+ resultOut->refreshContactPoints();
+ }
+ }
+
+}
+
+btScalar btSphereBoxCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ (void)col0;
+ (void)col1;
+
+ //not yet
+ return btScalar(1.);
+}
+
+
+btScalar btSphereBoxCollisionAlgorithm::getSphereDistance(btCollisionObject* boxObj, btVector3& pointOnBox, btVector3& v3PointOnSphere, const btVector3& sphereCenter, btScalar fRadius )
+{
+
+ btScalar margins;
+ btVector3 bounds[2];
+ btBoxShape* boxShape= (btBoxShape*)boxObj->getCollisionShape();
+
+ bounds[0] = -boxShape->getHalfExtentsWithoutMargin();
+ bounds[1] = boxShape->getHalfExtentsWithoutMargin();
+
+ margins = boxShape->getMargin();//also add sphereShape margin?
+
+ const btTransform& m44T = boxObj->getWorldTransform();
+
+ btVector3 boundsVec[2];
+ btScalar fPenetration;
+
+ boundsVec[0] = bounds[0];
+ boundsVec[1] = bounds[1];
+
+ btVector3 marginsVec( margins, margins, margins );
+
+ // add margins
+ bounds[0] += marginsVec;
+ bounds[1] -= marginsVec;
+
+ /////////////////////////////////////////////////
+
+ btVector3 tmp, prel, n[6], normal, v3P;
+ btScalar fSep = btScalar(10000000.0), fSepThis;
+
+ n[0].setValue( btScalar(-1.0), btScalar(0.0), btScalar(0.0) );
+ n[1].setValue( btScalar(0.0), btScalar(-1.0), btScalar(0.0) );
+ n[2].setValue( btScalar(0.0), btScalar(0.0), btScalar(-1.0) );
+ n[3].setValue( btScalar(1.0), btScalar(0.0), btScalar(0.0) );
+ n[4].setValue( btScalar(0.0), btScalar(1.0), btScalar(0.0) );
+ n[5].setValue( btScalar(0.0), btScalar(0.0), btScalar(1.0) );
+
+ // convert point in local space
+ prel = m44T.invXform( sphereCenter);
+
+ bool bFound = false;
+
+ v3P = prel;
+
+ for (int i=0;i<6;i++)
+ {
+ int j = i<3? 0:1;
+ if ( (fSepThis = ((v3P-bounds[j]) .dot(n[i]))) > btScalar(0.0) )
+ {
+ v3P = v3P - n[i]*fSepThis;
+ bFound = true;
+ }
+ }
+
+ //
+
+ if ( bFound )
+ {
+ bounds[0] = boundsVec[0];
+ bounds[1] = boundsVec[1];
+
+ normal = (prel - v3P).normalize();
+ pointOnBox = v3P + normal*margins;
+ v3PointOnSphere = prel - normal*fRadius;
+
+ if ( ((v3PointOnSphere - pointOnBox) .dot (normal)) > btScalar(0.0) )
+ {
+ return btScalar(1.0);
+ }
+
+ // transform back in world space
+ tmp = m44T( pointOnBox);
+ pointOnBox = tmp;
+ tmp = m44T( v3PointOnSphere);
+ v3PointOnSphere = tmp;
+ btScalar fSeps2 = (pointOnBox-v3PointOnSphere).length2();
+
+ //if this fails, fallback into deeper penetration case, below
+ if (fSeps2 > SIMD_EPSILON)
+ {
+ fSep = - btSqrt(fSeps2);
+ normal = (pointOnBox-v3PointOnSphere);
+ normal *= btScalar(1.)/fSep;
+ }
+
+ return fSep;
+ }
+
+ //////////////////////////////////////////////////
+ // Deep penetration case
+
+ fPenetration = getSpherePenetration( boxObj,pointOnBox, v3PointOnSphere, sphereCenter, fRadius,bounds[0],bounds[1] );
+
+ bounds[0] = boundsVec[0];
+ bounds[1] = boundsVec[1];
+
+ if ( fPenetration <= btScalar(0.0) )
+ return (fPenetration-margins);
+ else
+ return btScalar(1.0);
+}
+
+btScalar btSphereBoxCollisionAlgorithm::getSpherePenetration( btCollisionObject* boxObj,btVector3& pointOnBox, btVector3& v3PointOnSphere, const btVector3& sphereCenter, btScalar fRadius, const btVector3& aabbMin, const btVector3& aabbMax)
+{
+
+ btVector3 bounds[2];
+
+ bounds[0] = aabbMin;
+ bounds[1] = aabbMax;
+
+ btVector3 p0, tmp, prel, n[6], normal;
+ btScalar fSep = btScalar(-10000000.0), fSepThis;
+
+ // set p0 and normal to a default value to shup up GCC
+ p0.setValue(btScalar(0.), btScalar(0.), btScalar(0.));
+ normal.setValue(btScalar(0.), btScalar(0.), btScalar(0.));
+
+ n[0].setValue( btScalar(-1.0), btScalar(0.0), btScalar(0.0) );
+ n[1].setValue( btScalar(0.0), btScalar(-1.0), btScalar(0.0) );
+ n[2].setValue( btScalar(0.0), btScalar(0.0), btScalar(-1.0) );
+ n[3].setValue( btScalar(1.0), btScalar(0.0), btScalar(0.0) );
+ n[4].setValue( btScalar(0.0), btScalar(1.0), btScalar(0.0) );
+ n[5].setValue( btScalar(0.0), btScalar(0.0), btScalar(1.0) );
+
+ const btTransform& m44T = boxObj->getWorldTransform();
+
+ // convert point in local space
+ prel = m44T.invXform( sphereCenter);
+
+ ///////////
+
+ for (int i=0;i<6;i++)
+ {
+ int j = i<3 ? 0:1;
+ if ( (fSepThis = ((prel-bounds[j]) .dot( n[i]))-fRadius) > btScalar(0.0) ) return btScalar(1.0);
+ if ( fSepThis > fSep )
+ {
+ p0 = bounds[j]; normal = (btVector3&)n[i];
+ fSep = fSepThis;
+ }
+ }
+
+ pointOnBox = prel - normal*(normal.dot((prel-p0)));
+ v3PointOnSphere = pointOnBox + normal*fSep;
+
+ // transform back in world space
+ tmp = m44T( pointOnBox);
+ pointOnBox = tmp;
+ tmp = m44T( v3PointOnSphere); v3PointOnSphere = tmp;
+ normal = (pointOnBox-v3PointOnSphere).normalize();
+
+ return fSep;
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h
new file mode 100644
index 00000000..60286ae0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h
@@ -0,0 +1,75 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPHERE_BOX_COLLISION_ALGORITHM_H
+#define BT_SPHERE_BOX_COLLISION_ALGORITHM_H
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+class btPersistentManifold;
+#include "btCollisionDispatcher.h"
+
+#include "LinearMath/btVector3.h"
+
+/// btSphereBoxCollisionAlgorithm provides sphere-box collision detection.
+/// Other features are frame-coherency (persistent data) and collision response.
+class btSphereBoxCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+ bool m_isSwapped;
+
+public:
+
+ btSphereBoxCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped);
+
+ virtual ~btSphereBoxCollisionAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr && m_ownManifold)
+ {
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+ }
+
+ btScalar getSphereDistance( btCollisionObject* boxObj,btVector3& v3PointOnBox, btVector3& v3PointOnSphere, const btVector3& v3SphereCenter, btScalar fRadius );
+
+ btScalar getSpherePenetration( btCollisionObject* boxObj, btVector3& v3PointOnBox, btVector3& v3PointOnSphere, const btVector3& v3SphereCenter, btScalar fRadius, const btVector3& aabbMin, const btVector3& aabbMax);
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereBoxCollisionAlgorithm));
+ if (!m_swapped)
+ {
+ return new(mem) btSphereBoxCollisionAlgorithm(0,ci,body0,body1,false);
+ } else
+ {
+ return new(mem) btSphereBoxCollisionAlgorithm(0,ci,body0,body1,true);
+ }
+ }
+ };
+
+};
+
+#endif //BT_SPHERE_BOX_COLLISION_ALGORITHM_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
new file mode 100644
index 00000000..5c4e78fe
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
@@ -0,0 +1,105 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSphereSphereCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1)
+: btActivatingCollisionAlgorithm(ci,col0,col1),
+m_ownManifold(false),
+m_manifoldPtr(mf)
+{
+ if (!m_manifoldPtr)
+ {
+ m_manifoldPtr = m_dispatcher->getNewManifold(col0,col1);
+ m_ownManifold = true;
+ }
+}
+
+btSphereSphereCollisionAlgorithm::~btSphereSphereCollisionAlgorithm()
+{
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+}
+
+void btSphereSphereCollisionAlgorithm::processCollision (btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)dispatchInfo;
+
+ if (!m_manifoldPtr)
+ return;
+
+ resultOut->setPersistentManifold(m_manifoldPtr);
+
+ btSphereShape* sphere0 = (btSphereShape*)col0->getCollisionShape();
+ btSphereShape* sphere1 = (btSphereShape*)col1->getCollisionShape();
+
+ btVector3 diff = col0->getWorldTransform().getOrigin()- col1->getWorldTransform().getOrigin();
+ btScalar len = diff.length();
+ btScalar radius0 = sphere0->getRadius();
+ btScalar radius1 = sphere1->getRadius();
+
+#ifdef CLEAR_MANIFOLD
+ m_manifoldPtr->clearManifold(); //don't do this, it disables warmstarting
+#endif
+
+ ///iff distance positive, don't generate a new contact
+ if ( len > (radius0+radius1))
+ {
+#ifndef CLEAR_MANIFOLD
+ resultOut->refreshContactPoints();
+#endif //CLEAR_MANIFOLD
+ return;
+ }
+ ///distance (negative means penetration)
+ btScalar dist = len - (radius0+radius1);
+
+ btVector3 normalOnSurfaceB(1,0,0);
+ if (len > SIMD_EPSILON)
+ {
+ normalOnSurfaceB = diff / len;
+ }
+
+ ///point on A (worldspace)
+ ///btVector3 pos0 = col0->getWorldTransform().getOrigin() - radius0 * normalOnSurfaceB;
+ ///point on B (worldspace)
+ btVector3 pos1 = col1->getWorldTransform().getOrigin() + radius1* normalOnSurfaceB;
+
+ /// report a contact. internally this will be kept persistent, and contact reduction is done
+
+
+ resultOut->addContactPoint(normalOnSurfaceB,pos1,dist);
+
+#ifndef CLEAR_MANIFOLD
+ resultOut->refreshContactPoints();
+#endif //CLEAR_MANIFOLD
+
+}
+
+btScalar btSphereSphereCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)col0;
+ (void)col1;
+ (void)dispatchInfo;
+ (void)resultOut;
+
+ //not yet
+ return btScalar(1.);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h
new file mode 100644
index 00000000..e55acf27
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h
@@ -0,0 +1,66 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
+#define BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+#include "btCollisionDispatcher.h"
+
+class btPersistentManifold;
+
+/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection.
+/// Other features are frame-coherency (persistent data) and collision response.
+/// Also provides the most basic sample for custom/user btCollisionAlgorithm
+class btSphereSphereCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+
+public:
+ btSphereSphereCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1);
+
+ btSphereSphereCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
+ : btActivatingCollisionAlgorithm(ci) {}
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr && m_ownManifold)
+ {
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+ }
+
+ virtual ~btSphereSphereCollisionAlgorithm();
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereSphereCollisionAlgorithm));
+ return new(mem) btSphereSphereCollisionAlgorithm(0,ci,body0,body1);
+ }
+ };
+
+};
+
+#endif //BT_SPHERE_SPHERE_COLLISION_ALGORITHM_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
new file mode 100644
index 00000000..c327c3ff
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
@@ -0,0 +1,84 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btSphereTriangleCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "SphereTriangleDetector.h"
+
+
+btSphereTriangleCollisionAlgorithm::btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1,bool swapped)
+: btActivatingCollisionAlgorithm(ci,col0,col1),
+m_ownManifold(false),
+m_manifoldPtr(mf),
+m_swapped(swapped)
+{
+ if (!m_manifoldPtr)
+ {
+ m_manifoldPtr = m_dispatcher->getNewManifold(col0,col1);
+ m_ownManifold = true;
+ }
+}
+
+btSphereTriangleCollisionAlgorithm::~btSphereTriangleCollisionAlgorithm()
+{
+ if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+}
+
+void btSphereTriangleCollisionAlgorithm::processCollision (btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ if (!m_manifoldPtr)
+ return;
+
+ btCollisionObject* sphereObj = m_swapped? col1 : col0;
+ btCollisionObject* triObj = m_swapped? col0 : col1;
+
+ btSphereShape* sphere = (btSphereShape*)sphereObj->getCollisionShape();
+ btTriangleShape* triangle = (btTriangleShape*)triObj->getCollisionShape();
+
+ /// report a contact. internally this will be kept persistent, and contact reduction is done
+ resultOut->setPersistentManifold(m_manifoldPtr);
+ SphereTriangleDetector detector(sphere,triangle, m_manifoldPtr->getContactBreakingThreshold());
+
+ btDiscreteCollisionDetectorInterface::ClosestPointInput input;
+ input.m_maximumDistanceSquared = btScalar(BT_LARGE_FLOAT);///@todo: tighter bounds
+ input.m_transformA = sphereObj->getWorldTransform();
+ input.m_transformB = triObj->getWorldTransform();
+
+ bool swapResults = m_swapped;
+
+ detector.getClosestPoints(input,*resultOut,dispatchInfo.m_debugDraw,swapResults);
+
+ if (m_ownManifold)
+ resultOut->refreshContactPoints();
+
+}
+
+btScalar btSphereTriangleCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ (void)col0;
+ (void)col1;
+
+ //not yet
+ return btScalar(1.);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
new file mode 100644
index 00000000..7c6c4d8f
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h
@@ -0,0 +1,69 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
+#define BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
+
+#include "btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+class btPersistentManifold;
+#include "btCollisionDispatcher.h"
+
+/// btSphereSphereCollisionAlgorithm provides sphere-sphere collision detection.
+/// Other features are frame-coherency (persistent data) and collision response.
+/// Also provides the most basic sample for custom/user btCollisionAlgorithm
+class btSphereTriangleCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+ bool m_swapped;
+
+public:
+ btSphereTriangleCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool swapped);
+
+ btSphereTriangleCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
+ : btActivatingCollisionAlgorithm(ci) {}
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr && m_ownManifold)
+ {
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+ }
+
+ virtual ~btSphereTriangleCollisionAlgorithm();
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSphereTriangleCollisionAlgorithm));
+
+ return new(mem) btSphereTriangleCollisionAlgorithm(ci.m_manifold,ci,body0,body1,m_swapped);
+ }
+ };
+
+};
+
+#endif //BT_SPHERE_TRIANGLE_COLLISION_ALGORITHM_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.cpp b/tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.cpp
new file mode 100644
index 00000000..4c4f58d4
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.cpp
@@ -0,0 +1,82 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btUnionFind.h"
+
+
+
+btUnionFind::~btUnionFind()
+{
+ Free();
+
+}
+
+btUnionFind::btUnionFind()
+{
+
+}
+
+void btUnionFind::allocate(int N)
+{
+ m_elements.resize(N);
+}
+void btUnionFind::Free()
+{
+ m_elements.clear();
+}
+
+
+void btUnionFind::reset(int N)
+{
+ allocate(N);
+
+ for (int i = 0; i < N; i++)
+ {
+ m_elements[i].m_id = i; m_elements[i].m_sz = 1;
+ }
+}
+
+
+class btUnionFindElementSortPredicate
+{
+ public:
+
+ bool operator() ( const btElement& lhs, const btElement& rhs )
+ {
+ return lhs.m_id < rhs.m_id;
+ }
+};
+
+///this is a special operation, destroying the content of btUnionFind.
+///it sorts the elements, based on island id, in order to make it easy to iterate over islands
+void btUnionFind::sortIslands()
+{
+
+ //first store the original body index, and islandId
+ int numElements = m_elements.size();
+
+ for (int i=0;i<numElements;i++)
+ {
+ m_elements[i].m_id = find(i);
+#ifndef STATIC_SIMULATION_ISLAND_OPTIMIZATION
+ m_elements[i].m_sz = i;
+#endif //STATIC_SIMULATION_ISLAND_OPTIMIZATION
+ }
+
+ // Sort the vector using predicate and std::sort
+ //std::sort(m_elements.begin(), m_elements.end(), btUnionFindElementSortPredicate);
+ m_elements.quickSort(btUnionFindElementSortPredicate());
+
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.h b/tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.h
new file mode 100644
index 00000000..ef2a2920
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionDispatch/btUnionFind.h
@@ -0,0 +1,129 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_UNION_FIND_H
+#define BT_UNION_FIND_H
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+#define USE_PATH_COMPRESSION 1
+
+///see for discussion of static island optimizations by Vroonsh here: http://code.google.com/p/bullet/issues/detail?id=406
+#define STATIC_SIMULATION_ISLAND_OPTIMIZATION 1
+
+struct btElement
+{
+ int m_id;
+ int m_sz;
+};
+
+///UnionFind calculates connected subsets
+// Implements weighted Quick Union with path compression
+// optimization: could use short ints instead of ints (halving memory, would limit the number of rigid bodies to 64k, sounds reasonable)
+class btUnionFind
+ {
+ private:
+ btAlignedObjectArray<btElement> m_elements;
+
+ public:
+
+ btUnionFind();
+ ~btUnionFind();
+
+
+ //this is a special operation, destroying the content of btUnionFind.
+ //it sorts the elements, based on island id, in order to make it easy to iterate over islands
+ void sortIslands();
+
+ void reset(int N);
+
+ SIMD_FORCE_INLINE int getNumElements() const
+ {
+ return int(m_elements.size());
+ }
+ SIMD_FORCE_INLINE bool isRoot(int x) const
+ {
+ return (x == m_elements[x].m_id);
+ }
+
+ btElement& getElement(int index)
+ {
+ return m_elements[index];
+ }
+ const btElement& getElement(int index) const
+ {
+ return m_elements[index];
+ }
+
+ void allocate(int N);
+ void Free();
+
+
+
+
+ int find(int p, int q)
+ {
+ return (find(p) == find(q));
+ }
+
+ void unite(int p, int q)
+ {
+ int i = find(p), j = find(q);
+ if (i == j)
+ return;
+
+#ifndef USE_PATH_COMPRESSION
+ //weighted quick union, this keeps the 'trees' balanced, and keeps performance of unite O( log(n) )
+ if (m_elements[i].m_sz < m_elements[j].m_sz)
+ {
+ m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz;
+ }
+ else
+ {
+ m_elements[j].m_id = i; m_elements[i].m_sz += m_elements[j].m_sz;
+ }
+#else
+ m_elements[i].m_id = j; m_elements[j].m_sz += m_elements[i].m_sz;
+#endif //USE_PATH_COMPRESSION
+ }
+
+ int find(int x)
+ {
+ //btAssert(x < m_N);
+ //btAssert(x >= 0);
+
+ while (x != m_elements[x].m_id)
+ {
+ //not really a reason not to use path compression, and it flattens the trees/improves find performance dramatically
+
+ #ifdef USE_PATH_COMPRESSION
+ const btElement* elementPtr = &m_elements[m_elements[x].m_id];
+ m_elements[x].m_id = elementPtr->m_id;
+ x = elementPtr->m_id;
+ #else//
+ x = m_elements[x].m_id;
+ #endif
+ //btAssert(x < m_N);
+ //btAssert(x >= 0);
+
+ }
+ return x;
+ }
+
+
+ };
+
+
+#endif //BT_UNION_FIND_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.cpp
new file mode 100644
index 00000000..ecce028c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.cpp
@@ -0,0 +1,42 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btBox2dShape.h"
+
+
+//{
+
+
+void btBox2dShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ btTransformAabb(getHalfExtentsWithoutMargin(),getMargin(),t,aabbMin,aabbMax);
+}
+
+
+void btBox2dShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ //btScalar margin = btScalar(0.);
+ btVector3 halfExtents = getHalfExtentsWithMargin();
+
+ btScalar lx=btScalar(2.)*(halfExtents.x());
+ btScalar ly=btScalar(2.)*(halfExtents.y());
+ btScalar lz=btScalar(2.)*(halfExtents.z());
+
+ inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + ly*ly));
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.h
new file mode 100644
index 00000000..93e8faba
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btBox2dShape.h
@@ -0,0 +1,363 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_OBB_BOX_2D_SHAPE_H
+#define BT_OBB_BOX_2D_SHAPE_H
+
+#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMinMax.h"
+
+///The btBox2dShape is a box primitive around the origin, its sides axis aligned with length specified by half extents, in local shape coordinates. When used as part of a btCollisionObject or btRigidBody it will be an oriented box in world space.
+class btBox2dShape: public btPolyhedralConvexShape
+{
+
+ //btVector3 m_boxHalfExtents1; //use m_implicitShapeDimensions instead
+
+ btVector3 m_centroid;
+ btVector3 m_vertices[4];
+ btVector3 m_normals[4];
+
+public:
+
+ btVector3 getHalfExtentsWithMargin() const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ halfExtents += margin;
+ return halfExtents;
+ }
+
+ const btVector3& getHalfExtentsWithoutMargin() const
+ {
+ return m_implicitShapeDimensions;//changed in Bullet 2.63: assume the scaling and margin are included
+ }
+
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ halfExtents += margin;
+
+ return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()),
+ btFsels(vec.y(), halfExtents.y(), -halfExtents.y()),
+ btFsels(vec.z(), halfExtents.z(), -halfExtents.z()));
+ }
+
+ SIMD_FORCE_INLINE btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+ {
+ const btVector3& halfExtents = getHalfExtentsWithoutMargin();
+
+ return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()),
+ btFsels(vec.y(), halfExtents.y(), -halfExtents.y()),
+ btFsels(vec.z(), halfExtents.z(), -halfExtents.z()));
+ }
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+ {
+ const btVector3& halfExtents = getHalfExtentsWithoutMargin();
+
+ for (int i=0;i<numVectors;i++)
+ {
+ const btVector3& vec = vectors[i];
+ supportVerticesOut[i].setValue(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()),
+ btFsels(vec.y(), halfExtents.y(), -halfExtents.y()),
+ btFsels(vec.z(), halfExtents.z(), -halfExtents.z()));
+ }
+
+ }
+
+
+ btBox2dShape( const btVector3& boxHalfExtents)
+ : btPolyhedralConvexShape(),
+ m_centroid(0,0,0)
+ {
+ m_vertices[0].setValue(-boxHalfExtents.getX(),-boxHalfExtents.getY(),0);
+ m_vertices[1].setValue(boxHalfExtents.getX(),-boxHalfExtents.getY(),0);
+ m_vertices[2].setValue(boxHalfExtents.getX(),boxHalfExtents.getY(),0);
+ m_vertices[3].setValue(-boxHalfExtents.getX(),boxHalfExtents.getY(),0);
+
+ m_normals[0].setValue(0,-1,0);
+ m_normals[1].setValue(1,0,0);
+ m_normals[2].setValue(0,1,0);
+ m_normals[3].setValue(-1,0,0);
+
+ m_shapeType = BOX_2D_SHAPE_PROXYTYPE;
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ m_implicitShapeDimensions = (boxHalfExtents * m_localScaling) - margin;
+ };
+
+ virtual void setMargin(btScalar collisionMargin)
+ {
+ //correct the m_implicitShapeDimensions for the margin
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+
+ btConvexInternalShape::setMargin(collisionMargin);
+ btVector3 newMargin(getMargin(),getMargin(),getMargin());
+ m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
+
+ }
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+ btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
+
+ btConvexInternalShape::setLocalScaling(scaling);
+
+ m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
+
+ }
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+
+
+
+
+ int getVertexCount() const
+ {
+ return 4;
+ }
+
+ virtual int getNumVertices()const
+ {
+ return 4;
+ }
+
+ const btVector3* getVertices() const
+ {
+ return &m_vertices[0];
+ }
+
+ const btVector3* getNormals() const
+ {
+ return &m_normals[0];
+ }
+
+
+
+
+
+
+
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const
+ {
+ //this plane might not be aligned...
+ btVector4 plane ;
+ getPlaneEquation(plane,i);
+ planeNormal = btVector3(plane.getX(),plane.getY(),plane.getZ());
+ planeSupport = localGetSupportingVertex(-planeNormal);
+ }
+
+
+ const btVector3& getCentroid() const
+ {
+ return m_centroid;
+ }
+
+ virtual int getNumPlanes() const
+ {
+ return 6;
+ }
+
+
+
+ virtual int getNumEdges() const
+ {
+ return 12;
+ }
+
+
+ virtual void getVertex(int i,btVector3& vtx) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+
+ vtx = btVector3(
+ halfExtents.x() * (1-(i&1)) - halfExtents.x() * (i&1),
+ halfExtents.y() * (1-((i&2)>>1)) - halfExtents.y() * ((i&2)>>1),
+ halfExtents.z() * (1-((i&4)>>2)) - halfExtents.z() * ((i&4)>>2));
+ }
+
+
+ virtual void getPlaneEquation(btVector4& plane,int i) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+
+ switch (i)
+ {
+ case 0:
+ plane.setValue(btScalar(1.),btScalar(0.),btScalar(0.),-halfExtents.x());
+ break;
+ case 1:
+ plane.setValue(btScalar(-1.),btScalar(0.),btScalar(0.),-halfExtents.x());
+ break;
+ case 2:
+ plane.setValue(btScalar(0.),btScalar(1.),btScalar(0.),-halfExtents.y());
+ break;
+ case 3:
+ plane.setValue(btScalar(0.),btScalar(-1.),btScalar(0.),-halfExtents.y());
+ break;
+ case 4:
+ plane.setValue(btScalar(0.),btScalar(0.),btScalar(1.),-halfExtents.z());
+ break;
+ case 5:
+ plane.setValue(btScalar(0.),btScalar(0.),btScalar(-1.),-halfExtents.z());
+ break;
+ default:
+ btAssert(0);
+ }
+ }
+
+
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const
+ //virtual void getEdge(int i,Edge& edge) const
+ {
+ int edgeVert0 = 0;
+ int edgeVert1 = 0;
+
+ switch (i)
+ {
+ case 0:
+ edgeVert0 = 0;
+ edgeVert1 = 1;
+ break;
+ case 1:
+ edgeVert0 = 0;
+ edgeVert1 = 2;
+ break;
+ case 2:
+ edgeVert0 = 1;
+ edgeVert1 = 3;
+
+ break;
+ case 3:
+ edgeVert0 = 2;
+ edgeVert1 = 3;
+ break;
+ case 4:
+ edgeVert0 = 0;
+ edgeVert1 = 4;
+ break;
+ case 5:
+ edgeVert0 = 1;
+ edgeVert1 = 5;
+
+ break;
+ case 6:
+ edgeVert0 = 2;
+ edgeVert1 = 6;
+ break;
+ case 7:
+ edgeVert0 = 3;
+ edgeVert1 = 7;
+ break;
+ case 8:
+ edgeVert0 = 4;
+ edgeVert1 = 5;
+ break;
+ case 9:
+ edgeVert0 = 4;
+ edgeVert1 = 6;
+ break;
+ case 10:
+ edgeVert0 = 5;
+ edgeVert1 = 7;
+ break;
+ case 11:
+ edgeVert0 = 6;
+ edgeVert1 = 7;
+ break;
+ default:
+ btAssert(0);
+
+ }
+
+ getVertex(edgeVert0,pa );
+ getVertex(edgeVert1,pb );
+ }
+
+
+
+
+
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+
+ //btScalar minDist = 2*tolerance;
+
+ bool result = (pt.x() <= (halfExtents.x()+tolerance)) &&
+ (pt.x() >= (-halfExtents.x()-tolerance)) &&
+ (pt.y() <= (halfExtents.y()+tolerance)) &&
+ (pt.y() >= (-halfExtents.y()-tolerance)) &&
+ (pt.z() <= (halfExtents.z()+tolerance)) &&
+ (pt.z() >= (-halfExtents.z()-tolerance));
+
+ return result;
+ }
+
+
+ //debugging
+ virtual const char* getName()const
+ {
+ return "Box2d";
+ }
+
+ virtual int getNumPreferredPenetrationDirections() const
+ {
+ return 6;
+ }
+
+ virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
+ {
+ switch (index)
+ {
+ case 0:
+ penetrationVector.setValue(btScalar(1.),btScalar(0.),btScalar(0.));
+ break;
+ case 1:
+ penetrationVector.setValue(btScalar(-1.),btScalar(0.),btScalar(0.));
+ break;
+ case 2:
+ penetrationVector.setValue(btScalar(0.),btScalar(1.),btScalar(0.));
+ break;
+ case 3:
+ penetrationVector.setValue(btScalar(0.),btScalar(-1.),btScalar(0.));
+ break;
+ case 4:
+ penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(1.));
+ break;
+ case 5:
+ penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(-1.));
+ break;
+ default:
+ btAssert(0);
+ }
+ }
+
+};
+
+#endif //BT_OBB_BOX_2D_SHAPE_H
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.cpp
new file mode 100644
index 00000000..c6644efb
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.cpp
@@ -0,0 +1,41 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#include "btBoxShape.h"
+
+
+//{
+
+
+void btBoxShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ btTransformAabb(getHalfExtentsWithoutMargin(),getMargin(),t,aabbMin,aabbMax);
+}
+
+
+void btBoxShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ //btScalar margin = btScalar(0.);
+ btVector3 halfExtents = getHalfExtentsWithMargin();
+
+ btScalar lx=btScalar(2.)*(halfExtents.x());
+ btScalar ly=btScalar(2.)*(halfExtents.y());
+ btScalar lz=btScalar(2.)*(halfExtents.z());
+
+ inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + ly*ly));
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.h
new file mode 100644
index 00000000..8b8525d9
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btBoxShape.h
@@ -0,0 +1,318 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_OBB_BOX_MINKOWSKI_H
+#define BT_OBB_BOX_MINKOWSKI_H
+
+#include "btPolyhedralConvexShape.h"
+#include "btCollisionMargin.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMinMax.h"
+
+///The btBoxShape is a box primitive around the origin, its sides axis aligned with length specified by half extents, in local shape coordinates. When used as part of a btCollisionObject or btRigidBody it will be an oriented box in world space.
+class btBoxShape: public btPolyhedralConvexShape
+{
+
+ //btVector3 m_boxHalfExtents1; //use m_implicitShapeDimensions instead
+
+
+public:
+
+ btVector3 getHalfExtentsWithMargin() const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ halfExtents += margin;
+ return halfExtents;
+ }
+
+ const btVector3& getHalfExtentsWithoutMargin() const
+ {
+ return m_implicitShapeDimensions;//scaling is included, margin is not
+ }
+
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ halfExtents += margin;
+
+ return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()),
+ btFsels(vec.y(), halfExtents.y(), -halfExtents.y()),
+ btFsels(vec.z(), halfExtents.z(), -halfExtents.z()));
+ }
+
+ SIMD_FORCE_INLINE btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+ {
+ const btVector3& halfExtents = getHalfExtentsWithoutMargin();
+
+ return btVector3(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()),
+ btFsels(vec.y(), halfExtents.y(), -halfExtents.y()),
+ btFsels(vec.z(), halfExtents.z(), -halfExtents.z()));
+ }
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+ {
+ const btVector3& halfExtents = getHalfExtentsWithoutMargin();
+
+ for (int i=0;i<numVectors;i++)
+ {
+ const btVector3& vec = vectors[i];
+ supportVerticesOut[i].setValue(btFsels(vec.x(), halfExtents.x(), -halfExtents.x()),
+ btFsels(vec.y(), halfExtents.y(), -halfExtents.y()),
+ btFsels(vec.z(), halfExtents.z(), -halfExtents.z()));
+ }
+
+ }
+
+
+ btBoxShape( const btVector3& boxHalfExtents)
+ : btPolyhedralConvexShape()
+ {
+ m_shapeType = BOX_SHAPE_PROXYTYPE;
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ m_implicitShapeDimensions = (boxHalfExtents * m_localScaling) - margin;
+ };
+
+ virtual void setMargin(btScalar collisionMargin)
+ {
+ //correct the m_implicitShapeDimensions for the margin
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+
+ btConvexInternalShape::setMargin(collisionMargin);
+ btVector3 newMargin(getMargin(),getMargin(),getMargin());
+ m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
+
+ }
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+ btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
+
+ btConvexInternalShape::setLocalScaling(scaling);
+
+ m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
+
+ }
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const
+ {
+ //this plane might not be aligned...
+ btVector4 plane ;
+ getPlaneEquation(plane,i);
+ planeNormal = btVector3(plane.getX(),plane.getY(),plane.getZ());
+ planeSupport = localGetSupportingVertex(-planeNormal);
+ }
+
+
+ virtual int getNumPlanes() const
+ {
+ return 6;
+ }
+
+ virtual int getNumVertices() const
+ {
+ return 8;
+ }
+
+ virtual int getNumEdges() const
+ {
+ return 12;
+ }
+
+
+ virtual void getVertex(int i,btVector3& vtx) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithMargin();
+
+ vtx = btVector3(
+ halfExtents.x() * (1-(i&1)) - halfExtents.x() * (i&1),
+ halfExtents.y() * (1-((i&2)>>1)) - halfExtents.y() * ((i&2)>>1),
+ halfExtents.z() * (1-((i&4)>>2)) - halfExtents.z() * ((i&4)>>2));
+ }
+
+
+ virtual void getPlaneEquation(btVector4& plane,int i) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+
+ switch (i)
+ {
+ case 0:
+ plane.setValue(btScalar(1.),btScalar(0.),btScalar(0.),-halfExtents.x());
+ break;
+ case 1:
+ plane.setValue(btScalar(-1.),btScalar(0.),btScalar(0.),-halfExtents.x());
+ break;
+ case 2:
+ plane.setValue(btScalar(0.),btScalar(1.),btScalar(0.),-halfExtents.y());
+ break;
+ case 3:
+ plane.setValue(btScalar(0.),btScalar(-1.),btScalar(0.),-halfExtents.y());
+ break;
+ case 4:
+ plane.setValue(btScalar(0.),btScalar(0.),btScalar(1.),-halfExtents.z());
+ break;
+ case 5:
+ plane.setValue(btScalar(0.),btScalar(0.),btScalar(-1.),-halfExtents.z());
+ break;
+ default:
+ btAssert(0);
+ }
+ }
+
+
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const
+ //virtual void getEdge(int i,Edge& edge) const
+ {
+ int edgeVert0 = 0;
+ int edgeVert1 = 0;
+
+ switch (i)
+ {
+ case 0:
+ edgeVert0 = 0;
+ edgeVert1 = 1;
+ break;
+ case 1:
+ edgeVert0 = 0;
+ edgeVert1 = 2;
+ break;
+ case 2:
+ edgeVert0 = 1;
+ edgeVert1 = 3;
+
+ break;
+ case 3:
+ edgeVert0 = 2;
+ edgeVert1 = 3;
+ break;
+ case 4:
+ edgeVert0 = 0;
+ edgeVert1 = 4;
+ break;
+ case 5:
+ edgeVert0 = 1;
+ edgeVert1 = 5;
+
+ break;
+ case 6:
+ edgeVert0 = 2;
+ edgeVert1 = 6;
+ break;
+ case 7:
+ edgeVert0 = 3;
+ edgeVert1 = 7;
+ break;
+ case 8:
+ edgeVert0 = 4;
+ edgeVert1 = 5;
+ break;
+ case 9:
+ edgeVert0 = 4;
+ edgeVert1 = 6;
+ break;
+ case 10:
+ edgeVert0 = 5;
+ edgeVert1 = 7;
+ break;
+ case 11:
+ edgeVert0 = 6;
+ edgeVert1 = 7;
+ break;
+ default:
+ btAssert(0);
+
+ }
+
+ getVertex(edgeVert0,pa );
+ getVertex(edgeVert1,pb );
+ }
+
+
+
+
+
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+
+ //btScalar minDist = 2*tolerance;
+
+ bool result = (pt.x() <= (halfExtents.x()+tolerance)) &&
+ (pt.x() >= (-halfExtents.x()-tolerance)) &&
+ (pt.y() <= (halfExtents.y()+tolerance)) &&
+ (pt.y() >= (-halfExtents.y()-tolerance)) &&
+ (pt.z() <= (halfExtents.z()+tolerance)) &&
+ (pt.z() >= (-halfExtents.z()-tolerance));
+
+ return result;
+ }
+
+
+ //debugging
+ virtual const char* getName()const
+ {
+ return "Box";
+ }
+
+ virtual int getNumPreferredPenetrationDirections() const
+ {
+ return 6;
+ }
+
+ virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
+ {
+ switch (index)
+ {
+ case 0:
+ penetrationVector.setValue(btScalar(1.),btScalar(0.),btScalar(0.));
+ break;
+ case 1:
+ penetrationVector.setValue(btScalar(-1.),btScalar(0.),btScalar(0.));
+ break;
+ case 2:
+ penetrationVector.setValue(btScalar(0.),btScalar(1.),btScalar(0.));
+ break;
+ case 3:
+ penetrationVector.setValue(btScalar(0.),btScalar(-1.),btScalar(0.));
+ break;
+ case 4:
+ penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(1.));
+ break;
+ case 5:
+ penetrationVector.setValue(btScalar(0.),btScalar(0.),btScalar(-1.));
+ break;
+ default:
+ btAssert(0);
+ }
+ }
+
+};
+
+
+#endif //BT_OBB_BOX_MINKOWSKI_H
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
new file mode 100644
index 00000000..ace4cfa2
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
@@ -0,0 +1,466 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//#define DISABLE_BVH
+
+#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btOptimizedBvh.h"
+#include "LinearMath/btSerializer.h"
+
+///Bvh Concave triangle mesh is a static-triangle mesh shape with Bounding Volume Hierarchy optimization.
+///Uses an interface to access the triangles to allow for sharing graphics/physics triangles.
+btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh)
+:btTriangleMeshShape(meshInterface),
+m_bvh(0),
+m_triangleInfoMap(0),
+m_useQuantizedAabbCompression(useQuantizedAabbCompression),
+m_ownsBvh(false)
+{
+ m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE;
+ //construct bvh from meshInterface
+#ifndef DISABLE_BVH
+
+ if (buildBvh)
+ {
+ buildOptimizedBvh();
+ }
+
+#endif //DISABLE_BVH
+
+}
+
+btBvhTriangleMeshShape::btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax,bool buildBvh)
+:btTriangleMeshShape(meshInterface),
+m_bvh(0),
+m_triangleInfoMap(0),
+m_useQuantizedAabbCompression(useQuantizedAabbCompression),
+m_ownsBvh(false)
+{
+ m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE;
+ //construct bvh from meshInterface
+#ifndef DISABLE_BVH
+
+ if (buildBvh)
+ {
+ void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16);
+ m_bvh = new (mem) btOptimizedBvh();
+
+ m_bvh->build(meshInterface,m_useQuantizedAabbCompression,bvhAabbMin,bvhAabbMax);
+ m_ownsBvh = true;
+ }
+
+#endif //DISABLE_BVH
+
+}
+
+void btBvhTriangleMeshShape::partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ m_bvh->refitPartial( m_meshInterface,aabbMin,aabbMax );
+
+ m_localAabbMin.setMin(aabbMin);
+ m_localAabbMax.setMax(aabbMax);
+}
+
+
+void btBvhTriangleMeshShape::refitTree(const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ m_bvh->refit( m_meshInterface, aabbMin,aabbMax );
+
+ recalcLocalAabb();
+}
+
+btBvhTriangleMeshShape::~btBvhTriangleMeshShape()
+{
+ if (m_ownsBvh)
+ {
+ m_bvh->~btOptimizedBvh();
+ btAlignedFree(m_bvh);
+ }
+}
+
+void btBvhTriangleMeshShape::performRaycast (btTriangleCallback* callback, const btVector3& raySource, const btVector3& rayTarget)
+{
+ struct MyNodeOverlapCallback : public btNodeOverlapCallback
+ {
+ btStridingMeshInterface* m_meshInterface;
+ btTriangleCallback* m_callback;
+
+ MyNodeOverlapCallback(btTriangleCallback* callback,btStridingMeshInterface* meshInterface)
+ :m_meshInterface(meshInterface),
+ m_callback(callback)
+ {
+ }
+
+ virtual void processNode(int nodeSubPart, int nodeTriangleIndex)
+ {
+ btVector3 m_triangle[3];
+ const unsigned char *vertexbase;
+ int numverts;
+ PHY_ScalarType type;
+ int stride;
+ const unsigned char *indexbase;
+ int indexstride;
+ int numfaces;
+ PHY_ScalarType indicestype;
+
+ m_meshInterface->getLockedReadOnlyVertexIndexBase(
+ &vertexbase,
+ numverts,
+ type,
+ stride,
+ &indexbase,
+ indexstride,
+ numfaces,
+ indicestype,
+ nodeSubPart);
+
+ unsigned int* gfxbase = (unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
+ btAssert(indicestype==PHY_INTEGER||indicestype==PHY_SHORT);
+
+ const btVector3& meshScaling = m_meshInterface->getScaling();
+ for (int j=2;j>=0;j--)
+ {
+ int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:gfxbase[j];
+
+ if (type == PHY_FLOAT)
+ {
+ float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
+
+ m_triangle[j] = btVector3(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ());
+ }
+ else
+ {
+ double* graphicsbase = (double*)(vertexbase+graphicsindex*stride);
+
+ m_triangle[j] = btVector3(btScalar(graphicsbase[0])*meshScaling.getX(),btScalar(graphicsbase[1])*meshScaling.getY(),btScalar(graphicsbase[2])*meshScaling.getZ());
+ }
+ }
+
+ /* Perform ray vs. triangle collision here */
+ m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex);
+ m_meshInterface->unLockReadOnlyVertexBase(nodeSubPart);
+ }
+ };
+
+ MyNodeOverlapCallback myNodeCallback(callback,m_meshInterface);
+
+ m_bvh->reportRayOverlappingNodex(&myNodeCallback,raySource,rayTarget);
+}
+
+void btBvhTriangleMeshShape::performConvexcast (btTriangleCallback* callback, const btVector3& raySource, const btVector3& rayTarget, const btVector3& aabbMin, const btVector3& aabbMax)
+{
+ struct MyNodeOverlapCallback : public btNodeOverlapCallback
+ {
+ btStridingMeshInterface* m_meshInterface;
+ btTriangleCallback* m_callback;
+
+ MyNodeOverlapCallback(btTriangleCallback* callback,btStridingMeshInterface* meshInterface)
+ :m_meshInterface(meshInterface),
+ m_callback(callback)
+ {
+ }
+
+ virtual void processNode(int nodeSubPart, int nodeTriangleIndex)
+ {
+ btVector3 m_triangle[3];
+ const unsigned char *vertexbase;
+ int numverts;
+ PHY_ScalarType type;
+ int stride;
+ const unsigned char *indexbase;
+ int indexstride;
+ int numfaces;
+ PHY_ScalarType indicestype;
+
+ m_meshInterface->getLockedReadOnlyVertexIndexBase(
+ &vertexbase,
+ numverts,
+ type,
+ stride,
+ &indexbase,
+ indexstride,
+ numfaces,
+ indicestype,
+ nodeSubPart);
+
+ unsigned int* gfxbase = (unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
+ btAssert(indicestype==PHY_INTEGER||indicestype==PHY_SHORT);
+
+ const btVector3& meshScaling = m_meshInterface->getScaling();
+ for (int j=2;j>=0;j--)
+ {
+ int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:gfxbase[j];
+
+ if (type == PHY_FLOAT)
+ {
+ float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
+
+ m_triangle[j] = btVector3(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ());
+ }
+ else
+ {
+ double* graphicsbase = (double*)(vertexbase+graphicsindex*stride);
+
+ m_triangle[j] = btVector3(btScalar(graphicsbase[0])*meshScaling.getX(),btScalar(graphicsbase[1])*meshScaling.getY(),btScalar(graphicsbase[2])*meshScaling.getZ());
+ }
+ }
+
+ /* Perform ray vs. triangle collision here */
+ m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex);
+ m_meshInterface->unLockReadOnlyVertexBase(nodeSubPart);
+ }
+ };
+
+ MyNodeOverlapCallback myNodeCallback(callback,m_meshInterface);
+
+ m_bvh->reportBoxCastOverlappingNodex (&myNodeCallback, raySource, rayTarget, aabbMin, aabbMax);
+}
+
+//perform bvh tree traversal and report overlapping triangles to 'callback'
+void btBvhTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+
+#ifdef DISABLE_BVH
+ //brute force traverse all triangles
+ btTriangleMeshShape::processAllTriangles(callback,aabbMin,aabbMax);
+#else
+
+ //first get all the nodes
+
+
+ struct MyNodeOverlapCallback : public btNodeOverlapCallback
+ {
+ btStridingMeshInterface* m_meshInterface;
+ btTriangleCallback* m_callback;
+ btVector3 m_triangle[3];
+
+
+ MyNodeOverlapCallback(btTriangleCallback* callback,btStridingMeshInterface* meshInterface)
+ :m_meshInterface(meshInterface),
+ m_callback(callback)
+ {
+ }
+
+ virtual void processNode(int nodeSubPart, int nodeTriangleIndex)
+ {
+ const unsigned char *vertexbase;
+ int numverts;
+ PHY_ScalarType type;
+ int stride;
+ const unsigned char *indexbase;
+ int indexstride;
+ int numfaces;
+ PHY_ScalarType indicestype;
+
+
+ m_meshInterface->getLockedReadOnlyVertexIndexBase(
+ &vertexbase,
+ numverts,
+ type,
+ stride,
+ &indexbase,
+ indexstride,
+ numfaces,
+ indicestype,
+ nodeSubPart);
+
+ unsigned int* gfxbase = (unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
+ btAssert(indicestype==PHY_INTEGER||indicestype==PHY_SHORT||indicestype==PHY_UCHAR);
+
+ const btVector3& meshScaling = m_meshInterface->getScaling();
+ for (int j=2;j>=0;j--)
+ {
+
+ int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:indicestype==PHY_INTEGER?gfxbase[j]:((unsigned char*)gfxbase)[j];
+
+
+#ifdef DEBUG_TRIANGLE_MESH
+ printf("%d ,",graphicsindex);
+#endif //DEBUG_TRIANGLE_MESH
+ if (type == PHY_FLOAT)
+ {
+ float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
+
+ m_triangle[j] = btVector3(
+ graphicsbase[0]*meshScaling.getX(),
+ graphicsbase[1]*meshScaling.getY(),
+ graphicsbase[2]*meshScaling.getZ());
+ }
+ else
+ {
+ double* graphicsbase = (double*)(vertexbase+graphicsindex*stride);
+
+ m_triangle[j] = btVector3(
+ btScalar(graphicsbase[0])*meshScaling.getX(),
+ btScalar(graphicsbase[1])*meshScaling.getY(),
+ btScalar(graphicsbase[2])*meshScaling.getZ());
+ }
+#ifdef DEBUG_TRIANGLE_MESH
+ printf("triangle vertices:%f,%f,%f\n",triangle[j].x(),triangle[j].y(),triangle[j].z());
+#endif //DEBUG_TRIANGLE_MESH
+ }
+
+ m_callback->processTriangle(m_triangle,nodeSubPart,nodeTriangleIndex);
+ m_meshInterface->unLockReadOnlyVertexBase(nodeSubPart);
+ }
+
+ };
+
+ MyNodeOverlapCallback myNodeCallback(callback,m_meshInterface);
+
+ m_bvh->reportAabbOverlappingNodex(&myNodeCallback,aabbMin,aabbMax);
+
+
+#endif//DISABLE_BVH
+
+
+}
+
+void btBvhTriangleMeshShape::setLocalScaling(const btVector3& scaling)
+{
+ if ((getLocalScaling() -scaling).length2() > SIMD_EPSILON)
+ {
+ btTriangleMeshShape::setLocalScaling(scaling);
+ buildOptimizedBvh();
+ }
+}
+
+void btBvhTriangleMeshShape::buildOptimizedBvh()
+{
+ if (m_ownsBvh)
+ {
+ m_bvh->~btOptimizedBvh();
+ btAlignedFree(m_bvh);
+ }
+ ///m_localAabbMin/m_localAabbMax is already re-calculated in btTriangleMeshShape. We could just scale aabb, but this needs some more work
+ void* mem = btAlignedAlloc(sizeof(btOptimizedBvh),16);
+ m_bvh = new(mem) btOptimizedBvh();
+ //rebuild the bvh...
+ m_bvh->build(m_meshInterface,m_useQuantizedAabbCompression,m_localAabbMin,m_localAabbMax);
+ m_ownsBvh = true;
+}
+
+void btBvhTriangleMeshShape::setOptimizedBvh(btOptimizedBvh* bvh, const btVector3& scaling)
+{
+ btAssert(!m_bvh);
+ btAssert(!m_ownsBvh);
+
+ m_bvh = bvh;
+ m_ownsBvh = false;
+ // update the scaling without rebuilding the bvh
+ if ((getLocalScaling() -scaling).length2() > SIMD_EPSILON)
+ {
+ btTriangleMeshShape::setLocalScaling(scaling);
+ }
+}
+
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btBvhTriangleMeshShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btTriangleMeshShapeData* trimeshData = (btTriangleMeshShapeData*) dataBuffer;
+
+ btCollisionShape::serialize(&trimeshData->m_collisionShapeData,serializer);
+
+ m_meshInterface->serialize(&trimeshData->m_meshInterface, serializer);
+
+ trimeshData->m_collisionMargin = float(m_collisionMargin);
+
+
+
+ if (m_bvh && !(serializer->getSerializationFlags()&BT_SERIALIZE_NO_BVH))
+ {
+ void* chunk = serializer->findPointer(m_bvh);
+ if (chunk)
+ {
+#ifdef BT_USE_DOUBLE_PRECISION
+ trimeshData->m_quantizedDoubleBvh = (btQuantizedBvhData*)chunk;
+ trimeshData->m_quantizedFloatBvh = 0;
+#else
+ trimeshData->m_quantizedFloatBvh = (btQuantizedBvhData*)chunk;
+ trimeshData->m_quantizedDoubleBvh= 0;
+#endif //BT_USE_DOUBLE_PRECISION
+ } else
+ {
+
+#ifdef BT_USE_DOUBLE_PRECISION
+ trimeshData->m_quantizedDoubleBvh = (btQuantizedBvhData*)serializer->getUniquePointer(m_bvh);
+ trimeshData->m_quantizedFloatBvh = 0;
+#else
+ trimeshData->m_quantizedFloatBvh = (btQuantizedBvhData*)serializer->getUniquePointer(m_bvh);
+ trimeshData->m_quantizedDoubleBvh= 0;
+#endif //BT_USE_DOUBLE_PRECISION
+
+ int sz = m_bvh->calculateSerializeBufferSizeNew();
+ btChunk* chunk = serializer->allocate(sz,1);
+ const char* structType = m_bvh->serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_QUANTIZED_BVH_CODE,m_bvh);
+ }
+ } else
+ {
+ trimeshData->m_quantizedFloatBvh = 0;
+ trimeshData->m_quantizedDoubleBvh = 0;
+ }
+
+
+
+ if (m_triangleInfoMap && !(serializer->getSerializationFlags()&BT_SERIALIZE_NO_TRIANGLEINFOMAP))
+ {
+ void* chunk = serializer->findPointer(m_triangleInfoMap);
+ if (chunk)
+ {
+ trimeshData->m_triangleInfoMap = (btTriangleInfoMapData*)chunk;
+ } else
+ {
+ trimeshData->m_triangleInfoMap = (btTriangleInfoMapData*)serializer->getUniquePointer(m_triangleInfoMap);
+ int sz = m_triangleInfoMap->calculateSerializeBufferSize();
+ btChunk* chunk = serializer->allocate(sz,1);
+ const char* structType = m_triangleInfoMap->serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_TRIANLGE_INFO_MAP,m_triangleInfoMap);
+ }
+ } else
+ {
+ trimeshData->m_triangleInfoMap = 0;
+ }
+
+ return "btTriangleMeshShapeData";
+}
+
+void btBvhTriangleMeshShape::serializeSingleBvh(btSerializer* serializer) const
+{
+ if (m_bvh)
+ {
+ int len = m_bvh->calculateSerializeBufferSizeNew(); //make sure not to use calculateSerializeBufferSize because it is used for in-place
+ btChunk* chunk = serializer->allocate(len,1);
+ const char* structType = m_bvh->serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_QUANTIZED_BVH_CODE,(void*)m_bvh);
+ }
+}
+
+void btBvhTriangleMeshShape::serializeSingleTriangleInfoMap(btSerializer* serializer) const
+{
+ if (m_triangleInfoMap)
+ {
+ int len = m_triangleInfoMap->calculateSerializeBufferSize();
+ btChunk* chunk = serializer->allocate(len,1);
+ const char* structType = m_triangleInfoMap->serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_TRIANLGE_INFO_MAP,(void*)m_triangleInfoMap);
+ }
+}
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h
new file mode 100644
index 00000000..d1c21629
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h
@@ -0,0 +1,139 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_BVH_TRIANGLE_MESH_SHAPE_H
+#define BT_BVH_TRIANGLE_MESH_SHAPE_H
+
+#include "btTriangleMeshShape.h"
+#include "btOptimizedBvh.h"
+#include "LinearMath/btAlignedAllocator.h"
+#include "btTriangleInfoMap.h"
+
+///The btBvhTriangleMeshShape is a static-triangle mesh shape with several optimizations, such as bounding volume hierarchy and cache friendly traversal for PlayStation 3 Cell SPU. It is recommended to enable useQuantizedAabbCompression for better memory usage.
+///It takes a triangle mesh as input, for example a btTriangleMesh or btTriangleIndexVertexArray. The btBvhTriangleMeshShape class allows for triangle mesh deformations by a refit or partialRefit method.
+///Instead of building the bounding volume hierarchy acceleration structure, it is also possible to serialize (save) and deserialize (load) the structure from disk.
+///See Demos\ConcaveDemo\ConcavePhysicsDemo.cpp for an example.
+ATTRIBUTE_ALIGNED16(class) btBvhTriangleMeshShape : public btTriangleMeshShape
+{
+
+ btOptimizedBvh* m_bvh;
+ btTriangleInfoMap* m_triangleInfoMap;
+
+ bool m_useQuantizedAabbCompression;
+ bool m_ownsBvh;
+ bool m_pad[11];////need padding due to alignment
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+
+ btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true);
+
+ ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb
+ btBvhTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax, bool buildBvh = true);
+
+ virtual ~btBvhTriangleMeshShape();
+
+ bool getOwnsBvh () const
+ {
+ return m_ownsBvh;
+ }
+
+
+
+ void performRaycast (btTriangleCallback* callback, const btVector3& raySource, const btVector3& rayTarget);
+ void performConvexcast (btTriangleCallback* callback, const btVector3& boxSource, const btVector3& boxTarget, const btVector3& boxMin, const btVector3& boxMax);
+
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ void refitTree(const btVector3& aabbMin,const btVector3& aabbMax);
+
+ ///for a fast incremental refit of parts of the tree. Note: the entire AABB of the tree will become more conservative, it never shrinks
+ void partialRefitTree(const btVector3& aabbMin,const btVector3& aabbMax);
+
+ //debugging
+ virtual const char* getName()const {return "BVHTRIANGLEMESH";}
+
+
+ virtual void setLocalScaling(const btVector3& scaling);
+
+ btOptimizedBvh* getOptimizedBvh()
+ {
+ return m_bvh;
+ }
+
+ void setOptimizedBvh(btOptimizedBvh* bvh, const btVector3& localScaling=btVector3(1,1,1));
+
+ void buildOptimizedBvh();
+
+ bool usesQuantizedAabbCompression() const
+ {
+ return m_useQuantizedAabbCompression;
+ }
+
+ void setTriangleInfoMap(btTriangleInfoMap* triangleInfoMap)
+ {
+ m_triangleInfoMap = triangleInfoMap;
+ }
+
+ const btTriangleInfoMap* getTriangleInfoMap() const
+ {
+ return m_triangleInfoMap;
+ }
+
+ btTriangleInfoMap* getTriangleInfoMap()
+ {
+ return m_triangleInfoMap;
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+ virtual void serializeSingleBvh(btSerializer* serializer) const;
+
+ virtual void serializeSingleTriangleInfoMap(btSerializer* serializer) const;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btTriangleMeshShapeData
+{
+ btCollisionShapeData m_collisionShapeData;
+
+ btStridingMeshInterfaceData m_meshInterface;
+
+ btQuantizedBvhFloatData *m_quantizedFloatBvh;
+ btQuantizedBvhDoubleData *m_quantizedDoubleBvh;
+
+ btTriangleInfoMapData *m_triangleInfoMap;
+
+ float m_collisionMargin;
+
+ char m_pad3[4];
+
+};
+
+
+SIMD_FORCE_INLINE int btBvhTriangleMeshShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btTriangleMeshShapeData);
+}
+
+
+
+#endif //BT_BVH_TRIANGLE_MESH_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp
new file mode 100644
index 00000000..2faa11d4
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.cpp
@@ -0,0 +1,171 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btCapsuleShape.h"
+
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+#include "LinearMath/btQuaternion.h"
+
+btCapsuleShape::btCapsuleShape(btScalar radius, btScalar height) : btConvexInternalShape ()
+{
+ m_shapeType = CAPSULE_SHAPE_PROXYTYPE;
+ m_upAxis = 1;
+ m_implicitShapeDimensions.setValue(radius,0.5f*height,radius);
+}
+
+
+ btVector3 btCapsuleShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
+{
+
+ btVector3 supVec(0,0,0);
+
+ btScalar maxDot(btScalar(-BT_LARGE_FLOAT));
+
+ btVector3 vec = vec0;
+ btScalar lenSqr = vec.length2();
+ if (lenSqr < btScalar(0.0001))
+ {
+ vec.setValue(1,0,0);
+ } else
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ vec *= rlen;
+ }
+
+ btVector3 vtx;
+ btScalar newDot;
+
+ btScalar radius = getRadius();
+
+
+ {
+ btVector3 pos(0,0,0);
+ pos[getUpAxis()] = getHalfHeight();
+
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+ {
+ btVector3 pos(0,0,0);
+ pos[getUpAxis()] = -getHalfHeight();
+
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+
+ return supVec;
+
+}
+
+ void btCapsuleShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+
+
+ btScalar radius = getRadius();
+
+ for (int j=0;j<numVectors;j++)
+ {
+ btScalar maxDot(btScalar(-BT_LARGE_FLOAT));
+ const btVector3& vec = vectors[j];
+
+ btVector3 vtx;
+ btScalar newDot;
+ {
+ btVector3 pos(0,0,0);
+ pos[getUpAxis()] = getHalfHeight();
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supportVerticesOut[j] = vtx;
+ }
+ }
+ {
+ btVector3 pos(0,0,0);
+ pos[getUpAxis()] = -getHalfHeight();
+ vtx = pos +vec*m_localScaling*(radius) - vec * getMargin();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supportVerticesOut[j] = vtx;
+ }
+ }
+
+ }
+}
+
+
+void btCapsuleShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ //as an approximation, take the inertia of the box that bounds the spheres
+
+ btTransform ident;
+ ident.setIdentity();
+
+
+ btScalar radius = getRadius();
+
+ btVector3 halfExtents(radius,radius,radius);
+ halfExtents[getUpAxis()]+=getHalfHeight();
+
+ btScalar margin = CONVEX_DISTANCE_MARGIN;
+
+ btScalar lx=btScalar(2.)*(halfExtents[0]+margin);
+ btScalar ly=btScalar(2.)*(halfExtents[1]+margin);
+ btScalar lz=btScalar(2.)*(halfExtents[2]+margin);
+ const btScalar x2 = lx*lx;
+ const btScalar y2 = ly*ly;
+ const btScalar z2 = lz*lz;
+ const btScalar scaledmass = mass * btScalar(.08333333);
+
+ inertia[0] = scaledmass * (y2+z2);
+ inertia[1] = scaledmass * (x2+z2);
+ inertia[2] = scaledmass * (x2+y2);
+
+}
+
+btCapsuleShapeX::btCapsuleShapeX(btScalar radius,btScalar height)
+{
+ m_upAxis = 0;
+ m_implicitShapeDimensions.setValue(0.5f*height, radius,radius);
+}
+
+
+
+
+
+
+btCapsuleShapeZ::btCapsuleShapeZ(btScalar radius,btScalar height)
+{
+ m_upAxis = 2;
+ m_implicitShapeDimensions.setValue(radius,radius,0.5f*height);
+}
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.h
new file mode 100644
index 00000000..ab763abf
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCapsuleShape.h
@@ -0,0 +1,173 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CAPSULE_SHAPE_H
+#define BT_CAPSULE_SHAPE_H
+
+#include "btConvexInternalShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+
+///The btCapsuleShape represents a capsule around the Y axis, there is also the btCapsuleShapeX aligned around the X axis and btCapsuleShapeZ around the Z axis.
+///The total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps.
+///The btCapsuleShape is a convex hull of two spheres. The btMultiSphereShape is a more general collision shape that takes the convex hull of multiple sphere, so it can also represent a capsule when just using two spheres.
+class btCapsuleShape : public btConvexInternalShape
+{
+protected:
+ int m_upAxis;
+
+protected:
+ ///only used for btCapsuleShapeZ and btCapsuleShapeX subclasses.
+ btCapsuleShape() : btConvexInternalShape() {m_shapeType = CAPSULE_SHAPE_PROXYTYPE;};
+
+public:
+ btCapsuleShape(btScalar radius,btScalar height);
+
+ ///CollisionShape Interface
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ /// btConvexShape Interface
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ virtual void setMargin(btScalar collisionMargin)
+ {
+ //correct the m_implicitShapeDimensions for the margin
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+
+ btConvexInternalShape::setMargin(collisionMargin);
+ btVector3 newMargin(getMargin(),getMargin(),getMargin());
+ m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
+
+ }
+
+ virtual void getAabb (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
+ {
+ btVector3 halfExtents(getRadius(),getRadius(),getRadius());
+ halfExtents[m_upAxis] = getRadius() + getHalfHeight();
+ halfExtents += btVector3(getMargin(),getMargin(),getMargin());
+ btMatrix3x3 abs_b = t.getBasis().absolute();
+ btVector3 center = t.getOrigin();
+ btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents));
+
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+ }
+
+ virtual const char* getName()const
+ {
+ return "CapsuleShape";
+ }
+
+ int getUpAxis() const
+ {
+ return m_upAxis;
+ }
+
+ btScalar getRadius() const
+ {
+ int radiusAxis = (m_upAxis+2)%3;
+ return m_implicitShapeDimensions[radiusAxis];
+ }
+
+ btScalar getHalfHeight() const
+ {
+ return m_implicitShapeDimensions[m_upAxis];
+ }
+
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+ btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
+
+ btConvexInternalShape::setLocalScaling(scaling);
+
+ m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
+
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///btCapsuleShapeX represents a capsule around the Z axis
+///the total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps.
+class btCapsuleShapeX : public btCapsuleShape
+{
+public:
+
+ btCapsuleShapeX(btScalar radius,btScalar height);
+
+ //debugging
+ virtual const char* getName()const
+ {
+ return "CapsuleX";
+ }
+
+
+
+};
+
+///btCapsuleShapeZ represents a capsule around the Z axis
+///the total height is height+2*radius, so the height is just the height between the center of each 'sphere' of the capsule caps.
+class btCapsuleShapeZ : public btCapsuleShape
+{
+public:
+ btCapsuleShapeZ(btScalar radius,btScalar height);
+
+ //debugging
+ virtual const char* getName()const
+ {
+ return "CapsuleZ";
+ }
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btCapsuleShapeData
+{
+ btConvexInternalShapeData m_convexInternalShapeData;
+
+ int m_upAxis;
+
+ char m_padding[4];
+};
+
+SIMD_FORCE_INLINE int btCapsuleShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btCapsuleShapeData);
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btCapsuleShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btCapsuleShapeData* shapeData = (btCapsuleShapeData*) dataBuffer;
+
+ btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData,serializer);
+
+ shapeData->m_upAxis = m_upAxis;
+
+ return "btCapsuleShapeData";
+}
+
+#endif //BT_CAPSULE_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionMargin.h b/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionMargin.h
new file mode 100644
index 00000000..e9736eec
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionMargin.h
@@ -0,0 +1,26 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COLLISION_MARGIN_H
+#define BT_COLLISION_MARGIN_H
+
+//used by Gjk and some other algorithms
+
+#define CONVEX_DISTANCE_MARGIN btScalar(0.04)// btScalar(0.1)//;//btScalar(0.01)
+
+
+
+#endif //BT_COLLISION_MARGIN_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.cpp
new file mode 100644
index 00000000..39ee21ca
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.cpp
@@ -0,0 +1,119 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "LinearMath/btSerializer.h"
+
+/*
+ Make sure this dummy function never changes so that it
+ can be used by probes that are checking whether the
+ library is actually installed.
+*/
+extern "C"
+{
+void btBulletCollisionProbe ();
+
+void btBulletCollisionProbe () {}
+}
+
+
+
+void btCollisionShape::getBoundingSphere(btVector3& center,btScalar& radius) const
+{
+ btTransform tr;
+ tr.setIdentity();
+ btVector3 aabbMin,aabbMax;
+
+ getAabb(tr,aabbMin,aabbMax);
+
+ radius = (aabbMax-aabbMin).length()*btScalar(0.5);
+ center = (aabbMin+aabbMax)*btScalar(0.5);
+}
+
+
+btScalar btCollisionShape::getContactBreakingThreshold(btScalar defaultContactThreshold) const
+{
+ return getAngularMotionDisc() * defaultContactThreshold;
+}
+
+btScalar btCollisionShape::getAngularMotionDisc() const
+{
+ ///@todo cache this value, to improve performance
+ btVector3 center;
+ btScalar disc;
+ getBoundingSphere(center,disc);
+ disc += (center).length();
+ return disc;
+}
+
+void btCollisionShape::calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax) const
+{
+ //start with static aabb
+ getAabb(curTrans,temporalAabbMin,temporalAabbMax);
+
+ btScalar temporalAabbMaxx = temporalAabbMax.getX();
+ btScalar temporalAabbMaxy = temporalAabbMax.getY();
+ btScalar temporalAabbMaxz = temporalAabbMax.getZ();
+ btScalar temporalAabbMinx = temporalAabbMin.getX();
+ btScalar temporalAabbMiny = temporalAabbMin.getY();
+ btScalar temporalAabbMinz = temporalAabbMin.getZ();
+
+ // add linear motion
+ btVector3 linMotion = linvel*timeStep;
+ ///@todo: simd would have a vector max/min operation, instead of per-element access
+ if (linMotion.x() > btScalar(0.))
+ temporalAabbMaxx += linMotion.x();
+ else
+ temporalAabbMinx += linMotion.x();
+ if (linMotion.y() > btScalar(0.))
+ temporalAabbMaxy += linMotion.y();
+ else
+ temporalAabbMiny += linMotion.y();
+ if (linMotion.z() > btScalar(0.))
+ temporalAabbMaxz += linMotion.z();
+ else
+ temporalAabbMinz += linMotion.z();
+
+ //add conservative angular motion
+ btScalar angularMotion = angvel.length() * getAngularMotionDisc() * timeStep;
+ btVector3 angularMotion3d(angularMotion,angularMotion,angularMotion);
+ temporalAabbMin = btVector3(temporalAabbMinx,temporalAabbMiny,temporalAabbMinz);
+ temporalAabbMax = btVector3(temporalAabbMaxx,temporalAabbMaxy,temporalAabbMaxz);
+
+ temporalAabbMin -= angularMotion3d;
+ temporalAabbMax += angularMotion3d;
+}
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btCollisionShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btCollisionShapeData* shapeData = (btCollisionShapeData*) dataBuffer;
+ char* name = (char*) serializer->findNameForPointer(this);
+ shapeData->m_name = (char*)serializer->getUniquePointer(name);
+ if (shapeData->m_name)
+ {
+ serializer->serializeName(name);
+ }
+ shapeData->m_shapeType = m_shapeType;
+ //shapeData->m_padding//??
+ return "btCollisionShapeData";
+}
+
+void btCollisionShape::serializeSingleShape(btSerializer* serializer) const
+{
+ int len = calculateSerializeBufferSize();
+ btChunk* chunk = serializer->allocate(len,1);
+ const char* structType = serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_SHAPE_CODE,(void*)this);
+} \ No newline at end of file
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.h
new file mode 100644
index 00000000..865c1067
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCollisionShape.h
@@ -0,0 +1,150 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COLLISION_SHAPE_H
+#define BT_COLLISION_SHAPE_H
+
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types
+class btSerializer;
+
+
+///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects.
+class btCollisionShape
+{
+protected:
+ int m_shapeType;
+ void* m_userPointer;
+
+public:
+
+ btCollisionShape() : m_shapeType (INVALID_SHAPE_PROXYTYPE), m_userPointer(0)
+ {
+ }
+
+ virtual ~btCollisionShape()
+ {
+ }
+
+ ///getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0;
+
+ virtual void getBoundingSphere(btVector3& center,btScalar& radius) const;
+
+ ///getAngularMotionDisc returns the maximus radius needed for Conservative Advancement to handle time-of-impact with rotations.
+ virtual btScalar getAngularMotionDisc() const;
+
+ virtual btScalar getContactBreakingThreshold(btScalar defaultContactThresholdFactor) const;
+
+
+ ///calculateTemporalAabb calculates the enclosing aabb for the moving object over interval [0..timeStep)
+ ///result is conservative
+ void calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax) const;
+
+
+
+ SIMD_FORCE_INLINE bool isPolyhedral() const
+ {
+ return btBroadphaseProxy::isPolyhedral(getShapeType());
+ }
+
+ SIMD_FORCE_INLINE bool isConvex2d() const
+ {
+ return btBroadphaseProxy::isConvex2d(getShapeType());
+ }
+
+ SIMD_FORCE_INLINE bool isConvex() const
+ {
+ return btBroadphaseProxy::isConvex(getShapeType());
+ }
+ SIMD_FORCE_INLINE bool isNonMoving() const
+ {
+ return btBroadphaseProxy::isNonMoving(getShapeType());
+ }
+ SIMD_FORCE_INLINE bool isConcave() const
+ {
+ return btBroadphaseProxy::isConcave(getShapeType());
+ }
+ SIMD_FORCE_INLINE bool isCompound() const
+ {
+ return btBroadphaseProxy::isCompound(getShapeType());
+ }
+
+ SIMD_FORCE_INLINE bool isSoftBody() const
+ {
+ return btBroadphaseProxy::isSoftBody(getShapeType());
+ }
+
+ ///isInfinite is used to catch simulation error (aabb check)
+ SIMD_FORCE_INLINE bool isInfinite() const
+ {
+ return btBroadphaseProxy::isInfinite(getShapeType());
+ }
+
+#ifndef __SPU__
+ virtual void setLocalScaling(const btVector3& scaling) =0;
+ virtual const btVector3& getLocalScaling() const =0;
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const = 0;
+
+
+//debugging support
+ virtual const char* getName()const =0 ;
+#endif //__SPU__
+
+
+ int getShapeType() const { return m_shapeType; }
+ virtual void setMargin(btScalar margin) = 0;
+ virtual btScalar getMargin() const = 0;
+
+
+ ///optional user data pointer
+ void setUserPointer(void* userPtr)
+ {
+ m_userPointer = userPtr;
+ }
+
+ void* getUserPointer() const
+ {
+ return m_userPointer;
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+ virtual void serializeSingleShape(btSerializer* serializer) const;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btCollisionShapeData
+{
+ char *m_name;
+ int m_shapeType;
+ char m_padding[4];
+};
+
+SIMD_FORCE_INLINE int btCollisionShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btCollisionShapeData);
+}
+
+
+
+#endif //BT_COLLISION_SHAPE_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
new file mode 100644
index 00000000..4eb860c5
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.cpp
@@ -0,0 +1,356 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btCompoundShape.h"
+#include "btCollisionShape.h"
+#include "BulletCollision/BroadphaseCollision/btDbvt.h"
+#include "LinearMath/btSerializer.h"
+
+btCompoundShape::btCompoundShape(bool enableDynamicAabbTree)
+: m_localAabbMin(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT)),
+m_localAabbMax(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT)),
+m_dynamicAabbTree(0),
+m_updateRevision(1),
+m_collisionMargin(btScalar(0.)),
+m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.))
+{
+ m_shapeType = COMPOUND_SHAPE_PROXYTYPE;
+
+ if (enableDynamicAabbTree)
+ {
+ void* mem = btAlignedAlloc(sizeof(btDbvt),16);
+ m_dynamicAabbTree = new(mem) btDbvt();
+ btAssert(mem==m_dynamicAabbTree);
+ }
+}
+
+
+btCompoundShape::~btCompoundShape()
+{
+ if (m_dynamicAabbTree)
+ {
+ m_dynamicAabbTree->~btDbvt();
+ btAlignedFree(m_dynamicAabbTree);
+ }
+}
+
+void btCompoundShape::addChildShape(const btTransform& localTransform,btCollisionShape* shape)
+{
+ m_updateRevision++;
+ //m_childTransforms.push_back(localTransform);
+ //m_childShapes.push_back(shape);
+ btCompoundShapeChild child;
+ child.m_node = 0;
+ child.m_transform = localTransform;
+ child.m_childShape = shape;
+ child.m_childShapeType = shape->getShapeType();
+ child.m_childMargin = shape->getMargin();
+
+
+ //extend the local aabbMin/aabbMax
+ btVector3 localAabbMin,localAabbMax;
+ shape->getAabb(localTransform,localAabbMin,localAabbMax);
+ for (int i=0;i<3;i++)
+ {
+ if (m_localAabbMin[i] > localAabbMin[i])
+ {
+ m_localAabbMin[i] = localAabbMin[i];
+ }
+ if (m_localAabbMax[i] < localAabbMax[i])
+ {
+ m_localAabbMax[i] = localAabbMax[i];
+ }
+
+ }
+ if (m_dynamicAabbTree)
+ {
+ const btDbvtVolume bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
+ int index = m_children.size();
+ child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index);
+ }
+
+ m_children.push_back(child);
+
+}
+
+void btCompoundShape::updateChildTransform(int childIndex, const btTransform& newChildTransform,bool shouldRecalculateLocalAabb)
+{
+ m_children[childIndex].m_transform = newChildTransform;
+
+ if (m_dynamicAabbTree)
+ {
+ ///update the dynamic aabb tree
+ btVector3 localAabbMin,localAabbMax;
+ m_children[childIndex].m_childShape->getAabb(newChildTransform,localAabbMin,localAabbMax);
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
+ //int index = m_children.size()-1;
+ m_dynamicAabbTree->update(m_children[childIndex].m_node,bounds);
+ }
+
+ if (shouldRecalculateLocalAabb)
+ {
+ recalculateLocalAabb();
+ }
+}
+
+void btCompoundShape::removeChildShapeByIndex(int childShapeIndex)
+{
+ m_updateRevision++;
+ btAssert(childShapeIndex >=0 && childShapeIndex < m_children.size());
+ if (m_dynamicAabbTree)
+ {
+ m_dynamicAabbTree->remove(m_children[childShapeIndex].m_node);
+ }
+ m_children.swap(childShapeIndex,m_children.size()-1);
+ if (m_dynamicAabbTree)
+ m_children[childShapeIndex].m_node->dataAsInt = childShapeIndex;
+ m_children.pop_back();
+
+}
+
+
+
+void btCompoundShape::removeChildShape(btCollisionShape* shape)
+{
+ m_updateRevision++;
+ // Find the children containing the shape specified, and remove those children.
+ //note: there might be multiple children using the same shape!
+ for(int i = m_children.size()-1; i >= 0 ; i--)
+ {
+ if(m_children[i].m_childShape == shape)
+ {
+ removeChildShapeByIndex(i);
+ }
+ }
+
+
+
+ recalculateLocalAabb();
+}
+
+void btCompoundShape::recalculateLocalAabb()
+{
+ // Recalculate the local aabb
+ // Brute force, it iterates over all the shapes left.
+
+ m_localAabbMin = btVector3(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ m_localAabbMax = btVector3(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+
+ //extend the local aabbMin/aabbMax
+ for (int j = 0; j < m_children.size(); j++)
+ {
+ btVector3 localAabbMin,localAabbMax;
+ m_children[j].m_childShape->getAabb(m_children[j].m_transform, localAabbMin, localAabbMax);
+ for (int i=0;i<3;i++)
+ {
+ if (m_localAabbMin[i] > localAabbMin[i])
+ m_localAabbMin[i] = localAabbMin[i];
+ if (m_localAabbMax[i] < localAabbMax[i])
+ m_localAabbMax[i] = localAabbMax[i];
+ }
+ }
+}
+
+///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+void btCompoundShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin);
+ btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin);
+
+ //avoid an illegal AABB when there are no children
+ if (!m_children.size())
+ {
+ localHalfExtents.setValue(0,0,0);
+ localCenter.setValue(0,0,0);
+ }
+ localHalfExtents += btVector3(getMargin(),getMargin(),getMargin());
+
+
+ btMatrix3x3 abs_b = trans.getBasis().absolute();
+
+ btVector3 center = trans(localCenter);
+
+ btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents),
+ abs_b[1].dot(localHalfExtents),
+ abs_b[2].dot(localHalfExtents));
+ aabbMin = center-extent;
+ aabbMax = center+extent;
+
+}
+
+void btCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ //approximation: take the inertia from the aabb for now
+ btTransform ident;
+ ident.setIdentity();
+ btVector3 aabbMin,aabbMax;
+ getAabb(ident,aabbMin,aabbMax);
+
+ btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5);
+
+ btScalar lx=btScalar(2.)*(halfExtents.x());
+ btScalar ly=btScalar(2.)*(halfExtents.y());
+ btScalar lz=btScalar(2.)*(halfExtents.z());
+
+ inertia[0] = mass/(btScalar(12.0)) * (ly*ly + lz*lz);
+ inertia[1] = mass/(btScalar(12.0)) * (lx*lx + lz*lz);
+ inertia[2] = mass/(btScalar(12.0)) * (lx*lx + ly*ly);
+
+}
+
+
+
+
+void btCompoundShape::calculatePrincipalAxisTransform(btScalar* masses, btTransform& principal, btVector3& inertia) const
+{
+ int n = m_children.size();
+
+ btScalar totalMass = 0;
+ btVector3 center(0, 0, 0);
+ int k;
+
+ for (k = 0; k < n; k++)
+ {
+ btAssert(masses[k]>0);
+ center += m_children[k].m_transform.getOrigin() * masses[k];
+ totalMass += masses[k];
+ }
+
+ btAssert(totalMass>0);
+
+ center /= totalMass;
+ principal.setOrigin(center);
+
+ btMatrix3x3 tensor(0, 0, 0, 0, 0, 0, 0, 0, 0);
+ for ( k = 0; k < n; k++)
+ {
+ btVector3 i;
+ m_children[k].m_childShape->calculateLocalInertia(masses[k], i);
+
+ const btTransform& t = m_children[k].m_transform;
+ btVector3 o = t.getOrigin() - center;
+
+ //compute inertia tensor in coordinate system of compound shape
+ btMatrix3x3 j = t.getBasis().transpose();
+ j[0] *= i[0];
+ j[1] *= i[1];
+ j[2] *= i[2];
+ j = t.getBasis() * j;
+
+ //add inertia tensor
+ tensor[0] += j[0];
+ tensor[1] += j[1];
+ tensor[2] += j[2];
+
+ //compute inertia tensor of pointmass at o
+ btScalar o2 = o.length2();
+ j[0].setValue(o2, 0, 0);
+ j[1].setValue(0, o2, 0);
+ j[2].setValue(0, 0, o2);
+ j[0] += o * -o.x();
+ j[1] += o * -o.y();
+ j[2] += o * -o.z();
+
+ //add inertia tensor of pointmass
+ tensor[0] += masses[k] * j[0];
+ tensor[1] += masses[k] * j[1];
+ tensor[2] += masses[k] * j[2];
+ }
+
+ tensor.diagonalize(principal.getBasis(), btScalar(0.00001), 20);
+ inertia.setValue(tensor[0][0], tensor[1][1], tensor[2][2]);
+}
+
+
+
+void btCompoundShape::setLocalScaling(const btVector3& scaling)
+{
+
+ for(int i = 0; i < m_children.size(); i++)
+ {
+ btTransform childTrans = getChildTransform(i);
+ btVector3 childScale = m_children[i].m_childShape->getLocalScaling();
+// childScale = childScale * (childTrans.getBasis() * scaling);
+ childScale = childScale * scaling / m_localScaling;
+ m_children[i].m_childShape->setLocalScaling(childScale);
+ childTrans.setOrigin((childTrans.getOrigin())*scaling);
+ updateChildTransform(i, childTrans,false);
+ }
+
+ m_localScaling = scaling;
+ recalculateLocalAabb();
+
+}
+
+
+void btCompoundShape::createAabbTreeFromChildren()
+{
+ if ( !m_dynamicAabbTree )
+ {
+ void* mem = btAlignedAlloc(sizeof(btDbvt),16);
+ m_dynamicAabbTree = new(mem) btDbvt();
+ btAssert(mem==m_dynamicAabbTree);
+
+ for ( int index = 0; index < m_children.size(); index++ )
+ {
+ btCompoundShapeChild &child = m_children[index];
+
+ //extend the local aabbMin/aabbMax
+ btVector3 localAabbMin,localAabbMax;
+ child.m_childShape->getAabb(child.m_transform,localAabbMin,localAabbMax);
+
+ const btDbvtVolume bounds=btDbvtVolume::FromMM(localAabbMin,localAabbMax);
+ child.m_node = m_dynamicAabbTree->insert(bounds,(void*)index);
+ }
+ }
+}
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btCompoundShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+
+ btCompoundShapeData* shapeData = (btCompoundShapeData*) dataBuffer;
+ btCollisionShape::serialize(&shapeData->m_collisionShapeData, serializer);
+
+ shapeData->m_collisionMargin = float(m_collisionMargin);
+ shapeData->m_numChildShapes = m_children.size();
+ shapeData->m_childShapePtr = 0;
+ if (shapeData->m_numChildShapes)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btCompoundShapeChildData),shapeData->m_numChildShapes);
+ btCompoundShapeChildData* memPtr = (btCompoundShapeChildData*)chunk->m_oldPtr;
+ shapeData->m_childShapePtr = (btCompoundShapeChildData*)serializer->getUniquePointer(memPtr);
+
+ for (int i=0;i<shapeData->m_numChildShapes;i++,memPtr++)
+ {
+ memPtr->m_childMargin = float(m_children[i].m_childMargin);
+ memPtr->m_childShape = (btCollisionShapeData*)serializer->getUniquePointer(m_children[i].m_childShape);
+ //don't serialize shapes that already have been serialized
+ if (!serializer->findPointer(m_children[i].m_childShape))
+ {
+ btChunk* chunk = serializer->allocate(m_children[i].m_childShape->calculateSerializeBufferSize(),1);
+ const char* structType = m_children[i].m_childShape->serialize(chunk->m_oldPtr,serializer);
+ serializer->finalizeChunk(chunk,structType,BT_SHAPE_CODE,m_children[i].m_childShape);
+ }
+
+ memPtr->m_childShapeType = m_children[i].m_childShapeType;
+ m_children[i].m_transform.serializeFloat(memPtr->m_transform);
+ }
+ serializer->finalizeChunk(chunk,"btCompoundShapeChildData",BT_ARRAY_CODE,chunk->m_oldPtr);
+ }
+ return "btCompoundShapeData";
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.h
new file mode 100644
index 00000000..141034a8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCompoundShape.h
@@ -0,0 +1,212 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_COMPOUND_SHAPE_H
+#define BT_COMPOUND_SHAPE_H
+
+#include "btCollisionShape.h"
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "btCollisionMargin.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+//class btOptimizedBvh;
+struct btDbvt;
+
+ATTRIBUTE_ALIGNED16(struct) btCompoundShapeChild
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btTransform m_transform;
+ btCollisionShape* m_childShape;
+ int m_childShapeType;
+ btScalar m_childMargin;
+ struct btDbvtNode* m_node;
+};
+
+SIMD_FORCE_INLINE bool operator==(const btCompoundShapeChild& c1, const btCompoundShapeChild& c2)
+{
+ return ( c1.m_transform == c2.m_transform &&
+ c1.m_childShape == c2.m_childShape &&
+ c1.m_childShapeType == c2.m_childShapeType &&
+ c1.m_childMargin == c2.m_childMargin );
+}
+
+/// The btCompoundShape allows to store multiple other btCollisionShapes
+/// This allows for moving concave collision objects. This is more general then the static concave btBvhTriangleMeshShape.
+/// It has an (optional) dynamic aabb tree to accelerate early rejection tests.
+/// @todo: This aabb tree can also be use to speed up ray tests on btCompoundShape, see http://code.google.com/p/bullet/issues/detail?id=25
+/// Currently, removal of child shapes is only supported when disabling the aabb tree (pass 'false' in the constructor of btCompoundShape)
+ATTRIBUTE_ALIGNED16(class) btCompoundShape : public btCollisionShape
+{
+ btAlignedObjectArray<btCompoundShapeChild> m_children;
+ btVector3 m_localAabbMin;
+ btVector3 m_localAabbMax;
+
+ btDbvt* m_dynamicAabbTree;
+
+ ///increment m_updateRevision when adding/removing/replacing child shapes, so that some caches can be updated
+ int m_updateRevision;
+
+ btScalar m_collisionMargin;
+
+protected:
+ btVector3 m_localScaling;
+
+public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btCompoundShape(bool enableDynamicAabbTree = true);
+
+ virtual ~btCompoundShape();
+
+ void addChildShape(const btTransform& localTransform,btCollisionShape* shape);
+
+ /// Remove all children shapes that contain the specified shape
+ virtual void removeChildShape(btCollisionShape* shape);
+
+ void removeChildShapeByIndex(int childShapeindex);
+
+
+ int getNumChildShapes() const
+ {
+ return int (m_children.size());
+ }
+
+ btCollisionShape* getChildShape(int index)
+ {
+ return m_children[index].m_childShape;
+ }
+ const btCollisionShape* getChildShape(int index) const
+ {
+ return m_children[index].m_childShape;
+ }
+
+ btTransform& getChildTransform(int index)
+ {
+ return m_children[index].m_transform;
+ }
+ const btTransform& getChildTransform(int index) const
+ {
+ return m_children[index].m_transform;
+ }
+
+ ///set a new transform for a child, and update internal data structures (local aabb and dynamic tree)
+ void updateChildTransform(int childIndex, const btTransform& newChildTransform, bool shouldRecalculateLocalAabb = true);
+
+
+ btCompoundShapeChild* getChildList()
+ {
+ return &m_children[0];
+ }
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ /** Re-calculate the local Aabb. Is called at the end of removeChildShapes.
+ Use this yourself if you modify the children or their transforms. */
+ virtual void recalculateLocalAabb();
+
+ virtual void setLocalScaling(const btVector3& scaling);
+
+ virtual const btVector3& getLocalScaling() const
+ {
+ return m_localScaling;
+ }
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual void setMargin(btScalar margin)
+ {
+ m_collisionMargin = margin;
+ }
+ virtual btScalar getMargin() const
+ {
+ return m_collisionMargin;
+ }
+ virtual const char* getName()const
+ {
+ return "Compound";
+ }
+
+ const btDbvt* getDynamicAabbTree() const
+ {
+ return m_dynamicAabbTree;
+ }
+
+ btDbvt* getDynamicAabbTree()
+ {
+ return m_dynamicAabbTree;
+ }
+
+ void createAabbTreeFromChildren();
+
+ ///computes the exact moment of inertia and the transform from the coordinate system defined by the principal axes of the moment of inertia
+ ///and the center of mass to the current coordinate system. "masses" points to an array of masses of the children. The resulting transform
+ ///"principal" has to be applied inversely to all children transforms in order for the local coordinate system of the compound
+ ///shape to be centered at the center of mass and to coincide with the principal axes. This also necessitates a correction of the world transform
+ ///of the collision object by the principal transform.
+ void calculatePrincipalAxisTransform(btScalar* masses, btTransform& principal, btVector3& inertia) const;
+
+ int getUpdateRevision() const
+ {
+ return m_updateRevision;
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btCompoundShapeChildData
+{
+ btTransformFloatData m_transform;
+ btCollisionShapeData *m_childShape;
+ int m_childShapeType;
+ float m_childMargin;
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btCompoundShapeData
+{
+ btCollisionShapeData m_collisionShapeData;
+
+ btCompoundShapeChildData *m_childShapePtr;
+
+ int m_numChildShapes;
+
+ float m_collisionMargin;
+
+};
+
+
+SIMD_FORCE_INLINE int btCompoundShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btCompoundShapeData);
+}
+
+
+
+
+
+
+
+#endif //BT_COMPOUND_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.cpp
new file mode 100644
index 00000000..58ff84a5
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.cpp
@@ -0,0 +1,27 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btConcaveShape.h"
+
+btConcaveShape::btConcaveShape() : m_collisionMargin(btScalar(0.))
+{
+
+}
+
+btConcaveShape::~btConcaveShape()
+{
+
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.h
new file mode 100644
index 00000000..2a03241c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConcaveShape.h
@@ -0,0 +1,60 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONCAVE_SHAPE_H
+#define BT_CONCAVE_SHAPE_H
+
+#include "btCollisionShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+#include "btTriangleCallback.h"
+
+/// PHY_ScalarType enumerates possible scalar types.
+/// See the btStridingMeshInterface or btHeightfieldTerrainShape for its use
+typedef enum PHY_ScalarType {
+ PHY_FLOAT,
+ PHY_DOUBLE,
+ PHY_INTEGER,
+ PHY_SHORT,
+ PHY_FIXEDPOINT88,
+ PHY_UCHAR
+} PHY_ScalarType;
+
+///The btConcaveShape class provides an interface for non-moving (static) concave shapes.
+///It has been implemented by the btStaticPlaneShape, btBvhTriangleMeshShape and btHeightfieldTerrainShape.
+class btConcaveShape : public btCollisionShape
+{
+protected:
+ btScalar m_collisionMargin;
+
+public:
+ btConcaveShape();
+
+ virtual ~btConcaveShape();
+
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const = 0;
+
+ virtual btScalar getMargin() const {
+ return m_collisionMargin;
+ }
+ virtual void setMargin(btScalar collisionMargin)
+ {
+ m_collisionMargin = collisionMargin;
+ }
+
+
+
+};
+
+#endif //BT_CONCAVE_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.cpp
new file mode 100644
index 00000000..5e83087b
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.cpp
@@ -0,0 +1,143 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConeShape.h"
+
+
+
+btConeShape::btConeShape (btScalar radius,btScalar height): btConvexInternalShape (),
+m_radius (radius),
+m_height(height)
+{
+ m_shapeType = CONE_SHAPE_PROXYTYPE;
+ setConeUpIndex(1);
+ btVector3 halfExtents;
+ m_sinAngle = (m_radius / btSqrt(m_radius * m_radius + m_height * m_height));
+}
+
+btConeShapeZ::btConeShapeZ (btScalar radius,btScalar height):
+btConeShape(radius,height)
+{
+ setConeUpIndex(2);
+}
+
+btConeShapeX::btConeShapeX (btScalar radius,btScalar height):
+btConeShape(radius,height)
+{
+ setConeUpIndex(0);
+}
+
+///choose upAxis index
+void btConeShape::setConeUpIndex(int upIndex)
+{
+ switch (upIndex)
+ {
+ case 0:
+ m_coneIndices[0] = 1;
+ m_coneIndices[1] = 0;
+ m_coneIndices[2] = 2;
+ break;
+ case 1:
+ m_coneIndices[0] = 0;
+ m_coneIndices[1] = 1;
+ m_coneIndices[2] = 2;
+ break;
+ case 2:
+ m_coneIndices[0] = 0;
+ m_coneIndices[1] = 2;
+ m_coneIndices[2] = 1;
+ break;
+ default:
+ btAssert(0);
+ };
+}
+
+btVector3 btConeShape::coneLocalSupport(const btVector3& v) const
+{
+
+ btScalar halfHeight = m_height * btScalar(0.5);
+
+ if (v[m_coneIndices[1]] > v.length() * m_sinAngle)
+ {
+ btVector3 tmp;
+
+ tmp[m_coneIndices[0]] = btScalar(0.);
+ tmp[m_coneIndices[1]] = halfHeight;
+ tmp[m_coneIndices[2]] = btScalar(0.);
+ return tmp;
+ }
+ else {
+ btScalar s = btSqrt(v[m_coneIndices[0]] * v[m_coneIndices[0]] + v[m_coneIndices[2]] * v[m_coneIndices[2]]);
+ if (s > SIMD_EPSILON) {
+ btScalar d = m_radius / s;
+ btVector3 tmp;
+ tmp[m_coneIndices[0]] = v[m_coneIndices[0]] * d;
+ tmp[m_coneIndices[1]] = -halfHeight;
+ tmp[m_coneIndices[2]] = v[m_coneIndices[2]] * d;
+ return tmp;
+ }
+ else {
+ btVector3 tmp;
+ tmp[m_coneIndices[0]] = btScalar(0.);
+ tmp[m_coneIndices[1]] = -halfHeight;
+ tmp[m_coneIndices[2]] = btScalar(0.);
+ return tmp;
+ }
+ }
+
+}
+
+btVector3 btConeShape::localGetSupportingVertexWithoutMargin(const btVector3& vec) const
+{
+ return coneLocalSupport(vec);
+}
+
+void btConeShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ for (int i=0;i<numVectors;i++)
+ {
+ const btVector3& vec = vectors[i];
+ supportVerticesOut[i] = coneLocalSupport(vec);
+ }
+}
+
+
+btVector3 btConeShape::localGetSupportingVertex(const btVector3& vec) const
+{
+ btVector3 supVertex = coneLocalSupport(vec);
+ if ( getMargin()!=btScalar(0.) )
+ {
+ btVector3 vecnorm = vec;
+ if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ vecnorm.normalize();
+ supVertex+= getMargin() * vecnorm;
+ }
+ return supVertex;
+}
+
+
+void btConeShape::setLocalScaling(const btVector3& scaling)
+{
+ int axis = m_coneIndices[1];
+ int r1 = m_coneIndices[0];
+ int r2 = m_coneIndices[2];
+ m_height *= scaling[axis] / m_localScaling[axis];
+ m_radius *= (scaling[r1] / m_localScaling[r1] + scaling[r2] / m_localScaling[r2]) / 2;
+ m_sinAngle = (m_radius / btSqrt(m_radius * m_radius + m_height * m_height));
+ btConvexInternalShape::setLocalScaling(scaling);
+} \ No newline at end of file
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.h
new file mode 100644
index 00000000..b69b5c5b
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConeShape.h
@@ -0,0 +1,103 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONE_MINKOWSKI_H
+#define BT_CONE_MINKOWSKI_H
+
+#include "btConvexInternalShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+///The btConeShape implements a cone shape primitive, centered around the origin and aligned with the Y axis. The btConeShapeX is aligned around the X axis and btConeShapeZ around the Z axis.
+class btConeShape : public btConvexInternalShape
+
+{
+
+ btScalar m_sinAngle;
+ btScalar m_radius;
+ btScalar m_height;
+ int m_coneIndices[3];
+ btVector3 coneLocalSupport(const btVector3& v) const;
+
+
+public:
+ btConeShape (btScalar radius,btScalar height);
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec) const;
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const;
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ btScalar getRadius() const { return m_radius;}
+ btScalar getHeight() const { return m_height;}
+
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const
+ {
+ btTransform identity;
+ identity.setIdentity();
+ btVector3 aabbMin,aabbMax;
+ getAabb(identity,aabbMin,aabbMax);
+
+ btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5);
+
+ btScalar margin = getMargin();
+
+ btScalar lx=btScalar(2.)*(halfExtents.x()+margin);
+ btScalar ly=btScalar(2.)*(halfExtents.y()+margin);
+ btScalar lz=btScalar(2.)*(halfExtents.z()+margin);
+ const btScalar x2 = lx*lx;
+ const btScalar y2 = ly*ly;
+ const btScalar z2 = lz*lz;
+ const btScalar scaledmass = mass * btScalar(0.08333333);
+
+ inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2));
+
+// inertia.x() = scaledmass * (y2+z2);
+// inertia.y() = scaledmass * (x2+z2);
+// inertia.z() = scaledmass * (x2+y2);
+ }
+
+
+ virtual const char* getName()const
+ {
+ return "Cone";
+ }
+
+ ///choose upAxis index
+ void setConeUpIndex(int upIndex);
+
+ int getConeUpIndex() const
+ {
+ return m_coneIndices[1];
+ }
+
+ virtual void setLocalScaling(const btVector3& scaling);
+
+};
+
+///btConeShape implements a Cone shape, around the X axis
+class btConeShapeX : public btConeShape
+{
+ public:
+ btConeShapeX(btScalar radius,btScalar height);
+};
+
+///btConeShapeZ implements a Cone shape, around the Z axis
+class btConeShapeZ : public btConeShape
+{
+ public:
+ btConeShapeZ(btScalar radius,btScalar height);
+};
+#endif //BT_CONE_MINKOWSKI_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp
new file mode 100644
index 00000000..10ea3e98
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.cpp
@@ -0,0 +1,92 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvex2dShape.h"
+
+btConvex2dShape::btConvex2dShape( btConvexShape* convexChildShape):
+btConvexShape (), m_childConvexShape(convexChildShape)
+{
+ m_shapeType = CONVEX_2D_SHAPE_PROXYTYPE;
+}
+
+btConvex2dShape::~btConvex2dShape()
+{
+}
+
+
+
+btVector3 btConvex2dShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ return m_childConvexShape->localGetSupportingVertexWithoutMargin(vec);
+}
+
+void btConvex2dShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ m_childConvexShape->batchedUnitVectorGetSupportingVertexWithoutMargin(vectors,supportVerticesOut,numVectors);
+}
+
+
+btVector3 btConvex2dShape::localGetSupportingVertex(const btVector3& vec)const
+{
+ return m_childConvexShape->localGetSupportingVertex(vec);
+}
+
+
+void btConvex2dShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ ///this linear upscaling is not realistic, but we don't deal with large mass ratios...
+ m_childConvexShape->calculateLocalInertia(mass,inertia);
+}
+
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+void btConvex2dShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ m_childConvexShape->getAabb(t,aabbMin,aabbMax);
+}
+
+void btConvex2dShape::getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ m_childConvexShape->getAabbSlow(t,aabbMin,aabbMax);
+}
+
+void btConvex2dShape::setLocalScaling(const btVector3& scaling)
+{
+ m_childConvexShape->setLocalScaling(scaling);
+}
+
+const btVector3& btConvex2dShape::getLocalScaling() const
+{
+ return m_childConvexShape->getLocalScaling();
+}
+
+void btConvex2dShape::setMargin(btScalar margin)
+{
+ m_childConvexShape->setMargin(margin);
+}
+btScalar btConvex2dShape::getMargin() const
+{
+ return m_childConvexShape->getMargin();
+}
+
+int btConvex2dShape::getNumPreferredPenetrationDirections() const
+{
+ return m_childConvexShape->getNumPreferredPenetrationDirections();
+}
+
+void btConvex2dShape::getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
+{
+ m_childConvexShape->getPreferredPenetrationDirection(index,penetrationVector);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.h
new file mode 100644
index 00000000..caf54329
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvex2dShape.h
@@ -0,0 +1,80 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_2D_SHAPE_H
+#define BT_CONVEX_2D_SHAPE_H
+
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+///The btConvex2dShape allows to use arbitrary convex shapes as 2d convex shapes, with the Z component assumed to be 0.
+///For 2d boxes, the btBox2dShape is recommended.
+class btConvex2dShape : public btConvexShape
+{
+ btConvexShape* m_childConvexShape;
+
+ public:
+
+ btConvex2dShape( btConvexShape* convexChildShape);
+
+ virtual ~btConvex2dShape();
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ btConvexShape* getChildShape()
+ {
+ return m_childConvexShape;
+ }
+
+ const btConvexShape* getChildShape() const
+ {
+ return m_childConvexShape;
+ }
+
+ virtual const char* getName()const
+ {
+ return "Convex2dShape";
+ }
+
+
+
+ ///////////////////////////
+
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+ void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void setLocalScaling(const btVector3& scaling) ;
+ virtual const btVector3& getLocalScaling() const ;
+
+ virtual void setMargin(btScalar margin);
+ virtual btScalar getMargin() const;
+
+ virtual int getNumPreferredPenetrationDirections() const;
+
+ virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const;
+
+
+};
+
+#endif //BT_CONVEX_2D_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp
new file mode 100644
index 00000000..69bc67ca
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.cpp
@@ -0,0 +1,211 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvexHullShape.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+
+#include "LinearMath/btQuaternion.h"
+#include "LinearMath/btSerializer.h"
+
+btConvexHullShape ::btConvexHullShape (const btScalar* points,int numPoints,int stride) : btPolyhedralConvexAabbCachingShape ()
+{
+ m_shapeType = CONVEX_HULL_SHAPE_PROXYTYPE;
+ m_unscaledPoints.resize(numPoints);
+
+ unsigned char* pointsAddress = (unsigned char*)points;
+
+ for (int i=0;i<numPoints;i++)
+ {
+ btScalar* point = (btScalar*)pointsAddress;
+ m_unscaledPoints[i] = btVector3(point[0], point[1], point[2]);
+ pointsAddress += stride;
+ }
+
+ recalcLocalAabb();
+
+}
+
+
+
+void btConvexHullShape::setLocalScaling(const btVector3& scaling)
+{
+ m_localScaling = scaling;
+ recalcLocalAabb();
+}
+
+void btConvexHullShape::addPoint(const btVector3& point)
+{
+ m_unscaledPoints.push_back(point);
+ recalcLocalAabb();
+
+}
+
+btVector3 btConvexHullShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.));
+ btScalar newDot,maxDot = btScalar(-BT_LARGE_FLOAT);
+
+ for (int i=0;i<m_unscaledPoints.size();i++)
+ {
+ btVector3 vtx = m_unscaledPoints[i] * m_localScaling;
+
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+ return supVec;
+}
+
+void btConvexHullShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ btScalar newDot;
+ //use 'w' component of supportVerticesOut?
+ {
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
+ }
+ }
+ for (int i=0;i<m_unscaledPoints.size();i++)
+ {
+ btVector3 vtx = getScaledPoint(i);
+
+ for (int j=0;j<numVectors;j++)
+ {
+ const btVector3& vec = vectors[j];
+
+ newDot = vec.dot(vtx);
+ if (newDot > supportVerticesOut[j][3])
+ {
+ //WARNING: don't swap next lines, the w component would get overwritten!
+ supportVerticesOut[j] = vtx;
+ supportVerticesOut[j][3] = newDot;
+ }
+ }
+ }
+
+
+
+}
+
+
+
+btVector3 btConvexHullShape::localGetSupportingVertex(const btVector3& vec)const
+{
+ btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec);
+
+ if ( getMargin()!=btScalar(0.) )
+ {
+ btVector3 vecnorm = vec;
+ if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ vecnorm.normalize();
+ supVertex+= getMargin() * vecnorm;
+ }
+ return supVertex;
+}
+
+
+
+
+
+
+
+
+
+//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection
+//Please note that you can debug-draw btConvexHullShape with the Raytracer Demo
+int btConvexHullShape::getNumVertices() const
+{
+ return m_unscaledPoints.size();
+}
+
+int btConvexHullShape::getNumEdges() const
+{
+ return m_unscaledPoints.size();
+}
+
+void btConvexHullShape::getEdge(int i,btVector3& pa,btVector3& pb) const
+{
+
+ int index0 = i%m_unscaledPoints.size();
+ int index1 = (i+1)%m_unscaledPoints.size();
+ pa = getScaledPoint(index0);
+ pb = getScaledPoint(index1);
+}
+
+void btConvexHullShape::getVertex(int i,btVector3& vtx) const
+{
+ vtx = getScaledPoint(i);
+}
+
+int btConvexHullShape::getNumPlanes() const
+{
+ return 0;
+}
+
+void btConvexHullShape::getPlane(btVector3& ,btVector3& ,int ) const
+{
+
+ btAssert(0);
+}
+
+//not yet
+bool btConvexHullShape::isInside(const btVector3& ,btScalar ) const
+{
+ btAssert(0);
+ return false;
+}
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btConvexHullShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ //int szc = sizeof(btConvexHullShapeData);
+ btConvexHullShapeData* shapeData = (btConvexHullShapeData*) dataBuffer;
+ btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData, serializer);
+
+ int numElem = m_unscaledPoints.size();
+ shapeData->m_numUnscaledPoints = numElem;
+#ifdef BT_USE_DOUBLE_PRECISION
+ shapeData->m_unscaledPointsFloatPtr = 0;
+ shapeData->m_unscaledPointsDoublePtr = numElem ? (btVector3Data*)serializer->getUniquePointer((void*)&m_unscaledPoints[0]): 0;
+#else
+ shapeData->m_unscaledPointsFloatPtr = numElem ? (btVector3Data*)serializer->getUniquePointer((void*)&m_unscaledPoints[0]): 0;
+ shapeData->m_unscaledPointsDoublePtr = 0;
+#endif
+
+ if (numElem)
+ {
+ int sz = sizeof(btVector3Data);
+ // int sz2 = sizeof(btVector3DoubleData);
+ // int sz3 = sizeof(btVector3FloatData);
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btVector3Data* memPtr = (btVector3Data*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_unscaledPoints[i].serialize(*memPtr);
+ }
+ serializer->finalizeChunk(chunk,btVector3DataName,BT_ARRAY_CODE,(void*)&m_unscaledPoints[0]);
+ }
+
+ return "btConvexHullShapeData";
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.h
new file mode 100644
index 00000000..1f7c89de
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexHullShape.h
@@ -0,0 +1,120 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_HULL_SHAPE_H
+#define BT_CONVEX_HULL_SHAPE_H
+
+#include "btPolyhedralConvexShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+///The btConvexHullShape implements an implicit convex hull of an array of vertices.
+///Bullet provides a general and fast collision detector for convex shapes based on GJK and EPA using localGetSupportingVertex.
+ATTRIBUTE_ALIGNED16(class) btConvexHullShape : public btPolyhedralConvexAabbCachingShape
+{
+ btAlignedObjectArray<btVector3> m_unscaledPoints;
+
+public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+
+ ///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory.
+ ///It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint.
+ ///btConvexHullShape make an internal copy of the points.
+ btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btVector3));
+
+ void addPoint(const btVector3& point);
+
+
+ btVector3* getUnscaledPoints()
+ {
+ return &m_unscaledPoints[0];
+ }
+
+ const btVector3* getUnscaledPoints() const
+ {
+ return &m_unscaledPoints[0];
+ }
+
+ ///getPoints is obsolete, please use getUnscaledPoints
+ const btVector3* getPoints() const
+ {
+ return getUnscaledPoints();
+ }
+
+
+
+
+ SIMD_FORCE_INLINE btVector3 getScaledPoint(int i) const
+ {
+ return m_unscaledPoints[i] * m_localScaling;
+ }
+
+ SIMD_FORCE_INLINE int getNumPoints() const
+ {
+ return m_unscaledPoints.size();
+ }
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+
+
+ //debugging
+ virtual const char* getName()const {return "Convex";}
+
+
+ virtual int getNumVertices() const;
+ virtual int getNumEdges() const;
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const;
+ virtual void getVertex(int i,btVector3& vtx) const;
+ virtual int getNumPlanes() const;
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const;
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
+
+ ///in case we receive negative scaling
+ virtual void setLocalScaling(const btVector3& scaling);
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btConvexHullShapeData
+{
+ btConvexInternalShapeData m_convexInternalShapeData;
+
+ btVector3FloatData *m_unscaledPointsFloatPtr;
+ btVector3DoubleData *m_unscaledPointsDoublePtr;
+
+ int m_numUnscaledPoints;
+ char m_padding3[4];
+
+};
+
+
+SIMD_FORCE_INLINE int btConvexHullShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btConvexHullShapeData);
+}
+
+
+#endif //BT_CONVEX_HULL_SHAPE_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp
new file mode 100644
index 00000000..083d60b1
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.cpp
@@ -0,0 +1,151 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btConvexInternalShape.h"
+
+
+
+btConvexInternalShape::btConvexInternalShape()
+: m_localScaling(btScalar(1.),btScalar(1.),btScalar(1.)),
+m_collisionMargin(CONVEX_DISTANCE_MARGIN)
+{
+}
+
+
+void btConvexInternalShape::setLocalScaling(const btVector3& scaling)
+{
+ m_localScaling = scaling.absolute();
+}
+
+
+
+void btConvexInternalShape::getAabbSlow(const btTransform& trans,btVector3&minAabb,btVector3&maxAabb) const
+{
+#ifndef __SPU__
+ //use localGetSupportingVertexWithoutMargin?
+ btScalar margin = getMargin();
+ for (int i=0;i<3;i++)
+ {
+ btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
+ vec[i] = btScalar(1.);
+
+ btVector3 sv = localGetSupportingVertex(vec*trans.getBasis());
+
+ btVector3 tmp = trans(sv);
+ maxAabb[i] = tmp[i]+margin;
+ vec[i] = btScalar(-1.);
+ tmp = trans(localGetSupportingVertex(vec*trans.getBasis()));
+ minAabb[i] = tmp[i]-margin;
+ }
+#endif
+}
+
+
+
+btVector3 btConvexInternalShape::localGetSupportingVertex(const btVector3& vec)const
+{
+#ifndef __SPU__
+
+ btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec);
+
+ if ( getMargin()!=btScalar(0.) )
+ {
+ btVector3 vecnorm = vec;
+ if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ vecnorm.normalize();
+ supVertex+= getMargin() * vecnorm;
+ }
+ return supVertex;
+
+#else
+ btAssert(0);
+ return btVector3(0,0,0);
+#endif //__SPU__
+
+ }
+
+
+btConvexInternalAabbCachingShape::btConvexInternalAabbCachingShape()
+ : btConvexInternalShape(),
+m_localAabbMin(1,1,1),
+m_localAabbMax(-1,-1,-1),
+m_isLocalAabbValid(false)
+{
+}
+
+
+void btConvexInternalAabbCachingShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ getNonvirtualAabb(trans,aabbMin,aabbMax,getMargin());
+}
+
+void btConvexInternalAabbCachingShape::setLocalScaling(const btVector3& scaling)
+{
+ btConvexInternalShape::setLocalScaling(scaling);
+ recalcLocalAabb();
+}
+
+
+void btConvexInternalAabbCachingShape::recalcLocalAabb()
+{
+ m_isLocalAabbValid = true;
+
+ #if 1
+ static const btVector3 _directions[] =
+ {
+ btVector3( 1., 0., 0.),
+ btVector3( 0., 1., 0.),
+ btVector3( 0., 0., 1.),
+ btVector3( -1., 0., 0.),
+ btVector3( 0., -1., 0.),
+ btVector3( 0., 0., -1.)
+ };
+
+ btVector3 _supporting[] =
+ {
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.)
+ };
+
+ batchedUnitVectorGetSupportingVertexWithoutMargin(_directions, _supporting, 6);
+
+ for ( int i = 0; i < 3; ++i )
+ {
+ m_localAabbMax[i] = _supporting[i][i] + m_collisionMargin;
+ m_localAabbMin[i] = _supporting[i + 3][i] - m_collisionMargin;
+ }
+
+ #else
+
+ for (int i=0;i<3;i++)
+ {
+ btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
+ vec[i] = btScalar(1.);
+ btVector3 tmp = localGetSupportingVertex(vec);
+ m_localAabbMax[i] = tmp[i]+m_collisionMargin;
+ vec[i] = btScalar(-1.);
+ tmp = localGetSupportingVertex(vec);
+ m_localAabbMin[i] = tmp[i]-m_collisionMargin;
+ }
+ #endif
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.h
new file mode 100644
index 00000000..12527731
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.h
@@ -0,0 +1,202 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_INTERNAL_SHAPE_H
+#define BT_CONVEX_INTERNAL_SHAPE_H
+
+#include "btConvexShape.h"
+#include "LinearMath/btAabbUtil2.h"
+
+
+///The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
+class btConvexInternalShape : public btConvexShape
+{
+
+ protected:
+
+ //local scaling. collisionMargin is not scaled !
+ btVector3 m_localScaling;
+
+ btVector3 m_implicitShapeDimensions;
+
+ btScalar m_collisionMargin;
+
+ btScalar m_padding;
+
+ btConvexInternalShape();
+
+public:
+
+
+
+ virtual ~btConvexInternalShape()
+ {
+
+ }
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
+
+ const btVector3& getImplicitShapeDimensions() const
+ {
+ return m_implicitShapeDimensions;
+ }
+
+ ///warning: use setImplicitShapeDimensions with care
+ ///changing a collision shape while the body is in the world is not recommended,
+ ///it is best to remove the body from the world, then make the change, and re-add it
+ ///alternatively flush the contact points, see documentation for 'cleanProxyFromPairs'
+ void setImplicitShapeDimensions(const btVector3& dimensions)
+ {
+ m_implicitShapeDimensions = dimensions;
+ }
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+ void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ getAabbSlow(t,aabbMin,aabbMax);
+ }
+
+
+
+ virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+
+ virtual void setLocalScaling(const btVector3& scaling);
+ virtual const btVector3& getLocalScaling() const
+ {
+ return m_localScaling;
+ }
+
+ const btVector3& getLocalScalingNV() const
+ {
+ return m_localScaling;
+ }
+
+ virtual void setMargin(btScalar margin)
+ {
+ m_collisionMargin = margin;
+ }
+ virtual btScalar getMargin() const
+ {
+ return m_collisionMargin;
+ }
+
+ btScalar getMarginNV() const
+ {
+ return m_collisionMargin;
+ }
+
+ virtual int getNumPreferredPenetrationDirections() const
+ {
+ return 0;
+ }
+
+ virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
+ {
+ (void)penetrationVector;
+ (void)index;
+ btAssert(0);
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btConvexInternalShapeData
+{
+ btCollisionShapeData m_collisionShapeData;
+
+ btVector3FloatData m_localScaling;
+
+ btVector3FloatData m_implicitShapeDimensions;
+
+ float m_collisionMargin;
+
+ int m_padding;
+
+};
+
+
+
+SIMD_FORCE_INLINE int btConvexInternalShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btConvexInternalShapeData);
+}
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btConvexInternalShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btConvexInternalShapeData* shapeData = (btConvexInternalShapeData*) dataBuffer;
+ btCollisionShape::serialize(&shapeData->m_collisionShapeData, serializer);
+
+ m_implicitShapeDimensions.serializeFloat(shapeData->m_implicitShapeDimensions);
+ m_localScaling.serializeFloat(shapeData->m_localScaling);
+ shapeData->m_collisionMargin = float(m_collisionMargin);
+
+ return "btConvexInternalShapeData";
+}
+
+
+
+
+///btConvexInternalAabbCachingShape adds local aabb caching for convex shapes, to avoid expensive bounding box calculations
+class btConvexInternalAabbCachingShape : public btConvexInternalShape
+{
+ btVector3 m_localAabbMin;
+ btVector3 m_localAabbMax;
+ bool m_isLocalAabbValid;
+
+protected:
+
+ btConvexInternalAabbCachingShape();
+
+ void setCachedLocalAabb (const btVector3& aabbMin, const btVector3& aabbMax)
+ {
+ m_isLocalAabbValid = true;
+ m_localAabbMin = aabbMin;
+ m_localAabbMax = aabbMax;
+ }
+
+ inline void getCachedLocalAabb (btVector3& aabbMin, btVector3& aabbMax) const
+ {
+ btAssert(m_isLocalAabbValid);
+ aabbMin = m_localAabbMin;
+ aabbMax = m_localAabbMax;
+ }
+
+ inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const
+ {
+
+ //lazy evaluation of local aabb
+ btAssert(m_isLocalAabbValid);
+ btTransformAabb(m_localAabbMin,m_localAabbMax,margin,trans,aabbMin,aabbMax);
+ }
+
+public:
+
+ virtual void setLocalScaling(const btVector3& scaling);
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ void recalcLocalAabb();
+
+};
+
+#endif //BT_CONVEX_INTERNAL_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp
new file mode 100644
index 00000000..c1b155ae
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp
@@ -0,0 +1,157 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvexPointCloudShape.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+
+#include "LinearMath/btQuaternion.h"
+
+void btConvexPointCloudShape::setLocalScaling(const btVector3& scaling)
+{
+ m_localScaling = scaling;
+ recalcLocalAabb();
+}
+
+#ifndef __SPU__
+btVector3 btConvexPointCloudShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
+{
+ btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.));
+ btScalar newDot,maxDot = btScalar(-BT_LARGE_FLOAT);
+
+ btVector3 vec = vec0;
+ btScalar lenSqr = vec.length2();
+ if (lenSqr < btScalar(0.0001))
+ {
+ vec.setValue(1,0,0);
+ } else
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ vec *= rlen;
+ }
+
+
+ for (int i=0;i<m_numPoints;i++)
+ {
+ btVector3 vtx = getScaledPoint(i);
+
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+ return supVec;
+}
+
+void btConvexPointCloudShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ btScalar newDot;
+ //use 'w' component of supportVerticesOut?
+ {
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
+ }
+ }
+ for (int i=0;i<m_numPoints;i++)
+ {
+ btVector3 vtx = getScaledPoint(i);
+
+ for (int j=0;j<numVectors;j++)
+ {
+ const btVector3& vec = vectors[j];
+
+ newDot = vec.dot(vtx);
+ if (newDot > supportVerticesOut[j][3])
+ {
+ //WARNING: don't swap next lines, the w component would get overwritten!
+ supportVerticesOut[j] = vtx;
+ supportVerticesOut[j][3] = newDot;
+ }
+ }
+ }
+
+
+
+}
+
+
+
+btVector3 btConvexPointCloudShape::localGetSupportingVertex(const btVector3& vec)const
+{
+ btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec);
+
+ if ( getMargin()!=btScalar(0.) )
+ {
+ btVector3 vecnorm = vec;
+ if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ vecnorm.normalize();
+ supVertex+= getMargin() * vecnorm;
+ }
+ return supVertex;
+}
+
+
+#endif
+
+
+
+
+
+
+//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection
+//Please note that you can debug-draw btConvexHullShape with the Raytracer Demo
+int btConvexPointCloudShape::getNumVertices() const
+{
+ return m_numPoints;
+}
+
+int btConvexPointCloudShape::getNumEdges() const
+{
+ return 0;
+}
+
+void btConvexPointCloudShape::getEdge(int i,btVector3& pa,btVector3& pb) const
+{
+ btAssert (0);
+}
+
+void btConvexPointCloudShape::getVertex(int i,btVector3& vtx) const
+{
+ vtx = m_unscaledPoints[i]*m_localScaling;
+}
+
+int btConvexPointCloudShape::getNumPlanes() const
+{
+ return 0;
+}
+
+void btConvexPointCloudShape::getPlane(btVector3& ,btVector3& ,int ) const
+{
+
+ btAssert(0);
+}
+
+//not yet
+bool btConvexPointCloudShape::isInside(const btVector3& ,btScalar ) const
+{
+ btAssert(0);
+ return false;
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.h
new file mode 100644
index 00000000..54b5afac
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.h
@@ -0,0 +1,105 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_POINT_CLOUD_SHAPE_H
+#define BT_CONVEX_POINT_CLOUD_SHAPE_H
+
+#include "btPolyhedralConvexShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+#include "LinearMath/btAlignedObjectArray.h"
+
+///The btConvexPointCloudShape implements an implicit convex hull of an array of vertices.
+ATTRIBUTE_ALIGNED16(class) btConvexPointCloudShape : public btPolyhedralConvexAabbCachingShape
+{
+ btVector3* m_unscaledPoints;
+ int m_numPoints;
+
+public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btConvexPointCloudShape()
+ {
+ m_localScaling.setValue(1.f,1.f,1.f);
+ m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE;
+ m_unscaledPoints = 0;
+ m_numPoints = 0;
+ }
+
+ btConvexPointCloudShape(btVector3* points,int numPoints, const btVector3& localScaling,bool computeAabb = true)
+ {
+ m_localScaling = localScaling;
+ m_shapeType = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE;
+ m_unscaledPoints = points;
+ m_numPoints = numPoints;
+
+ if (computeAabb)
+ recalcLocalAabb();
+ }
+
+ void setPoints (btVector3* points, int numPoints, bool computeAabb = true,const btVector3& localScaling=btVector3(1.f,1.f,1.f))
+ {
+ m_unscaledPoints = points;
+ m_numPoints = numPoints;
+ m_localScaling = localScaling;
+
+ if (computeAabb)
+ recalcLocalAabb();
+ }
+
+ SIMD_FORCE_INLINE btVector3* getUnscaledPoints()
+ {
+ return m_unscaledPoints;
+ }
+
+ SIMD_FORCE_INLINE const btVector3* getUnscaledPoints() const
+ {
+ return m_unscaledPoints;
+ }
+
+ SIMD_FORCE_INLINE int getNumPoints() const
+ {
+ return m_numPoints;
+ }
+
+ SIMD_FORCE_INLINE btVector3 getScaledPoint( int index) const
+ {
+ return m_unscaledPoints[index] * m_localScaling;
+ }
+
+#ifndef __SPU__
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+#endif
+
+
+ //debugging
+ virtual const char* getName()const {return "ConvexPointCloud";}
+
+ virtual int getNumVertices() const;
+ virtual int getNumEdges() const;
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const;
+ virtual void getVertex(int i,btVector3& vtx) const;
+ virtual int getNumPlanes() const;
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const;
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
+
+ ///in case we receive negative scaling
+ virtual void setLocalScaling(const btVector3& scaling);
+};
+
+
+#endif //BT_CONVEX_POINT_CLOUD_SHAPE_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp
new file mode 100644
index 00000000..6fceb6f2
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.cpp
@@ -0,0 +1,185 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2011 Advanced Micro Devices, Inc. http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+///This file was written by Erwin Coumans
+///Separating axis rest based on work from Pierre Terdiman, see
+///And contact clipping based on work from Simon Hobbs
+
+
+#include "btConvexPolyhedron.h"
+#include "LinearMath/btHashMap.h"
+
+btConvexPolyhedron::btConvexPolyhedron()
+{
+
+}
+btConvexPolyhedron::~btConvexPolyhedron()
+{
+
+}
+
+
+inline bool IsAlmostZero(const btVector3& v)
+{
+ if(fabsf(v.x())>1e-6 || fabsf(v.y())>1e-6 || fabsf(v.z())>1e-6) return false;
+ return true;
+}
+
+struct btInternalVertexPair
+{
+ btInternalVertexPair(short int v0,short int v1)
+ :m_v0(v0),
+ m_v1(v1)
+ {
+ if (m_v1>m_v0)
+ btSwap(m_v0,m_v1);
+ }
+ short int m_v0;
+ short int m_v1;
+ int getHash() const
+ {
+ return m_v0+(m_v1<<16);
+ }
+ bool equals(const btInternalVertexPair& other) const
+ {
+ return m_v0==other.m_v0 && m_v1==other.m_v1;
+ }
+};
+
+struct btInternalEdge
+{
+ btInternalEdge()
+ :m_face0(-1),
+ m_face1(-1)
+ {
+ }
+ short int m_face0;
+ short int m_face1;
+};
+
+//
+
+void btConvexPolyhedron::initialize()
+{
+ btHashMap<btInternalVertexPair,btInternalEdge> edges;
+
+ float TotalArea = 0.0f;
+
+ m_localCenter.setValue(0, 0, 0);
+ for(int i=0;i<m_faces.size();i++)
+ {
+ int numVertices = m_faces[i].m_indices.size();
+ int NbTris = numVertices;
+ for(int j=0;j<NbTris;j++)
+ {
+ int k = (j+1)%numVertices;
+ btInternalVertexPair vp(m_faces[i].m_indices[j],m_faces[i].m_indices[k]);
+ btInternalEdge* edptr = edges.find(vp);
+ btVector3 edge = m_vertices[vp.m_v1]-m_vertices[vp.m_v0];
+ edge.normalize();
+
+ bool found = false;
+
+ for (int p=0;p<m_uniqueEdges.size();p++)
+ {
+
+ if (IsAlmostZero(m_uniqueEdges[p]-edge) ||
+ IsAlmostZero(m_uniqueEdges[p]+edge))
+ {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found)
+ {
+ m_uniqueEdges.push_back(edge);
+ }
+
+ if (edptr)
+ {
+ btAssert(edptr->m_face0>=0);
+ btAssert(edptr->m_face1<0);
+ edptr->m_face1 = i;
+ } else
+ {
+ btInternalEdge ed;
+ ed.m_face0 = i;
+ edges.insert(vp,ed);
+ }
+ }
+ }
+
+ for(int i=0;i<m_faces.size();i++)
+ {
+ int numVertices = m_faces[i].m_indices.size();
+ m_faces[i].m_connectedFaces.resize(numVertices);
+
+ for(int j=0;j<numVertices;j++)
+ {
+ int k = (j+1)%numVertices;
+ btInternalVertexPair vp(m_faces[i].m_indices[j],m_faces[i].m_indices[k]);
+ btInternalEdge* edptr = edges.find(vp);
+ btAssert(edptr);
+ btAssert(edptr->m_face0>=0);
+ btAssert(edptr->m_face1>=0);
+
+ int connectedFace = (edptr->m_face0==i)?edptr->m_face1:edptr->m_face0;
+ m_faces[i].m_connectedFaces[j] = connectedFace;
+ }
+ }
+
+ for(int i=0;i<m_faces.size();i++)
+ {
+ int numVertices = m_faces[i].m_indices.size();
+ int NbTris = numVertices-2;
+
+ const btVector3& p0 = m_vertices[m_faces[i].m_indices[0]];
+ for(int j=1;j<=NbTris;j++)
+ {
+ int k = (j+1)%numVertices;
+ const btVector3& p1 = m_vertices[m_faces[i].m_indices[j]];
+ const btVector3& p2 = m_vertices[m_faces[i].m_indices[k]];
+ float Area = ((p0 - p1).cross(p0 - p2)).length() * 0.5f;
+ btVector3 Center = (p0+p1+p2)/3.0f;
+ m_localCenter += Area * Center;
+ TotalArea += Area;
+ }
+ }
+ m_localCenter /= TotalArea;
+
+}
+
+
+void btConvexPolyhedron::project(const btTransform& trans, const btVector3& dir, float& min, float& max) const
+{
+ min = FLT_MAX;
+ max = -FLT_MAX;
+ int numVerts = m_vertices.size();
+ for(int i=0;i<numVerts;i++)
+ {
+ btVector3 pt = trans * m_vertices[i];
+ float dp = pt.dot(dir);
+ if(dp < min) min = dp;
+ if(dp > max) max = dp;
+ }
+ if(min>max)
+ {
+ float tmp = min;
+ min = max;
+ max = tmp;
+ }
+} \ No newline at end of file
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.h
new file mode 100644
index 00000000..a64cdbfd
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexPolyhedron.h
@@ -0,0 +1,54 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2011 Advanced Micro Devices, Inc. http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+///This file was written by Erwin Coumans
+
+
+#ifndef _BT_POLYHEDRAL_FEATURES_H
+#define _BT_POLYHEDRAL_FEATURES_H
+
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+struct btFace
+{
+ btAlignedObjectArray<int> m_indices;
+ btAlignedObjectArray<int> m_connectedFaces;
+ float m_plane[4];
+};
+
+
+class btConvexPolyhedron
+{
+ public:
+ btConvexPolyhedron();
+ virtual ~btConvexPolyhedron();
+
+ btAlignedObjectArray<btVector3> m_vertices;
+ btAlignedObjectArray<btFace> m_faces;
+ btAlignedObjectArray<btVector3> m_uniqueEdges;
+ btVector3 m_localCenter;
+
+ void initialize();
+
+ void project(const btTransform& trans, const btVector3& dir, float& min, float& max) const;
+};
+
+
+#endif //_BT_POLYHEDRAL_FEATURES_H
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.cpp
new file mode 100644
index 00000000..f5f3aa58
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.cpp
@@ -0,0 +1,429 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvexShape.h"
+#include "btTriangleShape.h"
+#include "btSphereShape.h"
+#include "btCylinderShape.h"
+#include "btCapsuleShape.h"
+#include "btConvexHullShape.h"
+#include "btConvexPointCloudShape.h"
+
+///not supported on IBM SDK, until we fix the alignment of btVector3
+#if defined (__CELLOS_LV2__) && defined (__SPU__)
+#include <spu_intrinsics.h>
+static inline vec_float4 vec_dot3( vec_float4 vec0, vec_float4 vec1 )
+{
+ vec_float4 result;
+ result = spu_mul( vec0, vec1 );
+ result = spu_madd( spu_rlqwbyte( vec0, 4 ), spu_rlqwbyte( vec1, 4 ), result );
+ return spu_madd( spu_rlqwbyte( vec0, 8 ), spu_rlqwbyte( vec1, 8 ), result );
+}
+#endif //__SPU__
+
+btConvexShape::btConvexShape ()
+{
+}
+
+btConvexShape::~btConvexShape()
+{
+
+}
+
+
+
+static btVector3 convexHullSupport (const btVector3& localDirOrg, const btVector3* points, int numPoints, const btVector3& localScaling)
+{
+
+ btVector3 vec = localDirOrg * localScaling;
+
+#if defined (__CELLOS_LV2__) && defined (__SPU__)
+
+ btVector3 localDir = vec;
+
+ vec_float4 v_distMax = {-FLT_MAX,0,0,0};
+ vec_int4 v_idxMax = {-999,0,0,0};
+ int v=0;
+ int numverts = numPoints;
+
+ for(;v<(int)numverts-4;v+=4) {
+ vec_float4 p0 = vec_dot3(points[v ].get128(),localDir.get128());
+ vec_float4 p1 = vec_dot3(points[v+1].get128(),localDir.get128());
+ vec_float4 p2 = vec_dot3(points[v+2].get128(),localDir.get128());
+ vec_float4 p3 = vec_dot3(points[v+3].get128(),localDir.get128());
+ const vec_int4 i0 = {v ,0,0,0};
+ const vec_int4 i1 = {v+1,0,0,0};
+ const vec_int4 i2 = {v+2,0,0,0};
+ const vec_int4 i3 = {v+3,0,0,0};
+ vec_uint4 retGt01 = spu_cmpgt(p0,p1);
+ vec_float4 pmax01 = spu_sel(p1,p0,retGt01);
+ vec_int4 imax01 = spu_sel(i1,i0,retGt01);
+ vec_uint4 retGt23 = spu_cmpgt(p2,p3);
+ vec_float4 pmax23 = spu_sel(p3,p2,retGt23);
+ vec_int4 imax23 = spu_sel(i3,i2,retGt23);
+ vec_uint4 retGt0123 = spu_cmpgt(pmax01,pmax23);
+ vec_float4 pmax0123 = spu_sel(pmax23,pmax01,retGt0123);
+ vec_int4 imax0123 = spu_sel(imax23,imax01,retGt0123);
+ vec_uint4 retGtMax = spu_cmpgt(v_distMax,pmax0123);
+ v_distMax = spu_sel(pmax0123,v_distMax,retGtMax);
+ v_idxMax = spu_sel(imax0123,v_idxMax,retGtMax);
+ }
+ for(;v<(int)numverts;v++) {
+ vec_float4 p = vec_dot3(points[v].get128(),localDir.get128());
+ const vec_int4 i = {v,0,0,0};
+ vec_uint4 retGtMax = spu_cmpgt(v_distMax,p);
+ v_distMax = spu_sel(p,v_distMax,retGtMax);
+ v_idxMax = spu_sel(i,v_idxMax,retGtMax);
+ }
+ int ptIndex = spu_extract(v_idxMax,0);
+ const btVector3& supVec= points[ptIndex] * localScaling;
+ return supVec;
+#else
+
+ btScalar newDot,maxDot = btScalar(-BT_LARGE_FLOAT);
+ int ptIndex = -1;
+
+ for (int i=0;i<numPoints;i++)
+ {
+
+ newDot = vec.dot(points[i]);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ ptIndex = i;
+ }
+ }
+ btAssert(ptIndex >= 0);
+ btVector3 supVec = points[ptIndex] * localScaling;
+ return supVec;
+#endif //__SPU__
+}
+
+btVector3 btConvexShape::localGetSupportVertexWithoutMarginNonVirtual (const btVector3& localDir) const
+{
+ switch (m_shapeType)
+ {
+ case SPHERE_SHAPE_PROXYTYPE:
+ {
+ return btVector3(0,0,0);
+ }
+ case BOX_SHAPE_PROXYTYPE:
+ {
+ btBoxShape* convexShape = (btBoxShape*)this;
+ const btVector3& halfExtents = convexShape->getImplicitShapeDimensions();
+
+ return btVector3(btFsels(localDir.x(), halfExtents.x(), -halfExtents.x()),
+ btFsels(localDir.y(), halfExtents.y(), -halfExtents.y()),
+ btFsels(localDir.z(), halfExtents.z(), -halfExtents.z()));
+ }
+ case TRIANGLE_SHAPE_PROXYTYPE:
+ {
+ btTriangleShape* triangleShape = (btTriangleShape*)this;
+ btVector3 dir(localDir.getX(),localDir.getY(),localDir.getZ());
+ btVector3* vertices = &triangleShape->m_vertices1[0];
+ btVector3 dots(dir.dot(vertices[0]), dir.dot(vertices[1]), dir.dot(vertices[2]));
+ btVector3 sup = vertices[dots.maxAxis()];
+ return btVector3(sup.getX(),sup.getY(),sup.getZ());
+ }
+ case CYLINDER_SHAPE_PROXYTYPE:
+ {
+ btCylinderShape* cylShape = (btCylinderShape*)this;
+ //mapping of halfextents/dimension onto radius/height depends on how cylinder local orientation is (upAxis)
+
+ btVector3 halfExtents = cylShape->getImplicitShapeDimensions();
+ btVector3 v(localDir.getX(),localDir.getY(),localDir.getZ());
+ int cylinderUpAxis = cylShape->getUpAxis();
+ int XX(1),YY(0),ZZ(2);
+
+ switch (cylinderUpAxis)
+ {
+ case 0:
+ {
+ XX = 1;
+ YY = 0;
+ ZZ = 2;
+ }
+ break;
+ case 1:
+ {
+ XX = 0;
+ YY = 1;
+ ZZ = 2;
+ }
+ break;
+ case 2:
+ {
+ XX = 0;
+ YY = 2;
+ ZZ = 1;
+
+ }
+ break;
+ default:
+ btAssert(0);
+ break;
+ };
+
+ btScalar radius = halfExtents[XX];
+ btScalar halfHeight = halfExtents[cylinderUpAxis];
+
+ btVector3 tmp;
+ btScalar d ;
+
+ btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]);
+ if (s != btScalar(0.0))
+ {
+ d = radius / s;
+ tmp[XX] = v[XX] * d;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = v[ZZ] * d;
+ return btVector3(tmp.getX(),tmp.getY(),tmp.getZ());
+ } else {
+ tmp[XX] = radius;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = btScalar(0.0);
+ return btVector3(tmp.getX(),tmp.getY(),tmp.getZ());
+ }
+ }
+ case CAPSULE_SHAPE_PROXYTYPE:
+ {
+ btVector3 vec0(localDir.getX(),localDir.getY(),localDir.getZ());
+
+ btCapsuleShape* capsuleShape = (btCapsuleShape*)this;
+ btScalar halfHeight = capsuleShape->getHalfHeight();
+ int capsuleUpAxis = capsuleShape->getUpAxis();
+
+ btScalar radius = capsuleShape->getRadius();
+ btVector3 supVec(0,0,0);
+
+ btScalar maxDot(btScalar(-BT_LARGE_FLOAT));
+
+ btVector3 vec = vec0;
+ btScalar lenSqr = vec.length2();
+ if (lenSqr < btScalar(0.0001))
+ {
+ vec.setValue(1,0,0);
+ } else
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ vec *= rlen;
+ }
+ btVector3 vtx;
+ btScalar newDot;
+ {
+ btVector3 pos(0,0,0);
+ pos[capsuleUpAxis] = halfHeight;
+
+ //vtx = pos +vec*(radius);
+ vtx = pos +vec*capsuleShape->getLocalScalingNV()*(radius) - vec * capsuleShape->getMarginNV();
+ newDot = vec.dot(vtx);
+
+
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+ {
+ btVector3 pos(0,0,0);
+ pos[capsuleUpAxis] = -halfHeight;
+
+ //vtx = pos +vec*(radius);
+ vtx = pos +vec*capsuleShape->getLocalScalingNV()*(radius) - vec * capsuleShape->getMarginNV();
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+ return btVector3(supVec.getX(),supVec.getY(),supVec.getZ());
+ }
+ case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
+ {
+ btConvexPointCloudShape* convexPointCloudShape = (btConvexPointCloudShape*)this;
+ btVector3* points = convexPointCloudShape->getUnscaledPoints ();
+ int numPoints = convexPointCloudShape->getNumPoints ();
+ return convexHullSupport (localDir, points, numPoints,convexPointCloudShape->getLocalScalingNV());
+ }
+ case CONVEX_HULL_SHAPE_PROXYTYPE:
+ {
+ btConvexHullShape* convexHullShape = (btConvexHullShape*)this;
+ btVector3* points = convexHullShape->getUnscaledPoints();
+ int numPoints = convexHullShape->getNumPoints ();
+ return convexHullSupport (localDir, points, numPoints,convexHullShape->getLocalScalingNV());
+ }
+ default:
+#ifndef __SPU__
+ return this->localGetSupportingVertexWithoutMargin (localDir);
+#else
+ btAssert (0);
+#endif
+ }
+
+ // should never reach here
+ btAssert (0);
+ return btVector3 (btScalar(0.0f), btScalar(0.0f), btScalar(0.0f));
+}
+
+btVector3 btConvexShape::localGetSupportVertexNonVirtual (const btVector3& localDir) const
+{
+ btVector3 localDirNorm = localDir;
+ if (localDirNorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ localDirNorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ localDirNorm.normalize ();
+
+ return localGetSupportVertexWithoutMarginNonVirtual(localDirNorm)+ getMarginNonVirtual() * localDirNorm;
+}
+
+/* TODO: This should be bumped up to btCollisionShape () */
+btScalar btConvexShape::getMarginNonVirtual () const
+{
+ switch (m_shapeType)
+ {
+ case SPHERE_SHAPE_PROXYTYPE:
+ {
+ btSphereShape* sphereShape = (btSphereShape*)this;
+ return sphereShape->getRadius ();
+ }
+ case BOX_SHAPE_PROXYTYPE:
+ {
+ btBoxShape* convexShape = (btBoxShape*)this;
+ return convexShape->getMarginNV ();
+ }
+ case TRIANGLE_SHAPE_PROXYTYPE:
+ {
+ btTriangleShape* triangleShape = (btTriangleShape*)this;
+ return triangleShape->getMarginNV ();
+ }
+ case CYLINDER_SHAPE_PROXYTYPE:
+ {
+ btCylinderShape* cylShape = (btCylinderShape*)this;
+ return cylShape->getMarginNV();
+ }
+ case CAPSULE_SHAPE_PROXYTYPE:
+ {
+ btCapsuleShape* capsuleShape = (btCapsuleShape*)this;
+ return capsuleShape->getMarginNV();
+ }
+ case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
+ /* fall through */
+ case CONVEX_HULL_SHAPE_PROXYTYPE:
+ {
+ btPolyhedralConvexShape* convexHullShape = (btPolyhedralConvexShape*)this;
+ return convexHullShape->getMarginNV();
+ }
+ default:
+#ifndef __SPU__
+ return this->getMargin ();
+#else
+ btAssert (0);
+#endif
+ }
+
+ // should never reach here
+ btAssert (0);
+ return btScalar(0.0f);
+}
+#ifndef __SPU__
+void btConvexShape::getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const
+{
+ switch (m_shapeType)
+ {
+ case SPHERE_SHAPE_PROXYTYPE:
+ {
+ btSphereShape* sphereShape = (btSphereShape*)this;
+ btScalar radius = sphereShape->getImplicitShapeDimensions().getX();// * convexShape->getLocalScaling().getX();
+ btScalar margin = radius + sphereShape->getMarginNonVirtual();
+ const btVector3& center = t.getOrigin();
+ btVector3 extent(margin,margin,margin);
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+ }
+ break;
+ case CYLINDER_SHAPE_PROXYTYPE:
+ /* fall through */
+ case BOX_SHAPE_PROXYTYPE:
+ {
+ btBoxShape* convexShape = (btBoxShape*)this;
+ btScalar margin=convexShape->getMarginNonVirtual();
+ btVector3 halfExtents = convexShape->getImplicitShapeDimensions();
+ halfExtents += btVector3(margin,margin,margin);
+ btMatrix3x3 abs_b = t.getBasis().absolute();
+ btVector3 center = t.getOrigin();
+ btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents));
+
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+ break;
+ }
+ case TRIANGLE_SHAPE_PROXYTYPE:
+ {
+ btTriangleShape* triangleShape = (btTriangleShape*)this;
+ btScalar margin = triangleShape->getMarginNonVirtual();
+ for (int i=0;i<3;i++)
+ {
+ btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
+ vec[i] = btScalar(1.);
+
+ btVector3 sv = localGetSupportVertexWithoutMarginNonVirtual(vec*t.getBasis());
+
+ btVector3 tmp = t(sv);
+ aabbMax[i] = tmp[i]+margin;
+ vec[i] = btScalar(-1.);
+ tmp = t(localGetSupportVertexWithoutMarginNonVirtual(vec*t.getBasis()));
+ aabbMin[i] = tmp[i]-margin;
+ }
+ }
+ break;
+ case CAPSULE_SHAPE_PROXYTYPE:
+ {
+ btCapsuleShape* capsuleShape = (btCapsuleShape*)this;
+ btVector3 halfExtents(capsuleShape->getRadius(),capsuleShape->getRadius(),capsuleShape->getRadius());
+ int m_upAxis = capsuleShape->getUpAxis();
+ halfExtents[m_upAxis] = capsuleShape->getRadius() + capsuleShape->getHalfHeight();
+ halfExtents += btVector3(capsuleShape->getMarginNonVirtual(),capsuleShape->getMarginNonVirtual(),capsuleShape->getMarginNonVirtual());
+ btMatrix3x3 abs_b = t.getBasis().absolute();
+ btVector3 center = t.getOrigin();
+ btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents));
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+ }
+ break;
+ case CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
+ case CONVEX_HULL_SHAPE_PROXYTYPE:
+ {
+ btPolyhedralConvexAabbCachingShape* convexHullShape = (btPolyhedralConvexAabbCachingShape*)this;
+ btScalar margin = convexHullShape->getMarginNonVirtual();
+ convexHullShape->getNonvirtualAabb (t, aabbMin, aabbMax, margin);
+ }
+ break;
+ default:
+#ifndef __SPU__
+ this->getAabb (t, aabbMin, aabbMax);
+#else
+ btAssert (0);
+#endif
+ break;
+ }
+
+ // should never reach here
+ btAssert (0);
+}
+
+#endif //__SPU__
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.h
new file mode 100644
index 00000000..cab4bb69
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexShape.h
@@ -0,0 +1,82 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_SHAPE_INTERFACE1
+#define BT_CONVEX_SHAPE_INTERFACE1
+
+#include "btCollisionShape.h"
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "btCollisionMargin.h"
+#include "LinearMath/btAlignedAllocator.h"
+
+#define MAX_PREFERRED_PENETRATION_DIRECTIONS 10
+
+/// The btConvexShape is an abstract shape interface, implemented by all convex shapes such as btBoxShape, btConvexHullShape etc.
+/// It describes general convex shapes using the localGetSupportingVertex interface, used by collision detectors such as btGjkPairDetector.
+ATTRIBUTE_ALIGNED16(class) btConvexShape : public btCollisionShape
+{
+
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btConvexShape ();
+
+ virtual ~btConvexShape();
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const = 0;
+
+ ////////
+ #ifndef __SPU__
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const=0;
+ #endif //#ifndef __SPU__
+
+ btVector3 localGetSupportVertexWithoutMarginNonVirtual (const btVector3& vec) const;
+ btVector3 localGetSupportVertexNonVirtual (const btVector3& vec) const;
+ btScalar getMarginNonVirtual () const;
+ void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
+
+
+ //notice that the vectors should be unit length
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0;
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+ void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0;
+
+ virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0;
+
+ virtual void setLocalScaling(const btVector3& scaling) =0;
+ virtual const btVector3& getLocalScaling() const =0;
+
+ virtual void setMargin(btScalar margin)=0;
+
+ virtual btScalar getMargin() const=0;
+
+ virtual int getNumPreferredPenetrationDirections() const=0;
+
+ virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const=0;
+
+
+
+
+};
+
+
+
+#endif //BT_CONVEX_SHAPE_INTERFACE1
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
new file mode 100644
index 00000000..0f9ced55
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
@@ -0,0 +1,315 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvexTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+
+#include "LinearMath/btQuaternion.h"
+#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h"
+
+
+btConvexTriangleMeshShape ::btConvexTriangleMeshShape (btStridingMeshInterface* meshInterface, bool calcAabb)
+: btPolyhedralConvexAabbCachingShape(), m_stridingMesh(meshInterface)
+{
+ m_shapeType = CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE;
+ if ( calcAabb )
+ recalcLocalAabb();
+}
+
+
+
+
+///It's not nice to have all this virtual function overhead, so perhaps we can also gather the points once
+///but then we are duplicating
+class LocalSupportVertexCallback: public btInternalTriangleIndexCallback
+{
+
+ btVector3 m_supportVertexLocal;
+public:
+
+ btScalar m_maxDot;
+ btVector3 m_supportVecLocal;
+
+ LocalSupportVertexCallback(const btVector3& supportVecLocal)
+ : m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)),
+ m_maxDot(btScalar(-BT_LARGE_FLOAT)),
+ m_supportVecLocal(supportVecLocal)
+ {
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex)
+ {
+ (void)triangleIndex;
+ (void)partId;
+
+ for (int i=0;i<3;i++)
+ {
+ btScalar dot = m_supportVecLocal.dot(triangle[i]);
+ if (dot > m_maxDot)
+ {
+ m_maxDot = dot;
+ m_supportVertexLocal = triangle[i];
+ }
+ }
+ }
+
+ btVector3 GetSupportVertexLocal()
+ {
+ return m_supportVertexLocal;
+ }
+
+};
+
+
+
+
+
+btVector3 btConvexTriangleMeshShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
+{
+ btVector3 supVec(btScalar(0.),btScalar(0.),btScalar(0.));
+
+ btVector3 vec = vec0;
+ btScalar lenSqr = vec.length2();
+ if (lenSqr < btScalar(0.0001))
+ {
+ vec.setValue(1,0,0);
+ } else
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ vec *= rlen;
+ }
+
+ LocalSupportVertexCallback supportCallback(vec);
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax);
+ supVec = supportCallback.GetSupportVertexLocal();
+
+ return supVec;
+}
+
+void btConvexTriangleMeshShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ //use 'w' component of supportVerticesOut?
+ {
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
+ }
+ }
+
+ ///@todo: could do the batch inside the callback!
+
+
+ for (int j=0;j<numVectors;j++)
+ {
+ const btVector3& vec = vectors[j];
+ LocalSupportVertexCallback supportCallback(vec);
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ m_stridingMesh->InternalProcessAllTriangles(&supportCallback,-aabbMax,aabbMax);
+ supportVerticesOut[j] = supportCallback.GetSupportVertexLocal();
+ }
+
+}
+
+
+
+btVector3 btConvexTriangleMeshShape::localGetSupportingVertex(const btVector3& vec)const
+{
+ btVector3 supVertex = localGetSupportingVertexWithoutMargin(vec);
+
+ if ( getMargin()!=btScalar(0.) )
+ {
+ btVector3 vecnorm = vec;
+ if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ vecnorm.normalize();
+ supVertex+= getMargin() * vecnorm;
+ }
+ return supVertex;
+}
+
+
+
+
+
+
+
+
+
+//currently just for debugging (drawing), perhaps future support for algebraic continuous collision detection
+//Please note that you can debug-draw btConvexTriangleMeshShape with the Raytracer Demo
+int btConvexTriangleMeshShape::getNumVertices() const
+{
+ //cache this?
+ return 0;
+
+}
+
+int btConvexTriangleMeshShape::getNumEdges() const
+{
+ return 0;
+}
+
+void btConvexTriangleMeshShape::getEdge(int ,btVector3& ,btVector3& ) const
+{
+ btAssert(0);
+}
+
+void btConvexTriangleMeshShape::getVertex(int ,btVector3& ) const
+{
+ btAssert(0);
+}
+
+int btConvexTriangleMeshShape::getNumPlanes() const
+{
+ return 0;
+}
+
+void btConvexTriangleMeshShape::getPlane(btVector3& ,btVector3& ,int ) const
+{
+ btAssert(0);
+}
+
+//not yet
+bool btConvexTriangleMeshShape::isInside(const btVector3& ,btScalar ) const
+{
+ btAssert(0);
+ return false;
+}
+
+
+
+void btConvexTriangleMeshShape::setLocalScaling(const btVector3& scaling)
+{
+ m_stridingMesh->setScaling(scaling);
+
+ recalcLocalAabb();
+
+}
+
+
+const btVector3& btConvexTriangleMeshShape::getLocalScaling() const
+{
+ return m_stridingMesh->getScaling();
+}
+
+void btConvexTriangleMeshShape::calculatePrincipalAxisTransform(btTransform& principal, btVector3& inertia, btScalar& volume) const
+{
+ class CenterCallback: public btInternalTriangleIndexCallback
+ {
+ bool first;
+ btVector3 ref;
+ btVector3 sum;
+ btScalar volume;
+
+ public:
+
+ CenterCallback() : first(true), ref(0, 0, 0), sum(0, 0, 0), volume(0)
+ {
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle, int partId, int triangleIndex)
+ {
+ (void) triangleIndex;
+ (void) partId;
+ if (first)
+ {
+ ref = triangle[0];
+ first = false;
+ }
+ else
+ {
+ btScalar vol = btFabs((triangle[0] - ref).triple(triangle[1] - ref, triangle[2] - ref));
+ sum += (btScalar(0.25) * vol) * ((triangle[0] + triangle[1] + triangle[2] + ref));
+ volume += vol;
+ }
+ }
+
+ btVector3 getCenter()
+ {
+ return (volume > 0) ? sum / volume : ref;
+ }
+
+ btScalar getVolume()
+ {
+ return volume * btScalar(1. / 6);
+ }
+
+ };
+
+ class InertiaCallback: public btInternalTriangleIndexCallback
+ {
+ btMatrix3x3 sum;
+ btVector3 center;
+
+ public:
+
+ InertiaCallback(btVector3& center) : sum(0, 0, 0, 0, 0, 0, 0, 0, 0), center(center)
+ {
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle, int partId, int triangleIndex)
+ {
+ (void) triangleIndex;
+ (void) partId;
+ btMatrix3x3 i;
+ btVector3 a = triangle[0] - center;
+ btVector3 b = triangle[1] - center;
+ btVector3 c = triangle[2] - center;
+ btScalar volNeg = -btFabs(a.triple(b, c)) * btScalar(1. / 6);
+ for (int j = 0; j < 3; j++)
+ {
+ for (int k = 0; k <= j; k++)
+ {
+ i[j][k] = i[k][j] = volNeg * (btScalar(0.1) * (a[j] * a[k] + b[j] * b[k] + c[j] * c[k])
+ + btScalar(0.05) * (a[j] * b[k] + a[k] * b[j] + a[j] * c[k] + a[k] * c[j] + b[j] * c[k] + b[k] * c[j]));
+ }
+ }
+ btScalar i00 = -i[0][0];
+ btScalar i11 = -i[1][1];
+ btScalar i22 = -i[2][2];
+ i[0][0] = i11 + i22;
+ i[1][1] = i22 + i00;
+ i[2][2] = i00 + i11;
+ sum[0] += i[0];
+ sum[1] += i[1];
+ sum[2] += i[2];
+ }
+
+ btMatrix3x3& getInertia()
+ {
+ return sum;
+ }
+
+ };
+
+ CenterCallback centerCallback;
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ m_stridingMesh->InternalProcessAllTriangles(&centerCallback, -aabbMax, aabbMax);
+ btVector3 center = centerCallback.getCenter();
+ principal.setOrigin(center);
+ volume = centerCallback.getVolume();
+
+ InertiaCallback inertiaCallback(center);
+ m_stridingMesh->InternalProcessAllTriangles(&inertiaCallback, -aabbMax, aabbMax);
+
+ btMatrix3x3& i = inertiaCallback.getInertia();
+ i.diagonalize(principal.getBasis(), btScalar(0.00001), 20);
+ inertia.setValue(i[0][0], i[1][1], i[2][2]);
+ inertia /= volume;
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h
new file mode 100644
index 00000000..af5d0038
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h
@@ -0,0 +1,75 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef BT_CONVEX_TRIANGLEMESH_SHAPE_H
+#define BT_CONVEX_TRIANGLEMESH_SHAPE_H
+
+
+#include "btPolyhedralConvexShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+
+/// The btConvexTriangleMeshShape is a convex hull of a triangle mesh, but the performance is not as good as btConvexHullShape.
+/// A small benefit of this class is that it uses the btStridingMeshInterface, so you can avoid the duplication of the triangle mesh data. Nevertheless, most users should use the much better performing btConvexHullShape instead.
+class btConvexTriangleMeshShape : public btPolyhedralConvexAabbCachingShape
+{
+
+ class btStridingMeshInterface* m_stridingMesh;
+
+public:
+ btConvexTriangleMeshShape(btStridingMeshInterface* meshInterface, bool calcAabb = true);
+
+ class btStridingMeshInterface* getMeshInterface()
+ {
+ return m_stridingMesh;
+ }
+ const class btStridingMeshInterface* getMeshInterface() const
+ {
+ return m_stridingMesh;
+ }
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ //debugging
+ virtual const char* getName()const {return "ConvexTrimesh";}
+
+ virtual int getNumVertices() const;
+ virtual int getNumEdges() const;
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const;
+ virtual void getVertex(int i,btVector3& vtx) const;
+ virtual int getNumPlanes() const;
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const;
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
+
+
+ virtual void setLocalScaling(const btVector3& scaling);
+ virtual const btVector3& getLocalScaling() const;
+
+ ///computes the exact moment of inertia and the transform from the coordinate system defined by the principal axes of the moment of inertia
+ ///and the center of mass to the current coordinate system. A mass of 1 is assumed, for other masses just multiply the computed "inertia"
+ ///by the mass. The resulting transform "principal" has to be applied inversely to the mesh in order for the local coordinate system of the
+ ///shape to be centered at the center of mass and to coincide with the principal axes. This also necessitates a correction of the world transform
+ ///of the collision object by the principal transform. This method also computes the volume of the convex mesh.
+ void calculatePrincipalAxisTransform(btTransform& principal, btVector3& inertia, btScalar& volume) const;
+
+};
+
+
+
+#endif //BT_CONVEX_TRIANGLEMESH_SHAPE_H
+
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.cpp
new file mode 100644
index 00000000..c2e534b0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.cpp
@@ -0,0 +1,279 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btCylinderShape.h"
+
+btCylinderShape::btCylinderShape (const btVector3& halfExtents)
+:btConvexInternalShape(),
+m_upAxis(1)
+{
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ m_implicitShapeDimensions = (halfExtents * m_localScaling) - margin;
+ m_shapeType = CYLINDER_SHAPE_PROXYTYPE;
+}
+
+
+btCylinderShapeX::btCylinderShapeX (const btVector3& halfExtents)
+:btCylinderShape(halfExtents)
+{
+ m_upAxis = 0;
+
+}
+
+
+btCylinderShapeZ::btCylinderShapeZ (const btVector3& halfExtents)
+:btCylinderShape(halfExtents)
+{
+ m_upAxis = 2;
+
+}
+
+void btCylinderShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ btTransformAabb(getHalfExtentsWithoutMargin(),getMargin(),t,aabbMin,aabbMax);
+}
+
+void btCylinderShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+
+//Until Bullet 2.77 a box approximation was used, so uncomment this if you need backwards compatibility
+//#define USE_BOX_INERTIA_APPROXIMATION 1
+#ifndef USE_BOX_INERTIA_APPROXIMATION
+
+ /*
+ cylinder is defined as following:
+ *
+ * - principle axis aligned along y by default, radius in x, z-value not used
+ * - for btCylinderShapeX: principle axis aligned along x, radius in y direction, z-value not used
+ * - for btCylinderShapeZ: principle axis aligned along z, radius in x direction, y-value not used
+ *
+ */
+
+ btScalar radius2; // square of cylinder radius
+ btScalar height2; // square of cylinder height
+ btVector3 halfExtents = getHalfExtentsWithMargin(); // get cylinder dimension
+ btScalar div12 = mass / 12.f;
+ btScalar div4 = mass / 4.f;
+ btScalar div2 = mass / 2.f;
+ int idxRadius, idxHeight;
+
+ switch (m_upAxis) // get indices of radius and height of cylinder
+ {
+ case 0: // cylinder is aligned along x
+ idxRadius = 1;
+ idxHeight = 0;
+ break;
+ case 2: // cylinder is aligned along z
+ idxRadius = 0;
+ idxHeight = 2;
+ break;
+ default: // cylinder is aligned along y
+ idxRadius = 0;
+ idxHeight = 1;
+ }
+
+ // calculate squares
+ radius2 = halfExtents[idxRadius] * halfExtents[idxRadius];
+ height2 = btScalar(4.) * halfExtents[idxHeight] * halfExtents[idxHeight];
+
+ // calculate tensor terms
+ btScalar t1 = div12 * height2 + div4 * radius2;
+ btScalar t2 = div2 * radius2;
+
+ switch (m_upAxis) // set diagonal elements of inertia tensor
+ {
+ case 0: // cylinder is aligned along x
+ inertia.setValue(t2,t1,t1);
+ break;
+ case 2: // cylinder is aligned along z
+ inertia.setValue(t1,t1,t2);
+ break;
+ default: // cylinder is aligned along y
+ inertia.setValue(t1,t2,t1);
+ }
+#else //USE_BOX_INERTIA_APPROXIMATION
+ //approximation of box shape
+ btVector3 halfExtents = getHalfExtentsWithMargin();
+
+ btScalar lx=btScalar(2.)*(halfExtents.x());
+ btScalar ly=btScalar(2.)*(halfExtents.y());
+ btScalar lz=btScalar(2.)*(halfExtents.z());
+
+ inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + ly*ly));
+#endif //USE_BOX_INERTIA_APPROXIMATION
+}
+
+
+SIMD_FORCE_INLINE btVector3 CylinderLocalSupportX(const btVector3& halfExtents,const btVector3& v)
+{
+const int cylinderUpAxis = 0;
+const int XX = 1;
+const int YY = 0;
+const int ZZ = 2;
+
+ //mapping depends on how cylinder local orientation is
+ // extents of the cylinder is: X,Y is for radius, and Z for height
+
+
+ btScalar radius = halfExtents[XX];
+ btScalar halfHeight = halfExtents[cylinderUpAxis];
+
+
+ btVector3 tmp;
+ btScalar d ;
+
+ btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]);
+ if (s != btScalar(0.0))
+ {
+ d = radius / s;
+ tmp[XX] = v[XX] * d;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = v[ZZ] * d;
+ return tmp;
+ }
+ else
+ {
+ tmp[XX] = radius;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = btScalar(0.0);
+ return tmp;
+ }
+
+
+}
+
+
+
+
+
+
+inline btVector3 CylinderLocalSupportY(const btVector3& halfExtents,const btVector3& v)
+{
+
+const int cylinderUpAxis = 1;
+const int XX = 0;
+const int YY = 1;
+const int ZZ = 2;
+
+
+ btScalar radius = halfExtents[XX];
+ btScalar halfHeight = halfExtents[cylinderUpAxis];
+
+
+ btVector3 tmp;
+ btScalar d ;
+
+ btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]);
+ if (s != btScalar(0.0))
+ {
+ d = radius / s;
+ tmp[XX] = v[XX] * d;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = v[ZZ] * d;
+ return tmp;
+ }
+ else
+ {
+ tmp[XX] = radius;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = btScalar(0.0);
+ return tmp;
+ }
+
+}
+
+inline btVector3 CylinderLocalSupportZ(const btVector3& halfExtents,const btVector3& v)
+{
+const int cylinderUpAxis = 2;
+const int XX = 0;
+const int YY = 2;
+const int ZZ = 1;
+
+ //mapping depends on how cylinder local orientation is
+ // extents of the cylinder is: X,Y is for radius, and Z for height
+
+
+ btScalar radius = halfExtents[XX];
+ btScalar halfHeight = halfExtents[cylinderUpAxis];
+
+
+ btVector3 tmp;
+ btScalar d ;
+
+ btScalar s = btSqrt(v[XX] * v[XX] + v[ZZ] * v[ZZ]);
+ if (s != btScalar(0.0))
+ {
+ d = radius / s;
+ tmp[XX] = v[XX] * d;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = v[ZZ] * d;
+ return tmp;
+ }
+ else
+ {
+ tmp[XX] = radius;
+ tmp[YY] = v[YY] < 0.0 ? -halfHeight : halfHeight;
+ tmp[ZZ] = btScalar(0.0);
+ return tmp;
+ }
+
+
+}
+
+btVector3 btCylinderShapeX::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ return CylinderLocalSupportX(getHalfExtentsWithoutMargin(),vec);
+}
+
+
+btVector3 btCylinderShapeZ::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ return CylinderLocalSupportZ(getHalfExtentsWithoutMargin(),vec);
+}
+btVector3 btCylinderShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ return CylinderLocalSupportY(getHalfExtentsWithoutMargin(),vec);
+}
+
+void btCylinderShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i] = CylinderLocalSupportY(getHalfExtentsWithoutMargin(),vectors[i]);
+ }
+}
+
+void btCylinderShapeZ::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i] = CylinderLocalSupportZ(getHalfExtentsWithoutMargin(),vectors[i]);
+ }
+}
+
+
+
+
+void btCylinderShapeX::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i] = CylinderLocalSupportX(getHalfExtentsWithoutMargin(),vectors[i]);
+ }
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.h
new file mode 100644
index 00000000..125bfc78
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btCylinderShape.h
@@ -0,0 +1,200 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CYLINDER_MINKOWSKI_H
+#define BT_CYLINDER_MINKOWSKI_H
+
+#include "btBoxShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+#include "LinearMath/btVector3.h"
+
+/// The btCylinderShape class implements a cylinder shape primitive, centered around the origin. Its central axis aligned with the Y axis. btCylinderShapeX is aligned with the X axis and btCylinderShapeZ around the Z axis.
+class btCylinderShape : public btConvexInternalShape
+
+{
+
+protected:
+
+ int m_upAxis;
+
+public:
+
+ btVector3 getHalfExtentsWithMargin() const
+ {
+ btVector3 halfExtents = getHalfExtentsWithoutMargin();
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+ halfExtents += margin;
+ return halfExtents;
+ }
+
+ const btVector3& getHalfExtentsWithoutMargin() const
+ {
+ return m_implicitShapeDimensions;//changed in Bullet 2.63: assume the scaling and margin are included
+ }
+
+ btCylinderShape (const btVector3& halfExtents);
+
+ void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ virtual void setMargin(btScalar collisionMargin)
+ {
+ //correct the m_implicitShapeDimensions for the margin
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+
+ btConvexInternalShape::setMargin(collisionMargin);
+ btVector3 newMargin(getMargin(),getMargin(),getMargin());
+ m_implicitShapeDimensions = implicitShapeDimensionsWithMargin - newMargin;
+
+ }
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec) const
+ {
+
+ btVector3 supVertex;
+ supVertex = localGetSupportingVertexWithoutMargin(vec);
+
+ if ( getMargin()!=btScalar(0.) )
+ {
+ btVector3 vecnorm = vec;
+ if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ vecnorm.normalize();
+ supVertex+= getMargin() * vecnorm;
+ }
+ return supVertex;
+ }
+
+
+ //use box inertia
+ // virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+
+ int getUpAxis() const
+ {
+ return m_upAxis;
+ }
+
+ virtual btScalar getRadius() const
+ {
+ return getHalfExtentsWithMargin().getX();
+ }
+
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ btVector3 oldMargin(getMargin(),getMargin(),getMargin());
+ btVector3 implicitShapeDimensionsWithMargin = m_implicitShapeDimensions+oldMargin;
+ btVector3 unScaledImplicitShapeDimensionsWithMargin = implicitShapeDimensionsWithMargin / m_localScaling;
+
+ btConvexInternalShape::setLocalScaling(scaling);
+
+ m_implicitShapeDimensions = (unScaledImplicitShapeDimensionsWithMargin * m_localScaling) - oldMargin;
+
+ }
+
+ //debugging
+ virtual const char* getName()const
+ {
+ return "CylinderY";
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+};
+
+class btCylinderShapeX : public btCylinderShape
+{
+public:
+ btCylinderShapeX (const btVector3& halfExtents);
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ //debugging
+ virtual const char* getName()const
+ {
+ return "CylinderX";
+ }
+
+ virtual btScalar getRadius() const
+ {
+ return getHalfExtentsWithMargin().getY();
+ }
+
+};
+
+class btCylinderShapeZ : public btCylinderShape
+{
+public:
+ btCylinderShapeZ (const btVector3& halfExtents);
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ //debugging
+ virtual const char* getName()const
+ {
+ return "CylinderZ";
+ }
+
+ virtual btScalar getRadius() const
+ {
+ return getHalfExtentsWithMargin().getX();
+ }
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btCylinderShapeData
+{
+ btConvexInternalShapeData m_convexInternalShapeData;
+
+ int m_upAxis;
+
+ char m_padding[4];
+};
+
+SIMD_FORCE_INLINE int btCylinderShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btCylinderShapeData);
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btCylinderShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btCylinderShapeData* shapeData = (btCylinderShapeData*) dataBuffer;
+
+ btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData,serializer);
+
+ shapeData->m_upAxis = m_upAxis;
+
+ return "btCylinderShapeData";
+}
+
+
+
+#endif //BT_CYLINDER_MINKOWSKI_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.cpp
new file mode 100644
index 00000000..a9e6df5c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.cpp
@@ -0,0 +1,50 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btEmptyShape.h"
+
+
+#include "btCollisionShape.h"
+
+
+btEmptyShape::btEmptyShape() : btConcaveShape ()
+{
+ m_shapeType = EMPTY_SHAPE_PROXYTYPE;
+}
+
+
+btEmptyShape::~btEmptyShape()
+{
+}
+
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+void btEmptyShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ btVector3 margin(getMargin(),getMargin(),getMargin());
+
+ aabbMin = t.getOrigin() - margin;
+
+ aabbMax = t.getOrigin() + margin;
+
+}
+
+void btEmptyShape::calculateLocalInertia(btScalar ,btVector3& ) const
+{
+ btAssert(0);
+}
+
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.h
new file mode 100644
index 00000000..87b7b66d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btEmptyShape.h
@@ -0,0 +1,70 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_EMPTY_SHAPE_H
+#define BT_EMPTY_SHAPE_H
+
+#include "btConcaveShape.h"
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "btCollisionMargin.h"
+
+
+
+
+/// The btEmptyShape is a collision shape without actual collision detection shape, so most users should ignore this class.
+/// It can be replaced by another shape during runtime, but the inertia tensor should be recomputed.
+class btEmptyShape : public btConcaveShape
+{
+public:
+ btEmptyShape();
+
+ virtual ~btEmptyShape();
+
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+ void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ m_localScaling = scaling;
+ }
+ virtual const btVector3& getLocalScaling() const
+ {
+ return m_localScaling;
+ }
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual const char* getName()const
+ {
+ return "Empty";
+ }
+
+ virtual void processAllTriangles(btTriangleCallback* ,const btVector3& ,const btVector3& ) const
+ {
+ }
+
+protected:
+ btVector3 m_localScaling;
+
+};
+
+
+
+#endif //BT_EMPTY_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
new file mode 100644
index 00000000..3a1e6f4a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
@@ -0,0 +1,411 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btHeightfieldTerrainShape.h"
+
+#include "LinearMath/btTransformUtil.h"
+
+
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape
+(
+int heightStickWidth, int heightStickLength, void* heightfieldData,
+btScalar heightScale, btScalar minHeight, btScalar maxHeight,int upAxis,
+PHY_ScalarType hdt, bool flipQuadEdges
+)
+{
+ initialize(heightStickWidth, heightStickLength, heightfieldData,
+ heightScale, minHeight, maxHeight, upAxis, hdt,
+ flipQuadEdges);
+}
+
+
+
+btHeightfieldTerrainShape::btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength,void* heightfieldData,btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges)
+{
+ // legacy constructor: support only float or unsigned char,
+ // and min height is zero
+ PHY_ScalarType hdt = (useFloatData) ? PHY_FLOAT : PHY_UCHAR;
+ btScalar minHeight = 0.0;
+
+ // previously, height = uchar * maxHeight / 65535.
+ // So to preserve legacy behavior, heightScale = maxHeight / 65535
+ btScalar heightScale = maxHeight / 65535;
+
+ initialize(heightStickWidth, heightStickLength, heightfieldData,
+ heightScale, minHeight, maxHeight, upAxis, hdt,
+ flipQuadEdges);
+}
+
+
+
+void btHeightfieldTerrainShape::initialize
+(
+int heightStickWidth, int heightStickLength, void* heightfieldData,
+btScalar heightScale, btScalar minHeight, btScalar maxHeight, int upAxis,
+PHY_ScalarType hdt, bool flipQuadEdges
+)
+{
+ // validation
+ btAssert(heightStickWidth > 1 && "bad width");
+ btAssert(heightStickLength > 1 && "bad length");
+ btAssert(heightfieldData && "null heightfield data");
+ // btAssert(heightScale) -- do we care? Trust caller here
+ btAssert(minHeight <= maxHeight && "bad min/max height");
+ btAssert(upAxis >= 0 && upAxis < 3 &&
+ "bad upAxis--should be in range [0,2]");
+ btAssert(hdt != PHY_UCHAR || hdt != PHY_FLOAT || hdt != PHY_SHORT &&
+ "Bad height data type enum");
+
+ // initialize member variables
+ m_shapeType = TERRAIN_SHAPE_PROXYTYPE;
+ m_heightStickWidth = heightStickWidth;
+ m_heightStickLength = heightStickLength;
+ m_minHeight = minHeight;
+ m_maxHeight = maxHeight;
+ m_width = (btScalar) (heightStickWidth - 1);
+ m_length = (btScalar) (heightStickLength - 1);
+ m_heightScale = heightScale;
+ m_heightfieldDataUnknown = heightfieldData;
+ m_heightDataType = hdt;
+ m_flipQuadEdges = flipQuadEdges;
+ m_useDiamondSubdivision = false;
+ m_upAxis = upAxis;
+ m_localScaling.setValue(btScalar(1.), btScalar(1.), btScalar(1.));
+
+ // determine min/max axis-aligned bounding box (aabb) values
+ switch (m_upAxis)
+ {
+ case 0:
+ {
+ m_localAabbMin.setValue(m_minHeight, 0, 0);
+ m_localAabbMax.setValue(m_maxHeight, m_width, m_length);
+ break;
+ }
+ case 1:
+ {
+ m_localAabbMin.setValue(0, m_minHeight, 0);
+ m_localAabbMax.setValue(m_width, m_maxHeight, m_length);
+ break;
+ };
+ case 2:
+ {
+ m_localAabbMin.setValue(0, 0, m_minHeight);
+ m_localAabbMax.setValue(m_width, m_length, m_maxHeight);
+ break;
+ }
+ default:
+ {
+ //need to get valid m_upAxis
+ btAssert(0 && "Bad m_upAxis");
+ }
+ }
+
+ // remember origin (defined as exact middle of aabb)
+ m_localOrigin = btScalar(0.5) * (m_localAabbMin + m_localAabbMax);
+}
+
+
+
+btHeightfieldTerrainShape::~btHeightfieldTerrainShape()
+{
+}
+
+
+
+void btHeightfieldTerrainShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ btVector3 halfExtents = (m_localAabbMax-m_localAabbMin)* m_localScaling * btScalar(0.5);
+
+ btVector3 localOrigin(0, 0, 0);
+ localOrigin[m_upAxis] = (m_minHeight + m_maxHeight) * btScalar(0.5);
+ localOrigin *= m_localScaling;
+
+ btMatrix3x3 abs_b = t.getBasis().absolute();
+ btVector3 center = t.getOrigin();
+ btVector3 extent = btVector3(abs_b[0].dot(halfExtents),
+ abs_b[1].dot(halfExtents),
+ abs_b[2].dot(halfExtents));
+ extent += btVector3(getMargin(),getMargin(),getMargin());
+
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+}
+
+
+/// This returns the "raw" (user's initial) height, not the actual height.
+/// The actual height needs to be adjusted to be relative to the center
+/// of the heightfield's AABB.
+btScalar
+btHeightfieldTerrainShape::getRawHeightFieldValue(int x,int y) const
+{
+ btScalar val = 0.f;
+ switch (m_heightDataType)
+ {
+ case PHY_FLOAT:
+ {
+ val = m_heightfieldDataFloat[(y*m_heightStickWidth)+x];
+ break;
+ }
+
+ case PHY_UCHAR:
+ {
+ unsigned char heightFieldValue = m_heightfieldDataUnsignedChar[(y*m_heightStickWidth)+x];
+ val = heightFieldValue * m_heightScale;
+ break;
+ }
+
+ case PHY_SHORT:
+ {
+ short hfValue = m_heightfieldDataShort[(y * m_heightStickWidth) + x];
+ val = hfValue * m_heightScale;
+ break;
+ }
+
+ default:
+ {
+ btAssert(!"Bad m_heightDataType");
+ }
+ }
+
+ return val;
+}
+
+
+
+
+/// this returns the vertex in bullet-local coordinates
+void btHeightfieldTerrainShape::getVertex(int x,int y,btVector3& vertex) const
+{
+ btAssert(x>=0);
+ btAssert(y>=0);
+ btAssert(x<m_heightStickWidth);
+ btAssert(y<m_heightStickLength);
+
+ btScalar height = getRawHeightFieldValue(x,y);
+
+ switch (m_upAxis)
+ {
+ case 0:
+ {
+ vertex.setValue(
+ height - m_localOrigin.getX(),
+ (-m_width/btScalar(2.0)) + x,
+ (-m_length/btScalar(2.0) ) + y
+ );
+ break;
+ }
+ case 1:
+ {
+ vertex.setValue(
+ (-m_width/btScalar(2.0)) + x,
+ height - m_localOrigin.getY(),
+ (-m_length/btScalar(2.0)) + y
+ );
+ break;
+ };
+ case 2:
+ {
+ vertex.setValue(
+ (-m_width/btScalar(2.0)) + x,
+ (-m_length/btScalar(2.0)) + y,
+ height - m_localOrigin.getZ()
+ );
+ break;
+ }
+ default:
+ {
+ //need to get valid m_upAxis
+ btAssert(0);
+ }
+ }
+
+ vertex*=m_localScaling;
+}
+
+
+
+static inline int
+getQuantized
+(
+btScalar x
+)
+{
+ if (x < 0.0) {
+ return (int) (x - 0.5);
+ }
+ return (int) (x + 0.5);
+}
+
+
+
+/// given input vector, return quantized version
+/**
+ This routine is basically determining the gridpoint indices for a given
+ input vector, answering the question: "which gridpoint is closest to the
+ provided point?".
+
+ "with clamp" means that we restrict the point to be in the heightfield's
+ axis-aligned bounding box.
+ */
+void btHeightfieldTerrainShape::quantizeWithClamp(int* out, const btVector3& point,int /*isMax*/) const
+{
+ btVector3 clampedPoint(point);
+ clampedPoint.setMax(m_localAabbMin);
+ clampedPoint.setMin(m_localAabbMax);
+
+ out[0] = getQuantized(clampedPoint.getX());
+ out[1] = getQuantized(clampedPoint.getY());
+ out[2] = getQuantized(clampedPoint.getZ());
+
+}
+
+
+
+/// process all triangles within the provided axis-aligned bounding box
+/**
+ basic algorithm:
+ - convert input aabb to local coordinates (scale down and shift for local origin)
+ - convert input aabb to a range of heightfield grid points (quantize)
+ - iterate over all triangles in that subset of the grid
+ */
+void btHeightfieldTerrainShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ // scale down the input aabb's so they are in local (non-scaled) coordinates
+ btVector3 localAabbMin = aabbMin*btVector3(1.f/m_localScaling[0],1.f/m_localScaling[1],1.f/m_localScaling[2]);
+ btVector3 localAabbMax = aabbMax*btVector3(1.f/m_localScaling[0],1.f/m_localScaling[1],1.f/m_localScaling[2]);
+
+ // account for local origin
+ localAabbMin += m_localOrigin;
+ localAabbMax += m_localOrigin;
+
+ //quantize the aabbMin and aabbMax, and adjust the start/end ranges
+ int quantizedAabbMin[3];
+ int quantizedAabbMax[3];
+ quantizeWithClamp(quantizedAabbMin, localAabbMin,0);
+ quantizeWithClamp(quantizedAabbMax, localAabbMax,1);
+
+ // expand the min/max quantized values
+ // this is to catch the case where the input aabb falls between grid points!
+ for (int i = 0; i < 3; ++i) {
+ quantizedAabbMin[i]--;
+ quantizedAabbMax[i]++;
+ }
+
+ int startX=0;
+ int endX=m_heightStickWidth-1;
+ int startJ=0;
+ int endJ=m_heightStickLength-1;
+
+ switch (m_upAxis)
+ {
+ case 0:
+ {
+ if (quantizedAabbMin[1]>startX)
+ startX = quantizedAabbMin[1];
+ if (quantizedAabbMax[1]<endX)
+ endX = quantizedAabbMax[1];
+ if (quantizedAabbMin[2]>startJ)
+ startJ = quantizedAabbMin[2];
+ if (quantizedAabbMax[2]<endJ)
+ endJ = quantizedAabbMax[2];
+ break;
+ }
+ case 1:
+ {
+ if (quantizedAabbMin[0]>startX)
+ startX = quantizedAabbMin[0];
+ if (quantizedAabbMax[0]<endX)
+ endX = quantizedAabbMax[0];
+ if (quantizedAabbMin[2]>startJ)
+ startJ = quantizedAabbMin[2];
+ if (quantizedAabbMax[2]<endJ)
+ endJ = quantizedAabbMax[2];
+ break;
+ };
+ case 2:
+ {
+ if (quantizedAabbMin[0]>startX)
+ startX = quantizedAabbMin[0];
+ if (quantizedAabbMax[0]<endX)
+ endX = quantizedAabbMax[0];
+ if (quantizedAabbMin[1]>startJ)
+ startJ = quantizedAabbMin[1];
+ if (quantizedAabbMax[1]<endJ)
+ endJ = quantizedAabbMax[1];
+ break;
+ }
+ default:
+ {
+ //need to get valid m_upAxis
+ btAssert(0);
+ }
+ }
+
+
+
+
+ for(int j=startJ; j<endJ; j++)
+ {
+ for(int x=startX; x<endX; x++)
+ {
+ btVector3 vertices[3];
+ if (m_flipQuadEdges || (m_useDiamondSubdivision && !((j+x) & 1)))
+ {
+ //first triangle
+ getVertex(x,j,vertices[0]);
+ getVertex(x+1,j,vertices[1]);
+ getVertex(x+1,j+1,vertices[2]);
+ callback->processTriangle(vertices,x,j);
+ //second triangle
+ getVertex(x,j,vertices[0]);
+ getVertex(x+1,j+1,vertices[1]);
+ getVertex(x,j+1,vertices[2]);
+ callback->processTriangle(vertices,x,j);
+ } else
+ {
+ //first triangle
+ getVertex(x,j,vertices[0]);
+ getVertex(x,j+1,vertices[1]);
+ getVertex(x+1,j,vertices[2]);
+ callback->processTriangle(vertices,x,j);
+ //second triangle
+ getVertex(x+1,j,vertices[0]);
+ getVertex(x,j+1,vertices[1]);
+ getVertex(x+1,j+1,vertices[2]);
+ callback->processTriangle(vertices,x,j);
+ }
+ }
+ }
+
+
+
+}
+
+void btHeightfieldTerrainShape::calculateLocalInertia(btScalar ,btVector3& inertia) const
+{
+ //moving concave objects not supported
+
+ inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+}
+
+void btHeightfieldTerrainShape::setLocalScaling(const btVector3& scaling)
+{
+ m_localScaling = scaling;
+}
+const btVector3& btHeightfieldTerrainShape::getLocalScaling() const
+{
+ return m_localScaling;
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
new file mode 100644
index 00000000..710c29e0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h
@@ -0,0 +1,161 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_HEIGHTFIELD_TERRAIN_SHAPE_H
+#define BT_HEIGHTFIELD_TERRAIN_SHAPE_H
+
+#include "btConcaveShape.h"
+
+///btHeightfieldTerrainShape simulates a 2D heightfield terrain
+/**
+ The caller is responsible for maintaining the heightfield array; this
+ class does not make a copy.
+
+ The heightfield can be dynamic so long as the min/max height values
+ capture the extremes (heights must always be in that range).
+
+ The local origin of the heightfield is assumed to be the exact
+ center (as determined by width and length and height, with each
+ axis multiplied by the localScaling).
+
+ \b NOTE: be careful with coordinates. If you have a heightfield with a local
+ min height of -100m, and a max height of +500m, you may be tempted to place it
+ at the origin (0,0) and expect the heights in world coordinates to be
+ -100 to +500 meters.
+ Actually, the heights will be -300 to +300m, because bullet will re-center
+ the heightfield based on its AABB (which is determined by the min/max
+ heights). So keep in mind that once you create a btHeightfieldTerrainShape
+ object, the heights will be adjusted relative to the center of the AABB. This
+ is different to the behavior of many rendering engines, but is useful for
+ physics engines.
+
+ Most (but not all) rendering and heightfield libraries assume upAxis = 1
+ (that is, the y-axis is "up"). This class allows any of the 3 coordinates
+ to be "up". Make sure your choice of axis is consistent with your rendering
+ system.
+
+ The heightfield heights are determined from the data type used for the
+ heightfieldData array.
+
+ - PHY_UCHAR: height at a point is the uchar value at the
+ grid point, multipled by heightScale. uchar isn't recommended
+ because of its inability to deal with negative values, and
+ low resolution (8-bit).
+
+ - PHY_SHORT: height at a point is the short int value at that grid
+ point, multipled by heightScale.
+
+ - PHY_FLOAT: height at a point is the float value at that grid
+ point. heightScale is ignored when using the float heightfield
+ data type.
+
+ Whatever the caller specifies as minHeight and maxHeight will be honored.
+ The class will not inspect the heightfield to discover the actual minimum
+ or maximum heights. These values are used to determine the heightfield's
+ axis-aligned bounding box, multiplied by localScaling.
+
+ For usage and testing see the TerrainDemo.
+ */
+class btHeightfieldTerrainShape : public btConcaveShape
+{
+protected:
+ btVector3 m_localAabbMin;
+ btVector3 m_localAabbMax;
+ btVector3 m_localOrigin;
+
+ ///terrain data
+ int m_heightStickWidth;
+ int m_heightStickLength;
+ btScalar m_minHeight;
+ btScalar m_maxHeight;
+ btScalar m_width;
+ btScalar m_length;
+ btScalar m_heightScale;
+ union
+ {
+ unsigned char* m_heightfieldDataUnsignedChar;
+ short* m_heightfieldDataShort;
+ btScalar* m_heightfieldDataFloat;
+ void* m_heightfieldDataUnknown;
+ };
+
+ PHY_ScalarType m_heightDataType;
+ bool m_flipQuadEdges;
+ bool m_useDiamondSubdivision;
+
+ int m_upAxis;
+
+ btVector3 m_localScaling;
+
+ virtual btScalar getRawHeightFieldValue(int x,int y) const;
+ void quantizeWithClamp(int* out, const btVector3& point,int isMax) const;
+ void getVertex(int x,int y,btVector3& vertex) const;
+
+
+
+ /// protected initialization
+ /**
+ Handles the work of constructors so that public constructors can be
+ backwards-compatible without a lot of copy/paste.
+ */
+ void initialize(int heightStickWidth, int heightStickLength,
+ void* heightfieldData, btScalar heightScale,
+ btScalar minHeight, btScalar maxHeight, int upAxis,
+ PHY_ScalarType heightDataType, bool flipQuadEdges);
+
+public:
+ /// preferred constructor
+ /**
+ This constructor supports a range of heightfield
+ data types, and allows for a non-zero minimum height value.
+ heightScale is needed for any integer-based heightfield data types.
+ */
+ btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,
+ void* heightfieldData, btScalar heightScale,
+ btScalar minHeight, btScalar maxHeight,
+ int upAxis, PHY_ScalarType heightDataType,
+ bool flipQuadEdges);
+
+ /// legacy constructor
+ /**
+ The legacy constructor assumes the heightfield has a minimum height
+ of zero. Only unsigned char or floats are supported. For legacy
+ compatibility reasons, heightScale is calculated as maxHeight / 65535
+ (and is only used when useFloatData = false).
+ */
+ btHeightfieldTerrainShape(int heightStickWidth,int heightStickLength,void* heightfieldData, btScalar maxHeight,int upAxis,bool useFloatData,bool flipQuadEdges);
+
+ virtual ~btHeightfieldTerrainShape();
+
+
+ void setUseDiamondSubdivision(bool useDiamondSubdivision=true) { m_useDiamondSubdivision = useDiamondSubdivision;}
+
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual void setLocalScaling(const btVector3& scaling);
+
+ virtual const btVector3& getLocalScaling() const;
+
+ //debugging
+ virtual const char* getName()const {return "HEIGHTFIELD";}
+
+};
+
+#endif //BT_HEIGHTFIELD_TERRAIN_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btMaterial.h b/tests/bullet/src/BulletCollision/CollisionShapes/btMaterial.h
new file mode 100644
index 00000000..866f9b4d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btMaterial.h
@@ -0,0 +1,35 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/// This file was created by Alex Silverman
+
+#ifndef BT_MATERIAL_H
+#define BT_MATERIAL_H
+
+// Material class to be used by btMultimaterialTriangleMeshShape to store triangle properties
+class btMaterial
+{
+ // public members so that materials can change due to world events
+public:
+ btScalar m_friction;
+ btScalar m_restitution;
+ int pad[2];
+
+ btMaterial(){}
+ btMaterial(btScalar fric, btScalar rest) { m_friction = fric; m_restitution = rest; }
+};
+
+#endif // BT_MATERIAL_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp
new file mode 100644
index 00000000..06707e24
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp
@@ -0,0 +1,60 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btMinkowskiSumShape.h"
+
+
+btMinkowskiSumShape::btMinkowskiSumShape(const btConvexShape* shapeA,const btConvexShape* shapeB)
+: btConvexInternalShape (),
+m_shapeA(shapeA),
+m_shapeB(shapeB)
+{
+ m_shapeType = MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE;
+ m_transA.setIdentity();
+ m_transB.setIdentity();
+}
+
+btVector3 btMinkowskiSumShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ btVector3 supVertexA = m_transA(m_shapeA->localGetSupportingVertexWithoutMargin(vec*m_transA.getBasis()));
+ btVector3 supVertexB = m_transB(m_shapeB->localGetSupportingVertexWithoutMargin(-vec*m_transB.getBasis()));
+ return supVertexA - supVertexB;
+}
+
+void btMinkowskiSumShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ ///@todo: could make recursive use of batching. probably this shape is not used frequently.
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i] = localGetSupportingVertexWithoutMargin(vectors[i]);
+ }
+
+}
+
+
+
+btScalar btMinkowskiSumShape::getMargin() const
+{
+ return m_shapeA->getMargin() + m_shapeB->getMargin();
+}
+
+
+void btMinkowskiSumShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ (void)mass;
+ btAssert(0);
+ inertia.setValue(0,0,0);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h
new file mode 100644
index 00000000..6c844e8c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btMinkowskiSumShape.h
@@ -0,0 +1,60 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MINKOWSKI_SUM_SHAPE_H
+#define BT_MINKOWSKI_SUM_SHAPE_H
+
+#include "btConvexInternalShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+/// The btMinkowskiSumShape is only for advanced users. This shape represents implicit based minkowski sum of two convex implicit shapes.
+class btMinkowskiSumShape : public btConvexInternalShape
+{
+
+ btTransform m_transA;
+ btTransform m_transB;
+ const btConvexShape* m_shapeA;
+ const btConvexShape* m_shapeB;
+
+public:
+
+ btMinkowskiSumShape(const btConvexShape* shapeA,const btConvexShape* shapeB);
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ void setTransformA(const btTransform& transA) { m_transA = transA;}
+ void setTransformB(const btTransform& transB) { m_transB = transB;}
+
+ const btTransform& getTransformA()const { return m_transA;}
+ const btTransform& GetTransformB()const { return m_transB;}
+
+
+ virtual btScalar getMargin() const;
+
+ const btConvexShape* getShapeA() const { return m_shapeA;}
+ const btConvexShape* getShapeB() const { return m_shapeB;}
+
+ virtual const char* getName()const
+ {
+ return "MinkowskiSum";
+ }
+};
+
+#endif //BT_MINKOWSKI_SUM_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp
new file mode 100644
index 00000000..c996bfcd
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.cpp
@@ -0,0 +1,167 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btMultiSphereShape.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+#include "LinearMath/btQuaternion.h"
+#include "LinearMath/btSerializer.h"
+
+btMultiSphereShape::btMultiSphereShape (const btVector3* positions,const btScalar* radi,int numSpheres)
+:btConvexInternalAabbCachingShape ()
+{
+ m_shapeType = MULTI_SPHERE_SHAPE_PROXYTYPE;
+ //btScalar startMargin = btScalar(BT_LARGE_FLOAT);
+
+ m_localPositionArray.resize(numSpheres);
+ m_radiArray.resize(numSpheres);
+ for (int i=0;i<numSpheres;i++)
+ {
+ m_localPositionArray[i] = positions[i];
+ m_radiArray[i] = radi[i];
+
+ }
+
+ recalcLocalAabb();
+
+}
+
+
+ btVector3 btMultiSphereShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
+{
+ int i;
+ btVector3 supVec(0,0,0);
+
+ btScalar maxDot(btScalar(-BT_LARGE_FLOAT));
+
+
+ btVector3 vec = vec0;
+ btScalar lenSqr = vec.length2();
+ if (lenSqr < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vec.setValue(1,0,0);
+ } else
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ vec *= rlen;
+ }
+
+ btVector3 vtx;
+ btScalar newDot;
+
+ const btVector3* pos = &m_localPositionArray[0];
+ const btScalar* rad = &m_radiArray[0];
+ int numSpheres = m_localPositionArray.size();
+
+ for (i=0;i<numSpheres;i++)
+ {
+ vtx = (*pos) +vec*m_localScaling*(*rad) - vec * getMargin();
+ pos++;
+ rad++;
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+
+ return supVec;
+
+}
+
+ void btMultiSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+
+ for (int j=0;j<numVectors;j++)
+ {
+ btScalar maxDot(btScalar(-BT_LARGE_FLOAT));
+
+ const btVector3& vec = vectors[j];
+
+ btVector3 vtx;
+ btScalar newDot;
+
+ const btVector3* pos = &m_localPositionArray[0];
+ const btScalar* rad = &m_radiArray[0];
+ int numSpheres = m_localPositionArray.size();
+ for (int i=0;i<numSpheres;i++)
+ {
+ vtx = (*pos) +vec*m_localScaling*(*rad) - vec * getMargin();
+ pos++;
+ rad++;
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supportVerticesOut[j] = vtx;
+ }
+ }
+ }
+}
+
+
+
+
+
+
+
+
+void btMultiSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ //as an approximation, take the inertia of the box that bounds the spheres
+
+ btVector3 localAabbMin,localAabbMax;
+ getCachedLocalAabb(localAabbMin,localAabbMax);
+ btVector3 halfExtents = (localAabbMax-localAabbMin)*btScalar(0.5);
+
+ btScalar lx=btScalar(2.)*(halfExtents.x());
+ btScalar ly=btScalar(2.)*(halfExtents.y());
+ btScalar lz=btScalar(2.)*(halfExtents.z());
+
+ inertia.setValue(mass/(btScalar(12.0)) * (ly*ly + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + lz*lz),
+ mass/(btScalar(12.0)) * (lx*lx + ly*ly));
+
+}
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btMultiSphereShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btMultiSphereShapeData* shapeData = (btMultiSphereShapeData*) dataBuffer;
+ btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData, serializer);
+
+ int numElem = m_localPositionArray.size();
+ shapeData->m_localPositionArrayPtr = numElem ? (btPositionAndRadius*)serializer->getUniquePointer((void*)&m_localPositionArray[0]): 0;
+
+ shapeData->m_localPositionArraySize = numElem;
+ if (numElem)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btPositionAndRadius),numElem);
+ btPositionAndRadius* memPtr = (btPositionAndRadius*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_localPositionArray[i].serializeFloat(memPtr->m_pos);
+ memPtr->m_radius = float(m_radiArray[i]);
+ }
+ serializer->finalizeChunk(chunk,"btPositionAndRadius",BT_ARRAY_CODE,(void*)&m_localPositionArray[0]);
+ }
+
+ return "btMultiSphereShapeData";
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.h
new file mode 100644
index 00000000..06c5d16d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btMultiSphereShape.h
@@ -0,0 +1,99 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MULTI_SPHERE_MINKOWSKI_H
+#define BT_MULTI_SPHERE_MINKOWSKI_H
+
+#include "btConvexInternalShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+#include "LinearMath/btAlignedObjectArray.h"
+#include "LinearMath/btAabbUtil2.h"
+
+
+
+///The btMultiSphereShape represents the convex hull of a collection of spheres. You can create special capsules or other smooth volumes.
+///It is possible to animate the spheres for deformation, but call 'recalcLocalAabb' after changing any sphere position/radius
+class btMultiSphereShape : public btConvexInternalAabbCachingShape
+{
+
+ btAlignedObjectArray<btVector3> m_localPositionArray;
+ btAlignedObjectArray<btScalar> m_radiArray;
+
+public:
+ btMultiSphereShape (const btVector3* positions,const btScalar* radi,int numSpheres);
+
+ ///CollisionShape Interface
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ /// btConvexShape Interface
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ int getSphereCount() const
+ {
+ return m_localPositionArray.size();
+ }
+
+ const btVector3& getSpherePosition(int index) const
+ {
+ return m_localPositionArray[index];
+ }
+
+ btScalar getSphereRadius(int index) const
+ {
+ return m_radiArray[index];
+ }
+
+
+ virtual const char* getName()const
+ {
+ return "MultiSphere";
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+
+struct btPositionAndRadius
+{
+ btVector3FloatData m_pos;
+ float m_radius;
+};
+
+struct btMultiSphereShapeData
+{
+ btConvexInternalShapeData m_convexInternalShapeData;
+
+ btPositionAndRadius *m_localPositionArrayPtr;
+ int m_localPositionArraySize;
+ char m_padding[4];
+};
+
+
+
+SIMD_FORCE_INLINE int btMultiSphereShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btMultiSphereShapeData);
+}
+
+
+
+#endif //BT_MULTI_SPHERE_MINKOWSKI_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp
new file mode 100644
index 00000000..58799ac9
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp
@@ -0,0 +1,45 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/// This file was created by Alex Silverman
+
+#include "BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h"
+//#include "BulletCollision/CollisionShapes/btOptimizedBvh.h"
+
+
+///Obtains the material for a specific triangle
+const btMaterial * btMultimaterialTriangleMeshShape::getMaterialProperties(int partID, int triIndex)
+{
+ const unsigned char * materialBase = 0;
+ int numMaterials;
+ PHY_ScalarType materialType;
+ int materialStride;
+ const unsigned char * triangleMaterialBase = 0;
+ int numTriangles;
+ int triangleMaterialStride;
+ PHY_ScalarType triangleType;
+
+ ((btTriangleIndexVertexMaterialArray*)m_meshInterface)->getLockedReadOnlyMaterialBase(&materialBase, numMaterials, materialType, materialStride,
+ &triangleMaterialBase, numTriangles, triangleMaterialStride, triangleType, partID);
+
+ // return the pointer to the place with the friction for the triangle
+ // TODO: This depends on whether it's a moving mesh or not
+ // BUG IN GIMPACT
+ //return (btScalar*)(&materialBase[triangleMaterialBase[(triIndex-1) * triangleMaterialStride] * materialStride]);
+ int * matInd = (int *)(&(triangleMaterialBase[(triIndex * triangleMaterialStride)]));
+ btMaterial *matVal = (btMaterial *)(&(materialBase[*matInd * materialStride]));
+ return (matVal);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h
new file mode 100644
index 00000000..2b92ab7d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h
@@ -0,0 +1,120 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/// This file was created by Alex Silverman
+
+#ifndef BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
+#define BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
+
+#include "btBvhTriangleMeshShape.h"
+#include "btMaterial.h"
+
+///The BvhTriangleMaterialMeshShape extends the btBvhTriangleMeshShape. Its main contribution is the interface into a material array, which allows per-triangle friction and restitution.
+ATTRIBUTE_ALIGNED16(class) btMultimaterialTriangleMeshShape : public btBvhTriangleMeshShape
+{
+ btAlignedObjectArray <btMaterial*> m_materialList;
+ int ** m_triangleMaterials;
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression, bool buildBvh = true):
+ btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, buildBvh)
+ {
+ m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE;
+
+ const unsigned char *vertexbase;
+ int numverts;
+ PHY_ScalarType type;
+ int stride;
+ const unsigned char *indexbase;
+ int indexstride;
+ int numfaces;
+ PHY_ScalarType indicestype;
+
+ //m_materialLookup = (int**)(btAlignedAlloc(sizeof(int*) * meshInterface->getNumSubParts(), 16));
+
+ for(int i = 0; i < meshInterface->getNumSubParts(); i++)
+ {
+ m_meshInterface->getLockedReadOnlyVertexIndexBase(
+ &vertexbase,
+ numverts,
+ type,
+ stride,
+ &indexbase,
+ indexstride,
+ numfaces,
+ indicestype,
+ i);
+ //m_materialLookup[i] = (int*)(btAlignedAlloc(sizeof(int) * numfaces, 16));
+ }
+ }
+
+ ///optionally pass in a larger bvh aabb, used for quantization. This allows for deformations within this aabb
+ btMultimaterialTriangleMeshShape(btStridingMeshInterface* meshInterface, bool useQuantizedAabbCompression,const btVector3& bvhAabbMin,const btVector3& bvhAabbMax, bool buildBvh = true):
+ btBvhTriangleMeshShape(meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh)
+ {
+ m_shapeType = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE;
+
+ const unsigned char *vertexbase;
+ int numverts;
+ PHY_ScalarType type;
+ int stride;
+ const unsigned char *indexbase;
+ int indexstride;
+ int numfaces;
+ PHY_ScalarType indicestype;
+
+ //m_materialLookup = (int**)(btAlignedAlloc(sizeof(int*) * meshInterface->getNumSubParts(), 16));
+
+ for(int i = 0; i < meshInterface->getNumSubParts(); i++)
+ {
+ m_meshInterface->getLockedReadOnlyVertexIndexBase(
+ &vertexbase,
+ numverts,
+ type,
+ stride,
+ &indexbase,
+ indexstride,
+ numfaces,
+ indicestype,
+ i);
+ //m_materialLookup[i] = (int*)(btAlignedAlloc(sizeof(int) * numfaces * 2, 16));
+ }
+ }
+
+ virtual ~btMultimaterialTriangleMeshShape()
+ {
+/*
+ for(int i = 0; i < m_meshInterface->getNumSubParts(); i++)
+ {
+ btAlignedFree(m_materialValues[i]);
+ m_materialLookup[i] = NULL;
+ }
+ btAlignedFree(m_materialValues);
+ m_materialLookup = NULL;
+*/
+ }
+ //debugging
+ virtual const char* getName()const {return "MULTIMATERIALTRIANGLEMESH";}
+
+ ///Obtains the material for a specific triangle
+ const btMaterial * getMaterialProperties(int partID, int triIndex);
+
+}
+;
+
+#endif //BT_BVH_TRIANGLE_MATERIAL_MESH_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp
new file mode 100644
index 00000000..981b8a26
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.cpp
@@ -0,0 +1,391 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btOptimizedBvh.h"
+#include "btStridingMeshInterface.h"
+#include "LinearMath/btAabbUtil2.h"
+#include "LinearMath/btIDebugDraw.h"
+
+
+btOptimizedBvh::btOptimizedBvh()
+{
+}
+
+btOptimizedBvh::~btOptimizedBvh()
+{
+}
+
+
+void btOptimizedBvh::build(btStridingMeshInterface* triangles, bool useQuantizedAabbCompression, const btVector3& bvhAabbMin, const btVector3& bvhAabbMax)
+{
+ m_useQuantization = useQuantizedAabbCompression;
+
+
+ // NodeArray triangleNodes;
+
+ struct NodeTriangleCallback : public btInternalTriangleIndexCallback
+ {
+
+ NodeArray& m_triangleNodes;
+
+ NodeTriangleCallback& operator=(NodeTriangleCallback& other)
+ {
+ m_triangleNodes = other.m_triangleNodes;
+ return *this;
+ }
+
+ NodeTriangleCallback(NodeArray& triangleNodes)
+ :m_triangleNodes(triangleNodes)
+ {
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex)
+ {
+ btOptimizedBvhNode node;
+ btVector3 aabbMin,aabbMax;
+ aabbMin.setValue(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ aabbMax.setValue(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ aabbMin.setMin(triangle[0]);
+ aabbMax.setMax(triangle[0]);
+ aabbMin.setMin(triangle[1]);
+ aabbMax.setMax(triangle[1]);
+ aabbMin.setMin(triangle[2]);
+ aabbMax.setMax(triangle[2]);
+
+ //with quantization?
+ node.m_aabbMinOrg = aabbMin;
+ node.m_aabbMaxOrg = aabbMax;
+
+ node.m_escapeIndex = -1;
+
+ //for child nodes
+ node.m_subPart = partId;
+ node.m_triangleIndex = triangleIndex;
+ m_triangleNodes.push_back(node);
+ }
+ };
+ struct QuantizedNodeTriangleCallback : public btInternalTriangleIndexCallback
+ {
+ QuantizedNodeArray& m_triangleNodes;
+ const btQuantizedBvh* m_optimizedTree; // for quantization
+
+ QuantizedNodeTriangleCallback& operator=(QuantizedNodeTriangleCallback& other)
+ {
+ m_triangleNodes = other.m_triangleNodes;
+ m_optimizedTree = other.m_optimizedTree;
+ return *this;
+ }
+
+ QuantizedNodeTriangleCallback(QuantizedNodeArray& triangleNodes,const btQuantizedBvh* tree)
+ :m_triangleNodes(triangleNodes),m_optimizedTree(tree)
+ {
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex)
+ {
+ // The partId and triangle index must fit in the same (positive) integer
+ btAssert(partId < (1<<MAX_NUM_PARTS_IN_BITS));
+ btAssert(triangleIndex < (1<<(31-MAX_NUM_PARTS_IN_BITS)));
+ //negative indices are reserved for escapeIndex
+ btAssert(triangleIndex>=0);
+
+ btQuantizedBvhNode node;
+ btVector3 aabbMin,aabbMax;
+ aabbMin.setValue(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ aabbMax.setValue(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ aabbMin.setMin(triangle[0]);
+ aabbMax.setMax(triangle[0]);
+ aabbMin.setMin(triangle[1]);
+ aabbMax.setMax(triangle[1]);
+ aabbMin.setMin(triangle[2]);
+ aabbMax.setMax(triangle[2]);
+
+ //PCK: add these checks for zero dimensions of aabb
+ const btScalar MIN_AABB_DIMENSION = btScalar(0.002);
+ const btScalar MIN_AABB_HALF_DIMENSION = btScalar(0.001);
+ if (aabbMax.x() - aabbMin.x() < MIN_AABB_DIMENSION)
+ {
+ aabbMax.setX(aabbMax.x() + MIN_AABB_HALF_DIMENSION);
+ aabbMin.setX(aabbMin.x() - MIN_AABB_HALF_DIMENSION);
+ }
+ if (aabbMax.y() - aabbMin.y() < MIN_AABB_DIMENSION)
+ {
+ aabbMax.setY(aabbMax.y() + MIN_AABB_HALF_DIMENSION);
+ aabbMin.setY(aabbMin.y() - MIN_AABB_HALF_DIMENSION);
+ }
+ if (aabbMax.z() - aabbMin.z() < MIN_AABB_DIMENSION)
+ {
+ aabbMax.setZ(aabbMax.z() + MIN_AABB_HALF_DIMENSION);
+ aabbMin.setZ(aabbMin.z() - MIN_AABB_HALF_DIMENSION);
+ }
+
+ m_optimizedTree->quantize(&node.m_quantizedAabbMin[0],aabbMin,0);
+ m_optimizedTree->quantize(&node.m_quantizedAabbMax[0],aabbMax,1);
+
+ node.m_escapeIndexOrTriangleIndex = (partId<<(31-MAX_NUM_PARTS_IN_BITS)) | triangleIndex;
+
+ m_triangleNodes.push_back(node);
+ }
+ };
+
+
+
+ int numLeafNodes = 0;
+
+
+ if (m_useQuantization)
+ {
+
+ //initialize quantization values
+ setQuantizationValues(bvhAabbMin,bvhAabbMax);
+
+ QuantizedNodeTriangleCallback callback(m_quantizedLeafNodes,this);
+
+
+ triangles->InternalProcessAllTriangles(&callback,m_bvhAabbMin,m_bvhAabbMax);
+
+ //now we have an array of leafnodes in m_leafNodes
+ numLeafNodes = m_quantizedLeafNodes.size();
+
+
+ m_quantizedContiguousNodes.resize(2*numLeafNodes);
+
+
+ } else
+ {
+ NodeTriangleCallback callback(m_leafNodes);
+
+ btVector3 aabbMin(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+
+ triangles->InternalProcessAllTriangles(&callback,aabbMin,aabbMax);
+
+ //now we have an array of leafnodes in m_leafNodes
+ numLeafNodes = m_leafNodes.size();
+
+ m_contiguousNodes.resize(2*numLeafNodes);
+ }
+
+ m_curNodeIndex = 0;
+
+ buildTree(0,numLeafNodes);
+
+ ///if the entire tree is small then subtree size, we need to create a header info for the tree
+ if(m_useQuantization && !m_SubtreeHeaders.size())
+ {
+ btBvhSubtreeInfo& subtree = m_SubtreeHeaders.expand();
+ subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[0]);
+ subtree.m_rootNodeIndex = 0;
+ subtree.m_subtreeSize = m_quantizedContiguousNodes[0].isLeafNode() ? 1 : m_quantizedContiguousNodes[0].getEscapeIndex();
+ }
+
+ //PCK: update the copy of the size
+ m_subtreeHeaderCount = m_SubtreeHeaders.size();
+
+ //PCK: clear m_quantizedLeafNodes and m_leafNodes, they are temporary
+ m_quantizedLeafNodes.clear();
+ m_leafNodes.clear();
+}
+
+
+
+
+void btOptimizedBvh::refit(btStridingMeshInterface* meshInterface,const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ if (m_useQuantization)
+ {
+
+ setQuantizationValues(aabbMin,aabbMax);
+
+ updateBvhNodes(meshInterface,0,m_curNodeIndex,0);
+
+ ///now update all subtree headers
+
+ int i;
+ for (i=0;i<m_SubtreeHeaders.size();i++)
+ {
+ btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i];
+ subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[subtree.m_rootNodeIndex]);
+ }
+
+ } else
+ {
+
+ }
+}
+
+
+
+
+void btOptimizedBvh::refitPartial(btStridingMeshInterface* meshInterface,const btVector3& aabbMin,const btVector3& aabbMax)
+{
+ //incrementally initialize quantization values
+ btAssert(m_useQuantization);
+
+ btAssert(aabbMin.getX() > m_bvhAabbMin.getX());
+ btAssert(aabbMin.getY() > m_bvhAabbMin.getY());
+ btAssert(aabbMin.getZ() > m_bvhAabbMin.getZ());
+
+ btAssert(aabbMax.getX() < m_bvhAabbMax.getX());
+ btAssert(aabbMax.getY() < m_bvhAabbMax.getY());
+ btAssert(aabbMax.getZ() < m_bvhAabbMax.getZ());
+
+ ///we should update all quantization values, using updateBvhNodes(meshInterface);
+ ///but we only update chunks that overlap the given aabb
+
+ unsigned short quantizedQueryAabbMin[3];
+ unsigned short quantizedQueryAabbMax[3];
+
+ quantize(&quantizedQueryAabbMin[0],aabbMin,0);
+ quantize(&quantizedQueryAabbMax[0],aabbMax,1);
+
+ int i;
+ for (i=0;i<this->m_SubtreeHeaders.size();i++)
+ {
+ btBvhSubtreeInfo& subtree = m_SubtreeHeaders[i];
+
+ //PCK: unsigned instead of bool
+ unsigned overlap = testQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax);
+ if (overlap != 0)
+ {
+ updateBvhNodes(meshInterface,subtree.m_rootNodeIndex,subtree.m_rootNodeIndex+subtree.m_subtreeSize,i);
+
+ subtree.setAabbFromQuantizeNode(m_quantizedContiguousNodes[subtree.m_rootNodeIndex]);
+ }
+ }
+
+}
+
+void btOptimizedBvh::updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index)
+{
+ (void)index;
+
+ btAssert(m_useQuantization);
+
+ int curNodeSubPart=-1;
+
+ //get access info to trianglemesh data
+ const unsigned char *vertexbase = 0;
+ int numverts = 0;
+ PHY_ScalarType type = PHY_INTEGER;
+ int stride = 0;
+ const unsigned char *indexbase = 0;
+ int indexstride = 0;
+ int numfaces = 0;
+ PHY_ScalarType indicestype = PHY_INTEGER;
+
+ btVector3 triangleVerts[3];
+ btVector3 aabbMin,aabbMax;
+ const btVector3& meshScaling = meshInterface->getScaling();
+
+ int i;
+ for (i=endNode-1;i>=firstNode;i--)
+ {
+
+
+ btQuantizedBvhNode& curNode = m_quantizedContiguousNodes[i];
+ if (curNode.isLeafNode())
+ {
+ //recalc aabb from triangle data
+ int nodeSubPart = curNode.getPartId();
+ int nodeTriangleIndex = curNode.getTriangleIndex();
+ if (nodeSubPart != curNodeSubPart)
+ {
+ if (curNodeSubPart >= 0)
+ meshInterface->unLockReadOnlyVertexBase(curNodeSubPart);
+ meshInterface->getLockedReadOnlyVertexIndexBase(&vertexbase,numverts, type,stride,&indexbase,indexstride,numfaces,indicestype,nodeSubPart);
+
+ curNodeSubPart = nodeSubPart;
+ btAssert(indicestype==PHY_INTEGER||indicestype==PHY_SHORT);
+ }
+ //triangles->getLockedReadOnlyVertexIndexBase(vertexBase,numVerts,
+
+ unsigned int* gfxbase = (unsigned int*)(indexbase+nodeTriangleIndex*indexstride);
+
+
+ for (int j=2;j>=0;j--)
+ {
+
+ int graphicsindex = indicestype==PHY_SHORT?((unsigned short*)gfxbase)[j]:gfxbase[j];
+ if (type == PHY_FLOAT)
+ {
+ float* graphicsbase = (float*)(vertexbase+graphicsindex*stride);
+ triangleVerts[j] = btVector3(
+ graphicsbase[0]*meshScaling.getX(),
+ graphicsbase[1]*meshScaling.getY(),
+ graphicsbase[2]*meshScaling.getZ());
+ }
+ else
+ {
+ double* graphicsbase = (double*)(vertexbase+graphicsindex*stride);
+ triangleVerts[j] = btVector3( btScalar(graphicsbase[0]*meshScaling.getX()), btScalar(graphicsbase[1]*meshScaling.getY()), btScalar(graphicsbase[2]*meshScaling.getZ()));
+ }
+ }
+
+
+
+ aabbMin.setValue(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ aabbMax.setValue(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ aabbMin.setMin(triangleVerts[0]);
+ aabbMax.setMax(triangleVerts[0]);
+ aabbMin.setMin(triangleVerts[1]);
+ aabbMax.setMax(triangleVerts[1]);
+ aabbMin.setMin(triangleVerts[2]);
+ aabbMax.setMax(triangleVerts[2]);
+
+ quantize(&curNode.m_quantizedAabbMin[0],aabbMin,0);
+ quantize(&curNode.m_quantizedAabbMax[0],aabbMax,1);
+
+ } else
+ {
+ //combine aabb from both children
+
+ btQuantizedBvhNode* leftChildNode = &m_quantizedContiguousNodes[i+1];
+
+ btQuantizedBvhNode* rightChildNode = leftChildNode->isLeafNode() ? &m_quantizedContiguousNodes[i+2] :
+ &m_quantizedContiguousNodes[i+1+leftChildNode->getEscapeIndex()];
+
+
+ {
+ for (int i=0;i<3;i++)
+ {
+ curNode.m_quantizedAabbMin[i] = leftChildNode->m_quantizedAabbMin[i];
+ if (curNode.m_quantizedAabbMin[i]>rightChildNode->m_quantizedAabbMin[i])
+ curNode.m_quantizedAabbMin[i]=rightChildNode->m_quantizedAabbMin[i];
+
+ curNode.m_quantizedAabbMax[i] = leftChildNode->m_quantizedAabbMax[i];
+ if (curNode.m_quantizedAabbMax[i] < rightChildNode->m_quantizedAabbMax[i])
+ curNode.m_quantizedAabbMax[i] = rightChildNode->m_quantizedAabbMax[i];
+ }
+ }
+ }
+
+ }
+
+ if (curNodeSubPart >= 0)
+ meshInterface->unLockReadOnlyVertexBase(curNodeSubPart);
+
+
+}
+
+///deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'
+btOptimizedBvh* btOptimizedBvh::deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian)
+{
+ btQuantizedBvh* bvh = btQuantizedBvh::deSerializeInPlace(i_alignedDataBuffer,i_dataBufferSize,i_swapEndian);
+
+ //we don't add additional data so just do a static upcast
+ return static_cast<btOptimizedBvh*>(bvh);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.h b/tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.h
new file mode 100644
index 00000000..715961f5
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btOptimizedBvh.h
@@ -0,0 +1,65 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///Contains contributions from Disney Studio's
+
+#ifndef BT_OPTIMIZED_BVH_H
+#define BT_OPTIMIZED_BVH_H
+
+#include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h"
+
+class btStridingMeshInterface;
+
+
+///The btOptimizedBvh extends the btQuantizedBvh to create AABB tree for triangle meshes, through the btStridingMeshInterface.
+ATTRIBUTE_ALIGNED16(class) btOptimizedBvh : public btQuantizedBvh
+{
+
+public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+protected:
+
+public:
+
+ btOptimizedBvh();
+
+ virtual ~btOptimizedBvh();
+
+ void build(btStridingMeshInterface* triangles,bool useQuantizedAabbCompression, const btVector3& bvhAabbMin, const btVector3& bvhAabbMax);
+
+ void refit(btStridingMeshInterface* triangles,const btVector3& aabbMin,const btVector3& aabbMax);
+
+ void refitPartial(btStridingMeshInterface* triangles,const btVector3& aabbMin, const btVector3& aabbMax);
+
+ void updateBvhNodes(btStridingMeshInterface* meshInterface,int firstNode,int endNode,int index);
+
+ /// Data buffer MUST be 16 byte aligned
+ virtual bool serializeInPlace(void *o_alignedDataBuffer, unsigned i_dataBufferSize, bool i_swapEndian) const
+ {
+ return btQuantizedBvh::serialize(o_alignedDataBuffer,i_dataBufferSize,i_swapEndian);
+
+ }
+
+ ///deSerializeInPlace loads and initializes a BVH from a buffer in memory 'in place'
+ static btOptimizedBvh *deSerializeInPlace(void *i_alignedDataBuffer, unsigned int i_dataBufferSize, bool i_swapEndian);
+
+
+};
+
+
+#endif //BT_OPTIMIZED_BVH_H
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
new file mode 100644
index 00000000..e84767ea
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
@@ -0,0 +1,338 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
+#include "btConvexPolyhedron.h"
+#include "LinearMath/btConvexHullComputer.h"
+#include <new>
+
+btPolyhedralConvexShape::btPolyhedralConvexShape() :btConvexInternalShape(),
+m_polyhedron(0)
+{
+
+}
+
+btPolyhedralConvexShape::~btPolyhedralConvexShape()
+{
+ if (m_polyhedron)
+ {
+ btAlignedFree(m_polyhedron);
+ }
+}
+
+bool btPolyhedralConvexShape::initializePolyhedralFeatures()
+{
+ if (m_polyhedron)
+ btAlignedFree(m_polyhedron);
+
+ void* mem = btAlignedAlloc(sizeof(btConvexPolyhedron),16);
+ m_polyhedron = new (mem) btConvexPolyhedron;
+
+ btAlignedObjectArray<btVector3> tmpVertices;
+ for (int i=0;i<getNumVertices();i++)
+ {
+ btVector3& newVertex = tmpVertices.expand();
+ getVertex(i,newVertex);
+ }
+
+ btConvexHullComputer conv;
+ conv.compute(&tmpVertices[0].getX(), sizeof(btVector3),tmpVertices.size(),0.f,0.f);
+
+
+
+ btAlignedObjectArray<btVector3> faceNormals;
+ int numFaces = conv.faces.size();
+ faceNormals.resize(numFaces);
+ btConvexHullComputer* convexUtil = &conv;
+
+
+
+ m_polyhedron->m_faces.resize(numFaces);
+ int numVertices = convexUtil->vertices.size();
+ m_polyhedron->m_vertices.resize(numVertices);
+ for (int p=0;p<numVertices;p++)
+ {
+ m_polyhedron->m_vertices[p] = convexUtil->vertices[p];
+ }
+
+ for (int i=0;i<numFaces;i++)
+ {
+ int face = convexUtil->faces[i];
+ //printf("face=%d\n",face);
+ const btConvexHullComputer::Edge* firstEdge = &convexUtil->edges[face];
+ const btConvexHullComputer::Edge* edge = firstEdge;
+
+ btVector3 edges[3];
+ int numEdges = 0;
+ //compute face normals
+
+ btScalar maxCross2 = 0.f;
+ int chosenEdge = -1;
+
+ do
+ {
+
+ int src = edge->getSourceVertex();
+ m_polyhedron->m_faces[i].m_indices.push_back(src);
+ int targ = edge->getTargetVertex();
+ btVector3 wa = convexUtil->vertices[src];
+
+ btVector3 wb = convexUtil->vertices[targ];
+ btVector3 newEdge = wb-wa;
+ newEdge.normalize();
+ if (numEdges<2)
+ edges[numEdges++] = newEdge;
+
+ edge = edge->getNextEdgeOfFace();
+ } while (edge!=firstEdge);
+
+ btScalar planeEq = 1e30f;
+
+
+ if (numEdges==2)
+ {
+ faceNormals[i] = edges[0].cross(edges[1]);
+ faceNormals[i].normalize();
+ m_polyhedron->m_faces[i].m_plane[0] = -faceNormals[i].getX();
+ m_polyhedron->m_faces[i].m_plane[1] = -faceNormals[i].getY();
+ m_polyhedron->m_faces[i].m_plane[2] = -faceNormals[i].getZ();
+ m_polyhedron->m_faces[i].m_plane[3] = planeEq;
+
+ }
+ else
+ {
+ btAssert(0);//degenerate?
+ faceNormals[i].setZero();
+ }
+
+ for (int v=0;v<m_polyhedron->m_faces[i].m_indices.size();v++)
+ {
+ btScalar eq = m_polyhedron->m_vertices[m_polyhedron->m_faces[i].m_indices[v]].dot(faceNormals[i]);
+ if (planeEq>eq)
+ {
+ planeEq=eq;
+ }
+ }
+ m_polyhedron->m_faces[i].m_plane[3] = planeEq;
+ }
+
+
+ if (m_polyhedron->m_faces.size() && conv.vertices.size())
+ {
+
+ for (int f=0;f<m_polyhedron->m_faces.size();f++)
+ {
+
+ btVector3 planeNormal(m_polyhedron->m_faces[f].m_plane[0],m_polyhedron->m_faces[f].m_plane[1],m_polyhedron->m_faces[f].m_plane[2]);
+ btScalar planeEq = m_polyhedron->m_faces[f].m_plane[3];
+
+ btVector3 supVec = localGetSupportingVertex(-planeNormal);
+
+ if (supVec.dot(planeNormal)<planeEq)
+ {
+ m_polyhedron->m_faces[f].m_plane[0] *= -1;
+ m_polyhedron->m_faces[f].m_plane[1] *= -1;
+ m_polyhedron->m_faces[f].m_plane[2] *= -1;
+ m_polyhedron->m_faces[f].m_plane[3] *= -1;
+ int numVerts = m_polyhedron->m_faces[f].m_indices.size();
+ for (int v=0;v<numVerts/2;v++)
+ {
+ btSwap(m_polyhedron->m_faces[f].m_indices[v],m_polyhedron->m_faces[f].m_indices[numVerts-1-v]);
+ }
+ }
+ }
+ }
+
+
+
+ m_polyhedron->initialize();
+
+ return true;
+}
+
+
+btVector3 btPolyhedralConvexShape::localGetSupportingVertexWithoutMargin(const btVector3& vec0)const
+{
+
+
+ btVector3 supVec(0,0,0);
+#ifndef __SPU__
+ int i;
+ btScalar maxDot(btScalar(-BT_LARGE_FLOAT));
+
+ btVector3 vec = vec0;
+ btScalar lenSqr = vec.length2();
+ if (lenSqr < btScalar(0.0001))
+ {
+ vec.setValue(1,0,0);
+ } else
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ vec *= rlen;
+ }
+
+ btVector3 vtx;
+ btScalar newDot;
+
+ for (i=0;i<getNumVertices();i++)
+ {
+ getVertex(i,vtx);
+ newDot = vec.dot(vtx);
+ if (newDot > maxDot)
+ {
+ maxDot = newDot;
+ supVec = vtx;
+ }
+ }
+
+
+#endif //__SPU__
+ return supVec;
+}
+
+
+
+void btPolyhedralConvexShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+#ifndef __SPU__
+ int i;
+
+ btVector3 vtx;
+ btScalar newDot;
+
+ for (i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i][3] = btScalar(-BT_LARGE_FLOAT);
+ }
+
+ for (int j=0;j<numVectors;j++)
+ {
+
+ const btVector3& vec = vectors[j];
+
+ for (i=0;i<getNumVertices();i++)
+ {
+ getVertex(i,vtx);
+ newDot = vec.dot(vtx);
+ if (newDot > supportVerticesOut[j][3])
+ {
+ //WARNING: don't swap next lines, the w component would get overwritten!
+ supportVerticesOut[j] = vtx;
+ supportVerticesOut[j][3] = newDot;
+ }
+ }
+ }
+#endif //__SPU__
+}
+
+
+
+void btPolyhedralConvexShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+#ifndef __SPU__
+ //not yet, return box inertia
+
+ btScalar margin = getMargin();
+
+ btTransform ident;
+ ident.setIdentity();
+ btVector3 aabbMin,aabbMax;
+ getAabb(ident,aabbMin,aabbMax);
+ btVector3 halfExtents = (aabbMax-aabbMin)*btScalar(0.5);
+
+ btScalar lx=btScalar(2.)*(halfExtents.x()+margin);
+ btScalar ly=btScalar(2.)*(halfExtents.y()+margin);
+ btScalar lz=btScalar(2.)*(halfExtents.z()+margin);
+ const btScalar x2 = lx*lx;
+ const btScalar y2 = ly*ly;
+ const btScalar z2 = lz*lz;
+ const btScalar scaledmass = mass * btScalar(0.08333333);
+
+ inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2));
+#endif //__SPU__
+}
+
+
+
+void btPolyhedralConvexAabbCachingShape::setLocalScaling(const btVector3& scaling)
+{
+ btConvexInternalShape::setLocalScaling(scaling);
+ recalcLocalAabb();
+}
+
+btPolyhedralConvexAabbCachingShape::btPolyhedralConvexAabbCachingShape()
+:btPolyhedralConvexShape(),
+m_localAabbMin(1,1,1),
+m_localAabbMax(-1,-1,-1),
+m_isLocalAabbValid(false)
+{
+}
+
+void btPolyhedralConvexAabbCachingShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ getNonvirtualAabb(trans,aabbMin,aabbMax,getMargin());
+}
+
+void btPolyhedralConvexAabbCachingShape::recalcLocalAabb()
+{
+ m_isLocalAabbValid = true;
+
+ #if 1
+ static const btVector3 _directions[] =
+ {
+ btVector3( 1., 0., 0.),
+ btVector3( 0., 1., 0.),
+ btVector3( 0., 0., 1.),
+ btVector3( -1., 0., 0.),
+ btVector3( 0., -1., 0.),
+ btVector3( 0., 0., -1.)
+ };
+
+ btVector3 _supporting[] =
+ {
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.)
+ };
+
+ batchedUnitVectorGetSupportingVertexWithoutMargin(_directions, _supporting, 6);
+
+ for ( int i = 0; i < 3; ++i )
+ {
+ m_localAabbMax[i] = _supporting[i][i] + m_collisionMargin;
+ m_localAabbMin[i] = _supporting[i + 3][i] - m_collisionMargin;
+ }
+
+ #else
+
+ for (int i=0;i<3;i++)
+ {
+ btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
+ vec[i] = btScalar(1.);
+ btVector3 tmp = localGetSupportingVertex(vec);
+ m_localAabbMax[i] = tmp[i]+m_collisionMargin;
+ vec[i] = btScalar(-1.);
+ tmp = localGetSupportingVertex(vec);
+ m_localAabbMin[i] = tmp[i]-m_collisionMargin;
+ }
+ #endif
+}
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h
new file mode 100644
index 00000000..ee2e1e28
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.h
@@ -0,0 +1,112 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_POLYHEDRAL_CONVEX_SHAPE_H
+#define BT_POLYHEDRAL_CONVEX_SHAPE_H
+
+#include "LinearMath/btMatrix3x3.h"
+#include "btConvexInternalShape.h"
+class btConvexPolyhedron;
+
+
+///The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
+class btPolyhedralConvexShape : public btConvexInternalShape
+{
+
+
+protected:
+
+ btConvexPolyhedron* m_polyhedron;
+
+public:
+
+ btPolyhedralConvexShape();
+
+ virtual ~btPolyhedralConvexShape();
+
+ ///optional method mainly used to generate multiple contact points by clipping polyhedral features (faces/edges)
+ virtual bool initializePolyhedralFeatures();
+
+ const btConvexPolyhedron* getConvexPolyhedron() const
+ {
+ return m_polyhedron;
+ }
+
+ //brute force implementations
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+
+ virtual int getNumVertices() const = 0 ;
+ virtual int getNumEdges() const = 0;
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const = 0;
+ virtual void getVertex(int i,btVector3& vtx) const = 0;
+ virtual int getNumPlanes() const = 0;
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i ) const = 0;
+// virtual int getIndex(int i) const = 0 ;
+
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const = 0;
+
+};
+
+
+///The btPolyhedralConvexAabbCachingShape adds aabb caching to the btPolyhedralConvexShape
+class btPolyhedralConvexAabbCachingShape : public btPolyhedralConvexShape
+{
+
+ btVector3 m_localAabbMin;
+ btVector3 m_localAabbMax;
+ bool m_isLocalAabbValid;
+
+protected:
+
+ void setCachedLocalAabb (const btVector3& aabbMin, const btVector3& aabbMax)
+ {
+ m_isLocalAabbValid = true;
+ m_localAabbMin = aabbMin;
+ m_localAabbMax = aabbMax;
+ }
+
+ inline void getCachedLocalAabb (btVector3& aabbMin, btVector3& aabbMax) const
+ {
+ btAssert(m_isLocalAabbValid);
+ aabbMin = m_localAabbMin;
+ aabbMax = m_localAabbMax;
+ }
+
+public:
+
+ btPolyhedralConvexAabbCachingShape();
+
+ inline void getNonvirtualAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax, btScalar margin) const
+ {
+
+ //lazy evaluation of local aabb
+ btAssert(m_isLocalAabbValid);
+ btTransformAabb(m_localAabbMin,m_localAabbMax,margin,trans,aabbMin,aabbMax);
+ }
+
+ virtual void setLocalScaling(const btVector3& scaling);
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ void recalcLocalAabb();
+
+};
+
+#endif //BT_POLYHEDRAL_CONVEX_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp
new file mode 100644
index 00000000..25d58d61
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp
@@ -0,0 +1,123 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btScaledBvhTriangleMeshShape.h"
+
+btScaledBvhTriangleMeshShape::btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape* childShape,const btVector3& localScaling)
+:m_localScaling(localScaling),m_bvhTriMeshShape(childShape)
+{
+ m_shapeType = SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE;
+}
+
+btScaledBvhTriangleMeshShape::~btScaledBvhTriangleMeshShape()
+{
+}
+
+
+class btScaledTriangleCallback : public btTriangleCallback
+{
+ btTriangleCallback* m_originalCallback;
+
+ btVector3 m_localScaling;
+
+public:
+
+ btScaledTriangleCallback(btTriangleCallback* originalCallback,const btVector3& localScaling)
+ :m_originalCallback(originalCallback),
+ m_localScaling(localScaling)
+ {
+ }
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex)
+ {
+ btVector3 newTriangle[3];
+ newTriangle[0] = triangle[0]*m_localScaling;
+ newTriangle[1] = triangle[1]*m_localScaling;
+ newTriangle[2] = triangle[2]*m_localScaling;
+ m_originalCallback->processTriangle(&newTriangle[0],partId,triangleIndex);
+ }
+};
+
+void btScaledBvhTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ btScaledTriangleCallback scaledCallback(callback,m_localScaling);
+
+ btVector3 invLocalScaling(1.f/m_localScaling.getX(),1.f/m_localScaling.getY(),1.f/m_localScaling.getZ());
+ btVector3 scaledAabbMin,scaledAabbMax;
+
+ ///support negative scaling
+ scaledAabbMin[0] = m_localScaling.getX() >= 0. ? aabbMin[0] * invLocalScaling[0] : aabbMax[0] * invLocalScaling[0];
+ scaledAabbMin[1] = m_localScaling.getY() >= 0. ? aabbMin[1] * invLocalScaling[1] : aabbMax[1] * invLocalScaling[1];
+ scaledAabbMin[2] = m_localScaling.getZ() >= 0. ? aabbMin[2] * invLocalScaling[2] : aabbMax[2] * invLocalScaling[2];
+ scaledAabbMin[3] = 0.f;
+
+ scaledAabbMax[0] = m_localScaling.getX() <= 0. ? aabbMin[0] * invLocalScaling[0] : aabbMax[0] * invLocalScaling[0];
+ scaledAabbMax[1] = m_localScaling.getY() <= 0. ? aabbMin[1] * invLocalScaling[1] : aabbMax[1] * invLocalScaling[1];
+ scaledAabbMax[2] = m_localScaling.getZ() <= 0. ? aabbMin[2] * invLocalScaling[2] : aabbMax[2] * invLocalScaling[2];
+ scaledAabbMax[3] = 0.f;
+
+
+ m_bvhTriMeshShape->processAllTriangles(&scaledCallback,scaledAabbMin,scaledAabbMax);
+}
+
+
+void btScaledBvhTriangleMeshShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ btVector3 localAabbMin = m_bvhTriMeshShape->getLocalAabbMin();
+ btVector3 localAabbMax = m_bvhTriMeshShape->getLocalAabbMax();
+
+ btVector3 tmpLocalAabbMin = localAabbMin * m_localScaling;
+ btVector3 tmpLocalAabbMax = localAabbMax * m_localScaling;
+
+ localAabbMin[0] = (m_localScaling.getX() >= 0.) ? tmpLocalAabbMin[0] : tmpLocalAabbMax[0];
+ localAabbMin[1] = (m_localScaling.getY() >= 0.) ? tmpLocalAabbMin[1] : tmpLocalAabbMax[1];
+ localAabbMin[2] = (m_localScaling.getZ() >= 0.) ? tmpLocalAabbMin[2] : tmpLocalAabbMax[2];
+ localAabbMax[0] = (m_localScaling.getX() <= 0.) ? tmpLocalAabbMin[0] : tmpLocalAabbMax[0];
+ localAabbMax[1] = (m_localScaling.getY() <= 0.) ? tmpLocalAabbMin[1] : tmpLocalAabbMax[1];
+ localAabbMax[2] = (m_localScaling.getZ() <= 0.) ? tmpLocalAabbMin[2] : tmpLocalAabbMax[2];
+
+ btVector3 localHalfExtents = btScalar(0.5)*(localAabbMax-localAabbMin);
+ btScalar margin = m_bvhTriMeshShape->getMargin();
+ localHalfExtents += btVector3(margin,margin,margin);
+ btVector3 localCenter = btScalar(0.5)*(localAabbMax+localAabbMin);
+
+ btMatrix3x3 abs_b = trans.getBasis().absolute();
+
+ btVector3 center = trans(localCenter);
+
+ btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents),
+ abs_b[1].dot(localHalfExtents),
+ abs_b[2].dot(localHalfExtents));
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+
+}
+
+void btScaledBvhTriangleMeshShape::setLocalScaling(const btVector3& scaling)
+{
+ m_localScaling = scaling;
+}
+
+const btVector3& btScaledBvhTriangleMeshShape::getLocalScaling() const
+{
+ return m_localScaling;
+}
+
+void btScaledBvhTriangleMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ ///don't make this a movable object!
+// btAssert(0);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h
new file mode 100644
index 00000000..ff86ef31
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h
@@ -0,0 +1,93 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
+#define BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
+
+#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
+
+
+///The btScaledBvhTriangleMeshShape allows to instance a scaled version of an existing btBvhTriangleMeshShape.
+///Note that each btBvhTriangleMeshShape still can have its own local scaling, independent from this btScaledBvhTriangleMeshShape 'localScaling'
+ATTRIBUTE_ALIGNED16(class) btScaledBvhTriangleMeshShape : public btConcaveShape
+{
+
+
+ btVector3 m_localScaling;
+
+ btBvhTriangleMeshShape* m_bvhTriMeshShape;
+
+public:
+
+
+ btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape* childShape,const btVector3& localScaling);
+
+ virtual ~btScaledBvhTriangleMeshShape();
+
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+ virtual void setLocalScaling(const btVector3& scaling);
+ virtual const btVector3& getLocalScaling() const;
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ btBvhTriangleMeshShape* getChildShape()
+ {
+ return m_bvhTriMeshShape;
+ }
+
+ const btBvhTriangleMeshShape* getChildShape() const
+ {
+ return m_bvhTriMeshShape;
+ }
+
+ //debugging
+ virtual const char* getName()const {return "SCALEDBVHTRIANGLEMESH";}
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btScaledTriangleMeshShapeData
+{
+ btTriangleMeshShapeData m_trimeshShapeData;
+
+ btVector3FloatData m_localScaling;
+};
+
+
+SIMD_FORCE_INLINE int btScaledBvhTriangleMeshShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btScaledTriangleMeshShapeData);
+}
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btScaledBvhTriangleMeshShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btScaledTriangleMeshShapeData* scaledMeshData = (btScaledTriangleMeshShapeData*) dataBuffer;
+ m_bvhTriMeshShape->serialize(&scaledMeshData->m_trimeshShapeData,serializer);
+ scaledMeshData->m_trimeshShapeData.m_collisionShapeData.m_shapeType = SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE;
+ m_localScaling.serializeFloat(scaledMeshData->m_localScaling);
+ return "btScaledTriangleMeshShapeData";
+}
+
+
+#endif //BT_SCALED_BVH_TRIANGLE_MESH_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.cpp
new file mode 100644
index 00000000..3beaf865
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.cpp
@@ -0,0 +1,170 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//btShapeHull was implemented by John McCutchan.
+
+
+#include "btShapeHull.h"
+#include "LinearMath/btConvexHull.h"
+
+#define NUM_UNITSPHERE_POINTS 42
+
+btShapeHull::btShapeHull (const btConvexShape* shape)
+{
+ m_shape = shape;
+ m_vertices.clear ();
+ m_indices.clear();
+ m_numIndices = 0;
+}
+
+btShapeHull::~btShapeHull ()
+{
+ m_indices.clear();
+ m_vertices.clear ();
+}
+
+bool
+btShapeHull::buildHull (btScalar /*margin*/)
+{
+ int numSampleDirections = NUM_UNITSPHERE_POINTS;
+ {
+ int numPDA = m_shape->getNumPreferredPenetrationDirections();
+ if (numPDA)
+ {
+ for (int i=0;i<numPDA;i++)
+ {
+ btVector3 norm;
+ m_shape->getPreferredPenetrationDirection(i,norm);
+ getUnitSpherePoints()[numSampleDirections] = norm;
+ numSampleDirections++;
+ }
+ }
+ }
+
+ btVector3 supportPoints[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ int i;
+ for (i = 0; i < numSampleDirections; i++)
+ {
+ supportPoints[i] = m_shape->localGetSupportingVertex(getUnitSpherePoints()[i]);
+ }
+
+ HullDesc hd;
+ hd.mFlags = QF_TRIANGLES;
+ hd.mVcount = static_cast<unsigned int>(numSampleDirections);
+
+#ifdef BT_USE_DOUBLE_PRECISION
+ hd.mVertices = &supportPoints[0];
+ hd.mVertexStride = sizeof(btVector3);
+#else
+ hd.mVertices = &supportPoints[0];
+ hd.mVertexStride = sizeof (btVector3);
+#endif
+
+ HullLibrary hl;
+ HullResult hr;
+ if (hl.CreateConvexHull (hd, hr) == QE_FAIL)
+ {
+ return false;
+ }
+
+ m_vertices.resize (static_cast<int>(hr.mNumOutputVertices));
+
+
+ for (i = 0; i < static_cast<int>(hr.mNumOutputVertices); i++)
+ {
+ m_vertices[i] = hr.m_OutputVertices[i];
+ }
+ m_numIndices = hr.mNumIndices;
+ m_indices.resize(static_cast<int>(m_numIndices));
+ for (i = 0; i < static_cast<int>(m_numIndices); i++)
+ {
+ m_indices[i] = hr.m_Indices[i];
+ }
+
+ // free temporary hull result that we just copied
+ hl.ReleaseResult (hr);
+
+ return true;
+}
+
+int
+btShapeHull::numTriangles () const
+{
+ return static_cast<int>(m_numIndices / 3);
+}
+
+int
+btShapeHull::numVertices () const
+{
+ return m_vertices.size ();
+}
+
+int
+btShapeHull::numIndices () const
+{
+ return static_cast<int>(m_numIndices);
+}
+
+
+btVector3* btShapeHull::getUnitSpherePoints()
+{
+ static btVector3 sUnitSpherePoints[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2] =
+ {
+ btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)),
+ btVector3(btScalar(0.723608) , btScalar(-0.525725),btScalar(-0.447219)),
+ btVector3(btScalar(-0.276388) , btScalar(-0.850649),btScalar(-0.447219)),
+ btVector3(btScalar(-0.894426) , btScalar(-0.000000),btScalar(-0.447216)),
+ btVector3(btScalar(-0.276388) , btScalar(0.850649),btScalar(-0.447220)),
+ btVector3(btScalar(0.723608) , btScalar(0.525725),btScalar(-0.447219)),
+ btVector3(btScalar(0.276388) , btScalar(-0.850649),btScalar(0.447220)),
+ btVector3(btScalar(-0.723608) , btScalar(-0.525725),btScalar(0.447219)),
+ btVector3(btScalar(-0.723608) , btScalar(0.525725),btScalar(0.447219)),
+ btVector3(btScalar(0.276388) , btScalar(0.850649),btScalar(0.447219)),
+ btVector3(btScalar(0.894426) , btScalar(0.000000),btScalar(0.447216)),
+ btVector3(btScalar(-0.000000) , btScalar(0.000000),btScalar(1.000000)),
+ btVector3(btScalar(0.425323) , btScalar(-0.309011),btScalar(-0.850654)),
+ btVector3(btScalar(-0.162456) , btScalar(-0.499995),btScalar(-0.850654)),
+ btVector3(btScalar(0.262869) , btScalar(-0.809012),btScalar(-0.525738)),
+ btVector3(btScalar(0.425323) , btScalar(0.309011),btScalar(-0.850654)),
+ btVector3(btScalar(0.850648) , btScalar(-0.000000),btScalar(-0.525736)),
+ btVector3(btScalar(-0.525730) , btScalar(-0.000000),btScalar(-0.850652)),
+ btVector3(btScalar(-0.688190) , btScalar(-0.499997),btScalar(-0.525736)),
+ btVector3(btScalar(-0.162456) , btScalar(0.499995),btScalar(-0.850654)),
+ btVector3(btScalar(-0.688190) , btScalar(0.499997),btScalar(-0.525736)),
+ btVector3(btScalar(0.262869) , btScalar(0.809012),btScalar(-0.525738)),
+ btVector3(btScalar(0.951058) , btScalar(0.309013),btScalar(0.000000)),
+ btVector3(btScalar(0.951058) , btScalar(-0.309013),btScalar(0.000000)),
+ btVector3(btScalar(0.587786) , btScalar(-0.809017),btScalar(0.000000)),
+ btVector3(btScalar(0.000000) , btScalar(-1.000000),btScalar(0.000000)),
+ btVector3(btScalar(-0.587786) , btScalar(-0.809017),btScalar(0.000000)),
+ btVector3(btScalar(-0.951058) , btScalar(-0.309013),btScalar(-0.000000)),
+ btVector3(btScalar(-0.951058) , btScalar(0.309013),btScalar(-0.000000)),
+ btVector3(btScalar(-0.587786) , btScalar(0.809017),btScalar(-0.000000)),
+ btVector3(btScalar(-0.000000) , btScalar(1.000000),btScalar(-0.000000)),
+ btVector3(btScalar(0.587786) , btScalar(0.809017),btScalar(-0.000000)),
+ btVector3(btScalar(0.688190) , btScalar(-0.499997),btScalar(0.525736)),
+ btVector3(btScalar(-0.262869) , btScalar(-0.809012),btScalar(0.525738)),
+ btVector3(btScalar(-0.850648) , btScalar(0.000000),btScalar(0.525736)),
+ btVector3(btScalar(-0.262869) , btScalar(0.809012),btScalar(0.525738)),
+ btVector3(btScalar(0.688190) , btScalar(0.499997),btScalar(0.525736)),
+ btVector3(btScalar(0.525730) , btScalar(0.000000),btScalar(0.850652)),
+ btVector3(btScalar(0.162456) , btScalar(-0.499995),btScalar(0.850654)),
+ btVector3(btScalar(-0.425323) , btScalar(-0.309011),btScalar(0.850654)),
+ btVector3(btScalar(-0.425323) , btScalar(0.309011),btScalar(0.850654)),
+ btVector3(btScalar(0.162456) , btScalar(0.499995),btScalar(0.850654))
+ };
+ return sUnitSpherePoints;
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.h b/tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.h
new file mode 100644
index 00000000..642a2887
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btShapeHull.h
@@ -0,0 +1,59 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///btShapeHull implemented by John McCutchan.
+
+#ifndef BT_SHAPE_HULL_H
+#define BT_SHAPE_HULL_H
+
+#include "LinearMath/btAlignedObjectArray.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+
+
+///The btShapeHull class takes a btConvexShape, builds a simplified convex hull using btConvexHull and provides triangle indices and vertices.
+///It can be useful for to simplify a complex convex object and for visualization of a non-polyhedral convex object.
+///It approximates the convex hull using the supporting vertex of 42 directions.
+class btShapeHull
+{
+protected:
+
+ btAlignedObjectArray<btVector3> m_vertices;
+ btAlignedObjectArray<unsigned int> m_indices;
+ unsigned int m_numIndices;
+ const btConvexShape* m_shape;
+
+ static btVector3* getUnitSpherePoints();
+
+public:
+ btShapeHull (const btConvexShape* shape);
+ ~btShapeHull ();
+
+ bool buildHull (btScalar margin);
+
+ int numTriangles () const;
+ int numVertices () const;
+ int numIndices () const;
+
+ const btVector3* getVertexPointer() const
+ {
+ return &m_vertices[0];
+ }
+ const unsigned int* getIndexPointer() const
+ {
+ return &m_indices[0];
+ }
+};
+
+#endif //BT_SHAPE_HULL_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.cpp
new file mode 100644
index 00000000..b9a736c0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.cpp
@@ -0,0 +1,71 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSphereShape.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+
+#include "LinearMath/btQuaternion.h"
+
+btVector3 btSphereShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ (void)vec;
+ return btVector3(btScalar(0.),btScalar(0.),btScalar(0.));
+}
+
+void btSphereShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ (void)vectors;
+
+ for (int i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i].setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ }
+}
+
+
+btVector3 btSphereShape::localGetSupportingVertex(const btVector3& vec)const
+{
+ btVector3 supVertex;
+ supVertex = localGetSupportingVertexWithoutMargin(vec);
+
+ btVector3 vecnorm = vec;
+ if (vecnorm .length2() < (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ vecnorm.setValue(btScalar(-1.),btScalar(-1.),btScalar(-1.));
+ }
+ vecnorm.normalize();
+ supVertex+= getMargin() * vecnorm;
+ return supVertex;
+}
+
+
+//broken due to scaling
+void btSphereShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ const btVector3& center = t.getOrigin();
+ btVector3 extent(getMargin(),getMargin(),getMargin());
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+}
+
+
+
+void btSphereShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ btScalar elem = btScalar(0.4) * mass * getMargin()*getMargin();
+ inertia.setValue(elem,elem,elem);
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.h
new file mode 100644
index 00000000..b192efee
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btSphereShape.h
@@ -0,0 +1,73 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef BT_SPHERE_MINKOWSKI_H
+#define BT_SPHERE_MINKOWSKI_H
+
+#include "btConvexInternalShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+///The btSphereShape implements an implicit sphere, centered around a local origin with radius.
+ATTRIBUTE_ALIGNED16(class) btSphereShape : public btConvexInternalShape
+
+{
+
+public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btSphereShape (btScalar radius) : btConvexInternalShape ()
+ {
+ m_shapeType = SPHERE_SHAPE_PROXYTYPE;
+ m_implicitShapeDimensions.setX(radius);
+ m_collisionMargin = radius;
+ }
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+ //notice that the vectors should be unit length
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+
+ btScalar getRadius() const { return m_implicitShapeDimensions.getX() * m_localScaling.getX();}
+
+ void setUnscaledRadius(btScalar radius)
+ {
+ m_implicitShapeDimensions.setX(radius);
+ btConvexInternalShape::setMargin(radius);
+ }
+
+ //debugging
+ virtual const char* getName()const {return "SPHERE";}
+
+ virtual void setMargin(btScalar margin)
+ {
+ btConvexInternalShape::setMargin(margin);
+ }
+ virtual btScalar getMargin() const
+ {
+ //to improve gjk behaviour, use radius+margin as the full margin, so never get into the penetration case
+ //this means, non-uniform scaling is not supported anymore
+ return getRadius();
+ }
+
+
+};
+
+
+#endif //BT_SPHERE_MINKOWSKI_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp
new file mode 100644
index 00000000..38ef8f03
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.cpp
@@ -0,0 +1,107 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btStaticPlaneShape.h"
+
+#include "LinearMath/btTransformUtil.h"
+
+
+btStaticPlaneShape::btStaticPlaneShape(const btVector3& planeNormal,btScalar planeConstant)
+: btConcaveShape (), m_planeNormal(planeNormal.normalized()),
+m_planeConstant(planeConstant),
+m_localScaling(btScalar(0.),btScalar(0.),btScalar(0.))
+{
+ m_shapeType = STATIC_PLANE_PROXYTYPE;
+ // btAssert( btFuzzyZero(m_planeNormal.length() - btScalar(1.)) );
+}
+
+
+btStaticPlaneShape::~btStaticPlaneShape()
+{
+}
+
+
+
+void btStaticPlaneShape::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ (void)t;
+ /*
+ btVector3 infvec (btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+
+ btVector3 center = m_planeNormal*m_planeConstant;
+ aabbMin = center + infvec*m_planeNormal;
+ aabbMax = aabbMin;
+ aabbMin.setMin(center - infvec*m_planeNormal);
+ aabbMax.setMax(center - infvec*m_planeNormal);
+ */
+
+ aabbMin.setValue(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ aabbMax.setValue(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+
+}
+
+
+
+
+void btStaticPlaneShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+
+ btVector3 halfExtents = (aabbMax - aabbMin) * btScalar(0.5);
+ btScalar radius = halfExtents.length();
+ btVector3 center = (aabbMax + aabbMin) * btScalar(0.5);
+
+ //this is where the triangles are generated, given AABB and plane equation (normal/constant)
+
+ btVector3 tangentDir0,tangentDir1;
+
+ //tangentDir0/tangentDir1 can be precalculated
+ btPlaneSpace1(m_planeNormal,tangentDir0,tangentDir1);
+
+ btVector3 supVertex0,supVertex1;
+
+ btVector3 projectedCenter = center - (m_planeNormal.dot(center) - m_planeConstant)*m_planeNormal;
+
+ btVector3 triangle[3];
+ triangle[0] = projectedCenter + tangentDir0*radius + tangentDir1*radius;
+ triangle[1] = projectedCenter + tangentDir0*radius - tangentDir1*radius;
+ triangle[2] = projectedCenter - tangentDir0*radius - tangentDir1*radius;
+
+ callback->processTriangle(triangle,0,0);
+
+ triangle[0] = projectedCenter - tangentDir0*radius - tangentDir1*radius;
+ triangle[1] = projectedCenter - tangentDir0*radius + tangentDir1*radius;
+ triangle[2] = projectedCenter + tangentDir0*radius + tangentDir1*radius;
+
+ callback->processTriangle(triangle,0,1);
+
+}
+
+void btStaticPlaneShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ (void)mass;
+
+ //moving concave objects not supported
+
+ inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+}
+
+void btStaticPlaneShape::setLocalScaling(const btVector3& scaling)
+{
+ m_localScaling = scaling;
+}
+const btVector3& btStaticPlaneShape::getLocalScaling() const
+{
+ return m_localScaling;
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h
new file mode 100644
index 00000000..b13825e6
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btStaticPlaneShape.h
@@ -0,0 +1,103 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_STATIC_PLANE_SHAPE_H
+#define BT_STATIC_PLANE_SHAPE_H
+
+#include "btConcaveShape.h"
+
+
+///The btStaticPlaneShape simulates an infinite non-moving (static) collision plane.
+ATTRIBUTE_ALIGNED16(class) btStaticPlaneShape : public btConcaveShape
+{
+protected:
+ btVector3 m_localAabbMin;
+ btVector3 m_localAabbMax;
+
+ btVector3 m_planeNormal;
+ btScalar m_planeConstant;
+ btVector3 m_localScaling;
+
+public:
+ btStaticPlaneShape(const btVector3& planeNormal,btScalar planeConstant);
+
+ virtual ~btStaticPlaneShape();
+
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual void setLocalScaling(const btVector3& scaling);
+ virtual const btVector3& getLocalScaling() const;
+
+ const btVector3& getPlaneNormal() const
+ {
+ return m_planeNormal;
+ }
+
+ const btScalar& getPlaneConstant() const
+ {
+ return m_planeConstant;
+ }
+
+ //debugging
+ virtual const char* getName()const {return "STATICPLANE";}
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btStaticPlaneShapeData
+{
+ btCollisionShapeData m_collisionShapeData;
+
+ btVector3FloatData m_localScaling;
+ btVector3FloatData m_planeNormal;
+ float m_planeConstant;
+ char m_pad[4];
+};
+
+
+SIMD_FORCE_INLINE int btStaticPlaneShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btStaticPlaneShapeData);
+}
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btStaticPlaneShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btStaticPlaneShapeData* planeData = (btStaticPlaneShapeData*) dataBuffer;
+ btCollisionShape::serialize(&planeData->m_collisionShapeData,serializer);
+
+ m_localScaling.serializeFloat(planeData->m_localScaling);
+ m_planeNormal.serializeFloat(planeData->m_planeNormal);
+ planeData->m_planeConstant = float(m_planeConstant);
+
+ return "btStaticPlaneShapeData";
+}
+
+
+#endif //BT_STATIC_PLANE_SHAPE_H
+
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp
new file mode 100644
index 00000000..bc2f9f21
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.cpp
@@ -0,0 +1,379 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btStridingMeshInterface.h"
+#include "LinearMath/btSerializer.h"
+
+btStridingMeshInterface::~btStridingMeshInterface()
+{
+
+}
+
+
+void btStridingMeshInterface::InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ (void)aabbMin;
+ (void)aabbMax;
+ int numtotalphysicsverts = 0;
+ int part,graphicssubparts = getNumSubParts();
+ const unsigned char * vertexbase;
+ const unsigned char * indexbase;
+ int indexstride;
+ PHY_ScalarType type;
+ PHY_ScalarType gfxindextype;
+ int stride,numverts,numtriangles;
+ int gfxindex;
+ btVector3 triangle[3];
+
+ btVector3 meshScaling = getScaling();
+
+ ///if the number of parts is big, the performance might drop due to the innerloop switch on indextype
+ for (part=0;part<graphicssubparts ;part++)
+ {
+ getLockedReadOnlyVertexIndexBase(&vertexbase,numverts,type,stride,&indexbase,indexstride,numtriangles,gfxindextype,part);
+ numtotalphysicsverts+=numtriangles*3; //upper bound
+
+ ///unlike that developers want to pass in double-precision meshes in single-precision Bullet build
+ ///so disable this feature by default
+ ///see patch http://code.google.com/p/bullet/issues/detail?id=213
+
+ switch (type)
+ {
+ case PHY_FLOAT:
+ {
+
+ float* graphicsbase;
+
+ switch (gfxindextype)
+ {
+ case PHY_INTEGER:
+ {
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned int* tri_indices= (unsigned int*)(indexbase+gfxindex*indexstride);
+ graphicsbase = (float*)(vertexbase+tri_indices[0]*stride);
+ triangle[0].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (float*)(vertexbase+tri_indices[1]*stride);
+ triangle[1].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (float*)(vertexbase+tri_indices[2]*stride);
+ triangle[2].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
+ callback->internalProcessTriangleIndex(triangle,part,gfxindex);
+ }
+ break;
+ }
+ case PHY_SHORT:
+ {
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned short int* tri_indices= (unsigned short int*)(indexbase+gfxindex*indexstride);
+ graphicsbase = (float*)(vertexbase+tri_indices[0]*stride);
+ triangle[0].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (float*)(vertexbase+tri_indices[1]*stride);
+ triangle[1].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (float*)(vertexbase+tri_indices[2]*stride);
+ triangle[2].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
+ callback->internalProcessTriangleIndex(triangle,part,gfxindex);
+ }
+ break;
+ }
+ case PHY_UCHAR:
+ {
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned char* tri_indices= (unsigned char*)(indexbase+gfxindex*indexstride);
+ graphicsbase = (float*)(vertexbase+tri_indices[0]*stride);
+ triangle[0].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(),graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (float*)(vertexbase+tri_indices[1]*stride);
+ triangle[1].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (float*)(vertexbase+tri_indices[2]*stride);
+ triangle[2].setValue(graphicsbase[0]*meshScaling.getX(),graphicsbase[1]*meshScaling.getY(), graphicsbase[2]*meshScaling.getZ());
+ callback->internalProcessTriangleIndex(triangle,part,gfxindex);
+ }
+ break;
+ }
+ default:
+ btAssert((gfxindextype == PHY_INTEGER) || (gfxindextype == PHY_SHORT));
+ }
+ break;
+ }
+
+ case PHY_DOUBLE:
+ {
+ double* graphicsbase;
+
+ switch (gfxindextype)
+ {
+ case PHY_INTEGER:
+ {
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned int* tri_indices= (unsigned int*)(indexbase+gfxindex*indexstride);
+ graphicsbase = (double*)(vertexbase+tri_indices[0]*stride);
+ triangle[0].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),(btScalar)graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (double*)(vertexbase+tri_indices[1]*stride);
+ triangle[1].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (double*)(vertexbase+tri_indices[2]*stride);
+ triangle[2].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
+ callback->internalProcessTriangleIndex(triangle,part,gfxindex);
+ }
+ break;
+ }
+ case PHY_SHORT:
+ {
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned short int* tri_indices= (unsigned short int*)(indexbase+gfxindex*indexstride);
+ graphicsbase = (double*)(vertexbase+tri_indices[0]*stride);
+ triangle[0].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),(btScalar)graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (double*)(vertexbase+tri_indices[1]*stride);
+ triangle[1].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (double*)(vertexbase+tri_indices[2]*stride);
+ triangle[2].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
+ callback->internalProcessTriangleIndex(triangle,part,gfxindex);
+ }
+ break;
+ }
+ case PHY_UCHAR:
+ {
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned char* tri_indices= (unsigned char*)(indexbase+gfxindex*indexstride);
+ graphicsbase = (double*)(vertexbase+tri_indices[0]*stride);
+ triangle[0].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(),(btScalar)graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (double*)(vertexbase+tri_indices[1]*stride);
+ triangle[1].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
+ graphicsbase = (double*)(vertexbase+tri_indices[2]*stride);
+ triangle[2].setValue((btScalar)graphicsbase[0]*meshScaling.getX(),(btScalar)graphicsbase[1]*meshScaling.getY(), (btScalar)graphicsbase[2]*meshScaling.getZ());
+ callback->internalProcessTriangleIndex(triangle,part,gfxindex);
+ }
+ break;
+ }
+ default:
+ btAssert((gfxindextype == PHY_INTEGER) || (gfxindextype == PHY_SHORT));
+ }
+ break;
+ }
+ default:
+ btAssert((type == PHY_FLOAT) || (type == PHY_DOUBLE));
+ }
+
+ unLockReadOnlyVertexBase(part);
+ }
+}
+
+void btStridingMeshInterface::calculateAabbBruteForce(btVector3& aabbMin,btVector3& aabbMax)
+{
+
+ struct AabbCalculationCallback : public btInternalTriangleIndexCallback
+ {
+ btVector3 m_aabbMin;
+ btVector3 m_aabbMax;
+
+ AabbCalculationCallback()
+ {
+ m_aabbMin.setValue(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ m_aabbMax.setValue(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex)
+ {
+ (void)partId;
+ (void)triangleIndex;
+
+ m_aabbMin.setMin(triangle[0]);
+ m_aabbMax.setMax(triangle[0]);
+ m_aabbMin.setMin(triangle[1]);
+ m_aabbMax.setMax(triangle[1]);
+ m_aabbMin.setMin(triangle[2]);
+ m_aabbMax.setMax(triangle[2]);
+ }
+ };
+
+ //first calculate the total aabb for all triangles
+ AabbCalculationCallback aabbCallback;
+ aabbMin.setValue(btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT),btScalar(-BT_LARGE_FLOAT));
+ aabbMax.setValue(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ InternalProcessAllTriangles(&aabbCallback,aabbMin,aabbMax);
+
+ aabbMin = aabbCallback.m_aabbMin;
+ aabbMax = aabbCallback.m_aabbMax;
+}
+
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btStridingMeshInterfaceData* trimeshData = (btStridingMeshInterfaceData*) dataBuffer;
+
+ trimeshData->m_numMeshParts = getNumSubParts();
+
+ //void* uniquePtr = 0;
+
+ trimeshData->m_meshPartsPtr = 0;
+
+ if (trimeshData->m_numMeshParts)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btMeshPartData),trimeshData->m_numMeshParts);
+ btMeshPartData* memPtr = (btMeshPartData*)chunk->m_oldPtr;
+ trimeshData->m_meshPartsPtr = (btMeshPartData *)serializer->getUniquePointer(memPtr);
+
+
+ // int numtotalphysicsverts = 0;
+ int part,graphicssubparts = getNumSubParts();
+ const unsigned char * vertexbase;
+ const unsigned char * indexbase;
+ int indexstride;
+ PHY_ScalarType type;
+ PHY_ScalarType gfxindextype;
+ int stride,numverts,numtriangles;
+ int gfxindex;
+ // btVector3 triangle[3];
+
+ btVector3 meshScaling = getScaling();
+
+ ///if the number of parts is big, the performance might drop due to the innerloop switch on indextype
+ for (part=0;part<graphicssubparts ;part++,memPtr++)
+ {
+ getLockedReadOnlyVertexIndexBase(&vertexbase,numverts,type,stride,&indexbase,indexstride,numtriangles,gfxindextype,part);
+ memPtr->m_numTriangles = numtriangles;//indices = 3*numtriangles
+ memPtr->m_numVertices = numverts;
+ memPtr->m_indices16 = 0;
+ memPtr->m_indices32 = 0;
+ memPtr->m_3indices16 = 0;
+ memPtr->m_vertices3f = 0;
+ memPtr->m_vertices3d = 0;
+
+ switch (gfxindextype)
+ {
+ case PHY_INTEGER:
+ {
+ int numindices = numtriangles*3;
+
+ if (numindices)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btIntIndexData),numindices);
+ btIntIndexData* tmpIndices = (btIntIndexData*)chunk->m_oldPtr;
+ memPtr->m_indices32 = (btIntIndexData*)serializer->getUniquePointer(tmpIndices);
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned int* tri_indices= (unsigned int*)(indexbase+gfxindex*indexstride);
+ tmpIndices[gfxindex*3].m_value = tri_indices[0];
+ tmpIndices[gfxindex*3+1].m_value = tri_indices[1];
+ tmpIndices[gfxindex*3+2].m_value = tri_indices[2];
+ }
+ serializer->finalizeChunk(chunk,"btIntIndexData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
+ }
+ break;
+ }
+ case PHY_SHORT:
+ {
+ if (numtriangles)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btShortIntIndexTripletData),numtriangles);
+ btShortIntIndexTripletData* tmpIndices = (btShortIntIndexTripletData*)chunk->m_oldPtr;
+ memPtr->m_3indices16 = (btShortIntIndexTripletData*) serializer->getUniquePointer(tmpIndices);
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned short int* tri_indices= (unsigned short int*)(indexbase+gfxindex*indexstride);
+ tmpIndices[gfxindex].m_values[0] = tri_indices[0];
+ tmpIndices[gfxindex].m_values[1] = tri_indices[1];
+ tmpIndices[gfxindex].m_values[2] = tri_indices[2];
+ }
+ serializer->finalizeChunk(chunk,"btShortIntIndexTripletData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
+ }
+ break;
+ }
+ case PHY_UCHAR:
+ {
+ if (numtriangles)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btCharIndexTripletData),numtriangles);
+ btCharIndexTripletData* tmpIndices = (btCharIndexTripletData*)chunk->m_oldPtr;
+ memPtr->m_3indices8 = (btCharIndexTripletData*) serializer->getUniquePointer(tmpIndices);
+ for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
+ {
+ unsigned char* tri_indices= (unsigned char*)(indexbase+gfxindex*indexstride);
+ tmpIndices[gfxindex].m_values[0] = tri_indices[0];
+ tmpIndices[gfxindex].m_values[1] = tri_indices[1];
+ tmpIndices[gfxindex].m_values[2] = tri_indices[2];
+ }
+ serializer->finalizeChunk(chunk,"btCharIndexTripletData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
+ }
+ break;
+ }
+ default:
+ {
+ btAssert(0);
+ //unknown index type
+ }
+ }
+
+ switch (type)
+ {
+ case PHY_FLOAT:
+ {
+ float* graphicsbase;
+
+ if (numverts)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btVector3FloatData),numverts);
+ btVector3FloatData* tmpVertices = (btVector3FloatData*) chunk->m_oldPtr;
+ memPtr->m_vertices3f = (btVector3FloatData *)serializer->getUniquePointer(tmpVertices);
+ for (int i=0;i<numverts;i++)
+ {
+ graphicsbase = (float*)(vertexbase+i*stride);
+ tmpVertices[i].m_floats[0] = graphicsbase[0];
+ tmpVertices[i].m_floats[1] = graphicsbase[1];
+ tmpVertices[i].m_floats[2] = graphicsbase[2];
+ }
+ serializer->finalizeChunk(chunk,"btVector3FloatData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
+ }
+ break;
+ }
+
+ case PHY_DOUBLE:
+ {
+ if (numverts)
+ {
+ btChunk* chunk = serializer->allocate(sizeof(btVector3DoubleData),numverts);
+ btVector3DoubleData* tmpVertices = (btVector3DoubleData*) chunk->m_oldPtr;
+ memPtr->m_vertices3d = (btVector3DoubleData *) serializer->getUniquePointer(tmpVertices);
+ for (int i=0;i<numverts;i++)
+ {
+ double* graphicsbase = (double*)(vertexbase+i*stride);//for now convert to float, might leave it at double
+ tmpVertices[i].m_floats[0] = graphicsbase[0];
+ tmpVertices[i].m_floats[1] = graphicsbase[1];
+ tmpVertices[i].m_floats[2] = graphicsbase[2];
+ }
+ serializer->finalizeChunk(chunk,"btVector3DoubleData",BT_ARRAY_CODE,(void*)chunk->m_oldPtr);
+ }
+ break;
+ }
+
+ default:
+ btAssert((type == PHY_FLOAT) || (type == PHY_DOUBLE));
+ }
+
+ unLockReadOnlyVertexBase(part);
+ }
+
+ serializer->finalizeChunk(chunk,"btMeshPartData",BT_ARRAY_CODE,chunk->m_oldPtr);
+ }
+
+
+ m_scaling.serializeFloat(trimeshData->m_scaling);
+ return "btStridingMeshInterfaceData";
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h b/tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h
new file mode 100644
index 00000000..f2b27ade
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btStridingMeshInterface.h
@@ -0,0 +1,162 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_STRIDING_MESHINTERFACE_H
+#define BT_STRIDING_MESHINTERFACE_H
+
+#include "LinearMath/btVector3.h"
+#include "btTriangleCallback.h"
+#include "btConcaveShape.h"
+
+
+
+
+
+/// The btStridingMeshInterface is the interface class for high performance generic access to triangle meshes, used in combination with btBvhTriangleMeshShape and some other collision shapes.
+/// Using index striding of 3*sizeof(integer) it can use triangle arrays, using index striding of 1*sizeof(integer) it can handle triangle strips.
+/// It allows for sharing graphics and collision meshes. Also it provides locking/unlocking of graphics meshes that are in gpu memory.
+class btStridingMeshInterface
+{
+ protected:
+
+ btVector3 m_scaling;
+
+ public:
+ btStridingMeshInterface() :m_scaling(btScalar(1.),btScalar(1.),btScalar(1.))
+ {
+
+ }
+
+ virtual ~btStridingMeshInterface();
+
+
+
+ virtual void InternalProcessAllTriangles(btInternalTriangleIndexCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ ///brute force method to calculate aabb
+ void calculateAabbBruteForce(btVector3& aabbMin,btVector3& aabbMax);
+
+ /// get read and write access to a subpart of a triangle mesh
+ /// this subpart has a continuous array of vertices and indices
+ /// in this way the mesh can be handled as chunks of memory with striding
+ /// very similar to OpenGL vertexarray support
+ /// make a call to unLockVertexBase when the read and write access is finished
+ virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0)=0;
+
+ virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& stride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const=0;
+
+ /// unLockVertexBase finishes the access to a subpart of the triangle mesh
+ /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished
+ virtual void unLockVertexBase(int subpart)=0;
+
+ virtual void unLockReadOnlyVertexBase(int subpart) const=0;
+
+
+ /// getNumSubParts returns the number of seperate subparts
+ /// each subpart has a continuous array of vertices and indices
+ virtual int getNumSubParts() const=0;
+
+ virtual void preallocateVertices(int numverts)=0;
+ virtual void preallocateIndices(int numindices)=0;
+
+ virtual bool hasPremadeAabb() const { return false; }
+ virtual void setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ) const
+ {
+ (void) aabbMin;
+ (void) aabbMax;
+ }
+ virtual void getPremadeAabb(btVector3* aabbMin, btVector3* aabbMax ) const
+ {
+ (void) aabbMin;
+ (void) aabbMax;
+ }
+
+ const btVector3& getScaling() const {
+ return m_scaling;
+ }
+ void setScaling(const btVector3& scaling)
+ {
+ m_scaling = scaling;
+ }
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+struct btIntIndexData
+{
+ int m_value;
+};
+
+struct btShortIntIndexData
+{
+ short m_value;
+ char m_pad[2];
+};
+
+struct btShortIntIndexTripletData
+{
+ short m_values[3];
+ char m_pad[2];
+};
+
+struct btCharIndexTripletData
+{
+ unsigned char m_values[3];
+ char m_pad;
+};
+
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btMeshPartData
+{
+ btVector3FloatData *m_vertices3f;
+ btVector3DoubleData *m_vertices3d;
+
+ btIntIndexData *m_indices32;
+ btShortIntIndexTripletData *m_3indices16;
+ btCharIndexTripletData *m_3indices8;
+
+ btShortIntIndexData *m_indices16;//backwards compatibility
+
+ int m_numTriangles;//length of m_indices = m_numTriangles
+ int m_numVertices;
+};
+
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btStridingMeshInterfaceData
+{
+ btMeshPartData *m_meshPartsPtr;
+ btVector3FloatData m_scaling;
+ int m_numMeshParts;
+ char m_padding[4];
+};
+
+
+
+
+SIMD_FORCE_INLINE int btStridingMeshInterface::calculateSerializeBufferSize() const
+{
+ return sizeof(btStridingMeshInterfaceData);
+}
+
+
+
+#endif //BT_STRIDING_MESHINTERFACE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp
new file mode 100644
index 00000000..52f346bf
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.cpp
@@ -0,0 +1,218 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btTetrahedronShape.h"
+#include "LinearMath/btMatrix3x3.h"
+
+btBU_Simplex1to4::btBU_Simplex1to4() : btPolyhedralConvexAabbCachingShape (),
+m_numVertices(0)
+{
+ m_shapeType = TETRAHEDRAL_SHAPE_PROXYTYPE;
+}
+
+btBU_Simplex1to4::btBU_Simplex1to4(const btVector3& pt0) : btPolyhedralConvexAabbCachingShape (),
+m_numVertices(0)
+{
+ m_shapeType = TETRAHEDRAL_SHAPE_PROXYTYPE;
+ addVertex(pt0);
+}
+
+btBU_Simplex1to4::btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1) : btPolyhedralConvexAabbCachingShape (),
+m_numVertices(0)
+{
+ m_shapeType = TETRAHEDRAL_SHAPE_PROXYTYPE;
+ addVertex(pt0);
+ addVertex(pt1);
+}
+
+btBU_Simplex1to4::btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2) : btPolyhedralConvexAabbCachingShape (),
+m_numVertices(0)
+{
+ m_shapeType = TETRAHEDRAL_SHAPE_PROXYTYPE;
+ addVertex(pt0);
+ addVertex(pt1);
+ addVertex(pt2);
+}
+
+btBU_Simplex1to4::btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2,const btVector3& pt3) : btPolyhedralConvexAabbCachingShape (),
+m_numVertices(0)
+{
+ m_shapeType = TETRAHEDRAL_SHAPE_PROXYTYPE;
+ addVertex(pt0);
+ addVertex(pt1);
+ addVertex(pt2);
+ addVertex(pt3);
+}
+
+
+void btBU_Simplex1to4::getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+#if 1
+ btPolyhedralConvexAabbCachingShape::getAabb(t,aabbMin,aabbMax);
+#else
+ aabbMin.setValue(BT_LARGE_FLOAT,BT_LARGE_FLOAT,BT_LARGE_FLOAT);
+ aabbMax.setValue(-BT_LARGE_FLOAT,-BT_LARGE_FLOAT,-BT_LARGE_FLOAT);
+
+ //just transform the vertices in worldspace, and take their AABB
+ for (int i=0;i<m_numVertices;i++)
+ {
+ btVector3 worldVertex = t(m_vertices[i]);
+ aabbMin.setMin(worldVertex);
+ aabbMax.setMax(worldVertex);
+ }
+#endif
+}
+
+
+
+
+
+void btBU_Simplex1to4::addVertex(const btVector3& pt)
+{
+ m_vertices[m_numVertices++] = pt;
+ recalcLocalAabb();
+}
+
+
+int btBU_Simplex1to4::getNumVertices() const
+{
+ return m_numVertices;
+}
+
+int btBU_Simplex1to4::getNumEdges() const
+{
+ //euler formula, F-E+V = 2, so E = F+V-2
+
+ switch (m_numVertices)
+ {
+ case 0:
+ return 0;
+ case 1: return 0;
+ case 2: return 1;
+ case 3: return 3;
+ case 4: return 6;
+
+
+ }
+
+ return 0;
+}
+
+void btBU_Simplex1to4::getEdge(int i,btVector3& pa,btVector3& pb) const
+{
+
+ switch (m_numVertices)
+ {
+
+ case 2:
+ pa = m_vertices[0];
+ pb = m_vertices[1];
+ break;
+ case 3:
+ switch (i)
+ {
+ case 0:
+ pa = m_vertices[0];
+ pb = m_vertices[1];
+ break;
+ case 1:
+ pa = m_vertices[1];
+ pb = m_vertices[2];
+ break;
+ case 2:
+ pa = m_vertices[2];
+ pb = m_vertices[0];
+ break;
+
+ }
+ break;
+ case 4:
+ switch (i)
+ {
+ case 0:
+ pa = m_vertices[0];
+ pb = m_vertices[1];
+ break;
+ case 1:
+ pa = m_vertices[1];
+ pb = m_vertices[2];
+ break;
+ case 2:
+ pa = m_vertices[2];
+ pb = m_vertices[0];
+ break;
+ case 3:
+ pa = m_vertices[0];
+ pb = m_vertices[3];
+ break;
+ case 4:
+ pa = m_vertices[1];
+ pb = m_vertices[3];
+ break;
+ case 5:
+ pa = m_vertices[2];
+ pb = m_vertices[3];
+ break;
+ }
+
+ }
+
+
+
+
+}
+
+void btBU_Simplex1to4::getVertex(int i,btVector3& vtx) const
+{
+ vtx = m_vertices[i];
+}
+
+int btBU_Simplex1to4::getNumPlanes() const
+{
+ switch (m_numVertices)
+ {
+ case 0:
+ return 0;
+ case 1:
+ return 0;
+ case 2:
+ return 0;
+ case 3:
+ return 2;
+ case 4:
+ return 4;
+ default:
+ {
+ }
+ }
+ return 0;
+}
+
+
+void btBU_Simplex1to4::getPlane(btVector3&, btVector3& ,int ) const
+{
+
+}
+
+int btBU_Simplex1to4::getIndex(int ) const
+{
+ return 0;
+}
+
+bool btBU_Simplex1to4::isInside(const btVector3& ,btScalar ) const
+{
+ return false;
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.h
new file mode 100644
index 00000000..6b7128ef
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTetrahedronShape.h
@@ -0,0 +1,74 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SIMPLEX_1TO4_SHAPE
+#define BT_SIMPLEX_1TO4_SHAPE
+
+
+#include "btPolyhedralConvexShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+
+
+///The btBU_Simplex1to4 implements tetrahedron, triangle, line, vertex collision shapes. In most cases it is better to use btConvexHullShape instead.
+class btBU_Simplex1to4 : public btPolyhedralConvexAabbCachingShape
+{
+protected:
+
+ int m_numVertices;
+ btVector3 m_vertices[4];
+
+public:
+ btBU_Simplex1to4();
+
+ btBU_Simplex1to4(const btVector3& pt0);
+ btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1);
+ btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2);
+ btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2,const btVector3& pt3);
+
+
+ void reset()
+ {
+ m_numVertices = 0;
+ }
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ void addVertex(const btVector3& pt);
+
+ //PolyhedralConvexShape interface
+
+ virtual int getNumVertices() const;
+
+ virtual int getNumEdges() const;
+
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const;
+
+ virtual void getVertex(int i,btVector3& vtx) const;
+
+ virtual int getNumPlanes() const;
+
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i) const;
+
+ virtual int getIndex(int i) const;
+
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
+
+
+ ///getName is for debugging
+ virtual const char* getName()const { return "btBU_Simplex1to4";}
+
+};
+
+#endif //BT_SIMPLEX_1TO4_SHAPE
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp
new file mode 100644
index 00000000..3027e65b
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.cpp
@@ -0,0 +1,35 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btTriangleBuffer.h"
+
+
+
+
+
+
+
+void btTriangleBuffer::processTriangle(btVector3* triangle,int partId,int triangleIndex)
+{
+ btTriangle tri;
+ tri.m_vertex0 = triangle[0];
+ tri.m_vertex1 = triangle[1];
+ tri.m_vertex2 = triangle[2];
+ tri.m_partId = partId;
+ tri.m_triangleIndex = triangleIndex;
+
+ m_triangleBuffer.push_back(tri);
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.h
new file mode 100644
index 00000000..b71fc8b3
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleBuffer.h
@@ -0,0 +1,69 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_TRIANGLE_BUFFER_H
+#define BT_TRIANGLE_BUFFER_H
+
+#include "btTriangleCallback.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+struct btTriangle
+{
+ btVector3 m_vertex0;
+ btVector3 m_vertex1;
+ btVector3 m_vertex2;
+ int m_partId;
+ int m_triangleIndex;
+};
+
+///The btTriangleBuffer callback can be useful to collect and store overlapping triangles between AABB and concave objects that support 'processAllTriangles'
+///Example usage of this class:
+/// btTriangleBuffer triBuf;
+/// concaveShape->processAllTriangles(&triBuf,aabbMin, aabbMax);
+/// for (int i=0;i<triBuf.getNumTriangles();i++)
+/// {
+/// const btTriangle& tri = triBuf.getTriangle(i);
+/// //do something useful here with the triangle
+/// }
+class btTriangleBuffer : public btTriangleCallback
+{
+
+ btAlignedObjectArray<btTriangle> m_triangleBuffer;
+
+public:
+
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex);
+
+ int getNumTriangles() const
+ {
+ return int(m_triangleBuffer.size());
+ }
+
+ const btTriangle& getTriangle(int index) const
+ {
+ return m_triangleBuffer[index];
+ }
+
+ void clearBuffer()
+ {
+ m_triangleBuffer.clear();
+ }
+
+};
+
+
+#endif //BT_TRIANGLE_BUFFER_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp
new file mode 100644
index 00000000..f558bf6d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.cpp
@@ -0,0 +1,28 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btTriangleCallback.h"
+
+btTriangleCallback::~btTriangleCallback()
+{
+
+}
+
+
+btInternalTriangleIndexCallback::~btInternalTriangleIndexCallback()
+{
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.h
new file mode 100644
index 00000000..461c57f8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleCallback.h
@@ -0,0 +1,42 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_TRIANGLE_CALLBACK_H
+#define BT_TRIANGLE_CALLBACK_H
+
+#include "LinearMath/btVector3.h"
+
+
+///The btTriangleCallback provides a callback for each overlapping triangle when calling processAllTriangles.
+///This callback is called by processAllTriangles for all btConcaveShape derived class, such as btBvhTriangleMeshShape, btStaticPlaneShape and btHeightfieldTerrainShape.
+class btTriangleCallback
+{
+public:
+
+ virtual ~btTriangleCallback();
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex) = 0;
+};
+
+class btInternalTriangleIndexCallback
+{
+public:
+
+ virtual ~btInternalTriangleIndexCallback();
+ virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex) = 0;
+};
+
+
+
+#endif //BT_TRIANGLE_CALLBACK_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp
new file mode 100644
index 00000000..a665024c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp
@@ -0,0 +1,95 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btTriangleIndexVertexArray.h"
+
+btTriangleIndexVertexArray::btTriangleIndexVertexArray(int numTriangles,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride)
+: m_hasAabb(0)
+{
+ btIndexedMesh mesh;
+
+ mesh.m_numTriangles = numTriangles;
+ mesh.m_triangleIndexBase = (const unsigned char *)triangleIndexBase;
+ mesh.m_triangleIndexStride = triangleIndexStride;
+ mesh.m_numVertices = numVertices;
+ mesh.m_vertexBase = (const unsigned char *)vertexBase;
+ mesh.m_vertexStride = vertexStride;
+
+ addIndexedMesh(mesh);
+
+}
+
+btTriangleIndexVertexArray::~btTriangleIndexVertexArray()
+{
+
+}
+
+void btTriangleIndexVertexArray::getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart)
+{
+ btAssert(subpart< getNumSubParts() );
+
+ btIndexedMesh& mesh = m_indexedMeshes[subpart];
+
+ numverts = mesh.m_numVertices;
+ (*vertexbase) = (unsigned char *) mesh.m_vertexBase;
+
+ type = mesh.m_vertexType;
+
+ vertexStride = mesh.m_vertexStride;
+
+ numfaces = mesh.m_numTriangles;
+
+ (*indexbase) = (unsigned char *)mesh.m_triangleIndexBase;
+ indexstride = mesh.m_triangleIndexStride;
+ indicestype = mesh.m_indexType;
+}
+
+void btTriangleIndexVertexArray::getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart) const
+{
+ const btIndexedMesh& mesh = m_indexedMeshes[subpart];
+
+ numverts = mesh.m_numVertices;
+ (*vertexbase) = (const unsigned char *)mesh.m_vertexBase;
+
+ type = mesh.m_vertexType;
+
+ vertexStride = mesh.m_vertexStride;
+
+ numfaces = mesh.m_numTriangles;
+ (*indexbase) = (const unsigned char *)mesh.m_triangleIndexBase;
+ indexstride = mesh.m_triangleIndexStride;
+ indicestype = mesh.m_indexType;
+}
+
+bool btTriangleIndexVertexArray::hasPremadeAabb() const
+{
+ return (m_hasAabb == 1);
+}
+
+
+void btTriangleIndexVertexArray::setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ) const
+{
+ m_aabbMin = aabbMin;
+ m_aabbMax = aabbMax;
+ m_hasAabb = 1; // this is intentionally an int see notes in header
+}
+
+void btTriangleIndexVertexArray::getPremadeAabb(btVector3* aabbMin, btVector3* aabbMax ) const
+{
+ *aabbMin = m_aabbMin;
+ *aabbMax = m_aabbMax;
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h
new file mode 100644
index 00000000..c64ea6e7
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h
@@ -0,0 +1,131 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_TRIANGLE_INDEX_VERTEX_ARRAY_H
+#define BT_TRIANGLE_INDEX_VERTEX_ARRAY_H
+
+#include "btStridingMeshInterface.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "LinearMath/btScalar.h"
+
+
+///The btIndexedMesh indexes a single vertex and index array. Multiple btIndexedMesh objects can be passed into a btTriangleIndexVertexArray using addIndexedMesh.
+///Instead of the number of indices, we pass the number of triangles.
+ATTRIBUTE_ALIGNED16( struct) btIndexedMesh
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ int m_numTriangles;
+ const unsigned char * m_triangleIndexBase;
+ int m_triangleIndexStride;
+ int m_numVertices;
+ const unsigned char * m_vertexBase;
+ int m_vertexStride;
+
+ // The index type is set when adding an indexed mesh to the
+ // btTriangleIndexVertexArray, do not set it manually
+ PHY_ScalarType m_indexType;
+
+ // The vertex type has a default type similar to Bullet's precision mode (float or double)
+ // but can be set manually if you for example run Bullet with double precision but have
+ // mesh data in single precision..
+ PHY_ScalarType m_vertexType;
+
+
+ btIndexedMesh()
+ :m_indexType(PHY_INTEGER),
+#ifdef BT_USE_DOUBLE_PRECISION
+ m_vertexType(PHY_DOUBLE)
+#else // BT_USE_DOUBLE_PRECISION
+ m_vertexType(PHY_FLOAT)
+#endif // BT_USE_DOUBLE_PRECISION
+ {
+ }
+}
+;
+
+
+typedef btAlignedObjectArray<btIndexedMesh> IndexedMeshArray;
+
+///The btTriangleIndexVertexArray allows to access multiple triangle meshes, by indexing into existing triangle/index arrays.
+///Additional meshes can be added using addIndexedMesh
+///No duplcate is made of the vertex/index data, it only indexes into external vertex/index arrays.
+///So keep those arrays around during the lifetime of this btTriangleIndexVertexArray.
+ATTRIBUTE_ALIGNED16( class) btTriangleIndexVertexArray : public btStridingMeshInterface
+{
+protected:
+ IndexedMeshArray m_indexedMeshes;
+ int m_pad[2];
+ mutable int m_hasAabb; // using int instead of bool to maintain alignment
+ mutable btVector3 m_aabbMin;
+ mutable btVector3 m_aabbMax;
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btTriangleIndexVertexArray() : m_hasAabb(0)
+ {
+ }
+
+ virtual ~btTriangleIndexVertexArray();
+
+ //just to be backwards compatible
+ btTriangleIndexVertexArray(int numTriangles,int* triangleIndexBase,int triangleIndexStride,int numVertices,btScalar* vertexBase,int vertexStride);
+
+ void addIndexedMesh(const btIndexedMesh& mesh, PHY_ScalarType indexType = PHY_INTEGER)
+ {
+ m_indexedMeshes.push_back(mesh);
+ m_indexedMeshes[m_indexedMeshes.size()-1].m_indexType = indexType;
+ }
+
+
+ virtual void getLockedVertexIndexBase(unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0);
+
+ virtual void getLockedReadOnlyVertexIndexBase(const unsigned char **vertexbase, int& numverts,PHY_ScalarType& type, int& vertexStride,const unsigned char **indexbase,int & indexstride,int& numfaces,PHY_ScalarType& indicestype,int subpart=0) const;
+
+ /// unLockVertexBase finishes the access to a subpart of the triangle mesh
+ /// make a call to unLockVertexBase when the read and write access (using getLockedVertexIndexBase) is finished
+ virtual void unLockVertexBase(int subpart) {(void)subpart;}
+
+ virtual void unLockReadOnlyVertexBase(int subpart) const {(void)subpart;}
+
+ /// getNumSubParts returns the number of seperate subparts
+ /// each subpart has a continuous array of vertices and indices
+ virtual int getNumSubParts() const {
+ return (int)m_indexedMeshes.size();
+ }
+
+ IndexedMeshArray& getIndexedMeshArray()
+ {
+ return m_indexedMeshes;
+ }
+
+ const IndexedMeshArray& getIndexedMeshArray() const
+ {
+ return m_indexedMeshes;
+ }
+
+ virtual void preallocateVertices(int numverts){(void) numverts;}
+ virtual void preallocateIndices(int numindices){(void) numindices;}
+
+ virtual bool hasPremadeAabb() const;
+ virtual void setPremadeAabb(const btVector3& aabbMin, const btVector3& aabbMax ) const;
+ virtual void getPremadeAabb(btVector3* aabbMin, btVector3* aabbMax ) const;
+
+}
+;
+
+#endif //BT_TRIANGLE_INDEX_VERTEX_ARRAY_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
new file mode 100644
index 00000000..dc562941
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
@@ -0,0 +1,86 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///This file was created by Alex Silverman
+
+#include "btTriangleIndexVertexMaterialArray.h"
+
+btTriangleIndexVertexMaterialArray::btTriangleIndexVertexMaterialArray(int numTriangles,int* triangleIndexBase,int triangleIndexStride,
+ int numVertices,btScalar* vertexBase,int vertexStride,
+ int numMaterials, unsigned char* materialBase, int materialStride,
+ int* triangleMaterialsBase, int materialIndexStride) :
+btTriangleIndexVertexArray(numTriangles, triangleIndexBase, triangleIndexStride, numVertices, vertexBase, vertexStride)
+{
+ btMaterialProperties mat;
+
+ mat.m_numMaterials = numMaterials;
+ mat.m_materialBase = materialBase;
+ mat.m_materialStride = materialStride;
+#ifdef BT_USE_DOUBLE_PRECISION
+ mat.m_materialType = PHY_DOUBLE;
+#else
+ mat.m_materialType = PHY_FLOAT;
+#endif
+
+ mat.m_numTriangles = numTriangles;
+ mat.m_triangleMaterialsBase = (unsigned char *)triangleMaterialsBase;
+ mat.m_triangleMaterialStride = materialIndexStride;
+ mat.m_triangleType = PHY_INTEGER;
+
+ addMaterialProperties(mat);
+}
+
+
+void btTriangleIndexVertexMaterialArray::getLockedMaterialBase(unsigned char **materialBase, int& numMaterials, PHY_ScalarType& materialType, int& materialStride,
+ unsigned char ** triangleMaterialBase, int& numTriangles, int& triangleMaterialStride, PHY_ScalarType& triangleType, int subpart)
+{
+ btAssert(subpart< getNumSubParts() );
+
+ btMaterialProperties& mats = m_materials[subpart];
+
+ numMaterials = mats.m_numMaterials;
+ (*materialBase) = (unsigned char *) mats.m_materialBase;
+#ifdef BT_USE_DOUBLE_PRECISION
+ materialType = PHY_DOUBLE;
+#else
+ materialType = PHY_FLOAT;
+#endif
+ materialStride = mats.m_materialStride;
+
+ numTriangles = mats.m_numTriangles;
+ (*triangleMaterialBase) = (unsigned char *)mats.m_triangleMaterialsBase;
+ triangleMaterialStride = mats.m_triangleMaterialStride;
+ triangleType = mats.m_triangleType;
+}
+
+void btTriangleIndexVertexMaterialArray::getLockedReadOnlyMaterialBase(const unsigned char **materialBase, int& numMaterials, PHY_ScalarType& materialType, int& materialStride,
+ const unsigned char ** triangleMaterialBase, int& numTriangles, int& triangleMaterialStride, PHY_ScalarType& triangleType, int subpart)
+{
+ btMaterialProperties& mats = m_materials[subpart];
+
+ numMaterials = mats.m_numMaterials;
+ (*materialBase) = (const unsigned char *) mats.m_materialBase;
+#ifdef BT_USE_DOUBLE_PRECISION
+ materialType = PHY_DOUBLE;
+#else
+ materialType = PHY_FLOAT;
+#endif
+ materialStride = mats.m_materialStride;
+
+ numTriangles = mats.m_numTriangles;
+ (*triangleMaterialBase) = (const unsigned char *)mats.m_triangleMaterialsBase;
+ triangleMaterialStride = mats.m_triangleMaterialStride;
+ triangleType = mats.m_triangleType;
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h
new file mode 100644
index 00000000..ba4f7b46
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h
@@ -0,0 +1,84 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///This file was created by Alex Silverman
+
+#ifndef BT_MULTIMATERIAL_TRIANGLE_INDEX_VERTEX_ARRAY_H
+#define BT_MULTIMATERIAL_TRIANGLE_INDEX_VERTEX_ARRAY_H
+
+#include "btTriangleIndexVertexArray.h"
+
+
+ATTRIBUTE_ALIGNED16( struct) btMaterialProperties
+{
+ ///m_materialBase ==========> 2 btScalar values make up one material, friction then restitution
+ int m_numMaterials;
+ const unsigned char * m_materialBase;
+ int m_materialStride;
+ PHY_ScalarType m_materialType;
+ ///m_numTriangles <=========== This exists in the btIndexedMesh object for the same subpart, but since we're
+ /// padding the structure, it can be reproduced at no real cost
+ ///m_triangleMaterials =====> 1 integer value makes up one entry
+ /// eg: m_triangleMaterials[1] = 5; // This will set triangle 2 to use material 5
+ int m_numTriangles;
+ const unsigned char * m_triangleMaterialsBase;
+ int m_triangleMaterialStride;
+ ///m_triangleType <========== Automatically set in addMaterialProperties
+ PHY_ScalarType m_triangleType;
+};
+
+typedef btAlignedObjectArray<btMaterialProperties> MaterialArray;
+
+///Teh btTriangleIndexVertexMaterialArray is built on TriangleIndexVertexArray
+///The addition of a material array allows for the utilization of the partID and
+///triangleIndex that are returned in the ContactAddedCallback. As with
+///TriangleIndexVertexArray, no duplicate is made of the material data, so it
+///is the users responsibility to maintain the array during the lifetime of the
+///TriangleIndexVertexMaterialArray.
+ATTRIBUTE_ALIGNED16(class) btTriangleIndexVertexMaterialArray : public btTriangleIndexVertexArray
+{
+protected:
+ MaterialArray m_materials;
+
+public:
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btTriangleIndexVertexMaterialArray()
+ {
+ }
+
+ btTriangleIndexVertexMaterialArray(int numTriangles,int* triangleIndexBase,int triangleIndexStride,
+ int numVertices,btScalar* vertexBase,int vertexStride,
+ int numMaterials, unsigned char* materialBase, int materialStride,
+ int* triangleMaterialsBase, int materialIndexStride);
+
+ virtual ~btTriangleIndexVertexMaterialArray() {}
+
+ void addMaterialProperties(const btMaterialProperties& mat, PHY_ScalarType triangleType = PHY_INTEGER)
+ {
+ m_materials.push_back(mat);
+ m_materials[m_materials.size()-1].m_triangleType = triangleType;
+ }
+
+ virtual void getLockedMaterialBase(unsigned char **materialBase, int& numMaterials, PHY_ScalarType& materialType, int& materialStride,
+ unsigned char ** triangleMaterialBase, int& numTriangles, int& triangleMaterialStride, PHY_ScalarType& triangleType ,int subpart = 0);
+
+ virtual void getLockedReadOnlyMaterialBase(const unsigned char **materialBase, int& numMaterials, PHY_ScalarType& materialType, int& materialStride,
+ const unsigned char ** triangleMaterialBase, int& numTriangles, int& triangleMaterialStride, PHY_ScalarType& triangleType, int subpart = 0);
+
+}
+;
+
+#endif //BT_MULTIMATERIAL_TRIANGLE_INDEX_VERTEX_ARRAY_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h
new file mode 100644
index 00000000..5aadfc67
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleInfoMap.h
@@ -0,0 +1,240 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2010 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _BT_TRIANGLE_INFO_MAP_H
+#define _BT_TRIANGLE_INFO_MAP_H
+
+
+#include "LinearMath/btHashMap.h"
+#include "LinearMath/btSerializer.h"
+
+
+///for btTriangleInfo m_flags
+#define TRI_INFO_V0V1_CONVEX 1
+#define TRI_INFO_V1V2_CONVEX 2
+#define TRI_INFO_V2V0_CONVEX 4
+
+#define TRI_INFO_V0V1_SWAP_NORMALB 8
+#define TRI_INFO_V1V2_SWAP_NORMALB 16
+#define TRI_INFO_V2V0_SWAP_NORMALB 32
+
+
+///The btTriangleInfo structure stores information to adjust collision normals to avoid collisions against internal edges
+///it can be generated using
+struct btTriangleInfo
+{
+ btTriangleInfo()
+ {
+ m_edgeV0V1Angle = SIMD_2_PI;
+ m_edgeV1V2Angle = SIMD_2_PI;
+ m_edgeV2V0Angle = SIMD_2_PI;
+ m_flags=0;
+ }
+
+ int m_flags;
+
+ btScalar m_edgeV0V1Angle;
+ btScalar m_edgeV1V2Angle;
+ btScalar m_edgeV2V0Angle;
+
+};
+
+typedef btHashMap<btHashInt,btTriangleInfo> btInternalTriangleInfoMap;
+
+
+///The btTriangleInfoMap stores edge angle information for some triangles. You can compute this information yourself or using btGenerateInternalEdgeInfo.
+struct btTriangleInfoMap : public btInternalTriangleInfoMap
+{
+ btScalar m_convexEpsilon;///used to determine if an edge or contact normal is convex, using the dot product
+ btScalar m_planarEpsilon; ///used to determine if a triangle edge is planar with zero angle
+ btScalar m_equalVertexThreshold; ///used to compute connectivity: if the distance between two vertices is smaller than m_equalVertexThreshold, they are considered to be 'shared'
+ btScalar m_edgeDistanceThreshold; ///used to determine edge contacts: if the closest distance between a contact point and an edge is smaller than this distance threshold it is considered to "hit the edge"
+ btScalar m_maxEdgeAngleThreshold; //ignore edges that connect triangles at an angle larger than this m_maxEdgeAngleThreshold
+ btScalar m_zeroAreaThreshold; ///used to determine if a triangle is degenerate (length squared of cross product of 2 triangle edges < threshold)
+
+
+ btTriangleInfoMap()
+ {
+ m_convexEpsilon = 0.00f;
+ m_planarEpsilon = 0.0001f;
+ m_equalVertexThreshold = btScalar(0.0001)*btScalar(0.0001);
+ m_edgeDistanceThreshold = btScalar(0.1);
+ m_zeroAreaThreshold = btScalar(0.0001)*btScalar(0.0001);
+ m_maxEdgeAngleThreshold = SIMD_2_PI;
+ }
+ virtual ~btTriangleInfoMap() {}
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+ void deSerialize(struct btTriangleInfoMapData& data);
+
+};
+
+struct btTriangleInfoData
+{
+ int m_flags;
+ float m_edgeV0V1Angle;
+ float m_edgeV1V2Angle;
+ float m_edgeV2V0Angle;
+};
+
+struct btTriangleInfoMapData
+{
+ int *m_hashTablePtr;
+ int *m_nextPtr;
+ btTriangleInfoData *m_valueArrayPtr;
+ int *m_keyArrayPtr;
+
+ float m_convexEpsilon;
+ float m_planarEpsilon;
+ float m_equalVertexThreshold;
+ float m_edgeDistanceThreshold;
+ float m_zeroAreaThreshold;
+
+ int m_nextSize;
+ int m_hashTableSize;
+ int m_numValues;
+ int m_numKeys;
+ char m_padding[4];
+};
+
+SIMD_FORCE_INLINE int btTriangleInfoMap::calculateSerializeBufferSize() const
+{
+ return sizeof(btTriangleInfoMapData);
+}
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btTriangleInfoMap::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btTriangleInfoMapData* tmapData = (btTriangleInfoMapData*) dataBuffer;
+ tmapData->m_convexEpsilon = m_convexEpsilon;
+ tmapData->m_planarEpsilon = m_planarEpsilon;
+ tmapData->m_equalVertexThreshold = m_equalVertexThreshold;
+ tmapData->m_edgeDistanceThreshold = m_edgeDistanceThreshold;
+ tmapData->m_zeroAreaThreshold = m_zeroAreaThreshold;
+
+ tmapData->m_hashTableSize = m_hashTable.size();
+
+ tmapData->m_hashTablePtr = tmapData->m_hashTableSize ? (int*)serializer->getUniquePointer((void*)&m_hashTable[0]) : 0;
+ if (tmapData->m_hashTablePtr)
+ {
+ //serialize an int buffer
+ int sz = sizeof(int);
+ int numElem = tmapData->m_hashTableSize;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ int* memPtr = (int*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ *memPtr = m_hashTable[i];
+ }
+ serializer->finalizeChunk(chunk,"int",BT_ARRAY_CODE,(void*)&m_hashTable[0]);
+
+ }
+
+ tmapData->m_nextSize = m_next.size();
+ tmapData->m_nextPtr = tmapData->m_nextSize? (int*)serializer->getUniquePointer((void*)&m_next[0]): 0;
+ if (tmapData->m_nextPtr)
+ {
+ int sz = sizeof(int);
+ int numElem = tmapData->m_nextSize;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ int* memPtr = (int*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ *memPtr = m_next[i];
+ }
+ serializer->finalizeChunk(chunk,"int",BT_ARRAY_CODE,(void*)&m_next[0]);
+ }
+
+ tmapData->m_numValues = m_valueArray.size();
+ tmapData->m_valueArrayPtr = tmapData->m_numValues ? (btTriangleInfoData*)serializer->getUniquePointer((void*)&m_valueArray[0]): 0;
+ if (tmapData->m_valueArrayPtr)
+ {
+ int sz = sizeof(btTriangleInfoData);
+ int numElem = tmapData->m_numValues;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btTriangleInfoData* memPtr = (btTriangleInfoData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ memPtr->m_edgeV0V1Angle = m_valueArray[i].m_edgeV0V1Angle;
+ memPtr->m_edgeV1V2Angle = m_valueArray[i].m_edgeV1V2Angle;
+ memPtr->m_edgeV2V0Angle = m_valueArray[i].m_edgeV2V0Angle;
+ memPtr->m_flags = m_valueArray[i].m_flags;
+ }
+ serializer->finalizeChunk(chunk,"btTriangleInfoData",BT_ARRAY_CODE,(void*) &m_valueArray[0]);
+ }
+
+ tmapData->m_numKeys = m_keyArray.size();
+ tmapData->m_keyArrayPtr = tmapData->m_numKeys ? (int*)serializer->getUniquePointer((void*)&m_keyArray[0]) : 0;
+ if (tmapData->m_keyArrayPtr)
+ {
+ int sz = sizeof(int);
+ int numElem = tmapData->m_numValues;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ int* memPtr = (int*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ *memPtr = m_keyArray[i].getUid1();
+ }
+ serializer->finalizeChunk(chunk,"int",BT_ARRAY_CODE,(void*) &m_keyArray[0]);
+
+ }
+ return "btTriangleInfoMapData";
+}
+
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE void btTriangleInfoMap::deSerialize(btTriangleInfoMapData& tmapData )
+{
+
+
+ m_convexEpsilon = tmapData.m_convexEpsilon;
+ m_planarEpsilon = tmapData.m_planarEpsilon;
+ m_equalVertexThreshold = tmapData.m_equalVertexThreshold;
+ m_edgeDistanceThreshold = tmapData.m_edgeDistanceThreshold;
+ m_zeroAreaThreshold = tmapData.m_zeroAreaThreshold;
+ m_hashTable.resize(tmapData.m_hashTableSize);
+ int i =0;
+ for (i=0;i<tmapData.m_hashTableSize;i++)
+ {
+ m_hashTable[i] = tmapData.m_hashTablePtr[i];
+ }
+ m_next.resize(tmapData.m_nextSize);
+ for (i=0;i<tmapData.m_nextSize;i++)
+ {
+ m_next[i] = tmapData.m_nextPtr[i];
+ }
+ m_valueArray.resize(tmapData.m_numValues);
+ for (i=0;i<tmapData.m_numValues;i++)
+ {
+ m_valueArray[i].m_edgeV0V1Angle = tmapData.m_valueArrayPtr[i].m_edgeV0V1Angle;
+ m_valueArray[i].m_edgeV1V2Angle = tmapData.m_valueArrayPtr[i].m_edgeV1V2Angle;
+ m_valueArray[i].m_edgeV2V0Angle = tmapData.m_valueArrayPtr[i].m_edgeV2V0Angle;
+ m_valueArray[i].m_flags = tmapData.m_valueArrayPtr[i].m_flags;
+ }
+
+ m_keyArray.resize(tmapData.m_numKeys,btHashInt(0));
+ for (i=0;i<tmapData.m_numKeys;i++)
+ {
+ m_keyArray[i].setUid1(tmapData.m_keyArrayPtr[i]);
+ }
+}
+
+
+#endif //_BT_TRIANGLE_INFO_MAP_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
new file mode 100644
index 00000000..b29e0f71
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
@@ -0,0 +1,140 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btTriangleMesh.h"
+
+
+
+btTriangleMesh::btTriangleMesh (bool use32bitIndices,bool use4componentVertices)
+:m_use32bitIndices(use32bitIndices),
+m_use4componentVertices(use4componentVertices),
+m_weldingThreshold(0.0)
+{
+ btIndexedMesh meshIndex;
+ meshIndex.m_numTriangles = 0;
+ meshIndex.m_numVertices = 0;
+ meshIndex.m_indexType = PHY_INTEGER;
+ meshIndex.m_triangleIndexBase = 0;
+ meshIndex.m_triangleIndexStride = 3*sizeof(int);
+ meshIndex.m_vertexBase = 0;
+ meshIndex.m_vertexStride = sizeof(btVector3);
+ m_indexedMeshes.push_back(meshIndex);
+
+ if (m_use32bitIndices)
+ {
+ m_indexedMeshes[0].m_numTriangles = m_32bitIndices.size()/3;
+ m_indexedMeshes[0].m_triangleIndexBase = 0;
+ m_indexedMeshes[0].m_indexType = PHY_INTEGER;
+ m_indexedMeshes[0].m_triangleIndexStride = 3*sizeof(int);
+ } else
+ {
+ m_indexedMeshes[0].m_numTriangles = m_16bitIndices.size()/3;
+ m_indexedMeshes[0].m_triangleIndexBase = 0;
+ m_indexedMeshes[0].m_indexType = PHY_SHORT;
+ m_indexedMeshes[0].m_triangleIndexStride = 3*sizeof(short int);
+ }
+
+ if (m_use4componentVertices)
+ {
+ m_indexedMeshes[0].m_numVertices = m_4componentVertices.size();
+ m_indexedMeshes[0].m_vertexBase = 0;
+ m_indexedMeshes[0].m_vertexStride = sizeof(btVector3);
+ } else
+ {
+ m_indexedMeshes[0].m_numVertices = m_3componentVertices.size()/3;
+ m_indexedMeshes[0].m_vertexBase = 0;
+ m_indexedMeshes[0].m_vertexStride = 3*sizeof(btScalar);
+ }
+
+
+}
+
+void btTriangleMesh::addIndex(int index)
+{
+ if (m_use32bitIndices)
+ {
+ m_32bitIndices.push_back(index);
+ m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_32bitIndices[0];
+ } else
+ {
+ m_16bitIndices.push_back(index);
+ m_indexedMeshes[0].m_triangleIndexBase = (unsigned char*) &m_16bitIndices[0];
+ }
+}
+
+
+int btTriangleMesh::findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices)
+{
+ //return index of new/existing vertex
+ ///@todo: could use acceleration structure for this
+ if (m_use4componentVertices)
+ {
+ if (removeDuplicateVertices)
+ {
+ for (int i=0;i< m_4componentVertices.size();i++)
+ {
+ if ((m_4componentVertices[i]-vertex).length2() <= m_weldingThreshold)
+ {
+ return i;
+ }
+ }
+ }
+ m_indexedMeshes[0].m_numVertices++;
+ m_4componentVertices.push_back(vertex);
+ m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_4componentVertices[0];
+
+ return m_4componentVertices.size()-1;
+
+ } else
+ {
+
+ if (removeDuplicateVertices)
+ {
+ for (int i=0;i< m_3componentVertices.size();i+=3)
+ {
+ btVector3 vtx(m_3componentVertices[i],m_3componentVertices[i+1],m_3componentVertices[i+2]);
+ if ((vtx-vertex).length2() <= m_weldingThreshold)
+ {
+ return i/3;
+ }
+ }
+ }
+ m_3componentVertices.push_back((float)vertex.getX());
+ m_3componentVertices.push_back((float)vertex.getY());
+ m_3componentVertices.push_back((float)vertex.getZ());
+ m_indexedMeshes[0].m_numVertices++;
+ m_indexedMeshes[0].m_vertexBase = (unsigned char*)&m_3componentVertices[0];
+ return (m_3componentVertices.size()/3)-1;
+ }
+
+}
+
+void btTriangleMesh::addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2,bool removeDuplicateVertices)
+{
+ m_indexedMeshes[0].m_numTriangles++;
+ addIndex(findOrAddVertex(vertex0,removeDuplicateVertices));
+ addIndex(findOrAddVertex(vertex1,removeDuplicateVertices));
+ addIndex(findOrAddVertex(vertex2,removeDuplicateVertices));
+}
+
+int btTriangleMesh::getNumTriangles() const
+{
+ if (m_use32bitIndices)
+ {
+ return m_32bitIndices.size() / 3;
+ }
+ return m_16bitIndices.size() / 3;
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.h
new file mode 100644
index 00000000..f623157f
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMesh.h
@@ -0,0 +1,69 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_TRIANGLE_MESH_H
+#define BT_TRIANGLE_MESH_H
+
+#include "btTriangleIndexVertexArray.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+///The btTriangleMesh class is a convenience class derived from btTriangleIndexVertexArray, that provides storage for a concave triangle mesh. It can be used as data for the btBvhTriangleMeshShape.
+///It allows either 32bit or 16bit indices, and 4 (x-y-z-w) or 3 (x-y-z) component vertices.
+///If you want to share triangle/index data between graphics mesh and collision mesh (btBvhTriangleMeshShape), you can directly use btTriangleIndexVertexArray or derive your own class from btStridingMeshInterface.
+///Performance of btTriangleMesh and btTriangleIndexVertexArray used in a btBvhTriangleMeshShape is the same.
+class btTriangleMesh : public btTriangleIndexVertexArray
+{
+ btAlignedObjectArray<btVector3> m_4componentVertices;
+ btAlignedObjectArray<float> m_3componentVertices;
+
+ btAlignedObjectArray<unsigned int> m_32bitIndices;
+ btAlignedObjectArray<unsigned short int> m_16bitIndices;
+ bool m_use32bitIndices;
+ bool m_use4componentVertices;
+
+
+ public:
+ btScalar m_weldingThreshold;
+
+ btTriangleMesh (bool use32bitIndices=true,bool use4componentVertices=true);
+
+ bool getUse32bitIndices() const
+ {
+ return m_use32bitIndices;
+ }
+
+ bool getUse4componentVertices() const
+ {
+ return m_use4componentVertices;
+ }
+ ///By default addTriangle won't search for duplicate vertices, because the search is very slow for large triangle meshes.
+ ///In general it is better to directly use btTriangleIndexVertexArray instead.
+ void addTriangle(const btVector3& vertex0,const btVector3& vertex1,const btVector3& vertex2, bool removeDuplicateVertices=false);
+
+ int getNumTriangles() const;
+
+ virtual void preallocateVertices(int numverts){(void) numverts;}
+ virtual void preallocateIndices(int numindices){(void) numindices;}
+
+ ///findOrAddVertex is an internal method, use addTriangle instead
+ int findOrAddVertex(const btVector3& vertex, bool removeDuplicateVertices);
+ ///addIndex is an internal method, use addTriangle instead
+ void addIndex(int index);
+
+};
+
+#endif //BT_TRIANGLE_MESH_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp
new file mode 100644
index 00000000..683684da
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.cpp
@@ -0,0 +1,211 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btTriangleMeshShape.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btQuaternion.h"
+#include "btStridingMeshInterface.h"
+#include "LinearMath/btAabbUtil2.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+
+
+btTriangleMeshShape::btTriangleMeshShape(btStridingMeshInterface* meshInterface)
+: btConcaveShape (), m_meshInterface(meshInterface)
+{
+ m_shapeType = TRIANGLE_MESH_SHAPE_PROXYTYPE;
+ if(meshInterface->hasPremadeAabb())
+ {
+ meshInterface->getPremadeAabb(&m_localAabbMin, &m_localAabbMax);
+ }
+ else
+ {
+ recalcLocalAabb();
+ }
+}
+
+
+btTriangleMeshShape::~btTriangleMeshShape()
+{
+
+}
+
+
+
+
+void btTriangleMeshShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
+{
+
+ btVector3 localHalfExtents = btScalar(0.5)*(m_localAabbMax-m_localAabbMin);
+ localHalfExtents += btVector3(getMargin(),getMargin(),getMargin());
+ btVector3 localCenter = btScalar(0.5)*(m_localAabbMax+m_localAabbMin);
+
+ btMatrix3x3 abs_b = trans.getBasis().absolute();
+
+ btVector3 center = trans(localCenter);
+
+ btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents),
+ abs_b[1].dot(localHalfExtents),
+ abs_b[2].dot(localHalfExtents));
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+
+
+}
+
+void btTriangleMeshShape::recalcLocalAabb()
+{
+ for (int i=0;i<3;i++)
+ {
+ btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
+ vec[i] = btScalar(1.);
+ btVector3 tmp = localGetSupportingVertex(vec);
+ m_localAabbMax[i] = tmp[i]+m_collisionMargin;
+ vec[i] = btScalar(-1.);
+ tmp = localGetSupportingVertex(vec);
+ m_localAabbMin[i] = tmp[i]-m_collisionMargin;
+ }
+}
+
+
+
+class SupportVertexCallback : public btTriangleCallback
+{
+
+ btVector3 m_supportVertexLocal;
+public:
+
+ btTransform m_worldTrans;
+ btScalar m_maxDot;
+ btVector3 m_supportVecLocal;
+
+ SupportVertexCallback(const btVector3& supportVecWorld,const btTransform& trans)
+ : m_supportVertexLocal(btScalar(0.),btScalar(0.),btScalar(0.)), m_worldTrans(trans) ,m_maxDot(btScalar(-BT_LARGE_FLOAT))
+
+ {
+ m_supportVecLocal = supportVecWorld * m_worldTrans.getBasis();
+ }
+
+ virtual void processTriangle( btVector3* triangle,int partId, int triangleIndex)
+ {
+ (void)partId;
+ (void)triangleIndex;
+ for (int i=0;i<3;i++)
+ {
+ btScalar dot = m_supportVecLocal.dot(triangle[i]);
+ if (dot > m_maxDot)
+ {
+ m_maxDot = dot;
+ m_supportVertexLocal = triangle[i];
+ }
+ }
+ }
+
+ btVector3 GetSupportVertexWorldSpace()
+ {
+ return m_worldTrans(m_supportVertexLocal);
+ }
+
+ btVector3 GetSupportVertexLocal()
+ {
+ return m_supportVertexLocal;
+ }
+
+};
+
+
+void btTriangleMeshShape::setLocalScaling(const btVector3& scaling)
+{
+ m_meshInterface->setScaling(scaling);
+ recalcLocalAabb();
+}
+
+const btVector3& btTriangleMeshShape::getLocalScaling() const
+{
+ return m_meshInterface->getScaling();
+}
+
+
+
+
+
+
+//#define DEBUG_TRIANGLE_MESH
+
+
+
+void btTriangleMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ struct FilteredCallback : public btInternalTriangleIndexCallback
+ {
+ btTriangleCallback* m_callback;
+ btVector3 m_aabbMin;
+ btVector3 m_aabbMax;
+
+ FilteredCallback(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax)
+ :m_callback(callback),
+ m_aabbMin(aabbMin),
+ m_aabbMax(aabbMax)
+ {
+ }
+
+ virtual void internalProcessTriangleIndex(btVector3* triangle,int partId,int triangleIndex)
+ {
+ if (TestTriangleAgainstAabb2(&triangle[0],m_aabbMin,m_aabbMax))
+ {
+ //check aabb in triangle-space, before doing this
+ m_callback->processTriangle(triangle,partId,triangleIndex);
+ }
+
+ }
+
+ };
+
+ FilteredCallback filterCallback(callback,aabbMin,aabbMax);
+
+ m_meshInterface->InternalProcessAllTriangles(&filterCallback,aabbMin,aabbMax);
+}
+
+
+
+
+
+void btTriangleMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ (void)mass;
+ //moving concave objects not supported
+ btAssert(0);
+ inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+}
+
+
+btVector3 btTriangleMeshShape::localGetSupportingVertex(const btVector3& vec) const
+{
+ btVector3 supportVertex;
+
+ btTransform ident;
+ ident.setIdentity();
+
+ SupportVertexCallback supportCallback(vec,ident);
+
+ btVector3 aabbMax(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+
+ processAllTriangles(&supportCallback,-aabbMax,aabbMax);
+
+ supportVertex = supportCallback.GetSupportVertexLocal();
+
+ return supportVertex;
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h
new file mode 100644
index 00000000..c8caf8fe
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h
@@ -0,0 +1,89 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_TRIANGLE_MESH_SHAPE_H
+#define BT_TRIANGLE_MESH_SHAPE_H
+
+#include "btConcaveShape.h"
+#include "btStridingMeshInterface.h"
+
+
+///The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead.
+class btTriangleMeshShape : public btConcaveShape
+{
+protected:
+ btVector3 m_localAabbMin;
+ btVector3 m_localAabbMax;
+ btStridingMeshInterface* m_meshInterface;
+
+ ///btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class.
+ ///Don't use btTriangleMeshShape but use btBvhTriangleMeshShape instead!
+ btTriangleMeshShape(btStridingMeshInterface* meshInterface);
+
+public:
+
+ virtual ~btTriangleMeshShape();
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec) const;
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+ {
+ btAssert(0);
+ return localGetSupportingVertex(vec);
+ }
+
+ void recalcLocalAabb();
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual void setLocalScaling(const btVector3& scaling);
+ virtual const btVector3& getLocalScaling() const;
+
+ btStridingMeshInterface* getMeshInterface()
+ {
+ return m_meshInterface;
+ }
+
+ const btStridingMeshInterface* getMeshInterface() const
+ {
+ return m_meshInterface;
+ }
+
+ const btVector3& getLocalAabbMin() const
+ {
+ return m_localAabbMin;
+ }
+ const btVector3& getLocalAabbMax() const
+ {
+ return m_localAabbMax;
+ }
+
+
+
+ //debugging
+ virtual const char* getName()const {return "TRIANGLEMESH";}
+
+
+
+};
+
+
+
+
+#endif //BT_TRIANGLE_MESH_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleShape.h
new file mode 100644
index 00000000..71b05573
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btTriangleShape.h
@@ -0,0 +1,182 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_OBB_TRIANGLE_MINKOWSKI_H
+#define BT_OBB_TRIANGLE_MINKOWSKI_H
+
+#include "btConvexShape.h"
+#include "btBoxShape.h"
+
+ATTRIBUTE_ALIGNED16(class) btTriangleShape : public btPolyhedralConvexShape
+{
+
+
+public:
+
+ btVector3 m_vertices1[3];
+
+ virtual int getNumVertices() const
+ {
+ return 3;
+ }
+
+ btVector3& getVertexPtr(int index)
+ {
+ return m_vertices1[index];
+ }
+
+ const btVector3& getVertexPtr(int index) const
+ {
+ return m_vertices1[index];
+ }
+ virtual void getVertex(int index,btVector3& vert) const
+ {
+ vert = m_vertices1[index];
+ }
+
+ virtual int getNumEdges() const
+ {
+ return 3;
+ }
+
+ virtual void getEdge(int i,btVector3& pa,btVector3& pb) const
+ {
+ getVertex(i,pa);
+ getVertex((i+1)%3,pb);
+ }
+
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax)const
+ {
+// btAssert(0);
+ getAabbSlow(t,aabbMin,aabbMax);
+ }
+
+ btVector3 localGetSupportingVertexWithoutMargin(const btVector3& dir)const
+ {
+ btVector3 dots(dir.dot(m_vertices1[0]), dir.dot(m_vertices1[1]), dir.dot(m_vertices1[2]));
+ return m_vertices1[dots.maxAxis()];
+
+ }
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+ {
+ for (int i=0;i<numVectors;i++)
+ {
+ const btVector3& dir = vectors[i];
+ btVector3 dots(dir.dot(m_vertices1[0]), dir.dot(m_vertices1[1]), dir.dot(m_vertices1[2]));
+ supportVerticesOut[i] = m_vertices1[dots.maxAxis()];
+ }
+
+ }
+
+ btTriangleShape() : btPolyhedralConvexShape ()
+ {
+ m_shapeType = TRIANGLE_SHAPE_PROXYTYPE;
+ }
+
+ btTriangleShape(const btVector3& p0,const btVector3& p1,const btVector3& p2) : btPolyhedralConvexShape ()
+ {
+ m_shapeType = TRIANGLE_SHAPE_PROXYTYPE;
+ m_vertices1[0] = p0;
+ m_vertices1[1] = p1;
+ m_vertices1[2] = p2;
+ }
+
+
+ virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i) const
+ {
+ getPlaneEquation(i,planeNormal,planeSupport);
+ }
+
+ virtual int getNumPlanes() const
+ {
+ return 1;
+ }
+
+ void calcNormal(btVector3& normal) const
+ {
+ normal = (m_vertices1[1]-m_vertices1[0]).cross(m_vertices1[2]-m_vertices1[0]);
+ normal.normalize();
+ }
+
+ virtual void getPlaneEquation(int i, btVector3& planeNormal,btVector3& planeSupport) const
+ {
+ (void)i;
+ calcNormal(planeNormal);
+ planeSupport = m_vertices1[0];
+ }
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const
+ {
+ (void)mass;
+ btAssert(0);
+ inertia.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ }
+
+ virtual bool isInside(const btVector3& pt,btScalar tolerance) const
+ {
+ btVector3 normal;
+ calcNormal(normal);
+ //distance to plane
+ btScalar dist = pt.dot(normal);
+ btScalar planeconst = m_vertices1[0].dot(normal);
+ dist -= planeconst;
+ if (dist >= -tolerance && dist <= tolerance)
+ {
+ //inside check on edge-planes
+ int i;
+ for (i=0;i<3;i++)
+ {
+ btVector3 pa,pb;
+ getEdge(i,pa,pb);
+ btVector3 edge = pb-pa;
+ btVector3 edgeNormal = edge.cross(normal);
+ edgeNormal.normalize();
+ btScalar dist = pt.dot( edgeNormal);
+ btScalar edgeConst = pa.dot(edgeNormal);
+ dist -= edgeConst;
+ if (dist < -tolerance)
+ return false;
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+ //debugging
+ virtual const char* getName()const
+ {
+ return "Triangle";
+ }
+
+ virtual int getNumPreferredPenetrationDirections() const
+ {
+ return 2;
+ }
+
+ virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
+ {
+ calcNormal(penetrationVector);
+ if (index)
+ penetrationVector *= btScalar(-1.);
+ }
+
+
+};
+
+#endif //BT_OBB_TRIANGLE_MINKOWSKI_H
+
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp b/tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp
new file mode 100644
index 00000000..b148bbd9
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.cpp
@@ -0,0 +1,160 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btUniformScalingShape.h"
+
+btUniformScalingShape::btUniformScalingShape( btConvexShape* convexChildShape,btScalar uniformScalingFactor):
+btConvexShape (), m_childConvexShape(convexChildShape),
+m_uniformScalingFactor(uniformScalingFactor)
+{
+ m_shapeType = UNIFORM_SCALING_SHAPE_PROXYTYPE;
+}
+
+btUniformScalingShape::~btUniformScalingShape()
+{
+}
+
+
+btVector3 btUniformScalingShape::localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+{
+ btVector3 tmpVertex;
+ tmpVertex = m_childConvexShape->localGetSupportingVertexWithoutMargin(vec);
+ return tmpVertex*m_uniformScalingFactor;
+}
+
+void btUniformScalingShape::batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+{
+ m_childConvexShape->batchedUnitVectorGetSupportingVertexWithoutMargin(vectors,supportVerticesOut,numVectors);
+ int i;
+ for (i=0;i<numVectors;i++)
+ {
+ supportVerticesOut[i] = supportVerticesOut[i] * m_uniformScalingFactor;
+ }
+}
+
+
+btVector3 btUniformScalingShape::localGetSupportingVertex(const btVector3& vec)const
+{
+ btVector3 tmpVertex;
+ tmpVertex = m_childConvexShape->localGetSupportingVertex(vec);
+ return tmpVertex*m_uniformScalingFactor;
+}
+
+
+void btUniformScalingShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+
+ ///this linear upscaling is not realistic, but we don't deal with large mass ratios...
+ btVector3 tmpInertia;
+ m_childConvexShape->calculateLocalInertia(mass,tmpInertia);
+ inertia = tmpInertia * m_uniformScalingFactor;
+}
+
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+void btUniformScalingShape::getAabb(const btTransform& trans,btVector3& aabbMin,btVector3& aabbMax) const
+{
+ getAabbSlow(trans,aabbMin,aabbMax);
+
+}
+
+void btUniformScalingShape::getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+{
+#if 1
+ btVector3 _directions[] =
+ {
+ btVector3( 1., 0., 0.),
+ btVector3( 0., 1., 0.),
+ btVector3( 0., 0., 1.),
+ btVector3( -1., 0., 0.),
+ btVector3( 0., -1., 0.),
+ btVector3( 0., 0., -1.)
+ };
+
+ btVector3 _supporting[] =
+ {
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.),
+ btVector3( 0., 0., 0.)
+ };
+
+ for (int i=0;i<6;i++)
+ {
+ _directions[i] = _directions[i]*t.getBasis();
+ }
+
+ batchedUnitVectorGetSupportingVertexWithoutMargin(_directions, _supporting, 6);
+
+ btVector3 aabbMin1(0,0,0),aabbMax1(0,0,0);
+
+ for ( int i = 0; i < 3; ++i )
+ {
+ aabbMax1[i] = t(_supporting[i])[i];
+ aabbMin1[i] = t(_supporting[i + 3])[i];
+ }
+ btVector3 marginVec(getMargin(),getMargin(),getMargin());
+ aabbMin = aabbMin1-marginVec;
+ aabbMax = aabbMax1+marginVec;
+
+#else
+
+ btScalar margin = getMargin();
+ for (int i=0;i<3;i++)
+ {
+ btVector3 vec(btScalar(0.),btScalar(0.),btScalar(0.));
+ vec[i] = btScalar(1.);
+ btVector3 sv = localGetSupportingVertex(vec*t.getBasis());
+ btVector3 tmp = t(sv);
+ aabbMax[i] = tmp[i]+margin;
+ vec[i] = btScalar(-1.);
+ sv = localGetSupportingVertex(vec*t.getBasis());
+ tmp = t(sv);
+ aabbMin[i] = tmp[i]-margin;
+ }
+
+#endif
+}
+
+void btUniformScalingShape::setLocalScaling(const btVector3& scaling)
+{
+ m_childConvexShape->setLocalScaling(scaling);
+}
+
+const btVector3& btUniformScalingShape::getLocalScaling() const
+{
+ return m_childConvexShape->getLocalScaling();
+}
+
+void btUniformScalingShape::setMargin(btScalar margin)
+{
+ m_childConvexShape->setMargin(margin);
+}
+btScalar btUniformScalingShape::getMargin() const
+{
+ return m_childConvexShape->getMargin() * m_uniformScalingFactor;
+}
+
+int btUniformScalingShape::getNumPreferredPenetrationDirections() const
+{
+ return m_childConvexShape->getNumPreferredPenetrationDirections();
+}
+
+void btUniformScalingShape::getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
+{
+ m_childConvexShape->getPreferredPenetrationDirection(index,penetrationVector);
+}
diff --git a/tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.h b/tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.h
new file mode 100644
index 00000000..cbf7e6fd
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/CollisionShapes/btUniformScalingShape.h
@@ -0,0 +1,87 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_UNIFORM_SCALING_SHAPE_H
+#define BT_UNIFORM_SCALING_SHAPE_H
+
+#include "btConvexShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
+
+///The btUniformScalingShape allows to re-use uniform scaled instances of btConvexShape in a memory efficient way.
+///Istead of using btUniformScalingShape, it is better to use the non-uniform setLocalScaling method on convex shapes that implement it.
+class btUniformScalingShape : public btConvexShape
+{
+ btConvexShape* m_childConvexShape;
+
+ btScalar m_uniformScalingFactor;
+
+ public:
+
+ btUniformScalingShape( btConvexShape* convexChildShape, btScalar uniformScalingFactor);
+
+ virtual ~btUniformScalingShape();
+
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
+
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ btScalar getUniformScalingFactor() const
+ {
+ return m_uniformScalingFactor;
+ }
+
+ btConvexShape* getChildShape()
+ {
+ return m_childConvexShape;
+ }
+
+ const btConvexShape* getChildShape() const
+ {
+ return m_childConvexShape;
+ }
+
+ virtual const char* getName()const
+ {
+ return "UniformScalingShape";
+ }
+
+
+
+ ///////////////////////////
+
+
+ ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
+ void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
+
+ virtual void setLocalScaling(const btVector3& scaling) ;
+ virtual const btVector3& getLocalScaling() const ;
+
+ virtual void setMargin(btScalar margin);
+ virtual btScalar getMargin() const;
+
+ virtual int getNumPreferredPenetrationDirections() const;
+
+ virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const;
+
+
+};
+
+#endif //BT_UNIFORM_SCALING_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/Doxyfile b/tests/bullet/src/BulletCollision/Doxyfile
new file mode 100644
index 00000000..4ecb6acb
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Doxyfile
@@ -0,0 +1,746 @@
+# Doxyfile 1.2.4
+
+# This file describes the settings to be used by doxygen for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# General configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+PROJECT_NAME = "Bullet Continuous Collision Detection Library"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Dutch, French, Italian, Czech, Swedish, German, Finnish, Japanese,
+# Korean, Hungarian, Norwegian, Spanish, Romanian, Russian, Croatian,
+# Polish, Portuguese and Slovene.
+
+OUTPUT_LANGUAGE = English
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these class will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. It is allowed to use relative paths in the argument list.
+
+STRIP_FROM_PATH =
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a class diagram (in Html and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off.
+
+CLASS_DIAGRAMS = YES
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+
+SOURCE_BROWSER = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower case letters. If set to YES upper case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are adviced to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explict @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# reimplements.
+
+INHERIT_DOCS = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# The ENABLE_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = .
+
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+FILE_PATTERNS = *.h *.cpp *.c
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse.
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side pannel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript and frames is required (for instance Netscape 4.0+
+# or Internet explorer 4.0+).
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimised for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using a WORD or other.
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assigments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation. Warning: This feature
+# is still experimental and very incomplete.
+
+GENERATE_XML = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH = ../../generic/extern
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_PREDEF_ONLY tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tagfiles.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, INCLUDE_GRAPH, and HAVE_DOT tags are set to
+# YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other
+# documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, INCLUDED_BY_GRAPH, and HAVE_DOT tags are set to
+# YES then doxygen will generate a graph for each documented header file showing
+# the documented files that directly or indirectly include this file
+
+INCLUDED_BY_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+#---------------------------------------------------------------------------
+# Configuration::addtions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
+
+# The CGI_NAME tag should be the name of the CGI script that
+# starts the search engine (doxysearch) with the correct parameters.
+# A script with this name will be generated by doxygen.
+
+CGI_NAME = search.cgi
+
+# The CGI_URL tag should be the absolute URL to the directory where the
+# cgi binaries are located. See the documentation of your http daemon for
+# details.
+
+CGI_URL =
+
+# The DOC_URL tag should be the absolute URL to the directory where the
+# documentation is located. If left blank the absolute path to the
+# documentation, with file:// prepended to it, will be used.
+
+DOC_URL =
+
+# The DOC_ABSPATH tag should be the absolute path to the directory where the
+# documentation is located. If left blank the directory on the local machine
+# will be used.
+
+DOC_ABSPATH =
+
+# The BIN_ABSPATH tag must point to the directory where the doxysearch binary
+# is installed.
+
+BIN_ABSPATH = c:\program files\doxygen\bin
+
+# The EXT_DOC_PATHS tag can be used to specify one or more paths to
+# documentation generated for other projects. This allows doxysearch to search
+# the documentation for these projects as well.
+
+EXT_DOC_PATHS =
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btBoxCollision.h b/tests/bullet/src/BulletCollision/Gimpact/btBoxCollision.h
new file mode 100644
index 00000000..d5676aaa
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btBoxCollision.h
@@ -0,0 +1,647 @@
+#ifndef BT_BOX_COLLISION_H_INCLUDED
+#define BT_BOX_COLLISION_H_INCLUDED
+
+/*! \file gim_box_collision.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "LinearMath/btTransform.h"
+
+
+///Swap numbers
+#define BT_SWAP_NUMBERS(a,b){ \
+ a = a+b; \
+ b = a-b; \
+ a = a-b; \
+}\
+
+
+#define BT_MAX(a,b) (a<b?b:a)
+#define BT_MIN(a,b) (a>b?b:a)
+
+#define BT_GREATER(x, y) btFabs(x) > (y)
+
+#define BT_MAX3(a,b,c) BT_MAX(a,BT_MAX(b,c))
+#define BT_MIN3(a,b,c) BT_MIN(a,BT_MIN(b,c))
+
+
+
+
+
+
+enum eBT_PLANE_INTERSECTION_TYPE
+{
+ BT_CONST_BACK_PLANE = 0,
+ BT_CONST_COLLIDE_PLANE,
+ BT_CONST_FRONT_PLANE
+};
+
+//SIMD_FORCE_INLINE bool test_cross_edge_box(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, const btVector3 & extend,
+// int dir_index0,
+// int dir_index1
+// int component_index0,
+// int component_index1)
+//{
+// // dir coords are -z and y
+//
+// const btScalar dir0 = -edge[dir_index0];
+// const btScalar dir1 = edge[dir_index1];
+// btScalar pmin = pointa[component_index0]*dir0 + pointa[component_index1]*dir1;
+// btScalar pmax = pointb[component_index0]*dir0 + pointb[component_index1]*dir1;
+// //find minmax
+// if(pmin>pmax)
+// {
+// BT_SWAP_NUMBERS(pmin,pmax);
+// }
+// //find extends
+// const btScalar rad = extend[component_index0] * absolute_edge[dir_index0] +
+// extend[component_index1] * absolute_edge[dir_index1];
+//
+// if(pmin>rad || -rad>pmax) return false;
+// return true;
+//}
+//
+//SIMD_FORCE_INLINE bool test_cross_edge_box_X_axis(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, btVector3 & extend)
+//{
+//
+// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,2,1,1,2);
+//}
+//
+//
+//SIMD_FORCE_INLINE bool test_cross_edge_box_Y_axis(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, btVector3 & extend)
+//{
+//
+// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,0,2,2,0);
+//}
+//
+//SIMD_FORCE_INLINE bool test_cross_edge_box_Z_axis(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, btVector3 & extend)
+//{
+//
+// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,1,0,0,1);
+//}
+
+
+#define TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,i_dir_0,i_dir_1,i_comp_0,i_comp_1)\
+{\
+ const btScalar dir0 = -edge[i_dir_0];\
+ const btScalar dir1 = edge[i_dir_1];\
+ btScalar pmin = pointa[i_comp_0]*dir0 + pointa[i_comp_1]*dir1;\
+ btScalar pmax = pointb[i_comp_0]*dir0 + pointb[i_comp_1]*dir1;\
+ if(pmin>pmax)\
+ {\
+ BT_SWAP_NUMBERS(pmin,pmax); \
+ }\
+ const btScalar abs_dir0 = absolute_edge[i_dir_0];\
+ const btScalar abs_dir1 = absolute_edge[i_dir_1];\
+ const btScalar rad = _extend[i_comp_0] * abs_dir0 + _extend[i_comp_1] * abs_dir1;\
+ if(pmin>rad || -rad>pmax) return false;\
+}\
+
+
+#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\
+{\
+ TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,2,1,1,2);\
+}\
+
+#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\
+{\
+ TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,0,2,2,0);\
+}\
+
+#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\
+{\
+ TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,1,0,0,1);\
+}\
+
+
+//! Returns the dot product between a vec3f and the col of a matrix
+SIMD_FORCE_INLINE btScalar bt_mat3_dot_col(
+const btMatrix3x3 & mat, const btVector3 & vec3, int colindex)
+{
+ return vec3[0]*mat[0][colindex] + vec3[1]*mat[1][colindex] + vec3[2]*mat[2][colindex];
+}
+
+
+//! Class for transforming a model1 to the space of model0
+ATTRIBUTE_ALIGNED16 (class) BT_BOX_BOX_TRANSFORM_CACHE
+{
+public:
+ btVector3 m_T1to0;//!< Transforms translation of model1 to model 0
+ btMatrix3x3 m_R1to0;//!< Transforms Rotation of model1 to model 0, equal to R0' * R1
+ btMatrix3x3 m_AR;//!< Absolute value of m_R1to0
+
+ SIMD_FORCE_INLINE void calc_absolute_matrix()
+ {
+// static const btVector3 vepsi(1e-6f,1e-6f,1e-6f);
+// m_AR[0] = vepsi + m_R1to0[0].absolute();
+// m_AR[1] = vepsi + m_R1to0[1].absolute();
+// m_AR[2] = vepsi + m_R1to0[2].absolute();
+
+ int i,j;
+
+ for(i=0;i<3;i++)
+ {
+ for(j=0;j<3;j++ )
+ {
+ m_AR[i][j] = 1e-6f + btFabs(m_R1to0[i][j]);
+ }
+ }
+
+ }
+
+ BT_BOX_BOX_TRANSFORM_CACHE()
+ {
+ }
+
+
+
+ //! Calc the transformation relative 1 to 0. Inverts matrics by transposing
+ SIMD_FORCE_INLINE void calc_from_homogenic(const btTransform & trans0,const btTransform & trans1)
+ {
+
+ btTransform temp_trans = trans0.inverse();
+ temp_trans = temp_trans * trans1;
+
+ m_T1to0 = temp_trans.getOrigin();
+ m_R1to0 = temp_trans.getBasis();
+
+
+ calc_absolute_matrix();
+ }
+
+ //! Calcs the full invertion of the matrices. Useful for scaling matrices
+ SIMD_FORCE_INLINE void calc_from_full_invert(const btTransform & trans0,const btTransform & trans1)
+ {
+ m_R1to0 = trans0.getBasis().inverse();
+ m_T1to0 = m_R1to0 * (-trans0.getOrigin());
+
+ m_T1to0 += m_R1to0*trans1.getOrigin();
+ m_R1to0 *= trans1.getBasis();
+
+ calc_absolute_matrix();
+ }
+
+ SIMD_FORCE_INLINE btVector3 transform(const btVector3 & point) const
+ {
+ return btVector3(m_R1to0[0].dot(point) + m_T1to0.x(),
+ m_R1to0[1].dot(point) + m_T1to0.y(),
+ m_R1to0[2].dot(point) + m_T1to0.z());
+ }
+};
+
+
+#define BOX_PLANE_EPSILON 0.000001f
+
+//! Axis aligned box
+ATTRIBUTE_ALIGNED16 (class) btAABB
+{
+public:
+ btVector3 m_min;
+ btVector3 m_max;
+
+ btAABB()
+ {}
+
+
+ btAABB(const btVector3 & V1,
+ const btVector3 & V2,
+ const btVector3 & V3)
+ {
+ m_min[0] = BT_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = BT_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = BT_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = BT_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = BT_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = BT_MAX3(V1[2],V2[2],V3[2]);
+ }
+
+ btAABB(const btVector3 & V1,
+ const btVector3 & V2,
+ const btVector3 & V3,
+ btScalar margin)
+ {
+ m_min[0] = BT_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = BT_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = BT_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = BT_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = BT_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = BT_MAX3(V1[2],V2[2],V3[2]);
+
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ btAABB(const btAABB &other):
+ m_min(other.m_min),m_max(other.m_max)
+ {
+ }
+
+ btAABB(const btAABB &other,btScalar margin ):
+ m_min(other.m_min),m_max(other.m_max)
+ {
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ SIMD_FORCE_INLINE void invalidate()
+ {
+ m_min[0] = SIMD_INFINITY;
+ m_min[1] = SIMD_INFINITY;
+ m_min[2] = SIMD_INFINITY;
+ m_max[0] = -SIMD_INFINITY;
+ m_max[1] = -SIMD_INFINITY;
+ m_max[2] = -SIMD_INFINITY;
+ }
+
+ SIMD_FORCE_INLINE void increment_margin(btScalar margin)
+ {
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ SIMD_FORCE_INLINE void copy_with_margin(const btAABB &other, btScalar margin)
+ {
+ m_min[0] = other.m_min[0] - margin;
+ m_min[1] = other.m_min[1] - margin;
+ m_min[2] = other.m_min[2] - margin;
+
+ m_max[0] = other.m_max[0] + margin;
+ m_max[1] = other.m_max[1] + margin;
+ m_max[2] = other.m_max[2] + margin;
+ }
+
+ template<typename CLASS_POINT>
+ SIMD_FORCE_INLINE void calc_from_triangle(
+ const CLASS_POINT & V1,
+ const CLASS_POINT & V2,
+ const CLASS_POINT & V3)
+ {
+ m_min[0] = BT_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = BT_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = BT_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = BT_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = BT_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = BT_MAX3(V1[2],V2[2],V3[2]);
+ }
+
+ template<typename CLASS_POINT>
+ SIMD_FORCE_INLINE void calc_from_triangle_margin(
+ const CLASS_POINT & V1,
+ const CLASS_POINT & V2,
+ const CLASS_POINT & V3, btScalar margin)
+ {
+ m_min[0] = BT_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = BT_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = BT_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = BT_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = BT_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = BT_MAX3(V1[2],V2[2],V3[2]);
+
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ //! Apply a transform to an AABB
+ SIMD_FORCE_INLINE void appy_transform(const btTransform & trans)
+ {
+ btVector3 center = (m_max+m_min)*0.5f;
+ btVector3 extends = m_max - center;
+ // Compute new center
+ center = trans(center);
+
+ btVector3 textends(extends.dot(trans.getBasis().getRow(0).absolute()),
+ extends.dot(trans.getBasis().getRow(1).absolute()),
+ extends.dot(trans.getBasis().getRow(2).absolute()));
+
+ m_min = center - textends;
+ m_max = center + textends;
+ }
+
+
+ //! Apply a transform to an AABB
+ SIMD_FORCE_INLINE void appy_transform_trans_cache(const BT_BOX_BOX_TRANSFORM_CACHE & trans)
+ {
+ btVector3 center = (m_max+m_min)*0.5f;
+ btVector3 extends = m_max - center;
+ // Compute new center
+ center = trans.transform(center);
+
+ btVector3 textends(extends.dot(trans.m_R1to0.getRow(0).absolute()),
+ extends.dot(trans.m_R1to0.getRow(1).absolute()),
+ extends.dot(trans.m_R1to0.getRow(2).absolute()));
+
+ m_min = center - textends;
+ m_max = center + textends;
+ }
+
+ //! Merges a Box
+ SIMD_FORCE_INLINE void merge(const btAABB & box)
+ {
+ m_min[0] = BT_MIN(m_min[0],box.m_min[0]);
+ m_min[1] = BT_MIN(m_min[1],box.m_min[1]);
+ m_min[2] = BT_MIN(m_min[2],box.m_min[2]);
+
+ m_max[0] = BT_MAX(m_max[0],box.m_max[0]);
+ m_max[1] = BT_MAX(m_max[1],box.m_max[1]);
+ m_max[2] = BT_MAX(m_max[2],box.m_max[2]);
+ }
+
+ //! Merges a point
+ template<typename CLASS_POINT>
+ SIMD_FORCE_INLINE void merge_point(const CLASS_POINT & point)
+ {
+ m_min[0] = BT_MIN(m_min[0],point[0]);
+ m_min[1] = BT_MIN(m_min[1],point[1]);
+ m_min[2] = BT_MIN(m_min[2],point[2]);
+
+ m_max[0] = BT_MAX(m_max[0],point[0]);
+ m_max[1] = BT_MAX(m_max[1],point[1]);
+ m_max[2] = BT_MAX(m_max[2],point[2]);
+ }
+
+ //! Gets the extend and center
+ SIMD_FORCE_INLINE void get_center_extend(btVector3 & center,btVector3 & extend) const
+ {
+ center = (m_max+m_min)*0.5f;
+ extend = m_max - center;
+ }
+
+ //! Finds the intersecting box between this box and the other.
+ SIMD_FORCE_INLINE void find_intersection(const btAABB & other, btAABB & intersection) const
+ {
+ intersection.m_min[0] = BT_MAX(other.m_min[0],m_min[0]);
+ intersection.m_min[1] = BT_MAX(other.m_min[1],m_min[1]);
+ intersection.m_min[2] = BT_MAX(other.m_min[2],m_min[2]);
+
+ intersection.m_max[0] = BT_MIN(other.m_max[0],m_max[0]);
+ intersection.m_max[1] = BT_MIN(other.m_max[1],m_max[1]);
+ intersection.m_max[2] = BT_MIN(other.m_max[2],m_max[2]);
+ }
+
+
+ SIMD_FORCE_INLINE bool has_collision(const btAABB & other) const
+ {
+ if(m_min[0] > other.m_max[0] ||
+ m_max[0] < other.m_min[0] ||
+ m_min[1] > other.m_max[1] ||
+ m_max[1] < other.m_min[1] ||
+ m_min[2] > other.m_max[2] ||
+ m_max[2] < other.m_min[2])
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /*! \brief Finds the Ray intersection parameter.
+ \param aabb Aligned box
+ \param vorigin A vec3f with the origin of the ray
+ \param vdir A vec3f with the direction of the ray
+ */
+ SIMD_FORCE_INLINE bool collide_ray(const btVector3 & vorigin,const btVector3 & vdir) const
+ {
+ btVector3 extents,center;
+ this->get_center_extend(center,extents);;
+
+ btScalar Dx = vorigin[0] - center[0];
+ if(BT_GREATER(Dx, extents[0]) && Dx*vdir[0]>=0.0f) return false;
+ btScalar Dy = vorigin[1] - center[1];
+ if(BT_GREATER(Dy, extents[1]) && Dy*vdir[1]>=0.0f) return false;
+ btScalar Dz = vorigin[2] - center[2];
+ if(BT_GREATER(Dz, extents[2]) && Dz*vdir[2]>=0.0f) return false;
+
+
+ btScalar f = vdir[1] * Dz - vdir[2] * Dy;
+ if(btFabs(f) > extents[1]*btFabs(vdir[2]) + extents[2]*btFabs(vdir[1])) return false;
+ f = vdir[2] * Dx - vdir[0] * Dz;
+ if(btFabs(f) > extents[0]*btFabs(vdir[2]) + extents[2]*btFabs(vdir[0]))return false;
+ f = vdir[0] * Dy - vdir[1] * Dx;
+ if(btFabs(f) > extents[0]*btFabs(vdir[1]) + extents[1]*btFabs(vdir[0]))return false;
+ return true;
+ }
+
+
+ SIMD_FORCE_INLINE void projection_interval(const btVector3 & direction, btScalar &vmin, btScalar &vmax) const
+ {
+ btVector3 center = (m_max+m_min)*0.5f;
+ btVector3 extend = m_max-center;
+
+ btScalar _fOrigin = direction.dot(center);
+ btScalar _fMaximumExtent = extend.dot(direction.absolute());
+ vmin = _fOrigin - _fMaximumExtent;
+ vmax = _fOrigin + _fMaximumExtent;
+ }
+
+ SIMD_FORCE_INLINE eBT_PLANE_INTERSECTION_TYPE plane_classify(const btVector4 &plane) const
+ {
+ btScalar _fmin,_fmax;
+ this->projection_interval(plane,_fmin,_fmax);
+
+ if(plane[3] > _fmax + BOX_PLANE_EPSILON)
+ {
+ return BT_CONST_BACK_PLANE; // 0
+ }
+
+ if(plane[3]+BOX_PLANE_EPSILON >=_fmin)
+ {
+ return BT_CONST_COLLIDE_PLANE; //1
+ }
+ return BT_CONST_FRONT_PLANE;//2
+ }
+
+ SIMD_FORCE_INLINE bool overlapping_trans_conservative(const btAABB & box, btTransform & trans1_to_0) const
+ {
+ btAABB tbox = box;
+ tbox.appy_transform(trans1_to_0);
+ return has_collision(tbox);
+ }
+
+ SIMD_FORCE_INLINE bool overlapping_trans_conservative2(const btAABB & box,
+ const BT_BOX_BOX_TRANSFORM_CACHE & trans1_to_0) const
+ {
+ btAABB tbox = box;
+ tbox.appy_transform_trans_cache(trans1_to_0);
+ return has_collision(tbox);
+ }
+
+ //! transcache is the transformation cache from box to this AABB
+ SIMD_FORCE_INLINE bool overlapping_trans_cache(
+ const btAABB & box,const BT_BOX_BOX_TRANSFORM_CACHE & transcache, bool fulltest) const
+ {
+
+ //Taken from OPCODE
+ btVector3 ea,eb;//extends
+ btVector3 ca,cb;//extends
+ get_center_extend(ca,ea);
+ box.get_center_extend(cb,eb);
+
+
+ btVector3 T;
+ btScalar t,t2;
+ int i;
+
+ // Class I : A's basis vectors
+ for(i=0;i<3;i++)
+ {
+ T[i] = transcache.m_R1to0[i].dot(cb) + transcache.m_T1to0[i] - ca[i];
+ t = transcache.m_AR[i].dot(eb) + ea[i];
+ if(BT_GREATER(T[i], t)) return false;
+ }
+ // Class II : B's basis vectors
+ for(i=0;i<3;i++)
+ {
+ t = bt_mat3_dot_col(transcache.m_R1to0,T,i);
+ t2 = bt_mat3_dot_col(transcache.m_AR,ea,i) + eb[i];
+ if(BT_GREATER(t,t2)) return false;
+ }
+ // Class III : 9 cross products
+ if(fulltest)
+ {
+ int j,m,n,o,p,q,r;
+ for(i=0;i<3;i++)
+ {
+ m = (i+1)%3;
+ n = (i+2)%3;
+ o = i==0?1:0;
+ p = i==2?1:2;
+ for(j=0;j<3;j++)
+ {
+ q = j==2?1:2;
+ r = j==0?1:0;
+ t = T[n]*transcache.m_R1to0[m][j] - T[m]*transcache.m_R1to0[n][j];
+ t2 = ea[o]*transcache.m_AR[p][j] + ea[p]*transcache.m_AR[o][j] +
+ eb[r]*transcache.m_AR[i][q] + eb[q]*transcache.m_AR[i][r];
+ if(BT_GREATER(t,t2)) return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ //! Simple test for planes.
+ SIMD_FORCE_INLINE bool collide_plane(
+ const btVector4 & plane) const
+ {
+ eBT_PLANE_INTERSECTION_TYPE classify = plane_classify(plane);
+ return (classify == BT_CONST_COLLIDE_PLANE);
+ }
+
+ //! test for a triangle, with edges
+ SIMD_FORCE_INLINE bool collide_triangle_exact(
+ const btVector3 & p1,
+ const btVector3 & p2,
+ const btVector3 & p3,
+ const btVector4 & triangle_plane) const
+ {
+ if(!collide_plane(triangle_plane)) return false;
+
+ btVector3 center,extends;
+ this->get_center_extend(center,extends);
+
+ const btVector3 v1(p1 - center);
+ const btVector3 v2(p2 - center);
+ const btVector3 v3(p3 - center);
+
+ //First axis
+ btVector3 diff(v2 - v1);
+ btVector3 abs_diff = diff.absolute();
+ //Test With X axis
+ TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v1,v3,extends);
+ //Test With Y axis
+ TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v1,v3,extends);
+ //Test With Z axis
+ TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v1,v3,extends);
+
+
+ diff = v3 - v2;
+ abs_diff = diff.absolute();
+ //Test With X axis
+ TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v2,v1,extends);
+ //Test With Y axis
+ TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v2,v1,extends);
+ //Test With Z axis
+ TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v2,v1,extends);
+
+ diff = v1 - v3;
+ abs_diff = diff.absolute();
+ //Test With X axis
+ TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v3,v2,extends);
+ //Test With Y axis
+ TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v3,v2,extends);
+ //Test With Z axis
+ TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v3,v2,extends);
+
+ return true;
+ }
+};
+
+
+//! Compairison of transformation objects
+SIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform & t1,const btTransform & t2)
+{
+ if(!(t1.getOrigin() == t2.getOrigin()) ) return false;
+
+ if(!(t1.getBasis().getRow(0) == t2.getBasis().getRow(0)) ) return false;
+ if(!(t1.getBasis().getRow(1) == t2.getBasis().getRow(1)) ) return false;
+ if(!(t1.getBasis().getRow(2) == t2.getBasis().getRow(2)) ) return false;
+ return true;
+}
+
+
+
+#endif // GIM_BOX_COLLISION_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btClipPolygon.h b/tests/bullet/src/BulletCollision/Gimpact/btClipPolygon.h
new file mode 100644
index 00000000..de0a5231
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btClipPolygon.h
@@ -0,0 +1,182 @@
+#ifndef BT_CLIP_POLYGON_H_INCLUDED
+#define BT_CLIP_POLYGON_H_INCLUDED
+
+/*! \file btClipPolygon.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btGeometryUtil.h"
+
+
+SIMD_FORCE_INLINE btScalar bt_distance_point_plane(const btVector4 & plane,const btVector3 &point)
+{
+ return point.dot(plane) - plane[3];
+}
+
+/*! Vector blending
+Takes two vectors a, b, blends them together*/
+SIMD_FORCE_INLINE void bt_vec_blend(btVector3 &vr, const btVector3 &va,const btVector3 &vb, btScalar blend_factor)
+{
+ vr = (1-blend_factor)*va + blend_factor*vb;
+}
+
+//! This function calcs the distance from a 3D plane
+SIMD_FORCE_INLINE void bt_plane_clip_polygon_collect(
+ const btVector3 & point0,
+ const btVector3 & point1,
+ btScalar dist0,
+ btScalar dist1,
+ btVector3 * clipped,
+ int & clipped_count)
+{
+ bool _prevclassif = (dist0>SIMD_EPSILON);
+ bool _classif = (dist1>SIMD_EPSILON);
+ if(_classif!=_prevclassif)
+ {
+ btScalar blendfactor = -dist0/(dist1-dist0);
+ bt_vec_blend(clipped[clipped_count],point0,point1,blendfactor);
+ clipped_count++;
+ }
+ if(!_classif)
+ {
+ clipped[clipped_count] = point1;
+ clipped_count++;
+ }
+}
+
+
+//! Clips a polygon by a plane
+/*!
+*\return The count of the clipped counts
+*/
+SIMD_FORCE_INLINE int bt_plane_clip_polygon(
+ const btVector4 & plane,
+ const btVector3 * polygon_points,
+ int polygon_point_count,
+ btVector3 * clipped)
+{
+ int clipped_count = 0;
+
+
+ //clip first point
+ btScalar firstdist = bt_distance_point_plane(plane,polygon_points[0]);;
+ if(!(firstdist>SIMD_EPSILON))
+ {
+ clipped[clipped_count] = polygon_points[0];
+ clipped_count++;
+ }
+
+ btScalar olddist = firstdist;
+ for(int i=1;i<polygon_point_count;i++)
+ {
+ btScalar dist = bt_distance_point_plane(plane,polygon_points[i]);
+
+ bt_plane_clip_polygon_collect(
+ polygon_points[i-1],polygon_points[i],
+ olddist,
+ dist,
+ clipped,
+ clipped_count);
+
+
+ olddist = dist;
+ }
+
+ //RETURN TO FIRST point
+
+ bt_plane_clip_polygon_collect(
+ polygon_points[polygon_point_count-1],polygon_points[0],
+ olddist,
+ firstdist,
+ clipped,
+ clipped_count);
+
+ return clipped_count;
+}
+
+//! Clips a polygon by a plane
+/*!
+*\param clipped must be an array of 16 points.
+*\return The count of the clipped counts
+*/
+SIMD_FORCE_INLINE int bt_plane_clip_triangle(
+ const btVector4 & plane,
+ const btVector3 & point0,
+ const btVector3 & point1,
+ const btVector3& point2,
+ btVector3 * clipped // an allocated array of 16 points at least
+ )
+{
+ int clipped_count = 0;
+
+ //clip first point0
+ btScalar firstdist = bt_distance_point_plane(plane,point0);;
+ if(!(firstdist>SIMD_EPSILON))
+ {
+ clipped[clipped_count] = point0;
+ clipped_count++;
+ }
+
+ // point 1
+ btScalar olddist = firstdist;
+ btScalar dist = bt_distance_point_plane(plane,point1);
+
+ bt_plane_clip_polygon_collect(
+ point0,point1,
+ olddist,
+ dist,
+ clipped,
+ clipped_count);
+
+ olddist = dist;
+
+
+ // point 2
+ dist = bt_distance_point_plane(plane,point2);
+
+ bt_plane_clip_polygon_collect(
+ point1,point2,
+ olddist,
+ dist,
+ clipped,
+ clipped_count);
+ olddist = dist;
+
+
+
+ //RETURN TO FIRST point0
+ bt_plane_clip_polygon_collect(
+ point2,point0,
+ olddist,
+ firstdist,
+ clipped,
+ clipped_count);
+
+ return clipped_count;
+}
+
+
+
+
+
+#endif // GIM_TRI_COLLISION_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.cpp b/tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.cpp
new file mode 100644
index 00000000..c3b697bd
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.cpp
@@ -0,0 +1,181 @@
+
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#include "btContactProcessing.h"
+
+#define MAX_COINCIDENT 8
+
+struct CONTACT_KEY_TOKEN
+{
+ unsigned int m_key;
+ int m_value;
+ CONTACT_KEY_TOKEN()
+ {
+ }
+
+ CONTACT_KEY_TOKEN(unsigned int key,int token)
+ {
+ m_key = key;
+ m_value = token;
+ }
+
+ CONTACT_KEY_TOKEN(const CONTACT_KEY_TOKEN& rtoken)
+ {
+ m_key = rtoken.m_key;
+ m_value = rtoken.m_value;
+ }
+
+ inline bool operator <(const CONTACT_KEY_TOKEN& other) const
+ {
+ return (m_key < other.m_key);
+ }
+
+ inline bool operator >(const CONTACT_KEY_TOKEN& other) const
+ {
+ return (m_key > other.m_key);
+ }
+
+};
+
+class CONTACT_KEY_TOKEN_COMP
+{
+ public:
+
+ bool operator() ( const CONTACT_KEY_TOKEN& a, const CONTACT_KEY_TOKEN& b )
+ {
+ return ( a < b );
+ }
+};
+
+
+void btContactArray::merge_contacts(
+ const btContactArray & contacts, bool normal_contact_average)
+{
+ clear();
+
+ int i;
+ if(contacts.size()==0) return;
+
+
+ if(contacts.size()==1)
+ {
+ push_back(contacts[0]);
+ return;
+ }
+
+ btAlignedObjectArray<CONTACT_KEY_TOKEN> keycontacts;
+
+ keycontacts.reserve(contacts.size());
+
+ //fill key contacts
+
+ for ( i = 0;i<contacts.size() ;i++ )
+ {
+ keycontacts.push_back(CONTACT_KEY_TOKEN(contacts[i].calc_key_contact(),i));
+ }
+
+ //sort keys
+ keycontacts.quickSort(CONTACT_KEY_TOKEN_COMP());
+
+ // Merge contacts
+ int coincident_count=0;
+ btVector3 coincident_normals[MAX_COINCIDENT];
+
+ unsigned int last_key = keycontacts[0].m_key;
+ unsigned int key = 0;
+
+ push_back(contacts[keycontacts[0].m_value]);
+
+ GIM_CONTACT * pcontact = &(*this)[0];
+
+ for( i=1;i<keycontacts.size();i++)
+ {
+ key = keycontacts[i].m_key;
+ const GIM_CONTACT * scontact = &contacts[keycontacts[i].m_value];
+
+ if(last_key == key)//same points
+ {
+ //merge contact
+ if(pcontact->m_depth - CONTACT_DIFF_EPSILON > scontact->m_depth)//)
+ {
+ *pcontact = *scontact;
+ coincident_count = 0;
+ }
+ else if(normal_contact_average)
+ {
+ if(btFabs(pcontact->m_depth - scontact->m_depth)<CONTACT_DIFF_EPSILON)
+ {
+ if(coincident_count<MAX_COINCIDENT)
+ {
+ coincident_normals[coincident_count] = scontact->m_normal;
+ coincident_count++;
+ }
+ }
+ }
+ }
+ else
+ {//add new contact
+
+ if(normal_contact_average && coincident_count>0)
+ {
+ pcontact->interpolate_normals(coincident_normals,coincident_count);
+ coincident_count = 0;
+ }
+
+ push_back(*scontact);
+ pcontact = &(*this)[this->size()-1];
+ }
+ last_key = key;
+ }
+}
+
+void btContactArray::merge_contacts_unique(const btContactArray & contacts)
+{
+ clear();
+
+ if(contacts.size()==0) return;
+
+ if(contacts.size()==1)
+ {
+ push_back(contacts[0]);
+ return;
+ }
+
+ GIM_CONTACT average_contact = contacts[0];
+
+ for (int i=1;i<contacts.size() ;i++ )
+ {
+ average_contact.m_point += contacts[i].m_point;
+ average_contact.m_normal += contacts[i].m_normal * contacts[i].m_depth;
+ }
+
+ //divide
+ btScalar divide_average = 1.0f/((btScalar)contacts.size());
+
+ average_contact.m_point *= divide_average;
+
+ average_contact.m_normal *= divide_average;
+
+ average_contact.m_depth = average_contact.m_normal.length();
+
+ average_contact.m_normal /= average_contact.m_depth;
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.h b/tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.h
new file mode 100644
index 00000000..0c66f8e1
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btContactProcessing.h
@@ -0,0 +1,145 @@
+#ifndef BT_CONTACT_H_INCLUDED
+#define BT_CONTACT_H_INCLUDED
+
+/*! \file gim_contact.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "btTriangleShapeEx.h"
+
+
+
+/**
+Configuration var for applying interpolation of contact normals
+*/
+#define NORMAL_CONTACT_AVERAGE 1
+
+#define CONTACT_DIFF_EPSILON 0.00001f
+
+///The GIM_CONTACT is an internal GIMPACT structure, similar to btManifoldPoint.
+///@todo: remove and replace GIM_CONTACT by btManifoldPoint.
+class GIM_CONTACT
+{
+public:
+ btVector3 m_point;
+ btVector3 m_normal;
+ btScalar m_depth;//Positive value indicates interpenetration
+ btScalar m_distance;//Padding not for use
+ int m_feature1;//Face number
+ int m_feature2;//Face number
+public:
+ GIM_CONTACT()
+ {
+ }
+
+ GIM_CONTACT(const GIM_CONTACT & contact):
+ m_point(contact.m_point),
+ m_normal(contact.m_normal),
+ m_depth(contact.m_depth),
+ m_feature1(contact.m_feature1),
+ m_feature2(contact.m_feature2)
+ {
+ }
+
+ GIM_CONTACT(const btVector3 &point,const btVector3 & normal,
+ btScalar depth, int feature1, int feature2):
+ m_point(point),
+ m_normal(normal),
+ m_depth(depth),
+ m_feature1(feature1),
+ m_feature2(feature2)
+ {
+ }
+
+ //! Calcs key for coord classification
+ SIMD_FORCE_INLINE unsigned int calc_key_contact() const
+ {
+ int _coords[] = {
+ (int)(m_point[0]*1000.0f+1.0f),
+ (int)(m_point[1]*1333.0f),
+ (int)(m_point[2]*2133.0f+3.0f)};
+ unsigned int _hash=0;
+ unsigned int *_uitmp = (unsigned int *)(&_coords[0]);
+ _hash = *_uitmp;
+ _uitmp++;
+ _hash += (*_uitmp)<<4;
+ _uitmp++;
+ _hash += (*_uitmp)<<8;
+ return _hash;
+ }
+
+ SIMD_FORCE_INLINE void interpolate_normals( btVector3 * normals,int normal_count)
+ {
+ btVector3 vec_sum(m_normal);
+ for(int i=0;i<normal_count;i++)
+ {
+ vec_sum += normals[i];
+ }
+
+ btScalar vec_sum_len = vec_sum.length2();
+ if(vec_sum_len <CONTACT_DIFF_EPSILON) return;
+
+ //GIM_INV_SQRT(vec_sum_len,vec_sum_len); // 1/sqrt(vec_sum_len)
+
+ m_normal = vec_sum/btSqrt(vec_sum_len);
+ }
+
+};
+
+
+class btContactArray:public btAlignedObjectArray<GIM_CONTACT>
+{
+public:
+ btContactArray()
+ {
+ reserve(64);
+ }
+
+ SIMD_FORCE_INLINE void push_contact(
+ const btVector3 &point,const btVector3 & normal,
+ btScalar depth, int feature1, int feature2)
+ {
+ push_back( GIM_CONTACT(point,normal,depth,feature1,feature2) );
+ }
+
+ SIMD_FORCE_INLINE void push_triangle_contacts(
+ const GIM_TRIANGLE_CONTACT & tricontact,
+ int feature1,int feature2)
+ {
+ for(int i = 0;i<tricontact.m_point_count ;i++ )
+ {
+ push_contact(
+ tricontact.m_points[i],
+ tricontact.m_separating_normal,
+ tricontact.m_penetration_depth,feature1,feature2);
+ }
+ }
+
+ void merge_contacts(const btContactArray & contacts, bool normal_contact_average = true);
+
+ void merge_contacts_unique(const btContactArray & contacts);
+};
+
+
+#endif // GIM_CONTACT_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.cpp b/tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.cpp
new file mode 100644
index 00000000..86323316
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.cpp
@@ -0,0 +1,498 @@
+/*! \file gim_box_set.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#include "btGImpactBvh.h"
+#include "LinearMath/btQuickprof.h"
+
+#ifdef TRI_COLLISION_PROFILING
+
+btClock g_tree_clock;
+
+float g_accum_tree_collision_time = 0;
+int g_count_traversing = 0;
+
+
+void bt_begin_gim02_tree_time()
+{
+ g_tree_clock.reset();
+}
+
+void bt_end_gim02_tree_time()
+{
+ g_accum_tree_collision_time += g_tree_clock.getTimeMicroseconds();
+ g_count_traversing++;
+}
+
+//! Gets the average time in miliseconds of tree collisions
+float btGImpactBvh::getAverageTreeCollisionTime()
+{
+ if(g_count_traversing == 0) return 0;
+
+ float avgtime = g_accum_tree_collision_time;
+ avgtime /= (float)g_count_traversing;
+
+ g_accum_tree_collision_time = 0;
+ g_count_traversing = 0;
+ return avgtime;
+
+// float avgtime = g_count_traversing;
+// g_count_traversing = 0;
+// return avgtime;
+
+}
+
+#endif //TRI_COLLISION_PROFILING
+
+/////////////////////// btBvhTree /////////////////////////////////
+
+int btBvhTree::_calc_splitting_axis(
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+{
+
+ int i;
+
+ btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.));
+ btVector3 variance(btScalar(0.),btScalar(0.),btScalar(0.));
+ int numIndices = endIndex-startIndex;
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ means+=center;
+ }
+ means *= (btScalar(1.)/(btScalar)numIndices);
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ btVector3 diff2 = center-means;
+ diff2 = diff2 * diff2;
+ variance += diff2;
+ }
+ variance *= (btScalar(1.)/ ((btScalar)numIndices-1) );
+
+ return variance.maxAxis();
+}
+
+
+int btBvhTree::_sort_and_calc_splitting_index(
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex,
+ int endIndex, int splitAxis)
+{
+ int i;
+ int splitIndex =startIndex;
+ int numIndices = endIndex - startIndex;
+
+ // average of centers
+ btScalar splitValue = 0.0f;
+
+ btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.));
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ means+=center;
+ }
+ means *= (btScalar(1.)/(btScalar)numIndices);
+
+ splitValue = means[splitAxis];
+
+
+ //sort leafNodes so all values larger then splitValue comes first, and smaller values start from 'splitIndex'.
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ if (center[splitAxis] > splitValue)
+ {
+ //swap
+ primitive_boxes.swap(i,splitIndex);
+ //swapLeafNodes(i,splitIndex);
+ splitIndex++;
+ }
+ }
+
+ //if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex
+ //otherwise the tree-building might fail due to stack-overflows in certain cases.
+ //unbalanced1 is unsafe: it can cause stack overflows
+ //bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1)));
+
+ //unbalanced2 should work too: always use center (perfect balanced trees)
+ //bool unbalanced2 = true;
+
+ //this should be safe too:
+ int rangeBalancedIndices = numIndices/3;
+ bool unbalanced = ((splitIndex<=(startIndex+rangeBalancedIndices)) || (splitIndex >=(endIndex-1-rangeBalancedIndices)));
+
+ if (unbalanced)
+ {
+ splitIndex = startIndex+ (numIndices>>1);
+ }
+
+ btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex))));
+
+ return splitIndex;
+
+}
+
+
+void btBvhTree::_build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+{
+ int curIndex = m_num_nodes;
+ m_num_nodes++;
+
+ btAssert((endIndex-startIndex)>0);
+
+ if ((endIndex-startIndex)==1)
+ {
+ //We have a leaf node
+ setNodeBound(curIndex,primitive_boxes[startIndex].m_bound);
+ m_node_array[curIndex].setDataIndex(primitive_boxes[startIndex].m_data);
+
+ return;
+ }
+ //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'.
+
+ //split axis
+ int splitIndex = _calc_splitting_axis(primitive_boxes,startIndex,endIndex);
+
+ splitIndex = _sort_and_calc_splitting_index(
+ primitive_boxes,startIndex,endIndex,
+ splitIndex//split axis
+ );
+
+
+ //calc this node bounding box
+
+ btAABB node_bound;
+ node_bound.invalidate();
+
+ for (int i=startIndex;i<endIndex;i++)
+ {
+ node_bound.merge(primitive_boxes[i].m_bound);
+ }
+
+ setNodeBound(curIndex,node_bound);
+
+
+ //build left branch
+ _build_sub_tree(primitive_boxes, startIndex, splitIndex );
+
+
+ //build right branch
+ _build_sub_tree(primitive_boxes, splitIndex ,endIndex);
+
+ m_node_array[curIndex].setEscapeIndex(m_num_nodes - curIndex);
+
+
+}
+
+//! stackless build tree
+void btBvhTree::build_tree(
+ GIM_BVH_DATA_ARRAY & primitive_boxes)
+{
+ // initialize node count to 0
+ m_num_nodes = 0;
+ // allocate nodes
+ m_node_array.resize(primitive_boxes.size()*2);
+
+ _build_sub_tree(primitive_boxes, 0, primitive_boxes.size());
+}
+
+////////////////////////////////////class btGImpactBvh
+
+void btGImpactBvh::refit()
+{
+ int nodecount = getNodeCount();
+ while(nodecount--)
+ {
+ if(isLeafNode(nodecount))
+ {
+ btAABB leafbox;
+ m_primitive_manager->get_primitive_box(getNodeData(nodecount),leafbox);
+ setNodeBound(nodecount,leafbox);
+ }
+ else
+ {
+ //const GIM_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount);
+ //get left bound
+ btAABB bound;
+ bound.invalidate();
+
+ btAABB temp_box;
+
+ int child_node = getLeftNode(nodecount);
+ if(child_node)
+ {
+ getNodeBound(child_node,temp_box);
+ bound.merge(temp_box);
+ }
+
+ child_node = getRightNode(nodecount);
+ if(child_node)
+ {
+ getNodeBound(child_node,temp_box);
+ bound.merge(temp_box);
+ }
+
+ setNodeBound(nodecount,bound);
+ }
+ }
+}
+
+//! this rebuild the entire set
+void btGImpactBvh::buildSet()
+{
+ //obtain primitive boxes
+ GIM_BVH_DATA_ARRAY primitive_boxes;
+ primitive_boxes.resize(m_primitive_manager->get_primitive_count());
+
+ for (int i = 0;i<primitive_boxes.size() ;i++ )
+ {
+ m_primitive_manager->get_primitive_box(i,primitive_boxes[i].m_bound);
+ primitive_boxes[i].m_data = i;
+ }
+
+ m_box_tree.build_tree(primitive_boxes);
+}
+
+//! returns the indices of the primitives in the m_primitive_manager
+bool btGImpactBvh::boxQuery(const btAABB & box, btAlignedObjectArray<int> & collided_results) const
+{
+ int curIndex = 0;
+ int numNodes = getNodeCount();
+
+ while (curIndex < numNodes)
+ {
+ btAABB bound;
+ getNodeBound(curIndex,bound);
+
+ //catch bugs in tree data
+
+ bool aabbOverlap = bound.has_collision(box);
+ bool isleafnode = isLeafNode(curIndex);
+
+ if (isleafnode && aabbOverlap)
+ {
+ collided_results.push_back(getNodeData(curIndex));
+ }
+
+ if (aabbOverlap || isleafnode)
+ {
+ //next subnode
+ curIndex++;
+ }
+ else
+ {
+ //skip node
+ curIndex+= getEscapeNodeIndex(curIndex);
+ }
+ }
+ if(collided_results.size()>0) return true;
+ return false;
+}
+
+
+
+//! returns the indices of the primitives in the m_primitive_manager
+bool btGImpactBvh::rayQuery(
+ const btVector3 & ray_dir,const btVector3 & ray_origin ,
+ btAlignedObjectArray<int> & collided_results) const
+{
+ int curIndex = 0;
+ int numNodes = getNodeCount();
+
+ while (curIndex < numNodes)
+ {
+ btAABB bound;
+ getNodeBound(curIndex,bound);
+
+ //catch bugs in tree data
+
+ bool aabbOverlap = bound.collide_ray(ray_origin,ray_dir);
+ bool isleafnode = isLeafNode(curIndex);
+
+ if (isleafnode && aabbOverlap)
+ {
+ collided_results.push_back(getNodeData( curIndex));
+ }
+
+ if (aabbOverlap || isleafnode)
+ {
+ //next subnode
+ curIndex++;
+ }
+ else
+ {
+ //skip node
+ curIndex+= getEscapeNodeIndex(curIndex);
+ }
+ }
+ if(collided_results.size()>0) return true;
+ return false;
+}
+
+
+SIMD_FORCE_INLINE bool _node_collision(
+ btGImpactBvh * boxset0, btGImpactBvh * boxset1,
+ const BT_BOX_BOX_TRANSFORM_CACHE & trans_cache_1to0,
+ int node0 ,int node1, bool complete_primitive_tests)
+{
+ btAABB box0;
+ boxset0->getNodeBound(node0,box0);
+ btAABB box1;
+ boxset1->getNodeBound(node1,box1);
+
+ return box0.overlapping_trans_cache(box1,trans_cache_1to0,complete_primitive_tests );
+// box1.appy_transform_trans_cache(trans_cache_1to0);
+// return box0.has_collision(box1);
+
+}
+
+
+//stackless recursive collision routine
+static void _find_collision_pairs_recursive(
+ btGImpactBvh * boxset0, btGImpactBvh * boxset1,
+ btPairSet * collision_pairs,
+ const BT_BOX_BOX_TRANSFORM_CACHE & trans_cache_1to0,
+ int node0, int node1, bool complete_primitive_tests)
+{
+
+
+
+ if( _node_collision(
+ boxset0,boxset1,trans_cache_1to0,
+ node0,node1,complete_primitive_tests) ==false) return;//avoid colliding internal nodes
+
+ if(boxset0->isLeafNode(node0))
+ {
+ if(boxset1->isLeafNode(node1))
+ {
+ // collision result
+ collision_pairs->push_pair(
+ boxset0->getNodeData(node0),boxset1->getNodeData(node1));
+ return;
+ }
+ else
+ {
+
+ //collide left recursive
+
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ node0,boxset1->getLeftNode(node1),false);
+
+ //collide right recursive
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ node0,boxset1->getRightNode(node1),false);
+
+
+ }
+ }
+ else
+ {
+ if(boxset1->isLeafNode(node1))
+ {
+
+ //collide left recursive
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getLeftNode(node0),node1,false);
+
+
+ //collide right recursive
+
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getRightNode(node0),node1,false);
+
+
+ }
+ else
+ {
+ //collide left0 left1
+
+
+
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getLeftNode(node0),boxset1->getLeftNode(node1),false);
+
+ //collide left0 right1
+
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getLeftNode(node0),boxset1->getRightNode(node1),false);
+
+
+ //collide right0 left1
+
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getRightNode(node0),boxset1->getLeftNode(node1),false);
+
+ //collide right0 right1
+
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getRightNode(node0),boxset1->getRightNode(node1),false);
+
+ }// else if node1 is not a leaf
+ }// else if node0 is not a leaf
+}
+
+
+void btGImpactBvh::find_collision(btGImpactBvh * boxset0, const btTransform & trans0,
+ btGImpactBvh * boxset1, const btTransform & trans1,
+ btPairSet & collision_pairs)
+{
+
+ if(boxset0->getNodeCount()==0 || boxset1->getNodeCount()==0 ) return;
+
+ BT_BOX_BOX_TRANSFORM_CACHE trans_cache_1to0;
+
+ trans_cache_1to0.calc_from_homogenic(trans0,trans1);
+
+#ifdef TRI_COLLISION_PROFILING
+ bt_begin_gim02_tree_time();
+#endif //TRI_COLLISION_PROFILING
+
+ _find_collision_pairs_recursive(
+ boxset0,boxset1,
+ &collision_pairs,trans_cache_1to0,0,0,true);
+#ifdef TRI_COLLISION_PROFILING
+ bt_end_gim02_tree_time();
+#endif //TRI_COLLISION_PROFILING
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.h b/tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.h
new file mode 100644
index 00000000..6174ae97
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactBvh.h
@@ -0,0 +1,396 @@
+#ifndef GIM_BOX_SET_H_INCLUDED
+#define GIM_BOX_SET_H_INCLUDED
+
+/*! \file gim_box_set.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+#include "btBoxCollision.h"
+#include "btTriangleShapeEx.h"
+
+
+
+
+
+//! Overlapping pair
+struct GIM_PAIR
+{
+ int m_index1;
+ int m_index2;
+ GIM_PAIR()
+ {}
+
+ GIM_PAIR(const GIM_PAIR & p)
+ {
+ m_index1 = p.m_index1;
+ m_index2 = p.m_index2;
+ }
+
+ GIM_PAIR(int index1, int index2)
+ {
+ m_index1 = index1;
+ m_index2 = index2;
+ }
+};
+
+//! A pairset array
+class btPairSet: public btAlignedObjectArray<GIM_PAIR>
+{
+public:
+ btPairSet()
+ {
+ reserve(32);
+ }
+ inline void push_pair(int index1,int index2)
+ {
+ push_back(GIM_PAIR(index1,index2));
+ }
+
+ inline void push_pair_inv(int index1,int index2)
+ {
+ push_back(GIM_PAIR(index2,index1));
+ }
+};
+
+
+///GIM_BVH_DATA is an internal GIMPACT collision structure to contain axis aligned bounding box
+struct GIM_BVH_DATA
+{
+ btAABB m_bound;
+ int m_data;
+};
+
+//! Node Structure for trees
+class GIM_BVH_TREE_NODE
+{
+public:
+ btAABB m_bound;
+protected:
+ int m_escapeIndexOrDataIndex;
+public:
+ GIM_BVH_TREE_NODE()
+ {
+ m_escapeIndexOrDataIndex = 0;
+ }
+
+ SIMD_FORCE_INLINE bool isLeafNode() const
+ {
+ //skipindex is negative (internal node), triangleindex >=0 (leafnode)
+ return (m_escapeIndexOrDataIndex>=0);
+ }
+
+ SIMD_FORCE_INLINE int getEscapeIndex() const
+ {
+ //btAssert(m_escapeIndexOrDataIndex < 0);
+ return -m_escapeIndexOrDataIndex;
+ }
+
+ SIMD_FORCE_INLINE void setEscapeIndex(int index)
+ {
+ m_escapeIndexOrDataIndex = -index;
+ }
+
+ SIMD_FORCE_INLINE int getDataIndex() const
+ {
+ //btAssert(m_escapeIndexOrDataIndex >= 0);
+
+ return m_escapeIndexOrDataIndex;
+ }
+
+ SIMD_FORCE_INLINE void setDataIndex(int index)
+ {
+ m_escapeIndexOrDataIndex = index;
+ }
+
+};
+
+
+class GIM_BVH_DATA_ARRAY:public btAlignedObjectArray<GIM_BVH_DATA>
+{
+};
+
+
+class GIM_BVH_TREE_NODE_ARRAY:public btAlignedObjectArray<GIM_BVH_TREE_NODE>
+{
+};
+
+
+
+
+//! Basic Box tree structure
+class btBvhTree
+{
+protected:
+ int m_num_nodes;
+ GIM_BVH_TREE_NODE_ARRAY m_node_array;
+protected:
+ int _sort_and_calc_splitting_index(
+ GIM_BVH_DATA_ARRAY & primitive_boxes,
+ int startIndex, int endIndex, int splitAxis);
+
+ int _calc_splitting_axis(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+
+ void _build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+public:
+ btBvhTree()
+ {
+ m_num_nodes = 0;
+ }
+
+ //! prototype functions for box tree management
+ //!@{
+ void build_tree(GIM_BVH_DATA_ARRAY & primitive_boxes);
+
+ SIMD_FORCE_INLINE void clearNodes()
+ {
+ m_node_array.clear();
+ m_num_nodes = 0;
+ }
+
+ //! node count
+ SIMD_FORCE_INLINE int getNodeCount() const
+ {
+ return m_num_nodes;
+ }
+
+ //! tells if the node is a leaf
+ SIMD_FORCE_INLINE bool isLeafNode(int nodeindex) const
+ {
+ return m_node_array[nodeindex].isLeafNode();
+ }
+
+ SIMD_FORCE_INLINE int getNodeData(int nodeindex) const
+ {
+ return m_node_array[nodeindex].getDataIndex();
+ }
+
+ SIMD_FORCE_INLINE void getNodeBound(int nodeindex, btAABB & bound) const
+ {
+ bound = m_node_array[nodeindex].m_bound;
+ }
+
+ SIMD_FORCE_INLINE void setNodeBound(int nodeindex, const btAABB & bound)
+ {
+ m_node_array[nodeindex].m_bound = bound;
+ }
+
+ SIMD_FORCE_INLINE int getLeftNode(int nodeindex) const
+ {
+ return nodeindex+1;
+ }
+
+ SIMD_FORCE_INLINE int getRightNode(int nodeindex) const
+ {
+ if(m_node_array[nodeindex+1].isLeafNode()) return nodeindex+2;
+ return nodeindex+1 + m_node_array[nodeindex+1].getEscapeIndex();
+ }
+
+ SIMD_FORCE_INLINE int getEscapeNodeIndex(int nodeindex) const
+ {
+ return m_node_array[nodeindex].getEscapeIndex();
+ }
+
+ SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int index = 0) const
+ {
+ return &m_node_array[index];
+ }
+
+ //!@}
+};
+
+
+//! Prototype Base class for primitive classification
+/*!
+This class is a wrapper for primitive collections.
+This tells relevant info for the Bounding Box set classes, which take care of space classification.
+This class can manage Compound shapes and trimeshes, and if it is managing trimesh then the Hierarchy Bounding Box classes will take advantage of primitive Vs Box overlapping tests for getting optimal results and less Per Box compairisons.
+*/
+class btPrimitiveManagerBase
+{
+public:
+
+ virtual ~btPrimitiveManagerBase() {}
+
+ //! determines if this manager consist on only triangles, which special case will be optimized
+ virtual bool is_trimesh() const = 0;
+ virtual int get_primitive_count() const = 0;
+ virtual void get_primitive_box(int prim_index ,btAABB & primbox) const = 0;
+ //! retrieves only the points of the triangle, and the collision margin
+ virtual void get_primitive_triangle(int prim_index,btPrimitiveTriangle & triangle) const= 0;
+};
+
+
+//! Structure for containing Boxes
+/*!
+This class offers an structure for managing a box tree of primitives.
+Requires a Primitive prototype (like btPrimitiveManagerBase )
+*/
+class btGImpactBvh
+{
+protected:
+ btBvhTree m_box_tree;
+ btPrimitiveManagerBase * m_primitive_manager;
+
+protected:
+ //stackless refit
+ void refit();
+public:
+
+ //! this constructor doesn't build the tree. you must call buildSet
+ btGImpactBvh()
+ {
+ m_primitive_manager = NULL;
+ }
+
+ //! this constructor doesn't build the tree. you must call buildSet
+ btGImpactBvh(btPrimitiveManagerBase * primitive_manager)
+ {
+ m_primitive_manager = primitive_manager;
+ }
+
+ SIMD_FORCE_INLINE btAABB getGlobalBox() const
+ {
+ btAABB totalbox;
+ getNodeBound(0, totalbox);
+ return totalbox;
+ }
+
+ SIMD_FORCE_INLINE void setPrimitiveManager(btPrimitiveManagerBase * primitive_manager)
+ {
+ m_primitive_manager = primitive_manager;
+ }
+
+ SIMD_FORCE_INLINE btPrimitiveManagerBase * getPrimitiveManager() const
+ {
+ return m_primitive_manager;
+ }
+
+
+//! node manager prototype functions
+///@{
+
+ //! this attemps to refit the box set.
+ SIMD_FORCE_INLINE void update()
+ {
+ refit();
+ }
+
+ //! this rebuild the entire set
+ void buildSet();
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ bool boxQuery(const btAABB & box, btAlignedObjectArray<int> & collided_results) const;
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ SIMD_FORCE_INLINE bool boxQueryTrans(const btAABB & box,
+ const btTransform & transform, btAlignedObjectArray<int> & collided_results) const
+ {
+ btAABB transbox=box;
+ transbox.appy_transform(transform);
+ return boxQuery(transbox,collided_results);
+ }
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ bool rayQuery(
+ const btVector3 & ray_dir,const btVector3 & ray_origin ,
+ btAlignedObjectArray<int> & collided_results) const;
+
+ //! tells if this set has hierarcht
+ SIMD_FORCE_INLINE bool hasHierarchy() const
+ {
+ return true;
+ }
+
+ //! tells if this set is a trimesh
+ SIMD_FORCE_INLINE bool isTrimesh() const
+ {
+ return m_primitive_manager->is_trimesh();
+ }
+
+ //! node count
+ SIMD_FORCE_INLINE int getNodeCount() const
+ {
+ return m_box_tree.getNodeCount();
+ }
+
+ //! tells if the node is a leaf
+ SIMD_FORCE_INLINE bool isLeafNode(int nodeindex) const
+ {
+ return m_box_tree.isLeafNode(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE int getNodeData(int nodeindex) const
+ {
+ return m_box_tree.getNodeData(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE void getNodeBound(int nodeindex, btAABB & bound) const
+ {
+ m_box_tree.getNodeBound(nodeindex, bound);
+ }
+
+ SIMD_FORCE_INLINE void setNodeBound(int nodeindex, const btAABB & bound)
+ {
+ m_box_tree.setNodeBound(nodeindex, bound);
+ }
+
+
+ SIMD_FORCE_INLINE int getLeftNode(int nodeindex) const
+ {
+ return m_box_tree.getLeftNode(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE int getRightNode(int nodeindex) const
+ {
+ return m_box_tree.getRightNode(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE int getEscapeNodeIndex(int nodeindex) const
+ {
+ return m_box_tree.getEscapeNodeIndex(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE void getNodeTriangle(int nodeindex,btPrimitiveTriangle & triangle) const
+ {
+ m_primitive_manager->get_primitive_triangle(getNodeData(nodeindex),triangle);
+ }
+
+
+ SIMD_FORCE_INLINE const GIM_BVH_TREE_NODE * get_node_pointer(int index = 0) const
+ {
+ return m_box_tree.get_node_pointer(index);
+ }
+
+#ifdef TRI_COLLISION_PROFILING
+ static float getAverageTreeCollisionTime();
+#endif //TRI_COLLISION_PROFILING
+
+ static void find_collision(btGImpactBvh * boxset1, const btTransform & trans1,
+ btGImpactBvh * boxset2, const btTransform & trans2,
+ btPairSet & collision_pairs);
+};
+
+
+#endif // GIM_BOXPRUNING_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp b/tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
new file mode 100644
index 00000000..2f2c09ff
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
@@ -0,0 +1,904 @@
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+/*
+Author: Francisco Len Nßjera
+Concave-Concave Collision
+
+*/
+
+#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "btGImpactCollisionAlgorithm.h"
+#include "btContactProcessing.h"
+#include "LinearMath/btQuickprof.h"
+
+
+//! Class for accessing the plane equation
+class btPlaneShape : public btStaticPlaneShape
+{
+public:
+
+ btPlaneShape(const btVector3& v, float f)
+ :btStaticPlaneShape(v,f)
+ {
+ }
+
+ void get_plane_equation(btVector4 &equation)
+ {
+ equation[0] = m_planeNormal[0];
+ equation[1] = m_planeNormal[1];
+ equation[2] = m_planeNormal[2];
+ equation[3] = m_planeConstant;
+ }
+
+
+ void get_plane_equation_transformed(const btTransform & trans,btVector4 &equation)
+ {
+ equation[0] = trans.getBasis().getRow(0).dot(m_planeNormal);
+ equation[1] = trans.getBasis().getRow(1).dot(m_planeNormal);
+ equation[2] = trans.getBasis().getRow(2).dot(m_planeNormal);
+ equation[3] = trans.getOrigin().dot(m_planeNormal) + m_planeConstant;
+ }
+};
+
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////
+#ifdef TRI_COLLISION_PROFILING
+
+btClock g_triangle_clock;
+
+float g_accum_triangle_collision_time = 0;
+int g_count_triangle_collision = 0;
+
+void bt_begin_gim02_tri_time()
+{
+ g_triangle_clock.reset();
+}
+
+void bt_end_gim02_tri_time()
+{
+ g_accum_triangle_collision_time += g_triangle_clock.getTimeMicroseconds();
+ g_count_triangle_collision++;
+}
+#endif //TRI_COLLISION_PROFILING
+//! Retrieving shapes shapes
+/*!
+Declared here due of insuficent space on Pool allocators
+*/
+//!@{
+class GIM_ShapeRetriever
+{
+public:
+ btGImpactShapeInterface * m_gim_shape;
+ btTriangleShapeEx m_trishape;
+ btTetrahedronShapeEx m_tetrashape;
+
+public:
+ class ChildShapeRetriever
+ {
+ public:
+ GIM_ShapeRetriever * m_parent;
+ virtual btCollisionShape * getChildShape(int index)
+ {
+ return m_parent->m_gim_shape->getChildShape(index);
+ }
+ virtual ~ChildShapeRetriever() {}
+ };
+
+ class TriangleShapeRetriever:public ChildShapeRetriever
+ {
+ public:
+
+ virtual btCollisionShape * getChildShape(int index)
+ {
+ m_parent->m_gim_shape->getBulletTriangle(index,m_parent->m_trishape);
+ return &m_parent->m_trishape;
+ }
+ virtual ~TriangleShapeRetriever() {}
+ };
+
+ class TetraShapeRetriever:public ChildShapeRetriever
+ {
+ public:
+
+ virtual btCollisionShape * getChildShape(int index)
+ {
+ m_parent->m_gim_shape->getBulletTetrahedron(index,m_parent->m_tetrashape);
+ return &m_parent->m_tetrashape;
+ }
+ };
+public:
+ ChildShapeRetriever m_child_retriever;
+ TriangleShapeRetriever m_tri_retriever;
+ TetraShapeRetriever m_tetra_retriever;
+ ChildShapeRetriever * m_current_retriever;
+
+ GIM_ShapeRetriever(btGImpactShapeInterface * gim_shape)
+ {
+ m_gim_shape = gim_shape;
+ //select retriever
+ if(m_gim_shape->needsRetrieveTriangles())
+ {
+ m_current_retriever = &m_tri_retriever;
+ }
+ else if(m_gim_shape->needsRetrieveTetrahedrons())
+ {
+ m_current_retriever = &m_tetra_retriever;
+ }
+ else
+ {
+ m_current_retriever = &m_child_retriever;
+ }
+
+ m_current_retriever->m_parent = this;
+ }
+
+ btCollisionShape * getChildShape(int index)
+ {
+ return m_current_retriever->getChildShape(index);
+ }
+
+
+};
+
+
+
+//!@}
+
+
+#ifdef TRI_COLLISION_PROFILING
+
+//! Gets the average time in miliseconds of tree collisions
+float btGImpactCollisionAlgorithm::getAverageTreeCollisionTime()
+{
+ return btGImpactBoxSet::getAverageTreeCollisionTime();
+
+}
+
+//! Gets the average time in miliseconds of triangle collisions
+float btGImpactCollisionAlgorithm::getAverageTriangleCollisionTime()
+{
+ if(g_count_triangle_collision == 0) return 0;
+
+ float avgtime = g_accum_triangle_collision_time;
+ avgtime /= (float)g_count_triangle_collision;
+
+ g_accum_triangle_collision_time = 0;
+ g_count_triangle_collision = 0;
+
+ return avgtime;
+}
+
+#endif //TRI_COLLISION_PROFILING
+
+
+
+btGImpactCollisionAlgorithm::btGImpactCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+: btActivatingCollisionAlgorithm(ci,body0,body1)
+{
+ m_manifoldPtr = NULL;
+ m_convex_algorithm = NULL;
+}
+
+btGImpactCollisionAlgorithm::~btGImpactCollisionAlgorithm()
+{
+ clearCache();
+}
+
+
+
+
+
+void btGImpactCollisionAlgorithm::addContactPoint(btCollisionObject * body0,
+ btCollisionObject * body1,
+ const btVector3 & point,
+ const btVector3 & normal,
+ btScalar distance)
+{
+ m_resultOut->setShapeIdentifiersA(m_part0,m_triface0);
+ m_resultOut->setShapeIdentifiersB(m_part1,m_triface1);
+ checkManifold(body0,body1);
+ m_resultOut->addContactPoint(normal,point,distance);
+}
+
+
+void btGImpactCollisionAlgorithm::shape_vs_shape_collision(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btCollisionShape * shape0,
+ btCollisionShape * shape1)
+{
+
+ btCollisionShape* tmpShape0 = body0->getCollisionShape();
+ btCollisionShape* tmpShape1 = body1->getCollisionShape();
+
+ body0->internalSetTemporaryCollisionShape(shape0);
+ body1->internalSetTemporaryCollisionShape(shape1);
+
+ {
+ btCollisionAlgorithm* algor = newAlgorithm(body0,body1);
+ // post : checkManifold is called
+
+ m_resultOut->setShapeIdentifiersA(m_part0,m_triface0);
+ m_resultOut->setShapeIdentifiersB(m_part1,m_triface1);
+
+ algor->processCollision(body0,body1,*m_dispatchInfo,m_resultOut);
+
+ algor->~btCollisionAlgorithm();
+ m_dispatcher->freeCollisionAlgorithm(algor);
+ }
+
+ body0->internalSetTemporaryCollisionShape(tmpShape0);
+ body1->internalSetTemporaryCollisionShape(tmpShape1);
+}
+
+void btGImpactCollisionAlgorithm::convex_vs_convex_collision(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btCollisionShape * shape0,
+ btCollisionShape * shape1)
+{
+
+ btCollisionShape* tmpShape0 = body0->getCollisionShape();
+ btCollisionShape* tmpShape1 = body1->getCollisionShape();
+
+ body0->internalSetTemporaryCollisionShape(shape0);
+ body1->internalSetTemporaryCollisionShape(shape1);
+
+
+ m_resultOut->setShapeIdentifiersA(m_part0,m_triface0);
+ m_resultOut->setShapeIdentifiersB(m_part1,m_triface1);
+
+ checkConvexAlgorithm(body0,body1);
+ m_convex_algorithm->processCollision(body0,body1,*m_dispatchInfo,m_resultOut);
+
+ body0->internalSetTemporaryCollisionShape(tmpShape0);
+ body1->internalSetTemporaryCollisionShape(tmpShape1);
+
+}
+
+
+
+
+void btGImpactCollisionAlgorithm::gimpact_vs_gimpact_find_pairs(
+ const btTransform & trans0,
+ const btTransform & trans1,
+ btGImpactShapeInterface * shape0,
+ btGImpactShapeInterface * shape1,btPairSet & pairset)
+{
+ if(shape0->hasBoxSet() && shape1->hasBoxSet())
+ {
+ btGImpactBoxSet::find_collision(shape0->getBoxSet(),trans0,shape1->getBoxSet(),trans1,pairset);
+ }
+ else
+ {
+ btAABB boxshape0;
+ btAABB boxshape1;
+ int i = shape0->getNumChildShapes();
+
+ while(i--)
+ {
+ shape0->getChildAabb(i,trans0,boxshape0.m_min,boxshape0.m_max);
+
+ int j = shape1->getNumChildShapes();
+ while(j--)
+ {
+ shape1->getChildAabb(i,trans1,boxshape1.m_min,boxshape1.m_max);
+
+ if(boxshape1.has_collision(boxshape0))
+ {
+ pairset.push_pair(i,j);
+ }
+ }
+ }
+ }
+
+
+}
+
+
+void btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs(
+ const btTransform & trans0,
+ const btTransform & trans1,
+ btGImpactShapeInterface * shape0,
+ btCollisionShape * shape1,
+ btAlignedObjectArray<int> & collided_primitives)
+{
+
+ btAABB boxshape;
+
+
+ if(shape0->hasBoxSet())
+ {
+ btTransform trans1to0 = trans0.inverse();
+ trans1to0 *= trans1;
+
+ shape1->getAabb(trans1to0,boxshape.m_min,boxshape.m_max);
+
+ shape0->getBoxSet()->boxQuery(boxshape, collided_primitives);
+ }
+ else
+ {
+ shape1->getAabb(trans1,boxshape.m_min,boxshape.m_max);
+
+ btAABB boxshape0;
+ int i = shape0->getNumChildShapes();
+
+ while(i--)
+ {
+ shape0->getChildAabb(i,trans0,boxshape0.m_min,boxshape0.m_max);
+
+ if(boxshape.has_collision(boxshape0))
+ {
+ collided_primitives.push_back(i);
+ }
+ }
+
+ }
+
+}
+
+
+void btGImpactCollisionAlgorithm::collide_gjk_triangles(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactMeshShapePart * shape0,
+ btGImpactMeshShapePart * shape1,
+ const int * pairs, int pair_count)
+{
+ btTriangleShapeEx tri0;
+ btTriangleShapeEx tri1;
+
+ shape0->lockChildShapes();
+ shape1->lockChildShapes();
+
+ const int * pair_pointer = pairs;
+
+ while(pair_count--)
+ {
+
+ m_triface0 = *(pair_pointer);
+ m_triface1 = *(pair_pointer+1);
+ pair_pointer+=2;
+
+
+
+ shape0->getBulletTriangle(m_triface0,tri0);
+ shape1->getBulletTriangle(m_triface1,tri1);
+
+
+ //collide two convex shapes
+ if(tri0.overlap_test_conservative(tri1))
+ {
+ convex_vs_convex_collision(body0,body1,&tri0,&tri1);
+ }
+
+ }
+
+ shape0->unlockChildShapes();
+ shape1->unlockChildShapes();
+}
+
+void btGImpactCollisionAlgorithm::collide_sat_triangles(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactMeshShapePart * shape0,
+ btGImpactMeshShapePart * shape1,
+ const int * pairs, int pair_count)
+{
+ btTransform orgtrans0 = body0->getWorldTransform();
+ btTransform orgtrans1 = body1->getWorldTransform();
+
+ btPrimitiveTriangle ptri0;
+ btPrimitiveTriangle ptri1;
+ GIM_TRIANGLE_CONTACT contact_data;
+
+ shape0->lockChildShapes();
+ shape1->lockChildShapes();
+
+ const int * pair_pointer = pairs;
+
+ while(pair_count--)
+ {
+
+ m_triface0 = *(pair_pointer);
+ m_triface1 = *(pair_pointer+1);
+ pair_pointer+=2;
+
+
+ shape0->getPrimitiveTriangle(m_triface0,ptri0);
+ shape1->getPrimitiveTriangle(m_triface1,ptri1);
+
+ #ifdef TRI_COLLISION_PROFILING
+ bt_begin_gim02_tri_time();
+ #endif
+
+ ptri0.applyTransform(orgtrans0);
+ ptri1.applyTransform(orgtrans1);
+
+
+ //build planes
+ ptri0.buildTriPlane();
+ ptri1.buildTriPlane();
+ // test conservative
+
+
+
+ if(ptri0.overlap_test_conservative(ptri1))
+ {
+ if(ptri0.find_triangle_collision_clip_method(ptri1,contact_data))
+ {
+
+ int j = contact_data.m_point_count;
+ while(j--)
+ {
+
+ addContactPoint(body0, body1,
+ contact_data.m_points[j],
+ contact_data.m_separating_normal,
+ -contact_data.m_penetration_depth);
+ }
+ }
+ }
+
+ #ifdef TRI_COLLISION_PROFILING
+ bt_end_gim02_tri_time();
+ #endif
+
+ }
+
+ shape0->unlockChildShapes();
+ shape1->unlockChildShapes();
+
+}
+
+
+void btGImpactCollisionAlgorithm::gimpact_vs_gimpact(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btGImpactShapeInterface * shape1)
+{
+
+ if(shape0->getGImpactShapeType()==CONST_GIMPACT_TRIMESH_SHAPE)
+ {
+ btGImpactMeshShape * meshshape0 = static_cast<btGImpactMeshShape *>(shape0);
+ m_part0 = meshshape0->getMeshPartCount();
+
+ while(m_part0--)
+ {
+ gimpact_vs_gimpact(body0,body1,meshshape0->getMeshPart(m_part0),shape1);
+ }
+
+ return;
+ }
+
+ if(shape1->getGImpactShapeType()==CONST_GIMPACT_TRIMESH_SHAPE)
+ {
+ btGImpactMeshShape * meshshape1 = static_cast<btGImpactMeshShape *>(shape1);
+ m_part1 = meshshape1->getMeshPartCount();
+
+ while(m_part1--)
+ {
+
+ gimpact_vs_gimpact(body0,body1,shape0,meshshape1->getMeshPart(m_part1));
+
+ }
+
+ return;
+ }
+
+
+ btTransform orgtrans0 = body0->getWorldTransform();
+ btTransform orgtrans1 = body1->getWorldTransform();
+
+ btPairSet pairset;
+
+ gimpact_vs_gimpact_find_pairs(orgtrans0,orgtrans1,shape0,shape1,pairset);
+
+ if(pairset.size()== 0) return;
+
+ if(shape0->getGImpactShapeType() == CONST_GIMPACT_TRIMESH_SHAPE_PART &&
+ shape1->getGImpactShapeType() == CONST_GIMPACT_TRIMESH_SHAPE_PART)
+ {
+ btGImpactMeshShapePart * shapepart0 = static_cast<btGImpactMeshShapePart * >(shape0);
+ btGImpactMeshShapePart * shapepart1 = static_cast<btGImpactMeshShapePart * >(shape1);
+ //specialized function
+ #ifdef BULLET_TRIANGLE_COLLISION
+ collide_gjk_triangles(body0,body1,shapepart0,shapepart1,&pairset[0].m_index1,pairset.size());
+ #else
+ collide_sat_triangles(body0,body1,shapepart0,shapepart1,&pairset[0].m_index1,pairset.size());
+ #endif
+
+ return;
+ }
+
+ //general function
+
+ shape0->lockChildShapes();
+ shape1->lockChildShapes();
+
+ GIM_ShapeRetriever retriever0(shape0);
+ GIM_ShapeRetriever retriever1(shape1);
+
+ bool child_has_transform0 = shape0->childrenHasTransform();
+ bool child_has_transform1 = shape1->childrenHasTransform();
+
+ int i = pairset.size();
+ while(i--)
+ {
+ GIM_PAIR * pair = &pairset[i];
+ m_triface0 = pair->m_index1;
+ m_triface1 = pair->m_index2;
+ btCollisionShape * colshape0 = retriever0.getChildShape(m_triface0);
+ btCollisionShape * colshape1 = retriever1.getChildShape(m_triface1);
+
+ if(child_has_transform0)
+ {
+ body0->setWorldTransform(orgtrans0*shape0->getChildTransform(m_triface0));
+ }
+
+ if(child_has_transform1)
+ {
+ body1->setWorldTransform(orgtrans1*shape1->getChildTransform(m_triface1));
+ }
+
+ //collide two convex shapes
+ convex_vs_convex_collision(body0,body1,colshape0,colshape1);
+
+
+ if(child_has_transform0)
+ {
+ body0->setWorldTransform(orgtrans0);
+ }
+
+ if(child_has_transform1)
+ {
+ body1->setWorldTransform(orgtrans1);
+ }
+
+ }
+
+ shape0->unlockChildShapes();
+ shape1->unlockChildShapes();
+}
+
+void btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btCollisionShape * shape1,bool swapped)
+{
+ if(shape0->getGImpactShapeType()==CONST_GIMPACT_TRIMESH_SHAPE)
+ {
+ btGImpactMeshShape * meshshape0 = static_cast<btGImpactMeshShape *>(shape0);
+ int& part = swapped ? m_part1 : m_part0;
+ part = meshshape0->getMeshPartCount();
+
+ while(part--)
+ {
+
+ gimpact_vs_shape(body0,
+ body1,
+ meshshape0->getMeshPart(part),
+ shape1,swapped);
+
+ }
+
+ return;
+ }
+
+ #ifdef GIMPACT_VS_PLANE_COLLISION
+ if(shape0->getGImpactShapeType() == CONST_GIMPACT_TRIMESH_SHAPE_PART &&
+ shape1->getShapeType() == STATIC_PLANE_PROXYTYPE)
+ {
+ btGImpactMeshShapePart * shapepart = static_cast<btGImpactMeshShapePart *>(shape0);
+ btStaticPlaneShape * planeshape = static_cast<btStaticPlaneShape * >(shape1);
+ gimpacttrimeshpart_vs_plane_collision(body0,body1,shapepart,planeshape,swapped);
+ return;
+ }
+
+ #endif
+
+
+
+ if(shape1->isCompound())
+ {
+ btCompoundShape * compoundshape = static_cast<btCompoundShape *>(shape1);
+ gimpact_vs_compoundshape(body0,body1,shape0,compoundshape,swapped);
+ return;
+ }
+ else if(shape1->isConcave())
+ {
+ btConcaveShape * concaveshape = static_cast<btConcaveShape *>(shape1);
+ gimpact_vs_concave(body0,body1,shape0,concaveshape,swapped);
+ return;
+ }
+
+
+ btTransform orgtrans0 = body0->getWorldTransform();
+
+ btTransform orgtrans1 = body1->getWorldTransform();
+
+ btAlignedObjectArray<int> collided_results;
+
+ gimpact_vs_shape_find_pairs(orgtrans0,orgtrans1,shape0,shape1,collided_results);
+
+ if(collided_results.size() == 0) return;
+
+
+ shape0->lockChildShapes();
+
+ GIM_ShapeRetriever retriever0(shape0);
+
+
+ bool child_has_transform0 = shape0->childrenHasTransform();
+
+
+ int i = collided_results.size();
+
+ while(i--)
+ {
+ int child_index = collided_results[i];
+ if(swapped)
+ m_triface1 = child_index;
+ else
+ m_triface0 = child_index;
+
+ btCollisionShape * colshape0 = retriever0.getChildShape(child_index);
+
+ if(child_has_transform0)
+ {
+ body0->setWorldTransform(orgtrans0*shape0->getChildTransform(child_index));
+ }
+
+ //collide two shapes
+ if(swapped)
+ {
+ shape_vs_shape_collision(body1,body0,shape1,colshape0);
+ }
+ else
+ {
+ shape_vs_shape_collision(body0,body1,colshape0,shape1);
+ }
+
+ //restore transforms
+ if(child_has_transform0)
+ {
+ body0->setWorldTransform(orgtrans0);
+ }
+
+ }
+
+ shape0->unlockChildShapes();
+
+}
+
+void btGImpactCollisionAlgorithm::gimpact_vs_compoundshape(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btCompoundShape * shape1,bool swapped)
+{
+ btTransform orgtrans1 = body1->getWorldTransform();
+
+ int i = shape1->getNumChildShapes();
+ while(i--)
+ {
+
+ btCollisionShape * colshape1 = shape1->getChildShape(i);
+ btTransform childtrans1 = orgtrans1*shape1->getChildTransform(i);
+
+ body1->setWorldTransform(childtrans1);
+
+ //collide child shape
+ gimpact_vs_shape(body0, body1,
+ shape0,colshape1,swapped);
+
+
+ //restore transforms
+ body1->setWorldTransform(orgtrans1);
+ }
+}
+
+void btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_plane_collision(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactMeshShapePart * shape0,
+ btStaticPlaneShape * shape1,bool swapped)
+{
+
+
+ btTransform orgtrans0 = body0->getWorldTransform();
+ btTransform orgtrans1 = body1->getWorldTransform();
+
+ btPlaneShape * planeshape = static_cast<btPlaneShape *>(shape1);
+ btVector4 plane;
+ planeshape->get_plane_equation_transformed(orgtrans1,plane);
+
+ //test box against plane
+
+ btAABB tribox;
+ shape0->getAabb(orgtrans0,tribox.m_min,tribox.m_max);
+ tribox.increment_margin(planeshape->getMargin());
+
+ if( tribox.plane_classify(plane)!= BT_CONST_COLLIDE_PLANE) return;
+
+ shape0->lockChildShapes();
+
+ btScalar margin = shape0->getMargin() + planeshape->getMargin();
+
+ btVector3 vertex;
+ int vi = shape0->getVertexCount();
+ while(vi--)
+ {
+ shape0->getVertex(vi,vertex);
+ vertex = orgtrans0(vertex);
+
+ btScalar distance = vertex.dot(plane) - plane[3] - margin;
+
+ if(distance<0.0)//add contact
+ {
+ if(swapped)
+ {
+ addContactPoint(body1, body0,
+ vertex,
+ -plane,
+ distance);
+ }
+ else
+ {
+ addContactPoint(body0, body1,
+ vertex,
+ plane,
+ distance);
+ }
+ }
+ }
+
+ shape0->unlockChildShapes();
+}
+
+
+
+
+class btGImpactTriangleCallback: public btTriangleCallback
+{
+public:
+ btGImpactCollisionAlgorithm * algorithm;
+ btCollisionObject * body0;
+ btCollisionObject * body1;
+ btGImpactShapeInterface * gimpactshape0;
+ bool swapped;
+ btScalar margin;
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex)
+ {
+ btTriangleShapeEx tri1(triangle[0],triangle[1],triangle[2]);
+ tri1.setMargin(margin);
+ if(swapped)
+ {
+ algorithm->setPart0(partId);
+ algorithm->setFace0(triangleIndex);
+ }
+ else
+ {
+ algorithm->setPart1(partId);
+ algorithm->setFace1(triangleIndex);
+ }
+ algorithm->gimpact_vs_shape(
+ body0,body1,gimpactshape0,&tri1,swapped);
+ }
+};
+
+
+
+
+void btGImpactCollisionAlgorithm::gimpact_vs_concave(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btConcaveShape * shape1,bool swapped)
+{
+ //create the callback
+ btGImpactTriangleCallback tricallback;
+ tricallback.algorithm = this;
+ tricallback.body0 = body0;
+ tricallback.body1 = body1;
+ tricallback.gimpactshape0 = shape0;
+ tricallback.swapped = swapped;
+ tricallback.margin = shape1->getMargin();
+
+ //getting the trimesh AABB
+ btTransform gimpactInConcaveSpace;
+
+ gimpactInConcaveSpace = body1->getWorldTransform().inverse() * body0->getWorldTransform();
+
+ btVector3 minAABB,maxAABB;
+ shape0->getAabb(gimpactInConcaveSpace,minAABB,maxAABB);
+
+ shape1->processAllTriangles(&tricallback,minAABB,maxAABB);
+
+}
+
+
+
+void btGImpactCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ clearCache();
+
+ m_resultOut = resultOut;
+ m_dispatchInfo = &dispatchInfo;
+ btGImpactShapeInterface * gimpactshape0;
+ btGImpactShapeInterface * gimpactshape1;
+
+ if (body0->getCollisionShape()->getShapeType()==GIMPACT_SHAPE_PROXYTYPE)
+ {
+ gimpactshape0 = static_cast<btGImpactShapeInterface *>(body0->getCollisionShape());
+
+ if( body1->getCollisionShape()->getShapeType()==GIMPACT_SHAPE_PROXYTYPE )
+ {
+ gimpactshape1 = static_cast<btGImpactShapeInterface *>(body1->getCollisionShape());
+
+ gimpact_vs_gimpact(body0,body1,gimpactshape0,gimpactshape1);
+ }
+ else
+ {
+ gimpact_vs_shape(body0,body1,gimpactshape0,body1->getCollisionShape(),false);
+ }
+
+ }
+ else if (body1->getCollisionShape()->getShapeType()==GIMPACT_SHAPE_PROXYTYPE )
+ {
+ gimpactshape1 = static_cast<btGImpactShapeInterface *>(body1->getCollisionShape());
+
+ gimpact_vs_shape(body1,body0,gimpactshape1,body0->getCollisionShape(),true);
+ }
+}
+
+
+btScalar btGImpactCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ return 1.f;
+
+}
+
+///////////////////////////////////// REGISTERING ALGORITHM //////////////////////////////////////////////
+
+
+
+//! Use this function for register the algorithm externally
+void btGImpactCollisionAlgorithm::registerAlgorithm(btCollisionDispatcher * dispatcher)
+{
+
+ static btGImpactCollisionAlgorithm::CreateFunc s_gimpact_cf;
+
+ int i;
+
+ for ( i = 0;i < MAX_BROADPHASE_COLLISION_TYPES ;i++ )
+ {
+ dispatcher->registerCollisionCreateFunc(GIMPACT_SHAPE_PROXYTYPE,i ,&s_gimpact_cf);
+ }
+
+ for ( i = 0;i < MAX_BROADPHASE_COLLISION_TYPES ;i++ )
+ {
+ dispatcher->registerCollisionCreateFunc(i,GIMPACT_SHAPE_PROXYTYPE ,&s_gimpact_cf);
+ }
+
+}
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h b/tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h
new file mode 100644
index 00000000..6b6e07c9
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h
@@ -0,0 +1,306 @@
+/*! \file btGImpactShape.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
+#define BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+class btDispatcher;
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+#include "btGImpactShape.h"
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h"
+#include "LinearMath/btIDebugDraw.h"
+
+
+
+//! Collision Algorithm for GImpact Shapes
+/*!
+For register this algorithm in Bullet, proceed as following:
+ \code
+btCollisionDispatcher * dispatcher = static_cast<btCollisionDispatcher *>(m_dynamicsWorld ->getDispatcher());
+btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);
+ \endcode
+*/
+class btGImpactCollisionAlgorithm : public btActivatingCollisionAlgorithm
+{
+protected:
+ btCollisionAlgorithm * m_convex_algorithm;
+ btPersistentManifold * m_manifoldPtr;
+ btManifoldResult* m_resultOut;
+ const btDispatcherInfo * m_dispatchInfo;
+ int m_triface0;
+ int m_part0;
+ int m_triface1;
+ int m_part1;
+
+
+ //! Creates a new contact point
+ SIMD_FORCE_INLINE btPersistentManifold* newContactManifold(btCollisionObject* body0,btCollisionObject* body1)
+ {
+ m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1);
+ return m_manifoldPtr;
+ }
+
+ SIMD_FORCE_INLINE void destroyConvexAlgorithm()
+ {
+ if(m_convex_algorithm)
+ {
+ m_convex_algorithm->~btCollisionAlgorithm();
+ m_dispatcher->freeCollisionAlgorithm( m_convex_algorithm);
+ m_convex_algorithm = NULL;
+ }
+ }
+
+ SIMD_FORCE_INLINE void destroyContactManifolds()
+ {
+ if(m_manifoldPtr == NULL) return;
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ m_manifoldPtr = NULL;
+ }
+
+ SIMD_FORCE_INLINE void clearCache()
+ {
+ destroyContactManifolds();
+ destroyConvexAlgorithm();
+
+ m_triface0 = -1;
+ m_part0 = -1;
+ m_triface1 = -1;
+ m_part1 = -1;
+ }
+
+ SIMD_FORCE_INLINE btPersistentManifold* getLastManifold()
+ {
+ return m_manifoldPtr;
+ }
+
+
+ // Call before process collision
+ SIMD_FORCE_INLINE void checkManifold(btCollisionObject* body0,btCollisionObject* body1)
+ {
+ if(getLastManifold() == 0)
+ {
+ newContactManifold(body0,body1);
+ }
+
+ m_resultOut->setPersistentManifold(getLastManifold());
+ }
+
+ // Call before process collision
+ SIMD_FORCE_INLINE btCollisionAlgorithm * newAlgorithm(btCollisionObject* body0,btCollisionObject* body1)
+ {
+ checkManifold(body0,body1);
+
+ btCollisionAlgorithm * convex_algorithm = m_dispatcher->findAlgorithm(
+ body0,body1,getLastManifold());
+ return convex_algorithm ;
+ }
+
+ // Call before process collision
+ SIMD_FORCE_INLINE void checkConvexAlgorithm(btCollisionObject* body0,btCollisionObject* body1)
+ {
+ if(m_convex_algorithm) return;
+ m_convex_algorithm = newAlgorithm(body0,body1);
+ }
+
+
+
+
+ void addContactPoint(btCollisionObject * body0,
+ btCollisionObject * body1,
+ const btVector3 & point,
+ const btVector3 & normal,
+ btScalar distance);
+
+//! Collision routines
+//!@{
+
+ void collide_gjk_triangles(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactMeshShapePart * shape0,
+ btGImpactMeshShapePart * shape1,
+ const int * pairs, int pair_count);
+
+ void collide_sat_triangles(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactMeshShapePart * shape0,
+ btGImpactMeshShapePart * shape1,
+ const int * pairs, int pair_count);
+
+
+
+
+ void shape_vs_shape_collision(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btCollisionShape * shape0,
+ btCollisionShape * shape1);
+
+ void convex_vs_convex_collision(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btCollisionShape * shape0,
+ btCollisionShape * shape1);
+
+
+
+ void gimpact_vs_gimpact_find_pairs(
+ const btTransform & trans0,
+ const btTransform & trans1,
+ btGImpactShapeInterface * shape0,
+ btGImpactShapeInterface * shape1,btPairSet & pairset);
+
+ void gimpact_vs_shape_find_pairs(
+ const btTransform & trans0,
+ const btTransform & trans1,
+ btGImpactShapeInterface * shape0,
+ btCollisionShape * shape1,
+ btAlignedObjectArray<int> & collided_primitives);
+
+
+ void gimpacttrimeshpart_vs_plane_collision(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactMeshShapePart * shape0,
+ btStaticPlaneShape * shape1,bool swapped);
+
+
+public:
+
+ btGImpactCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1);
+
+ virtual ~btGImpactCollisionAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr)
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btGImpactCollisionAlgorithm));
+ return new(mem) btGImpactCollisionAlgorithm(ci,body0,body1);
+ }
+ };
+
+ //! Use this function for register the algorithm externally
+ static void registerAlgorithm(btCollisionDispatcher * dispatcher);
+#ifdef TRI_COLLISION_PROFILING
+ //! Gets the average time in miliseconds of tree collisions
+ static float getAverageTreeCollisionTime();
+
+ //! Gets the average time in miliseconds of triangle collisions
+ static float getAverageTriangleCollisionTime();
+#endif //TRI_COLLISION_PROFILING
+
+ //! Collides two gimpact shapes
+ /*!
+ \pre shape0 and shape1 couldn't be btGImpactMeshShape objects
+ */
+
+
+ void gimpact_vs_gimpact(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btGImpactShapeInterface * shape1);
+
+ void gimpact_vs_shape(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btCollisionShape * shape1,bool swapped);
+
+ void gimpact_vs_compoundshape(btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btCompoundShape * shape1,bool swapped);
+
+ void gimpact_vs_concave(
+ btCollisionObject * body0,
+ btCollisionObject * body1,
+ btGImpactShapeInterface * shape0,
+ btConcaveShape * shape1,bool swapped);
+
+
+
+
+ /// Accessor/Mutator pairs for Part and triangleID
+ void setFace0(int value)
+ {
+ m_triface0 = value;
+ }
+ int getFace0()
+ {
+ return m_triface0;
+ }
+ void setFace1(int value)
+ {
+ m_triface1 = value;
+ }
+ int getFace1()
+ {
+ return m_triface1;
+ }
+ void setPart0(int value)
+ {
+ m_part0 = value;
+ }
+ int getPart0()
+ {
+ return m_part0;
+ }
+ void setPart1(int value)
+ {
+ m_part1 = value;
+ }
+ int getPart1()
+ {
+ return m_part1;
+ }
+
+};
+
+
+//algorithm details
+//#define BULLET_TRIANGLE_COLLISION 1
+#define GIMPACT_VS_PLANE_COLLISION 1
+
+
+
+#endif //BT_GIMPACT_BVH_CONCAVE_COLLISION_ALGORITHM_H
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactMassUtil.h b/tests/bullet/src/BulletCollision/Gimpact/btGImpactMassUtil.h
new file mode 100644
index 00000000..2543aefc
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactMassUtil.h
@@ -0,0 +1,60 @@
+/*! \file btGImpactMassUtil.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef GIMPACT_MASS_UTIL_H
+#define GIMPACT_MASS_UTIL_H
+
+#include "LinearMath/btTransform.h"
+
+
+
+SIMD_FORCE_INLINE btVector3 gim_inertia_add_transformed(
+ const btVector3 & source_inertia, const btVector3 & added_inertia, const btTransform & transform)
+{
+ btMatrix3x3 rotatedTensor = transform.getBasis().scaled(added_inertia) * transform.getBasis().transpose();
+
+ btScalar x2 = transform.getOrigin()[0];
+ x2*= x2;
+ btScalar y2 = transform.getOrigin()[1];
+ y2*= y2;
+ btScalar z2 = transform.getOrigin()[2];
+ z2*= z2;
+
+ btScalar ix = rotatedTensor[0][0]*(y2+z2);
+ btScalar iy = rotatedTensor[1][1]*(x2+z2);
+ btScalar iz = rotatedTensor[2][2]*(x2+y2);
+
+ return btVector3(source_inertia[0]+ix,source_inertia[1]+iy,source_inertia[2] + iz);
+}
+
+SIMD_FORCE_INLINE btVector3 gim_get_point_inertia(const btVector3 & point, btScalar mass)
+{
+ btScalar x2 = point[0]*point[0];
+ btScalar y2 = point[1]*point[1];
+ btScalar z2 = point[2]*point[2];
+ return btVector3(mass*(y2+z2),mass*(x2+z2),mass*(x2+y2));
+}
+
+
+#endif //GIMPACT_MESH_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp b/tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
new file mode 100644
index 00000000..cd4dfdb6
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
@@ -0,0 +1,528 @@
+/*! \file gim_box_set.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btGImpactQuantizedBvh.h"
+#include "LinearMath/btQuickprof.h"
+
+#ifdef TRI_COLLISION_PROFILING
+btClock g_q_tree_clock;
+
+
+float g_q_accum_tree_collision_time = 0;
+int g_q_count_traversing = 0;
+
+
+void bt_begin_gim02_q_tree_time()
+{
+ g_q_tree_clock.reset();
+}
+
+void bt_end_gim02_q_tree_time()
+{
+ g_q_accum_tree_collision_time += g_q_tree_clock.getTimeMicroseconds();
+ g_q_count_traversing++;
+}
+
+
+//! Gets the average time in miliseconds of tree collisions
+float btGImpactQuantizedBvh::getAverageTreeCollisionTime()
+{
+ if(g_q_count_traversing == 0) return 0;
+
+ float avgtime = g_q_accum_tree_collision_time;
+ avgtime /= (float)g_q_count_traversing;
+
+ g_q_accum_tree_collision_time = 0;
+ g_q_count_traversing = 0;
+ return avgtime;
+
+// float avgtime = g_q_count_traversing;
+// g_q_count_traversing = 0;
+// return avgtime;
+
+}
+
+#endif //TRI_COLLISION_PROFILING
+
+/////////////////////// btQuantizedBvhTree /////////////////////////////////
+
+void btQuantizedBvhTree::calc_quantization(
+ GIM_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin)
+{
+ //calc globa box
+ btAABB global_bound;
+ global_bound.invalidate();
+
+ for (int i=0;i<primitive_boxes.size() ;i++ )
+ {
+ global_bound.merge(primitive_boxes[i].m_bound);
+ }
+
+ bt_calc_quantization_parameters(
+ m_global_bound.m_min,m_global_bound.m_max,m_bvhQuantization,global_bound.m_min,global_bound.m_max,boundMargin);
+
+}
+
+
+
+int btQuantizedBvhTree::_calc_splitting_axis(
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+{
+
+ int i;
+
+ btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.));
+ btVector3 variance(btScalar(0.),btScalar(0.),btScalar(0.));
+ int numIndices = endIndex-startIndex;
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ means+=center;
+ }
+ means *= (btScalar(1.)/(btScalar)numIndices);
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ btVector3 diff2 = center-means;
+ diff2 = diff2 * diff2;
+ variance += diff2;
+ }
+ variance *= (btScalar(1.)/ ((btScalar)numIndices-1) );
+
+ return variance.maxAxis();
+}
+
+
+int btQuantizedBvhTree::_sort_and_calc_splitting_index(
+ GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex,
+ int endIndex, int splitAxis)
+{
+ int i;
+ int splitIndex =startIndex;
+ int numIndices = endIndex - startIndex;
+
+ // average of centers
+ btScalar splitValue = 0.0f;
+
+ btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.));
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ means+=center;
+ }
+ means *= (btScalar(1.)/(btScalar)numIndices);
+
+ splitValue = means[splitAxis];
+
+
+ //sort leafNodes so all values larger then splitValue comes first, and smaller values start from 'splitIndex'.
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ if (center[splitAxis] > splitValue)
+ {
+ //swap
+ primitive_boxes.swap(i,splitIndex);
+ //swapLeafNodes(i,splitIndex);
+ splitIndex++;
+ }
+ }
+
+ //if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex
+ //otherwise the tree-building might fail due to stack-overflows in certain cases.
+ //unbalanced1 is unsafe: it can cause stack overflows
+ //bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1)));
+
+ //unbalanced2 should work too: always use center (perfect balanced trees)
+ //bool unbalanced2 = true;
+
+ //this should be safe too:
+ int rangeBalancedIndices = numIndices/3;
+ bool unbalanced = ((splitIndex<=(startIndex+rangeBalancedIndices)) || (splitIndex >=(endIndex-1-rangeBalancedIndices)));
+
+ if (unbalanced)
+ {
+ splitIndex = startIndex+ (numIndices>>1);
+ }
+
+ btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex))));
+
+ return splitIndex;
+
+}
+
+
+void btQuantizedBvhTree::_build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex)
+{
+ int curIndex = m_num_nodes;
+ m_num_nodes++;
+
+ btAssert((endIndex-startIndex)>0);
+
+ if ((endIndex-startIndex)==1)
+ {
+ //We have a leaf node
+ setNodeBound(curIndex,primitive_boxes[startIndex].m_bound);
+ m_node_array[curIndex].setDataIndex(primitive_boxes[startIndex].m_data);
+
+ return;
+ }
+ //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'.
+
+ //split axis
+ int splitIndex = _calc_splitting_axis(primitive_boxes,startIndex,endIndex);
+
+ splitIndex = _sort_and_calc_splitting_index(
+ primitive_boxes,startIndex,endIndex,
+ splitIndex//split axis
+ );
+
+
+ //calc this node bounding box
+
+ btAABB node_bound;
+ node_bound.invalidate();
+
+ for (int i=startIndex;i<endIndex;i++)
+ {
+ node_bound.merge(primitive_boxes[i].m_bound);
+ }
+
+ setNodeBound(curIndex,node_bound);
+
+
+ //build left branch
+ _build_sub_tree(primitive_boxes, startIndex, splitIndex );
+
+
+ //build right branch
+ _build_sub_tree(primitive_boxes, splitIndex ,endIndex);
+
+ m_node_array[curIndex].setEscapeIndex(m_num_nodes - curIndex);
+
+
+}
+
+//! stackless build tree
+void btQuantizedBvhTree::build_tree(
+ GIM_BVH_DATA_ARRAY & primitive_boxes)
+{
+ calc_quantization(primitive_boxes);
+ // initialize node count to 0
+ m_num_nodes = 0;
+ // allocate nodes
+ m_node_array.resize(primitive_boxes.size()*2);
+
+ _build_sub_tree(primitive_boxes, 0, primitive_boxes.size());
+}
+
+////////////////////////////////////class btGImpactQuantizedBvh
+
+void btGImpactQuantizedBvh::refit()
+{
+ int nodecount = getNodeCount();
+ while(nodecount--)
+ {
+ if(isLeafNode(nodecount))
+ {
+ btAABB leafbox;
+ m_primitive_manager->get_primitive_box(getNodeData(nodecount),leafbox);
+ setNodeBound(nodecount,leafbox);
+ }
+ else
+ {
+ //const GIM_BVH_TREE_NODE * nodepointer = get_node_pointer(nodecount);
+ //get left bound
+ btAABB bound;
+ bound.invalidate();
+
+ btAABB temp_box;
+
+ int child_node = getLeftNode(nodecount);
+ if(child_node)
+ {
+ getNodeBound(child_node,temp_box);
+ bound.merge(temp_box);
+ }
+
+ child_node = getRightNode(nodecount);
+ if(child_node)
+ {
+ getNodeBound(child_node,temp_box);
+ bound.merge(temp_box);
+ }
+
+ setNodeBound(nodecount,bound);
+ }
+ }
+}
+
+//! this rebuild the entire set
+void btGImpactQuantizedBvh::buildSet()
+{
+ //obtain primitive boxes
+ GIM_BVH_DATA_ARRAY primitive_boxes;
+ primitive_boxes.resize(m_primitive_manager->get_primitive_count());
+
+ for (int i = 0;i<primitive_boxes.size() ;i++ )
+ {
+ m_primitive_manager->get_primitive_box(i,primitive_boxes[i].m_bound);
+ primitive_boxes[i].m_data = i;
+ }
+
+ m_box_tree.build_tree(primitive_boxes);
+}
+
+//! returns the indices of the primitives in the m_primitive_manager
+bool btGImpactQuantizedBvh::boxQuery(const btAABB & box, btAlignedObjectArray<int> & collided_results) const
+{
+ int curIndex = 0;
+ int numNodes = getNodeCount();
+
+ //quantize box
+
+ unsigned short quantizedMin[3];
+ unsigned short quantizedMax[3];
+
+ m_box_tree.quantizePoint(quantizedMin,box.m_min);
+ m_box_tree.quantizePoint(quantizedMax,box.m_max);
+
+
+ while (curIndex < numNodes)
+ {
+
+ //catch bugs in tree data
+
+ bool aabbOverlap = m_box_tree.testQuantizedBoxOverlapp(curIndex, quantizedMin,quantizedMax);
+ bool isleafnode = isLeafNode(curIndex);
+
+ if (isleafnode && aabbOverlap)
+ {
+ collided_results.push_back(getNodeData(curIndex));
+ }
+
+ if (aabbOverlap || isleafnode)
+ {
+ //next subnode
+ curIndex++;
+ }
+ else
+ {
+ //skip node
+ curIndex+= getEscapeNodeIndex(curIndex);
+ }
+ }
+ if(collided_results.size()>0) return true;
+ return false;
+}
+
+
+
+//! returns the indices of the primitives in the m_primitive_manager
+bool btGImpactQuantizedBvh::rayQuery(
+ const btVector3 & ray_dir,const btVector3 & ray_origin ,
+ btAlignedObjectArray<int> & collided_results) const
+{
+ int curIndex = 0;
+ int numNodes = getNodeCount();
+
+ while (curIndex < numNodes)
+ {
+ btAABB bound;
+ getNodeBound(curIndex,bound);
+
+ //catch bugs in tree data
+
+ bool aabbOverlap = bound.collide_ray(ray_origin,ray_dir);
+ bool isleafnode = isLeafNode(curIndex);
+
+ if (isleafnode && aabbOverlap)
+ {
+ collided_results.push_back(getNodeData( curIndex));
+ }
+
+ if (aabbOverlap || isleafnode)
+ {
+ //next subnode
+ curIndex++;
+ }
+ else
+ {
+ //skip node
+ curIndex+= getEscapeNodeIndex(curIndex);
+ }
+ }
+ if(collided_results.size()>0) return true;
+ return false;
+}
+
+
+SIMD_FORCE_INLINE bool _quantized_node_collision(
+ btGImpactQuantizedBvh * boxset0, btGImpactQuantizedBvh * boxset1,
+ const BT_BOX_BOX_TRANSFORM_CACHE & trans_cache_1to0,
+ int node0 ,int node1, bool complete_primitive_tests)
+{
+ btAABB box0;
+ boxset0->getNodeBound(node0,box0);
+ btAABB box1;
+ boxset1->getNodeBound(node1,box1);
+
+ return box0.overlapping_trans_cache(box1,trans_cache_1to0,complete_primitive_tests );
+// box1.appy_transform_trans_cache(trans_cache_1to0);
+// return box0.has_collision(box1);
+
+}
+
+
+//stackless recursive collision routine
+static void _find_quantized_collision_pairs_recursive(
+ btGImpactQuantizedBvh * boxset0, btGImpactQuantizedBvh * boxset1,
+ btPairSet * collision_pairs,
+ const BT_BOX_BOX_TRANSFORM_CACHE & trans_cache_1to0,
+ int node0, int node1, bool complete_primitive_tests)
+{
+
+
+
+ if( _quantized_node_collision(
+ boxset0,boxset1,trans_cache_1to0,
+ node0,node1,complete_primitive_tests) ==false) return;//avoid colliding internal nodes
+
+ if(boxset0->isLeafNode(node0))
+ {
+ if(boxset1->isLeafNode(node1))
+ {
+ // collision result
+ collision_pairs->push_pair(
+ boxset0->getNodeData(node0),boxset1->getNodeData(node1));
+ return;
+ }
+ else
+ {
+
+ //collide left recursive
+
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ node0,boxset1->getLeftNode(node1),false);
+
+ //collide right recursive
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ node0,boxset1->getRightNode(node1),false);
+
+
+ }
+ }
+ else
+ {
+ if(boxset1->isLeafNode(node1))
+ {
+
+ //collide left recursive
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getLeftNode(node0),node1,false);
+
+
+ //collide right recursive
+
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getRightNode(node0),node1,false);
+
+
+ }
+ else
+ {
+ //collide left0 left1
+
+
+
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getLeftNode(node0),boxset1->getLeftNode(node1),false);
+
+ //collide left0 right1
+
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getLeftNode(node0),boxset1->getRightNode(node1),false);
+
+
+ //collide right0 left1
+
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getRightNode(node0),boxset1->getLeftNode(node1),false);
+
+ //collide right0 right1
+
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ collision_pairs,trans_cache_1to0,
+ boxset0->getRightNode(node0),boxset1->getRightNode(node1),false);
+
+ }// else if node1 is not a leaf
+ }// else if node0 is not a leaf
+}
+
+
+void btGImpactQuantizedBvh::find_collision(btGImpactQuantizedBvh * boxset0, const btTransform & trans0,
+ btGImpactQuantizedBvh * boxset1, const btTransform & trans1,
+ btPairSet & collision_pairs)
+{
+
+ if(boxset0->getNodeCount()==0 || boxset1->getNodeCount()==0 ) return;
+
+ BT_BOX_BOX_TRANSFORM_CACHE trans_cache_1to0;
+
+ trans_cache_1to0.calc_from_homogenic(trans0,trans1);
+
+#ifdef TRI_COLLISION_PROFILING
+ bt_begin_gim02_q_tree_time();
+#endif //TRI_COLLISION_PROFILING
+
+ _find_quantized_collision_pairs_recursive(
+ boxset0,boxset1,
+ &collision_pairs,trans_cache_1to0,0,0,true);
+#ifdef TRI_COLLISION_PROFILING
+ bt_end_gim02_q_tree_time();
+#endif //TRI_COLLISION_PROFILING
+
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h b/tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h
new file mode 100644
index 00000000..9c990774
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactQuantizedBvh.h
@@ -0,0 +1,372 @@
+#ifndef GIM_QUANTIZED_SET_H_INCLUDED
+#define GIM_QUANTIZED_SET_H_INCLUDED
+
+/*! \file btGImpactQuantizedBvh.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btGImpactBvh.h"
+#include "btQuantization.h"
+
+
+
+
+
+///btQuantizedBvhNode is a compressed aabb node, 16 bytes.
+///Node can be used for leafnode or internal node. Leafnodes can point to 32-bit triangle index (non-negative range).
+ATTRIBUTE_ALIGNED16 (struct) BT_QUANTIZED_BVH_NODE
+{
+ //12 bytes
+ unsigned short int m_quantizedAabbMin[3];
+ unsigned short int m_quantizedAabbMax[3];
+ //4 bytes
+ int m_escapeIndexOrDataIndex;
+
+ BT_QUANTIZED_BVH_NODE()
+ {
+ m_escapeIndexOrDataIndex = 0;
+ }
+
+ SIMD_FORCE_INLINE bool isLeafNode() const
+ {
+ //skipindex is negative (internal node), triangleindex >=0 (leafnode)
+ return (m_escapeIndexOrDataIndex>=0);
+ }
+
+ SIMD_FORCE_INLINE int getEscapeIndex() const
+ {
+ //btAssert(m_escapeIndexOrDataIndex < 0);
+ return -m_escapeIndexOrDataIndex;
+ }
+
+ SIMD_FORCE_INLINE void setEscapeIndex(int index)
+ {
+ m_escapeIndexOrDataIndex = -index;
+ }
+
+ SIMD_FORCE_INLINE int getDataIndex() const
+ {
+ //btAssert(m_escapeIndexOrDataIndex >= 0);
+
+ return m_escapeIndexOrDataIndex;
+ }
+
+ SIMD_FORCE_INLINE void setDataIndex(int index)
+ {
+ m_escapeIndexOrDataIndex = index;
+ }
+
+ SIMD_FORCE_INLINE bool testQuantizedBoxOverlapp(
+ unsigned short * quantizedMin,unsigned short * quantizedMax) const
+ {
+ if(m_quantizedAabbMin[0] > quantizedMax[0] ||
+ m_quantizedAabbMax[0] < quantizedMin[0] ||
+ m_quantizedAabbMin[1] > quantizedMax[1] ||
+ m_quantizedAabbMax[1] < quantizedMin[1] ||
+ m_quantizedAabbMin[2] > quantizedMax[2] ||
+ m_quantizedAabbMax[2] < quantizedMin[2])
+ {
+ return false;
+ }
+ return true;
+ }
+
+};
+
+
+
+class GIM_QUANTIZED_BVH_NODE_ARRAY:public btAlignedObjectArray<BT_QUANTIZED_BVH_NODE>
+{
+};
+
+
+
+
+//! Basic Box tree structure
+class btQuantizedBvhTree
+{
+protected:
+ int m_num_nodes;
+ GIM_QUANTIZED_BVH_NODE_ARRAY m_node_array;
+ btAABB m_global_bound;
+ btVector3 m_bvhQuantization;
+protected:
+ void calc_quantization(GIM_BVH_DATA_ARRAY & primitive_boxes, btScalar boundMargin = btScalar(1.0) );
+
+ int _sort_and_calc_splitting_index(
+ GIM_BVH_DATA_ARRAY & primitive_boxes,
+ int startIndex, int endIndex, int splitAxis);
+
+ int _calc_splitting_axis(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+
+ void _build_sub_tree(GIM_BVH_DATA_ARRAY & primitive_boxes, int startIndex, int endIndex);
+public:
+ btQuantizedBvhTree()
+ {
+ m_num_nodes = 0;
+ }
+
+ //! prototype functions for box tree management
+ //!@{
+ void build_tree(GIM_BVH_DATA_ARRAY & primitive_boxes);
+
+ SIMD_FORCE_INLINE void quantizePoint(
+ unsigned short * quantizedpoint, const btVector3 & point) const
+ {
+ bt_quantize_clamp(quantizedpoint,point,m_global_bound.m_min,m_global_bound.m_max,m_bvhQuantization);
+ }
+
+
+ SIMD_FORCE_INLINE bool testQuantizedBoxOverlapp(
+ int node_index,
+ unsigned short * quantizedMin,unsigned short * quantizedMax) const
+ {
+ return m_node_array[node_index].testQuantizedBoxOverlapp(quantizedMin,quantizedMax);
+ }
+
+ SIMD_FORCE_INLINE void clearNodes()
+ {
+ m_node_array.clear();
+ m_num_nodes = 0;
+ }
+
+ //! node count
+ SIMD_FORCE_INLINE int getNodeCount() const
+ {
+ return m_num_nodes;
+ }
+
+ //! tells if the node is a leaf
+ SIMD_FORCE_INLINE bool isLeafNode(int nodeindex) const
+ {
+ return m_node_array[nodeindex].isLeafNode();
+ }
+
+ SIMD_FORCE_INLINE int getNodeData(int nodeindex) const
+ {
+ return m_node_array[nodeindex].getDataIndex();
+ }
+
+ SIMD_FORCE_INLINE void getNodeBound(int nodeindex, btAABB & bound) const
+ {
+ bound.m_min = bt_unquantize(
+ m_node_array[nodeindex].m_quantizedAabbMin,
+ m_global_bound.m_min,m_bvhQuantization);
+
+ bound.m_max = bt_unquantize(
+ m_node_array[nodeindex].m_quantizedAabbMax,
+ m_global_bound.m_min,m_bvhQuantization);
+ }
+
+ SIMD_FORCE_INLINE void setNodeBound(int nodeindex, const btAABB & bound)
+ {
+ bt_quantize_clamp( m_node_array[nodeindex].m_quantizedAabbMin,
+ bound.m_min,
+ m_global_bound.m_min,
+ m_global_bound.m_max,
+ m_bvhQuantization);
+
+ bt_quantize_clamp( m_node_array[nodeindex].m_quantizedAabbMax,
+ bound.m_max,
+ m_global_bound.m_min,
+ m_global_bound.m_max,
+ m_bvhQuantization);
+ }
+
+ SIMD_FORCE_INLINE int getLeftNode(int nodeindex) const
+ {
+ return nodeindex+1;
+ }
+
+ SIMD_FORCE_INLINE int getRightNode(int nodeindex) const
+ {
+ if(m_node_array[nodeindex+1].isLeafNode()) return nodeindex+2;
+ return nodeindex+1 + m_node_array[nodeindex+1].getEscapeIndex();
+ }
+
+ SIMD_FORCE_INLINE int getEscapeNodeIndex(int nodeindex) const
+ {
+ return m_node_array[nodeindex].getEscapeIndex();
+ }
+
+ SIMD_FORCE_INLINE const BT_QUANTIZED_BVH_NODE * get_node_pointer(int index = 0) const
+ {
+ return &m_node_array[index];
+ }
+
+ //!@}
+};
+
+
+
+//! Structure for containing Boxes
+/*!
+This class offers an structure for managing a box tree of primitives.
+Requires a Primitive prototype (like btPrimitiveManagerBase )
+*/
+class btGImpactQuantizedBvh
+{
+protected:
+ btQuantizedBvhTree m_box_tree;
+ btPrimitiveManagerBase * m_primitive_manager;
+
+protected:
+ //stackless refit
+ void refit();
+public:
+
+ //! this constructor doesn't build the tree. you must call buildSet
+ btGImpactQuantizedBvh()
+ {
+ m_primitive_manager = NULL;
+ }
+
+ //! this constructor doesn't build the tree. you must call buildSet
+ btGImpactQuantizedBvh(btPrimitiveManagerBase * primitive_manager)
+ {
+ m_primitive_manager = primitive_manager;
+ }
+
+ SIMD_FORCE_INLINE btAABB getGlobalBox() const
+ {
+ btAABB totalbox;
+ getNodeBound(0, totalbox);
+ return totalbox;
+ }
+
+ SIMD_FORCE_INLINE void setPrimitiveManager(btPrimitiveManagerBase * primitive_manager)
+ {
+ m_primitive_manager = primitive_manager;
+ }
+
+ SIMD_FORCE_INLINE btPrimitiveManagerBase * getPrimitiveManager() const
+ {
+ return m_primitive_manager;
+ }
+
+
+//! node manager prototype functions
+///@{
+
+ //! this attemps to refit the box set.
+ SIMD_FORCE_INLINE void update()
+ {
+ refit();
+ }
+
+ //! this rebuild the entire set
+ void buildSet();
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ bool boxQuery(const btAABB & box, btAlignedObjectArray<int> & collided_results) const;
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ SIMD_FORCE_INLINE bool boxQueryTrans(const btAABB & box,
+ const btTransform & transform, btAlignedObjectArray<int> & collided_results) const
+ {
+ btAABB transbox=box;
+ transbox.appy_transform(transform);
+ return boxQuery(transbox,collided_results);
+ }
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ bool rayQuery(
+ const btVector3 & ray_dir,const btVector3 & ray_origin ,
+ btAlignedObjectArray<int> & collided_results) const;
+
+ //! tells if this set has hierarcht
+ SIMD_FORCE_INLINE bool hasHierarchy() const
+ {
+ return true;
+ }
+
+ //! tells if this set is a trimesh
+ SIMD_FORCE_INLINE bool isTrimesh() const
+ {
+ return m_primitive_manager->is_trimesh();
+ }
+
+ //! node count
+ SIMD_FORCE_INLINE int getNodeCount() const
+ {
+ return m_box_tree.getNodeCount();
+ }
+
+ //! tells if the node is a leaf
+ SIMD_FORCE_INLINE bool isLeafNode(int nodeindex) const
+ {
+ return m_box_tree.isLeafNode(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE int getNodeData(int nodeindex) const
+ {
+ return m_box_tree.getNodeData(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE void getNodeBound(int nodeindex, btAABB & bound) const
+ {
+ m_box_tree.getNodeBound(nodeindex, bound);
+ }
+
+ SIMD_FORCE_INLINE void setNodeBound(int nodeindex, const btAABB & bound)
+ {
+ m_box_tree.setNodeBound(nodeindex, bound);
+ }
+
+
+ SIMD_FORCE_INLINE int getLeftNode(int nodeindex) const
+ {
+ return m_box_tree.getLeftNode(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE int getRightNode(int nodeindex) const
+ {
+ return m_box_tree.getRightNode(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE int getEscapeNodeIndex(int nodeindex) const
+ {
+ return m_box_tree.getEscapeNodeIndex(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE void getNodeTriangle(int nodeindex,btPrimitiveTriangle & triangle) const
+ {
+ m_primitive_manager->get_primitive_triangle(getNodeData(nodeindex),triangle);
+ }
+
+
+ SIMD_FORCE_INLINE const BT_QUANTIZED_BVH_NODE * get_node_pointer(int index = 0) const
+ {
+ return m_box_tree.get_node_pointer(index);
+ }
+
+#ifdef TRI_COLLISION_PROFILING
+ static float getAverageTreeCollisionTime();
+#endif //TRI_COLLISION_PROFILING
+
+ static void find_collision(btGImpactQuantizedBvh * boxset1, const btTransform & trans1,
+ btGImpactQuantizedBvh * boxset2, const btTransform & trans2,
+ btPairSet & collision_pairs);
+};
+
+
+#endif // GIM_BOXPRUNING_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.cpp b/tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.cpp
new file mode 100644
index 00000000..cceace55
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.cpp
@@ -0,0 +1,203 @@
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btGImpactShape.h"
+#include "btGImpactMassUtil.h"
+
+
+#define CALC_EXACT_INERTIA 1
+
+void btGImpactCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ lockChildShapes();
+#ifdef CALC_EXACT_INERTIA
+ inertia.setValue(0.f,0.f,0.f);
+
+ int i = this->getNumChildShapes();
+ btScalar shapemass = mass/btScalar(i);
+
+ while(i--)
+ {
+ btVector3 temp_inertia;
+ m_childShapes[i]->calculateLocalInertia(shapemass,temp_inertia);
+ if(childrenHasTransform())
+ {
+ inertia = gim_inertia_add_transformed( inertia,temp_inertia,m_childTransforms[i]);
+ }
+ else
+ {
+ inertia = gim_inertia_add_transformed( inertia,temp_inertia,btTransform::getIdentity());
+ }
+
+ }
+
+#else
+
+ // Calc box inertia
+
+ btScalar lx= m_localAABB.m_max[0] - m_localAABB.m_min[0];
+ btScalar ly= m_localAABB.m_max[1] - m_localAABB.m_min[1];
+ btScalar lz= m_localAABB.m_max[2] - m_localAABB.m_min[2];
+ const btScalar x2 = lx*lx;
+ const btScalar y2 = ly*ly;
+ const btScalar z2 = lz*lz;
+ const btScalar scaledmass = mass * btScalar(0.08333333);
+
+ inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2));
+
+#endif
+ unlockChildShapes();
+}
+
+
+
+void btGImpactMeshShapePart::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+ lockChildShapes();
+
+
+#ifdef CALC_EXACT_INERTIA
+ inertia.setValue(0.f,0.f,0.f);
+
+ int i = this->getVertexCount();
+ btScalar pointmass = mass/btScalar(i);
+
+ while(i--)
+ {
+ btVector3 pointintertia;
+ this->getVertex(i,pointintertia);
+ pointintertia = gim_get_point_inertia(pointintertia,pointmass);
+ inertia+=pointintertia;
+ }
+
+#else
+
+ // Calc box inertia
+
+ btScalar lx= m_localAABB.m_max[0] - m_localAABB.m_min[0];
+ btScalar ly= m_localAABB.m_max[1] - m_localAABB.m_min[1];
+ btScalar lz= m_localAABB.m_max[2] - m_localAABB.m_min[2];
+ const btScalar x2 = lx*lx;
+ const btScalar y2 = ly*ly;
+ const btScalar z2 = lz*lz;
+ const btScalar scaledmass = mass * btScalar(0.08333333);
+
+ inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2));
+
+#endif
+
+ unlockChildShapes();
+}
+
+void btGImpactMeshShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const
+{
+
+#ifdef CALC_EXACT_INERTIA
+ inertia.setValue(0.f,0.f,0.f);
+
+ int i = this->getMeshPartCount();
+ btScalar partmass = mass/btScalar(i);
+
+ while(i--)
+ {
+ btVector3 partinertia;
+ getMeshPart(i)->calculateLocalInertia(partmass,partinertia);
+ inertia+=partinertia;
+ }
+
+#else
+
+ // Calc box inertia
+
+ btScalar lx= m_localAABB.m_max[0] - m_localAABB.m_min[0];
+ btScalar ly= m_localAABB.m_max[1] - m_localAABB.m_min[1];
+ btScalar lz= m_localAABB.m_max[2] - m_localAABB.m_min[2];
+ const btScalar x2 = lx*lx;
+ const btScalar y2 = ly*ly;
+ const btScalar z2 = lz*lz;
+ const btScalar scaledmass = mass * btScalar(0.08333333);
+
+ inertia = scaledmass * (btVector3(y2+z2,x2+z2,x2+y2));
+
+#endif
+}
+
+void btGImpactMeshShape::rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const
+{
+}
+
+
+void btGImpactMeshShapePart::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ lockChildShapes();
+ btAABB box;
+ box.m_min = aabbMin;
+ box.m_max = aabbMax;
+
+ btAlignedObjectArray<int> collided;
+ m_box_set.boxQuery(box,collided);
+
+ if(collided.size()==0)
+ {
+ unlockChildShapes();
+ return;
+ }
+
+ int part = (int)getPart();
+ btPrimitiveTriangle triangle;
+ int i = collided.size();
+ while(i--)
+ {
+ this->getPrimitiveTriangle(collided[i],triangle);
+ callback->processTriangle(triangle.m_vertices,part,collided[i]);
+ }
+ unlockChildShapes();
+
+}
+
+void btGImpactMeshShape::processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+{
+ int i = m_mesh_parts.size();
+ while(i--)
+ {
+ m_mesh_parts[i]->processAllTriangles(callback,aabbMin,aabbMax);
+ }
+}
+
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btGImpactMeshShape::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btGImpactMeshShapeData* trimeshData = (btGImpactMeshShapeData*) dataBuffer;
+
+ btCollisionShape::serialize(&trimeshData->m_collisionShapeData,serializer);
+
+ m_meshInterface->serialize(&trimeshData->m_meshInterface, serializer);
+
+ trimeshData->m_collisionMargin = float(m_collisionMargin);
+
+ localScaling.serializeFloat(trimeshData->m_localScaling);
+
+ trimeshData->m_gimpactSubType = int(getGImpactShapeType());
+
+ return "btGImpactMeshShapeData";
+}
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.h b/tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.h
new file mode 100644
index 00000000..90015bb9
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGImpactShape.h
@@ -0,0 +1,1171 @@
+/*! \file btGImpactShape.h
+\author Francisco Len Nßjera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef GIMPACT_SHAPE_H
+#define GIMPACT_SHAPE_H
+
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/CollisionShapes/btStridingMeshInterface.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
+#include "BulletCollision/CollisionShapes/btConcaveShape.h"
+#include "BulletCollision/CollisionShapes/btTetrahedronShape.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "LinearMath/btAlignedObjectArray.h"
+
+#include "btGImpactQuantizedBvh.h" // box tree class
+
+
+//! declare Quantized trees, (you can change to float based trees)
+typedef btGImpactQuantizedBvh btGImpactBoxSet;
+
+enum eGIMPACT_SHAPE_TYPE
+{
+ CONST_GIMPACT_COMPOUND_SHAPE = 0,
+ CONST_GIMPACT_TRIMESH_SHAPE_PART,
+ CONST_GIMPACT_TRIMESH_SHAPE
+};
+
+
+//! Helper class for tetrahedrons
+class btTetrahedronShapeEx:public btBU_Simplex1to4
+{
+public:
+ btTetrahedronShapeEx()
+ {
+ m_numVertices = 4;
+ }
+
+
+ SIMD_FORCE_INLINE void setVertices(
+ const btVector3 & v0,const btVector3 & v1,
+ const btVector3 & v2,const btVector3 & v3)
+ {
+ m_vertices[0] = v0;
+ m_vertices[1] = v1;
+ m_vertices[2] = v2;
+ m_vertices[3] = v3;
+ recalcLocalAabb();
+ }
+};
+
+
+//! Base class for gimpact shapes
+class btGImpactShapeInterface : public btConcaveShape
+{
+protected:
+ btAABB m_localAABB;
+ bool m_needs_update;
+ btVector3 localScaling;
+ btGImpactBoxSet m_box_set;// optionally boxset
+
+ //! use this function for perfofm refit in bounding boxes
+ //! use this function for perfofm refit in bounding boxes
+ virtual void calcLocalAABB()
+ {
+ lockChildShapes();
+ if(m_box_set.getNodeCount() == 0)
+ {
+ m_box_set.buildSet();
+ }
+ else
+ {
+ m_box_set.update();
+ }
+ unlockChildShapes();
+
+ m_localAABB = m_box_set.getGlobalBox();
+ }
+
+
+public:
+ btGImpactShapeInterface()
+ {
+ m_shapeType=GIMPACT_SHAPE_PROXYTYPE;
+ m_localAABB.invalidate();
+ m_needs_update = true;
+ localScaling.setValue(1.f,1.f,1.f);
+ }
+
+
+ //! performs refit operation
+ /*!
+ Updates the entire Box set of this shape.
+ \pre postUpdate() must be called for attemps to calculating the box set, else this function
+ will does nothing.
+ \post if m_needs_update == true, then it calls calcLocalAABB();
+ */
+ SIMD_FORCE_INLINE void updateBound()
+ {
+ if(!m_needs_update) return;
+ calcLocalAABB();
+ m_needs_update = false;
+ }
+
+ //! If the Bounding box is not updated, then this class attemps to calculate it.
+ /*!
+ \post Calls updateBound() for update the box set.
+ */
+ void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ btAABB transformedbox = m_localAABB;
+ transformedbox.appy_transform(t);
+ aabbMin = transformedbox.m_min;
+ aabbMax = transformedbox.m_max;
+ }
+
+ //! Tells to this object that is needed to refit the box set
+ virtual void postUpdate()
+ {
+ m_needs_update = true;
+ }
+
+ //! Obtains the local box, which is the global calculated box of the total of subshapes
+ SIMD_FORCE_INLINE const btAABB & getLocalBox()
+ {
+ return m_localAABB;
+ }
+
+
+ virtual int getShapeType() const
+ {
+ return GIMPACT_SHAPE_PROXYTYPE;
+ }
+
+ /*!
+ \post You must call updateBound() for update the box set.
+ */
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ localScaling = scaling;
+ postUpdate();
+ }
+
+ virtual const btVector3& getLocalScaling() const
+ {
+ return localScaling;
+ }
+
+
+ virtual void setMargin(btScalar margin)
+ {
+ m_collisionMargin = margin;
+ int i = getNumChildShapes();
+ while(i--)
+ {
+ btCollisionShape* child = getChildShape(i);
+ child->setMargin(margin);
+ }
+
+ m_needs_update = true;
+ }
+
+
+ //! Subshape member functions
+ //!@{
+
+ //! Base method for determinig which kind of GIMPACT shape we get
+ virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const = 0 ;
+
+ //! gets boxset
+ SIMD_FORCE_INLINE btGImpactBoxSet * getBoxSet()
+ {
+ return &m_box_set;
+ }
+
+ //! Determines if this class has a hierarchy structure for sorting its primitives
+ SIMD_FORCE_INLINE bool hasBoxSet() const
+ {
+ if(m_box_set.getNodeCount() == 0) return false;
+ return true;
+ }
+
+ //! Obtains the primitive manager
+ virtual const btPrimitiveManagerBase * getPrimitiveManager() const = 0;
+
+
+ //! Gets the number of children
+ virtual int getNumChildShapes() const = 0;
+
+ //! if true, then its children must get transforms.
+ virtual bool childrenHasTransform() const = 0;
+
+ //! Determines if this shape has triangles
+ virtual bool needsRetrieveTriangles() const = 0;
+
+ //! Determines if this shape has tetrahedrons
+ virtual bool needsRetrieveTetrahedrons() const = 0;
+
+ virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const = 0;
+
+ virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const = 0;
+
+
+
+ //! call when reading child shapes
+ virtual void lockChildShapes() const
+ {
+ }
+
+ virtual void unlockChildShapes() const
+ {
+ }
+
+ //! if this trimesh
+ SIMD_FORCE_INLINE void getPrimitiveTriangle(int index,btPrimitiveTriangle & triangle) const
+ {
+ getPrimitiveManager()->get_primitive_triangle(index,triangle);
+ }
+
+
+ //! Retrieves the bound from a child
+ /*!
+ */
+ virtual void getChildAabb(int child_index,const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ btAABB child_aabb;
+ getPrimitiveManager()->get_primitive_box(child_index,child_aabb);
+ child_aabb.appy_transform(t);
+ aabbMin = child_aabb.m_min;
+ aabbMax = child_aabb.m_max;
+ }
+
+ //! Gets the children
+ virtual btCollisionShape* getChildShape(int index) = 0;
+
+
+ //! Gets the child
+ virtual const btCollisionShape* getChildShape(int index) const = 0;
+
+ //! Gets the children transform
+ virtual btTransform getChildTransform(int index) const = 0;
+
+ //! Sets the children transform
+ /*!
+ \post You must call updateBound() for update the box set.
+ */
+ virtual void setChildTransform(int index, const btTransform & transform) = 0;
+
+ //!@}
+
+
+ //! virtual method for ray collision
+ virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const
+ {
+ (void) rayFrom; (void) rayTo; (void) resultCallback;
+ }
+
+ //! Function for retrieve triangles.
+ /*!
+ It gives the triangles in local space
+ */
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const
+ {
+ (void) callback; (void) aabbMin; (void) aabbMax;
+ }
+
+ //!@}
+
+};
+
+
+//! btGImpactCompoundShape allows to handle multiple btCollisionShape objects at once
+/*!
+This class only can manage Convex subshapes
+*/
+class btGImpactCompoundShape : public btGImpactShapeInterface
+{
+public:
+ //! compound primitive manager
+ class CompoundPrimitiveManager:public btPrimitiveManagerBase
+ {
+ public:
+ virtual ~CompoundPrimitiveManager() {}
+ btGImpactCompoundShape * m_compoundShape;
+
+
+ CompoundPrimitiveManager(const CompoundPrimitiveManager& compound)
+ : btPrimitiveManagerBase()
+ {
+ m_compoundShape = compound.m_compoundShape;
+ }
+
+ CompoundPrimitiveManager(btGImpactCompoundShape * compoundShape)
+ {
+ m_compoundShape = compoundShape;
+ }
+
+ CompoundPrimitiveManager()
+ {
+ m_compoundShape = NULL;
+ }
+
+ virtual bool is_trimesh() const
+ {
+ return false;
+ }
+
+ virtual int get_primitive_count() const
+ {
+ return (int )m_compoundShape->getNumChildShapes();
+ }
+
+ virtual void get_primitive_box(int prim_index ,btAABB & primbox) const
+ {
+ btTransform prim_trans;
+ if(m_compoundShape->childrenHasTransform())
+ {
+ prim_trans = m_compoundShape->getChildTransform(prim_index);
+ }
+ else
+ {
+ prim_trans.setIdentity();
+ }
+ const btCollisionShape* shape = m_compoundShape->getChildShape(prim_index);
+ shape->getAabb(prim_trans,primbox.m_min,primbox.m_max);
+ }
+
+ virtual void get_primitive_triangle(int prim_index,btPrimitiveTriangle & triangle) const
+ {
+ btAssert(0);
+ (void) prim_index; (void) triangle;
+ }
+
+ };
+
+
+
+protected:
+ CompoundPrimitiveManager m_primitive_manager;
+ btAlignedObjectArray<btTransform> m_childTransforms;
+ btAlignedObjectArray<btCollisionShape*> m_childShapes;
+
+
+public:
+
+ btGImpactCompoundShape(bool children_has_transform = true)
+ {
+ (void) children_has_transform;
+ m_primitive_manager.m_compoundShape = this;
+ m_box_set.setPrimitiveManager(&m_primitive_manager);
+ }
+
+ virtual ~btGImpactCompoundShape()
+ {
+ }
+
+
+ //! if true, then its children must get transforms.
+ virtual bool childrenHasTransform() const
+ {
+ if(m_childTransforms.size()==0) return false;
+ return true;
+ }
+
+
+ //! Obtains the primitive manager
+ virtual const btPrimitiveManagerBase * getPrimitiveManager() const
+ {
+ return &m_primitive_manager;
+ }
+
+ //! Obtains the compopund primitive manager
+ SIMD_FORCE_INLINE CompoundPrimitiveManager * getCompoundPrimitiveManager()
+ {
+ return &m_primitive_manager;
+ }
+
+ //! Gets the number of children
+ virtual int getNumChildShapes() const
+ {
+ return m_childShapes.size();
+ }
+
+
+ //! Use this method for adding children. Only Convex shapes are allowed.
+ void addChildShape(const btTransform& localTransform,btCollisionShape* shape)
+ {
+ btAssert(shape->isConvex());
+ m_childTransforms.push_back(localTransform);
+ m_childShapes.push_back(shape);
+ }
+
+ //! Use this method for adding children. Only Convex shapes are allowed.
+ void addChildShape(btCollisionShape* shape)
+ {
+ btAssert(shape->isConvex());
+ m_childShapes.push_back(shape);
+ }
+
+ //! Gets the children
+ virtual btCollisionShape* getChildShape(int index)
+ {
+ return m_childShapes[index];
+ }
+
+ //! Gets the children
+ virtual const btCollisionShape* getChildShape(int index) const
+ {
+ return m_childShapes[index];
+ }
+
+ //! Retrieves the bound from a child
+ /*!
+ */
+ virtual void getChildAabb(int child_index,const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+ {
+
+ if(childrenHasTransform())
+ {
+ m_childShapes[child_index]->getAabb(t*m_childTransforms[child_index],aabbMin,aabbMax);
+ }
+ else
+ {
+ m_childShapes[child_index]->getAabb(t,aabbMin,aabbMax);
+ }
+ }
+
+
+ //! Gets the children transform
+ virtual btTransform getChildTransform(int index) const
+ {
+ btAssert(m_childTransforms.size() == m_childShapes.size());
+ return m_childTransforms[index];
+ }
+
+ //! Sets the children transform
+ /*!
+ \post You must call updateBound() for update the box set.
+ */
+ virtual void setChildTransform(int index, const btTransform & transform)
+ {
+ btAssert(m_childTransforms.size() == m_childShapes.size());
+ m_childTransforms[index] = transform;
+ postUpdate();
+ }
+
+ //! Determines if this shape has triangles
+ virtual bool needsRetrieveTriangles() const
+ {
+ return false;
+ }
+
+ //! Determines if this shape has tetrahedrons
+ virtual bool needsRetrieveTetrahedrons() const
+ {
+ return false;
+ }
+
+
+ virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const
+ {
+ (void) prim_index; (void) triangle;
+ btAssert(0);
+ }
+
+ virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const
+ {
+ (void) prim_index; (void) tetrahedron;
+ btAssert(0);
+ }
+
+
+ //! Calculates the exact inertia tensor for this shape
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+ virtual const char* getName()const
+ {
+ return "GImpactCompound";
+ }
+
+ virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
+ {
+ return CONST_GIMPACT_COMPOUND_SHAPE;
+ }
+
+};
+
+
+
+//! This class manages a sub part of a mesh supplied by the btStridingMeshInterface interface.
+/*!
+- Simply create this shape by passing the btStridingMeshInterface to the constructor btGImpactMeshShapePart, then you must call updateBound() after creating the mesh
+- When making operations with this shape, you must call <b>lock</b> before accessing to the trimesh primitives, and then call <b>unlock</b>
+- You can handle deformable meshes with this shape, by calling postUpdate() every time when changing the mesh vertices.
+
+*/
+class btGImpactMeshShapePart : public btGImpactShapeInterface
+{
+public:
+ //! Trimesh primitive manager
+ /*!
+ Manages the info from btStridingMeshInterface object and controls the Lock/Unlock mechanism
+ */
+ class TrimeshPrimitiveManager:public btPrimitiveManagerBase
+ {
+ public:
+ btScalar m_margin;
+ btStridingMeshInterface * m_meshInterface;
+ btVector3 m_scale;
+ int m_part;
+ int m_lock_count;
+ const unsigned char *vertexbase;
+ int numverts;
+ PHY_ScalarType type;
+ int stride;
+ const unsigned char *indexbase;
+ int indexstride;
+ int numfaces;
+ PHY_ScalarType indicestype;
+
+ TrimeshPrimitiveManager()
+ {
+ m_meshInterface = NULL;
+ m_part = 0;
+ m_margin = 0.01f;
+ m_scale = btVector3(1.f,1.f,1.f);
+ m_lock_count = 0;
+ vertexbase = 0;
+ numverts = 0;
+ stride = 0;
+ indexbase = 0;
+ indexstride = 0;
+ numfaces = 0;
+ }
+
+ TrimeshPrimitiveManager(const TrimeshPrimitiveManager & manager)
+ : btPrimitiveManagerBase()
+ {
+ m_meshInterface = manager.m_meshInterface;
+ m_part = manager.m_part;
+ m_margin = manager.m_margin;
+ m_scale = manager.m_scale;
+ m_lock_count = 0;
+ vertexbase = 0;
+ numverts = 0;
+ stride = 0;
+ indexbase = 0;
+ indexstride = 0;
+ numfaces = 0;
+
+ }
+
+ TrimeshPrimitiveManager(
+ btStridingMeshInterface * meshInterface, int part)
+ {
+ m_meshInterface = meshInterface;
+ m_part = part;
+ m_scale = m_meshInterface->getScaling();
+ m_margin = 0.1f;
+ m_lock_count = 0;
+ vertexbase = 0;
+ numverts = 0;
+ stride = 0;
+ indexbase = 0;
+ indexstride = 0;
+ numfaces = 0;
+
+ }
+
+ virtual ~TrimeshPrimitiveManager() {}
+
+ void lock()
+ {
+ if(m_lock_count>0)
+ {
+ m_lock_count++;
+ return;
+ }
+ m_meshInterface->getLockedReadOnlyVertexIndexBase(
+ &vertexbase,numverts,
+ type, stride,&indexbase, indexstride, numfaces,indicestype,m_part);
+
+ m_lock_count = 1;
+ }
+
+ void unlock()
+ {
+ if(m_lock_count == 0) return;
+ if(m_lock_count>1)
+ {
+ --m_lock_count;
+ return;
+ }
+ m_meshInterface->unLockReadOnlyVertexBase(m_part);
+ vertexbase = NULL;
+ m_lock_count = 0;
+ }
+
+ virtual bool is_trimesh() const
+ {
+ return true;
+ }
+
+ virtual int get_primitive_count() const
+ {
+ return (int )numfaces;
+ }
+
+ SIMD_FORCE_INLINE int get_vertex_count() const
+ {
+ return (int )numverts;
+ }
+
+ SIMD_FORCE_INLINE void get_indices(int face_index,int &i0,int &i1,int &i2) const
+ {
+ if(indicestype == PHY_SHORT)
+ {
+ short * s_indices = (short *)(indexbase + face_index*indexstride);
+ i0 = s_indices[0];
+ i1 = s_indices[1];
+ i2 = s_indices[2];
+ }
+ else
+ {
+ int * i_indices = (int *)(indexbase + face_index*indexstride);
+ i0 = i_indices[0];
+ i1 = i_indices[1];
+ i2 = i_indices[2];
+ }
+ }
+
+ SIMD_FORCE_INLINE void get_vertex(int vertex_index, btVector3 & vertex) const
+ {
+ if(type == PHY_DOUBLE)
+ {
+ double * dvertices = (double *)(vertexbase + vertex_index*stride);
+ vertex[0] = btScalar(dvertices[0]*m_scale[0]);
+ vertex[1] = btScalar(dvertices[1]*m_scale[1]);
+ vertex[2] = btScalar(dvertices[2]*m_scale[2]);
+ }
+ else
+ {
+ float * svertices = (float *)(vertexbase + vertex_index*stride);
+ vertex[0] = svertices[0]*m_scale[0];
+ vertex[1] = svertices[1]*m_scale[1];
+ vertex[2] = svertices[2]*m_scale[2];
+ }
+ }
+
+ virtual void get_primitive_box(int prim_index ,btAABB & primbox) const
+ {
+ btPrimitiveTriangle triangle;
+ get_primitive_triangle(prim_index,triangle);
+ primbox.calc_from_triangle_margin(
+ triangle.m_vertices[0],
+ triangle.m_vertices[1],triangle.m_vertices[2],triangle.m_margin);
+ }
+
+ virtual void get_primitive_triangle(int prim_index,btPrimitiveTriangle & triangle) const
+ {
+ int indices[3];
+ get_indices(prim_index,indices[0],indices[1],indices[2]);
+ get_vertex(indices[0],triangle.m_vertices[0]);
+ get_vertex(indices[1],triangle.m_vertices[1]);
+ get_vertex(indices[2],triangle.m_vertices[2]);
+ triangle.m_margin = m_margin;
+ }
+
+ SIMD_FORCE_INLINE void get_bullet_triangle(int prim_index,btTriangleShapeEx & triangle) const
+ {
+ int indices[3];
+ get_indices(prim_index,indices[0],indices[1],indices[2]);
+ get_vertex(indices[0],triangle.m_vertices1[0]);
+ get_vertex(indices[1],triangle.m_vertices1[1]);
+ get_vertex(indices[2],triangle.m_vertices1[2]);
+ triangle.setMargin(m_margin);
+ }
+
+ };
+
+
+protected:
+ TrimeshPrimitiveManager m_primitive_manager;
+public:
+
+ btGImpactMeshShapePart()
+ {
+ m_box_set.setPrimitiveManager(&m_primitive_manager);
+ }
+
+
+ btGImpactMeshShapePart(btStridingMeshInterface * meshInterface, int part)
+ {
+ m_primitive_manager.m_meshInterface = meshInterface;
+ m_primitive_manager.m_part = part;
+ m_box_set.setPrimitiveManager(&m_primitive_manager);
+ }
+
+ virtual ~btGImpactMeshShapePart()
+ {
+ }
+
+ //! if true, then its children must get transforms.
+ virtual bool childrenHasTransform() const
+ {
+ return false;
+ }
+
+
+ //! call when reading child shapes
+ virtual void lockChildShapes() const
+ {
+ void * dummy = (void*)(m_box_set.getPrimitiveManager());
+ TrimeshPrimitiveManager * dummymanager = static_cast<TrimeshPrimitiveManager *>(dummy);
+ dummymanager->lock();
+ }
+
+ virtual void unlockChildShapes() const
+ {
+ void * dummy = (void*)(m_box_set.getPrimitiveManager());
+ TrimeshPrimitiveManager * dummymanager = static_cast<TrimeshPrimitiveManager *>(dummy);
+ dummymanager->unlock();
+ }
+
+ //! Gets the number of children
+ virtual int getNumChildShapes() const
+ {
+ return m_primitive_manager.get_primitive_count();
+ }
+
+
+ //! Gets the children
+ virtual btCollisionShape* getChildShape(int index)
+ {
+ (void) index;
+ btAssert(0);
+ return NULL;
+ }
+
+
+
+ //! Gets the child
+ virtual const btCollisionShape* getChildShape(int index) const
+ {
+ (void) index;
+ btAssert(0);
+ return NULL;
+ }
+
+ //! Gets the children transform
+ virtual btTransform getChildTransform(int index) const
+ {
+ (void) index;
+ btAssert(0);
+ return btTransform();
+ }
+
+ //! Sets the children transform
+ /*!
+ \post You must call updateBound() for update the box set.
+ */
+ virtual void setChildTransform(int index, const btTransform & transform)
+ {
+ (void) index;
+ (void) transform;
+ btAssert(0);
+ }
+
+
+ //! Obtains the primitive manager
+ virtual const btPrimitiveManagerBase * getPrimitiveManager() const
+ {
+ return &m_primitive_manager;
+ }
+
+ SIMD_FORCE_INLINE TrimeshPrimitiveManager * getTrimeshPrimitiveManager()
+ {
+ return &m_primitive_manager;
+ }
+
+
+
+
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+
+
+
+ virtual const char* getName()const
+ {
+ return "GImpactMeshShapePart";
+ }
+
+ virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
+ {
+ return CONST_GIMPACT_TRIMESH_SHAPE_PART;
+ }
+
+ //! Determines if this shape has triangles
+ virtual bool needsRetrieveTriangles() const
+ {
+ return true;
+ }
+
+ //! Determines if this shape has tetrahedrons
+ virtual bool needsRetrieveTetrahedrons() const
+ {
+ return false;
+ }
+
+ virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const
+ {
+ m_primitive_manager.get_bullet_triangle(prim_index,triangle);
+ }
+
+ virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const
+ {
+ (void) prim_index;
+ (void) tetrahedron;
+ btAssert(0);
+ }
+
+
+
+ SIMD_FORCE_INLINE int getVertexCount() const
+ {
+ return m_primitive_manager.get_vertex_count();
+ }
+
+ SIMD_FORCE_INLINE void getVertex(int vertex_index, btVector3 & vertex) const
+ {
+ m_primitive_manager.get_vertex(vertex_index,vertex);
+ }
+
+ SIMD_FORCE_INLINE void setMargin(btScalar margin)
+ {
+ m_primitive_manager.m_margin = margin;
+ postUpdate();
+ }
+
+ SIMD_FORCE_INLINE btScalar getMargin() const
+ {
+ return m_primitive_manager.m_margin;
+ }
+
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ m_primitive_manager.m_scale = scaling;
+ postUpdate();
+ }
+
+ virtual const btVector3& getLocalScaling() const
+ {
+ return m_primitive_manager.m_scale;
+ }
+
+ SIMD_FORCE_INLINE int getPart() const
+ {
+ return (int)m_primitive_manager.m_part;
+ }
+
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+};
+
+
+//! This class manages a mesh supplied by the btStridingMeshInterface interface.
+/*!
+Set of btGImpactMeshShapePart parts
+- Simply create this shape by passing the btStridingMeshInterface to the constructor btGImpactMeshShape, then you must call updateBound() after creating the mesh
+
+- You can handle deformable meshes with this shape, by calling postUpdate() every time when changing the mesh vertices.
+
+*/
+class btGImpactMeshShape : public btGImpactShapeInterface
+{
+ btStridingMeshInterface* m_meshInterface;
+
+protected:
+ btAlignedObjectArray<btGImpactMeshShapePart*> m_mesh_parts;
+ void buildMeshParts(btStridingMeshInterface * meshInterface)
+ {
+ for (int i=0;i<meshInterface->getNumSubParts() ;++i )
+ {
+ btGImpactMeshShapePart * newpart = new btGImpactMeshShapePart(meshInterface,i);
+ m_mesh_parts.push_back(newpart);
+ }
+ }
+
+ //! use this function for perfofm refit in bounding boxes
+ virtual void calcLocalAABB()
+ {
+ m_localAABB.invalidate();
+ int i = m_mesh_parts.size();
+ while(i--)
+ {
+ m_mesh_parts[i]->updateBound();
+ m_localAABB.merge(m_mesh_parts[i]->getLocalBox());
+ }
+ }
+
+public:
+ btGImpactMeshShape(btStridingMeshInterface * meshInterface)
+ {
+ m_meshInterface = meshInterface;
+ buildMeshParts(meshInterface);
+ }
+
+ virtual ~btGImpactMeshShape()
+ {
+ int i = m_mesh_parts.size();
+ while(i--)
+ {
+ btGImpactMeshShapePart * part = m_mesh_parts[i];
+ delete part;
+ }
+ m_mesh_parts.clear();
+ }
+
+
+ btStridingMeshInterface* getMeshInterface()
+ {
+ return m_meshInterface;
+ }
+
+ const btStridingMeshInterface* getMeshInterface() const
+ {
+ return m_meshInterface;
+ }
+
+ int getMeshPartCount() const
+ {
+ return m_mesh_parts.size();
+ }
+
+ btGImpactMeshShapePart * getMeshPart(int index)
+ {
+ return m_mesh_parts[index];
+ }
+
+
+
+ const btGImpactMeshShapePart * getMeshPart(int index) const
+ {
+ return m_mesh_parts[index];
+ }
+
+
+ virtual void setLocalScaling(const btVector3& scaling)
+ {
+ localScaling = scaling;
+
+ int i = m_mesh_parts.size();
+ while(i--)
+ {
+ btGImpactMeshShapePart * part = m_mesh_parts[i];
+ part->setLocalScaling(scaling);
+ }
+
+ m_needs_update = true;
+ }
+
+ virtual void setMargin(btScalar margin)
+ {
+ m_collisionMargin = margin;
+
+ int i = m_mesh_parts.size();
+ while(i--)
+ {
+ btGImpactMeshShapePart * part = m_mesh_parts[i];
+ part->setMargin(margin);
+ }
+
+ m_needs_update = true;
+ }
+
+ //! Tells to this object that is needed to refit all the meshes
+ virtual void postUpdate()
+ {
+ int i = m_mesh_parts.size();
+ while(i--)
+ {
+ btGImpactMeshShapePart * part = m_mesh_parts[i];
+ part->postUpdate();
+ }
+
+ m_needs_update = true;
+ }
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const;
+
+
+ //! Obtains the primitive manager
+ virtual const btPrimitiveManagerBase * getPrimitiveManager() const
+ {
+ btAssert(0);
+ return NULL;
+ }
+
+
+ //! Gets the number of children
+ virtual int getNumChildShapes() const
+ {
+ btAssert(0);
+ return 0;
+ }
+
+
+ //! if true, then its children must get transforms.
+ virtual bool childrenHasTransform() const
+ {
+ btAssert(0);
+ return false;
+ }
+
+ //! Determines if this shape has triangles
+ virtual bool needsRetrieveTriangles() const
+ {
+ btAssert(0);
+ return false;
+ }
+
+ //! Determines if this shape has tetrahedrons
+ virtual bool needsRetrieveTetrahedrons() const
+ {
+ btAssert(0);
+ return false;
+ }
+
+ virtual void getBulletTriangle(int prim_index,btTriangleShapeEx & triangle) const
+ {
+ (void) prim_index; (void) triangle;
+ btAssert(0);
+ }
+
+ virtual void getBulletTetrahedron(int prim_index,btTetrahedronShapeEx & tetrahedron) const
+ {
+ (void) prim_index; (void) tetrahedron;
+ btAssert(0);
+ }
+
+ //! call when reading child shapes
+ virtual void lockChildShapes() const
+ {
+ btAssert(0);
+ }
+
+ virtual void unlockChildShapes() const
+ {
+ btAssert(0);
+ }
+
+
+
+
+ //! Retrieves the bound from a child
+ /*!
+ */
+ virtual void getChildAabb(int child_index,const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ (void) child_index; (void) t; (void) aabbMin; (void) aabbMax;
+ btAssert(0);
+ }
+
+ //! Gets the children
+ virtual btCollisionShape* getChildShape(int index)
+ {
+ (void) index;
+ btAssert(0);
+ return NULL;
+ }
+
+
+ //! Gets the child
+ virtual const btCollisionShape* getChildShape(int index) const
+ {
+ (void) index;
+ btAssert(0);
+ return NULL;
+ }
+
+ //! Gets the children transform
+ virtual btTransform getChildTransform(int index) const
+ {
+ (void) index;
+ btAssert(0);
+ return btTransform();
+ }
+
+ //! Sets the children transform
+ /*!
+ \post You must call updateBound() for update the box set.
+ */
+ virtual void setChildTransform(int index, const btTransform & transform)
+ {
+ (void) index; (void) transform;
+ btAssert(0);
+ }
+
+
+ virtual eGIMPACT_SHAPE_TYPE getGImpactShapeType() const
+ {
+ return CONST_GIMPACT_TRIMESH_SHAPE;
+ }
+
+
+ virtual const char* getName()const
+ {
+ return "GImpactMesh";
+ }
+
+ virtual void rayTest(const btVector3& rayFrom, const btVector3& rayTo, btCollisionWorld::RayResultCallback& resultCallback) const;
+
+ //! Function for retrieve triangles.
+ /*!
+ It gives the triangles in local space
+ */
+ virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const;
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btGImpactMeshShapeData
+{
+ btCollisionShapeData m_collisionShapeData;
+
+ btStridingMeshInterfaceData m_meshInterface;
+
+ btVector3FloatData m_localScaling;
+
+ float m_collisionMargin;
+
+ int m_gimpactSubType;
+};
+
+SIMD_FORCE_INLINE int btGImpactMeshShape::calculateSerializeBufferSize() const
+{
+ return sizeof(btGImpactMeshShapeData);
+}
+
+
+#endif //GIMPACT_MESH_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp b/tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp
new file mode 100644
index 00000000..5d07d1ad
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.cpp
@@ -0,0 +1,283 @@
+/*! \file btGenericPoolAllocator.cpp
+\author Francisco Leon Najera. email projectileman@yahoo.com
+
+General purpose allocator class
+*/
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btGenericPoolAllocator.h"
+
+
+
+/// *************** btGenericMemoryPool ******************///////////
+
+size_t btGenericMemoryPool::allocate_from_free_nodes(size_t num_elements)
+{
+ size_t ptr = BT_UINT_MAX;
+
+ if(m_free_nodes_count == 0) return BT_UINT_MAX;
+ // find an avaliable free node with the correct size
+ size_t revindex = m_free_nodes_count;
+
+ while(revindex-- && ptr == BT_UINT_MAX)
+ {
+ if(m_allocated_sizes[m_free_nodes[revindex]]>=num_elements)
+ {
+ ptr = revindex;
+ }
+ }
+ if(ptr == BT_UINT_MAX) return BT_UINT_MAX; // not found
+
+
+ revindex = ptr;
+ ptr = m_free_nodes[revindex];
+ // post: ptr contains the node index, and revindex the index in m_free_nodes
+
+ size_t finalsize = m_allocated_sizes[ptr];
+ finalsize -= num_elements;
+
+ m_allocated_sizes[ptr] = num_elements;
+
+ // post: finalsize>=0, m_allocated_sizes[ptr] has the requested size
+
+ if(finalsize>0) // preserve free node, there are some free memory
+ {
+ m_free_nodes[revindex] = ptr + num_elements;
+ m_allocated_sizes[ptr + num_elements] = finalsize;
+ }
+ else // delete free node
+ {
+ // swap with end
+ m_free_nodes[revindex] = m_free_nodes[m_free_nodes_count-1];
+ m_free_nodes_count--;
+ }
+
+ return ptr;
+}
+
+size_t btGenericMemoryPool::allocate_from_pool(size_t num_elements)
+{
+ if(m_allocated_count+num_elements>m_max_element_count) return BT_UINT_MAX;
+
+ size_t ptr = m_allocated_count;
+
+ m_allocated_sizes[m_allocated_count] = num_elements;
+ m_allocated_count+=num_elements;
+
+ return ptr;
+}
+
+
+void btGenericMemoryPool::init_pool(size_t element_size, size_t element_count)
+{
+ m_allocated_count = 0;
+ m_free_nodes_count = 0;
+
+ m_element_size = element_size;
+ m_max_element_count = element_count;
+
+
+
+
+ m_pool = (unsigned char *) btAlignedAlloc(m_element_size*m_max_element_count,16);
+ m_free_nodes = (size_t *) btAlignedAlloc(sizeof(size_t)*m_max_element_count,16);
+ m_allocated_sizes = (size_t *) btAlignedAlloc(sizeof(size_t)*m_max_element_count,16);
+
+ for (size_t i = 0;i< m_max_element_count;i++ )
+ {
+ m_allocated_sizes[i] = 0;
+ }
+}
+
+void btGenericMemoryPool::end_pool()
+{
+ btAlignedFree(m_pool);
+ btAlignedFree(m_free_nodes);
+ btAlignedFree(m_allocated_sizes);
+ m_allocated_count = 0;
+ m_free_nodes_count = 0;
+}
+
+
+//! Allocates memory in pool
+/*!
+\param size_bytes size in bytes of the buffer
+*/
+void * btGenericMemoryPool::allocate(size_t size_bytes)
+{
+
+ size_t module = size_bytes%m_element_size;
+ size_t element_count = size_bytes/m_element_size;
+ if(module>0) element_count++;
+
+ size_t alloc_pos = allocate_from_free_nodes(element_count);
+ // a free node is found
+ if(alloc_pos != BT_UINT_MAX)
+ {
+ return get_element_data(alloc_pos);
+ }
+ // allocate directly on pool
+ alloc_pos = allocate_from_pool(element_count);
+
+ if(alloc_pos == BT_UINT_MAX) return NULL; // not space
+ return get_element_data(alloc_pos);
+}
+
+bool btGenericMemoryPool::freeMemory(void * pointer)
+{
+ unsigned char * pointer_pos = (unsigned char *)pointer;
+ unsigned char * pool_pos = (unsigned char *)m_pool;
+ // calc offset
+ if(pointer_pos<pool_pos) return false;//other pool
+ size_t offset = size_t(pointer_pos - pool_pos);
+ if(offset>=get_pool_capacity()) return false;// far away
+
+ // find free position
+ m_free_nodes[m_free_nodes_count] = offset/m_element_size;
+ m_free_nodes_count++;
+ return true;
+}
+
+
+/// *******************! btGenericPoolAllocator *******************!///
+
+
+btGenericPoolAllocator::~btGenericPoolAllocator()
+{
+ // destroy pools
+ size_t i;
+ for (i=0;i<m_pool_count;i++)
+ {
+ m_pools[i]->end_pool();
+ btAlignedFree(m_pools[i]);
+ }
+}
+
+
+// creates a pool
+btGenericMemoryPool * btGenericPoolAllocator::push_new_pool()
+{
+ if(m_pool_count >= BT_DEFAULT_MAX_POOLS) return NULL;
+
+ btGenericMemoryPool * newptr = (btGenericMemoryPool *)btAlignedAlloc(sizeof(btGenericMemoryPool),16);
+
+ m_pools[m_pool_count] = newptr;
+
+ m_pools[m_pool_count]->init_pool(m_pool_element_size,m_pool_element_count);
+
+ m_pool_count++;
+ return newptr;
+}
+
+void * btGenericPoolAllocator::failback_alloc(size_t size_bytes)
+{
+
+ btGenericMemoryPool * pool = NULL;
+
+
+ if(size_bytes<=get_pool_capacity())
+ {
+ pool = push_new_pool();
+ }
+
+ if(pool==NULL) // failback
+ {
+ return btAlignedAlloc(size_bytes,16);
+ }
+
+ return pool->allocate(size_bytes);
+}
+
+bool btGenericPoolAllocator::failback_free(void * pointer)
+{
+ btAlignedFree(pointer);
+ return true;
+}
+
+
+//! Allocates memory in pool
+/*!
+\param size_bytes size in bytes of the buffer
+*/
+void * btGenericPoolAllocator::allocate(size_t size_bytes)
+{
+ void * ptr = NULL;
+
+ size_t i = 0;
+ while(i<m_pool_count && ptr == NULL)
+ {
+ ptr = m_pools[i]->allocate(size_bytes);
+ ++i;
+ }
+
+ if(ptr) return ptr;
+
+ return failback_alloc(size_bytes);
+}
+
+bool btGenericPoolAllocator::freeMemory(void * pointer)
+{
+ bool result = false;
+
+ size_t i = 0;
+ while(i<m_pool_count && result == false)
+ {
+ result = m_pools[i]->freeMemory(pointer);
+ ++i;
+ }
+
+ if(result) return true;
+
+ return failback_free(pointer);
+}
+
+/// ************** STANDARD ALLOCATOR ***************************///
+
+
+#define BT_DEFAULT_POOL_SIZE 32768
+#define BT_DEFAULT_POOL_ELEMENT_SIZE 8
+
+// main allocator
+class GIM_STANDARD_ALLOCATOR: public btGenericPoolAllocator
+{
+public:
+ GIM_STANDARD_ALLOCATOR():btGenericPoolAllocator(BT_DEFAULT_POOL_ELEMENT_SIZE,BT_DEFAULT_POOL_SIZE)
+ {
+ }
+};
+
+// global allocator
+GIM_STANDARD_ALLOCATOR g_main_allocator;
+
+
+void * btPoolAlloc(size_t size)
+{
+ return g_main_allocator.allocate(size);
+}
+
+void * btPoolRealloc(void *ptr, size_t oldsize, size_t newsize)
+{
+ void * newptr = btPoolAlloc(newsize);
+ size_t copysize = oldsize<newsize?oldsize:newsize;
+ memcpy(newptr,ptr,copysize);
+ btPoolFree(ptr);
+ return newptr;
+}
+
+void btPoolFree(void *ptr)
+{
+ g_main_allocator.freeMemory(ptr);
+}
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.h b/tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.h
new file mode 100644
index 00000000..b46d8516
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGenericPoolAllocator.h
@@ -0,0 +1,163 @@
+/*! \file btGenericPoolAllocator.h
+\author Francisco Leon Najera. email projectileman@yahoo.com
+
+General purpose allocator class
+*/
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_GENERIC_POOL_ALLOCATOR_H
+#define BT_GENERIC_POOL_ALLOCATOR_H
+
+#include <limits.h>
+#include <stdio.h>
+#include <string.h>
+#include "LinearMath/btAlignedAllocator.h"
+
+#define BT_UINT_MAX UINT_MAX
+#define BT_DEFAULT_MAX_POOLS 16
+
+
+//! Generic Pool class
+class btGenericMemoryPool
+{
+public:
+ unsigned char * m_pool; //[m_element_size*m_max_element_count];
+ size_t * m_free_nodes; //[m_max_element_count];//! free nodes
+ size_t * m_allocated_sizes;//[m_max_element_count];//! Number of elements allocated per node
+ size_t m_allocated_count;
+ size_t m_free_nodes_count;
+protected:
+ size_t m_element_size;
+ size_t m_max_element_count;
+
+ size_t allocate_from_free_nodes(size_t num_elements);
+ size_t allocate_from_pool(size_t num_elements);
+
+public:
+
+ void init_pool(size_t element_size, size_t element_count);
+
+ void end_pool();
+
+
+ btGenericMemoryPool(size_t element_size, size_t element_count)
+ {
+ init_pool(element_size, element_count);
+ }
+
+ ~btGenericMemoryPool()
+ {
+ end_pool();
+ }
+
+
+ inline size_t get_pool_capacity()
+ {
+ return m_element_size*m_max_element_count;
+ }
+
+ inline size_t gem_element_size()
+ {
+ return m_element_size;
+ }
+
+ inline size_t get_max_element_count()
+ {
+ return m_max_element_count;
+ }
+
+ inline size_t get_allocated_count()
+ {
+ return m_allocated_count;
+ }
+
+ inline size_t get_free_positions_count()
+ {
+ return m_free_nodes_count;
+ }
+
+ inline void * get_element_data(size_t element_index)
+ {
+ return &m_pool[element_index*m_element_size];
+ }
+
+ //! Allocates memory in pool
+ /*!
+ \param size_bytes size in bytes of the buffer
+ */
+ void * allocate(size_t size_bytes);
+
+ bool freeMemory(void * pointer);
+};
+
+
+
+
+//! Generic Allocator with pools
+/*!
+General purpose Allocator which can create Memory Pools dynamiacally as needed.
+*/
+class btGenericPoolAllocator
+{
+protected:
+ size_t m_pool_element_size;
+ size_t m_pool_element_count;
+public:
+ btGenericMemoryPool * m_pools[BT_DEFAULT_MAX_POOLS];
+ size_t m_pool_count;
+
+
+ inline size_t get_pool_capacity()
+ {
+ return m_pool_element_size*m_pool_element_count;
+ }
+
+
+protected:
+ // creates a pool
+ btGenericMemoryPool * push_new_pool();
+
+ void * failback_alloc(size_t size_bytes);
+
+ bool failback_free(void * pointer);
+public:
+
+ btGenericPoolAllocator(size_t pool_element_size, size_t pool_element_count)
+ {
+ m_pool_count = 0;
+ m_pool_element_size = pool_element_size;
+ m_pool_element_count = pool_element_count;
+ }
+
+ virtual ~btGenericPoolAllocator();
+
+ //! Allocates memory in pool
+ /*!
+ \param size_bytes size in bytes of the buffer
+ */
+ void * allocate(size_t size_bytes);
+
+ bool freeMemory(void * pointer);
+};
+
+
+
+void * btPoolAlloc(size_t size);
+void * btPoolRealloc(void *ptr, size_t oldsize, size_t newsize);
+void btPoolFree(void *ptr);
+
+
+#endif
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btGeometryOperations.h b/tests/bullet/src/BulletCollision/Gimpact/btGeometryOperations.h
new file mode 100644
index 00000000..60f06510
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btGeometryOperations.h
@@ -0,0 +1,212 @@
+#ifndef BT_BASIC_GEOMETRY_OPERATIONS_H_INCLUDED
+#define BT_BASIC_GEOMETRY_OPERATIONS_H_INCLUDED
+
+/*! \file btGeometryOperations.h
+*\author Francisco Leon Najera
+
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btBoxCollision.h"
+
+
+
+
+
+#define PLANEDIREPSILON 0.0000001f
+#define PARALELENORMALS 0.000001f
+
+
+#define BT_CLAMP(number,minval,maxval) (number<minval?minval:(number>maxval?maxval:number))
+
+/// Calc a plane from a triangle edge an a normal. plane is a vec4f
+SIMD_FORCE_INLINE void bt_edge_plane(const btVector3 & e1,const btVector3 & e2, const btVector3 & normal,btVector4 & plane)
+{
+ btVector3 planenormal = (e2-e1).cross(normal);
+ planenormal.normalize();
+ plane.setValue(planenormal[0],planenormal[1],planenormal[2],e2.dot(planenormal));
+}
+
+
+
+//***************** SEGMENT and LINE FUNCTIONS **********************************///
+
+/*! Finds the closest point(cp) to (v) on a segment (e1,e2)
+ */
+SIMD_FORCE_INLINE void bt_closest_point_on_segment(
+ btVector3 & cp, const btVector3 & v,
+ const btVector3 &e1,const btVector3 &e2)
+{
+ btVector3 n = e2-e1;
+ cp = v - e1;
+ btScalar _scalar = cp.dot(n)/n.dot(n);
+ if(_scalar <0.0f)
+ {
+ cp = e1;
+ }
+ else if(_scalar >1.0f)
+ {
+ cp = e2;
+ }
+ else
+ {
+ cp = _scalar*n + e1;
+ }
+}
+
+
+//! line plane collision
+/*!
+*\return
+ -0 if the ray never intersects
+ -1 if the ray collides in front
+ -2 if the ray collides in back
+*/
+
+SIMD_FORCE_INLINE int bt_line_plane_collision(
+ const btVector4 & plane,
+ const btVector3 & vDir,
+ const btVector3 & vPoint,
+ btVector3 & pout,
+ btScalar &tparam,
+ btScalar tmin, btScalar tmax)
+{
+
+ btScalar _dotdir = vDir.dot(plane);
+
+ if(btFabs(_dotdir)<PLANEDIREPSILON)
+ {
+ tparam = tmax;
+ return 0;
+ }
+
+ btScalar _dis = bt_distance_point_plane(plane,vPoint);
+ char returnvalue = _dis<0.0f? 2:1;
+ tparam = -_dis/_dotdir;
+
+ if(tparam<tmin)
+ {
+ returnvalue = 0;
+ tparam = tmin;
+ }
+ else if(tparam>tmax)
+ {
+ returnvalue = 0;
+ tparam = tmax;
+ }
+ pout = tparam*vDir + vPoint;
+ return returnvalue;
+}
+
+
+//! Find closest points on segments
+SIMD_FORCE_INLINE void bt_segment_collision(
+ const btVector3 & vA1,
+ const btVector3 & vA2,
+ const btVector3 & vB1,
+ const btVector3 & vB2,
+ btVector3 & vPointA,
+ btVector3 & vPointB)
+{
+ btVector3 AD = vA2 - vA1;
+ btVector3 BD = vB2 - vB1;
+ btVector3 N = AD.cross(BD);
+ btScalar tp = N.length2();
+
+ btVector4 _M;//plane
+
+ if(tp<SIMD_EPSILON)//ARE PARALELE
+ {
+ //project B over A
+ bool invert_b_order = false;
+ _M[0] = vB1.dot(AD);
+ _M[1] = vB2.dot(AD);
+
+ if(_M[0]>_M[1])
+ {
+ invert_b_order = true;
+ BT_SWAP_NUMBERS(_M[0],_M[1]);
+ }
+ _M[2] = vA1.dot(AD);
+ _M[3] = vA2.dot(AD);
+ //mid points
+ N[0] = (_M[0]+_M[1])*0.5f;
+ N[1] = (_M[2]+_M[3])*0.5f;
+
+ if(N[0]<N[1])
+ {
+ if(_M[1]<_M[2])
+ {
+ vPointB = invert_b_order?vB1:vB2;
+ vPointA = vA1;
+ }
+ else if(_M[1]<_M[3])
+ {
+ vPointB = invert_b_order?vB1:vB2;
+ bt_closest_point_on_segment(vPointA,vPointB,vA1,vA2);
+ }
+ else
+ {
+ vPointA = vA2;
+ bt_closest_point_on_segment(vPointB,vPointA,vB1,vB2);
+ }
+ }
+ else
+ {
+ if(_M[3]<_M[0])
+ {
+ vPointB = invert_b_order?vB2:vB1;
+ vPointA = vA2;
+ }
+ else if(_M[3]<_M[1])
+ {
+ vPointA = vA2;
+ bt_closest_point_on_segment(vPointB,vPointA,vB1,vB2);
+ }
+ else
+ {
+ vPointB = invert_b_order?vB1:vB2;
+ bt_closest_point_on_segment(vPointA,vPointB,vA1,vA2);
+ }
+ }
+ return;
+ }
+
+ N = N.cross(BD);
+ _M.setValue(N[0],N[1],N[2],vB1.dot(N));
+
+ // get point A as the plane collision point
+ bt_line_plane_collision(_M,AD,vA1,vPointA,tp,btScalar(0), btScalar(1));
+
+ /*Closest point on segment*/
+ vPointB = vPointA - vB1;
+ tp = vPointB.dot(BD);
+ tp/= BD.dot(BD);
+ tp = BT_CLAMP(tp,0.0f,1.0f);
+
+ vPointB = tp*BD + vB1;
+}
+
+
+
+
+
+#endif // GIM_VECTOR_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btQuantization.h b/tests/bullet/src/BulletCollision/Gimpact/btQuantization.h
new file mode 100644
index 00000000..bd2633cf
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btQuantization.h
@@ -0,0 +1,88 @@
+#ifndef BT_GIMPACT_QUANTIZATION_H_INCLUDED
+#define BT_GIMPACT_QUANTIZATION_H_INCLUDED
+
+/*! \file btQuantization.h
+*\author Francisco Leon Najera
+
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "LinearMath/btTransform.h"
+
+
+
+
+
+
+SIMD_FORCE_INLINE void bt_calc_quantization_parameters(
+ btVector3 & outMinBound,
+ btVector3 & outMaxBound,
+ btVector3 & bvhQuantization,
+ const btVector3& srcMinBound,const btVector3& srcMaxBound,
+ btScalar quantizationMargin)
+{
+ //enlarge the AABB to avoid division by zero when initializing the quantization values
+ btVector3 clampValue(quantizationMargin,quantizationMargin,quantizationMargin);
+ outMinBound = srcMinBound - clampValue;
+ outMaxBound = srcMaxBound + clampValue;
+ btVector3 aabbSize = outMaxBound - outMinBound;
+ bvhQuantization = btVector3(btScalar(65535.0),
+ btScalar(65535.0),
+ btScalar(65535.0)) / aabbSize;
+}
+
+
+SIMD_FORCE_INLINE void bt_quantize_clamp(
+ unsigned short* out,
+ const btVector3& point,
+ const btVector3 & min_bound,
+ const btVector3 & max_bound,
+ const btVector3 & bvhQuantization)
+{
+
+ btVector3 clampedPoint(point);
+ clampedPoint.setMax(min_bound);
+ clampedPoint.setMin(max_bound);
+
+ btVector3 v = (clampedPoint - min_bound) * bvhQuantization;
+ out[0] = (unsigned short)(v.getX()+0.5f);
+ out[1] = (unsigned short)(v.getY()+0.5f);
+ out[2] = (unsigned short)(v.getZ()+0.5f);
+}
+
+
+SIMD_FORCE_INLINE btVector3 bt_unquantize(
+ const unsigned short* vecIn,
+ const btVector3 & offset,
+ const btVector3 & bvhQuantization)
+{
+ btVector3 vecOut;
+ vecOut.setValue(
+ (btScalar)(vecIn[0]) / (bvhQuantization.getX()),
+ (btScalar)(vecIn[1]) / (bvhQuantization.getY()),
+ (btScalar)(vecIn[2]) / (bvhQuantization.getZ()));
+ vecOut += offset;
+ return vecOut;
+}
+
+
+
+#endif // BT_GIMPACT_QUANTIZATION_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp b/tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp
new file mode 100644
index 00000000..ca76cc54
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.cpp
@@ -0,0 +1,218 @@
+/*! \file btGImpactTriangleShape.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btTriangleShapeEx.h"
+
+
+
+void GIM_TRIANGLE_CONTACT::merge_points(const btVector4 & plane,
+ btScalar margin, const btVector3 * points, int point_count)
+{
+ m_point_count = 0;
+ m_penetration_depth= -1000.0f;
+
+ int point_indices[MAX_TRI_CLIPPING];
+
+ int _k;
+
+ for ( _k=0;_k<point_count;_k++)
+ {
+ btScalar _dist = - bt_distance_point_plane(plane,points[_k]) + margin;
+
+ if (_dist>=0.0f)
+ {
+ if (_dist>m_penetration_depth)
+ {
+ m_penetration_depth = _dist;
+ point_indices[0] = _k;
+ m_point_count=1;
+ }
+ else if ((_dist+SIMD_EPSILON)>=m_penetration_depth)
+ {
+ point_indices[m_point_count] = _k;
+ m_point_count++;
+ }
+ }
+ }
+
+ for ( _k=0;_k<m_point_count;_k++)
+ {
+ m_points[_k] = points[point_indices[_k]];
+ }
+}
+
+///class btPrimitiveTriangle
+bool btPrimitiveTriangle::overlap_test_conservative(const btPrimitiveTriangle& other)
+{
+ btScalar total_margin = m_margin + other.m_margin;
+ // classify points on other triangle
+ btScalar dis0 = bt_distance_point_plane(m_plane,other.m_vertices[0]) - total_margin;
+
+ btScalar dis1 = bt_distance_point_plane(m_plane,other.m_vertices[1]) - total_margin;
+
+ btScalar dis2 = bt_distance_point_plane(m_plane,other.m_vertices[2]) - total_margin;
+
+ if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f) return false;
+
+ // classify points on this triangle
+ dis0 = bt_distance_point_plane(other.m_plane,m_vertices[0]) - total_margin;
+
+ dis1 = bt_distance_point_plane(other.m_plane,m_vertices[1]) - total_margin;
+
+ dis2 = bt_distance_point_plane(other.m_plane,m_vertices[2]) - total_margin;
+
+ if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f) return false;
+
+ return true;
+}
+
+int btPrimitiveTriangle::clip_triangle(btPrimitiveTriangle & other, btVector3 * clipped_points )
+{
+ // edge 0
+
+ btVector3 temp_points[MAX_TRI_CLIPPING];
+
+
+ btVector4 edgeplane;
+
+ get_edge_plane(0,edgeplane);
+
+
+ int clipped_count = bt_plane_clip_triangle(
+ edgeplane,other.m_vertices[0],other.m_vertices[1],other.m_vertices[2],temp_points);
+
+ if (clipped_count == 0) return 0;
+
+ btVector3 temp_points1[MAX_TRI_CLIPPING];
+
+
+ // edge 1
+ get_edge_plane(1,edgeplane);
+
+
+ clipped_count = bt_plane_clip_polygon(edgeplane,temp_points,clipped_count,temp_points1);
+
+ if (clipped_count == 0) return 0;
+
+ // edge 2
+ get_edge_plane(2,edgeplane);
+
+ clipped_count = bt_plane_clip_polygon(
+ edgeplane,temp_points1,clipped_count,clipped_points);
+
+ return clipped_count;
+}
+
+bool btPrimitiveTriangle::find_triangle_collision_clip_method(btPrimitiveTriangle & other, GIM_TRIANGLE_CONTACT & contacts)
+{
+ btScalar margin = m_margin + other.m_margin;
+
+ btVector3 clipped_points[MAX_TRI_CLIPPING];
+ int clipped_count;
+ //create planes
+ // plane v vs U points
+
+ GIM_TRIANGLE_CONTACT contacts1;
+
+ contacts1.m_separating_normal = m_plane;
+
+
+ clipped_count = clip_triangle(other,clipped_points);
+
+ if (clipped_count == 0 )
+ {
+ return false;//Reject
+ }
+
+ //find most deep interval face1
+ contacts1.merge_points(contacts1.m_separating_normal,margin,clipped_points,clipped_count);
+ if (contacts1.m_point_count == 0) return false; // too far
+ //Normal pointing to this triangle
+ contacts1.m_separating_normal *= -1.f;
+
+
+ //Clip tri1 by tri2 edges
+ GIM_TRIANGLE_CONTACT contacts2;
+ contacts2.m_separating_normal = other.m_plane;
+
+ clipped_count = other.clip_triangle(*this,clipped_points);
+
+ if (clipped_count == 0 )
+ {
+ return false;//Reject
+ }
+
+ //find most deep interval face1
+ contacts2.merge_points(contacts2.m_separating_normal,margin,clipped_points,clipped_count);
+ if (contacts2.m_point_count == 0) return false; // too far
+
+
+
+
+ ////check most dir for contacts
+ if (contacts2.m_penetration_depth<contacts1.m_penetration_depth)
+ {
+ contacts.copy_from(contacts2);
+ }
+ else
+ {
+ contacts.copy_from(contacts1);
+ }
+ return true;
+}
+
+
+
+///class btTriangleShapeEx: public btTriangleShape
+
+bool btTriangleShapeEx::overlap_test_conservative(const btTriangleShapeEx& other)
+{
+ btScalar total_margin = getMargin() + other.getMargin();
+
+ btVector4 plane0;
+ buildTriPlane(plane0);
+ btVector4 plane1;
+ other.buildTriPlane(plane1);
+
+ // classify points on other triangle
+ btScalar dis0 = bt_distance_point_plane(plane0,other.m_vertices1[0]) - total_margin;
+
+ btScalar dis1 = bt_distance_point_plane(plane0,other.m_vertices1[1]) - total_margin;
+
+ btScalar dis2 = bt_distance_point_plane(plane0,other.m_vertices1[2]) - total_margin;
+
+ if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f) return false;
+
+ // classify points on this triangle
+ dis0 = bt_distance_point_plane(plane1,m_vertices1[0]) - total_margin;
+
+ dis1 = bt_distance_point_plane(plane1,m_vertices1[1]) - total_margin;
+
+ dis2 = bt_distance_point_plane(plane1,m_vertices1[2]) - total_margin;
+
+ if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f) return false;
+
+ return true;
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.h b/tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.h
new file mode 100644
index 00000000..973c2ed1
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/btTriangleShapeEx.h
@@ -0,0 +1,180 @@
+/*! \file btGImpactShape.h
+\author Francisco Leon Najera
+*/
+/*
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2007 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef GIMPACT_TRIANGLE_SHAPE_EX_H
+#define GIMPACT_TRIANGLE_SHAPE_EX_H
+
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "btBoxCollision.h"
+#include "btClipPolygon.h"
+#include "btGeometryOperations.h"
+
+
+#define MAX_TRI_CLIPPING 16
+
+//! Structure for collision
+struct GIM_TRIANGLE_CONTACT
+{
+ btScalar m_penetration_depth;
+ int m_point_count;
+ btVector4 m_separating_normal;
+ btVector3 m_points[MAX_TRI_CLIPPING];
+
+ SIMD_FORCE_INLINE void copy_from(const GIM_TRIANGLE_CONTACT& other)
+ {
+ m_penetration_depth = other.m_penetration_depth;
+ m_separating_normal = other.m_separating_normal;
+ m_point_count = other.m_point_count;
+ int i = m_point_count;
+ while(i--)
+ {
+ m_points[i] = other.m_points[i];
+ }
+ }
+
+ GIM_TRIANGLE_CONTACT()
+ {
+ }
+
+ GIM_TRIANGLE_CONTACT(const GIM_TRIANGLE_CONTACT& other)
+ {
+ copy_from(other);
+ }
+
+ //! classify points that are closer
+ void merge_points(const btVector4 & plane,
+ btScalar margin, const btVector3 * points, int point_count);
+
+};
+
+
+
+class btPrimitiveTriangle
+{
+public:
+ btVector3 m_vertices[3];
+ btVector4 m_plane;
+ btScalar m_margin;
+ btScalar m_dummy;
+ btPrimitiveTriangle():m_margin(0.01f)
+ {
+
+ }
+
+
+ SIMD_FORCE_INLINE void buildTriPlane()
+ {
+ btVector3 normal = (m_vertices[1]-m_vertices[0]).cross(m_vertices[2]-m_vertices[0]);
+ normal.normalize();
+ m_plane.setValue(normal[0],normal[1],normal[2],m_vertices[0].dot(normal));
+ }
+
+ //! Test if triangles could collide
+ bool overlap_test_conservative(const btPrimitiveTriangle& other);
+
+ //! Calcs the plane which is paralele to the edge and perpendicular to the triangle plane
+ /*!
+ \pre this triangle must have its plane calculated.
+ */
+ SIMD_FORCE_INLINE void get_edge_plane(int edge_index, btVector4 &plane) const
+ {
+ const btVector3 & e0 = m_vertices[edge_index];
+ const btVector3 & e1 = m_vertices[(edge_index+1)%3];
+ bt_edge_plane(e0,e1,m_plane,plane);
+ }
+
+ void applyTransform(const btTransform& t)
+ {
+ m_vertices[0] = t(m_vertices[0]);
+ m_vertices[1] = t(m_vertices[1]);
+ m_vertices[2] = t(m_vertices[2]);
+ }
+
+ //! Clips the triangle against this
+ /*!
+ \pre clipped_points must have MAX_TRI_CLIPPING size, and this triangle must have its plane calculated.
+ \return the number of clipped points
+ */
+ int clip_triangle(btPrimitiveTriangle & other, btVector3 * clipped_points );
+
+ //! Find collision using the clipping method
+ /*!
+ \pre this triangle and other must have their triangles calculated
+ */
+ bool find_triangle_collision_clip_method(btPrimitiveTriangle & other, GIM_TRIANGLE_CONTACT & contacts);
+};
+
+
+
+//! Helper class for colliding Bullet Triangle Shapes
+/*!
+This class implements a better getAabb method than the previous btTriangleShape class
+*/
+class btTriangleShapeEx: public btTriangleShape
+{
+public:
+
+ btTriangleShapeEx():btTriangleShape(btVector3(0,0,0),btVector3(0,0,0),btVector3(0,0,0))
+ {
+ }
+
+ btTriangleShapeEx(const btVector3& p0,const btVector3& p1,const btVector3& p2): btTriangleShape(p0,p1,p2)
+ {
+ }
+
+ btTriangleShapeEx(const btTriangleShapeEx & other): btTriangleShape(other.m_vertices1[0],other.m_vertices1[1],other.m_vertices1[2])
+ {
+ }
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax)const
+ {
+ btVector3 tv0 = t(m_vertices1[0]);
+ btVector3 tv1 = t(m_vertices1[1]);
+ btVector3 tv2 = t(m_vertices1[2]);
+
+ btAABB trianglebox(tv0,tv1,tv2,m_collisionMargin);
+ aabbMin = trianglebox.m_min;
+ aabbMax = trianglebox.m_max;
+ }
+
+ void applyTransform(const btTransform& t)
+ {
+ m_vertices1[0] = t(m_vertices1[0]);
+ m_vertices1[1] = t(m_vertices1[1]);
+ m_vertices1[2] = t(m_vertices1[2]);
+ }
+
+ SIMD_FORCE_INLINE void buildTriPlane(btVector4 & plane) const
+ {
+ btVector3 normal = (m_vertices1[1]-m_vertices1[0]).cross(m_vertices1[2]-m_vertices1[0]);
+ normal.normalize();
+ plane.setValue(normal[0],normal[1],normal[2],m_vertices1[0].dot(normal));
+ }
+
+ bool overlap_test_conservative(const btTriangleShapeEx& other);
+};
+
+
+#endif //GIMPACT_TRIANGLE_MESH_SHAPE_H
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_array.h b/tests/bullet/src/BulletCollision/Gimpact/gim_array.h
new file mode 100644
index 00000000..cfd5da8f
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_array.h
@@ -0,0 +1,326 @@
+#ifndef GIM_ARRAY_H_INCLUDED
+#define GIM_ARRAY_H_INCLUDED
+/*! \file gim_array.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "gim_memory.h"
+
+
+#define GIM_ARRAY_GROW_INCREMENT 2
+#define GIM_ARRAY_GROW_FACTOR 2
+
+//! Very simple array container with fast access and simd memory
+template<typename T>
+class gim_array
+{
+public:
+//! properties
+//!@{
+ T *m_data;
+ GUINT m_size;
+ GUINT m_allocated_size;
+//!@}
+//! protected operations
+//!@{
+
+ inline void destroyData()
+ {
+ m_allocated_size = 0;
+ if(m_data==NULL) return;
+ gim_free(m_data);
+ m_data = NULL;
+ }
+
+ inline bool resizeData(GUINT newsize)
+ {
+ if(newsize==0)
+ {
+ destroyData();
+ return true;
+ }
+
+ if(m_size>0)
+ {
+ m_data = (T*)gim_realloc(m_data,m_size*sizeof(T),newsize*sizeof(T));
+ }
+ else
+ {
+ m_data = (T*)gim_alloc(newsize*sizeof(T));
+ }
+ m_allocated_size = newsize;
+ return true;
+ }
+
+ inline bool growingCheck()
+ {
+ if(m_allocated_size<=m_size)
+ {
+ GUINT requestsize = m_size;
+ m_size = m_allocated_size;
+ if(resizeData((requestsize+GIM_ARRAY_GROW_INCREMENT)*GIM_ARRAY_GROW_FACTOR)==false) return false;
+ }
+ return true;
+ }
+
+//!@}
+//! public operations
+//!@{
+ inline bool reserve(GUINT size)
+ {
+ if(m_allocated_size>=size) return false;
+ return resizeData(size);
+ }
+
+ inline void clear_range(GUINT start_range)
+ {
+ while(m_size>start_range)
+ {
+ m_data[--m_size].~T();
+ }
+ }
+
+ inline void clear()
+ {
+ if(m_size==0)return;
+ clear_range(0);
+ }
+
+ inline void clear_memory()
+ {
+ clear();
+ destroyData();
+ }
+
+ gim_array()
+ {
+ m_data = 0;
+ m_size = 0;
+ m_allocated_size = 0;
+ }
+
+ gim_array(GUINT reservesize)
+ {
+ m_data = 0;
+ m_size = 0;
+
+ m_allocated_size = 0;
+ reserve(reservesize);
+ }
+
+ ~gim_array()
+ {
+ clear_memory();
+ }
+
+ inline GUINT size() const
+ {
+ return m_size;
+ }
+
+ inline GUINT max_size() const
+ {
+ return m_allocated_size;
+ }
+
+ inline T & operator[](size_t i)
+ {
+ return m_data[i];
+ }
+ inline const T & operator[](size_t i) const
+ {
+ return m_data[i];
+ }
+
+ inline T * pointer(){ return m_data;}
+ inline const T * pointer() const
+ { return m_data;}
+
+
+ inline T * get_pointer_at(GUINT i)
+ {
+ return m_data + i;
+ }
+
+ inline const T * get_pointer_at(GUINT i) const
+ {
+ return m_data + i;
+ }
+
+ inline T & at(GUINT i)
+ {
+ return m_data[i];
+ }
+
+ inline const T & at(GUINT i) const
+ {
+ return m_data[i];
+ }
+
+ inline T & front()
+ {
+ return *m_data;
+ }
+
+ inline const T & front() const
+ {
+ return *m_data;
+ }
+
+ inline T & back()
+ {
+ return m_data[m_size-1];
+ }
+
+ inline const T & back() const
+ {
+ return m_data[m_size-1];
+ }
+
+
+ inline void swap(GUINT i, GUINT j)
+ {
+ gim_swap_elements(m_data,i,j);
+ }
+
+ inline void push_back(const T & obj)
+ {
+ this->growingCheck();
+ m_data[m_size] = obj;
+ m_size++;
+ }
+
+ //!Simply increase the m_size, doesn't call the new element constructor
+ inline void push_back_mem()
+ {
+ this->growingCheck();
+ m_size++;
+ }
+
+ inline void push_back_memcpy(const T & obj)
+ {
+ this->growingCheck();
+ irr_simd_memcpy(&m_data[m_size],&obj,sizeof(T));
+ m_size++;
+ }
+
+ inline void pop_back()
+ {
+ m_size--;
+ m_data[m_size].~T();
+ }
+
+ //!Simply decrease the m_size, doesn't call the deleted element destructor
+ inline void pop_back_mem()
+ {
+ m_size--;
+ }
+
+ //! fast erase
+ inline void erase(GUINT index)
+ {
+ if(index<m_size-1)
+ {
+ swap(index,m_size-1);
+ }
+ pop_back();
+ }
+
+ inline void erase_sorted_mem(GUINT index)
+ {
+ m_size--;
+ for(GUINT i = index;i<m_size;i++)
+ {
+ gim_simd_memcpy(m_data+i,m_data+i+1,sizeof(T));
+ }
+ }
+
+ inline void erase_sorted(GUINT index)
+ {
+ m_data[index].~T();
+ erase_sorted_mem(index);
+ }
+
+ inline void insert_mem(GUINT index)
+ {
+ this->growingCheck();
+ for(GUINT i = m_size;i>index;i--)
+ {
+ gim_simd_memcpy(m_data+i,m_data+i-1,sizeof(T));
+ }
+ m_size++;
+ }
+
+ inline void insert(const T & obj,GUINT index)
+ {
+ insert_mem(index);
+ m_data[index] = obj;
+ }
+
+ inline void resize(GUINT size, bool call_constructor = true)
+ {
+
+ if(size>m_size)
+ {
+ reserve(size);
+ if(call_constructor)
+ {
+ T obj;
+ while(m_size<size)
+ {
+ m_data[m_size] = obj;
+ m_size++;
+ }
+ }
+ else
+ {
+ m_size = size;
+ }
+ }
+ else if(size<m_size)
+ {
+ if(call_constructor) clear_range(size);
+ m_size = size;
+ }
+ }
+
+ inline void refit()
+ {
+ resizeData(m_size);
+ }
+
+};
+
+
+
+
+
+#endif // GIM_CONTAINERS_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h b/tests/bullet/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h
new file mode 100644
index 00000000..91527740
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_basic_geometry_operations.h
@@ -0,0 +1,543 @@
+#ifndef GIM_BASIC_GEOMETRY_OPERATIONS_H_INCLUDED
+#define GIM_BASIC_GEOMETRY_OPERATIONS_H_INCLUDED
+
+/*! \file gim_basic_geometry_operations.h
+*\author Francisco Leon Najera
+type independant geometry routines
+
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+#include "gim_linear_math.h"
+
+
+
+
+
+#define PLANEDIREPSILON 0.0000001f
+#define PARALELENORMALS 0.000001f
+
+
+#define TRIANGLE_NORMAL(v1,v2,v3,n)\
+{\
+ vec3f _dif1,_dif2;\
+ VEC_DIFF(_dif1,v2,v1);\
+ VEC_DIFF(_dif2,v3,v1);\
+ VEC_CROSS(n,_dif1,_dif2);\
+ VEC_NORMALIZE(n);\
+}\
+
+#define TRIANGLE_NORMAL_FAST(v1,v2,v3,n){\
+ vec3f _dif1,_dif2; \
+ VEC_DIFF(_dif1,v2,v1); \
+ VEC_DIFF(_dif2,v3,v1); \
+ VEC_CROSS(n,_dif1,_dif2); \
+}\
+
+/// plane is a vec4f
+#define TRIANGLE_PLANE(v1,v2,v3,plane) {\
+ TRIANGLE_NORMAL(v1,v2,v3,plane);\
+ plane[3] = VEC_DOT(v1,plane);\
+}\
+
+/// plane is a vec4f
+#define TRIANGLE_PLANE_FAST(v1,v2,v3,plane) {\
+ TRIANGLE_NORMAL_FAST(v1,v2,v3,plane);\
+ plane[3] = VEC_DOT(v1,plane);\
+}\
+
+/// Calc a plane from an edge an a normal. plane is a vec4f
+#define EDGE_PLANE(e1,e2,n,plane) {\
+ vec3f _dif; \
+ VEC_DIFF(_dif,e2,e1); \
+ VEC_CROSS(plane,_dif,n); \
+ VEC_NORMALIZE(plane); \
+ plane[3] = VEC_DOT(e1,plane);\
+}\
+
+#define DISTANCE_PLANE_POINT(plane,point) (VEC_DOT(plane,point) - plane[3])
+
+#define PROJECT_POINT_PLANE(point,plane,projected) {\
+ GREAL _dis;\
+ _dis = DISTANCE_PLANE_POINT(plane,point);\
+ VEC_SCALE(projected,-_dis,plane);\
+ VEC_SUM(projected,projected,point); \
+}\
+
+//! Verifies if a point is in the plane hull
+template<typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE bool POINT_IN_HULL(
+ const CLASS_POINT& point,const CLASS_PLANE * planes,GUINT plane_count)
+{
+ GREAL _dis;
+ for (GUINT _i = 0;_i< plane_count;++_i)
+ {
+ _dis = DISTANCE_PLANE_POINT(planes[_i],point);
+ if(_dis>0.0f) return false;
+ }
+ return true;
+}
+
+template<typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE void PLANE_CLIP_SEGMENT(
+ const CLASS_POINT& s1,
+ const CLASS_POINT &s2,const CLASS_PLANE &plane,CLASS_POINT &clipped)
+{
+ GREAL _dis1,_dis2;
+ _dis1 = DISTANCE_PLANE_POINT(plane,s1);
+ VEC_DIFF(clipped,s2,s1);
+ _dis2 = VEC_DOT(clipped,plane);
+ VEC_SCALE(clipped,-_dis1/_dis2,clipped);
+ VEC_SUM(clipped,clipped,s1);
+}
+
+enum ePLANE_INTERSECTION_TYPE
+{
+ G_BACK_PLANE = 0,
+ G_COLLIDE_PLANE,
+ G_FRONT_PLANE
+};
+
+enum eLINE_PLANE_INTERSECTION_TYPE
+{
+ G_FRONT_PLANE_S1 = 0,
+ G_FRONT_PLANE_S2,
+ G_BACK_PLANE_S1,
+ G_BACK_PLANE_S2,
+ G_COLLIDE_PLANE_S1,
+ G_COLLIDE_PLANE_S2
+};
+
+//! Confirms if the plane intersect the edge or nor
+/*!
+intersection type must have the following values
+<ul>
+<li> 0 : Segment in front of plane, s1 closest
+<li> 1 : Segment in front of plane, s2 closest
+<li> 2 : Segment in back of plane, s1 closest
+<li> 3 : Segment in back of plane, s2 closest
+<li> 4 : Segment collides plane, s1 in back
+<li> 5 : Segment collides plane, s2 in back
+</ul>
+*/
+
+template<typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT2(
+ const CLASS_POINT& s1,
+ const CLASS_POINT &s2,
+ const CLASS_PLANE &plane,CLASS_POINT &clipped)
+{
+ GREAL _dis1 = DISTANCE_PLANE_POINT(plane,s1);
+ GREAL _dis2 = DISTANCE_PLANE_POINT(plane,s2);
+ if(_dis1 >-G_EPSILON && _dis2 >-G_EPSILON)
+ {
+ if(_dis1<_dis2) return G_FRONT_PLANE_S1;
+ return G_FRONT_PLANE_S2;
+ }
+ else if(_dis1 <G_EPSILON && _dis2 <G_EPSILON)
+ {
+ if(_dis1>_dis2) return G_BACK_PLANE_S1;
+ return G_BACK_PLANE_S2;
+ }
+
+ VEC_DIFF(clipped,s2,s1);
+ _dis2 = VEC_DOT(clipped,plane);
+ VEC_SCALE(clipped,-_dis1/_dis2,clipped);
+ VEC_SUM(clipped,clipped,s1);
+ if(_dis1<_dis2) return G_COLLIDE_PLANE_S1;
+ return G_COLLIDE_PLANE_S2;
+}
+
+//! Confirms if the plane intersect the edge or not
+/*!
+clipped1 and clipped2 are the vertices behind the plane.
+clipped1 is the closest
+
+intersection_type must have the following values
+<ul>
+<li> 0 : Segment in front of plane, s1 closest
+<li> 1 : Segment in front of plane, s2 closest
+<li> 2 : Segment in back of plane, s1 closest
+<li> 3 : Segment in back of plane, s2 closest
+<li> 4 : Segment collides plane, s1 in back
+<li> 5 : Segment collides plane, s2 in back
+</ul>
+*/
+template<typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE eLINE_PLANE_INTERSECTION_TYPE PLANE_CLIP_SEGMENT_CLOSEST(
+ const CLASS_POINT& s1,
+ const CLASS_POINT &s2,
+ const CLASS_PLANE &plane,
+ CLASS_POINT &clipped1,CLASS_POINT &clipped2)
+{
+ eLINE_PLANE_INTERSECTION_TYPE intersection_type = PLANE_CLIP_SEGMENT2(s1,s2,plane,clipped1);
+ switch(intersection_type)
+ {
+ case G_FRONT_PLANE_S1:
+ VEC_COPY(clipped1,s1);
+ VEC_COPY(clipped2,s2);
+ break;
+ case G_FRONT_PLANE_S2:
+ VEC_COPY(clipped1,s2);
+ VEC_COPY(clipped2,s1);
+ break;
+ case G_BACK_PLANE_S1:
+ VEC_COPY(clipped1,s1);
+ VEC_COPY(clipped2,s2);
+ break;
+ case G_BACK_PLANE_S2:
+ VEC_COPY(clipped1,s2);
+ VEC_COPY(clipped2,s1);
+ break;
+ case G_COLLIDE_PLANE_S1:
+ VEC_COPY(clipped2,s1);
+ break;
+ case G_COLLIDE_PLANE_S2:
+ VEC_COPY(clipped2,s2);
+ break;
+ }
+ return intersection_type;
+}
+
+
+//! Finds the 2 smallest cartesian coordinates of a plane normal
+#define PLANE_MINOR_AXES(plane, i0, i1) VEC_MINOR_AXES(plane, i0, i1)
+
+//! Ray plane collision in one way
+/*!
+Intersects plane in one way only. The ray must face the plane (normals must be in opossite directions).<br/>
+It uses the PLANEDIREPSILON constant.
+*/
+template<typename T,typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE bool RAY_PLANE_COLLISION(
+ const CLASS_PLANE & plane,
+ const CLASS_POINT & vDir,
+ const CLASS_POINT & vPoint,
+ CLASS_POINT & pout,T &tparam)
+{
+ GREAL _dis,_dotdir;
+ _dotdir = VEC_DOT(plane,vDir);
+ if(_dotdir<PLANEDIREPSILON)
+ {
+ return false;
+ }
+ _dis = DISTANCE_PLANE_POINT(plane,vPoint);
+ tparam = -_dis/_dotdir;
+ VEC_SCALE(pout,tparam,vDir);
+ VEC_SUM(pout,vPoint,pout);
+ return true;
+}
+
+//! line collision
+/*!
+*\return
+ -0 if the ray never intersects
+ -1 if the ray collides in front
+ -2 if the ray collides in back
+*/
+template<typename T,typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE GUINT LINE_PLANE_COLLISION(
+ const CLASS_PLANE & plane,
+ const CLASS_POINT & vDir,
+ const CLASS_POINT & vPoint,
+ CLASS_POINT & pout,
+ T &tparam,
+ T tmin, T tmax)
+{
+ GREAL _dis,_dotdir;
+ _dotdir = VEC_DOT(plane,vDir);
+ if(btFabs(_dotdir)<PLANEDIREPSILON)
+ {
+ tparam = tmax;
+ return 0;
+ }
+ _dis = DISTANCE_PLANE_POINT(plane,vPoint);
+ char returnvalue = _dis<0.0f?2:1;
+ tparam = -_dis/_dotdir;
+
+ if(tparam<tmin)
+ {
+ returnvalue = 0;
+ tparam = tmin;
+ }
+ else if(tparam>tmax)
+ {
+ returnvalue = 0;
+ tparam = tmax;
+ }
+
+ VEC_SCALE(pout,tparam,vDir);
+ VEC_SUM(pout,vPoint,pout);
+ return returnvalue;
+}
+
+/*! \brief Returns the Ray on which 2 planes intersect if they do.
+ Written by Rodrigo Hernandez on ODE convex collision
+
+ \param p1 Plane 1
+ \param p2 Plane 2
+ \param p Contains the origin of the ray upon returning if planes intersect
+ \param d Contains the direction of the ray upon returning if planes intersect
+ \return true if the planes intersect, 0 if paralell.
+
+*/
+template<typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE bool INTERSECT_PLANES(
+ const CLASS_PLANE &p1,
+ const CLASS_PLANE &p2,
+ CLASS_POINT &p,
+ CLASS_POINT &d)
+{
+ VEC_CROSS(d,p1,p2);
+ GREAL denom = VEC_DOT(d, d);
+ if(GIM_IS_ZERO(denom)) return false;
+ vec3f _n;
+ _n[0]=p1[3]*p2[0] - p2[3]*p1[0];
+ _n[1]=p1[3]*p2[1] - p2[3]*p1[1];
+ _n[2]=p1[3]*p2[2] - p2[3]*p1[2];
+ VEC_CROSS(p,_n,d);
+ p[0]/=denom;
+ p[1]/=denom;
+ p[2]/=denom;
+ return true;
+}
+
+//***************** SEGMENT and LINE FUNCTIONS **********************************///
+
+/*! Finds the closest point(cp) to (v) on a segment (e1,e2)
+ */
+template<typename CLASS_POINT>
+SIMD_FORCE_INLINE void CLOSEST_POINT_ON_SEGMENT(
+ CLASS_POINT & cp, const CLASS_POINT & v,
+ const CLASS_POINT &e1,const CLASS_POINT &e2)
+{
+ vec3f _n;
+ VEC_DIFF(_n,e2,e1);
+ VEC_DIFF(cp,v,e1);
+ GREAL _scalar = VEC_DOT(cp, _n);
+ _scalar/= VEC_DOT(_n, _n);
+ if(_scalar <0.0f)
+ {
+ VEC_COPY(cp,e1);
+ }
+ else if(_scalar >1.0f)
+ {
+ VEC_COPY(cp,e2);
+ }
+ else
+ {
+ VEC_SCALE(cp,_scalar,_n);
+ VEC_SUM(cp,cp,e1);
+ }
+}
+
+
+/*! \brief Finds the line params where these lines intersect.
+
+\param dir1 Direction of line 1
+\param point1 Point of line 1
+\param dir2 Direction of line 2
+\param point2 Point of line 2
+\param t1 Result Parameter for line 1
+\param t2 Result Parameter for line 2
+\param dointersect 0 if the lines won't intersect, else 1
+
+*/
+template<typename T,typename CLASS_POINT>
+SIMD_FORCE_INLINE bool LINE_INTERSECTION_PARAMS(
+ const CLASS_POINT & dir1,
+ CLASS_POINT & point1,
+ const CLASS_POINT & dir2,
+ CLASS_POINT & point2,
+ T& t1,T& t2)
+{
+ GREAL det;
+ GREAL e1e1 = VEC_DOT(dir1,dir1);
+ GREAL e1e2 = VEC_DOT(dir1,dir2);
+ GREAL e2e2 = VEC_DOT(dir2,dir2);
+ vec3f p1p2;
+ VEC_DIFF(p1p2,point1,point2);
+ GREAL p1p2e1 = VEC_DOT(p1p2,dir1);
+ GREAL p1p2e2 = VEC_DOT(p1p2,dir2);
+ det = e1e2*e1e2 - e1e1*e2e2;
+ if(GIM_IS_ZERO(det)) return false;
+ t1 = (e1e2*p1p2e2 - e2e2*p1p2e1)/det;
+ t2 = (e1e1*p1p2e2 - e1e2*p1p2e1)/det;
+ return true;
+}
+
+//! Find closest points on segments
+template<typename CLASS_POINT>
+SIMD_FORCE_INLINE void SEGMENT_COLLISION(
+ const CLASS_POINT & vA1,
+ const CLASS_POINT & vA2,
+ const CLASS_POINT & vB1,
+ const CLASS_POINT & vB2,
+ CLASS_POINT & vPointA,
+ CLASS_POINT & vPointB)
+{
+ CLASS_POINT _AD,_BD,_N;
+ vec4f _M;//plane
+ VEC_DIFF(_AD,vA2,vA1);
+ VEC_DIFF(_BD,vB2,vB1);
+ VEC_CROSS(_N,_AD,_BD);
+ GREAL _tp = VEC_DOT(_N,_N);
+ if(_tp<G_EPSILON)//ARE PARALELE
+ {
+ //project B over A
+ bool invert_b_order = false;
+ _M[0] = VEC_DOT(vB1,_AD);
+ _M[1] = VEC_DOT(vB2,_AD);
+ if(_M[0]>_M[1])
+ {
+ invert_b_order = true;
+ GIM_SWAP_NUMBERS(_M[0],_M[1]);
+ }
+ _M[2] = VEC_DOT(vA1,_AD);
+ _M[3] = VEC_DOT(vA2,_AD);
+ //mid points
+ _N[0] = (_M[0]+_M[1])*0.5f;
+ _N[1] = (_M[2]+_M[3])*0.5f;
+
+ if(_N[0]<_N[1])
+ {
+ if(_M[1]<_M[2])
+ {
+ vPointB = invert_b_order?vB1:vB2;
+ vPointA = vA1;
+ }
+ else if(_M[1]<_M[3])
+ {
+ vPointB = invert_b_order?vB1:vB2;
+ CLOSEST_POINT_ON_SEGMENT(vPointA,vPointB,vA1,vA2);
+ }
+ else
+ {
+ vPointA = vA2;
+ CLOSEST_POINT_ON_SEGMENT(vPointB,vPointA,vB1,vB2);
+ }
+ }
+ else
+ {
+ if(_M[3]<_M[0])
+ {
+ vPointB = invert_b_order?vB2:vB1;
+ vPointA = vA2;
+ }
+ else if(_M[3]<_M[1])
+ {
+ vPointA = vA2;
+ CLOSEST_POINT_ON_SEGMENT(vPointB,vPointA,vB1,vB2);
+ }
+ else
+ {
+ vPointB = invert_b_order?vB1:vB2;
+ CLOSEST_POINT_ON_SEGMENT(vPointA,vPointB,vA1,vA2);
+ }
+ }
+ return;
+ }
+
+
+ VEC_CROSS(_M,_N,_BD);
+ _M[3] = VEC_DOT(_M,vB1);
+
+ LINE_PLANE_COLLISION(_M,_AD,vA1,vPointA,_tp,btScalar(0), btScalar(1));
+ /*Closest point on segment*/
+ VEC_DIFF(vPointB,vPointA,vB1);
+ _tp = VEC_DOT(vPointB, _BD);
+ _tp/= VEC_DOT(_BD, _BD);
+ _tp = GIM_CLAMP(_tp,0.0f,1.0f);
+ VEC_SCALE(vPointB,_tp,_BD);
+ VEC_SUM(vPointB,vPointB,vB1);
+}
+
+
+
+
+//! Line box intersection in one dimension
+/*!
+
+*\param pos Position of the ray
+*\param dir Projection of the Direction of the ray
+*\param bmin Minimum bound of the box
+*\param bmax Maximum bound of the box
+*\param tfirst the minimum projection. Assign to 0 at first.
+*\param tlast the maximum projection. Assign to INFINITY at first.
+*\return true if there is an intersection.
+*/
+template<typename T>
+SIMD_FORCE_INLINE bool BOX_AXIS_INTERSECT(T pos, T dir,T bmin, T bmax, T & tfirst, T & tlast)
+{
+ if(GIM_IS_ZERO(dir))
+ {
+ return !(pos < bmin || pos > bmax);
+ }
+ GREAL a0 = (bmin - pos) / dir;
+ GREAL a1 = (bmax - pos) / dir;
+ if(a0 > a1) GIM_SWAP_NUMBERS(a0, a1);
+ tfirst = GIM_MAX(a0, tfirst);
+ tlast = GIM_MIN(a1, tlast);
+ if (tlast < tfirst) return false;
+ return true;
+}
+
+
+//! Sorts 3 componets
+template<typename T>
+SIMD_FORCE_INLINE void SORT_3_INDICES(
+ const T * values,
+ GUINT * order_indices)
+{
+ //get minimum
+ order_indices[0] = values[0] < values[1] ? (values[0] < values[2] ? 0 : 2) : (values[1] < values[2] ? 1 : 2);
+
+ //get second and third
+ GUINT i0 = (order_indices[0] + 1)%3;
+ GUINT i1 = (i0 + 1)%3;
+
+ if(values[i0] < values[i1])
+ {
+ order_indices[1] = i0;
+ order_indices[2] = i1;
+ }
+ else
+ {
+ order_indices[1] = i1;
+ order_indices[2] = i0;
+ }
+}
+
+
+
+
+
+#endif // GIM_VECTOR_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_bitset.h b/tests/bullet/src/BulletCollision/Gimpact/gim_bitset.h
new file mode 100644
index 00000000..7dee48a4
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_bitset.h
@@ -0,0 +1,123 @@
+#ifndef GIM_BITSET_H_INCLUDED
+#define GIM_BITSET_H_INCLUDED
+/*! \file gim_bitset.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "gim_array.h"
+
+
+#define GUINT_BIT_COUNT 32
+#define GUINT_EXPONENT 5
+
+class gim_bitset
+{
+public:
+ gim_array<GUINT> m_container;
+
+ gim_bitset()
+ {
+
+ }
+
+ gim_bitset(GUINT bits_count)
+ {
+ resize(bits_count);
+ }
+
+ ~gim_bitset()
+ {
+ }
+
+ inline bool resize(GUINT newsize)
+ {
+ GUINT oldsize = m_container.size();
+ m_container.resize(newsize/GUINT_BIT_COUNT + 1,false);
+ while(oldsize<m_container.size())
+ {
+ m_container[oldsize] = 0;
+ }
+ return true;
+ }
+
+ inline GUINT size()
+ {
+ return m_container.size()*GUINT_BIT_COUNT;
+ }
+
+ inline void set_all()
+ {
+ for(GUINT i = 0;i<m_container.size();++i)
+ {
+ m_container[i] = 0xffffffff;
+ }
+ }
+
+ inline void clear_all()
+ {
+ for(GUINT i = 0;i<m_container.size();++i)
+ {
+ m_container[i] = 0;
+ }
+ }
+
+ inline void set(GUINT bit_index)
+ {
+ if(bit_index>=size())
+ {
+ resize(bit_index);
+ }
+ m_container[bit_index >> GUINT_EXPONENT] |= (1 << (bit_index & (GUINT_BIT_COUNT-1)));
+ }
+
+ ///Return 0 or 1
+ inline char get(GUINT bit_index)
+ {
+ if(bit_index>=size())
+ {
+ return 0;
+ }
+ char value = m_container[bit_index >> GUINT_EXPONENT] &
+ (1 << (bit_index & (GUINT_BIT_COUNT-1)));
+ return value;
+ }
+
+ inline void clear(GUINT bit_index)
+ {
+ m_container[bit_index >> GUINT_EXPONENT] &= ~(1 << (bit_index & (GUINT_BIT_COUNT-1)));
+ }
+};
+
+
+
+
+
+#endif // GIM_CONTAINERS_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_box_collision.h b/tests/bullet/src/BulletCollision/Gimpact/gim_box_collision.h
new file mode 100644
index 00000000..b360dd47
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_box_collision.h
@@ -0,0 +1,590 @@
+#ifndef GIM_BOX_COLLISION_H_INCLUDED
+#define GIM_BOX_COLLISION_H_INCLUDED
+
+/*! \file gim_box_collision.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+#include "gim_basic_geometry_operations.h"
+#include "LinearMath/btTransform.h"
+
+
+
+//SIMD_FORCE_INLINE bool test_cross_edge_box(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, const btVector3 & extend,
+// int dir_index0,
+// int dir_index1
+// int component_index0,
+// int component_index1)
+//{
+// // dir coords are -z and y
+//
+// const btScalar dir0 = -edge[dir_index0];
+// const btScalar dir1 = edge[dir_index1];
+// btScalar pmin = pointa[component_index0]*dir0 + pointa[component_index1]*dir1;
+// btScalar pmax = pointb[component_index0]*dir0 + pointb[component_index1]*dir1;
+// //find minmax
+// if(pmin>pmax)
+// {
+// GIM_SWAP_NUMBERS(pmin,pmax);
+// }
+// //find extends
+// const btScalar rad = extend[component_index0] * absolute_edge[dir_index0] +
+// extend[component_index1] * absolute_edge[dir_index1];
+//
+// if(pmin>rad || -rad>pmax) return false;
+// return true;
+//}
+//
+//SIMD_FORCE_INLINE bool test_cross_edge_box_X_axis(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, btVector3 & extend)
+//{
+//
+// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,2,1,1,2);
+//}
+//
+//
+//SIMD_FORCE_INLINE bool test_cross_edge_box_Y_axis(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, btVector3 & extend)
+//{
+//
+// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,0,2,2,0);
+//}
+//
+//SIMD_FORCE_INLINE bool test_cross_edge_box_Z_axis(
+// const btVector3 & edge,
+// const btVector3 & absolute_edge,
+// const btVector3 & pointa,
+// const btVector3 & pointb, btVector3 & extend)
+//{
+//
+// return test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,1,0,0,1);
+//}
+
+#define TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,i_dir_0,i_dir_1,i_comp_0,i_comp_1)\
+{\
+ const btScalar dir0 = -edge[i_dir_0];\
+ const btScalar dir1 = edge[i_dir_1];\
+ btScalar pmin = pointa[i_comp_0]*dir0 + pointa[i_comp_1]*dir1;\
+ btScalar pmax = pointb[i_comp_0]*dir0 + pointb[i_comp_1]*dir1;\
+ if(pmin>pmax)\
+ {\
+ GIM_SWAP_NUMBERS(pmin,pmax); \
+ }\
+ const btScalar abs_dir0 = absolute_edge[i_dir_0];\
+ const btScalar abs_dir1 = absolute_edge[i_dir_1];\
+ const btScalar rad = _extend[i_comp_0] * abs_dir0 + _extend[i_comp_1] * abs_dir1;\
+ if(pmin>rad || -rad>pmax) return false;\
+}\
+
+
+#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\
+{\
+ TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,2,1,1,2);\
+}\
+
+#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\
+{\
+ TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,0,2,2,0);\
+}\
+
+#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge,absolute_edge,pointa,pointb,_extend)\
+{\
+ TEST_CROSS_EDGE_BOX_MCR(edge,absolute_edge,pointa,pointb,_extend,1,0,0,1);\
+}\
+
+
+
+//! Class for transforming a model1 to the space of model0
+class GIM_BOX_BOX_TRANSFORM_CACHE
+{
+public:
+ btVector3 m_T1to0;//!< Transforms translation of model1 to model 0
+ btMatrix3x3 m_R1to0;//!< Transforms Rotation of model1 to model 0, equal to R0' * R1
+ btMatrix3x3 m_AR;//!< Absolute value of m_R1to0
+
+ SIMD_FORCE_INLINE void calc_absolute_matrix()
+ {
+ static const btVector3 vepsi(1e-6f,1e-6f,1e-6f);
+ m_AR[0] = vepsi + m_R1to0[0].absolute();
+ m_AR[1] = vepsi + m_R1to0[1].absolute();
+ m_AR[2] = vepsi + m_R1to0[2].absolute();
+ }
+
+ GIM_BOX_BOX_TRANSFORM_CACHE()
+ {
+ }
+
+
+ GIM_BOX_BOX_TRANSFORM_CACHE(mat4f trans1_to_0)
+ {
+ COPY_MATRIX_3X3(m_R1to0,trans1_to_0)
+ MAT_GET_TRANSLATION(trans1_to_0,m_T1to0)
+ calc_absolute_matrix();
+ }
+
+ //! Calc the transformation relative 1 to 0. Inverts matrics by transposing
+ SIMD_FORCE_INLINE void calc_from_homogenic(const btTransform & trans0,const btTransform & trans1)
+ {
+
+ m_R1to0 = trans0.getBasis().transpose();
+ m_T1to0 = m_R1to0 * (-trans0.getOrigin());
+
+ m_T1to0 += m_R1to0*trans1.getOrigin();
+ m_R1to0 *= trans1.getBasis();
+
+ calc_absolute_matrix();
+ }
+
+ //! Calcs the full invertion of the matrices. Useful for scaling matrices
+ SIMD_FORCE_INLINE void calc_from_full_invert(const btTransform & trans0,const btTransform & trans1)
+ {
+ m_R1to0 = trans0.getBasis().inverse();
+ m_T1to0 = m_R1to0 * (-trans0.getOrigin());
+
+ m_T1to0 += m_R1to0*trans1.getOrigin();
+ m_R1to0 *= trans1.getBasis();
+
+ calc_absolute_matrix();
+ }
+
+ SIMD_FORCE_INLINE btVector3 transform(const btVector3 & point)
+ {
+ return btVector3(m_R1to0[0].dot(point) + m_T1to0.x(),
+ m_R1to0[1].dot(point) + m_T1to0.y(),
+ m_R1to0[2].dot(point) + m_T1to0.z());
+ }
+};
+
+
+#define BOX_PLANE_EPSILON 0.000001f
+
+//! Axis aligned box
+class GIM_AABB
+{
+public:
+ btVector3 m_min;
+ btVector3 m_max;
+
+ GIM_AABB()
+ {}
+
+
+ GIM_AABB(const btVector3 & V1,
+ const btVector3 & V2,
+ const btVector3 & V3)
+ {
+ m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]);
+ }
+
+ GIM_AABB(const btVector3 & V1,
+ const btVector3 & V2,
+ const btVector3 & V3,
+ GREAL margin)
+ {
+ m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]);
+
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ GIM_AABB(const GIM_AABB &other):
+ m_min(other.m_min),m_max(other.m_max)
+ {
+ }
+
+ GIM_AABB(const GIM_AABB &other,btScalar margin ):
+ m_min(other.m_min),m_max(other.m_max)
+ {
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ SIMD_FORCE_INLINE void invalidate()
+ {
+ m_min[0] = G_REAL_INFINITY;
+ m_min[1] = G_REAL_INFINITY;
+ m_min[2] = G_REAL_INFINITY;
+ m_max[0] = -G_REAL_INFINITY;
+ m_max[1] = -G_REAL_INFINITY;
+ m_max[2] = -G_REAL_INFINITY;
+ }
+
+ SIMD_FORCE_INLINE void increment_margin(btScalar margin)
+ {
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ SIMD_FORCE_INLINE void copy_with_margin(const GIM_AABB &other, btScalar margin)
+ {
+ m_min[0] = other.m_min[0] - margin;
+ m_min[1] = other.m_min[1] - margin;
+ m_min[2] = other.m_min[2] - margin;
+
+ m_max[0] = other.m_max[0] + margin;
+ m_max[1] = other.m_max[1] + margin;
+ m_max[2] = other.m_max[2] + margin;
+ }
+
+ template<typename CLASS_POINT>
+ SIMD_FORCE_INLINE void calc_from_triangle(
+ const CLASS_POINT & V1,
+ const CLASS_POINT & V2,
+ const CLASS_POINT & V3)
+ {
+ m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]);
+ }
+
+ template<typename CLASS_POINT>
+ SIMD_FORCE_INLINE void calc_from_triangle_margin(
+ const CLASS_POINT & V1,
+ const CLASS_POINT & V2,
+ const CLASS_POINT & V3, btScalar margin)
+ {
+ m_min[0] = GIM_MIN3(V1[0],V2[0],V3[0]);
+ m_min[1] = GIM_MIN3(V1[1],V2[1],V3[1]);
+ m_min[2] = GIM_MIN3(V1[2],V2[2],V3[2]);
+
+ m_max[0] = GIM_MAX3(V1[0],V2[0],V3[0]);
+ m_max[1] = GIM_MAX3(V1[1],V2[1],V3[1]);
+ m_max[2] = GIM_MAX3(V1[2],V2[2],V3[2]);
+
+ m_min[0] -= margin;
+ m_min[1] -= margin;
+ m_min[2] -= margin;
+ m_max[0] += margin;
+ m_max[1] += margin;
+ m_max[2] += margin;
+ }
+
+ //! Apply a transform to an AABB
+ SIMD_FORCE_INLINE void appy_transform(const btTransform & trans)
+ {
+ btVector3 center = (m_max+m_min)*0.5f;
+ btVector3 extends = m_max - center;
+ // Compute new center
+ center = trans(center);
+
+ btVector3 textends(extends.dot(trans.getBasis().getRow(0).absolute()),
+ extends.dot(trans.getBasis().getRow(1).absolute()),
+ extends.dot(trans.getBasis().getRow(2).absolute()));
+
+ m_min = center - textends;
+ m_max = center + textends;
+ }
+
+ //! Merges a Box
+ SIMD_FORCE_INLINE void merge(const GIM_AABB & box)
+ {
+ m_min[0] = GIM_MIN(m_min[0],box.m_min[0]);
+ m_min[1] = GIM_MIN(m_min[1],box.m_min[1]);
+ m_min[2] = GIM_MIN(m_min[2],box.m_min[2]);
+
+ m_max[0] = GIM_MAX(m_max[0],box.m_max[0]);
+ m_max[1] = GIM_MAX(m_max[1],box.m_max[1]);
+ m_max[2] = GIM_MAX(m_max[2],box.m_max[2]);
+ }
+
+ //! Merges a point
+ template<typename CLASS_POINT>
+ SIMD_FORCE_INLINE void merge_point(const CLASS_POINT & point)
+ {
+ m_min[0] = GIM_MIN(m_min[0],point[0]);
+ m_min[1] = GIM_MIN(m_min[1],point[1]);
+ m_min[2] = GIM_MIN(m_min[2],point[2]);
+
+ m_max[0] = GIM_MAX(m_max[0],point[0]);
+ m_max[1] = GIM_MAX(m_max[1],point[1]);
+ m_max[2] = GIM_MAX(m_max[2],point[2]);
+ }
+
+ //! Gets the extend and center
+ SIMD_FORCE_INLINE void get_center_extend(btVector3 & center,btVector3 & extend) const
+ {
+ center = (m_max+m_min)*0.5f;
+ extend = m_max - center;
+ }
+
+ //! Finds the intersecting box between this box and the other.
+ SIMD_FORCE_INLINE void find_intersection(const GIM_AABB & other, GIM_AABB & intersection) const
+ {
+ intersection.m_min[0] = GIM_MAX(other.m_min[0],m_min[0]);
+ intersection.m_min[1] = GIM_MAX(other.m_min[1],m_min[1]);
+ intersection.m_min[2] = GIM_MAX(other.m_min[2],m_min[2]);
+
+ intersection.m_max[0] = GIM_MIN(other.m_max[0],m_max[0]);
+ intersection.m_max[1] = GIM_MIN(other.m_max[1],m_max[1]);
+ intersection.m_max[2] = GIM_MIN(other.m_max[2],m_max[2]);
+ }
+
+
+ SIMD_FORCE_INLINE bool has_collision(const GIM_AABB & other) const
+ {
+ if(m_min[0] > other.m_max[0] ||
+ m_max[0] < other.m_min[0] ||
+ m_min[1] > other.m_max[1] ||
+ m_max[1] < other.m_min[1] ||
+ m_min[2] > other.m_max[2] ||
+ m_max[2] < other.m_min[2])
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /*! \brief Finds the Ray intersection parameter.
+ \param aabb Aligned box
+ \param vorigin A vec3f with the origin of the ray
+ \param vdir A vec3f with the direction of the ray
+ */
+ SIMD_FORCE_INLINE bool collide_ray(const btVector3 & vorigin,const btVector3 & vdir)
+ {
+ btVector3 extents,center;
+ this->get_center_extend(center,extents);;
+
+ btScalar Dx = vorigin[0] - center[0];
+ if(GIM_GREATER(Dx, extents[0]) && Dx*vdir[0]>=0.0f) return false;
+ btScalar Dy = vorigin[1] - center[1];
+ if(GIM_GREATER(Dy, extents[1]) && Dy*vdir[1]>=0.0f) return false;
+ btScalar Dz = vorigin[2] - center[2];
+ if(GIM_GREATER(Dz, extents[2]) && Dz*vdir[2]>=0.0f) return false;
+
+
+ btScalar f = vdir[1] * Dz - vdir[2] * Dy;
+ if(btFabs(f) > extents[1]*btFabs(vdir[2]) + extents[2]*btFabs(vdir[1])) return false;
+ f = vdir[2] * Dx - vdir[0] * Dz;
+ if(btFabs(f) > extents[0]*btFabs(vdir[2]) + extents[2]*btFabs(vdir[0]))return false;
+ f = vdir[0] * Dy - vdir[1] * Dx;
+ if(btFabs(f) > extents[0]*btFabs(vdir[1]) + extents[1]*btFabs(vdir[0]))return false;
+ return true;
+ }
+
+
+ SIMD_FORCE_INLINE void projection_interval(const btVector3 & direction, btScalar &vmin, btScalar &vmax) const
+ {
+ btVector3 center = (m_max+m_min)*0.5f;
+ btVector3 extend = m_max-center;
+
+ btScalar _fOrigin = direction.dot(center);
+ btScalar _fMaximumExtent = extend.dot(direction.absolute());
+ vmin = _fOrigin - _fMaximumExtent;
+ vmax = _fOrigin + _fMaximumExtent;
+ }
+
+ SIMD_FORCE_INLINE ePLANE_INTERSECTION_TYPE plane_classify(const btVector4 &plane) const
+ {
+ btScalar _fmin,_fmax;
+ this->projection_interval(plane,_fmin,_fmax);
+
+ if(plane[3] > _fmax + BOX_PLANE_EPSILON)
+ {
+ return G_BACK_PLANE; // 0
+ }
+
+ if(plane[3]+BOX_PLANE_EPSILON >=_fmin)
+ {
+ return G_COLLIDE_PLANE; //1
+ }
+ return G_FRONT_PLANE;//2
+ }
+
+ SIMD_FORCE_INLINE bool overlapping_trans_conservative(const GIM_AABB & box, btTransform & trans1_to_0)
+ {
+ GIM_AABB tbox = box;
+ tbox.appy_transform(trans1_to_0);
+ return has_collision(tbox);
+ }
+
+ //! transcache is the transformation cache from box to this AABB
+ SIMD_FORCE_INLINE bool overlapping_trans_cache(
+ const GIM_AABB & box,const GIM_BOX_BOX_TRANSFORM_CACHE & transcache, bool fulltest)
+ {
+
+ //Taken from OPCODE
+ btVector3 ea,eb;//extends
+ btVector3 ca,cb;//extends
+ get_center_extend(ca,ea);
+ box.get_center_extend(cb,eb);
+
+
+ btVector3 T;
+ btScalar t,t2;
+ int i;
+
+ // Class I : A's basis vectors
+ for(i=0;i<3;i++)
+ {
+ T[i] = transcache.m_R1to0[i].dot(cb) + transcache.m_T1to0[i] - ca[i];
+ t = transcache.m_AR[i].dot(eb) + ea[i];
+ if(GIM_GREATER(T[i], t)) return false;
+ }
+ // Class II : B's basis vectors
+ for(i=0;i<3;i++)
+ {
+ t = MAT_DOT_COL(transcache.m_R1to0,T,i);
+ t2 = MAT_DOT_COL(transcache.m_AR,ea,i) + eb[i];
+ if(GIM_GREATER(t,t2)) return false;
+ }
+ // Class III : 9 cross products
+ if(fulltest)
+ {
+ int j,m,n,o,p,q,r;
+ for(i=0;i<3;i++)
+ {
+ m = (i+1)%3;
+ n = (i+2)%3;
+ o = i==0?1:0;
+ p = i==2?1:2;
+ for(j=0;j<3;j++)
+ {
+ q = j==2?1:2;
+ r = j==0?1:0;
+ t = T[n]*transcache.m_R1to0[m][j] - T[m]*transcache.m_R1to0[n][j];
+ t2 = ea[o]*transcache.m_AR[p][j] + ea[p]*transcache.m_AR[o][j] +
+ eb[r]*transcache.m_AR[i][q] + eb[q]*transcache.m_AR[i][r];
+ if(GIM_GREATER(t,t2)) return false;
+ }
+ }
+ }
+ return true;
+ }
+
+ //! Simple test for planes.
+ SIMD_FORCE_INLINE bool collide_plane(
+ const btVector4 & plane)
+ {
+ ePLANE_INTERSECTION_TYPE classify = plane_classify(plane);
+ return (classify == G_COLLIDE_PLANE);
+ }
+
+ //! test for a triangle, with edges
+ SIMD_FORCE_INLINE bool collide_triangle_exact(
+ const btVector3 & p1,
+ const btVector3 & p2,
+ const btVector3 & p3,
+ const btVector4 & triangle_plane)
+ {
+ if(!collide_plane(triangle_plane)) return false;
+
+ btVector3 center,extends;
+ this->get_center_extend(center,extends);
+
+ const btVector3 v1(p1 - center);
+ const btVector3 v2(p2 - center);
+ const btVector3 v3(p3 - center);
+
+ //First axis
+ btVector3 diff(v2 - v1);
+ btVector3 abs_diff = diff.absolute();
+ //Test With X axis
+ TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v1,v3,extends);
+ //Test With Y axis
+ TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v1,v3,extends);
+ //Test With Z axis
+ TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v1,v3,extends);
+
+
+ diff = v3 - v2;
+ abs_diff = diff.absolute();
+ //Test With X axis
+ TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v2,v1,extends);
+ //Test With Y axis
+ TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v2,v1,extends);
+ //Test With Z axis
+ TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v2,v1,extends);
+
+ diff = v1 - v3;
+ abs_diff = diff.absolute();
+ //Test With X axis
+ TEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff,abs_diff,v3,v2,extends);
+ //Test With Y axis
+ TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff,abs_diff,v3,v2,extends);
+ //Test With Z axis
+ TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff,abs_diff,v3,v2,extends);
+
+ return true;
+ }
+};
+
+
+//! Compairison of transformation objects
+SIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform & t1,const btTransform & t2)
+{
+ if(!(t1.getOrigin() == t2.getOrigin()) ) return false;
+
+ if(!(t1.getBasis().getRow(0) == t2.getBasis().getRow(0)) ) return false;
+ if(!(t1.getBasis().getRow(1) == t2.getBasis().getRow(1)) ) return false;
+ if(!(t1.getBasis().getRow(2) == t2.getBasis().getRow(2)) ) return false;
+ return true;
+}
+
+
+
+#endif // GIM_BOX_COLLISION_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_box_set.cpp b/tests/bullet/src/BulletCollision/Gimpact/gim_box_set.cpp
new file mode 100644
index 00000000..0c3d7ba8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_box_set.cpp
@@ -0,0 +1,182 @@
+
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+#include "gim_box_set.h"
+
+
+GUINT GIM_BOX_TREE::_calc_splitting_axis(
+ gim_array<GIM_AABB_DATA> & primitive_boxes, GUINT startIndex, GUINT endIndex)
+{
+ GUINT i;
+
+ btVector3 means(btScalar(0.),btScalar(0.),btScalar(0.));
+ btVector3 variance(btScalar(0.),btScalar(0.),btScalar(0.));
+ GUINT numIndices = endIndex-startIndex;
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ means+=center;
+ }
+ means *= (btScalar(1.)/(btScalar)numIndices);
+
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btVector3 center = btScalar(0.5)*(primitive_boxes[i].m_bound.m_max +
+ primitive_boxes[i].m_bound.m_min);
+ btVector3 diff2 = center-means;
+ diff2 = diff2 * diff2;
+ variance += diff2;
+ }
+ variance *= (btScalar(1.)/ ((btScalar)numIndices-1) );
+
+ return variance.maxAxis();
+}
+
+
+GUINT GIM_BOX_TREE::_sort_and_calc_splitting_index(
+ gim_array<GIM_AABB_DATA> & primitive_boxes, GUINT startIndex,
+ GUINT endIndex, GUINT splitAxis)
+{
+ GUINT i;
+ GUINT splitIndex =startIndex;
+ GUINT numIndices = endIndex - startIndex;
+
+ // average of centers
+ btScalar splitValue = 0.0f;
+ for (i=startIndex;i<endIndex;i++)
+ {
+ splitValue+= 0.5f*(primitive_boxes[i].m_bound.m_max[splitAxis] +
+ primitive_boxes[i].m_bound.m_min[splitAxis]);
+ }
+ splitValue /= (btScalar)numIndices;
+
+ //sort leafNodes so all values larger then splitValue comes first, and smaller values start from 'splitIndex'.
+ for (i=startIndex;i<endIndex;i++)
+ {
+ btScalar center = 0.5f*(primitive_boxes[i].m_bound.m_max[splitAxis] +
+ primitive_boxes[i].m_bound.m_min[splitAxis]);
+ if (center > splitValue)
+ {
+ //swap
+ primitive_boxes.swap(i,splitIndex);
+ splitIndex++;
+ }
+ }
+
+ //if the splitIndex causes unbalanced trees, fix this by using the center in between startIndex and endIndex
+ //otherwise the tree-building might fail due to stack-overflows in certain cases.
+ //unbalanced1 is unsafe: it can cause stack overflows
+ //bool unbalanced1 = ((splitIndex==startIndex) || (splitIndex == (endIndex-1)));
+
+ //unbalanced2 should work too: always use center (perfect balanced trees)
+ //bool unbalanced2 = true;
+
+ //this should be safe too:
+ GUINT rangeBalancedIndices = numIndices/3;
+ bool unbalanced = ((splitIndex<=(startIndex+rangeBalancedIndices)) || (splitIndex >=(endIndex-1-rangeBalancedIndices)));
+
+ if (unbalanced)
+ {
+ splitIndex = startIndex+ (numIndices>>1);
+ }
+
+ btAssert(!((splitIndex==startIndex) || (splitIndex == (endIndex))));
+
+ return splitIndex;
+}
+
+
+void GIM_BOX_TREE::_build_sub_tree(gim_array<GIM_AABB_DATA> & primitive_boxes, GUINT startIndex, GUINT endIndex)
+{
+ GUINT current_index = m_num_nodes++;
+
+ btAssert((endIndex-startIndex)>0);
+
+ if((endIndex-startIndex) == 1) //we got a leaf
+ {
+ m_node_array[current_index].m_left = 0;
+ m_node_array[current_index].m_right = 0;
+ m_node_array[current_index].m_escapeIndex = 0;
+
+ m_node_array[current_index].m_bound = primitive_boxes[startIndex].m_bound;
+ m_node_array[current_index].m_data = primitive_boxes[startIndex].m_data;
+ return;
+ }
+
+ //configure inner node
+
+ GUINT splitIndex;
+
+ //calc this node bounding box
+ m_node_array[current_index].m_bound.invalidate();
+ for (splitIndex=startIndex;splitIndex<endIndex;splitIndex++)
+ {
+ m_node_array[current_index].m_bound.merge(primitive_boxes[splitIndex].m_bound);
+ }
+
+ //calculate Best Splitting Axis and where to split it. Sort the incoming 'leafNodes' array within range 'startIndex/endIndex'.
+
+ //split axis
+ splitIndex = _calc_splitting_axis(primitive_boxes,startIndex,endIndex);
+
+ splitIndex = _sort_and_calc_splitting_index(
+ primitive_boxes,startIndex,endIndex,splitIndex);
+
+ //configure this inner node : the left node index
+ m_node_array[current_index].m_left = m_num_nodes;
+ //build left child tree
+ _build_sub_tree(primitive_boxes, startIndex, splitIndex );
+
+ //configure this inner node : the right node index
+ m_node_array[current_index].m_right = m_num_nodes;
+
+ //build right child tree
+ _build_sub_tree(primitive_boxes, splitIndex ,endIndex);
+
+ //configure this inner node : the escape index
+ m_node_array[current_index].m_escapeIndex = m_num_nodes - current_index;
+}
+
+//! stackless build tree
+void GIM_BOX_TREE::build_tree(
+ gim_array<GIM_AABB_DATA> & primitive_boxes)
+{
+ // initialize node count to 0
+ m_num_nodes = 0;
+ // allocate nodes
+ m_node_array.resize(primitive_boxes.size()*2);
+
+ _build_sub_tree(primitive_boxes, 0, primitive_boxes.size());
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_box_set.h b/tests/bullet/src/BulletCollision/Gimpact/gim_box_set.h
new file mode 100644
index 00000000..61d190a7
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_box_set.h
@@ -0,0 +1,674 @@
+#ifndef GIM_BOX_SET_H_INCLUDED
+#define GIM_BOX_SET_H_INCLUDED
+
+/*! \file gim_box_set.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+#include "gim_array.h"
+#include "gim_radixsort.h"
+#include "gim_box_collision.h"
+#include "gim_tri_collision.h"
+
+
+
+//! Overlapping pair
+struct GIM_PAIR
+{
+ GUINT m_index1;
+ GUINT m_index2;
+ GIM_PAIR()
+ {}
+
+ GIM_PAIR(const GIM_PAIR & p)
+ {
+ m_index1 = p.m_index1;
+ m_index2 = p.m_index2;
+ }
+
+ GIM_PAIR(GUINT index1, GUINT index2)
+ {
+ m_index1 = index1;
+ m_index2 = index2;
+ }
+};
+
+//! A pairset array
+class gim_pair_set: public gim_array<GIM_PAIR>
+{
+public:
+ gim_pair_set():gim_array<GIM_PAIR>(32)
+ {
+ }
+ inline void push_pair(GUINT index1,GUINT index2)
+ {
+ push_back(GIM_PAIR(index1,index2));
+ }
+
+ inline void push_pair_inv(GUINT index1,GUINT index2)
+ {
+ push_back(GIM_PAIR(index2,index1));
+ }
+};
+
+
+//! Prototype Base class for primitive classification
+/*!
+This class is a wrapper for primitive collections.
+This tells relevant info for the Bounding Box set classes, which take care of space classification.
+This class can manage Compound shapes and trimeshes, and if it is managing trimesh then the Hierarchy Bounding Box classes will take advantage of primitive Vs Box overlapping tests for getting optimal results and less Per Box compairisons.
+*/
+class GIM_PRIMITIVE_MANAGER_PROTOTYPE
+{
+public:
+
+ virtual ~GIM_PRIMITIVE_MANAGER_PROTOTYPE() {}
+ //! determines if this manager consist on only triangles, which special case will be optimized
+ virtual bool is_trimesh() = 0;
+ virtual GUINT get_primitive_count() = 0;
+ virtual void get_primitive_box(GUINT prim_index ,GIM_AABB & primbox) = 0;
+ virtual void get_primitive_triangle(GUINT prim_index,GIM_TRIANGLE & triangle) = 0;
+};
+
+
+struct GIM_AABB_DATA
+{
+ GIM_AABB m_bound;
+ GUINT m_data;
+};
+
+//! Node Structure for trees
+struct GIM_BOX_TREE_NODE
+{
+ GIM_AABB m_bound;
+ GUINT m_left;//!< Left subtree
+ GUINT m_right;//!< Right subtree
+ GUINT m_escapeIndex;//!< Scape index for traversing
+ GUINT m_data;//!< primitive index if apply
+
+ GIM_BOX_TREE_NODE()
+ {
+ m_left = 0;
+ m_right = 0;
+ m_escapeIndex = 0;
+ m_data = 0;
+ }
+
+ SIMD_FORCE_INLINE bool is_leaf_node() const
+ {
+ return (!m_left && !m_right);
+ }
+};
+
+//! Basic Box tree structure
+class GIM_BOX_TREE
+{
+protected:
+ GUINT m_num_nodes;
+ gim_array<GIM_BOX_TREE_NODE> m_node_array;
+protected:
+ GUINT _sort_and_calc_splitting_index(
+ gim_array<GIM_AABB_DATA> & primitive_boxes,
+ GUINT startIndex, GUINT endIndex, GUINT splitAxis);
+
+ GUINT _calc_splitting_axis(gim_array<GIM_AABB_DATA> & primitive_boxes, GUINT startIndex, GUINT endIndex);
+
+ void _build_sub_tree(gim_array<GIM_AABB_DATA> & primitive_boxes, GUINT startIndex, GUINT endIndex);
+public:
+ GIM_BOX_TREE()
+ {
+ m_num_nodes = 0;
+ }
+
+ //! prototype functions for box tree management
+ //!@{
+ void build_tree(gim_array<GIM_AABB_DATA> & primitive_boxes);
+
+ SIMD_FORCE_INLINE void clearNodes()
+ {
+ m_node_array.clear();
+ m_num_nodes = 0;
+ }
+
+ //! node count
+ SIMD_FORCE_INLINE GUINT getNodeCount() const
+ {
+ return m_num_nodes;
+ }
+
+ //! tells if the node is a leaf
+ SIMD_FORCE_INLINE bool isLeafNode(GUINT nodeindex) const
+ {
+ return m_node_array[nodeindex].is_leaf_node();
+ }
+
+ SIMD_FORCE_INLINE GUINT getNodeData(GUINT nodeindex) const
+ {
+ return m_node_array[nodeindex].m_data;
+ }
+
+ SIMD_FORCE_INLINE void getNodeBound(GUINT nodeindex, GIM_AABB & bound) const
+ {
+ bound = m_node_array[nodeindex].m_bound;
+ }
+
+ SIMD_FORCE_INLINE void setNodeBound(GUINT nodeindex, const GIM_AABB & bound)
+ {
+ m_node_array[nodeindex].m_bound = bound;
+ }
+
+ SIMD_FORCE_INLINE GUINT getLeftNodeIndex(GUINT nodeindex) const
+ {
+ return m_node_array[nodeindex].m_left;
+ }
+
+ SIMD_FORCE_INLINE GUINT getRightNodeIndex(GUINT nodeindex) const
+ {
+ return m_node_array[nodeindex].m_right;
+ }
+
+ SIMD_FORCE_INLINE GUINT getScapeNodeIndex(GUINT nodeindex) const
+ {
+ return m_node_array[nodeindex].m_escapeIndex;
+ }
+
+ //!@}
+};
+
+
+//! Generic Box Tree Template
+/*!
+This class offers an structure for managing a box tree of primitives.
+Requires a Primitive prototype (like GIM_PRIMITIVE_MANAGER_PROTOTYPE ) and
+a Box tree structure ( like GIM_BOX_TREE).
+*/
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE, typename _GIM_BOX_TREE_PROTOTYPE>
+class GIM_BOX_TREE_TEMPLATE_SET
+{
+protected:
+ _GIM_PRIMITIVE_MANAGER_PROTOTYPE m_primitive_manager;
+ _GIM_BOX_TREE_PROTOTYPE m_box_tree;
+protected:
+ //stackless refit
+ SIMD_FORCE_INLINE void refit()
+ {
+ GUINT nodecount = getNodeCount();
+ while(nodecount--)
+ {
+ if(isLeafNode(nodecount))
+ {
+ GIM_AABB leafbox;
+ m_primitive_manager.get_primitive_box(getNodeData(nodecount),leafbox);
+ setNodeBound(nodecount,leafbox);
+ }
+ else
+ {
+ //get left bound
+ GUINT childindex = getLeftNodeIndex(nodecount);
+ GIM_AABB bound;
+ getNodeBound(childindex,bound);
+ //get right bound
+ childindex = getRightNodeIndex(nodecount);
+ GIM_AABB bound2;
+ getNodeBound(childindex,bound2);
+ bound.merge(bound2);
+
+ setNodeBound(nodecount,bound);
+ }
+ }
+ }
+public:
+
+ GIM_BOX_TREE_TEMPLATE_SET()
+ {
+ }
+
+ SIMD_FORCE_INLINE GIM_AABB getGlobalBox() const
+ {
+ GIM_AABB totalbox;
+ getNodeBound(0, totalbox);
+ return totalbox;
+ }
+
+ SIMD_FORCE_INLINE void setPrimitiveManager(const _GIM_PRIMITIVE_MANAGER_PROTOTYPE & primitive_manager)
+ {
+ m_primitive_manager = primitive_manager;
+ }
+
+ const _GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager() const
+ {
+ return m_primitive_manager;
+ }
+
+ _GIM_PRIMITIVE_MANAGER_PROTOTYPE & getPrimitiveManager()
+ {
+ return m_primitive_manager;
+ }
+
+//! node manager prototype functions
+///@{
+
+ //! this attemps to refit the box set.
+ SIMD_FORCE_INLINE void update()
+ {
+ refit();
+ }
+
+ //! this rebuild the entire set
+ SIMD_FORCE_INLINE void buildSet()
+ {
+ //obtain primitive boxes
+ gim_array<GIM_AABB_DATA> primitive_boxes;
+ primitive_boxes.resize(m_primitive_manager.get_primitive_count(),false);
+
+ for (GUINT i = 0;i<primitive_boxes.size() ;i++ )
+ {
+ m_primitive_manager.get_primitive_box(i,primitive_boxes[i].m_bound);
+ primitive_boxes[i].m_data = i;
+ }
+
+ m_box_tree.build_tree(primitive_boxes);
+ }
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ SIMD_FORCE_INLINE bool boxQuery(const GIM_AABB & box, gim_array<GUINT> & collided_results) const
+ {
+ GUINT curIndex = 0;
+ GUINT numNodes = getNodeCount();
+
+ while (curIndex < numNodes)
+ {
+ GIM_AABB bound;
+ getNodeBound(curIndex,bound);
+
+ //catch bugs in tree data
+
+ bool aabbOverlap = bound.has_collision(box);
+ bool isleafnode = isLeafNode(curIndex);
+
+ if (isleafnode && aabbOverlap)
+ {
+ collided_results.push_back(getNodeData(curIndex));
+ }
+
+ if (aabbOverlap || isleafnode)
+ {
+ //next subnode
+ curIndex++;
+ }
+ else
+ {
+ //skip node
+ curIndex+= getScapeNodeIndex(curIndex);
+ }
+ }
+ if(collided_results.size()>0) return true;
+ return false;
+ }
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ SIMD_FORCE_INLINE bool boxQueryTrans(const GIM_AABB & box,
+ const btTransform & transform, gim_array<GUINT> & collided_results) const
+ {
+ GIM_AABB transbox=box;
+ transbox.appy_transform(transform);
+ return boxQuery(transbox,collided_results);
+ }
+
+ //! returns the indices of the primitives in the m_primitive_manager
+ SIMD_FORCE_INLINE bool rayQuery(
+ const btVector3 & ray_dir,const btVector3 & ray_origin ,
+ gim_array<GUINT> & collided_results) const
+ {
+ GUINT curIndex = 0;
+ GUINT numNodes = getNodeCount();
+
+ while (curIndex < numNodes)
+ {
+ GIM_AABB bound;
+ getNodeBound(curIndex,bound);
+
+ //catch bugs in tree data
+
+ bool aabbOverlap = bound.collide_ray(ray_origin,ray_dir);
+ bool isleafnode = isLeafNode(curIndex);
+
+ if (isleafnode && aabbOverlap)
+ {
+ collided_results.push_back(getNodeData( curIndex));
+ }
+
+ if (aabbOverlap || isleafnode)
+ {
+ //next subnode
+ curIndex++;
+ }
+ else
+ {
+ //skip node
+ curIndex+= getScapeNodeIndex(curIndex);
+ }
+ }
+ if(collided_results.size()>0) return true;
+ return false;
+ }
+
+ //! tells if this set has hierarcht
+ SIMD_FORCE_INLINE bool hasHierarchy() const
+ {
+ return true;
+ }
+
+ //! tells if this set is a trimesh
+ SIMD_FORCE_INLINE bool isTrimesh() const
+ {
+ return m_primitive_manager.is_trimesh();
+ }
+
+ //! node count
+ SIMD_FORCE_INLINE GUINT getNodeCount() const
+ {
+ return m_box_tree.getNodeCount();
+ }
+
+ //! tells if the node is a leaf
+ SIMD_FORCE_INLINE bool isLeafNode(GUINT nodeindex) const
+ {
+ return m_box_tree.isLeafNode(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE GUINT getNodeData(GUINT nodeindex) const
+ {
+ return m_box_tree.getNodeData(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE void getNodeBound(GUINT nodeindex, GIM_AABB & bound) const
+ {
+ m_box_tree.getNodeBound(nodeindex, bound);
+ }
+
+ SIMD_FORCE_INLINE void setNodeBound(GUINT nodeindex, const GIM_AABB & bound)
+ {
+ m_box_tree.setNodeBound(nodeindex, bound);
+ }
+
+ SIMD_FORCE_INLINE GUINT getLeftNodeIndex(GUINT nodeindex) const
+ {
+ return m_box_tree.getLeftNodeIndex(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE GUINT getRightNodeIndex(GUINT nodeindex) const
+ {
+ return m_box_tree.getRightNodeIndex(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE GUINT getScapeNodeIndex(GUINT nodeindex) const
+ {
+ return m_box_tree.getScapeNodeIndex(nodeindex);
+ }
+
+ SIMD_FORCE_INLINE void getNodeTriangle(GUINT nodeindex,GIM_TRIANGLE & triangle) const
+ {
+ m_primitive_manager.get_primitive_triangle(getNodeData(nodeindex),triangle);
+ }
+
+};
+
+//! Class for Box Tree Sets
+/*!
+this has the GIM_BOX_TREE implementation for bounding boxes.
+*/
+template<typename _GIM_PRIMITIVE_MANAGER_PROTOTYPE>
+class GIM_BOX_TREE_SET: public GIM_BOX_TREE_TEMPLATE_SET< _GIM_PRIMITIVE_MANAGER_PROTOTYPE, GIM_BOX_TREE>
+{
+public:
+
+};
+
+
+
+
+
+/// GIM_BOX_SET collision methods
+template<typename BOX_SET_CLASS0,typename BOX_SET_CLASS1>
+class GIM_TREE_TREE_COLLIDER
+{
+public:
+ gim_pair_set * m_collision_pairs;
+ BOX_SET_CLASS0 * m_boxset0;
+ BOX_SET_CLASS1 * m_boxset1;
+ GUINT current_node0;
+ GUINT current_node1;
+ bool node0_is_leaf;
+ bool node1_is_leaf;
+ bool t0_is_trimesh;
+ bool t1_is_trimesh;
+ bool node0_has_triangle;
+ bool node1_has_triangle;
+ GIM_AABB m_box0;
+ GIM_AABB m_box1;
+ GIM_BOX_BOX_TRANSFORM_CACHE trans_cache_1to0;
+ btTransform trans_cache_0to1;
+ GIM_TRIANGLE m_tri0;
+ btVector4 m_tri0_plane;
+ GIM_TRIANGLE m_tri1;
+ btVector4 m_tri1_plane;
+
+
+public:
+ GIM_TREE_TREE_COLLIDER()
+ {
+ current_node0 = G_UINT_INFINITY;
+ current_node1 = G_UINT_INFINITY;
+ }
+protected:
+ SIMD_FORCE_INLINE void retrieve_node0_triangle(GUINT node0)
+ {
+ if(node0_has_triangle) return;
+ m_boxset0->getNodeTriangle(node0,m_tri0);
+ //transform triangle
+ m_tri0.m_vertices[0] = trans_cache_0to1(m_tri0.m_vertices[0]);
+ m_tri0.m_vertices[1] = trans_cache_0to1(m_tri0.m_vertices[1]);
+ m_tri0.m_vertices[2] = trans_cache_0to1(m_tri0.m_vertices[2]);
+ m_tri0.get_plane(m_tri0_plane);
+
+ node0_has_triangle = true;
+ }
+
+ SIMD_FORCE_INLINE void retrieve_node1_triangle(GUINT node1)
+ {
+ if(node1_has_triangle) return;
+ m_boxset1->getNodeTriangle(node1,m_tri1);
+ //transform triangle
+ m_tri1.m_vertices[0] = trans_cache_1to0.transform(m_tri1.m_vertices[0]);
+ m_tri1.m_vertices[1] = trans_cache_1to0.transform(m_tri1.m_vertices[1]);
+ m_tri1.m_vertices[2] = trans_cache_1to0.transform(m_tri1.m_vertices[2]);
+ m_tri1.get_plane(m_tri1_plane);
+
+ node1_has_triangle = true;
+ }
+
+ SIMD_FORCE_INLINE void retrieve_node0_info(GUINT node0)
+ {
+ if(node0 == current_node0) return;
+ m_boxset0->getNodeBound(node0,m_box0);
+ node0_is_leaf = m_boxset0->isLeafNode(node0);
+ node0_has_triangle = false;
+ current_node0 = node0;
+ }
+
+ SIMD_FORCE_INLINE void retrieve_node1_info(GUINT node1)
+ {
+ if(node1 == current_node1) return;
+ m_boxset1->getNodeBound(node1,m_box1);
+ node1_is_leaf = m_boxset1->isLeafNode(node1);
+ node1_has_triangle = false;
+ current_node1 = node1;
+ }
+
+ SIMD_FORCE_INLINE bool node_collision(GUINT node0 ,GUINT node1)
+ {
+ retrieve_node0_info(node0);
+ retrieve_node1_info(node1);
+ bool result = m_box0.overlapping_trans_cache(m_box1,trans_cache_1to0,true);
+ if(!result) return false;
+
+ if(t0_is_trimesh && node0_is_leaf)
+ {
+ //perform primitive vs box collision
+ retrieve_node0_triangle(node0);
+ //do triangle vs box collision
+ m_box1.increment_margin(m_tri0.m_margin);
+
+ result = m_box1.collide_triangle_exact(
+ m_tri0.m_vertices[0],m_tri0.m_vertices[1],m_tri0.m_vertices[2],m_tri0_plane);
+
+ m_box1.increment_margin(-m_tri0.m_margin);
+
+ if(!result) return false;
+ return true;
+ }
+ else if(t1_is_trimesh && node1_is_leaf)
+ {
+ //perform primitive vs box collision
+ retrieve_node1_triangle(node1);
+ //do triangle vs box collision
+ m_box0.increment_margin(m_tri1.m_margin);
+
+ result = m_box0.collide_triangle_exact(
+ m_tri1.m_vertices[0],m_tri1.m_vertices[1],m_tri1.m_vertices[2],m_tri1_plane);
+
+ m_box0.increment_margin(-m_tri1.m_margin);
+
+ if(!result) return false;
+ return true;
+ }
+ return true;
+ }
+
+ //stackless collision routine
+ void find_collision_pairs()
+ {
+ gim_pair_set stack_collisions;
+ stack_collisions.reserve(32);
+
+ //add the first pair
+ stack_collisions.push_pair(0,0);
+
+
+ while(stack_collisions.size())
+ {
+ //retrieve the last pair and pop
+ GUINT node0 = stack_collisions.back().m_index1;
+ GUINT node1 = stack_collisions.back().m_index2;
+ stack_collisions.pop_back();
+ if(node_collision(node0,node1)) // a collision is found
+ {
+ if(node0_is_leaf)
+ {
+ if(node1_is_leaf)
+ {
+ m_collision_pairs->push_pair(m_boxset0->getNodeData(node0),m_boxset1->getNodeData(node1));
+ }
+ else
+ {
+ //collide left
+ stack_collisions.push_pair(node0,m_boxset1->getLeftNodeIndex(node1));
+
+ //collide right
+ stack_collisions.push_pair(node0,m_boxset1->getRightNodeIndex(node1));
+ }
+ }
+ else
+ {
+ if(node1_is_leaf)
+ {
+ //collide left
+ stack_collisions.push_pair(m_boxset0->getLeftNodeIndex(node0),node1);
+ //collide right
+ stack_collisions.push_pair(m_boxset0->getRightNodeIndex(node0),node1);
+ }
+ else
+ {
+ GUINT left0 = m_boxset0->getLeftNodeIndex(node0);
+ GUINT right0 = m_boxset0->getRightNodeIndex(node0);
+ GUINT left1 = m_boxset1->getLeftNodeIndex(node1);
+ GUINT right1 = m_boxset1->getRightNodeIndex(node1);
+ //collide left
+ stack_collisions.push_pair(left0,left1);
+ //collide right
+ stack_collisions.push_pair(left0,right1);
+ //collide left
+ stack_collisions.push_pair(right0,left1);
+ //collide right
+ stack_collisions.push_pair(right0,right1);
+
+ }// else if node1 is not a leaf
+ }// else if node0 is not a leaf
+
+ }// if(node_collision(node0,node1))
+ }//while(stack_collisions.size())
+ }
+public:
+ void find_collision(BOX_SET_CLASS0 * boxset1, const btTransform & trans1,
+ BOX_SET_CLASS1 * boxset2, const btTransform & trans2,
+ gim_pair_set & collision_pairs, bool complete_primitive_tests = true)
+ {
+ m_collision_pairs = &collision_pairs;
+ m_boxset0 = boxset1;
+ m_boxset1 = boxset2;
+
+ trans_cache_1to0.calc_from_homogenic(trans1,trans2);
+
+ trans_cache_0to1 = trans2.inverse();
+ trans_cache_0to1 *= trans1;
+
+
+ if(complete_primitive_tests)
+ {
+ t0_is_trimesh = boxset1->getPrimitiveManager().is_trimesh();
+ t1_is_trimesh = boxset2->getPrimitiveManager().is_trimesh();
+ }
+ else
+ {
+ t0_is_trimesh = false;
+ t1_is_trimesh = false;
+ }
+
+ find_collision_pairs();
+ }
+};
+
+
+#endif // GIM_BOXPRUNING_H_INCLUDED
+
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_clip_polygon.h b/tests/bullet/src/BulletCollision/Gimpact/gim_clip_polygon.h
new file mode 100644
index 00000000..e342459c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_clip_polygon.h
@@ -0,0 +1,210 @@
+#ifndef GIM_CLIP_POLYGON_H_INCLUDED
+#define GIM_CLIP_POLYGON_H_INCLUDED
+
+/*! \file gim_tri_collision.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+//! This function calcs the distance from a 3D plane
+class DISTANCE_PLANE_3D_FUNC
+{
+public:
+ template<typename CLASS_POINT,typename CLASS_PLANE>
+ inline GREAL operator()(const CLASS_PLANE & plane, const CLASS_POINT & point)
+ {
+ return DISTANCE_PLANE_POINT(plane, point);
+ }
+};
+
+
+
+template<typename CLASS_POINT>
+SIMD_FORCE_INLINE void PLANE_CLIP_POLYGON_COLLECT(
+ const CLASS_POINT & point0,
+ const CLASS_POINT & point1,
+ GREAL dist0,
+ GREAL dist1,
+ CLASS_POINT * clipped,
+ GUINT & clipped_count)
+{
+ GUINT _prevclassif = (dist0>G_EPSILON);
+ GUINT _classif = (dist1>G_EPSILON);
+ if(_classif!=_prevclassif)
+ {
+ GREAL blendfactor = -dist0/(dist1-dist0);
+ VEC_BLEND(clipped[clipped_count],point0,point1,blendfactor);
+ clipped_count++;
+ }
+ if(!_classif)
+ {
+ VEC_COPY(clipped[clipped_count],point1);
+ clipped_count++;
+ }
+}
+
+
+//! Clips a polygon by a plane
+/*!
+*\return The count of the clipped counts
+*/
+template<typename CLASS_POINT,typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
+SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON_GENERIC(
+ const CLASS_PLANE & plane,
+ const CLASS_POINT * polygon_points,
+ GUINT polygon_point_count,
+ CLASS_POINT * clipped,DISTANCE_PLANE_FUNC distance_func)
+{
+ GUINT clipped_count = 0;
+
+
+ //clip first point
+ GREAL firstdist = distance_func(plane,polygon_points[0]);;
+ if(!(firstdist>G_EPSILON))
+ {
+ VEC_COPY(clipped[clipped_count],polygon_points[0]);
+ clipped_count++;
+ }
+
+ GREAL olddist = firstdist;
+ for(GUINT _i=1;_i<polygon_point_count;_i++)
+ {
+ GREAL dist = distance_func(plane,polygon_points[_i]);
+
+ PLANE_CLIP_POLYGON_COLLECT(
+ polygon_points[_i-1],polygon_points[_i],
+ olddist,
+ dist,
+ clipped,
+ clipped_count);
+
+
+ olddist = dist;
+ }
+
+ //RETURN TO FIRST point
+
+ PLANE_CLIP_POLYGON_COLLECT(
+ polygon_points[polygon_point_count-1],polygon_points[0],
+ olddist,
+ firstdist,
+ clipped,
+ clipped_count);
+
+ return clipped_count;
+}
+
+//! Clips a polygon by a plane
+/*!
+*\return The count of the clipped counts
+*/
+template<typename CLASS_POINT,typename CLASS_PLANE, typename DISTANCE_PLANE_FUNC>
+SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE_GENERIC(
+ const CLASS_PLANE & plane,
+ const CLASS_POINT & point0,
+ const CLASS_POINT & point1,
+ const CLASS_POINT & point2,
+ CLASS_POINT * clipped,DISTANCE_PLANE_FUNC distance_func)
+{
+ GUINT clipped_count = 0;
+
+ //clip first point
+ GREAL firstdist = distance_func(plane,point0);;
+ if(!(firstdist>G_EPSILON))
+ {
+ VEC_COPY(clipped[clipped_count],point0);
+ clipped_count++;
+ }
+
+ // point 1
+ GREAL olddist = firstdist;
+ GREAL dist = distance_func(plane,point1);
+
+ PLANE_CLIP_POLYGON_COLLECT(
+ point0,point1,
+ olddist,
+ dist,
+ clipped,
+ clipped_count);
+
+ olddist = dist;
+
+
+ // point 2
+ dist = distance_func(plane,point2);
+
+ PLANE_CLIP_POLYGON_COLLECT(
+ point1,point2,
+ olddist,
+ dist,
+ clipped,
+ clipped_count);
+ olddist = dist;
+
+
+
+ //RETURN TO FIRST point
+ PLANE_CLIP_POLYGON_COLLECT(
+ point2,point0,
+ olddist,
+ firstdist,
+ clipped,
+ clipped_count);
+
+ return clipped_count;
+}
+
+
+template<typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE GUINT PLANE_CLIP_POLYGON3D(
+ const CLASS_PLANE & plane,
+ const CLASS_POINT * polygon_points,
+ GUINT polygon_point_count,
+ CLASS_POINT * clipped)
+{
+ return PLANE_CLIP_POLYGON_GENERIC<CLASS_POINT,CLASS_PLANE>(plane,polygon_points,polygon_point_count,clipped,DISTANCE_PLANE_3D_FUNC());
+}
+
+
+template<typename CLASS_POINT,typename CLASS_PLANE>
+SIMD_FORCE_INLINE GUINT PLANE_CLIP_TRIANGLE3D(
+ const CLASS_PLANE & plane,
+ const CLASS_POINT & point0,
+ const CLASS_POINT & point1,
+ const CLASS_POINT & point2,
+ CLASS_POINT * clipped)
+{
+ return PLANE_CLIP_TRIANGLE_GENERIC<CLASS_POINT,CLASS_PLANE>(plane,point0,point1,point2,clipped,DISTANCE_PLANE_3D_FUNC());
+}
+
+
+
+#endif // GIM_TRI_COLLISION_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_contact.cpp b/tests/bullet/src/BulletCollision/Gimpact/gim_contact.cpp
new file mode 100644
index 00000000..20e41de0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_contact.cpp
@@ -0,0 +1,146 @@
+
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "gim_contact.h"
+
+#define MAX_COINCIDENT 8
+
+void gim_contact_array::merge_contacts(
+ const gim_contact_array & contacts, bool normal_contact_average)
+{
+ clear();
+
+ if(contacts.size()==1)
+ {
+ push_back(contacts.back());
+ return;
+ }
+
+ gim_array<GIM_RSORT_TOKEN> keycontacts(contacts.size());
+ keycontacts.resize(contacts.size(),false);
+
+ //fill key contacts
+
+ GUINT i;
+
+ for (i = 0;i<contacts.size() ;i++ )
+ {
+ keycontacts[i].m_key = contacts[i].calc_key_contact();
+ keycontacts[i].m_value = i;
+ }
+
+ //sort keys
+ gim_heap_sort(keycontacts.pointer(),keycontacts.size(),GIM_RSORT_TOKEN_COMPARATOR());
+
+ // Merge contacts
+
+ GUINT coincident_count=0;
+ btVector3 coincident_normals[MAX_COINCIDENT];
+
+ GUINT last_key = keycontacts[0].m_key;
+ GUINT key = 0;
+
+ push_back(contacts[keycontacts[0].m_value]);
+ GIM_CONTACT * pcontact = &back();
+
+
+
+ for( i=1;i<keycontacts.size();i++)
+ {
+ key = keycontacts[i].m_key;
+ const GIM_CONTACT * scontact = &contacts[keycontacts[i].m_value];
+
+ if(last_key == key)//same points
+ {
+ //merge contact
+ if(pcontact->m_depth - CONTACT_DIFF_EPSILON > scontact->m_depth)//)
+ {
+ *pcontact = *scontact;
+ coincident_count = 0;
+ }
+ else if(normal_contact_average)
+ {
+ if(btFabs(pcontact->m_depth - scontact->m_depth)<CONTACT_DIFF_EPSILON)
+ {
+ if(coincident_count<MAX_COINCIDENT)
+ {
+ coincident_normals[coincident_count] = scontact->m_normal;
+ coincident_count++;
+ }
+ }
+ }
+ }
+ else
+ {//add new contact
+
+ if(normal_contact_average && coincident_count>0)
+ {
+ pcontact->interpolate_normals(coincident_normals,coincident_count);
+ coincident_count = 0;
+ }
+
+ push_back(*scontact);
+ pcontact = &back();
+ }
+ last_key = key;
+ }
+}
+
+void gim_contact_array::merge_contacts_unique(const gim_contact_array & contacts)
+{
+ clear();
+
+ if(contacts.size()==1)
+ {
+ push_back(contacts.back());
+ return;
+ }
+
+ GIM_CONTACT average_contact = contacts.back();
+
+ for (GUINT i=1;i<contacts.size() ;i++ )
+ {
+ average_contact.m_point += contacts[i].m_point;
+ average_contact.m_normal += contacts[i].m_normal * contacts[i].m_depth;
+ }
+
+ //divide
+ GREAL divide_average = 1.0f/((GREAL)contacts.size());
+
+ average_contact.m_point *= divide_average;
+
+ average_contact.m_normal *= divide_average;
+
+ average_contact.m_depth = average_contact.m_normal.length();
+
+ average_contact.m_normal /= average_contact.m_depth;
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_contact.h b/tests/bullet/src/BulletCollision/Gimpact/gim_contact.h
new file mode 100644
index 00000000..5d9f8ef8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_contact.h
@@ -0,0 +1,164 @@
+#ifndef GIM_CONTACT_H_INCLUDED
+#define GIM_CONTACT_H_INCLUDED
+
+/*! \file gim_contact.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+#include "gim_geometry.h"
+#include "gim_radixsort.h"
+#include "gim_array.h"
+
+
+/**
+Configuration var for applying interpolation of contact normals
+*/
+#define NORMAL_CONTACT_AVERAGE 1
+#define CONTACT_DIFF_EPSILON 0.00001f
+
+/// Structure for collision results
+///Functions for managing and sorting contacts resulting from a collision query.
+///Contact lists must be create by calling \ref GIM_CREATE_CONTACT_LIST
+///After querys, contact lists must be destroy by calling \ref GIM_DYNARRAY_DESTROY
+///Contacts can be merge for avoid duplicate results by calling \ref gim_merge_contacts
+class GIM_CONTACT
+{
+public:
+ btVector3 m_point;
+ btVector3 m_normal;
+ GREAL m_depth;//Positive value indicates interpenetration
+ GREAL m_distance;//Padding not for use
+ GUINT m_feature1;//Face number
+ GUINT m_feature2;//Face number
+public:
+ GIM_CONTACT()
+ {
+ }
+
+ GIM_CONTACT(const GIM_CONTACT & contact):
+ m_point(contact.m_point),
+ m_normal(contact.m_normal),
+ m_depth(contact.m_depth),
+ m_feature1(contact.m_feature1),
+ m_feature2(contact.m_feature2)
+ {
+ m_point = contact.m_point;
+ m_normal = contact.m_normal;
+ m_depth = contact.m_depth;
+ m_feature1 = contact.m_feature1;
+ m_feature2 = contact.m_feature2;
+ }
+
+ GIM_CONTACT(const btVector3 &point,const btVector3 & normal,
+ GREAL depth, GUINT feature1, GUINT feature2):
+ m_point(point),
+ m_normal(normal),
+ m_depth(depth),
+ m_feature1(feature1),
+ m_feature2(feature2)
+ {
+ }
+
+ //! Calcs key for coord classification
+ SIMD_FORCE_INLINE GUINT calc_key_contact() const
+ {
+ GINT _coords[] = {
+ (GINT)(m_point[0]*1000.0f+1.0f),
+ (GINT)(m_point[1]*1333.0f),
+ (GINT)(m_point[2]*2133.0f+3.0f)};
+ GUINT _hash=0;
+ GUINT *_uitmp = (GUINT *)(&_coords[0]);
+ _hash = *_uitmp;
+ _uitmp++;
+ _hash += (*_uitmp)<<4;
+ _uitmp++;
+ _hash += (*_uitmp)<<8;
+ return _hash;
+ }
+
+ SIMD_FORCE_INLINE void interpolate_normals( btVector3 * normals,GUINT normal_count)
+ {
+ btVector3 vec_sum(m_normal);
+ for(GUINT i=0;i<normal_count;i++)
+ {
+ vec_sum += normals[i];
+ }
+
+ GREAL vec_sum_len = vec_sum.length2();
+ if(vec_sum_len <CONTACT_DIFF_EPSILON) return;
+
+ GIM_INV_SQRT(vec_sum_len,vec_sum_len); // 1/sqrt(vec_sum_len)
+
+ m_normal = vec_sum*vec_sum_len;
+ }
+
+};
+
+
+class gim_contact_array:public gim_array<GIM_CONTACT>
+{
+public:
+ gim_contact_array():gim_array<GIM_CONTACT>(64)
+ {
+ }
+
+ SIMD_FORCE_INLINE void push_contact(const btVector3 &point,const btVector3 & normal,
+ GREAL depth, GUINT feature1, GUINT feature2)
+ {
+ push_back_mem();
+ GIM_CONTACT & newele = back();
+ newele.m_point = point;
+ newele.m_normal = normal;
+ newele.m_depth = depth;
+ newele.m_feature1 = feature1;
+ newele.m_feature2 = feature2;
+ }
+
+ SIMD_FORCE_INLINE void push_triangle_contacts(
+ const GIM_TRIANGLE_CONTACT_DATA & tricontact,
+ GUINT feature1,GUINT feature2)
+ {
+ for(GUINT i = 0;i<tricontact.m_point_count ;i++ )
+ {
+ push_back_mem();
+ GIM_CONTACT & newele = back();
+ newele.m_point = tricontact.m_points[i];
+ newele.m_normal = tricontact.m_separating_normal;
+ newele.m_depth = tricontact.m_penetration_depth;
+ newele.m_feature1 = feature1;
+ newele.m_feature2 = feature2;
+ }
+ }
+
+ void merge_contacts(const gim_contact_array & contacts, bool normal_contact_average = true);
+ void merge_contacts_unique(const gim_contact_array & contacts);
+};
+
+#endif // GIM_CONTACT_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_geom_types.h b/tests/bullet/src/BulletCollision/Gimpact/gim_geom_types.h
new file mode 100644
index 00000000..6b8f9ea6
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_geom_types.h
@@ -0,0 +1,97 @@
+#ifndef GIM_GEOM_TYPES_H_INCLUDED
+#define GIM_GEOM_TYPES_H_INCLUDED
+
+/*! \file gim_geom_types.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+#include "gim_math.h"
+
+
+
+//! Short Integer vector 2D
+typedef GSHORT vec2s[2];
+//! Integer vector 3D
+typedef GSHORT vec3s[3];
+//! Integer vector 4D
+typedef GSHORT vec4s[4];
+
+//! Short Integer vector 2D
+typedef GUSHORT vec2us[2];
+//! Integer vector 3D
+typedef GUSHORT vec3us[3];
+//! Integer vector 4D
+typedef GUSHORT vec4us[4];
+
+//! Integer vector 2D
+typedef GINT vec2i[2];
+//! Integer vector 3D
+typedef GINT vec3i[3];
+//! Integer vector 4D
+typedef GINT vec4i[4];
+
+//! Unsigned Integer vector 2D
+typedef GUINT vec2ui[2];
+//! Unsigned Integer vector 3D
+typedef GUINT vec3ui[3];
+//! Unsigned Integer vector 4D
+typedef GUINT vec4ui[4];
+
+//! Float vector 2D
+typedef GREAL vec2f[2];
+//! Float vector 3D
+typedef GREAL vec3f[3];
+//! Float vector 4D
+typedef GREAL vec4f[4];
+
+//! Double vector 2D
+typedef GREAL2 vec2d[2];
+//! Float vector 3D
+typedef GREAL2 vec3d[3];
+//! Float vector 4D
+typedef GREAL2 vec4d[4];
+
+//! Matrix 2D, row ordered
+typedef GREAL mat2f[2][2];
+//! Matrix 3D, row ordered
+typedef GREAL mat3f[3][3];
+//! Matrix 4D, row ordered
+typedef GREAL mat4f[4][4];
+
+//! Quaternion
+typedef GREAL quatf[4];
+
+//typedef struct _aabb3f aabb3f;
+
+
+
+#endif // GIM_GEOM_TYPES_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_geometry.h b/tests/bullet/src/BulletCollision/Gimpact/gim_geometry.h
new file mode 100644
index 00000000..c67a6991
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_geometry.h
@@ -0,0 +1,42 @@
+#ifndef GIM_GEOMETRY_H_INCLUDED
+#define GIM_GEOMETRY_H_INCLUDED
+
+/*! \file gim_geometry.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+///Additional Headers for Collision
+#include "gim_basic_geometry_operations.h"
+#include "gim_clip_polygon.h"
+#include "gim_box_collision.h"
+#include "gim_tri_collision.h"
+
+#endif // GIM_VECTOR_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_hash_table.h b/tests/bullet/src/BulletCollision/Gimpact/gim_hash_table.h
new file mode 100644
index 00000000..e4237c2c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_hash_table.h
@@ -0,0 +1,902 @@
+#ifndef GIM_HASH_TABLE_H_INCLUDED
+#define GIM_HASH_TABLE_H_INCLUDED
+/*! \file gim_trimesh_data.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "gim_radixsort.h"
+
+
+#define GIM_INVALID_HASH 0xffffffff //!< A very very high value
+#define GIM_DEFAULT_HASH_TABLE_SIZE 380
+#define GIM_DEFAULT_HASH_TABLE_NODE_SIZE 4
+#define GIM_HASH_TABLE_GROW_FACTOR 2
+
+#define GIM_MIN_RADIX_SORT_SIZE 860 //!< calibrated on a PIII
+
+template<typename T>
+struct GIM_HASH_TABLE_NODE
+{
+ GUINT m_key;
+ T m_data;
+ GIM_HASH_TABLE_NODE()
+ {
+ }
+
+ GIM_HASH_TABLE_NODE(const GIM_HASH_TABLE_NODE & value)
+ {
+ m_key = value.m_key;
+ m_data = value.m_data;
+ }
+
+ GIM_HASH_TABLE_NODE(GUINT key, const T & data)
+ {
+ m_key = key;
+ m_data = data;
+ }
+
+ bool operator <(const GIM_HASH_TABLE_NODE<T> & other) const
+ {
+ ///inverse order, further objects are first
+ if(m_key < other.m_key) return true;
+ return false;
+ }
+
+ bool operator >(const GIM_HASH_TABLE_NODE<T> & other) const
+ {
+ ///inverse order, further objects are first
+ if(m_key > other.m_key) return true;
+ return false;
+ }
+
+ bool operator ==(const GIM_HASH_TABLE_NODE<T> & other) const
+ {
+ ///inverse order, further objects are first
+ if(m_key == other.m_key) return true;
+ return false;
+ }
+};
+
+///Macro for getting the key
+class GIM_HASH_NODE_GET_KEY
+{
+public:
+ template<class T>
+ inline GUINT operator()( const T& a)
+ {
+ return a.m_key;
+ }
+};
+
+
+
+///Macro for comparing the key and the element
+class GIM_HASH_NODE_CMP_KEY_MACRO
+{
+public:
+ template<class T>
+ inline int operator() ( const T& a, GUINT key)
+ {
+ return ((int)(a.m_key - key));
+ }
+};
+
+///Macro for comparing Hash nodes
+class GIM_HASH_NODE_CMP_MACRO
+{
+public:
+ template<class T>
+ inline int operator() ( const T& a, const T& b )
+ {
+ return ((int)(a.m_key - b.m_key));
+ }
+};
+
+
+
+
+
+//! Sorting for hash table
+/*!
+switch automatically between quicksort and radixsort
+*/
+template<typename T>
+void gim_sort_hash_node_array(T * array, GUINT array_count)
+{
+ if(array_count<GIM_MIN_RADIX_SORT_SIZE)
+ {
+ gim_heap_sort(array,array_count,GIM_HASH_NODE_CMP_MACRO());
+ }
+ else
+ {
+ memcopy_elements_func cmpfunc;
+ gim_radix_sort(array,array_count,GIM_HASH_NODE_GET_KEY(),cmpfunc);
+ }
+}
+
+
+
+
+
+
+// Note: assumes long is at least 32 bits.
+#define GIM_NUM_PRIME 28
+
+static const GUINT gim_prime_list[GIM_NUM_PRIME] =
+{
+ 53ul, 97ul, 193ul, 389ul, 769ul,
+ 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
+ 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
+ 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
+ 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
+ 1610612741ul, 3221225473ul, 4294967291ul
+};
+
+inline GUINT gim_next_prime(GUINT number)
+{
+ //Find nearest upper prime
+ GUINT result_ind = 0;
+ gim_binary_search(gim_prime_list,0,(GIM_NUM_PRIME-2),number,result_ind);
+
+ // inv: result_ind < 28
+ return gim_prime_list[result_ind];
+}
+
+
+
+//! A compact hash table implementation
+/*!
+A memory aligned compact hash table that coud be treated as an array.
+It could be a simple sorted array without the overhead of the hash key bucked, or could
+be a formely hash table with an array of keys.
+You can use switch_to_hashtable() and switch_to_sorted_array for saving space or increase speed.
+</br>
+
+<ul>
+<li> if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes.
+When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable.
+<li> If node_size != 0, then this container becomes a hash table for ever
+</ul>
+
+*/
+template<class T>
+class gim_hash_table
+{
+protected:
+ typedef GIM_HASH_TABLE_NODE<T> _node_type;
+
+ //!The nodes
+ //array< _node_type, SuperAllocator<_node_type> > m_nodes;
+ gim_array< _node_type > m_nodes;
+ //SuperBufferedArray< _node_type > m_nodes;
+ bool m_sorted;
+
+ ///Hash table data management. The hash table has the indices to the corresponding m_nodes array
+ GUINT * m_hash_table;//!<
+ GUINT m_table_size;//!<
+ GUINT m_node_size;//!<
+ GUINT m_min_hash_table_size;
+
+
+
+ //! Returns the cell index
+ inline GUINT _find_cell(GUINT hashkey)
+ {
+ _node_type * nodesptr = m_nodes.pointer();
+ GUINT start_index = (hashkey%m_table_size)*m_node_size;
+ GUINT end_index = start_index + m_node_size;
+
+ while(start_index<end_index)
+ {
+ GUINT value = m_hash_table[start_index];
+ if(value != GIM_INVALID_HASH)
+ {
+ if(nodesptr[value].m_key == hashkey) return start_index;
+ }
+ start_index++;
+ }
+ return GIM_INVALID_HASH;
+ }
+
+ //! Find the avaliable cell for the hashkey, and return an existing cell if it has the same hash key
+ inline GUINT _find_avaliable_cell(GUINT hashkey)
+ {
+ _node_type * nodesptr = m_nodes.pointer();
+ GUINT avaliable_index = GIM_INVALID_HASH;
+ GUINT start_index = (hashkey%m_table_size)*m_node_size;
+ GUINT end_index = start_index + m_node_size;
+
+ while(start_index<end_index)
+ {
+ GUINT value = m_hash_table[start_index];
+ if(value == GIM_INVALID_HASH)
+ {
+ if(avaliable_index==GIM_INVALID_HASH)
+ {
+ avaliable_index = start_index;
+ }
+ }
+ else if(nodesptr[value].m_key == hashkey)
+ {
+ return start_index;
+ }
+ start_index++;
+ }
+ return avaliable_index;
+ }
+
+
+
+ //! reserves the memory for the hash table.
+ /*!
+ \pre hash table must be empty
+ \post reserves the memory for the hash table, an initializes all elements to GIM_INVALID_HASH.
+ */
+ inline void _reserve_table_memory(GUINT newtablesize)
+ {
+ if(newtablesize==0) return;
+ if(m_node_size==0) return;
+
+ //Get a Prime size
+
+ m_table_size = gim_next_prime(newtablesize);
+
+ GUINT datasize = m_table_size*m_node_size;
+ //Alloc the data buffer
+ m_hash_table = (GUINT *)gim_alloc(datasize*sizeof(GUINT));
+ }
+
+ inline void _invalidate_keys()
+ {
+ GUINT datasize = m_table_size*m_node_size;
+ for(GUINT i=0;i<datasize;i++)
+ {
+ m_hash_table[i] = GIM_INVALID_HASH;// invalidate keys
+ }
+ }
+
+ //! Clear all memory for the hash table
+ inline void _clear_table_memory()
+ {
+ if(m_hash_table==NULL) return;
+ gim_free(m_hash_table);
+ m_hash_table = NULL;
+ m_table_size = 0;
+ }
+
+ //! Invalidates the keys (Assigning GIM_INVALID_HASH to all) Reorders the hash keys
+ inline void _rehash()
+ {
+ _invalidate_keys();
+
+ _node_type * nodesptr = m_nodes.pointer();
+ for(GUINT i=0;i<(GUINT)m_nodes.size();i++)
+ {
+ GUINT nodekey = nodesptr[i].m_key;
+ if(nodekey != GIM_INVALID_HASH)
+ {
+ //Search for the avaliable cell in buffer
+ GUINT index = _find_avaliable_cell(nodekey);
+
+
+ if(m_hash_table[index]!=GIM_INVALID_HASH)
+ {//The new index is alreade used... discard this new incomming object, repeated key
+ btAssert(m_hash_table[index]==nodekey);
+ nodesptr[i].m_key = GIM_INVALID_HASH;
+ }
+ else
+ {
+ //;
+ //Assign the value for alloc
+ m_hash_table[index] = i;
+ }
+ }
+ }
+ }
+
+ //! Resize hash table indices
+ inline void _resize_table(GUINT newsize)
+ {
+ //Clear memory
+ _clear_table_memory();
+ //Alloc the data
+ _reserve_table_memory(newsize);
+ //Invalidate keys and rehash
+ _rehash();
+ }
+
+ //! Destroy hash table memory
+ inline void _destroy()
+ {
+ if(m_hash_table==NULL) return;
+ _clear_table_memory();
+ }
+
+ //! Finds an avaliable hash table cell, and resizes the table if there isn't space
+ inline GUINT _assign_hash_table_cell(GUINT hashkey)
+ {
+ GUINT cell_index = _find_avaliable_cell(hashkey);
+
+ if(cell_index==GIM_INVALID_HASH)
+ {
+ //rehashing
+ _resize_table(m_table_size+1);
+ GUINT cell_index = _find_avaliable_cell(hashkey);
+ btAssert(cell_index!=GIM_INVALID_HASH);
+ }
+ return cell_index;
+ }
+
+ //! erase by index in hash table
+ inline bool _erase_by_index_hash_table(GUINT index)
+ {
+ if(index >= m_nodes.size()) return false;
+ if(m_nodes[index].m_key != GIM_INVALID_HASH)
+ {
+ //Search for the avaliable cell in buffer
+ GUINT cell_index = _find_cell(m_nodes[index].m_key);
+
+ btAssert(cell_index!=GIM_INVALID_HASH);
+ btAssert(m_hash_table[cell_index]==index);
+
+ m_hash_table[cell_index] = GIM_INVALID_HASH;
+ }
+
+ return this->_erase_unsorted(index);
+ }
+
+ //! erase by key in hash table
+ inline bool _erase_hash_table(GUINT hashkey)
+ {
+ if(hashkey == GIM_INVALID_HASH) return false;
+
+ //Search for the avaliable cell in buffer
+ GUINT cell_index = _find_cell(hashkey);
+ if(cell_index ==GIM_INVALID_HASH) return false;
+
+ GUINT index = m_hash_table[cell_index];
+ m_hash_table[cell_index] = GIM_INVALID_HASH;
+
+ return this->_erase_unsorted(index);
+ }
+
+
+
+ //! insert an element in hash table
+ /*!
+ If the element exists, this won't insert the element
+ \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted
+ If so, the element has been inserted at the last position of the array.
+ */
+ inline GUINT _insert_hash_table(GUINT hashkey, const T & value)
+ {
+ if(hashkey==GIM_INVALID_HASH)
+ {
+ //Insert anyway
+ _insert_unsorted(hashkey,value);
+ return GIM_INVALID_HASH;
+ }
+
+ GUINT cell_index = _assign_hash_table_cell(hashkey);
+
+ GUINT value_key = m_hash_table[cell_index];
+
+ if(value_key!= GIM_INVALID_HASH) return value_key;// Not overrited
+
+ m_hash_table[cell_index] = m_nodes.size();
+
+ _insert_unsorted(hashkey,value);
+ return GIM_INVALID_HASH;
+ }
+
+ //! insert an element in hash table.
+ /*!
+ If the element exists, this replaces the element.
+ \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted
+ If so, the element has been inserted at the last position of the array.
+ */
+ inline GUINT _insert_hash_table_replace(GUINT hashkey, const T & value)
+ {
+ if(hashkey==GIM_INVALID_HASH)
+ {
+ //Insert anyway
+ _insert_unsorted(hashkey,value);
+ return GIM_INVALID_HASH;
+ }
+
+ GUINT cell_index = _assign_hash_table_cell(hashkey);
+
+ GUINT value_key = m_hash_table[cell_index];
+
+ if(value_key!= GIM_INVALID_HASH)
+ {//replaces the existing
+ m_nodes[value_key] = _node_type(hashkey,value);
+ return value_key;// index of the replaced element
+ }
+
+ m_hash_table[cell_index] = m_nodes.size();
+
+ _insert_unsorted(hashkey,value);
+ return GIM_INVALID_HASH;
+
+ }
+
+
+ ///Sorted array data management. The hash table has the indices to the corresponding m_nodes array
+ inline bool _erase_sorted(GUINT index)
+ {
+ if(index>=(GUINT)m_nodes.size()) return false;
+ m_nodes.erase_sorted(index);
+ if(m_nodes.size()<2) m_sorted = false;
+ return true;
+ }
+
+ //! faster, but unsorted
+ inline bool _erase_unsorted(GUINT index)
+ {
+ if(index>=m_nodes.size()) return false;
+
+ GUINT lastindex = m_nodes.size()-1;
+ if(index<lastindex && m_hash_table!=0)
+ {
+ GUINT hashkey = m_nodes[lastindex].m_key;
+ if(hashkey!=GIM_INVALID_HASH)
+ {
+ //update the new position of the last element
+ GUINT cell_index = _find_cell(hashkey);
+ btAssert(cell_index!=GIM_INVALID_HASH);
+ //new position of the last element which will be swaped
+ m_hash_table[cell_index] = index;
+ }
+ }
+ m_nodes.erase(index);
+ m_sorted = false;
+ return true;
+ }
+
+ //! Insert in position ordered
+ /*!
+ Also checks if it is needed to transform this container to a hash table, by calling check_for_switching_to_hashtable
+ */
+ inline void _insert_in_pos(GUINT hashkey, const T & value, GUINT pos)
+ {
+ m_nodes.insert(_node_type(hashkey,value),pos);
+ this->check_for_switching_to_hashtable();
+ }
+
+ //! Insert an element in an ordered array
+ inline GUINT _insert_sorted(GUINT hashkey, const T & value)
+ {
+ if(hashkey==GIM_INVALID_HASH || size()==0)
+ {
+ m_nodes.push_back(_node_type(hashkey,value));
+ return GIM_INVALID_HASH;
+ }
+ //Insert at last position
+ //Sort element
+
+
+ GUINT result_ind=0;
+ GUINT last_index = m_nodes.size()-1;
+ _node_type * ptr = m_nodes.pointer();
+
+ bool found = gim_binary_search_ex(
+ ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO());
+
+
+ //Insert before found index
+ if(found)
+ {
+ return result_ind;
+ }
+ else
+ {
+ _insert_in_pos(hashkey, value, result_ind);
+ }
+ return GIM_INVALID_HASH;
+ }
+
+ inline GUINT _insert_sorted_replace(GUINT hashkey, const T & value)
+ {
+ if(hashkey==GIM_INVALID_HASH || size()==0)
+ {
+ m_nodes.push_back(_node_type(hashkey,value));
+ return GIM_INVALID_HASH;
+ }
+ //Insert at last position
+ //Sort element
+ GUINT result_ind;
+ GUINT last_index = m_nodes.size()-1;
+ _node_type * ptr = m_nodes.pointer();
+
+ bool found = gim_binary_search_ex(
+ ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO());
+
+ //Insert before found index
+ if(found)
+ {
+ m_nodes[result_ind] = _node_type(hashkey,value);
+ }
+ else
+ {
+ _insert_in_pos(hashkey, value, result_ind);
+ }
+ return result_ind;
+ }
+
+ //! Fast insertion in m_nodes array
+ inline GUINT _insert_unsorted(GUINT hashkey, const T & value)
+ {
+ m_nodes.push_back(_node_type(hashkey,value));
+ m_sorted = false;
+ return GIM_INVALID_HASH;
+ }
+
+
+
+public:
+
+ /*!
+ <li> if node_size = 0, then this container becomes a simple sorted array allocator. reserve_size is used for reserve memory in m_nodes.
+ When the array size reaches the size equivalent to 'min_hash_table_size', then it becomes a hash table by calling check_for_switching_to_hashtable.
+ <li> If node_size != 0, then this container becomes a hash table for ever
+ </ul>
+ */
+ gim_hash_table(GUINT reserve_size = GIM_DEFAULT_HASH_TABLE_SIZE,
+ GUINT node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE,
+ GUINT min_hash_table_size = GIM_INVALID_HASH)
+ {
+ m_hash_table = NULL;
+ m_table_size = 0;
+ m_sorted = false;
+ m_node_size = node_size;
+ m_min_hash_table_size = min_hash_table_size;
+
+ if(m_node_size!=0)
+ {
+ if(reserve_size!=0)
+ {
+ m_nodes.reserve(reserve_size);
+ _reserve_table_memory(reserve_size);
+ _invalidate_keys();
+ }
+ else
+ {
+ m_nodes.reserve(GIM_DEFAULT_HASH_TABLE_SIZE);
+ _reserve_table_memory(GIM_DEFAULT_HASH_TABLE_SIZE);
+ _invalidate_keys();
+ }
+ }
+ else if(reserve_size!=0)
+ {
+ m_nodes.reserve(reserve_size);
+ }
+
+ }
+
+ ~gim_hash_table()
+ {
+ _destroy();
+ }
+
+ inline bool is_hash_table()
+ {
+ if(m_hash_table) return true;
+ return false;
+ }
+
+ inline bool is_sorted()
+ {
+ if(size()<2) return true;
+ return m_sorted;
+ }
+
+ bool sort()
+ {
+ if(is_sorted()) return true;
+ if(m_nodes.size()<2) return false;
+
+
+ _node_type * ptr = m_nodes.pointer();
+ GUINT siz = m_nodes.size();
+ gim_sort_hash_node_array(ptr,siz);
+ m_sorted=true;
+
+
+
+ if(m_hash_table)
+ {
+ _rehash();
+ }
+ return true;
+ }
+
+ bool switch_to_hashtable()
+ {
+ if(m_hash_table) return false;
+ if(m_node_size==0) m_node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE;
+ if(m_nodes.size()<GIM_DEFAULT_HASH_TABLE_SIZE)
+ {
+ _resize_table(GIM_DEFAULT_HASH_TABLE_SIZE);
+ }
+ else
+ {
+ _resize_table(m_nodes.size()+1);
+ }
+
+ return true;
+ }
+
+ bool switch_to_sorted_array()
+ {
+ if(m_hash_table==NULL) return true;
+ _clear_table_memory();
+ return sort();
+ }
+
+ //!If the container reaches the
+ bool check_for_switching_to_hashtable()
+ {
+ if(this->m_hash_table) return true;
+
+ if(!(m_nodes.size()< m_min_hash_table_size))
+ {
+ if(m_node_size == 0)
+ {
+ m_node_size = GIM_DEFAULT_HASH_TABLE_NODE_SIZE;
+ }
+
+ _resize_table(m_nodes.size()+1);
+ return true;
+ }
+ return false;
+ }
+
+ inline void set_sorted(bool value)
+ {
+ m_sorted = value;
+ }
+
+ //! Retrieves the amount of keys.
+ inline GUINT size() const
+ {
+ return m_nodes.size();
+ }
+
+ //! Retrieves the hash key.
+ inline GUINT get_key(GUINT index) const
+ {
+ return m_nodes[index].m_key;
+ }
+
+ //! Retrieves the value by index
+ /*!
+ */
+ inline T * get_value_by_index(GUINT index)
+ {
+ return &m_nodes[index].m_data;
+ }
+
+ inline const T& operator[](GUINT index) const
+ {
+ return m_nodes[index].m_data;
+ }
+
+ inline T& operator[](GUINT index)
+ {
+ return m_nodes[index].m_data;
+ }
+
+ //! Finds the index of the element with the key
+ /*!
+ \return the index in the array of the existing element,or GIM_INVALID_HASH if the element has been inserted
+ If so, the element has been inserted at the last position of the array.
+ */
+ inline GUINT find(GUINT hashkey)
+ {
+ if(m_hash_table)
+ {
+ GUINT cell_index = _find_cell(hashkey);
+ if(cell_index==GIM_INVALID_HASH) return GIM_INVALID_HASH;
+ return m_hash_table[cell_index];
+ }
+ GUINT last_index = m_nodes.size();
+ if(last_index<2)
+ {
+ if(last_index==0) return GIM_INVALID_HASH;
+ if(m_nodes[0].m_key == hashkey) return 0;
+ return GIM_INVALID_HASH;
+ }
+ else if(m_sorted)
+ {
+ //Binary search
+ GUINT result_ind = 0;
+ last_index--;
+ _node_type * ptr = m_nodes.pointer();
+
+ bool found = gim_binary_search_ex(ptr,0,last_index,result_ind,hashkey,GIM_HASH_NODE_CMP_KEY_MACRO());
+
+
+ if(found) return result_ind;
+ }
+ return GIM_INVALID_HASH;
+ }
+
+ //! Retrieves the value associated with the index
+ /*!
+ \return the found element, or null
+ */
+ inline T * get_value(GUINT hashkey)
+ {
+ GUINT index = find(hashkey);
+ if(index == GIM_INVALID_HASH) return NULL;
+ return &m_nodes[index].m_data;
+ }
+
+
+ /*!
+ */
+ inline bool erase_by_index(GUINT index)
+ {
+ if(index > m_nodes.size()) return false;
+
+ if(m_hash_table == NULL)
+ {
+ if(is_sorted())
+ {
+ return this->_erase_sorted(index);
+ }
+ else
+ {
+ return this->_erase_unsorted(index);
+ }
+ }
+ else
+ {
+ return this->_erase_by_index_hash_table(index);
+ }
+ return false;
+ }
+
+
+
+ inline bool erase_by_index_unsorted(GUINT index)
+ {
+ if(index > m_nodes.size()) return false;
+
+ if(m_hash_table == NULL)
+ {
+ return this->_erase_unsorted(index);
+ }
+ else
+ {
+ return this->_erase_by_index_hash_table(index);
+ }
+ return false;
+ }
+
+
+
+ /*!
+
+ */
+ inline bool erase_by_key(GUINT hashkey)
+ {
+ if(size()==0) return false;
+
+ if(m_hash_table)
+ {
+ return this->_erase_hash_table(hashkey);
+ }
+ //Binary search
+
+ if(is_sorted()==false) return false;
+
+ GUINT result_ind = find(hashkey);
+ if(result_ind!= GIM_INVALID_HASH)
+ {
+ return this->_erase_sorted(result_ind);
+ }
+ return false;
+ }
+
+ void clear()
+ {
+ m_nodes.clear();
+
+ if(m_hash_table==NULL) return;
+ GUINT datasize = m_table_size*m_node_size;
+ //Initialize the hashkeys.
+ GUINT i;
+ for(i=0;i<datasize;i++)
+ {
+ m_hash_table[i] = GIM_INVALID_HASH;// invalidate keys
+ }
+ m_sorted = false;
+ }
+
+ //! Insert an element into the hash
+ /*!
+ \return If GIM_INVALID_HASH, the object has been inserted succesfully. Else it returns the position
+ of the existing element.
+ */
+ inline GUINT insert(GUINT hashkey, const T & element)
+ {
+ if(m_hash_table)
+ {
+ return this->_insert_hash_table(hashkey,element);
+ }
+ if(this->is_sorted())
+ {
+ return this->_insert_sorted(hashkey,element);
+ }
+ return this->_insert_unsorted(hashkey,element);
+ }
+
+ //! Insert an element into the hash, and could overrite an existing object with the same hash.
+ /*!
+ \return If GIM_INVALID_HASH, the object has been inserted succesfully. Else it returns the position
+ of the replaced element.
+ */
+ inline GUINT insert_override(GUINT hashkey, const T & element)
+ {
+ if(m_hash_table)
+ {
+ return this->_insert_hash_table_replace(hashkey,element);
+ }
+ if(this->is_sorted())
+ {
+ return this->_insert_sorted_replace(hashkey,element);
+ }
+ this->_insert_unsorted(hashkey,element);
+ return m_nodes.size();
+ }
+
+
+
+ //! Insert an element into the hash,But if this container is a sorted array, this inserts it unsorted
+ /*!
+ */
+ inline GUINT insert_unsorted(GUINT hashkey,const T & element)
+ {
+ if(m_hash_table)
+ {
+ return this->_insert_hash_table(hashkey,element);
+ }
+ return this->_insert_unsorted(hashkey,element);
+ }
+
+
+};
+
+
+
+#endif // GIM_CONTAINERS_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_linear_math.h b/tests/bullet/src/BulletCollision/Gimpact/gim_linear_math.h
new file mode 100644
index 00000000..64f11b49
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_linear_math.h
@@ -0,0 +1,1573 @@
+#ifndef GIM_LINEAR_H_INCLUDED
+#define GIM_LINEAR_H_INCLUDED
+
+/*! \file gim_linear_math.h
+*\author Francisco Leon Najera
+Type Independant Vector and matrix operations.
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+#include "gim_math.h"
+#include "gim_geom_types.h"
+
+
+
+
+//! Zero out a 2D vector
+#define VEC_ZERO_2(a) \
+{ \
+ (a)[0] = (a)[1] = 0.0f; \
+}\
+
+
+//! Zero out a 3D vector
+#define VEC_ZERO(a) \
+{ \
+ (a)[0] = (a)[1] = (a)[2] = 0.0f; \
+}\
+
+
+/// Zero out a 4D vector
+#define VEC_ZERO_4(a) \
+{ \
+ (a)[0] = (a)[1] = (a)[2] = (a)[3] = 0.0f; \
+}\
+
+
+/// Vector copy
+#define VEC_COPY_2(b,a) \
+{ \
+ (b)[0] = (a)[0]; \
+ (b)[1] = (a)[1]; \
+}\
+
+
+/// Copy 3D vector
+#define VEC_COPY(b,a) \
+{ \
+ (b)[0] = (a)[0]; \
+ (b)[1] = (a)[1]; \
+ (b)[2] = (a)[2]; \
+}\
+
+
+/// Copy 4D vector
+#define VEC_COPY_4(b,a) \
+{ \
+ (b)[0] = (a)[0]; \
+ (b)[1] = (a)[1]; \
+ (b)[2] = (a)[2]; \
+ (b)[3] = (a)[3]; \
+}\
+
+/// VECTOR SWAP
+#define VEC_SWAP(b,a) \
+{ \
+ GIM_SWAP_NUMBERS((b)[0],(a)[0]);\
+ GIM_SWAP_NUMBERS((b)[1],(a)[1]);\
+ GIM_SWAP_NUMBERS((b)[2],(a)[2]);\
+}\
+
+/// Vector difference
+#define VEC_DIFF_2(v21,v2,v1) \
+{ \
+ (v21)[0] = (v2)[0] - (v1)[0]; \
+ (v21)[1] = (v2)[1] - (v1)[1]; \
+}\
+
+
+/// Vector difference
+#define VEC_DIFF(v21,v2,v1) \
+{ \
+ (v21)[0] = (v2)[0] - (v1)[0]; \
+ (v21)[1] = (v2)[1] - (v1)[1]; \
+ (v21)[2] = (v2)[2] - (v1)[2]; \
+}\
+
+
+/// Vector difference
+#define VEC_DIFF_4(v21,v2,v1) \
+{ \
+ (v21)[0] = (v2)[0] - (v1)[0]; \
+ (v21)[1] = (v2)[1] - (v1)[1]; \
+ (v21)[2] = (v2)[2] - (v1)[2]; \
+ (v21)[3] = (v2)[3] - (v1)[3]; \
+}\
+
+
+/// Vector sum
+#define VEC_SUM_2(v21,v2,v1) \
+{ \
+ (v21)[0] = (v2)[0] + (v1)[0]; \
+ (v21)[1] = (v2)[1] + (v1)[1]; \
+}\
+
+
+/// Vector sum
+#define VEC_SUM(v21,v2,v1) \
+{ \
+ (v21)[0] = (v2)[0] + (v1)[0]; \
+ (v21)[1] = (v2)[1] + (v1)[1]; \
+ (v21)[2] = (v2)[2] + (v1)[2]; \
+}\
+
+
+/// Vector sum
+#define VEC_SUM_4(v21,v2,v1) \
+{ \
+ (v21)[0] = (v2)[0] + (v1)[0]; \
+ (v21)[1] = (v2)[1] + (v1)[1]; \
+ (v21)[2] = (v2)[2] + (v1)[2]; \
+ (v21)[3] = (v2)[3] + (v1)[3]; \
+}\
+
+
+/// scalar times vector
+#define VEC_SCALE_2(c,a,b) \
+{ \
+ (c)[0] = (a)*(b)[0]; \
+ (c)[1] = (a)*(b)[1]; \
+}\
+
+
+/// scalar times vector
+#define VEC_SCALE(c,a,b) \
+{ \
+ (c)[0] = (a)*(b)[0]; \
+ (c)[1] = (a)*(b)[1]; \
+ (c)[2] = (a)*(b)[2]; \
+}\
+
+
+/// scalar times vector
+#define VEC_SCALE_4(c,a,b) \
+{ \
+ (c)[0] = (a)*(b)[0]; \
+ (c)[1] = (a)*(b)[1]; \
+ (c)[2] = (a)*(b)[2]; \
+ (c)[3] = (a)*(b)[3]; \
+}\
+
+
+/// accumulate scaled vector
+#define VEC_ACCUM_2(c,a,b) \
+{ \
+ (c)[0] += (a)*(b)[0]; \
+ (c)[1] += (a)*(b)[1]; \
+}\
+
+
+/// accumulate scaled vector
+#define VEC_ACCUM(c,a,b) \
+{ \
+ (c)[0] += (a)*(b)[0]; \
+ (c)[1] += (a)*(b)[1]; \
+ (c)[2] += (a)*(b)[2]; \
+}\
+
+
+/// accumulate scaled vector
+#define VEC_ACCUM_4(c,a,b) \
+{ \
+ (c)[0] += (a)*(b)[0]; \
+ (c)[1] += (a)*(b)[1]; \
+ (c)[2] += (a)*(b)[2]; \
+ (c)[3] += (a)*(b)[3]; \
+}\
+
+
+/// Vector dot product
+#define VEC_DOT_2(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[1])
+
+
+/// Vector dot product
+#define VEC_DOT(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2])
+
+/// Vector dot product
+#define VEC_DOT_4(a,b) ((a)[0]*(b)[0] + (a)[1]*(b)[1] + (a)[2]*(b)[2] + (a)[3]*(b)[3])
+
+/// vector impact parameter (squared)
+#define VEC_IMPACT_SQ(bsq,direction,position) {\
+ GREAL _llel_ = VEC_DOT(direction, position);\
+ bsq = VEC_DOT(position, position) - _llel_*_llel_;\
+}\
+
+
+/// vector impact parameter
+#define VEC_IMPACT(bsq,direction,position) {\
+ VEC_IMPACT_SQ(bsq,direction,position); \
+ GIM_SQRT(bsq,bsq); \
+}\
+
+/// Vector length
+#define VEC_LENGTH_2(a,l)\
+{\
+ GREAL _pp = VEC_DOT_2(a,a);\
+ GIM_SQRT(_pp,l);\
+}\
+
+
+/// Vector length
+#define VEC_LENGTH(a,l)\
+{\
+ GREAL _pp = VEC_DOT(a,a);\
+ GIM_SQRT(_pp,l);\
+}\
+
+
+/// Vector length
+#define VEC_LENGTH_4(a,l)\
+{\
+ GREAL _pp = VEC_DOT_4(a,a);\
+ GIM_SQRT(_pp,l);\
+}\
+
+/// Vector inv length
+#define VEC_INV_LENGTH_2(a,l)\
+{\
+ GREAL _pp = VEC_DOT_2(a,a);\
+ GIM_INV_SQRT(_pp,l);\
+}\
+
+
+/// Vector inv length
+#define VEC_INV_LENGTH(a,l)\
+{\
+ GREAL _pp = VEC_DOT(a,a);\
+ GIM_INV_SQRT(_pp,l);\
+}\
+
+
+/// Vector inv length
+#define VEC_INV_LENGTH_4(a,l)\
+{\
+ GREAL _pp = VEC_DOT_4(a,a);\
+ GIM_INV_SQRT(_pp,l);\
+}\
+
+
+
+/// distance between two points
+#define VEC_DISTANCE(_len,_va,_vb) {\
+ vec3f _tmp_; \
+ VEC_DIFF(_tmp_, _vb, _va); \
+ VEC_LENGTH(_tmp_,_len); \
+}\
+
+
+/// Vector length
+#define VEC_CONJUGATE_LENGTH(a,l)\
+{\
+ GREAL _pp = 1.0 - a[0]*a[0] - a[1]*a[1] - a[2]*a[2];\
+ GIM_SQRT(_pp,l);\
+}\
+
+
+/// Vector length
+#define VEC_NORMALIZE(a) { \
+ GREAL len;\
+ VEC_INV_LENGTH(a,len); \
+ if(len<G_REAL_INFINITY)\
+ {\
+ a[0] *= len; \
+ a[1] *= len; \
+ a[2] *= len; \
+ } \
+}\
+
+/// Set Vector size
+#define VEC_RENORMALIZE(a,newlen) { \
+ GREAL len;\
+ VEC_INV_LENGTH(a,len); \
+ if(len<G_REAL_INFINITY)\
+ {\
+ len *= newlen;\
+ a[0] *= len; \
+ a[1] *= len; \
+ a[2] *= len; \
+ } \
+}\
+
+/// Vector cross
+#define VEC_CROSS(c,a,b) \
+{ \
+ c[0] = (a)[1] * (b)[2] - (a)[2] * (b)[1]; \
+ c[1] = (a)[2] * (b)[0] - (a)[0] * (b)[2]; \
+ c[2] = (a)[0] * (b)[1] - (a)[1] * (b)[0]; \
+}\
+
+
+/*! Vector perp -- assumes that n is of unit length
+ * accepts vector v, subtracts out any component parallel to n */
+#define VEC_PERPENDICULAR(vp,v,n) \
+{ \
+ GREAL dot = VEC_DOT(v, n); \
+ vp[0] = (v)[0] - dot*(n)[0]; \
+ vp[1] = (v)[1] - dot*(n)[1]; \
+ vp[2] = (v)[2] - dot*(n)[2]; \
+}\
+
+
+/*! Vector parallel -- assumes that n is of unit length */
+#define VEC_PARALLEL(vp,v,n) \
+{ \
+ GREAL dot = VEC_DOT(v, n); \
+ vp[0] = (dot) * (n)[0]; \
+ vp[1] = (dot) * (n)[1]; \
+ vp[2] = (dot) * (n)[2]; \
+}\
+
+/*! Same as Vector parallel -- n can have any length
+ * accepts vector v, subtracts out any component perpendicular to n */
+#define VEC_PROJECT(vp,v,n) \
+{ \
+ GREAL scalar = VEC_DOT(v, n); \
+ scalar/= VEC_DOT(n, n); \
+ vp[0] = (scalar) * (n)[0]; \
+ vp[1] = (scalar) * (n)[1]; \
+ vp[2] = (scalar) * (n)[2]; \
+}\
+
+
+/*! accepts vector v*/
+#define VEC_UNPROJECT(vp,v,n) \
+{ \
+ GREAL scalar = VEC_DOT(v, n); \
+ scalar = VEC_DOT(n, n)/scalar; \
+ vp[0] = (scalar) * (n)[0]; \
+ vp[1] = (scalar) * (n)[1]; \
+ vp[2] = (scalar) * (n)[2]; \
+}\
+
+
+/*! Vector reflection -- assumes n is of unit length
+ Takes vector v, reflects it against reflector n, and returns vr */
+#define VEC_REFLECT(vr,v,n) \
+{ \
+ GREAL dot = VEC_DOT(v, n); \
+ vr[0] = (v)[0] - 2.0 * (dot) * (n)[0]; \
+ vr[1] = (v)[1] - 2.0 * (dot) * (n)[1]; \
+ vr[2] = (v)[2] - 2.0 * (dot) * (n)[2]; \
+}\
+
+
+/*! Vector blending
+Takes two vectors a, b, blends them together with two scalars */
+#define VEC_BLEND_AB(vr,sa,a,sb,b) \
+{ \
+ vr[0] = (sa) * (a)[0] + (sb) * (b)[0]; \
+ vr[1] = (sa) * (a)[1] + (sb) * (b)[1]; \
+ vr[2] = (sa) * (a)[2] + (sb) * (b)[2]; \
+}\
+
+/*! Vector blending
+Takes two vectors a, b, blends them together with s <=1 */
+#define VEC_BLEND(vr,a,b,s) VEC_BLEND_AB(vr,(1-s),a,s,b)
+
+#define VEC_SET3(a,b,op,c) a[0]=b[0] op c[0]; a[1]=b[1] op c[1]; a[2]=b[2] op c[2];
+
+//! Finds the bigger cartesian coordinate from a vector
+#define VEC_MAYOR_COORD(vec, maxc)\
+{\
+ GREAL A[] = {fabs(vec[0]),fabs(vec[1]),fabs(vec[2])};\
+ maxc = A[0]>A[1]?(A[0]>A[2]?0:2):(A[1]>A[2]?1:2);\
+}\
+
+//! Finds the 2 smallest cartesian coordinates from a vector
+#define VEC_MINOR_AXES(vec, i0, i1)\
+{\
+ VEC_MAYOR_COORD(vec,i0);\
+ i0 = (i0+1)%3;\
+ i1 = (i0+1)%3;\
+}\
+
+
+
+
+#define VEC_EQUAL(v1,v2) (v1[0]==v2[0]&&v1[1]==v2[1]&&v1[2]==v2[2])
+
+#define VEC_NEAR_EQUAL(v1,v2) (GIM_NEAR_EQUAL(v1[0],v2[0])&&GIM_NEAR_EQUAL(v1[1],v2[1])&&GIM_NEAR_EQUAL(v1[2],v2[2]))
+
+
+/// Vector cross
+#define X_AXIS_CROSS_VEC(dst,src)\
+{ \
+ dst[0] = 0.0f; \
+ dst[1] = -src[2]; \
+ dst[2] = src[1]; \
+}\
+
+#define Y_AXIS_CROSS_VEC(dst,src)\
+{ \
+ dst[0] = src[2]; \
+ dst[1] = 0.0f; \
+ dst[2] = -src[0]; \
+}\
+
+#define Z_AXIS_CROSS_VEC(dst,src)\
+{ \
+ dst[0] = -src[1]; \
+ dst[1] = src[0]; \
+ dst[2] = 0.0f; \
+}\
+
+
+
+
+
+
+/// initialize matrix
+#define IDENTIFY_MATRIX_3X3(m) \
+{ \
+ m[0][0] = 1.0; \
+ m[0][1] = 0.0; \
+ m[0][2] = 0.0; \
+ \
+ m[1][0] = 0.0; \
+ m[1][1] = 1.0; \
+ m[1][2] = 0.0; \
+ \
+ m[2][0] = 0.0; \
+ m[2][1] = 0.0; \
+ m[2][2] = 1.0; \
+}\
+
+/*! initialize matrix */
+#define IDENTIFY_MATRIX_4X4(m) \
+{ \
+ m[0][0] = 1.0; \
+ m[0][1] = 0.0; \
+ m[0][2] = 0.0; \
+ m[0][3] = 0.0; \
+ \
+ m[1][0] = 0.0; \
+ m[1][1] = 1.0; \
+ m[1][2] = 0.0; \
+ m[1][3] = 0.0; \
+ \
+ m[2][0] = 0.0; \
+ m[2][1] = 0.0; \
+ m[2][2] = 1.0; \
+ m[2][3] = 0.0; \
+ \
+ m[3][0] = 0.0; \
+ m[3][1] = 0.0; \
+ m[3][2] = 0.0; \
+ m[3][3] = 1.0; \
+}\
+
+/*! initialize matrix */
+#define ZERO_MATRIX_4X4(m) \
+{ \
+ m[0][0] = 0.0; \
+ m[0][1] = 0.0; \
+ m[0][2] = 0.0; \
+ m[0][3] = 0.0; \
+ \
+ m[1][0] = 0.0; \
+ m[1][1] = 0.0; \
+ m[1][2] = 0.0; \
+ m[1][3] = 0.0; \
+ \
+ m[2][0] = 0.0; \
+ m[2][1] = 0.0; \
+ m[2][2] = 0.0; \
+ m[2][3] = 0.0; \
+ \
+ m[3][0] = 0.0; \
+ m[3][1] = 0.0; \
+ m[3][2] = 0.0; \
+ m[3][3] = 0.0; \
+}\
+
+/*! matrix rotation X */
+#define ROTX_CS(m,cosine,sine) \
+{ \
+ /* rotation about the x-axis */ \
+ \
+ m[0][0] = 1.0; \
+ m[0][1] = 0.0; \
+ m[0][2] = 0.0; \
+ m[0][3] = 0.0; \
+ \
+ m[1][0] = 0.0; \
+ m[1][1] = (cosine); \
+ m[1][2] = (sine); \
+ m[1][3] = 0.0; \
+ \
+ m[2][0] = 0.0; \
+ m[2][1] = -(sine); \
+ m[2][2] = (cosine); \
+ m[2][3] = 0.0; \
+ \
+ m[3][0] = 0.0; \
+ m[3][1] = 0.0; \
+ m[3][2] = 0.0; \
+ m[3][3] = 1.0; \
+}\
+
+/*! matrix rotation Y */
+#define ROTY_CS(m,cosine,sine) \
+{ \
+ /* rotation about the y-axis */ \
+ \
+ m[0][0] = (cosine); \
+ m[0][1] = 0.0; \
+ m[0][2] = -(sine); \
+ m[0][3] = 0.0; \
+ \
+ m[1][0] = 0.0; \
+ m[1][1] = 1.0; \
+ m[1][2] = 0.0; \
+ m[1][3] = 0.0; \
+ \
+ m[2][0] = (sine); \
+ m[2][1] = 0.0; \
+ m[2][2] = (cosine); \
+ m[2][3] = 0.0; \
+ \
+ m[3][0] = 0.0; \
+ m[3][1] = 0.0; \
+ m[3][2] = 0.0; \
+ m[3][3] = 1.0; \
+}\
+
+/*! matrix rotation Z */
+#define ROTZ_CS(m,cosine,sine) \
+{ \
+ /* rotation about the z-axis */ \
+ \
+ m[0][0] = (cosine); \
+ m[0][1] = (sine); \
+ m[0][2] = 0.0; \
+ m[0][3] = 0.0; \
+ \
+ m[1][0] = -(sine); \
+ m[1][1] = (cosine); \
+ m[1][2] = 0.0; \
+ m[1][3] = 0.0; \
+ \
+ m[2][0] = 0.0; \
+ m[2][1] = 0.0; \
+ m[2][2] = 1.0; \
+ m[2][3] = 0.0; \
+ \
+ m[3][0] = 0.0; \
+ m[3][1] = 0.0; \
+ m[3][2] = 0.0; \
+ m[3][3] = 1.0; \
+}\
+
+/*! matrix copy */
+#define COPY_MATRIX_2X2(b,a) \
+{ \
+ b[0][0] = a[0][0]; \
+ b[0][1] = a[0][1]; \
+ \
+ b[1][0] = a[1][0]; \
+ b[1][1] = a[1][1]; \
+ \
+}\
+
+
+/*! matrix copy */
+#define COPY_MATRIX_2X3(b,a) \
+{ \
+ b[0][0] = a[0][0]; \
+ b[0][1] = a[0][1]; \
+ b[0][2] = a[0][2]; \
+ \
+ b[1][0] = a[1][0]; \
+ b[1][1] = a[1][1]; \
+ b[1][2] = a[1][2]; \
+}\
+
+
+/*! matrix copy */
+#define COPY_MATRIX_3X3(b,a) \
+{ \
+ b[0][0] = a[0][0]; \
+ b[0][1] = a[0][1]; \
+ b[0][2] = a[0][2]; \
+ \
+ b[1][0] = a[1][0]; \
+ b[1][1] = a[1][1]; \
+ b[1][2] = a[1][2]; \
+ \
+ b[2][0] = a[2][0]; \
+ b[2][1] = a[2][1]; \
+ b[2][2] = a[2][2]; \
+}\
+
+
+/*! matrix copy */
+#define COPY_MATRIX_4X4(b,a) \
+{ \
+ b[0][0] = a[0][0]; \
+ b[0][1] = a[0][1]; \
+ b[0][2] = a[0][2]; \
+ b[0][3] = a[0][3]; \
+ \
+ b[1][0] = a[1][0]; \
+ b[1][1] = a[1][1]; \
+ b[1][2] = a[1][2]; \
+ b[1][3] = a[1][3]; \
+ \
+ b[2][0] = a[2][0]; \
+ b[2][1] = a[2][1]; \
+ b[2][2] = a[2][2]; \
+ b[2][3] = a[2][3]; \
+ \
+ b[3][0] = a[3][0]; \
+ b[3][1] = a[3][1]; \
+ b[3][2] = a[3][2]; \
+ b[3][3] = a[3][3]; \
+}\
+
+
+/*! matrix transpose */
+#define TRANSPOSE_MATRIX_2X2(b,a) \
+{ \
+ b[0][0] = a[0][0]; \
+ b[0][1] = a[1][0]; \
+ \
+ b[1][0] = a[0][1]; \
+ b[1][1] = a[1][1]; \
+}\
+
+
+/*! matrix transpose */
+#define TRANSPOSE_MATRIX_3X3(b,a) \
+{ \
+ b[0][0] = a[0][0]; \
+ b[0][1] = a[1][0]; \
+ b[0][2] = a[2][0]; \
+ \
+ b[1][0] = a[0][1]; \
+ b[1][1] = a[1][1]; \
+ b[1][2] = a[2][1]; \
+ \
+ b[2][0] = a[0][2]; \
+ b[2][1] = a[1][2]; \
+ b[2][2] = a[2][2]; \
+}\
+
+
+/*! matrix transpose */
+#define TRANSPOSE_MATRIX_4X4(b,a) \
+{ \
+ b[0][0] = a[0][0]; \
+ b[0][1] = a[1][0]; \
+ b[0][2] = a[2][0]; \
+ b[0][3] = a[3][0]; \
+ \
+ b[1][0] = a[0][1]; \
+ b[1][1] = a[1][1]; \
+ b[1][2] = a[2][1]; \
+ b[1][3] = a[3][1]; \
+ \
+ b[2][0] = a[0][2]; \
+ b[2][1] = a[1][2]; \
+ b[2][2] = a[2][2]; \
+ b[2][3] = a[3][2]; \
+ \
+ b[3][0] = a[0][3]; \
+ b[3][1] = a[1][3]; \
+ b[3][2] = a[2][3]; \
+ b[3][3] = a[3][3]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define SCALE_MATRIX_2X2(b,s,a) \
+{ \
+ b[0][0] = (s) * a[0][0]; \
+ b[0][1] = (s) * a[0][1]; \
+ \
+ b[1][0] = (s) * a[1][0]; \
+ b[1][1] = (s) * a[1][1]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define SCALE_MATRIX_3X3(b,s,a) \
+{ \
+ b[0][0] = (s) * a[0][0]; \
+ b[0][1] = (s) * a[0][1]; \
+ b[0][2] = (s) * a[0][2]; \
+ \
+ b[1][0] = (s) * a[1][0]; \
+ b[1][1] = (s) * a[1][1]; \
+ b[1][2] = (s) * a[1][2]; \
+ \
+ b[2][0] = (s) * a[2][0]; \
+ b[2][1] = (s) * a[2][1]; \
+ b[2][2] = (s) * a[2][2]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define SCALE_MATRIX_4X4(b,s,a) \
+{ \
+ b[0][0] = (s) * a[0][0]; \
+ b[0][1] = (s) * a[0][1]; \
+ b[0][2] = (s) * a[0][2]; \
+ b[0][3] = (s) * a[0][3]; \
+ \
+ b[1][0] = (s) * a[1][0]; \
+ b[1][1] = (s) * a[1][1]; \
+ b[1][2] = (s) * a[1][2]; \
+ b[1][3] = (s) * a[1][3]; \
+ \
+ b[2][0] = (s) * a[2][0]; \
+ b[2][1] = (s) * a[2][1]; \
+ b[2][2] = (s) * a[2][2]; \
+ b[2][3] = (s) * a[2][3]; \
+ \
+ b[3][0] = s * a[3][0]; \
+ b[3][1] = s * a[3][1]; \
+ b[3][2] = s * a[3][2]; \
+ b[3][3] = s * a[3][3]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define SCALE_VEC_MATRIX_2X2(b,svec,a) \
+{ \
+ b[0][0] = svec[0] * a[0][0]; \
+ b[1][0] = svec[0] * a[1][0]; \
+ \
+ b[0][1] = svec[1] * a[0][1]; \
+ b[1][1] = svec[1] * a[1][1]; \
+}\
+
+
+/*! multiply matrix by scalar. Each columns is scaled by each scalar vector component */
+#define SCALE_VEC_MATRIX_3X3(b,svec,a) \
+{ \
+ b[0][0] = svec[0] * a[0][0]; \
+ b[1][0] = svec[0] * a[1][0]; \
+ b[2][0] = svec[0] * a[2][0]; \
+ \
+ b[0][1] = svec[1] * a[0][1]; \
+ b[1][1] = svec[1] * a[1][1]; \
+ b[2][1] = svec[1] * a[2][1]; \
+ \
+ b[0][2] = svec[2] * a[0][2]; \
+ b[1][2] = svec[2] * a[1][2]; \
+ b[2][2] = svec[2] * a[2][2]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define SCALE_VEC_MATRIX_4X4(b,svec,a) \
+{ \
+ b[0][0] = svec[0] * a[0][0]; \
+ b[1][0] = svec[0] * a[1][0]; \
+ b[2][0] = svec[0] * a[2][0]; \
+ b[3][0] = svec[0] * a[3][0]; \
+ \
+ b[0][1] = svec[1] * a[0][1]; \
+ b[1][1] = svec[1] * a[1][1]; \
+ b[2][1] = svec[1] * a[2][1]; \
+ b[3][1] = svec[1] * a[3][1]; \
+ \
+ b[0][2] = svec[2] * a[0][2]; \
+ b[1][2] = svec[2] * a[1][2]; \
+ b[2][2] = svec[2] * a[2][2]; \
+ b[3][2] = svec[2] * a[3][2]; \
+ \
+ b[0][3] = svec[3] * a[0][3]; \
+ b[1][3] = svec[3] * a[1][3]; \
+ b[2][3] = svec[3] * a[2][3]; \
+ b[3][3] = svec[3] * a[3][3]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define ACCUM_SCALE_MATRIX_2X2(b,s,a) \
+{ \
+ b[0][0] += (s) * a[0][0]; \
+ b[0][1] += (s) * a[0][1]; \
+ \
+ b[1][0] += (s) * a[1][0]; \
+ b[1][1] += (s) * a[1][1]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define ACCUM_SCALE_MATRIX_3X3(b,s,a) \
+{ \
+ b[0][0] += (s) * a[0][0]; \
+ b[0][1] += (s) * a[0][1]; \
+ b[0][2] += (s) * a[0][2]; \
+ \
+ b[1][0] += (s) * a[1][0]; \
+ b[1][1] += (s) * a[1][1]; \
+ b[1][2] += (s) * a[1][2]; \
+ \
+ b[2][0] += (s) * a[2][0]; \
+ b[2][1] += (s) * a[2][1]; \
+ b[2][2] += (s) * a[2][2]; \
+}\
+
+
+/*! multiply matrix by scalar */
+#define ACCUM_SCALE_MATRIX_4X4(b,s,a) \
+{ \
+ b[0][0] += (s) * a[0][0]; \
+ b[0][1] += (s) * a[0][1]; \
+ b[0][2] += (s) * a[0][2]; \
+ b[0][3] += (s) * a[0][3]; \
+ \
+ b[1][0] += (s) * a[1][0]; \
+ b[1][1] += (s) * a[1][1]; \
+ b[1][2] += (s) * a[1][2]; \
+ b[1][3] += (s) * a[1][3]; \
+ \
+ b[2][0] += (s) * a[2][0]; \
+ b[2][1] += (s) * a[2][1]; \
+ b[2][2] += (s) * a[2][2]; \
+ b[2][3] += (s) * a[2][3]; \
+ \
+ b[3][0] += (s) * a[3][0]; \
+ b[3][1] += (s) * a[3][1]; \
+ b[3][2] += (s) * a[3][2]; \
+ b[3][3] += (s) * a[3][3]; \
+}\
+
+/*! matrix product */
+/*! c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];*/
+#define MATRIX_PRODUCT_2X2(c,a,b) \
+{ \
+ c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]; \
+ c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]; \
+ \
+ c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]; \
+ c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]; \
+ \
+}\
+
+/*! matrix product */
+/*! c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];*/
+#define MATRIX_PRODUCT_3X3(c,a,b) \
+{ \
+ c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]+a[0][2]*b[2][0]; \
+ c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]+a[0][2]*b[2][1]; \
+ c[0][2] = a[0][0]*b[0][2]+a[0][1]*b[1][2]+a[0][2]*b[2][2]; \
+ \
+ c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]+a[1][2]*b[2][0]; \
+ c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]+a[1][2]*b[2][1]; \
+ c[1][2] = a[1][0]*b[0][2]+a[1][1]*b[1][2]+a[1][2]*b[2][2]; \
+ \
+ c[2][0] = a[2][0]*b[0][0]+a[2][1]*b[1][0]+a[2][2]*b[2][0]; \
+ c[2][1] = a[2][0]*b[0][1]+a[2][1]*b[1][1]+a[2][2]*b[2][1]; \
+ c[2][2] = a[2][0]*b[0][2]+a[2][1]*b[1][2]+a[2][2]*b[2][2]; \
+}\
+
+
+/*! matrix product */
+/*! c[x][y] = a[x][0]*b[0][y]+a[x][1]*b[1][y]+a[x][2]*b[2][y]+a[x][3]*b[3][y];*/
+#define MATRIX_PRODUCT_4X4(c,a,b) \
+{ \
+ c[0][0] = a[0][0]*b[0][0]+a[0][1]*b[1][0]+a[0][2]*b[2][0]+a[0][3]*b[3][0];\
+ c[0][1] = a[0][0]*b[0][1]+a[0][1]*b[1][1]+a[0][2]*b[2][1]+a[0][3]*b[3][1];\
+ c[0][2] = a[0][0]*b[0][2]+a[0][1]*b[1][2]+a[0][2]*b[2][2]+a[0][3]*b[3][2];\
+ c[0][3] = a[0][0]*b[0][3]+a[0][1]*b[1][3]+a[0][2]*b[2][3]+a[0][3]*b[3][3];\
+ \
+ c[1][0] = a[1][0]*b[0][0]+a[1][1]*b[1][0]+a[1][2]*b[2][0]+a[1][3]*b[3][0];\
+ c[1][1] = a[1][0]*b[0][1]+a[1][1]*b[1][1]+a[1][2]*b[2][1]+a[1][3]*b[3][1];\
+ c[1][2] = a[1][0]*b[0][2]+a[1][1]*b[1][2]+a[1][2]*b[2][2]+a[1][3]*b[3][2];\
+ c[1][3] = a[1][0]*b[0][3]+a[1][1]*b[1][3]+a[1][2]*b[2][3]+a[1][3]*b[3][3];\
+ \
+ c[2][0] = a[2][0]*b[0][0]+a[2][1]*b[1][0]+a[2][2]*b[2][0]+a[2][3]*b[3][0];\
+ c[2][1] = a[2][0]*b[0][1]+a[2][1]*b[1][1]+a[2][2]*b[2][1]+a[2][3]*b[3][1];\
+ c[2][2] = a[2][0]*b[0][2]+a[2][1]*b[1][2]+a[2][2]*b[2][2]+a[2][3]*b[3][2];\
+ c[2][3] = a[2][0]*b[0][3]+a[2][1]*b[1][3]+a[2][2]*b[2][3]+a[2][3]*b[3][3];\
+ \
+ c[3][0] = a[3][0]*b[0][0]+a[3][1]*b[1][0]+a[3][2]*b[2][0]+a[3][3]*b[3][0];\
+ c[3][1] = a[3][0]*b[0][1]+a[3][1]*b[1][1]+a[3][2]*b[2][1]+a[3][3]*b[3][1];\
+ c[3][2] = a[3][0]*b[0][2]+a[3][1]*b[1][2]+a[3][2]*b[2][2]+a[3][3]*b[3][2];\
+ c[3][3] = a[3][0]*b[0][3]+a[3][1]*b[1][3]+a[3][2]*b[2][3]+a[3][3]*b[3][3];\
+}\
+
+
+/*! matrix times vector */
+#define MAT_DOT_VEC_2X2(p,m,v) \
+{ \
+ p[0] = m[0][0]*v[0] + m[0][1]*v[1]; \
+ p[1] = m[1][0]*v[0] + m[1][1]*v[1]; \
+}\
+
+
+/*! matrix times vector */
+#define MAT_DOT_VEC_3X3(p,m,v) \
+{ \
+ p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2]; \
+ p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2]; \
+ p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2]; \
+}\
+
+
+/*! matrix times vector
+v is a vec4f
+*/
+#define MAT_DOT_VEC_4X4(p,m,v) \
+{ \
+ p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2] + m[0][3]*v[3]; \
+ p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2] + m[1][3]*v[3]; \
+ p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2] + m[2][3]*v[3]; \
+ p[3] = m[3][0]*v[0] + m[3][1]*v[1] + m[3][2]*v[2] + m[3][3]*v[3]; \
+}\
+
+/*! matrix times vector
+v is a vec3f
+and m is a mat4f<br>
+Last column is added as the position
+*/
+#define MAT_DOT_VEC_3X4(p,m,v) \
+{ \
+ p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2] + m[0][3]; \
+ p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2] + m[1][3]; \
+ p[2] = m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2] + m[2][3]; \
+}\
+
+
+/*! vector transpose times matrix */
+/*! p[j] = v[0]*m[0][j] + v[1]*m[1][j] + v[2]*m[2][j]; */
+#define VEC_DOT_MAT_3X3(p,v,m) \
+{ \
+ p[0] = v[0]*m[0][0] + v[1]*m[1][0] + v[2]*m[2][0]; \
+ p[1] = v[0]*m[0][1] + v[1]*m[1][1] + v[2]*m[2][1]; \
+ p[2] = v[0]*m[0][2] + v[1]*m[1][2] + v[2]*m[2][2]; \
+}\
+
+
+/*! affine matrix times vector */
+/** The matrix is assumed to be an affine matrix, with last two
+ * entries representing a translation */
+#define MAT_DOT_VEC_2X3(p,m,v) \
+{ \
+ p[0] = m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]; \
+ p[1] = m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]; \
+}\
+
+//! Transform a plane
+#define MAT_TRANSFORM_PLANE_4X4(pout,m,plane)\
+{ \
+ pout[0] = m[0][0]*plane[0] + m[0][1]*plane[1] + m[0][2]*plane[2];\
+ pout[1] = m[1][0]*plane[0] + m[1][1]*plane[1] + m[1][2]*plane[2];\
+ pout[2] = m[2][0]*plane[0] + m[2][1]*plane[1] + m[2][2]*plane[2];\
+ pout[3] = m[0][3]*pout[0] + m[1][3]*pout[1] + m[2][3]*pout[2] + plane[3];\
+}\
+
+
+
+/** inverse transpose of matrix times vector
+ *
+ * This macro computes inverse transpose of matrix m,
+ * and multiplies vector v into it, to yeild vector p
+ *
+ * DANGER !!! Do Not use this on normal vectors!!!
+ * It will leave normals the wrong length !!!
+ * See macro below for use on normals.
+ */
+#define INV_TRANSP_MAT_DOT_VEC_2X2(p,m,v) \
+{ \
+ GREAL det; \
+ \
+ det = m[0][0]*m[1][1] - m[0][1]*m[1][0]; \
+ p[0] = m[1][1]*v[0] - m[1][0]*v[1]; \
+ p[1] = - m[0][1]*v[0] + m[0][0]*v[1]; \
+ \
+ /* if matrix not singular, and not orthonormal, then renormalize */ \
+ if ((det!=1.0f) && (det != 0.0f)) { \
+ det = 1.0f / det; \
+ p[0] *= det; \
+ p[1] *= det; \
+ } \
+}\
+
+
+/** transform normal vector by inverse transpose of matrix
+ * and then renormalize the vector
+ *
+ * This macro computes inverse transpose of matrix m,
+ * and multiplies vector v into it, to yeild vector p
+ * Vector p is then normalized.
+ */
+#define NORM_XFORM_2X2(p,m,v) \
+{ \
+ GREAL len; \
+ \
+ /* do nothing if off-diagonals are zero and diagonals are \
+ * equal */ \
+ if ((m[0][1] != 0.0) || (m[1][0] != 0.0) || (m[0][0] != m[1][1])) { \
+ p[0] = m[1][1]*v[0] - m[1][0]*v[1]; \
+ p[1] = - m[0][1]*v[0] + m[0][0]*v[1]; \
+ \
+ len = p[0]*p[0] + p[1]*p[1]; \
+ GIM_INV_SQRT(len,len); \
+ p[0] *= len; \
+ p[1] *= len; \
+ } else { \
+ VEC_COPY_2 (p, v); \
+ } \
+}\
+
+
+/** outer product of vector times vector transpose
+ *
+ * The outer product of vector v and vector transpose t yeilds
+ * dyadic matrix m.
+ */
+#define OUTER_PRODUCT_2X2(m,v,t) \
+{ \
+ m[0][0] = v[0] * t[0]; \
+ m[0][1] = v[0] * t[1]; \
+ \
+ m[1][0] = v[1] * t[0]; \
+ m[1][1] = v[1] * t[1]; \
+}\
+
+
+/** outer product of vector times vector transpose
+ *
+ * The outer product of vector v and vector transpose t yeilds
+ * dyadic matrix m.
+ */
+#define OUTER_PRODUCT_3X3(m,v,t) \
+{ \
+ m[0][0] = v[0] * t[0]; \
+ m[0][1] = v[0] * t[1]; \
+ m[0][2] = v[0] * t[2]; \
+ \
+ m[1][0] = v[1] * t[0]; \
+ m[1][1] = v[1] * t[1]; \
+ m[1][2] = v[1] * t[2]; \
+ \
+ m[2][0] = v[2] * t[0]; \
+ m[2][1] = v[2] * t[1]; \
+ m[2][2] = v[2] * t[2]; \
+}\
+
+
+/** outer product of vector times vector transpose
+ *
+ * The outer product of vector v and vector transpose t yeilds
+ * dyadic matrix m.
+ */
+#define OUTER_PRODUCT_4X4(m,v,t) \
+{ \
+ m[0][0] = v[0] * t[0]; \
+ m[0][1] = v[0] * t[1]; \
+ m[0][2] = v[0] * t[2]; \
+ m[0][3] = v[0] * t[3]; \
+ \
+ m[1][0] = v[1] * t[0]; \
+ m[1][1] = v[1] * t[1]; \
+ m[1][2] = v[1] * t[2]; \
+ m[1][3] = v[1] * t[3]; \
+ \
+ m[2][0] = v[2] * t[0]; \
+ m[2][1] = v[2] * t[1]; \
+ m[2][2] = v[2] * t[2]; \
+ m[2][3] = v[2] * t[3]; \
+ \
+ m[3][0] = v[3] * t[0]; \
+ m[3][1] = v[3] * t[1]; \
+ m[3][2] = v[3] * t[2]; \
+ m[3][3] = v[3] * t[3]; \
+}\
+
+
+/** outer product of vector times vector transpose
+ *
+ * The outer product of vector v and vector transpose t yeilds
+ * dyadic matrix m.
+ */
+#define ACCUM_OUTER_PRODUCT_2X2(m,v,t) \
+{ \
+ m[0][0] += v[0] * t[0]; \
+ m[0][1] += v[0] * t[1]; \
+ \
+ m[1][0] += v[1] * t[0]; \
+ m[1][1] += v[1] * t[1]; \
+}\
+
+
+/** outer product of vector times vector transpose
+ *
+ * The outer product of vector v and vector transpose t yeilds
+ * dyadic matrix m.
+ */
+#define ACCUM_OUTER_PRODUCT_3X3(m,v,t) \
+{ \
+ m[0][0] += v[0] * t[0]; \
+ m[0][1] += v[0] * t[1]; \
+ m[0][2] += v[0] * t[2]; \
+ \
+ m[1][0] += v[1] * t[0]; \
+ m[1][1] += v[1] * t[1]; \
+ m[1][2] += v[1] * t[2]; \
+ \
+ m[2][0] += v[2] * t[0]; \
+ m[2][1] += v[2] * t[1]; \
+ m[2][2] += v[2] * t[2]; \
+}\
+
+
+/** outer product of vector times vector transpose
+ *
+ * The outer product of vector v and vector transpose t yeilds
+ * dyadic matrix m.
+ */
+#define ACCUM_OUTER_PRODUCT_4X4(m,v,t) \
+{ \
+ m[0][0] += v[0] * t[0]; \
+ m[0][1] += v[0] * t[1]; \
+ m[0][2] += v[0] * t[2]; \
+ m[0][3] += v[0] * t[3]; \
+ \
+ m[1][0] += v[1] * t[0]; \
+ m[1][1] += v[1] * t[1]; \
+ m[1][2] += v[1] * t[2]; \
+ m[1][3] += v[1] * t[3]; \
+ \
+ m[2][0] += v[2] * t[0]; \
+ m[2][1] += v[2] * t[1]; \
+ m[2][2] += v[2] * t[2]; \
+ m[2][3] += v[2] * t[3]; \
+ \
+ m[3][0] += v[3] * t[0]; \
+ m[3][1] += v[3] * t[1]; \
+ m[3][2] += v[3] * t[2]; \
+ m[3][3] += v[3] * t[3]; \
+}\
+
+
+/** determinant of matrix
+ *
+ * Computes determinant of matrix m, returning d
+ */
+#define DETERMINANT_2X2(d,m) \
+{ \
+ d = m[0][0] * m[1][1] - m[0][1] * m[1][0]; \
+}\
+
+
+/** determinant of matrix
+ *
+ * Computes determinant of matrix m, returning d
+ */
+#define DETERMINANT_3X3(d,m) \
+{ \
+ d = m[0][0] * (m[1][1]*m[2][2] - m[1][2] * m[2][1]); \
+ d -= m[0][1] * (m[1][0]*m[2][2] - m[1][2] * m[2][0]); \
+ d += m[0][2] * (m[1][0]*m[2][1] - m[1][1] * m[2][0]); \
+}\
+
+
+/** i,j,th cofactor of a 4x4 matrix
+ *
+ */
+#define COFACTOR_4X4_IJ(fac,m,i,j) \
+{ \
+ GUINT __ii[4], __jj[4], __k; \
+ \
+ for (__k=0; __k<i; __k++) __ii[__k] = __k; \
+ for (__k=i; __k<3; __k++) __ii[__k] = __k+1; \
+ for (__k=0; __k<j; __k++) __jj[__k] = __k; \
+ for (__k=j; __k<3; __k++) __jj[__k] = __k+1; \
+ \
+ (fac) = m[__ii[0]][__jj[0]] * (m[__ii[1]][__jj[1]]*m[__ii[2]][__jj[2]] \
+ - m[__ii[1]][__jj[2]]*m[__ii[2]][__jj[1]]); \
+ (fac) -= m[__ii[0]][__jj[1]] * (m[__ii[1]][__jj[0]]*m[__ii[2]][__jj[2]] \
+ - m[__ii[1]][__jj[2]]*m[__ii[2]][__jj[0]]);\
+ (fac) += m[__ii[0]][__jj[2]] * (m[__ii[1]][__jj[0]]*m[__ii[2]][__jj[1]] \
+ - m[__ii[1]][__jj[1]]*m[__ii[2]][__jj[0]]);\
+ \
+ __k = i+j; \
+ if ( __k != (__k/2)*2) { \
+ (fac) = -(fac); \
+ } \
+}\
+
+
+/** determinant of matrix
+ *
+ * Computes determinant of matrix m, returning d
+ */
+#define DETERMINANT_4X4(d,m) \
+{ \
+ GREAL cofac; \
+ COFACTOR_4X4_IJ (cofac, m, 0, 0); \
+ d = m[0][0] * cofac; \
+ COFACTOR_4X4_IJ (cofac, m, 0, 1); \
+ d += m[0][1] * cofac; \
+ COFACTOR_4X4_IJ (cofac, m, 0, 2); \
+ d += m[0][2] * cofac; \
+ COFACTOR_4X4_IJ (cofac, m, 0, 3); \
+ d += m[0][3] * cofac; \
+}\
+
+
+/** cofactor of matrix
+ *
+ * Computes cofactor of matrix m, returning a
+ */
+#define COFACTOR_2X2(a,m) \
+{ \
+ a[0][0] = (m)[1][1]; \
+ a[0][1] = - (m)[1][0]; \
+ a[1][0] = - (m)[0][1]; \
+ a[1][1] = (m)[0][0]; \
+}\
+
+
+/** cofactor of matrix
+ *
+ * Computes cofactor of matrix m, returning a
+ */
+#define COFACTOR_3X3(a,m) \
+{ \
+ a[0][0] = m[1][1]*m[2][2] - m[1][2]*m[2][1]; \
+ a[0][1] = - (m[1][0]*m[2][2] - m[2][0]*m[1][2]); \
+ a[0][2] = m[1][0]*m[2][1] - m[1][1]*m[2][0]; \
+ a[1][0] = - (m[0][1]*m[2][2] - m[0][2]*m[2][1]); \
+ a[1][1] = m[0][0]*m[2][2] - m[0][2]*m[2][0]; \
+ a[1][2] = - (m[0][0]*m[2][1] - m[0][1]*m[2][0]); \
+ a[2][0] = m[0][1]*m[1][2] - m[0][2]*m[1][1]; \
+ a[2][1] = - (m[0][0]*m[1][2] - m[0][2]*m[1][0]); \
+ a[2][2] = m[0][0]*m[1][1] - m[0][1]*m[1][0]); \
+}\
+
+
+/** cofactor of matrix
+ *
+ * Computes cofactor of matrix m, returning a
+ */
+#define COFACTOR_4X4(a,m) \
+{ \
+ int i,j; \
+ \
+ for (i=0; i<4; i++) { \
+ for (j=0; j<4; j++) { \
+ COFACTOR_4X4_IJ (a[i][j], m, i, j); \
+ } \
+ } \
+}\
+
+
+/** adjoint of matrix
+ *
+ * Computes adjoint of matrix m, returning a
+ * (Note that adjoint is just the transpose of the cofactor matrix)
+ */
+#define ADJOINT_2X2(a,m) \
+{ \
+ a[0][0] = (m)[1][1]; \
+ a[1][0] = - (m)[1][0]; \
+ a[0][1] = - (m)[0][1]; \
+ a[1][1] = (m)[0][0]; \
+}\
+
+
+/** adjoint of matrix
+ *
+ * Computes adjoint of matrix m, returning a
+ * (Note that adjoint is just the transpose of the cofactor matrix)
+ */
+#define ADJOINT_3X3(a,m) \
+{ \
+ a[0][0] = m[1][1]*m[2][2] - m[1][2]*m[2][1]; \
+ a[1][0] = - (m[1][0]*m[2][2] - m[2][0]*m[1][2]); \
+ a[2][0] = m[1][0]*m[2][1] - m[1][1]*m[2][0]; \
+ a[0][1] = - (m[0][1]*m[2][2] - m[0][2]*m[2][1]); \
+ a[1][1] = m[0][0]*m[2][2] - m[0][2]*m[2][0]; \
+ a[2][1] = - (m[0][0]*m[2][1] - m[0][1]*m[2][0]); \
+ a[0][2] = m[0][1]*m[1][2] - m[0][2]*m[1][1]; \
+ a[1][2] = - (m[0][0]*m[1][2] - m[0][2]*m[1][0]); \
+ a[2][2] = m[0][0]*m[1][1] - m[0][1]*m[1][0]); \
+}\
+
+
+/** adjoint of matrix
+ *
+ * Computes adjoint of matrix m, returning a
+ * (Note that adjoint is just the transpose of the cofactor matrix)
+ */
+#define ADJOINT_4X4(a,m) \
+{ \
+ char _i_,_j_; \
+ \
+ for (_i_=0; _i_<4; _i_++) { \
+ for (_j_=0; _j_<4; _j_++) { \
+ COFACTOR_4X4_IJ (a[_j_][_i_], m, _i_, _j_); \
+ } \
+ } \
+}\
+
+
+/** compute adjoint of matrix and scale
+ *
+ * Computes adjoint of matrix m, scales it by s, returning a
+ */
+#define SCALE_ADJOINT_2X2(a,s,m) \
+{ \
+ a[0][0] = (s) * m[1][1]; \
+ a[1][0] = - (s) * m[1][0]; \
+ a[0][1] = - (s) * m[0][1]; \
+ a[1][1] = (s) * m[0][0]; \
+}\
+
+
+/** compute adjoint of matrix and scale
+ *
+ * Computes adjoint of matrix m, scales it by s, returning a
+ */
+#define SCALE_ADJOINT_3X3(a,s,m) \
+{ \
+ a[0][0] = (s) * (m[1][1] * m[2][2] - m[1][2] * m[2][1]); \
+ a[1][0] = (s) * (m[1][2] * m[2][0] - m[1][0] * m[2][2]); \
+ a[2][0] = (s) * (m[1][0] * m[2][1] - m[1][1] * m[2][0]); \
+ \
+ a[0][1] = (s) * (m[0][2] * m[2][1] - m[0][1] * m[2][2]); \
+ a[1][1] = (s) * (m[0][0] * m[2][2] - m[0][2] * m[2][0]); \
+ a[2][1] = (s) * (m[0][1] * m[2][0] - m[0][0] * m[2][1]); \
+ \
+ a[0][2] = (s) * (m[0][1] * m[1][2] - m[0][2] * m[1][1]); \
+ a[1][2] = (s) * (m[0][2] * m[1][0] - m[0][0] * m[1][2]); \
+ a[2][2] = (s) * (m[0][0] * m[1][1] - m[0][1] * m[1][0]); \
+}\
+
+
+/** compute adjoint of matrix and scale
+ *
+ * Computes adjoint of matrix m, scales it by s, returning a
+ */
+#define SCALE_ADJOINT_4X4(a,s,m) \
+{ \
+ char _i_,_j_; \
+ for (_i_=0; _i_<4; _i_++) { \
+ for (_j_=0; _j_<4; _j_++) { \
+ COFACTOR_4X4_IJ (a[_j_][_i_], m, _i_, _j_); \
+ a[_j_][_i_] *= s; \
+ } \
+ } \
+}\
+
+/** inverse of matrix
+ *
+ * Compute inverse of matrix a, returning determinant m and
+ * inverse b
+ */
+#define INVERT_2X2(b,det,a) \
+{ \
+ GREAL _tmp_; \
+ DETERMINANT_2X2 (det, a); \
+ _tmp_ = 1.0 / (det); \
+ SCALE_ADJOINT_2X2 (b, _tmp_, a); \
+}\
+
+
+/** inverse of matrix
+ *
+ * Compute inverse of matrix a, returning determinant m and
+ * inverse b
+ */
+#define INVERT_3X3(b,det,a) \
+{ \
+ GREAL _tmp_; \
+ DETERMINANT_3X3 (det, a); \
+ _tmp_ = 1.0 / (det); \
+ SCALE_ADJOINT_3X3 (b, _tmp_, a); \
+}\
+
+
+/** inverse of matrix
+ *
+ * Compute inverse of matrix a, returning determinant m and
+ * inverse b
+ */
+#define INVERT_4X4(b,det,a) \
+{ \
+ GREAL _tmp_; \
+ DETERMINANT_4X4 (det, a); \
+ _tmp_ = 1.0 / (det); \
+ SCALE_ADJOINT_4X4 (b, _tmp_, a); \
+}\
+
+//! Get the triple(3) row of a transform matrix
+#define MAT_GET_ROW(mat,vec3,rowindex)\
+{\
+ vec3[0] = mat[rowindex][0];\
+ vec3[1] = mat[rowindex][1];\
+ vec3[2] = mat[rowindex][2]; \
+}\
+
+//! Get the tuple(2) row of a transform matrix
+#define MAT_GET_ROW2(mat,vec2,rowindex)\
+{\
+ vec2[0] = mat[rowindex][0];\
+ vec2[1] = mat[rowindex][1];\
+}\
+
+
+//! Get the quad (4) row of a transform matrix
+#define MAT_GET_ROW4(mat,vec4,rowindex)\
+{\
+ vec4[0] = mat[rowindex][0];\
+ vec4[1] = mat[rowindex][1];\
+ vec4[2] = mat[rowindex][2];\
+ vec4[3] = mat[rowindex][3];\
+}\
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_GET_COL(mat,vec3,colindex)\
+{\
+ vec3[0] = mat[0][colindex];\
+ vec3[1] = mat[1][colindex];\
+ vec3[2] = mat[2][colindex]; \
+}\
+
+//! Get the tuple(2) col of a transform matrix
+#define MAT_GET_COL2(mat,vec2,colindex)\
+{\
+ vec2[0] = mat[0][colindex];\
+ vec2[1] = mat[1][colindex];\
+}\
+
+
+//! Get the quad (4) col of a transform matrix
+#define MAT_GET_COL4(mat,vec4,colindex)\
+{\
+ vec4[0] = mat[0][colindex];\
+ vec4[1] = mat[1][colindex];\
+ vec4[2] = mat[2][colindex];\
+ vec4[3] = mat[3][colindex];\
+}\
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_GET_X(mat,vec3)\
+{\
+ MAT_GET_COL(mat,vec3,0);\
+}\
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_GET_Y(mat,vec3)\
+{\
+ MAT_GET_COL(mat,vec3,1);\
+}\
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_GET_Z(mat,vec3)\
+{\
+ MAT_GET_COL(mat,vec3,2);\
+}\
+
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_SET_X(mat,vec3)\
+{\
+ mat[0][0] = vec3[0];\
+ mat[1][0] = vec3[1];\
+ mat[2][0] = vec3[2];\
+}\
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_SET_Y(mat,vec3)\
+{\
+ mat[0][1] = vec3[0];\
+ mat[1][1] = vec3[1];\
+ mat[2][1] = vec3[2];\
+}\
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_SET_Z(mat,vec3)\
+{\
+ mat[0][2] = vec3[0];\
+ mat[1][2] = vec3[1];\
+ mat[2][2] = vec3[2];\
+}\
+
+
+//! Get the triple(3) col of a transform matrix
+#define MAT_GET_TRANSLATION(mat,vec3)\
+{\
+ vec3[0] = mat[0][3];\
+ vec3[1] = mat[1][3];\
+ vec3[2] = mat[2][3]; \
+}\
+
+//! Set the triple(3) col of a transform matrix
+#define MAT_SET_TRANSLATION(mat,vec3)\
+{\
+ mat[0][3] = vec3[0];\
+ mat[1][3] = vec3[1];\
+ mat[2][3] = vec3[2]; \
+}\
+
+
+
+//! Returns the dot product between a vec3f and the row of a matrix
+#define MAT_DOT_ROW(mat,vec3,rowindex) (vec3[0]*mat[rowindex][0] + vec3[1]*mat[rowindex][1] + vec3[2]*mat[rowindex][2])
+
+//! Returns the dot product between a vec2f and the row of a matrix
+#define MAT_DOT_ROW2(mat,vec2,rowindex) (vec2[0]*mat[rowindex][0] + vec2[1]*mat[rowindex][1])
+
+//! Returns the dot product between a vec4f and the row of a matrix
+#define MAT_DOT_ROW4(mat,vec4,rowindex) (vec4[0]*mat[rowindex][0] + vec4[1]*mat[rowindex][1] + vec4[2]*mat[rowindex][2] + vec4[3]*mat[rowindex][3])
+
+
+//! Returns the dot product between a vec3f and the col of a matrix
+#define MAT_DOT_COL(mat,vec3,colindex) (vec3[0]*mat[0][colindex] + vec3[1]*mat[1][colindex] + vec3[2]*mat[2][colindex])
+
+//! Returns the dot product between a vec2f and the col of a matrix
+#define MAT_DOT_COL2(mat,vec2,colindex) (vec2[0]*mat[0][colindex] + vec2[1]*mat[1][colindex])
+
+//! Returns the dot product between a vec4f and the col of a matrix
+#define MAT_DOT_COL4(mat,vec4,colindex) (vec4[0]*mat[0][colindex] + vec4[1]*mat[1][colindex] + vec4[2]*mat[2][colindex] + vec4[3]*mat[3][colindex])
+
+/*!Transpose matrix times vector
+v is a vec3f
+and m is a mat4f<br>
+*/
+#define INV_MAT_DOT_VEC_3X3(p,m,v) \
+{ \
+ p[0] = MAT_DOT_COL(m,v,0); \
+ p[1] = MAT_DOT_COL(m,v,1); \
+ p[2] = MAT_DOT_COL(m,v,2); \
+}\
+
+
+
+#endif // GIM_VECTOR_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_math.h b/tests/bullet/src/BulletCollision/Gimpact/gim_math.h
new file mode 100644
index 00000000..939079e1
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_math.h
@@ -0,0 +1,157 @@
+#ifndef GIM_MATH_H_INCLUDED
+#define GIM_MATH_H_INCLUDED
+/*! \file gim_math.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "LinearMath/btScalar.h"
+
+
+
+#define GREAL btScalar
+#define GREAL2 double
+#define GINT int
+#define GUINT unsigned int
+#define GSHORT short
+#define GUSHORT unsigned short
+#define GINT64 long long
+#define GUINT64 unsigned long long
+
+
+
+#define G_PI 3.14159265358979f
+#define G_HALF_PI 1.5707963f
+//267948966
+#define G_TWO_PI 6.28318530f
+//71795864
+#define G_ROOT3 1.73205f
+#define G_ROOT2 1.41421f
+#define G_UINT_INFINITY 0xffffffff //!< A very very high value
+#define G_REAL_INFINITY FLT_MAX
+#define G_SIGN_BITMASK 0x80000000
+#define G_EPSILON SIMD_EPSILON
+
+
+
+enum GIM_SCALAR_TYPES
+{
+ G_STYPE_REAL =0,
+ G_STYPE_REAL2,
+ G_STYPE_SHORT,
+ G_STYPE_USHORT,
+ G_STYPE_INT,
+ G_STYPE_UINT,
+ G_STYPE_INT64,
+ G_STYPE_UINT64
+};
+
+
+
+#define G_DEGTORAD(X) ((X)*3.1415926f/180.0f)
+#define G_RADTODEG(X) ((X)*180.0f/3.1415926f)
+
+//! Integer representation of a floating-point value.
+#define GIM_IR(x) ((GUINT&)(x))
+
+//! Signed integer representation of a floating-point value.
+#define GIM_SIR(x) ((GINT&)(x))
+
+//! Absolute integer representation of a floating-point value
+#define GIM_AIR(x) (GIM_IR(x)&0x7fffffff)
+
+//! Floating-point representation of an integer value.
+#define GIM_FR(x) ((GREAL&)(x))
+
+#define GIM_MAX(a,b) (a<b?b:a)
+#define GIM_MIN(a,b) (a>b?b:a)
+
+#define GIM_MAX3(a,b,c) GIM_MAX(a,GIM_MAX(b,c))
+#define GIM_MIN3(a,b,c) GIM_MIN(a,GIM_MIN(b,c))
+
+#define GIM_IS_ZERO(value) (value < G_EPSILON && value > -G_EPSILON)
+
+#define GIM_IS_NEGATIVE(value) (value <= -G_EPSILON)
+
+#define GIM_IS_POSISITVE(value) (value >= G_EPSILON)
+
+#define GIM_NEAR_EQUAL(v1,v2) GIM_IS_ZERO((v1-v2))
+
+///returns a clamped number
+#define GIM_CLAMP(number,minval,maxval) (number<minval?minval:(number>maxval?maxval:number))
+
+#define GIM_GREATER(x, y) btFabs(x) > (y)
+
+///Swap numbers
+#define GIM_SWAP_NUMBERS(a,b){ \
+ a = a+b; \
+ b = a-b; \
+ a = a-b; \
+}\
+
+#define GIM_INV_SQRT(va,isva)\
+{\
+ if(va<=0.0000001f)\
+ {\
+ isva = G_REAL_INFINITY;\
+ }\
+ else\
+ {\
+ GREAL _x = va * 0.5f;\
+ GUINT _y = 0x5f3759df - ( GIM_IR(va) >> 1);\
+ isva = GIM_FR(_y);\
+ isva = isva * ( 1.5f - ( _x * isva * isva ) );\
+ }\
+}\
+
+#define GIM_SQRT(va,sva)\
+{\
+ GIM_INV_SQRT(va,sva);\
+ sva = 1.0f/sva;\
+}\
+
+//! Computes 1.0f / sqrtf(x). Comes from Quake3. See http://www.magic-software.com/3DGEDInvSqrt.html
+inline GREAL gim_inv_sqrt(GREAL f)
+{
+ GREAL r;
+ GIM_INV_SQRT(f,r);
+ return r;
+}
+
+inline GREAL gim_sqrt(GREAL f)
+{
+ GREAL r;
+ GIM_SQRT(f,r);
+ return r;
+}
+
+
+
+#endif // GIM_MATH_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_memory.cpp b/tests/bullet/src/BulletCollision/Gimpact/gim_memory.cpp
new file mode 100644
index 00000000..1636eb78
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_memory.cpp
@@ -0,0 +1,135 @@
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+#include "gim_memory.h"
+#include "stdlib.h"
+
+#ifdef GIM_SIMD_MEMORY
+#include "LinearMath/btAlignedAllocator.h"
+#endif
+
+static gim_alloc_function *g_allocfn = 0;
+static gim_alloca_function *g_allocafn = 0;
+static gim_realloc_function *g_reallocfn = 0;
+static gim_free_function *g_freefn = 0;
+
+void gim_set_alloc_handler (gim_alloc_function *fn)
+{
+ g_allocfn = fn;
+}
+
+void gim_set_alloca_handler (gim_alloca_function *fn)
+{
+ g_allocafn = fn;
+}
+
+void gim_set_realloc_handler (gim_realloc_function *fn)
+{
+ g_reallocfn = fn;
+}
+
+void gim_set_free_handler (gim_free_function *fn)
+{
+ g_freefn = fn;
+}
+
+gim_alloc_function *gim_get_alloc_handler()
+{
+ return g_allocfn;
+}
+
+gim_alloca_function *gim_get_alloca_handler()
+{
+ return g_allocafn;
+}
+
+
+gim_realloc_function *gim_get_realloc_handler ()
+{
+ return g_reallocfn;
+}
+
+
+gim_free_function *gim_get_free_handler ()
+{
+ return g_freefn;
+}
+
+
+void * gim_alloc(size_t size)
+{
+ void * ptr;
+ if (g_allocfn)
+ {
+ ptr = g_allocfn(size);
+ }
+ else
+ {
+#ifdef GIM_SIMD_MEMORY
+ ptr = btAlignedAlloc(size,16);
+#else
+ ptr = malloc(size);
+#endif
+ }
+ return ptr;
+}
+
+void * gim_alloca(size_t size)
+{
+ if (g_allocafn) return g_allocafn(size); else return gim_alloc(size);
+}
+
+
+void * gim_realloc(void *ptr, size_t oldsize, size_t newsize)
+{
+ void * newptr = gim_alloc(newsize);
+ size_t copysize = oldsize<newsize?oldsize:newsize;
+ gim_simd_memcpy(newptr,ptr,copysize);
+ gim_free(ptr);
+ return newptr;
+}
+
+void gim_free(void *ptr)
+{
+ if (!ptr) return;
+ if (g_freefn)
+ {
+ g_freefn(ptr);
+ }
+ else
+ {
+ #ifdef GIM_SIMD_MEMORY
+ btAlignedFree(ptr);
+ #else
+ free(ptr);
+ #endif
+ }
+}
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_memory.h b/tests/bullet/src/BulletCollision/Gimpact/gim_memory.h
new file mode 100644
index 00000000..e203888a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_memory.h
@@ -0,0 +1,190 @@
+#ifndef GIM_MEMORY_H_INCLUDED
+#define GIM_MEMORY_H_INCLUDED
+/*! \file gim_memory.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+
+#include "gim_math.h"
+#include <string.h>
+
+#ifdef PREFETCH
+#include <xmmintrin.h> // for prefetch
+#define pfval 64
+#define pfval2 128
+//! Prefetch 64
+#define pf(_x,_i) _mm_prefetch((void *)(_x + _i + pfval), 0)
+//! Prefetch 128
+#define pf2(_x,_i) _mm_prefetch((void *)(_x + _i + pfval2), 0)
+#else
+//! Prefetch 64
+#define pf(_x,_i)
+//! Prefetch 128
+#define pf2(_x,_i)
+#endif
+
+
+///Functions for manip packed arrays of numbers
+#define GIM_COPY_ARRAYS(dest_array,source_array,element_count)\
+{\
+ for (GUINT _i_=0;_i_<element_count ;++_i_)\
+ {\
+ dest_array[_i_] = source_array[_i_];\
+ }\
+}\
+
+#define GIM_COPY_ARRAYS_1(dest_array,source_array,element_count,copy_macro)\
+{\
+ for (GUINT _i_=0;_i_<element_count ;++_i_)\
+ {\
+ copy_macro(dest_array[_i_],source_array[_i_]);\
+ }\
+}\
+
+
+#define GIM_ZERO_ARRAY(array,element_count)\
+{\
+ for (GUINT _i_=0;_i_<element_count ;++_i_)\
+ {\
+ array[_i_] = 0;\
+ }\
+}\
+
+#define GIM_CONSTANT_ARRAY(array,element_count,constant)\
+{\
+ for (GUINT _i_=0;_i_<element_count ;++_i_)\
+ {\
+ array[_i_] = constant;\
+ }\
+}\
+
+
+///Function prototypes to allocate and free memory.
+typedef void * gim_alloc_function (size_t size);
+typedef void * gim_alloca_function (size_t size);//Allocs on the heap
+typedef void * gim_realloc_function (void *ptr, size_t oldsize, size_t newsize);
+typedef void gim_free_function (void *ptr);
+
+
+///Memory Function Handlers
+///set new memory management functions. if fn is 0, the default handlers are used.
+void gim_set_alloc_handler (gim_alloc_function *fn);
+void gim_set_alloca_handler (gim_alloca_function *fn);
+void gim_set_realloc_handler (gim_realloc_function *fn);
+void gim_set_free_handler (gim_free_function *fn);
+
+
+///get current memory management functions.
+gim_alloc_function *gim_get_alloc_handler (void);
+gim_alloca_function *gim_get_alloca_handler(void);
+gim_realloc_function *gim_get_realloc_handler (void);
+gim_free_function *gim_get_free_handler (void);
+
+
+///Standar Memory functions
+void * gim_alloc(size_t size);
+void * gim_alloca(size_t size);
+void * gim_realloc(void *ptr, size_t oldsize, size_t newsize);
+void gim_free(void *ptr);
+
+
+
+#if defined (_WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
+ #define GIM_SIMD_MEMORY 1
+#endif
+
+//! SIMD POINTER INTEGER
+#define SIMD_T GUINT64
+//! SIMD INTEGER SIZE
+#define SIMD_T_SIZE sizeof(SIMD_T)
+
+
+inline void gim_simd_memcpy(void * dst, const void * src, size_t copysize)
+{
+#ifdef GIM_SIMD_MEMORY
+/*
+//'long long int' is incompatible with visual studio 6...
+ //copy words
+ SIMD_T * ui_src_ptr = (SIMD_T *)src;
+ SIMD_T * ui_dst_ptr = (SIMD_T *)dst;
+ while(copysize>=SIMD_T_SIZE)
+ {
+ *(ui_dst_ptr++) = *(ui_src_ptr++);
+ copysize-=SIMD_T_SIZE;
+ }
+ if(copysize==0) return;
+*/
+
+ char * c_src_ptr = (char *)src;
+ char * c_dst_ptr = (char *)dst;
+ while(copysize>0)
+ {
+ *(c_dst_ptr++) = *(c_src_ptr++);
+ copysize--;
+ }
+ return;
+#else
+ memcpy(dst,src,copysize);
+#endif
+}
+
+
+
+template<class T>
+inline void gim_swap_elements(T* _array,size_t _i,size_t _j)
+{
+ T _e_tmp_ = _array[_i];
+ _array[_i] = _array[_j];
+ _array[_j] = _e_tmp_;
+}
+
+
+template<class T>
+inline void gim_swap_elements_memcpy(T* _array,size_t _i,size_t _j)
+{
+ char _e_tmp_[sizeof(T)];
+ gim_simd_memcpy(_e_tmp_,&_array[_i],sizeof(T));
+ gim_simd_memcpy(&_array[_i],&_array[_j],sizeof(T));
+ gim_simd_memcpy(&_array[_j],_e_tmp_,sizeof(T));
+}
+
+template <int SIZE>
+inline void gim_swap_elements_ptr(char * _array,size_t _i,size_t _j)
+{
+ char _e_tmp_[SIZE];
+ _i*=SIZE;
+ _j*=SIZE;
+ gim_simd_memcpy(_e_tmp_,_array+_i,SIZE);
+ gim_simd_memcpy(_array+_i,_array+_j,SIZE);
+ gim_simd_memcpy(_array+_j,_e_tmp_,SIZE);
+}
+
+#endif // GIM_MEMORY_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_radixsort.h b/tests/bullet/src/BulletCollision/Gimpact/gim_radixsort.h
new file mode 100644
index 00000000..c246ef12
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_radixsort.h
@@ -0,0 +1,406 @@
+#ifndef GIM_RADIXSORT_H_INCLUDED
+#define GIM_RADIXSORT_H_INCLUDED
+/*! \file gim_radixsort.h
+\author Francisco Leon Najera.
+Based on the work of Michael Herf : "fast floating-point radix sort"
+Avaliable on http://www.stereopsis.com/radix.html
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "gim_memory.h"
+
+///Macros for sorting.
+//! Prototype for comparators
+class less_comparator
+{
+ public:
+
+ template<class T,class Z>
+ inline int operator() ( const T& a, const Z& b )
+ {
+ return ( a<b?-1:(a>b?1:0));
+ }
+};
+
+//! Prototype for comparators
+class integer_comparator
+{
+ public:
+
+ template<class T>
+ inline int operator() ( const T& a, const T& b )
+ {
+ return (int)(a-b);
+ }
+};
+
+//!Prototype for getting the integer representation of an object
+class uint_key_func
+{
+public:
+ template<class T>
+ inline GUINT operator()( const T& a)
+ {
+ return (GUINT)a;
+ }
+};
+
+
+//!Prototype for copying elements
+class copy_elements_func
+{
+public:
+ template<class T>
+ inline void operator()(T& a,T& b)
+ {
+ a = b;
+ }
+};
+
+//!Prototype for copying elements
+class memcopy_elements_func
+{
+public:
+ template<class T>
+ inline void operator()(T& a,T& b)
+ {
+ gim_simd_memcpy(&a,&b,sizeof(T));
+ }
+};
+
+
+//! @{
+struct GIM_RSORT_TOKEN
+{
+ GUINT m_key;
+ GUINT m_value;
+ GIM_RSORT_TOKEN()
+ {
+ }
+ GIM_RSORT_TOKEN(const GIM_RSORT_TOKEN& rtoken)
+ {
+ m_key = rtoken.m_key;
+ m_value = rtoken.m_value;
+ }
+
+ inline bool operator <(const GIM_RSORT_TOKEN& other) const
+ {
+ return (m_key < other.m_key);
+ }
+
+ inline bool operator >(const GIM_RSORT_TOKEN& other) const
+ {
+ return (m_key > other.m_key);
+ }
+};
+
+//! Prototype for comparators
+class GIM_RSORT_TOKEN_COMPARATOR
+{
+ public:
+
+ inline int operator()( const GIM_RSORT_TOKEN& a, const GIM_RSORT_TOKEN& b )
+ {
+ return (int)((a.m_key) - (b.m_key));
+ }
+};
+
+
+
+#define kHist 2048
+// ---- utils for accessing 11-bit quantities
+#define D11_0(x) (x & 0x7FF)
+#define D11_1(x) (x >> 11 & 0x7FF)
+#define D11_2(x) (x >> 22 )
+
+
+
+///Radix sort for unsigned integer keys
+inline void gim_radix_sort_rtokens(
+ GIM_RSORT_TOKEN * array,
+ GIM_RSORT_TOKEN * sorted, GUINT element_count)
+{
+ GUINT i;
+ GUINT b0[kHist * 3];
+ GUINT *b1 = b0 + kHist;
+ GUINT *b2 = b1 + kHist;
+ for (i = 0; i < kHist * 3; ++i)
+ {
+ b0[i] = 0;
+ }
+ GUINT fi;
+ GUINT pos;
+ for (i = 0; i < element_count; ++i)
+ {
+ fi = array[i].m_key;
+ b0[D11_0(fi)] ++;
+ b1[D11_1(fi)] ++;
+ b2[D11_2(fi)] ++;
+ }
+ {
+ GUINT sum0 = 0, sum1 = 0, sum2 = 0;
+ GUINT tsum;
+ for (i = 0; i < kHist; ++i)
+ {
+ tsum = b0[i] + sum0;
+ b0[i] = sum0 - 1;
+ sum0 = tsum;
+ tsum = b1[i] + sum1;
+ b1[i] = sum1 - 1;
+ sum1 = tsum;
+ tsum = b2[i] + sum2;
+ b2[i] = sum2 - 1;
+ sum2 = tsum;
+ }
+ }
+ for (i = 0; i < element_count; ++i)
+ {
+ fi = array[i].m_key;
+ pos = D11_0(fi);
+ pos = ++b0[pos];
+ sorted[pos].m_key = array[i].m_key;
+ sorted[pos].m_value = array[i].m_value;
+ }
+ for (i = 0; i < element_count; ++i)
+ {
+ fi = sorted[i].m_key;
+ pos = D11_1(fi);
+ pos = ++b1[pos];
+ array[pos].m_key = sorted[i].m_key;
+ array[pos].m_value = sorted[i].m_value;
+ }
+ for (i = 0; i < element_count; ++i)
+ {
+ fi = array[i].m_key;
+ pos = D11_2(fi);
+ pos = ++b2[pos];
+ sorted[pos].m_key = array[i].m_key;
+ sorted[pos].m_value = array[i].m_value;
+ }
+}
+
+
+
+
+/// Get the sorted tokens from an array. For generic use. Tokens are IRR_RSORT_TOKEN
+/*!
+*\param array Array of elements to sort
+*\param sorted_tokens Tokens of sorted elements
+*\param element_count element count
+*\param uintkey_macro Functor which retrieves the integer representation of an array element
+*/
+template<typename T, class GETKEY_CLASS>
+void gim_radix_sort_array_tokens(
+ T* array ,
+ GIM_RSORT_TOKEN * sorted_tokens,
+ GUINT element_count,GETKEY_CLASS uintkey_macro)
+{
+ GIM_RSORT_TOKEN * _unsorted = (GIM_RSORT_TOKEN *) gim_alloc(sizeof(GIM_RSORT_TOKEN)*element_count);
+ for (GUINT _i=0;_i<element_count;++_i)
+ {
+ _unsorted[_i].m_key = uintkey_macro(array[_i]);
+ _unsorted[_i].m_value = _i;
+ }
+ gim_radix_sort_rtokens(_unsorted,sorted_tokens,element_count);
+ gim_free(_unsorted);
+ gim_free(_unsorted);
+}
+
+/// Sorts array in place. For generic use
+/*!
+\param type Type of the array
+\param array
+\param element_count
+\param get_uintkey_macro Macro for extract the Integer value of the element. Similar to SIMPLE_GET_UINTKEY
+\param copy_elements_macro Macro for copy elements, similar to SIMPLE_COPY_ELEMENTS
+*/
+template<typename T, class GETKEY_CLASS, class COPY_CLASS>
+void gim_radix_sort(
+ T * array, GUINT element_count,
+ GETKEY_CLASS get_uintkey_macro, COPY_CLASS copy_elements_macro)
+{
+ GIM_RSORT_TOKEN * _sorted = (GIM_RSORT_TOKEN *) gim_alloc(sizeof(GIM_RSORT_TOKEN)*element_count);
+ gim_radix_sort_array_tokens(array,_sorted,element_count,get_uintkey_macro);
+ T * _original_array = (T *) gim_alloc(sizeof(T)*element_count);
+ gim_simd_memcpy(_original_array,array,sizeof(T)*element_count);
+ for (GUINT _i=0;_i<element_count;++_i)
+ {
+ copy_elements_macro(array[_i],_original_array[_sorted[_i].m_value]);
+ }
+ gim_free(_original_array);
+ gim_free(_sorted);
+}
+
+//! Failsafe Iterative binary search,
+/*!
+If the element is not found, it returns the nearest upper element position, may be the further position after the last element.
+\param _array
+\param _start_i the beginning of the array
+\param _end_i the ending index of the array
+\param _search_key Value to find
+\param _comp_macro macro for comparing elements
+\param _found If true the value has found. Boolean
+\param _result_index the index of the found element, or if not found then it will get the index of the closest bigger value
+*/
+template<class T, typename KEYCLASS, typename COMP_CLASS>
+bool gim_binary_search_ex(
+ const T* _array, GUINT _start_i,
+ GUINT _end_i,GUINT & _result_index,
+ const KEYCLASS & _search_key,
+ COMP_CLASS _comp_macro)
+{
+ GUINT _k;
+ int _comp_result;
+ GUINT _i = _start_i;
+ GUINT _j = _end_i+1;
+ while (_i < _j)
+ {
+ _k = (_j+_i-1)/2;
+ _comp_result = _comp_macro(_array[_k], _search_key);
+ if (_comp_result == 0)
+ {
+ _result_index = _k;
+ return true;
+ }
+ else if (_comp_result < 0)
+ {
+ _i = _k+1;
+ }
+ else
+ {
+ _j = _k;
+ }
+ }
+ _result_index = _i;
+ return false;
+}
+
+
+
+//! Failsafe Iterative binary search,Template version
+/*!
+If the element is not found, it returns the nearest upper element position, may be the further position after the last element.
+\param _array
+\param _start_i the beginning of the array
+\param _end_i the ending index of the array
+\param _search_key Value to find
+\param _result_index the index of the found element, or if not found then it will get the index of the closest bigger value
+\return true if found, else false
+*/
+template<class T>
+bool gim_binary_search(
+ const T*_array,GUINT _start_i,
+ GUINT _end_i,const T & _search_key,
+ GUINT & _result_index)
+{
+ GUINT _i = _start_i;
+ GUINT _j = _end_i+1;
+ GUINT _k;
+ while(_i < _j)
+ {
+ _k = (_j+_i-1)/2;
+ if(_array[_k]==_search_key)
+ {
+ _result_index = _k;
+ return true;
+ }
+ else if (_array[_k]<_search_key)
+ {
+ _i = _k+1;
+ }
+ else
+ {
+ _j = _k;
+ }
+ }
+ _result_index = _i;
+ return false;
+}
+
+
+
+///heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
+template <typename T, typename COMP_CLASS>
+void gim_down_heap(T *pArr, GUINT k, GUINT n,COMP_CLASS CompareFunc)
+{
+ /* PRE: a[k+1..N] is a heap */
+ /* POST: a[k..N] is a heap */
+
+ T temp = pArr[k - 1];
+ /* k has child(s) */
+ while (k <= n/2)
+ {
+ int child = 2*k;
+
+ if ((child < (int)n) && CompareFunc(pArr[child - 1] , pArr[child])<0)
+ {
+ child++;
+ }
+ /* pick larger child */
+ if (CompareFunc(temp , pArr[child - 1])<0)
+ {
+ /* move child up */
+ pArr[k - 1] = pArr[child - 1];
+ k = child;
+ }
+ else
+ {
+ break;
+ }
+ }
+ pArr[k - 1] = temp;
+} /*downHeap*/
+
+
+template <typename T, typename COMP_CLASS>
+void gim_heap_sort(T *pArr, GUINT element_count, COMP_CLASS CompareFunc)
+{
+ /* sort a[0..N-1], N.B. 0 to N-1 */
+ GUINT k;
+ GUINT n = element_count;
+ for (k = n/2; k > 0; k--)
+ {
+ gim_down_heap(pArr, k, n, CompareFunc);
+ }
+
+ /* a[1..N] is now a heap */
+ while ( n>=2 )
+ {
+ gim_swap_elements(pArr,0,n-1); /* largest of a[0..n-1] */
+ --n;
+ /* restore a[1..i-1] heap */
+ gim_down_heap(pArr, 1, n, CompareFunc);
+ }
+}
+
+
+
+
+#endif // GIM_RADIXSORT_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.cpp b/tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.cpp
new file mode 100644
index 00000000..f9727e1d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.cpp
@@ -0,0 +1,640 @@
+
+/*! \file gim_tri_collision.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "gim_tri_collision.h"
+
+
+#define TRI_LOCAL_EPSILON 0.000001f
+#define MIN_EDGE_EDGE_DIS 0.00001f
+
+
+class GIM_TRIANGLE_CALCULATION_CACHE
+{
+public:
+ GREAL margin;
+ btVector3 tu_vertices[3];
+ btVector3 tv_vertices[3];
+ btVector4 tu_plane;
+ btVector4 tv_plane;
+ btVector3 closest_point_u;
+ btVector3 closest_point_v;
+ btVector3 edge_edge_dir;
+ btVector3 distances;
+ GREAL du[4];
+ GREAL du0du1;
+ GREAL du0du2;
+ GREAL dv[4];
+ GREAL dv0dv1;
+ GREAL dv0dv2;
+ btVector3 temp_points[MAX_TRI_CLIPPING];
+ btVector3 temp_points1[MAX_TRI_CLIPPING];
+ btVector3 contact_points[MAX_TRI_CLIPPING];
+
+
+
+ //! if returns false, the faces are paralele
+ SIMD_FORCE_INLINE bool compute_intervals(
+ const GREAL &D0,
+ const GREAL &D1,
+ const GREAL &D2,
+ const GREAL &D0D1,
+ const GREAL &D0D2,
+ GREAL & scale_edge0,
+ GREAL & scale_edge1,
+ GUINT &edge_index0,
+ GUINT &edge_index1)
+ {
+ if(D0D1>0.0f)
+ {
+ /* here we know that D0D2<=0.0 */
+ /* that is D0, D1 are on the same side, D2 on the other or on the plane */
+ scale_edge0 = -D2/(D0-D2);
+ scale_edge1 = -D1/(D2-D1);
+ edge_index0 = 2;edge_index1 = 1;
+ }
+ else if(D0D2>0.0f)
+ {
+ /* here we know that d0d1<=0.0 */
+ scale_edge0 = -D0/(D1-D0);
+ scale_edge1 = -D1/(D2-D1);
+ edge_index0 = 0;edge_index1 = 1;
+ }
+ else if(D1*D2>0.0f || D0!=0.0f)
+ {
+ /* here we know that d0d1<=0.0 or that D0!=0.0 */
+ scale_edge0 = -D0/(D1-D0);
+ scale_edge1 = -D2/(D0-D2);
+ edge_index0 = 0 ;edge_index1 = 2;
+ }
+ else
+ {
+ return false;
+ }
+ return true;
+ }
+
+
+ //! clip triangle
+ /*!
+ */
+ SIMD_FORCE_INLINE GUINT clip_triangle(
+ const btVector4 & tri_plane,
+ const btVector3 * tripoints,
+ const btVector3 * srcpoints,
+ btVector3 * clip_points)
+ {
+ // edge 0
+
+ btVector4 edgeplane;
+
+ EDGE_PLANE(tripoints[0],tripoints[1],tri_plane,edgeplane);
+
+ GUINT clipped_count = PLANE_CLIP_TRIANGLE3D(
+ edgeplane,srcpoints[0],srcpoints[1],srcpoints[2],temp_points);
+
+ if(clipped_count == 0) return 0;
+
+ // edge 1
+
+ EDGE_PLANE(tripoints[1],tripoints[2],tri_plane,edgeplane);
+
+ clipped_count = PLANE_CLIP_POLYGON3D(
+ edgeplane,temp_points,clipped_count,temp_points1);
+
+ if(clipped_count == 0) return 0;
+
+ // edge 2
+
+ EDGE_PLANE(tripoints[2],tripoints[0],tri_plane,edgeplane);
+
+ clipped_count = PLANE_CLIP_POLYGON3D(
+ edgeplane,temp_points1,clipped_count,clip_points);
+
+ return clipped_count;
+
+
+ /*GUINT i0 = (tri_plane.closestAxis()+1)%3;
+ GUINT i1 = (i0+1)%3;
+ // edge 0
+ btVector3 temp_points[MAX_TRI_CLIPPING];
+ btVector3 temp_points1[MAX_TRI_CLIPPING];
+
+ GUINT clipped_count= PLANE_CLIP_TRIANGLE_GENERIC(
+ 0,srcpoints[0],srcpoints[1],srcpoints[2],temp_points,
+ DISTANCE_EDGE(tripoints[0],tripoints[1],i0,i1));
+
+
+ if(clipped_count == 0) return 0;
+
+ // edge 1
+ clipped_count = PLANE_CLIP_POLYGON_GENERIC(
+ 0,temp_points,clipped_count,temp_points1,
+ DISTANCE_EDGE(tripoints[1],tripoints[2],i0,i1));
+
+ if(clipped_count == 0) return 0;
+
+ // edge 2
+ clipped_count = PLANE_CLIP_POLYGON_GENERIC(
+ 0,temp_points1,clipped_count,clipped_points,
+ DISTANCE_EDGE(tripoints[2],tripoints[0],i0,i1));
+
+ return clipped_count;*/
+ }
+
+ SIMD_FORCE_INLINE void sort_isect(
+ GREAL & isect0,GREAL & isect1,GUINT &e0,GUINT &e1,btVector3 & vec0,btVector3 & vec1)
+ {
+ if(isect1<isect0)
+ {
+ //swap
+ GIM_SWAP_NUMBERS(isect0,isect1);
+ GIM_SWAP_NUMBERS(e0,e1);
+ btVector3 tmp = vec0;
+ vec0 = vec1;
+ vec1 = tmp;
+ }
+ }
+
+ //! Test verifying interval intersection with the direction between planes
+ /*!
+ \pre tv_plane and tu_plane must be set
+ \post
+ distances[2] is set with the distance
+ closest_point_u, closest_point_v, edge_edge_dir are set too
+ \return
+ - 0: faces are paralele
+ - 1: face U casts face V
+ - 2: face V casts face U
+ - 3: nearest edges
+ */
+ SIMD_FORCE_INLINE GUINT cross_line_intersection_test()
+ {
+ // Compute direction of intersection line
+ edge_edge_dir = tu_plane.cross(tv_plane);
+ GREAL Dlen;
+ VEC_LENGTH(edge_edge_dir,Dlen);
+
+ if(Dlen<0.0001)
+ {
+ return 0; //faces near paralele
+ }
+
+ edge_edge_dir*= 1/Dlen;//normalize
+
+
+ // Compute interval for triangle 1
+ GUINT tu_e0,tu_e1;//edge indices
+ GREAL tu_scale_e0,tu_scale_e1;//edge scale
+ if(!compute_intervals(du[0],du[1],du[2],
+ du0du1,du0du2,tu_scale_e0,tu_scale_e1,tu_e0,tu_e1)) return 0;
+
+ // Compute interval for triangle 2
+ GUINT tv_e0,tv_e1;//edge indices
+ GREAL tv_scale_e0,tv_scale_e1;//edge scale
+
+ if(!compute_intervals(dv[0],dv[1],dv[2],
+ dv0dv1,dv0dv2,tv_scale_e0,tv_scale_e1,tv_e0,tv_e1)) return 0;
+
+ //proyected vertices
+ btVector3 up_e0 = tu_vertices[tu_e0].lerp(tu_vertices[(tu_e0+1)%3],tu_scale_e0);
+ btVector3 up_e1 = tu_vertices[tu_e1].lerp(tu_vertices[(tu_e1+1)%3],tu_scale_e1);
+
+ btVector3 vp_e0 = tv_vertices[tv_e0].lerp(tv_vertices[(tv_e0+1)%3],tv_scale_e0);
+ btVector3 vp_e1 = tv_vertices[tv_e1].lerp(tv_vertices[(tv_e1+1)%3],tv_scale_e1);
+
+ //proyected intervals
+ GREAL isect_u[] = {up_e0.dot(edge_edge_dir),up_e1.dot(edge_edge_dir)};
+ GREAL isect_v[] = {vp_e0.dot(edge_edge_dir),vp_e1.dot(edge_edge_dir)};
+
+ sort_isect(isect_u[0],isect_u[1],tu_e0,tu_e1,up_e0,up_e1);
+ sort_isect(isect_v[0],isect_v[1],tv_e0,tv_e1,vp_e0,vp_e1);
+
+ const GREAL midpoint_u = 0.5f*(isect_u[0]+isect_u[1]); // midpoint
+ const GREAL midpoint_v = 0.5f*(isect_v[0]+isect_v[1]); // midpoint
+
+ if(midpoint_u<midpoint_v)
+ {
+ if(isect_u[1]>=isect_v[1]) // face U casts face V
+ {
+ return 1;
+ }
+ else if(isect_v[0]<=isect_u[0]) // face V casts face U
+ {
+ return 2;
+ }
+ // closest points
+ closest_point_u = up_e1;
+ closest_point_v = vp_e0;
+ // calc edges and separation
+
+ if(isect_u[1]+ MIN_EDGE_EDGE_DIS<isect_v[0]) //calc distance between two lines instead
+ {
+ SEGMENT_COLLISION(
+ tu_vertices[tu_e1],tu_vertices[(tu_e1+1)%3],
+ tv_vertices[tv_e0],tv_vertices[(tv_e0+1)%3],
+ closest_point_u,
+ closest_point_v);
+
+ edge_edge_dir = closest_point_u-closest_point_v;
+ VEC_LENGTH(edge_edge_dir,distances[2]);
+ edge_edge_dir *= 1.0f/distances[2];// normalize
+ }
+ else
+ {
+ distances[2] = isect_v[0]-isect_u[1];//distance negative
+ //edge_edge_dir *= -1.0f; //normal pointing from V to U
+ }
+
+ }
+ else
+ {
+ if(isect_v[1]>=isect_u[1]) // face V casts face U
+ {
+ return 2;
+ }
+ else if(isect_u[0]<=isect_v[0]) // face U casts face V
+ {
+ return 1;
+ }
+ // closest points
+ closest_point_u = up_e0;
+ closest_point_v = vp_e1;
+ // calc edges and separation
+
+ if(isect_v[1]+MIN_EDGE_EDGE_DIS<isect_u[0]) //calc distance between two lines instead
+ {
+ SEGMENT_COLLISION(
+ tu_vertices[tu_e0],tu_vertices[(tu_e0+1)%3],
+ tv_vertices[tv_e1],tv_vertices[(tv_e1+1)%3],
+ closest_point_u,
+ closest_point_v);
+
+ edge_edge_dir = closest_point_u-closest_point_v;
+ VEC_LENGTH(edge_edge_dir,distances[2]);
+ edge_edge_dir *= 1.0f/distances[2];// normalize
+ }
+ else
+ {
+ distances[2] = isect_u[0]-isect_v[1];//distance negative
+ //edge_edge_dir *= -1.0f; //normal pointing from V to U
+ }
+ }
+ return 3;
+ }
+
+
+ //! collides by two sides
+ SIMD_FORCE_INLINE bool triangle_collision(
+ const btVector3 & u0,
+ const btVector3 & u1,
+ const btVector3 & u2,
+ GREAL margin_u,
+ const btVector3 & v0,
+ const btVector3 & v1,
+ const btVector3 & v2,
+ GREAL margin_v,
+ GIM_TRIANGLE_CONTACT_DATA & contacts)
+ {
+
+ margin = margin_u + margin_v;
+
+ tu_vertices[0] = u0;
+ tu_vertices[1] = u1;
+ tu_vertices[2] = u2;
+
+ tv_vertices[0] = v0;
+ tv_vertices[1] = v1;
+ tv_vertices[2] = v2;
+
+ //create planes
+ // plane v vs U points
+
+ TRIANGLE_PLANE(tv_vertices[0],tv_vertices[1],tv_vertices[2],tv_plane);
+
+ du[0] = DISTANCE_PLANE_POINT(tv_plane,tu_vertices[0]);
+ du[1] = DISTANCE_PLANE_POINT(tv_plane,tu_vertices[1]);
+ du[2] = DISTANCE_PLANE_POINT(tv_plane,tu_vertices[2]);
+
+
+ du0du1 = du[0] * du[1];
+ du0du2 = du[0] * du[2];
+
+
+ if(du0du1>0.0f && du0du2>0.0f) // same sign on all of them + not equal 0 ?
+ {
+ if(du[0]<0) //we need test behind the triangle plane
+ {
+ distances[0] = GIM_MAX3(du[0],du[1],du[2]);
+ distances[0] = -distances[0];
+ if(distances[0]>margin) return false; //never intersect
+
+ //reorder triangle v
+ VEC_SWAP(tv_vertices[0],tv_vertices[1]);
+ VEC_SCALE_4(tv_plane,-1.0f,tv_plane);
+ }
+ else
+ {
+ distances[0] = GIM_MIN3(du[0],du[1],du[2]);
+ if(distances[0]>margin) return false; //never intersect
+ }
+ }
+ else
+ {
+ //Look if we need to invert the triangle
+ distances[0] = (du[0]+du[1]+du[2])/3.0f; //centroid
+
+ if(distances[0]<0.0f)
+ {
+ //reorder triangle v
+ VEC_SWAP(tv_vertices[0],tv_vertices[1]);
+ VEC_SCALE_4(tv_plane,-1.0f,tv_plane);
+
+ distances[0] = GIM_MAX3(du[0],du[1],du[2]);
+ distances[0] = -distances[0];
+ }
+ else
+ {
+ distances[0] = GIM_MIN3(du[0],du[1],du[2]);
+ }
+ }
+
+
+ // plane U vs V points
+
+ TRIANGLE_PLANE(tu_vertices[0],tu_vertices[1],tu_vertices[2],tu_plane);
+
+ dv[0] = DISTANCE_PLANE_POINT(tu_plane,tv_vertices[0]);
+ dv[1] = DISTANCE_PLANE_POINT(tu_plane,tv_vertices[1]);
+ dv[2] = DISTANCE_PLANE_POINT(tu_plane,tv_vertices[2]);
+
+ dv0dv1 = dv[0] * dv[1];
+ dv0dv2 = dv[0] * dv[2];
+
+
+ if(dv0dv1>0.0f && dv0dv2>0.0f) // same sign on all of them + not equal 0 ?
+ {
+ if(dv[0]<0) //we need test behind the triangle plane
+ {
+ distances[1] = GIM_MAX3(dv[0],dv[1],dv[2]);
+ distances[1] = -distances[1];
+ if(distances[1]>margin) return false; //never intersect
+
+ //reorder triangle u
+ VEC_SWAP(tu_vertices[0],tu_vertices[1]);
+ VEC_SCALE_4(tu_plane,-1.0f,tu_plane);
+ }
+ else
+ {
+ distances[1] = GIM_MIN3(dv[0],dv[1],dv[2]);
+ if(distances[1]>margin) return false; //never intersect
+ }
+ }
+ else
+ {
+ //Look if we need to invert the triangle
+ distances[1] = (dv[0]+dv[1]+dv[2])/3.0f; //centroid
+
+ if(distances[1]<0.0f)
+ {
+ //reorder triangle v
+ VEC_SWAP(tu_vertices[0],tu_vertices[1]);
+ VEC_SCALE_4(tu_plane,-1.0f,tu_plane);
+
+ distances[1] = GIM_MAX3(dv[0],dv[1],dv[2]);
+ distances[1] = -distances[1];
+ }
+ else
+ {
+ distances[1] = GIM_MIN3(dv[0],dv[1],dv[2]);
+ }
+ }
+
+ GUINT bl;
+ /* bl = cross_line_intersection_test();
+ if(bl==3)
+ {
+ //take edge direction too
+ bl = distances.maxAxis();
+ }
+ else
+ {*/
+ bl = 0;
+ if(distances[0]<distances[1]) bl = 1;
+ //}
+
+ if(bl==2) //edge edge separation
+ {
+ if(distances[2]>margin) return false;
+
+ contacts.m_penetration_depth = -distances[2] + margin;
+ contacts.m_points[0] = closest_point_v;
+ contacts.m_point_count = 1;
+ VEC_COPY(contacts.m_separating_normal,edge_edge_dir);
+
+ return true;
+ }
+
+ //clip face against other
+
+
+ GUINT point_count;
+ //TODO
+ if(bl == 0) //clip U points against V
+ {
+ point_count = clip_triangle(tv_plane,tv_vertices,tu_vertices,contact_points);
+ if(point_count == 0) return false;
+ contacts.merge_points(tv_plane,margin,contact_points,point_count);
+ }
+ else //clip V points against U
+ {
+ point_count = clip_triangle(tu_plane,tu_vertices,tv_vertices,contact_points);
+ if(point_count == 0) return false;
+ contacts.merge_points(tu_plane,margin,contact_points,point_count);
+ contacts.m_separating_normal *= -1.f;
+ }
+ if(contacts.m_point_count == 0) return false;
+ return true;
+ }
+
+};
+
+
+/*class GIM_TRIANGLE_CALCULATION_CACHE
+{
+public:
+ GREAL margin;
+ GUINT clipped_count;
+ btVector3 tu_vertices[3];
+ btVector3 tv_vertices[3];
+ btVector3 temp_points[MAX_TRI_CLIPPING];
+ btVector3 temp_points1[MAX_TRI_CLIPPING];
+ btVector3 clipped_points[MAX_TRI_CLIPPING];
+ GIM_TRIANGLE_CONTACT_DATA contacts1;
+ GIM_TRIANGLE_CONTACT_DATA contacts2;
+
+
+ //! clip triangle
+ GUINT clip_triangle(
+ const btVector4 & tri_plane,
+ const btVector3 * tripoints,
+ const btVector3 * srcpoints,
+ btVector3 * clipped_points)
+ {
+ // edge 0
+
+ btVector4 edgeplane;
+
+ EDGE_PLANE(tripoints[0],tripoints[1],tri_plane,edgeplane);
+
+ GUINT clipped_count = PLANE_CLIP_TRIANGLE3D(
+ edgeplane,srcpoints[0],srcpoints[1],srcpoints[2],temp_points);
+
+ if(clipped_count == 0) return 0;
+
+ // edge 1
+
+ EDGE_PLANE(tripoints[1],tripoints[2],tri_plane,edgeplane);
+
+ clipped_count = PLANE_CLIP_POLYGON3D(
+ edgeplane,temp_points,clipped_count,temp_points1);
+
+ if(clipped_count == 0) return 0;
+
+ // edge 2
+
+ EDGE_PLANE(tripoints[2],tripoints[0],tri_plane,edgeplane);
+
+ clipped_count = PLANE_CLIP_POLYGON3D(
+ edgeplane,temp_points1,clipped_count,clipped_points);
+
+ return clipped_count;
+ }
+
+
+
+
+ //! collides only on one side
+ bool triangle_collision(
+ const btVector3 & u0,
+ const btVector3 & u1,
+ const btVector3 & u2,
+ GREAL margin_u,
+ const btVector3 & v0,
+ const btVector3 & v1,
+ const btVector3 & v2,
+ GREAL margin_v,
+ GIM_TRIANGLE_CONTACT_DATA & contacts)
+ {
+
+ margin = margin_u + margin_v;
+
+
+ tu_vertices[0] = u0;
+ tu_vertices[1] = u1;
+ tu_vertices[2] = u2;
+
+ tv_vertices[0] = v0;
+ tv_vertices[1] = v1;
+ tv_vertices[2] = v2;
+
+ //create planes
+ // plane v vs U points
+
+
+ TRIANGLE_PLANE(tv_vertices[0],tv_vertices[1],tv_vertices[2],contacts1.m_separating_normal);
+
+ clipped_count = clip_triangle(
+ contacts1.m_separating_normal,tv_vertices,tu_vertices,clipped_points);
+
+ if(clipped_count == 0 )
+ {
+ return false;//Reject
+ }
+
+ //find most deep interval face1
+ contacts1.merge_points(contacts1.m_separating_normal,margin,clipped_points,clipped_count);
+ if(contacts1.m_point_count == 0) return false; // too far
+
+ //Normal pointing to triangle1
+ //contacts1.m_separating_normal *= -1.f;
+
+ //Clip tri1 by tri2 edges
+
+ TRIANGLE_PLANE(tu_vertices[0],tu_vertices[1],tu_vertices[2],contacts2.m_separating_normal);
+
+ clipped_count = clip_triangle(
+ contacts2.m_separating_normal,tu_vertices,tv_vertices,clipped_points);
+
+ if(clipped_count == 0 )
+ {
+ return false;//Reject
+ }
+
+ //find most deep interval face1
+ contacts2.merge_points(contacts2.m_separating_normal,margin,clipped_points,clipped_count);
+ if(contacts2.m_point_count == 0) return false; // too far
+
+ contacts2.m_separating_normal *= -1.f;
+
+ ////check most dir for contacts
+ if(contacts2.m_penetration_depth<contacts1.m_penetration_depth)
+ {
+ contacts.copy_from(contacts2);
+ }
+ else
+ {
+ contacts.copy_from(contacts1);
+ }
+ return true;
+ }
+
+
+};*/
+
+
+
+bool GIM_TRIANGLE::collide_triangle_hard_test(
+ const GIM_TRIANGLE & other,
+ GIM_TRIANGLE_CONTACT_DATA & contact_data) const
+{
+ GIM_TRIANGLE_CALCULATION_CACHE calc_cache;
+ return calc_cache.triangle_collision(
+ m_vertices[0],m_vertices[1],m_vertices[2],m_margin,
+ other.m_vertices[0],other.m_vertices[1],other.m_vertices[2],other.m_margin,
+ contact_data);
+
+}
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.h b/tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.h
new file mode 100644
index 00000000..5b552a1e
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/Gimpact/gim_tri_collision.h
@@ -0,0 +1,379 @@
+#ifndef GIM_TRI_COLLISION_H_INCLUDED
+#define GIM_TRI_COLLISION_H_INCLUDED
+
+/*! \file gim_tri_collision.h
+\author Francisco Leon Najera
+*/
+/*
+-----------------------------------------------------------------------------
+This source file is part of GIMPACT Library.
+
+For the latest info, see http://gimpact.sourceforge.net/
+
+Copyright (c) 2006 Francisco Leon Najera. C.C. 80087371.
+email: projectileman@yahoo.com
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of EITHER:
+ (1) The GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 2.1 of the License, or (at
+ your option) any later version. The text of the GNU Lesser
+ General Public License is included with this library in the
+ file GIMPACT-LICENSE-LGPL.TXT.
+ (2) The BSD-style license that is included with this library in
+ the file GIMPACT-LICENSE-BSD.TXT.
+ (3) The zlib/libpng license that is included with this library in
+ the file GIMPACT-LICENSE-ZLIB.TXT.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
+ GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.
+
+-----------------------------------------------------------------------------
+*/
+
+#include "gim_box_collision.h"
+#include "gim_clip_polygon.h"
+
+
+
+
+#define MAX_TRI_CLIPPING 16
+
+//! Structure for collision
+struct GIM_TRIANGLE_CONTACT_DATA
+{
+ GREAL m_penetration_depth;
+ GUINT m_point_count;
+ btVector4 m_separating_normal;
+ btVector3 m_points[MAX_TRI_CLIPPING];
+
+ SIMD_FORCE_INLINE void copy_from(const GIM_TRIANGLE_CONTACT_DATA& other)
+ {
+ m_penetration_depth = other.m_penetration_depth;
+ m_separating_normal = other.m_separating_normal;
+ m_point_count = other.m_point_count;
+ GUINT i = m_point_count;
+ while(i--)
+ {
+ m_points[i] = other.m_points[i];
+ }
+ }
+
+ GIM_TRIANGLE_CONTACT_DATA()
+ {
+ }
+
+ GIM_TRIANGLE_CONTACT_DATA(const GIM_TRIANGLE_CONTACT_DATA& other)
+ {
+ copy_from(other);
+ }
+
+
+
+
+ //! classify points that are closer
+ template<typename DISTANCE_FUNC,typename CLASS_PLANE>
+ SIMD_FORCE_INLINE void mergepoints_generic(const CLASS_PLANE & plane,
+ GREAL margin, const btVector3 * points, GUINT point_count, DISTANCE_FUNC distance_func)
+ {
+ m_point_count = 0;
+ m_penetration_depth= -1000.0f;
+
+ GUINT point_indices[MAX_TRI_CLIPPING];
+
+ GUINT _k;
+
+ for(_k=0;_k<point_count;_k++)
+ {
+ GREAL _dist = -distance_func(plane,points[_k]) + margin;
+
+ if(_dist>=0.0f)
+ {
+ if(_dist>m_penetration_depth)
+ {
+ m_penetration_depth = _dist;
+ point_indices[0] = _k;
+ m_point_count=1;
+ }
+ else if((_dist+G_EPSILON)>=m_penetration_depth)
+ {
+ point_indices[m_point_count] = _k;
+ m_point_count++;
+ }
+ }
+ }
+
+ for( _k=0;_k<m_point_count;_k++)
+ {
+ m_points[_k] = points[point_indices[_k]];
+ }
+ }
+
+ //! classify points that are closer
+ SIMD_FORCE_INLINE void merge_points(const btVector4 & plane, GREAL margin,
+ const btVector3 * points, GUINT point_count)
+ {
+ m_separating_normal = plane;
+ mergepoints_generic(plane, margin, points, point_count, DISTANCE_PLANE_3D_FUNC());
+ }
+};
+
+
+//! Class for colliding triangles
+class GIM_TRIANGLE
+{
+public:
+ btScalar m_margin;
+ btVector3 m_vertices[3];
+
+ GIM_TRIANGLE():m_margin(0.1f)
+ {
+ }
+
+ SIMD_FORCE_INLINE GIM_AABB get_box() const
+ {
+ return GIM_AABB(m_vertices[0],m_vertices[1],m_vertices[2],m_margin);
+ }
+
+ SIMD_FORCE_INLINE void get_normal(btVector3 &normal) const
+ {
+ TRIANGLE_NORMAL(m_vertices[0],m_vertices[1],m_vertices[2],normal);
+ }
+
+ SIMD_FORCE_INLINE void get_plane(btVector4 &plane) const
+ {
+ TRIANGLE_PLANE(m_vertices[0],m_vertices[1],m_vertices[2],plane);;
+ }
+
+ SIMD_FORCE_INLINE void apply_transform(const btTransform & trans)
+ {
+ m_vertices[0] = trans(m_vertices[0]);
+ m_vertices[1] = trans(m_vertices[1]);
+ m_vertices[2] = trans(m_vertices[2]);
+ }
+
+ SIMD_FORCE_INLINE void get_edge_plane(GUINT edge_index,const btVector3 &triangle_normal,btVector4 &plane) const
+ {
+ const btVector3 & e0 = m_vertices[edge_index];
+ const btVector3 & e1 = m_vertices[(edge_index+1)%3];
+ EDGE_PLANE(e0,e1,triangle_normal,plane);
+ }
+
+ //! Gets the relative transformation of this triangle
+ /*!
+ The transformation is oriented to the triangle normal , and aligned to the 1st edge of this triangle. The position corresponds to vertice 0:
+ - triangle normal corresponds to Z axis.
+ - 1st normalized edge corresponds to X axis,
+
+ */
+ SIMD_FORCE_INLINE void get_triangle_transform(btTransform & triangle_transform) const
+ {
+ btMatrix3x3 & matrix = triangle_transform.getBasis();
+
+ btVector3 zaxis;
+ get_normal(zaxis);
+ MAT_SET_Z(matrix,zaxis);
+
+ btVector3 xaxis = m_vertices[1] - m_vertices[0];
+ VEC_NORMALIZE(xaxis);
+ MAT_SET_X(matrix,xaxis);
+
+ //y axis
+ xaxis = zaxis.cross(xaxis);
+ MAT_SET_Y(matrix,xaxis);
+
+ triangle_transform.setOrigin(m_vertices[0]);
+ }
+
+
+ //! Test triangles by finding separating axis
+ /*!
+ \param other Triangle for collide
+ \param contact_data Structure for holding contact points, normal and penetration depth; The normal is pointing toward this triangle from the other triangle
+ */
+ bool collide_triangle_hard_test(
+ const GIM_TRIANGLE & other,
+ GIM_TRIANGLE_CONTACT_DATA & contact_data) const;
+
+ //! Test boxes before doing hard test
+ /*!
+ \param other Triangle for collide
+ \param contact_data Structure for holding contact points, normal and penetration depth; The normal is pointing toward this triangle from the other triangle
+ \
+ */
+ SIMD_FORCE_INLINE bool collide_triangle(
+ const GIM_TRIANGLE & other,
+ GIM_TRIANGLE_CONTACT_DATA & contact_data) const
+ {
+ //test box collisioin
+ GIM_AABB boxu(m_vertices[0],m_vertices[1],m_vertices[2],m_margin);
+ GIM_AABB boxv(other.m_vertices[0],other.m_vertices[1],other.m_vertices[2],other.m_margin);
+ if(!boxu.has_collision(boxv)) return false;
+
+ //do hard test
+ return collide_triangle_hard_test(other,contact_data);
+ }
+
+ /*!
+
+ Solve the System for u,v parameters:
+
+ u*axe1[i1] + v*axe2[i1] = vecproj[i1]
+ u*axe1[i2] + v*axe2[i2] = vecproj[i2]
+
+ sustitute:
+ v = (vecproj[i2] - u*axe1[i2])/axe2[i2]
+
+ then the first equation in terms of 'u':
+
+ --> u*axe1[i1] + ((vecproj[i2] - u*axe1[i2])/axe2[i2])*axe2[i1] = vecproj[i1]
+
+ --> u*axe1[i1] + vecproj[i2]*axe2[i1]/axe2[i2] - u*axe1[i2]*axe2[i1]/axe2[i2] = vecproj[i1]
+
+ --> u*(axe1[i1] - axe1[i2]*axe2[i1]/axe2[i2]) = vecproj[i1] - vecproj[i2]*axe2[i1]/axe2[i2]
+
+ --> u*((axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1])/axe2[i2]) = (vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1])/axe2[i2]
+
+ --> u*(axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1]) = vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1]
+
+ --> u = (vecproj[i1]*axe2[i2] - vecproj[i2]*axe2[i1]) /(axe1[i1]*axe2[i2] - axe1[i2]*axe2[i1])
+
+if 0.0<= u+v <=1.0 then they are inside of triangle
+
+ \return false if the point is outside of triangle.This function doesn't take the margin
+ */
+ SIMD_FORCE_INLINE bool get_uv_parameters(
+ const btVector3 & point,
+ const btVector3 & tri_plane,
+ GREAL & u, GREAL & v) const
+ {
+ btVector3 _axe1 = m_vertices[1]-m_vertices[0];
+ btVector3 _axe2 = m_vertices[2]-m_vertices[0];
+ btVector3 _vecproj = point - m_vertices[0];
+ GUINT _i1 = (tri_plane.closestAxis()+1)%3;
+ GUINT _i2 = (_i1+1)%3;
+ if(btFabs(_axe2[_i2])<G_EPSILON)
+ {
+ u = (_vecproj[_i2]*_axe2[_i1] - _vecproj[_i1]*_axe2[_i2]) /(_axe1[_i2]*_axe2[_i1] - _axe1[_i1]*_axe2[_i2]);
+ v = (_vecproj[_i1] - u*_axe1[_i1])/_axe2[_i1];
+ }
+ else
+ {
+ u = (_vecproj[_i1]*_axe2[_i2] - _vecproj[_i2]*_axe2[_i1]) /(_axe1[_i1]*_axe2[_i2] - _axe1[_i2]*_axe2[_i1]);
+ v = (_vecproj[_i2] - u*_axe1[_i2])/_axe2[_i2];
+ }
+
+ if(u<-G_EPSILON)
+ {
+ return false;
+ }
+ else if(v<-G_EPSILON)
+ {
+ return false;
+ }
+ else
+ {
+ btScalar sumuv;
+ sumuv = u+v;
+ if(sumuv<-G_EPSILON)
+ {
+ return false;
+ }
+ else if(sumuv-1.0f>G_EPSILON)
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ //! is point in triangle beam?
+ /*!
+ Test if point is in triangle, with m_margin tolerance
+ */
+ SIMD_FORCE_INLINE bool is_point_inside(const btVector3 & point, const btVector3 & tri_normal) const
+ {
+ //Test with edge 0
+ btVector4 edge_plane;
+ this->get_edge_plane(0,tri_normal,edge_plane);
+ GREAL dist = DISTANCE_PLANE_POINT(edge_plane,point);
+ if(dist-m_margin>0.0f) return false; // outside plane
+
+ this->get_edge_plane(1,tri_normal,edge_plane);
+ dist = DISTANCE_PLANE_POINT(edge_plane,point);
+ if(dist-m_margin>0.0f) return false; // outside plane
+
+ this->get_edge_plane(2,tri_normal,edge_plane);
+ dist = DISTANCE_PLANE_POINT(edge_plane,point);
+ if(dist-m_margin>0.0f) return false; // outside plane
+ return true;
+ }
+
+
+ //! Bidireccional ray collision
+ SIMD_FORCE_INLINE bool ray_collision(
+ const btVector3 & vPoint,
+ const btVector3 & vDir, btVector3 & pout, btVector3 & triangle_normal,
+ GREAL & tparam, GREAL tmax = G_REAL_INFINITY)
+ {
+ btVector4 faceplane;
+ {
+ btVector3 dif1 = m_vertices[1] - m_vertices[0];
+ btVector3 dif2 = m_vertices[2] - m_vertices[0];
+ VEC_CROSS(faceplane,dif1,dif2);
+ faceplane[3] = m_vertices[0].dot(faceplane);
+ }
+
+ GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam, btScalar(0), tmax);
+ if(res == 0) return false;
+ if(! is_point_inside(pout,faceplane)) return false;
+
+ if(res==2) //invert normal
+ {
+ triangle_normal.setValue(-faceplane[0],-faceplane[1],-faceplane[2]);
+ }
+ else
+ {
+ triangle_normal.setValue(faceplane[0],faceplane[1],faceplane[2]);
+ }
+
+ VEC_NORMALIZE(triangle_normal);
+
+ return true;
+ }
+
+
+ //! one direccion ray collision
+ SIMD_FORCE_INLINE bool ray_collision_front_side(
+ const btVector3 & vPoint,
+ const btVector3 & vDir, btVector3 & pout, btVector3 & triangle_normal,
+ GREAL & tparam, GREAL tmax = G_REAL_INFINITY)
+ {
+ btVector4 faceplane;
+ {
+ btVector3 dif1 = m_vertices[1] - m_vertices[0];
+ btVector3 dif2 = m_vertices[2] - m_vertices[0];
+ VEC_CROSS(faceplane,dif1,dif2);
+ faceplane[3] = m_vertices[0].dot(faceplane);
+ }
+
+ GUINT res = LINE_PLANE_COLLISION(faceplane,vDir,vPoint,pout,tparam, btScalar(0), tmax);
+ if(res != 1) return false;
+
+ if(!is_point_inside(pout,faceplane)) return false;
+
+ triangle_normal.setValue(faceplane[0],faceplane[1],faceplane[2]);
+
+ VEC_NORMALIZE(triangle_normal);
+
+ return true;
+ }
+
+};
+
+
+
+
+#endif // GIM_TRI_COLLISION_H_INCLUDED
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
new file mode 100644
index 00000000..91fcea57
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
@@ -0,0 +1,243 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btContinuousConvexCollision.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
+#include "LinearMath/btTransformUtil.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+
+#include "btGjkPairDetector.h"
+#include "btPointCollector.h"
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+
+
+
+btContinuousConvexCollision::btContinuousConvexCollision ( const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver, btConvexPenetrationDepthSolver* penetrationDepthSolver)
+:m_simplexSolver(simplexSolver),
+m_penetrationDepthSolver(penetrationDepthSolver),
+m_convexA(convexA),m_convexB1(convexB),m_planeShape(0)
+{
+}
+
+
+btContinuousConvexCollision::btContinuousConvexCollision( const btConvexShape* convexA,const btStaticPlaneShape* plane)
+:m_simplexSolver(0),
+m_penetrationDepthSolver(0),
+m_convexA(convexA),m_convexB1(0),m_planeShape(plane)
+{
+}
+
+
+/// This maximum should not be necessary. It allows for untested/degenerate cases in production code.
+/// You don't want your game ever to lock-up.
+#define MAX_ITERATIONS 64
+
+void btContinuousConvexCollision::computeClosestPoints( const btTransform& transA, const btTransform& transB,btPointCollector& pointCollector)
+{
+ if (m_convexB1)
+ {
+ m_simplexSolver->reset();
+ btGjkPairDetector gjk(m_convexA,m_convexB1,m_convexA->getShapeType(),m_convexB1->getShapeType(),m_convexA->getMargin(),m_convexB1->getMargin(),m_simplexSolver,m_penetrationDepthSolver);
+ btGjkPairDetector::ClosestPointInput input;
+ input.m_transformA = transA;
+ input.m_transformB = transB;
+ gjk.getClosestPoints(input,pointCollector,0);
+ } else
+ {
+ //convex versus plane
+ const btConvexShape* convexShape = m_convexA;
+ const btStaticPlaneShape* planeShape = m_planeShape;
+
+ bool hasCollision = false;
+ const btVector3& planeNormal = planeShape->getPlaneNormal();
+ const btScalar& planeConstant = planeShape->getPlaneConstant();
+
+ btTransform convexWorldTransform = transA;
+ btTransform convexInPlaneTrans;
+ convexInPlaneTrans= transB.inverse() * convexWorldTransform;
+ btTransform planeInConvex;
+ planeInConvex= convexWorldTransform.inverse() * transB;
+
+ btVector3 vtx = convexShape->localGetSupportingVertex(planeInConvex.getBasis()*-planeNormal);
+
+ btVector3 vtxInPlane = convexInPlaneTrans(vtx);
+ btScalar distance = (planeNormal.dot(vtxInPlane) - planeConstant);
+
+ btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal;
+ btVector3 vtxInPlaneWorld = transB * vtxInPlaneProjected;
+ btVector3 normalOnSurfaceB = transB.getBasis() * planeNormal;
+
+ pointCollector.addContactPoint(
+ normalOnSurfaceB,
+ vtxInPlaneWorld,
+ distance);
+ }
+}
+
+bool btContinuousConvexCollision::calcTimeOfImpact(
+ const btTransform& fromA,
+ const btTransform& toA,
+ const btTransform& fromB,
+ const btTransform& toB,
+ CastResult& result)
+{
+
+
+ /// compute linear and angular velocity for this interval, to interpolate
+ btVector3 linVelA,angVelA,linVelB,angVelB;
+ btTransformUtil::calculateVelocity(fromA,toA,btScalar(1.),linVelA,angVelA);
+ btTransformUtil::calculateVelocity(fromB,toB,btScalar(1.),linVelB,angVelB);
+
+
+ btScalar boundingRadiusA = m_convexA->getAngularMotionDisc();
+ btScalar boundingRadiusB = m_convexB1?m_convexB1->getAngularMotionDisc():0.f;
+
+ btScalar maxAngularProjectedVelocity = angVelA.length() * boundingRadiusA + angVelB.length() * boundingRadiusB;
+ btVector3 relLinVel = (linVelB-linVelA);
+
+ btScalar relLinVelocLength = (linVelB-linVelA).length();
+
+ if ((relLinVelocLength+maxAngularProjectedVelocity) == 0.f)
+ return false;
+
+
+
+ btScalar lambda = btScalar(0.);
+ btVector3 v(1,0,0);
+
+ int maxIter = MAX_ITERATIONS;
+
+ btVector3 n;
+ n.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ bool hasResult = false;
+ btVector3 c;
+
+ btScalar lastLambda = lambda;
+ //btScalar epsilon = btScalar(0.001);
+
+ int numIter = 0;
+ //first solution, using GJK
+
+
+ btScalar radius = 0.001f;
+// result.drawCoordSystem(sphereTr);
+
+ btPointCollector pointCollector1;
+
+ {
+
+ computeClosestPoints(fromA,fromB,pointCollector1);
+
+ hasResult = pointCollector1.m_hasResult;
+ c = pointCollector1.m_pointInWorld;
+ }
+
+ if (hasResult)
+ {
+ btScalar dist;
+ dist = pointCollector1.m_distance + result.m_allowedPenetration;
+ n = pointCollector1.m_normalOnBInWorld;
+ btScalar projectedLinearVelocity = relLinVel.dot(n);
+ if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=SIMD_EPSILON)
+ return false;
+
+ //not close enough
+ while (dist > radius)
+ {
+ if (result.m_debugDrawer)
+ {
+ result.m_debugDrawer->drawSphere(c,0.2f,btVector3(1,1,1));
+ }
+ btScalar dLambda = btScalar(0.);
+
+ projectedLinearVelocity = relLinVel.dot(n);
+
+
+ //don't report time of impact for motion away from the contact normal (or causes minor penetration)
+ if ((projectedLinearVelocity+ maxAngularProjectedVelocity)<=SIMD_EPSILON)
+ return false;
+
+ dLambda = dist / (projectedLinearVelocity+ maxAngularProjectedVelocity);
+
+
+
+ lambda = lambda + dLambda;
+
+ if (lambda > btScalar(1.))
+ return false;
+
+ if (lambda < btScalar(0.))
+ return false;
+
+
+ //todo: next check with relative epsilon
+ if (lambda <= lastLambda)
+ {
+ return false;
+ //n.setValue(0,0,0);
+ break;
+ }
+ lastLambda = lambda;
+
+
+
+ //interpolate to next lambda
+ btTransform interpolatedTransA,interpolatedTransB,relativeTrans;
+
+ btTransformUtil::integrateTransform(fromA,linVelA,angVelA,lambda,interpolatedTransA);
+ btTransformUtil::integrateTransform(fromB,linVelB,angVelB,lambda,interpolatedTransB);
+ relativeTrans = interpolatedTransB.inverseTimes(interpolatedTransA);
+
+ if (result.m_debugDrawer)
+ {
+ result.m_debugDrawer->drawSphere(interpolatedTransA.getOrigin(),0.2f,btVector3(1,0,0));
+ }
+
+ result.DebugDraw( lambda );
+
+ btPointCollector pointCollector;
+ computeClosestPoints(interpolatedTransA,interpolatedTransB,pointCollector);
+
+ if (pointCollector.m_hasResult)
+ {
+ dist = pointCollector.m_distance+result.m_allowedPenetration;
+ c = pointCollector.m_pointInWorld;
+ n = pointCollector.m_normalOnBInWorld;
+ } else
+ {
+ result.reportFailure(-1, numIter);
+ return false;
+ }
+
+ numIter++;
+ if (numIter > maxIter)
+ {
+ result.reportFailure(-2, numIter);
+ return false;
+ }
+ }
+
+ result.m_fraction = lambda;
+ result.m_normal = n;
+ result.m_hitPoint = c;
+ return true;
+ }
+
+ return false;
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h
new file mode 100644
index 00000000..bdc0572f
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h
@@ -0,0 +1,59 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
+#define BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
+
+#include "btConvexCast.h"
+#include "btSimplexSolverInterface.h"
+class btConvexPenetrationDepthSolver;
+class btConvexShape;
+class btStaticPlaneShape;
+
+/// btContinuousConvexCollision implements angular and linear time of impact for convex objects.
+/// Based on Brian Mirtich's Conservative Advancement idea (PhD thesis).
+/// Algorithm operates in worldspace, in order to keep inbetween motion globally consistent.
+/// It uses GJK at the moment. Future improvement would use minkowski sum / supporting vertex, merging innerloops
+class btContinuousConvexCollision : public btConvexCast
+{
+ btSimplexSolverInterface* m_simplexSolver;
+ btConvexPenetrationDepthSolver* m_penetrationDepthSolver;
+ const btConvexShape* m_convexA;
+ //second object is either a convex or a plane (code sharing)
+ const btConvexShape* m_convexB1;
+ const btStaticPlaneShape* m_planeShape;
+
+ void computeClosestPoints( const btTransform& transA, const btTransform& transB,struct btPointCollector& pointCollector);
+
+public:
+
+ btContinuousConvexCollision (const btConvexShape* shapeA,const btConvexShape* shapeB ,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
+
+ btContinuousConvexCollision(const btConvexShape* shapeA,const btStaticPlaneShape* plane );
+
+ virtual bool calcTimeOfImpact(
+ const btTransform& fromA,
+ const btTransform& toA,
+ const btTransform& fromB,
+ const btTransform& toB,
+ CastResult& result);
+
+
+};
+
+
+#endif //BT_CONTINUOUS_COLLISION_CONVEX_CAST_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp
new file mode 100644
index 00000000..d2a1310b
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp
@@ -0,0 +1,20 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btConvexCast.h"
+
+btConvexCast::~btConvexCast()
+{
+}
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h
new file mode 100644
index 00000000..bfd79d03
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexCast.h
@@ -0,0 +1,73 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_CONVEX_CAST_H
+#define BT_CONVEX_CAST_H
+
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btScalar.h"
+class btMinkowskiSumShape;
+#include "LinearMath/btIDebugDraw.h"
+
+/// btConvexCast is an interface for Casting
+class btConvexCast
+{
+public:
+
+
+ virtual ~btConvexCast();
+
+ ///RayResult stores the closest result
+ /// alternatively, add a callback method to decide about closest/all results
+ struct CastResult
+ {
+ //virtual bool addRayResult(const btVector3& normal,btScalar fraction) = 0;
+
+ virtual void DebugDraw(btScalar fraction) {(void)fraction;}
+ virtual void drawCoordSystem(const btTransform& trans) {(void)trans;}
+ virtual void reportFailure(int errNo, int numIterations) {(void)errNo;(void)numIterations;}
+ CastResult()
+ :m_fraction(btScalar(BT_LARGE_FLOAT)),
+ m_debugDrawer(0),
+ m_allowedPenetration(btScalar(0))
+ {
+ }
+
+
+ virtual ~CastResult() {};
+
+ btTransform m_hitTransformA;
+ btTransform m_hitTransformB;
+ btVector3 m_normal;
+ btVector3 m_hitPoint;
+ btScalar m_fraction; //input and output
+ btIDebugDraw* m_debugDrawer;
+ btScalar m_allowedPenetration;
+
+ };
+
+
+ /// cast a convex against another convex object
+ virtual bool calcTimeOfImpact(
+ const btTransform& fromA,
+ const btTransform& toA,
+ const btTransform& fromB,
+ const btTransform& toB,
+ CastResult& result) = 0;
+};
+
+#endif //BT_CONVEX_CAST_H
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
new file mode 100644
index 00000000..72eb5aec
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h
@@ -0,0 +1,42 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_CONVEX_PENETRATION_DEPTH_H
+#define BT_CONVEX_PENETRATION_DEPTH_H
+
+class btStackAlloc;
+class btVector3;
+#include "btSimplexSolverInterface.h"
+class btConvexShape;
+class btTransform;
+
+///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
+class btConvexPenetrationDepthSolver
+{
+public:
+
+ virtual ~btConvexPenetrationDepthSolver() {};
+ virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver,
+ const btConvexShape* convexA,const btConvexShape* convexB,
+ const btTransform& transA,const btTransform& transB,
+ btVector3& v, btVector3& pa, btVector3& pb,
+ class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
+ ) = 0;
+
+
+};
+#endif //BT_CONVEX_PENETRATION_DEPTH_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
new file mode 100644
index 00000000..f958cc52
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h
@@ -0,0 +1,91 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
+#define BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
+
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btVector3.h"
+class btStackAlloc;
+
+/// This interface is made to be used by an iterative approach to do TimeOfImpact calculations
+/// This interface allows to query for closest points and penetration depth between two (convex) objects
+/// the closest point is on the second object (B), and the normal points from the surface on B towards A.
+/// distance is between closest points on B and closest point on A. So you can calculate closest point on A
+/// by taking closestPointInA = closestPointInB + m_distance * m_normalOnSurfaceB
+struct btDiscreteCollisionDetectorInterface
+{
+
+ struct Result
+ {
+
+ virtual ~Result(){}
+
+ ///setShapeIdentifiersA/B provides experimental support for per-triangle material / custom material combiner
+ virtual void setShapeIdentifiersA(int partId0,int index0)=0;
+ virtual void setShapeIdentifiersB(int partId1,int index1)=0;
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)=0;
+ };
+
+ struct ClosestPointInput
+ {
+ ClosestPointInput()
+ :m_maximumDistanceSquared(btScalar(BT_LARGE_FLOAT)),
+ m_stackAlloc(0)
+ {
+ }
+
+ btTransform m_transformA;
+ btTransform m_transformB;
+ btScalar m_maximumDistanceSquared;
+ btStackAlloc* m_stackAlloc;
+ };
+
+ virtual ~btDiscreteCollisionDetectorInterface() {};
+
+ //
+ // give either closest points (distance > 0) or penetration (distance)
+ // the normal always points from B towards A
+ //
+ virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false) = 0;
+
+};
+
+struct btStorageResult : public btDiscreteCollisionDetectorInterface::Result
+{
+ btVector3 m_normalOnSurfaceB;
+ btVector3 m_closestPointInB;
+ btScalar m_distance; //negative means penetration !
+
+ btStorageResult() : m_distance(btScalar(BT_LARGE_FLOAT))
+ {
+
+ }
+ virtual ~btStorageResult() {};
+
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+ {
+ if (depth < m_distance)
+ {
+ m_normalOnSurfaceB = normalOnBInWorld;
+ m_closestPointInB = pointInWorld;
+ m_distance = depth;
+ }
+ }
+};
+
+#endif //BT_DISCRETE_COLLISION_DETECTOR1_INTERFACE_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
new file mode 100644
index 00000000..bef697a0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
@@ -0,0 +1,176 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btGjkConvexCast.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "btGjkPairDetector.h"
+#include "btPointCollector.h"
+#include "LinearMath/btTransformUtil.h"
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define MAX_ITERATIONS 64
+#else
+#define MAX_ITERATIONS 32
+#endif
+
+btGjkConvexCast::btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver)
+:m_simplexSolver(simplexSolver),
+m_convexA(convexA),
+m_convexB(convexB)
+{
+}
+
+bool btGjkConvexCast::calcTimeOfImpact(
+ const btTransform& fromA,
+ const btTransform& toA,
+ const btTransform& fromB,
+ const btTransform& toB,
+ CastResult& result)
+{
+
+
+ m_simplexSolver->reset();
+
+ /// compute linear velocity for this interval, to interpolate
+ //assume no rotation/angular velocity, assert here?
+ btVector3 linVelA,linVelB;
+ linVelA = toA.getOrigin()-fromA.getOrigin();
+ linVelB = toB.getOrigin()-fromB.getOrigin();
+
+ btScalar radius = btScalar(0.001);
+ btScalar lambda = btScalar(0.);
+ btVector3 v(1,0,0);
+
+ int maxIter = MAX_ITERATIONS;
+
+ btVector3 n;
+ n.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ bool hasResult = false;
+ btVector3 c;
+ btVector3 r = (linVelA-linVelB);
+
+ btScalar lastLambda = lambda;
+ //btScalar epsilon = btScalar(0.001);
+
+ int numIter = 0;
+ //first solution, using GJK
+
+
+ btTransform identityTrans;
+ identityTrans.setIdentity();
+
+
+// result.drawCoordSystem(sphereTr);
+
+ btPointCollector pointCollector;
+
+
+ btGjkPairDetector gjk(m_convexA,m_convexB,m_simplexSolver,0);//m_penetrationDepthSolver);
+ btGjkPairDetector::ClosestPointInput input;
+
+ //we don't use margins during CCD
+ // gjk.setIgnoreMargin(true);
+
+ input.m_transformA = fromA;
+ input.m_transformB = fromB;
+ gjk.getClosestPoints(input,pointCollector,0);
+
+ hasResult = pointCollector.m_hasResult;
+ c = pointCollector.m_pointInWorld;
+
+ if (hasResult)
+ {
+ btScalar dist;
+ dist = pointCollector.m_distance;
+ n = pointCollector.m_normalOnBInWorld;
+
+
+
+ //not close enough
+ while (dist > radius)
+ {
+ numIter++;
+ if (numIter > maxIter)
+ {
+ return false; //todo: report a failure
+ }
+ btScalar dLambda = btScalar(0.);
+
+ btScalar projectedLinearVelocity = r.dot(n);
+
+ dLambda = dist / (projectedLinearVelocity);
+
+ lambda = lambda - dLambda;
+
+ if (lambda > btScalar(1.))
+ return false;
+
+ if (lambda < btScalar(0.))
+ return false;
+
+ //todo: next check with relative epsilon
+ if (lambda <= lastLambda)
+ {
+ return false;
+ //n.setValue(0,0,0);
+ break;
+ }
+ lastLambda = lambda;
+
+ //interpolate to next lambda
+ result.DebugDraw( lambda );
+ input.m_transformA.getOrigin().setInterpolate3(fromA.getOrigin(),toA.getOrigin(),lambda);
+ input.m_transformB.getOrigin().setInterpolate3(fromB.getOrigin(),toB.getOrigin(),lambda);
+
+ gjk.getClosestPoints(input,pointCollector,0);
+ if (pointCollector.m_hasResult)
+ {
+ if (pointCollector.m_distance < btScalar(0.))
+ {
+ result.m_fraction = lastLambda;
+ n = pointCollector.m_normalOnBInWorld;
+ result.m_normal=n;
+ result.m_hitPoint = pointCollector.m_pointInWorld;
+ return true;
+ }
+ c = pointCollector.m_pointInWorld;
+ n = pointCollector.m_normalOnBInWorld;
+ dist = pointCollector.m_distance;
+ } else
+ {
+ //??
+ return false;
+ }
+
+ }
+
+ //is n normalized?
+ //don't report time of impact for motion away from the contact normal (or causes minor penetration)
+ if (n.dot(r)>=-result.m_allowedPenetration)
+ return false;
+
+ result.m_fraction = lambda;
+ result.m_normal = n;
+ result.m_hitPoint = c;
+ return true;
+ }
+
+ return false;
+
+
+}
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h
new file mode 100644
index 00000000..6a42ee63
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h
@@ -0,0 +1,50 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_GJK_CONVEX_CAST_H
+#define BT_GJK_CONVEX_CAST_H
+
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+
+#include "LinearMath/btVector3.h"
+#include "btConvexCast.h"
+class btConvexShape;
+class btMinkowskiSumShape;
+#include "btSimplexSolverInterface.h"
+
+///GjkConvexCast performs a raycast on a convex object using support mapping.
+class btGjkConvexCast : public btConvexCast
+{
+ btSimplexSolverInterface* m_simplexSolver;
+ const btConvexShape* m_convexA;
+ const btConvexShape* m_convexB;
+
+public:
+
+ btGjkConvexCast(const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver);
+
+ /// cast a convex against another convex object
+ virtual bool calcTimeOfImpact(
+ const btTransform& fromA,
+ const btTransform& toA,
+ const btTransform& fromB,
+ const btTransform& toB,
+ CastResult& result);
+
+};
+
+#endif //BT_GJK_CONVEX_CAST_H
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp
new file mode 100644
index 00000000..f74261d4
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp
@@ -0,0 +1,989 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the
+use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software in a
+product, an acknowledgment in the product documentation would be appreciated
+but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/*
+GJK-EPA collision solver by Nathanael Presson, 2008
+*/
+#include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "btGjkEpa2.h"
+
+#if defined(DEBUG) || defined (_DEBUG)
+#include <stdio.h> //for debug printf
+#ifdef __SPU__
+#include <spu_printf.h>
+#define printf spu_printf
+#endif //__SPU__
+#endif
+
+namespace gjkepa2_impl
+{
+
+ // Config
+
+ /* GJK */
+#define GJK_MAX_ITERATIONS 128
+#define GJK_ACCURARY ((btScalar)0.0001)
+#define GJK_MIN_DISTANCE ((btScalar)0.0001)
+#define GJK_DUPLICATED_EPS ((btScalar)0.0001)
+#define GJK_SIMPLEX2_EPS ((btScalar)0.0)
+#define GJK_SIMPLEX3_EPS ((btScalar)0.0)
+#define GJK_SIMPLEX4_EPS ((btScalar)0.0)
+
+ /* EPA */
+#define EPA_MAX_VERTICES 64
+#define EPA_MAX_FACES (EPA_MAX_VERTICES*2)
+#define EPA_MAX_ITERATIONS 255
+#define EPA_ACCURACY ((btScalar)0.0001)
+#define EPA_FALLBACK (10*EPA_ACCURACY)
+#define EPA_PLANE_EPS ((btScalar)0.00001)
+#define EPA_INSIDE_EPS ((btScalar)0.01)
+
+
+ // Shorthands
+ typedef unsigned int U;
+ typedef unsigned char U1;
+
+ // MinkowskiDiff
+ struct MinkowskiDiff
+ {
+ const btConvexShape* m_shapes[2];
+ btMatrix3x3 m_toshape1;
+ btTransform m_toshape0;
+#ifdef __SPU__
+ bool m_enableMargin;
+#else
+ btVector3 (btConvexShape::*Ls)(const btVector3&) const;
+#endif//__SPU__
+
+
+ MinkowskiDiff()
+ {
+
+ }
+#ifdef __SPU__
+ void EnableMargin(bool enable)
+ {
+ m_enableMargin = enable;
+ }
+ inline btVector3 Support0(const btVector3& d) const
+ {
+ if (m_enableMargin)
+ {
+ return m_shapes[0]->localGetSupportVertexNonVirtual(d);
+ } else
+ {
+ return m_shapes[0]->localGetSupportVertexWithoutMarginNonVirtual(d);
+ }
+ }
+ inline btVector3 Support1(const btVector3& d) const
+ {
+ if (m_enableMargin)
+ {
+ return m_toshape0*(m_shapes[1]->localGetSupportVertexNonVirtual(m_toshape1*d));
+ } else
+ {
+ return m_toshape0*(m_shapes[1]->localGetSupportVertexWithoutMarginNonVirtual(m_toshape1*d));
+ }
+ }
+#else
+ void EnableMargin(bool enable)
+ {
+ if(enable)
+ Ls=&btConvexShape::localGetSupportVertexNonVirtual;
+ else
+ Ls=&btConvexShape::localGetSupportVertexWithoutMarginNonVirtual;
+ }
+ inline btVector3 Support0(const btVector3& d) const
+ {
+ return(((m_shapes[0])->*(Ls))(d));
+ }
+ inline btVector3 Support1(const btVector3& d) const
+ {
+ return(m_toshape0*((m_shapes[1])->*(Ls))(m_toshape1*d));
+ }
+#endif //__SPU__
+
+ inline btVector3 Support(const btVector3& d) const
+ {
+ return(Support0(d)-Support1(-d));
+ }
+ btVector3 Support(const btVector3& d,U index) const
+ {
+ if(index)
+ return(Support1(d));
+ else
+ return(Support0(d));
+ }
+ };
+
+ typedef MinkowskiDiff tShape;
+
+
+ // GJK
+ struct GJK
+ {
+ /* Types */
+ struct sSV
+ {
+ btVector3 d,w;
+ };
+ struct sSimplex
+ {
+ sSV* c[4];
+ btScalar p[4];
+ U rank;
+ };
+ struct eStatus { enum _ {
+ Valid,
+ Inside,
+ Failed };};
+ /* Fields */
+ tShape m_shape;
+ btVector3 m_ray;
+ btScalar m_distance;
+ sSimplex m_simplices[2];
+ sSV m_store[4];
+ sSV* m_free[4];
+ U m_nfree;
+ U m_current;
+ sSimplex* m_simplex;
+ eStatus::_ m_status;
+ /* Methods */
+ GJK()
+ {
+ Initialize();
+ }
+ void Initialize()
+ {
+ m_ray = btVector3(0,0,0);
+ m_nfree = 0;
+ m_status = eStatus::Failed;
+ m_current = 0;
+ m_distance = 0;
+ }
+ eStatus::_ Evaluate(const tShape& shapearg,const btVector3& guess)
+ {
+ U iterations=0;
+ btScalar sqdist=0;
+ btScalar alpha=0;
+ btVector3 lastw[4];
+ U clastw=0;
+ /* Initialize solver */
+ m_free[0] = &m_store[0];
+ m_free[1] = &m_store[1];
+ m_free[2] = &m_store[2];
+ m_free[3] = &m_store[3];
+ m_nfree = 4;
+ m_current = 0;
+ m_status = eStatus::Valid;
+ m_shape = shapearg;
+ m_distance = 0;
+ /* Initialize simplex */
+ m_simplices[0].rank = 0;
+ m_ray = guess;
+ const btScalar sqrl= m_ray.length2();
+ appendvertice(m_simplices[0],sqrl>0?-m_ray:btVector3(1,0,0));
+ m_simplices[0].p[0] = 1;
+ m_ray = m_simplices[0].c[0]->w;
+ sqdist = sqrl;
+ lastw[0] =
+ lastw[1] =
+ lastw[2] =
+ lastw[3] = m_ray;
+ /* Loop */
+ do {
+ const U next=1-m_current;
+ sSimplex& cs=m_simplices[m_current];
+ sSimplex& ns=m_simplices[next];
+ /* Check zero */
+ const btScalar rl=m_ray.length();
+ if(rl<GJK_MIN_DISTANCE)
+ {/* Touching or inside */
+ m_status=eStatus::Inside;
+ break;
+ }
+ /* Append new vertice in -'v' direction */
+ appendvertice(cs,-m_ray);
+ const btVector3& w=cs.c[cs.rank-1]->w;
+ bool found=false;
+ for(U i=0;i<4;++i)
+ {
+ if((w-lastw[i]).length2()<GJK_DUPLICATED_EPS)
+ { found=true;break; }
+ }
+ if(found)
+ {/* Return old simplex */
+ removevertice(m_simplices[m_current]);
+ break;
+ }
+ else
+ {/* Update lastw */
+ lastw[clastw=(clastw+1)&3]=w;
+ }
+ /* Check for termination */
+ const btScalar omega=btDot(m_ray,w)/rl;
+ alpha=btMax(omega,alpha);
+ if(((rl-alpha)-(GJK_ACCURARY*rl))<=0)
+ {/* Return old simplex */
+ removevertice(m_simplices[m_current]);
+ break;
+ }
+ /* Reduce simplex */
+ btScalar weights[4];
+ U mask=0;
+ switch(cs.rank)
+ {
+ case 2: sqdist=projectorigin( cs.c[0]->w,
+ cs.c[1]->w,
+ weights,mask);break;
+ case 3: sqdist=projectorigin( cs.c[0]->w,
+ cs.c[1]->w,
+ cs.c[2]->w,
+ weights,mask);break;
+ case 4: sqdist=projectorigin( cs.c[0]->w,
+ cs.c[1]->w,
+ cs.c[2]->w,
+ cs.c[3]->w,
+ weights,mask);break;
+ }
+ if(sqdist>=0)
+ {/* Valid */
+ ns.rank = 0;
+ m_ray = btVector3(0,0,0);
+ m_current = next;
+ for(U i=0,ni=cs.rank;i<ni;++i)
+ {
+ if(mask&(1<<i))
+ {
+ ns.c[ns.rank] = cs.c[i];
+ ns.p[ns.rank++] = weights[i];
+ m_ray += cs.c[i]->w*weights[i];
+ }
+ else
+ {
+ m_free[m_nfree++] = cs.c[i];
+ }
+ }
+ if(mask==15) m_status=eStatus::Inside;
+ }
+ else
+ {/* Return old simplex */
+ removevertice(m_simplices[m_current]);
+ break;
+ }
+ m_status=((++iterations)<GJK_MAX_ITERATIONS)?m_status:eStatus::Failed;
+ } while(m_status==eStatus::Valid);
+ m_simplex=&m_simplices[m_current];
+ switch(m_status)
+ {
+ case eStatus::Valid: m_distance=m_ray.length();break;
+ case eStatus::Inside: m_distance=0;break;
+ default:
+ {
+ }
+ }
+ return(m_status);
+ }
+ bool EncloseOrigin()
+ {
+ switch(m_simplex->rank)
+ {
+ case 1:
+ {
+ for(U i=0;i<3;++i)
+ {
+ btVector3 axis=btVector3(0,0,0);
+ axis[i]=1;
+ appendvertice(*m_simplex, axis);
+ if(EncloseOrigin()) return(true);
+ removevertice(*m_simplex);
+ appendvertice(*m_simplex,-axis);
+ if(EncloseOrigin()) return(true);
+ removevertice(*m_simplex);
+ }
+ }
+ break;
+ case 2:
+ {
+ const btVector3 d=m_simplex->c[1]->w-m_simplex->c[0]->w;
+ for(U i=0;i<3;++i)
+ {
+ btVector3 axis=btVector3(0,0,0);
+ axis[i]=1;
+ const btVector3 p=btCross(d,axis);
+ if(p.length2()>0)
+ {
+ appendvertice(*m_simplex, p);
+ if(EncloseOrigin()) return(true);
+ removevertice(*m_simplex);
+ appendvertice(*m_simplex,-p);
+ if(EncloseOrigin()) return(true);
+ removevertice(*m_simplex);
+ }
+ }
+ }
+ break;
+ case 3:
+ {
+ const btVector3 n=btCross(m_simplex->c[1]->w-m_simplex->c[0]->w,
+ m_simplex->c[2]->w-m_simplex->c[0]->w);
+ if(n.length2()>0)
+ {
+ appendvertice(*m_simplex,n);
+ if(EncloseOrigin()) return(true);
+ removevertice(*m_simplex);
+ appendvertice(*m_simplex,-n);
+ if(EncloseOrigin()) return(true);
+ removevertice(*m_simplex);
+ }
+ }
+ break;
+ case 4:
+ {
+ if(btFabs(det( m_simplex->c[0]->w-m_simplex->c[3]->w,
+ m_simplex->c[1]->w-m_simplex->c[3]->w,
+ m_simplex->c[2]->w-m_simplex->c[3]->w))>0)
+ return(true);
+ }
+ break;
+ }
+ return(false);
+ }
+ /* Internals */
+ void getsupport(const btVector3& d,sSV& sv) const
+ {
+ sv.d = d/d.length();
+ sv.w = m_shape.Support(sv.d);
+ }
+ void removevertice(sSimplex& simplex)
+ {
+ m_free[m_nfree++]=simplex.c[--simplex.rank];
+ }
+ void appendvertice(sSimplex& simplex,const btVector3& v)
+ {
+ simplex.p[simplex.rank]=0;
+ simplex.c[simplex.rank]=m_free[--m_nfree];
+ getsupport(v,*simplex.c[simplex.rank++]);
+ }
+ static btScalar det(const btVector3& a,const btVector3& b,const btVector3& c)
+ {
+ return( a.y()*b.z()*c.x()+a.z()*b.x()*c.y()-
+ a.x()*b.z()*c.y()-a.y()*b.x()*c.z()+
+ a.x()*b.y()*c.z()-a.z()*b.y()*c.x());
+ }
+ static btScalar projectorigin( const btVector3& a,
+ const btVector3& b,
+ btScalar* w,U& m)
+ {
+ const btVector3 d=b-a;
+ const btScalar l=d.length2();
+ if(l>GJK_SIMPLEX2_EPS)
+ {
+ const btScalar t(l>0?-btDot(a,d)/l:0);
+ if(t>=1) { w[0]=0;w[1]=1;m=2;return(b.length2()); }
+ else if(t<=0) { w[0]=1;w[1]=0;m=1;return(a.length2()); }
+ else { w[0]=1-(w[1]=t);m=3;return((a+d*t).length2()); }
+ }
+ return(-1);
+ }
+ static btScalar projectorigin( const btVector3& a,
+ const btVector3& b,
+ const btVector3& c,
+ btScalar* w,U& m)
+ {
+ static const U imd3[]={1,2,0};
+ const btVector3* vt[]={&a,&b,&c};
+ const btVector3 dl[]={a-b,b-c,c-a};
+ const btVector3 n=btCross(dl[0],dl[1]);
+ const btScalar l=n.length2();
+ if(l>GJK_SIMPLEX3_EPS)
+ {
+ btScalar mindist=-1;
+ btScalar subw[2]={0.f,0.f};
+ U subm(0);
+ for(U i=0;i<3;++i)
+ {
+ if(btDot(*vt[i],btCross(dl[i],n))>0)
+ {
+ const U j=imd3[i];
+ const btScalar subd(projectorigin(*vt[i],*vt[j],subw,subm));
+ if((mindist<0)||(subd<mindist))
+ {
+ mindist = subd;
+ m = static_cast<U>(((subm&1)?1<<i:0)+((subm&2)?1<<j:0));
+ w[i] = subw[0];
+ w[j] = subw[1];
+ w[imd3[j]] = 0;
+ }
+ }
+ }
+ if(mindist<0)
+ {
+ const btScalar d=btDot(a,n);
+ const btScalar s=btSqrt(l);
+ const btVector3 p=n*(d/l);
+ mindist = p.length2();
+ m = 7;
+ w[0] = (btCross(dl[1],b-p)).length()/s;
+ w[1] = (btCross(dl[2],c-p)).length()/s;
+ w[2] = 1-(w[0]+w[1]);
+ }
+ return(mindist);
+ }
+ return(-1);
+ }
+ static btScalar projectorigin( const btVector3& a,
+ const btVector3& b,
+ const btVector3& c,
+ const btVector3& d,
+ btScalar* w,U& m)
+ {
+ static const U imd3[]={1,2,0};
+ const btVector3* vt[]={&a,&b,&c,&d};
+ const btVector3 dl[]={a-d,b-d,c-d};
+ const btScalar vl=det(dl[0],dl[1],dl[2]);
+ const bool ng=(vl*btDot(a,btCross(b-c,a-b)))<=0;
+ if(ng&&(btFabs(vl)>GJK_SIMPLEX4_EPS))
+ {
+ btScalar mindist=-1;
+ btScalar subw[3]={0.f,0.f,0.f};
+ U subm(0);
+ for(U i=0;i<3;++i)
+ {
+ const U j=imd3[i];
+ const btScalar s=vl*btDot(d,btCross(dl[i],dl[j]));
+ if(s>0)
+ {
+ const btScalar subd=projectorigin(*vt[i],*vt[j],d,subw,subm);
+ if((mindist<0)||(subd<mindist))
+ {
+ mindist = subd;
+ m = static_cast<U>((subm&1?1<<i:0)+
+ (subm&2?1<<j:0)+
+ (subm&4?8:0));
+ w[i] = subw[0];
+ w[j] = subw[1];
+ w[imd3[j]] = 0;
+ w[3] = subw[2];
+ }
+ }
+ }
+ if(mindist<0)
+ {
+ mindist = 0;
+ m = 15;
+ w[0] = det(c,b,d)/vl;
+ w[1] = det(a,c,d)/vl;
+ w[2] = det(b,a,d)/vl;
+ w[3] = 1-(w[0]+w[1]+w[2]);
+ }
+ return(mindist);
+ }
+ return(-1);
+ }
+ };
+
+ // EPA
+ struct EPA
+ {
+ /* Types */
+ typedef GJK::sSV sSV;
+ struct sFace
+ {
+ btVector3 n;
+ btScalar d;
+ btScalar p;
+ sSV* c[3];
+ sFace* f[3];
+ sFace* l[2];
+ U1 e[3];
+ U1 pass;
+ };
+ struct sList
+ {
+ sFace* root;
+ U count;
+ sList() : root(0),count(0) {}
+ };
+ struct sHorizon
+ {
+ sFace* cf;
+ sFace* ff;
+ U nf;
+ sHorizon() : cf(0),ff(0),nf(0) {}
+ };
+ struct eStatus { enum _ {
+ Valid,
+ Touching,
+ Degenerated,
+ NonConvex,
+ InvalidHull,
+ OutOfFaces,
+ OutOfVertices,
+ AccuraryReached,
+ FallBack,
+ Failed };};
+ /* Fields */
+ eStatus::_ m_status;
+ GJK::sSimplex m_result;
+ btVector3 m_normal;
+ btScalar m_depth;
+ sSV m_sv_store[EPA_MAX_VERTICES];
+ sFace m_fc_store[EPA_MAX_FACES];
+ U m_nextsv;
+ sList m_hull;
+ sList m_stock;
+ /* Methods */
+ EPA()
+ {
+ Initialize();
+ }
+
+
+ static inline void bind(sFace* fa,U ea,sFace* fb,U eb)
+ {
+ fa->e[ea]=(U1)eb;fa->f[ea]=fb;
+ fb->e[eb]=(U1)ea;fb->f[eb]=fa;
+ }
+ static inline void append(sList& list,sFace* face)
+ {
+ face->l[0] = 0;
+ face->l[1] = list.root;
+ if(list.root) list.root->l[0]=face;
+ list.root = face;
+ ++list.count;
+ }
+ static inline void remove(sList& list,sFace* face)
+ {
+ if(face->l[1]) face->l[1]->l[0]=face->l[0];
+ if(face->l[0]) face->l[0]->l[1]=face->l[1];
+ if(face==list.root) list.root=face->l[1];
+ --list.count;
+ }
+
+
+ void Initialize()
+ {
+ m_status = eStatus::Failed;
+ m_normal = btVector3(0,0,0);
+ m_depth = 0;
+ m_nextsv = 0;
+ for(U i=0;i<EPA_MAX_FACES;++i)
+ {
+ append(m_stock,&m_fc_store[EPA_MAX_FACES-i-1]);
+ }
+ }
+ eStatus::_ Evaluate(GJK& gjk,const btVector3& guess)
+ {
+ GJK::sSimplex& simplex=*gjk.m_simplex;
+ if((simplex.rank>1)&&gjk.EncloseOrigin())
+ {
+
+ /* Clean up */
+ while(m_hull.root)
+ {
+ sFace* f = m_hull.root;
+ remove(m_hull,f);
+ append(m_stock,f);
+ }
+ m_status = eStatus::Valid;
+ m_nextsv = 0;
+ /* Orient simplex */
+ if(gjk.det( simplex.c[0]->w-simplex.c[3]->w,
+ simplex.c[1]->w-simplex.c[3]->w,
+ simplex.c[2]->w-simplex.c[3]->w)<0)
+ {
+ btSwap(simplex.c[0],simplex.c[1]);
+ btSwap(simplex.p[0],simplex.p[1]);
+ }
+ /* Build initial hull */
+ sFace* tetra[]={newface(simplex.c[0],simplex.c[1],simplex.c[2],true),
+ newface(simplex.c[1],simplex.c[0],simplex.c[3],true),
+ newface(simplex.c[2],simplex.c[1],simplex.c[3],true),
+ newface(simplex.c[0],simplex.c[2],simplex.c[3],true)};
+ if(m_hull.count==4)
+ {
+ sFace* best=findbest();
+ sFace outer=*best;
+ U pass=0;
+ U iterations=0;
+ bind(tetra[0],0,tetra[1],0);
+ bind(tetra[0],1,tetra[2],0);
+ bind(tetra[0],2,tetra[3],0);
+ bind(tetra[1],1,tetra[3],2);
+ bind(tetra[1],2,tetra[2],1);
+ bind(tetra[2],2,tetra[3],1);
+ m_status=eStatus::Valid;
+ for(;iterations<EPA_MAX_ITERATIONS;++iterations)
+ {
+ if(m_nextsv<EPA_MAX_VERTICES)
+ {
+ sHorizon horizon;
+ sSV* w=&m_sv_store[m_nextsv++];
+ bool valid=true;
+ best->pass = (U1)(++pass);
+ gjk.getsupport(best->n,*w);
+ const btScalar wdist=btDot(best->n,w->w)-best->d;
+ if(wdist>EPA_ACCURACY)
+ {
+ for(U j=0;(j<3)&&valid;++j)
+ {
+ valid&=expand( pass,w,
+ best->f[j],best->e[j],
+ horizon);
+ }
+ if(valid&&(horizon.nf>=3))
+ {
+ bind(horizon.cf,1,horizon.ff,2);
+ remove(m_hull,best);
+ append(m_stock,best);
+ best=findbest();
+ if(best->p>=outer.p) outer=*best;
+ } else { m_status=eStatus::InvalidHull;break; }
+ } else { m_status=eStatus::AccuraryReached;break; }
+ } else { m_status=eStatus::OutOfVertices;break; }
+ }
+ const btVector3 projection=outer.n*outer.d;
+ m_normal = outer.n;
+ m_depth = outer.d;
+ m_result.rank = 3;
+ m_result.c[0] = outer.c[0];
+ m_result.c[1] = outer.c[1];
+ m_result.c[2] = outer.c[2];
+ m_result.p[0] = btCross( outer.c[1]->w-projection,
+ outer.c[2]->w-projection).length();
+ m_result.p[1] = btCross( outer.c[2]->w-projection,
+ outer.c[0]->w-projection).length();
+ m_result.p[2] = btCross( outer.c[0]->w-projection,
+ outer.c[1]->w-projection).length();
+ const btScalar sum=m_result.p[0]+m_result.p[1]+m_result.p[2];
+ m_result.p[0] /= sum;
+ m_result.p[1] /= sum;
+ m_result.p[2] /= sum;
+ return(m_status);
+ }
+ }
+ /* Fallback */
+ m_status = eStatus::FallBack;
+ m_normal = -guess;
+ const btScalar nl=m_normal.length();
+ if(nl>0)
+ m_normal = m_normal/nl;
+ else
+ m_normal = btVector3(1,0,0);
+ m_depth = 0;
+ m_result.rank=1;
+ m_result.c[0]=simplex.c[0];
+ m_result.p[0]=1;
+ return(m_status);
+ }
+ sFace* newface(sSV* a,sSV* b,sSV* c,bool forced)
+ {
+ if(m_stock.root)
+ {
+ sFace* face=m_stock.root;
+ remove(m_stock,face);
+ append(m_hull,face);
+ face->pass = 0;
+ face->c[0] = a;
+ face->c[1] = b;
+ face->c[2] = c;
+ face->n = btCross(b->w-a->w,c->w-a->w);
+ const btScalar l=face->n.length();
+ const bool v=l>EPA_ACCURACY;
+ face->p = btMin(btMin(
+ btDot(a->w,btCross(face->n,a->w-b->w)),
+ btDot(b->w,btCross(face->n,b->w-c->w))),
+ btDot(c->w,btCross(face->n,c->w-a->w))) /
+ (v?l:1);
+ face->p = face->p>=-EPA_INSIDE_EPS?0:face->p;
+ if(v)
+ {
+ face->d = btDot(a->w,face->n)/l;
+ face->n /= l;
+ if(forced||(face->d>=-EPA_PLANE_EPS))
+ {
+ return(face);
+ } else m_status=eStatus::NonConvex;
+ } else m_status=eStatus::Degenerated;
+ remove(m_hull,face);
+ append(m_stock,face);
+ return(0);
+ }
+ m_status=m_stock.root?eStatus::OutOfVertices:eStatus::OutOfFaces;
+ return(0);
+ }
+ sFace* findbest()
+ {
+ sFace* minf=m_hull.root;
+ btScalar mind=minf->d*minf->d;
+ btScalar maxp=minf->p;
+ for(sFace* f=minf->l[1];f;f=f->l[1])
+ {
+ const btScalar sqd=f->d*f->d;
+ if((f->p>=maxp)&&(sqd<mind))
+ {
+ minf=f;
+ mind=sqd;
+ maxp=f->p;
+ }
+ }
+ return(minf);
+ }
+ bool expand(U pass,sSV* w,sFace* f,U e,sHorizon& horizon)
+ {
+ static const U i1m3[]={1,2,0};
+ static const U i2m3[]={2,0,1};
+ if(f->pass!=pass)
+ {
+ const U e1=i1m3[e];
+ if((btDot(f->n,w->w)-f->d)<-EPA_PLANE_EPS)
+ {
+ sFace* nf=newface(f->c[e1],f->c[e],w,false);
+ if(nf)
+ {
+ bind(nf,0,f,e);
+ if(horizon.cf) bind(horizon.cf,1,nf,2); else horizon.ff=nf;
+ horizon.cf=nf;
+ ++horizon.nf;
+ return(true);
+ }
+ }
+ else
+ {
+ const U e2=i2m3[e];
+ f->pass = (U1)pass;
+ if( expand(pass,w,f->f[e1],f->e[e1],horizon)&&
+ expand(pass,w,f->f[e2],f->e[e2],horizon))
+ {
+ remove(m_hull,f);
+ append(m_stock,f);
+ return(true);
+ }
+ }
+ }
+ return(false);
+ }
+
+ };
+
+ //
+ static void Initialize( const btConvexShape* shape0,const btTransform& wtrs0,
+ const btConvexShape* shape1,const btTransform& wtrs1,
+ btGjkEpaSolver2::sResults& results,
+ tShape& shape,
+ bool withmargins)
+ {
+ /* Results */
+ results.witnesses[0] =
+ results.witnesses[1] = btVector3(0,0,0);
+ results.status = btGjkEpaSolver2::sResults::Separated;
+ /* Shape */
+ shape.m_shapes[0] = shape0;
+ shape.m_shapes[1] = shape1;
+ shape.m_toshape1 = wtrs1.getBasis().transposeTimes(wtrs0.getBasis());
+ shape.m_toshape0 = wtrs0.inverseTimes(wtrs1);
+ shape.EnableMargin(withmargins);
+ }
+
+}
+
+//
+// Api
+//
+
+using namespace gjkepa2_impl;
+
+//
+int btGjkEpaSolver2::StackSizeRequirement()
+{
+ return(sizeof(GJK)+sizeof(EPA));
+}
+
+//
+bool btGjkEpaSolver2::Distance( const btConvexShape* shape0,
+ const btTransform& wtrs0,
+ const btConvexShape* shape1,
+ const btTransform& wtrs1,
+ const btVector3& guess,
+ sResults& results)
+{
+ tShape shape;
+ Initialize(shape0,wtrs0,shape1,wtrs1,results,shape,false);
+ GJK gjk;
+ GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,guess);
+ if(gjk_status==GJK::eStatus::Valid)
+ {
+ btVector3 w0=btVector3(0,0,0);
+ btVector3 w1=btVector3(0,0,0);
+ for(U i=0;i<gjk.m_simplex->rank;++i)
+ {
+ const btScalar p=gjk.m_simplex->p[i];
+ w0+=shape.Support( gjk.m_simplex->c[i]->d,0)*p;
+ w1+=shape.Support(-gjk.m_simplex->c[i]->d,1)*p;
+ }
+ results.witnesses[0] = wtrs0*w0;
+ results.witnesses[1] = wtrs0*w1;
+ results.normal = w0-w1;
+ results.distance = results.normal.length();
+ results.normal /= results.distance>GJK_MIN_DISTANCE?results.distance:1;
+ return(true);
+ }
+ else
+ {
+ results.status = gjk_status==GJK::eStatus::Inside?
+ sResults::Penetrating :
+ sResults::GJK_Failed ;
+ return(false);
+ }
+}
+
+//
+bool btGjkEpaSolver2::Penetration( const btConvexShape* shape0,
+ const btTransform& wtrs0,
+ const btConvexShape* shape1,
+ const btTransform& wtrs1,
+ const btVector3& guess,
+ sResults& results,
+ bool usemargins)
+{
+ tShape shape;
+ Initialize(shape0,wtrs0,shape1,wtrs1,results,shape,usemargins);
+ GJK gjk;
+ GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,-guess);
+ switch(gjk_status)
+ {
+ case GJK::eStatus::Inside:
+ {
+ EPA epa;
+ EPA::eStatus::_ epa_status=epa.Evaluate(gjk,-guess);
+ if(epa_status!=EPA::eStatus::Failed)
+ {
+ btVector3 w0=btVector3(0,0,0);
+ for(U i=0;i<epa.m_result.rank;++i)
+ {
+ w0+=shape.Support(epa.m_result.c[i]->d,0)*epa.m_result.p[i];
+ }
+ results.status = sResults::Penetrating;
+ results.witnesses[0] = wtrs0*w0;
+ results.witnesses[1] = wtrs0*(w0-epa.m_normal*epa.m_depth);
+ results.normal = -epa.m_normal;
+ results.distance = -epa.m_depth;
+ return(true);
+ } else results.status=sResults::EPA_Failed;
+ }
+ break;
+ case GJK::eStatus::Failed:
+ results.status=sResults::GJK_Failed;
+ break;
+ default:
+ {
+ }
+ }
+ return(false);
+}
+
+#ifndef __SPU__
+//
+btScalar btGjkEpaSolver2::SignedDistance(const btVector3& position,
+ btScalar margin,
+ const btConvexShape* shape0,
+ const btTransform& wtrs0,
+ sResults& results)
+{
+ tShape shape;
+ btSphereShape shape1(margin);
+ btTransform wtrs1(btQuaternion(0,0,0,1),position);
+ Initialize(shape0,wtrs0,&shape1,wtrs1,results,shape,false);
+ GJK gjk;
+ GJK::eStatus::_ gjk_status=gjk.Evaluate(shape,btVector3(1,1,1));
+ if(gjk_status==GJK::eStatus::Valid)
+ {
+ btVector3 w0=btVector3(0,0,0);
+ btVector3 w1=btVector3(0,0,0);
+ for(U i=0;i<gjk.m_simplex->rank;++i)
+ {
+ const btScalar p=gjk.m_simplex->p[i];
+ w0+=shape.Support( gjk.m_simplex->c[i]->d,0)*p;
+ w1+=shape.Support(-gjk.m_simplex->c[i]->d,1)*p;
+ }
+ results.witnesses[0] = wtrs0*w0;
+ results.witnesses[1] = wtrs0*w1;
+ const btVector3 delta= results.witnesses[1]-
+ results.witnesses[0];
+ const btScalar margin= shape0->getMarginNonVirtual()+
+ shape1.getMarginNonVirtual();
+ const btScalar length= delta.length();
+ results.normal = delta/length;
+ results.witnesses[0] += results.normal*margin;
+ return(length-margin);
+ }
+ else
+ {
+ if(gjk_status==GJK::eStatus::Inside)
+ {
+ if(Penetration(shape0,wtrs0,&shape1,wtrs1,gjk.m_ray,results))
+ {
+ const btVector3 delta= results.witnesses[0]-
+ results.witnesses[1];
+ const btScalar length= delta.length();
+ if (length >= SIMD_EPSILON)
+ results.normal = delta/length;
+ return(-length);
+ }
+ }
+ }
+ return(SIMD_INFINITY);
+}
+
+//
+bool btGjkEpaSolver2::SignedDistance(const btConvexShape* shape0,
+ const btTransform& wtrs0,
+ const btConvexShape* shape1,
+ const btTransform& wtrs1,
+ const btVector3& guess,
+ sResults& results)
+{
+ if(!Distance(shape0,wtrs0,shape1,wtrs1,guess,results))
+ return(Penetration(shape0,wtrs0,shape1,wtrs1,guess,results,false));
+ else
+ return(true);
+}
+#endif //__SPU__
+
+/* Symbols cleanup */
+
+#undef GJK_MAX_ITERATIONS
+#undef GJK_ACCURARY
+#undef GJK_MIN_DISTANCE
+#undef GJK_DUPLICATED_EPS
+#undef GJK_SIMPLEX2_EPS
+#undef GJK_SIMPLEX3_EPS
+#undef GJK_SIMPLEX4_EPS
+
+#undef EPA_MAX_VERTICES
+#undef EPA_MAX_FACES
+#undef EPA_MAX_ITERATIONS
+#undef EPA_ACCURACY
+#undef EPA_FALLBACK
+#undef EPA_PLANE_EPS
+#undef EPA_INSIDE_EPS
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h
new file mode 100644
index 00000000..ac501d5e
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpa2.h
@@ -0,0 +1,75 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the
+use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software in a
+product, an acknowledgment in the product documentation would be appreciated
+but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/*
+GJK-EPA collision solver by Nathanael Presson, 2008
+*/
+#ifndef BT_GJK_EPA2_H
+#define BT_GJK_EPA2_H
+
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+
+///btGjkEpaSolver contributed under zlib by Nathanael Presson
+struct btGjkEpaSolver2
+{
+struct sResults
+ {
+ enum eStatus
+ {
+ Separated, /* Shapes doesnt penetrate */
+ Penetrating, /* Shapes are penetrating */
+ GJK_Failed, /* GJK phase fail, no big issue, shapes are probably just 'touching' */
+ EPA_Failed /* EPA phase fail, bigger problem, need to save parameters, and debug */
+ } status;
+ btVector3 witnesses[2];
+ btVector3 normal;
+ btScalar distance;
+ };
+
+static int StackSizeRequirement();
+
+static bool Distance( const btConvexShape* shape0,const btTransform& wtrs0,
+ const btConvexShape* shape1,const btTransform& wtrs1,
+ const btVector3& guess,
+ sResults& results);
+
+static bool Penetration(const btConvexShape* shape0,const btTransform& wtrs0,
+ const btConvexShape* shape1,const btTransform& wtrs1,
+ const btVector3& guess,
+ sResults& results,
+ bool usemargins=true);
+#ifndef __SPU__
+static btScalar SignedDistance( const btVector3& position,
+ btScalar margin,
+ const btConvexShape* shape,
+ const btTransform& wtrs,
+ sResults& results);
+
+static bool SignedDistance( const btConvexShape* shape0,const btTransform& wtrs0,
+ const btConvexShape* shape1,const btTransform& wtrs1,
+ const btVector3& guess,
+ sResults& results);
+#endif //__SPU__
+
+};
+
+#endif //BT_GJK_EPA2_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
new file mode 100644
index 00000000..c6dc3f3a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
@@ -0,0 +1,66 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+EPA Copyright (c) Ricardo Padrela 2006
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "btGjkEpaPenetrationDepthSolver.h"
+
+
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
+
+bool btGjkEpaPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& simplexSolver,
+ const btConvexShape* pConvexA, const btConvexShape* pConvexB,
+ const btTransform& transformA, const btTransform& transformB,
+ btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB,
+ class btIDebugDraw* debugDraw, btStackAlloc* stackAlloc )
+{
+
+ (void)debugDraw;
+ (void)v;
+ (void)simplexSolver;
+
+// const btScalar radialmargin(btScalar(0.));
+
+ btVector3 guessVector(transformA.getOrigin()-transformB.getOrigin());
+ btGjkEpaSolver2::sResults results;
+
+
+ if(btGjkEpaSolver2::Penetration(pConvexA,transformA,
+ pConvexB,transformB,
+ guessVector,results))
+
+ {
+ // debugDraw->drawLine(results.witnesses[1],results.witnesses[1]+results.normal,btVector3(255,0,0));
+ //resultOut->addContactPoint(results.normal,results.witnesses[1],-results.depth);
+ wWitnessOnA = results.witnesses[0];
+ wWitnessOnB = results.witnesses[1];
+ v = results.normal;
+ return true;
+ } else
+ {
+ if(btGjkEpaSolver2::Distance(pConvexA,transformA,pConvexB,transformB,guessVector,results))
+ {
+ wWitnessOnA = results.witnesses[0];
+ wWitnessOnB = results.witnesses[1];
+ v = results.normal;
+ return false;
+ }
+ }
+
+ return false;
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
new file mode 100644
index 00000000..a49689a1
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h
@@ -0,0 +1,43 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+EPA Copyright (c) Ricardo Padrela 2006
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef BT_GJP_EPA_PENETRATION_DEPTH_H
+#define BT_GJP_EPA_PENETRATION_DEPTH_H
+
+#include "btConvexPenetrationDepthSolver.h"
+
+///EpaPenetrationDepthSolver uses the Expanding Polytope Algorithm to
+///calculate the penetration depth between two convex shapes.
+class btGjkEpaPenetrationDepthSolver : public btConvexPenetrationDepthSolver
+{
+ public :
+
+ btGjkEpaPenetrationDepthSolver()
+ {
+ }
+
+ bool calcPenDepth( btSimplexSolverInterface& simplexSolver,
+ const btConvexShape* pConvexA, const btConvexShape* pConvexB,
+ const btTransform& transformA, const btTransform& transformB,
+ btVector3& v, btVector3& wWitnessOnA, btVector3& wWitnessOnB,
+ class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc );
+
+ private :
+
+};
+
+#endif // BT_GJP_EPA_PENETRATION_DEPTH_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
new file mode 100644
index 00000000..8af16b9c
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
@@ -0,0 +1,457 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btGjkPairDetector.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
+#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
+
+
+
+#if defined(DEBUG) || defined (_DEBUG)
+//#define TEST_NON_VIRTUAL 1
+#include <stdio.h> //for debug printf
+#ifdef __SPU__
+#include <spu_printf.h>
+#define printf spu_printf
+//#define DEBUG_SPU_COLLISION_DETECTION 1
+#endif //__SPU__
+#endif
+
+//must be above the machine epsilon
+#define REL_ERROR2 btScalar(1.0e-6)
+
+//temp globals, to improve GJK/EPA/penetration calculations
+int gNumDeepPenetrationChecks = 0;
+int gNumGjkChecks = 0;
+
+
+btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver)
+:m_cachedSeparatingAxis(btScalar(0.),btScalar(1.),btScalar(0.)),
+m_penetrationDepthSolver(penetrationDepthSolver),
+m_simplexSolver(simplexSolver),
+m_minkowskiA(objectA),
+m_minkowskiB(objectB),
+m_shapeTypeA(objectA->getShapeType()),
+m_shapeTypeB(objectB->getShapeType()),
+m_marginA(objectA->getMargin()),
+m_marginB(objectB->getMargin()),
+m_ignoreMargin(false),
+m_lastUsedMethod(-1),
+m_catchDegeneracies(1)
+{
+}
+btGjkPairDetector::btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,int shapeTypeA,int shapeTypeB,btScalar marginA, btScalar marginB, btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver)
+:m_cachedSeparatingAxis(btScalar(0.),btScalar(1.),btScalar(0.)),
+m_penetrationDepthSolver(penetrationDepthSolver),
+m_simplexSolver(simplexSolver),
+m_minkowskiA(objectA),
+m_minkowskiB(objectB),
+m_shapeTypeA(shapeTypeA),
+m_shapeTypeB(shapeTypeB),
+m_marginA(marginA),
+m_marginB(marginB),
+m_ignoreMargin(false),
+m_lastUsedMethod(-1),
+m_catchDegeneracies(1)
+{
+}
+
+void btGjkPairDetector::getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults)
+{
+ (void)swapResults;
+
+ getClosestPointsNonVirtual(input,output,debugDraw);
+}
+
+#ifdef __SPU__
+void btGjkPairDetector::getClosestPointsNonVirtual(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw)
+#else
+void btGjkPairDetector::getClosestPointsNonVirtual(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw)
+#endif
+{
+ m_cachedSeparatingDistance = 0.f;
+
+ btScalar distance=btScalar(0.);
+ btVector3 normalInB(btScalar(0.),btScalar(0.),btScalar(0.));
+ btVector3 pointOnA,pointOnB;
+ btTransform localTransA = input.m_transformA;
+ btTransform localTransB = input.m_transformB;
+ btVector3 positionOffset = (localTransA.getOrigin() + localTransB.getOrigin()) * btScalar(0.5);
+ localTransA.getOrigin() -= positionOffset;
+ localTransB.getOrigin() -= positionOffset;
+
+ bool check2d = m_minkowskiA->isConvex2d() && m_minkowskiB->isConvex2d();
+
+ btScalar marginA = m_marginA;
+ btScalar marginB = m_marginB;
+
+ gNumGjkChecks++;
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("inside gjk\n");
+#endif
+ //for CCD we don't use margins
+ if (m_ignoreMargin)
+ {
+ marginA = btScalar(0.);
+ marginB = btScalar(0.);
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("ignoring margin\n");
+#endif
+ }
+
+ m_curIter = 0;
+ int gGjkMaxIter = 1000;//this is to catch invalid input, perhaps check for #NaN?
+ m_cachedSeparatingAxis.setValue(0,1,0);
+
+ bool isValid = false;
+ bool checkSimplex = false;
+ bool checkPenetration = true;
+ m_degenerateSimplex = 0;
+
+ m_lastUsedMethod = -1;
+
+ {
+ btScalar squaredDistance = BT_LARGE_FLOAT;
+ btScalar delta = btScalar(0.);
+
+ btScalar margin = marginA + marginB;
+
+
+
+ m_simplexSolver->reset();
+
+ for ( ; ; )
+ //while (true)
+ {
+
+ btVector3 seperatingAxisInA = (-m_cachedSeparatingAxis)* input.m_transformA.getBasis();
+ btVector3 seperatingAxisInB = m_cachedSeparatingAxis* input.m_transformB.getBasis();
+
+#if 1
+
+ btVector3 pInA = m_minkowskiA->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInA);
+ btVector3 qInB = m_minkowskiB->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInB);
+
+// btVector3 pInA = localGetSupportingVertexWithoutMargin(m_shapeTypeA, m_minkowskiA, seperatingAxisInA,input.m_convexVertexData[0]);//, &featureIndexA);
+// btVector3 qInB = localGetSupportingVertexWithoutMargin(m_shapeTypeB, m_minkowskiB, seperatingAxisInB,input.m_convexVertexData[1]);//, &featureIndexB);
+
+#else
+#ifdef __SPU__
+ btVector3 pInA = m_minkowskiA->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInA);
+ btVector3 qInB = m_minkowskiB->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInB);
+#else
+ btVector3 pInA = m_minkowskiA->localGetSupportingVertexWithoutMargin(seperatingAxisInA);
+ btVector3 qInB = m_minkowskiB->localGetSupportingVertexWithoutMargin(seperatingAxisInB);
+#ifdef TEST_NON_VIRTUAL
+ btVector3 pInAv = m_minkowskiA->localGetSupportingVertexWithoutMargin(seperatingAxisInA);
+ btVector3 qInBv = m_minkowskiB->localGetSupportingVertexWithoutMargin(seperatingAxisInB);
+ btAssert((pInAv-pInA).length() < 0.0001);
+ btAssert((qInBv-qInB).length() < 0.0001);
+#endif //
+#endif //__SPU__
+#endif
+
+
+ btVector3 pWorld = localTransA(pInA);
+ btVector3 qWorld = localTransB(qInB);
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("got local supporting vertices\n");
+#endif
+
+ if (check2d)
+ {
+ pWorld[2] = 0.f;
+ qWorld[2] = 0.f;
+ }
+
+ btVector3 w = pWorld - qWorld;
+ delta = m_cachedSeparatingAxis.dot(w);
+
+ // potential exit, they don't overlap
+ if ((delta > btScalar(0.0)) && (delta * delta > squaredDistance * input.m_maximumDistanceSquared))
+ {
+ m_degenerateSimplex = 10;
+ checkSimplex=true;
+ //checkPenetration = false;
+ break;
+ }
+
+ //exit 0: the new point is already in the simplex, or we didn't come any closer
+ if (m_simplexSolver->inSimplex(w))
+ {
+ m_degenerateSimplex = 1;
+ checkSimplex = true;
+ break;
+ }
+ // are we getting any closer ?
+ btScalar f0 = squaredDistance - delta;
+ btScalar f1 = squaredDistance * REL_ERROR2;
+
+ if (f0 <= f1)
+ {
+ if (f0 <= btScalar(0.))
+ {
+ m_degenerateSimplex = 2;
+ } else
+ {
+ m_degenerateSimplex = 11;
+ }
+ checkSimplex = true;
+ break;
+ }
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("addVertex 1\n");
+#endif
+ //add current vertex to simplex
+ m_simplexSolver->addVertex(w, pWorld, qWorld);
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("addVertex 2\n");
+#endif
+ btVector3 newCachedSeparatingAxis;
+
+ //calculate the closest point to the origin (update vector v)
+ if (!m_simplexSolver->closest(newCachedSeparatingAxis))
+ {
+ m_degenerateSimplex = 3;
+ checkSimplex = true;
+ break;
+ }
+
+ if(newCachedSeparatingAxis.length2()<REL_ERROR2)
+ {
+ m_cachedSeparatingAxis = newCachedSeparatingAxis;
+ m_degenerateSimplex = 6;
+ checkSimplex = true;
+ break;
+ }
+
+ btScalar previousSquaredDistance = squaredDistance;
+ squaredDistance = newCachedSeparatingAxis.length2();
+#if 0
+///warning: this termination condition leads to some problems in 2d test case see Bullet/Demos/Box2dDemo
+ if (squaredDistance>previousSquaredDistance)
+ {
+ m_degenerateSimplex = 7;
+ squaredDistance = previousSquaredDistance;
+ checkSimplex = false;
+ break;
+ }
+#endif //
+
+
+ //redundant m_simplexSolver->compute_points(pointOnA, pointOnB);
+
+ //are we getting any closer ?
+ if (previousSquaredDistance - squaredDistance <= SIMD_EPSILON * previousSquaredDistance)
+ {
+// m_simplexSolver->backup_closest(m_cachedSeparatingAxis);
+ checkSimplex = true;
+ m_degenerateSimplex = 12;
+
+ break;
+ }
+
+ m_cachedSeparatingAxis = newCachedSeparatingAxis;
+
+ //degeneracy, this is typically due to invalid/uninitialized worldtransforms for a btCollisionObject
+ if (m_curIter++ > gGjkMaxIter)
+ {
+ #if defined(DEBUG) || defined (_DEBUG) || defined (DEBUG_SPU_COLLISION_DETECTION)
+
+ printf("btGjkPairDetector maxIter exceeded:%i\n",m_curIter);
+ printf("sepAxis=(%f,%f,%f), squaredDistance = %f, shapeTypeA=%i,shapeTypeB=%i\n",
+ m_cachedSeparatingAxis.getX(),
+ m_cachedSeparatingAxis.getY(),
+ m_cachedSeparatingAxis.getZ(),
+ squaredDistance,
+ m_minkowskiA->getShapeType(),
+ m_minkowskiB->getShapeType());
+
+ #endif
+ break;
+
+ }
+
+
+ bool check = (!m_simplexSolver->fullSimplex());
+ //bool check = (!m_simplexSolver->fullSimplex() && squaredDistance > SIMD_EPSILON * m_simplexSolver->maxVertex());
+
+ if (!check)
+ {
+ //do we need this backup_closest here ?
+// m_simplexSolver->backup_closest(m_cachedSeparatingAxis);
+ m_degenerateSimplex = 13;
+ break;
+ }
+ }
+
+ if (checkSimplex)
+ {
+ m_simplexSolver->compute_points(pointOnA, pointOnB);
+ normalInB = m_cachedSeparatingAxis;
+ btScalar lenSqr =m_cachedSeparatingAxis.length2();
+
+ //valid normal
+ if (lenSqr < 0.0001)
+ {
+ m_degenerateSimplex = 5;
+ }
+ if (lenSqr > SIMD_EPSILON*SIMD_EPSILON)
+ {
+ btScalar rlen = btScalar(1.) / btSqrt(lenSqr );
+ normalInB *= rlen; //normalize
+ btScalar s = btSqrt(squaredDistance);
+
+ btAssert(s > btScalar(0.0));
+ pointOnA -= m_cachedSeparatingAxis * (marginA / s);
+ pointOnB += m_cachedSeparatingAxis * (marginB / s);
+ distance = ((btScalar(1.)/rlen) - margin);
+ isValid = true;
+
+ m_lastUsedMethod = 1;
+ } else
+ {
+ m_lastUsedMethod = 2;
+ }
+ }
+
+ bool catchDegeneratePenetrationCase =
+ (m_catchDegeneracies && m_penetrationDepthSolver && m_degenerateSimplex && ((distance+margin) < 0.01));
+
+ //if (checkPenetration && !isValid)
+ if (checkPenetration && (!isValid || catchDegeneratePenetrationCase ))
+ {
+ //penetration case
+
+ //if there is no way to handle penetrations, bail out
+ if (m_penetrationDepthSolver)
+ {
+ // Penetration depth case.
+ btVector3 tmpPointOnA,tmpPointOnB;
+
+ gNumDeepPenetrationChecks++;
+ m_cachedSeparatingAxis.setZero();
+
+ bool isValid2 = m_penetrationDepthSolver->calcPenDepth(
+ *m_simplexSolver,
+ m_minkowskiA,m_minkowskiB,
+ localTransA,localTransB,
+ m_cachedSeparatingAxis, tmpPointOnA, tmpPointOnB,
+ debugDraw,input.m_stackAlloc
+ );
+
+
+ if (isValid2)
+ {
+ btVector3 tmpNormalInB = tmpPointOnB-tmpPointOnA;
+ btScalar lenSqr = tmpNormalInB.length2();
+ if (lenSqr <= (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ tmpNormalInB = m_cachedSeparatingAxis;
+ lenSqr = m_cachedSeparatingAxis.length2();
+ }
+
+ if (lenSqr > (SIMD_EPSILON*SIMD_EPSILON))
+ {
+ tmpNormalInB /= btSqrt(lenSqr);
+ btScalar distance2 = -(tmpPointOnA-tmpPointOnB).length();
+ //only replace valid penetrations when the result is deeper (check)
+ if (!isValid || (distance2 < distance))
+ {
+ distance = distance2;
+ pointOnA = tmpPointOnA;
+ pointOnB = tmpPointOnB;
+ normalInB = tmpNormalInB;
+ isValid = true;
+ m_lastUsedMethod = 3;
+ } else
+ {
+ m_lastUsedMethod = 8;
+ }
+ } else
+ {
+ m_lastUsedMethod = 9;
+ }
+ } else
+
+ {
+ ///this is another degenerate case, where the initial GJK calculation reports a degenerate case
+ ///EPA reports no penetration, and the second GJK (using the supporting vector without margin)
+ ///reports a valid positive distance. Use the results of the second GJK instead of failing.
+ ///thanks to Jacob.Langford for the reproduction case
+ ///http://code.google.com/p/bullet/issues/detail?id=250
+
+
+ if (m_cachedSeparatingAxis.length2() > btScalar(0.))
+ {
+ btScalar distance2 = (tmpPointOnA-tmpPointOnB).length()-margin;
+ //only replace valid distances when the distance is less
+ if (!isValid || (distance2 < distance))
+ {
+ distance = distance2;
+ pointOnA = tmpPointOnA;
+ pointOnB = tmpPointOnB;
+ pointOnA -= m_cachedSeparatingAxis * marginA ;
+ pointOnB += m_cachedSeparatingAxis * marginB ;
+ normalInB = m_cachedSeparatingAxis;
+ normalInB.normalize();
+ isValid = true;
+ m_lastUsedMethod = 6;
+ } else
+ {
+ m_lastUsedMethod = 5;
+ }
+ }
+ }
+
+ }
+
+ }
+ }
+
+
+
+ if (isValid && ((distance < 0) || (distance*distance < input.m_maximumDistanceSquared)))
+ {
+#if 0
+///some debugging
+// if (check2d)
+ {
+ printf("n = %2.3f,%2.3f,%2.3f. ",normalInB[0],normalInB[1],normalInB[2]);
+ printf("distance = %2.3f exit=%d deg=%d\n",distance,m_lastUsedMethod,m_degenerateSimplex);
+ }
+#endif
+
+ m_cachedSeparatingAxis = normalInB;
+ m_cachedSeparatingDistance = distance;
+
+ output.addContactPoint(
+ normalInB,
+ pointOnB+positionOffset,
+ distance);
+
+ }
+
+
+}
+
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h
new file mode 100644
index 00000000..2277a19d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h
@@ -0,0 +1,103 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+
+#ifndef BT_GJK_PAIR_DETECTOR_H
+#define BT_GJK_PAIR_DETECTOR_H
+
+#include "btDiscreteCollisionDetectorInterface.h"
+#include "BulletCollision/CollisionShapes/btCollisionMargin.h"
+
+class btConvexShape;
+#include "btSimplexSolverInterface.h"
+class btConvexPenetrationDepthSolver;
+
+/// btGjkPairDetector uses GJK to implement the btDiscreteCollisionDetectorInterface
+class btGjkPairDetector : public btDiscreteCollisionDetectorInterface
+{
+
+
+ btVector3 m_cachedSeparatingAxis;
+ btConvexPenetrationDepthSolver* m_penetrationDepthSolver;
+ btSimplexSolverInterface* m_simplexSolver;
+ const btConvexShape* m_minkowskiA;
+ const btConvexShape* m_minkowskiB;
+ int m_shapeTypeA;
+ int m_shapeTypeB;
+ btScalar m_marginA;
+ btScalar m_marginB;
+
+ bool m_ignoreMargin;
+ btScalar m_cachedSeparatingDistance;
+
+
+public:
+
+ //some debugging to fix degeneracy problems
+ int m_lastUsedMethod;
+ int m_curIter;
+ int m_degenerateSimplex;
+ int m_catchDegeneracies;
+
+
+ btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
+ btGjkPairDetector(const btConvexShape* objectA,const btConvexShape* objectB,int shapeTypeA,int shapeTypeB,btScalar marginA, btScalar marginB, btSimplexSolverInterface* simplexSolver,btConvexPenetrationDepthSolver* penetrationDepthSolver);
+ virtual ~btGjkPairDetector() {};
+
+ virtual void getClosestPoints(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw,bool swapResults=false);
+
+ void getClosestPointsNonVirtual(const ClosestPointInput& input,Result& output,class btIDebugDraw* debugDraw);
+
+
+ void setMinkowskiA(btConvexShape* minkA)
+ {
+ m_minkowskiA = minkA;
+ }
+
+ void setMinkowskiB(btConvexShape* minkB)
+ {
+ m_minkowskiB = minkB;
+ }
+ void setCachedSeperatingAxis(const btVector3& seperatingAxis)
+ {
+ m_cachedSeparatingAxis = seperatingAxis;
+ }
+
+ const btVector3& getCachedSeparatingAxis() const
+ {
+ return m_cachedSeparatingAxis;
+ }
+ btScalar getCachedSeparatingDistance() const
+ {
+ return m_cachedSeparatingDistance;
+ }
+
+ void setPenetrationDepthSolver(btConvexPenetrationDepthSolver* penetrationDepthSolver)
+ {
+ m_penetrationDepthSolver = penetrationDepthSolver;
+ }
+
+ ///don't use setIgnoreMargin, it's for Bullet's internal use
+ void setIgnoreMargin(bool ignoreMargin)
+ {
+ m_ignoreMargin = ignoreMargin;
+ }
+
+
+};
+
+#endif //BT_GJK_PAIR_DETECTOR_H
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h
new file mode 100644
index 00000000..0ce9dd25
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btManifoldPoint.h
@@ -0,0 +1,158 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MANIFOLD_CONTACT_POINT_H
+#define BT_MANIFOLD_CONTACT_POINT_H
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransformUtil.h"
+
+#ifdef PFX_USE_FREE_VECTORMATH
+ #include "physics_effects/base_level/solver/pfx_constraint_row.h"
+typedef sce::PhysicsEffects::PfxConstraintRow btConstraintRow;
+#else
+ // Don't change following order of parameters
+ ATTRIBUTE_ALIGNED16(struct) btConstraintRow {
+ btScalar m_normal[3];
+ btScalar m_rhs;
+ btScalar m_jacDiagInv;
+ btScalar m_lowerLimit;
+ btScalar m_upperLimit;
+ btScalar m_accumImpulse;
+ };
+ typedef btConstraintRow PfxConstraintRow;
+#endif //PFX_USE_FREE_VECTORMATH
+
+
+
+/// ManifoldContactPoint collects and maintains persistent contactpoints.
+/// used to improve stability and performance of rigidbody dynamics response.
+class btManifoldPoint
+ {
+ public:
+ btManifoldPoint()
+ :m_userPersistentData(0),
+ m_appliedImpulse(0.f),
+ m_lateralFrictionInitialized(false),
+ m_appliedImpulseLateral1(0.f),
+ m_appliedImpulseLateral2(0.f),
+ m_contactMotion1(0.f),
+ m_contactMotion2(0.f),
+ m_contactCFM1(0.f),
+ m_contactCFM2(0.f),
+ m_lifeTime(0)
+ {
+ }
+
+ btManifoldPoint( const btVector3 &pointA, const btVector3 &pointB,
+ const btVector3 &normal,
+ btScalar distance ) :
+ m_localPointA( pointA ),
+ m_localPointB( pointB ),
+ m_normalWorldOnB( normal ),
+ m_distance1( distance ),
+ m_combinedFriction(btScalar(0.)),
+ m_combinedRestitution(btScalar(0.)),
+ m_userPersistentData(0),
+ m_appliedImpulse(0.f),
+ m_lateralFrictionInitialized(false),
+ m_appliedImpulseLateral1(0.f),
+ m_appliedImpulseLateral2(0.f),
+ m_contactMotion1(0.f),
+ m_contactMotion2(0.f),
+ m_contactCFM1(0.f),
+ m_contactCFM2(0.f),
+ m_lifeTime(0)
+ {
+ mConstraintRow[0].m_accumImpulse = 0.f;
+ mConstraintRow[1].m_accumImpulse = 0.f;
+ mConstraintRow[2].m_accumImpulse = 0.f;
+ }
+
+
+
+ btVector3 m_localPointA;
+ btVector3 m_localPointB;
+ btVector3 m_positionWorldOnB;
+ ///m_positionWorldOnA is redundant information, see getPositionWorldOnA(), but for clarity
+ btVector3 m_positionWorldOnA;
+ btVector3 m_normalWorldOnB;
+
+ btScalar m_distance1;
+ btScalar m_combinedFriction;
+ btScalar m_combinedRestitution;
+
+ //BP mod, store contact triangles.
+ int m_partId0;
+ int m_partId1;
+ int m_index0;
+ int m_index1;
+
+ mutable void* m_userPersistentData;
+ btScalar m_appliedImpulse;
+
+ bool m_lateralFrictionInitialized;
+ btScalar m_appliedImpulseLateral1;
+ btScalar m_appliedImpulseLateral2;
+ btScalar m_contactMotion1;
+ btScalar m_contactMotion2;
+ btScalar m_contactCFM1;
+ btScalar m_contactCFM2;
+
+ int m_lifeTime;//lifetime of the contactpoint in frames
+
+ btVector3 m_lateralFrictionDir1;
+ btVector3 m_lateralFrictionDir2;
+
+
+
+ btConstraintRow mConstraintRow[3];
+
+
+ btScalar getDistance() const
+ {
+ return m_distance1;
+ }
+ int getLifeTime() const
+ {
+ return m_lifeTime;
+ }
+
+ const btVector3& getPositionWorldOnA() const {
+ return m_positionWorldOnA;
+// return m_positionWorldOnB + m_normalWorldOnB * m_distance1;
+ }
+
+ const btVector3& getPositionWorldOnB() const
+ {
+ return m_positionWorldOnB;
+ }
+
+ void setDistance(btScalar dist)
+ {
+ m_distance1 = dist;
+ }
+
+ ///this returns the most recent applied impulse, to satisfy contact constraints by the constraint solver
+ btScalar getAppliedImpulse() const
+ {
+ return m_appliedImpulse;
+ }
+
+
+
+ };
+
+#endif //BT_MANIFOLD_CONTACT_POINT_H
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
new file mode 100644
index 00000000..fe31f08d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
@@ -0,0 +1,362 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btMinkowskiPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+
+#define NUM_UNITSPHERE_POINTS 42
+
+
+bool btMinkowskiPenetrationDepthSolver::calcPenDepth(btSimplexSolverInterface& simplexSolver,
+ const btConvexShape* convexA,const btConvexShape* convexB,
+ const btTransform& transA,const btTransform& transB,
+ btVector3& v, btVector3& pa, btVector3& pb,
+ class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
+ )
+{
+
+ (void)stackAlloc;
+ (void)v;
+
+ bool check2d= convexA->isConvex2d() && convexB->isConvex2d();
+
+ struct btIntermediateResult : public btDiscreteCollisionDetectorInterface::Result
+ {
+
+ btIntermediateResult():m_hasResult(false)
+ {
+ }
+
+ btVector3 m_normalOnBInWorld;
+ btVector3 m_pointInWorld;
+ btScalar m_depth;
+ bool m_hasResult;
+
+ virtual void setShapeIdentifiersA(int partId0,int index0)
+ {
+ (void)partId0;
+ (void)index0;
+ }
+ virtual void setShapeIdentifiersB(int partId1,int index1)
+ {
+ (void)partId1;
+ (void)index1;
+ }
+ void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+ {
+ m_normalOnBInWorld = normalOnBInWorld;
+ m_pointInWorld = pointInWorld;
+ m_depth = depth;
+ m_hasResult = true;
+ }
+ };
+
+ //just take fixed number of orientation, and sample the penetration depth in that direction
+ btScalar minProj = btScalar(BT_LARGE_FLOAT);
+ btVector3 minNorm(btScalar(0.), btScalar(0.), btScalar(0.));
+ btVector3 minA,minB;
+ btVector3 seperatingAxisInA,seperatingAxisInB;
+ btVector3 pInA,qInB,pWorld,qWorld,w;
+
+#ifndef __SPU__
+#define USE_BATCHED_SUPPORT 1
+#endif
+#ifdef USE_BATCHED_SUPPORT
+
+ btVector3 supportVerticesABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ btVector3 supportVerticesBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ btVector3 seperatingAxisInABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ btVector3 seperatingAxisInBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ int i;
+
+ int numSampleDirections = NUM_UNITSPHERE_POINTS;
+
+ for (i=0;i<numSampleDirections;i++)
+ {
+ btVector3 norm = getPenetrationDirections()[i];
+ seperatingAxisInABatch[i] = (-norm) * transA.getBasis() ;
+ seperatingAxisInBBatch[i] = norm * transB.getBasis() ;
+ }
+
+ {
+ int numPDA = convexA->getNumPreferredPenetrationDirections();
+ if (numPDA)
+ {
+ for (int i=0;i<numPDA;i++)
+ {
+ btVector3 norm;
+ convexA->getPreferredPenetrationDirection(i,norm);
+ norm = transA.getBasis() * norm;
+ getPenetrationDirections()[numSampleDirections] = norm;
+ seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis();
+ seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis();
+ numSampleDirections++;
+ }
+ }
+ }
+
+ {
+ int numPDB = convexB->getNumPreferredPenetrationDirections();
+ if (numPDB)
+ {
+ for (int i=0;i<numPDB;i++)
+ {
+ btVector3 norm;
+ convexB->getPreferredPenetrationDirection(i,norm);
+ norm = transB.getBasis() * norm;
+ getPenetrationDirections()[numSampleDirections] = norm;
+ seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis();
+ seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis();
+ numSampleDirections++;
+ }
+ }
+ }
+
+
+
+
+ convexA->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInABatch,supportVerticesABatch,numSampleDirections);
+ convexB->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInBBatch,supportVerticesBBatch,numSampleDirections);
+
+ for (i=0;i<numSampleDirections;i++)
+ {
+ btVector3 norm = getPenetrationDirections()[i];
+ if (check2d)
+ {
+ norm[2] = 0.f;
+ }
+ if (norm.length2()>0.01)
+ {
+
+ seperatingAxisInA = seperatingAxisInABatch[i];
+ seperatingAxisInB = seperatingAxisInBBatch[i];
+
+ pInA = supportVerticesABatch[i];
+ qInB = supportVerticesBBatch[i];
+
+ pWorld = transA(pInA);
+ qWorld = transB(qInB);
+ if (check2d)
+ {
+ pWorld[2] = 0.f;
+ qWorld[2] = 0.f;
+ }
+
+ w = qWorld - pWorld;
+ btScalar delta = norm.dot(w);
+ //find smallest delta
+ if (delta < minProj)
+ {
+ minProj = delta;
+ minNorm = norm;
+ minA = pWorld;
+ minB = qWorld;
+ }
+ }
+ }
+#else
+
+ int numSampleDirections = NUM_UNITSPHERE_POINTS;
+
+#ifndef __SPU__
+ {
+ int numPDA = convexA->getNumPreferredPenetrationDirections();
+ if (numPDA)
+ {
+ for (int i=0;i<numPDA;i++)
+ {
+ btVector3 norm;
+ convexA->getPreferredPenetrationDirection(i,norm);
+ norm = transA.getBasis() * norm;
+ getPenetrationDirections()[numSampleDirections] = norm;
+ numSampleDirections++;
+ }
+ }
+ }
+
+ {
+ int numPDB = convexB->getNumPreferredPenetrationDirections();
+ if (numPDB)
+ {
+ for (int i=0;i<numPDB;i++)
+ {
+ btVector3 norm;
+ convexB->getPreferredPenetrationDirection(i,norm);
+ norm = transB.getBasis() * norm;
+ getPenetrationDirections()[numSampleDirections] = norm;
+ numSampleDirections++;
+ }
+ }
+ }
+#endif // __SPU__
+
+ for (int i=0;i<numSampleDirections;i++)
+ {
+ const btVector3& norm = getPenetrationDirections()[i];
+ seperatingAxisInA = (-norm)* transA.getBasis();
+ seperatingAxisInB = norm* transB.getBasis();
+ pInA = convexA->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInA);
+ qInB = convexB->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInB);
+ pWorld = transA(pInA);
+ qWorld = transB(qInB);
+ w = qWorld - pWorld;
+ btScalar delta = norm.dot(w);
+ //find smallest delta
+ if (delta < minProj)
+ {
+ minProj = delta;
+ minNorm = norm;
+ minA = pWorld;
+ minB = qWorld;
+ }
+ }
+#endif //USE_BATCHED_SUPPORT
+
+ //add the margins
+
+ minA += minNorm*convexA->getMarginNonVirtual();
+ minB -= minNorm*convexB->getMarginNonVirtual();
+ //no penetration
+ if (minProj < btScalar(0.))
+ return false;
+
+ btScalar extraSeparation = 0.5f;///scale dependent
+ minProj += extraSeparation+(convexA->getMarginNonVirtual() + convexB->getMarginNonVirtual());
+
+
+
+
+
+//#define DEBUG_DRAW 1
+#ifdef DEBUG_DRAW
+ if (debugDraw)
+ {
+ btVector3 color(0,1,0);
+ debugDraw->drawLine(minA,minB,color);
+ color = btVector3 (1,1,1);
+ btVector3 vec = minB-minA;
+ btScalar prj2 = minNorm.dot(vec);
+ debugDraw->drawLine(minA,minA+(minNorm*minProj),color);
+
+ }
+#endif //DEBUG_DRAW
+
+
+
+ btGjkPairDetector gjkdet(convexA,convexB,&simplexSolver,0);
+
+ btScalar offsetDist = minProj;
+ btVector3 offset = minNorm * offsetDist;
+
+
+
+ btGjkPairDetector::ClosestPointInput input;
+
+ btVector3 newOrg = transA.getOrigin() + offset;
+
+ btTransform displacedTrans = transA;
+ displacedTrans.setOrigin(newOrg);
+
+ input.m_transformA = displacedTrans;
+ input.m_transformB = transB;
+ input.m_maximumDistanceSquared = btScalar(BT_LARGE_FLOAT);//minProj;
+
+ btIntermediateResult res;
+ gjkdet.setCachedSeperatingAxis(-minNorm);
+ gjkdet.getClosestPoints(input,res,debugDraw);
+
+ btScalar correctedMinNorm = minProj - res.m_depth;
+
+
+ //the penetration depth is over-estimated, relax it
+ btScalar penetration_relaxation= btScalar(1.);
+ minNorm*=penetration_relaxation;
+
+
+ if (res.m_hasResult)
+ {
+
+ pa = res.m_pointInWorld - minNorm * correctedMinNorm;
+ pb = res.m_pointInWorld;
+ v = minNorm;
+
+#ifdef DEBUG_DRAW
+ if (debugDraw)
+ {
+ btVector3 color(1,0,0);
+ debugDraw->drawLine(pa,pb,color);
+ }
+#endif//DEBUG_DRAW
+
+
+ }
+ return res.m_hasResult;
+}
+
+btVector3* btMinkowskiPenetrationDepthSolver::getPenetrationDirections()
+{
+ static btVector3 sPenetrationDirections[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2] =
+ {
+ btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)),
+ btVector3(btScalar(0.723608) , btScalar(-0.525725),btScalar(-0.447219)),
+ btVector3(btScalar(-0.276388) , btScalar(-0.850649),btScalar(-0.447219)),
+ btVector3(btScalar(-0.894426) , btScalar(-0.000000),btScalar(-0.447216)),
+ btVector3(btScalar(-0.276388) , btScalar(0.850649),btScalar(-0.447220)),
+ btVector3(btScalar(0.723608) , btScalar(0.525725),btScalar(-0.447219)),
+ btVector3(btScalar(0.276388) , btScalar(-0.850649),btScalar(0.447220)),
+ btVector3(btScalar(-0.723608) , btScalar(-0.525725),btScalar(0.447219)),
+ btVector3(btScalar(-0.723608) , btScalar(0.525725),btScalar(0.447219)),
+ btVector3(btScalar(0.276388) , btScalar(0.850649),btScalar(0.447219)),
+ btVector3(btScalar(0.894426) , btScalar(0.000000),btScalar(0.447216)),
+ btVector3(btScalar(-0.000000) , btScalar(0.000000),btScalar(1.000000)),
+ btVector3(btScalar(0.425323) , btScalar(-0.309011),btScalar(-0.850654)),
+ btVector3(btScalar(-0.162456) , btScalar(-0.499995),btScalar(-0.850654)),
+ btVector3(btScalar(0.262869) , btScalar(-0.809012),btScalar(-0.525738)),
+ btVector3(btScalar(0.425323) , btScalar(0.309011),btScalar(-0.850654)),
+ btVector3(btScalar(0.850648) , btScalar(-0.000000),btScalar(-0.525736)),
+ btVector3(btScalar(-0.525730) , btScalar(-0.000000),btScalar(-0.850652)),
+ btVector3(btScalar(-0.688190) , btScalar(-0.499997),btScalar(-0.525736)),
+ btVector3(btScalar(-0.162456) , btScalar(0.499995),btScalar(-0.850654)),
+ btVector3(btScalar(-0.688190) , btScalar(0.499997),btScalar(-0.525736)),
+ btVector3(btScalar(0.262869) , btScalar(0.809012),btScalar(-0.525738)),
+ btVector3(btScalar(0.951058) , btScalar(0.309013),btScalar(0.000000)),
+ btVector3(btScalar(0.951058) , btScalar(-0.309013),btScalar(0.000000)),
+ btVector3(btScalar(0.587786) , btScalar(-0.809017),btScalar(0.000000)),
+ btVector3(btScalar(0.000000) , btScalar(-1.000000),btScalar(0.000000)),
+ btVector3(btScalar(-0.587786) , btScalar(-0.809017),btScalar(0.000000)),
+ btVector3(btScalar(-0.951058) , btScalar(-0.309013),btScalar(-0.000000)),
+ btVector3(btScalar(-0.951058) , btScalar(0.309013),btScalar(-0.000000)),
+ btVector3(btScalar(-0.587786) , btScalar(0.809017),btScalar(-0.000000)),
+ btVector3(btScalar(-0.000000) , btScalar(1.000000),btScalar(-0.000000)),
+ btVector3(btScalar(0.587786) , btScalar(0.809017),btScalar(-0.000000)),
+ btVector3(btScalar(0.688190) , btScalar(-0.499997),btScalar(0.525736)),
+ btVector3(btScalar(-0.262869) , btScalar(-0.809012),btScalar(0.525738)),
+ btVector3(btScalar(-0.850648) , btScalar(0.000000),btScalar(0.525736)),
+ btVector3(btScalar(-0.262869) , btScalar(0.809012),btScalar(0.525738)),
+ btVector3(btScalar(0.688190) , btScalar(0.499997),btScalar(0.525736)),
+ btVector3(btScalar(0.525730) , btScalar(0.000000),btScalar(0.850652)),
+ btVector3(btScalar(0.162456) , btScalar(-0.499995),btScalar(0.850654)),
+ btVector3(btScalar(-0.425323) , btScalar(-0.309011),btScalar(0.850654)),
+ btVector3(btScalar(-0.425323) , btScalar(0.309011),btScalar(0.850654)),
+ btVector3(btScalar(0.162456) , btScalar(0.499995),btScalar(0.850654))
+ };
+
+ return sPenetrationDirections;
+}
+
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
new file mode 100644
index 00000000..6a8fe52f
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h
@@ -0,0 +1,40 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+#define BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+
+#include "btConvexPenetrationDepthSolver.h"
+
+///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation.
+///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points.
+class btMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver
+{
+protected:
+
+ static btVector3* getPenetrationDirections();
+
+public:
+
+ virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver,
+ const btConvexShape* convexA,const btConvexShape* convexB,
+ const btTransform& transA,const btTransform& transB,
+ btVector3& v, btVector3& pa, btVector3& pb,
+ class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
+ );
+};
+
+#endif //BT_MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
new file mode 100644
index 00000000..924a8af8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
@@ -0,0 +1,260 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btPersistentManifold.h"
+#include "LinearMath/btTransform.h"
+
+
+btScalar gContactBreakingThreshold = btScalar(0.02);
+ContactDestroyedCallback gContactDestroyedCallback = 0;
+ContactProcessedCallback gContactProcessedCallback = 0;
+
+
+
+btPersistentManifold::btPersistentManifold()
+:btTypedObject(BT_PERSISTENT_MANIFOLD_TYPE),
+m_body0(0),
+m_body1(0),
+m_cachedPoints (0),
+m_index1a(0)
+{
+}
+
+
+
+
+#ifdef DEBUG_PERSISTENCY
+#include <stdio.h>
+void btPersistentManifold::DebugPersistency()
+{
+ int i;
+ printf("DebugPersistency : numPoints %d\n",m_cachedPoints);
+ for (i=0;i<m_cachedPoints;i++)
+ {
+ printf("m_pointCache[%d].m_userPersistentData = %x\n",i,m_pointCache[i].m_userPersistentData);
+ }
+}
+#endif //DEBUG_PERSISTENCY
+
+void btPersistentManifold::clearUserCache(btManifoldPoint& pt)
+{
+
+ void* oldPtr = pt.m_userPersistentData;
+ if (oldPtr)
+ {
+#ifdef DEBUG_PERSISTENCY
+ int i;
+ int occurance = 0;
+ for (i=0;i<m_cachedPoints;i++)
+ {
+ if (m_pointCache[i].m_userPersistentData == oldPtr)
+ {
+ occurance++;
+ if (occurance>1)
+ printf("error in clearUserCache\n");
+ }
+ }
+ btAssert(occurance<=0);
+#endif //DEBUG_PERSISTENCY
+
+ if (pt.m_userPersistentData && gContactDestroyedCallback)
+ {
+ (*gContactDestroyedCallback)(pt.m_userPersistentData);
+ pt.m_userPersistentData = 0;
+ }
+
+#ifdef DEBUG_PERSISTENCY
+ DebugPersistency();
+#endif
+ }
+
+
+}
+
+
+int btPersistentManifold::sortCachedPoints(const btManifoldPoint& pt)
+{
+
+ //calculate 4 possible cases areas, and take biggest area
+ //also need to keep 'deepest'
+
+ int maxPenetrationIndex = -1;
+#define KEEP_DEEPEST_POINT 1
+#ifdef KEEP_DEEPEST_POINT
+ btScalar maxPenetration = pt.getDistance();
+ for (int i=0;i<4;i++)
+ {
+ if (m_pointCache[i].getDistance() < maxPenetration)
+ {
+ maxPenetrationIndex = i;
+ maxPenetration = m_pointCache[i].getDistance();
+ }
+ }
+#endif //KEEP_DEEPEST_POINT
+
+ btScalar res0(btScalar(0.)),res1(btScalar(0.)),res2(btScalar(0.)),res3(btScalar(0.));
+ if (maxPenetrationIndex != 0)
+ {
+ btVector3 a0 = pt.m_localPointA-m_pointCache[1].m_localPointA;
+ btVector3 b0 = m_pointCache[3].m_localPointA-m_pointCache[2].m_localPointA;
+ btVector3 cross = a0.cross(b0);
+ res0 = cross.length2();
+ }
+ if (maxPenetrationIndex != 1)
+ {
+ btVector3 a1 = pt.m_localPointA-m_pointCache[0].m_localPointA;
+ btVector3 b1 = m_pointCache[3].m_localPointA-m_pointCache[2].m_localPointA;
+ btVector3 cross = a1.cross(b1);
+ res1 = cross.length2();
+ }
+
+ if (maxPenetrationIndex != 2)
+ {
+ btVector3 a2 = pt.m_localPointA-m_pointCache[0].m_localPointA;
+ btVector3 b2 = m_pointCache[3].m_localPointA-m_pointCache[1].m_localPointA;
+ btVector3 cross = a2.cross(b2);
+ res2 = cross.length2();
+ }
+
+ if (maxPenetrationIndex != 3)
+ {
+ btVector3 a3 = pt.m_localPointA-m_pointCache[0].m_localPointA;
+ btVector3 b3 = m_pointCache[2].m_localPointA-m_pointCache[1].m_localPointA;
+ btVector3 cross = a3.cross(b3);
+ res3 = cross.length2();
+ }
+
+ btVector4 maxvec(res0,res1,res2,res3);
+ int biggestarea = maxvec.closestAxis4();
+ return biggestarea;
+}
+
+
+int btPersistentManifold::getCacheEntry(const btManifoldPoint& newPoint) const
+{
+ btScalar shortestDist = getContactBreakingThreshold() * getContactBreakingThreshold();
+ int size = getNumContacts();
+ int nearestPoint = -1;
+ for( int i = 0; i < size; i++ )
+ {
+ const btManifoldPoint &mp = m_pointCache[i];
+
+ btVector3 diffA = mp.m_localPointA- newPoint.m_localPointA;
+ const btScalar distToManiPoint = diffA.dot(diffA);
+ if( distToManiPoint < shortestDist )
+ {
+ shortestDist = distToManiPoint;
+ nearestPoint = i;
+ }
+ }
+ return nearestPoint;
+}
+
+int btPersistentManifold::addManifoldPoint(const btManifoldPoint& newPoint)
+{
+ btAssert(validContactDistance(newPoint));
+
+ int insertIndex = getNumContacts();
+ if (insertIndex == MANIFOLD_CACHE_SIZE)
+ {
+#if MANIFOLD_CACHE_SIZE >= 4
+ //sort cache so best points come first, based on area
+ insertIndex = sortCachedPoints(newPoint);
+#else
+ insertIndex = 0;
+#endif
+ clearUserCache(m_pointCache[insertIndex]);
+
+ } else
+ {
+ m_cachedPoints++;
+
+
+ }
+ if (insertIndex<0)
+ insertIndex=0;
+
+ btAssert(m_pointCache[insertIndex].m_userPersistentData==0);
+ m_pointCache[insertIndex] = newPoint;
+ return insertIndex;
+}
+
+btScalar btPersistentManifold::getContactBreakingThreshold() const
+{
+ return m_contactBreakingThreshold;
+}
+
+
+
+void btPersistentManifold::refreshContactPoints(const btTransform& trA,const btTransform& trB)
+{
+ int i;
+#ifdef DEBUG_PERSISTENCY
+ printf("refreshContactPoints posA = (%f,%f,%f) posB = (%f,%f,%f)\n",
+ trA.getOrigin().getX(),
+ trA.getOrigin().getY(),
+ trA.getOrigin().getZ(),
+ trB.getOrigin().getX(),
+ trB.getOrigin().getY(),
+ trB.getOrigin().getZ());
+#endif //DEBUG_PERSISTENCY
+ /// first refresh worldspace positions and distance
+ for (i=getNumContacts()-1;i>=0;i--)
+ {
+ btManifoldPoint &manifoldPoint = m_pointCache[i];
+ manifoldPoint.m_positionWorldOnA = trA( manifoldPoint.m_localPointA );
+ manifoldPoint.m_positionWorldOnB = trB( manifoldPoint.m_localPointB );
+ manifoldPoint.m_distance1 = (manifoldPoint.m_positionWorldOnA - manifoldPoint.m_positionWorldOnB).dot(manifoldPoint.m_normalWorldOnB);
+ manifoldPoint.m_lifeTime++;
+ }
+
+ /// then
+ btScalar distance2d;
+ btVector3 projectedDifference,projectedPoint;
+ for (i=getNumContacts()-1;i>=0;i--)
+ {
+
+ btManifoldPoint &manifoldPoint = m_pointCache[i];
+ //contact becomes invalid when signed distance exceeds margin (projected on contactnormal direction)
+ if (!validContactDistance(manifoldPoint))
+ {
+ removeContactPoint(i);
+ } else
+ {
+ //contact also becomes invalid when relative movement orthogonal to normal exceeds margin
+ projectedPoint = manifoldPoint.m_positionWorldOnA - manifoldPoint.m_normalWorldOnB * manifoldPoint.m_distance1;
+ projectedDifference = manifoldPoint.m_positionWorldOnB - projectedPoint;
+ distance2d = projectedDifference.dot(projectedDifference);
+ if (distance2d > getContactBreakingThreshold()*getContactBreakingThreshold() )
+ {
+ removeContactPoint(i);
+ } else
+ {
+ //contact point processed callback
+ if (gContactProcessedCallback)
+ (*gContactProcessedCallback)(manifoldPoint,m_body0,m_body1);
+ }
+ }
+ }
+#ifdef DEBUG_PERSISTENCY
+ DebugPersistency();
+#endif //
+}
+
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
new file mode 100644
index 00000000..83d17f2a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPersistentManifold.h
@@ -0,0 +1,232 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_PERSISTENT_MANIFOLD_H
+#define BT_PERSISTENT_MANIFOLD_H
+
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+#include "btManifoldPoint.h"
+#include "LinearMath/btAlignedAllocator.h"
+
+struct btCollisionResult;
+
+///maximum contact breaking and merging threshold
+extern btScalar gContactBreakingThreshold;
+
+typedef bool (*ContactDestroyedCallback)(void* userPersistentData);
+typedef bool (*ContactProcessedCallback)(btManifoldPoint& cp,void* body0,void* body1);
+extern ContactDestroyedCallback gContactDestroyedCallback;
+extern ContactProcessedCallback gContactProcessedCallback;
+
+//the enum starts at 1024 to avoid type conflicts with btTypedConstraint
+enum btContactManifoldTypes
+{
+ MIN_CONTACT_MANIFOLD_TYPE = 1024,
+ BT_PERSISTENT_MANIFOLD_TYPE
+};
+
+#define MANIFOLD_CACHE_SIZE 4
+
+///btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping in the broadphase.
+///Those contact points are created by the collision narrow phase.
+///The cache can be empty, or hold 1,2,3 or 4 points. Some collision algorithms (GJK) might only add one point at a time.
+///updates/refreshes old contact points, and throw them away if necessary (distance becomes too large)
+///reduces the cache to 4 points, when more then 4 points are added, using following rules:
+///the contact point with deepest penetration is always kept, and it tries to maximuze the area covered by the points
+///note that some pairs of objects might have more then one contact manifold.
+
+
+ATTRIBUTE_ALIGNED128( class) btPersistentManifold : public btTypedObject
+//ATTRIBUTE_ALIGNED16( class) btPersistentManifold : public btTypedObject
+{
+
+ btManifoldPoint m_pointCache[MANIFOLD_CACHE_SIZE];
+
+ /// this two body pointers can point to the physics rigidbody class.
+ /// void* will allow any rigidbody class
+ void* m_body0;
+ void* m_body1;
+
+ int m_cachedPoints;
+
+ btScalar m_contactBreakingThreshold;
+ btScalar m_contactProcessingThreshold;
+
+
+ /// sort cached points so most isolated points come first
+ int sortCachedPoints(const btManifoldPoint& pt);
+
+ int findContactPoint(const btManifoldPoint* unUsed, int numUnused,const btManifoldPoint& pt);
+
+public:
+
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ int m_companionIdA;
+ int m_companionIdB;
+
+ int m_index1a;
+
+ btPersistentManifold();
+
+ btPersistentManifold(void* body0,void* body1,int , btScalar contactBreakingThreshold,btScalar contactProcessingThreshold)
+ : btTypedObject(BT_PERSISTENT_MANIFOLD_TYPE),
+ m_body0(body0),m_body1(body1),m_cachedPoints(0),
+ m_contactBreakingThreshold(contactBreakingThreshold),
+ m_contactProcessingThreshold(contactProcessingThreshold)
+ {
+ }
+
+ SIMD_FORCE_INLINE void* getBody0() { return m_body0;}
+ SIMD_FORCE_INLINE void* getBody1() { return m_body1;}
+
+ SIMD_FORCE_INLINE const void* getBody0() const { return m_body0;}
+ SIMD_FORCE_INLINE const void* getBody1() const { return m_body1;}
+
+ void setBodies(void* body0,void* body1)
+ {
+ m_body0 = body0;
+ m_body1 = body1;
+ }
+
+ void clearUserCache(btManifoldPoint& pt);
+
+#ifdef DEBUG_PERSISTENCY
+ void DebugPersistency();
+#endif //
+
+ SIMD_FORCE_INLINE int getNumContacts() const { return m_cachedPoints;}
+
+ SIMD_FORCE_INLINE const btManifoldPoint& getContactPoint(int index) const
+ {
+ btAssert(index < m_cachedPoints);
+ return m_pointCache[index];
+ }
+
+ SIMD_FORCE_INLINE btManifoldPoint& getContactPoint(int index)
+ {
+ btAssert(index < m_cachedPoints);
+ return m_pointCache[index];
+ }
+
+ ///@todo: get this margin from the current physics / collision environment
+ btScalar getContactBreakingThreshold() const;
+
+ btScalar getContactProcessingThreshold() const
+ {
+ return m_contactProcessingThreshold;
+ }
+
+ int getCacheEntry(const btManifoldPoint& newPoint) const;
+
+ int addManifoldPoint( const btManifoldPoint& newPoint);
+
+ void removeContactPoint (int index)
+ {
+ clearUserCache(m_pointCache[index]);
+
+ int lastUsedIndex = getNumContacts() - 1;
+// m_pointCache[index] = m_pointCache[lastUsedIndex];
+ if(index != lastUsedIndex)
+ {
+ m_pointCache[index] = m_pointCache[lastUsedIndex];
+ //get rid of duplicated userPersistentData pointer
+ m_pointCache[lastUsedIndex].m_userPersistentData = 0;
+ m_pointCache[lastUsedIndex].mConstraintRow[0].m_accumImpulse = 0.f;
+ m_pointCache[lastUsedIndex].mConstraintRow[1].m_accumImpulse = 0.f;
+ m_pointCache[lastUsedIndex].mConstraintRow[2].m_accumImpulse = 0.f;
+
+ m_pointCache[lastUsedIndex].m_appliedImpulse = 0.f;
+ m_pointCache[lastUsedIndex].m_lateralFrictionInitialized = false;
+ m_pointCache[lastUsedIndex].m_appliedImpulseLateral1 = 0.f;
+ m_pointCache[lastUsedIndex].m_appliedImpulseLateral2 = 0.f;
+ m_pointCache[lastUsedIndex].m_lifeTime = 0;
+ }
+
+ btAssert(m_pointCache[lastUsedIndex].m_userPersistentData==0);
+ m_cachedPoints--;
+ }
+ void replaceContactPoint(const btManifoldPoint& newPoint,int insertIndex)
+ {
+ btAssert(validContactDistance(newPoint));
+
+#define MAINTAIN_PERSISTENCY 1
+#ifdef MAINTAIN_PERSISTENCY
+ int lifeTime = m_pointCache[insertIndex].getLifeTime();
+ btScalar appliedImpulse = m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse;
+ btScalar appliedLateralImpulse1 = m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse;
+ btScalar appliedLateralImpulse2 = m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse;
+// bool isLateralFrictionInitialized = m_pointCache[insertIndex].m_lateralFrictionInitialized;
+
+
+
+ btAssert(lifeTime>=0);
+ void* cache = m_pointCache[insertIndex].m_userPersistentData;
+
+ m_pointCache[insertIndex] = newPoint;
+
+ m_pointCache[insertIndex].m_userPersistentData = cache;
+ m_pointCache[insertIndex].m_appliedImpulse = appliedImpulse;
+ m_pointCache[insertIndex].m_appliedImpulseLateral1 = appliedLateralImpulse1;
+ m_pointCache[insertIndex].m_appliedImpulseLateral2 = appliedLateralImpulse2;
+
+ m_pointCache[insertIndex].mConstraintRow[0].m_accumImpulse = appliedImpulse;
+ m_pointCache[insertIndex].mConstraintRow[1].m_accumImpulse = appliedLateralImpulse1;
+ m_pointCache[insertIndex].mConstraintRow[2].m_accumImpulse = appliedLateralImpulse2;
+
+
+ m_pointCache[insertIndex].m_lifeTime = lifeTime;
+#else
+ clearUserCache(m_pointCache[insertIndex]);
+ m_pointCache[insertIndex] = newPoint;
+
+#endif
+ }
+
+ bool validContactDistance(const btManifoldPoint& pt) const
+ {
+ if (pt.m_lifeTime >1)
+ {
+ return pt.m_distance1 <= getContactBreakingThreshold();
+ }
+ return pt.m_distance1 <= getContactProcessingThreshold();
+
+ }
+ /// calculated new worldspace coordinates and depth, and reject points that exceed the collision margin
+ void refreshContactPoints( const btTransform& trA,const btTransform& trB);
+
+
+ SIMD_FORCE_INLINE void clearManifold()
+ {
+ int i;
+ for (i=0;i<m_cachedPoints;i++)
+ {
+ clearUserCache(m_pointCache[i]);
+ }
+ m_cachedPoints = 0;
+ }
+
+
+
+}
+;
+
+
+
+
+
+#endif //BT_PERSISTENT_MANIFOLD_H
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h
new file mode 100644
index 00000000..18da1710
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPointCollector.h
@@ -0,0 +1,64 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_POINT_COLLECTOR_H
+#define BT_POINT_COLLECTOR_H
+
+#include "btDiscreteCollisionDetectorInterface.h"
+
+
+
+struct btPointCollector : public btDiscreteCollisionDetectorInterface::Result
+{
+
+
+ btVector3 m_normalOnBInWorld;
+ btVector3 m_pointInWorld;
+ btScalar m_distance;//negative means penetration
+
+ bool m_hasResult;
+
+ btPointCollector ()
+ : m_distance(btScalar(BT_LARGE_FLOAT)),m_hasResult(false)
+ {
+ }
+
+ virtual void setShapeIdentifiersA(int partId0,int index0)
+ {
+ (void)partId0;
+ (void)index0;
+
+ }
+ virtual void setShapeIdentifiersB(int partId1,int index1)
+ {
+ (void)partId1;
+ (void)index1;
+ }
+
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+ {
+ if (depth< m_distance)
+ {
+ m_hasResult = true;
+ m_normalOnBInWorld = normalOnBInWorld;
+ m_pointInWorld = pointInWorld;
+ //negative means penetration
+ m_distance = depth;
+ }
+ }
+};
+
+#endif //BT_POINT_COLLECTOR_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
new file mode 100644
index 00000000..31fe7da8
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
@@ -0,0 +1,360 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2011 Advanced Micro Devices, Inc. http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+///This file was written by Erwin Coumans
+///Separating axis rest based on work from Pierre Terdiman, see
+///And contact clipping based on work from Simon Hobbs
+
+
+#include "btPolyhedralContactClipping.h"
+#include "BulletCollision/CollisionShapes/btConvexPolyhedron.h"
+
+#include <float.h> //for FLT_MAX
+
+
+// Clips a face to the back of a plane
+void btPolyhedralContactClipping::clipFace(const btVertexArray& pVtxIn, btVertexArray& ppVtxOut, const btVector3& planeNormalWS,btScalar planeEqWS)
+{
+
+ int ve;
+ btScalar ds, de;
+ int numVerts = pVtxIn.size();
+ if (numVerts < 2)
+ return;
+
+ btVector3 firstVertex=pVtxIn[pVtxIn.size()-1];
+ btVector3 endVertex = pVtxIn[0];
+
+ ds = planeNormalWS.dot(firstVertex)+planeEqWS;
+
+ for (ve = 0; ve < numVerts; ve++)
+ {
+ endVertex=pVtxIn[ve];
+
+ de = planeNormalWS.dot(endVertex)+planeEqWS;
+
+ if (ds<0)
+ {
+ if (de<0)
+ {
+ // Start < 0, end < 0, so output endVertex
+ ppVtxOut.push_back(endVertex);
+ }
+ else
+ {
+ // Start < 0, end >= 0, so output intersection
+ ppVtxOut.push_back( firstVertex.lerp(endVertex,btScalar(ds * 1.f/(ds - de))));
+ }
+ }
+ else
+ {
+ if (de<0)
+ {
+ // Start >= 0, end < 0 so output intersection and end
+ ppVtxOut.push_back(firstVertex.lerp(endVertex,btScalar(ds * 1.f/(ds - de))));
+ ppVtxOut.push_back(endVertex);
+ }
+ }
+ firstVertex = endVertex;
+ ds = de;
+ }
+}
+#include <stdio.h>
+
+
+static bool TestSepAxis(const btConvexPolyhedron& hullA, const btConvexPolyhedron& hullB, const btTransform& transA,const btTransform& transB, const btVector3& sep_axis, float& depth)
+{
+ float Min0,Max0;
+ float Min1,Max1;
+ hullA.project(transA,sep_axis, Min0, Max0);
+ hullB.project(transB, sep_axis, Min1, Max1);
+
+ if(Max0<Min1 || Max1<Min0)
+ return false;
+
+ float d0 = Max0 - Min1;
+ assert(d0>=0.0f);
+ float d1 = Max1 - Min0;
+ assert(d1>=0.0f);
+ depth = d0<d1 ? d0:d1;
+ return true;
+}
+
+
+
+static int gActualSATPairTests=0;
+
+inline bool IsAlmostZero(const btVector3& v)
+{
+ if(fabsf(v.x())>1e-6 || fabsf(v.y())>1e-6 || fabsf(v.z())>1e-6) return false;
+ return true;
+}
+
+
+bool btPolyhedralContactClipping::findSeparatingAxis( const btConvexPolyhedron& hullA, const btConvexPolyhedron& hullB, const btTransform& transA,const btTransform& transB, btVector3& sep)
+{
+ gActualSATPairTests++;
+
+#ifdef TEST_INTERNAL_OBJECTS
+ const btVector3 c0 = transA * hullA.mLocalCenter;
+ const btVector3 c1 = transB * hullB.mLocalCenter;
+ const btVector3 DeltaC2 = c0 - c1;
+#endif
+
+ float dmin = FLT_MAX;
+ int curPlaneTests=0;
+
+ int numFacesA = hullA.m_faces.size();
+ // Test normals from hullA
+ for(int i=0;i<numFacesA;i++)
+ {
+ const btVector3 Normal(hullA.m_faces[i].m_plane[0], hullA.m_faces[i].m_plane[1], hullA.m_faces[i].m_plane[2]);
+ const btVector3 faceANormalWS = transA.getBasis() * Normal;
+
+ curPlaneTests++;
+#ifdef TEST_INTERNAL_OBJECTS
+ gExpectedNbTests++;
+ if(gUseInternalObject && !TestInternalObjects(transA,transB,DeltaC2, faceANormalWS, hullA, hullB, dmin))
+ continue;
+ gActualNbTests++;
+#endif
+
+ float d;
+ if(!TestSepAxis( hullA, hullB, transA,transB, faceANormalWS, d))
+ return false;
+
+ if(d<dmin)
+ {
+ dmin = d;
+ sep = faceANormalWS;
+ }
+ }
+
+ int numFacesB = hullB.m_faces.size();
+ // Test normals from hullB
+ for(int i=0;i<numFacesB;i++)
+ {
+ const btVector3 Normal(hullB.m_faces[i].m_plane[0], hullB.m_faces[i].m_plane[1], hullB.m_faces[i].m_plane[2]);
+ const btVector3 WorldNormal = transB.getBasis() * Normal;
+
+ curPlaneTests++;
+#ifdef TEST_INTERNAL_OBJECTS
+ gExpectedNbTests++;
+ if(gUseInternalObject && !TestInternalObjects(transA,transB,DeltaC2, WorldNormal, hullA, hullB, dmin))
+ continue;
+ gActualNbTests++;
+#endif
+
+ float d;
+ if(!TestSepAxis(hullA, hullB,transA,transB, WorldNormal,d))
+ return false;
+
+ if(d<dmin)
+ {
+ dmin = d;
+ sep = WorldNormal;
+ }
+ }
+
+ btVector3 edgeAstart,edgeAend,edgeBstart,edgeBend;
+
+ int curEdgeEdge = 0;
+ // Test edges
+ for(int e0=0;e0<hullA.m_uniqueEdges.size();e0++)
+ {
+ const btVector3 edge0 = hullA.m_uniqueEdges[e0];
+ const btVector3 WorldEdge0 = transA.getBasis() * edge0;
+ for(int e1=0;e1<hullB.m_uniqueEdges.size();e1++)
+ {
+ const btVector3 edge1 = hullB.m_uniqueEdges[e1];
+ const btVector3 WorldEdge1 = transB.getBasis() * edge1;
+
+ btVector3 Cross = WorldEdge0.cross(WorldEdge1);
+ curEdgeEdge++;
+ if(!IsAlmostZero(Cross))
+ {
+ Cross = Cross.normalize();
+
+#ifdef TEST_INTERNAL_OBJECTS
+ gExpectedNbTests++;
+ if(gUseInternalObject && !TestInternalObjects(transA,transB,DeltaC2, Cross, hullA, hullB, dmin))
+ continue;
+ gActualNbTests++;
+#endif
+
+ float dist;
+ if(!TestSepAxis( hullA, hullB, transA,transB, Cross, dist))
+ return false;
+
+ if(dist<dmin)
+ {
+ dmin = dist;
+ sep = Cross;
+ }
+ }
+ }
+
+ }
+
+ const btVector3 deltaC = transB.getOrigin() - transA.getOrigin();
+ if((deltaC.dot(sep))>0.0f)
+ sep = -sep;
+
+ return true;
+}
+
+void btPolyhedralContactClipping::clipFaceAgainstHull(const btVector3& separatingNormal, const btConvexPolyhedron& hullA, const btTransform& transA, btVertexArray& worldVertsB1, const btScalar minDist, btScalar maxDist,btDiscreteCollisionDetectorInterface::Result& resultOut)
+{
+ btVertexArray worldVertsB2;
+ btVertexArray* pVtxIn = &worldVertsB1;
+ btVertexArray* pVtxOut = &worldVertsB2;
+ pVtxOut->reserve(pVtxIn->size());
+
+ int closestFaceA=-1;
+ {
+ btScalar dmin = FLT_MAX;
+ for(int face=0;face<hullA.m_faces.size();face++)
+ {
+ const btVector3 Normal(hullA.m_faces[face].m_plane[0], hullA.m_faces[face].m_plane[1], hullA.m_faces[face].m_plane[2]);
+ const btVector3 faceANormalWS = transA.getBasis() * Normal;
+
+ btScalar d = faceANormalWS.dot(separatingNormal);
+ if (d < dmin)
+ {
+ dmin = d;
+ closestFaceA = face;
+ }
+ }
+ }
+ if (closestFaceA<0)
+ return;
+
+ const btFace& polyA = hullA.m_faces[closestFaceA];
+
+ // clip polygon to back of planes of all faces of hull A that are adjacent to witness face
+ int numContacts = pVtxIn->size();
+ int numVerticesA = polyA.m_indices.size();
+ for(int e0=0;e0<numVerticesA;e0++)
+ {
+ /*const btVector3& a = hullA.m_vertices[polyA.m_indices[e0]];
+ const btVector3& b = hullA.m_vertices[polyA.m_indices[(e0+1)%numVerticesA]];
+ const btVector3 edge0 = a - b;
+ const btVector3 WorldEdge0 = transA.getBasis() * edge0;
+ */
+
+ int otherFace = polyA.m_connectedFaces[e0];
+ btVector3 localPlaneNormal (hullA.m_faces[otherFace].m_plane[0],hullA.m_faces[otherFace].m_plane[1],hullA.m_faces[otherFace].m_plane[2]);
+ btScalar localPlaneEq = hullA.m_faces[otherFace].m_plane[3];
+
+ btVector3 planeNormalWS = transA.getBasis()*localPlaneNormal;
+ btScalar planeEqWS=localPlaneEq-planeNormalWS.dot(transA.getOrigin());
+ //clip face
+
+ clipFace(*pVtxIn, *pVtxOut,planeNormalWS,planeEqWS);
+ btSwap(pVtxIn,pVtxOut);
+ pVtxOut->resize(0);
+ }
+
+
+
+//#define ONLY_REPORT_DEEPEST_POINT
+
+ btVector3 point;
+
+
+ // only keep points that are behind the witness face
+ {
+ btVector3 localPlaneNormal (polyA.m_plane[0],polyA.m_plane[1],polyA.m_plane[2]);
+ btScalar localPlaneEq = polyA.m_plane[3];
+ btVector3 planeNormalWS = transA.getBasis()*localPlaneNormal;
+ btScalar planeEqWS=localPlaneEq-planeNormalWS.dot(transA.getOrigin());
+ for (int i=0;i<pVtxIn->size();i++)
+ {
+
+ btScalar depth = planeNormalWS.dot(pVtxIn->at(i))+planeEqWS;
+ if (depth <=maxDist && depth >=minDist)
+ {
+ btVector3 point = pVtxIn->at(i);
+#ifdef ONLY_REPORT_DEEPEST_POINT
+ curMaxDist = depth;
+#else
+#if 0
+ if (depth<-3)
+ {
+ printf("error in btPolyhedralContactClipping depth = %f\n", depth);
+ printf("likely wrong separatingNormal passed in\n");
+ }
+#endif
+ resultOut.addContactPoint(separatingNormal,point,depth);
+#endif
+ }
+ }
+ }
+#ifdef ONLY_REPORT_DEEPEST_POINT
+ if (curMaxDist<maxDist)
+ {
+ resultOut.addContactPoint(separatingNormal,point,curMaxDist);
+ }
+#endif //ONLY_REPORT_DEEPEST_POINT
+
+}
+
+void btPolyhedralContactClipping::clipHullAgainstHull(const btVector3& separatingNormal, const btConvexPolyhedron& hullA, const btConvexPolyhedron& hullB, const btTransform& transA,const btTransform& transB, const btScalar minDist, btScalar maxDist,btDiscreteCollisionDetectorInterface::Result& resultOut)
+{
+
+ btScalar curMaxDist=maxDist;
+ int closestFaceB=-1;
+
+ {
+ btScalar dmax = -FLT_MAX;
+ for(int face=0;face<hullB.m_faces.size();face++)
+ {
+ const btVector3 Normal(hullB.m_faces[face].m_plane[0], hullB.m_faces[face].m_plane[1], hullB.m_faces[face].m_plane[2]);
+ const btVector3 WorldNormal = transB.getBasis() * Normal;
+
+ btScalar d = WorldNormal.dot(separatingNormal);
+ if (d > dmax)
+ {
+ dmax = d;
+ closestFaceB = face;
+ }
+ }
+ }
+
+
+
+ if (closestFaceB<0)
+ {
+ return;
+ }
+
+
+
+ // setup initial clip face (minimizing face from hull B)
+ btVertexArray worldVertsB1;
+ {
+ const btFace& polyB = hullB.m_faces[closestFaceB];
+ const int numVertices = polyB.m_indices.size();
+ for(int e0=0;e0<numVertices;e0++)
+ {
+ const btVector3& b = hullB.m_vertices[polyB.m_indices[e0]];
+ worldVertsB1.push_back(transB*b);
+ }
+ }
+
+ clipFaceAgainstHull(separatingNormal, hullA, transA,worldVertsB1, minDist, maxDist,resultOut);
+
+} \ No newline at end of file
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h
new file mode 100644
index 00000000..7ab9c1e0
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.h
@@ -0,0 +1,46 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2011 Advanced Micro Devices, Inc. http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+///This file was written by Erwin Coumans
+
+
+#ifndef BT_POLYHEDRAL_CONTACT_CLIPPING_H
+#define BT_POLYHEDRAL_CONTACT_CLIPPING_H
+
+
+#include "LinearMath/btAlignedObjectArray.h"
+#include "LinearMath/btTransform.h"
+#include "btDiscreteCollisionDetectorInterface.h"
+
+class btConvexPolyhedron;
+
+typedef btAlignedObjectArray<btVector3> btVertexArray;
+
+// Clips a face to the back of a plane
+struct btPolyhedralContactClipping
+{
+ static void clipHullAgainstHull(const btVector3& separatingNormal, const btConvexPolyhedron& hullA, const btConvexPolyhedron& hullB, const btTransform& transA,const btTransform& transB, const btScalar minDist, btScalar maxDist, btDiscreteCollisionDetectorInterface::Result& resultOut);
+ static void clipFaceAgainstHull(const btVector3& separatingNormal, const btConvexPolyhedron& hullA, const btTransform& transA, btVertexArray& worldVertsB1, const btScalar minDist, btScalar maxDist,btDiscreteCollisionDetectorInterface::Result& resultOut);
+
+ static bool findSeparatingAxis( const btConvexPolyhedron& hullA, const btConvexPolyhedron& hullB, const btTransform& transA,const btTransform& transB, btVector3& sep);
+
+ ///the clipFace method is used internally
+ static void clipFace(const btVertexArray& pVtxIn, btVertexArray& ppVtxOut, const btVector3& planeNormalWS,btScalar planeEqWS);
+
+};
+
+#endif // BT_POLYHEDRAL_CONTACT_CLIPPING_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
new file mode 100644
index 00000000..fbe579ce
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
@@ -0,0 +1,177 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//#include <stdio.h>
+
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
+#include "btRaycastCallback.h"
+
+btTriangleRaycastCallback::btTriangleRaycastCallback(const btVector3& from,const btVector3& to, unsigned int flags)
+ :
+ m_from(from),
+ m_to(to),
+ //@BP Mod
+ m_flags(flags),
+ m_hitFraction(btScalar(1.))
+{
+
+}
+
+
+
+void btTriangleRaycastCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex)
+{
+ const btVector3 &vert0=triangle[0];
+ const btVector3 &vert1=triangle[1];
+ const btVector3 &vert2=triangle[2];
+
+ btVector3 v10; v10 = vert1 - vert0 ;
+ btVector3 v20; v20 = vert2 - vert0 ;
+
+ btVector3 triangleNormal; triangleNormal = v10.cross( v20 );
+
+ const btScalar dist = vert0.dot(triangleNormal);
+ btScalar dist_a = triangleNormal.dot(m_from) ;
+ dist_a-= dist;
+ btScalar dist_b = triangleNormal.dot(m_to);
+ dist_b -= dist;
+
+ if ( dist_a * dist_b >= btScalar(0.0) )
+ {
+ return ; // same sign
+ }
+ //@BP Mod - Backface filtering
+ if (((m_flags & kF_FilterBackfaces) != 0) && (dist_a > btScalar(0.0)))
+ {
+ // Backface, skip check
+ return;
+ }
+
+ const btScalar proj_length=dist_a-dist_b;
+ const btScalar distance = (dist_a)/(proj_length);
+ // Now we have the intersection point on the plane, we'll see if it's inside the triangle
+ // Add an epsilon as a tolerance for the raycast,
+ // in case the ray hits exacly on the edge of the triangle.
+ // It must be scaled for the triangle size.
+
+ if(distance < m_hitFraction)
+ {
+
+
+ btScalar edge_tolerance =triangleNormal.length2();
+ edge_tolerance *= btScalar(-0.0001);
+ btVector3 point; point.setInterpolate3( m_from, m_to, distance);
+ {
+ btVector3 v0p; v0p = vert0 - point;
+ btVector3 v1p; v1p = vert1 - point;
+ btVector3 cp0; cp0 = v0p.cross( v1p );
+
+ if ( (btScalar)(cp0.dot(triangleNormal)) >=edge_tolerance)
+ {
+
+
+ btVector3 v2p; v2p = vert2 - point;
+ btVector3 cp1;
+ cp1 = v1p.cross( v2p);
+ if ( (btScalar)(cp1.dot(triangleNormal)) >=edge_tolerance)
+ {
+ btVector3 cp2;
+ cp2 = v2p.cross(v0p);
+
+ if ( (btScalar)(cp2.dot(triangleNormal)) >=edge_tolerance)
+ {
+ //@BP Mod
+ // Triangle normal isn't normalized
+ triangleNormal.normalize();
+
+ //@BP Mod - Allow for unflipped normal when raycasting against backfaces
+ if (((m_flags & kF_KeepUnflippedNormal) != 0) || (dist_a <= btScalar(0.0)))
+ {
+ m_hitFraction = reportHit(-triangleNormal,distance,partId,triangleIndex);
+ }
+ else
+ {
+ m_hitFraction = reportHit(triangleNormal,distance,partId,triangleIndex);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
+
+btTriangleConvexcastCallback::btTriangleConvexcastCallback (const btConvexShape* convexShape, const btTransform& convexShapeFrom, const btTransform& convexShapeTo, const btTransform& triangleToWorld, const btScalar triangleCollisionMargin)
+{
+ m_convexShape = convexShape;
+ m_convexShapeFrom = convexShapeFrom;
+ m_convexShapeTo = convexShapeTo;
+ m_triangleToWorld = triangleToWorld;
+ m_hitFraction = 1.0f;
+ m_triangleCollisionMargin = triangleCollisionMargin;
+ m_allowedPenetration = 0.f;
+}
+
+void
+btTriangleConvexcastCallback::processTriangle (btVector3* triangle, int partId, int triangleIndex)
+{
+ btTriangleShape triangleShape (triangle[0], triangle[1], triangle[2]);
+ triangleShape.setMargin(m_triangleCollisionMargin);
+
+ btVoronoiSimplexSolver simplexSolver;
+ btGjkEpaPenetrationDepthSolver gjkEpaPenetrationSolver;
+
+//#define USE_SUBSIMPLEX_CONVEX_CAST 1
+//if you reenable USE_SUBSIMPLEX_CONVEX_CAST see commented out code below
+#ifdef USE_SUBSIMPLEX_CONVEX_CAST
+ btSubsimplexConvexCast convexCaster(m_convexShape, &triangleShape, &simplexSolver);
+#else
+ //btGjkConvexCast convexCaster(m_convexShape,&triangleShape,&simplexSolver);
+ btContinuousConvexCollision convexCaster(m_convexShape,&triangleShape,&simplexSolver,&gjkEpaPenetrationSolver);
+#endif //#USE_SUBSIMPLEX_CONVEX_CAST
+
+ btConvexCast::CastResult castResult;
+ castResult.m_fraction = btScalar(1.);
+ castResult.m_allowedPenetration = m_allowedPenetration;
+ if (convexCaster.calcTimeOfImpact(m_convexShapeFrom,m_convexShapeTo,m_triangleToWorld, m_triangleToWorld, castResult))
+ {
+ //add hit
+ if (castResult.m_normal.length2() > btScalar(0.0001))
+ {
+ if (castResult.m_fraction < m_hitFraction)
+ {
+/* btContinuousConvexCast's normal is already in world space */
+/*
+#ifdef USE_SUBSIMPLEX_CONVEX_CAST
+ //rotate normal into worldspace
+ castResult.m_normal = m_convexShapeFrom.getBasis() * castResult.m_normal;
+#endif //USE_SUBSIMPLEX_CONVEX_CAST
+*/
+ castResult.m_normal.normalize();
+
+ reportHit (castResult.m_normal,
+ castResult.m_hitPoint,
+ castResult.m_fraction,
+ partId,
+ triangleIndex);
+ }
+ }
+ }
+}
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
new file mode 100644
index 00000000..f012889a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.h
@@ -0,0 +1,72 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_RAYCAST_TRI_CALLBACK_H
+#define BT_RAYCAST_TRI_CALLBACK_H
+
+#include "BulletCollision/CollisionShapes/btTriangleCallback.h"
+#include "LinearMath/btTransform.h"
+struct btBroadphaseProxy;
+class btConvexShape;
+
+class btTriangleRaycastCallback: public btTriangleCallback
+{
+public:
+
+ //input
+ btVector3 m_from;
+ btVector3 m_to;
+
+ //@BP Mod - allow backface filtering and unflipped normals
+ enum EFlags
+ {
+ kF_None = 0,
+ kF_FilterBackfaces = 1 << 0,
+ kF_KeepUnflippedNormal = 1 << 1, // Prevents returned face normal getting flipped when a ray hits a back-facing triangle
+
+ kF_Terminator = 0xFFFFFFFF
+ };
+ unsigned int m_flags;
+
+ btScalar m_hitFraction;
+
+ btTriangleRaycastCallback(const btVector3& from,const btVector3& to, unsigned int flags=0);
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex);
+
+ virtual btScalar reportHit(const btVector3& hitNormalLocal, btScalar hitFraction, int partId, int triangleIndex ) = 0;
+
+};
+
+class btTriangleConvexcastCallback : public btTriangleCallback
+{
+public:
+ const btConvexShape* m_convexShape;
+ btTransform m_convexShapeFrom;
+ btTransform m_convexShapeTo;
+ btTransform m_triangleToWorld;
+ btScalar m_hitFraction;
+ btScalar m_triangleCollisionMargin;
+ btScalar m_allowedPenetration;
+
+ btTriangleConvexcastCallback (const btConvexShape* convexShape, const btTransform& convexShapeFrom, const btTransform& convexShapeTo, const btTransform& triangleToWorld, const btScalar triangleCollisionMargin);
+
+ virtual void processTriangle (btVector3* triangle, int partId, int triangleIndex);
+
+ virtual btScalar reportHit (const btVector3& hitNormalLocal, const btVector3& hitPointLocal, btScalar hitFraction, int partId, int triangleIndex) = 0;
+};
+
+#endif //BT_RAYCAST_TRI_CALLBACK_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h
new file mode 100644
index 00000000..da8a1391
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h
@@ -0,0 +1,63 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_SIMPLEX_SOLVER_INTERFACE_H
+#define BT_SIMPLEX_SOLVER_INTERFACE_H
+
+#include "LinearMath/btVector3.h"
+
+#define NO_VIRTUAL_INTERFACE 1
+#ifdef NO_VIRTUAL_INTERFACE
+#include "btVoronoiSimplexSolver.h"
+#define btSimplexSolverInterface btVoronoiSimplexSolver
+#else
+
+/// btSimplexSolverInterface can incrementally calculate distance between origin and up to 4 vertices
+/// Used by GJK or Linear Casting. Can be implemented by the Johnson-algorithm or alternative approaches based on
+/// voronoi regions or barycentric coordinates
+class btSimplexSolverInterface
+{
+ public:
+ virtual ~btSimplexSolverInterface() {};
+
+ virtual void reset() = 0;
+
+ virtual void addVertex(const btVector3& w, const btVector3& p, const btVector3& q) = 0;
+
+ virtual bool closest(btVector3& v) = 0;
+
+ virtual btScalar maxVertex() = 0;
+
+ virtual bool fullSimplex() const = 0;
+
+ virtual int getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const = 0;
+
+ virtual bool inSimplex(const btVector3& w) = 0;
+
+ virtual void backup_closest(btVector3& v) = 0;
+
+ virtual bool emptySimplex() const = 0;
+
+ virtual void compute_points(btVector3& p1, btVector3& p2) = 0;
+
+ virtual int numVertices() const =0;
+
+
+};
+#endif
+#endif //BT_SIMPLEX_SOLVER_INTERFACE_H
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp
new file mode 100644
index 00000000..18eb662d
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp
@@ -0,0 +1,160 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btSubSimplexConvexCast.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+
+#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
+#include "btPointCollector.h"
+#include "LinearMath/btTransformUtil.h"
+
+btSubsimplexConvexCast::btSubsimplexConvexCast (const btConvexShape* convexA,const btConvexShape* convexB,btSimplexSolverInterface* simplexSolver)
+:m_simplexSolver(simplexSolver),
+m_convexA(convexA),m_convexB(convexB)
+{
+}
+
+///Typically the conservative advancement reaches solution in a few iterations, clip it to 32 for degenerate cases.
+///See discussion about this here http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=565
+#ifdef BT_USE_DOUBLE_PRECISION
+#define MAX_ITERATIONS 64
+#else
+#define MAX_ITERATIONS 32
+#endif
+bool btSubsimplexConvexCast::calcTimeOfImpact(
+ const btTransform& fromA,
+ const btTransform& toA,
+ const btTransform& fromB,
+ const btTransform& toB,
+ CastResult& result)
+{
+
+ m_simplexSolver->reset();
+
+ btVector3 linVelA,linVelB;
+ linVelA = toA.getOrigin()-fromA.getOrigin();
+ linVelB = toB.getOrigin()-fromB.getOrigin();
+
+ btScalar lambda = btScalar(0.);
+
+ btTransform interpolatedTransA = fromA;
+ btTransform interpolatedTransB = fromB;
+
+ ///take relative motion
+ btVector3 r = (linVelA-linVelB);
+ btVector3 v;
+
+ btVector3 supVertexA = fromA(m_convexA->localGetSupportingVertex(-r*fromA.getBasis()));
+ btVector3 supVertexB = fromB(m_convexB->localGetSupportingVertex(r*fromB.getBasis()));
+ v = supVertexA-supVertexB;
+ int maxIter = MAX_ITERATIONS;
+
+ btVector3 n;
+ n.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ bool hasResult = false;
+ btVector3 c;
+
+ btScalar lastLambda = lambda;
+
+
+ btScalar dist2 = v.length2();
+#ifdef BT_USE_DOUBLE_PRECISION
+ btScalar epsilon = btScalar(0.0001);
+#else
+ btScalar epsilon = btScalar(0.0001);
+#endif //BT_USE_DOUBLE_PRECISION
+ btVector3 w,p;
+ btScalar VdotR;
+
+ while ( (dist2 > epsilon) && maxIter--)
+ {
+ supVertexA = interpolatedTransA(m_convexA->localGetSupportingVertex(-v*interpolatedTransA.getBasis()));
+ supVertexB = interpolatedTransB(m_convexB->localGetSupportingVertex(v*interpolatedTransB.getBasis()));
+ w = supVertexA-supVertexB;
+
+ btScalar VdotW = v.dot(w);
+
+ if (lambda > btScalar(1.0))
+ {
+ return false;
+ }
+
+ if ( VdotW > btScalar(0.))
+ {
+ VdotR = v.dot(r);
+
+ if (VdotR >= -(SIMD_EPSILON*SIMD_EPSILON))
+ return false;
+ else
+ {
+ lambda = lambda - VdotW / VdotR;
+ //interpolate to next lambda
+ // x = s + lambda * r;
+ interpolatedTransA.getOrigin().setInterpolate3(fromA.getOrigin(),toA.getOrigin(),lambda);
+ interpolatedTransB.getOrigin().setInterpolate3(fromB.getOrigin(),toB.getOrigin(),lambda);
+ //m_simplexSolver->reset();
+ //check next line
+ w = supVertexA-supVertexB;
+ lastLambda = lambda;
+ n = v;
+ hasResult = true;
+ }
+ }
+ ///Just like regular GJK only add the vertex if it isn't already (close) to current vertex, it would lead to divisions by zero and NaN etc.
+ if (!m_simplexSolver->inSimplex(w))
+ m_simplexSolver->addVertex( w, supVertexA , supVertexB);
+
+ if (m_simplexSolver->closest(v))
+ {
+ dist2 = v.length2();
+ hasResult = true;
+ //todo: check this normal for validity
+ //n=v;
+ //printf("V=%f , %f, %f\n",v[0],v[1],v[2]);
+ //printf("DIST2=%f\n",dist2);
+ //printf("numverts = %i\n",m_simplexSolver->numVertices());
+ } else
+ {
+ dist2 = btScalar(0.);
+ }
+ }
+
+ //int numiter = MAX_ITERATIONS - maxIter;
+// printf("number of iterations: %d", numiter);
+
+ //don't report a time of impact when moving 'away' from the hitnormal
+
+
+ result.m_fraction = lambda;
+ if (n.length2() >= (SIMD_EPSILON*SIMD_EPSILON))
+ result.m_normal = n.normalized();
+ else
+ result.m_normal = btVector3(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+
+ //don't report time of impact for motion away from the contact normal (or causes minor penetration)
+ if (result.m_normal.dot(r)>=-result.m_allowedPenetration)
+ return false;
+
+ btVector3 hitA,hitB;
+ m_simplexSolver->compute_points(hitA,hitB);
+ result.m_hitPoint=hitB;
+ return true;
+}
+
+
+
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h
new file mode 100644
index 00000000..6c812798
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h
@@ -0,0 +1,50 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_SUBSIMPLEX_CONVEX_CAST_H
+#define BT_SUBSIMPLEX_CONVEX_CAST_H
+
+#include "btConvexCast.h"
+#include "btSimplexSolverInterface.h"
+class btConvexShape;
+
+/// btSubsimplexConvexCast implements Gino van den Bergens' paper
+///"Ray Casting against bteral Convex Objects with Application to Continuous Collision Detection"
+/// GJK based Ray Cast, optimized version
+/// Objects should not start in overlap, otherwise results are not defined.
+class btSubsimplexConvexCast : public btConvexCast
+{
+ btSimplexSolverInterface* m_simplexSolver;
+ const btConvexShape* m_convexA;
+ const btConvexShape* m_convexB;
+
+public:
+
+ btSubsimplexConvexCast (const btConvexShape* shapeA,const btConvexShape* shapeB,btSimplexSolverInterface* simplexSolver);
+
+ //virtual ~btSubsimplexConvexCast();
+ ///SimsimplexConvexCast calculateTimeOfImpact calculates the time of impact+normal for the linear cast (sweep) between two moving objects.
+ ///Precondition is that objects should not penetration/overlap at the start from the interval. Overlap can be tested using btGjkPairDetector.
+ virtual bool calcTimeOfImpact(
+ const btTransform& fromA,
+ const btTransform& toA,
+ const btTransform& fromB,
+ const btTransform& toB,
+ CastResult& result);
+
+};
+
+#endif //BT_SUBSIMPLEX_CONVEX_CAST_H
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
new file mode 100644
index 00000000..a775198a
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
@@ -0,0 +1,609 @@
+
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+ Elsevier CDROM license agreements grants nonexclusive license to use the software
+ for any purpose, commercial or non-commercial as long as the following credit is included
+ identifying the original source of the software:
+
+ Parts of the source are "from the book Real-Time Collision Detection by
+ Christer Ericson, published by Morgan Kaufmann Publishers,
+ (c) 2005 Elsevier Inc."
+
+*/
+
+
+#include "btVoronoiSimplexSolver.h"
+
+#define VERTA 0
+#define VERTB 1
+#define VERTC 2
+#define VERTD 3
+
+#define CATCH_DEGENERATE_TETRAHEDRON 1
+void btVoronoiSimplexSolver::removeVertex(int index)
+{
+
+ btAssert(m_numVertices>0);
+ m_numVertices--;
+ m_simplexVectorW[index] = m_simplexVectorW[m_numVertices];
+ m_simplexPointsP[index] = m_simplexPointsP[m_numVertices];
+ m_simplexPointsQ[index] = m_simplexPointsQ[m_numVertices];
+}
+
+void btVoronoiSimplexSolver::reduceVertices (const btUsageBitfield& usedVerts)
+{
+ if ((numVertices() >= 4) && (!usedVerts.usedVertexD))
+ removeVertex(3);
+
+ if ((numVertices() >= 3) && (!usedVerts.usedVertexC))
+ removeVertex(2);
+
+ if ((numVertices() >= 2) && (!usedVerts.usedVertexB))
+ removeVertex(1);
+
+ if ((numVertices() >= 1) && (!usedVerts.usedVertexA))
+ removeVertex(0);
+
+}
+
+
+
+
+
+//clear the simplex, remove all the vertices
+void btVoronoiSimplexSolver::reset()
+{
+ m_cachedValidClosest = false;
+ m_numVertices = 0;
+ m_needsUpdate = true;
+ m_lastW = btVector3(btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT),btScalar(BT_LARGE_FLOAT));
+ m_cachedBC.reset();
+}
+
+
+
+ //add a vertex
+void btVoronoiSimplexSolver::addVertex(const btVector3& w, const btVector3& p, const btVector3& q)
+{
+ m_lastW = w;
+ m_needsUpdate = true;
+
+ m_simplexVectorW[m_numVertices] = w;
+ m_simplexPointsP[m_numVertices] = p;
+ m_simplexPointsQ[m_numVertices] = q;
+
+ m_numVertices++;
+}
+
+bool btVoronoiSimplexSolver::updateClosestVectorAndPoints()
+{
+
+ if (m_needsUpdate)
+ {
+ m_cachedBC.reset();
+
+ m_needsUpdate = false;
+
+ switch (numVertices())
+ {
+ case 0:
+ m_cachedValidClosest = false;
+ break;
+ case 1:
+ {
+ m_cachedP1 = m_simplexPointsP[0];
+ m_cachedP2 = m_simplexPointsQ[0];
+ m_cachedV = m_cachedP1-m_cachedP2; //== m_simplexVectorW[0]
+ m_cachedBC.reset();
+ m_cachedBC.setBarycentricCoordinates(btScalar(1.),btScalar(0.),btScalar(0.),btScalar(0.));
+ m_cachedValidClosest = m_cachedBC.isValid();
+ break;
+ };
+ case 2:
+ {
+ //closest point origin from line segment
+ const btVector3& from = m_simplexVectorW[0];
+ const btVector3& to = m_simplexVectorW[1];
+ btVector3 nearest;
+
+ btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.));
+ btVector3 diff = p - from;
+ btVector3 v = to - from;
+ btScalar t = v.dot(diff);
+
+ if (t > 0) {
+ btScalar dotVV = v.dot(v);
+ if (t < dotVV) {
+ t /= dotVV;
+ diff -= t*v;
+ m_cachedBC.m_usedVertices.usedVertexA = true;
+ m_cachedBC.m_usedVertices.usedVertexB = true;
+ } else {
+ t = 1;
+ diff -= v;
+ //reduce to 1 point
+ m_cachedBC.m_usedVertices.usedVertexB = true;
+ }
+ } else
+ {
+ t = 0;
+ //reduce to 1 point
+ m_cachedBC.m_usedVertices.usedVertexA = true;
+ }
+ m_cachedBC.setBarycentricCoordinates(1-t,t);
+ nearest = from + t*v;
+
+ m_cachedP1 = m_simplexPointsP[0] + t * (m_simplexPointsP[1] - m_simplexPointsP[0]);
+ m_cachedP2 = m_simplexPointsQ[0] + t * (m_simplexPointsQ[1] - m_simplexPointsQ[0]);
+ m_cachedV = m_cachedP1 - m_cachedP2;
+
+ reduceVertices(m_cachedBC.m_usedVertices);
+
+ m_cachedValidClosest = m_cachedBC.isValid();
+ break;
+ }
+ case 3:
+ {
+ //closest point origin from triangle
+ btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.));
+
+ const btVector3& a = m_simplexVectorW[0];
+ const btVector3& b = m_simplexVectorW[1];
+ const btVector3& c = m_simplexVectorW[2];
+
+ closestPtPointTriangle(p,a,b,c,m_cachedBC);
+ m_cachedP1 = m_simplexPointsP[0] * m_cachedBC.m_barycentricCoords[0] +
+ m_simplexPointsP[1] * m_cachedBC.m_barycentricCoords[1] +
+ m_simplexPointsP[2] * m_cachedBC.m_barycentricCoords[2];
+
+ m_cachedP2 = m_simplexPointsQ[0] * m_cachedBC.m_barycentricCoords[0] +
+ m_simplexPointsQ[1] * m_cachedBC.m_barycentricCoords[1] +
+ m_simplexPointsQ[2] * m_cachedBC.m_barycentricCoords[2];
+
+ m_cachedV = m_cachedP1-m_cachedP2;
+
+ reduceVertices (m_cachedBC.m_usedVertices);
+ m_cachedValidClosest = m_cachedBC.isValid();
+
+ break;
+ }
+ case 4:
+ {
+
+
+ btVector3 p (btScalar(0.),btScalar(0.),btScalar(0.));
+
+ const btVector3& a = m_simplexVectorW[0];
+ const btVector3& b = m_simplexVectorW[1];
+ const btVector3& c = m_simplexVectorW[2];
+ const btVector3& d = m_simplexVectorW[3];
+
+ bool hasSeperation = closestPtPointTetrahedron(p,a,b,c,d,m_cachedBC);
+
+ if (hasSeperation)
+ {
+
+ m_cachedP1 = m_simplexPointsP[0] * m_cachedBC.m_barycentricCoords[0] +
+ m_simplexPointsP[1] * m_cachedBC.m_barycentricCoords[1] +
+ m_simplexPointsP[2] * m_cachedBC.m_barycentricCoords[2] +
+ m_simplexPointsP[3] * m_cachedBC.m_barycentricCoords[3];
+
+ m_cachedP2 = m_simplexPointsQ[0] * m_cachedBC.m_barycentricCoords[0] +
+ m_simplexPointsQ[1] * m_cachedBC.m_barycentricCoords[1] +
+ m_simplexPointsQ[2] * m_cachedBC.m_barycentricCoords[2] +
+ m_simplexPointsQ[3] * m_cachedBC.m_barycentricCoords[3];
+
+ m_cachedV = m_cachedP1-m_cachedP2;
+ reduceVertices (m_cachedBC.m_usedVertices);
+ } else
+ {
+// printf("sub distance got penetration\n");
+
+ if (m_cachedBC.m_degenerate)
+ {
+ m_cachedValidClosest = false;
+ } else
+ {
+ m_cachedValidClosest = true;
+ //degenerate case == false, penetration = true + zero
+ m_cachedV.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ }
+ break;
+ }
+
+ m_cachedValidClosest = m_cachedBC.isValid();
+
+ //closest point origin from tetrahedron
+ break;
+ }
+ default:
+ {
+ m_cachedValidClosest = false;
+ }
+ };
+ }
+
+ return m_cachedValidClosest;
+
+}
+
+//return/calculate the closest vertex
+bool btVoronoiSimplexSolver::closest(btVector3& v)
+{
+ bool succes = updateClosestVectorAndPoints();
+ v = m_cachedV;
+ return succes;
+}
+
+
+
+btScalar btVoronoiSimplexSolver::maxVertex()
+{
+ int i, numverts = numVertices();
+ btScalar maxV = btScalar(0.);
+ for (i=0;i<numverts;i++)
+ {
+ btScalar curLen2 = m_simplexVectorW[i].length2();
+ if (maxV < curLen2)
+ maxV = curLen2;
+ }
+ return maxV;
+}
+
+
+
+ //return the current simplex
+int btVoronoiSimplexSolver::getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const
+{
+ int i;
+ for (i=0;i<numVertices();i++)
+ {
+ yBuf[i] = m_simplexVectorW[i];
+ pBuf[i] = m_simplexPointsP[i];
+ qBuf[i] = m_simplexPointsQ[i];
+ }
+ return numVertices();
+}
+
+
+
+
+bool btVoronoiSimplexSolver::inSimplex(const btVector3& w)
+{
+ bool found = false;
+ int i, numverts = numVertices();
+ //btScalar maxV = btScalar(0.);
+
+ //w is in the current (reduced) simplex
+ for (i=0;i<numverts;i++)
+ {
+#ifdef BT_USE_EQUAL_VERTEX_THRESHOLD
+ if ( m_simplexVectorW[i].distance2(w) <= m_equalVertexThreshold)
+#else
+ if (m_simplexVectorW[i] == w)
+#endif
+ found = true;
+ }
+
+ //check in case lastW is already removed
+ if (w == m_lastW)
+ return true;
+
+ return found;
+}
+
+void btVoronoiSimplexSolver::backup_closest(btVector3& v)
+{
+ v = m_cachedV;
+}
+
+
+bool btVoronoiSimplexSolver::emptySimplex() const
+{
+ return (numVertices() == 0);
+
+}
+
+void btVoronoiSimplexSolver::compute_points(btVector3& p1, btVector3& p2)
+{
+ updateClosestVectorAndPoints();
+ p1 = m_cachedP1;
+ p2 = m_cachedP2;
+
+}
+
+
+
+
+bool btVoronoiSimplexSolver::closestPtPointTriangle(const btVector3& p, const btVector3& a, const btVector3& b, const btVector3& c,btSubSimplexClosestResult& result)
+{
+ result.m_usedVertices.reset();
+
+ // Check if P in vertex region outside A
+ btVector3 ab = b - a;
+ btVector3 ac = c - a;
+ btVector3 ap = p - a;
+ btScalar d1 = ab.dot(ap);
+ btScalar d2 = ac.dot(ap);
+ if (d1 <= btScalar(0.0) && d2 <= btScalar(0.0))
+ {
+ result.m_closestPointOnSimplex = a;
+ result.m_usedVertices.usedVertexA = true;
+ result.setBarycentricCoordinates(1,0,0);
+ return true;// a; // barycentric coordinates (1,0,0)
+ }
+
+ // Check if P in vertex region outside B
+ btVector3 bp = p - b;
+ btScalar d3 = ab.dot(bp);
+ btScalar d4 = ac.dot(bp);
+ if (d3 >= btScalar(0.0) && d4 <= d3)
+ {
+ result.m_closestPointOnSimplex = b;
+ result.m_usedVertices.usedVertexB = true;
+ result.setBarycentricCoordinates(0,1,0);
+
+ return true; // b; // barycentric coordinates (0,1,0)
+ }
+ // Check if P in edge region of AB, if so return projection of P onto AB
+ btScalar vc = d1*d4 - d3*d2;
+ if (vc <= btScalar(0.0) && d1 >= btScalar(0.0) && d3 <= btScalar(0.0)) {
+ btScalar v = d1 / (d1 - d3);
+ result.m_closestPointOnSimplex = a + v * ab;
+ result.m_usedVertices.usedVertexA = true;
+ result.m_usedVertices.usedVertexB = true;
+ result.setBarycentricCoordinates(1-v,v,0);
+ return true;
+ //return a + v * ab; // barycentric coordinates (1-v,v,0)
+ }
+
+ // Check if P in vertex region outside C
+ btVector3 cp = p - c;
+ btScalar d5 = ab.dot(cp);
+ btScalar d6 = ac.dot(cp);
+ if (d6 >= btScalar(0.0) && d5 <= d6)
+ {
+ result.m_closestPointOnSimplex = c;
+ result.m_usedVertices.usedVertexC = true;
+ result.setBarycentricCoordinates(0,0,1);
+ return true;//c; // barycentric coordinates (0,0,1)
+ }
+
+ // Check if P in edge region of AC, if so return projection of P onto AC
+ btScalar vb = d5*d2 - d1*d6;
+ if (vb <= btScalar(0.0) && d2 >= btScalar(0.0) && d6 <= btScalar(0.0)) {
+ btScalar w = d2 / (d2 - d6);
+ result.m_closestPointOnSimplex = a + w * ac;
+ result.m_usedVertices.usedVertexA = true;
+ result.m_usedVertices.usedVertexC = true;
+ result.setBarycentricCoordinates(1-w,0,w);
+ return true;
+ //return a + w * ac; // barycentric coordinates (1-w,0,w)
+ }
+
+ // Check if P in edge region of BC, if so return projection of P onto BC
+ btScalar va = d3*d6 - d5*d4;
+ if (va <= btScalar(0.0) && (d4 - d3) >= btScalar(0.0) && (d5 - d6) >= btScalar(0.0)) {
+ btScalar w = (d4 - d3) / ((d4 - d3) + (d5 - d6));
+
+ result.m_closestPointOnSimplex = b + w * (c - b);
+ result.m_usedVertices.usedVertexB = true;
+ result.m_usedVertices.usedVertexC = true;
+ result.setBarycentricCoordinates(0,1-w,w);
+ return true;
+ // return b + w * (c - b); // barycentric coordinates (0,1-w,w)
+ }
+
+ // P inside face region. Compute Q through its barycentric coordinates (u,v,w)
+ btScalar denom = btScalar(1.0) / (va + vb + vc);
+ btScalar v = vb * denom;
+ btScalar w = vc * denom;
+
+ result.m_closestPointOnSimplex = a + ab * v + ac * w;
+ result.m_usedVertices.usedVertexA = true;
+ result.m_usedVertices.usedVertexB = true;
+ result.m_usedVertices.usedVertexC = true;
+ result.setBarycentricCoordinates(1-v-w,v,w);
+
+ return true;
+// return a + ab * v + ac * w; // = u*a + v*b + w*c, u = va * denom = btScalar(1.0) - v - w
+
+}
+
+
+
+
+
+/// Test if point p and d lie on opposite sides of plane through abc
+int btVoronoiSimplexSolver::pointOutsideOfPlane(const btVector3& p, const btVector3& a, const btVector3& b, const btVector3& c, const btVector3& d)
+{
+ btVector3 normal = (b-a).cross(c-a);
+
+ btScalar signp = (p - a).dot(normal); // [AP AB AC]
+ btScalar signd = (d - a).dot( normal); // [AD AB AC]
+
+#ifdef CATCH_DEGENERATE_TETRAHEDRON
+#ifdef BT_USE_DOUBLE_PRECISION
+if (signd * signd < (btScalar(1e-8) * btScalar(1e-8)))
+ {
+ return -1;
+ }
+#else
+ if (signd * signd < (btScalar(1e-4) * btScalar(1e-4)))
+ {
+// printf("affine dependent/degenerate\n");//
+ return -1;
+ }
+#endif
+
+#endif
+ // Points on opposite sides if expression signs are opposite
+ return signp * signd < btScalar(0.);
+}
+
+
+bool btVoronoiSimplexSolver::closestPtPointTetrahedron(const btVector3& p, const btVector3& a, const btVector3& b, const btVector3& c, const btVector3& d, btSubSimplexClosestResult& finalResult)
+{
+ btSubSimplexClosestResult tempResult;
+
+ // Start out assuming point inside all halfspaces, so closest to itself
+ finalResult.m_closestPointOnSimplex = p;
+ finalResult.m_usedVertices.reset();
+ finalResult.m_usedVertices.usedVertexA = true;
+ finalResult.m_usedVertices.usedVertexB = true;
+ finalResult.m_usedVertices.usedVertexC = true;
+ finalResult.m_usedVertices.usedVertexD = true;
+
+ int pointOutsideABC = pointOutsideOfPlane(p, a, b, c, d);
+ int pointOutsideACD = pointOutsideOfPlane(p, a, c, d, b);
+ int pointOutsideADB = pointOutsideOfPlane(p, a, d, b, c);
+ int pointOutsideBDC = pointOutsideOfPlane(p, b, d, c, a);
+
+ if (pointOutsideABC < 0 || pointOutsideACD < 0 || pointOutsideADB < 0 || pointOutsideBDC < 0)
+ {
+ finalResult.m_degenerate = true;
+ return false;
+ }
+
+ if (!pointOutsideABC && !pointOutsideACD && !pointOutsideADB && !pointOutsideBDC)
+ {
+ return false;
+ }
+
+
+ btScalar bestSqDist = FLT_MAX;
+ // If point outside face abc then compute closest point on abc
+ if (pointOutsideABC)
+ {
+ closestPtPointTriangle(p, a, b, c,tempResult);
+ btVector3 q = tempResult.m_closestPointOnSimplex;
+
+ btScalar sqDist = (q - p).dot( q - p);
+ // Update best closest point if (squared) distance is less than current best
+ if (sqDist < bestSqDist) {
+ bestSqDist = sqDist;
+ finalResult.m_closestPointOnSimplex = q;
+ //convert result bitmask!
+ finalResult.m_usedVertices.reset();
+ finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA;
+ finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexB;
+ finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexC;
+ finalResult.setBarycentricCoordinates(
+ tempResult.m_barycentricCoords[VERTA],
+ tempResult.m_barycentricCoords[VERTB],
+ tempResult.m_barycentricCoords[VERTC],
+ 0
+ );
+
+ }
+ }
+
+
+ // Repeat test for face acd
+ if (pointOutsideACD)
+ {
+ closestPtPointTriangle(p, a, c, d,tempResult);
+ btVector3 q = tempResult.m_closestPointOnSimplex;
+ //convert result bitmask!
+
+ btScalar sqDist = (q - p).dot( q - p);
+ if (sqDist < bestSqDist)
+ {
+ bestSqDist = sqDist;
+ finalResult.m_closestPointOnSimplex = q;
+ finalResult.m_usedVertices.reset();
+ finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA;
+
+ finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexB;
+ finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexC;
+ finalResult.setBarycentricCoordinates(
+ tempResult.m_barycentricCoords[VERTA],
+ 0,
+ tempResult.m_barycentricCoords[VERTB],
+ tempResult.m_barycentricCoords[VERTC]
+ );
+
+ }
+ }
+ // Repeat test for face adb
+
+
+ if (pointOutsideADB)
+ {
+ closestPtPointTriangle(p, a, d, b,tempResult);
+ btVector3 q = tempResult.m_closestPointOnSimplex;
+ //convert result bitmask!
+
+ btScalar sqDist = (q - p).dot( q - p);
+ if (sqDist < bestSqDist)
+ {
+ bestSqDist = sqDist;
+ finalResult.m_closestPointOnSimplex = q;
+ finalResult.m_usedVertices.reset();
+ finalResult.m_usedVertices.usedVertexA = tempResult.m_usedVertices.usedVertexA;
+ finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexC;
+
+ finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexB;
+ finalResult.setBarycentricCoordinates(
+ tempResult.m_barycentricCoords[VERTA],
+ tempResult.m_barycentricCoords[VERTC],
+ 0,
+ tempResult.m_barycentricCoords[VERTB]
+ );
+
+ }
+ }
+ // Repeat test for face bdc
+
+
+ if (pointOutsideBDC)
+ {
+ closestPtPointTriangle(p, b, d, c,tempResult);
+ btVector3 q = tempResult.m_closestPointOnSimplex;
+ //convert result bitmask!
+ btScalar sqDist = (q - p).dot( q - p);
+ if (sqDist < bestSqDist)
+ {
+ bestSqDist = sqDist;
+ finalResult.m_closestPointOnSimplex = q;
+ finalResult.m_usedVertices.reset();
+ //
+ finalResult.m_usedVertices.usedVertexB = tempResult.m_usedVertices.usedVertexA;
+ finalResult.m_usedVertices.usedVertexC = tempResult.m_usedVertices.usedVertexC;
+ finalResult.m_usedVertices.usedVertexD = tempResult.m_usedVertices.usedVertexB;
+
+ finalResult.setBarycentricCoordinates(
+ 0,
+ tempResult.m_barycentricCoords[VERTA],
+ tempResult.m_barycentricCoords[VERTC],
+ tempResult.m_barycentricCoords[VERTB]
+ );
+
+ }
+ }
+
+ //help! we ended up full !
+
+ if (finalResult.m_usedVertices.usedVertexA &&
+ finalResult.m_usedVertices.usedVertexB &&
+ finalResult.m_usedVertices.usedVertexC &&
+ finalResult.m_usedVertices.usedVertexD)
+ {
+ return true;
+ }
+
+ return true;
+}
+
diff --git a/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
new file mode 100644
index 00000000..f1c7613e
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h
@@ -0,0 +1,179 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_VORONOI_SIMPLEX_SOLVER_H
+#define BT_VORONOI_SIMPLEX_SOLVER_H
+
+#include "btSimplexSolverInterface.h"
+
+
+
+#define VORONOI_SIMPLEX_MAX_VERTS 5
+
+///disable next define, or use defaultCollisionConfiguration->getSimplexSolver()->setEqualVertexThreshold(0.f) to disable/configure
+#define BT_USE_EQUAL_VERTEX_THRESHOLD
+#define VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD 0.0001f
+
+
+struct btUsageBitfield{
+ btUsageBitfield()
+ {
+ reset();
+ }
+
+ void reset()
+ {
+ usedVertexA = false;
+ usedVertexB = false;
+ usedVertexC = false;
+ usedVertexD = false;
+ }
+ unsigned short usedVertexA : 1;
+ unsigned short usedVertexB : 1;
+ unsigned short usedVertexC : 1;
+ unsigned short usedVertexD : 1;
+ unsigned short unused1 : 1;
+ unsigned short unused2 : 1;
+ unsigned short unused3 : 1;
+ unsigned short unused4 : 1;
+};
+
+
+struct btSubSimplexClosestResult
+{
+ btVector3 m_closestPointOnSimplex;
+ //MASK for m_usedVertices
+ //stores the simplex vertex-usage, using the MASK,
+ // if m_usedVertices & MASK then the related vertex is used
+ btUsageBitfield m_usedVertices;
+ btScalar m_barycentricCoords[4];
+ bool m_degenerate;
+
+ void reset()
+ {
+ m_degenerate = false;
+ setBarycentricCoordinates();
+ m_usedVertices.reset();
+ }
+ bool isValid()
+ {
+ bool valid = (m_barycentricCoords[0] >= btScalar(0.)) &&
+ (m_barycentricCoords[1] >= btScalar(0.)) &&
+ (m_barycentricCoords[2] >= btScalar(0.)) &&
+ (m_barycentricCoords[3] >= btScalar(0.));
+
+
+ return valid;
+ }
+ void setBarycentricCoordinates(btScalar a=btScalar(0.),btScalar b=btScalar(0.),btScalar c=btScalar(0.),btScalar d=btScalar(0.))
+ {
+ m_barycentricCoords[0] = a;
+ m_barycentricCoords[1] = b;
+ m_barycentricCoords[2] = c;
+ m_barycentricCoords[3] = d;
+ }
+
+};
+
+/// btVoronoiSimplexSolver is an implementation of the closest point distance algorithm from a 1-4 points simplex to the origin.
+/// Can be used with GJK, as an alternative to Johnson distance algorithm.
+#ifdef NO_VIRTUAL_INTERFACE
+class btVoronoiSimplexSolver
+#else
+class btVoronoiSimplexSolver : public btSimplexSolverInterface
+#endif
+{
+public:
+
+ int m_numVertices;
+
+ btVector3 m_simplexVectorW[VORONOI_SIMPLEX_MAX_VERTS];
+ btVector3 m_simplexPointsP[VORONOI_SIMPLEX_MAX_VERTS];
+ btVector3 m_simplexPointsQ[VORONOI_SIMPLEX_MAX_VERTS];
+
+
+
+ btVector3 m_cachedP1;
+ btVector3 m_cachedP2;
+ btVector3 m_cachedV;
+ btVector3 m_lastW;
+
+ btScalar m_equalVertexThreshold;
+ bool m_cachedValidClosest;
+
+
+ btSubSimplexClosestResult m_cachedBC;
+
+ bool m_needsUpdate;
+
+ void removeVertex(int index);
+ void reduceVertices (const btUsageBitfield& usedVerts);
+ bool updateClosestVectorAndPoints();
+
+ bool closestPtPointTetrahedron(const btVector3& p, const btVector3& a, const btVector3& b, const btVector3& c, const btVector3& d, btSubSimplexClosestResult& finalResult);
+ int pointOutsideOfPlane(const btVector3& p, const btVector3& a, const btVector3& b, const btVector3& c, const btVector3& d);
+ bool closestPtPointTriangle(const btVector3& p, const btVector3& a, const btVector3& b, const btVector3& c,btSubSimplexClosestResult& result);
+
+public:
+
+ btVoronoiSimplexSolver()
+ : m_equalVertexThreshold(VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD)
+ {
+ }
+ void reset();
+
+ void addVertex(const btVector3& w, const btVector3& p, const btVector3& q);
+
+ void setEqualVertexThreshold(btScalar threshold)
+ {
+ m_equalVertexThreshold = threshold;
+ }
+
+ btScalar getEqualVertexThreshold() const
+ {
+ return m_equalVertexThreshold;
+ }
+
+ bool closest(btVector3& v);
+
+ btScalar maxVertex();
+
+ bool fullSimplex() const
+ {
+ return (m_numVertices == 4);
+ }
+
+ int getSimplex(btVector3 *pBuf, btVector3 *qBuf, btVector3 *yBuf) const;
+
+ bool inSimplex(const btVector3& w);
+
+ void backup_closest(btVector3& v) ;
+
+ bool emptySimplex() const ;
+
+ void compute_points(btVector3& p1, btVector3& p2) ;
+
+ int numVertices() const
+ {
+ return m_numVertices;
+ }
+
+
+};
+
+#endif //BT_VORONOI_SIMPLEX_SOLVER_H
+
diff --git a/tests/bullet/src/BulletCollision/ibmsdk/Makefile b/tests/bullet/src/BulletCollision/ibmsdk/Makefile
new file mode 100644
index 00000000..8a787832
--- /dev/null
+++ b/tests/bullet/src/BulletCollision/ibmsdk/Makefile
@@ -0,0 +1,112 @@
+#### Source code Dirs
+VPATH = \
+../BroadphaseCollision \
+../CollisionDispatch \
+../NarrowPhaseCollision \
+../CollisionShapes
+
+ROOT = ../../..
+
+#### Library
+LIBRARY_ppu = bulletcollision.a
+
+#### Compiler flags
+CPPFLAGS = \
+-DUSE_LIBSPE2 \
+-I../BroadphaseCollision \
+-I../CollisionDispath \
+-I../NarrowPhaseCollision \
+-I../CollisionShapes \
+-I$(ROOT)/src/ \
+-I$(SDKINC)
+
+#### Optimization level flags
+#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG)
+CC_OPT_LEVEL = -O3
+
+##### Objects to be archived in lib
+
+OBJS = \
+btAxisSweep3.o \
+btQuantizedBvh.o \
+btBroadphaseProxy.o \
+btCollisionAlgorithm.o \
+btDispatcher.o \
+btDbvtBroadphase.o \
+btDbvt.o \
+btOverlappingPairCache.o \
+btSimpleBroadphase.o \
+btContinuousConvexCollision.o \
+btConvexCast.o \
+btGjkConvexCast.o \
+btGjkEpa2.o \
+btGjkEpaPenetrationDepthSolver.o \
+btGjkPairDetector.o \
+btDefaultCollisionConfiguration.o \
+btMinkowskiPenetrationDepthSolver.o \
+btPersistentManifold.o \
+btRaycastCallback.o \
+btSubSimplexConvexCast.o \
+btVoronoiSimplexSolver.o \
+btCollisionDispatcher.o \
+btCollisionObject.o \
+btCollisionWorld.o \
+btCompoundCollisionAlgorithm.o \
+btBoxBoxCollisionAlgorithm.o \
+btBoxBoxDetector.o \
+btConvexPlaneCollisionAlgorithm.o \
+btConvexConcaveCollisionAlgorithm.o \
+btConvexConvexAlgorithm.o \
+btDefaultCollisionConfiguration.o \
+btEmptyCollisionAlgorithm.o \
+btManifoldResult.o \
+btSimulationIslandManager.o \
+btSphereBoxCollisionAlgorithm.o \
+btSphereSphereCollisionAlgorithm.o \
+btSphereTriangleCollisionAlgorithm.o \
+btActivatingCollisionAlgorithm.o \
+btUnionFind.o \
+SphereTriangleDetector.o \
+btBoxShape.o \
+btBvhTriangleMeshShape.o \
+btCapsuleShape.o \
+btCollisionShape.o \
+btCompoundShape.o \
+btConcaveShape.o \
+btConeShape.o \
+btConvexHullShape.o \
+btConvexShape.o \
+btConvexInternalShape.o \
+btConvexTriangleMeshShape.o \
+btCylinderShape.o \
+btEmptyShape.o \
+btHeightfieldTerrainShape.o \
+btMinkowskiSumShape.o \
+btMultiSphereShape.o \
+btOptimizedBvh.o \
+btPolyhedralConvexShape.o \
+btSphereShape.o \
+btStaticPlaneShape.o \
+btStridingMeshInterface.o \
+btTetrahedronShape.o \
+btTriangleBuffer.o \
+btTriangleCallback.o \
+btTriangleIndexVertexArray.o \
+btTriangleMesh.o \
+btTriangleMeshShape.o \
+btUniformScalingShape.o
+
+#### Install directories
+INSTALL_DIR = $(ROOT)/lib/ibmsdk
+INSTALL_FILES = $(LIBRARY_ppu)
+
+IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
+
+ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
+ CELL_TOP ?= /opt/cell/sdk
+ include $(CELL_TOP)/buildutils/make.footer
+else
+ CELL_TOP ?= /opt/ibm/cell-sdk/prototype
+ include $(CELL_TOP)/make.footer
+endif
+
diff --git a/tests/bullet/src/BulletDynamics/CMakeLists.txt b/tests/bullet/src/BulletDynamics/CMakeLists.txt
new file mode 100644
index 00000000..894350fa
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/CMakeLists.txt
@@ -0,0 +1,114 @@
+INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src )
+
+
+
+SET(BulletDynamics_SRCS
+ Character/btKinematicCharacterController.cpp
+ ConstraintSolver/btConeTwistConstraint.cpp
+ ConstraintSolver/btContactConstraint.cpp
+ ConstraintSolver/btGeneric6DofConstraint.cpp
+ ConstraintSolver/btGeneric6DofSpringConstraint.cpp
+ ConstraintSolver/btHinge2Constraint.cpp
+ ConstraintSolver/btHingeConstraint.cpp
+ ConstraintSolver/btPoint2PointConstraint.cpp
+ ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
+ ConstraintSolver/btSliderConstraint.cpp
+ ConstraintSolver/btSolve2LinearConstraint.cpp
+ ConstraintSolver/btTypedConstraint.cpp
+ ConstraintSolver/btUniversalConstraint.cpp
+ Dynamics/btContinuousDynamicsWorld.cpp
+ Dynamics/btDiscreteDynamicsWorld.cpp
+ Dynamics/btRigidBody.cpp
+ Dynamics/btSimpleDynamicsWorld.cpp
+ Dynamics/Bullet-C-API.cpp
+ Vehicle/btRaycastVehicle.cpp
+ Vehicle/btWheelInfo.cpp
+)
+
+SET(Root_HDRS
+ ../btBulletDynamicsCommon.h
+ ../btBulletCollisionCommon.h
+)
+SET(ConstraintSolver_HDRS
+ ConstraintSolver/btConeTwistConstraint.h
+ ConstraintSolver/btConstraintSolver.h
+ ConstraintSolver/btContactConstraint.h
+ ConstraintSolver/btContactSolverInfo.h
+ ConstraintSolver/btGeneric6DofConstraint.h
+ ConstraintSolver/btGeneric6DofSpringConstraint.h
+ ConstraintSolver/btHinge2Constraint.h
+ ConstraintSolver/btHingeConstraint.h
+ ConstraintSolver/btJacobianEntry.h
+ ConstraintSolver/btPoint2PointConstraint.h
+ ConstraintSolver/btSequentialImpulseConstraintSolver.h
+ ConstraintSolver/btSliderConstraint.h
+ ConstraintSolver/btSolve2LinearConstraint.h
+ ConstraintSolver/btSolverBody.h
+ ConstraintSolver/btSolverConstraint.h
+ ConstraintSolver/btTypedConstraint.h
+ ConstraintSolver/btUniversalConstraint.h
+)
+SET(Dynamics_HDRS
+ Dynamics/btActionInterface.h
+ Dynamics/btContinuousDynamicsWorld.h
+ Dynamics/btDiscreteDynamicsWorld.h
+ Dynamics/btDynamicsWorld.h
+ Dynamics/btSimpleDynamicsWorld.h
+ Dynamics/btRigidBody.h
+)
+SET(Vehicle_HDRS
+ Vehicle/btRaycastVehicle.h
+ Vehicle/btVehicleRaycaster.h
+ Vehicle/btWheelInfo.h
+)
+
+SET(Character_HDRS
+ Character/btCharacterControllerInterface.h
+ Character/btKinematicCharacterController.h
+)
+
+
+
+SET(BulletDynamics_HDRS
+ ${Root_HDRS}
+ ${ConstraintSolver_HDRS}
+ ${Dynamics_HDRS}
+ ${Vehicle_HDRS}
+ ${Character_HDRS}
+)
+
+
+ADD_LIBRARY(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS})
+SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletDynamics BulletCollision LinearMath)
+ENDIF (BUILD_SHARED_LIBS)
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletDynamics DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletDynamics DESTINATION lib${LIB_SUFFIX})
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN
+".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
+ INSTALL(FILES ../btBulletDynamicsCommon.h
+DESTINATION ${INCLUDE_INSTALL_DIR}/BulletDynamics)
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES PUBLIC_HEADER "${Root_HDRS}")
+ # Have to list out sub-directories manually:
+ SET_PROPERTY(SOURCE ${ConstraintSolver_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/ConstraintSolver)
+ SET_PROPERTY(SOURCE ${Dynamics_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Dynamics)
+ SET_PROPERTY(SOURCE ${Vehicle_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Vehicle)
+ SET_PROPERTY(SOURCE ${Character_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Character)
+
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletDynamics/Character/btCharacterControllerInterface.h b/tests/bullet/src/BulletDynamics/Character/btCharacterControllerInterface.h
new file mode 100644
index 00000000..c81813c9
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Character/btCharacterControllerInterface.h
@@ -0,0 +1,46 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CHARACTER_CONTROLLER_INTERFACE_H
+#define BT_CHARACTER_CONTROLLER_INTERFACE_H
+
+#include "LinearMath/btVector3.h"
+#include "BulletDynamics/Dynamics/btActionInterface.h"
+
+class btCollisionShape;
+class btRigidBody;
+class btCollisionWorld;
+
+class btCharacterControllerInterface : public btActionInterface
+{
+public:
+ btCharacterControllerInterface () {};
+ virtual ~btCharacterControllerInterface () {};
+
+ virtual void setWalkDirection(const btVector3& walkDirection) = 0;
+ virtual void setVelocityForTimeInterval(const btVector3& velocity, btScalar timeInterval) = 0;
+ virtual void reset () = 0;
+ virtual void warp (const btVector3& origin) = 0;
+
+ virtual void preStep ( btCollisionWorld* collisionWorld) = 0;
+ virtual void playerStep (btCollisionWorld* collisionWorld, btScalar dt) = 0;
+ virtual bool canJump () const = 0;
+ virtual void jump () = 0;
+
+ virtual bool onGround () const = 0;
+};
+
+#endif //BT_CHARACTER_CONTROLLER_INTERFACE_H
+
diff --git a/tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.cpp b/tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.cpp
new file mode 100644
index 00000000..f733dc0c
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.cpp
@@ -0,0 +1,641 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "LinearMath/btIDebugDraw.h"
+#include "BulletCollision/CollisionDispatch/btGhostObject.h"
+#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
+#include "LinearMath/btDefaultMotionState.h"
+#include "btKinematicCharacterController.h"
+
+
+// static helper method
+static btVector3
+getNormalizedVector(const btVector3& v)
+{
+ btVector3 n = v.normalized();
+ if (n.length() < SIMD_EPSILON) {
+ n.setValue(0, 0, 0);
+ }
+ return n;
+}
+
+
+///@todo Interact with dynamic objects,
+///Ride kinematicly animated platforms properly
+///More realistic (or maybe just a config option) falling
+/// -> Should integrate falling velocity manually and use that in stepDown()
+///Support jumping
+///Support ducking
+class btKinematicClosestNotMeRayResultCallback : public btCollisionWorld::ClosestRayResultCallback
+{
+public:
+ btKinematicClosestNotMeRayResultCallback (btCollisionObject* me) : btCollisionWorld::ClosestRayResultCallback(btVector3(0.0, 0.0, 0.0), btVector3(0.0, 0.0, 0.0))
+ {
+ m_me = me;
+ }
+
+ virtual btScalar addSingleResult(btCollisionWorld::LocalRayResult& rayResult,bool normalInWorldSpace)
+ {
+ if (rayResult.m_collisionObject == m_me)
+ return 1.0;
+
+ return ClosestRayResultCallback::addSingleResult (rayResult, normalInWorldSpace);
+ }
+protected:
+ btCollisionObject* m_me;
+};
+
+class btKinematicClosestNotMeConvexResultCallback : public btCollisionWorld::ClosestConvexResultCallback
+{
+public:
+ btKinematicClosestNotMeConvexResultCallback (btCollisionObject* me, const btVector3& up, btScalar minSlopeDot)
+ : btCollisionWorld::ClosestConvexResultCallback(btVector3(0.0, 0.0, 0.0), btVector3(0.0, 0.0, 0.0))
+ , m_me(me)
+ , m_up(up)
+ , m_minSlopeDot(minSlopeDot)
+ {
+ }
+
+ virtual btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult,bool normalInWorldSpace)
+ {
+ if (convexResult.m_hitCollisionObject == m_me)
+ return btScalar(1.0);
+
+ btVector3 hitNormalWorld;
+ if (normalInWorldSpace)
+ {
+ hitNormalWorld = convexResult.m_hitNormalLocal;
+ } else
+ {
+ ///need to transform normal into worldspace
+ hitNormalWorld = convexResult.m_hitCollisionObject->getWorldTransform().getBasis()*convexResult.m_hitNormalLocal;
+ }
+
+ btScalar dotUp = m_up.dot(hitNormalWorld);
+ if (dotUp < m_minSlopeDot) {
+ return btScalar(1.0);
+ }
+
+ return ClosestConvexResultCallback::addSingleResult (convexResult, normalInWorldSpace);
+ }
+protected:
+ btCollisionObject* m_me;
+ const btVector3 m_up;
+ btScalar m_minSlopeDot;
+};
+
+/*
+ * Returns the reflection direction of a ray going 'direction' hitting a surface with normal 'normal'
+ *
+ * from: http://www-cs-students.stanford.edu/~adityagp/final/node3.html
+ */
+btVector3 btKinematicCharacterController::computeReflectionDirection (const btVector3& direction, const btVector3& normal)
+{
+ return direction - (btScalar(2.0) * direction.dot(normal)) * normal;
+}
+
+/*
+ * Returns the portion of 'direction' that is parallel to 'normal'
+ */
+btVector3 btKinematicCharacterController::parallelComponent (const btVector3& direction, const btVector3& normal)
+{
+ btScalar magnitude = direction.dot(normal);
+ return normal * magnitude;
+}
+
+/*
+ * Returns the portion of 'direction' that is perpindicular to 'normal'
+ */
+btVector3 btKinematicCharacterController::perpindicularComponent (const btVector3& direction, const btVector3& normal)
+{
+ return direction - parallelComponent(direction, normal);
+}
+
+btKinematicCharacterController::btKinematicCharacterController (btPairCachingGhostObject* ghostObject,btConvexShape* convexShape,btScalar stepHeight, int upAxis)
+{
+ m_upAxis = upAxis;
+ m_addedMargin = 0.02;
+ m_walkDirection.setValue(0,0,0);
+ m_useGhostObjectSweepTest = true;
+ m_ghostObject = ghostObject;
+ m_stepHeight = stepHeight;
+ m_turnAngle = btScalar(0.0);
+ m_convexShape=convexShape;
+ m_useWalkDirection = true; // use walk direction by default, legacy behavior
+ m_velocityTimeInterval = 0.0;
+ m_verticalVelocity = 0.0;
+ m_verticalOffset = 0.0;
+ m_gravity = 9.8 * 3 ; // 3G acceleration.
+ m_fallSpeed = 55.0; // Terminal velocity of a sky diver in m/s.
+ m_jumpSpeed = 10.0; // ?
+ m_wasOnGround = false;
+ m_wasJumping = false;
+ setMaxSlope(btRadians(45.0));
+}
+
+btKinematicCharacterController::~btKinematicCharacterController ()
+{
+}
+
+btPairCachingGhostObject* btKinematicCharacterController::getGhostObject()
+{
+ return m_ghostObject;
+}
+
+bool btKinematicCharacterController::recoverFromPenetration ( btCollisionWorld* collisionWorld)
+{
+
+ bool penetration = false;
+
+ collisionWorld->getDispatcher()->dispatchAllCollisionPairs(m_ghostObject->getOverlappingPairCache(), collisionWorld->getDispatchInfo(), collisionWorld->getDispatcher());
+
+ m_currentPosition = m_ghostObject->getWorldTransform().getOrigin();
+
+ btScalar maxPen = btScalar(0.0);
+ for (int i = 0; i < m_ghostObject->getOverlappingPairCache()->getNumOverlappingPairs(); i++)
+ {
+ m_manifoldArray.resize(0);
+
+ btBroadphasePair* collisionPair = &m_ghostObject->getOverlappingPairCache()->getOverlappingPairArray()[i];
+
+ if (collisionPair->m_algorithm)
+ collisionPair->m_algorithm->getAllContactManifolds(m_manifoldArray);
+
+
+ for (int j=0;j<m_manifoldArray.size();j++)
+ {
+ btPersistentManifold* manifold = m_manifoldArray[j];
+ btScalar directionSign = manifold->getBody0() == m_ghostObject ? btScalar(-1.0) : btScalar(1.0);
+ for (int p=0;p<manifold->getNumContacts();p++)
+ {
+ const btManifoldPoint&pt = manifold->getContactPoint(p);
+
+ btScalar dist = pt.getDistance();
+
+ if (dist < 0.0)
+ {
+ if (dist < maxPen)
+ {
+ maxPen = dist;
+ m_touchingNormal = pt.m_normalWorldOnB * directionSign;//??
+
+ }
+ m_currentPosition += pt.m_normalWorldOnB * directionSign * dist * btScalar(0.2);
+ penetration = true;
+ } else {
+ //printf("touching %f\n", dist);
+ }
+ }
+
+ //manifold->clearManifold();
+ }
+ }
+ btTransform newTrans = m_ghostObject->getWorldTransform();
+ newTrans.setOrigin(m_currentPosition);
+ m_ghostObject->setWorldTransform(newTrans);
+// printf("m_touchingNormal = %f,%f,%f\n",m_touchingNormal[0],m_touchingNormal[1],m_touchingNormal[2]);
+ return penetration;
+}
+
+void btKinematicCharacterController::stepUp ( btCollisionWorld* world)
+{
+ // phase 1: up
+ btTransform start, end;
+ m_targetPosition = m_currentPosition + getUpAxisDirections()[m_upAxis] * (m_stepHeight + (m_verticalOffset > 0.f?m_verticalOffset:0.f));
+
+ start.setIdentity ();
+ end.setIdentity ();
+
+ /* FIXME: Handle penetration properly */
+ start.setOrigin (m_currentPosition + getUpAxisDirections()[m_upAxis] * (m_convexShape->getMargin() + m_addedMargin));
+ end.setOrigin (m_targetPosition);
+
+ btKinematicClosestNotMeConvexResultCallback callback (m_ghostObject, -getUpAxisDirections()[m_upAxis], btScalar(0.7071));
+ callback.m_collisionFilterGroup = getGhostObject()->getBroadphaseHandle()->m_collisionFilterGroup;
+ callback.m_collisionFilterMask = getGhostObject()->getBroadphaseHandle()->m_collisionFilterMask;
+
+ if (m_useGhostObjectSweepTest)
+ {
+ m_ghostObject->convexSweepTest (m_convexShape, start, end, callback, world->getDispatchInfo().m_allowedCcdPenetration);
+ }
+ else
+ {
+ world->convexSweepTest (m_convexShape, start, end, callback);
+ }
+
+ if (callback.hasHit())
+ {
+ // Only modify the position if the hit was a slope and not a wall or ceiling.
+ if(callback.m_hitNormalWorld.dot(getUpAxisDirections()[m_upAxis]) > 0.0)
+ {
+ // we moved up only a fraction of the step height
+ m_currentStepOffset = m_stepHeight * callback.m_closestHitFraction;
+ m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+ }
+ m_verticalVelocity = 0.0;
+ m_verticalOffset = 0.0;
+ } else {
+ m_currentStepOffset = m_stepHeight;
+ m_currentPosition = m_targetPosition;
+ }
+}
+
+void btKinematicCharacterController::updateTargetPositionBasedOnCollision (const btVector3& hitNormal, btScalar tangentMag, btScalar normalMag)
+{
+ btVector3 movementDirection = m_targetPosition - m_currentPosition;
+ btScalar movementLength = movementDirection.length();
+ if (movementLength>SIMD_EPSILON)
+ {
+ movementDirection.normalize();
+
+ btVector3 reflectDir = computeReflectionDirection (movementDirection, hitNormal);
+ reflectDir.normalize();
+
+ btVector3 parallelDir, perpindicularDir;
+
+ parallelDir = parallelComponent (reflectDir, hitNormal);
+ perpindicularDir = perpindicularComponent (reflectDir, hitNormal);
+
+ m_targetPosition = m_currentPosition;
+ if (0)//tangentMag != 0.0)
+ {
+ btVector3 parComponent = parallelDir * btScalar (tangentMag*movementLength);
+// printf("parComponent=%f,%f,%f\n",parComponent[0],parComponent[1],parComponent[2]);
+ m_targetPosition += parComponent;
+ }
+
+ if (normalMag != 0.0)
+ {
+ btVector3 perpComponent = perpindicularDir * btScalar (normalMag*movementLength);
+// printf("perpComponent=%f,%f,%f\n",perpComponent[0],perpComponent[1],perpComponent[2]);
+ m_targetPosition += perpComponent;
+ }
+ } else
+ {
+// printf("movementLength don't normalize a zero vector\n");
+ }
+}
+
+void btKinematicCharacterController::stepForwardAndStrafe ( btCollisionWorld* collisionWorld, const btVector3& walkMove)
+{
+ // printf("m_normalizedDirection=%f,%f,%f\n",
+ // m_normalizedDirection[0],m_normalizedDirection[1],m_normalizedDirection[2]);
+ // phase 2: forward and strafe
+ btTransform start, end;
+ m_targetPosition = m_currentPosition + walkMove;
+
+ start.setIdentity ();
+ end.setIdentity ();
+
+ btScalar fraction = 1.0;
+ btScalar distance2 = (m_currentPosition-m_targetPosition).length2();
+// printf("distance2=%f\n",distance2);
+
+ if (m_touchingContact)
+ {
+ if (m_normalizedDirection.dot(m_touchingNormal) > btScalar(0.0))
+ {
+ updateTargetPositionBasedOnCollision (m_touchingNormal);
+ }
+ }
+
+ int maxIter = 10;
+
+ while (fraction > btScalar(0.01) && maxIter-- > 0)
+ {
+ start.setOrigin (m_currentPosition);
+ end.setOrigin (m_targetPosition);
+ btVector3 sweepDirNegative(m_currentPosition - m_targetPosition);
+
+ btKinematicClosestNotMeConvexResultCallback callback (m_ghostObject, sweepDirNegative, btScalar(0.0));
+ callback.m_collisionFilterGroup = getGhostObject()->getBroadphaseHandle()->m_collisionFilterGroup;
+ callback.m_collisionFilterMask = getGhostObject()->getBroadphaseHandle()->m_collisionFilterMask;
+
+
+ btScalar margin = m_convexShape->getMargin();
+ m_convexShape->setMargin(margin + m_addedMargin);
+
+
+ if (m_useGhostObjectSweepTest)
+ {
+ m_ghostObject->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+ } else
+ {
+ collisionWorld->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+ }
+
+ m_convexShape->setMargin(margin);
+
+
+ fraction -= callback.m_closestHitFraction;
+
+ if (callback.hasHit())
+ {
+ // we moved only a fraction
+ btScalar hitDistance;
+ hitDistance = (callback.m_hitPointWorld - m_currentPosition).length();
+
+// m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+
+ updateTargetPositionBasedOnCollision (callback.m_hitNormalWorld);
+ btVector3 currentDir = m_targetPosition - m_currentPosition;
+ distance2 = currentDir.length2();
+ if (distance2 > SIMD_EPSILON)
+ {
+ currentDir.normalize();
+ /* See Quake2: "If velocity is against original velocity, stop ead to avoid tiny oscilations in sloping corners." */
+ if (currentDir.dot(m_normalizedDirection) <= btScalar(0.0))
+ {
+ break;
+ }
+ } else
+ {
+// printf("currentDir: don't normalize a zero vector\n");
+ break;
+ }
+
+ } else {
+ // we moved whole way
+ m_currentPosition = m_targetPosition;
+ }
+
+ // if (callback.m_closestHitFraction == 0.f)
+ // break;
+
+ }
+}
+
+void btKinematicCharacterController::stepDown ( btCollisionWorld* collisionWorld, btScalar dt)
+{
+ btTransform start, end;
+
+ // phase 3: down
+ /*btScalar additionalDownStep = (m_wasOnGround && !onGround()) ? m_stepHeight : 0.0;
+ btVector3 step_drop = getUpAxisDirections()[m_upAxis] * (m_currentStepOffset + additionalDownStep);
+ btScalar downVelocity = (additionalDownStep == 0.0 && m_verticalVelocity<0.0?-m_verticalVelocity:0.0) * dt;
+ btVector3 gravity_drop = getUpAxisDirections()[m_upAxis] * downVelocity;
+ m_targetPosition -= (step_drop + gravity_drop);*/
+
+ btScalar downVelocity = (m_verticalVelocity<0.f?-m_verticalVelocity:0.f) * dt;
+ if(downVelocity > 0.0 && downVelocity < m_stepHeight
+ && (m_wasOnGround || !m_wasJumping))
+ {
+ downVelocity = m_stepHeight;
+ }
+
+ btVector3 step_drop = getUpAxisDirections()[m_upAxis] * (m_currentStepOffset + downVelocity);
+ m_targetPosition -= step_drop;
+
+ start.setIdentity ();
+ end.setIdentity ();
+
+ start.setOrigin (m_currentPosition);
+ end.setOrigin (m_targetPosition);
+
+ btKinematicClosestNotMeConvexResultCallback callback (m_ghostObject, getUpAxisDirections()[m_upAxis], m_maxSlopeCosine);
+ callback.m_collisionFilterGroup = getGhostObject()->getBroadphaseHandle()->m_collisionFilterGroup;
+ callback.m_collisionFilterMask = getGhostObject()->getBroadphaseHandle()->m_collisionFilterMask;
+
+ if (m_useGhostObjectSweepTest)
+ {
+ m_ghostObject->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+ } else
+ {
+ collisionWorld->convexSweepTest (m_convexShape, start, end, callback, collisionWorld->getDispatchInfo().m_allowedCcdPenetration);
+ }
+
+ if (callback.hasHit())
+ {
+ // we dropped a fraction of the height -> hit floor
+ m_currentPosition.setInterpolate3 (m_currentPosition, m_targetPosition, callback.m_closestHitFraction);
+ m_verticalVelocity = 0.0;
+ m_verticalOffset = 0.0;
+ m_wasJumping = false;
+ } else {
+ // we dropped the full height
+
+ m_currentPosition = m_targetPosition;
+ }
+}
+
+
+
+void btKinematicCharacterController::setWalkDirection
+(
+const btVector3& walkDirection
+)
+{
+ m_useWalkDirection = true;
+ m_walkDirection = walkDirection;
+ m_normalizedDirection = getNormalizedVector(m_walkDirection);
+}
+
+
+
+void btKinematicCharacterController::setVelocityForTimeInterval
+(
+const btVector3& velocity,
+btScalar timeInterval
+)
+{
+// printf("setVelocity!\n");
+// printf(" interval: %f\n", timeInterval);
+// printf(" velocity: (%f, %f, %f)\n",
+// velocity.x(), velocity.y(), velocity.z());
+
+ m_useWalkDirection = false;
+ m_walkDirection = velocity;
+ m_normalizedDirection = getNormalizedVector(m_walkDirection);
+ m_velocityTimeInterval = timeInterval;
+}
+
+
+
+void btKinematicCharacterController::reset ()
+{
+}
+
+void btKinematicCharacterController::warp (const btVector3& origin)
+{
+ btTransform xform;
+ xform.setIdentity();
+ xform.setOrigin (origin);
+ m_ghostObject->setWorldTransform (xform);
+}
+
+
+void btKinematicCharacterController::preStep ( btCollisionWorld* collisionWorld)
+{
+
+ int numPenetrationLoops = 0;
+ m_touchingContact = false;
+ while (recoverFromPenetration (collisionWorld))
+ {
+ numPenetrationLoops++;
+ m_touchingContact = true;
+ if (numPenetrationLoops > 4)
+ {
+ //printf("character could not recover from penetration = %d\n", numPenetrationLoops);
+ break;
+ }
+ }
+
+ m_currentPosition = m_ghostObject->getWorldTransform().getOrigin();
+ m_targetPosition = m_currentPosition;
+// printf("m_targetPosition=%f,%f,%f\n",m_targetPosition[0],m_targetPosition[1],m_targetPosition[2]);
+
+
+}
+
+#include <stdio.h>
+
+void btKinematicCharacterController::playerStep ( btCollisionWorld* collisionWorld, btScalar dt)
+{
+// printf("playerStep(): ");
+// printf(" dt = %f", dt);
+
+ // quick check...
+ if (!m_useWalkDirection && m_velocityTimeInterval <= 0.0) {
+// printf("\n");
+ return; // no motion
+ }
+
+ m_wasOnGround = onGround();
+
+ // Update fall velocity.
+ m_verticalVelocity -= m_gravity * dt;
+ if(m_verticalVelocity > 0.0 && m_verticalVelocity > m_jumpSpeed)
+ {
+ m_verticalVelocity = m_jumpSpeed;
+ }
+ if(m_verticalVelocity < 0.0 && btFabs(m_verticalVelocity) > btFabs(m_fallSpeed))
+ {
+ m_verticalVelocity = -btFabs(m_fallSpeed);
+ }
+ m_verticalOffset = m_verticalVelocity * dt;
+
+
+ btTransform xform;
+ xform = m_ghostObject->getWorldTransform ();
+
+// printf("walkDirection(%f,%f,%f)\n",walkDirection[0],walkDirection[1],walkDirection[2]);
+// printf("walkSpeed=%f\n",walkSpeed);
+
+ stepUp (collisionWorld);
+ if (m_useWalkDirection) {
+ stepForwardAndStrafe (collisionWorld, m_walkDirection);
+ } else {
+ //printf(" time: %f", m_velocityTimeInterval);
+ // still have some time left for moving!
+ btScalar dtMoving =
+ (dt < m_velocityTimeInterval) ? dt : m_velocityTimeInterval;
+ m_velocityTimeInterval -= dt;
+
+ // how far will we move while we are moving?
+ btVector3 move = m_walkDirection * dtMoving;
+
+ //printf(" dtMoving: %f", dtMoving);
+
+ // okay, step
+ stepForwardAndStrafe(collisionWorld, move);
+ }
+ stepDown (collisionWorld, dt);
+
+ // printf("\n");
+
+ xform.setOrigin (m_currentPosition);
+ m_ghostObject->setWorldTransform (xform);
+}
+
+void btKinematicCharacterController::setFallSpeed (btScalar fallSpeed)
+{
+ m_fallSpeed = fallSpeed;
+}
+
+void btKinematicCharacterController::setJumpSpeed (btScalar jumpSpeed)
+{
+ m_jumpSpeed = jumpSpeed;
+}
+
+void btKinematicCharacterController::setMaxJumpHeight (btScalar maxJumpHeight)
+{
+ m_maxJumpHeight = maxJumpHeight;
+}
+
+bool btKinematicCharacterController::canJump () const
+{
+ return onGround();
+}
+
+void btKinematicCharacterController::jump ()
+{
+ if (!canJump())
+ return;
+
+ m_verticalVelocity = m_jumpSpeed;
+ m_wasJumping = true;
+
+#if 0
+ currently no jumping.
+ btTransform xform;
+ m_rigidBody->getMotionState()->getWorldTransform (xform);
+ btVector3 up = xform.getBasis()[1];
+ up.normalize ();
+ btScalar magnitude = (btScalar(1.0)/m_rigidBody->getInvMass()) * btScalar(8.0);
+ m_rigidBody->applyCentralImpulse (up * magnitude);
+#endif
+}
+
+void btKinematicCharacterController::setGravity(btScalar gravity)
+{
+ m_gravity = gravity;
+}
+
+btScalar btKinematicCharacterController::getGravity() const
+{
+ return m_gravity;
+}
+
+void btKinematicCharacterController::setMaxSlope(btScalar slopeRadians)
+{
+ m_maxSlopeRadians = slopeRadians;
+ m_maxSlopeCosine = btCos(slopeRadians);
+}
+
+btScalar btKinematicCharacterController::getMaxSlope() const
+{
+ return m_maxSlopeRadians;
+}
+
+bool btKinematicCharacterController::onGround () const
+{
+ return m_verticalVelocity == 0.0 && m_verticalOffset == 0.0;
+}
+
+
+btVector3* btKinematicCharacterController::getUpAxisDirections()
+{
+ static btVector3 sUpAxisDirection[3] = { btVector3(1.0f, 0.0f, 0.0f), btVector3(0.0f, 1.0f, 0.0f), btVector3(0.0f, 0.0f, 1.0f) };
+
+ return sUpAxisDirection;
+}
+
+void btKinematicCharacterController::debugDraw(btIDebugDraw* debugDrawer)
+{
+}
diff --git a/tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.h b/tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.h
new file mode 100644
index 00000000..ad2f9f11
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Character/btKinematicCharacterController.h
@@ -0,0 +1,162 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_KINEMATIC_CHARACTER_CONTROLLER_H
+#define BT_KINEMATIC_CHARACTER_CONTROLLER_H
+
+#include "LinearMath/btVector3.h"
+
+#include "btCharacterControllerInterface.h"
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+
+
+class btCollisionShape;
+class btRigidBody;
+class btCollisionWorld;
+class btCollisionDispatcher;
+class btPairCachingGhostObject;
+
+///btKinematicCharacterController is an object that supports a sliding motion in a world.
+///It uses a ghost object and convex sweep test to test for upcoming collisions. This is combined with discrete collision detection to recover from penetrations.
+///Interaction between btKinematicCharacterController and dynamic rigid bodies needs to be explicity implemented by the user.
+class btKinematicCharacterController : public btCharacterControllerInterface
+{
+protected:
+
+ btScalar m_halfHeight;
+
+ btPairCachingGhostObject* m_ghostObject;
+ btConvexShape* m_convexShape;//is also in m_ghostObject, but it needs to be convex, so we store it here to avoid upcast
+
+ btScalar m_verticalVelocity;
+ btScalar m_verticalOffset;
+ btScalar m_fallSpeed;
+ btScalar m_jumpSpeed;
+ btScalar m_maxJumpHeight;
+ btScalar m_maxSlopeRadians; // Slope angle that is set (used for returning the exact value)
+ btScalar m_maxSlopeCosine; // Cosine equivalent of m_maxSlopeRadians (calculated once when set, for optimization)
+ btScalar m_gravity;
+
+ btScalar m_turnAngle;
+
+ btScalar m_stepHeight;
+
+ btScalar m_addedMargin;//@todo: remove this and fix the code
+
+ ///this is the desired walk direction, set by the user
+ btVector3 m_walkDirection;
+ btVector3 m_normalizedDirection;
+
+ //some internal variables
+ btVector3 m_currentPosition;
+ btScalar m_currentStepOffset;
+ btVector3 m_targetPosition;
+
+ ///keep track of the contact manifolds
+ btManifoldArray m_manifoldArray;
+
+ bool m_touchingContact;
+ btVector3 m_touchingNormal;
+
+ bool m_wasOnGround;
+ bool m_wasJumping;
+ bool m_useGhostObjectSweepTest;
+ bool m_useWalkDirection;
+ btScalar m_velocityTimeInterval;
+ int m_upAxis;
+
+ static btVector3* getUpAxisDirections();
+
+ btVector3 computeReflectionDirection (const btVector3& direction, const btVector3& normal);
+ btVector3 parallelComponent (const btVector3& direction, const btVector3& normal);
+ btVector3 perpindicularComponent (const btVector3& direction, const btVector3& normal);
+
+ bool recoverFromPenetration ( btCollisionWorld* collisionWorld);
+ void stepUp (btCollisionWorld* collisionWorld);
+ void updateTargetPositionBasedOnCollision (const btVector3& hit_normal, btScalar tangentMag = btScalar(0.0), btScalar normalMag = btScalar(1.0));
+ void stepForwardAndStrafe (btCollisionWorld* collisionWorld, const btVector3& walkMove);
+ void stepDown (btCollisionWorld* collisionWorld, btScalar dt);
+public:
+ btKinematicCharacterController (btPairCachingGhostObject* ghostObject,btConvexShape* convexShape,btScalar stepHeight, int upAxis = 1);
+ ~btKinematicCharacterController ();
+
+
+ ///btActionInterface interface
+ virtual void updateAction( btCollisionWorld* collisionWorld,btScalar deltaTime)
+ {
+ preStep ( collisionWorld);
+ playerStep (collisionWorld, deltaTime);
+ }
+
+ ///btActionInterface interface
+ void debugDraw(btIDebugDraw* debugDrawer);
+
+ void setUpAxis (int axis)
+ {
+ if (axis < 0)
+ axis = 0;
+ if (axis > 2)
+ axis = 2;
+ m_upAxis = axis;
+ }
+
+ /// This should probably be called setPositionIncrementPerSimulatorStep.
+ /// This is neither a direction nor a velocity, but the amount to
+ /// increment the position each simulation iteration, regardless
+ /// of dt.
+ /// This call will reset any velocity set by setVelocityForTimeInterval().
+ virtual void setWalkDirection(const btVector3& walkDirection);
+
+ /// Caller provides a velocity with which the character should move for
+ /// the given time period. After the time period, velocity is reset
+ /// to zero.
+ /// This call will reset any walk direction set by setWalkDirection().
+ /// Negative time intervals will result in no motion.
+ virtual void setVelocityForTimeInterval(const btVector3& velocity,
+ btScalar timeInterval);
+
+ void reset ();
+ void warp (const btVector3& origin);
+
+ void preStep ( btCollisionWorld* collisionWorld);
+ void playerStep ( btCollisionWorld* collisionWorld, btScalar dt);
+
+ void setFallSpeed (btScalar fallSpeed);
+ void setJumpSpeed (btScalar jumpSpeed);
+ void setMaxJumpHeight (btScalar maxJumpHeight);
+ bool canJump () const;
+
+ void jump ();
+
+ void setGravity(btScalar gravity);
+ btScalar getGravity() const;
+
+ /// The max slope determines the maximum angle that the controller can walk up.
+ /// The slope angle is measured in radians.
+ void setMaxSlope(btScalar slopeRadians);
+ btScalar getMaxSlope() const;
+
+ btPairCachingGhostObject* getGhostObject();
+ void setUseGhostSweepTest(bool useGhostObjectSweepTest)
+ {
+ m_useGhostObjectSweepTest = useGhostObjectSweepTest;
+ }
+
+ bool onGround () const;
+};
+
+#endif // BT_KINEMATIC_CHARACTER_CONTROLLER_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
new file mode 100644
index 00000000..bc371e40
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
@@ -0,0 +1,1127 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+btConeTwistConstraint is Copyright (c) 2007 Starbreeze Studios
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+Written by: Marcus Hennix
+*/
+
+
+#include "btConeTwistConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+#include "LinearMath/btMinMax.h"
+#include <new>
+
+
+
+//#define CONETWIST_USE_OBSOLETE_SOLVER true
+#define CONETWIST_USE_OBSOLETE_SOLVER false
+#define CONETWIST_DEF_FIX_THRESH btScalar(.05f)
+
+
+SIMD_FORCE_INLINE btScalar computeAngularImpulseDenominator(const btVector3& axis, const btMatrix3x3& invInertiaWorld)
+{
+ btVector3 vec = axis * invInertiaWorld;
+ return axis.dot(vec);
+}
+
+
+
+
+btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB,
+ const btTransform& rbAFrame,const btTransform& rbBFrame)
+ :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame),
+ m_angularOnly(false),
+ m_useSolveConstraintObsolete(CONETWIST_USE_OBSOLETE_SOLVER)
+{
+ init();
+}
+
+btConeTwistConstraint::btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame)
+ :btTypedConstraint(CONETWIST_CONSTRAINT_TYPE,rbA),m_rbAFrame(rbAFrame),
+ m_angularOnly(false),
+ m_useSolveConstraintObsolete(CONETWIST_USE_OBSOLETE_SOLVER)
+{
+ m_rbBFrame = m_rbAFrame;
+ init();
+}
+
+
+void btConeTwistConstraint::init()
+{
+ m_angularOnly = false;
+ m_solveTwistLimit = false;
+ m_solveSwingLimit = false;
+ m_bMotorEnabled = false;
+ m_maxMotorImpulse = btScalar(-1);
+
+ setLimit(btScalar(BT_LARGE_FLOAT), btScalar(BT_LARGE_FLOAT), btScalar(BT_LARGE_FLOAT));
+ m_damping = btScalar(0.01);
+ m_fixThresh = CONETWIST_DEF_FIX_THRESH;
+ m_flags = 0;
+ m_linCFM = btScalar(0.f);
+ m_linERP = btScalar(0.7f);
+ m_angCFM = btScalar(0.f);
+}
+
+
+void btConeTwistConstraint::getInfo1 (btConstraintInfo1* info)
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ info->m_numConstraintRows = 0;
+ info->nub = 0;
+ }
+ else
+ {
+ info->m_numConstraintRows = 3;
+ info->nub = 3;
+ calcAngleInfo2(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform(),m_rbA.getInvInertiaTensorWorld(),m_rbB.getInvInertiaTensorWorld());
+ if(m_solveSwingLimit)
+ {
+ info->m_numConstraintRows++;
+ info->nub--;
+ if((m_swingSpan1 < m_fixThresh) && (m_swingSpan2 < m_fixThresh))
+ {
+ info->m_numConstraintRows++;
+ info->nub--;
+ }
+ }
+ if(m_solveTwistLimit)
+ {
+ info->m_numConstraintRows++;
+ info->nub--;
+ }
+ }
+}
+
+void btConeTwistConstraint::getInfo1NonVirtual (btConstraintInfo1* info)
+{
+ //always reserve 6 rows: object transform is not available on SPU
+ info->m_numConstraintRows = 6;
+ info->nub = 0;
+
+}
+
+
+void btConeTwistConstraint::getInfo2 (btConstraintInfo2* info)
+{
+ getInfo2NonVirtual(info,m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform(),m_rbA.getInvInertiaTensorWorld(),m_rbB.getInvInertiaTensorWorld());
+}
+
+void btConeTwistConstraint::getInfo2NonVirtual (btConstraintInfo2* info,const btTransform& transA,const btTransform& transB,const btMatrix3x3& invInertiaWorldA,const btMatrix3x3& invInertiaWorldB)
+{
+ calcAngleInfo2(transA,transB,invInertiaWorldA,invInertiaWorldB);
+
+ btAssert(!m_useSolveConstraintObsolete);
+ // set jacobian
+ info->m_J1linearAxis[0] = 1;
+ info->m_J1linearAxis[info->rowskip+1] = 1;
+ info->m_J1linearAxis[2*info->rowskip+2] = 1;
+ btVector3 a1 = transA.getBasis() * m_rbAFrame.getOrigin();
+ {
+ btVector3* angular0 = (btVector3*)(info->m_J1angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J1angularAxis+info->rowskip);
+ btVector3* angular2 = (btVector3*)(info->m_J1angularAxis+2*info->rowskip);
+ btVector3 a1neg = -a1;
+ a1neg.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+ btVector3 a2 = transB.getBasis() * m_rbBFrame.getOrigin();
+ {
+ btVector3* angular0 = (btVector3*)(info->m_J2angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J2angularAxis+info->rowskip);
+ btVector3* angular2 = (btVector3*)(info->m_J2angularAxis+2*info->rowskip);
+ a2.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+ // set right hand side
+ btScalar linERP = (m_flags & BT_CONETWIST_FLAGS_LIN_ERP) ? m_linERP : info->erp;
+ btScalar k = info->fps * linERP;
+ int j;
+ for (j=0; j<3; j++)
+ {
+ info->m_constraintError[j*info->rowskip] = k * (a2[j] + transB.getOrigin()[j] - a1[j] - transA.getOrigin()[j]);
+ info->m_lowerLimit[j*info->rowskip] = -SIMD_INFINITY;
+ info->m_upperLimit[j*info->rowskip] = SIMD_INFINITY;
+ if(m_flags & BT_CONETWIST_FLAGS_LIN_CFM)
+ {
+ info->cfm[j*info->rowskip] = m_linCFM;
+ }
+ }
+ int row = 3;
+ int srow = row * info->rowskip;
+ btVector3 ax1;
+ // angular limits
+ if(m_solveSwingLimit)
+ {
+ btScalar *J1 = info->m_J1angularAxis;
+ btScalar *J2 = info->m_J2angularAxis;
+ if((m_swingSpan1 < m_fixThresh) && (m_swingSpan2 < m_fixThresh))
+ {
+ btTransform trA = transA*m_rbAFrame;
+ btVector3 p = trA.getBasis().getColumn(1);
+ btVector3 q = trA.getBasis().getColumn(2);
+ int srow1 = srow + info->rowskip;
+ J1[srow+0] = p[0];
+ J1[srow+1] = p[1];
+ J1[srow+2] = p[2];
+ J1[srow1+0] = q[0];
+ J1[srow1+1] = q[1];
+ J1[srow1+2] = q[2];
+ J2[srow+0] = -p[0];
+ J2[srow+1] = -p[1];
+ J2[srow+2] = -p[2];
+ J2[srow1+0] = -q[0];
+ J2[srow1+1] = -q[1];
+ J2[srow1+2] = -q[2];
+ btScalar fact = info->fps * m_relaxationFactor;
+ info->m_constraintError[srow] = fact * m_swingAxis.dot(p);
+ info->m_constraintError[srow1] = fact * m_swingAxis.dot(q);
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ info->m_lowerLimit[srow1] = -SIMD_INFINITY;
+ info->m_upperLimit[srow1] = SIMD_INFINITY;
+ srow = srow1 + info->rowskip;
+ }
+ else
+ {
+ ax1 = m_swingAxis * m_relaxationFactor * m_relaxationFactor;
+ J1[srow+0] = ax1[0];
+ J1[srow+1] = ax1[1];
+ J1[srow+2] = ax1[2];
+ J2[srow+0] = -ax1[0];
+ J2[srow+1] = -ax1[1];
+ J2[srow+2] = -ax1[2];
+ btScalar k = info->fps * m_biasFactor;
+
+ info->m_constraintError[srow] = k * m_swingCorrection;
+ if(m_flags & BT_CONETWIST_FLAGS_ANG_CFM)
+ {
+ info->cfm[srow] = m_angCFM;
+ }
+ // m_swingCorrection is always positive or 0
+ info->m_lowerLimit[srow] = 0;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ srow += info->rowskip;
+ }
+ }
+ if(m_solveTwistLimit)
+ {
+ ax1 = m_twistAxis * m_relaxationFactor * m_relaxationFactor;
+ btScalar *J1 = info->m_J1angularAxis;
+ btScalar *J2 = info->m_J2angularAxis;
+ J1[srow+0] = ax1[0];
+ J1[srow+1] = ax1[1];
+ J1[srow+2] = ax1[2];
+ J2[srow+0] = -ax1[0];
+ J2[srow+1] = -ax1[1];
+ J2[srow+2] = -ax1[2];
+ btScalar k = info->fps * m_biasFactor;
+ info->m_constraintError[srow] = k * m_twistCorrection;
+ if(m_flags & BT_CONETWIST_FLAGS_ANG_CFM)
+ {
+ info->cfm[srow] = m_angCFM;
+ }
+ if(m_twistSpan > 0.0f)
+ {
+
+ if(m_twistCorrection > 0.0f)
+ {
+ info->m_lowerLimit[srow] = 0;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else
+ {
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = 0;
+ }
+ }
+ else
+ {
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ srow += info->rowskip;
+ }
+}
+
+
+
+void btConeTwistConstraint::buildJacobian()
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ m_appliedImpulse = btScalar(0.);
+ m_accTwistLimitImpulse = btScalar(0.);
+ m_accSwingLimitImpulse = btScalar(0.);
+ m_accMotorImpulse = btVector3(0.,0.,0.);
+
+ if (!m_angularOnly)
+ {
+ btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin();
+ btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin();
+ btVector3 relPos = pivotBInW - pivotAInW;
+
+ btVector3 normal[3];
+ if (relPos.length2() > SIMD_EPSILON)
+ {
+ normal[0] = relPos.normalized();
+ }
+ else
+ {
+ normal[0].setValue(btScalar(1.0),0,0);
+ }
+
+ btPlaneSpace1(normal[0], normal[1], normal[2]);
+
+ for (int i=0;i<3;i++)
+ {
+ new (&m_jac[i]) btJacobianEntry(
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ pivotAInW - m_rbA.getCenterOfMassPosition(),
+ pivotBInW - m_rbB.getCenterOfMassPosition(),
+ normal[i],
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbA.getInvMass(),
+ m_rbB.getInvInertiaDiagLocal(),
+ m_rbB.getInvMass());
+ }
+ }
+
+ calcAngleInfo2(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform(),m_rbA.getInvInertiaTensorWorld(),m_rbB.getInvInertiaTensorWorld());
+ }
+}
+
+
+
+void btConeTwistConstraint::solveConstraintObsolete(btRigidBody& bodyA,btRigidBody& bodyB,btScalar timeStep)
+{
+ #ifndef __SPU__
+ if (m_useSolveConstraintObsolete)
+ {
+ btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin();
+ btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin();
+
+ btScalar tau = btScalar(0.3);
+
+ //linear part
+ if (!m_angularOnly)
+ {
+ btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition();
+ btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition();
+
+ btVector3 vel1;
+ bodyA.internalGetVelocityInLocalPointObsolete(rel_pos1,vel1);
+ btVector3 vel2;
+ bodyB.internalGetVelocityInLocalPointObsolete(rel_pos2,vel2);
+ btVector3 vel = vel1 - vel2;
+
+ for (int i=0;i<3;i++)
+ {
+ const btVector3& normal = m_jac[i].m_linearJointAxis;
+ btScalar jacDiagABInv = btScalar(1.) / m_jac[i].getDiagonal();
+
+ btScalar rel_vel;
+ rel_vel = normal.dot(vel);
+ //positional error (zeroth order error)
+ btScalar depth = -(pivotAInW - pivotBInW).dot(normal); //this is the error projected on the normal
+ btScalar impulse = depth*tau/timeStep * jacDiagABInv - rel_vel * jacDiagABInv;
+ m_appliedImpulse += impulse;
+
+ btVector3 ftorqueAxis1 = rel_pos1.cross(normal);
+ btVector3 ftorqueAxis2 = rel_pos2.cross(normal);
+ bodyA.internalApplyImpulse(normal*m_rbA.getInvMass(), m_rbA.getInvInertiaTensorWorld()*ftorqueAxis1,impulse);
+ bodyB.internalApplyImpulse(normal*m_rbB.getInvMass(), m_rbB.getInvInertiaTensorWorld()*ftorqueAxis2,-impulse);
+
+ }
+ }
+
+ // apply motor
+ if (m_bMotorEnabled)
+ {
+ // compute current and predicted transforms
+ btTransform trACur = m_rbA.getCenterOfMassTransform();
+ btTransform trBCur = m_rbB.getCenterOfMassTransform();
+ btVector3 omegaA; bodyA.internalGetAngularVelocity(omegaA);
+ btVector3 omegaB; bodyB.internalGetAngularVelocity(omegaB);
+ btTransform trAPred; trAPred.setIdentity();
+ btVector3 zerovec(0,0,0);
+ btTransformUtil::integrateTransform(
+ trACur, zerovec, omegaA, timeStep, trAPred);
+ btTransform trBPred; trBPred.setIdentity();
+ btTransformUtil::integrateTransform(
+ trBCur, zerovec, omegaB, timeStep, trBPred);
+
+ // compute desired transforms in world
+ btTransform trPose(m_qTarget);
+ btTransform trABDes = m_rbBFrame * trPose * m_rbAFrame.inverse();
+ btTransform trADes = trBPred * trABDes;
+ btTransform trBDes = trAPred * trABDes.inverse();
+
+ // compute desired omegas in world
+ btVector3 omegaADes, omegaBDes;
+
+ btTransformUtil::calculateVelocity(trACur, trADes, timeStep, zerovec, omegaADes);
+ btTransformUtil::calculateVelocity(trBCur, trBDes, timeStep, zerovec, omegaBDes);
+
+ // compute delta omegas
+ btVector3 dOmegaA = omegaADes - omegaA;
+ btVector3 dOmegaB = omegaBDes - omegaB;
+
+ // compute weighted avg axis of dOmega (weighting based on inertias)
+ btVector3 axisA, axisB;
+ btScalar kAxisAInv = 0, kAxisBInv = 0;
+
+ if (dOmegaA.length2() > SIMD_EPSILON)
+ {
+ axisA = dOmegaA.normalized();
+ kAxisAInv = getRigidBodyA().computeAngularImpulseDenominator(axisA);
+ }
+
+ if (dOmegaB.length2() > SIMD_EPSILON)
+ {
+ axisB = dOmegaB.normalized();
+ kAxisBInv = getRigidBodyB().computeAngularImpulseDenominator(axisB);
+ }
+
+ btVector3 avgAxis = kAxisAInv * axisA + kAxisBInv * axisB;
+
+ static bool bDoTorque = true;
+ if (bDoTorque && avgAxis.length2() > SIMD_EPSILON)
+ {
+ avgAxis.normalize();
+ kAxisAInv = getRigidBodyA().computeAngularImpulseDenominator(avgAxis);
+ kAxisBInv = getRigidBodyB().computeAngularImpulseDenominator(avgAxis);
+ btScalar kInvCombined = kAxisAInv + kAxisBInv;
+
+ btVector3 impulse = (kAxisAInv * dOmegaA - kAxisBInv * dOmegaB) /
+ (kInvCombined * kInvCombined);
+
+ if (m_maxMotorImpulse >= 0)
+ {
+ btScalar fMaxImpulse = m_maxMotorImpulse;
+ if (m_bNormalizedMotorStrength)
+ fMaxImpulse = fMaxImpulse/kAxisAInv;
+
+ btVector3 newUnclampedAccImpulse = m_accMotorImpulse + impulse;
+ btScalar newUnclampedMag = newUnclampedAccImpulse.length();
+ if (newUnclampedMag > fMaxImpulse)
+ {
+ newUnclampedAccImpulse.normalize();
+ newUnclampedAccImpulse *= fMaxImpulse;
+ impulse = newUnclampedAccImpulse - m_accMotorImpulse;
+ }
+ m_accMotorImpulse += impulse;
+ }
+
+ btScalar impulseMag = impulse.length();
+ btVector3 impulseAxis = impulse / impulseMag;
+
+ bodyA.internalApplyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*impulseAxis, impulseMag);
+ bodyB.internalApplyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*impulseAxis, -impulseMag);
+
+ }
+ }
+ else if (m_damping > SIMD_EPSILON) // no motor: do a little damping
+ {
+ btVector3 angVelA; bodyA.internalGetAngularVelocity(angVelA);
+ btVector3 angVelB; bodyB.internalGetAngularVelocity(angVelB);
+ btVector3 relVel = angVelB - angVelA;
+ if (relVel.length2() > SIMD_EPSILON)
+ {
+ btVector3 relVelAxis = relVel.normalized();
+ btScalar m_kDamping = btScalar(1.) /
+ (getRigidBodyA().computeAngularImpulseDenominator(relVelAxis) +
+ getRigidBodyB().computeAngularImpulseDenominator(relVelAxis));
+ btVector3 impulse = m_damping * m_kDamping * relVel;
+
+ btScalar impulseMag = impulse.length();
+ btVector3 impulseAxis = impulse / impulseMag;
+ bodyA.internalApplyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*impulseAxis, impulseMag);
+ bodyB.internalApplyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*impulseAxis, -impulseMag);
+ }
+ }
+
+ // joint limits
+ {
+ ///solve angular part
+ btVector3 angVelA;
+ bodyA.internalGetAngularVelocity(angVelA);
+ btVector3 angVelB;
+ bodyB.internalGetAngularVelocity(angVelB);
+
+ // solve swing limit
+ if (m_solveSwingLimit)
+ {
+ btScalar amplitude = m_swingLimitRatio * m_swingCorrection*m_biasFactor/timeStep;
+ btScalar relSwingVel = (angVelB - angVelA).dot(m_swingAxis);
+ if (relSwingVel > 0)
+ amplitude += m_swingLimitRatio * relSwingVel * m_relaxationFactor;
+ btScalar impulseMag = amplitude * m_kSwing;
+
+ // Clamp the accumulated impulse
+ btScalar temp = m_accSwingLimitImpulse;
+ m_accSwingLimitImpulse = btMax(m_accSwingLimitImpulse + impulseMag, btScalar(0.0) );
+ impulseMag = m_accSwingLimitImpulse - temp;
+
+ btVector3 impulse = m_swingAxis * impulseMag;
+
+ // don't let cone response affect twist
+ // (this can happen since body A's twist doesn't match body B's AND we use an elliptical cone limit)
+ {
+ btVector3 impulseTwistCouple = impulse.dot(m_twistAxisA) * m_twistAxisA;
+ btVector3 impulseNoTwistCouple = impulse - impulseTwistCouple;
+ impulse = impulseNoTwistCouple;
+ }
+
+ impulseMag = impulse.length();
+ btVector3 noTwistSwingAxis = impulse / impulseMag;
+
+ bodyA.internalApplyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*noTwistSwingAxis, impulseMag);
+ bodyB.internalApplyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*noTwistSwingAxis, -impulseMag);
+ }
+
+
+ // solve twist limit
+ if (m_solveTwistLimit)
+ {
+ btScalar amplitude = m_twistLimitRatio * m_twistCorrection*m_biasFactor/timeStep;
+ btScalar relTwistVel = (angVelB - angVelA).dot( m_twistAxis );
+ if (relTwistVel > 0) // only damp when moving towards limit (m_twistAxis flipping is important)
+ amplitude += m_twistLimitRatio * relTwistVel * m_relaxationFactor;
+ btScalar impulseMag = amplitude * m_kTwist;
+
+ // Clamp the accumulated impulse
+ btScalar temp = m_accTwistLimitImpulse;
+ m_accTwistLimitImpulse = btMax(m_accTwistLimitImpulse + impulseMag, btScalar(0.0) );
+ impulseMag = m_accTwistLimitImpulse - temp;
+
+ btVector3 impulse = m_twistAxis * impulseMag;
+
+ bodyA.internalApplyImpulse(btVector3(0,0,0), m_rbA.getInvInertiaTensorWorld()*m_twistAxis,impulseMag);
+ bodyB.internalApplyImpulse(btVector3(0,0,0), m_rbB.getInvInertiaTensorWorld()*m_twistAxis,-impulseMag);
+ }
+ }
+ }
+#else
+btAssert(0);
+#endif //__SPU__
+}
+
+
+
+
+void btConeTwistConstraint::updateRHS(btScalar timeStep)
+{
+ (void)timeStep;
+
+}
+
+
+#ifndef __SPU__
+void btConeTwistConstraint::calcAngleInfo()
+{
+ m_swingCorrection = btScalar(0.);
+ m_twistLimitSign = btScalar(0.);
+ m_solveTwistLimit = false;
+ m_solveSwingLimit = false;
+
+ btVector3 b1Axis1,b1Axis2,b1Axis3;
+ btVector3 b2Axis1,b2Axis2;
+
+ b1Axis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(0);
+ b2Axis1 = getRigidBodyB().getCenterOfMassTransform().getBasis() * this->m_rbBFrame.getBasis().getColumn(0);
+
+ btScalar swing1=btScalar(0.),swing2 = btScalar(0.);
+
+ btScalar swx=btScalar(0.),swy = btScalar(0.);
+ btScalar thresh = btScalar(10.);
+ btScalar fact;
+
+ // Get Frame into world space
+ if (m_swingSpan1 >= btScalar(0.05f))
+ {
+ b1Axis2 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(1);
+ swx = b2Axis1.dot(b1Axis1);
+ swy = b2Axis1.dot(b1Axis2);
+ swing1 = btAtan2Fast(swy, swx);
+ fact = (swy*swy + swx*swx) * thresh * thresh;
+ fact = fact / (fact + btScalar(1.0));
+ swing1 *= fact;
+ }
+
+ if (m_swingSpan2 >= btScalar(0.05f))
+ {
+ b1Axis3 = getRigidBodyA().getCenterOfMassTransform().getBasis() * this->m_rbAFrame.getBasis().getColumn(2);
+ swx = b2Axis1.dot(b1Axis1);
+ swy = b2Axis1.dot(b1Axis3);
+ swing2 = btAtan2Fast(swy, swx);
+ fact = (swy*swy + swx*swx) * thresh * thresh;
+ fact = fact / (fact + btScalar(1.0));
+ swing2 *= fact;
+ }
+
+ btScalar RMaxAngle1Sq = 1.0f / (m_swingSpan1*m_swingSpan1);
+ btScalar RMaxAngle2Sq = 1.0f / (m_swingSpan2*m_swingSpan2);
+ btScalar EllipseAngle = btFabs(swing1*swing1)* RMaxAngle1Sq + btFabs(swing2*swing2) * RMaxAngle2Sq;
+
+ if (EllipseAngle > 1.0f)
+ {
+ m_swingCorrection = EllipseAngle-1.0f;
+ m_solveSwingLimit = true;
+ // Calculate necessary axis & factors
+ m_swingAxis = b2Axis1.cross(b1Axis2* b2Axis1.dot(b1Axis2) + b1Axis3* b2Axis1.dot(b1Axis3));
+ m_swingAxis.normalize();
+ btScalar swingAxisSign = (b2Axis1.dot(b1Axis1) >= 0.0f) ? 1.0f : -1.0f;
+ m_swingAxis *= swingAxisSign;
+ }
+
+ // Twist limits
+ if (m_twistSpan >= btScalar(0.))
+ {
+ btVector3 b2Axis2 = getRigidBodyB().getCenterOfMassTransform().getBasis() * this->m_rbBFrame.getBasis().getColumn(1);
+ btQuaternion rotationArc = shortestArcQuat(b2Axis1,b1Axis1);
+ btVector3 TwistRef = quatRotate(rotationArc,b2Axis2);
+ btScalar twist = btAtan2Fast( TwistRef.dot(b1Axis3), TwistRef.dot(b1Axis2) );
+ m_twistAngle = twist;
+
+// btScalar lockedFreeFactor = (m_twistSpan > btScalar(0.05f)) ? m_limitSoftness : btScalar(0.);
+ btScalar lockedFreeFactor = (m_twistSpan > btScalar(0.05f)) ? btScalar(1.0f) : btScalar(0.);
+ if (twist <= -m_twistSpan*lockedFreeFactor)
+ {
+ m_twistCorrection = -(twist + m_twistSpan);
+ m_solveTwistLimit = true;
+ m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f;
+ m_twistAxis.normalize();
+ m_twistAxis *= -1.0f;
+ }
+ else if (twist > m_twistSpan*lockedFreeFactor)
+ {
+ m_twistCorrection = (twist - m_twistSpan);
+ m_solveTwistLimit = true;
+ m_twistAxis = (b2Axis1 + b1Axis1) * 0.5f;
+ m_twistAxis.normalize();
+ }
+ }
+}
+#endif //__SPU__
+
+static btVector3 vTwist(1,0,0); // twist axis in constraint's space
+
+
+
+void btConeTwistConstraint::calcAngleInfo2(const btTransform& transA, const btTransform& transB, const btMatrix3x3& invInertiaWorldA,const btMatrix3x3& invInertiaWorldB)
+{
+ m_swingCorrection = btScalar(0.);
+ m_twistLimitSign = btScalar(0.);
+ m_solveTwistLimit = false;
+ m_solveSwingLimit = false;
+ // compute rotation of A wrt B (in constraint space)
+ if (m_bMotorEnabled && (!m_useSolveConstraintObsolete))
+ { // it is assumed that setMotorTarget() was alredy called
+ // and motor target m_qTarget is within constraint limits
+ // TODO : split rotation to pure swing and pure twist
+ // compute desired transforms in world
+ btTransform trPose(m_qTarget);
+ btTransform trA = transA * m_rbAFrame;
+ btTransform trB = transB * m_rbBFrame;
+ btTransform trDeltaAB = trB * trPose * trA.inverse();
+ btQuaternion qDeltaAB = trDeltaAB.getRotation();
+ btVector3 swingAxis = btVector3(qDeltaAB.x(), qDeltaAB.y(), qDeltaAB.z());
+ m_swingAxis = swingAxis;
+ m_swingAxis.normalize();
+ m_swingCorrection = qDeltaAB.getAngle();
+ if(!btFuzzyZero(m_swingCorrection))
+ {
+ m_solveSwingLimit = true;
+ }
+ return;
+ }
+
+
+ {
+ // compute rotation of A wrt B (in constraint space)
+ btQuaternion qA = transA.getRotation() * m_rbAFrame.getRotation();
+ btQuaternion qB = transB.getRotation() * m_rbBFrame.getRotation();
+ btQuaternion qAB = qB.inverse() * qA;
+ // split rotation into cone and twist
+ // (all this is done from B's perspective. Maybe I should be averaging axes...)
+ btVector3 vConeNoTwist = quatRotate(qAB, vTwist); vConeNoTwist.normalize();
+ btQuaternion qABCone = shortestArcQuat(vTwist, vConeNoTwist); qABCone.normalize();
+ btQuaternion qABTwist = qABCone.inverse() * qAB; qABTwist.normalize();
+
+ if (m_swingSpan1 >= m_fixThresh && m_swingSpan2 >= m_fixThresh)
+ {
+ btScalar swingAngle, swingLimit = 0; btVector3 swingAxis;
+ computeConeLimitInfo(qABCone, swingAngle, swingAxis, swingLimit);
+
+ if (swingAngle > swingLimit * m_limitSoftness)
+ {
+ m_solveSwingLimit = true;
+
+ // compute limit ratio: 0->1, where
+ // 0 == beginning of soft limit
+ // 1 == hard/real limit
+ m_swingLimitRatio = 1.f;
+ if (swingAngle < swingLimit && m_limitSoftness < 1.f - SIMD_EPSILON)
+ {
+ m_swingLimitRatio = (swingAngle - swingLimit * m_limitSoftness)/
+ (swingLimit - swingLimit * m_limitSoftness);
+ }
+
+ // swing correction tries to get back to soft limit
+ m_swingCorrection = swingAngle - (swingLimit * m_limitSoftness);
+
+ // adjustment of swing axis (based on ellipse normal)
+ adjustSwingAxisToUseEllipseNormal(swingAxis);
+
+ // Calculate necessary axis & factors
+ m_swingAxis = quatRotate(qB, -swingAxis);
+
+ m_twistAxisA.setValue(0,0,0);
+
+ m_kSwing = btScalar(1.) /
+ (computeAngularImpulseDenominator(m_swingAxis,invInertiaWorldA) +
+ computeAngularImpulseDenominator(m_swingAxis,invInertiaWorldB));
+ }
+ }
+ else
+ {
+ // you haven't set any limits;
+ // or you're trying to set at least one of the swing limits too small. (if so, do you really want a conetwist constraint?)
+ // anyway, we have either hinge or fixed joint
+ btVector3 ivA = transA.getBasis() * m_rbAFrame.getBasis().getColumn(0);
+ btVector3 jvA = transA.getBasis() * m_rbAFrame.getBasis().getColumn(1);
+ btVector3 kvA = transA.getBasis() * m_rbAFrame.getBasis().getColumn(2);
+ btVector3 ivB = transB.getBasis() * m_rbBFrame.getBasis().getColumn(0);
+ btVector3 target;
+ btScalar x = ivB.dot(ivA);
+ btScalar y = ivB.dot(jvA);
+ btScalar z = ivB.dot(kvA);
+ if((m_swingSpan1 < m_fixThresh) && (m_swingSpan2 < m_fixThresh))
+ { // fixed. We'll need to add one more row to constraint
+ if((!btFuzzyZero(y)) || (!(btFuzzyZero(z))))
+ {
+ m_solveSwingLimit = true;
+ m_swingAxis = -ivB.cross(ivA);
+ }
+ }
+ else
+ {
+ if(m_swingSpan1 < m_fixThresh)
+ { // hinge around Y axis
+ if(!(btFuzzyZero(y)))
+ {
+ m_solveSwingLimit = true;
+ if(m_swingSpan2 >= m_fixThresh)
+ {
+ y = btScalar(0.f);
+ btScalar span2 = btAtan2(z, x);
+ if(span2 > m_swingSpan2)
+ {
+ x = btCos(m_swingSpan2);
+ z = btSin(m_swingSpan2);
+ }
+ else if(span2 < -m_swingSpan2)
+ {
+ x = btCos(m_swingSpan2);
+ z = -btSin(m_swingSpan2);
+ }
+ }
+ }
+ }
+ else
+ { // hinge around Z axis
+ if(!btFuzzyZero(z))
+ {
+ m_solveSwingLimit = true;
+ if(m_swingSpan1 >= m_fixThresh)
+ {
+ z = btScalar(0.f);
+ btScalar span1 = btAtan2(y, x);
+ if(span1 > m_swingSpan1)
+ {
+ x = btCos(m_swingSpan1);
+ y = btSin(m_swingSpan1);
+ }
+ else if(span1 < -m_swingSpan1)
+ {
+ x = btCos(m_swingSpan1);
+ y = -btSin(m_swingSpan1);
+ }
+ }
+ }
+ }
+ target[0] = x * ivA[0] + y * jvA[0] + z * kvA[0];
+ target[1] = x * ivA[1] + y * jvA[1] + z * kvA[1];
+ target[2] = x * ivA[2] + y * jvA[2] + z * kvA[2];
+ target.normalize();
+ m_swingAxis = -ivB.cross(target);
+ m_swingCorrection = m_swingAxis.length();
+ m_swingAxis.normalize();
+ }
+ }
+
+ if (m_twistSpan >= btScalar(0.f))
+ {
+ btVector3 twistAxis;
+ computeTwistLimitInfo(qABTwist, m_twistAngle, twistAxis);
+
+ if (m_twistAngle > m_twistSpan*m_limitSoftness)
+ {
+ m_solveTwistLimit = true;
+
+ m_twistLimitRatio = 1.f;
+ if (m_twistAngle < m_twistSpan && m_limitSoftness < 1.f - SIMD_EPSILON)
+ {
+ m_twistLimitRatio = (m_twistAngle - m_twistSpan * m_limitSoftness)/
+ (m_twistSpan - m_twistSpan * m_limitSoftness);
+ }
+
+ // twist correction tries to get back to soft limit
+ m_twistCorrection = m_twistAngle - (m_twistSpan * m_limitSoftness);
+
+ m_twistAxis = quatRotate(qB, -twistAxis);
+
+ m_kTwist = btScalar(1.) /
+ (computeAngularImpulseDenominator(m_twistAxis,invInertiaWorldA) +
+ computeAngularImpulseDenominator(m_twistAxis,invInertiaWorldB));
+ }
+
+ if (m_solveSwingLimit)
+ m_twistAxisA = quatRotate(qA, -twistAxis);
+ }
+ else
+ {
+ m_twistAngle = btScalar(0.f);
+ }
+ }
+}
+
+
+
+// given a cone rotation in constraint space, (pre: twist must already be removed)
+// this method computes its corresponding swing angle and axis.
+// more interestingly, it computes the cone/swing limit (angle) for this cone "pose".
+void btConeTwistConstraint::computeConeLimitInfo(const btQuaternion& qCone,
+ btScalar& swingAngle, // out
+ btVector3& vSwingAxis, // out
+ btScalar& swingLimit) // out
+{
+ swingAngle = qCone.getAngle();
+ if (swingAngle > SIMD_EPSILON)
+ {
+ vSwingAxis = btVector3(qCone.x(), qCone.y(), qCone.z());
+ vSwingAxis.normalize();
+ if (fabs(vSwingAxis.x()) > SIMD_EPSILON)
+ {
+ // non-zero twist?! this should never happen.
+ int wtf = 0; wtf = wtf;
+ }
+
+ // Compute limit for given swing. tricky:
+ // Given a swing axis, we're looking for the intersection with the bounding cone ellipse.
+ // (Since we're dealing with angles, this ellipse is embedded on the surface of a sphere.)
+
+ // For starters, compute the direction from center to surface of ellipse.
+ // This is just the perpendicular (ie. rotate 2D vector by PI/2) of the swing axis.
+ // (vSwingAxis is the cone rotation (in z,y); change vars and rotate to (x,y) coords.)
+ btScalar xEllipse = vSwingAxis.y();
+ btScalar yEllipse = -vSwingAxis.z();
+
+ // Now, we use the slope of the vector (using x/yEllipse) and find the length
+ // of the line that intersects the ellipse:
+ // x^2 y^2
+ // --- + --- = 1, where a and b are semi-major axes 2 and 1 respectively (ie. the limits)
+ // a^2 b^2
+ // Do the math and it should be clear.
+
+ swingLimit = m_swingSpan1; // if xEllipse == 0, we have a pure vSwingAxis.z rotation: just use swingspan1
+ if (fabs(xEllipse) > SIMD_EPSILON)
+ {
+ btScalar surfaceSlope2 = (yEllipse*yEllipse)/(xEllipse*xEllipse);
+ btScalar norm = 1 / (m_swingSpan2 * m_swingSpan2);
+ norm += surfaceSlope2 / (m_swingSpan1 * m_swingSpan1);
+ btScalar swingLimit2 = (1 + surfaceSlope2) / norm;
+ swingLimit = sqrt(swingLimit2);
+ }
+
+ // test!
+ /*swingLimit = m_swingSpan2;
+ if (fabs(vSwingAxis.z()) > SIMD_EPSILON)
+ {
+ btScalar mag_2 = m_swingSpan1*m_swingSpan1 + m_swingSpan2*m_swingSpan2;
+ btScalar sinphi = m_swingSpan2 / sqrt(mag_2);
+ btScalar phi = asin(sinphi);
+ btScalar theta = atan2(fabs(vSwingAxis.y()),fabs(vSwingAxis.z()));
+ btScalar alpha = 3.14159f - theta - phi;
+ btScalar sinalpha = sin(alpha);
+ swingLimit = m_swingSpan1 * sinphi/sinalpha;
+ }*/
+ }
+ else if (swingAngle < 0)
+ {
+ // this should never happen!
+ int wtf = 0; wtf = wtf;
+ }
+}
+
+btVector3 btConeTwistConstraint::GetPointForAngle(btScalar fAngleInRadians, btScalar fLength) const
+{
+ // compute x/y in ellipse using cone angle (0 -> 2*PI along surface of cone)
+ btScalar xEllipse = btCos(fAngleInRadians);
+ btScalar yEllipse = btSin(fAngleInRadians);
+
+ // Use the slope of the vector (using x/yEllipse) and find the length
+ // of the line that intersects the ellipse:
+ // x^2 y^2
+ // --- + --- = 1, where a and b are semi-major axes 2 and 1 respectively (ie. the limits)
+ // a^2 b^2
+ // Do the math and it should be clear.
+
+ float swingLimit = m_swingSpan1; // if xEllipse == 0, just use axis b (1)
+ if (fabs(xEllipse) > SIMD_EPSILON)
+ {
+ btScalar surfaceSlope2 = (yEllipse*yEllipse)/(xEllipse*xEllipse);
+ btScalar norm = 1 / (m_swingSpan2 * m_swingSpan2);
+ norm += surfaceSlope2 / (m_swingSpan1 * m_swingSpan1);
+ btScalar swingLimit2 = (1 + surfaceSlope2) / norm;
+ swingLimit = sqrt(swingLimit2);
+ }
+
+ // convert into point in constraint space:
+ // note: twist is x-axis, swing 1 and 2 are along the z and y axes respectively
+ btVector3 vSwingAxis(0, xEllipse, -yEllipse);
+ btQuaternion qSwing(vSwingAxis, swingLimit);
+ btVector3 vPointInConstraintSpace(fLength,0,0);
+ return quatRotate(qSwing, vPointInConstraintSpace);
+}
+
+// given a twist rotation in constraint space, (pre: cone must already be removed)
+// this method computes its corresponding angle and axis.
+void btConeTwistConstraint::computeTwistLimitInfo(const btQuaternion& qTwist,
+ btScalar& twistAngle, // out
+ btVector3& vTwistAxis) // out
+{
+ btQuaternion qMinTwist = qTwist;
+ twistAngle = qTwist.getAngle();
+
+ if (twistAngle > SIMD_PI) // long way around. flip quat and recalculate.
+ {
+ qMinTwist = operator-(qTwist);
+ twistAngle = qMinTwist.getAngle();
+ }
+ if (twistAngle < 0)
+ {
+ // this should never happen
+ int wtf = 0; wtf = wtf;
+ }
+
+ vTwistAxis = btVector3(qMinTwist.x(), qMinTwist.y(), qMinTwist.z());
+ if (twistAngle > SIMD_EPSILON)
+ vTwistAxis.normalize();
+}
+
+
+void btConeTwistConstraint::adjustSwingAxisToUseEllipseNormal(btVector3& vSwingAxis) const
+{
+ // the swing axis is computed as the "twist-free" cone rotation,
+ // but the cone limit is not circular, but elliptical (if swingspan1 != swingspan2).
+ // so, if we're outside the limits, the closest way back inside the cone isn't
+ // along the vector back to the center. better (and more stable) to use the ellipse normal.
+
+ // convert swing axis to direction from center to surface of ellipse
+ // (ie. rotate 2D vector by PI/2)
+ btScalar y = -vSwingAxis.z();
+ btScalar z = vSwingAxis.y();
+
+ // do the math...
+ if (fabs(z) > SIMD_EPSILON) // avoid division by 0. and we don't need an update if z == 0.
+ {
+ // compute gradient/normal of ellipse surface at current "point"
+ btScalar grad = y/z;
+ grad *= m_swingSpan2 / m_swingSpan1;
+
+ // adjust y/z to represent normal at point (instead of vector to point)
+ if (y > 0)
+ y = fabs(grad * z);
+ else
+ y = -fabs(grad * z);
+
+ // convert ellipse direction back to swing axis
+ vSwingAxis.setZ(-y);
+ vSwingAxis.setY( z);
+ vSwingAxis.normalize();
+ }
+}
+
+
+
+void btConeTwistConstraint::setMotorTarget(const btQuaternion &q)
+{
+ btTransform trACur = m_rbA.getCenterOfMassTransform();
+ btTransform trBCur = m_rbB.getCenterOfMassTransform();
+ btTransform trABCur = trBCur.inverse() * trACur;
+ btQuaternion qABCur = trABCur.getRotation();
+ btTransform trConstraintCur = (trBCur * m_rbBFrame).inverse() * (trACur * m_rbAFrame);
+ btQuaternion qConstraintCur = trConstraintCur.getRotation();
+
+ btQuaternion qConstraint = m_rbBFrame.getRotation().inverse() * q * m_rbAFrame.getRotation();
+ setMotorTargetInConstraintSpace(qConstraint);
+}
+
+
+void btConeTwistConstraint::setMotorTargetInConstraintSpace(const btQuaternion &q)
+{
+ m_qTarget = q;
+
+ // clamp motor target to within limits
+ {
+ btScalar softness = 1.f;//m_limitSoftness;
+
+ // split into twist and cone
+ btVector3 vTwisted = quatRotate(m_qTarget, vTwist);
+ btQuaternion qTargetCone = shortestArcQuat(vTwist, vTwisted); qTargetCone.normalize();
+ btQuaternion qTargetTwist = qTargetCone.inverse() * m_qTarget; qTargetTwist.normalize();
+
+ // clamp cone
+ if (m_swingSpan1 >= btScalar(0.05f) && m_swingSpan2 >= btScalar(0.05f))
+ {
+ btScalar swingAngle, swingLimit; btVector3 swingAxis;
+ computeConeLimitInfo(qTargetCone, swingAngle, swingAxis, swingLimit);
+
+ if (fabs(swingAngle) > SIMD_EPSILON)
+ {
+ if (swingAngle > swingLimit*softness)
+ swingAngle = swingLimit*softness;
+ else if (swingAngle < -swingLimit*softness)
+ swingAngle = -swingLimit*softness;
+ qTargetCone = btQuaternion(swingAxis, swingAngle);
+ }
+ }
+
+ // clamp twist
+ if (m_twistSpan >= btScalar(0.05f))
+ {
+ btScalar twistAngle; btVector3 twistAxis;
+ computeTwistLimitInfo(qTargetTwist, twistAngle, twistAxis);
+
+ if (fabs(twistAngle) > SIMD_EPSILON)
+ {
+ // eddy todo: limitSoftness used here???
+ if (twistAngle > m_twistSpan*softness)
+ twistAngle = m_twistSpan*softness;
+ else if (twistAngle < -m_twistSpan*softness)
+ twistAngle = -m_twistSpan*softness;
+ qTargetTwist = btQuaternion(twistAxis, twistAngle);
+ }
+ }
+
+ m_qTarget = qTargetCone * qTargetTwist;
+ }
+}
+
+///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+///If no axis is provided, it uses the default axis for this constraint.
+void btConeTwistConstraint::setParam(int num, btScalar value, int axis)
+{
+ switch(num)
+ {
+ case BT_CONSTRAINT_ERP :
+ case BT_CONSTRAINT_STOP_ERP :
+ if((axis >= 0) && (axis < 3))
+ {
+ m_linERP = value;
+ m_flags |= BT_CONETWIST_FLAGS_LIN_ERP;
+ }
+ else
+ {
+ m_biasFactor = value;
+ }
+ break;
+ case BT_CONSTRAINT_CFM :
+ case BT_CONSTRAINT_STOP_CFM :
+ if((axis >= 0) && (axis < 3))
+ {
+ m_linCFM = value;
+ m_flags |= BT_CONETWIST_FLAGS_LIN_CFM;
+ }
+ else
+ {
+ m_angCFM = value;
+ m_flags |= BT_CONETWIST_FLAGS_ANG_CFM;
+ }
+ break;
+ default:
+ btAssertConstrParams(0);
+ break;
+ }
+}
+
+///return the local value of parameter
+btScalar btConeTwistConstraint::getParam(int num, int axis) const
+{
+ btScalar retVal = 0;
+ switch(num)
+ {
+ case BT_CONSTRAINT_ERP :
+ case BT_CONSTRAINT_STOP_ERP :
+ if((axis >= 0) && (axis < 3))
+ {
+ btAssertConstrParams(m_flags & BT_CONETWIST_FLAGS_LIN_ERP);
+ retVal = m_linERP;
+ }
+ else if((axis >= 3) && (axis < 6))
+ {
+ retVal = m_biasFactor;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ case BT_CONSTRAINT_CFM :
+ case BT_CONSTRAINT_STOP_CFM :
+ if((axis >= 0) && (axis < 3))
+ {
+ btAssertConstrParams(m_flags & BT_CONETWIST_FLAGS_LIN_CFM);
+ retVal = m_linCFM;
+ }
+ else if((axis >= 3) && (axis < 6))
+ {
+ btAssertConstrParams(m_flags & BT_CONETWIST_FLAGS_ANG_CFM);
+ retVal = m_angCFM;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ default :
+ btAssertConstrParams(0);
+ }
+ return retVal;
+}
+
+
+void btConeTwistConstraint::setFrames(const btTransform & frameA, const btTransform & frameB)
+{
+ m_rbAFrame = frameA;
+ m_rbBFrame = frameB;
+ buildJacobian();
+ //calculateTransforms();
+}
+
+
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
new file mode 100644
index 00000000..868e62f0
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.h
@@ -0,0 +1,346 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+btConeTwistConstraint is Copyright (c) 2007 Starbreeze Studios
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+Written by: Marcus Hennix
+*/
+
+
+
+/*
+Overview:
+
+btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc).
+It is a fixed translation, 3 degree-of-freedom (DOF) rotational "joint".
+It divides the 3 rotational DOFs into swing (movement within a cone) and twist.
+Swing is divided into swing1 and swing2 which can have different limits, giving an elliptical shape.
+(Note: the cone's base isn't flat, so this ellipse is "embedded" on the surface of a sphere.)
+
+In the contraint's frame of reference:
+twist is along the x-axis,
+and swing 1 and 2 are along the z and y axes respectively.
+*/
+
+
+
+#ifndef BT_CONETWISTCONSTRAINT_H
+#define BT_CONETWISTCONSTRAINT_H
+
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btTypedConstraint.h"
+
+class btRigidBody;
+
+enum btConeTwistFlags
+{
+ BT_CONETWIST_FLAGS_LIN_CFM = 1,
+ BT_CONETWIST_FLAGS_LIN_ERP = 2,
+ BT_CONETWIST_FLAGS_ANG_CFM = 4
+};
+
+///btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc)
+class btConeTwistConstraint : public btTypedConstraint
+{
+#ifdef IN_PARALLELL_SOLVER
+public:
+#endif
+ btJacobianEntry m_jac[3]; //3 orthogonal linear constraints
+
+ btTransform m_rbAFrame;
+ btTransform m_rbBFrame;
+
+ btScalar m_limitSoftness;
+ btScalar m_biasFactor;
+ btScalar m_relaxationFactor;
+
+ btScalar m_damping;
+
+ btScalar m_swingSpan1;
+ btScalar m_swingSpan2;
+ btScalar m_twistSpan;
+
+ btScalar m_fixThresh;
+
+ btVector3 m_swingAxis;
+ btVector3 m_twistAxis;
+
+ btScalar m_kSwing;
+ btScalar m_kTwist;
+
+ btScalar m_twistLimitSign;
+ btScalar m_swingCorrection;
+ btScalar m_twistCorrection;
+
+ btScalar m_twistAngle;
+
+ btScalar m_accSwingLimitImpulse;
+ btScalar m_accTwistLimitImpulse;
+
+ bool m_angularOnly;
+ bool m_solveTwistLimit;
+ bool m_solveSwingLimit;
+
+ bool m_useSolveConstraintObsolete;
+
+ // not yet used...
+ btScalar m_swingLimitRatio;
+ btScalar m_twistLimitRatio;
+ btVector3 m_twistAxisA;
+
+ // motor
+ bool m_bMotorEnabled;
+ bool m_bNormalizedMotorStrength;
+ btQuaternion m_qTarget;
+ btScalar m_maxMotorImpulse;
+ btVector3 m_accMotorImpulse;
+
+ // parameters
+ int m_flags;
+ btScalar m_linCFM;
+ btScalar m_linERP;
+ btScalar m_angCFM;
+
+protected:
+
+ void init();
+
+ void computeConeLimitInfo(const btQuaternion& qCone, // in
+ btScalar& swingAngle, btVector3& vSwingAxis, btScalar& swingLimit); // all outs
+
+ void computeTwistLimitInfo(const btQuaternion& qTwist, // in
+ btScalar& twistAngle, btVector3& vTwistAxis); // all outs
+
+ void adjustSwingAxisToUseEllipseNormal(btVector3& vSwingAxis) const;
+
+
+public:
+
+ btConeTwistConstraint(btRigidBody& rbA,btRigidBody& rbB,const btTransform& rbAFrame, const btTransform& rbBFrame);
+
+ btConeTwistConstraint(btRigidBody& rbA,const btTransform& rbAFrame);
+
+ virtual void buildJacobian();
+
+ virtual void getInfo1 (btConstraintInfo1* info);
+
+ void getInfo1NonVirtual(btConstraintInfo1* info);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ void getInfo2NonVirtual(btConstraintInfo2* info,const btTransform& transA,const btTransform& transB,const btMatrix3x3& invInertiaWorldA,const btMatrix3x3& invInertiaWorldB);
+
+ virtual void solveConstraintObsolete(btRigidBody& bodyA,btRigidBody& bodyB,btScalar timeStep);
+
+ void updateRHS(btScalar timeStep);
+
+
+ const btRigidBody& getRigidBodyA() const
+ {
+ return m_rbA;
+ }
+ const btRigidBody& getRigidBodyB() const
+ {
+ return m_rbB;
+ }
+
+ void setAngularOnly(bool angularOnly)
+ {
+ m_angularOnly = angularOnly;
+ }
+
+ void setLimit(int limitIndex,btScalar limitValue)
+ {
+ switch (limitIndex)
+ {
+ case 3:
+ {
+ m_twistSpan = limitValue;
+ break;
+ }
+ case 4:
+ {
+ m_swingSpan2 = limitValue;
+ break;
+ }
+ case 5:
+ {
+ m_swingSpan1 = limitValue;
+ break;
+ }
+ default:
+ {
+ }
+ };
+ }
+
+ // setLimit(), a few notes:
+ // _softness:
+ // 0->1, recommend ~0.8->1.
+ // describes % of limits where movement is free.
+ // beyond this softness %, the limit is gradually enforced until the "hard" (1.0) limit is reached.
+ // _biasFactor:
+ // 0->1?, recommend 0.3 +/-0.3 or so.
+ // strength with which constraint resists zeroth order (angular, not angular velocity) limit violation.
+ // __relaxationFactor:
+ // 0->1, recommend to stay near 1.
+ // the lower the value, the less the constraint will fight velocities which violate the angular limits.
+ void setLimit(btScalar _swingSpan1,btScalar _swingSpan2,btScalar _twistSpan, btScalar _softness = 1.f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f)
+ {
+ m_swingSpan1 = _swingSpan1;
+ m_swingSpan2 = _swingSpan2;
+ m_twistSpan = _twistSpan;
+
+ m_limitSoftness = _softness;
+ m_biasFactor = _biasFactor;
+ m_relaxationFactor = _relaxationFactor;
+ }
+
+ const btTransform& getAFrame() { return m_rbAFrame; };
+ const btTransform& getBFrame() { return m_rbBFrame; };
+
+ inline int getSolveTwistLimit()
+ {
+ return m_solveTwistLimit;
+ }
+
+ inline int getSolveSwingLimit()
+ {
+ return m_solveTwistLimit;
+ }
+
+ inline btScalar getTwistLimitSign()
+ {
+ return m_twistLimitSign;
+ }
+
+ void calcAngleInfo();
+ void calcAngleInfo2(const btTransform& transA, const btTransform& transB,const btMatrix3x3& invInertiaWorldA,const btMatrix3x3& invInertiaWorldB);
+
+ inline btScalar getSwingSpan1()
+ {
+ return m_swingSpan1;
+ }
+ inline btScalar getSwingSpan2()
+ {
+ return m_swingSpan2;
+ }
+ inline btScalar getTwistSpan()
+ {
+ return m_twistSpan;
+ }
+ inline btScalar getTwistAngle()
+ {
+ return m_twistAngle;
+ }
+ bool isPastSwingLimit() { return m_solveSwingLimit; }
+
+ void setDamping(btScalar damping) { m_damping = damping; }
+
+ void enableMotor(bool b) { m_bMotorEnabled = b; }
+ void setMaxMotorImpulse(btScalar maxMotorImpulse) { m_maxMotorImpulse = maxMotorImpulse; m_bNormalizedMotorStrength = false; }
+ void setMaxMotorImpulseNormalized(btScalar maxMotorImpulse) { m_maxMotorImpulse = maxMotorImpulse; m_bNormalizedMotorStrength = true; }
+
+ btScalar getFixThresh() { return m_fixThresh; }
+ void setFixThresh(btScalar fixThresh) { m_fixThresh = fixThresh; }
+
+ // setMotorTarget:
+ // q: the desired rotation of bodyA wrt bodyB.
+ // note: if q violates the joint limits, the internal target is clamped to avoid conflicting impulses (very bad for stability)
+ // note: don't forget to enableMotor()
+ void setMotorTarget(const btQuaternion &q);
+
+ // same as above, but q is the desired rotation of frameA wrt frameB in constraint space
+ void setMotorTargetInConstraintSpace(const btQuaternion &q);
+
+ btVector3 GetPointForAngle(btScalar fAngleInRadians, btScalar fLength) const;
+
+ ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+ ///If no axis is provided, it uses the default axis for this constraint.
+ virtual void setParam(int num, btScalar value, int axis = -1);
+
+ virtual void setFrames(const btTransform& frameA, const btTransform& frameB);
+
+ const btTransform& getFrameOffsetA() const
+ {
+ return m_rbAFrame;
+ }
+
+ const btTransform& getFrameOffsetB() const
+ {
+ return m_rbBFrame;
+ }
+
+
+ ///return the local value of parameter
+ virtual btScalar getParam(int num, int axis = -1) const;
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btConeTwistConstraintData
+{
+ btTypedConstraintData m_typeConstraintData;
+ btTransformFloatData m_rbAFrame;
+ btTransformFloatData m_rbBFrame;
+
+ //limits
+ float m_swingSpan1;
+ float m_swingSpan2;
+ float m_twistSpan;
+ float m_limitSoftness;
+ float m_biasFactor;
+ float m_relaxationFactor;
+
+ float m_damping;
+
+ char m_pad[4];
+
+};
+
+
+
+SIMD_FORCE_INLINE int btConeTwistConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btConeTwistConstraintData);
+
+}
+
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btConeTwistConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btConeTwistConstraintData* cone = (btConeTwistConstraintData*) dataBuffer;
+ btTypedConstraint::serialize(&cone->m_typeConstraintData,serializer);
+
+ m_rbAFrame.serializeFloat(cone->m_rbAFrame);
+ m_rbBFrame.serializeFloat(cone->m_rbBFrame);
+
+ cone->m_swingSpan1 = float(m_swingSpan1);
+ cone->m_swingSpan2 = float(m_swingSpan2);
+ cone->m_twistSpan = float(m_twistSpan);
+ cone->m_limitSoftness = float(m_limitSoftness);
+ cone->m_biasFactor = float(m_biasFactor);
+ cone->m_relaxationFactor = float(m_relaxationFactor);
+ cone->m_damping = float(m_damping);
+
+ return "btConeTwistConstraintData";
+}
+
+
+#endif //BT_CONETWISTCONSTRAINT_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
new file mode 100644
index 00000000..6f673102
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h
@@ -0,0 +1,52 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONSTRAINT_SOLVER_H
+#define BT_CONSTRAINT_SOLVER_H
+
+#include "LinearMath/btScalar.h"
+
+class btPersistentManifold;
+class btRigidBody;
+class btCollisionObject;
+class btTypedConstraint;
+struct btContactSolverInfo;
+struct btBroadphaseProxy;
+class btIDebugDraw;
+class btStackAlloc;
+class btDispatcher;
+/// btConstraintSolver provides solver interface
+class btConstraintSolver
+{
+
+public:
+
+ virtual ~btConstraintSolver() {}
+
+ virtual void prepareSolve (int /* numBodies */, int /* numManifolds */) {;}
+
+ ///solve a group of constraints
+ virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints, const btContactSolverInfo& info,class btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher) = 0;
+
+ virtual void allSolved (const btContactSolverInfo& /* info */,class btIDebugDraw* /* debugDrawer */, btStackAlloc* /* stackAlloc */) {;}
+
+ ///clear internal cached data and reset random seed
+ virtual void reset() = 0;
+};
+
+
+
+
+#endif //BT_CONSTRAINT_SOLVER_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp
new file mode 100644
index 00000000..88859182
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.cpp
@@ -0,0 +1,178 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btContactConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btContactSolverInfo.h"
+#include "LinearMath/btMinMax.h"
+#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
+
+
+
+btContactConstraint::btContactConstraint(btPersistentManifold* contactManifold,btRigidBody& rbA,btRigidBody& rbB)
+:btTypedConstraint(CONTACT_CONSTRAINT_TYPE,rbA,rbB),
+ m_contactManifold(*contactManifold)
+{
+
+}
+
+btContactConstraint::~btContactConstraint()
+{
+
+}
+
+void btContactConstraint::setContactManifold(btPersistentManifold* contactManifold)
+{
+ m_contactManifold = *contactManifold;
+}
+
+void btContactConstraint::getInfo1 (btConstraintInfo1* info)
+{
+
+}
+
+void btContactConstraint::getInfo2 (btConstraintInfo2* info)
+{
+
+}
+
+void btContactConstraint::buildJacobian()
+{
+
+}
+
+
+
+
+
+#include "btContactConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btContactSolverInfo.h"
+#include "LinearMath/btMinMax.h"
+#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
+
+
+
+//response between two dynamic objects without friction, assuming 0 penetration depth
+btScalar resolveSingleCollision(
+ btRigidBody* body1,
+ btCollisionObject* colObj2,
+ const btVector3& contactPositionWorld,
+ const btVector3& contactNormalOnB,
+ const btContactSolverInfo& solverInfo,
+ btScalar distance)
+{
+ btRigidBody* body2 = btRigidBody::upcast(colObj2);
+
+
+ const btVector3& normal = contactNormalOnB;
+
+ btVector3 rel_pos1 = contactPositionWorld - body1->getWorldTransform().getOrigin();
+ btVector3 rel_pos2 = contactPositionWorld - colObj2->getWorldTransform().getOrigin();
+
+ btVector3 vel1 = body1->getVelocityInLocalPoint(rel_pos1);
+ btVector3 vel2 = body2? body2->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0);
+ btVector3 vel = vel1 - vel2;
+ btScalar rel_vel;
+ rel_vel = normal.dot(vel);
+
+ btScalar combinedRestitution = body1->getRestitution() * colObj2->getRestitution();
+ btScalar restitution = combinedRestitution* -rel_vel;
+
+ btScalar positionalError = solverInfo.m_erp *-distance /solverInfo.m_timeStep ;
+ btScalar velocityError = -(1.0f + restitution) * rel_vel;// * damping;
+ btScalar denom0 = body1->computeImpulseDenominator(contactPositionWorld,normal);
+ btScalar denom1 = body2? body2->computeImpulseDenominator(contactPositionWorld,normal) : 0.f;
+ btScalar relaxation = 1.f;
+ btScalar jacDiagABInv = relaxation/(denom0+denom1);
+
+ btScalar penetrationImpulse = positionalError * jacDiagABInv;
+ btScalar velocityImpulse = velocityError * jacDiagABInv;
+
+ btScalar normalImpulse = penetrationImpulse+velocityImpulse;
+ normalImpulse = 0.f > normalImpulse ? 0.f: normalImpulse;
+
+ body1->applyImpulse(normal*(normalImpulse), rel_pos1);
+ if (body2)
+ body2->applyImpulse(-normal*(normalImpulse), rel_pos2);
+
+ return normalImpulse;
+}
+
+
+//bilateral constraint between two dynamic objects
+void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1,
+ btRigidBody& body2, const btVector3& pos2,
+ btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep)
+{
+ (void)timeStep;
+ (void)distance;
+
+
+ btScalar normalLenSqr = normal.length2();
+ btAssert(btFabs(normalLenSqr) < btScalar(1.1));
+ if (normalLenSqr > btScalar(1.1))
+ {
+ impulse = btScalar(0.);
+ return;
+ }
+ btVector3 rel_pos1 = pos1 - body1.getCenterOfMassPosition();
+ btVector3 rel_pos2 = pos2 - body2.getCenterOfMassPosition();
+ //this jacobian entry could be re-used for all iterations
+
+ btVector3 vel1 = body1.getVelocityInLocalPoint(rel_pos1);
+ btVector3 vel2 = body2.getVelocityInLocalPoint(rel_pos2);
+ btVector3 vel = vel1 - vel2;
+
+
+ btJacobianEntry jac(body1.getCenterOfMassTransform().getBasis().transpose(),
+ body2.getCenterOfMassTransform().getBasis().transpose(),
+ rel_pos1,rel_pos2,normal,body1.getInvInertiaDiagLocal(),body1.getInvMass(),
+ body2.getInvInertiaDiagLocal(),body2.getInvMass());
+
+ btScalar jacDiagAB = jac.getDiagonal();
+ btScalar jacDiagABInv = btScalar(1.) / jacDiagAB;
+
+ btScalar rel_vel = jac.getRelativeVelocity(
+ body1.getLinearVelocity(),
+ body1.getCenterOfMassTransform().getBasis().transpose() * body1.getAngularVelocity(),
+ body2.getLinearVelocity(),
+ body2.getCenterOfMassTransform().getBasis().transpose() * body2.getAngularVelocity());
+ btScalar a;
+ a=jacDiagABInv;
+
+
+ rel_vel = normal.dot(vel);
+
+ //todo: move this into proper structure
+ btScalar contactDamping = btScalar(0.2);
+
+#ifdef ONLY_USE_LINEAR_MASS
+ btScalar massTerm = btScalar(1.) / (body1.getInvMass() + body2.getInvMass());
+ impulse = - contactDamping * rel_vel * massTerm;
+#else
+ btScalar velocityImpulse = -contactDamping * rel_vel * jacDiagABInv;
+ impulse = velocityImpulse;
+#endif
+}
+
+
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.h
new file mode 100644
index 00000000..477c79d1
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactConstraint.h
@@ -0,0 +1,71 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONTACT_CONSTRAINT_H
+#define BT_CONTACT_CONSTRAINT_H
+
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btTypedConstraint.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+
+///btContactConstraint can be automatically created to solve contact constraints using the unified btTypedConstraint interface
+ATTRIBUTE_ALIGNED16(class) btContactConstraint : public btTypedConstraint
+{
+protected:
+
+ btPersistentManifold m_contactManifold;
+
+public:
+
+
+ btContactConstraint(btPersistentManifold* contactManifold,btRigidBody& rbA,btRigidBody& rbB);
+
+ void setContactManifold(btPersistentManifold* contactManifold);
+
+ btPersistentManifold* getContactManifold()
+ {
+ return &m_contactManifold;
+ }
+
+ const btPersistentManifold* getContactManifold() const
+ {
+ return &m_contactManifold;
+ }
+
+ virtual ~btContactConstraint();
+
+ virtual void getInfo1 (btConstraintInfo1* info);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ ///obsolete methods
+ virtual void buildJacobian();
+
+
+};
+
+///very basic collision resolution without friction
+btScalar resolveSingleCollision(btRigidBody* body1, class btCollisionObject* colObj2, const btVector3& contactPositionWorld,const btVector3& contactNormalOnB, const struct btContactSolverInfo& solverInfo,btScalar distance);
+
+
+///resolveSingleBilateral is an obsolete methods used for vehicle friction between two dynamic objects
+void resolveSingleBilateral(btRigidBody& body1, const btVector3& pos1,
+ btRigidBody& body2, const btVector3& pos2,
+ btScalar distance, const btVector3& normal,btScalar& impulse ,btScalar timeStep);
+
+
+
+#endif //BT_CONTACT_CONSTRAINT_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h
new file mode 100644
index 00000000..6204cb3d
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btContactSolverInfo.h
@@ -0,0 +1,87 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONTACT_SOLVER_INFO
+#define BT_CONTACT_SOLVER_INFO
+
+enum btSolverMode
+{
+ SOLVER_RANDMIZE_ORDER = 1,
+ SOLVER_FRICTION_SEPARATE = 2,
+ SOLVER_USE_WARMSTARTING = 4,
+ SOLVER_USE_FRICTION_WARMSTARTING = 8,
+ SOLVER_USE_2_FRICTION_DIRECTIONS = 16,
+ SOLVER_ENABLE_FRICTION_DIRECTION_CACHING = 32,
+ SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION = 64,
+ SOLVER_CACHE_FRIENDLY = 128,
+ SOLVER_SIMD = 256, //enabled for Windows, the solver innerloop is branchless SIMD, 40% faster than FPU/scalar version
+ SOLVER_CUDA = 512 //will be open sourced during Game Developers Conference 2009. Much faster.
+};
+
+struct btContactSolverInfoData
+{
+
+
+ btScalar m_tau;
+ btScalar m_damping;//global non-contact constraint damping, can be locally overridden by constraints during 'getInfo2'.
+ btScalar m_friction;
+ btScalar m_timeStep;
+ btScalar m_restitution;
+ int m_numIterations;
+ btScalar m_maxErrorReduction;
+ btScalar m_sor;
+ btScalar m_erp;//used as Baumgarte factor
+ btScalar m_erp2;//used in Split Impulse
+ btScalar m_globalCfm;//constraint force mixing
+ int m_splitImpulse;
+ btScalar m_splitImpulsePenetrationThreshold;
+ btScalar m_linearSlop;
+ btScalar m_warmstartingFactor;
+
+ int m_solverMode;
+ int m_restingContactRestitutionThreshold;
+ int m_minimumSolverBatchSize;
+
+
+};
+
+struct btContactSolverInfo : public btContactSolverInfoData
+{
+
+
+
+ inline btContactSolverInfo()
+ {
+ m_tau = btScalar(0.6);
+ m_damping = btScalar(1.0);
+ m_friction = btScalar(0.3);
+ m_restitution = btScalar(0.);
+ m_maxErrorReduction = btScalar(20.);
+ m_numIterations = 10;
+ m_erp = btScalar(0.2);
+ m_erp2 = btScalar(0.1);
+ m_globalCfm = btScalar(0.);
+ m_sor = btScalar(1.);
+ m_splitImpulse = false;
+ m_splitImpulsePenetrationThreshold = -0.02f;
+ m_linearSlop = btScalar(0.0);
+ m_warmstartingFactor=btScalar(0.85);
+ m_solverMode = SOLVER_USE_WARMSTARTING | SOLVER_SIMD;// | SOLVER_RANDMIZE_ORDER;
+ m_restingContactRestitutionThreshold = 2;//resting contact lifetime threshold to disable restitution
+ m_minimumSolverBatchSize = 128; //try to combine islands until the amount of constraints reaches this limit
+ }
+};
+
+#endif //BT_CONTACT_SOLVER_INFO
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
new file mode 100644
index 00000000..7c5e4f6e
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
@@ -0,0 +1,1070 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+/*
+2007-09-09
+Refactored by Francisco Le?n
+email: projectileman@yahoo.com
+http://gimpact.sf.net
+*/
+
+#include "btGeneric6DofConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+#include "LinearMath/btTransformUtil.h"
+#include <new>
+
+
+
+#define D6_USE_OBSOLETE_METHOD false
+#define D6_USE_FRAME_OFFSET true
+
+
+
+
+
+
+btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA)
+: btTypedConstraint(D6_CONSTRAINT_TYPE, rbA, rbB)
+, m_frameInA(frameInA)
+, m_frameInB(frameInB),
+m_useLinearReferenceFrameA(useLinearReferenceFrameA),
+m_useOffsetForConstraintFrame(D6_USE_FRAME_OFFSET),
+m_flags(0),
+m_useSolveConstraintObsolete(D6_USE_OBSOLETE_METHOD)
+{
+ calculateTransforms();
+}
+
+
+
+btGeneric6DofConstraint::btGeneric6DofConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB)
+ : btTypedConstraint(D6_CONSTRAINT_TYPE, getFixedBody(), rbB),
+ m_frameInB(frameInB),
+ m_useLinearReferenceFrameA(useLinearReferenceFrameB),
+ m_useOffsetForConstraintFrame(D6_USE_FRAME_OFFSET),
+ m_flags(0),
+ m_useSolveConstraintObsolete(false)
+{
+ ///not providing rigidbody A means implicitly using worldspace for body A
+ m_frameInA = rbB.getCenterOfMassTransform() * m_frameInB;
+ calculateTransforms();
+}
+
+
+
+
+#define GENERIC_D6_DISABLE_WARMSTARTING 1
+
+
+
+btScalar btGetMatrixElem(const btMatrix3x3& mat, int index);
+btScalar btGetMatrixElem(const btMatrix3x3& mat, int index)
+{
+ int i = index%3;
+ int j = index/3;
+ return mat[i][j];
+}
+
+
+
+///MatrixToEulerXYZ from http://www.geometrictools.com/LibFoundation/Mathematics/Wm4Matrix3.inl.html
+bool matrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz);
+bool matrixToEulerXYZ(const btMatrix3x3& mat,btVector3& xyz)
+{
+ // // rot = cy*cz -cy*sz sy
+ // // cz*sx*sy+cx*sz cx*cz-sx*sy*sz -cy*sx
+ // // -cx*cz*sy+sx*sz cz*sx+cx*sy*sz cx*cy
+ //
+
+ btScalar fi = btGetMatrixElem(mat,2);
+ if (fi < btScalar(1.0f))
+ {
+ if (fi > btScalar(-1.0f))
+ {
+ xyz[0] = btAtan2(-btGetMatrixElem(mat,5),btGetMatrixElem(mat,8));
+ xyz[1] = btAsin(btGetMatrixElem(mat,2));
+ xyz[2] = btAtan2(-btGetMatrixElem(mat,1),btGetMatrixElem(mat,0));
+ return true;
+ }
+ else
+ {
+ // WARNING. Not unique. XA - ZA = -atan2(r10,r11)
+ xyz[0] = -btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4));
+ xyz[1] = -SIMD_HALF_PI;
+ xyz[2] = btScalar(0.0);
+ return false;
+ }
+ }
+ else
+ {
+ // WARNING. Not unique. XAngle + ZAngle = atan2(r10,r11)
+ xyz[0] = btAtan2(btGetMatrixElem(mat,3),btGetMatrixElem(mat,4));
+ xyz[1] = SIMD_HALF_PI;
+ xyz[2] = 0.0;
+ }
+ return false;
+}
+
+//////////////////////////// btRotationalLimitMotor ////////////////////////////////////
+
+int btRotationalLimitMotor::testLimitValue(btScalar test_value)
+{
+ if(m_loLimit>m_hiLimit)
+ {
+ m_currentLimit = 0;//Free from violation
+ return 0;
+ }
+ if (test_value < m_loLimit)
+ {
+ m_currentLimit = 1;//low limit violation
+ m_currentLimitError = test_value - m_loLimit;
+ return 1;
+ }
+ else if (test_value> m_hiLimit)
+ {
+ m_currentLimit = 2;//High limit violation
+ m_currentLimitError = test_value - m_hiLimit;
+ return 2;
+ };
+
+ m_currentLimit = 0;//Free from violation
+ return 0;
+
+}
+
+
+
+btScalar btRotationalLimitMotor::solveAngularLimits(
+ btScalar timeStep,btVector3& axis,btScalar jacDiagABInv,
+ btRigidBody * body0, btRigidBody * body1 )
+{
+ if (needApplyTorques()==false) return 0.0f;
+
+ btScalar target_velocity = m_targetVelocity;
+ btScalar maxMotorForce = m_maxMotorForce;
+
+ //current error correction
+ if (m_currentLimit!=0)
+ {
+ target_velocity = -m_stopERP*m_currentLimitError/(timeStep);
+ maxMotorForce = m_maxLimitForce;
+ }
+
+ maxMotorForce *= timeStep;
+
+ // current velocity difference
+
+ btVector3 angVelA;
+ body0->internalGetAngularVelocity(angVelA);
+ btVector3 angVelB;
+ body1->internalGetAngularVelocity(angVelB);
+
+ btVector3 vel_diff;
+ vel_diff = angVelA-angVelB;
+
+
+
+ btScalar rel_vel = axis.dot(vel_diff);
+
+ // correction velocity
+ btScalar motor_relvel = m_limitSoftness*(target_velocity - m_damping*rel_vel);
+
+
+ if ( motor_relvel < SIMD_EPSILON && motor_relvel > -SIMD_EPSILON )
+ {
+ return 0.0f;//no need for applying force
+ }
+
+
+ // correction impulse
+ btScalar unclippedMotorImpulse = (1+m_bounce)*motor_relvel*jacDiagABInv;
+
+ // clip correction impulse
+ btScalar clippedMotorImpulse;
+
+ ///@todo: should clip against accumulated impulse
+ if (unclippedMotorImpulse>0.0f)
+ {
+ clippedMotorImpulse = unclippedMotorImpulse > maxMotorForce? maxMotorForce: unclippedMotorImpulse;
+ }
+ else
+ {
+ clippedMotorImpulse = unclippedMotorImpulse < -maxMotorForce ? -maxMotorForce: unclippedMotorImpulse;
+ }
+
+
+ // sort with accumulated impulses
+ btScalar lo = btScalar(-BT_LARGE_FLOAT);
+ btScalar hi = btScalar(BT_LARGE_FLOAT);
+
+ btScalar oldaccumImpulse = m_accumulatedImpulse;
+ btScalar sum = oldaccumImpulse + clippedMotorImpulse;
+ m_accumulatedImpulse = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum;
+
+ clippedMotorImpulse = m_accumulatedImpulse - oldaccumImpulse;
+
+ btVector3 motorImp = clippedMotorImpulse * axis;
+
+ //body0->applyTorqueImpulse(motorImp);
+ //body1->applyTorqueImpulse(-motorImp);
+
+ body0->internalApplyImpulse(btVector3(0,0,0), body0->getInvInertiaTensorWorld()*axis,clippedMotorImpulse);
+ body1->internalApplyImpulse(btVector3(0,0,0), body1->getInvInertiaTensorWorld()*axis,-clippedMotorImpulse);
+
+
+ return clippedMotorImpulse;
+
+
+}
+
+//////////////////////////// End btRotationalLimitMotor ////////////////////////////////////
+
+
+
+
+//////////////////////////// btTranslationalLimitMotor ////////////////////////////////////
+
+
+int btTranslationalLimitMotor::testLimitValue(int limitIndex, btScalar test_value)
+{
+ btScalar loLimit = m_lowerLimit[limitIndex];
+ btScalar hiLimit = m_upperLimit[limitIndex];
+ if(loLimit > hiLimit)
+ {
+ m_currentLimit[limitIndex] = 0;//Free from violation
+ m_currentLimitError[limitIndex] = btScalar(0.f);
+ return 0;
+ }
+
+ if (test_value < loLimit)
+ {
+ m_currentLimit[limitIndex] = 2;//low limit violation
+ m_currentLimitError[limitIndex] = test_value - loLimit;
+ return 2;
+ }
+ else if (test_value> hiLimit)
+ {
+ m_currentLimit[limitIndex] = 1;//High limit violation
+ m_currentLimitError[limitIndex] = test_value - hiLimit;
+ return 1;
+ };
+
+ m_currentLimit[limitIndex] = 0;//Free from violation
+ m_currentLimitError[limitIndex] = btScalar(0.f);
+ return 0;
+}
+
+
+
+btScalar btTranslationalLimitMotor::solveLinearAxis(
+ btScalar timeStep,
+ btScalar jacDiagABInv,
+ btRigidBody& body1,const btVector3 &pointInA,
+ btRigidBody& body2,const btVector3 &pointInB,
+ int limit_index,
+ const btVector3 & axis_normal_on_a,
+ const btVector3 & anchorPos)
+{
+
+ ///find relative velocity
+ // btVector3 rel_pos1 = pointInA - body1.getCenterOfMassPosition();
+ // btVector3 rel_pos2 = pointInB - body2.getCenterOfMassPosition();
+ btVector3 rel_pos1 = anchorPos - body1.getCenterOfMassPosition();
+ btVector3 rel_pos2 = anchorPos - body2.getCenterOfMassPosition();
+
+ btVector3 vel1;
+ body1.internalGetVelocityInLocalPointObsolete(rel_pos1,vel1);
+ btVector3 vel2;
+ body2.internalGetVelocityInLocalPointObsolete(rel_pos2,vel2);
+ btVector3 vel = vel1 - vel2;
+
+ btScalar rel_vel = axis_normal_on_a.dot(vel);
+
+
+
+ /// apply displacement correction
+
+ //positional error (zeroth order error)
+ btScalar depth = -(pointInA - pointInB).dot(axis_normal_on_a);
+ btScalar lo = btScalar(-BT_LARGE_FLOAT);
+ btScalar hi = btScalar(BT_LARGE_FLOAT);
+
+ btScalar minLimit = m_lowerLimit[limit_index];
+ btScalar maxLimit = m_upperLimit[limit_index];
+
+ //handle the limits
+ if (minLimit < maxLimit)
+ {
+ {
+ if (depth > maxLimit)
+ {
+ depth -= maxLimit;
+ lo = btScalar(0.);
+
+ }
+ else
+ {
+ if (depth < minLimit)
+ {
+ depth -= minLimit;
+ hi = btScalar(0.);
+ }
+ else
+ {
+ return 0.0f;
+ }
+ }
+ }
+ }
+
+ btScalar normalImpulse= m_limitSoftness*(m_restitution*depth/timeStep - m_damping*rel_vel) * jacDiagABInv;
+
+
+
+
+ btScalar oldNormalImpulse = m_accumulatedImpulse[limit_index];
+ btScalar sum = oldNormalImpulse + normalImpulse;
+ m_accumulatedImpulse[limit_index] = sum > hi ? btScalar(0.) : sum < lo ? btScalar(0.) : sum;
+ normalImpulse = m_accumulatedImpulse[limit_index] - oldNormalImpulse;
+
+ btVector3 impulse_vector = axis_normal_on_a * normalImpulse;
+ //body1.applyImpulse( impulse_vector, rel_pos1);
+ //body2.applyImpulse(-impulse_vector, rel_pos2);
+
+ btVector3 ftorqueAxis1 = rel_pos1.cross(axis_normal_on_a);
+ btVector3 ftorqueAxis2 = rel_pos2.cross(axis_normal_on_a);
+ body1.internalApplyImpulse(axis_normal_on_a*body1.getInvMass(), body1.getInvInertiaTensorWorld()*ftorqueAxis1,normalImpulse);
+ body2.internalApplyImpulse(axis_normal_on_a*body2.getInvMass(), body2.getInvInertiaTensorWorld()*ftorqueAxis2,-normalImpulse);
+
+
+
+
+ return normalImpulse;
+}
+
+//////////////////////////// btTranslationalLimitMotor ////////////////////////////////////
+
+void btGeneric6DofConstraint::calculateAngleInfo()
+{
+ btMatrix3x3 relative_frame = m_calculatedTransformA.getBasis().inverse()*m_calculatedTransformB.getBasis();
+ matrixToEulerXYZ(relative_frame,m_calculatedAxisAngleDiff);
+ // in euler angle mode we do not actually constrain the angular velocity
+ // along the axes axis[0] and axis[2] (although we do use axis[1]) :
+ //
+ // to get constrain w2-w1 along ...not
+ // ------ --------------------- ------
+ // d(angle[0])/dt = 0 ax[1] x ax[2] ax[0]
+ // d(angle[1])/dt = 0 ax[1]
+ // d(angle[2])/dt = 0 ax[0] x ax[1] ax[2]
+ //
+ // constraining w2-w1 along an axis 'a' means that a'*(w2-w1)=0.
+ // to prove the result for angle[0], write the expression for angle[0] from
+ // GetInfo1 then take the derivative. to prove this for angle[2] it is
+ // easier to take the euler rate expression for d(angle[2])/dt with respect
+ // to the components of w and set that to 0.
+ btVector3 axis0 = m_calculatedTransformB.getBasis().getColumn(0);
+ btVector3 axis2 = m_calculatedTransformA.getBasis().getColumn(2);
+
+ m_calculatedAxis[1] = axis2.cross(axis0);
+ m_calculatedAxis[0] = m_calculatedAxis[1].cross(axis2);
+ m_calculatedAxis[2] = axis0.cross(m_calculatedAxis[1]);
+
+ m_calculatedAxis[0].normalize();
+ m_calculatedAxis[1].normalize();
+ m_calculatedAxis[2].normalize();
+
+}
+
+void btGeneric6DofConstraint::calculateTransforms()
+{
+ calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+}
+
+void btGeneric6DofConstraint::calculateTransforms(const btTransform& transA,const btTransform& transB)
+{
+ m_calculatedTransformA = transA * m_frameInA;
+ m_calculatedTransformB = transB * m_frameInB;
+ calculateLinearInfo();
+ calculateAngleInfo();
+ if(m_useOffsetForConstraintFrame)
+ { // get weight factors depending on masses
+ btScalar miA = getRigidBodyA().getInvMass();
+ btScalar miB = getRigidBodyB().getInvMass();
+ m_hasStaticBody = (miA < SIMD_EPSILON) || (miB < SIMD_EPSILON);
+ btScalar miS = miA + miB;
+ if(miS > btScalar(0.f))
+ {
+ m_factA = miB / miS;
+ }
+ else
+ {
+ m_factA = btScalar(0.5f);
+ }
+ m_factB = btScalar(1.0f) - m_factA;
+ }
+}
+
+
+
+void btGeneric6DofConstraint::buildLinearJacobian(
+ btJacobianEntry & jacLinear,const btVector3 & normalWorld,
+ const btVector3 & pivotAInW,const btVector3 & pivotBInW)
+{
+ new (&jacLinear) btJacobianEntry(
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ pivotAInW - m_rbA.getCenterOfMassPosition(),
+ pivotBInW - m_rbB.getCenterOfMassPosition(),
+ normalWorld,
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbA.getInvMass(),
+ m_rbB.getInvInertiaDiagLocal(),
+ m_rbB.getInvMass());
+}
+
+
+
+void btGeneric6DofConstraint::buildAngularJacobian(
+ btJacobianEntry & jacAngular,const btVector3 & jointAxisW)
+{
+ new (&jacAngular) btJacobianEntry(jointAxisW,
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbB.getInvInertiaDiagLocal());
+
+}
+
+
+
+bool btGeneric6DofConstraint::testAngularLimitMotor(int axis_index)
+{
+ btScalar angle = m_calculatedAxisAngleDiff[axis_index];
+ angle = btAdjustAngleToLimits(angle, m_angularLimits[axis_index].m_loLimit, m_angularLimits[axis_index].m_hiLimit);
+ m_angularLimits[axis_index].m_currentPosition = angle;
+ //test limits
+ m_angularLimits[axis_index].testLimitValue(angle);
+ return m_angularLimits[axis_index].needApplyTorques();
+}
+
+
+
+void btGeneric6DofConstraint::buildJacobian()
+{
+#ifndef __SPU__
+ if (m_useSolveConstraintObsolete)
+ {
+
+ // Clear accumulated impulses for the next simulation step
+ m_linearLimits.m_accumulatedImpulse.setValue(btScalar(0.), btScalar(0.), btScalar(0.));
+ int i;
+ for(i = 0; i < 3; i++)
+ {
+ m_angularLimits[i].m_accumulatedImpulse = btScalar(0.);
+ }
+ //calculates transform
+ calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+
+ // const btVector3& pivotAInW = m_calculatedTransformA.getOrigin();
+ // const btVector3& pivotBInW = m_calculatedTransformB.getOrigin();
+ calcAnchorPos();
+ btVector3 pivotAInW = m_AnchorPos;
+ btVector3 pivotBInW = m_AnchorPos;
+
+ // not used here
+ // btVector3 rel_pos1 = pivotAInW - m_rbA.getCenterOfMassPosition();
+ // btVector3 rel_pos2 = pivotBInW - m_rbB.getCenterOfMassPosition();
+
+ btVector3 normalWorld;
+ //linear part
+ for (i=0;i<3;i++)
+ {
+ if (m_linearLimits.isLimited(i))
+ {
+ if (m_useLinearReferenceFrameA)
+ normalWorld = m_calculatedTransformA.getBasis().getColumn(i);
+ else
+ normalWorld = m_calculatedTransformB.getBasis().getColumn(i);
+
+ buildLinearJacobian(
+ m_jacLinear[i],normalWorld ,
+ pivotAInW,pivotBInW);
+
+ }
+ }
+
+ // angular part
+ for (i=0;i<3;i++)
+ {
+ //calculates error angle
+ if (testAngularLimitMotor(i))
+ {
+ normalWorld = this->getAxis(i);
+ // Create angular atom
+ buildAngularJacobian(m_jacAng[i],normalWorld);
+ }
+ }
+
+ }
+#endif //__SPU__
+
+}
+
+
+void btGeneric6DofConstraint::getInfo1 (btConstraintInfo1* info)
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ info->m_numConstraintRows = 0;
+ info->nub = 0;
+ } else
+ {
+ //prepare constraint
+ calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+ info->m_numConstraintRows = 0;
+ info->nub = 6;
+ int i;
+ //test linear limits
+ for(i = 0; i < 3; i++)
+ {
+ if(m_linearLimits.needApplyForce(i))
+ {
+ info->m_numConstraintRows++;
+ info->nub--;
+ }
+ }
+ //test angular limits
+ for (i=0;i<3 ;i++ )
+ {
+ if(testAngularLimitMotor(i))
+ {
+ info->m_numConstraintRows++;
+ info->nub--;
+ }
+ }
+ }
+}
+
+void btGeneric6DofConstraint::getInfo1NonVirtual (btConstraintInfo1* info)
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ info->m_numConstraintRows = 0;
+ info->nub = 0;
+ } else
+ {
+ //pre-allocate all 6
+ info->m_numConstraintRows = 6;
+ info->nub = 0;
+ }
+}
+
+
+void btGeneric6DofConstraint::getInfo2 (btConstraintInfo2* info)
+{
+ btAssert(!m_useSolveConstraintObsolete);
+
+ const btTransform& transA = m_rbA.getCenterOfMassTransform();
+ const btTransform& transB = m_rbB.getCenterOfMassTransform();
+ const btVector3& linVelA = m_rbA.getLinearVelocity();
+ const btVector3& linVelB = m_rbB.getLinearVelocity();
+ const btVector3& angVelA = m_rbA.getAngularVelocity();
+ const btVector3& angVelB = m_rbB.getAngularVelocity();
+
+ if(m_useOffsetForConstraintFrame)
+ { // for stability better to solve angular limits first
+ int row = setAngularLimits(info, 0,transA,transB,linVelA,linVelB,angVelA,angVelB);
+ setLinearLimits(info, row, transA,transB,linVelA,linVelB,angVelA,angVelB);
+ }
+ else
+ { // leave old version for compatibility
+ int row = setLinearLimits(info, 0, transA,transB,linVelA,linVelB,angVelA,angVelB);
+ setAngularLimits(info, row,transA,transB,linVelA,linVelB,angVelA,angVelB);
+ }
+
+}
+
+
+void btGeneric6DofConstraint::getInfo2NonVirtual (btConstraintInfo2* info, const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB)
+{
+
+ btAssert(!m_useSolveConstraintObsolete);
+ //prepare constraint
+ calculateTransforms(transA,transB);
+
+ int i;
+ for (i=0;i<3 ;i++ )
+ {
+ testAngularLimitMotor(i);
+ }
+
+ if(m_useOffsetForConstraintFrame)
+ { // for stability better to solve angular limits first
+ int row = setAngularLimits(info, 0,transA,transB,linVelA,linVelB,angVelA,angVelB);
+ setLinearLimits(info, row, transA,transB,linVelA,linVelB,angVelA,angVelB);
+ }
+ else
+ { // leave old version for compatibility
+ int row = setLinearLimits(info, 0, transA,transB,linVelA,linVelB,angVelA,angVelB);
+ setAngularLimits(info, row,transA,transB,linVelA,linVelB,angVelA,angVelB);
+ }
+}
+
+
+
+int btGeneric6DofConstraint::setLinearLimits(btConstraintInfo2* info, int row, const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB)
+{
+// int row = 0;
+ //solve linear limits
+ btRotationalLimitMotor limot;
+ for (int i=0;i<3 ;i++ )
+ {
+ if(m_linearLimits.needApplyForce(i))
+ { // re-use rotational motor code
+ limot.m_bounce = btScalar(0.f);
+ limot.m_currentLimit = m_linearLimits.m_currentLimit[i];
+ limot.m_currentPosition = m_linearLimits.m_currentLinearDiff[i];
+ limot.m_currentLimitError = m_linearLimits.m_currentLimitError[i];
+ limot.m_damping = m_linearLimits.m_damping;
+ limot.m_enableMotor = m_linearLimits.m_enableMotor[i];
+ limot.m_hiLimit = m_linearLimits.m_upperLimit[i];
+ limot.m_limitSoftness = m_linearLimits.m_limitSoftness;
+ limot.m_loLimit = m_linearLimits.m_lowerLimit[i];
+ limot.m_maxLimitForce = btScalar(0.f);
+ limot.m_maxMotorForce = m_linearLimits.m_maxMotorForce[i];
+ limot.m_targetVelocity = m_linearLimits.m_targetVelocity[i];
+ btVector3 axis = m_calculatedTransformA.getBasis().getColumn(i);
+ int flags = m_flags >> (i * BT_6DOF_FLAGS_AXIS_SHIFT);
+ limot.m_normalCFM = (flags & BT_6DOF_FLAGS_CFM_NORM) ? m_linearLimits.m_normalCFM[i] : info->cfm[0];
+ limot.m_stopCFM = (flags & BT_6DOF_FLAGS_CFM_STOP) ? m_linearLimits.m_stopCFM[i] : info->cfm[0];
+ limot.m_stopERP = (flags & BT_6DOF_FLAGS_ERP_STOP) ? m_linearLimits.m_stopERP[i] : info->erp;
+ if(m_useOffsetForConstraintFrame)
+ {
+ int indx1 = (i + 1) % 3;
+ int indx2 = (i + 2) % 3;
+ int rotAllowed = 1; // rotations around orthos to current axis
+ if(m_angularLimits[indx1].m_currentLimit && m_angularLimits[indx2].m_currentLimit)
+ {
+ rotAllowed = 0;
+ }
+ row += get_limit_motor_info2(&limot, transA,transB,linVelA,linVelB,angVelA,angVelB, info, row, axis, 0, rotAllowed);
+ }
+ else
+ {
+ row += get_limit_motor_info2(&limot, transA,transB,linVelA,linVelB,angVelA,angVelB, info, row, axis, 0);
+ }
+ }
+ }
+ return row;
+}
+
+
+
+int btGeneric6DofConstraint::setAngularLimits(btConstraintInfo2 *info, int row_offset, const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB)
+{
+ btGeneric6DofConstraint * d6constraint = this;
+ int row = row_offset;
+ //solve angular limits
+ for (int i=0;i<3 ;i++ )
+ {
+ if(d6constraint->getRotationalLimitMotor(i)->needApplyTorques())
+ {
+ btVector3 axis = d6constraint->getAxis(i);
+ int flags = m_flags >> ((i + 3) * BT_6DOF_FLAGS_AXIS_SHIFT);
+ if(!(flags & BT_6DOF_FLAGS_CFM_NORM))
+ {
+ m_angularLimits[i].m_normalCFM = info->cfm[0];
+ }
+ if(!(flags & BT_6DOF_FLAGS_CFM_STOP))
+ {
+ m_angularLimits[i].m_stopCFM = info->cfm[0];
+ }
+ if(!(flags & BT_6DOF_FLAGS_ERP_STOP))
+ {
+ m_angularLimits[i].m_stopERP = info->erp;
+ }
+ row += get_limit_motor_info2(d6constraint->getRotationalLimitMotor(i),
+ transA,transB,linVelA,linVelB,angVelA,angVelB, info,row,axis,1);
+ }
+ }
+
+ return row;
+}
+
+
+
+
+void btGeneric6DofConstraint::updateRHS(btScalar timeStep)
+{
+ (void)timeStep;
+
+}
+
+
+void btGeneric6DofConstraint::setFrames(const btTransform& frameA, const btTransform& frameB)
+{
+ m_frameInA = frameA;
+ m_frameInB = frameB;
+ buildJacobian();
+ calculateTransforms();
+}
+
+
+
+btVector3 btGeneric6DofConstraint::getAxis(int axis_index) const
+{
+ return m_calculatedAxis[axis_index];
+}
+
+
+btScalar btGeneric6DofConstraint::getRelativePivotPosition(int axisIndex) const
+{
+ return m_calculatedLinearDiff[axisIndex];
+}
+
+
+btScalar btGeneric6DofConstraint::getAngle(int axisIndex) const
+{
+ return m_calculatedAxisAngleDiff[axisIndex];
+}
+
+
+
+void btGeneric6DofConstraint::calcAnchorPos(void)
+{
+ btScalar imA = m_rbA.getInvMass();
+ btScalar imB = m_rbB.getInvMass();
+ btScalar weight;
+ if(imB == btScalar(0.0))
+ {
+ weight = btScalar(1.0);
+ }
+ else
+ {
+ weight = imA / (imA + imB);
+ }
+ const btVector3& pA = m_calculatedTransformA.getOrigin();
+ const btVector3& pB = m_calculatedTransformB.getOrigin();
+ m_AnchorPos = pA * weight + pB * (btScalar(1.0) - weight);
+ return;
+}
+
+
+
+void btGeneric6DofConstraint::calculateLinearInfo()
+{
+ m_calculatedLinearDiff = m_calculatedTransformB.getOrigin() - m_calculatedTransformA.getOrigin();
+ m_calculatedLinearDiff = m_calculatedTransformA.getBasis().inverse() * m_calculatedLinearDiff;
+ for(int i = 0; i < 3; i++)
+ {
+ m_linearLimits.m_currentLinearDiff[i] = m_calculatedLinearDiff[i];
+ m_linearLimits.testLimitValue(i, m_calculatedLinearDiff[i]);
+ }
+}
+
+
+
+int btGeneric6DofConstraint::get_limit_motor_info2(
+ btRotationalLimitMotor * limot,
+ const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB,
+ btConstraintInfo2 *info, int row, btVector3& ax1, int rotational,int rotAllowed)
+{
+ int srow = row * info->rowskip;
+ int powered = limot->m_enableMotor;
+ int limit = limot->m_currentLimit;
+ if (powered || limit)
+ { // if the joint is powered, or has joint limits, add in the extra row
+ btScalar *J1 = rotational ? info->m_J1angularAxis : info->m_J1linearAxis;
+ btScalar *J2 = rotational ? info->m_J2angularAxis : 0;
+ J1[srow+0] = ax1[0];
+ J1[srow+1] = ax1[1];
+ J1[srow+2] = ax1[2];
+ if(rotational)
+ {
+ J2[srow+0] = -ax1[0];
+ J2[srow+1] = -ax1[1];
+ J2[srow+2] = -ax1[2];
+ }
+ if((!rotational))
+ {
+ if (m_useOffsetForConstraintFrame)
+ {
+ btVector3 tmpA, tmpB, relA, relB;
+ // get vector from bodyB to frameB in WCS
+ relB = m_calculatedTransformB.getOrigin() - transB.getOrigin();
+ // get its projection to constraint axis
+ btVector3 projB = ax1 * relB.dot(ax1);
+ // get vector directed from bodyB to constraint axis (and orthogonal to it)
+ btVector3 orthoB = relB - projB;
+ // same for bodyA
+ relA = m_calculatedTransformA.getOrigin() - transA.getOrigin();
+ btVector3 projA = ax1 * relA.dot(ax1);
+ btVector3 orthoA = relA - projA;
+ // get desired offset between frames A and B along constraint axis
+ btScalar desiredOffs = limot->m_currentPosition - limot->m_currentLimitError;
+ // desired vector from projection of center of bodyA to projection of center of bodyB to constraint axis
+ btVector3 totalDist = projA + ax1 * desiredOffs - projB;
+ // get offset vectors relA and relB
+ relA = orthoA + totalDist * m_factA;
+ relB = orthoB - totalDist * m_factB;
+ tmpA = relA.cross(ax1);
+ tmpB = relB.cross(ax1);
+ if(m_hasStaticBody && (!rotAllowed))
+ {
+ tmpA *= m_factA;
+ tmpB *= m_factB;
+ }
+ int i;
+ for (i=0; i<3; i++) info->m_J1angularAxis[srow+i] = tmpA[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[srow+i] = -tmpB[i];
+ } else
+ {
+ btVector3 ltd; // Linear Torque Decoupling vector
+ btVector3 c = m_calculatedTransformB.getOrigin() - transA.getOrigin();
+ ltd = c.cross(ax1);
+ info->m_J1angularAxis[srow+0] = ltd[0];
+ info->m_J1angularAxis[srow+1] = ltd[1];
+ info->m_J1angularAxis[srow+2] = ltd[2];
+
+ c = m_calculatedTransformB.getOrigin() - transB.getOrigin();
+ ltd = -c.cross(ax1);
+ info->m_J2angularAxis[srow+0] = ltd[0];
+ info->m_J2angularAxis[srow+1] = ltd[1];
+ info->m_J2angularAxis[srow+2] = ltd[2];
+ }
+ }
+ // if we're limited low and high simultaneously, the joint motor is
+ // ineffective
+ if (limit && (limot->m_loLimit == limot->m_hiLimit)) powered = 0;
+ info->m_constraintError[srow] = btScalar(0.f);
+ if (powered)
+ {
+ info->cfm[srow] = limot->m_normalCFM;
+ if(!limit)
+ {
+ btScalar tag_vel = rotational ? limot->m_targetVelocity : -limot->m_targetVelocity;
+
+ btScalar mot_fact = getMotorFactor( limot->m_currentPosition,
+ limot->m_loLimit,
+ limot->m_hiLimit,
+ tag_vel,
+ info->fps * limot->m_stopERP);
+ info->m_constraintError[srow] += mot_fact * limot->m_targetVelocity;
+ info->m_lowerLimit[srow] = -limot->m_maxMotorForce;
+ info->m_upperLimit[srow] = limot->m_maxMotorForce;
+ }
+ }
+ if(limit)
+ {
+ btScalar k = info->fps * limot->m_stopERP;
+ if(!rotational)
+ {
+ info->m_constraintError[srow] += k * limot->m_currentLimitError;
+ }
+ else
+ {
+ info->m_constraintError[srow] += -k * limot->m_currentLimitError;
+ }
+ info->cfm[srow] = limot->m_stopCFM;
+ if (limot->m_loLimit == limot->m_hiLimit)
+ { // limited low and high simultaneously
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else
+ {
+ if (limit == 1)
+ {
+ info->m_lowerLimit[srow] = 0;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else
+ {
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = 0;
+ }
+ // deal with bounce
+ if (limot->m_bounce > 0)
+ {
+ // calculate joint velocity
+ btScalar vel;
+ if (rotational)
+ {
+ vel = angVelA.dot(ax1);
+//make sure that if no body -> angVelB == zero vec
+// if (body1)
+ vel -= angVelB.dot(ax1);
+ }
+ else
+ {
+ vel = linVelA.dot(ax1);
+//make sure that if no body -> angVelB == zero vec
+// if (body1)
+ vel -= linVelB.dot(ax1);
+ }
+ // only apply bounce if the velocity is incoming, and if the
+ // resulting c[] exceeds what we already have.
+ if (limit == 1)
+ {
+ if (vel < 0)
+ {
+ btScalar newc = -limot->m_bounce* vel;
+ if (newc > info->m_constraintError[srow])
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ else
+ {
+ if (vel > 0)
+ {
+ btScalar newc = -limot->m_bounce * vel;
+ if (newc < info->m_constraintError[srow])
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ }
+ }
+ return 1;
+ }
+ else return 0;
+}
+
+
+
+
+
+
+ ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+ ///If no axis is provided, it uses the default axis for this constraint.
+void btGeneric6DofConstraint::setParam(int num, btScalar value, int axis)
+{
+ if((axis >= 0) && (axis < 3))
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ m_linearLimits.m_stopERP[axis] = value;
+ m_flags |= BT_6DOF_FLAGS_ERP_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT);
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ m_linearLimits.m_stopCFM[axis] = value;
+ m_flags |= BT_6DOF_FLAGS_CFM_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT);
+ break;
+ case BT_CONSTRAINT_CFM :
+ m_linearLimits.m_normalCFM[axis] = value;
+ m_flags |= BT_6DOF_FLAGS_CFM_NORM << (axis * BT_6DOF_FLAGS_AXIS_SHIFT);
+ break;
+ default :
+ btAssertConstrParams(0);
+ }
+ }
+ else if((axis >=3) && (axis < 6))
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ m_angularLimits[axis - 3].m_stopERP = value;
+ m_flags |= BT_6DOF_FLAGS_ERP_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT);
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ m_angularLimits[axis - 3].m_stopCFM = value;
+ m_flags |= BT_6DOF_FLAGS_CFM_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT);
+ break;
+ case BT_CONSTRAINT_CFM :
+ m_angularLimits[axis - 3].m_normalCFM = value;
+ m_flags |= BT_6DOF_FLAGS_CFM_NORM << (axis * BT_6DOF_FLAGS_AXIS_SHIFT);
+ break;
+ default :
+ btAssertConstrParams(0);
+ }
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+}
+
+ ///return the local value of parameter
+btScalar btGeneric6DofConstraint::getParam(int num, int axis) const
+{
+ btScalar retVal = 0;
+ if((axis >= 0) && (axis < 3))
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ btAssertConstrParams(m_flags & (BT_6DOF_FLAGS_ERP_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT)));
+ retVal = m_linearLimits.m_stopERP[axis];
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ btAssertConstrParams(m_flags & (BT_6DOF_FLAGS_CFM_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT)));
+ retVal = m_linearLimits.m_stopCFM[axis];
+ break;
+ case BT_CONSTRAINT_CFM :
+ btAssertConstrParams(m_flags & (BT_6DOF_FLAGS_CFM_NORM << (axis * BT_6DOF_FLAGS_AXIS_SHIFT)));
+ retVal = m_linearLimits.m_normalCFM[axis];
+ break;
+ default :
+ btAssertConstrParams(0);
+ }
+ }
+ else if((axis >=3) && (axis < 6))
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ btAssertConstrParams(m_flags & (BT_6DOF_FLAGS_ERP_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT)));
+ retVal = m_angularLimits[axis - 3].m_stopERP;
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ btAssertConstrParams(m_flags & (BT_6DOF_FLAGS_CFM_STOP << (axis * BT_6DOF_FLAGS_AXIS_SHIFT)));
+ retVal = m_angularLimits[axis - 3].m_stopCFM;
+ break;
+ case BT_CONSTRAINT_CFM :
+ btAssertConstrParams(m_flags & (BT_6DOF_FLAGS_CFM_NORM << (axis * BT_6DOF_FLAGS_AXIS_SHIFT)));
+ retVal = m_angularLimits[axis - 3].m_normalCFM;
+ break;
+ default :
+ btAssertConstrParams(0);
+ }
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ return retVal;
+}
+
+
+
+void btGeneric6DofConstraint::setAxis(const btVector3& axis1,const btVector3& axis2)
+{
+ btVector3 zAxis = axis1.normalized();
+ btVector3 yAxis = axis2.normalized();
+ btVector3 xAxis = yAxis.cross(zAxis); // we want right coordinate system
+
+ btTransform frameInW;
+ frameInW.setIdentity();
+ frameInW.getBasis().setValue( xAxis[0], yAxis[0], zAxis[0],
+ xAxis[1], yAxis[1], zAxis[1],
+ xAxis[2], yAxis[2], zAxis[2]);
+
+ // now get constraint frame in local coordinate systems
+ m_frameInA = m_rbA.getCenterOfMassTransform().inverse() * frameInW;
+ m_frameInB = m_rbB.getCenterOfMassTransform().inverse() * frameInW;
+
+ calculateTransforms();
+} \ No newline at end of file
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
new file mode 100644
index 00000000..b4410811
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h
@@ -0,0 +1,614 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/// 2009 March: btGeneric6DofConstraint refactored by Roman Ponomarev
+/// Added support for generic constraint solver through getInfo1/getInfo2 methods
+
+/*
+2007-09-09
+btGeneric6DofConstraint Refactored by Francisco Le?n
+email: projectileman@yahoo.com
+http://gimpact.sf.net
+*/
+
+
+#ifndef BT_GENERIC_6DOF_CONSTRAINT_H
+#define BT_GENERIC_6DOF_CONSTRAINT_H
+
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btTypedConstraint.h"
+
+class btRigidBody;
+
+
+
+
+//! Rotation Limit structure for generic joints
+class btRotationalLimitMotor
+{
+public:
+ //! limit_parameters
+ //!@{
+ btScalar m_loLimit;//!< joint limit
+ btScalar m_hiLimit;//!< joint limit
+ btScalar m_targetVelocity;//!< target motor velocity
+ btScalar m_maxMotorForce;//!< max force on motor
+ btScalar m_maxLimitForce;//!< max force on limit
+ btScalar m_damping;//!< Damping.
+ btScalar m_limitSoftness;//! Relaxation factor
+ btScalar m_normalCFM;//!< Constraint force mixing factor
+ btScalar m_stopERP;//!< Error tolerance factor when joint is at limit
+ btScalar m_stopCFM;//!< Constraint force mixing factor when joint is at limit
+ btScalar m_bounce;//!< restitution factor
+ bool m_enableMotor;
+
+ //!@}
+
+ //! temp_variables
+ //!@{
+ btScalar m_currentLimitError;//! How much is violated this limit
+ btScalar m_currentPosition; //! current value of angle
+ int m_currentLimit;//!< 0=free, 1=at lo limit, 2=at hi limit
+ btScalar m_accumulatedImpulse;
+ //!@}
+
+ btRotationalLimitMotor()
+ {
+ m_accumulatedImpulse = 0.f;
+ m_targetVelocity = 0;
+ m_maxMotorForce = 0.1f;
+ m_maxLimitForce = 300.0f;
+ m_loLimit = 1.0f;
+ m_hiLimit = -1.0f;
+ m_normalCFM = 0.f;
+ m_stopERP = 0.2f;
+ m_stopCFM = 0.f;
+ m_bounce = 0.0f;
+ m_damping = 1.0f;
+ m_limitSoftness = 0.5f;
+ m_currentLimit = 0;
+ m_currentLimitError = 0;
+ m_enableMotor = false;
+ }
+
+ btRotationalLimitMotor(const btRotationalLimitMotor & limot)
+ {
+ m_targetVelocity = limot.m_targetVelocity;
+ m_maxMotorForce = limot.m_maxMotorForce;
+ m_limitSoftness = limot.m_limitSoftness;
+ m_loLimit = limot.m_loLimit;
+ m_hiLimit = limot.m_hiLimit;
+ m_normalCFM = limot.m_normalCFM;
+ m_stopERP = limot.m_stopERP;
+ m_stopCFM = limot.m_stopCFM;
+ m_bounce = limot.m_bounce;
+ m_currentLimit = limot.m_currentLimit;
+ m_currentLimitError = limot.m_currentLimitError;
+ m_enableMotor = limot.m_enableMotor;
+ }
+
+
+
+ //! Is limited
+ bool isLimited()
+ {
+ if(m_loLimit > m_hiLimit) return false;
+ return true;
+ }
+
+ //! Need apply correction
+ bool needApplyTorques()
+ {
+ if(m_currentLimit == 0 && m_enableMotor == false) return false;
+ return true;
+ }
+
+ //! calculates error
+ /*!
+ calculates m_currentLimit and m_currentLimitError.
+ */
+ int testLimitValue(btScalar test_value);
+
+ //! apply the correction impulses for two bodies
+ btScalar solveAngularLimits(btScalar timeStep,btVector3& axis, btScalar jacDiagABInv,btRigidBody * body0, btRigidBody * body1);
+
+};
+
+
+
+class btTranslationalLimitMotor
+{
+public:
+ btVector3 m_lowerLimit;//!< the constraint lower limits
+ btVector3 m_upperLimit;//!< the constraint upper limits
+ btVector3 m_accumulatedImpulse;
+ //! Linear_Limit_parameters
+ //!@{
+ btScalar m_limitSoftness;//!< Softness for linear limit
+ btScalar m_damping;//!< Damping for linear limit
+ btScalar m_restitution;//! Bounce parameter for linear limit
+ btVector3 m_normalCFM;//!< Constraint force mixing factor
+ btVector3 m_stopERP;//!< Error tolerance factor when joint is at limit
+ btVector3 m_stopCFM;//!< Constraint force mixing factor when joint is at limit
+ //!@}
+ bool m_enableMotor[3];
+ btVector3 m_targetVelocity;//!< target motor velocity
+ btVector3 m_maxMotorForce;//!< max force on motor
+ btVector3 m_currentLimitError;//! How much is violated this limit
+ btVector3 m_currentLinearDiff;//! Current relative offset of constraint frames
+ int m_currentLimit[3];//!< 0=free, 1=at lower limit, 2=at upper limit
+
+ btTranslationalLimitMotor()
+ {
+ m_lowerLimit.setValue(0.f,0.f,0.f);
+ m_upperLimit.setValue(0.f,0.f,0.f);
+ m_accumulatedImpulse.setValue(0.f,0.f,0.f);
+ m_normalCFM.setValue(0.f, 0.f, 0.f);
+ m_stopERP.setValue(0.2f, 0.2f, 0.2f);
+ m_stopCFM.setValue(0.f, 0.f, 0.f);
+
+ m_limitSoftness = 0.7f;
+ m_damping = btScalar(1.0f);
+ m_restitution = btScalar(0.5f);
+ for(int i=0; i < 3; i++)
+ {
+ m_enableMotor[i] = false;
+ m_targetVelocity[i] = btScalar(0.f);
+ m_maxMotorForce[i] = btScalar(0.f);
+ }
+ }
+
+ btTranslationalLimitMotor(const btTranslationalLimitMotor & other )
+ {
+ m_lowerLimit = other.m_lowerLimit;
+ m_upperLimit = other.m_upperLimit;
+ m_accumulatedImpulse = other.m_accumulatedImpulse;
+
+ m_limitSoftness = other.m_limitSoftness ;
+ m_damping = other.m_damping;
+ m_restitution = other.m_restitution;
+ m_normalCFM = other.m_normalCFM;
+ m_stopERP = other.m_stopERP;
+ m_stopCFM = other.m_stopCFM;
+
+ for(int i=0; i < 3; i++)
+ {
+ m_enableMotor[i] = other.m_enableMotor[i];
+ m_targetVelocity[i] = other.m_targetVelocity[i];
+ m_maxMotorForce[i] = other.m_maxMotorForce[i];
+ }
+ }
+
+ //! Test limit
+ /*!
+ - free means upper < lower,
+ - locked means upper == lower
+ - limited means upper > lower
+ - limitIndex: first 3 are linear, next 3 are angular
+ */
+ inline bool isLimited(int limitIndex)
+ {
+ return (m_upperLimit[limitIndex] >= m_lowerLimit[limitIndex]);
+ }
+ inline bool needApplyForce(int limitIndex)
+ {
+ if(m_currentLimit[limitIndex] == 0 && m_enableMotor[limitIndex] == false) return false;
+ return true;
+ }
+ int testLimitValue(int limitIndex, btScalar test_value);
+
+
+ btScalar solveLinearAxis(
+ btScalar timeStep,
+ btScalar jacDiagABInv,
+ btRigidBody& body1,const btVector3 &pointInA,
+ btRigidBody& body2,const btVector3 &pointInB,
+ int limit_index,
+ const btVector3 & axis_normal_on_a,
+ const btVector3 & anchorPos);
+
+
+};
+
+enum bt6DofFlags
+{
+ BT_6DOF_FLAGS_CFM_NORM = 1,
+ BT_6DOF_FLAGS_CFM_STOP = 2,
+ BT_6DOF_FLAGS_ERP_STOP = 4
+};
+#define BT_6DOF_FLAGS_AXIS_SHIFT 3 // bits per axis
+
+
+/// btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space
+/*!
+btGeneric6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked'.
+currently this limit supports rotational motors<br>
+<ul>
+<li> For Linear limits, use btGeneric6DofConstraint.setLinearUpperLimit, btGeneric6DofConstraint.setLinearLowerLimit. You can set the parameters with the btTranslationalLimitMotor structure accsesible through the btGeneric6DofConstraint.getTranslationalLimitMotor method.
+At this moment translational motors are not supported. May be in the future. </li>
+
+<li> For Angular limits, use the btRotationalLimitMotor structure for configuring the limit.
+This is accessible through btGeneric6DofConstraint.getLimitMotor method,
+This brings support for limit parameters and motors. </li>
+
+<li> Angulars limits have these possible ranges:
+<table border=1 >
+<tr>
+ <td><b>AXIS</b></td>
+ <td><b>MIN ANGLE</b></td>
+ <td><b>MAX ANGLE</b></td>
+</tr><tr>
+ <td>X</td>
+ <td>-PI</td>
+ <td>PI</td>
+</tr><tr>
+ <td>Y</td>
+ <td>-PI/2</td>
+ <td>PI/2</td>
+</tr><tr>
+ <td>Z</td>
+ <td>-PI</td>
+ <td>PI</td>
+</tr>
+</table>
+</li>
+</ul>
+
+*/
+class btGeneric6DofConstraint : public btTypedConstraint
+{
+protected:
+
+ //! relative_frames
+ //!@{
+ btTransform m_frameInA;//!< the constraint space w.r.t body A
+ btTransform m_frameInB;//!< the constraint space w.r.t body B
+ //!@}
+
+ //! Jacobians
+ //!@{
+ btJacobianEntry m_jacLinear[3];//!< 3 orthogonal linear constraints
+ btJacobianEntry m_jacAng[3];//!< 3 orthogonal angular constraints
+ //!@}
+
+ //! Linear_Limit_parameters
+ //!@{
+ btTranslationalLimitMotor m_linearLimits;
+ //!@}
+
+
+ //! hinge_parameters
+ //!@{
+ btRotationalLimitMotor m_angularLimits[3];
+ //!@}
+
+
+protected:
+ //! temporal variables
+ //!@{
+ btScalar m_timeStep;
+ btTransform m_calculatedTransformA;
+ btTransform m_calculatedTransformB;
+ btVector3 m_calculatedAxisAngleDiff;
+ btVector3 m_calculatedAxis[3];
+ btVector3 m_calculatedLinearDiff;
+ btScalar m_factA;
+ btScalar m_factB;
+ bool m_hasStaticBody;
+
+ btVector3 m_AnchorPos; // point betwen pivots of bodies A and B to solve linear axes
+
+ bool m_useLinearReferenceFrameA;
+ bool m_useOffsetForConstraintFrame;
+
+ int m_flags;
+
+ //!@}
+
+ btGeneric6DofConstraint& operator=(btGeneric6DofConstraint& other)
+ {
+ btAssert(0);
+ (void) other;
+ return *this;
+ }
+
+
+ int setAngularLimits(btConstraintInfo2 *info, int row_offset,const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB);
+
+ int setLinearLimits(btConstraintInfo2 *info, int row, const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB);
+
+ void buildLinearJacobian(
+ btJacobianEntry & jacLinear,const btVector3 & normalWorld,
+ const btVector3 & pivotAInW,const btVector3 & pivotBInW);
+
+ void buildAngularJacobian(btJacobianEntry & jacAngular,const btVector3 & jointAxisW);
+
+ // tests linear limits
+ void calculateLinearInfo();
+
+ //! calcs the euler angles between the two bodies.
+ void calculateAngleInfo();
+
+
+
+public:
+
+ ///for backwards compatibility during the transition to 'getInfo/getInfo2'
+ bool m_useSolveConstraintObsolete;
+
+ btGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
+ btGeneric6DofConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameB);
+
+ //! Calcs global transform of the offsets
+ /*!
+ Calcs the global transform for the joint offset for body A an B, and also calcs the agle differences between the bodies.
+ \sa btGeneric6DofConstraint.getCalculatedTransformA , btGeneric6DofConstraint.getCalculatedTransformB, btGeneric6DofConstraint.calculateAngleInfo
+ */
+ void calculateTransforms(const btTransform& transA,const btTransform& transB);
+
+ void calculateTransforms();
+
+ //! Gets the global transform of the offset for body A
+ /*!
+ \sa btGeneric6DofConstraint.getFrameOffsetA, btGeneric6DofConstraint.getFrameOffsetB, btGeneric6DofConstraint.calculateAngleInfo.
+ */
+ const btTransform & getCalculatedTransformA() const
+ {
+ return m_calculatedTransformA;
+ }
+
+ //! Gets the global transform of the offset for body B
+ /*!
+ \sa btGeneric6DofConstraint.getFrameOffsetA, btGeneric6DofConstraint.getFrameOffsetB, btGeneric6DofConstraint.calculateAngleInfo.
+ */
+ const btTransform & getCalculatedTransformB() const
+ {
+ return m_calculatedTransformB;
+ }
+
+ const btTransform & getFrameOffsetA() const
+ {
+ return m_frameInA;
+ }
+
+ const btTransform & getFrameOffsetB() const
+ {
+ return m_frameInB;
+ }
+
+
+ btTransform & getFrameOffsetA()
+ {
+ return m_frameInA;
+ }
+
+ btTransform & getFrameOffsetB()
+ {
+ return m_frameInB;
+ }
+
+
+ //! performs Jacobian calculation, and also calculates angle differences and axis
+ virtual void buildJacobian();
+
+ virtual void getInfo1 (btConstraintInfo1* info);
+
+ void getInfo1NonVirtual (btConstraintInfo1* info);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ void getInfo2NonVirtual (btConstraintInfo2* info,const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB);
+
+
+ void updateRHS(btScalar timeStep);
+
+ //! Get the rotation axis in global coordinates
+ /*!
+ \pre btGeneric6DofConstraint.buildJacobian must be called previously.
+ */
+ btVector3 getAxis(int axis_index) const;
+
+ //! Get the relative Euler angle
+ /*!
+ \pre btGeneric6DofConstraint::calculateTransforms() must be called previously.
+ */
+ btScalar getAngle(int axis_index) const;
+
+ //! Get the relative position of the constraint pivot
+ /*!
+ \pre btGeneric6DofConstraint::calculateTransforms() must be called previously.
+ */
+ btScalar getRelativePivotPosition(int axis_index) const;
+
+ void setFrames(const btTransform & frameA, const btTransform & frameB);
+
+ //! Test angular limit.
+ /*!
+ Calculates angular correction and returns true if limit needs to be corrected.
+ \pre btGeneric6DofConstraint::calculateTransforms() must be called previously.
+ */
+ bool testAngularLimitMotor(int axis_index);
+
+ void setLinearLowerLimit(const btVector3& linearLower)
+ {
+ m_linearLimits.m_lowerLimit = linearLower;
+ }
+
+ void getLinearLowerLimit(btVector3& linearLower)
+ {
+ linearLower = m_linearLimits.m_lowerLimit;
+ }
+
+ void setLinearUpperLimit(const btVector3& linearUpper)
+ {
+ m_linearLimits.m_upperLimit = linearUpper;
+ }
+
+ void getLinearUpperLimit(btVector3& linearUpper)
+ {
+ linearUpper = m_linearLimits.m_upperLimit;
+ }
+
+ void setAngularLowerLimit(const btVector3& angularLower)
+ {
+ for(int i = 0; i < 3; i++)
+ m_angularLimits[i].m_loLimit = btNormalizeAngle(angularLower[i]);
+ }
+
+ void getAngularLowerLimit(btVector3& angularLower)
+ {
+ for(int i = 0; i < 3; i++)
+ angularLower[i] = m_angularLimits[i].m_loLimit;
+ }
+
+ void setAngularUpperLimit(const btVector3& angularUpper)
+ {
+ for(int i = 0; i < 3; i++)
+ m_angularLimits[i].m_hiLimit = btNormalizeAngle(angularUpper[i]);
+ }
+
+ void getAngularUpperLimit(btVector3& angularUpper)
+ {
+ for(int i = 0; i < 3; i++)
+ angularUpper[i] = m_angularLimits[i].m_hiLimit;
+ }
+
+ //! Retrieves the angular limit informacion
+ btRotationalLimitMotor * getRotationalLimitMotor(int index)
+ {
+ return &m_angularLimits[index];
+ }
+
+ //! Retrieves the limit informacion
+ btTranslationalLimitMotor * getTranslationalLimitMotor()
+ {
+ return &m_linearLimits;
+ }
+
+ //first 3 are linear, next 3 are angular
+ void setLimit(int axis, btScalar lo, btScalar hi)
+ {
+ if(axis<3)
+ {
+ m_linearLimits.m_lowerLimit[axis] = lo;
+ m_linearLimits.m_upperLimit[axis] = hi;
+ }
+ else
+ {
+ lo = btNormalizeAngle(lo);
+ hi = btNormalizeAngle(hi);
+ m_angularLimits[axis-3].m_loLimit = lo;
+ m_angularLimits[axis-3].m_hiLimit = hi;
+ }
+ }
+
+ //! Test limit
+ /*!
+ - free means upper < lower,
+ - locked means upper == lower
+ - limited means upper > lower
+ - limitIndex: first 3 are linear, next 3 are angular
+ */
+ bool isLimited(int limitIndex)
+ {
+ if(limitIndex<3)
+ {
+ return m_linearLimits.isLimited(limitIndex);
+
+ }
+ return m_angularLimits[limitIndex-3].isLimited();
+ }
+
+ virtual void calcAnchorPos(void); // overridable
+
+ int get_limit_motor_info2( btRotationalLimitMotor * limot,
+ const btTransform& transA,const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB,const btVector3& angVelA,const btVector3& angVelB,
+ btConstraintInfo2 *info, int row, btVector3& ax1, int rotational, int rotAllowed = false);
+
+ // access for UseFrameOffset
+ bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
+ void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; }
+
+ ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+ ///If no axis is provided, it uses the default axis for this constraint.
+ virtual void setParam(int num, btScalar value, int axis = -1);
+ ///return the local value of parameter
+ virtual btScalar getParam(int num, int axis = -1) const;
+
+ void setAxis( const btVector3& axis1, const btVector3& axis2);
+
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btGeneric6DofConstraintData
+{
+ btTypedConstraintData m_typeConstraintData;
+ btTransformFloatData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransformFloatData m_rbBFrame;
+
+ btVector3FloatData m_linearUpperLimit;
+ btVector3FloatData m_linearLowerLimit;
+
+ btVector3FloatData m_angularUpperLimit;
+ btVector3FloatData m_angularLowerLimit;
+
+ int m_useLinearReferenceFrameA;
+ int m_useOffsetForConstraintFrame;
+};
+
+SIMD_FORCE_INLINE int btGeneric6DofConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btGeneric6DofConstraintData);
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btGeneric6DofConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+
+ btGeneric6DofConstraintData* dof = (btGeneric6DofConstraintData*)dataBuffer;
+ btTypedConstraint::serialize(&dof->m_typeConstraintData,serializer);
+
+ m_frameInA.serializeFloat(dof->m_rbAFrame);
+ m_frameInB.serializeFloat(dof->m_rbBFrame);
+
+
+ int i;
+ for (i=0;i<3;i++)
+ {
+ dof->m_angularLowerLimit.m_floats[i] = float(m_angularLimits[i].m_loLimit);
+ dof->m_angularUpperLimit.m_floats[i] = float(m_angularLimits[i].m_hiLimit);
+ dof->m_linearLowerLimit.m_floats[i] = float(m_linearLimits.m_lowerLimit[i]);
+ dof->m_linearUpperLimit.m_floats[i] = float(m_linearLimits.m_upperLimit[i]);
+ }
+
+ dof->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA? 1 : 0;
+ dof->m_useOffsetForConstraintFrame = m_useOffsetForConstraintFrame ? 1 : 0;
+
+ return "btGeneric6DofConstraintData";
+}
+
+
+
+
+
+#endif //BT_GENERIC_6DOF_CONSTRAINT_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp
new file mode 100644
index 00000000..d3503456
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp
@@ -0,0 +1,172 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btGeneric6DofSpringConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+
+
+btGeneric6DofSpringConstraint::btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA)
+ : btGeneric6DofConstraint(rbA, rbB, frameInA, frameInB, useLinearReferenceFrameA)
+{
+ m_objectType = D6_SPRING_CONSTRAINT_TYPE;
+
+ for(int i = 0; i < 6; i++)
+ {
+ m_springEnabled[i] = false;
+ m_equilibriumPoint[i] = btScalar(0.f);
+ m_springStiffness[i] = btScalar(0.f);
+ m_springDamping[i] = btScalar(1.f);
+ }
+}
+
+
+void btGeneric6DofSpringConstraint::enableSpring(int index, bool onOff)
+{
+ btAssert((index >= 0) && (index < 6));
+ m_springEnabled[index] = onOff;
+ if(index < 3)
+ {
+ m_linearLimits.m_enableMotor[index] = onOff;
+ }
+ else
+ {
+ m_angularLimits[index - 3].m_enableMotor = onOff;
+ }
+}
+
+
+
+void btGeneric6DofSpringConstraint::setStiffness(int index, btScalar stiffness)
+{
+ btAssert((index >= 0) && (index < 6));
+ m_springStiffness[index] = stiffness;
+}
+
+
+void btGeneric6DofSpringConstraint::setDamping(int index, btScalar damping)
+{
+ btAssert((index >= 0) && (index < 6));
+ m_springDamping[index] = damping;
+}
+
+
+void btGeneric6DofSpringConstraint::setEquilibriumPoint()
+{
+ calculateTransforms();
+ int i;
+
+ for( i = 0; i < 3; i++)
+ {
+ m_equilibriumPoint[i] = m_calculatedLinearDiff[i];
+ }
+ for(i = 0; i < 3; i++)
+ {
+ m_equilibriumPoint[i + 3] = m_calculatedAxisAngleDiff[i];
+ }
+}
+
+
+
+void btGeneric6DofSpringConstraint::setEquilibriumPoint(int index)
+{
+ btAssert((index >= 0) && (index < 6));
+ calculateTransforms();
+ if(index < 3)
+ {
+ m_equilibriumPoint[index] = m_calculatedLinearDiff[index];
+ }
+ else
+ {
+ m_equilibriumPoint[index] = m_calculatedAxisAngleDiff[index - 3];
+ }
+}
+
+void btGeneric6DofSpringConstraint::setEquilibriumPoint(int index, btScalar val)
+{
+ btAssert((index >= 0) && (index < 6));
+ m_equilibriumPoint[index] = val;
+}
+
+
+void btGeneric6DofSpringConstraint::internalUpdateSprings(btConstraintInfo2* info)
+{
+ // it is assumed that calculateTransforms() have been called before this call
+ int i;
+ btVector3 relVel = m_rbB.getLinearVelocity() - m_rbA.getLinearVelocity();
+ for(i = 0; i < 3; i++)
+ {
+ if(m_springEnabled[i])
+ {
+ // get current position of constraint
+ btScalar currPos = m_calculatedLinearDiff[i];
+ // calculate difference
+ btScalar delta = currPos - m_equilibriumPoint[i];
+ // spring force is (delta * m_stiffness) according to Hooke's Law
+ btScalar force = delta * m_springStiffness[i];
+ btScalar velFactor = info->fps * m_springDamping[i] / btScalar(info->m_numIterations);
+ m_linearLimits.m_targetVelocity[i] = velFactor * force;
+ m_linearLimits.m_maxMotorForce[i] = btFabs(force) / info->fps;
+ }
+ }
+ for(i = 0; i < 3; i++)
+ {
+ if(m_springEnabled[i + 3])
+ {
+ // get current position of constraint
+ btScalar currPos = m_calculatedAxisAngleDiff[i];
+ // calculate difference
+ btScalar delta = currPos - m_equilibriumPoint[i+3];
+ // spring force is (-delta * m_stiffness) according to Hooke's Law
+ btScalar force = -delta * m_springStiffness[i+3];
+ btScalar velFactor = info->fps * m_springDamping[i+3] / btScalar(info->m_numIterations);
+ m_angularLimits[i].m_targetVelocity = velFactor * force;
+ m_angularLimits[i].m_maxMotorForce = btFabs(force) / info->fps;
+ }
+ }
+}
+
+
+void btGeneric6DofSpringConstraint::getInfo2(btConstraintInfo2* info)
+{
+ // this will be called by constraint solver at the constraint setup stage
+ // set current motor parameters
+ internalUpdateSprings(info);
+ // do the rest of job for constraint setup
+ btGeneric6DofConstraint::getInfo2(info);
+}
+
+
+void btGeneric6DofSpringConstraint::setAxis(const btVector3& axis1,const btVector3& axis2)
+{
+ btVector3 zAxis = axis1.normalized();
+ btVector3 yAxis = axis2.normalized();
+ btVector3 xAxis = yAxis.cross(zAxis); // we want right coordinate system
+
+ btTransform frameInW;
+ frameInW.setIdentity();
+ frameInW.getBasis().setValue( xAxis[0], yAxis[0], zAxis[0],
+ xAxis[1], yAxis[1], zAxis[1],
+ xAxis[2], yAxis[2], zAxis[2]);
+
+ // now get constraint frame in local coordinate systems
+ m_frameInA = m_rbA.getCenterOfMassTransform().inverse() * frameInW;
+ m_frameInB = m_rbB.getCenterOfMassTransform().inverse() * frameInW;
+
+ calculateTransforms();
+}
+
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h
new file mode 100644
index 00000000..b3f2ef8f
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h
@@ -0,0 +1,97 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
+#define BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
+
+
+#include "LinearMath/btVector3.h"
+#include "btTypedConstraint.h"
+#include "btGeneric6DofConstraint.h"
+
+
+/// Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF
+
+/// DOF index used in enableSpring() and setStiffness() means:
+/// 0 : translation X
+/// 1 : translation Y
+/// 2 : translation Z
+/// 3 : rotation X (3rd Euler rotational around new position of X axis, range [-PI+epsilon, PI-epsilon] )
+/// 4 : rotation Y (2nd Euler rotational around new position of Y axis, range [-PI/2+epsilon, PI/2-epsilon] )
+/// 5 : rotation Z (1st Euler rotational around Z axis, range [-PI+epsilon, PI-epsilon] )
+
+class btGeneric6DofSpringConstraint : public btGeneric6DofConstraint
+{
+protected:
+ bool m_springEnabled[6];
+ btScalar m_equilibriumPoint[6];
+ btScalar m_springStiffness[6];
+ btScalar m_springDamping[6]; // between 0 and 1 (1 == no damping)
+ void internalUpdateSprings(btConstraintInfo2* info);
+public:
+ btGeneric6DofSpringConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
+ void enableSpring(int index, bool onOff);
+ void setStiffness(int index, btScalar stiffness);
+ void setDamping(int index, btScalar damping);
+ void setEquilibriumPoint(); // set the current constraint position/orientation as an equilibrium point for all DOF
+ void setEquilibriumPoint(int index); // set the current constraint position/orientation as an equilibrium point for given DOF
+ void setEquilibriumPoint(int index, btScalar val);
+
+ virtual void setAxis( const btVector3& axis1, const btVector3& axis2);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ virtual int calculateSerializeBufferSize() const;
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+};
+
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btGeneric6DofSpringConstraintData
+{
+ btGeneric6DofConstraintData m_6dofData;
+
+ int m_springEnabled[6];
+ float m_equilibriumPoint[6];
+ float m_springStiffness[6];
+ float m_springDamping[6];
+};
+
+SIMD_FORCE_INLINE int btGeneric6DofSpringConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btGeneric6DofSpringConstraintData);
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btGeneric6DofSpringConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btGeneric6DofSpringConstraintData* dof = (btGeneric6DofSpringConstraintData*)dataBuffer;
+ btGeneric6DofConstraint::serialize(&dof->m_6dofData,serializer);
+
+ int i;
+ for (i=0;i<6;i++)
+ {
+ dof->m_equilibriumPoint[i] = m_equilibriumPoint[i];
+ dof->m_springDamping[i] = m_springDamping[i];
+ dof->m_springEnabled[i] = m_springEnabled[i]? 1 : 0;
+ dof->m_springStiffness[i] = m_springStiffness[i];
+ }
+ return "btGeneric6DofConstraintData";
+}
+
+#endif // BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp
new file mode 100644
index 00000000..29123d52
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp
@@ -0,0 +1,66 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btHinge2Constraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+
+
+
+// constructor
+// anchor, axis1 and axis2 are in world coordinate system
+// axis1 must be orthogonal to axis2
+btHinge2Constraint::btHinge2Constraint(btRigidBody& rbA, btRigidBody& rbB, btVector3& anchor, btVector3& axis1, btVector3& axis2)
+: btGeneric6DofSpringConstraint(rbA, rbB, btTransform::getIdentity(), btTransform::getIdentity(), true),
+ m_anchor(anchor),
+ m_axis1(axis1),
+ m_axis2(axis2)
+{
+ // build frame basis
+ // 6DOF constraint uses Euler angles and to define limits
+ // it is assumed that rotational order is :
+ // Z - first, allowed limits are (-PI,PI);
+ // new position of Y - second (allowed limits are (-PI/2 + epsilon, PI/2 - epsilon), where epsilon is a small positive number
+ // used to prevent constraint from instability on poles;
+ // new position of X, allowed limits are (-PI,PI);
+ // So to simulate ODE Universal joint we should use parent axis as Z, child axis as Y and limit all other DOFs
+ // Build the frame in world coordinate system first
+ btVector3 zAxis = axis1.normalize();
+ btVector3 xAxis = axis2.normalize();
+ btVector3 yAxis = zAxis.cross(xAxis); // we want right coordinate system
+ btTransform frameInW;
+ frameInW.setIdentity();
+ frameInW.getBasis().setValue( xAxis[0], yAxis[0], zAxis[0],
+ xAxis[1], yAxis[1], zAxis[1],
+ xAxis[2], yAxis[2], zAxis[2]);
+ frameInW.setOrigin(anchor);
+ // now get constraint frame in local coordinate systems
+ m_frameInA = rbA.getCenterOfMassTransform().inverse() * frameInW;
+ m_frameInB = rbB.getCenterOfMassTransform().inverse() * frameInW;
+ // sei limits
+ setLinearLowerLimit(btVector3(0.f, 0.f, -1.f));
+ setLinearUpperLimit(btVector3(0.f, 0.f, 1.f));
+ // like front wheels of a car
+ setAngularLowerLimit(btVector3(1.f, 0.f, -SIMD_HALF_PI * 0.5f));
+ setAngularUpperLimit(btVector3(-1.f, 0.f, SIMD_HALF_PI * 0.5f));
+ // enable suspension
+ enableSpring(2, true);
+ setStiffness(2, SIMD_PI * SIMD_PI * 4.f); // period 1 sec for 1 kilogramm weel :-)
+ setDamping(2, 0.01f);
+ setEquilibriumPoint();
+}
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h
new file mode 100644
index 00000000..a76452dd
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHinge2Constraint.h
@@ -0,0 +1,58 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_HINGE2_CONSTRAINT_H
+#define BT_HINGE2_CONSTRAINT_H
+
+
+
+#include "LinearMath/btVector3.h"
+#include "btTypedConstraint.h"
+#include "btGeneric6DofSpringConstraint.h"
+
+
+
+// Constraint similar to ODE Hinge2 Joint
+// has 3 degrees of frredom:
+// 2 rotational degrees of freedom, similar to Euler rotations around Z (axis 1) and X (axis 2)
+// 1 translational (along axis Z) with suspension spring
+
+class btHinge2Constraint : public btGeneric6DofSpringConstraint
+{
+protected:
+ btVector3 m_anchor;
+ btVector3 m_axis1;
+ btVector3 m_axis2;
+public:
+ // constructor
+ // anchor, axis1 and axis2 are in world coordinate system
+ // axis1 must be orthogonal to axis2
+ btHinge2Constraint(btRigidBody& rbA, btRigidBody& rbB, btVector3& anchor, btVector3& axis1, btVector3& axis2);
+ // access
+ const btVector3& getAnchor() { return m_calculatedTransformA.getOrigin(); }
+ const btVector3& getAnchor2() { return m_calculatedTransformB.getOrigin(); }
+ const btVector3& getAxis1() { return m_axis1; }
+ const btVector3& getAxis2() { return m_axis2; }
+ btScalar getAngle1() { return getAngle(2); }
+ btScalar getAngle2() { return getAngle(0); }
+ // limits
+ void setUpperLimit(btScalar ang1max) { setAngularUpperLimit(btVector3(-1.f, 0.f, ang1max)); }
+ void setLowerLimit(btScalar ang1min) { setAngularLowerLimit(btVector3( 1.f, 0.f, ang1min)); }
+};
+
+
+
+#endif // BT_HINGE2_CONSTRAINT_H
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
new file mode 100644
index 00000000..144beef1
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
@@ -0,0 +1,1033 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btHingeConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+#include "LinearMath/btMinMax.h"
+#include <new>
+#include "btSolverBody.h"
+
+
+
+//#define HINGE_USE_OBSOLETE_SOLVER false
+#define HINGE_USE_OBSOLETE_SOLVER false
+
+#define HINGE_USE_FRAME_OFFSET true
+
+#ifndef __SPU__
+
+
+
+
+
+btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB,
+ const btVector3& axisInA,const btVector3& axisInB, bool useReferenceFrameA)
+ :btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB),
+ m_angularOnly(false),
+ m_enableAngularMotor(false),
+ m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER),
+ m_useOffsetForConstraintFrame(HINGE_USE_FRAME_OFFSET),
+ m_useReferenceFrameA(useReferenceFrameA),
+ m_flags(0)
+#ifdef _BT_USE_CENTER_LIMIT_
+ ,m_limit()
+#endif
+{
+ m_rbAFrame.getOrigin() = pivotInA;
+
+ // since no frame is given, assume this to be zero angle and just pick rb transform axis
+ btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0);
+
+ btVector3 rbAxisA2;
+ btScalar projection = axisInA.dot(rbAxisA1);
+ if (projection >= 1.0f - SIMD_EPSILON) {
+ rbAxisA1 = -rbA.getCenterOfMassTransform().getBasis().getColumn(2);
+ rbAxisA2 = rbA.getCenterOfMassTransform().getBasis().getColumn(1);
+ } else if (projection <= -1.0f + SIMD_EPSILON) {
+ rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(2);
+ rbAxisA2 = rbA.getCenterOfMassTransform().getBasis().getColumn(1);
+ } else {
+ rbAxisA2 = axisInA.cross(rbAxisA1);
+ rbAxisA1 = rbAxisA2.cross(axisInA);
+ }
+
+ m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
+ rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
+ rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
+
+ btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
+ btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1);
+ btVector3 rbAxisB2 = axisInB.cross(rbAxisB1);
+
+ m_rbBFrame.getOrigin() = pivotInB;
+ m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(),
+ rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(),
+ rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() );
+
+#ifndef _BT_USE_CENTER_LIMIT_
+ //start with free
+ m_lowerLimit = btScalar(1.0f);
+ m_upperLimit = btScalar(-1.0f);
+ m_biasFactor = 0.3f;
+ m_relaxationFactor = 1.0f;
+ m_limitSoftness = 0.9f;
+ m_solveLimit = false;
+#endif
+ m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f);
+}
+
+
+
+btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,const btVector3& axisInA, bool useReferenceFrameA)
+:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA), m_angularOnly(false), m_enableAngularMotor(false),
+m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER),
+m_useOffsetForConstraintFrame(HINGE_USE_FRAME_OFFSET),
+m_useReferenceFrameA(useReferenceFrameA),
+m_flags(0)
+#ifdef _BT_USE_CENTER_LIMIT_
+,m_limit()
+#endif
+{
+
+ // since no frame is given, assume this to be zero angle and just pick rb transform axis
+ // fixed axis in worldspace
+ btVector3 rbAxisA1, rbAxisA2;
+ btPlaneSpace1(axisInA, rbAxisA1, rbAxisA2);
+
+ m_rbAFrame.getOrigin() = pivotInA;
+ m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
+ rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
+ rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
+
+ btVector3 axisInB = rbA.getCenterOfMassTransform().getBasis() * axisInA;
+
+ btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
+ btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1);
+ btVector3 rbAxisB2 = axisInB.cross(rbAxisB1);
+
+
+ m_rbBFrame.getOrigin() = rbA.getCenterOfMassTransform()(pivotInA);
+ m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(),
+ rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(),
+ rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() );
+
+#ifndef _BT_USE_CENTER_LIMIT_
+ //start with free
+ m_lowerLimit = btScalar(1.0f);
+ m_upperLimit = btScalar(-1.0f);
+ m_biasFactor = 0.3f;
+ m_relaxationFactor = 1.0f;
+ m_limitSoftness = 0.9f;
+ m_solveLimit = false;
+#endif
+ m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f);
+}
+
+
+
+btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB,
+ const btTransform& rbAFrame, const btTransform& rbBFrame, bool useReferenceFrameA)
+:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame),
+m_angularOnly(false),
+m_enableAngularMotor(false),
+m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER),
+m_useOffsetForConstraintFrame(HINGE_USE_FRAME_OFFSET),
+m_useReferenceFrameA(useReferenceFrameA),
+m_flags(0)
+#ifdef _BT_USE_CENTER_LIMIT_
+,m_limit()
+#endif
+{
+#ifndef _BT_USE_CENTER_LIMIT_
+ //start with free
+ m_lowerLimit = btScalar(1.0f);
+ m_upperLimit = btScalar(-1.0f);
+ m_biasFactor = 0.3f;
+ m_relaxationFactor = 1.0f;
+ m_limitSoftness = 0.9f;
+ m_solveLimit = false;
+#endif
+ m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f);
+}
+
+
+
+btHingeConstraint::btHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame, bool useReferenceFrameA)
+:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA),m_rbAFrame(rbAFrame),m_rbBFrame(rbAFrame),
+m_angularOnly(false),
+m_enableAngularMotor(false),
+m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER),
+m_useOffsetForConstraintFrame(HINGE_USE_FRAME_OFFSET),
+m_useReferenceFrameA(useReferenceFrameA),
+m_flags(0)
+#ifdef _BT_USE_CENTER_LIMIT_
+,m_limit()
+#endif
+{
+ ///not providing rigidbody B means implicitly using worldspace for body B
+
+ m_rbBFrame.getOrigin() = m_rbA.getCenterOfMassTransform()(m_rbAFrame.getOrigin());
+#ifndef _BT_USE_CENTER_LIMIT_
+ //start with free
+ m_lowerLimit = btScalar(1.0f);
+ m_upperLimit = btScalar(-1.0f);
+ m_biasFactor = 0.3f;
+ m_relaxationFactor = 1.0f;
+ m_limitSoftness = 0.9f;
+ m_solveLimit = false;
+#endif
+ m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f);
+}
+
+
+
+void btHingeConstraint::buildJacobian()
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ m_appliedImpulse = btScalar(0.);
+ m_accMotorImpulse = btScalar(0.);
+
+ if (!m_angularOnly)
+ {
+ btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin();
+ btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin();
+ btVector3 relPos = pivotBInW - pivotAInW;
+
+ btVector3 normal[3];
+ if (relPos.length2() > SIMD_EPSILON)
+ {
+ normal[0] = relPos.normalized();
+ }
+ else
+ {
+ normal[0].setValue(btScalar(1.0),0,0);
+ }
+
+ btPlaneSpace1(normal[0], normal[1], normal[2]);
+
+ for (int i=0;i<3;i++)
+ {
+ new (&m_jac[i]) btJacobianEntry(
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ pivotAInW - m_rbA.getCenterOfMassPosition(),
+ pivotBInW - m_rbB.getCenterOfMassPosition(),
+ normal[i],
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbA.getInvMass(),
+ m_rbB.getInvInertiaDiagLocal(),
+ m_rbB.getInvMass());
+ }
+ }
+
+ //calculate two perpendicular jointAxis, orthogonal to hingeAxis
+ //these two jointAxis require equal angular velocities for both bodies
+
+ //this is unused for now, it's a todo
+ btVector3 jointAxis0local;
+ btVector3 jointAxis1local;
+
+ btPlaneSpace1(m_rbAFrame.getBasis().getColumn(2),jointAxis0local,jointAxis1local);
+
+ btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local;
+ btVector3 jointAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis1local;
+ btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2);
+
+ new (&m_jacAng[0]) btJacobianEntry(jointAxis0,
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbB.getInvInertiaDiagLocal());
+
+ new (&m_jacAng[1]) btJacobianEntry(jointAxis1,
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbB.getInvInertiaDiagLocal());
+
+ new (&m_jacAng[2]) btJacobianEntry(hingeAxisWorld,
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbB.getInvInertiaDiagLocal());
+
+ // clear accumulator
+ m_accLimitImpulse = btScalar(0.);
+
+ // test angular limit
+ testLimit(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+
+ //Compute K = J*W*J' for hinge axis
+ btVector3 axisA = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2);
+ m_kHinge = 1.0f / (getRigidBodyA().computeAngularImpulseDenominator(axisA) +
+ getRigidBodyB().computeAngularImpulseDenominator(axisA));
+
+ }
+}
+
+
+#endif //__SPU__
+
+
+void btHingeConstraint::getInfo1(btConstraintInfo1* info)
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ info->m_numConstraintRows = 0;
+ info->nub = 0;
+ }
+ else
+ {
+ info->m_numConstraintRows = 5; // Fixed 3 linear + 2 angular
+ info->nub = 1;
+ //always add the row, to avoid computation (data is not available yet)
+ //prepare constraint
+ testLimit(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+ if(getSolveLimit() || getEnableAngularMotor())
+ {
+ info->m_numConstraintRows++; // limit 3rd anguar as well
+ info->nub--;
+ }
+
+ }
+}
+
+void btHingeConstraint::getInfo1NonVirtual(btConstraintInfo1* info)
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ info->m_numConstraintRows = 0;
+ info->nub = 0;
+ }
+ else
+ {
+ //always add the 'limit' row, to avoid computation (data is not available yet)
+ info->m_numConstraintRows = 6; // Fixed 3 linear + 2 angular
+ info->nub = 0;
+ }
+}
+
+void btHingeConstraint::getInfo2 (btConstraintInfo2* info)
+{
+ if(m_useOffsetForConstraintFrame)
+ {
+ getInfo2InternalUsingFrameOffset(info, m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform(),m_rbA.getAngularVelocity(),m_rbB.getAngularVelocity());
+ }
+ else
+ {
+ getInfo2Internal(info, m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform(),m_rbA.getAngularVelocity(),m_rbB.getAngularVelocity());
+ }
+}
+
+
+void btHingeConstraint::getInfo2NonVirtual (btConstraintInfo2* info,const btTransform& transA,const btTransform& transB,const btVector3& angVelA,const btVector3& angVelB)
+{
+ ///the regular (virtual) implementation getInfo2 already performs 'testLimit' during getInfo1, so we need to do it now
+ testLimit(transA,transB);
+
+ getInfo2Internal(info,transA,transB,angVelA,angVelB);
+}
+
+
+void btHingeConstraint::getInfo2Internal(btConstraintInfo2* info, const btTransform& transA,const btTransform& transB,const btVector3& angVelA,const btVector3& angVelB)
+{
+
+ btAssert(!m_useSolveConstraintObsolete);
+ int i, skip = info->rowskip;
+ // transforms in world space
+ btTransform trA = transA*m_rbAFrame;
+ btTransform trB = transB*m_rbBFrame;
+ // pivot point
+ btVector3 pivotAInW = trA.getOrigin();
+ btVector3 pivotBInW = trB.getOrigin();
+#if 0
+ if (0)
+ {
+ for (i=0;i<6;i++)
+ {
+ info->m_J1linearAxis[i*skip]=0;
+ info->m_J1linearAxis[i*skip+1]=0;
+ info->m_J1linearAxis[i*skip+2]=0;
+
+ info->m_J1angularAxis[i*skip]=0;
+ info->m_J1angularAxis[i*skip+1]=0;
+ info->m_J1angularAxis[i*skip+2]=0;
+
+ info->m_J2angularAxis[i*skip]=0;
+ info->m_J2angularAxis[i*skip+1]=0;
+ info->m_J2angularAxis[i*skip+2]=0;
+
+ info->m_constraintError[i*skip]=0.f;
+ }
+ }
+#endif //#if 0
+ // linear (all fixed)
+
+ if (!m_angularOnly)
+ {
+ info->m_J1linearAxis[0] = 1;
+ info->m_J1linearAxis[skip + 1] = 1;
+ info->m_J1linearAxis[2 * skip + 2] = 1;
+ }
+
+
+
+
+ btVector3 a1 = pivotAInW - transA.getOrigin();
+ {
+ btVector3* angular0 = (btVector3*)(info->m_J1angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J1angularAxis + skip);
+ btVector3* angular2 = (btVector3*)(info->m_J1angularAxis + 2 * skip);
+ btVector3 a1neg = -a1;
+ a1neg.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+ btVector3 a2 = pivotBInW - transB.getOrigin();
+ {
+ btVector3* angular0 = (btVector3*)(info->m_J2angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J2angularAxis + skip);
+ btVector3* angular2 = (btVector3*)(info->m_J2angularAxis + 2 * skip);
+ a2.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+ // linear RHS
+ btScalar k = info->fps * info->erp;
+ if (!m_angularOnly)
+ {
+ for(i = 0; i < 3; i++)
+ {
+ info->m_constraintError[i * skip] = k * (pivotBInW[i] - pivotAInW[i]);
+ }
+ }
+ // make rotations around X and Y equal
+ // the hinge axis should be the only unconstrained
+ // rotational axis, the angular velocity of the two bodies perpendicular to
+ // the hinge axis should be equal. thus the constraint equations are
+ // p*w1 - p*w2 = 0
+ // q*w1 - q*w2 = 0
+ // where p and q are unit vectors normal to the hinge axis, and w1 and w2
+ // are the angular velocity vectors of the two bodies.
+ // get hinge axis (Z)
+ btVector3 ax1 = trA.getBasis().getColumn(2);
+ // get 2 orthos to hinge axis (X, Y)
+ btVector3 p = trA.getBasis().getColumn(0);
+ btVector3 q = trA.getBasis().getColumn(1);
+ // set the two hinge angular rows
+ int s3 = 3 * info->rowskip;
+ int s4 = 4 * info->rowskip;
+
+ info->m_J1angularAxis[s3 + 0] = p[0];
+ info->m_J1angularAxis[s3 + 1] = p[1];
+ info->m_J1angularAxis[s3 + 2] = p[2];
+ info->m_J1angularAxis[s4 + 0] = q[0];
+ info->m_J1angularAxis[s4 + 1] = q[1];
+ info->m_J1angularAxis[s4 + 2] = q[2];
+
+ info->m_J2angularAxis[s3 + 0] = -p[0];
+ info->m_J2angularAxis[s3 + 1] = -p[1];
+ info->m_J2angularAxis[s3 + 2] = -p[2];
+ info->m_J2angularAxis[s4 + 0] = -q[0];
+ info->m_J2angularAxis[s4 + 1] = -q[1];
+ info->m_J2angularAxis[s4 + 2] = -q[2];
+ // compute the right hand side of the constraint equation. set relative
+ // body velocities along p and q to bring the hinge back into alignment.
+ // if ax1,ax2 are the unit length hinge axes as computed from body1 and
+ // body2, we need to rotate both bodies along the axis u = (ax1 x ax2).
+ // if `theta' is the angle between ax1 and ax2, we need an angular velocity
+ // along u to cover angle erp*theta in one step :
+ // |angular_velocity| = angle/time = erp*theta / stepsize
+ // = (erp*fps) * theta
+ // angular_velocity = |angular_velocity| * (ax1 x ax2) / |ax1 x ax2|
+ // = (erp*fps) * theta * (ax1 x ax2) / sin(theta)
+ // ...as ax1 and ax2 are unit length. if theta is smallish,
+ // theta ~= sin(theta), so
+ // angular_velocity = (erp*fps) * (ax1 x ax2)
+ // ax1 x ax2 is in the plane space of ax1, so we project the angular
+ // velocity to p and q to find the right hand side.
+ btVector3 ax2 = trB.getBasis().getColumn(2);
+ btVector3 u = ax1.cross(ax2);
+ info->m_constraintError[s3] = k * u.dot(p);
+ info->m_constraintError[s4] = k * u.dot(q);
+ // check angular limits
+ int nrow = 4; // last filled row
+ int srow;
+ btScalar limit_err = btScalar(0.0);
+ int limit = 0;
+ if(getSolveLimit())
+ {
+#ifdef _BT_USE_CENTER_LIMIT_
+ limit_err = m_limit.getCorrection() * m_referenceSign;
+#else
+ limit_err = m_correction * m_referenceSign;
+#endif
+ limit = (limit_err > btScalar(0.0)) ? 1 : 2;
+
+ }
+ // if the hinge has joint limits or motor, add in the extra row
+ int powered = 0;
+ if(getEnableAngularMotor())
+ {
+ powered = 1;
+ }
+ if(limit || powered)
+ {
+ nrow++;
+ srow = nrow * info->rowskip;
+ info->m_J1angularAxis[srow+0] = ax1[0];
+ info->m_J1angularAxis[srow+1] = ax1[1];
+ info->m_J1angularAxis[srow+2] = ax1[2];
+
+ info->m_J2angularAxis[srow+0] = -ax1[0];
+ info->m_J2angularAxis[srow+1] = -ax1[1];
+ info->m_J2angularAxis[srow+2] = -ax1[2];
+
+ btScalar lostop = getLowerLimit();
+ btScalar histop = getUpperLimit();
+ if(limit && (lostop == histop))
+ { // the joint motor is ineffective
+ powered = 0;
+ }
+ info->m_constraintError[srow] = btScalar(0.0f);
+ btScalar currERP = (m_flags & BT_HINGE_FLAGS_ERP_STOP) ? m_stopERP : info->erp;
+ if(powered)
+ {
+ if(m_flags & BT_HINGE_FLAGS_CFM_NORM)
+ {
+ info->cfm[srow] = m_normalCFM;
+ }
+ btScalar mot_fact = getMotorFactor(m_hingeAngle, lostop, histop, m_motorTargetVelocity, info->fps * currERP);
+ info->m_constraintError[srow] += mot_fact * m_motorTargetVelocity * m_referenceSign;
+ info->m_lowerLimit[srow] = - m_maxMotorImpulse;
+ info->m_upperLimit[srow] = m_maxMotorImpulse;
+ }
+ if(limit)
+ {
+ k = info->fps * currERP;
+ info->m_constraintError[srow] += k * limit_err;
+ if(m_flags & BT_HINGE_FLAGS_CFM_STOP)
+ {
+ info->cfm[srow] = m_stopCFM;
+ }
+ if(lostop == histop)
+ {
+ // limited low and high simultaneously
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else if(limit == 1)
+ { // low limit
+ info->m_lowerLimit[srow] = 0;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else
+ { // high limit
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = 0;
+ }
+ // bounce (we'll use slider parameter abs(1.0 - m_dampingLimAng) for that)
+#ifdef _BT_USE_CENTER_LIMIT_
+ btScalar bounce = m_limit.getRelaxationFactor();
+#else
+ btScalar bounce = m_relaxationFactor;
+#endif
+ if(bounce > btScalar(0.0))
+ {
+ btScalar vel = angVelA.dot(ax1);
+ vel -= angVelB.dot(ax1);
+ // only apply bounce if the velocity is incoming, and if the
+ // resulting c[] exceeds what we already have.
+ if(limit == 1)
+ { // low limit
+ if(vel < 0)
+ {
+ btScalar newc = -bounce * vel;
+ if(newc > info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ else
+ { // high limit - all those computations are reversed
+ if(vel > 0)
+ {
+ btScalar newc = -bounce * vel;
+ if(newc < info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ }
+#ifdef _BT_USE_CENTER_LIMIT_
+ info->m_constraintError[srow] *= m_limit.getBiasFactor();
+#else
+ info->m_constraintError[srow] *= m_biasFactor;
+#endif
+ } // if(limit)
+ } // if angular limit or powered
+}
+
+
+void btHingeConstraint::setFrames(const btTransform & frameA, const btTransform & frameB)
+{
+ m_rbAFrame = frameA;
+ m_rbBFrame = frameB;
+ buildJacobian();
+}
+
+
+void btHingeConstraint::updateRHS(btScalar timeStep)
+{
+ (void)timeStep;
+
+}
+
+
+btScalar btHingeConstraint::getHingeAngle()
+{
+ return getHingeAngle(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+}
+
+btScalar btHingeConstraint::getHingeAngle(const btTransform& transA,const btTransform& transB)
+{
+ const btVector3 refAxis0 = transA.getBasis() * m_rbAFrame.getBasis().getColumn(0);
+ const btVector3 refAxis1 = transA.getBasis() * m_rbAFrame.getBasis().getColumn(1);
+ const btVector3 swingAxis = transB.getBasis() * m_rbBFrame.getBasis().getColumn(1);
+// btScalar angle = btAtan2Fast(swingAxis.dot(refAxis0), swingAxis.dot(refAxis1));
+ btScalar angle = btAtan2(swingAxis.dot(refAxis0), swingAxis.dot(refAxis1));
+ return m_referenceSign * angle;
+}
+
+
+
+void btHingeConstraint::testLimit(const btTransform& transA,const btTransform& transB)
+{
+ // Compute limit information
+ m_hingeAngle = getHingeAngle(transA,transB);
+#ifdef _BT_USE_CENTER_LIMIT_
+ m_limit.test(m_hingeAngle);
+#else
+ m_correction = btScalar(0.);
+ m_limitSign = btScalar(0.);
+ m_solveLimit = false;
+ if (m_lowerLimit <= m_upperLimit)
+ {
+ m_hingeAngle = btAdjustAngleToLimits(m_hingeAngle, m_lowerLimit, m_upperLimit);
+ if (m_hingeAngle <= m_lowerLimit)
+ {
+ m_correction = (m_lowerLimit - m_hingeAngle);
+ m_limitSign = 1.0f;
+ m_solveLimit = true;
+ }
+ else if (m_hingeAngle >= m_upperLimit)
+ {
+ m_correction = m_upperLimit - m_hingeAngle;
+ m_limitSign = -1.0f;
+ m_solveLimit = true;
+ }
+ }
+#endif
+ return;
+}
+
+
+static btVector3 vHinge(0, 0, btScalar(1));
+
+void btHingeConstraint::setMotorTarget(const btQuaternion& qAinB, btScalar dt)
+{
+ // convert target from body to constraint space
+ btQuaternion qConstraint = m_rbBFrame.getRotation().inverse() * qAinB * m_rbAFrame.getRotation();
+ qConstraint.normalize();
+
+ // extract "pure" hinge component
+ btVector3 vNoHinge = quatRotate(qConstraint, vHinge); vNoHinge.normalize();
+ btQuaternion qNoHinge = shortestArcQuat(vHinge, vNoHinge);
+ btQuaternion qHinge = qNoHinge.inverse() * qConstraint;
+ qHinge.normalize();
+
+ // compute angular target, clamped to limits
+ btScalar targetAngle = qHinge.getAngle();
+ if (targetAngle > SIMD_PI) // long way around. flip quat and recalculate.
+ {
+ qHinge = operator-(qHinge);
+ targetAngle = qHinge.getAngle();
+ }
+ if (qHinge.getZ() < 0)
+ targetAngle = -targetAngle;
+
+ setMotorTarget(targetAngle, dt);
+}
+
+void btHingeConstraint::setMotorTarget(btScalar targetAngle, btScalar dt)
+{
+#ifdef _BT_USE_CENTER_LIMIT_
+ m_limit.fit(targetAngle);
+#else
+ if (m_lowerLimit < m_upperLimit)
+ {
+ if (targetAngle < m_lowerLimit)
+ targetAngle = m_lowerLimit;
+ else if (targetAngle > m_upperLimit)
+ targetAngle = m_upperLimit;
+ }
+#endif
+ // compute angular velocity
+ btScalar curAngle = getHingeAngle(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+ btScalar dAngle = targetAngle - curAngle;
+ m_motorTargetVelocity = dAngle / dt;
+}
+
+
+
+void btHingeConstraint::getInfo2InternalUsingFrameOffset(btConstraintInfo2* info, const btTransform& transA,const btTransform& transB,const btVector3& angVelA,const btVector3& angVelB)
+{
+ btAssert(!m_useSolveConstraintObsolete);
+ int i, s = info->rowskip;
+ // transforms in world space
+ btTransform trA = transA*m_rbAFrame;
+ btTransform trB = transB*m_rbBFrame;
+ // pivot point
+ btVector3 pivotAInW = trA.getOrigin();
+ btVector3 pivotBInW = trB.getOrigin();
+#if 1
+ // difference between frames in WCS
+ btVector3 ofs = trB.getOrigin() - trA.getOrigin();
+ // now get weight factors depending on masses
+ btScalar miA = getRigidBodyA().getInvMass();
+ btScalar miB = getRigidBodyB().getInvMass();
+ bool hasStaticBody = (miA < SIMD_EPSILON) || (miB < SIMD_EPSILON);
+ btScalar miS = miA + miB;
+ btScalar factA, factB;
+ if(miS > btScalar(0.f))
+ {
+ factA = miB / miS;
+ }
+ else
+ {
+ factA = btScalar(0.5f);
+ }
+ factB = btScalar(1.0f) - factA;
+ // get the desired direction of hinge axis
+ // as weighted sum of Z-orthos of frameA and frameB in WCS
+ btVector3 ax1A = trA.getBasis().getColumn(2);
+ btVector3 ax1B = trB.getBasis().getColumn(2);
+ btVector3 ax1 = ax1A * factA + ax1B * factB;
+ ax1.normalize();
+ // fill first 3 rows
+ // we want: velA + wA x relA == velB + wB x relB
+ btTransform bodyA_trans = transA;
+ btTransform bodyB_trans = transB;
+ int s0 = 0;
+ int s1 = s;
+ int s2 = s * 2;
+ int nrow = 2; // last filled row
+ btVector3 tmpA, tmpB, relA, relB, p, q;
+ // get vector from bodyB to frameB in WCS
+ relB = trB.getOrigin() - bodyB_trans.getOrigin();
+ // get its projection to hinge axis
+ btVector3 projB = ax1 * relB.dot(ax1);
+ // get vector directed from bodyB to hinge axis (and orthogonal to it)
+ btVector3 orthoB = relB - projB;
+ // same for bodyA
+ relA = trA.getOrigin() - bodyA_trans.getOrigin();
+ btVector3 projA = ax1 * relA.dot(ax1);
+ btVector3 orthoA = relA - projA;
+ btVector3 totalDist = projA - projB;
+ // get offset vectors relA and relB
+ relA = orthoA + totalDist * factA;
+ relB = orthoB - totalDist * factB;
+ // now choose average ortho to hinge axis
+ p = orthoB * factA + orthoA * factB;
+ btScalar len2 = p.length2();
+ if(len2 > SIMD_EPSILON)
+ {
+ p /= btSqrt(len2);
+ }
+ else
+ {
+ p = trA.getBasis().getColumn(1);
+ }
+ // make one more ortho
+ q = ax1.cross(p);
+ // fill three rows
+ tmpA = relA.cross(p);
+ tmpB = relB.cross(p);
+ for (i=0; i<3; i++) info->m_J1angularAxis[s0+i] = tmpA[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[s0+i] = -tmpB[i];
+ tmpA = relA.cross(q);
+ tmpB = relB.cross(q);
+ if(hasStaticBody && getSolveLimit())
+ { // to make constraint between static and dynamic objects more rigid
+ // remove wA (or wB) from equation if angular limit is hit
+ tmpB *= factB;
+ tmpA *= factA;
+ }
+ for (i=0; i<3; i++) info->m_J1angularAxis[s1+i] = tmpA[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[s1+i] = -tmpB[i];
+ tmpA = relA.cross(ax1);
+ tmpB = relB.cross(ax1);
+ if(hasStaticBody)
+ { // to make constraint between static and dynamic objects more rigid
+ // remove wA (or wB) from equation
+ tmpB *= factB;
+ tmpA *= factA;
+ }
+ for (i=0; i<3; i++) info->m_J1angularAxis[s2+i] = tmpA[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[s2+i] = -tmpB[i];
+
+ btScalar k = info->fps * info->erp;
+
+ if (!m_angularOnly)
+ {
+ for (i=0; i<3; i++) info->m_J1linearAxis[s0+i] = p[i];
+ for (i=0; i<3; i++) info->m_J1linearAxis[s1+i] = q[i];
+ for (i=0; i<3; i++) info->m_J1linearAxis[s2+i] = ax1[i];
+
+ // compute three elements of right hand side
+
+ btScalar rhs = k * p.dot(ofs);
+ info->m_constraintError[s0] = rhs;
+ rhs = k * q.dot(ofs);
+ info->m_constraintError[s1] = rhs;
+ rhs = k * ax1.dot(ofs);
+ info->m_constraintError[s2] = rhs;
+ }
+ // the hinge axis should be the only unconstrained
+ // rotational axis, the angular velocity of the two bodies perpendicular to
+ // the hinge axis should be equal. thus the constraint equations are
+ // p*w1 - p*w2 = 0
+ // q*w1 - q*w2 = 0
+ // where p and q are unit vectors normal to the hinge axis, and w1 and w2
+ // are the angular velocity vectors of the two bodies.
+ int s3 = 3 * s;
+ int s4 = 4 * s;
+ info->m_J1angularAxis[s3 + 0] = p[0];
+ info->m_J1angularAxis[s3 + 1] = p[1];
+ info->m_J1angularAxis[s3 + 2] = p[2];
+ info->m_J1angularAxis[s4 + 0] = q[0];
+ info->m_J1angularAxis[s4 + 1] = q[1];
+ info->m_J1angularAxis[s4 + 2] = q[2];
+
+ info->m_J2angularAxis[s3 + 0] = -p[0];
+ info->m_J2angularAxis[s3 + 1] = -p[1];
+ info->m_J2angularAxis[s3 + 2] = -p[2];
+ info->m_J2angularAxis[s4 + 0] = -q[0];
+ info->m_J2angularAxis[s4 + 1] = -q[1];
+ info->m_J2angularAxis[s4 + 2] = -q[2];
+ // compute the right hand side of the constraint equation. set relative
+ // body velocities along p and q to bring the hinge back into alignment.
+ // if ax1A,ax1B are the unit length hinge axes as computed from bodyA and
+ // bodyB, we need to rotate both bodies along the axis u = (ax1 x ax2).
+ // if "theta" is the angle between ax1 and ax2, we need an angular velocity
+ // along u to cover angle erp*theta in one step :
+ // |angular_velocity| = angle/time = erp*theta / stepsize
+ // = (erp*fps) * theta
+ // angular_velocity = |angular_velocity| * (ax1 x ax2) / |ax1 x ax2|
+ // = (erp*fps) * theta * (ax1 x ax2) / sin(theta)
+ // ...as ax1 and ax2 are unit length. if theta is smallish,
+ // theta ~= sin(theta), so
+ // angular_velocity = (erp*fps) * (ax1 x ax2)
+ // ax1 x ax2 is in the plane space of ax1, so we project the angular
+ // velocity to p and q to find the right hand side.
+ k = info->fps * info->erp;
+ btVector3 u = ax1A.cross(ax1B);
+ info->m_constraintError[s3] = k * u.dot(p);
+ info->m_constraintError[s4] = k * u.dot(q);
+#endif
+ // check angular limits
+ nrow = 4; // last filled row
+ int srow;
+ btScalar limit_err = btScalar(0.0);
+ int limit = 0;
+ if(getSolveLimit())
+ {
+#ifdef _BT_USE_CENTER_LIMIT_
+ limit_err = m_limit.getCorrection() * m_referenceSign;
+#else
+ limit_err = m_correction * m_referenceSign;
+#endif
+ limit = (limit_err > btScalar(0.0)) ? 1 : 2;
+
+ }
+ // if the hinge has joint limits or motor, add in the extra row
+ int powered = 0;
+ if(getEnableAngularMotor())
+ {
+ powered = 1;
+ }
+ if(limit || powered)
+ {
+ nrow++;
+ srow = nrow * info->rowskip;
+ info->m_J1angularAxis[srow+0] = ax1[0];
+ info->m_J1angularAxis[srow+1] = ax1[1];
+ info->m_J1angularAxis[srow+2] = ax1[2];
+
+ info->m_J2angularAxis[srow+0] = -ax1[0];
+ info->m_J2angularAxis[srow+1] = -ax1[1];
+ info->m_J2angularAxis[srow+2] = -ax1[2];
+
+ btScalar lostop = getLowerLimit();
+ btScalar histop = getUpperLimit();
+ if(limit && (lostop == histop))
+ { // the joint motor is ineffective
+ powered = 0;
+ }
+ info->m_constraintError[srow] = btScalar(0.0f);
+ btScalar currERP = (m_flags & BT_HINGE_FLAGS_ERP_STOP) ? m_stopERP : info->erp;
+ if(powered)
+ {
+ if(m_flags & BT_HINGE_FLAGS_CFM_NORM)
+ {
+ info->cfm[srow] = m_normalCFM;
+ }
+ btScalar mot_fact = getMotorFactor(m_hingeAngle, lostop, histop, m_motorTargetVelocity, info->fps * currERP);
+ info->m_constraintError[srow] += mot_fact * m_motorTargetVelocity * m_referenceSign;
+ info->m_lowerLimit[srow] = - m_maxMotorImpulse;
+ info->m_upperLimit[srow] = m_maxMotorImpulse;
+ }
+ if(limit)
+ {
+ k = info->fps * currERP;
+ info->m_constraintError[srow] += k * limit_err;
+ if(m_flags & BT_HINGE_FLAGS_CFM_STOP)
+ {
+ info->cfm[srow] = m_stopCFM;
+ }
+ if(lostop == histop)
+ {
+ // limited low and high simultaneously
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else if(limit == 1)
+ { // low limit
+ info->m_lowerLimit[srow] = 0;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else
+ { // high limit
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = 0;
+ }
+ // bounce (we'll use slider parameter abs(1.0 - m_dampingLimAng) for that)
+#ifdef _BT_USE_CENTER_LIMIT_
+ btScalar bounce = m_limit.getRelaxationFactor();
+#else
+ btScalar bounce = m_relaxationFactor;
+#endif
+ if(bounce > btScalar(0.0))
+ {
+ btScalar vel = angVelA.dot(ax1);
+ vel -= angVelB.dot(ax1);
+ // only apply bounce if the velocity is incoming, and if the
+ // resulting c[] exceeds what we already have.
+ if(limit == 1)
+ { // low limit
+ if(vel < 0)
+ {
+ btScalar newc = -bounce * vel;
+ if(newc > info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ else
+ { // high limit - all those computations are reversed
+ if(vel > 0)
+ {
+ btScalar newc = -bounce * vel;
+ if(newc < info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ }
+#ifdef _BT_USE_CENTER_LIMIT_
+ info->m_constraintError[srow] *= m_limit.getBiasFactor();
+#else
+ info->m_constraintError[srow] *= m_biasFactor;
+#endif
+ } // if(limit)
+ } // if angular limit or powered
+}
+
+
+///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+///If no axis is provided, it uses the default axis for this constraint.
+void btHingeConstraint::setParam(int num, btScalar value, int axis)
+{
+ if((axis == -1) || (axis == 5))
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ m_stopERP = value;
+ m_flags |= BT_HINGE_FLAGS_ERP_STOP;
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ m_stopCFM = value;
+ m_flags |= BT_HINGE_FLAGS_CFM_STOP;
+ break;
+ case BT_CONSTRAINT_CFM :
+ m_normalCFM = value;
+ m_flags |= BT_HINGE_FLAGS_CFM_NORM;
+ break;
+ default :
+ btAssertConstrParams(0);
+ }
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+}
+
+///return the local value of parameter
+btScalar btHingeConstraint::getParam(int num, int axis) const
+{
+ btScalar retVal = 0;
+ if((axis == -1) || (axis == 5))
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ btAssertConstrParams(m_flags & BT_HINGE_FLAGS_ERP_STOP);
+ retVal = m_stopERP;
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ btAssertConstrParams(m_flags & BT_HINGE_FLAGS_CFM_STOP);
+ retVal = m_stopCFM;
+ break;
+ case BT_CONSTRAINT_CFM :
+ btAssertConstrParams(m_flags & BT_HINGE_FLAGS_CFM_NORM);
+ retVal = m_normalCFM;
+ break;
+ default :
+ btAssertConstrParams(0);
+ }
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ return retVal;
+}
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
new file mode 100644
index 00000000..cb2973e1
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
@@ -0,0 +1,381 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/* Hinge Constraint by Dirk Gregorius. Limits added by Marcus Hennix at Starbreeze Studios */
+
+#ifndef BT_HINGECONSTRAINT_H
+#define BT_HINGECONSTRAINT_H
+
+#define _BT_USE_CENTER_LIMIT_ 1
+
+
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btTypedConstraint.h"
+
+class btRigidBody;
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btHingeConstraintData btHingeConstraintDoubleData
+#define btHingeConstraintDataName "btHingeConstraintDoubleData"
+#else
+#define btHingeConstraintData btHingeConstraintFloatData
+#define btHingeConstraintDataName "btHingeConstraintFloatData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+
+
+enum btHingeFlags
+{
+ BT_HINGE_FLAGS_CFM_STOP = 1,
+ BT_HINGE_FLAGS_ERP_STOP = 2,
+ BT_HINGE_FLAGS_CFM_NORM = 4
+};
+
+
+/// hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space
+/// axis defines the orientation of the hinge axis
+ATTRIBUTE_ALIGNED16(class) btHingeConstraint : public btTypedConstraint
+{
+#ifdef IN_PARALLELL_SOLVER
+public:
+#endif
+ btJacobianEntry m_jac[3]; //3 orthogonal linear constraints
+ btJacobianEntry m_jacAng[3]; //2 orthogonal angular constraints+ 1 for limit/motor
+
+ btTransform m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransform m_rbBFrame;
+
+ btScalar m_motorTargetVelocity;
+ btScalar m_maxMotorImpulse;
+
+
+#ifdef _BT_USE_CENTER_LIMIT_
+ btAngularLimit m_limit;
+#else
+ btScalar m_lowerLimit;
+ btScalar m_upperLimit;
+ btScalar m_limitSign;
+ btScalar m_correction;
+
+ btScalar m_limitSoftness;
+ btScalar m_biasFactor;
+ btScalar m_relaxationFactor;
+
+ bool m_solveLimit;
+#endif
+
+ btScalar m_kHinge;
+
+
+ btScalar m_accLimitImpulse;
+ btScalar m_hingeAngle;
+ btScalar m_referenceSign;
+
+ bool m_angularOnly;
+ bool m_enableAngularMotor;
+ bool m_useSolveConstraintObsolete;
+ bool m_useOffsetForConstraintFrame;
+ bool m_useReferenceFrameA;
+
+ btScalar m_accMotorImpulse;
+
+ int m_flags;
+ btScalar m_normalCFM;
+ btScalar m_stopCFM;
+ btScalar m_stopERP;
+
+
+public:
+
+ btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB, const btVector3& axisInA,const btVector3& axisInB, bool useReferenceFrameA = false);
+
+ btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,const btVector3& axisInA, bool useReferenceFrameA = false);
+
+ btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btTransform& rbAFrame, const btTransform& rbBFrame, bool useReferenceFrameA = false);
+
+ btHingeConstraint(btRigidBody& rbA,const btTransform& rbAFrame, bool useReferenceFrameA = false);
+
+
+ virtual void buildJacobian();
+
+ virtual void getInfo1 (btConstraintInfo1* info);
+
+ void getInfo1NonVirtual(btConstraintInfo1* info);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ void getInfo2NonVirtual(btConstraintInfo2* info,const btTransform& transA,const btTransform& transB,const btVector3& angVelA,const btVector3& angVelB);
+
+ void getInfo2Internal(btConstraintInfo2* info,const btTransform& transA,const btTransform& transB,const btVector3& angVelA,const btVector3& angVelB);
+ void getInfo2InternalUsingFrameOffset(btConstraintInfo2* info,const btTransform& transA,const btTransform& transB,const btVector3& angVelA,const btVector3& angVelB);
+
+
+ void updateRHS(btScalar timeStep);
+
+ const btRigidBody& getRigidBodyA() const
+ {
+ return m_rbA;
+ }
+ const btRigidBody& getRigidBodyB() const
+ {
+ return m_rbB;
+ }
+
+ btRigidBody& getRigidBodyA()
+ {
+ return m_rbA;
+ }
+
+ btRigidBody& getRigidBodyB()
+ {
+ return m_rbB;
+ }
+
+ btTransform& getFrameOffsetA()
+ {
+ return m_rbAFrame;
+ }
+
+ btTransform& getFrameOffsetB()
+ {
+ return m_rbBFrame;
+ }
+
+ void setFrames(const btTransform& frameA, const btTransform& frameB);
+
+ void setAngularOnly(bool angularOnly)
+ {
+ m_angularOnly = angularOnly;
+ }
+
+ void enableAngularMotor(bool enableMotor,btScalar targetVelocity,btScalar maxMotorImpulse)
+ {
+ m_enableAngularMotor = enableMotor;
+ m_motorTargetVelocity = targetVelocity;
+ m_maxMotorImpulse = maxMotorImpulse;
+ }
+
+ // extra motor API, including ability to set a target rotation (as opposed to angular velocity)
+ // note: setMotorTarget sets angular velocity under the hood, so you must call it every tick to
+ // maintain a given angular target.
+ void enableMotor(bool enableMotor) { m_enableAngularMotor = enableMotor; }
+ void setMaxMotorImpulse(btScalar maxMotorImpulse) { m_maxMotorImpulse = maxMotorImpulse; }
+ void setMotorTarget(const btQuaternion& qAinB, btScalar dt); // qAinB is rotation of body A wrt body B.
+ void setMotorTarget(btScalar targetAngle, btScalar dt);
+
+
+ void setLimit(btScalar low,btScalar high,btScalar _softness = 0.9f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f)
+ {
+#ifdef _BT_USE_CENTER_LIMIT_
+ m_limit.set(low, high, _softness, _biasFactor, _relaxationFactor);
+#else
+ m_lowerLimit = btNormalizeAngle(low);
+ m_upperLimit = btNormalizeAngle(high);
+ m_limitSoftness = _softness;
+ m_biasFactor = _biasFactor;
+ m_relaxationFactor = _relaxationFactor;
+#endif
+ }
+
+ void setAxis(btVector3& axisInA)
+ {
+ btVector3 rbAxisA1, rbAxisA2;
+ btPlaneSpace1(axisInA, rbAxisA1, rbAxisA2);
+ btVector3 pivotInA = m_rbAFrame.getOrigin();
+// m_rbAFrame.getOrigin() = pivotInA;
+ m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
+ rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
+ rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
+
+ btVector3 axisInB = m_rbA.getCenterOfMassTransform().getBasis() * axisInA;
+
+ btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
+ btVector3 rbAxisB1 = quatRotate(rotationArc,rbAxisA1);
+ btVector3 rbAxisB2 = axisInB.cross(rbAxisB1);
+
+ m_rbBFrame.getOrigin() = m_rbB.getCenterOfMassTransform().inverse()(m_rbA.getCenterOfMassTransform()(pivotInA));
+
+ m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(),
+ rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(),
+ rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() );
+ m_rbBFrame.getBasis() = m_rbB.getCenterOfMassTransform().getBasis().inverse() * m_rbBFrame.getBasis();
+
+ }
+
+ btScalar getLowerLimit() const
+ {
+#ifdef _BT_USE_CENTER_LIMIT_
+ return m_limit.getLow();
+#else
+ return m_lowerLimit;
+#endif
+ }
+
+ btScalar getUpperLimit() const
+ {
+#ifdef _BT_USE_CENTER_LIMIT_
+ return m_limit.getHigh();
+#else
+ return m_upperLimit;
+#endif
+ }
+
+
+ btScalar getHingeAngle();
+
+ btScalar getHingeAngle(const btTransform& transA,const btTransform& transB);
+
+ void testLimit(const btTransform& transA,const btTransform& transB);
+
+
+ const btTransform& getAFrame() const { return m_rbAFrame; };
+ const btTransform& getBFrame() const { return m_rbBFrame; };
+
+ btTransform& getAFrame() { return m_rbAFrame; };
+ btTransform& getBFrame() { return m_rbBFrame; };
+
+ inline int getSolveLimit()
+ {
+#ifdef _BT_USE_CENTER_LIMIT_
+ return m_limit.isLimit();
+#else
+ return m_solveLimit;
+#endif
+ }
+
+ inline btScalar getLimitSign()
+ {
+#ifdef _BT_USE_CENTER_LIMIT_
+ return m_limit.getSign();
+#else
+ return m_limitSign;
+#endif
+ }
+
+ inline bool getAngularOnly()
+ {
+ return m_angularOnly;
+ }
+ inline bool getEnableAngularMotor()
+ {
+ return m_enableAngularMotor;
+ }
+ inline btScalar getMotorTargetVelosity()
+ {
+ return m_motorTargetVelocity;
+ }
+ inline btScalar getMaxMotorImpulse()
+ {
+ return m_maxMotorImpulse;
+ }
+ // access for UseFrameOffset
+ bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
+ void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; }
+
+
+ ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+ ///If no axis is provided, it uses the default axis for this constraint.
+ virtual void setParam(int num, btScalar value, int axis = -1);
+ ///return the local value of parameter
+ virtual btScalar getParam(int num, int axis = -1) const;
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btHingeConstraintDoubleData
+{
+ btTypedConstraintData m_typeConstraintData;
+ btTransformDoubleData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransformDoubleData m_rbBFrame;
+ int m_useReferenceFrameA;
+ int m_angularOnly;
+ int m_enableAngularMotor;
+ float m_motorTargetVelocity;
+ float m_maxMotorImpulse;
+
+ float m_lowerLimit;
+ float m_upperLimit;
+ float m_limitSoftness;
+ float m_biasFactor;
+ float m_relaxationFactor;
+
+};
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btHingeConstraintFloatData
+{
+ btTypedConstraintData m_typeConstraintData;
+ btTransformFloatData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransformFloatData m_rbBFrame;
+ int m_useReferenceFrameA;
+ int m_angularOnly;
+
+ int m_enableAngularMotor;
+ float m_motorTargetVelocity;
+ float m_maxMotorImpulse;
+
+ float m_lowerLimit;
+ float m_upperLimit;
+ float m_limitSoftness;
+ float m_biasFactor;
+ float m_relaxationFactor;
+
+};
+
+
+
+SIMD_FORCE_INLINE int btHingeConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btHingeConstraintData);
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btHingeConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btHingeConstraintData* hingeData = (btHingeConstraintData*)dataBuffer;
+ btTypedConstraint::serialize(&hingeData->m_typeConstraintData,serializer);
+
+ m_rbAFrame.serialize(hingeData->m_rbAFrame);
+ m_rbBFrame.serialize(hingeData->m_rbBFrame);
+
+ hingeData->m_angularOnly = m_angularOnly;
+ hingeData->m_enableAngularMotor = m_enableAngularMotor;
+ hingeData->m_maxMotorImpulse = float(m_maxMotorImpulse);
+ hingeData->m_motorTargetVelocity = float(m_motorTargetVelocity);
+ hingeData->m_useReferenceFrameA = m_useReferenceFrameA;
+#ifdef _BT_USE_CENTER_LIMIT_
+ hingeData->m_lowerLimit = float(m_limit.getLow());
+ hingeData->m_upperLimit = float(m_limit.getHigh());
+ hingeData->m_limitSoftness = float(m_limit.getSoftness());
+ hingeData->m_biasFactor = float(m_limit.getBiasFactor());
+ hingeData->m_relaxationFactor = float(m_limit.getRelaxationFactor());
+#else
+ hingeData->m_lowerLimit = float(m_lowerLimit);
+ hingeData->m_upperLimit = float(m_upperLimit);
+ hingeData->m_limitSoftness = float(m_limitSoftness);
+ hingeData->m_biasFactor = float(m_biasFactor);
+ hingeData->m_relaxationFactor = float(m_relaxationFactor);
+#endif
+
+ return btHingeConstraintDataName;
+}
+
+#endif //BT_HINGECONSTRAINT_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h
new file mode 100644
index 00000000..f1994a2d
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btJacobianEntry.h
@@ -0,0 +1,156 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_JACOBIAN_ENTRY_H
+#define BT_JACOBIAN_ENTRY_H
+
+#include "LinearMath/btVector3.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+
+//notes:
+// Another memory optimization would be to store m_1MinvJt in the remaining 3 w components
+// which makes the btJacobianEntry memory layout 16 bytes
+// if you only are interested in angular part, just feed massInvA and massInvB zero
+
+/// Jacobian entry is an abstraction that allows to describe constraints
+/// it can be used in combination with a constraint solver
+/// Can be used to relate the effect of an impulse to the constraint error
+ATTRIBUTE_ALIGNED16(class) btJacobianEntry
+{
+public:
+ btJacobianEntry() {};
+ //constraint between two different rigidbodies
+ btJacobianEntry(
+ const btMatrix3x3& world2A,
+ const btMatrix3x3& world2B,
+ const btVector3& rel_pos1,const btVector3& rel_pos2,
+ const btVector3& jointAxis,
+ const btVector3& inertiaInvA,
+ const btScalar massInvA,
+ const btVector3& inertiaInvB,
+ const btScalar massInvB)
+ :m_linearJointAxis(jointAxis)
+ {
+ m_aJ = world2A*(rel_pos1.cross(m_linearJointAxis));
+ m_bJ = world2B*(rel_pos2.cross(-m_linearJointAxis));
+ m_0MinvJt = inertiaInvA * m_aJ;
+ m_1MinvJt = inertiaInvB * m_bJ;
+ m_Adiag = massInvA + m_0MinvJt.dot(m_aJ) + massInvB + m_1MinvJt.dot(m_bJ);
+
+ btAssert(m_Adiag > btScalar(0.0));
+ }
+
+ //angular constraint between two different rigidbodies
+ btJacobianEntry(const btVector3& jointAxis,
+ const btMatrix3x3& world2A,
+ const btMatrix3x3& world2B,
+ const btVector3& inertiaInvA,
+ const btVector3& inertiaInvB)
+ :m_linearJointAxis(btVector3(btScalar(0.),btScalar(0.),btScalar(0.)))
+ {
+ m_aJ= world2A*jointAxis;
+ m_bJ = world2B*-jointAxis;
+ m_0MinvJt = inertiaInvA * m_aJ;
+ m_1MinvJt = inertiaInvB * m_bJ;
+ m_Adiag = m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ);
+
+ btAssert(m_Adiag > btScalar(0.0));
+ }
+
+ //angular constraint between two different rigidbodies
+ btJacobianEntry(const btVector3& axisInA,
+ const btVector3& axisInB,
+ const btVector3& inertiaInvA,
+ const btVector3& inertiaInvB)
+ : m_linearJointAxis(btVector3(btScalar(0.),btScalar(0.),btScalar(0.)))
+ , m_aJ(axisInA)
+ , m_bJ(-axisInB)
+ {
+ m_0MinvJt = inertiaInvA * m_aJ;
+ m_1MinvJt = inertiaInvB * m_bJ;
+ m_Adiag = m_0MinvJt.dot(m_aJ) + m_1MinvJt.dot(m_bJ);
+
+ btAssert(m_Adiag > btScalar(0.0));
+ }
+
+ //constraint on one rigidbody
+ btJacobianEntry(
+ const btMatrix3x3& world2A,
+ const btVector3& rel_pos1,const btVector3& rel_pos2,
+ const btVector3& jointAxis,
+ const btVector3& inertiaInvA,
+ const btScalar massInvA)
+ :m_linearJointAxis(jointAxis)
+ {
+ m_aJ= world2A*(rel_pos1.cross(jointAxis));
+ m_bJ = world2A*(rel_pos2.cross(-jointAxis));
+ m_0MinvJt = inertiaInvA * m_aJ;
+ m_1MinvJt = btVector3(btScalar(0.),btScalar(0.),btScalar(0.));
+ m_Adiag = massInvA + m_0MinvJt.dot(m_aJ);
+
+ btAssert(m_Adiag > btScalar(0.0));
+ }
+
+ btScalar getDiagonal() const { return m_Adiag; }
+
+ // for two constraints on the same rigidbody (for example vehicle friction)
+ btScalar getNonDiagonal(const btJacobianEntry& jacB, const btScalar massInvA) const
+ {
+ const btJacobianEntry& jacA = *this;
+ btScalar lin = massInvA * jacA.m_linearJointAxis.dot(jacB.m_linearJointAxis);
+ btScalar ang = jacA.m_0MinvJt.dot(jacB.m_aJ);
+ return lin + ang;
+ }
+
+
+
+ // for two constraints on sharing two same rigidbodies (for example two contact points between two rigidbodies)
+ btScalar getNonDiagonal(const btJacobianEntry& jacB,const btScalar massInvA,const btScalar massInvB) const
+ {
+ const btJacobianEntry& jacA = *this;
+ btVector3 lin = jacA.m_linearJointAxis * jacB.m_linearJointAxis;
+ btVector3 ang0 = jacA.m_0MinvJt * jacB.m_aJ;
+ btVector3 ang1 = jacA.m_1MinvJt * jacB.m_bJ;
+ btVector3 lin0 = massInvA * lin ;
+ btVector3 lin1 = massInvB * lin;
+ btVector3 sum = ang0+ang1+lin0+lin1;
+ return sum[0]+sum[1]+sum[2];
+ }
+
+ btScalar getRelativeVelocity(const btVector3& linvelA,const btVector3& angvelA,const btVector3& linvelB,const btVector3& angvelB)
+ {
+ btVector3 linrel = linvelA - linvelB;
+ btVector3 angvela = angvelA * m_aJ;
+ btVector3 angvelb = angvelB * m_bJ;
+ linrel *= m_linearJointAxis;
+ angvela += angvelb;
+ angvela += linrel;
+ btScalar rel_vel2 = angvela[0]+angvela[1]+angvela[2];
+ return rel_vel2 + SIMD_EPSILON;
+ }
+//private:
+
+ btVector3 m_linearJointAxis;
+ btVector3 m_aJ;
+ btVector3 m_bJ;
+ btVector3 m_0MinvJt;
+ btVector3 m_1MinvJt;
+ //Optimization: can be stored in the w/last component of one of the vectors
+ btScalar m_Adiag;
+
+};
+
+#endif //BT_JACOBIAN_ENTRY_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp
new file mode 100644
index 00000000..7e0d93b9
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp
@@ -0,0 +1,230 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btPoint2PointConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include <new>
+
+
+
+
+
+btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB)
+:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB),
+m_flags(0),
+m_useSolveConstraintObsolete(false)
+{
+
+}
+
+
+btPoint2PointConstraint::btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA)
+:btTypedConstraint(POINT2POINT_CONSTRAINT_TYPE,rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)),
+m_flags(0),
+m_useSolveConstraintObsolete(false)
+{
+
+}
+
+void btPoint2PointConstraint::buildJacobian()
+{
+
+ ///we need it for both methods
+ {
+ m_appliedImpulse = btScalar(0.);
+
+ btVector3 normal(0,0,0);
+
+ for (int i=0;i<3;i++)
+ {
+ normal[i] = 1;
+ new (&m_jac[i]) btJacobianEntry(
+ m_rbA.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbB.getCenterOfMassTransform().getBasis().transpose(),
+ m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(),
+ m_rbB.getCenterOfMassTransform()*m_pivotInB - m_rbB.getCenterOfMassPosition(),
+ normal,
+ m_rbA.getInvInertiaDiagLocal(),
+ m_rbA.getInvMass(),
+ m_rbB.getInvInertiaDiagLocal(),
+ m_rbB.getInvMass());
+ normal[i] = 0;
+ }
+ }
+
+
+}
+
+void btPoint2PointConstraint::getInfo1 (btConstraintInfo1* info)
+{
+ getInfo1NonVirtual(info);
+}
+
+void btPoint2PointConstraint::getInfo1NonVirtual (btConstraintInfo1* info)
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ info->m_numConstraintRows = 0;
+ info->nub = 0;
+ } else
+ {
+ info->m_numConstraintRows = 3;
+ info->nub = 3;
+ }
+}
+
+
+
+
+void btPoint2PointConstraint::getInfo2 (btConstraintInfo2* info)
+{
+ getInfo2NonVirtual(info, m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+}
+
+void btPoint2PointConstraint::getInfo2NonVirtual (btConstraintInfo2* info, const btTransform& body0_trans, const btTransform& body1_trans)
+{
+ btAssert(!m_useSolveConstraintObsolete);
+
+ //retrieve matrices
+
+ // anchor points in global coordinates with respect to body PORs.
+
+ // set jacobian
+ info->m_J1linearAxis[0] = 1;
+ info->m_J1linearAxis[info->rowskip+1] = 1;
+ info->m_J1linearAxis[2*info->rowskip+2] = 1;
+
+ btVector3 a1 = body0_trans.getBasis()*getPivotInA();
+ {
+ btVector3* angular0 = (btVector3*)(info->m_J1angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J1angularAxis+info->rowskip);
+ btVector3* angular2 = (btVector3*)(info->m_J1angularAxis+2*info->rowskip);
+ btVector3 a1neg = -a1;
+ a1neg.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+
+ /*info->m_J2linearAxis[0] = -1;
+ info->m_J2linearAxis[s+1] = -1;
+ info->m_J2linearAxis[2*s+2] = -1;
+ */
+
+ btVector3 a2 = body1_trans.getBasis()*getPivotInB();
+
+ {
+ btVector3 a2n = -a2;
+ btVector3* angular0 = (btVector3*)(info->m_J2angularAxis);
+ btVector3* angular1 = (btVector3*)(info->m_J2angularAxis+info->rowskip);
+ btVector3* angular2 = (btVector3*)(info->m_J2angularAxis+2*info->rowskip);
+ a2.getSkewSymmetricMatrix(angular0,angular1,angular2);
+ }
+
+
+
+ // set right hand side
+ btScalar currERP = (m_flags & BT_P2P_FLAGS_ERP) ? m_erp : info->erp;
+ btScalar k = info->fps * currERP;
+ int j;
+ for (j=0; j<3; j++)
+ {
+ info->m_constraintError[j*info->rowskip] = k * (a2[j] + body1_trans.getOrigin()[j] - a1[j] - body0_trans.getOrigin()[j]);
+ //printf("info->m_constraintError[%d]=%f\n",j,info->m_constraintError[j]);
+ }
+ if(m_flags & BT_P2P_FLAGS_CFM)
+ {
+ for (j=0; j<3; j++)
+ {
+ info->cfm[j*info->rowskip] = m_cfm;
+ }
+ }
+
+ btScalar impulseClamp = m_setting.m_impulseClamp;//
+ for (j=0; j<3; j++)
+ {
+ if (m_setting.m_impulseClamp > 0)
+ {
+ info->m_lowerLimit[j*info->rowskip] = -impulseClamp;
+ info->m_upperLimit[j*info->rowskip] = impulseClamp;
+ }
+ }
+ info->m_damping = m_setting.m_damping;
+
+}
+
+
+
+void btPoint2PointConstraint::updateRHS(btScalar timeStep)
+{
+ (void)timeStep;
+
+}
+
+///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+///If no axis is provided, it uses the default axis for this constraint.
+void btPoint2PointConstraint::setParam(int num, btScalar value, int axis)
+{
+ if(axis != -1)
+ {
+ btAssertConstrParams(0);
+ }
+ else
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_ERP :
+ case BT_CONSTRAINT_STOP_ERP :
+ m_erp = value;
+ m_flags |= BT_P2P_FLAGS_ERP;
+ break;
+ case BT_CONSTRAINT_CFM :
+ case BT_CONSTRAINT_STOP_CFM :
+ m_cfm = value;
+ m_flags |= BT_P2P_FLAGS_CFM;
+ break;
+ default:
+ btAssertConstrParams(0);
+ }
+ }
+}
+
+///return the local value of parameter
+btScalar btPoint2PointConstraint::getParam(int num, int axis) const
+{
+ btScalar retVal(SIMD_INFINITY);
+ if(axis != -1)
+ {
+ btAssertConstrParams(0);
+ }
+ else
+ {
+ switch(num)
+ {
+ case BT_CONSTRAINT_ERP :
+ case BT_CONSTRAINT_STOP_ERP :
+ btAssertConstrParams(m_flags & BT_P2P_FLAGS_ERP);
+ retVal = m_erp;
+ break;
+ case BT_CONSTRAINT_CFM :
+ case BT_CONSTRAINT_STOP_CFM :
+ btAssertConstrParams(m_flags & BT_P2P_FLAGS_CFM);
+ retVal = m_cfm;
+ break;
+ default:
+ btAssertConstrParams(0);
+ }
+ }
+ return retVal;
+}
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h
new file mode 100644
index 00000000..b3bda03e
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h
@@ -0,0 +1,161 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_POINT2POINTCONSTRAINT_H
+#define BT_POINT2POINTCONSTRAINT_H
+
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btTypedConstraint.h"
+
+class btRigidBody;
+
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btPoint2PointConstraintData btPoint2PointConstraintDoubleData
+#define btPoint2PointConstraintDataName "btPoint2PointConstraintDoubleData"
+#else
+#define btPoint2PointConstraintData btPoint2PointConstraintFloatData
+#define btPoint2PointConstraintDataName "btPoint2PointConstraintFloatData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+struct btConstraintSetting
+{
+ btConstraintSetting() :
+ m_tau(btScalar(0.3)),
+ m_damping(btScalar(1.)),
+ m_impulseClamp(btScalar(0.))
+ {
+ }
+ btScalar m_tau;
+ btScalar m_damping;
+ btScalar m_impulseClamp;
+};
+
+enum btPoint2PointFlags
+{
+ BT_P2P_FLAGS_ERP = 1,
+ BT_P2P_FLAGS_CFM = 2
+};
+
+/// point to point constraint between two rigidbodies each with a pivotpoint that descibes the 'ballsocket' location in local space
+ATTRIBUTE_ALIGNED16(class) btPoint2PointConstraint : public btTypedConstraint
+{
+#ifdef IN_PARALLELL_SOLVER
+public:
+#endif
+ btJacobianEntry m_jac[3]; //3 orthogonal linear constraints
+
+ btVector3 m_pivotInA;
+ btVector3 m_pivotInB;
+
+ int m_flags;
+ btScalar m_erp;
+ btScalar m_cfm;
+
+public:
+
+ ///for backwards compatibility during the transition to 'getInfo/getInfo2'
+ bool m_useSolveConstraintObsolete;
+
+ btConstraintSetting m_setting;
+
+ btPoint2PointConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB);
+
+ btPoint2PointConstraint(btRigidBody& rbA,const btVector3& pivotInA);
+
+
+ virtual void buildJacobian();
+
+ virtual void getInfo1 (btConstraintInfo1* info);
+
+ void getInfo1NonVirtual (btConstraintInfo1* info);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ void getInfo2NonVirtual (btConstraintInfo2* info, const btTransform& body0_trans, const btTransform& body1_trans);
+
+ void updateRHS(btScalar timeStep);
+
+ void setPivotA(const btVector3& pivotA)
+ {
+ m_pivotInA = pivotA;
+ }
+
+ void setPivotB(const btVector3& pivotB)
+ {
+ m_pivotInB = pivotB;
+ }
+
+ const btVector3& getPivotInA() const
+ {
+ return m_pivotInA;
+ }
+
+ const btVector3& getPivotInB() const
+ {
+ return m_pivotInB;
+ }
+
+ ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+ ///If no axis is provided, it uses the default axis for this constraint.
+ virtual void setParam(int num, btScalar value, int axis = -1);
+ ///return the local value of parameter
+ virtual btScalar getParam(int num, int axis = -1) const;
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btPoint2PointConstraintFloatData
+{
+ btTypedConstraintData m_typeConstraintData;
+ btVector3FloatData m_pivotInA;
+ btVector3FloatData m_pivotInB;
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btPoint2PointConstraintDoubleData
+{
+ btTypedConstraintData m_typeConstraintData;
+ btVector3DoubleData m_pivotInA;
+ btVector3DoubleData m_pivotInB;
+};
+
+
+SIMD_FORCE_INLINE int btPoint2PointConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btPoint2PointConstraintData);
+
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btPoint2PointConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btPoint2PointConstraintData* p2pData = (btPoint2PointConstraintData*)dataBuffer;
+
+ btTypedConstraint::serialize(&p2pData->m_typeConstraintData,serializer);
+ m_pivotInA.serialize(p2pData->m_pivotInA);
+ m_pivotInB.serialize(p2pData->m_pivotInB);
+
+ return btPoint2PointConstraintDataName;
+}
+
+#endif //BT_POINT2POINTCONSTRAINT_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
new file mode 100644
index 00000000..c05e22fb
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
@@ -0,0 +1,1239 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//#define COMPUTE_IMPULSE_DENOM 1
+//It is not necessary (redundant) to refresh contact manifolds, this refresh has been moved to the collision algorithms.
+
+#include "btSequentialImpulseConstraintSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "btContactConstraint.h"
+#include "btSolve2LinearConstraint.h"
+#include "btContactSolverInfo.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "btJacobianEntry.h"
+#include "LinearMath/btMinMax.h"
+#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
+#include <new>
+#include "LinearMath/btStackAlloc.h"
+#include "LinearMath/btQuickprof.h"
+#include "btSolverBody.h"
+#include "btSolverConstraint.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include <string.h> //for memset
+
+int gNumSplitImpulseRecoveries = 0;
+
+btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()
+:m_btSeed2(0)
+{
+
+}
+
+btSequentialImpulseConstraintSolver::~btSequentialImpulseConstraintSolver()
+{
+}
+
+#ifdef USE_SIMD
+#include <emmintrin.h>
+#define btVecSplat(x, e) _mm_shuffle_ps(x, x, _MM_SHUFFLE(e,e,e,e))
+static inline __m128 btSimdDot3( __m128 vec0, __m128 vec1 )
+{
+ __m128 result = _mm_mul_ps( vec0, vec1);
+ return _mm_add_ps( btVecSplat( result, 0 ), _mm_add_ps( btVecSplat( result, 1 ), btVecSplat( result, 2 ) ) );
+}
+#endif//USE_SIMD
+
+// Project Gauss Seidel or the equivalent Sequential Impulse
+void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& c)
+{
+#ifdef USE_SIMD
+ __m128 cpAppliedImp = _mm_set1_ps(c.m_appliedImpulse);
+ __m128 lowerLimit1 = _mm_set1_ps(c.m_lowerLimit);
+ __m128 upperLimit1 = _mm_set1_ps(c.m_upperLimit);
+ __m128 deltaImpulse = _mm_sub_ps(_mm_set1_ps(c.m_rhs), _mm_mul_ps(_mm_set1_ps(c.m_appliedImpulse),_mm_set1_ps(c.m_cfm)));
+ __m128 deltaVel1Dotn = _mm_add_ps(btSimdDot3(c.m_contactNormal.mVec128,body1.internalGetDeltaLinearVelocity().mVec128), btSimdDot3(c.m_relpos1CrossNormal.mVec128,body1.internalGetDeltaAngularVelocity().mVec128));
+ __m128 deltaVel2Dotn = _mm_sub_ps(btSimdDot3(c.m_relpos2CrossNormal.mVec128,body2.internalGetDeltaAngularVelocity().mVec128),btSimdDot3((c.m_contactNormal).mVec128,body2.internalGetDeltaLinearVelocity().mVec128));
+ deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel1Dotn,_mm_set1_ps(c.m_jacDiagABInv)));
+ deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel2Dotn,_mm_set1_ps(c.m_jacDiagABInv)));
+ btSimdScalar sum = _mm_add_ps(cpAppliedImp,deltaImpulse);
+ btSimdScalar resultLowerLess,resultUpperLess;
+ resultLowerLess = _mm_cmplt_ps(sum,lowerLimit1);
+ resultUpperLess = _mm_cmplt_ps(sum,upperLimit1);
+ __m128 lowMinApplied = _mm_sub_ps(lowerLimit1,cpAppliedImp);
+ deltaImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowMinApplied), _mm_andnot_ps(resultLowerLess, deltaImpulse) );
+ c.m_appliedImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowerLimit1), _mm_andnot_ps(resultLowerLess, sum) );
+ __m128 upperMinApplied = _mm_sub_ps(upperLimit1,cpAppliedImp);
+ deltaImpulse = _mm_or_ps( _mm_and_ps(resultUpperLess, deltaImpulse), _mm_andnot_ps(resultUpperLess, upperMinApplied) );
+ c.m_appliedImpulse = _mm_or_ps( _mm_and_ps(resultUpperLess, c.m_appliedImpulse), _mm_andnot_ps(resultUpperLess, upperLimit1) );
+ __m128 linearComponentA = _mm_mul_ps(c.m_contactNormal.mVec128,body1.internalGetInvMass().mVec128);
+ __m128 linearComponentB = _mm_mul_ps((c.m_contactNormal).mVec128,body2.internalGetInvMass().mVec128);
+ __m128 impulseMagnitude = deltaImpulse;
+ body1.internalGetDeltaLinearVelocity().mVec128 = _mm_add_ps(body1.internalGetDeltaLinearVelocity().mVec128,_mm_mul_ps(linearComponentA,impulseMagnitude));
+ body1.internalGetDeltaAngularVelocity().mVec128 = _mm_add_ps(body1.internalGetDeltaAngularVelocity().mVec128 ,_mm_mul_ps(c.m_angularComponentA.mVec128,impulseMagnitude));
+ body2.internalGetDeltaLinearVelocity().mVec128 = _mm_sub_ps(body2.internalGetDeltaLinearVelocity().mVec128,_mm_mul_ps(linearComponentB,impulseMagnitude));
+ body2.internalGetDeltaAngularVelocity().mVec128 = _mm_add_ps(body2.internalGetDeltaAngularVelocity().mVec128 ,_mm_mul_ps(c.m_angularComponentB.mVec128,impulseMagnitude));
+#else
+ resolveSingleConstraintRowGeneric(body1,body2,c);
+#endif
+}
+
+// Project Gauss Seidel or the equivalent Sequential Impulse
+ void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& c)
+{
+ btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm;
+ const btScalar deltaVel1Dotn = c.m_contactNormal.dot(body1.internalGetDeltaLinearVelocity()) + c.m_relpos1CrossNormal.dot(body1.internalGetDeltaAngularVelocity());
+ const btScalar deltaVel2Dotn = -c.m_contactNormal.dot(body2.internalGetDeltaLinearVelocity()) + c.m_relpos2CrossNormal.dot(body2.internalGetDeltaAngularVelocity());
+
+// const btScalar delta_rel_vel = deltaVel1Dotn-deltaVel2Dotn;
+ deltaImpulse -= deltaVel1Dotn*c.m_jacDiagABInv;
+ deltaImpulse -= deltaVel2Dotn*c.m_jacDiagABInv;
+
+ const btScalar sum = btScalar(c.m_appliedImpulse) + deltaImpulse;
+ if (sum < c.m_lowerLimit)
+ {
+ deltaImpulse = c.m_lowerLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_lowerLimit;
+ }
+ else if (sum > c.m_upperLimit)
+ {
+ deltaImpulse = c.m_upperLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_upperLimit;
+ }
+ else
+ {
+ c.m_appliedImpulse = sum;
+ }
+ body1.internalApplyImpulse(c.m_contactNormal*body1.internalGetInvMass(),c.m_angularComponentA,deltaImpulse);
+ body2.internalApplyImpulse(-c.m_contactNormal*body2.internalGetInvMass(),c.m_angularComponentB,deltaImpulse);
+}
+
+ void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimitSIMD(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& c)
+{
+#ifdef USE_SIMD
+ __m128 cpAppliedImp = _mm_set1_ps(c.m_appliedImpulse);
+ __m128 lowerLimit1 = _mm_set1_ps(c.m_lowerLimit);
+ __m128 upperLimit1 = _mm_set1_ps(c.m_upperLimit);
+ __m128 deltaImpulse = _mm_sub_ps(_mm_set1_ps(c.m_rhs), _mm_mul_ps(_mm_set1_ps(c.m_appliedImpulse),_mm_set1_ps(c.m_cfm)));
+ __m128 deltaVel1Dotn = _mm_add_ps(btSimdDot3(c.m_contactNormal.mVec128,body1.internalGetDeltaLinearVelocity().mVec128), btSimdDot3(c.m_relpos1CrossNormal.mVec128,body1.internalGetDeltaAngularVelocity().mVec128));
+ __m128 deltaVel2Dotn = _mm_sub_ps(btSimdDot3(c.m_relpos2CrossNormal.mVec128,body2.internalGetDeltaAngularVelocity().mVec128),btSimdDot3((c.m_contactNormal).mVec128,body2.internalGetDeltaLinearVelocity().mVec128));
+ deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel1Dotn,_mm_set1_ps(c.m_jacDiagABInv)));
+ deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel2Dotn,_mm_set1_ps(c.m_jacDiagABInv)));
+ btSimdScalar sum = _mm_add_ps(cpAppliedImp,deltaImpulse);
+ btSimdScalar resultLowerLess,resultUpperLess;
+ resultLowerLess = _mm_cmplt_ps(sum,lowerLimit1);
+ resultUpperLess = _mm_cmplt_ps(sum,upperLimit1);
+ __m128 lowMinApplied = _mm_sub_ps(lowerLimit1,cpAppliedImp);
+ deltaImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowMinApplied), _mm_andnot_ps(resultLowerLess, deltaImpulse) );
+ c.m_appliedImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowerLimit1), _mm_andnot_ps(resultLowerLess, sum) );
+ __m128 linearComponentA = _mm_mul_ps(c.m_contactNormal.mVec128,body1.internalGetInvMass().mVec128);
+ __m128 linearComponentB = _mm_mul_ps((c.m_contactNormal).mVec128,body2.internalGetInvMass().mVec128);
+ __m128 impulseMagnitude = deltaImpulse;
+ body1.internalGetDeltaLinearVelocity().mVec128 = _mm_add_ps(body1.internalGetDeltaLinearVelocity().mVec128,_mm_mul_ps(linearComponentA,impulseMagnitude));
+ body1.internalGetDeltaAngularVelocity().mVec128 = _mm_add_ps(body1.internalGetDeltaAngularVelocity().mVec128 ,_mm_mul_ps(c.m_angularComponentA.mVec128,impulseMagnitude));
+ body2.internalGetDeltaLinearVelocity().mVec128 = _mm_sub_ps(body2.internalGetDeltaLinearVelocity().mVec128,_mm_mul_ps(linearComponentB,impulseMagnitude));
+ body2.internalGetDeltaAngularVelocity().mVec128 = _mm_add_ps(body2.internalGetDeltaAngularVelocity().mVec128 ,_mm_mul_ps(c.m_angularComponentB.mVec128,impulseMagnitude));
+#else
+ resolveSingleConstraintRowLowerLimit(body1,body2,c);
+#endif
+}
+
+// Project Gauss Seidel or the equivalent Sequential Impulse
+ void btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& c)
+{
+ btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm;
+ const btScalar deltaVel1Dotn = c.m_contactNormal.dot(body1.internalGetDeltaLinearVelocity()) + c.m_relpos1CrossNormal.dot(body1.internalGetDeltaAngularVelocity());
+ const btScalar deltaVel2Dotn = -c.m_contactNormal.dot(body2.internalGetDeltaLinearVelocity()) + c.m_relpos2CrossNormal.dot(body2.internalGetDeltaAngularVelocity());
+
+ deltaImpulse -= deltaVel1Dotn*c.m_jacDiagABInv;
+ deltaImpulse -= deltaVel2Dotn*c.m_jacDiagABInv;
+ const btScalar sum = btScalar(c.m_appliedImpulse) + deltaImpulse;
+ if (sum < c.m_lowerLimit)
+ {
+ deltaImpulse = c.m_lowerLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_lowerLimit;
+ }
+ else
+ {
+ c.m_appliedImpulse = sum;
+ }
+ body1.internalApplyImpulse(c.m_contactNormal*body1.internalGetInvMass(),c.m_angularComponentA,deltaImpulse);
+ body2.internalApplyImpulse(-c.m_contactNormal*body2.internalGetInvMass(),c.m_angularComponentB,deltaImpulse);
+}
+
+
+void btSequentialImpulseConstraintSolver::resolveSplitPenetrationImpulseCacheFriendly(
+ btRigidBody& body1,
+ btRigidBody& body2,
+ const btSolverConstraint& c)
+{
+ if (c.m_rhsPenetration)
+ {
+ gNumSplitImpulseRecoveries++;
+ btScalar deltaImpulse = c.m_rhsPenetration-btScalar(c.m_appliedPushImpulse)*c.m_cfm;
+ const btScalar deltaVel1Dotn = c.m_contactNormal.dot(body1.internalGetPushVelocity()) + c.m_relpos1CrossNormal.dot(body1.internalGetTurnVelocity());
+ const btScalar deltaVel2Dotn = -c.m_contactNormal.dot(body2.internalGetPushVelocity()) + c.m_relpos2CrossNormal.dot(body2.internalGetTurnVelocity());
+
+ deltaImpulse -= deltaVel1Dotn*c.m_jacDiagABInv;
+ deltaImpulse -= deltaVel2Dotn*c.m_jacDiagABInv;
+ const btScalar sum = btScalar(c.m_appliedPushImpulse) + deltaImpulse;
+ if (sum < c.m_lowerLimit)
+ {
+ deltaImpulse = c.m_lowerLimit-c.m_appliedPushImpulse;
+ c.m_appliedPushImpulse = c.m_lowerLimit;
+ }
+ else
+ {
+ c.m_appliedPushImpulse = sum;
+ }
+ body1.internalApplyPushImpulse(c.m_contactNormal*body1.internalGetInvMass(),c.m_angularComponentA,deltaImpulse);
+ body2.internalApplyPushImpulse(-c.m_contactNormal*body2.internalGetInvMass(),c.m_angularComponentB,deltaImpulse);
+ }
+}
+
+ void btSequentialImpulseConstraintSolver::resolveSplitPenetrationSIMD(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& c)
+{
+#ifdef USE_SIMD
+ if (!c.m_rhsPenetration)
+ return;
+
+ gNumSplitImpulseRecoveries++;
+
+ __m128 cpAppliedImp = _mm_set1_ps(c.m_appliedPushImpulse);
+ __m128 lowerLimit1 = _mm_set1_ps(c.m_lowerLimit);
+ __m128 upperLimit1 = _mm_set1_ps(c.m_upperLimit);
+ __m128 deltaImpulse = _mm_sub_ps(_mm_set1_ps(c.m_rhsPenetration), _mm_mul_ps(_mm_set1_ps(c.m_appliedPushImpulse),_mm_set1_ps(c.m_cfm)));
+ __m128 deltaVel1Dotn = _mm_add_ps(btSimdDot3(c.m_contactNormal.mVec128,body1.internalGetPushVelocity().mVec128), btSimdDot3(c.m_relpos1CrossNormal.mVec128,body1.internalGetTurnVelocity().mVec128));
+ __m128 deltaVel2Dotn = _mm_sub_ps(btSimdDot3(c.m_relpos2CrossNormal.mVec128,body2.internalGetTurnVelocity().mVec128),btSimdDot3((c.m_contactNormal).mVec128,body2.internalGetPushVelocity().mVec128));
+ deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel1Dotn,_mm_set1_ps(c.m_jacDiagABInv)));
+ deltaImpulse = _mm_sub_ps(deltaImpulse,_mm_mul_ps(deltaVel2Dotn,_mm_set1_ps(c.m_jacDiagABInv)));
+ btSimdScalar sum = _mm_add_ps(cpAppliedImp,deltaImpulse);
+ btSimdScalar resultLowerLess,resultUpperLess;
+ resultLowerLess = _mm_cmplt_ps(sum,lowerLimit1);
+ resultUpperLess = _mm_cmplt_ps(sum,upperLimit1);
+ __m128 lowMinApplied = _mm_sub_ps(lowerLimit1,cpAppliedImp);
+ deltaImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowMinApplied), _mm_andnot_ps(resultLowerLess, deltaImpulse) );
+ c.m_appliedImpulse = _mm_or_ps( _mm_and_ps(resultLowerLess, lowerLimit1), _mm_andnot_ps(resultLowerLess, sum) );
+ __m128 linearComponentA = _mm_mul_ps(c.m_contactNormal.mVec128,body1.internalGetInvMass().mVec128);
+ __m128 linearComponentB = _mm_mul_ps((c.m_contactNormal).mVec128,body2.internalGetInvMass().mVec128);
+ __m128 impulseMagnitude = deltaImpulse;
+ body1.internalGetPushVelocity().mVec128 = _mm_add_ps(body1.internalGetPushVelocity().mVec128,_mm_mul_ps(linearComponentA,impulseMagnitude));
+ body1.internalGetTurnVelocity().mVec128 = _mm_add_ps(body1.internalGetTurnVelocity().mVec128 ,_mm_mul_ps(c.m_angularComponentA.mVec128,impulseMagnitude));
+ body2.internalGetPushVelocity().mVec128 = _mm_sub_ps(body2.internalGetPushVelocity().mVec128,_mm_mul_ps(linearComponentB,impulseMagnitude));
+ body2.internalGetTurnVelocity().mVec128 = _mm_add_ps(body2.internalGetTurnVelocity().mVec128 ,_mm_mul_ps(c.m_angularComponentB.mVec128,impulseMagnitude));
+#else
+ resolveSplitPenetrationImpulseCacheFriendly(body1,body2,c);
+#endif
+}
+
+
+
+unsigned long btSequentialImpulseConstraintSolver::btRand2()
+{
+ m_btSeed2 = (1664525L*m_btSeed2 + 1013904223L) & 0xffffffff;
+ return m_btSeed2;
+}
+
+
+
+//See ODE: adam's all-int straightforward(?) dRandInt (0..n-1)
+int btSequentialImpulseConstraintSolver::btRandInt2 (int n)
+{
+ // seems good; xor-fold and modulus
+ const unsigned long un = static_cast<unsigned long>(n);
+ unsigned long r = btRand2();
+
+ // note: probably more aggressive than it needs to be -- might be
+ // able to get away without one or two of the innermost branches.
+ if (un <= 0x00010000UL) {
+ r ^= (r >> 16);
+ if (un <= 0x00000100UL) {
+ r ^= (r >> 8);
+ if (un <= 0x00000010UL) {
+ r ^= (r >> 4);
+ if (un <= 0x00000004UL) {
+ r ^= (r >> 2);
+ if (un <= 0x00000002UL) {
+ r ^= (r >> 1);
+ }
+ }
+ }
+ }
+ }
+
+ return (int) (r % un);
+}
+
+
+#if 0
+void btSequentialImpulseConstraintSolver::initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject)
+{
+ btRigidBody* rb = collisionObject? btRigidBody::upcast(collisionObject) : 0;
+
+ solverBody->internalGetDeltaLinearVelocity().setValue(0.f,0.f,0.f);
+ solverBody->internalGetDeltaAngularVelocity().setValue(0.f,0.f,0.f);
+ solverBody->internalGetPushVelocity().setValue(0.f,0.f,0.f);
+ solverBody->internalGetTurnVelocity().setValue(0.f,0.f,0.f);
+
+ if (rb)
+ {
+ solverBody->internalGetInvMass() = btVector3(rb->getInvMass(),rb->getInvMass(),rb->getInvMass())*rb->getLinearFactor();
+ solverBody->m_originalBody = rb;
+ solverBody->m_angularFactor = rb->getAngularFactor();
+ } else
+ {
+ solverBody->internalGetInvMass().setValue(0,0,0);
+ solverBody->m_originalBody = 0;
+ solverBody->m_angularFactor.setValue(1,1,1);
+ }
+}
+#endif
+
+
+
+
+
+btScalar btSequentialImpulseConstraintSolver::restitutionCurve(btScalar rel_vel, btScalar restitution)
+{
+ btScalar rest = restitution * -rel_vel;
+ return rest;
+}
+
+
+
+void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection);
+void applyAnisotropicFriction(btCollisionObject* colObj,btVector3& frictionDirection)
+{
+ if (colObj && colObj->hasAnisotropicFriction())
+ {
+ // transform to local coordinates
+ btVector3 loc_lateral = frictionDirection * colObj->getWorldTransform().getBasis();
+ const btVector3& friction_scaling = colObj->getAnisotropicFriction();
+ //apply anisotropic friction
+ loc_lateral *= friction_scaling;
+ // ... and transform it back to global coordinates
+ frictionDirection = colObj->getWorldTransform().getBasis() * loc_lateral;
+ }
+}
+
+
+void btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstraint& solverConstraint, const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity, btScalar cfmSlip)
+{
+
+
+ btRigidBody* body0=btRigidBody::upcast(colObj0);
+ btRigidBody* body1=btRigidBody::upcast(colObj1);
+
+ solverConstraint.m_contactNormal = normalAxis;
+
+ solverConstraint.m_solverBodyA = body0 ? body0 : &getFixedBody();
+ solverConstraint.m_solverBodyB = body1 ? body1 : &getFixedBody();
+
+ solverConstraint.m_friction = cp.m_combinedFriction;
+ solverConstraint.m_originalContactPoint = 0;
+
+ solverConstraint.m_appliedImpulse = 0.f;
+ solverConstraint.m_appliedPushImpulse = 0.f;
+
+ {
+ btVector3 ftorqueAxis1 = rel_pos1.cross(solverConstraint.m_contactNormal);
+ solverConstraint.m_relpos1CrossNormal = ftorqueAxis1;
+ solverConstraint.m_angularComponentA = body0 ? body0->getInvInertiaTensorWorld()*ftorqueAxis1*body0->getAngularFactor() : btVector3(0,0,0);
+ }
+ {
+ btVector3 ftorqueAxis1 = rel_pos2.cross(-solverConstraint.m_contactNormal);
+ solverConstraint.m_relpos2CrossNormal = ftorqueAxis1;
+ solverConstraint.m_angularComponentB = body1 ? body1->getInvInertiaTensorWorld()*ftorqueAxis1*body1->getAngularFactor() : btVector3(0,0,0);
+ }
+
+#ifdef COMPUTE_IMPULSE_DENOM
+ btScalar denom0 = rb0->computeImpulseDenominator(pos1,solverConstraint.m_contactNormal);
+ btScalar denom1 = rb1->computeImpulseDenominator(pos2,solverConstraint.m_contactNormal);
+#else
+ btVector3 vec;
+ btScalar denom0 = 0.f;
+ btScalar denom1 = 0.f;
+ if (body0)
+ {
+ vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1);
+ denom0 = body0->getInvMass() + normalAxis.dot(vec);
+ }
+ if (body1)
+ {
+ vec = ( -solverConstraint.m_angularComponentB).cross(rel_pos2);
+ denom1 = body1->getInvMass() + normalAxis.dot(vec);
+ }
+
+
+#endif //COMPUTE_IMPULSE_DENOM
+ btScalar denom = relaxation/(denom0+denom1);
+ solverConstraint.m_jacDiagABInv = denom;
+
+#ifdef _USE_JACOBIAN
+ solverConstraint.m_jac = btJacobianEntry (
+ rel_pos1,rel_pos2,solverConstraint.m_contactNormal,
+ body0->getInvInertiaDiagLocal(),
+ body0->getInvMass(),
+ body1->getInvInertiaDiagLocal(),
+ body1->getInvMass());
+#endif //_USE_JACOBIAN
+
+
+ {
+ btScalar rel_vel;
+ btScalar vel1Dotn = solverConstraint.m_contactNormal.dot(body0?body0->getLinearVelocity():btVector3(0,0,0))
+ + solverConstraint.m_relpos1CrossNormal.dot(body0?body0->getAngularVelocity():btVector3(0,0,0));
+ btScalar vel2Dotn = -solverConstraint.m_contactNormal.dot(body1?body1->getLinearVelocity():btVector3(0,0,0))
+ + solverConstraint.m_relpos2CrossNormal.dot(body1?body1->getAngularVelocity():btVector3(0,0,0));
+
+ rel_vel = vel1Dotn+vel2Dotn;
+
+// btScalar positionalError = 0.f;
+
+ btSimdScalar velocityError = desiredVelocity - rel_vel;
+ btSimdScalar velocityImpulse = velocityError * btSimdScalar(solverConstraint.m_jacDiagABInv);
+ solverConstraint.m_rhs = velocityImpulse;
+ solverConstraint.m_cfm = cfmSlip;
+ solverConstraint.m_lowerLimit = 0;
+ solverConstraint.m_upperLimit = 1e10f;
+ }
+}
+
+
+
+btSolverConstraint& btSequentialImpulseConstraintSolver::addFrictionConstraint(const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity, btScalar cfmSlip)
+{
+ btSolverConstraint& solverConstraint = m_tmpSolverContactFrictionConstraintPool.expandNonInitializing();
+ solverConstraint.m_frictionIndex = frictionIndex;
+ setupFrictionConstraint(solverConstraint, normalAxis, solverBodyA, solverBodyB, cp, rel_pos1, rel_pos2,
+ colObj0, colObj1, relaxation, desiredVelocity, cfmSlip);
+ return solverConstraint;
+}
+
+int btSequentialImpulseConstraintSolver::getOrInitSolverBody(btCollisionObject& body)
+{
+#if 0
+ int solverBodyIdA = -1;
+
+ if (body.getCompanionId() >= 0)
+ {
+ //body has already been converted
+ solverBodyIdA = body.getCompanionId();
+ } else
+ {
+ btRigidBody* rb = btRigidBody::upcast(&body);
+ if (rb && rb->getInvMass())
+ {
+ solverBodyIdA = m_tmpSolverBodyPool.size();
+ btSolverBody& solverBody = m_tmpSolverBodyPool.expand();
+ initSolverBody(&solverBody,&body);
+ body.setCompanionId(solverBodyIdA);
+ } else
+ {
+ return 0;//assume first one is a fixed solver body
+ }
+ }
+ return solverBodyIdA;
+#endif
+ return 0;
+}
+#include <stdio.h>
+
+
+void btSequentialImpulseConstraintSolver::setupContactConstraint(btSolverConstraint& solverConstraint,
+ btCollisionObject* colObj0, btCollisionObject* colObj1,
+ btManifoldPoint& cp, const btContactSolverInfo& infoGlobal,
+ btVector3& vel, btScalar& rel_vel, btScalar& relaxation,
+ btVector3& rel_pos1, btVector3& rel_pos2)
+{
+ btRigidBody* rb0 = btRigidBody::upcast(colObj0);
+ btRigidBody* rb1 = btRigidBody::upcast(colObj1);
+
+ const btVector3& pos1 = cp.getPositionWorldOnA();
+ const btVector3& pos2 = cp.getPositionWorldOnB();
+
+// btVector3 rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin();
+// btVector3 rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin();
+ rel_pos1 = pos1 - colObj0->getWorldTransform().getOrigin();
+ rel_pos2 = pos2 - colObj1->getWorldTransform().getOrigin();
+
+ relaxation = 1.f;
+
+ btVector3 torqueAxis0 = rel_pos1.cross(cp.m_normalWorldOnB);
+ solverConstraint.m_angularComponentA = rb0 ? rb0->getInvInertiaTensorWorld()*torqueAxis0*rb0->getAngularFactor() : btVector3(0,0,0);
+ btVector3 torqueAxis1 = rel_pos2.cross(cp.m_normalWorldOnB);
+ solverConstraint.m_angularComponentB = rb1 ? rb1->getInvInertiaTensorWorld()*-torqueAxis1*rb1->getAngularFactor() : btVector3(0,0,0);
+
+ {
+#ifdef COMPUTE_IMPULSE_DENOM
+ btScalar denom0 = rb0->computeImpulseDenominator(pos1,cp.m_normalWorldOnB);
+ btScalar denom1 = rb1->computeImpulseDenominator(pos2,cp.m_normalWorldOnB);
+#else
+ btVector3 vec;
+ btScalar denom0 = 0.f;
+ btScalar denom1 = 0.f;
+ if (rb0)
+ {
+ vec = ( solverConstraint.m_angularComponentA).cross(rel_pos1);
+ denom0 = rb0->getInvMass() + cp.m_normalWorldOnB.dot(vec);
+ }
+ if (rb1)
+ {
+ vec = ( -solverConstraint.m_angularComponentB).cross(rel_pos2);
+ denom1 = rb1->getInvMass() + cp.m_normalWorldOnB.dot(vec);
+ }
+#endif //COMPUTE_IMPULSE_DENOM
+
+ btScalar denom = relaxation/(denom0+denom1);
+ solverConstraint.m_jacDiagABInv = denom;
+ }
+
+ solverConstraint.m_contactNormal = cp.m_normalWorldOnB;
+ solverConstraint.m_relpos1CrossNormal = rel_pos1.cross(cp.m_normalWorldOnB);
+ solverConstraint.m_relpos2CrossNormal = rel_pos2.cross(-cp.m_normalWorldOnB);
+
+
+
+
+ btVector3 vel1 = rb0 ? rb0->getVelocityInLocalPoint(rel_pos1) : btVector3(0,0,0);
+ btVector3 vel2 = rb1 ? rb1->getVelocityInLocalPoint(rel_pos2) : btVector3(0,0,0);
+ vel = vel1 - vel2;
+ rel_vel = cp.m_normalWorldOnB.dot(vel);
+
+ btScalar penetration = cp.getDistance()+infoGlobal.m_linearSlop;
+
+
+ solverConstraint.m_friction = cp.m_combinedFriction;
+
+ btScalar restitution = 0.f;
+
+ if (cp.m_lifeTime>infoGlobal.m_restingContactRestitutionThreshold)
+ {
+ restitution = 0.f;
+ } else
+ {
+ restitution = restitutionCurve(rel_vel, cp.m_combinedRestitution);
+ if (restitution <= btScalar(0.))
+ {
+ restitution = 0.f;
+ };
+ }
+
+
+ ///warm starting (or zero if disabled)
+ if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
+ {
+ solverConstraint.m_appliedImpulse = cp.m_appliedImpulse * infoGlobal.m_warmstartingFactor;
+ if (rb0)
+ rb0->internalApplyImpulse(solverConstraint.m_contactNormal*rb0->getInvMass()*rb0->getLinearFactor(),solverConstraint.m_angularComponentA,solverConstraint.m_appliedImpulse);
+ if (rb1)
+ rb1->internalApplyImpulse(solverConstraint.m_contactNormal*rb1->getInvMass()*rb1->getLinearFactor(),-solverConstraint.m_angularComponentB,-(btScalar)solverConstraint.m_appliedImpulse);
+ } else
+ {
+ solverConstraint.m_appliedImpulse = 0.f;
+ }
+
+ solverConstraint.m_appliedPushImpulse = 0.f;
+
+ {
+ btScalar rel_vel;
+ btScalar vel1Dotn = solverConstraint.m_contactNormal.dot(rb0?rb0->getLinearVelocity():btVector3(0,0,0))
+ + solverConstraint.m_relpos1CrossNormal.dot(rb0?rb0->getAngularVelocity():btVector3(0,0,0));
+ btScalar vel2Dotn = -solverConstraint.m_contactNormal.dot(rb1?rb1->getLinearVelocity():btVector3(0,0,0))
+ + solverConstraint.m_relpos2CrossNormal.dot(rb1?rb1->getAngularVelocity():btVector3(0,0,0));
+
+ rel_vel = vel1Dotn+vel2Dotn;
+
+ btScalar positionalError = 0.f;
+ btScalar velocityError = restitution - rel_vel;// * damping;
+
+ if (penetration>0)
+ {
+ positionalError = 0;
+ velocityError -= penetration / infoGlobal.m_timeStep;
+ } else
+ {
+ positionalError = -penetration * infoGlobal.m_erp/infoGlobal.m_timeStep;
+ }
+
+ btScalar penetrationImpulse = positionalError*solverConstraint.m_jacDiagABInv;
+ btScalar velocityImpulse = velocityError *solverConstraint.m_jacDiagABInv;
+ if (!infoGlobal.m_splitImpulse || (penetration > infoGlobal.m_splitImpulsePenetrationThreshold))
+ {
+ //combine position and velocity into rhs
+ solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;
+ solverConstraint.m_rhsPenetration = 0.f;
+ } else
+ {
+ //split position and velocity into rhs and m_rhsPenetration
+ solverConstraint.m_rhs = velocityImpulse;
+ solverConstraint.m_rhsPenetration = penetrationImpulse;
+ }
+ solverConstraint.m_cfm = 0.f;
+ solverConstraint.m_lowerLimit = 0;
+ solverConstraint.m_upperLimit = 1e10f;
+ }
+
+
+
+
+}
+
+
+
+void btSequentialImpulseConstraintSolver::setFrictionConstraintImpulse( btSolverConstraint& solverConstraint,
+ btRigidBody* rb0, btRigidBody* rb1,
+ btManifoldPoint& cp, const btContactSolverInfo& infoGlobal)
+{
+ if (infoGlobal.m_solverMode & SOLVER_USE_FRICTION_WARMSTARTING)
+ {
+ {
+ btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex];
+ if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
+ {
+ frictionConstraint1.m_appliedImpulse = cp.m_appliedImpulseLateral1 * infoGlobal.m_warmstartingFactor;
+ if (rb0)
+ rb0->internalApplyImpulse(frictionConstraint1.m_contactNormal*rb0->getInvMass()*rb0->getLinearFactor(),frictionConstraint1.m_angularComponentA,frictionConstraint1.m_appliedImpulse);
+ if (rb1)
+ rb1->internalApplyImpulse(frictionConstraint1.m_contactNormal*rb1->getInvMass()*rb1->getLinearFactor(),-frictionConstraint1.m_angularComponentB,-(btScalar)frictionConstraint1.m_appliedImpulse);
+ } else
+ {
+ frictionConstraint1.m_appliedImpulse = 0.f;
+ }
+ }
+
+ if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ {
+ btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1];
+ if (infoGlobal.m_solverMode & SOLVER_USE_WARMSTARTING)
+ {
+ frictionConstraint2.m_appliedImpulse = cp.m_appliedImpulseLateral2 * infoGlobal.m_warmstartingFactor;
+ if (rb0)
+ rb0->internalApplyImpulse(frictionConstraint2.m_contactNormal*rb0->getInvMass(),frictionConstraint2.m_angularComponentA,frictionConstraint2.m_appliedImpulse);
+ if (rb1)
+ rb1->internalApplyImpulse(frictionConstraint2.m_contactNormal*rb1->getInvMass(),-frictionConstraint2.m_angularComponentB,-(btScalar)frictionConstraint2.m_appliedImpulse);
+ } else
+ {
+ frictionConstraint2.m_appliedImpulse = 0.f;
+ }
+ }
+ } else
+ {
+ btSolverConstraint& frictionConstraint1 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex];
+ frictionConstraint1.m_appliedImpulse = 0.f;
+ if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ {
+ btSolverConstraint& frictionConstraint2 = m_tmpSolverContactFrictionConstraintPool[solverConstraint.m_frictionIndex+1];
+ frictionConstraint2.m_appliedImpulse = 0.f;
+ }
+ }
+}
+
+
+
+
+void btSequentialImpulseConstraintSolver::convertContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal)
+{
+ btCollisionObject* colObj0=0,*colObj1=0;
+
+ colObj0 = (btCollisionObject*)manifold->getBody0();
+ colObj1 = (btCollisionObject*)manifold->getBody1();
+
+
+ btRigidBody* solverBodyA = btRigidBody::upcast(colObj0);
+ btRigidBody* solverBodyB = btRigidBody::upcast(colObj1);
+
+ ///avoid collision response between two static objects
+ if ((!solverBodyA || !solverBodyA->getInvMass()) && (!solverBodyB || !solverBodyB->getInvMass()))
+ return;
+
+ for (int j=0;j<manifold->getNumContacts();j++)
+ {
+
+ btManifoldPoint& cp = manifold->getContactPoint(j);
+
+ if (cp.getDistance() <= manifold->getContactProcessingThreshold())
+ {
+ btVector3 rel_pos1;
+ btVector3 rel_pos2;
+ btScalar relaxation;
+ btScalar rel_vel;
+ btVector3 vel;
+
+ int frictionIndex = m_tmpSolverContactConstraintPool.size();
+ btSolverConstraint& solverConstraint = m_tmpSolverContactConstraintPool.expandNonInitializing();
+ btRigidBody* rb0 = btRigidBody::upcast(colObj0);
+ btRigidBody* rb1 = btRigidBody::upcast(colObj1);
+ solverConstraint.m_solverBodyA = rb0? rb0 : &getFixedBody();
+ solverConstraint.m_solverBodyB = rb1? rb1 : &getFixedBody();
+ solverConstraint.m_originalContactPoint = &cp;
+
+ setupContactConstraint(solverConstraint, colObj0, colObj1, cp, infoGlobal, vel, rel_vel, relaxation, rel_pos1, rel_pos2);
+
+// const btVector3& pos1 = cp.getPositionWorldOnA();
+// const btVector3& pos2 = cp.getPositionWorldOnB();
+
+ /////setup the friction constraints
+
+ solverConstraint.m_frictionIndex = m_tmpSolverContactFrictionConstraintPool.size();
+
+ if (!(infoGlobal.m_solverMode & SOLVER_ENABLE_FRICTION_DIRECTION_CACHING) || !cp.m_lateralFrictionInitialized)
+ {
+ cp.m_lateralFrictionDir1 = vel - cp.m_normalWorldOnB * rel_vel;
+ btScalar lat_rel_vel = cp.m_lateralFrictionDir1.length2();
+ if (!(infoGlobal.m_solverMode & SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION) && lat_rel_vel > SIMD_EPSILON)
+ {
+ cp.m_lateralFrictionDir1 /= btSqrt(lat_rel_vel);
+ if((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ {
+ cp.m_lateralFrictionDir2 = cp.m_lateralFrictionDir1.cross(cp.m_normalWorldOnB);
+ cp.m_lateralFrictionDir2.normalize();//??
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2);
+ addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+ }
+
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1);
+ addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+ cp.m_lateralFrictionInitialized = true;
+ } else
+ {
+ //re-calculate friction direction every frame, todo: check if this is really needed
+ btPlaneSpace1(cp.m_normalWorldOnB,cp.m_lateralFrictionDir1,cp.m_lateralFrictionDir2);
+ if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ {
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir2);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir2);
+ addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+ }
+
+ applyAnisotropicFriction(colObj0,cp.m_lateralFrictionDir1);
+ applyAnisotropicFriction(colObj1,cp.m_lateralFrictionDir1);
+ addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation);
+
+ cp.m_lateralFrictionInitialized = true;
+ }
+
+ } else
+ {
+ addFrictionConstraint(cp.m_lateralFrictionDir1,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation,cp.m_contactMotion1, cp.m_contactCFM1);
+ if ((infoGlobal.m_solverMode & SOLVER_USE_2_FRICTION_DIRECTIONS))
+ addFrictionConstraint(cp.m_lateralFrictionDir2,solverBodyA,solverBodyB,frictionIndex,cp,rel_pos1,rel_pos2,colObj0,colObj1, relaxation, cp.m_contactMotion2, cp.m_contactCFM2);
+ }
+
+ setFrictionConstraintImpulse( solverConstraint, rb0, rb1, cp, infoGlobal);
+
+ }
+ }
+}
+
+
+btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(btCollisionObject** bodies, int numBodies, btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
+{
+ BT_PROFILE("solveGroupCacheFriendlySetup");
+ (void)stackAlloc;
+ (void)debugDrawer;
+
+
+ if (!(numConstraints + numManifolds))
+ {
+ // printf("empty\n");
+ return 0.f;
+ }
+
+ if (infoGlobal.m_splitImpulse)
+ {
+ for (int i = 0; i < numBodies; i++)
+ {
+ btRigidBody* body = btRigidBody::upcast(bodies[i]);
+ if (body)
+ {
+ body->internalGetDeltaLinearVelocity().setZero();
+ body->internalGetDeltaAngularVelocity().setZero();
+ body->internalGetPushVelocity().setZero();
+ body->internalGetTurnVelocity().setZero();
+ }
+ }
+ }
+ else
+ {
+ for (int i = 0; i < numBodies; i++)
+ {
+ btRigidBody* body = btRigidBody::upcast(bodies[i]);
+ if (body)
+ {
+ body->internalGetDeltaLinearVelocity().setZero();
+ body->internalGetDeltaAngularVelocity().setZero();
+ }
+ }
+ }
+
+ if (1)
+ {
+ int j;
+ for (j=0;j<numConstraints;j++)
+ {
+ btTypedConstraint* constraint = constraints[j];
+ constraint->buildJacobian();
+ constraint->internalSetAppliedImpulse(0.0f);
+ }
+ }
+ //btRigidBody* rb0=0,*rb1=0;
+
+ //if (1)
+ {
+ {
+
+ int totalNumRows = 0;
+ int i;
+
+ m_tmpConstraintSizesPool.resize(numConstraints);
+ //calculate the total number of contraint rows
+ for (i=0;i<numConstraints;i++)
+ {
+ btTypedConstraint::btConstraintInfo1& info1 = m_tmpConstraintSizesPool[i];
+ if (constraints[i]->isEnabled())
+ {
+ constraints[i]->getInfo1(&info1);
+ } else
+ {
+ info1.m_numConstraintRows = 0;
+ info1.nub = 0;
+ }
+ totalNumRows += info1.m_numConstraintRows;
+ }
+ m_tmpSolverNonContactConstraintPool.resize(totalNumRows);
+
+
+ ///setup the btSolverConstraints
+ int currentRow = 0;
+
+ for (i=0;i<numConstraints;i++)
+ {
+ const btTypedConstraint::btConstraintInfo1& info1 = m_tmpConstraintSizesPool[i];
+
+ if (info1.m_numConstraintRows)
+ {
+ btAssert(currentRow<totalNumRows);
+
+ btSolverConstraint* currentConstraintRow = &m_tmpSolverNonContactConstraintPool[currentRow];
+ btTypedConstraint* constraint = constraints[i];
+
+
+ btRigidBody& rbA = constraint->getRigidBodyA();
+ btRigidBody& rbB = constraint->getRigidBodyB();
+
+
+ int j;
+ for ( j=0;j<info1.m_numConstraintRows;j++)
+ {
+ memset(&currentConstraintRow[j],0,sizeof(btSolverConstraint));
+ currentConstraintRow[j].m_lowerLimit = -SIMD_INFINITY;
+ currentConstraintRow[j].m_upperLimit = SIMD_INFINITY;
+ currentConstraintRow[j].m_appliedImpulse = 0.f;
+ currentConstraintRow[j].m_appliedPushImpulse = 0.f;
+ currentConstraintRow[j].m_solverBodyA = &rbA;
+ currentConstraintRow[j].m_solverBodyB = &rbB;
+ }
+
+ rbA.internalGetDeltaLinearVelocity().setValue(0.f,0.f,0.f);
+ rbA.internalGetDeltaAngularVelocity().setValue(0.f,0.f,0.f);
+ rbB.internalGetDeltaLinearVelocity().setValue(0.f,0.f,0.f);
+ rbB.internalGetDeltaAngularVelocity().setValue(0.f,0.f,0.f);
+
+
+
+ btTypedConstraint::btConstraintInfo2 info2;
+ info2.fps = 1.f/infoGlobal.m_timeStep;
+ info2.erp = infoGlobal.m_erp;
+ info2.m_J1linearAxis = currentConstraintRow->m_contactNormal;
+ info2.m_J1angularAxis = currentConstraintRow->m_relpos1CrossNormal;
+ info2.m_J2linearAxis = 0;
+ info2.m_J2angularAxis = currentConstraintRow->m_relpos2CrossNormal;
+ info2.rowskip = sizeof(btSolverConstraint)/sizeof(btScalar);//check this
+ ///the size of btSolverConstraint needs be a multiple of btScalar
+ btAssert(info2.rowskip*sizeof(btScalar)== sizeof(btSolverConstraint));
+ info2.m_constraintError = &currentConstraintRow->m_rhs;
+ currentConstraintRow->m_cfm = infoGlobal.m_globalCfm;
+ info2.m_damping = infoGlobal.m_damping;
+ info2.cfm = &currentConstraintRow->m_cfm;
+ info2.m_lowerLimit = &currentConstraintRow->m_lowerLimit;
+ info2.m_upperLimit = &currentConstraintRow->m_upperLimit;
+ info2.m_numIterations = infoGlobal.m_numIterations;
+ constraints[i]->getInfo2(&info2);
+
+ if (currentConstraintRow->m_upperLimit>constraints[i]->getBreakingImpulseThreshold())
+ {
+ currentConstraintRow->m_upperLimit = constraints[i]->getBreakingImpulseThreshold();
+ }
+
+ if (currentConstraintRow->m_lowerLimit<-constraints[i]->getBreakingImpulseThreshold())
+ {
+ currentConstraintRow->m_lowerLimit = -constraints[i]->getBreakingImpulseThreshold();
+ }
+
+
+
+ ///finalize the constraint setup
+ for ( j=0;j<info1.m_numConstraintRows;j++)
+ {
+ btSolverConstraint& solverConstraint = currentConstraintRow[j];
+ solverConstraint.m_originalContactPoint = constraint;
+
+ {
+ const btVector3& ftorqueAxis1 = solverConstraint.m_relpos1CrossNormal;
+ solverConstraint.m_angularComponentA = constraint->getRigidBodyA().getInvInertiaTensorWorld()*ftorqueAxis1*constraint->getRigidBodyA().getAngularFactor();
+ }
+ {
+ const btVector3& ftorqueAxis2 = solverConstraint.m_relpos2CrossNormal;
+ solverConstraint.m_angularComponentB = constraint->getRigidBodyB().getInvInertiaTensorWorld()*ftorqueAxis2*constraint->getRigidBodyB().getAngularFactor();
+ }
+
+ {
+ btVector3 iMJlA = solverConstraint.m_contactNormal*rbA.getInvMass();
+ btVector3 iMJaA = rbA.getInvInertiaTensorWorld()*solverConstraint.m_relpos1CrossNormal;
+ btVector3 iMJlB = solverConstraint.m_contactNormal*rbB.getInvMass();//sign of normal?
+ btVector3 iMJaB = rbB.getInvInertiaTensorWorld()*solverConstraint.m_relpos2CrossNormal;
+
+ btScalar sum = iMJlA.dot(solverConstraint.m_contactNormal);
+ sum += iMJaA.dot(solverConstraint.m_relpos1CrossNormal);
+ sum += iMJlB.dot(solverConstraint.m_contactNormal);
+ sum += iMJaB.dot(solverConstraint.m_relpos2CrossNormal);
+
+ solverConstraint.m_jacDiagABInv = btScalar(1.)/sum;
+ }
+
+
+ ///fix rhs
+ ///todo: add force/torque accelerators
+ {
+ btScalar rel_vel;
+ btScalar vel1Dotn = solverConstraint.m_contactNormal.dot(rbA.getLinearVelocity()) + solverConstraint.m_relpos1CrossNormal.dot(rbA.getAngularVelocity());
+ btScalar vel2Dotn = -solverConstraint.m_contactNormal.dot(rbB.getLinearVelocity()) + solverConstraint.m_relpos2CrossNormal.dot(rbB.getAngularVelocity());
+
+ rel_vel = vel1Dotn+vel2Dotn;
+
+ btScalar restitution = 0.f;
+ btScalar positionalError = solverConstraint.m_rhs;//already filled in by getConstraintInfo2
+ btScalar velocityError = restitution - rel_vel * info2.m_damping;
+ btScalar penetrationImpulse = positionalError*solverConstraint.m_jacDiagABInv;
+ btScalar velocityImpulse = velocityError *solverConstraint.m_jacDiagABInv;
+ solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;
+ solverConstraint.m_appliedImpulse = 0.f;
+
+ }
+ }
+ }
+ currentRow+=m_tmpConstraintSizesPool[i].m_numConstraintRows;
+ }
+ }
+
+ {
+ int i;
+ btPersistentManifold* manifold = 0;
+// btCollisionObject* colObj0=0,*colObj1=0;
+
+
+ for (i=0;i<numManifolds;i++)
+ {
+ manifold = manifoldPtr[i];
+ convertContact(manifold,infoGlobal);
+ }
+ }
+ }
+
+ btContactSolverInfo info = infoGlobal;
+
+
+
+ int numConstraintPool = m_tmpSolverContactConstraintPool.size();
+ int numFrictionPool = m_tmpSolverContactFrictionConstraintPool.size();
+
+ ///@todo: use stack allocator for such temporarily memory, same for solver bodies/constraints
+ m_orderTmpConstraintPool.resize(numConstraintPool);
+ m_orderFrictionConstraintPool.resize(numFrictionPool);
+ {
+ int i;
+ for (i=0;i<numConstraintPool;i++)
+ {
+ m_orderTmpConstraintPool[i] = i;
+ }
+ for (i=0;i<numFrictionPool;i++)
+ {
+ m_orderFrictionConstraintPool[i] = i;
+ }
+ }
+
+ return 0.f;
+
+}
+
+btScalar btSequentialImpulseConstraintSolver::solveSingleIteration(int iteration, btCollisionObject** /*bodies */,int /*numBodies*/,btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* /*debugDrawer*/,btStackAlloc* /*stackAlloc*/)
+{
+
+ int numConstraintPool = m_tmpSolverContactConstraintPool.size();
+ int numFrictionPool = m_tmpSolverContactFrictionConstraintPool.size();
+
+ int j;
+
+ if (infoGlobal.m_solverMode & SOLVER_RANDMIZE_ORDER)
+ {
+ if ((iteration & 7) == 0) {
+ for (j=0; j<numConstraintPool; ++j) {
+ int tmp = m_orderTmpConstraintPool[j];
+ int swapi = btRandInt2(j+1);
+ m_orderTmpConstraintPool[j] = m_orderTmpConstraintPool[swapi];
+ m_orderTmpConstraintPool[swapi] = tmp;
+ }
+
+ for (j=0; j<numFrictionPool; ++j) {
+ int tmp = m_orderFrictionConstraintPool[j];
+ int swapi = btRandInt2(j+1);
+ m_orderFrictionConstraintPool[j] = m_orderFrictionConstraintPool[swapi];
+ m_orderFrictionConstraintPool[swapi] = tmp;
+ }
+ }
+ }
+
+ if (infoGlobal.m_solverMode & SOLVER_SIMD)
+ {
+ ///solve all joint constraints, using SIMD, if available
+ for (j=0;j<m_tmpSolverNonContactConstraintPool.size();j++)
+ {
+ btSolverConstraint& constraint = m_tmpSolverNonContactConstraintPool[j];
+ resolveSingleConstraintRowGenericSIMD(*constraint.m_solverBodyA,*constraint.m_solverBodyB,constraint);
+ }
+
+ for (j=0;j<numConstraints;j++)
+ {
+ constraints[j]->solveConstraintObsolete(constraints[j]->getRigidBodyA(),constraints[j]->getRigidBodyB(),infoGlobal.m_timeStep);
+ }
+
+ ///solve all contact constraints using SIMD, if available
+ int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
+ for (j=0;j<numPoolConstraints;j++)
+ {
+ const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[j]];
+ resolveSingleConstraintRowLowerLimitSIMD(*solveManifold.m_solverBodyA,*solveManifold.m_solverBodyB,solveManifold);
+
+ }
+ ///solve all friction constraints, using SIMD, if available
+ int numFrictionPoolConstraints = m_tmpSolverContactFrictionConstraintPool.size();
+ for (j=0;j<numFrictionPoolConstraints;j++)
+ {
+ btSolverConstraint& solveManifold = m_tmpSolverContactFrictionConstraintPool[m_orderFrictionConstraintPool[j]];
+ btScalar totalImpulse = m_tmpSolverContactConstraintPool[solveManifold.m_frictionIndex].m_appliedImpulse;
+
+ if (totalImpulse>btScalar(0))
+ {
+ solveManifold.m_lowerLimit = -(solveManifold.m_friction*totalImpulse);
+ solveManifold.m_upperLimit = solveManifold.m_friction*totalImpulse;
+
+ resolveSingleConstraintRowGenericSIMD(*solveManifold.m_solverBodyA, *solveManifold.m_solverBodyB,solveManifold);
+ }
+ }
+ } else
+ {
+
+ ///solve all joint constraints
+ for (j=0;j<m_tmpSolverNonContactConstraintPool.size();j++)
+ {
+ btSolverConstraint& constraint = m_tmpSolverNonContactConstraintPool[j];
+ resolveSingleConstraintRowGeneric(*constraint.m_solverBodyA,*constraint.m_solverBodyB,constraint);
+ }
+
+ for (j=0;j<numConstraints;j++)
+ {
+ constraints[j]->solveConstraintObsolete(constraints[j]->getRigidBodyA(),constraints[j]->getRigidBodyB(),infoGlobal.m_timeStep);
+ }
+ ///solve all contact constraints
+ int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
+ for (j=0;j<numPoolConstraints;j++)
+ {
+ const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[j]];
+ resolveSingleConstraintRowLowerLimit(*solveManifold.m_solverBodyA,*solveManifold.m_solverBodyB,solveManifold);
+ }
+ ///solve all friction constraints
+ int numFrictionPoolConstraints = m_tmpSolverContactFrictionConstraintPool.size();
+ for (j=0;j<numFrictionPoolConstraints;j++)
+ {
+ btSolverConstraint& solveManifold = m_tmpSolverContactFrictionConstraintPool[m_orderFrictionConstraintPool[j]];
+ btScalar totalImpulse = m_tmpSolverContactConstraintPool[solveManifold.m_frictionIndex].m_appliedImpulse;
+
+ if (totalImpulse>btScalar(0))
+ {
+ solveManifold.m_lowerLimit = -(solveManifold.m_friction*totalImpulse);
+ solveManifold.m_upperLimit = solveManifold.m_friction*totalImpulse;
+
+ resolveSingleConstraintRowGeneric(*solveManifold.m_solverBodyA,*solveManifold.m_solverBodyB,solveManifold);
+ }
+ }
+ }
+ return 0.f;
+}
+
+
+void btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
+{
+ int iteration;
+ if (infoGlobal.m_splitImpulse)
+ {
+ if (infoGlobal.m_solverMode & SOLVER_SIMD)
+ {
+ for ( iteration = 0;iteration<infoGlobal.m_numIterations;iteration++)
+ {
+ {
+ int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
+ int j;
+ for (j=0;j<numPoolConstraints;j++)
+ {
+ const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[j]];
+
+ resolveSplitPenetrationSIMD(*solveManifold.m_solverBodyA,*solveManifold.m_solverBodyB,solveManifold);
+ }
+ }
+ }
+ }
+ else
+ {
+ for ( iteration = 0;iteration<infoGlobal.m_numIterations;iteration++)
+ {
+ {
+ int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
+ int j;
+ for (j=0;j<numPoolConstraints;j++)
+ {
+ const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[m_orderTmpConstraintPool[j]];
+
+ resolveSplitPenetrationImpulseCacheFriendly(*solveManifold.m_solverBodyA,*solveManifold.m_solverBodyB,solveManifold);
+ }
+ }
+ }
+ }
+ }
+}
+
+btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyIterations(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc)
+{
+ BT_PROFILE("solveGroupCacheFriendlyIterations");
+
+
+ //should traverse the contacts random order...
+ int iteration;
+ {
+ solveGroupCacheFriendlySplitImpulseIterations(bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer,stackAlloc);
+
+ for ( iteration = 0;iteration<infoGlobal.m_numIterations;iteration++)
+ {
+ solveSingleIteration(iteration, bodies ,numBodies,manifoldPtr, numManifolds,constraints,numConstraints,infoGlobal,debugDrawer,stackAlloc);
+ }
+
+ }
+ return 0.f;
+}
+
+btScalar btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish(btCollisionObject** bodies ,int numBodies,btPersistentManifold** /*manifoldPtr*/, int /*numManifolds*/,btTypedConstraint** /*constraints*/,int /* numConstraints*/,const btContactSolverInfo& infoGlobal,btIDebugDraw* /*debugDrawer*/,btStackAlloc* /*stackAlloc*/)
+{
+ int numPoolConstraints = m_tmpSolverContactConstraintPool.size();
+ int i,j;
+
+ for (j=0;j<numPoolConstraints;j++)
+ {
+
+ const btSolverConstraint& solveManifold = m_tmpSolverContactConstraintPool[j];
+ btManifoldPoint* pt = (btManifoldPoint*) solveManifold.m_originalContactPoint;
+ btAssert(pt);
+ pt->m_appliedImpulse = solveManifold.m_appliedImpulse;
+ if (infoGlobal.m_solverMode & SOLVER_USE_FRICTION_WARMSTARTING)
+ {
+ pt->m_appliedImpulseLateral1 = m_tmpSolverContactFrictionConstraintPool[solveManifold.m_frictionIndex].m_appliedImpulse;
+ pt->m_appliedImpulseLateral2 = m_tmpSolverContactFrictionConstraintPool[solveManifold.m_frictionIndex+1].m_appliedImpulse;
+ }
+
+ //do a callback here?
+ }
+
+ numPoolConstraints = m_tmpSolverNonContactConstraintPool.size();
+ for (j=0;j<numPoolConstraints;j++)
+ {
+ const btSolverConstraint& solverConstr = m_tmpSolverNonContactConstraintPool[j];
+ btTypedConstraint* constr = (btTypedConstraint*)solverConstr.m_originalContactPoint;
+ constr->internalSetAppliedImpulse(solverConstr.m_appliedImpulse);
+ if (solverConstr.m_appliedImpulse>constr->getBreakingImpulseThreshold())
+ {
+ constr->setEnabled(false);
+ }
+ }
+
+
+ if (infoGlobal.m_splitImpulse)
+ {
+ for ( i=0;i<numBodies;i++)
+ {
+ btRigidBody* body = btRigidBody::upcast(bodies[i]);
+ if (body)
+ body->internalWritebackVelocity(infoGlobal.m_timeStep);
+ }
+ } else
+ {
+ for ( i=0;i<numBodies;i++)
+ {
+ btRigidBody* body = btRigidBody::upcast(bodies[i]);
+ if (body)
+ body->internalWritebackVelocity();
+ }
+ }
+
+
+ m_tmpSolverContactConstraintPool.resize(0);
+ m_tmpSolverNonContactConstraintPool.resize(0);
+ m_tmpSolverContactFrictionConstraintPool.resize(0);
+
+ return 0.f;
+}
+
+
+
+/// btSequentialImpulseConstraintSolver Sequentially applies impulses
+btScalar btSequentialImpulseConstraintSolver::solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc,btDispatcher* /*dispatcher*/)
+{
+
+ BT_PROFILE("solveGroup");
+ //you need to provide at least some bodies
+ btAssert(bodies);
+ btAssert(numBodies);
+
+ solveGroupCacheFriendlySetup( bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
+
+ solveGroupCacheFriendlyIterations(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
+
+ solveGroupCacheFriendlyFinish(bodies, numBodies, manifoldPtr, numManifolds,constraints, numConstraints,infoGlobal,debugDrawer, stackAlloc);
+
+ return 0.f;
+}
+
+void btSequentialImpulseConstraintSolver::reset()
+{
+ m_btSeed2 = 0;
+}
+
+btRigidBody& btSequentialImpulseConstraintSolver::getFixedBody()
+{
+ static btRigidBody s_fixed(0, 0,0);
+ s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
+ return s_fixed;
+}
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h
new file mode 100644
index 00000000..d738478f
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h
@@ -0,0 +1,128 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H
+#define BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H
+
+#include "btConstraintSolver.h"
+class btIDebugDraw;
+#include "btContactConstraint.h"
+#include "btSolverBody.h"
+#include "btSolverConstraint.h"
+#include "btTypedConstraint.h"
+#include "BulletCollision/NarrowPhaseCollision/btManifoldPoint.h"
+
+///The btSequentialImpulseConstraintSolver is a fast SIMD implementation of the Projected Gauss Seidel (iterative LCP) method.
+class btSequentialImpulseConstraintSolver : public btConstraintSolver
+{
+protected:
+
+ btConstraintArray m_tmpSolverContactConstraintPool;
+ btConstraintArray m_tmpSolverNonContactConstraintPool;
+ btConstraintArray m_tmpSolverContactFrictionConstraintPool;
+ btAlignedObjectArray<int> m_orderTmpConstraintPool;
+ btAlignedObjectArray<int> m_orderFrictionConstraintPool;
+ btAlignedObjectArray<btTypedConstraint::btConstraintInfo1> m_tmpConstraintSizesPool;
+
+ void setupFrictionConstraint( btSolverConstraint& solverConstraint, const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyIdB,
+ btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,
+ btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation,
+ btScalar desiredVelocity=0., btScalar cfmSlip=0.);
+
+ btSolverConstraint& addFrictionConstraint(const btVector3& normalAxis,btRigidBody* solverBodyA,btRigidBody* solverBodyB,int frictionIndex,btManifoldPoint& cp,const btVector3& rel_pos1,const btVector3& rel_pos2,btCollisionObject* colObj0,btCollisionObject* colObj1, btScalar relaxation, btScalar desiredVelocity=0., btScalar cfmSlip=0.);
+
+ void setupContactConstraint(btSolverConstraint& solverConstraint, btCollisionObject* colObj0, btCollisionObject* colObj1, btManifoldPoint& cp,
+ const btContactSolverInfo& infoGlobal, btVector3& vel, btScalar& rel_vel, btScalar& relaxation,
+ btVector3& rel_pos1, btVector3& rel_pos2);
+
+ void setFrictionConstraintImpulse( btSolverConstraint& solverConstraint, btRigidBody* rb0, btRigidBody* rb1,
+ btManifoldPoint& cp, const btContactSolverInfo& infoGlobal);
+
+ ///m_btSeed2 is used for re-arranging the constraint rows. improves convergence/quality of friction
+ unsigned long m_btSeed2;
+
+// void initSolverBody(btSolverBody* solverBody, btCollisionObject* collisionObject);
+ btScalar restitutionCurve(btScalar rel_vel, btScalar restitution);
+
+ void convertContact(btPersistentManifold* manifold,const btContactSolverInfo& infoGlobal);
+
+
+ void resolveSplitPenetrationSIMD(
+ btRigidBody& body1,
+ btRigidBody& body2,
+ const btSolverConstraint& contactConstraint);
+
+ void resolveSplitPenetrationImpulseCacheFriendly(
+ btRigidBody& body1,
+ btRigidBody& body2,
+ const btSolverConstraint& contactConstraint);
+
+ //internal method
+ int getOrInitSolverBody(btCollisionObject& body);
+
+ void resolveSingleConstraintRowGeneric(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& contactConstraint);
+
+ void resolveSingleConstraintRowGenericSIMD(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& contactConstraint);
+
+ void resolveSingleConstraintRowLowerLimit(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& contactConstraint);
+
+ void resolveSingleConstraintRowLowerLimitSIMD(btRigidBody& body1,btRigidBody& body2,const btSolverConstraint& contactConstraint);
+
+protected:
+ static btRigidBody& getFixedBody();
+
+ virtual void solveGroupCacheFriendlySplitImpulseIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+ virtual btScalar solveGroupCacheFriendlyFinish(btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+ btScalar solveSingleIteration(int iteration, btCollisionObject** bodies ,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+
+ virtual btScalar solveGroupCacheFriendlySetup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+ virtual btScalar solveGroupCacheFriendlyIterations(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifoldPtr, int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal,btIDebugDraw* debugDrawer,btStackAlloc* stackAlloc);
+
+
+public:
+
+
+ btSequentialImpulseConstraintSolver();
+ virtual ~btSequentialImpulseConstraintSolver();
+
+ virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher);
+
+
+
+ ///clear internal cached data and reset random seed
+ virtual void reset();
+
+ unsigned long btRand2();
+
+ int btRandInt2 (int n);
+
+ void setRandSeed(unsigned long seed)
+ {
+ m_btSeed2 = seed;
+ }
+ unsigned long getRandSeed() const
+ {
+ return m_btSeed2;
+ }
+
+};
+
+#ifndef BT_PREFER_SIMD
+typedef btSequentialImpulseConstraintSolver btSequentialImpulseConstraintSolverPrefered;
+#endif
+
+
+#endif //BT_SEQUENTIAL_IMPULSE_CONSTRAINT_SOLVER_H
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
new file mode 100755
index 00000000..b69f46da
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
@@ -0,0 +1,857 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/*
+Added by Roman Ponomarev (rponom@gmail.com)
+April 04, 2008
+*/
+
+
+
+#include "btSliderConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+#include <new>
+
+#define USE_OFFSET_FOR_CONSTANT_FRAME true
+
+void btSliderConstraint::initParams()
+{
+ m_lowerLinLimit = btScalar(1.0);
+ m_upperLinLimit = btScalar(-1.0);
+ m_lowerAngLimit = btScalar(0.);
+ m_upperAngLimit = btScalar(0.);
+ m_softnessDirLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ m_restitutionDirLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ m_dampingDirLin = btScalar(0.);
+ m_cfmDirLin = SLIDER_CONSTRAINT_DEF_CFM;
+ m_softnessDirAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ m_restitutionDirAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ m_dampingDirAng = btScalar(0.);
+ m_cfmDirAng = SLIDER_CONSTRAINT_DEF_CFM;
+ m_softnessOrthoLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ m_restitutionOrthoLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ m_dampingOrthoLin = SLIDER_CONSTRAINT_DEF_DAMPING;
+ m_cfmOrthoLin = SLIDER_CONSTRAINT_DEF_CFM;
+ m_softnessOrthoAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ m_restitutionOrthoAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ m_dampingOrthoAng = SLIDER_CONSTRAINT_DEF_DAMPING;
+ m_cfmOrthoAng = SLIDER_CONSTRAINT_DEF_CFM;
+ m_softnessLimLin = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ m_restitutionLimLin = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ m_dampingLimLin = SLIDER_CONSTRAINT_DEF_DAMPING;
+ m_cfmLimLin = SLIDER_CONSTRAINT_DEF_CFM;
+ m_softnessLimAng = SLIDER_CONSTRAINT_DEF_SOFTNESS;
+ m_restitutionLimAng = SLIDER_CONSTRAINT_DEF_RESTITUTION;
+ m_dampingLimAng = SLIDER_CONSTRAINT_DEF_DAMPING;
+ m_cfmLimAng = SLIDER_CONSTRAINT_DEF_CFM;
+
+ m_poweredLinMotor = false;
+ m_targetLinMotorVelocity = btScalar(0.);
+ m_maxLinMotorForce = btScalar(0.);
+ m_accumulatedLinMotorImpulse = btScalar(0.0);
+
+ m_poweredAngMotor = false;
+ m_targetAngMotorVelocity = btScalar(0.);
+ m_maxAngMotorForce = btScalar(0.);
+ m_accumulatedAngMotorImpulse = btScalar(0.0);
+
+ m_flags = 0;
+ m_flags = 0;
+
+ m_useOffsetForConstraintFrame = USE_OFFSET_FOR_CONSTANT_FRAME;
+
+ calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+}
+
+
+
+
+
+btSliderConstraint::btSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB, bool useLinearReferenceFrameA)
+ : btTypedConstraint(SLIDER_CONSTRAINT_TYPE, rbA, rbB),
+ m_useSolveConstraintObsolete(false),
+ m_frameInA(frameInA),
+ m_frameInB(frameInB),
+ m_useLinearReferenceFrameA(useLinearReferenceFrameA)
+{
+ initParams();
+}
+
+
+
+btSliderConstraint::btSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameA)
+ : btTypedConstraint(SLIDER_CONSTRAINT_TYPE, getFixedBody(), rbB),
+ m_useSolveConstraintObsolete(false),
+ m_frameInB(frameInB),
+ m_useLinearReferenceFrameA(useLinearReferenceFrameA)
+{
+ ///not providing rigidbody A means implicitly using worldspace for body A
+ m_frameInA = rbB.getCenterOfMassTransform() * m_frameInB;
+// m_frameInA.getOrigin() = m_rbA.getCenterOfMassTransform()(m_frameInA.getOrigin());
+
+ initParams();
+}
+
+
+
+
+
+
+void btSliderConstraint::getInfo1(btConstraintInfo1* info)
+{
+ if (m_useSolveConstraintObsolete)
+ {
+ info->m_numConstraintRows = 0;
+ info->nub = 0;
+ }
+ else
+ {
+ info->m_numConstraintRows = 4; // Fixed 2 linear + 2 angular
+ info->nub = 2;
+ //prepare constraint
+ calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+ testAngLimits();
+ testLinLimits();
+ if(getSolveLinLimit() || getPoweredLinMotor())
+ {
+ info->m_numConstraintRows++; // limit 3rd linear as well
+ info->nub--;
+ }
+ if(getSolveAngLimit() || getPoweredAngMotor())
+ {
+ info->m_numConstraintRows++; // limit 3rd angular as well
+ info->nub--;
+ }
+ }
+}
+
+void btSliderConstraint::getInfo1NonVirtual(btConstraintInfo1* info)
+{
+
+ info->m_numConstraintRows = 6; // Fixed 2 linear + 2 angular + 1 limit (even if not used)
+ info->nub = 0;
+}
+
+void btSliderConstraint::getInfo2(btConstraintInfo2* info)
+{
+ getInfo2NonVirtual(info,m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform(), m_rbA.getLinearVelocity(),m_rbB.getLinearVelocity(), m_rbA.getInvMass(),m_rbB.getInvMass());
+}
+
+
+
+
+
+
+
+void btSliderConstraint::calculateTransforms(const btTransform& transA,const btTransform& transB)
+{
+ if(m_useLinearReferenceFrameA || (!m_useSolveConstraintObsolete))
+ {
+ m_calculatedTransformA = transA * m_frameInA;
+ m_calculatedTransformB = transB * m_frameInB;
+ }
+ else
+ {
+ m_calculatedTransformA = transB * m_frameInB;
+ m_calculatedTransformB = transA * m_frameInA;
+ }
+ m_realPivotAInW = m_calculatedTransformA.getOrigin();
+ m_realPivotBInW = m_calculatedTransformB.getOrigin();
+ m_sliderAxis = m_calculatedTransformA.getBasis().getColumn(0); // along X
+ if(m_useLinearReferenceFrameA || m_useSolveConstraintObsolete)
+ {
+ m_delta = m_realPivotBInW - m_realPivotAInW;
+ }
+ else
+ {
+ m_delta = m_realPivotAInW - m_realPivotBInW;
+ }
+ m_projPivotInW = m_realPivotAInW + m_sliderAxis.dot(m_delta) * m_sliderAxis;
+ btVector3 normalWorld;
+ int i;
+ //linear part
+ for(i = 0; i < 3; i++)
+ {
+ normalWorld = m_calculatedTransformA.getBasis().getColumn(i);
+ m_depth[i] = m_delta.dot(normalWorld);
+ }
+}
+
+
+
+void btSliderConstraint::testLinLimits(void)
+{
+ m_solveLinLim = false;
+ m_linPos = m_depth[0];
+ if(m_lowerLinLimit <= m_upperLinLimit)
+ {
+ if(m_depth[0] > m_upperLinLimit)
+ {
+ m_depth[0] -= m_upperLinLimit;
+ m_solveLinLim = true;
+ }
+ else if(m_depth[0] < m_lowerLinLimit)
+ {
+ m_depth[0] -= m_lowerLinLimit;
+ m_solveLinLim = true;
+ }
+ else
+ {
+ m_depth[0] = btScalar(0.);
+ }
+ }
+ else
+ {
+ m_depth[0] = btScalar(0.);
+ }
+}
+
+
+
+void btSliderConstraint::testAngLimits(void)
+{
+ m_angDepth = btScalar(0.);
+ m_solveAngLim = false;
+ if(m_lowerAngLimit <= m_upperAngLimit)
+ {
+ const btVector3 axisA0 = m_calculatedTransformA.getBasis().getColumn(1);
+ const btVector3 axisA1 = m_calculatedTransformA.getBasis().getColumn(2);
+ const btVector3 axisB0 = m_calculatedTransformB.getBasis().getColumn(1);
+// btScalar rot = btAtan2Fast(axisB0.dot(axisA1), axisB0.dot(axisA0));
+ btScalar rot = btAtan2(axisB0.dot(axisA1), axisB0.dot(axisA0));
+ rot = btAdjustAngleToLimits(rot, m_lowerAngLimit, m_upperAngLimit);
+ m_angPos = rot;
+ if(rot < m_lowerAngLimit)
+ {
+ m_angDepth = rot - m_lowerAngLimit;
+ m_solveAngLim = true;
+ }
+ else if(rot > m_upperAngLimit)
+ {
+ m_angDepth = rot - m_upperAngLimit;
+ m_solveAngLim = true;
+ }
+ }
+}
+
+btVector3 btSliderConstraint::getAncorInA(void)
+{
+ btVector3 ancorInA;
+ ancorInA = m_realPivotAInW + (m_lowerLinLimit + m_upperLinLimit) * btScalar(0.5) * m_sliderAxis;
+ ancorInA = m_rbA.getCenterOfMassTransform().inverse() * ancorInA;
+ return ancorInA;
+}
+
+
+
+btVector3 btSliderConstraint::getAncorInB(void)
+{
+ btVector3 ancorInB;
+ ancorInB = m_frameInB.getOrigin();
+ return ancorInB;
+}
+
+
+void btSliderConstraint::getInfo2NonVirtual(btConstraintInfo2* info, const btTransform& transA,const btTransform& transB, const btVector3& linVelA,const btVector3& linVelB, btScalar rbAinvMass,btScalar rbBinvMass )
+{
+ const btTransform& trA = getCalculatedTransformA();
+ const btTransform& trB = getCalculatedTransformB();
+
+ btAssert(!m_useSolveConstraintObsolete);
+ int i, s = info->rowskip;
+
+ btScalar signFact = m_useLinearReferenceFrameA ? btScalar(1.0f) : btScalar(-1.0f);
+
+ // difference between frames in WCS
+ btVector3 ofs = trB.getOrigin() - trA.getOrigin();
+ // now get weight factors depending on masses
+ btScalar miA = rbAinvMass;
+ btScalar miB = rbBinvMass;
+ bool hasStaticBody = (miA < SIMD_EPSILON) || (miB < SIMD_EPSILON);
+ btScalar miS = miA + miB;
+ btScalar factA, factB;
+ if(miS > btScalar(0.f))
+ {
+ factA = miB / miS;
+ }
+ else
+ {
+ factA = btScalar(0.5f);
+ }
+ factB = btScalar(1.0f) - factA;
+ btVector3 ax1, p, q;
+ btVector3 ax1A = trA.getBasis().getColumn(0);
+ btVector3 ax1B = trB.getBasis().getColumn(0);
+ if(m_useOffsetForConstraintFrame)
+ {
+ // get the desired direction of slider axis
+ // as weighted sum of X-orthos of frameA and frameB in WCS
+ ax1 = ax1A * factA + ax1B * factB;
+ ax1.normalize();
+ // construct two orthos to slider axis
+ btPlaneSpace1 (ax1, p, q);
+ }
+ else
+ { // old way - use frameA
+ ax1 = trA.getBasis().getColumn(0);
+ // get 2 orthos to slider axis (Y, Z)
+ p = trA.getBasis().getColumn(1);
+ q = trA.getBasis().getColumn(2);
+ }
+ // make rotations around these orthos equal
+ // the slider axis should be the only unconstrained
+ // rotational axis, the angular velocity of the two bodies perpendicular to
+ // the slider axis should be equal. thus the constraint equations are
+ // p*w1 - p*w2 = 0
+ // q*w1 - q*w2 = 0
+ // where p and q are unit vectors normal to the slider axis, and w1 and w2
+ // are the angular velocity vectors of the two bodies.
+ info->m_J1angularAxis[0] = p[0];
+ info->m_J1angularAxis[1] = p[1];
+ info->m_J1angularAxis[2] = p[2];
+ info->m_J1angularAxis[s+0] = q[0];
+ info->m_J1angularAxis[s+1] = q[1];
+ info->m_J1angularAxis[s+2] = q[2];
+
+ info->m_J2angularAxis[0] = -p[0];
+ info->m_J2angularAxis[1] = -p[1];
+ info->m_J2angularAxis[2] = -p[2];
+ info->m_J2angularAxis[s+0] = -q[0];
+ info->m_J2angularAxis[s+1] = -q[1];
+ info->m_J2angularAxis[s+2] = -q[2];
+ // compute the right hand side of the constraint equation. set relative
+ // body velocities along p and q to bring the slider back into alignment.
+ // if ax1A,ax1B are the unit length slider axes as computed from bodyA and
+ // bodyB, we need to rotate both bodies along the axis u = (ax1 x ax2).
+ // if "theta" is the angle between ax1 and ax2, we need an angular velocity
+ // along u to cover angle erp*theta in one step :
+ // |angular_velocity| = angle/time = erp*theta / stepsize
+ // = (erp*fps) * theta
+ // angular_velocity = |angular_velocity| * (ax1 x ax2) / |ax1 x ax2|
+ // = (erp*fps) * theta * (ax1 x ax2) / sin(theta)
+ // ...as ax1 and ax2 are unit length. if theta is smallish,
+ // theta ~= sin(theta), so
+ // angular_velocity = (erp*fps) * (ax1 x ax2)
+ // ax1 x ax2 is in the plane space of ax1, so we project the angular
+ // velocity to p and q to find the right hand side.
+// btScalar k = info->fps * info->erp * getSoftnessOrthoAng();
+ btScalar currERP = (m_flags & BT_SLIDER_FLAGS_ERP_ORTANG) ? m_softnessOrthoAng : m_softnessOrthoAng * info->erp;
+ btScalar k = info->fps * currERP;
+
+ btVector3 u = ax1A.cross(ax1B);
+ info->m_constraintError[0] = k * u.dot(p);
+ info->m_constraintError[s] = k * u.dot(q);
+ if(m_flags & BT_SLIDER_FLAGS_CFM_ORTANG)
+ {
+ info->cfm[0] = m_cfmOrthoAng;
+ info->cfm[s] = m_cfmOrthoAng;
+ }
+
+ int nrow = 1; // last filled row
+ int srow;
+ btScalar limit_err;
+ int limit;
+ int powered;
+
+ // next two rows.
+ // we want: velA + wA x relA == velB + wB x relB ... but this would
+ // result in three equations, so we project along two orthos to the slider axis
+
+ btTransform bodyA_trans = transA;
+ btTransform bodyB_trans = transB;
+ nrow++;
+ int s2 = nrow * s;
+ nrow++;
+ int s3 = nrow * s;
+ btVector3 tmpA(0,0,0), tmpB(0,0,0), relA(0,0,0), relB(0,0,0), c(0,0,0);
+ if(m_useOffsetForConstraintFrame)
+ {
+ // get vector from bodyB to frameB in WCS
+ relB = trB.getOrigin() - bodyB_trans.getOrigin();
+ // get its projection to slider axis
+ btVector3 projB = ax1 * relB.dot(ax1);
+ // get vector directed from bodyB to slider axis (and orthogonal to it)
+ btVector3 orthoB = relB - projB;
+ // same for bodyA
+ relA = trA.getOrigin() - bodyA_trans.getOrigin();
+ btVector3 projA = ax1 * relA.dot(ax1);
+ btVector3 orthoA = relA - projA;
+ // get desired offset between frames A and B along slider axis
+ btScalar sliderOffs = m_linPos - m_depth[0];
+ // desired vector from projection of center of bodyA to projection of center of bodyB to slider axis
+ btVector3 totalDist = projA + ax1 * sliderOffs - projB;
+ // get offset vectors relA and relB
+ relA = orthoA + totalDist * factA;
+ relB = orthoB - totalDist * factB;
+ // now choose average ortho to slider axis
+ p = orthoB * factA + orthoA * factB;
+ btScalar len2 = p.length2();
+ if(len2 > SIMD_EPSILON)
+ {
+ p /= btSqrt(len2);
+ }
+ else
+ {
+ p = trA.getBasis().getColumn(1);
+ }
+ // make one more ortho
+ q = ax1.cross(p);
+ // fill two rows
+ tmpA = relA.cross(p);
+ tmpB = relB.cross(p);
+ for (i=0; i<3; i++) info->m_J1angularAxis[s2+i] = tmpA[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[s2+i] = -tmpB[i];
+ tmpA = relA.cross(q);
+ tmpB = relB.cross(q);
+ if(hasStaticBody && getSolveAngLimit())
+ { // to make constraint between static and dynamic objects more rigid
+ // remove wA (or wB) from equation if angular limit is hit
+ tmpB *= factB;
+ tmpA *= factA;
+ }
+ for (i=0; i<3; i++) info->m_J1angularAxis[s3+i] = tmpA[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[s3+i] = -tmpB[i];
+ for (i=0; i<3; i++) info->m_J1linearAxis[s2+i] = p[i];
+ for (i=0; i<3; i++) info->m_J1linearAxis[s3+i] = q[i];
+ }
+ else
+ { // old way - maybe incorrect if bodies are not on the slider axis
+ // see discussion "Bug in slider constraint" http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=4024&start=0
+ c = bodyB_trans.getOrigin() - bodyA_trans.getOrigin();
+ btVector3 tmp = c.cross(p);
+ for (i=0; i<3; i++) info->m_J1angularAxis[s2+i] = factA*tmp[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[s2+i] = factB*tmp[i];
+ tmp = c.cross(q);
+ for (i=0; i<3; i++) info->m_J1angularAxis[s3+i] = factA*tmp[i];
+ for (i=0; i<3; i++) info->m_J2angularAxis[s3+i] = factB*tmp[i];
+
+ for (i=0; i<3; i++) info->m_J1linearAxis[s2+i] = p[i];
+ for (i=0; i<3; i++) info->m_J1linearAxis[s3+i] = q[i];
+ }
+ // compute two elements of right hand side
+
+ // k = info->fps * info->erp * getSoftnessOrthoLin();
+ currERP = (m_flags & BT_SLIDER_FLAGS_ERP_ORTLIN) ? m_softnessOrthoLin : m_softnessOrthoLin * info->erp;
+ k = info->fps * currERP;
+
+ btScalar rhs = k * p.dot(ofs);
+ info->m_constraintError[s2] = rhs;
+ rhs = k * q.dot(ofs);
+ info->m_constraintError[s3] = rhs;
+ if(m_flags & BT_SLIDER_FLAGS_CFM_ORTLIN)
+ {
+ info->cfm[s2] = m_cfmOrthoLin;
+ info->cfm[s3] = m_cfmOrthoLin;
+ }
+
+
+ // check linear limits
+ limit_err = btScalar(0.0);
+ limit = 0;
+ if(getSolveLinLimit())
+ {
+ limit_err = getLinDepth() * signFact;
+ limit = (limit_err > btScalar(0.0)) ? 2 : 1;
+ }
+ powered = 0;
+ if(getPoweredLinMotor())
+ {
+ powered = 1;
+ }
+ // if the slider has joint limits or motor, add in the extra row
+ if (limit || powered)
+ {
+ nrow++;
+ srow = nrow * info->rowskip;
+ info->m_J1linearAxis[srow+0] = ax1[0];
+ info->m_J1linearAxis[srow+1] = ax1[1];
+ info->m_J1linearAxis[srow+2] = ax1[2];
+ // linear torque decoupling step:
+ //
+ // we have to be careful that the linear constraint forces (+/- ax1) applied to the two bodies
+ // do not create a torque couple. in other words, the points that the
+ // constraint force is applied at must lie along the same ax1 axis.
+ // a torque couple will result in limited slider-jointed free
+ // bodies from gaining angular momentum.
+ if(m_useOffsetForConstraintFrame)
+ {
+ // this is needed only when bodyA and bodyB are both dynamic.
+ if(!hasStaticBody)
+ {
+ tmpA = relA.cross(ax1);
+ tmpB = relB.cross(ax1);
+ info->m_J1angularAxis[srow+0] = tmpA[0];
+ info->m_J1angularAxis[srow+1] = tmpA[1];
+ info->m_J1angularAxis[srow+2] = tmpA[2];
+ info->m_J2angularAxis[srow+0] = -tmpB[0];
+ info->m_J2angularAxis[srow+1] = -tmpB[1];
+ info->m_J2angularAxis[srow+2] = -tmpB[2];
+ }
+ }
+ else
+ { // The old way. May be incorrect if bodies are not on the slider axis
+ btVector3 ltd; // Linear Torque Decoupling vector (a torque)
+ ltd = c.cross(ax1);
+ info->m_J1angularAxis[srow+0] = factA*ltd[0];
+ info->m_J1angularAxis[srow+1] = factA*ltd[1];
+ info->m_J1angularAxis[srow+2] = factA*ltd[2];
+ info->m_J2angularAxis[srow+0] = factB*ltd[0];
+ info->m_J2angularAxis[srow+1] = factB*ltd[1];
+ info->m_J2angularAxis[srow+2] = factB*ltd[2];
+ }
+ // right-hand part
+ btScalar lostop = getLowerLinLimit();
+ btScalar histop = getUpperLinLimit();
+ if(limit && (lostop == histop))
+ { // the joint motor is ineffective
+ powered = 0;
+ }
+ info->m_constraintError[srow] = 0.;
+ info->m_lowerLimit[srow] = 0.;
+ info->m_upperLimit[srow] = 0.;
+ currERP = (m_flags & BT_SLIDER_FLAGS_ERP_LIMLIN) ? m_softnessLimLin : info->erp;
+ if(powered)
+ {
+ if(m_flags & BT_SLIDER_FLAGS_CFM_DIRLIN)
+ {
+ info->cfm[srow] = m_cfmDirLin;
+ }
+ btScalar tag_vel = getTargetLinMotorVelocity();
+ btScalar mot_fact = getMotorFactor(m_linPos, m_lowerLinLimit, m_upperLinLimit, tag_vel, info->fps * currERP);
+ info->m_constraintError[srow] -= signFact * mot_fact * getTargetLinMotorVelocity();
+ info->m_lowerLimit[srow] += -getMaxLinMotorForce() * info->fps;
+ info->m_upperLimit[srow] += getMaxLinMotorForce() * info->fps;
+ }
+ if(limit)
+ {
+ k = info->fps * currERP;
+ info->m_constraintError[srow] += k * limit_err;
+ if(m_flags & BT_SLIDER_FLAGS_CFM_LIMLIN)
+ {
+ info->cfm[srow] = m_cfmLimLin;
+ }
+ if(lostop == histop)
+ { // limited low and high simultaneously
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else if(limit == 1)
+ { // low limit
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = 0;
+ }
+ else
+ { // high limit
+ info->m_lowerLimit[srow] = 0;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ // bounce (we'll use slider parameter abs(1.0 - m_dampingLimLin) for that)
+ btScalar bounce = btFabs(btScalar(1.0) - getDampingLimLin());
+ if(bounce > btScalar(0.0))
+ {
+ btScalar vel = linVelA.dot(ax1);
+ vel -= linVelB.dot(ax1);
+ vel *= signFact;
+ // only apply bounce if the velocity is incoming, and if the
+ // resulting c[] exceeds what we already have.
+ if(limit == 1)
+ { // low limit
+ if(vel < 0)
+ {
+ btScalar newc = -bounce * vel;
+ if (newc > info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ else
+ { // high limit - all those computations are reversed
+ if(vel > 0)
+ {
+ btScalar newc = -bounce * vel;
+ if(newc < info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ }
+ info->m_constraintError[srow] *= getSoftnessLimLin();
+ } // if(limit)
+ } // if linear limit
+ // check angular limits
+ limit_err = btScalar(0.0);
+ limit = 0;
+ if(getSolveAngLimit())
+ {
+ limit_err = getAngDepth();
+ limit = (limit_err > btScalar(0.0)) ? 1 : 2;
+ }
+ // if the slider has joint limits, add in the extra row
+ powered = 0;
+ if(getPoweredAngMotor())
+ {
+ powered = 1;
+ }
+ if(limit || powered)
+ {
+ nrow++;
+ srow = nrow * info->rowskip;
+ info->m_J1angularAxis[srow+0] = ax1[0];
+ info->m_J1angularAxis[srow+1] = ax1[1];
+ info->m_J1angularAxis[srow+2] = ax1[2];
+
+ info->m_J2angularAxis[srow+0] = -ax1[0];
+ info->m_J2angularAxis[srow+1] = -ax1[1];
+ info->m_J2angularAxis[srow+2] = -ax1[2];
+
+ btScalar lostop = getLowerAngLimit();
+ btScalar histop = getUpperAngLimit();
+ if(limit && (lostop == histop))
+ { // the joint motor is ineffective
+ powered = 0;
+ }
+ currERP = (m_flags & BT_SLIDER_FLAGS_ERP_LIMANG) ? m_softnessLimAng : info->erp;
+ if(powered)
+ {
+ if(m_flags & BT_SLIDER_FLAGS_CFM_DIRANG)
+ {
+ info->cfm[srow] = m_cfmDirAng;
+ }
+ btScalar mot_fact = getMotorFactor(m_angPos, m_lowerAngLimit, m_upperAngLimit, getTargetAngMotorVelocity(), info->fps * currERP);
+ info->m_constraintError[srow] = mot_fact * getTargetAngMotorVelocity();
+ info->m_lowerLimit[srow] = -getMaxAngMotorForce() * info->fps;
+ info->m_upperLimit[srow] = getMaxAngMotorForce() * info->fps;
+ }
+ if(limit)
+ {
+ k = info->fps * currERP;
+ info->m_constraintError[srow] += k * limit_err;
+ if(m_flags & BT_SLIDER_FLAGS_CFM_LIMANG)
+ {
+ info->cfm[srow] = m_cfmLimAng;
+ }
+ if(lostop == histop)
+ {
+ // limited low and high simultaneously
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else if(limit == 1)
+ { // low limit
+ info->m_lowerLimit[srow] = 0;
+ info->m_upperLimit[srow] = SIMD_INFINITY;
+ }
+ else
+ { // high limit
+ info->m_lowerLimit[srow] = -SIMD_INFINITY;
+ info->m_upperLimit[srow] = 0;
+ }
+ // bounce (we'll use slider parameter abs(1.0 - m_dampingLimAng) for that)
+ btScalar bounce = btFabs(btScalar(1.0) - getDampingLimAng());
+ if(bounce > btScalar(0.0))
+ {
+ btScalar vel = m_rbA.getAngularVelocity().dot(ax1);
+ vel -= m_rbB.getAngularVelocity().dot(ax1);
+ // only apply bounce if the velocity is incoming, and if the
+ // resulting c[] exceeds what we already have.
+ if(limit == 1)
+ { // low limit
+ if(vel < 0)
+ {
+ btScalar newc = -bounce * vel;
+ if(newc > info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ else
+ { // high limit - all those computations are reversed
+ if(vel > 0)
+ {
+ btScalar newc = -bounce * vel;
+ if(newc < info->m_constraintError[srow])
+ {
+ info->m_constraintError[srow] = newc;
+ }
+ }
+ }
+ }
+ info->m_constraintError[srow] *= getSoftnessLimAng();
+ } // if(limit)
+ } // if angular limit or powered
+}
+
+
+///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+///If no axis is provided, it uses the default axis for this constraint.
+void btSliderConstraint::setParam(int num, btScalar value, int axis)
+{
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ if(axis < 1)
+ {
+ m_softnessLimLin = value;
+ m_flags |= BT_SLIDER_FLAGS_ERP_LIMLIN;
+ }
+ else if(axis < 3)
+ {
+ m_softnessOrthoLin = value;
+ m_flags |= BT_SLIDER_FLAGS_ERP_ORTLIN;
+ }
+ else if(axis == 3)
+ {
+ m_softnessLimAng = value;
+ m_flags |= BT_SLIDER_FLAGS_ERP_LIMANG;
+ }
+ else if(axis < 6)
+ {
+ m_softnessOrthoAng = value;
+ m_flags |= BT_SLIDER_FLAGS_ERP_ORTANG;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ case BT_CONSTRAINT_CFM :
+ if(axis < 1)
+ {
+ m_cfmDirLin = value;
+ m_flags |= BT_SLIDER_FLAGS_CFM_DIRLIN;
+ }
+ else if(axis == 3)
+ {
+ m_cfmDirAng = value;
+ m_flags |= BT_SLIDER_FLAGS_CFM_DIRANG;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ if(axis < 1)
+ {
+ m_cfmLimLin = value;
+ m_flags |= BT_SLIDER_FLAGS_CFM_LIMLIN;
+ }
+ else if(axis < 3)
+ {
+ m_cfmOrthoLin = value;
+ m_flags |= BT_SLIDER_FLAGS_CFM_ORTLIN;
+ }
+ else if(axis == 3)
+ {
+ m_cfmLimAng = value;
+ m_flags |= BT_SLIDER_FLAGS_CFM_LIMANG;
+ }
+ else if(axis < 6)
+ {
+ m_cfmOrthoAng = value;
+ m_flags |= BT_SLIDER_FLAGS_CFM_ORTANG;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ }
+}
+
+///return the local value of parameter
+btScalar btSliderConstraint::getParam(int num, int axis) const
+{
+ btScalar retVal(SIMD_INFINITY);
+ switch(num)
+ {
+ case BT_CONSTRAINT_STOP_ERP :
+ if(axis < 1)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_ERP_LIMLIN);
+ retVal = m_softnessLimLin;
+ }
+ else if(axis < 3)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_ERP_ORTLIN);
+ retVal = m_softnessOrthoLin;
+ }
+ else if(axis == 3)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_ERP_LIMANG);
+ retVal = m_softnessLimAng;
+ }
+ else if(axis < 6)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_ERP_ORTANG);
+ retVal = m_softnessOrthoAng;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ case BT_CONSTRAINT_CFM :
+ if(axis < 1)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_CFM_DIRLIN);
+ retVal = m_cfmDirLin;
+ }
+ else if(axis == 3)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_CFM_DIRANG);
+ retVal = m_cfmDirAng;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ case BT_CONSTRAINT_STOP_CFM :
+ if(axis < 1)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_CFM_LIMLIN);
+ retVal = m_cfmLimLin;
+ }
+ else if(axis < 3)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_CFM_ORTLIN);
+ retVal = m_cfmOrthoLin;
+ }
+ else if(axis == 3)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_CFM_LIMANG);
+ retVal = m_cfmLimAng;
+ }
+ else if(axis < 6)
+ {
+ btAssertConstrParams(m_flags & BT_SLIDER_FLAGS_CFM_ORTANG);
+ retVal = m_cfmOrthoAng;
+ }
+ else
+ {
+ btAssertConstrParams(0);
+ }
+ break;
+ }
+ return retVal;
+}
+
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
new file mode 100755
index 00000000..2edc8d2b
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSliderConstraint.h
@@ -0,0 +1,333 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/*
+Added by Roman Ponomarev (rponom@gmail.com)
+April 04, 2008
+
+TODO:
+ - add clamping od accumulated impulse to improve stability
+ - add conversion for ODE constraint solver
+*/
+
+#ifndef BT_SLIDER_CONSTRAINT_H
+#define BT_SLIDER_CONSTRAINT_H
+
+
+
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+#include "btTypedConstraint.h"
+
+
+
+class btRigidBody;
+
+
+
+#define SLIDER_CONSTRAINT_DEF_SOFTNESS (btScalar(1.0))
+#define SLIDER_CONSTRAINT_DEF_DAMPING (btScalar(1.0))
+#define SLIDER_CONSTRAINT_DEF_RESTITUTION (btScalar(0.7))
+#define SLIDER_CONSTRAINT_DEF_CFM (btScalar(0.f))
+
+
+enum btSliderFlags
+{
+ BT_SLIDER_FLAGS_CFM_DIRLIN = (1 << 0),
+ BT_SLIDER_FLAGS_ERP_DIRLIN = (1 << 1),
+ BT_SLIDER_FLAGS_CFM_DIRANG = (1 << 2),
+ BT_SLIDER_FLAGS_ERP_DIRANG = (1 << 3),
+ BT_SLIDER_FLAGS_CFM_ORTLIN = (1 << 4),
+ BT_SLIDER_FLAGS_ERP_ORTLIN = (1 << 5),
+ BT_SLIDER_FLAGS_CFM_ORTANG = (1 << 6),
+ BT_SLIDER_FLAGS_ERP_ORTANG = (1 << 7),
+ BT_SLIDER_FLAGS_CFM_LIMLIN = (1 << 8),
+ BT_SLIDER_FLAGS_ERP_LIMLIN = (1 << 9),
+ BT_SLIDER_FLAGS_CFM_LIMANG = (1 << 10),
+ BT_SLIDER_FLAGS_ERP_LIMANG = (1 << 11)
+};
+
+
+class btSliderConstraint : public btTypedConstraint
+{
+protected:
+ ///for backwards compatibility during the transition to 'getInfo/getInfo2'
+ bool m_useSolveConstraintObsolete;
+ bool m_useOffsetForConstraintFrame;
+ btTransform m_frameInA;
+ btTransform m_frameInB;
+ // use frameA fo define limits, if true
+ bool m_useLinearReferenceFrameA;
+ // linear limits
+ btScalar m_lowerLinLimit;
+ btScalar m_upperLinLimit;
+ // angular limits
+ btScalar m_lowerAngLimit;
+ btScalar m_upperAngLimit;
+ // softness, restitution and damping for different cases
+ // DirLin - moving inside linear limits
+ // LimLin - hitting linear limit
+ // DirAng - moving inside angular limits
+ // LimAng - hitting angular limit
+ // OrthoLin, OrthoAng - against constraint axis
+ btScalar m_softnessDirLin;
+ btScalar m_restitutionDirLin;
+ btScalar m_dampingDirLin;
+ btScalar m_cfmDirLin;
+
+ btScalar m_softnessDirAng;
+ btScalar m_restitutionDirAng;
+ btScalar m_dampingDirAng;
+ btScalar m_cfmDirAng;
+
+ btScalar m_softnessLimLin;
+ btScalar m_restitutionLimLin;
+ btScalar m_dampingLimLin;
+ btScalar m_cfmLimLin;
+
+ btScalar m_softnessLimAng;
+ btScalar m_restitutionLimAng;
+ btScalar m_dampingLimAng;
+ btScalar m_cfmLimAng;
+
+ btScalar m_softnessOrthoLin;
+ btScalar m_restitutionOrthoLin;
+ btScalar m_dampingOrthoLin;
+ btScalar m_cfmOrthoLin;
+
+ btScalar m_softnessOrthoAng;
+ btScalar m_restitutionOrthoAng;
+ btScalar m_dampingOrthoAng;
+ btScalar m_cfmOrthoAng;
+
+ // for interlal use
+ bool m_solveLinLim;
+ bool m_solveAngLim;
+
+ int m_flags;
+
+ btJacobianEntry m_jacLin[3];
+ btScalar m_jacLinDiagABInv[3];
+
+ btJacobianEntry m_jacAng[3];
+
+ btScalar m_timeStep;
+ btTransform m_calculatedTransformA;
+ btTransform m_calculatedTransformB;
+
+ btVector3 m_sliderAxis;
+ btVector3 m_realPivotAInW;
+ btVector3 m_realPivotBInW;
+ btVector3 m_projPivotInW;
+ btVector3 m_delta;
+ btVector3 m_depth;
+ btVector3 m_relPosA;
+ btVector3 m_relPosB;
+
+ btScalar m_linPos;
+ btScalar m_angPos;
+
+ btScalar m_angDepth;
+ btScalar m_kAngle;
+
+ bool m_poweredLinMotor;
+ btScalar m_targetLinMotorVelocity;
+ btScalar m_maxLinMotorForce;
+ btScalar m_accumulatedLinMotorImpulse;
+
+ bool m_poweredAngMotor;
+ btScalar m_targetAngMotorVelocity;
+ btScalar m_maxAngMotorForce;
+ btScalar m_accumulatedAngMotorImpulse;
+
+ //------------------------
+ void initParams();
+public:
+ // constructors
+ btSliderConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB ,bool useLinearReferenceFrameA);
+ btSliderConstraint(btRigidBody& rbB, const btTransform& frameInB, bool useLinearReferenceFrameA);
+
+ // overrides
+
+ virtual void getInfo1 (btConstraintInfo1* info);
+
+ void getInfo1NonVirtual(btConstraintInfo1* info);
+
+ virtual void getInfo2 (btConstraintInfo2* info);
+
+ void getInfo2NonVirtual(btConstraintInfo2* info, const btTransform& transA, const btTransform& transB,const btVector3& linVelA,const btVector3& linVelB, btScalar rbAinvMass,btScalar rbBinvMass);
+
+
+ // access
+ const btRigidBody& getRigidBodyA() const { return m_rbA; }
+ const btRigidBody& getRigidBodyB() const { return m_rbB; }
+ const btTransform & getCalculatedTransformA() const { return m_calculatedTransformA; }
+ const btTransform & getCalculatedTransformB() const { return m_calculatedTransformB; }
+ const btTransform & getFrameOffsetA() const { return m_frameInA; }
+ const btTransform & getFrameOffsetB() const { return m_frameInB; }
+ btTransform & getFrameOffsetA() { return m_frameInA; }
+ btTransform & getFrameOffsetB() { return m_frameInB; }
+ btScalar getLowerLinLimit() { return m_lowerLinLimit; }
+ void setLowerLinLimit(btScalar lowerLimit) { m_lowerLinLimit = lowerLimit; }
+ btScalar getUpperLinLimit() { return m_upperLinLimit; }
+ void setUpperLinLimit(btScalar upperLimit) { m_upperLinLimit = upperLimit; }
+ btScalar getLowerAngLimit() { return m_lowerAngLimit; }
+ void setLowerAngLimit(btScalar lowerLimit) { m_lowerAngLimit = btNormalizeAngle(lowerLimit); }
+ btScalar getUpperAngLimit() { return m_upperAngLimit; }
+ void setUpperAngLimit(btScalar upperLimit) { m_upperAngLimit = btNormalizeAngle(upperLimit); }
+ bool getUseLinearReferenceFrameA() { return m_useLinearReferenceFrameA; }
+ btScalar getSoftnessDirLin() { return m_softnessDirLin; }
+ btScalar getRestitutionDirLin() { return m_restitutionDirLin; }
+ btScalar getDampingDirLin() { return m_dampingDirLin ; }
+ btScalar getSoftnessDirAng() { return m_softnessDirAng; }
+ btScalar getRestitutionDirAng() { return m_restitutionDirAng; }
+ btScalar getDampingDirAng() { return m_dampingDirAng; }
+ btScalar getSoftnessLimLin() { return m_softnessLimLin; }
+ btScalar getRestitutionLimLin() { return m_restitutionLimLin; }
+ btScalar getDampingLimLin() { return m_dampingLimLin; }
+ btScalar getSoftnessLimAng() { return m_softnessLimAng; }
+ btScalar getRestitutionLimAng() { return m_restitutionLimAng; }
+ btScalar getDampingLimAng() { return m_dampingLimAng; }
+ btScalar getSoftnessOrthoLin() { return m_softnessOrthoLin; }
+ btScalar getRestitutionOrthoLin() { return m_restitutionOrthoLin; }
+ btScalar getDampingOrthoLin() { return m_dampingOrthoLin; }
+ btScalar getSoftnessOrthoAng() { return m_softnessOrthoAng; }
+ btScalar getRestitutionOrthoAng() { return m_restitutionOrthoAng; }
+ btScalar getDampingOrthoAng() { return m_dampingOrthoAng; }
+ void setSoftnessDirLin(btScalar softnessDirLin) { m_softnessDirLin = softnessDirLin; }
+ void setRestitutionDirLin(btScalar restitutionDirLin) { m_restitutionDirLin = restitutionDirLin; }
+ void setDampingDirLin(btScalar dampingDirLin) { m_dampingDirLin = dampingDirLin; }
+ void setSoftnessDirAng(btScalar softnessDirAng) { m_softnessDirAng = softnessDirAng; }
+ void setRestitutionDirAng(btScalar restitutionDirAng) { m_restitutionDirAng = restitutionDirAng; }
+ void setDampingDirAng(btScalar dampingDirAng) { m_dampingDirAng = dampingDirAng; }
+ void setSoftnessLimLin(btScalar softnessLimLin) { m_softnessLimLin = softnessLimLin; }
+ void setRestitutionLimLin(btScalar restitutionLimLin) { m_restitutionLimLin = restitutionLimLin; }
+ void setDampingLimLin(btScalar dampingLimLin) { m_dampingLimLin = dampingLimLin; }
+ void setSoftnessLimAng(btScalar softnessLimAng) { m_softnessLimAng = softnessLimAng; }
+ void setRestitutionLimAng(btScalar restitutionLimAng) { m_restitutionLimAng = restitutionLimAng; }
+ void setDampingLimAng(btScalar dampingLimAng) { m_dampingLimAng = dampingLimAng; }
+ void setSoftnessOrthoLin(btScalar softnessOrthoLin) { m_softnessOrthoLin = softnessOrthoLin; }
+ void setRestitutionOrthoLin(btScalar restitutionOrthoLin) { m_restitutionOrthoLin = restitutionOrthoLin; }
+ void setDampingOrthoLin(btScalar dampingOrthoLin) { m_dampingOrthoLin = dampingOrthoLin; }
+ void setSoftnessOrthoAng(btScalar softnessOrthoAng) { m_softnessOrthoAng = softnessOrthoAng; }
+ void setRestitutionOrthoAng(btScalar restitutionOrthoAng) { m_restitutionOrthoAng = restitutionOrthoAng; }
+ void setDampingOrthoAng(btScalar dampingOrthoAng) { m_dampingOrthoAng = dampingOrthoAng; }
+ void setPoweredLinMotor(bool onOff) { m_poweredLinMotor = onOff; }
+ bool getPoweredLinMotor() { return m_poweredLinMotor; }
+ void setTargetLinMotorVelocity(btScalar targetLinMotorVelocity) { m_targetLinMotorVelocity = targetLinMotorVelocity; }
+ btScalar getTargetLinMotorVelocity() { return m_targetLinMotorVelocity; }
+ void setMaxLinMotorForce(btScalar maxLinMotorForce) { m_maxLinMotorForce = maxLinMotorForce; }
+ btScalar getMaxLinMotorForce() { return m_maxLinMotorForce; }
+ void setPoweredAngMotor(bool onOff) { m_poweredAngMotor = onOff; }
+ bool getPoweredAngMotor() { return m_poweredAngMotor; }
+ void setTargetAngMotorVelocity(btScalar targetAngMotorVelocity) { m_targetAngMotorVelocity = targetAngMotorVelocity; }
+ btScalar getTargetAngMotorVelocity() { return m_targetAngMotorVelocity; }
+ void setMaxAngMotorForce(btScalar maxAngMotorForce) { m_maxAngMotorForce = maxAngMotorForce; }
+ btScalar getMaxAngMotorForce() { return m_maxAngMotorForce; }
+
+ btScalar getLinearPos() const { return m_linPos; }
+ btScalar getAngularPos() const { return m_angPos; }
+
+
+
+ // access for ODE solver
+ bool getSolveLinLimit() { return m_solveLinLim; }
+ btScalar getLinDepth() { return m_depth[0]; }
+ bool getSolveAngLimit() { return m_solveAngLim; }
+ btScalar getAngDepth() { return m_angDepth; }
+ // shared code used by ODE solver
+ void calculateTransforms(const btTransform& transA,const btTransform& transB);
+ void testLinLimits();
+ void testAngLimits();
+ // access for PE Solver
+ btVector3 getAncorInA();
+ btVector3 getAncorInB();
+ // access for UseFrameOffset
+ bool getUseFrameOffset() { return m_useOffsetForConstraintFrame; }
+ void setUseFrameOffset(bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; }
+
+ void setFrames(const btTransform& frameA, const btTransform& frameB)
+ {
+ m_frameInA=frameA;
+ m_frameInB=frameB;
+ calculateTransforms(m_rbA.getCenterOfMassTransform(),m_rbB.getCenterOfMassTransform());
+ buildJacobian();
+ }
+
+
+ ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+ ///If no axis is provided, it uses the default axis for this constraint.
+ virtual void setParam(int num, btScalar value, int axis = -1);
+ ///return the local value of parameter
+ virtual btScalar getParam(int num, int axis = -1) const;
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btSliderConstraintData
+{
+ btTypedConstraintData m_typeConstraintData;
+ btTransformFloatData m_rbAFrame; // constraint axii. Assumes z is hinge axis.
+ btTransformFloatData m_rbBFrame;
+
+ float m_linearUpperLimit;
+ float m_linearLowerLimit;
+
+ float m_angularUpperLimit;
+ float m_angularLowerLimit;
+
+ int m_useLinearReferenceFrameA;
+ int m_useOffsetForConstraintFrame;
+
+};
+
+
+SIMD_FORCE_INLINE int btSliderConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btSliderConstraintData);
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+SIMD_FORCE_INLINE const char* btSliderConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+
+ btSliderConstraintData* sliderData = (btSliderConstraintData*) dataBuffer;
+ btTypedConstraint::serialize(&sliderData->m_typeConstraintData,serializer);
+
+ m_frameInA.serializeFloat(sliderData->m_rbAFrame);
+ m_frameInB.serializeFloat(sliderData->m_rbBFrame);
+
+ sliderData->m_linearUpperLimit = float(m_upperLinLimit);
+ sliderData->m_linearLowerLimit = float(m_lowerLinLimit);
+
+ sliderData->m_angularUpperLimit = float(m_upperAngLimit);
+ sliderData->m_angularLowerLimit = float(m_lowerAngLimit);
+
+ sliderData->m_useLinearReferenceFrameA = m_useLinearReferenceFrameA;
+ sliderData->m_useOffsetForConstraintFrame = m_useOffsetForConstraintFrame;
+
+ return "btSliderConstraintData";
+}
+
+
+
+#endif //BT_SLIDER_CONSTRAINT_H
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp
new file mode 100644
index 00000000..0c7dbd66
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp
@@ -0,0 +1,255 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btSolve2LinearConstraint.h"
+
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btVector3.h"
+#include "btJacobianEntry.h"
+
+
+void btSolve2LinearConstraint::resolveUnilateralPairConstraint(
+ btRigidBody* body1,
+ btRigidBody* body2,
+
+ const btMatrix3x3& world2A,
+ const btMatrix3x3& world2B,
+
+ const btVector3& invInertiaADiag,
+ const btScalar invMassA,
+ const btVector3& linvelA,const btVector3& angvelA,
+ const btVector3& rel_posA1,
+ const btVector3& invInertiaBDiag,
+ const btScalar invMassB,
+ const btVector3& linvelB,const btVector3& angvelB,
+ const btVector3& rel_posA2,
+
+ btScalar depthA, const btVector3& normalA,
+ const btVector3& rel_posB1,const btVector3& rel_posB2,
+ btScalar depthB, const btVector3& normalB,
+ btScalar& imp0,btScalar& imp1)
+{
+ (void)linvelA;
+ (void)linvelB;
+ (void)angvelB;
+ (void)angvelA;
+
+
+
+ imp0 = btScalar(0.);
+ imp1 = btScalar(0.);
+
+ btScalar len = btFabs(normalA.length()) - btScalar(1.);
+ if (btFabs(len) >= SIMD_EPSILON)
+ return;
+
+ btAssert(len < SIMD_EPSILON);
+
+
+ //this jacobian entry could be re-used for all iterations
+ btJacobianEntry jacA(world2A,world2B,rel_posA1,rel_posA2,normalA,invInertiaADiag,invMassA,
+ invInertiaBDiag,invMassB);
+ btJacobianEntry jacB(world2A,world2B,rel_posB1,rel_posB2,normalB,invInertiaADiag,invMassA,
+ invInertiaBDiag,invMassB);
+
+ //const btScalar vel0 = jacA.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB);
+ //const btScalar vel1 = jacB.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB);
+
+ const btScalar vel0 = normalA.dot(body1->getVelocityInLocalPoint(rel_posA1)-body2->getVelocityInLocalPoint(rel_posA1));
+ const btScalar vel1 = normalB.dot(body1->getVelocityInLocalPoint(rel_posB1)-body2->getVelocityInLocalPoint(rel_posB1));
+
+// btScalar penetrationImpulse = (depth*contactTau*timeCorrection) * massTerm;//jacDiagABInv
+ btScalar massTerm = btScalar(1.) / (invMassA + invMassB);
+
+
+ // calculate rhs (or error) terms
+ const btScalar dv0 = depthA * m_tau * massTerm - vel0 * m_damping;
+ const btScalar dv1 = depthB * m_tau * massTerm - vel1 * m_damping;
+
+
+ // dC/dv * dv = -C
+
+ // jacobian * impulse = -error
+ //
+
+ //impulse = jacobianInverse * -error
+
+ // inverting 2x2 symmetric system (offdiagonal are equal!)
+ //
+
+
+ btScalar nonDiag = jacA.getNonDiagonal(jacB,invMassA,invMassB);
+ btScalar invDet = btScalar(1.0) / (jacA.getDiagonal() * jacB.getDiagonal() - nonDiag * nonDiag );
+
+ //imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet;
+ //imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet;
+
+ imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet;
+ imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet;
+
+ //[a b] [d -c]
+ //[c d] inverse = (1 / determinant) * [-b a] where determinant is (ad - bc)
+
+ //[jA nD] * [imp0] = [dv0]
+ //[nD jB] [imp1] [dv1]
+
+}
+
+
+
+void btSolve2LinearConstraint::resolveBilateralPairConstraint(
+ btRigidBody* body1,
+ btRigidBody* body2,
+ const btMatrix3x3& world2A,
+ const btMatrix3x3& world2B,
+
+ const btVector3& invInertiaADiag,
+ const btScalar invMassA,
+ const btVector3& linvelA,const btVector3& angvelA,
+ const btVector3& rel_posA1,
+ const btVector3& invInertiaBDiag,
+ const btScalar invMassB,
+ const btVector3& linvelB,const btVector3& angvelB,
+ const btVector3& rel_posA2,
+
+ btScalar depthA, const btVector3& normalA,
+ const btVector3& rel_posB1,const btVector3& rel_posB2,
+ btScalar depthB, const btVector3& normalB,
+ btScalar& imp0,btScalar& imp1)
+{
+
+ (void)linvelA;
+ (void)linvelB;
+ (void)angvelA;
+ (void)angvelB;
+
+
+
+ imp0 = btScalar(0.);
+ imp1 = btScalar(0.);
+
+ btScalar len = btFabs(normalA.length()) - btScalar(1.);
+ if (btFabs(len) >= SIMD_EPSILON)
+ return;
+
+ btAssert(len < SIMD_EPSILON);
+
+
+ //this jacobian entry could be re-used for all iterations
+ btJacobianEntry jacA(world2A,world2B,rel_posA1,rel_posA2,normalA,invInertiaADiag,invMassA,
+ invInertiaBDiag,invMassB);
+ btJacobianEntry jacB(world2A,world2B,rel_posB1,rel_posB2,normalB,invInertiaADiag,invMassA,
+ invInertiaBDiag,invMassB);
+
+ //const btScalar vel0 = jacA.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB);
+ //const btScalar vel1 = jacB.getRelativeVelocity(linvelA,angvelA,linvelB,angvelB);
+
+ const btScalar vel0 = normalA.dot(body1->getVelocityInLocalPoint(rel_posA1)-body2->getVelocityInLocalPoint(rel_posA1));
+ const btScalar vel1 = normalB.dot(body1->getVelocityInLocalPoint(rel_posB1)-body2->getVelocityInLocalPoint(rel_posB1));
+
+ // calculate rhs (or error) terms
+ const btScalar dv0 = depthA * m_tau - vel0 * m_damping;
+ const btScalar dv1 = depthB * m_tau - vel1 * m_damping;
+
+ // dC/dv * dv = -C
+
+ // jacobian * impulse = -error
+ //
+
+ //impulse = jacobianInverse * -error
+
+ // inverting 2x2 symmetric system (offdiagonal are equal!)
+ //
+
+
+ btScalar nonDiag = jacA.getNonDiagonal(jacB,invMassA,invMassB);
+ btScalar invDet = btScalar(1.0) / (jacA.getDiagonal() * jacB.getDiagonal() - nonDiag * nonDiag );
+
+ //imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet;
+ //imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet;
+
+ imp0 = dv0 * jacA.getDiagonal() * invDet + dv1 * -nonDiag * invDet;
+ imp1 = dv1 * jacB.getDiagonal() * invDet + dv0 * - nonDiag * invDet;
+
+ //[a b] [d -c]
+ //[c d] inverse = (1 / determinant) * [-b a] where determinant is (ad - bc)
+
+ //[jA nD] * [imp0] = [dv0]
+ //[nD jB] [imp1] [dv1]
+
+ if ( imp0 > btScalar(0.0))
+ {
+ if ( imp1 > btScalar(0.0) )
+ {
+ //both positive
+ }
+ else
+ {
+ imp1 = btScalar(0.);
+
+ // now imp0>0 imp1<0
+ imp0 = dv0 / jacA.getDiagonal();
+ if ( imp0 > btScalar(0.0) )
+ {
+ } else
+ {
+ imp0 = btScalar(0.);
+ }
+ }
+ }
+ else
+ {
+ imp0 = btScalar(0.);
+
+ imp1 = dv1 / jacB.getDiagonal();
+ if ( imp1 <= btScalar(0.0) )
+ {
+ imp1 = btScalar(0.);
+ // now imp0>0 imp1<0
+ imp0 = dv0 / jacA.getDiagonal();
+ if ( imp0 > btScalar(0.0) )
+ {
+ } else
+ {
+ imp0 = btScalar(0.);
+ }
+ } else
+ {
+ }
+ }
+}
+
+
+/*
+void btSolve2LinearConstraint::resolveAngularConstraint( const btMatrix3x3& invInertiaAWS,
+ const btScalar invMassA,
+ const btVector3& linvelA,const btVector3& angvelA,
+ const btVector3& rel_posA1,
+ const btMatrix3x3& invInertiaBWS,
+ const btScalar invMassB,
+ const btVector3& linvelB,const btVector3& angvelB,
+ const btVector3& rel_posA2,
+
+ btScalar depthA, const btVector3& normalA,
+ const btVector3& rel_posB1,const btVector3& rel_posB2,
+ btScalar depthB, const btVector3& normalB,
+ btScalar& imp0,btScalar& imp1)
+{
+
+}
+*/
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h
new file mode 100644
index 00000000..e8bfabf8
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h
@@ -0,0 +1,107 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOLVE_2LINEAR_CONSTRAINT_H
+#define BT_SOLVE_2LINEAR_CONSTRAINT_H
+
+#include "LinearMath/btMatrix3x3.h"
+#include "LinearMath/btVector3.h"
+
+
+class btRigidBody;
+
+
+
+/// constraint class used for lateral tyre friction.
+class btSolve2LinearConstraint
+{
+ btScalar m_tau;
+ btScalar m_damping;
+
+public:
+
+ btSolve2LinearConstraint(btScalar tau,btScalar damping)
+ {
+ m_tau = tau;
+ m_damping = damping;
+ }
+ //
+ // solve unilateral constraint (equality, direct method)
+ //
+ void resolveUnilateralPairConstraint(
+ btRigidBody* body0,
+ btRigidBody* body1,
+
+ const btMatrix3x3& world2A,
+ const btMatrix3x3& world2B,
+
+ const btVector3& invInertiaADiag,
+ const btScalar invMassA,
+ const btVector3& linvelA,const btVector3& angvelA,
+ const btVector3& rel_posA1,
+ const btVector3& invInertiaBDiag,
+ const btScalar invMassB,
+ const btVector3& linvelB,const btVector3& angvelB,
+ const btVector3& rel_posA2,
+
+ btScalar depthA, const btVector3& normalA,
+ const btVector3& rel_posB1,const btVector3& rel_posB2,
+ btScalar depthB, const btVector3& normalB,
+ btScalar& imp0,btScalar& imp1);
+
+
+ //
+ // solving 2x2 lcp problem (inequality, direct solution )
+ //
+ void resolveBilateralPairConstraint(
+ btRigidBody* body0,
+ btRigidBody* body1,
+ const btMatrix3x3& world2A,
+ const btMatrix3x3& world2B,
+
+ const btVector3& invInertiaADiag,
+ const btScalar invMassA,
+ const btVector3& linvelA,const btVector3& angvelA,
+ const btVector3& rel_posA1,
+ const btVector3& invInertiaBDiag,
+ const btScalar invMassB,
+ const btVector3& linvelB,const btVector3& angvelB,
+ const btVector3& rel_posA2,
+
+ btScalar depthA, const btVector3& normalA,
+ const btVector3& rel_posB1,const btVector3& rel_posB2,
+ btScalar depthB, const btVector3& normalB,
+ btScalar& imp0,btScalar& imp1);
+
+/*
+ void resolveAngularConstraint( const btMatrix3x3& invInertiaAWS,
+ const btScalar invMassA,
+ const btVector3& linvelA,const btVector3& angvelA,
+ const btVector3& rel_posA1,
+ const btMatrix3x3& invInertiaBWS,
+ const btScalar invMassB,
+ const btVector3& linvelB,const btVector3& angvelB,
+ const btVector3& rel_posA2,
+
+ btScalar depthA, const btVector3& normalA,
+ const btVector3& rel_posB1,const btVector3& rel_posB2,
+ btScalar depthB, const btVector3& normalB,
+ btScalar& imp0,btScalar& imp1);
+
+*/
+
+};
+
+#endif //BT_SOLVE_2LINEAR_CONSTRAINT_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverBody.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverBody.h
new file mode 100644
index 00000000..8de51581
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverBody.h
@@ -0,0 +1,191 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOLVER_BODY_H
+#define BT_SOLVER_BODY_H
+
+class btRigidBody;
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btAlignedAllocator.h"
+#include "LinearMath/btTransformUtil.h"
+
+///Until we get other contributions, only use SIMD on Windows, when using Visual Studio 2008 or later, and not double precision
+#ifdef BT_USE_SSE
+#define USE_SIMD 1
+#endif //
+
+
+#ifdef USE_SIMD
+
+struct btSimdScalar
+{
+ SIMD_FORCE_INLINE btSimdScalar()
+ {
+
+ }
+
+ SIMD_FORCE_INLINE btSimdScalar(float fl)
+ :m_vec128 (_mm_set1_ps(fl))
+ {
+ }
+
+ SIMD_FORCE_INLINE btSimdScalar(__m128 v128)
+ :m_vec128(v128)
+ {
+ }
+ union
+ {
+ __m128 m_vec128;
+ float m_floats[4];
+ int m_ints[4];
+ btScalar m_unusedPadding;
+ };
+ SIMD_FORCE_INLINE __m128 get128()
+ {
+ return m_vec128;
+ }
+
+ SIMD_FORCE_INLINE const __m128 get128() const
+ {
+ return m_vec128;
+ }
+
+ SIMD_FORCE_INLINE void set128(__m128 v128)
+ {
+ m_vec128 = v128;
+ }
+
+ SIMD_FORCE_INLINE operator __m128()
+ {
+ return m_vec128;
+ }
+ SIMD_FORCE_INLINE operator const __m128() const
+ {
+ return m_vec128;
+ }
+
+ SIMD_FORCE_INLINE operator float() const
+ {
+ return m_floats[0];
+ }
+
+};
+
+///@brief Return the elementwise product of two btSimdScalar
+SIMD_FORCE_INLINE btSimdScalar
+operator*(const btSimdScalar& v1, const btSimdScalar& v2)
+{
+ return btSimdScalar(_mm_mul_ps(v1.get128(),v2.get128()));
+}
+
+///@brief Return the elementwise product of two btSimdScalar
+SIMD_FORCE_INLINE btSimdScalar
+operator+(const btSimdScalar& v1, const btSimdScalar& v2)
+{
+ return btSimdScalar(_mm_add_ps(v1.get128(),v2.get128()));
+}
+
+
+#else
+#define btSimdScalar btScalar
+#endif
+
+///The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packed to increase cache coherence/performance.
+ATTRIBUTE_ALIGNED64 (struct) btSolverBodyObsolete
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+ btVector3 m_deltaLinearVelocity;
+ btVector3 m_deltaAngularVelocity;
+ btVector3 m_angularFactor;
+ btVector3 m_invMass;
+ btRigidBody* m_originalBody;
+ btVector3 m_pushVelocity;
+ btVector3 m_turnVelocity;
+
+
+ SIMD_FORCE_INLINE void getVelocityInLocalPointObsolete(const btVector3& rel_pos, btVector3& velocity ) const
+ {
+ if (m_originalBody)
+ velocity = m_originalBody->getLinearVelocity()+m_deltaLinearVelocity + (m_originalBody->getAngularVelocity()+m_deltaAngularVelocity).cross(rel_pos);
+ else
+ velocity.setValue(0,0,0);
+ }
+
+ SIMD_FORCE_INLINE void getAngularVelocity(btVector3& angVel) const
+ {
+ if (m_originalBody)
+ angVel = m_originalBody->getAngularVelocity()+m_deltaAngularVelocity;
+ else
+ angVel.setValue(0,0,0);
+ }
+
+
+ //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position
+ SIMD_FORCE_INLINE void applyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,const btScalar impulseMagnitude)
+ {
+ //if (m_invMass)
+ {
+ m_deltaLinearVelocity += linearComponent*impulseMagnitude;
+ m_deltaAngularVelocity += angularComponent*(impulseMagnitude*m_angularFactor);
+ }
+ }
+
+ SIMD_FORCE_INLINE void internalApplyPushImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude)
+ {
+ if (m_originalBody)
+ {
+ m_pushVelocity += linearComponent*impulseMagnitude;
+ m_turnVelocity += angularComponent*(impulseMagnitude*m_angularFactor);
+ }
+ }
+
+ void writebackVelocity()
+ {
+ if (m_originalBody)
+ {
+ m_originalBody->setLinearVelocity(m_originalBody->getLinearVelocity()+ m_deltaLinearVelocity);
+ m_originalBody->setAngularVelocity(m_originalBody->getAngularVelocity()+m_deltaAngularVelocity);
+
+ //m_originalBody->setCompanionId(-1);
+ }
+ }
+
+
+ void writebackVelocity(btScalar timeStep)
+ {
+ (void) timeStep;
+ if (m_originalBody)
+ {
+ m_originalBody->setLinearVelocity(m_originalBody->getLinearVelocity()+ m_deltaLinearVelocity);
+ m_originalBody->setAngularVelocity(m_originalBody->getAngularVelocity()+m_deltaAngularVelocity);
+
+ //correct the position/orientation based on push/turn recovery
+ btTransform newTransform;
+ btTransformUtil::integrateTransform(m_originalBody->getWorldTransform(),m_pushVelocity,m_turnVelocity,timeStep,newTransform);
+ m_originalBody->setWorldTransform(newTransform);
+
+ //m_originalBody->setCompanionId(-1);
+ }
+ }
+
+
+
+};
+
+#endif //BT_SOLVER_BODY_H
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
new file mode 100644
index 00000000..79e45a43
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btSolverConstraint.h
@@ -0,0 +1,96 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOLVER_CONSTRAINT_H
+#define BT_SOLVER_CONSTRAINT_H
+
+class btRigidBody;
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "btJacobianEntry.h"
+
+//#define NO_FRICTION_TANGENTIALS 1
+#include "btSolverBody.h"
+
+
+///1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and friction constraints.
+ATTRIBUTE_ALIGNED64 (struct) btSolverConstraint
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ btVector3 m_relpos1CrossNormal;
+ btVector3 m_contactNormal;
+
+ btVector3 m_relpos2CrossNormal;
+ //btVector3 m_contactNormal2;//usually m_contactNormal2 == -m_contactNormal
+
+ btVector3 m_angularComponentA;
+ btVector3 m_angularComponentB;
+
+ mutable btSimdScalar m_appliedPushImpulse;
+ mutable btSimdScalar m_appliedImpulse;
+
+
+ btScalar m_friction;
+ btScalar m_jacDiagABInv;
+ union
+ {
+ int m_numConsecutiveRowsPerKernel;
+ btScalar m_unusedPadding0;
+ };
+
+ union
+ {
+ int m_frictionIndex;
+ btScalar m_unusedPadding1;
+ };
+ union
+ {
+ btRigidBody* m_solverBodyA;
+ int m_companionIdA;
+ };
+ union
+ {
+ btRigidBody* m_solverBodyB;
+ int m_companionIdB;
+ };
+
+ union
+ {
+ void* m_originalContactPoint;
+ btScalar m_unusedPadding4;
+ };
+
+ btScalar m_rhs;
+ btScalar m_cfm;
+ btScalar m_lowerLimit;
+ btScalar m_upperLimit;
+
+ btScalar m_rhsPenetration;
+
+ enum btSolverConstraintType
+ {
+ BT_SOLVER_CONTACT_1D = 0,
+ BT_SOLVER_FRICTION_1D
+ };
+};
+
+typedef btAlignedObjectArray<btSolverConstraint> btConstraintArray;
+
+
+#endif //BT_SOLVER_CONSTRAINT_H
+
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
new file mode 100644
index 00000000..fb77b1c5
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
@@ -0,0 +1,214 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btTypedConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btSerializer.h"
+
+
+#define DEFAULT_DEBUGDRAW_SIZE btScalar(0.3f)
+
+btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA)
+:btTypedObject(type),
+m_userConstraintType(-1),
+m_userConstraintId(-1),
+m_needsFeedback(false),
+m_rbA(rbA),
+m_rbB(getFixedBody()),
+m_appliedImpulse(btScalar(0.)),
+m_dbgDrawSize(DEFAULT_DEBUGDRAW_SIZE),
+m_breakingImpulseThreshold(SIMD_INFINITY),
+m_isEnabled(true)
+{
+}
+
+
+btTypedConstraint::btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB)
+:btTypedObject(type),
+m_userConstraintType(-1),
+m_userConstraintId(-1),
+m_needsFeedback(false),
+m_rbA(rbA),
+m_rbB(rbB),
+m_appliedImpulse(btScalar(0.)),
+m_dbgDrawSize(DEFAULT_DEBUGDRAW_SIZE),
+m_breakingImpulseThreshold(SIMD_INFINITY),
+m_isEnabled(true)
+{
+}
+
+
+
+
+btScalar btTypedConstraint::getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact)
+{
+ if(lowLim > uppLim)
+ {
+ return btScalar(1.0f);
+ }
+ else if(lowLim == uppLim)
+ {
+ return btScalar(0.0f);
+ }
+ btScalar lim_fact = btScalar(1.0f);
+ btScalar delta_max = vel / timeFact;
+ if(delta_max < btScalar(0.0f))
+ {
+ if((pos >= lowLim) && (pos < (lowLim - delta_max)))
+ {
+ lim_fact = (lowLim - pos) / delta_max;
+ }
+ else if(pos < lowLim)
+ {
+ lim_fact = btScalar(0.0f);
+ }
+ else
+ {
+ lim_fact = btScalar(1.0f);
+ }
+ }
+ else if(delta_max > btScalar(0.0f))
+ {
+ if((pos <= uppLim) && (pos > (uppLim - delta_max)))
+ {
+ lim_fact = (uppLim - pos) / delta_max;
+ }
+ else if(pos > uppLim)
+ {
+ lim_fact = btScalar(0.0f);
+ }
+ else
+ {
+ lim_fact = btScalar(1.0f);
+ }
+ }
+ else
+ {
+ lim_fact = btScalar(0.0f);
+ }
+ return lim_fact;
+}
+
+///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btTypedConstraint::serialize(void* dataBuffer, btSerializer* serializer) const
+{
+ btTypedConstraintData* tcd = (btTypedConstraintData*) dataBuffer;
+
+ tcd->m_rbA = (btRigidBodyData*)serializer->getUniquePointer(&m_rbA);
+ tcd->m_rbB = (btRigidBodyData*)serializer->getUniquePointer(&m_rbB);
+ char* name = (char*) serializer->findNameForPointer(this);
+ tcd->m_name = (char*)serializer->getUniquePointer(name);
+ if (tcd->m_name)
+ {
+ serializer->serializeName(name);
+ }
+
+ tcd->m_objectType = m_objectType;
+ tcd->m_needsFeedback = m_needsFeedback;
+ tcd->m_userConstraintId =m_userConstraintId;
+ tcd->m_userConstraintType =m_userConstraintType;
+
+ tcd->m_appliedImpulse = float(m_appliedImpulse);
+ tcd->m_dbgDrawSize = float(m_dbgDrawSize );
+
+ tcd->m_disableCollisionsBetweenLinkedBodies = false;
+
+ int i;
+ for (i=0;i<m_rbA.getNumConstraintRefs();i++)
+ if (m_rbA.getConstraintRef(i) == this)
+ tcd->m_disableCollisionsBetweenLinkedBodies = true;
+ for (i=0;i<m_rbB.getNumConstraintRefs();i++)
+ if (m_rbB.getConstraintRef(i) == this)
+ tcd->m_disableCollisionsBetweenLinkedBodies = true;
+
+ return "btTypedConstraintData";
+}
+
+btRigidBody& btTypedConstraint::getFixedBody()
+{
+ static btRigidBody s_fixed(0, 0,0);
+ s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
+ return s_fixed;
+}
+
+
+void btAngularLimit::set(btScalar low, btScalar high, btScalar _softness, btScalar _biasFactor, btScalar _relaxationFactor)
+{
+ m_halfRange = (high - low) / 2.0f;
+ m_center = btNormalizeAngle(low + m_halfRange);
+ m_softness = _softness;
+ m_biasFactor = _biasFactor;
+ m_relaxationFactor = _relaxationFactor;
+}
+
+void btAngularLimit::test(const btScalar angle)
+{
+ m_correction = 0.0f;
+ m_sign = 0.0f;
+ m_solveLimit = false;
+
+ if (m_halfRange >= 0.0f)
+ {
+ btScalar deviation = btNormalizeAngle(angle - m_center);
+ if (deviation < -m_halfRange)
+ {
+ m_solveLimit = true;
+ m_correction = - (deviation + m_halfRange);
+ m_sign = +1.0f;
+ }
+ else if (deviation > m_halfRange)
+ {
+ m_solveLimit = true;
+ m_correction = m_halfRange - deviation;
+ m_sign = -1.0f;
+ }
+ }
+}
+
+
+btScalar btAngularLimit::getError() const
+{
+ return m_correction * m_sign;
+}
+
+void btAngularLimit::fit(btScalar& angle) const
+{
+ if (m_halfRange > 0.0f)
+ {
+ btScalar relativeAngle = btNormalizeAngle(angle - m_center);
+ if (!btEqual(relativeAngle, m_halfRange))
+ {
+ if (relativeAngle > 0.0f)
+ {
+ angle = getHigh();
+ }
+ else
+ {
+ angle = getLow();
+ }
+ }
+ }
+}
+
+btScalar btAngularLimit::getLow() const
+{
+ return btNormalizeAngle(m_center - m_halfRange);
+}
+
+btScalar btAngularLimit::getHigh() const
+{
+ return btNormalizeAngle(m_center + m_halfRange);
+}
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h
new file mode 100644
index 00000000..20df8e5b
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btTypedConstraint.h
@@ -0,0 +1,436 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2010 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_TYPED_CONSTRAINT_H
+#define BT_TYPED_CONSTRAINT_H
+
+class btRigidBody;
+#include "LinearMath/btScalar.h"
+#include "btSolverConstraint.h"
+
+class btSerializer;
+
+//Don't change any of the existing enum values, so add enum types at the end for serialization compatibility
+enum btTypedConstraintType
+{
+ POINT2POINT_CONSTRAINT_TYPE=3,
+ HINGE_CONSTRAINT_TYPE,
+ CONETWIST_CONSTRAINT_TYPE,
+ D6_CONSTRAINT_TYPE,
+ SLIDER_CONSTRAINT_TYPE,
+ CONTACT_CONSTRAINT_TYPE,
+ D6_SPRING_CONSTRAINT_TYPE,
+ MAX_CONSTRAINT_TYPE
+};
+
+
+enum btConstraintParams
+{
+ BT_CONSTRAINT_ERP=1,
+ BT_CONSTRAINT_STOP_ERP,
+ BT_CONSTRAINT_CFM,
+ BT_CONSTRAINT_STOP_CFM
+};
+
+#if 1
+ #define btAssertConstrParams(_par) btAssert(_par)
+#else
+ #define btAssertConstrParams(_par)
+#endif
+
+
+///TypedConstraint is the baseclass for Bullet constraints and vehicles
+class btTypedConstraint : public btTypedObject
+{
+ int m_userConstraintType;
+
+ union
+ {
+ int m_userConstraintId;
+ void* m_userConstraintPtr;
+ };
+
+ btScalar m_breakingImpulseThreshold;
+ bool m_isEnabled;
+
+
+ bool m_needsFeedback;
+
+ btTypedConstraint& operator=(btTypedConstraint& other)
+ {
+ btAssert(0);
+ (void) other;
+ return *this;
+ }
+
+protected:
+ btRigidBody& m_rbA;
+ btRigidBody& m_rbB;
+ btScalar m_appliedImpulse;
+ btScalar m_dbgDrawSize;
+
+ ///internal method used by the constraint solver, don't use them directly
+ btScalar getMotorFactor(btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact);
+
+ static btRigidBody& getFixedBody();
+
+public:
+
+ virtual ~btTypedConstraint() {};
+ btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA);
+ btTypedConstraint(btTypedConstraintType type, btRigidBody& rbA,btRigidBody& rbB);
+
+ struct btConstraintInfo1 {
+ int m_numConstraintRows,nub;
+ };
+
+ struct btConstraintInfo2 {
+ // integrator parameters: frames per second (1/stepsize), default error
+ // reduction parameter (0..1).
+ btScalar fps,erp;
+
+ // for the first and second body, pointers to two (linear and angular)
+ // n*3 jacobian sub matrices, stored by rows. these matrices will have
+ // been initialized to 0 on entry. if the second body is zero then the
+ // J2xx pointers may be 0.
+ btScalar *m_J1linearAxis,*m_J1angularAxis,*m_J2linearAxis,*m_J2angularAxis;
+
+ // elements to jump from one row to the next in J's
+ int rowskip;
+
+ // right hand sides of the equation J*v = c + cfm * lambda. cfm is the
+ // "constraint force mixing" vector. c is set to zero on entry, cfm is
+ // set to a constant value (typically very small or zero) value on entry.
+ btScalar *m_constraintError,*cfm;
+
+ // lo and hi limits for variables (set to -/+ infinity on entry).
+ btScalar *m_lowerLimit,*m_upperLimit;
+
+ // findex vector for variables. see the LCP solver interface for a
+ // description of what this does. this is set to -1 on entry.
+ // note that the returned indexes are relative to the first index of
+ // the constraint.
+ int *findex;
+ // number of solver iterations
+ int m_numIterations;
+
+ //damping of the velocity
+ btScalar m_damping;
+ };
+
+ ///internal method used by the constraint solver, don't use them directly
+ virtual void buildJacobian() {};
+
+ ///internal method used by the constraint solver, don't use them directly
+ virtual void setupSolverConstraint(btConstraintArray& ca, int solverBodyA,int solverBodyB, btScalar timeStep)
+ {
+ (void)ca;
+ (void)solverBodyA;
+ (void)solverBodyB;
+ (void)timeStep;
+ }
+
+ ///internal method used by the constraint solver, don't use them directly
+ virtual void getInfo1 (btConstraintInfo1* info)=0;
+
+ ///internal method used by the constraint solver, don't use them directly
+ virtual void getInfo2 (btConstraintInfo2* info)=0;
+
+ ///internal method used by the constraint solver, don't use them directly
+ void internalSetAppliedImpulse(btScalar appliedImpulse)
+ {
+ m_appliedImpulse = appliedImpulse;
+ }
+ ///internal method used by the constraint solver, don't use them directly
+ btScalar internalGetAppliedImpulse()
+ {
+ return m_appliedImpulse;
+ }
+
+
+ btScalar getBreakingImpulseThreshold() const
+ {
+ return m_breakingImpulseThreshold;
+ }
+
+ void setBreakingImpulseThreshold(btScalar threshold)
+ {
+ m_breakingImpulseThreshold = threshold;
+ }
+
+ bool isEnabled() const
+ {
+ return m_isEnabled;
+ }
+
+ void setEnabled(bool enabled)
+ {
+ m_isEnabled=enabled;
+ }
+
+
+ ///internal method used by the constraint solver, don't use them directly
+ virtual void solveConstraintObsolete(btRigidBody& /*bodyA*/,btRigidBody& /*bodyB*/,btScalar /*timeStep*/) {};
+
+
+ const btRigidBody& getRigidBodyA() const
+ {
+ return m_rbA;
+ }
+ const btRigidBody& getRigidBodyB() const
+ {
+ return m_rbB;
+ }
+
+ btRigidBody& getRigidBodyA()
+ {
+ return m_rbA;
+ }
+ btRigidBody& getRigidBodyB()
+ {
+ return m_rbB;
+ }
+
+ int getUserConstraintType() const
+ {
+ return m_userConstraintType ;
+ }
+
+ void setUserConstraintType(int userConstraintType)
+ {
+ m_userConstraintType = userConstraintType;
+ };
+
+ void setUserConstraintId(int uid)
+ {
+ m_userConstraintId = uid;
+ }
+
+ int getUserConstraintId() const
+ {
+ return m_userConstraintId;
+ }
+
+ void setUserConstraintPtr(void* ptr)
+ {
+ m_userConstraintPtr = ptr;
+ }
+
+ void* getUserConstraintPtr()
+ {
+ return m_userConstraintPtr;
+ }
+
+ int getUid() const
+ {
+ return m_userConstraintId;
+ }
+
+ bool needsFeedback() const
+ {
+ return m_needsFeedback;
+ }
+
+ ///enableFeedback will allow to read the applied linear and angular impulse
+ ///use getAppliedImpulse, getAppliedLinearImpulse and getAppliedAngularImpulse to read feedback information
+ void enableFeedback(bool needsFeedback)
+ {
+ m_needsFeedback = needsFeedback;
+ }
+
+ ///getAppliedImpulse is an estimated total applied impulse.
+ ///This feedback could be used to determine breaking constraints or playing sounds.
+ btScalar getAppliedImpulse() const
+ {
+ btAssert(m_needsFeedback);
+ return m_appliedImpulse;
+ }
+
+ btTypedConstraintType getConstraintType () const
+ {
+ return btTypedConstraintType(m_objectType);
+ }
+
+ void setDbgDrawSize(btScalar dbgDrawSize)
+ {
+ m_dbgDrawSize = dbgDrawSize;
+ }
+ btScalar getDbgDrawSize()
+ {
+ return m_dbgDrawSize;
+ }
+
+ ///override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
+ ///If no axis is provided, it uses the default axis for this constraint.
+ virtual void setParam(int num, btScalar value, int axis = -1) = 0;
+
+ ///return the local value of parameter
+ virtual btScalar getParam(int num, int axis = -1) const = 0;
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const;
+
+};
+
+// returns angle in range [-SIMD_2_PI, SIMD_2_PI], closest to one of the limits
+// all arguments should be normalized angles (i.e. in range [-SIMD_PI, SIMD_PI])
+SIMD_FORCE_INLINE btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScalar angleLowerLimitInRadians, btScalar angleUpperLimitInRadians)
+{
+ if(angleLowerLimitInRadians >= angleUpperLimitInRadians)
+ {
+ return angleInRadians;
+ }
+ else if(angleInRadians < angleLowerLimitInRadians)
+ {
+ btScalar diffLo = btFabs(btNormalizeAngle(angleLowerLimitInRadians - angleInRadians));
+ btScalar diffHi = btFabs(btNormalizeAngle(angleUpperLimitInRadians - angleInRadians));
+ return (diffLo < diffHi) ? angleInRadians : (angleInRadians + SIMD_2_PI);
+ }
+ else if(angleInRadians > angleUpperLimitInRadians)
+ {
+ btScalar diffHi = btFabs(btNormalizeAngle(angleInRadians - angleUpperLimitInRadians));
+ btScalar diffLo = btFabs(btNormalizeAngle(angleInRadians - angleLowerLimitInRadians));
+ return (diffLo < diffHi) ? (angleInRadians - SIMD_2_PI) : angleInRadians;
+ }
+ else
+ {
+ return angleInRadians;
+ }
+}
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btTypedConstraintData
+{
+ btRigidBodyData *m_rbA;
+ btRigidBodyData *m_rbB;
+ char *m_name;
+
+ int m_objectType;
+ int m_userConstraintType;
+ int m_userConstraintId;
+ int m_needsFeedback;
+
+ float m_appliedImpulse;
+ float m_dbgDrawSize;
+
+ int m_disableCollisionsBetweenLinkedBodies;
+ char m_pad4[4];
+
+};
+
+SIMD_FORCE_INLINE int btTypedConstraint::calculateSerializeBufferSize() const
+{
+ return sizeof(btTypedConstraintData);
+}
+
+
+
+class btAngularLimit
+{
+private:
+ btScalar
+ m_center,
+ m_halfRange,
+ m_softness,
+ m_biasFactor,
+ m_relaxationFactor,
+ m_correction,
+ m_sign;
+
+ bool
+ m_solveLimit;
+
+public:
+ /// Default constructor initializes limit as inactive, allowing free constraint movement
+ btAngularLimit()
+ :m_center(0.0f),
+ m_halfRange(-1.0f),
+ m_softness(0.9f),
+ m_biasFactor(0.3f),
+ m_relaxationFactor(1.0f),
+ m_correction(0.0f),
+ m_sign(0.0f),
+ m_solveLimit(false)
+ {}
+
+ /// Sets all limit's parameters.
+ /// When low > high limit becomes inactive.
+ /// When high - low > 2PI limit is ineffective too becouse no angle can exceed the limit
+ void set(btScalar low, btScalar high, btScalar _softness = 0.9f, btScalar _biasFactor = 0.3f, btScalar _relaxationFactor = 1.0f);
+
+ /// Checks conastaint angle against limit. If limit is active and the angle violates the limit
+ /// correction is calculated.
+ void test(const btScalar angle);
+
+ /// Returns limit's softness
+ inline btScalar getSoftness() const
+ {
+ return m_softness;
+ }
+
+ /// Returns limit's bias factor
+ inline btScalar getBiasFactor() const
+ {
+ return m_biasFactor;
+ }
+
+ /// Returns limit's relaxation factor
+ inline btScalar getRelaxationFactor() const
+ {
+ return m_relaxationFactor;
+ }
+
+ /// Returns correction value evaluated when test() was invoked
+ inline btScalar getCorrection() const
+ {
+ return m_correction;
+ }
+
+ /// Returns sign value evaluated when test() was invoked
+ inline btScalar getSign() const
+ {
+ return m_sign;
+ }
+
+ /// Gives half of the distance between min and max limit angle
+ inline btScalar getHalfRange() const
+ {
+ return m_halfRange;
+ }
+
+ /// Returns true when the last test() invocation recognized limit violation
+ inline bool isLimit() const
+ {
+ return m_solveLimit;
+ }
+
+ /// Checks given angle against limit. If limit is active and angle doesn't fit it, the angle
+ /// returned is modified so it equals to the limit closest to given angle.
+ void fit(btScalar& angle) const;
+
+ /// Returns correction value multiplied by sign value
+ btScalar getError() const;
+
+ btScalar getLow() const;
+
+ btScalar getHigh() const;
+
+};
+
+
+
+#endif //BT_TYPED_CONSTRAINT_H
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp b/tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
new file mode 100644
index 00000000..40c56e77
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
@@ -0,0 +1,87 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btUniversalConstraint.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "LinearMath/btTransformUtil.h"
+
+
+
+#define UNIV_EPS btScalar(0.01f)
+
+
+// constructor
+// anchor, axis1 and axis2 are in world coordinate system
+// axis1 must be orthogonal to axis2
+btUniversalConstraint::btUniversalConstraint(btRigidBody& rbA, btRigidBody& rbB, btVector3& anchor, btVector3& axis1, btVector3& axis2)
+: btGeneric6DofConstraint(rbA, rbB, btTransform::getIdentity(), btTransform::getIdentity(), true),
+ m_anchor(anchor),
+ m_axis1(axis1),
+ m_axis2(axis2)
+{
+ // build frame basis
+ // 6DOF constraint uses Euler angles and to define limits
+ // it is assumed that rotational order is :
+ // Z - first, allowed limits are (-PI,PI);
+ // new position of Y - second (allowed limits are (-PI/2 + epsilon, PI/2 - epsilon), where epsilon is a small positive number
+ // used to prevent constraint from instability on poles;
+ // new position of X, allowed limits are (-PI,PI);
+ // So to simulate ODE Universal joint we should use parent axis as Z, child axis as Y and limit all other DOFs
+ // Build the frame in world coordinate system first
+ btVector3 zAxis = axis1.normalize();
+ btVector3 yAxis = axis2.normalize();
+ btVector3 xAxis = yAxis.cross(zAxis); // we want right coordinate system
+ btTransform frameInW;
+ frameInW.setIdentity();
+ frameInW.getBasis().setValue( xAxis[0], yAxis[0], zAxis[0],
+ xAxis[1], yAxis[1], zAxis[1],
+ xAxis[2], yAxis[2], zAxis[2]);
+ frameInW.setOrigin(anchor);
+ // now get constraint frame in local coordinate systems
+ m_frameInA = rbA.getCenterOfMassTransform().inverse() * frameInW;
+ m_frameInB = rbB.getCenterOfMassTransform().inverse() * frameInW;
+ // sei limits
+ setLinearLowerLimit(btVector3(0., 0., 0.));
+ setLinearUpperLimit(btVector3(0., 0., 0.));
+ setAngularLowerLimit(btVector3(0.f, -SIMD_HALF_PI + UNIV_EPS, -SIMD_PI + UNIV_EPS));
+ setAngularUpperLimit(btVector3(0.f, SIMD_HALF_PI - UNIV_EPS, SIMD_PI - UNIV_EPS));
+}
+
+void btUniversalConstraint::setAxis(const btVector3& axis1,const btVector3& axis2)
+{
+ m_axis1 = axis1;
+ m_axis2 = axis2;
+
+ btVector3 zAxis = axis1.normalized();
+ btVector3 yAxis = axis2.normalized();
+ btVector3 xAxis = yAxis.cross(zAxis); // we want right coordinate system
+
+ btTransform frameInW;
+ frameInW.setIdentity();
+ frameInW.getBasis().setValue( xAxis[0], yAxis[0], zAxis[0],
+ xAxis[1], yAxis[1], zAxis[1],
+ xAxis[2], yAxis[2], zAxis[2]);
+ frameInW.setOrigin(m_anchor);
+
+ // now get constraint frame in local coordinate systems
+ m_frameInA = m_rbA.getCenterOfMassTransform().inverse() * frameInW;
+ m_frameInB = m_rbB.getCenterOfMassTransform().inverse() * frameInW;
+
+ calculateTransforms();
+}
+
+
diff --git a/tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h b/tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
new file mode 100644
index 00000000..bfa48f42
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ConstraintSolver/btUniversalConstraint.h
@@ -0,0 +1,62 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_UNIVERSAL_CONSTRAINT_H
+#define BT_UNIVERSAL_CONSTRAINT_H
+
+
+
+#include "LinearMath/btVector3.h"
+#include "btTypedConstraint.h"
+#include "btGeneric6DofConstraint.h"
+
+
+
+/// Constraint similar to ODE Universal Joint
+/// has 2 rotatioonal degrees of freedom, similar to Euler rotations around Z (axis 1)
+/// and Y (axis 2)
+/// Description from ODE manual :
+/// "Given axis 1 on body 1, and axis 2 on body 2 that is perpendicular to axis 1, it keeps them perpendicular.
+/// In other words, rotation of the two bodies about the direction perpendicular to the two axes will be equal."
+
+class btUniversalConstraint : public btGeneric6DofConstraint
+{
+protected:
+ btVector3 m_anchor;
+ btVector3 m_axis1;
+ btVector3 m_axis2;
+public:
+ // constructor
+ // anchor, axis1 and axis2 are in world coordinate system
+ // axis1 must be orthogonal to axis2
+ btUniversalConstraint(btRigidBody& rbA, btRigidBody& rbB, btVector3& anchor, btVector3& axis1, btVector3& axis2);
+ // access
+ const btVector3& getAnchor() { return m_calculatedTransformA.getOrigin(); }
+ const btVector3& getAnchor2() { return m_calculatedTransformB.getOrigin(); }
+ const btVector3& getAxis1() { return m_axis1; }
+ const btVector3& getAxis2() { return m_axis2; }
+ btScalar getAngle1() { return getAngle(2); }
+ btScalar getAngle2() { return getAngle(1); }
+ // limits
+ void setUpperLimit(btScalar ang1max, btScalar ang2max) { setAngularUpperLimit(btVector3(0.f, ang1max, ang2max)); }
+ void setLowerLimit(btScalar ang1min, btScalar ang2min) { setAngularLowerLimit(btVector3(0.f, ang1min, ang2min)); }
+
+ void setAxis( const btVector3& axis1, const btVector3& axis2);
+};
+
+
+
+#endif // BT_UNIVERSAL_CONSTRAINT_H
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/Bullet-C-API.cpp b/tests/bullet/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
new file mode 100644
index 00000000..bd8e2748
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/Bullet-C-API.cpp
@@ -0,0 +1,405 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/*
+ Draft high-level generic physics C-API. For low-level access, use the physics SDK native API's.
+ Work in progress, functionality will be added on demand.
+
+ If possible, use the richer Bullet C++ API, by including <src/btBulletDynamicsCommon.h>
+*/
+
+#include "Bullet-C-Api.h"
+#include "btBulletDynamicsCommon.h"
+#include "LinearMath/btAlignedAllocator.h"
+
+
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btScalar.h"
+#include "LinearMath/btMatrix3x3.h"
+#include "LinearMath/btTransform.h"
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+#include "BulletCollision/NarrowPhaseCollision/btPointCollector.h"
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
+#include "BulletCollision/CollisionShapes/btMinkowskiSumShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
+#include "BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h"
+#include "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h"
+
+
+/*
+ Create and Delete a Physics SDK
+*/
+
+struct btPhysicsSdk
+{
+
+// btDispatcher* m_dispatcher;
+// btOverlappingPairCache* m_pairCache;
+// btConstraintSolver* m_constraintSolver
+
+ btVector3 m_worldAabbMin;
+ btVector3 m_worldAabbMax;
+
+
+ //todo: version, hardware/optimization settings etc?
+ btPhysicsSdk()
+ :m_worldAabbMin(-1000,-1000,-1000),
+ m_worldAabbMax(1000,1000,1000)
+ {
+
+ }
+
+
+};
+
+plPhysicsSdkHandle plNewBulletSdk()
+{
+ void* mem = btAlignedAlloc(sizeof(btPhysicsSdk),16);
+ return (plPhysicsSdkHandle)new (mem)btPhysicsSdk;
+}
+
+void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk)
+{
+ btPhysicsSdk* phys = reinterpret_cast<btPhysicsSdk*>(physicsSdk);
+ btAlignedFree(phys);
+}
+
+
+/* Dynamics World */
+plDynamicsWorldHandle plCreateDynamicsWorld(plPhysicsSdkHandle physicsSdkHandle)
+{
+ btPhysicsSdk* physicsSdk = reinterpret_cast<btPhysicsSdk*>(physicsSdkHandle);
+ void* mem = btAlignedAlloc(sizeof(btDefaultCollisionConfiguration),16);
+ btDefaultCollisionConfiguration* collisionConfiguration = new (mem)btDefaultCollisionConfiguration();
+ mem = btAlignedAlloc(sizeof(btCollisionDispatcher),16);
+ btDispatcher* dispatcher = new (mem)btCollisionDispatcher(collisionConfiguration);
+ mem = btAlignedAlloc(sizeof(btAxisSweep3),16);
+ btBroadphaseInterface* pairCache = new (mem)btAxisSweep3(physicsSdk->m_worldAabbMin,physicsSdk->m_worldAabbMax);
+ mem = btAlignedAlloc(sizeof(btSequentialImpulseConstraintSolver),16);
+ btConstraintSolver* constraintSolver = new(mem) btSequentialImpulseConstraintSolver();
+
+ mem = btAlignedAlloc(sizeof(btDiscreteDynamicsWorld),16);
+ return (plDynamicsWorldHandle) new (mem)btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration);
+}
+void plDeleteDynamicsWorld(plDynamicsWorldHandle world)
+{
+ //todo: also clean up the other allocations, axisSweep, pairCache,dispatcher,constraintSolver,collisionConfiguration
+ btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world);
+ btAlignedFree(dynamicsWorld);
+}
+
+void plStepSimulation(plDynamicsWorldHandle world, plReal timeStep)
+{
+ btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world);
+ btAssert(dynamicsWorld);
+ dynamicsWorld->stepSimulation(timeStep);
+}
+
+void plAddRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object)
+{
+ btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world);
+ btAssert(dynamicsWorld);
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+
+ dynamicsWorld->addRigidBody(body);
+}
+
+void plRemoveRigidBody(plDynamicsWorldHandle world, plRigidBodyHandle object)
+{
+ btDynamicsWorld* dynamicsWorld = reinterpret_cast< btDynamicsWorld* >(world);
+ btAssert(dynamicsWorld);
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+
+ dynamicsWorld->removeRigidBody(body);
+}
+
+/* Rigid Body */
+
+plRigidBodyHandle plCreateRigidBody( void* user_data, float mass, plCollisionShapeHandle cshape )
+{
+ btTransform trans;
+ trans.setIdentity();
+ btVector3 localInertia(0,0,0);
+ btCollisionShape* shape = reinterpret_cast<btCollisionShape*>( cshape);
+ btAssert(shape);
+ if (mass)
+ {
+ shape->calculateLocalInertia(mass,localInertia);
+ }
+ void* mem = btAlignedAlloc(sizeof(btRigidBody),16);
+ btRigidBody::btRigidBodyConstructionInfo rbci(mass, 0,shape,localInertia);
+ btRigidBody* body = new (mem)btRigidBody(rbci);
+ body->setWorldTransform(trans);
+ body->setUserPointer(user_data);
+ return (plRigidBodyHandle) body;
+}
+
+void plDeleteRigidBody(plRigidBodyHandle cbody)
+{
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(cbody);
+ btAssert(body);
+ btAlignedFree( body);
+}
+
+
+/* Collision Shape definition */
+
+plCollisionShapeHandle plNewSphereShape(plReal radius)
+{
+ void* mem = btAlignedAlloc(sizeof(btSphereShape),16);
+ return (plCollisionShapeHandle) new (mem)btSphereShape(radius);
+
+}
+
+plCollisionShapeHandle plNewBoxShape(plReal x, plReal y, plReal z)
+{
+ void* mem = btAlignedAlloc(sizeof(btBoxShape),16);
+ return (plCollisionShapeHandle) new (mem)btBoxShape(btVector3(x,y,z));
+}
+
+plCollisionShapeHandle plNewCapsuleShape(plReal radius, plReal height)
+{
+ //capsule is convex hull of 2 spheres, so use btMultiSphereShape
+
+ const int numSpheres = 2;
+ btVector3 positions[numSpheres] = {btVector3(0,height,0),btVector3(0,-height,0)};
+ btScalar radi[numSpheres] = {radius,radius};
+ void* mem = btAlignedAlloc(sizeof(btMultiSphereShape),16);
+ return (plCollisionShapeHandle) new (mem)btMultiSphereShape(positions,radi,numSpheres);
+}
+plCollisionShapeHandle plNewConeShape(plReal radius, plReal height)
+{
+ void* mem = btAlignedAlloc(sizeof(btConeShape),16);
+ return (plCollisionShapeHandle) new (mem)btConeShape(radius,height);
+}
+
+plCollisionShapeHandle plNewCylinderShape(plReal radius, plReal height)
+{
+ void* mem = btAlignedAlloc(sizeof(btCylinderShape),16);
+ return (plCollisionShapeHandle) new (mem)btCylinderShape(btVector3(radius,height,radius));
+}
+
+/* Convex Meshes */
+plCollisionShapeHandle plNewConvexHullShape()
+{
+ void* mem = btAlignedAlloc(sizeof(btConvexHullShape),16);
+ return (plCollisionShapeHandle) new (mem)btConvexHullShape();
+}
+
+
+/* Concave static triangle meshes */
+plMeshInterfaceHandle plNewMeshInterface()
+{
+ return 0;
+}
+
+plCollisionShapeHandle plNewCompoundShape()
+{
+ void* mem = btAlignedAlloc(sizeof(btCompoundShape),16);
+ return (plCollisionShapeHandle) new (mem)btCompoundShape();
+}
+
+void plAddChildShape(plCollisionShapeHandle compoundShapeHandle,plCollisionShapeHandle childShapeHandle, plVector3 childPos,plQuaternion childOrn)
+{
+ btCollisionShape* colShape = reinterpret_cast<btCollisionShape*>(compoundShapeHandle);
+ btAssert(colShape->getShapeType() == COMPOUND_SHAPE_PROXYTYPE);
+ btCompoundShape* compoundShape = reinterpret_cast<btCompoundShape*>(colShape);
+ btCollisionShape* childShape = reinterpret_cast<btCollisionShape*>(childShapeHandle);
+ btTransform localTrans;
+ localTrans.setIdentity();
+ localTrans.setOrigin(btVector3(childPos[0],childPos[1],childPos[2]));
+ localTrans.setRotation(btQuaternion(childOrn[0],childOrn[1],childOrn[2],childOrn[3]));
+ compoundShape->addChildShape(localTrans,childShape);
+}
+
+void plSetEuler(plReal yaw,plReal pitch,plReal roll, plQuaternion orient)
+{
+ btQuaternion orn;
+ orn.setEuler(yaw,pitch,roll);
+ orient[0] = orn.getX();
+ orient[1] = orn.getY();
+ orient[2] = orn.getZ();
+ orient[3] = orn.getW();
+
+}
+
+
+// extern void plAddTriangle(plMeshInterfaceHandle meshHandle, plVector3 v0,plVector3 v1,plVector3 v2);
+// extern plCollisionShapeHandle plNewStaticTriangleMeshShape(plMeshInterfaceHandle);
+
+
+void plAddVertex(plCollisionShapeHandle cshape, plReal x,plReal y,plReal z)
+{
+ btCollisionShape* colShape = reinterpret_cast<btCollisionShape*>( cshape);
+ (void)colShape;
+ btAssert(colShape->getShapeType()==CONVEX_HULL_SHAPE_PROXYTYPE);
+ btConvexHullShape* convexHullShape = reinterpret_cast<btConvexHullShape*>( cshape);
+ convexHullShape->addPoint(btVector3(x,y,z));
+
+}
+
+void plDeleteShape(plCollisionShapeHandle cshape)
+{
+ btCollisionShape* shape = reinterpret_cast<btCollisionShape*>( cshape);
+ btAssert(shape);
+ btAlignedFree(shape);
+}
+void plSetScaling(plCollisionShapeHandle cshape, plVector3 cscaling)
+{
+ btCollisionShape* shape = reinterpret_cast<btCollisionShape*>( cshape);
+ btAssert(shape);
+ btVector3 scaling(cscaling[0],cscaling[1],cscaling[2]);
+ shape->setLocalScaling(scaling);
+}
+
+
+
+void plSetPosition(plRigidBodyHandle object, const plVector3 position)
+{
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+ btVector3 pos(position[0],position[1],position[2]);
+ btTransform worldTrans = body->getWorldTransform();
+ worldTrans.setOrigin(pos);
+ body->setWorldTransform(worldTrans);
+}
+
+void plSetOrientation(plRigidBodyHandle object, const plQuaternion orientation)
+{
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+ btQuaternion orn(orientation[0],orientation[1],orientation[2],orientation[3]);
+ btTransform worldTrans = body->getWorldTransform();
+ worldTrans.setRotation(orn);
+ body->setWorldTransform(worldTrans);
+}
+
+void plSetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix)
+{
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+ btTransform& worldTrans = body->getWorldTransform();
+ worldTrans.setFromOpenGLMatrix(matrix);
+}
+
+void plGetOpenGLMatrix(plRigidBodyHandle object, plReal* matrix)
+{
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+ body->getWorldTransform().getOpenGLMatrix(matrix);
+
+}
+
+void plGetPosition(plRigidBodyHandle object,plVector3 position)
+{
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+ const btVector3& pos = body->getWorldTransform().getOrigin();
+ position[0] = pos.getX();
+ position[1] = pos.getY();
+ position[2] = pos.getZ();
+}
+
+void plGetOrientation(plRigidBodyHandle object,plQuaternion orientation)
+{
+ btRigidBody* body = reinterpret_cast< btRigidBody* >(object);
+ btAssert(body);
+ const btQuaternion& orn = body->getWorldTransform().getRotation();
+ orientation[0] = orn.getX();
+ orientation[1] = orn.getY();
+ orientation[2] = orn.getZ();
+ orientation[3] = orn.getW();
+}
+
+
+
+//plRigidBodyHandle plRayCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal);
+
+// extern plRigidBodyHandle plObjectCast(plDynamicsWorldHandle world, const plVector3 rayStart, const plVector3 rayEnd, plVector3 hitpoint, plVector3 normal);
+
+double plNearestPoints(float p1[3], float p2[3], float p3[3], float q1[3], float q2[3], float q3[3], float *pa, float *pb, float normal[3])
+{
+ btVector3 vp(p1[0], p1[1], p1[2]);
+ btTriangleShape trishapeA(vp,
+ btVector3(p2[0], p2[1], p2[2]),
+ btVector3(p3[0], p3[1], p3[2]));
+ trishapeA.setMargin(0.000001f);
+ btVector3 vq(q1[0], q1[1], q1[2]);
+ btTriangleShape trishapeB(vq,
+ btVector3(q2[0], q2[1], q2[2]),
+ btVector3(q3[0], q3[1], q3[2]));
+ trishapeB.setMargin(0.000001f);
+
+ // btVoronoiSimplexSolver sGjkSimplexSolver;
+ // btGjkEpaPenetrationDepthSolver penSolverPtr;
+
+ static btSimplexSolverInterface sGjkSimplexSolver;
+ sGjkSimplexSolver.reset();
+
+ static btGjkEpaPenetrationDepthSolver Solver0;
+ static btMinkowskiPenetrationDepthSolver Solver1;
+
+ btConvexPenetrationDepthSolver* Solver = NULL;
+
+ Solver = &Solver1;
+
+ btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,Solver);
+
+ convexConvex.m_catchDegeneracies = 1;
+
+ // btGjkPairDetector convexConvex(&trishapeA ,&trishapeB,&sGjkSimplexSolver,0);
+
+ btPointCollector gjkOutput;
+ btGjkPairDetector::ClosestPointInput input;
+
+
+ btTransform tr;
+ tr.setIdentity();
+
+ input.m_transformA = tr;
+ input.m_transformB = tr;
+
+ convexConvex.getClosestPoints(input, gjkOutput, 0);
+
+
+ if (gjkOutput.m_hasResult)
+ {
+
+ pb[0] = pa[0] = gjkOutput.m_pointInWorld[0];
+ pb[1] = pa[1] = gjkOutput.m_pointInWorld[1];
+ pb[2] = pa[2] = gjkOutput.m_pointInWorld[2];
+
+ pb[0]+= gjkOutput.m_normalOnBInWorld[0] * gjkOutput.m_distance;
+ pb[1]+= gjkOutput.m_normalOnBInWorld[1] * gjkOutput.m_distance;
+ pb[2]+= gjkOutput.m_normalOnBInWorld[2] * gjkOutput.m_distance;
+
+ normal[0] = gjkOutput.m_normalOnBInWorld[0];
+ normal[1] = gjkOutput.m_normalOnBInWorld[1];
+ normal[2] = gjkOutput.m_normalOnBInWorld[2];
+
+ return gjkOutput.m_distance;
+ }
+ return -1.0f;
+}
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btActionInterface.h b/tests/bullet/src/BulletDynamics/Dynamics/btActionInterface.h
new file mode 100644
index 00000000..e1fea3a4
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btActionInterface.h
@@ -0,0 +1,46 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _BT_ACTION_INTERFACE_H
+#define _BT_ACTION_INTERFACE_H
+
+class btIDebugDraw;
+class btCollisionWorld;
+
+#include "LinearMath/btScalar.h"
+#include "btRigidBody.h"
+
+///Basic interface to allow actions such as vehicles and characters to be updated inside a btDynamicsWorld
+class btActionInterface
+{
+protected:
+
+ static btRigidBody& getFixedBody();
+
+
+public:
+
+ virtual ~btActionInterface()
+ {
+ }
+
+ virtual void updateAction( btCollisionWorld* collisionWorld, btScalar deltaTimeStep)=0;
+
+ virtual void debugDraw(btIDebugDraw* debugDrawer) = 0;
+
+};
+
+#endif //_BT_ACTION_INTERFACE_H
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp b/tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp
new file mode 100644
index 00000000..23501c44
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp
@@ -0,0 +1,196 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btContinuousDynamicsWorld.h"
+#include "LinearMath/btQuickprof.h"
+
+//collision detection
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h"
+
+//rigidbody & constraints
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
+#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
+
+
+
+#include <stdio.h>
+
+btContinuousDynamicsWorld::btContinuousDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration)
+:btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration)
+{
+}
+
+btContinuousDynamicsWorld::~btContinuousDynamicsWorld()
+{
+}
+
+
+void btContinuousDynamicsWorld::internalSingleStepSimulation( btScalar timeStep)
+{
+
+ startProfiling(timeStep);
+
+ if(0 != m_internalPreTickCallback) {
+ (*m_internalPreTickCallback)(this, timeStep);
+ }
+
+
+ ///update aabbs information
+ updateAabbs();
+ //static int frame=0;
+// printf("frame %d\n",frame++);
+
+ ///apply gravity, predict motion
+ predictUnconstraintMotion(timeStep);
+
+ btDispatcherInfo& dispatchInfo = getDispatchInfo();
+
+ dispatchInfo.m_timeStep = timeStep;
+ dispatchInfo.m_stepCount = 0;
+ dispatchInfo.m_debugDraw = getDebugDrawer();
+
+ ///perform collision detection
+ performDiscreteCollisionDetection();
+
+ calculateSimulationIslands();
+
+
+ getSolverInfo().m_timeStep = timeStep;
+
+
+
+ ///solve contact and other joint constraints
+ solveConstraints(getSolverInfo());
+
+ ///CallbackTriggers();
+ calculateTimeOfImpacts(timeStep);
+
+ btScalar toi = dispatchInfo.m_timeOfImpact;
+// if (toi < 1.f)
+// printf("toi = %f\n",toi);
+ if (toi < 0.f)
+ printf("toi = %f\n",toi);
+
+
+ ///integrate transforms
+ integrateTransforms(timeStep * toi);
+
+ ///update vehicle simulation
+ updateActions(timeStep);
+
+ updateActivationState( timeStep );
+
+ if(0 != m_internalTickCallback) {
+ (*m_internalTickCallback)(this, timeStep);
+ }
+}
+
+void btContinuousDynamicsWorld::calculateTimeOfImpacts(btScalar timeStep)
+{
+ ///these should be 'temporal' aabbs!
+ updateTemporalAabbs(timeStep);
+
+ ///'toi' is the global smallest time of impact. However, we just calculate the time of impact for each object individually.
+ ///so we handle the case moving versus static properly, and we cheat for moving versus moving
+ btScalar toi = 1.f;
+
+
+ btDispatcherInfo& dispatchInfo = getDispatchInfo();
+ dispatchInfo.m_timeStep = timeStep;
+ dispatchInfo.m_timeOfImpact = 1.f;
+ dispatchInfo.m_stepCount = 0;
+ dispatchInfo.m_dispatchFunc = btDispatcherInfo::DISPATCH_CONTINUOUS;
+
+ ///calculate time of impact for overlapping pairs
+
+
+ btDispatcher* dispatcher = getDispatcher();
+ if (dispatcher)
+ dispatcher->dispatchAllCollisionPairs(m_broadphasePairCache->getOverlappingPairCache(),dispatchInfo,m_dispatcher1);
+
+ toi = dispatchInfo.m_timeOfImpact;
+
+ dispatchInfo.m_dispatchFunc = btDispatcherInfo::DISPATCH_DISCRETE;
+
+}
+
+void btContinuousDynamicsWorld::updateTemporalAabbs(btScalar timeStep)
+{
+
+ btVector3 temporalAabbMin,temporalAabbMax;
+
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body)
+ {
+ body->getCollisionShape()->getAabb(m_collisionObjects[i]->getWorldTransform(),temporalAabbMin,temporalAabbMax);
+ const btVector3& linvel = body->getLinearVelocity();
+
+ //make the AABB temporal
+ btScalar temporalAabbMaxx = temporalAabbMax.getX();
+ btScalar temporalAabbMaxy = temporalAabbMax.getY();
+ btScalar temporalAabbMaxz = temporalAabbMax.getZ();
+ btScalar temporalAabbMinx = temporalAabbMin.getX();
+ btScalar temporalAabbMiny = temporalAabbMin.getY();
+ btScalar temporalAabbMinz = temporalAabbMin.getZ();
+
+ // add linear motion
+ btVector3 linMotion = linvel*timeStep;
+
+ if (linMotion.x() > 0.f)
+ temporalAabbMaxx += linMotion.x();
+ else
+ temporalAabbMinx += linMotion.x();
+ if (linMotion.y() > 0.f)
+ temporalAabbMaxy += linMotion.y();
+ else
+ temporalAabbMiny += linMotion.y();
+ if (linMotion.z() > 0.f)
+ temporalAabbMaxz += linMotion.z();
+ else
+ temporalAabbMinz += linMotion.z();
+
+ //add conservative angular motion
+ btScalar angularMotion(0);// = angvel.length() * GetAngularMotionDisc() * timeStep;
+ btVector3 angularMotion3d(angularMotion,angularMotion,angularMotion);
+ temporalAabbMin = btVector3(temporalAabbMinx,temporalAabbMiny,temporalAabbMinz);
+ temporalAabbMax = btVector3(temporalAabbMaxx,temporalAabbMaxy,temporalAabbMaxz);
+
+ temporalAabbMin -= angularMotion3d;
+ temporalAabbMax += angularMotion3d;
+
+ m_broadphasePairCache->setAabb(body->getBroadphaseHandle(),temporalAabbMin,temporalAabbMax,m_dispatcher1);
+ }
+ }
+
+ //update aabb (of all moved objects)
+
+ m_broadphasePairCache->calculateOverlappingPairs(m_dispatcher1);
+
+
+
+}
+
+
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h b/tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h
new file mode 100644
index 00000000..61c8dea0
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btContinuousDynamicsWorld.h
@@ -0,0 +1,46 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONTINUOUS_DYNAMICS_WORLD_H
+#define BT_CONTINUOUS_DYNAMICS_WORLD_H
+
+#include "btDiscreteDynamicsWorld.h"
+
+///btContinuousDynamicsWorld adds optional (per object) continuous collision detection for fast moving objects to the btDiscreteDynamicsWorld.
+///This copes with fast moving objects that otherwise would tunnel/miss collisions.
+///Under construction, don't use yet! Please use btDiscreteDynamicsWorld instead.
+class btContinuousDynamicsWorld : public btDiscreteDynamicsWorld
+{
+
+ void updateTemporalAabbs(btScalar timeStep);
+
+ public:
+
+ btContinuousDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration);
+ virtual ~btContinuousDynamicsWorld();
+
+ ///time stepping with calculation of time of impact for selected fast moving objects
+ virtual void internalSingleStepSimulation( btScalar timeStep);
+
+ virtual void calculateTimeOfImpacts(btScalar timeStep);
+
+ virtual btDynamicsWorldType getWorldType() const
+ {
+ return BT_CONTINUOUS_DYNAMICS_WORLD;
+ }
+
+};
+
+#endif //BT_CONTINUOUS_DYNAMICS_WORLD_H
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp b/tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
new file mode 100644
index 00000000..b08dcf0b
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
@@ -0,0 +1,1348 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btDiscreteDynamicsWorld.h"
+
+//collision detection
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionDispatch/btSimulationIslandManager.h"
+#include "LinearMath/btTransformUtil.h"
+#include "LinearMath/btQuickprof.h"
+
+//rigidbody & constraints
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
+#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btContactConstraint.h"
+
+
+#include "LinearMath/btIDebugDraw.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+
+
+#include "BulletDynamics/Dynamics/btActionInterface.h"
+#include "LinearMath/btQuickprof.h"
+#include "LinearMath/btMotionState.h"
+
+#include "LinearMath/btSerializer.h"
+
+#if 0
+btAlignedObjectArray<btVector3> debugContacts;
+btAlignedObjectArray<btVector3> debugNormals;
+int startHit=2;
+int firstHit=startHit;
+#endif
+
+
+
+btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration)
+:btDynamicsWorld(dispatcher,pairCache,collisionConfiguration),
+m_constraintSolver(constraintSolver),
+m_gravity(0,-10,0),
+m_localTime(0),
+m_synchronizeAllMotionStates(false),
+m_profileTimings(0)
+{
+ if (!m_constraintSolver)
+ {
+ void* mem = btAlignedAlloc(sizeof(btSequentialImpulseConstraintSolver),16);
+ m_constraintSolver = new (mem) btSequentialImpulseConstraintSolver;
+ m_ownsConstraintSolver = true;
+ } else
+ {
+ m_ownsConstraintSolver = false;
+ }
+
+ {
+ void* mem = btAlignedAlloc(sizeof(btSimulationIslandManager),16);
+ m_islandManager = new (mem) btSimulationIslandManager();
+ }
+
+ m_ownsIslandManager = true;
+}
+
+
+btDiscreteDynamicsWorld::~btDiscreteDynamicsWorld()
+{
+ //only delete it when we created it
+ if (m_ownsIslandManager)
+ {
+ m_islandManager->~btSimulationIslandManager();
+ btAlignedFree( m_islandManager);
+ }
+ if (m_ownsConstraintSolver)
+ {
+
+ m_constraintSolver->~btConstraintSolver();
+ btAlignedFree(m_constraintSolver);
+ }
+}
+
+void btDiscreteDynamicsWorld::saveKinematicState(btScalar timeStep)
+{
+///would like to iterate over m_nonStaticRigidBodies, but unfortunately old API allows
+///to switch status _after_ adding kinematic objects to the world
+///fix it for Bullet 3.x release
+ for (int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body && body->getActivationState() != ISLAND_SLEEPING)
+ {
+ if (body->isKinematicObject())
+ {
+ //to calculate velocities next frame
+ body->saveKinematicState(timeStep);
+ }
+ }
+ }
+
+}
+
+void btDiscreteDynamicsWorld::debugDrawWorld()
+{
+ BT_PROFILE("debugDrawWorld");
+
+ btCollisionWorld::debugDrawWorld();
+
+ bool drawConstraints = false;
+ if (getDebugDrawer())
+ {
+ int mode = getDebugDrawer()->getDebugMode();
+ if(mode & (btIDebugDraw::DBG_DrawConstraints | btIDebugDraw::DBG_DrawConstraintLimits))
+ {
+ drawConstraints = true;
+ }
+ }
+ if(drawConstraints)
+ {
+ for(int i = getNumConstraints()-1; i>=0 ;i--)
+ {
+ btTypedConstraint* constraint = getConstraint(i);
+ debugDrawConstraint(constraint);
+ }
+ }
+
+
+
+ if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & (btIDebugDraw::DBG_DrawWireframe | btIDebugDraw::DBG_DrawAabb))
+ {
+ int i;
+
+ if (getDebugDrawer() && getDebugDrawer()->getDebugMode())
+ {
+ for (i=0;i<m_actions.size();i++)
+ {
+ m_actions[i]->debugDraw(m_debugDrawer);
+ }
+ }
+ }
+}
+
+void btDiscreteDynamicsWorld::clearForces()
+{
+ ///@todo: iterate over awake simulation islands!
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ //need to check if next line is ok
+ //it might break backward compatibility (people applying forces on sleeping objects get never cleared and accumulate on wake-up
+ body->clearForces();
+ }
+}
+
+///apply gravity, call this once per timestep
+void btDiscreteDynamicsWorld::applyGravity()
+{
+ ///@todo: iterate over awake simulation islands!
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ if (body->isActive())
+ {
+ body->applyGravity();
+ }
+ }
+}
+
+
+void btDiscreteDynamicsWorld::synchronizeSingleMotionState(btRigidBody* body)
+{
+ btAssert(body);
+
+ if (body->getMotionState() && !body->isStaticOrKinematicObject())
+ {
+ //we need to call the update at least once, even for sleeping objects
+ //otherwise the 'graphics' transform never updates properly
+ ///@todo: add 'dirty' flag
+ //if (body->getActivationState() != ISLAND_SLEEPING)
+ {
+ btTransform interpolatedTransform;
+ btTransformUtil::integrateTransform(body->getInterpolationWorldTransform(),
+ body->getInterpolationLinearVelocity(),body->getInterpolationAngularVelocity(),m_localTime*body->getHitFraction(),interpolatedTransform);
+ body->getMotionState()->setWorldTransform(interpolatedTransform);
+ }
+ }
+}
+
+
+void btDiscreteDynamicsWorld::synchronizeMotionStates()
+{
+ BT_PROFILE("synchronizeMotionStates");
+ if (m_synchronizeAllMotionStates)
+ {
+ //iterate over all collision objects
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body)
+ synchronizeSingleMotionState(body);
+ }
+ } else
+ {
+ //iterate over all active rigid bodies
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ if (body->isActive())
+ synchronizeSingleMotionState(body);
+ }
+ }
+}
+
+
+int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep)
+{
+ startProfiling(timeStep);
+
+ BT_PROFILE("stepSimulation");
+
+ int numSimulationSubSteps = 0;
+
+ if (maxSubSteps)
+ {
+ //fixed timestep with interpolation
+ m_localTime += timeStep;
+ if (m_localTime >= fixedTimeStep)
+ {
+ numSimulationSubSteps = int( m_localTime / fixedTimeStep);
+ m_localTime -= numSimulationSubSteps * fixedTimeStep;
+ }
+ } else
+ {
+ //variable timestep
+ fixedTimeStep = timeStep;
+ m_localTime = timeStep;
+ if (btFuzzyZero(timeStep))
+ {
+ numSimulationSubSteps = 0;
+ maxSubSteps = 0;
+ } else
+ {
+ numSimulationSubSteps = 1;
+ maxSubSteps = 1;
+ }
+ }
+
+ //process some debugging flags
+ if (getDebugDrawer())
+ {
+ btIDebugDraw* debugDrawer = getDebugDrawer ();
+ gDisableDeactivation = (debugDrawer->getDebugMode() & btIDebugDraw::DBG_NoDeactivation) != 0;
+ }
+ if (numSimulationSubSteps)
+ {
+
+ //clamp the number of substeps, to prevent simulation grinding spiralling down to a halt
+ int clampedSimulationSteps = (numSimulationSubSteps > maxSubSteps)? maxSubSteps : numSimulationSubSteps;
+
+ saveKinematicState(fixedTimeStep*clampedSimulationSteps);
+
+ applyGravity();
+
+
+
+ for (int i=0;i<clampedSimulationSteps;i++)
+ {
+ internalSingleStepSimulation(fixedTimeStep);
+ synchronizeMotionStates();
+ }
+
+ } else
+ {
+ synchronizeMotionStates();
+ }
+
+ clearForces();
+
+#ifndef BT_NO_PROFILE
+ CProfileManager::Increment_Frame_Counter();
+#endif //BT_NO_PROFILE
+
+ return numSimulationSubSteps;
+}
+
+void btDiscreteDynamicsWorld::internalSingleStepSimulation(btScalar timeStep)
+{
+
+ BT_PROFILE("internalSingleStepSimulation");
+
+ if(0 != m_internalPreTickCallback) {
+ (*m_internalPreTickCallback)(this, timeStep);
+ }
+
+ ///apply gravity, predict motion
+ predictUnconstraintMotion(timeStep);
+
+ btDispatcherInfo& dispatchInfo = getDispatchInfo();
+
+ dispatchInfo.m_timeStep = timeStep;
+ dispatchInfo.m_stepCount = 0;
+ dispatchInfo.m_debugDraw = getDebugDrawer();
+
+
+ ///perform collision detection
+ performDiscreteCollisionDetection();
+
+ if (getDispatchInfo().m_useContinuous)
+ addSpeculativeContacts(timeStep);
+
+
+ calculateSimulationIslands();
+
+
+ getSolverInfo().m_timeStep = timeStep;
+
+
+
+ ///solve contact and other joint constraints
+ solveConstraints(getSolverInfo());
+
+ ///CallbackTriggers();
+
+ ///integrate transforms
+ integrateTransforms(timeStep);
+
+ ///update vehicle simulation
+ updateActions(timeStep);
+
+ updateActivationState( timeStep );
+
+ if(0 != m_internalTickCallback) {
+ (*m_internalTickCallback)(this, timeStep);
+ }
+}
+
+void btDiscreteDynamicsWorld::setGravity(const btVector3& gravity)
+{
+ m_gravity = gravity;
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ if (body->isActive() && !(body->getFlags() &BT_DISABLE_WORLD_GRAVITY))
+ {
+ body->setGravity(gravity);
+ }
+ }
+}
+
+btVector3 btDiscreteDynamicsWorld::getGravity () const
+{
+ return m_gravity;
+}
+
+void btDiscreteDynamicsWorld::addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup,short int collisionFilterMask)
+{
+ btCollisionWorld::addCollisionObject(collisionObject,collisionFilterGroup,collisionFilterMask);
+}
+
+void btDiscreteDynamicsWorld::removeCollisionObject(btCollisionObject* collisionObject)
+{
+ btRigidBody* body = btRigidBody::upcast(collisionObject);
+ if (body)
+ removeRigidBody(body);
+ else
+ btCollisionWorld::removeCollisionObject(collisionObject);
+}
+
+void btDiscreteDynamicsWorld::removeRigidBody(btRigidBody* body)
+{
+ m_nonStaticRigidBodies.remove(body);
+ btCollisionWorld::removeCollisionObject(body);
+}
+
+
+void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body)
+{
+ if (!body->isStaticOrKinematicObject() && !(body->getFlags() &BT_DISABLE_WORLD_GRAVITY))
+ {
+ body->setGravity(m_gravity);
+ }
+
+ if (body->getCollisionShape())
+ {
+ if (!body->isStaticObject())
+ {
+ m_nonStaticRigidBodies.push_back(body);
+ } else
+ {
+ body->setActivationState(ISLAND_SLEEPING);
+ }
+
+ bool isDynamic = !(body->isStaticObject() || body->isKinematicObject());
+ short collisionFilterGroup = isDynamic? short(btBroadphaseProxy::DefaultFilter) : short(btBroadphaseProxy::StaticFilter);
+ short collisionFilterMask = isDynamic? short(btBroadphaseProxy::AllFilter) : short(btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter);
+
+ addCollisionObject(body,collisionFilterGroup,collisionFilterMask);
+ }
+}
+
+void btDiscreteDynamicsWorld::addRigidBody(btRigidBody* body, short group, short mask)
+{
+ if (!body->isStaticOrKinematicObject() && !(body->getFlags() &BT_DISABLE_WORLD_GRAVITY))
+ {
+ body->setGravity(m_gravity);
+ }
+
+ if (body->getCollisionShape())
+ {
+ if (!body->isStaticObject())
+ {
+ m_nonStaticRigidBodies.push_back(body);
+ }
+ else
+ {
+ body->setActivationState(ISLAND_SLEEPING);
+ }
+ addCollisionObject(body,group,mask);
+ }
+}
+
+
+void btDiscreteDynamicsWorld::updateActions(btScalar timeStep)
+{
+ BT_PROFILE("updateActions");
+
+ for ( int i=0;i<m_actions.size();i++)
+ {
+ m_actions[i]->updateAction( this, timeStep);
+ }
+}
+
+
+void btDiscreteDynamicsWorld::updateActivationState(btScalar timeStep)
+{
+ BT_PROFILE("updateActivationState");
+
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ if (body)
+ {
+ body->updateDeactivation(timeStep);
+
+ if (body->wantsSleeping())
+ {
+ if (body->isStaticOrKinematicObject())
+ {
+ body->setActivationState(ISLAND_SLEEPING);
+ } else
+ {
+ if (body->getActivationState() == ACTIVE_TAG)
+ body->setActivationState( WANTS_DEACTIVATION );
+ if (body->getActivationState() == ISLAND_SLEEPING)
+ {
+ body->setAngularVelocity(btVector3(0,0,0));
+ body->setLinearVelocity(btVector3(0,0,0));
+ }
+
+ }
+ } else
+ {
+ if (body->getActivationState() != DISABLE_DEACTIVATION)
+ body->setActivationState( ACTIVE_TAG );
+ }
+ }
+ }
+}
+
+void btDiscreteDynamicsWorld::addConstraint(btTypedConstraint* constraint,bool disableCollisionsBetweenLinkedBodies)
+{
+ m_constraints.push_back(constraint);
+ if (disableCollisionsBetweenLinkedBodies)
+ {
+ constraint->getRigidBodyA().addConstraintRef(constraint);
+ constraint->getRigidBodyB().addConstraintRef(constraint);
+ }
+}
+
+void btDiscreteDynamicsWorld::removeConstraint(btTypedConstraint* constraint)
+{
+ m_constraints.remove(constraint);
+ constraint->getRigidBodyA().removeConstraintRef(constraint);
+ constraint->getRigidBodyB().removeConstraintRef(constraint);
+}
+
+void btDiscreteDynamicsWorld::addAction(btActionInterface* action)
+{
+ m_actions.push_back(action);
+}
+
+void btDiscreteDynamicsWorld::removeAction(btActionInterface* action)
+{
+ m_actions.remove(action);
+}
+
+
+void btDiscreteDynamicsWorld::addVehicle(btActionInterface* vehicle)
+{
+ addAction(vehicle);
+}
+
+void btDiscreteDynamicsWorld::removeVehicle(btActionInterface* vehicle)
+{
+ removeAction(vehicle);
+}
+
+void btDiscreteDynamicsWorld::addCharacter(btActionInterface* character)
+{
+ addAction(character);
+}
+
+void btDiscreteDynamicsWorld::removeCharacter(btActionInterface* character)
+{
+ removeAction(character);
+}
+
+
+SIMD_FORCE_INLINE int btGetConstraintIslandId(const btTypedConstraint* lhs)
+{
+ int islandId;
+
+ const btCollisionObject& rcolObj0 = lhs->getRigidBodyA();
+ const btCollisionObject& rcolObj1 = lhs->getRigidBodyB();
+ islandId= rcolObj0.getIslandTag()>=0?rcolObj0.getIslandTag():rcolObj1.getIslandTag();
+ return islandId;
+
+}
+
+
+class btSortConstraintOnIslandPredicate
+{
+ public:
+
+ bool operator() ( const btTypedConstraint* lhs, const btTypedConstraint* rhs )
+ {
+ int rIslandId0,lIslandId0;
+ rIslandId0 = btGetConstraintIslandId(rhs);
+ lIslandId0 = btGetConstraintIslandId(lhs);
+ return lIslandId0 < rIslandId0;
+ }
+};
+
+
+
+void btDiscreteDynamicsWorld::solveConstraints(btContactSolverInfo& solverInfo)
+{
+ BT_PROFILE("solveConstraints");
+
+ struct InplaceSolverIslandCallback : public btSimulationIslandManager::IslandCallback
+ {
+
+ btContactSolverInfo& m_solverInfo;
+ btConstraintSolver* m_solver;
+ btTypedConstraint** m_sortedConstraints;
+ int m_numConstraints;
+ btIDebugDraw* m_debugDrawer;
+ btStackAlloc* m_stackAlloc;
+ btDispatcher* m_dispatcher;
+
+ btAlignedObjectArray<btCollisionObject*> m_bodies;
+ btAlignedObjectArray<btPersistentManifold*> m_manifolds;
+ btAlignedObjectArray<btTypedConstraint*> m_constraints;
+
+
+ InplaceSolverIslandCallback(
+ btContactSolverInfo& solverInfo,
+ btConstraintSolver* solver,
+ btTypedConstraint** sortedConstraints,
+ int numConstraints,
+ btIDebugDraw* debugDrawer,
+ btStackAlloc* stackAlloc,
+ btDispatcher* dispatcher)
+ :m_solverInfo(solverInfo),
+ m_solver(solver),
+ m_sortedConstraints(sortedConstraints),
+ m_numConstraints(numConstraints),
+ m_debugDrawer(debugDrawer),
+ m_stackAlloc(stackAlloc),
+ m_dispatcher(dispatcher)
+ {
+
+ }
+
+
+ InplaceSolverIslandCallback& operator=(InplaceSolverIslandCallback& other)
+ {
+ btAssert(0);
+ (void)other;
+ return *this;
+ }
+ virtual void ProcessIsland(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifolds,int numManifolds, int islandId)
+ {
+ if (islandId<0)
+ {
+ if (numManifolds + m_numConstraints)
+ {
+ ///we don't split islands, so all constraints/contact manifolds/bodies are passed into the solver regardless the island id
+ m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,&m_sortedConstraints[0],m_numConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher);
+ }
+ } else
+ {
+ //also add all non-contact constraints/joints for this island
+ btTypedConstraint** startConstraint = 0;
+ int numCurConstraints = 0;
+ int i;
+
+ //find the first constraint for this island
+ for (i=0;i<m_numConstraints;i++)
+ {
+ if (btGetConstraintIslandId(m_sortedConstraints[i]) == islandId)
+ {
+ startConstraint = &m_sortedConstraints[i];
+ break;
+ }
+ }
+ //count the number of constraints in this island
+ for (;i<m_numConstraints;i++)
+ {
+ if (btGetConstraintIslandId(m_sortedConstraints[i]) == islandId)
+ {
+ numCurConstraints++;
+ }
+ }
+
+ if (m_solverInfo.m_minimumSolverBatchSize<=1)
+ {
+ ///only call solveGroup if there is some work: avoid virtual function call, its overhead can be excessive
+ if (numManifolds + numCurConstraints)
+ {
+ m_solver->solveGroup( bodies,numBodies,manifolds, numManifolds,startConstraint,numCurConstraints,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher);
+ }
+ } else
+ {
+
+ for (i=0;i<numBodies;i++)
+ m_bodies.push_back(bodies[i]);
+ for (i=0;i<numManifolds;i++)
+ m_manifolds.push_back(manifolds[i]);
+ for (i=0;i<numCurConstraints;i++)
+ m_constraints.push_back(startConstraint[i]);
+ if ((m_constraints.size()+m_manifolds.size())>m_solverInfo.m_minimumSolverBatchSize)
+ {
+ processConstraints();
+ } else
+ {
+ //printf("deferred\n");
+ }
+ }
+ }
+ }
+ void processConstraints()
+ {
+ if (m_manifolds.size() + m_constraints.size()>0)
+ {
+ m_solver->solveGroup( &m_bodies[0],m_bodies.size(), &m_manifolds[0], m_manifolds.size(), &m_constraints[0], m_constraints.size() ,m_solverInfo,m_debugDrawer,m_stackAlloc,m_dispatcher);
+ }
+ m_bodies.resize(0);
+ m_manifolds.resize(0);
+ m_constraints.resize(0);
+
+ }
+
+ };
+
+
+
+ //sorted version of all btTypedConstraint, based on islandId
+ btAlignedObjectArray<btTypedConstraint*> sortedConstraints;
+ sortedConstraints.resize( m_constraints.size());
+ int i;
+ for (i=0;i<getNumConstraints();i++)
+ {
+ sortedConstraints[i] = m_constraints[i];
+ }
+
+// btAssert(0);
+
+
+
+ sortedConstraints.quickSort(btSortConstraintOnIslandPredicate());
+
+ btTypedConstraint** constraintsPtr = getNumConstraints() ? &sortedConstraints[0] : 0;
+
+ InplaceSolverIslandCallback solverCallback( solverInfo, m_constraintSolver, constraintsPtr,sortedConstraints.size(), m_debugDrawer,m_stackAlloc,m_dispatcher1);
+
+ m_constraintSolver->prepareSolve(getCollisionWorld()->getNumCollisionObjects(), getCollisionWorld()->getDispatcher()->getNumManifolds());
+
+ /// solve all the constraints for this island
+ m_islandManager->buildAndProcessIslands(getCollisionWorld()->getDispatcher(),getCollisionWorld(),&solverCallback);
+
+ solverCallback.processConstraints();
+
+ m_constraintSolver->allSolved(solverInfo, m_debugDrawer, m_stackAlloc);
+}
+
+
+
+
+void btDiscreteDynamicsWorld::calculateSimulationIslands()
+{
+ BT_PROFILE("calculateSimulationIslands");
+
+ getSimulationIslandManager()->updateActivationState(getCollisionWorld(),getCollisionWorld()->getDispatcher());
+
+ {
+ int i;
+ int numConstraints = int(m_constraints.size());
+ for (i=0;i< numConstraints ; i++ )
+ {
+ btTypedConstraint* constraint = m_constraints[i];
+
+ const btRigidBody* colObj0 = &constraint->getRigidBodyA();
+ const btRigidBody* colObj1 = &constraint->getRigidBodyB();
+
+ if (((colObj0) && (!(colObj0)->isStaticOrKinematicObject())) &&
+ ((colObj1) && (!(colObj1)->isStaticOrKinematicObject())))
+ {
+ if (colObj0->isActive() || colObj1->isActive())
+ {
+
+ getSimulationIslandManager()->getUnionFind().unite((colObj0)->getIslandTag(),
+ (colObj1)->getIslandTag());
+ }
+ }
+ }
+ }
+
+ //Store the island id in each body
+ getSimulationIslandManager()->storeIslandActivationState(getCollisionWorld());
+
+
+}
+
+
+
+
+class btClosestNotMeConvexResultCallback : public btCollisionWorld::ClosestConvexResultCallback
+{
+public:
+
+ btCollisionObject* m_me;
+ btScalar m_allowedPenetration;
+ btOverlappingPairCache* m_pairCache;
+ btDispatcher* m_dispatcher;
+
+public:
+ btClosestNotMeConvexResultCallback (btCollisionObject* me,const btVector3& fromA,const btVector3& toA,btOverlappingPairCache* pairCache,btDispatcher* dispatcher) :
+ btCollisionWorld::ClosestConvexResultCallback(fromA,toA),
+ m_me(me),
+ m_allowedPenetration(0.0f),
+ m_pairCache(pairCache),
+ m_dispatcher(dispatcher)
+ {
+ }
+
+ virtual btScalar addSingleResult(btCollisionWorld::LocalConvexResult& convexResult,bool normalInWorldSpace)
+ {
+ if (convexResult.m_hitCollisionObject == m_me)
+ return 1.0f;
+
+ //ignore result if there is no contact response
+ if(!convexResult.m_hitCollisionObject->hasContactResponse())
+ return 1.0f;
+
+ btVector3 linVelA,linVelB;
+ linVelA = m_convexToWorld-m_convexFromWorld;
+ linVelB = btVector3(0,0,0);//toB.getOrigin()-fromB.getOrigin();
+
+ btVector3 relativeVelocity = (linVelA-linVelB);
+ //don't report time of impact for motion away from the contact normal (or causes minor penetration)
+ if (convexResult.m_hitNormalLocal.dot(relativeVelocity)>=-m_allowedPenetration)
+ return 1.f;
+
+ return ClosestConvexResultCallback::addSingleResult (convexResult, normalInWorldSpace);
+ }
+
+ virtual bool needsCollision(btBroadphaseProxy* proxy0) const
+ {
+ //don't collide with itself
+ if (proxy0->m_clientObject == m_me)
+ return false;
+
+ ///don't do CCD when the collision filters are not matching
+ if (!ClosestConvexResultCallback::needsCollision(proxy0))
+ return false;
+
+ btCollisionObject* otherObj = (btCollisionObject*) proxy0->m_clientObject;
+
+ //call needsResponse, see http://code.google.com/p/bullet/issues/detail?id=179
+ if (m_dispatcher->needsResponse(m_me,otherObj))
+ {
+#if 0
+ ///don't do CCD when there are already contact points (touching contact/penetration)
+ btAlignedObjectArray<btPersistentManifold*> manifoldArray;
+ btBroadphasePair* collisionPair = m_pairCache->findPair(m_me->getBroadphaseHandle(),proxy0);
+ if (collisionPair)
+ {
+ if (collisionPair->m_algorithm)
+ {
+ manifoldArray.resize(0);
+ collisionPair->m_algorithm->getAllContactManifolds(manifoldArray);
+ for (int j=0;j<manifoldArray.size();j++)
+ {
+ btPersistentManifold* manifold = manifoldArray[j];
+ if (manifold->getNumContacts()>0)
+ return false;
+ }
+ }
+ }
+#endif
+ return true;
+ }
+
+ return false;
+ }
+
+
+};
+
+///internal debugging variable. this value shouldn't be too high
+int gNumClampedCcdMotions=0;
+
+void btDiscreteDynamicsWorld::integrateTransforms(btScalar timeStep)
+{
+ BT_PROFILE("integrateTransforms");
+ btTransform predictedTrans;
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ body->setHitFraction(1.f);
+
+ if (body->isActive() && (!body->isStaticOrKinematicObject()))
+ {
+
+ body->predictIntegratedTransform(timeStep, predictedTrans);
+
+ btScalar squareMotion = (predictedTrans.getOrigin()-body->getWorldTransform().getOrigin()).length2();
+
+
+
+ if (getDispatchInfo().m_useContinuous && body->getCcdSquareMotionThreshold() && body->getCcdSquareMotionThreshold() < squareMotion)
+ {
+ BT_PROFILE("CCD motion clamping");
+ if (body->getCollisionShape()->isConvex())
+ {
+ gNumClampedCcdMotions++;
+#ifdef USE_STATIC_ONLY
+ class StaticOnlyCallback : public btClosestNotMeConvexResultCallback
+ {
+ public:
+
+ StaticOnlyCallback (btCollisionObject* me,const btVector3& fromA,const btVector3& toA,btOverlappingPairCache* pairCache,btDispatcher* dispatcher) :
+ btClosestNotMeConvexResultCallback(me,fromA,toA,pairCache,dispatcher)
+ {
+ }
+
+ virtual bool needsCollision(btBroadphaseProxy* proxy0) const
+ {
+ btCollisionObject* otherObj = (btCollisionObject*) proxy0->m_clientObject;
+ if (!otherObj->isStaticOrKinematicObject())
+ return false;
+ return btClosestNotMeConvexResultCallback::needsCollision(proxy0);
+ }
+ };
+
+ StaticOnlyCallback sweepResults(body,body->getWorldTransform().getOrigin(),predictedTrans.getOrigin(),getBroadphase()->getOverlappingPairCache(),getDispatcher());
+#else
+ btClosestNotMeConvexResultCallback sweepResults(body,body->getWorldTransform().getOrigin(),predictedTrans.getOrigin(),getBroadphase()->getOverlappingPairCache(),getDispatcher());
+#endif
+ //btConvexShape* convexShape = static_cast<btConvexShape*>(body->getCollisionShape());
+ btSphereShape tmpSphere(body->getCcdSweptSphereRadius());//btConvexShape* convexShape = static_cast<btConvexShape*>(body->getCollisionShape());
+ sweepResults.m_allowedPenetration=getDispatchInfo().m_allowedCcdPenetration;
+
+ sweepResults.m_collisionFilterGroup = body->getBroadphaseProxy()->m_collisionFilterGroup;
+ sweepResults.m_collisionFilterMask = body->getBroadphaseProxy()->m_collisionFilterMask;
+ btTransform modifiedPredictedTrans = predictedTrans;
+ modifiedPredictedTrans.setBasis(body->getWorldTransform().getBasis());
+
+ convexSweepTest(&tmpSphere,body->getWorldTransform(),modifiedPredictedTrans,sweepResults);
+ if (sweepResults.hasHit() && (sweepResults.m_closestHitFraction < 1.f))
+ {
+
+ //printf("clamped integration to hit fraction = %f\n",fraction);
+ body->setHitFraction(sweepResults.m_closestHitFraction);
+ body->predictIntegratedTransform(timeStep*body->getHitFraction(), predictedTrans);
+ body->setHitFraction(0.f);
+ body->proceedToTransform( predictedTrans);
+
+#if 0
+ btVector3 linVel = body->getLinearVelocity();
+
+ btScalar maxSpeed = body->getCcdMotionThreshold()/getSolverInfo().m_timeStep;
+ btScalar maxSpeedSqr = maxSpeed*maxSpeed;
+ if (linVel.length2()>maxSpeedSqr)
+ {
+ linVel.normalize();
+ linVel*= maxSpeed;
+ body->setLinearVelocity(linVel);
+ btScalar ms2 = body->getLinearVelocity().length2();
+ body->predictIntegratedTransform(timeStep, predictedTrans);
+
+ btScalar sm2 = (predictedTrans.getOrigin()-body->getWorldTransform().getOrigin()).length2();
+ btScalar smt = body->getCcdSquareMotionThreshold();
+ printf("sm2=%f\n",sm2);
+ }
+#else
+ //response between two dynamic objects without friction, assuming 0 penetration depth
+ btScalar appliedImpulse = 0.f;
+ btScalar depth = 0.f;
+ appliedImpulse = resolveSingleCollision(body,sweepResults.m_hitCollisionObject,sweepResults.m_hitPointWorld,sweepResults.m_hitNormalWorld,getSolverInfo(), depth);
+
+
+#endif
+
+ continue;
+ }
+ }
+ }
+
+
+ body->proceedToTransform( predictedTrans);
+ }
+ }
+}
+
+void btDiscreteDynamicsWorld::addSpeculativeContacts(btScalar timeStep)
+{
+ BT_PROFILE("addSpeculativeContacts");
+ btTransform predictedTrans;
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ body->setHitFraction(1.f);
+
+ if (body->isActive() && (!body->isStaticOrKinematicObject()))
+ {
+ body->predictIntegratedTransform(timeStep, predictedTrans);
+ btScalar squareMotion = (predictedTrans.getOrigin()-body->getWorldTransform().getOrigin()).length2();
+
+ if (body->getCcdSquareMotionThreshold() && body->getCcdSquareMotionThreshold() < squareMotion)
+ {
+ BT_PROFILE("search speculative contacts");
+ if (body->getCollisionShape()->isConvex())
+ {
+ gNumClampedCcdMotions++;
+
+ btClosestNotMeConvexResultCallback sweepResults(body,body->getWorldTransform().getOrigin(),predictedTrans.getOrigin(),getBroadphase()->getOverlappingPairCache(),getDispatcher());
+ //btConvexShape* convexShape = static_cast<btConvexShape*>(body->getCollisionShape());
+ btSphereShape tmpSphere(body->getCcdSweptSphereRadius());//btConvexShape* convexShape = static_cast<btConvexShape*>(body->getCollisionShape());
+
+ sweepResults.m_collisionFilterGroup = body->getBroadphaseProxy()->m_collisionFilterGroup;
+ sweepResults.m_collisionFilterMask = body->getBroadphaseProxy()->m_collisionFilterMask;
+ btTransform modifiedPredictedTrans;
+ modifiedPredictedTrans = predictedTrans;
+ modifiedPredictedTrans.setBasis(body->getWorldTransform().getBasis());
+
+ convexSweepTest(&tmpSphere,body->getWorldTransform(),modifiedPredictedTrans,sweepResults);
+ if (sweepResults.hasHit() && (sweepResults.m_closestHitFraction < 1.f))
+ {
+ btBroadphaseProxy* proxy0 = body->getBroadphaseHandle();
+ btBroadphaseProxy* proxy1 = sweepResults.m_hitCollisionObject->getBroadphaseHandle();
+ btBroadphasePair* pair = sweepResults.m_pairCache->findPair(proxy0,proxy1);
+ if (pair)
+ {
+ if (pair->m_algorithm)
+ {
+ btManifoldArray contacts;
+ pair->m_algorithm->getAllContactManifolds(contacts);
+ if (contacts.size())
+ {
+ btManifoldResult result(body,sweepResults.m_hitCollisionObject);
+ result.setPersistentManifold(contacts[0]);
+
+ btVector3 vec = (modifiedPredictedTrans.getOrigin()-body->getWorldTransform().getOrigin());
+ vec*=sweepResults.m_closestHitFraction;
+
+ btScalar lenSqr = vec.length2();
+ btScalar depth = 0.f;
+ btVector3 pointWorld = sweepResults.m_hitPointWorld;
+ if (lenSqr>SIMD_EPSILON)
+ {
+ depth = btSqrt(lenSqr);
+ pointWorld -= vec;
+ vec /= depth;
+ }
+
+ if (contacts[0]->getBody0()==body)
+ {
+ result.addContactPoint(sweepResults.m_hitNormalWorld,pointWorld,depth);
+#if 0
+ debugContacts.push_back(sweepResults.m_hitPointWorld);//sweepResults.m_hitPointWorld);
+ debugNormals.push_back(sweepResults.m_hitNormalWorld);
+#endif
+ } else
+ {
+ //swapped
+ result.addContactPoint(-sweepResults.m_hitNormalWorld,pointWorld,depth);
+ //sweepResults.m_hitPointWorld,depth);
+
+#if 0
+ if (1)//firstHit==1)
+ {
+ firstHit=0;
+ debugNormals.push_back(sweepResults.m_hitNormalWorld);
+ debugContacts.push_back(pointWorld);//sweepResults.m_hitPointWorld);
+ debugNormals.push_back(sweepResults.m_hitNormalWorld);
+ debugContacts.push_back(sweepResults.m_hitPointWorld);
+ }
+ firstHit--;
+#endif
+ }
+ }
+
+ } else
+ {
+ //no algorithm, use dispatcher to create one
+
+ }
+
+
+ } else
+ {
+ //add an overlapping pair
+ //printf("pair missing\n");
+
+ }
+ }
+ }
+ }
+
+ }
+ }
+}
+
+
+
+
+
+void btDiscreteDynamicsWorld::predictUnconstraintMotion(btScalar timeStep)
+{
+ BT_PROFILE("predictUnconstraintMotion");
+ for ( int i=0;i<m_nonStaticRigidBodies.size();i++)
+ {
+ btRigidBody* body = m_nonStaticRigidBodies[i];
+ if (!body->isStaticOrKinematicObject())
+ {
+ body->integrateVelocities( timeStep);
+ //damping
+ body->applyDamping(timeStep);
+
+ body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform());
+ }
+ }
+}
+
+
+void btDiscreteDynamicsWorld::startProfiling(btScalar timeStep)
+{
+ (void)timeStep;
+
+#ifndef BT_NO_PROFILE
+ CProfileManager::Reset();
+#endif //BT_NO_PROFILE
+
+}
+
+
+
+
+
+
+void btDiscreteDynamicsWorld::debugDrawConstraint(btTypedConstraint* constraint)
+{
+ bool drawFrames = (getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawConstraints) != 0;
+ bool drawLimits = (getDebugDrawer()->getDebugMode() & btIDebugDraw::DBG_DrawConstraintLimits) != 0;
+ btScalar dbgDrawSize = constraint->getDbgDrawSize();
+ if(dbgDrawSize <= btScalar(0.f))
+ {
+ return;
+ }
+
+ switch(constraint->getConstraintType())
+ {
+ case POINT2POINT_CONSTRAINT_TYPE:
+ {
+ btPoint2PointConstraint* p2pC = (btPoint2PointConstraint*)constraint;
+ btTransform tr;
+ tr.setIdentity();
+ btVector3 pivot = p2pC->getPivotInA();
+ pivot = p2pC->getRigidBodyA().getCenterOfMassTransform() * pivot;
+ tr.setOrigin(pivot);
+ getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ // that ideally should draw the same frame
+ pivot = p2pC->getPivotInB();
+ pivot = p2pC->getRigidBodyB().getCenterOfMassTransform() * pivot;
+ tr.setOrigin(pivot);
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ }
+ break;
+ case HINGE_CONSTRAINT_TYPE:
+ {
+ btHingeConstraint* pHinge = (btHingeConstraint*)constraint;
+ btTransform tr = pHinge->getRigidBodyA().getCenterOfMassTransform() * pHinge->getAFrame();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ tr = pHinge->getRigidBodyB().getCenterOfMassTransform() * pHinge->getBFrame();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ btScalar minAng = pHinge->getLowerLimit();
+ btScalar maxAng = pHinge->getUpperLimit();
+ if(minAng == maxAng)
+ {
+ break;
+ }
+ bool drawSect = true;
+ if(minAng > maxAng)
+ {
+ minAng = btScalar(0.f);
+ maxAng = SIMD_2_PI;
+ drawSect = false;
+ }
+ if(drawLimits)
+ {
+ btVector3& center = tr.getOrigin();
+ btVector3 normal = tr.getBasis().getColumn(2);
+ btVector3 axis = tr.getBasis().getColumn(0);
+ getDebugDrawer()->drawArc(center, normal, axis, dbgDrawSize, dbgDrawSize, minAng, maxAng, btVector3(0,0,0), drawSect);
+ }
+ }
+ break;
+ case CONETWIST_CONSTRAINT_TYPE:
+ {
+ btConeTwistConstraint* pCT = (btConeTwistConstraint*)constraint;
+ btTransform tr = pCT->getRigidBodyA().getCenterOfMassTransform() * pCT->getAFrame();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ tr = pCT->getRigidBodyB().getCenterOfMassTransform() * pCT->getBFrame();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ if(drawLimits)
+ {
+ //const btScalar length = btScalar(5);
+ const btScalar length = dbgDrawSize;
+ static int nSegments = 8*4;
+ btScalar fAngleInRadians = btScalar(2.*3.1415926) * (btScalar)(nSegments-1)/btScalar(nSegments);
+ btVector3 pPrev = pCT->GetPointForAngle(fAngleInRadians, length);
+ pPrev = tr * pPrev;
+ for (int i=0; i<nSegments; i++)
+ {
+ fAngleInRadians = btScalar(2.*3.1415926) * (btScalar)i/btScalar(nSegments);
+ btVector3 pCur = pCT->GetPointForAngle(fAngleInRadians, length);
+ pCur = tr * pCur;
+ getDebugDrawer()->drawLine(pPrev, pCur, btVector3(0,0,0));
+
+ if (i%(nSegments/8) == 0)
+ getDebugDrawer()->drawLine(tr.getOrigin(), pCur, btVector3(0,0,0));
+
+ pPrev = pCur;
+ }
+ btScalar tws = pCT->getTwistSpan();
+ btScalar twa = pCT->getTwistAngle();
+ bool useFrameB = (pCT->getRigidBodyB().getInvMass() > btScalar(0.f));
+ if(useFrameB)
+ {
+ tr = pCT->getRigidBodyB().getCenterOfMassTransform() * pCT->getBFrame();
+ }
+ else
+ {
+ tr = pCT->getRigidBodyA().getCenterOfMassTransform() * pCT->getAFrame();
+ }
+ btVector3 pivot = tr.getOrigin();
+ btVector3 normal = tr.getBasis().getColumn(0);
+ btVector3 axis1 = tr.getBasis().getColumn(1);
+ getDebugDrawer()->drawArc(pivot, normal, axis1, dbgDrawSize, dbgDrawSize, -twa-tws, -twa+tws, btVector3(0,0,0), true);
+
+ }
+ }
+ break;
+ case D6_SPRING_CONSTRAINT_TYPE:
+ case D6_CONSTRAINT_TYPE:
+ {
+ btGeneric6DofConstraint* p6DOF = (btGeneric6DofConstraint*)constraint;
+ btTransform tr = p6DOF->getCalculatedTransformA();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ tr = p6DOF->getCalculatedTransformB();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ if(drawLimits)
+ {
+ tr = p6DOF->getCalculatedTransformA();
+ const btVector3& center = p6DOF->getCalculatedTransformB().getOrigin();
+ btVector3 up = tr.getBasis().getColumn(2);
+ btVector3 axis = tr.getBasis().getColumn(0);
+ btScalar minTh = p6DOF->getRotationalLimitMotor(1)->m_loLimit;
+ btScalar maxTh = p6DOF->getRotationalLimitMotor(1)->m_hiLimit;
+ btScalar minPs = p6DOF->getRotationalLimitMotor(2)->m_loLimit;
+ btScalar maxPs = p6DOF->getRotationalLimitMotor(2)->m_hiLimit;
+ getDebugDrawer()->drawSpherePatch(center, up, axis, dbgDrawSize * btScalar(.9f), minTh, maxTh, minPs, maxPs, btVector3(0,0,0));
+ axis = tr.getBasis().getColumn(1);
+ btScalar ay = p6DOF->getAngle(1);
+ btScalar az = p6DOF->getAngle(2);
+ btScalar cy = btCos(ay);
+ btScalar sy = btSin(ay);
+ btScalar cz = btCos(az);
+ btScalar sz = btSin(az);
+ btVector3 ref;
+ ref[0] = cy*cz*axis[0] + cy*sz*axis[1] - sy*axis[2];
+ ref[1] = -sz*axis[0] + cz*axis[1];
+ ref[2] = cz*sy*axis[0] + sz*sy*axis[1] + cy*axis[2];
+ tr = p6DOF->getCalculatedTransformB();
+ btVector3 normal = -tr.getBasis().getColumn(0);
+ btScalar minFi = p6DOF->getRotationalLimitMotor(0)->m_loLimit;
+ btScalar maxFi = p6DOF->getRotationalLimitMotor(0)->m_hiLimit;
+ if(minFi > maxFi)
+ {
+ getDebugDrawer()->drawArc(center, normal, ref, dbgDrawSize, dbgDrawSize, -SIMD_PI, SIMD_PI, btVector3(0,0,0), false);
+ }
+ else if(minFi < maxFi)
+ {
+ getDebugDrawer()->drawArc(center, normal, ref, dbgDrawSize, dbgDrawSize, minFi, maxFi, btVector3(0,0,0), true);
+ }
+ tr = p6DOF->getCalculatedTransformA();
+ btVector3 bbMin = p6DOF->getTranslationalLimitMotor()->m_lowerLimit;
+ btVector3 bbMax = p6DOF->getTranslationalLimitMotor()->m_upperLimit;
+ getDebugDrawer()->drawBox(bbMin, bbMax, tr, btVector3(0,0,0));
+ }
+ }
+ break;
+ case SLIDER_CONSTRAINT_TYPE:
+ {
+ btSliderConstraint* pSlider = (btSliderConstraint*)constraint;
+ btTransform tr = pSlider->getCalculatedTransformA();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ tr = pSlider->getCalculatedTransformB();
+ if(drawFrames) getDebugDrawer()->drawTransform(tr, dbgDrawSize);
+ if(drawLimits)
+ {
+ btTransform tr = pSlider->getUseLinearReferenceFrameA() ? pSlider->getCalculatedTransformA() : pSlider->getCalculatedTransformB();
+ btVector3 li_min = tr * btVector3(pSlider->getLowerLinLimit(), 0.f, 0.f);
+ btVector3 li_max = tr * btVector3(pSlider->getUpperLinLimit(), 0.f, 0.f);
+ getDebugDrawer()->drawLine(li_min, li_max, btVector3(0, 0, 0));
+ btVector3 normal = tr.getBasis().getColumn(0);
+ btVector3 axis = tr.getBasis().getColumn(1);
+ btScalar a_min = pSlider->getLowerAngLimit();
+ btScalar a_max = pSlider->getUpperAngLimit();
+ const btVector3& center = pSlider->getCalculatedTransformB().getOrigin();
+ getDebugDrawer()->drawArc(center, normal, axis, dbgDrawSize, dbgDrawSize, a_min, a_max, btVector3(0,0,0), true);
+ }
+ }
+ break;
+ default :
+ break;
+ }
+ return;
+}
+
+
+
+
+
+void btDiscreteDynamicsWorld::setConstraintSolver(btConstraintSolver* solver)
+{
+ if (m_ownsConstraintSolver)
+ {
+ btAlignedFree( m_constraintSolver);
+ }
+ m_ownsConstraintSolver = false;
+ m_constraintSolver = solver;
+}
+
+btConstraintSolver* btDiscreteDynamicsWorld::getConstraintSolver()
+{
+ return m_constraintSolver;
+}
+
+
+int btDiscreteDynamicsWorld::getNumConstraints() const
+{
+ return int(m_constraints.size());
+}
+btTypedConstraint* btDiscreteDynamicsWorld::getConstraint(int index)
+{
+ return m_constraints[index];
+}
+const btTypedConstraint* btDiscreteDynamicsWorld::getConstraint(int index) const
+{
+ return m_constraints[index];
+}
+
+
+
+void btDiscreteDynamicsWorld::serializeRigidBodies(btSerializer* serializer)
+{
+ int i;
+ //serialize all collision objects
+ for (i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ if (colObj->getInternalType() & btCollisionObject::CO_RIGID_BODY)
+ {
+ int len = colObj->calculateSerializeBufferSize();
+ btChunk* chunk = serializer->allocate(len,1);
+ const char* structType = colObj->serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_RIGIDBODY_CODE,colObj);
+ }
+ }
+
+ for (i=0;i<m_constraints.size();i++)
+ {
+ btTypedConstraint* constraint = m_constraints[i];
+ int size = constraint->calculateSerializeBufferSize();
+ btChunk* chunk = serializer->allocate(size,1);
+ const char* structType = constraint->serialize(chunk->m_oldPtr,serializer);
+ serializer->finalizeChunk(chunk,structType,BT_CONSTRAINT_CODE,constraint);
+ }
+}
+
+
+void btDiscreteDynamicsWorld::serialize(btSerializer* serializer)
+{
+
+ serializer->startSerialization();
+
+ serializeRigidBodies(serializer);
+
+ serializeCollisionObjects(serializer);
+
+ serializer->finishSerialization();
+}
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h b/tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h
new file mode 100644
index 00000000..3ba39a1c
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h
@@ -0,0 +1,200 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_DISCRETE_DYNAMICS_WORLD_H
+#define BT_DISCRETE_DYNAMICS_WORLD_H
+
+#include "btDynamicsWorld.h"
+
+class btDispatcher;
+class btOverlappingPairCache;
+class btConstraintSolver;
+class btSimulationIslandManager;
+class btTypedConstraint;
+class btActionInterface;
+
+class btIDebugDraw;
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+///btDiscreteDynamicsWorld provides discrete rigid body simulation
+///those classes replace the obsolete CcdPhysicsEnvironment/CcdPhysicsController
+class btDiscreteDynamicsWorld : public btDynamicsWorld
+{
+protected:
+
+ btConstraintSolver* m_constraintSolver;
+
+ btSimulationIslandManager* m_islandManager;
+
+ btAlignedObjectArray<btTypedConstraint*> m_constraints;
+
+ btAlignedObjectArray<btRigidBody*> m_nonStaticRigidBodies;
+
+ btVector3 m_gravity;
+
+ //for variable timesteps
+ btScalar m_localTime;
+ //for variable timesteps
+
+ bool m_ownsIslandManager;
+ bool m_ownsConstraintSolver;
+ bool m_synchronizeAllMotionStates;
+
+ btAlignedObjectArray<btActionInterface*> m_actions;
+
+ int m_profileTimings;
+
+ virtual void predictUnconstraintMotion(btScalar timeStep);
+
+ virtual void integrateTransforms(btScalar timeStep);
+
+ virtual void addSpeculativeContacts(btScalar timeStep);
+
+ virtual void calculateSimulationIslands();
+
+ virtual void solveConstraints(btContactSolverInfo& solverInfo);
+
+ void updateActivationState(btScalar timeStep);
+
+ void updateActions(btScalar timeStep);
+
+ void startProfiling(btScalar timeStep);
+
+ virtual void internalSingleStepSimulation( btScalar timeStep);
+
+
+ virtual void saveKinematicState(btScalar timeStep);
+
+ void serializeRigidBodies(btSerializer* serializer);
+
+public:
+
+
+ ///this btDiscreteDynamicsWorld constructor gets created objects from the user, and will not delete those
+ btDiscreteDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration);
+
+ virtual ~btDiscreteDynamicsWorld();
+
+ ///if maxSubSteps > 0, it will interpolate motion between fixedTimeStep's
+ virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.));
+
+
+ virtual void synchronizeMotionStates();
+
+ ///this can be useful to synchronize a single rigid body -> graphics object
+ void synchronizeSingleMotionState(btRigidBody* body);
+
+ virtual void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false);
+
+ virtual void removeConstraint(btTypedConstraint* constraint);
+
+ virtual void addAction(btActionInterface*);
+
+ virtual void removeAction(btActionInterface*);
+
+ btSimulationIslandManager* getSimulationIslandManager()
+ {
+ return m_islandManager;
+ }
+
+ const btSimulationIslandManager* getSimulationIslandManager() const
+ {
+ return m_islandManager;
+ }
+
+ btCollisionWorld* getCollisionWorld()
+ {
+ return this;
+ }
+
+ virtual void setGravity(const btVector3& gravity);
+
+ virtual btVector3 getGravity () const;
+
+ virtual void addCollisionObject(btCollisionObject* collisionObject,short int collisionFilterGroup=btBroadphaseProxy::StaticFilter,short int collisionFilterMask=btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter);
+
+ virtual void addRigidBody(btRigidBody* body);
+
+ virtual void addRigidBody(btRigidBody* body, short group, short mask);
+
+ virtual void removeRigidBody(btRigidBody* body);
+
+ ///removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObject
+ virtual void removeCollisionObject(btCollisionObject* collisionObject);
+
+
+ void debugDrawConstraint(btTypedConstraint* constraint);
+
+ virtual void debugDrawWorld();
+
+ virtual void setConstraintSolver(btConstraintSolver* solver);
+
+ virtual btConstraintSolver* getConstraintSolver();
+
+ virtual int getNumConstraints() const;
+
+ virtual btTypedConstraint* getConstraint(int index) ;
+
+ virtual const btTypedConstraint* getConstraint(int index) const;
+
+
+ virtual btDynamicsWorldType getWorldType() const
+ {
+ return BT_DISCRETE_DYNAMICS_WORLD;
+ }
+
+ ///the forces on each rigidbody is accumulating together with gravity. clear this after each timestep.
+ virtual void clearForces();
+
+ ///apply gravity, call this once per timestep
+ virtual void applyGravity();
+
+ virtual void setNumTasks(int numTasks)
+ {
+ (void) numTasks;
+ }
+
+ ///obsolete, use updateActions instead
+ virtual void updateVehicles(btScalar timeStep)
+ {
+ updateActions(timeStep);
+ }
+
+ ///obsolete, use addAction instead
+ virtual void addVehicle(btActionInterface* vehicle);
+ ///obsolete, use removeAction instead
+ virtual void removeVehicle(btActionInterface* vehicle);
+ ///obsolete, use addAction instead
+ virtual void addCharacter(btActionInterface* character);
+ ///obsolete, use removeAction instead
+ virtual void removeCharacter(btActionInterface* character);
+
+ void setSynchronizeAllMotionStates(bool synchronizeAll)
+ {
+ m_synchronizeAllMotionStates = synchronizeAll;
+ }
+ bool getSynchronizeAllMotionStates() const
+ {
+ return m_synchronizeAllMotionStates;
+ }
+
+ ///Preliminary serialization test for Bullet 2.76. Loading those files requires a separate parser (see Bullet/Demos/SerializeDemo)
+ virtual void serialize(btSerializer* serializer);
+
+};
+
+#endif //BT_DISCRETE_DYNAMICS_WORLD_H
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btDynamicsWorld.h b/tests/bullet/src/BulletDynamics/Dynamics/btDynamicsWorld.h
new file mode 100644
index 00000000..6b009337
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btDynamicsWorld.h
@@ -0,0 +1,151 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_DYNAMICS_WORLD_H
+#define BT_DYNAMICS_WORLD_H
+
+#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
+#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
+
+class btTypedConstraint;
+class btActionInterface;
+class btConstraintSolver;
+class btDynamicsWorld;
+
+
+/// Type for the callback for each tick
+typedef void (*btInternalTickCallback)(btDynamicsWorld *world, btScalar timeStep);
+
+enum btDynamicsWorldType
+{
+ BT_SIMPLE_DYNAMICS_WORLD=1,
+ BT_DISCRETE_DYNAMICS_WORLD=2,
+ BT_CONTINUOUS_DYNAMICS_WORLD=3,
+ BT_SOFT_RIGID_DYNAMICS_WORLD=4
+};
+
+///The btDynamicsWorld is the interface class for several dynamics implementation, basic, discrete, parallel, and continuous etc.
+class btDynamicsWorld : public btCollisionWorld
+{
+
+protected:
+ btInternalTickCallback m_internalTickCallback;
+ btInternalTickCallback m_internalPreTickCallback;
+ void* m_worldUserInfo;
+
+ btContactSolverInfo m_solverInfo;
+
+public:
+
+
+ btDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* broadphase,btCollisionConfiguration* collisionConfiguration)
+ :btCollisionWorld(dispatcher,broadphase,collisionConfiguration), m_internalTickCallback(0),m_internalPreTickCallback(0), m_worldUserInfo(0)
+ {
+ }
+
+ virtual ~btDynamicsWorld()
+ {
+ }
+
+ ///stepSimulation proceeds the simulation over 'timeStep', units in preferably in seconds.
+ ///By default, Bullet will subdivide the timestep in constant substeps of each 'fixedTimeStep'.
+ ///in order to keep the simulation real-time, the maximum number of substeps can be clamped to 'maxSubSteps'.
+ ///You can disable subdividing the timestep/substepping by passing maxSubSteps=0 as second argument to stepSimulation, but in that case you have to keep the timeStep constant.
+ virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.))=0;
+
+ virtual void debugDrawWorld() = 0;
+
+ virtual void addConstraint(btTypedConstraint* constraint, bool disableCollisionsBetweenLinkedBodies=false)
+ {
+ (void)constraint; (void)disableCollisionsBetweenLinkedBodies;
+ }
+
+ virtual void removeConstraint(btTypedConstraint* constraint) {(void)constraint;}
+
+ virtual void addAction(btActionInterface* action) = 0;
+
+ virtual void removeAction(btActionInterface* action) = 0;
+
+ //once a rigidbody is added to the dynamics world, it will get this gravity assigned
+ //existing rigidbodies in the world get gravity assigned too, during this method
+ virtual void setGravity(const btVector3& gravity) = 0;
+ virtual btVector3 getGravity () const = 0;
+
+ virtual void synchronizeMotionStates() = 0;
+
+ virtual void addRigidBody(btRigidBody* body) = 0;
+
+ virtual void addRigidBody(btRigidBody* body, short group, short mask) = 0;
+
+ virtual void removeRigidBody(btRigidBody* body) = 0;
+
+ virtual void setConstraintSolver(btConstraintSolver* solver) = 0;
+
+ virtual btConstraintSolver* getConstraintSolver() = 0;
+
+ virtual int getNumConstraints() const { return 0; }
+
+ virtual btTypedConstraint* getConstraint(int index) { (void)index; return 0; }
+
+ virtual const btTypedConstraint* getConstraint(int index) const { (void)index; return 0; }
+
+ virtual btDynamicsWorldType getWorldType() const=0;
+
+ virtual void clearForces() = 0;
+
+ /// Set the callback for when an internal tick (simulation substep) happens, optional user info
+ void setInternalTickCallback(btInternalTickCallback cb, void* worldUserInfo=0,bool isPreTick=false)
+ {
+ if (isPreTick)
+ {
+ m_internalPreTickCallback = cb;
+ } else
+ {
+ m_internalTickCallback = cb;
+ }
+ m_worldUserInfo = worldUserInfo;
+ }
+
+ void setWorldUserInfo(void* worldUserInfo)
+ {
+ m_worldUserInfo = worldUserInfo;
+ }
+
+ void* getWorldUserInfo() const
+ {
+ return m_worldUserInfo;
+ }
+
+ btContactSolverInfo& getSolverInfo()
+ {
+ return m_solverInfo;
+ }
+
+
+ ///obsolete, use addAction instead.
+ virtual void addVehicle(btActionInterface* vehicle) {(void)vehicle;}
+ ///obsolete, use removeAction instead
+ virtual void removeVehicle(btActionInterface* vehicle) {(void)vehicle;}
+ ///obsolete, use addAction instead.
+ virtual void addCharacter(btActionInterface* character) {(void)character;}
+ ///obsolete, use removeAction instead
+ virtual void removeCharacter(btActionInterface* character) {(void)character;}
+
+
+};
+
+#endif //BT_DYNAMICS_WORLD_H
+
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.cpp b/tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.cpp
new file mode 100644
index 00000000..aefb26a1
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.cpp
@@ -0,0 +1,402 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btRigidBody.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "LinearMath/btMinMax.h"
+#include "LinearMath/btTransformUtil.h"
+#include "LinearMath/btMotionState.h"
+#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
+#include "LinearMath/btSerializer.h"
+
+//'temporarily' global variables
+btScalar gDeactivationTime = btScalar(2.);
+bool gDisableDeactivation = false;
+static int uniqueId = 0;
+
+
+btRigidBody::btRigidBody(const btRigidBody::btRigidBodyConstructionInfo& constructionInfo)
+{
+ setupRigidBody(constructionInfo);
+}
+
+btRigidBody::btRigidBody(btScalar mass, btMotionState *motionState, btCollisionShape *collisionShape, const btVector3 &localInertia)
+{
+ btRigidBodyConstructionInfo cinfo(mass,motionState,collisionShape,localInertia);
+ setupRigidBody(cinfo);
+}
+
+void btRigidBody::setupRigidBody(const btRigidBody::btRigidBodyConstructionInfo& constructionInfo)
+{
+
+ m_internalType=CO_RIGID_BODY;
+
+ m_linearVelocity.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+ m_angularVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ m_angularFactor.setValue(1,1,1);
+ m_linearFactor.setValue(1,1,1);
+ m_gravity.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+ m_gravity_acceleration.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+ m_totalForce.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+ m_totalTorque.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0)),
+ setDamping(constructionInfo.m_linearDamping, constructionInfo.m_angularDamping);
+
+ m_linearSleepingThreshold = constructionInfo.m_linearSleepingThreshold;
+ m_angularSleepingThreshold = constructionInfo.m_angularSleepingThreshold;
+ m_optionalMotionState = constructionInfo.m_motionState;
+ m_contactSolverType = 0;
+ m_frictionSolverType = 0;
+ m_additionalDamping = constructionInfo.m_additionalDamping;
+ m_additionalDampingFactor = constructionInfo.m_additionalDampingFactor;
+ m_additionalLinearDampingThresholdSqr = constructionInfo.m_additionalLinearDampingThresholdSqr;
+ m_additionalAngularDampingThresholdSqr = constructionInfo.m_additionalAngularDampingThresholdSqr;
+ m_additionalAngularDampingFactor = constructionInfo.m_additionalAngularDampingFactor;
+
+ if (m_optionalMotionState)
+ {
+ m_optionalMotionState->getWorldTransform(m_worldTransform);
+ } else
+ {
+ m_worldTransform = constructionInfo.m_startWorldTransform;
+ }
+
+ m_interpolationWorldTransform = m_worldTransform;
+ m_interpolationLinearVelocity.setValue(0,0,0);
+ m_interpolationAngularVelocity.setValue(0,0,0);
+
+ //moved to btCollisionObject
+ m_friction = constructionInfo.m_friction;
+ m_restitution = constructionInfo.m_restitution;
+
+ setCollisionShape( constructionInfo.m_collisionShape );
+ m_debugBodyId = uniqueId++;
+
+ setMassProps(constructionInfo.m_mass, constructionInfo.m_localInertia);
+ updateInertiaTensor();
+
+ m_rigidbodyFlags = 0;
+
+
+ m_deltaLinearVelocity.setZero();
+ m_deltaAngularVelocity.setZero();
+ m_invMass = m_inverseMass*m_linearFactor;
+ m_pushVelocity.setZero();
+ m_turnVelocity.setZero();
+
+
+
+}
+
+
+void btRigidBody::predictIntegratedTransform(btScalar timeStep,btTransform& predictedTransform)
+{
+ btTransformUtil::integrateTransform(m_worldTransform,m_linearVelocity,m_angularVelocity,timeStep,predictedTransform);
+}
+
+void btRigidBody::saveKinematicState(btScalar timeStep)
+{
+ //todo: clamp to some (user definable) safe minimum timestep, to limit maximum angular/linear velocities
+ if (timeStep != btScalar(0.))
+ {
+ //if we use motionstate to synchronize world transforms, get the new kinematic/animated world transform
+ if (getMotionState())
+ getMotionState()->getWorldTransform(m_worldTransform);
+ btVector3 linVel,angVel;
+
+ btTransformUtil::calculateVelocity(m_interpolationWorldTransform,m_worldTransform,timeStep,m_linearVelocity,m_angularVelocity);
+ m_interpolationLinearVelocity = m_linearVelocity;
+ m_interpolationAngularVelocity = m_angularVelocity;
+ m_interpolationWorldTransform = m_worldTransform;
+ //printf("angular = %f %f %f\n",m_angularVelocity.getX(),m_angularVelocity.getY(),m_angularVelocity.getZ());
+ }
+}
+
+void btRigidBody::getAabb(btVector3& aabbMin,btVector3& aabbMax) const
+{
+ getCollisionShape()->getAabb(m_worldTransform,aabbMin,aabbMax);
+}
+
+
+
+
+void btRigidBody::setGravity(const btVector3& acceleration)
+{
+ if (m_inverseMass != btScalar(0.0))
+ {
+ m_gravity = acceleration * (btScalar(1.0) / m_inverseMass);
+ }
+ m_gravity_acceleration = acceleration;
+}
+
+
+
+
+
+
+void btRigidBody::setDamping(btScalar lin_damping, btScalar ang_damping)
+{
+ m_linearDamping = btClamped(lin_damping, (btScalar)btScalar(0.0), (btScalar)btScalar(1.0));
+ m_angularDamping = btClamped(ang_damping, (btScalar)btScalar(0.0), (btScalar)btScalar(1.0));
+}
+
+
+
+
+///applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping
+void btRigidBody::applyDamping(btScalar timeStep)
+{
+ //On new damping: see discussion/issue report here: http://code.google.com/p/bullet/issues/detail?id=74
+ //todo: do some performance comparisons (but other parts of the engine are probably bottleneck anyway
+
+//#define USE_OLD_DAMPING_METHOD 1
+#ifdef USE_OLD_DAMPING_METHOD
+ m_linearVelocity *= GEN_clamped((btScalar(1.) - timeStep * m_linearDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0));
+ m_angularVelocity *= GEN_clamped((btScalar(1.) - timeStep * m_angularDamping), (btScalar)btScalar(0.0), (btScalar)btScalar(1.0));
+#else
+ m_linearVelocity *= btPow(btScalar(1)-m_linearDamping, timeStep);
+ m_angularVelocity *= btPow(btScalar(1)-m_angularDamping, timeStep);
+#endif
+
+ if (m_additionalDamping)
+ {
+ //Additional damping can help avoiding lowpass jitter motion, help stability for ragdolls etc.
+ //Such damping is undesirable, so once the overall simulation quality of the rigid body dynamics system has improved, this should become obsolete
+ if ((m_angularVelocity.length2() < m_additionalAngularDampingThresholdSqr) &&
+ (m_linearVelocity.length2() < m_additionalLinearDampingThresholdSqr))
+ {
+ m_angularVelocity *= m_additionalDampingFactor;
+ m_linearVelocity *= m_additionalDampingFactor;
+ }
+
+
+ btScalar speed = m_linearVelocity.length();
+ if (speed < m_linearDamping)
+ {
+ btScalar dampVel = btScalar(0.005);
+ if (speed > dampVel)
+ {
+ btVector3 dir = m_linearVelocity.normalized();
+ m_linearVelocity -= dir * dampVel;
+ } else
+ {
+ m_linearVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ }
+ }
+
+ btScalar angSpeed = m_angularVelocity.length();
+ if (angSpeed < m_angularDamping)
+ {
+ btScalar angDampVel = btScalar(0.005);
+ if (angSpeed > angDampVel)
+ {
+ btVector3 dir = m_angularVelocity.normalized();
+ m_angularVelocity -= dir * angDampVel;
+ } else
+ {
+ m_angularVelocity.setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ }
+ }
+ }
+}
+
+
+void btRigidBody::applyGravity()
+{
+ if (isStaticOrKinematicObject())
+ return;
+
+ applyCentralForce(m_gravity);
+
+}
+
+void btRigidBody::proceedToTransform(const btTransform& newTrans)
+{
+ setCenterOfMassTransform( newTrans );
+}
+
+
+void btRigidBody::setMassProps(btScalar mass, const btVector3& inertia)
+{
+ if (mass == btScalar(0.))
+ {
+ m_collisionFlags |= btCollisionObject::CF_STATIC_OBJECT;
+ m_inverseMass = btScalar(0.);
+ } else
+ {
+ m_collisionFlags &= (~btCollisionObject::CF_STATIC_OBJECT);
+ m_inverseMass = btScalar(1.0) / mass;
+ }
+
+ //Fg = m * a
+ m_gravity = mass * m_gravity_acceleration;
+
+ m_invInertiaLocal.setValue(inertia.x() != btScalar(0.0) ? btScalar(1.0) / inertia.x(): btScalar(0.0),
+ inertia.y() != btScalar(0.0) ? btScalar(1.0) / inertia.y(): btScalar(0.0),
+ inertia.z() != btScalar(0.0) ? btScalar(1.0) / inertia.z(): btScalar(0.0));
+
+ m_invMass = m_linearFactor*m_inverseMass;
+}
+
+
+
+void btRigidBody::updateInertiaTensor()
+{
+ m_invInertiaTensorWorld = m_worldTransform.getBasis().scaled(m_invInertiaLocal) * m_worldTransform.getBasis().transpose();
+}
+
+
+void btRigidBody::integrateVelocities(btScalar step)
+{
+ if (isStaticOrKinematicObject())
+ return;
+
+ m_linearVelocity += m_totalForce * (m_inverseMass * step);
+ m_angularVelocity += m_invInertiaTensorWorld * m_totalTorque * step;
+
+#define MAX_ANGVEL SIMD_HALF_PI
+ /// clamp angular velocity. collision calculations will fail on higher angular velocities
+ btScalar angvel = m_angularVelocity.length();
+ if (angvel*step > MAX_ANGVEL)
+ {
+ m_angularVelocity *= (MAX_ANGVEL/step) /angvel;
+ }
+
+}
+
+btQuaternion btRigidBody::getOrientation() const
+{
+ btQuaternion orn;
+ m_worldTransform.getBasis().getRotation(orn);
+ return orn;
+}
+
+
+void btRigidBody::setCenterOfMassTransform(const btTransform& xform)
+{
+
+ if (isStaticOrKinematicObject())
+ {
+ m_interpolationWorldTransform = m_worldTransform;
+ } else
+ {
+ m_interpolationWorldTransform = xform;
+ }
+ m_interpolationLinearVelocity = getLinearVelocity();
+ m_interpolationAngularVelocity = getAngularVelocity();
+ m_worldTransform = xform;
+ updateInertiaTensor();
+}
+
+
+bool btRigidBody::checkCollideWithOverride(btCollisionObject* co)
+{
+ btRigidBody* otherRb = btRigidBody::upcast(co);
+ if (!otherRb)
+ return true;
+
+ for (int i = 0; i < m_constraintRefs.size(); ++i)
+ {
+ btTypedConstraint* c = m_constraintRefs[i];
+ if (&c->getRigidBodyA() == otherRb || &c->getRigidBodyB() == otherRb)
+ return false;
+ }
+
+ return true;
+}
+
+void btRigidBody::internalWritebackVelocity(btScalar timeStep)
+{
+ (void) timeStep;
+ if (m_inverseMass)
+ {
+ setLinearVelocity(getLinearVelocity()+ m_deltaLinearVelocity);
+ setAngularVelocity(getAngularVelocity()+m_deltaAngularVelocity);
+
+ //correct the position/orientation based on push/turn recovery
+ btTransform newTransform;
+ btTransformUtil::integrateTransform(getWorldTransform(),m_pushVelocity,m_turnVelocity,timeStep,newTransform);
+ setWorldTransform(newTransform);
+ //m_originalBody->setCompanionId(-1);
+ }
+// m_deltaLinearVelocity.setZero();
+// m_deltaAngularVelocity .setZero();
+// m_pushVelocity.setZero();
+// m_turnVelocity.setZero();
+}
+
+
+
+void btRigidBody::addConstraintRef(btTypedConstraint* c)
+{
+ int index = m_constraintRefs.findLinearSearch(c);
+ if (index == m_constraintRefs.size())
+ m_constraintRefs.push_back(c);
+
+ m_checkCollideWith = true;
+}
+
+void btRigidBody::removeConstraintRef(btTypedConstraint* c)
+{
+ m_constraintRefs.remove(c);
+ m_checkCollideWith = m_constraintRefs.size() > 0;
+}
+
+int btRigidBody::calculateSerializeBufferSize() const
+{
+ int sz = sizeof(btRigidBodyData);
+ return sz;
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btRigidBody::serialize(void* dataBuffer, class btSerializer* serializer) const
+{
+ btRigidBodyData* rbd = (btRigidBodyData*) dataBuffer;
+
+ btCollisionObject::serialize(&rbd->m_collisionObjectData, serializer);
+
+ m_invInertiaTensorWorld.serialize(rbd->m_invInertiaTensorWorld);
+ m_linearVelocity.serialize(rbd->m_linearVelocity);
+ m_angularVelocity.serialize(rbd->m_angularVelocity);
+ rbd->m_inverseMass = m_inverseMass;
+ m_angularFactor.serialize(rbd->m_angularFactor);
+ m_linearFactor.serialize(rbd->m_linearFactor);
+ m_gravity.serialize(rbd->m_gravity);
+ m_gravity_acceleration.serialize(rbd->m_gravity_acceleration);
+ m_invInertiaLocal.serialize(rbd->m_invInertiaLocal);
+ m_totalForce.serialize(rbd->m_totalForce);
+ m_totalTorque.serialize(rbd->m_totalTorque);
+ rbd->m_linearDamping = m_linearDamping;
+ rbd->m_angularDamping = m_angularDamping;
+ rbd->m_additionalDamping = m_additionalDamping;
+ rbd->m_additionalDampingFactor = m_additionalDampingFactor;
+ rbd->m_additionalLinearDampingThresholdSqr = m_additionalLinearDampingThresholdSqr;
+ rbd->m_additionalAngularDampingThresholdSqr = m_additionalAngularDampingThresholdSqr;
+ rbd->m_additionalAngularDampingFactor = m_additionalAngularDampingFactor;
+ rbd->m_linearSleepingThreshold=m_linearSleepingThreshold;
+ rbd->m_angularSleepingThreshold = m_angularSleepingThreshold;
+
+ return btRigidBodyDataName;
+}
+
+
+
+void btRigidBody::serializeSingleObject(class btSerializer* serializer) const
+{
+ btChunk* chunk = serializer->allocate(calculateSerializeBufferSize(),1);
+ const char* structType = serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_RIGIDBODY_CODE,(void*)this);
+}
+
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.h b/tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.h
new file mode 100644
index 00000000..7c121e6d
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btRigidBody.h
@@ -0,0 +1,691 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_RIGIDBODY_H
+#define BT_RIGIDBODY_H
+
+#include "LinearMath/btAlignedObjectArray.h"
+#include "LinearMath/btTransform.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+class btCollisionShape;
+class btMotionState;
+class btTypedConstraint;
+
+
+extern btScalar gDeactivationTime;
+extern bool gDisableDeactivation;
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btRigidBodyData btRigidBodyDoubleData
+#define btRigidBodyDataName "btRigidBodyDoubleData"
+#else
+#define btRigidBodyData btRigidBodyFloatData
+#define btRigidBodyDataName "btRigidBodyFloatData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+
+enum btRigidBodyFlags
+{
+ BT_DISABLE_WORLD_GRAVITY = 1
+};
+
+
+///The btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape.
+///It is recommended for performance and memory use to share btCollisionShape objects whenever possible.
+///There are 3 types of rigid bodies:
+///- A) Dynamic rigid bodies, with positive mass. Motion is controlled by rigid body dynamics.
+///- B) Fixed objects with zero mass. They are not moving (basically collision objects)
+///- C) Kinematic objects, which are objects without mass, but the user can move them. There is on-way interaction, and Bullet calculates a velocity based on the timestep and previous and current world transform.
+///Bullet automatically deactivates dynamic rigid bodies, when the velocity is below a threshold for a given time.
+///Deactivated (sleeping) rigid bodies don't take any processing time, except a minor broadphase collision detection impact (to allow active objects to activate/wake up sleeping objects)
+class btRigidBody : public btCollisionObject
+{
+
+ btMatrix3x3 m_invInertiaTensorWorld;
+ btVector3 m_linearVelocity;
+ btVector3 m_angularVelocity;
+ btScalar m_inverseMass;
+ btVector3 m_linearFactor;
+
+ btVector3 m_gravity;
+ btVector3 m_gravity_acceleration;
+ btVector3 m_invInertiaLocal;
+ btVector3 m_totalForce;
+ btVector3 m_totalTorque;
+
+ btScalar m_linearDamping;
+ btScalar m_angularDamping;
+
+ bool m_additionalDamping;
+ btScalar m_additionalDampingFactor;
+ btScalar m_additionalLinearDampingThresholdSqr;
+ btScalar m_additionalAngularDampingThresholdSqr;
+ btScalar m_additionalAngularDampingFactor;
+
+
+ btScalar m_linearSleepingThreshold;
+ btScalar m_angularSleepingThreshold;
+
+ //m_optionalMotionState allows to automatic synchronize the world transform for active objects
+ btMotionState* m_optionalMotionState;
+
+ //keep track of typed constraints referencing this rigid body
+ btAlignedObjectArray<btTypedConstraint*> m_constraintRefs;
+
+ int m_rigidbodyFlags;
+
+ int m_debugBodyId;
+
+
+protected:
+
+ ATTRIBUTE_ALIGNED64(btVector3 m_deltaLinearVelocity);
+ btVector3 m_deltaAngularVelocity;
+ btVector3 m_angularFactor;
+ btVector3 m_invMass;
+ btVector3 m_pushVelocity;
+ btVector3 m_turnVelocity;
+
+
+public:
+
+
+ ///The btRigidBodyConstructionInfo structure provides information to create a rigid body. Setting mass to zero creates a fixed (non-dynamic) rigid body.
+ ///For dynamic objects, you can use the collision shape to approximate the local inertia tensor, otherwise use the zero vector (default argument)
+ ///You can use the motion state to synchronize the world transform between physics and graphics objects.
+ ///And if the motion state is provided, the rigid body will initialize its initial world transform from the motion state,
+ ///m_startWorldTransform is only used when you don't provide a motion state.
+ struct btRigidBodyConstructionInfo
+ {
+ btScalar m_mass;
+
+ ///When a motionState is provided, the rigid body will initialize its world transform from the motion state
+ ///In this case, m_startWorldTransform is ignored.
+ btMotionState* m_motionState;
+ btTransform m_startWorldTransform;
+
+ btCollisionShape* m_collisionShape;
+ btVector3 m_localInertia;
+ btScalar m_linearDamping;
+ btScalar m_angularDamping;
+
+ ///best simulation results when friction is non-zero
+ btScalar m_friction;
+ ///best simulation results using zero restitution.
+ btScalar m_restitution;
+
+ btScalar m_linearSleepingThreshold;
+ btScalar m_angularSleepingThreshold;
+
+ //Additional damping can help avoiding lowpass jitter motion, help stability for ragdolls etc.
+ //Such damping is undesirable, so once the overall simulation quality of the rigid body dynamics system has improved, this should become obsolete
+ bool m_additionalDamping;
+ btScalar m_additionalDampingFactor;
+ btScalar m_additionalLinearDampingThresholdSqr;
+ btScalar m_additionalAngularDampingThresholdSqr;
+ btScalar m_additionalAngularDampingFactor;
+
+ btRigidBodyConstructionInfo( btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0)):
+ m_mass(mass),
+ m_motionState(motionState),
+ m_collisionShape(collisionShape),
+ m_localInertia(localInertia),
+ m_linearDamping(btScalar(0.)),
+ m_angularDamping(btScalar(0.)),
+ m_friction(btScalar(0.5)),
+ m_restitution(btScalar(0.)),
+ m_linearSleepingThreshold(btScalar(0.8)),
+ m_angularSleepingThreshold(btScalar(1.f)),
+ m_additionalDamping(false),
+ m_additionalDampingFactor(btScalar(0.005)),
+ m_additionalLinearDampingThresholdSqr(btScalar(0.01)),
+ m_additionalAngularDampingThresholdSqr(btScalar(0.01)),
+ m_additionalAngularDampingFactor(btScalar(0.01))
+ {
+ m_startWorldTransform.setIdentity();
+ }
+ };
+
+ ///btRigidBody constructor using construction info
+ btRigidBody( const btRigidBodyConstructionInfo& constructionInfo);
+
+ ///btRigidBody constructor for backwards compatibility.
+ ///To specify friction (etc) during rigid body construction, please use the other constructor (using btRigidBodyConstructionInfo)
+ btRigidBody( btScalar mass, btMotionState* motionState, btCollisionShape* collisionShape, const btVector3& localInertia=btVector3(0,0,0));
+
+
+ virtual ~btRigidBody()
+ {
+ //No constraints should point to this rigidbody
+ //Remove constraints from the dynamics world before you delete the related rigidbodies.
+ btAssert(m_constraintRefs.size()==0);
+ }
+
+protected:
+
+ ///setupRigidBody is only used internally by the constructor
+ void setupRigidBody(const btRigidBodyConstructionInfo& constructionInfo);
+
+public:
+
+ void proceedToTransform(const btTransform& newTrans);
+
+ ///to keep collision detection and dynamics separate we don't store a rigidbody pointer
+ ///but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast
+ static const btRigidBody* upcast(const btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()&btCollisionObject::CO_RIGID_BODY)
+ return (const btRigidBody*)colObj;
+ return 0;
+ }
+ static btRigidBody* upcast(btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()&btCollisionObject::CO_RIGID_BODY)
+ return (btRigidBody*)colObj;
+ return 0;
+ }
+
+ /// continuous collision detection needs prediction
+ void predictIntegratedTransform(btScalar step, btTransform& predictedTransform) ;
+
+ void saveKinematicState(btScalar step);
+
+ void applyGravity();
+
+ void setGravity(const btVector3& acceleration);
+
+ const btVector3& getGravity() const
+ {
+ return m_gravity_acceleration;
+ }
+
+ void setDamping(btScalar lin_damping, btScalar ang_damping);
+
+ btScalar getLinearDamping() const
+ {
+ return m_linearDamping;
+ }
+
+ btScalar getAngularDamping() const
+ {
+ return m_angularDamping;
+ }
+
+ btScalar getLinearSleepingThreshold() const
+ {
+ return m_linearSleepingThreshold;
+ }
+
+ btScalar getAngularSleepingThreshold() const
+ {
+ return m_angularSleepingThreshold;
+ }
+
+ void applyDamping(btScalar timeStep);
+
+ SIMD_FORCE_INLINE const btCollisionShape* getCollisionShape() const {
+ return m_collisionShape;
+ }
+
+ SIMD_FORCE_INLINE btCollisionShape* getCollisionShape() {
+ return m_collisionShape;
+ }
+
+ void setMassProps(btScalar mass, const btVector3& inertia);
+
+ const btVector3& getLinearFactor() const
+ {
+ return m_linearFactor;
+ }
+ void setLinearFactor(const btVector3& linearFactor)
+ {
+ m_linearFactor = linearFactor;
+ m_invMass = m_linearFactor*m_inverseMass;
+ }
+ btScalar getInvMass() const { return m_inverseMass; }
+ const btMatrix3x3& getInvInertiaTensorWorld() const {
+ return m_invInertiaTensorWorld;
+ }
+
+ void integrateVelocities(btScalar step);
+
+ void setCenterOfMassTransform(const btTransform& xform);
+
+ void applyCentralForce(const btVector3& force)
+ {
+ m_totalForce += force*m_linearFactor;
+ }
+
+ const btVector3& getTotalForce() const
+ {
+ return m_totalForce;
+ };
+
+ const btVector3& getTotalTorque() const
+ {
+ return m_totalTorque;
+ };
+
+ const btVector3& getInvInertiaDiagLocal() const
+ {
+ return m_invInertiaLocal;
+ };
+
+ void setInvInertiaDiagLocal(const btVector3& diagInvInertia)
+ {
+ m_invInertiaLocal = diagInvInertia;
+ }
+
+ void setSleepingThresholds(btScalar linear,btScalar angular)
+ {
+ m_linearSleepingThreshold = linear;
+ m_angularSleepingThreshold = angular;
+ }
+
+ void applyTorque(const btVector3& torque)
+ {
+ m_totalTorque += torque*m_angularFactor;
+ }
+
+ void applyForce(const btVector3& force, const btVector3& rel_pos)
+ {
+ applyCentralForce(force);
+ applyTorque(rel_pos.cross(force*m_linearFactor));
+ }
+
+ void applyCentralImpulse(const btVector3& impulse)
+ {
+ m_linearVelocity += impulse *m_linearFactor * m_inverseMass;
+ }
+
+ void applyTorqueImpulse(const btVector3& torque)
+ {
+ m_angularVelocity += m_invInertiaTensorWorld * torque * m_angularFactor;
+ }
+
+ void applyImpulse(const btVector3& impulse, const btVector3& rel_pos)
+ {
+ if (m_inverseMass != btScalar(0.))
+ {
+ applyCentralImpulse(impulse);
+ if (m_angularFactor)
+ {
+ applyTorqueImpulse(rel_pos.cross(impulse*m_linearFactor));
+ }
+ }
+ }
+
+ void clearForces()
+ {
+ m_totalForce.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+ m_totalTorque.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+ }
+
+ void updateInertiaTensor();
+
+ const btVector3& getCenterOfMassPosition() const {
+ return m_worldTransform.getOrigin();
+ }
+ btQuaternion getOrientation() const;
+
+ const btTransform& getCenterOfMassTransform() const {
+ return m_worldTransform;
+ }
+ const btVector3& getLinearVelocity() const {
+ return m_linearVelocity;
+ }
+ const btVector3& getAngularVelocity() const {
+ return m_angularVelocity;
+ }
+
+
+ inline void setLinearVelocity(const btVector3& lin_vel)
+ {
+ m_linearVelocity = lin_vel;
+ }
+
+ inline void setAngularVelocity(const btVector3& ang_vel)
+ {
+ m_angularVelocity = ang_vel;
+ }
+
+ btVector3 getVelocityInLocalPoint(const btVector3& rel_pos) const
+ {
+ //we also calculate lin/ang velocity for kinematic objects
+ return m_linearVelocity + m_angularVelocity.cross(rel_pos);
+
+ //for kinematic objects, we could also use use:
+ // return (m_worldTransform(rel_pos) - m_interpolationWorldTransform(rel_pos)) / m_kinematicTimeStep;
+ }
+
+ void translate(const btVector3& v)
+ {
+ m_worldTransform.getOrigin() += v;
+ }
+
+
+ void getAabb(btVector3& aabbMin,btVector3& aabbMax) const;
+
+
+
+
+
+ SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btVector3& pos, const btVector3& normal) const
+ {
+ btVector3 r0 = pos - getCenterOfMassPosition();
+
+ btVector3 c0 = (r0).cross(normal);
+
+ btVector3 vec = (c0 * getInvInertiaTensorWorld()).cross(r0);
+
+ return m_inverseMass + normal.dot(vec);
+
+ }
+
+ SIMD_FORCE_INLINE btScalar computeAngularImpulseDenominator(const btVector3& axis) const
+ {
+ btVector3 vec = axis * getInvInertiaTensorWorld();
+ return axis.dot(vec);
+ }
+
+ SIMD_FORCE_INLINE void updateDeactivation(btScalar timeStep)
+ {
+ if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == DISABLE_DEACTIVATION))
+ return;
+
+ if ((getLinearVelocity().length2() < m_linearSleepingThreshold*m_linearSleepingThreshold) &&
+ (getAngularVelocity().length2() < m_angularSleepingThreshold*m_angularSleepingThreshold))
+ {
+ m_deactivationTime += timeStep;
+ } else
+ {
+ m_deactivationTime=btScalar(0.);
+ setActivationState(0);
+ }
+
+ }
+
+ SIMD_FORCE_INLINE bool wantsSleeping()
+ {
+
+ if (getActivationState() == DISABLE_DEACTIVATION)
+ return false;
+
+ //disable deactivation
+ if (gDisableDeactivation || (gDeactivationTime == btScalar(0.)))
+ return false;
+
+ if ( (getActivationState() == ISLAND_SLEEPING) || (getActivationState() == WANTS_DEACTIVATION))
+ return true;
+
+ if (m_deactivationTime> gDeactivationTime)
+ {
+ return true;
+ }
+ return false;
+ }
+
+
+
+ const btBroadphaseProxy* getBroadphaseProxy() const
+ {
+ return m_broadphaseHandle;
+ }
+ btBroadphaseProxy* getBroadphaseProxy()
+ {
+ return m_broadphaseHandle;
+ }
+ void setNewBroadphaseProxy(btBroadphaseProxy* broadphaseProxy)
+ {
+ m_broadphaseHandle = broadphaseProxy;
+ }
+
+ //btMotionState allows to automatic synchronize the world transform for active objects
+ btMotionState* getMotionState()
+ {
+ return m_optionalMotionState;
+ }
+ const btMotionState* getMotionState() const
+ {
+ return m_optionalMotionState;
+ }
+ void setMotionState(btMotionState* motionState)
+ {
+ m_optionalMotionState = motionState;
+ if (m_optionalMotionState)
+ motionState->getWorldTransform(m_worldTransform);
+ }
+
+ //for experimental overriding of friction/contact solver func
+ int m_contactSolverType;
+ int m_frictionSolverType;
+
+ void setAngularFactor(const btVector3& angFac)
+ {
+ m_angularFactor = angFac;
+ }
+
+ void setAngularFactor(btScalar angFac)
+ {
+ m_angularFactor.setValue(angFac,angFac,angFac);
+ }
+ const btVector3& getAngularFactor() const
+ {
+ return m_angularFactor;
+ }
+
+ //is this rigidbody added to a btCollisionWorld/btDynamicsWorld/btBroadphase?
+ bool isInWorld() const
+ {
+ return (getBroadphaseProxy() != 0);
+ }
+
+ virtual bool checkCollideWithOverride(btCollisionObject* co);
+
+ void addConstraintRef(btTypedConstraint* c);
+ void removeConstraintRef(btTypedConstraint* c);
+
+ btTypedConstraint* getConstraintRef(int index)
+ {
+ return m_constraintRefs[index];
+ }
+
+ int getNumConstraintRefs() const
+ {
+ return m_constraintRefs.size();
+ }
+
+ void setFlags(int flags)
+ {
+ m_rigidbodyFlags = flags;
+ }
+
+ int getFlags() const
+ {
+ return m_rigidbodyFlags;
+ }
+
+ const btVector3& getDeltaLinearVelocity() const
+ {
+ return m_deltaLinearVelocity;
+ }
+
+ const btVector3& getDeltaAngularVelocity() const
+ {
+ return m_deltaAngularVelocity;
+ }
+
+ const btVector3& getPushVelocity() const
+ {
+ return m_pushVelocity;
+ }
+
+ const btVector3& getTurnVelocity() const
+ {
+ return m_turnVelocity;
+ }
+
+
+ ////////////////////////////////////////////////
+ ///some internal methods, don't use them
+
+ btVector3& internalGetDeltaLinearVelocity()
+ {
+ return m_deltaLinearVelocity;
+ }
+
+ btVector3& internalGetDeltaAngularVelocity()
+ {
+ return m_deltaAngularVelocity;
+ }
+
+ const btVector3& internalGetAngularFactor() const
+ {
+ return m_angularFactor;
+ }
+
+ const btVector3& internalGetInvMass() const
+ {
+ return m_invMass;
+ }
+
+ btVector3& internalGetPushVelocity()
+ {
+ return m_pushVelocity;
+ }
+
+ btVector3& internalGetTurnVelocity()
+ {
+ return m_turnVelocity;
+ }
+
+ SIMD_FORCE_INLINE void internalGetVelocityInLocalPointObsolete(const btVector3& rel_pos, btVector3& velocity ) const
+ {
+ velocity = getLinearVelocity()+m_deltaLinearVelocity + (getAngularVelocity()+m_deltaAngularVelocity).cross(rel_pos);
+ }
+
+ SIMD_FORCE_INLINE void internalGetAngularVelocity(btVector3& angVel) const
+ {
+ angVel = getAngularVelocity()+m_deltaAngularVelocity;
+ }
+
+
+ //Optimization for the iterative solver: avoid calculating constant terms involving inertia, normal, relative position
+ SIMD_FORCE_INLINE void internalApplyImpulse(const btVector3& linearComponent, const btVector3& angularComponent,const btScalar impulseMagnitude)
+ {
+ if (m_inverseMass)
+ {
+ m_deltaLinearVelocity += linearComponent*impulseMagnitude;
+ m_deltaAngularVelocity += angularComponent*(impulseMagnitude*m_angularFactor);
+ }
+ }
+
+ SIMD_FORCE_INLINE void internalApplyPushImpulse(const btVector3& linearComponent, const btVector3& angularComponent,btScalar impulseMagnitude)
+ {
+ if (m_inverseMass)
+ {
+ m_pushVelocity += linearComponent*impulseMagnitude;
+ m_turnVelocity += angularComponent*(impulseMagnitude*m_angularFactor);
+ }
+ }
+
+ void internalWritebackVelocity()
+ {
+ if (m_inverseMass)
+ {
+ setLinearVelocity(getLinearVelocity()+ m_deltaLinearVelocity);
+ setAngularVelocity(getAngularVelocity()+m_deltaAngularVelocity);
+ //m_deltaLinearVelocity.setZero();
+ //m_deltaAngularVelocity .setZero();
+ //m_originalBody->setCompanionId(-1);
+ }
+ }
+
+
+ void internalWritebackVelocity(btScalar timeStep);
+
+
+
+ ///////////////////////////////////////////////
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, class btSerializer* serializer) const;
+
+ virtual void serializeSingleObject(class btSerializer* serializer) const;
+
+};
+
+//@todo add m_optionalMotionState and m_constraintRefs to btRigidBodyData
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btRigidBodyFloatData
+{
+ btCollisionObjectFloatData m_collisionObjectData;
+ btMatrix3x3FloatData m_invInertiaTensorWorld;
+ btVector3FloatData m_linearVelocity;
+ btVector3FloatData m_angularVelocity;
+ btVector3FloatData m_angularFactor;
+ btVector3FloatData m_linearFactor;
+ btVector3FloatData m_gravity;
+ btVector3FloatData m_gravity_acceleration;
+ btVector3FloatData m_invInertiaLocal;
+ btVector3FloatData m_totalForce;
+ btVector3FloatData m_totalTorque;
+ float m_inverseMass;
+ float m_linearDamping;
+ float m_angularDamping;
+ float m_additionalDampingFactor;
+ float m_additionalLinearDampingThresholdSqr;
+ float m_additionalAngularDampingThresholdSqr;
+ float m_additionalAngularDampingFactor;
+ float m_linearSleepingThreshold;
+ float m_angularSleepingThreshold;
+ int m_additionalDamping;
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btRigidBodyDoubleData
+{
+ btCollisionObjectDoubleData m_collisionObjectData;
+ btMatrix3x3DoubleData m_invInertiaTensorWorld;
+ btVector3DoubleData m_linearVelocity;
+ btVector3DoubleData m_angularVelocity;
+ btVector3DoubleData m_angularFactor;
+ btVector3DoubleData m_linearFactor;
+ btVector3DoubleData m_gravity;
+ btVector3DoubleData m_gravity_acceleration;
+ btVector3DoubleData m_invInertiaLocal;
+ btVector3DoubleData m_totalForce;
+ btVector3DoubleData m_totalTorque;
+ double m_inverseMass;
+ double m_linearDamping;
+ double m_angularDamping;
+ double m_additionalDampingFactor;
+ double m_additionalLinearDampingThresholdSqr;
+ double m_additionalAngularDampingThresholdSqr;
+ double m_additionalAngularDampingFactor;
+ double m_linearSleepingThreshold;
+ double m_angularSleepingThreshold;
+ int m_additionalDamping;
+ char m_padding[4];
+};
+
+
+
+#endif //BT_RIGIDBODY_H
+
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp b/tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
new file mode 100644
index 00000000..5fc2f3cf
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
@@ -0,0 +1,280 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSimpleDynamicsWorld.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
+
+
+/*
+ Make sure this dummy function never changes so that it
+ can be used by probes that are checking whether the
+ library is actually installed.
+*/
+extern "C"
+{
+ void btBulletDynamicsProbe ();
+ void btBulletDynamicsProbe () {}
+}
+
+
+
+
+btSimpleDynamicsWorld::btSimpleDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration)
+:btDynamicsWorld(dispatcher,pairCache,collisionConfiguration),
+m_constraintSolver(constraintSolver),
+m_ownsConstraintSolver(false),
+m_gravity(0,0,-10)
+{
+
+}
+
+
+btSimpleDynamicsWorld::~btSimpleDynamicsWorld()
+{
+ if (m_ownsConstraintSolver)
+ btAlignedFree( m_constraintSolver);
+}
+
+int btSimpleDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps, btScalar fixedTimeStep)
+{
+ (void)fixedTimeStep;
+ (void)maxSubSteps;
+
+
+ ///apply gravity, predict motion
+ predictUnconstraintMotion(timeStep);
+
+ btDispatcherInfo& dispatchInfo = getDispatchInfo();
+ dispatchInfo.m_timeStep = timeStep;
+ dispatchInfo.m_stepCount = 0;
+ dispatchInfo.m_debugDraw = getDebugDrawer();
+
+ ///perform collision detection
+ performDiscreteCollisionDetection();
+
+ ///solve contact constraints
+ int numManifolds = m_dispatcher1->getNumManifolds();
+ if (numManifolds)
+ {
+ btPersistentManifold** manifoldPtr = ((btCollisionDispatcher*)m_dispatcher1)->getInternalManifoldPointer();
+
+ btContactSolverInfo infoGlobal;
+ infoGlobal.m_timeStep = timeStep;
+ m_constraintSolver->prepareSolve(0,numManifolds);
+ m_constraintSolver->solveGroup(&getCollisionObjectArray()[0],getNumCollisionObjects(),manifoldPtr, numManifolds,0,0,infoGlobal,m_debugDrawer, m_stackAlloc,m_dispatcher1);
+ m_constraintSolver->allSolved(infoGlobal,m_debugDrawer, m_stackAlloc);
+ }
+
+ ///integrate transforms
+ integrateTransforms(timeStep);
+
+ updateAabbs();
+
+ synchronizeMotionStates();
+
+ clearForces();
+
+ return 1;
+
+}
+
+void btSimpleDynamicsWorld::clearForces()
+{
+ ///@todo: iterate over awake simulation islands!
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body)
+ {
+ body->clearForces();
+ }
+ }
+}
+
+
+void btSimpleDynamicsWorld::setGravity(const btVector3& gravity)
+{
+ m_gravity = gravity;
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body)
+ {
+ body->setGravity(gravity);
+ }
+ }
+}
+
+btVector3 btSimpleDynamicsWorld::getGravity () const
+{
+ return m_gravity;
+}
+
+void btSimpleDynamicsWorld::removeRigidBody(btRigidBody* body)
+{
+ btCollisionWorld::removeCollisionObject(body);
+}
+
+void btSimpleDynamicsWorld::removeCollisionObject(btCollisionObject* collisionObject)
+{
+ btRigidBody* body = btRigidBody::upcast(collisionObject);
+ if (body)
+ removeRigidBody(body);
+ else
+ btCollisionWorld::removeCollisionObject(collisionObject);
+}
+
+
+void btSimpleDynamicsWorld::addRigidBody(btRigidBody* body)
+{
+ body->setGravity(m_gravity);
+
+ if (body->getCollisionShape())
+ {
+ addCollisionObject(body);
+ }
+}
+
+void btSimpleDynamicsWorld::addRigidBody(btRigidBody* body, short group, short mask)
+{
+ body->setGravity(m_gravity);
+
+ if (body->getCollisionShape())
+ {
+ addCollisionObject(body,group,mask);
+ }
+}
+
+
+void btSimpleDynamicsWorld::debugDrawWorld()
+{
+
+}
+
+void btSimpleDynamicsWorld::addAction(btActionInterface* action)
+{
+
+}
+
+void btSimpleDynamicsWorld::removeAction(btActionInterface* action)
+{
+
+}
+
+
+void btSimpleDynamicsWorld::updateAabbs()
+{
+ btTransform predictedTrans;
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body)
+ {
+ if (body->isActive() && (!body->isStaticObject()))
+ {
+ btVector3 minAabb,maxAabb;
+ colObj->getCollisionShape()->getAabb(colObj->getWorldTransform(), minAabb,maxAabb);
+ btBroadphaseInterface* bp = getBroadphase();
+ bp->setAabb(body->getBroadphaseHandle(),minAabb,maxAabb, m_dispatcher1);
+ }
+ }
+ }
+}
+
+void btSimpleDynamicsWorld::integrateTransforms(btScalar timeStep)
+{
+ btTransform predictedTrans;
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body)
+ {
+ if (body->isActive() && (!body->isStaticObject()))
+ {
+ body->predictIntegratedTransform(timeStep, predictedTrans);
+ body->proceedToTransform( predictedTrans);
+ }
+ }
+ }
+}
+
+
+
+void btSimpleDynamicsWorld::predictUnconstraintMotion(btScalar timeStep)
+{
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body)
+ {
+ if (!body->isStaticObject())
+ {
+ if (body->isActive())
+ {
+ body->applyGravity();
+ body->integrateVelocities( timeStep);
+ body->applyDamping(timeStep);
+ body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform());
+ }
+ }
+ }
+ }
+}
+
+
+void btSimpleDynamicsWorld::synchronizeMotionStates()
+{
+ ///@todo: iterate over awake simulation islands!
+ for ( int i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ btRigidBody* body = btRigidBody::upcast(colObj);
+ if (body && body->getMotionState())
+ {
+ if (body->getActivationState() != ISLAND_SLEEPING)
+ {
+ body->getMotionState()->setWorldTransform(body->getWorldTransform());
+ }
+ }
+ }
+
+}
+
+
+void btSimpleDynamicsWorld::setConstraintSolver(btConstraintSolver* solver)
+{
+ if (m_ownsConstraintSolver)
+ {
+ btAlignedFree(m_constraintSolver);
+ }
+ m_ownsConstraintSolver = false;
+ m_constraintSolver = solver;
+}
+
+btConstraintSolver* btSimpleDynamicsWorld::getConstraintSolver()
+{
+ return m_constraintSolver;
+}
diff --git a/tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h b/tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h
new file mode 100644
index 00000000..07a727e2
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Dynamics/btSimpleDynamicsWorld.h
@@ -0,0 +1,89 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SIMPLE_DYNAMICS_WORLD_H
+#define BT_SIMPLE_DYNAMICS_WORLD_H
+
+#include "btDynamicsWorld.h"
+
+class btDispatcher;
+class btOverlappingPairCache;
+class btConstraintSolver;
+
+///The btSimpleDynamicsWorld serves as unit-test and to verify more complicated and optimized dynamics worlds.
+///Please use btDiscreteDynamicsWorld instead (or btContinuousDynamicsWorld once it is finished).
+class btSimpleDynamicsWorld : public btDynamicsWorld
+{
+protected:
+
+ btConstraintSolver* m_constraintSolver;
+
+ bool m_ownsConstraintSolver;
+
+ void predictUnconstraintMotion(btScalar timeStep);
+
+ void integrateTransforms(btScalar timeStep);
+
+ btVector3 m_gravity;
+
+public:
+
+
+
+ ///this btSimpleDynamicsWorld constructor creates dispatcher, broadphase pairCache and constraintSolver
+ btSimpleDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver,btCollisionConfiguration* collisionConfiguration);
+
+ virtual ~btSimpleDynamicsWorld();
+
+ ///maxSubSteps/fixedTimeStep for interpolation is currently ignored for btSimpleDynamicsWorld, use btDiscreteDynamicsWorld instead
+ virtual int stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.));
+
+ virtual void setGravity(const btVector3& gravity);
+
+ virtual btVector3 getGravity () const;
+
+ virtual void addRigidBody(btRigidBody* body);
+
+ virtual void addRigidBody(btRigidBody* body, short group, short mask);
+
+ virtual void removeRigidBody(btRigidBody* body);
+
+ virtual void debugDrawWorld();
+
+ virtual void addAction(btActionInterface* action);
+
+ virtual void removeAction(btActionInterface* action);
+
+ ///removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btCollisionWorld::removeCollisionObject
+ virtual void removeCollisionObject(btCollisionObject* collisionObject);
+
+ virtual void updateAabbs();
+
+ virtual void synchronizeMotionStates();
+
+ virtual void setConstraintSolver(btConstraintSolver* solver);
+
+ virtual btConstraintSolver* getConstraintSolver();
+
+ virtual btDynamicsWorldType getWorldType() const
+ {
+ return BT_SIMPLE_DYNAMICS_WORLD;
+ }
+
+ virtual void clearForces();
+
+};
+
+#endif //BT_SIMPLE_DYNAMICS_WORLD_H
diff --git a/tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp b/tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp
new file mode 100644
index 00000000..5b467883
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.cpp
@@ -0,0 +1,771 @@
+/*
+ * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies.
+ * Erwin Coumans makes no representations about the suitability
+ * of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+*/
+
+#include "LinearMath/btVector3.h"
+#include "btRaycastVehicle.h"
+
+#include "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btJacobianEntry.h"
+#include "LinearMath/btQuaternion.h"
+#include "BulletDynamics/Dynamics/btDynamicsWorld.h"
+#include "btVehicleRaycaster.h"
+#include "btWheelInfo.h"
+#include "LinearMath/btMinMax.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "BulletDynamics/ConstraintSolver/btContactConstraint.h"
+
+#define ROLLING_INFLUENCE_FIX
+
+
+btRigidBody& btActionInterface::getFixedBody()
+{
+ static btRigidBody s_fixed(0, 0,0);
+ s_fixed.setMassProps(btScalar(0.),btVector3(btScalar(0.),btScalar(0.),btScalar(0.)));
+ return s_fixed;
+}
+
+btRaycastVehicle::btRaycastVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster* raycaster )
+:m_vehicleRaycaster(raycaster),
+m_pitchControl(btScalar(0.))
+{
+ m_chassisBody = chassis;
+ m_indexRightAxis = 0;
+ m_indexUpAxis = 2;
+ m_indexForwardAxis = 1;
+ defaultInit(tuning);
+}
+
+
+void btRaycastVehicle::defaultInit(const btVehicleTuning& tuning)
+{
+ (void)tuning;
+ m_currentVehicleSpeedKmHour = btScalar(0.);
+ m_steeringValue = btScalar(0.);
+
+}
+
+
+
+btRaycastVehicle::~btRaycastVehicle()
+{
+}
+
+
+//
+// basically most of the code is general for 2 or 4 wheel vehicles, but some of it needs to be reviewed
+//
+btWheelInfo& btRaycastVehicle::addWheel( const btVector3& connectionPointCS, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS, btScalar suspensionRestLength, btScalar wheelRadius,const btVehicleTuning& tuning, bool isFrontWheel)
+{
+
+ btWheelInfoConstructionInfo ci;
+
+ ci.m_chassisConnectionCS = connectionPointCS;
+ ci.m_wheelDirectionCS = wheelDirectionCS0;
+ ci.m_wheelAxleCS = wheelAxleCS;
+ ci.m_suspensionRestLength = suspensionRestLength;
+ ci.m_wheelRadius = wheelRadius;
+ ci.m_suspensionStiffness = tuning.m_suspensionStiffness;
+ ci.m_wheelsDampingCompression = tuning.m_suspensionCompression;
+ ci.m_wheelsDampingRelaxation = tuning.m_suspensionDamping;
+ ci.m_frictionSlip = tuning.m_frictionSlip;
+ ci.m_bIsFrontWheel = isFrontWheel;
+ ci.m_maxSuspensionTravelCm = tuning.m_maxSuspensionTravelCm;
+ ci.m_maxSuspensionForce = tuning.m_maxSuspensionForce;
+
+ m_wheelInfo.push_back( btWheelInfo(ci));
+
+ btWheelInfo& wheel = m_wheelInfo[getNumWheels()-1];
+
+ updateWheelTransformsWS( wheel , false );
+ updateWheelTransform(getNumWheels()-1,false);
+ return wheel;
+}
+
+
+
+
+const btTransform& btRaycastVehicle::getWheelTransformWS( int wheelIndex ) const
+{
+ btAssert(wheelIndex < getNumWheels());
+ const btWheelInfo& wheel = m_wheelInfo[wheelIndex];
+ return wheel.m_worldTransform;
+
+}
+
+void btRaycastVehicle::updateWheelTransform( int wheelIndex , bool interpolatedTransform)
+{
+
+ btWheelInfo& wheel = m_wheelInfo[ wheelIndex ];
+ updateWheelTransformsWS(wheel,interpolatedTransform);
+ btVector3 up = -wheel.m_raycastInfo.m_wheelDirectionWS;
+ const btVector3& right = wheel.m_raycastInfo.m_wheelAxleWS;
+ btVector3 fwd = up.cross(right);
+ fwd = fwd.normalize();
+// up = right.cross(fwd);
+// up.normalize();
+
+ //rotate around steering over de wheelAxleWS
+ btScalar steering = wheel.m_steering;
+
+ btQuaternion steeringOrn(up,steering);//wheel.m_steering);
+ btMatrix3x3 steeringMat(steeringOrn);
+
+ btQuaternion rotatingOrn(right,-wheel.m_rotation);
+ btMatrix3x3 rotatingMat(rotatingOrn);
+
+ btMatrix3x3 basis2(
+ right[0],fwd[0],up[0],
+ right[1],fwd[1],up[1],
+ right[2],fwd[2],up[2]
+ );
+
+ wheel.m_worldTransform.setBasis(steeringMat * rotatingMat * basis2);
+ wheel.m_worldTransform.setOrigin(
+ wheel.m_raycastInfo.m_hardPointWS + wheel.m_raycastInfo.m_wheelDirectionWS * wheel.m_raycastInfo.m_suspensionLength
+ );
+}
+
+void btRaycastVehicle::resetSuspension()
+{
+
+ int i;
+ for (i=0;i<m_wheelInfo.size(); i++)
+ {
+ btWheelInfo& wheel = m_wheelInfo[i];
+ wheel.m_raycastInfo.m_suspensionLength = wheel.getSuspensionRestLength();
+ wheel.m_suspensionRelativeVelocity = btScalar(0.0);
+
+ wheel.m_raycastInfo.m_contactNormalWS = - wheel.m_raycastInfo.m_wheelDirectionWS;
+ //wheel_info.setContactFriction(btScalar(0.0));
+ wheel.m_clippedInvContactDotSuspension = btScalar(1.0);
+ }
+}
+
+void btRaycastVehicle::updateWheelTransformsWS(btWheelInfo& wheel , bool interpolatedTransform)
+{
+ wheel.m_raycastInfo.m_isInContact = false;
+
+ btTransform chassisTrans = getChassisWorldTransform();
+ if (interpolatedTransform && (getRigidBody()->getMotionState()))
+ {
+ getRigidBody()->getMotionState()->getWorldTransform(chassisTrans);
+ }
+
+ wheel.m_raycastInfo.m_hardPointWS = chassisTrans( wheel.m_chassisConnectionPointCS );
+ wheel.m_raycastInfo.m_wheelDirectionWS = chassisTrans.getBasis() * wheel.m_wheelDirectionCS ;
+ wheel.m_raycastInfo.m_wheelAxleWS = chassisTrans.getBasis() * wheel.m_wheelAxleCS;
+}
+
+btScalar btRaycastVehicle::rayCast(btWheelInfo& wheel)
+{
+ updateWheelTransformsWS( wheel,false);
+
+
+ btScalar depth = -1;
+
+ btScalar raylen = wheel.getSuspensionRestLength()+wheel.m_wheelsRadius;
+
+ btVector3 rayvector = wheel.m_raycastInfo.m_wheelDirectionWS * (raylen);
+ const btVector3& source = wheel.m_raycastInfo.m_hardPointWS;
+ wheel.m_raycastInfo.m_contactPointWS = source + rayvector;
+ const btVector3& target = wheel.m_raycastInfo.m_contactPointWS;
+
+ btScalar param = btScalar(0.);
+
+ btVehicleRaycaster::btVehicleRaycasterResult rayResults;
+
+ btAssert(m_vehicleRaycaster);
+
+ void* object = m_vehicleRaycaster->castRay(source,target,rayResults);
+
+ wheel.m_raycastInfo.m_groundObject = 0;
+
+ if (object)
+ {
+ param = rayResults.m_distFraction;
+ depth = raylen * rayResults.m_distFraction;
+ wheel.m_raycastInfo.m_contactNormalWS = rayResults.m_hitNormalInWorld;
+ wheel.m_raycastInfo.m_isInContact = true;
+
+ wheel.m_raycastInfo.m_groundObject = &getFixedBody();///@todo for driving on dynamic/movable objects!;
+ //wheel.m_raycastInfo.m_groundObject = object;
+
+
+ btScalar hitDistance = param*raylen;
+ wheel.m_raycastInfo.m_suspensionLength = hitDistance - wheel.m_wheelsRadius;
+ //clamp on max suspension travel
+
+ btScalar minSuspensionLength = wheel.getSuspensionRestLength() - wheel.m_maxSuspensionTravelCm*btScalar(0.01);
+ btScalar maxSuspensionLength = wheel.getSuspensionRestLength()+ wheel.m_maxSuspensionTravelCm*btScalar(0.01);
+ if (wheel.m_raycastInfo.m_suspensionLength < minSuspensionLength)
+ {
+ wheel.m_raycastInfo.m_suspensionLength = minSuspensionLength;
+ }
+ if (wheel.m_raycastInfo.m_suspensionLength > maxSuspensionLength)
+ {
+ wheel.m_raycastInfo.m_suspensionLength = maxSuspensionLength;
+ }
+
+ wheel.m_raycastInfo.m_contactPointWS = rayResults.m_hitPointInWorld;
+
+ btScalar denominator= wheel.m_raycastInfo.m_contactNormalWS.dot( wheel.m_raycastInfo.m_wheelDirectionWS );
+
+ btVector3 chassis_velocity_at_contactPoint;
+ btVector3 relpos = wheel.m_raycastInfo.m_contactPointWS-getRigidBody()->getCenterOfMassPosition();
+
+ chassis_velocity_at_contactPoint = getRigidBody()->getVelocityInLocalPoint(relpos);
+
+ btScalar projVel = wheel.m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint );
+
+ if ( denominator >= btScalar(-0.1))
+ {
+ wheel.m_suspensionRelativeVelocity = btScalar(0.0);
+ wheel.m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1);
+ }
+ else
+ {
+ btScalar inv = btScalar(-1.) / denominator;
+ wheel.m_suspensionRelativeVelocity = projVel * inv;
+ wheel.m_clippedInvContactDotSuspension = inv;
+ }
+
+ } else
+ {
+ //put wheel info as in rest position
+ wheel.m_raycastInfo.m_suspensionLength = wheel.getSuspensionRestLength();
+ wheel.m_suspensionRelativeVelocity = btScalar(0.0);
+ wheel.m_raycastInfo.m_contactNormalWS = - wheel.m_raycastInfo.m_wheelDirectionWS;
+ wheel.m_clippedInvContactDotSuspension = btScalar(1.0);
+ }
+
+ return depth;
+}
+
+
+const btTransform& btRaycastVehicle::getChassisWorldTransform() const
+{
+ /*if (getRigidBody()->getMotionState())
+ {
+ btTransform chassisWorldTrans;
+ getRigidBody()->getMotionState()->getWorldTransform(chassisWorldTrans);
+ return chassisWorldTrans;
+ }
+ */
+
+
+ return getRigidBody()->getCenterOfMassTransform();
+}
+
+
+void btRaycastVehicle::updateVehicle( btScalar step )
+{
+ {
+ for (int i=0;i<getNumWheels();i++)
+ {
+ updateWheelTransform(i,false);
+ }
+ }
+
+
+ m_currentVehicleSpeedKmHour = btScalar(3.6) * getRigidBody()->getLinearVelocity().length();
+
+ const btTransform& chassisTrans = getChassisWorldTransform();
+
+ btVector3 forwardW (
+ chassisTrans.getBasis()[0][m_indexForwardAxis],
+ chassisTrans.getBasis()[1][m_indexForwardAxis],
+ chassisTrans.getBasis()[2][m_indexForwardAxis]);
+
+ if (forwardW.dot(getRigidBody()->getLinearVelocity()) < btScalar(0.))
+ {
+ m_currentVehicleSpeedKmHour *= btScalar(-1.);
+ }
+
+ //
+ // simulate suspension
+ //
+
+ int i=0;
+ for (i=0;i<m_wheelInfo.size();i++)
+ {
+ btScalar depth;
+ depth = rayCast( m_wheelInfo[i]);
+ }
+
+ updateSuspension(step);
+
+
+ for (i=0;i<m_wheelInfo.size();i++)
+ {
+ //apply suspension force
+ btWheelInfo& wheel = m_wheelInfo[i];
+
+ btScalar suspensionForce = wheel.m_wheelsSuspensionForce;
+
+ if (suspensionForce > wheel.m_maxSuspensionForce)
+ {
+ suspensionForce = wheel.m_maxSuspensionForce;
+ }
+ btVector3 impulse = wheel.m_raycastInfo.m_contactNormalWS * suspensionForce * step;
+ btVector3 relpos = wheel.m_raycastInfo.m_contactPointWS - getRigidBody()->getCenterOfMassPosition();
+
+ getRigidBody()->applyImpulse(impulse, relpos);
+
+ }
+
+
+
+ updateFriction( step);
+
+
+ for (i=0;i<m_wheelInfo.size();i++)
+ {
+ btWheelInfo& wheel = m_wheelInfo[i];
+ btVector3 relpos = wheel.m_raycastInfo.m_hardPointWS - getRigidBody()->getCenterOfMassPosition();
+ btVector3 vel = getRigidBody()->getVelocityInLocalPoint( relpos );
+
+ if (wheel.m_raycastInfo.m_isInContact)
+ {
+ const btTransform& chassisWorldTransform = getChassisWorldTransform();
+
+ btVector3 fwd (
+ chassisWorldTransform.getBasis()[0][m_indexForwardAxis],
+ chassisWorldTransform.getBasis()[1][m_indexForwardAxis],
+ chassisWorldTransform.getBasis()[2][m_indexForwardAxis]);
+
+ btScalar proj = fwd.dot(wheel.m_raycastInfo.m_contactNormalWS);
+ fwd -= wheel.m_raycastInfo.m_contactNormalWS * proj;
+
+ btScalar proj2 = fwd.dot(vel);
+
+ wheel.m_deltaRotation = (proj2 * step) / (wheel.m_wheelsRadius);
+ wheel.m_rotation += wheel.m_deltaRotation;
+
+ } else
+ {
+ wheel.m_rotation += wheel.m_deltaRotation;
+ }
+
+ wheel.m_deltaRotation *= btScalar(0.99);//damping of rotation when not in contact
+
+ }
+
+
+
+}
+
+
+void btRaycastVehicle::setSteeringValue(btScalar steering,int wheel)
+{
+ btAssert(wheel>=0 && wheel < getNumWheels());
+
+ btWheelInfo& wheelInfo = getWheelInfo(wheel);
+ wheelInfo.m_steering = steering;
+}
+
+
+
+btScalar btRaycastVehicle::getSteeringValue(int wheel) const
+{
+ return getWheelInfo(wheel).m_steering;
+}
+
+
+void btRaycastVehicle::applyEngineForce(btScalar force, int wheel)
+{
+ btAssert(wheel>=0 && wheel < getNumWheels());
+ btWheelInfo& wheelInfo = getWheelInfo(wheel);
+ wheelInfo.m_engineForce = force;
+}
+
+
+const btWheelInfo& btRaycastVehicle::getWheelInfo(int index) const
+{
+ btAssert((index >= 0) && (index < getNumWheels()));
+
+ return m_wheelInfo[index];
+}
+
+btWheelInfo& btRaycastVehicle::getWheelInfo(int index)
+{
+ btAssert((index >= 0) && (index < getNumWheels()));
+
+ return m_wheelInfo[index];
+}
+
+void btRaycastVehicle::setBrake(btScalar brake,int wheelIndex)
+{
+ btAssert((wheelIndex >= 0) && (wheelIndex < getNumWheels()));
+ getWheelInfo(wheelIndex).m_brake = brake;
+}
+
+
+void btRaycastVehicle::updateSuspension(btScalar deltaTime)
+{
+ (void)deltaTime;
+
+ btScalar chassisMass = btScalar(1.) / m_chassisBody->getInvMass();
+
+ for (int w_it=0; w_it<getNumWheels(); w_it++)
+ {
+ btWheelInfo &wheel_info = m_wheelInfo[w_it];
+
+ if ( wheel_info.m_raycastInfo.m_isInContact )
+ {
+ btScalar force;
+ // Spring
+ {
+ btScalar susp_length = wheel_info.getSuspensionRestLength();
+ btScalar current_length = wheel_info.m_raycastInfo.m_suspensionLength;
+
+ btScalar length_diff = (susp_length - current_length);
+
+ force = wheel_info.m_suspensionStiffness
+ * length_diff * wheel_info.m_clippedInvContactDotSuspension;
+ }
+
+ // Damper
+ {
+ btScalar projected_rel_vel = wheel_info.m_suspensionRelativeVelocity;
+ {
+ btScalar susp_damping;
+ if ( projected_rel_vel < btScalar(0.0) )
+ {
+ susp_damping = wheel_info.m_wheelsDampingCompression;
+ }
+ else
+ {
+ susp_damping = wheel_info.m_wheelsDampingRelaxation;
+ }
+ force -= susp_damping * projected_rel_vel;
+ }
+ }
+
+ // RESULT
+ wheel_info.m_wheelsSuspensionForce = force * chassisMass;
+ if (wheel_info.m_wheelsSuspensionForce < btScalar(0.))
+ {
+ wheel_info.m_wheelsSuspensionForce = btScalar(0.);
+ }
+ }
+ else
+ {
+ wheel_info.m_wheelsSuspensionForce = btScalar(0.0);
+ }
+ }
+
+}
+
+
+struct btWheelContactPoint
+{
+ btRigidBody* m_body0;
+ btRigidBody* m_body1;
+ btVector3 m_frictionPositionWorld;
+ btVector3 m_frictionDirectionWorld;
+ btScalar m_jacDiagABInv;
+ btScalar m_maxImpulse;
+
+
+ btWheelContactPoint(btRigidBody* body0,btRigidBody* body1,const btVector3& frictionPosWorld,const btVector3& frictionDirectionWorld, btScalar maxImpulse)
+ :m_body0(body0),
+ m_body1(body1),
+ m_frictionPositionWorld(frictionPosWorld),
+ m_frictionDirectionWorld(frictionDirectionWorld),
+ m_maxImpulse(maxImpulse)
+ {
+ btScalar denom0 = body0->computeImpulseDenominator(frictionPosWorld,frictionDirectionWorld);
+ btScalar denom1 = body1->computeImpulseDenominator(frictionPosWorld,frictionDirectionWorld);
+ btScalar relaxation = 1.f;
+ m_jacDiagABInv = relaxation/(denom0+denom1);
+ }
+
+
+
+};
+
+btScalar calcRollingFriction(btWheelContactPoint& contactPoint);
+btScalar calcRollingFriction(btWheelContactPoint& contactPoint)
+{
+
+ btScalar j1=0.f;
+
+ const btVector3& contactPosWorld = contactPoint.m_frictionPositionWorld;
+
+ btVector3 rel_pos1 = contactPosWorld - contactPoint.m_body0->getCenterOfMassPosition();
+ btVector3 rel_pos2 = contactPosWorld - contactPoint.m_body1->getCenterOfMassPosition();
+
+ btScalar maxImpulse = contactPoint.m_maxImpulse;
+
+ btVector3 vel1 = contactPoint.m_body0->getVelocityInLocalPoint(rel_pos1);
+ btVector3 vel2 = contactPoint.m_body1->getVelocityInLocalPoint(rel_pos2);
+ btVector3 vel = vel1 - vel2;
+
+ btScalar vrel = contactPoint.m_frictionDirectionWorld.dot(vel);
+
+ // calculate j that moves us to zero relative velocity
+ j1 = -vrel * contactPoint.m_jacDiagABInv;
+ btSetMin(j1, maxImpulse);
+ btSetMax(j1, -maxImpulse);
+
+ return j1;
+}
+
+
+
+
+btScalar sideFrictionStiffness2 = btScalar(1.0);
+void btRaycastVehicle::updateFriction(btScalar timeStep)
+{
+
+ //calculate the impulse, so that the wheels don't move sidewards
+ int numWheel = getNumWheels();
+ if (!numWheel)
+ return;
+
+ m_forwardWS.resize(numWheel);
+ m_axle.resize(numWheel);
+ m_forwardImpulse.resize(numWheel);
+ m_sideImpulse.resize(numWheel);
+
+ int numWheelsOnGround = 0;
+
+
+ //collapse all those loops into one!
+ for (int i=0;i<getNumWheels();i++)
+ {
+ btWheelInfo& wheelInfo = m_wheelInfo[i];
+ class btRigidBody* groundObject = (class btRigidBody*) wheelInfo.m_raycastInfo.m_groundObject;
+ if (groundObject)
+ numWheelsOnGround++;
+ m_sideImpulse[i] = btScalar(0.);
+ m_forwardImpulse[i] = btScalar(0.);
+
+ }
+
+ {
+
+ for (int i=0;i<getNumWheels();i++)
+ {
+
+ btWheelInfo& wheelInfo = m_wheelInfo[i];
+
+ class btRigidBody* groundObject = (class btRigidBody*) wheelInfo.m_raycastInfo.m_groundObject;
+
+ if (groundObject)
+ {
+
+ const btTransform& wheelTrans = getWheelTransformWS( i );
+
+ btMatrix3x3 wheelBasis0 = wheelTrans.getBasis();
+ m_axle[i] = btVector3(
+ wheelBasis0[0][m_indexRightAxis],
+ wheelBasis0[1][m_indexRightAxis],
+ wheelBasis0[2][m_indexRightAxis]);
+
+ const btVector3& surfNormalWS = wheelInfo.m_raycastInfo.m_contactNormalWS;
+ btScalar proj = m_axle[i].dot(surfNormalWS);
+ m_axle[i] -= surfNormalWS * proj;
+ m_axle[i] = m_axle[i].normalize();
+
+ m_forwardWS[i] = surfNormalWS.cross(m_axle[i]);
+ m_forwardWS[i].normalize();
+
+
+ resolveSingleBilateral(*m_chassisBody, wheelInfo.m_raycastInfo.m_contactPointWS,
+ *groundObject, wheelInfo.m_raycastInfo.m_contactPointWS,
+ btScalar(0.), m_axle[i],m_sideImpulse[i],timeStep);
+
+ m_sideImpulse[i] *= sideFrictionStiffness2;
+
+ }
+
+
+ }
+ }
+
+ btScalar sideFactor = btScalar(1.);
+ btScalar fwdFactor = 0.5;
+
+ bool sliding = false;
+ {
+ for (int wheel =0;wheel <getNumWheels();wheel++)
+ {
+ btWheelInfo& wheelInfo = m_wheelInfo[wheel];
+ class btRigidBody* groundObject = (class btRigidBody*) wheelInfo.m_raycastInfo.m_groundObject;
+
+ btScalar rollingFriction = 0.f;
+
+ if (groundObject)
+ {
+ if (wheelInfo.m_engineForce != 0.f)
+ {
+ rollingFriction = wheelInfo.m_engineForce* timeStep;
+ } else
+ {
+ btScalar defaultRollingFrictionImpulse = 0.f;
+ btScalar maxImpulse = wheelInfo.m_brake ? wheelInfo.m_brake : defaultRollingFrictionImpulse;
+ btWheelContactPoint contactPt(m_chassisBody,groundObject,wheelInfo.m_raycastInfo.m_contactPointWS,m_forwardWS[wheel],maxImpulse);
+ rollingFriction = calcRollingFriction(contactPt);
+ }
+ }
+
+ //switch between active rolling (throttle), braking and non-active rolling friction (no throttle/break)
+
+
+
+
+ m_forwardImpulse[wheel] = btScalar(0.);
+ m_wheelInfo[wheel].m_skidInfo= btScalar(1.);
+
+ if (groundObject)
+ {
+ m_wheelInfo[wheel].m_skidInfo= btScalar(1.);
+
+ btScalar maximp = wheelInfo.m_wheelsSuspensionForce * timeStep * wheelInfo.m_frictionSlip;
+ btScalar maximpSide = maximp;
+
+ btScalar maximpSquared = maximp * maximpSide;
+
+
+ m_forwardImpulse[wheel] = rollingFriction;//wheelInfo.m_engineForce* timeStep;
+
+ btScalar x = (m_forwardImpulse[wheel] ) * fwdFactor;
+ btScalar y = (m_sideImpulse[wheel] ) * sideFactor;
+
+ btScalar impulseSquared = (x*x + y*y);
+
+ if (impulseSquared > maximpSquared)
+ {
+ sliding = true;
+
+ btScalar factor = maximp / btSqrt(impulseSquared);
+
+ m_wheelInfo[wheel].m_skidInfo *= factor;
+ }
+ }
+
+ }
+ }
+
+
+
+
+ if (sliding)
+ {
+ for (int wheel = 0;wheel < getNumWheels(); wheel++)
+ {
+ if (m_sideImpulse[wheel] != btScalar(0.))
+ {
+ if (m_wheelInfo[wheel].m_skidInfo< btScalar(1.))
+ {
+ m_forwardImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo;
+ m_sideImpulse[wheel] *= m_wheelInfo[wheel].m_skidInfo;
+ }
+ }
+ }
+ }
+
+ // apply the impulses
+ {
+ for (int wheel = 0;wheel<getNumWheels() ; wheel++)
+ {
+ btWheelInfo& wheelInfo = m_wheelInfo[wheel];
+
+ btVector3 rel_pos = wheelInfo.m_raycastInfo.m_contactPointWS -
+ m_chassisBody->getCenterOfMassPosition();
+
+ if (m_forwardImpulse[wheel] != btScalar(0.))
+ {
+ m_chassisBody->applyImpulse(m_forwardWS[wheel]*(m_forwardImpulse[wheel]),rel_pos);
+ }
+ if (m_sideImpulse[wheel] != btScalar(0.))
+ {
+ class btRigidBody* groundObject = (class btRigidBody*) m_wheelInfo[wheel].m_raycastInfo.m_groundObject;
+
+ btVector3 rel_pos2 = wheelInfo.m_raycastInfo.m_contactPointWS -
+ groundObject->getCenterOfMassPosition();
+
+
+ btVector3 sideImp = m_axle[wheel] * m_sideImpulse[wheel];
+
+#if defined ROLLING_INFLUENCE_FIX // fix. It only worked if car's up was along Y - VT.
+ btVector3 vChassisWorldUp = getRigidBody()->getCenterOfMassTransform().getBasis().getColumn(m_indexUpAxis);
+ rel_pos -= vChassisWorldUp * (vChassisWorldUp.dot(rel_pos) * (1.f-wheelInfo.m_rollInfluence));
+#else
+ rel_pos[m_indexUpAxis] *= wheelInfo.m_rollInfluence;
+#endif
+ m_chassisBody->applyImpulse(sideImp,rel_pos);
+
+ //apply friction impulse on the ground
+ groundObject->applyImpulse(-sideImp,rel_pos2);
+ }
+ }
+ }
+
+
+}
+
+
+
+void btRaycastVehicle::debugDraw(btIDebugDraw* debugDrawer)
+{
+
+ for (int v=0;v<this->getNumWheels();v++)
+ {
+ btVector3 wheelColor(0,1,1);
+ if (getWheelInfo(v).m_raycastInfo.m_isInContact)
+ {
+ wheelColor.setValue(0,0,1);
+ } else
+ {
+ wheelColor.setValue(1,0,1);
+ }
+
+ btVector3 wheelPosWS = getWheelInfo(v).m_worldTransform.getOrigin();
+
+ btVector3 axle = btVector3(
+ getWheelInfo(v).m_worldTransform.getBasis()[0][getRightAxis()],
+ getWheelInfo(v).m_worldTransform.getBasis()[1][getRightAxis()],
+ getWheelInfo(v).m_worldTransform.getBasis()[2][getRightAxis()]);
+
+ //debug wheels (cylinders)
+ debugDrawer->drawLine(wheelPosWS,wheelPosWS+axle,wheelColor);
+ debugDrawer->drawLine(wheelPosWS,getWheelInfo(v).m_raycastInfo.m_contactPointWS,wheelColor);
+
+ }
+}
+
+
+void* btDefaultVehicleRaycaster::castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result)
+{
+// RayResultCallback& resultCallback;
+
+ btCollisionWorld::ClosestRayResultCallback rayCallback(from,to);
+
+ m_dynamicsWorld->rayTest(from, to, rayCallback);
+
+ if (rayCallback.hasHit())
+ {
+
+ btRigidBody* body = btRigidBody::upcast(rayCallback.m_collisionObject);
+ if (body && body->hasContactResponse())
+ {
+ result.m_hitPointInWorld = rayCallback.m_hitPointWorld;
+ result.m_hitNormalInWorld = rayCallback.m_hitNormalWorld;
+ result.m_hitNormalInWorld.normalize();
+ result.m_distFraction = rayCallback.m_closestHitFraction;
+ return body;
+ }
+ }
+ return 0;
+}
+
diff --git a/tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.h b/tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.h
new file mode 100644
index 00000000..f59555f9
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Vehicle/btRaycastVehicle.h
@@ -0,0 +1,236 @@
+/*
+ * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies.
+ * Erwin Coumans makes no representations about the suitability
+ * of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+*/
+#ifndef BT_RAYCASTVEHICLE_H
+#define BT_RAYCASTVEHICLE_H
+
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "BulletDynamics/ConstraintSolver/btTypedConstraint.h"
+#include "btVehicleRaycaster.h"
+class btDynamicsWorld;
+#include "LinearMath/btAlignedObjectArray.h"
+#include "btWheelInfo.h"
+#include "BulletDynamics/Dynamics/btActionInterface.h"
+
+class btVehicleTuning;
+
+///rayCast vehicle, very special constraint that turn a rigidbody into a vehicle.
+class btRaycastVehicle : public btActionInterface
+{
+
+ btAlignedObjectArray<btVector3> m_forwardWS;
+ btAlignedObjectArray<btVector3> m_axle;
+ btAlignedObjectArray<btScalar> m_forwardImpulse;
+ btAlignedObjectArray<btScalar> m_sideImpulse;
+
+ ///backwards compatibility
+ int m_userConstraintType;
+ int m_userConstraintId;
+
+public:
+ class btVehicleTuning
+ {
+ public:
+
+ btVehicleTuning()
+ :m_suspensionStiffness(btScalar(5.88)),
+ m_suspensionCompression(btScalar(0.83)),
+ m_suspensionDamping(btScalar(0.88)),
+ m_maxSuspensionTravelCm(btScalar(500.)),
+ m_frictionSlip(btScalar(10.5)),
+ m_maxSuspensionForce(btScalar(6000.))
+ {
+ }
+ btScalar m_suspensionStiffness;
+ btScalar m_suspensionCompression;
+ btScalar m_suspensionDamping;
+ btScalar m_maxSuspensionTravelCm;
+ btScalar m_frictionSlip;
+ btScalar m_maxSuspensionForce;
+
+ };
+private:
+
+ btScalar m_tau;
+ btScalar m_damping;
+ btVehicleRaycaster* m_vehicleRaycaster;
+ btScalar m_pitchControl;
+ btScalar m_steeringValue;
+ btScalar m_currentVehicleSpeedKmHour;
+
+ btRigidBody* m_chassisBody;
+
+ int m_indexRightAxis;
+ int m_indexUpAxis;
+ int m_indexForwardAxis;
+
+ void defaultInit(const btVehicleTuning& tuning);
+
+public:
+
+ //constructor to create a car from an existing rigidbody
+ btRaycastVehicle(const btVehicleTuning& tuning,btRigidBody* chassis, btVehicleRaycaster* raycaster );
+
+ virtual ~btRaycastVehicle() ;
+
+
+ ///btActionInterface interface
+ virtual void updateAction( btCollisionWorld* collisionWorld, btScalar step)
+ {
+ (void) collisionWorld;
+ updateVehicle(step);
+ }
+
+
+ ///btActionInterface interface
+ void debugDraw(btIDebugDraw* debugDrawer);
+
+ const btTransform& getChassisWorldTransform() const;
+
+ btScalar rayCast(btWheelInfo& wheel);
+
+ virtual void updateVehicle(btScalar step);
+
+
+ void resetSuspension();
+
+ btScalar getSteeringValue(int wheel) const;
+
+ void setSteeringValue(btScalar steering,int wheel);
+
+
+ void applyEngineForce(btScalar force, int wheel);
+
+ const btTransform& getWheelTransformWS( int wheelIndex ) const;
+
+ void updateWheelTransform( int wheelIndex, bool interpolatedTransform = true );
+
+// void setRaycastWheelInfo( int wheelIndex , bool isInContact, const btVector3& hitPoint, const btVector3& hitNormal,btScalar depth);
+
+ btWheelInfo& addWheel( const btVector3& connectionPointCS0, const btVector3& wheelDirectionCS0,const btVector3& wheelAxleCS,btScalar suspensionRestLength,btScalar wheelRadius,const btVehicleTuning& tuning, bool isFrontWheel);
+
+ inline int getNumWheels() const {
+ return int (m_wheelInfo.size());
+ }
+
+ btAlignedObjectArray<btWheelInfo> m_wheelInfo;
+
+
+ const btWheelInfo& getWheelInfo(int index) const;
+
+ btWheelInfo& getWheelInfo(int index);
+
+ void updateWheelTransformsWS(btWheelInfo& wheel , bool interpolatedTransform = true);
+
+
+ void setBrake(btScalar brake,int wheelIndex);
+
+ void setPitchControl(btScalar pitch)
+ {
+ m_pitchControl = pitch;
+ }
+
+ void updateSuspension(btScalar deltaTime);
+
+ virtual void updateFriction(btScalar timeStep);
+
+
+
+ inline btRigidBody* getRigidBody()
+ {
+ return m_chassisBody;
+ }
+
+ const btRigidBody* getRigidBody() const
+ {
+ return m_chassisBody;
+ }
+
+ inline int getRightAxis() const
+ {
+ return m_indexRightAxis;
+ }
+ inline int getUpAxis() const
+ {
+ return m_indexUpAxis;
+ }
+
+ inline int getForwardAxis() const
+ {
+ return m_indexForwardAxis;
+ }
+
+
+ ///Worldspace forward vector
+ btVector3 getForwardVector() const
+ {
+ const btTransform& chassisTrans = getChassisWorldTransform();
+
+ btVector3 forwardW (
+ chassisTrans.getBasis()[0][m_indexForwardAxis],
+ chassisTrans.getBasis()[1][m_indexForwardAxis],
+ chassisTrans.getBasis()[2][m_indexForwardAxis]);
+
+ return forwardW;
+ }
+
+ ///Velocity of vehicle (positive if velocity vector has same direction as foward vector)
+ btScalar getCurrentSpeedKmHour() const
+ {
+ return m_currentVehicleSpeedKmHour;
+ }
+
+ virtual void setCoordinateSystem(int rightIndex,int upIndex,int forwardIndex)
+ {
+ m_indexRightAxis = rightIndex;
+ m_indexUpAxis = upIndex;
+ m_indexForwardAxis = forwardIndex;
+ }
+
+
+ ///backwards compatibility
+ int getUserConstraintType() const
+ {
+ return m_userConstraintType ;
+ }
+
+ void setUserConstraintType(int userConstraintType)
+ {
+ m_userConstraintType = userConstraintType;
+ };
+
+ void setUserConstraintId(int uid)
+ {
+ m_userConstraintId = uid;
+ }
+
+ int getUserConstraintId() const
+ {
+ return m_userConstraintId;
+ }
+
+};
+
+class btDefaultVehicleRaycaster : public btVehicleRaycaster
+{
+ btDynamicsWorld* m_dynamicsWorld;
+public:
+ btDefaultVehicleRaycaster(btDynamicsWorld* world)
+ :m_dynamicsWorld(world)
+ {
+ }
+
+ virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result);
+
+};
+
+
+#endif //BT_RAYCASTVEHICLE_H
+
diff --git a/tests/bullet/src/BulletDynamics/Vehicle/btVehicleRaycaster.h b/tests/bullet/src/BulletDynamics/Vehicle/btVehicleRaycaster.h
new file mode 100644
index 00000000..3cc909c6
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Vehicle/btVehicleRaycaster.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies.
+ * Erwin Coumans makes no representations about the suitability
+ * of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+*/
+#ifndef BT_VEHICLE_RAYCASTER_H
+#define BT_VEHICLE_RAYCASTER_H
+
+#include "LinearMath/btVector3.h"
+
+/// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting
+struct btVehicleRaycaster
+{
+virtual ~btVehicleRaycaster()
+{
+}
+ struct btVehicleRaycasterResult
+ {
+ btVehicleRaycasterResult() :m_distFraction(btScalar(-1.)){};
+ btVector3 m_hitPointInWorld;
+ btVector3 m_hitNormalInWorld;
+ btScalar m_distFraction;
+ };
+
+ virtual void* castRay(const btVector3& from,const btVector3& to, btVehicleRaycasterResult& result) = 0;
+
+};
+
+#endif //BT_VEHICLE_RAYCASTER_H
+
diff --git a/tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.cpp b/tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.cpp
new file mode 100644
index 00000000..ef93c16f
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.cpp
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies.
+ * Erwin Coumans makes no representations about the suitability
+ * of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+*/
+#include "btWheelInfo.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h" // for pointvelocity
+
+
+btScalar btWheelInfo::getSuspensionRestLength() const
+{
+
+ return m_suspensionRestLength1;
+
+}
+
+void btWheelInfo::updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo)
+{
+ (void)raycastInfo;
+
+
+ if (m_raycastInfo.m_isInContact)
+
+ {
+ btScalar project= m_raycastInfo.m_contactNormalWS.dot( m_raycastInfo.m_wheelDirectionWS );
+ btVector3 chassis_velocity_at_contactPoint;
+ btVector3 relpos = m_raycastInfo.m_contactPointWS - chassis.getCenterOfMassPosition();
+ chassis_velocity_at_contactPoint = chassis.getVelocityInLocalPoint( relpos );
+ btScalar projVel = m_raycastInfo.m_contactNormalWS.dot( chassis_velocity_at_contactPoint );
+ if ( project >= btScalar(-0.1))
+ {
+ m_suspensionRelativeVelocity = btScalar(0.0);
+ m_clippedInvContactDotSuspension = btScalar(1.0) / btScalar(0.1);
+ }
+ else
+ {
+ btScalar inv = btScalar(-1.) / project;
+ m_suspensionRelativeVelocity = projVel * inv;
+ m_clippedInvContactDotSuspension = inv;
+ }
+
+ }
+
+ else // Not in contact : position wheel in a nice (rest length) position
+ {
+ m_raycastInfo.m_suspensionLength = this->getSuspensionRestLength();
+ m_suspensionRelativeVelocity = btScalar(0.0);
+ m_raycastInfo.m_contactNormalWS = -m_raycastInfo.m_wheelDirectionWS;
+ m_clippedInvContactDotSuspension = btScalar(1.0);
+ }
+}
diff --git a/tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.h b/tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.h
new file mode 100644
index 00000000..f916053e
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/Vehicle/btWheelInfo.h
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2005 Erwin Coumans http://continuousphysics.com/Bullet/
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies.
+ * Erwin Coumans makes no representations about the suitability
+ * of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.
+*/
+#ifndef BT_WHEEL_INFO_H
+#define BT_WHEEL_INFO_H
+
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btTransform.h"
+
+class btRigidBody;
+
+struct btWheelInfoConstructionInfo
+{
+ btVector3 m_chassisConnectionCS;
+ btVector3 m_wheelDirectionCS;
+ btVector3 m_wheelAxleCS;
+ btScalar m_suspensionRestLength;
+ btScalar m_maxSuspensionTravelCm;
+ btScalar m_wheelRadius;
+
+ btScalar m_suspensionStiffness;
+ btScalar m_wheelsDampingCompression;
+ btScalar m_wheelsDampingRelaxation;
+ btScalar m_frictionSlip;
+ btScalar m_maxSuspensionForce;
+ bool m_bIsFrontWheel;
+
+};
+
+/// btWheelInfo contains information per wheel about friction and suspension.
+struct btWheelInfo
+{
+ struct RaycastInfo
+ {
+ //set by raycaster
+ btVector3 m_contactNormalWS;//contactnormal
+ btVector3 m_contactPointWS;//raycast hitpoint
+ btScalar m_suspensionLength;
+ btVector3 m_hardPointWS;//raycast starting point
+ btVector3 m_wheelDirectionWS; //direction in worldspace
+ btVector3 m_wheelAxleWS; // axle in worldspace
+ bool m_isInContact;
+ void* m_groundObject; //could be general void* ptr
+ };
+
+ RaycastInfo m_raycastInfo;
+
+ btTransform m_worldTransform;
+
+ btVector3 m_chassisConnectionPointCS; //const
+ btVector3 m_wheelDirectionCS;//const
+ btVector3 m_wheelAxleCS; // const or modified by steering
+ btScalar m_suspensionRestLength1;//const
+ btScalar m_maxSuspensionTravelCm;
+ btScalar getSuspensionRestLength() const;
+ btScalar m_wheelsRadius;//const
+ btScalar m_suspensionStiffness;//const
+ btScalar m_wheelsDampingCompression;//const
+ btScalar m_wheelsDampingRelaxation;//const
+ btScalar m_frictionSlip;
+ btScalar m_steering;
+ btScalar m_rotation;
+ btScalar m_deltaRotation;
+ btScalar m_rollInfluence;
+ btScalar m_maxSuspensionForce;
+
+ btScalar m_engineForce;
+
+ btScalar m_brake;
+
+ bool m_bIsFrontWheel;
+
+ void* m_clientInfo;//can be used to store pointer to sync transforms...
+
+ btWheelInfo(btWheelInfoConstructionInfo& ci)
+
+ {
+
+ m_suspensionRestLength1 = ci.m_suspensionRestLength;
+ m_maxSuspensionTravelCm = ci.m_maxSuspensionTravelCm;
+
+ m_wheelsRadius = ci.m_wheelRadius;
+ m_suspensionStiffness = ci.m_suspensionStiffness;
+ m_wheelsDampingCompression = ci.m_wheelsDampingCompression;
+ m_wheelsDampingRelaxation = ci.m_wheelsDampingRelaxation;
+ m_chassisConnectionPointCS = ci.m_chassisConnectionCS;
+ m_wheelDirectionCS = ci.m_wheelDirectionCS;
+ m_wheelAxleCS = ci.m_wheelAxleCS;
+ m_frictionSlip = ci.m_frictionSlip;
+ m_steering = btScalar(0.);
+ m_engineForce = btScalar(0.);
+ m_rotation = btScalar(0.);
+ m_deltaRotation = btScalar(0.);
+ m_brake = btScalar(0.);
+ m_rollInfluence = btScalar(0.1);
+ m_bIsFrontWheel = ci.m_bIsFrontWheel;
+ m_maxSuspensionForce = ci.m_maxSuspensionForce;
+
+ }
+
+ void updateWheel(const btRigidBody& chassis,RaycastInfo& raycastInfo);
+
+ btScalar m_clippedInvContactDotSuspension;
+ btScalar m_suspensionRelativeVelocity;
+ //calculated by suspension
+ btScalar m_wheelsSuspensionForce;
+ btScalar m_skidInfo;
+
+};
+
+#endif //BT_WHEEL_INFO_H
+
diff --git a/tests/bullet/src/BulletDynamics/ibmsdk/Makefile b/tests/bullet/src/BulletDynamics/ibmsdk/Makefile
new file mode 100644
index 00000000..57505d83
--- /dev/null
+++ b/tests/bullet/src/BulletDynamics/ibmsdk/Makefile
@@ -0,0 +1,53 @@
+#### Source code Dirs
+VPATH = \
+../ConstraintSolver \
+../Dynamics \
+../Vehicle
+
+ROOT = ../../..
+
+#### Library
+LIBRARY_ppu = bulletdynamics.a
+
+#### Compiler flags
+CPPFLAGS = \
+-DUSE_LIBSPE2 \
+-I../ConstraintSolver \
+-I../Dynamics \
+-I../Vehicle \
+-I$(ROOT)/src \
+-I$(SDKINC)
+
+#### Optimization level flags
+#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG)
+CC_OPT_LEVEL = -O3
+
+##### Objects to be archived in lib
+
+OBJS = \
+btContactConstraint.o \
+btGeneric6DofConstraint.o \
+btHingeConstraint.o \
+btPoint2PointConstraint.o \
+btSequentialImpulseConstraintSolver.o \
+btSolve2LinearConstraint.o \
+btTypedConstraint.o \
+btDiscreteDynamicsWorld.o \
+btRigidBody.o \
+btSimpleDynamicsWorld.o \
+btRaycastVehicle.o \
+btWheelInfo.o
+#### Install directories
+INSTALL_DIR = $(ROOT)/lib/ibmsdk
+INSTALL_FILES = $(LIBRARY_ppu)
+
+IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
+
+ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
+ CELL_TOP ?= /opt/cell/sdk
+ include $(CELL_TOP)/buildutils/make.footer
+else
+ CELL_TOP ?= /opt/ibm/cell-sdk/prototype
+ include $(CELL_TOP)/make.footer
+endif
+
diff --git a/tests/bullet/src/BulletMultiThreaded/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/CMakeLists.txt
new file mode 100644
index 00000000..d15c317f
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/CMakeLists.txt
@@ -0,0 +1,101 @@
+INCLUDE_DIRECTORIES(
+ ${BULLET_PHYSICS_SOURCE_DIR}/src
+ ${VECTOR_MATH_INCLUDE}
+)
+
+ADD_LIBRARY(BulletMultiThreaded
+ PlatformDefinitions.h
+ PpuAddressSpace.h
+ SpuFakeDma.cpp
+ SpuFakeDma.h
+ SpuDoubleBuffer.h
+ SpuLibspe2Support.cpp
+ SpuLibspe2Support.h
+ btThreadSupportInterface.cpp
+ btThreadSupportInterface.h
+
+ Win32ThreadSupport.cpp
+ Win32ThreadSupport.h
+ PosixThreadSupport.cpp
+ PosixThreadSupport.h
+ SequentialThreadSupport.cpp
+ SequentialThreadSupport.h
+ SpuSampleTaskProcess.h
+ SpuSampleTaskProcess.cpp
+
+ SpuCollisionObjectWrapper.cpp
+ SpuCollisionObjectWrapper.h
+ SpuCollisionTaskProcess.h
+ SpuCollisionTaskProcess.cpp
+ SpuGatheringCollisionDispatcher.h
+ SpuGatheringCollisionDispatcher.cpp
+ SpuContactManifoldCollisionAlgorithm.cpp
+ SpuContactManifoldCollisionAlgorithm.h
+
+ btParallelConstraintSolver.cpp
+ btParallelConstraintSolver.h
+
+ SpuNarrowPhaseCollisionTask/Box.h
+ SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp
+ SpuNarrowPhaseCollisionTask/boxBoxDistance.h
+# SPURS_PEGatherScatterTask/SpuPEGatherScatterTask.cpp
+# SPURS_PEGatherScatterTask/SpuPEGatherScatterTask.h
+# SpuPEGatherScatterTaskProcess.cpp
+# SpuPEGatherScatterTaskProcess.h
+
+ SpuNarrowPhaseCollisionTask/SpuContactResult.cpp
+ SpuNarrowPhaseCollisionTask/SpuContactResult.h
+ SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp
+ SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h
+ SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h
+ SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h
+ SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp
+ SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h
+ SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp
+ SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h
+
+
+#Some GPU related stuff, mainly CUDA and perhaps OpenCL
+ btGpu3DGridBroadphase.cpp
+ btGpu3DGridBroadphase.h
+ btGpu3DGridBroadphaseSharedCode.h
+ btGpu3DGridBroadphaseSharedDefs.h
+ btGpu3DGridBroadphaseSharedTypes.h
+ btGpuDefines.h
+ btGpuUtilsSharedCode.h
+ btGpuUtilsSharedDefs.h
+)
+SET_TARGET_PROPERTIES(BulletMultiThreaded PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletMultiThreaded PROPERTIES SOVERSION ${BULLET_VERSION})
+
+
+SUBDIRS(GpuSoftBodySolvers)
+
+
+IF (BUILD_SHARED_LIBS)
+ IF (UNIX)
+ TARGET_LINK_LIBRARIES(BulletMultiThreaded BulletDynamics BulletCollision pthread)
+ ELSE()
+ TARGET_LINK_LIBRARIES(BulletMultiThreaded BulletDynamics BulletCollision)
+ ENDIF()
+ENDIF (BUILD_SHARED_LIBS)
+
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ #INSTALL of other files requires CMake 2.6
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+# IF(INSTALL_EXTRA_LIBS)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletMultiThreaded DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletMultiThreaded DESTINATION lib${LIB_SUFFIX})
+ INSTALL(DIRECTORY
+${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING
+PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+# ENDIF (INSTALL_EXTRA_LIBS)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CMakeLists.txt
new file mode 100644
index 00000000..63cc88b7
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CMakeLists.txt
@@ -0,0 +1,14 @@
+
+INCLUDE_DIRECTORIES(
+${BULLET_PHYSICS_SOURCE_DIR}/src
+)
+
+
+SUBDIRS (
+ OpenCL
+ CPU
+)
+
+IF( USE_DX11 )
+ SUBDIRS( DX11 )
+ENDIF( USE_DX11 )
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/CMakeLists.txt
new file mode 100644
index 00000000..908ff373
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/CMakeLists.txt
@@ -0,0 +1,42 @@
+
+INCLUDE_DIRECTORIES(
+${BULLET_PHYSICS_SOURCE_DIR}/src
+${VECTOR_MATH_INCLUDE}
+)
+
+
+
+SET(BulletSoftBodyCPUSolvers_SRCS
+ btSoftBodySolver_CPU.cpp
+)
+
+SET(BulletSoftBodyCPUSolvers_HDRS
+ btSoftBodySolver_CPU.h
+ btSoftBodySolverData.h
+)
+
+
+ADD_LIBRARY(BulletSoftBodySolvers_CPU ${BulletSoftBodyCPUSolvers_SRCS} ${BulletSoftBodyCPUSolvers_HDRS} )
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_CPU PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_CPU PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_CPU BulletSoftBody)
+ENDIF (BUILD_SHARED_LIBS)
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_CPU DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_CPU DESTINATION lib${LIB_SUFFIX})
+#headers are already installed by BulletMultiThreaded library
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_CPU PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_CPU PROPERTIES PUBLIC_HEADER "${BulletSoftBodyCPUSolvers_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h
new file mode 100644
index 00000000..eb4e98b0
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h
@@ -0,0 +1,744 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_DATA_H
+#define BT_SOFT_BODY_SOLVER_DATA_H
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "vectormath/vmInclude.h"
+
+
+class btSoftBodyLinkData
+{
+public:
+ /**
+ * Class representing a link as a set of three indices into the vertex array.
+ */
+ class LinkNodePair
+ {
+ public:
+ int vertex0;
+ int vertex1;
+
+ LinkNodePair()
+ {
+ vertex0 = 0;
+ vertex1 = 0;
+ }
+
+ LinkNodePair( int v0, int v1 )
+ {
+ vertex0 = v0;
+ vertex1 = v1;
+ }
+ };
+
+ /**
+ * Class describing a link for input into the system.
+ */
+ class LinkDescription
+ {
+ protected:
+ int m_vertex0;
+ int m_vertex1;
+ float m_linkLinearStiffness;
+ float m_linkStrength;
+
+ public:
+
+ LinkDescription()
+ {
+ m_vertex0 = 0;
+ m_vertex1 = 0;
+ m_linkLinearStiffness = 1.0;
+ m_linkStrength = 1.0;
+ }
+
+ LinkDescription( int newVertex0, int newVertex1, float linkLinearStiffness )
+ {
+ m_vertex0 = newVertex0;
+ m_vertex1 = newVertex1;
+ m_linkLinearStiffness = linkLinearStiffness;
+ m_linkStrength = 1.0;
+ }
+
+ LinkNodePair getVertexPair() const
+ {
+ LinkNodePair nodes;
+ nodes.vertex0 = m_vertex0;
+ nodes.vertex1 = m_vertex1;
+ return nodes;
+ }
+
+ void setVertex0( int vertex )
+ {
+ m_vertex0 = vertex;
+ }
+
+ void setVertex1( int vertex )
+ {
+ m_vertex1 = vertex;
+ }
+
+ void setLinkLinearStiffness( float linearStiffness )
+ {
+ m_linkLinearStiffness = linearStiffness;
+ }
+
+ void setLinkStrength( float strength )
+ {
+ m_linkStrength = strength;
+ }
+
+ int getVertex0() const
+ {
+ return m_vertex0;
+ }
+
+ int getVertex1() const
+ {
+ return m_vertex1;
+ }
+
+ float getLinkStrength() const
+ {
+ return m_linkStrength;
+ }
+
+ float getLinkLinearStiffness() const
+ {
+ return m_linkLinearStiffness;
+ }
+ };
+
+
+protected:
+ // NOTE:
+ // Vertex reference data is stored relative to global array, not relative to individual cloth.
+ // Values must be correct if being passed into single-cloth VBOs or when migrating from one solver
+ // to another.
+
+ btAlignedObjectArray< LinkNodePair > m_links; // Vertex pair for the link
+ btAlignedObjectArray< float > m_linkStrength; // Strength of each link
+ // (inverseMassA + inverseMassB)/ linear stiffness coefficient
+ btAlignedObjectArray< float > m_linksMassLSC;
+ btAlignedObjectArray< float > m_linksRestLengthSquared;
+ // Current vector length of link
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_linksCLength;
+ // 1/(current length * current length * massLSC)
+ btAlignedObjectArray< float > m_linksLengthRatio;
+ btAlignedObjectArray< float > m_linksRestLength;
+ btAlignedObjectArray< float > m_linksMaterialLinearStiffnessCoefficient;
+
+public:
+ btSoftBodyLinkData()
+ {
+ }
+
+ virtual ~btSoftBodyLinkData()
+ {
+ }
+
+ virtual void clear()
+ {
+ m_links.resize(0);
+ m_linkStrength.resize(0);
+ m_linksMassLSC.resize(0);
+ m_linksRestLengthSquared.resize(0);
+ m_linksLengthRatio.resize(0);
+ m_linksRestLength.resize(0);
+ m_linksMaterialLinearStiffnessCoefficient.resize(0);
+ }
+
+ int getNumLinks()
+ {
+ return m_links.size();
+ }
+
+ /** Allocate enough space in all link-related arrays to fit numLinks links */
+ virtual void createLinks( int numLinks )
+ {
+ int previousSize = m_links.size();
+ int newSize = previousSize + numLinks;
+
+ // Resize all the arrays that store link data
+ m_links.resize( newSize );
+ m_linkStrength.resize( newSize );
+ m_linksMassLSC.resize( newSize );
+ m_linksRestLengthSquared.resize( newSize );
+ m_linksCLength.resize( newSize );
+ m_linksLengthRatio.resize( newSize );
+ m_linksRestLength.resize( newSize );
+ m_linksMaterialLinearStiffnessCoefficient.resize( newSize );
+ }
+
+ /** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+ virtual void setLinkAt( const LinkDescription &link, int linkIndex )
+ {
+ m_links[linkIndex] = link.getVertexPair();
+ m_linkStrength[linkIndex] = link.getLinkStrength();
+ m_linksMassLSC[linkIndex] = 0.f;
+ m_linksRestLengthSquared[linkIndex] = 0.f;
+ m_linksCLength[linkIndex] = Vectormath::Aos::Vector3(0.f, 0.f, 0.f);
+ m_linksLengthRatio[linkIndex] = 0.f;
+ m_linksRestLength[linkIndex] = 0.f;
+ m_linksMaterialLinearStiffnessCoefficient[linkIndex] = link.getLinkLinearStiffness();
+ }
+
+
+ /**
+ * Return true if data is on the accelerator.
+ * The CPU version of this class will return true here because
+ * the CPU is the same as the accelerator.
+ */
+ virtual bool onAccelerator()
+ {
+ return true;
+ }
+
+ /**
+ * Move data from host memory to the accelerator.
+ * The CPU version will always return that it has moved it.
+ */
+ virtual bool moveToAccelerator()
+ {
+ return true;
+ }
+
+ /**
+ * Move data from host memory from the accelerator.
+ * The CPU version will always return that it has moved it.
+ */
+ virtual bool moveFromAccelerator()
+ {
+ return true;
+ }
+
+
+
+ /**
+ * Return reference to the vertex index pair for link linkIndex as stored on the host.
+ */
+ LinkNodePair &getVertexPair( int linkIndex )
+ {
+ return m_links[linkIndex];
+ }
+
+ /**
+ * Return reference to strength of link linkIndex as stored on the host.
+ */
+ float &getStrength( int linkIndex )
+ {
+ return m_linkStrength[linkIndex];
+ }
+
+ /**
+ * Return a reference to the strength of the link corrected for link sorting.
+ * This is important if we are using data on an accelerator which has the data sorted in some fashion.
+ */
+ virtual float &getStrengthCorrected( int linkIndex )
+ {
+ return getStrength( linkIndex );
+ }
+
+ /**
+ * Return reference to the rest length of link linkIndex as stored on the host.
+ */
+ float &getRestLength( int linkIndex )
+ {
+ return m_linksRestLength[linkIndex];
+ }
+
+ /**
+ * Return reference to linear stiffness coefficient for link linkIndex as stored on the host.
+ */
+ float &getLinearStiffnessCoefficient( int linkIndex )
+ {
+ return m_linksMaterialLinearStiffnessCoefficient[linkIndex];
+ }
+
+ /**
+ * Return reference to the MassLSC value for link linkIndex as stored on the host.
+ */
+ float &getMassLSC( int linkIndex )
+ {
+ return m_linksMassLSC[linkIndex];
+ }
+
+ /**
+ * Return reference to rest length squared for link linkIndex as stored on the host.
+ */
+ float &getRestLengthSquared( int linkIndex )
+ {
+ return m_linksRestLengthSquared[linkIndex];
+ }
+
+ /**
+ * Return reference to current length of link linkIndex as stored on the host.
+ */
+ Vectormath::Aos::Vector3 &getCurrentLength( int linkIndex )
+ {
+ return m_linksCLength[linkIndex];
+ }
+
+ /**
+ * Return the link length ratio from for link linkIndex as stored on the host.
+ */
+ float &getLinkLengthRatio( int linkIndex )
+ {
+ return m_linksLengthRatio[linkIndex];
+ }
+};
+
+
+
+/**
+ * Wrapper for vertex data information.
+ * By wrapping it like this we stand a good chance of being able to optimise for storage format easily.
+ * It should also help us make sure all the data structures remain consistent.
+ */
+class btSoftBodyVertexData
+{
+public:
+ /**
+ * Class describing a vertex for input into the system.
+ */
+ class VertexDescription
+ {
+ private:
+ Vectormath::Aos::Point3 m_position;
+ /** Inverse mass. If this is 0f then the mass was 0 because that simplifies calculations. */
+ float m_inverseMass;
+
+ public:
+ VertexDescription()
+ {
+ m_position = Vectormath::Aos::Point3( 0.f, 0.f, 0.f );
+ m_inverseMass = 0.f;
+ }
+
+ VertexDescription( const Vectormath::Aos::Point3 &position, float mass )
+ {
+ m_position = position;
+ if( mass > 0.f )
+ m_inverseMass = 1.0f/mass;
+ else
+ m_inverseMass = 0.f;
+ }
+
+ void setPosition( const Vectormath::Aos::Point3 &position )
+ {
+ m_position = position;
+ }
+
+ void setInverseMass( float inverseMass )
+ {
+ m_inverseMass = inverseMass;
+ }
+
+ void setMass( float mass )
+ {
+ if( mass > 0.f )
+ m_inverseMass = 1.0f/mass;
+ else
+ m_inverseMass = 0.f;
+ }
+
+ Vectormath::Aos::Point3 getPosition() const
+ {
+ return m_position;
+ }
+
+ float getInverseMass() const
+ {
+ return m_inverseMass;
+ }
+
+ float getMass() const
+ {
+ if( m_inverseMass == 0.f )
+ return 0.f;
+ else
+ return 1.0f/m_inverseMass;
+ }
+ };
+protected:
+
+ // identifier for the individual cloth
+ // For the CPU we don't really need this as we can grab the cloths and iterate over only their vertices
+ // For a parallel accelerator knowing on a per-vertex basis which cloth we're part of will help for obtaining
+ // per-cloth data
+ // For sorting etc it might also be helpful to be able to use in-array data such as this.
+ btAlignedObjectArray< int > m_clothIdentifier;
+ btAlignedObjectArray< Vectormath::Aos::Point3 > m_vertexPosition; // vertex positions
+ btAlignedObjectArray< Vectormath::Aos::Point3 > m_vertexPreviousPosition; // vertex positions
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_vertexVelocity; // Velocity
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_vertexForceAccumulator; // Force accumulator
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_vertexNormal; // Normals
+ btAlignedObjectArray< float > m_vertexInverseMass; // Inverse mass
+ btAlignedObjectArray< float > m_vertexArea; // Area controlled by the vertex
+ btAlignedObjectArray< int > m_vertexTriangleCount; // Number of triangles touching this vertex
+
+public:
+ btSoftBodyVertexData()
+ {
+ }
+
+ virtual ~btSoftBodyVertexData()
+ {
+ }
+
+ virtual void clear()
+ {
+ m_clothIdentifier.resize(0);
+ m_vertexPosition.resize(0);
+ m_vertexPreviousPosition.resize(0);
+ m_vertexVelocity.resize(0);
+ m_vertexForceAccumulator.resize(0);
+ m_vertexNormal.resize(0);
+ m_vertexInverseMass.resize(0);
+ m_vertexArea.resize(0);
+ m_vertexTriangleCount.resize(0);
+ }
+
+ int getNumVertices()
+ {
+ return m_vertexPosition.size();
+ }
+
+ int getClothIdentifier( int vertexIndex )
+ {
+ return m_clothIdentifier[vertexIndex];
+ }
+
+ void setVertexAt( const VertexDescription &vertex, int vertexIndex )
+ {
+ m_vertexPosition[vertexIndex] = vertex.getPosition();
+ m_vertexPreviousPosition[vertexIndex] = vertex.getPosition();
+ m_vertexVelocity[vertexIndex] = Vectormath::Aos::Vector3(0.f, 0.f, 0.f);
+ m_vertexForceAccumulator[vertexIndex] = Vectormath::Aos::Vector3(0.f, 0.f, 0.f);
+ m_vertexNormal[vertexIndex] = Vectormath::Aos::Vector3(0.f, 0.f, 0.f);
+ m_vertexInverseMass[vertexIndex] = vertex.getInverseMass();
+ m_vertexArea[vertexIndex] = 0.f;
+ m_vertexTriangleCount[vertexIndex] = 0;
+ }
+
+ /**
+ * Create numVertices new vertices for cloth clothIdentifier
+ * maxVertices allows a buffer zone of extra vertices for alignment or tearing reasons.
+ */
+ void createVertices( int numVertices, int clothIdentifier, int maxVertices = 0 )
+ {
+ int previousSize = m_vertexPosition.size();
+ if( maxVertices == 0 )
+ maxVertices = numVertices;
+ int newSize = previousSize + maxVertices;
+
+ // Resize all the arrays that store vertex data
+ m_clothIdentifier.resize( newSize );
+ m_vertexPosition.resize( newSize );
+ m_vertexPreviousPosition.resize( newSize );
+ m_vertexVelocity.resize( newSize );
+ m_vertexForceAccumulator.resize( newSize );
+ m_vertexNormal.resize( newSize );
+ m_vertexInverseMass.resize( newSize );
+ m_vertexArea.resize( newSize );
+ m_vertexTriangleCount.resize( newSize );
+
+ for( int vertexIndex = previousSize; vertexIndex < newSize; ++vertexIndex )
+ m_clothIdentifier[vertexIndex] = clothIdentifier;
+ for( int vertexIndex = (previousSize + numVertices); vertexIndex < newSize; ++vertexIndex )
+ m_clothIdentifier[vertexIndex] = -1;
+ }
+
+ // Get and set methods in header so they can be inlined
+
+ /**
+ * Return a reference to the position of vertex vertexIndex as stored on the host.
+ */
+ Vectormath::Aos::Point3 &getPosition( int vertexIndex )
+ {
+ return m_vertexPosition[vertexIndex];
+ }
+
+ Vectormath::Aos::Point3 getPosition( int vertexIndex ) const
+ {
+ return m_vertexPosition[vertexIndex];
+ }
+
+ /**
+ * Return a reference to the previous position of vertex vertexIndex as stored on the host.
+ */
+ Vectormath::Aos::Point3 &getPreviousPosition( int vertexIndex )
+ {
+ return m_vertexPreviousPosition[vertexIndex];
+ }
+
+ /**
+ * Return a reference to the velocity of vertex vertexIndex as stored on the host.
+ */
+ Vectormath::Aos::Vector3 &getVelocity( int vertexIndex )
+ {
+ return m_vertexVelocity[vertexIndex];
+ }
+
+ /**
+ * Return a reference to the force accumulator of vertex vertexIndex as stored on the host.
+ */
+ Vectormath::Aos::Vector3 &getForceAccumulator( int vertexIndex )
+ {
+ return m_vertexForceAccumulator[vertexIndex];
+ }
+
+ /**
+ * Return a reference to the normal of vertex vertexIndex as stored on the host.
+ */
+ Vectormath::Aos::Vector3 &getNormal( int vertexIndex )
+ {
+ return m_vertexNormal[vertexIndex];
+ }
+
+ Vectormath::Aos::Vector3 getNormal( int vertexIndex ) const
+ {
+ return m_vertexNormal[vertexIndex];
+ }
+
+ /**
+ * Return a reference to the inverse mass of vertex vertexIndex as stored on the host.
+ */
+ float &getInverseMass( int vertexIndex )
+ {
+ return m_vertexInverseMass[vertexIndex];
+ }
+
+ /**
+ * Get access to the area controlled by this vertex.
+ */
+ float &getArea( int vertexIndex )
+ {
+ return m_vertexArea[vertexIndex];
+ }
+
+ /**
+ * Get access to the array of how many triangles touch each vertex.
+ */
+ int &getTriangleCount( int vertexIndex )
+ {
+ return m_vertexTriangleCount[vertexIndex];
+ }
+
+
+
+ /**
+ * Return true if data is on the accelerator.
+ * The CPU version of this class will return true here because
+ * the CPU is the same as the accelerator.
+ */
+ virtual bool onAccelerator()
+ {
+ return true;
+ }
+
+ /**
+ * Move data from host memory to the accelerator.
+ * The CPU version will always return that it has moved it.
+ */
+ virtual bool moveToAccelerator()
+ {
+ return true;
+ }
+
+ /**
+ * Move data from host memory from the accelerator.
+ * The CPU version will always return that it has moved it.
+ */
+ virtual bool moveFromAccelerator()
+ {
+ return true;
+ }
+
+ btAlignedObjectArray< Vectormath::Aos::Point3 > &getVertexPositions()
+ {
+ return m_vertexPosition;
+ }
+};
+
+
+class btSoftBodyTriangleData
+{
+public:
+ /**
+ * Class representing a triangle as a set of three indices into the
+ * vertex array.
+ */
+ class TriangleNodeSet
+ {
+ public:
+ int vertex0;
+ int vertex1;
+ int vertex2;
+ int _padding;
+
+ TriangleNodeSet( )
+ {
+ vertex0 = 0;
+ vertex1 = 0;
+ vertex2 = 0;
+ _padding = -1;
+ }
+
+ TriangleNodeSet( int newVertex0, int newVertex1, int newVertex2 )
+ {
+ vertex0 = newVertex0;
+ vertex1 = newVertex1;
+ vertex2 = newVertex2;
+ }
+ };
+
+ class TriangleDescription
+ {
+ protected:
+ int m_vertex0;
+ int m_vertex1;
+ int m_vertex2;
+
+ public:
+ TriangleDescription()
+ {
+ m_vertex0 = 0;
+ m_vertex1 = 0;
+ m_vertex2 = 0;
+ }
+
+ TriangleDescription( int newVertex0, int newVertex1, int newVertex2 )
+ {
+ m_vertex0 = newVertex0;
+ m_vertex1 = newVertex1;
+ m_vertex2 = newVertex2;
+ }
+
+ TriangleNodeSet getVertexSet() const
+ {
+ btSoftBodyTriangleData::TriangleNodeSet nodes;
+ nodes.vertex0 = m_vertex0;
+ nodes.vertex1 = m_vertex1;
+ nodes.vertex2 = m_vertex2;
+ return nodes;
+ }
+ };
+
+protected:
+ // NOTE:
+ // Vertex reference data is stored relative to global array, not relative to individual cloth.
+ // Values must be correct if being passed into single-cloth VBOs or when migrating from one solver
+ // to another.
+ btAlignedObjectArray< TriangleNodeSet > m_vertexIndices;
+ btAlignedObjectArray< float > m_area;
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_normal;
+
+public:
+ btSoftBodyTriangleData()
+ {
+ }
+
+ virtual ~btSoftBodyTriangleData()
+ {
+
+ }
+
+ virtual void clear()
+ {
+ m_vertexIndices.resize(0);
+ m_area.resize(0);
+ m_normal.resize(0);
+ }
+
+ int getNumTriangles()
+ {
+ return m_vertexIndices.size();
+ }
+
+ virtual void setTriangleAt( const TriangleDescription &triangle, int triangleIndex )
+ {
+ m_vertexIndices[triangleIndex] = triangle.getVertexSet();
+ }
+
+ virtual void createTriangles( int numTriangles )
+ {
+ int previousSize = m_vertexIndices.size();
+ int newSize = previousSize + numTriangles;
+
+ // Resize all the arrays that store triangle data
+ m_vertexIndices.resize( newSize );
+ m_area.resize( newSize );
+ m_normal.resize( newSize );
+ }
+
+ /**
+ * Return the vertex index set for triangle triangleIndex as stored on the host.
+ */
+ const TriangleNodeSet &getVertexSet( int triangleIndex )
+ {
+ return m_vertexIndices[triangleIndex];
+ }
+
+ /**
+ * Get access to the triangle area.
+ */
+ float &getTriangleArea( int triangleIndex )
+ {
+ return m_area[triangleIndex];
+ }
+
+ /**
+ * Get access to the normal vector for this triangle.
+ */
+ Vectormath::Aos::Vector3 &getNormal( int triangleIndex )
+ {
+ return m_normal[triangleIndex];
+ }
+
+ /**
+ * Return true if data is on the accelerator.
+ * The CPU version of this class will return true here because
+ * the CPU is the same as the accelerator.
+ */
+ virtual bool onAccelerator()
+ {
+ return true;
+ }
+
+ /**
+ * Move data from host memory to the accelerator.
+ * The CPU version will always return that it has moved it.
+ */
+ virtual bool moveToAccelerator()
+ {
+ return true;
+ }
+
+ /**
+ * Move data from host memory from the accelerator.
+ * The CPU version will always return that it has moved it.
+ */
+ virtual bool moveFromAccelerator()
+ {
+ return true;
+ }
+};
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_DATA_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.cpp b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.cpp
new file mode 100644
index 00000000..51a24baf
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.cpp
@@ -0,0 +1,979 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "vectormath/vmInclude.h"
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.h"
+#include "BulletSoftBody/btSoftBody.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+
+
+btCPUSoftBodySolver::btCPUSoftBodySolver()
+{
+ // Initial we will clearly need to update solver constants
+ // For now this is global for the cloths linked with this solver - we should probably make this body specific
+ // for performance in future once we understand more clearly when constants need to be updated
+ m_updateSolverConstants = true;
+}
+
+btCPUSoftBodySolver::~btCPUSoftBodySolver()
+{
+}
+
+
+
+
+btSoftBodyLinkData &btCPUSoftBodySolver::getLinkData()
+{
+ return m_linkData;
+}
+
+btSoftBodyVertexData &btCPUSoftBodySolver::getVertexData()
+{
+ return m_vertexData;
+}
+
+btSoftBodyTriangleData &btCPUSoftBodySolver::getTriangleData()
+{
+ return m_triangleData;
+}
+
+
+
+
+
+
+static Vectormath::Aos::Vector3 toVector3( const btVector3 &vec )
+{
+ Vectormath::Aos::Vector3 outVec( vec.getX(), vec.getY(), vec.getZ() );
+ return outVec;
+}
+
+static Vectormath::Aos::Transform3 toTransform3( const btTransform &transform )
+{
+ Vectormath::Aos::Transform3 outTransform;
+ outTransform.setCol(0, toVector3(transform.getBasis().getColumn(0)));
+ outTransform.setCol(1, toVector3(transform.getBasis().getColumn(1)));
+ outTransform.setCol(2, toVector3(transform.getBasis().getColumn(2)));
+ outTransform.setCol(3, toVector3(transform.getOrigin()));
+ return outTransform;
+}
+
+void btCPUSoftBodySolver::btAcceleratedSoftBodyInterface::updateBounds( const btVector3 &lowerBound, const btVector3 &upperBound )
+{
+ float scalarMargin = this->getSoftBody()->getCollisionShape()->getMargin();
+ btVector3 vectorMargin( scalarMargin, scalarMargin, scalarMargin );
+ m_softBody->m_bounds[0] = lowerBound - vectorMargin;
+ m_softBody->m_bounds[1] = upperBound + vectorMargin;
+}
+
+
+void btCPUSoftBodySolver::copyBackToSoftBodies()
+{
+ // Loop over soft bodies, copying all the vertex positions back for each body in turn
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[ softBodyIndex ];
+ btSoftBody *softBody = softBodyInterface->getSoftBody();
+
+ int firstVertex = softBodyInterface->getFirstVertex();
+ int numVertices = softBodyInterface->getNumVertices();
+
+ // Copy vertices from solver back into the softbody
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ using Vectormath::Aos::Point3;
+ Point3 vertexPosition( getVertexData().getVertexPositions()[firstVertex + vertex] );
+
+ softBody->m_nodes[vertex].m_x.setX( vertexPosition.getX() );
+ softBody->m_nodes[vertex].m_x.setY( vertexPosition.getY() );
+ softBody->m_nodes[vertex].m_x.setZ( vertexPosition.getZ() );
+
+ softBody->m_nodes[vertex].m_n.setX( vertexPosition.getX() );
+ softBody->m_nodes[vertex].m_n.setY( vertexPosition.getY() );
+ softBody->m_nodes[vertex].m_n.setZ( vertexPosition.getZ() );
+ }
+ }
+} // btCPUSoftBodySolver::copyBackToSoftBodies
+
+void btCPUSoftBodySolver::optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate )
+{
+ if( forceUpdate || m_softBodySet.size() != softBodies.size() )
+ {
+ // Have a change in the soft body set so update, reloading all the data
+ getVertexData().clear();
+ getTriangleData().clear();
+ getLinkData().clear();
+ m_softBodySet.resize(0);
+
+
+ for( int softBodyIndex = 0; softBodyIndex < softBodies.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = softBodies[ softBodyIndex ];
+ using Vectormath::Aos::Matrix3;
+ using Vectormath::Aos::Point3;
+
+ // Create SoftBody that will store the information within the solver
+ btAcceleratedSoftBodyInterface *newSoftBody = new btAcceleratedSoftBodyInterface( softBody );
+ m_softBodySet.push_back( newSoftBody );
+
+ m_perClothAcceleration.push_back( toVector3(softBody->getWorldInfo()->m_gravity) );
+ m_perClothDampingFactor.push_back(softBody->m_cfg.kDP);
+ m_perClothVelocityCorrectionCoefficient.push_back( softBody->m_cfg.kVCF );
+ m_perClothLiftFactor.push_back( softBody->m_cfg.kLF );
+ m_perClothDragFactor.push_back( softBody->m_cfg.kDG );
+ m_perClothMediumDensity.push_back(softBody->getWorldInfo()->air_density);
+ m_perClothCollisionObjects.push_back( CollisionObjectIndices(-1, -1) );
+
+ // Add space for new vertices and triangles in the default solver for now
+ // TODO: Include space here for tearing too later
+ int firstVertex = getVertexData().getNumVertices();
+ int numVertices = softBody->m_nodes.size();
+ int maxVertices = numVertices;
+ // Allocate space for new vertices in all the vertex arrays
+ getVertexData().createVertices( maxVertices, softBodyIndex );
+
+ int firstTriangle = getTriangleData().getNumTriangles();
+ int numTriangles = softBody->m_faces.size();
+ int maxTriangles = numTriangles;
+ getTriangleData().createTriangles( maxTriangles );
+
+ // Copy vertices from softbody into the solver
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ Point3 multPoint(softBody->m_nodes[vertex].m_x.getX(), softBody->m_nodes[vertex].m_x.getY(), softBody->m_nodes[vertex].m_x.getZ());
+ btSoftBodyVertexData::VertexDescription desc;
+
+ // TODO: Position in the softbody might be pre-transformed
+ // or we may need to adapt for the pose.
+ //desc.setPosition( cloth.getMeshTransform()*multPoint );
+ desc.setPosition( multPoint );
+
+ float vertexInverseMass = softBody->m_nodes[vertex].m_im;
+ desc.setInverseMass(vertexInverseMass);
+ getVertexData().setVertexAt( desc, firstVertex + vertex );
+ }
+
+ // Copy triangles similarly
+ // We're assuming here that vertex indices are based on the firstVertex rather than the entire scene
+ for( int triangle = 0; triangle < numTriangles; ++triangle )
+ {
+ // Note that large array storage is relative to the array not to the cloth
+ // So we need to add firstVertex to each value
+ int vertexIndex0 = (softBody->m_faces[triangle].m_n[0] - &(softBody->m_nodes[0]));
+ int vertexIndex1 = (softBody->m_faces[triangle].m_n[1] - &(softBody->m_nodes[0]));
+ int vertexIndex2 = (softBody->m_faces[triangle].m_n[2] - &(softBody->m_nodes[0]));
+ btSoftBodyTriangleData::TriangleDescription newTriangle(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, vertexIndex2 + firstVertex);
+ getTriangleData().setTriangleAt( newTriangle, firstTriangle + triangle );
+
+ // Increase vertex triangle counts for this triangle
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex0)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex1)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex2)++;
+ }
+
+ int firstLink = getLinkData().getNumLinks();
+ int numLinks = softBody->m_links.size();
+ int maxLinks = numLinks;
+
+ // Allocate space for the links
+ getLinkData().createLinks( numLinks );
+
+ // Add the links
+ for( int link = 0; link < numLinks; ++link )
+ {
+ int vertexIndex0 = softBody->m_links[link].m_n[0] - &(softBody->m_nodes[0]);
+ int vertexIndex1 = softBody->m_links[link].m_n[1] - &(softBody->m_nodes[0]);
+
+ btSoftBodyLinkData::LinkDescription newLink(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, softBody->m_links[link].m_material->m_kLST);
+ newLink.setLinkStrength(1.f);
+ getLinkData().setLinkAt(newLink, firstLink + link);
+ }
+
+ newSoftBody->setFirstVertex( firstVertex );
+ newSoftBody->setFirstTriangle( firstTriangle );
+ newSoftBody->setNumVertices( numVertices );
+ newSoftBody->setMaxVertices( maxVertices );
+ newSoftBody->setNumTriangles( numTriangles );
+ newSoftBody->setMaxTriangles( maxTriangles );
+ newSoftBody->setFirstLink( firstLink );
+ newSoftBody->setNumLinks( numLinks );
+ }
+
+
+
+ updateConstants(0.f);
+ }
+}
+
+
+
+
+void btCPUSoftBodySolver::updateSoftBodies()
+{
+ using namespace Vectormath::Aos;
+
+ int numVertices = m_vertexData.getNumVertices();
+ int numTriangles = m_triangleData.getNumTriangles();
+
+ // Initialise normal and vertex counts
+ for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
+ {
+ m_vertexData.getArea(vertexIndex) = 0.f;
+ m_vertexData.getNormal(vertexIndex) = Vector3(0.f, 0.f, 0.f);
+ }
+
+ // Update the areas for the triangles and vertices.
+ for( int triangleIndex = 0; triangleIndex < numTriangles; ++triangleIndex )
+ {
+ float &triangleArea( m_triangleData.getTriangleArea( triangleIndex ) );
+ const btSoftBodyTriangleData::TriangleNodeSet &vertices( m_triangleData.getVertexSet(triangleIndex) );
+
+ Point3 &vertexPosition0( m_vertexData.getPosition( vertices.vertex0 ) );
+ Point3 &vertexPosition1( m_vertexData.getPosition( vertices.vertex1 ) );
+ Point3 &vertexPosition2( m_vertexData.getPosition( vertices.vertex2 ) );
+
+ triangleArea = computeTriangleArea( vertexPosition0, vertexPosition1, vertexPosition2 );
+
+ // Add to areas for vertices and increase the count of the number of triangles affecting the vertex
+ m_vertexData.getArea(vertices.vertex0) += triangleArea;
+ m_vertexData.getArea(vertices.vertex1) += triangleArea;
+ m_vertexData.getArea(vertices.vertex2) += triangleArea;
+
+ Point3 &vertex0( m_vertexData.getPosition(vertices.vertex0) );
+ Point3 &vertex1( m_vertexData.getPosition(vertices.vertex1) );
+ Point3 &vertex2( m_vertexData.getPosition(vertices.vertex2) );
+
+ Vector3 triangleNormal = cross( vertex1-vertex0, vertex2 - vertex0 );
+
+ m_triangleData.getNormal(triangleIndex) = normalize(triangleNormal);
+
+ m_vertexData.getNormal(vertices.vertex0) += triangleNormal;
+ m_vertexData.getNormal(vertices.vertex1) += triangleNormal;
+ m_vertexData.getNormal(vertices.vertex2) += triangleNormal;
+
+ }
+
+ // Normalise the area and normals
+ for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
+ {
+ m_vertexData.getArea(vertexIndex) /= m_vertexData.getTriangleCount(vertexIndex);
+ m_vertexData.getNormal(vertexIndex) = normalize( m_vertexData.getNormal(vertexIndex) );
+ }
+
+
+ // Clear the collision shape array for the next frame
+ m_collisionObjectDetails.clear();
+
+} // updateSoftBodies
+
+
+Vectormath::Aos::Vector3 btCPUSoftBodySolver::ProjectOnAxis( const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a )
+{
+ return a*Vectormath::Aos::dot(v, a);
+}
+
+void btCPUSoftBodySolver::ApplyClampedForce( float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce )
+{
+ float dtInverseMass = solverdt*inverseMass;
+ if( Vectormath::Aos::lengthSqr(force * dtInverseMass) > Vectormath::Aos::lengthSqr(vertexVelocity) )
+ {
+ vertexForce -= ProjectOnAxis( vertexVelocity, normalize( force ) )/dtInverseMass;
+ } else {
+ vertexForce += force;
+ }
+}
+
+bool btCPUSoftBodySolver::checkInitialized()
+{
+ return true;
+}
+
+void btCPUSoftBodySolver::applyForces( float solverdt )
+{
+ using namespace Vectormath::Aos;
+
+ int numVertices = m_vertexData.getNumVertices();
+ for( int clothIndex = 0; clothIndex < m_softBodySet.size(); ++clothIndex )
+ {
+ btAcceleratedSoftBodyInterface *currentCloth = m_softBodySet[clothIndex];
+ const int startVertex = currentCloth->getFirstVertex();
+ const int numVertices = currentCloth->getNumVertices();
+
+ Vector3 velocityChange = m_perClothAcceleration[clothIndex]*solverdt;
+ for( int vertexIndex = startVertex; vertexIndex < (startVertex + numVertices); ++vertexIndex )
+ {
+ float inverseMass = m_vertexData.getInverseMass( vertexIndex );
+ Vector3 &vertexVelocity( m_vertexData.getVelocity( vertexIndex ) );
+
+ // First apply the global acceleration to all vertices
+ if( inverseMass > 0 )
+ vertexVelocity += velocityChange;
+
+ // If it's a non-static vertex
+ if( m_vertexData.getInverseMass(vertexIndex) > 0 )
+ {
+ // Wind effects on a wind-per-cloth basis
+ float liftFactor = m_perClothLiftFactor[clothIndex];
+ float dragFactor = m_perClothDragFactor[clothIndex];
+ if( (liftFactor > 0.f) || (dragFactor > 0.f) )
+ {
+ Vector3 normal = m_vertexData.getNormal(vertexIndex);
+ Vector3 relativeWindVelocity = m_vertexData.getVelocity(vertexIndex) - m_perClothWindVelocity[clothIndex];
+ float relativeSpeedSquared = lengthSqr(relativeWindVelocity);
+ if( relativeSpeedSquared > FLT_EPSILON )
+ {
+ normal = normal * (dot(normal, relativeWindVelocity) < 0 ? -1.f : +1.f);
+ float dvNormal = dot(normal, relativeWindVelocity);
+ if( dvNormal > 0 )
+ {
+ Vector3 force( 0.f, 0.f, 0.f );
+ float c0 = m_vertexData.getArea(vertexIndex) * dvNormal * relativeSpeedSquared / 2;
+ float c1 = c0 * m_perClothMediumDensity[clothIndex];
+ force += normal * (-c1 * liftFactor);
+ force += normalize(relativeWindVelocity)*(-c1 * dragFactor);
+
+ Vectormath::Aos::Vector3 &vertexForce( m_vertexData.getForceAccumulator(vertexIndex) );
+ ApplyClampedForce( solverdt, force, vertexVelocity, inverseMass, vertexForce );
+ }
+ }
+ }
+ }
+ }
+ }
+} // btCPUSoftBodySolver::applyForces
+
+/**
+ * Integrate motion on the solver.
+ */
+void btCPUSoftBodySolver::integrate( float solverdt )
+{
+ using namespace Vectormath::Aos;
+ int numVertices = m_vertexData.getNumVertices();
+ for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
+ {
+ Point3 &position( m_vertexData.getPosition(vertexIndex) );
+ Point3 &previousPosition( m_vertexData.getPreviousPosition(vertexIndex) );
+ Vector3 &forceAccumulator( m_vertexData.getForceAccumulator(vertexIndex) );
+ Vector3 &velocity( m_vertexData.getVelocity(vertexIndex) );
+ float inverseMass = m_vertexData.getInverseMass(vertexIndex);
+
+ previousPosition = position;
+ velocity += forceAccumulator * inverseMass * solverdt;
+ position += velocity * solverdt;
+ forceAccumulator = Vector3(0.f, 0.f, 0.f);
+ }
+} // btCPUSoftBodySolver::integrate
+
+float btCPUSoftBodySolver::computeTriangleArea(
+ const Vectormath::Aos::Point3 &vertex0,
+ const Vectormath::Aos::Point3 &vertex1,
+ const Vectormath::Aos::Point3 &vertex2 )
+{
+ Vectormath::Aos::Vector3 a = vertex1 - vertex0;
+ Vectormath::Aos::Vector3 b = vertex2 - vertex0;
+ Vectormath::Aos::Vector3 crossProduct = cross(a, b);
+ float area = length( crossProduct );
+ return area;
+}
+
+void btCPUSoftBodySolver::updateConstants( float timeStep )
+{
+ using namespace Vectormath::Aos;
+
+ if( m_updateSolverConstants )
+ {
+ m_updateSolverConstants = false;
+
+ // Will have to redo this if we change the structure (tear, maybe) or various other possible changes
+
+ // Initialise link constants
+ const int numLinks = m_linkData.getNumLinks();
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair &vertices( m_linkData.getVertexPair(linkIndex) );
+ m_linkData.getRestLength(linkIndex) = length((m_vertexData.getPosition( vertices.vertex0 ) - m_vertexData.getPosition( vertices.vertex1 )));
+ float invMass0 = m_vertexData.getInverseMass(vertices.vertex0);
+ float invMass1 = m_vertexData.getInverseMass(vertices.vertex1);
+ float linearStiffness = m_linkData.getLinearStiffnessCoefficient(linkIndex);
+ float massLSC = (invMass0 + invMass1)/linearStiffness;
+ m_linkData.getMassLSC(linkIndex) = massLSC;
+ float restLength = m_linkData.getRestLength(linkIndex);
+ float restLengthSquared = restLength*restLength;
+ m_linkData.getRestLengthSquared(linkIndex) = restLengthSquared;
+ }
+ }
+} // btCPUSoftBodySolver::updateConstants
+
+
+
+
+void btCPUSoftBodySolver::updateBounds()
+{
+ using Vectormath::Aos::Point3;
+
+ for( int clothIndex = 0; clothIndex < m_softBodySet.size(); ++clothIndex )
+ {
+ btAcceleratedSoftBodyInterface *currentCloth = m_softBodySet[clothIndex];
+ btVector3 startBound(FLT_MAX, FLT_MAX, FLT_MAX);
+ btVector3 endBound(FLT_MIN, FLT_MIN, FLT_MIN);
+
+ const int startVertex = currentCloth->getFirstVertex();
+ const int numVertices = currentCloth->getNumVertices();
+
+ int endVertex = startVertex + numVertices;
+ for(int vertexIndex = startVertex; vertexIndex < endVertex; ++vertexIndex)
+ {
+ btVector3 vertexPosition( m_vertexData.getVertexPositions()[vertexIndex].getX(), m_vertexData.getVertexPositions()[vertexIndex].getY(), m_vertexData.getVertexPositions()[vertexIndex].getZ() );
+ startBound.setX( btMin( startBound.getX(), vertexPosition.getX() ) );
+ startBound.setY( btMin( startBound.getY(), vertexPosition.getY() ) );
+ startBound.setZ( btMin( startBound.getZ(), vertexPosition.getZ() ) );
+
+ endBound.setX( btMax( endBound.getX(), vertexPosition.getX() ) );
+ endBound.setY( btMax( endBound.getY(), vertexPosition.getY() ) );
+ endBound.setZ( btMax( endBound.getZ(), vertexPosition.getZ() ) );
+ }
+
+ m_softBodySet[clothIndex]->updateBounds( startBound, endBound );
+ }
+}
+
+
+class btCPUSB_QuickSortCompare
+{
+ public:
+
+ bool operator() ( const btCPUCollisionShapeDescription& a, const btCPUCollisionShapeDescription& b )
+ {
+ return ( a.softBodyIdentifier < b.softBodyIdentifier );
+ }
+};
+
+/**
+ * Sort the collision object details array and generate indexing into it for the per-cloth collision object array.
+ */
+void btCPUSoftBodySolver::prepareCollisionConstraints()
+{
+ // First do a simple sort on the collision objects
+ btAlignedObjectArray<int> numObjectsPerClothPrefixSum;
+ btAlignedObjectArray<int> numObjectsPerCloth;
+ numObjectsPerCloth.resize( m_softBodySet.size(), 0 );
+ numObjectsPerClothPrefixSum.resize( m_softBodySet.size(), 0 );
+
+ if (!m_perClothCollisionObjects.size())
+ return;
+
+ m_collisionObjectDetails.quickSort( btCPUSB_QuickSortCompare() );
+
+ // Generating indexing for perClothCollisionObjects
+ // First clear the previous values with the "no collision object for cloth" constant
+ for( int clothIndex = 0; clothIndex < m_perClothCollisionObjects.size(); ++clothIndex )
+ {
+ m_perClothCollisionObjects[clothIndex].firstObject = -1;
+ m_perClothCollisionObjects[clothIndex].endObject = -1;
+ }
+ int currentCloth = 0;
+ int startIndex = 0;
+ for( int collisionObject = 0; collisionObject < m_collisionObjectDetails.size(); ++collisionObject )
+ {
+ int nextCloth = m_collisionObjectDetails[collisionObject].softBodyIdentifier;
+ if( nextCloth != currentCloth )
+ {
+ // Changed cloth in the array
+ // Set the end index and the range is what we need for currentCloth
+ m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
+ m_perClothCollisionObjects[currentCloth].endObject = collisionObject;
+ currentCloth = nextCloth;
+ startIndex = collisionObject;
+ }
+ }
+
+ // And update last cloth
+ m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
+ m_perClothCollisionObjects[currentCloth].endObject = m_collisionObjectDetails.size();
+
+} // prepareCollisionConstraints
+
+
+void btCPUSoftBodySolver::solveConstraints( float solverdt )
+{
+ using Vectormath::Aos::Vector3;
+ using Vectormath::Aos::Point3;
+ using Vectormath::Aos::lengthSqr;
+ using Vectormath::Aos::dot;
+
+ // Prepare links
+ int numLinks = m_linkData.getNumLinks();
+ int numVertices = m_vertexData.getNumVertices();
+
+ float kst = 1.f;
+
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair &nodePair( m_linkData.getVertexPair(linkIndex) );
+ Vector3 currentLength = m_vertexData.getPreviousPosition( nodePair.vertex1 ) - m_vertexData.getPreviousPosition( nodePair.vertex0 );
+ m_linkData.getCurrentLength(linkIndex) = currentLength;
+
+ // If mass at both ends of links is 0 (both static points) then we don't want this information.
+ // In reality this would be a fairly pointless link, but it could have been inserted
+ float linkLengthRatio = 0;
+ if( m_linkData.getMassLSC(linkIndex) > 0 )
+ linkLengthRatio = 1.f/(lengthSqr(currentLength) * m_linkData.getMassLSC(linkIndex));
+ m_linkData.getLinkLengthRatio(linkIndex) = linkLengthRatio;
+
+ }
+
+
+ prepareCollisionConstraints();
+
+
+ for( int iteration = 0; iteration < m_numberOfVelocityIterations ; ++iteration )
+ {
+ // Solve velocity
+ for(int linkIndex = 0; linkIndex < numLinks; ++linkIndex)
+ {
+
+ int vertexIndex0 = m_linkData.getVertexPair(linkIndex).vertex0;
+ int vertexIndex1 = m_linkData.getVertexPair(linkIndex).vertex1;
+
+ float j = -dot(m_linkData.getCurrentLength(linkIndex), m_vertexData.getVelocity(vertexIndex0) - m_vertexData.getVelocity(vertexIndex1)) * m_linkData.getLinkLengthRatio(linkIndex)*kst;
+
+ // If both ends of the link have no mass then this will be zero. Catch that case.
+ // TODO: Should really catch the /0 in the link setup, too
+ //if(psb->m_linksc0[i]>0)
+ {
+ m_vertexData.getVelocity(vertexIndex0) = m_vertexData.getVelocity(vertexIndex0) + m_linkData.getCurrentLength(linkIndex)*j*m_vertexData.getInverseMass(vertexIndex0);
+ m_vertexData.getVelocity(vertexIndex1) = m_vertexData.getVelocity(vertexIndex1) - m_linkData.getCurrentLength(linkIndex)*j*m_vertexData.getInverseMass(vertexIndex1);
+ }
+ }
+ }
+
+ // Compute new positions from velocity
+ // Also update the previous position so that our position computation is now based on the new position from the velocity solution
+ // rather than based directly on the original positions
+ if( m_numberOfVelocityIterations > 0 )
+ {
+ for(int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex)
+ {
+ m_vertexData.getPosition(vertexIndex) = m_vertexData.getPreviousPosition(vertexIndex) + m_vertexData.getVelocity(vertexIndex) * solverdt;
+ m_vertexData.getPreviousPosition(vertexIndex) = m_vertexData.getPosition(vertexIndex);
+ }
+ }
+
+ // Solve drift
+ for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+ {
+ for( int clothIndex = 0; clothIndex < m_softBodySet.size(); ++clothIndex )
+ {
+ btAcceleratedSoftBodyInterface *currentCloth = m_softBodySet[clothIndex];
+
+ const int startLink = currentCloth->getFirstLink();
+ const int numLinks = currentCloth->getNumLinks();
+
+ int endLink = startLink + numLinks;
+ for(int linkIndex = startLink; linkIndex < endLink; ++linkIndex)
+ {
+ int vertexIndex0 = m_linkData.getVertexPair(linkIndex).vertex0;
+ int vertexIndex1 = m_linkData.getVertexPair(linkIndex).vertex1;
+
+ float massLSC = m_linkData.getMassLSC(linkIndex);
+ if( massLSC > 0.f )
+ {
+ Point3 &vertexPosition0( m_vertexData.getPosition( vertexIndex0 ) );
+ Point3 &vertexPosition1( m_vertexData.getPosition( vertexIndex1 ) );
+
+ Vector3 del = vertexPosition1 - vertexPosition0;
+ float len = lengthSqr(del);
+ float restLength2 = m_linkData.getRestLengthSquared(linkIndex);
+ float k = ((restLength2 - len) / (massLSC * (restLength2 + len) ) )*kst;
+
+ vertexPosition0 -= del*(k*m_vertexData.getInverseMass(vertexIndex0));
+ vertexPosition1 += del*(k*m_vertexData.getInverseMass(vertexIndex1));
+ }
+ }
+ }
+ }
+
+ // Clear forces so that friction is applied correctly
+ for( int clothIndex = 0; clothIndex < m_softBodySet.size(); ++clothIndex )
+ {
+ btAcceleratedSoftBodyInterface *currentCloth = m_softBodySet[clothIndex];
+
+ const int startLink = currentCloth->getFirstLink();
+ const int numLinks = currentCloth->getNumLinks();
+ const int startVertex = currentCloth->getFirstVertex();
+ const int numVertices = currentCloth->getNumVertices();
+ const int lastVertex = startVertex + numVertices;
+ // Update the velocities based on the change in position
+ // TODO: Damping should only be applied to the action of link constraints so the cloth still falls but then moves stiffly once it hits something
+ float velocityCoefficient = (1.f - m_perClothDampingFactor[clothIndex]);
+ float velocityCorrectionCoefficient = m_perClothVelocityCorrectionCoefficient[clothIndex];
+ float isolverDt = 1.f/solverdt;
+
+ for(int vertexIndex = startVertex; vertexIndex < lastVertex; ++vertexIndex)
+ {
+ m_vertexData.getForceAccumulator( vertexIndex ) = Vector3(0.f, 0.f, 0.f);
+ }
+ }
+
+
+
+
+ // Solve collision constraints
+ // Very simple solver that pushes the vertex out of collision imposters for now
+ // to test integration with the broad phase code.
+ // May also want to put this into position solver loop every n iterations depending on
+ // how it behaves
+ for( int clothIndex = 0; clothIndex < m_softBodySet.size(); ++clothIndex )
+ {
+ btAcceleratedSoftBodyInterface *currentCloth = m_softBodySet[clothIndex];
+
+ float clothFriction = currentCloth->getSoftBody()->getFriction();
+
+ const int startVertex = currentCloth->getFirstVertex();
+ const int numVertices = currentCloth->getNumVertices();
+ int endVertex = startVertex + numVertices;
+
+ float velocityCoefficient = (1.f - m_perClothDampingFactor[clothIndex]);
+ float velocityCorrectionCoefficient = m_perClothVelocityCorrectionCoefficient[clothIndex];
+ float isolverDt = 1.f/solverdt;
+
+ int startObject = m_perClothCollisionObjects[clothIndex].firstObject;
+ int endObject = m_perClothCollisionObjects[clothIndex].endObject;
+
+ if( endObject == startObject )
+ {
+ // No collisions so just do the force update
+ for(int vertexIndex = startVertex; vertexIndex < endVertex; ++vertexIndex)
+ {
+ m_vertexData.getForceAccumulator( vertexIndex ) = Vector3(0.f, 0.f, 0.f);
+ }
+
+ // Recompute velocity based on updated position inclusive of drift
+ for(int vertexIndex = startVertex; vertexIndex < endVertex; ++vertexIndex)
+ {
+ m_vertexData.getVelocity(vertexIndex) = (m_vertexData.getPosition(vertexIndex) - m_vertexData.getPreviousPosition(vertexIndex)) * velocityCoefficient * isolverDt;
+ }
+ } else {
+
+ for( int collisionObject = startObject; collisionObject < endObject; ++collisionObject )
+ {
+ btCPUCollisionShapeDescription &shapeDescription( m_collisionObjectDetails[collisionObject] );
+
+ float colliderFriction = shapeDescription.friction;
+
+ if( shapeDescription.collisionShapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ using namespace Vectormath::Aos;
+
+ float capsuleHalfHeight = shapeDescription.shapeInformation.capsule.halfHeight;
+ float capsuleRadius = shapeDescription.shapeInformation.capsule.radius;
+ int capsuleUpAxis = shapeDescription.shapeInformation.capsule.upAxis;
+ float capsuleMargin = shapeDescription.margin;
+
+ Transform3 worldTransform = shapeDescription.shapeTransform;
+
+ // As this is a GPU comparison solver just iterate over the vertices
+ for( int vertexIndex = startVertex; vertexIndex < endVertex; ++vertexIndex )
+ {
+ // Clear force for vertex first
+ m_vertexData.getForceAccumulator( vertexIndex ) = Vector3(0.f, 0.f, 0.f);
+
+ Point3 vertex( m_vertexData.getPosition( vertexIndex ) );
+
+ // Correctly define the centerline depending on the upAxis
+ Point3 c1(0.f, 0.f, 0.f);
+ Point3 c2(0.f, 0.f, 0.f);
+ if( capsuleUpAxis == 0 ) {
+ c1.setX(-capsuleHalfHeight);
+ c2.setX(capsuleHalfHeight);
+ } else if( capsuleUpAxis == 1 ) {
+ c1.setY(-capsuleHalfHeight);
+ c2.setY(capsuleHalfHeight);
+ } else {
+ c1.setZ(-capsuleHalfHeight);
+ c2.setZ(capsuleHalfHeight);
+ }
+
+ Point3 worldC1 = worldTransform * c1;
+ Point3 worldC2 = worldTransform * c2;
+ Vector3 segment = worldC2 - worldC1;
+
+ // compute distance of tangent to vertex along line segment in capsule
+ float distanceAlongSegment = -( dot( worldC1 - vertex, segment ) / lengthSqr(segment) );
+
+ Point3 closestPoint = (worldC1 + segment * distanceAlongSegment);
+ float distanceFromLine = length(vertex - closestPoint);
+ float distanceFromC1 = length(worldC1 - vertex);
+ float distanceFromC2 = length(worldC2 - vertex);
+
+ // Final distance from collision, point to push from, direction to push in
+ // for impulse force
+ float distance;
+ Point3 sourcePoint;
+ Vector3 normalVector;
+ if( distanceAlongSegment < 0 )
+ {
+ distance = distanceFromC1;
+ sourcePoint = worldC1;
+ normalVector = normalize(vertex - worldC1);
+ } else if( distanceAlongSegment > 1.f ) {
+ distance = distanceFromC2;
+ sourcePoint = worldC2;
+ normalVector = normalize(vertex - worldC2);
+ } else {
+ distance = distanceFromLine;
+ sourcePoint = closestPoint;
+ normalVector = normalize(vertex - closestPoint);
+ }
+
+ Vector3 colliderLinearVelocity( shapeDescription.linearVelocity );
+ Vector3 colliderAngularVelocity( shapeDescription.angularVelocity );
+ Vector3 velocityOfSurfacePoint = colliderLinearVelocity + cross(colliderAngularVelocity, Vector3(vertex) - worldTransform.getTranslation());
+
+ float minDistance = capsuleRadius + capsuleMargin;
+ bool collided = false;
+
+ if( distance < minDistance )
+ {
+ // Project back to surface along normal
+ Vectormath::Aos::Point3 sourcePos = m_vertexData.getPosition( vertexIndex );
+ Vectormath::Aos::Vector3 posChange = (minDistance - distance)*normalVector*0.9;
+ //if( length(posChange) > 1 )
+ // std::cerr << "Poschange: " << length(posChange) << "\n";
+
+ Vectormath::Aos::Point3 newPos = sourcePos + posChange;
+ m_vertexData.getPosition( vertexIndex ) = newPos;
+ //m_vertexData.getPosition( vertexIndex ) = m_vertexData.getPosition( vertexIndex ) + (minDistance - distance)*normalVector*0.9;
+
+ // Experiment with moving back along source vector.
+ // Removes all ability to slide because it projects back along the vector length so it would undo lateral movement.
+ // TODO: This isn't quite right because we should take the movement of the collider into account as well
+ /*Vector3 incomingMoveVector( normalize(m_vertexData.getPreviousPosition(vertexIndex) - m_vertexData.getPosition(vertexIndex)) );
+ Vector3 normalDirectionMoveOut( (minDistance - distance)*normalVector*0.9 );
+ float distanceOnIncomingVector = dot(normalDirectionMoveOut, incomingMoveVector);
+ Vector3 vectorCorrection( distanceOnIncomingVector*incomingMoveVector );
+ m_vertexData.getPosition( vertexIndex ) = m_vertexData.getPosition( vertexIndex ) + vectorCorrection;*/
+
+
+ collided = true;
+ }
+
+ // Update velocity of vertex based on position
+ m_vertexData.getVelocity(vertexIndex) = (m_vertexData.getPosition(vertexIndex) - m_vertexData.getPreviousPosition(vertexIndex)) * velocityCoefficient * isolverDt;
+
+ // If we collided before we are on the surface so have friction
+ if( collided )
+ {
+ // Compute friction
+
+ // TODO: Just vertex velocity not enough, really we need the velocity
+ // relative to closest point on the surface of the collider
+ Vector3 vertexVelocity( m_vertexData.getVelocity(vertexIndex) );
+ Vector3 relativeVelocity( vertexVelocity - velocityOfSurfacePoint );
+
+
+ // First compute vectors for plane perpendicular to normal vector
+ // Cross any vector with normal vector first then cross the normal with it again
+ Vector3 p1(normalize(cross(normalVector, segment)));
+ Vector3 p2(normalize(cross(p1, normalVector)));
+ // Full friction is sum of velocities in each direction of plane.
+ Vector3 frictionVector(p1*dot(relativeVelocity, p1) + p2*dot(relativeVelocity, p2));
+
+ // Real friction is peak friction corrected by friction coefficients.
+ frictionVector = frictionVector*(colliderFriction*clothFriction);
+
+ float approachSpeed = dot( relativeVelocity, normalVector );
+
+ // For now just update vertex position by moving to radius distance along the push vector
+ // Could use this as the basis for simple vector distance constraint for the point later, possibly?
+ // That way in the main solver loop all shape types could be the same... though when
+ // we need to apply bi-directionally it becomes more complicated
+
+ // Add friction vector to the force accumulator
+ Vector3 &currentForce( m_vertexData.getForceAccumulator( vertexIndex ) );
+
+ // Only apply if the vertex is moving towards the object to reduce jitter error
+ if( approachSpeed <= 0.0 )
+ currentForce -= frictionVector;
+ }
+ }
+ }
+ } // for( int collisionObject = startObject; collisionObject < endObject; ++collisionObject )
+ } // if( endObject == startObject )
+ }
+
+
+
+
+} // btCPUSoftBodySolver::solveConstraints
+
+
+btCPUSoftBodySolver::btAcceleratedSoftBodyInterface *btCPUSoftBodySolver::findSoftBodyInterface( const btSoftBody* const softBody )
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyInterface;
+ }
+ return 0;
+}
+
+const btCPUSoftBodySolver::btAcceleratedSoftBodyInterface * const btCPUSoftBodySolver::findSoftBodyInterface( const btSoftBody* const softBody ) const
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ const btAcceleratedSoftBodyInterface *const softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyInterface;
+ }
+ return 0;
+}
+
+int btCPUSoftBodySolver::findSoftBodyIndex( const btSoftBody* const softBody )
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyIndex;
+ }
+ return 1;
+}
+
+void btSoftBodySolverOutputCPUtoCPU::copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer )
+{
+ // Currently only support CPU output buffers
+
+ const btSoftBodySolver *solver = softBody->getSoftBodySolver();
+ btAssert( solver->getSolverType() == btSoftBodySolver::CPU_SOLVER );
+ const btCPUSoftBodySolver *cpuSolver = static_cast< const btCPUSoftBodySolver * >( solver );
+ const btCPUSoftBodySolver::btAcceleratedSoftBodyInterface * const currentCloth = cpuSolver->findSoftBodyInterface( softBody );
+ const btSoftBodyVertexData &vertexData( cpuSolver->m_vertexData );
+
+ if( vertexBuffer->getBufferType() == btVertexBufferDescriptor::CPU_BUFFER )
+ {
+ const int firstVertex = currentCloth->getFirstVertex();
+ const int lastVertex = firstVertex + currentCloth->getNumVertices();
+ const btCPUVertexBufferDescriptor *cpuVertexBuffer = static_cast< btCPUVertexBufferDescriptor* >(vertexBuffer);
+ float *basePointer = cpuVertexBuffer->getBasePointer();
+
+ if( vertexBuffer->hasVertexPositions() )
+ {
+ const int vertexOffset = cpuVertexBuffer->getVertexOffset();
+ const int vertexStride = cpuVertexBuffer->getVertexStride();
+ float *vertexPointer = basePointer + vertexOffset;
+
+ for( int vertexIndex = firstVertex; vertexIndex < lastVertex; ++vertexIndex )
+ {
+ Vectormath::Aos::Point3 position = vertexData.getPosition(vertexIndex);
+ *(vertexPointer + 0) = position.getX();
+ *(vertexPointer + 1) = position.getY();
+ *(vertexPointer + 2) = position.getZ();
+ vertexPointer += vertexStride;
+ }
+ }
+ if( vertexBuffer->hasNormals() )
+ {
+ const int normalOffset = cpuVertexBuffer->getNormalOffset();
+ const int normalStride = cpuVertexBuffer->getNormalStride();
+ float *normalPointer = basePointer + normalOffset;
+
+ for( int vertexIndex = firstVertex; vertexIndex < lastVertex; ++vertexIndex )
+ {
+ Vectormath::Aos::Vector3 normal = vertexData.getNormal(vertexIndex);
+ *(normalPointer + 0) = normal.getX();
+ *(normalPointer + 1) = normal.getY();
+ *(normalPointer + 2) = normal.getZ();
+ normalPointer += normalStride;
+ }
+ }
+ } else {
+ btAssert( 0=="Invalid vertex buffer descriptor used in CPU output." );
+ }
+} // btCPUSoftBodySolver::outputToVertexBuffers
+
+void btCPUSoftBodySolver::processCollision( btSoftBody*, btSoftBody *)
+{
+
+}
+
+// Add the collision object to the set to deal with for a particular soft body
+void btCPUSoftBodySolver::processCollision( btSoftBody *softBody, btCollisionObject* collisionObject )
+{
+ int softBodyIndex = findSoftBodyIndex( softBody );
+
+ if( softBodyIndex >= 0 )
+ {
+ btCollisionShape *collisionShape = collisionObject->getCollisionShape();
+ float friction = collisionObject->getFriction();
+ int shapeType = collisionShape->getShapeType();
+ if( shapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ // Add to the list of expected collision objects
+ btCPUCollisionShapeDescription newCollisionShapeDescription;
+ newCollisionShapeDescription.softBodyIdentifier = softBodyIndex;
+ newCollisionShapeDescription.collisionShapeType = shapeType;
+ newCollisionShapeDescription.shapeTransform = toTransform3(collisionObject->getWorldTransform());
+ btCapsuleShape *capsule = static_cast<btCapsuleShape*>( collisionShape );
+ newCollisionShapeDescription.shapeInformation.capsule.radius = capsule->getRadius();
+ newCollisionShapeDescription.shapeInformation.capsule.halfHeight = capsule->getHalfHeight();
+ newCollisionShapeDescription.shapeInformation.capsule.upAxis = capsule->getUpAxis();
+ newCollisionShapeDescription.margin = capsule->getMargin();
+ newCollisionShapeDescription.friction = friction;
+ btRigidBody* body = static_cast< btRigidBody* >( collisionObject );
+ newCollisionShapeDescription.linearVelocity = toVector3(body->getLinearVelocity());
+ newCollisionShapeDescription.angularVelocity = toVector3(body->getAngularVelocity());
+ m_collisionObjectDetails.push_back( newCollisionShapeDescription );
+ } else {
+ btAssert("Unsupported collision shape type\n");
+ }
+ } else {
+ btAssert("Unknown soft body");
+ }
+} // btCPUSoftBodySolver::processCollision
+
+
+void btCPUSoftBodySolver::predictMotion( float timeStep )
+{
+ // Fill the force arrays with current acceleration data etc
+ m_perClothWindVelocity.resize( m_softBodySet.size() );
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = m_softBodySet[softBodyIndex]->getSoftBody();
+
+ m_perClothWindVelocity[softBodyIndex] = toVector3(softBody->getWindVelocity());
+ }
+
+
+ // Apply forces that we know about to the cloths
+ applyForces( timeStep * getTimeScale() );
+
+ // Itegrate motion for all soft bodies dealt with by the solver
+ integrate( timeStep * getTimeScale() );
+
+ // Update bounds
+ // Will update the bounds for all softBodies being dealt with by the solver and
+ // set the values in the btSoftBody object
+ updateBounds();
+
+ // End prediction work for solvers
+}
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.h
new file mode 100644
index 00000000..25d04cd9
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolver_CPU.h
@@ -0,0 +1,370 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_ACCELERATED_SOFT_BODY_CPU_SOLVER_H
+#define BT_ACCELERATED_SOFT_BODY_CPU_SOLVER_H
+
+#include "vectormath/vmInclude.h"
+#include "BulletSoftBody/btSoftBodySolvers.h"
+#include "BulletSoftBody/btSoftBodySolverVertexBuffer.h"
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+
+struct btCPUCollisionShapeDescription
+{
+ int softBodyIdentifier;
+ int collisionShapeType;
+ Vectormath::Aos::Transform3 shapeTransform;
+ union
+ {
+ struct Sphere
+ {
+ float radius;
+ } sphere;
+ struct Capsule
+ {
+ float radius;
+ float halfHeight;
+ int upAxis;
+ } capsule;
+ } shapeInformation;
+
+ float margin;
+ float friction;
+ Vectormath::Aos::Vector3 linearVelocity;
+ Vectormath::Aos::Vector3 angularVelocity;
+
+ btCPUCollisionShapeDescription()
+ {
+ collisionShapeType = 0;
+ margin = 0;
+ friction = 0;
+ }
+};
+
+class btCPUSoftBodySolver : public btSoftBodySolver
+{
+protected:
+ /**
+ * Entry in the collision shape array.
+ * Specifies the shape type, the transform matrix and the necessary details of the collisionShape.
+ */
+
+
+ // Public because output classes need it. This is a better encapsulation to break in the short term
+ // Than having the solvers themselves need dependencies on DX, CL etc unnecessarily
+public:
+
+ struct CollisionObjectIndices
+ {
+ CollisionObjectIndices( int f, int e )
+ {
+ firstObject = f;
+ endObject = e;
+ }
+
+ int firstObject;
+ int endObject;
+ };
+
+ /**
+ * SoftBody class to maintain information about a soft body instance
+ * within a solver.
+ * This data addresses the main solver arrays.
+ */
+ class btAcceleratedSoftBodyInterface
+ {
+ protected:
+ /** Current number of vertices that are part of this cloth */
+ int m_numVertices;
+ /** Maximum number of vertices allocated to be part of this cloth */
+ int m_maxVertices;
+ /** Current number of triangles that are part of this cloth */
+ int m_numTriangles;
+ /** Maximum number of triangles allocated to be part of this cloth */
+ int m_maxTriangles;
+ /** Index of first vertex in the world allocated to this cloth */
+ int m_firstVertex;
+ /** Index of first triangle in the world allocated to this cloth */
+ int m_firstTriangle;
+ /** Index of first link in the world allocated to this cloth */
+ int m_firstLink;
+ /** Maximum number of links allocated to this cloth */
+ int m_maxLinks;
+ /** Current number of links allocated to this cloth */
+ int m_numLinks;
+
+ /** The actual soft body this data represents */
+ btSoftBody *m_softBody;
+
+
+ public:
+ btAcceleratedSoftBodyInterface( btSoftBody *softBody ) :
+ m_softBody( softBody )
+ {
+ m_numVertices = 0;
+ m_maxVertices = 0;
+ m_numTriangles = 0;
+ m_maxTriangles = 0;
+ m_firstVertex = 0;
+ m_firstTriangle = 0;
+ m_firstLink = 0;
+ m_maxLinks = 0;
+ m_numLinks = 0;
+ }
+ int getNumVertices() const
+ {
+ return m_numVertices;
+ }
+
+ int getNumTriangles() const
+ {
+ return m_numTriangles;
+ }
+
+ int getMaxVertices() const
+ {
+ return m_maxVertices;
+ }
+
+ int getMaxTriangles() const
+ {
+ return m_maxTriangles;
+ }
+
+ int getFirstVertex() const
+ {
+ return m_firstVertex;
+ }
+
+ int getFirstTriangle() const
+ {
+ return m_firstTriangle;
+ }
+
+ /**
+ * Update the bounds in the btSoftBody object
+ */
+ void updateBounds( const btVector3 &lowerBound, const btVector3 &upperBound );
+
+ // TODO: All of these set functions will have to do checks and
+ // update the world because restructuring of the arrays will be necessary
+ // Reasonable use of "friend"?
+ void setNumVertices( int numVertices )
+ {
+ m_numVertices = numVertices;
+ }
+
+ void setNumTriangles( int numTriangles )
+ {
+ m_numTriangles = numTriangles;
+ }
+
+ void setMaxVertices( int maxVertices )
+ {
+ m_maxVertices = maxVertices;
+ }
+
+ void setMaxTriangles( int maxTriangles )
+ {
+ m_maxTriangles = maxTriangles;
+ }
+
+ void setFirstVertex( int firstVertex )
+ {
+ m_firstVertex = firstVertex;
+ }
+
+ void setFirstTriangle( int firstTriangle )
+ {
+ m_firstTriangle = firstTriangle;
+ }
+
+ void setMaxLinks( int maxLinks )
+ {
+ m_maxLinks = maxLinks;
+ }
+
+ void setNumLinks( int numLinks )
+ {
+ m_numLinks = numLinks;
+ }
+
+ void setFirstLink( int firstLink )
+ {
+ m_firstLink = firstLink;
+ }
+
+ int getMaxLinks() const
+ {
+ return m_maxLinks;
+ }
+
+ int getNumLinks() const
+ {
+ return m_numLinks;
+ }
+
+ int getFirstLink() const
+ {
+ return m_firstLink;
+ }
+
+ btSoftBody* getSoftBody()
+ {
+ return m_softBody;
+ }
+
+ const btSoftBody* const getSoftBody() const
+ {
+ return m_softBody;
+ }
+ };
+
+ btSoftBodyLinkData m_linkData;
+ btSoftBodyVertexData m_vertexData;
+ btSoftBodyTriangleData m_triangleData;
+
+protected:
+
+
+
+
+ /** Variable to define whether we need to update solver constants on the next iteration */
+ bool m_updateSolverConstants;
+
+ /**
+ * Cloths owned by this solver.
+ * Only our cloths are in this array.
+ */
+ btAlignedObjectArray< btAcceleratedSoftBodyInterface * > m_softBodySet;
+
+ /** Acceleration value to be applied to all non-static vertices in the solver.
+ * Index n is cloth n, array sized by number of cloths in the world not the solver.
+ */
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_perClothAcceleration;
+
+ /** Wind velocity to be applied normal to all non-static vertices in the solver.
+ * Index n is cloth n, array sized by number of cloths in the world not the solver.
+ */
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_perClothWindVelocity;
+
+ /** Velocity damping factor */
+ btAlignedObjectArray< float > m_perClothDampingFactor;
+
+ /** Velocity correction coefficient */
+ btAlignedObjectArray< float > m_perClothVelocityCorrectionCoefficient;
+
+ /** Lift parameter for wind effect on cloth. */
+ btAlignedObjectArray< float > m_perClothLiftFactor;
+
+ /** Drag parameter for wind effect on cloth. */
+ btAlignedObjectArray< float > m_perClothDragFactor;
+
+ /** Density of the medium in which each cloth sits */
+ btAlignedObjectArray< float > m_perClothMediumDensity;
+
+ /**
+ * Collision shape details: pair of index of first collision shape for the cloth and number of collision objects.
+ */
+ btAlignedObjectArray< CollisionObjectIndices > m_perClothCollisionObjects;
+
+ /**
+ * Collision shapes being passed across to the cloths in this solver.
+ */
+ btAlignedObjectArray< btCPUCollisionShapeDescription > m_collisionObjectDetails;
+
+
+ void prepareCollisionConstraints();
+
+ Vectormath::Aos::Vector3 ProjectOnAxis( const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a );
+
+ void ApplyClampedForce( float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce );
+
+ float computeTriangleArea(
+ const Vectormath::Aos::Point3 &vertex0,
+ const Vectormath::Aos::Point3 &vertex1,
+ const Vectormath::Aos::Point3 &vertex2 );
+
+ void applyForces( float solverdt );
+ void integrate( float solverdt );
+ void updateConstants( float timeStep );
+ int findSoftBodyIndex( const btSoftBody* const softBody );
+
+ /** Update the bounds of the soft body objects in the solver */
+ void updateBounds();
+
+
+public:
+ btCPUSoftBodySolver();
+
+ virtual ~btCPUSoftBodySolver();
+
+
+ virtual SolverTypes getSolverType() const
+ {
+ return CPU_SOLVER;
+ }
+
+
+ virtual btSoftBodyLinkData &getLinkData();
+
+ virtual btSoftBodyVertexData &getVertexData();
+
+ virtual btSoftBodyTriangleData &getTriangleData();
+
+
+
+ btAcceleratedSoftBodyInterface *findSoftBodyInterface( const btSoftBody* const softBody );
+ const btAcceleratedSoftBodyInterface * const findSoftBodyInterface( const btSoftBody* const softBody ) const;
+
+
+
+ virtual bool checkInitialized();
+
+ virtual void updateSoftBodies( );
+
+ virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate=false);
+
+ virtual void copyBackToSoftBodies();
+
+ virtual void solveConstraints( float solverdt );
+
+ virtual void predictMotion( float solverdt );
+
+ virtual void processCollision( btSoftBody *, btCollisionObject* );
+
+ virtual void processCollision( btSoftBody*, btSoftBody *);
+
+};
+
+
+/**
+ * Class to manage movement of data from a solver to a given target.
+ * This version is the CPU to CPU generic version.
+ */
+class btSoftBodySolverOutputCPUtoCPU : public btSoftBodySolverOutput
+{
+protected:
+
+public:
+ btSoftBodySolverOutputCPUtoCPU()
+ {
+ }
+
+ /** Output current computed vertex data to the vertex buffers for all cloths in the solver. */
+ virtual void copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer );
+};
+
+#endif // #ifndef BT_ACCELERATED_SOFT_BODY_CPU_SOLVER_H \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/CMakeLists.txt
new file mode 100644
index 00000000..393d37d6
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/CMakeLists.txt
@@ -0,0 +1,83 @@
+
+INCLUDE_DIRECTORIES(
+${BULLET_PHYSICS_SOURCE_DIR}/src
+)
+
+SET(DXSDK_DIR $ENV{DXSDK_DIR})
+SET(DX11_INCLUDE_PATH "${DIRECTX_SDK_BASE_DIR}/Include" CACHE DOCSTRING "Microsoft directX SDK include path")
+
+
+INCLUDE_DIRECTORIES(
+${DX11_INCLUDE_PATH} "../cpu/"
+${VECTOR_MATH_INCLUDE}
+)
+
+SET(BulletSoftBodyDX11Solvers_SRCS
+ btSoftBodySolver_DX11.cpp
+ btSoftBodySolver_DX11SIMDAware.cpp
+)
+
+SET(BulletSoftBodyDX11Solvers_HDRS
+ btSoftBodySolver_DX11.h
+ btSoftBodySolver_DX11SIMDAware.h
+ ../cpu/btSoftBodySolverData.h
+ btSoftBodySolverVertexData_DX11.h
+ btSoftBodySolverTriangleData_DX11.h
+ btSoftBodySolverLinkData_DX11.h
+ btSoftBodySolverLinkData_DX11SIMDAware.h
+ btSoftBodySolverBuffer_DX11.h
+ btSoftBodySolverVertexBuffer_DX11.h
+
+)
+
+# OpenCL and HLSL Shaders.
+# Build rules generated to stringify these into headers
+# which are needed by some of the sources
+SET(BulletSoftBodyDX11Solvers_Shaders
+ OutputToVertexArray
+ UpdateNormals
+ Integrate
+ UpdatePositions
+ UpdateNodes
+ ComputeBounds
+ SolvePositions
+ SolvePositionsSIMDBatched
+ SolveCollisionsAndUpdateVelocities
+ SolveCollisionsAndUpdateVelocitiesSIMDBatched
+ UpdatePositionsFromVelocities
+ ApplyForces
+ PrepareLinks
+ VSolveLinks
+)
+
+foreach(f ${BulletSoftBodyDX11Solvers_Shaders})
+ LIST(APPEND BulletSoftBodyDX11Solvers_HLSL "HLSL/${f}.hlsl")
+endforeach(f)
+
+
+
+ADD_LIBRARY(BulletSoftBodySolvers_DX11 ${BulletSoftBodyDX11Solvers_SRCS} ${BulletSoftBodyDX11Solvers_HDRS} ${BulletSoftBodyDX11Solvers_HLSL})
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_DX11 PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_DX11 PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_DX11 BulletSoftBody BulletDynamics)
+ENDIF (BUILD_SHARED_LIBS)
+
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_DX11 DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_DX11 DESTINATION lib${LIB_SUFFIX})
+#headers are already installed by BulletMultiThreaded library
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_DX11 PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_DX11 PROPERTIES PUBLIC_HEADER "${BulletSoftBodyDX11Solvers_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ApplyForces.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ApplyForces.hlsl
new file mode 100644
index 00000000..9f9ac07a
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ApplyForces.hlsl
@@ -0,0 +1,95 @@
+MSTRINGIFY(
+
+cbuffer ApplyForcesCB : register( b0 )
+{
+ unsigned int numNodes;
+ float solverdt;
+ float epsilon;
+ int padding3;
+};
+
+
+StructuredBuffer<int> g_vertexClothIdentifier : register( t0 );
+StructuredBuffer<float4> g_vertexNormal : register( t1 );
+StructuredBuffer<float> g_vertexArea : register( t2 );
+StructuredBuffer<float> g_vertexInverseMass : register( t3 );
+// TODO: These could be combined into a lift/drag factor array along with medium density
+StructuredBuffer<float> g_clothLiftFactor : register( t4 );
+StructuredBuffer<float> g_clothDragFactor : register( t5 );
+StructuredBuffer<float4> g_clothWindVelocity : register( t6 );
+StructuredBuffer<float4> g_clothAcceleration : register( t7 );
+StructuredBuffer<float> g_clothMediumDensity : register( t8 );
+
+RWStructuredBuffer<float4> g_vertexForceAccumulator : register( u0 );
+RWStructuredBuffer<float4> g_vertexVelocity : register( u1 );
+
+float3 projectOnAxis( float3 v, float3 a )
+{
+ return (a*dot(v, a));
+}
+
+[numthreads(128, 1, 1)]
+void
+ApplyForcesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ unsigned int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ int clothId = g_vertexClothIdentifier[nodeID];
+ float nodeIM = g_vertexInverseMass[nodeID];
+
+ if( nodeIM > 0.0f )
+ {
+ float3 nodeV = g_vertexVelocity[nodeID].xyz;
+ float3 normal = g_vertexNormal[nodeID].xyz;
+ float area = g_vertexArea[nodeID];
+ float3 nodeF = g_vertexForceAccumulator[nodeID].xyz;
+
+ // Read per-cloth values
+ float3 clothAcceleration = g_clothAcceleration[clothId].xyz;
+ float3 clothWindVelocity = g_clothWindVelocity[clothId].xyz;
+ float liftFactor = g_clothLiftFactor[clothId];
+ float dragFactor = g_clothDragFactor[clothId];
+ float mediumDensity = g_clothMediumDensity[clothId];
+
+ // Apply the acceleration to the cloth rather than do this via a force
+ nodeV += (clothAcceleration*solverdt);
+
+ g_vertexVelocity[nodeID] = float4(nodeV, 0.f);
+
+ float3 relativeWindVelocity = nodeV - clothWindVelocity;
+ float relativeSpeedSquared = dot(relativeWindVelocity, relativeWindVelocity);
+
+ if( relativeSpeedSquared > epsilon )
+ {
+ // Correct direction of normal relative to wind direction and get dot product
+ normal = normal * (dot(normal, relativeWindVelocity) < 0 ? -1.f : 1.f);
+ float dvNormal = dot(normal, relativeWindVelocity);
+ if( dvNormal > 0 )
+ {
+ float3 force = float3(0.f, 0.f, 0.f);
+ float c0 = area * dvNormal * relativeSpeedSquared / 2.f;
+ float c1 = c0 * mediumDensity;
+ force += normal * (-c1 * liftFactor);
+ force += normalize(relativeWindVelocity)*(-c1 * dragFactor);
+
+ float dtim = solverdt * nodeIM;
+ float3 forceDTIM = force * dtim;
+
+ float3 nodeFPlusForce = nodeF + force;
+
+ // m_nodesf[i] -= ProjectOnAxis(m_nodesv[i], force.normalized())/dtim;
+ float3 nodeFMinus = nodeF - (projectOnAxis(nodeV, normalize(force))/dtim);
+
+ nodeF = nodeFPlusForce;
+ if( dot(forceDTIM, forceDTIM) > dot(nodeV, nodeV) )
+ nodeF = nodeFMinus;
+
+ g_vertexForceAccumulator[nodeID] = float4(nodeF, 0.0f);
+ }
+ }
+ }
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ComputeBounds.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ComputeBounds.hlsl
new file mode 100644
index 00000000..e21f959c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/ComputeBounds.hlsl
@@ -0,0 +1,83 @@
+MSTRINGIFY(
+
+cbuffer ComputeBoundsCB : register( b0 )
+{
+ int numNodes;
+ int numSoftBodies;
+ int padding1;
+ int padding2;
+};
+
+// Node indices for each link
+StructuredBuffer<int> g_vertexClothIdentifier : register( t0 );
+StructuredBuffer<float4> g_vertexPositions : register( t1 );
+
+RWStructuredBuffer<uint4> g_clothMinBounds : register( u0 );
+RWStructuredBuffer<uint4> g_clothMaxBounds : register( u1 );
+
+groupshared uint4 clothMinBounds[256];
+groupshared uint4 clothMaxBounds[256];
+
+[numthreads(128, 1, 1)]
+void
+ComputeBoundsKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ const unsigned int UINT_MAX = 0xffffffff;
+
+ // Init min and max bounds arrays
+ if( GTid.x < numSoftBodies )
+ {
+ clothMinBounds[GTid.x] = uint4(UINT_MAX, UINT_MAX, UINT_MAX, UINT_MAX);
+ clothMaxBounds[GTid.x] = uint4(0,0,0,0);
+ }
+
+ AllMemoryBarrierWithGroupSync();
+
+ int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+ if( clothIdentifier >= 0 )
+ {
+ float3 position = g_vertexPositions[nodeID].xyz;
+
+ // Reinterpret position as uint
+ uint3 positionUInt = uint3(asuint(position.x), asuint(position.y), asuint(position.z));
+
+ // Invert sign bit of positives and whole of negatives to allow comparison as unsigned ints
+ //positionUInt.x ^= uint((-int(positionUInt.x >> 31) | 0x80000000));
+ //positionUInt.y ^= uint((-int(positionUInt.y >> 31) | 0x80000000));
+ //positionUInt.z ^= uint((-int(positionUInt.z >> 31) | 0x80000000));
+ positionUInt.x ^= (1+~(positionUInt.x >> 31) | 0x80000000);
+ positionUInt.y ^= (1+~(positionUInt.y >> 31) | 0x80000000);
+ positionUInt.z ^= (1+~(positionUInt.z >> 31) | 0x80000000);
+
+ // Min/max with the LDS values
+ InterlockedMin(clothMinBounds[clothIdentifier].x, positionUInt.x);
+ InterlockedMin(clothMinBounds[clothIdentifier].y, positionUInt.y);
+ InterlockedMin(clothMinBounds[clothIdentifier].z, positionUInt.z);
+
+ InterlockedMax(clothMaxBounds[clothIdentifier].x, positionUInt.x);
+ InterlockedMax(clothMaxBounds[clothIdentifier].y, positionUInt.y);
+ InterlockedMax(clothMaxBounds[clothIdentifier].z, positionUInt.z);
+ }
+ }
+
+ AllMemoryBarrierWithGroupSync();
+
+
+ // Use global atomics to update the global versions of the data
+ if( GTid.x < numSoftBodies )
+ {
+ InterlockedMin(g_clothMinBounds[GTid.x].x, clothMinBounds[GTid.x].x);
+ InterlockedMin(g_clothMinBounds[GTid.x].y, clothMinBounds[GTid.x].y);
+ InterlockedMin(g_clothMinBounds[GTid.x].z, clothMinBounds[GTid.x].z);
+
+ InterlockedMax(g_clothMaxBounds[GTid.x].x, clothMaxBounds[GTid.x].x);
+ InterlockedMax(g_clothMaxBounds[GTid.x].y, clothMaxBounds[GTid.x].y);
+ InterlockedMax(g_clothMaxBounds[GTid.x].z, clothMaxBounds[GTid.x].z);
+ }
+}
+
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/Integrate.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/Integrate.hlsl
new file mode 100644
index 00000000..e43870be
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/Integrate.hlsl
@@ -0,0 +1,41 @@
+MSTRINGIFY(
+
+cbuffer IntegrateCB : register( b0 )
+{
+ int numNodes;
+ float solverdt;
+ int padding1;
+ int padding2;
+};
+
+// Node indices for each link
+StructuredBuffer<float> g_vertexInverseMasses : register( t0 );
+
+RWStructuredBuffer<float4> g_vertexPositions : register( u0 );
+RWStructuredBuffer<float4> g_vertexVelocity : register( u1 );
+RWStructuredBuffer<float4> g_vertexPreviousPositions : register( u2 );
+RWStructuredBuffer<float4> g_vertexForceAccumulator : register( u3 );
+
+[numthreads(128, 1, 1)]
+void
+IntegrateKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ float3 position = g_vertexPositions[nodeID].xyz;
+ float3 velocity = g_vertexVelocity[nodeID].xyz;
+ float3 force = g_vertexForceAccumulator[nodeID].xyz;
+ float inverseMass = g_vertexInverseMasses[nodeID];
+
+ g_vertexPreviousPositions[nodeID] = float4(position, 0.f);
+ velocity += force * inverseMass * solverdt;
+ position += velocity * solverdt;
+
+ g_vertexForceAccumulator[nodeID] = float4(0.f, 0.f, 0.f, 0.0f);
+ g_vertexPositions[nodeID] = float4(position, 0.f);
+ g_vertexVelocity[nodeID] = float4(velocity, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/OutputToVertexArray.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/OutputToVertexArray.hlsl
new file mode 100644
index 00000000..cd2924dd
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/OutputToVertexArray.hlsl
@@ -0,0 +1,63 @@
+MSTRINGIFY(
+
+cbuffer OutputToVertexArrayCB : register( b0 )
+{
+ int startNode;
+ int numNodes;
+ int positionOffset;
+ int positionStride;
+
+ int normalOffset;
+ int normalStride;
+ int padding1;
+ int padding2;
+};
+
+
+StructuredBuffer<float4> g_vertexPositions : register( t0 );
+StructuredBuffer<float4> g_vertexNormals : register( t1 );
+
+RWBuffer<float> g_vertexBuffer : register( u0 );
+
+
+[numthreads(128, 1, 1)]
+void
+OutputToVertexArrayWithNormalsKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ float4 position = g_vertexPositions[nodeID + startNode];
+ float4 normal = g_vertexNormals[nodeID + startNode];
+
+ // Stride should account for the float->float4 conversion
+ int positionDestination = nodeID * positionStride + positionOffset;
+ g_vertexBuffer[positionDestination] = position.x;
+ g_vertexBuffer[positionDestination+1] = position.y;
+ g_vertexBuffer[positionDestination+2] = position.z;
+
+ int normalDestination = nodeID * normalStride + normalOffset;
+ g_vertexBuffer[normalDestination] = normal.x;
+ g_vertexBuffer[normalDestination+1] = normal.y;
+ g_vertexBuffer[normalDestination+2] = normal.z;
+ }
+}
+
+[numthreads(128, 1, 1)]
+void
+OutputToVertexArrayWithoutNormalsKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ float4 position = g_vertexPositions[nodeID + startNode];
+ float4 normal = g_vertexNormals[nodeID + startNode];
+
+ // Stride should account for the float->float4 conversion
+ int positionDestination = nodeID * positionStride + positionOffset;
+ g_vertexBuffer[positionDestination] = position.x;
+ g_vertexBuffer[positionDestination+1] = position.y;
+ g_vertexBuffer[positionDestination+2] = position.z;
+ }
+}
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/PrepareLinks.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/PrepareLinks.hlsl
new file mode 100644
index 00000000..269e65c3
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/PrepareLinks.hlsl
@@ -0,0 +1,44 @@
+MSTRINGIFY(
+
+cbuffer PrepareLinksCB : register( b0 )
+{
+ int numLinks;
+ int padding0;
+ int padding1;
+ int padding2;
+};
+
+// Node indices for each link
+StructuredBuffer<int2> g_linksVertexIndices : register( t0 );
+StructuredBuffer<float> g_linksMassLSC : register( t1 );
+StructuredBuffer<float4> g_nodesPreviousPosition : register( t2 );
+
+RWStructuredBuffer<float> g_linksLengthRatio : register( u0 );
+RWStructuredBuffer<float4> g_linksCurrentLength : register( u1 );
+
+[numthreads(128, 1, 1)]
+void
+PrepareLinksKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int linkID = DTid.x;
+ if( linkID < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float4 nodePreviousPosition0 = g_nodesPreviousPosition[node0];
+ float4 nodePreviousPosition1 = g_nodesPreviousPosition[node1];
+
+ float massLSC = g_linksMassLSC[linkID];
+
+ float4 linkCurrentLength = nodePreviousPosition1 - nodePreviousPosition0;
+
+ float linkLengthRatio = dot(linkCurrentLength, linkCurrentLength)*massLSC;
+ linkLengthRatio = 1./linkLengthRatio;
+
+ g_linksCurrentLength[linkID] = linkCurrentLength;
+ g_linksLengthRatio[linkID] = linkLengthRatio;
+ }
+}
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositions.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositions.hlsl
new file mode 100644
index 00000000..0eacaf1a
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositions.hlsl
@@ -0,0 +1,55 @@
+MSTRINGIFY(
+
+cbuffer SolvePositionsFromLinksKernelCB : register( b0 )
+{
+ int startLink;
+ int numLinks;
+ float kst;
+ float ti;
+};
+
+// Node indices for each link
+StructuredBuffer<int2> g_linksVertexIndices : register( t0 );
+
+StructuredBuffer<float> g_linksMassLSC : register( t1 );
+StructuredBuffer<float> g_linksRestLengthSquared : register( t2 );
+StructuredBuffer<float> g_verticesInverseMass : register( t3 );
+
+RWStructuredBuffer<float4> g_vertexPositions : register( u0 );
+
+[numthreads(128, 1, 1)]
+void
+SolvePositionsFromLinksKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int linkID = DTid.x + startLink;
+ if( DTid.x < numLinks )
+ {
+ float massLSC = g_linksMassLSC[linkID];
+ float restLengthSquared = g_linksRestLengthSquared[linkID];
+
+ if( massLSC > 0.0f )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float3 position0 = g_vertexPositions[node0].xyz;
+ float3 position1 = g_vertexPositions[node1].xyz;
+
+ float inverseMass0 = g_verticesInverseMass[node0];
+ float inverseMass1 = g_verticesInverseMass[node1];
+
+ float3 del = position1 - position0;
+ float len = dot(del, del);
+ float k = ((restLengthSquared - len)/(massLSC*(restLengthSquared+len)))*kst;
+ position0 = position0 - del*(k*inverseMass0);
+ position1 = position1 + del*(k*inverseMass1);
+
+ g_vertexPositions[node0] = float4(position0, 0.f);
+ g_vertexPositions[node1] = float4(position1, 0.f);
+
+ }
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositionsSIMDBatched.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositionsSIMDBatched.hlsl
new file mode 100644
index 00000000..a67758ff
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/SolvePositionsSIMDBatched.hlsl
@@ -0,0 +1,133 @@
+MSTRINGIFY(
+
+cbuffer SolvePositionsFromLinksKernelCB : register( b0 )
+{
+ int startWaveInBatch;
+ int numWaves;
+ float kst;
+ float ti;
+};
+
+
+// Number of batches per wavefront stored one element per logical wavefront
+StructuredBuffer<int2> g_wavefrontBatchCountsVertexCounts : register( t0 );
+// Set of up to maxNumVertices vertex addresses per wavefront
+StructuredBuffer<int> g_vertexAddressesPerWavefront : register( t1 );
+
+StructuredBuffer<float> g_verticesInverseMass : register( t2 );
+
+// Per-link data layed out structured in terms of sub batches within wavefronts
+StructuredBuffer<int2> g_linksVertexIndices : register( t3 );
+StructuredBuffer<float> g_linksMassLSC : register( t4 );
+StructuredBuffer<float> g_linksRestLengthSquared : register( t5 );
+
+RWStructuredBuffer<float4> g_vertexPositions : register( u0 );
+
+// Data loaded on a per-wave basis
+groupshared int2 wavefrontBatchCountsVertexCounts[WAVEFRONT_BLOCK_MULTIPLIER];
+groupshared float4 vertexPositionSharedData[MAX_NUM_VERTICES_PER_WAVE*WAVEFRONT_BLOCK_MULTIPLIER];
+groupshared float vertexInverseMassSharedData[MAX_NUM_VERTICES_PER_WAVE*WAVEFRONT_BLOCK_MULTIPLIER];
+
+// Storing the vertex addresses actually slowed things down a little
+//groupshared int vertexAddressSharedData[MAX_NUM_VERTICES_PER_WAVE*WAVEFRONT_BLOCK_MULTIPLIER];
+
+
+[numthreads(BLOCK_SIZE, 1, 1)]
+void
+SolvePositionsFromLinksKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ const int laneInWavefront = (DTid.x & (WAVEFRONT_SIZE-1));
+ const int wavefront = startWaveInBatch + (DTid.x / WAVEFRONT_SIZE);
+ const int firstWavefrontInBlock = startWaveInBatch + Gid.x * WAVEFRONT_BLOCK_MULTIPLIER;
+ const int localWavefront = wavefront - firstWavefrontInBlock;
+
+ // Mask out in case there's a stray "wavefront" at the end that's been forced in through the multiplier
+ if( wavefront < (startWaveInBatch + numWaves) )
+ {
+
+ // Load the batch counts for the wavefronts
+
+ int2 batchesAndVerticesWithinWavefront = g_wavefrontBatchCountsVertexCounts[wavefront];
+
+ int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x;
+ int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;
+
+ // Load the vertices for the wavefronts
+ for( int vertex = laneInWavefront; vertex < verticesUsedByWave; vertex+=WAVEFRONT_SIZE )
+ {
+ int vertexAddress = g_vertexAddressesPerWavefront[wavefront*MAX_NUM_VERTICES_PER_WAVE + vertex];
+
+ //vertexAddressSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex] = vertexAddress;
+ vertexPositionSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex] = g_vertexPositions[vertexAddress];
+ vertexInverseMassSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex] = g_verticesInverseMass[vertexAddress];
+ }
+
+ // Ensure compiler does not re-order memory operations
+ AllMemoryBarrier();
+
+
+ // Loop through the batches performing the solve on each in LDS
+ int baseDataLocationForWave = WAVEFRONT_SIZE * wavefront * MAX_BATCHES_PER_WAVE;
+
+ //for( int batch = 0; batch < batchesWithinWavefront; ++batch )
+
+ int batch = 0;
+ do
+ {
+ int baseDataLocation = baseDataLocationForWave + WAVEFRONT_SIZE * batch;
+ int locationOfValue = baseDataLocation + laneInWavefront;
+
+
+ // These loads should all be perfectly linear across the WF
+ int2 localVertexIndices = g_linksVertexIndices[locationOfValue];
+ float massLSC = g_linksMassLSC[locationOfValue];
+ float restLengthSquared = g_linksRestLengthSquared[locationOfValue];
+
+
+ // LDS vertex addresses based on logical wavefront number in block and loaded index
+ int vertexAddress0 = MAX_NUM_VERTICES_PER_WAVE * localWavefront + localVertexIndices.x;
+ int vertexAddress1 = MAX_NUM_VERTICES_PER_WAVE * localWavefront + localVertexIndices.y;
+
+ float3 position0 = vertexPositionSharedData[vertexAddress0].xyz;
+ float3 position1 = vertexPositionSharedData[vertexAddress1].xyz;
+
+ float inverseMass0 = vertexInverseMassSharedData[vertexAddress0];
+ float inverseMass1 = vertexInverseMassSharedData[vertexAddress1];
+
+ float3 del = position1 - position0;
+ float len = dot(del, del);
+
+ float k = 0;
+ if( massLSC > 0.0f )
+ {
+ k = ((restLengthSquared - len)/(massLSC*(restLengthSquared+len)))*kst;
+ }
+
+ position0 = position0 - del*(k*inverseMass0);
+ position1 = position1 + del*(k*inverseMass1);
+
+ // Ensure compiler does not re-order memory operations
+ AllMemoryBarrier();
+
+ vertexPositionSharedData[vertexAddress0] = float4(position0, 0.f);
+ vertexPositionSharedData[vertexAddress1] = float4(position1, 0.f);
+
+ // Ensure compiler does not re-order memory operations
+ AllMemoryBarrier();
+
+
+ ++batch;
+ } while( batch < batchesWithinWavefront );
+
+ // Update the global memory vertices for the wavefronts
+ for( int vertex = laneInWavefront; vertex < verticesUsedByWave; vertex+=WAVEFRONT_SIZE )
+ {
+ int vertexAddress = g_vertexAddressesPerWavefront[wavefront*MAX_NUM_VERTICES_PER_WAVE + vertex];
+
+ g_vertexPositions[vertexAddress] = vertexPositionSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex];
+ }
+ }
+
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateConstants.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateConstants.hlsl
new file mode 100644
index 00000000..0b8031b9
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateConstants.hlsl
@@ -0,0 +1,48 @@
+MSTRINGIFY(
+
+cbuffer UpdateConstantsCB : register( b0 )
+{
+ int numLinks;
+ int padding0;
+ int padding1;
+ int padding2;
+};
+
+// Node indices for each link
+StructuredBuffer<int2> g_linksVertexIndices : register( t0 );
+StructuredBuffer<float4> g_vertexPositions : register( t1 );
+StructuredBuffer<float> g_vertexInverseMasses : register( t2 );
+StructuredBuffer<float> g_linksMaterialLSC : register( t3 );
+
+RWStructuredBuffer<float> g_linksMassLSC : register( u0 );
+RWStructuredBuffer<float> g_linksRestLengthSquared : register( u1 );
+RWStructuredBuffer<float> g_linksRestLengths : register( u2 );
+
+[numthreads(128, 1, 1)]
+void
+UpdateConstantsKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int linkID = DTid.x;
+ if( linkID < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+ float linearStiffnessCoefficient = g_linksMaterialLSC[ linkID ];
+
+ float3 position0 = g_vertexPositions[node0].xyz;
+ float3 position1 = g_vertexPositions[node1].xyz;
+ float inverseMass0 = g_vertexInverseMasses[node0];
+ float inverseMass1 = g_vertexInverseMasses[node1];
+
+ float3 difference = position0 - position1;
+ float length2 = dot(difference, difference);
+ float length = sqrt(length2);
+
+ g_linksRestLengths[linkID] = length;
+ g_linksMassLSC[linkID] = (inverseMass0 + inverseMass1)/linearStiffnessCoefficient;
+ g_linksRestLengthSquared[linkID] = length*length;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNodes.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNodes.hlsl
new file mode 100644
index 00000000..538cc226
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNodes.hlsl
@@ -0,0 +1,49 @@
+MSTRINGIFY(
+
+cbuffer UpdateVelocitiesFromPositionsWithVelocitiesCB : register( b0 )
+{
+ int numNodes;
+ float isolverdt;
+ int padding1;
+ int padding2;
+};
+
+
+StructuredBuffer<float4> g_vertexPositions : register( t0 );
+StructuredBuffer<float4> g_vertexPreviousPositions : register( t1 );
+StructuredBuffer<int> g_vertexClothIndices : register( t2 );
+StructuredBuffer<float> g_clothVelocityCorrectionCoefficients : register( t3 );
+StructuredBuffer<float> g_clothDampingFactor : register( t4 );
+
+RWStructuredBuffer<float4> g_vertexVelocities : register( u0 );
+RWStructuredBuffer<float4> g_vertexForces : register( u1 );
+
+
+[numthreads(128, 1, 1)]
+void
+updateVelocitiesFromPositionsWithVelocitiesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ float3 position = g_vertexPositions[nodeID].xyz;
+ float3 previousPosition = g_vertexPreviousPositions[nodeID].xyz;
+ float3 velocity = g_vertexVelocities[nodeID].xyz;
+ int clothIndex = g_vertexClothIndices[nodeID];
+ float velocityCorrectionCoefficient = g_clothVelocityCorrectionCoefficients[clothIndex];
+ float dampingFactor = g_clothDampingFactor[clothIndex];
+ float velocityCoefficient = (1.f - dampingFactor);
+
+ float3 difference = position - previousPosition;
+
+ velocity += difference*velocityCorrectionCoefficient*isolverdt;
+
+ // Damp the velocity
+ velocity *= velocityCoefficient;
+
+ g_vertexVelocities[nodeID] = float4(velocity, 0.f);
+ g_vertexForces[nodeID] = float4(0.f, 0.f, 0.f, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNormals.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNormals.hlsl
new file mode 100644
index 00000000..edfd3214
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdateNormals.hlsl
@@ -0,0 +1,98 @@
+MSTRINGIFY(
+
+cbuffer UpdateSoftBodiesCB : register( b0 )
+{
+ unsigned int numNodes;
+ unsigned int startFace;
+ unsigned int numFaces;
+ float epsilon;
+};
+
+
+// Node indices for each link
+StructuredBuffer<int4> g_triangleVertexIndexSet : register( t0 );
+StructuredBuffer<float4> g_vertexPositions : register( t1 );
+StructuredBuffer<int> g_vertexTriangleCount : register( t2 );
+
+RWStructuredBuffer<float4> g_vertexNormals : register( u0 );
+RWStructuredBuffer<float> g_vertexArea : register( u1 );
+RWStructuredBuffer<float4> g_triangleNormals : register( u2 );
+RWStructuredBuffer<float> g_triangleArea : register( u3 );
+
+
+[numthreads(128, 1, 1)]
+void
+ResetNormalsAndAreasKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ if( DTid.x < numNodes )
+ {
+ g_vertexNormals[DTid.x] = float4(0.0f, 0.0f, 0.0f, 0.0f);
+ g_vertexArea[DTid.x] = 0.0f;
+ }
+}
+
+
+[numthreads(128, 1, 1)]
+void
+UpdateSoftBodiesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int faceID = DTid.x + startFace;
+ if( DTid.x < numFaces )
+ {
+ int4 triangleIndexSet = g_triangleVertexIndexSet[ faceID ];
+ int nodeIndex0 = triangleIndexSet.x;
+ int nodeIndex1 = triangleIndexSet.y;
+ int nodeIndex2 = triangleIndexSet.z;
+
+ float3 node0 = g_vertexPositions[nodeIndex0].xyz;
+ float3 node1 = g_vertexPositions[nodeIndex1].xyz;
+ float3 node2 = g_vertexPositions[nodeIndex2].xyz;
+ float3 nodeNormal0 = g_vertexNormals[nodeIndex0].xyz;
+ float3 nodeNormal1 = g_vertexNormals[nodeIndex1].xyz;
+ float3 nodeNormal2 = g_vertexNormals[nodeIndex2].xyz;
+ float vertexArea0 = g_vertexArea[nodeIndex0];
+ float vertexArea1 = g_vertexArea[nodeIndex1];
+ float vertexArea2 = g_vertexArea[nodeIndex2];
+
+ float3 vector0 = node1 - node0;
+ float3 vector1 = node2 - node0;
+
+ float3 faceNormal = cross(vector0.xyz, vector1.xyz);
+ float triangleArea = length(faceNormal);
+
+ nodeNormal0 = nodeNormal0 + faceNormal;
+ nodeNormal1 = nodeNormal1 + faceNormal;
+ nodeNormal2 = nodeNormal2 + faceNormal;
+ vertexArea0 = vertexArea0 + triangleArea;
+ vertexArea1 = vertexArea1 + triangleArea;
+ vertexArea2 = vertexArea2 + triangleArea;
+
+ g_triangleNormals[faceID] = float4(normalize(faceNormal), 0.f);
+ g_vertexNormals[nodeIndex0] = float4(nodeNormal0, 0.f);
+ g_vertexNormals[nodeIndex1] = float4(nodeNormal1, 0.f);
+ g_vertexNormals[nodeIndex2] = float4(nodeNormal2, 0.f);
+ g_triangleArea[faceID] = triangleArea;
+ g_vertexArea[nodeIndex0] = vertexArea0;
+ g_vertexArea[nodeIndex1] = vertexArea1;
+ g_vertexArea[nodeIndex2] = vertexArea2;
+ }
+}
+
+[numthreads(128, 1, 1)]
+void
+NormalizeNormalsAndAreasKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ if( DTid.x < numNodes )
+ {
+ float4 normal = g_vertexNormals[DTid.x];
+ float area = g_vertexArea[DTid.x];
+ int numTriangles = g_vertexTriangleCount[DTid.x];
+
+ float vectorLength = length(normal);
+
+ g_vertexNormals[DTid.x] = normalize(normal);
+ g_vertexArea[DTid.x] = area/float(numTriangles);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositions.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositions.hlsl
new file mode 100644
index 00000000..3547a744
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositions.hlsl
@@ -0,0 +1,44 @@
+MSTRINGIFY(
+
+cbuffer UpdateVelocitiesFromPositionsWithoutVelocitiesCB : register( b0 )
+{
+ int numNodes;
+ float isolverdt;
+ int padding1;
+ int padding2;
+};
+
+
+StructuredBuffer<float4> g_vertexPositions : register( t0 );
+StructuredBuffer<float4> g_vertexPreviousPositions : register( t1 );
+StructuredBuffer<int> g_vertexClothIndices : register( t2 );
+StructuredBuffer<float> g_clothDampingFactor : register( t3 );
+
+RWStructuredBuffer<float4> g_vertexVelocities : register( u0 );
+RWStructuredBuffer<float4> g_vertexForces : register( u1 );
+
+
+[numthreads(128, 1, 1)]
+void
+updateVelocitiesFromPositionsWithoutVelocitiesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ float3 position = g_vertexPositions[nodeID].xyz;
+ float3 previousPosition = g_vertexPreviousPositions[nodeID].xyz;
+ float3 velocity = g_vertexVelocities[nodeID].xyz;
+ int clothIndex = g_vertexClothIndices[nodeID];
+ float dampingFactor = g_clothDampingFactor[clothIndex];
+ float velocityCoefficient = (1.f - dampingFactor);
+
+ float3 difference = position - previousPosition;
+
+ velocity = difference*velocityCoefficient*isolverdt;
+
+ g_vertexVelocities[nodeID] = float4(velocity, 0.f);
+ g_vertexForces[nodeID] = float4(0.f, 0.f, 0.f, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositionsFromVelocities.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositionsFromVelocities.hlsl
new file mode 100644
index 00000000..5c94bd0e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/UpdatePositionsFromVelocities.hlsl
@@ -0,0 +1,35 @@
+MSTRINGIFY(
+
+cbuffer UpdatePositionsFromVelocitiesCB : register( b0 )
+{
+ int numNodes;
+ float solverSDT;
+ int padding1;
+ int padding2;
+};
+
+
+StructuredBuffer<float4> g_vertexVelocities : register( t0 );
+
+RWStructuredBuffer<float4> g_vertexPreviousPositions : register( u0 );
+RWStructuredBuffer<float4> g_vertexCurrentPosition : register( u1 );
+
+
+[numthreads(128, 1, 1)]
+void
+UpdatePositionsFromVelocitiesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int vertexID = DTid.x;
+ if( vertexID < numNodes )
+ {
+ float3 previousPosition = g_vertexPreviousPositions[vertexID].xyz;
+ float3 velocity = g_vertexVelocities[vertexID].xyz;
+
+ float3 newPosition = previousPosition + velocity*solverSDT;
+
+ g_vertexCurrentPosition[vertexID] = float4(newPosition, 0.f);
+ g_vertexPreviousPositions[vertexID] = float4(newPosition, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/VSolveLinks.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/VSolveLinks.hlsl
new file mode 100644
index 00000000..fc391953
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/VSolveLinks.hlsl
@@ -0,0 +1,55 @@
+MSTRINGIFY(
+
+cbuffer VSolveLinksCB : register( b0 )
+{
+ int startLink;
+ int numLinks;
+ float kst;
+ int padding;
+};
+
+// Node indices for each link
+StructuredBuffer<int2> g_linksVertexIndices : register( t0 );
+
+StructuredBuffer<float> g_linksLengthRatio : register( t1 );
+StructuredBuffer<float4> g_linksCurrentLength : register( t2 );
+StructuredBuffer<float> g_vertexInverseMass : register( t3 );
+
+RWStructuredBuffer<float4> g_vertexVelocity : register( u0 );
+
+[numthreads(128, 1, 1)]
+void
+VSolveLinksKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int linkID = DTid.x + startLink;
+ if( DTid.x < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float linkLengthRatio = g_linksLengthRatio[linkID];
+ float3 linkCurrentLength = g_linksCurrentLength[linkID].xyz;
+
+ float3 vertexVelocity0 = g_vertexVelocity[node0].xyz;
+ float3 vertexVelocity1 = g_vertexVelocity[node1].xyz;
+
+ float vertexInverseMass0 = g_vertexInverseMass[node0];
+ float vertexInverseMass1 = g_vertexInverseMass[node1];
+
+ float3 nodeDifference = vertexVelocity0 - vertexVelocity1;
+ float dotResult = dot(linkCurrentLength, nodeDifference);
+ float j = -dotResult*linkLengthRatio*kst;
+
+ float3 velocityChange0 = linkCurrentLength*(j*vertexInverseMass0);
+ float3 velocityChange1 = linkCurrentLength*(j*vertexInverseMass1);
+
+ vertexVelocity0 += velocityChange0;
+ vertexVelocity1 -= velocityChange1;
+
+ g_vertexVelocity[node0] = float4(vertexVelocity0, 0.f);
+ g_vertexVelocity[node1] = float4(vertexVelocity1, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocities.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocities.hlsl
new file mode 100644
index 00000000..399912f4
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocities.hlsl
@@ -0,0 +1,170 @@
+MSTRINGIFY(
+
+cbuffer SolvePositionsFromLinksKernelCB : register( b0 )
+{
+ unsigned int numNodes;
+ float isolverdt;
+ int padding0;
+ int padding1;
+};
+
+struct CollisionObjectIndices
+{
+ int firstObject;
+ int endObject;
+};
+
+struct CollisionShapeDescription
+{
+ float4x4 shapeTransform;
+ float4 linearVelocity;
+ float4 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+
+ // Shape information
+ // Compressed from the union
+ float radius;
+ float halfHeight;
+
+ float margin;
+ float friction;
+
+ int padding0;
+ int padding1;
+
+};
+
+// From btBroadphaseProxy.h
+static const int CAPSULE_SHAPE_PROXYTYPE = 10;
+
+// Node indices for each link
+StructuredBuffer<int> g_vertexClothIdentifier : register( t0 );
+StructuredBuffer<float4> g_vertexPreviousPositions : register( t1 );
+StructuredBuffer<float> g_perClothFriction : register( t2 );
+StructuredBuffer<float> g_clothDampingFactor : register( t3 );
+StructuredBuffer<CollisionObjectIndices> g_perClothCollisionObjectIndices : register( t4 );
+StructuredBuffer<CollisionShapeDescription> g_collisionObjectDetails : register( t5 );
+
+RWStructuredBuffer<float4> g_vertexForces : register( u0 );
+RWStructuredBuffer<float4> g_vertexVelocities : register( u1 );
+RWStructuredBuffer<float4> g_vertexPositions : register( u2 );
+
+[numthreads(128, 1, 1)]
+void
+SolveCollisionsAndUpdateVelocitiesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ float3 forceOnVertex = float3(0.f, 0.f, 0.f);
+ if( DTid.x < numNodes )
+ {
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+ float4 position = float4(g_vertexPositions[nodeID].xyz, 1.f);
+ float4 previousPosition = float4(g_vertexPreviousPositions[nodeID].xyz, 1.f);
+ float3 velocity;
+ float clothFriction = g_perClothFriction[clothIdentifier];
+ float dampingFactor = g_clothDampingFactor[clothIdentifier];
+ float velocityCoefficient = (1.f - dampingFactor);
+ CollisionObjectIndices collisionObjectIndices = g_perClothCollisionObjectIndices[clothIdentifier];
+
+ if( collisionObjectIndices.firstObject != collisionObjectIndices.endObject )
+ {
+ velocity = float3(15, 0, 0);
+
+ // We have some possible collisions to deal with
+ for( int collision = collisionObjectIndices.firstObject; collision < collisionObjectIndices.endObject; ++collision )
+ {
+ CollisionShapeDescription shapeDescription = g_collisionObjectDetails[collision];
+ float colliderFriction = shapeDescription.friction;
+
+ if( shapeDescription.collisionShapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ // Colliding with a capsule
+
+ float capsuleHalfHeight = shapeDescription.halfHeight;
+ float capsuleRadius = shapeDescription.radius;
+ float capsuleMargin = shapeDescription.margin;
+ float4x4 worldTransform = shapeDescription.shapeTransform;
+
+ float4 c1 = float4(0.f, -capsuleHalfHeight, 0.f, 1.f);
+ float4 c2 = float4(0.f, +capsuleHalfHeight, 0.f, 1.f);
+ float4 worldC1 = mul(worldTransform, c1);
+ float4 worldC2 = mul(worldTransform, c2);
+ float3 segment = (worldC2 - worldC1).xyz;
+
+ // compute distance of tangent to vertex along line segment in capsule
+ float distanceAlongSegment = -( dot( (worldC1 - position).xyz, segment ) / dot(segment, segment) );
+
+ float4 closestPoint = (worldC1 + float4(segment * distanceAlongSegment, 0.f));
+ float distanceFromLine = length(position - closestPoint);
+ float distanceFromC1 = length(worldC1 - position);
+ float distanceFromC2 = length(worldC2 - position);
+
+ // Final distance from collision, point to push from, direction to push in
+ // for impulse force
+ float dist;
+ float3 normalVector;
+ if( distanceAlongSegment < 0 )
+ {
+ dist = distanceFromC1;
+ normalVector = normalize(position - worldC1).xyz;
+ } else if( distanceAlongSegment > 1.f ) {
+ dist = distanceFromC2;
+ normalVector = normalize(position - worldC2).xyz;
+ } else {
+ dist = distanceFromLine;
+ normalVector = normalize(position - closestPoint).xyz;
+ }
+
+ float3 colliderLinearVelocity = shapeDescription.linearVelocity.xyz;
+ float3 colliderAngularVelocity = shapeDescription.angularVelocity.xyz;
+ float3 velocityOfSurfacePoint = colliderLinearVelocity + cross(colliderAngularVelocity, position.xyz - worldTransform._m03_m13_m23);
+
+ float minDistance = capsuleRadius + capsuleMargin;
+
+ // In case of no collision, this is the value of velocity
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+
+
+ // Check for a collision
+ if( dist < minDistance )
+ {
+ // Project back to surface along normal
+ position = position + float4((minDistance - dist)*normalVector*0.9, 0.f);
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+ float3 relativeVelocity = velocity - velocityOfSurfacePoint;
+
+ float3 p1 = normalize(cross(normalVector, segment));
+ float3 p2 = normalize(cross(p1, normalVector));
+ // Full friction is sum of velocities in each direction of plane
+ float3 frictionVector = p1*dot(relativeVelocity, p1) + p2*dot(relativeVelocity, p2);
+
+ // Real friction is peak friction corrected by friction coefficients
+ frictionVector = frictionVector * (colliderFriction*clothFriction);
+
+ float approachSpeed = dot(relativeVelocity, normalVector);
+
+ if( approachSpeed <= 0.0 )
+ forceOnVertex -= frictionVector;
+ }
+
+ }
+ }
+ } else {
+ // Update velocity
+ float3 difference = position.xyz - previousPosition.xyz;
+ velocity = difference*velocityCoefficient*isolverdt;
+ }
+
+ g_vertexVelocities[nodeID] = float4(velocity, 0.f);
+
+ // Update external force
+ g_vertexForces[nodeID] = float4(forceOnVertex, 0.f);
+
+ g_vertexPositions[nodeID] = float4(position.xyz, 0.f);
+ }
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocitiesSIMDBatched.hlsl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocitiesSIMDBatched.hlsl
new file mode 100644
index 00000000..9bb7e4da
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/HLSL/solveCollisionsAndUpdateVelocitiesSIMDBatched.hlsl
@@ -0,0 +1,191 @@
+MSTRINGIFY(
+
+cbuffer SolvePositionsFromLinksKernelCB : register( b0 )
+{
+ unsigned int numNodes;
+ float isolverdt;
+ int padding0;
+ int padding1;
+};
+
+struct CollisionObjectIndices
+{
+ int firstObject;
+ int endObject;
+};
+
+struct CollisionShapeDescription
+{
+ float4x4 shapeTransform;
+ float4 linearVelocity;
+ float4 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+
+ // Shape information
+ // Compressed from the union
+ float radius;
+ float halfHeight;
+
+ float margin;
+ float friction;
+
+ int padding0;
+ int padding1;
+
+};
+
+// From btBroadphaseProxy.h
+static const int CAPSULE_SHAPE_PROXYTYPE = 10;
+
+// Node indices for each link
+StructuredBuffer<int> g_vertexClothIdentifier : register( t0 );
+StructuredBuffer<float4> g_vertexPreviousPositions : register( t1 );
+StructuredBuffer<float> g_perClothFriction : register( t2 );
+StructuredBuffer<float> g_clothDampingFactor : register( t3 );
+StructuredBuffer<CollisionObjectIndices> g_perClothCollisionObjectIndices : register( t4 );
+StructuredBuffer<CollisionShapeDescription> g_collisionObjectDetails : register( t5 );
+
+RWStructuredBuffer<float4> g_vertexForces : register( u0 );
+RWStructuredBuffer<float4> g_vertexVelocities : register( u1 );
+RWStructuredBuffer<float4> g_vertexPositions : register( u2 );
+
+// A buffer of local collision shapes
+// TODO: Iterate to support more than 16
+groupshared CollisionShapeDescription localCollisionShapes[16];
+
+[numthreads(128, 1, 1)]
+void
+SolveCollisionsAndUpdateVelocitiesKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ float3 forceOnVertex = float3(0.f, 0.f, 0.f);
+
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+ float4 position = float4(g_vertexPositions[nodeID].xyz, 1.f);
+ float4 previousPosition = float4(g_vertexPreviousPositions[nodeID].xyz, 1.f);
+ float3 velocity;
+ float clothFriction = g_perClothFriction[clothIdentifier];
+ float dampingFactor = g_clothDampingFactor[clothIdentifier];
+ float velocityCoefficient = (1.f - dampingFactor);
+ CollisionObjectIndices collisionObjectIndices = g_perClothCollisionObjectIndices[clothIdentifier];
+
+ int numObjects = collisionObjectIndices.endObject - collisionObjectIndices.firstObject;
+ if( numObjects > 0 )
+ {
+ // We have some possible collisions to deal with
+
+ // First load all of the collision objects into LDS
+ int numObjects = collisionObjectIndices.endObject - collisionObjectIndices.firstObject;
+ if( GTid.x < numObjects )
+ {
+ localCollisionShapes[GTid.x] = g_collisionObjectDetails[ collisionObjectIndices.firstObject + GTid.x ];
+ }
+ }
+
+ // Safe as the vertices are padded so that not more than one soft body is in a group
+ AllMemoryBarrierWithGroupSync();
+
+ // Annoyingly, even though I know the flow control is not varying, the compiler will not let me skip this
+ if( numObjects > 0 )
+ {
+ velocity = float3(0, 0, 0);
+
+
+ // We have some possible collisions to deal with
+ for( int collision = 0; collision < numObjects; ++collision )
+ {
+ CollisionShapeDescription shapeDescription = localCollisionShapes[collision];
+ float colliderFriction = shapeDescription.friction;
+
+ if( shapeDescription.collisionShapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ // Colliding with a capsule
+
+ float capsuleHalfHeight = localCollisionShapes[collision].halfHeight;
+ float capsuleRadius = localCollisionShapes[collision].radius;
+ float capsuleMargin = localCollisionShapes[collision].margin;
+
+ float4x4 worldTransform = localCollisionShapes[collision].shapeTransform;
+
+ float4 c1 = float4(0.f, -capsuleHalfHeight, 0.f, 1.f);
+ float4 c2 = float4(0.f, +capsuleHalfHeight, 0.f, 1.f);
+ float4 worldC1 = mul(worldTransform, c1);
+ float4 worldC2 = mul(worldTransform, c2);
+ float3 segment = (worldC2 - worldC1).xyz;
+
+ // compute distance of tangent to vertex along line segment in capsule
+ float distanceAlongSegment = -( dot( (worldC1 - position).xyz, segment ) / dot(segment, segment) );
+
+ float4 closestPoint = (worldC1 + float4(segment * distanceAlongSegment, 0.f));
+ float distanceFromLine = length(position - closestPoint);
+ float distanceFromC1 = length(worldC1 - position);
+ float distanceFromC2 = length(worldC2 - position);
+
+ // Final distance from collision, point to push from, direction to push in
+ // for impulse force
+ float dist;
+ float3 normalVector;
+ if( distanceAlongSegment < 0 )
+ {
+ dist = distanceFromC1;
+ normalVector = normalize(position - worldC1).xyz;
+ } else if( distanceAlongSegment > 1.f ) {
+ dist = distanceFromC2;
+ normalVector = normalize(position - worldC2).xyz;
+ } else {
+ dist = distanceFromLine;
+ normalVector = normalize(position - closestPoint).xyz;
+ }
+
+ float3 colliderLinearVelocity = localCollisionShapes[collision].linearVelocity.xyz;
+ float3 colliderAngularVelocity = localCollisionShapes[collision].angularVelocity.xyz;
+ float3 velocityOfSurfacePoint = colliderLinearVelocity + cross(colliderAngularVelocity, position.xyz - worldTransform._m03_m13_m23);
+
+ float minDistance = capsuleRadius + capsuleMargin;
+
+ // In case of no collision, this is the value of velocity
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+
+
+ // Check for a collision
+ if( dist < minDistance )
+ {
+ // Project back to surface along normal
+ position = position + float4((minDistance - dist)*normalVector*0.9, 0.f);
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+ float3 relativeVelocity = velocity - velocityOfSurfacePoint;
+
+ float3 p1 = normalize(cross(normalVector, segment));
+ float3 p2 = normalize(cross(p1, normalVector));
+ // Full friction is sum of velocities in each direction of plane
+ float3 frictionVector = p1*dot(relativeVelocity, p1) + p2*dot(relativeVelocity, p2);
+
+ // Real friction is peak friction corrected by friction coefficients
+ frictionVector = frictionVector * (colliderFriction*clothFriction);
+
+ float approachSpeed = dot(relativeVelocity, normalVector);
+
+ if( approachSpeed <= 0.0 )
+ forceOnVertex -= frictionVector;
+ }
+
+ }
+ }
+ } else {
+ // Update velocity
+ float3 difference = position.xyz - previousPosition.xyz;
+ velocity = difference*velocityCoefficient*isolverdt;
+ }
+
+ g_vertexVelocities[nodeID] = float4(velocity, 0.f);
+
+ // Update external force
+ g_vertexForces[nodeID] = float4(forceOnVertex, 0.f);
+
+ g_vertexPositions[nodeID] = float4(position.xyz, 0.f);
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverBuffer_DX11.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverBuffer_DX11.h
new file mode 100644
index 00000000..daf1ef89
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverBuffer_DX11.h
@@ -0,0 +1,323 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef BT_SOFT_BODY_SOLVER_BUFFER_DX11_H
+#define BT_SOFT_BODY_SOLVER_BUFFER_DX11_H
+
+// DX11 support
+#include <windows.h>
+#include <crtdbg.h>
+#include <d3d11.h>
+#include <d3dx11.h>
+#include <d3dcompiler.h>
+
+#ifndef SAFE_RELEASE
+#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
+#endif
+
+/**
+ * DX11 Buffer that tracks a host buffer on use to ensure size-correctness.
+ */
+template <typename ElementType> class btDX11Buffer
+{
+protected:
+ ID3D11Device* m_d3dDevice;
+ ID3D11DeviceContext* m_d3dDeviceContext;
+
+ ID3D11Buffer* m_Buffer;
+ ID3D11ShaderResourceView* m_SRV;
+ ID3D11UnorderedAccessView* m_UAV;
+ btAlignedObjectArray< ElementType >* m_CPUBuffer;
+
+ // TODO: Separate this from the main class
+ // as read back buffers can be shared between buffers
+ ID3D11Buffer* m_readBackBuffer;
+
+ int m_gpuSize;
+ bool m_onGPU;
+
+ bool m_readOnlyOnGPU;
+
+ bool createBuffer( ID3D11Buffer *preexistingBuffer = 0)
+ {
+ HRESULT hr = S_OK;
+
+ // Create all CS buffers
+ if( preexistingBuffer )
+ {
+ m_Buffer = preexistingBuffer;
+ } else {
+ D3D11_BUFFER_DESC buffer_desc;
+ ZeroMemory(&buffer_desc, sizeof(buffer_desc));
+ buffer_desc.Usage = D3D11_USAGE_DEFAULT;
+ if( m_readOnlyOnGPU )
+ buffer_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
+ else
+ buffer_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_UNORDERED_ACCESS;
+ buffer_desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
+
+ buffer_desc.ByteWidth = m_CPUBuffer->size() * sizeof(ElementType);
+ // At a minimum the buffer must exist
+ if( buffer_desc.ByteWidth == 0 )
+ buffer_desc.ByteWidth = sizeof(ElementType);
+ buffer_desc.StructureByteStride = sizeof(ElementType);
+ hr = m_d3dDevice->CreateBuffer(&buffer_desc, NULL, &m_Buffer);
+ if( FAILED( hr ) )
+ return (hr==S_OK);
+ }
+
+ if( m_readOnlyOnGPU )
+ {
+ D3D11_SHADER_RESOURCE_VIEW_DESC srvbuffer_desc;
+ ZeroMemory(&srvbuffer_desc, sizeof(srvbuffer_desc));
+ srvbuffer_desc.Format = DXGI_FORMAT_UNKNOWN;
+ srvbuffer_desc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
+
+ srvbuffer_desc.Buffer.ElementWidth = m_CPUBuffer->size();
+ if( srvbuffer_desc.Buffer.ElementWidth == 0 )
+ srvbuffer_desc.Buffer.ElementWidth = 1;
+ hr = m_d3dDevice->CreateShaderResourceView(m_Buffer, &srvbuffer_desc, &m_SRV);
+ if( FAILED( hr ) )
+ return (hr==S_OK);
+ } else {
+ // Create SRV
+ D3D11_SHADER_RESOURCE_VIEW_DESC srvbuffer_desc;
+ ZeroMemory(&srvbuffer_desc, sizeof(srvbuffer_desc));
+ srvbuffer_desc.Format = DXGI_FORMAT_UNKNOWN;
+ srvbuffer_desc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
+
+ srvbuffer_desc.Buffer.ElementWidth = m_CPUBuffer->size();
+ if( srvbuffer_desc.Buffer.ElementWidth == 0 )
+ srvbuffer_desc.Buffer.ElementWidth = 1;
+ hr = m_d3dDevice->CreateShaderResourceView(m_Buffer, &srvbuffer_desc, &m_SRV);
+ if( FAILED( hr ) )
+ return (hr==S_OK);
+
+ // Create UAV
+ D3D11_UNORDERED_ACCESS_VIEW_DESC uavbuffer_desc;
+ ZeroMemory(&uavbuffer_desc, sizeof(uavbuffer_desc));
+ uavbuffer_desc.Format = DXGI_FORMAT_UNKNOWN;
+ uavbuffer_desc.ViewDimension = D3D11_UAV_DIMENSION_BUFFER;
+
+ uavbuffer_desc.Buffer.NumElements = m_CPUBuffer->size();
+ if( uavbuffer_desc.Buffer.NumElements == 0 )
+ uavbuffer_desc.Buffer.NumElements = 1;
+ hr = m_d3dDevice->CreateUnorderedAccessView(m_Buffer, &uavbuffer_desc, &m_UAV);
+ if( FAILED( hr ) )
+ return (hr==S_OK);
+
+ // Create read back buffer
+ D3D11_BUFFER_DESC readback_buffer_desc;
+ ZeroMemory(&readback_buffer_desc, sizeof(readback_buffer_desc));
+
+ readback_buffer_desc.ByteWidth = m_CPUBuffer->size() * sizeof(ElementType);
+ readback_buffer_desc.Usage = D3D11_USAGE_STAGING;
+ readback_buffer_desc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
+ readback_buffer_desc.StructureByteStride = sizeof(ElementType);
+ hr = m_d3dDevice->CreateBuffer(&readback_buffer_desc, NULL, &m_readBackBuffer);
+ if( FAILED( hr ) )
+ return (hr==S_OK);
+ }
+
+ m_gpuSize = m_CPUBuffer->size();
+ return true;
+ }
+
+
+
+public:
+ btDX11Buffer( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext, btAlignedObjectArray< ElementType > *CPUBuffer, bool readOnly )
+ {
+ m_d3dDevice = d3dDevice;
+ m_d3dDeviceContext = d3dDeviceContext;
+ m_Buffer = 0;
+ m_SRV = 0;
+ m_UAV = 0;
+ m_readBackBuffer = 0;
+
+ m_CPUBuffer = CPUBuffer;
+
+ m_gpuSize = 0;
+ m_onGPU = false;
+
+ m_readOnlyOnGPU = readOnly;
+ }
+
+ virtual ~btDX11Buffer()
+ {
+ SAFE_RELEASE(m_Buffer);
+ SAFE_RELEASE(m_SRV);
+ SAFE_RELEASE(m_UAV);
+ SAFE_RELEASE(m_readBackBuffer);
+ }
+
+ ID3D11ShaderResourceView* &getSRV()
+ {
+ return m_SRV;
+ }
+
+ ID3D11UnorderedAccessView* &getUAV()
+ {
+ return m_UAV;
+ }
+
+ ID3D11Buffer* &getBuffer()
+ {
+ return m_Buffer;
+ }
+
+ /**
+ * Move the data to the GPU if it is not there already.
+ */
+ bool moveToGPU()
+ {
+ // Reallocate if GPU size is too small
+ if( (m_CPUBuffer->size() > m_gpuSize ) )
+ m_onGPU = false;
+ if( !m_onGPU && m_CPUBuffer->size() > 0 )
+ {
+ // If the buffer doesn't exist or the CPU-side buffer has changed size, create
+ // We should really delete the old one, too, but let's leave that for later
+ if( !m_Buffer || (m_CPUBuffer->size() != m_gpuSize) )
+ {
+ SAFE_RELEASE(m_Buffer);
+ SAFE_RELEASE(m_SRV);
+ SAFE_RELEASE(m_UAV);
+ SAFE_RELEASE(m_readBackBuffer);
+ if( !createBuffer() )
+ {
+ btAssert("Buffer creation failed.");
+ return false;
+ }
+ }
+
+ if( m_gpuSize > 0 )
+ {
+ D3D11_BOX destRegion;
+ destRegion.left = 0;
+ destRegion.front = 0;
+ destRegion.top = 0;
+ destRegion.bottom = 1;
+ destRegion.back = 1;
+ destRegion.right = (m_CPUBuffer->size())*sizeof(ElementType);
+ m_d3dDeviceContext->UpdateSubresource(m_Buffer, 0, &destRegion, &((*m_CPUBuffer)[0]), 0, 0);
+
+ m_onGPU = true;
+ }
+
+ }
+
+ return true;
+ }
+
+ /**
+ * Move the data back from the GPU if it is on there and isn't read only.
+ */
+ bool moveFromGPU()
+ {
+ if( m_CPUBuffer->size() > 0 )
+ {
+ if( m_onGPU && !m_readOnlyOnGPU )
+ {
+ // Copy back
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ //m_pd3dImmediateContext->CopyResource(m_phAngVelReadBackBuffer, m_phAngVel);
+
+ D3D11_BOX destRegion;
+ destRegion.left = 0;
+ destRegion.front = 0;
+ destRegion.top = 0;
+ destRegion.bottom = 1;
+ destRegion.back = 1;
+
+ destRegion.right = (m_CPUBuffer->size())*sizeof(ElementType);
+ m_d3dDeviceContext->CopySubresourceRegion(
+ m_readBackBuffer,
+ 0,
+ 0,
+ 0,
+ 0 ,
+ m_Buffer,
+ 0,
+ &destRegion
+ );
+
+ m_d3dDeviceContext->Map(m_readBackBuffer, 0, D3D11_MAP_READ, 0, &MappedResource);
+ //memcpy(m_hAngVel, MappedResource.pData, (m_maxObjs * sizeof(float) ));
+ memcpy(&((*m_CPUBuffer)[0]), MappedResource.pData, ((m_CPUBuffer->size()) * sizeof(ElementType) ));
+ m_d3dDeviceContext->Unmap(m_readBackBuffer, 0);
+
+ m_onGPU = false;
+ }
+ }
+
+ return true;
+ }
+
+
+ /**
+ * Copy the data back from the GPU without changing its state to be CPU-side.
+ * Useful if we just want to view it on the host for visualization.
+ */
+ bool copyFromGPU()
+ {
+ if( m_CPUBuffer->size() > 0 )
+ {
+ if( m_onGPU && !m_readOnlyOnGPU )
+ {
+ // Copy back
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+
+ D3D11_BOX destRegion;
+ destRegion.left = 0;
+ destRegion.front = 0;
+ destRegion.top = 0;
+ destRegion.bottom = 1;
+ destRegion.back = 1;
+
+ destRegion.right = (m_CPUBuffer->size())*sizeof(ElementType);
+ m_d3dDeviceContext->CopySubresourceRegion(
+ m_readBackBuffer,
+ 0,
+ 0,
+ 0,
+ 0 ,
+ m_Buffer,
+ 0,
+ &destRegion
+ );
+
+ m_d3dDeviceContext->Map(m_readBackBuffer, 0, D3D11_MAP_READ, 0, &MappedResource);
+ //memcpy(m_hAngVel, MappedResource.pData, (m_maxObjs * sizeof(float) ));
+ memcpy(&((*m_CPUBuffer)[0]), MappedResource.pData, ((m_CPUBuffer->size()) * sizeof(ElementType) ));
+ m_d3dDeviceContext->Unmap(m_readBackBuffer, 0);
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Call if data has changed on the CPU.
+ * Can then trigger a move to the GPU as necessary.
+ */
+ virtual void changedOnCPU()
+ {
+ m_onGPU = false;
+ }
+}; // class btDX11Buffer
+
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_BUFFER_DX11_H \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11.h
new file mode 100644
index 00000000..555483d2
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11.h
@@ -0,0 +1,103 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_DX11.h"
+
+
+#ifndef BT_SOFT_BODY_SOLVER_LINK_DATA_DX11_H
+#define BT_SOFT_BODY_SOLVER_LINK_DATA_DX11_H
+
+struct ID3D11Device;
+struct ID3D11DeviceContext;
+
+
+class btSoftBodyLinkDataDX11 : public btSoftBodyLinkData
+{
+public:
+ bool m_onGPU;
+ ID3D11Device *m_d3dDevice;
+ ID3D11DeviceContext *m_d3dDeviceContext;
+
+
+ btDX11Buffer<LinkNodePair> m_dx11Links;
+ btDX11Buffer<float> m_dx11LinkStrength;
+ btDX11Buffer<float> m_dx11LinksMassLSC;
+ btDX11Buffer<float> m_dx11LinksRestLengthSquared;
+ btDX11Buffer<Vectormath::Aos::Vector3> m_dx11LinksCLength;
+ btDX11Buffer<float> m_dx11LinksLengthRatio;
+ btDX11Buffer<float> m_dx11LinksRestLength;
+ btDX11Buffer<float> m_dx11LinksMaterialLinearStiffnessCoefficient;
+
+ struct BatchPair
+ {
+ int start;
+ int length;
+
+ BatchPair() :
+ start(0),
+ length(0)
+ {
+ }
+
+ BatchPair( int s, int l ) :
+ start( s ),
+ length( l )
+ {
+ }
+ };
+
+ /**
+ * Link addressing information for each cloth.
+ * Allows link locations to be computed independently of data batching.
+ */
+ btAlignedObjectArray< int > m_linkAddresses;
+
+ /**
+ * Start and length values for computation batches over link data.
+ */
+ btAlignedObjectArray< BatchPair > m_batchStartLengths;
+
+
+ //ID3D11Buffer* readBackBuffer;
+
+ btSoftBodyLinkDataDX11( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext );
+
+ virtual ~btSoftBodyLinkDataDX11();
+
+ /** Allocate enough space in all link-related arrays to fit numLinks links */
+ virtual void createLinks( int numLinks );
+
+ /** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+ virtual void setLinkAt( const LinkDescription &link, int linkIndex );
+
+ virtual bool onAccelerator();
+
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+
+ /**
+ * Generate (and later update) the batching for the entire link set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+ void generateBatches();
+};
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_LINK_DATA_DX11_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11SIMDAware.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11SIMDAware.h
new file mode 100644
index 00000000..92864a15
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverLinkData_DX11SIMDAware.h
@@ -0,0 +1,173 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_DX11.h"
+
+#ifndef BT_ACCELERATED_SOFT_BODY_LINK_DATA_DX11_SIMDAWARE_H
+#define BT_ACCELERATED_SOFT_BODY_LINK_DATA_DX11_SIMDAWARE_H
+
+struct ID3D11Device;
+struct ID3D11DeviceContext;
+
+
+class btSoftBodyLinkDataDX11SIMDAware : public btSoftBodyLinkData
+{
+public:
+ bool m_onGPU;
+ ID3D11Device *m_d3dDevice;
+ ID3D11DeviceContext *m_d3dDeviceContext;
+
+ const int m_wavefrontSize;
+ const int m_linksPerWorkItem;
+ const int m_maxLinksPerWavefront;
+ int m_maxBatchesWithinWave;
+ int m_maxVerticesWithinWave;
+ int m_numWavefronts;
+
+ int m_maxVertex;
+
+ struct NumBatchesVerticesPair
+ {
+ int numBatches;
+ int numVertices;
+ };
+
+ // Array storing number of links in each wavefront
+ btAlignedObjectArray<int> m_linksPerWavefront;
+ btAlignedObjectArray<NumBatchesVerticesPair> m_numBatchesAndVerticesWithinWaves;
+ btDX11Buffer< NumBatchesVerticesPair > m_dx11NumBatchesAndVerticesWithinWaves;
+
+ // All arrays here will contain batches of m_maxLinksPerWavefront links
+ // ordered by wavefront.
+ // with either global vertex pairs or local vertex pairs
+ btAlignedObjectArray< int > m_wavefrontVerticesGlobalAddresses; // List of global vertices per wavefront
+ btDX11Buffer<int> m_dx11WavefrontVerticesGlobalAddresses;
+ btAlignedObjectArray< LinkNodePair > m_linkVerticesLocalAddresses; // Vertex pair for the link
+ btDX11Buffer<LinkNodePair> m_dx11LinkVerticesLocalAddresses;
+ btDX11Buffer<float> m_dx11LinkStrength;
+ btDX11Buffer<float> m_dx11LinksMassLSC;
+ btDX11Buffer<float> m_dx11LinksRestLengthSquared;
+ btDX11Buffer<float> m_dx11LinksRestLength;
+ btDX11Buffer<float> m_dx11LinksMaterialLinearStiffnessCoefficient;
+
+ struct BatchPair
+ {
+ int start;
+ int length;
+
+ BatchPair() :
+ start(0),
+ length(0)
+ {
+ }
+
+ BatchPair( int s, int l ) :
+ start( s ),
+ length( l )
+ {
+ }
+ };
+
+ /**
+ * Link addressing information for each cloth.
+ * Allows link locations to be computed independently of data batching.
+ */
+ btAlignedObjectArray< int > m_linkAddresses;
+
+ /**
+ * Start and length values for computation batches over link data.
+ */
+ btAlignedObjectArray< BatchPair > m_wavefrontBatchStartLengths;
+
+
+ //ID3D11Buffer* readBackBuffer;
+
+ btSoftBodyLinkDataDX11SIMDAware( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext );
+
+ virtual ~btSoftBodyLinkDataDX11SIMDAware();
+
+ /** Allocate enough space in all link-related arrays to fit numLinks links */
+ virtual void createLinks( int numLinks );
+
+ /** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+ virtual void setLinkAt( const LinkDescription &link, int linkIndex );
+
+ virtual bool onAccelerator();
+
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+
+ /**
+ * Generate (and later update) the batching for the entire link set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+ void generateBatches();
+
+ int getMaxVerticesPerWavefront()
+ {
+ return m_maxVerticesWithinWave;
+ }
+
+ int getWavefrontSize()
+ {
+ return m_wavefrontSize;
+ }
+
+ int getLinksPerWorkItem()
+ {
+ return m_linksPerWorkItem;
+ }
+
+ int getMaxLinksPerWavefront()
+ {
+ return m_maxLinksPerWavefront;
+ }
+
+ int getMaxBatchesPerWavefront()
+ {
+ return m_maxBatchesWithinWave;
+ }
+
+ int getNumWavefronts()
+ {
+ return m_numWavefronts;
+ }
+
+ NumBatchesVerticesPair getNumBatchesAndVerticesWithinWavefront( int wavefront )
+ {
+ return m_numBatchesAndVerticesWithinWaves[wavefront];
+ }
+
+ int getVertexGlobalAddresses( int vertexIndex )
+ {
+ return m_wavefrontVerticesGlobalAddresses[vertexIndex];
+ }
+
+ /**
+ * Get post-batching local addresses of the vertex pair for a link assuming all vertices used by a wavefront are loaded locally.
+ */
+ LinkNodePair getVertexPairLocalAddresses( int linkIndex )
+ {
+ return m_linkVerticesLocalAddresses[linkIndex];
+ }
+
+};
+
+
+#endif // #ifndef BT_ACCELERATED_SOFT_BODY_LINK_DATA_DX11_SIMDAWARE_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverTriangleData_DX11.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverTriangleData_DX11.h
new file mode 100644
index 00000000..9d78d91f
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverTriangleData_DX11.h
@@ -0,0 +1,96 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_DX11.h"
+
+
+#ifndef BT_SOFT_BODY_SOLVER_TRIANGLE_DATA_DX11_H
+#define BT_SOFT_BODY_SOLVER_TRIANGLE_DATA_DX11_H
+
+struct ID3D11Device;
+struct ID3D11DeviceContext;
+
+class btSoftBodyTriangleDataDX11 : public btSoftBodyTriangleData
+{
+public:
+ bool m_onGPU;
+ ID3D11Device *m_d3dDevice;
+ ID3D11DeviceContext *m_d3dDeviceContext;
+
+ btDX11Buffer<btSoftBodyTriangleData::TriangleNodeSet> m_dx11VertexIndices;
+ btDX11Buffer<float> m_dx11Area;
+ btDX11Buffer<Vectormath::Aos::Vector3> m_dx11Normal;
+
+ struct BatchPair
+ {
+ int start;
+ int length;
+
+ BatchPair() :
+ start(0),
+ length(0)
+ {
+ }
+
+ BatchPair( int s, int l ) :
+ start( s ),
+ length( l )
+ {
+ }
+ };
+
+
+ /**
+ * Link addressing information for each cloth.
+ * Allows link locations to be computed independently of data batching.
+ */
+ btAlignedObjectArray< int > m_triangleAddresses;
+
+ /**
+ * Start and length values for computation batches over link data.
+ */
+ btAlignedObjectArray< BatchPair > m_batchStartLengths;
+
+ //ID3D11Buffer* readBackBuffer;
+
+public:
+ btSoftBodyTriangleDataDX11( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext );
+
+ virtual ~btSoftBodyTriangleDataDX11();
+
+
+ /** Allocate enough space in all link-related arrays to fit numLinks links */
+ virtual void createTriangles( int numTriangles );
+
+ /** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+ virtual void setTriangleAt( const btSoftBodyTriangleData::TriangleDescription &triangle, int triangleIndex );
+
+ virtual bool onAccelerator();
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+ /**
+ * Generate (and later update) the batching for the entire triangle set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+ void generateBatches();
+};
+
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_TRIANGLE_DATA_DX11_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexBuffer_DX11.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexBuffer_DX11.h
new file mode 100644
index 00000000..49d1d0f3
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexBuffer_DX11.h
@@ -0,0 +1,107 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_DX11_H
+#define BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_DX11_H
+
+
+#include "BulletSoftBody/btSoftBodySolverVertexBuffer.h"
+
+#include <windows.h>
+#include <crtdbg.h>
+#include <d3d11.h>
+#include <d3dx11.h>
+#include <d3dcompiler.h>
+
+class btDX11VertexBufferDescriptor : public btVertexBufferDescriptor
+{
+protected:
+ /** Context of the DX11 device on which the vertex buffer is stored. */
+ ID3D11DeviceContext* m_context;
+ /** DX11 vertex buffer */
+ ID3D11Buffer* m_vertexBuffer;
+ /** UAV for DX11 buffer */
+ ID3D11UnorderedAccessView* m_vertexBufferUAV;
+
+
+public:
+ /**
+ * buffer is a pointer to the DX11 buffer to place the vertex data in.
+ * UAV is a pointer to the UAV representation of the buffer laid out in floats.
+ * vertexOffset is the offset in floats to the first vertex.
+ * vertexStride is the stride in floats between vertices.
+ */
+ btDX11VertexBufferDescriptor( ID3D11DeviceContext* context, ID3D11Buffer* buffer, ID3D11UnorderedAccessView *UAV, int vertexOffset, int vertexStride )
+ {
+ m_context = context;
+ m_vertexBuffer = buffer;
+ m_vertexBufferUAV = UAV;
+ m_vertexOffset = vertexOffset;
+ m_vertexStride = vertexStride;
+ m_hasVertexPositions = true;
+ }
+
+ /**
+ * buffer is a pointer to the DX11 buffer to place the vertex data in.
+ * UAV is a pointer to the UAV representation of the buffer laid out in floats.
+ * vertexOffset is the offset in floats to the first vertex.
+ * vertexStride is the stride in floats between vertices.
+ * normalOffset is the offset in floats to the first normal.
+ * normalStride is the stride in floats between normals.
+ */
+ btDX11VertexBufferDescriptor( ID3D11DeviceContext* context, ID3D11Buffer* buffer, ID3D11UnorderedAccessView *UAV, int vertexOffset, int vertexStride, int normalOffset, int normalStride )
+ {
+ m_context = context;
+ m_vertexBuffer = buffer;
+ m_vertexBufferUAV = UAV;
+ m_vertexOffset = vertexOffset;
+ m_vertexStride = vertexStride;
+ m_hasVertexPositions = true;
+
+ m_normalOffset = normalOffset;
+ m_normalStride = normalStride;
+ m_hasNormals = true;
+ }
+
+ virtual ~btDX11VertexBufferDescriptor()
+ {
+
+ }
+
+ /**
+ * Return the type of the vertex buffer descriptor.
+ */
+ virtual BufferTypes getBufferType() const
+ {
+ return DX11_BUFFER;
+ }
+
+ virtual ID3D11DeviceContext* getContext() const
+ {
+ return m_context;
+ }
+
+ virtual ID3D11Buffer* getbtDX11Buffer() const
+ {
+ return m_vertexBuffer;
+ }
+
+ virtual ID3D11UnorderedAccessView* getDX11UAV() const
+ {
+ return m_vertexBufferUAV;
+ }
+};
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_DX11_H \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexData_DX11.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexData_DX11.h
new file mode 100644
index 00000000..2216cb9e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolverVertexData_DX11.h
@@ -0,0 +1,63 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_DX11.h"
+
+
+#ifndef BT_SOFT_BHODY_SOLVER_VERTEX_DATA_DX11_H
+#define BT_SOFT_BHODY_SOLVER_VERTEX_DATA_DX11_H
+
+class btSoftBodyLinkData;
+class btSoftBodyLinkData::LinkDescription;
+
+struct ID3D11Device;
+struct ID3D11DeviceContext;
+
+class btSoftBodyVertexDataDX11 : public btSoftBodyVertexData
+{
+protected:
+ bool m_onGPU;
+ ID3D11Device *m_d3dDevice;
+ ID3D11DeviceContext *m_d3dDeviceContext;
+
+public:
+ btDX11Buffer<int> m_dx11ClothIdentifier;
+ btDX11Buffer<Vectormath::Aos::Point3> m_dx11VertexPosition;
+ btDX11Buffer<Vectormath::Aos::Point3> m_dx11VertexPreviousPosition;
+ btDX11Buffer<Vectormath::Aos::Vector3> m_dx11VertexVelocity;
+ btDX11Buffer<Vectormath::Aos::Vector3> m_dx11VertexForceAccumulator;
+ btDX11Buffer<Vectormath::Aos::Vector3> m_dx11VertexNormal;
+ btDX11Buffer<float> m_dx11VertexInverseMass;
+ btDX11Buffer<float> m_dx11VertexArea;
+ btDX11Buffer<int> m_dx11VertexTriangleCount;
+
+
+ //ID3D11Buffer* readBackBuffer;
+
+public:
+ btSoftBodyVertexDataDX11( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext );
+ virtual ~btSoftBodyVertexDataDX11();
+
+ virtual bool onAccelerator();
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+};
+
+
+#endif // #ifndef BT_SOFT_BHODY_SOLVER_VERTEX_DATA_DX11_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.cpp b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.cpp
new file mode 100644
index 00000000..8101ae29
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.cpp
@@ -0,0 +1,2208 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "vectormath/vmInclude.h"
+
+#include "btSoftBodySolver_DX11.h"
+#include "btSoftBodySolverVertexBuffer_DX11.h"
+#include "BulletSoftBody/btSoftBody.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+
+#define MSTRINGIFY(A) #A
+static char* PrepareLinksHLSLString =
+#include "HLSL/PrepareLinks.hlsl"
+static char* UpdatePositionsFromVelocitiesHLSLString =
+#include "HLSL/UpdatePositionsFromVelocities.hlsl"
+static char* SolvePositionsHLSLString =
+#include "HLSL/SolvePositions.hlsl"
+static char* UpdateNodesHLSLString =
+#include "HLSL/UpdateNodes.hlsl"
+static char* UpdatePositionsHLSLString =
+#include "HLSL/UpdatePositions.hlsl"
+static char* UpdateConstantsHLSLString =
+#include "HLSL/UpdateConstants.hlsl"
+static char* IntegrateHLSLString =
+#include "HLSL/Integrate.hlsl"
+static char* ApplyForcesHLSLString =
+#include "HLSL/ApplyForces.hlsl"
+static char* UpdateNormalsHLSLString =
+#include "HLSL/UpdateNormals.hlsl"
+static char* OutputToVertexArrayHLSLString =
+#include "HLSL/OutputToVertexArray.hlsl"
+static char* VSolveLinksHLSLString =
+#include "HLSL/VSolveLinks.hlsl"
+static char* ComputeBoundsHLSLString =
+#include "HLSL/ComputeBounds.hlsl"
+static char* SolveCollisionsAndUpdateVelocitiesHLSLString =
+#include "HLSL/SolveCollisionsAndUpdateVelocities.hlsl"
+
+
+btSoftBodyLinkDataDX11::btSoftBodyLinkDataDX11( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext ) :
+ m_dx11Links( d3dDevice, d3dDeviceContext, &m_links, false ),
+ m_dx11LinkStrength( d3dDevice, d3dDeviceContext, &m_linkStrength, false ),
+ m_dx11LinksMassLSC( d3dDevice, d3dDeviceContext, &m_linksMassLSC, false ),
+ m_dx11LinksRestLengthSquared( d3dDevice, d3dDeviceContext, &m_linksRestLengthSquared, false ),
+ m_dx11LinksCLength( d3dDevice, d3dDeviceContext, &m_linksCLength, false ),
+ m_dx11LinksLengthRatio( d3dDevice, d3dDeviceContext, &m_linksLengthRatio, false ),
+ m_dx11LinksRestLength( d3dDevice, d3dDeviceContext, &m_linksRestLength, false ),
+ m_dx11LinksMaterialLinearStiffnessCoefficient( d3dDevice, d3dDeviceContext, &m_linksMaterialLinearStiffnessCoefficient, false )
+{
+ m_d3dDevice = d3dDevice;
+ m_d3dDeviceContext = d3dDeviceContext;
+}
+
+btSoftBodyLinkDataDX11::~btSoftBodyLinkDataDX11()
+{
+}
+
+static Vectormath::Aos::Vector3 toVector3( const btVector3 &vec )
+{
+ Vectormath::Aos::Vector3 outVec( vec.getX(), vec.getY(), vec.getZ() );
+ return outVec;
+}
+
+void btSoftBodyLinkDataDX11::createLinks( int numLinks )
+{
+ int previousSize = m_links.size();
+ int newSize = previousSize + numLinks;
+
+ btSoftBodyLinkData::createLinks( numLinks );
+
+ // Resize the link addresses array as well
+ m_linkAddresses.resize( newSize );
+}
+
+void btSoftBodyLinkDataDX11::setLinkAt( const btSoftBodyLinkData::LinkDescription &link, int linkIndex )
+{
+ btSoftBodyLinkData::setLinkAt( link, linkIndex );
+
+ // Set the link index correctly for initialisation
+ m_linkAddresses[linkIndex] = linkIndex;
+}
+
+bool btSoftBodyLinkDataDX11::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyLinkDataDX11::moveToAccelerator()
+{
+ bool success = true;
+ success = success && m_dx11Links.moveToGPU();
+ success = success && m_dx11LinkStrength.moveToGPU();
+ success = success && m_dx11LinksMassLSC.moveToGPU();
+ success = success && m_dx11LinksRestLengthSquared.moveToGPU();
+ success = success && m_dx11LinksCLength.moveToGPU();
+ success = success && m_dx11LinksLengthRatio.moveToGPU();
+ success = success && m_dx11LinksRestLength.moveToGPU();
+ success = success && m_dx11LinksMaterialLinearStiffnessCoefficient.moveToGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+bool btSoftBodyLinkDataDX11::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_dx11Links.moveFromGPU();
+ success = success && m_dx11LinkStrength.moveFromGPU();
+ success = success && m_dx11LinksMassLSC.moveFromGPU();
+ success = success && m_dx11LinksRestLengthSquared.moveFromGPU();
+ success = success && m_dx11LinksCLength.moveFromGPU();
+ success = success && m_dx11LinksLengthRatio.moveFromGPU();
+ success = success && m_dx11LinksRestLength.moveFromGPU();
+ success = success && m_dx11LinksMaterialLinearStiffnessCoefficient.moveFromGPU();
+
+ if( success )
+ m_onGPU = false;
+
+ return success;
+}
+
+void btSoftBodyLinkDataDX11::generateBatches()
+{
+ int numLinks = getNumLinks();
+
+ // Do the graph colouring here temporarily
+ btAlignedObjectArray< int > batchValues;
+ batchValues.resize( numLinks, 0 );
+
+ // Find the maximum vertex value internally for now
+ int maxVertex = 0;
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ int vertex0 = getVertexPair(linkIndex).vertex0;
+ int vertex1 = getVertexPair(linkIndex).vertex1;
+ if( vertex0 > maxVertex )
+ maxVertex = vertex0;
+ if( vertex1 > maxVertex )
+ maxVertex = vertex1;
+ }
+ int numVertices = maxVertex + 1;
+
+ // Set of lists, one for each node, specifying which colours are connected
+ // to that node.
+ // No two edges into a node can share a colour.
+ btAlignedObjectArray< btAlignedObjectArray< int > > vertexConnectedColourLists;
+ vertexConnectedColourLists.resize(numVertices);
+
+
+
+ // Simple algorithm that chooses the lowest batch number
+ // that none of the links attached to either of the connected
+ // nodes is in
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ int linkLocation = m_linkAddresses[linkIndex];
+
+ int vertex0 = getVertexPair(linkLocation).vertex0;
+ int vertex1 = getVertexPair(linkLocation).vertex1;
+
+ // Get the two node colour lists
+ btAlignedObjectArray< int > &colourListVertex0( vertexConnectedColourLists[vertex0] );
+ btAlignedObjectArray< int > &colourListVertex1( vertexConnectedColourLists[vertex1] );
+
+ // Choose the minimum colour that is in neither list
+ int colour = 0;
+ while( colourListVertex0.findLinearSearch(colour) != colourListVertex0.size() || colourListVertex1.findLinearSearch(colour) != colourListVertex1.size() )
+ ++colour;
+ // i should now be the minimum colour in neither list
+ // Add to the two lists so that future edges don't share
+ // And store the colour against this edge
+
+ colourListVertex0.push_back(colour);
+ colourListVertex1.push_back(colour);
+ batchValues[linkIndex] = colour;
+ }
+
+ // Check the colour counts
+ btAlignedObjectArray< int > batchCounts;
+ for( int i = 0; i < numLinks; ++i )
+ {
+ int batch = batchValues[i];
+ if( batch >= batchCounts.size() )
+ batchCounts.push_back(1);
+ else
+ ++(batchCounts[batch]);
+ }
+
+ m_batchStartLengths.resize(batchCounts.size());
+ if( m_batchStartLengths.size() > 0 )
+ {
+ m_batchStartLengths[0] = BatchPair( 0, 0 );
+
+ int sum = 0;
+ for( int batchIndex = 0; batchIndex < batchCounts.size(); ++batchIndex )
+ {
+ m_batchStartLengths[batchIndex].start = sum;
+ m_batchStartLengths[batchIndex].length = batchCounts[batchIndex];
+ sum += batchCounts[batchIndex];
+ }
+ }
+
+ /////////////////////////////
+ // Sort data based on batches
+
+ // Create source arrays by copying originals
+ btAlignedObjectArray<btSoftBodyLinkData::LinkNodePair> m_links_Backup(m_links);
+ btAlignedObjectArray<float> m_linkStrength_Backup(m_linkStrength);
+ btAlignedObjectArray<float> m_linksMassLSC_Backup(m_linksMassLSC);
+ btAlignedObjectArray<float> m_linksRestLengthSquared_Backup(m_linksRestLengthSquared);
+ btAlignedObjectArray<Vectormath::Aos::Vector3> m_linksCLength_Backup(m_linksCLength);
+ btAlignedObjectArray<float> m_linksLengthRatio_Backup(m_linksLengthRatio);
+ btAlignedObjectArray<float> m_linksRestLength_Backup(m_linksRestLength);
+ btAlignedObjectArray<float> m_linksMaterialLinearStiffnessCoefficient_Backup(m_linksMaterialLinearStiffnessCoefficient);
+
+
+ for( int batch = 0; batch < batchCounts.size(); ++batch )
+ batchCounts[batch] = 0;
+
+ // Do sort as single pass into destination arrays
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ // To maintain locations run off the original link locations rather than the current position.
+ // It's not cache efficient, but as we run this rarely that should not matter.
+ // It's faster than searching the link location array for the current location and then updating it.
+ // The other alternative would be to unsort before resorting, but this is equivalent to doing that.
+ int linkLocation = m_linkAddresses[linkIndex];
+
+ // Obtain batch and calculate target location for the
+ // next element in that batch, incrementing the batch counter
+ // afterwards
+ int batch = batchValues[linkIndex];
+ int newLocation = m_batchStartLengths[batch].start + batchCounts[batch];
+
+ batchCounts[batch] = batchCounts[batch] + 1;
+ m_links[newLocation] = m_links_Backup[linkLocation];
+#if 1
+ m_linkStrength[newLocation] = m_linkStrength_Backup[linkLocation];
+ m_linksMassLSC[newLocation] = m_linksMassLSC_Backup[linkLocation];
+ m_linksRestLengthSquared[newLocation] = m_linksRestLengthSquared_Backup[linkLocation];
+ m_linksLengthRatio[newLocation] = m_linksLengthRatio_Backup[linkLocation];
+ m_linksRestLength[newLocation] = m_linksRestLength_Backup[linkLocation];
+ m_linksMaterialLinearStiffnessCoefficient[newLocation] = m_linksMaterialLinearStiffnessCoefficient_Backup[linkLocation];
+#endif
+ // Update the locations array to account for the moved entry
+ m_linkAddresses[linkIndex] = newLocation;
+ }
+} // void btSoftBodyLinkDataDX11::generateBatches()
+
+
+
+btSoftBodyVertexDataDX11::btSoftBodyVertexDataDX11( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext ) :
+ m_dx11ClothIdentifier( d3dDevice, d3dDeviceContext, &m_clothIdentifier, false ),
+ m_dx11VertexPosition( d3dDevice, d3dDeviceContext, &m_vertexPosition, false ),
+ m_dx11VertexPreviousPosition( d3dDevice, d3dDeviceContext, &m_vertexPreviousPosition, false ),
+ m_dx11VertexVelocity( d3dDevice, d3dDeviceContext, &m_vertexVelocity, false ),
+ m_dx11VertexForceAccumulator( d3dDevice, d3dDeviceContext, &m_vertexForceAccumulator, false ),
+ m_dx11VertexNormal( d3dDevice, d3dDeviceContext, &m_vertexNormal, false ),
+ m_dx11VertexInverseMass( d3dDevice, d3dDeviceContext, &m_vertexInverseMass, false ),
+ m_dx11VertexArea( d3dDevice, d3dDeviceContext, &m_vertexArea, false ),
+ m_dx11VertexTriangleCount( d3dDevice, d3dDeviceContext, &m_vertexTriangleCount, false )
+{
+ m_d3dDevice = d3dDevice;
+ m_d3dDeviceContext = d3dDeviceContext;
+}
+
+btSoftBodyVertexDataDX11::~btSoftBodyVertexDataDX11()
+{
+
+}
+
+bool btSoftBodyVertexDataDX11::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyVertexDataDX11::moveToAccelerator()
+{
+ bool success = true;
+ success = success && m_dx11ClothIdentifier.moveToGPU();
+ success = success && m_dx11VertexPosition.moveToGPU();
+ success = success && m_dx11VertexPreviousPosition.moveToGPU();
+ success = success && m_dx11VertexVelocity.moveToGPU();
+ success = success && m_dx11VertexForceAccumulator.moveToGPU();
+ success = success && m_dx11VertexNormal.moveToGPU();
+ success = success && m_dx11VertexInverseMass.moveToGPU();
+ success = success && m_dx11VertexArea.moveToGPU();
+ success = success && m_dx11VertexTriangleCount.moveToGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+bool btSoftBodyVertexDataDX11::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_dx11ClothIdentifier.moveFromGPU();
+ success = success && m_dx11VertexPosition.moveFromGPU();
+ success = success && m_dx11VertexPreviousPosition.moveFromGPU();
+ success = success && m_dx11VertexVelocity.moveFromGPU();
+ success = success && m_dx11VertexForceAccumulator.moveFromGPU();
+ success = success && m_dx11VertexNormal.moveFromGPU();
+ success = success && m_dx11VertexInverseMass.moveFromGPU();
+ success = success && m_dx11VertexArea.moveFromGPU();
+ success = success && m_dx11VertexTriangleCount.moveFromGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+
+btSoftBodyTriangleDataDX11::btSoftBodyTriangleDataDX11( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext ) :
+ m_dx11VertexIndices( d3dDevice, d3dDeviceContext, &m_vertexIndices, false ),
+ m_dx11Area( d3dDevice, d3dDeviceContext, &m_area, false ),
+ m_dx11Normal( d3dDevice, d3dDeviceContext, &m_normal, false )
+{
+ m_d3dDevice = d3dDevice;
+ m_d3dDeviceContext = d3dDeviceContext;
+}
+
+btSoftBodyTriangleDataDX11::~btSoftBodyTriangleDataDX11()
+{
+
+}
+
+
+/** Allocate enough space in all link-related arrays to fit numLinks links */
+void btSoftBodyTriangleDataDX11::createTriangles( int numTriangles )
+{
+ int previousSize = getNumTriangles();
+ int newSize = previousSize + numTriangles;
+
+ btSoftBodyTriangleData::createTriangles( numTriangles );
+
+ // Resize the link addresses array as well
+ m_triangleAddresses.resize( newSize );
+}
+
+/** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+void btSoftBodyTriangleDataDX11::setTriangleAt( const btSoftBodyTriangleData::TriangleDescription &triangle, int triangleIndex )
+{
+ btSoftBodyTriangleData::setTriangleAt( triangle, triangleIndex );
+
+ m_triangleAddresses[triangleIndex] = triangleIndex;
+}
+
+bool btSoftBodyTriangleDataDX11::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyTriangleDataDX11::moveToAccelerator()
+{
+ bool success = true;
+ success = success && m_dx11VertexIndices.moveToGPU();
+ success = success && m_dx11Area.moveToGPU();
+ success = success && m_dx11Normal.moveToGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+bool btSoftBodyTriangleDataDX11::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_dx11VertexIndices.moveFromGPU();
+ success = success && m_dx11Area.moveFromGPU();
+ success = success && m_dx11Normal.moveFromGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+/**
+ * Generate (and later update) the batching for the entire triangle set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+void btSoftBodyTriangleDataDX11::generateBatches()
+{
+ int numTriangles = getNumTriangles();
+ if( numTriangles == 0 )
+ return;
+
+ // Do the graph colouring here temporarily
+ btAlignedObjectArray< int > batchValues;
+ batchValues.resize( numTriangles );
+
+ // Find the maximum vertex value internally for now
+ int maxVertex = 0;
+ for( int triangleIndex = 0; triangleIndex < numTriangles; ++triangleIndex )
+ {
+ int vertex0 = getVertexSet(triangleIndex).vertex0;
+ int vertex1 = getVertexSet(triangleIndex).vertex1;
+ int vertex2 = getVertexSet(triangleIndex).vertex2;
+
+ if( vertex0 > maxVertex )
+ maxVertex = vertex0;
+ if( vertex1 > maxVertex )
+ maxVertex = vertex1;
+ if( vertex2 > maxVertex )
+ maxVertex = vertex2;
+ }
+ int numVertices = maxVertex + 1;
+
+ // Set of lists, one for each node, specifying which colours are connected
+ // to that node.
+ // No two edges into a node can share a colour.
+ btAlignedObjectArray< btAlignedObjectArray< int > > vertexConnectedColourLists;
+ vertexConnectedColourLists.resize(numVertices);
+
+
+ //std::cout << "\n";
+ // Simple algorithm that chooses the lowest batch number
+ // that none of the faces attached to either of the connected
+ // nodes is in
+ for( int triangleIndex = 0; triangleIndex < numTriangles; ++triangleIndex )
+ {
+ // To maintain locations run off the original link locations rather than the current position.
+ // It's not cache efficient, but as we run this rarely that should not matter.
+ // It's faster than searching the link location array for the current location and then updating it.
+ // The other alternative would be to unsort before resorting, but this is equivalent to doing that.
+ int triangleLocation = m_triangleAddresses[triangleIndex];
+
+ int vertex0 = getVertexSet(triangleLocation).vertex0;
+ int vertex1 = getVertexSet(triangleLocation).vertex1;
+ int vertex2 = getVertexSet(triangleLocation).vertex2;
+
+ // Get the three node colour lists
+ btAlignedObjectArray< int > &colourListVertex0( vertexConnectedColourLists[vertex0] );
+ btAlignedObjectArray< int > &colourListVertex1( vertexConnectedColourLists[vertex1] );
+ btAlignedObjectArray< int > &colourListVertex2( vertexConnectedColourLists[vertex2] );
+
+ // Choose the minimum colour that is in none of the lists
+ int colour = 0;
+ while(
+ colourListVertex0.findLinearSearch(colour) != colourListVertex0.size() ||
+ colourListVertex1.findLinearSearch(colour) != colourListVertex1.size() ||
+ colourListVertex2.findLinearSearch(colour) != colourListVertex2.size() )
+ {
+ ++colour;
+ }
+ // i should now be the minimum colour in neither list
+ // Add to the three lists so that future edges don't share
+ // And store the colour against this face
+ colourListVertex0.push_back(colour);
+ colourListVertex1.push_back(colour);
+ colourListVertex2.push_back(colour);
+
+ batchValues[triangleIndex] = colour;
+ }
+
+
+ // Check the colour counts
+ btAlignedObjectArray< int > batchCounts;
+ for( int i = 0; i < numTriangles; ++i )
+ {
+ int batch = batchValues[i];
+ if( batch >= batchCounts.size() )
+ batchCounts.push_back(1);
+ else
+ ++(batchCounts[batch]);
+ }
+
+
+ m_batchStartLengths.resize(batchCounts.size());
+ m_batchStartLengths[0] = BatchPair( 0, 0 );
+
+
+ int sum = 0;
+ for( int batchIndex = 0; batchIndex < batchCounts.size(); ++batchIndex )
+ {
+ m_batchStartLengths[batchIndex].start = sum;
+ m_batchStartLengths[batchIndex].length = batchCounts[batchIndex];
+ sum += batchCounts[batchIndex];
+ }
+
+ /////////////////////////////
+ // Sort data based on batches
+
+ // Create source arrays by copying originals
+ btAlignedObjectArray<btSoftBodyTriangleData::TriangleNodeSet> m_vertexIndices_Backup(m_vertexIndices);
+ btAlignedObjectArray<float> m_area_Backup(m_area);
+ btAlignedObjectArray<Vectormath::Aos::Vector3> m_normal_Backup(m_normal);
+
+
+ for( int batch = 0; batch < batchCounts.size(); ++batch )
+ batchCounts[batch] = 0;
+
+ // Do sort as single pass into destination arrays
+ for( int triangleIndex = 0; triangleIndex < numTriangles; ++triangleIndex )
+ {
+ // To maintain locations run off the original link locations rather than the current position.
+ // It's not cache efficient, but as we run this rarely that should not matter.
+ // It's faster than searching the link location array for the current location and then updating it.
+ // The other alternative would be to unsort before resorting, but this is equivalent to doing that.
+ int triangleLocation = m_triangleAddresses[triangleIndex];
+
+ // Obtain batch and calculate target location for the
+ // next element in that batch, incrementing the batch counter
+ // afterwards
+ int batch = batchValues[triangleIndex];
+ int newLocation = m_batchStartLengths[batch].start + batchCounts[batch];
+
+ batchCounts[batch] = batchCounts[batch] + 1;
+ m_vertexIndices[newLocation] = m_vertexIndices_Backup[triangleLocation];
+ m_area[newLocation] = m_area_Backup[triangleLocation];
+ m_normal[newLocation] = m_normal_Backup[triangleLocation];
+
+ // Update the locations array to account for the moved entry
+ m_triangleAddresses[triangleIndex] = newLocation;
+ }
+} // btSoftBodyTriangleDataDX11::generateBatches
+
+
+
+
+
+
+
+
+
+
+
+
+btDX11SoftBodySolver::btDX11SoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory) :
+ m_dx11Device( dx11Device ),
+ m_dx11Context( dx11Context ),
+ dxFunctions( m_dx11Device, m_dx11Context, dx11CompileFromMemory ),
+ m_linkData(m_dx11Device, m_dx11Context),
+ m_vertexData(m_dx11Device, m_dx11Context),
+ m_triangleData(m_dx11Device, m_dx11Context),
+ m_dx11PerClothAcceleration( m_dx11Device, m_dx11Context, &m_perClothAcceleration, true ),
+ m_dx11PerClothWindVelocity( m_dx11Device, m_dx11Context, &m_perClothWindVelocity, true ),
+ m_dx11PerClothDampingFactor( m_dx11Device, m_dx11Context, &m_perClothDampingFactor, true ),
+ m_dx11PerClothVelocityCorrectionCoefficient( m_dx11Device, m_dx11Context, &m_perClothVelocityCorrectionCoefficient, true ),
+ m_dx11PerClothLiftFactor( m_dx11Device, m_dx11Context, &m_perClothLiftFactor, true ),
+ m_dx11PerClothDragFactor( m_dx11Device, m_dx11Context, &m_perClothDragFactor, true ),
+ m_dx11PerClothMediumDensity( m_dx11Device, m_dx11Context, &m_perClothMediumDensity, true ),
+ m_dx11PerClothCollisionObjects( m_dx11Device, m_dx11Context, &m_perClothCollisionObjects, true ),
+ m_dx11CollisionObjectDetails( m_dx11Device, m_dx11Context, &m_collisionObjectDetails, true ),
+ m_dx11PerClothMinBounds( m_dx11Device, m_dx11Context, &m_perClothMinBounds, false ),
+ m_dx11PerClothMaxBounds( m_dx11Device, m_dx11Context, &m_perClothMaxBounds, false ),
+ m_dx11PerClothFriction( m_dx11Device, m_dx11Context, &m_perClothFriction, false )
+{
+ // Initial we will clearly need to update solver constants
+ // For now this is global for the cloths linked with this solver - we should probably make this body specific
+ // for performance in future once we understand more clearly when constants need to be updated
+ m_updateSolverConstants = true;
+
+ m_shadersInitialized = false;
+}
+
+btDX11SoftBodySolver::~btDX11SoftBodySolver()
+{
+ releaseKernels();
+}
+
+void btDX11SoftBodySolver::releaseKernels()
+{
+
+ SAFE_RELEASE( prepareLinksKernel.kernel );
+ SAFE_RELEASE( prepareLinksKernel.constBuffer );
+ SAFE_RELEASE( integrateKernel.kernel );
+ SAFE_RELEASE( integrateKernel.constBuffer );
+ SAFE_RELEASE( integrateKernel.kernel );
+ SAFE_RELEASE( solvePositionsFromLinksKernel.constBuffer );
+ SAFE_RELEASE( solvePositionsFromLinksKernel.kernel );
+ SAFE_RELEASE( updatePositionsFromVelocitiesKernel.constBuffer );
+ SAFE_RELEASE( updatePositionsFromVelocitiesKernel.kernel );
+ SAFE_RELEASE( updateVelocitiesFromPositionsWithoutVelocitiesKernel.constBuffer );
+ SAFE_RELEASE( updateVelocitiesFromPositionsWithoutVelocitiesKernel.kernel );
+ SAFE_RELEASE( updateVelocitiesFromPositionsWithVelocitiesKernel.constBuffer );
+ SAFE_RELEASE( updateVelocitiesFromPositionsWithVelocitiesKernel.kernel );
+ SAFE_RELEASE( resetNormalsAndAreasKernel.constBuffer );
+ SAFE_RELEASE( resetNormalsAndAreasKernel.kernel );
+ SAFE_RELEASE( normalizeNormalsAndAreasKernel.constBuffer );
+ SAFE_RELEASE( normalizeNormalsAndAreasKernel.kernel );
+ SAFE_RELEASE( updateSoftBodiesKernel.constBuffer );
+ SAFE_RELEASE( updateSoftBodiesKernel.kernel );
+ SAFE_RELEASE( solveCollisionsAndUpdateVelocitiesKernel.kernel );
+ SAFE_RELEASE( solveCollisionsAndUpdateVelocitiesKernel.constBuffer );
+ SAFE_RELEASE( computeBoundsKernel.kernel );
+ SAFE_RELEASE( computeBoundsKernel.constBuffer );
+ SAFE_RELEASE( vSolveLinksKernel.kernel );
+ SAFE_RELEASE( vSolveLinksKernel.constBuffer );
+
+ SAFE_RELEASE( addVelocityKernel.constBuffer );
+ SAFE_RELEASE( addVelocityKernel.kernel );
+ SAFE_RELEASE( applyForcesKernel.constBuffer );
+ SAFE_RELEASE( applyForcesKernel.kernel );
+
+ m_shadersInitialized = false;
+}
+
+
+void btDX11SoftBodySolver::copyBackToSoftBodies()
+{
+ // Move the vertex data back to the host first
+ m_vertexData.moveFromAccelerator();
+
+ // Loop over soft bodies, copying all the vertex positions back for each body in turn
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[ softBodyIndex ];
+ btSoftBody *softBody = softBodyInterface->getSoftBody();
+
+ int firstVertex = softBodyInterface->getFirstVertex();
+ int numVertices = softBodyInterface->getNumVertices();
+
+ // Copy vertices from solver back into the softbody
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ using Vectormath::Aos::Point3;
+ Point3 vertexPosition( getVertexData().getVertexPositions()[firstVertex + vertex] );
+
+ softBody->m_nodes[vertex].m_x.setX( vertexPosition.getX() );
+ softBody->m_nodes[vertex].m_x.setY( vertexPosition.getY() );
+ softBody->m_nodes[vertex].m_x.setZ( vertexPosition.getZ() );
+
+ softBody->m_nodes[vertex].m_n.setX( vertexPosition.getX() );
+ softBody->m_nodes[vertex].m_n.setY( vertexPosition.getY() );
+ softBody->m_nodes[vertex].m_n.setZ( vertexPosition.getZ() );
+ }
+ }
+} // btDX11SoftBodySolver::copyBackToSoftBodies
+
+
+void btDX11SoftBodySolver::optimize( btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate )
+{
+ if( forceUpdate || m_softBodySet.size() != softBodies.size() )
+ {
+ // Have a change in the soft body set so update, reloading all the data
+ getVertexData().clear();
+ getTriangleData().clear();
+ getLinkData().clear();
+ m_softBodySet.resize(0);
+
+
+ for( int softBodyIndex = 0; softBodyIndex < softBodies.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = softBodies[ softBodyIndex ];
+ using Vectormath::Aos::Matrix3;
+ using Vectormath::Aos::Point3;
+
+ // Create SoftBody that will store the information within the solver
+ btAcceleratedSoftBodyInterface *newSoftBody = new btAcceleratedSoftBodyInterface( softBody );
+ m_softBodySet.push_back( newSoftBody );
+
+ m_perClothAcceleration.push_back( toVector3(softBody->getWorldInfo()->m_gravity) );
+ m_perClothDampingFactor.push_back(softBody->m_cfg.kDP);
+ m_perClothVelocityCorrectionCoefficient.push_back( softBody->m_cfg.kVCF );
+ m_perClothLiftFactor.push_back( softBody->m_cfg.kLF );
+ m_perClothDragFactor.push_back( softBody->m_cfg.kDG );
+ m_perClothMediumDensity.push_back(softBody->getWorldInfo()->air_density);
+ // Simple init values. Actually we'll put 0 and -1 into them at the appropriate time
+ m_perClothMinBounds.push_back( UIntVector3( 0, 0, 0 ) );
+ m_perClothMaxBounds.push_back( UIntVector3( UINT_MAX, UINT_MAX, UINT_MAX ) );
+ m_perClothFriction.push_back( softBody->getFriction() );
+ m_perClothCollisionObjects.push_back( CollisionObjectIndices(-1, -1) );
+
+ // Add space for new vertices and triangles in the default solver for now
+ // TODO: Include space here for tearing too later
+ int firstVertex = getVertexData().getNumVertices();
+ int numVertices = softBody->m_nodes.size();
+ int maxVertices = numVertices;
+ // Allocate space for new vertices in all the vertex arrays
+ getVertexData().createVertices( maxVertices, softBodyIndex );
+
+ int firstTriangle = getTriangleData().getNumTriangles();
+ int numTriangles = softBody->m_faces.size();
+ int maxTriangles = numTriangles;
+ getTriangleData().createTriangles( maxTriangles );
+
+ // Copy vertices from softbody into the solver
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ Point3 multPoint(softBody->m_nodes[vertex].m_x.getX(), softBody->m_nodes[vertex].m_x.getY(), softBody->m_nodes[vertex].m_x.getZ());
+ btSoftBodyVertexData::VertexDescription desc;
+
+ // TODO: Position in the softbody might be pre-transformed
+ // or we may need to adapt for the pose.
+ //desc.setPosition( cloth.getMeshTransform()*multPoint );
+ desc.setPosition( multPoint );
+
+ float vertexInverseMass = softBody->m_nodes[vertex].m_im;
+ desc.setInverseMass(vertexInverseMass);
+ getVertexData().setVertexAt( desc, firstVertex + vertex );
+ }
+
+ // Copy triangles similarly
+ // We're assuming here that vertex indices are based on the firstVertex rather than the entire scene
+ for( int triangle = 0; triangle < numTriangles; ++triangle )
+ {
+ // Note that large array storage is relative to the array not to the cloth
+ // So we need to add firstVertex to each value
+ int vertexIndex0 = (softBody->m_faces[triangle].m_n[0] - &(softBody->m_nodes[0]));
+ int vertexIndex1 = (softBody->m_faces[triangle].m_n[1] - &(softBody->m_nodes[0]));
+ int vertexIndex2 = (softBody->m_faces[triangle].m_n[2] - &(softBody->m_nodes[0]));
+ btSoftBodyTriangleData::TriangleDescription newTriangle(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, vertexIndex2 + firstVertex);
+ getTriangleData().setTriangleAt( newTriangle, firstTriangle + triangle );
+
+ // Increase vertex triangle counts for this triangle
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex0)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex1)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex2)++;
+ }
+
+ int firstLink = getLinkData().getNumLinks();
+ int numLinks = softBody->m_links.size();
+ int maxLinks = numLinks;
+
+ // Allocate space for the links
+ getLinkData().createLinks( numLinks );
+
+ // Add the links
+ for( int link = 0; link < numLinks; ++link )
+ {
+ int vertexIndex0 = softBody->m_links[link].m_n[0] - &(softBody->m_nodes[0]);
+ int vertexIndex1 = softBody->m_links[link].m_n[1] - &(softBody->m_nodes[0]);
+
+ btSoftBodyLinkData::LinkDescription newLink(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, softBody->m_links[link].m_material->m_kLST);
+ newLink.setLinkStrength(1.f);
+ getLinkData().setLinkAt(newLink, firstLink + link);
+ }
+
+ newSoftBody->setFirstVertex( firstVertex );
+ newSoftBody->setFirstTriangle( firstTriangle );
+ newSoftBody->setNumVertices( numVertices );
+ newSoftBody->setMaxVertices( maxVertices );
+ newSoftBody->setNumTriangles( numTriangles );
+ newSoftBody->setMaxTriangles( maxTriangles );
+ newSoftBody->setFirstLink( firstLink );
+ newSoftBody->setNumLinks( numLinks );
+ }
+
+
+
+ updateConstants(0.f);
+
+
+ m_linkData.generateBatches();
+ m_triangleData.generateBatches();
+ }
+}
+
+
+btSoftBodyLinkData &btDX11SoftBodySolver::getLinkData()
+{
+ // TODO: Consider setting link data to "changed" here
+ return m_linkData;
+}
+
+btSoftBodyVertexData &btDX11SoftBodySolver::getVertexData()
+{
+ // TODO: Consider setting vertex data to "changed" here
+ return m_vertexData;
+}
+
+btSoftBodyTriangleData &btDX11SoftBodySolver::getTriangleData()
+{
+ // TODO: Consider setting triangle data to "changed" here
+ return m_triangleData;
+}
+
+bool btDX11SoftBodySolver::checkInitialized()
+{
+ if( !m_shadersInitialized )
+ if( buildShaders() )
+ m_shadersInitialized = true;
+
+ return m_shadersInitialized;
+}
+
+void btDX11SoftBodySolver::resetNormalsAndAreas( int numVertices )
+{
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ UpdateSoftBodiesCB constBuffer;
+
+ constBuffer.numNodes = numVertices;
+ constBuffer.epsilon = FLT_EPSILON;
+
+ // Todo: factor this out. Number of nodes is static and sdt might be, too, we can update this just once on setup
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( integrateKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(UpdateSoftBodiesCB) );
+ m_dx11Context->Unmap( integrateKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &integrateKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexNormal.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexArea.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( resetNormalsAndAreasKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks, 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::resetNormalsAndAreas
+
+void btDX11SoftBodySolver::normalizeNormalsAndAreas( int numVertices )
+{
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ UpdateSoftBodiesCB constBuffer;
+
+ constBuffer.numNodes = numVertices;
+ constBuffer.epsilon = FLT_EPSILON;
+
+ // Todo: factor this out. Number of nodes is static and sdt might be, too, we can update this just once on setup
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( integrateKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(UpdateSoftBodiesCB) );
+ m_dx11Context->Unmap( integrateKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &integrateKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_vertexData.m_dx11VertexTriangleCount.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexNormal.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexArea.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( normalizeNormalsAndAreasKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks, 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::normalizeNormalsAndAreas
+
+void btDX11SoftBodySolver::executeUpdateSoftBodies( int firstTriangle, int numTriangles )
+{
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ UpdateSoftBodiesCB constBuffer;
+
+ constBuffer.startFace = firstTriangle;
+ constBuffer.numFaces = numTriangles;
+
+ // Todo: factor this out. Number of nodes is static and sdt might be, too, we can update this just once on setup
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( updateSoftBodiesKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(UpdateSoftBodiesCB) );
+ m_dx11Context->Unmap( updateSoftBodiesKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &updateSoftBodiesKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_triangleData.m_dx11VertexIndices.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_vertexData.m_dx11VertexPosition.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexNormal.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexArea.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 2, 1, &(m_triangleData.m_dx11Normal.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 3, 1, &(m_triangleData.m_dx11Area.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( updateSoftBodiesKernel.kernel, NULL, 0 );
+
+ int numBlocks = (numTriangles + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks, 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 4, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::executeUpdateSoftBodies
+
+void btDX11SoftBodySolver::updateSoftBodies()
+{
+ using namespace Vectormath::Aos;
+
+
+ int numVertices = m_vertexData.getNumVertices();
+ int numTriangles = m_triangleData.getNumTriangles();
+
+ // Ensure data is on accelerator
+ m_vertexData.moveToAccelerator();
+ m_triangleData.moveToAccelerator();
+
+ resetNormalsAndAreas( numVertices );
+
+
+ // Go through triangle batches so updates occur correctly
+ for( int batchIndex = 0; batchIndex < m_triangleData.m_batchStartLengths.size(); ++batchIndex )
+ {
+
+ int startTriangle = m_triangleData.m_batchStartLengths[batchIndex].start;
+ int numTriangles = m_triangleData.m_batchStartLengths[batchIndex].length;
+
+ executeUpdateSoftBodies( startTriangle, numTriangles );
+ }
+
+
+ normalizeNormalsAndAreas( numVertices );
+
+
+} // btDX11SoftBodySolver::updateSoftBodies
+
+
+Vectormath::Aos::Vector3 btDX11SoftBodySolver::ProjectOnAxis( const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a )
+{
+ return a*Vectormath::Aos::dot(v, a);
+}
+
+void btDX11SoftBodySolver::ApplyClampedForce( float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce )
+{
+ float dtInverseMass = solverdt*inverseMass;
+ if( Vectormath::Aos::lengthSqr(force * dtInverseMass) > Vectormath::Aos::lengthSqr(vertexVelocity) )
+ {
+ vertexForce -= ProjectOnAxis( vertexVelocity, normalize( force ) )/dtInverseMass;
+ } else {
+ vertexForce += force;
+ }
+}
+
+void btDX11SoftBodySolver::applyForces( float solverdt )
+{
+ using namespace Vectormath::Aos;
+
+
+ // Ensure data is on accelerator
+ m_vertexData.moveToAccelerator();
+ m_dx11PerClothAcceleration.moveToGPU();
+ m_dx11PerClothLiftFactor.moveToGPU();
+ m_dx11PerClothDragFactor.moveToGPU();
+ m_dx11PerClothMediumDensity.moveToGPU();
+ m_dx11PerClothWindVelocity.moveToGPU();
+
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ ApplyForcesCB constBuffer;
+
+ constBuffer.numNodes = m_vertexData.getNumVertices();
+ constBuffer.solverdt = solverdt;
+ constBuffer.epsilon = FLT_EPSILON;
+
+ // Todo: factor this out. Number of nodes is static and sdt might be, too, we can update this just once on setup
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( integrateKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(ApplyForcesCB) );
+ m_dx11Context->Unmap( integrateKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &integrateKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_vertexData.m_dx11ClothIdentifier.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_vertexData.m_dx11VertexNormal.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_vertexData.m_dx11VertexArea.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 3, 1, &(m_vertexData.m_dx11VertexInverseMass.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 4, 1, &(m_dx11PerClothLiftFactor.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 5, 1, &(m_dx11PerClothDragFactor.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 6, 1, &(m_dx11PerClothWindVelocity.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 7, 1, &(m_dx11PerClothAcceleration.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 8, 1, &(m_dx11PerClothMediumDensity.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexForceAccumulator.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexVelocity.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( applyForcesKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks, 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 3, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 4, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 5, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 6, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 7, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 8, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::applyForces
+
+/**
+ * Integrate motion on the solver.
+ */
+void btDX11SoftBodySolver::integrate( float solverdt )
+{
+ // TEMPORARY COPIES
+ m_vertexData.moveToAccelerator();
+
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ IntegrateCB constBuffer;
+
+ constBuffer.numNodes = m_vertexData.getNumVertices();
+ constBuffer.solverdt = solverdt;
+
+ // Todo: factor this out. Number of nodes is static and sdt might be, too, we can update this just once on setup
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( integrateKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(IntegrateCB) );
+ m_dx11Context->Unmap( integrateKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &integrateKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_vertexData.m_dx11VertexInverseMass.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexPosition.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexVelocity.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 2, 1, &(m_vertexData.m_dx11VertexPreviousPosition.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 3, 1, &(m_vertexData.m_dx11VertexForceAccumulator.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( integrateKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks, 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 2, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 3, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::integrate
+
+float btDX11SoftBodySolver::computeTriangleArea(
+ const Vectormath::Aos::Point3 &vertex0,
+ const Vectormath::Aos::Point3 &vertex1,
+ const Vectormath::Aos::Point3 &vertex2 )
+{
+ Vectormath::Aos::Vector3 a = vertex1 - vertex0;
+ Vectormath::Aos::Vector3 b = vertex2 - vertex0;
+ Vectormath::Aos::Vector3 crossProduct = cross(a, b);
+ float area = length( crossProduct );
+ return area;
+} // btDX11SoftBodySolver::computeTriangleArea
+
+
+void btDX11SoftBodySolver::updateBounds()
+{
+ using Vectormath::Aos::Point3;
+ // Interpretation structure for float and int
+
+ struct FPRep {
+ unsigned int mantissa : 23;
+ unsigned int exponent : 8;
+ unsigned int sign : 1;
+ };
+ union FloatAsInt
+ {
+ float floatValue;
+ int intValue;
+ unsigned int uintValue;
+ FPRep fpRep;
+ };
+
+
+ // Update bounds array to min and max int values to allow easy atomics
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ m_perClothMinBounds[softBodyIndex] = UIntVector3( UINT_MAX, UINT_MAX, UINT_MAX );
+ m_perClothMaxBounds[softBodyIndex] = UIntVector3( 0, 0, 0 );
+ }
+
+ m_dx11PerClothMinBounds.moveToGPU();
+ m_dx11PerClothMaxBounds.moveToGPU();
+
+
+ computeBounds( );
+
+
+ m_dx11PerClothMinBounds.moveFromGPU();
+ m_dx11PerClothMaxBounds.moveFromGPU();
+
+
+
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ UIntVector3 minBoundUInt = m_perClothMinBounds[softBodyIndex];
+ UIntVector3 maxBoundUInt = m_perClothMaxBounds[softBodyIndex];
+
+ // Convert back to float
+ FloatAsInt fai;
+
+ btVector3 minBound;
+ fai.uintValue = minBoundUInt.x;
+ fai.uintValue ^= (((fai.uintValue >> 31) - 1) | 0x80000000);
+ minBound.setX( fai.floatValue );
+ fai.uintValue = minBoundUInt.y;
+ fai.uintValue ^= (((fai.uintValue >> 31) - 1) | 0x80000000);
+ minBound.setY( fai.floatValue );
+ fai.uintValue = minBoundUInt.z;
+ fai.uintValue ^= (((fai.uintValue >> 31) - 1) | 0x80000000);
+ minBound.setZ( fai.floatValue );
+
+ btVector3 maxBound;
+ fai.uintValue = maxBoundUInt.x;
+ fai.uintValue ^= (((fai.uintValue >> 31) - 1) | 0x80000000);
+ maxBound.setX( fai.floatValue );
+ fai.uintValue = maxBoundUInt.y;
+ fai.uintValue ^= (((fai.uintValue >> 31) - 1) | 0x80000000);
+ maxBound.setY( fai.floatValue );
+ fai.uintValue = maxBoundUInt.z;
+ fai.uintValue ^= (((fai.uintValue >> 31) - 1) | 0x80000000);
+ maxBound.setZ( fai.floatValue );
+
+ // And finally assign to the soft body
+ m_softBodySet[softBodyIndex]->updateBounds( minBound, maxBound );
+ }
+}
+
+void btDX11SoftBodySolver::updateConstants( float timeStep )
+{
+ using namespace Vectormath::Aos;
+
+ if( m_updateSolverConstants )
+ {
+ m_updateSolverConstants = false;
+
+ // Will have to redo this if we change the structure (tear, maybe) or various other possible changes
+
+ // Initialise link constants
+ const int numLinks = m_linkData.getNumLinks();
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair &vertices( m_linkData.getVertexPair(linkIndex) );
+ m_linkData.getRestLength(linkIndex) = length((m_vertexData.getPosition( vertices.vertex0 ) - m_vertexData.getPosition( vertices.vertex1 )));
+ float invMass0 = m_vertexData.getInverseMass(vertices.vertex0);
+ float invMass1 = m_vertexData.getInverseMass(vertices.vertex1);
+ float linearStiffness = m_linkData.getLinearStiffnessCoefficient(linkIndex);
+ float massLSC = (invMass0 + invMass1)/linearStiffness;
+ m_linkData.getMassLSC(linkIndex) = massLSC;
+ float restLength = m_linkData.getRestLength(linkIndex);
+ float restLengthSquared = restLength*restLength;
+ m_linkData.getRestLengthSquared(linkIndex) = restLengthSquared;
+ }
+ }
+} // btDX11SoftBodySolver::updateConstants
+
+/**
+ * Sort the collision object details array and generate indexing into it for the per-cloth collision object array.
+ */
+void btDX11SoftBodySolver::prepareCollisionConstraints()
+{
+ // First do a simple sort on the collision objects
+ btAlignedObjectArray<int> numObjectsPerClothPrefixSum;
+ btAlignedObjectArray<int> numObjectsPerCloth;
+ numObjectsPerCloth.resize( m_softBodySet.size(), 0 );
+ numObjectsPerClothPrefixSum.resize( m_softBodySet.size(), 0 );
+
+
+ class QuickSortCompare
+ {
+ public:
+
+ bool operator() ( const CollisionShapeDescription& a, const CollisionShapeDescription& b )
+ {
+ return ( a.softBodyIdentifier < b.softBodyIdentifier );
+ }
+ };
+
+ QuickSortCompare comparator;
+ m_collisionObjectDetails.quickSort( comparator );
+
+ // Generating indexing for perClothCollisionObjects
+ // First clear the previous values with the "no collision object for cloth" constant
+ for( int clothIndex = 0; clothIndex < m_perClothCollisionObjects.size(); ++clothIndex )
+ {
+ m_perClothCollisionObjects[clothIndex].firstObject = -1;
+ m_perClothCollisionObjects[clothIndex].endObject = -1;
+ }
+ int currentCloth = 0;
+ int startIndex = 0;
+ for( int collisionObject = 0; collisionObject < m_collisionObjectDetails.size(); ++collisionObject )
+ {
+ int nextCloth = m_collisionObjectDetails[collisionObject].softBodyIdentifier;
+ if( nextCloth != currentCloth )
+ {
+ // Changed cloth in the array
+ // Set the end index and the range is what we need for currentCloth
+ m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
+ m_perClothCollisionObjects[currentCloth].endObject = collisionObject;
+ currentCloth = nextCloth;
+ startIndex = collisionObject;
+ }
+ }
+
+ // And update last cloth
+ m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
+ m_perClothCollisionObjects[currentCloth].endObject = m_collisionObjectDetails.size();
+
+} // btDX11SoftBodySolver::prepareCollisionConstraints
+
+
+void btDX11SoftBodySolver::solveConstraints( float solverdt )
+{
+
+ //std::cerr << "'GPU' solve constraints\n";
+ using Vectormath::Aos::Vector3;
+ using Vectormath::Aos::Point3;
+ using Vectormath::Aos::lengthSqr;
+ using Vectormath::Aos::dot;
+
+ // Prepare links
+ int numLinks = m_linkData.getNumLinks();
+ int numVertices = m_vertexData.getNumVertices();
+
+ float kst = 1.f;
+ float ti = 0.f;
+
+
+ m_dx11PerClothDampingFactor.moveToGPU();
+ m_dx11PerClothVelocityCorrectionCoefficient.moveToGPU();
+
+
+ // Ensure data is on accelerator
+ m_linkData.moveToAccelerator();
+ m_vertexData.moveToAccelerator();
+
+
+ prepareLinks();
+
+ for( int iteration = 0; iteration < m_numberOfVelocityIterations ; ++iteration )
+ {
+ for( int i = 0; i < m_linkData.m_batchStartLengths.size(); ++i )
+ {
+ int startLink = m_linkData.m_batchStartLengths[i].start;
+ int numLinks = m_linkData.m_batchStartLengths[i].length;
+
+ solveLinksForVelocity( startLink, numLinks, kst );
+ }
+ }
+
+
+ prepareCollisionConstraints();
+
+ // Compute new positions from velocity
+ // Also update the previous position so that our position computation is now based on the new position from the velocity solution
+ // rather than based directly on the original positions
+ if( m_numberOfVelocityIterations > 0 )
+ {
+ updateVelocitiesFromPositionsWithVelocities( 1.f/solverdt );
+ } else {
+ updateVelocitiesFromPositionsWithoutVelocities( 1.f/solverdt );
+ }
+
+
+ // Solve drift
+ for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+ {
+ for( int i = 0; i < m_linkData.m_batchStartLengths.size(); ++i )
+ {
+ int startLink = m_linkData.m_batchStartLengths[i].start;
+ int numLinks = m_linkData.m_batchStartLengths[i].length;
+
+ solveLinksForPosition( startLink, numLinks, kst, ti );
+ }
+
+ } // for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+
+ // At this point assume that the force array is blank - we will overwrite it
+ solveCollisionsAndUpdateVelocities( 1.f/solverdt );
+} // btDX11SoftBodySolver::solveConstraints
+
+
+
+
+//////////////////////////////////////
+// Kernel dispatches
+void btDX11SoftBodySolver::prepareLinks()
+{
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ PrepareLinksCB constBuffer;
+
+ constBuffer.numLinks = m_linkData.getNumLinks();
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( prepareLinksKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(PrepareLinksCB) );
+ m_dx11Context->Unmap( prepareLinksKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &prepareLinksKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_linkData.m_dx11Links.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_linkData.m_dx11LinksMassLSC.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_vertexData.m_dx11VertexPreviousPosition.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_linkData.m_dx11LinksLengthRatio.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_linkData.m_dx11LinksCLength.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( prepareLinksKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numLinks + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::prepareLinks
+
+
+void btDX11SoftBodySolver::updatePositionsFromVelocities( float solverdt )
+{
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ UpdatePositionsFromVelocitiesCB constBuffer;
+
+ constBuffer.numNodes = m_vertexData.getNumVertices();
+ constBuffer.solverSDT = solverdt;
+
+ // Todo: factor this out. Number of nodes is static and sdt might be, too, we can update this just once on setup
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( updatePositionsFromVelocitiesKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(UpdatePositionsFromVelocitiesCB) );
+ m_dx11Context->Unmap( updatePositionsFromVelocitiesKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &updatePositionsFromVelocitiesKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_vertexData.m_dx11VertexVelocity.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexPreviousPosition.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexPosition.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( updatePositionsFromVelocitiesKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks, 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::updatePositionsFromVelocities
+
+void btDX11SoftBodySolver::solveLinksForPosition( int startLink, int numLinks, float kst, float ti )
+{
+ // Copy kernel parameters to GPU
+ SolvePositionsFromLinksKernelCB constBuffer;
+
+ // Set the first link of the batch
+ // and the batch size
+ constBuffer.startLink = startLink;
+ constBuffer.numLinks = numLinks;
+
+ constBuffer.kst = kst;
+ constBuffer.ti = ti;
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( solvePositionsFromLinksKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(SolvePositionsFromLinksKernelCB) );
+ m_dx11Context->Unmap( solvePositionsFromLinksKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &solvePositionsFromLinksKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_linkData.m_dx11Links.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_linkData.m_dx11LinksMassLSC.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_linkData.m_dx11LinksRestLengthSquared.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 3, 1, &(m_vertexData.m_dx11VertexInverseMass.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexPosition.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( solvePositionsFromLinksKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numLinks + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 3, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+
+} // btDX11SoftBodySolver::solveLinksForPosition
+
+void btDX11SoftBodySolver::solveLinksForVelocity( int startLink, int numLinks, float kst )
+{
+ // Copy kernel parameters to GPU
+ VSolveLinksCB constBuffer;
+
+ // Set the first link of the batch
+ // and the batch size
+
+ constBuffer.startLink = startLink;
+ constBuffer.numLinks = numLinks;
+ constBuffer.kst = kst;
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( vSolveLinksKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(VSolveLinksCB) );
+ m_dx11Context->Unmap( vSolveLinksKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &vSolveLinksKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_linkData.m_dx11Links.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_linkData.m_dx11LinksLengthRatio.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_linkData.m_dx11LinksCLength.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 3, 1, &(m_vertexData.m_dx11VertexInverseMass.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexVelocity.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( vSolveLinksKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numLinks + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 3, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SoftBodySolver::solveLinksForVelocity
+
+
+void btDX11SoftBodySolver::updateVelocitiesFromPositionsWithVelocities( float isolverdt )
+{
+ // Copy kernel parameters to GPU
+ UpdateVelocitiesFromPositionsWithVelocitiesCB constBuffer;
+
+ // Set the first link of the batch
+ // and the batch size
+ constBuffer.numNodes = m_vertexData.getNumVertices();
+ constBuffer.isolverdt = isolverdt;
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( updateVelocitiesFromPositionsWithVelocitiesKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(UpdateVelocitiesFromPositionsWithVelocitiesCB) );
+ m_dx11Context->Unmap( updateVelocitiesFromPositionsWithVelocitiesKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &updateVelocitiesFromPositionsWithVelocitiesKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_vertexData.m_dx11VertexPosition.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_vertexData.m_dx11VertexPreviousPosition.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_vertexData.m_dx11ClothIdentifier.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 3, 1, &(m_dx11PerClothVelocityCorrectionCoefficient.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 4, 1, &(m_dx11PerClothDampingFactor.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexVelocity.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexForceAccumulator.getUAV()), NULL );
+
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( updateVelocitiesFromPositionsWithVelocitiesKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 3, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 4, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+
+} // btDX11SoftBodySolver::updateVelocitiesFromPositionsWithVelocities
+
+void btDX11SoftBodySolver::updateVelocitiesFromPositionsWithoutVelocities( float isolverdt )
+{
+ // Copy kernel parameters to GPU
+ UpdateVelocitiesFromPositionsWithoutVelocitiesCB constBuffer;
+
+ // Set the first link of the batch
+ // and the batch size
+ constBuffer.numNodes = m_vertexData.getNumVertices();
+ constBuffer.isolverdt = isolverdt;
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( updateVelocitiesFromPositionsWithoutVelocitiesKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(UpdateVelocitiesFromPositionsWithoutVelocitiesCB) );
+ m_dx11Context->Unmap( updateVelocitiesFromPositionsWithoutVelocitiesKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &updateVelocitiesFromPositionsWithoutVelocitiesKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_vertexData.m_dx11VertexPosition.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_vertexData.m_dx11VertexPreviousPosition.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_vertexData.m_dx11ClothIdentifier.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 3, 1, &(m_dx11PerClothDampingFactor.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexVelocity.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexForceAccumulator.getUAV()), NULL );
+
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( updateVelocitiesFromPositionsWithoutVelocitiesKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 3, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+
+} // btDX11SoftBodySolver::updateVelocitiesFromPositionsWithoutVelocities
+
+
+void btDX11SoftBodySolver::computeBounds( )
+{
+ ComputeBoundsCB constBuffer;
+ m_vertexData.moveToAccelerator();
+
+ // Set the first link of the batch
+ // and the batch size
+ constBuffer.numNodes = m_vertexData.getNumVertices();
+ constBuffer.numSoftBodies = m_softBodySet.size();
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( computeBoundsKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(ComputeBoundsCB) );
+ m_dx11Context->Unmap( computeBoundsKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &computeBoundsKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_vertexData.m_dx11ClothIdentifier.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_vertexData.m_dx11VertexPosition.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_dx11PerClothMinBounds.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_dx11PerClothMaxBounds.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( computeBoundsKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+}
+
+void btDX11SoftBodySolver::solveCollisionsAndUpdateVelocities( float isolverdt )
+{
+
+ // Copy kernel parameters to GPU
+ m_vertexData.moveToAccelerator();
+ m_dx11PerClothFriction.moveToGPU();
+ m_dx11PerClothDampingFactor.moveToGPU();
+ m_dx11PerClothCollisionObjects.moveToGPU();
+ m_dx11CollisionObjectDetails.moveToGPU();
+
+ SolveCollisionsAndUpdateVelocitiesCB constBuffer;
+
+ // Set the first link of the batch
+ // and the batch size
+ constBuffer.numNodes = m_vertexData.getNumVertices();
+ constBuffer.isolverdt = isolverdt;
+
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( solveCollisionsAndUpdateVelocitiesKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(SolveCollisionsAndUpdateVelocitiesCB) );
+ m_dx11Context->Unmap( solveCollisionsAndUpdateVelocitiesKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &solveCollisionsAndUpdateVelocitiesKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_vertexData.m_dx11ClothIdentifier.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_vertexData.m_dx11VertexPreviousPosition.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_dx11PerClothFriction.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 3, 1, &(m_dx11PerClothDampingFactor.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 4, 1, &(m_dx11PerClothCollisionObjects.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 5, 1, &(m_dx11CollisionObjectDetails.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexForceAccumulator.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &(m_vertexData.m_dx11VertexVelocity.getUAV()), NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 2, 1, &(m_vertexData.m_dx11VertexPosition.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( solveCollisionsAndUpdateVelocitiesKernel.kernel, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 3, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 4, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 5, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 1, 1, &pUAViewNULL, NULL );
+ m_dx11Context->CSSetUnorderedAccessViews( 2, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+
+} // btDX11SoftBodySolver::solveCollisionsAndUpdateVelocities
+
+// End kernel dispatches
+/////////////////////////////////////
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+btDX11SoftBodySolver::btAcceleratedSoftBodyInterface *btDX11SoftBodySolver::findSoftBodyInterface( const btSoftBody* const softBody )
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyInterface;
+ }
+ return 0;
+}
+
+const btDX11SoftBodySolver::btAcceleratedSoftBodyInterface * const btDX11SoftBodySolver::findSoftBodyInterface( const btSoftBody* const softBody ) const
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyInterface;
+ }
+ return 0;
+}
+
+int btDX11SoftBodySolver::findSoftBodyIndex( const btSoftBody* const softBody )
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyIndex;
+ }
+ return 1;
+}
+
+
+void btSoftBodySolverOutputDXtoCPU::copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer )
+{
+
+
+ btSoftBodySolver *solver = softBody->getSoftBodySolver();
+ btAssert( solver->getSolverType() == btSoftBodySolver::DX_SOLVER || solver->getSolverType() == btSoftBodySolver::DX_SIMD_SOLVER );
+ btDX11SoftBodySolver *dxSolver = static_cast< btDX11SoftBodySolver * >( solver );
+
+ btDX11SoftBodySolver::btAcceleratedSoftBodyInterface * currentCloth = dxSolver->findSoftBodyInterface( softBody );
+ btSoftBodyVertexDataDX11 &vertexData( dxSolver->m_vertexData );
+
+
+ const int firstVertex = currentCloth->getFirstVertex();
+ const int lastVertex = firstVertex + currentCloth->getNumVertices();
+
+ if( vertexBuffer->getBufferType() == btVertexBufferDescriptor::CPU_BUFFER )
+ {
+ // If we're doing a CPU-buffer copy must copy the data back to the host first
+ vertexData.m_dx11VertexPosition.copyFromGPU();
+ vertexData.m_dx11VertexNormal.copyFromGPU();
+
+ const int firstVertex = currentCloth->getFirstVertex();
+ const int lastVertex = firstVertex + currentCloth->getNumVertices();
+ const btCPUVertexBufferDescriptor *cpuVertexBuffer = static_cast< btCPUVertexBufferDescriptor* >(vertexBuffer);
+ float *basePointer = cpuVertexBuffer->getBasePointer();
+
+ if( vertexBuffer->hasVertexPositions() )
+ {
+ const int vertexOffset = cpuVertexBuffer->getVertexOffset();
+ const int vertexStride = cpuVertexBuffer->getVertexStride();
+ float *vertexPointer = basePointer + vertexOffset;
+
+ for( int vertexIndex = firstVertex; vertexIndex < lastVertex; ++vertexIndex )
+ {
+ Vectormath::Aos::Point3 position = vertexData.getPosition(vertexIndex);
+ *(vertexPointer + 0) = position.getX();
+ *(vertexPointer + 1) = position.getY();
+ *(vertexPointer + 2) = position.getZ();
+ vertexPointer += vertexStride;
+ }
+ }
+ if( vertexBuffer->hasNormals() )
+ {
+ const int normalOffset = cpuVertexBuffer->getNormalOffset();
+ const int normalStride = cpuVertexBuffer->getNormalStride();
+ float *normalPointer = basePointer + normalOffset;
+
+ for( int vertexIndex = firstVertex; vertexIndex < lastVertex; ++vertexIndex )
+ {
+ Vectormath::Aos::Vector3 normal = vertexData.getNormal(vertexIndex);
+ *(normalPointer + 0) = normal.getX();
+ *(normalPointer + 1) = normal.getY();
+ *(normalPointer + 2) = normal.getZ();
+ normalPointer += normalStride;
+ }
+ }
+ }
+} // btDX11SoftBodySolver::outputToVertexBuffers
+
+
+
+bool btSoftBodySolverOutputDXtoDX::checkInitialized()
+{
+ if( !m_shadersInitialized )
+ if( buildShaders() )
+ m_shadersInitialized = true;
+
+ return m_shadersInitialized;
+}
+
+void btSoftBodySolverOutputDXtoDX::releaseKernels()
+{
+ SAFE_RELEASE( outputToVertexArrayWithNormalsKernel.constBuffer );
+ SAFE_RELEASE( outputToVertexArrayWithNormalsKernel.kernel );
+ SAFE_RELEASE( outputToVertexArrayWithoutNormalsKernel.constBuffer );
+ SAFE_RELEASE( outputToVertexArrayWithoutNormalsKernel.kernel );
+
+ m_shadersInitialized = false;
+}
+
+
+bool btSoftBodySolverOutputDXtoDX::buildShaders()
+{
+ // Ensure current kernels are released first
+ releaseKernels();
+
+ bool returnVal = true;
+
+ if( m_shadersInitialized )
+ return true;
+
+
+ outputToVertexArrayWithNormalsKernel = dxFunctions.compileComputeShaderFromString( OutputToVertexArrayHLSLString, "OutputToVertexArrayWithNormalsKernel", sizeof(OutputToVertexArrayCB) );
+ if( !outputToVertexArrayWithNormalsKernel.constBuffer)
+ returnVal = false;
+ outputToVertexArrayWithoutNormalsKernel = dxFunctions.compileComputeShaderFromString( OutputToVertexArrayHLSLString, "OutputToVertexArrayWithoutNormalsKernel", sizeof(OutputToVertexArrayCB) );
+ if( !outputToVertexArrayWithoutNormalsKernel.constBuffer )
+ returnVal = false;
+
+
+ if( returnVal )
+ m_shadersInitialized = true;
+
+ return returnVal;
+}
+
+
+void btSoftBodySolverOutputDXtoDX::copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer )
+{
+
+
+ btSoftBodySolver *solver = softBody->getSoftBodySolver();
+ btAssert( solver->getSolverType() == btSoftBodySolver::DX_SOLVER || solver->getSolverType() == btSoftBodySolver::DX_SIMD_SOLVER );
+ btDX11SoftBodySolver *dxSolver = static_cast< btDX11SoftBodySolver * >( solver );
+ checkInitialized();
+ btDX11SoftBodySolver::btAcceleratedSoftBodyInterface * currentCloth = dxSolver->findSoftBodyInterface( softBody );
+ btSoftBodyVertexDataDX11 &vertexData( dxSolver->m_vertexData );
+
+
+ const int firstVertex = currentCloth->getFirstVertex();
+ const int lastVertex = firstVertex + currentCloth->getNumVertices();
+
+ if( vertexBuffer->getBufferType() == btVertexBufferDescriptor::CPU_BUFFER )
+ {
+ btSoftBodySolverOutputDXtoDX::copySoftBodyToVertexBuffer( softBody, vertexBuffer );
+ } else if( vertexBuffer->getBufferType() == btVertexBufferDescriptor::DX11_BUFFER )
+ {
+ // Do a DX11 copy shader DX to DX copy
+
+ const btDX11VertexBufferDescriptor *dx11VertexBuffer = static_cast< btDX11VertexBufferDescriptor* >(vertexBuffer);
+
+ // No need to batch link solver, it is entirely parallel
+ // Copy kernel parameters to GPU
+ OutputToVertexArrayCB constBuffer;
+ ID3D11ComputeShader* outputToVertexArrayShader = outputToVertexArrayWithoutNormalsKernel.kernel;
+ ID3D11Buffer* outputToVertexArrayConstBuffer = outputToVertexArrayWithoutNormalsKernel.constBuffer;
+
+ constBuffer.startNode = firstVertex;
+ constBuffer.numNodes = currentCloth->getNumVertices();
+ constBuffer.positionOffset = vertexBuffer->getVertexOffset();
+ constBuffer.positionStride = vertexBuffer->getVertexStride();
+ if( vertexBuffer->hasNormals() )
+ {
+ constBuffer.normalOffset = vertexBuffer->getNormalOffset();
+ constBuffer.normalStride = vertexBuffer->getNormalStride();
+ outputToVertexArrayShader = outputToVertexArrayWithNormalsKernel.kernel;
+ outputToVertexArrayConstBuffer = outputToVertexArrayWithNormalsKernel.constBuffer;
+ }
+
+ // TODO: factor this out. Number of nodes is static and sdt might be, too, we can update this just once on setup
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ dxFunctions.m_dx11Context->Map( outputToVertexArrayConstBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(OutputToVertexArrayCB) );
+ dxFunctions.m_dx11Context->Unmap( outputToVertexArrayConstBuffer, 0 );
+ dxFunctions.m_dx11Context->CSSetConstantBuffers( 0, 1, &outputToVertexArrayConstBuffer );
+
+ // Set resources and dispatch
+ dxFunctions.m_dx11Context->CSSetShaderResources( 0, 1, &(vertexData.m_dx11VertexPosition.getSRV()) );
+ dxFunctions.m_dx11Context->CSSetShaderResources( 1, 1, &(vertexData.m_dx11VertexNormal.getSRV()) );
+
+ ID3D11UnorderedAccessView* dx11UAV = dx11VertexBuffer->getDX11UAV();
+ dxFunctions.m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(dx11UAV), NULL );
+
+ // Execute the kernel
+ dxFunctions.m_dx11Context->CSSetShader( outputToVertexArrayShader, NULL, 0 );
+
+ int numBlocks = (constBuffer.numNodes + (128-1)) / 128;
+ dxFunctions.m_dx11Context->Dispatch(numBlocks, 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ dxFunctions.m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ dxFunctions.m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ dxFunctions.m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ dxFunctions.m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+ }
+} // btDX11SoftBodySolver::outputToVertexBuffers
+
+
+
+
+DXFunctions::KernelDesc DXFunctions::compileComputeShaderFromString( const char* shaderString, const char* shaderName, int constBufferSize, D3D10_SHADER_MACRO *compileMacros )
+{
+ const char *cs5String = "cs_5_0";
+
+ HRESULT hr = S_OK;
+ ID3DBlob* pErrorBlob = NULL;
+ ID3DBlob* pBlob = NULL;
+ ID3D11ComputeShader* kernelPointer = 0;
+
+ hr = m_dx11CompileFromMemory(
+ shaderString,
+ strlen(shaderString),
+ shaderName,
+ compileMacros,
+ NULL,
+ shaderName,
+ cs5String,
+ D3D10_SHADER_ENABLE_STRICTNESS,
+ NULL,
+ NULL,
+ &pBlob,
+ &pErrorBlob,
+ NULL
+ );
+
+ if( FAILED(hr) )
+ {
+ if( pErrorBlob ) {
+ btAssert( "Compilation of compute shader failed\n" );
+ char *debugString = (char*)pErrorBlob->GetBufferPointer();
+ OutputDebugStringA( debugString );
+ }
+
+ SAFE_RELEASE( pErrorBlob );
+ SAFE_RELEASE( pBlob );
+
+ DXFunctions::KernelDesc descriptor;
+ descriptor.kernel = 0;
+ descriptor.constBuffer = 0;
+ return descriptor;
+ }
+
+ // Create the Compute Shader
+ hr = m_dx11Device->CreateComputeShader( pBlob->GetBufferPointer(), pBlob->GetBufferSize(), NULL, &kernelPointer );
+ if( FAILED( hr ) )
+ {
+ DXFunctions::KernelDesc descriptor;
+ descriptor.kernel = 0;
+ descriptor.constBuffer = 0;
+ return descriptor;
+ }
+
+ ID3D11Buffer* constBuffer = 0;
+ if( constBufferSize > 0 )
+ {
+ // Create the constant buffer
+ D3D11_BUFFER_DESC constant_buffer_desc;
+ ZeroMemory(&constant_buffer_desc, sizeof(constant_buffer_desc));
+ constant_buffer_desc.ByteWidth = constBufferSize;
+ constant_buffer_desc.Usage = D3D11_USAGE_DYNAMIC;
+ constant_buffer_desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ constant_buffer_desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ m_dx11Device->CreateBuffer(&constant_buffer_desc, NULL, &constBuffer);
+ if( FAILED( hr ) )
+ {
+ KernelDesc descriptor;
+ descriptor.kernel = 0;
+ descriptor.constBuffer = 0;
+ return descriptor;
+ }
+ }
+
+ SAFE_RELEASE( pErrorBlob );
+ SAFE_RELEASE( pBlob );
+
+ DXFunctions::KernelDesc descriptor;
+ descriptor.kernel = kernelPointer;
+ descriptor.constBuffer = constBuffer;
+ return descriptor;
+} // compileComputeShader
+
+
+
+bool btDX11SoftBodySolver::buildShaders()
+{
+ // Ensure current kernels are released first
+ releaseKernels();
+
+ bool returnVal = true;
+
+ if( m_shadersInitialized )
+ return true;
+
+ prepareLinksKernel = dxFunctions.compileComputeShaderFromString( PrepareLinksHLSLString, "PrepareLinksKernel", sizeof(PrepareLinksCB) );
+ if( !prepareLinksKernel.constBuffer )
+ returnVal = false;
+ updatePositionsFromVelocitiesKernel = dxFunctions.compileComputeShaderFromString( UpdatePositionsFromVelocitiesHLSLString, "UpdatePositionsFromVelocitiesKernel", sizeof(UpdatePositionsFromVelocitiesCB) );
+ if( !updatePositionsFromVelocitiesKernel.constBuffer )
+ returnVal = false;
+ solvePositionsFromLinksKernel = dxFunctions.compileComputeShaderFromString( SolvePositionsHLSLString, "SolvePositionsFromLinksKernel", sizeof(SolvePositionsFromLinksKernelCB) );
+ if( !updatePositionsFromVelocitiesKernel.constBuffer )
+ returnVal = false;
+ vSolveLinksKernel = dxFunctions.compileComputeShaderFromString( VSolveLinksHLSLString, "VSolveLinksKernel", sizeof(VSolveLinksCB) );
+ if( !vSolveLinksKernel.constBuffer )
+ returnVal = false;
+ updateVelocitiesFromPositionsWithVelocitiesKernel = dxFunctions.compileComputeShaderFromString( UpdateNodesHLSLString, "updateVelocitiesFromPositionsWithVelocitiesKernel", sizeof(UpdateVelocitiesFromPositionsWithVelocitiesCB) );
+ if( !updateVelocitiesFromPositionsWithVelocitiesKernel.constBuffer )
+ returnVal = false;
+ updateVelocitiesFromPositionsWithoutVelocitiesKernel = dxFunctions.compileComputeShaderFromString( UpdatePositionsHLSLString, "updateVelocitiesFromPositionsWithoutVelocitiesKernel", sizeof(UpdateVelocitiesFromPositionsWithoutVelocitiesCB) );
+ if( !updateVelocitiesFromPositionsWithoutVelocitiesKernel.constBuffer )
+ returnVal = false;
+ integrateKernel = dxFunctions.compileComputeShaderFromString( IntegrateHLSLString, "IntegrateKernel", sizeof(IntegrateCB) );
+ if( !integrateKernel.constBuffer )
+ returnVal = false;
+ applyForcesKernel = dxFunctions.compileComputeShaderFromString( ApplyForcesHLSLString, "ApplyForcesKernel", sizeof(ApplyForcesCB) );
+ if( !applyForcesKernel.constBuffer )
+ returnVal = false;
+ solveCollisionsAndUpdateVelocitiesKernel = dxFunctions.compileComputeShaderFromString( SolveCollisionsAndUpdateVelocitiesHLSLString, "SolveCollisionsAndUpdateVelocitiesKernel", sizeof(SolveCollisionsAndUpdateVelocitiesCB) );
+ if( !solveCollisionsAndUpdateVelocitiesKernel.constBuffer )
+ returnVal = false;
+
+ // TODO: Rename to UpdateSoftBodies
+ resetNormalsAndAreasKernel = dxFunctions.compileComputeShaderFromString( UpdateNormalsHLSLString, "ResetNormalsAndAreasKernel", sizeof(UpdateSoftBodiesCB) );
+ if( !resetNormalsAndAreasKernel.constBuffer )
+ returnVal = false;
+ normalizeNormalsAndAreasKernel = dxFunctions.compileComputeShaderFromString( UpdateNormalsHLSLString, "NormalizeNormalsAndAreasKernel", sizeof(UpdateSoftBodiesCB) );
+ if( !normalizeNormalsAndAreasKernel.constBuffer )
+ returnVal = false;
+ updateSoftBodiesKernel = dxFunctions.compileComputeShaderFromString( UpdateNormalsHLSLString, "UpdateSoftBodiesKernel", sizeof(UpdateSoftBodiesCB) );
+ if( !updateSoftBodiesKernel.constBuffer )
+ returnVal = false;
+
+ computeBoundsKernel = dxFunctions.compileComputeShaderFromString( ComputeBoundsHLSLString, "ComputeBoundsKernel", sizeof(ComputeBoundsCB) );
+ if( !computeBoundsKernel.constBuffer )
+ returnVal = false;
+
+
+
+ if( returnVal )
+ m_shadersInitialized = true;
+
+ return returnVal;
+}
+
+
+static Vectormath::Aos::Transform3 toTransform3( const btTransform &transform )
+{
+ Vectormath::Aos::Transform3 outTransform;
+ outTransform.setCol(0, toVector3(transform.getBasis().getColumn(0)));
+ outTransform.setCol(1, toVector3(transform.getBasis().getColumn(1)));
+ outTransform.setCol(2, toVector3(transform.getBasis().getColumn(2)));
+ outTransform.setCol(3, toVector3(transform.getOrigin()));
+ return outTransform;
+}
+
+
+void btDX11SoftBodySolver::btAcceleratedSoftBodyInterface::updateBounds( const btVector3 &lowerBound, const btVector3 &upperBound )
+{
+ float scalarMargin = this->getSoftBody()->getCollisionShape()->getMargin();
+ btVector3 vectorMargin( scalarMargin, scalarMargin, scalarMargin );
+ m_softBody->m_bounds[0] = lowerBound - vectorMargin;
+ m_softBody->m_bounds[1] = upperBound + vectorMargin;
+}
+
+void btDX11SoftBodySolver::processCollision( btSoftBody*, btSoftBody* )
+{
+
+}
+
+// Add the collision object to the set to deal with for a particular soft body
+void btDX11SoftBodySolver::processCollision( btSoftBody *softBody, btCollisionObject* collisionObject )
+{
+ int softBodyIndex = findSoftBodyIndex( softBody );
+
+ if( softBodyIndex >= 0 )
+ {
+ btCollisionShape *collisionShape = collisionObject->getCollisionShape();
+ float friction = collisionObject->getFriction();
+ int shapeType = collisionShape->getShapeType();
+ if( shapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ // Add to the list of expected collision objects
+ CollisionShapeDescription newCollisionShapeDescription;
+ newCollisionShapeDescription.softBodyIdentifier = softBodyIndex;
+ newCollisionShapeDescription.collisionShapeType = shapeType;
+ // TODO: May need to transpose this matrix either here or in HLSL
+ newCollisionShapeDescription.shapeTransform = toTransform3(collisionObject->getWorldTransform());
+ btCapsuleShape *capsule = static_cast<btCapsuleShape*>( collisionShape );
+ newCollisionShapeDescription.radius = capsule->getRadius();
+ newCollisionShapeDescription.halfHeight = capsule->getHalfHeight();
+ newCollisionShapeDescription.margin = capsule->getMargin();
+ newCollisionShapeDescription.friction = friction;
+ btRigidBody* body = static_cast< btRigidBody* >( collisionObject );
+ newCollisionShapeDescription.linearVelocity = toVector3(body->getLinearVelocity());
+ newCollisionShapeDescription.angularVelocity = toVector3(body->getAngularVelocity());
+ m_collisionObjectDetails.push_back( newCollisionShapeDescription );
+
+ } else {
+ btAssert("Unsupported collision shape type\n");
+ }
+ } else {
+ btAssert("Unknown soft body");
+ }
+} // btDX11SoftBodySolver::processCollision
+
+
+
+void btDX11SoftBodySolver::predictMotion( float timeStep )
+{
+ // Clear the collision shape array for the next frame
+ // Ensure that the DX11 ones are moved off the device so they will be updated correctly
+ m_dx11CollisionObjectDetails.changedOnCPU();
+ m_dx11PerClothCollisionObjects.changedOnCPU();
+ m_collisionObjectDetails.clear();
+
+ // Fill the force arrays with current acceleration data etc
+ m_perClothWindVelocity.resize( m_softBodySet.size() );
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = m_softBodySet[softBodyIndex]->getSoftBody();
+
+ m_perClothWindVelocity[softBodyIndex] = toVector3(softBody->getWindVelocity());
+ }
+ m_dx11PerClothWindVelocity.changedOnCPU();
+
+ // Apply forces that we know about to the cloths
+ applyForces( timeStep * getTimeScale() );
+
+ // Itegrate motion for all soft bodies dealt with by the solver
+ integrate( timeStep * getTimeScale() );
+
+ // Update bounds
+ // Will update the bounds for all softBodies being dealt with by the solver and
+ // set the values in the btSoftBody object
+ updateBounds();
+
+ // End prediction work for solvers
+}
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.h
new file mode 100644
index 00000000..6721e35b
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11.h
@@ -0,0 +1,679 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_ACCELERATED_SOFT_BODY_DX11_SOLVER_H
+#define BT_ACCELERATED_SOFT_BODY_DX11_SOLVER_H
+
+
+#include "vectormath/vmInclude.h"
+#include "BulletSoftBody/btSoftBodySolvers.h"
+#include "btSoftBodySolverVertexBuffer_DX11.h"
+#include "btSoftBodySolverLinkData_DX11.h"
+#include "btSoftBodySolverVertexData_DX11.h"
+#include "btSoftBodySolverTriangleData_DX11.h"
+
+
+
+class DXFunctions
+{
+public:
+
+ typedef HRESULT (WINAPI * CompileFromMemoryFunc)(LPCSTR,SIZE_T,LPCSTR,const D3D10_SHADER_MACRO*,LPD3D10INCLUDE,LPCSTR,LPCSTR,UINT,UINT,ID3DX11ThreadPump*,ID3D10Blob**,ID3D10Blob**,HRESULT*);
+
+ ID3D11Device * m_dx11Device;
+ ID3D11DeviceContext* m_dx11Context;
+ CompileFromMemoryFunc m_dx11CompileFromMemory;
+
+ DXFunctions(ID3D11Device *dx11Device, ID3D11DeviceContext* dx11Context, CompileFromMemoryFunc dx11CompileFromMemory) :
+ m_dx11Device( dx11Device ),
+ m_dx11Context( dx11Context ),
+ m_dx11CompileFromMemory( dx11CompileFromMemory )
+ {
+
+ }
+
+ class KernelDesc
+ {
+ protected:
+
+
+ public:
+ ID3D11ComputeShader* kernel;
+ ID3D11Buffer* constBuffer;
+
+ KernelDesc()
+ {
+ kernel = 0;
+ constBuffer = 0;
+ }
+
+ virtual ~KernelDesc()
+ {
+ // TODO: this should probably destroy its kernel but we need to be careful
+ // in case KernelDescs are copied
+ }
+ };
+
+ /**
+ * Compile a compute shader kernel from a string and return the appropriate KernelDesc object.
+ */
+ KernelDesc compileComputeShaderFromString( const char* shaderString, const char* shaderName, int constBufferSize, D3D10_SHADER_MACRO *compileMacros = 0 );
+
+};
+
+class btDX11SoftBodySolver : public btSoftBodySolver
+{
+protected:
+ /**
+ * Entry in the collision shape array.
+ * Specifies the shape type, the transform matrix and the necessary details of the collisionShape.
+ */
+ struct CollisionShapeDescription
+ {
+ Vectormath::Aos::Transform3 shapeTransform;
+ Vectormath::Aos::Vector3 linearVelocity;
+ Vectormath::Aos::Vector3 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+ // Both needed for capsule
+ float radius;
+ float halfHeight;
+
+ float margin;
+ float friction;
+
+ CollisionShapeDescription()
+ {
+ collisionShapeType = 0;
+ margin = 0;
+ friction = 0;
+ }
+ };
+
+ struct UIntVector3
+ {
+ UIntVector3()
+ {
+ x = 0;
+ y = 0;
+ z = 0;
+ _padding = 0;
+ }
+
+ UIntVector3( unsigned int x_, unsigned int y_, unsigned int z_ )
+ {
+ x = x_;
+ y = y_;
+ z = z_;
+ _padding = 0;
+ }
+
+ unsigned int x;
+ unsigned int y;
+ unsigned int z;
+ unsigned int _padding;
+ };
+
+
+
+public:
+ /**
+ * SoftBody class to maintain information about a soft body instance
+ * within a solver.
+ * This data addresses the main solver arrays.
+ */
+ class btAcceleratedSoftBodyInterface
+ {
+ protected:
+ /** Current number of vertices that are part of this cloth */
+ int m_numVertices;
+ /** Maximum number of vertices allocated to be part of this cloth */
+ int m_maxVertices;
+ /** Current number of triangles that are part of this cloth */
+ int m_numTriangles;
+ /** Maximum number of triangles allocated to be part of this cloth */
+ int m_maxTriangles;
+ /** Index of first vertex in the world allocated to this cloth */
+ int m_firstVertex;
+ /** Index of first triangle in the world allocated to this cloth */
+ int m_firstTriangle;
+ /** Index of first link in the world allocated to this cloth */
+ int m_firstLink;
+ /** Maximum number of links allocated to this cloth */
+ int m_maxLinks;
+ /** Current number of links allocated to this cloth */
+ int m_numLinks;
+
+ /** The actual soft body this data represents */
+ btSoftBody *m_softBody;
+
+
+ public:
+ btAcceleratedSoftBodyInterface( btSoftBody *softBody ) :
+ m_softBody( softBody )
+ {
+ m_numVertices = 0;
+ m_maxVertices = 0;
+ m_numTriangles = 0;
+ m_maxTriangles = 0;
+ m_firstVertex = 0;
+ m_firstTriangle = 0;
+ m_firstLink = 0;
+ m_maxLinks = 0;
+ m_numLinks = 0;
+ }
+ int getNumVertices() const
+ {
+ return m_numVertices;
+ }
+
+ int getNumTriangles() const
+ {
+ return m_numTriangles;
+ }
+
+ int getMaxVertices() const
+ {
+ return m_maxVertices;
+ }
+
+ int getMaxTriangles() const
+ {
+ return m_maxTriangles;
+ }
+
+ int getFirstVertex() const
+ {
+ return m_firstVertex;
+ }
+
+ int getFirstTriangle() const
+ {
+ return m_firstTriangle;
+ }
+
+
+ /**
+ * Update the bounds in the btSoftBody object
+ */
+ void updateBounds( const btVector3 &lowerBound, const btVector3 &upperBound );
+
+ // TODO: All of these set functions will have to do checks and
+ // update the world because restructuring of the arrays will be necessary
+ // Reasonable use of "friend"?
+ void setNumVertices( int numVertices )
+ {
+ m_numVertices = numVertices;
+ }
+
+ void setNumTriangles( int numTriangles )
+ {
+ m_numTriangles = numTriangles;
+ }
+
+ void setMaxVertices( int maxVertices )
+ {
+ m_maxVertices = maxVertices;
+ }
+
+ void setMaxTriangles( int maxTriangles )
+ {
+ m_maxTriangles = maxTriangles;
+ }
+
+ void setFirstVertex( int firstVertex )
+ {
+ m_firstVertex = firstVertex;
+ }
+
+ void setFirstTriangle( int firstTriangle )
+ {
+ m_firstTriangle = firstTriangle;
+ }
+
+ void setMaxLinks( int maxLinks )
+ {
+ m_maxLinks = maxLinks;
+ }
+
+ void setNumLinks( int numLinks )
+ {
+ m_numLinks = numLinks;
+ }
+
+ void setFirstLink( int firstLink )
+ {
+ m_firstLink = firstLink;
+ }
+
+ int getMaxLinks()
+ {
+ return m_maxLinks;
+ }
+
+ int getNumLinks()
+ {
+ return m_numLinks;
+ }
+
+ int getFirstLink()
+ {
+ return m_firstLink;
+ }
+
+ btSoftBody* getSoftBody()
+ {
+ return m_softBody;
+ }
+
+ };
+
+
+ struct CollisionObjectIndices
+ {
+ CollisionObjectIndices( int f, int e )
+ {
+ firstObject = f;
+ endObject = e;
+ }
+
+ int firstObject;
+ int endObject;
+ };
+
+
+
+
+
+ struct PrepareLinksCB
+ {
+ int numLinks;
+ int padding0;
+ int padding1;
+ int padding2;
+ };
+
+ struct SolvePositionsFromLinksKernelCB
+ {
+ int startLink;
+ int numLinks;
+ float kst;
+ float ti;
+ };
+
+ struct IntegrateCB
+ {
+ int numNodes;
+ float solverdt;
+ int padding1;
+ int padding2;
+ };
+
+ struct UpdatePositionsFromVelocitiesCB
+ {
+ int numNodes;
+ float solverSDT;
+ int padding1;
+ int padding2;
+ };
+
+ struct UpdateVelocitiesFromPositionsWithoutVelocitiesCB
+ {
+ int numNodes;
+ float isolverdt;
+ int padding1;
+ int padding2;
+ };
+
+ struct UpdateVelocitiesFromPositionsWithVelocitiesCB
+ {
+ int numNodes;
+ float isolverdt;
+ int padding1;
+ int padding2;
+ };
+
+ struct UpdateSoftBodiesCB
+ {
+ int numNodes;
+ int startFace;
+ int numFaces;
+ float epsilon;
+ };
+
+
+ struct ApplyForcesCB
+ {
+ unsigned int numNodes;
+ float solverdt;
+ float epsilon;
+ int padding3;
+ };
+
+ struct AddVelocityCB
+ {
+ int startNode;
+ int lastNode;
+ float velocityX;
+ float velocityY;
+ float velocityZ;
+ int padding1;
+ int padding2;
+ int padding3;
+ };
+
+ struct VSolveLinksCB
+ {
+ int startLink;
+ int numLinks;
+ float kst;
+ int padding;
+ };
+
+ struct ComputeBoundsCB
+ {
+ int numNodes;
+ int numSoftBodies;
+ int padding1;
+ int padding2;
+ };
+
+ struct SolveCollisionsAndUpdateVelocitiesCB
+ {
+ unsigned int numNodes;
+ float isolverdt;
+ int padding0;
+ int padding1;
+ };
+
+
+
+
+protected:
+ ID3D11Device * m_dx11Device;
+ ID3D11DeviceContext* m_dx11Context;
+
+ DXFunctions dxFunctions;
+public:
+ /** Link data for all cloths. Note that this will be sorted batch-wise for efficient computation and m_linkAddresses will maintain the addressing. */
+ btSoftBodyLinkDataDX11 m_linkData;
+ btSoftBodyVertexDataDX11 m_vertexData;
+ btSoftBodyTriangleDataDX11 m_triangleData;
+
+protected:
+
+ /** Variable to define whether we need to update solver constants on the next iteration */
+ bool m_updateSolverConstants;
+
+ bool m_shadersInitialized;
+
+ /**
+ * Cloths owned by this solver.
+ * Only our cloths are in this array.
+ */
+ btAlignedObjectArray< btAcceleratedSoftBodyInterface * > m_softBodySet;
+
+ /** Acceleration value to be applied to all non-static vertices in the solver.
+ * Index n is cloth n, array sized by number of cloths in the world not the solver.
+ */
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_perClothAcceleration;
+ btDX11Buffer<Vectormath::Aos::Vector3> m_dx11PerClothAcceleration;
+
+ /** Wind velocity to be applied normal to all non-static vertices in the solver.
+ * Index n is cloth n, array sized by number of cloths in the world not the solver.
+ */
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_perClothWindVelocity;
+ btDX11Buffer<Vectormath::Aos::Vector3> m_dx11PerClothWindVelocity;
+
+ /** Velocity damping factor */
+ btAlignedObjectArray< float > m_perClothDampingFactor;
+ btDX11Buffer<float> m_dx11PerClothDampingFactor;
+
+ /** Velocity correction coefficient */
+ btAlignedObjectArray< float > m_perClothVelocityCorrectionCoefficient;
+ btDX11Buffer<float> m_dx11PerClothVelocityCorrectionCoefficient;
+
+ /** Lift parameter for wind effect on cloth. */
+ btAlignedObjectArray< float > m_perClothLiftFactor;
+ btDX11Buffer<float> m_dx11PerClothLiftFactor;
+
+ /** Drag parameter for wind effect on cloth. */
+ btAlignedObjectArray< float > m_perClothDragFactor;
+ btDX11Buffer<float> m_dx11PerClothDragFactor;
+
+ /** Density of the medium in which each cloth sits */
+ btAlignedObjectArray< float > m_perClothMediumDensity;
+ btDX11Buffer<float> m_dx11PerClothMediumDensity;
+
+
+ /**
+ * Collision shape details: pair of index of first collision shape for the cloth and number of collision objects.
+ */
+ btAlignedObjectArray< CollisionObjectIndices > m_perClothCollisionObjects;
+ btDX11Buffer<CollisionObjectIndices> m_dx11PerClothCollisionObjects;
+
+ /**
+ * Collision shapes being passed across to the cloths in this solver.
+ */
+ btAlignedObjectArray< CollisionShapeDescription > m_collisionObjectDetails;
+ btDX11Buffer< CollisionShapeDescription > m_dx11CollisionObjectDetails;
+
+ /**
+ * Minimum bounds for each cloth.
+ * Updated by GPU and returned for use by broad phase.
+ * These are int vectors as a reminder that they store the int representation of a float, not a float.
+ * Bit 31 is inverted - is floats are stored with int-sortable values.
+ */
+ btAlignedObjectArray< UIntVector3 > m_perClothMinBounds;
+ btDX11Buffer< UIntVector3 > m_dx11PerClothMinBounds;
+
+ /**
+ * Maximum bounds for each cloth.
+ * Updated by GPU and returned for use by broad phase.
+ * These are int vectors as a reminder that they store the int representation of a float, not a float.
+ * Bit 31 is inverted - is floats are stored with int-sortable values.
+ */
+ btAlignedObjectArray< UIntVector3 > m_perClothMaxBounds;
+ btDX11Buffer< UIntVector3 > m_dx11PerClothMaxBounds;
+
+
+ /**
+ * Friction coefficient for each cloth
+ */
+ btAlignedObjectArray< float > m_perClothFriction;
+ btDX11Buffer< float > m_dx11PerClothFriction;
+
+ DXFunctions::KernelDesc prepareLinksKernel;
+ DXFunctions::KernelDesc solvePositionsFromLinksKernel;
+ DXFunctions::KernelDesc vSolveLinksKernel;
+ DXFunctions::KernelDesc integrateKernel;
+ DXFunctions::KernelDesc addVelocityKernel;
+ DXFunctions::KernelDesc updatePositionsFromVelocitiesKernel;
+ DXFunctions::KernelDesc updateVelocitiesFromPositionsWithoutVelocitiesKernel;
+ DXFunctions::KernelDesc updateVelocitiesFromPositionsWithVelocitiesKernel;
+ DXFunctions::KernelDesc solveCollisionsAndUpdateVelocitiesKernel;
+ DXFunctions::KernelDesc resetNormalsAndAreasKernel;
+ DXFunctions::KernelDesc normalizeNormalsAndAreasKernel;
+ DXFunctions::KernelDesc computeBoundsKernel;
+ DXFunctions::KernelDesc updateSoftBodiesKernel;
+
+ DXFunctions::KernelDesc applyForcesKernel;
+
+
+ /**
+ * Integrate motion on the solver.
+ */
+ virtual void integrate( float solverdt );
+ float computeTriangleArea(
+ const Vectormath::Aos::Point3 &vertex0,
+ const Vectormath::Aos::Point3 &vertex1,
+ const Vectormath::Aos::Point3 &vertex2 );
+
+
+ virtual bool buildShaders();
+
+ void resetNormalsAndAreas( int numVertices );
+
+ void normalizeNormalsAndAreas( int numVertices );
+
+ void executeUpdateSoftBodies( int firstTriangle, int numTriangles );
+
+ void prepareCollisionConstraints();
+
+ Vectormath::Aos::Vector3 ProjectOnAxis( const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a );
+
+ void ApplyClampedForce( float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce );
+
+ virtual void applyForces( float solverdt );
+
+ virtual void updateConstants( float timeStep );
+ int findSoftBodyIndex( const btSoftBody* const softBody );
+
+ //////////////////////////////////////
+ // Kernel dispatches
+ virtual void prepareLinks();
+
+ void updatePositionsFromVelocities( float solverdt );
+ void solveLinksForPosition( int startLink, int numLinks, float kst, float ti );
+ void solveLinksForVelocity( int startLink, int numLinks, float kst );
+
+ void updateVelocitiesFromPositionsWithVelocities( float isolverdt );
+ void updateVelocitiesFromPositionsWithoutVelocities( float isolverdt );
+ void computeBounds( );
+ void solveCollisionsAndUpdateVelocities( float isolverdt );
+
+ // End kernel dispatches
+ /////////////////////////////////////
+
+ void updateBounds();
+
+
+ void releaseKernels();
+
+public:
+ btDX11SoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory = &D3DX11CompileFromMemory);
+
+ virtual ~btDX11SoftBodySolver();
+
+
+ virtual SolverTypes getSolverType() const
+ {
+ return DX_SOLVER;
+ }
+
+
+ virtual btSoftBodyLinkData &getLinkData();
+
+ virtual btSoftBodyVertexData &getVertexData();
+
+ virtual btSoftBodyTriangleData &getTriangleData();
+
+
+
+
+
+ btAcceleratedSoftBodyInterface *findSoftBodyInterface( const btSoftBody* const softBody );
+ const btAcceleratedSoftBodyInterface * const findSoftBodyInterface( const btSoftBody* const softBody ) const;
+
+ virtual bool checkInitialized();
+
+ virtual void updateSoftBodies( );
+
+ virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate=false);
+
+ virtual void copyBackToSoftBodies();
+
+ virtual void solveConstraints( float solverdt );
+
+ virtual void predictMotion( float solverdt );
+
+
+ virtual void processCollision( btSoftBody *, btCollisionObject* );
+
+ virtual void processCollision( btSoftBody*, btSoftBody* );
+
+};
+
+
+
+/**
+ * Class to manage movement of data from a solver to a given target.
+ * This version is the DX to CPU version.
+ */
+class btSoftBodySolverOutputDXtoCPU : public btSoftBodySolverOutput
+{
+protected:
+
+public:
+ btSoftBodySolverOutputDXtoCPU()
+ {
+ }
+
+ /** Output current computed vertex data to the vertex buffers for all cloths in the solver. */
+ virtual void copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer );
+};
+
+/**
+ * Class to manage movement of data from a solver to a given target.
+ * This version is the DX to DX version and subclasses DX to CPU so that it works for that too.
+ */
+class btSoftBodySolverOutputDXtoDX : public btSoftBodySolverOutputDXtoCPU
+{
+protected:
+ struct OutputToVertexArrayCB
+ {
+ int startNode;
+ int numNodes;
+ int positionOffset;
+ int positionStride;
+
+ int normalOffset;
+ int normalStride;
+ int padding1;
+ int padding2;
+ };
+
+ DXFunctions dxFunctions;
+ DXFunctions::KernelDesc outputToVertexArrayWithNormalsKernel;
+ DXFunctions::KernelDesc outputToVertexArrayWithoutNormalsKernel;
+
+
+ bool m_shadersInitialized;
+
+ bool checkInitialized();
+ bool buildShaders();
+ void releaseKernels();
+
+public:
+ btSoftBodySolverOutputDXtoDX(ID3D11Device *dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory = &D3DX11CompileFromMemory) :
+ dxFunctions( dx11Device, dx11Context, dx11CompileFromMemory )
+ {
+ m_shadersInitialized = false;
+ }
+
+ ~btSoftBodySolverOutputDXtoDX()
+ {
+ releaseKernels();
+ }
+
+ /** Output current computed vertex data to the vertex buffers for all cloths in the solver. */
+ virtual void copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer );
+};
+
+#endif // #ifndef BT_ACCELERATED_SOFT_BODY_DX11_SOLVER_H
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.cpp b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.cpp
new file mode 100644
index 00000000..8229d1a2
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.cpp
@@ -0,0 +1,1051 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <cstdio>
+
+
+#define WAVEFRONT_SIZE 32
+#define WAVEFRONT_BLOCK_MULTIPLIER 2
+#define GROUP_SIZE (WAVEFRONT_SIZE*WAVEFRONT_BLOCK_MULTIPLIER)
+#define LINKS_PER_SIMD_LANE 16
+
+#define STRINGIFY( S ) STRINGIFY2( S )
+#define STRINGIFY2( S ) #S
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "vectormath/vmInclude.h"
+
+#include "btSoftBodySolverLinkData_DX11SIMDAware.h"
+#include "btSoftBodySolver_DX11SIMDAware.h"
+#include "btSoftBodySolverVertexBuffer_DX11.h"
+#include "BulletSoftBody/btSoftBody.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+
+#define MSTRINGIFY(A) #A
+static char* UpdatePositionsFromVelocitiesHLSLString =
+#include "HLSL/UpdatePositionsFromVelocities.hlsl"
+static char* SolvePositionsSIMDBatchedHLSLString =
+#include "HLSL/SolvePositionsSIMDBatched.hlsl"
+static char* UpdateNodesHLSLString =
+#include "HLSL/UpdateNodes.hlsl"
+static char* UpdatePositionsHLSLString =
+#include "HLSL/UpdatePositions.hlsl"
+static char* UpdateConstantsHLSLString =
+#include "HLSL/UpdateConstants.hlsl"
+static char* IntegrateHLSLString =
+#include "HLSL/Integrate.hlsl"
+static char* ApplyForcesHLSLString =
+#include "HLSL/ApplyForces.hlsl"
+static char* UpdateNormalsHLSLString =
+#include "HLSL/UpdateNormals.hlsl"
+static char* OutputToVertexArrayHLSLString =
+#include "HLSL/OutputToVertexArray.hlsl"
+static char* VSolveLinksHLSLString =
+#include "HLSL/VSolveLinks.hlsl"
+static char* ComputeBoundsHLSLString =
+#include "HLSL/ComputeBounds.hlsl"
+static char* SolveCollisionsAndUpdateVelocitiesHLSLString =
+#include "HLSL/solveCollisionsAndUpdateVelocitiesSIMDBatched.hlsl"
+
+
+
+btSoftBodyLinkDataDX11SIMDAware::btSoftBodyLinkDataDX11SIMDAware( ID3D11Device *d3dDevice, ID3D11DeviceContext *d3dDeviceContext ) :
+ m_d3dDevice( d3dDevice ),
+ m_d3dDeviceContext( d3dDeviceContext ),
+ m_wavefrontSize( WAVEFRONT_SIZE ),
+ m_linksPerWorkItem( LINKS_PER_SIMD_LANE ),
+ m_maxBatchesWithinWave( 0 ),
+ m_maxLinksPerWavefront( m_wavefrontSize * m_linksPerWorkItem ),
+ m_numWavefronts( 0 ),
+ m_maxVertex( 0 ),
+ m_dx11NumBatchesAndVerticesWithinWaves( d3dDevice, d3dDeviceContext, &m_numBatchesAndVerticesWithinWaves, true ),
+ m_dx11WavefrontVerticesGlobalAddresses( d3dDevice, d3dDeviceContext, &m_wavefrontVerticesGlobalAddresses, true ),
+ m_dx11LinkVerticesLocalAddresses( d3dDevice, d3dDeviceContext, &m_linkVerticesLocalAddresses, true ),
+ m_dx11LinkStrength( d3dDevice, d3dDeviceContext, &m_linkStrength, true ),
+ m_dx11LinksMassLSC( d3dDevice, d3dDeviceContext, &m_linksMassLSC, true ),
+ m_dx11LinksRestLengthSquared( d3dDevice, d3dDeviceContext, &m_linksRestLengthSquared, true ),
+ m_dx11LinksRestLength( d3dDevice, d3dDeviceContext, &m_linksRestLength, true ),
+ m_dx11LinksMaterialLinearStiffnessCoefficient( d3dDevice, d3dDeviceContext, &m_linksMaterialLinearStiffnessCoefficient, true )
+{
+ m_d3dDevice = d3dDevice;
+ m_d3dDeviceContext = d3dDeviceContext;
+}
+
+btSoftBodyLinkDataDX11SIMDAware::~btSoftBodyLinkDataDX11SIMDAware()
+{
+}
+
+static Vectormath::Aos::Vector3 toVector3( const btVector3 &vec )
+{
+ Vectormath::Aos::Vector3 outVec( vec.getX(), vec.getY(), vec.getZ() );
+ return outVec;
+}
+
+void btSoftBodyLinkDataDX11SIMDAware::createLinks( int numLinks )
+{
+ int previousSize = m_links.size();
+ int newSize = previousSize + numLinks;
+
+ btSoftBodyLinkData::createLinks( numLinks );
+
+ // Resize the link addresses array as well
+ m_linkAddresses.resize( newSize );
+}
+
+void btSoftBodyLinkDataDX11SIMDAware::setLinkAt( const btSoftBodyLinkData::LinkDescription &link, int linkIndex )
+{
+ btSoftBodyLinkData::setLinkAt( link, linkIndex );
+
+ if( link.getVertex0() > m_maxVertex )
+ m_maxVertex = link.getVertex0();
+ if( link.getVertex1() > m_maxVertex )
+ m_maxVertex = link.getVertex1();
+
+ // Set the link index correctly for initialisation
+ m_linkAddresses[linkIndex] = linkIndex;
+}
+
+bool btSoftBodyLinkDataDX11SIMDAware::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyLinkDataDX11SIMDAware::moveToAccelerator()
+{
+ bool success = true;
+
+ success = success && m_dx11NumBatchesAndVerticesWithinWaves.moveToGPU();
+ success = success && m_dx11WavefrontVerticesGlobalAddresses.moveToGPU();
+ success = success && m_dx11LinkVerticesLocalAddresses.moveToGPU();
+ success = success && m_dx11LinkStrength.moveToGPU();
+ success = success && m_dx11LinksMassLSC.moveToGPU();
+ success = success && m_dx11LinksRestLengthSquared.moveToGPU();
+ success = success && m_dx11LinksRestLength.moveToGPU();
+ success = success && m_dx11LinksMaterialLinearStiffnessCoefficient.moveToGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+bool btSoftBodyLinkDataDX11SIMDAware::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_dx11NumBatchesAndVerticesWithinWaves.moveFromGPU();
+ success = success && m_dx11WavefrontVerticesGlobalAddresses.moveFromGPU();
+ success = success && m_dx11LinkVerticesLocalAddresses.moveFromGPU();
+ success = success && m_dx11LinkStrength.moveFromGPU();
+ success = success && m_dx11LinksMassLSC.moveFromGPU();
+ success = success && m_dx11LinksRestLengthSquared.moveFromGPU();
+ success = success && m_dx11LinksRestLength.moveFromGPU();
+ success = success && m_dx11LinksMaterialLinearStiffnessCoefficient.moveFromGPU();
+
+ if( success )
+ m_onGPU = false;
+
+ return success;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+btDX11SIMDAwareSoftBodySolver::btDX11SIMDAwareSoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory) :
+ btDX11SoftBodySolver( dx11Device, dx11Context, dx11CompileFromMemory ),
+ m_linkData(m_dx11Device, m_dx11Context)
+{
+ // Initial we will clearly need to update solver constants
+ // For now this is global for the cloths linked with this solver - we should probably make this body specific
+ // for performance in future once we understand more clearly when constants need to be updated
+ m_updateSolverConstants = true;
+
+ m_shadersInitialized = false;
+}
+
+btDX11SIMDAwareSoftBodySolver::~btDX11SIMDAwareSoftBodySolver()
+{
+ releaseKernels();
+}
+
+
+btSoftBodyLinkData &btDX11SIMDAwareSoftBodySolver::getLinkData()
+{
+ // TODO: Consider setting link data to "changed" here
+ return m_linkData;
+}
+
+
+
+void btDX11SIMDAwareSoftBodySolver::optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate)
+{
+ if(forceUpdate || m_softBodySet.size() != softBodies.size() )
+ {
+ // Have a change in the soft body set so update, reloading all the data
+ getVertexData().clear();
+ getTriangleData().clear();
+ getLinkData().clear();
+ m_softBodySet.resize(0);
+
+
+ for( int softBodyIndex = 0; softBodyIndex < softBodies.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = softBodies[ softBodyIndex ];
+ using Vectormath::Aos::Matrix3;
+ using Vectormath::Aos::Point3;
+
+ // Create SoftBody that will store the information within the solver
+ btAcceleratedSoftBodyInterface *newSoftBody = new btAcceleratedSoftBodyInterface( softBody );
+ m_softBodySet.push_back( newSoftBody );
+
+ m_perClothAcceleration.push_back( toVector3(softBody->getWorldInfo()->m_gravity) );
+ m_perClothDampingFactor.push_back(softBody->m_cfg.kDP);
+ m_perClothVelocityCorrectionCoefficient.push_back( softBody->m_cfg.kVCF );
+ m_perClothLiftFactor.push_back( softBody->m_cfg.kLF );
+ m_perClothDragFactor.push_back( softBody->m_cfg.kDG );
+ m_perClothMediumDensity.push_back(softBody->getWorldInfo()->air_density);
+ // Simple init values. Actually we'll put 0 and -1 into them at the appropriate time
+ m_perClothMinBounds.push_back( UIntVector3( 0, 0, 0 ) );
+ m_perClothMaxBounds.push_back( UIntVector3( UINT_MAX, UINT_MAX, UINT_MAX ) );
+ m_perClothFriction.push_back( softBody->getFriction() );
+ m_perClothCollisionObjects.push_back( CollisionObjectIndices(-1, -1) );
+
+ // Add space for new vertices and triangles in the default solver for now
+ // TODO: Include space here for tearing too later
+ int firstVertex = getVertexData().getNumVertices();
+ int numVertices = softBody->m_nodes.size();
+ // Round maxVertices to a multiple of the workgroup size so we know we're safe to run over in a given group
+ // maxVertices can be increased to allow tearing, but should be used sparingly because these extra verts will always be processed
+ int maxVertices = GROUP_SIZE*((numVertices+GROUP_SIZE)/GROUP_SIZE);
+ // Allocate space for new vertices in all the vertex arrays
+ getVertexData().createVertices( numVertices, softBodyIndex, maxVertices );
+
+ int firstTriangle = getTriangleData().getNumTriangles();
+ int numTriangles = softBody->m_faces.size();
+ int maxTriangles = numTriangles;
+ getTriangleData().createTriangles( maxTriangles );
+
+ // Copy vertices from softbody into the solver
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ Point3 multPoint(softBody->m_nodes[vertex].m_x.getX(), softBody->m_nodes[vertex].m_x.getY(), softBody->m_nodes[vertex].m_x.getZ());
+ btSoftBodyVertexData::VertexDescription desc;
+
+ // TODO: Position in the softbody might be pre-transformed
+ // or we may need to adapt for the pose.
+ //desc.setPosition( cloth.getMeshTransform()*multPoint );
+ desc.setPosition( multPoint );
+
+ float vertexInverseMass = softBody->m_nodes[vertex].m_im;
+ desc.setInverseMass(vertexInverseMass);
+ getVertexData().setVertexAt( desc, firstVertex + vertex );
+ }
+
+ // Copy triangles similarly
+ // We're assuming here that vertex indices are based on the firstVertex rather than the entire scene
+ for( int triangle = 0; triangle < numTriangles; ++triangle )
+ {
+ // Note that large array storage is relative to the array not to the cloth
+ // So we need to add firstVertex to each value
+ int vertexIndex0 = (softBody->m_faces[triangle].m_n[0] - &(softBody->m_nodes[0]));
+ int vertexIndex1 = (softBody->m_faces[triangle].m_n[1] - &(softBody->m_nodes[0]));
+ int vertexIndex2 = (softBody->m_faces[triangle].m_n[2] - &(softBody->m_nodes[0]));
+ btSoftBodyTriangleData::TriangleDescription newTriangle(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, vertexIndex2 + firstVertex);
+ getTriangleData().setTriangleAt( newTriangle, firstTriangle + triangle );
+
+ // Increase vertex triangle counts for this triangle
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex0)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex1)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex2)++;
+ }
+
+ int firstLink = getLinkData().getNumLinks();
+ int numLinks = softBody->m_links.size();
+ int maxLinks = numLinks;
+
+ // Allocate space for the links
+ getLinkData().createLinks( numLinks );
+
+ // Add the links
+ for( int link = 0; link < numLinks; ++link )
+ {
+ int vertexIndex0 = softBody->m_links[link].m_n[0] - &(softBody->m_nodes[0]);
+ int vertexIndex1 = softBody->m_links[link].m_n[1] - &(softBody->m_nodes[0]);
+
+ btSoftBodyLinkData::LinkDescription newLink(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, softBody->m_links[link].m_material->m_kLST);
+ newLink.setLinkStrength(1.f);
+ getLinkData().setLinkAt(newLink, firstLink + link);
+ }
+
+ newSoftBody->setFirstVertex( firstVertex );
+ newSoftBody->setFirstTriangle( firstTriangle );
+ newSoftBody->setNumVertices( numVertices );
+ newSoftBody->setMaxVertices( maxVertices );
+ newSoftBody->setNumTriangles( numTriangles );
+ newSoftBody->setMaxTriangles( maxTriangles );
+ newSoftBody->setFirstLink( firstLink );
+ newSoftBody->setNumLinks( numLinks );
+ }
+
+
+
+ updateConstants(0.f);
+
+
+ m_linkData.generateBatches();
+ m_triangleData.generateBatches();
+
+
+ // Build the shaders to match the batching parameters
+ buildShaders();
+ }
+
+}
+
+
+
+void btDX11SIMDAwareSoftBodySolver::solveConstraints( float solverdt )
+{
+
+ //std::cerr << "'GPU' solve constraints\n";
+ using Vectormath::Aos::Vector3;
+ using Vectormath::Aos::Point3;
+ using Vectormath::Aos::lengthSqr;
+ using Vectormath::Aos::dot;
+
+ // Prepare links
+ int numLinks = m_linkData.getNumLinks();
+ int numVertices = m_vertexData.getNumVertices();
+
+ float kst = 1.f;
+ float ti = 0.f;
+
+
+ m_dx11PerClothDampingFactor.moveToGPU();
+ m_dx11PerClothVelocityCorrectionCoefficient.moveToGPU();
+
+
+
+ // Ensure data is on accelerator
+ m_linkData.moveToAccelerator();
+ m_vertexData.moveToAccelerator();
+
+
+
+ prepareCollisionConstraints();
+
+
+ // Solve drift
+ for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+ {
+
+ for( int i = 0; i < m_linkData.m_wavefrontBatchStartLengths.size(); ++i )
+ {
+ int startWave = m_linkData.m_wavefrontBatchStartLengths[i].start;
+ int numWaves = m_linkData.m_wavefrontBatchStartLengths[i].length;
+
+ solveLinksForPosition( startWave, numWaves, kst, ti );
+ }
+
+ } // for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+
+
+
+
+ // At this point assume that the force array is blank - we will overwrite it
+ solveCollisionsAndUpdateVelocities( 1.f/solverdt );
+
+} // btDX11SIMDAwareSoftBodySolver::solveConstraints
+
+
+void btDX11SIMDAwareSoftBodySolver::updateConstants( float timeStep )
+{
+ using namespace Vectormath::Aos;
+
+ if( m_updateSolverConstants )
+ {
+ m_updateSolverConstants = false;
+
+ // Will have to redo this if we change the structure (tear, maybe) or various other possible changes
+
+ // Initialise link constants
+ const int numLinks = m_linkData.getNumLinks();
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair &vertices( m_linkData.getVertexPair(linkIndex) );
+ m_linkData.getRestLength(linkIndex) = length((m_vertexData.getPosition( vertices.vertex0 ) - m_vertexData.getPosition( vertices.vertex1 )));
+ float invMass0 = m_vertexData.getInverseMass(vertices.vertex0);
+ float invMass1 = m_vertexData.getInverseMass(vertices.vertex1);
+ float linearStiffness = m_linkData.getLinearStiffnessCoefficient(linkIndex);
+ float massLSC = (invMass0 + invMass1)/linearStiffness;
+ m_linkData.getMassLSC(linkIndex) = massLSC;
+ float restLength = m_linkData.getRestLength(linkIndex);
+ float restLengthSquared = restLength*restLength;
+ m_linkData.getRestLengthSquared(linkIndex) = restLengthSquared;
+ }
+ }
+} // btDX11SIMDAwareSoftBodySolver::updateConstants
+
+//////////////////////////////////////
+// Kernel dispatches
+
+
+void btDX11SIMDAwareSoftBodySolver::solveLinksForPosition( int startWave, int numWaves, float kst, float ti )
+{
+
+
+ m_vertexData.moveToAccelerator();
+ m_linkData.moveToAccelerator();
+
+ // Copy kernel parameters to GPU
+ SolvePositionsFromLinksKernelCB constBuffer;
+
+ // Set the first wave of the batch and the number of waves
+ constBuffer.startWave = startWave;
+ constBuffer.numWaves = numWaves;
+
+ constBuffer.kst = kst;
+ constBuffer.ti = ti;
+
+ D3D11_MAPPED_SUBRESOURCE MappedResource = {0};
+ m_dx11Context->Map( solvePositionsFromLinksKernel.constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource );
+ memcpy( MappedResource.pData, &constBuffer, sizeof(SolvePositionsFromLinksKernelCB) );
+ m_dx11Context->Unmap( solvePositionsFromLinksKernel.constBuffer, 0 );
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &solvePositionsFromLinksKernel.constBuffer );
+
+ // Set resources and dispatch
+ m_dx11Context->CSSetShaderResources( 0, 1, &(m_linkData.m_dx11NumBatchesAndVerticesWithinWaves.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 1, 1, &(m_linkData.m_dx11WavefrontVerticesGlobalAddresses.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 2, 1, &(m_vertexData.m_dx11VertexInverseMass.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 3, 1, &(m_linkData.m_dx11LinkVerticesLocalAddresses.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 4, 1, &(m_linkData.m_dx11LinksMassLSC.getSRV()) );
+ m_dx11Context->CSSetShaderResources( 5, 1, &(m_linkData.m_dx11LinksRestLengthSquared.getSRV()) );
+
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &(m_vertexData.m_dx11VertexPosition.getUAV()), NULL );
+
+ // Execute the kernel
+ m_dx11Context->CSSetShader( solvePositionsFromLinksKernel.kernel, NULL, 0 );
+
+ int numBlocks = ((constBuffer.numWaves + WAVEFRONT_BLOCK_MULTIPLIER - 1) / WAVEFRONT_BLOCK_MULTIPLIER );
+ m_dx11Context->Dispatch(numBlocks , 1, 1 );
+
+ {
+ // Tidy up
+ ID3D11ShaderResourceView* pViewNULL = NULL;
+ m_dx11Context->CSSetShaderResources( 0, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 1, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 2, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 3, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 4, 1, &pViewNULL );
+ m_dx11Context->CSSetShaderResources( 5, 1, &pViewNULL );
+
+ ID3D11UnorderedAccessView* pUAViewNULL = NULL;
+ m_dx11Context->CSSetUnorderedAccessViews( 0, 1, &pUAViewNULL, NULL );
+
+ ID3D11Buffer *pBufferNull = NULL;
+ m_dx11Context->CSSetConstantBuffers( 0, 1, &pBufferNull );
+ }
+} // btDX11SIMDAwareSoftBodySolver::solveLinksForPosition
+
+
+
+// End kernel dispatches
+/////////////////////////////////////
+
+
+
+
+
+
+
+
+
+bool btDX11SIMDAwareSoftBodySolver::buildShaders()
+{
+ // Ensure current kernels are released first
+ releaseKernels();
+
+ bool returnVal = true;
+
+
+ if( m_shadersInitialized )
+ return true;
+
+
+ updatePositionsFromVelocitiesKernel = dxFunctions.compileComputeShaderFromString( UpdatePositionsFromVelocitiesHLSLString, "UpdatePositionsFromVelocitiesKernel", sizeof(UpdatePositionsFromVelocitiesCB) );
+ if( !updatePositionsFromVelocitiesKernel.constBuffer )
+ returnVal = false;
+
+ char maxVerticesPerWavefront[20];
+ char maxBatchesPerWavefront[20];
+ char waveFrontSize[20];
+ char waveFrontBlockMultiplier[20];
+ char blockSize[20];
+
+ sprintf(maxVerticesPerWavefront, "%d", m_linkData.getMaxVerticesPerWavefront());
+ sprintf(maxBatchesPerWavefront, "%d", m_linkData.getMaxBatchesPerWavefront());
+ sprintf(waveFrontSize, "%d", m_linkData.getWavefrontSize());
+ sprintf(waveFrontBlockMultiplier, "%d", WAVEFRONT_BLOCK_MULTIPLIER);
+ sprintf(blockSize, "%d", WAVEFRONT_BLOCK_MULTIPLIER*m_linkData.getWavefrontSize());
+
+ D3D10_SHADER_MACRO solvePositionsMacros[6] = { "MAX_NUM_VERTICES_PER_WAVE", maxVerticesPerWavefront, "MAX_BATCHES_PER_WAVE", maxBatchesPerWavefront, "WAVEFRONT_SIZE", waveFrontSize, "WAVEFRONT_BLOCK_MULTIPLIER", waveFrontBlockMultiplier, "BLOCK_SIZE", blockSize, 0, 0 };
+
+ solvePositionsFromLinksKernel = dxFunctions.compileComputeShaderFromString( SolvePositionsSIMDBatchedHLSLString, "SolvePositionsFromLinksKernel", sizeof(SolvePositionsFromLinksKernelCB), solvePositionsMacros );
+ if( !solvePositionsFromLinksKernel.constBuffer )
+ returnVal = false;
+
+ updateVelocitiesFromPositionsWithVelocitiesKernel = dxFunctions.compileComputeShaderFromString( UpdateNodesHLSLString, "updateVelocitiesFromPositionsWithVelocitiesKernel", sizeof(UpdateVelocitiesFromPositionsWithVelocitiesCB) );
+ if( !updateVelocitiesFromPositionsWithVelocitiesKernel.constBuffer )
+ returnVal = false;
+ updateVelocitiesFromPositionsWithoutVelocitiesKernel = dxFunctions.compileComputeShaderFromString( UpdatePositionsHLSLString, "updateVelocitiesFromPositionsWithoutVelocitiesKernel", sizeof(UpdateVelocitiesFromPositionsWithoutVelocitiesCB));
+ if( !updateVelocitiesFromPositionsWithoutVelocitiesKernel.constBuffer )
+ returnVal = false;
+ integrateKernel = dxFunctions.compileComputeShaderFromString( IntegrateHLSLString, "IntegrateKernel", sizeof(IntegrateCB) );
+ if( !integrateKernel.constBuffer )
+ returnVal = false;
+ applyForcesKernel = dxFunctions.compileComputeShaderFromString( ApplyForcesHLSLString, "ApplyForcesKernel", sizeof(ApplyForcesCB) );
+ if( !applyForcesKernel.constBuffer )
+ returnVal = false;
+ solveCollisionsAndUpdateVelocitiesKernel = dxFunctions.compileComputeShaderFromString( SolveCollisionsAndUpdateVelocitiesHLSLString, "SolveCollisionsAndUpdateVelocitiesKernel", sizeof(SolveCollisionsAndUpdateVelocitiesCB) );
+ if( !solveCollisionsAndUpdateVelocitiesKernel.constBuffer )
+ returnVal = false;
+ resetNormalsAndAreasKernel = dxFunctions.compileComputeShaderFromString( UpdateNormalsHLSLString, "ResetNormalsAndAreasKernel", sizeof(UpdateSoftBodiesCB) );
+ if( !resetNormalsAndAreasKernel.constBuffer )
+ returnVal = false;
+ normalizeNormalsAndAreasKernel = dxFunctions.compileComputeShaderFromString( UpdateNormalsHLSLString, "NormalizeNormalsAndAreasKernel", sizeof(UpdateSoftBodiesCB) );
+ if( !normalizeNormalsAndAreasKernel.constBuffer )
+ returnVal = false;
+ updateSoftBodiesKernel = dxFunctions.compileComputeShaderFromString( UpdateNormalsHLSLString, "UpdateSoftBodiesKernel", sizeof(UpdateSoftBodiesCB) );
+ if( !updateSoftBodiesKernel.constBuffer )
+ returnVal = false;
+
+ computeBoundsKernel = dxFunctions.compileComputeShaderFromString( ComputeBoundsHLSLString, "ComputeBoundsKernel", sizeof(ComputeBoundsCB) );
+ if( !computeBoundsKernel.constBuffer )
+ returnVal = false;
+
+ if( returnVal )
+ m_shadersInitialized = true;
+
+ return returnVal;
+} // btDX11SIMDAwareSoftBodySolver::buildShaders
+
+static Vectormath::Aos::Transform3 toTransform3( const btTransform &transform )
+{
+ Vectormath::Aos::Transform3 outTransform;
+ outTransform.setCol(0, toVector3(transform.getBasis().getColumn(0)));
+ outTransform.setCol(1, toVector3(transform.getBasis().getColumn(1)));
+ outTransform.setCol(2, toVector3(transform.getBasis().getColumn(2)));
+ outTransform.setCol(3, toVector3(transform.getOrigin()));
+ return outTransform;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+static void generateBatchesOfWavefronts( btAlignedObjectArray < btAlignedObjectArray <int> > &linksForWavefronts, btSoftBodyLinkData &linkData, int numVertices, btAlignedObjectArray < btAlignedObjectArray <int> > &wavefrontBatches )
+{
+ // A per-batch map of truth values stating whether a given vertex is in that batch
+ // This allows us to significantly optimize the batching
+ btAlignedObjectArray <btAlignedObjectArray<bool> > mapOfVerticesInBatches;
+
+ for( int waveIndex = 0; waveIndex < linksForWavefronts.size(); ++waveIndex )
+ {
+ btAlignedObjectArray <int> &wavefront( linksForWavefronts[waveIndex] );
+
+ int batch = 0;
+ bool placed = false;
+ while( batch < wavefrontBatches.size() && !placed )
+ {
+ // Test the current batch, see if this wave shares any vertex with the waves in the batch
+ bool foundSharedVertex = false;
+ for( int link = 0; link < wavefront.size(); ++link )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( wavefront[link] );
+ if( (mapOfVerticesInBatches[batch])[vertices.vertex0] || (mapOfVerticesInBatches[batch])[vertices.vertex1] )
+ {
+ foundSharedVertex = true;
+ }
+ }
+
+ if( !foundSharedVertex )
+ {
+ wavefrontBatches[batch].push_back( waveIndex );
+ // Insert vertices into this batch too
+ for( int link = 0; link < wavefront.size(); ++link )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( wavefront[link] );
+ (mapOfVerticesInBatches[batch])[vertices.vertex0] = true;
+ (mapOfVerticesInBatches[batch])[vertices.vertex1] = true;
+ }
+ placed = true;
+ }
+ batch++;
+ }
+ if( batch == wavefrontBatches.size() && !placed )
+ {
+ wavefrontBatches.resize( batch + 1 );
+ wavefrontBatches[batch].push_back( waveIndex );
+
+ // And resize map as well
+ mapOfVerticesInBatches.resize( batch + 1 );
+
+ // Resize maps with total number of vertices
+ mapOfVerticesInBatches[batch].resize( numVertices, false );
+
+ // Insert vertices into this batch too
+ for( int link = 0; link < wavefront.size(); ++link )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( wavefront[link] );
+ (mapOfVerticesInBatches[batch])[vertices.vertex0] = true;
+ (mapOfVerticesInBatches[batch])[vertices.vertex1] = true;
+ }
+ }
+ }
+ mapOfVerticesInBatches.clear();
+}
+
+// Function to remove an object from a vector maintaining correct ordering of the vector
+template< typename T > static void removeFromVector( btAlignedObjectArray< T > &vectorToUpdate, int indexToRemove )
+{
+ int currentSize = vectorToUpdate.size();
+ for( int i = indexToRemove; i < (currentSize-1); ++i )
+ {
+ vectorToUpdate[i] = vectorToUpdate[i+1];
+ }
+ if( currentSize > 0 )
+ vectorToUpdate.resize( currentSize - 1 );
+}
+
+/**
+ * Insert element into vectorToUpdate at index index.
+ */
+template< typename T > static void insertAtIndex( btAlignedObjectArray< T > &vectorToUpdate, int index, T element )
+{
+ vectorToUpdate.resize( vectorToUpdate.size() + 1 );
+ for( int i = (vectorToUpdate.size() - 1); i > index; --i )
+ {
+ vectorToUpdate[i] = vectorToUpdate[i-1];
+ }
+ vectorToUpdate[index] = element;
+}
+
+/**
+ * Insert into btAlignedObjectArray assuming the array is ordered and maintaining both ordering and uniqueness.
+ * ie it treats vectorToUpdate as an ordered set.
+ */
+template< typename T > static void insertUniqueAndOrderedIntoVector( btAlignedObjectArray<T> &vectorToUpdate, T element )
+{
+ int index = 0;
+ while( index < vectorToUpdate.size() && vectorToUpdate[index] < element )
+ {
+ index++;
+ }
+ if( index == vectorToUpdate.size() || vectorToUpdate[index] != element )
+ insertAtIndex( vectorToUpdate, index, element );
+}
+
+static void generateLinksPerVertex( int numVertices, btSoftBodyLinkData &linkData, btAlignedObjectArray< int > &listOfLinksPerVertex, btAlignedObjectArray <int> &numLinksPerVertex, int &maxLinks )
+{
+ for( int linkIndex = 0; linkIndex < linkData.getNumLinks(); ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair nodes( linkData.getVertexPair(linkIndex) );
+ numLinksPerVertex[nodes.vertex0]++;
+ numLinksPerVertex[nodes.vertex1]++;
+ }
+ int maxLinksPerVertex = 0;
+ for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
+ {
+ maxLinksPerVertex = btMax(numLinksPerVertex[vertexIndex], maxLinksPerVertex);
+ }
+ maxLinks = maxLinksPerVertex;
+
+ btAlignedObjectArray< int > linksFoundPerVertex;
+ linksFoundPerVertex.resize( numVertices, 0 );
+
+ listOfLinksPerVertex.resize( maxLinksPerVertex * numVertices );
+
+ for( int linkIndex = 0; linkIndex < linkData.getNumLinks(); ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair nodes( linkData.getVertexPair(linkIndex) );
+ {
+ // Do vertex 0
+ int vertexIndex = nodes.vertex0;
+ int linkForVertex = linksFoundPerVertex[nodes.vertex0];
+ int linkAddress = vertexIndex * maxLinksPerVertex + linkForVertex;
+
+ listOfLinksPerVertex[linkAddress] = linkIndex;
+
+ linksFoundPerVertex[nodes.vertex0] = linkForVertex + 1;
+ }
+ {
+ // Do vertex 1
+ int vertexIndex = nodes.vertex1;
+ int linkForVertex = linksFoundPerVertex[nodes.vertex1];
+ int linkAddress = vertexIndex * maxLinksPerVertex + linkForVertex;
+
+ listOfLinksPerVertex[linkAddress] = linkIndex;
+
+ linksFoundPerVertex[nodes.vertex1] = linkForVertex + 1;
+ }
+ }
+}
+
+static void computeBatchingIntoWavefronts(
+ btSoftBodyLinkData &linkData,
+ int wavefrontSize,
+ int linksPerWorkItem,
+ int maxLinksPerWavefront,
+ btAlignedObjectArray < btAlignedObjectArray <int> > &linksForWavefronts,
+ btAlignedObjectArray< btAlignedObjectArray < btAlignedObjectArray <int> > > &batchesWithinWaves, /* wave, batch, links in batch */
+ btAlignedObjectArray< btAlignedObjectArray< int > > &verticesForWavefronts /* wavefront, vertex */
+ )
+{
+
+
+ // Attempt generation of larger batches of links.
+ btAlignedObjectArray< bool > processedLink;
+ processedLink.resize( linkData.getNumLinks() );
+ btAlignedObjectArray< int > listOfLinksPerVertex;
+ int maxLinksPerVertex = 0;
+
+ // Count num vertices
+ int numVertices = 0;
+ for( int linkIndex = 0; linkIndex < linkData.getNumLinks(); ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair nodes( linkData.getVertexPair(linkIndex) );
+ numVertices = btMax( numVertices, nodes.vertex0 + 1 );
+ numVertices = btMax( numVertices, nodes.vertex1 + 1 );
+ }
+
+ // Need list of links per vertex
+ // Compute valence of each vertex
+ btAlignedObjectArray <int> numLinksPerVertex;
+ numLinksPerVertex.resize(0);
+ numLinksPerVertex.resize( numVertices, 0 );
+
+ generateLinksPerVertex( numVertices, linkData, listOfLinksPerVertex, numLinksPerVertex, maxLinksPerVertex );
+
+
+ // At this point we know what links we have for each vertex so we can start batching
+
+ // We want a vertex to start with, let's go with 0
+ int currentVertex = 0;
+ int linksProcessed = 0;
+
+ btAlignedObjectArray <int> verticesToProcess;
+
+ while( linksProcessed < linkData.getNumLinks() )
+ {
+ // Next wavefront
+ int nextWavefront = linksForWavefronts.size();
+ linksForWavefronts.resize( nextWavefront + 1 );
+ btAlignedObjectArray <int> &linksForWavefront(linksForWavefronts[nextWavefront]);
+ verticesForWavefronts.resize( nextWavefront + 1 );
+ btAlignedObjectArray<int> &vertexSet( verticesForWavefronts[nextWavefront] );
+
+ linksForWavefront.resize(0);
+
+ // Loop to find enough links to fill the wavefront
+ // Stopping if we either run out of links, or fill it
+ while( linksProcessed < linkData.getNumLinks() && linksForWavefront.size() < maxLinksPerWavefront )
+ {
+ // Go through the links for the current vertex
+ for( int link = 0; link < numLinksPerVertex[currentVertex] && linksForWavefront.size() < maxLinksPerWavefront; ++link )
+ {
+ int linkAddress = currentVertex * maxLinksPerVertex + link;
+ int linkIndex = listOfLinksPerVertex[linkAddress];
+
+ // If we have not already processed this link, add it to the wavefront
+ // Claim it as another processed link
+ // Add the vertex at the far end to the list of vertices to process.
+ if( !processedLink[linkIndex] )
+ {
+ linksForWavefront.push_back( linkIndex );
+ linksProcessed++;
+ processedLink[linkIndex] = true;
+ int v0 = linkData.getVertexPair(linkIndex).vertex0;
+ int v1 = linkData.getVertexPair(linkIndex).vertex1;
+ if( v0 == currentVertex )
+ verticesToProcess.push_back( v1 );
+ else
+ verticesToProcess.push_back( v0 );
+ }
+ }
+ if( verticesToProcess.size() > 0 )
+ {
+ // Get the element on the front of the queue and remove it
+ currentVertex = verticesToProcess[0];
+ removeFromVector( verticesToProcess, 0 );
+ } else {
+ // If we've not yet processed all the links, find the first unprocessed one
+ // and select one of its vertices as the current vertex
+ if( linksProcessed < linkData.getNumLinks() )
+ {
+ int searchLink = 0;
+ while( processedLink[searchLink] )
+ searchLink++;
+ currentVertex = linkData.getVertexPair(searchLink).vertex0;
+ }
+ }
+ }
+
+ // We have either finished or filled a wavefront
+ for( int link = 0; link < linksForWavefront.size(); ++link )
+ {
+ int v0 = linkData.getVertexPair( linksForWavefront[link] ).vertex0;
+ int v1 = linkData.getVertexPair( linksForWavefront[link] ).vertex1;
+ insertUniqueAndOrderedIntoVector( vertexSet, v0 );
+ insertUniqueAndOrderedIntoVector( vertexSet, v1 );
+ }
+ // Iterate over links mapped to the wave and batch those
+ // We can run a batch on each cycle trivially
+
+ batchesWithinWaves.resize( batchesWithinWaves.size() + 1 );
+ btAlignedObjectArray < btAlignedObjectArray <int> > &batchesWithinWave( batchesWithinWaves[batchesWithinWaves.size()-1] );
+
+
+ for( int link = 0; link < linksForWavefront.size(); ++link )
+ {
+ int linkIndex = linksForWavefront[link];
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( linkIndex );
+
+ int batch = 0;
+ bool placed = false;
+ while( batch < batchesWithinWave.size() && !placed )
+ {
+ bool foundSharedVertex = false;
+ if( batchesWithinWave[batch].size() >= wavefrontSize )
+ {
+ // If we have already filled this batch, move on to another
+ foundSharedVertex = true;
+ } else {
+ for( int link2 = 0; link2 < batchesWithinWave[batch].size(); ++link2 )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices2 = linkData.getVertexPair( (batchesWithinWave[batch])[link2] );
+
+ if( vertices.vertex0 == vertices2.vertex0 ||
+ vertices.vertex1 == vertices2.vertex0 ||
+ vertices.vertex0 == vertices2.vertex1 ||
+ vertices.vertex1 == vertices2.vertex1 )
+ {
+ foundSharedVertex = true;
+ break;
+ }
+ }
+ }
+ if( !foundSharedVertex )
+ {
+ batchesWithinWave[batch].push_back( linkIndex );
+ placed = true;
+ } else {
+ ++batch;
+ }
+ }
+ if( batch == batchesWithinWave.size() && !placed )
+ {
+ batchesWithinWave.resize( batch + 1 );
+ batchesWithinWave[batch].push_back( linkIndex );
+ }
+ }
+
+ }
+
+}
+
+void btSoftBodyLinkDataDX11SIMDAware::generateBatches()
+{
+ btAlignedObjectArray < btAlignedObjectArray <int> > linksForWavefronts;
+ btAlignedObjectArray < btAlignedObjectArray <int> > wavefrontBatches;
+ btAlignedObjectArray< btAlignedObjectArray < btAlignedObjectArray <int> > > batchesWithinWaves;
+ btAlignedObjectArray< btAlignedObjectArray< int > > verticesForWavefronts; // wavefronts, vertices in wavefront as an ordered set
+
+ // Group the links into wavefronts
+ computeBatchingIntoWavefronts( *this, m_wavefrontSize, m_linksPerWorkItem, m_maxLinksPerWavefront, linksForWavefronts, batchesWithinWaves, verticesForWavefronts );
+
+
+ // Batch the wavefronts
+ generateBatchesOfWavefronts( linksForWavefronts, *this, m_maxVertex, wavefrontBatches );
+
+ m_numWavefronts = linksForWavefronts.size();
+
+ // At this point we have a description of which links we need to process in each wavefront
+
+ // First correctly fill the batch ranges vector
+ int numBatches = wavefrontBatches.size();
+ m_wavefrontBatchStartLengths.resize(0);
+ int prefixSum = 0;
+ for( int batchIndex = 0; batchIndex < numBatches; ++batchIndex )
+ {
+ int wavesInBatch = wavefrontBatches[batchIndex].size();
+ int nextPrefixSum = prefixSum + wavesInBatch;
+ m_wavefrontBatchStartLengths.push_back( BatchPair( prefixSum, nextPrefixSum - prefixSum ) );
+
+ prefixSum += wavesInBatch;
+ }
+
+ // Also find max number of batches within a wave
+ m_maxBatchesWithinWave = 0;
+ m_maxVerticesWithinWave = 0;
+ m_numBatchesAndVerticesWithinWaves.resize( m_numWavefronts );
+ for( int waveIndex = 0; waveIndex < m_numWavefronts; ++waveIndex )
+ {
+ // See if the number of batches in this wave is greater than the current maxium
+ int batchesInCurrentWave = batchesWithinWaves[waveIndex].size();
+ int verticesInCurrentWave = verticesForWavefronts[waveIndex].size();
+ m_maxBatchesWithinWave = btMax( batchesInCurrentWave, m_maxBatchesWithinWave );
+ m_maxVerticesWithinWave = btMax( verticesInCurrentWave, m_maxVerticesWithinWave );
+ }
+
+ // Add padding values both for alignment and as dudd addresses within LDS to compute junk rather than branch around
+ m_maxVerticesWithinWave = 16*((m_maxVerticesWithinWave/16)+2);
+
+ // Now we know the maximum number of vertices per-wave we can resize the global vertices array
+ m_wavefrontVerticesGlobalAddresses.resize( m_maxVerticesWithinWave * m_numWavefronts );
+
+ // Grab backup copies of all the link data arrays for the sorting process
+ btAlignedObjectArray<btSoftBodyLinkData::LinkNodePair> m_links_Backup(m_links);
+ btAlignedObjectArray<float> m_linkStrength_Backup(m_linkStrength);
+ btAlignedObjectArray<float> m_linksMassLSC_Backup(m_linksMassLSC);
+ btAlignedObjectArray<float> m_linksRestLengthSquared_Backup(m_linksRestLengthSquared);
+ //btAlignedObjectArray<Vectormath::Aos::Vector3> m_linksCLength_Backup(m_linksCLength);
+ //btAlignedObjectArray<float> m_linksLengthRatio_Backup(m_linksLengthRatio);
+ btAlignedObjectArray<float> m_linksRestLength_Backup(m_linksRestLength);
+ btAlignedObjectArray<float> m_linksMaterialLinearStiffnessCoefficient_Backup(m_linksMaterialLinearStiffnessCoefficient);
+
+ // Resize to a wavefront sized batch per batch per wave so we get perfectly coherent memory accesses.
+ m_links.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linkVerticesLocalAddresses.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linkStrength.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksMassLSC.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksRestLengthSquared.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksRestLength.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksMaterialLinearStiffnessCoefficient.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+
+ // Then re-order links into wavefront blocks
+
+ // Total number of wavefronts moved. This will decide the ordering of sorted wavefronts.
+ int wavefrontCount = 0;
+
+ // Iterate over batches of wavefronts, then wavefronts in the batch
+ for( int batchIndex = 0; batchIndex < numBatches; ++batchIndex )
+ {
+ btAlignedObjectArray <int> &batch( wavefrontBatches[batchIndex] );
+ int wavefrontsInBatch = batch.size();
+
+
+ for( int wavefrontIndex = 0; wavefrontIndex < wavefrontsInBatch; ++wavefrontIndex )
+ {
+
+ int originalWavefrontIndex = batch[wavefrontIndex];
+ btAlignedObjectArray< int > &wavefrontVertices( verticesForWavefronts[originalWavefrontIndex] );
+ int verticesUsedByWavefront = wavefrontVertices.size();
+
+ // Copy the set of vertices into the correctly structured array for use on the device
+ // Fill the non-vertices with -1s
+ // so we can mask out those reads
+ for( int vertex = 0; vertex < verticesUsedByWavefront; ++vertex )
+ {
+ m_wavefrontVerticesGlobalAddresses[m_maxVerticesWithinWave * wavefrontCount + vertex] = wavefrontVertices[vertex];
+ }
+ for( int vertex = verticesUsedByWavefront; vertex < m_maxVerticesWithinWave; ++vertex )
+ {
+ m_wavefrontVerticesGlobalAddresses[m_maxVerticesWithinWave * wavefrontCount + vertex] = -1;
+ }
+
+ // Obtain the set of batches within the current wavefront
+ btAlignedObjectArray < btAlignedObjectArray <int> > &batchesWithinWavefront( batchesWithinWaves[originalWavefrontIndex] );
+ // Set the size of the batches for use in the solver, correctly ordered
+ NumBatchesVerticesPair batchesAndVertices;
+ batchesAndVertices.numBatches = batchesWithinWavefront.size();
+ batchesAndVertices.numVertices = verticesUsedByWavefront;
+ m_numBatchesAndVerticesWithinWaves[wavefrontCount] = batchesAndVertices;
+
+
+ // Now iterate over batches within the wavefront to structure the links correctly
+ for( int wavefrontBatch = 0; wavefrontBatch < batchesWithinWavefront.size(); ++wavefrontBatch )
+ {
+ btAlignedObjectArray <int> &linksInBatch( batchesWithinWavefront[wavefrontBatch] );
+ int wavefrontBatchSize = linksInBatch.size();
+
+ int batchAddressInTarget = m_maxBatchesWithinWave * m_wavefrontSize * wavefrontCount + m_wavefrontSize * wavefrontBatch;
+
+ for( int linkIndex = 0; linkIndex < wavefrontBatchSize; ++linkIndex )
+ {
+ int originalLinkAddress = linksInBatch[linkIndex];
+ // Reorder simple arrays trivially
+ m_links[batchAddressInTarget + linkIndex] = m_links_Backup[originalLinkAddress];
+ m_linkStrength[batchAddressInTarget + linkIndex] = m_linkStrength_Backup[originalLinkAddress];
+ m_linksMassLSC[batchAddressInTarget + linkIndex] = m_linksMassLSC_Backup[originalLinkAddress];
+ m_linksRestLengthSquared[batchAddressInTarget + linkIndex] = m_linksRestLengthSquared_Backup[originalLinkAddress];
+ m_linksRestLength[batchAddressInTarget + linkIndex] = m_linksRestLength_Backup[originalLinkAddress];
+ m_linksMaterialLinearStiffnessCoefficient[batchAddressInTarget + linkIndex] = m_linksMaterialLinearStiffnessCoefficient_Backup[originalLinkAddress];
+
+ // The local address is more complicated. We need to work out where a given vertex will end up
+ // by searching the set of vertices for this link and using the index as the local address
+ btSoftBodyLinkData::LinkNodePair localPair;
+ btSoftBodyLinkData::LinkNodePair globalPair = m_links[batchAddressInTarget + linkIndex];
+ localPair.vertex0 = wavefrontVertices.findLinearSearch( globalPair.vertex0 );
+ localPair.vertex1 = wavefrontVertices.findLinearSearch( globalPair.vertex1 );
+ m_linkVerticesLocalAddresses[batchAddressInTarget + linkIndex] = localPair;
+ }
+ for( int linkIndex = wavefrontBatchSize; linkIndex < m_wavefrontSize; ++linkIndex )
+ {
+ // Put 0s into these arrays for padding for cleanliness
+ m_links[batchAddressInTarget + linkIndex] = btSoftBodyLinkData::LinkNodePair(0, 0);
+ m_linkStrength[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksMassLSC[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksRestLengthSquared[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksRestLength[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksMaterialLinearStiffnessCoefficient[batchAddressInTarget + linkIndex] = 0.f;
+
+
+ // For local addresses of junk data choose a set of addresses just above the range of valid ones
+ // and cycling tyhrough % 16 so that we don't have bank conficts between all dud addresses
+ // The valid addresses will do scatter and gather in the valid range, the junk ones should happily work
+ // off the end of that range so we need no control
+ btSoftBodyLinkData::LinkNodePair localPair;
+ localPair.vertex0 = verticesUsedByWavefront + (linkIndex % 16);
+ localPair.vertex1 = verticesUsedByWavefront + (linkIndex % 16);
+ m_linkVerticesLocalAddresses[batchAddressInTarget + linkIndex] = localPair;
+ }
+
+ }
+
+
+ wavefrontCount++;
+ }
+
+
+ }
+
+} // void btSoftBodyLinkDataDX11SIMDAware::generateBatches()
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.h
new file mode 100644
index 00000000..554e40ce
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/DX11/btSoftBodySolver_DX11SIMDAware.h
@@ -0,0 +1,81 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "vectormath/vmInclude.h"
+#include "btSoftBodySolver_DX11.h"
+#include "btSoftBodySolverVertexBuffer_DX11.h"
+#include "btSoftBodySolverLinkData_DX11SIMDAware.h"
+#include "btSoftBodySolverVertexData_DX11.h"
+#include "btSoftBodySolverTriangleData_DX11.h"
+
+
+#ifndef BT_SOFT_BODY_DX11_SOLVER_SIMDAWARE_H
+#define BT_SOFT_BODY_DX11_SOLVER_SIMDAWARE_H
+
+class btDX11SIMDAwareSoftBodySolver : public btDX11SoftBodySolver
+{
+protected:
+ struct SolvePositionsFromLinksKernelCB
+ {
+ int startWave;
+ int numWaves;
+ float kst;
+ float ti;
+ };
+
+
+ /** Link data for all cloths. Note that this will be sorted batch-wise for efficient computation and m_linkAddresses will maintain the addressing. */
+ btSoftBodyLinkDataDX11SIMDAware m_linkData;
+
+ /** Variable to define whether we need to update solver constants on the next iteration */
+ bool m_updateSolverConstants;
+
+
+ virtual bool buildShaders();
+
+ void updateConstants( float timeStep );
+
+
+ //////////////////////////////////////
+ // Kernel dispatches
+
+
+ void solveLinksForPosition( int startLink, int numLinks, float kst, float ti );
+
+ // End kernel dispatches
+ /////////////////////////////////////
+
+
+
+public:
+ btDX11SIMDAwareSoftBodySolver(ID3D11Device * dx11Device, ID3D11DeviceContext* dx11Context, DXFunctions::CompileFromMemoryFunc dx11CompileFromMemory = &D3DX11CompileFromMemory);
+
+ virtual ~btDX11SIMDAwareSoftBodySolver();
+
+ virtual btSoftBodyLinkData &getLinkData();
+
+ virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate=false);
+
+ virtual void solveConstraints( float solverdt );
+
+ virtual SolverTypes getSolverType() const
+ {
+ return DX_SIMD_SOLVER;
+ }
+
+};
+
+#endif // #ifndef BT_SOFT_BODY_DX11_SOLVER_SIMDAWARE_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD/CMakeLists.txt
new file mode 100644
index 00000000..38e5a662
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD/CMakeLists.txt
@@ -0,0 +1,82 @@
+
+INCLUDE_DIRECTORIES(
+ ${BULLET_PHYSICS_SOURCE_DIR}/src
+ ${AMD_OPENCL_INCLUDES}
+)
+
+ADD_DEFINITIONS(-DUSE_AMD_OPENCL)
+ADD_DEFINITIONS(-DCL_PLATFORM_AMD)
+
+
+
+SET(BulletSoftBodyOpenCLSolvers_SRCS
+ ../btSoftBodySolver_OpenCL.cpp
+ ../btSoftBodySolver_OpenCLSIMDAware.cpp
+ ../btSoftBodySolverOutputCLtoGL.cpp
+)
+
+SET(BulletSoftBodyOpenCLSolvers_HDRS
+ ../btSoftBodySolver_OpenCL.h
+ ../btSoftBodySolver_OpenCLSIMDAware.h
+ ../../CPU/btSoftBodySolverData.h
+ ../btSoftBodySolverVertexData_OpenCL.h
+ ../btSoftBodySolverTriangleData_OpenCL.h
+ ../btSoftBodySolverLinkData_OpenCL.h
+ ../btSoftBodySolverLinkData_OpenCLSIMDAware.h
+ ../btSoftBodySolverBuffer_OpenCL.h
+ ../btSoftBodySolverVertexBuffer_OpenGL.h
+ ../btSoftBodySolverOutputCLtoGL.h
+)
+
+# OpenCL and HLSL Shaders.
+# Build rules generated to stringify these into headers
+# which are needed by some of the sources
+SET(BulletSoftBodyOpenCLSolvers_Shaders
+# OutputToVertexArray
+ UpdateNormals
+ Integrate
+ UpdatePositions
+ UpdateNodes
+ SolvePositions
+ UpdatePositionsFromVelocities
+ ApplyForces
+ PrepareLinks
+ VSolveLinks
+)
+
+foreach(f ${BulletSoftBodyOpenCLSolvers_Shaders})
+ LIST(APPEND BulletSoftBodyOpenCLSolvers_OpenCLC "../OpenCLC/${f}.cl")
+endforeach(f)
+
+
+
+ADD_LIBRARY(BulletSoftBodySolvers_OpenCL_AMD
+ ${BulletSoftBodyOpenCLSolvers_SRCS}
+ ${BulletSoftBodyOpenCLSolvers_HDRS}
+ ${BulletSoftBodyOpenCLSolvers_OpenCLC}
+)
+
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_AMD PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_AMD PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_AMD BulletSoftBody)
+ENDIF (BUILD_SHARED_LIBS)
+
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_AMD DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_AMD DESTINATION lib${LIB_SUFFIX})
+#headers are already installed by BulletMultiThreaded library
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_AMD PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_AMD PROPERTIES PUBLIC_HEADER "${BulletSoftBodyOpenCLSolvers_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Apple/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Apple/CMakeLists.txt
new file mode 100644
index 00000000..5c54c658
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Apple/CMakeLists.txt
@@ -0,0 +1,77 @@
+
+INCLUDE_DIRECTORIES(
+${BULLET_PHYSICS_SOURCE_DIR}/src
+)
+
+
+
+
+SET(BulletSoftBodyOpenCLSolvers_SRCS
+ ../btSoftBodySolver_OpenCL.cpp
+ ../btSoftBodySolver_OpenCLSIMDAware.cpp
+)
+
+SET(BulletSoftBodyOpenCLSolvers_HDRS
+ ../btSoftBodySolver_OpenCL.h
+ ../../CPU/btSoftBodySolverData.h
+ ../btSoftBodySolverVertexData_OpenCL.h
+ ../btSoftBodySolverTriangleData_OpenCL.h
+ ../btSoftBodySolverLinkData_OpenCL.h
+ ../btSoftBodySolverBuffer_OpenCL.h
+)
+
+# OpenCL and HLSL Shaders.
+# Build rules generated to stringify these into headers
+# which are needed by some of the sources
+SET(BulletSoftBodyOpenCLSolvers_Shaders
+# OutputToVertexArray
+ UpdateNormals
+ Integrate
+ UpdatePositions
+ UpdateNodes
+ SolvePositions
+ UpdatePositionsFromVelocities
+ ApplyForces
+ PrepareLinks
+ VSolveLinks
+)
+
+foreach(f ${BulletSoftBodyOpenCLSolvers_Shaders})
+ LIST(APPEND BulletSoftBodyOpenCLSolvers_OpenCLC "../OpenCLC10/${f}.cl")
+endforeach(f)
+
+
+
+ADD_LIBRARY(BulletSoftBodySolvers_OpenCL_Apple
+ ${BulletSoftBodyOpenCLSolvers_SRCS}
+ ${BulletSoftBodyOpenCLSolvers_HDRS}
+ ${BulletSoftBodyOpenCLSolvers_OpenCLC}
+)
+
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Apple PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Apple PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ IF (APPLE AND (BUILD_SHARED_LIBS OR FRAMEWORK) )
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Apple PROPERTIES LINK_FLAGS "-framework OpenCL")
+ ENDIF (APPLE AND (BUILD_SHARED_LIBS OR FRAMEWORK) )
+ TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_Apple BulletSoftBody)
+ENDIF (BUILD_SHARED_LIBS)
+
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_Apple DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_Apple DESTINATION lib${LIB_SUFFIX})
+#headers are already installed by BulletMultiThreaded library
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Apple PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Apple PROPERTIES PUBLIC_HEADER "${BulletSoftBodyOpenCLSolvers_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/CMakeLists.txt
new file mode 100644
index 00000000..d298956c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/CMakeLists.txt
@@ -0,0 +1,13 @@
+ SUBDIRS( MiniCL )
+
+IF(BUILD_AMD_OPENCL_DEMOS)
+ SUBDIRS(AMD)
+ENDIF()
+
+IF(BUILD_NVIDIA_OPENCL_DEMOS)
+ SUBDIRS(NVidia)
+ENDIF()
+
+IF(APPLE AND OPENCL_LIBRARY)
+ SUBDIRS(Apple)
+ENDIF()
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/CMakeLists.txt
new file mode 100644
index 00000000..d4627b0f
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/CMakeLists.txt
@@ -0,0 +1,75 @@
+
+INCLUDE_DIRECTORIES(
+${BULLET_PHYSICS_SOURCE_DIR}/src
+)
+
+ADD_DEFINITIONS(-DUSE_MINICL)
+
+
+
+
+SET(BulletSoftBodyOpenCLSolvers_SRCS
+ ../btSoftBodySolver_OpenCL.cpp
+)
+
+SET(BulletSoftBodyOpenCLSolvers_HDRS
+ ../btSoftBodySolver_OpenCL.h
+ ../../CPU/btSoftBodySolverData.h
+ ../btSoftBodySolverVertexData_OpenCL.h
+ ../btSoftBodySolverTriangleData_OpenCL.h
+ ../btSoftBodySolverLinkData_OpenCL.h
+ ../btSoftBodySolverBuffer_OpenCL.h
+)
+
+# OpenCL and HLSL Shaders.
+# Build rules generated to stringify these into headers
+# which are needed by some of the sources
+SET(BulletSoftBodyOpenCLSolvers_Shaders
+# OutputToVertexArray
+ UpdateNormals
+ Integrate
+ UpdatePositions
+ UpdateNodes
+ SolvePositions
+ UpdatePositionsFromVelocities
+ ApplyForces
+ PrepareLinks
+ VSolveLinks
+)
+
+foreach(f ${BulletSoftBodyOpenCLSolvers_Shaders})
+ LIST(APPEND BulletSoftBodyOpenCLSolvers_OpenCLC "../OpenCLC10/${f}.cl")
+endforeach(f)
+
+
+
+ADD_LIBRARY(BulletSoftBodySolvers_OpenCL_Mini
+ ${BulletSoftBodyOpenCLSolvers_SRCS}
+ ${BulletSoftBodyOpenCLSolvers_HDRS}
+ ${BulletSoftBodyOpenCLSolvers_OpenCLC}
+)
+
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Mini PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Mini PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_Mini MiniCL BulletMultiThreaded BulletSoftBody)
+ENDIF (BUILD_SHARED_LIBS)
+
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_Mini DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_Mini DESTINATION lib${LIB_SUFFIX})
+#headers are already installed by BulletMultiThreaded library
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Mini PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Mini PROPERTIES PUBLIC_HEADER "${BulletSoftBodyOpenCLSolvers_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/MiniCLTaskWrap.cpp b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/MiniCLTaskWrap.cpp
new file mode 100644
index 00000000..79b0ac23
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/MiniCLTaskWrap.cpp
@@ -0,0 +1,40 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <MiniCL/cl_MiniCL_Defs.h>
+
+#define MSTRINGIFY(A) A
+#include "../OpenCLC10/ApplyForces.cl"
+#include "../OpenCLC10/Integrate.cl"
+#include "../OpenCLC10/PrepareLinks.cl"
+#include "../OpenCLC10/SolvePositions.cl"
+#include "../OpenCLC10/UpdateNodes.cl"
+#include "../OpenCLC10/UpdateNormals.cl"
+#include "../OpenCLC10/UpdatePositions.cl"
+#include "../OpenCLC10/UpdatePositionsFromVelocities.cl"
+//#include "../OpenCLC10/VSolveLinks.cl"
+
+MINICL_REGISTER(PrepareLinksKernel)
+MINICL_REGISTER(UpdatePositionsFromVelocitiesKernel)
+MINICL_REGISTER(SolvePositionsFromLinksKernel)
+MINICL_REGISTER(updateVelocitiesFromPositionsWithVelocitiesKernel)
+MINICL_REGISTER(updateVelocitiesFromPositionsWithoutVelocitiesKernel)
+MINICL_REGISTER(IntegrateKernel)
+MINICL_REGISTER(ApplyForcesKernel)
+MINICL_REGISTER(ResetNormalsAndAreasKernel)
+MINICL_REGISTER(NormalizeNormalsAndAreasKernel)
+MINICL_REGISTER(UpdateSoftBodiesKernel)
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt
new file mode 100644
index 00000000..f102d369
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt
@@ -0,0 +1,78 @@
+
+INCLUDE_DIRECTORIES(
+ ${BULLET_PHYSICS_SOURCE_DIR}/src
+ ${NVIDIA_OPENCL_INCLUDES}
+)
+
+
+
+SET(BulletSoftBodyOpenCLSolvers_SRCS
+ ../btSoftBodySolver_OpenCL.cpp
+ ../btSoftBodySolver_OpenCLSIMDAware.cpp
+ ../btSoftBodySolverOutputCLtoGL.cpp
+)
+
+SET(BulletSoftBodyOpenCLSolvers_HDRS
+ ../btSoftBodySolver_OpenCL.h
+ ../../CPU/btSoftBodySolverData.h
+ ../btSoftBodySolverVertexData_OpenCL.h
+ ../btSoftBodySolverTriangleData_OpenCL.h
+ ../btSoftBodySolverLinkData_OpenCL.h
+ ../btSoftBodySolverLinkData_OpenCLSIMDAware.h
+ ../btSoftBodySolverBuffer_OpenCL.h
+ ../btSoftBodySolverVertexBuffer_OpenGL.h
+ ../btSoftBodySolverOutputCLtoGL.h
+)
+
+# OpenCL and HLSL Shaders.
+# Build rules generated to stringify these into headers
+# which are needed by some of the sources
+SET(BulletSoftBodyOpenCLSolvers_Shaders
+# OutputToVertexArray
+ UpdateNormals
+ Integrate
+ UpdatePositions
+ UpdateNodes
+ SolvePositions
+ UpdatePositionsFromVelocities
+ ApplyForces
+ PrepareLinks
+ VSolveLinks
+)
+
+foreach(f ${BulletSoftBodyOpenCLSolvers_Shaders})
+ LIST(APPEND BulletSoftBodyOpenCLSolvers_OpenCLC "../OpenCLC/${f}.cl")
+endforeach(f)
+
+
+
+ADD_LIBRARY(BulletSoftBodySolvers_OpenCL_NVidia
+ ${BulletSoftBodyOpenCLSolvers_SRCS}
+ ${BulletSoftBodyOpenCLSolvers_HDRS}
+ ${BulletSoftBodyOpenCLSolvers_OpenCLC}
+)
+
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_NVidia BulletSoftBody BulletDynamics)
+ENDIF (BUILD_SHARED_LIBS)
+
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_NVidia DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBodySolvers_OpenCL_NVidia DESTINATION lib${LIB_SUFFIX})
+#headers are already installed by BulletMultiThreaded library
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES PUBLIC_HEADER "${BulletSoftBodyOpenCLSolvers_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ApplyForces.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ApplyForces.cl
new file mode 100644
index 00000000..7204a80c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ApplyForces.cl
@@ -0,0 +1,91 @@
+MSTRINGIFY(
+
+/*#define float3 float4
+float dot3(float3 a, float3 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}*/
+
+float3 projectOnAxis( float3 v, float3 a )
+{
+ return (a*dot(v, a));
+}
+
+__kernel void
+ApplyForcesKernel(
+ const uint numNodes,
+ const float solverdt,
+ const float epsilon,
+ __global int * g_vertexClothIdentifier,
+ __global float4 * g_vertexNormal,
+ __global float * g_vertexArea,
+ __global float * g_vertexInverseMass,
+ __global float * g_clothLiftFactor,
+ __global float * g_clothDragFactor,
+ __global float4 * g_clothWindVelocity,
+ __global float4 * g_clothAcceleration,
+ __global float * g_clothMediumDensity,
+ __global float4 * g_vertexForceAccumulator,
+ __global float4 * g_vertexVelocity)
+{
+ unsigned int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ int clothId = g_vertexClothIdentifier[nodeID];
+ float nodeIM = g_vertexInverseMass[nodeID];
+
+ if( nodeIM > 0.0f )
+ {
+ float3 nodeV = g_vertexVelocity[nodeID].xyz;
+ float3 normal = g_vertexNormal[nodeID].xyz;
+ float area = g_vertexArea[nodeID];
+ float3 nodeF = g_vertexForceAccumulator[nodeID].xyz;
+
+ // Read per-cloth values
+ float3 clothAcceleration = g_clothAcceleration[clothId].xyz;
+ float3 clothWindVelocity = g_clothWindVelocity[clothId].xyz;
+ float liftFactor = g_clothLiftFactor[clothId];
+ float dragFactor = g_clothDragFactor[clothId];
+ float mediumDensity = g_clothMediumDensity[clothId];
+
+ // Apply the acceleration to the cloth rather than do this via a force
+ nodeV += (clothAcceleration*solverdt);
+
+ g_vertexVelocity[nodeID] = (float4)(nodeV, 0.f);
+
+ float3 relativeWindVelocity = nodeV - clothWindVelocity;
+ float relativeSpeedSquared = dot(relativeWindVelocity, relativeWindVelocity);
+
+ if( relativeSpeedSquared > epsilon )
+ {
+ // Correct direction of normal relative to wind direction and get dot product
+ normal = normal * (dot(normal, relativeWindVelocity) < 0 ? -1.f : 1.f);
+ float dvNormal = dot(normal, relativeWindVelocity);
+ if( dvNormal > 0 )
+ {
+ float3 force = (float3)(0.f, 0.f, 0.f);
+ float c0 = area * dvNormal * relativeSpeedSquared / 2.f;
+ float c1 = c0 * mediumDensity;
+ force += normal * (-c1 * liftFactor);
+ force += normalize(relativeWindVelocity)*(-c1 * dragFactor);
+
+ float dtim = solverdt * nodeIM;
+ float3 forceDTIM = force * dtim;
+
+ float3 nodeFPlusForce = nodeF + force;
+
+ // m_nodesf[i] -= ProjectOnAxis(m_nodesv[i], force.normalized())/dtim;
+ float3 nodeFMinus = nodeF - (projectOnAxis(nodeV, normalize(force))/dtim);
+
+ nodeF = nodeFPlusForce;
+ if( dot(forceDTIM, forceDTIM) > dot(nodeV, nodeV) )
+ nodeF = nodeFMinus;
+
+ g_vertexForceAccumulator[nodeID] = (float4)(nodeF, 0.0f);
+ }
+ }
+ }
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ComputeBounds.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ComputeBounds.cl
new file mode 100644
index 00000000..15c0cdc6
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/ComputeBounds.cl
@@ -0,0 +1,80 @@
+MSTRINGIFY(
+#pragma OPENCL EXTENSION cl_amd_printf : enable \n
+
+
+
+__kernel void
+ComputeBoundsKernel(
+ int numNodes,
+ int numSoftBodies,
+ __global int * g_vertexClothIdentifier,
+ __global float4 * g_vertexPositions,
+ volatile __global uint * g_clothMinBounds,
+ volatile __global uint * g_clothMaxBounds,
+ volatile __local uint * clothMinBounds,
+ volatile __local uint * clothMaxBounds)
+{
+ // Init min and max bounds arrays
+ if( get_local_id(0) < numSoftBodies )
+ {
+
+ clothMinBounds[get_local_id(0)*4] = UINT_MAX;
+ clothMinBounds[get_local_id(0)*4+1] = UINT_MAX;
+ clothMinBounds[get_local_id(0)*4+2] = UINT_MAX;
+ clothMinBounds[get_local_id(0)*4+3] = UINT_MAX;
+ clothMaxBounds[get_local_id(0)*4] = 0;
+ clothMaxBounds[get_local_id(0)*4+1] = 0;
+ clothMaxBounds[get_local_id(0)*4+2] = 0;
+ clothMaxBounds[get_local_id(0)*4+3] = 0;
+
+ }
+
+
+ barrier(CLK_GLOBAL_MEM_FENCE);
+
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ int clothIdentifier = g_vertexClothIdentifier[get_global_id(0)];
+ if( clothIdentifier >= 0 )
+ {
+ float3 position = g_vertexPositions[get_global_id(0)].xyz;
+
+ /* Reinterpret position as uint */
+ uint3 positionUInt = (uint3)(as_uint(position.x), as_uint(position.y), as_uint(position.z));
+
+ /* Invert sign bit of positives and whole of negatives to allow comparison as unsigned ints */
+ positionUInt.x ^= (1+~(positionUInt.x >> 31) | 0x80000000);
+ positionUInt.y ^= (1+~(positionUInt.y >> 31) | 0x80000000);
+ positionUInt.z ^= (1+~(positionUInt.z >> 31) | 0x80000000);
+
+ /* Min/max with the LDS values */
+ atomic_min(&(clothMinBounds[clothIdentifier*4]), positionUInt.x);
+ atomic_min(&(clothMinBounds[clothIdentifier*4+1]), positionUInt.y);
+ atomic_min(&(clothMinBounds[clothIdentifier*4+2]), positionUInt.z);
+
+ atomic_max(&(clothMaxBounds[clothIdentifier*4]), positionUInt.x);
+ atomic_max(&(clothMaxBounds[clothIdentifier*4+1]), positionUInt.y);
+ atomic_max(&(clothMaxBounds[clothIdentifier*4+2]), positionUInt.z);
+ }
+ }
+
+ barrier(CLK_GLOBAL_MEM_FENCE);
+
+
+ /* Use global atomics to update the global versions of the data*/
+ if( get_local_id(0) < numSoftBodies )
+ {
+ /*atomic_min(&(g_clothMinBounds[get_local_id(0)].x), clothMinBounds[get_local_id(0)].x);*/
+ atomic_min(&(g_clothMinBounds[get_local_id(0)*4]), clothMinBounds[get_local_id(0)*4]);
+ atomic_min(&(g_clothMinBounds[get_local_id(0)*4+1]), clothMinBounds[get_local_id(0)*4+1]);
+ atomic_min(&(g_clothMinBounds[get_local_id(0)*4+2]), clothMinBounds[get_local_id(0)*4+2]);
+
+ atomic_max(&(g_clothMaxBounds[get_local_id(0)*4]), clothMaxBounds[get_local_id(0)*4]);
+ atomic_max(&(g_clothMaxBounds[get_local_id(0)*4+1]), clothMaxBounds[get_local_id(0)*4+1]);
+ atomic_max(&(g_clothMaxBounds[get_local_id(0)*4+2]), clothMaxBounds[get_local_id(0)*4+2]);
+ }
+}
+
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/Integrate.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/Integrate.cl
new file mode 100644
index 00000000..4a2c9f2f
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/Integrate.cl
@@ -0,0 +1,35 @@
+MSTRINGIFY(
+
+// Node indices for each link
+
+//#define float3 float4
+
+__kernel void
+IntegrateKernel(
+ const int numNodes,
+ const float solverdt,
+ __global float * g_vertexInverseMasses,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexVelocity,
+ __global float4 * g_vertexPreviousPositions,
+ __global float4 * g_vertexForceAccumulator)
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float3 position = g_vertexPositions[nodeID].xyz;
+ float3 velocity = g_vertexVelocity[nodeID].xyz;
+ float3 force = g_vertexForceAccumulator[nodeID].xyz;
+ float inverseMass = g_vertexInverseMasses[nodeID];
+
+ g_vertexPreviousPositions[nodeID] = (float4)(position, 0.f);
+ velocity += force * inverseMass * solverdt;
+ position += velocity * solverdt;
+
+ g_vertexForceAccumulator[nodeID] = (float4)(0.f, 0.f, 0.f, 0.0f);
+ g_vertexPositions[nodeID] = (float4)(position, 0.f);
+ g_vertexVelocity[nodeID] = (float4)(velocity, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/OutputToVertexArray.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/OutputToVertexArray.cl
new file mode 100644
index 00000000..4bc614c0
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/OutputToVertexArray.cl
@@ -0,0 +1,57 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+cbuffer OutputToVertexArrayCB : register( b0 )
+{
+ int startNode;
+ int numNodes;
+ int offsetX;
+ int strideX;
+
+ int offsetN;
+ int strideN;
+ int padding1;
+ int padding2;
+};
+
+
+StructuredBuffer<float4> g_nodesx : register( t0 );
+StructuredBuffer<float4> g_nodesn : register( t1 );
+
+RWStructuredBuffer<float> g_vertexBuffer : register( u0 );
+
+
+[numthreads(128, 1, 1)]
+void
+OutputToVertexArrayKernel( uint3 Gid : SV_GroupID, uint3 DTid : SV_DispatchThreadID, uint3 GTid : SV_GroupThreadID, uint GI : SV_GroupIndex )
+{
+ int nodeID = DTid.x;
+ if( nodeID < numNodes )
+ {
+ float4 nodeX = g_nodesx[nodeID + startNode];
+ float4 nodeN = g_nodesn[nodeID + startNode];
+
+ // Stride should account for the float->float4 conversion
+ int positionDestination = nodeID * strideX + offsetX;
+ g_vertexBuffer[positionDestination] = nodeX.x;
+ g_vertexBuffer[positionDestination+1] = nodeX.y;
+ g_vertexBuffer[positionDestination+2] = nodeX.z;
+
+ int normalDestination = nodeID * strideN + offsetN;
+ g_vertexBuffer[normalDestination] = nodeN.x;
+ g_vertexBuffer[normalDestination+1] = nodeN.y;
+ g_vertexBuffer[normalDestination+2] = nodeN.z;
+ }
+} \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/PrepareLinks.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/PrepareLinks.cl
new file mode 100644
index 00000000..f37a2f35
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/PrepareLinks.cl
@@ -0,0 +1,34 @@
+MSTRINGIFY(
+
+__kernel void
+PrepareLinksKernel(
+ const int numLinks,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksMassLSC,
+ __global float4 * g_nodesPreviousPosition,
+ __global float * g_linksLengthRatio,
+ __global float4 * g_linksCurrentLength)
+{
+ int linkID = get_global_id(0);
+ if( linkID < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float4 nodePreviousPosition0 = g_nodesPreviousPosition[node0];
+ float4 nodePreviousPosition1 = g_nodesPreviousPosition[node1];
+
+ float massLSC = g_linksMassLSC[linkID];
+
+ float4 linkCurrentLength = nodePreviousPosition1 - nodePreviousPosition0;
+
+ float linkLengthRatio = dot(linkCurrentLength, linkCurrentLength)*massLSC;
+ linkLengthRatio = 1.0f/linkLengthRatio;
+
+ g_linksCurrentLength[linkID] = linkCurrentLength;
+ g_linksLengthRatio[linkID] = linkLengthRatio;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocities.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocities.cl
new file mode 100644
index 00000000..9f50da8a
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocities.cl
@@ -0,0 +1,195 @@
+MSTRINGIFY(
+
+typedef struct
+{
+ int firstObject;
+ int endObject;
+} CollisionObjectIndices;
+
+typedef struct
+{
+ float4 shapeTransform[4]; // column major 4x4 matrix
+ float4 linearVelocity;
+ float4 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+
+ // Shape information
+ // Compressed from the union
+ float radius;
+ float halfHeight;
+ int upAxis;
+
+ float margin;
+ float friction;
+
+ int padding0;
+
+} CollisionShapeDescription;
+
+/* From btBroadphaseProxy.h */
+__constant int CAPSULE_SHAPE_PROXYTYPE = 10;
+
+/* Multiply column-major matrix against vector */
+float4 matrixVectorMul( float4 matrix[4], float4 vector )
+{
+ float4 returnVector;
+ float4 row0 = (float4)(matrix[0].x, matrix[1].x, matrix[2].x, matrix[3].x);
+ float4 row1 = (float4)(matrix[0].y, matrix[1].y, matrix[2].y, matrix[3].y);
+ float4 row2 = (float4)(matrix[0].z, matrix[1].z, matrix[2].z, matrix[3].z);
+ float4 row3 = (float4)(matrix[0].w, matrix[1].w, matrix[2].w, matrix[3].w);
+ returnVector.x = dot(row0, vector);
+ returnVector.y = dot(row1, vector);
+ returnVector.z = dot(row2, vector);
+ returnVector.w = dot(row3, vector);
+ return returnVector;
+}
+
+__kernel void
+SolveCollisionsAndUpdateVelocitiesKernel(
+ const int numNodes,
+ const float isolverdt,
+ __global int *g_vertexClothIdentifier,
+ __global float4 *g_vertexPreviousPositions,
+ __global float * g_perClothFriction,
+ __global float * g_clothDampingFactor,
+ __global CollisionObjectIndices * g_perClothCollisionObjectIndices,
+ __global CollisionShapeDescription * g_collisionObjectDetails,
+ __global float4 * g_vertexForces,
+ __global float4 *g_vertexVelocities,
+ __global float4 *g_vertexPositions)
+{
+ int nodeID = get_global_id(0);
+ float3 forceOnVertex = (float3)(0.f, 0.f, 0.f);
+ if( get_global_id(0) < numNodes )
+ {
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+
+ // Abort if this is not a valid cloth
+ if( clothIdentifier < 0 )
+ return;
+
+ float4 position = (float4)(g_vertexPositions[nodeID].xyz, 1.f);
+ float4 previousPosition = (float4)(g_vertexPreviousPositions[nodeID].xyz, 1.f);
+ float3 velocity;
+ float clothFriction = g_perClothFriction[clothIdentifier];
+ float dampingFactor = g_clothDampingFactor[clothIdentifier];
+ float velocityCoefficient = (1.f - dampingFactor);
+ CollisionObjectIndices collisionObjectIndices = g_perClothCollisionObjectIndices[clothIdentifier];
+
+ if( collisionObjectIndices.firstObject != collisionObjectIndices.endObject )
+ {
+ velocity = (float3)(15, 0, 0);
+
+ /* We have some possible collisions to deal with */
+ for( int collision = collisionObjectIndices.firstObject; collision < collisionObjectIndices.endObject; ++collision )
+ {
+ CollisionShapeDescription shapeDescription = g_collisionObjectDetails[collision];
+ float colliderFriction = shapeDescription.friction;
+
+ if( shapeDescription.collisionShapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ /* Colliding with a capsule */
+
+ float capsuleHalfHeight = shapeDescription.halfHeight;
+ float capsuleRadius = shapeDescription.radius;
+ float capsuleMargin = shapeDescription.margin;
+ int capsuleupAxis = shapeDescription.upAxis;
+
+ /* Four columns of worldTransform matrix */
+ float4 worldTransform[4];
+ worldTransform[0] = shapeDescription.shapeTransform[0];
+ worldTransform[1] = shapeDescription.shapeTransform[1];
+ worldTransform[2] = shapeDescription.shapeTransform[2];
+ worldTransform[3] = shapeDescription.shapeTransform[3];
+
+ // Correctly define capsule centerline vector
+ float4 c1 = (float4)(0.f, 0.f, 0.f, 1.f);
+ float4 c2 = (float4)(0.f, 0.f, 0.f, 1.f);
+ c1.x = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 0 );
+ c1.y = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 1 );
+ c1.z = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 2 );
+ c2.x = -c1.x;
+ c2.y = -c1.y;
+ c2.z = -c1.z;
+
+ float4 worldC1 = matrixVectorMul(worldTransform, c1);
+ float4 worldC2 = matrixVectorMul(worldTransform, c2);
+ float3 segment = (worldC2 - worldC1).xyz;
+
+ /* compute distance of tangent to vertex along line segment in capsule */
+ float distanceAlongSegment = -( dot( (worldC1 - position).xyz, segment ) / dot(segment, segment) );
+
+ float4 closestPoint = (worldC1 + (float4)(segment * distanceAlongSegment, 0.f));
+ float distanceFromLine = length(position - closestPoint);
+ float distanceFromC1 = length(worldC1 - position);
+ float distanceFromC2 = length(worldC2 - position);
+
+ /* Final distance from collision, point to push from, direction to push in
+ for impulse force */
+ float dist;
+ float3 normalVector;
+ if( distanceAlongSegment < 0 )
+ {
+ dist = distanceFromC1;
+ normalVector = normalize(position - worldC1).xyz;
+ } else if( distanceAlongSegment > 1.f ) {
+ dist = distanceFromC2;
+ normalVector = normalize(position - worldC2).xyz;
+ } else {
+ dist = distanceFromLine;
+ normalVector = normalize(position - closestPoint).xyz;
+ }
+
+ float3 colliderLinearVelocity = shapeDescription.linearVelocity.xyz;
+ float3 colliderAngularVelocity = shapeDescription.angularVelocity.xyz;
+ float3 velocityOfSurfacePoint = colliderLinearVelocity + cross(colliderAngularVelocity, position.xyz - (float3)(worldTransform[0].w, worldTransform[1].w, worldTransform[2].w));
+
+ float minDistance = capsuleRadius + capsuleMargin;
+
+ /* In case of no collision, this is the value of velocity */
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+
+
+ // Check for a collision
+ if( dist < minDistance )
+ {
+ /* Project back to surface along normal */
+ position = position + (float4)((minDistance - dist)*normalVector*0.9f, 0.f);
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+ float3 relativeVelocity = velocity - velocityOfSurfacePoint;
+
+ float3 p1 = normalize(cross(normalVector, segment));
+ float3 p2 = normalize(cross(p1, normalVector));
+ /* Full friction is sum of velocities in each direction of plane */
+ float3 frictionVector = p1*dot(relativeVelocity, p1) + p2*dot(relativeVelocity, p2);
+
+ /* Real friction is peak friction corrected by friction coefficients */
+ frictionVector = frictionVector * (colliderFriction*clothFriction);
+
+ float approachSpeed = dot(relativeVelocity, normalVector);
+
+ if( approachSpeed <= 0.0f )
+ forceOnVertex -= frictionVector;
+ }
+
+ }
+ }
+ } else {
+ /* Update velocity */
+ float3 difference = position.xyz - previousPosition.xyz;
+ velocity = difference*velocityCoefficient*isolverdt;
+ }
+
+ g_vertexVelocities[nodeID] = (float4)(velocity, 0.f);
+
+ /* Update external force */
+ g_vertexForces[nodeID] = (float4)(forceOnVertex, 0.f);
+
+ g_vertexPositions[nodeID] = (float4)(position.xyz, 0.f);
+ }
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl
new file mode 100644
index 00000000..5ab2a620
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl
@@ -0,0 +1,213 @@
+MSTRINGIFY(
+
+typedef struct
+{
+ int firstObject;
+ int endObject;
+} CollisionObjectIndices;
+
+typedef struct
+{
+ float4 shapeTransform[4]; /* column major 4x4 matrix */
+ float4 linearVelocity;
+ float4 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+
+ // Shape information
+ // Compressed from the union
+ float radius;
+ float halfHeight;
+ int upAxis;
+
+ float margin;
+ float friction;
+
+ int padding0;
+
+} CollisionShapeDescription;
+
+/* From btBroadphaseProxy.h */
+__constant int CAPSULE_SHAPE_PROXYTYPE = 10;
+
+
+/* Multiply column-major matrix against vector */
+float4 matrixVectorMul( float4 matrix[4], float4 vector )
+{
+ float4 returnVector;
+ float4 row0 = (float4)(matrix[0].x, matrix[1].x, matrix[2].x, matrix[3].x);
+ float4 row1 = (float4)(matrix[0].y, matrix[1].y, matrix[2].y, matrix[3].y);
+ float4 row2 = (float4)(matrix[0].z, matrix[1].z, matrix[2].z, matrix[3].z);
+ float4 row3 = (float4)(matrix[0].w, matrix[1].w, matrix[2].w, matrix[3].w);
+ returnVector.x = dot(row0, vector);
+ returnVector.y = dot(row1, vector);
+ returnVector.z = dot(row2, vector);
+ returnVector.w = dot(row3, vector);
+ return returnVector;
+}
+
+__kernel void
+SolveCollisionsAndUpdateVelocitiesKernel(
+ const int numNodes,
+ const float isolverdt,
+ __global int *g_vertexClothIdentifier,
+ __global float4 *g_vertexPreviousPositions,
+ __global float * g_perClothFriction,
+ __global float * g_clothDampingFactor,
+ __global CollisionObjectIndices * g_perClothCollisionObjectIndices,
+ __global CollisionShapeDescription * g_collisionObjectDetails,
+ __global float4 * g_vertexForces,
+ __global float4 *g_vertexVelocities,
+ __global float4 *g_vertexPositions,
+ __local CollisionShapeDescription *localCollisionShapes)
+{
+ int nodeID = get_global_id(0);
+ float3 forceOnVertex = (float3)(0.f, 0.f, 0.f);
+
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+
+ // Abort if this is not a valid cloth
+ if( clothIdentifier < 0 )
+ return;
+
+ float4 position = (float4)(g_vertexPositions[nodeID].xyz, 1.f);
+ float4 previousPosition = (float4)(g_vertexPreviousPositions[nodeID].xyz, 1.f);
+ float3 velocity;
+ float clothFriction = g_perClothFriction[clothIdentifier];
+ float dampingFactor = g_clothDampingFactor[clothIdentifier];
+ float velocityCoefficient = (1.f - dampingFactor);
+ CollisionObjectIndices collisionObjectIndices = g_perClothCollisionObjectIndices[clothIdentifier];
+
+ int numObjects = collisionObjectIndices.endObject - collisionObjectIndices.firstObject;
+ if( numObjects > 0 )
+ {
+ /* We have some possible collisions to deal with */
+
+ /* First load all of the collision objects into LDS */
+ int numObjects = collisionObjectIndices.endObject - collisionObjectIndices.firstObject;
+ if( get_local_id(0) < numObjects )
+ {
+ localCollisionShapes[get_local_id(0)] = g_collisionObjectDetails[ collisionObjectIndices.firstObject + get_local_id(0) ];
+ }
+ }
+
+ /* Safe as the vertices are padded so that not more than one soft body is in a group */
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+ /* Annoyingly, even though I know the flow control is not varying, the compiler will not let me skip this */
+ if( numObjects > 0 )
+ {
+ velocity = (float3)(0, 0, 0);
+
+
+ // We have some possible collisions to deal with
+ for( int collision = 0; collision < numObjects; ++collision )
+ {
+ CollisionShapeDescription shapeDescription = localCollisionShapes[collision];
+ float colliderFriction = shapeDescription.friction;
+
+ if( shapeDescription.collisionShapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ /* Colliding with a capsule */
+
+ float capsuleHalfHeight = localCollisionShapes[collision].halfHeight;
+ float capsuleRadius = localCollisionShapes[collision].radius;
+ float capsuleMargin = localCollisionShapes[collision].margin;
+ int capsuleupAxis = localCollisionShapes[collision].upAxis;
+
+ float4 worldTransform[4];
+ worldTransform[0] = localCollisionShapes[collision].shapeTransform[0];
+ worldTransform[1] = localCollisionShapes[collision].shapeTransform[1];
+ worldTransform[2] = localCollisionShapes[collision].shapeTransform[2];
+ worldTransform[3] = localCollisionShapes[collision].shapeTransform[3];
+
+ // Correctly define capsule centerline vector
+ float4 c1 = (float4)(0.f, 0.f, 0.f, 1.f);
+ float4 c2 = (float4)(0.f, 0.f, 0.f, 1.f);
+ c1.x = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 0 );
+ c1.y = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 1 );
+ c1.z = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 2 );
+ c2.x = -c1.x;
+ c2.y = -c1.y;
+ c2.z = -c1.z;
+
+ float4 worldC1 = matrixVectorMul(worldTransform, c1);
+ float4 worldC2 = matrixVectorMul(worldTransform, c2);
+ float3 segment = (worldC2 - worldC1).xyz;
+
+
+ /* compute distance of tangent to vertex along line segment in capsule */
+ float distanceAlongSegment = -( dot( (worldC1 - position).xyz, segment ) / dot(segment, segment) );
+
+ float4 closestPoint = (worldC1 + (float4)(segment * distanceAlongSegment, 0.f));
+ float distanceFromLine = length(position - closestPoint);
+ float distanceFromC1 = length(worldC1 - position);
+ float distanceFromC2 = length(worldC2 - position);
+
+ /* Final distance from collision, point to push from, direction to push in
+ for impulse force */
+ float dist;
+ float3 normalVector;
+ if( distanceAlongSegment < 0 )
+ {
+ dist = distanceFromC1;
+ normalVector = normalize(position - worldC1).xyz;
+ } else if( distanceAlongSegment > 1.f ) {
+ dist = distanceFromC2;
+ normalVector = normalize(position - worldC2).xyz;
+ } else {
+ dist = distanceFromLine;
+ normalVector = normalize(position - closestPoint).xyz;
+ }
+
+ float3 colliderLinearVelocity = localCollisionShapes[collision].linearVelocity.xyz;
+ float3 colliderAngularVelocity = localCollisionShapes[collision].angularVelocity.xyz;
+ float3 velocityOfSurfacePoint = colliderLinearVelocity + cross(colliderAngularVelocity, position.xyz - (float3)(worldTransform[0].w, worldTransform[1].w, worldTransform[2].w));
+
+ float minDistance = capsuleRadius + capsuleMargin;
+
+ /* In case of no collision, this is the value of velocity */
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+
+
+ /* Check for a collision */
+ if( dist < minDistance )
+ {
+ /* Project back to surface along normal */
+ position = position + (float4)((minDistance - dist)*normalVector*0.9f, 0.f);
+ velocity = (position - previousPosition).xyz * velocityCoefficient * isolverdt;
+ float3 relativeVelocity = velocity - velocityOfSurfacePoint;
+
+ float3 p1 = normalize(cross(normalVector, segment));
+ float3 p2 = normalize(cross(p1, normalVector));
+ /* Full friction is sum of velocities in each direction of plane */
+ float3 frictionVector = p1*dot(relativeVelocity, p1) + p2*dot(relativeVelocity, p2);
+
+ /* Real friction is peak friction corrected by friction coefficients */
+ frictionVector = frictionVector * (colliderFriction*clothFriction);
+
+ float approachSpeed = dot(relativeVelocity, normalVector);
+
+ if( approachSpeed <= 0.0f )
+ forceOnVertex -= frictionVector;
+ }
+
+ }
+ }
+ } else {
+ /* Update velocity */
+ float3 difference = position.xyz - previousPosition.xyz;
+ velocity = difference*velocityCoefficient*isolverdt;
+ }
+
+ g_vertexVelocities[nodeID] = (float4)(velocity, 0.f);
+
+ /* Update external force */
+ g_vertexForces[nodeID] = (float4)(forceOnVertex, 0.f);
+
+ g_vertexPositions[nodeID] = (float4)(position.xyz, 0.f);
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositions.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositions.cl
new file mode 100644
index 00000000..4a08a56c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositions.cl
@@ -0,0 +1,55 @@
+
+MSTRINGIFY(
+
+/*#define float3 float4
+
+float dot3(float3 a, float3 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}*/
+
+__kernel void
+SolvePositionsFromLinksKernel(
+ const int startLink,
+ const int numLinks,
+ const float kst,
+ const float ti,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksMassLSC,
+ __global float * g_linksRestLengthSquared,
+ __global float * g_verticesInverseMass,
+ __global float4 * g_vertexPositions)
+
+{
+ int linkID = get_global_id(0) + startLink;
+ if( get_global_id(0) < numLinks )
+ {
+ float massLSC = g_linksMassLSC[linkID];
+ float restLengthSquared = g_linksRestLengthSquared[linkID];
+
+ if( massLSC > 0.0f )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float3 position0 = g_vertexPositions[node0].xyz;
+ float3 position1 = g_vertexPositions[node1].xyz;
+
+ float inverseMass0 = g_verticesInverseMass[node0];
+ float inverseMass1 = g_verticesInverseMass[node1];
+
+ float3 del = position1 - position0;
+ float len = dot(del, del);
+ float k = ((restLengthSquared - len)/(massLSC*(restLengthSquared+len)))*kst;
+ position0 = position0 - del*(k*inverseMass0);
+ position1 = position1 + del*(k*inverseMass1);
+
+ g_vertexPositions[node0] = (float4)(position0, 0.f);
+ g_vertexPositions[node1] = (float4)(position1, 0.f);
+
+ }
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl
new file mode 100644
index 00000000..9a45570a
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/SolvePositionsSIMDBatched.cl
@@ -0,0 +1,129 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+MSTRINGIFY(
+
+float mydot3(float4 a, float4 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+__kernel void
+SolvePositionsFromLinksKernel(
+ const int startWaveInBatch,
+ const int numWaves,
+ const float kst,
+ const float ti,
+ __global int2 *g_wavefrontBatchCountsVertexCounts,
+ __global int *g_vertexAddressesPerWavefront,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksMassLSC,
+ __global float * g_linksRestLengthSquared,
+ __global float * g_verticesInverseMass,
+ __global float4 * g_vertexPositions,
+ __local int2 *wavefrontBatchCountsVertexCounts,
+ __local float4 *vertexPositionSharedData,
+ __local float *vertexInverseMassSharedData)
+{
+ const int laneInWavefront = (get_global_id(0) & (WAVEFRONT_SIZE-1));
+ const int wavefront = startWaveInBatch + (get_global_id(0) / WAVEFRONT_SIZE);
+ const int firstWavefrontInBlock = startWaveInBatch + get_group_id(0) * WAVEFRONT_BLOCK_MULTIPLIER;
+ const int localWavefront = wavefront - firstWavefrontInBlock;
+
+ // Mask out in case there's a stray "wavefront" at the end that's been forced in through the multiplier
+ if( wavefront < (startWaveInBatch + numWaves) )
+ {
+ // Load the batch counts for the wavefronts
+
+ int2 batchesAndVerticesWithinWavefront = g_wavefrontBatchCountsVertexCounts[wavefront];
+ int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x;
+ int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;
+
+ // Load the vertices for the wavefronts
+ for( int vertex = laneInWavefront; vertex < verticesUsedByWave; vertex+=WAVEFRONT_SIZE )
+ {
+ int vertexAddress = g_vertexAddressesPerWavefront[wavefront*MAX_NUM_VERTICES_PER_WAVE + vertex];
+
+ vertexPositionSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex] = g_vertexPositions[vertexAddress];
+ vertexInverseMassSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex] = g_verticesInverseMass[vertexAddress];
+ }
+
+ mem_fence(CLK_LOCAL_MEM_FENCE);
+
+ // Loop through the batches performing the solve on each in LDS
+ int baseDataLocationForWave = WAVEFRONT_SIZE * wavefront * MAX_BATCHES_PER_WAVE;
+
+ //for( int batch = 0; batch < batchesWithinWavefront; ++batch )
+
+ int batch = 0;
+ do
+ {
+ int baseDataLocation = baseDataLocationForWave + WAVEFRONT_SIZE * batch;
+ int locationOfValue = baseDataLocation + laneInWavefront;
+
+
+ // These loads should all be perfectly linear across the WF
+ int2 localVertexIndices = g_linksVertexIndices[locationOfValue];
+ float massLSC = g_linksMassLSC[locationOfValue];
+ float restLengthSquared = g_linksRestLengthSquared[locationOfValue];
+
+ // LDS vertex addresses based on logical wavefront number in block and loaded index
+ int vertexAddress0 = MAX_NUM_VERTICES_PER_WAVE * localWavefront + localVertexIndices.x;
+ int vertexAddress1 = MAX_NUM_VERTICES_PER_WAVE * localWavefront + localVertexIndices.y;
+
+ float4 position0 = vertexPositionSharedData[vertexAddress0];
+ float4 position1 = vertexPositionSharedData[vertexAddress1];
+
+ float inverseMass0 = vertexInverseMassSharedData[vertexAddress0];
+ float inverseMass1 = vertexInverseMassSharedData[vertexAddress1];
+
+ float4 del = position1 - position0;
+ float len = mydot3(del, del);
+
+ float k = 0;
+ if( massLSC > 0.0f )
+ {
+ k = ((restLengthSquared - len)/(massLSC*(restLengthSquared+len)))*kst;
+ }
+
+ position0 = position0 - del*(k*inverseMass0);
+ position1 = position1 + del*(k*inverseMass1);
+
+ // Ensure compiler does not re-order memory operations
+ mem_fence(CLK_LOCAL_MEM_FENCE);
+
+ vertexPositionSharedData[vertexAddress0] = position0;
+ vertexPositionSharedData[vertexAddress1] = position1;
+
+ // Ensure compiler does not re-order memory operations
+ mem_fence(CLK_LOCAL_MEM_FENCE);
+
+
+ ++batch;
+ } while( batch < batchesWithinWavefront );
+
+ // Update the global memory vertices for the wavefronts
+ for( int vertex = laneInWavefront; vertex < verticesUsedByWave; vertex+=WAVEFRONT_SIZE )
+ {
+ int vertexAddress = g_vertexAddressesPerWavefront[wavefront*MAX_NUM_VERTICES_PER_WAVE + vertex];
+
+ g_vertexPositions[vertexAddress] = (float4)(vertexPositionSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex].xyz, 0.f);
+ }
+
+ }
+
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateConstants.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateConstants.cl
new file mode 100644
index 00000000..488a5847
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateConstants.cl
@@ -0,0 +1,44 @@
+MSTRINGIFY(
+
+/*#define float3 float4
+
+float dot3(float3 a, float3 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}*/
+
+__kernel void
+UpdateConstantsKernel(
+ const int numLinks,
+ __global int2 * g_linksVertexIndices,
+ __global float4 * g_vertexPositions,
+ __global float * g_vertexInverseMasses,
+ __global float * g_linksMaterialLSC,
+ __global float * g_linksMassLSC,
+ __global float * g_linksRestLengthSquared,
+ __global float * g_linksRestLengths)
+{
+ int linkID = get_global_id(0);
+ if( linkID < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+ float linearStiffnessCoefficient = g_linksMaterialLSC[ linkID ];
+
+ float3 position0 = g_vertexPositions[node0].xyz;
+ float3 position1 = g_vertexPositions[node1].xyz;
+ float inverseMass0 = g_vertexInverseMasses[node0];
+ float inverseMass1 = g_vertexInverseMasses[node1];
+
+ float3 difference = position0 - position1;
+ float length2 = dot(difference, difference);
+ float length = sqrt(length2);
+
+ g_linksRestLengths[linkID] = length;
+ g_linksMassLSC[linkID] = (inverseMass0 + inverseMass1)/linearStiffnessCoefficient;
+ g_linksRestLengthSquared[linkID] = length*length;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNodes.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNodes.cl
new file mode 100644
index 00000000..cad4b8ad
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNodes.cl
@@ -0,0 +1,40 @@
+MSTRINGIFY(
+
+//#define float3 float4
+
+__kernel void
+updateVelocitiesFromPositionsWithVelocitiesKernel(
+ int numNodes,
+ float isolverdt,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexPreviousPositions,
+ __global int * g_vertexClothIndices,
+ __global float *g_clothVelocityCorrectionCoefficients,
+ __global float * g_clothDampingFactor,
+ __global float4 * g_vertexVelocities,
+ __global float4 * g_vertexForces)
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float3 position = g_vertexPositions[nodeID].xyz;
+ float3 previousPosition = g_vertexPreviousPositions[nodeID].xyz;
+ float3 velocity = g_vertexVelocities[nodeID].xyz;
+ int clothIndex = g_vertexClothIndices[nodeID];
+ float velocityCorrectionCoefficient = g_clothVelocityCorrectionCoefficients[clothIndex];
+ float dampingFactor = g_clothDampingFactor[clothIndex];
+ float velocityCoefficient = (1.f - dampingFactor);
+
+ float3 difference = position - previousPosition;
+
+ velocity += difference*velocityCorrectionCoefficient*isolverdt;
+
+ // Damp the velocity
+ velocity *= velocityCoefficient;
+
+ g_vertexVelocities[nodeID] = (float4)(velocity, 0.f);
+ g_vertexForces[nodeID] = (float4)(0.f, 0.f, 0.f, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNormals.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNormals.cl
new file mode 100644
index 00000000..37c8b3fa
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdateNormals.cl
@@ -0,0 +1,103 @@
+MSTRINGIFY(
+
+//#define float3 float4
+
+/*float length3(float3 a)
+{
+ a.w = 0;
+ return length(a);
+}
+
+float normalize3(float3 a)
+{
+ a.w = 0;
+ return normalize(a);
+}*/
+
+__kernel void
+ResetNormalsAndAreasKernel(
+ const unsigned int numNodes,
+ __global float4 * g_vertexNormals,
+ __global float * g_vertexArea)
+{
+ if( get_global_id(0) < numNodes )
+ {
+ g_vertexNormals[get_global_id(0)] = (float4)(0.0f, 0.0f, 0.0f, 0.0f);
+ g_vertexArea[get_global_id(0)] = 0.0f;
+ }
+}
+
+__kernel void
+UpdateSoftBodiesKernel(
+ const unsigned int startFace,
+ const unsigned int numFaces,
+ __global int4 * g_triangleVertexIndexSet,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexNormals,
+ __global float * g_vertexArea,
+ __global float4 * g_triangleNormals,
+ __global float * g_triangleArea)
+{
+ int faceID = get_global_id(0) + startFace;
+ if( get_global_id(0) < numFaces )
+ {
+ int4 triangleIndexSet = g_triangleVertexIndexSet[ faceID ];
+ int nodeIndex0 = triangleIndexSet.x;
+ int nodeIndex1 = triangleIndexSet.y;
+ int nodeIndex2 = triangleIndexSet.z;
+
+ float3 node0 = g_vertexPositions[nodeIndex0].xyz;
+ float3 node1 = g_vertexPositions[nodeIndex1].xyz;
+ float3 node2 = g_vertexPositions[nodeIndex2].xyz;
+ float3 nodeNormal0 = g_vertexNormals[nodeIndex0].xyz;
+ float3 nodeNormal1 = g_vertexNormals[nodeIndex1].xyz;
+ float3 nodeNormal2 = g_vertexNormals[nodeIndex2].xyz;
+ float vertexArea0 = g_vertexArea[nodeIndex0];
+ float vertexArea1 = g_vertexArea[nodeIndex1];
+ float vertexArea2 = g_vertexArea[nodeIndex2];
+
+ float3 vector0 = node1 - node0;
+ float3 vector1 = node2 - node0;
+
+ float3 faceNormal = cross(vector0.xyz, vector1.xyz);
+ float triangleArea = length(faceNormal);
+
+ nodeNormal0 = nodeNormal0 + faceNormal;
+ nodeNormal1 = nodeNormal1 + faceNormal;
+ nodeNormal2 = nodeNormal2 + faceNormal;
+ vertexArea0 = vertexArea0 + triangleArea;
+ vertexArea1 = vertexArea1 + triangleArea;
+ vertexArea2 = vertexArea2 + triangleArea;
+
+ g_triangleNormals[faceID] = (float4)(normalize(faceNormal), 0.f);
+ g_vertexNormals[nodeIndex0] = (float4)(nodeNormal0, 0.f);
+ g_vertexNormals[nodeIndex1] = (float4)(nodeNormal1, 0.f);
+ g_vertexNormals[nodeIndex2] = (float4)(nodeNormal2, 0.f);
+ g_triangleArea[faceID] = triangleArea;
+ g_vertexArea[nodeIndex0] = vertexArea0;
+ g_vertexArea[nodeIndex1] = vertexArea1;
+ g_vertexArea[nodeIndex2] = vertexArea2;
+ }
+}
+
+__kernel void
+NormalizeNormalsAndAreasKernel(
+ const unsigned int numNodes,
+ __global int * g_vertexTriangleCount,
+ __global float4 * g_vertexNormals,
+ __global float * g_vertexArea)
+{
+ if( get_global_id(0) < numNodes )
+ {
+ float4 normal = g_vertexNormals[get_global_id(0)];
+ float area = g_vertexArea[get_global_id(0)];
+ int numTriangles = g_vertexTriangleCount[get_global_id(0)];
+
+ float vectorLength = length(normal);
+
+ g_vertexNormals[get_global_id(0)] = normalize(normal);
+ g_vertexArea[get_global_id(0)] = area/(float)(numTriangles);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositions.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositions.cl
new file mode 100644
index 00000000..ae7599a8
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositions.cl
@@ -0,0 +1,36 @@
+MSTRINGIFY(
+
+//#define float3 float4
+
+__kernel void
+updateVelocitiesFromPositionsWithoutVelocitiesKernel(
+ const int numNodes,
+ const float isolverdt,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexPreviousPositions,
+ __global int * g_vertexClothIndices,
+ __global float * g_clothDampingFactor,
+ __global float4 * g_vertexVelocities,
+ __global float4 * g_vertexForces)
+
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float3 position = g_vertexPositions[nodeID].xyz;
+ float3 previousPosition = g_vertexPreviousPositions[nodeID].xyz;
+ float3 velocity = g_vertexVelocities[nodeID].xyz;
+ int clothIndex = g_vertexClothIndices[nodeID];
+ float dampingFactor = g_clothDampingFactor[clothIndex];
+ float velocityCoefficient = (1.f - dampingFactor);
+
+ float3 difference = position - previousPosition;
+
+ velocity = difference*velocityCoefficient*isolverdt;
+
+ g_vertexVelocities[nodeID] = (float4)(velocity, 0.f);
+ g_vertexForces[nodeID] = (float4)(0.f, 0.f, 0.f, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositionsFromVelocities.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositionsFromVelocities.cl
new file mode 100644
index 00000000..a3c94518
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/UpdatePositionsFromVelocities.cl
@@ -0,0 +1,26 @@
+MSTRINGIFY(
+
+//#define float3 float4
+
+__kernel void
+UpdatePositionsFromVelocitiesKernel(
+ const int numNodes,
+ const float solverSDT,
+ __global float4 * g_vertexVelocities,
+ __global float4 * g_vertexPreviousPositions,
+ __global float4 * g_vertexCurrentPosition)
+{
+ int vertexID = get_global_id(0);
+ if( vertexID < numNodes )
+ {
+ float3 previousPosition = g_vertexPreviousPositions[vertexID].xyz;
+ float3 velocity = g_vertexVelocities[vertexID].xyz;
+
+ float3 newPosition = previousPosition + velocity*solverSDT;
+
+ g_vertexCurrentPosition[vertexID] = (float4)(newPosition, 0.f);
+ g_vertexPreviousPositions[vertexID] = (float4)(newPosition, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/VSolveLinks.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/VSolveLinks.cl
new file mode 100644
index 00000000..b7345e37
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC/VSolveLinks.cl
@@ -0,0 +1,45 @@
+MSTRINGIFY(
+
+__kernel void
+VSolveLinksKernel(
+ int startLink,
+ int numLinks,
+ float kst,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksLengthRatio,
+ __global float4 * g_linksCurrentLength,
+ __global float * g_vertexInverseMass,
+ __global float4 * g_vertexVelocity)
+{
+ int linkID = get_global_id(0) + startLink;
+ if( get_global_id(0) < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float linkLengthRatio = g_linksLengthRatio[linkID];
+ float3 linkCurrentLength = g_linksCurrentLength[linkID].xyz;
+
+ float3 vertexVelocity0 = g_vertexVelocity[node0].xyz;
+ float3 vertexVelocity1 = g_vertexVelocity[node1].xyz;
+
+ float vertexInverseMass0 = g_vertexInverseMass[node0];
+ float vertexInverseMass1 = g_vertexInverseMass[node1];
+
+ float3 nodeDifference = vertexVelocity0 - vertexVelocity1;
+ float dotResult = dot(linkCurrentLength, nodeDifference);
+ float j = -dotResult*linkLengthRatio*kst;
+
+ float3 velocityChange0 = linkCurrentLength*(j*vertexInverseMass0);
+ float3 velocityChange1 = linkCurrentLength*(j*vertexInverseMass1);
+
+ vertexVelocity0 += velocityChange0;
+ vertexVelocity1 -= velocityChange1;
+
+ g_vertexVelocity[node0] = (float4)(vertexVelocity0, 0.f);
+ g_vertexVelocity[node1] = (float4)(vertexVelocity1, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ApplyForces.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ApplyForces.cl
new file mode 100644
index 00000000..555d07a1
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ApplyForces.cl
@@ -0,0 +1,91 @@
+MSTRINGIFY(
+
+
+float adot3(float4 a, float4 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+float4 projectOnAxis( float4 v, float4 a )
+{
+ return (a*adot3(v, a));
+}
+
+__kernel void
+ApplyForcesKernel(
+ const uint numNodes,
+ const float solverdt,
+ const float epsilon,
+ __global int * g_vertexClothIdentifier,
+ __global float4 * g_vertexNormal,
+ __global float * g_vertexArea,
+ __global float * g_vertexInverseMass,
+ __global float * g_clothLiftFactor,
+ __global float * g_clothDragFactor,
+ __global float4 * g_clothWindVelocity,
+ __global float4 * g_clothAcceleration,
+ __global float * g_clothMediumDensity,
+ __global float4 * g_vertexForceAccumulator,
+ __global float4 * g_vertexVelocity GUID_ARG)
+{
+ unsigned int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ int clothId = g_vertexClothIdentifier[nodeID];
+ float nodeIM = g_vertexInverseMass[nodeID];
+
+ if( nodeIM > 0.0f )
+ {
+ float4 nodeV = g_vertexVelocity[nodeID];
+ float4 normal = g_vertexNormal[nodeID];
+ float area = g_vertexArea[nodeID];
+ float4 nodeF = g_vertexForceAccumulator[nodeID];
+
+ // Read per-cloth values
+ float4 clothAcceleration = g_clothAcceleration[clothId];
+ float4 clothWindVelocity = g_clothWindVelocity[clothId];
+ float liftFactor = g_clothLiftFactor[clothId];
+ float dragFactor = g_clothDragFactor[clothId];
+ float mediumDensity = g_clothMediumDensity[clothId];
+
+ // Apply the acceleration to the cloth rather than do this via a force
+ nodeV += (clothAcceleration*solverdt);
+
+ g_vertexVelocity[nodeID] = nodeV;
+
+ float4 relativeWindVelocity = nodeV - clothWindVelocity;
+ float relativeSpeedSquared = dot(relativeWindVelocity, relativeWindVelocity);
+
+ if( relativeSpeedSquared > epsilon )
+ {
+ // Correct direction of normal relative to wind direction and get dot product
+ normal = normal * (dot(normal, relativeWindVelocity) < 0 ? -1.f : 1.f);
+ float dvNormal = dot(normal, relativeWindVelocity);
+ if( dvNormal > 0 )
+ {
+ float4 force = (float4)(0.f, 0.f, 0.f, 0.f);
+ float c0 = area * dvNormal * relativeSpeedSquared / 2.f;
+ float c1 = c0 * mediumDensity;
+ force += normal * (-c1 * liftFactor);
+ force += normalize(relativeWindVelocity)*(-c1 * dragFactor);
+
+ float dtim = solverdt * nodeIM;
+ float4 forceDTIM = force * dtim;
+
+ float4 nodeFPlusForce = nodeF + force;
+
+ // m_nodesf[i] -= ProjectOnAxis(m_nodesv[i], force.normalized())/dtim;
+ float4 nodeFMinus = nodeF - (projectOnAxis(nodeV, normalize(force))/dtim);
+
+ nodeF = nodeFPlusForce;
+ if( dot(forceDTIM, forceDTIM) > dot(nodeV, nodeV) )
+ nodeF = nodeFMinus;
+
+ g_vertexForceAccumulator[nodeID] = nodeF;
+ }
+ }
+ }
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ComputeBounds.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ComputeBounds.cl
new file mode 100644
index 00000000..f18eada1
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/ComputeBounds.cl
@@ -0,0 +1,82 @@
+MSTRINGIFY(
+#pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable\n
+#pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable\n
+
+__kernel void
+ComputeBoundsKernel(
+ const int numNodes,
+ const int numSoftBodies,
+ __global int * g_vertexClothIdentifier,
+ __global float4 * g_vertexPositions,
+ /* Unfortunately, to get the atomics below to work these arrays cannot be */
+ /* uint4, though that is the layout of the data */
+ /* Therefore this is little-endian-only code */
+ volatile __global uint * g_clothMinBounds,
+ volatile __global uint * g_clothMaxBounds,
+ volatile __local uint * clothMinBounds,
+ volatile __local uint * clothMaxBounds)
+{
+ // Init min and max bounds arrays
+ if( get_local_id(0) < numSoftBodies )
+ {
+
+ clothMinBounds[get_local_id(0)*4] = UINT_MAX;
+ clothMinBounds[get_local_id(0)*4+1] = UINT_MAX;
+ clothMinBounds[get_local_id(0)*4+2] = UINT_MAX;
+ clothMinBounds[get_local_id(0)*4+3] = UINT_MAX;
+ clothMaxBounds[get_local_id(0)*4] = 0;
+ clothMaxBounds[get_local_id(0)*4+1] = 0;
+ clothMaxBounds[get_local_id(0)*4+2] = 0;
+ clothMaxBounds[get_local_id(0)*4+3] = 0;
+
+ }
+
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+ if( clothIdentifier >= 0 )
+ {
+
+ float4 position = (float4)(g_vertexPositions[nodeID].xyz, 0.f);
+
+ /* Reinterpret position as uint */
+ uint4 positionUInt = (uint4)(as_uint(position.x), as_uint(position.y), as_uint(position.z), 0);
+
+ /* Invert sign bit of positives and whole of negatives to allow comparison as unsigned ints */
+ positionUInt.x ^= (1+~(positionUInt.x >> 31) | 0x80000000);
+ positionUInt.y ^= (1+~(positionUInt.y >> 31) | 0x80000000);
+ positionUInt.z ^= (1+~(positionUInt.z >> 31) | 0x80000000);
+
+ // Min/max with the LDS values
+ atom_min(&(clothMinBounds[clothIdentifier*4]), positionUInt.x);
+ atom_min(&(clothMinBounds[clothIdentifier*4+1]), positionUInt.y);
+ atom_min(&(clothMinBounds[clothIdentifier*4+2]), positionUInt.z);
+
+ atom_max(&(clothMaxBounds[clothIdentifier*4]), positionUInt.x);
+ atom_max(&(clothMaxBounds[clothIdentifier*4+1]), positionUInt.y);
+ atom_max(&(clothMaxBounds[clothIdentifier*4+2]), positionUInt.z);
+ }
+ }
+
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+
+ /* Use global atomics to update the global versions of the data */
+ if( get_local_id(0) < numSoftBodies )
+ {
+ /*atom_min(&(g_clothMinBounds[get_local_id(0)].x), clothMinBounds[get_local_id(0)].x);*/
+ atom_min(&(g_clothMinBounds[get_local_id(0)*4]), clothMinBounds[get_local_id(0)*4]);
+ atom_min(&(g_clothMinBounds[get_local_id(0)*4+1]), clothMinBounds[get_local_id(0)*4+1]);
+ atom_min(&(g_clothMinBounds[get_local_id(0)*4+2]), clothMinBounds[get_local_id(0)*4+2]);
+
+ atom_max(&(g_clothMaxBounds[get_local_id(0)*4]), clothMaxBounds[get_local_id(0)*4]);
+ atom_max(&(g_clothMaxBounds[get_local_id(0)*4+1]), clothMaxBounds[get_local_id(0)*4+1]);
+ atom_max(&(g_clothMaxBounds[get_local_id(0)*4+2]), clothMaxBounds[get_local_id(0)*4+2]);
+ }
+}
+
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/Integrate.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/Integrate.cl
new file mode 100644
index 00000000..fb65330d
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/Integrate.cl
@@ -0,0 +1,35 @@
+MSTRINGIFY(
+
+// Node indices for each link
+
+
+
+__kernel void
+IntegrateKernel(
+ const int numNodes,
+ const float solverdt,
+ __global float * g_vertexInverseMasses,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexVelocity,
+ __global float4 * g_vertexPreviousPositions,
+ __global float4 * g_vertexForceAccumulator GUID_ARG)
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float4 position = g_vertexPositions[nodeID];
+ float4 velocity = g_vertexVelocity[nodeID];
+ float4 force = g_vertexForceAccumulator[nodeID];
+ float inverseMass = g_vertexInverseMasses[nodeID];
+
+ g_vertexPreviousPositions[nodeID] = position;
+ velocity += force * inverseMass * solverdt;
+ position += velocity * solverdt;
+
+ g_vertexForceAccumulator[nodeID] = (float4)(0.f, 0.f, 0.f, 0.0f);
+ g_vertexPositions[nodeID] = position;
+ g_vertexVelocity[nodeID] = velocity;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/OutputToVertexArray.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/OutputToVertexArray.cl
new file mode 100644
index 00000000..f04e0926
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/OutputToVertexArray.cl
@@ -0,0 +1,46 @@
+MSTRINGIFY(
+
+__kernel void
+OutputToVertexArrayWithNormalsKernel(
+ const int startNode, const int numNodes, __global float *g_vertexBuffer,
+ const int positionOffset, const int positionStride, const __global float4* g_vertexPositions,
+ const int normalOffset, const int normalStride, const __global float4* g_vertexNormals )
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float4 position = g_vertexPositions[nodeID + startNode];
+ float4 normal = g_vertexNormals[nodeID + startNode];
+
+ // Stride should account for the float->float4 conversion
+ int positionDestination = nodeID * positionStride + positionOffset;
+ g_vertexBuffer[positionDestination] = position.x;
+ g_vertexBuffer[positionDestination+1] = position.y;
+ g_vertexBuffer[positionDestination+2] = position.z;
+
+ int normalDestination = nodeID * normalStride + normalOffset;
+ g_vertexBuffer[normalDestination] = normal.x;
+ g_vertexBuffer[normalDestination+1] = normal.y;
+ g_vertexBuffer[normalDestination+2] = normal.z;
+ }
+}
+
+__kernel void
+OutputToVertexArrayWithoutNormalsKernel(
+ const int startNode, const int numNodes, __global float *g_vertexBuffer,
+ const int positionOffset, const int positionStride, const __global float4* g_vertexPositions )
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float4 position = g_vertexPositions[nodeID + startNode];
+
+ // Stride should account for the float->float4 conversion
+ int positionDestination = nodeID * positionStride + positionOffset;
+ g_vertexBuffer[positionDestination] = position.x;
+ g_vertexBuffer[positionDestination+1] = position.y;
+ g_vertexBuffer[positionDestination+2] = position.z;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/PrepareLinks.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/PrepareLinks.cl
new file mode 100644
index 00000000..ba327766
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/PrepareLinks.cl
@@ -0,0 +1,41 @@
+MSTRINGIFY(
+
+float dot3(float4 a, float4 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+
+__kernel void
+PrepareLinksKernel(
+ const int numLinks,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksMassLSC,
+ __global float4 * g_nodesPreviousPosition,
+ __global float * g_linksLengthRatio,
+ __global float4 * g_linksCurrentLength GUID_ARG)
+{
+ int linkID = get_global_id(0);
+ if( linkID < numLinks )
+ {
+
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float4 nodePreviousPosition0 = g_nodesPreviousPosition[node0];
+ float4 nodePreviousPosition1 = g_nodesPreviousPosition[node1];
+
+ float massLSC = g_linksMassLSC[linkID];
+
+ float4 linkCurrentLength = nodePreviousPosition1 - nodePreviousPosition0;
+
+ float linkLengthRatio = dot3(linkCurrentLength, linkCurrentLength)*massLSC;
+ linkLengthRatio = 1.0f/linkLengthRatio;
+
+ g_linksCurrentLength[linkID] = linkCurrentLength;
+ g_linksLengthRatio[linkID] = linkLengthRatio;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocities.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocities.cl
new file mode 100644
index 00000000..29b04024
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocities.cl
@@ -0,0 +1,204 @@
+MSTRINGIFY(
+
+#pragma OPENCL EXTENSION cl_amd_printf : enable\n
+
+float mydot3(float4 a, float4 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+
+typedef struct
+{
+ int firstObject;
+ int endObject;
+} CollisionObjectIndices;
+
+typedef struct
+{
+ float4 shapeTransform[4]; // column major 4x4 matrix
+ float4 linearVelocity;
+ float4 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+
+ // Shape information
+ // Compressed from the union
+ float radius;
+ float halfHeight;
+ int upAxis;
+
+ float margin;
+ float friction;
+
+ int padding0;
+
+} CollisionShapeDescription;
+
+// From btBroadphaseProxy.h
+__constant int CAPSULE_SHAPE_PROXYTYPE = 10;
+
+// Multiply column-major matrix against vector
+float4 matrixVectorMul( float4 matrix[4], float4 vector )
+{
+ float4 returnVector;
+ float4 row0 = (float4)(matrix[0].x, matrix[1].x, matrix[2].x, matrix[3].x);
+ float4 row1 = (float4)(matrix[0].y, matrix[1].y, matrix[2].y, matrix[3].y);
+ float4 row2 = (float4)(matrix[0].z, matrix[1].z, matrix[2].z, matrix[3].z);
+ float4 row3 = (float4)(matrix[0].w, matrix[1].w, matrix[2].w, matrix[3].w);
+ returnVector.x = dot(row0, vector);
+ returnVector.y = dot(row1, vector);
+ returnVector.z = dot(row2, vector);
+ returnVector.w = dot(row3, vector);
+ return returnVector;
+}
+
+__kernel void
+SolveCollisionsAndUpdateVelocitiesKernel(
+ const int numNodes,
+ const float isolverdt,
+ __global int *g_vertexClothIdentifier,
+ __global float4 *g_vertexPreviousPositions,
+ __global float * g_perClothFriction,
+ __global float * g_clothDampingFactor,
+ __global CollisionObjectIndices * g_perClothCollisionObjectIndices,
+ __global CollisionShapeDescription * g_collisionObjectDetails,
+ __global float4 * g_vertexForces,
+ __global float4 *g_vertexVelocities,
+ __global float4 *g_vertexPositions)
+{
+ int nodeID = get_global_id(0);
+ float4 forceOnVertex = (float4)(0.f, 0.f, 0.f, 0.f);
+
+ if( get_global_id(0) < numNodes )
+ {
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+
+ // Abort if this is not a valid cloth
+ if( clothIdentifier < 0 )
+ return;
+
+
+ float4 position = (float4)(g_vertexPositions[nodeID].xyz, 1.f);
+ float4 previousPosition = (float4)(g_vertexPreviousPositions[nodeID].xyz, 1.f);
+
+ float clothFriction = g_perClothFriction[clothIdentifier];
+ float dampingFactor = g_clothDampingFactor[clothIdentifier];
+ float velocityCoefficient = (1.f - dampingFactor);
+ float4 difference = position - previousPosition;
+ float4 velocity = difference*velocityCoefficient*isolverdt;
+
+ CollisionObjectIndices collisionObjectIndices = g_perClothCollisionObjectIndices[clothIdentifier];
+
+ int numObjects = collisionObjectIndices.endObject - collisionObjectIndices.firstObject;
+
+ if( numObjects > 0 )
+ {
+ // We have some possible collisions to deal with
+ for( int collision = collisionObjectIndices.firstObject; collision < collisionObjectIndices.endObject; ++collision )
+ {
+ CollisionShapeDescription shapeDescription = g_collisionObjectDetails[collision];
+ float colliderFriction = shapeDescription.friction;
+
+ if( shapeDescription.collisionShapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ // Colliding with a capsule
+
+ float capsuleHalfHeight = shapeDescription.halfHeight;
+ float capsuleRadius = shapeDescription.radius;
+ float capsuleMargin = shapeDescription.margin;
+ int capsuleupAxis = shapeDescription.upAxis;
+
+ // Four columns of worldTransform matrix
+ float4 worldTransform[4];
+ worldTransform[0] = shapeDescription.shapeTransform[0];
+ worldTransform[1] = shapeDescription.shapeTransform[1];
+ worldTransform[2] = shapeDescription.shapeTransform[2];
+ worldTransform[3] = shapeDescription.shapeTransform[3];
+
+ // Correctly define capsule centerline vector
+ float4 c1 = (float4)(0.f, 0.f, 0.f, 1.f);
+ float4 c2 = (float4)(0.f, 0.f, 0.f, 1.f);
+ c1.x = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 0 );
+ c1.y = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 1 );
+ c1.z = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 2 );
+ c2.x = -c1.x;
+ c2.y = -c1.y;
+ c2.z = -c1.z;
+
+
+ float4 worldC1 = matrixVectorMul(worldTransform, c1);
+ float4 worldC2 = matrixVectorMul(worldTransform, c2);
+ float4 segment = (worldC2 - worldC1);
+
+ // compute distance of tangent to vertex along line segment in capsule
+ float distanceAlongSegment = -( mydot3( (worldC1 - position), segment ) / mydot3(segment, segment) );
+
+ float4 closestPoint = (worldC1 + (float4)(segment * distanceAlongSegment));
+ float distanceFromLine = length(position - closestPoint);
+ float distanceFromC1 = length(worldC1 - position);
+ float distanceFromC2 = length(worldC2 - position);
+
+ // Final distance from collision, point to push from, direction to push in
+ // for impulse force
+ float dist;
+ float4 normalVector;
+ if( distanceAlongSegment < 0 )
+ {
+ dist = distanceFromC1;
+ normalVector = (float4)(normalize(position - worldC1).xyz, 0.f);
+ } else if( distanceAlongSegment > 1.f ) {
+ dist = distanceFromC2;
+ normalVector = (float4)(normalize(position - worldC2).xyz, 0.f);
+ } else {
+ dist = distanceFromLine;
+ normalVector = (float4)(normalize(position - closestPoint).xyz, 0.f);
+ }
+
+ float4 colliderLinearVelocity = shapeDescription.linearVelocity;
+ float4 colliderAngularVelocity = shapeDescription.angularVelocity;
+ float4 velocityOfSurfacePoint = colliderLinearVelocity + cross(colliderAngularVelocity, position - (float4)(worldTransform[0].w, worldTransform[1].w, worldTransform[2].w, 0.f));
+
+ float minDistance = capsuleRadius + capsuleMargin;
+
+ // In case of no collision, this is the value of velocity
+ velocity = (position - previousPosition) * velocityCoefficient * isolverdt;
+
+
+ // Check for a collision
+ if( dist < minDistance )
+ {
+ // Project back to surface along normal
+ position = position + (float4)((minDistance - dist)*normalVector*0.9f);
+ velocity = (position - previousPosition) * velocityCoefficient * isolverdt;
+ float4 relativeVelocity = velocity - velocityOfSurfacePoint;
+
+ float4 p1 = normalize(cross(normalVector, segment));
+ float4 p2 = normalize(cross(p1, normalVector));
+ // Full friction is sum of velocities in each direction of plane
+ float4 frictionVector = p1*mydot3(relativeVelocity, p1) + p2*mydot3(relativeVelocity, p2);
+
+ // Real friction is peak friction corrected by friction coefficients
+ frictionVector = frictionVector * (colliderFriction*clothFriction);
+
+ float approachSpeed = dot(relativeVelocity, normalVector);
+
+ if( approachSpeed <= 0.0f )
+ forceOnVertex -= frictionVector;
+ }
+ }
+ }
+ }
+
+ g_vertexVelocities[nodeID] = (float4)(velocity.xyz, 0.f);
+
+ // Update external force
+ g_vertexForces[nodeID] = (float4)(forceOnVertex.xyz, 0.f);
+
+ g_vertexPositions[nodeID] = (float4)(position.xyz, 0.f);
+ }
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl
new file mode 100644
index 00000000..ba57c886
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl
@@ -0,0 +1,219 @@
+MSTRINGIFY(
+float mydot3(float4 a, float4 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+
+typedef struct
+{
+ int firstObject;
+ int endObject;
+} CollisionObjectIndices;
+
+typedef struct
+{
+ float4 shapeTransform[4]; // column major 4x4 matrix
+ float4 linearVelocity;
+ float4 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+
+ // Shape information
+ // Compressed from the union
+ float radius;
+ float halfHeight;
+ int upAxis;
+
+ float margin;
+ float friction;
+
+ int padding0;
+
+} CollisionShapeDescription;
+
+// From btBroadphaseProxy.h
+__constant int CAPSULE_SHAPE_PROXYTYPE = 10;
+
+
+/* Multiply column-major matrix against vector */
+float4 matrixVectorMul( float4 matrix[4], float4 vector )
+{
+ float4 returnVector;
+ float4 row0 = (float4)(matrix[0].x, matrix[1].x, matrix[2].x, matrix[3].x);
+ float4 row1 = (float4)(matrix[0].y, matrix[1].y, matrix[2].y, matrix[3].y);
+ float4 row2 = (float4)(matrix[0].z, matrix[1].z, matrix[2].z, matrix[3].z);
+ float4 row3 = (float4)(matrix[0].w, matrix[1].w, matrix[2].w, matrix[3].w);
+ returnVector.x = dot(row0, vector);
+ returnVector.y = dot(row1, vector);
+ returnVector.z = dot(row2, vector);
+ returnVector.w = dot(row3, vector);
+ return returnVector;
+}
+
+__kernel void
+SolveCollisionsAndUpdateVelocitiesKernel(
+ const int numNodes,
+ const float isolverdt,
+ __global int *g_vertexClothIdentifier,
+ __global float4 *g_vertexPreviousPositions,
+ __global float * g_perClothFriction,
+ __global float * g_clothDampingFactor,
+ __global CollisionObjectIndices * g_perClothCollisionObjectIndices,
+ __global CollisionShapeDescription * g_collisionObjectDetails,
+ __global float4 * g_vertexForces,
+ __global float4 *g_vertexVelocities,
+ __global float4 *g_vertexPositions,
+ __local CollisionShapeDescription *localCollisionShapes)
+{
+ int nodeID = get_global_id(0);
+ float4 forceOnVertex = (float4)(0.f, 0.f, 0.f, 0.f);
+
+ int clothIdentifier = g_vertexClothIdentifier[nodeID];
+
+ // Abort if this is not a valid cloth
+ if( clothIdentifier < 0 )
+ return;
+
+
+ float4 position = (float4)(g_vertexPositions[nodeID].xyz, 1.f);
+ float4 previousPosition = (float4)(g_vertexPreviousPositions[nodeID].xyz, 1.f);
+ float clothFriction = g_perClothFriction[clothIdentifier];
+ float dampingFactor = g_clothDampingFactor[clothIdentifier];
+ float velocityCoefficient = (1.f - dampingFactor);
+
+ // Update velocity
+ float4 difference = position - previousPosition;
+ float4 velocity = difference*velocityCoefficient*isolverdt;
+ CollisionObjectIndices collisionObjectIndices = g_perClothCollisionObjectIndices[clothIdentifier];
+
+ int numObjects = collisionObjectIndices.endObject - collisionObjectIndices.firstObject;
+ if( numObjects > 0 )
+ {
+ // We have some possible collisions to deal with
+
+ // First load all of the collision objects into LDS
+ int numObjects = collisionObjectIndices.endObject - collisionObjectIndices.firstObject;
+ if( get_local_id(0) < numObjects )
+ {
+ localCollisionShapes[get_local_id(0)] = g_collisionObjectDetails[ collisionObjectIndices.firstObject + get_local_id(0) ];
+ }
+ }
+
+ // Safe as the vertices are padded so that not more than one soft body is in a group
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+ // Annoyingly, even though I know the flow control is not varying, the compiler will not let me skip this
+ if( numObjects > 0 )
+ {
+
+
+ // We have some possible collisions to deal with
+ for( int collision = 0; collision < numObjects; ++collision )
+ {
+ //CollisionShapeDescription shapeDescription = localCollisionShapes[collision];
+ float colliderFriction = localCollisionShapes[collision].friction;
+
+ if( localCollisionShapes[collision].collisionShapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ // Colliding with a capsule
+
+ float capsuleHalfHeight = localCollisionShapes[collision].halfHeight;
+ float capsuleRadius = localCollisionShapes[collision].radius;
+ float capsuleMargin = localCollisionShapes[collision].margin;
+ int capsuleupAxis = localCollisionShapes[collision].upAxis;
+
+ float4 worldTransform[4];
+ worldTransform[0] = localCollisionShapes[collision].shapeTransform[0];
+ worldTransform[1] = localCollisionShapes[collision].shapeTransform[1];
+ worldTransform[2] = localCollisionShapes[collision].shapeTransform[2];
+ worldTransform[3] = localCollisionShapes[collision].shapeTransform[3];
+
+ //float4 c1 = (float4)(0.f, -capsuleHalfHeight, 0.f, 1.f);
+ //float4 c2 = (float4)(0.f, +capsuleHalfHeight, 0.f, 1.f);
+ // Correctly define capsule centerline vector
+ float4 c1 = (float4)(0.f, 0.f, 0.f, 1.f);
+ float4 c2 = (float4)(0.f, 0.f, 0.f, 1.f);
+ c1.x = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 0 );
+ c1.y = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 1 );
+ c1.z = select( 0.f, -capsuleHalfHeight, capsuleupAxis == 2 );
+ c2.x = -c1.x;
+ c2.y = -c1.y;
+ c2.z = -c1.z;
+
+ float4 worldC1 = matrixVectorMul(worldTransform, c1);
+ float4 worldC2 = matrixVectorMul(worldTransform, c2);
+ float4 segment = (worldC2 - worldC1);
+
+
+ // compute distance of tangent to vertex along line segment in capsule
+ float distanceAlongSegment = -( mydot3( (worldC1 - position), segment ) / mydot3(segment, segment) );
+
+ float4 closestPoint = (worldC1 + (float4)(segment * distanceAlongSegment));
+ float distanceFromLine = length(position - closestPoint);
+ float distanceFromC1 = length(worldC1 - position);
+ float distanceFromC2 = length(worldC2 - position);
+
+ // Final distance from collision, point to push from, direction to push in
+ // for impulse force
+ float dist;
+ float4 normalVector;
+ if( distanceAlongSegment < 0 )
+ {
+ dist = distanceFromC1;
+ normalVector = normalize(position - worldC1);
+ } else if( distanceAlongSegment > 1.f ) {
+ dist = distanceFromC2;
+ normalVector = normalize(position - worldC2);
+ } else {
+ dist = distanceFromLine;
+ normalVector = normalize(position - closestPoint);
+ }
+
+ float4 colliderLinearVelocity = localCollisionShapes[collision].linearVelocity;
+ float4 colliderAngularVelocity = localCollisionShapes[collision].angularVelocity;
+ float4 velocityOfSurfacePoint = colliderLinearVelocity + cross(colliderAngularVelocity, position - (float4)(worldTransform[0].w, worldTransform[1].w, worldTransform[2].w, 0.f));
+
+ float minDistance = capsuleRadius + capsuleMargin;
+
+ // In case of no collision, this is the value of velocity
+ velocity = (position - previousPosition) * velocityCoefficient * isolverdt;
+
+
+ // Check for a collision
+ if( dist < minDistance )
+ {
+ // Project back to surface along normal
+ position = position + (float4)((minDistance - dist)*normalVector*0.9f);
+ velocity = (position - previousPosition) * velocityCoefficient * isolverdt;
+ float4 relativeVelocity = velocity - velocityOfSurfacePoint;
+
+ float4 p1 = (float4)(normalize(cross(normalVector, segment)).xyz, 0.f);
+ float4 p2 = (float4)(normalize(cross(p1, normalVector)).xyz, 0.f);
+ // Full friction is sum of velocities in each direction of plane
+ float4 frictionVector = p1*mydot3(relativeVelocity, p1) + p2*mydot3(relativeVelocity, p2);
+
+ // Real friction is peak friction corrected by friction coefficients
+ frictionVector = frictionVector * (colliderFriction*clothFriction);
+
+ float approachSpeed = dot(relativeVelocity, normalVector);
+
+ if( approachSpeed <= 0.0f )
+ forceOnVertex -= frictionVector;
+ }
+
+ }
+ }
+ }
+
+ g_vertexVelocities[nodeID] = (float4)(velocity.xyz, 0.f);
+
+ // Update external force
+ g_vertexForces[nodeID] = (float4)(forceOnVertex.xyz, 0.f);
+
+ g_vertexPositions[nodeID] = (float4)(position.xyz, 0.f);
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositions.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositions.cl
new file mode 100644
index 00000000..fe7aec66
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositions.cl
@@ -0,0 +1,57 @@
+
+
+
+MSTRINGIFY(
+
+
+float mydot3(float4 a, float4 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+
+__kernel void
+SolvePositionsFromLinksKernel(
+ const int startLink,
+ const int numLinks,
+ const float kst,
+ const float ti,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksMassLSC,
+ __global float * g_linksRestLengthSquared,
+ __global float * g_verticesInverseMass,
+ __global float4 * g_vertexPositions GUID_ARG)
+
+{
+ int linkID = get_global_id(0) + startLink;
+ if( get_global_id(0) < numLinks )
+ {
+ float massLSC = g_linksMassLSC[linkID];
+ float restLengthSquared = g_linksRestLengthSquared[linkID];
+
+ if( massLSC > 0.0f )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float4 position0 = g_vertexPositions[node0];
+ float4 position1 = g_vertexPositions[node1];
+
+ float inverseMass0 = g_verticesInverseMass[node0];
+ float inverseMass1 = g_verticesInverseMass[node1];
+
+ float4 del = position1 - position0;
+ float len = mydot3(del, del);
+ float k = ((restLengthSquared - len)/(massLSC*(restLengthSquared+len)))*kst;
+ position0 = position0 - del*(k*inverseMass0);
+ position1 = position1 + del*(k*inverseMass1);
+
+ g_vertexPositions[node0] = position0;
+ g_vertexPositions[node1] = position1;
+
+ }
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl
new file mode 100644
index 00000000..33163424
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/SolvePositionsSIMDBatched.cl
@@ -0,0 +1,130 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+MSTRINGIFY(
+
+float mydot3(float4 a, float4 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}
+
+__kernel __attribute__((reqd_work_group_size(WAVEFRONT_BLOCK_MULTIPLIER*WAVEFRONT_SIZE, 1, 1)))
+void
+SolvePositionsFromLinksKernel(
+ const int startWaveInBatch,
+ const int numWaves,
+ const float kst,
+ const float ti,
+ __global int2 *g_wavefrontBatchCountsVertexCounts,
+ __global int *g_vertexAddressesPerWavefront,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksMassLSC,
+ __global float * g_linksRestLengthSquared,
+ __global float * g_verticesInverseMass,
+ __global float4 * g_vertexPositions,
+ __local int2 *wavefrontBatchCountsVertexCounts,
+ __local float4 *vertexPositionSharedData,
+ __local float *vertexInverseMassSharedData)
+{
+ const int laneInWavefront = (get_global_id(0) & (WAVEFRONT_SIZE-1));
+ const int wavefront = startWaveInBatch + (get_global_id(0) / WAVEFRONT_SIZE);
+ const int firstWavefrontInBlock = startWaveInBatch + get_group_id(0) * WAVEFRONT_BLOCK_MULTIPLIER;
+ const int localWavefront = wavefront - firstWavefrontInBlock;
+
+ // Mask out in case there's a stray "wavefront" at the end that's been forced in through the multiplier
+ if( wavefront < (startWaveInBatch + numWaves) )
+ {
+ // Load the batch counts for the wavefronts
+
+ int2 batchesAndVerticesWithinWavefront = g_wavefrontBatchCountsVertexCounts[wavefront];
+ int batchesWithinWavefront = batchesAndVerticesWithinWavefront.x;
+ int verticesUsedByWave = batchesAndVerticesWithinWavefront.y;
+
+ // Load the vertices for the wavefronts
+ for( int vertex = laneInWavefront; vertex < verticesUsedByWave; vertex+=WAVEFRONT_SIZE )
+ {
+ int vertexAddress = g_vertexAddressesPerWavefront[wavefront*MAX_NUM_VERTICES_PER_WAVE + vertex];
+
+ vertexPositionSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex] = g_vertexPositions[vertexAddress];
+ vertexInverseMassSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex] = g_verticesInverseMass[vertexAddress];
+ }
+
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+ // Loop through the batches performing the solve on each in LDS
+ int baseDataLocationForWave = WAVEFRONT_SIZE * wavefront * MAX_BATCHES_PER_WAVE;
+
+ //for( int batch = 0; batch < batchesWithinWavefront; ++batch )
+
+ int batch = 0;
+ do
+ {
+ int baseDataLocation = baseDataLocationForWave + WAVEFRONT_SIZE * batch;
+ int locationOfValue = baseDataLocation + laneInWavefront;
+
+
+ // These loads should all be perfectly linear across the WF
+ int2 localVertexIndices = g_linksVertexIndices[locationOfValue];
+ float massLSC = g_linksMassLSC[locationOfValue];
+ float restLengthSquared = g_linksRestLengthSquared[locationOfValue];
+
+ // LDS vertex addresses based on logical wavefront number in block and loaded index
+ int vertexAddress0 = MAX_NUM_VERTICES_PER_WAVE * localWavefront + localVertexIndices.x;
+ int vertexAddress1 = MAX_NUM_VERTICES_PER_WAVE * localWavefront + localVertexIndices.y;
+
+ float4 position0 = vertexPositionSharedData[vertexAddress0];
+ float4 position1 = vertexPositionSharedData[vertexAddress1];
+
+ float inverseMass0 = vertexInverseMassSharedData[vertexAddress0];
+ float inverseMass1 = vertexInverseMassSharedData[vertexAddress1];
+
+ float4 del = position1 - position0;
+ float len = mydot3(del, del);
+
+ float k = 0;
+ if( massLSC > 0.0f )
+ {
+ k = ((restLengthSquared - len)/(massLSC*(restLengthSquared+len)))*kst;
+ }
+
+ position0 = position0 - del*(k*inverseMass0);
+ position1 = position1 + del*(k*inverseMass1);
+
+ // Ensure compiler does not re-order memory operations
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+ vertexPositionSharedData[vertexAddress0] = position0;
+ vertexPositionSharedData[vertexAddress1] = position1;
+
+ // Ensure compiler does not re-order memory operations
+ barrier(CLK_LOCAL_MEM_FENCE);
+
+
+ ++batch;
+ } while( batch < batchesWithinWavefront );
+
+ // Update the global memory vertices for the wavefronts
+ for( int vertex = laneInWavefront; vertex < verticesUsedByWave; vertex+=WAVEFRONT_SIZE )
+ {
+ int vertexAddress = g_vertexAddressesPerWavefront[wavefront*MAX_NUM_VERTICES_PER_WAVE + vertex];
+
+ g_vertexPositions[vertexAddress] = (float4)(vertexPositionSharedData[localWavefront*MAX_NUM_VERTICES_PER_WAVE + vertex].xyz, 0.f);
+ }
+
+ }
+
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateConstants.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateConstants.cl
new file mode 100644
index 00000000..488a5847
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateConstants.cl
@@ -0,0 +1,44 @@
+MSTRINGIFY(
+
+/*#define float3 float4
+
+float dot3(float3 a, float3 b)
+{
+ return a.x*b.x + a.y*b.y + a.z*b.z;
+}*/
+
+__kernel void
+UpdateConstantsKernel(
+ const int numLinks,
+ __global int2 * g_linksVertexIndices,
+ __global float4 * g_vertexPositions,
+ __global float * g_vertexInverseMasses,
+ __global float * g_linksMaterialLSC,
+ __global float * g_linksMassLSC,
+ __global float * g_linksRestLengthSquared,
+ __global float * g_linksRestLengths)
+{
+ int linkID = get_global_id(0);
+ if( linkID < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+ float linearStiffnessCoefficient = g_linksMaterialLSC[ linkID ];
+
+ float3 position0 = g_vertexPositions[node0].xyz;
+ float3 position1 = g_vertexPositions[node1].xyz;
+ float inverseMass0 = g_vertexInverseMasses[node0];
+ float inverseMass1 = g_vertexInverseMasses[node1];
+
+ float3 difference = position0 - position1;
+ float length2 = dot(difference, difference);
+ float length = sqrt(length2);
+
+ g_linksRestLengths[linkID] = length;
+ g_linksMassLSC[linkID] = (inverseMass0 + inverseMass1)/linearStiffnessCoefficient;
+ g_linksRestLengthSquared[linkID] = length*length;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNodes.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNodes.cl
new file mode 100644
index 00000000..9ad227b4
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNodes.cl
@@ -0,0 +1,39 @@
+MSTRINGIFY(
+
+
+__kernel void
+updateVelocitiesFromPositionsWithVelocitiesKernel(
+ int numNodes,
+ float isolverdt,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexPreviousPositions,
+ __global int * g_vertexClothIndices,
+ __global float *g_clothVelocityCorrectionCoefficients,
+ __global float * g_clothDampingFactor,
+ __global float4 * g_vertexVelocities,
+ __global float4 * g_vertexForces GUID_ARG)
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float4 position = g_vertexPositions[nodeID];
+ float4 previousPosition = g_vertexPreviousPositions[nodeID];
+ float4 velocity = g_vertexVelocities[nodeID];
+ int clothIndex = g_vertexClothIndices[nodeID];
+ float velocityCorrectionCoefficient = g_clothVelocityCorrectionCoefficients[clothIndex];
+ float dampingFactor = g_clothDampingFactor[clothIndex];
+ float velocityCoefficient = (1.f - dampingFactor);
+
+ float4 difference = position - previousPosition;
+
+ velocity += difference*velocityCorrectionCoefficient*isolverdt;
+
+ // Damp the velocity
+ velocity *= velocityCoefficient;
+
+ g_vertexVelocities[nodeID] = velocity;
+ g_vertexForces[nodeID] = (float4)(0.f, 0.f, 0.f, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNormals.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNormals.cl
new file mode 100644
index 00000000..7bb23341
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdateNormals.cl
@@ -0,0 +1,102 @@
+MSTRINGIFY(
+
+float length3(float4 a)
+{
+ a.w = 0;
+ return length(a);
+}
+
+float4 normalize3(float4 a)
+{
+ a.w = 0;
+ return normalize(a);
+}
+
+__kernel void
+ResetNormalsAndAreasKernel(
+ const unsigned int numNodes,
+ __global float4 * g_vertexNormals,
+ __global float * g_vertexArea GUID_ARG)
+{
+ if( get_global_id(0) < numNodes )
+ {
+ g_vertexNormals[get_global_id(0)] = (float4)(0.0f, 0.0f, 0.0f, 0.0f);
+ g_vertexArea[get_global_id(0)] = 0.0f;
+ }
+}
+
+
+__kernel void
+UpdateSoftBodiesKernel(
+ const unsigned int startFace,
+ const unsigned int numFaces,
+ __global int4 * g_triangleVertexIndexSet,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexNormals,
+ __global float * g_vertexArea,
+ __global float4 * g_triangleNormals,
+ __global float * g_triangleArea GUID_ARG)
+{
+ int faceID = get_global_id(0) + startFace;
+ if( get_global_id(0) < numFaces )
+ {
+ int4 triangleIndexSet = g_triangleVertexIndexSet[ faceID ];
+ int nodeIndex0 = triangleIndexSet.x;
+ int nodeIndex1 = triangleIndexSet.y;
+ int nodeIndex2 = triangleIndexSet.z;
+
+ float4 node0 = g_vertexPositions[nodeIndex0];
+ float4 node1 = g_vertexPositions[nodeIndex1];
+ float4 node2 = g_vertexPositions[nodeIndex2];
+ float4 nodeNormal0 = g_vertexNormals[nodeIndex0];
+ float4 nodeNormal1 = g_vertexNormals[nodeIndex1];
+ float4 nodeNormal2 = g_vertexNormals[nodeIndex2];
+ float vertexArea0 = g_vertexArea[nodeIndex0];
+ float vertexArea1 = g_vertexArea[nodeIndex1];
+ float vertexArea2 = g_vertexArea[nodeIndex2];
+
+ float4 vector0 = node1 - node0;
+ float4 vector1 = node2 - node0;
+
+ float4 faceNormal = cross(vector0, vector1);
+ float triangleArea = length(faceNormal);
+
+ nodeNormal0 = nodeNormal0 + faceNormal;
+ nodeNormal1 = nodeNormal1 + faceNormal;
+ nodeNormal2 = nodeNormal2 + faceNormal;
+ vertexArea0 = vertexArea0 + triangleArea;
+ vertexArea1 = vertexArea1 + triangleArea;
+ vertexArea2 = vertexArea2 + triangleArea;
+
+ g_triangleNormals[faceID] = normalize3(faceNormal);
+ g_vertexNormals[nodeIndex0] = nodeNormal0;
+ g_vertexNormals[nodeIndex1] = nodeNormal1;
+ g_vertexNormals[nodeIndex2] = nodeNormal2;
+ g_triangleArea[faceID] = triangleArea;
+ g_vertexArea[nodeIndex0] = vertexArea0;
+ g_vertexArea[nodeIndex1] = vertexArea1;
+ g_vertexArea[nodeIndex2] = vertexArea2;
+ }
+}
+
+__kernel void
+NormalizeNormalsAndAreasKernel(
+ const unsigned int numNodes,
+ __global int * g_vertexTriangleCount,
+ __global float4 * g_vertexNormals,
+ __global float * g_vertexArea GUID_ARG)
+{
+ if( get_global_id(0) < numNodes )
+ {
+ float4 normal = g_vertexNormals[get_global_id(0)];
+ float area = g_vertexArea[get_global_id(0)];
+ int numTriangles = g_vertexTriangleCount[get_global_id(0)];
+
+ float vectorLength = length3(normal);
+
+ g_vertexNormals[get_global_id(0)] = normalize3(normal);
+ g_vertexArea[get_global_id(0)] = area/(float)(numTriangles);
+ }
+}
+
+);
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositions.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositions.cl
new file mode 100644
index 00000000..3155a04e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositions.cl
@@ -0,0 +1,34 @@
+MSTRINGIFY(
+
+__kernel void
+updateVelocitiesFromPositionsWithoutVelocitiesKernel(
+ const int numNodes,
+ const float isolverdt,
+ __global float4 * g_vertexPositions,
+ __global float4 * g_vertexPreviousPositions,
+ __global int * g_vertexClothIndices,
+ __global float * g_clothDampingFactor,
+ __global float4 * g_vertexVelocities,
+ __global float4 * g_vertexForces GUID_ARG)
+
+{
+ int nodeID = get_global_id(0);
+ if( nodeID < numNodes )
+ {
+ float4 position = g_vertexPositions[nodeID];
+ float4 previousPosition = g_vertexPreviousPositions[nodeID];
+ float4 velocity = g_vertexVelocities[nodeID];
+ int clothIndex = g_vertexClothIndices[nodeID];
+ float dampingFactor = g_clothDampingFactor[clothIndex];
+ float velocityCoefficient = (1.f - dampingFactor);
+
+ float4 difference = position - previousPosition;
+
+ velocity = difference*velocityCoefficient*isolverdt;
+
+ g_vertexVelocities[nodeID] = velocity;
+ g_vertexForces[nodeID] = (float4)(0.f, 0.f, 0.f, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositionsFromVelocities.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositionsFromVelocities.cl
new file mode 100644
index 00000000..97e708bc
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/UpdatePositionsFromVelocities.cl
@@ -0,0 +1,28 @@
+
+MSTRINGIFY(
+
+
+
+
+__kernel void
+UpdatePositionsFromVelocitiesKernel(
+ const int numNodes,
+ const float solverSDT,
+ __global float4 * g_vertexVelocities,
+ __global float4 * g_vertexPreviousPositions,
+ __global float4 * g_vertexCurrentPosition GUID_ARG)
+{
+ int vertexID = get_global_id(0);
+ if( vertexID < numNodes )
+ {
+ float4 previousPosition = g_vertexPreviousPositions[vertexID];
+ float4 velocity = g_vertexVelocities[vertexID];
+
+ float4 newPosition = previousPosition + velocity*solverSDT;
+
+ g_vertexCurrentPosition[vertexID] = newPosition;
+ g_vertexPreviousPositions[vertexID] = newPosition;
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/VSolveLinks.cl b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/VSolveLinks.cl
new file mode 100644
index 00000000..a618d69c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/OpenCLC10/VSolveLinks.cl
@@ -0,0 +1,45 @@
+MSTRINGIFY(
+
+__kernel void
+VSolveLinksKernel(
+ int startLink,
+ int numLinks,
+ float kst,
+ __global int2 * g_linksVertexIndices,
+ __global float * g_linksLengthRatio,
+ __global float4 * g_linksCurrentLength,
+ __global float * g_vertexInverseMass,
+ __global float4 * g_vertexVelocity GUID_ARG)
+{
+ int linkID = get_global_id(0) + startLink;
+ if( get_global_id(0) < numLinks )
+ {
+ int2 nodeIndices = g_linksVertexIndices[linkID];
+ int node0 = nodeIndices.x;
+ int node1 = nodeIndices.y;
+
+ float linkLengthRatio = g_linksLengthRatio[linkID];
+ float3 linkCurrentLength = g_linksCurrentLength[linkID].xyz;
+
+ float3 vertexVelocity0 = g_vertexVelocity[node0].xyz;
+ float3 vertexVelocity1 = g_vertexVelocity[node1].xyz;
+
+ float vertexInverseMass0 = g_vertexInverseMass[node0];
+ float vertexInverseMass1 = g_vertexInverseMass[node1];
+
+ float3 nodeDifference = vertexVelocity0 - vertexVelocity1;
+ float dotResult = dot(linkCurrentLength, nodeDifference);
+ float j = -dotResult*linkLengthRatio*kst;
+
+ float3 velocityChange0 = linkCurrentLength*(j*vertexInverseMass0);
+ float3 velocityChange1 = linkCurrentLength*(j*vertexInverseMass1);
+
+ vertexVelocity0 += velocityChange0;
+ vertexVelocity1 -= velocityChange1;
+
+ g_vertexVelocity[node0] = (float4)(vertexVelocity0, 0.f);
+ g_vertexVelocity[node1] = (float4)(vertexVelocity1, 0.f);
+ }
+}
+
+); \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverBuffer_OpenCL.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverBuffer_OpenCL.h
new file mode 100644
index 00000000..61d474a7
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverBuffer_OpenCL.h
@@ -0,0 +1,209 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_BUFFER_OPENCL_H
+#define BT_SOFT_BODY_SOLVER_BUFFER_OPENCL_H
+
+// OpenCL support
+
+#ifdef USE_MINICL
+ #include "MiniCL/cl.h"
+#else //USE_MINICL
+ #ifdef __APPLE__
+ #include <OpenCL/OpenCL.h>
+ #else
+ #include <CL/cl.h>
+ #endif //__APPLE__
+#endif//USE_MINICL
+
+#ifndef SAFE_RELEASE
+#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
+#endif
+
+template <typename ElementType> class btOpenCLBuffer
+{
+public:
+
+ cl_command_queue m_cqCommandQue;
+ cl_context m_clContext;
+ cl_mem m_buffer;
+
+
+
+ btAlignedObjectArray< ElementType > * m_CPUBuffer;
+
+ int m_gpuSize;
+ bool m_onGPU;
+ bool m_readOnlyOnGPU;
+ bool m_allocated;
+
+
+ bool createBuffer( cl_mem* preexistingBuffer = 0)
+ {
+
+ cl_int err;
+
+
+ if( preexistingBuffer )
+ {
+ m_buffer = *preexistingBuffer;
+ }
+ else {
+
+ cl_mem_flags flags= m_readOnlyOnGPU ? CL_MEM_READ_ONLY : CL_MEM_READ_WRITE;
+
+ size_t size = m_CPUBuffer->size() * sizeof(ElementType);
+ // At a minimum the buffer must exist
+ if( size == 0 )
+ size = sizeof(ElementType);
+ m_buffer = clCreateBuffer(m_clContext, flags, size, 0, &err);
+ if( err != CL_SUCCESS )
+ {
+ btAssert( "Buffer::Buffer(m_buffer)");
+ }
+ }
+
+ m_gpuSize = m_CPUBuffer->size();
+
+ return true;
+ }
+
+public:
+ btOpenCLBuffer( cl_command_queue commandQue,cl_context ctx, btAlignedObjectArray< ElementType >* CPUBuffer, bool readOnly)
+ :m_cqCommandQue(commandQue),
+ m_clContext(ctx),
+ m_buffer(0),
+ m_CPUBuffer(CPUBuffer),
+ m_gpuSize(0),
+ m_onGPU(false),
+ m_readOnlyOnGPU(readOnly),
+ m_allocated(false)
+ {
+ }
+
+ ~btOpenCLBuffer()
+ {
+ clReleaseMemObject(m_buffer);
+ }
+
+
+ bool moveToGPU()
+ {
+
+
+ cl_int err;
+
+ if( (m_CPUBuffer->size() != m_gpuSize) )
+ {
+ m_onGPU = false;
+ }
+
+ if( !m_allocated && m_CPUBuffer->size() == 0 )
+ {
+ // If it isn't on the GPU and yet there is no data on the CPU side this may cause a problem with some kernels.
+ // We should create *something* on the device side
+ if (!createBuffer()) {
+ return false;
+ }
+ m_allocated = true;
+ }
+
+ if( !m_onGPU && m_CPUBuffer->size() > 0 )
+ {
+ if (!m_allocated || (m_CPUBuffer->size() != m_gpuSize)) {
+ if (!createBuffer()) {
+ return false;
+ }
+ m_allocated = true;
+ }
+
+ size_t size = m_CPUBuffer->size() * sizeof(ElementType);
+ err = clEnqueueWriteBuffer(m_cqCommandQue,m_buffer,
+ CL_FALSE,
+ 0,
+ size,
+ &((*m_CPUBuffer)[0]),0,0,0);
+ if( err != CL_SUCCESS )
+ {
+ btAssert( "CommandQueue::enqueueWriteBuffer(m_buffer)" );
+ }
+
+ m_onGPU = true;
+ }
+
+ return true;
+
+ }
+
+ bool moveFromGPU()
+ {
+
+ cl_int err;
+
+ if (m_CPUBuffer->size() > 0) {
+ if (m_onGPU && !m_readOnlyOnGPU) {
+ size_t size = m_CPUBuffer->size() * sizeof(ElementType);
+ err = clEnqueueReadBuffer(m_cqCommandQue,
+ m_buffer,
+ CL_TRUE,
+ 0,
+ size,
+ &((*m_CPUBuffer)[0]),0,0,0);
+
+ if( err != CL_SUCCESS )
+ {
+ btAssert( "CommandQueue::enqueueReadBuffer(m_buffer)" );
+ }
+
+ m_onGPU = false;
+ }
+ }
+
+ return true;
+ }
+
+ bool copyFromGPU()
+ {
+
+ cl_int err;
+ size_t size = m_CPUBuffer->size() * sizeof(ElementType);
+
+ if (m_CPUBuffer->size() > 0) {
+ if (m_onGPU && !m_readOnlyOnGPU) {
+ err = clEnqueueReadBuffer(m_cqCommandQue,
+ m_buffer,
+ CL_TRUE,
+ 0,size,
+ &((*m_CPUBuffer)[0]),0,0,0);
+
+ if( err != CL_SUCCESS )
+ {
+ btAssert( "CommandQueue::enqueueReadBuffer(m_buffer)");
+ }
+
+ }
+ }
+
+ return true;
+ }
+
+ virtual void changedOnCPU()
+ {
+ m_onGPU = false;
+ }
+}; // class btOpenCLBuffer
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_BUFFER_OPENCL_H \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCL.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCL.h
new file mode 100644
index 00000000..cef924f6
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCL.h
@@ -0,0 +1,99 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_OpenCL.h"
+
+
+#ifndef BT_SOFT_BODY_SOLVER_LINK_DATA_OPENCL_H
+#define BT_SOFT_BODY_SOLVER_LINK_DATA_OPENCL_H
+
+
+class btSoftBodyLinkDataOpenCL : public btSoftBodyLinkData
+{
+public:
+ bool m_onGPU;
+
+ cl_command_queue m_cqCommandQue;
+
+
+ btOpenCLBuffer<LinkNodePair> m_clLinks;
+ btOpenCLBuffer<float> m_clLinkStrength;
+ btOpenCLBuffer<float> m_clLinksMassLSC;
+ btOpenCLBuffer<float> m_clLinksRestLengthSquared;
+ btOpenCLBuffer<Vectormath::Aos::Vector3> m_clLinksCLength;
+ btOpenCLBuffer<float> m_clLinksLengthRatio;
+ btOpenCLBuffer<float> m_clLinksRestLength;
+ btOpenCLBuffer<float> m_clLinksMaterialLinearStiffnessCoefficient;
+
+ struct BatchPair
+ {
+ int start;
+ int length;
+
+ BatchPair() :
+ start(0),
+ length(0)
+ {
+ }
+
+ BatchPair( int s, int l ) :
+ start( s ),
+ length( l )
+ {
+ }
+ };
+
+ /**
+ * Link addressing information for each cloth.
+ * Allows link locations to be computed independently of data batching.
+ */
+ btAlignedObjectArray< int > m_linkAddresses;
+
+ /**
+ * Start and length values for computation batches over link data.
+ */
+ btAlignedObjectArray< BatchPair > m_batchStartLengths;
+
+ btSoftBodyLinkDataOpenCL(cl_command_queue queue, cl_context ctx);
+
+ virtual ~btSoftBodyLinkDataOpenCL();
+
+ /** Allocate enough space in all link-related arrays to fit numLinks links */
+ virtual void createLinks( int numLinks );
+
+ /** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+ virtual void setLinkAt(
+ const LinkDescription &link,
+ int linkIndex );
+
+ virtual bool onAccelerator();
+
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+
+ /**
+ * Generate (and later update) the batching for the entire link set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+ void generateBatches();
+};
+
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_LINK_DATA_OPENCL_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCLSIMDAware.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCLSIMDAware.h
new file mode 100644
index 00000000..5e351104
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverLinkData_OpenCLSIMDAware.h
@@ -0,0 +1,169 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_OpenCL.h"
+
+
+#ifndef BT_SOFT_BODY_SOLVER_LINK_DATA_OPENCL_SIMDAWARE_H
+#define BT_SOFT_BODY_SOLVER_LINK_DATA_OPENCL_SIMDAWARE_H
+
+
+class btSoftBodyLinkDataOpenCLSIMDAware : public btSoftBodyLinkData
+{
+public:
+ bool m_onGPU;
+
+ cl_command_queue m_cqCommandQue;
+
+ const int m_wavefrontSize;
+ const int m_linksPerWorkItem;
+ const int m_maxLinksPerWavefront;
+ int m_maxBatchesWithinWave;
+ int m_maxVerticesWithinWave;
+ int m_numWavefronts;
+
+ int m_maxVertex;
+
+ struct NumBatchesVerticesPair
+ {
+ int numBatches;
+ int numVertices;
+ };
+
+ btAlignedObjectArray<int> m_linksPerWavefront;
+ btAlignedObjectArray<NumBatchesVerticesPair> m_numBatchesAndVerticesWithinWaves;
+ btOpenCLBuffer< NumBatchesVerticesPair > m_clNumBatchesAndVerticesWithinWaves;
+
+ // All arrays here will contain batches of m_maxLinksPerWavefront links
+ // ordered by wavefront.
+ // with either global vertex pairs or local vertex pairs
+ btAlignedObjectArray< int > m_wavefrontVerticesGlobalAddresses; // List of global vertices per wavefront
+ btOpenCLBuffer<int> m_clWavefrontVerticesGlobalAddresses;
+ btAlignedObjectArray< LinkNodePair > m_linkVerticesLocalAddresses; // Vertex pair for the link
+ btOpenCLBuffer<LinkNodePair> m_clLinkVerticesLocalAddresses;
+ btOpenCLBuffer<float> m_clLinkStrength;
+ btOpenCLBuffer<float> m_clLinksMassLSC;
+ btOpenCLBuffer<float> m_clLinksRestLengthSquared;
+ btOpenCLBuffer<float> m_clLinksRestLength;
+ btOpenCLBuffer<float> m_clLinksMaterialLinearStiffnessCoefficient;
+
+ struct BatchPair
+ {
+ int start;
+ int length;
+
+ BatchPair() :
+ start(0),
+ length(0)
+ {
+ }
+
+ BatchPair( int s, int l ) :
+ start( s ),
+ length( l )
+ {
+ }
+ };
+
+ /**
+ * Link addressing information for each cloth.
+ * Allows link locations to be computed independently of data batching.
+ */
+ btAlignedObjectArray< int > m_linkAddresses;
+
+ /**
+ * Start and length values for computation batches over link data.
+ */
+ btAlignedObjectArray< BatchPair > m_wavefrontBatchStartLengths;
+
+ btSoftBodyLinkDataOpenCLSIMDAware(cl_command_queue queue, cl_context ctx);
+
+ virtual ~btSoftBodyLinkDataOpenCLSIMDAware();
+
+ /** Allocate enough space in all link-related arrays to fit numLinks links */
+ virtual void createLinks( int numLinks );
+
+ /** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+ virtual void setLinkAt(
+ const LinkDescription &link,
+ int linkIndex );
+
+ virtual bool onAccelerator();
+
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+
+ /**
+ * Generate (and later update) the batching for the entire link set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+ void generateBatches();
+
+ int getMaxVerticesPerWavefront()
+ {
+ return m_maxVerticesWithinWave;
+ }
+
+ int getWavefrontSize()
+ {
+ return m_wavefrontSize;
+ }
+
+ int getLinksPerWorkItem()
+ {
+ return m_linksPerWorkItem;
+ }
+
+ int getMaxLinksPerWavefront()
+ {
+ return m_maxLinksPerWavefront;
+ }
+
+ int getMaxBatchesPerWavefront()
+ {
+ return m_maxBatchesWithinWave;
+ }
+
+ int getNumWavefronts()
+ {
+ return m_numWavefronts;
+ }
+
+ NumBatchesVerticesPair getNumBatchesAndVerticesWithinWavefront( int wavefront )
+ {
+ return m_numBatchesAndVerticesWithinWaves[wavefront];
+ }
+
+ int getVertexGlobalAddresses( int vertexIndex )
+ {
+ return m_wavefrontVerticesGlobalAddresses[vertexIndex];
+ }
+
+ /**
+ * Get post-batching local addresses of the vertex pair for a link assuming all vertices used by a wavefront are loaded locally.
+ */
+ LinkNodePair getVertexPairLocalAddresses( int linkIndex )
+ {
+ return m_linkVerticesLocalAddresses[linkIndex];
+ }
+};
+
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_LINK_DATA_OPENCL_SIMDAWARE_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.cpp b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.cpp
new file mode 100644
index 00000000..b00795a9
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.cpp
@@ -0,0 +1,133 @@
+#include "btSoftBodySolverOutputCLtoGL.h"
+#include <stdio.h> //@todo: remove the debugging printf at some stage
+#include "btSoftBodySolver_OpenCL.h"
+#include "BulletSoftBody/btSoftBodySolverVertexBuffer.h"
+#include "btSoftBodySolverVertexBuffer_OpenGL.h"
+#include "BulletSoftBody/btSoftBody.h"
+
+#if (0)//CL_VERSION_1_1 == 1)
+ //OpenCL 1.1 kernels use float3
+#define MSTRINGIFY(A) #A
+static char* OutputToVertexArrayCLString =
+#include "OpenCLC/OutputToVertexArray.cl"
+#else
+////OpenCL 1.0 kernels don't use float3
+#define MSTRINGIFY(A) #A
+static char* OutputToVertexArrayCLString =
+#include "OpenCLC10/OutputToVertexArray.cl"
+#endif //CL_VERSION_1_1
+
+
+#define RELEASE_CL_KERNEL(kernelName) {if( kernelName ){ clReleaseKernel( kernelName ); kernelName = 0; }}
+
+static const size_t workGroupSize = 128;
+
+void btSoftBodySolverOutputCLtoGL::copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer )
+{
+
+ btSoftBodySolver *solver = softBody->getSoftBodySolver();
+ btAssert( solver->getSolverType() == btSoftBodySolver::CL_SOLVER || solver->getSolverType() == btSoftBodySolver::CL_SIMD_SOLVER );
+ btOpenCLSoftBodySolver *dxSolver = static_cast< btOpenCLSoftBodySolver * >( solver );
+ checkInitialized();
+ btOpenCLAcceleratedSoftBodyInterface* currentCloth = dxSolver->findSoftBodyInterface( softBody );
+ btSoftBodyVertexDataOpenCL &vertexData( dxSolver->m_vertexData );
+
+ const int firstVertex = currentCloth->getFirstVertex();
+ const int lastVertex = firstVertex + currentCloth->getNumVertices();
+
+ if( vertexBuffer->getBufferType() == btVertexBufferDescriptor::OPENGL_BUFFER ) {
+
+ const btOpenGLInteropVertexBufferDescriptor *openGLVertexBuffer = static_cast< btOpenGLInteropVertexBufferDescriptor* >(vertexBuffer);
+ cl_int ciErrNum = CL_SUCCESS;
+
+ cl_mem clBuffer = openGLVertexBuffer->getBuffer();
+ cl_kernel outputKernel = outputToVertexArrayWithNormalsKernel;
+ if( !vertexBuffer->hasNormals() )
+ outputKernel = outputToVertexArrayWithoutNormalsKernel;
+
+ ciErrNum = clEnqueueAcquireGLObjects(m_cqCommandQue, 1, &clBuffer, 0, 0, NULL);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "clEnqueueAcquireGLObjects(copySoftBodyToVertexBuffer)");
+ }
+
+ int numVertices = currentCloth->getNumVertices();
+
+ ciErrNum = clSetKernelArg(outputKernel, 0, sizeof(int), &firstVertex );
+ ciErrNum = clSetKernelArg(outputKernel, 1, sizeof(int), &numVertices );
+ ciErrNum = clSetKernelArg(outputKernel, 2, sizeof(cl_mem), (void*)&clBuffer );
+ if( vertexBuffer->hasVertexPositions() )
+ {
+ int vertexOffset = vertexBuffer->getVertexOffset();
+ int vertexStride = vertexBuffer->getVertexStride();
+ ciErrNum = clSetKernelArg(outputKernel, 3, sizeof(int), &vertexOffset );
+ ciErrNum = clSetKernelArg(outputKernel, 4, sizeof(int), &vertexStride );
+ ciErrNum = clSetKernelArg(outputKernel, 5, sizeof(cl_mem), (void*)&vertexData.m_clVertexPosition.m_buffer );
+
+ }
+ if( vertexBuffer->hasNormals() )
+ {
+ int normalOffset = vertexBuffer->getNormalOffset();
+ int normalStride = vertexBuffer->getNormalStride();
+ ciErrNum = clSetKernelArg(outputKernel, 6, sizeof(int), &normalOffset );
+ ciErrNum = clSetKernelArg(outputKernel, 7, sizeof(int), &normalStride );
+ ciErrNum = clSetKernelArg(outputKernel, 8, sizeof(cl_mem), (void*)&vertexData.m_clVertexNormal.m_buffer );
+
+ }
+ size_t numWorkItems = workGroupSize*((vertexData.getNumVertices() + (workGroupSize-1)) / workGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue, outputKernel, 1, NULL, &numWorkItems, &workGroupSize,0 ,0 ,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(copySoftBodyToVertexBuffer)");
+ }
+
+ ciErrNum = clEnqueueReleaseGLObjects(m_cqCommandQue, 1, &clBuffer, 0, 0, 0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "clEnqueueReleaseGLObjects(copySoftBodyToVertexBuffer)");
+ }
+ } else {
+ btAssert( "Undefined output for this solver output" == false );
+ }
+
+ // clFinish in here may not be the best thing. It's possible that we should have a waitForFrameComplete function.
+ clFinish(m_cqCommandQue);
+
+} // btSoftBodySolverOutputCLtoGL::outputToVertexBuffers
+
+bool btSoftBodySolverOutputCLtoGL::buildShaders()
+{
+ // Ensure current kernels are released first
+ releaseKernels();
+
+ bool returnVal = true;
+
+ if( m_shadersInitialized )
+ return true;
+
+ outputToVertexArrayWithNormalsKernel = clFunctions.compileCLKernelFromString( OutputToVertexArrayCLString, "OutputToVertexArrayWithNormalsKernel" );
+ outputToVertexArrayWithoutNormalsKernel = clFunctions.compileCLKernelFromString( OutputToVertexArrayCLString, "OutputToVertexArrayWithoutNormalsKernel" );
+
+
+ if( returnVal )
+ m_shadersInitialized = true;
+
+ return returnVal;
+} // btSoftBodySolverOutputCLtoGL::buildShaders
+
+void btSoftBodySolverOutputCLtoGL::releaseKernels()
+{
+ RELEASE_CL_KERNEL( outputToVertexArrayWithNormalsKernel );
+ RELEASE_CL_KERNEL( outputToVertexArrayWithoutNormalsKernel );
+
+ m_shadersInitialized = false;
+} // btSoftBodySolverOutputCLtoGL::releaseKernels
+
+bool btSoftBodySolverOutputCLtoGL::checkInitialized()
+{
+ if( !m_shadersInitialized )
+ if( buildShaders() )
+ m_shadersInitialized = true;
+
+ return m_shadersInitialized;
+} \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.h
new file mode 100644
index 00000000..45279b0c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverOutputCLtoGL.h
@@ -0,0 +1,62 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_OUTPUT_CL_TO_GL_H
+#define BT_SOFT_BODY_SOLVER_OUTPUT_CL_TO_GL_H
+
+#include "btSoftBodySolver_OpenCL.h"
+
+/**
+ * Class to manage movement of data from a solver to a given target.
+ * This version is the CL to GL interop version.
+ */
+class btSoftBodySolverOutputCLtoGL : public btSoftBodySolverOutput
+{
+protected:
+ cl_command_queue m_cqCommandQue;
+ cl_context m_cxMainContext;
+ CLFunctions clFunctions;
+
+ cl_kernel outputToVertexArrayWithNormalsKernel;
+ cl_kernel outputToVertexArrayWithoutNormalsKernel;
+
+ bool m_shadersInitialized;
+
+ virtual bool checkInitialized();
+ virtual bool buildShaders();
+ void releaseKernels();
+public:
+ btSoftBodySolverOutputCLtoGL(cl_command_queue cqCommandQue, cl_context cxMainContext) :
+ m_cqCommandQue( cqCommandQue ),
+ m_cxMainContext( cxMainContext ),
+ clFunctions(cqCommandQue, cxMainContext),
+ outputToVertexArrayWithNormalsKernel( 0 ),
+ outputToVertexArrayWithoutNormalsKernel( 0 ),
+ m_shadersInitialized( false )
+ {
+ }
+
+ virtual ~btSoftBodySolverOutputCLtoGL()
+ {
+ releaseKernels();
+ }
+
+ /** Output current computed vertex data to the vertex buffers for all cloths in the solver. */
+ virtual void copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer );
+};
+
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_OUTPUT_CL_TO_GL_H \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverTriangleData_OpenCL.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverTriangleData_OpenCL.h
new file mode 100644
index 00000000..e1094e38
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverTriangleData_OpenCL.h
@@ -0,0 +1,84 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_OpenCL.h"
+
+
+#ifndef BT_SOFT_BODY_SOLVER_TRIANGLE_DATA_OPENCL_H
+#define BT_SOFT_BODY_SOLVER_TRIANGLE_DATA_OPENCL_H
+
+
+class btSoftBodyTriangleDataOpenCL : public btSoftBodyTriangleData
+{
+public:
+ bool m_onGPU;
+ cl_command_queue m_queue;
+
+ btOpenCLBuffer<btSoftBodyTriangleData::TriangleNodeSet> m_clVertexIndices;
+ btOpenCLBuffer<float> m_clArea;
+ btOpenCLBuffer<Vectormath::Aos::Vector3> m_clNormal;
+
+ /**
+ * Link addressing information for each cloth.
+ * Allows link locations to be computed independently of data batching.
+ */
+ btAlignedObjectArray< int > m_triangleAddresses;
+
+ /**
+ * Start and length values for computation batches over link data.
+ */
+ struct btSomePair
+ {
+ btSomePair() {}
+ btSomePair(int f,int s)
+ :first(f),second(s)
+ {
+ }
+ int first;
+ int second;
+ };
+ btAlignedObjectArray< btSomePair > m_batchStartLengths;
+
+public:
+ btSoftBodyTriangleDataOpenCL( cl_command_queue queue, cl_context ctx );
+
+ virtual ~btSoftBodyTriangleDataOpenCL();
+
+ /** Allocate enough space in all link-related arrays to fit numLinks links */
+ virtual void createTriangles( int numTriangles );
+
+ /** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+ virtual void setTriangleAt( const btSoftBodyTriangleData::TriangleDescription &triangle, int triangleIndex );
+
+ virtual bool onAccelerator();
+
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+
+ /**
+ * Generate (and later update) the batching for the entire triangle set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+ void generateBatches();
+}; // class btSoftBodyTriangleDataOpenCL
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_TRIANGLE_DATA_OPENCL_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexBuffer_OpenGL.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexBuffer_OpenGL.h
new file mode 100644
index 00000000..3a30b0ec
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexBuffer_OpenGL.h
@@ -0,0 +1,166 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_OPENGL_H
+#define BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_OPENGL_H
+
+
+#include "BulletSoftBody/btSoftBodySolverVertexBuffer.h"
+#ifdef USE_MINICL
+ #include "MiniCL/cl.h"
+#else //USE_MINICL
+ #ifdef __APPLE__
+ #include <OpenCL/OpenCL.h>
+ #else
+ #include <CL/cl.h>
+ #include <CL/cl_gl.h>
+ #endif //__APPLE__
+#endif//USE_MINICL
+
+
+#ifdef _WIN32//for glut.h
+#include <windows.h>
+#endif
+
+//think different
+#if defined(__APPLE__) && !defined (VMDMESA)
+#include <OpenGL/OpenGL.h>
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#include <GLUT/glut.h>
+#else
+
+
+#ifdef _WINDOWS
+#include <windows.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
+#else
+#include <GL/glut.h>
+#endif //_WINDOWS
+#endif //APPLE
+
+
+
+class btOpenGLInteropVertexBufferDescriptor : public btVertexBufferDescriptor
+{
+protected:
+ /** OpenCL context */
+ cl_context m_context;
+
+ /** OpenCL command queue */
+ cl_command_queue m_commandQueue;
+
+ /** OpenCL interop buffer */
+ cl_mem m_buffer;
+
+ /** VBO in GL that is the basis of the interop buffer */
+ GLuint m_openGLVBO;
+
+
+public:
+ /**
+ * context is the OpenCL context this interop buffer will work in.
+ * queue is the command queue that kernels and data movement will be enqueued into.
+ * openGLVBO is the OpenGL vertex buffer data will be copied into.
+ * vertexOffset is the offset in floats to the first vertex.
+ * vertexStride is the stride in floats between vertices.
+ */
+ btOpenGLInteropVertexBufferDescriptor( cl_command_queue cqCommandQue, cl_context context, GLuint openGLVBO, int vertexOffset, int vertexStride )
+ {
+#ifndef USE_MINICL
+ cl_int ciErrNum = CL_SUCCESS;
+ m_context = context;
+ m_commandQueue = cqCommandQue;
+
+ m_vertexOffset = vertexOffset;
+ m_vertexStride = vertexStride;
+
+ m_openGLVBO = openGLVBO;
+
+ m_buffer = clCreateFromGLBuffer(m_context, CL_MEM_WRITE_ONLY, openGLVBO, &ciErrNum);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "clEnqueueAcquireGLObjects(copySoftBodyToVertexBuffer)");
+ }
+
+ m_hasVertexPositions = true;
+#else
+ btAssert(0);//MiniCL shouldn't get here
+#endif
+ }
+
+ /**
+ * context is the OpenCL context this interop buffer will work in.
+ * queue is the command queue that kernels and data movement will be enqueued into.
+ * openGLVBO is the OpenGL vertex buffer data will be copied into.
+ * vertexOffset is the offset in floats to the first vertex.
+ * vertexStride is the stride in floats between vertices.
+ * normalOffset is the offset in floats to the first normal.
+ * normalStride is the stride in floats between normals.
+ */
+ btOpenGLInteropVertexBufferDescriptor( cl_command_queue cqCommandQue, cl_context context, GLuint openGLVBO, int vertexOffset, int vertexStride, int normalOffset, int normalStride )
+ {
+#ifndef USE_MINICL
+ cl_int ciErrNum = CL_SUCCESS;
+ m_context = context;
+ m_commandQueue = cqCommandQue;
+
+ m_openGLVBO = openGLVBO;
+
+ m_buffer = clCreateFromGLBuffer(m_context, CL_MEM_WRITE_ONLY, openGLVBO, &ciErrNum);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "clEnqueueAcquireGLObjects(copySoftBodyToVertexBuffer)");
+ }
+
+ m_vertexOffset = vertexOffset;
+ m_vertexStride = vertexStride;
+ m_hasVertexPositions = true;
+
+ m_normalOffset = normalOffset;
+ m_normalStride = normalStride;
+ m_hasNormals = true;
+#else
+ btAssert(0);
+#endif //USE_MINICL
+
+ }
+
+ virtual ~btOpenGLInteropVertexBufferDescriptor()
+ {
+ clReleaseMemObject( m_buffer );
+ }
+
+ /**
+ * Return the type of the vertex buffer descriptor.
+ */
+ virtual BufferTypes getBufferType() const
+ {
+ return OPENGL_BUFFER;
+ }
+
+ virtual cl_context getContext() const
+ {
+ return m_context;
+ }
+
+ virtual cl_mem getBuffer() const
+ {
+ return m_buffer;
+ }
+};
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_OPENGL_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexData_OpenCL.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexData_OpenCL.h
new file mode 100644
index 00000000..24997e72
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolverVertexData_OpenCL.h
@@ -0,0 +1,52 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletMultiThreaded/GpuSoftBodySolvers/CPU/btSoftBodySolverData.h"
+#include "btSoftBodySolverBuffer_OpenCL.h"
+
+#ifndef BT_SOFT_BODY_SOLVER_VERTEX_DATA_OPENCL_H
+#define BT_SOFT_BODY_SOLVER_VERTEX_DATA_OPENCL_H
+
+
+class btSoftBodyVertexDataOpenCL : public btSoftBodyVertexData
+{
+protected:
+ bool m_onGPU;
+ cl_command_queue m_queue;
+
+public:
+ btOpenCLBuffer<int> m_clClothIdentifier;
+ btOpenCLBuffer<Vectormath::Aos::Point3> m_clVertexPosition;
+ btOpenCLBuffer<Vectormath::Aos::Point3> m_clVertexPreviousPosition;
+ btOpenCLBuffer<Vectormath::Aos::Vector3> m_clVertexVelocity;
+ btOpenCLBuffer<Vectormath::Aos::Vector3> m_clVertexForceAccumulator;
+ btOpenCLBuffer<Vectormath::Aos::Vector3> m_clVertexNormal;
+ btOpenCLBuffer<float> m_clVertexInverseMass;
+ btOpenCLBuffer<float> m_clVertexArea;
+ btOpenCLBuffer<int> m_clVertexTriangleCount;
+public:
+ btSoftBodyVertexDataOpenCL( cl_command_queue queue, cl_context ctx);
+
+ virtual ~btSoftBodyVertexDataOpenCL();
+
+ virtual bool onAccelerator();
+
+ virtual bool moveToAccelerator();
+
+ virtual bool moveFromAccelerator();
+};
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_VERTEX_DATA_OPENCL_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.cpp b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.cpp
new file mode 100644
index 00000000..fe47bb41
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.cpp
@@ -0,0 +1,1676 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "vectormath/vmInclude.h"
+#include <stdio.h> //@todo: remove the debugging printf at some stage
+#include "btSoftBodySolver_OpenCL.h"
+#include "BulletSoftBody/btSoftBodySolverVertexBuffer.h"
+#include "BulletSoftBody/btSoftBody.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+#include "LinearMath/btQuickprof.h"
+#include <limits.h>
+
+#ifdef USE_MINICL
+ #include "MiniCL/cl.h"
+#else //USE_MINICL
+ #ifdef __APPLE__
+ #include <OpenCL/OpenCL.h>
+ #else
+ #include <CL/cl.h>
+ #endif //__APPLE__
+#endif//USE_MINICL
+
+#define BT_DEFAULT_WORKGROUPSIZE 128
+
+
+
+#define RELEASE_CL_KERNEL(kernelName) {if( kernelName ){ clReleaseKernel( kernelName ); kernelName = 0; }}
+
+
+//CL_VERSION_1_1 seems broken on NVidia SDK so just disable it
+
+#if (0)//CL_VERSION_1_1 == 1)
+ //OpenCL 1.1 kernels use float3
+#define MSTRINGIFY(A) #A
+static const char* PrepareLinksCLString =
+#include "OpenCLC/PrepareLinks.cl"
+static const char* UpdatePositionsFromVelocitiesCLString =
+#include "OpenCLC/UpdatePositionsFromVelocities.cl"
+static const char* SolvePositionsCLString =
+#include "OpenCLC/SolvePositions.cl"
+static const char* UpdateNodesCLString =
+#include "OpenCLC/UpdateNodes.cl"
+static const char* UpdatePositionsCLString =
+#include "OpenCLC/UpdatePositions.cl"
+static const char* UpdateConstantsCLString =
+#include "OpenCLC/UpdateConstants.cl"
+static const char* IntegrateCLString =
+#include "OpenCLC/Integrate.cl"
+static const char* ApplyForcesCLString =
+#include "OpenCLC/ApplyForces.cl"
+static const char* UpdateNormalsCLString =
+#include "OpenCLC/UpdateNormals.cl"
+static const char* VSolveLinksCLString =
+#include "OpenCLC/VSolveLinks.cl"
+static const char* SolveCollisionsAndUpdateVelocitiesCLString =
+#include "OpenCLC/SolveCollisionsAndUpdateVelocities.cl"
+#else
+////OpenCL 1.0 kernels don't use float3
+#define MSTRINGIFY(A) #A
+static const char* PrepareLinksCLString =
+#include "OpenCLC10/PrepareLinks.cl"
+static const char* UpdatePositionsFromVelocitiesCLString =
+#include "OpenCLC10/UpdatePositionsFromVelocities.cl"
+static const char* SolvePositionsCLString =
+#include "OpenCLC10/SolvePositions.cl"
+static const char* UpdateNodesCLString =
+#include "OpenCLC10/UpdateNodes.cl"
+static const char* UpdatePositionsCLString =
+#include "OpenCLC10/UpdatePositions.cl"
+static const char* UpdateConstantsCLString =
+#include "OpenCLC10/UpdateConstants.cl"
+static const char* IntegrateCLString =
+#include "OpenCLC10/Integrate.cl"
+static const char* ApplyForcesCLString =
+#include "OpenCLC10/ApplyForces.cl"
+static const char* UpdateNormalsCLString =
+#include "OpenCLC10/UpdateNormals.cl"
+static const char* VSolveLinksCLString =
+#include "OpenCLC10/VSolveLinks.cl"
+static const char* SolveCollisionsAndUpdateVelocitiesCLString =
+#include "OpenCLC10/SolveCollisionsAndUpdateVelocities.cl"
+#endif //CL_VERSION_1_1
+
+
+btSoftBodyVertexDataOpenCL::btSoftBodyVertexDataOpenCL( cl_command_queue queue, cl_context ctx) :
+ m_queue(queue),
+ m_clClothIdentifier( queue, ctx, &m_clothIdentifier, false ),
+ m_clVertexPosition( queue, ctx, &m_vertexPosition, false ),
+ m_clVertexPreviousPosition( queue, ctx, &m_vertexPreviousPosition, false ),
+ m_clVertexVelocity( queue, ctx, &m_vertexVelocity, false ),
+ m_clVertexForceAccumulator( queue, ctx, &m_vertexForceAccumulator, false ),
+ m_clVertexNormal( queue, ctx, &m_vertexNormal, false ),
+ m_clVertexInverseMass( queue, ctx, &m_vertexInverseMass, false ),
+ m_clVertexArea( queue, ctx, &m_vertexArea, false ),
+ m_clVertexTriangleCount( queue, ctx, &m_vertexTriangleCount, false )
+{
+}
+
+btSoftBodyVertexDataOpenCL::~btSoftBodyVertexDataOpenCL()
+{
+
+}
+
+bool btSoftBodyVertexDataOpenCL::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyVertexDataOpenCL::moveToAccelerator()
+{
+ bool success = true;
+ success = success && m_clClothIdentifier.moveToGPU();
+ success = success && m_clVertexPosition.moveToGPU();
+ success = success && m_clVertexPreviousPosition.moveToGPU();
+ success = success && m_clVertexVelocity.moveToGPU();
+ success = success && m_clVertexForceAccumulator.moveToGPU();
+ success = success && m_clVertexNormal.moveToGPU();
+ success = success && m_clVertexInverseMass.moveToGPU();
+ success = success && m_clVertexArea.moveToGPU();
+ success = success && m_clVertexTriangleCount.moveToGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+bool btSoftBodyVertexDataOpenCL::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_clClothIdentifier.moveFromGPU();
+ success = success && m_clVertexPosition.moveFromGPU();
+ success = success && m_clVertexPreviousPosition.moveFromGPU();
+ success = success && m_clVertexVelocity.moveFromGPU();
+ success = success && m_clVertexForceAccumulator.moveFromGPU();
+ success = success && m_clVertexNormal.moveFromGPU();
+ success = success && m_clVertexInverseMass.moveFromGPU();
+ success = success && m_clVertexArea.moveFromGPU();
+ success = success && m_clVertexTriangleCount.moveFromGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+
+
+
+btSoftBodyLinkDataOpenCL::btSoftBodyLinkDataOpenCL(cl_command_queue queue, cl_context ctx)
+:m_cqCommandQue(queue),
+ m_clLinks( queue, ctx, &m_links, false ),
+ m_clLinkStrength( queue, ctx, &m_linkStrength, false ),
+ m_clLinksMassLSC( queue, ctx, &m_linksMassLSC, false ),
+ m_clLinksRestLengthSquared( queue, ctx, &m_linksRestLengthSquared, false ),
+ m_clLinksCLength( queue, ctx, &m_linksCLength, false ),
+ m_clLinksLengthRatio( queue, ctx, &m_linksLengthRatio, false ),
+ m_clLinksRestLength( queue, ctx, &m_linksRestLength, false ),
+ m_clLinksMaterialLinearStiffnessCoefficient( queue, ctx, &m_linksMaterialLinearStiffnessCoefficient, false )
+{
+}
+
+btSoftBodyLinkDataOpenCL::~btSoftBodyLinkDataOpenCL()
+{
+}
+
+static Vectormath::Aos::Vector3 toVector3( const btVector3 &vec )
+{
+ Vectormath::Aos::Vector3 outVec( vec.getX(), vec.getY(), vec.getZ() );
+ return outVec;
+}
+
+/** Allocate enough space in all link-related arrays to fit numLinks links */
+void btSoftBodyLinkDataOpenCL::createLinks( int numLinks )
+{
+ int previousSize = m_links.size();
+ int newSize = previousSize + numLinks;
+
+ btSoftBodyLinkData::createLinks( numLinks );
+
+ // Resize the link addresses array as well
+ m_linkAddresses.resize( newSize );
+}
+
+/** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+void btSoftBodyLinkDataOpenCL::setLinkAt(
+ const LinkDescription &link,
+ int linkIndex )
+{
+ btSoftBodyLinkData::setLinkAt( link, linkIndex );
+
+ // Set the link index correctly for initialisation
+ m_linkAddresses[linkIndex] = linkIndex;
+}
+
+bool btSoftBodyLinkDataOpenCL::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyLinkDataOpenCL::moveToAccelerator()
+{
+ bool success = true;
+ success = success && m_clLinks.moveToGPU();
+ success = success && m_clLinkStrength.moveToGPU();
+ success = success && m_clLinksMassLSC.moveToGPU();
+ success = success && m_clLinksRestLengthSquared.moveToGPU();
+ success = success && m_clLinksCLength.moveToGPU();
+ success = success && m_clLinksLengthRatio.moveToGPU();
+ success = success && m_clLinksRestLength.moveToGPU();
+ success = success && m_clLinksMaterialLinearStiffnessCoefficient.moveToGPU();
+
+ if( success ) {
+ m_onGPU = true;
+ }
+
+ return success;
+}
+
+bool btSoftBodyLinkDataOpenCL::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_clLinks.moveFromGPU();
+ success = success && m_clLinkStrength.moveFromGPU();
+ success = success && m_clLinksMassLSC.moveFromGPU();
+ success = success && m_clLinksRestLengthSquared.moveFromGPU();
+ success = success && m_clLinksCLength.moveFromGPU();
+ success = success && m_clLinksLengthRatio.moveFromGPU();
+ success = success && m_clLinksRestLength.moveFromGPU();
+ success = success && m_clLinksMaterialLinearStiffnessCoefficient.moveFromGPU();
+
+ if( success ) {
+ m_onGPU = false;
+ }
+
+ return success;
+}
+
+/**
+ * Generate (and later update) the batching for the entire link set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+void btSoftBodyLinkDataOpenCL::generateBatches()
+{
+ int numLinks = getNumLinks();
+
+ // Do the graph colouring here temporarily
+ btAlignedObjectArray< int > batchValues;
+ batchValues.resize( numLinks, 0 );
+
+ // Find the maximum vertex value internally for now
+ int maxVertex = 0;
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ int vertex0 = getVertexPair(linkIndex).vertex0;
+ int vertex1 = getVertexPair(linkIndex).vertex1;
+ if( vertex0 > maxVertex )
+ maxVertex = vertex0;
+ if( vertex1 > maxVertex )
+ maxVertex = vertex1;
+ }
+ int numVertices = maxVertex + 1;
+
+ // Set of lists, one for each node, specifying which colours are connected
+ // to that node.
+ // No two edges into a node can share a colour.
+ btAlignedObjectArray< btAlignedObjectArray< int > > vertexConnectedColourLists;
+ vertexConnectedColourLists.resize(numVertices);
+
+ // Simple algorithm that chooses the lowest batch number
+ // that none of the links attached to either of the connected
+ // nodes is in
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ int linkLocation = m_linkAddresses[linkIndex];
+
+ int vertex0 = getVertexPair(linkLocation).vertex0;
+ int vertex1 = getVertexPair(linkLocation).vertex1;
+
+ // Get the two node colour lists
+ btAlignedObjectArray< int > &colourListVertex0( vertexConnectedColourLists[vertex0] );
+ btAlignedObjectArray< int > &colourListVertex1( vertexConnectedColourLists[vertex1] );
+
+ // Choose the minimum colour that is in neither list
+ int colour = 0;
+ while( colourListVertex0.findLinearSearch(colour) != colourListVertex0.size() || colourListVertex1.findLinearSearch(colour) != colourListVertex1.size() )
+ ++colour;
+ // i should now be the minimum colour in neither list
+ // Add to the two lists so that future edges don't share
+ // And store the colour against this edge
+
+ colourListVertex0.push_back(colour);
+ colourListVertex1.push_back(colour);
+ batchValues[linkIndex] = colour;
+ }
+
+ // Check the colour counts
+ btAlignedObjectArray< int > batchCounts;
+ for( int i = 0; i < numLinks; ++i )
+ {
+ int batch = batchValues[i];
+ if( batch >= batchCounts.size() )
+ batchCounts.push_back(1);
+ else
+ ++(batchCounts[batch]);
+ }
+
+ m_batchStartLengths.resize(batchCounts.size());
+ if( m_batchStartLengths.size() > 0 )
+ {
+ m_batchStartLengths.resize(batchCounts.size());
+ m_batchStartLengths[0] = BatchPair(0, 0);
+
+ int sum = 0;
+ for( int batchIndex = 0; batchIndex < batchCounts.size(); ++batchIndex )
+ {
+ m_batchStartLengths[batchIndex].start = sum;
+ m_batchStartLengths[batchIndex].length = batchCounts[batchIndex];
+ sum += batchCounts[batchIndex];
+ }
+ }
+
+ /////////////////////////////
+ // Sort data based on batches
+
+ // Create source arrays by copying originals
+ btAlignedObjectArray<LinkNodePair> m_links_Backup(m_links);
+ btAlignedObjectArray<float> m_linkStrength_Backup(m_linkStrength);
+ btAlignedObjectArray<float> m_linksMassLSC_Backup(m_linksMassLSC);
+ btAlignedObjectArray<float> m_linksRestLengthSquared_Backup(m_linksRestLengthSquared);
+ btAlignedObjectArray<Vectormath::Aos::Vector3> m_linksCLength_Backup(m_linksCLength);
+ btAlignedObjectArray<float> m_linksLengthRatio_Backup(m_linksLengthRatio);
+ btAlignedObjectArray<float> m_linksRestLength_Backup(m_linksRestLength);
+ btAlignedObjectArray<float> m_linksMaterialLinearStiffnessCoefficient_Backup(m_linksMaterialLinearStiffnessCoefficient);
+
+
+ for( int batch = 0; batch < batchCounts.size(); ++batch )
+ batchCounts[batch] = 0;
+
+ // Do sort as single pass into destination arrays
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ // To maintain locations run off the original link locations rather than the current position.
+ // It's not cache efficient, but as we run this rarely that should not matter.
+ // It's faster than searching the link location array for the current location and then updating it.
+ // The other alternative would be to unsort before resorting, but this is equivalent to doing that.
+ int linkLocation = m_linkAddresses[linkIndex];
+
+ // Obtain batch and calculate target location for the
+ // next element in that batch, incrementing the batch counter
+ // afterwards
+ int batch = batchValues[linkIndex];
+ int newLocation = m_batchStartLengths[batch].start + batchCounts[batch];
+
+ batchCounts[batch] = batchCounts[batch] + 1;
+ m_links[newLocation] = m_links_Backup[linkLocation];
+#if 1
+ m_linkStrength[newLocation] = m_linkStrength_Backup[linkLocation];
+ m_linksMassLSC[newLocation] = m_linksMassLSC_Backup[linkLocation];
+ m_linksRestLengthSquared[newLocation] = m_linksRestLengthSquared_Backup[linkLocation];
+ m_linksLengthRatio[newLocation] = m_linksLengthRatio_Backup[linkLocation];
+ m_linksRestLength[newLocation] = m_linksRestLength_Backup[linkLocation];
+ m_linksMaterialLinearStiffnessCoefficient[newLocation] = m_linksMaterialLinearStiffnessCoefficient_Backup[linkLocation];
+#endif
+ // Update the locations array to account for the moved entry
+ m_linkAddresses[linkIndex] = newLocation;
+ }
+
+
+} // void generateBatches()
+
+
+
+
+
+btSoftBodyTriangleDataOpenCL::btSoftBodyTriangleDataOpenCL( cl_command_queue queue , cl_context ctx) :
+ m_queue( queue ),
+ m_clVertexIndices( queue, ctx, &m_vertexIndices, false ),
+ m_clArea( queue, ctx, &m_area, false ),
+ m_clNormal( queue, ctx, &m_normal, false )
+{
+}
+
+btSoftBodyTriangleDataOpenCL::~btSoftBodyTriangleDataOpenCL()
+{
+}
+
+/** Allocate enough space in all link-related arrays to fit numLinks links */
+void btSoftBodyTriangleDataOpenCL::createTriangles( int numTriangles )
+{
+ int previousSize = getNumTriangles();
+ int newSize = previousSize + numTriangles;
+
+ btSoftBodyTriangleData::createTriangles( numTriangles );
+
+ // Resize the link addresses array as well
+ m_triangleAddresses.resize( newSize );
+}
+
+/** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+void btSoftBodyTriangleDataOpenCL::setTriangleAt( const btSoftBodyTriangleData::TriangleDescription &triangle, int triangleIndex )
+{
+ btSoftBodyTriangleData::setTriangleAt( triangle, triangleIndex );
+
+ m_triangleAddresses[triangleIndex] = triangleIndex;
+}
+
+bool btSoftBodyTriangleDataOpenCL::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyTriangleDataOpenCL::moveToAccelerator()
+{
+ bool success = true;
+ success = success && m_clVertexIndices.moveToGPU();
+ success = success && m_clArea.moveToGPU();
+ success = success && m_clNormal.moveToGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+bool btSoftBodyTriangleDataOpenCL::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_clVertexIndices.moveFromGPU();
+ success = success && m_clArea.moveFromGPU();
+ success = success && m_clNormal.moveFromGPU();
+
+ if( success )
+ m_onGPU = true;
+
+ return success;
+}
+
+/**
+ * Generate (and later update) the batching for the entire triangle set.
+ * This redoes a lot of work because it batches the entire set when each cloth is inserted.
+ * In theory we could delay it until just before we need the cloth.
+ * It's a one-off overhead, though, so that is a later optimisation.
+ */
+void btSoftBodyTriangleDataOpenCL::generateBatches()
+{
+ int numTriangles = getNumTriangles();
+ if( numTriangles == 0 )
+ return;
+
+ // Do the graph colouring here temporarily
+ btAlignedObjectArray< int > batchValues;
+ batchValues.resize( numTriangles );
+
+ // Find the maximum vertex value internally for now
+ int maxVertex = 0;
+ for( int triangleIndex = 0; triangleIndex < numTriangles; ++triangleIndex )
+ {
+ int vertex0 = getVertexSet(triangleIndex).vertex0;
+ int vertex1 = getVertexSet(triangleIndex).vertex1;
+ int vertex2 = getVertexSet(triangleIndex).vertex2;
+
+ if( vertex0 > maxVertex )
+ maxVertex = vertex0;
+ if( vertex1 > maxVertex )
+ maxVertex = vertex1;
+ if( vertex2 > maxVertex )
+ maxVertex = vertex2;
+ }
+ int numVertices = maxVertex + 1;
+
+ // Set of lists, one for each node, specifying which colours are connected
+ // to that node.
+ // No two edges into a node can share a colour.
+ btAlignedObjectArray< btAlignedObjectArray< int > > vertexConnectedColourLists;
+ vertexConnectedColourLists.resize(numVertices);
+
+
+ //std::cout << "\n";
+ // Simple algorithm that chooses the lowest batch number
+ // that none of the faces attached to either of the connected
+ // nodes is in
+ for( int triangleIndex = 0; triangleIndex < numTriangles; ++triangleIndex )
+ {
+ // To maintain locations run off the original link locations rather than the current position.
+ // It's not cache efficient, but as we run this rarely that should not matter.
+ // It's faster than searching the link location array for the current location and then updating it.
+ // The other alternative would be to unsort before resorting, but this is equivalent to doing that.
+ int triangleLocation = m_triangleAddresses[triangleIndex];
+
+ int vertex0 = getVertexSet(triangleLocation).vertex0;
+ int vertex1 = getVertexSet(triangleLocation).vertex1;
+ int vertex2 = getVertexSet(triangleLocation).vertex2;
+
+ // Get the three node colour lists
+ btAlignedObjectArray< int > &colourListVertex0( vertexConnectedColourLists[vertex0] );
+ btAlignedObjectArray< int > &colourListVertex1( vertexConnectedColourLists[vertex1] );
+ btAlignedObjectArray< int > &colourListVertex2( vertexConnectedColourLists[vertex2] );
+
+ // Choose the minimum colour that is in none of the lists
+ int colour = 0;
+ while(
+ colourListVertex0.findLinearSearch(colour) != colourListVertex0.size() ||
+ colourListVertex1.findLinearSearch(colour) != colourListVertex1.size() ||
+ colourListVertex2.findLinearSearch(colour) != colourListVertex2.size() )
+ {
+ ++colour;
+ }
+ // i should now be the minimum colour in neither list
+ // Add to the three lists so that future edges don't share
+ // And store the colour against this face
+ colourListVertex0.push_back(colour);
+ colourListVertex1.push_back(colour);
+ colourListVertex2.push_back(colour);
+
+ batchValues[triangleIndex] = colour;
+ }
+
+
+ // Check the colour counts
+ btAlignedObjectArray< int > batchCounts;
+ for( int i = 0; i < numTriangles; ++i )
+ {
+ int batch = batchValues[i];
+ if( batch >= batchCounts.size() )
+ batchCounts.push_back(1);
+ else
+ ++(batchCounts[batch]);
+ }
+
+
+ m_batchStartLengths.resize(batchCounts.size());
+ m_batchStartLengths[0] = btSomePair(0,0);
+
+
+ int sum = 0;
+ for( int batchIndex = 0; batchIndex < batchCounts.size(); ++batchIndex )
+ {
+ m_batchStartLengths[batchIndex].first = sum;
+ m_batchStartLengths[batchIndex].second = batchCounts[batchIndex];
+ sum += batchCounts[batchIndex];
+ }
+
+ /////////////////////////////
+ // Sort data based on batches
+
+ // Create source arrays by copying originals
+ btAlignedObjectArray<btSoftBodyTriangleData::TriangleNodeSet> m_vertexIndices_Backup(m_vertexIndices);
+ btAlignedObjectArray<float> m_area_Backup(m_area);
+ btAlignedObjectArray<Vectormath::Aos::Vector3> m_normal_Backup(m_normal);
+
+
+ for( int batch = 0; batch < batchCounts.size(); ++batch )
+ batchCounts[batch] = 0;
+
+ // Do sort as single pass into destination arrays
+ for( int triangleIndex = 0; triangleIndex < numTriangles; ++triangleIndex )
+ {
+ // To maintain locations run off the original link locations rather than the current position.
+ // It's not cache efficient, but as we run this rarely that should not matter.
+ // It's faster than searching the link location array for the current location and then updating it.
+ // The other alternative would be to unsort before resorting, but this is equivalent to doing that.
+ int triangleLocation = m_triangleAddresses[triangleIndex];
+
+ // Obtain batch and calculate target location for the
+ // next element in that batch, incrementing the batch counter
+ // afterwards
+ int batch = batchValues[triangleIndex];
+ int newLocation = m_batchStartLengths[batch].first + batchCounts[batch];
+
+ batchCounts[batch] = batchCounts[batch] + 1;
+ m_vertexIndices[newLocation] = m_vertexIndices_Backup[triangleLocation];
+ m_area[newLocation] = m_area_Backup[triangleLocation];
+ m_normal[newLocation] = m_normal_Backup[triangleLocation];
+
+ // Update the locations array to account for the moved entry
+ m_triangleAddresses[triangleIndex] = newLocation;
+ }
+} // btSoftBodyTriangleDataOpenCL::generateBatches
+
+
+
+
+
+
+
+btOpenCLSoftBodySolver::btOpenCLSoftBodySolver(cl_command_queue queue, cl_context ctx) :
+ m_linkData(queue, ctx),
+ m_vertexData(queue, ctx),
+ m_triangleData(queue, ctx),
+ clFunctions(queue, ctx),
+ m_clPerClothAcceleration(queue, ctx, &m_perClothAcceleration, true ),
+ m_clPerClothWindVelocity(queue, ctx, &m_perClothWindVelocity, true ),
+ m_clPerClothDampingFactor(queue,ctx, &m_perClothDampingFactor, true ),
+ m_clPerClothVelocityCorrectionCoefficient(queue, ctx,&m_perClothVelocityCorrectionCoefficient, true ),
+ m_clPerClothLiftFactor(queue, ctx,&m_perClothLiftFactor, true ),
+ m_clPerClothDragFactor(queue, ctx,&m_perClothDragFactor, true ),
+ m_clPerClothMediumDensity(queue, ctx,&m_perClothMediumDensity, true ),
+ m_clPerClothCollisionObjects( queue, ctx, &m_perClothCollisionObjects, true ),
+ m_clCollisionObjectDetails( queue, ctx, &m_collisionObjectDetails, true ),
+ m_clPerClothFriction( queue, ctx, &m_perClothFriction, false ),
+ m_cqCommandQue( queue ),
+ m_cxMainContext(ctx),
+ m_defaultWorkGroupSize(BT_DEFAULT_WORKGROUPSIZE)
+{
+ // Initial we will clearly need to update solver constants
+ // For now this is global for the cloths linked with this solver - we should probably make this body specific
+ // for performance in future once we understand more clearly when constants need to be updated
+ m_updateSolverConstants = true;
+
+ m_shadersInitialized = false;
+
+ prepareLinksKernel = 0;
+ solvePositionsFromLinksKernel = 0;
+ updateConstantsKernel = 0;
+ integrateKernel = 0;
+ addVelocityKernel = 0;
+ updatePositionsFromVelocitiesKernel = 0;
+ updateVelocitiesFromPositionsWithoutVelocitiesKernel = 0;
+ updateVelocitiesFromPositionsWithVelocitiesKernel = 0;
+ vSolveLinksKernel = 0;
+ solveCollisionsAndUpdateVelocitiesKernel = 0;
+ resetNormalsAndAreasKernel = 0;
+ resetNormalsAndAreasKernel = 0;
+ normalizeNormalsAndAreasKernel = 0;
+ outputToVertexArrayKernel = 0;
+ applyForcesKernel = 0;
+}
+
+btOpenCLSoftBodySolver::~btOpenCLSoftBodySolver()
+{
+ releaseKernels();
+}
+
+void btOpenCLSoftBodySolver::releaseKernels()
+{
+ RELEASE_CL_KERNEL( prepareLinksKernel );
+ RELEASE_CL_KERNEL( solvePositionsFromLinksKernel );
+ RELEASE_CL_KERNEL( updateConstantsKernel );
+ RELEASE_CL_KERNEL( integrateKernel );
+ RELEASE_CL_KERNEL( addVelocityKernel );
+ RELEASE_CL_KERNEL( updatePositionsFromVelocitiesKernel );
+ RELEASE_CL_KERNEL( updateVelocitiesFromPositionsWithoutVelocitiesKernel );
+ RELEASE_CL_KERNEL( updateVelocitiesFromPositionsWithVelocitiesKernel );
+ RELEASE_CL_KERNEL( vSolveLinksKernel );
+ RELEASE_CL_KERNEL( solveCollisionsAndUpdateVelocitiesKernel );
+ RELEASE_CL_KERNEL( resetNormalsAndAreasKernel );
+ RELEASE_CL_KERNEL( normalizeNormalsAndAreasKernel );
+ RELEASE_CL_KERNEL( outputToVertexArrayKernel );
+ RELEASE_CL_KERNEL( applyForcesKernel );
+
+ m_shadersInitialized = false;
+}
+
+void btOpenCLSoftBodySolver::copyBackToSoftBodies()
+{
+ // Move the vertex data back to the host first
+ m_vertexData.moveFromAccelerator();
+
+ // Loop over soft bodies, copying all the vertex positions back for each body in turn
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btOpenCLAcceleratedSoftBodyInterface *softBodyInterface = m_softBodySet[ softBodyIndex ];
+ btSoftBody *softBody = softBodyInterface->getSoftBody();
+
+ int firstVertex = softBodyInterface->getFirstVertex();
+ int numVertices = softBodyInterface->getNumVertices();
+
+ // Copy vertices from solver back into the softbody
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ using Vectormath::Aos::Point3;
+ Point3 vertexPosition( getVertexData().getVertexPositions()[firstVertex + vertex] );
+
+ softBody->m_nodes[vertex].m_x.setX( vertexPosition.getX() );
+ softBody->m_nodes[vertex].m_x.setY( vertexPosition.getY() );
+ softBody->m_nodes[vertex].m_x.setZ( vertexPosition.getZ() );
+
+ softBody->m_nodes[vertex].m_n.setX( vertexPosition.getX() );
+ softBody->m_nodes[vertex].m_n.setY( vertexPosition.getY() );
+ softBody->m_nodes[vertex].m_n.setZ( vertexPosition.getZ() );
+ }
+ }
+} // btOpenCLSoftBodySolver::copyBackToSoftBodies
+
+void btOpenCLSoftBodySolver::optimize( btAlignedObjectArray< btSoftBody * > &softBodies, bool forceUpdate )
+{
+ if( forceUpdate || m_softBodySet.size() != softBodies.size() )
+ {
+ // Have a change in the soft body set so update, reloading all the data
+ getVertexData().clear();
+ getTriangleData().clear();
+ getLinkData().clear();
+ m_softBodySet.resize(0);
+
+
+ for( int softBodyIndex = 0; softBodyIndex < softBodies.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = softBodies[ softBodyIndex ];
+ using Vectormath::Aos::Matrix3;
+ using Vectormath::Aos::Point3;
+
+ // Create SoftBody that will store the information within the solver
+ btOpenCLAcceleratedSoftBodyInterface *newSoftBody = new btOpenCLAcceleratedSoftBodyInterface( softBody );
+ m_softBodySet.push_back( newSoftBody );
+
+ m_perClothAcceleration.push_back( toVector3(softBody->getWorldInfo()->m_gravity) );
+ m_perClothDampingFactor.push_back(softBody->m_cfg.kDP);
+ m_perClothVelocityCorrectionCoefficient.push_back( softBody->m_cfg.kVCF );
+ m_perClothLiftFactor.push_back( softBody->m_cfg.kLF );
+ m_perClothDragFactor.push_back( softBody->m_cfg.kDG );
+ m_perClothMediumDensity.push_back(softBody->getWorldInfo()->air_density);
+ // Simple init values. Actually we'll put 0 and -1 into them at the appropriate time
+ m_perClothFriction.push_back( softBody->getFriction() );
+ m_perClothCollisionObjects.push_back( CollisionObjectIndices(-1, -1) );
+
+ // Add space for new vertices and triangles in the default solver for now
+ // TODO: Include space here for tearing too later
+ int firstVertex = getVertexData().getNumVertices();
+ int numVertices = softBody->m_nodes.size();
+ int maxVertices = numVertices;
+ // Allocate space for new vertices in all the vertex arrays
+ getVertexData().createVertices( maxVertices, softBodyIndex );
+
+ int firstTriangle = getTriangleData().getNumTriangles();
+ int numTriangles = softBody->m_faces.size();
+ int maxTriangles = numTriangles;
+ getTriangleData().createTriangles( maxTriangles );
+
+ // Copy vertices from softbody into the solver
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ Point3 multPoint(softBody->m_nodes[vertex].m_x.getX(), softBody->m_nodes[vertex].m_x.getY(), softBody->m_nodes[vertex].m_x.getZ());
+ btSoftBodyVertexData::VertexDescription desc;
+
+ // TODO: Position in the softbody might be pre-transformed
+ // or we may need to adapt for the pose.
+ //desc.setPosition( cloth.getMeshTransform()*multPoint );
+ desc.setPosition( multPoint );
+
+ float vertexInverseMass = softBody->m_nodes[vertex].m_im;
+ desc.setInverseMass(vertexInverseMass);
+ getVertexData().setVertexAt( desc, firstVertex + vertex );
+ }
+
+ // Copy triangles similarly
+ // We're assuming here that vertex indices are based on the firstVertex rather than the entire scene
+ for( int triangle = 0; triangle < numTriangles; ++triangle )
+ {
+ // Note that large array storage is relative to the array not to the cloth
+ // So we need to add firstVertex to each value
+ int vertexIndex0 = (softBody->m_faces[triangle].m_n[0] - &(softBody->m_nodes[0]));
+ int vertexIndex1 = (softBody->m_faces[triangle].m_n[1] - &(softBody->m_nodes[0]));
+ int vertexIndex2 = (softBody->m_faces[triangle].m_n[2] - &(softBody->m_nodes[0]));
+ btSoftBodyTriangleData::TriangleDescription newTriangle(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, vertexIndex2 + firstVertex);
+ getTriangleData().setTriangleAt( newTriangle, firstTriangle + triangle );
+
+ // Increase vertex triangle counts for this triangle
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex0)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex1)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex2)++;
+ }
+
+ int firstLink = getLinkData().getNumLinks();
+ int numLinks = softBody->m_links.size();
+ int maxLinks = numLinks;
+
+ // Allocate space for the links
+ getLinkData().createLinks( numLinks );
+
+ // Add the links
+ for( int link = 0; link < numLinks; ++link )
+ {
+ int vertexIndex0 = softBody->m_links[link].m_n[0] - &(softBody->m_nodes[0]);
+ int vertexIndex1 = softBody->m_links[link].m_n[1] - &(softBody->m_nodes[0]);
+
+ btSoftBodyLinkData::LinkDescription newLink(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, softBody->m_links[link].m_material->m_kLST);
+ newLink.setLinkStrength(1.f);
+ getLinkData().setLinkAt(newLink, firstLink + link);
+ }
+
+ newSoftBody->setFirstVertex( firstVertex );
+ newSoftBody->setFirstTriangle( firstTriangle );
+ newSoftBody->setNumVertices( numVertices );
+ newSoftBody->setMaxVertices( maxVertices );
+ newSoftBody->setNumTriangles( numTriangles );
+ newSoftBody->setMaxTriangles( maxTriangles );
+ newSoftBody->setFirstLink( firstLink );
+ newSoftBody->setNumLinks( numLinks );
+ }
+
+
+
+ updateConstants(0.f);
+
+
+ m_linkData.generateBatches();
+ m_triangleData.generateBatches();
+ }
+}
+
+
+btSoftBodyLinkData &btOpenCLSoftBodySolver::getLinkData()
+{
+ // TODO: Consider setting link data to "changed" here
+ return m_linkData;
+}
+
+btSoftBodyVertexData &btOpenCLSoftBodySolver::getVertexData()
+{
+ // TODO: Consider setting vertex data to "changed" here
+ return m_vertexData;
+}
+
+btSoftBodyTriangleData &btOpenCLSoftBodySolver::getTriangleData()
+{
+ // TODO: Consider setting triangle data to "changed" here
+ return m_triangleData;
+}
+
+void btOpenCLSoftBodySolver::resetNormalsAndAreas( int numVertices )
+{
+ cl_int ciErrNum;
+ ciErrNum = clSetKernelArg(resetNormalsAndAreasKernel, 0, sizeof(numVertices), (void*)&numVertices); //oclCHECKERROR(ciErrNum, CL_SUCCESS);
+ ciErrNum = clSetKernelArg(resetNormalsAndAreasKernel, 1, sizeof(cl_mem), (void*)&m_vertexData.m_clVertexNormal.m_buffer);//oclCHECKERROR(ciErrNum, CL_SUCCESS);
+ ciErrNum = clSetKernelArg(resetNormalsAndAreasKernel, 2, sizeof(cl_mem), (void*)&m_vertexData.m_clVertexArea.m_buffer); //oclCHECKERROR(ciErrNum, CL_SUCCESS);
+ size_t numWorkItems = m_defaultWorkGroupSize*((numVertices + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+
+ if (numWorkItems)
+ {
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue, resetNormalsAndAreasKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize, 0,0,0 );
+
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(resetNormalsAndAreasKernel)" );
+ }
+ }
+
+}
+
+void btOpenCLSoftBodySolver::normalizeNormalsAndAreas( int numVertices )
+{
+
+ cl_int ciErrNum;
+
+ ciErrNum = clSetKernelArg(normalizeNormalsAndAreasKernel, 0, sizeof(int),(void*) &numVertices);
+ ciErrNum = clSetKernelArg(normalizeNormalsAndAreasKernel, 1, sizeof(cl_mem), &m_vertexData.m_clVertexTriangleCount.m_buffer);
+ ciErrNum = clSetKernelArg(normalizeNormalsAndAreasKernel, 2, sizeof(cl_mem), &m_vertexData.m_clVertexNormal.m_buffer);
+ ciErrNum = clSetKernelArg(normalizeNormalsAndAreasKernel, 3, sizeof(cl_mem), &m_vertexData.m_clVertexArea.m_buffer);
+ size_t numWorkItems = m_defaultWorkGroupSize*((numVertices + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ if (numWorkItems)
+ {
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue, normalizeNormalsAndAreasKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize, 0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(normalizeNormalsAndAreasKernel)");
+ }
+ }
+
+}
+
+void btOpenCLSoftBodySolver::executeUpdateSoftBodies( int firstTriangle, int numTriangles )
+{
+
+ cl_int ciErrNum;
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 0, sizeof(int), (void*) &firstTriangle);
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 1, sizeof(int), &numTriangles);
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 2, sizeof(cl_mem), &m_triangleData.m_clVertexIndices.m_buffer);
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 3, sizeof(cl_mem), &m_vertexData.m_clVertexPosition.m_buffer);
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 4, sizeof(cl_mem), &m_vertexData.m_clVertexNormal.m_buffer);
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 5, sizeof(cl_mem), &m_vertexData.m_clVertexArea.m_buffer);
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 6, sizeof(cl_mem), &m_triangleData.m_clNormal.m_buffer);
+ ciErrNum = clSetKernelArg(updateSoftBodiesKernel, 7, sizeof(cl_mem), &m_triangleData.m_clArea.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((numTriangles + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue, updateSoftBodiesKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(normalizeNormalsAndAreasKernel)");
+ }
+
+}
+
+void btOpenCLSoftBodySolver::updateSoftBodies()
+{
+ using namespace Vectormath::Aos;
+
+
+ int numVertices = m_vertexData.getNumVertices();
+ int numTriangles = m_triangleData.getNumTriangles();
+
+ // Ensure data is on accelerator
+ m_vertexData.moveToAccelerator();
+ m_triangleData.moveToAccelerator();
+
+ resetNormalsAndAreas( numVertices );
+
+
+ // Go through triangle batches so updates occur correctly
+ for( int batchIndex = 0; batchIndex < m_triangleData.m_batchStartLengths.size(); ++batchIndex )
+ {
+
+ int startTriangle = m_triangleData.m_batchStartLengths[batchIndex].first;
+ int numTriangles = m_triangleData.m_batchStartLengths[batchIndex].second;
+
+ executeUpdateSoftBodies( startTriangle, numTriangles );
+ }
+
+
+ normalizeNormalsAndAreas( numVertices );
+} // updateSoftBodies
+
+
+Vectormath::Aos::Vector3 btOpenCLSoftBodySolver::ProjectOnAxis( const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a )
+{
+ return a*Vectormath::Aos::dot(v, a);
+}
+
+void btOpenCLSoftBodySolver::ApplyClampedForce( float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce )
+{
+ float dtInverseMass = solverdt*inverseMass;
+ if( Vectormath::Aos::lengthSqr(force * dtInverseMass) > Vectormath::Aos::lengthSqr(vertexVelocity) )
+ {
+ vertexForce -= ProjectOnAxis( vertexVelocity, normalize( force ) )/dtInverseMass;
+ } else {
+ vertexForce += force;
+ }
+}
+
+void btOpenCLSoftBodySolver::applyForces( float solverdt )
+{
+
+ // Ensure data is on accelerator
+ m_vertexData.moveToAccelerator();
+ m_clPerClothAcceleration.moveToGPU();
+ m_clPerClothLiftFactor.moveToGPU();
+ m_clPerClothDragFactor.moveToGPU();
+ m_clPerClothMediumDensity.moveToGPU();
+ m_clPerClothWindVelocity.moveToGPU();
+
+ cl_int ciErrNum ;
+ int numVerts = m_vertexData.getNumVertices();
+ ciErrNum = clSetKernelArg(applyForcesKernel, 0, sizeof(int), &numVerts);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 1, sizeof(float), &solverdt);
+ float fl = FLT_EPSILON;
+ ciErrNum = clSetKernelArg(applyForcesKernel, 2, sizeof(float), &fl);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 3, sizeof(cl_mem), &m_vertexData.m_clClothIdentifier.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 4, sizeof(cl_mem), &m_vertexData.m_clVertexNormal.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 5, sizeof(cl_mem), &m_vertexData.m_clVertexArea.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 6, sizeof(cl_mem), &m_vertexData.m_clVertexInverseMass.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 7, sizeof(cl_mem), &m_clPerClothLiftFactor.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 8 ,sizeof(cl_mem), &m_clPerClothDragFactor.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel, 9, sizeof(cl_mem), &m_clPerClothWindVelocity.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel,10, sizeof(cl_mem), &m_clPerClothAcceleration.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel,11, sizeof(cl_mem), &m_clPerClothMediumDensity.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel,12, sizeof(cl_mem), &m_vertexData.m_clVertexForceAccumulator.m_buffer);
+ ciErrNum = clSetKernelArg(applyForcesKernel,13, sizeof(cl_mem), &m_vertexData.m_clVertexVelocity.m_buffer);
+ size_t numWorkItems = m_defaultWorkGroupSize*((m_vertexData.getNumVertices() + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ if (numWorkItems)
+ {
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,applyForcesKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize, 0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(applyForcesKernel)");
+ }
+ }
+
+}
+
+/**
+ * Integrate motion on the solver.
+ */
+void btOpenCLSoftBodySolver::integrate( float solverdt )
+{
+
+
+ // Ensure data is on accelerator
+ m_vertexData.moveToAccelerator();
+
+ cl_int ciErrNum;
+ int numVerts = m_vertexData.getNumVertices();
+ ciErrNum = clSetKernelArg(integrateKernel, 0, sizeof(int), &numVerts);
+ ciErrNum = clSetKernelArg(integrateKernel, 1, sizeof(float), &solverdt);
+ ciErrNum = clSetKernelArg(integrateKernel, 2, sizeof(cl_mem), &m_vertexData.m_clVertexInverseMass.m_buffer);
+ ciErrNum = clSetKernelArg(integrateKernel, 3, sizeof(cl_mem), &m_vertexData.m_clVertexPosition.m_buffer);
+ ciErrNum = clSetKernelArg(integrateKernel, 4, sizeof(cl_mem), &m_vertexData.m_clVertexVelocity.m_buffer);
+ ciErrNum = clSetKernelArg(integrateKernel, 5, sizeof(cl_mem), &m_vertexData.m_clVertexPreviousPosition.m_buffer);
+ ciErrNum = clSetKernelArg(integrateKernel, 6, sizeof(cl_mem), &m_vertexData.m_clVertexForceAccumulator.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((m_vertexData.getNumVertices() + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ if (numWorkItems)
+ {
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,integrateKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(integrateKernel)");
+ }
+ }
+
+}
+
+float btOpenCLSoftBodySolver::computeTriangleArea(
+ const Vectormath::Aos::Point3 &vertex0,
+ const Vectormath::Aos::Point3 &vertex1,
+ const Vectormath::Aos::Point3 &vertex2 )
+{
+ Vectormath::Aos::Vector3 a = vertex1 - vertex0;
+ Vectormath::Aos::Vector3 b = vertex2 - vertex0;
+ Vectormath::Aos::Vector3 crossProduct = cross(a, b);
+ float area = length( crossProduct );
+ return area;
+}
+
+
+void btOpenCLSoftBodySolver::updateBounds()
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btVector3 minBound(-1e30,-1e30,-1e30), maxBound(1e30,1e30,1e30);
+ m_softBodySet[softBodyIndex]->updateBounds( minBound, maxBound );
+ }
+
+} // btOpenCLSoftBodySolver::updateBounds
+
+
+void btOpenCLSoftBodySolver::updateConstants( float timeStep )
+{
+
+ using namespace Vectormath::Aos;
+
+ if( m_updateSolverConstants )
+ {
+ m_updateSolverConstants = false;
+
+ // Will have to redo this if we change the structure (tear, maybe) or various other possible changes
+
+ // Initialise link constants
+ const int numLinks = m_linkData.getNumLinks();
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair &vertices( m_linkData.getVertexPair(linkIndex) );
+ m_linkData.getRestLength(linkIndex) = length((m_vertexData.getPosition( vertices.vertex0 ) - m_vertexData.getPosition( vertices.vertex1 )));
+ float invMass0 = m_vertexData.getInverseMass(vertices.vertex0);
+ float invMass1 = m_vertexData.getInverseMass(vertices.vertex1);
+ float linearStiffness = m_linkData.getLinearStiffnessCoefficient(linkIndex);
+ float massLSC = (invMass0 + invMass1)/linearStiffness;
+ m_linkData.getMassLSC(linkIndex) = massLSC;
+ float restLength = m_linkData.getRestLength(linkIndex);
+ float restLengthSquared = restLength*restLength;
+ m_linkData.getRestLengthSquared(linkIndex) = restLengthSquared;
+ }
+ }
+
+}
+
+class QuickSortCompare
+{
+ public:
+
+ bool operator() ( const CollisionShapeDescription& a, const CollisionShapeDescription& b )
+ {
+ return ( a.softBodyIdentifier < b.softBodyIdentifier );
+ }
+};
+
+
+/**
+ * Sort the collision object details array and generate indexing into it for the per-cloth collision object array.
+ */
+void btOpenCLSoftBodySolver::prepareCollisionConstraints()
+{
+ // First do a simple sort on the collision objects
+ btAlignedObjectArray<int> numObjectsPerClothPrefixSum;
+ btAlignedObjectArray<int> numObjectsPerCloth;
+ numObjectsPerCloth.resize( m_softBodySet.size(), 0 );
+ numObjectsPerClothPrefixSum.resize( m_softBodySet.size(), 0 );
+
+
+
+ m_collisionObjectDetails.quickSort( QuickSortCompare() );
+
+ if (!m_perClothCollisionObjects.size())
+ return;
+
+ // Generating indexing for perClothCollisionObjects
+ // First clear the previous values with the "no collision object for cloth" constant
+ for( int clothIndex = 0; clothIndex < m_perClothCollisionObjects.size(); ++clothIndex )
+ {
+ m_perClothCollisionObjects[clothIndex].firstObject = -1;
+ m_perClothCollisionObjects[clothIndex].endObject = -1;
+ }
+ int currentCloth = 0;
+ int startIndex = 0;
+ for( int collisionObject = 0; collisionObject < m_collisionObjectDetails.size(); ++collisionObject )
+ {
+ int nextCloth = m_collisionObjectDetails[collisionObject].softBodyIdentifier;
+ if( nextCloth != currentCloth )
+ {
+ // Changed cloth in the array
+ // Set the end index and the range is what we need for currentCloth
+ m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
+ m_perClothCollisionObjects[currentCloth].endObject = collisionObject;
+ currentCloth = nextCloth;
+ startIndex = collisionObject;
+ }
+ }
+
+ // And update last cloth
+ m_perClothCollisionObjects[currentCloth].firstObject = startIndex;
+ m_perClothCollisionObjects[currentCloth].endObject = m_collisionObjectDetails.size();
+
+} // btOpenCLSoftBodySolver::prepareCollisionConstraints
+
+
+
+void btOpenCLSoftBodySolver::solveConstraints( float solverdt )
+{
+
+ using Vectormath::Aos::Vector3;
+ using Vectormath::Aos::Point3;
+ using Vectormath::Aos::lengthSqr;
+ using Vectormath::Aos::dot;
+
+ // Prepare links
+ int numLinks = m_linkData.getNumLinks();
+ int numVertices = m_vertexData.getNumVertices();
+
+ float kst = 1.f;
+ float ti = 0.f;
+
+
+ m_clPerClothDampingFactor.moveToGPU();
+ m_clPerClothVelocityCorrectionCoefficient.moveToGPU();
+
+
+ // Ensure data is on accelerator
+ m_linkData.moveToAccelerator();
+ m_vertexData.moveToAccelerator();
+
+ prepareLinks();
+
+
+
+ for( int iteration = 0; iteration < m_numberOfVelocityIterations ; ++iteration )
+ {
+ for( int i = 0; i < m_linkData.m_batchStartLengths.size(); ++i )
+ {
+ int startLink = m_linkData.m_batchStartLengths[i].start;
+ int numLinks = m_linkData.m_batchStartLengths[i].length;
+
+ solveLinksForVelocity( startLink, numLinks, kst );
+ }
+ }
+
+
+ prepareCollisionConstraints();
+
+ // Compute new positions from velocity
+ // Also update the previous position so that our position computation is now based on the new position from the velocity solution
+ // rather than based directly on the original positions
+ if( m_numberOfVelocityIterations > 0 )
+ {
+ updateVelocitiesFromPositionsWithVelocities( 1.f/solverdt );
+ } else {
+ updateVelocitiesFromPositionsWithoutVelocities( 1.f/solverdt );
+ }
+
+ // Solve drift
+ for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+ {
+ for( int i = 0; i < m_linkData.m_batchStartLengths.size(); ++i )
+ {
+ int startLink = m_linkData.m_batchStartLengths[i].start;
+ int numLinks = m_linkData.m_batchStartLengths[i].length;
+
+ solveLinksForPosition( startLink, numLinks, kst, ti );
+ }
+
+ } // for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+
+
+ // At this point assume that the force array is blank - we will overwrite it
+ solveCollisionsAndUpdateVelocities( 1.f/solverdt );
+
+}
+
+
+//////////////////////////////////////
+// Kernel dispatches
+void btOpenCLSoftBodySolver::prepareLinks()
+{
+
+ cl_int ciErrNum;
+ int numLinks = m_linkData.getNumLinks();
+ ciErrNum = clSetKernelArg(prepareLinksKernel,0, sizeof(int), &numLinks);
+ ciErrNum = clSetKernelArg(prepareLinksKernel,1, sizeof(cl_mem), &m_linkData.m_clLinks.m_buffer);
+ ciErrNum = clSetKernelArg(prepareLinksKernel,2, sizeof(cl_mem), &m_linkData.m_clLinksMassLSC.m_buffer);
+ ciErrNum = clSetKernelArg(prepareLinksKernel,3, sizeof(cl_mem), &m_vertexData.m_clVertexPreviousPosition.m_buffer);
+ ciErrNum = clSetKernelArg(prepareLinksKernel,4, sizeof(cl_mem), &m_linkData.m_clLinksLengthRatio.m_buffer);
+ ciErrNum = clSetKernelArg(prepareLinksKernel,5, sizeof(cl_mem), &m_linkData.m_clLinksCLength.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((m_linkData.getNumLinks() + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,prepareLinksKernel, 1 , NULL, &numWorkItems, &m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(prepareLinksKernel)");
+ }
+
+}
+
+void btOpenCLSoftBodySolver::updatePositionsFromVelocities( float solverdt )
+{
+
+ cl_int ciErrNum;
+ int numVerts = m_vertexData.getNumVertices();
+ ciErrNum = clSetKernelArg(updatePositionsFromVelocitiesKernel,0, sizeof(int), &numVerts);
+ ciErrNum = clSetKernelArg(updatePositionsFromVelocitiesKernel,1, sizeof(float), &solverdt);
+ ciErrNum = clSetKernelArg(updatePositionsFromVelocitiesKernel,2, sizeof(cl_mem), &m_vertexData.m_clVertexVelocity.m_buffer);
+ ciErrNum = clSetKernelArg(updatePositionsFromVelocitiesKernel,3, sizeof(cl_mem), &m_vertexData.m_clVertexPreviousPosition.m_buffer);
+ ciErrNum = clSetKernelArg(updatePositionsFromVelocitiesKernel,4, sizeof(cl_mem), &m_vertexData.m_clVertexPosition.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((m_vertexData.getNumVertices() + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,updatePositionsFromVelocitiesKernel, 1, NULL, &numWorkItems,&m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(updatePositionsFromVelocitiesKernel)");
+ }
+
+}
+
+void btOpenCLSoftBodySolver::solveLinksForPosition( int startLink, int numLinks, float kst, float ti )
+{
+
+ cl_int ciErrNum;
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,0, sizeof(int), &startLink);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,1, sizeof(int), &numLinks);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,2, sizeof(float), &kst);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,3, sizeof(float), &ti);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,4, sizeof(cl_mem), &m_linkData.m_clLinks.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,5, sizeof(cl_mem), &m_linkData.m_clLinksMassLSC.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,6, sizeof(cl_mem), &m_linkData.m_clLinksRestLengthSquared.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,7, sizeof(cl_mem), &m_vertexData.m_clVertexInverseMass.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,8, sizeof(cl_mem), &m_vertexData.m_clVertexPosition.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((numLinks + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,solvePositionsFromLinksKernel,1,NULL,&numWorkItems,&m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum!= CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(solvePositionsFromLinksKernel)");
+ }
+
+} // solveLinksForPosition
+
+
+void btOpenCLSoftBodySolver::solveLinksForVelocity( int startLink, int numLinks, float kst )
+{
+
+ cl_int ciErrNum;
+ ciErrNum = clSetKernelArg(vSolveLinksKernel, 0, sizeof(int), &startLink);
+ ciErrNum = clSetKernelArg(vSolveLinksKernel, 1, sizeof(int), &numLinks);
+ ciErrNum = clSetKernelArg(vSolveLinksKernel, 2, sizeof(cl_mem), &m_linkData.m_clLinks.m_buffer);
+ ciErrNum = clSetKernelArg(vSolveLinksKernel, 3, sizeof(cl_mem), &m_linkData.m_clLinksLengthRatio.m_buffer);
+ ciErrNum = clSetKernelArg(vSolveLinksKernel, 4, sizeof(cl_mem), &m_linkData.m_clLinksCLength.m_buffer);
+ ciErrNum = clSetKernelArg(vSolveLinksKernel, 5, sizeof(cl_mem), &m_vertexData.m_clVertexInverseMass.m_buffer);
+ ciErrNum = clSetKernelArg(vSolveLinksKernel, 6, sizeof(cl_mem), &m_vertexData.m_clVertexVelocity.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((numLinks + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,vSolveLinksKernel,1,NULL,&numWorkItems, &m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(vSolveLinksKernel)");
+ }
+
+}
+
+void btOpenCLSoftBodySolver::updateVelocitiesFromPositionsWithVelocities( float isolverdt )
+{
+
+ cl_int ciErrNum;
+ int numVerts = m_vertexData.getNumVertices();
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel,0, sizeof(int), &numVerts);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 1, sizeof(float), &isolverdt);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 2, sizeof(cl_mem), &m_vertexData.m_clVertexPosition.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 3, sizeof(cl_mem), &m_vertexData.m_clVertexPreviousPosition.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 4, sizeof(cl_mem), &m_vertexData.m_clClothIdentifier.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 5, sizeof(cl_mem), &m_clPerClothVelocityCorrectionCoefficient.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 6, sizeof(cl_mem), &m_clPerClothDampingFactor.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 7, sizeof(cl_mem), &m_vertexData.m_clVertexVelocity.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithVelocitiesKernel, 8, sizeof(cl_mem), &m_vertexData.m_clVertexForceAccumulator.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((m_vertexData.getNumVertices() + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,updateVelocitiesFromPositionsWithVelocitiesKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(updateVelocitiesFromPositionsWithVelocitiesKernel)");
+ }
+
+
+} // updateVelocitiesFromPositionsWithVelocities
+
+void btOpenCLSoftBodySolver::updateVelocitiesFromPositionsWithoutVelocities( float isolverdt )
+{
+
+ cl_int ciErrNum;
+ int numVerts = m_vertexData.getNumVertices();
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 0, sizeof(int), &numVerts);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 1, sizeof(float), &isolverdt);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 2, sizeof(cl_mem),&m_vertexData.m_clVertexPosition.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 3, sizeof(cl_mem),&m_vertexData.m_clVertexPreviousPosition.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 4, sizeof(cl_mem),&m_vertexData.m_clClothIdentifier.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 5, sizeof(cl_mem),&m_clPerClothDampingFactor.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 6, sizeof(cl_mem),&m_vertexData.m_clVertexVelocity.m_buffer);
+ ciErrNum = clSetKernelArg(updateVelocitiesFromPositionsWithoutVelocitiesKernel, 7, sizeof(cl_mem),&m_vertexData.m_clVertexForceAccumulator.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((m_vertexData.getNumVertices() + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,updateVelocitiesFromPositionsWithoutVelocitiesKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(updateVelocitiesFromPositionsWithoutVelocitiesKernel)");
+ }
+
+} // updateVelocitiesFromPositionsWithoutVelocities
+
+
+
+void btOpenCLSoftBodySolver::solveCollisionsAndUpdateVelocities( float isolverdt )
+{
+
+ // Copy kernel parameters to GPU
+ m_vertexData.moveToAccelerator();
+ m_clPerClothFriction.moveToGPU();
+ m_clPerClothDampingFactor.moveToGPU();
+ m_clPerClothCollisionObjects.moveToGPU();
+ m_clCollisionObjectDetails.moveToGPU();
+
+
+ cl_int ciErrNum;
+ int numVerts = m_vertexData.getNumVertices();
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 0, sizeof(int), &numVerts);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 1, sizeof(int), &isolverdt);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 2, sizeof(cl_mem),&m_vertexData.m_clClothIdentifier.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 3, sizeof(cl_mem),&m_vertexData.m_clVertexPreviousPosition.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 4, sizeof(cl_mem),&m_clPerClothFriction.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 5, sizeof(cl_mem),&m_clPerClothDampingFactor.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 6, sizeof(cl_mem),&m_clPerClothCollisionObjects.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 7, sizeof(cl_mem),&m_clCollisionObjectDetails.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 8, sizeof(cl_mem),&m_vertexData.m_clVertexForceAccumulator.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 9, sizeof(cl_mem),&m_vertexData.m_clVertexVelocity.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 10, sizeof(cl_mem),&m_vertexData.m_clVertexPosition.m_buffer);
+
+ size_t numWorkItems = m_defaultWorkGroupSize*((m_vertexData.getNumVertices() + (m_defaultWorkGroupSize-1)) / m_defaultWorkGroupSize);
+ if (numWorkItems)
+ {
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,solveCollisionsAndUpdateVelocitiesKernel, 1, NULL, &numWorkItems, &m_defaultWorkGroupSize,0,0,0);
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(updateVelocitiesFromPositionsWithoutVelocitiesKernel)");
+ }
+ }
+
+} // btOpenCLSoftBodySolver::updateVelocitiesFromPositionsWithoutVelocities
+
+
+
+// End kernel dispatches
+/////////////////////////////////////
+
+
+void btSoftBodySolverOutputCLtoCPU::copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer )
+{
+
+ btSoftBodySolver *solver = softBody->getSoftBodySolver();
+ btAssert( solver->getSolverType() == btSoftBodySolver::CL_SOLVER || solver->getSolverType() == btSoftBodySolver::CL_SIMD_SOLVER );
+ btOpenCLSoftBodySolver *dxSolver = static_cast< btOpenCLSoftBodySolver * >( solver );
+
+ btOpenCLAcceleratedSoftBodyInterface* currentCloth = dxSolver->findSoftBodyInterface( softBody );
+ btSoftBodyVertexDataOpenCL &vertexData( dxSolver->m_vertexData );
+
+
+ const int firstVertex = currentCloth->getFirstVertex();
+ const int lastVertex = firstVertex + currentCloth->getNumVertices();
+
+ if( vertexBuffer->getBufferType() == btVertexBufferDescriptor::CPU_BUFFER )
+ {
+ const btCPUVertexBufferDescriptor *cpuVertexBuffer = static_cast< btCPUVertexBufferDescriptor* >(vertexBuffer);
+ float *basePointer = cpuVertexBuffer->getBasePointer();
+
+ vertexData.m_clVertexPosition.copyFromGPU();
+ vertexData.m_clVertexNormal.copyFromGPU();
+
+ if( vertexBuffer->hasVertexPositions() )
+ {
+ const int vertexOffset = cpuVertexBuffer->getVertexOffset();
+ const int vertexStride = cpuVertexBuffer->getVertexStride();
+ float *vertexPointer = basePointer + vertexOffset;
+
+ for( int vertexIndex = firstVertex; vertexIndex < lastVertex; ++vertexIndex )
+ {
+ Vectormath::Aos::Point3 position = vertexData.getPosition(vertexIndex);
+ *(vertexPointer + 0) = position.getX();
+ *(vertexPointer + 1) = position.getY();
+ *(vertexPointer + 2) = position.getZ();
+ vertexPointer += vertexStride;
+ }
+ }
+ if( vertexBuffer->hasNormals() )
+ {
+ const int normalOffset = cpuVertexBuffer->getNormalOffset();
+ const int normalStride = cpuVertexBuffer->getNormalStride();
+ float *normalPointer = basePointer + normalOffset;
+
+ for( int vertexIndex = firstVertex; vertexIndex < lastVertex; ++vertexIndex )
+ {
+ Vectormath::Aos::Vector3 normal = vertexData.getNormal(vertexIndex);
+ *(normalPointer + 0) = normal.getX();
+ *(normalPointer + 1) = normal.getY();
+ *(normalPointer + 2) = normal.getZ();
+ normalPointer += normalStride;
+ }
+ }
+ }
+
+} // btSoftBodySolverOutputCLtoCPU::outputToVertexBuffers
+
+
+
+cl_kernel CLFunctions::compileCLKernelFromString( const char* kernelSource, const char* kernelName, const char* additionalMacros )
+{
+ printf("compiling kernelName: %s ",kernelName);
+ cl_kernel kernel;
+ cl_int ciErrNum;
+ size_t program_length = strlen(kernelSource);
+
+ cl_program m_cpProgram = clCreateProgramWithSource(m_cxMainContext, 1, (const char**)&kernelSource, &program_length, &ciErrNum);
+// oclCHECKERROR(ciErrNum, CL_SUCCESS);
+
+ // Build the program with 'mad' Optimization option
+
+
+#ifdef MAC
+ char* flags = "-cl-mad-enable -DMAC -DGUID_ARG";
+#else
+ //const char* flags = "-DGUID_ARG= -fno-alias";
+ const char* flags = "-DGUID_ARG= ";
+#endif
+
+ char* compileFlags = new char[strlen(additionalMacros) + strlen(flags) + 5];
+ sprintf(compileFlags, "%s %s", flags, additionalMacros);
+ ciErrNum = clBuildProgram(m_cpProgram, 0, NULL, compileFlags, NULL, NULL);
+ if (ciErrNum != CL_SUCCESS)
+ {
+ size_t numDevices;
+ clGetProgramInfo( m_cpProgram, CL_PROGRAM_DEVICES, 0, 0, &numDevices );
+ cl_device_id *devices = new cl_device_id[numDevices];
+ clGetProgramInfo( m_cpProgram, CL_PROGRAM_DEVICES, numDevices, devices, &numDevices );
+ for( int i = 0; i < 2; ++i )
+ {
+ char *build_log;
+ size_t ret_val_size;
+ clGetProgramBuildInfo(m_cpProgram, devices[i], CL_PROGRAM_BUILD_LOG, 0, NULL, &ret_val_size);
+ build_log = new char[ret_val_size+1];
+ clGetProgramBuildInfo(m_cpProgram, devices[i], CL_PROGRAM_BUILD_LOG, ret_val_size, build_log, NULL);
+
+ // to be carefully, terminate with \0
+ // there's no information in the reference whether the string is 0 terminated or not
+ build_log[ret_val_size] = '\0';
+
+
+ printf("Error in clBuildProgram, Line %u in file %s, Log: \n%s\n !!!\n\n", __LINE__, __FILE__, build_log);
+ delete[] build_log;
+ }
+ btAssert(0);
+ exit(0);
+ }
+
+
+ // Create the kernel
+ kernel = clCreateKernel(m_cpProgram, kernelName, &ciErrNum);
+ if (ciErrNum != CL_SUCCESS)
+ {
+ printf("Error in clCreateKernel, Line %u in file %s !!!\n\n", __LINE__, __FILE__);
+ btAssert(0);
+ exit(0);
+ }
+
+ printf("ready. \n");
+ delete [] compileFlags;
+ return kernel;
+
+}
+
+void btOpenCLSoftBodySolver::predictMotion( float timeStep )
+{
+ // Clear the collision shape array for the next frame
+ // Ensure that the DX11 ones are moved off the device so they will be updated correctly
+ m_clCollisionObjectDetails.changedOnCPU();
+ m_clPerClothCollisionObjects.changedOnCPU();
+ m_collisionObjectDetails.clear();
+
+ {
+ BT_PROFILE("perClothWindVelocity");
+ // Fill the force arrays with current acceleration data etc
+ m_perClothWindVelocity.resize( m_softBodySet.size() );
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = m_softBodySet[softBodyIndex]->getSoftBody();
+
+ m_perClothWindVelocity[softBodyIndex] = toVector3(softBody->getWindVelocity());
+ }
+ }
+ {
+ BT_PROFILE("changedOnCPU");
+ m_clPerClothWindVelocity.changedOnCPU();
+ }
+
+ {
+ BT_PROFILE("applyForces");
+ // Apply forces that we know about to the cloths
+ applyForces( timeStep * getTimeScale() );
+ }
+
+ {
+ BT_PROFILE("integrate");
+ // Itegrate motion for all soft bodies dealt with by the solver
+ integrate( timeStep * getTimeScale() );
+ }
+
+ {
+ BT_PROFILE("updateBounds");
+ updateBounds();
+ }
+ // End prediction work for solvers
+}
+
+static Vectormath::Aos::Transform3 toTransform3( const btTransform &transform )
+{
+ Vectormath::Aos::Transform3 outTransform;
+ outTransform.setCol(0, toVector3(transform.getBasis().getColumn(0)));
+ outTransform.setCol(1, toVector3(transform.getBasis().getColumn(1)));
+ outTransform.setCol(2, toVector3(transform.getBasis().getColumn(2)));
+ outTransform.setCol(3, toVector3(transform.getOrigin()));
+ return outTransform;
+}
+
+void btOpenCLAcceleratedSoftBodyInterface::updateBounds( const btVector3 &lowerBound, const btVector3 &upperBound )
+{
+ float scalarMargin = this->getSoftBody()->getCollisionShape()->getMargin();
+ btVector3 vectorMargin( scalarMargin, scalarMargin, scalarMargin );
+ m_softBody->m_bounds[0] = lowerBound - vectorMargin;
+ m_softBody->m_bounds[1] = upperBound + vectorMargin;
+} // btOpenCLSoftBodySolver::btDX11AcceleratedSoftBodyInterface::updateBounds
+
+void btOpenCLSoftBodySolver::processCollision( btSoftBody*, btSoftBody* )
+{
+
+}
+
+// Add the collision object to the set to deal with for a particular soft body
+void btOpenCLSoftBodySolver::processCollision( btSoftBody *softBody, btCollisionObject* collisionObject )
+{
+ int softBodyIndex = findSoftBodyIndex( softBody );
+
+ if( softBodyIndex >= 0 )
+ {
+ btCollisionShape *collisionShape = collisionObject->getCollisionShape();
+ float friction = collisionObject->getFriction();
+ int shapeType = collisionShape->getShapeType();
+ if( shapeType == CAPSULE_SHAPE_PROXYTYPE )
+ {
+ // Add to the list of expected collision objects
+ CollisionShapeDescription newCollisionShapeDescription;
+ newCollisionShapeDescription.softBodyIdentifier = softBodyIndex;
+ newCollisionShapeDescription.collisionShapeType = shapeType;
+ // TODO: May need to transpose this matrix either here or in HLSL
+ newCollisionShapeDescription.shapeTransform = toTransform3(collisionObject->getWorldTransform());
+ btCapsuleShape *capsule = static_cast<btCapsuleShape*>( collisionShape );
+ newCollisionShapeDescription.radius = capsule->getRadius();
+ newCollisionShapeDescription.halfHeight = capsule->getHalfHeight();
+ newCollisionShapeDescription.margin = capsule->getMargin();
+ newCollisionShapeDescription.upAxis = capsule->getUpAxis();
+ newCollisionShapeDescription.friction = friction;
+ btRigidBody* body = static_cast< btRigidBody* >( collisionObject );
+ newCollisionShapeDescription.linearVelocity = toVector3(body->getLinearVelocity());
+ newCollisionShapeDescription.angularVelocity = toVector3(body->getAngularVelocity());
+ m_collisionObjectDetails.push_back( newCollisionShapeDescription );
+
+ } else {
+ btAssert(0 && "Unsupported collision shape type\n");
+ }
+ } else {
+ btAssert("Unknown soft body");
+ }
+} // btOpenCLSoftBodySolver::processCollision
+
+
+
+
+
+btOpenCLAcceleratedSoftBodyInterface* btOpenCLSoftBodySolver::findSoftBodyInterface( const btSoftBody* const softBody )
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btOpenCLAcceleratedSoftBodyInterface* softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyInterface;
+ }
+ return 0;
+}
+
+
+int btOpenCLSoftBodySolver::findSoftBodyIndex( const btSoftBody* const softBody )
+{
+ for( int softBodyIndex = 0; softBodyIndex < m_softBodySet.size(); ++softBodyIndex )
+ {
+ btOpenCLAcceleratedSoftBodyInterface* softBodyInterface = m_softBodySet[softBodyIndex];
+ if( softBodyInterface->getSoftBody() == softBody )
+ return softBodyIndex;
+ }
+ return 1;
+}
+
+bool btOpenCLSoftBodySolver::checkInitialized()
+{
+ if( !m_shadersInitialized )
+ if( buildShaders() )
+ m_shadersInitialized = true;
+
+ return m_shadersInitialized;
+}
+
+bool btOpenCLSoftBodySolver::buildShaders()
+{
+ // Ensure current kernels are released first
+ releaseKernels();
+
+ bool returnVal = true;
+
+ if( m_shadersInitialized )
+ return true;
+
+ prepareLinksKernel = clFunctions.compileCLKernelFromString( PrepareLinksCLString, "PrepareLinksKernel" );
+ updatePositionsFromVelocitiesKernel = clFunctions.compileCLKernelFromString( UpdatePositionsFromVelocitiesCLString, "UpdatePositionsFromVelocitiesKernel" );
+ solvePositionsFromLinksKernel = clFunctions.compileCLKernelFromString( SolvePositionsCLString, "SolvePositionsFromLinksKernel" );
+ updateVelocitiesFromPositionsWithVelocitiesKernel = clFunctions.compileCLKernelFromString( UpdateNodesCLString, "updateVelocitiesFromPositionsWithVelocitiesKernel" );
+ updateVelocitiesFromPositionsWithoutVelocitiesKernel = clFunctions.compileCLKernelFromString( UpdatePositionsCLString, "updateVelocitiesFromPositionsWithoutVelocitiesKernel" );
+ solveCollisionsAndUpdateVelocitiesKernel = clFunctions.compileCLKernelFromString( SolveCollisionsAndUpdateVelocitiesCLString, "SolveCollisionsAndUpdateVelocitiesKernel" );
+ integrateKernel = clFunctions.compileCLKernelFromString( IntegrateCLString, "IntegrateKernel" );
+ applyForcesKernel = clFunctions.compileCLKernelFromString( ApplyForcesCLString, "ApplyForcesKernel" );
+
+ // TODO: Rename to UpdateSoftBodies
+ resetNormalsAndAreasKernel = clFunctions.compileCLKernelFromString( UpdateNormalsCLString, "ResetNormalsAndAreasKernel" );
+ normalizeNormalsAndAreasKernel = clFunctions.compileCLKernelFromString( UpdateNormalsCLString, "NormalizeNormalsAndAreasKernel" );
+ updateSoftBodiesKernel = clFunctions.compileCLKernelFromString( UpdateNormalsCLString, "UpdateSoftBodiesKernel" );
+
+
+ if( returnVal )
+ m_shadersInitialized = true;
+
+ return returnVal;
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.h
new file mode 100644
index 00000000..bc55594b
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.h
@@ -0,0 +1,488 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_OPENCL_H
+#define BT_SOFT_BODY_SOLVER_OPENCL_H
+
+#include "stddef.h" //for size_t
+#include "vectormath/vmInclude.h"
+
+#include "BulletSoftBody/btSoftBodySolvers.h"
+#include "btSoftBodySolverBuffer_OpenCL.h"
+#include "btSoftBodySolverLinkData_OpenCL.h"
+#include "btSoftBodySolverVertexData_OpenCL.h"
+#include "btSoftBodySolverTriangleData_OpenCL.h"
+
+class CLFunctions
+{
+protected:
+ cl_command_queue m_cqCommandQue;
+ cl_context m_cxMainContext;
+
+public:
+ CLFunctions(cl_command_queue cqCommandQue, cl_context cxMainContext) :
+ m_cqCommandQue( cqCommandQue ),
+ m_cxMainContext( cxMainContext )
+ {
+ }
+
+
+ /**
+ * Compile a compute shader kernel from a string and return the appropriate cl_kernel object.
+ */
+ cl_kernel compileCLKernelFromString( const char* kernelSource, const char* kernelName, const char* additionalMacros = "" );
+};
+
+/**
+ * Entry in the collision shape array.
+ * Specifies the shape type, the transform matrix and the necessary details of the collisionShape.
+ */
+struct CollisionShapeDescription
+{
+ Vectormath::Aos::Transform3 shapeTransform;
+ Vectormath::Aos::Vector3 linearVelocity;
+ Vectormath::Aos::Vector3 angularVelocity;
+
+ int softBodyIdentifier;
+ int collisionShapeType;
+
+ // Both needed for capsule
+ float radius;
+ float halfHeight;
+ int upAxis;
+
+ float margin;
+ float friction;
+
+ CollisionShapeDescription()
+ {
+ collisionShapeType = 0;
+ margin = 0;
+ friction = 0;
+ }
+};
+
+/**
+ * SoftBody class to maintain information about a soft body instance
+ * within a solver.
+ * This data addresses the main solver arrays.
+ */
+class btOpenCLAcceleratedSoftBodyInterface
+{
+protected:
+ /** Current number of vertices that are part of this cloth */
+ int m_numVertices;
+ /** Maximum number of vertices allocated to be part of this cloth */
+ int m_maxVertices;
+ /** Current number of triangles that are part of this cloth */
+ int m_numTriangles;
+ /** Maximum number of triangles allocated to be part of this cloth */
+ int m_maxTriangles;
+ /** Index of first vertex in the world allocated to this cloth */
+ int m_firstVertex;
+ /** Index of first triangle in the world allocated to this cloth */
+ int m_firstTriangle;
+ /** Index of first link in the world allocated to this cloth */
+ int m_firstLink;
+ /** Maximum number of links allocated to this cloth */
+ int m_maxLinks;
+ /** Current number of links allocated to this cloth */
+ int m_numLinks;
+
+ /** The actual soft body this data represents */
+ btSoftBody *m_softBody;
+
+
+public:
+ btOpenCLAcceleratedSoftBodyInterface( btSoftBody *softBody ) :
+ m_softBody( softBody )
+ {
+ m_numVertices = 0;
+ m_maxVertices = 0;
+ m_numTriangles = 0;
+ m_maxTriangles = 0;
+ m_firstVertex = 0;
+ m_firstTriangle = 0;
+ m_firstLink = 0;
+ m_maxLinks = 0;
+ m_numLinks = 0;
+ }
+ int getNumVertices()
+ {
+ return m_numVertices;
+ }
+
+ int getNumTriangles()
+ {
+ return m_numTriangles;
+ }
+
+ int getMaxVertices()
+ {
+ return m_maxVertices;
+ }
+
+ int getMaxTriangles()
+ {
+ return m_maxTriangles;
+ }
+
+ int getFirstVertex()
+ {
+ return m_firstVertex;
+ }
+
+ int getFirstTriangle()
+ {
+ return m_firstTriangle;
+ }
+
+ /**
+ * Update the bounds in the btSoftBody object
+ */
+ void updateBounds( const btVector3 &lowerBound, const btVector3 &upperBound );
+
+ // TODO: All of these set functions will have to do checks and
+ // update the world because restructuring of the arrays will be necessary
+ // Reasonable use of "friend"?
+ void setNumVertices( int numVertices )
+ {
+ m_numVertices = numVertices;
+ }
+
+ void setNumTriangles( int numTriangles )
+ {
+ m_numTriangles = numTriangles;
+ }
+
+ void setMaxVertices( int maxVertices )
+ {
+ m_maxVertices = maxVertices;
+ }
+
+ void setMaxTriangles( int maxTriangles )
+ {
+ m_maxTriangles = maxTriangles;
+ }
+
+ void setFirstVertex( int firstVertex )
+ {
+ m_firstVertex = firstVertex;
+ }
+
+ void setFirstTriangle( int firstTriangle )
+ {
+ m_firstTriangle = firstTriangle;
+ }
+
+ void setMaxLinks( int maxLinks )
+ {
+ m_maxLinks = maxLinks;
+ }
+
+ void setNumLinks( int numLinks )
+ {
+ m_numLinks = numLinks;
+ }
+
+ void setFirstLink( int firstLink )
+ {
+ m_firstLink = firstLink;
+ }
+
+ int getMaxLinks()
+ {
+ return m_maxLinks;
+ }
+
+ int getNumLinks()
+ {
+ return m_numLinks;
+ }
+
+ int getFirstLink()
+ {
+ return m_firstLink;
+ }
+
+ btSoftBody* getSoftBody()
+ {
+ return m_softBody;
+ }
+
+};
+
+
+
+class btOpenCLSoftBodySolver : public btSoftBodySolver
+{
+public:
+
+
+ struct UIntVector3
+ {
+ UIntVector3()
+ {
+ x = 0;
+ y = 0;
+ z = 0;
+ _padding = 0;
+ }
+
+ UIntVector3( unsigned int x_, unsigned int y_, unsigned int z_ )
+ {
+ x = x_;
+ y = y_;
+ z = z_;
+ _padding = 0;
+ }
+
+ unsigned int x;
+ unsigned int y;
+ unsigned int z;
+ unsigned int _padding;
+ };
+
+ struct CollisionObjectIndices
+ {
+ CollisionObjectIndices( int f, int e )
+ {
+ firstObject = f;
+ endObject = e;
+ }
+
+ int firstObject;
+ int endObject;
+ };
+
+ btSoftBodyLinkDataOpenCL m_linkData;
+ btSoftBodyVertexDataOpenCL m_vertexData;
+ btSoftBodyTriangleDataOpenCL m_triangleData;
+
+protected:
+
+ CLFunctions clFunctions;
+
+ /** Variable to define whether we need to update solver constants on the next iteration */
+ bool m_updateSolverConstants;
+
+ bool m_shadersInitialized;
+
+ /**
+ * Cloths owned by this solver.
+ * Only our cloths are in this array.
+ */
+ btAlignedObjectArray< btOpenCLAcceleratedSoftBodyInterface * > m_softBodySet;
+
+ /** Acceleration value to be applied to all non-static vertices in the solver.
+ * Index n is cloth n, array sized by number of cloths in the world not the solver.
+ */
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_perClothAcceleration;
+ btOpenCLBuffer<Vectormath::Aos::Vector3> m_clPerClothAcceleration;
+
+ /** Wind velocity to be applied normal to all non-static vertices in the solver.
+ * Index n is cloth n, array sized by number of cloths in the world not the solver.
+ */
+ btAlignedObjectArray< Vectormath::Aos::Vector3 > m_perClothWindVelocity;
+ btOpenCLBuffer<Vectormath::Aos::Vector3> m_clPerClothWindVelocity;
+
+ /** Velocity damping factor */
+ btAlignedObjectArray< float > m_perClothDampingFactor;
+ btOpenCLBuffer<float> m_clPerClothDampingFactor;
+
+ /** Velocity correction coefficient */
+ btAlignedObjectArray< float > m_perClothVelocityCorrectionCoefficient;
+ btOpenCLBuffer<float> m_clPerClothVelocityCorrectionCoefficient;
+
+ /** Lift parameter for wind effect on cloth. */
+ btAlignedObjectArray< float > m_perClothLiftFactor;
+ btOpenCLBuffer<float> m_clPerClothLiftFactor;
+
+ /** Drag parameter for wind effect on cloth. */
+ btAlignedObjectArray< float > m_perClothDragFactor;
+ btOpenCLBuffer<float> m_clPerClothDragFactor;
+
+ /** Density of the medium in which each cloth sits */
+ btAlignedObjectArray< float > m_perClothMediumDensity;
+ btOpenCLBuffer<float> m_clPerClothMediumDensity;
+
+ /**
+ * Collision shape details: pair of index of first collision shape for the cloth and number of collision objects.
+ */
+ btAlignedObjectArray< CollisionObjectIndices > m_perClothCollisionObjects;
+ btOpenCLBuffer<CollisionObjectIndices> m_clPerClothCollisionObjects;
+
+ /**
+ * Collision shapes being passed across to the cloths in this solver.
+ */
+ btAlignedObjectArray< CollisionShapeDescription > m_collisionObjectDetails;
+ btOpenCLBuffer< CollisionShapeDescription > m_clCollisionObjectDetails;
+
+
+
+ /**
+ * Friction coefficient for each cloth
+ */
+ btAlignedObjectArray< float > m_perClothFriction;
+ btOpenCLBuffer< float > m_clPerClothFriction;
+
+
+
+ cl_kernel prepareLinksKernel;
+ cl_kernel solvePositionsFromLinksKernel;
+ cl_kernel updateConstantsKernel;
+ cl_kernel integrateKernel;
+ cl_kernel addVelocityKernel;
+ cl_kernel updatePositionsFromVelocitiesKernel;
+ cl_kernel updateVelocitiesFromPositionsWithoutVelocitiesKernel;
+ cl_kernel updateVelocitiesFromPositionsWithVelocitiesKernel;
+ cl_kernel vSolveLinksKernel;
+ cl_kernel solveCollisionsAndUpdateVelocitiesKernel;
+ cl_kernel resetNormalsAndAreasKernel;
+ cl_kernel normalizeNormalsAndAreasKernel;
+ cl_kernel updateSoftBodiesKernel;
+
+ cl_kernel outputToVertexArrayKernel;
+ cl_kernel applyForcesKernel;
+
+ cl_command_queue m_cqCommandQue;
+ cl_context m_cxMainContext;
+
+ size_t m_defaultWorkGroupSize;
+
+
+ virtual bool buildShaders();
+
+ void resetNormalsAndAreas( int numVertices );
+
+ void normalizeNormalsAndAreas( int numVertices );
+
+ void executeUpdateSoftBodies( int firstTriangle, int numTriangles );
+
+ void prepareCollisionConstraints();
+
+ Vectormath::Aos::Vector3 ProjectOnAxis( const Vectormath::Aos::Vector3 &v, const Vectormath::Aos::Vector3 &a );
+
+ void ApplyClampedForce( float solverdt, const Vectormath::Aos::Vector3 &force, const Vectormath::Aos::Vector3 &vertexVelocity, float inverseMass, Vectormath::Aos::Vector3 &vertexForce );
+
+
+ int findSoftBodyIndex( const btSoftBody* const softBody );
+
+ virtual void applyForces( float solverdt );
+
+ /**
+ * Integrate motion on the solver.
+ */
+ virtual void integrate( float solverdt );
+
+ virtual void updateConstants( float timeStep );
+
+ float computeTriangleArea(
+ const Vectormath::Aos::Point3 &vertex0,
+ const Vectormath::Aos::Point3 &vertex1,
+ const Vectormath::Aos::Point3 &vertex2 );
+
+
+ //////////////////////////////////////
+ // Kernel dispatches
+ void prepareLinks();
+
+ void solveLinksForVelocity( int startLink, int numLinks, float kst );
+
+ void updatePositionsFromVelocities( float solverdt );
+
+ virtual void solveLinksForPosition( int startLink, int numLinks, float kst, float ti );
+
+ void updateVelocitiesFromPositionsWithVelocities( float isolverdt );
+
+ void updateVelocitiesFromPositionsWithoutVelocities( float isolverdt );
+ virtual void solveCollisionsAndUpdateVelocities( float isolverdt );
+
+ // End kernel dispatches
+ /////////////////////////////////////
+
+ void updateBounds();
+
+ void releaseKernels();
+
+public:
+ btOpenCLSoftBodySolver(cl_command_queue queue,cl_context ctx);
+
+ virtual ~btOpenCLSoftBodySolver();
+
+
+
+ btOpenCLAcceleratedSoftBodyInterface *findSoftBodyInterface( const btSoftBody* const softBody );
+
+ virtual btSoftBodyLinkData &getLinkData();
+
+ virtual btSoftBodyVertexData &getVertexData();
+
+ virtual btSoftBodyTriangleData &getTriangleData();
+
+ virtual SolverTypes getSolverType() const
+ {
+ return CL_SOLVER;
+ }
+
+
+ virtual bool checkInitialized();
+
+ virtual void updateSoftBodies( );
+
+ virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate=false);
+
+ virtual void copyBackToSoftBodies();
+
+ virtual void solveConstraints( float solverdt );
+
+ virtual void predictMotion( float solverdt );
+
+ virtual void processCollision( btSoftBody *, btCollisionObject* );
+
+ virtual void processCollision( btSoftBody*, btSoftBody* );
+
+ virtual void setDefaultWorkgroupSize(size_t workGroupSize)
+ {
+ m_defaultWorkGroupSize = workGroupSize;
+ }
+ virtual size_t getDefaultWorkGroupSize() const
+ {
+ return m_defaultWorkGroupSize;
+ }
+
+}; // btOpenCLSoftBodySolver
+
+
+/**
+ * Class to manage movement of data from a solver to a given target.
+ * This version is the CL to CPU version.
+ */
+class btSoftBodySolverOutputCLtoCPU : public btSoftBodySolverOutput
+{
+protected:
+
+public:
+ btSoftBodySolverOutputCLtoCPU()
+ {
+ }
+
+ /** Output current computed vertex data to the vertex buffers for all cloths in the solver. */
+ virtual void copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer );
+};
+
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_OPENCL_H
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.cpp b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.cpp
new file mode 100644
index 00000000..626d786c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.cpp
@@ -0,0 +1,1048 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "vectormath/vmInclude.h"
+#include <stdio.h> //@todo: remove the debugging printf at some stage
+#include "btSoftBodySolver_OpenCLSIMDAware.h"
+#include "BulletSoftBody/btSoftBodySolverVertexBuffer.h"
+#include "BulletSoftBody/btSoftBody.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+#include <limits.h>
+
+#define WAVEFRONT_SIZE 32
+#define WAVEFRONT_BLOCK_MULTIPLIER 2
+#define GROUP_SIZE (WAVEFRONT_SIZE*WAVEFRONT_BLOCK_MULTIPLIER)
+#define LINKS_PER_SIMD_LANE 16
+
+static const size_t workGroupSize = GROUP_SIZE;
+
+
+//CL_VERSION_1_1 seems broken on NVidia SDK so just disable it
+
+#if (0)//CL_VERSION_1_1 == 1)
+ //OpenCL 1.1 kernels use float3
+#define MSTRINGIFY(A) #A
+static const char* UpdatePositionsFromVelocitiesCLString =
+#include "OpenCLC/UpdatePositionsFromVelocities.cl"
+static const char* SolvePositionsCLString =
+#include "OpenCLC/SolvePositionsSIMDBatched.cl"
+static const char* UpdateNodesCLString =
+#include "OpenCLC/UpdateNodes.cl"
+static const char* UpdatePositionsCLString =
+#include "OpenCLC/UpdatePositions.cl"
+static const char* UpdateConstantsCLString =
+#include "OpenCLC/UpdateConstants.cl"
+static const char* IntegrateCLString =
+#include "OpenCLC/Integrate.cl"
+static const char* ApplyForcesCLString =
+#include "OpenCLC/ApplyForces.cl"
+static const char* UpdateNormalsCLString =
+#include "OpenCLC/UpdateNormals.cl"
+static const char* VSolveLinksCLString =
+#include "OpenCLC/VSolveLinks.cl"
+static const char* SolveCollisionsAndUpdateVelocitiesCLString =
+#include "OpenCLC/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl"
+static const char* OutputToVertexArrayCLString =
+#include "OpenCLC/OutputToVertexArray.cl"
+#else
+////OpenCL 1.0 kernels don't use float3
+#define MSTRINGIFY(A) #A
+static const char* UpdatePositionsFromVelocitiesCLString =
+#include "OpenCLC10/UpdatePositionsFromVelocities.cl"
+static const char* SolvePositionsCLString =
+#include "OpenCLC10/SolvePositionsSIMDBatched.cl"
+static const char* UpdateNodesCLString =
+#include "OpenCLC10/UpdateNodes.cl"
+static const char* UpdatePositionsCLString =
+#include "OpenCLC10/UpdatePositions.cl"
+static const char* UpdateConstantsCLString =
+#include "OpenCLC10/UpdateConstants.cl"
+static const char* IntegrateCLString =
+#include "OpenCLC10/Integrate.cl"
+static const char* ApplyForcesCLString =
+#include "OpenCLC10/ApplyForces.cl"
+static const char* UpdateNormalsCLString =
+#include "OpenCLC10/UpdateNormals.cl"
+static const char* VSolveLinksCLString =
+#include "OpenCLC10/VSolveLinks.cl"
+static const char* SolveCollisionsAndUpdateVelocitiesCLString =
+#include "OpenCLC10/SolveCollisionsAndUpdateVelocitiesSIMDBatched.cl"
+static const char* OutputToVertexArrayCLString =
+#include "OpenCLC10/OutputToVertexArray.cl"
+#endif //CL_VERSION_1_1
+
+
+
+btSoftBodyLinkDataOpenCLSIMDAware::btSoftBodyLinkDataOpenCLSIMDAware(cl_command_queue queue, cl_context ctx) :
+ m_cqCommandQue(queue),
+ m_wavefrontSize( WAVEFRONT_SIZE ),
+ m_linksPerWorkItem( LINKS_PER_SIMD_LANE ),
+ m_maxBatchesWithinWave( 0 ),
+ m_maxLinksPerWavefront( m_wavefrontSize * m_linksPerWorkItem ),
+ m_numWavefronts( 0 ),
+ m_maxVertex( 0 ),
+ m_clNumBatchesAndVerticesWithinWaves( queue, ctx, &m_numBatchesAndVerticesWithinWaves, true ),
+ m_clWavefrontVerticesGlobalAddresses( queue, ctx, &m_wavefrontVerticesGlobalAddresses, true ),
+ m_clLinkVerticesLocalAddresses( queue, ctx, &m_linkVerticesLocalAddresses, true ),
+ m_clLinkStrength( queue, ctx, &m_linkStrength, false ),
+ m_clLinksMassLSC( queue, ctx, &m_linksMassLSC, false ),
+ m_clLinksRestLengthSquared( queue, ctx, &m_linksRestLengthSquared, false ),
+ m_clLinksRestLength( queue, ctx, &m_linksRestLength, false ),
+ m_clLinksMaterialLinearStiffnessCoefficient( queue, ctx, &m_linksMaterialLinearStiffnessCoefficient, false )
+{
+}
+
+btSoftBodyLinkDataOpenCLSIMDAware::~btSoftBodyLinkDataOpenCLSIMDAware()
+{
+}
+
+static Vectormath::Aos::Vector3 toVector3( const btVector3 &vec )
+{
+ Vectormath::Aos::Vector3 outVec( vec.getX(), vec.getY(), vec.getZ() );
+ return outVec;
+}
+
+/** Allocate enough space in all link-related arrays to fit numLinks links */
+void btSoftBodyLinkDataOpenCLSIMDAware::createLinks( int numLinks )
+{
+ int previousSize = m_links.size();
+ int newSize = previousSize + numLinks;
+
+ btSoftBodyLinkData::createLinks( numLinks );
+
+ // Resize the link addresses array as well
+ m_linkAddresses.resize( newSize );
+}
+
+/** Insert the link described into the correct data structures assuming space has already been allocated by a call to createLinks */
+void btSoftBodyLinkDataOpenCLSIMDAware::setLinkAt(
+ const LinkDescription &link,
+ int linkIndex )
+{
+ btSoftBodyLinkData::setLinkAt( link, linkIndex );
+
+ if( link.getVertex0() > m_maxVertex )
+ m_maxVertex = link.getVertex0();
+ if( link.getVertex1() > m_maxVertex )
+ m_maxVertex = link.getVertex1();
+
+ // Set the link index correctly for initialisation
+ m_linkAddresses[linkIndex] = linkIndex;
+}
+
+bool btSoftBodyLinkDataOpenCLSIMDAware::onAccelerator()
+{
+ return m_onGPU;
+}
+
+bool btSoftBodyLinkDataOpenCLSIMDAware::moveToAccelerator()
+{
+ bool success = true;
+ success = success && m_clNumBatchesAndVerticesWithinWaves.moveToGPU();
+ success = success && m_clWavefrontVerticesGlobalAddresses.moveToGPU();
+ success = success && m_clLinkVerticesLocalAddresses.moveToGPU();
+ success = success && m_clLinkStrength.moveToGPU();
+ success = success && m_clLinksMassLSC.moveToGPU();
+ success = success && m_clLinksRestLengthSquared.moveToGPU();
+ success = success && m_clLinksRestLength.moveToGPU();
+ success = success && m_clLinksMaterialLinearStiffnessCoefficient.moveToGPU();
+
+ if( success ) {
+ m_onGPU = true;
+ }
+
+ return success;
+}
+
+bool btSoftBodyLinkDataOpenCLSIMDAware::moveFromAccelerator()
+{
+ bool success = true;
+ success = success && m_clNumBatchesAndVerticesWithinWaves.moveToGPU();
+ success = success && m_clWavefrontVerticesGlobalAddresses.moveToGPU();
+ success = success && m_clLinkVerticesLocalAddresses.moveToGPU();
+ success = success && m_clLinkStrength.moveFromGPU();
+ success = success && m_clLinksMassLSC.moveFromGPU();
+ success = success && m_clLinksRestLengthSquared.moveFromGPU();
+ success = success && m_clLinksRestLength.moveFromGPU();
+ success = success && m_clLinksMaterialLinearStiffnessCoefficient.moveFromGPU();
+
+ if( success ) {
+ m_onGPU = false;
+ }
+
+ return success;
+}
+
+
+
+
+
+
+
+
+btOpenCLSoftBodySolverSIMDAware::btOpenCLSoftBodySolverSIMDAware(cl_command_queue queue, cl_context ctx) :
+ btOpenCLSoftBodySolver( queue, ctx ),
+ m_linkData(queue, ctx)
+{
+ // Initial we will clearly need to update solver constants
+ // For now this is global for the cloths linked with this solver - we should probably make this body specific
+ // for performance in future once we understand more clearly when constants need to be updated
+ m_updateSolverConstants = true;
+
+ m_shadersInitialized = false;
+}
+
+btOpenCLSoftBodySolverSIMDAware::~btOpenCLSoftBodySolverSIMDAware()
+{
+ releaseKernels();
+}
+
+void btOpenCLSoftBodySolverSIMDAware::optimize( btAlignedObjectArray< btSoftBody * > &softBodies ,bool forceUpdate)
+{
+ if( forceUpdate|| m_softBodySet.size() != softBodies.size() )
+ {
+ // Have a change in the soft body set so update, reloading all the data
+ getVertexData().clear();
+ getTriangleData().clear();
+ getLinkData().clear();
+ m_softBodySet.resize(0);
+
+
+ for( int softBodyIndex = 0; softBodyIndex < softBodies.size(); ++softBodyIndex )
+ {
+ btSoftBody *softBody = softBodies[ softBodyIndex ];
+ using Vectormath::Aos::Matrix3;
+ using Vectormath::Aos::Point3;
+
+ // Create SoftBody that will store the information within the solver
+ btOpenCLAcceleratedSoftBodyInterface* newSoftBody = new btOpenCLAcceleratedSoftBodyInterface( softBody );
+ m_softBodySet.push_back( newSoftBody );
+
+ m_perClothAcceleration.push_back( toVector3(softBody->getWorldInfo()->m_gravity) );
+ m_perClothDampingFactor.push_back(softBody->m_cfg.kDP);
+ m_perClothVelocityCorrectionCoefficient.push_back( softBody->m_cfg.kVCF );
+ m_perClothLiftFactor.push_back( softBody->m_cfg.kLF );
+ m_perClothDragFactor.push_back( softBody->m_cfg.kDG );
+ m_perClothMediumDensity.push_back(softBody->getWorldInfo()->air_density);
+
+
+ m_perClothFriction.push_back( softBody->getFriction() );
+ m_perClothCollisionObjects.push_back( CollisionObjectIndices(-1, -1) );
+
+ // Add space for new vertices and triangles in the default solver for now
+ // TODO: Include space here for tearing too later
+ int firstVertex = getVertexData().getNumVertices();
+ int numVertices = softBody->m_nodes.size();
+ // Round maxVertices to a multiple of the workgroup size so we know we're safe to run over in a given group
+ // maxVertices can be increased to allow tearing, but should be used sparingly because these extra verts will always be processed
+ int maxVertices = GROUP_SIZE*((numVertices+GROUP_SIZE)/GROUP_SIZE);
+ // Allocate space for new vertices in all the vertex arrays
+ getVertexData().createVertices( numVertices, softBodyIndex, maxVertices );
+
+ int firstTriangle = getTriangleData().getNumTriangles();
+ int numTriangles = softBody->m_faces.size();
+ int maxTriangles = numTriangles;
+ getTriangleData().createTriangles( maxTriangles );
+
+ // Copy vertices from softbody into the solver
+ for( int vertex = 0; vertex < numVertices; ++vertex )
+ {
+ Point3 multPoint(softBody->m_nodes[vertex].m_x.getX(), softBody->m_nodes[vertex].m_x.getY(), softBody->m_nodes[vertex].m_x.getZ());
+ btSoftBodyVertexData::VertexDescription desc;
+
+ // TODO: Position in the softbody might be pre-transformed
+ // or we may need to adapt for the pose.
+ //desc.setPosition( cloth.getMeshTransform()*multPoint );
+ desc.setPosition( multPoint );
+
+ float vertexInverseMass = softBody->m_nodes[vertex].m_im;
+ desc.setInverseMass(vertexInverseMass);
+ getVertexData().setVertexAt( desc, firstVertex + vertex );
+ }
+
+ // Copy triangles similarly
+ // We're assuming here that vertex indices are based on the firstVertex rather than the entire scene
+ for( int triangle = 0; triangle < numTriangles; ++triangle )
+ {
+ // Note that large array storage is relative to the array not to the cloth
+ // So we need to add firstVertex to each value
+ int vertexIndex0 = (softBody->m_faces[triangle].m_n[0] - &(softBody->m_nodes[0]));
+ int vertexIndex1 = (softBody->m_faces[triangle].m_n[1] - &(softBody->m_nodes[0]));
+ int vertexIndex2 = (softBody->m_faces[triangle].m_n[2] - &(softBody->m_nodes[0]));
+ btSoftBodyTriangleData::TriangleDescription newTriangle(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, vertexIndex2 + firstVertex);
+ getTriangleData().setTriangleAt( newTriangle, firstTriangle + triangle );
+
+ // Increase vertex triangle counts for this triangle
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex0)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex1)++;
+ getVertexData().getTriangleCount(newTriangle.getVertexSet().vertex2)++;
+ }
+
+ int firstLink = getLinkData().getNumLinks();
+ int numLinks = softBody->m_links.size();
+ int maxLinks = numLinks;
+
+ // Allocate space for the links
+ getLinkData().createLinks( numLinks );
+
+ // Add the links
+ for( int link = 0; link < numLinks; ++link )
+ {
+ int vertexIndex0 = softBody->m_links[link].m_n[0] - &(softBody->m_nodes[0]);
+ int vertexIndex1 = softBody->m_links[link].m_n[1] - &(softBody->m_nodes[0]);
+
+ btSoftBodyLinkData::LinkDescription newLink(vertexIndex0 + firstVertex, vertexIndex1 + firstVertex, softBody->m_links[link].m_material->m_kLST);
+ newLink.setLinkStrength(1.f);
+ getLinkData().setLinkAt(newLink, firstLink + link);
+ }
+
+ newSoftBody->setFirstVertex( firstVertex );
+ newSoftBody->setFirstTriangle( firstTriangle );
+ newSoftBody->setNumVertices( numVertices );
+ newSoftBody->setMaxVertices( maxVertices );
+ newSoftBody->setNumTriangles( numTriangles );
+ newSoftBody->setMaxTriangles( maxTriangles );
+ newSoftBody->setFirstLink( firstLink );
+ newSoftBody->setNumLinks( numLinks );
+ }
+
+
+
+ updateConstants(0.f);
+
+
+ m_linkData.generateBatches();
+ m_triangleData.generateBatches();
+
+
+ // Build the shaders to match the batching parameters
+ buildShaders();
+ }
+}
+
+
+btSoftBodyLinkData &btOpenCLSoftBodySolverSIMDAware::getLinkData()
+{
+ // TODO: Consider setting link data to "changed" here
+ return m_linkData;
+}
+
+
+
+
+void btOpenCLSoftBodySolverSIMDAware::updateConstants( float timeStep )
+{
+
+ using namespace Vectormath::Aos;
+
+ if( m_updateSolverConstants )
+ {
+ m_updateSolverConstants = false;
+
+ // Will have to redo this if we change the structure (tear, maybe) or various other possible changes
+
+ // Initialise link constants
+ const int numLinks = m_linkData.getNumLinks();
+ for( int linkIndex = 0; linkIndex < numLinks; ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair &vertices( m_linkData.getVertexPair(linkIndex) );
+ m_linkData.getRestLength(linkIndex) = length((m_vertexData.getPosition( vertices.vertex0 ) - m_vertexData.getPosition( vertices.vertex1 )));
+ float invMass0 = m_vertexData.getInverseMass(vertices.vertex0);
+ float invMass1 = m_vertexData.getInverseMass(vertices.vertex1);
+ float linearStiffness = m_linkData.getLinearStiffnessCoefficient(linkIndex);
+ float massLSC = (invMass0 + invMass1)/linearStiffness;
+ m_linkData.getMassLSC(linkIndex) = massLSC;
+ float restLength = m_linkData.getRestLength(linkIndex);
+ float restLengthSquared = restLength*restLength;
+ m_linkData.getRestLengthSquared(linkIndex) = restLengthSquared;
+ }
+ }
+
+}
+
+
+
+void btOpenCLSoftBodySolverSIMDAware::solveConstraints( float solverdt )
+{
+
+ using Vectormath::Aos::Vector3;
+ using Vectormath::Aos::Point3;
+ using Vectormath::Aos::lengthSqr;
+ using Vectormath::Aos::dot;
+
+ // Prepare links
+ int numLinks = m_linkData.getNumLinks();
+ int numVertices = m_vertexData.getNumVertices();
+
+ float kst = 1.f;
+ float ti = 0.f;
+
+
+ m_clPerClothDampingFactor.moveToGPU();
+ m_clPerClothVelocityCorrectionCoefficient.moveToGPU();
+
+
+ // Ensure data is on accelerator
+ m_linkData.moveToAccelerator();
+ m_vertexData.moveToAccelerator();
+
+
+ //prepareLinks();
+
+ prepareCollisionConstraints();
+
+ // Solve drift
+ for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+ {
+
+ for( int i = 0; i < m_linkData.m_wavefrontBatchStartLengths.size(); ++i )
+ {
+ int startWave = m_linkData.m_wavefrontBatchStartLengths[i].start;
+ int numWaves = m_linkData.m_wavefrontBatchStartLengths[i].length;
+ solveLinksForPosition( startWave, numWaves, kst, ti );
+ }
+ } // for( int iteration = 0; iteration < m_numberOfPositionIterations ; ++iteration )
+
+
+ // At this point assume that the force array is blank - we will overwrite it
+ solveCollisionsAndUpdateVelocities( 1.f/solverdt );
+}
+
+
+//////////////////////////////////////
+// Kernel dispatches
+
+
+void btOpenCLSoftBodySolverSIMDAware::solveLinksForPosition( int startWave, int numWaves, float kst, float ti )
+{
+ cl_int ciErrNum;
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,0, sizeof(int), &startWave);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,1, sizeof(int), &numWaves);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,2, sizeof(float), &kst);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,3, sizeof(float), &ti);
+
+
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,4, sizeof(cl_mem), &m_linkData.m_clNumBatchesAndVerticesWithinWaves.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,5, sizeof(cl_mem), &m_linkData.m_clWavefrontVerticesGlobalAddresses.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,6, sizeof(cl_mem), &m_linkData.m_clLinkVerticesLocalAddresses.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,7, sizeof(cl_mem), &m_linkData.m_clLinksMassLSC.m_buffer);
+
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,8, sizeof(cl_mem), &m_linkData.m_clLinksRestLengthSquared.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,9, sizeof(cl_mem), &m_vertexData.m_clVertexInverseMass.m_buffer);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,10, sizeof(cl_mem), &m_vertexData.m_clVertexPosition.m_buffer);
+
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,11, WAVEFRONT_BLOCK_MULTIPLIER*sizeof(cl_int2), 0);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,12, m_linkData.getMaxVerticesPerWavefront()*WAVEFRONT_BLOCK_MULTIPLIER*sizeof(cl_float4), 0);
+ ciErrNum = clSetKernelArg(solvePositionsFromLinksKernel,13, m_linkData.getMaxVerticesPerWavefront()*WAVEFRONT_BLOCK_MULTIPLIER*sizeof(cl_float), 0);
+
+ size_t numWorkItems = workGroupSize*((numWaves*WAVEFRONT_SIZE + (workGroupSize-1)) / workGroupSize);
+
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,solvePositionsFromLinksKernel,1,NULL,&numWorkItems,&workGroupSize,0,0,0);
+
+ if( ciErrNum!= CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(solvePositionsFromLinksKernel)");
+ }
+
+} // solveLinksForPosition
+
+void btOpenCLSoftBodySolverSIMDAware::solveCollisionsAndUpdateVelocities( float isolverdt )
+{
+ // Copy kernel parameters to GPU
+ m_vertexData.moveToAccelerator();
+ m_clPerClothFriction.moveToGPU();
+ m_clPerClothDampingFactor.moveToGPU();
+ m_clPerClothCollisionObjects.moveToGPU();
+ m_clCollisionObjectDetails.moveToGPU();
+
+ cl_int ciErrNum;
+ int numVerts = m_vertexData.getNumVertices();
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 0, sizeof(int), &numVerts);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 1, sizeof(int), &isolverdt);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 2, sizeof(cl_mem),&m_vertexData.m_clClothIdentifier.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 3, sizeof(cl_mem),&m_vertexData.m_clVertexPreviousPosition.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 4, sizeof(cl_mem),&m_clPerClothFriction.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 5, sizeof(cl_mem),&m_clPerClothDampingFactor.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 6, sizeof(cl_mem),&m_clPerClothCollisionObjects.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 7, sizeof(cl_mem),&m_clCollisionObjectDetails.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 8, sizeof(cl_mem),&m_vertexData.m_clVertexForceAccumulator.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 9, sizeof(cl_mem),&m_vertexData.m_clVertexVelocity.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 10, sizeof(cl_mem),&m_vertexData.m_clVertexPosition.m_buffer);
+ ciErrNum = clSetKernelArg(solveCollisionsAndUpdateVelocitiesKernel, 11, sizeof(CollisionShapeDescription)*16,0);
+ size_t numWorkItems = workGroupSize*((m_vertexData.getNumVertices() + (workGroupSize-1)) / workGroupSize);
+
+ if (numWorkItems)
+ {
+ ciErrNum = clEnqueueNDRangeKernel(m_cqCommandQue,solveCollisionsAndUpdateVelocitiesKernel, 1, NULL, &numWorkItems, &workGroupSize,0,0,0);
+
+ if( ciErrNum != CL_SUCCESS )
+ {
+ btAssert( 0 && "enqueueNDRangeKernel(solveCollisionsAndUpdateVelocitiesKernel)");
+ }
+ }
+
+} // btOpenCLSoftBodySolverSIMDAware::updateVelocitiesFromPositionsWithoutVelocities
+
+// End kernel dispatches
+/////////////////////////////////////
+
+
+
+bool btOpenCLSoftBodySolverSIMDAware::buildShaders()
+{
+ bool returnVal = true;
+
+ if( m_shadersInitialized )
+ return true;
+
+ char *wavefrontMacros = new char[256];
+
+ sprintf(
+ wavefrontMacros,
+ "-DMAX_NUM_VERTICES_PER_WAVE=%d -DMAX_BATCHES_PER_WAVE=%d -DWAVEFRONT_SIZE=%d -DWAVEFRONT_BLOCK_MULTIPLIER=%d -DBLOCK_SIZE=%d",
+ m_linkData.getMaxVerticesPerWavefront(),
+ m_linkData.getMaxBatchesPerWavefront(),
+ m_linkData.getWavefrontSize(),
+ WAVEFRONT_BLOCK_MULTIPLIER,
+ WAVEFRONT_BLOCK_MULTIPLIER*m_linkData.getWavefrontSize());
+
+ updatePositionsFromVelocitiesKernel = clFunctions.compileCLKernelFromString( UpdatePositionsFromVelocitiesCLString, "UpdatePositionsFromVelocitiesKernel", "" );
+ solvePositionsFromLinksKernel = clFunctions.compileCLKernelFromString( SolvePositionsCLString, "SolvePositionsFromLinksKernel", wavefrontMacros );
+ updateVelocitiesFromPositionsWithVelocitiesKernel = clFunctions.compileCLKernelFromString( UpdateNodesCLString, "updateVelocitiesFromPositionsWithVelocitiesKernel", "" );
+ updateVelocitiesFromPositionsWithoutVelocitiesKernel = clFunctions.compileCLKernelFromString( UpdatePositionsCLString, "updateVelocitiesFromPositionsWithoutVelocitiesKernel", "" );
+ integrateKernel = clFunctions.compileCLKernelFromString( IntegrateCLString, "IntegrateKernel", "" );
+ applyForcesKernel = clFunctions.compileCLKernelFromString( ApplyForcesCLString, "ApplyForcesKernel", "" );
+ solveCollisionsAndUpdateVelocitiesKernel = clFunctions.compileCLKernelFromString( SolveCollisionsAndUpdateVelocitiesCLString, "SolveCollisionsAndUpdateVelocitiesKernel", "" );
+
+ // TODO: Rename to UpdateSoftBodies
+ resetNormalsAndAreasKernel = clFunctions.compileCLKernelFromString( UpdateNormalsCLString, "ResetNormalsAndAreasKernel", "" );
+ normalizeNormalsAndAreasKernel = clFunctions.compileCLKernelFromString( UpdateNormalsCLString, "NormalizeNormalsAndAreasKernel", "" );
+ updateSoftBodiesKernel = clFunctions.compileCLKernelFromString( UpdateNormalsCLString, "UpdateSoftBodiesKernel", "" );
+
+ delete [] wavefrontMacros;
+
+ if( returnVal )
+ m_shadersInitialized = true;
+
+ return returnVal;
+}
+
+
+
+
+static Vectormath::Aos::Transform3 toTransform3( const btTransform &transform )
+{
+ Vectormath::Aos::Transform3 outTransform;
+ outTransform.setCol(0, toVector3(transform.getBasis().getColumn(0)));
+ outTransform.setCol(1, toVector3(transform.getBasis().getColumn(1)));
+ outTransform.setCol(2, toVector3(transform.getBasis().getColumn(2)));
+ outTransform.setCol(3, toVector3(transform.getOrigin()));
+ return outTransform;
+}
+
+
+static void generateBatchesOfWavefronts( btAlignedObjectArray < btAlignedObjectArray <int> > &linksForWavefronts, btSoftBodyLinkData &linkData, int numVertices, btAlignedObjectArray < btAlignedObjectArray <int> > &wavefrontBatches )
+{
+ // A per-batch map of truth values stating whether a given vertex is in that batch
+ // This allows us to significantly optimize the batching
+ btAlignedObjectArray <btAlignedObjectArray<bool> > mapOfVerticesInBatches;
+
+ for( int waveIndex = 0; waveIndex < linksForWavefronts.size(); ++waveIndex )
+ {
+ btAlignedObjectArray <int> &wavefront( linksForWavefronts[waveIndex] );
+
+ int batch = 0;
+ bool placed = false;
+ while( batch < wavefrontBatches.size() && !placed )
+ {
+ // Test the current batch, see if this wave shares any vertex with the waves in the batch
+ bool foundSharedVertex = false;
+ for( int link = 0; link < wavefront.size(); ++link )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( wavefront[link] );
+ if( (mapOfVerticesInBatches[batch])[vertices.vertex0] || (mapOfVerticesInBatches[batch])[vertices.vertex1] )
+ {
+ foundSharedVertex = true;
+ }
+ }
+
+ if( !foundSharedVertex )
+ {
+ wavefrontBatches[batch].push_back( waveIndex );
+ // Insert vertices into this batch too
+ for( int link = 0; link < wavefront.size(); ++link )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( wavefront[link] );
+ (mapOfVerticesInBatches[batch])[vertices.vertex0] = true;
+ (mapOfVerticesInBatches[batch])[vertices.vertex1] = true;
+ }
+ placed = true;
+ }
+ batch++;
+ }
+ if( batch == wavefrontBatches.size() && !placed )
+ {
+ wavefrontBatches.resize( batch + 1 );
+ wavefrontBatches[batch].push_back( waveIndex );
+
+ // And resize map as well
+ mapOfVerticesInBatches.resize( batch + 1 );
+
+ // Resize maps with total number of vertices
+ mapOfVerticesInBatches[batch].resize( numVertices, false );
+
+ // Insert vertices into this batch too
+ for( int link = 0; link < wavefront.size(); ++link )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( wavefront[link] );
+ (mapOfVerticesInBatches[batch])[vertices.vertex0] = true;
+ (mapOfVerticesInBatches[batch])[vertices.vertex1] = true;
+ }
+ }
+ }
+ mapOfVerticesInBatches.clear();
+}
+
+// Function to remove an object from a vector maintaining correct ordering of the vector
+template< typename T > static void removeFromVector( btAlignedObjectArray< T > &vectorToUpdate, int indexToRemove )
+{
+ int currentSize = vectorToUpdate.size();
+ for( int i = indexToRemove; i < (currentSize-1); ++i )
+ {
+ vectorToUpdate[i] = vectorToUpdate[i+1];
+ }
+ if( currentSize > 0 )
+ vectorToUpdate.resize( currentSize - 1 );
+}
+
+/**
+ * Insert element into vectorToUpdate at index index.
+ */
+template< typename T > static void insertAtIndex( btAlignedObjectArray< T > &vectorToUpdate, int index, T element )
+{
+ vectorToUpdate.resize( vectorToUpdate.size() + 1 );
+ for( int i = (vectorToUpdate.size() - 1); i > index; --i )
+ {
+ vectorToUpdate[i] = vectorToUpdate[i-1];
+ }
+ vectorToUpdate[index] = element;
+}
+
+/**
+ * Insert into btAlignedObjectArray assuming the array is ordered and maintaining both ordering and uniqueness.
+ * ie it treats vectorToUpdate as an ordered set.
+ */
+template< typename T > static void insertUniqueAndOrderedIntoVector( btAlignedObjectArray<T> &vectorToUpdate, T element )
+{
+ int index = 0;
+ while( index < vectorToUpdate.size() && vectorToUpdate[index] < element )
+ {
+ index++;
+ }
+ if( index == vectorToUpdate.size() || vectorToUpdate[index] != element )
+ insertAtIndex( vectorToUpdate, index, element );
+}
+
+static void generateLinksPerVertex( int numVertices, btSoftBodyLinkData &linkData, btAlignedObjectArray< int > &listOfLinksPerVertex, btAlignedObjectArray <int> &numLinksPerVertex, int &maxLinks )
+{
+ for( int linkIndex = 0; linkIndex < linkData.getNumLinks(); ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair nodes( linkData.getVertexPair(linkIndex) );
+ numLinksPerVertex[nodes.vertex0]++;
+ numLinksPerVertex[nodes.vertex1]++;
+ }
+ int maxLinksPerVertex = 0;
+ for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
+ {
+ maxLinksPerVertex = btMax(numLinksPerVertex[vertexIndex], maxLinksPerVertex);
+ }
+ maxLinks = maxLinksPerVertex;
+
+ btAlignedObjectArray< int > linksFoundPerVertex;
+ linksFoundPerVertex.resize( numVertices, 0 );
+
+ listOfLinksPerVertex.resize( maxLinksPerVertex * numVertices );
+
+ for( int linkIndex = 0; linkIndex < linkData.getNumLinks(); ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair nodes( linkData.getVertexPair(linkIndex) );
+ {
+ // Do vertex 0
+ int vertexIndex = nodes.vertex0;
+ int linkForVertex = linksFoundPerVertex[nodes.vertex0];
+ int linkAddress = vertexIndex * maxLinksPerVertex + linkForVertex;
+
+ listOfLinksPerVertex[linkAddress] = linkIndex;
+
+ linksFoundPerVertex[nodes.vertex0] = linkForVertex + 1;
+ }
+ {
+ // Do vertex 1
+ int vertexIndex = nodes.vertex1;
+ int linkForVertex = linksFoundPerVertex[nodes.vertex1];
+ int linkAddress = vertexIndex * maxLinksPerVertex + linkForVertex;
+
+ listOfLinksPerVertex[linkAddress] = linkIndex;
+
+ linksFoundPerVertex[nodes.vertex1] = linkForVertex + 1;
+ }
+ }
+}
+
+static void computeBatchingIntoWavefronts(
+ btSoftBodyLinkData &linkData,
+ int wavefrontSize,
+ int linksPerWorkItem,
+ int maxLinksPerWavefront,
+ btAlignedObjectArray < btAlignedObjectArray <int> > &linksForWavefronts,
+ btAlignedObjectArray< btAlignedObjectArray < btAlignedObjectArray <int> > > &batchesWithinWaves, /* wave, batch, links in batch */
+ btAlignedObjectArray< btAlignedObjectArray< int > > &verticesForWavefronts /* wavefront, vertex */
+ )
+{
+
+
+ // Attempt generation of larger batches of links.
+ btAlignedObjectArray< bool > processedLink;
+ processedLink.resize( linkData.getNumLinks() );
+ btAlignedObjectArray< int > listOfLinksPerVertex;
+ int maxLinksPerVertex = 0;
+
+ // Count num vertices
+ int numVertices = 0;
+ for( int linkIndex = 0; linkIndex < linkData.getNumLinks(); ++linkIndex )
+ {
+ btSoftBodyLinkData::LinkNodePair nodes( linkData.getVertexPair(linkIndex) );
+ numVertices = btMax( numVertices, nodes.vertex0 + 1 );
+ numVertices = btMax( numVertices, nodes.vertex1 + 1 );
+ }
+
+ // Need list of links per vertex
+ // Compute valence of each vertex
+ btAlignedObjectArray <int> numLinksPerVertex;
+ numLinksPerVertex.resize(0);
+ numLinksPerVertex.resize( numVertices, 0 );
+
+ generateLinksPerVertex( numVertices, linkData, listOfLinksPerVertex, numLinksPerVertex, maxLinksPerVertex );
+
+ if (!numVertices)
+ return;
+
+ for( int vertex = 0; vertex < 10; ++vertex )
+ {
+ for( int link = 0; link < numLinksPerVertex[vertex]; ++link )
+ {
+ int linkAddress = vertex * maxLinksPerVertex + link;
+ }
+ }
+
+
+ // At this point we know what links we have for each vertex so we can start batching
+
+ // We want a vertex to start with, let's go with 0
+ int currentVertex = 0;
+ int linksProcessed = 0;
+
+ btAlignedObjectArray <int> verticesToProcess;
+
+ while( linksProcessed < linkData.getNumLinks() )
+ {
+ // Next wavefront
+ int nextWavefront = linksForWavefronts.size();
+ linksForWavefronts.resize( nextWavefront + 1 );
+ btAlignedObjectArray <int> &linksForWavefront(linksForWavefronts[nextWavefront]);
+ verticesForWavefronts.resize( nextWavefront + 1 );
+ btAlignedObjectArray<int> &vertexSet( verticesForWavefronts[nextWavefront] );
+
+ linksForWavefront.resize(0);
+
+ // Loop to find enough links to fill the wavefront
+ // Stopping if we either run out of links, or fill it
+ while( linksProcessed < linkData.getNumLinks() && linksForWavefront.size() < maxLinksPerWavefront )
+ {
+ // Go through the links for the current vertex
+ for( int link = 0; link < numLinksPerVertex[currentVertex] && linksForWavefront.size() < maxLinksPerWavefront; ++link )
+ {
+ int linkAddress = currentVertex * maxLinksPerVertex + link;
+ int linkIndex = listOfLinksPerVertex[linkAddress];
+
+ // If we have not already processed this link, add it to the wavefront
+ // Claim it as another processed link
+ // Add the vertex at the far end to the list of vertices to process.
+ if( !processedLink[linkIndex] )
+ {
+ linksForWavefront.push_back( linkIndex );
+ linksProcessed++;
+ processedLink[linkIndex] = true;
+ int v0 = linkData.getVertexPair(linkIndex).vertex0;
+ int v1 = linkData.getVertexPair(linkIndex).vertex1;
+ if( v0 == currentVertex )
+ verticesToProcess.push_back( v1 );
+ else
+ verticesToProcess.push_back( v0 );
+ }
+ }
+ if( verticesToProcess.size() > 0 )
+ {
+ // Get the element on the front of the queue and remove it
+ currentVertex = verticesToProcess[0];
+ removeFromVector( verticesToProcess, 0 );
+ } else {
+ // If we've not yet processed all the links, find the first unprocessed one
+ // and select one of its vertices as the current vertex
+ if( linksProcessed < linkData.getNumLinks() )
+ {
+ int searchLink = 0;
+ while( processedLink[searchLink] )
+ searchLink++;
+ currentVertex = linkData.getVertexPair(searchLink).vertex0;
+ }
+ }
+ }
+
+ // We have either finished or filled a wavefront
+ for( int link = 0; link < linksForWavefront.size(); ++link )
+ {
+ int v0 = linkData.getVertexPair( linksForWavefront[link] ).vertex0;
+ int v1 = linkData.getVertexPair( linksForWavefront[link] ).vertex1;
+ insertUniqueAndOrderedIntoVector( vertexSet, v0 );
+ insertUniqueAndOrderedIntoVector( vertexSet, v1 );
+ }
+ // Iterate over links mapped to the wave and batch those
+ // We can run a batch on each cycle trivially
+
+ batchesWithinWaves.resize( batchesWithinWaves.size() + 1 );
+ btAlignedObjectArray < btAlignedObjectArray <int> > &batchesWithinWave( batchesWithinWaves[batchesWithinWaves.size()-1] );
+
+
+ for( int link = 0; link < linksForWavefront.size(); ++link )
+ {
+ int linkIndex = linksForWavefront[link];
+ btSoftBodyLinkData::LinkNodePair vertices = linkData.getVertexPair( linkIndex );
+
+ int batch = 0;
+ bool placed = false;
+ while( batch < batchesWithinWave.size() && !placed )
+ {
+ bool foundSharedVertex = false;
+ if( batchesWithinWave[batch].size() >= wavefrontSize )
+ {
+ // If we have already filled this batch, move on to another
+ foundSharedVertex = true;
+ } else {
+ for( int link2 = 0; link2 < batchesWithinWave[batch].size(); ++link2 )
+ {
+ btSoftBodyLinkData::LinkNodePair vertices2 = linkData.getVertexPair( (batchesWithinWave[batch])[link2] );
+
+ if( vertices.vertex0 == vertices2.vertex0 ||
+ vertices.vertex1 == vertices2.vertex0 ||
+ vertices.vertex0 == vertices2.vertex1 ||
+ vertices.vertex1 == vertices2.vertex1 )
+ {
+ foundSharedVertex = true;
+ break;
+ }
+ }
+ }
+ if( !foundSharedVertex )
+ {
+ batchesWithinWave[batch].push_back( linkIndex );
+ placed = true;
+ } else {
+ ++batch;
+ }
+ }
+ if( batch == batchesWithinWave.size() && !placed )
+ {
+ batchesWithinWave.resize( batch + 1 );
+ batchesWithinWave[batch].push_back( linkIndex );
+ }
+ }
+
+ }
+
+}
+
+void btSoftBodyLinkDataOpenCLSIMDAware::generateBatches()
+{
+ btAlignedObjectArray < btAlignedObjectArray <int> > linksForWavefronts;
+ btAlignedObjectArray < btAlignedObjectArray <int> > wavefrontBatches;
+ btAlignedObjectArray< btAlignedObjectArray < btAlignedObjectArray <int> > > batchesWithinWaves;
+ btAlignedObjectArray< btAlignedObjectArray< int > > verticesForWavefronts; // wavefronts, vertices in wavefront as an ordered set
+
+ // Group the links into wavefronts
+ computeBatchingIntoWavefronts( *this, m_wavefrontSize, m_linksPerWorkItem, m_maxLinksPerWavefront, linksForWavefronts, batchesWithinWaves, verticesForWavefronts );
+
+
+ // Batch the wavefronts
+ generateBatchesOfWavefronts( linksForWavefronts, *this, m_maxVertex, wavefrontBatches );
+
+ m_numWavefronts = linksForWavefronts.size();
+
+ // At this point we have a description of which links we need to process in each wavefront
+
+ // First correctly fill the batch ranges vector
+ int numBatches = wavefrontBatches.size();
+ m_wavefrontBatchStartLengths.resize(0);
+ int prefixSum = 0;
+ for( int batchIndex = 0; batchIndex < numBatches; ++batchIndex )
+ {
+ int wavesInBatch = wavefrontBatches[batchIndex].size();
+ int nextPrefixSum = prefixSum + wavesInBatch;
+ m_wavefrontBatchStartLengths.push_back( BatchPair( prefixSum, nextPrefixSum - prefixSum ) );
+
+ prefixSum += wavesInBatch;
+ }
+
+ // Also find max number of batches within a wave
+ m_maxBatchesWithinWave = 0;
+ m_maxVerticesWithinWave = 0;
+ m_numBatchesAndVerticesWithinWaves.resize( m_numWavefronts );
+ for( int waveIndex = 0; waveIndex < m_numWavefronts; ++waveIndex )
+ {
+ // See if the number of batches in this wave is greater than the current maxium
+ int batchesInCurrentWave = batchesWithinWaves[waveIndex].size();
+ int verticesInCurrentWave = verticesForWavefronts[waveIndex].size();
+ m_maxBatchesWithinWave = btMax( batchesInCurrentWave, m_maxBatchesWithinWave );
+ m_maxVerticesWithinWave = btMax( verticesInCurrentWave, m_maxVerticesWithinWave );
+ }
+
+ // Add padding values both for alignment and as dudd addresses within LDS to compute junk rather than branch around
+ m_maxVerticesWithinWave = 16*((m_maxVerticesWithinWave/16)+2);
+
+ // Now we know the maximum number of vertices per-wave we can resize the global vertices array
+ m_wavefrontVerticesGlobalAddresses.resize( m_maxVerticesWithinWave * m_numWavefronts );
+
+ // Grab backup copies of all the link data arrays for the sorting process
+ btAlignedObjectArray<btSoftBodyLinkData::LinkNodePair> m_links_Backup(m_links);
+ btAlignedObjectArray<float> m_linkStrength_Backup(m_linkStrength);
+ btAlignedObjectArray<float> m_linksMassLSC_Backup(m_linksMassLSC);
+ btAlignedObjectArray<float> m_linksRestLengthSquared_Backup(m_linksRestLengthSquared);
+ //btAlignedObjectArray<Vectormath::Aos::Vector3> m_linksCLength_Backup(m_linksCLength);
+ //btAlignedObjectArray<float> m_linksLengthRatio_Backup(m_linksLengthRatio);
+ btAlignedObjectArray<float> m_linksRestLength_Backup(m_linksRestLength);
+ btAlignedObjectArray<float> m_linksMaterialLinearStiffnessCoefficient_Backup(m_linksMaterialLinearStiffnessCoefficient);
+
+ // Resize to a wavefront sized batch per batch per wave so we get perfectly coherent memory accesses.
+ m_links.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linkVerticesLocalAddresses.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linkStrength.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksMassLSC.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksRestLengthSquared.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksRestLength.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+ m_linksMaterialLinearStiffnessCoefficient.resize( m_maxBatchesWithinWave * m_wavefrontSize * m_numWavefronts );
+
+ // Then re-order links into wavefront blocks
+
+ // Total number of wavefronts moved. This will decide the ordering of sorted wavefronts.
+ int wavefrontCount = 0;
+
+ // Iterate over batches of wavefronts, then wavefronts in the batch
+ for( int batchIndex = 0; batchIndex < numBatches; ++batchIndex )
+ {
+ btAlignedObjectArray <int> &batch( wavefrontBatches[batchIndex] );
+ int wavefrontsInBatch = batch.size();
+
+
+ for( int wavefrontIndex = 0; wavefrontIndex < wavefrontsInBatch; ++wavefrontIndex )
+ {
+
+ int originalWavefrontIndex = batch[wavefrontIndex];
+ btAlignedObjectArray< int > &wavefrontVertices( verticesForWavefronts[originalWavefrontIndex] );
+ int verticesUsedByWavefront = wavefrontVertices.size();
+
+ // Copy the set of vertices into the correctly structured array for use on the device
+ // Fill the non-vertices with -1s
+ // so we can mask out those reads
+ for( int vertex = 0; vertex < verticesUsedByWavefront; ++vertex )
+ {
+ m_wavefrontVerticesGlobalAddresses[m_maxVerticesWithinWave * wavefrontCount + vertex] = wavefrontVertices[vertex];
+ }
+ for( int vertex = verticesUsedByWavefront; vertex < m_maxVerticesWithinWave; ++vertex )
+ {
+ m_wavefrontVerticesGlobalAddresses[m_maxVerticesWithinWave * wavefrontCount + vertex] = -1;
+ }
+
+ // Obtain the set of batches within the current wavefront
+ btAlignedObjectArray < btAlignedObjectArray <int> > &batchesWithinWavefront( batchesWithinWaves[originalWavefrontIndex] );
+ // Set the size of the batches for use in the solver, correctly ordered
+ NumBatchesVerticesPair batchesAndVertices;
+ batchesAndVertices.numBatches = batchesWithinWavefront.size();
+ batchesAndVertices.numVertices = verticesUsedByWavefront;
+ m_numBatchesAndVerticesWithinWaves[wavefrontCount] = batchesAndVertices;
+
+
+ // Now iterate over batches within the wavefront to structure the links correctly
+ for( int wavefrontBatch = 0; wavefrontBatch < batchesWithinWavefront.size(); ++wavefrontBatch )
+ {
+ btAlignedObjectArray <int> &linksInBatch( batchesWithinWavefront[wavefrontBatch] );
+ int wavefrontBatchSize = linksInBatch.size();
+
+ int batchAddressInTarget = m_maxBatchesWithinWave * m_wavefrontSize * wavefrontCount + m_wavefrontSize * wavefrontBatch;
+
+ for( int linkIndex = 0; linkIndex < wavefrontBatchSize; ++linkIndex )
+ {
+ int originalLinkAddress = linksInBatch[linkIndex];
+ // Reorder simple arrays trivially
+ m_links[batchAddressInTarget + linkIndex] = m_links_Backup[originalLinkAddress];
+ m_linkStrength[batchAddressInTarget + linkIndex] = m_linkStrength_Backup[originalLinkAddress];
+ m_linksMassLSC[batchAddressInTarget + linkIndex] = m_linksMassLSC_Backup[originalLinkAddress];
+ m_linksRestLengthSquared[batchAddressInTarget + linkIndex] = m_linksRestLengthSquared_Backup[originalLinkAddress];
+ m_linksRestLength[batchAddressInTarget + linkIndex] = m_linksRestLength_Backup[originalLinkAddress];
+ m_linksMaterialLinearStiffnessCoefficient[batchAddressInTarget + linkIndex] = m_linksMaterialLinearStiffnessCoefficient_Backup[originalLinkAddress];
+
+ // The local address is more complicated. We need to work out where a given vertex will end up
+ // by searching the set of vertices for this link and using the index as the local address
+ btSoftBodyLinkData::LinkNodePair localPair;
+ btSoftBodyLinkData::LinkNodePair globalPair = m_links[batchAddressInTarget + linkIndex];
+ localPair.vertex0 = wavefrontVertices.findLinearSearch( globalPair.vertex0 );
+ localPair.vertex1 = wavefrontVertices.findLinearSearch( globalPair.vertex1 );
+ m_linkVerticesLocalAddresses[batchAddressInTarget + linkIndex] = localPair;
+ }
+ for( int linkIndex = wavefrontBatchSize; linkIndex < m_wavefrontSize; ++linkIndex )
+ {
+ // Put 0s into these arrays for padding for cleanliness
+ m_links[batchAddressInTarget + linkIndex] = btSoftBodyLinkData::LinkNodePair(0, 0);
+ m_linkStrength[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksMassLSC[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksRestLengthSquared[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksRestLength[batchAddressInTarget + linkIndex] = 0.f;
+ m_linksMaterialLinearStiffnessCoefficient[batchAddressInTarget + linkIndex] = 0.f;
+
+
+ // For local addresses of junk data choose a set of addresses just above the range of valid ones
+ // and cycling tyhrough % 16 so that we don't have bank conficts between all dud addresses
+ // The valid addresses will do scatter and gather in the valid range, the junk ones should happily work
+ // off the end of that range so we need no control
+ btSoftBodyLinkData::LinkNodePair localPair;
+ localPair.vertex0 = verticesUsedByWavefront + (linkIndex % 16);
+ localPair.vertex1 = verticesUsedByWavefront + (linkIndex % 16);
+ m_linkVerticesLocalAddresses[batchAddressInTarget + linkIndex] = localPair;
+ }
+
+ }
+
+
+ wavefrontCount++;
+ }
+
+
+ }
+
+} // void btSoftBodyLinkDataDX11SIMDAware::generateBatches()
+
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.h b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.h
new file mode 100644
index 00000000..db4f2ae8
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCLSIMDAware.h
@@ -0,0 +1,82 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_OPENCL_SIMDAWARE_H
+#define BT_SOFT_BODY_SOLVER_OPENCL_SIMDAWARE_H
+
+#include "stddef.h" //for size_t
+#include "vectormath/vmInclude.h"
+
+#include "btSoftBodySolver_OpenCL.h"
+#include "btSoftBodySolverBuffer_OpenCL.h"
+#include "btSoftBodySolverLinkData_OpenCLSIMDAware.h"
+#include "btSoftBodySolverVertexData_OpenCL.h"
+#include "btSoftBodySolverTriangleData_OpenCL.h"
+
+
+
+
+
+class btOpenCLSoftBodySolverSIMDAware : public btOpenCLSoftBodySolver
+{
+protected:
+
+
+ btSoftBodyLinkDataOpenCLSIMDAware m_linkData;
+
+
+ bool m_shadersInitialized;
+
+
+ bool buildShaders();
+
+
+ void updateConstants( float timeStep );
+
+ float computeTriangleArea(
+ const Vectormath::Aos::Point3 &vertex0,
+ const Vectormath::Aos::Point3 &vertex1,
+ const Vectormath::Aos::Point3 &vertex2 );
+
+
+ //////////////////////////////////////
+ // Kernel dispatches
+ void solveLinksForPosition( int startLink, int numLinks, float kst, float ti );
+
+ void solveCollisionsAndUpdateVelocities( float isolverdt );
+ // End kernel dispatches
+ /////////////////////////////////////
+
+public:
+ btOpenCLSoftBodySolverSIMDAware(cl_command_queue queue,cl_context ctx);
+
+ virtual ~btOpenCLSoftBodySolverSIMDAware();
+
+ virtual SolverTypes getSolverType() const
+ {
+ return CL_SIMD_SOLVER;
+ }
+
+
+ virtual btSoftBodyLinkData &getLinkData();
+
+
+ virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate=false);
+
+ virtual void solveConstraints( float solverdt );
+
+}; // btOpenCLSoftBodySolverSIMDAware
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_OPENCL_SIMDAWARE_H
diff --git a/tests/bullet/src/BulletMultiThreaded/HeapManager.h b/tests/bullet/src/BulletMultiThreaded/HeapManager.h
new file mode 100644
index 00000000..b2da4ef5
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/HeapManager.h
@@ -0,0 +1,117 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef BT_HEAP_MANAGER_H__
+#define BT_HEAP_MANAGER_H__
+
+#ifdef __SPU__
+ #define HEAP_STACK_SIZE 32
+#else
+ #define HEAP_STACK_SIZE 64
+#endif
+
+#define MIN_ALLOC_SIZE 16
+
+
+class HeapManager
+{
+private:
+ ATTRIBUTE_ALIGNED16(unsigned char *mHeap);
+ ATTRIBUTE_ALIGNED16(unsigned int mHeapBytes);
+ ATTRIBUTE_ALIGNED16(unsigned char *mPoolStack[HEAP_STACK_SIZE]);
+ ATTRIBUTE_ALIGNED16(unsigned int mCurStack);
+
+public:
+ enum {ALIGN16,ALIGN128};
+
+ HeapManager(unsigned char *buf,int bytes)
+ {
+ mHeap = buf;
+ mHeapBytes = bytes;
+ clear();
+ }
+
+ ~HeapManager()
+ {
+ }
+
+ int getAllocated()
+ {
+ return (int)(mPoolStack[mCurStack]-mHeap);
+ }
+
+ int getRest()
+ {
+ return mHeapBytes-getAllocated();
+ }
+
+ void *allocate(size_t bytes,int alignment = ALIGN16)
+ {
+ if(bytes <= 0) bytes = MIN_ALLOC_SIZE;
+ btAssert(mCurStack < (HEAP_STACK_SIZE-1));
+
+
+#if defined(_WIN64) || defined(__LP64__) || defined(__x86_64__)
+ unsigned long long p = (unsigned long long )mPoolStack[mCurStack];
+ if(alignment == ALIGN128) {
+ p = ((p+127) & 0xffffffffffffff80);
+ bytes = (bytes+127) & 0xffffffffffffff80;
+ }
+ else {
+ bytes = (bytes+15) & 0xfffffffffffffff0;
+ }
+
+ btAssert(bytes <=(mHeapBytes-(p-(unsigned long long )mHeap)) );
+
+#else
+ unsigned long p = (unsigned long )mPoolStack[mCurStack];
+ if(alignment == ALIGN128) {
+ p = ((p+127) & 0xffffff80);
+ bytes = (bytes+127) & 0xffffff80;
+ }
+ else {
+ bytes = (bytes+15) & 0xfffffff0;
+ }
+ btAssert(bytes <=(mHeapBytes-(p-(unsigned long)mHeap)) );
+#endif
+ unsigned char * bla = (unsigned char *)(p + bytes);
+ mPoolStack[++mCurStack] = bla;
+ return (void*)p;
+ }
+
+ void deallocate(void *p)
+ {
+ (void) p;
+ mCurStack--;
+ }
+
+ void clear()
+ {
+ mPoolStack[0] = mHeap;
+ mCurStack = 0;
+ }
+
+// void printStack()
+// {
+// for(unsigned int i=0;i<=mCurStack;i++) {
+// PRINTF("memStack %2d 0x%x\n",i,(uint32_t)mPoolStack[i]);
+// }
+// }
+
+};
+
+#endif //BT_HEAP_MANAGER_H__
+
diff --git a/tests/bullet/src/BulletMultiThreaded/Makefile.original b/tests/bullet/src/BulletMultiThreaded/Makefile.original
new file mode 100644
index 00000000..d0a8318b
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/Makefile.original
@@ -0,0 +1,187 @@
+__ARCH_BITS__ := 32
+
+# define macros
+NARROWPHASEDIR=./SpuNarrowPhaseCollisionTask
+SPU_TASKFILE=$(NARROWPHASEDIR)/SpuGatheringCollisionTask
+
+IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
+
+ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
+ CELL_TOP ?= /opt/cell/sdk
+ CELL_SYSROOT := /opt/cell/sysroot
+else
+ CELL_TOP ?= /opt/ibm/cell-sdk/prototype
+ CELL_SYSROOT := $(CELL_TOP)/sysroot
+endif
+
+
+USE_CCACHE=ccache
+RM=rm -f
+OUTDIR=./out
+DEBUGFLAG=-DNDEBUG
+LIBOUTDIR=../../lib/ibmsdk
+COLLISIONDIR=../../src/BulletCollision
+MATHDIR=../../src/LinearMath
+ARCHITECTUREFLAG=-m$(__ARCH_BITS__)
+ifeq "$(__ARCH_BITS__)" "64"
+ SPU_DEFFLAGS= -DUSE_LIBSPE2 -D__SPU__ -DUSE_ADDR64
+else
+ SPU_DEFFLAGS= -DUSE_LIBSPE2 -D__SPU__
+endif
+
+SPU_DEFFLAGS+=-DUSE_PE_BOX_BOX
+
+SPU_GCC=$(USE_CCACHE) /usr/bin/spu-gcc
+SPU_INCLUDEDIR= -Ivectormath/scalar/cpp -I. -I$(CELL_SYSROOT)/usr/spu/include -I../../src -I$(NARROWPHASEDIR)
+#SPU_CFLAGS= $(DEBUGFLAG) -W -Wall -Winline -Os -c -include spu_intrinsics.h -include stdbool.h
+SPU_CFLAGS= $(DEBUGFLAG) -W -Wall -Winline -O3 -mbranch-hints -fomit-frame-pointer -ftree-vectorize -finline-functions -ftree-vect-loop-version -ftree-loop-optimize -ffast-math -fno-rtti -fno-exceptions -c -include spu_intrinsics.h -include stdbool.h
+
+SPU_LFLAGS= -Wl,-N
+SPU_LIBRARIES=-lstdc++
+SPU_EMBED=/usr/bin/ppu-embedspu
+SPU_AR=/usr/bin/ar
+SYMBOLNAME=spu_program
+
+ifeq "$(__ARCH_BITS__)" "64"
+ PPU_DEFFLAGS= -DUSE_LIBSPE2 -DUSE_ADDR64
+ PPU_GCC=$(USE_CCACHE) /usr/bin/ppu-gcc
+else
+ PPU_DEFFLAGS= -DUSE_LIBSPE2
+ PPU_GCC=$(USE_CCACHE) /usr/bin/ppu32-gcc
+endif
+
+PPU_CFLAGS= $(ARCHITECTUREFLAG) $(DEBUGFLAG) -W -Wall -Winline -O3 -c -mabi=altivec -maltivec -include altivec.h -include stdbool.h
+PPU_INCLUDEDIR= -I. -I$(CELL_SYSROOT)/usr/include -I../../src -I$(NARROWPHASEDIR)
+PPU_LFLAGS= $(ARCHITECTUREFLAG) -Wl,-m,elf$(__ARCH_BITS__)ppc
+PPU_LIBRARIES= -lstdc++ -lsupc++ -lgcc -lgcov -lspe2 -lpthread -L../../lib/ibmsdk -lbulletcollision -lbulletdynamics -lbulletmath -L$(CELL_SYSROOT)/usr/lib$(__ARCH_BITS__) -R$(CELL_SYSROOT)/usr/lib
+PPU_AR=/usr/bin/ar
+
+MakeOut :
+# rm -f -R $(OUTDIR) ; mkdir $(OUTDIR)
+ @echo "usage: make spu, make ppu, make all, or make clean"
+# SPU
+SpuTaskFile : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/SpuTaskFile.o $(SPU_TASKFILE).cpp
+
+boxBoxDistance : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(NARROWPHASEDIR)/$@.cpp
+
+SpuFakeDma : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+SpuContactManifoldCollisionAlgorithm_spu : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o SpuContactManifoldCollisionAlgorithm.cpp
+
+SpuCollisionShapes : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(NARROWPHASEDIR)/$@.cpp
+
+SpuContactResult : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(NARROWPHASEDIR)/$@.cpp
+
+#SpuGatheringCollisionTask : MakeOut
+# $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(NARROWPHASEDIR)/$@.cpp
+
+SpuGjkPairDetector: MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(NARROWPHASEDIR)/$@.cpp
+
+SpuMinkowskiPenetrationDepthSolver : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(NARROWPHASEDIR)/$@.cpp
+
+SpuVoronoiSimplexSolver : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(NARROWPHASEDIR)/$@.cpp
+
+#SpuLibspe2Support_spu : MakeOut
+# $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o SpuLibspe2Support.cpp
+
+## SPU-Bullet
+btPersistentManifold : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(COLLISIONDIR)/NarrowPhaseCollision/$@.cpp
+
+btOptimizedBvh : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(COLLISIONDIR)/CollisionShapes/$@.cpp
+
+btCollisionObject : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(COLLISIONDIR)/CollisionDispatch/$@.cpp
+
+btTriangleCallback : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(COLLISIONDIR)/CollisionShapes/$@.cpp
+
+btTriangleIndexVertexArray : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(COLLISIONDIR)/CollisionShapes/$@.cpp
+
+btStridingMeshInterface : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(COLLISIONDIR)/CollisionShapes/$@.cpp
+
+btAlignedAllocator : MakeOut
+ $(SPU_GCC) $(SPU_DEFFLAGS) $(SPU_CFLAGS) $(SPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $(MATHDIR)/$@.cpp
+
+
+# PPU
+SpuGatheringCollisionDispatcher : MakeOut
+ $(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+SequentialThreadSupport: MakeOut
+ $(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+SpuLibspe2Support: MakeOut
+ $(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+btThreadSupportInterface: MakeOut
+ $(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+SpuCollisionTaskProcess : MakeOut
+ $(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+SpuContactManifoldCollisionAlgorithm : MakeOut
+ $(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+SpuSampleTaskProcess : MakeOut
+ $(PPU_GCC) $(PPU_DEFFLAGS) $(PPU_CFLAGS) $(PPU_INCLUDEDIR) -o $(OUTDIR)/$@.o $@.cpp
+
+
+
+spu : boxBoxDistance SpuFakeDma SpuContactManifoldCollisionAlgorithm_spu SpuContactResult SpuTaskFile \
+ SpuGjkPairDetector SpuMinkowskiPenetrationDepthSolver SpuVoronoiSimplexSolver SpuCollisionShapes \
+ btPersistentManifold btOptimizedBvh btCollisionObject btTriangleCallback btTriangleIndexVertexArray \
+ btStridingMeshInterface btAlignedAllocator
+ $(SPU_GCC) -o $(OUTDIR)/spuCollision.elf \
+ $(OUTDIR)/SpuTaskFile.o \
+ $(OUTDIR)/SpuFakeDma.o \
+ $(OUTDIR)/boxBoxDistance.o \
+ $(OUTDIR)/SpuContactManifoldCollisionAlgorithm_spu.o \
+ $(OUTDIR)/SpuContactResult.o \
+ $(OUTDIR)/SpuCollisionShapes.o \
+ $(OUTDIR)/SpuGjkPairDetector.o \
+ $(OUTDIR)/SpuMinkowskiPenetrationDepthSolver.o \
+ $(OUTDIR)/SpuVoronoiSimplexSolver.o \
+ $(OUTDIR)/btPersistentManifold.o \
+ $(OUTDIR)/btTriangleCallback.o \
+ $(OUTDIR)/btTriangleIndexVertexArray.o \
+ $(OUTDIR)/btStridingMeshInterface.o \
+ $(OUTDIR)/btAlignedAllocator.o \
+ $(SPU_LFLAGS) $(SPU_LIBRARIES)
+
+spu-embed : spu
+ $(SPU_EMBED) $(ARCHITECTUREFLAG) $(SYMBOLNAME) $(OUTDIR)/spuCollision.elf $(OUTDIR)/$@.o
+ $(SPU_AR) -qcs $(LIBOUTDIR)/libspu.a $(OUTDIR)/$@.o
+
+
+
+ppu : SpuGatheringCollisionDispatcher SpuCollisionTaskProcess btThreadSupportInterface \
+ SpuLibspe2Support SpuContactManifoldCollisionAlgorithm SpuSampleTaskProcess
+ $(PPU_AR) -qcs $(LIBOUTDIR)/bulletmultithreaded.a \
+ $(OUTDIR)/SpuCollisionTaskProcess.o \
+ $(OUTDIR)/SpuSampleTaskProcess.o \
+ $(OUTDIR)/SpuGatheringCollisionDispatcher.o \
+ $(OUTDIR)/SpuLibspe2Support.o \
+ $(OUTDIR)/btThreadSupportInterface.o \
+ $(OUTDIR)/SpuContactManifoldCollisionAlgorithm.o
+
+all : spu-embed ppu
+
+clean:
+ $(RM) $(OUTDIR)/* ; $(RM) $(LIBOUTDIR)/libspu.a ; $(RM) $(LIBOUTDIR)/bulletmultithreaded.a
+
+
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/PlatformDefinitions.h b/tests/bullet/src/BulletMultiThreaded/PlatformDefinitions.h
new file mode 100644
index 00000000..142103a0
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/PlatformDefinitions.h
@@ -0,0 +1,99 @@
+#ifndef BT_TYPE_DEFINITIONS_H
+#define BT_TYPE_DEFINITIONS_H
+
+///This file provides some platform/compiler checks for common definitions
+#include "LinearMath/btScalar.h"
+#include "LinearMath/btMinMax.h"
+
+#ifdef PFX_USE_FREE_VECTORMATH
+#include "physics_effects/base_level/base/pfx_vectormath_include.win32.h"
+typedef Vectormath::Aos::Vector3 vmVector3;
+typedef Vectormath::Aos::Quat vmQuat;
+typedef Vectormath::Aos::Matrix3 vmMatrix3;
+typedef Vectormath::Aos::Transform3 vmTransform3;
+typedef Vectormath::Aos::Point3 vmPoint3;
+#else
+#include "vectormath/vmInclude.h"
+#endif//PFX_USE_FREE_VECTORMATH
+
+
+
+
+
+#ifdef _WIN32
+
+typedef union
+{
+ unsigned int u;
+ void *p;
+} addr64;
+
+#define USE_WIN32_THREADING 1
+
+ #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
+ #else
+ #endif //__MINGW32__
+
+ typedef unsigned char uint8_t;
+#ifndef __PHYSICS_COMMON_H__
+#ifndef PFX_USE_FREE_VECTORMATH
+#ifndef __BT_SKIP_UINT64_H
+ typedef unsigned long int uint64_t;
+#endif //__BT_SKIP_UINT64_H
+#endif //PFX_USE_FREE_VECTORMATH
+ typedef unsigned int uint32_t;
+#endif //__PHYSICS_COMMON_H__
+ typedef unsigned short uint16_t;
+
+ #include <malloc.h>
+ #define memalign(alignment, size) malloc(size);
+
+#include <string.h> //memcpy
+
+
+
+ #include <stdio.h>
+ #define spu_printf printf
+
+#else
+ #include <stdint.h>
+ #include <stdlib.h>
+ #include <string.h> //for memcpy
+
+#if defined (__CELLOS_LV2__)
+ // Playstation 3 Cell SDK
+#include <spu_printf.h>
+
+#else
+ // posix system
+
+#define USE_PTHREADS (1)
+
+#ifdef USE_LIBSPE2
+#include <stdio.h>
+#define spu_printf printf
+#define DWORD unsigned int
+ typedef union
+ {
+ unsigned long long ull;
+ unsigned int ui[2];
+ void *p;
+ } addr64;
+#endif // USE_LIBSPE2
+
+#endif //__CELLOS_LV2__
+
+#endif
+
+#ifdef __SPU__
+#include <stdio.h>
+#define printf spu_printf
+#endif
+
+/* Included here because we need uint*_t typedefs */
+#include "PpuAddressSpace.h"
+
+#endif //BT_TYPE_DEFINITIONS_H
+
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.cpp b/tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.cpp
new file mode 100644
index 00000000..c8b49ee3
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.cpp
@@ -0,0 +1,399 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <stdio.h>
+#include "PosixThreadSupport.h"
+#ifdef USE_PTHREADS
+#include <errno.h>
+#include <unistd.h>
+
+#include "SpuCollisionTaskProcess.h"
+#include "SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
+
+#define checkPThreadFunction(returnValue) \
+ if(0 != returnValue) { \
+ printf("PThread problem at line %i in file %s: %i %d\n", __LINE__, __FILE__, returnValue, errno); \
+ }
+
+// The number of threads should be equal to the number of available cores
+// Todo: each worker should be linked to a single core, using SetThreadIdealProcessor.
+
+// PosixThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
+// Setup and initialize SPU/CELL/Libspe2
+PosixThreadSupport::PosixThreadSupport(ThreadConstructionInfo& threadConstructionInfo)
+{
+ startThreads(threadConstructionInfo);
+}
+
+// cleanup/shutdown Libspe2
+PosixThreadSupport::~PosixThreadSupport()
+{
+ stopSPU();
+}
+
+#if (defined (__APPLE__))
+#define NAMED_SEMAPHORES
+#endif
+
+// this semaphore will signal, if and how many threads are finished with their work
+static sem_t* mainSemaphore=0;
+
+static sem_t* createSem(const char* baseName)
+{
+ static int semCount = 0;
+#ifdef NAMED_SEMAPHORES
+ /// Named semaphore begin
+ char name[32];
+ snprintf(name, 32, "/%s-%d-%4.4d", baseName, getpid(), semCount++);
+ sem_t* tempSem = sem_open(name, O_CREAT, 0600, 0);
+
+ if (tempSem != reinterpret_cast<sem_t *>(SEM_FAILED))
+ {
+// printf("Created \"%s\" Semaphore %p\n", name, tempSem);
+ }
+ else
+ {
+ //printf("Error creating Semaphore %d\n", errno);
+ exit(-1);
+ }
+ /// Named semaphore end
+#else
+ sem_t* tempSem = new sem_t;
+ checkPThreadFunction(sem_init(tempSem, 0, 0));
+#endif
+ return tempSem;
+}
+
+static void destroySem(sem_t* semaphore)
+{
+#ifdef NAMED_SEMAPHORES
+ checkPThreadFunction(sem_close(semaphore));
+#else
+ checkPThreadFunction(sem_destroy(semaphore));
+ delete semaphore;
+#endif
+}
+
+static void *threadFunction(void *argument)
+{
+
+ PosixThreadSupport::btSpuStatus* status = (PosixThreadSupport::btSpuStatus*)argument;
+
+
+ while (1)
+ {
+ checkPThreadFunction(sem_wait(status->startSemaphore));
+
+ void* userPtr = status->m_userPtr;
+
+ if (userPtr)
+ {
+ btAssert(status->m_status);
+ status->m_userThreadFunc(userPtr,status->m_lsMemory);
+ status->m_status = 2;
+ checkPThreadFunction(sem_post(mainSemaphore));
+ status->threadUsed++;
+ } else {
+ //exit Thread
+ status->m_status = 3;
+ checkPThreadFunction(sem_post(mainSemaphore));
+ printf("Thread with taskId %i exiting\n",status->m_taskId);
+ break;
+ }
+
+ }
+
+ printf("Thread TERMINATED\n");
+ return 0;
+
+}
+
+///send messages to SPUs
+void PosixThreadSupport::sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t taskId)
+{
+ /// gMidphaseSPU.sendRequest(CMD_GATHER_AND_PROCESS_PAIRLIST, (uint32_t) &taskDesc);
+
+ ///we should spawn an SPU task here, and in 'waitForResponse' it should wait for response of the (one of) the first tasks that finished
+
+
+
+ switch (uiCommand)
+ {
+ case CMD_GATHER_AND_PROCESS_PAIRLIST:
+ {
+ btSpuStatus& spuStatus = m_activeSpuStatus[taskId];
+ btAssert(taskId >= 0);
+ btAssert(taskId < m_activeSpuStatus.size());
+
+ spuStatus.m_commandId = uiCommand;
+ spuStatus.m_status = 1;
+ spuStatus.m_userPtr = (void*)uiArgument0;
+
+ // fire event to start new task
+ checkPThreadFunction(sem_post(spuStatus.startSemaphore));
+ break;
+ }
+ default:
+ {
+ ///not implemented
+ btAssert(0);
+ }
+
+ };
+
+
+}
+
+
+///check for messages from SPUs
+void PosixThreadSupport::waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1)
+{
+ ///We should wait for (one of) the first tasks to finish (or other SPU messages), and report its response
+
+ ///A possible response can be 'yes, SPU handled it', or 'no, please do a PPU fallback'
+
+
+ btAssert(m_activeSpuStatus.size());
+
+ // wait for any of the threads to finish
+ checkPThreadFunction(sem_wait(mainSemaphore));
+
+ // get at least one thread which has finished
+ size_t last = -1;
+
+ for(size_t t=0; t < size_t(m_activeSpuStatus.size()); ++t) {
+ if(2 == m_activeSpuStatus[t].m_status) {
+ last = t;
+ break;
+ }
+ }
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[last];
+
+ btAssert(spuStatus.m_status > 1);
+ spuStatus.m_status = 0;
+
+ // need to find an active spu
+ btAssert(last >= 0);
+
+ *puiArgument0 = spuStatus.m_taskId;
+ *puiArgument1 = spuStatus.m_status;
+}
+
+
+
+void PosixThreadSupport::startThreads(ThreadConstructionInfo& threadConstructionInfo)
+{
+ printf("%s creating %i threads.\n", __FUNCTION__, threadConstructionInfo.m_numThreads);
+ m_activeSpuStatus.resize(threadConstructionInfo.m_numThreads);
+
+ mainSemaphore = createSem("main");
+ //checkPThreadFunction(sem_wait(mainSemaphore));
+
+ for (int i=0;i < threadConstructionInfo.m_numThreads;i++)
+ {
+ printf("starting thread %d\n",i);
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[i];
+
+ spuStatus.startSemaphore = createSem("threadLocal");
+
+ checkPThreadFunction(pthread_create(&spuStatus.thread, NULL, &threadFunction, (void*)&spuStatus));
+
+ spuStatus.m_userPtr=0;
+
+ spuStatus.m_taskId = i;
+ spuStatus.m_commandId = 0;
+ spuStatus.m_status = 0;
+ spuStatus.m_lsMemory = threadConstructionInfo.m_lsMemoryFunc();
+ spuStatus.m_userThreadFunc = threadConstructionInfo.m_userThreadFunc;
+ spuStatus.threadUsed = 0;
+
+ printf("started thread %d \n",i);
+
+ }
+
+}
+
+void PosixThreadSupport::startSPU()
+{
+}
+
+
+///tell the task scheduler we are done with the SPU tasks
+void PosixThreadSupport::stopSPU()
+{
+ for(size_t t=0; t < size_t(m_activeSpuStatus.size()); ++t)
+ {
+ btSpuStatus& spuStatus = m_activeSpuStatus[t];
+ printf("%s: Thread %i used: %ld\n", __FUNCTION__, int(t), spuStatus.threadUsed);
+
+ spuStatus.m_userPtr = 0;
+ checkPThreadFunction(sem_post(spuStatus.startSemaphore));
+ checkPThreadFunction(sem_wait(mainSemaphore));
+
+ printf("destroy semaphore\n");
+ destroySem(spuStatus.startSemaphore);
+ printf("semaphore destroyed\n");
+ checkPThreadFunction(pthread_join(spuStatus.thread,0));
+ }
+ printf("destroy main semaphore\n");
+ destroySem(mainSemaphore);
+ printf("main semaphore destroyed\n");
+ m_activeSpuStatus.clear();
+}
+
+class PosixCriticalSection : public btCriticalSection
+{
+ pthread_mutex_t m_mutex;
+
+public:
+ PosixCriticalSection()
+ {
+ pthread_mutex_init(&m_mutex, NULL);
+ }
+ virtual ~PosixCriticalSection()
+ {
+ pthread_mutex_destroy(&m_mutex);
+ }
+
+ ATTRIBUTE_ALIGNED16(unsigned int mCommonBuff[32]);
+
+ virtual unsigned int getSharedParam(int i)
+ {
+ return mCommonBuff[i];
+ }
+ virtual void setSharedParam(int i,unsigned int p)
+ {
+ mCommonBuff[i] = p;
+ }
+
+ virtual void lock()
+ {
+ pthread_mutex_lock(&m_mutex);
+ }
+ virtual void unlock()
+ {
+ pthread_mutex_unlock(&m_mutex);
+ }
+};
+
+
+#if defined(_POSIX_BARRIERS) && (_POSIX_BARRIERS - 20012L) >= 0
+/* OK to use barriers on this platform */
+class PosixBarrier : public btBarrier
+{
+ pthread_barrier_t m_barr;
+ int m_numThreads;
+public:
+ PosixBarrier()
+ :m_numThreads(0) { }
+ virtual ~PosixBarrier() {
+ pthread_barrier_destroy(&m_barr);
+ }
+
+ virtual void sync()
+ {
+ int rc = pthread_barrier_wait(&m_barr);
+ if(rc != 0 && rc != PTHREAD_BARRIER_SERIAL_THREAD)
+ {
+ printf("Could not wait on barrier\n");
+ exit(-1);
+ }
+ }
+ virtual void setMaxCount(int numThreads)
+ {
+ int result = pthread_barrier_init(&m_barr, NULL, numThreads);
+ m_numThreads = numThreads;
+ btAssert(result==0);
+ }
+ virtual int getMaxCount()
+ {
+ return m_numThreads;
+ }
+};
+#else
+/* Not OK to use barriers on this platform - insert alternate code here */
+class PosixBarrier : public btBarrier
+{
+ pthread_mutex_t m_mutex;
+ pthread_cond_t m_cond;
+
+ int m_numThreads;
+ int m_called;
+
+public:
+ PosixBarrier()
+ :m_numThreads(0)
+ {
+ }
+ virtual ~PosixBarrier()
+ {
+ if (m_numThreads>0)
+ {
+ pthread_mutex_destroy(&m_mutex);
+ pthread_cond_destroy(&m_cond);
+ }
+ }
+
+ virtual void sync()
+ {
+ pthread_mutex_lock(&m_mutex);
+ m_called++;
+ if (m_called == m_numThreads) {
+ m_called = 0;
+ pthread_cond_broadcast(&m_cond);
+ } else {
+ pthread_cond_wait(&m_cond,&m_mutex);
+ }
+ pthread_mutex_unlock(&m_mutex);
+
+ }
+ virtual void setMaxCount(int numThreads)
+ {
+ if (m_numThreads>0)
+ {
+ pthread_mutex_destroy(&m_mutex);
+ pthread_cond_destroy(&m_cond);
+ }
+ m_called = 0;
+ pthread_mutex_init(&m_mutex,NULL);
+ pthread_cond_init(&m_cond,NULL);
+ m_numThreads = numThreads;
+ }
+ virtual int getMaxCount()
+ {
+ return m_numThreads;
+ }
+};
+
+#endif//_POSIX_BARRIERS
+
+
+
+btBarrier* PosixThreadSupport::createBarrier()
+{
+ PosixBarrier* barrier = new PosixBarrier();
+ barrier->setMaxCount(getNumTasks());
+ return barrier;
+}
+
+btCriticalSection* PosixThreadSupport::createCriticalSection()
+{
+ return new PosixCriticalSection();
+}
+
+#endif // USE_PTHREADS
+
diff --git a/tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.h b/tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.h
new file mode 100644
index 00000000..2df3f0e6
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/PosixThreadSupport.h
@@ -0,0 +1,142 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_POSIX_THREAD_SUPPORT_H
+#define BT_POSIX_THREAD_SUPPORT_H
+
+
+#include "LinearMath/btScalar.h"
+#include "PlatformDefinitions.h"
+
+#ifdef USE_PTHREADS //platform specifc defines are defined in PlatformDefinitions.h
+
+#ifndef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 600 //for definition of pthread_barrier_t, see http://pages.cs.wisc.edu/~travitch/pthreads_primer.html
+#endif //_XOPEN_SOURCE
+#include <pthread.h>
+#include <semaphore.h>
+
+
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+#include "btThreadSupportInterface.h"
+
+
+typedef void (*PosixThreadFunc)(void* userPtr,void* lsMemory);
+typedef void* (*PosixlsMemorySetupFunc)();
+
+// PosixThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
+class PosixThreadSupport : public btThreadSupportInterface
+{
+public:
+ typedef enum sStatus {
+ STATUS_BUSY,
+ STATUS_READY,
+ STATUS_FINISHED
+ } Status;
+
+ // placeholder, until libspe2 support is there
+ struct btSpuStatus
+ {
+ uint32_t m_taskId;
+ uint32_t m_commandId;
+ uint32_t m_status;
+
+ PosixThreadFunc m_userThreadFunc;
+ void* m_userPtr; //for taskDesc etc
+ void* m_lsMemory; //initialized using PosixLocalStoreMemorySetupFunc
+
+ pthread_t thread;
+ sem_t* startSemaphore;
+
+ unsigned long threadUsed;
+ };
+private:
+
+ btAlignedObjectArray<btSpuStatus> m_activeSpuStatus;
+public:
+ ///Setup and initialize SPU/CELL/Libspe2
+
+
+
+ struct ThreadConstructionInfo
+ {
+ ThreadConstructionInfo(char* uniqueName,
+ PosixThreadFunc userThreadFunc,
+ PosixlsMemorySetupFunc lsMemoryFunc,
+ int numThreads=1,
+ int threadStackSize=65535
+ )
+ :m_uniqueName(uniqueName),
+ m_userThreadFunc(userThreadFunc),
+ m_lsMemoryFunc(lsMemoryFunc),
+ m_numThreads(numThreads),
+ m_threadStackSize(threadStackSize)
+ {
+
+ }
+
+ char* m_uniqueName;
+ PosixThreadFunc m_userThreadFunc;
+ PosixlsMemorySetupFunc m_lsMemoryFunc;
+ int m_numThreads;
+ int m_threadStackSize;
+
+ };
+
+ PosixThreadSupport(ThreadConstructionInfo& threadConstructionInfo);
+
+///cleanup/shutdown Libspe2
+ virtual ~PosixThreadSupport();
+
+ void startThreads(ThreadConstructionInfo& threadInfo);
+
+
+///send messages to SPUs
+ virtual void sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1);
+
+///check for messages from SPUs
+ virtual void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1);
+
+///start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
+ virtual void startSPU();
+
+///tell the task scheduler we are done with the SPU tasks
+ virtual void stopSPU();
+
+ virtual void setNumTasks(int numTasks) {}
+
+ virtual int getNumTasks() const
+ {
+ return m_activeSpuStatus.size();
+ }
+
+ virtual btBarrier* createBarrier();
+
+ virtual btCriticalSection* createCriticalSection();
+
+ virtual void* getThreadLocalMemory(int taskId)
+ {
+ return m_activeSpuStatus[taskId].m_lsMemory;
+ }
+
+};
+
+#endif // USE_PTHREADS
+
+#endif // BT_POSIX_THREAD_SUPPORT_H
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/PpuAddressSpace.h b/tests/bullet/src/BulletMultiThreaded/PpuAddressSpace.h
new file mode 100644
index 00000000..6f228274
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/PpuAddressSpace.h
@@ -0,0 +1,37 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2010 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_PPU_ADDRESS_SPACE_H
+#define BT_PPU_ADDRESS_SPACE_H
+
+
+#ifdef _WIN32
+//stop those casting warnings until we have a better solution for ppu_address_t / void* / uint64 conversions
+#pragma warning (disable: 4311)
+#pragma warning (disable: 4312)
+#endif //_WIN32
+
+
+#if defined(_WIN64)
+ typedef unsigned __int64 ppu_address_t;
+#elif defined(__LP64__) || defined(__x86_64__)
+ typedef uint64_t ppu_address_t;
+#else
+ typedef uint32_t ppu_address_t;
+#endif //defined(_WIN64)
+
+#endif //BT_PPU_ADDRESS_SPACE_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.cpp b/tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.cpp
new file mode 100644
index 00000000..8cc72418
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.cpp
@@ -0,0 +1,169 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SequentialThreadSupport.h"
+
+
+#include "SpuCollisionTaskProcess.h"
+#include "SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
+
+SequentialThreadSupport::SequentialThreadSupport(SequentialThreadConstructionInfo& threadConstructionInfo)
+{
+ startThreads(threadConstructionInfo);
+}
+
+///cleanup/shutdown Libspe2
+SequentialThreadSupport::~SequentialThreadSupport()
+{
+ stopSPU();
+}
+
+#include <stdio.h>
+
+///send messages to SPUs
+void SequentialThreadSupport::sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t taskId)
+{
+ switch (uiCommand)
+ {
+ case CMD_GATHER_AND_PROCESS_PAIRLIST:
+ {
+ btSpuStatus& spuStatus = m_activeSpuStatus[0];
+ spuStatus.m_userPtr=(void*)uiArgument0;
+ spuStatus.m_userThreadFunc(spuStatus.m_userPtr,spuStatus.m_lsMemory);
+ }
+ break;
+ default:
+ {
+ ///not implemented
+ btAssert(0 && "Not implemented");
+ }
+
+ };
+
+
+}
+
+///check for messages from SPUs
+void SequentialThreadSupport::waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1)
+{
+ btAssert(m_activeSpuStatus.size());
+ btSpuStatus& spuStatus = m_activeSpuStatus[0];
+ *puiArgument0 = spuStatus.m_taskId;
+ *puiArgument1 = spuStatus.m_status;
+}
+
+void SequentialThreadSupport::startThreads(SequentialThreadConstructionInfo& threadConstructionInfo)
+{
+ m_activeSpuStatus.resize(1);
+ printf("STS: Not starting any threads\n");
+ btSpuStatus& spuStatus = m_activeSpuStatus[0];
+ spuStatus.m_userPtr = 0;
+ spuStatus.m_taskId = 0;
+ spuStatus.m_commandId = 0;
+ spuStatus.m_status = 0;
+ spuStatus.m_lsMemory = threadConstructionInfo.m_lsMemoryFunc();
+ spuStatus.m_userThreadFunc = threadConstructionInfo.m_userThreadFunc;
+ printf("STS: Created local store at %p for task %s\n", spuStatus.m_lsMemory, threadConstructionInfo.m_uniqueName);
+}
+
+void SequentialThreadSupport::startSPU()
+{
+}
+
+void SequentialThreadSupport::stopSPU()
+{
+ m_activeSpuStatus.clear();
+}
+
+void SequentialThreadSupport::setNumTasks(int numTasks)
+{
+ printf("SequentialThreadSupport::setNumTasks(%d) is not implemented and has no effect\n",numTasks);
+}
+
+
+
+
+class btDummyBarrier : public btBarrier
+{
+private:
+
+public:
+ btDummyBarrier()
+ {
+ }
+
+ virtual ~btDummyBarrier()
+ {
+ }
+
+ void sync()
+ {
+ }
+
+ virtual void setMaxCount(int n) {}
+ virtual int getMaxCount() {return 1;}
+};
+
+class btDummyCriticalSection : public btCriticalSection
+{
+
+public:
+ btDummyCriticalSection()
+ {
+ }
+
+ virtual ~btDummyCriticalSection()
+ {
+ }
+
+ unsigned int getSharedParam(int i)
+ {
+ btAssert(i>=0&&i<31);
+ return mCommonBuff[i+1];
+ }
+
+ void setSharedParam(int i,unsigned int p)
+ {
+ btAssert(i>=0&&i<31);
+ mCommonBuff[i+1] = p;
+ }
+
+ void lock()
+ {
+ mCommonBuff[0] = 1;
+ }
+
+ void unlock()
+ {
+ mCommonBuff[0] = 0;
+ }
+};
+
+
+
+
+btBarrier* SequentialThreadSupport::createBarrier()
+{
+ return new btDummyBarrier();
+}
+
+btCriticalSection* SequentialThreadSupport::createCriticalSection()
+{
+ return new btDummyCriticalSection();
+
+}
+
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.h b/tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.h
new file mode 100644
index 00000000..c750f7f2
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SequentialThreadSupport.h
@@ -0,0 +1,96 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "LinearMath/btScalar.h"
+#include "PlatformDefinitions.h"
+
+
+#ifndef BT_SEQUENTIAL_THREAD_SUPPORT_H
+#define BT_SEQUENTIAL_THREAD_SUPPORT_H
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+#include "btThreadSupportInterface.h"
+
+typedef void (*SequentialThreadFunc)(void* userPtr,void* lsMemory);
+typedef void* (*SequentiallsMemorySetupFunc)();
+
+
+
+///The SequentialThreadSupport is a portable non-parallel implementation of the btThreadSupportInterface
+///This is useful for debugging and porting SPU Tasks to other platforms.
+class SequentialThreadSupport : public btThreadSupportInterface
+{
+public:
+ struct btSpuStatus
+ {
+ uint32_t m_taskId;
+ uint32_t m_commandId;
+ uint32_t m_status;
+
+ SequentialThreadFunc m_userThreadFunc;
+
+ void* m_userPtr; //for taskDesc etc
+ void* m_lsMemory; //initialized using SequentiallsMemorySetupFunc
+ };
+private:
+ btAlignedObjectArray<btSpuStatus> m_activeSpuStatus;
+ btAlignedObjectArray<void*> m_completeHandles;
+public:
+ struct SequentialThreadConstructionInfo
+ {
+ SequentialThreadConstructionInfo (char* uniqueName,
+ SequentialThreadFunc userThreadFunc,
+ SequentiallsMemorySetupFunc lsMemoryFunc
+ )
+ :m_uniqueName(uniqueName),
+ m_userThreadFunc(userThreadFunc),
+ m_lsMemoryFunc(lsMemoryFunc)
+ {
+
+ }
+
+ char* m_uniqueName;
+ SequentialThreadFunc m_userThreadFunc;
+ SequentiallsMemorySetupFunc m_lsMemoryFunc;
+ };
+
+ SequentialThreadSupport(SequentialThreadConstructionInfo& threadConstructionInfo);
+ virtual ~SequentialThreadSupport();
+ void startThreads(SequentialThreadConstructionInfo& threadInfo);
+///send messages to SPUs
+ virtual void sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1);
+///check for messages from SPUs
+ virtual void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1);
+///start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
+ virtual void startSPU();
+///tell the task scheduler we are done with the SPU tasks
+ virtual void stopSPU();
+
+ virtual void setNumTasks(int numTasks);
+
+ virtual int getNumTasks() const
+ {
+ return 1;
+ }
+ virtual btBarrier* createBarrier();
+
+ virtual btCriticalSection* createCriticalSection();
+
+
+};
+
+#endif //BT_SEQUENTIAL_THREAD_SUPPORT_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.cpp b/tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.cpp
new file mode 100644
index 00000000..182aa269
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.cpp
@@ -0,0 +1,48 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SpuCollisionObjectWrapper.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+
+SpuCollisionObjectWrapper::SpuCollisionObjectWrapper ()
+{
+}
+
+#ifndef __SPU__
+SpuCollisionObjectWrapper::SpuCollisionObjectWrapper (const btCollisionObject* collisionObject)
+{
+ m_shapeType = collisionObject->getCollisionShape()->getShapeType ();
+ m_collisionObjectPtr = (ppu_address_t)collisionObject;
+ m_margin = collisionObject->getCollisionShape()->getMargin ();
+}
+#endif
+
+int
+SpuCollisionObjectWrapper::getShapeType () const
+{
+ return m_shapeType;
+}
+
+float
+SpuCollisionObjectWrapper::getCollisionMargin () const
+{
+ return m_margin;
+}
+
+ppu_address_t
+SpuCollisionObjectWrapper::getCollisionObjectPtr () const
+{
+ return m_collisionObjectPtr;
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.h b/tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.h
new file mode 100644
index 00000000..f90da277
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuCollisionObjectWrapper.h
@@ -0,0 +1,40 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPU_COLLISION_OBJECT_WRAPPER_H
+#define BT_SPU_COLLISION_OBJECT_WRAPPER_H
+
+#include "PlatformDefinitions.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+ATTRIBUTE_ALIGNED16(class) SpuCollisionObjectWrapper
+{
+protected:
+ int m_shapeType;
+ float m_margin;
+ ppu_address_t m_collisionObjectPtr;
+
+public:
+ SpuCollisionObjectWrapper ();
+
+ SpuCollisionObjectWrapper (const btCollisionObject* collisionObject);
+
+ int getShapeType () const;
+ float getCollisionMargin () const;
+ ppu_address_t getCollisionObjectPtr () const;
+};
+
+
+#endif //BT_SPU_COLLISION_OBJECT_WRAPPER_H
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.cpp b/tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.cpp
new file mode 100644
index 00000000..f606d136
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.cpp
@@ -0,0 +1,317 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+//#define DEBUG_SPU_TASK_SCHEDULING 1
+
+
+//class OptimizedBvhNode;
+
+#include "SpuCollisionTaskProcess.h"
+
+
+
+
+void SpuCollisionTaskProcess::setNumTasks(int maxNumTasks)
+{
+ if (int(m_maxNumOutstandingTasks) != maxNumTasks)
+ {
+ m_maxNumOutstandingTasks = maxNumTasks;
+ m_taskBusy.resize(m_maxNumOutstandingTasks);
+ m_spuGatherTaskDesc.resize(m_maxNumOutstandingTasks);
+
+ for (int i = 0; i < m_taskBusy.size(); i++)
+ {
+ m_taskBusy[i] = false;
+ }
+
+ ///re-allocate task memory buffers
+ if (m_workUnitTaskBuffers != 0)
+ {
+ btAlignedFree(m_workUnitTaskBuffers);
+ }
+
+ m_workUnitTaskBuffers = (unsigned char *)btAlignedAlloc(MIDPHASE_WORKUNIT_TASK_SIZE*m_maxNumOutstandingTasks, 128);
+ }
+
+}
+
+
+
+SpuCollisionTaskProcess::SpuCollisionTaskProcess(class btThreadSupportInterface* threadInterface, unsigned int maxNumOutstandingTasks)
+:m_threadInterface(threadInterface),
+m_maxNumOutstandingTasks(0)
+{
+ m_workUnitTaskBuffers = (unsigned char *)0;
+ setNumTasks(maxNumOutstandingTasks);
+ m_numBusyTasks = 0;
+ m_currentTask = 0;
+ m_currentPage = 0;
+ m_currentPageEntry = 0;
+
+#ifdef DEBUG_SpuCollisionTaskProcess
+ m_initialized = false;
+#endif
+
+ m_threadInterface->startSPU();
+
+ //printf("sizeof vec_float4: %d\n", sizeof(vec_float4));
+ printf("sizeof SpuGatherAndProcessWorkUnitInput: %d\n", int(sizeof(SpuGatherAndProcessWorkUnitInput)));
+
+}
+
+SpuCollisionTaskProcess::~SpuCollisionTaskProcess()
+{
+
+ if (m_workUnitTaskBuffers != 0)
+ {
+ btAlignedFree(m_workUnitTaskBuffers);
+ m_workUnitTaskBuffers = 0;
+ }
+
+
+
+ m_threadInterface->stopSPU();
+
+}
+
+
+
+void SpuCollisionTaskProcess::initialize2(bool useEpa)
+{
+
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("SpuCollisionTaskProcess::initialize()\n");
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+ for (int i = 0; i < int (m_maxNumOutstandingTasks); i++)
+ {
+ m_taskBusy[i] = false;
+ }
+ m_numBusyTasks = 0;
+ m_currentTask = 0;
+ m_currentPage = 0;
+ m_currentPageEntry = 0;
+ m_useEpa = useEpa;
+
+#ifdef DEBUG_SpuCollisionTaskProcess
+ m_initialized = true;
+ btAssert(MIDPHASE_NUM_WORKUNITS_PER_TASK*sizeof(SpuGatherAndProcessWorkUnitInput) <= MIDPHASE_WORKUNIT_TASK_SIZE);
+#endif
+}
+
+
+void SpuCollisionTaskProcess::issueTask2()
+{
+
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("SpuCollisionTaskProcess::issueTask (m_currentTask= %d\n)", m_currentTask);
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+ m_taskBusy[m_currentTask] = true;
+ m_numBusyTasks++;
+
+
+ SpuGatherAndProcessPairsTaskDesc& taskDesc = m_spuGatherTaskDesc[m_currentTask];
+ taskDesc.m_useEpa = m_useEpa;
+
+ {
+ // send task description in event message
+ // no error checking here...
+ // but, currently, event queue can be no larger than NUM_WORKUNIT_TASKS.
+
+ taskDesc.m_inPairPtr = reinterpret_cast<uint64_t>(MIDPHASE_TASK_PTR(m_currentTask));
+
+ taskDesc.taskId = m_currentTask;
+ taskDesc.numPages = m_currentPage+1;
+ taskDesc.numOnLastPage = m_currentPageEntry;
+ }
+
+
+
+ m_threadInterface->sendRequest(CMD_GATHER_AND_PROCESS_PAIRLIST, (ppu_address_t) &taskDesc,m_currentTask);
+
+ // if all tasks busy, wait for spu event to clear the task.
+
+
+ if (m_numBusyTasks >= m_maxNumOutstandingTasks)
+ {
+ unsigned int taskId;
+ unsigned int outputSize;
+
+
+ for (int i=0;i<int (m_maxNumOutstandingTasks);i++)
+ {
+ if (m_taskBusy[i])
+ {
+ taskId = i;
+ break;
+ }
+ }
+
+ btAssert(taskId>=0);
+
+
+ m_threadInterface->waitForResponse(&taskId, &outputSize);
+
+// printf("issueTask taskId %d completed, numBusy=%d\n",taskId,m_numBusyTasks);
+
+ //printf("PPU: after issue, received event: %u %d\n", taskId, outputSize);
+
+ //postProcess(taskId, outputSize);
+
+ m_taskBusy[taskId] = false;
+
+ m_numBusyTasks--;
+ }
+
+}
+
+void SpuCollisionTaskProcess::addWorkToTask(void* pairArrayPtr,int startIndex,int endIndex)
+{
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("#");
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+#ifdef DEBUG_SpuCollisionTaskProcess
+ btAssert(m_initialized);
+ btAssert(m_workUnitTaskBuffers);
+
+#endif
+
+ bool batch = true;
+
+ if (batch)
+ {
+ if (m_currentPageEntry == MIDPHASE_NUM_WORKUNITS_PER_PAGE)
+ {
+ if (m_currentPage == MIDPHASE_NUM_WORKUNIT_PAGES-1)
+ {
+ // task buffer is full, issue current task.
+ // if all task buffers busy, this waits until SPU is done.
+ issueTask2();
+
+ // find new task buffer
+ for (unsigned int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ if (!m_taskBusy[i])
+ {
+ m_currentTask = i;
+ //init the task data
+
+ break;
+ }
+ }
+
+ m_currentPage = 0;
+ }
+ else
+ {
+ m_currentPage++;
+ }
+
+ m_currentPageEntry = 0;
+ }
+ }
+
+ {
+
+
+
+ SpuGatherAndProcessWorkUnitInput &wuInput =
+ *(reinterpret_cast<SpuGatherAndProcessWorkUnitInput*>
+ (MIDPHASE_ENTRY_PTR(m_currentTask, m_currentPage, m_currentPageEntry)));
+
+ wuInput.m_pairArrayPtr = reinterpret_cast<uint64_t>(pairArrayPtr);
+ wuInput.m_startIndex = startIndex;
+ wuInput.m_endIndex = endIndex;
+
+
+
+ m_currentPageEntry++;
+
+ if (!batch)
+ {
+ issueTask2();
+
+ // find new task buffer
+ for (unsigned int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ if (!m_taskBusy[i])
+ {
+ m_currentTask = i;
+ //init the task data
+
+ break;
+ }
+ }
+
+ m_currentPage = 0;
+ m_currentPageEntry =0;
+ }
+ }
+}
+
+
+void
+SpuCollisionTaskProcess::flush2()
+{
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("\nSpuCollisionTaskProcess::flush()\n");
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+ // if there's a partially filled task buffer, submit that task
+ if (m_currentPage > 0 || m_currentPageEntry > 0)
+ {
+ issueTask2();
+ }
+
+
+ // all tasks are issued, wait for all tasks to be complete
+ while(m_numBusyTasks > 0)
+ {
+ // Consolidating SPU code
+ unsigned int taskId=-1;
+ unsigned int outputSize;
+
+ for (int i=0;i<int (m_maxNumOutstandingTasks);i++)
+ {
+ if (m_taskBusy[i])
+ {
+ taskId = i;
+ break;
+ }
+ }
+
+ btAssert(taskId>=0);
+
+
+ {
+
+ // SPURS support.
+ m_threadInterface->waitForResponse(&taskId, &outputSize);
+ }
+// printf("flush2 taskId %d completed, numBusy =%d \n",taskId,m_numBusyTasks);
+ //printf("PPU: flushing, received event: %u %d\n", taskId, outputSize);
+
+ //postProcess(taskId, outputSize);
+
+ m_taskBusy[taskId] = false;
+
+ m_numBusyTasks--;
+ }
+
+
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.h b/tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.h
new file mode 100644
index 00000000..23b5b05a
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuCollisionTaskProcess.h
@@ -0,0 +1,163 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPU_COLLISION_TASK_PROCESS_H
+#define BT_SPU_COLLISION_TASK_PROCESS_H
+
+#include <assert.h>
+
+#include "LinearMath/btScalar.h"
+
+#include "PlatformDefinitions.h"
+#include "LinearMath/btAlignedObjectArray.h"
+#include "SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h" // for definitions processCollisionTask and createCollisionLocalStoreMemory
+
+#include "btThreadSupportInterface.h"
+
+
+//#include "SPUAssert.h"
+#include <string.h>
+
+
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+
+#include "LinearMath/btAlignedAllocator.h"
+
+#include <stdio.h>
+
+
+#define DEBUG_SpuCollisionTaskProcess 1
+
+
+#define CMD_GATHER_AND_PROCESS_PAIRLIST 1
+
+class btCollisionObject;
+class btPersistentManifold;
+class btDispatcher;
+
+
+/////Task Description for SPU collision detection
+//struct SpuGatherAndProcessPairsTaskDesc
+//{
+// uint64_t inPtr;//m_pairArrayPtr;
+// //mutex variable
+// uint32_t m_someMutexVariableInMainMemory;
+//
+// uint64_t m_dispatcher;
+//
+// uint32_t numOnLastPage;
+//
+// uint16_t numPages;
+// uint16_t taskId;
+//
+// struct CollisionTask_LocalStoreMemory* m_lsMemory;
+//}
+//
+//#if defined(__CELLOS_LV2__) || defined(USE_LIBSPE2)
+//__attribute__ ((aligned (16)))
+//#endif
+//;
+
+
+///MidphaseWorkUnitInput stores individual primitive versus mesh collision detection input, to be processed by the SPU.
+ATTRIBUTE_ALIGNED16(struct) SpuGatherAndProcessWorkUnitInput
+{
+ uint64_t m_pairArrayPtr;
+ int m_startIndex;
+ int m_endIndex;
+};
+
+
+
+
+/// SpuCollisionTaskProcess handles SPU processing of collision pairs.
+/// Maintains a set of task buffers.
+/// When the task is full, the task is issued for SPUs to process. Contact output goes into btPersistentManifold
+/// associated with each task.
+/// When PPU issues a task, it will look for completed task buffers
+/// PPU will do postprocessing, dependent on workunit output (not likely)
+class SpuCollisionTaskProcess
+{
+
+ unsigned char *m_workUnitTaskBuffers;
+
+
+ // track task buffers that are being used, and total busy tasks
+ btAlignedObjectArray<bool> m_taskBusy;
+ btAlignedObjectArray<SpuGatherAndProcessPairsTaskDesc> m_spuGatherTaskDesc;
+
+ class btThreadSupportInterface* m_threadInterface;
+
+ unsigned int m_maxNumOutstandingTasks;
+
+ unsigned int m_numBusyTasks;
+
+ // the current task and the current entry to insert a new work unit
+ unsigned int m_currentTask;
+ unsigned int m_currentPage;
+ unsigned int m_currentPageEntry;
+
+ bool m_useEpa;
+
+#ifdef DEBUG_SpuCollisionTaskProcess
+ bool m_initialized;
+#endif
+ void issueTask2();
+ //void postProcess(unsigned int taskId, int outputSize);
+
+public:
+ SpuCollisionTaskProcess(btThreadSupportInterface* threadInterface, unsigned int maxNumOutstandingTasks);
+
+ ~SpuCollisionTaskProcess();
+
+ ///call initialize in the beginning of the frame, before addCollisionPairToTask
+ void initialize2(bool useEpa = false);
+
+ ///batch up additional work to a current task for SPU processing. When batch is full, it issues the task.
+ void addWorkToTask(void* pairArrayPtr,int startIndex,int endIndex);
+
+ ///call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished
+ void flush2();
+
+ /// set the maximum number of SPU tasks allocated
+ void setNumTasks(int maxNumTasks);
+
+ int getNumTasks() const
+ {
+ return m_maxNumOutstandingTasks;
+ }
+};
+
+
+
+#define MIDPHASE_TASK_PTR(task) (&m_workUnitTaskBuffers[0] + MIDPHASE_WORKUNIT_TASK_SIZE*task)
+#define MIDPHASE_ENTRY_PTR(task,page,entry) (MIDPHASE_TASK_PTR(task) + MIDPHASE_WORKUNIT_PAGE_SIZE*page + sizeof(SpuGatherAndProcessWorkUnitInput)*entry)
+#define MIDPHASE_OUTPUT_PTR(task) (&m_contactOutputBuffers[0] + MIDPHASE_MAX_CONTACT_BUFFER_SIZE*task)
+#define MIDPHASE_TREENODES_PTR(task) (&m_complexShapeBuffers[0] + MIDPHASE_COMPLEX_SHAPE_BUFFER_SIZE*task)
+
+
+#define MIDPHASE_WORKUNIT_PAGE_SIZE (16)
+//#define MIDPHASE_WORKUNIT_PAGE_SIZE (128)
+
+#define MIDPHASE_NUM_WORKUNIT_PAGES 1
+#define MIDPHASE_WORKUNIT_TASK_SIZE (MIDPHASE_WORKUNIT_PAGE_SIZE*MIDPHASE_NUM_WORKUNIT_PAGES)
+#define MIDPHASE_NUM_WORKUNITS_PER_PAGE (MIDPHASE_WORKUNIT_PAGE_SIZE / sizeof(SpuGatherAndProcessWorkUnitInput))
+#define MIDPHASE_NUM_WORKUNITS_PER_TASK (MIDPHASE_NUM_WORKUNITS_PER_PAGE*MIDPHASE_NUM_WORKUNIT_PAGES)
+
+
+#endif // BT_SPU_COLLISION_TASK_PROCESS_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp b/tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp
new file mode 100644
index 00000000..286b6319
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp
@@ -0,0 +1,69 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SpuContactManifoldCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h"
+
+
+
+
+void SpuContactManifoldCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ btAssert(0);
+}
+
+btScalar SpuContactManifoldCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ btAssert(0);
+ return 1.f;
+}
+
+#ifndef __SPU__
+SpuContactManifoldCollisionAlgorithm::SpuContactManifoldCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1)
+:btCollisionAlgorithm(ci)
+#ifdef USE_SEPDISTANCE_UTIL
+,m_sepDistance(body0->getCollisionShape()->getAngularMotionDisc(),body1->getCollisionShape()->getAngularMotionDisc())
+#endif //USE_SEPDISTANCE_UTIL
+{
+ m_manifoldPtr = m_dispatcher->getNewManifold(body0,body1);
+ m_shapeType0 = body0->getCollisionShape()->getShapeType();
+ m_shapeType1 = body1->getCollisionShape()->getShapeType();
+ m_collisionMargin0 = body0->getCollisionShape()->getMargin();
+ m_collisionMargin1 = body1->getCollisionShape()->getMargin();
+ m_collisionObject0 = body0;
+ m_collisionObject1 = body1;
+
+ if (body0->getCollisionShape()->isPolyhedral())
+ {
+ btPolyhedralConvexShape* convex0 = (btPolyhedralConvexShape*)body0->getCollisionShape();
+ m_shapeDimensions0 = convex0->getImplicitShapeDimensions();
+ }
+ if (body1->getCollisionShape()->isPolyhedral())
+ {
+ btPolyhedralConvexShape* convex1 = (btPolyhedralConvexShape*)body1->getCollisionShape();
+ m_shapeDimensions1 = convex1->getImplicitShapeDimensions();
+ }
+}
+#endif //__SPU__
+
+
+SpuContactManifoldCollisionAlgorithm::~SpuContactManifoldCollisionAlgorithm()
+{
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h b/tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h
new file mode 100644
index 00000000..d28d4db3
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h
@@ -0,0 +1,120 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPU_CONTACTMANIFOLD_COLLISION_ALGORITHM_H
+#define BT_SPU_CONTACTMANIFOLD_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "LinearMath/btTransformUtil.h"
+
+class btPersistentManifold;
+
+//#define USE_SEPDISTANCE_UTIL 1
+
+/// SpuContactManifoldCollisionAlgorithm provides contact manifold and should be processed on SPU.
+ATTRIBUTE_ALIGNED16(class) SpuContactManifoldCollisionAlgorithm : public btCollisionAlgorithm
+{
+ btVector3 m_shapeDimensions0;
+ btVector3 m_shapeDimensions1;
+ btPersistentManifold* m_manifoldPtr;
+ int m_shapeType0;
+ int m_shapeType1;
+ float m_collisionMargin0;
+ float m_collisionMargin1;
+
+ btCollisionObject* m_collisionObject0;
+ btCollisionObject* m_collisionObject1;
+
+
+
+
+public:
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+
+ SpuContactManifoldCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1);
+#ifdef USE_SEPDISTANCE_UTIL
+ btConvexSeparatingDistanceUtil m_sepDistance;
+#endif //USE_SEPDISTANCE_UTIL
+
+ virtual ~SpuContactManifoldCollisionAlgorithm();
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr)
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+
+ btPersistentManifold* getContactManifoldPtr()
+ {
+ return m_manifoldPtr;
+ }
+
+ btCollisionObject* getCollisionObject0()
+ {
+ return m_collisionObject0;
+ }
+
+ btCollisionObject* getCollisionObject1()
+ {
+ return m_collisionObject1;
+ }
+
+ int getShapeType0() const
+ {
+ return m_shapeType0;
+ }
+
+ int getShapeType1() const
+ {
+ return m_shapeType1;
+ }
+ float getCollisionMargin0() const
+ {
+ return m_collisionMargin0;
+ }
+ float getCollisionMargin1() const
+ {
+ return m_collisionMargin1;
+ }
+
+ const btVector3& getShapeDimensions0() const
+ {
+ return m_shapeDimensions0;
+ }
+
+ const btVector3& getShapeDimensions1() const
+ {
+ return m_shapeDimensions1;
+ }
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(SpuContactManifoldCollisionAlgorithm));
+ return new(mem) SpuContactManifoldCollisionAlgorithm(ci,body0,body1);
+ }
+ };
+
+};
+
+#endif //BT_SPU_CONTACTMANIFOLD_COLLISION_ALGORITHM_H
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuDoubleBuffer.h b/tests/bullet/src/BulletMultiThreaded/SpuDoubleBuffer.h
new file mode 100644
index 00000000..558d6152
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuDoubleBuffer.h
@@ -0,0 +1,126 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_DOUBLE_BUFFER_H
+#define BT_DOUBLE_BUFFER_H
+
+#include "SpuFakeDma.h"
+#include "LinearMath/btScalar.h"
+
+
+///DoubleBuffer
+template<class T, int size>
+class DoubleBuffer
+{
+#if defined(__SPU__) || defined(USE_LIBSPE2)
+ ATTRIBUTE_ALIGNED128( T m_buffer0[size] ) ;
+ ATTRIBUTE_ALIGNED128( T m_buffer1[size] ) ;
+#else
+ T m_buffer0[size];
+ T m_buffer1[size];
+#endif
+
+ T *m_frontBuffer;
+ T *m_backBuffer;
+
+ unsigned int m_dmaTag;
+ bool m_dmaPending;
+public:
+ bool isPending() const { return m_dmaPending;}
+ DoubleBuffer();
+
+ void init ();
+
+ // dma get and put commands
+ void backBufferDmaGet(uint64_t ea, unsigned int numBytes, unsigned int tag);
+ void backBufferDmaPut(uint64_t ea, unsigned int numBytes, unsigned int tag);
+
+ // gets pointer to a buffer
+ T *getFront();
+ T *getBack();
+
+ // if back buffer dma was started, wait for it to complete
+ // then move back to front and vice versa
+ T *swapBuffers();
+};
+
+template<class T, int size>
+DoubleBuffer<T,size>::DoubleBuffer()
+{
+ init ();
+}
+
+template<class T, int size>
+void DoubleBuffer<T,size>::init()
+{
+ this->m_dmaPending = false;
+ this->m_frontBuffer = &this->m_buffer0[0];
+ this->m_backBuffer = &this->m_buffer1[0];
+}
+
+template<class T, int size>
+void
+DoubleBuffer<T,size>::backBufferDmaGet(uint64_t ea, unsigned int numBytes, unsigned int tag)
+{
+ m_dmaPending = true;
+ m_dmaTag = tag;
+ if (numBytes)
+ {
+ m_backBuffer = (T*)cellDmaLargeGetReadOnly(m_backBuffer, ea, numBytes, tag, 0, 0);
+ }
+}
+
+template<class T, int size>
+void
+DoubleBuffer<T,size>::backBufferDmaPut(uint64_t ea, unsigned int numBytes, unsigned int tag)
+{
+ m_dmaPending = true;
+ m_dmaTag = tag;
+ cellDmaLargePut(m_backBuffer, ea, numBytes, tag, 0, 0);
+}
+
+template<class T, int size>
+T *
+DoubleBuffer<T,size>::getFront()
+{
+ return m_frontBuffer;
+}
+
+template<class T, int size>
+T *
+DoubleBuffer<T,size>::getBack()
+{
+ return m_backBuffer;
+}
+
+template<class T, int size>
+T *
+DoubleBuffer<T,size>::swapBuffers()
+{
+ if (m_dmaPending)
+ {
+ cellDmaWaitTagStatusAll(1<<m_dmaTag);
+ m_dmaPending = false;
+ }
+
+ T *tmp = m_backBuffer;
+ m_backBuffer = m_frontBuffer;
+ m_frontBuffer = tmp;
+
+ return m_frontBuffer;
+}
+
+#endif
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuFakeDma.cpp b/tests/bullet/src/BulletMultiThreaded/SpuFakeDma.cpp
new file mode 100644
index 00000000..b776a120
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuFakeDma.cpp
@@ -0,0 +1,215 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SpuFakeDma.h"
+#include <LinearMath/btScalar.h> //for btAssert
+//Disabling memcpy sometimes helps debugging DMA
+
+#define USE_MEMCPY 1
+#ifdef USE_MEMCPY
+
+#endif
+
+
+void* cellDmaLargeGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
+{
+
+#if defined (__SPU__) || defined (USE_LIBSPE2)
+ cellDmaLargeGet(ls,ea,size,tag,tid,rid);
+ return ls;
+#else
+ return (void*)(ppu_address_t)ea;
+#endif
+}
+
+void* cellDmaSmallGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
+{
+#if defined (__SPU__) || defined (USE_LIBSPE2)
+ mfc_get(ls,ea,size,tag,0,0);
+ return ls;
+#else
+ return (void*)(ppu_address_t)ea;
+#endif
+}
+
+
+
+
+void* cellDmaGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
+{
+#if defined (__SPU__) || defined (USE_LIBSPE2)
+ cellDmaGet(ls,ea,size,tag,tid,rid);
+ return ls;
+#else
+ return (void*)(ppu_address_t)ea;
+#endif
+}
+
+
+///this unalignedDma should not be frequently used, only for small data. It handles alignment and performs check on size (<16 bytes)
+int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size)
+{
+
+ btAssert(size<32);
+
+ ATTRIBUTE_ALIGNED16(char tmpBuffer[32]);
+
+
+ char* localStore = (char*)ls;
+ uint32_t i;
+
+
+ ///make sure last 4 bits are the same, for cellDmaSmallGet
+ uint32_t last4BitsOffset = ea & 0x0f;
+ char* tmpTarget = tmpBuffer + last4BitsOffset;
+
+#if defined (__SPU__) || defined (USE_LIBSPE2)
+
+ int remainingSize = size;
+
+//#define FORCE_cellDmaUnalignedGet 1
+#ifdef FORCE_cellDmaUnalignedGet
+ cellDmaUnalignedGet(tmpTarget,ea,size,DMA_TAG(1),0,0);
+#else
+ char* remainingTmpTarget = tmpTarget;
+ uint64_t remainingEa = ea;
+
+ while (remainingSize)
+ {
+ switch (remainingSize)
+ {
+ case 1:
+ case 2:
+ case 4:
+ case 8:
+ case 16:
+ {
+ mfc_get(remainingTmpTarget,remainingEa,remainingSize,DMA_TAG(1),0,0);
+ remainingSize=0;
+ break;
+ }
+ default:
+ {
+ //spu_printf("unaligned DMA with non-natural size:%d\n",remainingSize);
+ int actualSize = 0;
+
+ if (remainingSize > 16)
+ actualSize = 16;
+ else
+ if (remainingSize >8)
+ actualSize=8;
+ else
+ if (remainingSize >4)
+ actualSize=4;
+ else
+ if (remainingSize >2)
+ actualSize=2;
+ mfc_get(remainingTmpTarget,remainingEa,actualSize,DMA_TAG(1),0,0);
+ remainingSize-=actualSize;
+ remainingTmpTarget+=actualSize;
+ remainingEa += actualSize;
+ }
+ }
+ }
+#endif//FORCE_cellDmaUnalignedGet
+
+#else
+ char* mainMem = (char*)ea;
+ //copy into final destination
+#ifdef USE_MEMCPY
+
+ memcpy(tmpTarget,mainMem,size);
+#else
+ for ( i=0;i<size;i++)
+ {
+ tmpTarget[i] = mainMem[i];
+ }
+#endif //USE_MEMCPY
+
+#endif
+
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ //this is slowish, perhaps memcpy on SPU is smarter?
+ for (i=0; btLikely( i<size );i++)
+ {
+ localStore[i] = tmpTarget[i];
+ }
+
+ return 0;
+}
+
+#if defined (__SPU__) || defined (USE_LIBSPE2)
+#else
+
+int cellDmaLargeGet(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
+{
+ char* mainMem = (char*)ea;
+ char* localStore = (char*)ls;
+
+#ifdef USE_MEMCPY
+ memcpy(localStore,mainMem,size);
+#else
+ for (uint32_t i=0;i<size;i++)
+ {
+ localStore[i] = mainMem[i];
+ }
+#endif
+ return 0;
+}
+
+int cellDmaGet(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
+{
+ char* mainMem = (char*)ea;
+ char* localStore = (char*)ls;
+
+// printf("mainMem=%x, localStore=%x",mainMem,localStore);
+
+#ifdef USE_MEMCPY
+ memcpy(localStore,mainMem,size);
+#else
+ for (uint32_t i=0;i<size;i++)
+ {
+ localStore[i] = mainMem[i];
+ }
+#endif //#ifdef USE_MEMCPY
+// printf(" finished\n");
+ return 0;
+}
+
+int cellDmaLargePut(const void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid)
+{
+ char* mainMem = (char*)ea;
+ const char* localStore = (const char*)ls;
+#ifdef USE_MEMCPY
+ memcpy(mainMem,localStore,size);
+#else
+ for (uint32_t i=0;i<size;i++)
+ {
+ mainMem[i] = localStore[i];
+ }
+#endif //#ifdef USE_MEMCPY
+
+ return 0;
+}
+
+
+
+void cellDmaWaitTagStatusAll(int ignore)
+{
+
+}
+
+#endif
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuFakeDma.h b/tests/bullet/src/BulletMultiThreaded/SpuFakeDma.h
new file mode 100644
index 00000000..40e20393
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuFakeDma.h
@@ -0,0 +1,135 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_FAKE_DMA_H
+#define BT_FAKE_DMA_H
+
+
+#include "PlatformDefinitions.h"
+#include "LinearMath/btScalar.h"
+
+
+#ifdef __SPU__
+
+#ifndef USE_LIBSPE2
+
+#include <cell/dma.h>
+#include <stdint.h>
+
+#define DMA_TAG(xfer) (xfer + 1)
+#define DMA_MASK(xfer) (1 << DMA_TAG(xfer))
+
+#else // !USE_LIBSPE2
+
+#define DMA_TAG(xfer) (xfer + 1)
+#define DMA_MASK(xfer) (1 << DMA_TAG(xfer))
+
+#include <spu_mfcio.h>
+
+#define DEBUG_DMA
+#ifdef DEBUG_DMA
+#define dUASSERT(a,b) if (!(a)) { printf(b);}
+#define uintsize ppu_address_t
+
+#define cellDmaLargeGet(ls, ea, size, tag, tid, rid) if ( (((uintsize)ls%16) != ((uintsize)ea%16)) || ((((uintsize)ea%16) || ((uintsize)ls%16)) && (( ((uintsize)ls%16) != ((uintsize)size%16) ) || ( ((uintsize)ea%16) != ((uintsize)size%16) ) ) ) || ( ((uintsize)size%16) && ((uintsize)size!=1) && ((uintsize)size!=2) && ((uintsize)size!=4) && ((uintsize)size!=8) ) || (size >= 16384) || !(uintsize)ls || !(uintsize)ea) { \
+ dUASSERT( (((uintsize)ea % 16) == 0) || (size < 16), "XDR Address not aligned: "); \
+ dUASSERT( (((uintsize)ls % 16) == 0) || (size < 16), "LS Address not aligned: "); \
+ dUASSERT( ((((uintsize)ls % size) == 0) && (((uintsize)ea % size) == 0)) || (size > 16), "Not naturally aligned: "); \
+ dUASSERT((size == 1) || (size == 2) || (size == 4) || (size == 8) || ((size % 16) == 0), "size not a multiple of 16byte: "); \
+ dUASSERT(size < 16384, "size too big: "); \
+ dUASSERT( ((uintsize)ea%16)==((uintsize)ls%16), "wrong Quadword alignment of LS and EA: "); \
+ dUASSERT(ea != 0, "Nullpointer EA: "); dUASSERT(ls != 0, "Nullpointer LS: ");\
+ printf("GET %s:%d from: 0x%x, to: 0x%x - %d bytes\n", __FILE__, __LINE__, (unsigned int)ea,(unsigned int)ls,(unsigned int)size);\
+ } \
+ mfc_get(ls, ea, size, tag, tid, rid)
+#define cellDmaGet(ls, ea, size, tag, tid, rid) if ( (((uintsize)ls%16) != ((uintsize)ea%16)) || ((((uintsize)ea%16) || ((uintsize)ls%16)) && (( ((uintsize)ls%16) != ((uintsize)size%16) ) || ( ((uintsize)ea%16) != ((uintsize)size%16) ) ) ) || ( ((uintsize)size%16) && ((uintsize)size!=1) && ((uintsize)size!=2) && ((uintsize)size!=4) && ((uintsize)size!=8) ) || (size >= 16384) || !(uintsize)ls || !(uintsize)ea) { \
+ dUASSERT( (((uintsize)ea % 16) == 0) || (size < 16), "XDR Address not aligned: "); \
+ dUASSERT( (((uintsize)ls % 16) == 0) || (size < 16), "LS Address not aligned: "); \
+ dUASSERT( ((((uintsize)ls % size) == 0) && (((uintsize)ea % size) == 0)) || (size > 16), "Not naturally aligned: "); \
+ dUASSERT((size == 1) || (size == 2) || (size == 4) || (size == 8) || ((size % 16) == 0), "size not a multiple of 16byte: "); \
+ dUASSERT(size < 16384, "size too big: "); \
+ dUASSERT( ((uintsize)ea%16)==((uintsize)ls%16), "wrong Quadword alignment of LS and EA: "); \
+ dUASSERT(ea != 0, "Nullpointer EA: "); dUASSERT(ls != 0, "Nullpointer LS: ");\
+ printf("GET %s:%d from: 0x%x, to: 0x%x - %d bytes\n", __FILE__, __LINE__, (unsigned int)ea,(unsigned int)ls,(unsigned int)size);\
+ } \
+ mfc_get(ls, ea, size, tag, tid, rid)
+#define cellDmaLargePut(ls, ea, size, tag, tid, rid) if ( (((uintsize)ls%16) != ((uintsize)ea%16)) || ((((uintsize)ea%16) || ((uintsize)ls%16)) && (( ((uintsize)ls%16) != ((uintsize)size%16) ) || ( ((uintsize)ea%16) != ((uintsize)size%16) ) ) ) || ( ((uintsize)size%16) && ((uintsize)size!=1) && ((uintsize)size!=2) && ((uintsize)size!=4) && ((uintsize)size!=8) ) || (size >= 16384) || !(uintsize)ls || !(uintsize)ea) { \
+ dUASSERT( (((uintsize)ea % 16) == 0) || (size < 16), "XDR Address not aligned: "); \
+ dUASSERT( (((uintsize)ls % 16) == 0) || (size < 16), "LS Address not aligned: "); \
+ dUASSERT( ((((uintsize)ls % size) == 0) && (((uintsize)ea % size) == 0)) || (size > 16), "Not naturally aligned: "); \
+ dUASSERT((size == 1) || (size == 2) || (size == 4) || (size == 8) || ((size % 16) == 0), "size not a multiple of 16byte: "); \
+ dUASSERT(size < 16384, "size too big: "); \
+ dUASSERT( ((uintsize)ea%16)==((uintsize)ls%16), "wrong Quadword alignment of LS and EA: "); \
+ dUASSERT(ea != 0, "Nullpointer EA: "); dUASSERT(ls != 0, "Nullpointer LS: ");\
+ printf("PUT %s:%d from: 0x%x, to: 0x%x - %d bytes\n", __FILE__, __LINE__, (unsigned int)ls,(unsigned int)ea,(unsigned int)size); \
+ } \
+ mfc_put(ls, ea, size, tag, tid, rid)
+#define cellDmaSmallGet(ls, ea, size, tag, tid, rid) if ( (((uintsize)ls%16) != ((uintsize)ea%16)) || ((((uintsize)ea%16) || ((uintsize)ls%16)) && (( ((uintsize)ls%16) != ((uintsize)size%16) ) || ( ((uintsize)ea%16) != ((uintsize)size%16) ) ) ) || ( ((uintsize)size%16) && ((uintsize)size!=1) && ((uintsize)size!=2) && ((uintsize)size!=4) && ((uintsize)size!=8) ) || (size >= 16384) || !(uintsize)ls || !(uintsize)ea) { \
+ dUASSERT( (((uintsize)ea % 16) == 0) || (size < 16), "XDR Address not aligned: "); \
+ dUASSERT( (((uintsize)ls % 16) == 0) || (size < 16), "LS Address not aligned: "); \
+ dUASSERT( ((((uintsize)ls % size) == 0) && (((uintsize)ea % size) == 0)) || (size > 16), "Not naturally aligned: "); \
+ dUASSERT((size == 1) || (size == 2) || (size == 4) || (size == 8) || ((size % 16) == 0), "size not a multiple of 16byte: "); \
+ dUASSERT(size < 16384, "size too big: "); \
+ dUASSERT( ((uintsize)ea%16)==((uintsize)ls%16), "wrong Quadword alignment of LS and EA: "); \
+ dUASSERT(ea != 0, "Nullpointer EA: "); dUASSERT(ls != 0, "Nullpointer LS: ");\
+ printf("GET %s:%d from: 0x%x, to: 0x%x - %d bytes\n", __FILE__, __LINE__, (unsigned int)ea,(unsigned int)ls,(unsigned int)size);\
+ } \
+ mfc_get(ls, ea, size, tag, tid, rid)
+#define cellDmaWaitTagStatusAll(ignore) mfc_write_tag_mask(ignore) ; mfc_read_tag_status_all()
+
+#else
+#define cellDmaLargeGet(ls, ea, size, tag, tid, rid) mfc_get(ls, ea, size, tag, tid, rid)
+#define cellDmaGet(ls, ea, size, tag, tid, rid) mfc_get(ls, ea, size, tag, tid, rid)
+#define cellDmaLargePut(ls, ea, size, tag, tid, rid) mfc_put(ls, ea, size, tag, tid, rid)
+#define cellDmaSmallGet(ls, ea, size, tag, tid, rid) mfc_get(ls, ea, size, tag, tid, rid)
+#define cellDmaWaitTagStatusAll(ignore) mfc_write_tag_mask(ignore) ; mfc_read_tag_status_all()
+#endif // DEBUG_DMA
+
+
+
+
+
+
+
+
+#endif // USE_LIBSPE2
+#else // !__SPU__
+//Simulate DMA using memcpy or direct access on non-CELL platforms that don't have DMAs and SPUs (Win32, Mac, Linux etc)
+//Potential to add networked simulation using this interface
+
+#define DMA_TAG(a) (a)
+#define DMA_MASK(a) (a)
+
+ /// cellDmaLargeGet Win32 replacements for Cell DMA to allow simulating most of the SPU code (just memcpy)
+ int cellDmaLargeGet(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid);
+ int cellDmaGet(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid);
+ /// cellDmaLargePut Win32 replacements for Cell DMA to allow simulating most of the SPU code (just memcpy)
+ int cellDmaLargePut(const void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid);
+ /// cellDmaWaitTagStatusAll Win32 replacements for Cell DMA to allow simulating most of the SPU code (just memcpy)
+ void cellDmaWaitTagStatusAll(int ignore);
+
+
+#endif //__CELLOS_LV2__
+
+///stallingUnalignedDmaSmallGet internally uses DMA_TAG(1)
+int stallingUnalignedDmaSmallGet(void *ls, uint64_t ea, uint32_t size);
+
+
+void* cellDmaLargeGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid);
+void* cellDmaGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid);
+void* cellDmaSmallGetReadOnly(void *ls, uint64_t ea, uint32_t size, uint32_t tag, uint32_t tid, uint32_t rid);
+
+
+#endif //BT_FAKE_DMA_H
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp b/tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp
new file mode 100644
index 00000000..420f15f1
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp
@@ -0,0 +1,275 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SpuGatheringCollisionDispatcher.h"
+#include "SpuCollisionTaskProcess.h"
+
+
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
+#include "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h"
+#include "SpuContactManifoldCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+#include "LinearMath/btQuickprof.h"
+#include "BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h"
+
+
+
+
+
+SpuGatheringCollisionDispatcher::SpuGatheringCollisionDispatcher(class btThreadSupportInterface* threadInterface, unsigned int maxNumOutstandingTasks,btCollisionConfiguration* collisionConfiguration)
+:btCollisionDispatcher(collisionConfiguration),
+m_spuCollisionTaskProcess(0),
+m_threadInterface(threadInterface),
+m_maxNumOutstandingTasks(maxNumOutstandingTasks)
+{
+
+}
+
+
+bool SpuGatheringCollisionDispatcher::supportsDispatchPairOnSpu(int proxyType0,int proxyType1)
+{
+ bool supported0 = (
+ (proxyType0 == BOX_SHAPE_PROXYTYPE) ||
+ (proxyType0 == TRIANGLE_SHAPE_PROXYTYPE) ||
+ (proxyType0 == SPHERE_SHAPE_PROXYTYPE) ||
+ (proxyType0 == CAPSULE_SHAPE_PROXYTYPE) ||
+ (proxyType0 == CYLINDER_SHAPE_PROXYTYPE) ||
+// (proxyType0 == CONE_SHAPE_PROXYTYPE) ||
+ (proxyType0 == TRIANGLE_MESH_SHAPE_PROXYTYPE) ||
+ (proxyType0 == CONVEX_HULL_SHAPE_PROXYTYPE)||
+ (proxyType0 == STATIC_PLANE_PROXYTYPE)||
+ (proxyType0 == COMPOUND_SHAPE_PROXYTYPE)
+ );
+
+ bool supported1 = (
+ (proxyType1 == BOX_SHAPE_PROXYTYPE) ||
+ (proxyType1 == TRIANGLE_SHAPE_PROXYTYPE) ||
+ (proxyType1 == SPHERE_SHAPE_PROXYTYPE) ||
+ (proxyType1 == CAPSULE_SHAPE_PROXYTYPE) ||
+ (proxyType1 == CYLINDER_SHAPE_PROXYTYPE) ||
+// (proxyType1 == CONE_SHAPE_PROXYTYPE) ||
+ (proxyType1 == TRIANGLE_MESH_SHAPE_PROXYTYPE) ||
+ (proxyType1 == CONVEX_HULL_SHAPE_PROXYTYPE) ||
+ (proxyType1 == STATIC_PLANE_PROXYTYPE) ||
+ (proxyType1 == COMPOUND_SHAPE_PROXYTYPE)
+ );
+
+
+ return supported0 && supported1;
+}
+
+
+
+SpuGatheringCollisionDispatcher::~SpuGatheringCollisionDispatcher()
+{
+ if (m_spuCollisionTaskProcess)
+ delete m_spuCollisionTaskProcess;
+
+}
+
+#include "stdio.h"
+
+
+
+///interface for iterating all overlapping collision pairs, no matter how those pairs are stored (array, set, map etc)
+///this is useful for the collision dispatcher.
+class btSpuCollisionPairCallback : public btOverlapCallback
+{
+ const btDispatcherInfo& m_dispatchInfo;
+ SpuGatheringCollisionDispatcher* m_dispatcher;
+
+public:
+
+ btSpuCollisionPairCallback(const btDispatcherInfo& dispatchInfo, SpuGatheringCollisionDispatcher* dispatcher)
+ :m_dispatchInfo(dispatchInfo),
+ m_dispatcher(dispatcher)
+ {
+ }
+
+ virtual bool processOverlap(btBroadphasePair& collisionPair)
+ {
+
+
+ //PPU version
+ //(*m_dispatcher->getNearCallback())(collisionPair,*m_dispatcher,m_dispatchInfo);
+
+ //only support discrete collision detection for now, we could fallback on PPU/unoptimized version for TOI/CCD
+ btAssert(m_dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE);
+
+ //by default, Bullet will use this near callback
+ {
+ ///userInfo is used to determine if the SPU has to handle this case or not (skip PPU tasks)
+ if (!collisionPair.m_internalTmpValue)
+ {
+ collisionPair.m_internalTmpValue = 1;
+ }
+ if (!collisionPair.m_algorithm)
+ {
+ btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject;
+ btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject;
+
+ btCollisionAlgorithmConstructionInfo ci;
+ ci.m_dispatcher1 = m_dispatcher;
+ ci.m_manifold = 0;
+
+ if (m_dispatcher->needsCollision(colObj0,colObj1))
+ {
+ int proxyType0 = colObj0->getCollisionShape()->getShapeType();
+ int proxyType1 = colObj1->getCollisionShape()->getShapeType();
+ bool supportsSpuDispatch = m_dispatcher->supportsDispatchPairOnSpu(proxyType0,proxyType1)
+ && ((colObj0->getCollisionFlags() & btCollisionObject::CF_DISABLE_SPU_COLLISION_PROCESSING) == 0)
+ && ((colObj1->getCollisionFlags() & btCollisionObject::CF_DISABLE_SPU_COLLISION_PROCESSING) == 0);
+
+ if (proxyType0 == COMPOUND_SHAPE_PROXYTYPE)
+ {
+ btCompoundShape* compound = (btCompoundShape*)colObj0->getCollisionShape();
+ if (compound->getNumChildShapes()>MAX_SPU_COMPOUND_SUBSHAPES)
+ {
+ //printf("PPU fallback, compound->getNumChildShapes(%d)>%d\n",compound->getNumChildShapes(),MAX_SPU_COMPOUND_SUBSHAPES);
+ supportsSpuDispatch = false;
+ }
+ }
+
+ if (proxyType1 == COMPOUND_SHAPE_PROXYTYPE)
+ {
+ btCompoundShape* compound = (btCompoundShape*)colObj1->getCollisionShape();
+ if (compound->getNumChildShapes()>MAX_SPU_COMPOUND_SUBSHAPES)
+ {
+ //printf("PPU fallback, compound->getNumChildShapes(%d)>%d\n",compound->getNumChildShapes(),MAX_SPU_COMPOUND_SUBSHAPES);
+ supportsSpuDispatch = false;
+ }
+ }
+
+ if (supportsSpuDispatch)
+ {
+
+ int so = sizeof(SpuContactManifoldCollisionAlgorithm);
+#ifdef ALLOCATE_SEPARATELY
+ void* mem = btAlignedAlloc(so,16);//m_dispatcher->allocateCollisionAlgorithm(so);
+#else
+ void* mem = m_dispatcher->allocateCollisionAlgorithm(so);
+#endif
+ collisionPair.m_algorithm = new(mem) SpuContactManifoldCollisionAlgorithm(ci,colObj0,colObj1);
+ collisionPair.m_internalTmpValue = 2;
+ } else
+ {
+ collisionPair.m_algorithm = m_dispatcher->findAlgorithm(colObj0,colObj1);
+ collisionPair.m_internalTmpValue = 3;
+ }
+ }
+ }
+ }
+ return false;
+ }
+};
+
+void SpuGatheringCollisionDispatcher::dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo, btDispatcher* dispatcher)
+{
+
+ if (dispatchInfo.m_enableSPU)
+ {
+ m_maxNumOutstandingTasks = m_threadInterface->getNumTasks();
+
+ {
+ BT_PROFILE("processAllOverlappingPairs");
+
+ if (!m_spuCollisionTaskProcess)
+ m_spuCollisionTaskProcess = new SpuCollisionTaskProcess(m_threadInterface,m_maxNumOutstandingTasks);
+
+ m_spuCollisionTaskProcess->setNumTasks(m_maxNumOutstandingTasks);
+ // printf("m_maxNumOutstandingTasks =%d\n",m_maxNumOutstandingTasks);
+
+ m_spuCollisionTaskProcess->initialize2(dispatchInfo.m_useEpa);
+
+
+ ///modified version of btCollisionDispatcher::dispatchAllCollisionPairs:
+ {
+ btSpuCollisionPairCallback collisionCallback(dispatchInfo,this);
+
+ pairCache->processAllOverlappingPairs(&collisionCallback,dispatcher);
+ }
+ }
+
+ //send one big batch
+ int numTotalPairs = pairCache->getNumOverlappingPairs();
+
+ btBroadphasePair* pairPtr = pairCache->getOverlappingPairArrayPtr();
+ int i;
+ {
+ int pairRange = SPU_BATCHSIZE_BROADPHASE_PAIRS;
+ if (numTotalPairs < (m_spuCollisionTaskProcess->getNumTasks()*SPU_BATCHSIZE_BROADPHASE_PAIRS))
+ {
+ pairRange = (numTotalPairs/m_spuCollisionTaskProcess->getNumTasks())+1;
+ }
+
+ BT_PROFILE("addWorkToTask");
+ for (i=0;i<numTotalPairs;)
+ {
+ //Performance Hint: tweak this number during benchmarking
+
+ int endIndex = (i+pairRange) < numTotalPairs ? i+pairRange : numTotalPairs;
+ m_spuCollisionTaskProcess->addWorkToTask(pairPtr,i,endIndex);
+ i = endIndex;
+ }
+ }
+
+ {
+ BT_PROFILE("PPU fallback");
+ //handle PPU fallback pairs
+ for (i=0;i<numTotalPairs;i++)
+ {
+ btBroadphasePair& collisionPair = pairPtr[i];
+ if (collisionPair.m_internalTmpValue == 3)
+ {
+ if (collisionPair.m_algorithm)
+ {
+ btCollisionObject* colObj0 = (btCollisionObject*)collisionPair.m_pProxy0->m_clientObject;
+ btCollisionObject* colObj1 = (btCollisionObject*)collisionPair.m_pProxy1->m_clientObject;
+
+ if (dispatcher->needsCollision(colObj0,colObj1))
+ {
+ btManifoldResult contactPointResult(colObj0,colObj1);
+
+ if (dispatchInfo.m_dispatchFunc == btDispatcherInfo::DISPATCH_DISCRETE)
+ {
+ //discrete collision detection query
+ collisionPair.m_algorithm->processCollision(colObj0,colObj1,dispatchInfo,&contactPointResult);
+ } else
+ {
+ //continuous collision detection query, time of impact (toi)
+ btScalar toi = collisionPair.m_algorithm->calculateTimeOfImpact(colObj0,colObj1,dispatchInfo,&contactPointResult);
+ if (dispatchInfo.m_timeOfImpact > toi)
+ dispatchInfo.m_timeOfImpact = toi;
+
+ }
+ }
+ }
+ }
+ }
+ }
+ {
+ BT_PROFILE("flush2");
+ //make sure all SPU work is done
+ m_spuCollisionTaskProcess->flush2();
+ }
+
+ } else
+ {
+ ///PPU fallback
+ ///!Need to make sure to clear all 'algorithms' when switching between SPU and PPU
+ btCollisionDispatcher::dispatchAllCollisionPairs(pairCache,dispatchInfo,dispatcher);
+ }
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h b/tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h
new file mode 100644
index 00000000..f8bc7da6
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuGatheringCollisionDispatcher.h
@@ -0,0 +1,72 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef BT_SPU_GATHERING_COLLISION__DISPATCHER_H
+#define BT_SPU_GATHERING_COLLISION__DISPATCHER_H
+
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+
+
+///Tuning value to optimized SPU utilization
+///Too small value means Task overhead is large compared to computation (too fine granularity)
+///Too big value might render some SPUs are idle, while a few other SPUs are doing all work.
+//#define SPU_BATCHSIZE_BROADPHASE_PAIRS 8
+//#define SPU_BATCHSIZE_BROADPHASE_PAIRS 16
+//#define SPU_BATCHSIZE_BROADPHASE_PAIRS 64
+#define SPU_BATCHSIZE_BROADPHASE_PAIRS 128
+//#define SPU_BATCHSIZE_BROADPHASE_PAIRS 256
+//#define SPU_BATCHSIZE_BROADPHASE_PAIRS 512
+//#define SPU_BATCHSIZE_BROADPHASE_PAIRS 1024
+
+
+
+class SpuCollisionTaskProcess;
+
+///SpuGatheringCollisionDispatcher can use SPU to gather and calculate collision detection
+///Time of Impact, Closest Points and Penetration Depth.
+class SpuGatheringCollisionDispatcher : public btCollisionDispatcher
+{
+
+ SpuCollisionTaskProcess* m_spuCollisionTaskProcess;
+
+protected:
+
+ class btThreadSupportInterface* m_threadInterface;
+
+ unsigned int m_maxNumOutstandingTasks;
+
+
+public:
+
+ //can be used by SPU collision algorithms
+ SpuCollisionTaskProcess* getSpuCollisionTaskProcess()
+ {
+ return m_spuCollisionTaskProcess;
+ }
+
+ SpuGatheringCollisionDispatcher (class btThreadSupportInterface* threadInterface, unsigned int maxNumOutstandingTasks,btCollisionConfiguration* collisionConfiguration);
+
+ virtual ~SpuGatheringCollisionDispatcher();
+
+ bool supportsDispatchPairOnSpu(int proxyType0,int proxyType1);
+
+ virtual void dispatchAllCollisionPairs(btOverlappingPairCache* pairCache,const btDispatcherInfo& dispatchInfo,btDispatcher* dispatcher) ;
+
+};
+
+
+
+#endif //BT_SPU_GATHERING_COLLISION__DISPATCHER_H
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.cpp b/tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.cpp
new file mode 100644
index 00000000..a312450e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.cpp
@@ -0,0 +1,257 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifdef USE_LIBSPE2
+
+#include "SpuLibspe2Support.h"
+
+
+
+
+//SpuLibspe2Support helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
+///Setup and initialize SPU/CELL/Libspe2
+SpuLibspe2Support::SpuLibspe2Support(spe_program_handle_t *speprog, int numThreads)
+{
+ this->program = speprog;
+ this->numThreads = ((numThreads <= spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, -1)) ? numThreads : spe_cpu_info_get(SPE_COUNT_PHYSICAL_SPES, -1));
+}
+
+///cleanup/shutdown Libspe2
+SpuLibspe2Support::~SpuLibspe2Support()
+{
+
+ stopSPU();
+}
+
+
+
+///send messages to SPUs
+void SpuLibspe2Support::sendRequest(uint32_t uiCommand, uint32_t uiArgument0, uint32_t uiArgument1)
+{
+ spe_context_ptr_t context;
+
+ switch (uiCommand)
+ {
+ case CMD_SAMPLE_TASK_COMMAND:
+ {
+ //get taskdescription
+ SpuSampleTaskDesc* taskDesc = (SpuSampleTaskDesc*) uiArgument0;
+
+ btAssert(taskDesc->m_taskId<m_activeSpuStatus.size());
+
+ //get status of SPU on which task should run
+ btSpuStatus& spuStatus = m_activeSpuStatus[taskDesc->m_taskId];
+
+ //set data for spuStatus
+ spuStatus.m_commandId = uiCommand;
+ spuStatus.m_status = Spu_Status_Occupied; //set SPU as "occupied"
+ spuStatus.m_taskDesc.p = taskDesc;
+
+ //get context
+ context = data[taskDesc->m_taskId].context;
+
+
+ taskDesc->m_mainMemoryPtr = reinterpret_cast<uint64_t> (spuStatus.m_lsMemory.p);
+
+
+ break;
+ }
+ case CMD_GATHER_AND_PROCESS_PAIRLIST:
+ {
+ //get taskdescription
+ SpuGatherAndProcessPairsTaskDesc* taskDesc = (SpuGatherAndProcessPairsTaskDesc*) uiArgument0;
+
+ btAssert(taskDesc->taskId<m_activeSpuStatus.size());
+
+ //get status of SPU on which task should run
+ btSpuStatus& spuStatus = m_activeSpuStatus[taskDesc->taskId];
+
+ //set data for spuStatus
+ spuStatus.m_commandId = uiCommand;
+ spuStatus.m_status = Spu_Status_Occupied; //set SPU as "occupied"
+ spuStatus.m_taskDesc.p = taskDesc;
+
+ //get context
+ context = data[taskDesc->taskId].context;
+
+
+ taskDesc->m_lsMemory = (CollisionTask_LocalStoreMemory*)spuStatus.m_lsMemory.p;
+
+ break;
+ }
+ default:
+ {
+ ///not implemented
+ btAssert(0);
+ }
+
+ };
+
+
+ //write taskdescription in mailbox
+ unsigned int event = Spu_Mailbox_Event_Task;
+ spe_in_mbox_write(context, &event, 1, SPE_MBOX_ANY_NONBLOCKING);
+
+}
+
+///check for messages from SPUs
+void SpuLibspe2Support::waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1)
+{
+ ///We should wait for (one of) the first tasks to finish (or other SPU messages), and report its response
+
+ ///A possible response can be 'yes, SPU handled it', or 'no, please do a PPU fallback'
+
+ btAssert(m_activeSpuStatus.size());
+
+
+ int last = -1;
+
+ //find an active spu/thread
+ while(last < 0)
+ {
+ for (int i=0;i<m_activeSpuStatus.size();i++)
+ {
+ if ( m_activeSpuStatus[i].m_status == Spu_Status_Free)
+ {
+ last = i;
+ break;
+ }
+ }
+ if(last < 0)
+ sched_yield();
+ }
+
+
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[last];
+
+ ///need to find an active spu
+ btAssert(last>=0);
+
+
+
+ *puiArgument0 = spuStatus.m_taskId;
+ *puiArgument1 = spuStatus.m_status;
+
+
+}
+
+
+void SpuLibspe2Support::startSPU()
+{
+ this->internal_startSPU();
+}
+
+
+
+///start the spus group (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
+void SpuLibspe2Support::internal_startSPU()
+{
+ m_activeSpuStatus.resize(numThreads);
+
+
+ for (int i=0; i < numThreads; i++)
+ {
+
+ if(data[i].context == NULL)
+ {
+
+ /* Create context */
+ if ((data[i].context = spe_context_create(0, NULL)) == NULL)
+ {
+ perror ("Failed creating context");
+ exit(1);
+ }
+
+ /* Load program into context */
+ if(spe_program_load(data[i].context, this->program))
+ {
+ perror ("Failed loading program");
+ exit(1);
+ }
+
+ m_activeSpuStatus[i].m_status = Spu_Status_Startup;
+ m_activeSpuStatus[i].m_taskId = i;
+ m_activeSpuStatus[i].m_commandId = 0;
+ m_activeSpuStatus[i].m_lsMemory.p = NULL;
+
+
+ data[i].entry = SPE_DEFAULT_ENTRY;
+ data[i].flags = 0;
+ data[i].argp.p = &m_activeSpuStatus[i];
+ data[i].envp.p = NULL;
+
+ /* Create thread for each SPE context */
+ if (pthread_create(&data[i].pthread, NULL, &ppu_pthread_function, &(data[i]) ))
+ {
+ perror ("Failed creating thread");
+ exit(1);
+ }
+ /*
+ else
+ {
+ printf("started thread %d\n",i);
+ }*/
+ }
+ }
+
+
+ for (int i=0; i < numThreads; i++)
+ {
+ if(data[i].context != NULL)
+ {
+ while( m_activeSpuStatus[i].m_status == Spu_Status_Startup)
+ {
+ // wait for spu to set up
+ sched_yield();
+ }
+ printf("Spu %d is ready\n", i);
+ }
+ }
+}
+
+///tell the task scheduler we are done with the SPU tasks
+void SpuLibspe2Support::stopSPU()
+{
+ // wait for all threads to finish
+ int i;
+ for ( i = 0; i < this->numThreads; i++ )
+ {
+
+ unsigned int event = Spu_Mailbox_Event_Shutdown;
+ spe_context_ptr_t context = data[i].context;
+ spe_in_mbox_write(context, &event, 1, SPE_MBOX_ALL_BLOCKING);
+ pthread_join (data[i].pthread, NULL);
+
+ }
+ // close SPE program
+ spe_image_close(program);
+ // destroy SPE contexts
+ for ( i = 0; i < this->numThreads; i++ )
+ {
+ if(data[i].context != NULL)
+ {
+ spe_context_destroy (data[i].context);
+ }
+ }
+
+ m_activeSpuStatus.clear();
+
+}
+
+
+
+#endif //USE_LIBSPE2
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.h b/tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.h
new file mode 100644
index 00000000..37a5e79f
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuLibspe2Support.h
@@ -0,0 +1,180 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_SPU_LIBSPE2_SUPPORT_H
+#define BT_SPU_LIBSPE2_SUPPORT_H
+
+#include <LinearMath/btScalar.h> //for uint32_t etc.
+
+#ifdef USE_LIBSPE2
+
+#include <stdlib.h>
+#include <stdio.h>
+//#include "SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
+#include "PlatformDefinitions.h"
+
+
+//extern struct SpuGatherAndProcessPairsTaskDesc;
+
+enum
+{
+ Spu_Mailbox_Event_Nothing = 0,
+ Spu_Mailbox_Event_Task = 1,
+ Spu_Mailbox_Event_Shutdown = 2,
+
+ Spu_Mailbox_Event_ForceDword = 0xFFFFFFFF
+
+};
+
+enum
+{
+ Spu_Status_Free = 0,
+ Spu_Status_Occupied = 1,
+ Spu_Status_Startup = 2,
+
+ Spu_Status_ForceDword = 0xFFFFFFFF
+
+};
+
+
+struct btSpuStatus
+{
+ uint32_t m_taskId;
+ uint32_t m_commandId;
+ uint32_t m_status;
+
+ addr64 m_taskDesc;
+ addr64 m_lsMemory;
+
+}
+__attribute__ ((aligned (128)))
+;
+
+
+
+#ifndef __SPU__
+
+#include "LinearMath/btAlignedObjectArray.h"
+#include "SpuCollisionTaskProcess.h"
+#include "SpuSampleTaskProcess.h"
+#include "btThreadSupportInterface.h"
+#include <libspe2.h>
+#include <pthread.h>
+#include <sched.h>
+
+#define MAX_SPUS 4
+
+typedef struct ppu_pthread_data
+{
+ spe_context_ptr_t context;
+ pthread_t pthread;
+ unsigned int entry;
+ unsigned int flags;
+ addr64 argp;
+ addr64 envp;
+ spe_stop_info_t stopinfo;
+} ppu_pthread_data_t;
+
+
+static void *ppu_pthread_function(void *arg)
+{
+ ppu_pthread_data_t * datap = (ppu_pthread_data_t *)arg;
+ /*
+ int rc;
+ do
+ {*/
+ spe_context_run(datap->context, &datap->entry, datap->flags, datap->argp.p, datap->envp.p, &datap->stopinfo);
+ if (datap->stopinfo.stop_reason == SPE_EXIT)
+ {
+ if (datap->stopinfo.result.spe_exit_code != 0)
+ {
+ perror("FAILED: SPE returned a non-zero exit status: \n");
+ exit(1);
+ }
+ }
+ else
+ {
+ perror("FAILED: SPE abnormally terminated\n");
+ exit(1);
+ }
+
+
+ //} while (rc > 0); // loop until exit or error, and while any stop & signal
+ pthread_exit(NULL);
+}
+
+
+
+
+
+
+///SpuLibspe2Support helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
+class SpuLibspe2Support : public btThreadSupportInterface
+{
+
+ btAlignedObjectArray<btSpuStatus> m_activeSpuStatus;
+
+public:
+ //Setup and initialize SPU/CELL/Libspe2
+ SpuLibspe2Support(spe_program_handle_t *speprog,int numThreads);
+
+ // SPE program handle ptr.
+ spe_program_handle_t *program;
+
+ // SPE program data
+ ppu_pthread_data_t data[MAX_SPUS];
+
+ //cleanup/shutdown Libspe2
+ ~SpuLibspe2Support();
+
+ ///send messages to SPUs
+ void sendRequest(uint32_t uiCommand, uint32_t uiArgument0, uint32_t uiArgument1=0);
+
+ //check for messages from SPUs
+ void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1);
+
+ //start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
+ virtual void startSPU();
+
+ //tell the task scheduler we are done with the SPU tasks
+ virtual void stopSPU();
+
+ virtual void setNumTasks(int numTasks)
+ {
+ //changing the number of tasks after initialization is not implemented (yet)
+ }
+
+private:
+
+ ///start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
+ void internal_startSPU();
+
+
+
+
+ int numThreads;
+
+};
+
+#endif // NOT __SPU__
+
+#endif //USE_LIBSPE2
+
+#endif //BT_SPU_LIBSPE2_SUPPORT_H
+
+
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h
new file mode 100644
index 00000000..e5179611
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h
@@ -0,0 +1,167 @@
+/*
+ Copyright (C) 2006, 2008 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef __BOX_H__
+#define __BOX_H__
+
+
+#ifndef PE_REF
+#define PE_REF(a) a&
+#endif
+
+#include <math.h>
+
+
+#include "../PlatformDefinitions.h"
+
+
+
+
+enum FeatureType { F, E, V };
+
+//----------------------------------------------------------------------------
+// Box
+//----------------------------------------------------------------------------
+///The Box is an internal class used by the boxBoxDistance calculation.
+class Box
+{
+public:
+ vmVector3 mHalf;
+
+ inline Box()
+ {}
+ inline Box(PE_REF(vmVector3) half_);
+ inline Box(float hx, float hy, float hz);
+
+ inline void Set(PE_REF(vmVector3) half_);
+ inline void Set(float hx, float hy, float hz);
+
+ inline vmVector3 GetAABB(const vmMatrix3& rotation) const;
+};
+
+inline
+Box::Box(PE_REF(vmVector3) half_)
+{
+ Set(half_);
+}
+
+inline
+Box::Box(float hx, float hy, float hz)
+{
+ Set(hx, hy, hz);
+}
+
+inline
+void
+Box::Set(PE_REF(vmVector3) half_)
+{
+ mHalf = half_;
+}
+
+inline
+void
+Box::Set(float hx, float hy, float hz)
+{
+ mHalf = vmVector3(hx, hy, hz);
+}
+
+inline
+vmVector3
+Box::GetAABB(const vmMatrix3& rotation) const
+{
+ return absPerElem(rotation) * mHalf;
+}
+
+//-------------------------------------------------------------------------------------------------
+// BoxPoint
+//-------------------------------------------------------------------------------------------------
+
+///The BoxPoint class is an internally used class to contain feature information for boxBoxDistance calculation.
+class BoxPoint
+{
+public:
+ BoxPoint() : localPoint(0.0f) {}
+
+ vmPoint3 localPoint;
+ FeatureType featureType;
+ int featureIdx;
+
+ inline void setVertexFeature(int plusX, int plusY, int plusZ);
+ inline void setEdgeFeature(int dim0, int plus0, int dim1, int plus1);
+ inline void setFaceFeature(int dim, int plus);
+
+ inline void getVertexFeature(int & plusX, int & plusY, int & plusZ) const;
+ inline void getEdgeFeature(int & dim0, int & plus0, int & dim1, int & plus1) const;
+ inline void getFaceFeature(int & dim, int & plus) const;
+};
+
+inline
+void
+BoxPoint::setVertexFeature(int plusX, int plusY, int plusZ)
+{
+ featureType = V;
+ featureIdx = plusX << 2 | plusY << 1 | plusZ;
+}
+
+inline
+void
+BoxPoint::setEdgeFeature(int dim0, int plus0, int dim1, int plus1)
+{
+ featureType = E;
+
+ if (dim0 > dim1) {
+ featureIdx = plus1 << 5 | dim1 << 3 | plus0 << 2 | dim0;
+ } else {
+ featureIdx = plus0 << 5 | dim0 << 3 | plus1 << 2 | dim1;
+ }
+}
+
+inline
+void
+BoxPoint::setFaceFeature(int dim, int plus)
+{
+ featureType = F;
+ featureIdx = plus << 2 | dim;
+}
+
+inline
+void
+BoxPoint::getVertexFeature(int & plusX, int & plusY, int & plusZ) const
+{
+ plusX = featureIdx >> 2;
+ plusY = featureIdx >> 1 & 1;
+ plusZ = featureIdx & 1;
+}
+
+inline
+void
+BoxPoint::getEdgeFeature(int & dim0, int & plus0, int & dim1, int & plus1) const
+{
+ plus0 = featureIdx >> 5;
+ dim0 = featureIdx >> 3 & 3;
+ plus1 = featureIdx >> 2 & 1;
+ dim1 = featureIdx & 3;
+}
+
+inline
+void
+BoxPoint::getFaceFeature(int & dim, int & plus) const
+{
+ plus = featureIdx >> 2;
+ dim = featureIdx & 3;
+}
+
+#endif /* __BOX_H__ */
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp
new file mode 100644
index 00000000..dfcd8426
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp
@@ -0,0 +1,302 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "SpuCollisionShapes.h"
+
+///not supported on IBM SDK, until we fix the alignment of btVector3
+#if defined (__CELLOS_LV2__) && defined (__SPU__)
+#include <spu_intrinsics.h>
+static inline vec_float4 vec_dot3( vec_float4 vec0, vec_float4 vec1 )
+{
+ vec_float4 result;
+ result = spu_mul( vec0, vec1 );
+ result = spu_madd( spu_rlqwbyte( vec0, 4 ), spu_rlqwbyte( vec1, 4 ), result );
+ return spu_madd( spu_rlqwbyte( vec0, 8 ), spu_rlqwbyte( vec1, 8 ), result );
+}
+#endif //__SPU__
+
+
+void computeAabb (btVector3& aabbMin, btVector3& aabbMax, btConvexInternalShape* convexShape, ppu_address_t convexShapePtr, int shapeType, const btTransform& xform)
+{
+ //calculate the aabb, given the types...
+ switch (shapeType)
+ {
+ case CYLINDER_SHAPE_PROXYTYPE:
+ /* fall through */
+ case BOX_SHAPE_PROXYTYPE:
+ {
+ btScalar margin=convexShape->getMarginNV();
+ btVector3 halfExtents = convexShape->getImplicitShapeDimensions();
+ halfExtents += btVector3(margin,margin,margin);
+ const btTransform& t = xform;
+ btMatrix3x3 abs_b = t.getBasis().absolute();
+ btVector3 center = t.getOrigin();
+ btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents));
+
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+ break;
+ }
+ case CAPSULE_SHAPE_PROXYTYPE:
+ {
+ btScalar margin=convexShape->getMarginNV();
+ btVector3 halfExtents = convexShape->getImplicitShapeDimensions();
+ //add the radius to y-axis to get full height
+ btScalar radius = halfExtents[0];
+ halfExtents[1] += radius;
+ halfExtents += btVector3(margin,margin,margin);
+#if 0
+ int capsuleUpAxis = convexShape->getUpAxis();
+ btScalar halfHeight = convexShape->getHalfHeight();
+ btScalar radius = convexShape->getRadius();
+ halfExtents[capsuleUpAxis] = radius + halfHeight;
+#endif
+ const btTransform& t = xform;
+ btMatrix3x3 abs_b = t.getBasis().absolute();
+ btVector3 center = t.getOrigin();
+ btVector3 extent = btVector3(abs_b[0].dot(halfExtents),abs_b[1].dot(halfExtents),abs_b[2].dot(halfExtents));
+
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+ break;
+ }
+ case SPHERE_SHAPE_PROXYTYPE:
+ {
+ btScalar radius = convexShape->getImplicitShapeDimensions().getX();// * convexShape->getLocalScaling().getX();
+ btScalar margin = radius + convexShape->getMarginNV();
+ const btTransform& t = xform;
+ const btVector3& center = t.getOrigin();
+ btVector3 extent(margin,margin,margin);
+ aabbMin = center - extent;
+ aabbMax = center + extent;
+ break;
+ }
+ case CONVEX_HULL_SHAPE_PROXYTYPE:
+ {
+ ATTRIBUTE_ALIGNED16(char convexHullShape0[sizeof(btConvexHullShape)]);
+ cellDmaGet(&convexHullShape0, convexShapePtr , sizeof(btConvexHullShape), DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ btConvexHullShape* localPtr = (btConvexHullShape*)&convexHullShape0;
+ const btTransform& t = xform;
+ btScalar margin = convexShape->getMarginNV();
+ localPtr->getNonvirtualAabb(t,aabbMin,aabbMax,margin);
+ //spu_printf("SPU convex aabbMin=%f,%f,%f=\n",aabbMin.getX(),aabbMin.getY(),aabbMin.getZ());
+ //spu_printf("SPU convex aabbMax=%f,%f,%f=\n",aabbMax.getX(),aabbMax.getY(),aabbMax.getZ());
+ break;
+ }
+ default:
+ {
+ // spu_printf("SPU: unsupported shapetype %d in AABB calculation\n");
+ }
+ };
+}
+
+void dmaBvhShapeData (bvhMeshShape_LocalStoreMemory* bvhMeshShape, btBvhTriangleMeshShape* triMeshShape)
+{
+ register int dmaSize;
+ register ppu_address_t dmaPpuAddress2;
+
+ dmaSize = sizeof(btTriangleIndexVertexArray);
+ dmaPpuAddress2 = reinterpret_cast<ppu_address_t>(triMeshShape->getMeshInterface());
+ // spu_printf("trimeshShape->getMeshInterface() == %llx\n",dmaPpuAddress2);
+#ifdef __SPU__
+ cellDmaGet(&bvhMeshShape->gTriangleMeshInterfaceStorage, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+ bvhMeshShape->gTriangleMeshInterfacePtr = &bvhMeshShape->gTriangleMeshInterfaceStorage;
+#else
+ bvhMeshShape->gTriangleMeshInterfacePtr = (btTriangleIndexVertexArray*)cellDmaGetReadOnly(&bvhMeshShape->gTriangleMeshInterfaceStorage, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+#endif
+
+ //cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ ///now DMA over the BVH
+
+ dmaSize = sizeof(btOptimizedBvh);
+ dmaPpuAddress2 = reinterpret_cast<ppu_address_t>(triMeshShape->getOptimizedBvh());
+ //spu_printf("trimeshShape->getOptimizedBvh() == %llx\n",dmaPpuAddress2);
+ cellDmaGet(&bvhMeshShape->gOptimizedBvh, dmaPpuAddress2 , dmaSize, DMA_TAG(2), 0, 0);
+ //cellDmaWaitTagStatusAll(DMA_MASK(2));
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+}
+
+void dmaBvhIndexedMesh (btIndexedMesh* IndexMesh, IndexedMeshArray& indexArray, int index, uint32_t dmaTag)
+{
+ cellDmaGet(IndexMesh, (ppu_address_t)&indexArray[index] , sizeof(btIndexedMesh), DMA_TAG(dmaTag), 0, 0);
+
+}
+
+void dmaBvhSubTreeHeaders (btBvhSubtreeInfo* subTreeHeaders, ppu_address_t subTreePtr, int batchSize, uint32_t dmaTag)
+{
+ cellDmaGet(subTreeHeaders, subTreePtr, batchSize * sizeof(btBvhSubtreeInfo), DMA_TAG(dmaTag), 0, 0);
+}
+
+void dmaBvhSubTreeNodes (btQuantizedBvhNode* nodes, const btBvhSubtreeInfo& subtree, QuantizedNodeArray& nodeArray, int dmaTag)
+{
+ cellDmaGet(nodes, reinterpret_cast<ppu_address_t>(&nodeArray[subtree.m_rootNodeIndex]) , subtree.m_subtreeSize* sizeof(btQuantizedBvhNode), DMA_TAG(2), 0, 0);
+}
+
+///getShapeTypeSize could easily be optimized, but it is not likely a bottleneck
+int getShapeTypeSize(int shapeType)
+{
+
+
+ switch (shapeType)
+ {
+ case CYLINDER_SHAPE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btCylinderShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+ case BOX_SHAPE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btBoxShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+ case SPHERE_SHAPE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btSphereShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+ case TRIANGLE_MESH_SHAPE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btBvhTriangleMeshShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+ case CAPSULE_SHAPE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btCapsuleShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+
+ case CONVEX_HULL_SHAPE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btConvexHullShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+
+ case COMPOUND_SHAPE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btCompoundShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+ case STATIC_PLANE_PROXYTYPE:
+ {
+ int shapeSize = sizeof(btStaticPlaneShape);
+ btAssert(shapeSize < MAX_SHAPE_SIZE);
+ return shapeSize;
+ }
+
+ default:
+ btAssert(0);
+ //unsupported shapetype, please add here
+ return 0;
+ }
+}
+
+void dmaConvexVertexData (SpuConvexPolyhedronVertexData* convexVertexData, btConvexHullShape* convexShapeSPU)
+{
+ convexVertexData->gNumConvexPoints = convexShapeSPU->getNumPoints();
+ if (convexVertexData->gNumConvexPoints>MAX_NUM_SPU_CONVEX_POINTS)
+ {
+ btAssert(0);
+ // spu_printf("SPU: Error: MAX_NUM_SPU_CONVEX_POINTS(%d) exceeded: %d\n",MAX_NUM_SPU_CONVEX_POINTS,convexVertexData->gNumConvexPoints);
+ return;
+ }
+
+ register int dmaSize = convexVertexData->gNumConvexPoints*sizeof(btVector3);
+ ppu_address_t pointsPPU = (ppu_address_t) convexShapeSPU->getUnscaledPoints();
+ cellDmaGet(&convexVertexData->g_convexPointBuffer[0], pointsPPU , dmaSize, DMA_TAG(2), 0, 0);
+}
+
+void dmaCollisionShape (void* collisionShapeLocation, ppu_address_t collisionShapePtr, uint32_t dmaTag, int shapeType)
+{
+ register int dmaSize = getShapeTypeSize(shapeType);
+ cellDmaGet(collisionShapeLocation, collisionShapePtr , dmaSize, DMA_TAG(dmaTag), 0, 0);
+ //cellDmaGetReadOnly(collisionShapeLocation, collisionShapePtr , dmaSize, DMA_TAG(dmaTag), 0, 0);
+ //cellDmaWaitTagStatusAll(DMA_MASK(dmaTag));
+}
+
+void dmaCompoundShapeInfo (CompoundShape_LocalStoreMemory* compoundShapeLocation, btCompoundShape* spuCompoundShape, uint32_t dmaTag)
+{
+ register int dmaSize;
+ register ppu_address_t dmaPpuAddress2;
+ int childShapeCount = spuCompoundShape->getNumChildShapes();
+ dmaSize = childShapeCount * sizeof(btCompoundShapeChild);
+ dmaPpuAddress2 = (ppu_address_t)spuCompoundShape->getChildList();
+ cellDmaGet(&compoundShapeLocation->gSubshapes[0], dmaPpuAddress2, dmaSize, DMA_TAG(dmaTag), 0, 0);
+}
+
+void dmaCompoundSubShapes (CompoundShape_LocalStoreMemory* compoundShapeLocation, btCompoundShape* spuCompoundShape, uint32_t dmaTag)
+{
+ int childShapeCount = spuCompoundShape->getNumChildShapes();
+ int i;
+ // DMA all the subshapes
+ for ( i = 0; i < childShapeCount; ++i)
+ {
+ btCompoundShapeChild& childShape = compoundShapeLocation->gSubshapes[i];
+ dmaCollisionShape (&compoundShapeLocation->gSubshapeShape[i],(ppu_address_t)childShape.m_childShape, dmaTag, childShape.m_childShapeType);
+ }
+}
+
+
+void spuWalkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,const btQuantizedBvhNode* rootNode,int startNodeIndex,int endNodeIndex)
+{
+
+ int curIndex = startNodeIndex;
+ int walkIterations = 0;
+#ifdef BT_DEBUG
+ int subTreeSize = endNodeIndex - startNodeIndex;
+#endif
+
+ int escapeIndex;
+
+ unsigned int aabbOverlap, isLeafNode;
+
+ while (curIndex < endNodeIndex)
+ {
+ //catch bugs in tree data
+ btAssert (walkIterations < subTreeSize);
+
+ walkIterations++;
+ aabbOverlap = spuTestQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,rootNode->m_quantizedAabbMin,rootNode->m_quantizedAabbMax);
+ isLeafNode = rootNode->isLeafNode();
+
+ if (isLeafNode && aabbOverlap)
+ {
+ //printf("overlap with node %d\n",rootNode->getTriangleIndex());
+ nodeCallback->processNode(0,rootNode->getTriangleIndex());
+ // spu_printf("SPU: overlap detected with triangleIndex:%d\n",rootNode->getTriangleIndex());
+ }
+
+ if (aabbOverlap || isLeafNode)
+ {
+ rootNode++;
+ curIndex++;
+ } else
+ {
+ escapeIndex = rootNode->getEscapeIndex();
+ rootNode += escapeIndex;
+ curIndex += escapeIndex;
+ }
+ }
+
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h
new file mode 100644
index 00000000..aa8a2910
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h
@@ -0,0 +1,128 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+#ifndef __SPU_COLLISION_SHAPES_H
+#define __SPU_COLLISION_SHAPES_H
+
+#include "../SpuDoubleBuffer.h"
+
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
+#include "BulletCollision/CollisionShapes/btCylinderShape.h"
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+
+#include "BulletCollision/CollisionShapes/btOptimizedBvh.h"
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btConvexHullShape.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+
+#define MAX_NUM_SPU_CONVEX_POINTS 128 //@fallback to PPU if a btConvexHullShape has more than MAX_NUM_SPU_CONVEX_POINTS points
+#define MAX_SPU_COMPOUND_SUBSHAPES 16 //@fallback on PPU if compound has more than MAX_SPU_COMPOUND_SUBSHAPES child shapes
+#define MAX_SHAPE_SIZE 256 //@todo: assert on this
+
+ATTRIBUTE_ALIGNED16(struct) SpuConvexPolyhedronVertexData
+{
+ void* gSpuConvexShapePtr;
+ btVector3* gConvexPoints;
+ int gNumConvexPoints;
+ int unused;
+ ATTRIBUTE_ALIGNED16(btVector3 g_convexPointBuffer[MAX_NUM_SPU_CONVEX_POINTS]);
+};
+
+
+
+ATTRIBUTE_ALIGNED16(struct) CollisionShape_LocalStoreMemory
+{
+ ATTRIBUTE_ALIGNED16(char collisionShape[MAX_SHAPE_SIZE]);
+};
+
+ATTRIBUTE_ALIGNED16(struct) CompoundShape_LocalStoreMemory
+{
+ // Compound data
+
+ ATTRIBUTE_ALIGNED16(btCompoundShapeChild gSubshapes[MAX_SPU_COMPOUND_SUBSHAPES]);
+ ATTRIBUTE_ALIGNED16(char gSubshapeShape[MAX_SPU_COMPOUND_SUBSHAPES][MAX_SHAPE_SIZE]);
+};
+
+ATTRIBUTE_ALIGNED16(struct) bvhMeshShape_LocalStoreMemory
+{
+ //ATTRIBUTE_ALIGNED16(btOptimizedBvh gOptimizedBvh);
+ ATTRIBUTE_ALIGNED16(char gOptimizedBvh[sizeof(btOptimizedBvh)+16]);
+ btOptimizedBvh* getOptimizedBvh()
+ {
+ return (btOptimizedBvh*) gOptimizedBvh;
+ }
+
+ ATTRIBUTE_ALIGNED16(btTriangleIndexVertexArray gTriangleMeshInterfaceStorage);
+ btTriangleIndexVertexArray* gTriangleMeshInterfacePtr;
+ ///only a single mesh part for now, we can add support for multiple parts, but quantized trees don't support this at the moment
+ ATTRIBUTE_ALIGNED16(btIndexedMesh gIndexMesh);
+ #define MAX_SPU_SUBTREE_HEADERS 32
+ //1024
+ ATTRIBUTE_ALIGNED16(btBvhSubtreeInfo gSubtreeHeaders[MAX_SPU_SUBTREE_HEADERS]);
+ ATTRIBUTE_ALIGNED16(btQuantizedBvhNode gSubtreeNodes[MAX_SUBTREE_SIZE_IN_BYTES/sizeof(btQuantizedBvhNode)]);
+};
+
+
+void computeAabb (btVector3& aabbMin, btVector3& aabbMax, btConvexInternalShape* convexShape, ppu_address_t convexShapePtr, int shapeType, const btTransform& xform);
+void dmaBvhShapeData (bvhMeshShape_LocalStoreMemory* bvhMeshShape, btBvhTriangleMeshShape* triMeshShape);
+void dmaBvhIndexedMesh (btIndexedMesh* IndexMesh, IndexedMeshArray& indexArray, int index, uint32_t dmaTag);
+void dmaBvhSubTreeHeaders (btBvhSubtreeInfo* subTreeHeaders, ppu_address_t subTreePtr, int batchSize, uint32_t dmaTag);
+void dmaBvhSubTreeNodes (btQuantizedBvhNode* nodes, const btBvhSubtreeInfo& subtree, QuantizedNodeArray& nodeArray, int dmaTag);
+
+int getShapeTypeSize(int shapeType);
+void dmaConvexVertexData (SpuConvexPolyhedronVertexData* convexVertexData, btConvexHullShape* convexShapeSPU);
+void dmaCollisionShape (void* collisionShapeLocation, ppu_address_t collisionShapePtr, uint32_t dmaTag, int shapeType);
+void dmaCompoundShapeInfo (CompoundShape_LocalStoreMemory* compoundShapeLocation, btCompoundShape* spuCompoundShape, uint32_t dmaTag);
+void dmaCompoundSubShapes (CompoundShape_LocalStoreMemory* compoundShapeLocation, btCompoundShape* spuCompoundShape, uint32_t dmaTag);
+
+
+#define USE_BRANCHFREE_TEST 1
+#ifdef USE_BRANCHFREE_TEST
+SIMD_FORCE_INLINE unsigned int spuTestQuantizedAabbAgainstQuantizedAabb(unsigned short int* aabbMin1,unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2)
+{
+#if defined(__CELLOS_LV2__) && defined (__SPU__)
+ vec_ushort8 vecMin = {aabbMin1[0],aabbMin2[0],aabbMin1[2],aabbMin2[2],aabbMin1[1],aabbMin2[1],0,0};
+ vec_ushort8 vecMax = {aabbMax2[0],aabbMax1[0],aabbMax2[2],aabbMax1[2],aabbMax2[1],aabbMax1[1],0,0};
+ vec_ushort8 isGt = spu_cmpgt(vecMin,vecMax);
+ return spu_extract(spu_gather(isGt),0)==0;
+
+#else
+ return btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0])
+ & (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2])
+ & (aabbMin1[1] <= aabbMax2[1]) & (aabbMax1[1] >= aabbMin2[1])),
+ 1, 0);
+#endif
+}
+#else
+
+SIMD_FORCE_INLINE unsigned int spuTestQuantizedAabbAgainstQuantizedAabb(const unsigned short int* aabbMin1,const unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2)
+{
+ unsigned int overlap = 1;
+ overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? 0 : overlap;
+ overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? 0 : overlap;
+ overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? 0 : overlap;
+ return overlap;
+}
+#endif
+
+void spuWalkStacklessQuantizedTree(btNodeOverlapCallback* nodeCallback,unsigned short int* quantizedQueryAabbMin,unsigned short int* quantizedQueryAabbMax,const btQuantizedBvhNode* rootNode,int startNodeIndex,int endNodeIndex);
+
+#endif
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp
new file mode 100644
index 00000000..bd71373c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp
@@ -0,0 +1,248 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SpuContactResult.h"
+
+//#define DEBUG_SPU_COLLISION_DETECTION 1
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+#ifndef __SPU__
+#include <stdio.h>
+#define spu_printf printf
+#endif
+#endif //DEBUG_SPU_COLLISION_DETECTION
+
+SpuContactResult::SpuContactResult()
+{
+ m_manifoldAddress = 0;
+ m_spuManifold = NULL;
+ m_RequiresWriteBack = false;
+}
+
+ SpuContactResult::~SpuContactResult()
+{
+ g_manifoldDmaExport.swapBuffers();
+}
+
+ ///User can override this material combiner by implementing gContactAddedCallback and setting body0->m_collisionFlags |= btCollisionObject::customMaterialCallback;
+inline btScalar calculateCombinedFriction(btScalar friction0,btScalar friction1)
+{
+ btScalar friction = friction0*friction1;
+
+ const btScalar MAX_FRICTION = btScalar(10.);
+
+ if (friction < -MAX_FRICTION)
+ friction = -MAX_FRICTION;
+ if (friction > MAX_FRICTION)
+ friction = MAX_FRICTION;
+ return friction;
+
+}
+
+inline btScalar calculateCombinedRestitution(btScalar restitution0,btScalar restitution1)
+{
+ return restitution0*restitution1;
+}
+
+
+
+ void SpuContactResult::setContactInfo(btPersistentManifold* spuManifold, ppu_address_t manifoldAddress,const btTransform& worldTrans0,const btTransform& worldTrans1, btScalar restitution0,btScalar restitution1, btScalar friction0,btScalar friction1, bool isSwapped)
+ {
+ //spu_printf("SpuContactResult::setContactInfo ManifoldAddress: %lu\n", manifoldAddress);
+ m_rootWorldTransform0 = worldTrans0;
+ m_rootWorldTransform1 = worldTrans1;
+ m_manifoldAddress = manifoldAddress;
+ m_spuManifold = spuManifold;
+
+ m_combinedFriction = calculateCombinedFriction(friction0,friction1);
+ m_combinedRestitution = calculateCombinedRestitution(restitution0,restitution1);
+ m_isSwapped = isSwapped;
+ }
+
+ void SpuContactResult::setShapeIdentifiersA(int partId0,int index0)
+ {
+
+ }
+
+ void SpuContactResult::setShapeIdentifiersB(int partId1,int index1)
+ {
+
+ }
+
+
+
+ ///return true if it requires a dma transfer back
+bool ManifoldResultAddContactPoint(const btVector3& normalOnBInWorld,
+ const btVector3& pointInWorld,
+ float depth,
+ btPersistentManifold* manifoldPtr,
+ btTransform& transA,
+ btTransform& transB,
+ btScalar combinedFriction,
+ btScalar combinedRestitution,
+ bool isSwapped)
+{
+
+// float contactTreshold = manifoldPtr->getContactBreakingThreshold();
+
+ //spu_printf("SPU: add contactpoint, depth:%f, contactTreshold %f, manifoldPtr %llx\n",depth,contactTreshold,manifoldPtr);
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("SPU: contactTreshold %f\n",contactTreshold);
+#endif //DEBUG_SPU_COLLISION_DETECTION
+ //if (depth > manifoldPtr->getContactBreakingThreshold())
+ // return false;
+
+ if (depth > manifoldPtr->getContactProcessingThreshold())
+ return false;
+
+
+
+ btVector3 pointA;
+ btVector3 localA;
+ btVector3 localB;
+ btVector3 normal;
+
+
+ if (isSwapped)
+ {
+ normal = normalOnBInWorld * -1;
+ pointA = pointInWorld + normal * depth;
+ localA = transA.invXform(pointA );
+ localB = transB.invXform(pointInWorld);
+ }
+ else
+ {
+ normal = normalOnBInWorld;
+ pointA = pointInWorld + normal * depth;
+ localA = transA.invXform(pointA );
+ localB = transB.invXform(pointInWorld);
+ }
+
+ btManifoldPoint newPt(localA,localB,normal,depth);
+ newPt.m_positionWorldOnA = pointA;
+ newPt.m_positionWorldOnB = pointInWorld;
+
+ newPt.m_combinedFriction = combinedFriction;
+ newPt.m_combinedRestitution = combinedRestitution;
+
+
+ int insertIndex = manifoldPtr->getCacheEntry(newPt);
+ if (insertIndex >= 0)
+ {
+ // we need to replace the current contact point, otherwise small errors will accumulate (spheres start rolling etc)
+ manifoldPtr->replaceContactPoint(newPt,insertIndex);
+ return true;
+
+ } else
+ {
+
+ /*
+ ///@todo: SPU callbacks, either immediate (local on the SPU), or deferred
+ //User can override friction and/or restitution
+ if (gContactAddedCallback &&
+ //and if either of the two bodies requires custom material
+ ((m_body0->m_collisionFlags & btCollisionObject::customMaterialCallback) ||
+ (m_body1->m_collisionFlags & btCollisionObject::customMaterialCallback)))
+ {
+ //experimental feature info, for per-triangle material etc.
+ (*gContactAddedCallback)(newPt,m_body0,m_partId0,m_index0,m_body1,m_partId1,m_index1);
+ }
+ */
+
+ manifoldPtr->addManifoldPoint(newPt);
+ return true;
+
+ }
+ return false;
+
+}
+
+
+void SpuContactResult::writeDoubleBufferedManifold(btPersistentManifold* lsManifold, btPersistentManifold* mmManifold)
+{
+ ///only write back the contact information on SPU. Other platforms avoid copying, and use the data in-place
+ ///see SpuFakeDma.cpp 'cellDmaLargeGetReadOnly'
+#if defined (__SPU__) || defined (USE_LIBSPE2)
+ memcpy(g_manifoldDmaExport.getFront(),lsManifold,sizeof(btPersistentManifold));
+
+ g_manifoldDmaExport.swapBuffers();
+ ppu_address_t mmAddr = (ppu_address_t)mmManifold;
+ g_manifoldDmaExport.backBufferDmaPut(mmAddr, sizeof(btPersistentManifold), DMA_TAG(9));
+ // Should there be any kind of wait here? What if somebody tries to use this tag again? What if we call this function again really soon?
+ //no, the swapBuffers does the wait
+#endif
+}
+
+void SpuContactResult::addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+{
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("*** SpuContactResult::addContactPoint: depth = %f\n",depth);
+ spu_printf("*** normal = %f,%f,%f\n",normalOnBInWorld.getX(),normalOnBInWorld.getY(),normalOnBInWorld.getZ());
+ spu_printf("*** position = %f,%f,%f\n",pointInWorld.getX(),pointInWorld.getY(),pointInWorld.getZ());
+#endif //DEBUG_SPU_COLLISION_DETECTION
+
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ // int sman = sizeof(rage::phManifold);
+// spu_printf("sizeof_manifold = %i\n",sman);
+#endif //DEBUG_SPU_COLLISION_DETECTION
+
+ btPersistentManifold* localManifold = m_spuManifold;
+
+ btVector3 normalB(normalOnBInWorld.getX(),normalOnBInWorld.getY(),normalOnBInWorld.getZ());
+ btVector3 pointWrld(pointInWorld.getX(),pointInWorld.getY(),pointInWorld.getZ());
+
+ //process the contact point
+ const bool retVal = ManifoldResultAddContactPoint(normalB,
+ pointWrld,
+ depth,
+ localManifold,
+ m_rootWorldTransform0,
+ m_rootWorldTransform1,
+ m_combinedFriction,
+ m_combinedRestitution,
+ m_isSwapped);
+ m_RequiresWriteBack = m_RequiresWriteBack || retVal;
+}
+
+void SpuContactResult::flush()
+{
+
+ if (m_spuManifold && m_spuManifold->getNumContacts())
+ {
+ m_spuManifold->refreshContactPoints(m_rootWorldTransform0,m_rootWorldTransform1);
+ m_RequiresWriteBack = true;
+ }
+
+
+ if (m_RequiresWriteBack)
+ {
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("SPU: Start SpuContactResult::flush (Put) DMA\n");
+ spu_printf("Num contacts:%d\n", m_spuManifold->getNumContacts());
+ spu_printf("Manifold address: %llu\n", m_manifoldAddress);
+#endif //DEBUG_SPU_COLLISION_DETECTION
+ // spu_printf("writeDoubleBufferedManifold\n");
+ writeDoubleBufferedManifold(m_spuManifold, (btPersistentManifold*)m_manifoldAddress);
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("SPU: Finished (Put) DMA\n");
+#endif //DEBUG_SPU_COLLISION_DETECTION
+ }
+ m_spuManifold = NULL;
+ m_RequiresWriteBack = false;
+}
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h
new file mode 100644
index 00000000..394f56dc
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h
@@ -0,0 +1,106 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef SPU_CONTACT_RESULT2_H
+#define SPU_CONTACT_RESULT2_H
+
+
+#ifndef _WIN32
+#include <stdint.h>
+#endif
+
+
+
+#include "../SpuDoubleBuffer.h"
+
+
+#include "LinearMath/btTransform.h"
+
+
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+#include "BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h"
+
+class btCollisionShape;
+
+
+struct SpuCollisionPairInput
+{
+ ppu_address_t m_collisionShapes[2];
+ btCollisionShape* m_spuCollisionShapes[2];
+
+ ppu_address_t m_persistentManifoldPtr;
+ btVector3 m_primitiveDimensions0;
+ btVector3 m_primitiveDimensions1;
+ int m_shapeType0;
+ int m_shapeType1;
+ float m_collisionMargin0;
+ float m_collisionMargin1;
+
+ btTransform m_worldTransform0;
+ btTransform m_worldTransform1;
+
+ bool m_isSwapped;
+ bool m_useEpa;
+};
+
+
+struct SpuClosestPointInput : public btDiscreteCollisionDetectorInterface::ClosestPointInput
+{
+ struct SpuConvexPolyhedronVertexData* m_convexVertexData[2];
+};
+
+///SpuContactResult exports the contact points using double-buffered DMA transfers, only when needed
+///So when an existing contact point is duplicated, no transfer/refresh is performed.
+class SpuContactResult : public btDiscreteCollisionDetectorInterface::Result
+{
+ btTransform m_rootWorldTransform0;
+ btTransform m_rootWorldTransform1;
+ ppu_address_t m_manifoldAddress;
+
+ btPersistentManifold* m_spuManifold;
+ bool m_RequiresWriteBack;
+ btScalar m_combinedFriction;
+ btScalar m_combinedRestitution;
+
+ bool m_isSwapped;
+
+ DoubleBuffer<btPersistentManifold, 1> g_manifoldDmaExport;
+
+ public:
+ SpuContactResult();
+ virtual ~SpuContactResult();
+
+ btPersistentManifold* GetSpuManifold() const
+ {
+ return m_spuManifold;
+ }
+
+ virtual void setShapeIdentifiersA(int partId0,int index0);
+ virtual void setShapeIdentifiersB(int partId1,int index1);
+
+ void setContactInfo(btPersistentManifold* spuManifold, ppu_address_t manifoldAddress,const btTransform& worldTrans0,const btTransform& worldTrans1, btScalar restitution0,btScalar restitution1, btScalar friction0,btScalar friction01, bool isSwapped);
+
+
+ void writeDoubleBufferedManifold(btPersistentManifold* lsManifold, btPersistentManifold* mmManifold);
+
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth);
+
+ void flush();
+};
+
+
+
+#endif //SPU_CONTACT_RESULT2_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h
new file mode 100644
index 00000000..449f1928
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h
@@ -0,0 +1,51 @@
+
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef SPU_CONVEX_PENETRATION_DEPTH_H
+#define SPU_CONVEX_PENETRATION_DEPTH_H
+
+
+
+class btStackAlloc;
+class btIDebugDraw;
+#include "BulletCollision/NarrowphaseCollision/btConvexPenetrationDepthSolver.h"
+
+#include "LinearMath/btTransform.h"
+
+
+///ConvexPenetrationDepthSolver provides an interface for penetration depth calculation.
+class SpuConvexPenetrationDepthSolver : public btConvexPenetrationDepthSolver
+{
+public:
+
+ virtual ~SpuConvexPenetrationDepthSolver() {};
+ virtual bool calcPenDepth( SpuVoronoiSimplexSolver& simplexSolver,
+ void* convexA,void* convexB,int shapeTypeA, int shapeTypeB, float marginA, float marginB,
+ btTransform& transA,const btTransform& transB,
+ btVector3& v, btVector3& pa, btVector3& pb,
+ class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc,
+ struct SpuConvexPolyhedronVertexData* convexVertexDataA,
+ struct SpuConvexPolyhedronVertexData* convexVertexDataB
+ ) const = 0;
+
+
+};
+
+
+
+#endif //SPU_CONVEX_PENETRATION_DEPTH_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp
new file mode 100644
index 00000000..e5e263c2
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp
@@ -0,0 +1,1412 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SpuGatheringCollisionTask.h"
+
+//#define DEBUG_SPU_COLLISION_DETECTION 1
+#include "../SpuDoubleBuffer.h"
+
+#include "../SpuCollisionTaskProcess.h"
+#include "../SpuGatheringCollisionDispatcher.h" //for SPU_BATCHSIZE_BROADPHASE_PAIRS
+
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "../SpuContactManifoldCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "SpuContactResult.h"
+#include "BulletCollision/CollisionShapes/btOptimizedBvh.h"
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionShapes/btConvexPointCloudShape.h"
+
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+
+#include "BulletCollision/CollisionShapes/btConvexShape.h"
+#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btConvexHullShape.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+
+#include "SpuMinkowskiPenetrationDepthSolver.h"
+//#include "SpuEpaPenetrationDepthSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+
+
+#include "boxBoxDistance.h"
+#include "BulletMultiThreaded/vectormath2bullet.h"
+#include "SpuCollisionShapes.h" //definition of SpuConvexPolyhedronVertexData
+#include "BulletCollision/CollisionDispatch/btBoxBoxDetector.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+
+#ifdef __SPU__
+///Software caching from the IBM Cell SDK, it reduces 25% SPU time for our test cases
+#ifndef USE_LIBSPE2
+//#define USE_SOFTWARE_CACHE 1
+#endif
+#endif //__SPU__
+
+int gSkippedCol = 0;
+int gProcessedCol = 0;
+
+////////////////////////////////////////////////
+/// software caching
+#if USE_SOFTWARE_CACHE
+#include <spu_intrinsics.h>
+#include <sys/spu_thread.h>
+#include <sys/spu_event.h>
+#include <stdint.h>
+#define SPE_CACHE_NWAY 4
+//#define SPE_CACHE_NSETS 32, 16
+#define SPE_CACHE_NSETS 8
+//#define SPE_CACHELINE_SIZE 512
+#define SPE_CACHELINE_SIZE 128
+#define SPE_CACHE_SET_TAGID(set) 15
+///make sure that spe_cache.h is below those defines!
+#include "../Extras/software_cache/cache/include/spe_cache.h"
+
+
+int g_CacheMisses=0;
+int g_CacheHits=0;
+
+#if 0 // Added to allow cache misses and hits to be tracked, change this to 1 to restore unmodified version
+#define spe_cache_read(ea) _spe_cache_lookup_xfer_wait_(ea, 0, 1)
+#else
+#define spe_cache_read(ea) \
+({ \
+ int set, idx, line, byte; \
+ _spe_cache_nway_lookup_(ea, set, idx); \
+ \
+ if (btUnlikely(idx < 0)) { \
+ ++g_CacheMisses; \
+ idx = _spe_cache_miss_(ea, set, -1); \
+ spu_writech(22, SPE_CACHE_SET_TAGMASK(set)); \
+ spu_mfcstat(MFC_TAG_UPDATE_ALL); \
+ } \
+ else \
+ { \
+ ++g_CacheHits; \
+ } \
+ line = _spe_cacheline_num_(set, idx); \
+ byte = _spe_cacheline_byte_offset_(ea); \
+ (void *) &spe_cache_mem[line + byte]; \
+})
+
+#endif
+
+#endif // USE_SOFTWARE_CACHE
+
+bool gUseEpa = false;
+
+#ifdef USE_SN_TUNER
+#include <LibSN_SPU.h>
+#endif //USE_SN_TUNER
+
+#if defined (__SPU__) && !defined (USE_LIBSPE2)
+#include <spu_printf.h>
+#elif defined (USE_LIBSPE2)
+#define spu_printf(a)
+#else
+#define IGNORE_ALIGNMENT 1
+#include <stdio.h>
+#include <stdlib.h>
+#define spu_printf printf
+
+#endif
+
+//int gNumConvexPoints0=0;
+
+///Make sure no destructors are called on this memory
+struct CollisionTask_LocalStoreMemory
+{
+ ///This CollisionTask_LocalStoreMemory is mainly used for the SPU version, using explicit DMA
+ ///Other platforms can use other memory programming models.
+
+ ATTRIBUTE_ALIGNED16(btBroadphasePair gBroadphasePairsBuffer[SPU_BATCHSIZE_BROADPHASE_PAIRS]);
+ DoubleBuffer<unsigned char, MIDPHASE_WORKUNIT_PAGE_SIZE> g_workUnitTaskBuffers;
+ ATTRIBUTE_ALIGNED16(char gSpuContactManifoldAlgoBuffer [sizeof(SpuContactManifoldCollisionAlgorithm)+16]);
+ ATTRIBUTE_ALIGNED16(char gColObj0Buffer [sizeof(btCollisionObject)+16]);
+ ATTRIBUTE_ALIGNED16(char gColObj1Buffer [sizeof(btCollisionObject)+16]);
+ ///we reserve 32bit integer indices, even though they might be 16bit
+ ATTRIBUTE_ALIGNED16(int spuIndices[16]);
+ btPersistentManifold gPersistentManifoldBuffer;
+ CollisionShape_LocalStoreMemory gCollisionShapes[2];
+ bvhMeshShape_LocalStoreMemory bvhShapeData;
+ SpuConvexPolyhedronVertexData convexVertexData[2];
+ CompoundShape_LocalStoreMemory compoundShapeData[2];
+
+ ///The following pointers might either point into this local store memory, or to the original/other memory locations.
+ ///See SpuFakeDma for implementation of cellDmaSmallGetReadOnly.
+ btCollisionObject* m_lsColObj0Ptr;
+ btCollisionObject* m_lsColObj1Ptr;
+ btBroadphasePair* m_pairsPointer;
+ btPersistentManifold* m_lsManifoldPtr;
+ SpuContactManifoldCollisionAlgorithm* m_lsCollisionAlgorithmPtr;
+
+ bool needsDmaPutContactManifoldAlgo;
+
+ btCollisionObject* getColObj0()
+ {
+ return m_lsColObj0Ptr;
+ }
+ btCollisionObject* getColObj1()
+ {
+ return m_lsColObj1Ptr;
+ }
+
+
+ btBroadphasePair* getBroadphasePairPtr()
+ {
+ return m_pairsPointer;
+ }
+
+ SpuContactManifoldCollisionAlgorithm* getlocalCollisionAlgorithm()
+ {
+ return m_lsCollisionAlgorithmPtr;
+ }
+
+ btPersistentManifold* getContactManifoldPtr()
+ {
+ return m_lsManifoldPtr;
+ }
+};
+
+
+#if defined(__CELLOS_LV2__) || defined(USE_LIBSPE2)
+
+ATTRIBUTE_ALIGNED16(CollisionTask_LocalStoreMemory gLocalStoreMemory);
+
+void* createCollisionLocalStoreMemory()
+{
+ return &gLocalStoreMemory;
+}
+#else
+void* createCollisionLocalStoreMemory()
+{
+ return new CollisionTask_LocalStoreMemory;
+}
+
+#endif
+
+void ProcessSpuConvexConvexCollision(SpuCollisionPairInput* wuInput, CollisionTask_LocalStoreMemory* lsMemPtr, SpuContactResult& spuContacts);
+
+
+SIMD_FORCE_INLINE void small_cache_read(void* buffer, ppu_address_t ea, size_t size)
+{
+#if USE_SOFTWARE_CACHE
+ // Check for alignment requirements. We need to make sure the entire request fits within one cache line,
+ // so the first and last bytes should fall on the same cache line
+ btAssert((ea & ~SPE_CACHELINE_MASK) == ((ea + size - 1) & ~SPE_CACHELINE_MASK));
+
+ void* ls = spe_cache_read(ea);
+ memcpy(buffer, ls, size);
+#else
+ stallingUnalignedDmaSmallGet(buffer,ea,size);
+#endif
+}
+
+SIMD_FORCE_INLINE void small_cache_read_triple( void* ls0, ppu_address_t ea0,
+ void* ls1, ppu_address_t ea1,
+ void* ls2, ppu_address_t ea2,
+ size_t size)
+{
+ btAssert(size<16);
+ ATTRIBUTE_ALIGNED16(char tmpBuffer0[32]);
+ ATTRIBUTE_ALIGNED16(char tmpBuffer1[32]);
+ ATTRIBUTE_ALIGNED16(char tmpBuffer2[32]);
+
+ uint32_t i;
+
+
+ ///make sure last 4 bits are the same, for cellDmaSmallGet
+ char* localStore0 = (char*)ls0;
+ uint32_t last4BitsOffset = ea0 & 0x0f;
+ char* tmpTarget0 = tmpBuffer0 + last4BitsOffset;
+#ifdef __SPU__
+ cellDmaSmallGet(tmpTarget0,ea0,size,DMA_TAG(1),0,0);
+#else
+ tmpTarget0 = (char*)cellDmaSmallGetReadOnly(tmpTarget0,ea0,size,DMA_TAG(1),0,0);
+#endif
+
+
+ char* localStore1 = (char*)ls1;
+ last4BitsOffset = ea1 & 0x0f;
+ char* tmpTarget1 = tmpBuffer1 + last4BitsOffset;
+#ifdef __SPU__
+ cellDmaSmallGet(tmpTarget1,ea1,size,DMA_TAG(1),0,0);
+#else
+ tmpTarget1 = (char*)cellDmaSmallGetReadOnly(tmpTarget1,ea1,size,DMA_TAG(1),0,0);
+#endif
+
+ char* localStore2 = (char*)ls2;
+ last4BitsOffset = ea2 & 0x0f;
+ char* tmpTarget2 = tmpBuffer2 + last4BitsOffset;
+#ifdef __SPU__
+ cellDmaSmallGet(tmpTarget2,ea2,size,DMA_TAG(1),0,0);
+#else
+ tmpTarget2 = (char*)cellDmaSmallGetReadOnly(tmpTarget2,ea2,size,DMA_TAG(1),0,0);
+#endif
+
+
+ cellDmaWaitTagStatusAll( DMA_MASK(1) );
+
+ //this is slowish, perhaps memcpy on SPU is smarter?
+ for (i=0; btLikely( i<size );i++)
+ {
+ localStore0[i] = tmpTarget0[i];
+ localStore1[i] = tmpTarget1[i];
+ localStore2[i] = tmpTarget2[i];
+ }
+
+
+}
+
+
+
+
+class spuNodeCallback : public btNodeOverlapCallback
+{
+ SpuCollisionPairInput* m_wuInput;
+ SpuContactResult& m_spuContacts;
+ CollisionTask_LocalStoreMemory* m_lsMemPtr;
+ ATTRIBUTE_ALIGNED16(btTriangleShape) m_tmpTriangleShape;
+
+ ATTRIBUTE_ALIGNED16(btVector3 spuTriangleVertices[3]);
+ ATTRIBUTE_ALIGNED16(btScalar spuUnscaledVertex[4]);
+
+
+
+public:
+ spuNodeCallback(SpuCollisionPairInput* wuInput, CollisionTask_LocalStoreMemory* lsMemPtr,SpuContactResult& spuContacts)
+ : m_wuInput(wuInput),
+ m_spuContacts(spuContacts),
+ m_lsMemPtr(lsMemPtr)
+ {
+ }
+
+ virtual void processNode(int subPart, int triangleIndex)
+ {
+ ///Create a triangle on the stack, call process collision, with GJK
+ ///DMA the vertices, can benefit from software caching
+
+ // spu_printf("processNode with triangleIndex %d\n",triangleIndex);
+
+ if (m_lsMemPtr->bvhShapeData.gIndexMesh.m_indexType == PHY_SHORT)
+ {
+ unsigned short int* indexBasePtr = (unsigned short int*)(m_lsMemPtr->bvhShapeData.gIndexMesh.m_triangleIndexBase+triangleIndex*m_lsMemPtr->bvhShapeData.gIndexMesh.m_triangleIndexStride);
+ ATTRIBUTE_ALIGNED16(unsigned short int tmpIndices[3]);
+
+ small_cache_read_triple(&tmpIndices[0],(ppu_address_t)&indexBasePtr[0],
+ &tmpIndices[1],(ppu_address_t)&indexBasePtr[1],
+ &tmpIndices[2],(ppu_address_t)&indexBasePtr[2],
+ sizeof(unsigned short int));
+
+ m_lsMemPtr->spuIndices[0] = int(tmpIndices[0]);
+ m_lsMemPtr->spuIndices[1] = int(tmpIndices[1]);
+ m_lsMemPtr->spuIndices[2] = int(tmpIndices[2]);
+ } else
+ {
+ unsigned int* indexBasePtr = (unsigned int*)(m_lsMemPtr->bvhShapeData.gIndexMesh.m_triangleIndexBase+triangleIndex*m_lsMemPtr->bvhShapeData.gIndexMesh.m_triangleIndexStride);
+
+ small_cache_read_triple(&m_lsMemPtr->spuIndices[0],(ppu_address_t)&indexBasePtr[0],
+ &m_lsMemPtr->spuIndices[1],(ppu_address_t)&indexBasePtr[1],
+ &m_lsMemPtr->spuIndices[2],(ppu_address_t)&indexBasePtr[2],
+ sizeof(int));
+ }
+
+ // spu_printf("SPU index0=%d ,",spuIndices[0]);
+ // spu_printf("SPU index1=%d ,",spuIndices[1]);
+ // spu_printf("SPU index2=%d ,",spuIndices[2]);
+ // spu_printf("SPU: indexBasePtr=%llx\n",indexBasePtr);
+
+ const btVector3& meshScaling = m_lsMemPtr->bvhShapeData.gTriangleMeshInterfacePtr->getScaling();
+ for (int j=2;btLikely( j>=0 );j--)
+ {
+ int graphicsindex = m_lsMemPtr->spuIndices[j];
+
+ // spu_printf("SPU index=%d ,",graphicsindex);
+ btScalar* graphicsbasePtr = (btScalar*)(m_lsMemPtr->bvhShapeData.gIndexMesh.m_vertexBase+graphicsindex*m_lsMemPtr->bvhShapeData.gIndexMesh.m_vertexStride);
+ // spu_printf("SPU graphicsbasePtr=%llx\n",graphicsbasePtr);
+
+
+ ///handle un-aligned vertices...
+
+ //another DMA for each vertex
+ small_cache_read_triple(&spuUnscaledVertex[0],(ppu_address_t)&graphicsbasePtr[0],
+ &spuUnscaledVertex[1],(ppu_address_t)&graphicsbasePtr[1],
+ &spuUnscaledVertex[2],(ppu_address_t)&graphicsbasePtr[2],
+ sizeof(btScalar));
+
+ m_tmpTriangleShape.getVertexPtr(j).setValue(spuUnscaledVertex[0]*meshScaling.getX(),
+ spuUnscaledVertex[1]*meshScaling.getY(),
+ spuUnscaledVertex[2]*meshScaling.getZ());
+
+ // spu_printf("SPU:triangle vertices:%f,%f,%f\n",spuTriangleVertices[j].x(),spuTriangleVertices[j].y(),spuTriangleVertices[j].z());
+ }
+
+
+ SpuCollisionPairInput triangleConcaveInput(*m_wuInput);
+// triangleConcaveInput.m_spuCollisionShapes[1] = &spuTriangleVertices[0];
+ triangleConcaveInput.m_spuCollisionShapes[1] = &m_tmpTriangleShape;
+ triangleConcaveInput.m_shapeType1 = TRIANGLE_SHAPE_PROXYTYPE;
+
+ m_spuContacts.setShapeIdentifiersB(subPart,triangleIndex);
+
+ // m_spuContacts.flush();
+
+ ProcessSpuConvexConvexCollision(&triangleConcaveInput, m_lsMemPtr,m_spuContacts);
+ ///this flush should be automatic
+ // m_spuContacts.flush();
+ }
+
+};
+
+
+
+void btConvexPlaneCollideSingleContact (SpuCollisionPairInput* wuInput,CollisionTask_LocalStoreMemory* lsMemPtr,SpuContactResult& spuContacts)
+{
+
+ btConvexShape* convexShape = (btConvexShape*) wuInput->m_spuCollisionShapes[0];
+ btStaticPlaneShape* planeShape = (btStaticPlaneShape*) wuInput->m_spuCollisionShapes[1];
+
+ bool hasCollision = false;
+ const btVector3& planeNormal = planeShape->getPlaneNormal();
+ const btScalar& planeConstant = planeShape->getPlaneConstant();
+
+
+ btTransform convexWorldTransform = wuInput->m_worldTransform0;
+ btTransform convexInPlaneTrans;
+ convexInPlaneTrans= wuInput->m_worldTransform1.inverse() * convexWorldTransform;
+ btTransform planeInConvex;
+ planeInConvex= convexWorldTransform.inverse() * wuInput->m_worldTransform1;
+
+ //btVector3 vtx = convexShape->localGetSupportVertexWithoutMarginNonVirtual(planeInConvex.getBasis()*-planeNormal);
+ btVector3 vtx = convexShape->localGetSupportVertexNonVirtual(planeInConvex.getBasis()*-planeNormal);
+
+ btVector3 vtxInPlane = convexInPlaneTrans(vtx);
+ btScalar distance = (planeNormal.dot(vtxInPlane) - planeConstant);
+
+ btVector3 vtxInPlaneProjected = vtxInPlane - distance*planeNormal;
+ btVector3 vtxInPlaneWorld = wuInput->m_worldTransform1 * vtxInPlaneProjected;
+
+ hasCollision = distance < lsMemPtr->getContactManifoldPtr()->getContactBreakingThreshold();
+ //resultOut->setPersistentManifold(m_manifoldPtr);
+ if (hasCollision)
+ {
+ /// report a contact. internally this will be kept persistent, and contact reduction is done
+ btVector3 normalOnSurfaceB =wuInput->m_worldTransform1.getBasis() * planeNormal;
+ btVector3 pOnB = vtxInPlaneWorld;
+ spuContacts.addContactPoint(normalOnSurfaceB,pOnB,distance);
+ }
+}
+
+void ProcessConvexPlaneSpuCollision(SpuCollisionPairInput* wuInput, CollisionTask_LocalStoreMemory* lsMemPtr, SpuContactResult& spuContacts)
+{
+
+ register int dmaSize = 0;
+ register ppu_address_t dmaPpuAddress2;
+ btPersistentManifold* manifold = (btPersistentManifold*)wuInput->m_persistentManifoldPtr;
+
+ ///DMA in the vertices for convex shapes
+ ATTRIBUTE_ALIGNED16(char convexHullShape0[sizeof(btConvexHullShape)]);
+ ATTRIBUTE_ALIGNED16(char convexHullShape1[sizeof(btConvexHullShape)]);
+
+ if ( btLikely( wuInput->m_shapeType0== CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ // spu_printf("SPU: DMA btConvexHullShape\n");
+
+ dmaSize = sizeof(btConvexHullShape);
+ dmaPpuAddress2 = wuInput->m_collisionShapes[0];
+
+ cellDmaGet(&convexHullShape0, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+ //cellDmaWaitTagStatusAll(DMA_MASK(1));
+ }
+
+ if ( btLikely( wuInput->m_shapeType1 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ // spu_printf("SPU: DMA btConvexHullShape\n");
+ dmaSize = sizeof(btConvexHullShape);
+ dmaPpuAddress2 = wuInput->m_collisionShapes[1];
+ cellDmaGet(&convexHullShape1, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+ //cellDmaWaitTagStatusAll(DMA_MASK(1));
+ }
+
+ if ( btLikely( wuInput->m_shapeType0 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ dmaConvexVertexData (&lsMemPtr->convexVertexData[0], (btConvexHullShape*)&convexHullShape0);
+ lsMemPtr->convexVertexData[0].gSpuConvexShapePtr = wuInput->m_spuCollisionShapes[0];
+ }
+
+
+ if ( btLikely( wuInput->m_shapeType1 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ dmaConvexVertexData (&lsMemPtr->convexVertexData[1], (btConvexHullShape*)&convexHullShape1);
+ lsMemPtr->convexVertexData[1].gSpuConvexShapePtr = wuInput->m_spuCollisionShapes[1];
+ }
+
+
+ btConvexPointCloudShape cpc0,cpc1;
+
+ if ( btLikely( wuInput->m_shapeType0 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(2));
+ lsMemPtr->convexVertexData[0].gConvexPoints = &lsMemPtr->convexVertexData[0].g_convexPointBuffer[0];
+ btConvexHullShape* ch = (btConvexHullShape*)wuInput->m_spuCollisionShapes[0];
+ const btVector3& localScaling = ch->getLocalScalingNV();
+ cpc0.setPoints(lsMemPtr->convexVertexData[0].gConvexPoints,lsMemPtr->convexVertexData[0].gNumConvexPoints,false,localScaling);
+ wuInput->m_spuCollisionShapes[0] = &cpc0;
+ }
+
+ if ( btLikely( wuInput->m_shapeType1 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(2));
+ lsMemPtr->convexVertexData[1].gConvexPoints = &lsMemPtr->convexVertexData[1].g_convexPointBuffer[0];
+ btConvexHullShape* ch = (btConvexHullShape*)wuInput->m_spuCollisionShapes[1];
+ const btVector3& localScaling = ch->getLocalScalingNV();
+ cpc1.setPoints(lsMemPtr->convexVertexData[1].gConvexPoints,lsMemPtr->convexVertexData[1].gNumConvexPoints,false,localScaling);
+ wuInput->m_spuCollisionShapes[1] = &cpc1;
+
+ }
+
+
+// const btConvexShape* shape0Ptr = (const btConvexShape*)wuInput->m_spuCollisionShapes[0];
+// const btConvexShape* shape1Ptr = (const btConvexShape*)wuInput->m_spuCollisionShapes[1];
+// int shapeType0 = wuInput->m_shapeType0;
+// int shapeType1 = wuInput->m_shapeType1;
+ float marginA = wuInput->m_collisionMargin0;
+ float marginB = wuInput->m_collisionMargin1;
+
+ SpuClosestPointInput cpInput;
+ cpInput.m_convexVertexData[0] = &lsMemPtr->convexVertexData[0];
+ cpInput.m_convexVertexData[1] = &lsMemPtr->convexVertexData[1];
+ cpInput.m_transformA = wuInput->m_worldTransform0;
+ cpInput.m_transformB = wuInput->m_worldTransform1;
+ float sumMargin = (marginA+marginB+lsMemPtr->getContactManifoldPtr()->getContactBreakingThreshold());
+ cpInput.m_maximumDistanceSquared = sumMargin * sumMargin;
+
+ ppu_address_t manifoldAddress = (ppu_address_t)manifold;
+
+ btPersistentManifold* spuManifold=lsMemPtr->getContactManifoldPtr();
+ //spuContacts.setContactInfo(spuManifold,manifoldAddress,wuInput->m_worldTransform0,wuInput->m_worldTransform1,wuInput->m_isSwapped);
+ spuContacts.setContactInfo(spuManifold,manifoldAddress,lsMemPtr->getColObj0()->getWorldTransform(),
+ lsMemPtr->getColObj1()->getWorldTransform(),
+ lsMemPtr->getColObj0()->getRestitution(),lsMemPtr->getColObj1()->getRestitution(),
+ lsMemPtr->getColObj0()->getFriction(),lsMemPtr->getColObj1()->getFriction(),
+ wuInput->m_isSwapped);
+
+
+ btConvexPlaneCollideSingleContact(wuInput,lsMemPtr,spuContacts);
+
+
+
+
+}
+
+
+
+
+////////////////////////
+/// Convex versus Concave triangle mesh collision detection (handles concave triangle mesh versus sphere, box, cylinder, triangle, cone, convex polyhedron etc)
+///////////////////
+void ProcessConvexConcaveSpuCollision(SpuCollisionPairInput* wuInput, CollisionTask_LocalStoreMemory* lsMemPtr, SpuContactResult& spuContacts)
+{
+ //order: first collision shape is convex, second concave. m_isSwapped is true, if the original order was opposite
+
+ btBvhTriangleMeshShape* trimeshShape = (btBvhTriangleMeshShape*)wuInput->m_spuCollisionShapes[1];
+ //need the mesh interface, for access to triangle vertices
+ dmaBvhShapeData (&lsMemPtr->bvhShapeData, trimeshShape);
+
+ btVector3 aabbMin(-1,-400,-1);
+ btVector3 aabbMax(1,400,1);
+
+
+ //recalc aabbs
+ btTransform convexInTriangleSpace;
+ convexInTriangleSpace = wuInput->m_worldTransform1.inverse() * wuInput->m_worldTransform0;
+ btConvexInternalShape* convexShape = (btConvexInternalShape*)wuInput->m_spuCollisionShapes[0];
+
+ computeAabb (aabbMin, aabbMax, convexShape, wuInput->m_collisionShapes[0], wuInput->m_shapeType0, convexInTriangleSpace);
+
+
+ //CollisionShape* triangleShape = static_cast<btCollisionShape*>(triBody->m_collisionShape);
+ //convexShape->getAabb(convexInTriangleSpace,m_aabbMin,m_aabbMax);
+
+ // btScalar extraMargin = collisionMarginTriangle;
+ // btVector3 extra(extraMargin,extraMargin,extraMargin);
+ // aabbMax += extra;
+ // aabbMin -= extra;
+
+ ///quantize query AABB
+ unsigned short int quantizedQueryAabbMin[3];
+ unsigned short int quantizedQueryAabbMax[3];
+ lsMemPtr->bvhShapeData.getOptimizedBvh()->quantizeWithClamp(quantizedQueryAabbMin,aabbMin,0);
+ lsMemPtr->bvhShapeData.getOptimizedBvh()->quantizeWithClamp(quantizedQueryAabbMax,aabbMax,1);
+
+ QuantizedNodeArray& nodeArray = lsMemPtr->bvhShapeData.getOptimizedBvh()->getQuantizedNodeArray();
+ //spu_printf("SPU: numNodes = %d\n",nodeArray.size());
+
+ BvhSubtreeInfoArray& subTrees = lsMemPtr->bvhShapeData.getOptimizedBvh()->getSubtreeInfoArray();
+
+
+ spuNodeCallback nodeCallback(wuInput,lsMemPtr,spuContacts);
+ IndexedMeshArray& indexArray = lsMemPtr->bvhShapeData.gTriangleMeshInterfacePtr->getIndexedMeshArray();
+ //spu_printf("SPU:indexArray.size() = %d\n",indexArray.size());
+
+ // spu_printf("SPU: numSubTrees = %d\n",subTrees.size());
+ //not likely to happen
+ if (subTrees.size() && indexArray.size() == 1)
+ {
+ ///DMA in the index info
+ dmaBvhIndexedMesh (&lsMemPtr->bvhShapeData.gIndexMesh, indexArray, 0 /* index into indexArray */, 1 /* dmaTag */);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ //display the headers
+ int numBatch = subTrees.size();
+ for (int i=0;i<numBatch;)
+ {
+ //@todo- can reorder DMA transfers for less stall
+ int remaining = subTrees.size() - i;
+ int nextBatch = remaining < MAX_SPU_SUBTREE_HEADERS ? remaining : MAX_SPU_SUBTREE_HEADERS;
+
+ dmaBvhSubTreeHeaders (&lsMemPtr->bvhShapeData.gSubtreeHeaders[0], (ppu_address_t)(&subTrees[i]), nextBatch, 1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+
+ // spu_printf("nextBatch = %d\n",nextBatch);
+
+ for (int j=0;j<nextBatch;j++)
+ {
+ const btBvhSubtreeInfo& subtree = lsMemPtr->bvhShapeData.gSubtreeHeaders[j];
+
+ unsigned int overlap = spuTestQuantizedAabbAgainstQuantizedAabb(quantizedQueryAabbMin,quantizedQueryAabbMax,subtree.m_quantizedAabbMin,subtree.m_quantizedAabbMax);
+ if (overlap)
+ {
+ btAssert(subtree.m_subtreeSize);
+
+ //dma the actual nodes of this subtree
+ dmaBvhSubTreeNodes (&lsMemPtr->bvhShapeData.gSubtreeNodes[0], subtree, nodeArray, 2);
+ cellDmaWaitTagStatusAll(DMA_MASK(2));
+
+ /* Walk this subtree */
+ spuWalkStacklessQuantizedTree(&nodeCallback,quantizedQueryAabbMin,quantizedQueryAabbMax,
+ &lsMemPtr->bvhShapeData.gSubtreeNodes[0],
+ 0,
+ subtree.m_subtreeSize);
+ }
+ // spu_printf("subtreeSize = %d\n",gSubtreeHeaders[j].m_subtreeSize);
+ }
+
+ // unsigned short int m_quantizedAabbMin[3];
+ // unsigned short int m_quantizedAabbMax[3];
+ // int m_rootNodeIndex;
+ // int m_subtreeSize;
+ i+=nextBatch;
+ }
+
+ //pre-fetch first tree, then loop and double buffer
+ }
+
+}
+
+
+int stats[11]={0,0,0,0,0,0,0,0,0,0,0};
+int degenerateStats[11]={0,0,0,0,0,0,0,0,0,0,0};
+
+
+////////////////////////
+/// Convex versus Convex collision detection (handles collision between sphere, box, cylinder, triangle, cone, convex polyhedron etc)
+///////////////////
+void ProcessSpuConvexConvexCollision(SpuCollisionPairInput* wuInput, CollisionTask_LocalStoreMemory* lsMemPtr, SpuContactResult& spuContacts)
+{
+ register int dmaSize;
+ register ppu_address_t dmaPpuAddress2;
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ //spu_printf("SPU: ProcessSpuConvexConvexCollision\n");
+#endif //DEBUG_SPU_COLLISION_DETECTION
+ //CollisionShape* shape0 = (CollisionShape*)wuInput->m_collisionShapes[0];
+ //CollisionShape* shape1 = (CollisionShape*)wuInput->m_collisionShapes[1];
+ btPersistentManifold* manifold = (btPersistentManifold*)wuInput->m_persistentManifoldPtr;
+
+ bool genericGjk = true;
+
+ if (genericGjk)
+ {
+ //try generic GJK
+
+
+
+ //SpuConvexPenetrationDepthSolver* penetrationSolver=0;
+ btVoronoiSimplexSolver simplexSolver;
+ btGjkEpaPenetrationDepthSolver epaPenetrationSolver2;
+
+ btConvexPenetrationDepthSolver* penetrationSolver = &epaPenetrationSolver2;
+
+ //SpuMinkowskiPenetrationDepthSolver minkowskiPenetrationSolver;
+#ifdef ENABLE_EPA
+ if (gUseEpa)
+ {
+ penetrationSolver = &epaPenetrationSolver2;
+ } else
+#endif
+ {
+ //penetrationSolver = &minkowskiPenetrationSolver;
+ }
+
+
+ ///DMA in the vertices for convex shapes
+ ATTRIBUTE_ALIGNED16(char convexHullShape0[sizeof(btConvexHullShape)]);
+ ATTRIBUTE_ALIGNED16(char convexHullShape1[sizeof(btConvexHullShape)]);
+
+ if ( btLikely( wuInput->m_shapeType0== CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ // spu_printf("SPU: DMA btConvexHullShape\n");
+
+ dmaSize = sizeof(btConvexHullShape);
+ dmaPpuAddress2 = wuInput->m_collisionShapes[0];
+
+ cellDmaGet(&convexHullShape0, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+ //cellDmaWaitTagStatusAll(DMA_MASK(1));
+ }
+
+ if ( btLikely( wuInput->m_shapeType1 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ // spu_printf("SPU: DMA btConvexHullShape\n");
+ dmaSize = sizeof(btConvexHullShape);
+ dmaPpuAddress2 = wuInput->m_collisionShapes[1];
+ cellDmaGet(&convexHullShape1, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+ //cellDmaWaitTagStatusAll(DMA_MASK(1));
+ }
+
+ if ( btLikely( wuInput->m_shapeType0 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ dmaConvexVertexData (&lsMemPtr->convexVertexData[0], (btConvexHullShape*)&convexHullShape0);
+ lsMemPtr->convexVertexData[0].gSpuConvexShapePtr = wuInput->m_spuCollisionShapes[0];
+ }
+
+
+ if ( btLikely( wuInput->m_shapeType1 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ dmaConvexVertexData (&lsMemPtr->convexVertexData[1], (btConvexHullShape*)&convexHullShape1);
+ lsMemPtr->convexVertexData[1].gSpuConvexShapePtr = wuInput->m_spuCollisionShapes[1];
+ }
+
+
+ btConvexPointCloudShape cpc0,cpc1;
+
+ if ( btLikely( wuInput->m_shapeType0 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(2));
+ lsMemPtr->convexVertexData[0].gConvexPoints = &lsMemPtr->convexVertexData[0].g_convexPointBuffer[0];
+ btConvexHullShape* ch = (btConvexHullShape*)wuInput->m_spuCollisionShapes[0];
+ const btVector3& localScaling = ch->getLocalScalingNV();
+ cpc0.setPoints(lsMemPtr->convexVertexData[0].gConvexPoints,lsMemPtr->convexVertexData[0].gNumConvexPoints,false,localScaling);
+ wuInput->m_spuCollisionShapes[0] = &cpc0;
+ }
+
+ if ( btLikely( wuInput->m_shapeType1 == CONVEX_HULL_SHAPE_PROXYTYPE ) )
+ {
+ cellDmaWaitTagStatusAll(DMA_MASK(2));
+ lsMemPtr->convexVertexData[1].gConvexPoints = &lsMemPtr->convexVertexData[1].g_convexPointBuffer[0];
+ btConvexHullShape* ch = (btConvexHullShape*)wuInput->m_spuCollisionShapes[1];
+ const btVector3& localScaling = ch->getLocalScalingNV();
+ cpc1.setPoints(lsMemPtr->convexVertexData[1].gConvexPoints,lsMemPtr->convexVertexData[1].gNumConvexPoints,false,localScaling);
+ wuInput->m_spuCollisionShapes[1] = &cpc1;
+
+ }
+
+
+ const btConvexShape* shape0Ptr = (const btConvexShape*)wuInput->m_spuCollisionShapes[0];
+ const btConvexShape* shape1Ptr = (const btConvexShape*)wuInput->m_spuCollisionShapes[1];
+ int shapeType0 = wuInput->m_shapeType0;
+ int shapeType1 = wuInput->m_shapeType1;
+ float marginA = wuInput->m_collisionMargin0;
+ float marginB = wuInput->m_collisionMargin1;
+
+ SpuClosestPointInput cpInput;
+ cpInput.m_convexVertexData[0] = &lsMemPtr->convexVertexData[0];
+ cpInput.m_convexVertexData[1] = &lsMemPtr->convexVertexData[1];
+ cpInput.m_transformA = wuInput->m_worldTransform0;
+ cpInput.m_transformB = wuInput->m_worldTransform1;
+ float sumMargin = (marginA+marginB+lsMemPtr->getContactManifoldPtr()->getContactBreakingThreshold());
+ cpInput.m_maximumDistanceSquared = sumMargin * sumMargin;
+
+ ppu_address_t manifoldAddress = (ppu_address_t)manifold;
+
+ btPersistentManifold* spuManifold=lsMemPtr->getContactManifoldPtr();
+ //spuContacts.setContactInfo(spuManifold,manifoldAddress,wuInput->m_worldTransform0,wuInput->m_worldTransform1,wuInput->m_isSwapped);
+ spuContacts.setContactInfo(spuManifold,manifoldAddress,lsMemPtr->getColObj0()->getWorldTransform(),
+ lsMemPtr->getColObj1()->getWorldTransform(),
+ lsMemPtr->getColObj0()->getRestitution(),lsMemPtr->getColObj1()->getRestitution(),
+ lsMemPtr->getColObj0()->getFriction(),lsMemPtr->getColObj1()->getFriction(),
+ wuInput->m_isSwapped);
+
+ {
+ btGjkPairDetector gjk(shape0Ptr,shape1Ptr,shapeType0,shapeType1,marginA,marginB,&simplexSolver,penetrationSolver);//&vsSolver,penetrationSolver);
+ gjk.getClosestPoints(cpInput,spuContacts,0);//,debugDraw);
+
+ stats[gjk.m_lastUsedMethod]++;
+ degenerateStats[gjk.m_degenerateSimplex]++;
+
+#ifdef USE_SEPDISTANCE_UTIL
+ btScalar sepDist = gjk.getCachedSeparatingDistance()+spuManifold->getContactBreakingThreshold();
+ lsMemPtr->getlocalCollisionAlgorithm()->m_sepDistance.initSeparatingDistance(gjk.getCachedSeparatingAxis(),sepDist,wuInput->m_worldTransform0,wuInput->m_worldTransform1);
+ lsMemPtr->needsDmaPutContactManifoldAlgo = true;
+#endif //USE_SEPDISTANCE_UTIL
+
+ }
+
+ }
+
+
+}
+
+
+template<typename T> void DoSwap(T& a, T& b)
+{
+ char tmp[sizeof(T)];
+ memcpy(tmp, &a, sizeof(T));
+ memcpy(&a, &b, sizeof(T));
+ memcpy(&b, tmp, sizeof(T));
+}
+
+SIMD_FORCE_INLINE void dmaAndSetupCollisionObjects(SpuCollisionPairInput& collisionPairInput, CollisionTask_LocalStoreMemory& lsMem)
+{
+ register int dmaSize;
+ register ppu_address_t dmaPpuAddress2;
+
+ dmaSize = sizeof(btCollisionObject);//btTransform);
+ dmaPpuAddress2 = /*collisionPairInput.m_isSwapped ? (ppu_address_t)lsMem.gProxyPtr1->m_clientObject :*/ (ppu_address_t)lsMem.getlocalCollisionAlgorithm()->getCollisionObject0();
+ lsMem.m_lsColObj0Ptr = (btCollisionObject*)cellDmaGetReadOnly(&lsMem.gColObj0Buffer, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+
+ dmaSize = sizeof(btCollisionObject);//btTransform);
+ dmaPpuAddress2 = /*collisionPairInput.m_isSwapped ? (ppu_address_t)lsMem.gProxyPtr0->m_clientObject :*/ (ppu_address_t)lsMem.getlocalCollisionAlgorithm()->getCollisionObject1();
+ lsMem.m_lsColObj1Ptr = (btCollisionObject*)cellDmaGetReadOnly(&lsMem.gColObj1Buffer, dmaPpuAddress2 , dmaSize, DMA_TAG(2), 0, 0);
+
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+
+ btCollisionObject* ob0 = lsMem.getColObj0();
+ btCollisionObject* ob1 = lsMem.getColObj1();
+
+ collisionPairInput.m_worldTransform0 = ob0->getWorldTransform();
+ collisionPairInput.m_worldTransform1 = ob1->getWorldTransform();
+}
+
+
+
+void handleCollisionPair(SpuCollisionPairInput& collisionPairInput, CollisionTask_LocalStoreMemory& lsMem,
+ SpuContactResult &spuContacts,
+ ppu_address_t collisionShape0Ptr, void* collisionShape0Loc,
+ ppu_address_t collisionShape1Ptr, void* collisionShape1Loc, bool dmaShapes = true)
+{
+
+ if (btBroadphaseProxy::isConvex(collisionPairInput.m_shapeType0)
+ && btBroadphaseProxy::isConvex(collisionPairInput.m_shapeType1))
+ {
+ if (dmaShapes)
+ {
+ dmaCollisionShape (collisionShape0Loc, collisionShape0Ptr, 1, collisionPairInput.m_shapeType0);
+ dmaCollisionShape (collisionShape1Loc, collisionShape1Ptr, 2, collisionPairInput.m_shapeType1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+ }
+
+ btConvexInternalShape* spuConvexShape0 = (btConvexInternalShape*)collisionShape0Loc;
+ btConvexInternalShape* spuConvexShape1 = (btConvexInternalShape*)collisionShape1Loc;
+
+ btVector3 dim0 = spuConvexShape0->getImplicitShapeDimensions();
+ btVector3 dim1 = spuConvexShape1->getImplicitShapeDimensions();
+
+ collisionPairInput.m_primitiveDimensions0 = dim0;
+ collisionPairInput.m_primitiveDimensions1 = dim1;
+ collisionPairInput.m_collisionShapes[0] = collisionShape0Ptr;
+ collisionPairInput.m_collisionShapes[1] = collisionShape1Ptr;
+ collisionPairInput.m_spuCollisionShapes[0] = spuConvexShape0;
+ collisionPairInput.m_spuCollisionShapes[1] = spuConvexShape1;
+ ProcessSpuConvexConvexCollision(&collisionPairInput,&lsMem,spuContacts);
+ }
+ else if (btBroadphaseProxy::isCompound(collisionPairInput.m_shapeType0) &&
+ btBroadphaseProxy::isCompound(collisionPairInput.m_shapeType1))
+ {
+ //snPause();
+
+ dmaCollisionShape (collisionShape0Loc, collisionShape0Ptr, 1, collisionPairInput.m_shapeType0);
+ dmaCollisionShape (collisionShape1Loc, collisionShape1Ptr, 2, collisionPairInput.m_shapeType1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+
+ // Both are compounds, do N^2 CD for now
+ ///@todo: add some AABB-based pruning (probably not -> slower)
+
+ btCompoundShape* spuCompoundShape0 = (btCompoundShape*)collisionShape0Loc;
+ btCompoundShape* spuCompoundShape1 = (btCompoundShape*)collisionShape1Loc;
+
+ dmaCompoundShapeInfo (&lsMem.compoundShapeData[0], spuCompoundShape0, 1);
+ dmaCompoundShapeInfo (&lsMem.compoundShapeData[1], spuCompoundShape1, 2);
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+
+
+ dmaCompoundSubShapes (&lsMem.compoundShapeData[0], spuCompoundShape0, 1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ dmaCompoundSubShapes (&lsMem.compoundShapeData[1], spuCompoundShape1, 1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ int childShapeCount0 = spuCompoundShape0->getNumChildShapes();
+ btAssert(childShapeCount0< MAX_SPU_COMPOUND_SUBSHAPES);
+ int childShapeCount1 = spuCompoundShape1->getNumChildShapes();
+ btAssert(childShapeCount1< MAX_SPU_COMPOUND_SUBSHAPES);
+
+ // Start the N^2
+ for (int i = 0; i < childShapeCount0; ++i)
+ {
+ btCompoundShapeChild& childShape0 = lsMem.compoundShapeData[0].gSubshapes[i];
+ btAssert(!btBroadphaseProxy::isCompound(childShape0.m_childShapeType));
+
+ for (int j = 0; j < childShapeCount1; ++j)
+ {
+ btCompoundShapeChild& childShape1 = lsMem.compoundShapeData[1].gSubshapes[j];
+ btAssert(!btBroadphaseProxy::isCompound(childShape1.m_childShapeType));
+
+
+ /* Create a new collision pair input struct using the two child shapes */
+ SpuCollisionPairInput cinput (collisionPairInput);
+
+ cinput.m_worldTransform0 = collisionPairInput.m_worldTransform0 * childShape0.m_transform;
+ cinput.m_shapeType0 = childShape0.m_childShapeType;
+ cinput.m_collisionMargin0 = childShape0.m_childMargin;
+
+ cinput.m_worldTransform1 = collisionPairInput.m_worldTransform1 * childShape1.m_transform;
+ cinput.m_shapeType1 = childShape1.m_childShapeType;
+ cinput.m_collisionMargin1 = childShape1.m_childMargin;
+ /* Recursively call handleCollisionPair () with new collision pair input */
+
+ handleCollisionPair(cinput, lsMem, spuContacts,
+ (ppu_address_t)childShape0.m_childShape, lsMem.compoundShapeData[0].gSubshapeShape[i],
+ (ppu_address_t)childShape1.m_childShape, lsMem.compoundShapeData[1].gSubshapeShape[j], false);
+ }
+ }
+ }
+ else if (btBroadphaseProxy::isCompound(collisionPairInput.m_shapeType0) )
+ {
+ //snPause();
+
+ dmaCollisionShape (collisionShape0Loc, collisionShape0Ptr, 1, collisionPairInput.m_shapeType0);
+ dmaCollisionShape (collisionShape1Loc, collisionShape1Ptr, 2, collisionPairInput.m_shapeType1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+
+ // object 0 compound, object 1 non-compound
+ btCompoundShape* spuCompoundShape = (btCompoundShape*)collisionShape0Loc;
+ dmaCompoundShapeInfo (&lsMem.compoundShapeData[0], spuCompoundShape, 1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ int childShapeCount = spuCompoundShape->getNumChildShapes();
+ btAssert(childShapeCount< MAX_SPU_COMPOUND_SUBSHAPES);
+
+ for (int i = 0; i < childShapeCount; ++i)
+ {
+ btCompoundShapeChild& childShape = lsMem.compoundShapeData[0].gSubshapes[i];
+ btAssert(!btBroadphaseProxy::isCompound(childShape.m_childShapeType));
+ // Dma the child shape
+ dmaCollisionShape (&lsMem.compoundShapeData[0].gSubshapeShape[i], (ppu_address_t)childShape.m_childShape, 1, childShape.m_childShapeType);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ SpuCollisionPairInput cinput (collisionPairInput);
+ cinput.m_worldTransform0 = collisionPairInput.m_worldTransform0 * childShape.m_transform;
+ cinput.m_shapeType0 = childShape.m_childShapeType;
+ cinput.m_collisionMargin0 = childShape.m_childMargin;
+
+ handleCollisionPair(cinput, lsMem, spuContacts,
+ (ppu_address_t)childShape.m_childShape, lsMem.compoundShapeData[0].gSubshapeShape[i],
+ collisionShape1Ptr, collisionShape1Loc, false);
+ }
+ }
+ else if (btBroadphaseProxy::isCompound(collisionPairInput.m_shapeType1) )
+ {
+ //snPause();
+
+ dmaCollisionShape (collisionShape0Loc, collisionShape0Ptr, 1, collisionPairInput.m_shapeType0);
+ dmaCollisionShape (collisionShape1Loc, collisionShape1Ptr, 2, collisionPairInput.m_shapeType1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+ // object 0 non-compound, object 1 compound
+ btCompoundShape* spuCompoundShape = (btCompoundShape*)collisionShape1Loc;
+ dmaCompoundShapeInfo (&lsMem.compoundShapeData[0], spuCompoundShape, 1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ int childShapeCount = spuCompoundShape->getNumChildShapes();
+ btAssert(childShapeCount< MAX_SPU_COMPOUND_SUBSHAPES);
+
+
+ for (int i = 0; i < childShapeCount; ++i)
+ {
+ btCompoundShapeChild& childShape = lsMem.compoundShapeData[0].gSubshapes[i];
+ btAssert(!btBroadphaseProxy::isCompound(childShape.m_childShapeType));
+ // Dma the child shape
+ dmaCollisionShape (&lsMem.compoundShapeData[0].gSubshapeShape[i], (ppu_address_t)childShape.m_childShape, 1, childShape.m_childShapeType);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ SpuCollisionPairInput cinput (collisionPairInput);
+ cinput.m_worldTransform1 = collisionPairInput.m_worldTransform1 * childShape.m_transform;
+ cinput.m_shapeType1 = childShape.m_childShapeType;
+ cinput.m_collisionMargin1 = childShape.m_childMargin;
+ handleCollisionPair(cinput, lsMem, spuContacts,
+ collisionShape0Ptr, collisionShape0Loc,
+ (ppu_address_t)childShape.m_childShape, lsMem.compoundShapeData[0].gSubshapeShape[i], false);
+ }
+
+ }
+ else
+ {
+ //a non-convex shape is involved
+ bool handleConvexConcave = false;
+
+ //snPause();
+
+ if (btBroadphaseProxy::isConcave(collisionPairInput.m_shapeType0) &&
+ btBroadphaseProxy::isConvex(collisionPairInput.m_shapeType1))
+ {
+ // Swap stuff
+ DoSwap(collisionShape0Ptr, collisionShape1Ptr);
+ DoSwap(collisionShape0Loc, collisionShape1Loc);
+ DoSwap(collisionPairInput.m_shapeType0, collisionPairInput.m_shapeType1);
+ DoSwap(collisionPairInput.m_worldTransform0, collisionPairInput.m_worldTransform1);
+ DoSwap(collisionPairInput.m_collisionMargin0, collisionPairInput.m_collisionMargin1);
+
+ collisionPairInput.m_isSwapped = true;
+ }
+
+ if (btBroadphaseProxy::isConvex(collisionPairInput.m_shapeType0)&&
+ btBroadphaseProxy::isConcave(collisionPairInput.m_shapeType1))
+ {
+ handleConvexConcave = true;
+ }
+ if (handleConvexConcave)
+ {
+ if (dmaShapes)
+ {
+ dmaCollisionShape (collisionShape0Loc, collisionShape0Ptr, 1, collisionPairInput.m_shapeType0);
+ dmaCollisionShape (collisionShape1Loc, collisionShape1Ptr, 2, collisionPairInput.m_shapeType1);
+ cellDmaWaitTagStatusAll(DMA_MASK(1) | DMA_MASK(2));
+ }
+
+ if (collisionPairInput.m_shapeType1 == STATIC_PLANE_PROXYTYPE)
+ {
+ btConvexInternalShape* spuConvexShape0 = (btConvexInternalShape*)collisionShape0Loc;
+ btStaticPlaneShape* planeShape= (btStaticPlaneShape*)collisionShape1Loc;
+
+ btVector3 dim0 = spuConvexShape0->getImplicitShapeDimensions();
+ collisionPairInput.m_primitiveDimensions0 = dim0;
+ collisionPairInput.m_collisionShapes[0] = collisionShape0Ptr;
+ collisionPairInput.m_collisionShapes[1] = collisionShape1Ptr;
+ collisionPairInput.m_spuCollisionShapes[0] = spuConvexShape0;
+ collisionPairInput.m_spuCollisionShapes[1] = planeShape;
+
+ ProcessConvexPlaneSpuCollision(&collisionPairInput,&lsMem,spuContacts);
+ } else
+ {
+ btConvexInternalShape* spuConvexShape0 = (btConvexInternalShape*)collisionShape0Loc;
+ btBvhTriangleMeshShape* trimeshShape = (btBvhTriangleMeshShape*)collisionShape1Loc;
+
+ btVector3 dim0 = spuConvexShape0->getImplicitShapeDimensions();
+ collisionPairInput.m_primitiveDimensions0 = dim0;
+ collisionPairInput.m_collisionShapes[0] = collisionShape0Ptr;
+ collisionPairInput.m_collisionShapes[1] = collisionShape1Ptr;
+ collisionPairInput.m_spuCollisionShapes[0] = spuConvexShape0;
+ collisionPairInput.m_spuCollisionShapes[1] = trimeshShape;
+
+ ProcessConvexConcaveSpuCollision(&collisionPairInput,&lsMem,spuContacts);
+ }
+ }
+
+ }
+
+ spuContacts.flush();
+
+}
+
+
+void processCollisionTask(void* userPtr, void* lsMemPtr)
+{
+
+ SpuGatherAndProcessPairsTaskDesc* taskDescPtr = (SpuGatherAndProcessPairsTaskDesc*)userPtr;
+ SpuGatherAndProcessPairsTaskDesc& taskDesc = *taskDescPtr;
+ CollisionTask_LocalStoreMemory* colMemPtr = (CollisionTask_LocalStoreMemory*)lsMemPtr;
+ CollisionTask_LocalStoreMemory& lsMem = *(colMemPtr);
+
+ gUseEpa = taskDesc.m_useEpa;
+
+ // spu_printf("taskDescPtr=%llx\n",taskDescPtr);
+
+ SpuContactResult spuContacts;
+
+ ////////////////////
+
+ ppu_address_t dmaInPtr = taskDesc.m_inPairPtr;
+ unsigned int numPages = taskDesc.numPages;
+ unsigned int numOnLastPage = taskDesc.numOnLastPage;
+
+ // prefetch first set of inputs and wait
+ lsMem.g_workUnitTaskBuffers.init();
+
+ unsigned int nextNumOnPage = (numPages > 1)? MIDPHASE_NUM_WORKUNITS_PER_PAGE : numOnLastPage;
+ lsMem.g_workUnitTaskBuffers.backBufferDmaGet(dmaInPtr, nextNumOnPage*sizeof(SpuGatherAndProcessWorkUnitInput), DMA_TAG(3));
+ dmaInPtr += MIDPHASE_WORKUNIT_PAGE_SIZE;
+
+
+ register unsigned char *inputPtr;
+ register unsigned int numOnPage;
+ register unsigned int j;
+ SpuGatherAndProcessWorkUnitInput* wuInputs;
+ register int dmaSize;
+ register ppu_address_t dmaPpuAddress;
+ register ppu_address_t dmaPpuAddress2;
+
+ int numPairs;
+ register int p;
+ SpuCollisionPairInput collisionPairInput;
+
+ for (unsigned int i = 0; btLikely(i < numPages); i++)
+ {
+
+ // wait for back buffer dma and swap buffers
+ inputPtr = lsMem.g_workUnitTaskBuffers.swapBuffers();
+
+ // number on current page is number prefetched last iteration
+ numOnPage = nextNumOnPage;
+
+
+ // prefetch next set of inputs
+#if MIDPHASE_NUM_WORKUNIT_PAGES > 2
+ if ( btLikely( i < numPages-1 ) )
+#else
+ if ( btUnlikely( i < numPages-1 ) )
+#endif
+ {
+ nextNumOnPage = (i == numPages-2)? numOnLastPage : MIDPHASE_NUM_WORKUNITS_PER_PAGE;
+ lsMem.g_workUnitTaskBuffers.backBufferDmaGet(dmaInPtr, nextNumOnPage*sizeof(SpuGatherAndProcessWorkUnitInput), DMA_TAG(3));
+ dmaInPtr += MIDPHASE_WORKUNIT_PAGE_SIZE;
+ }
+
+ wuInputs = reinterpret_cast<SpuGatherAndProcessWorkUnitInput *>(inputPtr);
+
+
+ for (j = 0; btLikely( j < numOnPage ); j++)
+ {
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ // printMidphaseInput(&wuInputs[j]);
+#endif //DEBUG_SPU_COLLISION_DETECTION
+
+
+ numPairs = wuInputs[j].m_endIndex - wuInputs[j].m_startIndex;
+
+ if ( btLikely( numPairs ) )
+ {
+ dmaSize = numPairs*sizeof(btBroadphasePair);
+ dmaPpuAddress = wuInputs[j].m_pairArrayPtr+wuInputs[j].m_startIndex * sizeof(btBroadphasePair);
+ lsMem.m_pairsPointer = (btBroadphasePair*)cellDmaGetReadOnly(&lsMem.gBroadphasePairsBuffer, dmaPpuAddress , dmaSize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+
+ for (p=0;p<numPairs;p++)
+ {
+
+ //for each broadphase pair, do something
+
+ btBroadphasePair& pair = lsMem.getBroadphasePairPtr()[p];
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ spu_printf("pair->m_userInfo = %d\n",pair.m_userInfo);
+ spu_printf("pair->m_algorithm = %d\n",pair.m_algorithm);
+ spu_printf("pair->m_pProxy0 = %d\n",pair.m_pProxy0);
+ spu_printf("pair->m_pProxy1 = %d\n",pair.m_pProxy1);
+#endif //DEBUG_SPU_COLLISION_DETECTION
+
+ if (pair.m_internalTmpValue == 2 && pair.m_algorithm && pair.m_pProxy0 && pair.m_pProxy1)
+ {
+ dmaSize = sizeof(SpuContactManifoldCollisionAlgorithm);
+ dmaPpuAddress2 = (ppu_address_t)pair.m_algorithm;
+ lsMem.m_lsCollisionAlgorithmPtr = (SpuContactManifoldCollisionAlgorithm*)cellDmaGetReadOnly(&lsMem.gSpuContactManifoldAlgoBuffer, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ lsMem.needsDmaPutContactManifoldAlgo = false;
+
+ collisionPairInput.m_persistentManifoldPtr = (ppu_address_t) lsMem.getlocalCollisionAlgorithm()->getContactManifoldPtr();
+ collisionPairInput.m_isSwapped = false;
+
+ if (1)
+ {
+
+ ///can wait on the combined DMA_MASK, or dma on the same tag
+
+
+#ifdef DEBUG_SPU_COLLISION_DETECTION
+ // spu_printf("SPU collisionPairInput->m_shapeType0 = %d\n",collisionPairInput->m_shapeType0);
+ // spu_printf("SPU collisionPairInput->m_shapeType1 = %d\n",collisionPairInput->m_shapeType1);
+#endif //DEBUG_SPU_COLLISION_DETECTION
+
+
+ dmaSize = sizeof(btPersistentManifold);
+
+ dmaPpuAddress2 = collisionPairInput.m_persistentManifoldPtr;
+ lsMem.m_lsManifoldPtr = (btPersistentManifold*)cellDmaGetReadOnly(&lsMem.gPersistentManifoldBuffer, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+
+ collisionPairInput.m_shapeType0 = lsMem.getlocalCollisionAlgorithm()->getShapeType0();
+ collisionPairInput.m_shapeType1 = lsMem.getlocalCollisionAlgorithm()->getShapeType1();
+ collisionPairInput.m_collisionMargin0 = lsMem.getlocalCollisionAlgorithm()->getCollisionMargin0();
+ collisionPairInput.m_collisionMargin1 = lsMem.getlocalCollisionAlgorithm()->getCollisionMargin1();
+
+
+
+ //??cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+
+ if (1)
+ {
+ //snPause();
+
+ // Get the collision objects
+ dmaAndSetupCollisionObjects(collisionPairInput, lsMem);
+
+ if (lsMem.getColObj0()->isActive() || lsMem.getColObj1()->isActive())
+ {
+
+ lsMem.needsDmaPutContactManifoldAlgo = true;
+#ifdef USE_SEPDISTANCE_UTIL
+ lsMem.getlocalCollisionAlgorithm()->m_sepDistance.updateSeparatingDistance(collisionPairInput.m_worldTransform0,collisionPairInput.m_worldTransform1);
+#endif //USE_SEPDISTANCE_UTIL
+
+#define USE_DEDICATED_BOX_BOX 1
+#ifdef USE_DEDICATED_BOX_BOX
+ bool boxbox = ((lsMem.getlocalCollisionAlgorithm()->getShapeType0()==BOX_SHAPE_PROXYTYPE)&&
+ (lsMem.getlocalCollisionAlgorithm()->getShapeType1()==BOX_SHAPE_PROXYTYPE));
+ if (boxbox)
+ {
+ //spu_printf("boxbox dist = %f\n",distance);
+ btPersistentManifold* spuManifold=lsMem.getContactManifoldPtr();
+ btPersistentManifold* manifold = (btPersistentManifold*)collisionPairInput.m_persistentManifoldPtr;
+ ppu_address_t manifoldAddress = (ppu_address_t)manifold;
+
+ spuContacts.setContactInfo(spuManifold,manifoldAddress,lsMem.getColObj0()->getWorldTransform(),
+ lsMem.getColObj1()->getWorldTransform(),
+ lsMem.getColObj0()->getRestitution(),lsMem.getColObj1()->getRestitution(),
+ lsMem.getColObj0()->getFriction(),lsMem.getColObj1()->getFriction(),
+ collisionPairInput.m_isSwapped);
+
+
+ //float distance=0.f;
+ btVector3 normalInB;
+
+
+ if (//!gUseEpa &&
+#ifdef USE_SEPDISTANCE_UTIL
+ lsMem.getlocalCollisionAlgorithm()->m_sepDistance.getConservativeSeparatingDistance()<=0.f
+#else
+ 1
+#endif
+ )
+ {
+//#define USE_PE_BOX_BOX 1
+#ifdef USE_PE_BOX_BOX
+ {
+
+ //getCollisionMargin0
+ btScalar margin0 = lsMem.getlocalCollisionAlgorithm()->getCollisionMargin0();
+ btScalar margin1 = lsMem.getlocalCollisionAlgorithm()->getCollisionMargin1();
+ btVector3 shapeDim0 = lsMem.getlocalCollisionAlgorithm()->getShapeDimensions0()+btVector3(margin0,margin0,margin0);
+ btVector3 shapeDim1 = lsMem.getlocalCollisionAlgorithm()->getShapeDimensions1()+btVector3(margin1,margin1,margin1);
+/*
+ //Box boxA(shapeDim0.getX(),shapeDim0.getY(),shapeDim0.getZ());
+ vmVector3 vmPos0 = getVmVector3(collisionPairInput.m_worldTransform0.getOrigin());
+ vmVector3 vmPos1 = getVmVector3(collisionPairInput.m_worldTransform1.getOrigin());
+ vmMatrix3 vmMatrix0 = getVmMatrix3(collisionPairInput.m_worldTransform0.getBasis());
+ vmMatrix3 vmMatrix1 = getVmMatrix3(collisionPairInput.m_worldTransform1.getBasis());
+
+ vmTransform3 transformA(vmMatrix0,vmPos0);
+ Box boxB(shapeDim1.getX(),shapeDim1.getY(),shapeDim1.getZ());
+ vmTransform3 transformB(vmMatrix1,vmPos1);
+ BoxPoint resultClosestBoxPointA;
+ BoxPoint resultClosestBoxPointB;
+ vmVector3 resultNormal;
+ */
+
+#ifdef USE_SEPDISTANCE_UTIL
+ float distanceThreshold = FLT_MAX
+#else
+ //float distanceThreshold = 0.f;
+#endif
+
+
+ vmVector3 n;
+ Box boxA;
+ vmVector3 hA(shapeDim0.getX(),shapeDim0.getY(),shapeDim0.getZ());
+ vmVector3 hB(shapeDim1.getX(),shapeDim1.getY(),shapeDim1.getZ());
+ boxA.mHalf= hA;
+ vmTransform3 trA;
+ trA.setTranslation(getVmVector3(collisionPairInput.m_worldTransform0.getOrigin()));
+ trA.setUpper3x3(getVmMatrix3(collisionPairInput.m_worldTransform0.getBasis()));
+ Box boxB;
+ boxB.mHalf = hB;
+ vmTransform3 trB;
+ trB.setTranslation(getVmVector3(collisionPairInput.m_worldTransform1.getOrigin()));
+ trB.setUpper3x3(getVmMatrix3(collisionPairInput.m_worldTransform1.getBasis()));
+
+ float distanceThreshold = spuManifold->getContactBreakingThreshold();//0.001f;
+
+
+ BoxPoint ptA,ptB;
+ float dist = boxBoxDistance(n, ptA, ptB,
+ boxA, trA, boxB, trB,
+ distanceThreshold );
+
+
+// float distance = boxBoxDistance(resultNormal,resultClosestBoxPointA,resultClosestBoxPointB, boxA, transformA, boxB,transformB,distanceThreshold);
+
+ normalInB = -getBtVector3(n);//resultNormal);
+
+ //if(dist < distanceThreshold)//spuManifold->getContactBreakingThreshold())
+ if(dist < spuManifold->getContactBreakingThreshold())
+ {
+ btVector3 pointOnB = collisionPairInput.m_worldTransform1(getBtVector3(ptB.localPoint));
+
+ spuContacts.addContactPoint(
+ normalInB,
+ pointOnB,
+ dist);
+ }
+ }
+#else
+ {
+
+ btScalar margin0 = lsMem.getlocalCollisionAlgorithm()->getCollisionMargin0();
+ btScalar margin1 = lsMem.getlocalCollisionAlgorithm()->getCollisionMargin1();
+ btVector3 shapeDim0 = lsMem.getlocalCollisionAlgorithm()->getShapeDimensions0()+btVector3(margin0,margin0,margin0);
+ btVector3 shapeDim1 = lsMem.getlocalCollisionAlgorithm()->getShapeDimensions1()+btVector3(margin1,margin1,margin1);
+
+
+ btBoxShape box0(shapeDim0);
+ btBoxShape box1(shapeDim1);
+
+ struct SpuBridgeContactCollector : public btDiscreteCollisionDetectorInterface::Result
+ {
+ SpuContactResult& m_spuContacts;
+
+ virtual void setShapeIdentifiersA(int partId0,int index0)
+ {
+ m_spuContacts.setShapeIdentifiersA(partId0,index0);
+ }
+ virtual void setShapeIdentifiersB(int partId1,int index1)
+ {
+ m_spuContacts.setShapeIdentifiersB(partId1,index1);
+ }
+ virtual void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+ {
+ m_spuContacts.addContactPoint(normalOnBInWorld,pointInWorld,depth);
+ }
+
+ SpuBridgeContactCollector(SpuContactResult& spuContacts)
+ :m_spuContacts(spuContacts)
+ {
+
+ }
+ };
+
+ SpuBridgeContactCollector bridgeOutput(spuContacts);
+
+ btDiscreteCollisionDetectorInterface::ClosestPointInput input;
+ input.m_maximumDistanceSquared = BT_LARGE_FLOAT;
+ input.m_transformA = collisionPairInput.m_worldTransform0;
+ input.m_transformB = collisionPairInput.m_worldTransform1;
+
+ btBoxBoxDetector detector(&box0,&box1);
+
+ detector.getClosestPoints(input,bridgeOutput,0);
+
+ }
+#endif //USE_PE_BOX_BOX
+
+ lsMem.needsDmaPutContactManifoldAlgo = true;
+#ifdef USE_SEPDISTANCE_UTIL
+ btScalar sepDist2 = distance+spuManifold->getContactBreakingThreshold();
+ lsMem.getlocalCollisionAlgorithm()->m_sepDistance.initSeparatingDistance(normalInB,sepDist2,collisionPairInput.m_worldTransform0,collisionPairInput.m_worldTransform1);
+#endif //USE_SEPDISTANCE_UTIL
+ gProcessedCol++;
+ } else
+ {
+ gSkippedCol++;
+ }
+
+ spuContacts.flush();
+
+
+ } else
+#endif //USE_DEDICATED_BOX_BOX
+ {
+ if (
+#ifdef USE_SEPDISTANCE_UTIL
+ lsMem.getlocalCollisionAlgorithm()->m_sepDistance.getConservativeSeparatingDistance()<=0.f
+#else
+ 1
+#endif //USE_SEPDISTANCE_UTIL
+ )
+ {
+ handleCollisionPair(collisionPairInput, lsMem, spuContacts,
+ (ppu_address_t)lsMem.getColObj0()->getRootCollisionShape(), &lsMem.gCollisionShapes[0].collisionShape,
+ (ppu_address_t)lsMem.getColObj1()->getRootCollisionShape(), &lsMem.gCollisionShapes[1].collisionShape);
+ } else
+ {
+ //spu_printf("boxbox dist = %f\n",distance);
+ btPersistentManifold* spuManifold=lsMem.getContactManifoldPtr();
+ btPersistentManifold* manifold = (btPersistentManifold*)collisionPairInput.m_persistentManifoldPtr;
+ ppu_address_t manifoldAddress = (ppu_address_t)manifold;
+
+ spuContacts.setContactInfo(spuManifold,manifoldAddress,lsMem.getColObj0()->getWorldTransform(),
+ lsMem.getColObj1()->getWorldTransform(),
+ lsMem.getColObj0()->getRestitution(),lsMem.getColObj1()->getRestitution(),
+ lsMem.getColObj0()->getFriction(),lsMem.getColObj1()->getFriction(),
+ collisionPairInput.m_isSwapped);
+
+ spuContacts.flush();
+ }
+ }
+
+ }
+
+ }
+ }
+
+#ifdef USE_SEPDISTANCE_UTIL
+#if defined (__SPU__) || defined (USE_LIBSPE2)
+ if (lsMem.needsDmaPutContactManifoldAlgo)
+ {
+ dmaSize = sizeof(SpuContactManifoldCollisionAlgorithm);
+ dmaPpuAddress2 = (ppu_address_t)pair.m_algorithm;
+ cellDmaLargePut(&lsMem.gSpuContactManifoldAlgoBuffer, dmaPpuAddress2 , dmaSize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ }
+#endif
+#endif //#ifdef USE_SEPDISTANCE_UTIL
+
+ }
+ }
+ }
+ } //end for (j = 0; j < numOnPage; j++)
+
+ }// for
+
+
+
+ return;
+}
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h
new file mode 100644
index 00000000..bbaa555e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h
@@ -0,0 +1,140 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef SPU_GATHERING_COLLISION_TASK_H
+#define SPU_GATHERING_COLLISION_TASK_H
+
+#include "../PlatformDefinitions.h"
+//#define DEBUG_SPU_COLLISION_DETECTION 1
+
+
+///Task Description for SPU collision detection
+struct SpuGatherAndProcessPairsTaskDesc
+{
+ ppu_address_t m_inPairPtr;//m_pairArrayPtr;
+ //mutex variable
+ uint32_t m_someMutexVariableInMainMemory;
+
+ ppu_address_t m_dispatcher;
+
+ uint32_t numOnLastPage;
+
+ uint16_t numPages;
+ uint16_t taskId;
+ bool m_useEpa;
+
+ struct CollisionTask_LocalStoreMemory* m_lsMemory;
+}
+
+#if defined(__CELLOS_LV2__) || defined(USE_LIBSPE2)
+__attribute__ ((aligned (128)))
+#endif
+;
+
+
+void processCollisionTask(void* userPtr, void* lsMemory);
+
+void* createCollisionLocalStoreMemory();
+
+
+#if defined(USE_LIBSPE2) && defined(__SPU__)
+#include "../SpuLibspe2Support.h"
+#include <spu_intrinsics.h>
+#include <spu_mfcio.h>
+#include <SpuFakeDma.h>
+
+//#define DEBUG_LIBSPE2_SPU_TASK
+
+
+
+int main(unsigned long long speid, addr64 argp, addr64 envp)
+{
+ printf("SPU: hello \n");
+
+ ATTRIBUTE_ALIGNED128(btSpuStatus status);
+ ATTRIBUTE_ALIGNED16( SpuGatherAndProcessPairsTaskDesc taskDesc ) ;
+ unsigned int received_message = Spu_Mailbox_Event_Nothing;
+ bool shutdown = false;
+
+ cellDmaGet(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ status.m_status = Spu_Status_Free;
+ status.m_lsMemory.p = createCollisionLocalStoreMemory();
+
+ cellDmaLargePut(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+
+ while ( btLikely( !shutdown ) )
+ {
+
+ received_message = spu_read_in_mbox();
+
+ if( btLikely( received_message == Spu_Mailbox_Event_Task ))
+ {
+#ifdef DEBUG_LIBSPE2_SPU_TASK
+ printf("SPU: received Spu_Mailbox_Event_Task\n");
+#endif //DEBUG_LIBSPE2_SPU_TASK
+
+ // refresh the status
+ cellDmaGet(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ btAssert(status.m_status==Spu_Status_Occupied);
+
+ cellDmaGet(&taskDesc, status.m_taskDesc.p, sizeof(SpuGatherAndProcessPairsTaskDesc), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+#ifdef DEBUG_LIBSPE2_SPU_TASK
+ printf("SPU:processCollisionTask\n");
+#endif //DEBUG_LIBSPE2_SPU_TASK
+ processCollisionTask((void*)&taskDesc, taskDesc.m_lsMemory);
+
+#ifdef DEBUG_LIBSPE2_SPU_TASK
+ printf("SPU:finished processCollisionTask\n");
+#endif //DEBUG_LIBSPE2_SPU_TASK
+ }
+ else
+ {
+#ifdef DEBUG_LIBSPE2_SPU_TASK
+ printf("SPU: received ShutDown\n");
+#endif //DEBUG_LIBSPE2_SPU_TASK
+ if( btLikely( received_message == Spu_Mailbox_Event_Shutdown ) )
+ {
+ shutdown = true;
+ }
+ else
+ {
+ //printf("SPU - Sth. recieved\n");
+ }
+ }
+
+ // set to status free and wait for next task
+ status.m_status = Spu_Status_Free;
+ cellDmaLargePut(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+
+ }
+
+ printf("SPU: shutdown\n");
+ return 0;
+}
+#endif // USE_LIBSPE2
+
+
+#endif //SPU_GATHERING_COLLISION_TASK_H
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h
new file mode 100644
index 00000000..8b89de03
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h
@@ -0,0 +1,19 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp
new file mode 100644
index 00000000..9f7e64dd
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp
@@ -0,0 +1,348 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "SpuMinkowskiPenetrationDepthSolver.h"
+#include "SpuContactResult.h"
+#include "SpuPreferredPenetrationDirections.h"
+#include "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h"
+#include "SpuCollisionShapes.h"
+
+#define NUM_UNITSPHERE_POINTS 42
+static btVector3 sPenetrationDirections[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2] =
+{
+btVector3(btScalar(0.000000) , btScalar(-0.000000),btScalar(-1.000000)),
+btVector3(btScalar(0.723608) , btScalar(-0.525725),btScalar(-0.447219)),
+btVector3(btScalar(-0.276388) , btScalar(-0.850649),btScalar(-0.447219)),
+btVector3(btScalar(-0.894426) , btScalar(-0.000000),btScalar(-0.447216)),
+btVector3(btScalar(-0.276388) , btScalar(0.850649),btScalar(-0.447220)),
+btVector3(btScalar(0.723608) , btScalar(0.525725),btScalar(-0.447219)),
+btVector3(btScalar(0.276388) , btScalar(-0.850649),btScalar(0.447220)),
+btVector3(btScalar(-0.723608) , btScalar(-0.525725),btScalar(0.447219)),
+btVector3(btScalar(-0.723608) , btScalar(0.525725),btScalar(0.447219)),
+btVector3(btScalar(0.276388) , btScalar(0.850649),btScalar(0.447219)),
+btVector3(btScalar(0.894426) , btScalar(0.000000),btScalar(0.447216)),
+btVector3(btScalar(-0.000000) , btScalar(0.000000),btScalar(1.000000)),
+btVector3(btScalar(0.425323) , btScalar(-0.309011),btScalar(-0.850654)),
+btVector3(btScalar(-0.162456) , btScalar(-0.499995),btScalar(-0.850654)),
+btVector3(btScalar(0.262869) , btScalar(-0.809012),btScalar(-0.525738)),
+btVector3(btScalar(0.425323) , btScalar(0.309011),btScalar(-0.850654)),
+btVector3(btScalar(0.850648) , btScalar(-0.000000),btScalar(-0.525736)),
+btVector3(btScalar(-0.525730) , btScalar(-0.000000),btScalar(-0.850652)),
+btVector3(btScalar(-0.688190) , btScalar(-0.499997),btScalar(-0.525736)),
+btVector3(btScalar(-0.162456) , btScalar(0.499995),btScalar(-0.850654)),
+btVector3(btScalar(-0.688190) , btScalar(0.499997),btScalar(-0.525736)),
+btVector3(btScalar(0.262869) , btScalar(0.809012),btScalar(-0.525738)),
+btVector3(btScalar(0.951058) , btScalar(0.309013),btScalar(0.000000)),
+btVector3(btScalar(0.951058) , btScalar(-0.309013),btScalar(0.000000)),
+btVector3(btScalar(0.587786) , btScalar(-0.809017),btScalar(0.000000)),
+btVector3(btScalar(0.000000) , btScalar(-1.000000),btScalar(0.000000)),
+btVector3(btScalar(-0.587786) , btScalar(-0.809017),btScalar(0.000000)),
+btVector3(btScalar(-0.951058) , btScalar(-0.309013),btScalar(-0.000000)),
+btVector3(btScalar(-0.951058) , btScalar(0.309013),btScalar(-0.000000)),
+btVector3(btScalar(-0.587786) , btScalar(0.809017),btScalar(-0.000000)),
+btVector3(btScalar(-0.000000) , btScalar(1.000000),btScalar(-0.000000)),
+btVector3(btScalar(0.587786) , btScalar(0.809017),btScalar(-0.000000)),
+btVector3(btScalar(0.688190) , btScalar(-0.499997),btScalar(0.525736)),
+btVector3(btScalar(-0.262869) , btScalar(-0.809012),btScalar(0.525738)),
+btVector3(btScalar(-0.850648) , btScalar(0.000000),btScalar(0.525736)),
+btVector3(btScalar(-0.262869) , btScalar(0.809012),btScalar(0.525738)),
+btVector3(btScalar(0.688190) , btScalar(0.499997),btScalar(0.525736)),
+btVector3(btScalar(0.525730) , btScalar(0.000000),btScalar(0.850652)),
+btVector3(btScalar(0.162456) , btScalar(-0.499995),btScalar(0.850654)),
+btVector3(btScalar(-0.425323) , btScalar(-0.309011),btScalar(0.850654)),
+btVector3(btScalar(-0.425323) , btScalar(0.309011),btScalar(0.850654)),
+btVector3(btScalar(0.162456) , btScalar(0.499995),btScalar(0.850654))
+};
+
+
+bool SpuMinkowskiPenetrationDepthSolver::calcPenDepth( btSimplexSolverInterface& simplexSolver,
+ const btConvexShape* convexA,const btConvexShape* convexB,
+ const btTransform& transA,const btTransform& transB,
+ btVector3& v, btVector3& pa, btVector3& pb,
+ class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc)
+{
+#if 0
+ (void)stackAlloc;
+ (void)v;
+
+
+ struct btIntermediateResult : public SpuContactResult
+ {
+
+ btIntermediateResult():m_hasResult(false)
+ {
+ }
+
+ btVector3 m_normalOnBInWorld;
+ btVector3 m_pointInWorld;
+ btScalar m_depth;
+ bool m_hasResult;
+
+ virtual void setShapeIdentifiersA(int partId0,int index0)
+ {
+ (void)partId0;
+ (void)index0;
+ }
+
+ virtual void setShapeIdentifiersB(int partId1,int index1)
+ {
+ (void)partId1;
+ (void)index1;
+ }
+ void addContactPoint(const btVector3& normalOnBInWorld,const btVector3& pointInWorld,btScalar depth)
+ {
+ m_normalOnBInWorld = normalOnBInWorld;
+ m_pointInWorld = pointInWorld;
+ m_depth = depth;
+ m_hasResult = true;
+ }
+ };
+
+ //just take fixed number of orientation, and sample the penetration depth in that direction
+ btScalar minProj = btScalar(BT_LARGE_FLOAT);
+ btVector3 minNorm(0.f,0.f,0.f);
+ btVector3 minVertex;
+ btVector3 minA,minB;
+ btVector3 seperatingAxisInA,seperatingAxisInB;
+ btVector3 pInA,qInB,pWorld,qWorld,w;
+
+//#define USE_BATCHED_SUPPORT 1
+#ifdef USE_BATCHED_SUPPORT
+
+ btVector3 supportVerticesABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ btVector3 supportVerticesBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ btVector3 seperatingAxisInABatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ btVector3 seperatingAxisInBBatch[NUM_UNITSPHERE_POINTS+MAX_PREFERRED_PENETRATION_DIRECTIONS*2];
+ int i;
+
+ int numSampleDirections = NUM_UNITSPHERE_POINTS;
+
+ for (i=0;i<numSampleDirections;i++)
+ {
+ const btVector3& norm = sPenetrationDirections[i];
+ seperatingAxisInABatch[i] = (-norm) * transA.getBasis() ;
+ seperatingAxisInBBatch[i] = norm * transB.getBasis() ;
+ }
+
+ {
+ int numPDA = convexA->getNumPreferredPenetrationDirections();
+ if (numPDA)
+ {
+ for (int i=0;i<numPDA;i++)
+ {
+ btVector3 norm;
+ convexA->getPreferredPenetrationDirection(i,norm);
+ norm = transA.getBasis() * norm;
+ sPenetrationDirections[numSampleDirections] = norm;
+ seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis();
+ seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis();
+ numSampleDirections++;
+ }
+ }
+ }
+
+ {
+ int numPDB = convexB->getNumPreferredPenetrationDirections();
+ if (numPDB)
+ {
+ for (int i=0;i<numPDB;i++)
+ {
+ btVector3 norm;
+ convexB->getPreferredPenetrationDirection(i,norm);
+ norm = transB.getBasis() * norm;
+ sPenetrationDirections[numSampleDirections] = norm;
+ seperatingAxisInABatch[numSampleDirections] = (-norm) * transA.getBasis();
+ seperatingAxisInBBatch[numSampleDirections] = norm * transB.getBasis();
+ numSampleDirections++;
+ }
+ }
+ }
+
+
+
+ convexA->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInABatch,supportVerticesABatch,numSampleDirections);
+ convexB->batchedUnitVectorGetSupportingVertexWithoutMargin(seperatingAxisInBBatch,supportVerticesBBatch,numSampleDirections);
+
+ for (i=0;i<numSampleDirections;i++)
+ {
+ const btVector3& norm = sPenetrationDirections[i];
+ seperatingAxisInA = seperatingAxisInABatch[i];
+ seperatingAxisInB = seperatingAxisInBBatch[i];
+
+ pInA = supportVerticesABatch[i];
+ qInB = supportVerticesBBatch[i];
+
+ pWorld = transA(pInA);
+ qWorld = transB(qInB);
+ w = qWorld - pWorld;
+ btScalar delta = norm.dot(w);
+ //find smallest delta
+ if (delta < minProj)
+ {
+ minProj = delta;
+ minNorm = norm;
+ minA = pWorld;
+ minB = qWorld;
+ }
+ }
+#else
+
+ int numSampleDirections = NUM_UNITSPHERE_POINTS;
+
+///this is necessary, otherwise the normal is not correct, and sphere will rotate forever on a sloped triangle mesh
+#define DO_PREFERRED_DIRECTIONS 1
+#ifdef DO_PREFERRED_DIRECTIONS
+ {
+ int numPDA = spuGetNumPreferredPenetrationDirections(shapeTypeA,convexA);
+ if (numPDA)
+ {
+ for (int i=0;i<numPDA;i++)
+ {
+ btVector3 norm;
+ spuGetPreferredPenetrationDirection(shapeTypeA,convexA,i,norm);
+ norm = transA.getBasis() * norm;
+ sPenetrationDirections[numSampleDirections] = norm;
+ numSampleDirections++;
+ }
+ }
+ }
+
+ {
+ int numPDB = spuGetNumPreferredPenetrationDirections(shapeTypeB,convexB);
+ if (numPDB)
+ {
+ for (int i=0;i<numPDB;i++)
+ {
+ btVector3 norm;
+ spuGetPreferredPenetrationDirection(shapeTypeB,convexB,i,norm);
+ norm = transB.getBasis() * norm;
+ sPenetrationDirections[numSampleDirections] = norm;
+ numSampleDirections++;
+ }
+ }
+ }
+#endif //DO_PREFERRED_DIRECTIONS
+
+ for (int i=0;i<numSampleDirections;i++)
+ {
+ const btVector3& norm = sPenetrationDirections[i];
+ seperatingAxisInA = (-norm)* transA.getBasis();
+ seperatingAxisInB = norm* transB.getBasis();
+
+ pInA = convexA->localGetSupportVertexWithoutMarginNonVirtual( seperatingAxisInA);//, NULL);
+ qInB = convexB->localGetSupportVertexWithoutMarginNonVirtual(seperatingAxisInB);//, NULL);
+
+ // pInA = convexA->localGetSupportingVertexWithoutMargin(seperatingAxisInA);
+ // qInB = convexB->localGetSupportingVertexWithoutMargin(seperatingAxisInB);
+
+ pWorld = transA(pInA);
+ qWorld = transB(qInB);
+ w = qWorld - pWorld;
+ btScalar delta = norm.dot(w);
+ //find smallest delta
+ if (delta < minProj)
+ {
+ minProj = delta;
+ minNorm = norm;
+ minA = pWorld;
+ minB = qWorld;
+ }
+ }
+#endif //USE_BATCHED_SUPPORT
+
+ //add the margins
+
+ minA += minNorm*marginA;
+ minB -= minNorm*marginB;
+ //no penetration
+ if (minProj < btScalar(0.))
+ return false;
+
+ minProj += (marginA + marginB) + btScalar(1.00);
+
+
+
+
+
+//#define DEBUG_DRAW 1
+#ifdef DEBUG_DRAW
+ if (debugDraw)
+ {
+ btVector3 color(0,1,0);
+ debugDraw->drawLine(minA,minB,color);
+ color = btVector3 (1,1,1);
+ btVector3 vec = minB-minA;
+ btScalar prj2 = minNorm.dot(vec);
+ debugDraw->drawLine(minA,minA+(minNorm*minProj),color);
+
+ }
+#endif //DEBUG_DRAW
+
+
+ btGjkPairDetector gjkdet(convexA,convexB,&simplexSolver,0);
+
+ btScalar offsetDist = minProj;
+ btVector3 offset = minNorm * offsetDist;
+
+
+ SpuClosestPointInput input;
+ input.m_convexVertexData[0] = convexVertexDataA;
+ input.m_convexVertexData[1] = convexVertexDataB;
+ btVector3 newOrg = transA.getOrigin() + offset;
+
+ btTransform displacedTrans = transA;
+ displacedTrans.setOrigin(newOrg);
+
+ input.m_transformA = displacedTrans;
+ input.m_transformB = transB;
+ input.m_maximumDistanceSquared = btScalar(BT_LARGE_FLOAT);//minProj;
+
+ btIntermediateResult res;
+ gjkdet.getClosestPoints(input,res,0);
+
+ btScalar correctedMinNorm = minProj - res.m_depth;
+
+
+ //the penetration depth is over-estimated, relax it
+ btScalar penetration_relaxation= btScalar(1.);
+ minNorm*=penetration_relaxation;
+
+ if (res.m_hasResult)
+ {
+
+ pa = res.m_pointInWorld - minNorm * correctedMinNorm;
+ pb = res.m_pointInWorld;
+
+#ifdef DEBUG_DRAW
+ if (debugDraw)
+ {
+ btVector3 color(1,0,0);
+ debugDraw->drawLine(pa,pb,color);
+ }
+#endif//DEBUG_DRAW
+
+
+ } else {
+ // could not seperate shapes
+ //btAssert (false);
+ }
+ return res.m_hasResult;
+#endif
+ return false;
+}
+
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h
new file mode 100644
index 00000000..18ad223e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h
@@ -0,0 +1,48 @@
+
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+#define MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+
+
+#include "BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h"
+
+class btStackAlloc;
+class btIDebugDraw;
+class btVoronoiSimplexSolver;
+class btConvexShape;
+
+///MinkowskiPenetrationDepthSolver implements bruteforce penetration depth estimation.
+///Implementation is based on sampling the depth using support mapping, and using GJK step to get the witness points.
+class SpuMinkowskiPenetrationDepthSolver : public btConvexPenetrationDepthSolver
+{
+public:
+ SpuMinkowskiPenetrationDepthSolver() {}
+ virtual ~SpuMinkowskiPenetrationDepthSolver() {};
+
+ virtual bool calcPenDepth( btSimplexSolverInterface& simplexSolver,
+ const btConvexShape* convexA,const btConvexShape* convexB,
+ const btTransform& transA,const btTransform& transB,
+ btVector3& v, btVector3& pa, btVector3& pb,
+ class btIDebugDraw* debugDraw,btStackAlloc* stackAlloc
+ );
+
+
+};
+
+
+#endif //MINKOWSKI_PENETRATION_DEPTH_SOLVER_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h
new file mode 100644
index 00000000..774a0cb2
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h
@@ -0,0 +1,70 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef _SPU_PREFERRED_PENETRATION_DIRECTIONS_H
+#define _SPU_PREFERRED_PENETRATION_DIRECTIONS_H
+
+
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+
+int spuGetNumPreferredPenetrationDirections(int shapeType, void* shape)
+{
+ switch (shapeType)
+ {
+ case TRIANGLE_SHAPE_PROXYTYPE:
+ {
+ return 2;
+ //spu_printf("2\n");
+ break;
+ }
+ default:
+ {
+#if __ASSERT
+ spu_printf("spuGetNumPreferredPenetrationDirections() - Unsupported bound type: %d.\n", shapeType);
+#endif // __ASSERT
+ }
+ }
+
+ return 0;
+}
+
+void spuGetPreferredPenetrationDirection(int shapeType, void* shape, int index, btVector3& penetrationVector)
+{
+
+
+ switch (shapeType)
+ {
+ case TRIANGLE_SHAPE_PROXYTYPE:
+ {
+ btVector3* vertices = (btVector3*)shape;
+ ///calcNormal
+ penetrationVector = (vertices[1]-vertices[0]).cross(vertices[2]-vertices[0]);
+ penetrationVector.normalize();
+ if (index)
+ penetrationVector *= btScalar(-1.);
+ break;
+ }
+ default:
+ {
+
+#if __ASSERT
+ spu_printf("spuGetNumPreferredPenetrationDirections() - Unsupported bound type: %d.\n", shapeType);
+#endif // __ASSERT
+ }
+ }
+
+}
+
+#endif //_SPU_PREFERRED_PENETRATION_DIRECTIONS_H
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp
new file mode 100644
index 00000000..5e1202c0
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp
@@ -0,0 +1,1160 @@
+/*
+ Copyright (C) 2006, 2008 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+
+//#include "PfxContactBoxBox.h"
+
+#include <math.h>
+#include "../PlatformDefinitions.h"
+#include "boxBoxDistance.h"
+
+static inline float sqr( float a )
+{
+ return (a * a);
+}
+
+enum BoxSepAxisType
+{
+ A_AXIS, B_AXIS, CROSS_AXIS
+};
+
+//-------------------------------------------------------------------------------------------------
+// voronoiTol: bevels Voronoi planes slightly which helps when features are parallel.
+//-------------------------------------------------------------------------------------------------
+
+static const float voronoiTol = -1.0e-5f;
+
+//-------------------------------------------------------------------------------------------------
+// separating axis tests: gaps along each axis are computed, and the axis with the maximum
+// gap is stored. cross product axes are normalized.
+//-------------------------------------------------------------------------------------------------
+
+#define AaxisTest( dim, letter, first ) \
+{ \
+ if ( first ) \
+ { \
+ maxGap = gap = gapsA.get##letter(); \
+ if ( gap > distanceThreshold ) return gap; \
+ axisType = A_AXIS; \
+ faceDimA = dim; \
+ axisA = identity.getCol##dim(); \
+ } \
+ else \
+ { \
+ gap = gapsA.get##letter(); \
+ if ( gap > distanceThreshold ) return gap; \
+ else if ( gap > maxGap ) \
+ { \
+ maxGap = gap; \
+ axisType = A_AXIS; \
+ faceDimA = dim; \
+ axisA = identity.getCol##dim(); \
+ } \
+ } \
+}
+
+
+#define BaxisTest( dim, letter ) \
+{ \
+ gap = gapsB.get##letter(); \
+ if ( gap > distanceThreshold ) return gap; \
+ else if ( gap > maxGap ) \
+ { \
+ maxGap = gap; \
+ axisType = B_AXIS; \
+ faceDimB = dim; \
+ axisB = identity.getCol##dim(); \
+ } \
+}
+
+#define CrossAxisTest( dima, dimb, letterb ) \
+{ \
+ const float lsqr_tolerance = 1.0e-30f; \
+ float lsqr; \
+ \
+ lsqr = lsqrs.getCol##dima().get##letterb(); \
+ \
+ if ( lsqr > lsqr_tolerance ) \
+ { \
+ float l_recip = 1.0f / sqrtf( lsqr ); \
+ gap = float(gapsAxB.getCol##dima().get##letterb()) * l_recip; \
+ \
+ if ( gap > distanceThreshold ) \
+ { \
+ return gap; \
+ } \
+ \
+ if ( gap > maxGap ) \
+ { \
+ maxGap = gap; \
+ axisType = CROSS_AXIS; \
+ edgeDimA = dima; \
+ edgeDimB = dimb; \
+ axisA = cross(identity.getCol##dima(),matrixAB.getCol##dimb()) * l_recip; \
+ } \
+ } \
+}
+
+//-------------------------------------------------------------------------------------------------
+// tests whether a vertex of box B and a face of box A are the closest features
+//-------------------------------------------------------------------------------------------------
+
+inline
+float
+VertexBFaceATest(
+ bool & inVoronoi,
+ float & t0,
+ float & t1,
+ const vmVector3 & hA,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsB,
+ PE_REF(vmVector3) scalesB )
+{
+ // compute a corner of box B in A's coordinate system
+
+ vmVector3 corner =
+ vmVector3( faceOffsetAB + matrixAB.getCol0() * scalesB.getX() + matrixAB.getCol1() * scalesB.getY() );
+
+ // compute the parameters of the point on A, closest to this corner
+
+ t0 = corner[0];
+ t1 = corner[1];
+
+ if ( t0 > hA[0] )
+ t0 = hA[0];
+ else if ( t0 < -hA[0] )
+ t0 = -hA[0];
+ if ( t1 > hA[1] )
+ t1 = hA[1];
+ else if ( t1 < -hA[1] )
+ t1 = -hA[1];
+
+ // do the Voronoi test: already know the point on B is in the Voronoi region of the
+ // point on A, check the reverse.
+
+ vmVector3 facePointB =
+ vmVector3( mulPerElem( faceOffsetBA + matrixBA.getCol0() * t0 + matrixBA.getCol1() * t1 - scalesB, signsB ) );
+
+ inVoronoi = ( ( facePointB[0] >= voronoiTol * facePointB[2] ) &&
+ ( facePointB[1] >= voronoiTol * facePointB[0] ) &&
+ ( facePointB[2] >= voronoiTol * facePointB[1] ) );
+
+ return (sqr( corner[0] - t0 ) + sqr( corner[1] - t1 ) + sqr( corner[2] ));
+}
+
+#define VertexBFaceA_SetNewMin() \
+{ \
+ minDistSqr = distSqr; \
+ localPointA.setX(t0); \
+ localPointA.setY(t1); \
+ localPointB.setX( scalesB.getX() ); \
+ localPointB.setY( scalesB.getY() ); \
+ featureA = F; \
+ featureB = V; \
+}
+
+void
+VertexBFaceATests(
+ bool & done,
+ float & minDistSqr,
+ vmPoint3 & localPointA,
+ vmPoint3 & localPointB,
+ FeatureType & featureA,
+ FeatureType & featureB,
+ const vmVector3 & hA,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsB,
+ PE_REF(vmVector3) scalesB,
+ bool first )
+{
+
+ float t0, t1;
+ float distSqr;
+
+ distSqr = VertexBFaceATest( done, t0, t1, hA, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsB, scalesB );
+
+ if ( first ) {
+ VertexBFaceA_SetNewMin();
+ } else {
+ if ( distSqr < minDistSqr ) {
+ VertexBFaceA_SetNewMin();
+ }
+ }
+
+ if ( done )
+ return;
+
+ signsB.setX( -signsB.getX() );
+ scalesB.setX( -scalesB.getX() );
+
+ distSqr = VertexBFaceATest( done, t0, t1, hA, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsB, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ VertexBFaceA_SetNewMin();
+ }
+
+ if ( done )
+ return;
+
+ signsB.setY( -signsB.getY() );
+ scalesB.setY( -scalesB.getY() );
+
+ distSqr = VertexBFaceATest( done, t0, t1, hA, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsB, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ VertexBFaceA_SetNewMin();
+ }
+
+ if ( done )
+ return;
+
+ signsB.setX( -signsB.getX() );
+ scalesB.setX( -scalesB.getX() );
+
+ distSqr = VertexBFaceATest( done, t0, t1, hA, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsB, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ VertexBFaceA_SetNewMin();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------
+// VertexAFaceBTest: tests whether a vertex of box A and a face of box B are the closest features
+//-------------------------------------------------------------------------------------------------
+
+inline
+float
+VertexAFaceBTest(
+ bool & inVoronoi,
+ float & t0,
+ float & t1,
+ const vmVector3 & hB,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsA,
+ PE_REF(vmVector3) scalesA )
+{
+ vmVector3 corner =
+ vmVector3( faceOffsetBA + matrixBA.getCol0() * scalesA.getX() + matrixBA.getCol1() * scalesA.getY() );
+
+ t0 = corner[0];
+ t1 = corner[1];
+
+ if ( t0 > hB[0] )
+ t0 = hB[0];
+ else if ( t0 < -hB[0] )
+ t0 = -hB[0];
+ if ( t1 > hB[1] )
+ t1 = hB[1];
+ else if ( t1 < -hB[1] )
+ t1 = -hB[1];
+
+ vmVector3 facePointA =
+ vmVector3( mulPerElem( faceOffsetAB + matrixAB.getCol0() * t0 + matrixAB.getCol1() * t1 - scalesA, signsA ) );
+
+ inVoronoi = ( ( facePointA[0] >= voronoiTol * facePointA[2] ) &&
+ ( facePointA[1] >= voronoiTol * facePointA[0] ) &&
+ ( facePointA[2] >= voronoiTol * facePointA[1] ) );
+
+ return (sqr( corner[0] - t0 ) + sqr( corner[1] - t1 ) + sqr( corner[2] ));
+}
+
+#define VertexAFaceB_SetNewMin() \
+{ \
+ minDistSqr = distSqr; \
+ localPointB.setX(t0); \
+ localPointB.setY(t1); \
+ localPointA.setX( scalesA.getX() ); \
+ localPointA.setY( scalesA.getY() ); \
+ featureA = V; \
+ featureB = F; \
+}
+
+void
+VertexAFaceBTests(
+ bool & done,
+ float & minDistSqr,
+ vmPoint3 & localPointA,
+ vmPoint3 & localPointB,
+ FeatureType & featureA,
+ FeatureType & featureB,
+ const vmVector3 & hB,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsA,
+ PE_REF(vmVector3) scalesA,
+ bool first )
+{
+ float t0, t1;
+ float distSqr;
+
+ distSqr = VertexAFaceBTest( done, t0, t1, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, scalesA );
+
+ if ( first ) {
+ VertexAFaceB_SetNewMin();
+ } else {
+ if ( distSqr < minDistSqr ) {
+ VertexAFaceB_SetNewMin();
+ }
+ }
+
+ if ( done )
+ return;
+
+ signsA.setX( -signsA.getX() );
+ scalesA.setX( -scalesA.getX() );
+
+ distSqr = VertexAFaceBTest( done, t0, t1, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, scalesA );
+
+ if ( distSqr < minDistSqr ) {
+ VertexAFaceB_SetNewMin();
+ }
+
+ if ( done )
+ return;
+
+ signsA.setY( -signsA.getY() );
+ scalesA.setY( -scalesA.getY() );
+
+ distSqr = VertexAFaceBTest( done, t0, t1, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, scalesA );
+
+ if ( distSqr < minDistSqr ) {
+ VertexAFaceB_SetNewMin();
+ }
+
+ if ( done )
+ return;
+
+ signsA.setX( -signsA.getX() );
+ scalesA.setX( -scalesA.getX() );
+
+ distSqr = VertexAFaceBTest( done, t0, t1, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, scalesA );
+
+ if ( distSqr < minDistSqr ) {
+ VertexAFaceB_SetNewMin();
+ }
+}
+
+//-------------------------------------------------------------------------------------------------
+// CustomEdgeEdgeTest:
+//
+// tests whether a pair of edges are the closest features
+//
+// note on the shorthand:
+// 'a' & 'b' refer to the edges.
+// 'c' is the dimension of the axis that points from the face center to the edge Center
+// 'd' is the dimension of the edge Direction
+// the dimension of the face normal is 2
+//-------------------------------------------------------------------------------------------------
+
+#define CustomEdgeEdgeTest( ac, ac_letter, ad, ad_letter, bc, bc_letter, bd, bd_letter ) \
+{ \
+ vmVector3 edgeOffsetAB; \
+ vmVector3 edgeOffsetBA; \
+ \
+ edgeOffsetAB = faceOffsetAB + matrixAB.getCol##bc() * scalesB.get##bc_letter(); \
+ edgeOffsetAB.set##ac_letter( edgeOffsetAB.get##ac_letter() - scalesA.get##ac_letter() ); \
+ \
+ edgeOffsetBA = faceOffsetBA + matrixBA.getCol##ac() * scalesA.get##ac_letter(); \
+ edgeOffsetBA.set##bc_letter( edgeOffsetBA.get##bc_letter() - scalesB.get##bc_letter() ); \
+ \
+ float dirDot = matrixAB.getCol##bd().get##ad_letter(); \
+ float denom = 1.0f - dirDot*dirDot; \
+ float edgeOffsetAB_ad = edgeOffsetAB.get##ad_letter(); \
+ float edgeOffsetBA_bd = edgeOffsetBA.get##bd_letter(); \
+ \
+ if ( denom == 0.0f ) \
+ { \
+ tA = 0.0f; \
+ } \
+ else \
+ { \
+ tA = ( edgeOffsetAB_ad + edgeOffsetBA_bd * dirDot ) / denom; \
+ } \
+ \
+ if ( tA < -hA[ad] ) tA = -hA[ad]; \
+ else if ( tA > hA[ad] ) tA = hA[ad]; \
+ \
+ tB = tA * dirDot + edgeOffsetBA_bd; \
+ \
+ if ( tB < -hB[bd] ) \
+ { \
+ tB = -hB[bd]; \
+ tA = tB * dirDot + edgeOffsetAB_ad; \
+ \
+ if ( tA < -hA[ad] ) tA = -hA[ad]; \
+ else if ( tA > hA[ad] ) tA = hA[ad]; \
+ } \
+ else if ( tB > hB[bd] ) \
+ { \
+ tB = hB[bd]; \
+ tA = tB * dirDot + edgeOffsetAB_ad; \
+ \
+ if ( tA < -hA[ad] ) tA = -hA[ad]; \
+ else if ( tA > hA[ad] ) tA = hA[ad]; \
+ } \
+ \
+ vmVector3 edgeOffAB = vmVector3( mulPerElem( edgeOffsetAB + matrixAB.getCol##bd() * tB, signsA ) );\
+ vmVector3 edgeOffBA = vmVector3( mulPerElem( edgeOffsetBA + matrixBA.getCol##ad() * tA, signsB ) );\
+ \
+ inVoronoi = ( edgeOffAB[ac] >= voronoiTol * edgeOffAB[2] ) && \
+ ( edgeOffAB[2] >= voronoiTol * edgeOffAB[ac] ) && \
+ ( edgeOffBA[bc] >= voronoiTol * edgeOffBA[2] ) && \
+ ( edgeOffBA[2] >= voronoiTol * edgeOffBA[bc] ); \
+ \
+ edgeOffAB[ad] -= tA; \
+ edgeOffBA[bd] -= tB; \
+ \
+ return dot(edgeOffAB,edgeOffAB); \
+}
+
+float
+CustomEdgeEdgeTest_0101(
+ bool & inVoronoi,
+ float & tA,
+ float & tB,
+ const vmVector3 & hA,
+ const vmVector3 & hB,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsA,
+ PE_REF(vmVector3) signsB,
+ PE_REF(vmVector3) scalesA,
+ PE_REF(vmVector3) scalesB )
+{
+ CustomEdgeEdgeTest( 0, X, 1, Y, 0, X, 1, Y );
+}
+
+float
+CustomEdgeEdgeTest_0110(
+ bool & inVoronoi,
+ float & tA,
+ float & tB,
+ const vmVector3 & hA,
+ const vmVector3 & hB,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsA,
+ PE_REF(vmVector3) signsB,
+ PE_REF(vmVector3) scalesA,
+ PE_REF(vmVector3) scalesB )
+{
+ CustomEdgeEdgeTest( 0, X, 1, Y, 1, Y, 0, X );
+}
+
+float
+CustomEdgeEdgeTest_1001(
+ bool & inVoronoi,
+ float & tA,
+ float & tB,
+ const vmVector3 & hA,
+ const vmVector3 & hB,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsA,
+ PE_REF(vmVector3) signsB,
+ PE_REF(vmVector3) scalesA,
+ PE_REF(vmVector3) scalesB )
+{
+ CustomEdgeEdgeTest( 1, Y, 0, X, 0, X, 1, Y );
+}
+
+float
+CustomEdgeEdgeTest_1010(
+ bool & inVoronoi,
+ float & tA,
+ float & tB,
+ const vmVector3 & hA,
+ const vmVector3 & hB,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsA,
+ PE_REF(vmVector3) signsB,
+ PE_REF(vmVector3) scalesA,
+ PE_REF(vmVector3) scalesB )
+{
+ CustomEdgeEdgeTest( 1, Y, 0, X, 1, Y, 0, X );
+}
+
+#define EdgeEdge_SetNewMin( ac_letter, ad_letter, bc_letter, bd_letter ) \
+{ \
+ minDistSqr = distSqr; \
+ localPointA.set##ac_letter(scalesA.get##ac_letter()); \
+ localPointA.set##ad_letter(tA); \
+ localPointB.set##bc_letter(scalesB.get##bc_letter()); \
+ localPointB.set##bd_letter(tB); \
+ otherFaceDimA = testOtherFaceDimA; \
+ otherFaceDimB = testOtherFaceDimB; \
+ featureA = E; \
+ featureB = E; \
+}
+
+void
+EdgeEdgeTests(
+ bool & done,
+ float & minDistSqr,
+ vmPoint3 & localPointA,
+ vmPoint3 & localPointB,
+ int & otherFaceDimA,
+ int & otherFaceDimB,
+ FeatureType & featureA,
+ FeatureType & featureB,
+ const vmVector3 & hA,
+ const vmVector3 & hB,
+ PE_REF(vmVector3) faceOffsetAB,
+ PE_REF(vmVector3) faceOffsetBA,
+ const vmMatrix3 & matrixAB,
+ const vmMatrix3 & matrixBA,
+ PE_REF(vmVector3) signsA,
+ PE_REF(vmVector3) signsB,
+ PE_REF(vmVector3) scalesA,
+ PE_REF(vmVector3) scalesB,
+ bool first )
+{
+
+ float distSqr;
+ float tA, tB;
+
+ int testOtherFaceDimA, testOtherFaceDimB;
+
+ testOtherFaceDimA = 0;
+ testOtherFaceDimB = 0;
+
+ distSqr = CustomEdgeEdgeTest_0101( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( first ) {
+ EdgeEdge_SetNewMin( X, Y, X, Y );
+ } else {
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, X, Y );
+ }
+ }
+
+ if ( done )
+ return;
+
+ signsA.setX( -signsA.getX() );
+ scalesA.setX( -scalesA.getX() );
+
+ distSqr = CustomEdgeEdgeTest_0101( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, X, Y );
+ }
+
+ if ( done )
+ return;
+
+ signsB.setX( -signsB.getX() );
+ scalesB.setX( -scalesB.getX() );
+
+ distSqr = CustomEdgeEdgeTest_0101( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, X, Y );
+ }
+
+ if ( done )
+ return;
+
+ signsA.setX( -signsA.getX() );
+ scalesA.setX( -scalesA.getX() );
+
+ distSqr = CustomEdgeEdgeTest_0101( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, X, Y );
+ }
+
+ if ( done )
+ return;
+
+ testOtherFaceDimA = 1;
+ testOtherFaceDimB = 0;
+ signsB.setX( -signsB.getX() );
+ scalesB.setX( -scalesB.getX() );
+
+ distSqr = CustomEdgeEdgeTest_1001( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, X, Y );
+ }
+
+ if ( done )
+ return;
+
+ signsA.setY( -signsA.getY() );
+ scalesA.setY( -scalesA.getY() );
+
+ distSqr = CustomEdgeEdgeTest_1001( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, X, Y );
+ }
+
+ if ( done )
+ return;
+
+ signsB.setX( -signsB.getX() );
+ scalesB.setX( -scalesB.getX() );
+
+ distSqr = CustomEdgeEdgeTest_1001( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, X, Y );
+ }
+
+ if ( done )
+ return;
+
+ signsA.setY( -signsA.getY() );
+ scalesA.setY( -scalesA.getY() );
+
+ distSqr = CustomEdgeEdgeTest_1001( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, X, Y );
+ }
+
+ if ( done )
+ return;
+
+ testOtherFaceDimA = 0;
+ testOtherFaceDimB = 1;
+ signsB.setX( -signsB.getX() );
+ scalesB.setX( -scalesB.getX() );
+
+ distSqr = CustomEdgeEdgeTest_0110( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, Y, X );
+ }
+
+ if ( done )
+ return;
+
+ signsA.setX( -signsA.getX() );
+ scalesA.setX( -scalesA.getX() );
+
+ distSqr = CustomEdgeEdgeTest_0110( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, Y, X );
+ }
+
+ if ( done )
+ return;
+
+ signsB.setY( -signsB.getY() );
+ scalesB.setY( -scalesB.getY() );
+
+ distSqr = CustomEdgeEdgeTest_0110( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, Y, X );
+ }
+
+ if ( done )
+ return;
+
+ signsA.setX( -signsA.getX() );
+ scalesA.setX( -scalesA.getX() );
+
+ distSqr = CustomEdgeEdgeTest_0110( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( X, Y, Y, X );
+ }
+
+ if ( done )
+ return;
+
+ testOtherFaceDimA = 1;
+ testOtherFaceDimB = 1;
+ signsB.setY( -signsB.getY() );
+ scalesB.setY( -scalesB.getY() );
+
+ distSqr = CustomEdgeEdgeTest_1010( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, Y, X );
+ }
+
+ if ( done )
+ return;
+
+ signsA.setY( -signsA.getY() );
+ scalesA.setY( -scalesA.getY() );
+
+ distSqr = CustomEdgeEdgeTest_1010( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, Y, X );
+ }
+
+ if ( done )
+ return;
+
+ signsB.setY( -signsB.getY() );
+ scalesB.setY( -scalesB.getY() );
+
+ distSqr = CustomEdgeEdgeTest_1010( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, Y, X );
+ }
+
+ if ( done )
+ return;
+
+ signsA.setY( -signsA.getY() );
+ scalesA.setY( -scalesA.getY() );
+
+ distSqr = CustomEdgeEdgeTest_1010( done, tA, tB, hA, hB, faceOffsetAB, faceOffsetBA,
+ matrixAB, matrixBA, signsA, signsB, scalesA, scalesB );
+
+ if ( distSqr < minDistSqr ) {
+ EdgeEdge_SetNewMin( Y, X, Y, X );
+ }
+}
+
+
+float
+boxBoxDistance(vmVector3& normal, BoxPoint& boxPointA, BoxPoint& boxPointB,
+ PE_REF(Box) boxA, const vmTransform3 & transformA, PE_REF(Box) boxB,
+ const vmTransform3 & transformB,
+ float distanceThreshold)
+{
+ vmMatrix3 identity;
+ identity = vmMatrix3::identity();
+ vmVector3 ident[3];
+ ident[0] = identity.getCol0();
+ ident[1] = identity.getCol1();
+ ident[2] = identity.getCol2();
+
+ // get relative transformations
+
+ vmTransform3 transformAB, transformBA;
+ vmMatrix3 matrixAB, matrixBA;
+ vmVector3 offsetAB, offsetBA;
+
+ transformAB = orthoInverse(transformA) * transformB;
+ transformBA = orthoInverse(transformAB);
+
+ matrixAB = transformAB.getUpper3x3();
+ offsetAB = transformAB.getTranslation();
+ matrixBA = transformBA.getUpper3x3();
+ offsetBA = transformBA.getTranslation();
+
+ vmMatrix3 absMatrixAB = absPerElem(matrixAB);
+ vmMatrix3 absMatrixBA = absPerElem(matrixBA);
+
+ // find separating axis with largest gap between projections
+
+ BoxSepAxisType axisType;
+ vmVector3 axisA(0.0f), axisB(0.0f);
+ float gap, maxGap;
+ int faceDimA = 0, faceDimB = 0, edgeDimA = 0, edgeDimB = 0;
+
+ // face axes
+
+ vmVector3 gapsA = absPerElem(offsetAB) - boxA.mHalf - absMatrixAB * boxB.mHalf;
+
+ AaxisTest(0,X,true);
+ AaxisTest(1,Y,false);
+ AaxisTest(2,Z,false);
+
+ vmVector3 gapsB = absPerElem(offsetBA) - boxB.mHalf - absMatrixBA * boxA.mHalf;
+
+ BaxisTest(0,X);
+ BaxisTest(1,Y);
+ BaxisTest(2,Z);
+
+ // cross product axes
+
+ // ŠOÏ‚ª‚O‚Ì‚Æ‚«‚Ì‘Îô
+ absMatrixAB += vmMatrix3(1.0e-5f);
+ absMatrixBA += vmMatrix3(1.0e-5f);
+
+ vmMatrix3 lsqrs, projOffset, projAhalf, projBhalf;
+
+ lsqrs.setCol0( mulPerElem( matrixBA.getCol2(), matrixBA.getCol2() ) +
+ mulPerElem( matrixBA.getCol1(), matrixBA.getCol1() ) );
+ lsqrs.setCol1( mulPerElem( matrixBA.getCol2(), matrixBA.getCol2() ) +
+ mulPerElem( matrixBA.getCol0(), matrixBA.getCol0() ) );
+ lsqrs.setCol2( mulPerElem( matrixBA.getCol1(), matrixBA.getCol1() ) +
+ mulPerElem( matrixBA.getCol0(), matrixBA.getCol0() ) );
+
+ projOffset.setCol0(matrixBA.getCol1() * offsetAB.getZ() - matrixBA.getCol2() * offsetAB.getY());
+ projOffset.setCol1(matrixBA.getCol2() * offsetAB.getX() - matrixBA.getCol0() * offsetAB.getZ());
+ projOffset.setCol2(matrixBA.getCol0() * offsetAB.getY() - matrixBA.getCol1() * offsetAB.getX());
+
+ projAhalf.setCol0(absMatrixBA.getCol1() * boxA.mHalf.getZ() + absMatrixBA.getCol2() * boxA.mHalf.getY());
+ projAhalf.setCol1(absMatrixBA.getCol2() * boxA.mHalf.getX() + absMatrixBA.getCol0() * boxA.mHalf.getZ());
+ projAhalf.setCol2(absMatrixBA.getCol0() * boxA.mHalf.getY() + absMatrixBA.getCol1() * boxA.mHalf.getX());
+
+ projBhalf.setCol0(absMatrixAB.getCol1() * boxB.mHalf.getZ() + absMatrixAB.getCol2() * boxB.mHalf.getY());
+ projBhalf.setCol1(absMatrixAB.getCol2() * boxB.mHalf.getX() + absMatrixAB.getCol0() * boxB.mHalf.getZ());
+ projBhalf.setCol2(absMatrixAB.getCol0() * boxB.mHalf.getY() + absMatrixAB.getCol1() * boxB.mHalf.getX());
+
+ vmMatrix3 gapsAxB = absPerElem(projOffset) - projAhalf - transpose(projBhalf);
+
+ CrossAxisTest(0,0,X);
+ CrossAxisTest(0,1,Y);
+ CrossAxisTest(0,2,Z);
+ CrossAxisTest(1,0,X);
+ CrossAxisTest(1,1,Y);
+ CrossAxisTest(1,2,Z);
+ CrossAxisTest(2,0,X);
+ CrossAxisTest(2,1,Y);
+ CrossAxisTest(2,2,Z);
+
+ // need to pick the face on each box whose normal best matches the separating axis.
+ // will transform vectors to be in the coordinate system of this face to simplify things later.
+ // for this, a permutation matrix can be used, which the next section computes.
+
+ int dimA[3], dimB[3];
+
+ if ( axisType == A_AXIS ) {
+ if ( dot(axisA,offsetAB) < 0.0f )
+ axisA = -axisA;
+ axisB = matrixBA * -axisA;
+
+ vmVector3 absAxisB = vmVector3(absPerElem(axisB));
+
+ if ( ( absAxisB[0] > absAxisB[1] ) && ( absAxisB[0] > absAxisB[2] ) )
+ faceDimB = 0;
+ else if ( absAxisB[1] > absAxisB[2] )
+ faceDimB = 1;
+ else
+ faceDimB = 2;
+ } else if ( axisType == B_AXIS ) {
+ if ( dot(axisB,offsetBA) < 0.0f )
+ axisB = -axisB;
+ axisA = matrixAB * -axisB;
+
+ vmVector3 absAxisA = vmVector3(absPerElem(axisA));
+
+ if ( ( absAxisA[0] > absAxisA[1] ) && ( absAxisA[0] > absAxisA[2] ) )
+ faceDimA = 0;
+ else if ( absAxisA[1] > absAxisA[2] )
+ faceDimA = 1;
+ else
+ faceDimA = 2;
+ }
+
+ if ( axisType == CROSS_AXIS ) {
+ if ( dot(axisA,offsetAB) < 0.0f )
+ axisA = -axisA;
+ axisB = matrixBA * -axisA;
+
+ vmVector3 absAxisA = vmVector3(absPerElem(axisA));
+ vmVector3 absAxisB = vmVector3(absPerElem(axisB));
+
+ dimA[1] = edgeDimA;
+ dimB[1] = edgeDimB;
+
+ if ( edgeDimA == 0 ) {
+ if ( absAxisA[1] > absAxisA[2] ) {
+ dimA[0] = 2;
+ dimA[2] = 1;
+ } else {
+ dimA[0] = 1;
+ dimA[2] = 2;
+ }
+ } else if ( edgeDimA == 1 ) {
+ if ( absAxisA[2] > absAxisA[0] ) {
+ dimA[0] = 0;
+ dimA[2] = 2;
+ } else {
+ dimA[0] = 2;
+ dimA[2] = 0;
+ }
+ } else {
+ if ( absAxisA[0] > absAxisA[1] ) {
+ dimA[0] = 1;
+ dimA[2] = 0;
+ } else {
+ dimA[0] = 0;
+ dimA[2] = 1;
+ }
+ }
+
+ if ( edgeDimB == 0 ) {
+ if ( absAxisB[1] > absAxisB[2] ) {
+ dimB[0] = 2;
+ dimB[2] = 1;
+ } else {
+ dimB[0] = 1;
+ dimB[2] = 2;
+ }
+ } else if ( edgeDimB == 1 ) {
+ if ( absAxisB[2] > absAxisB[0] ) {
+ dimB[0] = 0;
+ dimB[2] = 2;
+ } else {
+ dimB[0] = 2;
+ dimB[2] = 0;
+ }
+ } else {
+ if ( absAxisB[0] > absAxisB[1] ) {
+ dimB[0] = 1;
+ dimB[2] = 0;
+ } else {
+ dimB[0] = 0;
+ dimB[2] = 1;
+ }
+ }
+ } else {
+ dimA[2] = faceDimA;
+ dimA[0] = (faceDimA+1)%3;
+ dimA[1] = (faceDimA+2)%3;
+ dimB[2] = faceDimB;
+ dimB[0] = (faceDimB+1)%3;
+ dimB[1] = (faceDimB+2)%3;
+ }
+
+ vmMatrix3 aperm_col, bperm_col;
+
+ aperm_col.setCol0(ident[dimA[0]]);
+ aperm_col.setCol1(ident[dimA[1]]);
+ aperm_col.setCol2(ident[dimA[2]]);
+
+ bperm_col.setCol0(ident[dimB[0]]);
+ bperm_col.setCol1(ident[dimB[1]]);
+ bperm_col.setCol2(ident[dimB[2]]);
+
+ vmMatrix3 aperm_row, bperm_row;
+
+ aperm_row = transpose(aperm_col);
+ bperm_row = transpose(bperm_col);
+
+ // permute all box parameters to be in the face coordinate systems
+
+ vmMatrix3 matrixAB_perm = aperm_row * matrixAB * bperm_col;
+ vmMatrix3 matrixBA_perm = transpose(matrixAB_perm);
+
+ vmVector3 offsetAB_perm, offsetBA_perm;
+
+ offsetAB_perm = aperm_row * offsetAB;
+ offsetBA_perm = bperm_row * offsetBA;
+
+ vmVector3 halfA_perm, halfB_perm;
+
+ halfA_perm = aperm_row * boxA.mHalf;
+ halfB_perm = bperm_row * boxB.mHalf;
+
+ // compute the vector between the centers of each face, in each face's coordinate frame
+
+ vmVector3 signsA_perm, signsB_perm, scalesA_perm, scalesB_perm, faceOffsetAB_perm, faceOffsetBA_perm;
+
+ signsA_perm = copySignPerElem(vmVector3(1.0f),aperm_row * axisA);
+ signsB_perm = copySignPerElem(vmVector3(1.0f),bperm_row * axisB);
+ scalesA_perm = mulPerElem( signsA_perm, halfA_perm );
+ scalesB_perm = mulPerElem( signsB_perm, halfB_perm );
+
+ faceOffsetAB_perm = offsetAB_perm + matrixAB_perm.getCol2() * scalesB_perm.getZ();
+ faceOffsetAB_perm.setZ( faceOffsetAB_perm.getZ() - scalesA_perm.getZ() );
+
+ faceOffsetBA_perm = offsetBA_perm + matrixBA_perm.getCol2() * scalesA_perm.getZ();
+ faceOffsetBA_perm.setZ( faceOffsetBA_perm.getZ() - scalesB_perm.getZ() );
+
+ if ( maxGap < 0.0f ) {
+ // if boxes overlap, this will separate the faces for finding points of penetration.
+
+ faceOffsetAB_perm -= aperm_row * axisA * maxGap * 1.01f;
+ faceOffsetBA_perm -= bperm_row * axisB * maxGap * 1.01f;
+ }
+
+ // for each vertex/face or edge/edge pair of the two faces, find the closest points.
+ //
+ // these points each have an associated box feature (vertex, edge, or face). if each
+ // point is in the external Voronoi region of the other's feature, they are the
+ // closest points of the boxes, and the algorithm can exit.
+ //
+ // the feature pairs are arranged so that in the general case, the first test will
+ // succeed. degenerate cases (parallel faces) may require up to all tests in the
+ // worst case.
+ //
+ // if for some reason no case passes the Voronoi test, the features with the minimum
+ // distance are returned.
+
+ vmPoint3 localPointA_perm, localPointB_perm;
+ float minDistSqr;
+ bool done;
+
+ vmVector3 hA_perm( halfA_perm ), hB_perm( halfB_perm );
+
+ localPointA_perm.setZ( scalesA_perm.getZ() );
+ localPointB_perm.setZ( scalesB_perm.getZ() );
+ scalesA_perm.setZ(0.0f);
+ scalesB_perm.setZ(0.0f);
+
+ int otherFaceDimA, otherFaceDimB;
+ FeatureType featureA, featureB;
+
+ if ( axisType == CROSS_AXIS ) {
+ EdgeEdgeTests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ otherFaceDimA, otherFaceDimB, featureA, featureB,
+ hA_perm, hB_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsA_perm, signsB_perm,
+ scalesA_perm, scalesB_perm, true );
+
+ if ( !done ) {
+ VertexBFaceATests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ featureA, featureB,
+ hA_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsB_perm, scalesB_perm, false );
+
+ if ( !done ) {
+ VertexAFaceBTests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ featureA, featureB,
+ hB_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsA_perm, scalesA_perm, false );
+ }
+ }
+ } else if ( axisType == B_AXIS ) {
+ VertexAFaceBTests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ featureA, featureB,
+ hB_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsA_perm, scalesA_perm, true );
+
+ if ( !done ) {
+ VertexBFaceATests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ featureA, featureB,
+ hA_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsB_perm, scalesB_perm, false );
+
+ if ( !done ) {
+ EdgeEdgeTests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ otherFaceDimA, otherFaceDimB, featureA, featureB,
+ hA_perm, hB_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsA_perm, signsB_perm,
+ scalesA_perm, scalesB_perm, false );
+ }
+ }
+ } else {
+ VertexBFaceATests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ featureA, featureB,
+ hA_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsB_perm, scalesB_perm, true );
+
+ if ( !done ) {
+ VertexAFaceBTests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ featureA, featureB,
+ hB_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsA_perm, scalesA_perm, false );
+
+ if ( !done ) {
+ EdgeEdgeTests( done, minDistSqr, localPointA_perm, localPointB_perm,
+ otherFaceDimA, otherFaceDimB, featureA, featureB,
+ hA_perm, hB_perm, faceOffsetAB_perm, faceOffsetBA_perm,
+ matrixAB_perm, matrixBA_perm, signsA_perm, signsB_perm,
+ scalesA_perm, scalesB_perm, false );
+ }
+ }
+ }
+
+ // convert local points from face-local to box-local coordinate system
+
+
+ boxPointA.localPoint = vmPoint3( aperm_col * vmVector3( localPointA_perm )) ;
+ boxPointB.localPoint = vmPoint3( bperm_col * vmVector3( localPointB_perm )) ;
+
+#if 0
+ // find which features of the boxes are involved.
+ // the only feature pairs which occur in this function are VF, FV, and EE, even though the
+ // closest points might actually lie on sub-features, as in a VF contact might be used for
+ // what's actually a VV contact. this means some feature pairs could possibly seem distinct
+ // from others, although their contact positions are the same. don't know yet whether this
+ // matters.
+
+ int sA[3], sB[3];
+
+ sA[0] = boxPointA.localPoint.getX() > 0.0f;
+ sA[1] = boxPointA.localPoint.getY() > 0.0f;
+ sA[2] = boxPointA.localPoint.getZ() > 0.0f;
+
+ sB[0] = boxPointB.localPoint.getX() > 0.0f;
+ sB[1] = boxPointB.localPoint.getY() > 0.0f;
+ sB[2] = boxPointB.localPoint.getZ() > 0.0f;
+
+ if ( featureA == F ) {
+ boxPointA.setFaceFeature( dimA[2], sA[dimA[2]] );
+ } else if ( featureA == E ) {
+ boxPointA.setEdgeFeature( dimA[2], sA[dimA[2]], dimA[otherFaceDimA], sA[dimA[otherFaceDimA]] );
+ } else {
+ boxPointA.setVertexFeature( sA[0], sA[1], sA[2] );
+ }
+
+ if ( featureB == F ) {
+ boxPointB.setFaceFeature( dimB[2], sB[dimB[2]] );
+ } else if ( featureB == E ) {
+ boxPointB.setEdgeFeature( dimB[2], sB[dimB[2]], dimB[otherFaceDimB], sB[dimB[otherFaceDimB]] );
+ } else {
+ boxPointB.setVertexFeature( sB[0], sB[1], sB[2] );
+ }
+#endif
+
+ normal = transformA * axisA;
+
+ if ( maxGap < 0.0f ) {
+ return (maxGap);
+ } else {
+ return (sqrtf( minDistSqr ));
+ }
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h
new file mode 100644
index 00000000..0d4957de
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h
@@ -0,0 +1,65 @@
+/*
+ Copyright (C) 2006, 2008 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+
+#ifndef __BOXBOXDISTANCE_H__
+#define __BOXBOXDISTANCE_H__
+
+
+#include "Box.h"
+
+
+//---------------------------------------------------------------------------
+// boxBoxDistance:
+//
+// description:
+// this computes info that can be used for the collision response of two boxes. when the boxes
+// do not overlap, the points are set to the closest points of the boxes, and a positive
+// distance between them is returned. if the boxes do overlap, a negative distance is returned
+// and the points are set to two points that would touch after the boxes are translated apart.
+// the contact normal gives the direction to repel or separate the boxes when they touch or
+// overlap (it's being approximated here as one of the 15 "separating axis" directions).
+//
+// returns:
+// positive or negative distance between two boxes.
+//
+// args:
+// vmVector3& normal: set to a unit contact normal pointing from box A to box B.
+//
+// BoxPoint& boxPointA, BoxPoint& boxPointB:
+// set to a closest point or point of penetration on each box.
+//
+// Box boxA, Box boxB:
+// boxes, represented as 3 half-widths
+//
+// const vmTransform3& transformA, const vmTransform3& transformB:
+// box transformations, in world coordinates
+//
+// float distanceThreshold:
+// the algorithm will exit early if it finds that the boxes are more distant than this
+// threshold, and not compute a contact normal or points. if this distance returned
+// exceeds the threshold, all the other output data may not have been computed. by
+// default, this is set to MAX_FLOAT so it will have no effect.
+//
+//---------------------------------------------------------------------------
+
+float
+boxBoxDistance(vmVector3& normal, BoxPoint& boxPointA, BoxPoint& boxPointB,
+ PE_REF(Box) boxA, const vmTransform3 & transformA, PE_REF(Box) boxB,
+ const vmTransform3 & transformB,
+ float distanceThreshold = FLT_MAX );
+
+#endif /* __BOXBOXDISTANCE_H__ */
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/readme.txt b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/readme.txt
new file mode 100644
index 00000000..5b4a9070
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuNarrowPhaseCollisionTask/readme.txt
@@ -0,0 +1 @@
+Empty placeholder for future Libspe2 SPU task
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp b/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp
new file mode 100644
index 00000000..fe619555
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp
@@ -0,0 +1,214 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, Copyright (c) 2007 Erwin Coumans
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+
+#include "SpuSampleTask.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+#include "../PlatformDefinitions.h"
+#include "../SpuFakeDma.h"
+#include "LinearMath/btMinMax.h"
+
+#ifdef __SPU__
+#include <spu_printf.h>
+#else
+#include <stdio.h>
+#define spu_printf printf
+#endif
+
+#define MAX_NUM_BODIES 8192
+
+struct SampleTask_LocalStoreMemory
+{
+ ATTRIBUTE_ALIGNED16(char gLocalRigidBody [sizeof(btRigidBody)+16]);
+ ATTRIBUTE_ALIGNED16(void* gPointerArray[MAX_NUM_BODIES]);
+
+};
+
+
+
+
+//-- MAIN METHOD
+void processSampleTask(void* userPtr, void* lsMemory)
+{
+ // BT_PROFILE("processSampleTask");
+
+ SampleTask_LocalStoreMemory* localMemory = (SampleTask_LocalStoreMemory*)lsMemory;
+
+ SpuSampleTaskDesc* taskDescPtr = (SpuSampleTaskDesc*)userPtr;
+ SpuSampleTaskDesc& taskDesc = *taskDescPtr;
+
+ switch (taskDesc.m_sampleCommand)
+ {
+ case CMD_SAMPLE_INTEGRATE_BODIES:
+ {
+ btTransform predictedTrans;
+ btCollisionObject** eaPtr = (btCollisionObject**)taskDesc.m_mainMemoryPtr;
+
+ int batchSize = taskDesc.m_sampleValue;
+ if (batchSize>MAX_NUM_BODIES)
+ {
+ spu_printf("SPU Error: exceed number of bodies, see MAX_NUM_BODIES in SpuSampleTask.cpp\n");
+ break;
+ }
+ int dmaArraySize = batchSize*sizeof(void*);
+
+ uint64_t ppuArrayAddress = reinterpret_cast<uint64_t>(eaPtr);
+
+ // spu_printf("array location is at %llx, batchSize = %d, DMA size = %d\n",ppuArrayAddress,batchSize,dmaArraySize);
+
+ if (dmaArraySize>=16)
+ {
+ cellDmaLargeGet((void*)&localMemory->gPointerArray[0], ppuArrayAddress , dmaArraySize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ } else
+ {
+ stallingUnalignedDmaSmallGet((void*)&localMemory->gPointerArray[0], ppuArrayAddress , dmaArraySize);
+ }
+
+
+ for ( int i=0;i<batchSize;i++)
+ {
+ ///DMA rigid body
+
+ void* localPtr = &localMemory->gLocalRigidBody[0];
+ void* shortAdd = localMemory->gPointerArray[i];
+ uint64_t ppuRigidBodyAddress = reinterpret_cast<uint64_t>(shortAdd);
+
+ // spu_printf("cellDmaGet at CMD_SAMPLE_INTEGRATE_BODIES from %llx to %llx\n",ppuRigidBodyAddress,localPtr);
+
+ int dmaBodySize = sizeof(btRigidBody);
+
+ cellDmaGet((void*)localPtr, ppuRigidBodyAddress , dmaBodySize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+
+ float timeStep = 1.f/60.f;
+
+ btRigidBody* body = (btRigidBody*) localPtr;//btRigidBody::upcast(colObj);
+ if (body)
+ {
+ if (body->isActive() && (!body->isStaticOrKinematicObject()))
+ {
+ body->predictIntegratedTransform(timeStep, predictedTrans);
+ body->proceedToTransform( predictedTrans);
+ void* ptr = (void*)localPtr;
+ // spu_printf("cellDmaLargePut from %llx to LS %llx\n",ptr,ppuRigidBodyAddress);
+
+ cellDmaLargePut(ptr, ppuRigidBodyAddress , dmaBodySize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+ }
+ }
+
+ }
+ break;
+ }
+
+
+ case CMD_SAMPLE_PREDICT_MOTION_BODIES:
+ {
+ btTransform predictedTrans;
+ btCollisionObject** eaPtr = (btCollisionObject**)taskDesc.m_mainMemoryPtr;
+
+ int batchSize = taskDesc.m_sampleValue;
+ int dmaArraySize = batchSize*sizeof(void*);
+
+ if (batchSize>MAX_NUM_BODIES)
+ {
+ spu_printf("SPU Error: exceed number of bodies, see MAX_NUM_BODIES in SpuSampleTask.cpp\n");
+ break;
+ }
+
+ uint64_t ppuArrayAddress = reinterpret_cast<uint64_t>(eaPtr);
+
+ // spu_printf("array location is at %llx, batchSize = %d, DMA size = %d\n",ppuArrayAddress,batchSize,dmaArraySize);
+
+ if (dmaArraySize>=16)
+ {
+ cellDmaLargeGet((void*)&localMemory->gPointerArray[0], ppuArrayAddress , dmaArraySize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ } else
+ {
+ stallingUnalignedDmaSmallGet((void*)&localMemory->gPointerArray[0], ppuArrayAddress , dmaArraySize);
+ }
+
+
+ for ( int i=0;i<batchSize;i++)
+ {
+ ///DMA rigid body
+
+ void* localPtr = &localMemory->gLocalRigidBody[0];
+ void* shortAdd = localMemory->gPointerArray[i];
+ uint64_t ppuRigidBodyAddress = reinterpret_cast<uint64_t>(shortAdd);
+
+ // spu_printf("cellDmaGet at CMD_SAMPLE_INTEGRATE_BODIES from %llx to %llx\n",ppuRigidBodyAddress,localPtr);
+
+ int dmaBodySize = sizeof(btRigidBody);
+
+ cellDmaGet((void*)localPtr, ppuRigidBodyAddress , dmaBodySize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+
+
+ float timeStep = 1.f/60.f;
+
+ btRigidBody* body = (btRigidBody*) localPtr;//btRigidBody::upcast(colObj);
+ if (body)
+ {
+ if (!body->isStaticOrKinematicObject())
+ {
+ if (body->isActive())
+ {
+ body->integrateVelocities( timeStep);
+ //damping
+ body->applyDamping(timeStep);
+
+ body->predictIntegratedTransform(timeStep,body->getInterpolationWorldTransform());
+
+ void* ptr = (void*)localPtr;
+ cellDmaLargePut(ptr, ppuRigidBodyAddress , dmaBodySize, DMA_TAG(1), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(1));
+ }
+ }
+ }
+
+ }
+ break;
+ }
+
+
+
+ default:
+ {
+
+ }
+ };
+}
+
+
+#if defined(__CELLOS_LV2__) || defined (LIBSPE2)
+
+ATTRIBUTE_ALIGNED16(SampleTask_LocalStoreMemory gLocalStoreMemory);
+
+void* createSampleLocalStoreMemory()
+{
+ return &gLocalStoreMemory;
+}
+#else
+void* createSampleLocalStoreMemory()
+{
+ return new SampleTask_LocalStoreMemory;
+};
+
+#endif
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h b/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h
new file mode 100644
index 00000000..c8ebdfd6
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h
@@ -0,0 +1,54 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, Copyright (c) 2007 Erwin Coumans
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef SPU_SAMPLE_TASK_H
+#define SPU_SAMPLE_TASK_H
+
+#include "../PlatformDefinitions.h"
+#include "LinearMath/btScalar.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btMatrix3x3.h"
+
+#include "LinearMath/btAlignedAllocator.h"
+
+
+enum
+{
+ CMD_SAMPLE_INTEGRATE_BODIES = 1,
+ CMD_SAMPLE_PREDICT_MOTION_BODIES
+};
+
+
+
+ATTRIBUTE_ALIGNED16(struct) SpuSampleTaskDesc
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ uint32_t m_sampleCommand;
+ uint32_t m_taskId;
+
+ uint64_t m_mainMemoryPtr;
+ int m_sampleValue;
+
+
+};
+
+
+void processSampleTask(void* userPtr, void* lsMemory);
+void* createSampleLocalStoreMemory();
+
+
+#endif //SPU_SAMPLE_TASK_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/readme.txt b/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/readme.txt
new file mode 100644
index 00000000..5b4a9070
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuSampleTask/readme.txt
@@ -0,0 +1 @@
+Empty placeholder for future Libspe2 SPU task
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.cpp b/tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.cpp
new file mode 100644
index 00000000..11cb9e7c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.cpp
@@ -0,0 +1,222 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//#define __CELLOS_LV2__ 1
+
+#define USE_SAMPLE_PROCESS 1
+#ifdef USE_SAMPLE_PROCESS
+
+
+#include "SpuSampleTaskProcess.h"
+#include <stdio.h>
+
+#ifdef __SPU__
+
+
+
+void SampleThreadFunc(void* userPtr,void* lsMemory)
+{
+ //do nothing
+ printf("hello world\n");
+}
+
+
+void* SamplelsMemoryFunc()
+{
+ //don't create local store memory, just return 0
+ return 0;
+}
+
+
+#else
+
+
+#include "btThreadSupportInterface.h"
+
+//# include "SPUAssert.h"
+#include <string.h>
+
+
+
+extern "C" {
+ extern char SPU_SAMPLE_ELF_SYMBOL[];
+}
+
+
+
+
+
+SpuSampleTaskProcess::SpuSampleTaskProcess(btThreadSupportInterface* threadInterface, int maxNumOutstandingTasks)
+:m_threadInterface(threadInterface),
+m_maxNumOutstandingTasks(maxNumOutstandingTasks)
+{
+
+ m_taskBusy.resize(m_maxNumOutstandingTasks);
+ m_spuSampleTaskDesc.resize(m_maxNumOutstandingTasks);
+
+ for (int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ m_taskBusy[i] = false;
+ }
+ m_numBusyTasks = 0;
+ m_currentTask = 0;
+
+ m_initialized = false;
+
+ m_threadInterface->startSPU();
+
+
+}
+
+SpuSampleTaskProcess::~SpuSampleTaskProcess()
+{
+ m_threadInterface->stopSPU();
+
+}
+
+
+
+void SpuSampleTaskProcess::initialize()
+{
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("SpuSampleTaskProcess::initialize()\n");
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+ for (int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ m_taskBusy[i] = false;
+ }
+ m_numBusyTasks = 0;
+ m_currentTask = 0;
+ m_initialized = true;
+
+}
+
+
+void SpuSampleTaskProcess::issueTask(void* sampleMainMemPtr,int sampleValue,int sampleCommand)
+{
+
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("SpuSampleTaskProcess::issueTask (m_currentTask= %d\)n", m_currentTask);
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+ m_taskBusy[m_currentTask] = true;
+ m_numBusyTasks++;
+
+ SpuSampleTaskDesc& taskDesc = m_spuSampleTaskDesc[m_currentTask];
+ {
+ // send task description in event message
+ // no error checking here...
+ // but, currently, event queue can be no larger than NUM_WORKUNIT_TASKS.
+
+ taskDesc.m_mainMemoryPtr = reinterpret_cast<uint64_t>(sampleMainMemPtr);
+ taskDesc.m_sampleValue = sampleValue;
+ taskDesc.m_sampleCommand = sampleCommand;
+
+ //some bookkeeping to recognize finished tasks
+ taskDesc.m_taskId = m_currentTask;
+ }
+
+
+ m_threadInterface->sendRequest(1, (ppu_address_t) &taskDesc, m_currentTask);
+
+ // if all tasks busy, wait for spu event to clear the task.
+
+ if (m_numBusyTasks >= m_maxNumOutstandingTasks)
+ {
+ unsigned int taskId;
+ unsigned int outputSize;
+
+ for (int i=0;i<m_maxNumOutstandingTasks;i++)
+ {
+ if (m_taskBusy[i])
+ {
+ taskId = i;
+ break;
+ }
+ }
+ m_threadInterface->waitForResponse(&taskId, &outputSize);
+
+ //printf("PPU: after issue, received event: %u %d\n", taskId, outputSize);
+
+ postProcess(taskId, outputSize);
+
+ m_taskBusy[taskId] = false;
+
+ m_numBusyTasks--;
+ }
+
+ // find new task buffer
+ for (int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ if (!m_taskBusy[i])
+ {
+ m_currentTask = i;
+ break;
+ }
+ }
+}
+
+
+///Optional PPU-size post processing for each task
+void SpuSampleTaskProcess::postProcess(int taskId, int outputSize)
+{
+
+}
+
+
+void SpuSampleTaskProcess::flush()
+{
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("\nSpuCollisionTaskProcess::flush()\n");
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+
+ // all tasks are issued, wait for all tasks to be complete
+ while(m_numBusyTasks > 0)
+ {
+// Consolidating SPU code
+ unsigned int taskId;
+ unsigned int outputSize;
+
+ for (int i=0;i<m_maxNumOutstandingTasks;i++)
+ {
+ if (m_taskBusy[i])
+ {
+ taskId = i;
+ break;
+ }
+ }
+ {
+
+ m_threadInterface->waitForResponse(&taskId, &outputSize);
+ }
+
+ //printf("PPU: flushing, received event: %u %d\n", taskId, outputSize);
+
+ postProcess(taskId, outputSize);
+
+ m_taskBusy[taskId] = false;
+
+ m_numBusyTasks--;
+ }
+
+
+}
+
+#endif
+
+
+#endif //USE_SAMPLE_PROCESS
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.h b/tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.h
new file mode 100644
index 00000000..6173225a
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuSampleTaskProcess.h
@@ -0,0 +1,153 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SPU_SAMPLE_TASK_PROCESS_H
+#define BT_SPU_SAMPLE_TASK_PROCESS_H
+
+#include <assert.h>
+
+
+#include "PlatformDefinitions.h"
+
+#include <stdlib.h>
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+#include "SpuSampleTask/SpuSampleTask.h"
+
+
+//just add your commands here, try to keep them globally unique for debugging purposes
+#define CMD_SAMPLE_TASK_COMMAND 10
+
+
+
+/// SpuSampleTaskProcess handles SPU processing of collision pairs.
+/// When PPU issues a task, it will look for completed task buffers
+/// PPU will do postprocessing, dependent on workunit output (not likely)
+class SpuSampleTaskProcess
+{
+ // track task buffers that are being used, and total busy tasks
+ btAlignedObjectArray<bool> m_taskBusy;
+ btAlignedObjectArray<SpuSampleTaskDesc>m_spuSampleTaskDesc;
+
+ int m_numBusyTasks;
+
+ // the current task and the current entry to insert a new work unit
+ int m_currentTask;
+
+ bool m_initialized;
+
+ void postProcess(int taskId, int outputSize);
+
+ class btThreadSupportInterface* m_threadInterface;
+
+ int m_maxNumOutstandingTasks;
+
+
+
+public:
+ SpuSampleTaskProcess(btThreadSupportInterface* threadInterface, int maxNumOutstandingTasks);
+
+ ~SpuSampleTaskProcess();
+
+ ///call initialize in the beginning of the frame, before addCollisionPairToTask
+ void initialize();
+
+ void issueTask(void* sampleMainMemPtr,int sampleValue,int sampleCommand);
+
+ ///call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished
+ void flush();
+};
+
+
+#if defined(USE_LIBSPE2) && defined(__SPU__)
+////////////////////MAIN/////////////////////////////
+#include "../SpuLibspe2Support.h"
+#include <spu_intrinsics.h>
+#include <spu_mfcio.h>
+#include <SpuFakeDma.h>
+
+void * SamplelsMemoryFunc();
+void SampleThreadFunc(void* userPtr,void* lsMemory);
+
+//#define DEBUG_LIBSPE2_MAINLOOP
+
+int main(unsigned long long speid, addr64 argp, addr64 envp)
+{
+ printf("SPU is up \n");
+
+ ATTRIBUTE_ALIGNED128(btSpuStatus status);
+ ATTRIBUTE_ALIGNED16( SpuSampleTaskDesc taskDesc ) ;
+ unsigned int received_message = Spu_Mailbox_Event_Nothing;
+ bool shutdown = false;
+
+ cellDmaGet(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ status.m_status = Spu_Status_Free;
+ status.m_lsMemory.p = SamplelsMemoryFunc();
+
+ cellDmaLargePut(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+
+ while (!shutdown)
+ {
+ received_message = spu_read_in_mbox();
+
+
+
+ switch(received_message)
+ {
+ case Spu_Mailbox_Event_Shutdown:
+ shutdown = true;
+ break;
+ case Spu_Mailbox_Event_Task:
+ // refresh the status
+#ifdef DEBUG_LIBSPE2_MAINLOOP
+ printf("SPU recieved Task \n");
+#endif //DEBUG_LIBSPE2_MAINLOOP
+ cellDmaGet(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ btAssert(status.m_status==Spu_Status_Occupied);
+
+ cellDmaGet(&taskDesc, status.m_taskDesc.p, sizeof(SpuSampleTaskDesc), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ SampleThreadFunc((void*)&taskDesc, reinterpret_cast<void*> (taskDesc.m_mainMemoryPtr) );
+ break;
+ case Spu_Mailbox_Event_Nothing:
+ default:
+ break;
+ }
+
+ // set to status free and wait for next task
+ status.m_status = Spu_Status_Free;
+ cellDmaLargePut(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+
+ }
+ return 0;
+}
+//////////////////////////////////////////////////////
+#endif
+
+
+
+#endif // BT_SPU_SAMPLE_TASK_PROCESS_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/SpuSync.h b/tests/bullet/src/BulletMultiThreaded/SpuSync.h
new file mode 100644
index 00000000..4157b8f0
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/SpuSync.h
@@ -0,0 +1,149 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2007 Starbreeze Studios
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+Written by: Marten Svanfeldt
+*/
+
+#ifndef BT_SPU_SYNC_H
+#define BT_SPU_SYNC_H
+
+
+#include "PlatformDefinitions.h"
+
+
+#if defined(WIN32)
+
+#define WIN32_LEAN_AND_MEAN
+#ifdef _XBOX
+#include <Xtl.h>
+#else
+#include <Windows.h>
+#endif
+
+///The btSpinlock is a structure to allow multi-platform synchronization. This allows to port the SPU tasks to other platforms.
+class btSpinlock
+{
+public:
+ //typedef volatile LONG SpinVariable;
+ typedef CRITICAL_SECTION SpinVariable;
+
+ btSpinlock (SpinVariable* var)
+ : spinVariable (var)
+ {}
+
+ void Init ()
+ {
+ //*spinVariable = 0;
+ InitializeCriticalSection(spinVariable);
+ }
+
+ void Lock ()
+ {
+ EnterCriticalSection(spinVariable);
+ }
+
+ void Unlock ()
+ {
+ LeaveCriticalSection(spinVariable);
+ }
+
+private:
+ SpinVariable* spinVariable;
+};
+
+
+#elif defined (__CELLOS_LV2__)
+
+//#include <cell/atomic.h>
+#include <cell/sync/mutex.h>
+
+///The btSpinlock is a structure to allow multi-platform synchronization. This allows to port the SPU tasks to other platforms.
+class btSpinlock
+{
+public:
+ typedef CellSyncMutex SpinVariable;
+
+ btSpinlock (SpinVariable* var)
+ : spinVariable (var)
+ {}
+
+ void Init ()
+ {
+#ifndef __SPU__
+ //*spinVariable = 1;
+ cellSyncMutexInitialize(spinVariable);
+#endif
+ }
+
+
+
+ void Lock ()
+ {
+#ifdef __SPU__
+ // lock semaphore
+ /*while (cellAtomicTestAndDecr32(atomic_buf, (uint64_t)spinVariable) == 0)
+ {
+
+ };*/
+ cellSyncMutexLock((uint64_t)spinVariable);
+#endif
+ }
+
+ void Unlock ()
+ {
+#ifdef __SPU__
+ //cellAtomicIncr32(atomic_buf, (uint64_t)spinVariable);
+ cellSyncMutexUnlock((uint64_t)spinVariable);
+#endif
+ }
+
+
+private:
+ SpinVariable* spinVariable;
+ ATTRIBUTE_ALIGNED128(uint32_t atomic_buf[32]);
+};
+
+#else
+//create a dummy implementation (without any locking) useful for serial processing
+class btSpinlock
+{
+public:
+ typedef int SpinVariable;
+
+ btSpinlock (SpinVariable* var)
+ : spinVariable (var)
+ {}
+
+ void Init ()
+ {
+ }
+
+ void Lock ()
+ {
+ }
+
+ void Unlock ()
+ {
+ }
+
+private:
+ SpinVariable* spinVariable;
+};
+
+
+#endif
+
+
+#endif //BT_SPU_SYNC_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/TrbDynBody.h b/tests/bullet/src/BulletMultiThreaded/TrbDynBody.h
new file mode 100644
index 00000000..4d14212c
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/TrbDynBody.h
@@ -0,0 +1,79 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef BT_RB_DYN_BODY_H__
+#define BT_RB_DYN_BODY_H__
+
+#include "vectormath/vmInclude.h"
+using namespace Vectormath::Aos;
+
+#include "TrbStateVec.h"
+
+class CollObject;
+
+class TrbDynBody
+{
+public:
+ TrbDynBody()
+ {
+ fMass = 0.0f;
+ fCollObject = NULL;
+ fElasticity = 0.2f;
+ fFriction = 0.8f;
+ }
+
+ // Get methods
+ float getMass() const {return fMass;};
+ float getElasticity() const {return fElasticity;}
+ float getFriction() const {return fFriction;}
+ CollObject* getCollObject() const {return fCollObject;}
+ const Matrix3 &getBodyInertia() const {return fIBody;}
+ const Matrix3 &getBodyInertiaInv() const {return fIBodyInv;}
+ float getMassInv() const {return fMassInv;}
+
+ // Set methods
+ void setMass(float mass) {fMass=mass;fMassInv=mass>0.0f?1.0f/mass:0.0f;}
+ void setBodyInertia(const Matrix3 bodyInertia) {fIBody = bodyInertia;fIBodyInv = inverse(bodyInertia);}
+ void setElasticity(float elasticity) {fElasticity = elasticity;}
+ void setFriction(float friction) {fFriction = friction;}
+ void setCollObject(CollObject *collObj) {fCollObject = collObj;}
+
+ void setBodyInertiaInv(const Matrix3 bodyInertiaInv)
+ {
+ fIBody = inverse(bodyInertiaInv);
+ fIBodyInv = bodyInertiaInv;
+ }
+ void setMassInv(float invMass) {
+ fMass= invMass>0.0f ? 1.0f/invMass :0.0f;
+ fMassInv=invMass;
+ }
+
+
+private:
+ // Rigid Body constants
+ float fMass; // Rigid Body mass
+ float fMassInv; // Inverse of mass
+ Matrix3 fIBody; // Inertia matrix in body's coords
+ Matrix3 fIBodyInv; // Inertia matrix inverse in body's coords
+ float fElasticity; // Coefficient of restitution
+ float fFriction; // Coefficient of friction
+
+public:
+ CollObject* fCollObject; // Collision object corresponding the RB
+} __attribute__ ((aligned(16)));
+
+#endif //BT_RB_DYN_BODY_H__
+
diff --git a/tests/bullet/src/BulletMultiThreaded/TrbStateVec.h b/tests/bullet/src/BulletMultiThreaded/TrbStateVec.h
new file mode 100644
index 00000000..46d1904a
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/TrbStateVec.h
@@ -0,0 +1,339 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef BT_TRBSTATEVEC_H__
+#define BT_TRBSTATEVEC_H__
+
+#include <stdlib.h>
+#ifdef PFX_USE_FREE_VECTORMATH
+#include "vecmath/vmInclude.h"
+#else
+#include "vectormath/vmInclude.h"
+#endif //PFX_USE_FREE_VECTORMATH
+
+
+#include "PlatformDefinitions.h"
+
+
+static inline vmVector3 read_Vector3(const float* p)
+{
+ vmVector3 v;
+ loadXYZ(v, p);
+ return v;
+}
+
+static inline vmQuat read_Quat(const float* p)
+{
+ vmQuat vq;
+ loadXYZW(vq, p);
+ return vq;
+}
+
+static inline void store_Vector3(const vmVector3 &src, float* p)
+{
+ vmVector3 v = src;
+ storeXYZ(v, p);
+}
+
+static inline void store_Quat(const vmQuat &src, float* p)
+{
+ vmQuat vq = src;
+ storeXYZW(vq, p);
+}
+
+// Motion Type
+enum {
+ PfxMotionTypeFixed = 0,
+ PfxMotionTypeActive,
+ PfxMotionTypeKeyframe,
+ PfxMotionTypeOneWay,
+ PfxMotionTypeTrigger,
+ PfxMotionTypeCount
+};
+
+#define PFX_MOTION_MASK_DYNAMIC 0x0a // Active,OneWay
+#define PFX_MOTION_MASK_STATIC 0x95 // Fixed,Keyframe,Trigger,Sleeping
+#define PFX_MOTION_MASK_SLEEP 0x0e // Can sleep
+#define PFX_MOTION_MASK_TYPE 0x7f
+
+//
+// Rigid Body state
+//
+
+#ifdef __CELLOS_LV2__
+ATTRIBUTE_ALIGNED128(class) TrbState
+#else
+ATTRIBUTE_ALIGNED16(class) TrbState
+#endif
+
+{
+public:
+ TrbState()
+ {
+ setMotionType(PfxMotionTypeActive);
+ contactFilterSelf=contactFilterTarget=0xffffffff;
+ deleted = 0;
+ mSleeping = 0;
+ useSleep = 1;
+ trbBodyIdx=0;
+ mSleepCount=0;
+ useCcd = 0;
+ useContactCallback = 0;
+ useSleepCallback = 0;
+ linearDamping = 1.0f;
+ angularDamping = 0.99f;
+ }
+
+ TrbState(const uint8_t m, const vmVector3& x, const vmQuat& q, const vmVector3& v, const vmVector3& omega );
+
+ uint16_t mSleepCount;
+ uint8_t mMotionType;
+ uint8_t deleted : 1;
+ uint8_t mSleeping : 1;
+ uint8_t useSleep : 1;
+ uint8_t useCcd : 1;
+ uint8_t useContactCallback : 1;
+ uint8_t useSleepCallback : 1;
+
+ uint16_t trbBodyIdx;
+ uint32_t contactFilterSelf;
+ uint32_t contactFilterTarget;
+
+ float center[3]; // AABB center(World)
+ float half[3]; // AABB half(World)
+
+ float linearDamping;
+ float angularDamping;
+
+ float deltaLinearVelocity[3];
+ float deltaAngularVelocity[3];
+
+ float fX[3]; // position
+ float fQ[4]; // orientation
+ float fV[3]; // velocity
+ float fOmega[3]; // angular velocity
+
+ inline void setZero(); // Zeroes out the elements
+ inline void setIdentity(); // Sets the rotation to identity and zeroes out the other elements
+
+ bool isDeleted() const {return deleted==1;}
+
+ uint16_t getRigidBodyId() const {return trbBodyIdx;}
+ void setRigidBodyId(uint16_t i) {trbBodyIdx = i;}
+
+
+ uint32_t getContactFilterSelf() const {return contactFilterSelf;}
+ void setContactFilterSelf(uint32_t filter) {contactFilterSelf = filter;}
+
+ uint32_t getContactFilterTarget() const {return contactFilterTarget;}
+ void setContactFilterTarget(uint32_t filter) {contactFilterTarget = filter;}
+
+ float getLinearDamping() const {return linearDamping;}
+ float getAngularDamping() const {return angularDamping;}
+
+ void setLinearDamping(float damping) {linearDamping=damping;}
+ void setAngularDamping(float damping) {angularDamping=damping;}
+
+
+ uint8_t getMotionType() const {return mMotionType;}
+ void setMotionType(uint8_t t) {mMotionType = t;mSleeping=0;mSleepCount=0;}
+
+ uint8_t getMotionMask() const {return (1<<mMotionType)|(mSleeping<<7);}
+
+ bool isAsleep() const {return mSleeping==1;}
+ bool isAwake() const {return mSleeping==0;}
+
+ void wakeup() {mSleeping=0;mSleepCount=0;}
+ void sleep() {if(useSleep) {mSleeping=1;mSleepCount=0;}}
+
+ uint8_t getUseSleep() const {return useSleep;}
+ void setUseSleep(uint8_t b) {useSleep=b;}
+
+ uint8_t getUseCcd() const {return useCcd;}
+ void setUseCcd(uint8_t b) {useCcd=b;}
+
+ uint8_t getUseContactCallback() const {return useContactCallback;}
+ void setUseContactCallback(uint8_t b) {useContactCallback=b;}
+
+ uint8_t getUseSleepCallback() const {return useSleepCallback;}
+ void setUseSleepCallback(uint8_t b) {useSleepCallback=b;}
+
+ void incrementSleepCount() {mSleepCount++;}
+ void resetSleepCount() {mSleepCount=0;}
+ uint16_t getSleepCount() const {return mSleepCount;}
+
+ vmVector3 getPosition() const {return read_Vector3(fX);}
+ vmQuat getOrientation() const {return read_Quat(fQ);}
+ vmVector3 getLinearVelocity() const {return read_Vector3(fV);}
+ vmVector3 getAngularVelocity() const {return read_Vector3(fOmega);}
+ vmVector3 getDeltaLinearVelocity() const {return read_Vector3(deltaLinearVelocity);}
+ vmVector3 getDeltaAngularVelocity() const {return read_Vector3(deltaAngularVelocity);}
+
+ void setPosition(const vmVector3 &pos) {store_Vector3(pos, fX);}
+ void setLinearVelocity(const vmVector3 &vel) {store_Vector3(vel, fV);}
+ void setAngularVelocity(const vmVector3 &vel) {store_Vector3(vel, fOmega);}
+ void setDeltaLinearVelocity(const vmVector3 &vel) {store_Vector3(vel, deltaLinearVelocity);}
+ void setDeltaAngularVelocity(const vmVector3 &vel) {store_Vector3(vel, deltaAngularVelocity);}
+ void setOrientation(const vmQuat &rot) {store_Quat(rot, fQ);}
+
+ inline void setAuxils(const vmVector3 &centerLocal,const vmVector3 &halfLocal);
+ inline void setAuxilsCcd(const vmVector3 &centerLocal,const vmVector3 &halfLocal,float timeStep);
+ inline void reset();
+};
+
+inline
+TrbState::TrbState(const uint8_t m, const vmVector3& x, const vmQuat& q, const vmVector3& v, const vmVector3& omega)
+{
+ setMotionType(m);
+ fX[0] = x[0];
+ fX[1] = x[1];
+ fX[2] = x[2];
+ fQ[0] = q[0];
+ fQ[1] = q[1];
+ fQ[2] = q[2];
+ fQ[3] = q[3];
+ fV[0] = v[0];
+ fV[1] = v[1];
+ fV[2] = v[2];
+ fOmega[0] = omega[0];
+ fOmega[1] = omega[1];
+ fOmega[2] = omega[2];
+ contactFilterSelf=contactFilterTarget=0xffff;
+ trbBodyIdx=0;
+ mSleeping = 0;
+ deleted = 0;
+ useSleep = 1;
+ useCcd = 0;
+ useContactCallback = 0;
+ useSleepCallback = 0;
+ mSleepCount=0;
+ linearDamping = 1.0f;
+ angularDamping = 0.99f;
+}
+
+inline void
+TrbState::setIdentity()
+{
+ fX[0] = 0.0f;
+ fX[1] = 0.0f;
+ fX[2] = 0.0f;
+ fQ[0] = 0.0f;
+ fQ[1] = 0.0f;
+ fQ[2] = 0.0f;
+ fQ[3] = 1.0f;
+ fV[0] = 0.0f;
+ fV[1] = 0.0f;
+ fV[2] = 0.0f;
+ fOmega[0] = 0.0f;
+ fOmega[1] = 0.0f;
+ fOmega[2] = 0.0f;
+}
+
+inline void
+TrbState::setZero()
+{
+ fX[0] = 0.0f;
+ fX[1] = 0.0f;
+ fX[2] = 0.0f;
+ fQ[0] = 0.0f;
+ fQ[1] = 0.0f;
+ fQ[2] = 0.0f;
+ fQ[3] = 0.0f;
+ fV[0] = 0.0f;
+ fV[1] = 0.0f;
+ fV[2] = 0.0f;
+ fOmega[0] = 0.0f;
+ fOmega[1] = 0.0f;
+ fOmega[2] = 0.0f;
+}
+
+inline void
+TrbState::setAuxils(const vmVector3 &centerLocal,const vmVector3 &halfLocal)
+{
+ vmVector3 centerW = getPosition() + rotate(getOrientation(),centerLocal);
+ vmVector3 halfW = absPerElem(vmMatrix3(getOrientation())) * halfLocal;
+ center[0] = centerW[0];
+ center[1] = centerW[1];
+ center[2] = centerW[2];
+ half[0] = halfW[0];
+ half[1] = halfW[1];
+ half[2] = halfW[2];
+}
+
+inline void
+TrbState::setAuxilsCcd(const vmVector3 &centerLocal,const vmVector3 &halfLocal,float timeStep)
+{
+ vmVector3 centerW = getPosition() + rotate(getOrientation(),centerLocal);
+ vmVector3 halfW = absPerElem(vmMatrix3(getOrientation())) * halfLocal;
+
+ vmVector3 diffvec = getLinearVelocity()*timeStep;
+
+ vmVector3 newCenter = centerW + diffvec;
+ vmVector3 aabbMin = minPerElem(newCenter - halfW,centerW - halfW);
+ vmVector3 aabbMax = maxPerElem(newCenter + halfW,centerW + halfW);
+
+ centerW = 0.5f * (aabbMin + aabbMax);
+ halfW =0.5f * (aabbMax - aabbMin);
+
+ center[0] = centerW[0];
+ center[1] = centerW[1];
+ center[2] = centerW[2];
+
+ half[0] = halfW[0];
+ half[1] = halfW[1];
+ half[2] = halfW[2];
+}
+
+inline
+void TrbState::reset()
+{
+#if 0
+ mSleepCount = 0;
+ mMotionType = PfxMotionTypeActive;
+ mDeleted = 0;
+ mSleeping = 0;
+ mUseSleep = 1;
+ mUseCcd = 0;
+ mUseContactCallback = 0;
+ mUseSleepCallback = 0;
+ mRigidBodyId = 0;
+ mContactFilterSelf = 0xffffffff;
+ mContactFilterTarget = 0xffffffff;
+ mLinearDamping = 1.0f;
+ mAngularDamping = 0.99f;
+ mPosition = vmVector3(0.0f);
+ mOrientation = vmQuat::identity();
+ mLinearVelocity = vmVector3(0.0f);
+ mAngularVelocity = vmVector3(0.0f);
+#endif
+
+ setMotionType(PfxMotionTypeActive);
+ contactFilterSelf=contactFilterTarget=0xffffffff;
+ deleted = 0;
+ mSleeping = 0;
+ useSleep = 1;
+ trbBodyIdx=0;
+ mSleepCount=0;
+ useCcd = 0;
+ useContactCallback = 0;
+ useSleepCallback = 0;
+ linearDamping = 1.0f;
+ angularDamping = 0.99f;
+}
+
+#endif //BT_TRBSTATEVEC_H__
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.cpp b/tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.cpp
new file mode 100644
index 00000000..1197bbe0
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.cpp
@@ -0,0 +1,446 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "Win32ThreadSupport.h"
+
+#ifdef USE_WIN32_THREADING
+
+#include <windows.h>
+
+#include "SpuCollisionTaskProcess.h"
+
+#include "SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
+
+
+
+///The number of threads should be equal to the number of available cores
+///@todo: each worker should be linked to a single core, using SetThreadIdealProcessor.
+
+///Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
+///Setup and initialize SPU/CELL/Libspe2
+Win32ThreadSupport::Win32ThreadSupport(const Win32ThreadConstructionInfo & threadConstructionInfo)
+{
+ m_maxNumTasks = threadConstructionInfo.m_numThreads;
+ startThreads(threadConstructionInfo);
+}
+
+///cleanup/shutdown Libspe2
+Win32ThreadSupport::~Win32ThreadSupport()
+{
+ stopSPU();
+}
+
+
+
+
+#include <stdio.h>
+
+DWORD WINAPI Thread_no_1( LPVOID lpParam )
+{
+
+ Win32ThreadSupport::btSpuStatus* status = (Win32ThreadSupport::btSpuStatus*)lpParam;
+
+
+ while (1)
+ {
+ WaitForSingleObject(status->m_eventStartHandle,INFINITE);
+
+ void* userPtr = status->m_userPtr;
+
+ if (userPtr)
+ {
+ btAssert(status->m_status);
+ status->m_userThreadFunc(userPtr,status->m_lsMemory);
+ status->m_status = 2;
+ SetEvent(status->m_eventCompletetHandle);
+ } else
+ {
+ //exit Thread
+ status->m_status = 3;
+ printf("Thread with taskId %i with handle %p exiting\n",status->m_taskId, status->m_threadHandle);
+ SetEvent(status->m_eventCompletetHandle);
+ break;
+ }
+
+ }
+
+ printf("Thread TERMINATED\n");
+ return 0;
+
+}
+
+///send messages to SPUs
+void Win32ThreadSupport::sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t taskId)
+{
+ /// gMidphaseSPU.sendRequest(CMD_GATHER_AND_PROCESS_PAIRLIST, (ppu_address_t) &taskDesc);
+
+ ///we should spawn an SPU task here, and in 'waitForResponse' it should wait for response of the (one of) the first tasks that finished
+
+
+
+ switch (uiCommand)
+ {
+ case CMD_GATHER_AND_PROCESS_PAIRLIST:
+ {
+
+
+//#define SINGLE_THREADED 1
+#ifdef SINGLE_THREADED
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[0];
+ spuStatus.m_userPtr=(void*)uiArgument0;
+ spuStatus.m_userThreadFunc(spuStatus.m_userPtr,spuStatus.m_lsMemory);
+ HANDLE handle =0;
+#else
+
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[taskId];
+ btAssert(taskId>=0);
+ btAssert(int(taskId)<m_activeSpuStatus.size());
+
+ spuStatus.m_commandId = uiCommand;
+ spuStatus.m_status = 1;
+ spuStatus.m_userPtr = (void*)uiArgument0;
+
+ ///fire event to start new task
+ SetEvent(spuStatus.m_eventStartHandle);
+
+#endif //CollisionTask_LocalStoreMemory
+
+
+
+ break;
+ }
+ default:
+ {
+ ///not implemented
+ btAssert(0);
+ }
+
+ };
+
+
+}
+
+
+///check for messages from SPUs
+void Win32ThreadSupport::waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1)
+{
+ ///We should wait for (one of) the first tasks to finish (or other SPU messages), and report its response
+
+ ///A possible response can be 'yes, SPU handled it', or 'no, please do a PPU fallback'
+
+
+ btAssert(m_activeSpuStatus.size());
+
+ int last = -1;
+#ifndef SINGLE_THREADED
+ DWORD res = WaitForMultipleObjects(m_completeHandles.size(), &m_completeHandles[0], FALSE, INFINITE);
+ btAssert(res != WAIT_FAILED);
+ last = res - WAIT_OBJECT_0;
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[last];
+ btAssert(spuStatus.m_threadHandle);
+ btAssert(spuStatus.m_eventCompletetHandle);
+
+ //WaitForSingleObject(spuStatus.m_eventCompletetHandle, INFINITE);
+ btAssert(spuStatus.m_status > 1);
+ spuStatus.m_status = 0;
+
+ ///need to find an active spu
+ btAssert(last>=0);
+
+#else
+ last=0;
+ btSpuStatus& spuStatus = m_activeSpuStatus[last];
+#endif //SINGLE_THREADED
+
+
+
+ *puiArgument0 = spuStatus.m_taskId;
+ *puiArgument1 = spuStatus.m_status;
+
+
+}
+
+
+///check for messages from SPUs
+bool Win32ThreadSupport::isTaskCompleted(unsigned int *puiArgument0, unsigned int *puiArgument1, int timeOutInMilliseconds)
+{
+ ///We should wait for (one of) the first tasks to finish (or other SPU messages), and report its response
+
+ ///A possible response can be 'yes, SPU handled it', or 'no, please do a PPU fallback'
+
+
+ btAssert(m_activeSpuStatus.size());
+
+ int last = -1;
+#ifndef SINGLE_THREADED
+ DWORD res = WaitForMultipleObjects(m_completeHandles.size(), &m_completeHandles[0], FALSE, timeOutInMilliseconds);
+
+ if ((res != STATUS_TIMEOUT) && (res != WAIT_FAILED))
+ {
+
+ btAssert(res != WAIT_FAILED);
+ last = res - WAIT_OBJECT_0;
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[last];
+ btAssert(spuStatus.m_threadHandle);
+ btAssert(spuStatus.m_eventCompletetHandle);
+
+ //WaitForSingleObject(spuStatus.m_eventCompletetHandle, INFINITE);
+ btAssert(spuStatus.m_status > 1);
+ spuStatus.m_status = 0;
+
+ ///need to find an active spu
+ btAssert(last>=0);
+
+ #else
+ last=0;
+ btSpuStatus& spuStatus = m_activeSpuStatus[last];
+ #endif //SINGLE_THREADED
+
+
+
+ *puiArgument0 = spuStatus.m_taskId;
+ *puiArgument1 = spuStatus.m_status;
+
+ return true;
+ }
+
+ return false;
+}
+
+
+void Win32ThreadSupport::startThreads(const Win32ThreadConstructionInfo& threadConstructionInfo)
+{
+
+ m_activeSpuStatus.resize(threadConstructionInfo.m_numThreads);
+ m_completeHandles.resize(threadConstructionInfo.m_numThreads);
+
+ m_maxNumTasks = threadConstructionInfo.m_numThreads;
+
+ for (int i=0;i<threadConstructionInfo.m_numThreads;i++)
+ {
+ printf("starting thread %d\n",i);
+
+ btSpuStatus& spuStatus = m_activeSpuStatus[i];
+
+ LPSECURITY_ATTRIBUTES lpThreadAttributes=NULL;
+ SIZE_T dwStackSize=threadConstructionInfo.m_threadStackSize;
+ LPTHREAD_START_ROUTINE lpStartAddress=&Thread_no_1;
+ LPVOID lpParameter=&spuStatus;
+ DWORD dwCreationFlags=0;
+ LPDWORD lpThreadId=0;
+
+ spuStatus.m_userPtr=0;
+
+ sprintf(spuStatus.m_eventStartHandleName,"eventStart%s%d",threadConstructionInfo.m_uniqueName,i);
+ spuStatus.m_eventStartHandle = CreateEventA (0,false,false,spuStatus.m_eventStartHandleName);
+
+ sprintf(spuStatus.m_eventCompletetHandleName,"eventComplete%s%d",threadConstructionInfo.m_uniqueName,i);
+ spuStatus.m_eventCompletetHandle = CreateEventA (0,false,false,spuStatus.m_eventCompletetHandleName);
+
+ m_completeHandles[i] = spuStatus.m_eventCompletetHandle;
+
+ HANDLE handle = CreateThread(lpThreadAttributes,dwStackSize,lpStartAddress,lpParameter, dwCreationFlags,lpThreadId);
+ SetThreadPriority(handle,THREAD_PRIORITY_HIGHEST);
+ //SetThreadPriority(handle,THREAD_PRIORITY_TIME_CRITICAL);
+
+ SetThreadAffinityMask(handle, 1<<i);
+
+ spuStatus.m_taskId = i;
+ spuStatus.m_commandId = 0;
+ spuStatus.m_status = 0;
+ spuStatus.m_threadHandle = handle;
+ spuStatus.m_lsMemory = threadConstructionInfo.m_lsMemoryFunc();
+ spuStatus.m_userThreadFunc = threadConstructionInfo.m_userThreadFunc;
+
+ printf("started thread %d with threadHandle %p\n",i,handle);
+
+ }
+
+}
+
+void Win32ThreadSupport::startSPU()
+{
+}
+
+
+///tell the task scheduler we are done with the SPU tasks
+void Win32ThreadSupport::stopSPU()
+{
+ int i;
+ for (i=0;i<m_activeSpuStatus.size();i++)
+ {
+ btSpuStatus& spuStatus = m_activeSpuStatus[i];
+ if (spuStatus.m_status>0)
+ {
+ WaitForSingleObject(spuStatus.m_eventCompletetHandle, INFINITE);
+ }
+
+
+ spuStatus.m_userPtr = 0;
+ SetEvent(spuStatus.m_eventStartHandle);
+ WaitForSingleObject(spuStatus.m_eventCompletetHandle, INFINITE);
+
+ CloseHandle(spuStatus.m_eventCompletetHandle);
+ CloseHandle(spuStatus.m_eventStartHandle);
+ CloseHandle(spuStatus.m_threadHandle);
+ }
+
+ m_activeSpuStatus.clear();
+ m_completeHandles.clear();
+
+}
+
+
+
+class btWin32Barrier : public btBarrier
+{
+private:
+ CRITICAL_SECTION mExternalCriticalSection;
+ CRITICAL_SECTION mLocalCriticalSection;
+ HANDLE mRunEvent,mNotifyEvent;
+ int mCounter,mEnableCounter;
+ int mMaxCount;
+
+public:
+ btWin32Barrier()
+ {
+ mCounter = 0;
+ mMaxCount = 1;
+ mEnableCounter = 0;
+ InitializeCriticalSection(&mExternalCriticalSection);
+ InitializeCriticalSection(&mLocalCriticalSection);
+ mRunEvent = CreateEvent(NULL,TRUE,FALSE,NULL);
+ mNotifyEvent = CreateEvent(NULL,TRUE,FALSE,NULL);
+ }
+
+ virtual ~btWin32Barrier()
+ {
+ DeleteCriticalSection(&mExternalCriticalSection);
+ DeleteCriticalSection(&mLocalCriticalSection);
+ CloseHandle(mRunEvent);
+ CloseHandle(mNotifyEvent);
+ }
+
+ void sync()
+ {
+ int eventId;
+
+ EnterCriticalSection(&mExternalCriticalSection);
+
+ //PFX_PRINTF("enter taskId %d count %d stage %d phase %d mEnableCounter %d\n",taskId,mCounter,debug&0xff,debug>>16,mEnableCounter);
+
+ if(mEnableCounter > 0) {
+ ResetEvent(mNotifyEvent);
+ LeaveCriticalSection(&mExternalCriticalSection);
+ WaitForSingleObject(mNotifyEvent,INFINITE);
+ EnterCriticalSection(&mExternalCriticalSection);
+ }
+
+ eventId = mCounter;
+ mCounter++;
+
+ if(eventId == mMaxCount-1) {
+ SetEvent(mRunEvent);
+
+ mEnableCounter = mCounter-1;
+ mCounter = 0;
+ }
+ else {
+ ResetEvent(mRunEvent);
+ LeaveCriticalSection(&mExternalCriticalSection);
+ WaitForSingleObject(mRunEvent,INFINITE);
+ EnterCriticalSection(&mExternalCriticalSection);
+ mEnableCounter--;
+ }
+
+ if(mEnableCounter == 0) {
+ SetEvent(mNotifyEvent);
+ }
+
+ //PFX_PRINTF("leave taskId %d count %d stage %d phase %d mEnableCounter %d\n",taskId,mCounter,debug&0xff,debug>>16,mEnableCounter);
+
+ LeaveCriticalSection(&mExternalCriticalSection);
+ }
+
+ virtual void setMaxCount(int n) {mMaxCount = n;}
+ virtual int getMaxCount() {return mMaxCount;}
+};
+
+class btWin32CriticalSection : public btCriticalSection
+{
+private:
+ CRITICAL_SECTION mCriticalSection;
+
+public:
+ btWin32CriticalSection()
+ {
+ InitializeCriticalSection(&mCriticalSection);
+ }
+
+ ~btWin32CriticalSection()
+ {
+ DeleteCriticalSection(&mCriticalSection);
+ }
+
+ unsigned int getSharedParam(int i)
+ {
+ btAssert(i>=0&&i<31);
+ return mCommonBuff[i+1];
+ }
+
+ void setSharedParam(int i,unsigned int p)
+ {
+ btAssert(i>=0&&i<31);
+ mCommonBuff[i+1] = p;
+ }
+
+ void lock()
+ {
+ EnterCriticalSection(&mCriticalSection);
+ mCommonBuff[0] = 1;
+ }
+
+ void unlock()
+ {
+ mCommonBuff[0] = 0;
+ LeaveCriticalSection(&mCriticalSection);
+ }
+};
+
+
+btBarrier* Win32ThreadSupport::createBarrier()
+{
+ unsigned char* mem = (unsigned char*)btAlignedAlloc(sizeof(btWin32Barrier),16);
+ btWin32Barrier* barrier = new(mem) btWin32Barrier();
+ barrier->setMaxCount(getNumTasks());
+ return barrier;
+}
+
+btCriticalSection* Win32ThreadSupport::createCriticalSection()
+{
+ unsigned char* mem = (unsigned char*) btAlignedAlloc(sizeof(btWin32CriticalSection),16);
+ btWin32CriticalSection* cs = new(mem) btWin32CriticalSection();
+ return cs;
+}
+
+
+
+#endif //USE_WIN32_THREADING
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.h b/tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.h
new file mode 100644
index 00000000..4370c00e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/Win32ThreadSupport.h
@@ -0,0 +1,138 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "LinearMath/btScalar.h"
+#include "PlatformDefinitions.h"
+
+#ifdef USE_WIN32_THREADING //platform specific defines are defined in PlatformDefinitions.h
+
+#ifndef BT_WIN32_THREAD_SUPPORT_H
+#define BT_WIN32_THREAD_SUPPORT_H
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+#include "btThreadSupportInterface.h"
+
+
+typedef void (*Win32ThreadFunc)(void* userPtr,void* lsMemory);
+typedef void* (*Win32lsMemorySetupFunc)();
+
+
+///Win32ThreadSupport helps to initialize/shutdown libspe2, start/stop SPU tasks and communication
+class Win32ThreadSupport : public btThreadSupportInterface
+{
+public:
+ ///placeholder, until libspe2 support is there
+ struct btSpuStatus
+ {
+ uint32_t m_taskId;
+ uint32_t m_commandId;
+ uint32_t m_status;
+
+ Win32ThreadFunc m_userThreadFunc;
+ void* m_userPtr; //for taskDesc etc
+ void* m_lsMemory; //initialized using Win32LocalStoreMemorySetupFunc
+
+ void* m_threadHandle; //this one is calling 'Win32ThreadFunc'
+
+ void* m_eventStartHandle;
+ char m_eventStartHandleName[32];
+
+ void* m_eventCompletetHandle;
+ char m_eventCompletetHandleName[32];
+
+
+ };
+private:
+
+ btAlignedObjectArray<btSpuStatus> m_activeSpuStatus;
+ btAlignedObjectArray<void*> m_completeHandles;
+
+ int m_maxNumTasks;
+public:
+ ///Setup and initialize SPU/CELL/Libspe2
+
+ struct Win32ThreadConstructionInfo
+ {
+ Win32ThreadConstructionInfo(char* uniqueName,
+ Win32ThreadFunc userThreadFunc,
+ Win32lsMemorySetupFunc lsMemoryFunc,
+ int numThreads=1,
+ int threadStackSize=65535
+ )
+ :m_uniqueName(uniqueName),
+ m_userThreadFunc(userThreadFunc),
+ m_lsMemoryFunc(lsMemoryFunc),
+ m_numThreads(numThreads),
+ m_threadStackSize(threadStackSize)
+ {
+
+ }
+
+ char* m_uniqueName;
+ Win32ThreadFunc m_userThreadFunc;
+ Win32lsMemorySetupFunc m_lsMemoryFunc;
+ int m_numThreads;
+ int m_threadStackSize;
+
+ };
+
+
+
+ Win32ThreadSupport(const Win32ThreadConstructionInfo& threadConstructionInfo);
+
+///cleanup/shutdown Libspe2
+ virtual ~Win32ThreadSupport();
+
+ void startThreads(const Win32ThreadConstructionInfo& threadInfo);
+
+
+///send messages to SPUs
+ virtual void sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1);
+
+///check for messages from SPUs
+ virtual void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1);
+
+ virtual bool isTaskCompleted(unsigned int *puiArgument0, unsigned int *puiArgument1, int timeOutInMilliseconds);
+
+///start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
+ virtual void startSPU();
+
+///tell the task scheduler we are done with the SPU tasks
+ virtual void stopSPU();
+
+ virtual void setNumTasks(int numTasks)
+ {
+ m_maxNumTasks = numTasks;
+ }
+
+ virtual int getNumTasks() const
+ {
+ return m_maxNumTasks;
+ }
+
+ virtual void* getThreadLocalMemory(int taskId)
+ {
+ return m_activeSpuStatus[taskId].m_lsMemory;
+ }
+ virtual btBarrier* createBarrier();
+
+ virtual btCriticalSection* createCriticalSection();
+
+};
+
+#endif //BT_WIN32_THREAD_SUPPORT_H
+
+#endif //USE_WIN32_THREADING
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.cpp b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.cpp
new file mode 100644
index 00000000..84a5e59f
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.cpp
@@ -0,0 +1,590 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2009 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///The 3 following lines include the CPU implementation of the kernels, keep them in this order.
+#include "BulletMultiThreaded/btGpuDefines.h"
+#include "BulletMultiThreaded/btGpuUtilsSharedDefs.h"
+#include "BulletMultiThreaded/btGpuUtilsSharedCode.h"
+
+
+
+#include "LinearMath/btAlignedAllocator.h"
+#include "LinearMath/btQuickprof.h"
+#include "BulletCollision/BroadphaseCollision/btOverlappingPairCache.h"
+
+
+
+#include "btGpuDefines.h"
+#include "btGpuUtilsSharedDefs.h"
+
+#include "btGpu3DGridBroadphaseSharedDefs.h"
+
+#include "btGpu3DGridBroadphase.h"
+#include <string.h> //for memset
+
+
+#include <stdio.h>
+
+
+
+static bt3DGridBroadphaseParams s3DGridBroadphaseParams;
+
+
+
+btGpu3DGridBroadphase::btGpu3DGridBroadphase( const btVector3& worldAabbMin,const btVector3& worldAabbMax,
+ int gridSizeX, int gridSizeY, int gridSizeZ,
+ int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody,
+ int maxBodiesPerCell,
+ btScalar cellFactorAABB) :
+ btSimpleBroadphase(maxSmallProxies,
+// new (btAlignedAlloc(sizeof(btSortedOverlappingPairCache),16)) btSortedOverlappingPairCache),
+ new (btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache),
+ m_bInitialized(false),
+ m_numBodies(0)
+{
+ _initialize(worldAabbMin, worldAabbMax, gridSizeX, gridSizeY, gridSizeZ,
+ maxSmallProxies, maxLargeProxies, maxPairsPerBody,
+ maxBodiesPerCell, cellFactorAABB);
+}
+
+
+
+btGpu3DGridBroadphase::btGpu3DGridBroadphase( btOverlappingPairCache* overlappingPairCache,
+ const btVector3& worldAabbMin,const btVector3& worldAabbMax,
+ int gridSizeX, int gridSizeY, int gridSizeZ,
+ int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody,
+ int maxBodiesPerCell,
+ btScalar cellFactorAABB) :
+ btSimpleBroadphase(maxSmallProxies, overlappingPairCache),
+ m_bInitialized(false),
+ m_numBodies(0)
+{
+ _initialize(worldAabbMin, worldAabbMax, gridSizeX, gridSizeY, gridSizeZ,
+ maxSmallProxies, maxLargeProxies, maxPairsPerBody,
+ maxBodiesPerCell, cellFactorAABB);
+}
+
+
+
+btGpu3DGridBroadphase::~btGpu3DGridBroadphase()
+{
+ //btSimpleBroadphase will free memory of btSortedOverlappingPairCache, because m_ownsPairCache
+ assert(m_bInitialized);
+ _finalize();
+}
+
+
+
+void btGpu3DGridBroadphase::_initialize( const btVector3& worldAabbMin,const btVector3& worldAabbMax,
+ int gridSizeX, int gridSizeY, int gridSizeZ,
+ int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody,
+ int maxBodiesPerCell,
+ btScalar cellFactorAABB)
+{
+ // set various paramerers
+ m_ownsPairCache = true;
+ m_params.m_gridSizeX = gridSizeX;
+ m_params.m_gridSizeY = gridSizeY;
+ m_params.m_gridSizeZ = gridSizeZ;
+ m_params.m_numCells = m_params.m_gridSizeX * m_params.m_gridSizeY * m_params.m_gridSizeZ;
+ btVector3 w_org = worldAabbMin;
+ m_params.m_worldOriginX = w_org.getX();
+ m_params.m_worldOriginY = w_org.getY();
+ m_params.m_worldOriginZ = w_org.getZ();
+ btVector3 w_size = worldAabbMax - worldAabbMin;
+ m_params.m_cellSizeX = w_size.getX() / m_params.m_gridSizeX;
+ m_params.m_cellSizeY = w_size.getY() / m_params.m_gridSizeY;
+ m_params.m_cellSizeZ = w_size.getZ() / m_params.m_gridSizeZ;
+ m_maxRadius = btMin(btMin(m_params.m_cellSizeX, m_params.m_cellSizeY), m_params.m_cellSizeZ);
+ m_maxRadius *= btScalar(0.5f);
+ m_params.m_numBodies = m_numBodies;
+ m_params.m_maxBodiesPerCell = maxBodiesPerCell;
+
+ m_numLargeHandles = 0;
+ m_maxLargeHandles = maxLargeProxies;
+
+ m_maxPairsPerBody = maxPairsPerBody;
+
+ m_cellFactorAABB = cellFactorAABB;
+
+ m_LastLargeHandleIndex = -1;
+
+ assert(!m_bInitialized);
+ // allocate host storage
+ m_hBodiesHash = new unsigned int[m_maxHandles * 2];
+ memset(m_hBodiesHash, 0x00, m_maxHandles*2*sizeof(unsigned int));
+
+ m_hCellStart = new unsigned int[m_params.m_numCells];
+ memset(m_hCellStart, 0x00, m_params.m_numCells * sizeof(unsigned int));
+
+ m_hPairBuffStartCurr = new unsigned int[m_maxHandles * 2 + 2];
+ // --------------- for now, init with m_maxPairsPerBody for each body
+ m_hPairBuffStartCurr[0] = 0;
+ m_hPairBuffStartCurr[1] = 0;
+ for(int i = 1; i <= m_maxHandles; i++)
+ {
+ m_hPairBuffStartCurr[i * 2] = m_hPairBuffStartCurr[(i-1) * 2] + m_maxPairsPerBody;
+ m_hPairBuffStartCurr[i * 2 + 1] = 0;
+ }
+ //----------------
+ unsigned int numAABB = m_maxHandles + m_maxLargeHandles;
+ m_hAABB = new bt3DGrid3F1U[numAABB * 2]; // AABB Min & Max
+
+ m_hPairBuff = new unsigned int[m_maxHandles * m_maxPairsPerBody];
+ memset(m_hPairBuff, 0x00, m_maxHandles * m_maxPairsPerBody * sizeof(unsigned int)); // needed?
+
+ m_hPairScan = new unsigned int[m_maxHandles + 1];
+
+ m_hPairOut = new unsigned int[m_maxHandles * m_maxPairsPerBody];
+
+// large proxies
+
+ // allocate handles buffer and put all handles on free list
+ m_pLargeHandlesRawPtr = btAlignedAlloc(sizeof(btSimpleBroadphaseProxy) * m_maxLargeHandles, 16);
+ m_pLargeHandles = new(m_pLargeHandlesRawPtr) btSimpleBroadphaseProxy[m_maxLargeHandles];
+ m_firstFreeLargeHandle = 0;
+ {
+ for (int i = m_firstFreeLargeHandle; i < m_maxLargeHandles; i++)
+ {
+ m_pLargeHandles[i].SetNextFree(i + 1);
+ m_pLargeHandles[i].m_uniqueId = m_maxHandles+2+i;
+ }
+ m_pLargeHandles[m_maxLargeHandles - 1].SetNextFree(0);
+ }
+
+// debug data
+ m_numPairsAdded = 0;
+ m_numOverflows = 0;
+
+ m_bInitialized = true;
+}
+
+
+
+void btGpu3DGridBroadphase::_finalize()
+{
+ assert(m_bInitialized);
+ delete [] m_hBodiesHash;
+ delete [] m_hCellStart;
+ delete [] m_hPairBuffStartCurr;
+ delete [] m_hAABB;
+ delete [] m_hPairBuff;
+ delete [] m_hPairScan;
+ delete [] m_hPairOut;
+ btAlignedFree(m_pLargeHandlesRawPtr);
+ m_bInitialized = false;
+}
+
+
+
+void btGpu3DGridBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
+{
+ if(m_numHandles <= 0)
+ {
+ BT_PROFILE("addLarge2LargePairsToCache");
+ addLarge2LargePairsToCache(dispatcher);
+ return;
+ }
+ // update constants
+ setParameters(&m_params);
+ // prepare AABB array
+ prepareAABB();
+ // calculate hash
+ calcHashAABB();
+ // sort bodies based on hash
+ sortHash();
+ // find start of each cell
+ findCellStart();
+ // findOverlappingPairs (small/small)
+ findOverlappingPairs();
+ // findOverlappingPairs (small/large)
+ findPairsLarge();
+ // add pairs to CPU cache
+ computePairCacheChanges();
+ scanOverlappingPairBuff();
+ squeezeOverlappingPairBuff();
+ addPairsToCache(dispatcher);
+ // find and add large/large pairs to CPU cache
+ addLarge2LargePairsToCache(dispatcher);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::addPairsToCache(btDispatcher* dispatcher)
+{
+ m_numPairsAdded = 0;
+ m_numPairsRemoved = 0;
+ for(int i = 0; i < m_numHandles; i++)
+ {
+ unsigned int num = m_hPairScan[i+1] - m_hPairScan[i];
+ if(!num)
+ {
+ continue;
+ }
+ unsigned int* pInp = m_hPairOut + m_hPairScan[i];
+ unsigned int index0 = m_hAABB[i * 2].uw;
+ btSimpleBroadphaseProxy* proxy0 = &m_pHandles[index0];
+ for(unsigned int j = 0; j < num; j++)
+ {
+ unsigned int indx1_s = pInp[j];
+ unsigned int index1 = indx1_s & (~BT_3DGRID_PAIR_ANY_FLG);
+ btSimpleBroadphaseProxy* proxy1;
+ if(index1 < (unsigned int)m_maxHandles)
+ {
+ proxy1 = &m_pHandles[index1];
+ }
+ else
+ {
+ index1 -= m_maxHandles;
+ btAssert((index1 >= 0) && (index1 < (unsigned int)m_maxLargeHandles));
+ proxy1 = &m_pLargeHandles[index1];
+ }
+ if(indx1_s & BT_3DGRID_PAIR_NEW_FLG)
+ {
+ m_pairCache->addOverlappingPair(proxy0,proxy1);
+ m_numPairsAdded++;
+ }
+ else
+ {
+ m_pairCache->removeOverlappingPair(proxy0,proxy1,dispatcher);
+ m_numPairsRemoved++;
+ }
+ }
+ }
+}
+
+
+
+btBroadphaseProxy* btGpu3DGridBroadphase::createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy)
+{
+ btBroadphaseProxy* proxy;
+ bool bIsLarge = isLargeProxy(aabbMin, aabbMax);
+ if(bIsLarge)
+ {
+ if (m_numLargeHandles >= m_maxLargeHandles)
+ {
+ ///you have to increase the cell size, so 'large' proxies become 'small' proxies (fitting a cell)
+ btAssert(0);
+ return 0; //should never happen, but don't let the game crash ;-)
+ }
+ btAssert((aabbMin[0]<= aabbMax[0]) && (aabbMin[1]<= aabbMax[1]) && (aabbMin[2]<= aabbMax[2]));
+ int newHandleIndex = allocLargeHandle();
+ proxy = new (&m_pLargeHandles[newHandleIndex])btSimpleBroadphaseProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask,multiSapProxy);
+ }
+ else
+ {
+ proxy = btSimpleBroadphase::createProxy(aabbMin, aabbMax, shapeType, userPtr, collisionFilterGroup, collisionFilterMask, dispatcher, multiSapProxy);
+ }
+ return proxy;
+}
+
+
+
+void btGpu3DGridBroadphase::destroyProxy(btBroadphaseProxy* proxy, btDispatcher* dispatcher)
+{
+ bool bIsLarge = isLargeProxy(proxy);
+ if(bIsLarge)
+ {
+
+ btSimpleBroadphaseProxy* proxy0 = static_cast<btSimpleBroadphaseProxy*>(proxy);
+ freeLargeHandle(proxy0);
+ m_pairCache->removeOverlappingPairsContainingProxy(proxy,dispatcher);
+ }
+ else
+ {
+ btSimpleBroadphase::destroyProxy(proxy, dispatcher);
+ }
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::resetPool(btDispatcher* dispatcher)
+{
+ m_hPairBuffStartCurr[0] = 0;
+ m_hPairBuffStartCurr[1] = 0;
+ for(int i = 1; i <= m_maxHandles; i++)
+ {
+ m_hPairBuffStartCurr[i * 2] = m_hPairBuffStartCurr[(i-1) * 2] + m_maxPairsPerBody;
+ m_hPairBuffStartCurr[i * 2 + 1] = 0;
+ }
+}
+
+
+
+bool btGpu3DGridBroadphase::isLargeProxy(const btVector3& aabbMin, const btVector3& aabbMax)
+{
+ btVector3 diag = aabbMax - aabbMin;
+
+ ///use the bounding sphere radius of this bounding box, to include rotation
+ btScalar radius = diag.length() * btScalar(0.5f);
+ radius *= m_cellFactorAABB; // user-defined factor
+
+ return (radius > m_maxRadius);
+}
+
+
+
+bool btGpu3DGridBroadphase::isLargeProxy(btBroadphaseProxy* proxy)
+{
+ return (proxy->getUid() >= (m_maxHandles+2));
+}
+
+
+
+void btGpu3DGridBroadphase::addLarge2LargePairsToCache(btDispatcher* dispatcher)
+{
+ int i,j;
+ if (m_numLargeHandles <= 0)
+ {
+ return;
+ }
+ int new_largest_index = -1;
+ for(i = 0; i <= m_LastLargeHandleIndex; i++)
+ {
+ btSimpleBroadphaseProxy* proxy0 = &m_pLargeHandles[i];
+ if(!proxy0->m_clientObject)
+ {
+ continue;
+ }
+ new_largest_index = i;
+ for(j = i + 1; j <= m_LastLargeHandleIndex; j++)
+ {
+ btSimpleBroadphaseProxy* proxy1 = &m_pLargeHandles[j];
+ if(!proxy1->m_clientObject)
+ {
+ continue;
+ }
+ btAssert(proxy0 != proxy1);
+ btSimpleBroadphaseProxy* p0 = getSimpleProxyFromProxy(proxy0);
+ btSimpleBroadphaseProxy* p1 = getSimpleProxyFromProxy(proxy1);
+ if(aabbOverlap(p0,p1))
+ {
+ if (!m_pairCache->findPair(proxy0,proxy1))
+ {
+ m_pairCache->addOverlappingPair(proxy0,proxy1);
+ }
+ }
+ else
+ {
+ if(m_pairCache->findPair(proxy0,proxy1))
+ {
+ m_pairCache->removeOverlappingPair(proxy0,proxy1,dispatcher);
+ }
+ }
+ }
+ }
+ m_LastLargeHandleIndex = new_largest_index;
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback)
+{
+ btSimpleBroadphase::rayTest(rayFrom, rayTo, rayCallback);
+ for (int i=0; i <= m_LastLargeHandleIndex; i++)
+ {
+ btSimpleBroadphaseProxy* proxy = &m_pLargeHandles[i];
+ if(!proxy->m_clientObject)
+ {
+ continue;
+ }
+ rayCallback.process(proxy);
+ }
+}
+
+
+
+//
+// overrides for CPU version
+//
+
+
+
+void btGpu3DGridBroadphase::prepareAABB()
+{
+ BT_PROFILE("prepareAABB");
+ bt3DGrid3F1U* pBB = m_hAABB;
+ int i;
+ int new_largest_index = -1;
+ unsigned int num_small = 0;
+ for(i = 0; i <= m_LastHandleIndex; i++)
+ {
+ btSimpleBroadphaseProxy* proxy0 = &m_pHandles[i];
+ if(!proxy0->m_clientObject)
+ {
+ continue;
+ }
+ new_largest_index = i;
+ pBB->fx = proxy0->m_aabbMin.getX();
+ pBB->fy = proxy0->m_aabbMin.getY();
+ pBB->fz = proxy0->m_aabbMin.getZ();
+ pBB->uw = i;
+ pBB++;
+ pBB->fx = proxy0->m_aabbMax.getX();
+ pBB->fy = proxy0->m_aabbMax.getY();
+ pBB->fz = proxy0->m_aabbMax.getZ();
+ pBB->uw = num_small;
+ pBB++;
+ num_small++;
+ }
+ m_LastHandleIndex = new_largest_index;
+ new_largest_index = -1;
+ unsigned int num_large = 0;
+ for(i = 0; i <= m_LastLargeHandleIndex; i++)
+ {
+ btSimpleBroadphaseProxy* proxy0 = &m_pLargeHandles[i];
+ if(!proxy0->m_clientObject)
+ {
+ continue;
+ }
+ new_largest_index = i;
+ pBB->fx = proxy0->m_aabbMin.getX();
+ pBB->fy = proxy0->m_aabbMin.getY();
+ pBB->fz = proxy0->m_aabbMin.getZ();
+ pBB->uw = i + m_maxHandles;
+ pBB++;
+ pBB->fx = proxy0->m_aabbMax.getX();
+ pBB->fy = proxy0->m_aabbMax.getY();
+ pBB->fz = proxy0->m_aabbMax.getZ();
+ pBB->uw = num_large + m_maxHandles;
+ pBB++;
+ num_large++;
+ }
+ m_LastLargeHandleIndex = new_largest_index;
+ // paranoid checks
+ btAssert(num_small == m_numHandles);
+ btAssert(num_large == m_numLargeHandles);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::setParameters(bt3DGridBroadphaseParams* hostParams)
+{
+ s3DGridBroadphaseParams = *hostParams;
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::calcHashAABB()
+{
+ BT_PROFILE("bt3DGrid_calcHashAABB");
+ btGpu_calcHashAABB(m_hAABB, m_hBodiesHash, m_numHandles);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::sortHash()
+{
+ class bt3DGridHashKey
+ {
+ public:
+ unsigned int hash;
+ unsigned int index;
+ void quickSort(bt3DGridHashKey* pData, int lo, int hi)
+ {
+ int i=lo, j=hi;
+ bt3DGridHashKey x = pData[(lo+hi)/2];
+ do
+ {
+ while(pData[i].hash > x.hash) i++;
+ while(x.hash > pData[j].hash) j--;
+ if(i <= j)
+ {
+ bt3DGridHashKey t = pData[i];
+ pData[i] = pData[j];
+ pData[j] = t;
+ i++; j--;
+ }
+ } while(i <= j);
+ if(lo < j) pData->quickSort(pData, lo, j);
+ if(i < hi) pData->quickSort(pData, i, hi);
+ }
+ };
+ BT_PROFILE("bt3DGrid_sortHash");
+ bt3DGridHashKey* pHash = (bt3DGridHashKey*)m_hBodiesHash;
+ pHash->quickSort(pHash, 0, m_numHandles - 1);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::findCellStart()
+{
+ BT_PROFILE("bt3DGrid_findCellStart");
+ btGpu_findCellStart(m_hBodiesHash, m_hCellStart, m_numHandles, m_params.m_numCells);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::findOverlappingPairs()
+{
+ BT_PROFILE("bt3DGrid_findOverlappingPairs");
+ btGpu_findOverlappingPairs(m_hAABB, m_hBodiesHash, m_hCellStart, m_hPairBuff, m_hPairBuffStartCurr, m_numHandles);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::findPairsLarge()
+{
+ BT_PROFILE("bt3DGrid_findPairsLarge");
+ btGpu_findPairsLarge(m_hAABB, m_hBodiesHash, m_hCellStart, m_hPairBuff, m_hPairBuffStartCurr, m_numHandles, m_numLargeHandles);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::computePairCacheChanges()
+{
+ BT_PROFILE("bt3DGrid_computePairCacheChanges");
+ btGpu_computePairCacheChanges(m_hPairBuff, m_hPairBuffStartCurr, m_hPairScan, m_hAABB, m_numHandles);
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::scanOverlappingPairBuff()
+{
+ BT_PROFILE("bt3DGrid_scanOverlappingPairBuff");
+ m_hPairScan[0] = 0;
+ for(int i = 1; i <= m_numHandles; i++)
+ {
+ unsigned int delta = m_hPairScan[i];
+ m_hPairScan[i] = m_hPairScan[i-1] + delta;
+ }
+ return;
+}
+
+
+
+void btGpu3DGridBroadphase::squeezeOverlappingPairBuff()
+{
+ BT_PROFILE("bt3DGrid_squeezeOverlappingPairBuff");
+ btGpu_squeezeOverlappingPairBuff(m_hPairBuff, m_hPairBuffStartCurr, m_hPairScan, m_hPairOut, m_hAABB, m_numHandles);
+ return;
+}
+
+
+
+#include "btGpu3DGridBroadphaseSharedCode.h"
+
+
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.h b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.h
new file mode 100644
index 00000000..1d49a055
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphase.h
@@ -0,0 +1,138 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2009 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//----------------------------------------------------------------------------------------
+
+#ifndef BTGPU3DGRIDBROADPHASE_H
+#define BTGPU3DGRIDBROADPHASE_H
+
+//----------------------------------------------------------------------------------------
+
+#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
+
+#include "btGpu3DGridBroadphaseSharedTypes.h"
+
+//----------------------------------------------------------------------------------------
+
+///The btGpu3DGridBroadphase uses GPU-style code compiled for CPU to compute overlapping pairs
+
+class btGpu3DGridBroadphase : public btSimpleBroadphase
+{
+protected:
+ bool m_bInitialized;
+ unsigned int m_numBodies;
+ unsigned int m_numCells;
+ unsigned int m_maxPairsPerBody;
+ btScalar m_cellFactorAABB;
+ unsigned int m_maxBodiesPerCell;
+ bt3DGridBroadphaseParams m_params;
+ btScalar m_maxRadius;
+ // CPU data
+ unsigned int* m_hBodiesHash;
+ unsigned int* m_hCellStart;
+ unsigned int* m_hPairBuffStartCurr;
+ bt3DGrid3F1U* m_hAABB;
+ unsigned int* m_hPairBuff;
+ unsigned int* m_hPairScan;
+ unsigned int* m_hPairOut;
+// large proxies
+ int m_numLargeHandles;
+ int m_maxLargeHandles;
+ int m_LastLargeHandleIndex;
+ btSimpleBroadphaseProxy* m_pLargeHandles;
+ void* m_pLargeHandlesRawPtr;
+ int m_firstFreeLargeHandle;
+ int allocLargeHandle()
+ {
+ btAssert(m_numLargeHandles < m_maxLargeHandles);
+ int freeLargeHandle = m_firstFreeLargeHandle;
+ m_firstFreeLargeHandle = m_pLargeHandles[freeLargeHandle].GetNextFree();
+ m_numLargeHandles++;
+ if(freeLargeHandle > m_LastLargeHandleIndex)
+ {
+ m_LastLargeHandleIndex = freeLargeHandle;
+ }
+ return freeLargeHandle;
+ }
+ void freeLargeHandle(btSimpleBroadphaseProxy* proxy)
+ {
+ int handle = int(proxy - m_pLargeHandles);
+ btAssert((handle >= 0) && (handle < m_maxHandles));
+ if(handle == m_LastLargeHandleIndex)
+ {
+ m_LastLargeHandleIndex--;
+ }
+ proxy->SetNextFree(m_firstFreeLargeHandle);
+ m_firstFreeLargeHandle = handle;
+ proxy->m_clientObject = 0;
+ m_numLargeHandles--;
+ }
+ bool isLargeProxy(const btVector3& aabbMin, const btVector3& aabbMax);
+ bool isLargeProxy(btBroadphaseProxy* proxy);
+// debug
+ unsigned int m_numPairsAdded;
+ unsigned int m_numPairsRemoved;
+ unsigned int m_numOverflows;
+//
+public:
+ btGpu3DGridBroadphase(const btVector3& worldAabbMin,const btVector3& worldAabbMax,
+ int gridSizeX, int gridSizeY, int gridSizeZ,
+ int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody,
+ int maxBodiesPerCell = 8,
+ btScalar cellFactorAABB = btScalar(1.0f));
+ btGpu3DGridBroadphase( btOverlappingPairCache* overlappingPairCache,
+ const btVector3& worldAabbMin,const btVector3& worldAabbMax,
+ int gridSizeX, int gridSizeY, int gridSizeZ,
+ int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody,
+ int maxBodiesPerCell = 8,
+ btScalar cellFactorAABB = btScalar(1.0f));
+ virtual ~btGpu3DGridBroadphase();
+ virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
+
+ virtual btBroadphaseProxy* createProxy(const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy);
+ virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
+ virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback);
+ virtual void resetPool(btDispatcher* dispatcher);
+
+protected:
+ void _initialize( const btVector3& worldAabbMin,const btVector3& worldAabbMax,
+ int gridSizeX, int gridSizeY, int gridSizeZ,
+ int maxSmallProxies, int maxLargeProxies, int maxPairsPerBody,
+ int maxBodiesPerCell = 8,
+ btScalar cellFactorAABB = btScalar(1.0f));
+ void _finalize();
+ void addPairsToCache(btDispatcher* dispatcher);
+ void addLarge2LargePairsToCache(btDispatcher* dispatcher);
+
+// overrides for CPU version
+ virtual void setParameters(bt3DGridBroadphaseParams* hostParams);
+ virtual void prepareAABB();
+ virtual void calcHashAABB();
+ virtual void sortHash();
+ virtual void findCellStart();
+ virtual void findOverlappingPairs();
+ virtual void findPairsLarge();
+ virtual void computePairCacheChanges();
+ virtual void scanOverlappingPairBuff();
+ virtual void squeezeOverlappingPairBuff();
+};
+
+//----------------------------------------------------------------------------------------
+
+#endif //BTGPU3DGRIDBROADPHASE_H
+
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h
new file mode 100644
index 00000000..e0afb87b
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h
@@ -0,0 +1,430 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2009 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//----------------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+// K E R N E L F U N C T I O N S
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+
+// calculate position in uniform grid
+BT_GPU___device__ int3 bt3DGrid_calcGridPos(float4 p)
+{
+ int3 gridPos;
+ gridPos.x = (int)floor((p.x - BT_GPU_params.m_worldOriginX) / BT_GPU_params.m_cellSizeX);
+ gridPos.y = (int)floor((p.y - BT_GPU_params.m_worldOriginY) / BT_GPU_params.m_cellSizeY);
+ gridPos.z = (int)floor((p.z - BT_GPU_params.m_worldOriginZ) / BT_GPU_params.m_cellSizeZ);
+ return gridPos;
+} // bt3DGrid_calcGridPos()
+
+//----------------------------------------------------------------------------------------
+
+// calculate address in grid from position (clamping to edges)
+BT_GPU___device__ uint bt3DGrid_calcGridHash(int3 gridPos)
+{
+ gridPos.x = BT_GPU_max(0, BT_GPU_min(gridPos.x, (int)BT_GPU_params.m_gridSizeX - 1));
+ gridPos.y = BT_GPU_max(0, BT_GPU_min(gridPos.y, (int)BT_GPU_params.m_gridSizeY - 1));
+ gridPos.z = BT_GPU_max(0, BT_GPU_min(gridPos.z, (int)BT_GPU_params.m_gridSizeZ - 1));
+ return BT_GPU___mul24(BT_GPU___mul24(gridPos.z, BT_GPU_params.m_gridSizeY), BT_GPU_params.m_gridSizeX) + BT_GPU___mul24(gridPos.y, BT_GPU_params.m_gridSizeX) + gridPos.x;
+} // bt3DGrid_calcGridHash()
+
+//----------------------------------------------------------------------------------------
+
+// calculate grid hash value for each body using its AABB
+BT_GPU___global__ void calcHashAABBD(bt3DGrid3F1U* pAABB, uint2* pHash, uint numBodies)
+{
+ int index = BT_GPU___mul24(BT_GPU_blockIdx.x, BT_GPU_blockDim.x) + BT_GPU_threadIdx.x;
+ if(index >= (int)numBodies)
+ {
+ return;
+ }
+ bt3DGrid3F1U bbMin = pAABB[index*2];
+ bt3DGrid3F1U bbMax = pAABB[index*2 + 1];
+ float4 pos;
+ pos.x = (bbMin.fx + bbMax.fx) * 0.5f;
+ pos.y = (bbMin.fy + bbMax.fy) * 0.5f;
+ pos.z = (bbMin.fz + bbMax.fz) * 0.5f;
+ // get address in grid
+ int3 gridPos = bt3DGrid_calcGridPos(pos);
+ uint gridHash = bt3DGrid_calcGridHash(gridPos);
+ // store grid hash and body index
+ pHash[index] = BT_GPU_make_uint2(gridHash, index);
+} // calcHashAABBD()
+
+//----------------------------------------------------------------------------------------
+
+BT_GPU___global__ void findCellStartD(uint2* pHash, uint* cellStart, uint numBodies)
+{
+ int index = BT_GPU___mul24(BT_GPU_blockIdx.x, BT_GPU_blockDim.x) + BT_GPU_threadIdx.x;
+ if(index >= (int)numBodies)
+ {
+ return;
+ }
+ uint2 sortedData = pHash[index];
+ // Load hash data into shared memory so that we can look
+ // at neighboring body's hash value without loading
+ // two hash values per thread
+ BT_GPU___shared__ uint sharedHash[257];
+ sharedHash[BT_GPU_threadIdx.x+1] = sortedData.x;
+ if((index > 0) && (BT_GPU_threadIdx.x == 0))
+ {
+ // first thread in block must load neighbor body hash
+ volatile uint2 prevData = pHash[index-1];
+ sharedHash[0] = prevData.x;
+ }
+ BT_GPU___syncthreads();
+ if((index == 0) || (sortedData.x != sharedHash[BT_GPU_threadIdx.x]))
+ {
+ cellStart[sortedData.x] = index;
+ }
+} // findCellStartD()
+
+//----------------------------------------------------------------------------------------
+
+BT_GPU___device__ uint cudaTestAABBOverlap(bt3DGrid3F1U min0, bt3DGrid3F1U max0, bt3DGrid3F1U min1, bt3DGrid3F1U max1)
+{
+ return (min0.fx <= max1.fx)&& (min1.fx <= max0.fx) &&
+ (min0.fy <= max1.fy)&& (min1.fy <= max0.fy) &&
+ (min0.fz <= max1.fz)&& (min1.fz <= max0.fz);
+} // cudaTestAABBOverlap()
+
+//----------------------------------------------------------------------------------------
+
+BT_GPU___device__ void findPairsInCell( int3 gridPos,
+ uint index,
+ uint2* pHash,
+ uint* pCellStart,
+ bt3DGrid3F1U* pAABB,
+ uint* pPairBuff,
+ uint2* pPairBuffStartCurr,
+ uint numBodies)
+{
+ if ( (gridPos.x < 0) || (gridPos.x > (int)BT_GPU_params.m_gridSizeX - 1)
+ || (gridPos.y < 0) || (gridPos.y > (int)BT_GPU_params.m_gridSizeY - 1)
+ || (gridPos.z < 0) || (gridPos.z > (int)BT_GPU_params.m_gridSizeZ - 1))
+ {
+ return;
+ }
+ uint gridHash = bt3DGrid_calcGridHash(gridPos);
+ // get start of bucket for this cell
+ uint bucketStart = pCellStart[gridHash];
+ if (bucketStart == 0xffffffff)
+ {
+ return; // cell empty
+ }
+ // iterate over bodies in this cell
+ uint2 sortedData = pHash[index];
+ uint unsorted_indx = sortedData.y;
+ bt3DGrid3F1U min0 = BT_GPU_FETCH(pAABB, unsorted_indx*2);
+ bt3DGrid3F1U max0 = BT_GPU_FETCH(pAABB, unsorted_indx*2 + 1);
+ uint handleIndex = min0.uw;
+ uint2 start_curr = pPairBuffStartCurr[handleIndex];
+ uint start = start_curr.x;
+ uint curr = start_curr.y;
+ uint2 start_curr_next = pPairBuffStartCurr[handleIndex+1];
+ uint curr_max = start_curr_next.x - start - 1;
+ uint bucketEnd = bucketStart + BT_GPU_params.m_maxBodiesPerCell;
+ bucketEnd = (bucketEnd > numBodies) ? numBodies : bucketEnd;
+ for(uint index2 = bucketStart; index2 < bucketEnd; index2++)
+ {
+ uint2 cellData = pHash[index2];
+ if (cellData.x != gridHash)
+ {
+ break; // no longer in same bucket
+ }
+ uint unsorted_indx2 = cellData.y;
+ if (unsorted_indx2 < unsorted_indx) // check not colliding with self
+ {
+ bt3DGrid3F1U min1 = BT_GPU_FETCH(pAABB, unsorted_indx2*2);
+ bt3DGrid3F1U max1 = BT_GPU_FETCH(pAABB, unsorted_indx2*2 + 1);
+ if(cudaTestAABBOverlap(min0, max0, min1, max1))
+ {
+ uint handleIndex2 = min1.uw;
+ uint k;
+ for(k = 0; k < curr; k++)
+ {
+ uint old_pair = pPairBuff[start+k] & (~BT_3DGRID_PAIR_ANY_FLG);
+ if(old_pair == handleIndex2)
+ {
+ pPairBuff[start+k] |= BT_3DGRID_PAIR_FOUND_FLG;
+ break;
+ }
+ }
+ if(k == curr)
+ {
+ if(curr >= curr_max)
+ { // not a good solution, but let's avoid crash
+ break;
+ }
+ pPairBuff[start+curr] = handleIndex2 | BT_3DGRID_PAIR_NEW_FLG;
+ curr++;
+ }
+ }
+ }
+ }
+ pPairBuffStartCurr[handleIndex] = BT_GPU_make_uint2(start, curr);
+ return;
+} // findPairsInCell()
+
+//----------------------------------------------------------------------------------------
+
+BT_GPU___global__ void findOverlappingPairsD( bt3DGrid3F1U* pAABB, uint2* pHash, uint* pCellStart,
+ uint* pPairBuff, uint2* pPairBuffStartCurr, uint numBodies)
+{
+ int index = BT_GPU___mul24(BT_GPU_blockIdx.x, BT_GPU_blockDim.x) + BT_GPU_threadIdx.x;
+ if(index >= (int)numBodies)
+ {
+ return;
+ }
+ uint2 sortedData = pHash[index];
+ uint unsorted_indx = sortedData.y;
+ bt3DGrid3F1U bbMin = BT_GPU_FETCH(pAABB, unsorted_indx*2);
+ bt3DGrid3F1U bbMax = BT_GPU_FETCH(pAABB, unsorted_indx*2 + 1);
+ float4 pos;
+ pos.x = (bbMin.fx + bbMax.fx) * 0.5f;
+ pos.y = (bbMin.fy + bbMax.fy) * 0.5f;
+ pos.z = (bbMin.fz + bbMax.fz) * 0.5f;
+ // get address in grid
+ int3 gridPos = bt3DGrid_calcGridPos(pos);
+ // examine only neighbouring cells
+ for(int z=-1; z<=1; z++) {
+ for(int y=-1; y<=1; y++) {
+ for(int x=-1; x<=1; x++) {
+ findPairsInCell(gridPos + BT_GPU_make_int3(x, y, z), index, pHash, pCellStart, pAABB, pPairBuff, pPairBuffStartCurr, numBodies);
+ }
+ }
+ }
+} // findOverlappingPairsD()
+
+//----------------------------------------------------------------------------------------
+
+BT_GPU___global__ void findPairsLargeD( bt3DGrid3F1U* pAABB, uint2* pHash, uint* pCellStart, uint* pPairBuff,
+ uint2* pPairBuffStartCurr, uint numBodies, uint numLarge)
+{
+ int index = BT_GPU___mul24(BT_GPU_blockIdx.x, BT_GPU_blockDim.x) + BT_GPU_threadIdx.x;
+ if(index >= (int)numBodies)
+ {
+ return;
+ }
+ uint2 sortedData = pHash[index];
+ uint unsorted_indx = sortedData.y;
+ bt3DGrid3F1U min0 = BT_GPU_FETCH(pAABB, unsorted_indx*2);
+ bt3DGrid3F1U max0 = BT_GPU_FETCH(pAABB, unsorted_indx*2 + 1);
+ uint handleIndex = min0.uw;
+ uint2 start_curr = pPairBuffStartCurr[handleIndex];
+ uint start = start_curr.x;
+ uint curr = start_curr.y;
+ uint2 start_curr_next = pPairBuffStartCurr[handleIndex+1];
+ uint curr_max = start_curr_next.x - start - 1;
+ for(uint i = 0; i < numLarge; i++)
+ {
+ uint indx2 = numBodies + i;
+ bt3DGrid3F1U min1 = BT_GPU_FETCH(pAABB, indx2*2);
+ bt3DGrid3F1U max1 = BT_GPU_FETCH(pAABB, indx2*2 + 1);
+ if(cudaTestAABBOverlap(min0, max0, min1, max1))
+ {
+ uint k;
+ uint handleIndex2 = min1.uw;
+ for(k = 0; k < curr; k++)
+ {
+ uint old_pair = pPairBuff[start+k] & (~BT_3DGRID_PAIR_ANY_FLG);
+ if(old_pair == handleIndex2)
+ {
+ pPairBuff[start+k] |= BT_3DGRID_PAIR_FOUND_FLG;
+ break;
+ }
+ }
+ if(k == curr)
+ {
+ pPairBuff[start+curr] = handleIndex2 | BT_3DGRID_PAIR_NEW_FLG;
+ if(curr >= curr_max)
+ { // not a good solution, but let's avoid crash
+ break;
+ }
+ curr++;
+ }
+ }
+ }
+ pPairBuffStartCurr[handleIndex] = BT_GPU_make_uint2(start, curr);
+ return;
+} // findPairsLargeD()
+
+//----------------------------------------------------------------------------------------
+
+BT_GPU___global__ void computePairCacheChangesD(uint* pPairBuff, uint2* pPairBuffStartCurr,
+ uint* pPairScan, bt3DGrid3F1U* pAABB, uint numBodies)
+{
+ int index = BT_GPU___mul24(BT_GPU_blockIdx.x, BT_GPU_blockDim.x) + BT_GPU_threadIdx.x;
+ if(index >= (int)numBodies)
+ {
+ return;
+ }
+ bt3DGrid3F1U bbMin = pAABB[index * 2];
+ uint handleIndex = bbMin.uw;
+ uint2 start_curr = pPairBuffStartCurr[handleIndex];
+ uint start = start_curr.x;
+ uint curr = start_curr.y;
+ uint *pInp = pPairBuff + start;
+ uint num_changes = 0;
+ for(uint k = 0; k < curr; k++, pInp++)
+ {
+ if(!((*pInp) & BT_3DGRID_PAIR_FOUND_FLG))
+ {
+ num_changes++;
+ }
+ }
+ pPairScan[index+1] = num_changes;
+} // computePairCacheChangesD()
+
+//----------------------------------------------------------------------------------------
+
+BT_GPU___global__ void squeezeOverlappingPairBuffD(uint* pPairBuff, uint2* pPairBuffStartCurr, uint* pPairScan,
+ uint* pPairOut, bt3DGrid3F1U* pAABB, uint numBodies)
+{
+ int index = BT_GPU___mul24(BT_GPU_blockIdx.x, BT_GPU_blockDim.x) + BT_GPU_threadIdx.x;
+ if(index >= (int)numBodies)
+ {
+ return;
+ }
+ bt3DGrid3F1U bbMin = pAABB[index * 2];
+ uint handleIndex = bbMin.uw;
+ uint2 start_curr = pPairBuffStartCurr[handleIndex];
+ uint start = start_curr.x;
+ uint curr = start_curr.y;
+ uint* pInp = pPairBuff + start;
+ uint* pOut = pPairOut + pPairScan[index];
+ uint* pOut2 = pInp;
+ uint num = 0;
+ for(uint k = 0; k < curr; k++, pInp++)
+ {
+ if(!((*pInp) & BT_3DGRID_PAIR_FOUND_FLG))
+ {
+ *pOut = *pInp;
+ pOut++;
+ }
+ if((*pInp) & BT_3DGRID_PAIR_ANY_FLG)
+ {
+ *pOut2 = (*pInp) & (~BT_3DGRID_PAIR_ANY_FLG);
+ pOut2++;
+ num++;
+ }
+ }
+ pPairBuffStartCurr[handleIndex] = BT_GPU_make_uint2(start, num);
+} // squeezeOverlappingPairBuffD()
+
+
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+// E N D O F K E R N E L F U N C T I O N S
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------
+
+extern "C"
+{
+
+//----------------------------------------------------------------------------------------
+
+void BT_GPU_PREF(calcHashAABB)(bt3DGrid3F1U* pAABB, unsigned int* hash, unsigned int numBodies)
+{
+ int numThreads, numBlocks;
+ BT_GPU_PREF(computeGridSize)(numBodies, 256, numBlocks, numThreads);
+ // execute the kernel
+ BT_GPU_EXECKERNEL(numBlocks, numThreads, calcHashAABBD, (pAABB, (uint2*)hash, numBodies));
+ // check if kernel invocation generated an error
+ BT_GPU_CHECK_ERROR("calcHashAABBD kernel execution failed");
+} // calcHashAABB()
+
+//----------------------------------------------------------------------------------------
+
+void BT_GPU_PREF(findCellStart(unsigned int* hash, unsigned int* cellStart, unsigned int numBodies, unsigned int numCells))
+{
+ int numThreads, numBlocks;
+ BT_GPU_PREF(computeGridSize)(numBodies, 256, numBlocks, numThreads);
+ BT_GPU_SAFE_CALL(BT_GPU_Memset(cellStart, 0xffffffff, numCells*sizeof(uint)));
+ BT_GPU_EXECKERNEL(numBlocks, numThreads, findCellStartD, ((uint2*)hash, (uint*)cellStart, numBodies));
+ BT_GPU_CHECK_ERROR("Kernel execution failed: findCellStartD");
+} // findCellStart()
+
+//----------------------------------------------------------------------------------------
+
+void BT_GPU_PREF(findOverlappingPairs(bt3DGrid3F1U* pAABB, unsigned int* pHash, unsigned int* pCellStart, unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int numBodies))
+{
+#if B_CUDA_USE_TEX
+ BT_GPU_SAFE_CALL(cudaBindTexture(0, pAABBTex, pAABB, numBodies * 2 * sizeof(bt3DGrid3F1U)));
+#endif
+ int numThreads, numBlocks;
+ BT_GPU_PREF(computeGridSize)(numBodies, 64, numBlocks, numThreads);
+ BT_GPU_EXECKERNEL(numBlocks, numThreads, findOverlappingPairsD, (pAABB,(uint2*)pHash,(uint*)pCellStart,(uint*)pPairBuff,(uint2*)pPairBuffStartCurr,numBodies));
+ BT_GPU_CHECK_ERROR("Kernel execution failed: bt_CudaFindOverlappingPairsD");
+#if B_CUDA_USE_TEX
+ BT_GPU_SAFE_CALL(cudaUnbindTexture(pAABBTex));
+#endif
+} // findOverlappingPairs()
+
+//----------------------------------------------------------------------------------------
+
+void BT_GPU_PREF(findPairsLarge(bt3DGrid3F1U* pAABB, unsigned int* pHash, unsigned int* pCellStart, unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int numBodies, unsigned int numLarge))
+{
+#if B_CUDA_USE_TEX
+ BT_GPU_SAFE_CALL(cudaBindTexture(0, pAABBTex, pAABB, (numBodies+numLarge) * 2 * sizeof(bt3DGrid3F1U)));
+#endif
+ int numThreads, numBlocks;
+ BT_GPU_PREF(computeGridSize)(numBodies, 64, numBlocks, numThreads);
+ BT_GPU_EXECKERNEL(numBlocks, numThreads, findPairsLargeD, (pAABB,(uint2*)pHash,(uint*)pCellStart,(uint*)pPairBuff,(uint2*)pPairBuffStartCurr,numBodies,numLarge));
+ BT_GPU_CHECK_ERROR("Kernel execution failed: btCuda_findPairsLargeD");
+#if B_CUDA_USE_TEX
+ BT_GPU_SAFE_CALL(cudaUnbindTexture(pAABBTex));
+#endif
+} // findPairsLarge()
+
+//----------------------------------------------------------------------------------------
+
+void BT_GPU_PREF(computePairCacheChanges(unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int* pPairScan, bt3DGrid3F1U* pAABB, unsigned int numBodies))
+{
+ int numThreads, numBlocks;
+ BT_GPU_PREF(computeGridSize)(numBodies, 256, numBlocks, numThreads);
+ BT_GPU_EXECKERNEL(numBlocks, numThreads, computePairCacheChangesD, ((uint*)pPairBuff,(uint2*)pPairBuffStartCurr,(uint*)pPairScan,pAABB,numBodies));
+ BT_GPU_CHECK_ERROR("Kernel execution failed: btCudaComputePairCacheChangesD");
+} // computePairCacheChanges()
+
+//----------------------------------------------------------------------------------------
+
+void BT_GPU_PREF(squeezeOverlappingPairBuff(unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int* pPairScan, unsigned int* pPairOut, bt3DGrid3F1U* pAABB, unsigned int numBodies))
+{
+ int numThreads, numBlocks;
+ BT_GPU_PREF(computeGridSize)(numBodies, 256, numBlocks, numThreads);
+ BT_GPU_EXECKERNEL(numBlocks, numThreads, squeezeOverlappingPairBuffD, ((uint*)pPairBuff,(uint2*)pPairBuffStartCurr,(uint*)pPairScan,(uint*)pPairOut,pAABB,numBodies));
+ BT_GPU_CHECK_ERROR("Kernel execution failed: btCudaSqueezeOverlappingPairBuffD");
+} // btCuda_squeezeOverlappingPairBuff()
+
+//------------------------------------------------------------------------------------------------
+
+} // extern "C"
+
+//------------------------------------------------------------------------------------------------
+//------------------------------------------------------------------------------------------------
+//------------------------------------------------------------------------------------------------
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h
new file mode 100644
index 00000000..607bda7e
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h
@@ -0,0 +1,61 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2009 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//----------------------------------------------------------------------------------------
+
+// Shared definitions for GPU-based 3D Grid collision detection broadphase
+
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Keep this file free from Bullet headers
+// it is included into both CUDA and CPU code
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+//----------------------------------------------------------------------------------------
+
+#ifndef BTGPU3DGRIDBROADPHASESHAREDDEFS_H
+#define BTGPU3DGRIDBROADPHASESHAREDDEFS_H
+
+//----------------------------------------------------------------------------------------
+
+#include "btGpu3DGridBroadphaseSharedTypes.h"
+
+//----------------------------------------------------------------------------------------
+
+extern "C"
+{
+
+//----------------------------------------------------------------------------------------
+
+void BT_GPU_PREF(calcHashAABB)(bt3DGrid3F1U* pAABB, unsigned int* hash, unsigned int numBodies);
+
+void BT_GPU_PREF(findCellStart)(unsigned int* hash, unsigned int* cellStart, unsigned int numBodies, unsigned int numCells);
+
+void BT_GPU_PREF(findOverlappingPairs)(bt3DGrid3F1U* pAABB, unsigned int* pHash, unsigned int* pCellStart, unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int numBodies);
+
+void BT_GPU_PREF(findPairsLarge)(bt3DGrid3F1U* pAABB, unsigned int* pHash, unsigned int* pCellStart, unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int numBodies, unsigned int numLarge);
+
+void BT_GPU_PREF(computePairCacheChanges)(unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int* pPairScan, bt3DGrid3F1U* pAABB, unsigned int numBodies);
+
+void BT_GPU_PREF(squeezeOverlappingPairBuff)(unsigned int* pPairBuff, unsigned int* pPairBuffStartCurr, unsigned int* pPairScan, unsigned int* pPairOut, bt3DGrid3F1U* pAABB, unsigned int numBodies);
+
+
+//----------------------------------------------------------------------------------------
+
+} // extern "C"
+
+//----------------------------------------------------------------------------------------
+
+#endif // BTGPU3DGRIDBROADPHASESHAREDDEFS_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h
new file mode 100644
index 00000000..616a4009
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h
@@ -0,0 +1,67 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2009 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//----------------------------------------------------------------------------------------
+
+// Shared definitions for GPU-based 3D Grid collision detection broadphase
+
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Keep this file free from Bullet headers
+// it is included into both CUDA and CPU code
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+//----------------------------------------------------------------------------------------
+
+#ifndef BTGPU3DGRIDBROADPHASESHAREDTYPES_H
+#define BTGPU3DGRIDBROADPHASESHAREDTYPES_H
+
+//----------------------------------------------------------------------------------------
+
+#define BT_3DGRID_PAIR_FOUND_FLG (0x40000000)
+#define BT_3DGRID_PAIR_NEW_FLG (0x20000000)
+#define BT_3DGRID_PAIR_ANY_FLG (BT_3DGRID_PAIR_FOUND_FLG | BT_3DGRID_PAIR_NEW_FLG)
+
+//----------------------------------------------------------------------------------------
+
+struct bt3DGridBroadphaseParams
+{
+ unsigned int m_gridSizeX;
+ unsigned int m_gridSizeY;
+ unsigned int m_gridSizeZ;
+ unsigned int m_numCells;
+ float m_worldOriginX;
+ float m_worldOriginY;
+ float m_worldOriginZ;
+ float m_cellSizeX;
+ float m_cellSizeY;
+ float m_cellSizeZ;
+ unsigned int m_numBodies;
+ unsigned int m_maxBodiesPerCell;
+};
+
+//----------------------------------------------------------------------------------------
+
+struct bt3DGrid3F1U
+{
+ float fx;
+ float fy;
+ float fz;
+ unsigned int uw;
+};
+
+//----------------------------------------------------------------------------------------
+
+#endif // BTGPU3DGRIDBROADPHASESHAREDTYPES_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpuDefines.h b/tests/bullet/src/BulletMultiThreaded/btGpuDefines.h
new file mode 100644
index 00000000..f9315ab6
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpuDefines.h
@@ -0,0 +1,211 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2009 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+// definitions for "GPU on CPU" code
+
+
+#ifndef BT_GPU_DEFINES_H
+#define BT_GPU_DEFINES_H
+
+typedef unsigned int uint;
+
+struct int2
+{
+ int x, y;
+};
+
+struct uint2
+{
+ unsigned int x, y;
+};
+
+struct int3
+{
+ int x, y, z;
+};
+
+struct uint3
+{
+ unsigned int x, y, z;
+};
+
+struct float4
+{
+ float x, y, z, w;
+};
+
+struct float3
+{
+ float x, y, z;
+};
+
+
+#define BT_GPU___device__ inline
+#define BT_GPU___devdata__
+#define BT_GPU___constant__
+#define BT_GPU_max(a, b) ((a) > (b) ? (a) : (b))
+#define BT_GPU_min(a, b) ((a) < (b) ? (a) : (b))
+#define BT_GPU_params s3DGridBroadphaseParams
+#define BT_GPU___mul24(a, b) ((a)*(b))
+#define BT_GPU___global__ inline
+#define BT_GPU___shared__ static
+#define BT_GPU___syncthreads()
+#define CUDART_PI_F SIMD_PI
+
+static inline uint2 bt3dGrid_make_uint2(unsigned int x, unsigned int y)
+{
+ uint2 t; t.x = x; t.y = y; return t;
+}
+#define BT_GPU_make_uint2(x, y) bt3dGrid_make_uint2(x, y)
+
+static inline int3 bt3dGrid_make_int3(int x, int y, int z)
+{
+ int3 t; t.x = x; t.y = y; t.z = z; return t;
+}
+#define BT_GPU_make_int3(x, y, z) bt3dGrid_make_int3(x, y, z)
+
+static inline float3 bt3dGrid_make_float3(float x, float y, float z)
+{
+ float3 t; t.x = x; t.y = y; t.z = z; return t;
+}
+#define BT_GPU_make_float3(x, y, z) bt3dGrid_make_float3(x, y, z)
+
+static inline float3 bt3dGrid_make_float34(float4 f)
+{
+ float3 t; t.x = f.x; t.y = f.y; t.z = f.z; return t;
+}
+#define BT_GPU_make_float34(f) bt3dGrid_make_float34(f)
+
+static inline float3 bt3dGrid_make_float31(float f)
+{
+ float3 t; t.x = t.y = t.z = f; return t;
+}
+#define BT_GPU_make_float31(x) bt3dGrid_make_float31(x)
+
+static inline float4 bt3dGrid_make_float42(float3 v, float f)
+{
+ float4 t; t.x = v.x; t.y = v.y; t.z = v.z; t.w = f; return t;
+}
+#define BT_GPU_make_float42(a, b) bt3dGrid_make_float42(a, b)
+
+static inline float4 bt3dGrid_make_float44(float a, float b, float c, float d)
+{
+ float4 t; t.x = a; t.y = b; t.z = c; t.w = d; return t;
+}
+#define BT_GPU_make_float44(a, b, c, d) bt3dGrid_make_float44(a, b, c, d)
+
+inline int3 operator+(int3 a, int3 b)
+{
+ return bt3dGrid_make_int3(a.x + b.x, a.y + b.y, a.z + b.z);
+}
+
+inline float4 operator+(const float4& a, const float4& b)
+{
+ float4 r; r.x = a.x+b.x; r.y = a.y+b.y; r.z = a.z+b.z; r.w = a.w+b.w; return r;
+}
+inline float4 operator*(const float4& a, float fact)
+{
+ float4 r; r.x = a.x*fact; r.y = a.y*fact; r.z = a.z*fact; r.w = a.w*fact; return r;
+}
+inline float4 operator*(float fact, float4& a)
+{
+ return (a * fact);
+}
+inline float4& operator*=(float4& a, float fact)
+{
+ a = fact * a;
+ return a;
+}
+inline float4& operator+=(float4& a, const float4& b)
+{
+ a = a + b;
+ return a;
+}
+
+inline float3 operator+(const float3& a, const float3& b)
+{
+ float3 r; r.x = a.x+b.x; r.y = a.y+b.y; r.z = a.z+b.z; return r;
+}
+inline float3 operator-(const float3& a, const float3& b)
+{
+ float3 r; r.x = a.x-b.x; r.y = a.y-b.y; r.z = a.z-b.z; return r;
+}
+static inline float bt3dGrid_dot(float3& a, float3& b)
+{
+ return a.x*b.x+a.y*b.y+a.z*b.z;
+}
+#define BT_GPU_dot(a,b) bt3dGrid_dot(a,b)
+
+static inline float bt3dGrid_dot4(float4& a, float4& b)
+{
+ return a.x*b.x+a.y*b.y+a.z*b.z+a.w*b.w;
+}
+#define BT_GPU_dot4(a,b) bt3dGrid_dot4(a,b)
+
+static inline float3 bt3dGrid_cross(const float3& a, const float3& b)
+{
+ float3 r; r.x = a.y*b.z-a.z*b.y; r.y = -a.x*b.z+a.z*b.x; r.z = a.x*b.y-a.y*b.x; return r;
+}
+#define BT_GPU_cross(a,b) bt3dGrid_cross(a,b)
+
+
+inline float3 operator*(const float3& a, float fact)
+{
+ float3 r; r.x = a.x*fact; r.y = a.y*fact; r.z = a.z*fact; return r;
+}
+
+
+inline float3& operator+=(float3& a, const float3& b)
+{
+ a = a + b;
+ return a;
+}
+inline float3& operator-=(float3& a, const float3& b)
+{
+ a = a - b;
+ return a;
+}
+inline float3& operator*=(float3& a, float fact)
+{
+ a = a * fact;
+ return a;
+}
+inline float3 operator-(const float3& v)
+{
+ float3 r; r.x = -v.x; r.y = -v.y; r.z = -v.z; return r;
+}
+
+
+#define BT_GPU_FETCH(a, b) a[b]
+#define BT_GPU_FETCH4(a, b) a[b]
+#define BT_GPU_PREF(func) btGpu_##func
+#define BT_GPU_SAFE_CALL(func) func
+#define BT_GPU_Memset memset
+#define BT_GPU_MemcpyToSymbol(a, b, c) memcpy(&a, b, c)
+#define BT_GPU_BindTexture(a, b, c, d)
+#define BT_GPU_UnbindTexture(a)
+
+static uint2 s_blockIdx, s_blockDim, s_threadIdx;
+#define BT_GPU_blockIdx s_blockIdx
+#define BT_GPU_blockDim s_blockDim
+#define BT_GPU_threadIdx s_threadIdx
+#define BT_GPU_EXECKERNEL(numb, numt, kfunc, args) {s_blockDim.x=numt;for(int nb=0;nb<numb;nb++){s_blockIdx.x=nb;for(int nt=0;nt<numt;nt++){s_threadIdx.x=nt;kfunc args;}}}
+
+#define BT_GPU_CHECK_ERROR(s)
+
+
+#endif //BT_GPU_DEFINES_H
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedCode.h b/tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedCode.h
new file mode 100644
index 00000000..5761e790
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedCode.h
@@ -0,0 +1,55 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2009 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//----------------------------------------------------------------------------------------
+
+// Shared code for GPU-based utilities
+
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Keep this file free from Bullet headers
+// will be compiled by both CPU and CUDA compilers
+// file with definitions of BT_GPU_xxx should be included first
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+//----------------------------------------------------------------------------------------
+
+#include "btGpuUtilsSharedDefs.h"
+
+//----------------------------------------------------------------------------------------
+
+extern "C"
+{
+
+//----------------------------------------------------------------------------------------
+
+//Round a / b to nearest higher integer value
+int BT_GPU_PREF(iDivUp)(int a, int b)
+{
+ return (a % b != 0) ? (a / b + 1) : (a / b);
+} // iDivUp()
+
+//----------------------------------------------------------------------------------------
+
+// compute grid and thread block size for a given number of elements
+void BT_GPU_PREF(computeGridSize)(int n, int blockSize, int &numBlocks, int &numThreads)
+{
+ numThreads = BT_GPU_min(blockSize, n);
+ numBlocks = BT_GPU_PREF(iDivUp)(n, numThreads);
+} // computeGridSize()
+
+//----------------------------------------------------------------------------------------
+
+} // extern "C"
+
diff --git a/tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedDefs.h b/tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedDefs.h
new file mode 100644
index 00000000..dccfda54
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btGpuUtilsSharedDefs.h
@@ -0,0 +1,52 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, http://bulletphysics.org
+Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+// Shared definitions for GPU-based utilities
+
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// Keep this file free from Bullet headers
+// it is included into both CUDA and CPU code
+// file with definitions of BT_GPU_xxx should be included first
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+
+#ifndef BTGPUUTILSDHAREDDEFS_H
+#define BTGPUUTILSDHAREDDEFS_H
+
+
+extern "C"
+{
+
+
+//Round a / b to nearest higher integer value
+int BT_GPU_PREF(iDivUp)(int a, int b);
+
+// compute grid and thread block size for a given number of elements
+void BT_GPU_PREF(computeGridSize)(int n, int blockSize, int &numBlocks, int &numThreads);
+
+void BT_GPU_PREF(allocateArray)(void** devPtr, unsigned int size);
+void BT_GPU_PREF(freeArray)(void* devPtr);
+void BT_GPU_PREF(copyArrayFromDevice)(void* host, const void* device, unsigned int size);
+void BT_GPU_PREF(copyArrayToDevice)(void* device, const void* host, unsigned int size);
+void BT_GPU_PREF(registerGLBufferObject(unsigned int vbo));
+void* BT_GPU_PREF(mapGLBufferObject(unsigned int vbo));
+void BT_GPU_PREF(unmapGLBufferObject(unsigned int vbo));
+
+
+} // extern "C"
+
+
+#endif // BTGPUUTILSDHAREDDEFS_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.cpp b/tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.cpp
new file mode 100644
index 00000000..47e4c88b
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.cpp
@@ -0,0 +1,1389 @@
+/*
+ Copyright (C) 2010 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+
+#include "btParallelConstraintSolver.h"
+#include "BulletDynamics/ConstraintSolver/btContactSolverInfo.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "LinearMath/btPoolAllocator.h"
+
+#include "BulletMultiThreaded/vectormath2bullet.h"
+
+#include "LinearMath/btQuickprof.h"
+#include "BulletMultiThreaded/btThreadSupportInterface.h"
+#ifdef PFX_USE_FREE_VECTORMATH
+#include "vecmath/vmInclude.h"
+#else
+#include "vectormath/vmInclude.h"
+#endif //PFX_USE_FREE_VECTORMATH
+
+#include "HeapManager.h"
+
+#include "PlatformDefinitions.h"
+
+//#include "PfxSimdUtils.h"
+#include "LinearMath/btScalar.h"
+
+#include "TrbStateVec.h"
+
+
+
+/////////////////
+
+
+#define TMP_BUFF_BYTES (15*1024*1024)
+unsigned char ATTRIBUTE_ALIGNED128(tmp_buff[TMP_BUFF_BYTES]);
+
+
+
+// Project Gauss Seidel or the equivalent Sequential Impulse
+ inline void resolveSingleConstraintRowGeneric(PfxSolverBody& body1,PfxSolverBody& body2,const btSolverConstraint& c)
+{
+
+ btScalar deltaImpulse = c.m_rhs-btScalar(c.m_appliedImpulse)*c.m_cfm;
+ const btScalar deltaVel1Dotn = c.m_contactNormal.dot(getBtVector3(body1.mDeltaLinearVelocity)) + c.m_relpos1CrossNormal.dot(getBtVector3(body1.mDeltaAngularVelocity));
+ const btScalar deltaVel2Dotn = -c.m_contactNormal.dot(getBtVector3(body2.mDeltaLinearVelocity)) + c.m_relpos2CrossNormal.dot(getBtVector3(body2.mDeltaAngularVelocity));
+
+// const btScalar delta_rel_vel = deltaVel1Dotn-deltaVel2Dotn;
+ deltaImpulse -= deltaVel1Dotn*c.m_jacDiagABInv;
+ deltaImpulse -= deltaVel2Dotn*c.m_jacDiagABInv;
+
+ const btScalar sum = btScalar(c.m_appliedImpulse) + deltaImpulse;
+ if (sum < c.m_lowerLimit)
+ {
+ deltaImpulse = c.m_lowerLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_lowerLimit;
+ }
+ else if (sum > c.m_upperLimit)
+ {
+ deltaImpulse = c.m_upperLimit-c.m_appliedImpulse;
+ c.m_appliedImpulse = c.m_upperLimit;
+ }
+ else
+ {
+ c.m_appliedImpulse = sum;
+ }
+
+
+ if (body1.mMassInv)
+ {
+ btVector3 linearComponent = c.m_contactNormal*body1.mMassInv;
+ body1.mDeltaLinearVelocity += vmVector3(linearComponent.getX()*deltaImpulse,linearComponent.getY()*deltaImpulse,linearComponent.getZ()*deltaImpulse);
+ btVector3 tmp=c.m_angularComponentA*(btVector3(deltaImpulse,deltaImpulse,deltaImpulse));
+ body1.mDeltaAngularVelocity += vmVector3(tmp.getX(),tmp.getY(),tmp.getZ());
+ }
+
+ if (body2.mMassInv)
+ {
+ btVector3 linearComponent = -c.m_contactNormal*body2.mMassInv;
+ body2.mDeltaLinearVelocity += vmVector3(linearComponent.getX()*deltaImpulse,linearComponent.getY()*deltaImpulse,linearComponent.getZ()*deltaImpulse);
+ btVector3 tmp = c.m_angularComponentB*((btVector3(deltaImpulse,deltaImpulse,deltaImpulse)));//*m_angularFactor);
+ body2.mDeltaAngularVelocity += vmVector3(tmp.getX(),tmp.getY(),tmp.getZ());
+ }
+
+ //body1.internalApplyImpulse(c.m_contactNormal*body1.internalGetInvMass(),c.m_angularComponentA,deltaImpulse);
+ //body2.internalApplyImpulse(-c.m_contactNormal*body2.internalGetInvMass(),c.m_angularComponentB,deltaImpulse);
+
+}
+
+
+static SIMD_FORCE_INLINE
+void pfxSolveLinearConstraintRow(btConstraintRow &constraint,
+ vmVector3 &deltaLinearVelocityA,vmVector3 &deltaAngularVelocityA,
+ float massInvA,const vmMatrix3 &inertiaInvA,const vmVector3 &rA,
+ vmVector3 &deltaLinearVelocityB,vmVector3 &deltaAngularVelocityB,
+ float massInvB,const vmMatrix3 &inertiaInvB,const vmVector3 &rB)
+{
+ const vmVector3 normal(btReadVector3(constraint.m_normal));
+ btScalar deltaImpulse = constraint.m_rhs;
+ vmVector3 dVA = deltaLinearVelocityA + cross(deltaAngularVelocityA,rA);
+ vmVector3 dVB = deltaLinearVelocityB + cross(deltaAngularVelocityB,rB);
+ deltaImpulse -= constraint.m_jacDiagInv * dot(normal,dVA-dVB);
+ btScalar oldImpulse = constraint.m_accumImpulse;
+ constraint.m_accumImpulse = btClamped(oldImpulse + deltaImpulse,constraint.m_lowerLimit,constraint.m_upperLimit);
+ deltaImpulse = constraint.m_accumImpulse - oldImpulse;
+ deltaLinearVelocityA += deltaImpulse * massInvA * normal;
+ deltaAngularVelocityA += deltaImpulse * inertiaInvA * cross(rA,normal);
+ deltaLinearVelocityB -= deltaImpulse * massInvB * normal;
+ deltaAngularVelocityB -= deltaImpulse * inertiaInvB * cross(rB,normal);
+
+}
+
+void btSolveContactConstraint(
+ btConstraintRow &constraintResponse,
+ btConstraintRow &constraintFriction1,
+ btConstraintRow &constraintFriction2,
+ const vmVector3 &contactPointA,
+ const vmVector3 &contactPointB,
+ PfxSolverBody &solverBodyA,
+ PfxSolverBody &solverBodyB,
+ float friction
+ )
+{
+ vmVector3 rA = rotate(solverBodyA.mOrientation,contactPointA);
+ vmVector3 rB = rotate(solverBodyB.mOrientation,contactPointB);
+
+ pfxSolveLinearConstraintRow(constraintResponse,
+ solverBodyA.mDeltaLinearVelocity,solverBodyA.mDeltaAngularVelocity,solverBodyA.mMassInv,solverBodyA.mInertiaInv,rA,
+ solverBodyB.mDeltaLinearVelocity,solverBodyB.mDeltaAngularVelocity,solverBodyB.mMassInv,solverBodyB.mInertiaInv,rB);
+
+ float mf = friction*fabsf(constraintResponse.m_accumImpulse);
+ constraintFriction1.m_lowerLimit = -mf;
+ constraintFriction1.m_upperLimit = mf;
+ constraintFriction2.m_lowerLimit = -mf;
+ constraintFriction2.m_upperLimit = mf;
+
+ pfxSolveLinearConstraintRow(constraintFriction1,
+ solverBodyA.mDeltaLinearVelocity,solverBodyA.mDeltaAngularVelocity,solverBodyA.mMassInv,solverBodyA.mInertiaInv,rA,
+ solverBodyB.mDeltaLinearVelocity,solverBodyB.mDeltaAngularVelocity,solverBodyB.mMassInv,solverBodyB.mInertiaInv,rB);
+
+ pfxSolveLinearConstraintRow(constraintFriction2,
+ solverBodyA.mDeltaLinearVelocity,solverBodyA.mDeltaAngularVelocity,solverBodyA.mMassInv,solverBodyA.mInertiaInv,rA,
+ solverBodyB.mDeltaLinearVelocity,solverBodyB.mDeltaAngularVelocity,solverBodyB.mMassInv,solverBodyB.mInertiaInv,rB);
+}
+
+
+void CustomSolveConstraintsTaskParallel(
+ const PfxParallelGroup *contactParallelGroup,const PfxParallelBatch *contactParallelBatches,
+ PfxConstraintPair *contactPairs,uint32_t numContactPairs,
+ btPersistentManifold* offsetContactManifolds,
+ const PfxParallelGroup *jointParallelGroup,const PfxParallelBatch *jointParallelBatches,
+ PfxConstraintPair *jointPairs,uint32_t numJointPairs,
+ btSolverConstraint* offsetSolverConstraints,
+ TrbState *offsetRigStates,
+ PfxSolverBody *offsetSolverBodies,
+ uint32_t numRigidBodies,
+ int iteration,unsigned int taskId,unsigned int numTasks,btBarrier *barrier)
+{
+
+ PfxSolverBody staticBody;
+ staticBody.mMassInv = 0.f;
+ staticBody.mDeltaAngularVelocity=vmVector3(0,0,0);
+ staticBody.mDeltaLinearVelocity =vmVector3(0,0,0);
+
+
+ for(int k=0;k<iteration+1;k++) {
+ // Joint
+ for(uint32_t phaseId=0;phaseId<jointParallelGroup->numPhases;phaseId++) {
+ for(uint32_t batchId=0;batchId<jointParallelGroup->numBatches[phaseId];batchId++) {
+ uint32_t numPairs = jointParallelGroup->numPairs[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
+ if(batchId%numTasks == taskId && numPairs > 0) {
+ const PfxParallelBatch &batch = jointParallelBatches[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
+ for(uint32_t i=0;i<numPairs;i++) {
+ PfxConstraintPair &pair = jointPairs[batch.pairIndices[i]];
+ uint16_t iA = pfxGetRigidBodyIdA(pair);
+ uint16_t iB = pfxGetRigidBodyIdB(pair);
+
+
+ PfxSolverBody &solverBodyA = iA != 65535 ? offsetSolverBodies[iA] : staticBody;
+ PfxSolverBody &solverBodyB = iB != 65535 ? offsetSolverBodies[iB] : staticBody;
+
+ if(k==0) {
+
+ }
+ else {
+ btSolverConstraint* constraintRow = &offsetSolverConstraints[pfxGetContactId1(pair)];
+ int numRows = pfxGetNumConstraints(pair);
+ int i;
+ for (i=0;i<numRows;i++)
+ {
+ resolveSingleConstraintRowGeneric(solverBodyA,solverBodyB,constraintRow[i]);
+ }
+
+ }
+ }
+ }
+ }
+
+ barrier->sync();
+ }
+
+ // Contact
+ for(uint32_t phaseId=0;phaseId<contactParallelGroup->numPhases;phaseId++) {
+ for(uint32_t batchId=0;batchId<contactParallelGroup->numBatches[phaseId];batchId++) {
+ uint32_t numPairs = contactParallelGroup->numPairs[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
+ if(batchId%numTasks == taskId && numPairs > 0) {
+ const PfxParallelBatch &batch = contactParallelBatches[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
+ for(uint32_t i=0;i<numPairs;i++) {
+ PfxConstraintPair &pair = contactPairs[batch.pairIndices[i]];
+ uint16_t iA = pfxGetRigidBodyIdA(pair);
+ uint16_t iB = pfxGetRigidBodyIdB(pair);
+
+ btPersistentManifold& contact = offsetContactManifolds[pfxGetConstraintId1(pair)];
+
+
+ PfxSolverBody &solverBodyA = offsetSolverBodies[iA];
+ PfxSolverBody &solverBodyB = offsetSolverBodies[iB];
+
+ for(int j=0;j<contact.getNumContacts();j++) {
+ btManifoldPoint& cp = contact.getContactPoint(j);
+
+ if(k==0) {
+ vmVector3 rA = rotate(solverBodyA.mOrientation,btReadVector3(cp.m_localPointA));
+ vmVector3 rB = rotate(solverBodyB.mOrientation,btReadVector3(cp.m_localPointB));
+
+ for(int k=0;k<3;k++) {
+ vmVector3 normal = btReadVector3(cp.mConstraintRow[k].m_normal);
+ float deltaImpulse = cp.mConstraintRow[k].m_accumImpulse;
+ solverBodyA.mDeltaLinearVelocity += deltaImpulse * solverBodyA.mMassInv * normal;
+ solverBodyA.mDeltaAngularVelocity += deltaImpulse * solverBodyA.mInertiaInv * cross(rA,normal);
+ solverBodyB.mDeltaLinearVelocity -= deltaImpulse * solverBodyB.mMassInv * normal;
+ solverBodyB.mDeltaAngularVelocity -= deltaImpulse * solverBodyB.mInertiaInv * cross(rB,normal);
+ }
+ }
+ else {
+ btSolveContactConstraint(
+ cp.mConstraintRow[0],
+ cp.mConstraintRow[1],
+ cp.mConstraintRow[2],
+ btReadVector3(cp.m_localPointA),
+ btReadVector3(cp.m_localPointB),
+ solverBodyA,
+ solverBodyB,
+ cp.m_combinedFriction
+ );
+ }
+ }
+ }
+ }
+ }
+
+ if (barrier)
+ barrier->sync();
+ }
+ }
+}
+
+void CustomPostSolverTask(
+ TrbState *states,
+ PfxSolverBody *solverBodies,
+ uint32_t numRigidBodies)
+{
+ for(uint32_t i=0;i<numRigidBodies;i++) {
+ TrbState &state = states[i];
+ PfxSolverBody &solverBody = solverBodies[i];
+ state.setLinearVelocity(state.getLinearVelocity()+solverBody.mDeltaLinearVelocity);
+ state.setAngularVelocity(state.getAngularVelocity()+solverBody.mDeltaAngularVelocity);
+ }
+}
+
+void* SolverlsMemoryFunc()
+{
+ //don't create local store memory, just return 0
+ return 0;
+}
+
+
+static SIMD_FORCE_INLINE
+void pfxGetPlaneSpace(const vmVector3& n, vmVector3& p, vmVector3& q)
+{
+ if(fabsf(n[2]) > 0.707f) {
+ // choose p in y-z plane
+ float a = n[1]*n[1] + n[2]*n[2];
+ float k = 1.0f/sqrtf(a);
+ p[0] = 0;
+ p[1] = -n[2]*k;
+ p[2] = n[1]*k;
+ // set q = n x p
+ q[0] = a*k;
+ q[1] = -n[0]*p[2];
+ q[2] = n[0]*p[1];
+ }
+ else {
+ // choose p in x-y plane
+ float a = n[0]*n[0] + n[1]*n[1];
+ float k = 1.0f/sqrtf(a);
+ p[0] = -n[1]*k;
+ p[1] = n[0]*k;
+ p[2] = 0;
+ // set q = n x p
+ q[0] = -n[2]*p[1];
+ q[1] = n[2]*p[0];
+ q[2] = a*k;
+ }
+}
+
+
+
+#define PFX_CONTACT_SLOP 0.001f
+
+void btSetupContactConstraint(
+ btConstraintRow &constraintResponse,
+ btConstraintRow &constraintFriction1,
+ btConstraintRow &constraintFriction2,
+ float penetrationDepth,
+ float restitution,
+ float friction,
+ const vmVector3 &contactNormal,
+ const vmVector3 &contactPointA,
+ const vmVector3 &contactPointB,
+ const TrbState &stateA,
+ const TrbState &stateB,
+ PfxSolverBody &solverBodyA,
+ PfxSolverBody &solverBodyB,
+ float separateBias,
+ float timeStep
+ )
+{
+ vmVector3 rA = rotate(solverBodyA.mOrientation,contactPointA);
+ vmVector3 rB = rotate(solverBodyB.mOrientation,contactPointB);
+
+ vmMatrix3 K = vmMatrix3::scale(vmVector3(solverBodyA.mMassInv + solverBodyB.mMassInv)) -
+ crossMatrix(rA) * solverBodyA.mInertiaInv * crossMatrix(rA) -
+ crossMatrix(rB) * solverBodyB.mInertiaInv * crossMatrix(rB);
+
+ vmVector3 vA = stateA.getLinearVelocity() + cross(stateA.getAngularVelocity(),rA);
+ vmVector3 vB = stateB.getLinearVelocity() + cross(stateB.getAngularVelocity(),rB);
+ vmVector3 vAB = vA-vB;
+
+ vmVector3 tangent1,tangent2;
+ btPlaneSpace1(contactNormal,tangent1,tangent2);
+
+// constraintResponse.m_accumImpulse = 0.f;
+// constraintFriction1.m_accumImpulse = 0.f;
+// constraintFriction2.m_accumImpulse = 0.f;
+
+ // Contact Constraint
+ {
+ vmVector3 normal = contactNormal;
+
+ float denom = dot(K*normal,normal);
+
+ constraintResponse.m_rhs = -(1.0f+restitution)*dot(vAB,normal); // velocity error
+ constraintResponse.m_rhs -= (separateBias * btMin(0.0f,penetrationDepth+PFX_CONTACT_SLOP)) / timeStep; // position error
+ constraintResponse.m_rhs /= denom;
+ constraintResponse.m_jacDiagInv = 1.0f/denom;
+ constraintResponse.m_lowerLimit = 0.0f;
+ constraintResponse.m_upperLimit = SIMD_INFINITY;
+ btStoreVector3(normal,constraintResponse.m_normal);
+ }
+
+ // Friction Constraint 1
+ {
+ vmVector3 normal = tangent1;
+
+ float denom = dot(K*normal,normal);
+
+ constraintFriction1.m_jacDiagInv = 1.0f/denom;
+ constraintFriction1.m_rhs = -dot(vAB,normal);
+ constraintFriction1.m_rhs *= constraintFriction1.m_jacDiagInv;
+ constraintFriction1.m_lowerLimit = 0.0f;
+ constraintFriction1.m_upperLimit = SIMD_INFINITY;
+ btStoreVector3(normal,constraintFriction1.m_normal);
+ }
+
+ // Friction Constraint 2
+ {
+ vmVector3 normal = tangent2;
+
+ float denom = dot(K*normal,normal);
+
+ constraintFriction2.m_jacDiagInv = 1.0f/denom;
+ constraintFriction2.m_rhs = -dot(vAB,normal);
+ constraintFriction2.m_rhs *= constraintFriction2.m_jacDiagInv;
+ constraintFriction2.m_lowerLimit = 0.0f;
+ constraintFriction2.m_upperLimit = SIMD_INFINITY;
+ btStoreVector3(normal,constraintFriction2.m_normal);
+ }
+}
+
+
+void CustomSetupContactConstraintsTask(
+ PfxConstraintPair *contactPairs,uint32_t numContactPairs,
+ btPersistentManifold* offsetContactManifolds,
+ TrbState *offsetRigStates,
+ PfxSolverBody *offsetSolverBodies,
+ uint32_t numRigidBodies,
+ float separateBias,
+ float timeStep)
+{
+ for(uint32_t i=0;i<numContactPairs;i++) {
+ PfxConstraintPair &pair = contactPairs[i];
+ if(!pfxGetActive(pair) || pfxGetNumConstraints(pair) == 0 ||
+ ((pfxGetMotionMaskA(pair)&PFX_MOTION_MASK_STATIC) && (pfxGetMotionMaskB(pair)&PFX_MOTION_MASK_STATIC)) ) {
+ continue;
+ }
+
+ uint16_t iA = pfxGetRigidBodyIdA(pair);
+ uint16_t iB = pfxGetRigidBodyIdB(pair);
+
+ int id = pfxGetConstraintId1(pair);
+ btPersistentManifold& contact = offsetContactManifolds[id];
+
+
+ TrbState &stateA = offsetRigStates[iA];
+// PfxRigBody &bodyA = offsetRigBodies[iA];
+ PfxSolverBody &solverBodyA = offsetSolverBodies[iA];
+
+ TrbState &stateB = offsetRigStates[iB];
+// PfxRigBody &bodyB = offsetRigBodies[iB];
+ PfxSolverBody &solverBodyB = offsetSolverBodies[iB];
+
+ float restitution = 0.5f * (solverBodyA.restitution + solverBodyB.restitution);
+ //if(contact.getDuration() > 1) restitution = 0.0f;
+
+ float friction = sqrtf(solverBodyA.friction * solverBodyB.friction);
+
+ for(int j=0;j<contact.getNumContacts();j++) {
+ btManifoldPoint& cp = contact.getContactPoint(j);
+
+ btSetupContactConstraint(
+ cp.mConstraintRow[0],
+ cp.mConstraintRow[1],
+ cp.mConstraintRow[2],
+ cp.getDistance(),
+ restitution,
+ friction,
+ btReadVector3(cp.m_normalWorldOnB),//.mConstraintRow[0].m_normal),
+ btReadVector3(cp.m_localPointA),
+ btReadVector3(cp.m_localPointB),
+ stateA,
+ stateB,
+ solverBodyA,
+ solverBodyB,
+ separateBias,
+ timeStep
+ );
+ }
+
+ //contact.setCompositeFriction(friction);
+ }
+}
+
+void SolverThreadFunc(void* userPtr,void* lsMemory)
+{
+ btConstraintSolverIO* io = (btConstraintSolverIO*)(userPtr);//arg->io);
+ btCriticalSection* criticalsection = io->setupContactConstraints.criticalSection;
+
+
+ //CustomCriticalSection *criticalsection = &io->m_cs;
+ switch(io->cmd) {
+
+ case PFX_CONSTRAINT_SOLVER_CMD_SOLVE_CONSTRAINTS:
+ CustomSolveConstraintsTaskParallel(
+ io->solveConstraints.contactParallelGroup,
+ io->solveConstraints.contactParallelBatches,
+ io->solveConstraints.contactPairs,
+ io->solveConstraints.numContactPairs,
+ io->solveConstraints.offsetContactManifolds,
+
+ io->solveConstraints.jointParallelGroup,
+ io->solveConstraints.jointParallelBatches,
+ io->solveConstraints.jointPairs,
+ io->solveConstraints.numJointPairs,
+ io->solveConstraints.offsetSolverConstraints,
+ io->solveConstraints.offsetRigStates1,
+ io->solveConstraints.offsetSolverBodies,
+ io->solveConstraints.numRigidBodies,
+ io->solveConstraints.iteration,
+
+ io->solveConstraints.taskId,
+ io->maxTasks1,
+ io->solveConstraints.barrier
+ );
+ break;
+
+ case PFX_CONSTRAINT_SOLVER_CMD_POST_SOLVER:
+ CustomPostSolverTask( io->postSolver.states,io->postSolver.solverBodies, io->postSolver.numRigidBodies);
+ break;
+
+
+ case PFX_CONSTRAINT_SOLVER_CMD_SETUP_CONTACT_CONSTRAINTS:
+ {
+ bool empty = false;
+ while(!empty) {
+ int start,batch;
+
+ criticalsection->lock();
+
+ start = (int)criticalsection->getSharedParam(0);
+ batch = (int)criticalsection->getSharedParam(1);
+
+ //PFX_PRINTF("taskId %d start %d num %d\n",arg->taskId,start,batch);
+
+ // ŽŸ‚̃oƒbƒtƒ@‚ðƒZƒbƒg
+ int nextStart = start + batch;
+ int rest = btMax((int)io->setupContactConstraints.numContactPairs1 - nextStart,0);
+ int nextBatch = (rest > batch)?batch:rest;
+
+ criticalsection->setSharedParam(0,nextStart);
+ criticalsection->setSharedParam(1,nextBatch);
+
+ criticalsection->unlock();
+
+ if(batch > 0) {
+ CustomSetupContactConstraintsTask(
+ io->setupContactConstraints.offsetContactPairs+start,batch,
+ io->setupContactConstraints.offsetContactManifolds,
+ io->setupContactConstraints.offsetRigStates,
+// io->setupContactConstraints.offsetRigBodies,
+ io->setupContactConstraints.offsetSolverBodies,
+ io->setupContactConstraints.numRigidBodies,
+ io->setupContactConstraints.separateBias,
+ io->setupContactConstraints.timeStep);
+ }
+ else {
+ empty = true;
+ }
+ }
+ }
+ break;
+
+ default:
+ {
+ btAssert(0);
+ }
+ }
+
+}
+
+
+void CustomSetupContactConstraintsNew(
+ PfxConstraintPair *contactPairs1,uint32_t numContactPairs,
+ btPersistentManifold *offsetContactManifolds,
+ TrbState *offsetRigStates,
+ PfxSolverBody *offsetSolverBodies,
+ uint32_t numRigidBodies,
+ float separationBias,
+ float timeStep,
+ class btThreadSupportInterface* threadSupport,
+ btCriticalSection* criticalSection,
+ btConstraintSolverIO *io
+ )
+{
+ int maxTasks = threadSupport->getNumTasks();
+
+ int div = (int)maxTasks * 4;
+ int batch = ((int)numContactPairs + div - 1) / div;
+#ifdef __PPU__
+ BulletPE2ConstraintSolverSpursSupport* spursThread = (BulletPE2ConstraintSolverSpursSupport*) threadSupport;
+#endif
+ if (criticalSection)
+ {
+ criticalSection->setSharedParam(0,0);
+ criticalSection->setSharedParam(1,btMin(batch,64)); // batched number
+ } else
+ {
+#ifdef __PPU__
+ spursThread->setSharedParam(0,0);
+ spursThread->setSharedParam(1,btMin(batch,64)); // batched number
+#endif //__PPU__
+ }
+
+ for(int t=0;t<maxTasks;t++) {
+ io[t].cmd = PFX_CONSTRAINT_SOLVER_CMD_SETUP_CONTACT_CONSTRAINTS;
+ io[t].setupContactConstraints.offsetContactPairs = contactPairs1;
+ io[t].setupContactConstraints.numContactPairs1 = numContactPairs;
+ io[t].setupContactConstraints.offsetRigStates = offsetRigStates;
+ io[t].setupContactConstraints.offsetContactManifolds = offsetContactManifolds;
+ io[t].setupContactConstraints.offsetSolverBodies = offsetSolverBodies;
+ io[t].setupContactConstraints.numRigidBodies = numRigidBodies;
+ io[t].setupContactConstraints.separateBias = separationBias;
+ io[t].setupContactConstraints.timeStep = timeStep;
+ io[t].setupContactConstraints.criticalSection = criticalSection;
+ io[t].maxTasks1 = maxTasks;
+#ifdef __PPU__
+ io[t].barrierAddr2 = (unsigned int)spursThread->getBarrierAddress();
+ io[t].criticalsectionAddr2 = (unsigned int)spursThread->getCriticalSectionAddress();
+#endif
+
+
+//#define SEQUENTIAL_SETUP
+#ifdef SEQUENTIAL_SETUP
+ CustomSetupContactConstraintsTask(contactPairs1,numContactPairs,offsetContactManifolds,offsetRigStates,offsetSolverBodies,numRigidBodies,separationBias,timeStep);
+#else
+ threadSupport->sendRequest(1,(ppu_address_t)&io[t],t);
+#endif
+
+ }
+#ifndef SEQUENTIAL_SETUP
+ unsigned int arg0,arg1;
+ for(int t=0;t<maxTasks;t++) {
+ arg0 = t;
+ threadSupport->waitForResponse(&arg0,&arg1);
+ }
+#endif //SEQUENTIAL_SETUP
+
+}
+
+
+void CustomSplitConstraints(
+ PfxConstraintPair *pairs,uint32_t numPairs,
+ PfxParallelGroup &group,PfxParallelBatch *batches,
+ uint32_t numTasks,
+ uint32_t numRigidBodies,
+ void *poolBuff,
+ uint32_t poolBytes
+ )
+{
+ HeapManager pool((unsigned char*)poolBuff,poolBytes);
+
+ // ƒXƒe[ƒgƒ`ƒFƒbƒN—pƒrƒbƒgƒtƒ‰ƒOƒe[ƒuƒ‹
+ int bufSize = sizeof(uint8_t)*numRigidBodies;
+ bufSize = ((bufSize+127)>>7)<<7; // 128 bytes alignment
+ uint8_t *bodyTable = (uint8_t*)pool.allocate(bufSize,HeapManager::ALIGN128);
+
+ // ƒyƒAƒ`ƒFƒbƒN—pƒrƒbƒgƒtƒ‰ƒOƒe[ƒuƒ‹
+ uint32_t *pairTable;
+ size_t allocSize = sizeof(uint32_t)*((numPairs+31)/32);
+ pairTable = (uint32_t*)pool.allocate(allocSize);
+ memset(pairTable,0,allocSize);
+
+ // –Ú•W‚Æ‚·‚镪Š„”
+ uint32_t targetCount = btMax(uint32_t(PFX_MIN_SOLVER_PAIRS),btMin(numPairs / (numTasks*2),uint32_t(PFX_MAX_SOLVER_PAIRS)));
+ uint32_t startIndex = 0;
+
+ uint32_t phaseId;
+ uint32_t batchId;
+ uint32_t totalCount=0;
+
+ uint32_t maxBatches = btMin(numTasks,uint32_t(PFX_MAX_SOLVER_BATCHES));
+
+ for(phaseId=0;phaseId<PFX_MAX_SOLVER_PHASES&&totalCount<numPairs;phaseId++) {
+ bool startIndexCheck = true;
+
+ group.numBatches[phaseId] = 0;
+
+ uint32_t i = startIndex;
+
+ // ƒ`ƒFƒbƒN—pƒrƒbƒgƒtƒ‰ƒOƒe[ƒuƒ‹‚ðƒNƒŠƒA
+ memset(bodyTable,0xff,bufSize);
+
+ for(batchId=0;i<numPairs&&totalCount<numPairs&&batchId<maxBatches;batchId++) {
+ uint32_t pairCount=0;
+
+ PfxParallelBatch &batch = batches[phaseId*PFX_MAX_SOLVER_BATCHES+batchId];
+ uint32_t pairId = 0;
+
+ for(;i<numPairs&&pairCount<targetCount;i++) {
+ uint32_t idxP = i>>5;
+ uint32_t maskP = 1L << (i & 31);
+
+ //pair is already assigned to a phase/batch
+ if(pairTable[idxP] & maskP) {
+ continue;
+ }
+
+ uint32_t idxA = pfxGetRigidBodyIdA(pairs[i]);
+ uint32_t idxB = pfxGetRigidBodyIdB(pairs[i]);
+
+ // —¼•û‚Æ‚àƒAƒNƒeƒBƒu‚Å‚È‚¢A‚Ü‚½‚ÍÕ“Ë“_‚ª‚O‚̃yƒA‚Í“o˜^‘ÎÛ‚©‚ç‚Í‚¸‚·
+ if(!pfxGetActive(pairs[i]) || pfxGetNumConstraints(pairs[i]) == 0 ||
+ ((pfxGetMotionMaskA(pairs[i])&PFX_MOTION_MASK_STATIC) && (pfxGetMotionMaskB(pairs[i])&PFX_MOTION_MASK_STATIC)) ) {
+ if(startIndexCheck)
+ startIndex++;
+ //assign pair -> skip it because it has no constraints
+ pairTable[idxP] |= maskP;
+ totalCount++;
+ continue;
+ }
+
+ // ˆË‘¶«‚̃`ƒFƒbƒN
+ if( (bodyTable[idxA] != batchId && bodyTable[idxA] != 0xff) ||
+ (bodyTable[idxB] != batchId && bodyTable[idxB] != 0xff) ) {
+ startIndexCheck = false;
+ //bodies of the pair are already assigned to another batch within this phase
+ continue;
+ }
+
+ // ˆË‘¶«”»’èƒe[ƒuƒ‹‚É“o˜^
+ if(pfxGetMotionMaskA(pairs[i])&PFX_MOTION_MASK_DYNAMIC)
+ bodyTable[idxA] = batchId;
+ if(pfxGetMotionMaskB(pairs[i])&PFX_MOTION_MASK_DYNAMIC)
+ bodyTable[idxB] = batchId;
+
+ if(startIndexCheck)
+ startIndex++;
+
+ pairTable[idxP] |= maskP;
+ //add the pair 'i' to the current batch
+ batch.pairIndices[pairId++] = i;
+ pairCount++;
+ }
+
+ group.numPairs[phaseId*PFX_MAX_SOLVER_BATCHES+batchId] = (uint16_t)pairId;
+ totalCount += pairCount;
+ }
+
+ group.numBatches[phaseId] = batchId;
+ }
+
+ group.numPhases = phaseId;
+
+ pool.clear();
+}
+
+
+
+void CustomSolveConstraintsParallel(
+ PfxConstraintPair *contactPairs,uint32_t numContactPairs,
+
+ PfxConstraintPair *jointPairs,uint32_t numJointPairs,
+ btPersistentManifold* offsetContactManifolds,
+ btSolverConstraint* offsetSolverConstraints,
+ TrbState *offsetRigStates,
+ PfxSolverBody *offsetSolverBodies,
+ uint32_t numRigidBodies,
+ struct btConstraintSolverIO* io,
+ class btThreadSupportInterface* threadSupport,
+ int iteration,
+ void* poolBuf,
+ int poolBytes,
+ class btBarrier* barrier)
+ {
+
+ int maxTasks = threadSupport->getNumTasks();
+// config.taskManager->setTaskEntry(PFX_SOLVER_ENTRY);
+
+ HeapManager pool((unsigned char*)poolBuf,poolBytes);
+
+ {
+ PfxParallelGroup *cgroup = (PfxParallelGroup*)pool.allocate(sizeof(PfxParallelGroup));
+ PfxParallelBatch *cbatches = (PfxParallelBatch*)pool.allocate(sizeof(PfxParallelBatch)*(PFX_MAX_SOLVER_PHASES*PFX_MAX_SOLVER_BATCHES),128);
+ PfxParallelGroup *jgroup = (PfxParallelGroup*)pool.allocate(sizeof(PfxParallelGroup));
+ PfxParallelBatch *jbatches = (PfxParallelBatch*)pool.allocate(sizeof(PfxParallelBatch)*(PFX_MAX_SOLVER_PHASES*PFX_MAX_SOLVER_BATCHES),128);
+
+ uint32_t tmpBytes = poolBytes - 2 * (sizeof(PfxParallelGroup) + sizeof(PfxParallelBatch)*(PFX_MAX_SOLVER_PHASES*PFX_MAX_SOLVER_BATCHES) + 128);
+ void *tmpBuff = pool.allocate(tmpBytes);
+
+ {
+ BT_PROFILE("CustomSplitConstraints");
+ CustomSplitConstraints(contactPairs,numContactPairs,*cgroup,cbatches,maxTasks,numRigidBodies,tmpBuff,tmpBytes);
+ CustomSplitConstraints(jointPairs,numJointPairs,*jgroup,jbatches,maxTasks,numRigidBodies,tmpBuff,tmpBytes);
+ }
+
+ {
+ BT_PROFILE("PFX_CONSTRAINT_SOLVER_CMD_SOLVE_CONSTRAINTS");
+//#define SOLVE_SEQUENTIAL
+#ifdef SOLVE_SEQUENTIAL
+ CustomSolveConstraintsTask(
+ io->solveConstraints.contactParallelGroup,
+ io->solveConstraints.contactParallelBatches,
+ io->solveConstraints.contactPairs,
+ io->solveConstraints.numContactPairs,
+ io->solveConstraints.offsetContactManifolds,
+
+ io->solveConstraints.jointParallelGroup,
+ io->solveConstraints.jointParallelBatches,
+ io->solveConstraints.jointPairs,
+ io->solveConstraints.numJointPairs,
+ io->solveConstraints.offsetJoints,
+
+ io->solveConstraints.offsetRigStates,
+ io->solveConstraints.offsetSolverBodies,
+ io->solveConstraints.numRigidBodies,
+ io->solveConstraints.iteration,0,1,0);//arg->taskId,1,0);//,arg->maxTasks,arg->barrier);
+#else
+ for(int t=0;t<maxTasks;t++) {
+ io[t].cmd = PFX_CONSTRAINT_SOLVER_CMD_SOLVE_CONSTRAINTS;
+ io[t].solveConstraints.contactParallelGroup = cgroup;
+ io[t].solveConstraints.contactParallelBatches = cbatches;
+ io[t].solveConstraints.contactPairs = contactPairs;
+ io[t].solveConstraints.numContactPairs = numContactPairs;
+ io[t].solveConstraints.offsetContactManifolds = offsetContactManifolds;
+ io[t].solveConstraints.jointParallelGroup = jgroup;
+ io[t].solveConstraints.jointParallelBatches = jbatches;
+ io[t].solveConstraints.jointPairs = jointPairs;
+ io[t].solveConstraints.numJointPairs = numJointPairs;
+ io[t].solveConstraints.offsetSolverConstraints = offsetSolverConstraints;
+ io[t].solveConstraints.offsetRigStates1 = offsetRigStates;
+ io[t].solveConstraints.offsetSolverBodies = offsetSolverBodies;
+ io[t].solveConstraints.numRigidBodies = numRigidBodies;
+ io[t].solveConstraints.iteration = iteration;
+ io[t].solveConstraints.taskId = t;
+ io[t].solveConstraints.barrier = barrier;
+
+ io[t].maxTasks1 = maxTasks;
+#ifdef __PPU__
+ BulletPE2ConstraintSolverSpursSupport* spursThread = (BulletPE2ConstraintSolverSpursSupport*) threadSupport;
+ io[t].barrierAddr2 = (unsigned int) spursThread->getBarrierAddress();
+ io[t].criticalsectionAddr2 = (unsigned int)spursThread->getCriticalSectionAddress();
+#endif
+
+ threadSupport->sendRequest(1,(ppu_address_t)&io[t],t);
+ }
+
+ unsigned int arg0,arg1;
+ for(int t=0;t<maxTasks;t++) {
+ arg0 = t;
+ threadSupport->waitForResponse(&arg0,&arg1);
+ }
+#endif
+ }
+ pool.clear();
+ }
+
+ {
+ BT_PROFILE("PFX_CONSTRAINT_SOLVER_CMD_POST_SOLVER");
+ int batch = ((int)numRigidBodies + maxTasks - 1) / maxTasks;
+ int rest = (int)numRigidBodies;
+ int start = 0;
+
+ for(int t=0;t<maxTasks;t++) {
+ int num = (rest - batch ) > 0 ? batch : rest;
+ io[t].cmd = PFX_CONSTRAINT_SOLVER_CMD_POST_SOLVER;
+ io[t].postSolver.states = offsetRigStates + start;
+ io[t].postSolver.solverBodies = offsetSolverBodies + start;
+ io[t].postSolver.numRigidBodies = (uint32_t)num;
+ io[t].maxTasks1 = maxTasks;
+#ifdef __PPU__
+ BulletPE2ConstraintSolverSpursSupport* spursThread = (BulletPE2ConstraintSolverSpursSupport*) threadSupport;
+ io[t].barrierAddr2 = (unsigned int)spursThread->getBarrierAddress();
+ io[t].criticalsectionAddr2 = (unsigned int)spursThread->getCriticalSectionAddress();
+#endif
+
+#ifdef SOLVE_SEQUENTIAL
+ CustomPostSolverTask( io[t].postSolver.states,io[t].postSolver.solverBodies, io[t].postSolver.numRigidBodies);
+#else
+ threadSupport->sendRequest(1,(ppu_address_t)&io[t],t);
+#endif
+ rest -= num;
+ start += num;
+ }
+
+ unsigned int arg0,arg1;
+ for(int t=0;t<maxTasks;t++) {
+#ifndef SOLVE_SEQUENTIAL
+ arg0 = t;
+ threadSupport->waitForResponse(&arg0,&arg1);
+#endif
+ }
+ }
+
+}
+
+
+
+void BPE_customConstraintSolverSequentialNew(unsigned int new_num, PfxBroadphasePair *new_pairs1 ,
+ btPersistentManifold* offsetContactManifolds,
+ TrbState* states,int numRigidBodies,
+ struct PfxSolverBody* solverBodies,
+ PfxConstraintPair* jointPairs, unsigned int numJoints,
+ btSolverConstraint* offsetSolverConstraints,
+ float separateBias,
+ float timeStep,
+ int iteration,
+ btThreadSupportInterface* solverThreadSupport,
+ btCriticalSection* criticalSection,
+ struct btConstraintSolverIO* solverIO,
+ btBarrier* barrier
+ )
+{
+
+ {
+ BT_PROFILE("pfxSetupConstraints");
+
+ for(uint32_t i=0;i<numJoints;i++) {
+ // î•ñ‚ÌXV
+ PfxConstraintPair &pair = jointPairs[i];
+ int idA = pfxGetRigidBodyIdA(pair);
+
+ if (idA != 65535)
+ {
+ pfxSetMotionMaskA(pair,states[pfxGetRigidBodyIdA(pair)].getMotionMask());
+ }
+ else
+ {
+ pfxSetMotionMaskA(pair,PFX_MOTION_MASK_STATIC);
+ }
+ int idB = pfxGetRigidBodyIdB(pair);
+ if (idB!= 65535)
+ {
+ pfxSetMotionMaskB(pair,states[pfxGetRigidBodyIdB(pair)].getMotionMask());
+ } else
+ {
+ pfxSetMotionMaskB(pair,PFX_MOTION_MASK_STATIC);
+ }
+ }
+
+// CustomSetupJointConstraintsSeq( jointPairs,numJoints,joints, states, solverBodies, numRigidBodies, timeStep);
+
+#ifdef SEQUENTIAL_SETUP
+ CustomSetupContactConstraintsSeqNew(
+ (PfxConstraintPair*)new_pairs1,new_num,contacts,
+ states,
+ solverBodies,
+ numRigidBodies,
+ separateBias,
+ timeStep);
+#else
+ CustomSetupContactConstraintsNew(
+ (PfxConstraintPair*)new_pairs1,new_num,
+ offsetContactManifolds,
+ states,
+ solverBodies,
+ numRigidBodies,
+ separateBias,
+ timeStep,
+ solverThreadSupport,
+ criticalSection,solverIO
+ );
+
+#endif //SEQUENTIAL_SETUP
+
+ }
+ {
+ BT_PROFILE("pfxSolveConstraints");
+
+//#define SEQUENTIAL
+#ifdef SEQUENTIAL
+ CustomSolveConstraintsSeq(
+ (PfxConstraintPair*)new_pairs1,new_num,contacts,
+ jointPairs,numJoints,
+ states,
+ solverBodies,
+ numRigidBodies,
+ separateBias,
+ timeStep,
+ iteration);
+#else //SEQUENTIAL
+ CustomSolveConstraintsParallel(
+ (PfxConstraintPair*)new_pairs1,new_num,
+ jointPairs,numJoints,
+ offsetContactManifolds,
+ offsetSolverConstraints,
+ states,
+ solverBodies,
+ numRigidBodies,
+ solverIO, solverThreadSupport,
+ iteration,
+ tmp_buff,
+ TMP_BUFF_BYTES,
+ barrier
+ );
+
+#endif //SEQUENTIAL
+ }
+
+}
+
+
+struct btParallelSolverMemoryCache
+{
+ btAlignedObjectArray<TrbState> m_mystates;
+ btAlignedObjectArray<PfxSolverBody> m_mysolverbodies;
+ btAlignedObjectArray<PfxBroadphasePair> m_mypairs;
+ btAlignedObjectArray<PfxConstraintPair> m_jointPairs;
+
+};
+
+
+btConstraintSolverIO* createSolverIO(int numThreads)
+{
+ return new btConstraintSolverIO[numThreads];
+}
+
+btParallelConstraintSolver::btParallelConstraintSolver(btThreadSupportInterface* solverThreadSupport)
+{
+
+ m_solverThreadSupport = solverThreadSupport;//createSolverThreadSupport(maxNumThreads);
+ m_solverIO = createSolverIO(m_solverThreadSupport->getNumTasks());
+
+ m_barrier = m_solverThreadSupport->createBarrier();
+ m_criticalSection = m_solverThreadSupport->createCriticalSection();
+
+ m_memoryCache = new btParallelSolverMemoryCache();
+}
+
+btParallelConstraintSolver::~btParallelConstraintSolver()
+{
+ delete m_memoryCache;
+ delete m_solverIO;
+}
+
+
+
+btScalar btParallelConstraintSolver::solveGroup(btCollisionObject** bodies1,int numRigidBodies,btPersistentManifold** manifoldPtr,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& infoGlobal, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher)
+{
+
+/* int sz = sizeof(PfxSolverBody);
+ int sz2 = sizeof(vmVector3);
+ int sz3 = sizeof(vmMatrix3);
+ int sz4 = sizeof(vmQuat);
+ int sz5 = sizeof(btConstraintRow);
+ int sz6 = sizeof(btSolverConstraint);
+ int sz7 = sizeof(TrbState);
+*/
+
+ btPersistentManifold* offsetContactManifolds= (btPersistentManifold*) dispatcher->getInternalManifoldPool()->getPoolAddress();
+
+
+ m_memoryCache->m_mysolverbodies.resize(numRigidBodies);
+ m_memoryCache->m_mystates.resize(numRigidBodies);
+
+ {
+ BT_PROFILE("create states and solver bodies");
+ for (int i=0;i<numRigidBodies;i++)
+ {
+ btCollisionObject* obj = bodies1[i];
+ obj->setCompanionId(i);
+
+ PfxSolverBody& solverBody = m_memoryCache->m_mysolverbodies[i];
+ btRigidBody* rb = btRigidBody::upcast(obj);
+ TrbState& state = m_memoryCache->m_mystates[i];
+
+ state.reset();
+ const btQuaternion& orgOri = obj->getWorldTransform().getRotation();
+ vmQuat orn(orgOri.getX(),orgOri.getY(),orgOri.getZ(),orgOri.getW());
+ state.setPosition(getVmVector3(obj->getWorldTransform().getOrigin()));
+ state.setOrientation(orn);
+ state.setPosition(state.getPosition());
+ state.setRigidBodyId(i);
+ state.setAngularDamping(0);
+ state.setLinearDamping(0);
+
+
+ solverBody.mOrientation = state.getOrientation();
+ solverBody.mDeltaLinearVelocity = vmVector3(0.0f);
+ solverBody.mDeltaAngularVelocity = vmVector3(0.0f);
+ solverBody.friction = obj->getFriction();
+ solverBody.restitution = obj->getRestitution();
+
+ state.resetSleepCount();
+
+ //if(state.getMotionMask()&PFX_MOTION_MASK_DYNAMIC) {
+ if (rb && (rb->getInvMass()>0.f))
+ {
+ state.setAngularVelocity(vmVector3(rb->getAngularVelocity().getX(),rb->getAngularVelocity().getY(),rb->getAngularVelocity().getZ()));
+ state.setLinearVelocity(vmVector3(rb->getLinearVelocity().getX(),rb->getLinearVelocity().getY(),rb->getLinearVelocity().getZ()));
+
+ state.setMotionType(PfxMotionTypeActive);
+ vmMatrix3 ori(solverBody.mOrientation);
+ vmMatrix3 localInvInertia = vmMatrix3::identity();
+ localInvInertia.setCol(0,vmVector3(rb->getInvInertiaDiagLocal().getX(),0,0));
+ localInvInertia.setCol(1,vmVector3(0, rb->getInvInertiaDiagLocal().getY(),0));
+ localInvInertia.setCol(2,vmVector3(0,0, rb->getInvInertiaDiagLocal().getZ()));
+
+ solverBody.mMassInv = rb->getInvMass();
+ solverBody.mInertiaInv = ori * localInvInertia * transpose(ori);
+ } else
+ {
+ state.setAngularVelocity(vmVector3(0));
+ state.setLinearVelocity(vmVector3(0));
+
+ state.setMotionType(PfxMotionTypeFixed);
+ m_memoryCache->m_mysolverbodies[i].mMassInv = 0.f;
+ m_memoryCache->m_mysolverbodies[i].mInertiaInv = vmMatrix3(0.0f);
+ }
+
+ }
+ }
+
+
+
+ int totalPoints = 0;
+#ifndef USE_C_ARRAYS
+ m_memoryCache->m_mypairs.resize(numManifolds);
+ m_memoryCache->m_jointPairs.resize(numConstraints);
+#endif//USE_C_ARRAYS
+
+ int actualNumManifolds= 0;
+ {
+ BT_PROFILE("convert manifolds");
+ for (int i1=0;i1<numManifolds;i1++)
+ {
+ if (manifoldPtr[i1]->getNumContacts()>0)
+ {
+ btPersistentManifold* m = manifoldPtr[i1];
+ btCollisionObject* obA = (btCollisionObject*)m->getBody0();
+ btCollisionObject* obB = (btCollisionObject*)m->getBody1();
+ bool obAisActive = !obA->isStaticOrKinematicObject() && obA->isActive();
+ bool obBisActive = !obB->isStaticOrKinematicObject() && obB->isActive();
+
+ if (!obAisActive && !obBisActive)
+ continue;
+
+
+ //int contactId = i1;//actualNumManifolds;
+
+ PfxBroadphasePair& pair = m_memoryCache->m_mypairs[actualNumManifolds];
+ //init those
+ float compFric = obA->getFriction()*obB->getFriction();//@todo
+ int idA = obA->getCompanionId();
+ int idB = obB->getCompanionId();
+
+ m->m_companionIdA = idA;
+ m->m_companionIdB = idB;
+
+
+ // if ((mysolverbodies[idA].mMassInv!=0)&&(mysolverbodies[idB].mMassInv!=0))
+ // continue;
+ int numPosPoints=0;
+ for (int p=0;p<m->getNumContacts();p++)
+ {
+ //btManifoldPoint& pt = m->getContactPoint(p);
+ //float dist = pt.getDistance();
+ //if (dist<0.001)
+ numPosPoints++;
+ }
+
+
+ numPosPoints = numPosPoints;
+ totalPoints+=numPosPoints;
+ pfxSetRigidBodyIdA(pair,idA);
+ pfxSetRigidBodyIdB(pair,idB);
+ pfxSetMotionMaskA(pair,m_memoryCache->m_mystates[idA].getMotionMask());
+ pfxSetMotionMaskB(pair,m_memoryCache->m_mystates[idB].getMotionMask());
+ pfxSetActive(pair,numPosPoints>0);
+
+ pfxSetBroadphaseFlag(pair,0);
+ int contactId = m-offsetContactManifolds;
+ //likely the contact pool is not contiguous, make sure to allocate large enough contact pool
+ btAssert(contactId>=0);
+ btAssert(contactId<dispatcher->getInternalManifoldPool()->getMaxCount());
+
+ pfxSetContactId(pair,contactId);
+ pfxSetNumConstraints(pair,numPosPoints);//manifoldPtr[i]->getNumContacts());
+ actualNumManifolds++;
+ }
+
+ }
+ }
+
+ PfxConstraintPair* jointPairs=0;
+ jointPairs = numConstraints? &m_memoryCache->m_jointPairs[0]:0;
+ int actualNumJoints=0;
+
+
+ btSolverConstraint* offsetSolverConstraints = 0;
+
+ //if (1)
+ {
+
+ {
+ BT_PROFILE("convert constraints");
+
+ int totalNumRows = 0;
+ int i;
+
+ m_tmpConstraintSizesPool.resize(numConstraints);
+ //calculate the total number of contraint rows
+ for (i=0;i<numConstraints;i++)
+ {
+ btTypedConstraint::btConstraintInfo1& info1 = m_tmpConstraintSizesPool[i];
+ constraints[i]->getInfo1(&info1);
+ totalNumRows += info1.m_numConstraintRows;
+ }
+ m_tmpSolverNonContactConstraintPool.resize(totalNumRows);
+ offsetSolverConstraints = &m_tmpSolverNonContactConstraintPool[0];
+
+
+ ///setup the btSolverConstraints
+ int currentRow = 0;
+
+ for (i=0;i<numConstraints;i++)
+ {
+ const btTypedConstraint::btConstraintInfo1& info1 = m_tmpConstraintSizesPool[i];
+
+ if (info1.m_numConstraintRows)
+ {
+ btAssert(currentRow<totalNumRows);
+ btTypedConstraint* constraint = constraints[i];
+ btSolverConstraint* currentConstraintRow = &m_tmpSolverNonContactConstraintPool[currentRow];
+
+ btRigidBody& rbA = constraint->getRigidBodyA();
+ btRigidBody& rbB = constraint->getRigidBodyB();
+
+
+ int j;
+ for ( j=0;j<info1.m_numConstraintRows;j++)
+ {
+ memset(&currentConstraintRow[j],0,sizeof(btSolverConstraint));
+ currentConstraintRow[j].m_lowerLimit = -FLT_MAX;
+ currentConstraintRow[j].m_upperLimit = FLT_MAX;
+ currentConstraintRow[j].m_appliedImpulse = 0.f;
+ currentConstraintRow[j].m_appliedPushImpulse = 0.f;
+ currentConstraintRow[j].m_solverBodyA = &rbA;
+ currentConstraintRow[j].m_solverBodyB = &rbB;
+ }
+
+ rbA.internalGetDeltaLinearVelocity().setValue(0.f,0.f,0.f);
+ rbA.internalGetDeltaAngularVelocity().setValue(0.f,0.f,0.f);
+ rbB.internalGetDeltaLinearVelocity().setValue(0.f,0.f,0.f);
+ rbB.internalGetDeltaAngularVelocity().setValue(0.f,0.f,0.f);
+
+
+
+ btTypedConstraint::btConstraintInfo2 info2;
+ info2.fps = 1.f/infoGlobal.m_timeStep;
+ info2.erp = infoGlobal.m_erp;
+ info2.m_J1linearAxis = currentConstraintRow->m_contactNormal;
+ info2.m_J1angularAxis = currentConstraintRow->m_relpos1CrossNormal;
+ info2.m_J2linearAxis = 0;
+ info2.m_J2angularAxis = currentConstraintRow->m_relpos2CrossNormal;
+ info2.rowskip = sizeof(btSolverConstraint)/sizeof(btScalar);//check this
+ ///the size of btSolverConstraint needs be a multiple of btScalar
+ btAssert(info2.rowskip*sizeof(btScalar)== sizeof(btSolverConstraint));
+ info2.m_constraintError = &currentConstraintRow->m_rhs;
+ currentConstraintRow->m_cfm = infoGlobal.m_globalCfm;
+ info2.cfm = &currentConstraintRow->m_cfm;
+ info2.m_lowerLimit = &currentConstraintRow->m_lowerLimit;
+ info2.m_upperLimit = &currentConstraintRow->m_upperLimit;
+ info2.m_numIterations = infoGlobal.m_numIterations;
+ constraints[i]->getInfo2(&info2);
+
+
+ int idA = constraint->getRigidBodyA().getCompanionId();
+ int idB = constraint->getRigidBodyB().getCompanionId();
+
+
+ ///finalize the constraint setup
+ for ( j=0;j<info1.m_numConstraintRows;j++)
+ {
+ btSolverConstraint& solverConstraint = currentConstraintRow[j];
+ solverConstraint.m_originalContactPoint = constraint;
+
+ solverConstraint.m_companionIdA = idA;
+ solverConstraint.m_companionIdB = idB;
+
+ {
+ const btVector3& ftorqueAxis1 = solverConstraint.m_relpos1CrossNormal;
+ solverConstraint.m_angularComponentA = constraint->getRigidBodyA().getInvInertiaTensorWorld()*ftorqueAxis1*constraint->getRigidBodyA().getAngularFactor();
+ }
+ {
+ const btVector3& ftorqueAxis2 = solverConstraint.m_relpos2CrossNormal;
+ solverConstraint.m_angularComponentB = constraint->getRigidBodyB().getInvInertiaTensorWorld()*ftorqueAxis2*constraint->getRigidBodyB().getAngularFactor();
+ }
+
+ {
+ btVector3 iMJlA = solverConstraint.m_contactNormal*rbA.getInvMass();
+ btVector3 iMJaA = rbA.getInvInertiaTensorWorld()*solverConstraint.m_relpos1CrossNormal;
+ btVector3 iMJlB = solverConstraint.m_contactNormal*rbB.getInvMass();//sign of normal?
+ btVector3 iMJaB = rbB.getInvInertiaTensorWorld()*solverConstraint.m_relpos2CrossNormal;
+
+ btScalar sum = iMJlA.dot(solverConstraint.m_contactNormal);
+ sum += iMJaA.dot(solverConstraint.m_relpos1CrossNormal);
+ sum += iMJlB.dot(solverConstraint.m_contactNormal);
+ sum += iMJaB.dot(solverConstraint.m_relpos2CrossNormal);
+
+ solverConstraint.m_jacDiagABInv = btScalar(1.)/sum;
+ }
+
+
+ ///fix rhs
+ ///todo: add force/torque accelerators
+ {
+ btScalar rel_vel;
+ btScalar vel1Dotn = solverConstraint.m_contactNormal.dot(rbA.getLinearVelocity()) + solverConstraint.m_relpos1CrossNormal.dot(rbA.getAngularVelocity());
+ btScalar vel2Dotn = -solverConstraint.m_contactNormal.dot(rbB.getLinearVelocity()) + solverConstraint.m_relpos2CrossNormal.dot(rbB.getAngularVelocity());
+
+ rel_vel = vel1Dotn+vel2Dotn;
+
+ btScalar restitution = 0.f;
+ btScalar positionalError = solverConstraint.m_rhs;//already filled in by getConstraintInfo2
+ btScalar velocityError = restitution - rel_vel;// * damping;
+ btScalar penetrationImpulse = positionalError*solverConstraint.m_jacDiagABInv;
+ btScalar velocityImpulse = velocityError *solverConstraint.m_jacDiagABInv;
+ solverConstraint.m_rhs = penetrationImpulse+velocityImpulse;
+ solverConstraint.m_appliedImpulse = 0.f;
+
+ }
+ }
+
+ PfxConstraintPair& pair = jointPairs[actualNumJoints];
+
+ int numConstraintRows= info1.m_numConstraintRows;
+ pfxSetNumConstraints(pair,numConstraintRows);
+
+
+
+ pfxSetRigidBodyIdA(pair,idA);
+ pfxSetRigidBodyIdB(pair,idB);
+ //is this needed?
+ pfxSetMotionMaskA(pair,m_memoryCache->m_mystates[idA].getMotionMask());
+ pfxSetMotionMaskB(pair,m_memoryCache->m_mystates[idB].getMotionMask());
+
+ pfxSetActive(pair,true);
+ int id = currentConstraintRow-offsetSolverConstraints;
+ pfxSetContactId(pair,id);
+ actualNumJoints++;
+
+
+ }
+ currentRow+=m_tmpConstraintSizesPool[i].m_numConstraintRows;
+ }
+ }
+ }
+
+
+
+ float separateBias=0.1;//info.m_erp;//or m_erp2?
+ float timeStep=infoGlobal.m_timeStep;
+ int iteration=infoGlobal.m_numIterations;
+
+ //create a pair for each constraints, copy over info etc
+
+
+
+
+
+ {
+ BT_PROFILE("compute num contacts");
+ int totalContacts =0;
+
+ for (int i=0;i<actualNumManifolds;i++)
+ {
+ PfxConstraintPair* pair = &m_memoryCache->m_mypairs[i];
+ totalContacts += pfxGetNumConstraints(*pair);
+ }
+ //printf("numManifolds = %d\n",numManifolds);
+ //printf("totalContacts=%d\n",totalContacts);
+ }
+
+
+
+// printf("actualNumManifolds=%d\n",actualNumManifolds);
+ {
+ BT_PROFILE("BPE_customConstraintSolverSequentialNew");
+ if (numRigidBodies>0 && (actualNumManifolds+actualNumJoints)>0)
+ {
+// PFX_PRINTF("num points = %d\n",totalPoints);
+// PFX_PRINTF("num points PFX = %d\n",total);
+
+
+
+ BPE_customConstraintSolverSequentialNew(
+ actualNumManifolds,
+ &m_memoryCache->m_mypairs[0],
+ offsetContactManifolds,
+ &m_memoryCache->m_mystates[0],numRigidBodies,
+ &m_memoryCache->m_mysolverbodies[0],
+ jointPairs,actualNumJoints,
+ offsetSolverConstraints,
+ separateBias,timeStep,iteration,
+ m_solverThreadSupport,m_criticalSection,m_solverIO,m_barrier);
+ }
+ }
+
+ //copy results back to bodies
+ {
+ BT_PROFILE("copy back");
+ for (int i=0;i<numRigidBodies;i++)
+ {
+ btCollisionObject* obj = bodies1[i];
+ btRigidBody* rb = btRigidBody::upcast(obj);
+ TrbState& state = m_memoryCache->m_mystates[i];
+ if (rb && (rb->getInvMass()>0.f))
+ {
+ rb->setLinearVelocity(btVector3(state.getLinearVelocity().getX(),state.getLinearVelocity().getY(),state.getLinearVelocity().getZ()));
+ rb->setAngularVelocity(btVector3(state.getAngularVelocity().getX(),state.getAngularVelocity().getY(),state.getAngularVelocity().getZ()));
+ }
+ }
+ }
+
+
+ return 0.f;
+}
diff --git a/tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.h b/tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.h
new file mode 100644
index 00000000..7c0268e7
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btParallelConstraintSolver.h
@@ -0,0 +1,285 @@
+/*
+ Copyright (C) 2010 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef __BT_PARALLEL_CONSTRAINT_SOLVER_H
+#define __BT_PARALLEL_CONSTRAINT_SOLVER_H
+
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+
+
+
+
+#include "LinearMath/btScalar.h"
+#include "PlatformDefinitions.h"
+
+
+#define PFX_MAX_SOLVER_PHASES 64
+#define PFX_MAX_SOLVER_BATCHES 16
+#define PFX_MAX_SOLVER_PAIRS 128
+#define PFX_MIN_SOLVER_PAIRS 16
+
+#ifdef __CELLOS_LV2__
+ATTRIBUTE_ALIGNED128(struct) PfxParallelBatch {
+#else
+ATTRIBUTE_ALIGNED16(struct) PfxParallelBatch {
+#endif
+ uint16_t pairIndices[PFX_MAX_SOLVER_PAIRS];
+};
+
+#ifdef __CELLOS_LV2__
+ATTRIBUTE_ALIGNED128(struct) PfxParallelGroup {
+#else
+ATTRIBUTE_ALIGNED16(struct) PfxParallelGroup {
+#endif
+ uint16_t numPhases;
+ uint16_t numBatches[PFX_MAX_SOLVER_PHASES];
+ uint16_t numPairs[PFX_MAX_SOLVER_PHASES*PFX_MAX_SOLVER_BATCHES];
+};
+
+
+
+ATTRIBUTE_ALIGNED16(struct) PfxSortData16 {
+ union {
+ uint8_t i8data[16];
+ uint16_t i16data[8];
+ uint32_t i32data[4];
+#ifdef __SPU__
+ vec_uint4 vdata;
+#endif
+ };
+
+#ifdef __SPU__
+ void set8(int elem,uint8_t data) {vdata=(vec_uint4)spu_insert(data,(vec_uchar16)vdata,elem);}
+ void set16(int elem,uint16_t data) {vdata=(vec_uint4)spu_insert(data,(vec_ushort8)vdata,elem);}
+ void set32(int elem,uint32_t data) {vdata=(vec_uint4)spu_insert(data,(vec_uint4)vdata,elem);}
+ uint8_t get8(int elem) const {return spu_extract((vec_uchar16)vdata,elem);}
+ uint16_t get16(int elem) const {return spu_extract((vec_ushort8)vdata,elem);}
+ uint32_t get32(int elem) const {return spu_extract((vec_uint4)vdata,elem);}
+#else
+ void set8(int elem,uint8_t data) {i8data[elem] = data;}
+ void set16(int elem,uint16_t data) {i16data[elem] = data;}
+ void set32(int elem,uint32_t data) {i32data[elem] = data;}
+ uint8_t get8(int elem) const {return i8data[elem];}
+ uint16_t get16(int elem) const {return i16data[elem];}
+ uint32_t get32(int elem) const {return i32data[elem];}
+#endif
+};
+
+typedef PfxSortData16 PfxConstraintPair;
+
+
+//J PfxBroadphasePair‚Æ‹¤’Ê
+
+SIMD_FORCE_INLINE void pfxSetConstraintId(PfxConstraintPair &pair,uint32_t i) {pair.set32(2,i);}
+SIMD_FORCE_INLINE void pfxSetNumConstraints(PfxConstraintPair &pair,uint8_t n) {pair.set8(7,n);}
+
+SIMD_FORCE_INLINE uint32_t pfxGetConstraintId1(const PfxConstraintPair &pair) {return pair.get32(2);}
+SIMD_FORCE_INLINE uint8_t pfxGetNumConstraints(const PfxConstraintPair &pair) {return pair.get8(7);}
+
+typedef PfxSortData16 PfxBroadphasePair;
+
+SIMD_FORCE_INLINE void pfxSetRigidBodyIdA(PfxBroadphasePair &pair,uint16_t i) {pair.set16(0,i);}
+SIMD_FORCE_INLINE void pfxSetRigidBodyIdB(PfxBroadphasePair &pair,uint16_t i) {pair.set16(1,i);}
+SIMD_FORCE_INLINE void pfxSetMotionMaskA(PfxBroadphasePair &pair,uint8_t i) {pair.set8(4,i);}
+SIMD_FORCE_INLINE void pfxSetMotionMaskB(PfxBroadphasePair &pair,uint8_t i) {pair.set8(5,i);}
+SIMD_FORCE_INLINE void pfxSetBroadphaseFlag(PfxBroadphasePair &pair,uint8_t f) {pair.set8(6,(pair.get8(6)&0xf0)|(f&0x0f));}
+SIMD_FORCE_INLINE void pfxSetActive(PfxBroadphasePair &pair,bool b) {pair.set8(6,(pair.get8(6)&0x0f)|((b?1:0)<<4));}
+SIMD_FORCE_INLINE void pfxSetContactId(PfxBroadphasePair &pair,uint32_t i) {pair.set32(2,i);}
+
+SIMD_FORCE_INLINE uint16_t pfxGetRigidBodyIdA(const PfxBroadphasePair &pair) {return pair.get16(0);}
+SIMD_FORCE_INLINE uint16_t pfxGetRigidBodyIdB(const PfxBroadphasePair &pair) {return pair.get16(1);}
+SIMD_FORCE_INLINE uint8_t pfxGetMotionMaskA(const PfxBroadphasePair &pair) {return pair.get8(4);}
+SIMD_FORCE_INLINE uint8_t pfxGetMotionMaskB(const PfxBroadphasePair &pair) {return pair.get8(5);}
+SIMD_FORCE_INLINE uint8_t pfxGetBroadphaseFlag(const PfxBroadphasePair &pair) {return pair.get8(6)&0x0f;}
+SIMD_FORCE_INLINE bool pfxGetActive(const PfxBroadphasePair &pair) {return (pair.get8(6)>>4)!=0;}
+SIMD_FORCE_INLINE uint32_t pfxGetContactId1(const PfxBroadphasePair &pair) {return pair.get32(2);}
+
+
+
+#if defined(__PPU__) || defined (__SPU__)
+ATTRIBUTE_ALIGNED128(struct) PfxSolverBody {
+#else
+ATTRIBUTE_ALIGNED16(struct) PfxSolverBody {
+#endif
+ vmVector3 mDeltaLinearVelocity;
+ vmVector3 mDeltaAngularVelocity;
+ vmMatrix3 mInertiaInv;
+ vmQuat mOrientation;
+ float mMassInv;
+ float friction;
+ float restitution;
+ float unused;
+ float unused2;
+ float unused3;
+ float unused4;
+ float unused5;
+};
+
+
+#ifdef __PPU__
+#include "SpuDispatch/BulletPE2ConstraintSolverSpursSupport.h"
+#endif
+
+static SIMD_FORCE_INLINE vmVector3 btReadVector3(const double* p)
+{
+ float tmp[3] = {float(p[0]),float(p[1]),float(p[2])};
+ vmVector3 v;
+ loadXYZ(v, tmp);
+ return v;
+}
+
+static SIMD_FORCE_INLINE vmQuat btReadQuat(const double* p)
+{
+ float tmp[4] = {float(p[0]),float(p[1]),float(p[2]),float(p[4])};
+ vmQuat vq;
+ loadXYZW(vq, tmp);
+ return vq;
+}
+
+static SIMD_FORCE_INLINE void btStoreVector3(const vmVector3 &src, double* p)
+{
+ float tmp[3];
+ vmVector3 v = src;
+ storeXYZ(v, tmp);
+ p[0] = tmp[0];
+ p[1] = tmp[1];
+ p[2] = tmp[2];
+}
+
+
+static SIMD_FORCE_INLINE vmVector3 btReadVector3(const float* p)
+{
+ vmVector3 v;
+ loadXYZ(v, p);
+ return v;
+}
+
+static SIMD_FORCE_INLINE vmQuat btReadQuat(const float* p)
+{
+ vmQuat vq;
+ loadXYZW(vq, p);
+ return vq;
+}
+
+static SIMD_FORCE_INLINE void btStoreVector3(const vmVector3 &src, float* p)
+{
+ vmVector3 v = src;
+ storeXYZ(v, p);
+}
+
+
+
+
+class btPersistentManifold;
+
+enum {
+ PFX_CONSTRAINT_SOLVER_CMD_SETUP_SOLVER_BODIES,
+ PFX_CONSTRAINT_SOLVER_CMD_SETUP_CONTACT_CONSTRAINTS,
+ PFX_CONSTRAINT_SOLVER_CMD_SETUP_JOINT_CONSTRAINTS,
+ PFX_CONSTRAINT_SOLVER_CMD_SOLVE_CONSTRAINTS,
+ PFX_CONSTRAINT_SOLVER_CMD_POST_SOLVER
+};
+
+
+struct PfxSetupContactConstraintsIO {
+ PfxConstraintPair *offsetContactPairs;
+ uint32_t numContactPairs1;
+ btPersistentManifold* offsetContactManifolds;
+ class TrbState *offsetRigStates;
+ struct PfxSolverBody *offsetSolverBodies;
+ uint32_t numRigidBodies;
+ float separateBias;
+ float timeStep;
+ class btCriticalSection* criticalSection;
+};
+
+
+
+struct PfxSolveConstraintsIO {
+ PfxParallelGroup *contactParallelGroup;
+ PfxParallelBatch *contactParallelBatches;
+ PfxConstraintPair *contactPairs;
+ uint32_t numContactPairs;
+ btPersistentManifold *offsetContactManifolds;
+ PfxParallelGroup *jointParallelGroup;
+ PfxParallelBatch *jointParallelBatches;
+ PfxConstraintPair *jointPairs;
+ uint32_t numJointPairs;
+ struct btSolverConstraint* offsetSolverConstraints;
+ TrbState *offsetRigStates1;
+ PfxSolverBody *offsetSolverBodies;
+ uint32_t numRigidBodies;
+ uint32_t iteration;
+
+ uint32_t taskId;
+
+ class btBarrier* barrier;
+
+};
+
+struct PfxPostSolverIO {
+ TrbState *states;
+ PfxSolverBody *solverBodies;
+ uint32_t numRigidBodies;
+};
+
+ATTRIBUTE_ALIGNED16(struct) btConstraintSolverIO {
+ uint8_t cmd;
+ union {
+ PfxSetupContactConstraintsIO setupContactConstraints;
+ PfxSolveConstraintsIO solveConstraints;
+ PfxPostSolverIO postSolver;
+ };
+
+ //SPU only
+ uint32_t barrierAddr2;
+ uint32_t criticalsectionAddr2;
+ uint32_t maxTasks1;
+};
+
+
+
+
+void SolverThreadFunc(void* userPtr,void* lsMemory);
+void* SolverlsMemoryFunc();
+///The btParallelConstraintSolver performs computations on constraint rows in parallel
+///Using the cross-platform threading it supports Windows, Linux, Mac OSX and PlayStation 3 Cell SPUs
+class btParallelConstraintSolver : public btSequentialImpulseConstraintSolver
+{
+
+protected:
+ struct btParallelSolverMemoryCache* m_memoryCache;
+
+ class btThreadSupportInterface* m_solverThreadSupport;
+
+ struct btConstraintSolverIO* m_solverIO;
+ class btBarrier* m_barrier;
+ class btCriticalSection* m_criticalSection;
+
+
+public:
+
+ btParallelConstraintSolver(class btThreadSupportInterface* solverThreadSupport);
+
+ virtual ~btParallelConstraintSolver();
+
+ virtual btScalar solveGroup(btCollisionObject** bodies,int numBodies,btPersistentManifold** manifold,int numManifolds,btTypedConstraint** constraints,int numConstraints,const btContactSolverInfo& info, btIDebugDraw* debugDrawer, btStackAlloc* stackAlloc,btDispatcher* dispatcher);
+
+};
+
+
+
+#endif //__BT_PARALLEL_CONSTRAINT_SOLVER_H \ No newline at end of file
diff --git a/tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.cpp b/tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.cpp
new file mode 100644
index 00000000..8192aa46
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.cpp
@@ -0,0 +1,22 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btThreadSupportInterface.h"
+
+btThreadSupportInterface::~btThreadSupportInterface()
+{
+
+}
+
diff --git a/tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.h b/tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.h
new file mode 100644
index 00000000..16850e22
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/btThreadSupportInterface.h
@@ -0,0 +1,85 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_THREAD_SUPPORT_INTERFACE_H
+#define BT_THREAD_SUPPORT_INTERFACE_H
+
+
+#include <LinearMath/btScalar.h> //for ATTRIBUTE_ALIGNED16
+#include "PlatformDefinitions.h"
+#include "PpuAddressSpace.h"
+
+class btBarrier {
+public:
+ btBarrier() {}
+ virtual ~btBarrier() {}
+
+ virtual void sync() = 0;
+ virtual void setMaxCount(int n) = 0;
+ virtual int getMaxCount() = 0;
+};
+
+class btCriticalSection {
+public:
+ btCriticalSection() {}
+ virtual ~btCriticalSection() {}
+
+ ATTRIBUTE_ALIGNED16(unsigned int mCommonBuff[32]);
+
+ virtual unsigned int getSharedParam(int i) = 0;
+ virtual void setSharedParam(int i,unsigned int p) = 0;
+
+ virtual void lock() = 0;
+ virtual void unlock() = 0;
+};
+
+
+class btThreadSupportInterface
+{
+public:
+
+ virtual ~btThreadSupportInterface();
+
+///send messages to SPUs
+ virtual void sendRequest(uint32_t uiCommand, ppu_address_t uiArgument0, uint32_t uiArgument1) =0;
+
+///check for messages from SPUs
+ virtual void waitForResponse(unsigned int *puiArgument0, unsigned int *puiArgument1) =0;
+
+
+ ///non-blocking test if a task is completed. First implement all versions, and then enable this API
+ ///virtual bool isTaskCompleted(unsigned int *puiArgument0, unsigned int *puiArgument1, int timeOutInMilliseconds)=0;
+
+///start the spus (can be called at the beginning of each frame, to make sure that the right SPU program is loaded)
+ virtual void startSPU() =0;
+
+///tell the task scheduler we are done with the SPU tasks
+ virtual void stopSPU()=0;
+
+ ///tell the task scheduler to use no more than numTasks tasks
+ virtual void setNumTasks(int numTasks)=0;
+
+ virtual int getNumTasks() const = 0;
+
+ virtual btBarrier* createBarrier() = 0;
+
+ virtual btCriticalSection* createCriticalSection() = 0;
+
+ virtual void* getThreadLocalMemory(int taskId) { return 0; }
+
+};
+
+#endif //BT_THREAD_SUPPORT_INTERFACE_H
+
diff --git a/tests/bullet/src/BulletMultiThreaded/vectormath2bullet.h b/tests/bullet/src/BulletMultiThreaded/vectormath2bullet.h
new file mode 100644
index 00000000..11ee33ad
--- /dev/null
+++ b/tests/bullet/src/BulletMultiThreaded/vectormath2bullet.h
@@ -0,0 +1,73 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef BT_AOS_VECTORMATH_BULLET_CONVERT_H
+#define BT_AOS_VECTORMATH_BULLET_CONVERT_H
+
+#include "PlatformDefinitions.h"
+#include "LinearMath/btVector3.h"
+#include "LinearMath/btQuaternion.h"
+#include "LinearMath/btMatrix3x3.h"
+
+inline Vectormath::Aos::Vector3 getVmVector3(const btVector3& bulletVec)
+{
+ return Vectormath::Aos::Vector3(bulletVec.getX(),bulletVec.getY(),bulletVec.getZ());
+}
+
+inline btVector3 getBtVector3(const Vectormath::Aos::Vector3& vmVec)
+{
+ return btVector3(vmVec.getX(),vmVec.getY(),vmVec.getZ());
+}
+inline btVector3 getBtVector3(const Vectormath::Aos::Point3& vmVec)
+{
+ return btVector3(vmVec.getX(),vmVec.getY(),vmVec.getZ());
+}
+
+inline Vectormath::Aos::Quat getVmQuat(const btQuaternion& bulletQuat)
+{
+ Vectormath::Aos::Quat vmQuat(bulletQuat.getX(),bulletQuat.getY(),bulletQuat.getZ(),bulletQuat.getW());
+ return vmQuat;
+}
+
+inline btQuaternion getBtQuat(const Vectormath::Aos::Quat& vmQuat)
+{
+ return btQuaternion (vmQuat.getX(),vmQuat.getY(),vmQuat.getZ(),vmQuat.getW());
+}
+
+inline Vectormath::Aos::Matrix3 getVmMatrix3(const btMatrix3x3& btMat)
+{
+ Vectormath::Aos::Matrix3 mat(
+ getVmVector3(btMat.getColumn(0)),
+ getVmVector3(btMat.getColumn(1)),
+ getVmVector3(btMat.getColumn(2)));
+ return mat;
+}
+
+
+#endif //BT_AOS_VECTORMATH_BULLET_CONVERT_H
diff --git a/tests/bullet/src/BulletSoftBody/CMakeLists.txt b/tests/bullet/src/BulletSoftBody/CMakeLists.txt
new file mode 100644
index 00000000..10537958
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/CMakeLists.txt
@@ -0,0 +1,65 @@
+
+INCLUDE_DIRECTORIES(
+${BULLET_PHYSICS_SOURCE_DIR}/src
+
+)
+
+#SUBDIRS( Solvers )
+
+SET(BulletSoftBody_SRCS
+ btSoftBody.cpp
+ btSoftBodyConcaveCollisionAlgorithm.cpp
+ btSoftBodyHelpers.cpp
+ btSoftBodyRigidBodyCollisionConfiguration.cpp
+ btSoftRigidCollisionAlgorithm.cpp
+ btSoftRigidDynamicsWorld.cpp
+ btSoftSoftCollisionAlgorithm.cpp
+ btDefaultSoftBodySolver.cpp
+
+)
+
+SET(BulletSoftBody_HDRS
+ btSoftBody.h
+ btSoftBodyData.h
+ btSoftBodyConcaveCollisionAlgorithm.h
+ btSoftBodyHelpers.h
+ btSoftBodyRigidBodyCollisionConfiguration.h
+ btSoftRigidCollisionAlgorithm.h
+ btSoftRigidDynamicsWorld.h
+ btSoftSoftCollisionAlgorithm.h
+ btSparseSDF.h
+
+ btSoftBodySolvers.h
+ btDefaultSoftBodySolver.h
+
+ btSoftBodySolverVertexBuffer.h
+)
+
+
+
+ADD_LIBRARY(BulletSoftBody ${BulletSoftBody_SRCS} ${BulletSoftBody_HDRS})
+SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES SOVERSION ${BULLET_VERSION})
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(BulletSoftBody BulletDynamics)
+ENDIF (BUILD_SHARED_LIBS)
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBody DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS BulletSoftBody DESTINATION lib${LIB_SUFFIX})
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN
+".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(BulletSoftBody PROPERTIES PUBLIC_HEADER "${BulletSoftBody_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.cpp b/tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.cpp
new file mode 100644
index 00000000..c876ebf1
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.cpp
@@ -0,0 +1,151 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btCollisionShape.h"
+
+#include "btDefaultSoftBodySolver.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+#include "BulletSoftBody/btSoftBody.h"
+
+
+btDefaultSoftBodySolver::btDefaultSoftBodySolver()
+{
+ // Initial we will clearly need to update solver constants
+ // For now this is global for the cloths linked with this solver - we should probably make this body specific
+ // for performance in future once we understand more clearly when constants need to be updated
+ m_updateSolverConstants = true;
+}
+
+btDefaultSoftBodySolver::~btDefaultSoftBodySolver()
+{
+}
+
+// In this case the data is already in the soft bodies so there is no need for us to do anything
+void btDefaultSoftBodySolver::copyBackToSoftBodies()
+{
+
+}
+
+void btDefaultSoftBodySolver::optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate)
+{
+ m_softBodySet.copyFromArray( softBodies );
+}
+
+void btDefaultSoftBodySolver::updateSoftBodies( )
+{
+ for ( int i=0; i < m_softBodySet.size(); i++)
+ {
+ btSoftBody* psb=(btSoftBody*)m_softBodySet[i];
+ if (psb->isActive())
+ {
+ psb->integrateMotion();
+ }
+ }
+} // updateSoftBodies
+
+bool btDefaultSoftBodySolver::checkInitialized()
+{
+ return true;
+}
+
+void btDefaultSoftBodySolver::solveConstraints( float solverdt )
+{
+ // Solve constraints for non-solver softbodies
+ for(int i=0; i < m_softBodySet.size(); ++i)
+ {
+ btSoftBody* psb = static_cast<btSoftBody*>(m_softBodySet[i]);
+ if (psb->isActive())
+ {
+ psb->solveConstraints();
+ }
+ }
+} // btDefaultSoftBodySolver::solveConstraints
+
+
+void btDefaultSoftBodySolver::copySoftBodyToVertexBuffer( const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer )
+{
+ // Currently only support CPU output buffers
+ // TODO: check for DX11 buffers. Take all offsets into the same DX11 buffer
+ // and use them together on a single kernel call if possible by setting up a
+ // per-cloth target buffer array for the copy kernel.
+
+ if( vertexBuffer->getBufferType() == btVertexBufferDescriptor::CPU_BUFFER )
+ {
+ const btAlignedObjectArray<btSoftBody::Node> &clothVertices( softBody->m_nodes );
+ int numVertices = clothVertices.size();
+
+ const btCPUVertexBufferDescriptor *cpuVertexBuffer = static_cast< btCPUVertexBufferDescriptor* >(vertexBuffer);
+ float *basePointer = cpuVertexBuffer->getBasePointer();
+
+ if( vertexBuffer->hasVertexPositions() )
+ {
+ const int vertexOffset = cpuVertexBuffer->getVertexOffset();
+ const int vertexStride = cpuVertexBuffer->getVertexStride();
+ float *vertexPointer = basePointer + vertexOffset;
+
+ for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
+ {
+ btVector3 position = clothVertices[vertexIndex].m_x;
+ *(vertexPointer + 0) = position.getX();
+ *(vertexPointer + 1) = position.getY();
+ *(vertexPointer + 2) = position.getZ();
+ vertexPointer += vertexStride;
+ }
+ }
+ if( vertexBuffer->hasNormals() )
+ {
+ const int normalOffset = cpuVertexBuffer->getNormalOffset();
+ const int normalStride = cpuVertexBuffer->getNormalStride();
+ float *normalPointer = basePointer + normalOffset;
+
+ for( int vertexIndex = 0; vertexIndex < numVertices; ++vertexIndex )
+ {
+ btVector3 normal = clothVertices[vertexIndex].m_n;
+ *(normalPointer + 0) = normal.getX();
+ *(normalPointer + 1) = normal.getY();
+ *(normalPointer + 2) = normal.getZ();
+ normalPointer += normalStride;
+ }
+ }
+ }
+} // btDefaultSoftBodySolver::copySoftBodyToVertexBuffer
+
+void btDefaultSoftBodySolver::processCollision( btSoftBody* softBody, btSoftBody* otherSoftBody)
+{
+ softBody->defaultCollisionHandler( otherSoftBody);
+}
+
+// For the default solver just leave the soft body to do its collision processing
+void btDefaultSoftBodySolver::processCollision( btSoftBody *softBody, btCollisionObject* collisionObject )
+{
+ softBody->defaultCollisionHandler( collisionObject );
+} // btDefaultSoftBodySolver::processCollision
+
+
+void btDefaultSoftBodySolver::predictMotion( float timeStep )
+{
+ for ( int i=0; i < m_softBodySet.size(); ++i)
+ {
+ btSoftBody* psb = m_softBodySet[i];
+
+ if (psb->isActive())
+ {
+ psb->predictMotion(timeStep);
+ }
+ }
+}
+
diff --git a/tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.h b/tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.h
new file mode 100644
index 00000000..8e7db3da
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btDefaultSoftBodySolver.h
@@ -0,0 +1,63 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_DEFAULT_SOLVER_H
+#define BT_SOFT_BODY_DEFAULT_SOLVER_H
+
+
+#include "BulletSoftBody/btSoftBodySolvers.h"
+#include "btSoftBodySolverVertexBuffer.h"
+
+
+class btDefaultSoftBodySolver : public btSoftBodySolver
+{
+protected:
+ /** Variable to define whether we need to update solver constants on the next iteration */
+ bool m_updateSolverConstants;
+
+ btAlignedObjectArray< btSoftBody * > m_softBodySet;
+
+
+public:
+ btDefaultSoftBodySolver();
+
+ virtual ~btDefaultSoftBodySolver();
+
+ virtual SolverTypes getSolverType() const
+ {
+ return DEFAULT_SOLVER;
+ }
+
+ virtual bool checkInitialized();
+
+ virtual void updateSoftBodies( );
+
+ virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies,bool forceUpdate=false );
+
+ virtual void copyBackToSoftBodies();
+
+ virtual void solveConstraints( float solverdt );
+
+ virtual void predictMotion( float solverdt );
+
+ virtual void copySoftBodyToVertexBuffer( const btSoftBody *const softBody, btVertexBufferDescriptor *vertexBuffer );
+
+ virtual void processCollision( btSoftBody *, btCollisionObject* );
+
+ virtual void processCollision( btSoftBody*, btSoftBody* );
+
+};
+
+#endif // #ifndef BT_ACCELERATED_SOFT_BODY_CPU_SOLVER_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBody.cpp b/tests/bullet/src/BulletSoftBody/btSoftBody.cpp
new file mode 100644
index 00000000..d440c94a
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBody.cpp
@@ -0,0 +1,3409 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///btSoftBody implementation by Nathanael Presson
+
+#include "btSoftBodyInternals.h"
+#include "BulletSoftBody/btSoftBodySolvers.h"
+#include "btSoftBodyData.h"
+#include "LinearMath/btSerializer.h"
+
+//
+btSoftBody::btSoftBody(btSoftBodyWorldInfo* worldInfo,int node_count, const btVector3* x, const btScalar* m)
+:m_worldInfo(worldInfo),m_softBodySolver(0)
+{
+ /* Init */
+ initDefaults();
+
+ /* Default material */
+ Material* pm=appendMaterial();
+ pm->m_kLST = 1;
+ pm->m_kAST = 1;
+ pm->m_kVST = 1;
+ pm->m_flags = fMaterial::Default;
+
+ /* Nodes */
+ const btScalar margin=getCollisionShape()->getMargin();
+ m_nodes.resize(node_count);
+ for(int i=0,ni=node_count;i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ ZeroInitialize(n);
+ n.m_x = x?*x++:btVector3(0,0,0);
+ n.m_q = n.m_x;
+ n.m_im = m?*m++:1;
+ n.m_im = n.m_im>0?1/n.m_im:0;
+ n.m_leaf = m_ndbvt.insert(btDbvtVolume::FromCR(n.m_x,margin),&n);
+ n.m_material= pm;
+ }
+ updateBounds();
+
+}
+
+btSoftBody::btSoftBody(btSoftBodyWorldInfo* worldInfo)
+:m_worldInfo(worldInfo)
+{
+ initDefaults();
+}
+
+
+void btSoftBody::initDefaults()
+{
+ m_internalType = CO_SOFT_BODY;
+ m_cfg.aeromodel = eAeroModel::V_Point;
+ m_cfg.kVCF = 1;
+ m_cfg.kDG = 0;
+ m_cfg.kLF = 0;
+ m_cfg.kDP = 0;
+ m_cfg.kPR = 0;
+ m_cfg.kVC = 0;
+ m_cfg.kDF = (btScalar)0.2;
+ m_cfg.kMT = 0;
+ m_cfg.kCHR = (btScalar)1.0;
+ m_cfg.kKHR = (btScalar)0.1;
+ m_cfg.kSHR = (btScalar)1.0;
+ m_cfg.kAHR = (btScalar)0.7;
+ m_cfg.kSRHR_CL = (btScalar)0.1;
+ m_cfg.kSKHR_CL = (btScalar)1;
+ m_cfg.kSSHR_CL = (btScalar)0.5;
+ m_cfg.kSR_SPLT_CL = (btScalar)0.5;
+ m_cfg.kSK_SPLT_CL = (btScalar)0.5;
+ m_cfg.kSS_SPLT_CL = (btScalar)0.5;
+ m_cfg.maxvolume = (btScalar)1;
+ m_cfg.timescale = 1;
+ m_cfg.viterations = 0;
+ m_cfg.piterations = 1;
+ m_cfg.diterations = 0;
+ m_cfg.citerations = 4;
+ m_cfg.collisions = fCollision::Default;
+ m_pose.m_bvolume = false;
+ m_pose.m_bframe = false;
+ m_pose.m_volume = 0;
+ m_pose.m_com = btVector3(0,0,0);
+ m_pose.m_rot.setIdentity();
+ m_pose.m_scl.setIdentity();
+ m_tag = 0;
+ m_timeacc = 0;
+ m_bUpdateRtCst = true;
+ m_bounds[0] = btVector3(0,0,0);
+ m_bounds[1] = btVector3(0,0,0);
+ m_worldTransform.setIdentity();
+ setSolver(eSolverPresets::Positions);
+
+ /* Collision shape */
+ ///for now, create a collision shape internally
+ m_collisionShape = new btSoftBodyCollisionShape(this);
+ m_collisionShape->setMargin(0.25);
+
+ m_initialWorldTransform.setIdentity();
+
+ m_windVelocity = btVector3(0,0,0);
+
+}
+
+//
+btSoftBody::~btSoftBody()
+{
+ //for now, delete the internal shape
+ delete m_collisionShape;
+ int i;
+
+ releaseClusters();
+ for(i=0;i<m_materials.size();++i)
+ btAlignedFree(m_materials[i]);
+ for(i=0;i<m_joints.size();++i)
+ btAlignedFree(m_joints[i]);
+}
+
+//
+bool btSoftBody::checkLink(int node0,int node1) const
+{
+ return(checkLink(&m_nodes[node0],&m_nodes[node1]));
+}
+
+//
+bool btSoftBody::checkLink(const Node* node0,const Node* node1) const
+{
+ const Node* n[]={node0,node1};
+ for(int i=0,ni=m_links.size();i<ni;++i)
+ {
+ const Link& l=m_links[i];
+ if( (l.m_n[0]==n[0]&&l.m_n[1]==n[1])||
+ (l.m_n[0]==n[1]&&l.m_n[1]==n[0]))
+ {
+ return(true);
+ }
+ }
+ return(false);
+}
+
+//
+bool btSoftBody::checkFace(int node0,int node1,int node2) const
+{
+ const Node* n[]={ &m_nodes[node0],
+ &m_nodes[node1],
+ &m_nodes[node2]};
+ for(int i=0,ni=m_faces.size();i<ni;++i)
+ {
+ const Face& f=m_faces[i];
+ int c=0;
+ for(int j=0;j<3;++j)
+ {
+ if( (f.m_n[j]==n[0])||
+ (f.m_n[j]==n[1])||
+ (f.m_n[j]==n[2])) c|=1<<j; else break;
+ }
+ if(c==7) return(true);
+ }
+ return(false);
+}
+
+//
+btSoftBody::Material* btSoftBody::appendMaterial()
+{
+ Material* pm=new(btAlignedAlloc(sizeof(Material),16)) Material();
+ if(m_materials.size()>0)
+ *pm=*m_materials[0];
+ else
+ ZeroInitialize(*pm);
+ m_materials.push_back(pm);
+ return(pm);
+}
+
+//
+void btSoftBody::appendNote( const char* text,
+ const btVector3& o,
+ const btVector4& c,
+ Node* n0,
+ Node* n1,
+ Node* n2,
+ Node* n3)
+{
+ Note n;
+ ZeroInitialize(n);
+ n.m_rank = 0;
+ n.m_text = text;
+ n.m_offset = o;
+ n.m_coords[0] = c.x();
+ n.m_coords[1] = c.y();
+ n.m_coords[2] = c.z();
+ n.m_coords[3] = c.w();
+ n.m_nodes[0] = n0;n.m_rank+=n0?1:0;
+ n.m_nodes[1] = n1;n.m_rank+=n1?1:0;
+ n.m_nodes[2] = n2;n.m_rank+=n2?1:0;
+ n.m_nodes[3] = n3;n.m_rank+=n3?1:0;
+ m_notes.push_back(n);
+}
+
+//
+void btSoftBody::appendNote( const char* text,
+ const btVector3& o,
+ Node* feature)
+{
+ appendNote(text,o,btVector4(1,0,0,0),feature);
+}
+
+//
+void btSoftBody::appendNote( const char* text,
+ const btVector3& o,
+ Link* feature)
+{
+ static const btScalar w=1/(btScalar)2;
+ appendNote(text,o,btVector4(w,w,0,0), feature->m_n[0],
+ feature->m_n[1]);
+}
+
+//
+void btSoftBody::appendNote( const char* text,
+ const btVector3& o,
+ Face* feature)
+{
+ static const btScalar w=1/(btScalar)3;
+ appendNote(text,o,btVector4(w,w,w,0), feature->m_n[0],
+ feature->m_n[1],
+ feature->m_n[2]);
+}
+
+//
+void btSoftBody::appendNode( const btVector3& x,btScalar m)
+{
+ if(m_nodes.capacity()==m_nodes.size())
+ {
+ pointersToIndices();
+ m_nodes.reserve(m_nodes.size()*2+1);
+ indicesToPointers();
+ }
+ const btScalar margin=getCollisionShape()->getMargin();
+ m_nodes.push_back(Node());
+ Node& n=m_nodes[m_nodes.size()-1];
+ ZeroInitialize(n);
+ n.m_x = x;
+ n.m_q = n.m_x;
+ n.m_im = m>0?1/m:0;
+ n.m_material = m_materials[0];
+ n.m_leaf = m_ndbvt.insert(btDbvtVolume::FromCR(n.m_x,margin),&n);
+}
+
+//
+void btSoftBody::appendLink(int model,Material* mat)
+{
+ Link l;
+ if(model>=0)
+ l=m_links[model];
+ else
+ { ZeroInitialize(l);l.m_material=mat?mat:m_materials[0]; }
+ m_links.push_back(l);
+}
+
+//
+void btSoftBody::appendLink( int node0,
+ int node1,
+ Material* mat,
+ bool bcheckexist)
+{
+ appendLink(&m_nodes[node0],&m_nodes[node1],mat,bcheckexist);
+}
+
+//
+void btSoftBody::appendLink( Node* node0,
+ Node* node1,
+ Material* mat,
+ bool bcheckexist)
+{
+ if((!bcheckexist)||(!checkLink(node0,node1)))
+ {
+ appendLink(-1,mat);
+ Link& l=m_links[m_links.size()-1];
+ l.m_n[0] = node0;
+ l.m_n[1] = node1;
+ l.m_rl = (l.m_n[0]->m_x-l.m_n[1]->m_x).length();
+ m_bUpdateRtCst=true;
+ }
+}
+
+//
+void btSoftBody::appendFace(int model,Material* mat)
+{
+ Face f;
+ if(model>=0)
+ { f=m_faces[model]; }
+ else
+ { ZeroInitialize(f);f.m_material=mat?mat:m_materials[0]; }
+ m_faces.push_back(f);
+}
+
+//
+void btSoftBody::appendFace(int node0,int node1,int node2,Material* mat)
+{
+ if (node0==node1)
+ return;
+ if (node1==node2)
+ return;
+ if (node2==node0)
+ return;
+
+ appendFace(-1,mat);
+ Face& f=m_faces[m_faces.size()-1];
+ btAssert(node0!=node1);
+ btAssert(node1!=node2);
+ btAssert(node2!=node0);
+ f.m_n[0] = &m_nodes[node0];
+ f.m_n[1] = &m_nodes[node1];
+ f.m_n[2] = &m_nodes[node2];
+ f.m_ra = AreaOf( f.m_n[0]->m_x,
+ f.m_n[1]->m_x,
+ f.m_n[2]->m_x);
+ m_bUpdateRtCst=true;
+}
+
+//
+void btSoftBody::appendTetra(int model,Material* mat)
+{
+Tetra t;
+if(model>=0)
+ t=m_tetras[model];
+ else
+ { ZeroInitialize(t);t.m_material=mat?mat:m_materials[0]; }
+m_tetras.push_back(t);
+}
+
+//
+void btSoftBody::appendTetra(int node0,
+ int node1,
+ int node2,
+ int node3,
+ Material* mat)
+{
+ appendTetra(-1,mat);
+ Tetra& t=m_tetras[m_tetras.size()-1];
+ t.m_n[0] = &m_nodes[node0];
+ t.m_n[1] = &m_nodes[node1];
+ t.m_n[2] = &m_nodes[node2];
+ t.m_n[3] = &m_nodes[node3];
+ t.m_rv = VolumeOf(t.m_n[0]->m_x,t.m_n[1]->m_x,t.m_n[2]->m_x,t.m_n[3]->m_x);
+ m_bUpdateRtCst=true;
+}
+
+//
+
+void btSoftBody::appendAnchor(int node,btRigidBody* body, bool disableCollisionBetweenLinkedBodies,btScalar influence)
+{
+ btVector3 local = body->getWorldTransform().inverse()*m_nodes[node].m_x;
+ appendAnchor(node,body,local,disableCollisionBetweenLinkedBodies,influence);
+}
+
+//
+void btSoftBody::appendAnchor(int node,btRigidBody* body, const btVector3& localPivot,bool disableCollisionBetweenLinkedBodies,btScalar influence)
+{
+ if (disableCollisionBetweenLinkedBodies)
+ {
+ if (m_collisionDisabledObjects.findLinearSearch(body)==m_collisionDisabledObjects.size())
+ {
+ m_collisionDisabledObjects.push_back(body);
+ }
+ }
+
+ Anchor a;
+ a.m_node = &m_nodes[node];
+ a.m_body = body;
+ a.m_local = localPivot;
+ a.m_node->m_battach = 1;
+ a.m_influence = influence;
+ m_anchors.push_back(a);
+}
+
+//
+void btSoftBody::appendLinearJoint(const LJoint::Specs& specs,Cluster* body0,Body body1)
+{
+ LJoint* pj = new(btAlignedAlloc(sizeof(LJoint),16)) LJoint();
+ pj->m_bodies[0] = body0;
+ pj->m_bodies[1] = body1;
+ pj->m_refs[0] = pj->m_bodies[0].xform().inverse()*specs.position;
+ pj->m_refs[1] = pj->m_bodies[1].xform().inverse()*specs.position;
+ pj->m_cfm = specs.cfm;
+ pj->m_erp = specs.erp;
+ pj->m_split = specs.split;
+ m_joints.push_back(pj);
+}
+
+//
+void btSoftBody::appendLinearJoint(const LJoint::Specs& specs,Body body)
+{
+ appendLinearJoint(specs,m_clusters[0],body);
+}
+
+//
+void btSoftBody::appendLinearJoint(const LJoint::Specs& specs,btSoftBody* body)
+{
+ appendLinearJoint(specs,m_clusters[0],body->m_clusters[0]);
+}
+
+//
+void btSoftBody::appendAngularJoint(const AJoint::Specs& specs,Cluster* body0,Body body1)
+{
+ AJoint* pj = new(btAlignedAlloc(sizeof(AJoint),16)) AJoint();
+ pj->m_bodies[0] = body0;
+ pj->m_bodies[1] = body1;
+ pj->m_refs[0] = pj->m_bodies[0].xform().inverse().getBasis()*specs.axis;
+ pj->m_refs[1] = pj->m_bodies[1].xform().inverse().getBasis()*specs.axis;
+ pj->m_cfm = specs.cfm;
+ pj->m_erp = specs.erp;
+ pj->m_split = specs.split;
+ pj->m_icontrol = specs.icontrol;
+ m_joints.push_back(pj);
+}
+
+//
+void btSoftBody::appendAngularJoint(const AJoint::Specs& specs,Body body)
+{
+ appendAngularJoint(specs,m_clusters[0],body);
+}
+
+//
+void btSoftBody::appendAngularJoint(const AJoint::Specs& specs,btSoftBody* body)
+{
+ appendAngularJoint(specs,m_clusters[0],body->m_clusters[0]);
+}
+
+//
+void btSoftBody::addForce(const btVector3& force)
+{
+ for(int i=0,ni=m_nodes.size();i<ni;++i) addForce(force,i);
+}
+
+//
+void btSoftBody::addForce(const btVector3& force,int node)
+{
+ Node& n=m_nodes[node];
+ if(n.m_im>0)
+ {
+ n.m_f += force;
+ }
+}
+
+//
+void btSoftBody::addVelocity(const btVector3& velocity)
+{
+ for(int i=0,ni=m_nodes.size();i<ni;++i) addVelocity(velocity,i);
+}
+
+/* Set velocity for the entire body */
+void btSoftBody::setVelocity( const btVector3& velocity)
+{
+ for(int i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ if(n.m_im>0)
+ {
+ n.m_v = velocity;
+ }
+ }
+}
+
+
+//
+void btSoftBody::addVelocity(const btVector3& velocity,int node)
+{
+ Node& n=m_nodes[node];
+ if(n.m_im>0)
+ {
+ n.m_v += velocity;
+ }
+}
+
+//
+void btSoftBody::setMass(int node,btScalar mass)
+{
+ m_nodes[node].m_im=mass>0?1/mass:0;
+ m_bUpdateRtCst=true;
+}
+
+//
+btScalar btSoftBody::getMass(int node) const
+{
+ return(m_nodes[node].m_im>0?1/m_nodes[node].m_im:0);
+}
+
+//
+btScalar btSoftBody::getTotalMass() const
+{
+ btScalar mass=0;
+ for(int i=0;i<m_nodes.size();++i)
+ {
+ mass+=getMass(i);
+ }
+ return(mass);
+}
+
+//
+void btSoftBody::setTotalMass(btScalar mass,bool fromfaces)
+{
+ int i;
+
+ if(fromfaces)
+ {
+
+ for(i=0;i<m_nodes.size();++i)
+ {
+ m_nodes[i].m_im=0;
+ }
+ for(i=0;i<m_faces.size();++i)
+ {
+ const Face& f=m_faces[i];
+ const btScalar twicearea=AreaOf( f.m_n[0]->m_x,
+ f.m_n[1]->m_x,
+ f.m_n[2]->m_x);
+ for(int j=0;j<3;++j)
+ {
+ f.m_n[j]->m_im+=twicearea;
+ }
+ }
+ for( i=0;i<m_nodes.size();++i)
+ {
+ m_nodes[i].m_im=1/m_nodes[i].m_im;
+ }
+ }
+ const btScalar tm=getTotalMass();
+ const btScalar itm=1/tm;
+ for( i=0;i<m_nodes.size();++i)
+ {
+ m_nodes[i].m_im/=itm*mass;
+ }
+ m_bUpdateRtCst=true;
+}
+
+//
+void btSoftBody::setTotalDensity(btScalar density)
+{
+ setTotalMass(getVolume()*density,true);
+}
+
+//
+void btSoftBody::setVolumeMass(btScalar mass)
+{
+btAlignedObjectArray<btScalar> ranks;
+ranks.resize(m_nodes.size(),0);
+int i;
+
+for(i=0;i<m_nodes.size();++i)
+ {
+ m_nodes[i].m_im=0;
+ }
+for(i=0;i<m_tetras.size();++i)
+ {
+ const Tetra& t=m_tetras[i];
+ for(int j=0;j<4;++j)
+ {
+ t.m_n[j]->m_im+=btFabs(t.m_rv);
+ ranks[int(t.m_n[j]-&m_nodes[0])]+=1;
+ }
+ }
+for( i=0;i<m_nodes.size();++i)
+ {
+ if(m_nodes[i].m_im>0)
+ {
+ m_nodes[i].m_im=ranks[i]/m_nodes[i].m_im;
+ }
+ }
+setTotalMass(mass,false);
+}
+
+//
+void btSoftBody::setVolumeDensity(btScalar density)
+{
+btScalar volume=0;
+for(int i=0;i<m_tetras.size();++i)
+ {
+ const Tetra& t=m_tetras[i];
+ for(int j=0;j<4;++j)
+ {
+ volume+=btFabs(t.m_rv);
+ }
+ }
+setVolumeMass(volume*density/6);
+}
+
+//
+void btSoftBody::transform(const btTransform& trs)
+{
+ const btScalar margin=getCollisionShape()->getMargin();
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) vol;
+
+ for(int i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ n.m_x=trs*n.m_x;
+ n.m_q=trs*n.m_q;
+ n.m_n=trs.getBasis()*n.m_n;
+ vol = btDbvtVolume::FromCR(n.m_x,margin);
+
+ m_ndbvt.update(n.m_leaf,vol);
+ }
+ updateNormals();
+ updateBounds();
+ updateConstants();
+ m_initialWorldTransform = trs;
+}
+
+//
+void btSoftBody::translate(const btVector3& trs)
+{
+ btTransform t;
+ t.setIdentity();
+ t.setOrigin(trs);
+ transform(t);
+}
+
+//
+void btSoftBody::rotate( const btQuaternion& rot)
+{
+ btTransform t;
+ t.setIdentity();
+ t.setRotation(rot);
+ transform(t);
+}
+
+//
+void btSoftBody::scale(const btVector3& scl)
+{
+
+ const btScalar margin=getCollisionShape()->getMargin();
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) vol;
+
+ for(int i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ n.m_x*=scl;
+ n.m_q*=scl;
+ vol = btDbvtVolume::FromCR(n.m_x,margin);
+ m_ndbvt.update(n.m_leaf,vol);
+ }
+ updateNormals();
+ updateBounds();
+ updateConstants();
+}
+
+//
+void btSoftBody::setPose(bool bvolume,bool bframe)
+{
+ m_pose.m_bvolume = bvolume;
+ m_pose.m_bframe = bframe;
+ int i,ni;
+
+ /* Weights */
+ const btScalar omass=getTotalMass();
+ const btScalar kmass=omass*m_nodes.size()*1000;
+ btScalar tmass=omass;
+ m_pose.m_wgh.resize(m_nodes.size());
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ if(m_nodes[i].m_im<=0) tmass+=kmass;
+ }
+ for( i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ m_pose.m_wgh[i]= n.m_im>0 ?
+ 1/(m_nodes[i].m_im*tmass) :
+ kmass/tmass;
+ }
+ /* Pos */
+ const btVector3 com=evaluateCom();
+ m_pose.m_pos.resize(m_nodes.size());
+ for( i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ m_pose.m_pos[i]=m_nodes[i].m_x-com;
+ }
+ m_pose.m_volume = bvolume?getVolume():0;
+ m_pose.m_com = com;
+ m_pose.m_rot.setIdentity();
+ m_pose.m_scl.setIdentity();
+ /* Aqq */
+ m_pose.m_aqq[0] =
+ m_pose.m_aqq[1] =
+ m_pose.m_aqq[2] = btVector3(0,0,0);
+ for( i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ const btVector3& q=m_pose.m_pos[i];
+ const btVector3 mq=m_pose.m_wgh[i]*q;
+ m_pose.m_aqq[0]+=mq.x()*q;
+ m_pose.m_aqq[1]+=mq.y()*q;
+ m_pose.m_aqq[2]+=mq.z()*q;
+ }
+ m_pose.m_aqq=m_pose.m_aqq.inverse();
+ updateConstants();
+}
+
+//
+btScalar btSoftBody::getVolume() const
+{
+ btScalar vol=0;
+ if(m_nodes.size()>0)
+ {
+ int i,ni;
+
+ const btVector3 org=m_nodes[0].m_x;
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ const Face& f=m_faces[i];
+ vol+=btDot(f.m_n[0]->m_x-org,btCross(f.m_n[1]->m_x-org,f.m_n[2]->m_x-org));
+ }
+ vol/=(btScalar)6;
+ }
+ return(vol);
+}
+
+//
+int btSoftBody::clusterCount() const
+{
+ return(m_clusters.size());
+}
+
+//
+btVector3 btSoftBody::clusterCom(const Cluster* cluster)
+{
+ btVector3 com(0,0,0);
+ for(int i=0,ni=cluster->m_nodes.size();i<ni;++i)
+ {
+ com+=cluster->m_nodes[i]->m_x*cluster->m_masses[i];
+ }
+ return(com*cluster->m_imass);
+}
+
+//
+btVector3 btSoftBody::clusterCom(int cluster) const
+{
+ return(clusterCom(m_clusters[cluster]));
+}
+
+//
+btVector3 btSoftBody::clusterVelocity(const Cluster* cluster,const btVector3& rpos)
+{
+ return(cluster->m_lv+btCross(cluster->m_av,rpos));
+}
+
+//
+void btSoftBody::clusterVImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse)
+{
+ const btVector3 li=cluster->m_imass*impulse;
+ const btVector3 ai=cluster->m_invwi*btCross(rpos,impulse);
+ cluster->m_vimpulses[0]+=li;cluster->m_lv+=li;
+ cluster->m_vimpulses[1]+=ai;cluster->m_av+=ai;
+ cluster->m_nvimpulses++;
+}
+
+//
+void btSoftBody::clusterDImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse)
+{
+ const btVector3 li=cluster->m_imass*impulse;
+ const btVector3 ai=cluster->m_invwi*btCross(rpos,impulse);
+ cluster->m_dimpulses[0]+=li;
+ cluster->m_dimpulses[1]+=ai;
+ cluster->m_ndimpulses++;
+}
+
+//
+void btSoftBody::clusterImpulse(Cluster* cluster,const btVector3& rpos,const Impulse& impulse)
+{
+ if(impulse.m_asVelocity) clusterVImpulse(cluster,rpos,impulse.m_velocity);
+ if(impulse.m_asDrift) clusterDImpulse(cluster,rpos,impulse.m_drift);
+}
+
+//
+void btSoftBody::clusterVAImpulse(Cluster* cluster,const btVector3& impulse)
+{
+ const btVector3 ai=cluster->m_invwi*impulse;
+ cluster->m_vimpulses[1]+=ai;cluster->m_av+=ai;
+ cluster->m_nvimpulses++;
+}
+
+//
+void btSoftBody::clusterDAImpulse(Cluster* cluster,const btVector3& impulse)
+{
+ const btVector3 ai=cluster->m_invwi*impulse;
+ cluster->m_dimpulses[1]+=ai;
+ cluster->m_ndimpulses++;
+}
+
+//
+void btSoftBody::clusterAImpulse(Cluster* cluster,const Impulse& impulse)
+{
+ if(impulse.m_asVelocity) clusterVAImpulse(cluster,impulse.m_velocity);
+ if(impulse.m_asDrift) clusterDAImpulse(cluster,impulse.m_drift);
+}
+
+//
+void btSoftBody::clusterDCImpulse(Cluster* cluster,const btVector3& impulse)
+{
+ cluster->m_dimpulses[0]+=impulse*cluster->m_imass;
+ cluster->m_ndimpulses++;
+}
+
+struct NodeLinks
+{
+ btAlignedObjectArray<int> m_links;
+};
+
+
+
+//
+int btSoftBody::generateBendingConstraints(int distance,Material* mat)
+{
+ int i,j;
+
+ if(distance>1)
+ {
+ /* Build graph */
+ const int n=m_nodes.size();
+ const unsigned inf=(~(unsigned)0)>>1;
+ unsigned* adj=new unsigned[n*n];
+
+
+#define IDX(_x_,_y_) ((_y_)*n+(_x_))
+ for(j=0;j<n;++j)
+ {
+ for(i=0;i<n;++i)
+ {
+ if(i!=j)
+ {
+ adj[IDX(i,j)]=adj[IDX(j,i)]=inf;
+ }
+ else
+ {
+ adj[IDX(i,j)]=adj[IDX(j,i)]=0;
+ }
+ }
+ }
+ for( i=0;i<m_links.size();++i)
+ {
+ const int ia=(int)(m_links[i].m_n[0]-&m_nodes[0]);
+ const int ib=(int)(m_links[i].m_n[1]-&m_nodes[0]);
+ adj[IDX(ia,ib)]=1;
+ adj[IDX(ib,ia)]=1;
+ }
+
+
+ //special optimized case for distance == 2
+ if (distance == 2)
+ {
+
+ btAlignedObjectArray<NodeLinks> nodeLinks;
+
+
+ /* Build node links */
+ nodeLinks.resize(m_nodes.size());
+
+ for( i=0;i<m_links.size();++i)
+ {
+ const int ia=(int)(m_links[i].m_n[0]-&m_nodes[0]);
+ const int ib=(int)(m_links[i].m_n[1]-&m_nodes[0]);
+ if (nodeLinks[ia].m_links.findLinearSearch(ib)==nodeLinks[ia].m_links.size())
+ nodeLinks[ia].m_links.push_back(ib);
+
+ if (nodeLinks[ib].m_links.findLinearSearch(ia)==nodeLinks[ib].m_links.size())
+ nodeLinks[ib].m_links.push_back(ia);
+ }
+ for (int ii=0;ii<nodeLinks.size();ii++)
+ {
+ int i=ii;
+
+ for (int jj=0;jj<nodeLinks[ii].m_links.size();jj++)
+ {
+ int k = nodeLinks[ii].m_links[jj];
+ for (int kk=0;kk<nodeLinks[k].m_links.size();kk++)
+ {
+ int j = nodeLinks[k].m_links[kk];
+ if (i!=j)
+ {
+ const unsigned sum=adj[IDX(i,k)]+adj[IDX(k,j)];
+ btAssert(sum==2);
+ if(adj[IDX(i,j)]>sum)
+ {
+ adj[IDX(i,j)]=adj[IDX(j,i)]=sum;
+ }
+ }
+
+ }
+ }
+ }
+ } else
+ {
+ ///generic Floyd's algorithm
+ for(int k=0;k<n;++k)
+ {
+ for(j=0;j<n;++j)
+ {
+ for(i=j+1;i<n;++i)
+ {
+ const unsigned sum=adj[IDX(i,k)]+adj[IDX(k,j)];
+ if(adj[IDX(i,j)]>sum)
+ {
+ adj[IDX(i,j)]=adj[IDX(j,i)]=sum;
+ }
+ }
+ }
+ }
+ }
+
+
+ /* Build links */
+ int nlinks=0;
+ for(j=0;j<n;++j)
+ {
+ for(i=j+1;i<n;++i)
+ {
+ if(adj[IDX(i,j)]==(unsigned)distance)
+ {
+ appendLink(i,j,mat);
+ m_links[m_links.size()-1].m_bbending=1;
+ ++nlinks;
+ }
+ }
+ }
+ delete[] adj;
+ return(nlinks);
+ }
+ return(0);
+}
+
+//
+void btSoftBody::randomizeConstraints()
+{
+ unsigned long seed=243703;
+#define NEXTRAND (seed=(1664525L*seed+1013904223L)&0xffffffff)
+ int i,ni;
+
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ btSwap(m_links[i],m_links[NEXTRAND%ni]);
+ }
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ btSwap(m_faces[i],m_faces[NEXTRAND%ni]);
+ }
+#undef NEXTRAND
+}
+
+//
+void btSoftBody::releaseCluster(int index)
+{
+ Cluster* c=m_clusters[index];
+ if(c->m_leaf) m_cdbvt.remove(c->m_leaf);
+ c->~Cluster();
+ btAlignedFree(c);
+ m_clusters.remove(c);
+}
+
+//
+void btSoftBody::releaseClusters()
+{
+ while(m_clusters.size()>0) releaseCluster(0);
+}
+
+//
+int btSoftBody::generateClusters(int k,int maxiterations)
+{
+ int i;
+ releaseClusters();
+ m_clusters.resize(btMin(k,m_nodes.size()));
+ for(i=0;i<m_clusters.size();++i)
+ {
+ m_clusters[i] = new(btAlignedAlloc(sizeof(Cluster),16)) Cluster();
+ m_clusters[i]->m_collide= true;
+ }
+ k=m_clusters.size();
+ if(k>0)
+ {
+ /* Initialize */
+ btAlignedObjectArray<btVector3> centers;
+ btVector3 cog(0,0,0);
+ int i;
+ for(i=0;i<m_nodes.size();++i)
+ {
+ cog+=m_nodes[i].m_x;
+ m_clusters[(i*29873)%m_clusters.size()]->m_nodes.push_back(&m_nodes[i]);
+ }
+ cog/=(btScalar)m_nodes.size();
+ centers.resize(k,cog);
+ /* Iterate */
+ const btScalar slope=16;
+ bool changed;
+ int iterations=0;
+ do {
+ const btScalar w=2-btMin<btScalar>(1,iterations/slope);
+ changed=false;
+ iterations++;
+ int i;
+
+ for(i=0;i<k;++i)
+ {
+ btVector3 c(0,0,0);
+ for(int j=0;j<m_clusters[i]->m_nodes.size();++j)
+ {
+ c+=m_clusters[i]->m_nodes[j]->m_x;
+ }
+ if(m_clusters[i]->m_nodes.size())
+ {
+ c /= (btScalar)m_clusters[i]->m_nodes.size();
+ c = centers[i]+(c-centers[i])*w;
+ changed |= ((c-centers[i]).length2()>SIMD_EPSILON);
+ centers[i] = c;
+ m_clusters[i]->m_nodes.resize(0);
+ }
+ }
+ for(i=0;i<m_nodes.size();++i)
+ {
+ const btVector3 nx=m_nodes[i].m_x;
+ int kbest=0;
+ btScalar kdist=ClusterMetric(centers[0],nx);
+ for(int j=1;j<k;++j)
+ {
+ const btScalar d=ClusterMetric(centers[j],nx);
+ if(d<kdist)
+ {
+ kbest=j;
+ kdist=d;
+ }
+ }
+ m_clusters[kbest]->m_nodes.push_back(&m_nodes[i]);
+ }
+ } while(changed&&(iterations<maxiterations));
+ /* Merge */
+ btAlignedObjectArray<int> cids;
+ cids.resize(m_nodes.size(),-1);
+ for(i=0;i<m_clusters.size();++i)
+ {
+ for(int j=0;j<m_clusters[i]->m_nodes.size();++j)
+ {
+ cids[int(m_clusters[i]->m_nodes[j]-&m_nodes[0])]=i;
+ }
+ }
+ for(i=0;i<m_faces.size();++i)
+ {
+ const int idx[]={ int(m_faces[i].m_n[0]-&m_nodes[0]),
+ int(m_faces[i].m_n[1]-&m_nodes[0]),
+ int(m_faces[i].m_n[2]-&m_nodes[0])};
+ for(int j=0;j<3;++j)
+ {
+ const int cid=cids[idx[j]];
+ for(int q=1;q<3;++q)
+ {
+ const int kid=idx[(j+q)%3];
+ if(cids[kid]!=cid)
+ {
+ if(m_clusters[cid]->m_nodes.findLinearSearch(&m_nodes[kid])==m_clusters[cid]->m_nodes.size())
+ {
+ m_clusters[cid]->m_nodes.push_back(&m_nodes[kid]);
+ }
+ }
+ }
+ }
+ }
+ /* Master */
+ if(m_clusters.size()>1)
+ {
+ Cluster* pmaster=new(btAlignedAlloc(sizeof(Cluster),16)) Cluster();
+ pmaster->m_collide = false;
+ pmaster->m_nodes.reserve(m_nodes.size());
+ for(int i=0;i<m_nodes.size();++i) pmaster->m_nodes.push_back(&m_nodes[i]);
+ m_clusters.push_back(pmaster);
+ btSwap(m_clusters[0],m_clusters[m_clusters.size()-1]);
+ }
+ /* Terminate */
+ for(i=0;i<m_clusters.size();++i)
+ {
+ if(m_clusters[i]->m_nodes.size()==0)
+ {
+ releaseCluster(i--);
+ }
+ }
+ } else
+ {
+ //create a cluster for each tetrahedron (if tetrahedra exist) or each face
+ if (m_tetras.size())
+ {
+ m_clusters.resize(m_tetras.size());
+ for(i=0;i<m_clusters.size();++i)
+ {
+ m_clusters[i] = new(btAlignedAlloc(sizeof(Cluster),16)) Cluster();
+ m_clusters[i]->m_collide= true;
+ }
+ for (i=0;i<m_tetras.size();i++)
+ {
+ for (int j=0;j<4;j++)
+ {
+ m_clusters[i]->m_nodes.push_back(m_tetras[i].m_n[j]);
+ }
+ }
+
+ } else
+ {
+ m_clusters.resize(m_faces.size());
+ for(i=0;i<m_clusters.size();++i)
+ {
+ m_clusters[i] = new(btAlignedAlloc(sizeof(Cluster),16)) Cluster();
+ m_clusters[i]->m_collide= true;
+ }
+
+ for(i=0;i<m_faces.size();++i)
+ {
+ for(int j=0;j<3;++j)
+ {
+ m_clusters[i]->m_nodes.push_back(m_faces[i].m_n[j]);
+ }
+ }
+ }
+ }
+
+ if (m_clusters.size())
+ {
+ initializeClusters();
+ updateClusters();
+
+
+ //for self-collision
+ m_clusterConnectivity.resize(m_clusters.size()*m_clusters.size());
+ {
+ for (int c0=0;c0<m_clusters.size();c0++)
+ {
+ m_clusters[c0]->m_clusterIndex=c0;
+ for (int c1=0;c1<m_clusters.size();c1++)
+ {
+
+ bool connected=false;
+ Cluster* cla = m_clusters[c0];
+ Cluster* clb = m_clusters[c1];
+ for (int i=0;!connected&&i<cla->m_nodes.size();i++)
+ {
+ for (int j=0;j<clb->m_nodes.size();j++)
+ {
+ if (cla->m_nodes[i] == clb->m_nodes[j])
+ {
+ connected=true;
+ break;
+ }
+ }
+ }
+ m_clusterConnectivity[c0+c1*m_clusters.size()]=connected;
+ }
+ }
+ }
+ }
+
+ return(m_clusters.size());
+}
+
+//
+void btSoftBody::refine(ImplicitFn* ifn,btScalar accurary,bool cut)
+{
+ const Node* nbase = &m_nodes[0];
+ int ncount = m_nodes.size();
+ btSymMatrix<int> edges(ncount,-2);
+ int newnodes=0;
+ int i,j,k,ni;
+
+ /* Filter out */
+ for(i=0;i<m_links.size();++i)
+ {
+ Link& l=m_links[i];
+ if(l.m_bbending)
+ {
+ if(!SameSign(ifn->Eval(l.m_n[0]->m_x),ifn->Eval(l.m_n[1]->m_x)))
+ {
+ btSwap(m_links[i],m_links[m_links.size()-1]);
+ m_links.pop_back();--i;
+ }
+ }
+ }
+ /* Fill edges */
+ for(i=0;i<m_links.size();++i)
+ {
+ Link& l=m_links[i];
+ edges(int(l.m_n[0]-nbase),int(l.m_n[1]-nbase))=-1;
+ }
+ for(i=0;i<m_faces.size();++i)
+ {
+ Face& f=m_faces[i];
+ edges(int(f.m_n[0]-nbase),int(f.m_n[1]-nbase))=-1;
+ edges(int(f.m_n[1]-nbase),int(f.m_n[2]-nbase))=-1;
+ edges(int(f.m_n[2]-nbase),int(f.m_n[0]-nbase))=-1;
+ }
+ /* Intersect */
+ for(i=0;i<ncount;++i)
+ {
+ for(j=i+1;j<ncount;++j)
+ {
+ if(edges(i,j)==-1)
+ {
+ Node& a=m_nodes[i];
+ Node& b=m_nodes[j];
+ const btScalar t=ImplicitSolve(ifn,a.m_x,b.m_x,accurary);
+ if(t>0)
+ {
+ const btVector3 x=Lerp(a.m_x,b.m_x,t);
+ const btVector3 v=Lerp(a.m_v,b.m_v,t);
+ btScalar m=0;
+ if(a.m_im>0)
+ {
+ if(b.m_im>0)
+ {
+ const btScalar ma=1/a.m_im;
+ const btScalar mb=1/b.m_im;
+ const btScalar mc=Lerp(ma,mb,t);
+ const btScalar f=(ma+mb)/(ma+mb+mc);
+ a.m_im=1/(ma*f);
+ b.m_im=1/(mb*f);
+ m=mc*f;
+ }
+ else
+ { a.m_im/=0.5;m=1/a.m_im; }
+ }
+ else
+ {
+ if(b.m_im>0)
+ { b.m_im/=0.5;m=1/b.m_im; }
+ else
+ m=0;
+ }
+ appendNode(x,m);
+ edges(i,j)=m_nodes.size()-1;
+ m_nodes[edges(i,j)].m_v=v;
+ ++newnodes;
+ }
+ }
+ }
+ }
+ nbase=&m_nodes[0];
+ /* Refine links */
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ Link& feat=m_links[i];
+ const int idx[]={ int(feat.m_n[0]-nbase),
+ int(feat.m_n[1]-nbase)};
+ if((idx[0]<ncount)&&(idx[1]<ncount))
+ {
+ const int ni=edges(idx[0],idx[1]);
+ if(ni>0)
+ {
+ appendLink(i);
+ Link* pft[]={ &m_links[i],
+ &m_links[m_links.size()-1]};
+ pft[0]->m_n[0]=&m_nodes[idx[0]];
+ pft[0]->m_n[1]=&m_nodes[ni];
+ pft[1]->m_n[0]=&m_nodes[ni];
+ pft[1]->m_n[1]=&m_nodes[idx[1]];
+ }
+ }
+ }
+ /* Refine faces */
+ for(i=0;i<m_faces.size();++i)
+ {
+ const Face& feat=m_faces[i];
+ const int idx[]={ int(feat.m_n[0]-nbase),
+ int(feat.m_n[1]-nbase),
+ int(feat.m_n[2]-nbase)};
+ for(j=2,k=0;k<3;j=k++)
+ {
+ if((idx[j]<ncount)&&(idx[k]<ncount))
+ {
+ const int ni=edges(idx[j],idx[k]);
+ if(ni>0)
+ {
+ appendFace(i);
+ const int l=(k+1)%3;
+ Face* pft[]={ &m_faces[i],
+ &m_faces[m_faces.size()-1]};
+ pft[0]->m_n[0]=&m_nodes[idx[l]];
+ pft[0]->m_n[1]=&m_nodes[idx[j]];
+ pft[0]->m_n[2]=&m_nodes[ni];
+ pft[1]->m_n[0]=&m_nodes[ni];
+ pft[1]->m_n[1]=&m_nodes[idx[k]];
+ pft[1]->m_n[2]=&m_nodes[idx[l]];
+ appendLink(ni,idx[l],pft[0]->m_material);
+ --i;break;
+ }
+ }
+ }
+ }
+ /* Cut */
+ if(cut)
+ {
+ btAlignedObjectArray<int> cnodes;
+ const int pcount=ncount;
+ int i;
+ ncount=m_nodes.size();
+ cnodes.resize(ncount,0);
+ /* Nodes */
+ for(i=0;i<ncount;++i)
+ {
+ const btVector3 x=m_nodes[i].m_x;
+ if((i>=pcount)||(btFabs(ifn->Eval(x))<accurary))
+ {
+ const btVector3 v=m_nodes[i].m_v;
+ btScalar m=getMass(i);
+ if(m>0) { m*=0.5;m_nodes[i].m_im/=0.5; }
+ appendNode(x,m);
+ cnodes[i]=m_nodes.size()-1;
+ m_nodes[cnodes[i]].m_v=v;
+ }
+ }
+ nbase=&m_nodes[0];
+ /* Links */
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ const int id[]={ int(m_links[i].m_n[0]-nbase),
+ int(m_links[i].m_n[1]-nbase)};
+ int todetach=0;
+ if(cnodes[id[0]]&&cnodes[id[1]])
+ {
+ appendLink(i);
+ todetach=m_links.size()-1;
+ }
+ else
+ {
+ if(( (ifn->Eval(m_nodes[id[0]].m_x)<accurary)&&
+ (ifn->Eval(m_nodes[id[1]].m_x)<accurary)))
+ todetach=i;
+ }
+ if(todetach)
+ {
+ Link& l=m_links[todetach];
+ for(int j=0;j<2;++j)
+ {
+ int cn=cnodes[int(l.m_n[j]-nbase)];
+ if(cn) l.m_n[j]=&m_nodes[cn];
+ }
+ }
+ }
+ /* Faces */
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ Node** n= m_faces[i].m_n;
+ if( (ifn->Eval(n[0]->m_x)<accurary)&&
+ (ifn->Eval(n[1]->m_x)<accurary)&&
+ (ifn->Eval(n[2]->m_x)<accurary))
+ {
+ for(int j=0;j<3;++j)
+ {
+ int cn=cnodes[int(n[j]-nbase)];
+ if(cn) n[j]=&m_nodes[cn];
+ }
+ }
+ }
+ /* Clean orphans */
+ int nnodes=m_nodes.size();
+ btAlignedObjectArray<int> ranks;
+ btAlignedObjectArray<int> todelete;
+ ranks.resize(nnodes,0);
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ for(int j=0;j<2;++j) ranks[int(m_links[i].m_n[j]-nbase)]++;
+ }
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ for(int j=0;j<3;++j) ranks[int(m_faces[i].m_n[j]-nbase)]++;
+ }
+ for(i=0;i<m_links.size();++i)
+ {
+ const int id[]={ int(m_links[i].m_n[0]-nbase),
+ int(m_links[i].m_n[1]-nbase)};
+ const bool sg[]={ ranks[id[0]]==1,
+ ranks[id[1]]==1};
+ if(sg[0]||sg[1])
+ {
+ --ranks[id[0]];
+ --ranks[id[1]];
+ btSwap(m_links[i],m_links[m_links.size()-1]);
+ m_links.pop_back();--i;
+ }
+ }
+#if 0
+ for(i=nnodes-1;i>=0;--i)
+ {
+ if(!ranks[i]) todelete.push_back(i);
+ }
+ if(todelete.size())
+ {
+ btAlignedObjectArray<int>& map=ranks;
+ for(int i=0;i<nnodes;++i) map[i]=i;
+ PointersToIndices(this);
+ for(int i=0,ni=todelete.size();i<ni;++i)
+ {
+ int j=todelete[i];
+ int& a=map[j];
+ int& b=map[--nnodes];
+ m_ndbvt.remove(m_nodes[a].m_leaf);m_nodes[a].m_leaf=0;
+ btSwap(m_nodes[a],m_nodes[b]);
+ j=a;a=b;b=j;
+ }
+ IndicesToPointers(this,&map[0]);
+ m_nodes.resize(nnodes);
+ }
+#endif
+ }
+ m_bUpdateRtCst=true;
+}
+
+//
+bool btSoftBody::cutLink(const Node* node0,const Node* node1,btScalar position)
+{
+ return(cutLink(int(node0-&m_nodes[0]),int(node1-&m_nodes[0]),position));
+}
+
+//
+bool btSoftBody::cutLink(int node0,int node1,btScalar position)
+{
+ bool done=false;
+ int i,ni;
+ const btVector3 d=m_nodes[node0].m_x-m_nodes[node1].m_x;
+ const btVector3 x=Lerp(m_nodes[node0].m_x,m_nodes[node1].m_x,position);
+ const btVector3 v=Lerp(m_nodes[node0].m_v,m_nodes[node1].m_v,position);
+ const btScalar m=1;
+ appendNode(x,m);
+ appendNode(x,m);
+ Node* pa=&m_nodes[node0];
+ Node* pb=&m_nodes[node1];
+ Node* pn[2]={ &m_nodes[m_nodes.size()-2],
+ &m_nodes[m_nodes.size()-1]};
+ pn[0]->m_v=v;
+ pn[1]->m_v=v;
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ const int mtch=MatchEdge(m_links[i].m_n[0],m_links[i].m_n[1],pa,pb);
+ if(mtch!=-1)
+ {
+ appendLink(i);
+ Link* pft[]={&m_links[i],&m_links[m_links.size()-1]};
+ pft[0]->m_n[1]=pn[mtch];
+ pft[1]->m_n[0]=pn[1-mtch];
+ done=true;
+ }
+ }
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ for(int k=2,l=0;l<3;k=l++)
+ {
+ const int mtch=MatchEdge(m_faces[i].m_n[k],m_faces[i].m_n[l],pa,pb);
+ if(mtch!=-1)
+ {
+ appendFace(i);
+ Face* pft[]={&m_faces[i],&m_faces[m_faces.size()-1]};
+ pft[0]->m_n[l]=pn[mtch];
+ pft[1]->m_n[k]=pn[1-mtch];
+ appendLink(pn[0],pft[0]->m_n[(l+1)%3],pft[0]->m_material,true);
+ appendLink(pn[1],pft[0]->m_n[(l+1)%3],pft[0]->m_material,true);
+ }
+ }
+ }
+ if(!done)
+ {
+ m_ndbvt.remove(pn[0]->m_leaf);
+ m_ndbvt.remove(pn[1]->m_leaf);
+ m_nodes.pop_back();
+ m_nodes.pop_back();
+ }
+ return(done);
+}
+
+//
+bool btSoftBody::rayTest(const btVector3& rayFrom,
+ const btVector3& rayTo,
+ sRayCast& results)
+{
+ if(m_faces.size()&&m_fdbvt.empty())
+ initializeFaceTree();
+
+ results.body = this;
+ results.fraction = 1.f;
+ results.feature = eFeature::None;
+ results.index = -1;
+
+ return(rayTest(rayFrom,rayTo,results.fraction,results.feature,results.index,false)!=0);
+}
+
+//
+void btSoftBody::setSolver(eSolverPresets::_ preset)
+{
+ m_cfg.m_vsequence.clear();
+ m_cfg.m_psequence.clear();
+ m_cfg.m_dsequence.clear();
+ switch(preset)
+ {
+ case eSolverPresets::Positions:
+ m_cfg.m_psequence.push_back(ePSolver::Anchors);
+ m_cfg.m_psequence.push_back(ePSolver::RContacts);
+ m_cfg.m_psequence.push_back(ePSolver::SContacts);
+ m_cfg.m_psequence.push_back(ePSolver::Linear);
+ break;
+ case eSolverPresets::Velocities:
+ m_cfg.m_vsequence.push_back(eVSolver::Linear);
+
+ m_cfg.m_psequence.push_back(ePSolver::Anchors);
+ m_cfg.m_psequence.push_back(ePSolver::RContacts);
+ m_cfg.m_psequence.push_back(ePSolver::SContacts);
+
+ m_cfg.m_dsequence.push_back(ePSolver::Linear);
+ break;
+ }
+}
+
+//
+void btSoftBody::predictMotion(btScalar dt)
+{
+
+ int i,ni;
+
+ /* Update */
+ if(m_bUpdateRtCst)
+ {
+ m_bUpdateRtCst=false;
+ updateConstants();
+ m_fdbvt.clear();
+ if(m_cfg.collisions&fCollision::VF_SS)
+ {
+ initializeFaceTree();
+ }
+ }
+
+ /* Prepare */
+ m_sst.sdt = dt*m_cfg.timescale;
+ m_sst.isdt = 1/m_sst.sdt;
+ m_sst.velmrg = m_sst.sdt*3;
+ m_sst.radmrg = getCollisionShape()->getMargin();
+ m_sst.updmrg = m_sst.radmrg*(btScalar)0.25;
+ /* Forces */
+ addVelocity(m_worldInfo->m_gravity*m_sst.sdt);
+ applyForces();
+ /* Integrate */
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ n.m_q = n.m_x;
+ n.m_v += n.m_f*n.m_im*m_sst.sdt;
+ n.m_x += n.m_v*m_sst.sdt;
+ n.m_f = btVector3(0,0,0);
+ }
+ /* Clusters */
+ updateClusters();
+ /* Bounds */
+ updateBounds();
+ /* Nodes */
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) vol;
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ vol = btDbvtVolume::FromCR(n.m_x,m_sst.radmrg);
+ m_ndbvt.update( n.m_leaf,
+ vol,
+ n.m_v*m_sst.velmrg,
+ m_sst.updmrg);
+ }
+ /* Faces */
+ if(!m_fdbvt.empty())
+ {
+ for(int i=0;i<m_faces.size();++i)
+ {
+ Face& f=m_faces[i];
+ const btVector3 v=( f.m_n[0]->m_v+
+ f.m_n[1]->m_v+
+ f.m_n[2]->m_v)/3;
+ vol = VolumeOf(f,m_sst.radmrg);
+ m_fdbvt.update( f.m_leaf,
+ vol,
+ v*m_sst.velmrg,
+ m_sst.updmrg);
+ }
+ }
+ /* Pose */
+ updatePose();
+ /* Match */
+ if(m_pose.m_bframe&&(m_cfg.kMT>0))
+ {
+ const btMatrix3x3 posetrs=m_pose.m_rot;
+ for(int i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ if(n.m_im>0)
+ {
+ const btVector3 x=posetrs*m_pose.m_pos[i]+m_pose.m_com;
+ n.m_x=Lerp(n.m_x,x,m_cfg.kMT);
+ }
+ }
+ }
+ /* Clear contacts */
+ m_rcontacts.resize(0);
+ m_scontacts.resize(0);
+ /* Optimize dbvt's */
+ m_ndbvt.optimizeIncremental(1);
+ m_fdbvt.optimizeIncremental(1);
+ m_cdbvt.optimizeIncremental(1);
+}
+
+//
+void btSoftBody::solveConstraints()
+{
+
+ /* Apply clusters */
+ applyClusters(false);
+ /* Prepare links */
+
+ int i,ni;
+
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ Link& l=m_links[i];
+ l.m_c3 = l.m_n[1]->m_q-l.m_n[0]->m_q;
+ l.m_c2 = 1/(l.m_c3.length2()*l.m_c0);
+ }
+ /* Prepare anchors */
+ for(i=0,ni=m_anchors.size();i<ni;++i)
+ {
+ Anchor& a=m_anchors[i];
+ const btVector3 ra=a.m_body->getWorldTransform().getBasis()*a.m_local;
+ a.m_c0 = ImpulseMatrix( m_sst.sdt,
+ a.m_node->m_im,
+ a.m_body->getInvMass(),
+ a.m_body->getInvInertiaTensorWorld(),
+ ra);
+ a.m_c1 = ra;
+ a.m_c2 = m_sst.sdt*a.m_node->m_im;
+ a.m_body->activate();
+ }
+ /* Solve velocities */
+ if(m_cfg.viterations>0)
+ {
+ /* Solve */
+ for(int isolve=0;isolve<m_cfg.viterations;++isolve)
+ {
+ for(int iseq=0;iseq<m_cfg.m_vsequence.size();++iseq)
+ {
+ getSolver(m_cfg.m_vsequence[iseq])(this,1);
+ }
+ }
+ /* Update */
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ n.m_x = n.m_q+n.m_v*m_sst.sdt;
+ }
+ }
+ /* Solve positions */
+ if(m_cfg.piterations>0)
+ {
+ for(int isolve=0;isolve<m_cfg.piterations;++isolve)
+ {
+ const btScalar ti=isolve/(btScalar)m_cfg.piterations;
+ for(int iseq=0;iseq<m_cfg.m_psequence.size();++iseq)
+ {
+ getSolver(m_cfg.m_psequence[iseq])(this,1,ti);
+ }
+ }
+ const btScalar vc=m_sst.isdt*(1-m_cfg.kDP);
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ n.m_v = (n.m_x-n.m_q)*vc;
+ n.m_f = btVector3(0,0,0);
+ }
+ }
+ /* Solve drift */
+ if(m_cfg.diterations>0)
+ {
+ const btScalar vcf=m_cfg.kVCF*m_sst.isdt;
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ n.m_q = n.m_x;
+ }
+ for(int idrift=0;idrift<m_cfg.diterations;++idrift)
+ {
+ for(int iseq=0;iseq<m_cfg.m_dsequence.size();++iseq)
+ {
+ getSolver(m_cfg.m_dsequence[iseq])(this,1,0);
+ }
+ }
+ for(int i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ Node& n=m_nodes[i];
+ n.m_v += (n.m_x-n.m_q)*vcf;
+ }
+ }
+ /* Apply clusters */
+ dampClusters();
+ applyClusters(true);
+}
+
+//
+void btSoftBody::staticSolve(int iterations)
+{
+ for(int isolve=0;isolve<iterations;++isolve)
+ {
+ for(int iseq=0;iseq<m_cfg.m_psequence.size();++iseq)
+ {
+ getSolver(m_cfg.m_psequence[iseq])(this,1,0);
+ }
+ }
+}
+
+//
+void btSoftBody::solveCommonConstraints(btSoftBody** /*bodies*/,int /*count*/,int /*iterations*/)
+{
+ /// placeholder
+}
+
+//
+void btSoftBody::solveClusters(const btAlignedObjectArray<btSoftBody*>& bodies)
+{
+ const int nb=bodies.size();
+ int iterations=0;
+ int i;
+
+ for(i=0;i<nb;++i)
+ {
+ iterations=btMax(iterations,bodies[i]->m_cfg.citerations);
+ }
+ for(i=0;i<nb;++i)
+ {
+ bodies[i]->prepareClusters(iterations);
+ }
+ for(i=0;i<iterations;++i)
+ {
+ const btScalar sor=1;
+ for(int j=0;j<nb;++j)
+ {
+ bodies[j]->solveClusters(sor);
+ }
+ }
+ for(i=0;i<nb;++i)
+ {
+ bodies[i]->cleanupClusters();
+ }
+}
+
+//
+void btSoftBody::integrateMotion()
+{
+ /* Update */
+ updateNormals();
+}
+
+//
+btSoftBody::RayFromToCaster::RayFromToCaster(const btVector3& rayFrom,const btVector3& rayTo,btScalar mxt)
+{
+ m_rayFrom = rayFrom;
+ m_rayNormalizedDirection = (rayTo-rayFrom);
+ m_rayTo = rayTo;
+ m_mint = mxt;
+ m_face = 0;
+ m_tests = 0;
+}
+
+//
+void btSoftBody::RayFromToCaster::Process(const btDbvtNode* leaf)
+{
+ btSoftBody::Face& f=*(btSoftBody::Face*)leaf->data;
+ const btScalar t=rayFromToTriangle( m_rayFrom,m_rayTo,m_rayNormalizedDirection,
+ f.m_n[0]->m_x,
+ f.m_n[1]->m_x,
+ f.m_n[2]->m_x,
+ m_mint);
+ if((t>0)&&(t<m_mint))
+ {
+ m_mint=t;m_face=&f;
+ }
+ ++m_tests;
+}
+
+//
+btScalar btSoftBody::RayFromToCaster::rayFromToTriangle( const btVector3& rayFrom,
+ const btVector3& rayTo,
+ const btVector3& rayNormalizedDirection,
+ const btVector3& a,
+ const btVector3& b,
+ const btVector3& c,
+ btScalar maxt)
+{
+ static const btScalar ceps=-SIMD_EPSILON*10;
+ static const btScalar teps=SIMD_EPSILON*10;
+
+ const btVector3 n=btCross(b-a,c-a);
+ const btScalar d=btDot(a,n);
+ const btScalar den=btDot(rayNormalizedDirection,n);
+ if(!btFuzzyZero(den))
+ {
+ const btScalar num=btDot(rayFrom,n)-d;
+ const btScalar t=-num/den;
+ if((t>teps)&&(t<maxt))
+ {
+ const btVector3 hit=rayFrom+rayNormalizedDirection*t;
+ if( (btDot(n,btCross(a-hit,b-hit))>ceps) &&
+ (btDot(n,btCross(b-hit,c-hit))>ceps) &&
+ (btDot(n,btCross(c-hit,a-hit))>ceps))
+ {
+ return(t);
+ }
+ }
+ }
+ return(-1);
+}
+
+//
+void btSoftBody::pointersToIndices()
+{
+#define PTR2IDX(_p_,_b_) reinterpret_cast<btSoftBody::Node*>((_p_)-(_b_))
+ btSoftBody::Node* base=&m_nodes[0];
+ int i,ni;
+
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ if(m_nodes[i].m_leaf)
+ {
+ m_nodes[i].m_leaf->data=*(void**)&i;
+ }
+ }
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ m_links[i].m_n[0]=PTR2IDX(m_links[i].m_n[0],base);
+ m_links[i].m_n[1]=PTR2IDX(m_links[i].m_n[1],base);
+ }
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ m_faces[i].m_n[0]=PTR2IDX(m_faces[i].m_n[0],base);
+ m_faces[i].m_n[1]=PTR2IDX(m_faces[i].m_n[1],base);
+ m_faces[i].m_n[2]=PTR2IDX(m_faces[i].m_n[2],base);
+ if(m_faces[i].m_leaf)
+ {
+ m_faces[i].m_leaf->data=*(void**)&i;
+ }
+ }
+ for(i=0,ni=m_anchors.size();i<ni;++i)
+ {
+ m_anchors[i].m_node=PTR2IDX(m_anchors[i].m_node,base);
+ }
+ for(i=0,ni=m_notes.size();i<ni;++i)
+ {
+ for(int j=0;j<m_notes[i].m_rank;++j)
+ {
+ m_notes[i].m_nodes[j]=PTR2IDX(m_notes[i].m_nodes[j],base);
+ }
+ }
+#undef PTR2IDX
+}
+
+//
+void btSoftBody::indicesToPointers(const int* map)
+{
+#define IDX2PTR(_p_,_b_) map?(&(_b_)[map[(((char*)_p_)-(char*)0)]]): \
+ (&(_b_)[(((char*)_p_)-(char*)0)])
+ btSoftBody::Node* base=&m_nodes[0];
+ int i,ni;
+
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ if(m_nodes[i].m_leaf)
+ {
+ m_nodes[i].m_leaf->data=&m_nodes[i];
+ }
+ }
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ m_links[i].m_n[0]=IDX2PTR(m_links[i].m_n[0],base);
+ m_links[i].m_n[1]=IDX2PTR(m_links[i].m_n[1],base);
+ }
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ m_faces[i].m_n[0]=IDX2PTR(m_faces[i].m_n[0],base);
+ m_faces[i].m_n[1]=IDX2PTR(m_faces[i].m_n[1],base);
+ m_faces[i].m_n[2]=IDX2PTR(m_faces[i].m_n[2],base);
+ if(m_faces[i].m_leaf)
+ {
+ m_faces[i].m_leaf->data=&m_faces[i];
+ }
+ }
+ for(i=0,ni=m_anchors.size();i<ni;++i)
+ {
+ m_anchors[i].m_node=IDX2PTR(m_anchors[i].m_node,base);
+ }
+ for(i=0,ni=m_notes.size();i<ni;++i)
+ {
+ for(int j=0;j<m_notes[i].m_rank;++j)
+ {
+ m_notes[i].m_nodes[j]=IDX2PTR(m_notes[i].m_nodes[j],base);
+ }
+ }
+#undef IDX2PTR
+}
+
+//
+int btSoftBody::rayTest(const btVector3& rayFrom,const btVector3& rayTo,
+ btScalar& mint,eFeature::_& feature,int& index,bool bcountonly) const
+{
+ int cnt=0;
+ if(bcountonly||m_fdbvt.empty())
+ {/* Full search */
+ btVector3 dir = rayTo-rayFrom;
+ dir.normalize();
+
+ for(int i=0,ni=m_faces.size();i<ni;++i)
+ {
+ const btSoftBody::Face& f=m_faces[i];
+
+ const btScalar t=RayFromToCaster::rayFromToTriangle( rayFrom,rayTo,dir,
+ f.m_n[0]->m_x,
+ f.m_n[1]->m_x,
+ f.m_n[2]->m_x,
+ mint);
+ if(t>0)
+ {
+ ++cnt;
+ if(!bcountonly)
+ {
+ feature=btSoftBody::eFeature::Face;
+ index=i;
+ mint=t;
+ }
+ }
+ }
+ }
+ else
+ {/* Use dbvt */
+ RayFromToCaster collider(rayFrom,rayTo,mint);
+
+ btDbvt::rayTest(m_fdbvt.m_root,rayFrom,rayTo,collider);
+ if(collider.m_face)
+ {
+ mint=collider.m_mint;
+ feature=btSoftBody::eFeature::Face;
+ index=(int)(collider.m_face-&m_faces[0]);
+ cnt=1;
+ }
+ }
+ return(cnt);
+}
+
+//
+void btSoftBody::initializeFaceTree()
+{
+ m_fdbvt.clear();
+ for(int i=0;i<m_faces.size();++i)
+ {
+ Face& f=m_faces[i];
+ f.m_leaf=m_fdbvt.insert(VolumeOf(f,0),&f);
+ }
+}
+
+//
+btVector3 btSoftBody::evaluateCom() const
+{
+ btVector3 com(0,0,0);
+ if(m_pose.m_bframe)
+ {
+ for(int i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ com+=m_nodes[i].m_x*m_pose.m_wgh[i];
+ }
+ }
+ return(com);
+}
+
+//
+bool btSoftBody::checkContact( btCollisionObject* colObj,
+ const btVector3& x,
+ btScalar margin,
+ btSoftBody::sCti& cti) const
+{
+ btVector3 nrm;
+ btCollisionShape *shp = colObj->getCollisionShape();
+ btRigidBody *tmpRigid = btRigidBody::upcast(colObj);
+ const btTransform &wtr = tmpRigid ? tmpRigid->getWorldTransform() : colObj->getWorldTransform();
+ btScalar dst =
+ m_worldInfo->m_sparsesdf.Evaluate(
+ wtr.invXform(x),
+ shp,
+ nrm,
+ margin);
+ if(dst<0)
+ {
+ cti.m_colObj = colObj;
+ cti.m_normal = wtr.getBasis()*nrm;
+ cti.m_offset = -btDot( cti.m_normal, x - cti.m_normal * dst );
+ return(true);
+ }
+ return(false);
+}
+
+//
+void btSoftBody::updateNormals()
+{
+
+ const btVector3 zv(0,0,0);
+ int i,ni;
+
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ m_nodes[i].m_n=zv;
+ }
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ btSoftBody::Face& f=m_faces[i];
+ const btVector3 n=btCross(f.m_n[1]->m_x-f.m_n[0]->m_x,
+ f.m_n[2]->m_x-f.m_n[0]->m_x);
+ f.m_normal=n.normalized();
+ f.m_n[0]->m_n+=n;
+ f.m_n[1]->m_n+=n;
+ f.m_n[2]->m_n+=n;
+ }
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ btScalar len = m_nodes[i].m_n.length();
+ if (len>SIMD_EPSILON)
+ m_nodes[i].m_n /= len;
+ }
+}
+
+//
+void btSoftBody::updateBounds()
+{
+ /*if( m_acceleratedSoftBody )
+ {
+ // If we have an accelerated softbody we need to obtain the bounds correctly
+ // For now (slightly hackily) just have a very large AABB
+ // TODO: Write get bounds kernel
+ // If that is updating in place, atomic collisions might be low (when the cloth isn't perfectly aligned to an axis) and we could
+ // probably do a test and exchange reasonably efficiently.
+
+ m_bounds[0] = btVector3(-1000, -1000, -1000);
+ m_bounds[1] = btVector3(1000, 1000, 1000);
+
+ } else {*/
+ if(m_ndbvt.m_root)
+ {
+ const btVector3& mins=m_ndbvt.m_root->volume.Mins();
+ const btVector3& maxs=m_ndbvt.m_root->volume.Maxs();
+ const btScalar csm=getCollisionShape()->getMargin();
+ const btVector3 mrg=btVector3( csm,
+ csm,
+ csm)*1; // ??? to investigate...
+ m_bounds[0]=mins-mrg;
+ m_bounds[1]=maxs+mrg;
+ if(0!=getBroadphaseHandle())
+ {
+ m_worldInfo->m_broadphase->setAabb( getBroadphaseHandle(),
+ m_bounds[0],
+ m_bounds[1],
+ m_worldInfo->m_dispatcher);
+ }
+ }
+ else
+ {
+ m_bounds[0]=
+ m_bounds[1]=btVector3(0,0,0);
+ }
+ //}
+}
+
+
+//
+void btSoftBody::updatePose()
+{
+ if(m_pose.m_bframe)
+ {
+ btSoftBody::Pose& pose=m_pose;
+ const btVector3 com=evaluateCom();
+ /* Com */
+ pose.m_com = com;
+ /* Rotation */
+ btMatrix3x3 Apq;
+ const btScalar eps=SIMD_EPSILON;
+ Apq[0]=Apq[1]=Apq[2]=btVector3(0,0,0);
+ Apq[0].setX(eps);Apq[1].setY(eps*2);Apq[2].setZ(eps*3);
+ for(int i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ const btVector3 a=pose.m_wgh[i]*(m_nodes[i].m_x-com);
+ const btVector3& b=pose.m_pos[i];
+ Apq[0]+=a.x()*b;
+ Apq[1]+=a.y()*b;
+ Apq[2]+=a.z()*b;
+ }
+ btMatrix3x3 r,s;
+ PolarDecompose(Apq,r,s);
+ pose.m_rot=r;
+ pose.m_scl=pose.m_aqq*r.transpose()*Apq;
+ if(m_cfg.maxvolume>1)
+ {
+ const btScalar idet=Clamp<btScalar>( 1/pose.m_scl.determinant(),
+ 1,m_cfg.maxvolume);
+ pose.m_scl=Mul(pose.m_scl,idet);
+ }
+
+ }
+}
+
+//
+void btSoftBody::updateConstants()
+{
+ int i,ni;
+
+ /* Links */
+ for(i=0,ni=m_links.size();i<ni;++i)
+ {
+ Link& l=m_links[i];
+ Material& m=*l.m_material;
+ l.m_rl = (l.m_n[0]->m_x-l.m_n[1]->m_x).length();
+ l.m_c0 = (l.m_n[0]->m_im+l.m_n[1]->m_im)/m.m_kLST;
+ l.m_c1 = l.m_rl*l.m_rl;
+ }
+ /* Faces */
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ Face& f=m_faces[i];
+ f.m_ra = AreaOf(f.m_n[0]->m_x,f.m_n[1]->m_x,f.m_n[2]->m_x);
+ }
+ /* Area's */
+ btAlignedObjectArray<int> counts;
+ counts.resize(m_nodes.size(),0);
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ m_nodes[i].m_area = 0;
+ }
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ btSoftBody::Face& f=m_faces[i];
+ for(int j=0;j<3;++j)
+ {
+ const int index=(int)(f.m_n[j]-&m_nodes[0]);
+ counts[index]++;
+ f.m_n[j]->m_area+=btFabs(f.m_ra);
+ }
+ }
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ if(counts[i]>0)
+ m_nodes[i].m_area/=(btScalar)counts[i];
+ else
+ m_nodes[i].m_area=0;
+ }
+}
+
+//
+void btSoftBody::initializeClusters()
+{
+ int i;
+
+ for( i=0;i<m_clusters.size();++i)
+ {
+ Cluster& c=*m_clusters[i];
+ c.m_imass=0;
+ c.m_masses.resize(c.m_nodes.size());
+ for(int j=0;j<c.m_nodes.size();++j)
+ {
+ if (c.m_nodes[j]->m_im==0)
+ {
+ c.m_containsAnchor = true;
+ c.m_masses[j] = BT_LARGE_FLOAT;
+ } else
+ {
+ c.m_masses[j] = btScalar(1.)/c.m_nodes[j]->m_im;
+ }
+ c.m_imass += c.m_masses[j];
+ }
+ c.m_imass = btScalar(1.)/c.m_imass;
+ c.m_com = btSoftBody::clusterCom(&c);
+ c.m_lv = btVector3(0,0,0);
+ c.m_av = btVector3(0,0,0);
+ c.m_leaf = 0;
+ /* Inertia */
+ btMatrix3x3& ii=c.m_locii;
+ ii[0]=ii[1]=ii[2]=btVector3(0,0,0);
+ {
+ int i,ni;
+
+ for(i=0,ni=c.m_nodes.size();i<ni;++i)
+ {
+ const btVector3 k=c.m_nodes[i]->m_x-c.m_com;
+ const btVector3 q=k*k;
+ const btScalar m=c.m_masses[i];
+ ii[0][0] += m*(q[1]+q[2]);
+ ii[1][1] += m*(q[0]+q[2]);
+ ii[2][2] += m*(q[0]+q[1]);
+ ii[0][1] -= m*k[0]*k[1];
+ ii[0][2] -= m*k[0]*k[2];
+ ii[1][2] -= m*k[1]*k[2];
+ }
+ }
+ ii[1][0]=ii[0][1];
+ ii[2][0]=ii[0][2];
+ ii[2][1]=ii[1][2];
+
+ ii = ii.inverse();
+
+ /* Frame */
+ c.m_framexform.setIdentity();
+ c.m_framexform.setOrigin(c.m_com);
+ c.m_framerefs.resize(c.m_nodes.size());
+ {
+ int i;
+ for(i=0;i<c.m_framerefs.size();++i)
+ {
+ c.m_framerefs[i]=c.m_nodes[i]->m_x-c.m_com;
+ }
+ }
+ }
+}
+
+//
+void btSoftBody::updateClusters()
+{
+ BT_PROFILE("UpdateClusters");
+ int i;
+
+ for(i=0;i<m_clusters.size();++i)
+ {
+ btSoftBody::Cluster& c=*m_clusters[i];
+ const int n=c.m_nodes.size();
+ //const btScalar invn=1/(btScalar)n;
+ if(n)
+ {
+ /* Frame */
+ const btScalar eps=btScalar(0.0001);
+ btMatrix3x3 m,r,s;
+ m[0]=m[1]=m[2]=btVector3(0,0,0);
+ m[0][0]=eps*1;
+ m[1][1]=eps*2;
+ m[2][2]=eps*3;
+ c.m_com=clusterCom(&c);
+ for(int i=0;i<c.m_nodes.size();++i)
+ {
+ const btVector3 a=c.m_nodes[i]->m_x-c.m_com;
+ const btVector3& b=c.m_framerefs[i];
+ m[0]+=a[0]*b;m[1]+=a[1]*b;m[2]+=a[2]*b;
+ }
+ PolarDecompose(m,r,s);
+ c.m_framexform.setOrigin(c.m_com);
+ c.m_framexform.setBasis(r);
+ /* Inertia */
+#if 1/* Constant */
+ c.m_invwi=c.m_framexform.getBasis()*c.m_locii*c.m_framexform.getBasis().transpose();
+#else
+#if 0/* Sphere */
+ const btScalar rk=(2*c.m_extents.length2())/(5*c.m_imass);
+ const btVector3 inertia(rk,rk,rk);
+ const btVector3 iin(btFabs(inertia[0])>SIMD_EPSILON?1/inertia[0]:0,
+ btFabs(inertia[1])>SIMD_EPSILON?1/inertia[1]:0,
+ btFabs(inertia[2])>SIMD_EPSILON?1/inertia[2]:0);
+
+ c.m_invwi=c.m_xform.getBasis().scaled(iin)*c.m_xform.getBasis().transpose();
+#else/* Actual */
+ c.m_invwi[0]=c.m_invwi[1]=c.m_invwi[2]=btVector3(0,0,0);
+ for(int i=0;i<n;++i)
+ {
+ const btVector3 k=c.m_nodes[i]->m_x-c.m_com;
+ const btVector3 q=k*k;
+ const btScalar m=1/c.m_nodes[i]->m_im;
+ c.m_invwi[0][0] += m*(q[1]+q[2]);
+ c.m_invwi[1][1] += m*(q[0]+q[2]);
+ c.m_invwi[2][2] += m*(q[0]+q[1]);
+ c.m_invwi[0][1] -= m*k[0]*k[1];
+ c.m_invwi[0][2] -= m*k[0]*k[2];
+ c.m_invwi[1][2] -= m*k[1]*k[2];
+ }
+ c.m_invwi[1][0]=c.m_invwi[0][1];
+ c.m_invwi[2][0]=c.m_invwi[0][2];
+ c.m_invwi[2][1]=c.m_invwi[1][2];
+ c.m_invwi=c.m_invwi.inverse();
+#endif
+#endif
+ /* Velocities */
+ c.m_lv=btVector3(0,0,0);
+ c.m_av=btVector3(0,0,0);
+ {
+ int i;
+
+ for(i=0;i<n;++i)
+ {
+ const btVector3 v=c.m_nodes[i]->m_v*c.m_masses[i];
+ c.m_lv += v;
+ c.m_av += btCross(c.m_nodes[i]->m_x-c.m_com,v);
+ }
+ }
+ c.m_lv=c.m_imass*c.m_lv*(1-c.m_ldamping);
+ c.m_av=c.m_invwi*c.m_av*(1-c.m_adamping);
+ c.m_vimpulses[0] =
+ c.m_vimpulses[1] = btVector3(0,0,0);
+ c.m_dimpulses[0] =
+ c.m_dimpulses[1] = btVector3(0,0,0);
+ c.m_nvimpulses = 0;
+ c.m_ndimpulses = 0;
+ /* Matching */
+ if(c.m_matching>0)
+ {
+ for(int j=0;j<c.m_nodes.size();++j)
+ {
+ Node& n=*c.m_nodes[j];
+ const btVector3 x=c.m_framexform*c.m_framerefs[j];
+ n.m_x=Lerp(n.m_x,x,c.m_matching);
+ }
+ }
+ /* Dbvt */
+ if(c.m_collide)
+ {
+ btVector3 mi=c.m_nodes[0]->m_x;
+ btVector3 mx=mi;
+ for(int j=1;j<n;++j)
+ {
+ mi.setMin(c.m_nodes[j]->m_x);
+ mx.setMax(c.m_nodes[j]->m_x);
+ }
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds=btDbvtVolume::FromMM(mi,mx);
+ if(c.m_leaf)
+ m_cdbvt.update(c.m_leaf,bounds,c.m_lv*m_sst.sdt*3,m_sst.radmrg);
+ else
+ c.m_leaf=m_cdbvt.insert(bounds,&c);
+ }
+ }
+ }
+
+
+}
+
+
+
+
+//
+void btSoftBody::cleanupClusters()
+{
+ for(int i=0;i<m_joints.size();++i)
+ {
+ m_joints[i]->Terminate(m_sst.sdt);
+ if(m_joints[i]->m_delete)
+ {
+ btAlignedFree(m_joints[i]);
+ m_joints.remove(m_joints[i--]);
+ }
+ }
+}
+
+//
+void btSoftBody::prepareClusters(int iterations)
+{
+ for(int i=0;i<m_joints.size();++i)
+ {
+ m_joints[i]->Prepare(m_sst.sdt,iterations);
+ }
+}
+
+
+//
+void btSoftBody::solveClusters(btScalar sor)
+{
+ for(int i=0,ni=m_joints.size();i<ni;++i)
+ {
+ m_joints[i]->Solve(m_sst.sdt,sor);
+ }
+}
+
+//
+void btSoftBody::applyClusters(bool drift)
+{
+ BT_PROFILE("ApplyClusters");
+// const btScalar f0=m_sst.sdt;
+ //const btScalar f1=f0/2;
+ btAlignedObjectArray<btVector3> deltas;
+ btAlignedObjectArray<btScalar> weights;
+ deltas.resize(m_nodes.size(),btVector3(0,0,0));
+ weights.resize(m_nodes.size(),0);
+ int i;
+
+ if(drift)
+ {
+ for(i=0;i<m_clusters.size();++i)
+ {
+ Cluster& c=*m_clusters[i];
+ if(c.m_ndimpulses)
+ {
+ c.m_dimpulses[0]/=(btScalar)c.m_ndimpulses;
+ c.m_dimpulses[1]/=(btScalar)c.m_ndimpulses;
+ }
+ }
+ }
+
+ for(i=0;i<m_clusters.size();++i)
+ {
+ Cluster& c=*m_clusters[i];
+ if(0<(drift?c.m_ndimpulses:c.m_nvimpulses))
+ {
+ const btVector3 v=(drift?c.m_dimpulses[0]:c.m_vimpulses[0])*m_sst.sdt;
+ const btVector3 w=(drift?c.m_dimpulses[1]:c.m_vimpulses[1])*m_sst.sdt;
+ for(int j=0;j<c.m_nodes.size();++j)
+ {
+ const int idx=int(c.m_nodes[j]-&m_nodes[0]);
+ const btVector3& x=c.m_nodes[j]->m_x;
+ const btScalar q=c.m_masses[j];
+ deltas[idx] += (v+btCross(w,x-c.m_com))*q;
+ weights[idx] += q;
+ }
+ }
+ }
+ for(i=0;i<deltas.size();++i)
+ {
+ if(weights[i]>0)
+ {
+ m_nodes[i].m_x+=deltas[i]/weights[i];
+ }
+ }
+}
+
+//
+void btSoftBody::dampClusters()
+{
+ int i;
+
+ for(i=0;i<m_clusters.size();++i)
+ {
+ Cluster& c=*m_clusters[i];
+ if(c.m_ndamping>0)
+ {
+ for(int j=0;j<c.m_nodes.size();++j)
+ {
+ Node& n=*c.m_nodes[j];
+ if(n.m_im>0)
+ {
+ const btVector3 vx=c.m_lv+btCross(c.m_av,c.m_nodes[j]->m_q-c.m_com);
+ if(vx.length2()<=n.m_v.length2())
+ {
+ n.m_v += c.m_ndamping*(vx-n.m_v);
+ }
+ }
+ }
+ }
+ }
+}
+
+//
+void btSoftBody::Joint::Prepare(btScalar dt,int)
+{
+ m_bodies[0].activate();
+ m_bodies[1].activate();
+}
+
+//
+void btSoftBody::LJoint::Prepare(btScalar dt,int iterations)
+{
+ static const btScalar maxdrift=4;
+ Joint::Prepare(dt,iterations);
+ m_rpos[0] = m_bodies[0].xform()*m_refs[0];
+ m_rpos[1] = m_bodies[1].xform()*m_refs[1];
+ m_drift = Clamp(m_rpos[0]-m_rpos[1],maxdrift)*m_erp/dt;
+ m_rpos[0] -= m_bodies[0].xform().getOrigin();
+ m_rpos[1] -= m_bodies[1].xform().getOrigin();
+ m_massmatrix = ImpulseMatrix( m_bodies[0].invMass(),m_bodies[0].invWorldInertia(),m_rpos[0],
+ m_bodies[1].invMass(),m_bodies[1].invWorldInertia(),m_rpos[1]);
+ if(m_split>0)
+ {
+ m_sdrift = m_massmatrix*(m_drift*m_split);
+ m_drift *= 1-m_split;
+ }
+ m_drift /=(btScalar)iterations;
+}
+
+//
+void btSoftBody::LJoint::Solve(btScalar dt,btScalar sor)
+{
+ const btVector3 va=m_bodies[0].velocity(m_rpos[0]);
+ const btVector3 vb=m_bodies[1].velocity(m_rpos[1]);
+ const btVector3 vr=va-vb;
+ btSoftBody::Impulse impulse;
+ impulse.m_asVelocity = 1;
+ impulse.m_velocity = m_massmatrix*(m_drift+vr*m_cfm)*sor;
+ m_bodies[0].applyImpulse(-impulse,m_rpos[0]);
+ m_bodies[1].applyImpulse( impulse,m_rpos[1]);
+}
+
+//
+void btSoftBody::LJoint::Terminate(btScalar dt)
+{
+ if(m_split>0)
+ {
+ m_bodies[0].applyDImpulse(-m_sdrift,m_rpos[0]);
+ m_bodies[1].applyDImpulse( m_sdrift,m_rpos[1]);
+ }
+}
+
+//
+void btSoftBody::AJoint::Prepare(btScalar dt,int iterations)
+{
+ static const btScalar maxdrift=SIMD_PI/16;
+ m_icontrol->Prepare(this);
+ Joint::Prepare(dt,iterations);
+ m_axis[0] = m_bodies[0].xform().getBasis()*m_refs[0];
+ m_axis[1] = m_bodies[1].xform().getBasis()*m_refs[1];
+ m_drift = NormalizeAny(btCross(m_axis[1],m_axis[0]));
+ m_drift *= btMin(maxdrift,btAcos(Clamp<btScalar>(btDot(m_axis[0],m_axis[1]),-1,+1)));
+ m_drift *= m_erp/dt;
+ m_massmatrix= AngularImpulseMatrix(m_bodies[0].invWorldInertia(),m_bodies[1].invWorldInertia());
+ if(m_split>0)
+ {
+ m_sdrift = m_massmatrix*(m_drift*m_split);
+ m_drift *= 1-m_split;
+ }
+ m_drift /=(btScalar)iterations;
+}
+
+//
+void btSoftBody::AJoint::Solve(btScalar dt,btScalar sor)
+{
+ const btVector3 va=m_bodies[0].angularVelocity();
+ const btVector3 vb=m_bodies[1].angularVelocity();
+ const btVector3 vr=va-vb;
+ const btScalar sp=btDot(vr,m_axis[0]);
+ const btVector3 vc=vr-m_axis[0]*m_icontrol->Speed(this,sp);
+ btSoftBody::Impulse impulse;
+ impulse.m_asVelocity = 1;
+ impulse.m_velocity = m_massmatrix*(m_drift+vc*m_cfm)*sor;
+ m_bodies[0].applyAImpulse(-impulse);
+ m_bodies[1].applyAImpulse( impulse);
+}
+
+//
+void btSoftBody::AJoint::Terminate(btScalar dt)
+{
+ if(m_split>0)
+ {
+ m_bodies[0].applyDAImpulse(-m_sdrift);
+ m_bodies[1].applyDAImpulse( m_sdrift);
+ }
+}
+
+//
+void btSoftBody::CJoint::Prepare(btScalar dt,int iterations)
+{
+ Joint::Prepare(dt,iterations);
+ const bool dodrift=(m_life==0);
+ m_delete=(++m_life)>m_maxlife;
+ if(dodrift)
+ {
+ m_drift=m_drift*m_erp/dt;
+ if(m_split>0)
+ {
+ m_sdrift = m_massmatrix*(m_drift*m_split);
+ m_drift *= 1-m_split;
+ }
+ m_drift/=(btScalar)iterations;
+ }
+ else
+ {
+ m_drift=m_sdrift=btVector3(0,0,0);
+ }
+}
+
+//
+void btSoftBody::CJoint::Solve(btScalar dt,btScalar sor)
+{
+ const btVector3 va=m_bodies[0].velocity(m_rpos[0]);
+ const btVector3 vb=m_bodies[1].velocity(m_rpos[1]);
+ const btVector3 vrel=va-vb;
+ const btScalar rvac=btDot(vrel,m_normal);
+ btSoftBody::Impulse impulse;
+ impulse.m_asVelocity = 1;
+ impulse.m_velocity = m_drift;
+ if(rvac<0)
+ {
+ const btVector3 iv=m_normal*rvac;
+ const btVector3 fv=vrel-iv;
+ impulse.m_velocity += iv+fv*m_friction;
+ }
+ impulse.m_velocity=m_massmatrix*impulse.m_velocity*sor;
+
+ if (m_bodies[0].m_soft==m_bodies[1].m_soft)
+ {
+ if ((impulse.m_velocity.getX() ==impulse.m_velocity.getX())&&(impulse.m_velocity.getY() ==impulse.m_velocity.getY())&&
+ (impulse.m_velocity.getZ() ==impulse.m_velocity.getZ()))
+ {
+ if (impulse.m_asVelocity)
+ {
+ if (impulse.m_velocity.length() <m_bodies[0].m_soft->m_maxSelfCollisionImpulse)
+ {
+
+ } else
+ {
+ m_bodies[0].applyImpulse(-impulse*m_bodies[0].m_soft->m_selfCollisionImpulseFactor,m_rpos[0]);
+ m_bodies[1].applyImpulse( impulse*m_bodies[0].m_soft->m_selfCollisionImpulseFactor,m_rpos[1]);
+ }
+ }
+ }
+ } else
+ {
+ m_bodies[0].applyImpulse(-impulse,m_rpos[0]);
+ m_bodies[1].applyImpulse( impulse,m_rpos[1]);
+ }
+}
+
+//
+void btSoftBody::CJoint::Terminate(btScalar dt)
+{
+ if(m_split>0)
+ {
+ m_bodies[0].applyDImpulse(-m_sdrift,m_rpos[0]);
+ m_bodies[1].applyDImpulse( m_sdrift,m_rpos[1]);
+ }
+}
+
+//
+void btSoftBody::applyForces()
+{
+
+ BT_PROFILE("SoftBody applyForces");
+ const btScalar dt = m_sst.sdt;
+ const btScalar kLF = m_cfg.kLF;
+ const btScalar kDG = m_cfg.kDG;
+ const btScalar kPR = m_cfg.kPR;
+ const btScalar kVC = m_cfg.kVC;
+ const bool as_lift = kLF>0;
+ const bool as_drag = kDG>0;
+ const bool as_pressure = kPR!=0;
+ const bool as_volume = kVC>0;
+ const bool as_aero = as_lift ||
+ as_drag ;
+ const bool as_vaero = as_aero &&
+ (m_cfg.aeromodel < btSoftBody::eAeroModel::F_TwoSided);
+ const bool as_faero = as_aero &&
+ (m_cfg.aeromodel >= btSoftBody::eAeroModel::F_TwoSided);
+ const bool use_medium = as_aero;
+ const bool use_volume = as_pressure ||
+ as_volume ;
+ btScalar volume = 0;
+ btScalar ivolumetp = 0;
+ btScalar dvolumetv = 0;
+ btSoftBody::sMedium medium;
+ if(use_volume)
+ {
+ volume = getVolume();
+ ivolumetp = 1/btFabs(volume)*kPR;
+ dvolumetv = (m_pose.m_volume-volume)*kVC;
+ }
+ /* Per vertex forces */
+ int i,ni;
+
+ for(i=0,ni=m_nodes.size();i<ni;++i)
+ {
+ btSoftBody::Node& n=m_nodes[i];
+ if(n.m_im>0)
+ {
+ if(use_medium)
+ {
+ EvaluateMedium(m_worldInfo, n.m_x, medium);
+ medium.m_velocity = m_windVelocity;
+ medium.m_density = m_worldInfo->air_density;
+
+ /* Aerodynamics */
+ if(as_vaero)
+ {
+ const btVector3 rel_v = n.m_v - medium.m_velocity;
+ const btScalar rel_v2 = rel_v.length2();
+ if(rel_v2>SIMD_EPSILON)
+ {
+ btVector3 nrm = n.m_n;
+ /* Setup normal */
+ switch(m_cfg.aeromodel)
+ {
+ case btSoftBody::eAeroModel::V_Point:
+ nrm = NormalizeAny(rel_v);
+ break;
+ case btSoftBody::eAeroModel::V_TwoSided:
+ nrm *= (btScalar)( (btDot(nrm,rel_v) < 0) ? -1 : +1);
+ break;
+ default:
+ {
+ }
+ }
+ const btScalar dvn = btDot(rel_v,nrm);
+ /* Compute forces */
+ if(dvn>0)
+ {
+ btVector3 force(0,0,0);
+ const btScalar c0 = n.m_area * dvn * rel_v2/2;
+ const btScalar c1 = c0 * medium.m_density;
+ force += nrm*(-c1*kLF);
+ force += rel_v.normalized() * (-c1 * kDG);
+ ApplyClampedForce(n, force, dt);
+ }
+ }
+ }
+ }
+ /* Pressure */
+ if(as_pressure)
+ {
+ n.m_f += n.m_n*(n.m_area*ivolumetp);
+ }
+ /* Volume */
+ if(as_volume)
+ {
+ n.m_f += n.m_n*(n.m_area*dvolumetv);
+ }
+ }
+ }
+ /* Per face forces */
+ for(i=0,ni=m_faces.size();i<ni;++i)
+ {
+ btSoftBody::Face& f=m_faces[i];
+ if(as_faero)
+ {
+ const btVector3 v=(f.m_n[0]->m_v+f.m_n[1]->m_v+f.m_n[2]->m_v)/3;
+ const btVector3 x=(f.m_n[0]->m_x+f.m_n[1]->m_x+f.m_n[2]->m_x)/3;
+ EvaluateMedium(m_worldInfo,x,medium);
+ const btVector3 rel_v=v-medium.m_velocity;
+ const btScalar rel_v2=rel_v.length2();
+ if(rel_v2>SIMD_EPSILON)
+ {
+ btVector3 nrm=f.m_normal;
+ /* Setup normal */
+ switch(m_cfg.aeromodel)
+ {
+ case btSoftBody::eAeroModel::F_TwoSided:
+ nrm*=(btScalar)(btDot(nrm,rel_v)<0?-1:+1);break;
+ default:
+ {
+ }
+ }
+ const btScalar dvn=btDot(rel_v,nrm);
+ /* Compute forces */
+ if(dvn>0)
+ {
+ btVector3 force(0,0,0);
+ const btScalar c0 = f.m_ra*dvn*rel_v2;
+ const btScalar c1 = c0*medium.m_density;
+ force += nrm*(-c1*kLF);
+ force += rel_v.normalized()*(-c1*kDG);
+ force /= 3;
+ for(int j=0;j<3;++j) ApplyClampedForce(*f.m_n[j],force,dt);
+ }
+ }
+ }
+ }
+}
+
+//
+void btSoftBody::PSolve_Anchors(btSoftBody* psb,btScalar kst,btScalar ti)
+{
+ const btScalar kAHR=psb->m_cfg.kAHR*kst;
+ const btScalar dt=psb->m_sst.sdt;
+ for(int i=0,ni=psb->m_anchors.size();i<ni;++i)
+ {
+ const Anchor& a=psb->m_anchors[i];
+ const btTransform& t=a.m_body->getWorldTransform();
+ Node& n=*a.m_node;
+ const btVector3 wa=t*a.m_local;
+ const btVector3 va=a.m_body->getVelocityInLocalPoint(a.m_c1)*dt;
+ const btVector3 vb=n.m_x-n.m_q;
+ const btVector3 vr=(va-vb)+(wa-n.m_x)*kAHR;
+ const btVector3 impulse=a.m_c0*vr*a.m_influence;
+ n.m_x+=impulse*a.m_c2;
+ a.m_body->applyImpulse(-impulse,a.m_c1);
+ }
+}
+
+//
+void btSoftBody::PSolve_RContacts(btSoftBody* psb, btScalar kst, btScalar ti)
+{
+ const btScalar dt = psb->m_sst.sdt;
+ const btScalar mrg = psb->getCollisionShape()->getMargin();
+ for(int i=0,ni=psb->m_rcontacts.size();i<ni;++i)
+ {
+ const RContact& c = psb->m_rcontacts[i];
+ const sCti& cti = c.m_cti;
+ btRigidBody* tmpRigid = btRigidBody::upcast(cti.m_colObj);
+
+ const btVector3 va = tmpRigid ? tmpRigid->getVelocityInLocalPoint(c.m_c1)*dt : btVector3(0,0,0);
+ const btVector3 vb = c.m_node->m_x-c.m_node->m_q;
+ const btVector3 vr = vb-va;
+ const btScalar dn = btDot(vr, cti.m_normal);
+ if(dn<=SIMD_EPSILON)
+ {
+ const btScalar dp = btMin( (btDot(c.m_node->m_x, cti.m_normal) + cti.m_offset), mrg );
+ const btVector3 fv = vr - (cti.m_normal * dn);
+ // c0 is the impulse matrix, c3 is 1 - the friction coefficient or 0, c4 is the contact hardness coefficient
+ const btVector3 impulse = c.m_c0 * ( (vr - (fv * c.m_c3) + (cti.m_normal * (dp * c.m_c4))) * kst );
+ c.m_node->m_x -= impulse * c.m_c2;
+ if (tmpRigid)
+ tmpRigid->applyImpulse(impulse,c.m_c1);
+ }
+ }
+}
+
+//
+void btSoftBody::PSolve_SContacts(btSoftBody* psb,btScalar,btScalar ti)
+{
+ for(int i=0,ni=psb->m_scontacts.size();i<ni;++i)
+ {
+ const SContact& c=psb->m_scontacts[i];
+ const btVector3& nr=c.m_normal;
+ Node& n=*c.m_node;
+ Face& f=*c.m_face;
+ const btVector3 p=BaryEval( f.m_n[0]->m_x,
+ f.m_n[1]->m_x,
+ f.m_n[2]->m_x,
+ c.m_weights);
+ const btVector3 q=BaryEval( f.m_n[0]->m_q,
+ f.m_n[1]->m_q,
+ f.m_n[2]->m_q,
+ c.m_weights);
+ const btVector3 vr=(n.m_x-n.m_q)-(p-q);
+ btVector3 corr(0,0,0);
+ btScalar dot = btDot(vr,nr);
+ if(dot<0)
+ {
+ const btScalar j=c.m_margin-(btDot(nr,n.m_x)-btDot(nr,p));
+ corr+=c.m_normal*j;
+ }
+ corr -= ProjectOnPlane(vr,nr)*c.m_friction;
+ n.m_x += corr*c.m_cfm[0];
+ f.m_n[0]->m_x -= corr*(c.m_cfm[1]*c.m_weights.x());
+ f.m_n[1]->m_x -= corr*(c.m_cfm[1]*c.m_weights.y());
+ f.m_n[2]->m_x -= corr*(c.m_cfm[1]*c.m_weights.z());
+ }
+}
+
+//
+void btSoftBody::PSolve_Links(btSoftBody* psb,btScalar kst,btScalar ti)
+{
+ for(int i=0,ni=psb->m_links.size();i<ni;++i)
+ {
+ Link& l=psb->m_links[i];
+ if(l.m_c0>0)
+ {
+ Node& a=*l.m_n[0];
+ Node& b=*l.m_n[1];
+ const btVector3 del=b.m_x-a.m_x;
+ const btScalar len=del.length2();
+ if (l.m_c1+len > SIMD_EPSILON)
+ {
+ const btScalar k=((l.m_c1-len)/(l.m_c0*(l.m_c1+len)))*kst;
+ a.m_x-=del*(k*a.m_im);
+ b.m_x+=del*(k*b.m_im);
+ }
+ }
+ }
+}
+
+//
+void btSoftBody::VSolve_Links(btSoftBody* psb,btScalar kst)
+{
+ for(int i=0,ni=psb->m_links.size();i<ni;++i)
+ {
+ Link& l=psb->m_links[i];
+ Node** n=l.m_n;
+ const btScalar j=-btDot(l.m_c3,n[0]->m_v-n[1]->m_v)*l.m_c2*kst;
+ n[0]->m_v+= l.m_c3*(j*n[0]->m_im);
+ n[1]->m_v-= l.m_c3*(j*n[1]->m_im);
+ }
+}
+
+//
+btSoftBody::psolver_t btSoftBody::getSolver(ePSolver::_ solver)
+{
+ switch(solver)
+ {
+ case ePSolver::Anchors:
+ return(&btSoftBody::PSolve_Anchors);
+ case ePSolver::Linear:
+ return(&btSoftBody::PSolve_Links);
+ case ePSolver::RContacts:
+ return(&btSoftBody::PSolve_RContacts);
+ case ePSolver::SContacts:
+ return(&btSoftBody::PSolve_SContacts);
+ default:
+ {
+ }
+ }
+ return(0);
+}
+
+//
+btSoftBody::vsolver_t btSoftBody::getSolver(eVSolver::_ solver)
+{
+ switch(solver)
+ {
+ case eVSolver::Linear: return(&btSoftBody::VSolve_Links);
+ default:
+ {
+ }
+ }
+ return(0);
+}
+
+//
+void btSoftBody::defaultCollisionHandler(btCollisionObject* pco)
+{
+
+ switch(m_cfg.collisions&fCollision::RVSmask)
+ {
+ case fCollision::SDF_RS:
+ {
+ btSoftColliders::CollideSDF_RS docollide;
+ btRigidBody* prb1=btRigidBody::upcast(pco);
+ btTransform wtr=pco->getWorldTransform();
+
+ const btTransform ctr=pco->getWorldTransform();
+ const btScalar timemargin=(wtr.getOrigin()-ctr.getOrigin()).length();
+ const btScalar basemargin=getCollisionShape()->getMargin();
+ btVector3 mins;
+ btVector3 maxs;
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) volume;
+ pco->getCollisionShape()->getAabb( pco->getWorldTransform(),
+ mins,
+ maxs);
+ volume=btDbvtVolume::FromMM(mins,maxs);
+ volume.Expand(btVector3(basemargin,basemargin,basemargin));
+ docollide.psb = this;
+ docollide.m_colObj1 = pco;
+ docollide.m_rigidBody = prb1;
+
+ docollide.dynmargin = basemargin+timemargin;
+ docollide.stamargin = basemargin;
+ m_ndbvt.collideTV(m_ndbvt.m_root,volume,docollide);
+ }
+ break;
+ case fCollision::CL_RS:
+ {
+ btSoftColliders::CollideCL_RS collider;
+ collider.Process(this,pco);
+ }
+ break;
+ }
+}
+
+//
+void btSoftBody::defaultCollisionHandler(btSoftBody* psb)
+{
+ const int cf=m_cfg.collisions&psb->m_cfg.collisions;
+ switch(cf&fCollision::SVSmask)
+ {
+ case fCollision::CL_SS:
+ {
+
+ //support self-collision if CL_SELF flag set
+ if (this!=psb || psb->m_cfg.collisions&fCollision::CL_SELF)
+ {
+ btSoftColliders::CollideCL_SS docollide;
+ docollide.Process(this,psb);
+ }
+
+ }
+ break;
+ case fCollision::VF_SS:
+ {
+ //only self-collision for Cluster, not Vertex-Face yet
+ if (this!=psb)
+ {
+ btSoftColliders::CollideVF_SS docollide;
+ /* common */
+ docollide.mrg= getCollisionShape()->getMargin()+
+ psb->getCollisionShape()->getMargin();
+ /* psb0 nodes vs psb1 faces */
+ docollide.psb[0]=this;
+ docollide.psb[1]=psb;
+ docollide.psb[0]->m_ndbvt.collideTT( docollide.psb[0]->m_ndbvt.m_root,
+ docollide.psb[1]->m_fdbvt.m_root,
+ docollide);
+ /* psb1 nodes vs psb0 faces */
+ docollide.psb[0]=psb;
+ docollide.psb[1]=this;
+ docollide.psb[0]->m_ndbvt.collideTT( docollide.psb[0]->m_ndbvt.m_root,
+ docollide.psb[1]->m_fdbvt.m_root,
+ docollide);
+ }
+ }
+ break;
+ default:
+ {
+
+ }
+ }
+}
+
+
+
+void btSoftBody::setWindVelocity( const btVector3 &velocity )
+{
+ m_windVelocity = velocity;
+}
+
+
+const btVector3& btSoftBody::getWindVelocity()
+{
+ return m_windVelocity;
+}
+
+
+
+int btSoftBody::calculateSerializeBufferSize() const
+{
+ int sz = sizeof(btSoftBodyData);
+ return sz;
+}
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+const char* btSoftBody::serialize(void* dataBuffer, class btSerializer* serializer) const
+{
+ btSoftBodyData* sbd = (btSoftBodyData*) dataBuffer;
+
+ btCollisionObject::serialize(&sbd->m_collisionObjectData, serializer);
+
+ btHashMap<btHashPtr,int> m_nodeIndexMap;
+
+ sbd->m_numMaterials = m_materials.size();
+ sbd->m_materials = sbd->m_numMaterials? (SoftBodyMaterialData**) serializer->getUniquePointer((void*)&m_materials): 0;
+
+ if (sbd->m_materials)
+ {
+ int sz = sizeof(SoftBodyMaterialData*);
+ int numElem = sbd->m_numMaterials;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ //SoftBodyMaterialData** memPtr = chunk->m_oldPtr;
+ SoftBodyMaterialData** memPtr = (SoftBodyMaterialData**)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ btSoftBody::Material* mat = m_materials[i];
+ *memPtr = mat ? (SoftBodyMaterialData*)serializer->getUniquePointer((void*)mat) : 0;
+ if (!serializer->findPointer(mat))
+ {
+ //serialize it here
+ btChunk* chunk = serializer->allocate(sizeof(SoftBodyMaterialData),1);
+ SoftBodyMaterialData* memPtr = (SoftBodyMaterialData*)chunk->m_oldPtr;
+ memPtr->m_flags = mat->m_flags;
+ memPtr->m_angularStiffness = mat->m_kAST;
+ memPtr->m_linearStiffness = mat->m_kLST;
+ memPtr->m_volumeStiffness = mat->m_kVST;
+ serializer->finalizeChunk(chunk,"SoftBodyMaterialData",BT_SBMATERIAL_CODE,mat);
+ }
+ }
+ serializer->finalizeChunk(chunk,"SoftBodyMaterialData",BT_ARRAY_CODE,(void*) &m_materials);
+ }
+
+
+
+
+ sbd->m_numNodes = m_nodes.size();
+ sbd->m_nodes = sbd->m_numNodes ? (SoftBodyNodeData*)serializer->getUniquePointer((void*)&m_nodes): 0;
+ if (sbd->m_nodes)
+ {
+ int sz = sizeof(SoftBodyNodeData);
+ int numElem = sbd->m_numNodes;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ SoftBodyNodeData* memPtr = (SoftBodyNodeData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_nodes[i].m_f.serializeFloat( memPtr->m_accumulatedForce);
+ memPtr->m_area = m_nodes[i].m_area;
+ memPtr->m_attach = m_nodes[i].m_battach;
+ memPtr->m_inverseMass = m_nodes[i].m_im;
+ memPtr->m_material = m_nodes[i].m_material? (SoftBodyMaterialData*)serializer->getUniquePointer((void*) m_nodes[i].m_material):0;
+ m_nodes[i].m_n.serializeFloat(memPtr->m_normal);
+ m_nodes[i].m_x.serializeFloat(memPtr->m_position);
+ m_nodes[i].m_q.serializeFloat(memPtr->m_previousPosition);
+ m_nodes[i].m_v.serializeFloat(memPtr->m_velocity);
+ m_nodeIndexMap.insert(&m_nodes[i],i);
+ }
+ serializer->finalizeChunk(chunk,"SoftBodyNodeData",BT_SBNODE_CODE,(void*) &m_nodes);
+ }
+
+ sbd->m_numLinks = m_links.size();
+ sbd->m_links = sbd->m_numLinks? (SoftBodyLinkData*) serializer->getUniquePointer((void*)&m_links[0]):0;
+ if (sbd->m_links)
+ {
+ int sz = sizeof(SoftBodyLinkData);
+ int numElem = sbd->m_numLinks;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ SoftBodyLinkData* memPtr = (SoftBodyLinkData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ memPtr->m_bbending = m_links[i].m_bbending;
+ memPtr->m_material = m_links[i].m_material? (SoftBodyMaterialData*)serializer->getUniquePointer((void*) m_links[i].m_material):0;
+ memPtr->m_nodeIndices[0] = m_links[i].m_n[0] ? m_links[i].m_n[0] - &m_nodes[0]: -1;
+ memPtr->m_nodeIndices[1] = m_links[i].m_n[1] ? m_links[i].m_n[1] - &m_nodes[0]: -1;
+ btAssert(memPtr->m_nodeIndices[0]<m_nodes.size());
+ btAssert(memPtr->m_nodeIndices[1]<m_nodes.size());
+ memPtr->m_restLength = m_links[i].m_rl;
+ }
+ serializer->finalizeChunk(chunk,"SoftBodyLinkData",BT_ARRAY_CODE,(void*) &m_links[0]);
+
+ }
+
+
+ sbd->m_numFaces = m_faces.size();
+ sbd->m_faces = sbd->m_numFaces? (SoftBodyFaceData*) serializer->getUniquePointer((void*)&m_faces[0]):0;
+ if (sbd->m_faces)
+ {
+ int sz = sizeof(SoftBodyFaceData);
+ int numElem = sbd->m_numFaces;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ SoftBodyFaceData* memPtr = (SoftBodyFaceData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ memPtr->m_material = m_faces[i].m_material ? (SoftBodyMaterialData*) serializer->getUniquePointer((void*)m_faces[i].m_material): 0;
+ m_faces[i].m_normal.serializeFloat( memPtr->m_normal);
+ for (int j=0;j<3;j++)
+ {
+ memPtr->m_nodeIndices[j] = m_faces[i].m_n[j]? m_faces[i].m_n[j] - &m_nodes[0]: -1;
+ }
+ memPtr->m_restArea = m_faces[i].m_ra;
+ }
+ serializer->finalizeChunk(chunk,"SoftBodyFaceData",BT_ARRAY_CODE,(void*) &m_faces[0]);
+ }
+
+
+ sbd->m_numTetrahedra = m_tetras.size();
+ sbd->m_tetrahedra = sbd->m_numTetrahedra ? (SoftBodyTetraData*) serializer->getUniquePointer((void*)&m_tetras[0]):0;
+ if (sbd->m_tetrahedra)
+ {
+ int sz = sizeof(SoftBodyTetraData);
+ int numElem = sbd->m_numTetrahedra;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ SoftBodyTetraData* memPtr = (SoftBodyTetraData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ for (int j=0;j<4;j++)
+ {
+ m_tetras[i].m_c0[j].serializeFloat( memPtr->m_c0[j] );
+ memPtr->m_nodeIndices[j] = m_tetras[j].m_n[j]? m_tetras[j].m_n[j]-&m_nodes[0] : -1;
+ }
+ memPtr->m_c1 = m_tetras[i].m_c1;
+ memPtr->m_c2 = m_tetras[i].m_c2;
+ memPtr->m_material = m_tetras[i].m_material ? (SoftBodyMaterialData*)serializer->getUniquePointer((void*) m_tetras[i].m_material): 0;
+ memPtr->m_restVolume = m_tetras[i].m_rv;
+ }
+ serializer->finalizeChunk(chunk,"SoftBodyTetraData",BT_ARRAY_CODE,(void*) &m_tetras[0]);
+ }
+
+ sbd->m_numAnchors = m_anchors.size();
+ sbd->m_anchors = sbd->m_numAnchors ? (SoftRigidAnchorData*) serializer->getUniquePointer((void*)&m_anchors[0]):0;
+ if (sbd->m_anchors)
+ {
+ int sz = sizeof(SoftRigidAnchorData);
+ int numElem = sbd->m_numAnchors;
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ SoftRigidAnchorData* memPtr = (SoftRigidAnchorData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_anchors[i].m_c0.serializeFloat(memPtr->m_c0);
+ m_anchors[i].m_c1.serializeFloat(memPtr->m_c1);
+ memPtr->m_c2 = m_anchors[i].m_c2;
+ m_anchors[i].m_local.serializeFloat(memPtr->m_localFrame);
+ memPtr->m_nodeIndex = m_anchors[i].m_node? m_anchors[i].m_node-&m_nodes[0]: -1;
+
+ memPtr->m_rigidBody = m_anchors[i].m_body? (btRigidBodyData*) serializer->getUniquePointer((void*)m_anchors[i].m_body): 0;
+ btAssert(memPtr->m_nodeIndex < m_nodes.size());
+ }
+ serializer->finalizeChunk(chunk,"SoftRigidAnchorData",BT_ARRAY_CODE,(void*) &m_anchors[0]);
+ }
+
+
+ sbd->m_config.m_dynamicFriction = m_cfg.kDF;
+ sbd->m_config.m_baumgarte = m_cfg.kVCF;
+ sbd->m_config.m_pressure = m_cfg.kPR;
+ sbd->m_config.m_aeroModel = this->m_cfg.aeromodel;
+ sbd->m_config.m_lift = m_cfg.kLF;
+ sbd->m_config.m_drag = m_cfg.kDG;
+ sbd->m_config.m_positionIterations = m_cfg.piterations;
+ sbd->m_config.m_driftIterations = m_cfg.diterations;
+ sbd->m_config.m_clusterIterations = m_cfg.citerations;
+ sbd->m_config.m_velocityIterations = m_cfg.viterations;
+ sbd->m_config.m_maxVolume = m_cfg.maxvolume;
+ sbd->m_config.m_damping = m_cfg.kDP;
+ sbd->m_config.m_poseMatch = m_cfg.kMT;
+ sbd->m_config.m_collisionFlags = m_cfg.collisions;
+ sbd->m_config.m_volume = m_cfg.kVC;
+ sbd->m_config.m_rigidContactHardness = m_cfg.kCHR;
+ sbd->m_config.m_kineticContactHardness = m_cfg.kKHR;
+ sbd->m_config.m_softContactHardness = m_cfg.kSHR;
+ sbd->m_config.m_anchorHardness = m_cfg.kAHR;
+ sbd->m_config.m_timeScale = m_cfg.timescale;
+ sbd->m_config.m_maxVolume = m_cfg.maxvolume;
+ sbd->m_config.m_softRigidClusterHardness = m_cfg.kSRHR_CL;
+ sbd->m_config.m_softKineticClusterHardness = m_cfg.kSKHR_CL;
+ sbd->m_config.m_softSoftClusterHardness = m_cfg.kSSHR_CL;
+ sbd->m_config.m_softRigidClusterImpulseSplit = m_cfg.kSR_SPLT_CL;
+ sbd->m_config.m_softKineticClusterImpulseSplit = m_cfg.kSK_SPLT_CL;
+ sbd->m_config.m_softSoftClusterImpulseSplit = m_cfg.kSS_SPLT_CL;
+
+ //pose for shape matching
+ {
+ sbd->m_pose = (SoftBodyPoseData*)serializer->getUniquePointer((void*)&m_pose);
+
+ int sz = sizeof(SoftBodyPoseData);
+ btChunk* chunk = serializer->allocate(sz,1);
+ SoftBodyPoseData* memPtr = (SoftBodyPoseData*)chunk->m_oldPtr;
+
+ m_pose.m_aqq.serializeFloat(memPtr->m_aqq);
+ memPtr->m_bframe = m_pose.m_bframe;
+ memPtr->m_bvolume = m_pose.m_bvolume;
+ m_pose.m_com.serializeFloat(memPtr->m_com);
+
+ memPtr->m_numPositions = m_pose.m_pos.size();
+ memPtr->m_positions = memPtr->m_numPositions ? (btVector3FloatData*)serializer->getUniquePointer((void*)&m_pose.m_pos[0]): 0;
+ if (memPtr->m_numPositions)
+ {
+ int numElem = memPtr->m_numPositions;
+ int sz = sizeof(btVector3Data);
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btVector3FloatData* memPtr = (btVector3FloatData*)chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ m_pose.m_pos[i].serializeFloat(*memPtr);
+ }
+ serializer->finalizeChunk(chunk,"btVector3FloatData",BT_ARRAY_CODE,(void*)&m_pose.m_pos[0]);
+ }
+ memPtr->m_restVolume = m_pose.m_volume;
+ m_pose.m_rot.serializeFloat(memPtr->m_rot);
+ m_pose.m_scl.serializeFloat(memPtr->m_scale);
+
+ memPtr->m_numWeigts = m_pose.m_wgh.size();
+ memPtr->m_weights = memPtr->m_numWeigts? (float*) serializer->getUniquePointer((void*) &m_pose.m_wgh[0]) : 0;
+ if (memPtr->m_numWeigts)
+ {
+
+ int numElem = memPtr->m_numWeigts;
+ int sz = sizeof(float);
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ float* memPtr = (float*) chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ *memPtr = m_pose.m_wgh[i];
+ }
+ serializer->finalizeChunk(chunk,"float",BT_ARRAY_CODE,(void*)&m_pose.m_wgh[0]);
+ }
+
+ serializer->finalizeChunk(chunk,"SoftBodyPoseData",BT_ARRAY_CODE,(void*)&m_pose);
+ }
+
+ //clusters for convex-cluster collision detection
+
+ sbd->m_numClusters = m_clusters.size();
+ sbd->m_clusters = sbd->m_numClusters? (SoftBodyClusterData*) serializer->getUniquePointer((void*)m_clusters[0]) : 0;
+ if (sbd->m_numClusters)
+ {
+ int numElem = sbd->m_numClusters;
+ int sz = sizeof(SoftBodyClusterData);
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ SoftBodyClusterData* memPtr = (SoftBodyClusterData*) chunk->m_oldPtr;
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ memPtr->m_adamping= m_clusters[i]->m_adamping;
+ m_clusters[i]->m_av.serializeFloat(memPtr->m_av);
+ memPtr->m_clusterIndex = m_clusters[i]->m_clusterIndex;
+ memPtr->m_collide = m_clusters[i]->m_collide;
+ m_clusters[i]->m_com.serializeFloat(memPtr->m_com);
+ memPtr->m_containsAnchor = m_clusters[i]->m_containsAnchor;
+ m_clusters[i]->m_dimpulses[0].serializeFloat(memPtr->m_dimpulses[0]);
+ m_clusters[i]->m_dimpulses[1].serializeFloat(memPtr->m_dimpulses[1]);
+ m_clusters[i]->m_framexform.serializeFloat(memPtr->m_framexform);
+ memPtr->m_idmass = m_clusters[i]->m_idmass;
+ memPtr->m_imass = m_clusters[i]->m_imass;
+ m_clusters[i]->m_invwi.serializeFloat(memPtr->m_invwi);
+ memPtr->m_ldamping = m_clusters[i]->m_ldamping;
+ m_clusters[i]->m_locii.serializeFloat(memPtr->m_locii);
+ m_clusters[i]->m_lv.serializeFloat(memPtr->m_lv);
+ memPtr->m_matching = m_clusters[i]->m_matching;
+ memPtr->m_maxSelfCollisionImpulse = m_clusters[i]->m_maxSelfCollisionImpulse;
+ memPtr->m_ndamping = m_clusters[i]->m_ndamping;
+ memPtr->m_ldamping = m_clusters[i]->m_ldamping;
+ memPtr->m_adamping = m_clusters[i]->m_adamping;
+ memPtr->m_selfCollisionImpulseFactor = m_clusters[i]->m_selfCollisionImpulseFactor;
+
+ memPtr->m_numFrameRefs = m_clusters[i]->m_framerefs.size();
+ memPtr->m_numMasses = m_clusters[i]->m_masses.size();
+ memPtr->m_numNodes = m_clusters[i]->m_nodes.size();
+
+ memPtr->m_nvimpulses = m_clusters[i]->m_nvimpulses;
+ m_clusters[i]->m_vimpulses[0].serializeFloat(memPtr->m_vimpulses[0]);
+ m_clusters[i]->m_vimpulses[1].serializeFloat(memPtr->m_vimpulses[1]);
+ memPtr->m_ndimpulses = m_clusters[i]->m_ndimpulses;
+
+
+
+ memPtr->m_framerefs = memPtr->m_numFrameRefs? (btVector3FloatData*)serializer->getUniquePointer((void*)&m_clusters[i]->m_framerefs[0]) : 0;
+ if (memPtr->m_framerefs)
+ {
+ int numElem = memPtr->m_numFrameRefs;
+ int sz = sizeof(btVector3FloatData);
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btVector3FloatData* memPtr = (btVector3FloatData*) chunk->m_oldPtr;
+ for (int j=0;j<numElem;j++,memPtr++)
+ {
+ m_clusters[i]->m_framerefs[j].serializeFloat(*memPtr);
+ }
+ serializer->finalizeChunk(chunk,"btVector3FloatData",BT_ARRAY_CODE,(void*)&m_clusters[i]->m_framerefs[0]);
+ }
+
+ memPtr->m_masses = memPtr->m_numMasses ? (float*) serializer->getUniquePointer((void*)&m_clusters[i]->m_masses[0]): 0;
+ if (memPtr->m_masses)
+ {
+ int numElem = memPtr->m_numMasses;
+ int sz = sizeof(float);
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ float* memPtr = (float*) chunk->m_oldPtr;
+ for (int j=0;j<numElem;j++,memPtr++)
+ {
+ *memPtr = m_clusters[i]->m_masses[j];
+ }
+ serializer->finalizeChunk(chunk,"float",BT_ARRAY_CODE,(void*)&m_clusters[i]->m_masses[0]);
+ }
+
+ memPtr->m_nodeIndices = memPtr->m_numNodes ? (int*) serializer->getUniquePointer((void*) &m_clusters[i]->m_nodes) : 0;
+ if (memPtr->m_nodeIndices )
+ {
+ int numElem = memPtr->m_numMasses;
+ int sz = sizeof(int);
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ int* memPtr = (int*) chunk->m_oldPtr;
+ for (int j=0;j<numElem;j++,memPtr++)
+ {
+ int* indexPtr = m_nodeIndexMap.find(m_clusters[i]->m_nodes[j]);
+ btAssert(indexPtr);
+ *memPtr = *indexPtr;
+ }
+ serializer->finalizeChunk(chunk,"int",BT_ARRAY_CODE,(void*)&m_clusters[i]->m_nodes);
+ }
+ }
+ serializer->finalizeChunk(chunk,"SoftBodyClusterData",BT_ARRAY_CODE,(void*)m_clusters[0]);
+
+ }
+
+
+
+ sbd->m_numJoints = m_joints.size();
+ sbd->m_joints = m_joints.size()? (btSoftBodyJointData*) serializer->getUniquePointer((void*)&m_joints[0]) : 0;
+
+ if (sbd->m_joints)
+ {
+ int sz = sizeof(btSoftBodyJointData);
+ int numElem = m_joints.size();
+ btChunk* chunk = serializer->allocate(sz,numElem);
+ btSoftBodyJointData* memPtr = (btSoftBodyJointData*)chunk->m_oldPtr;
+
+ for (int i=0;i<numElem;i++,memPtr++)
+ {
+ memPtr->m_jointType = (int)m_joints[i]->Type();
+ m_joints[i]->m_refs[0].serializeFloat(memPtr->m_refs[0]);
+ m_joints[i]->m_refs[1].serializeFloat(memPtr->m_refs[1]);
+ memPtr->m_cfm = m_joints[i]->m_cfm;
+ memPtr->m_erp = m_joints[i]->m_erp;
+ memPtr->m_split = m_joints[i]->m_split;
+ memPtr->m_delete = m_joints[i]->m_delete;
+
+ for (int j=0;j<4;j++)
+ {
+ memPtr->m_relPosition[0].m_floats[j] = 0.f;
+ memPtr->m_relPosition[1].m_floats[j] = 0.f;
+ }
+ memPtr->m_bodyA = 0;
+ memPtr->m_bodyB = 0;
+ if (m_joints[i]->m_bodies[0].m_soft)
+ {
+ memPtr->m_bodyAtype = BT_JOINT_SOFT_BODY_CLUSTER;
+ memPtr->m_bodyA = serializer->getUniquePointer((void*)m_joints[i]->m_bodies[0].m_soft);
+ }
+ if (m_joints[i]->m_bodies[0].m_collisionObject)
+ {
+ memPtr->m_bodyAtype = BT_JOINT_COLLISION_OBJECT;
+ memPtr->m_bodyA = serializer->getUniquePointer((void*)m_joints[i]->m_bodies[0].m_collisionObject);
+ }
+ if (m_joints[i]->m_bodies[0].m_rigid)
+ {
+ memPtr->m_bodyAtype = BT_JOINT_RIGID_BODY;
+ memPtr->m_bodyA = serializer->getUniquePointer((void*)m_joints[i]->m_bodies[0].m_rigid);
+ }
+
+ if (m_joints[i]->m_bodies[1].m_soft)
+ {
+ memPtr->m_bodyBtype = BT_JOINT_SOFT_BODY_CLUSTER;
+ memPtr->m_bodyB = serializer->getUniquePointer((void*)m_joints[i]->m_bodies[1].m_soft);
+ }
+ if (m_joints[i]->m_bodies[1].m_collisionObject)
+ {
+ memPtr->m_bodyBtype = BT_JOINT_COLLISION_OBJECT;
+ memPtr->m_bodyB = serializer->getUniquePointer((void*)m_joints[i]->m_bodies[1].m_collisionObject);
+ }
+ if (m_joints[i]->m_bodies[1].m_rigid)
+ {
+ memPtr->m_bodyBtype = BT_JOINT_RIGID_BODY;
+ memPtr->m_bodyB = serializer->getUniquePointer((void*)m_joints[i]->m_bodies[1].m_rigid);
+ }
+ }
+ serializer->finalizeChunk(chunk,"btSoftBodyJointData",BT_ARRAY_CODE,(void*) &m_joints[0]);
+ }
+
+
+ return btSoftBodyDataName;
+}
+
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBody.h b/tests/bullet/src/BulletSoftBody/btSoftBody.h
new file mode 100644
index 00000000..dbdaf5d7
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBody.h
@@ -0,0 +1,978 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///btSoftBody implementation by Nathanael Presson
+
+#ifndef _BT_SOFT_BODY_H
+#define _BT_SOFT_BODY_H
+
+#include "LinearMath/btAlignedObjectArray.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+#include "BulletCollision/CollisionShapes/btConcaveShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+#include "btSparseSDF.h"
+#include "BulletCollision/BroadphaseCollision/btDbvt.h"
+
+//#ifdef BT_USE_DOUBLE_PRECISION
+//#define btRigidBodyData btRigidBodyDoubleData
+//#define btRigidBodyDataName "btRigidBodyDoubleData"
+//#else
+#define btSoftBodyData btSoftBodyFloatData
+#define btSoftBodyDataName "btSoftBodyFloatData"
+//#endif //BT_USE_DOUBLE_PRECISION
+
+class btBroadphaseInterface;
+class btDispatcher;
+class btSoftBodySolver;
+
+/* btSoftBodyWorldInfo */
+struct btSoftBodyWorldInfo
+{
+ btScalar air_density;
+ btScalar water_density;
+ btScalar water_offset;
+ btVector3 water_normal;
+ btBroadphaseInterface* m_broadphase;
+ btDispatcher* m_dispatcher;
+ btVector3 m_gravity;
+ btSparseSdf<3> m_sparsesdf;
+
+ btSoftBodyWorldInfo()
+ :air_density((btScalar)1.2),
+ water_density(0),
+ water_offset(0),
+ water_normal(0,0,0),
+ m_broadphase(0),
+ m_dispatcher(0),
+ m_gravity(0,-10,0)
+ {
+ }
+};
+
+
+///The btSoftBody is an class to simulate cloth and volumetric soft bodies.
+///There is two-way interaction between btSoftBody and btRigidBody/btCollisionObject.
+class btSoftBody : public btCollisionObject
+{
+public:
+ btAlignedObjectArray<class btCollisionObject*> m_collisionDisabledObjects;
+
+ // The solver object that handles this soft body
+ btSoftBodySolver *m_softBodySolver;
+
+ //
+ // Enumerations
+ //
+
+ ///eAeroModel
+ struct eAeroModel { enum _ {
+ V_Point, ///Vertex normals are oriented toward velocity
+ V_TwoSided, ///Vertex normals are fliped to match velocity
+ V_OneSided, ///Vertex normals are taken as it is
+ F_TwoSided, ///Face normals are fliped to match velocity
+ F_OneSided, ///Face normals are taken as it is
+ END
+ };};
+
+ ///eVSolver : velocities solvers
+ struct eVSolver { enum _ {
+ Linear, ///Linear solver
+ END
+ };};
+
+ ///ePSolver : positions solvers
+ struct ePSolver { enum _ {
+ Linear, ///Linear solver
+ Anchors, ///Anchor solver
+ RContacts, ///Rigid contacts solver
+ SContacts, ///Soft contacts solver
+ END
+ };};
+
+ ///eSolverPresets
+ struct eSolverPresets { enum _ {
+ Positions,
+ Velocities,
+ Default = Positions,
+ END
+ };};
+
+ ///eFeature
+ struct eFeature { enum _ {
+ None,
+ Node,
+ Link,
+ Face,
+ END
+ };};
+
+ typedef btAlignedObjectArray<eVSolver::_> tVSolverArray;
+ typedef btAlignedObjectArray<ePSolver::_> tPSolverArray;
+
+ //
+ // Flags
+ //
+
+ ///fCollision
+ struct fCollision { enum _ {
+ RVSmask = 0x000f, ///Rigid versus soft mask
+ SDF_RS = 0x0001, ///SDF based rigid vs soft
+ CL_RS = 0x0002, ///Cluster vs convex rigid vs soft
+
+ SVSmask = 0x0030, ///Rigid versus soft mask
+ VF_SS = 0x0010, ///Vertex vs face soft vs soft handling
+ CL_SS = 0x0020, ///Cluster vs cluster soft vs soft handling
+ CL_SELF = 0x0040, ///Cluster soft body self collision
+ /* presets */
+ Default = SDF_RS,
+ END
+ };};
+
+ ///fMaterial
+ struct fMaterial { enum _ {
+ DebugDraw = 0x0001, /// Enable debug draw
+ /* presets */
+ Default = DebugDraw,
+ END
+ };};
+
+ //
+ // API Types
+ //
+
+ /* sRayCast */
+ struct sRayCast
+ {
+ btSoftBody* body; /// soft body
+ eFeature::_ feature; /// feature type
+ int index; /// feature index
+ btScalar fraction; /// time of impact fraction (rayorg+(rayto-rayfrom)*fraction)
+ };
+
+ /* ImplicitFn */
+ struct ImplicitFn
+ {
+ virtual btScalar Eval(const btVector3& x)=0;
+ };
+
+ //
+ // Internal types
+ //
+
+ typedef btAlignedObjectArray<btScalar> tScalarArray;
+ typedef btAlignedObjectArray<btVector3> tVector3Array;
+
+ /* sCti is Softbody contact info */
+ struct sCti
+ {
+ btCollisionObject* m_colObj; /* Rigid body */
+ btVector3 m_normal; /* Outward normal */
+ btScalar m_offset; /* Offset from origin */
+ };
+
+ /* sMedium */
+ struct sMedium
+ {
+ btVector3 m_velocity; /* Velocity */
+ btScalar m_pressure; /* Pressure */
+ btScalar m_density; /* Density */
+ };
+
+ /* Base type */
+ struct Element
+ {
+ void* m_tag; // User data
+ Element() : m_tag(0) {}
+ };
+ /* Material */
+ struct Material : Element
+ {
+ btScalar m_kLST; // Linear stiffness coefficient [0,1]
+ btScalar m_kAST; // Area/Angular stiffness coefficient [0,1]
+ btScalar m_kVST; // Volume stiffness coefficient [0,1]
+ int m_flags; // Flags
+ };
+
+ /* Feature */
+ struct Feature : Element
+ {
+ Material* m_material; // Material
+ };
+ /* Node */
+ struct Node : Feature
+ {
+ btVector3 m_x; // Position
+ btVector3 m_q; // Previous step position
+ btVector3 m_v; // Velocity
+ btVector3 m_f; // Force accumulator
+ btVector3 m_n; // Normal
+ btScalar m_im; // 1/mass
+ btScalar m_area; // Area
+ btDbvtNode* m_leaf; // Leaf data
+ int m_battach:1; // Attached
+ };
+ /* Link */
+ struct Link : Feature
+ {
+ Node* m_n[2]; // Node pointers
+ btScalar m_rl; // Rest length
+ int m_bbending:1; // Bending link
+ btScalar m_c0; // (ima+imb)*kLST
+ btScalar m_c1; // rl^2
+ btScalar m_c2; // |gradient|^2/c0
+ btVector3 m_c3; // gradient
+ };
+ /* Face */
+ struct Face : Feature
+ {
+ Node* m_n[3]; // Node pointers
+ btVector3 m_normal; // Normal
+ btScalar m_ra; // Rest area
+ btDbvtNode* m_leaf; // Leaf data
+ };
+ /* Tetra */
+ struct Tetra : Feature
+ {
+ Node* m_n[4]; // Node pointers
+ btScalar m_rv; // Rest volume
+ btDbvtNode* m_leaf; // Leaf data
+ btVector3 m_c0[4]; // gradients
+ btScalar m_c1; // (4*kVST)/(im0+im1+im2+im3)
+ btScalar m_c2; // m_c1/sum(|g0..3|^2)
+ };
+ /* RContact */
+ struct RContact
+ {
+ sCti m_cti; // Contact infos
+ Node* m_node; // Owner node
+ btMatrix3x3 m_c0; // Impulse matrix
+ btVector3 m_c1; // Relative anchor
+ btScalar m_c2; // ima*dt
+ btScalar m_c3; // Friction
+ btScalar m_c4; // Hardness
+ };
+ /* SContact */
+ struct SContact
+ {
+ Node* m_node; // Node
+ Face* m_face; // Face
+ btVector3 m_weights; // Weigths
+ btVector3 m_normal; // Normal
+ btScalar m_margin; // Margin
+ btScalar m_friction; // Friction
+ btScalar m_cfm[2]; // Constraint force mixing
+ };
+ /* Anchor */
+ struct Anchor
+ {
+ Node* m_node; // Node pointer
+ btVector3 m_local; // Anchor position in body space
+ btRigidBody* m_body; // Body
+ btScalar m_influence;
+ btMatrix3x3 m_c0; // Impulse matrix
+ btVector3 m_c1; // Relative anchor
+ btScalar m_c2; // ima*dt
+ };
+ /* Note */
+ struct Note : Element
+ {
+ const char* m_text; // Text
+ btVector3 m_offset; // Offset
+ int m_rank; // Rank
+ Node* m_nodes[4]; // Nodes
+ btScalar m_coords[4]; // Coordinates
+ };
+ /* Pose */
+ struct Pose
+ {
+ bool m_bvolume; // Is valid
+ bool m_bframe; // Is frame
+ btScalar m_volume; // Rest volume
+ tVector3Array m_pos; // Reference positions
+ tScalarArray m_wgh; // Weights
+ btVector3 m_com; // COM
+ btMatrix3x3 m_rot; // Rotation
+ btMatrix3x3 m_scl; // Scale
+ btMatrix3x3 m_aqq; // Base scaling
+ };
+ /* Cluster */
+ struct Cluster
+ {
+ tScalarArray m_masses;
+ btAlignedObjectArray<Node*> m_nodes;
+ tVector3Array m_framerefs;
+ btTransform m_framexform;
+ btScalar m_idmass;
+ btScalar m_imass;
+ btMatrix3x3 m_locii;
+ btMatrix3x3 m_invwi;
+ btVector3 m_com;
+ btVector3 m_vimpulses[2];
+ btVector3 m_dimpulses[2];
+ int m_nvimpulses;
+ int m_ndimpulses;
+ btVector3 m_lv;
+ btVector3 m_av;
+ btDbvtNode* m_leaf;
+ btScalar m_ndamping; /* Node damping */
+ btScalar m_ldamping; /* Linear damping */
+ btScalar m_adamping; /* Angular damping */
+ btScalar m_matching;
+ btScalar m_maxSelfCollisionImpulse;
+ btScalar m_selfCollisionImpulseFactor;
+ bool m_containsAnchor;
+ bool m_collide;
+ int m_clusterIndex;
+ Cluster() : m_leaf(0),m_ndamping(0),m_ldamping(0),m_adamping(0),m_matching(0)
+ ,m_maxSelfCollisionImpulse(100.f),
+ m_selfCollisionImpulseFactor(0.01f),
+ m_containsAnchor(false)
+ {}
+ };
+ /* Impulse */
+ struct Impulse
+ {
+ btVector3 m_velocity;
+ btVector3 m_drift;
+ int m_asVelocity:1;
+ int m_asDrift:1;
+ Impulse() : m_velocity(0,0,0),m_drift(0,0,0),m_asVelocity(0),m_asDrift(0) {}
+ Impulse operator -() const
+ {
+ Impulse i=*this;
+ i.m_velocity=-i.m_velocity;
+ i.m_drift=-i.m_drift;
+ return(i);
+ }
+ Impulse operator*(btScalar x) const
+ {
+ Impulse i=*this;
+ i.m_velocity*=x;
+ i.m_drift*=x;
+ return(i);
+ }
+ };
+ /* Body */
+ struct Body
+ {
+ Cluster* m_soft;
+ btRigidBody* m_rigid;
+ btCollisionObject* m_collisionObject;
+
+ Body() : m_soft(0),m_rigid(0),m_collisionObject(0) {}
+ Body(Cluster* p) : m_soft(p),m_rigid(0),m_collisionObject(0) {}
+ Body(btCollisionObject* colObj) : m_soft(0),m_collisionObject(colObj)
+ {
+ m_rigid = btRigidBody::upcast(m_collisionObject);
+ }
+
+ void activate() const
+ {
+ if(m_rigid)
+ m_rigid->activate();
+ if (m_collisionObject)
+ m_collisionObject->activate();
+
+ }
+ const btMatrix3x3& invWorldInertia() const
+ {
+ static const btMatrix3x3 iwi(0,0,0,0,0,0,0,0,0);
+ if(m_rigid) return(m_rigid->getInvInertiaTensorWorld());
+ if(m_soft) return(m_soft->m_invwi);
+ return(iwi);
+ }
+ btScalar invMass() const
+ {
+ if(m_rigid) return(m_rigid->getInvMass());
+ if(m_soft) return(m_soft->m_imass);
+ return(0);
+ }
+ const btTransform& xform() const
+ {
+ static const btTransform identity=btTransform::getIdentity();
+ if(m_collisionObject) return(m_collisionObject->getWorldTransform());
+ if(m_soft) return(m_soft->m_framexform);
+ return(identity);
+ }
+ btVector3 linearVelocity() const
+ {
+ if(m_rigid) return(m_rigid->getLinearVelocity());
+ if(m_soft) return(m_soft->m_lv);
+ return(btVector3(0,0,0));
+ }
+ btVector3 angularVelocity(const btVector3& rpos) const
+ {
+ if(m_rigid) return(btCross(m_rigid->getAngularVelocity(),rpos));
+ if(m_soft) return(btCross(m_soft->m_av,rpos));
+ return(btVector3(0,0,0));
+ }
+ btVector3 angularVelocity() const
+ {
+ if(m_rigid) return(m_rigid->getAngularVelocity());
+ if(m_soft) return(m_soft->m_av);
+ return(btVector3(0,0,0));
+ }
+ btVector3 velocity(const btVector3& rpos) const
+ {
+ return(linearVelocity()+angularVelocity(rpos));
+ }
+ void applyVImpulse(const btVector3& impulse,const btVector3& rpos) const
+ {
+ if(m_rigid) m_rigid->applyImpulse(impulse,rpos);
+ if(m_soft) btSoftBody::clusterVImpulse(m_soft,rpos,impulse);
+ }
+ void applyDImpulse(const btVector3& impulse,const btVector3& rpos) const
+ {
+ if(m_rigid) m_rigid->applyImpulse(impulse,rpos);
+ if(m_soft) btSoftBody::clusterDImpulse(m_soft,rpos,impulse);
+ }
+ void applyImpulse(const Impulse& impulse,const btVector3& rpos) const
+ {
+ if(impulse.m_asVelocity)
+ {
+// printf("impulse.m_velocity = %f,%f,%f\n",impulse.m_velocity.getX(),impulse.m_velocity.getY(),impulse.m_velocity.getZ());
+ applyVImpulse(impulse.m_velocity,rpos);
+ }
+ if(impulse.m_asDrift)
+ {
+// printf("impulse.m_drift = %f,%f,%f\n",impulse.m_drift.getX(),impulse.m_drift.getY(),impulse.m_drift.getZ());
+ applyDImpulse(impulse.m_drift,rpos);
+ }
+ }
+ void applyVAImpulse(const btVector3& impulse) const
+ {
+ if(m_rigid) m_rigid->applyTorqueImpulse(impulse);
+ if(m_soft) btSoftBody::clusterVAImpulse(m_soft,impulse);
+ }
+ void applyDAImpulse(const btVector3& impulse) const
+ {
+ if(m_rigid) m_rigid->applyTorqueImpulse(impulse);
+ if(m_soft) btSoftBody::clusterDAImpulse(m_soft,impulse);
+ }
+ void applyAImpulse(const Impulse& impulse) const
+ {
+ if(impulse.m_asVelocity) applyVAImpulse(impulse.m_velocity);
+ if(impulse.m_asDrift) applyDAImpulse(impulse.m_drift);
+ }
+ void applyDCImpulse(const btVector3& impulse) const
+ {
+ if(m_rigid) m_rigid->applyCentralImpulse(impulse);
+ if(m_soft) btSoftBody::clusterDCImpulse(m_soft,impulse);
+ }
+ };
+ /* Joint */
+ struct Joint
+ {
+ struct eType { enum _ {
+ Linear=0,
+ Angular,
+ Contact
+ };};
+ struct Specs
+ {
+ Specs() : erp(1),cfm(1),split(1) {}
+ btScalar erp;
+ btScalar cfm;
+ btScalar split;
+ };
+ Body m_bodies[2];
+ btVector3 m_refs[2];
+ btScalar m_cfm;
+ btScalar m_erp;
+ btScalar m_split;
+ btVector3 m_drift;
+ btVector3 m_sdrift;
+ btMatrix3x3 m_massmatrix;
+ bool m_delete;
+ virtual ~Joint() {}
+ Joint() : m_delete(false) {}
+ virtual void Prepare(btScalar dt,int iterations);
+ virtual void Solve(btScalar dt,btScalar sor)=0;
+ virtual void Terminate(btScalar dt)=0;
+ virtual eType::_ Type() const=0;
+ };
+ /* LJoint */
+ struct LJoint : Joint
+ {
+ struct Specs : Joint::Specs
+ {
+ btVector3 position;
+ };
+ btVector3 m_rpos[2];
+ void Prepare(btScalar dt,int iterations);
+ void Solve(btScalar dt,btScalar sor);
+ void Terminate(btScalar dt);
+ eType::_ Type() const { return(eType::Linear); }
+ };
+ /* AJoint */
+ struct AJoint : Joint
+ {
+ struct IControl
+ {
+ virtual void Prepare(AJoint*) {}
+ virtual btScalar Speed(AJoint*,btScalar current) { return(current); }
+ static IControl* Default() { static IControl def;return(&def); }
+ };
+ struct Specs : Joint::Specs
+ {
+ Specs() : icontrol(IControl::Default()) {}
+ btVector3 axis;
+ IControl* icontrol;
+ };
+ btVector3 m_axis[2];
+ IControl* m_icontrol;
+ void Prepare(btScalar dt,int iterations);
+ void Solve(btScalar dt,btScalar sor);
+ void Terminate(btScalar dt);
+ eType::_ Type() const { return(eType::Angular); }
+ };
+ /* CJoint */
+ struct CJoint : Joint
+ {
+ int m_life;
+ int m_maxlife;
+ btVector3 m_rpos[2];
+ btVector3 m_normal;
+ btScalar m_friction;
+ void Prepare(btScalar dt,int iterations);
+ void Solve(btScalar dt,btScalar sor);
+ void Terminate(btScalar dt);
+ eType::_ Type() const { return(eType::Contact); }
+ };
+ /* Config */
+ struct Config
+ {
+ eAeroModel::_ aeromodel; // Aerodynamic model (default: V_Point)
+ btScalar kVCF; // Velocities correction factor (Baumgarte)
+ btScalar kDP; // Damping coefficient [0,1]
+ btScalar kDG; // Drag coefficient [0,+inf]
+ btScalar kLF; // Lift coefficient [0,+inf]
+ btScalar kPR; // Pressure coefficient [-inf,+inf]
+ btScalar kVC; // Volume conversation coefficient [0,+inf]
+ btScalar kDF; // Dynamic friction coefficient [0,1]
+ btScalar kMT; // Pose matching coefficient [0,1]
+ btScalar kCHR; // Rigid contacts hardness [0,1]
+ btScalar kKHR; // Kinetic contacts hardness [0,1]
+ btScalar kSHR; // Soft contacts hardness [0,1]
+ btScalar kAHR; // Anchors hardness [0,1]
+ btScalar kSRHR_CL; // Soft vs rigid hardness [0,1] (cluster only)
+ btScalar kSKHR_CL; // Soft vs kinetic hardness [0,1] (cluster only)
+ btScalar kSSHR_CL; // Soft vs soft hardness [0,1] (cluster only)
+ btScalar kSR_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
+ btScalar kSK_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
+ btScalar kSS_SPLT_CL; // Soft vs rigid impulse split [0,1] (cluster only)
+ btScalar maxvolume; // Maximum volume ratio for pose
+ btScalar timescale; // Time scale
+ int viterations; // Velocities solver iterations
+ int piterations; // Positions solver iterations
+ int diterations; // Drift solver iterations
+ int citerations; // Cluster solver iterations
+ int collisions; // Collisions flags
+ tVSolverArray m_vsequence; // Velocity solvers sequence
+ tPSolverArray m_psequence; // Position solvers sequence
+ tPSolverArray m_dsequence; // Drift solvers sequence
+ };
+ /* SolverState */
+ struct SolverState
+ {
+ btScalar sdt; // dt*timescale
+ btScalar isdt; // 1/sdt
+ btScalar velmrg; // velocity margin
+ btScalar radmrg; // radial margin
+ btScalar updmrg; // Update margin
+ };
+ /// RayFromToCaster takes a ray from, ray to (instead of direction!)
+ struct RayFromToCaster : btDbvt::ICollide
+ {
+ btVector3 m_rayFrom;
+ btVector3 m_rayTo;
+ btVector3 m_rayNormalizedDirection;
+ btScalar m_mint;
+ Face* m_face;
+ int m_tests;
+ RayFromToCaster(const btVector3& rayFrom,const btVector3& rayTo,btScalar mxt);
+ void Process(const btDbvtNode* leaf);
+
+ static inline btScalar rayFromToTriangle(const btVector3& rayFrom,
+ const btVector3& rayTo,
+ const btVector3& rayNormalizedDirection,
+ const btVector3& a,
+ const btVector3& b,
+ const btVector3& c,
+ btScalar maxt=SIMD_INFINITY);
+ };
+
+ //
+ // Typedefs
+ //
+
+ typedef void (*psolver_t)(btSoftBody*,btScalar,btScalar);
+ typedef void (*vsolver_t)(btSoftBody*,btScalar);
+ typedef btAlignedObjectArray<Cluster*> tClusterArray;
+ typedef btAlignedObjectArray<Note> tNoteArray;
+ typedef btAlignedObjectArray<Node> tNodeArray;
+ typedef btAlignedObjectArray<btDbvtNode*> tLeafArray;
+ typedef btAlignedObjectArray<Link> tLinkArray;
+ typedef btAlignedObjectArray<Face> tFaceArray;
+ typedef btAlignedObjectArray<Tetra> tTetraArray;
+ typedef btAlignedObjectArray<Anchor> tAnchorArray;
+ typedef btAlignedObjectArray<RContact> tRContactArray;
+ typedef btAlignedObjectArray<SContact> tSContactArray;
+ typedef btAlignedObjectArray<Material*> tMaterialArray;
+ typedef btAlignedObjectArray<Joint*> tJointArray;
+ typedef btAlignedObjectArray<btSoftBody*> tSoftBodyArray;
+
+ //
+ // Fields
+ //
+
+ Config m_cfg; // Configuration
+ SolverState m_sst; // Solver state
+ Pose m_pose; // Pose
+ void* m_tag; // User data
+ btSoftBodyWorldInfo* m_worldInfo; // World info
+ tNoteArray m_notes; // Notes
+ tNodeArray m_nodes; // Nodes
+ tLinkArray m_links; // Links
+ tFaceArray m_faces; // Faces
+ tTetraArray m_tetras; // Tetras
+ tAnchorArray m_anchors; // Anchors
+ tRContactArray m_rcontacts; // Rigid contacts
+ tSContactArray m_scontacts; // Soft contacts
+ tJointArray m_joints; // Joints
+ tMaterialArray m_materials; // Materials
+ btScalar m_timeacc; // Time accumulator
+ btVector3 m_bounds[2]; // Spatial bounds
+ bool m_bUpdateRtCst; // Update runtime constants
+ btDbvt m_ndbvt; // Nodes tree
+ btDbvt m_fdbvt; // Faces tree
+ btDbvt m_cdbvt; // Clusters tree
+ tClusterArray m_clusters; // Clusters
+
+ btAlignedObjectArray<bool>m_clusterConnectivity;//cluster connectivity, for self-collision
+
+ btTransform m_initialWorldTransform;
+
+ btVector3 m_windVelocity;
+ //
+ // Api
+ //
+
+ /* ctor */
+ btSoftBody( btSoftBodyWorldInfo* worldInfo,int node_count, const btVector3* x, const btScalar* m);
+
+ /* ctor */
+ btSoftBody( btSoftBodyWorldInfo* worldInfo);
+
+ void initDefaults();
+
+ /* dtor */
+ virtual ~btSoftBody();
+ /* Check for existing link */
+
+ btAlignedObjectArray<int> m_userIndexMapping;
+
+ btSoftBodyWorldInfo* getWorldInfo()
+ {
+ return m_worldInfo;
+ }
+
+ ///@todo: avoid internal softbody shape hack and move collision code to collision library
+ virtual void setCollisionShape(btCollisionShape* collisionShape)
+ {
+
+ }
+
+ bool checkLink( int node0,
+ int node1) const;
+ bool checkLink( const Node* node0,
+ const Node* node1) const;
+ /* Check for existring face */
+ bool checkFace( int node0,
+ int node1,
+ int node2) const;
+ /* Append material */
+ Material* appendMaterial();
+ /* Append note */
+ void appendNote( const char* text,
+ const btVector3& o,
+ const btVector4& c=btVector4(1,0,0,0),
+ Node* n0=0,
+ Node* n1=0,
+ Node* n2=0,
+ Node* n3=0);
+ void appendNote( const char* text,
+ const btVector3& o,
+ Node* feature);
+ void appendNote( const char* text,
+ const btVector3& o,
+ Link* feature);
+ void appendNote( const char* text,
+ const btVector3& o,
+ Face* feature);
+ /* Append node */
+ void appendNode( const btVector3& x,btScalar m);
+ /* Append link */
+ void appendLink(int model=-1,Material* mat=0);
+ void appendLink( int node0,
+ int node1,
+ Material* mat=0,
+ bool bcheckexist=false);
+ void appendLink( Node* node0,
+ Node* node1,
+ Material* mat=0,
+ bool bcheckexist=false);
+ /* Append face */
+ void appendFace(int model=-1,Material* mat=0);
+ void appendFace( int node0,
+ int node1,
+ int node2,
+ Material* mat=0);
+ void appendTetra(int model,Material* mat);
+ //
+ void appendTetra(int node0,
+ int node1,
+ int node2,
+ int node3,
+ Material* mat=0);
+
+
+ /* Append anchor */
+ void appendAnchor( int node,
+ btRigidBody* body, bool disableCollisionBetweenLinkedBodies=false,btScalar influence = 1);
+ void appendAnchor(int node,btRigidBody* body, const btVector3& localPivot,bool disableCollisionBetweenLinkedBodies=false,btScalar influence = 1);
+ /* Append linear joint */
+ void appendLinearJoint(const LJoint::Specs& specs,Cluster* body0,Body body1);
+ void appendLinearJoint(const LJoint::Specs& specs,Body body=Body());
+ void appendLinearJoint(const LJoint::Specs& specs,btSoftBody* body);
+ /* Append linear joint */
+ void appendAngularJoint(const AJoint::Specs& specs,Cluster* body0,Body body1);
+ void appendAngularJoint(const AJoint::Specs& specs,Body body=Body());
+ void appendAngularJoint(const AJoint::Specs& specs,btSoftBody* body);
+ /* Add force (or gravity) to the entire body */
+ void addForce( const btVector3& force);
+ /* Add force (or gravity) to a node of the body */
+ void addForce( const btVector3& force,
+ int node);
+ /* Add velocity to the entire body */
+ void addVelocity( const btVector3& velocity);
+
+ /* Set velocity for the entire body */
+ void setVelocity( const btVector3& velocity);
+
+ /* Add velocity to a node of the body */
+ void addVelocity( const btVector3& velocity,
+ int node);
+ /* Set mass */
+ void setMass( int node,
+ btScalar mass);
+ /* Get mass */
+ btScalar getMass( int node) const;
+ /* Get total mass */
+ btScalar getTotalMass() const;
+ /* Set total mass (weighted by previous masses) */
+ void setTotalMass( btScalar mass,
+ bool fromfaces=false);
+ /* Set total density */
+ void setTotalDensity(btScalar density);
+ /* Set volume mass (using tetrahedrons) */
+ void setVolumeMass( btScalar mass);
+ /* Set volume density (using tetrahedrons) */
+ void setVolumeDensity( btScalar density);
+ /* Transform */
+ void transform( const btTransform& trs);
+ /* Translate */
+ void translate( const btVector3& trs);
+ /* Rotate */
+ void rotate( const btQuaternion& rot);
+ /* Scale */
+ void scale( const btVector3& scl);
+ /* Set current state as pose */
+ void setPose( bool bvolume,
+ bool bframe);
+ /* Return the volume */
+ btScalar getVolume() const;
+ /* Cluster count */
+ int clusterCount() const;
+ /* Cluster center of mass */
+ static btVector3 clusterCom(const Cluster* cluster);
+ btVector3 clusterCom(int cluster) const;
+ /* Cluster velocity at rpos */
+ static btVector3 clusterVelocity(const Cluster* cluster,const btVector3& rpos);
+ /* Cluster impulse */
+ static void clusterVImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse);
+ static void clusterDImpulse(Cluster* cluster,const btVector3& rpos,const btVector3& impulse);
+ static void clusterImpulse(Cluster* cluster,const btVector3& rpos,const Impulse& impulse);
+ static void clusterVAImpulse(Cluster* cluster,const btVector3& impulse);
+ static void clusterDAImpulse(Cluster* cluster,const btVector3& impulse);
+ static void clusterAImpulse(Cluster* cluster,const Impulse& impulse);
+ static void clusterDCImpulse(Cluster* cluster,const btVector3& impulse);
+ /* Generate bending constraints based on distance in the adjency graph */
+ int generateBendingConstraints( int distance,
+ Material* mat=0);
+ /* Randomize constraints to reduce solver bias */
+ void randomizeConstraints();
+ /* Release clusters */
+ void releaseCluster(int index);
+ void releaseClusters();
+ /* Generate clusters (K-mean) */
+ ///generateClusters with k=0 will create a convex cluster for each tetrahedron or triangle
+ ///otherwise an approximation will be used (better performance)
+ int generateClusters(int k,int maxiterations=8192);
+ /* Refine */
+ void refine(ImplicitFn* ifn,btScalar accurary,bool cut);
+ /* CutLink */
+ bool cutLink(int node0,int node1,btScalar position);
+ bool cutLink(const Node* node0,const Node* node1,btScalar position);
+
+ ///Ray casting using rayFrom and rayTo in worldspace, (not direction!)
+ bool rayTest(const btVector3& rayFrom,
+ const btVector3& rayTo,
+ sRayCast& results);
+ /* Solver presets */
+ void setSolver(eSolverPresets::_ preset);
+ /* predictMotion */
+ void predictMotion(btScalar dt);
+ /* solveConstraints */
+ void solveConstraints();
+ /* staticSolve */
+ void staticSolve(int iterations);
+ /* solveCommonConstraints */
+ static void solveCommonConstraints(btSoftBody** bodies,int count,int iterations);
+ /* solveClusters */
+ static void solveClusters(const btAlignedObjectArray<btSoftBody*>& bodies);
+ /* integrateMotion */
+ void integrateMotion();
+ /* defaultCollisionHandlers */
+ void defaultCollisionHandler(btCollisionObject* pco);
+ void defaultCollisionHandler(btSoftBody* psb);
+
+
+
+ //
+ // Functionality to deal with new accelerated solvers.
+ //
+
+ /**
+ * Set a wind velocity for interaction with the air.
+ */
+ void setWindVelocity( const btVector3 &velocity );
+
+
+ /**
+ * Return the wind velocity for interaction with the air.
+ */
+ const btVector3& getWindVelocity();
+
+ //
+ // Set the solver that handles this soft body
+ // Should not be allowed to get out of sync with reality
+ // Currently called internally on addition to the world
+ void setSoftBodySolver( btSoftBodySolver *softBodySolver )
+ {
+ m_softBodySolver = softBodySolver;
+ }
+
+ //
+ // Return the solver that handles this soft body
+ //
+ btSoftBodySolver *getSoftBodySolver()
+ {
+ return m_softBodySolver;
+ }
+
+ //
+ // Return the solver that handles this soft body
+ //
+ btSoftBodySolver *getSoftBodySolver() const
+ {
+ return m_softBodySolver;
+ }
+
+
+ //
+ // Cast
+ //
+
+ static const btSoftBody* upcast(const btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()==CO_SOFT_BODY)
+ return (const btSoftBody*)colObj;
+ return 0;
+ }
+ static btSoftBody* upcast(btCollisionObject* colObj)
+ {
+ if (colObj->getInternalType()==CO_SOFT_BODY)
+ return (btSoftBody*)colObj;
+ return 0;
+ }
+
+ //
+ // ::btCollisionObject
+ //
+
+ virtual void getAabb(btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ aabbMin = m_bounds[0];
+ aabbMax = m_bounds[1];
+ }
+ //
+ // Private
+ //
+ void pointersToIndices();
+ void indicesToPointers(const int* map=0);
+
+ int rayTest(const btVector3& rayFrom,const btVector3& rayTo,
+ btScalar& mint,eFeature::_& feature,int& index,bool bcountonly) const;
+ void initializeFaceTree();
+ btVector3 evaluateCom() const;
+ bool checkContact(btCollisionObject* colObj,const btVector3& x,btScalar margin,btSoftBody::sCti& cti) const;
+ void updateNormals();
+ void updateBounds();
+ void updatePose();
+ void updateConstants();
+ void initializeClusters();
+ void updateClusters();
+ void cleanupClusters();
+ void prepareClusters(int iterations);
+ void solveClusters(btScalar sor);
+ void applyClusters(bool drift);
+ void dampClusters();
+ void applyForces();
+ static void PSolve_Anchors(btSoftBody* psb,btScalar kst,btScalar ti);
+ static void PSolve_RContacts(btSoftBody* psb,btScalar kst,btScalar ti);
+ static void PSolve_SContacts(btSoftBody* psb,btScalar,btScalar ti);
+ static void PSolve_Links(btSoftBody* psb,btScalar kst,btScalar ti);
+ static void VSolve_Links(btSoftBody* psb,btScalar kst);
+ static psolver_t getSolver(ePSolver::_ solver);
+ static vsolver_t getSolver(eVSolver::_ solver);
+
+
+ virtual int calculateSerializeBufferSize() const;
+
+ ///fills the dataBuffer and returns the struct name (and 0 on failure)
+ virtual const char* serialize(void* dataBuffer, class btSerializer* serializer) const;
+
+ //virtual void serializeSingleObject(class btSerializer* serializer) const;
+
+
+};
+
+
+
+
+#endif //_BT_SOFT_BODY_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp b/tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp
new file mode 100644
index 00000000..04ee7ea7
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp
@@ -0,0 +1,368 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btSoftBodyConcaveCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionShapes/btConcaveShape.h"
+#include "BulletCollision/CollisionDispatch/btManifoldResult.h"
+#include "BulletCollision/NarrowPhaseCollision/btRaycastCallback.h"
+#include "BulletCollision/CollisionShapes/btTriangleShape.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionShapes/btTetrahedronShape.h"
+#include "BulletCollision/CollisionShapes/btConvexHullShape.h"
+
+
+
+#include "LinearMath/btIDebugDraw.h"
+#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
+#include "BulletSoftBody/btSoftBody.h"
+
+#define BT_SOFTBODY_TRIANGLE_EXTRUSION btScalar(0.06)//make this configurable
+
+btSoftBodyConcaveCollisionAlgorithm::btSoftBodyConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1,bool isSwapped)
+: btCollisionAlgorithm(ci),
+m_isSwapped(isSwapped),
+m_btSoftBodyTriangleCallback(ci.m_dispatcher1,body0,body1,isSwapped)
+{
+}
+
+
+
+btSoftBodyConcaveCollisionAlgorithm::~btSoftBodyConcaveCollisionAlgorithm()
+{
+}
+
+
+
+btSoftBodyTriangleCallback::btSoftBodyTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped):
+m_dispatcher(dispatcher),
+m_dispatchInfoPtr(0)
+{
+ m_softBody = (btSoftBody*) (isSwapped? body1:body0);
+ m_triBody = isSwapped? body0:body1;
+
+ //
+ // create the manifold from the dispatcher 'manifold pool'
+ //
+ // m_manifoldPtr = m_dispatcher->getNewManifold(m_convexBody,m_triBody);
+
+ clearCache();
+}
+
+btSoftBodyTriangleCallback::~btSoftBodyTriangleCallback()
+{
+ clearCache();
+ // m_dispatcher->releaseManifold( m_manifoldPtr );
+
+}
+
+
+void btSoftBodyTriangleCallback::clearCache()
+{
+ for (int i=0;i<m_shapeCache.size();i++)
+ {
+ btTriIndex* tmp = m_shapeCache.getAtIndex(i);
+ btAssert(tmp);
+ btAssert(tmp->m_childShape);
+ m_softBody->getWorldInfo()->m_sparsesdf.RemoveReferences(tmp->m_childShape);//necessary?
+ delete tmp->m_childShape;
+ }
+ m_shapeCache.clear();
+}
+
+
+void btSoftBodyTriangleCallback::processTriangle(btVector3* triangle,int partId, int triangleIndex)
+{
+ //just for debugging purposes
+ //printf("triangle %d",m_triangleCount++);
+ btCollisionObject* ob = static_cast<btCollisionObject*>(m_triBody);
+ btCollisionAlgorithmConstructionInfo ci;
+ ci.m_dispatcher1 = m_dispatcher;
+
+ ///debug drawing of the overlapping triangles
+ if (m_dispatchInfoPtr && m_dispatchInfoPtr->m_debugDraw && m_dispatchInfoPtr->m_debugDraw->getDebugMode() &btIDebugDraw::DBG_DrawWireframe)
+ {
+ btVector3 color(1,1,0);
+ btTransform& tr = ob->getWorldTransform();
+ m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[0]),tr(triangle[1]),color);
+ m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[1]),tr(triangle[2]),color);
+ m_dispatchInfoPtr->m_debugDraw->drawLine(tr(triangle[2]),tr(triangle[0]),color);
+ }
+
+ btTriIndex triIndex(partId,triangleIndex,0);
+ btHashKey<btTriIndex> triKey(triIndex.getUid());
+
+
+ btTriIndex* shapeIndex = m_shapeCache[triKey];
+ if (shapeIndex)
+ {
+ btCollisionShape* tm = shapeIndex->m_childShape;
+ btAssert(tm);
+
+ //copy over user pointers to temporary shape
+ tm->setUserPointer(ob->getRootCollisionShape()->getUserPointer());
+
+ btCollisionShape* tmpShape = ob->getCollisionShape();
+ ob->internalSetTemporaryCollisionShape( tm );
+
+
+ btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_softBody,m_triBody,0);//m_manifoldPtr);
+
+ colAlgo->processCollision(m_softBody,m_triBody,*m_dispatchInfoPtr,m_resultOut);
+ colAlgo->~btCollisionAlgorithm();
+ ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo);
+ ob->internalSetTemporaryCollisionShape( tmpShape);
+ return;
+ }
+
+ //aabb filter is already applied!
+
+ //btCollisionObject* colObj = static_cast<btCollisionObject*>(m_convexProxy->m_clientObject);
+
+ // if (m_softBody->getCollisionShape()->getShapeType()==
+ {
+ // btVector3 other;
+ btVector3 normal = (triangle[1]-triangle[0]).cross(triangle[2]-triangle[0]);
+ normal.normalize();
+ normal*= BT_SOFTBODY_TRIANGLE_EXTRUSION;
+ // other=(triangle[0]+triangle[1]+triangle[2])*0.333333f;
+ // other+=normal*22.f;
+ btVector3 pts[6] = {triangle[0]+normal,
+ triangle[1]+normal,
+ triangle[2]+normal,
+ triangle[0]-normal,
+ triangle[1]-normal,
+ triangle[2]-normal};
+
+ btConvexHullShape* tm = new btConvexHullShape(&pts[0].getX(),6);
+
+
+ // btBU_Simplex1to4 tm(triangle[0],triangle[1],triangle[2],other);
+
+ //btTriangleShape tm(triangle[0],triangle[1],triangle[2]);
+ // tm.setMargin(m_collisionMarginTriangle);
+
+ //copy over user pointers to temporary shape
+ tm->setUserPointer(ob->getRootCollisionShape()->getUserPointer());
+
+ btCollisionShape* tmpShape = ob->getCollisionShape();
+ ob->internalSetTemporaryCollisionShape( tm );
+
+
+ btCollisionAlgorithm* colAlgo = ci.m_dispatcher1->findAlgorithm(m_softBody,m_triBody,0);//m_manifoldPtr);
+ ///this should use the btDispatcher, so the actual registered algorithm is used
+ // btConvexConvexAlgorithm cvxcvxalgo(m_manifoldPtr,ci,m_convexBody,m_triBody);
+
+ //m_resultOut->setShapeIdentifiersB(partId,triangleIndex);
+ // cvxcvxalgo.processCollision(m_convexBody,m_triBody,*m_dispatchInfoPtr,m_resultOut);
+ colAlgo->processCollision(m_softBody,m_triBody,*m_dispatchInfoPtr,m_resultOut);
+ colAlgo->~btCollisionAlgorithm();
+ ci.m_dispatcher1->freeCollisionAlgorithm(colAlgo);
+
+
+ ob->internalSetTemporaryCollisionShape( tmpShape );
+ triIndex.m_childShape = tm;
+ m_shapeCache.insert(triKey,triIndex);
+
+ }
+
+
+
+}
+
+
+
+void btSoftBodyTriangleCallback::setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ m_dispatchInfoPtr = &dispatchInfo;
+ m_collisionMarginTriangle = collisionMarginTriangle+btScalar(BT_SOFTBODY_TRIANGLE_EXTRUSION);
+ m_resultOut = resultOut;
+
+
+ btVector3 aabbWorldSpaceMin,aabbWorldSpaceMax;
+ m_softBody->getAabb(aabbWorldSpaceMin,aabbWorldSpaceMax);
+ btVector3 halfExtents = (aabbWorldSpaceMax-aabbWorldSpaceMin)*btScalar(0.5);
+ btVector3 softBodyCenter = (aabbWorldSpaceMax+aabbWorldSpaceMin)*btScalar(0.5);
+
+ btTransform softTransform;
+ softTransform.setIdentity();
+ softTransform.setOrigin(softBodyCenter);
+
+ btTransform convexInTriangleSpace;
+ convexInTriangleSpace = m_triBody->getWorldTransform().inverse() * softTransform;
+ btTransformAabb(halfExtents,m_collisionMarginTriangle,convexInTriangleSpace,m_aabbMin,m_aabbMax);
+}
+
+void btSoftBodyConcaveCollisionAlgorithm::clearCache()
+{
+ m_btSoftBodyTriangleCallback.clearCache();
+
+}
+
+void btSoftBodyConcaveCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+
+
+ //btCollisionObject* convexBody = m_isSwapped ? body1 : body0;
+ btCollisionObject* triBody = m_isSwapped ? body0 : body1;
+
+ if (triBody->getCollisionShape()->isConcave())
+ {
+
+
+ btCollisionObject* triOb = triBody;
+ btConcaveShape* concaveShape = static_cast<btConcaveShape*>( triOb->getCollisionShape());
+
+ // if (convexBody->getCollisionShape()->isConvex())
+ {
+ btScalar collisionMarginTriangle = concaveShape->getMargin();
+
+ // resultOut->setPersistentManifold(m_btSoftBodyTriangleCallback.m_manifoldPtr);
+ m_btSoftBodyTriangleCallback.setTimeStepAndCounters(collisionMarginTriangle,dispatchInfo,resultOut);
+
+ //Disable persistency. previously, some older algorithm calculated all contacts in one go, so you can clear it here.
+ //m_dispatcher->clearManifold(m_btSoftBodyTriangleCallback.m_manifoldPtr);
+
+ // m_btSoftBodyTriangleCallback.m_manifoldPtr->setBodies(convexBody,triBody);
+
+
+ concaveShape->processAllTriangles( &m_btSoftBodyTriangleCallback,m_btSoftBodyTriangleCallback.getAabbMin(),m_btSoftBodyTriangleCallback.getAabbMax());
+
+ // resultOut->refreshContactPoints();
+
+ }
+
+ }
+
+}
+
+
+btScalar btSoftBodyConcaveCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ btCollisionObject* convexbody = m_isSwapped ? body1 : body0;
+ btCollisionObject* triBody = m_isSwapped ? body0 : body1;
+
+
+ //quick approximation using raycast, todo: hook up to the continuous collision detection (one of the btConvexCast)
+
+ //only perform CCD above a certain threshold, this prevents blocking on the long run
+ //because object in a blocked ccd state (hitfraction<1) get their linear velocity halved each frame...
+ btScalar squareMot0 = (convexbody->getInterpolationWorldTransform().getOrigin() - convexbody->getWorldTransform().getOrigin()).length2();
+ if (squareMot0 < convexbody->getCcdSquareMotionThreshold())
+ {
+ return btScalar(1.);
+ }
+
+ //const btVector3& from = convexbody->m_worldTransform.getOrigin();
+ //btVector3 to = convexbody->m_interpolationWorldTransform.getOrigin();
+ //todo: only do if the motion exceeds the 'radius'
+
+ btTransform triInv = triBody->getWorldTransform().inverse();
+ btTransform convexFromLocal = triInv * convexbody->getWorldTransform();
+ btTransform convexToLocal = triInv * convexbody->getInterpolationWorldTransform();
+
+ struct LocalTriangleSphereCastCallback : public btTriangleCallback
+ {
+ btTransform m_ccdSphereFromTrans;
+ btTransform m_ccdSphereToTrans;
+ btTransform m_meshTransform;
+
+ btScalar m_ccdSphereRadius;
+ btScalar m_hitFraction;
+
+
+ LocalTriangleSphereCastCallback(const btTransform& from,const btTransform& to,btScalar ccdSphereRadius,btScalar hitFraction)
+ :m_ccdSphereFromTrans(from),
+ m_ccdSphereToTrans(to),
+ m_ccdSphereRadius(ccdSphereRadius),
+ m_hitFraction(hitFraction)
+ {
+ }
+
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex)
+ {
+ (void)partId;
+ (void)triangleIndex;
+ //do a swept sphere for now
+ btTransform ident;
+ ident.setIdentity();
+ btConvexCast::CastResult castResult;
+ castResult.m_fraction = m_hitFraction;
+ btSphereShape pointShape(m_ccdSphereRadius);
+ btTriangleShape triShape(triangle[0],triangle[1],triangle[2]);
+ btVoronoiSimplexSolver simplexSolver;
+ btSubsimplexConvexCast convexCaster(&pointShape,&triShape,&simplexSolver);
+ //GjkConvexCast convexCaster(&pointShape,convexShape,&simplexSolver);
+ //ContinuousConvexCollision convexCaster(&pointShape,convexShape,&simplexSolver,0);
+ //local space?
+
+ if (convexCaster.calcTimeOfImpact(m_ccdSphereFromTrans,m_ccdSphereToTrans,
+ ident,ident,castResult))
+ {
+ if (m_hitFraction > castResult.m_fraction)
+ m_hitFraction = castResult.m_fraction;
+ }
+
+ }
+
+ };
+
+
+
+
+
+ if (triBody->getCollisionShape()->isConcave())
+ {
+ btVector3 rayAabbMin = convexFromLocal.getOrigin();
+ rayAabbMin.setMin(convexToLocal.getOrigin());
+ btVector3 rayAabbMax = convexFromLocal.getOrigin();
+ rayAabbMax.setMax(convexToLocal.getOrigin());
+ btScalar ccdRadius0 = convexbody->getCcdSweptSphereRadius();
+ rayAabbMin -= btVector3(ccdRadius0,ccdRadius0,ccdRadius0);
+ rayAabbMax += btVector3(ccdRadius0,ccdRadius0,ccdRadius0);
+
+ btScalar curHitFraction = btScalar(1.); //is this available?
+ LocalTriangleSphereCastCallback raycastCallback(convexFromLocal,convexToLocal,
+ convexbody->getCcdSweptSphereRadius(),curHitFraction);
+
+ raycastCallback.m_hitFraction = convexbody->getHitFraction();
+
+ btCollisionObject* concavebody = triBody;
+
+ btConcaveShape* triangleMesh = (btConcaveShape*) concavebody->getCollisionShape();
+
+ if (triangleMesh)
+ {
+ triangleMesh->processAllTriangles(&raycastCallback,rayAabbMin,rayAabbMax);
+ }
+
+
+
+ if (raycastCallback.m_hitFraction < convexbody->getHitFraction())
+ {
+ convexbody->setHitFraction( raycastCallback.m_hitFraction);
+ return raycastCallback.m_hitFraction;
+ }
+ }
+
+ return btScalar(1.);
+
+}
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h b/tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
new file mode 100644
index 00000000..11ec5b37
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
@@ -0,0 +1,153 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H
+#define BT_SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/CollisionShapes/btTriangleCallback.h"
+#include "BulletCollision/NarrowPhaseCollision/btPersistentManifold.h"
+class btDispatcher;
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+class btSoftBody;
+class btCollisionShape;
+
+#include "LinearMath/btHashMap.h"
+
+#include "BulletCollision/BroadphaseCollision/btQuantizedBvh.h" //for definition of MAX_NUM_PARTS_IN_BITS
+
+struct btTriIndex
+{
+ int m_PartIdTriangleIndex;
+ class btCollisionShape* m_childShape;
+
+ btTriIndex(int partId,int triangleIndex,btCollisionShape* shape)
+ {
+ m_PartIdTriangleIndex = (partId<<(31-MAX_NUM_PARTS_IN_BITS)) | triangleIndex;
+ m_childShape = shape;
+ }
+
+ int getTriangleIndex() const
+ {
+ // Get only the lower bits where the triangle index is stored
+ return (m_PartIdTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
+ }
+ int getPartId() const
+ {
+ // Get only the highest bits where the part index is stored
+ return (m_PartIdTriangleIndex>>(31-MAX_NUM_PARTS_IN_BITS));
+ }
+ int getUid() const
+ {
+ return m_PartIdTriangleIndex;
+ }
+};
+
+
+///For each triangle in the concave mesh that overlaps with the AABB of a soft body (m_softBody), processTriangle is called.
+class btSoftBodyTriangleCallback : public btTriangleCallback
+{
+ btSoftBody* m_softBody;
+ btCollisionObject* m_triBody;
+
+ btVector3 m_aabbMin;
+ btVector3 m_aabbMax ;
+
+ btManifoldResult* m_resultOut;
+
+ btDispatcher* m_dispatcher;
+ const btDispatcherInfo* m_dispatchInfoPtr;
+ btScalar m_collisionMarginTriangle;
+
+ btHashMap<btHashKey<btTriIndex>,btTriIndex> m_shapeCache;
+
+public:
+ int m_triangleCount;
+
+ // btPersistentManifold* m_manifoldPtr;
+
+ btSoftBodyTriangleCallback(btDispatcher* dispatcher,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped);
+
+ void setTimeStepAndCounters(btScalar collisionMarginTriangle,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual ~btSoftBodyTriangleCallback();
+
+ virtual void processTriangle(btVector3* triangle, int partId, int triangleIndex);
+
+ void clearCache();
+
+ SIMD_FORCE_INLINE const btVector3& getAabbMin() const
+ {
+ return m_aabbMin;
+ }
+ SIMD_FORCE_INLINE const btVector3& getAabbMax() const
+ {
+ return m_aabbMax;
+ }
+
+};
+
+
+
+
+/// btSoftBodyConcaveCollisionAlgorithm supports collision between soft body shapes and (concave) trianges meshes.
+class btSoftBodyConcaveCollisionAlgorithm : public btCollisionAlgorithm
+{
+
+ bool m_isSwapped;
+
+ btSoftBodyTriangleCallback m_btSoftBodyTriangleCallback;
+
+public:
+
+ btSoftBodyConcaveCollisionAlgorithm( const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1,bool isSwapped);
+
+ virtual ~btSoftBodyConcaveCollisionAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ //we don't add any manifolds
+ }
+
+ void clearCache();
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSoftBodyConcaveCollisionAlgorithm));
+ return new(mem) btSoftBodyConcaveCollisionAlgorithm(ci,body0,body1,false);
+ }
+ };
+
+ struct SwappedCreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSoftBodyConcaveCollisionAlgorithm));
+ return new(mem) btSoftBodyConcaveCollisionAlgorithm(ci,body0,body1,true);
+ }
+ };
+
+};
+
+#endif //BT_SOFT_BODY_CONCAVE_COLLISION_ALGORITHM_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyData.h b/tests/bullet/src/BulletSoftBody/btSoftBodyData.h
new file mode 100644
index 00000000..a2fde77a
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyData.h
@@ -0,0 +1,217 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFTBODY_FLOAT_DATA
+#define BT_SOFTBODY_FLOAT_DATA
+
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+
+
+struct SoftBodyMaterialData
+{
+ float m_linearStiffness;
+ float m_angularStiffness;
+ float m_volumeStiffness;
+ int m_flags;
+};
+
+struct SoftBodyNodeData
+{
+ SoftBodyMaterialData *m_material;
+ btVector3FloatData m_position;
+ btVector3FloatData m_previousPosition;
+ btVector3FloatData m_velocity;
+ btVector3FloatData m_accumulatedForce;
+ btVector3FloatData m_normal;
+ float m_inverseMass;
+ float m_area;
+ int m_attach;
+ int m_pad;
+};
+
+struct SoftBodyLinkData
+{
+ SoftBodyMaterialData *m_material;
+ int m_nodeIndices[2]; // Node pointers
+ float m_restLength; // Rest length
+ int m_bbending; // Bending link
+};
+
+struct SoftBodyFaceData
+{
+ btVector3FloatData m_normal; // Normal
+ SoftBodyMaterialData *m_material;
+ int m_nodeIndices[3]; // Node pointers
+ float m_restArea; // Rest area
+};
+
+struct SoftBodyTetraData
+{
+ btVector3FloatData m_c0[4]; // gradients
+ SoftBodyMaterialData *m_material;
+ int m_nodeIndices[4]; // Node pointers
+ float m_restVolume; // Rest volume
+ float m_c1; // (4*kVST)/(im0+im1+im2+im3)
+ float m_c2; // m_c1/sum(|g0..3|^2)
+ int m_pad;
+};
+
+struct SoftRigidAnchorData
+{
+ btMatrix3x3FloatData m_c0; // Impulse matrix
+ btVector3FloatData m_c1; // Relative anchor
+ btVector3FloatData m_localFrame; // Anchor position in body space
+ btRigidBodyData *m_rigidBody;
+ int m_nodeIndex; // Node pointer
+ float m_c2; // ima*dt
+};
+
+
+
+struct SoftBodyConfigData
+{
+ int m_aeroModel; // Aerodynamic model (default: V_Point)
+ float m_baumgarte; // Velocities correction factor (Baumgarte)
+ float m_damping; // Damping coefficient [0,1]
+ float m_drag; // Drag coefficient [0,+inf]
+ float m_lift; // Lift coefficient [0,+inf]
+ float m_pressure; // Pressure coefficient [-inf,+inf]
+ float m_volume; // Volume conversation coefficient [0,+inf]
+ float m_dynamicFriction; // Dynamic friction coefficient [0,1]
+ float m_poseMatch; // Pose matching coefficient [0,1]
+ float m_rigidContactHardness; // Rigid contacts hardness [0,1]
+ float m_kineticContactHardness; // Kinetic contacts hardness [0,1]
+ float m_softContactHardness; // Soft contacts hardness [0,1]
+ float m_anchorHardness; // Anchors hardness [0,1]
+ float m_softRigidClusterHardness; // Soft vs rigid hardness [0,1] (cluster only)
+ float m_softKineticClusterHardness; // Soft vs kinetic hardness [0,1] (cluster only)
+ float m_softSoftClusterHardness; // Soft vs soft hardness [0,1] (cluster only)
+ float m_softRigidClusterImpulseSplit; // Soft vs rigid impulse split [0,1] (cluster only)
+ float m_softKineticClusterImpulseSplit; // Soft vs rigid impulse split [0,1] (cluster only)
+ float m_softSoftClusterImpulseSplit; // Soft vs rigid impulse split [0,1] (cluster only)
+ float m_maxVolume; // Maximum volume ratio for pose
+ float m_timeScale; // Time scale
+ int m_velocityIterations; // Velocities solver iterations
+ int m_positionIterations; // Positions solver iterations
+ int m_driftIterations; // Drift solver iterations
+ int m_clusterIterations; // Cluster solver iterations
+ int m_collisionFlags; // Collisions flags
+};
+
+struct SoftBodyPoseData
+{
+ btMatrix3x3FloatData m_rot; // Rotation
+ btMatrix3x3FloatData m_scale; // Scale
+ btMatrix3x3FloatData m_aqq; // Base scaling
+ btVector3FloatData m_com; // COM
+
+ btVector3FloatData *m_positions; // Reference positions
+ float *m_weights; // Weights
+ int m_numPositions;
+ int m_numWeigts;
+
+ int m_bvolume; // Is valid
+ int m_bframe; // Is frame
+ float m_restVolume; // Rest volume
+ int m_pad;
+};
+
+struct SoftBodyClusterData
+{
+ btTransformFloatData m_framexform;
+ btMatrix3x3FloatData m_locii;
+ btMatrix3x3FloatData m_invwi;
+ btVector3FloatData m_com;
+ btVector3FloatData m_vimpulses[2];
+ btVector3FloatData m_dimpulses[2];
+ btVector3FloatData m_lv;
+ btVector3FloatData m_av;
+
+ btVector3FloatData *m_framerefs;
+ int *m_nodeIndices;
+ float *m_masses;
+
+ int m_numFrameRefs;
+ int m_numNodes;
+ int m_numMasses;
+
+ float m_idmass;
+ float m_imass;
+ int m_nvimpulses;
+ int m_ndimpulses;
+ float m_ndamping;
+ float m_ldamping;
+ float m_adamping;
+ float m_matching;
+ float m_maxSelfCollisionImpulse;
+ float m_selfCollisionImpulseFactor;
+ int m_containsAnchor;
+ int m_collide;
+ int m_clusterIndex;
+};
+
+
+enum btSoftJointBodyType
+{
+ BT_JOINT_SOFT_BODY_CLUSTER=1,
+ BT_JOINT_RIGID_BODY,
+ BT_JOINT_COLLISION_OBJECT
+};
+
+struct btSoftBodyJointData
+{
+ void *m_bodyA;
+ void *m_bodyB;
+ btVector3FloatData m_refs[2];
+ float m_cfm;
+ float m_erp;
+ float m_split;
+ int m_delete;
+ btVector3FloatData m_relPosition[2];//linear
+ int m_bodyAtype;
+ int m_bodyBtype;
+ int m_jointType;
+ int m_pad;
+};
+
+///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
+struct btSoftBodyFloatData
+{
+ btCollisionObjectFloatData m_collisionObjectData;
+
+ SoftBodyPoseData *m_pose;
+ SoftBodyMaterialData **m_materials;
+ SoftBodyNodeData *m_nodes;
+ SoftBodyLinkData *m_links;
+ SoftBodyFaceData *m_faces;
+ SoftBodyTetraData *m_tetrahedra;
+ SoftRigidAnchorData *m_anchors;
+ SoftBodyClusterData *m_clusters;
+ btSoftBodyJointData *m_joints;
+
+ int m_numMaterials;
+ int m_numNodes;
+ int m_numLinks;
+ int m_numFaces;
+ int m_numTetrahedra;
+ int m_numAnchors;
+ int m_numClusters;
+ int m_numJoints;
+ SoftBodyConfigData m_config;
+};
+
+#endif //BT_SOFTBODY_FLOAT_DATA
+
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.cpp b/tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.cpp
new file mode 100644
index 00000000..96a50a3f
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.cpp
@@ -0,0 +1,1055 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///btSoftBodyHelpers.cpp by Nathanael Presson
+
+#include "btSoftBodyInternals.h"
+#include <stdio.h>
+#include <string.h>
+#include "btSoftBodyHelpers.h"
+#include "LinearMath/btConvexHull.h"
+#include "LinearMath/btConvexHullComputer.h"
+
+
+//
+static void drawVertex( btIDebugDraw* idraw,
+ const btVector3& x,btScalar s,const btVector3& c)
+{
+ idraw->drawLine(x-btVector3(s,0,0),x+btVector3(s,0,0),c);
+ idraw->drawLine(x-btVector3(0,s,0),x+btVector3(0,s,0),c);
+ idraw->drawLine(x-btVector3(0,0,s),x+btVector3(0,0,s),c);
+}
+
+//
+static void drawBox( btIDebugDraw* idraw,
+ const btVector3& mins,
+ const btVector3& maxs,
+ const btVector3& color)
+{
+ const btVector3 c[]={ btVector3(mins.x(),mins.y(),mins.z()),
+ btVector3(maxs.x(),mins.y(),mins.z()),
+ btVector3(maxs.x(),maxs.y(),mins.z()),
+ btVector3(mins.x(),maxs.y(),mins.z()),
+ btVector3(mins.x(),mins.y(),maxs.z()),
+ btVector3(maxs.x(),mins.y(),maxs.z()),
+ btVector3(maxs.x(),maxs.y(),maxs.z()),
+ btVector3(mins.x(),maxs.y(),maxs.z())};
+ idraw->drawLine(c[0],c[1],color);idraw->drawLine(c[1],c[2],color);
+ idraw->drawLine(c[2],c[3],color);idraw->drawLine(c[3],c[0],color);
+ idraw->drawLine(c[4],c[5],color);idraw->drawLine(c[5],c[6],color);
+ idraw->drawLine(c[6],c[7],color);idraw->drawLine(c[7],c[4],color);
+ idraw->drawLine(c[0],c[4],color);idraw->drawLine(c[1],c[5],color);
+ idraw->drawLine(c[2],c[6],color);idraw->drawLine(c[3],c[7],color);
+}
+
+//
+static void drawTree( btIDebugDraw* idraw,
+ const btDbvtNode* node,
+ int depth,
+ const btVector3& ncolor,
+ const btVector3& lcolor,
+ int mindepth,
+ int maxdepth)
+{
+ if(node)
+ {
+ if(node->isinternal()&&((depth<maxdepth)||(maxdepth<0)))
+ {
+ drawTree(idraw,node->childs[0],depth+1,ncolor,lcolor,mindepth,maxdepth);
+ drawTree(idraw,node->childs[1],depth+1,ncolor,lcolor,mindepth,maxdepth);
+ }
+ if(depth>=mindepth)
+ {
+ const btScalar scl=(btScalar)(node->isinternal()?1:1);
+ const btVector3 mi=node->volume.Center()-node->volume.Extents()*scl;
+ const btVector3 mx=node->volume.Center()+node->volume.Extents()*scl;
+ drawBox(idraw,mi,mx,node->isleaf()?lcolor:ncolor);
+ }
+ }
+}
+
+//
+template <typename T>
+static inline T sum(const btAlignedObjectArray<T>& items)
+{
+ T v;
+ if(items.size())
+ {
+ v=items[0];
+ for(int i=1,ni=items.size();i<ni;++i)
+ {
+ v+=items[i];
+ }
+ }
+ return(v);
+}
+
+//
+template <typename T,typename Q>
+static inline void add(btAlignedObjectArray<T>& items,const Q& value)
+{
+ for(int i=0,ni=items.size();i<ni;++i)
+ {
+ items[i]+=value;
+ }
+}
+
+//
+template <typename T,typename Q>
+static inline void mul(btAlignedObjectArray<T>& items,const Q& value)
+{
+ for(int i=0,ni=items.size();i<ni;++i)
+ {
+ items[i]*=value;
+ }
+}
+
+//
+template <typename T>
+static inline T average(const btAlignedObjectArray<T>& items)
+{
+ const btScalar n=(btScalar)(items.size()>0?items.size():1);
+ return(sum(items)/n);
+}
+
+//
+static inline btScalar tetravolume(const btVector3& x0,
+ const btVector3& x1,
+ const btVector3& x2,
+ const btVector3& x3)
+{
+ const btVector3 a=x1-x0;
+ const btVector3 b=x2-x0;
+ const btVector3 c=x3-x0;
+ return(btDot(a,btCross(b,c)));
+}
+
+//
+#if 0
+static btVector3 stresscolor(btScalar stress)
+{
+ static const btVector3 spectrum[]= { btVector3(1,0,1),
+ btVector3(0,0,1),
+ btVector3(0,1,1),
+ btVector3(0,1,0),
+ btVector3(1,1,0),
+ btVector3(1,0,0),
+ btVector3(1,0,0)};
+ static const int ncolors=sizeof(spectrum)/sizeof(spectrum[0])-1;
+ static const btScalar one=1;
+ stress=btMax<btScalar>(0,btMin<btScalar>(1,stress))*ncolors;
+ const int sel=(int)stress;
+ const btScalar frc=stress-sel;
+ return(spectrum[sel]+(spectrum[sel+1]-spectrum[sel])*frc);
+}
+#endif
+
+//
+void btSoftBodyHelpers::Draw( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int drawflags)
+{
+ const btScalar scl=(btScalar)0.1;
+ const btScalar nscl=scl*5;
+ const btVector3 lcolor=btVector3(0,0,0);
+ const btVector3 ncolor=btVector3(1,1,1);
+ const btVector3 ccolor=btVector3(1,0,0);
+ int i,j,nj;
+
+ /* Clusters */
+ if(0!=(drawflags&fDrawFlags::Clusters))
+ {
+ srand(1806);
+ for(i=0;i<psb->m_clusters.size();++i)
+ {
+ if(psb->m_clusters[i]->m_collide)
+ {
+ btVector3 color( rand()/(btScalar)RAND_MAX,
+ rand()/(btScalar)RAND_MAX,
+ rand()/(btScalar)RAND_MAX);
+ color=color.normalized()*0.75;
+ btAlignedObjectArray<btVector3> vertices;
+ vertices.resize(psb->m_clusters[i]->m_nodes.size());
+ for(j=0,nj=vertices.size();j<nj;++j)
+ {
+ vertices[j]=psb->m_clusters[i]->m_nodes[j]->m_x;
+ }
+#define USE_NEW_CONVEX_HULL_COMPUTER
+#ifdef USE_NEW_CONVEX_HULL_COMPUTER
+ btConvexHullComputer computer;
+ int stride = sizeof(btVector3);
+ int count = vertices.size();
+ btScalar shrink=0.f;
+ btScalar shrinkClamp=0.f;
+ computer.compute(&vertices[0].getX(),stride,count,shrink,shrinkClamp);
+ for (int i=0;i<computer.faces.size();i++)
+ {
+
+ int face = computer.faces[i];
+ //printf("face=%d\n",face);
+ const btConvexHullComputer::Edge* firstEdge = &computer.edges[face];
+ const btConvexHullComputer::Edge* edge = firstEdge->getNextEdgeOfFace();
+
+ int v0 = firstEdge->getSourceVertex();
+ int v1 = firstEdge->getTargetVertex();
+ while (edge!=firstEdge)
+ {
+ int v2 = edge->getTargetVertex();
+ idraw->drawTriangle(computer.vertices[v0],computer.vertices[v1],computer.vertices[v2],color,1);
+ edge = edge->getNextEdgeOfFace();
+ v0=v1;
+ v1=v2;
+ };
+ }
+#else
+
+ HullDesc hdsc(QF_TRIANGLES,vertices.size(),&vertices[0]);
+ HullResult hres;
+ HullLibrary hlib;
+ hdsc.mMaxVertices=vertices.size();
+ hlib.CreateConvexHull(hdsc,hres);
+ const btVector3 center=average(hres.m_OutputVertices);
+ add(hres.m_OutputVertices,-center);
+ mul(hres.m_OutputVertices,(btScalar)1);
+ add(hres.m_OutputVertices,center);
+ for(j=0;j<(int)hres.mNumFaces;++j)
+ {
+ const int idx[]={hres.m_Indices[j*3+0],hres.m_Indices[j*3+1],hres.m_Indices[j*3+2]};
+ idraw->drawTriangle(hres.m_OutputVertices[idx[0]],
+ hres.m_OutputVertices[idx[1]],
+ hres.m_OutputVertices[idx[2]],
+ color,1);
+ }
+ hlib.ReleaseResult(hres);
+#endif
+
+ }
+ /* Velocities */
+#if 0
+ for(int j=0;j<psb->m_clusters[i].m_nodes.size();++j)
+ {
+ const btSoftBody::Cluster& c=psb->m_clusters[i];
+ const btVector3 r=c.m_nodes[j]->m_x-c.m_com;
+ const btVector3 v=c.m_lv+btCross(c.m_av,r);
+ idraw->drawLine(c.m_nodes[j]->m_x,c.m_nodes[j]->m_x+v,btVector3(1,0,0));
+ }
+#endif
+ /* Frame */
+ // btSoftBody::Cluster& c=*psb->m_clusters[i];
+ // idraw->drawLine(c.m_com,c.m_framexform*btVector3(10,0,0),btVector3(1,0,0));
+ // idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,10,0),btVector3(0,1,0));
+ // idraw->drawLine(c.m_com,c.m_framexform*btVector3(0,0,10),btVector3(0,0,1));
+ }
+ }
+ else
+ {
+ /* Nodes */
+ if(0!=(drawflags&fDrawFlags::Nodes))
+ {
+ for(i=0;i<psb->m_nodes.size();++i)
+ {
+ const btSoftBody::Node& n=psb->m_nodes[i];
+ if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
+ idraw->drawLine(n.m_x-btVector3(scl,0,0),n.m_x+btVector3(scl,0,0),btVector3(1,0,0));
+ idraw->drawLine(n.m_x-btVector3(0,scl,0),n.m_x+btVector3(0,scl,0),btVector3(0,1,0));
+ idraw->drawLine(n.m_x-btVector3(0,0,scl),n.m_x+btVector3(0,0,scl),btVector3(0,0,1));
+ }
+ }
+ /* Links */
+ if(0!=(drawflags&fDrawFlags::Links))
+ {
+ for(i=0;i<psb->m_links.size();++i)
+ {
+ const btSoftBody::Link& l=psb->m_links[i];
+ if(0==(l.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
+ idraw->drawLine(l.m_n[0]->m_x,l.m_n[1]->m_x,lcolor);
+ }
+ }
+ /* Normals */
+ if(0!=(drawflags&fDrawFlags::Normals))
+ {
+ for(i=0;i<psb->m_nodes.size();++i)
+ {
+ const btSoftBody::Node& n=psb->m_nodes[i];
+ if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
+ const btVector3 d=n.m_n*nscl;
+ idraw->drawLine(n.m_x,n.m_x+d,ncolor);
+ idraw->drawLine(n.m_x,n.m_x-d,ncolor*0.5);
+ }
+ }
+ /* Contacts */
+ if(0!=(drawflags&fDrawFlags::Contacts))
+ {
+ static const btVector3 axis[]={btVector3(1,0,0),
+ btVector3(0,1,0),
+ btVector3(0,0,1)};
+ for(i=0;i<psb->m_rcontacts.size();++i)
+ {
+ const btSoftBody::RContact& c=psb->m_rcontacts[i];
+ const btVector3 o= c.m_node->m_x-c.m_cti.m_normal*
+ (btDot(c.m_node->m_x,c.m_cti.m_normal)+c.m_cti.m_offset);
+ const btVector3 x=btCross(c.m_cti.m_normal,axis[c.m_cti.m_normal.minAxis()]).normalized();
+ const btVector3 y=btCross(x,c.m_cti.m_normal).normalized();
+ idraw->drawLine(o-x*nscl,o+x*nscl,ccolor);
+ idraw->drawLine(o-y*nscl,o+y*nscl,ccolor);
+ idraw->drawLine(o,o+c.m_cti.m_normal*nscl*3,btVector3(1,1,0));
+ }
+ }
+ /* Faces */
+ if(0!=(drawflags&fDrawFlags::Faces))
+ {
+ const btScalar scl=(btScalar)0.8;
+ const btScalar alp=(btScalar)1;
+ const btVector3 col(0,(btScalar)0.7,0);
+ for(i=0;i<psb->m_faces.size();++i)
+ {
+ const btSoftBody::Face& f=psb->m_faces[i];
+ if(0==(f.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
+ const btVector3 x[]={f.m_n[0]->m_x,f.m_n[1]->m_x,f.m_n[2]->m_x};
+ const btVector3 c=(x[0]+x[1]+x[2])/3;
+ idraw->drawTriangle((x[0]-c)*scl+c,
+ (x[1]-c)*scl+c,
+ (x[2]-c)*scl+c,
+ col,alp);
+ }
+ }
+ /* Tetras */
+ if(0!=(drawflags&fDrawFlags::Tetras))
+ {
+ const btScalar scl=(btScalar)0.8;
+ const btScalar alp=(btScalar)1;
+ const btVector3 col((btScalar)0.7,(btScalar)0.7,(btScalar)0.7);
+ for(int i=0;i<psb->m_tetras.size();++i)
+ {
+ const btSoftBody::Tetra& t=psb->m_tetras[i];
+ if(0==(t.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
+ const btVector3 x[]={t.m_n[0]->m_x,t.m_n[1]->m_x,t.m_n[2]->m_x,t.m_n[3]->m_x};
+ const btVector3 c=(x[0]+x[1]+x[2]+x[3])/4;
+ idraw->drawTriangle((x[0]-c)*scl+c,(x[1]-c)*scl+c,(x[2]-c)*scl+c,col,alp);
+ idraw->drawTriangle((x[0]-c)*scl+c,(x[1]-c)*scl+c,(x[3]-c)*scl+c,col,alp);
+ idraw->drawTriangle((x[1]-c)*scl+c,(x[2]-c)*scl+c,(x[3]-c)*scl+c,col,alp);
+ idraw->drawTriangle((x[2]-c)*scl+c,(x[0]-c)*scl+c,(x[3]-c)*scl+c,col,alp);
+ }
+ }
+ }
+ /* Anchors */
+ if(0!=(drawflags&fDrawFlags::Anchors))
+ {
+ for(i=0;i<psb->m_anchors.size();++i)
+ {
+ const btSoftBody::Anchor& a=psb->m_anchors[i];
+ const btVector3 q=a.m_body->getWorldTransform()*a.m_local;
+ drawVertex(idraw,a.m_node->m_x,0.25,btVector3(1,0,0));
+ drawVertex(idraw,q,0.25,btVector3(0,1,0));
+ idraw->drawLine(a.m_node->m_x,q,btVector3(1,1,1));
+ }
+ for(i=0;i<psb->m_nodes.size();++i)
+ {
+ const btSoftBody::Node& n=psb->m_nodes[i];
+ if(0==(n.m_material->m_flags&btSoftBody::fMaterial::DebugDraw)) continue;
+ if(n.m_im<=0)
+ {
+ drawVertex(idraw,n.m_x,0.25,btVector3(1,0,0));
+ }
+ }
+ }
+
+
+ /* Notes */
+ if(0!=(drawflags&fDrawFlags::Notes))
+ {
+ for(i=0;i<psb->m_notes.size();++i)
+ {
+ const btSoftBody::Note& n=psb->m_notes[i];
+ btVector3 p=n.m_offset;
+ for(int j=0;j<n.m_rank;++j)
+ {
+ p+=n.m_nodes[j]->m_x*n.m_coords[j];
+ }
+ idraw->draw3dText(p,n.m_text);
+ }
+ }
+ /* Node tree */
+ if(0!=(drawflags&fDrawFlags::NodeTree)) DrawNodeTree(psb,idraw);
+ /* Face tree */
+ if(0!=(drawflags&fDrawFlags::FaceTree)) DrawFaceTree(psb,idraw);
+ /* Cluster tree */
+ if(0!=(drawflags&fDrawFlags::ClusterTree)) DrawClusterTree(psb,idraw);
+ /* Joints */
+ if(0!=(drawflags&fDrawFlags::Joints))
+ {
+ for(i=0;i<psb->m_joints.size();++i)
+ {
+ const btSoftBody::Joint* pj=psb->m_joints[i];
+ switch(pj->Type())
+ {
+ case btSoftBody::Joint::eType::Linear:
+ {
+ const btSoftBody::LJoint* pjl=(const btSoftBody::LJoint*)pj;
+ const btVector3 a0=pj->m_bodies[0].xform()*pjl->m_refs[0];
+ const btVector3 a1=pj->m_bodies[1].xform()*pjl->m_refs[1];
+ idraw->drawLine(pj->m_bodies[0].xform().getOrigin(),a0,btVector3(1,1,0));
+ idraw->drawLine(pj->m_bodies[1].xform().getOrigin(),a1,btVector3(0,1,1));
+ drawVertex(idraw,a0,0.25,btVector3(1,1,0));
+ drawVertex(idraw,a1,0.25,btVector3(0,1,1));
+ }
+ break;
+ case btSoftBody::Joint::eType::Angular:
+ {
+ //const btSoftBody::AJoint* pja=(const btSoftBody::AJoint*)pj;
+ const btVector3 o0=pj->m_bodies[0].xform().getOrigin();
+ const btVector3 o1=pj->m_bodies[1].xform().getOrigin();
+ const btVector3 a0=pj->m_bodies[0].xform().getBasis()*pj->m_refs[0];
+ const btVector3 a1=pj->m_bodies[1].xform().getBasis()*pj->m_refs[1];
+ idraw->drawLine(o0,o0+a0*10,btVector3(1,1,0));
+ idraw->drawLine(o0,o0+a1*10,btVector3(1,1,0));
+ idraw->drawLine(o1,o1+a0*10,btVector3(0,1,1));
+ idraw->drawLine(o1,o1+a1*10,btVector3(0,1,1));
+ break;
+ }
+ default:
+ {
+ }
+
+ }
+ }
+ }
+}
+
+//
+void btSoftBodyHelpers::DrawInfos( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ bool masses,
+ bool areas,
+ bool /*stress*/)
+{
+ for(int i=0;i<psb->m_nodes.size();++i)
+ {
+ const btSoftBody::Node& n=psb->m_nodes[i];
+ char text[2048]={0};
+ char buff[1024];
+ if(masses)
+ {
+ sprintf(buff," M(%.2f)",1/n.m_im);
+ strcat(text,buff);
+ }
+ if(areas)
+ {
+ sprintf(buff," A(%.2f)",n.m_area);
+ strcat(text,buff);
+ }
+ if(text[0]) idraw->draw3dText(n.m_x,text);
+ }
+}
+
+//
+void btSoftBodyHelpers::DrawNodeTree( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int mindepth,
+ int maxdepth)
+{
+ drawTree(idraw,psb->m_ndbvt.m_root,0,btVector3(1,0,1),btVector3(1,1,1),mindepth,maxdepth);
+}
+
+//
+void btSoftBodyHelpers::DrawFaceTree( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int mindepth,
+ int maxdepth)
+{
+ drawTree(idraw,psb->m_fdbvt.m_root,0,btVector3(0,1,0),btVector3(1,0,0),mindepth,maxdepth);
+}
+
+//
+void btSoftBodyHelpers::DrawClusterTree( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int mindepth,
+ int maxdepth)
+{
+ drawTree(idraw,psb->m_cdbvt.m_root,0,btVector3(0,1,1),btVector3(1,0,0),mindepth,maxdepth);
+}
+
+//
+void btSoftBodyHelpers::DrawFrame( btSoftBody* psb,
+ btIDebugDraw* idraw)
+{
+ if(psb->m_pose.m_bframe)
+ {
+ static const btScalar ascl=10;
+ static const btScalar nscl=(btScalar)0.1;
+ const btVector3 com=psb->m_pose.m_com;
+ const btMatrix3x3 trs=psb->m_pose.m_rot*psb->m_pose.m_scl;
+ const btVector3 Xaxis=(trs*btVector3(1,0,0)).normalized();
+ const btVector3 Yaxis=(trs*btVector3(0,1,0)).normalized();
+ const btVector3 Zaxis=(trs*btVector3(0,0,1)).normalized();
+ idraw->drawLine(com,com+Xaxis*ascl,btVector3(1,0,0));
+ idraw->drawLine(com,com+Yaxis*ascl,btVector3(0,1,0));
+ idraw->drawLine(com,com+Zaxis*ascl,btVector3(0,0,1));
+ for(int i=0;i<psb->m_pose.m_pos.size();++i)
+ {
+ const btVector3 x=com+trs*psb->m_pose.m_pos[i];
+ drawVertex(idraw,x,nscl,btVector3(1,0,1));
+ }
+ }
+}
+
+//
+btSoftBody* btSoftBodyHelpers::CreateRope( btSoftBodyWorldInfo& worldInfo, const btVector3& from,
+ const btVector3& to,
+ int res,
+ int fixeds)
+{
+ /* Create nodes */
+ const int r=res+2;
+ btVector3* x=new btVector3[r];
+ btScalar* m=new btScalar[r];
+ int i;
+
+ for(i=0;i<r;++i)
+ {
+ const btScalar t=i/(btScalar)(r-1);
+ x[i]=lerp(from,to,t);
+ m[i]=1;
+ }
+ btSoftBody* psb= new btSoftBody(&worldInfo,r,x,m);
+ if(fixeds&1) psb->setMass(0,0);
+ if(fixeds&2) psb->setMass(r-1,0);
+ delete[] x;
+ delete[] m;
+ /* Create links */
+ for(i=1;i<r;++i)
+ {
+ psb->appendLink(i-1,i);
+ }
+ /* Finished */
+ return(psb);
+}
+
+//
+btSoftBody* btSoftBodyHelpers::CreatePatch(btSoftBodyWorldInfo& worldInfo,const btVector3& corner00,
+ const btVector3& corner10,
+ const btVector3& corner01,
+ const btVector3& corner11,
+ int resx,
+ int resy,
+ int fixeds,
+ bool gendiags)
+{
+#define IDX(_x_,_y_) ((_y_)*rx+(_x_))
+ /* Create nodes */
+ if((resx<2)||(resy<2)) return(0);
+ const int rx=resx;
+ const int ry=resy;
+ const int tot=rx*ry;
+ btVector3* x=new btVector3[tot];
+ btScalar* m=new btScalar[tot];
+ int iy;
+
+ for(iy=0;iy<ry;++iy)
+ {
+ const btScalar ty=iy/(btScalar)(ry-1);
+ const btVector3 py0=lerp(corner00,corner01,ty);
+ const btVector3 py1=lerp(corner10,corner11,ty);
+ for(int ix=0;ix<rx;++ix)
+ {
+ const btScalar tx=ix/(btScalar)(rx-1);
+ x[IDX(ix,iy)]=lerp(py0,py1,tx);
+ m[IDX(ix,iy)]=1;
+ }
+ }
+ btSoftBody* psb=new btSoftBody(&worldInfo,tot,x,m);
+ if(fixeds&1) psb->setMass(IDX(0,0),0);
+ if(fixeds&2) psb->setMass(IDX(rx-1,0),0);
+ if(fixeds&4) psb->setMass(IDX(0,ry-1),0);
+ if(fixeds&8) psb->setMass(IDX(rx-1,ry-1),0);
+ delete[] x;
+ delete[] m;
+ /* Create links and faces */
+ for(iy=0;iy<ry;++iy)
+ {
+ for(int ix=0;ix<rx;++ix)
+ {
+ const int idx=IDX(ix,iy);
+ const bool mdx=(ix+1)<rx;
+ const bool mdy=(iy+1)<ry;
+ if(mdx) psb->appendLink(idx,IDX(ix+1,iy));
+ if(mdy) psb->appendLink(idx,IDX(ix,iy+1));
+ if(mdx&&mdy)
+ {
+ if((ix+iy)&1)
+ {
+ psb->appendFace(IDX(ix,iy),IDX(ix+1,iy),IDX(ix+1,iy+1));
+ psb->appendFace(IDX(ix,iy),IDX(ix+1,iy+1),IDX(ix,iy+1));
+ if(gendiags)
+ {
+ psb->appendLink(IDX(ix,iy),IDX(ix+1,iy+1));
+ }
+ }
+ else
+ {
+ psb->appendFace(IDX(ix,iy+1),IDX(ix,iy),IDX(ix+1,iy));
+ psb->appendFace(IDX(ix,iy+1),IDX(ix+1,iy),IDX(ix+1,iy+1));
+ if(gendiags)
+ {
+ psb->appendLink(IDX(ix+1,iy),IDX(ix,iy+1));
+ }
+ }
+ }
+ }
+ }
+ /* Finished */
+#undef IDX
+ return(psb);
+}
+
+//
+btSoftBody* btSoftBodyHelpers::CreatePatchUV(btSoftBodyWorldInfo& worldInfo,
+ const btVector3& corner00,
+ const btVector3& corner10,
+ const btVector3& corner01,
+ const btVector3& corner11,
+ int resx,
+ int resy,
+ int fixeds,
+ bool gendiags,
+ float* tex_coords)
+{
+
+ /*
+ *
+ * corners:
+ *
+ * [0][0] corner00 ------- corner01 [resx][0]
+ * | |
+ * | |
+ * [0][resy] corner10 -------- corner11 [resx][resy]
+ *
+ *
+ *
+ *
+ *
+ *
+ * "fixedgs" map:
+ *
+ * corner00 --> +1
+ * corner01 --> +2
+ * corner10 --> +4
+ * corner11 --> +8
+ * upper middle --> +16
+ * left middle --> +32
+ * right middle --> +64
+ * lower middle --> +128
+ * center --> +256
+ *
+ *
+ * tex_coords size (resx-1)*(resy-1)*12
+ *
+ *
+ *
+ * SINGLE QUAD INTERNALS
+ *
+ * 1) btSoftBody's nodes and links,
+ * diagonal link is optional ("gendiags")
+ *
+ *
+ * node00 ------ node01
+ * | .
+ * | .
+ * | .
+ * | .
+ * | .
+ * node10 node11
+ *
+ *
+ *
+ * 2) Faces:
+ * two triangles,
+ * UV Coordinates (hier example for single quad)
+ *
+ * (0,1) (0,1) (1,1)
+ * 1 |\ 3 \-----| 2
+ * | \ \ |
+ * | \ \ |
+ * | \ \ |
+ * | \ \ |
+ * 2 |-----\ 3 \| 1
+ * (0,0) (1,0) (1,0)
+ *
+ *
+ *
+ *
+ *
+ *
+ */
+
+#define IDX(_x_,_y_) ((_y_)*rx+(_x_))
+ /* Create nodes */
+ if((resx<2)||(resy<2)) return(0);
+ const int rx=resx;
+ const int ry=resy;
+ const int tot=rx*ry;
+ btVector3* x=new btVector3[tot];
+ btScalar* m=new btScalar[tot];
+
+ int iy;
+
+ for(iy=0;iy<ry;++iy)
+ {
+ const btScalar ty=iy/(btScalar)(ry-1);
+ const btVector3 py0=lerp(corner00,corner01,ty);
+ const btVector3 py1=lerp(corner10,corner11,ty);
+ for(int ix=0;ix<rx;++ix)
+ {
+ const btScalar tx=ix/(btScalar)(rx-1);
+ x[IDX(ix,iy)]=lerp(py0,py1,tx);
+ m[IDX(ix,iy)]=1;
+ }
+ }
+ btSoftBody* psb=new btSoftBody(&worldInfo,tot,x,m);
+ if(fixeds&1) psb->setMass(IDX(0,0),0);
+ if(fixeds&2) psb->setMass(IDX(rx-1,0),0);
+ if(fixeds&4) psb->setMass(IDX(0,ry-1),0);
+ if(fixeds&8) psb->setMass(IDX(rx-1,ry-1),0);
+ if(fixeds&16) psb->setMass(IDX((rx-1)/2,0),0);
+ if(fixeds&32) psb->setMass(IDX(0,(ry-1)/2),0);
+ if(fixeds&64) psb->setMass(IDX(rx-1,(ry-1)/2),0);
+ if(fixeds&128) psb->setMass(IDX((rx-1)/2,ry-1),0);
+ if(fixeds&256) psb->setMass(IDX((rx-1)/2,(ry-1)/2),0);
+ delete[] x;
+ delete[] m;
+
+
+ int z = 0;
+ /* Create links and faces */
+ for(iy=0;iy<ry;++iy)
+ {
+ for(int ix=0;ix<rx;++ix)
+ {
+ const bool mdx=(ix+1)<rx;
+ const bool mdy=(iy+1)<ry;
+
+ int node00=IDX(ix,iy);
+ int node01=IDX(ix+1,iy);
+ int node10=IDX(ix,iy+1);
+ int node11=IDX(ix+1,iy+1);
+
+ if(mdx) psb->appendLink(node00,node01);
+ if(mdy) psb->appendLink(node00,node10);
+ if(mdx&&mdy)
+ {
+ psb->appendFace(node00,node10,node11);
+ if (tex_coords) {
+ tex_coords[z+0]=CalculateUV(resx,resy,ix,iy,0);
+ tex_coords[z+1]=CalculateUV(resx,resy,ix,iy,1);
+ tex_coords[z+2]=CalculateUV(resx,resy,ix,iy,0);
+ tex_coords[z+3]=CalculateUV(resx,resy,ix,iy,2);
+ tex_coords[z+4]=CalculateUV(resx,resy,ix,iy,3);
+ tex_coords[z+5]=CalculateUV(resx,resy,ix,iy,2);
+ }
+ psb->appendFace(node11,node01,node00);
+ if (tex_coords) {
+ tex_coords[z+6 ]=CalculateUV(resx,resy,ix,iy,3);
+ tex_coords[z+7 ]=CalculateUV(resx,resy,ix,iy,2);
+ tex_coords[z+8 ]=CalculateUV(resx,resy,ix,iy,3);
+ tex_coords[z+9 ]=CalculateUV(resx,resy,ix,iy,1);
+ tex_coords[z+10]=CalculateUV(resx,resy,ix,iy,0);
+ tex_coords[z+11]=CalculateUV(resx,resy,ix,iy,1);
+ }
+ if (gendiags) psb->appendLink(node00,node11);
+ z += 12;
+ }
+ }
+ }
+ /* Finished */
+#undef IDX
+ return(psb);
+}
+
+float btSoftBodyHelpers::CalculateUV(int resx,int resy,int ix,int iy,int id)
+{
+
+ /*
+ *
+ *
+ * node00 --- node01
+ * | |
+ * node10 --- node11
+ *
+ *
+ * ID map:
+ *
+ * node00 s --> 0
+ * node00 t --> 1
+ *
+ * node01 s --> 3
+ * node01 t --> 1
+ *
+ * node10 s --> 0
+ * node10 t --> 2
+ *
+ * node11 s --> 3
+ * node11 t --> 2
+ *
+ *
+ */
+
+ float tc=0.0f;
+ if (id == 0) {
+ tc = (1.0f/((resx-1))*ix);
+ }
+ else if (id==1) {
+ tc = (1.0f/((resy-1))*(resy-1-iy));
+ }
+ else if (id==2) {
+ tc = (1.0f/((resy-1))*(resy-1-iy-1));
+ }
+ else if (id==3) {
+ tc = (1.0f/((resx-1))*(ix+1));
+ }
+ return tc;
+}
+//
+btSoftBody* btSoftBodyHelpers::CreateEllipsoid(btSoftBodyWorldInfo& worldInfo,const btVector3& center,
+ const btVector3& radius,
+ int res)
+{
+ struct Hammersley
+ {
+ static void Generate(btVector3* x,int n)
+ {
+ for(int i=0;i<n;i++)
+ {
+ btScalar p=0.5,t=0;
+ for(int j=i;j;p*=0.5,j>>=1) if(j&1) t+=p;
+ btScalar w=2*t-1;
+ btScalar a=(SIMD_PI+2*i*SIMD_PI)/n;
+ btScalar s=btSqrt(1-w*w);
+ *x++=btVector3(s*btCos(a),s*btSin(a),w);
+ }
+ }
+ };
+ btAlignedObjectArray<btVector3> vtx;
+ vtx.resize(3+res);
+ Hammersley::Generate(&vtx[0],vtx.size());
+ for(int i=0;i<vtx.size();++i)
+ {
+ vtx[i]=vtx[i]*radius+center;
+ }
+ return(CreateFromConvexHull(worldInfo,&vtx[0],vtx.size()));
+}
+
+
+
+//
+btSoftBody* btSoftBodyHelpers::CreateFromTriMesh(btSoftBodyWorldInfo& worldInfo,const btScalar* vertices,
+ const int* triangles,
+ int ntriangles, bool randomizeConstraints)
+{
+ int maxidx=0;
+ int i,j,ni;
+
+ for(i=0,ni=ntriangles*3;i<ni;++i)
+ {
+ maxidx=btMax(triangles[i],maxidx);
+ }
+ ++maxidx;
+ btAlignedObjectArray<bool> chks;
+ btAlignedObjectArray<btVector3> vtx;
+ chks.resize(maxidx*maxidx,false);
+ vtx.resize(maxidx);
+ for(i=0,j=0,ni=maxidx*3;i<ni;++j,i+=3)
+ {
+ vtx[j]=btVector3(vertices[i],vertices[i+1],vertices[i+2]);
+ }
+ btSoftBody* psb=new btSoftBody(&worldInfo,vtx.size(),&vtx[0],0);
+ for( i=0,ni=ntriangles*3;i<ni;i+=3)
+ {
+ const int idx[]={triangles[i],triangles[i+1],triangles[i+2]};
+#define IDX(_x_,_y_) ((_y_)*maxidx+(_x_))
+ for(int j=2,k=0;k<3;j=k++)
+ {
+ if(!chks[IDX(idx[j],idx[k])])
+ {
+ chks[IDX(idx[j],idx[k])]=true;
+ chks[IDX(idx[k],idx[j])]=true;
+ psb->appendLink(idx[j],idx[k]);
+ }
+ }
+#undef IDX
+ psb->appendFace(idx[0],idx[1],idx[2]);
+ }
+
+ if (randomizeConstraints)
+ {
+ psb->randomizeConstraints();
+ }
+
+ return(psb);
+}
+
+//
+btSoftBody* btSoftBodyHelpers::CreateFromConvexHull(btSoftBodyWorldInfo& worldInfo, const btVector3* vertices,
+ int nvertices, bool randomizeConstraints)
+{
+ HullDesc hdsc(QF_TRIANGLES,nvertices,vertices);
+ HullResult hres;
+ HullLibrary hlib;/*??*/
+ hdsc.mMaxVertices=nvertices;
+ hlib.CreateConvexHull(hdsc,hres);
+ btSoftBody* psb=new btSoftBody(&worldInfo,(int)hres.mNumOutputVertices,
+ &hres.m_OutputVertices[0],0);
+ for(int i=0;i<(int)hres.mNumFaces;++i)
+ {
+ const int idx[]={ hres.m_Indices[i*3+0],
+ hres.m_Indices[i*3+1],
+ hres.m_Indices[i*3+2]};
+ if(idx[0]<idx[1]) psb->appendLink( idx[0],idx[1]);
+ if(idx[1]<idx[2]) psb->appendLink( idx[1],idx[2]);
+ if(idx[2]<idx[0]) psb->appendLink( idx[2],idx[0]);
+ psb->appendFace(idx[0],idx[1],idx[2]);
+ }
+ hlib.ReleaseResult(hres);
+ if (randomizeConstraints)
+ {
+ psb->randomizeConstraints();
+ }
+ return(psb);
+}
+
+
+
+
+static int nextLine(const char* buffer)
+{
+ int numBytesRead=0;
+
+ while (*buffer != '\n')
+ {
+ buffer++;
+ numBytesRead++;
+ }
+
+
+ if (buffer[0]==0x0a)
+ {
+ buffer++;
+ numBytesRead++;
+ }
+ return numBytesRead;
+}
+
+/* Create from TetGen .ele, .face, .node data */
+btSoftBody* btSoftBodyHelpers::CreateFromTetGenData(btSoftBodyWorldInfo& worldInfo,
+ const char* ele,
+ const char* face,
+ const char* node,
+ bool bfacelinks,
+ bool btetralinks,
+ bool bfacesfromtetras)
+{
+btAlignedObjectArray<btVector3> pos;
+int nnode=0;
+int ndims=0;
+int nattrb=0;
+int hasbounds=0;
+int result = sscanf(node,"%d %d %d %d",&nnode,&ndims,&nattrb,&hasbounds);
+result = sscanf(node,"%d %d %d %d",&nnode,&ndims,&nattrb,&hasbounds);
+node += nextLine(node);
+
+pos.resize(nnode);
+for(int i=0;i<pos.size();++i)
+ {
+ int index=0;
+ //int bound=0;
+ float x,y,z;
+ sscanf(node,"%d %f %f %f",&index,&x,&y,&z);
+
+// sn>>index;
+// sn>>x;sn>>y;sn>>z;
+ node += nextLine(node);
+
+ //for(int j=0;j<nattrb;++j)
+ // sn>>a;
+
+ //if(hasbounds)
+ // sn>>bound;
+
+ pos[index].setX(btScalar(x));
+ pos[index].setY(btScalar(y));
+ pos[index].setZ(btScalar(z));
+ }
+btSoftBody* psb=new btSoftBody(&worldInfo,nnode,&pos[0],0);
+#if 0
+if(face&&face[0])
+ {
+ int nface=0;
+ sf>>nface;sf>>hasbounds;
+ for(int i=0;i<nface;++i)
+ {
+ int index=0;
+ int bound=0;
+ int ni[3];
+ sf>>index;
+ sf>>ni[0];sf>>ni[1];sf>>ni[2];
+ sf>>bound;
+ psb->appendFace(ni[0],ni[1],ni[2]);
+ if(btetralinks)
+ {
+ psb->appendLink(ni[0],ni[1],0,true);
+ psb->appendLink(ni[1],ni[2],0,true);
+ psb->appendLink(ni[2],ni[0],0,true);
+ }
+ }
+ }
+#endif
+
+if(ele&&ele[0])
+ {
+ int ntetra=0;
+ int ncorner=0;
+ int neattrb=0;
+ sscanf(ele,"%d %d %d",&ntetra,&ncorner,&neattrb);
+ ele += nextLine(ele);
+
+ //se>>ntetra;se>>ncorner;se>>neattrb;
+ for(int i=0;i<ntetra;++i)
+ {
+ int index=0;
+ int ni[4];
+
+ //se>>index;
+ //se>>ni[0];se>>ni[1];se>>ni[2];se>>ni[3];
+ sscanf(ele,"%d %d %d %d %d",&index,&ni[0],&ni[1],&ni[2],&ni[3]);
+ ele+=nextLine(ele);
+ //for(int j=0;j<neattrb;++j)
+ // se>>a;
+ psb->appendTetra(ni[0],ni[1],ni[2],ni[3]);
+ if(btetralinks)
+ {
+ psb->appendLink(ni[0],ni[1],0,true);
+ psb->appendLink(ni[1],ni[2],0,true);
+ psb->appendLink(ni[2],ni[0],0,true);
+ psb->appendLink(ni[0],ni[3],0,true);
+ psb->appendLink(ni[1],ni[3],0,true);
+ psb->appendLink(ni[2],ni[3],0,true);
+ }
+ }
+ }
+printf("Nodes: %u\r\n",psb->m_nodes.size());
+printf("Links: %u\r\n",psb->m_links.size());
+printf("Faces: %u\r\n",psb->m_faces.size());
+printf("Tetras: %u\r\n",psb->m_tetras.size());
+return(psb);
+}
+
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.h b/tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.h
new file mode 100644
index 00000000..620a52fe
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyHelpers.h
@@ -0,0 +1,143 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2008 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_HELPERS_H
+#define BT_SOFT_BODY_HELPERS_H
+
+#include "btSoftBody.h"
+
+//
+// Helpers
+//
+
+/* fDrawFlags */
+struct fDrawFlags { enum _ {
+ Nodes = 0x0001,
+ Links = 0x0002,
+ Faces = 0x0004,
+ Tetras = 0x0008,
+ Normals = 0x0010,
+ Contacts = 0x0020,
+ Anchors = 0x0040,
+ Notes = 0x0080,
+ Clusters = 0x0100,
+ NodeTree = 0x0200,
+ FaceTree = 0x0400,
+ ClusterTree = 0x0800,
+ Joints = 0x1000,
+ /* presets */
+ Std = Links+Faces+Tetras+Anchors+Notes+Joints,
+ StdTetra = Std-Faces+Tetras
+};};
+
+struct btSoftBodyHelpers
+{
+ /* Draw body */
+ static void Draw( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int drawflags=fDrawFlags::Std);
+ /* Draw body infos */
+ static void DrawInfos( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ bool masses,
+ bool areas,
+ bool stress);
+ /* Draw node tree */
+ static void DrawNodeTree( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int mindepth=0,
+ int maxdepth=-1);
+ /* Draw face tree */
+ static void DrawFaceTree( btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int mindepth=0,
+ int maxdepth=-1);
+ /* Draw cluster tree */
+ static void DrawClusterTree(btSoftBody* psb,
+ btIDebugDraw* idraw,
+ int mindepth=0,
+ int maxdepth=-1);
+ /* Draw rigid frame */
+ static void DrawFrame( btSoftBody* psb,
+ btIDebugDraw* idraw);
+ /* Create a rope */
+ static btSoftBody* CreateRope( btSoftBodyWorldInfo& worldInfo,
+ const btVector3& from,
+ const btVector3& to,
+ int res,
+ int fixeds);
+ /* Create a patch */
+ static btSoftBody* CreatePatch(btSoftBodyWorldInfo& worldInfo,
+ const btVector3& corner00,
+ const btVector3& corner10,
+ const btVector3& corner01,
+ const btVector3& corner11,
+ int resx,
+ int resy,
+ int fixeds,
+ bool gendiags);
+ /* Create a patch with UV Texture Coordinates */
+ static btSoftBody* CreatePatchUV(btSoftBodyWorldInfo& worldInfo,
+ const btVector3& corner00,
+ const btVector3& corner10,
+ const btVector3& corner01,
+ const btVector3& corner11,
+ int resx,
+ int resy,
+ int fixeds,
+ bool gendiags,
+ float* tex_coords=0);
+ static float CalculateUV(int resx,int resy,int ix,int iy,int id);
+ /* Create an ellipsoid */
+ static btSoftBody* CreateEllipsoid(btSoftBodyWorldInfo& worldInfo,
+ const btVector3& center,
+ const btVector3& radius,
+ int res);
+ /* Create from trimesh */
+ static btSoftBody* CreateFromTriMesh( btSoftBodyWorldInfo& worldInfo,
+ const btScalar* vertices,
+ const int* triangles,
+ int ntriangles,
+ bool randomizeConstraints = true);
+ /* Create from convex-hull */
+ static btSoftBody* CreateFromConvexHull( btSoftBodyWorldInfo& worldInfo,
+ const btVector3* vertices,
+ int nvertices,
+ bool randomizeConstraints = true);
+
+
+ /* Export TetGen compatible .smesh file */
+// static void ExportAsSMeshFile( btSoftBody* psb,
+// const char* filename);
+ /* Create from TetGen .ele, .face, .node files */
+// static btSoftBody* CreateFromTetGenFile( btSoftBodyWorldInfo& worldInfo,
+// const char* ele,
+// const char* face,
+// const char* node,
+// bool bfacelinks,
+// bool btetralinks,
+// bool bfacesfromtetras);
+ /* Create from TetGen .ele, .face, .node data */
+ static btSoftBody* CreateFromTetGenData( btSoftBodyWorldInfo& worldInfo,
+ const char* ele,
+ const char* face,
+ const char* node,
+ bool bfacelinks,
+ bool btetralinks,
+ bool bfacesfromtetras);
+
+};
+
+#endif //BT_SOFT_BODY_HELPERS_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyInternals.h b/tests/bullet/src/BulletSoftBody/btSoftBodyInternals.h
new file mode 100644
index 00000000..e637484b
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyInternals.h
@@ -0,0 +1,916 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///btSoftBody implementation by Nathanael Presson
+
+#ifndef _BT_SOFT_BODY_INTERNALS_H
+#define _BT_SOFT_BODY_INTERNALS_H
+
+#include "btSoftBody.h"
+
+
+#include "LinearMath/btQuickprof.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseInterface.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btConvexInternalShape.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
+#include <string.h> //for memset
+//
+// btSymMatrix
+//
+template <typename T>
+struct btSymMatrix
+{
+ btSymMatrix() : dim(0) {}
+ btSymMatrix(int n,const T& init=T()) { resize(n,init); }
+ void resize(int n,const T& init=T()) { dim=n;store.resize((n*(n+1))/2,init); }
+ int index(int c,int r) const { if(c>r) btSwap(c,r);btAssert(r<dim);return((r*(r+1))/2+c); }
+ T& operator()(int c,int r) { return(store[index(c,r)]); }
+ const T& operator()(int c,int r) const { return(store[index(c,r)]); }
+ btAlignedObjectArray<T> store;
+ int dim;
+};
+
+//
+// btSoftBodyCollisionShape
+//
+class btSoftBodyCollisionShape : public btConcaveShape
+{
+public:
+ btSoftBody* m_body;
+
+ btSoftBodyCollisionShape(btSoftBody* backptr)
+ {
+ m_shapeType = SOFTBODY_SHAPE_PROXYTYPE;
+ m_body=backptr;
+ }
+
+ virtual ~btSoftBodyCollisionShape()
+ {
+
+ }
+
+ void processAllTriangles(btTriangleCallback* /*callback*/,const btVector3& /*aabbMin*/,const btVector3& /*aabbMax*/) const
+ {
+ //not yet
+ btAssert(0);
+ }
+
+ ///getAabb returns the axis aligned bounding box in the coordinate frame of the given transform t.
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+ {
+ /* t should be identity */
+ aabbMin=m_body->m_bounds[0];
+ aabbMax=m_body->m_bounds[1];
+ }
+
+
+ virtual void setLocalScaling(const btVector3& /*scaling*/)
+ {
+ ///na
+ }
+ virtual const btVector3& getLocalScaling() const
+ {
+ static const btVector3 dummy(1,1,1);
+ return dummy;
+ }
+ virtual void calculateLocalInertia(btScalar /*mass*/,btVector3& /*inertia*/) const
+ {
+ ///not yet
+ btAssert(0);
+ }
+ virtual const char* getName()const
+ {
+ return "SoftBody";
+ }
+
+};
+
+//
+// btSoftClusterCollisionShape
+//
+class btSoftClusterCollisionShape : public btConvexInternalShape
+{
+public:
+ const btSoftBody::Cluster* m_cluster;
+
+ btSoftClusterCollisionShape (const btSoftBody::Cluster* cluster) : m_cluster(cluster) { setMargin(0); }
+
+
+ virtual btVector3 localGetSupportingVertex(const btVector3& vec) const
+ {
+ btSoftBody::Node* const * n=&m_cluster->m_nodes[0];
+ btScalar d=btDot(vec,n[0]->m_x);
+ int j=0;
+ for(int i=1,ni=m_cluster->m_nodes.size();i<ni;++i)
+ {
+ const btScalar k=btDot(vec,n[i]->m_x);
+ if(k>d) { d=k;j=i; }
+ }
+ return(n[j]->m_x);
+ }
+ virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const
+ {
+ return(localGetSupportingVertex(vec));
+ }
+ //notice that the vectors should be unit length
+ virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const
+ {}
+
+
+ virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const
+ {}
+
+ virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
+ {}
+
+ virtual int getShapeType() const { return SOFTBODY_SHAPE_PROXYTYPE; }
+
+ //debugging
+ virtual const char* getName()const {return "SOFTCLUSTER";}
+
+ virtual void setMargin(btScalar margin)
+ {
+ btConvexInternalShape::setMargin(margin);
+ }
+ virtual btScalar getMargin() const
+ {
+ return getMargin();
+ }
+};
+
+//
+// Inline's
+//
+
+//
+template <typename T>
+static inline void ZeroInitialize(T& value)
+{
+ memset(&value,0,sizeof(T));
+}
+//
+template <typename T>
+static inline bool CompLess(const T& a,const T& b)
+{ return(a<b); }
+//
+template <typename T>
+static inline bool CompGreater(const T& a,const T& b)
+{ return(a>b); }
+//
+template <typename T>
+static inline T Lerp(const T& a,const T& b,btScalar t)
+{ return(a+(b-a)*t); }
+//
+template <typename T>
+static inline T InvLerp(const T& a,const T& b,btScalar t)
+{ return((b+a*t-b*t)/(a*b)); }
+//
+static inline btMatrix3x3 Lerp( const btMatrix3x3& a,
+ const btMatrix3x3& b,
+ btScalar t)
+{
+ btMatrix3x3 r;
+ r[0]=Lerp(a[0],b[0],t);
+ r[1]=Lerp(a[1],b[1],t);
+ r[2]=Lerp(a[2],b[2],t);
+ return(r);
+}
+//
+static inline btVector3 Clamp(const btVector3& v,btScalar maxlength)
+{
+ const btScalar sql=v.length2();
+ if(sql>(maxlength*maxlength))
+ return((v*maxlength)/btSqrt(sql));
+ else
+ return(v);
+}
+//
+template <typename T>
+static inline T Clamp(const T& x,const T& l,const T& h)
+{ return(x<l?l:x>h?h:x); }
+//
+template <typename T>
+static inline T Sq(const T& x)
+{ return(x*x); }
+//
+template <typename T>
+static inline T Cube(const T& x)
+{ return(x*x*x); }
+//
+template <typename T>
+static inline T Sign(const T& x)
+{ return((T)(x<0?-1:+1)); }
+//
+template <typename T>
+static inline bool SameSign(const T& x,const T& y)
+{ return((x*y)>0); }
+//
+static inline btScalar ClusterMetric(const btVector3& x,const btVector3& y)
+{
+ const btVector3 d=x-y;
+ return(btFabs(d[0])+btFabs(d[1])+btFabs(d[2]));
+}
+//
+static inline btMatrix3x3 ScaleAlongAxis(const btVector3& a,btScalar s)
+{
+ const btScalar xx=a.x()*a.x();
+ const btScalar yy=a.y()*a.y();
+ const btScalar zz=a.z()*a.z();
+ const btScalar xy=a.x()*a.y();
+ const btScalar yz=a.y()*a.z();
+ const btScalar zx=a.z()*a.x();
+ btMatrix3x3 m;
+ m[0]=btVector3(1-xx+xx*s,xy*s-xy,zx*s-zx);
+ m[1]=btVector3(xy*s-xy,1-yy+yy*s,yz*s-yz);
+ m[2]=btVector3(zx*s-zx,yz*s-yz,1-zz+zz*s);
+ return(m);
+}
+//
+static inline btMatrix3x3 Cross(const btVector3& v)
+{
+ btMatrix3x3 m;
+ m[0]=btVector3(0,-v.z(),+v.y());
+ m[1]=btVector3(+v.z(),0,-v.x());
+ m[2]=btVector3(-v.y(),+v.x(),0);
+ return(m);
+}
+//
+static inline btMatrix3x3 Diagonal(btScalar x)
+{
+ btMatrix3x3 m;
+ m[0]=btVector3(x,0,0);
+ m[1]=btVector3(0,x,0);
+ m[2]=btVector3(0,0,x);
+ return(m);
+}
+//
+static inline btMatrix3x3 Add(const btMatrix3x3& a,
+ const btMatrix3x3& b)
+{
+ btMatrix3x3 r;
+ for(int i=0;i<3;++i) r[i]=a[i]+b[i];
+ return(r);
+}
+//
+static inline btMatrix3x3 Sub(const btMatrix3x3& a,
+ const btMatrix3x3& b)
+{
+ btMatrix3x3 r;
+ for(int i=0;i<3;++i) r[i]=a[i]-b[i];
+ return(r);
+}
+//
+static inline btMatrix3x3 Mul(const btMatrix3x3& a,
+ btScalar b)
+{
+ btMatrix3x3 r;
+ for(int i=0;i<3;++i) r[i]=a[i]*b;
+ return(r);
+}
+//
+static inline void Orthogonalize(btMatrix3x3& m)
+{
+ m[2]=btCross(m[0],m[1]).normalized();
+ m[1]=btCross(m[2],m[0]).normalized();
+ m[0]=btCross(m[1],m[2]).normalized();
+}
+//
+static inline btMatrix3x3 MassMatrix(btScalar im,const btMatrix3x3& iwi,const btVector3& r)
+{
+ const btMatrix3x3 cr=Cross(r);
+ return(Sub(Diagonal(im),cr*iwi*cr));
+}
+
+//
+static inline btMatrix3x3 ImpulseMatrix( btScalar dt,
+ btScalar ima,
+ btScalar imb,
+ const btMatrix3x3& iwi,
+ const btVector3& r)
+{
+ return(Diagonal(1/dt)*Add(Diagonal(ima),MassMatrix(imb,iwi,r)).inverse());
+}
+
+//
+static inline btMatrix3x3 ImpulseMatrix( btScalar ima,const btMatrix3x3& iia,const btVector3& ra,
+ btScalar imb,const btMatrix3x3& iib,const btVector3& rb)
+{
+ return(Add(MassMatrix(ima,iia,ra),MassMatrix(imb,iib,rb)).inverse());
+}
+
+//
+static inline btMatrix3x3 AngularImpulseMatrix( const btMatrix3x3& iia,
+ const btMatrix3x3& iib)
+{
+ return(Add(iia,iib).inverse());
+}
+
+//
+static inline btVector3 ProjectOnAxis( const btVector3& v,
+ const btVector3& a)
+{
+ return(a*btDot(v,a));
+}
+//
+static inline btVector3 ProjectOnPlane( const btVector3& v,
+ const btVector3& a)
+{
+ return(v-ProjectOnAxis(v,a));
+}
+
+//
+static inline void ProjectOrigin( const btVector3& a,
+ const btVector3& b,
+ btVector3& prj,
+ btScalar& sqd)
+{
+ const btVector3 d=b-a;
+ const btScalar m2=d.length2();
+ if(m2>SIMD_EPSILON)
+ {
+ const btScalar t=Clamp<btScalar>(-btDot(a,d)/m2,0,1);
+ const btVector3 p=a+d*t;
+ const btScalar l2=p.length2();
+ if(l2<sqd)
+ {
+ prj=p;
+ sqd=l2;
+ }
+ }
+}
+//
+static inline void ProjectOrigin( const btVector3& a,
+ const btVector3& b,
+ const btVector3& c,
+ btVector3& prj,
+ btScalar& sqd)
+{
+ const btVector3& q=btCross(b-a,c-a);
+ const btScalar m2=q.length2();
+ if(m2>SIMD_EPSILON)
+ {
+ const btVector3 n=q/btSqrt(m2);
+ const btScalar k=btDot(a,n);
+ const btScalar k2=k*k;
+ if(k2<sqd)
+ {
+ const btVector3 p=n*k;
+ if( (btDot(btCross(a-p,b-p),q)>0)&&
+ (btDot(btCross(b-p,c-p),q)>0)&&
+ (btDot(btCross(c-p,a-p),q)>0))
+ {
+ prj=p;
+ sqd=k2;
+ }
+ else
+ {
+ ProjectOrigin(a,b,prj,sqd);
+ ProjectOrigin(b,c,prj,sqd);
+ ProjectOrigin(c,a,prj,sqd);
+ }
+ }
+ }
+}
+
+//
+template <typename T>
+static inline T BaryEval( const T& a,
+ const T& b,
+ const T& c,
+ const btVector3& coord)
+{
+ return(a*coord.x()+b*coord.y()+c*coord.z());
+}
+//
+static inline btVector3 BaryCoord( const btVector3& a,
+ const btVector3& b,
+ const btVector3& c,
+ const btVector3& p)
+{
+ const btScalar w[]={ btCross(a-p,b-p).length(),
+ btCross(b-p,c-p).length(),
+ btCross(c-p,a-p).length()};
+ const btScalar isum=1/(w[0]+w[1]+w[2]);
+ return(btVector3(w[1]*isum,w[2]*isum,w[0]*isum));
+}
+
+//
+static btScalar ImplicitSolve( btSoftBody::ImplicitFn* fn,
+ const btVector3& a,
+ const btVector3& b,
+ const btScalar accuracy,
+ const int maxiterations=256)
+{
+ btScalar span[2]={0,1};
+ btScalar values[2]={fn->Eval(a),fn->Eval(b)};
+ if(values[0]>values[1])
+ {
+ btSwap(span[0],span[1]);
+ btSwap(values[0],values[1]);
+ }
+ if(values[0]>-accuracy) return(-1);
+ if(values[1]<+accuracy) return(-1);
+ for(int i=0;i<maxiterations;++i)
+ {
+ const btScalar t=Lerp(span[0],span[1],values[0]/(values[0]-values[1]));
+ const btScalar v=fn->Eval(Lerp(a,b,t));
+ if((t<=0)||(t>=1)) break;
+ if(btFabs(v)<accuracy) return(t);
+ if(v<0)
+ { span[0]=t;values[0]=v; }
+ else
+ { span[1]=t;values[1]=v; }
+ }
+ return(-1);
+}
+
+//
+static inline btVector3 NormalizeAny(const btVector3& v)
+{
+ const btScalar l=v.length();
+ if(l>SIMD_EPSILON)
+ return(v/l);
+ else
+ return(btVector3(0,0,0));
+}
+
+//
+static inline btDbvtVolume VolumeOf( const btSoftBody::Face& f,
+ btScalar margin)
+{
+ const btVector3* pts[]={ &f.m_n[0]->m_x,
+ &f.m_n[1]->m_x,
+ &f.m_n[2]->m_x};
+ btDbvtVolume vol=btDbvtVolume::FromPoints(pts,3);
+ vol.Expand(btVector3(margin,margin,margin));
+ return(vol);
+}
+
+//
+static inline btVector3 CenterOf( const btSoftBody::Face& f)
+{
+ return((f.m_n[0]->m_x+f.m_n[1]->m_x+f.m_n[2]->m_x)/3);
+}
+
+//
+static inline btScalar AreaOf( const btVector3& x0,
+ const btVector3& x1,
+ const btVector3& x2)
+{
+ const btVector3 a=x1-x0;
+ const btVector3 b=x2-x0;
+ const btVector3 cr=btCross(a,b);
+ const btScalar area=cr.length();
+ return(area);
+}
+
+//
+static inline btScalar VolumeOf( const btVector3& x0,
+ const btVector3& x1,
+ const btVector3& x2,
+ const btVector3& x3)
+{
+ const btVector3 a=x1-x0;
+ const btVector3 b=x2-x0;
+ const btVector3 c=x3-x0;
+ return(btDot(a,btCross(b,c)));
+}
+
+//
+static void EvaluateMedium( const btSoftBodyWorldInfo* wfi,
+ const btVector3& x,
+ btSoftBody::sMedium& medium)
+{
+ medium.m_velocity = btVector3(0,0,0);
+ medium.m_pressure = 0;
+ medium.m_density = wfi->air_density;
+ if(wfi->water_density>0)
+ {
+ const btScalar depth=-(btDot(x,wfi->water_normal)+wfi->water_offset);
+ if(depth>0)
+ {
+ medium.m_density = wfi->water_density;
+ medium.m_pressure = depth*wfi->water_density*wfi->m_gravity.length();
+ }
+ }
+}
+
+//
+static inline void ApplyClampedForce( btSoftBody::Node& n,
+ const btVector3& f,
+ btScalar dt)
+{
+ const btScalar dtim=dt*n.m_im;
+ if((f*dtim).length2()>n.m_v.length2())
+ {/* Clamp */
+ n.m_f-=ProjectOnAxis(n.m_v,f.normalized())/dtim;
+ }
+ else
+ {/* Apply */
+ n.m_f+=f;
+ }
+}
+
+//
+static inline int MatchEdge( const btSoftBody::Node* a,
+ const btSoftBody::Node* b,
+ const btSoftBody::Node* ma,
+ const btSoftBody::Node* mb)
+{
+ if((a==ma)&&(b==mb)) return(0);
+ if((a==mb)&&(b==ma)) return(1);
+ return(-1);
+}
+
+//
+// btEigen : Extract eigen system,
+// straitforward implementation of http://math.fullerton.edu/mathews/n2003/JacobiMethodMod.html
+// outputs are NOT sorted.
+//
+struct btEigen
+{
+ static int system(btMatrix3x3& a,btMatrix3x3* vectors,btVector3* values=0)
+ {
+ static const int maxiterations=16;
+ static const btScalar accuracy=(btScalar)0.0001;
+ btMatrix3x3& v=*vectors;
+ int iterations=0;
+ vectors->setIdentity();
+ do {
+ int p=0,q=1;
+ if(btFabs(a[p][q])<btFabs(a[0][2])) { p=0;q=2; }
+ if(btFabs(a[p][q])<btFabs(a[1][2])) { p=1;q=2; }
+ if(btFabs(a[p][q])>accuracy)
+ {
+ const btScalar w=(a[q][q]-a[p][p])/(2*a[p][q]);
+ const btScalar z=btFabs(w);
+ const btScalar t=w/(z*(btSqrt(1+w*w)+z));
+ if(t==t)/* [WARNING] let hope that one does not get thrown aways by some compilers... */
+ {
+ const btScalar c=1/btSqrt(t*t+1);
+ const btScalar s=c*t;
+ mulPQ(a,c,s,p,q);
+ mulTPQ(a,c,s,p,q);
+ mulPQ(v,c,s,p,q);
+ } else break;
+ } else break;
+ } while((++iterations)<maxiterations);
+ if(values)
+ {
+ *values=btVector3(a[0][0],a[1][1],a[2][2]);
+ }
+ return(iterations);
+ }
+private:
+ static inline void mulTPQ(btMatrix3x3& a,btScalar c,btScalar s,int p,int q)
+ {
+ const btScalar m[2][3]={ {a[p][0],a[p][1],a[p][2]},
+ {a[q][0],a[q][1],a[q][2]}};
+ int i;
+
+ for(i=0;i<3;++i) a[p][i]=c*m[0][i]-s*m[1][i];
+ for(i=0;i<3;++i) a[q][i]=c*m[1][i]+s*m[0][i];
+ }
+ static inline void mulPQ(btMatrix3x3& a,btScalar c,btScalar s,int p,int q)
+ {
+ const btScalar m[2][3]={ {a[0][p],a[1][p],a[2][p]},
+ {a[0][q],a[1][q],a[2][q]}};
+ int i;
+
+ for(i=0;i<3;++i) a[i][p]=c*m[0][i]-s*m[1][i];
+ for(i=0;i<3;++i) a[i][q]=c*m[1][i]+s*m[0][i];
+ }
+};
+
+//
+// Polar decomposition,
+// "Computing the Polar Decomposition with Applications", Nicholas J. Higham, 1986.
+//
+static inline int PolarDecompose( const btMatrix3x3& m,btMatrix3x3& q,btMatrix3x3& s)
+{
+ static const btScalar half=(btScalar)0.5;
+ static const btScalar accuracy=(btScalar)0.0001;
+ static const int maxiterations=16;
+ int i=0;
+ btScalar det=0;
+ q = Mul(m,1/btVector3(m[0][0],m[1][1],m[2][2]).length());
+ det = q.determinant();
+ if(!btFuzzyZero(det))
+ {
+ for(;i<maxiterations;++i)
+ {
+ q=Mul(Add(q,Mul(q.adjoint(),1/det).transpose()),half);
+ const btScalar ndet=q.determinant();
+ if(Sq(ndet-det)>accuracy) det=ndet; else break;
+ }
+ /* Final orthogonalization */
+ Orthogonalize(q);
+ /* Compute 'S' */
+ s=q.transpose()*m;
+ }
+ else
+ {
+ q.setIdentity();
+ s.setIdentity();
+ }
+ return(i);
+}
+
+//
+// btSoftColliders
+//
+struct btSoftColliders
+{
+ //
+ // ClusterBase
+ //
+ struct ClusterBase : btDbvt::ICollide
+ {
+ btScalar erp;
+ btScalar idt;
+ btScalar m_margin;
+ btScalar friction;
+ btScalar threshold;
+ ClusterBase()
+ {
+ erp =(btScalar)1;
+ idt =0;
+ m_margin =0;
+ friction =0;
+ threshold =(btScalar)0;
+ }
+ bool SolveContact( const btGjkEpaSolver2::sResults& res,
+ btSoftBody::Body ba,btSoftBody::Body bb,
+ btSoftBody::CJoint& joint)
+ {
+ if(res.distance<m_margin)
+ {
+ btVector3 norm = res.normal;
+ norm.normalize();//is it necessary?
+
+ const btVector3 ra=res.witnesses[0]-ba.xform().getOrigin();
+ const btVector3 rb=res.witnesses[1]-bb.xform().getOrigin();
+ const btVector3 va=ba.velocity(ra);
+ const btVector3 vb=bb.velocity(rb);
+ const btVector3 vrel=va-vb;
+ const btScalar rvac=btDot(vrel,norm);
+ btScalar depth=res.distance-m_margin;
+
+// printf("depth=%f\n",depth);
+ const btVector3 iv=norm*rvac;
+ const btVector3 fv=vrel-iv;
+ joint.m_bodies[0] = ba;
+ joint.m_bodies[1] = bb;
+ joint.m_refs[0] = ra*ba.xform().getBasis();
+ joint.m_refs[1] = rb*bb.xform().getBasis();
+ joint.m_rpos[0] = ra;
+ joint.m_rpos[1] = rb;
+ joint.m_cfm = 1;
+ joint.m_erp = 1;
+ joint.m_life = 0;
+ joint.m_maxlife = 0;
+ joint.m_split = 1;
+
+ joint.m_drift = depth*norm;
+
+ joint.m_normal = norm;
+// printf("normal=%f,%f,%f\n",res.normal.getX(),res.normal.getY(),res.normal.getZ());
+ joint.m_delete = false;
+ joint.m_friction = fv.length2()<(-rvac*friction)?1:friction;
+ joint.m_massmatrix = ImpulseMatrix( ba.invMass(),ba.invWorldInertia(),joint.m_rpos[0],
+ bb.invMass(),bb.invWorldInertia(),joint.m_rpos[1]);
+
+ return(true);
+ }
+ return(false);
+ }
+ };
+ //
+ // CollideCL_RS
+ //
+ struct CollideCL_RS : ClusterBase
+ {
+ btSoftBody* psb;
+
+ btCollisionObject* m_colObj;
+ void Process(const btDbvtNode* leaf)
+ {
+ btSoftBody::Cluster* cluster=(btSoftBody::Cluster*)leaf->data;
+ btSoftClusterCollisionShape cshape(cluster);
+
+ const btConvexShape* rshape=(const btConvexShape*)m_colObj->getCollisionShape();
+
+ ///don't collide an anchored cluster with a static/kinematic object
+ if(m_colObj->isStaticOrKinematicObject() && cluster->m_containsAnchor)
+ return;
+
+ btGjkEpaSolver2::sResults res;
+ if(btGjkEpaSolver2::SignedDistance( &cshape,btTransform::getIdentity(),
+ rshape,m_colObj->getWorldTransform(),
+ btVector3(1,0,0),res))
+ {
+ btSoftBody::CJoint joint;
+ if(SolveContact(res,cluster,m_colObj,joint))//prb,joint))
+ {
+ btSoftBody::CJoint* pj=new(btAlignedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint();
+ *pj=joint;psb->m_joints.push_back(pj);
+ if(m_colObj->isStaticOrKinematicObject())
+ {
+ pj->m_erp *= psb->m_cfg.kSKHR_CL;
+ pj->m_split *= psb->m_cfg.kSK_SPLT_CL;
+ }
+ else
+ {
+ pj->m_erp *= psb->m_cfg.kSRHR_CL;
+ pj->m_split *= psb->m_cfg.kSR_SPLT_CL;
+ }
+ }
+ }
+ }
+ void Process(btSoftBody* ps,btCollisionObject* colOb)
+ {
+ psb = ps;
+ m_colObj = colOb;
+ idt = ps->m_sst.isdt;
+ m_margin = m_colObj->getCollisionShape()->getMargin()+psb->getCollisionShape()->getMargin();
+ ///Bullet rigid body uses multiply instead of minimum to determine combined friction. Some customization would be useful.
+ friction = btMin(psb->m_cfg.kDF,m_colObj->getFriction());
+ btVector3 mins;
+ btVector3 maxs;
+
+ ATTRIBUTE_ALIGNED16(btDbvtVolume) volume;
+ colOb->getCollisionShape()->getAabb(colOb->getWorldTransform(),mins,maxs);
+ volume=btDbvtVolume::FromMM(mins,maxs);
+ volume.Expand(btVector3(1,1,1)*m_margin);
+ ps->m_cdbvt.collideTV(ps->m_cdbvt.m_root,volume,*this);
+ }
+ };
+ //
+ // CollideCL_SS
+ //
+ struct CollideCL_SS : ClusterBase
+ {
+ btSoftBody* bodies[2];
+ void Process(const btDbvtNode* la,const btDbvtNode* lb)
+ {
+ btSoftBody::Cluster* cla=(btSoftBody::Cluster*)la->data;
+ btSoftBody::Cluster* clb=(btSoftBody::Cluster*)lb->data;
+
+
+ bool connected=false;
+ if ((bodies[0]==bodies[1])&&(bodies[0]->m_clusterConnectivity.size()))
+ {
+ connected = bodies[0]->m_clusterConnectivity[cla->m_clusterIndex+bodies[0]->m_clusters.size()*clb->m_clusterIndex];
+ }
+
+ if (!connected)
+ {
+ btSoftClusterCollisionShape csa(cla);
+ btSoftClusterCollisionShape csb(clb);
+ btGjkEpaSolver2::sResults res;
+ if(btGjkEpaSolver2::SignedDistance( &csa,btTransform::getIdentity(),
+ &csb,btTransform::getIdentity(),
+ cla->m_com-clb->m_com,res))
+ {
+ btSoftBody::CJoint joint;
+ if(SolveContact(res,cla,clb,joint))
+ {
+ btSoftBody::CJoint* pj=new(btAlignedAlloc(sizeof(btSoftBody::CJoint),16)) btSoftBody::CJoint();
+ *pj=joint;bodies[0]->m_joints.push_back(pj);
+ pj->m_erp *= btMax(bodies[0]->m_cfg.kSSHR_CL,bodies[1]->m_cfg.kSSHR_CL);
+ pj->m_split *= (bodies[0]->m_cfg.kSS_SPLT_CL+bodies[1]->m_cfg.kSS_SPLT_CL)/2;
+ }
+ }
+ } else
+ {
+ static int count=0;
+ count++;
+ //printf("count=%d\n",count);
+
+ }
+ }
+ void Process(btSoftBody* psa,btSoftBody* psb)
+ {
+ idt = psa->m_sst.isdt;
+ //m_margin = (psa->getCollisionShape()->getMargin()+psb->getCollisionShape()->getMargin())/2;
+ m_margin = (psa->getCollisionShape()->getMargin()+psb->getCollisionShape()->getMargin());
+ friction = btMin(psa->m_cfg.kDF,psb->m_cfg.kDF);
+ bodies[0] = psa;
+ bodies[1] = psb;
+ psa->m_cdbvt.collideTT(psa->m_cdbvt.m_root,psb->m_cdbvt.m_root,*this);
+ }
+ };
+ //
+ // CollideSDF_RS
+ //
+ struct CollideSDF_RS : btDbvt::ICollide
+ {
+ void Process(const btDbvtNode* leaf)
+ {
+ btSoftBody::Node* node=(btSoftBody::Node*)leaf->data;
+ DoNode(*node);
+ }
+ void DoNode(btSoftBody::Node& n) const
+ {
+ const btScalar m=n.m_im>0?dynmargin:stamargin;
+ btSoftBody::RContact c;
+ if( (!n.m_battach)&&
+ psb->checkContact(m_colObj1,n.m_x,m,c.m_cti))
+ {
+ const btScalar ima=n.m_im;
+ const btScalar imb= m_rigidBody? m_rigidBody->getInvMass() : 0.f;
+ const btScalar ms=ima+imb;
+ if(ms>0)
+ {
+ const btTransform& wtr=m_rigidBody?m_rigidBody->getWorldTransform() : m_colObj1->getWorldTransform();
+ static const btMatrix3x3 iwiStatic(0,0,0,0,0,0,0,0,0);
+ const btMatrix3x3& iwi=m_rigidBody?m_rigidBody->getInvInertiaTensorWorld() : iwiStatic;
+ const btVector3 ra=n.m_x-wtr.getOrigin();
+ const btVector3 va=m_rigidBody ? m_rigidBody->getVelocityInLocalPoint(ra)*psb->m_sst.sdt : btVector3(0,0,0);
+ const btVector3 vb=n.m_x-n.m_q;
+ const btVector3 vr=vb-va;
+ const btScalar dn=btDot(vr,c.m_cti.m_normal);
+ const btVector3 fv=vr-c.m_cti.m_normal*dn;
+ const btScalar fc=psb->m_cfg.kDF*m_colObj1->getFriction();
+ c.m_node = &n;
+ c.m_c0 = ImpulseMatrix(psb->m_sst.sdt,ima,imb,iwi,ra);
+ c.m_c1 = ra;
+ c.m_c2 = ima*psb->m_sst.sdt;
+ c.m_c3 = fv.length2()<(btFabs(dn)*fc)?0:1-fc;
+ c.m_c4 = m_colObj1->isStaticOrKinematicObject()?psb->m_cfg.kKHR:psb->m_cfg.kCHR;
+ psb->m_rcontacts.push_back(c);
+ if (m_rigidBody)
+ m_rigidBody->activate();
+ }
+ }
+ }
+ btSoftBody* psb;
+ btCollisionObject* m_colObj1;
+ btRigidBody* m_rigidBody;
+ btScalar dynmargin;
+ btScalar stamargin;
+ };
+ //
+ // CollideVF_SS
+ //
+ struct CollideVF_SS : btDbvt::ICollide
+ {
+ void Process(const btDbvtNode* lnode,
+ const btDbvtNode* lface)
+ {
+ btSoftBody::Node* node=(btSoftBody::Node*)lnode->data;
+ btSoftBody::Face* face=(btSoftBody::Face*)lface->data;
+ btVector3 o=node->m_x;
+ btVector3 p;
+ btScalar d=SIMD_INFINITY;
+ ProjectOrigin( face->m_n[0]->m_x-o,
+ face->m_n[1]->m_x-o,
+ face->m_n[2]->m_x-o,
+ p,d);
+ const btScalar m=mrg+(o-node->m_q).length()*2;
+ if(d<(m*m))
+ {
+ const btSoftBody::Node* n[]={face->m_n[0],face->m_n[1],face->m_n[2]};
+ const btVector3 w=BaryCoord(n[0]->m_x,n[1]->m_x,n[2]->m_x,p+o);
+ const btScalar ma=node->m_im;
+ btScalar mb=BaryEval(n[0]->m_im,n[1]->m_im,n[2]->m_im,w);
+ if( (n[0]->m_im<=0)||
+ (n[1]->m_im<=0)||
+ (n[2]->m_im<=0))
+ {
+ mb=0;
+ }
+ const btScalar ms=ma+mb;
+ if(ms>0)
+ {
+ btSoftBody::SContact c;
+ c.m_normal = p/-btSqrt(d);
+ c.m_margin = m;
+ c.m_node = node;
+ c.m_face = face;
+ c.m_weights = w;
+ c.m_friction = btMax(psb[0]->m_cfg.kDF,psb[1]->m_cfg.kDF);
+ c.m_cfm[0] = ma/ms*psb[0]->m_cfg.kSHR;
+ c.m_cfm[1] = mb/ms*psb[1]->m_cfg.kSHR;
+ psb[0]->m_scontacts.push_back(c);
+ }
+ }
+ }
+ btSoftBody* psb[2];
+ btScalar mrg;
+ };
+};
+
+#endif //_BT_SOFT_BODY_INTERNALS_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp b/tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp
new file mode 100644
index 00000000..f5a67f6d
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp
@@ -0,0 +1,134 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSoftBodyRigidBodyCollisionConfiguration.h"
+#include "btSoftRigidCollisionAlgorithm.h"
+#include "btSoftBodyConcaveCollisionAlgorithm.h"
+#include "btSoftSoftCollisionAlgorithm.h"
+
+#include "LinearMath/btPoolAllocator.h"
+
+#define ENABLE_SOFTBODY_CONCAVE_COLLISIONS 1
+
+btSoftBodyRigidBodyCollisionConfiguration::btSoftBodyRigidBodyCollisionConfiguration(const btDefaultCollisionConstructionInfo& constructionInfo)
+:btDefaultCollisionConfiguration(constructionInfo)
+{
+ void* mem;
+
+ mem = btAlignedAlloc(sizeof(btSoftSoftCollisionAlgorithm::CreateFunc),16);
+ m_softSoftCreateFunc = new(mem) btSoftSoftCollisionAlgorithm::CreateFunc;
+
+ mem = btAlignedAlloc(sizeof(btSoftRigidCollisionAlgorithm::CreateFunc),16);
+ m_softRigidConvexCreateFunc = new(mem) btSoftRigidCollisionAlgorithm::CreateFunc;
+
+ mem = btAlignedAlloc(sizeof(btSoftRigidCollisionAlgorithm::CreateFunc),16);
+ m_swappedSoftRigidConvexCreateFunc = new(mem) btSoftRigidCollisionAlgorithm::CreateFunc;
+ m_swappedSoftRigidConvexCreateFunc->m_swapped=true;
+
+#ifdef ENABLE_SOFTBODY_CONCAVE_COLLISIONS
+ mem = btAlignedAlloc(sizeof(btSoftBodyConcaveCollisionAlgorithm::CreateFunc),16);
+ m_softRigidConcaveCreateFunc = new(mem) btSoftBodyConcaveCollisionAlgorithm::CreateFunc;
+
+ mem = btAlignedAlloc(sizeof(btSoftBodyConcaveCollisionAlgorithm::CreateFunc),16);
+ m_swappedSoftRigidConcaveCreateFunc = new(mem) btSoftBodyConcaveCollisionAlgorithm::SwappedCreateFunc;
+ m_swappedSoftRigidConcaveCreateFunc->m_swapped=true;
+#endif
+
+ //replace pool by a new one, with potential larger size
+
+ if (m_ownsCollisionAlgorithmPool && m_collisionAlgorithmPool)
+ {
+ int curElemSize = m_collisionAlgorithmPool->getElementSize();
+ ///calculate maximum element size, big enough to fit any collision algorithm in the memory pool
+
+
+ int maxSize0 = sizeof(btSoftSoftCollisionAlgorithm);
+ int maxSize1 = sizeof(btSoftRigidCollisionAlgorithm);
+ int maxSize2 = sizeof(btSoftBodyConcaveCollisionAlgorithm);
+
+ int collisionAlgorithmMaxElementSize = btMax(maxSize0,maxSize1);
+ collisionAlgorithmMaxElementSize = btMax(collisionAlgorithmMaxElementSize,maxSize2);
+
+ if (collisionAlgorithmMaxElementSize > curElemSize)
+ {
+ m_collisionAlgorithmPool->~btPoolAllocator();
+ btAlignedFree(m_collisionAlgorithmPool);
+ void* mem = btAlignedAlloc(sizeof(btPoolAllocator),16);
+ m_collisionAlgorithmPool = new(mem) btPoolAllocator(collisionAlgorithmMaxElementSize,constructionInfo.m_defaultMaxCollisionAlgorithmPoolSize);
+ }
+ }
+
+}
+
+btSoftBodyRigidBodyCollisionConfiguration::~btSoftBodyRigidBodyCollisionConfiguration()
+{
+ m_softSoftCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_softSoftCreateFunc);
+
+ m_softRigidConvexCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_softRigidConvexCreateFunc);
+
+ m_swappedSoftRigidConvexCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_swappedSoftRigidConvexCreateFunc);
+
+#ifdef ENABLE_SOFTBODY_CONCAVE_COLLISIONS
+ m_softRigidConcaveCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_softRigidConcaveCreateFunc);
+
+ m_swappedSoftRigidConcaveCreateFunc->~btCollisionAlgorithmCreateFunc();
+ btAlignedFree( m_swappedSoftRigidConcaveCreateFunc);
+#endif
+}
+
+///creation of soft-soft and soft-rigid, and otherwise fallback to base class implementation
+btCollisionAlgorithmCreateFunc* btSoftBodyRigidBodyCollisionConfiguration::getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1)
+{
+
+ ///try to handle the softbody interactions first
+
+ if ((proxyType0 == SOFTBODY_SHAPE_PROXYTYPE ) && (proxyType1==SOFTBODY_SHAPE_PROXYTYPE))
+ {
+ return m_softSoftCreateFunc;
+ }
+
+ ///softbody versus convex
+ if (proxyType0 == SOFTBODY_SHAPE_PROXYTYPE && btBroadphaseProxy::isConvex(proxyType1))
+ {
+ return m_softRigidConvexCreateFunc;
+ }
+
+ ///convex versus soft body
+ if (btBroadphaseProxy::isConvex(proxyType0) && proxyType1 == SOFTBODY_SHAPE_PROXYTYPE )
+ {
+ return m_swappedSoftRigidConvexCreateFunc;
+ }
+
+#ifdef ENABLE_SOFTBODY_CONCAVE_COLLISIONS
+ ///softbody versus convex
+ if (proxyType0 == SOFTBODY_SHAPE_PROXYTYPE && btBroadphaseProxy::isConcave(proxyType1))
+ {
+ return m_softRigidConcaveCreateFunc;
+ }
+
+ ///convex versus soft body
+ if (btBroadphaseProxy::isConcave(proxyType0) && proxyType1 == SOFTBODY_SHAPE_PROXYTYPE )
+ {
+ return m_swappedSoftRigidConcaveCreateFunc;
+ }
+#endif
+
+ ///fallback to the regular rigid collision shape
+ return btDefaultCollisionConfiguration::getCollisionAlgorithmCreateFunc(proxyType0,proxyType1);
+}
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h b/tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h
new file mode 100644
index 00000000..21addcfe
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h
@@ -0,0 +1,48 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFTBODY_RIGIDBODY_COLLISION_CONFIGURATION
+#define BT_SOFTBODY_RIGIDBODY_COLLISION_CONFIGURATION
+
+#include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"
+
+class btVoronoiSimplexSolver;
+class btGjkEpaPenetrationDepthSolver;
+
+
+///btSoftBodyRigidBodyCollisionConfiguration add softbody interaction on top of btDefaultCollisionConfiguration
+class btSoftBodyRigidBodyCollisionConfiguration : public btDefaultCollisionConfiguration
+{
+
+ //default CreationFunctions, filling the m_doubleDispatch table
+ btCollisionAlgorithmCreateFunc* m_softSoftCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_softRigidConvexCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_swappedSoftRigidConvexCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_softRigidConcaveCreateFunc;
+ btCollisionAlgorithmCreateFunc* m_swappedSoftRigidConcaveCreateFunc;
+
+public:
+
+ btSoftBodyRigidBodyCollisionConfiguration(const btDefaultCollisionConstructionInfo& constructionInfo = btDefaultCollisionConstructionInfo());
+
+ virtual ~btSoftBodyRigidBodyCollisionConfiguration();
+
+ ///creation of soft-soft and soft-rigid, and otherwise fallback to base class implementation
+ virtual btCollisionAlgorithmCreateFunc* getCollisionAlgorithmCreateFunc(int proxyType0,int proxyType1);
+
+};
+
+#endif //BT_SOFTBODY_RIGIDBODY_COLLISION_CONFIGURATION
+
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodySolverVertexBuffer.h b/tests/bullet/src/BulletSoftBody/btSoftBodySolverVertexBuffer.h
new file mode 100644
index 00000000..4c75bf21
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodySolverVertexBuffer.h
@@ -0,0 +1,165 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_H
+#define BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_H
+
+
+class btVertexBufferDescriptor
+{
+public:
+ enum BufferTypes
+ {
+ CPU_BUFFER,
+ DX11_BUFFER,
+ OPENGL_BUFFER
+ };
+
+protected:
+
+ bool m_hasVertexPositions;
+ bool m_hasNormals;
+
+ int m_vertexOffset;
+ int m_vertexStride;
+
+ int m_normalOffset;
+ int m_normalStride;
+
+public:
+ btVertexBufferDescriptor()
+ {
+ m_hasVertexPositions = false;
+ m_hasNormals = false;
+ m_vertexOffset = 0;
+ m_vertexStride = 0;
+ m_normalOffset = 0;
+ m_normalStride = 0;
+ }
+
+ virtual ~btVertexBufferDescriptor()
+ {
+
+ }
+
+ virtual bool hasVertexPositions() const
+ {
+ return m_hasVertexPositions;
+ }
+
+ virtual bool hasNormals() const
+ {
+ return m_hasNormals;
+ }
+
+ /**
+ * Return the type of the vertex buffer descriptor.
+ */
+ virtual BufferTypes getBufferType() const = 0;
+
+ /**
+ * Return the vertex offset in floats from the base pointer.
+ */
+ virtual int getVertexOffset() const
+ {
+ return m_vertexOffset;
+ }
+
+ /**
+ * Return the vertex stride in number of floats between vertices.
+ */
+ virtual int getVertexStride() const
+ {
+ return m_vertexStride;
+ }
+
+ /**
+ * Return the vertex offset in floats from the base pointer.
+ */
+ virtual int getNormalOffset() const
+ {
+ return m_normalOffset;
+ }
+
+ /**
+ * Return the vertex stride in number of floats between vertices.
+ */
+ virtual int getNormalStride() const
+ {
+ return m_normalStride;
+ }
+};
+
+
+class btCPUVertexBufferDescriptor : public btVertexBufferDescriptor
+{
+protected:
+ float *m_basePointer;
+
+public:
+ /**
+ * vertexBasePointer is pointer to beginning of the buffer.
+ * vertexOffset is the offset in floats to the first vertex.
+ * vertexStride is the stride in floats between vertices.
+ */
+ btCPUVertexBufferDescriptor( float *basePointer, int vertexOffset, int vertexStride )
+ {
+ m_basePointer = basePointer;
+ m_vertexOffset = vertexOffset;
+ m_vertexStride = vertexStride;
+ m_hasVertexPositions = true;
+ }
+
+ /**
+ * vertexBasePointer is pointer to beginning of the buffer.
+ * vertexOffset is the offset in floats to the first vertex.
+ * vertexStride is the stride in floats between vertices.
+ */
+ btCPUVertexBufferDescriptor( float *basePointer, int vertexOffset, int vertexStride, int normalOffset, int normalStride )
+ {
+ m_basePointer = basePointer;
+
+ m_vertexOffset = vertexOffset;
+ m_vertexStride = vertexStride;
+ m_hasVertexPositions = true;
+
+ m_normalOffset = normalOffset;
+ m_normalStride = normalStride;
+ m_hasNormals = true;
+ }
+
+ virtual ~btCPUVertexBufferDescriptor()
+ {
+
+ }
+
+ /**
+ * Return the type of the vertex buffer descriptor.
+ */
+ virtual BufferTypes getBufferType() const
+ {
+ return CPU_BUFFER;
+ }
+
+ /**
+ * Return the base pointer in memory to the first vertex.
+ */
+ virtual float *getBasePointer() const
+ {
+ return m_basePointer;
+ }
+};
+
+#endif // #ifndef BT_SOFT_BODY_SOLVER_VERTEX_BUFFER_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftBodySolvers.h b/tests/bullet/src/BulletSoftBody/btSoftBodySolvers.h
new file mode 100644
index 00000000..01168b61
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftBodySolvers.h
@@ -0,0 +1,154 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_BODY_SOLVERS_H
+#define BT_SOFT_BODY_SOLVERS_H
+
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+
+
+class btSoftBodyTriangleData;
+class btSoftBodyLinkData;
+class btSoftBodyVertexData;
+class btVertexBufferDescriptor;
+class btCollisionObject;
+class btSoftBody;
+
+
+class btSoftBodySolver
+{
+public:
+ enum SolverTypes
+ {
+ DEFAULT_SOLVER,
+ CPU_SOLVER,
+ CL_SOLVER,
+ CL_SIMD_SOLVER,
+ DX_SOLVER,
+ DX_SIMD_SOLVER
+ };
+
+
+protected:
+ int m_numberOfPositionIterations;
+ int m_numberOfVelocityIterations;
+ // Simulation timescale
+ float m_timeScale;
+
+public:
+ btSoftBodySolver() :
+ m_numberOfPositionIterations( 10 ),
+ m_timeScale( 1 )
+ {
+ m_numberOfVelocityIterations = 0;
+ m_numberOfPositionIterations = 5;
+ }
+
+ virtual ~btSoftBodySolver()
+ {
+ }
+
+ /**
+ * Return the type of the solver.
+ */
+ virtual SolverTypes getSolverType() const = 0;
+
+
+ /** Ensure that this solver is initialized. */
+ virtual bool checkInitialized() = 0;
+
+ /** Optimize soft bodies in this solver. */
+ virtual void optimize( btAlignedObjectArray< btSoftBody * > &softBodies , bool forceUpdate=false) = 0;
+
+ /** Copy necessary data back to the original soft body source objects. */
+ virtual void copyBackToSoftBodies() = 0;
+
+ /** Predict motion of soft bodies into next timestep */
+ virtual void predictMotion( float solverdt ) = 0;
+
+ /** Solve constraints for a set of soft bodies */
+ virtual void solveConstraints( float solverdt ) = 0;
+
+ /** Perform necessary per-step updates of soft bodies such as recomputing normals and bounding boxes */
+ virtual void updateSoftBodies() = 0;
+
+ /** Process a collision between one of the world's soft bodies and another collision object */
+ virtual void processCollision( btSoftBody *, btCollisionObject* ) = 0;
+
+ /** Process a collision between two soft bodies */
+ virtual void processCollision( btSoftBody*, btSoftBody* ) = 0;
+
+ /** Set the number of velocity constraint solver iterations this solver uses. */
+ virtual void setNumberOfPositionIterations( int iterations )
+ {
+ m_numberOfPositionIterations = iterations;
+ }
+
+ /** Get the number of velocity constraint solver iterations this solver uses. */
+ virtual int getNumberOfPositionIterations()
+ {
+ return m_numberOfPositionIterations;
+ }
+
+ /** Set the number of velocity constraint solver iterations this solver uses. */
+ virtual void setNumberOfVelocityIterations( int iterations )
+ {
+ m_numberOfVelocityIterations = iterations;
+ }
+
+ /** Get the number of velocity constraint solver iterations this solver uses. */
+ virtual int getNumberOfVelocityIterations()
+ {
+ return m_numberOfVelocityIterations;
+ }
+
+ /** Return the timescale that the simulation is using */
+ float getTimeScale()
+ {
+ return m_timeScale;
+ }
+
+#if 0
+ /**
+ * Add a collision object to be used by the indicated softbody.
+ */
+ virtual void addCollisionObjectForSoftBody( int clothIdentifier, btCollisionObject *collisionObject ) = 0;
+#endif
+};
+
+/**
+ * Class to manage movement of data from a solver to a given target.
+ * This version is abstract. Subclasses will have custom pairings for different combinations.
+ */
+class btSoftBodySolverOutput
+{
+protected:
+
+public:
+ btSoftBodySolverOutput()
+ {
+ }
+
+ virtual ~btSoftBodySolverOutput()
+ {
+ }
+
+
+ /** Output current computed vertex data to the vertex buffers for all cloths in the solver. */
+ virtual void copySoftBodyToVertexBuffer( const btSoftBody * const softBody, btVertexBufferDescriptor *vertexBuffer ) = 0;
+};
+
+
+#endif // #ifndef BT_SOFT_BODY_SOLVERS_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp b/tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp
new file mode 100644
index 00000000..bc374c80
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp
@@ -0,0 +1,84 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSoftRigidCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "btSoftBody.h"
+#include "BulletSoftBody/btSoftBodySolvers.h"
+
+///TODO: include all the shapes that the softbody can collide with
+///alternatively, implement special case collision algorithms (just like for rigid collision shapes)
+
+//#include <stdio.h>
+
+btSoftRigidCollisionAlgorithm::btSoftRigidCollisionAlgorithm(btPersistentManifold* /*mf*/,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* /*col0*/,btCollisionObject* /*col1*/, bool isSwapped)
+: btCollisionAlgorithm(ci),
+//m_ownManifold(false),
+//m_manifoldPtr(mf),
+m_isSwapped(isSwapped)
+{
+}
+
+
+btSoftRigidCollisionAlgorithm::~btSoftRigidCollisionAlgorithm()
+{
+
+ //m_softBody->m_overlappingRigidBodies.remove(m_rigidCollisionObject);
+
+ /*if (m_ownManifold)
+ {
+ if (m_manifoldPtr)
+ m_dispatcher->releaseManifold(m_manifoldPtr);
+ }
+ */
+
+}
+
+
+#include <stdio.h>
+
+void btSoftRigidCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)dispatchInfo;
+ (void)resultOut;
+ //printf("btSoftRigidCollisionAlgorithm\n");
+
+ btSoftBody* softBody = m_isSwapped? (btSoftBody*)body1 : (btSoftBody*)body0;
+ btCollisionObject* rigidCollisionObject = m_isSwapped? body0 : body1;
+
+ if (softBody->m_collisionDisabledObjects.findLinearSearch(rigidCollisionObject)==softBody->m_collisionDisabledObjects.size())
+ {
+ softBody->getSoftBodySolver()->processCollision(softBody, rigidCollisionObject);
+ }
+
+
+}
+
+btScalar btSoftRigidCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* col0,btCollisionObject* col1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut)
+{
+ (void)resultOut;
+ (void)dispatchInfo;
+ (void)col0;
+ (void)col1;
+
+ //not yet
+ return btScalar(1.);
+}
+
+
+
diff --git a/tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h b/tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h
new file mode 100644
index 00000000..7658e3c2
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftRigidCollisionAlgorithm.h
@@ -0,0 +1,75 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_RIGID_COLLISION_ALGORITHM_H
+#define BT_SOFT_RIGID_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+class btPersistentManifold;
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+
+#include "LinearMath/btVector3.h"
+class btSoftBody;
+
+/// btSoftRigidCollisionAlgorithm provides collision detection between btSoftBody and btRigidBody
+class btSoftRigidCollisionAlgorithm : public btCollisionAlgorithm
+{
+ // bool m_ownManifold;
+ // btPersistentManifold* m_manifoldPtr;
+
+ btSoftBody* m_softBody;
+ btCollisionObject* m_rigidCollisionObject;
+
+ ///for rigid versus soft (instead of soft versus rigid), we use this swapped boolean
+ bool m_isSwapped;
+
+public:
+
+ btSoftRigidCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* col0,btCollisionObject* col1, bool isSwapped);
+
+ virtual ~btSoftRigidCollisionAlgorithm();
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ //we don't add any manifolds
+ }
+
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ void* mem = ci.m_dispatcher1->allocateCollisionAlgorithm(sizeof(btSoftRigidCollisionAlgorithm));
+ if (!m_swapped)
+ {
+ return new(mem) btSoftRigidCollisionAlgorithm(0,ci,body0,body1,false);
+ } else
+ {
+ return new(mem) btSoftRigidCollisionAlgorithm(0,ci,body0,body1,true);
+ }
+ }
+ };
+
+};
+
+#endif //BT_SOFT_RIGID_COLLISION_ALGORITHM_H
+
+
diff --git a/tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp b/tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp
new file mode 100644
index 00000000..1b9b5e39
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.cpp
@@ -0,0 +1,358 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#include "btSoftRigidDynamicsWorld.h"
+#include "LinearMath/btQuickprof.h"
+
+//softbody & helpers
+#include "btSoftBody.h"
+#include "btSoftBodyHelpers.h"
+#include "btSoftBodySolvers.h"
+#include "btDefaultSoftBodySolver.h"
+#include "LinearMath/btSerializer.h"
+
+
+btSoftRigidDynamicsWorld::btSoftRigidDynamicsWorld(
+ btDispatcher* dispatcher,
+ btBroadphaseInterface* pairCache,
+ btConstraintSolver* constraintSolver,
+ btCollisionConfiguration* collisionConfiguration,
+ btSoftBodySolver *softBodySolver ) :
+ btDiscreteDynamicsWorld(dispatcher,pairCache,constraintSolver,collisionConfiguration),
+ m_softBodySolver( softBodySolver ),
+ m_ownsSolver(false)
+{
+ if( !m_softBodySolver )
+ {
+ void* ptr = btAlignedAlloc(sizeof(btDefaultSoftBodySolver),16);
+ m_softBodySolver = new(ptr) btDefaultSoftBodySolver();
+ m_ownsSolver = true;
+ }
+
+ m_drawFlags = fDrawFlags::Std;
+ m_drawNodeTree = true;
+ m_drawFaceTree = false;
+ m_drawClusterTree = false;
+ m_sbi.m_broadphase = pairCache;
+ m_sbi.m_dispatcher = dispatcher;
+ m_sbi.m_sparsesdf.Initialize();
+ m_sbi.m_sparsesdf.Reset();
+
+ m_sbi.air_density = (btScalar)1.2;
+ m_sbi.water_density = 0;
+ m_sbi.water_offset = 0;
+ m_sbi.water_normal = btVector3(0,0,0);
+ m_sbi.m_gravity.setValue(0,-10,0);
+
+ m_sbi.m_sparsesdf.Initialize();
+
+
+}
+
+btSoftRigidDynamicsWorld::~btSoftRigidDynamicsWorld()
+{
+ if (m_ownsSolver)
+ {
+ m_softBodySolver->~btSoftBodySolver();
+ btAlignedFree(m_softBodySolver);
+ }
+}
+
+void btSoftRigidDynamicsWorld::predictUnconstraintMotion(btScalar timeStep)
+{
+ btDiscreteDynamicsWorld::predictUnconstraintMotion( timeStep );
+ {
+ BT_PROFILE("predictUnconstraintMotionSoftBody");
+ m_softBodySolver->predictMotion( timeStep );
+ }
+}
+
+void btSoftRigidDynamicsWorld::internalSingleStepSimulation( btScalar timeStep )
+{
+
+ // Let the solver grab the soft bodies and if necessary optimize for it
+ m_softBodySolver->optimize( getSoftBodyArray() );
+
+ if( !m_softBodySolver->checkInitialized() )
+ {
+ btAssert( "Solver initialization failed\n" );
+ }
+
+ btDiscreteDynamicsWorld::internalSingleStepSimulation( timeStep );
+
+ ///solve soft bodies constraints
+ solveSoftBodiesConstraints( timeStep );
+
+ //self collisions
+ for ( int i=0;i<m_softBodies.size();i++)
+ {
+ btSoftBody* psb=(btSoftBody*)m_softBodies[i];
+ psb->defaultCollisionHandler(psb);
+ }
+
+ ///update soft bodies
+ m_softBodySolver->updateSoftBodies( );
+
+ // End solver-wise simulation step
+ // ///////////////////////////////
+
+}
+
+void btSoftRigidDynamicsWorld::solveSoftBodiesConstraints( btScalar timeStep )
+{
+ BT_PROFILE("solveSoftConstraints");
+
+ if(m_softBodies.size())
+ {
+ btSoftBody::solveClusters(m_softBodies);
+ }
+
+ // Solve constraints solver-wise
+ m_softBodySolver->solveConstraints( timeStep * m_softBodySolver->getTimeScale() );
+
+}
+
+void btSoftRigidDynamicsWorld::addSoftBody(btSoftBody* body,short int collisionFilterGroup,short int collisionFilterMask)
+{
+ m_softBodies.push_back(body);
+
+ // Set the soft body solver that will deal with this body
+ // to be the world's solver
+ body->setSoftBodySolver( m_softBodySolver );
+
+ btCollisionWorld::addCollisionObject(body,
+ collisionFilterGroup,
+ collisionFilterMask);
+
+}
+
+void btSoftRigidDynamicsWorld::removeSoftBody(btSoftBody* body)
+{
+ m_softBodies.remove(body);
+
+ btCollisionWorld::removeCollisionObject(body);
+}
+
+void btSoftRigidDynamicsWorld::removeCollisionObject(btCollisionObject* collisionObject)
+{
+ btSoftBody* body = btSoftBody::upcast(collisionObject);
+ if (body)
+ removeSoftBody(body);
+ else
+ btDiscreteDynamicsWorld::removeCollisionObject(collisionObject);
+}
+
+void btSoftRigidDynamicsWorld::debugDrawWorld()
+{
+ btDiscreteDynamicsWorld::debugDrawWorld();
+
+ if (getDebugDrawer())
+ {
+ int i;
+ for ( i=0;i<this->m_softBodies.size();i++)
+ {
+ btSoftBody* psb=(btSoftBody*)this->m_softBodies[i];
+ if (getDebugDrawer() && getDebugDrawer()->getDebugMode() & (btIDebugDraw::DBG_DrawWireframe))
+ {
+ btSoftBodyHelpers::DrawFrame(psb,m_debugDrawer);
+ btSoftBodyHelpers::Draw(psb,m_debugDrawer,m_drawFlags);
+ }
+
+ if (m_debugDrawer && (m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_DrawAabb))
+ {
+ if(m_drawNodeTree) btSoftBodyHelpers::DrawNodeTree(psb,m_debugDrawer);
+ if(m_drawFaceTree) btSoftBodyHelpers::DrawFaceTree(psb,m_debugDrawer);
+ if(m_drawClusterTree) btSoftBodyHelpers::DrawClusterTree(psb,m_debugDrawer);
+ }
+ }
+ }
+}
+
+
+
+
+struct btSoftSingleRayCallback : public btBroadphaseRayCallback
+{
+ btVector3 m_rayFromWorld;
+ btVector3 m_rayToWorld;
+ btTransform m_rayFromTrans;
+ btTransform m_rayToTrans;
+ btVector3 m_hitNormal;
+
+ const btSoftRigidDynamicsWorld* m_world;
+ btCollisionWorld::RayResultCallback& m_resultCallback;
+
+ btSoftSingleRayCallback(const btVector3& rayFromWorld,const btVector3& rayToWorld,const btSoftRigidDynamicsWorld* world,btCollisionWorld::RayResultCallback& resultCallback)
+ :m_rayFromWorld(rayFromWorld),
+ m_rayToWorld(rayToWorld),
+ m_world(world),
+ m_resultCallback(resultCallback)
+ {
+ m_rayFromTrans.setIdentity();
+ m_rayFromTrans.setOrigin(m_rayFromWorld);
+ m_rayToTrans.setIdentity();
+ m_rayToTrans.setOrigin(m_rayToWorld);
+
+ btVector3 rayDir = (rayToWorld-rayFromWorld);
+
+ rayDir.normalize ();
+ ///what about division by zero? --> just set rayDirection[i] to INF/1e30
+ m_rayDirectionInverse[0] = rayDir[0] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[0];
+ m_rayDirectionInverse[1] = rayDir[1] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[1];
+ m_rayDirectionInverse[2] = rayDir[2] == btScalar(0.0) ? btScalar(1e30) : btScalar(1.0) / rayDir[2];
+ m_signs[0] = m_rayDirectionInverse[0] < 0.0;
+ m_signs[1] = m_rayDirectionInverse[1] < 0.0;
+ m_signs[2] = m_rayDirectionInverse[2] < 0.0;
+
+ m_lambda_max = rayDir.dot(m_rayToWorld-m_rayFromWorld);
+
+ }
+
+
+
+ virtual bool process(const btBroadphaseProxy* proxy)
+ {
+ ///terminate further ray tests, once the closestHitFraction reached zero
+ if (m_resultCallback.m_closestHitFraction == btScalar(0.f))
+ return false;
+
+ btCollisionObject* collisionObject = (btCollisionObject*)proxy->m_clientObject;
+
+ //only perform raycast if filterMask matches
+ if(m_resultCallback.needsCollision(collisionObject->getBroadphaseHandle()))
+ {
+ //RigidcollisionObject* collisionObject = ctrl->GetRigidcollisionObject();
+ //btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+#if 0
+#ifdef RECALCULATE_AABB
+ btVector3 collisionObjectAabbMin,collisionObjectAabbMax;
+ collisionObject->getCollisionShape()->getAabb(collisionObject->getWorldTransform(),collisionObjectAabbMin,collisionObjectAabbMax);
+#else
+ //getBroadphase()->getAabb(collisionObject->getBroadphaseHandle(),collisionObjectAabbMin,collisionObjectAabbMax);
+ const btVector3& collisionObjectAabbMin = collisionObject->getBroadphaseHandle()->m_aabbMin;
+ const btVector3& collisionObjectAabbMax = collisionObject->getBroadphaseHandle()->m_aabbMax;
+#endif
+#endif
+ //btScalar hitLambda = m_resultCallback.m_closestHitFraction;
+ //culling already done by broadphase
+ //if (btRayAabb(m_rayFromWorld,m_rayToWorld,collisionObjectAabbMin,collisionObjectAabbMax,hitLambda,m_hitNormal))
+ {
+ m_world->rayTestSingle(m_rayFromTrans,m_rayToTrans,
+ collisionObject,
+ collisionObject->getCollisionShape(),
+ collisionObject->getWorldTransform(),
+ m_resultCallback);
+ }
+ }
+ return true;
+ }
+};
+
+void btSoftRigidDynamicsWorld::rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const
+{
+ BT_PROFILE("rayTest");
+ /// use the broadphase to accelerate the search for objects, based on their aabb
+ /// and for each object with ray-aabb overlap, perform an exact ray test
+ btSoftSingleRayCallback rayCB(rayFromWorld,rayToWorld,this,resultCallback);
+
+#ifndef USE_BRUTEFORCE_RAYBROADPHASE
+ m_broadphasePairCache->rayTest(rayFromWorld,rayToWorld,rayCB);
+#else
+ for (int i=0;i<this->getNumCollisionObjects();i++)
+ {
+ rayCB.process(m_collisionObjects[i]->getBroadphaseHandle());
+ }
+#endif //USE_BRUTEFORCE_RAYBROADPHASE
+
+}
+
+
+void btSoftRigidDynamicsWorld::rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
+ btCollisionObject* collisionObject,
+ const btCollisionShape* collisionShape,
+ const btTransform& colObjWorldTransform,
+ RayResultCallback& resultCallback)
+{
+ if (collisionShape->isSoftBody()) {
+ btSoftBody* softBody = btSoftBody::upcast(collisionObject);
+ if (softBody) {
+ btSoftBody::sRayCast softResult;
+ if (softBody->rayTest(rayFromTrans.getOrigin(), rayToTrans.getOrigin(), softResult))
+ {
+
+ if (softResult.fraction<= resultCallback.m_closestHitFraction)
+ {
+
+ btCollisionWorld::LocalShapeInfo shapeInfo;
+ shapeInfo.m_shapePart = 0;
+ shapeInfo.m_triangleIndex = softResult.index;
+ // get the normal
+ btVector3 normal = softBody->m_faces[softResult.index].m_normal;
+ btVector3 rayDir = rayToTrans.getOrigin() - rayFromTrans.getOrigin();
+ if (normal.dot(rayDir) > 0) {
+ // normal always point toward origin of the ray
+ normal = -normal;
+ }
+ btCollisionWorld::LocalRayResult rayResult
+ (collisionObject,
+ &shapeInfo,
+ normal,
+ softResult.fraction);
+ bool normalInWorldSpace = true;
+ resultCallback.addSingleResult(rayResult,normalInWorldSpace);
+ }
+ }
+ }
+ }
+ else {
+ btCollisionWorld::rayTestSingle(rayFromTrans,rayToTrans,collisionObject,collisionShape,colObjWorldTransform,resultCallback);
+ }
+}
+
+
+void btSoftRigidDynamicsWorld::serializeSoftBodies(btSerializer* serializer)
+{
+ int i;
+ //serialize all collision objects
+ for (i=0;i<m_collisionObjects.size();i++)
+ {
+ btCollisionObject* colObj = m_collisionObjects[i];
+ if (colObj->getInternalType() & btCollisionObject::CO_SOFT_BODY)
+ {
+ int len = colObj->calculateSerializeBufferSize();
+ btChunk* chunk = serializer->allocate(len,1);
+ const char* structType = colObj->serialize(chunk->m_oldPtr, serializer);
+ serializer->finalizeChunk(chunk,structType,BT_SOFTBODY_CODE,colObj);
+ }
+ }
+
+}
+
+void btSoftRigidDynamicsWorld::serialize(btSerializer* serializer)
+{
+
+ serializer->startSerialization();
+
+ serializeSoftBodies(serializer);
+
+ serializeRigidBodies(serializer);
+
+ serializeCollisionObjects(serializer);
+
+ serializer->finishSerialization();
+}
+
+
diff --git a/tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.h b/tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.h
new file mode 100644
index 00000000..3e0efafd
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftRigidDynamicsWorld.h
@@ -0,0 +1,107 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_RIGID_DYNAMICS_WORLD_H
+#define BT_SOFT_RIGID_DYNAMICS_WORLD_H
+
+#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
+#include "btSoftBody.h"
+
+typedef btAlignedObjectArray<btSoftBody*> btSoftBodyArray;
+
+class btSoftBodySolver;
+
+class btSoftRigidDynamicsWorld : public btDiscreteDynamicsWorld
+{
+
+ btSoftBodyArray m_softBodies;
+ int m_drawFlags;
+ bool m_drawNodeTree;
+ bool m_drawFaceTree;
+ bool m_drawClusterTree;
+ btSoftBodyWorldInfo m_sbi;
+ ///Solver classes that encapsulate multiple soft bodies for solving
+ btSoftBodySolver *m_softBodySolver;
+ bool m_ownsSolver;
+
+protected:
+
+ virtual void predictUnconstraintMotion(btScalar timeStep);
+
+ virtual void internalSingleStepSimulation( btScalar timeStep);
+
+ void solveSoftBodiesConstraints( btScalar timeStep );
+
+ void serializeSoftBodies(btSerializer* serializer);
+
+public:
+
+ btSoftRigidDynamicsWorld(btDispatcher* dispatcher,btBroadphaseInterface* pairCache,btConstraintSolver* constraintSolver, btCollisionConfiguration* collisionConfiguration, btSoftBodySolver *softBodySolver = 0 );
+
+ virtual ~btSoftRigidDynamicsWorld();
+
+ virtual void debugDrawWorld();
+
+ void addSoftBody(btSoftBody* body,short int collisionFilterGroup=btBroadphaseProxy::DefaultFilter,short int collisionFilterMask=btBroadphaseProxy::AllFilter);
+
+ void removeSoftBody(btSoftBody* body);
+
+ ///removeCollisionObject will first check if it is a rigid body, if so call removeRigidBody otherwise call btDiscreteDynamicsWorld::removeCollisionObject
+ virtual void removeCollisionObject(btCollisionObject* collisionObject);
+
+ int getDrawFlags() const { return(m_drawFlags); }
+ void setDrawFlags(int f) { m_drawFlags=f; }
+
+ btSoftBodyWorldInfo& getWorldInfo()
+ {
+ return m_sbi;
+ }
+ const btSoftBodyWorldInfo& getWorldInfo() const
+ {
+ return m_sbi;
+ }
+
+ virtual btDynamicsWorldType getWorldType() const
+ {
+ return BT_SOFT_RIGID_DYNAMICS_WORLD;
+ }
+
+ btSoftBodyArray& getSoftBodyArray()
+ {
+ return m_softBodies;
+ }
+
+ const btSoftBodyArray& getSoftBodyArray() const
+ {
+ return m_softBodies;
+ }
+
+
+ virtual void rayTest(const btVector3& rayFromWorld, const btVector3& rayToWorld, RayResultCallback& resultCallback) const;
+
+ /// rayTestSingle performs a raycast call and calls the resultCallback. It is used internally by rayTest.
+ /// In a future implementation, we consider moving the ray test as a virtual method in btCollisionShape.
+ /// This allows more customization.
+ static void rayTestSingle(const btTransform& rayFromTrans,const btTransform& rayToTrans,
+ btCollisionObject* collisionObject,
+ const btCollisionShape* collisionShape,
+ const btTransform& colObjWorldTransform,
+ RayResultCallback& resultCallback);
+
+ virtual void serialize(btSerializer* serializer);
+
+};
+
+#endif //BT_SOFT_RIGID_DYNAMICS_WORLD_H
diff --git a/tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp b/tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp
new file mode 100644
index 00000000..1b8cfa72
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp
@@ -0,0 +1,47 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btSoftSoftCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletSoftBody/btSoftBodySolvers.h"
+#include "btSoftBody.h"
+
+#define USE_PERSISTENT_CONTACTS 1
+
+btSoftSoftCollisionAlgorithm::btSoftSoftCollisionAlgorithm(btPersistentManifold* /*mf*/,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* /*obj0*/,btCollisionObject* /*obj1*/)
+: btCollisionAlgorithm(ci)
+//m_ownManifold(false),
+//m_manifoldPtr(mf)
+{
+}
+
+btSoftSoftCollisionAlgorithm::~btSoftSoftCollisionAlgorithm()
+{
+}
+
+void btSoftSoftCollisionAlgorithm::processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& /*dispatchInfo*/,btManifoldResult* /*resultOut*/)
+{
+ btSoftBody* soft0 = (btSoftBody*)body0;
+ btSoftBody* soft1 = (btSoftBody*)body1;
+ soft0->getSoftBodySolver()->processCollision(soft0, soft1);
+}
+
+btScalar btSoftSoftCollisionAlgorithm::calculateTimeOfImpact(btCollisionObject* /*body0*/,btCollisionObject* /*body1*/,const btDispatcherInfo& /*dispatchInfo*/,btManifoldResult* /*resultOut*/)
+{
+ //not yet
+ return 1.f;
+}
diff --git a/tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h b/tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h
new file mode 100644
index 00000000..92d683c1
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSoftSoftCollisionAlgorithm.h
@@ -0,0 +1,69 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SOFT_SOFT_COLLISION_ALGORITHM_H
+#define BT_SOFT_SOFT_COLLISION_ALGORITHM_H
+
+#include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h"
+#include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
+#include "BulletCollision/BroadphaseCollision/btDispatcher.h"
+#include "BulletCollision/CollisionDispatch/btCollisionCreateFunc.h"
+
+class btPersistentManifold;
+class btSoftBody;
+
+///collision detection between two btSoftBody shapes
+class btSoftSoftCollisionAlgorithm : public btCollisionAlgorithm
+{
+ bool m_ownManifold;
+ btPersistentManifold* m_manifoldPtr;
+
+ btSoftBody* m_softBody0;
+ btSoftBody* m_softBody1;
+
+
+public:
+ btSoftSoftCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci)
+ : btCollisionAlgorithm(ci) {}
+
+ virtual void processCollision (btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual btScalar calculateTimeOfImpact(btCollisionObject* body0,btCollisionObject* body1,const btDispatcherInfo& dispatchInfo,btManifoldResult* resultOut);
+
+ virtual void getAllContactManifolds(btManifoldArray& manifoldArray)
+ {
+ if (m_manifoldPtr && m_ownManifold)
+ manifoldArray.push_back(m_manifoldPtr);
+ }
+
+ btSoftSoftCollisionAlgorithm(btPersistentManifold* mf,const btCollisionAlgorithmConstructionInfo& ci,btCollisionObject* body0,btCollisionObject* body1);
+
+ virtual ~btSoftSoftCollisionAlgorithm();
+
+ struct CreateFunc :public btCollisionAlgorithmCreateFunc
+ {
+ virtual btCollisionAlgorithm* CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo& ci, btCollisionObject* body0,btCollisionObject* body1)
+ {
+ int bbsize = sizeof(btSoftSoftCollisionAlgorithm);
+ void* ptr = ci.m_dispatcher1->allocateCollisionAlgorithm(bbsize);
+ return new(ptr) btSoftSoftCollisionAlgorithm(0,ci,body0,body1);
+ }
+ };
+
+};
+
+#endif //BT_SOFT_SOFT_COLLISION_ALGORITHM_H
+
+
diff --git a/tests/bullet/src/BulletSoftBody/btSparseSDF.h b/tests/bullet/src/BulletSoftBody/btSparseSDF.h
new file mode 100644
index 00000000..90a26cdf
--- /dev/null
+++ b/tests/bullet/src/BulletSoftBody/btSparseSDF.h
@@ -0,0 +1,306 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+///btSparseSdf implementation by Nathanael Presson
+
+#ifndef BT_SPARSE_SDF_H
+#define BT_SPARSE_SDF_H
+
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+#include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h"
+
+// Modified Paul Hsieh hash
+template <const int DWORDLEN>
+unsigned int HsiehHash(const void* pdata)
+{
+ const unsigned short* data=(const unsigned short*)pdata;
+ unsigned hash=DWORDLEN<<2,tmp;
+ for(int i=0;i<DWORDLEN;++i)
+ {
+ hash += data[0];
+ tmp = (data[1]<<11)^hash;
+ hash = (hash<<16)^tmp;
+ data += 2;
+ hash += hash>>11;
+ }
+ hash^=hash<<3;hash+=hash>>5;
+ hash^=hash<<4;hash+=hash>>17;
+ hash^=hash<<25;hash+=hash>>6;
+ return(hash);
+}
+
+template <const int CELLSIZE>
+struct btSparseSdf
+{
+ //
+ // Inner types
+ //
+ struct IntFrac
+ {
+ int b;
+ int i;
+ btScalar f;
+ };
+ struct Cell
+ {
+ btScalar d[CELLSIZE+1][CELLSIZE+1][CELLSIZE+1];
+ int c[3];
+ int puid;
+ unsigned hash;
+ btCollisionShape* pclient;
+ Cell* next;
+ };
+ //
+ // Fields
+ //
+
+ btAlignedObjectArray<Cell*> cells;
+ btScalar voxelsz;
+ int puid;
+ int ncells;
+ int nprobes;
+ int nqueries;
+
+ //
+ // Methods
+ //
+
+ //
+ void Initialize(int hashsize=2383)
+ {
+ cells.resize(hashsize,0);
+ Reset();
+ }
+ //
+ void Reset()
+ {
+ for(int i=0,ni=cells.size();i<ni;++i)
+ {
+ Cell* pc=cells[i];
+ cells[i]=0;
+ while(pc)
+ {
+ Cell* pn=pc->next;
+ delete pc;
+ pc=pn;
+ }
+ }
+ voxelsz =0.25;
+ puid =0;
+ ncells =0;
+ nprobes =1;
+ nqueries =1;
+ }
+ //
+ void GarbageCollect(int lifetime=256)
+ {
+ const int life=puid-lifetime;
+ for(int i=0;i<cells.size();++i)
+ {
+ Cell*& root=cells[i];
+ Cell* pp=0;
+ Cell* pc=root;
+ while(pc)
+ {
+ Cell* pn=pc->next;
+ if(pc->puid<life)
+ {
+ if(pp) pp->next=pn; else root=pn;
+ delete pc;pc=pp;--ncells;
+ }
+ pp=pc;pc=pn;
+ }
+ }
+ //printf("GC[%d]: %d cells, PpQ: %f\r\n",puid,ncells,nprobes/(btScalar)nqueries);
+ nqueries=1;
+ nprobes=1;
+ ++puid; ///@todo: Reset puid's when int range limit is reached */
+ /* else setup a priority list... */
+ }
+ //
+ int RemoveReferences(btCollisionShape* pcs)
+ {
+ int refcount=0;
+ for(int i=0;i<cells.size();++i)
+ {
+ Cell*& root=cells[i];
+ Cell* pp=0;
+ Cell* pc=root;
+ while(pc)
+ {
+ Cell* pn=pc->next;
+ if(pc->pclient==pcs)
+ {
+ if(pp) pp->next=pn; else root=pn;
+ delete pc;pc=pp;++refcount;
+ }
+ pp=pc;pc=pn;
+ }
+ }
+ return(refcount);
+ }
+ //
+ btScalar Evaluate( const btVector3& x,
+ btCollisionShape* shape,
+ btVector3& normal,
+ btScalar margin)
+ {
+ /* Lookup cell */
+ const btVector3 scx=x/voxelsz;
+ const IntFrac ix=Decompose(scx.x());
+ const IntFrac iy=Decompose(scx.y());
+ const IntFrac iz=Decompose(scx.z());
+ const unsigned h=Hash(ix.b,iy.b,iz.b,shape);
+ Cell*& root=cells[static_cast<int>(h%cells.size())];
+ Cell* c=root;
+ ++nqueries;
+ while(c)
+ {
+ ++nprobes;
+ if( (c->hash==h) &&
+ (c->c[0]==ix.b) &&
+ (c->c[1]==iy.b) &&
+ (c->c[2]==iz.b) &&
+ (c->pclient==shape))
+ { break; }
+ else
+ { c=c->next; }
+ }
+ if(!c)
+ {
+ ++nprobes;
+ ++ncells;
+ c=new Cell();
+ c->next=root;root=c;
+ c->pclient=shape;
+ c->hash=h;
+ c->c[0]=ix.b;c->c[1]=iy.b;c->c[2]=iz.b;
+ BuildCell(*c);
+ }
+ c->puid=puid;
+ /* Extract infos */
+ const int o[]={ ix.i,iy.i,iz.i};
+ const btScalar d[]={ c->d[o[0]+0][o[1]+0][o[2]+0],
+ c->d[o[0]+1][o[1]+0][o[2]+0],
+ c->d[o[0]+1][o[1]+1][o[2]+0],
+ c->d[o[0]+0][o[1]+1][o[2]+0],
+ c->d[o[0]+0][o[1]+0][o[2]+1],
+ c->d[o[0]+1][o[1]+0][o[2]+1],
+ c->d[o[0]+1][o[1]+1][o[2]+1],
+ c->d[o[0]+0][o[1]+1][o[2]+1]};
+ /* Normal */
+#if 1
+ const btScalar gx[]={ d[1]-d[0],d[2]-d[3],
+ d[5]-d[4],d[6]-d[7]};
+ const btScalar gy[]={ d[3]-d[0],d[2]-d[1],
+ d[7]-d[4],d[6]-d[5]};
+ const btScalar gz[]={ d[4]-d[0],d[5]-d[1],
+ d[7]-d[3],d[6]-d[2]};
+ normal.setX(Lerp( Lerp(gx[0],gx[1],iy.f),
+ Lerp(gx[2],gx[3],iy.f),iz.f));
+ normal.setY(Lerp( Lerp(gy[0],gy[1],ix.f),
+ Lerp(gy[2],gy[3],ix.f),iz.f));
+ normal.setZ(Lerp( Lerp(gz[0],gz[1],ix.f),
+ Lerp(gz[2],gz[3],ix.f),iy.f));
+ normal = normal.normalized();
+#else
+ normal = btVector3(d[1]-d[0],d[3]-d[0],d[4]-d[0]).normalized();
+#endif
+ /* Distance */
+ const btScalar d0=Lerp(Lerp(d[0],d[1],ix.f),
+ Lerp(d[3],d[2],ix.f),iy.f);
+ const btScalar d1=Lerp(Lerp(d[4],d[5],ix.f),
+ Lerp(d[7],d[6],ix.f),iy.f);
+ return(Lerp(d0,d1,iz.f)-margin);
+ }
+ //
+ void BuildCell(Cell& c)
+ {
+ const btVector3 org=btVector3( (btScalar)c.c[0],
+ (btScalar)c.c[1],
+ (btScalar)c.c[2]) *
+ CELLSIZE*voxelsz;
+ for(int k=0;k<=CELLSIZE;++k)
+ {
+ const btScalar z=voxelsz*k+org.z();
+ for(int j=0;j<=CELLSIZE;++j)
+ {
+ const btScalar y=voxelsz*j+org.y();
+ for(int i=0;i<=CELLSIZE;++i)
+ {
+ const btScalar x=voxelsz*i+org.x();
+ c.d[i][j][k]=DistanceToShape( btVector3(x,y,z),
+ c.pclient);
+ }
+ }
+ }
+ }
+ //
+ static inline btScalar DistanceToShape(const btVector3& x,
+ btCollisionShape* shape)
+ {
+ btTransform unit;
+ unit.setIdentity();
+ if(shape->isConvex())
+ {
+ btGjkEpaSolver2::sResults res;
+ btConvexShape* csh=static_cast<btConvexShape*>(shape);
+ return(btGjkEpaSolver2::SignedDistance(x,0,csh,unit,res));
+ }
+ return(0);
+ }
+ //
+ static inline IntFrac Decompose(btScalar x)
+ {
+ /* That one need a lot of improvements... */
+ /* Remove test, faster floor... */
+ IntFrac r;
+ x/=CELLSIZE;
+ const int o=x<0?(int)(-x+1):0;
+ x+=o;r.b=(int)x;
+ const btScalar k=(x-r.b)*CELLSIZE;
+ r.i=(int)k;r.f=k-r.i;r.b-=o;
+ return(r);
+ }
+ //
+ static inline btScalar Lerp(btScalar a,btScalar b,btScalar t)
+ {
+ return(a+(b-a)*t);
+ }
+
+
+
+ //
+ static inline unsigned int Hash(int x,int y,int z,btCollisionShape* shape)
+ {
+ struct btS
+ {
+ int x,y,z;
+ void* p;
+ };
+
+ btS myset;
+
+ myset.x=x;myset.y=y;myset.z=z;myset.p=shape;
+ const void* ptr = &myset;
+
+ unsigned int result = HsiehHash<sizeof(btS)/4> (ptr);
+
+
+ return result;
+ }
+};
+
+
+#endif //BT_SPARSE_SDF_H
diff --git a/tests/bullet/src/CMakeLists.txt b/tests/bullet/src/CMakeLists.txt
new file mode 100644
index 00000000..5f5ab012
--- /dev/null
+++ b/tests/bullet/src/CMakeLists.txt
@@ -0,0 +1,13 @@
+SUBDIRS( MiniCL BulletMultiThreaded BulletSoftBody BulletCollision BulletDynamics LinearMath )
+
+IF(INSTALL_LIBS)
+ #INSTALL of other files requires CMake 2.6
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ # Don't actually need to install any common files, the frameworks include everything
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(FILES btBulletCollisionCommon.h
+btBulletDynamicsCommon.h Bullet-C-Api.h DESTINATION ${INCLUDE_INSTALL_DIR})
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ENDIF(INSTALL_LIBS)
diff --git a/tests/bullet/src/LinearMath/CMakeLists.txt b/tests/bullet/src/LinearMath/CMakeLists.txt
new file mode 100644
index 00000000..54ec735c
--- /dev/null
+++ b/tests/bullet/src/LinearMath/CMakeLists.txt
@@ -0,0 +1,65 @@
+
+INCLUDE_DIRECTORIES(
+ ${BULLET_PHYSICS_SOURCE_DIR}/src
+)
+
+SET(LinearMath_SRCS
+ btAlignedAllocator.cpp
+ btConvexHull.cpp
+ btConvexHullComputer.cpp
+ btGeometryUtil.cpp
+ btQuickprof.cpp
+ btSerializer.cpp
+)
+
+SET(LinearMath_HDRS
+ btAabbUtil2.h
+ btAlignedAllocator.h
+ btAlignedObjectArray.h
+ btConvexHull.h
+ btConvexHullComputer.h
+ btDefaultMotionState.h
+ btGeometryUtil.h
+ btHashMap.h
+ btIDebugDraw.h
+ btList.h
+ btMatrix3x3.h
+ btMinMax.h
+ btMotionState.h
+ btPoolAllocator.h
+ btQuadWord.h
+ btQuaternion.h
+ btQuickprof.h
+ btRandom.h
+ btScalar.h
+ btSerializer.h
+ btStackAlloc.h
+ btTransform.h
+ btTransformUtil.h
+ btVector3.h
+)
+
+ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS})
+SET_TARGET_PROPERTIES(LinearMath PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(LinearMath PROPERTIES SOVERSION ${BULLET_VERSION})
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ #FILES_MATCHING requires CMake 2.6
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS LinearMath DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS LinearMath DESTINATION lib${LIB_SUFFIX})
+ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN
+".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true)
+ SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}")
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
diff --git a/tests/bullet/src/LinearMath/btAabbUtil2.h b/tests/bullet/src/LinearMath/btAabbUtil2.h
new file mode 100644
index 00000000..42b721de
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btAabbUtil2.h
@@ -0,0 +1,236 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_AABB_UTIL2
+#define BT_AABB_UTIL2
+
+#include "btTransform.h"
+#include "btVector3.h"
+#include "btMinMax.h"
+
+
+
+SIMD_FORCE_INLINE void AabbExpand (btVector3& aabbMin,
+ btVector3& aabbMax,
+ const btVector3& expansionMin,
+ const btVector3& expansionMax)
+{
+ aabbMin = aabbMin + expansionMin;
+ aabbMax = aabbMax + expansionMax;
+}
+
+/// conservative test for overlap between two aabbs
+SIMD_FORCE_INLINE bool TestPointAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1,
+ const btVector3 &point)
+{
+ bool overlap = true;
+ overlap = (aabbMin1.getX() > point.getX() || aabbMax1.getX() < point.getX()) ? false : overlap;
+ overlap = (aabbMin1.getZ() > point.getZ() || aabbMax1.getZ() < point.getZ()) ? false : overlap;
+ overlap = (aabbMin1.getY() > point.getY() || aabbMax1.getY() < point.getY()) ? false : overlap;
+ return overlap;
+}
+
+
+/// conservative test for overlap between two aabbs
+SIMD_FORCE_INLINE bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1,
+ const btVector3 &aabbMin2, const btVector3 &aabbMax2)
+{
+ bool overlap = true;
+ overlap = (aabbMin1.getX() > aabbMax2.getX() || aabbMax1.getX() < aabbMin2.getX()) ? false : overlap;
+ overlap = (aabbMin1.getZ() > aabbMax2.getZ() || aabbMax1.getZ() < aabbMin2.getZ()) ? false : overlap;
+ overlap = (aabbMin1.getY() > aabbMax2.getY() || aabbMax1.getY() < aabbMin2.getY()) ? false : overlap;
+ return overlap;
+}
+
+/// conservative test for overlap between triangle and aabb
+SIMD_FORCE_INLINE bool TestTriangleAgainstAabb2(const btVector3 *vertices,
+ const btVector3 &aabbMin, const btVector3 &aabbMax)
+{
+ const btVector3 &p1 = vertices[0];
+ const btVector3 &p2 = vertices[1];
+ const btVector3 &p3 = vertices[2];
+
+ if (btMin(btMin(p1[0], p2[0]), p3[0]) > aabbMax[0]) return false;
+ if (btMax(btMax(p1[0], p2[0]), p3[0]) < aabbMin[0]) return false;
+
+ if (btMin(btMin(p1[2], p2[2]), p3[2]) > aabbMax[2]) return false;
+ if (btMax(btMax(p1[2], p2[2]), p3[2]) < aabbMin[2]) return false;
+
+ if (btMin(btMin(p1[1], p2[1]), p3[1]) > aabbMax[1]) return false;
+ if (btMax(btMax(p1[1], p2[1]), p3[1]) < aabbMin[1]) return false;
+ return true;
+}
+
+
+SIMD_FORCE_INLINE int btOutcode(const btVector3& p,const btVector3& halfExtent)
+{
+ return (p.getX() < -halfExtent.getX() ? 0x01 : 0x0) |
+ (p.getX() > halfExtent.getX() ? 0x08 : 0x0) |
+ (p.getY() < -halfExtent.getY() ? 0x02 : 0x0) |
+ (p.getY() > halfExtent.getY() ? 0x10 : 0x0) |
+ (p.getZ() < -halfExtent.getZ() ? 0x4 : 0x0) |
+ (p.getZ() > halfExtent.getZ() ? 0x20 : 0x0);
+}
+
+
+
+SIMD_FORCE_INLINE bool btRayAabb2(const btVector3& rayFrom,
+ const btVector3& rayInvDirection,
+ const unsigned int raySign[3],
+ const btVector3 bounds[2],
+ btScalar& tmin,
+ btScalar lambda_min,
+ btScalar lambda_max)
+{
+ btScalar tmax, tymin, tymax, tzmin, tzmax;
+ tmin = (bounds[raySign[0]].getX() - rayFrom.getX()) * rayInvDirection.getX();
+ tmax = (bounds[1-raySign[0]].getX() - rayFrom.getX()) * rayInvDirection.getX();
+ tymin = (bounds[raySign[1]].getY() - rayFrom.getY()) * rayInvDirection.getY();
+ tymax = (bounds[1-raySign[1]].getY() - rayFrom.getY()) * rayInvDirection.getY();
+
+ if ( (tmin > tymax) || (tymin > tmax) )
+ return false;
+
+ if (tymin > tmin)
+ tmin = tymin;
+
+ if (tymax < tmax)
+ tmax = tymax;
+
+ tzmin = (bounds[raySign[2]].getZ() - rayFrom.getZ()) * rayInvDirection.getZ();
+ tzmax = (bounds[1-raySign[2]].getZ() - rayFrom.getZ()) * rayInvDirection.getZ();
+
+ if ( (tmin > tzmax) || (tzmin > tmax) )
+ return false;
+ if (tzmin > tmin)
+ tmin = tzmin;
+ if (tzmax < tmax)
+ tmax = tzmax;
+ return ( (tmin < lambda_max) && (tmax > lambda_min) );
+}
+
+SIMD_FORCE_INLINE bool btRayAabb(const btVector3& rayFrom,
+ const btVector3& rayTo,
+ const btVector3& aabbMin,
+ const btVector3& aabbMax,
+ btScalar& param, btVector3& normal)
+{
+ btVector3 aabbHalfExtent = (aabbMax-aabbMin)* btScalar(0.5);
+ btVector3 aabbCenter = (aabbMax+aabbMin)* btScalar(0.5);
+ btVector3 source = rayFrom - aabbCenter;
+ btVector3 target = rayTo - aabbCenter;
+ int sourceOutcode = btOutcode(source,aabbHalfExtent);
+ int targetOutcode = btOutcode(target,aabbHalfExtent);
+ if ((sourceOutcode & targetOutcode) == 0x0)
+ {
+ btScalar lambda_enter = btScalar(0.0);
+ btScalar lambda_exit = param;
+ btVector3 r = target - source;
+ int i;
+ btScalar normSign = 1;
+ btVector3 hitNormal(0,0,0);
+ int bit=1;
+
+ for (int j=0;j<2;j++)
+ {
+ for (i = 0; i != 3; ++i)
+ {
+ if (sourceOutcode & bit)
+ {
+ btScalar lambda = (-source[i] - aabbHalfExtent[i]*normSign) / r[i];
+ if (lambda_enter <= lambda)
+ {
+ lambda_enter = lambda;
+ hitNormal.setValue(0,0,0);
+ hitNormal[i] = normSign;
+ }
+ }
+ else if (targetOutcode & bit)
+ {
+ btScalar lambda = (-source[i] - aabbHalfExtent[i]*normSign) / r[i];
+ btSetMin(lambda_exit, lambda);
+ }
+ bit<<=1;
+ }
+ normSign = btScalar(-1.);
+ }
+ if (lambda_enter <= lambda_exit)
+ {
+ param = lambda_enter;
+ normal = hitNormal;
+ return true;
+ }
+ }
+ return false;
+}
+
+
+
+SIMD_FORCE_INLINE void btTransformAabb(const btVector3& halfExtents, btScalar margin,const btTransform& t,btVector3& aabbMinOut,btVector3& aabbMaxOut)
+{
+ btVector3 halfExtentsWithMargin = halfExtents+btVector3(margin,margin,margin);
+ btMatrix3x3 abs_b = t.getBasis().absolute();
+ btVector3 center = t.getOrigin();
+ btVector3 extent = btVector3(abs_b[0].dot(halfExtentsWithMargin),
+ abs_b[1].dot(halfExtentsWithMargin),
+ abs_b[2].dot(halfExtentsWithMargin));
+ aabbMinOut = center - extent;
+ aabbMaxOut = center + extent;
+}
+
+
+SIMD_FORCE_INLINE void btTransformAabb(const btVector3& localAabbMin,const btVector3& localAabbMax, btScalar margin,const btTransform& trans,btVector3& aabbMinOut,btVector3& aabbMaxOut)
+{
+ btAssert(localAabbMin.getX() <= localAabbMax.getX());
+ btAssert(localAabbMin.getY() <= localAabbMax.getY());
+ btAssert(localAabbMin.getZ() <= localAabbMax.getZ());
+ btVector3 localHalfExtents = btScalar(0.5)*(localAabbMax-localAabbMin);
+ localHalfExtents+=btVector3(margin,margin,margin);
+
+ btVector3 localCenter = btScalar(0.5)*(localAabbMax+localAabbMin);
+ btMatrix3x3 abs_b = trans.getBasis().absolute();
+ btVector3 center = trans(localCenter);
+ btVector3 extent = btVector3(abs_b[0].dot(localHalfExtents),
+ abs_b[1].dot(localHalfExtents),
+ abs_b[2].dot(localHalfExtents));
+ aabbMinOut = center-extent;
+ aabbMaxOut = center+extent;
+}
+
+#define USE_BANCHLESS 1
+#ifdef USE_BANCHLESS
+ //This block replaces the block below and uses no branches, and replaces the 8 bit return with a 32 bit return for improved performance (~3x on XBox 360)
+ SIMD_FORCE_INLINE unsigned testQuantizedAabbAgainstQuantizedAabb(const unsigned short int* aabbMin1,const unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2)
+ {
+ return static_cast<unsigned int>(btSelect((unsigned)((aabbMin1[0] <= aabbMax2[0]) & (aabbMax1[0] >= aabbMin2[0])
+ & (aabbMin1[2] <= aabbMax2[2]) & (aabbMax1[2] >= aabbMin2[2])
+ & (aabbMin1[1] <= aabbMax2[1]) & (aabbMax1[1] >= aabbMin2[1])),
+ 1, 0));
+ }
+#else
+ SIMD_FORCE_INLINE bool testQuantizedAabbAgainstQuantizedAabb(const unsigned short int* aabbMin1,const unsigned short int* aabbMax1,const unsigned short int* aabbMin2,const unsigned short int* aabbMax2)
+ {
+ bool overlap = true;
+ overlap = (aabbMin1[0] > aabbMax2[0] || aabbMax1[0] < aabbMin2[0]) ? false : overlap;
+ overlap = (aabbMin1[2] > aabbMax2[2] || aabbMax1[2] < aabbMin2[2]) ? false : overlap;
+ overlap = (aabbMin1[1] > aabbMax2[1] || aabbMax1[1] < aabbMin2[1]) ? false : overlap;
+ return overlap;
+ }
+#endif //USE_BANCHLESS
+
+#endif //BT_AABB_UTIL2
+
+
diff --git a/tests/bullet/src/LinearMath/btAlignedAllocator.cpp b/tests/bullet/src/LinearMath/btAlignedAllocator.cpp
new file mode 100644
index 00000000..189b759d
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btAlignedAllocator.cpp
@@ -0,0 +1,182 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include "btAlignedAllocator.h"
+
+int gNumAlignedAllocs = 0;
+int gNumAlignedFree = 0;
+int gTotalBytesAlignedAllocs = 0;//detect memory leaks
+
+static void *btAllocDefault(size_t size)
+{
+ return malloc(size);
+}
+
+static void btFreeDefault(void *ptr)
+{
+ free(ptr);
+}
+
+static btAllocFunc *sAllocFunc = btAllocDefault;
+static btFreeFunc *sFreeFunc = btFreeDefault;
+
+
+
+#if defined (BT_HAS_ALIGNED_ALLOCATOR)
+#include <malloc.h>
+static void *btAlignedAllocDefault(size_t size, int alignment)
+{
+ return _aligned_malloc(size, (size_t)alignment);
+}
+
+static void btAlignedFreeDefault(void *ptr)
+{
+ _aligned_free(ptr);
+}
+#elif defined(__CELLOS_LV2__)
+#include <stdlib.h>
+
+static inline void *btAlignedAllocDefault(size_t size, int alignment)
+{
+ return memalign(alignment, size);
+}
+
+static inline void btAlignedFreeDefault(void *ptr)
+{
+ free(ptr);
+}
+#else
+static inline void *btAlignedAllocDefault(size_t size, int alignment)
+{
+ void *ret;
+ char *real;
+ unsigned long offset;
+
+ real = (char *)sAllocFunc(size + sizeof(void *) + (alignment-1));
+ if (real) {
+ offset = (alignment - (unsigned long)(real + sizeof(void *))) & (alignment-1);
+ ret = (void *)((real + sizeof(void *)) + offset);
+ *((void **)(ret)-1) = (void *)(real);
+ } else {
+ ret = (void *)(real);
+ }
+ return (ret);
+}
+
+static inline void btAlignedFreeDefault(void *ptr)
+{
+ void* real;
+
+ if (ptr) {
+ real = *((void **)(ptr)-1);
+ sFreeFunc(real);
+ }
+}
+#endif
+
+
+static btAlignedAllocFunc *sAlignedAllocFunc = btAlignedAllocDefault;
+static btAlignedFreeFunc *sAlignedFreeFunc = btAlignedFreeDefault;
+
+void btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc)
+{
+ sAlignedAllocFunc = allocFunc ? allocFunc : btAlignedAllocDefault;
+ sAlignedFreeFunc = freeFunc ? freeFunc : btAlignedFreeDefault;
+}
+
+void btAlignedAllocSetCustom(btAllocFunc *allocFunc, btFreeFunc *freeFunc)
+{
+ sAllocFunc = allocFunc ? allocFunc : btAllocDefault;
+ sFreeFunc = freeFunc ? freeFunc : btFreeDefault;
+}
+
+#ifdef BT_DEBUG_MEMORY_ALLOCATIONS
+//this generic allocator provides the total allocated number of bytes
+#include <stdio.h>
+
+void* btAlignedAllocInternal (size_t size, int alignment,int line,char* filename)
+{
+ void *ret;
+ char *real;
+ unsigned long offset;
+
+ gTotalBytesAlignedAllocs += size;
+ gNumAlignedAllocs++;
+
+
+ real = (char *)sAllocFunc(size + 2*sizeof(void *) + (alignment-1));
+ if (real) {
+ offset = (alignment - (unsigned long)(real + 2*sizeof(void *))) &
+(alignment-1);
+ ret = (void *)((real + 2*sizeof(void *)) + offset);
+ *((void **)(ret)-1) = (void *)(real);
+ *((int*)(ret)-2) = size;
+
+ } else {
+ ret = (void *)(real);//??
+ }
+
+ printf("allocation#%d at address %x, from %s,line %d, size %d\n",gNumAlignedAllocs,real, filename,line,size);
+
+ int* ptr = (int*)ret;
+ *ptr = 12;
+ return (ret);
+}
+
+void btAlignedFreeInternal (void* ptr,int line,char* filename)
+{
+
+ void* real;
+ gNumAlignedFree++;
+
+ if (ptr) {
+ real = *((void **)(ptr)-1);
+ int size = *((int*)(ptr)-2);
+ gTotalBytesAlignedAllocs -= size;
+
+ printf("free #%d at address %x, from %s,line %d, size %d\n",gNumAlignedFree,real, filename,line,size);
+
+ sFreeFunc(real);
+ } else
+ {
+ printf("NULL ptr\n");
+ }
+}
+
+#else //BT_DEBUG_MEMORY_ALLOCATIONS
+
+void* btAlignedAllocInternal (size_t size, int alignment)
+{
+ gNumAlignedAllocs++;
+ void* ptr;
+ ptr = sAlignedAllocFunc(size, alignment);
+// printf("btAlignedAllocInternal %d, %x\n",size,ptr);
+ return ptr;
+}
+
+void btAlignedFreeInternal (void* ptr)
+{
+ if (!ptr)
+ {
+ return;
+ }
+
+ gNumAlignedFree++;
+// printf("btAlignedFreeInternal %x\n",ptr);
+ sAlignedFreeFunc(ptr);
+}
+
+#endif //BT_DEBUG_MEMORY_ALLOCATIONS
+
diff --git a/tests/bullet/src/LinearMath/btAlignedAllocator.h b/tests/bullet/src/LinearMath/btAlignedAllocator.h
new file mode 100644
index 00000000..f168f3c6
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btAlignedAllocator.h
@@ -0,0 +1,107 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_ALIGNED_ALLOCATOR
+#define BT_ALIGNED_ALLOCATOR
+
+///we probably replace this with our own aligned memory allocator
+///so we replace _aligned_malloc and _aligned_free with our own
+///that is better portable and more predictable
+
+#include "btScalar.h"
+//#define BT_DEBUG_MEMORY_ALLOCATIONS 1
+#ifdef BT_DEBUG_MEMORY_ALLOCATIONS
+
+#define btAlignedAlloc(a,b) \
+ btAlignedAllocInternal(a,b,__LINE__,__FILE__)
+
+#define btAlignedFree(ptr) \
+ btAlignedFreeInternal(ptr,__LINE__,__FILE__)
+
+void* btAlignedAllocInternal (size_t size, int alignment,int line,char* filename);
+
+void btAlignedFreeInternal (void* ptr,int line,char* filename);
+
+#else
+ void* btAlignedAllocInternal (size_t size, int alignment);
+ void btAlignedFreeInternal (void* ptr);
+
+ #define btAlignedAlloc(size,alignment) btAlignedAllocInternal(size,alignment)
+ #define btAlignedFree(ptr) btAlignedFreeInternal(ptr)
+
+#endif
+typedef int size_type;
+
+typedef void *(btAlignedAllocFunc)(size_t size, int alignment);
+typedef void (btAlignedFreeFunc)(void *memblock);
+typedef void *(btAllocFunc)(size_t size);
+typedef void (btFreeFunc)(void *memblock);
+
+///The developer can let all Bullet memory allocations go through a custom memory allocator, using btAlignedAllocSetCustom
+void btAlignedAllocSetCustom(btAllocFunc *allocFunc, btFreeFunc *freeFunc);
+///If the developer has already an custom aligned allocator, then btAlignedAllocSetCustomAligned can be used. The default aligned allocator pre-allocates extra memory using the non-aligned allocator, and instruments it.
+void btAlignedAllocSetCustomAligned(btAlignedAllocFunc *allocFunc, btAlignedFreeFunc *freeFunc);
+
+
+///The btAlignedAllocator is a portable class for aligned memory allocations.
+///Default implementations for unaligned and aligned allocations can be overridden by a custom allocator using btAlignedAllocSetCustom and btAlignedAllocSetCustomAligned.
+template < typename T , unsigned Alignment >
+class btAlignedAllocator {
+
+ typedef btAlignedAllocator< T , Alignment > self_type;
+
+public:
+
+ //just going down a list:
+ btAlignedAllocator() {}
+ /*
+ btAlignedAllocator( const self_type & ) {}
+ */
+
+ template < typename Other >
+ btAlignedAllocator( const btAlignedAllocator< Other , Alignment > & ) {}
+
+ typedef const T* const_pointer;
+ typedef const T& const_reference;
+ typedef T* pointer;
+ typedef T& reference;
+ typedef T value_type;
+
+ pointer address ( reference ref ) const { return &ref; }
+ const_pointer address ( const_reference ref ) const { return &ref; }
+ pointer allocate ( size_type n , const_pointer * hint = 0 ) {
+ (void)hint;
+ return reinterpret_cast< pointer >(btAlignedAlloc( sizeof(value_type) * n , Alignment ));
+ }
+ void construct ( pointer ptr , const value_type & value ) { new (ptr) value_type( value ); }
+ void deallocate( pointer ptr ) {
+ btAlignedFree( reinterpret_cast< void * >( ptr ) );
+ }
+ void destroy ( pointer ptr ) { ptr->~value_type(); }
+
+
+ template < typename O > struct rebind {
+ typedef btAlignedAllocator< O , Alignment > other;
+ };
+ template < typename O >
+ self_type & operator=( const btAlignedAllocator< O , Alignment > & ) { return *this; }
+
+ friend bool operator==( const self_type & , const self_type & ) { return true; }
+};
+
+
+
+#endif //BT_ALIGNED_ALLOCATOR
+
diff --git a/tests/bullet/src/LinearMath/btAlignedObjectArray.h b/tests/bullet/src/LinearMath/btAlignedObjectArray.h
new file mode 100644
index 00000000..955bb128
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btAlignedObjectArray.h
@@ -0,0 +1,471 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_OBJECT_ARRAY__
+#define BT_OBJECT_ARRAY__
+
+#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE
+#include "btAlignedAllocator.h"
+
+///If the platform doesn't support placement new, you can disable BT_USE_PLACEMENT_NEW
+///then the btAlignedObjectArray doesn't support objects with virtual methods, and non-trivial constructors/destructors
+///You can enable BT_USE_MEMCPY, then swapping elements in the array will use memcpy instead of operator=
+///see discussion here: http://continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1231 and
+///http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1240
+
+#define BT_USE_PLACEMENT_NEW 1
+//#define BT_USE_MEMCPY 1 //disable, because it is cumbersome to find out for each platform where memcpy is defined. It can be in <memory.h> or <string.h> or otherwise...
+
+#ifdef BT_USE_MEMCPY
+#include <memory.h>
+#include <string.h>
+#endif //BT_USE_MEMCPY
+
+#ifdef BT_USE_PLACEMENT_NEW
+#include <new> //for placement new
+#endif //BT_USE_PLACEMENT_NEW
+
+
+///The btAlignedObjectArray template class uses a subset of the stl::vector interface for its methods
+///It is developed to replace stl::vector to avoid portability issues, including STL alignment issues to add SIMD/SSE data
+template <typename T>
+//template <class T>
+class btAlignedObjectArray
+{
+ btAlignedAllocator<T , 16> m_allocator;
+
+ int m_size;
+ int m_capacity;
+ T* m_data;
+ //PCK: added this line
+ bool m_ownsMemory;
+
+ protected:
+ SIMD_FORCE_INLINE int allocSize(int size)
+ {
+ return (size ? size*2 : 1);
+ }
+ SIMD_FORCE_INLINE void copy(int start,int end, T* dest) const
+ {
+ int i;
+ for (i=start;i<end;++i)
+#ifdef BT_USE_PLACEMENT_NEW
+ new (&dest[i]) T(m_data[i]);
+#else
+ dest[i] = m_data[i];
+#endif //BT_USE_PLACEMENT_NEW
+ }
+
+ SIMD_FORCE_INLINE void init()
+ {
+ //PCK: added this line
+ m_ownsMemory = true;
+ m_data = 0;
+ m_size = 0;
+ m_capacity = 0;
+ }
+ SIMD_FORCE_INLINE void destroy(int first,int last)
+ {
+ int i;
+ for (i=first; i<last;i++)
+ {
+ m_data[i].~T();
+ }
+ }
+
+ SIMD_FORCE_INLINE void* allocate(int size)
+ {
+ if (size)
+ return m_allocator.allocate(size);
+ return 0;
+ }
+
+ SIMD_FORCE_INLINE void deallocate()
+ {
+ if(m_data) {
+ //PCK: enclosed the deallocation in this block
+ if (m_ownsMemory)
+ {
+ m_allocator.deallocate(m_data);
+ }
+ m_data = 0;
+ }
+ }
+
+
+
+
+ public:
+
+ btAlignedObjectArray()
+ {
+ init();
+ }
+
+ ~btAlignedObjectArray()
+ {
+ clear();
+ }
+
+ ///Generally it is best to avoid using the copy constructor of an btAlignedObjectArray, and use a (const) reference to the array instead.
+ btAlignedObjectArray(const btAlignedObjectArray& otherArray)
+ {
+ init();
+
+ int otherSize = otherArray.size();
+ resize (otherSize);
+ otherArray.copy(0, otherSize, m_data);
+ }
+
+
+
+ /// return the number of elements in the array
+ SIMD_FORCE_INLINE int size() const
+ {
+ return m_size;
+ }
+
+ SIMD_FORCE_INLINE const T& at(int n) const
+ {
+ return m_data[n];
+ }
+
+ SIMD_FORCE_INLINE T& at(int n)
+ {
+ return m_data[n];
+ }
+
+ SIMD_FORCE_INLINE const T& operator[](int n) const
+ {
+ return m_data[n];
+ }
+
+ SIMD_FORCE_INLINE T& operator[](int n)
+ {
+ return m_data[n];
+ }
+
+
+ ///clear the array, deallocated memory. Generally it is better to use array.resize(0), to reduce performance overhead of run-time memory (de)allocations.
+ SIMD_FORCE_INLINE void clear()
+ {
+ destroy(0,size());
+
+ deallocate();
+
+ init();
+ }
+
+ SIMD_FORCE_INLINE void pop_back()
+ {
+ m_size--;
+ m_data[m_size].~T();
+ }
+
+ ///resize changes the number of elements in the array. If the new size is larger, the new elements will be constructed using the optional second argument.
+ ///when the new number of elements is smaller, the destructor will be called, but memory will not be freed, to reduce performance overhead of run-time memory (de)allocations.
+ SIMD_FORCE_INLINE void resize(int newsize, const T& fillData=T())
+ {
+ int curSize = size();
+
+ if (newsize < curSize)
+ {
+ for(int i = newsize; i < curSize; i++)
+ {
+ m_data[i].~T();
+ }
+ } else
+ {
+ if (newsize > size())
+ {
+ reserve(newsize);
+ }
+#ifdef BT_USE_PLACEMENT_NEW
+ for (int i=curSize;i<newsize;i++)
+ {
+ new ( &m_data[i]) T(fillData);
+ }
+#endif //BT_USE_PLACEMENT_NEW
+
+ }
+
+ m_size = newsize;
+ }
+
+ SIMD_FORCE_INLINE T& expandNonInitializing( )
+ {
+ int sz = size();
+ if( sz == capacity() )
+ {
+ reserve( allocSize(size()) );
+ }
+ m_size++;
+
+ return m_data[sz];
+ }
+
+
+ SIMD_FORCE_INLINE T& expand( const T& fillValue=T())
+ {
+ int sz = size();
+ if( sz == capacity() )
+ {
+ reserve( allocSize(size()) );
+ }
+ m_size++;
+#ifdef BT_USE_PLACEMENT_NEW
+ new (&m_data[sz]) T(fillValue); //use the in-place new (not really allocating heap memory)
+#endif
+
+ return m_data[sz];
+ }
+
+
+ SIMD_FORCE_INLINE void push_back(const T& _Val)
+ {
+ int sz = size();
+ if( sz == capacity() )
+ {
+ reserve( allocSize(size()) );
+ }
+
+#ifdef BT_USE_PLACEMENT_NEW
+ new ( &m_data[m_size] ) T(_Val);
+#else
+ m_data[size()] = _Val;
+#endif //BT_USE_PLACEMENT_NEW
+
+ m_size++;
+ }
+
+
+ /// return the pre-allocated (reserved) elements, this is at least as large as the total number of elements,see size() and reserve()
+ SIMD_FORCE_INLINE int capacity() const
+ {
+ return m_capacity;
+ }
+
+ SIMD_FORCE_INLINE void reserve(int _Count)
+ { // determine new minimum length of allocated storage
+ if (capacity() < _Count)
+ { // not enough room, reallocate
+ T* s = (T*)allocate(_Count);
+
+ copy(0, size(), s);
+
+ destroy(0,size());
+
+ deallocate();
+
+ //PCK: added this line
+ m_ownsMemory = true;
+
+ m_data = s;
+
+ m_capacity = _Count;
+
+ }
+ }
+
+
+ class less
+ {
+ public:
+
+ bool operator() ( const T& a, const T& b )
+ {
+ return ( a < b );
+ }
+ };
+
+ template <typename L>
+ void quickSortInternal(L CompareFunc,int lo, int hi)
+ {
+ // lo is the lower index, hi is the upper index
+ // of the region of array a that is to be sorted
+ int i=lo, j=hi;
+ T x=m_data[(lo+hi)/2];
+
+ // partition
+ do
+ {
+ while (CompareFunc(m_data[i],x))
+ i++;
+ while (CompareFunc(x,m_data[j]))
+ j--;
+ if (i<=j)
+ {
+ swap(i,j);
+ i++; j--;
+ }
+ } while (i<=j);
+
+ // recursion
+ if (lo<j)
+ quickSortInternal( CompareFunc, lo, j);
+ if (i<hi)
+ quickSortInternal( CompareFunc, i, hi);
+ }
+
+
+ template <typename L>
+ void quickSort(L CompareFunc)
+ {
+ //don't sort 0 or 1 elements
+ if (size()>1)
+ {
+ quickSortInternal(CompareFunc,0,size()-1);
+ }
+ }
+
+
+ ///heap sort from http://www.csse.monash.edu.au/~lloyd/tildeAlgDS/Sort/Heap/
+ template <typename L>
+ void downHeap(T *pArr, int k, int n,L CompareFunc)
+ {
+ /* PRE: a[k+1..N] is a heap */
+ /* POST: a[k..N] is a heap */
+
+ T temp = pArr[k - 1];
+ /* k has child(s) */
+ while (k <= n/2)
+ {
+ int child = 2*k;
+
+ if ((child < n) && CompareFunc(pArr[child - 1] , pArr[child]))
+ {
+ child++;
+ }
+ /* pick larger child */
+ if (CompareFunc(temp , pArr[child - 1]))
+ {
+ /* move child up */
+ pArr[k - 1] = pArr[child - 1];
+ k = child;
+ }
+ else
+ {
+ break;
+ }
+ }
+ pArr[k - 1] = temp;
+ } /*downHeap*/
+
+ void swap(int index0,int index1)
+ {
+#ifdef BT_USE_MEMCPY
+ char temp[sizeof(T)];
+ memcpy(temp,&m_data[index0],sizeof(T));
+ memcpy(&m_data[index0],&m_data[index1],sizeof(T));
+ memcpy(&m_data[index1],temp,sizeof(T));
+#else
+ T temp = m_data[index0];
+ m_data[index0] = m_data[index1];
+ m_data[index1] = temp;
+#endif //BT_USE_PLACEMENT_NEW
+
+ }
+
+ template <typename L>
+ void heapSort(L CompareFunc)
+ {
+ /* sort a[0..N-1], N.B. 0 to N-1 */
+ int k;
+ int n = m_size;
+ for (k = n/2; k > 0; k--)
+ {
+ downHeap(m_data, k, n, CompareFunc);
+ }
+
+ /* a[1..N] is now a heap */
+ while ( n>=1 )
+ {
+ swap(0,n-1); /* largest of a[0..n-1] */
+
+
+ n = n - 1;
+ /* restore a[1..i-1] heap */
+ downHeap(m_data, 1, n, CompareFunc);
+ }
+ }
+
+ ///non-recursive binary search, assumes sorted array
+ int findBinarySearch(const T& key) const
+ {
+ int first = 0;
+ int last = size()-1;
+
+ //assume sorted array
+ while (first <= last) {
+ int mid = (first + last) / 2; // compute mid point.
+ if (key > m_data[mid])
+ first = mid + 1; // repeat search in top half.
+ else if (key < m_data[mid])
+ last = mid - 1; // repeat search in bottom half.
+ else
+ return mid; // found it. return position /////
+ }
+ return size(); // failed to find key
+ }
+
+
+ int findLinearSearch(const T& key) const
+ {
+ int index=size();
+ int i;
+
+ for (i=0;i<size();i++)
+ {
+ if (m_data[i] == key)
+ {
+ index = i;
+ break;
+ }
+ }
+ return index;
+ }
+
+ void remove(const T& key)
+ {
+
+ int findIndex = findLinearSearch(key);
+ if (findIndex<size())
+ {
+ swap( findIndex,size()-1);
+ pop_back();
+ }
+ }
+
+ //PCK: whole function
+ void initializeFromBuffer(void *buffer, int size, int capacity)
+ {
+ clear();
+ m_ownsMemory = false;
+ m_data = (T*)buffer;
+ m_size = size;
+ m_capacity = capacity;
+ }
+
+ void copyFromArray(const btAlignedObjectArray& otherArray)
+ {
+ int otherSize = otherArray.size();
+ resize (otherSize);
+ otherArray.copy(0, otherSize, m_data);
+ }
+
+};
+
+#endif //BT_OBJECT_ARRAY__
diff --git a/tests/bullet/src/LinearMath/btConvexHull.cpp b/tests/bullet/src/LinearMath/btConvexHull.cpp
new file mode 100644
index 00000000..532d76d8
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btConvexHull.cpp
@@ -0,0 +1,1174 @@
+/*
+Stan Melax Convex Hull Computation
+Copyright (c) 2003-2006 Stan Melax http://www.melax.com/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <string.h>
+
+#include "btConvexHull.h"
+#include "btAlignedObjectArray.h"
+#include "btMinMax.h"
+#include "btVector3.h"
+
+
+
+template <class T>
+void Swap(T &a,T &b)
+{
+ T tmp = a;
+ a=b;
+ b=tmp;
+}
+
+
+//----------------------------------
+
+class int3
+{
+public:
+ int x,y,z;
+ int3(){};
+ int3(int _x,int _y, int _z){x=_x;y=_y;z=_z;}
+ const int& operator[](int i) const {return (&x)[i];}
+ int& operator[](int i) {return (&x)[i];}
+};
+
+
+//------- btPlane ----------
+
+
+inline btPlane PlaneFlip(const btPlane &plane){return btPlane(-plane.normal,-plane.dist);}
+inline int operator==( const btPlane &a, const btPlane &b ) { return (a.normal==b.normal && a.dist==b.dist); }
+inline int coplanar( const btPlane &a, const btPlane &b ) { return (a==b || a==PlaneFlip(b)); }
+
+
+//--------- Utility Functions ------
+
+btVector3 PlaneLineIntersection(const btPlane &plane, const btVector3 &p0, const btVector3 &p1);
+btVector3 PlaneProject(const btPlane &plane, const btVector3 &point);
+
+btVector3 ThreePlaneIntersection(const btPlane &p0,const btPlane &p1, const btPlane &p2);
+btVector3 ThreePlaneIntersection(const btPlane &p0,const btPlane &p1, const btPlane &p2)
+{
+ btVector3 N1 = p0.normal;
+ btVector3 N2 = p1.normal;
+ btVector3 N3 = p2.normal;
+
+ btVector3 n2n3; n2n3 = N2.cross(N3);
+ btVector3 n3n1; n3n1 = N3.cross(N1);
+ btVector3 n1n2; n1n2 = N1.cross(N2);
+
+ btScalar quotient = (N1.dot(n2n3));
+
+ btAssert(btFabs(quotient) > btScalar(0.000001));
+
+ quotient = btScalar(-1.) / quotient;
+ n2n3 *= p0.dist;
+ n3n1 *= p1.dist;
+ n1n2 *= p2.dist;
+ btVector3 potentialVertex = n2n3;
+ potentialVertex += n3n1;
+ potentialVertex += n1n2;
+ potentialVertex *= quotient;
+
+ btVector3 result(potentialVertex.getX(),potentialVertex.getY(),potentialVertex.getZ());
+ return result;
+
+}
+
+btScalar DistanceBetweenLines(const btVector3 &ustart, const btVector3 &udir, const btVector3 &vstart, const btVector3 &vdir, btVector3 *upoint=NULL, btVector3 *vpoint=NULL);
+btVector3 TriNormal(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2);
+btVector3 NormalOf(const btVector3 *vert, const int n);
+
+
+btVector3 PlaneLineIntersection(const btPlane &plane, const btVector3 &p0, const btVector3 &p1)
+{
+ // returns the point where the line p0-p1 intersects the plane n&d
+ static btVector3 dif;
+ dif = p1-p0;
+ btScalar dn= btDot(plane.normal,dif);
+ btScalar t = -(plane.dist+btDot(plane.normal,p0) )/dn;
+ return p0 + (dif*t);
+}
+
+btVector3 PlaneProject(const btPlane &plane, const btVector3 &point)
+{
+ return point - plane.normal * (btDot(point,plane.normal)+plane.dist);
+}
+
+btVector3 TriNormal(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2)
+{
+ // return the normal of the triangle
+ // inscribed by v0, v1, and v2
+ btVector3 cp=btCross(v1-v0,v2-v1);
+ btScalar m=cp.length();
+ if(m==0) return btVector3(1,0,0);
+ return cp*(btScalar(1.0)/m);
+}
+
+
+btScalar DistanceBetweenLines(const btVector3 &ustart, const btVector3 &udir, const btVector3 &vstart, const btVector3 &vdir, btVector3 *upoint, btVector3 *vpoint)
+{
+ static btVector3 cp;
+ cp = btCross(udir,vdir).normalized();
+
+ btScalar distu = -btDot(cp,ustart);
+ btScalar distv = -btDot(cp,vstart);
+ btScalar dist = (btScalar)fabs(distu-distv);
+ if(upoint)
+ {
+ btPlane plane;
+ plane.normal = btCross(vdir,cp).normalized();
+ plane.dist = -btDot(plane.normal,vstart);
+ *upoint = PlaneLineIntersection(plane,ustart,ustart+udir);
+ }
+ if(vpoint)
+ {
+ btPlane plane;
+ plane.normal = btCross(udir,cp).normalized();
+ plane.dist = -btDot(plane.normal,ustart);
+ *vpoint = PlaneLineIntersection(plane,vstart,vstart+vdir);
+ }
+ return dist;
+}
+
+
+
+
+
+
+
+#define COPLANAR (0)
+#define UNDER (1)
+#define OVER (2)
+#define SPLIT (OVER|UNDER)
+#define PAPERWIDTH (btScalar(0.001))
+
+btScalar planetestepsilon = PAPERWIDTH;
+
+
+
+typedef ConvexH::HalfEdge HalfEdge;
+
+ConvexH::ConvexH(int vertices_size,int edges_size,int facets_size)
+{
+ vertices.resize(vertices_size);
+ edges.resize(edges_size);
+ facets.resize(facets_size);
+}
+
+
+int PlaneTest(const btPlane &p, const btVector3 &v);
+int PlaneTest(const btPlane &p, const btVector3 &v) {
+ btScalar a = btDot(v,p.normal)+p.dist;
+ int flag = (a>planetestepsilon)?OVER:((a<-planetestepsilon)?UNDER:COPLANAR);
+ return flag;
+}
+
+int SplitTest(ConvexH &convex,const btPlane &plane);
+int SplitTest(ConvexH &convex,const btPlane &plane) {
+ int flag=0;
+ for(int i=0;i<convex.vertices.size();i++) {
+ flag |= PlaneTest(plane,convex.vertices[i]);
+ }
+ return flag;
+}
+
+class VertFlag
+{
+public:
+ unsigned char planetest;
+ unsigned char junk;
+ unsigned char undermap;
+ unsigned char overmap;
+};
+class EdgeFlag
+{
+public:
+ unsigned char planetest;
+ unsigned char fixes;
+ short undermap;
+ short overmap;
+};
+class PlaneFlag
+{
+public:
+ unsigned char undermap;
+ unsigned char overmap;
+};
+class Coplanar{
+public:
+ unsigned short ea;
+ unsigned char v0;
+ unsigned char v1;
+};
+
+
+
+
+
+
+
+
+template<class T>
+int maxdirfiltered(const T *p,int count,const T &dir,btAlignedObjectArray<int> &allow)
+{
+ btAssert(count);
+ int m=-1;
+ for(int i=0;i<count;i++)
+ if(allow[i])
+ {
+ if(m==-1 || btDot(p[i],dir)>btDot(p[m],dir))
+ m=i;
+ }
+ btAssert(m!=-1);
+ return m;
+}
+
+btVector3 orth(const btVector3 &v);
+btVector3 orth(const btVector3 &v)
+{
+ btVector3 a=btCross(v,btVector3(0,0,1));
+ btVector3 b=btCross(v,btVector3(0,1,0));
+ if (a.length() > b.length())
+ {
+ return a.normalized();
+ } else {
+ return b.normalized();
+ }
+}
+
+
+template<class T>
+int maxdirsterid(const T *p,int count,const T &dir,btAlignedObjectArray<int> &allow)
+{
+ int m=-1;
+ while(m==-1)
+ {
+ m = maxdirfiltered(p,count,dir,allow);
+ if(allow[m]==3) return m;
+ T u = orth(dir);
+ T v = btCross(u,dir);
+ int ma=-1;
+ for(btScalar x = btScalar(0.0) ; x<= btScalar(360.0) ; x+= btScalar(45.0))
+ {
+ btScalar s = btSin(SIMD_RADS_PER_DEG*(x));
+ btScalar c = btCos(SIMD_RADS_PER_DEG*(x));
+ int mb = maxdirfiltered(p,count,dir+(u*s+v*c)*btScalar(0.025),allow);
+ if(ma==m && mb==m)
+ {
+ allow[m]=3;
+ return m;
+ }
+ if(ma!=-1 && ma!=mb) // Yuck - this is really ugly
+ {
+ int mc = ma;
+ for(btScalar xx = x-btScalar(40.0) ; xx <= x ; xx+= btScalar(5.0))
+ {
+ btScalar s = btSin(SIMD_RADS_PER_DEG*(xx));
+ btScalar c = btCos(SIMD_RADS_PER_DEG*(xx));
+ int md = maxdirfiltered(p,count,dir+(u*s+v*c)*btScalar(0.025),allow);
+ if(mc==m && md==m)
+ {
+ allow[m]=3;
+ return m;
+ }
+ mc=md;
+ }
+ }
+ ma=mb;
+ }
+ allow[m]=0;
+ m=-1;
+ }
+ btAssert(0);
+ return m;
+}
+
+
+
+
+int operator ==(const int3 &a,const int3 &b);
+int operator ==(const int3 &a,const int3 &b)
+{
+ for(int i=0;i<3;i++)
+ {
+ if(a[i]!=b[i]) return 0;
+ }
+ return 1;
+}
+
+
+int above(btVector3* vertices,const int3& t, const btVector3 &p, btScalar epsilon);
+int above(btVector3* vertices,const int3& t, const btVector3 &p, btScalar epsilon)
+{
+ btVector3 n=TriNormal(vertices[t[0]],vertices[t[1]],vertices[t[2]]);
+ return (btDot(n,p-vertices[t[0]]) > epsilon); // EPSILON???
+}
+int hasedge(const int3 &t, int a,int b);
+int hasedge(const int3 &t, int a,int b)
+{
+ for(int i=0;i<3;i++)
+ {
+ int i1= (i+1)%3;
+ if(t[i]==a && t[i1]==b) return 1;
+ }
+ return 0;
+}
+int hasvert(const int3 &t, int v);
+int hasvert(const int3 &t, int v)
+{
+ return (t[0]==v || t[1]==v || t[2]==v) ;
+}
+int shareedge(const int3 &a,const int3 &b);
+int shareedge(const int3 &a,const int3 &b)
+{
+ int i;
+ for(i=0;i<3;i++)
+ {
+ int i1= (i+1)%3;
+ if(hasedge(a,b[i1],b[i])) return 1;
+ }
+ return 0;
+}
+
+class btHullTriangle;
+
+
+
+class btHullTriangle : public int3
+{
+public:
+ int3 n;
+ int id;
+ int vmax;
+ btScalar rise;
+ btHullTriangle(int a,int b,int c):int3(a,b,c),n(-1,-1,-1)
+ {
+ vmax=-1;
+ rise = btScalar(0.0);
+ }
+ ~btHullTriangle()
+ {
+ }
+ int &neib(int a,int b);
+};
+
+
+int &btHullTriangle::neib(int a,int b)
+{
+ static int er=-1;
+ int i;
+ for(i=0;i<3;i++)
+ {
+ int i1=(i+1)%3;
+ int i2=(i+2)%3;
+ if((*this)[i]==a && (*this)[i1]==b) return n[i2];
+ if((*this)[i]==b && (*this)[i1]==a) return n[i2];
+ }
+ btAssert(0);
+ return er;
+}
+void HullLibrary::b2bfix(btHullTriangle* s,btHullTriangle*t)
+{
+ int i;
+ for(i=0;i<3;i++)
+ {
+ int i1=(i+1)%3;
+ int i2=(i+2)%3;
+ int a = (*s)[i1];
+ int b = (*s)[i2];
+ btAssert(m_tris[s->neib(a,b)]->neib(b,a) == s->id);
+ btAssert(m_tris[t->neib(a,b)]->neib(b,a) == t->id);
+ m_tris[s->neib(a,b)]->neib(b,a) = t->neib(b,a);
+ m_tris[t->neib(b,a)]->neib(a,b) = s->neib(a,b);
+ }
+}
+
+void HullLibrary::removeb2b(btHullTriangle* s,btHullTriangle*t)
+{
+ b2bfix(s,t);
+ deAllocateTriangle(s);
+
+ deAllocateTriangle(t);
+}
+
+void HullLibrary::checkit(btHullTriangle *t)
+{
+ (void)t;
+
+ int i;
+ btAssert(m_tris[t->id]==t);
+ for(i=0;i<3;i++)
+ {
+ int i1=(i+1)%3;
+ int i2=(i+2)%3;
+ int a = (*t)[i1];
+ int b = (*t)[i2];
+
+ // release compile fix
+ (void)i1;
+ (void)i2;
+ (void)a;
+ (void)b;
+
+ btAssert(a!=b);
+ btAssert( m_tris[t->n[i]]->neib(b,a) == t->id);
+ }
+}
+
+btHullTriangle* HullLibrary::allocateTriangle(int a,int b,int c)
+{
+ void* mem = btAlignedAlloc(sizeof(btHullTriangle),16);
+ btHullTriangle* tr = new (mem)btHullTriangle(a,b,c);
+ tr->id = m_tris.size();
+ m_tris.push_back(tr);
+
+ return tr;
+}
+
+void HullLibrary::deAllocateTriangle(btHullTriangle* tri)
+{
+ btAssert(m_tris[tri->id]==tri);
+ m_tris[tri->id]=NULL;
+ tri->~btHullTriangle();
+ btAlignedFree(tri);
+}
+
+
+void HullLibrary::extrude(btHullTriangle *t0,int v)
+{
+ int3 t= *t0;
+ int n = m_tris.size();
+ btHullTriangle* ta = allocateTriangle(v,t[1],t[2]);
+ ta->n = int3(t0->n[0],n+1,n+2);
+ m_tris[t0->n[0]]->neib(t[1],t[2]) = n+0;
+ btHullTriangle* tb = allocateTriangle(v,t[2],t[0]);
+ tb->n = int3(t0->n[1],n+2,n+0);
+ m_tris[t0->n[1]]->neib(t[2],t[0]) = n+1;
+ btHullTriangle* tc = allocateTriangle(v,t[0],t[1]);
+ tc->n = int3(t0->n[2],n+0,n+1);
+ m_tris[t0->n[2]]->neib(t[0],t[1]) = n+2;
+ checkit(ta);
+ checkit(tb);
+ checkit(tc);
+ if(hasvert(*m_tris[ta->n[0]],v)) removeb2b(ta,m_tris[ta->n[0]]);
+ if(hasvert(*m_tris[tb->n[0]],v)) removeb2b(tb,m_tris[tb->n[0]]);
+ if(hasvert(*m_tris[tc->n[0]],v)) removeb2b(tc,m_tris[tc->n[0]]);
+ deAllocateTriangle(t0);
+
+}
+
+btHullTriangle* HullLibrary::extrudable(btScalar epsilon)
+{
+ int i;
+ btHullTriangle *t=NULL;
+ for(i=0;i<m_tris.size();i++)
+ {
+ if(!t || (m_tris[i] && t->rise<m_tris[i]->rise))
+ {
+ t = m_tris[i];
+ }
+ }
+ return (t->rise >epsilon)?t:NULL ;
+}
+
+
+
+
+int4 HullLibrary::FindSimplex(btVector3 *verts,int verts_count,btAlignedObjectArray<int> &allow)
+{
+ btVector3 basis[3];
+ basis[0] = btVector3( btScalar(0.01), btScalar(0.02), btScalar(1.0) );
+ int p0 = maxdirsterid(verts,verts_count, basis[0],allow);
+ int p1 = maxdirsterid(verts,verts_count,-basis[0],allow);
+ basis[0] = verts[p0]-verts[p1];
+ if(p0==p1 || basis[0]==btVector3(0,0,0))
+ return int4(-1,-1,-1,-1);
+ basis[1] = btCross(btVector3( btScalar(1),btScalar(0.02), btScalar(0)),basis[0]);
+ basis[2] = btCross(btVector3(btScalar(-0.02), btScalar(1), btScalar(0)),basis[0]);
+ if (basis[1].length() > basis[2].length())
+ {
+ basis[1].normalize();
+ } else {
+ basis[1] = basis[2];
+ basis[1].normalize ();
+ }
+ int p2 = maxdirsterid(verts,verts_count,basis[1],allow);
+ if(p2 == p0 || p2 == p1)
+ {
+ p2 = maxdirsterid(verts,verts_count,-basis[1],allow);
+ }
+ if(p2 == p0 || p2 == p1)
+ return int4(-1,-1,-1,-1);
+ basis[1] = verts[p2] - verts[p0];
+ basis[2] = btCross(basis[1],basis[0]).normalized();
+ int p3 = maxdirsterid(verts,verts_count,basis[2],allow);
+ if(p3==p0||p3==p1||p3==p2) p3 = maxdirsterid(verts,verts_count,-basis[2],allow);
+ if(p3==p0||p3==p1||p3==p2)
+ return int4(-1,-1,-1,-1);
+ btAssert(!(p0==p1||p0==p2||p0==p3||p1==p2||p1==p3||p2==p3));
+ if(btDot(verts[p3]-verts[p0],btCross(verts[p1]-verts[p0],verts[p2]-verts[p0])) <0) {Swap(p2,p3);}
+ return int4(p0,p1,p2,p3);
+}
+
+int HullLibrary::calchullgen(btVector3 *verts,int verts_count, int vlimit)
+{
+ if(verts_count <4) return 0;
+ if(vlimit==0) vlimit=1000000000;
+ int j;
+ btVector3 bmin(*verts),bmax(*verts);
+ btAlignedObjectArray<int> isextreme;
+ isextreme.reserve(verts_count);
+ btAlignedObjectArray<int> allow;
+ allow.reserve(verts_count);
+
+ for(j=0;j<verts_count;j++)
+ {
+ allow.push_back(1);
+ isextreme.push_back(0);
+ bmin.setMin (verts[j]);
+ bmax.setMax (verts[j]);
+ }
+ btScalar epsilon = (bmax-bmin).length() * btScalar(0.001);
+ btAssert (epsilon != 0.0);
+
+
+ int4 p = FindSimplex(verts,verts_count,allow);
+ if(p.x==-1) return 0; // simplex failed
+
+
+
+ btVector3 center = (verts[p[0]]+verts[p[1]]+verts[p[2]]+verts[p[3]]) / btScalar(4.0); // a valid interior point
+ btHullTriangle *t0 = allocateTriangle(p[2],p[3],p[1]); t0->n=int3(2,3,1);
+ btHullTriangle *t1 = allocateTriangle(p[3],p[2],p[0]); t1->n=int3(3,2,0);
+ btHullTriangle *t2 = allocateTriangle(p[0],p[1],p[3]); t2->n=int3(0,1,3);
+ btHullTriangle *t3 = allocateTriangle(p[1],p[0],p[2]); t3->n=int3(1,0,2);
+ isextreme[p[0]]=isextreme[p[1]]=isextreme[p[2]]=isextreme[p[3]]=1;
+ checkit(t0);checkit(t1);checkit(t2);checkit(t3);
+
+ for(j=0;j<m_tris.size();j++)
+ {
+ btHullTriangle *t=m_tris[j];
+ btAssert(t);
+ btAssert(t->vmax<0);
+ btVector3 n=TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]);
+ t->vmax = maxdirsterid(verts,verts_count,n,allow);
+ t->rise = btDot(n,verts[t->vmax]-verts[(*t)[0]]);
+ }
+ btHullTriangle *te;
+ vlimit-=4;
+ while(vlimit >0 && ((te=extrudable(epsilon)) != 0))
+ {
+ int3 ti=*te;
+ int v=te->vmax;
+ btAssert(v != -1);
+ btAssert(!isextreme[v]); // wtf we've already done this vertex
+ isextreme[v]=1;
+ //if(v==p0 || v==p1 || v==p2 || v==p3) continue; // done these already
+ j=m_tris.size();
+ while(j--) {
+ if(!m_tris[j]) continue;
+ int3 t=*m_tris[j];
+ if(above(verts,t,verts[v],btScalar(0.01)*epsilon))
+ {
+ extrude(m_tris[j],v);
+ }
+ }
+ // now check for those degenerate cases where we have a flipped triangle or a really skinny triangle
+ j=m_tris.size();
+ while(j--)
+ {
+ if(!m_tris[j]) continue;
+ if(!hasvert(*m_tris[j],v)) break;
+ int3 nt=*m_tris[j];
+ if(above(verts,nt,center,btScalar(0.01)*epsilon) || btCross(verts[nt[1]]-verts[nt[0]],verts[nt[2]]-verts[nt[1]]).length()< epsilon*epsilon*btScalar(0.1) )
+ {
+ btHullTriangle *nb = m_tris[m_tris[j]->n[0]];
+ btAssert(nb);btAssert(!hasvert(*nb,v));btAssert(nb->id<j);
+ extrude(nb,v);
+ j=m_tris.size();
+ }
+ }
+ j=m_tris.size();
+ while(j--)
+ {
+ btHullTriangle *t=m_tris[j];
+ if(!t) continue;
+ if(t->vmax>=0) break;
+ btVector3 n=TriNormal(verts[(*t)[0]],verts[(*t)[1]],verts[(*t)[2]]);
+ t->vmax = maxdirsterid(verts,verts_count,n,allow);
+ if(isextreme[t->vmax])
+ {
+ t->vmax=-1; // already done that vertex - algorithm needs to be able to terminate.
+ }
+ else
+ {
+ t->rise = btDot(n,verts[t->vmax]-verts[(*t)[0]]);
+ }
+ }
+ vlimit --;
+ }
+ return 1;
+}
+
+int HullLibrary::calchull(btVector3 *verts,int verts_count, TUIntArray& tris_out, int &tris_count,int vlimit)
+{
+ int rc=calchullgen(verts,verts_count, vlimit) ;
+ if(!rc) return 0;
+ btAlignedObjectArray<int> ts;
+ int i;
+
+ for(i=0;i<m_tris.size();i++)
+ {
+ if(m_tris[i])
+ {
+ for(int j=0;j<3;j++)
+ ts.push_back((*m_tris[i])[j]);
+ deAllocateTriangle(m_tris[i]);
+ }
+ }
+ tris_count = ts.size()/3;
+ tris_out.resize(ts.size());
+
+ for (i=0;i<ts.size();i++)
+ {
+ tris_out[i] = static_cast<unsigned int>(ts[i]);
+ }
+ m_tris.resize(0);
+
+ return 1;
+}
+
+
+
+
+
+bool HullLibrary::ComputeHull(unsigned int vcount,const btVector3 *vertices,PHullResult &result,unsigned int vlimit)
+{
+
+ int tris_count;
+ int ret = calchull( (btVector3 *) vertices, (int) vcount, result.m_Indices, tris_count, static_cast<int>(vlimit) );
+ if(!ret) return false;
+ result.mIndexCount = (unsigned int) (tris_count*3);
+ result.mFaceCount = (unsigned int) tris_count;
+ result.mVertices = (btVector3*) vertices;
+ result.mVcount = (unsigned int) vcount;
+ return true;
+
+}
+
+
+void ReleaseHull(PHullResult &result);
+void ReleaseHull(PHullResult &result)
+{
+ if ( result.m_Indices.size() )
+ {
+ result.m_Indices.clear();
+ }
+
+ result.mVcount = 0;
+ result.mIndexCount = 0;
+ result.mVertices = 0;
+}
+
+
+//*********************************************************************
+//*********************************************************************
+//******** HullLib header
+//*********************************************************************
+//*********************************************************************
+
+//*********************************************************************
+//*********************************************************************
+//******** HullLib implementation
+//*********************************************************************
+//*********************************************************************
+
+HullError HullLibrary::CreateConvexHull(const HullDesc &desc, // describes the input request
+ HullResult &result) // contains the resulst
+{
+ HullError ret = QE_FAIL;
+
+
+ PHullResult hr;
+
+ unsigned int vcount = desc.mVcount;
+ if ( vcount < 8 ) vcount = 8;
+
+ btAlignedObjectArray<btVector3> vertexSource;
+ vertexSource.resize(static_cast<int>(vcount));
+
+ btVector3 scale;
+
+ unsigned int ovcount;
+
+ bool ok = CleanupVertices(desc.mVcount,desc.mVertices, desc.mVertexStride, ovcount, &vertexSource[0], desc.mNormalEpsilon, scale ); // normalize point cloud, remove duplicates!
+
+ if ( ok )
+ {
+
+
+// if ( 1 ) // scale vertices back to their original size.
+ {
+ for (unsigned int i=0; i<ovcount; i++)
+ {
+ btVector3& v = vertexSource[static_cast<int>(i)];
+ v[0]*=scale[0];
+ v[1]*=scale[1];
+ v[2]*=scale[2];
+ }
+ }
+
+ ok = ComputeHull(ovcount,&vertexSource[0],hr,desc.mMaxVertices);
+
+ if ( ok )
+ {
+
+ // re-index triangle mesh so it refers to only used vertices, rebuild a new vertex table.
+ btAlignedObjectArray<btVector3> vertexScratch;
+ vertexScratch.resize(static_cast<int>(hr.mVcount));
+
+ BringOutYourDead(hr.mVertices,hr.mVcount, &vertexScratch[0], ovcount, &hr.m_Indices[0], hr.mIndexCount );
+
+ ret = QE_OK;
+
+ if ( desc.HasHullFlag(QF_TRIANGLES) ) // if he wants the results as triangle!
+ {
+ result.mPolygons = false;
+ result.mNumOutputVertices = ovcount;
+ result.m_OutputVertices.resize(static_cast<int>(ovcount));
+ result.mNumFaces = hr.mFaceCount;
+ result.mNumIndices = hr.mIndexCount;
+
+ result.m_Indices.resize(static_cast<int>(hr.mIndexCount));
+
+ memcpy(&result.m_OutputVertices[0], &vertexScratch[0], sizeof(btVector3)*ovcount );
+
+ if ( desc.HasHullFlag(QF_REVERSE_ORDER) )
+ {
+
+ const unsigned int *source = &hr.m_Indices[0];
+ unsigned int *dest = &result.m_Indices[0];
+
+ for (unsigned int i=0; i<hr.mFaceCount; i++)
+ {
+ dest[0] = source[2];
+ dest[1] = source[1];
+ dest[2] = source[0];
+ dest+=3;
+ source+=3;
+ }
+
+ }
+ else
+ {
+ memcpy(&result.m_Indices[0], &hr.m_Indices[0], sizeof(unsigned int)*hr.mIndexCount);
+ }
+ }
+ else
+ {
+ result.mPolygons = true;
+ result.mNumOutputVertices = ovcount;
+ result.m_OutputVertices.resize(static_cast<int>(ovcount));
+ result.mNumFaces = hr.mFaceCount;
+ result.mNumIndices = hr.mIndexCount+hr.mFaceCount;
+ result.m_Indices.resize(static_cast<int>(result.mNumIndices));
+ memcpy(&result.m_OutputVertices[0], &vertexScratch[0], sizeof(btVector3)*ovcount );
+
+// if ( 1 )
+ {
+ const unsigned int *source = &hr.m_Indices[0];
+ unsigned int *dest = &result.m_Indices[0];
+ for (unsigned int i=0; i<hr.mFaceCount; i++)
+ {
+ dest[0] = 3;
+ if ( desc.HasHullFlag(QF_REVERSE_ORDER) )
+ {
+ dest[1] = source[2];
+ dest[2] = source[1];
+ dest[3] = source[0];
+ }
+ else
+ {
+ dest[1] = source[0];
+ dest[2] = source[1];
+ dest[3] = source[2];
+ }
+
+ dest+=4;
+ source+=3;
+ }
+ }
+ }
+ ReleaseHull(hr);
+ }
+ }
+
+ return ret;
+}
+
+
+
+HullError HullLibrary::ReleaseResult(HullResult &result) // release memory allocated for this result, we are done with it.
+{
+ if ( result.m_OutputVertices.size())
+ {
+ result.mNumOutputVertices=0;
+ result.m_OutputVertices.clear();
+ }
+ if ( result.m_Indices.size() )
+ {
+ result.mNumIndices=0;
+ result.m_Indices.clear();
+ }
+ return QE_OK;
+}
+
+
+static void addPoint(unsigned int &vcount,btVector3 *p,btScalar x,btScalar y,btScalar z)
+{
+ // XXX, might be broken
+ btVector3& dest = p[vcount];
+ dest[0] = x;
+ dest[1] = y;
+ dest[2] = z;
+ vcount++;
+}
+
+btScalar GetDist(btScalar px,btScalar py,btScalar pz,const btScalar *p2);
+btScalar GetDist(btScalar px,btScalar py,btScalar pz,const btScalar *p2)
+{
+
+ btScalar dx = px - p2[0];
+ btScalar dy = py - p2[1];
+ btScalar dz = pz - p2[2];
+
+ return dx*dx+dy*dy+dz*dz;
+}
+
+
+
+bool HullLibrary::CleanupVertices(unsigned int svcount,
+ const btVector3 *svertices,
+ unsigned int stride,
+ unsigned int &vcount, // output number of vertices
+ btVector3 *vertices, // location to store the results.
+ btScalar normalepsilon,
+ btVector3& scale)
+{
+ if ( svcount == 0 ) return false;
+
+ m_vertexIndexMapping.resize(0);
+
+
+#define EPSILON btScalar(0.000001) /* close enough to consider two btScalaring point numbers to be 'the same'. */
+
+ vcount = 0;
+
+ btScalar recip[3]={0.f,0.f,0.f};
+
+ if ( scale )
+ {
+ scale[0] = 1;
+ scale[1] = 1;
+ scale[2] = 1;
+ }
+
+ btScalar bmin[3] = { FLT_MAX, FLT_MAX, FLT_MAX };
+ btScalar bmax[3] = { -FLT_MAX, -FLT_MAX, -FLT_MAX };
+
+ const char *vtx = (const char *) svertices;
+
+// if ( 1 )
+ {
+ for (unsigned int i=0; i<svcount; i++)
+ {
+ const btScalar *p = (const btScalar *) vtx;
+
+ vtx+=stride;
+
+ for (int j=0; j<3; j++)
+ {
+ if ( p[j] < bmin[j] ) bmin[j] = p[j];
+ if ( p[j] > bmax[j] ) bmax[j] = p[j];
+ }
+ }
+ }
+
+ btScalar dx = bmax[0] - bmin[0];
+ btScalar dy = bmax[1] - bmin[1];
+ btScalar dz = bmax[2] - bmin[2];
+
+ btVector3 center;
+
+ center[0] = dx*btScalar(0.5) + bmin[0];
+ center[1] = dy*btScalar(0.5) + bmin[1];
+ center[2] = dz*btScalar(0.5) + bmin[2];
+
+ if ( dx < EPSILON || dy < EPSILON || dz < EPSILON || svcount < 3 )
+ {
+
+ btScalar len = FLT_MAX;
+
+ if ( dx > EPSILON && dx < len ) len = dx;
+ if ( dy > EPSILON && dy < len ) len = dy;
+ if ( dz > EPSILON && dz < len ) len = dz;
+
+ if ( len == FLT_MAX )
+ {
+ dx = dy = dz = btScalar(0.01); // one centimeter
+ }
+ else
+ {
+ if ( dx < EPSILON ) dx = len * btScalar(0.05); // 1/5th the shortest non-zero edge.
+ if ( dy < EPSILON ) dy = len * btScalar(0.05);
+ if ( dz < EPSILON ) dz = len * btScalar(0.05);
+ }
+
+ btScalar x1 = center[0] - dx;
+ btScalar x2 = center[0] + dx;
+
+ btScalar y1 = center[1] - dy;
+ btScalar y2 = center[1] + dy;
+
+ btScalar z1 = center[2] - dz;
+ btScalar z2 = center[2] + dz;
+
+ addPoint(vcount,vertices,x1,y1,z1);
+ addPoint(vcount,vertices,x2,y1,z1);
+ addPoint(vcount,vertices,x2,y2,z1);
+ addPoint(vcount,vertices,x1,y2,z1);
+ addPoint(vcount,vertices,x1,y1,z2);
+ addPoint(vcount,vertices,x2,y1,z2);
+ addPoint(vcount,vertices,x2,y2,z2);
+ addPoint(vcount,vertices,x1,y2,z2);
+
+ return true; // return cube
+
+
+ }
+ else
+ {
+ if ( scale )
+ {
+ scale[0] = dx;
+ scale[1] = dy;
+ scale[2] = dz;
+
+ recip[0] = 1 / dx;
+ recip[1] = 1 / dy;
+ recip[2] = 1 / dz;
+
+ center[0]*=recip[0];
+ center[1]*=recip[1];
+ center[2]*=recip[2];
+
+ }
+
+ }
+
+
+
+ vtx = (const char *) svertices;
+
+ for (unsigned int i=0; i<svcount; i++)
+ {
+ const btVector3 *p = (const btVector3 *)vtx;
+ vtx+=stride;
+
+ btScalar px = p->getX();
+ btScalar py = p->getY();
+ btScalar pz = p->getZ();
+
+ if ( scale )
+ {
+ px = px*recip[0]; // normalize
+ py = py*recip[1]; // normalize
+ pz = pz*recip[2]; // normalize
+ }
+
+// if ( 1 )
+ {
+ unsigned int j;
+
+ for (j=0; j<vcount; j++)
+ {
+ /// XXX might be broken
+ btVector3& v = vertices[j];
+
+ btScalar x = v[0];
+ btScalar y = v[1];
+ btScalar z = v[2];
+
+ btScalar dx = btFabs(x - px );
+ btScalar dy = btFabs(y - py );
+ btScalar dz = btFabs(z - pz );
+
+ if ( dx < normalepsilon && dy < normalepsilon && dz < normalepsilon )
+ {
+ // ok, it is close enough to the old one
+ // now let us see if it is further from the center of the point cloud than the one we already recorded.
+ // in which case we keep this one instead.
+
+ btScalar dist1 = GetDist(px,py,pz,center);
+ btScalar dist2 = GetDist(v[0],v[1],v[2],center);
+
+ if ( dist1 > dist2 )
+ {
+ v[0] = px;
+ v[1] = py;
+ v[2] = pz;
+
+ }
+
+ break;
+ }
+ }
+
+ if ( j == vcount )
+ {
+ btVector3& dest = vertices[vcount];
+ dest[0] = px;
+ dest[1] = py;
+ dest[2] = pz;
+ vcount++;
+ }
+ m_vertexIndexMapping.push_back(j);
+ }
+ }
+
+ // ok..now make sure we didn't prune so many vertices it is now invalid.
+// if ( 1 )
+ {
+ btScalar bmin[3] = { FLT_MAX, FLT_MAX, FLT_MAX };
+ btScalar bmax[3] = { -FLT_MAX, -FLT_MAX, -FLT_MAX };
+
+ for (unsigned int i=0; i<vcount; i++)
+ {
+ const btVector3& p = vertices[i];
+ for (int j=0; j<3; j++)
+ {
+ if ( p[j] < bmin[j] ) bmin[j] = p[j];
+ if ( p[j] > bmax[j] ) bmax[j] = p[j];
+ }
+ }
+
+ btScalar dx = bmax[0] - bmin[0];
+ btScalar dy = bmax[1] - bmin[1];
+ btScalar dz = bmax[2] - bmin[2];
+
+ if ( dx < EPSILON || dy < EPSILON || dz < EPSILON || vcount < 3)
+ {
+ btScalar cx = dx*btScalar(0.5) + bmin[0];
+ btScalar cy = dy*btScalar(0.5) + bmin[1];
+ btScalar cz = dz*btScalar(0.5) + bmin[2];
+
+ btScalar len = FLT_MAX;
+
+ if ( dx >= EPSILON && dx < len ) len = dx;
+ if ( dy >= EPSILON && dy < len ) len = dy;
+ if ( dz >= EPSILON && dz < len ) len = dz;
+
+ if ( len == FLT_MAX )
+ {
+ dx = dy = dz = btScalar(0.01); // one centimeter
+ }
+ else
+ {
+ if ( dx < EPSILON ) dx = len * btScalar(0.05); // 1/5th the shortest non-zero edge.
+ if ( dy < EPSILON ) dy = len * btScalar(0.05);
+ if ( dz < EPSILON ) dz = len * btScalar(0.05);
+ }
+
+ btScalar x1 = cx - dx;
+ btScalar x2 = cx + dx;
+
+ btScalar y1 = cy - dy;
+ btScalar y2 = cy + dy;
+
+ btScalar z1 = cz - dz;
+ btScalar z2 = cz + dz;
+
+ vcount = 0; // add box
+
+ addPoint(vcount,vertices,x1,y1,z1);
+ addPoint(vcount,vertices,x2,y1,z1);
+ addPoint(vcount,vertices,x2,y2,z1);
+ addPoint(vcount,vertices,x1,y2,z1);
+ addPoint(vcount,vertices,x1,y1,z2);
+ addPoint(vcount,vertices,x2,y1,z2);
+ addPoint(vcount,vertices,x2,y2,z2);
+ addPoint(vcount,vertices,x1,y2,z2);
+
+ return true;
+ }
+ }
+
+ return true;
+}
+
+void HullLibrary::BringOutYourDead(const btVector3* verts,unsigned int vcount, btVector3* overts,unsigned int &ocount,unsigned int *indices,unsigned indexcount)
+{
+ btAlignedObjectArray<int>tmpIndices;
+ tmpIndices.resize(m_vertexIndexMapping.size());
+ int i;
+
+ for (i=0;i<m_vertexIndexMapping.size();i++)
+ {
+ tmpIndices[i] = m_vertexIndexMapping[i];
+ }
+
+ TUIntArray usedIndices;
+ usedIndices.resize(static_cast<int>(vcount));
+ memset(&usedIndices[0],0,sizeof(unsigned int)*vcount);
+
+ ocount = 0;
+
+ for (i=0; i<int (indexcount); i++)
+ {
+ unsigned int v = indices[i]; // original array index
+
+ btAssert( v >= 0 && v < vcount );
+
+ if ( usedIndices[static_cast<int>(v)] ) // if already remapped
+ {
+ indices[i] = usedIndices[static_cast<int>(v)]-1; // index to new array
+ }
+ else
+ {
+
+ indices[i] = ocount; // new index mapping
+
+ overts[ocount][0] = verts[v][0]; // copy old vert to new vert array
+ overts[ocount][1] = verts[v][1];
+ overts[ocount][2] = verts[v][2];
+
+ for (int k=0;k<m_vertexIndexMapping.size();k++)
+ {
+ if (tmpIndices[k]==int(v))
+ m_vertexIndexMapping[k]=ocount;
+ }
+
+ ocount++; // increment output vert count
+
+ btAssert( ocount >=0 && ocount <= vcount );
+
+ usedIndices[static_cast<int>(v)] = ocount; // assign new index remapping
+
+
+ }
+ }
+
+
+}
diff --git a/tests/bullet/src/LinearMath/btConvexHull.h b/tests/bullet/src/LinearMath/btConvexHull.h
new file mode 100644
index 00000000..69c52bc6
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btConvexHull.h
@@ -0,0 +1,241 @@
+
+/*
+Stan Melax Convex Hull Computation
+Copyright (c) 2008 Stan Melax http://www.melax.com/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+///includes modifications/improvements by John Ratcliff, see BringOutYourDead below.
+
+#ifndef BT_CD_HULL_H
+#define BT_CD_HULL_H
+
+#include "btVector3.h"
+#include "btAlignedObjectArray.h"
+
+typedef btAlignedObjectArray<unsigned int> TUIntArray;
+
+class HullResult
+{
+public:
+ HullResult(void)
+ {
+ mPolygons = true;
+ mNumOutputVertices = 0;
+ mNumFaces = 0;
+ mNumIndices = 0;
+ }
+ bool mPolygons; // true if indices represents polygons, false indices are triangles
+ unsigned int mNumOutputVertices; // number of vertices in the output hull
+ btAlignedObjectArray<btVector3> m_OutputVertices; // array of vertices
+ unsigned int mNumFaces; // the number of faces produced
+ unsigned int mNumIndices; // the total number of indices
+ btAlignedObjectArray<unsigned int> m_Indices; // pointer to indices.
+
+// If triangles, then indices are array indexes into the vertex list.
+// If polygons, indices are in the form (number of points in face) (p1, p2, p3, ..) etc..
+};
+
+enum HullFlag
+{
+ QF_TRIANGLES = (1<<0), // report results as triangles, not polygons.
+ QF_REVERSE_ORDER = (1<<1), // reverse order of the triangle indices.
+ QF_DEFAULT = QF_TRIANGLES
+};
+
+
+class HullDesc
+{
+public:
+ HullDesc(void)
+ {
+ mFlags = QF_DEFAULT;
+ mVcount = 0;
+ mVertices = 0;
+ mVertexStride = sizeof(btVector3);
+ mNormalEpsilon = 0.001f;
+ mMaxVertices = 4096; // maximum number of points to be considered for a convex hull.
+ mMaxFaces = 4096;
+ };
+
+ HullDesc(HullFlag flag,
+ unsigned int vcount,
+ const btVector3 *vertices,
+ unsigned int stride = sizeof(btVector3))
+ {
+ mFlags = flag;
+ mVcount = vcount;
+ mVertices = vertices;
+ mVertexStride = stride;
+ mNormalEpsilon = btScalar(0.001);
+ mMaxVertices = 4096;
+ }
+
+ bool HasHullFlag(HullFlag flag) const
+ {
+ if ( mFlags & flag ) return true;
+ return false;
+ }
+
+ void SetHullFlag(HullFlag flag)
+ {
+ mFlags|=flag;
+ }
+
+ void ClearHullFlag(HullFlag flag)
+ {
+ mFlags&=~flag;
+ }
+
+ unsigned int mFlags; // flags to use when generating the convex hull.
+ unsigned int mVcount; // number of vertices in the input point cloud
+ const btVector3 *mVertices; // the array of vertices.
+ unsigned int mVertexStride; // the stride of each vertex, in bytes.
+ btScalar mNormalEpsilon; // the epsilon for removing duplicates. This is a normalized value, if normalized bit is on.
+ unsigned int mMaxVertices; // maximum number of vertices to be considered for the hull!
+ unsigned int mMaxFaces;
+};
+
+enum HullError
+{
+ QE_OK, // success!
+ QE_FAIL // failed.
+};
+
+class btPlane
+{
+ public:
+ btVector3 normal;
+ btScalar dist; // distance below origin - the D from plane equasion Ax+By+Cz+D=0
+ btPlane(const btVector3 &n,btScalar d):normal(n),dist(d){}
+ btPlane():normal(),dist(0){}
+
+};
+
+
+
+class ConvexH
+{
+ public:
+ class HalfEdge
+ {
+ public:
+ short ea; // the other half of the edge (index into edges list)
+ unsigned char v; // the vertex at the start of this edge (index into vertices list)
+ unsigned char p; // the facet on which this edge lies (index into facets list)
+ HalfEdge(){}
+ HalfEdge(short _ea,unsigned char _v, unsigned char _p):ea(_ea),v(_v),p(_p){}
+ };
+ ConvexH()
+ {
+ }
+ ~ConvexH()
+ {
+ }
+ btAlignedObjectArray<btVector3> vertices;
+ btAlignedObjectArray<HalfEdge> edges;
+ btAlignedObjectArray<btPlane> facets;
+ ConvexH(int vertices_size,int edges_size,int facets_size);
+};
+
+
+class int4
+{
+public:
+ int x,y,z,w;
+ int4(){};
+ int4(int _x,int _y, int _z,int _w){x=_x;y=_y;z=_z;w=_w;}
+ const int& operator[](int i) const {return (&x)[i];}
+ int& operator[](int i) {return (&x)[i];}
+};
+
+class PHullResult
+{
+public:
+
+ PHullResult(void)
+ {
+ mVcount = 0;
+ mIndexCount = 0;
+ mFaceCount = 0;
+ mVertices = 0;
+ }
+
+ unsigned int mVcount;
+ unsigned int mIndexCount;
+ unsigned int mFaceCount;
+ btVector3* mVertices;
+ TUIntArray m_Indices;
+};
+
+
+
+///The HullLibrary class can create a convex hull from a collection of vertices, using the ComputeHull method.
+///The btShapeHull class uses this HullLibrary to create a approximate convex mesh given a general (non-polyhedral) convex shape.
+class HullLibrary
+{
+
+ btAlignedObjectArray<class btHullTriangle*> m_tris;
+
+public:
+
+ btAlignedObjectArray<int> m_vertexIndexMapping;
+
+
+ HullError CreateConvexHull(const HullDesc& desc, // describes the input request
+ HullResult& result); // contains the resulst
+ HullError ReleaseResult(HullResult &result); // release memory allocated for this result, we are done with it.
+
+private:
+
+ bool ComputeHull(unsigned int vcount,const btVector3 *vertices,PHullResult &result,unsigned int vlimit);
+
+ class btHullTriangle* allocateTriangle(int a,int b,int c);
+ void deAllocateTriangle(btHullTriangle*);
+ void b2bfix(btHullTriangle* s,btHullTriangle*t);
+
+ void removeb2b(btHullTriangle* s,btHullTriangle*t);
+
+ void checkit(btHullTriangle *t);
+
+ btHullTriangle* extrudable(btScalar epsilon);
+
+ int calchull(btVector3 *verts,int verts_count, TUIntArray& tris_out, int &tris_count,int vlimit);
+
+ int calchullgen(btVector3 *verts,int verts_count, int vlimit);
+
+ int4 FindSimplex(btVector3 *verts,int verts_count,btAlignedObjectArray<int> &allow);
+
+ class ConvexH* ConvexHCrop(ConvexH& convex,const btPlane& slice);
+
+ void extrude(class btHullTriangle* t0,int v);
+
+ ConvexH* test_cube();
+
+ //BringOutYourDead (John Ratcliff): When you create a convex hull you hand it a large input set of vertices forming a 'point cloud'.
+ //After the hull is generated it give you back a set of polygon faces which index the *original* point cloud.
+ //The thing is, often times, there are many 'dead vertices' in the point cloud that are on longer referenced by the hull.
+ //The routine 'BringOutYourDead' find only the referenced vertices, copies them to an new buffer, and re-indexes the hull so that it is a minimal representation.
+ void BringOutYourDead(const btVector3* verts,unsigned int vcount, btVector3* overts,unsigned int &ocount,unsigned int* indices,unsigned indexcount);
+
+ bool CleanupVertices(unsigned int svcount,
+ const btVector3* svertices,
+ unsigned int stride,
+ unsigned int &vcount, // output number of vertices
+ btVector3* vertices, // location to store the results.
+ btScalar normalepsilon,
+ btVector3& scale);
+};
+
+
+#endif //BT_CD_HULL_H
+
diff --git a/tests/bullet/src/LinearMath/btConvexHullComputer.cpp b/tests/bullet/src/LinearMath/btConvexHullComputer.cpp
new file mode 100644
index 00000000..10316b40
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btConvexHullComputer.cpp
@@ -0,0 +1,2749 @@
+/*
+Copyright (c) 2011 Ole Kniemeyer, MAXON, www.maxon.net
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <string.h>
+
+#include "btConvexHullComputer.h"
+#include "btAlignedObjectArray.h"
+#include "btMinMax.h"
+#include "btVector3.h"
+
+#ifdef __GNUC__
+ #include <stdint.h>
+#elif defined(_MSC_VER)
+ typedef __int32 int32_t;
+ typedef __int64 int64_t;
+ typedef unsigned __int32 uint32_t;
+ typedef unsigned __int64 uint64_t;
+#else
+ typedef int int32_t;
+ typedef long long int int64_t;
+ typedef unsigned int uint32_t;
+ typedef unsigned long long int uint64_t;
+#endif
+
+
+//The definition of USE_X86_64_ASM is moved into the build system. You can enable it manually by commenting out the following lines
+//#if (defined(__GNUC__) && defined(__x86_64__) && !defined(__ICL)) // || (defined(__ICL) && defined(_M_X64)) bug in Intel compiler, disable inline assembly
+// #define USE_X86_64_ASM
+//#endif
+
+
+//#define DEBUG_CONVEX_HULL
+//#define SHOW_ITERATIONS
+
+#if defined(DEBUG_CONVEX_HULL) || defined(SHOW_ITERATIONS)
+ #include <stdio.h>
+#endif
+
+// Convex hull implementation based on Preparata and Hong
+// Ole Kniemeyer, MAXON Computer GmbH
+class btConvexHullInternal
+{
+ public:
+
+ class Point64
+ {
+ public:
+ int64_t x;
+ int64_t y;
+ int64_t z;
+
+ Point64(int64_t x, int64_t y, int64_t z): x(x), y(y), z(z)
+ {
+ }
+
+ bool isZero()
+ {
+ return (x == 0) && (y == 0) && (z == 0);
+ }
+
+ int64_t dot(const Point64& b) const
+ {
+ return x * b.x + y * b.y + z * b.z;
+ }
+ };
+
+ class Point32
+ {
+ public:
+ int32_t x;
+ int32_t y;
+ int32_t z;
+ int index;
+
+ Point32()
+ {
+ }
+
+ Point32(int32_t x, int32_t y, int32_t z): x(x), y(y), z(z), index(-1)
+ {
+ }
+
+ bool operator==(const Point32& b) const
+ {
+ return (x == b.x) && (y == b.y) && (z == b.z);
+ }
+
+ bool operator!=(const Point32& b) const
+ {
+ return (x != b.x) || (y != b.y) || (z != b.z);
+ }
+
+ bool isZero()
+ {
+ return (x == 0) && (y == 0) && (z == 0);
+ }
+
+ Point64 cross(const Point32& b) const
+ {
+ return Point64(y * b.z - z * b.y, z * b.x - x * b.z, x * b.y - y * b.x);
+ }
+
+ Point64 cross(const Point64& b) const
+ {
+ return Point64(y * b.z - z * b.y, z * b.x - x * b.z, x * b.y - y * b.x);
+ }
+
+ int64_t dot(const Point32& b) const
+ {
+ return x * b.x + y * b.y + z * b.z;
+ }
+
+ int64_t dot(const Point64& b) const
+ {
+ return x * b.x + y * b.y + z * b.z;
+ }
+
+ Point32 operator+(const Point32& b) const
+ {
+ return Point32(x + b.x, y + b.y, z + b.z);
+ }
+
+ Point32 operator-(const Point32& b) const
+ {
+ return Point32(x - b.x, y - b.y, z - b.z);
+ }
+ };
+
+ class Int128
+ {
+ public:
+ uint64_t low;
+ uint64_t high;
+
+ Int128()
+ {
+ }
+
+ Int128(uint64_t low, uint64_t high): low(low), high(high)
+ {
+ }
+
+ Int128(uint64_t low): low(low), high(0)
+ {
+ }
+
+ Int128(int64_t value): low(value), high((value >= 0) ? 0 : (uint64_t) -1LL)
+ {
+ }
+
+ static Int128 mul(int64_t a, int64_t b);
+
+ static Int128 mul(uint64_t a, uint64_t b);
+
+ Int128 operator-() const
+ {
+ return Int128((uint64_t) -(int64_t)low, ~high + (low == 0));
+ }
+
+ Int128 operator+(const Int128& b) const
+ {
+#ifdef USE_X86_64_ASM
+ Int128 result;
+ __asm__ ("addq %[bl], %[rl]\n\t"
+ "adcq %[bh], %[rh]\n\t"
+ : [rl] "=r" (result.low), [rh] "=r" (result.high)
+ : "0"(low), "1"(high), [bl] "g"(b.low), [bh] "g"(b.high)
+ : "cc" );
+ return result;
+#else
+ uint64_t lo = low + b.low;
+ return Int128(lo, high + b.high + (lo < low));
+#endif
+ }
+
+ Int128 operator-(const Int128& b) const
+ {
+#ifdef USE_X86_64_ASM
+ Int128 result;
+ __asm__ ("subq %[bl], %[rl]\n\t"
+ "sbbq %[bh], %[rh]\n\t"
+ : [rl] "=r" (result.low), [rh] "=r" (result.high)
+ : "0"(low), "1"(high), [bl] "g"(b.low), [bh] "g"(b.high)
+ : "cc" );
+ return result;
+#else
+ return *this + -b;
+#endif
+ }
+
+ Int128& operator+=(const Int128& b)
+ {
+#ifdef USE_X86_64_ASM
+ __asm__ ("addq %[bl], %[rl]\n\t"
+ "adcq %[bh], %[rh]\n\t"
+ : [rl] "=r" (low), [rh] "=r" (high)
+ : "0"(low), "1"(high), [bl] "g"(b.low), [bh] "g"(b.high)
+ : "cc" );
+#else
+ uint64_t lo = low + b.low;
+ if (lo < low)
+ {
+ ++high;
+ }
+ low = lo;
+ high += b.high;
+#endif
+ return *this;
+ }
+
+ Int128& operator++()
+ {
+ if (++low == 0)
+ {
+ ++high;
+ }
+ return *this;
+ }
+
+ Int128 operator*(int64_t b) const;
+
+ btScalar toScalar() const
+ {
+ return ((int64_t) high >= 0) ? btScalar(high) * (btScalar(0x100000000LL) * btScalar(0x100000000LL)) + btScalar(low)
+ : -(-*this).toScalar();
+ }
+
+ int getSign() const
+ {
+ return ((int64_t) high < 0) ? -1 : (high || low) ? 1 : 0;
+ }
+
+ bool operator<(const Int128& b) const
+ {
+ return (high < b.high) || ((high == b.high) && (low < b.low));
+ }
+
+ int ucmp(const Int128&b) const
+ {
+ if (high < b.high)
+ {
+ return -1;
+ }
+ if (high > b.high)
+ {
+ return 1;
+ }
+ if (low < b.low)
+ {
+ return -1;
+ }
+ if (low > b.low)
+ {
+ return 1;
+ }
+ return 0;
+ }
+ };
+
+
+ class Rational64
+ {
+ private:
+ uint64_t numerator;
+ uint64_t denominator;
+ int sign;
+
+ public:
+ Rational64(int64_t numerator, int64_t denominator)
+ {
+ if (numerator > 0)
+ {
+ sign = 1;
+ this->numerator = (uint64_t) numerator;
+ }
+ else if (numerator < 0)
+ {
+ sign = -1;
+ this->numerator = (uint64_t) -numerator;
+ }
+ else
+ {
+ sign = 0;
+ this->numerator = 0;
+ }
+ if (denominator > 0)
+ {
+ this->denominator = (uint64_t) denominator;
+ }
+ else if (denominator < 0)
+ {
+ sign = -sign;
+ this->denominator = (uint64_t) -denominator;
+ }
+ else
+ {
+ this->denominator = 0;
+ }
+ }
+
+ bool isNegativeInfinity() const
+ {
+ return (sign < 0) && (denominator == 0);
+ }
+
+ bool isNaN() const
+ {
+ return (sign == 0) && (denominator == 0);
+ }
+
+ int compare(const Rational64& b) const;
+
+ btScalar toScalar() const
+ {
+ return sign * ((denominator == 0) ? SIMD_INFINITY : (btScalar) numerator / denominator);
+ }
+ };
+
+
+ class Rational128
+ {
+ private:
+ Int128 numerator;
+ Int128 denominator;
+ int sign;
+ bool isInt64;
+
+ public:
+ Rational128(int64_t value)
+ {
+ if (value > 0)
+ {
+ sign = 1;
+ this->numerator = value;
+ }
+ else if (value < 0)
+ {
+ sign = -1;
+ this->numerator = -value;
+ }
+ else
+ {
+ sign = 0;
+ this->numerator = (uint64_t) 0;
+ }
+ this->denominator = (uint64_t) 1;
+ isInt64 = true;
+ }
+
+ Rational128(const Int128& numerator, const Int128& denominator)
+ {
+ sign = numerator.getSign();
+ if (sign >= 0)
+ {
+ this->numerator = numerator;
+ }
+ else
+ {
+ this->numerator = -numerator;
+ }
+ int dsign = denominator.getSign();
+ if (dsign >= 0)
+ {
+ this->denominator = denominator;
+ }
+ else
+ {
+ sign = -sign;
+ this->denominator = -denominator;
+ }
+ isInt64 = false;
+ }
+
+ int compare(const Rational128& b) const;
+
+ int compare(int64_t b) const;
+
+ btScalar toScalar() const
+ {
+ return sign * ((denominator.getSign() == 0) ? SIMD_INFINITY : numerator.toScalar() / denominator.toScalar());
+ }
+ };
+
+ class PointR128
+ {
+ public:
+ Int128 x;
+ Int128 y;
+ Int128 z;
+ Int128 denominator;
+
+ PointR128()
+ {
+ }
+
+ PointR128(Int128 x, Int128 y, Int128 z, Int128 denominator): x(x), y(y), z(z), denominator(denominator)
+ {
+ }
+
+ btScalar xvalue() const
+ {
+ return x.toScalar() / denominator.toScalar();
+ }
+
+ btScalar yvalue() const
+ {
+ return y.toScalar() / denominator.toScalar();
+ }
+
+ btScalar zvalue() const
+ {
+ return z.toScalar() / denominator.toScalar();
+ }
+ };
+
+
+ class Edge;
+ class Face;
+
+ class Vertex
+ {
+ public:
+ Vertex* next;
+ Vertex* prev;
+ Edge* edges;
+ Face* firstNearbyFace;
+ Face* lastNearbyFace;
+ PointR128 point128;
+ Point32 point;
+ int copy;
+
+ Vertex(): next(NULL), prev(NULL), edges(NULL), firstNearbyFace(NULL), lastNearbyFace(NULL), copy(-1)
+ {
+ }
+
+#ifdef DEBUG_CONVEX_HULL
+ void print()
+ {
+ printf("V%d (%d, %d, %d)", point.index, point.x, point.y, point.z);
+ }
+
+ void printGraph();
+#endif
+
+ Point32 operator-(const Vertex& b) const
+ {
+ return point - b.point;
+ }
+
+ Rational128 dot(const Point64& b) const
+ {
+ return (point.index >= 0) ? Rational128(point.dot(b))
+ : Rational128(point128.x * b.x + point128.y * b.y + point128.z * b.z, point128.denominator);
+ }
+
+ btScalar xvalue() const
+ {
+ return (point.index >= 0) ? btScalar(point.x) : point128.xvalue();
+ }
+
+ btScalar yvalue() const
+ {
+ return (point.index >= 0) ? btScalar(point.y) : point128.yvalue();
+ }
+
+ btScalar zvalue() const
+ {
+ return (point.index >= 0) ? btScalar(point.z) : point128.zvalue();
+ }
+
+ void receiveNearbyFaces(Vertex* src)
+ {
+ if (lastNearbyFace)
+ {
+ lastNearbyFace->nextWithSameNearbyVertex = src->firstNearbyFace;
+ }
+ else
+ {
+ firstNearbyFace = src->firstNearbyFace;
+ }
+ if (src->lastNearbyFace)
+ {
+ lastNearbyFace = src->lastNearbyFace;
+ }
+ for (Face* f = src->firstNearbyFace; f; f = f->nextWithSameNearbyVertex)
+ {
+ btAssert(f->nearbyVertex == src);
+ f->nearbyVertex = this;
+ }
+ src->firstNearbyFace = NULL;
+ src->lastNearbyFace = NULL;
+ }
+ };
+
+
+ class Edge
+ {
+ public:
+ Edge* next;
+ Edge* prev;
+ Edge* reverse;
+ Vertex* target;
+ Face* face;
+ int copy;
+
+ ~Edge()
+ {
+ next = NULL;
+ prev = NULL;
+ reverse = NULL;
+ target = NULL;
+ face = NULL;
+ }
+
+ void link(Edge* n)
+ {
+ btAssert(reverse->target == n->reverse->target);
+ next = n;
+ n->prev = this;
+ }
+
+#ifdef DEBUG_CONVEX_HULL
+ void print()
+ {
+ printf("E%p : %d -> %d, n=%p p=%p (0 %d\t%d\t%d) -> (%d %d %d)", this, reverse->target->point.index, target->point.index, next, prev,
+ reverse->target->point.x, reverse->target->point.y, reverse->target->point.z, target->point.x, target->point.y, target->point.z);
+ }
+#endif
+ };
+
+ class Face
+ {
+ public:
+ Face* next;
+ Vertex* nearbyVertex;
+ Face* nextWithSameNearbyVertex;
+ Point32 origin;
+ Point32 dir0;
+ Point32 dir1;
+
+ Face(): next(NULL), nearbyVertex(NULL), nextWithSameNearbyVertex(NULL)
+ {
+ }
+
+ void init(Vertex* a, Vertex* b, Vertex* c)
+ {
+ nearbyVertex = a;
+ origin = a->point;
+ dir0 = *b - *a;
+ dir1 = *c - *a;
+ if (a->lastNearbyFace)
+ {
+ a->lastNearbyFace->nextWithSameNearbyVertex = this;
+ }
+ else
+ {
+ a->firstNearbyFace = this;
+ }
+ a->lastNearbyFace = this;
+ }
+
+ Point64 getNormal()
+ {
+ return dir0.cross(dir1);
+ }
+ };
+
+ template<typename UWord, typename UHWord> class DMul
+ {
+ private:
+ static uint32_t high(uint64_t value)
+ {
+ return (uint32_t) (value >> 32);
+ }
+
+ static uint32_t low(uint64_t value)
+ {
+ return (uint32_t) value;
+ }
+
+ static uint64_t mul(uint32_t a, uint32_t b)
+ {
+ return (uint64_t) a * (uint64_t) b;
+ }
+
+ static void shlHalf(uint64_t& value)
+ {
+ value <<= 32;
+ }
+
+ static uint64_t high(Int128 value)
+ {
+ return value.high;
+ }
+
+ static uint64_t low(Int128 value)
+ {
+ return value.low;
+ }
+
+ static Int128 mul(uint64_t a, uint64_t b)
+ {
+ return Int128::mul(a, b);
+ }
+
+ static void shlHalf(Int128& value)
+ {
+ value.high = value.low;
+ value.low = 0;
+ }
+
+ public:
+
+ static void mul(UWord a, UWord b, UWord& resLow, UWord& resHigh)
+ {
+ UWord p00 = mul(low(a), low(b));
+ UWord p01 = mul(low(a), high(b));
+ UWord p10 = mul(high(a), low(b));
+ UWord p11 = mul(high(a), high(b));
+ UWord p0110 = UWord(low(p01)) + UWord(low(p10));
+ p11 += high(p01);
+ p11 += high(p10);
+ p11 += high(p0110);
+ shlHalf(p0110);
+ p00 += p0110;
+ if (p00 < p0110)
+ {
+ ++p11;
+ }
+ resLow = p00;
+ resHigh = p11;
+ }
+ };
+
+ private:
+
+ class IntermediateHull
+ {
+ public:
+ Vertex* minXy;
+ Vertex* maxXy;
+ Vertex* minYx;
+ Vertex* maxYx;
+
+ IntermediateHull(): minXy(NULL), maxXy(NULL), minYx(NULL), maxYx(NULL)
+ {
+ }
+
+ void print();
+ };
+
+ enum Orientation {NONE, CLOCKWISE, COUNTER_CLOCKWISE};
+
+ template <typename T> class PoolArray
+ {
+ private:
+ T* array;
+ int size;
+
+ public:
+ PoolArray<T>* next;
+
+ PoolArray(int size): size(size), next(NULL)
+ {
+ array = (T*) btAlignedAlloc(sizeof(T) * size, 16);
+ }
+
+ ~PoolArray()
+ {
+ btAlignedFree(array);
+ }
+
+ T* init()
+ {
+ T* o = array;
+ for (int i = 0; i < size; i++, o++)
+ {
+ o->next = (i+1 < size) ? o + 1 : NULL;
+ }
+ return array;
+ }
+ };
+
+ template <typename T> class Pool
+ {
+ private:
+ PoolArray<T>* arrays;
+ PoolArray<T>* nextArray;
+ T* freeObjects;
+ int arraySize;
+
+ public:
+ Pool(): arrays(NULL), nextArray(NULL), freeObjects(NULL), arraySize(256)
+ {
+ }
+
+ ~Pool()
+ {
+ while (arrays)
+ {
+ PoolArray<T>* p = arrays;
+ arrays = p->next;
+ p->~PoolArray<T>();
+ btAlignedFree(p);
+ }
+ }
+
+ void reset()
+ {
+ nextArray = arrays;
+ freeObjects = NULL;
+ }
+
+ void setArraySize(int arraySize)
+ {
+ this->arraySize = arraySize;
+ }
+
+ T* newObject()
+ {
+ T* o = freeObjects;
+ if (!o)
+ {
+ PoolArray<T>* p = nextArray;
+ if (p)
+ {
+ nextArray = p->next;
+ }
+ else
+ {
+ p = new(btAlignedAlloc(sizeof(PoolArray<T>), 16)) PoolArray<T>(arraySize);
+ p->next = arrays;
+ arrays = p;
+ }
+ o = p->init();
+ }
+ freeObjects = o->next;
+ return new(o) T();
+ };
+
+ void freeObject(T* object)
+ {
+ object->~T();
+ object->next = freeObjects;
+ freeObjects = object;
+ }
+ };
+
+ btVector3 scaling;
+ btVector3 center;
+ Pool<Vertex> vertexPool;
+ Pool<Edge> edgePool;
+ Pool<Face> facePool;
+ btAlignedObjectArray<Vertex*> originalVertices;
+ int mergeStamp;
+ int minAxis;
+ int medAxis;
+ int maxAxis;
+ int usedEdgePairs;
+ int maxUsedEdgePairs;
+
+ static Orientation getOrientation(const Edge* prev, const Edge* next, const Point32& s, const Point32& t);
+ Edge* findMaxAngle(bool ccw, const Vertex* start, const Point32& s, const Point64& rxs, const Point64& sxrxs, Rational64& minCot);
+ void findEdgeForCoplanarFaces(Vertex* c0, Vertex* c1, Edge*& e0, Edge*& e1, Vertex* stop0, Vertex* stop1);
+
+ Edge* newEdgePair(Vertex* from, Vertex* to);
+
+ void removeEdgePair(Edge* edge)
+ {
+ Edge* n = edge->next;
+ Edge* r = edge->reverse;
+
+ btAssert(edge->target && r->target);
+
+ if (n != edge)
+ {
+ n->prev = edge->prev;
+ edge->prev->next = n;
+ r->target->edges = n;
+ }
+ else
+ {
+ r->target->edges = NULL;
+ }
+
+ n = r->next;
+
+ if (n != r)
+ {
+ n->prev = r->prev;
+ r->prev->next = n;
+ edge->target->edges = n;
+ }
+ else
+ {
+ edge->target->edges = NULL;
+ }
+
+ edgePool.freeObject(edge);
+ edgePool.freeObject(r);
+ usedEdgePairs--;
+ }
+
+ void computeInternal(int start, int end, IntermediateHull& result);
+
+ bool mergeProjection(IntermediateHull& h0, IntermediateHull& h1, Vertex*& c0, Vertex*& c1);
+
+ void merge(IntermediateHull& h0, IntermediateHull& h1);
+
+ btVector3 toBtVector(const Point32& v);
+
+ btVector3 getBtNormal(Face* face);
+
+ bool shiftFace(Face* face, btScalar amount, btAlignedObjectArray<Vertex*> stack);
+
+ public:
+ Vertex* vertexList;
+
+ void compute(const void* coords, bool doubleCoords, int stride, int count);
+
+ btVector3 getCoordinates(const Vertex* v);
+
+ btScalar shrink(btScalar amount, btScalar clampAmount);
+};
+
+
+btConvexHullInternal::Int128 btConvexHullInternal::Int128::operator*(int64_t b) const
+{
+ bool negative = (int64_t) high < 0;
+ Int128 a = negative ? -*this : *this;
+ if (b < 0)
+ {
+ negative = !negative;
+ b = -b;
+ }
+ Int128 result = mul(a.low, (uint64_t) b);
+ result.high += a.high * (uint64_t) b;
+ return negative ? -result : result;
+}
+
+btConvexHullInternal::Int128 btConvexHullInternal::Int128::mul(int64_t a, int64_t b)
+{
+ Int128 result;
+
+#ifdef USE_X86_64_ASM
+ __asm__ ("imulq %[b]"
+ : "=a" (result.low), "=d" (result.high)
+ : "0"(a), [b] "r"(b)
+ : "cc" );
+ return result;
+
+#else
+ bool negative = a < 0;
+ if (negative)
+ {
+ a = -a;
+ }
+ if (b < 0)
+ {
+ negative = !negative;
+ b = -b;
+ }
+ DMul<uint64_t, uint32_t>::mul((uint64_t) a, (uint64_t) b, result.low, result.high);
+ return negative ? -result : result;
+#endif
+}
+
+btConvexHullInternal::Int128 btConvexHullInternal::Int128::mul(uint64_t a, uint64_t b)
+{
+ Int128 result;
+
+#ifdef USE_X86_64_ASM
+ __asm__ ("mulq %[b]"
+ : "=a" (result.low), "=d" (result.high)
+ : "0"(a), [b] "r"(b)
+ : "cc" );
+
+#else
+ DMul<uint64_t, uint32_t>::mul(a, b, result.low, result.high);
+#endif
+
+ return result;
+}
+
+int btConvexHullInternal::Rational64::compare(const Rational64& b) const
+{
+ if (sign != b.sign)
+ {
+ return sign - b.sign;
+ }
+ else if (sign == 0)
+ {
+ return 0;
+ }
+
+ // return (numerator * b.denominator > b.numerator * denominator) ? sign : (numerator * b.denominator < b.numerator * denominator) ? -sign : 0;
+
+#ifdef USE_X86_64_ASM
+
+ int result;
+ int64_t tmp;
+ int64_t dummy;
+ __asm__ ("mulq %[bn]\n\t"
+ "movq %%rax, %[tmp]\n\t"
+ "movq %%rdx, %%rbx\n\t"
+ "movq %[tn], %%rax\n\t"
+ "mulq %[bd]\n\t"
+ "subq %[tmp], %%rax\n\t"
+ "sbbq %%rbx, %%rdx\n\t" // rdx:rax contains 128-bit-difference "numerator*b.denominator - b.numerator*denominator"
+ "setnsb %%bh\n\t" // bh=1 if difference is non-negative, bh=0 otherwise
+ "orq %%rdx, %%rax\n\t"
+ "setnzb %%bl\n\t" // bl=1 if difference if non-zero, bl=0 if it is zero
+ "decb %%bh\n\t" // now bx=0x0000 if difference is zero, 0xff01 if it is negative, 0x0001 if it is positive (i.e., same sign as difference)
+ "shll $16, %%ebx\n\t" // ebx has same sign as difference
+ : "=&b"(result), [tmp] "=&r"(tmp), "=a"(dummy)
+ : "a"(denominator), [bn] "g"(b.numerator), [tn] "g"(numerator), [bd] "g"(b.denominator)
+ : "%rdx", "cc" );
+ return result ? result ^ sign // if sign is +1, only bit 0 of result is inverted, which does not change the sign of result (and cannot result in zero)
+ // if sign is -1, all bits of result are inverted, which changes the sign of result (and again cannot result in zero)
+ : 0;
+
+#else
+
+ return sign * Int128::mul(numerator, b.denominator).ucmp(Int128::mul(denominator, b.numerator));
+
+#endif
+}
+
+int btConvexHullInternal::Rational128::compare(const Rational128& b) const
+{
+ if (sign != b.sign)
+ {
+ return sign - b.sign;
+ }
+ else if (sign == 0)
+ {
+ return 0;
+ }
+ if (isInt64)
+ {
+ return -b.compare(sign * (int64_t) numerator.low);
+ }
+
+ Int128 nbdLow, nbdHigh, dbnLow, dbnHigh;
+ DMul<Int128, uint64_t>::mul(numerator, b.denominator, nbdLow, nbdHigh);
+ DMul<Int128, uint64_t>::mul(denominator, b.numerator, dbnLow, dbnHigh);
+
+ int cmp = nbdHigh.ucmp(dbnHigh);
+ if (cmp)
+ {
+ return cmp * sign;
+ }
+ return nbdLow.ucmp(dbnLow) * sign;
+}
+
+int btConvexHullInternal::Rational128::compare(int64_t b) const
+{
+ if (isInt64)
+ {
+ int64_t a = sign * (int64_t) numerator.low;
+ return (a > b) ? 1 : (a < b) ? -1 : 0;
+ }
+ if (b > 0)
+ {
+ if (sign <= 0)
+ {
+ return -1;
+ }
+ }
+ else if (b < 0)
+ {
+ if (sign >= 0)
+ {
+ return 1;
+ }
+ b = -b;
+ }
+ else
+ {
+ return sign;
+ }
+
+ return numerator.ucmp(denominator * b) * sign;
+}
+
+
+btConvexHullInternal::Edge* btConvexHullInternal::newEdgePair(Vertex* from, Vertex* to)
+{
+ btAssert(from && to);
+ Edge* e = edgePool.newObject();
+ Edge* r = edgePool.newObject();
+ e->reverse = r;
+ r->reverse = e;
+ e->copy = mergeStamp;
+ r->copy = mergeStamp;
+ e->target = to;
+ r->target = from;
+ e->face = NULL;
+ r->face = NULL;
+ usedEdgePairs++;
+ if (usedEdgePairs > maxUsedEdgePairs)
+ {
+ maxUsedEdgePairs = usedEdgePairs;
+ }
+ return e;
+}
+
+bool btConvexHullInternal::mergeProjection(IntermediateHull& h0, IntermediateHull& h1, Vertex*& c0, Vertex*& c1)
+{
+ Vertex* v0 = h0.maxYx;
+ Vertex* v1 = h1.minYx;
+ if ((v0->point.x == v1->point.x) && (v0->point.y == v1->point.y))
+ {
+ btAssert(v0->point.z < v1->point.z);
+ Vertex* v1p = v1->prev;
+ if (v1p == v1)
+ {
+ c0 = v0;
+ if (v1->edges)
+ {
+ btAssert(v1->edges->next == v1->edges);
+ v1 = v1->edges->target;
+ btAssert(v1->edges->next == v1->edges);
+ }
+ c1 = v1;
+ return false;
+ }
+ Vertex* v1n = v1->next;
+ v1p->next = v1n;
+ v1n->prev = v1p;
+ if (v1 == h1.minXy)
+ {
+ if ((v1n->point.x < v1p->point.x) || ((v1n->point.x == v1p->point.x) && (v1n->point.y < v1p->point.y)))
+ {
+ h1.minXy = v1n;
+ }
+ else
+ {
+ h1.minXy = v1p;
+ }
+ }
+ if (v1 == h1.maxXy)
+ {
+ if ((v1n->point.x > v1p->point.x) || ((v1n->point.x == v1p->point.x) && (v1n->point.y > v1p->point.y)))
+ {
+ h1.maxXy = v1n;
+ }
+ else
+ {
+ h1.maxXy = v1p;
+ }
+ }
+ }
+
+ v0 = h0.maxXy;
+ v1 = h1.maxXy;
+ Vertex* v00 = NULL;
+ Vertex* v10 = NULL;
+ int32_t sign = 1;
+
+ for (int side = 0; side <= 1; side++)
+ {
+ int32_t dx = (v1->point.x - v0->point.x) * sign;
+ if (dx > 0)
+ {
+ while (true)
+ {
+ int32_t dy = v1->point.y - v0->point.y;
+
+ Vertex* w0 = side ? v0->next : v0->prev;
+ if (w0 != v0)
+ {
+ int32_t dx0 = (w0->point.x - v0->point.x) * sign;
+ int32_t dy0 = w0->point.y - v0->point.y;
+ if ((dy0 <= 0) && ((dx0 == 0) || ((dx0 < 0) && (dy0 * dx <= dy * dx0))))
+ {
+ v0 = w0;
+ dx = (v1->point.x - v0->point.x) * sign;
+ continue;
+ }
+ }
+
+ Vertex* w1 = side ? v1->next : v1->prev;
+ if (w1 != v1)
+ {
+ int32_t dx1 = (w1->point.x - v1->point.x) * sign;
+ int32_t dy1 = w1->point.y - v1->point.y;
+ int32_t dxn = (w1->point.x - v0->point.x) * sign;
+ if ((dxn > 0) && (dy1 < 0) && ((dx1 == 0) || ((dx1 < 0) && (dy1 * dx < dy * dx1))))
+ {
+ v1 = w1;
+ dx = dxn;
+ continue;
+ }
+ }
+
+ break;
+ }
+ }
+ else if (dx < 0)
+ {
+ while (true)
+ {
+ int32_t dy = v1->point.y - v0->point.y;
+
+ Vertex* w1 = side ? v1->prev : v1->next;
+ if (w1 != v1)
+ {
+ int32_t dx1 = (w1->point.x - v1->point.x) * sign;
+ int32_t dy1 = w1->point.y - v1->point.y;
+ if ((dy1 >= 0) && ((dx1 == 0) || ((dx1 < 0) && (dy1 * dx <= dy * dx1))))
+ {
+ v1 = w1;
+ dx = (v1->point.x - v0->point.x) * sign;
+ continue;
+ }
+ }
+
+ Vertex* w0 = side ? v0->prev : v0->next;
+ if (w0 != v0)
+ {
+ int32_t dx0 = (w0->point.x - v0->point.x) * sign;
+ int32_t dy0 = w0->point.y - v0->point.y;
+ int32_t dxn = (v1->point.x - w0->point.x) * sign;
+ if ((dxn < 0) && (dy0 > 0) && ((dx0 == 0) || ((dx0 < 0) && (dy0 * dx < dy * dx0))))
+ {
+ v0 = w0;
+ dx = dxn;
+ continue;
+ }
+ }
+
+ break;
+ }
+ }
+ else
+ {
+ int32_t x = v0->point.x;
+ int32_t y0 = v0->point.y;
+ Vertex* w0 = v0;
+ Vertex* t;
+ while (((t = side ? w0->next : w0->prev) != v0) && (t->point.x == x) && (t->point.y <= y0))
+ {
+ w0 = t;
+ y0 = t->point.y;
+ }
+ v0 = w0;
+
+ int32_t y1 = v1->point.y;
+ Vertex* w1 = v1;
+ while (((t = side ? w1->prev : w1->next) != v1) && (t->point.x == x) && (t->point.y >= y1))
+ {
+ w1 = t;
+ y1 = t->point.y;
+ }
+ v1 = w1;
+ }
+
+ if (side == 0)
+ {
+ v00 = v0;
+ v10 = v1;
+
+ v0 = h0.minXy;
+ v1 = h1.minXy;
+ sign = -1;
+ }
+ }
+
+ v0->prev = v1;
+ v1->next = v0;
+
+ v00->next = v10;
+ v10->prev = v00;
+
+ if (h1.minXy->point.x < h0.minXy->point.x)
+ {
+ h0.minXy = h1.minXy;
+ }
+ if (h1.maxXy->point.x >= h0.maxXy->point.x)
+ {
+ h0.maxXy = h1.maxXy;
+ }
+
+ h0.maxYx = h1.maxYx;
+
+ c0 = v00;
+ c1 = v10;
+
+ return true;
+}
+
+void btConvexHullInternal::computeInternal(int start, int end, IntermediateHull& result)
+{
+ int n = end - start;
+ switch (n)
+ {
+ case 0:
+ result.minXy = NULL;
+ result.maxXy = NULL;
+ result.minYx = NULL;
+ result.maxYx = NULL;
+ return;
+ case 2:
+ {
+ Vertex* v = originalVertices[start];
+ Vertex* w = v + 1;
+ if (v->point != w->point)
+ {
+ int32_t dx = v->point.x - w->point.x;
+ int32_t dy = v->point.y - w->point.y;
+
+ if ((dx == 0) && (dy == 0))
+ {
+ if (v->point.z > w->point.z)
+ {
+ Vertex* t = w;
+ w = v;
+ v = t;
+ }
+ btAssert(v->point.z < w->point.z);
+ v->next = v;
+ v->prev = v;
+ result.minXy = v;
+ result.maxXy = v;
+ result.minYx = v;
+ result.maxYx = v;
+ }
+ else
+ {
+ v->next = w;
+ v->prev = w;
+ w->next = v;
+ w->prev = v;
+
+ if ((dx < 0) || ((dx == 0) && (dy < 0)))
+ {
+ result.minXy = v;
+ result.maxXy = w;
+ }
+ else
+ {
+ result.minXy = w;
+ result.maxXy = v;
+ }
+
+ if ((dy < 0) || ((dy == 0) && (dx < 0)))
+ {
+ result.minYx = v;
+ result.maxYx = w;
+ }
+ else
+ {
+ result.minYx = w;
+ result.maxYx = v;
+ }
+ }
+
+ Edge* e = newEdgePair(v, w);
+ e->link(e);
+ v->edges = e;
+
+ e = e->reverse;
+ e->link(e);
+ w->edges = e;
+
+ return;
+ }
+ }
+ // lint -fallthrough
+ case 1:
+ {
+ Vertex* v = originalVertices[start];
+ v->edges = NULL;
+ v->next = v;
+ v->prev = v;
+
+ result.minXy = v;
+ result.maxXy = v;
+ result.minYx = v;
+ result.maxYx = v;
+
+ return;
+ }
+ }
+
+ int split0 = start + n / 2;
+ Point32 p = originalVertices[split0-1]->point;
+ int split1 = split0;
+ while ((split1 < end) && (originalVertices[split1]->point == p))
+ {
+ split1++;
+ }
+ computeInternal(start, split0, result);
+ IntermediateHull hull1;
+ computeInternal(split1, end, hull1);
+#ifdef DEBUG_CONVEX_HULL
+ printf("\n\nMerge\n");
+ result.print();
+ hull1.print();
+#endif
+ merge(result, hull1);
+#ifdef DEBUG_CONVEX_HULL
+ printf("\n Result\n");
+ result.print();
+#endif
+}
+
+#ifdef DEBUG_CONVEX_HULL
+void btConvexHullInternal::IntermediateHull::print()
+{
+ printf(" Hull\n");
+ for (Vertex* v = minXy; v; )
+ {
+ printf(" ");
+ v->print();
+ if (v == maxXy)
+ {
+ printf(" maxXy");
+ }
+ if (v == minYx)
+ {
+ printf(" minYx");
+ }
+ if (v == maxYx)
+ {
+ printf(" maxYx");
+ }
+ if (v->next->prev != v)
+ {
+ printf(" Inconsistency");
+ }
+ printf("\n");
+ v = v->next;
+ if (v == minXy)
+ {
+ break;
+ }
+ }
+ if (minXy)
+ {
+ minXy->copy = (minXy->copy == -1) ? -2 : -1;
+ minXy->printGraph();
+ }
+}
+
+void btConvexHullInternal::Vertex::printGraph()
+{
+ print();
+ printf("\nEdges\n");
+ Edge* e = edges;
+ if (e)
+ {
+ do
+ {
+ e->print();
+ printf("\n");
+ e = e->next;
+ } while (e != edges);
+ do
+ {
+ Vertex* v = e->target;
+ if (v->copy != copy)
+ {
+ v->copy = copy;
+ v->printGraph();
+ }
+ e = e->next;
+ } while (e != edges);
+ }
+}
+#endif
+
+btConvexHullInternal::Orientation btConvexHullInternal::getOrientation(const Edge* prev, const Edge* next, const Point32& s, const Point32& t)
+{
+ btAssert(prev->reverse->target == next->reverse->target);
+ if (prev->next == next)
+ {
+ if (prev->prev == next)
+ {
+ Point64 n = t.cross(s);
+ Point64 m = (*prev->target - *next->reverse->target).cross(*next->target - *next->reverse->target);
+ btAssert(!m.isZero());
+ int64_t dot = n.dot(m);
+ btAssert(dot != 0);
+ return (dot > 0) ? COUNTER_CLOCKWISE : CLOCKWISE;
+ }
+ return COUNTER_CLOCKWISE;
+ }
+ else if (prev->prev == next)
+ {
+ return CLOCKWISE;
+ }
+ else
+ {
+ return NONE;
+ }
+}
+
+btConvexHullInternal::Edge* btConvexHullInternal::findMaxAngle(bool ccw, const Vertex* start, const Point32& s, const Point64& rxs, const Point64& sxrxs, Rational64& minCot)
+{
+ Edge* minEdge = NULL;
+
+#ifdef DEBUG_CONVEX_HULL
+ printf("find max edge for %d\n", start->point.index);
+#endif
+ Edge* e = start->edges;
+ if (e)
+ {
+ do
+ {
+ if (e->copy > mergeStamp)
+ {
+ Point32 t = *e->target - *start;
+ Rational64 cot(t.dot(sxrxs), t.dot(rxs));
+#ifdef DEBUG_CONVEX_HULL
+ printf(" Angle is %f (%d) for ", (float) btAtan(cot.toScalar()), (int) cot.isNaN());
+ e->print();
+#endif
+ if (cot.isNaN())
+ {
+ btAssert(ccw ? (t.dot(s) < 0) : (t.dot(s) > 0));
+ }
+ else
+ {
+ int cmp;
+ if (minEdge == NULL)
+ {
+ minCot = cot;
+ minEdge = e;
+ }
+ else if ((cmp = cot.compare(minCot)) < 0)
+ {
+ minCot = cot;
+ minEdge = e;
+ }
+ else if ((cmp == 0) && (ccw == (getOrientation(minEdge, e, s, t) == COUNTER_CLOCKWISE)))
+ {
+ minEdge = e;
+ }
+ }
+#ifdef DEBUG_CONVEX_HULL
+ printf("\n");
+#endif
+ }
+ e = e->next;
+ } while (e != start->edges);
+ }
+ return minEdge;
+}
+
+void btConvexHullInternal::findEdgeForCoplanarFaces(Vertex* c0, Vertex* c1, Edge*& e0, Edge*& e1, Vertex* stop0, Vertex* stop1)
+{
+ Edge* start0 = e0;
+ Edge* start1 = e1;
+ Point32 et0 = start0 ? start0->target->point : c0->point;
+ Point32 et1 = start1 ? start1->target->point : c1->point;
+ Point32 s = c1->point - c0->point;
+ Point64 normal = ((start0 ? start0 : start1)->target->point - c0->point).cross(s);
+ int64_t dist = c0->point.dot(normal);
+ btAssert(!start1 || (start1->target->point.dot(normal) == dist));
+ Point64 perp = s.cross(normal);
+ btAssert(!perp.isZero());
+
+#ifdef DEBUG_CONVEX_HULL
+ printf(" Advancing %d %d (%p %p, %d %d)\n", c0->point.index, c1->point.index, start0, start1, start0 ? start0->target->point.index : -1, start1 ? start1->target->point.index : -1);
+#endif
+
+ int64_t maxDot0 = et0.dot(perp);
+ if (e0)
+ {
+ while (e0->target != stop0)
+ {
+ Edge* e = e0->reverse->prev;
+ if (e->target->point.dot(normal) < dist)
+ {
+ break;
+ }
+ btAssert(e->target->point.dot(normal) == dist);
+ if (e->copy == mergeStamp)
+ {
+ break;
+ }
+ int64_t dot = e->target->point.dot(perp);
+ if (dot <= maxDot0)
+ {
+ break;
+ }
+ maxDot0 = dot;
+ e0 = e;
+ et0 = e->target->point;
+ }
+ }
+
+ int64_t maxDot1 = et1.dot(perp);
+ if (e1)
+ {
+ while (e1->target != stop1)
+ {
+ Edge* e = e1->reverse->next;
+ if (e->target->point.dot(normal) < dist)
+ {
+ break;
+ }
+ btAssert(e->target->point.dot(normal) == dist);
+ if (e->copy == mergeStamp)
+ {
+ break;
+ }
+ int64_t dot = e->target->point.dot(perp);
+ if (dot <= maxDot1)
+ {
+ break;
+ }
+ maxDot1 = dot;
+ e1 = e;
+ et1 = e->target->point;
+ }
+ }
+
+#ifdef DEBUG_CONVEX_HULL
+ printf(" Starting at %d %d\n", et0.index, et1.index);
+#endif
+
+ int64_t dx = maxDot1 - maxDot0;
+ if (dx > 0)
+ {
+ while (true)
+ {
+ int64_t dy = (et1 - et0).dot(s);
+
+ if (e0 && (e0->target != stop0))
+ {
+ Edge* f0 = e0->next->reverse;
+ if (f0->copy > mergeStamp)
+ {
+ int64_t dx0 = (f0->target->point - et0).dot(perp);
+ int64_t dy0 = (f0->target->point - et0).dot(s);
+ if ((dx0 == 0) ? (dy0 < 0) : ((dx0 < 0) && (Rational64(dy0, dx0).compare(Rational64(dy, dx)) >= 0)))
+ {
+ et0 = f0->target->point;
+ dx = (et1 - et0).dot(perp);
+ e0 = (e0 == start0) ? NULL : f0;
+ continue;
+ }
+ }
+ }
+
+ if (e1 && (e1->target != stop1))
+ {
+ Edge* f1 = e1->reverse->next;
+ if (f1->copy > mergeStamp)
+ {
+ Point32 d1 = f1->target->point - et1;
+ if (d1.dot(normal) == 0)
+ {
+ int64_t dx1 = d1.dot(perp);
+ int64_t dy1 = d1.dot(s);
+ int64_t dxn = (f1->target->point - et0).dot(perp);
+ if ((dxn > 0) && ((dx1 == 0) ? (dy1 < 0) : ((dx1 < 0) && (Rational64(dy1, dx1).compare(Rational64(dy, dx)) > 0))))
+ {
+ e1 = f1;
+ et1 = e1->target->point;
+ dx = dxn;
+ continue;
+ }
+ }
+ else
+ {
+ btAssert((e1 == start1) && (d1.dot(normal) < 0));
+ }
+ }
+ }
+
+ break;
+ }
+ }
+ else if (dx < 0)
+ {
+ while (true)
+ {
+ int64_t dy = (et1 - et0).dot(s);
+
+ if (e1 && (e1->target != stop1))
+ {
+ Edge* f1 = e1->prev->reverse;
+ if (f1->copy > mergeStamp)
+ {
+ int64_t dx1 = (f1->target->point - et1).dot(perp);
+ int64_t dy1 = (f1->target->point - et1).dot(s);
+ if ((dx1 == 0) ? (dy1 > 0) : ((dx1 < 0) && (Rational64(dy1, dx1).compare(Rational64(dy, dx)) <= 0)))
+ {
+ et1 = f1->target->point;
+ dx = (et1 - et0).dot(perp);
+ e1 = (e1 == start1) ? NULL : f1;
+ continue;
+ }
+ }
+ }
+
+ if (e0 && (e0->target != stop0))
+ {
+ Edge* f0 = e0->reverse->prev;
+ if (f0->copy > mergeStamp)
+ {
+ Point32 d0 = f0->target->point - et0;
+ if (d0.dot(normal) == 0)
+ {
+ int64_t dx0 = d0.dot(perp);
+ int64_t dy0 = d0.dot(s);
+ int64_t dxn = (et1 - f0->target->point).dot(perp);
+ if ((dxn < 0) && ((dx0 == 0) ? (dy0 > 0) : ((dx0 < 0) && (Rational64(dy0, dx0).compare(Rational64(dy, dx)) < 0))))
+ {
+ e0 = f0;
+ et0 = e0->target->point;
+ dx = dxn;
+ continue;
+ }
+ }
+ else
+ {
+ btAssert((e0 == start0) && (d0.dot(normal) < 0));
+ }
+ }
+ }
+
+ break;
+ }
+ }
+#ifdef DEBUG_CONVEX_HULL
+ printf(" Advanced edges to %d %d\n", et0.index, et1.index);
+#endif
+}
+
+
+void btConvexHullInternal::merge(IntermediateHull& h0, IntermediateHull& h1)
+{
+ if (!h1.maxXy)
+ {
+ return;
+ }
+ if (!h0.maxXy)
+ {
+ h0 = h1;
+ return;
+ }
+
+ mergeStamp--;
+
+ Vertex* c0 = NULL;
+ Edge* toPrev0 = NULL;
+ Edge* firstNew0 = NULL;
+ Edge* pendingHead0 = NULL;
+ Edge* pendingTail0 = NULL;
+ Vertex* c1 = NULL;
+ Edge* toPrev1 = NULL;
+ Edge* firstNew1 = NULL;
+ Edge* pendingHead1 = NULL;
+ Edge* pendingTail1 = NULL;
+ Point32 prevPoint;
+
+ if (mergeProjection(h0, h1, c0, c1))
+ {
+ Point32 s = *c1 - *c0;
+ Point64 normal = Point32(0, 0, -1).cross(s);
+ Point64 t = s.cross(normal);
+ btAssert(!t.isZero());
+
+ Edge* e = c0->edges;
+ Edge* start0 = NULL;
+ if (e)
+ {
+ do
+ {
+ int64_t dot = (*e->target - *c0).dot(normal);
+ btAssert(dot <= 0);
+ if ((dot == 0) && ((*e->target - *c0).dot(t) > 0))
+ {
+ if (!start0 || (getOrientation(start0, e, s, Point32(0, 0, -1)) == CLOCKWISE))
+ {
+ start0 = e;
+ }
+ }
+ e = e->next;
+ } while (e != c0->edges);
+ }
+
+ e = c1->edges;
+ Edge* start1 = NULL;
+ if (e)
+ {
+ do
+ {
+ int64_t dot = (*e->target - *c1).dot(normal);
+ btAssert(dot <= 0);
+ if ((dot == 0) && ((*e->target - *c1).dot(t) > 0))
+ {
+ if (!start1 || (getOrientation(start1, e, s, Point32(0, 0, -1)) == COUNTER_CLOCKWISE))
+ {
+ start1 = e;
+ }
+ }
+ e = e->next;
+ } while (e != c1->edges);
+ }
+
+ if (start0 || start1)
+ {
+ findEdgeForCoplanarFaces(c0, c1, start0, start1, NULL, NULL);
+ if (start0)
+ {
+ c0 = start0->target;
+ }
+ if (start1)
+ {
+ c1 = start1->target;
+ }
+ }
+
+ prevPoint = c1->point;
+ prevPoint.z++;
+ }
+ else
+ {
+ prevPoint = c1->point;
+ prevPoint.x++;
+ }
+
+ Vertex* first0 = c0;
+ Vertex* first1 = c1;
+ bool firstRun = true;
+
+ while (true)
+ {
+ Point32 s = *c1 - *c0;
+ Point32 r = prevPoint - c0->point;
+ Point64 rxs = r.cross(s);
+ Point64 sxrxs = s.cross(rxs);
+
+#ifdef DEBUG_CONVEX_HULL
+ printf("\n Checking %d %d\n", c0->point.index, c1->point.index);
+#endif
+ Rational64 minCot0(0, 0);
+ Edge* min0 = findMaxAngle(false, c0, s, rxs, sxrxs, minCot0);
+ Rational64 minCot1(0, 0);
+ Edge* min1 = findMaxAngle(true, c1, s, rxs, sxrxs, minCot1);
+ if (!min0 && !min1)
+ {
+ Edge* e = newEdgePair(c0, c1);
+ e->link(e);
+ c0->edges = e;
+
+ e = e->reverse;
+ e->link(e);
+ c1->edges = e;
+ return;
+ }
+ else
+ {
+ int cmp = !min0 ? 1 : !min1 ? -1 : minCot0.compare(minCot1);
+#ifdef DEBUG_CONVEX_HULL
+ printf(" -> Result %d\n", cmp);
+#endif
+ if (firstRun || ((cmp >= 0) ? !minCot1.isNegativeInfinity() : !minCot0.isNegativeInfinity()))
+ {
+ Edge* e = newEdgePair(c0, c1);
+ if (pendingTail0)
+ {
+ pendingTail0->prev = e;
+ }
+ else
+ {
+ pendingHead0 = e;
+ }
+ e->next = pendingTail0;
+ pendingTail0 = e;
+
+ e = e->reverse;
+ if (pendingTail1)
+ {
+ pendingTail1->next = e;
+ }
+ else
+ {
+ pendingHead1 = e;
+ }
+ e->prev = pendingTail1;
+ pendingTail1 = e;
+ }
+
+ Edge* e0 = min0;
+ Edge* e1 = min1;
+
+#ifdef DEBUG_CONVEX_HULL
+ printf(" Found min edges to %d %d\n", e0 ? e0->target->point.index : -1, e1 ? e1->target->point.index : -1);
+#endif
+
+ if (cmp == 0)
+ {
+ findEdgeForCoplanarFaces(c0, c1, e0, e1, NULL, NULL);
+ }
+
+ if ((cmp >= 0) && e1)
+ {
+ if (toPrev1)
+ {
+ for (Edge* e = toPrev1->next, *n = NULL; e != min1; e = n)
+ {
+ n = e->next;
+ removeEdgePair(e);
+ }
+ }
+
+ if (pendingTail1)
+ {
+ if (toPrev1)
+ {
+ toPrev1->link(pendingHead1);
+ }
+ else
+ {
+ min1->prev->link(pendingHead1);
+ firstNew1 = pendingHead1;
+ }
+ pendingTail1->link(min1);
+ pendingHead1 = NULL;
+ pendingTail1 = NULL;
+ }
+ else if (!toPrev1)
+ {
+ firstNew1 = min1;
+ }
+
+ prevPoint = c1->point;
+ c1 = e1->target;
+ toPrev1 = e1->reverse;
+ }
+
+ if ((cmp <= 0) && e0)
+ {
+ if (toPrev0)
+ {
+ for (Edge* e = toPrev0->prev, *n = NULL; e != min0; e = n)
+ {
+ n = e->prev;
+ removeEdgePair(e);
+ }
+ }
+
+ if (pendingTail0)
+ {
+ if (toPrev0)
+ {
+ pendingHead0->link(toPrev0);
+ }
+ else
+ {
+ pendingHead0->link(min0->next);
+ firstNew0 = pendingHead0;
+ }
+ min0->link(pendingTail0);
+ pendingHead0 = NULL;
+ pendingTail0 = NULL;
+ }
+ else if (!toPrev0)
+ {
+ firstNew0 = min0;
+ }
+
+ prevPoint = c0->point;
+ c0 = e0->target;
+ toPrev0 = e0->reverse;
+ }
+ }
+
+ if ((c0 == first0) && (c1 == first1))
+ {
+ if (toPrev0 == NULL)
+ {
+ pendingHead0->link(pendingTail0);
+ c0->edges = pendingTail0;
+ }
+ else
+ {
+ for (Edge* e = toPrev0->prev, *n = NULL; e != firstNew0; e = n)
+ {
+ n = e->prev;
+ removeEdgePair(e);
+ }
+ if (pendingTail0)
+ {
+ pendingHead0->link(toPrev0);
+ firstNew0->link(pendingTail0);
+ }
+ }
+
+ if (toPrev1 == NULL)
+ {
+ pendingTail1->link(pendingHead1);
+ c1->edges = pendingTail1;
+ }
+ else
+ {
+ for (Edge* e = toPrev1->next, *n = NULL; e != firstNew1; e = n)
+ {
+ n = e->next;
+ removeEdgePair(e);
+ }
+ if (pendingTail1)
+ {
+ toPrev1->link(pendingHead1);
+ pendingTail1->link(firstNew1);
+ }
+ }
+
+ return;
+ }
+
+ firstRun = false;
+ }
+}
+
+
+static bool pointCmp(const btConvexHullInternal::Point32& p, const btConvexHullInternal::Point32& q)
+{
+ return (p.y < q.y) || ((p.y == q.y) && ((p.x < q.x) || ((p.x == q.x) && (p.z < q.z))));
+}
+
+void btConvexHullInternal::compute(const void* coords, bool doubleCoords, int stride, int count)
+{
+ btVector3 min(btScalar(1e30), btScalar(1e30), btScalar(1e30)), max(btScalar(-1e30), btScalar(-1e30), btScalar(-1e30));
+ const char* ptr = (const char*) coords;
+ if (doubleCoords)
+ {
+ for (int i = 0; i < count; i++)
+ {
+ const double* v = (const double*) ptr;
+ btVector3 p((btScalar) v[0], (btScalar) v[1], (btScalar) v[2]);
+ ptr += stride;
+ min.setMin(p);
+ max.setMax(p);
+ }
+ }
+ else
+ {
+ for (int i = 0; i < count; i++)
+ {
+ const float* v = (const float*) ptr;
+ btVector3 p(v[0], v[1], v[2]);
+ ptr += stride;
+ min.setMin(p);
+ max.setMax(p);
+ }
+ }
+
+ btVector3 s = max - min;
+ maxAxis = s.maxAxis();
+ minAxis = s.minAxis();
+ if (minAxis == maxAxis)
+ {
+ minAxis = (maxAxis + 1) % 3;
+ }
+ medAxis = 3 - maxAxis - minAxis;
+
+ s /= btScalar(10216);
+
+ scaling = s;
+ if (s[0] > 0)
+ {
+ s[0] = btScalar(1) / s[0];
+ }
+ if (s[1] > 0)
+ {
+ s[1] = btScalar(1) / s[1];
+ }
+ if (s[2] > 0)
+ {
+ s[2] = btScalar(1) / s[2];
+ }
+
+ center = (min + max) * btScalar(0.5);
+
+ btAlignedObjectArray<Point32> points;
+ points.resize(count);
+ ptr = (const char*) coords;
+ if (doubleCoords)
+ {
+ for (int i = 0; i < count; i++)
+ {
+ const double* v = (const double*) ptr;
+ btVector3 p((btScalar) v[0], (btScalar) v[1], (btScalar) v[2]);
+ ptr += stride;
+ p = (p - center) * s;
+ points[i].x = (int32_t) p[medAxis];
+ points[i].y = (int32_t) p[maxAxis];
+ points[i].z = (int32_t) p[minAxis];
+ points[i].index = i;
+ }
+ }
+ else
+ {
+ for (int i = 0; i < count; i++)
+ {
+ const float* v = (const float*) ptr;
+ btVector3 p(v[0], v[1], v[2]);
+ ptr += stride;
+ p = (p - center) * s;
+ points[i].x = (int32_t) p[medAxis];
+ points[i].y = (int32_t) p[maxAxis];
+ points[i].z = (int32_t) p[minAxis];
+ points[i].index = i;
+ }
+ }
+ points.quickSort(pointCmp);
+
+ vertexPool.reset();
+ vertexPool.setArraySize(count);
+ originalVertices.resize(count);
+ for (int i = 0; i < count; i++)
+ {
+ Vertex* v = vertexPool.newObject();
+ v->edges = NULL;
+ v->point = points[i];
+ v->copy = -1;
+ originalVertices[i] = v;
+ }
+
+ points.clear();
+
+ edgePool.reset();
+ edgePool.setArraySize(6 * count);
+
+ usedEdgePairs = 0;
+ maxUsedEdgePairs = 0;
+
+ mergeStamp = -3;
+
+ IntermediateHull hull;
+ computeInternal(0, count, hull);
+ vertexList = hull.minXy;
+#ifdef DEBUG_CONVEX_HULL
+ printf("max. edges %d (3v = %d)", maxUsedEdgePairs, 3 * count);
+#endif
+}
+
+btVector3 btConvexHullInternal::toBtVector(const Point32& v)
+{
+ btVector3 p;
+ p[medAxis] = btScalar(v.x);
+ p[maxAxis] = btScalar(v.y);
+ p[minAxis] = btScalar(v.z);
+ return p * scaling;
+}
+
+btVector3 btConvexHullInternal::getBtNormal(Face* face)
+{
+ btVector3 normal = toBtVector(face->dir0).cross(toBtVector(face->dir1));
+ normal /= ((medAxis + 1 == maxAxis) || (medAxis - 2 == maxAxis)) ? normal.length() : -normal.length();
+ return normal;
+}
+
+btVector3 btConvexHullInternal::getCoordinates(const Vertex* v)
+{
+ btVector3 p;
+ p[medAxis] = v->xvalue();
+ p[maxAxis] = v->yvalue();
+ p[minAxis] = v->zvalue();
+ return p * scaling + center;
+}
+
+btScalar btConvexHullInternal::shrink(btScalar amount, btScalar clampAmount)
+{
+ if (!vertexList)
+ {
+ return 0;
+ }
+ int stamp = --mergeStamp;
+ btAlignedObjectArray<Vertex*> stack;
+ vertexList->copy = stamp;
+ stack.push_back(vertexList);
+ btAlignedObjectArray<Face*> faces;
+
+ Point32 ref = vertexList->point;
+ Int128 hullCenterX(0, 0);
+ Int128 hullCenterY(0, 0);
+ Int128 hullCenterZ(0, 0);
+ Int128 volume(0, 0);
+
+ while (stack.size() > 0)
+ {
+ Vertex* v = stack[stack.size() - 1];
+ stack.pop_back();
+ Edge* e = v->edges;
+ if (e)
+ {
+ do
+ {
+ if (e->target->copy != stamp)
+ {
+ e->target->copy = stamp;
+ stack.push_back(e->target);
+ }
+ if (e->copy != stamp)
+ {
+ Face* face = facePool.newObject();
+ face->init(e->target, e->reverse->prev->target, v);
+ faces.push_back(face);
+ Edge* f = e;
+
+ Vertex* a = NULL;
+ Vertex* b = NULL;
+ do
+ {
+ if (a && b)
+ {
+ int64_t vol = (v->point - ref).dot((a->point - ref).cross(b->point - ref));
+ btAssert(vol >= 0);
+ Point32 c = v->point + a->point + b->point + ref;
+ hullCenterX += vol * c.x;
+ hullCenterY += vol * c.y;
+ hullCenterZ += vol * c.z;
+ volume += vol;
+ }
+
+ btAssert(f->copy != stamp);
+ f->copy = stamp;
+ f->face = face;
+
+ a = b;
+ b = f->target;
+
+ f = f->reverse->prev;
+ } while (f != e);
+ }
+ e = e->next;
+ } while (e != v->edges);
+ }
+ }
+
+ if (volume.getSign() <= 0)
+ {
+ return 0;
+ }
+
+ btVector3 hullCenter;
+ hullCenter[medAxis] = hullCenterX.toScalar();
+ hullCenter[maxAxis] = hullCenterY.toScalar();
+ hullCenter[minAxis] = hullCenterZ.toScalar();
+ hullCenter /= 4 * volume.toScalar();
+ hullCenter *= scaling;
+
+ int faceCount = faces.size();
+
+ if (clampAmount > 0)
+ {
+ btScalar minDist = SIMD_INFINITY;
+ for (int i = 0; i < faceCount; i++)
+ {
+ btVector3 normal = getBtNormal(faces[i]);
+ btScalar dist = normal.dot(toBtVector(faces[i]->origin) - hullCenter);
+ if (dist < minDist)
+ {
+ minDist = dist;
+ }
+ }
+
+ if (minDist <= 0)
+ {
+ return 0;
+ }
+
+ amount = btMin(amount, minDist * clampAmount);
+ }
+
+ unsigned int seed = 243703;
+ for (int i = 0; i < faceCount; i++, seed = 1664525 * seed + 1013904223)
+ {
+ btSwap(faces[i], faces[seed % faceCount]);
+ }
+
+ for (int i = 0; i < faceCount; i++)
+ {
+ if (!shiftFace(faces[i], amount, stack))
+ {
+ return -amount;
+ }
+ }
+
+ return amount;
+}
+
+bool btConvexHullInternal::shiftFace(Face* face, btScalar amount, btAlignedObjectArray<Vertex*> stack)
+{
+ btVector3 origShift = getBtNormal(face) * -amount;
+ if (scaling[0] > 0)
+ {
+ origShift[0] /= scaling[0];
+ }
+ if (scaling[1] > 0)
+ {
+ origShift[1] /= scaling[1];
+ }
+ if (scaling[2] > 0)
+ {
+ origShift[2] /= scaling[2];
+ }
+ Point32 shift((int32_t) origShift[medAxis], (int32_t) origShift[maxAxis], (int32_t) origShift[minAxis]);
+ if (shift.isZero())
+ {
+ return true;
+ }
+ Point64 normal = face->getNormal();
+#ifdef DEBUG_CONVEX_HULL
+ printf("\nShrinking face (%d %d %d) (%d %d %d) (%d %d %d) by (%d %d %d)\n",
+ face->origin.x, face->origin.y, face->origin.z, face->dir0.x, face->dir0.y, face->dir0.z, face->dir1.x, face->dir1.y, face->dir1.z, shift.x, shift.y, shift.z);
+#endif
+ int64_t origDot = face->origin.dot(normal);
+ Point32 shiftedOrigin = face->origin + shift;
+ int64_t shiftedDot = shiftedOrigin.dot(normal);
+ btAssert(shiftedDot <= origDot);
+ if (shiftedDot >= origDot)
+ {
+ return false;
+ }
+
+ Edge* intersection = NULL;
+
+ Edge* startEdge = face->nearbyVertex->edges;
+#ifdef DEBUG_CONVEX_HULL
+ printf("Start edge is ");
+ startEdge->print();
+ printf(", normal is (%lld %lld %lld), shifted dot is %lld\n", normal.x, normal.y, normal.z, shiftedDot);
+#endif
+ Rational128 optDot = face->nearbyVertex->dot(normal);
+ int cmp = optDot.compare(shiftedDot);
+#ifdef SHOW_ITERATIONS
+ int n = 0;
+#endif
+ if (cmp >= 0)
+ {
+ Edge* e = startEdge;
+ do
+ {
+#ifdef SHOW_ITERATIONS
+ n++;
+#endif
+ Rational128 dot = e->target->dot(normal);
+ btAssert(dot.compare(origDot) <= 0);
+#ifdef DEBUG_CONVEX_HULL
+ printf("Moving downwards, edge is ");
+ e->print();
+ printf(", dot is %f (%f %lld)\n", (float) dot.toScalar(), (float) optDot.toScalar(), shiftedDot);
+#endif
+ if (dot.compare(optDot) < 0)
+ {
+ int c = dot.compare(shiftedDot);
+ optDot = dot;
+ e = e->reverse;
+ startEdge = e;
+ if (c < 0)
+ {
+ intersection = e;
+ break;
+ }
+ cmp = c;
+ }
+ e = e->prev;
+ } while (e != startEdge);
+
+ if (!intersection)
+ {
+ return false;
+ }
+ }
+ else
+ {
+ Edge* e = startEdge;
+ do
+ {
+#ifdef SHOW_ITERATIONS
+ n++;
+#endif
+ Rational128 dot = e->target->dot(normal);
+ btAssert(dot.compare(origDot) <= 0);
+#ifdef DEBUG_CONVEX_HULL
+ printf("Moving upwards, edge is ");
+ e->print();
+ printf(", dot is %f (%f %lld)\n", (float) dot.toScalar(), (float) optDot.toScalar(), shiftedDot);
+#endif
+ if (dot.compare(optDot) > 0)
+ {
+ cmp = dot.compare(shiftedDot);
+ if (cmp >= 0)
+ {
+ intersection = e;
+ break;
+ }
+ optDot = dot;
+ e = e->reverse;
+ startEdge = e;
+ }
+ e = e->prev;
+ } while (e != startEdge);
+
+ if (!intersection)
+ {
+ return true;
+ }
+ }
+
+#ifdef SHOW_ITERATIONS
+ printf("Needed %d iterations to find initial intersection\n", n);
+#endif
+
+ if (cmp == 0)
+ {
+ Edge* e = intersection->reverse->next;
+#ifdef SHOW_ITERATIONS
+ n = 0;
+#endif
+ while (e->target->dot(normal).compare(shiftedDot) <= 0)
+ {
+#ifdef SHOW_ITERATIONS
+ n++;
+#endif
+ e = e->next;
+ if (e == intersection->reverse)
+ {
+ return true;
+ }
+#ifdef DEBUG_CONVEX_HULL
+ printf("Checking for outwards edge, current edge is ");
+ e->print();
+ printf("\n");
+#endif
+ }
+#ifdef SHOW_ITERATIONS
+ printf("Needed %d iterations to check for complete containment\n", n);
+#endif
+ }
+
+ Edge* firstIntersection = NULL;
+ Edge* faceEdge = NULL;
+ Edge* firstFaceEdge = NULL;
+
+#ifdef SHOW_ITERATIONS
+ int m = 0;
+#endif
+ while (true)
+ {
+#ifdef SHOW_ITERATIONS
+ m++;
+#endif
+#ifdef DEBUG_CONVEX_HULL
+ printf("Intersecting edge is ");
+ intersection->print();
+ printf("\n");
+#endif
+ if (cmp == 0)
+ {
+ Edge* e = intersection->reverse->next;
+ startEdge = e;
+#ifdef SHOW_ITERATIONS
+ n = 0;
+#endif
+ while (true)
+ {
+#ifdef SHOW_ITERATIONS
+ n++;
+#endif
+ if (e->target->dot(normal).compare(shiftedDot) >= 0)
+ {
+ break;
+ }
+ intersection = e->reverse;
+ e = e->next;
+ if (e == startEdge)
+ {
+ return true;
+ }
+ }
+#ifdef SHOW_ITERATIONS
+ printf("Needed %d iterations to advance intersection\n", n);
+#endif
+ }
+
+#ifdef DEBUG_CONVEX_HULL
+ printf("Advanced intersecting edge to ");
+ intersection->print();
+ printf(", cmp = %d\n", cmp);
+#endif
+
+ if (!firstIntersection)
+ {
+ firstIntersection = intersection;
+ }
+ else if (intersection == firstIntersection)
+ {
+ break;
+ }
+
+ int prevCmp = cmp;
+ Edge* prevIntersection = intersection;
+ Edge* prevFaceEdge = faceEdge;
+
+ Edge* e = intersection->reverse;
+#ifdef SHOW_ITERATIONS
+ n = 0;
+#endif
+ while (true)
+ {
+#ifdef SHOW_ITERATIONS
+ n++;
+#endif
+ e = e->reverse->prev;
+ btAssert(e != intersection->reverse);
+ cmp = e->target->dot(normal).compare(shiftedDot);
+#ifdef DEBUG_CONVEX_HULL
+ printf("Testing edge ");
+ e->print();
+ printf(" -> cmp = %d\n", cmp);
+#endif
+ if (cmp >= 0)
+ {
+ intersection = e;
+ break;
+ }
+ }
+#ifdef SHOW_ITERATIONS
+ printf("Needed %d iterations to find other intersection of face\n", n);
+#endif
+
+ if (cmp > 0)
+ {
+ Vertex* removed = intersection->target;
+ e = intersection->reverse;
+ if (e->prev == e)
+ {
+ removed->edges = NULL;
+ }
+ else
+ {
+ removed->edges = e->prev;
+ e->prev->link(e->next);
+ e->link(e);
+ }
+#ifdef DEBUG_CONVEX_HULL
+ printf("1: Removed part contains (%d %d %d)\n", removed->point.x, removed->point.y, removed->point.z);
+#endif
+
+ Point64 n0 = intersection->face->getNormal();
+ Point64 n1 = intersection->reverse->face->getNormal();
+ int64_t m00 = face->dir0.dot(n0);
+ int64_t m01 = face->dir1.dot(n0);
+ int64_t m10 = face->dir0.dot(n1);
+ int64_t m11 = face->dir1.dot(n1);
+ int64_t r0 = (intersection->face->origin - shiftedOrigin).dot(n0);
+ int64_t r1 = (intersection->reverse->face->origin - shiftedOrigin).dot(n1);
+ Int128 det = Int128::mul(m00, m11) - Int128::mul(m01, m10);
+ btAssert(det.getSign() != 0);
+ Vertex* v = vertexPool.newObject();
+ v->point.index = -1;
+ v->copy = -1;
+ v->point128 = PointR128(Int128::mul(face->dir0.x * r0, m11) - Int128::mul(face->dir0.x * r1, m01)
+ + Int128::mul(face->dir1.x * r1, m00) - Int128::mul(face->dir1.x * r0, m10) + det * shiftedOrigin.x,
+ Int128::mul(face->dir0.y * r0, m11) - Int128::mul(face->dir0.y * r1, m01)
+ + Int128::mul(face->dir1.y * r1, m00) - Int128::mul(face->dir1.y * r0, m10) + det * shiftedOrigin.y,
+ Int128::mul(face->dir0.z * r0, m11) - Int128::mul(face->dir0.z * r1, m01)
+ + Int128::mul(face->dir1.z * r1, m00) - Int128::mul(face->dir1.z * r0, m10) + det * shiftedOrigin.z,
+ det);
+ v->point.x = (int32_t) v->point128.xvalue();
+ v->point.y = (int32_t) v->point128.yvalue();
+ v->point.z = (int32_t) v->point128.zvalue();
+ intersection->target = v;
+ v->edges = e;
+
+ stack.push_back(v);
+ stack.push_back(removed);
+ stack.push_back(NULL);
+ }
+
+ if (cmp || prevCmp || (prevIntersection->reverse->next->target != intersection->target))
+ {
+ faceEdge = newEdgePair(prevIntersection->target, intersection->target);
+ if (prevCmp == 0)
+ {
+ faceEdge->link(prevIntersection->reverse->next);
+ }
+ if ((prevCmp == 0) || prevFaceEdge)
+ {
+ prevIntersection->reverse->link(faceEdge);
+ }
+ if (cmp == 0)
+ {
+ intersection->reverse->prev->link(faceEdge->reverse);
+ }
+ faceEdge->reverse->link(intersection->reverse);
+ }
+ else
+ {
+ faceEdge = prevIntersection->reverse->next;
+ }
+
+ if (prevFaceEdge)
+ {
+ if (prevCmp > 0)
+ {
+ faceEdge->link(prevFaceEdge->reverse);
+ }
+ else if (faceEdge != prevFaceEdge->reverse)
+ {
+ stack.push_back(prevFaceEdge->target);
+ while (faceEdge->next != prevFaceEdge->reverse)
+ {
+ Vertex* removed = faceEdge->next->target;
+ removeEdgePair(faceEdge->next);
+ stack.push_back(removed);
+#ifdef DEBUG_CONVEX_HULL
+ printf("2: Removed part contains (%d %d %d)\n", removed->point.x, removed->point.y, removed->point.z);
+#endif
+ }
+ stack.push_back(NULL);
+ }
+ }
+ faceEdge->face = face;
+ faceEdge->reverse->face = intersection->face;
+
+ if (!firstFaceEdge)
+ {
+ firstFaceEdge = faceEdge;
+ }
+ }
+#ifdef SHOW_ITERATIONS
+ printf("Needed %d iterations to process all intersections\n", m);
+#endif
+
+ if (cmp > 0)
+ {
+ firstFaceEdge->reverse->target = faceEdge->target;
+ firstIntersection->reverse->link(firstFaceEdge);
+ firstFaceEdge->link(faceEdge->reverse);
+ }
+ else if (firstFaceEdge != faceEdge->reverse)
+ {
+ stack.push_back(faceEdge->target);
+ while (firstFaceEdge->next != faceEdge->reverse)
+ {
+ Vertex* removed = firstFaceEdge->next->target;
+ removeEdgePair(firstFaceEdge->next);
+ stack.push_back(removed);
+#ifdef DEBUG_CONVEX_HULL
+ printf("3: Removed part contains (%d %d %d)\n", removed->point.x, removed->point.y, removed->point.z);
+#endif
+ }
+ stack.push_back(NULL);
+ }
+
+ btAssert(stack.size() > 0);
+ vertexList = stack[0];
+
+#ifdef DEBUG_CONVEX_HULL
+ printf("Removing part\n");
+#endif
+#ifdef SHOW_ITERATIONS
+ n = 0;
+#endif
+ int pos = 0;
+ while (pos < stack.size())
+ {
+ int end = stack.size();
+ while (pos < end)
+ {
+ Vertex* kept = stack[pos++];
+#ifdef DEBUG_CONVEX_HULL
+ kept->print();
+#endif
+ bool deeper = false;
+ Vertex* removed;
+ while ((removed = stack[pos++]) != NULL)
+ {
+#ifdef SHOW_ITERATIONS
+ n++;
+#endif
+ kept->receiveNearbyFaces(removed);
+ while (removed->edges)
+ {
+ if (!deeper)
+ {
+ deeper = true;
+ stack.push_back(kept);
+ }
+ stack.push_back(removed->edges->target);
+ removeEdgePair(removed->edges);
+ }
+ }
+ if (deeper)
+ {
+ stack.push_back(NULL);
+ }
+ }
+ }
+#ifdef SHOW_ITERATIONS
+ printf("Needed %d iterations to remove part\n", n);
+#endif
+
+ stack.resize(0);
+ face->origin = shiftedOrigin;
+
+ return true;
+}
+
+
+static int getVertexCopy(btConvexHullInternal::Vertex* vertex, btAlignedObjectArray<btConvexHullInternal::Vertex*>& vertices)
+{
+ int index = vertex->copy;
+ if (index < 0)
+ {
+ index = vertices.size();
+ vertex->copy = index;
+ vertices.push_back(vertex);
+#ifdef DEBUG_CONVEX_HULL
+ printf("Vertex %d gets index *%d\n", vertex->point.index, index);
+#endif
+ }
+ return index;
+}
+
+btScalar btConvexHullComputer::compute(const void* coords, bool doubleCoords, int stride, int count, btScalar shrink, btScalar shrinkClamp)
+{
+ if (count <= 0)
+ {
+ vertices.clear();
+ edges.clear();
+ faces.clear();
+ return 0;
+ }
+
+ btConvexHullInternal hull;
+ hull.compute(coords, doubleCoords, stride, count);
+
+ btScalar shift = 0;
+ if ((shrink > 0) && ((shift = hull.shrink(shrink, shrinkClamp)) < 0))
+ {
+ vertices.clear();
+ edges.clear();
+ faces.clear();
+ return shift;
+ }
+
+ vertices.resize(0);
+ edges.resize(0);
+ faces.resize(0);
+
+ btAlignedObjectArray<btConvexHullInternal::Vertex*> oldVertices;
+ getVertexCopy(hull.vertexList, oldVertices);
+ int copied = 0;
+ while (copied < oldVertices.size())
+ {
+ btConvexHullInternal::Vertex* v = oldVertices[copied];
+ vertices.push_back(hull.getCoordinates(v));
+ btConvexHullInternal::Edge* firstEdge = v->edges;
+ if (firstEdge)
+ {
+ int firstCopy = -1;
+ int prevCopy = -1;
+ btConvexHullInternal::Edge* e = firstEdge;
+ do
+ {
+ if (e->copy < 0)
+ {
+ int s = edges.size();
+ edges.push_back(Edge());
+ edges.push_back(Edge());
+ Edge* c = &edges[s];
+ Edge* r = &edges[s + 1];
+ e->copy = s;
+ e->reverse->copy = s + 1;
+ c->reverse = 1;
+ r->reverse = -1;
+ c->targetVertex = getVertexCopy(e->target, oldVertices);
+ r->targetVertex = copied;
+#ifdef DEBUG_CONVEX_HULL
+ printf(" CREATE: Vertex *%d has edge to *%d\n", copied, c->getTargetVertex());
+#endif
+ }
+ if (prevCopy >= 0)
+ {
+ edges[e->copy].next = prevCopy - e->copy;
+ }
+ else
+ {
+ firstCopy = e->copy;
+ }
+ prevCopy = e->copy;
+ e = e->next;
+ } while (e != firstEdge);
+ edges[firstCopy].next = prevCopy - firstCopy;
+ }
+ copied++;
+ }
+
+ for (int i = 0; i < copied; i++)
+ {
+ btConvexHullInternal::Vertex* v = oldVertices[i];
+ btConvexHullInternal::Edge* firstEdge = v->edges;
+ if (firstEdge)
+ {
+ btConvexHullInternal::Edge* e = firstEdge;
+ do
+ {
+ if (e->copy >= 0)
+ {
+#ifdef DEBUG_CONVEX_HULL
+ printf("Vertex *%d has edge to *%d\n", i, edges[e->copy].getTargetVertex());
+#endif
+ faces.push_back(e->copy);
+ btConvexHullInternal::Edge* f = e;
+ do
+ {
+#ifdef DEBUG_CONVEX_HULL
+ printf(" Face *%d\n", edges[f->copy].getTargetVertex());
+#endif
+ f->copy = -1;
+ f = f->reverse->prev;
+ } while (f != e);
+ }
+ e = e->next;
+ } while (e != firstEdge);
+ }
+ }
+
+ return shift;
+}
+
+
+
+
+
diff --git a/tests/bullet/src/LinearMath/btConvexHullComputer.h b/tests/bullet/src/LinearMath/btConvexHullComputer.h
new file mode 100644
index 00000000..f1d26307
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btConvexHullComputer.h
@@ -0,0 +1,103 @@
+/*
+Copyright (c) 2011 Ole Kniemeyer, MAXON, www.maxon.net
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_CONVEX_HULL_COMPUTER_H
+#define BT_CONVEX_HULL_COMPUTER_H
+
+#include "btVector3.h"
+#include "btAlignedObjectArray.h"
+
+/// Convex hull implementation based on Preparata and Hong
+/// See http://code.google.com/p/bullet/issues/detail?id=275
+/// Ole Kniemeyer, MAXON Computer GmbH
+class btConvexHullComputer
+{
+ private:
+ btScalar compute(const void* coords, bool doubleCoords, int stride, int count, btScalar shrink, btScalar shrinkClamp);
+
+ public:
+
+ class Edge
+ {
+ private:
+ int next;
+ int reverse;
+ int targetVertex;
+
+ friend class btConvexHullComputer;
+
+ public:
+ int getSourceVertex() const
+ {
+ return (this + reverse)->targetVertex;
+ }
+
+ int getTargetVertex() const
+ {
+ return targetVertex;
+ }
+
+ const Edge* getNextEdgeOfVertex() const // counter-clockwise list of all edges of a vertex
+ {
+ return this + next;
+ }
+
+ const Edge* getNextEdgeOfFace() const // clockwise list of all edges of a face
+ {
+ return (this + reverse)->getNextEdgeOfVertex();
+ }
+
+ const Edge* getReverseEdge() const
+ {
+ return this + reverse;
+ }
+ };
+
+
+ // Vertices of the output hull
+ btAlignedObjectArray<btVector3> vertices;
+
+ // Edges of the output hull
+ btAlignedObjectArray<Edge> edges;
+
+ // Faces of the convex hull. Each entry is an index into the "edges" array pointing to an edge of the face. Faces are planar n-gons
+ btAlignedObjectArray<int> faces;
+
+ /*
+ Compute convex hull of "count" vertices stored in "coords". "stride" is the difference in bytes
+ between the addresses of consecutive vertices. If "shrink" is positive, the convex hull is shrunken
+ by that amount (each face is moved by "shrink" length units towards the center along its normal).
+ If "shrinkClamp" is positive, "shrink" is clamped to not exceed "shrinkClamp * innerRadius", where "innerRadius"
+ is the minimum distance of a face to the center of the convex hull.
+
+ The returned value is the amount by which the hull has been shrunken. If it is negative, the amount was so large
+ that the resulting convex hull is empty.
+
+ The output convex hull can be found in the member variables "vertices", "edges", "faces".
+ */
+ btScalar compute(const float* coords, int stride, int count, btScalar shrink, btScalar shrinkClamp)
+ {
+ return compute(coords, false, stride, count, shrink, shrinkClamp);
+ }
+
+ // same as above, but double precision
+ btScalar compute(const double* coords, int stride, int count, btScalar shrink, btScalar shrinkClamp)
+ {
+ return compute(coords, true, stride, count, shrink, shrinkClamp);
+ }
+};
+
+
+#endif //BT_CONVEX_HULL_COMPUTER_H
+
diff --git a/tests/bullet/src/LinearMath/btDefaultMotionState.h b/tests/bullet/src/LinearMath/btDefaultMotionState.h
new file mode 100644
index 00000000..a6b7ef15
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btDefaultMotionState.h
@@ -0,0 +1,40 @@
+#ifndef BT_DEFAULT_MOTION_STATE_H
+#define BT_DEFAULT_MOTION_STATE_H
+
+#include "btMotionState.h"
+
+///The btDefaultMotionState provides a common implementation to synchronize world transforms with offsets.
+struct btDefaultMotionState : public btMotionState
+{
+ btTransform m_graphicsWorldTrans;
+ btTransform m_centerOfMassOffset;
+ btTransform m_startWorldTrans;
+ void* m_userPointer;
+
+ btDefaultMotionState(const btTransform& startTrans = btTransform::getIdentity(),const btTransform& centerOfMassOffset = btTransform::getIdentity())
+ : m_graphicsWorldTrans(startTrans),
+ m_centerOfMassOffset(centerOfMassOffset),
+ m_startWorldTrans(startTrans),
+ m_userPointer(0)
+
+ {
+ }
+
+ ///synchronizes world transform from user to physics
+ virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) const
+ {
+ centerOfMassWorldTrans = m_centerOfMassOffset.inverse() * m_graphicsWorldTrans ;
+ }
+
+ ///synchronizes world transform from physics to user
+ ///Bullet only calls the update of worldtransform for active objects
+ virtual void setWorldTransform(const btTransform& centerOfMassWorldTrans)
+ {
+ m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset ;
+ }
+
+
+
+};
+
+#endif //BT_DEFAULT_MOTION_STATE_H
diff --git a/tests/bullet/src/LinearMath/btGeometryUtil.cpp b/tests/bullet/src/LinearMath/btGeometryUtil.cpp
new file mode 100644
index 00000000..5ac230f7
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btGeometryUtil.cpp
@@ -0,0 +1,185 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#include "btGeometryUtil.h"
+
+
+/*
+ Make sure this dummy function never changes so that it
+ can be used by probes that are checking whether the
+ library is actually installed.
+*/
+extern "C"
+{
+ void btBulletMathProbe ();
+
+ void btBulletMathProbe () {}
+}
+
+
+bool btGeometryUtil::isPointInsidePlanes(const btAlignedObjectArray<btVector3>& planeEquations, const btVector3& point, btScalar margin)
+{
+ int numbrushes = planeEquations.size();
+ for (int i=0;i<numbrushes;i++)
+ {
+ const btVector3& N1 = planeEquations[i];
+ btScalar dist = btScalar(N1.dot(point))+btScalar(N1[3])-margin;
+ if (dist>btScalar(0.))
+ {
+ return false;
+ }
+ }
+ return true;
+
+}
+
+
+bool btGeometryUtil::areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray<btVector3>& vertices, btScalar margin)
+{
+ int numvertices = vertices.size();
+ for (int i=0;i<numvertices;i++)
+ {
+ const btVector3& N1 = vertices[i];
+ btScalar dist = btScalar(planeNormal.dot(N1))+btScalar(planeNormal[3])-margin;
+ if (dist>btScalar(0.))
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+bool notExist(const btVector3& planeEquation,const btAlignedObjectArray<btVector3>& planeEquations);
+
+bool notExist(const btVector3& planeEquation,const btAlignedObjectArray<btVector3>& planeEquations)
+{
+ int numbrushes = planeEquations.size();
+ for (int i=0;i<numbrushes;i++)
+ {
+ const btVector3& N1 = planeEquations[i];
+ if (planeEquation.dot(N1) > btScalar(0.999))
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+void btGeometryUtil::getPlaneEquationsFromVertices(btAlignedObjectArray<btVector3>& vertices, btAlignedObjectArray<btVector3>& planeEquationsOut )
+{
+ const int numvertices = vertices.size();
+ // brute force:
+ for (int i=0;i<numvertices;i++)
+ {
+ const btVector3& N1 = vertices[i];
+
+
+ for (int j=i+1;j<numvertices;j++)
+ {
+ const btVector3& N2 = vertices[j];
+
+ for (int k=j+1;k<numvertices;k++)
+ {
+
+ const btVector3& N3 = vertices[k];
+
+ btVector3 planeEquation,edge0,edge1;
+ edge0 = N2-N1;
+ edge1 = N3-N1;
+ btScalar normalSign = btScalar(1.);
+ for (int ww=0;ww<2;ww++)
+ {
+ planeEquation = normalSign * edge0.cross(edge1);
+ if (planeEquation.length2() > btScalar(0.0001))
+ {
+ planeEquation.normalize();
+ if (notExist(planeEquation,planeEquationsOut))
+ {
+ planeEquation[3] = -planeEquation.dot(N1);
+
+ //check if inside, and replace supportingVertexOut if needed
+ if (areVerticesBehindPlane(planeEquation,vertices,btScalar(0.01)))
+ {
+ planeEquationsOut.push_back(planeEquation);
+ }
+ }
+ }
+ normalSign = btScalar(-1.);
+ }
+
+ }
+ }
+ }
+
+}
+
+void btGeometryUtil::getVerticesFromPlaneEquations(const btAlignedObjectArray<btVector3>& planeEquations , btAlignedObjectArray<btVector3>& verticesOut )
+{
+ const int numbrushes = planeEquations.size();
+ // brute force:
+ for (int i=0;i<numbrushes;i++)
+ {
+ const btVector3& N1 = planeEquations[i];
+
+
+ for (int j=i+1;j<numbrushes;j++)
+ {
+ const btVector3& N2 = planeEquations[j];
+
+ for (int k=j+1;k<numbrushes;k++)
+ {
+
+ const btVector3& N3 = planeEquations[k];
+
+ btVector3 n2n3; n2n3 = N2.cross(N3);
+ btVector3 n3n1; n3n1 = N3.cross(N1);
+ btVector3 n1n2; n1n2 = N1.cross(N2);
+
+ if ( ( n2n3.length2() > btScalar(0.0001) ) &&
+ ( n3n1.length2() > btScalar(0.0001) ) &&
+ ( n1n2.length2() > btScalar(0.0001) ) )
+ {
+ //point P out of 3 plane equations:
+
+ // d1 ( N2 * N3 ) + d2 ( N3 * N1 ) + d3 ( N1 * N2 )
+ //P = -------------------------------------------------------------------------
+ // N1 . ( N2 * N3 )
+
+
+ btScalar quotient = (N1.dot(n2n3));
+ if (btFabs(quotient) > btScalar(0.000001))
+ {
+ quotient = btScalar(-1.) / quotient;
+ n2n3 *= N1[3];
+ n3n1 *= N2[3];
+ n1n2 *= N3[3];
+ btVector3 potentialVertex = n2n3;
+ potentialVertex += n3n1;
+ potentialVertex += n1n2;
+ potentialVertex *= quotient;
+
+ //check if inside, and replace supportingVertexOut if needed
+ if (isPointInsidePlanes(planeEquations,potentialVertex,btScalar(0.01)))
+ {
+ verticesOut.push_back(potentialVertex);
+ }
+ }
+ }
+ }
+ }
+ }
+}
+
diff --git a/tests/bullet/src/LinearMath/btGeometryUtil.h b/tests/bullet/src/LinearMath/btGeometryUtil.h
new file mode 100644
index 00000000..a4b13b45
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btGeometryUtil.h
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_GEOMETRY_UTIL_H
+#define BT_GEOMETRY_UTIL_H
+
+#include "btVector3.h"
+#include "btAlignedObjectArray.h"
+
+///The btGeometryUtil helper class provides a few methods to convert between plane equations and vertices.
+class btGeometryUtil
+{
+ public:
+
+
+ static void getPlaneEquationsFromVertices(btAlignedObjectArray<btVector3>& vertices, btAlignedObjectArray<btVector3>& planeEquationsOut );
+
+ static void getVerticesFromPlaneEquations(const btAlignedObjectArray<btVector3>& planeEquations , btAlignedObjectArray<btVector3>& verticesOut );
+
+ static bool isInside(const btAlignedObjectArray<btVector3>& vertices, const btVector3& planeNormal, btScalar margin);
+
+ static bool isPointInsidePlanes(const btAlignedObjectArray<btVector3>& planeEquations, const btVector3& point, btScalar margin);
+
+ static bool areVerticesBehindPlane(const btVector3& planeNormal, const btAlignedObjectArray<btVector3>& vertices, btScalar margin);
+
+};
+
+
+#endif //BT_GEOMETRY_UTIL_H
+
diff --git a/tests/bullet/src/LinearMath/btHashMap.h b/tests/bullet/src/LinearMath/btHashMap.h
new file mode 100644
index 00000000..ce07db3a
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btHashMap.h
@@ -0,0 +1,450 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_HASH_MAP_H
+#define BT_HASH_MAP_H
+
+#include "btAlignedObjectArray.h"
+
+///very basic hashable string implementation, compatible with btHashMap
+struct btHashString
+{
+ const char* m_string;
+ unsigned int m_hash;
+
+ SIMD_FORCE_INLINE unsigned int getHash()const
+ {
+ return m_hash;
+ }
+
+ btHashString(const char* name)
+ :m_string(name)
+ {
+ /* magic numbers from http://www.isthe.com/chongo/tech/comp/fnv/ */
+ static const unsigned int InitialFNV = 2166136261u;
+ static const unsigned int FNVMultiple = 16777619u;
+
+ /* Fowler / Noll / Vo (FNV) Hash */
+ unsigned int hash = InitialFNV;
+
+ for(int i = 0; m_string[i]; i++)
+ {
+ hash = hash ^ (m_string[i]); /* xor the low 8 bits */
+ hash = hash * FNVMultiple; /* multiply by the magic number */
+ }
+ m_hash = hash;
+ }
+
+ int portableStringCompare(const char* src, const char* dst) const
+ {
+ int ret = 0 ;
+
+ while( ! (ret = *(unsigned char *)src - *(unsigned char *)dst) && *dst)
+ ++src, ++dst;
+
+ if ( ret < 0 )
+ ret = -1 ;
+ else if ( ret > 0 )
+ ret = 1 ;
+
+ return( ret );
+ }
+
+ bool equals(const btHashString& other) const
+ {
+ return (m_string == other.m_string) ||
+ (0==portableStringCompare(m_string,other.m_string));
+
+ }
+
+};
+
+const int BT_HASH_NULL=0xffffffff;
+
+
+class btHashInt
+{
+ int m_uid;
+public:
+ btHashInt(int uid) :m_uid(uid)
+ {
+ }
+
+ int getUid1() const
+ {
+ return m_uid;
+ }
+
+ void setUid1(int uid)
+ {
+ m_uid = uid;
+ }
+
+ bool equals(const btHashInt& other) const
+ {
+ return getUid1() == other.getUid1();
+ }
+ //to our success
+ SIMD_FORCE_INLINE unsigned int getHash()const
+ {
+ int key = m_uid;
+ // Thomas Wang's hash
+ key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
+ return key;
+ }
+};
+
+
+
+class btHashPtr
+{
+
+ union
+ {
+ const void* m_pointer;
+ int m_hashValues[2];
+ };
+
+public:
+
+ btHashPtr(const void* ptr)
+ :m_pointer(ptr)
+ {
+ }
+
+ const void* getPointer() const
+ {
+ return m_pointer;
+ }
+
+ bool equals(const btHashPtr& other) const
+ {
+ return getPointer() == other.getPointer();
+ }
+
+ //to our success
+ SIMD_FORCE_INLINE unsigned int getHash()const
+ {
+ const bool VOID_IS_8 = ((sizeof(void*)==8));
+
+ int key = VOID_IS_8? m_hashValues[0]+m_hashValues[1] : m_hashValues[0];
+
+ // Thomas Wang's hash
+ key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
+ return key;
+ }
+
+
+};
+
+
+template <class Value>
+class btHashKeyPtr
+{
+ int m_uid;
+public:
+
+ btHashKeyPtr(int uid) :m_uid(uid)
+ {
+ }
+
+ int getUid1() const
+ {
+ return m_uid;
+ }
+
+ bool equals(const btHashKeyPtr<Value>& other) const
+ {
+ return getUid1() == other.getUid1();
+ }
+
+ //to our success
+ SIMD_FORCE_INLINE unsigned int getHash()const
+ {
+ int key = m_uid;
+ // Thomas Wang's hash
+ key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
+ return key;
+ }
+
+
+};
+
+
+template <class Value>
+class btHashKey
+{
+ int m_uid;
+public:
+
+ btHashKey(int uid) :m_uid(uid)
+ {
+ }
+
+ int getUid1() const
+ {
+ return m_uid;
+ }
+
+ bool equals(const btHashKey<Value>& other) const
+ {
+ return getUid1() == other.getUid1();
+ }
+ //to our success
+ SIMD_FORCE_INLINE unsigned int getHash()const
+ {
+ int key = m_uid;
+ // Thomas Wang's hash
+ key += ~(key << 15); key ^= (key >> 10); key += (key << 3); key ^= (key >> 6); key += ~(key << 11); key ^= (key >> 16);
+ return key;
+ }
+};
+
+
+///The btHashMap template class implements a generic and lightweight hashmap.
+///A basic sample of how to use btHashMap is located in Demos\BasicDemo\main.cpp
+template <class Key, class Value>
+class btHashMap
+{
+
+protected:
+ btAlignedObjectArray<int> m_hashTable;
+ btAlignedObjectArray<int> m_next;
+
+ btAlignedObjectArray<Value> m_valueArray;
+ btAlignedObjectArray<Key> m_keyArray;
+
+ void growTables(const Key& /*key*/)
+ {
+ int newCapacity = m_valueArray.capacity();
+
+ if (m_hashTable.size() < newCapacity)
+ {
+ //grow hashtable and next table
+ int curHashtableSize = m_hashTable.size();
+
+ m_hashTable.resize(newCapacity);
+ m_next.resize(newCapacity);
+
+ int i;
+
+ for (i= 0; i < newCapacity; ++i)
+ {
+ m_hashTable[i] = BT_HASH_NULL;
+ }
+ for (i = 0; i < newCapacity; ++i)
+ {
+ m_next[i] = BT_HASH_NULL;
+ }
+
+ for(i=0;i<curHashtableSize;i++)
+ {
+ //const Value& value = m_valueArray[i];
+ //const Key& key = m_keyArray[i];
+
+ int hashValue = m_keyArray[i].getHash() & (m_valueArray.capacity()-1); // New hash value with new mask
+ m_next[i] = m_hashTable[hashValue];
+ m_hashTable[hashValue] = i;
+ }
+
+
+ }
+ }
+
+ public:
+
+ void insert(const Key& key, const Value& value) {
+ int hash = key.getHash() & (m_valueArray.capacity()-1);
+
+ //replace value if the key is already there
+ int index = findIndex(key);
+ if (index != BT_HASH_NULL)
+ {
+ m_valueArray[index]=value;
+ return;
+ }
+
+ int count = m_valueArray.size();
+ int oldCapacity = m_valueArray.capacity();
+ m_valueArray.push_back(value);
+ m_keyArray.push_back(key);
+
+ int newCapacity = m_valueArray.capacity();
+ if (oldCapacity < newCapacity)
+ {
+ growTables(key);
+ //hash with new capacity
+ hash = key.getHash() & (m_valueArray.capacity()-1);
+ }
+ m_next[count] = m_hashTable[hash];
+ m_hashTable[hash] = count;
+ }
+
+ void remove(const Key& key) {
+
+ int hash = key.getHash() & (m_valueArray.capacity()-1);
+
+ int pairIndex = findIndex(key);
+
+ if (pairIndex ==BT_HASH_NULL)
+ {
+ return;
+ }
+
+ // Remove the pair from the hash table.
+ int index = m_hashTable[hash];
+ btAssert(index != BT_HASH_NULL);
+
+ int previous = BT_HASH_NULL;
+ while (index != pairIndex)
+ {
+ previous = index;
+ index = m_next[index];
+ }
+
+ if (previous != BT_HASH_NULL)
+ {
+ btAssert(m_next[previous] == pairIndex);
+ m_next[previous] = m_next[pairIndex];
+ }
+ else
+ {
+ m_hashTable[hash] = m_next[pairIndex];
+ }
+
+ // We now move the last pair into spot of the
+ // pair being removed. We need to fix the hash
+ // table indices to support the move.
+
+ int lastPairIndex = m_valueArray.size() - 1;
+
+ // If the removed pair is the last pair, we are done.
+ if (lastPairIndex == pairIndex)
+ {
+ m_valueArray.pop_back();
+ m_keyArray.pop_back();
+ return;
+ }
+
+ // Remove the last pair from the hash table.
+ int lastHash = m_keyArray[lastPairIndex].getHash() & (m_valueArray.capacity()-1);
+
+ index = m_hashTable[lastHash];
+ btAssert(index != BT_HASH_NULL);
+
+ previous = BT_HASH_NULL;
+ while (index != lastPairIndex)
+ {
+ previous = index;
+ index = m_next[index];
+ }
+
+ if (previous != BT_HASH_NULL)
+ {
+ btAssert(m_next[previous] == lastPairIndex);
+ m_next[previous] = m_next[lastPairIndex];
+ }
+ else
+ {
+ m_hashTable[lastHash] = m_next[lastPairIndex];
+ }
+
+ // Copy the last pair into the remove pair's spot.
+ m_valueArray[pairIndex] = m_valueArray[lastPairIndex];
+ m_keyArray[pairIndex] = m_keyArray[lastPairIndex];
+
+ // Insert the last pair into the hash table
+ m_next[pairIndex] = m_hashTable[lastHash];
+ m_hashTable[lastHash] = pairIndex;
+
+ m_valueArray.pop_back();
+ m_keyArray.pop_back();
+
+ }
+
+
+ int size() const
+ {
+ return m_valueArray.size();
+ }
+
+ const Value* getAtIndex(int index) const
+ {
+ btAssert(index < m_valueArray.size());
+
+ return &m_valueArray[index];
+ }
+
+ Value* getAtIndex(int index)
+ {
+ btAssert(index < m_valueArray.size());
+
+ return &m_valueArray[index];
+ }
+
+ Value* operator[](const Key& key) {
+ return find(key);
+ }
+
+ const Value* find(const Key& key) const
+ {
+ int index = findIndex(key);
+ if (index == BT_HASH_NULL)
+ {
+ return NULL;
+ }
+ return &m_valueArray[index];
+ }
+
+ Value* find(const Key& key)
+ {
+ int index = findIndex(key);
+ if (index == BT_HASH_NULL)
+ {
+ return NULL;
+ }
+ return &m_valueArray[index];
+ }
+
+
+ int findIndex(const Key& key) const
+ {
+ unsigned int hash = key.getHash() & (m_valueArray.capacity()-1);
+
+ if (hash >= (unsigned int)m_hashTable.size())
+ {
+ return BT_HASH_NULL;
+ }
+
+ int index = m_hashTable[hash];
+ while ((index != BT_HASH_NULL) && key.equals(m_keyArray[index]) == false)
+ {
+ index = m_next[index];
+ }
+ return index;
+ }
+
+ void clear()
+ {
+ m_hashTable.clear();
+ m_next.clear();
+ m_valueArray.clear();
+ m_keyArray.clear();
+ }
+
+};
+
+#endif //BT_HASH_MAP_H
diff --git a/tests/bullet/src/LinearMath/btIDebugDraw.h b/tests/bullet/src/LinearMath/btIDebugDraw.h
new file mode 100644
index 00000000..882514e9
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btIDebugDraw.h
@@ -0,0 +1,417 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_IDEBUG_DRAW__H
+#define BT_IDEBUG_DRAW__H
+
+#include "btVector3.h"
+#include "btTransform.h"
+
+
+///The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
+///Typical use case: create a debug drawer object, and assign it to a btCollisionWorld or btDynamicsWorld using setDebugDrawer and call debugDrawWorld.
+///A class that implements the btIDebugDraw interface has to implement the drawLine method at a minimum.
+///For color arguments the X,Y,Z components refer to Red, Green and Blue each in the range [0..1]
+class btIDebugDraw
+{
+ public:
+
+ enum DebugDrawModes
+ {
+ DBG_NoDebug=0,
+ DBG_DrawWireframe = 1,
+ DBG_DrawAabb=2,
+ DBG_DrawFeaturesText=4,
+ DBG_DrawContactPoints=8,
+ DBG_NoDeactivation=16,
+ DBG_NoHelpText = 32,
+ DBG_DrawText=64,
+ DBG_ProfileTimings = 128,
+ DBG_EnableSatComparison = 256,
+ DBG_DisableBulletLCP = 512,
+ DBG_EnableCCD = 1024,
+ DBG_DrawConstraints = (1 << 11),
+ DBG_DrawConstraintLimits = (1 << 12),
+ DBG_FastWireframe = (1<<13),
+ DBG_MAX_DEBUG_DRAW_MODE
+ };
+
+ virtual ~btIDebugDraw() {};
+
+ virtual void drawLine(const btVector3& from,const btVector3& to,const btVector3& color)=0;
+
+ virtual void drawLine(const btVector3& from,const btVector3& to, const btVector3& fromColor, const btVector3& toColor)
+ {
+ (void) toColor;
+ drawLine (from, to, fromColor);
+ }
+
+ virtual void drawSphere(btScalar radius, const btTransform& transform, const btVector3& color)
+ {
+ btVector3 start = transform.getOrigin();
+
+ const btVector3 xoffs = transform.getBasis() * btVector3(radius,0,0);
+ const btVector3 yoffs = transform.getBasis() * btVector3(0,radius,0);
+ const btVector3 zoffs = transform.getBasis() * btVector3(0,0,radius);
+
+ // XY
+ drawLine(start-xoffs, start+yoffs, color);
+ drawLine(start+yoffs, start+xoffs, color);
+ drawLine(start+xoffs, start-yoffs, color);
+ drawLine(start-yoffs, start-xoffs, color);
+
+ // XZ
+ drawLine(start-xoffs, start+zoffs, color);
+ drawLine(start+zoffs, start+xoffs, color);
+ drawLine(start+xoffs, start-zoffs, color);
+ drawLine(start-zoffs, start-xoffs, color);
+
+ // YZ
+ drawLine(start-yoffs, start+zoffs, color);
+ drawLine(start+zoffs, start+yoffs, color);
+ drawLine(start+yoffs, start-zoffs, color);
+ drawLine(start-zoffs, start-yoffs, color);
+ }
+
+ virtual void drawSphere (const btVector3& p, btScalar radius, const btVector3& color)
+ {
+ btTransform tr;
+ tr.setIdentity();
+ tr.setOrigin(p);
+ drawSphere(radius,tr,color);
+ }
+
+ virtual void drawTriangle(const btVector3& v0,const btVector3& v1,const btVector3& v2,const btVector3& /*n0*/,const btVector3& /*n1*/,const btVector3& /*n2*/,const btVector3& color, btScalar alpha)
+ {
+ drawTriangle(v0,v1,v2,color,alpha);
+ }
+ virtual void drawTriangle(const btVector3& v0,const btVector3& v1,const btVector3& v2,const btVector3& color, btScalar /*alpha*/)
+ {
+ drawLine(v0,v1,color);
+ drawLine(v1,v2,color);
+ drawLine(v2,v0,color);
+ }
+
+ virtual void drawContactPoint(const btVector3& PointOnB,const btVector3& normalOnB,btScalar distance,int lifeTime,const btVector3& color)=0;
+
+ virtual void reportErrorWarning(const char* warningString) = 0;
+
+ virtual void draw3dText(const btVector3& location,const char* textString) = 0;
+
+ virtual void setDebugMode(int debugMode) =0;
+
+ virtual int getDebugMode() const = 0;
+
+ virtual void drawAabb(const btVector3& from,const btVector3& to,const btVector3& color)
+ {
+
+ btVector3 halfExtents = (to-from)* 0.5f;
+ btVector3 center = (to+from) *0.5f;
+ int i,j;
+
+ btVector3 edgecoord(1.f,1.f,1.f),pa,pb;
+ for (i=0;i<4;i++)
+ {
+ for (j=0;j<3;j++)
+ {
+ pa = btVector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1],
+ edgecoord[2]*halfExtents[2]);
+ pa+=center;
+
+ int othercoord = j%3;
+ edgecoord[othercoord]*=-1.f;
+ pb = btVector3(edgecoord[0]*halfExtents[0], edgecoord[1]*halfExtents[1],
+ edgecoord[2]*halfExtents[2]);
+ pb+=center;
+
+ drawLine(pa,pb,color);
+ }
+ edgecoord = btVector3(-1.f,-1.f,-1.f);
+ if (i<3)
+ edgecoord[i]*=-1.f;
+ }
+ }
+ virtual void drawTransform(const btTransform& transform, btScalar orthoLen)
+ {
+ btVector3 start = transform.getOrigin();
+ drawLine(start, start+transform.getBasis() * btVector3(orthoLen, 0, 0), btVector3(0.7f,0,0));
+ drawLine(start, start+transform.getBasis() * btVector3(0, orthoLen, 0), btVector3(0,0.7f,0));
+ drawLine(start, start+transform.getBasis() * btVector3(0, 0, orthoLen), btVector3(0,0,0.7f));
+ }
+
+ virtual void drawArc(const btVector3& center, const btVector3& normal, const btVector3& axis, btScalar radiusA, btScalar radiusB, btScalar minAngle, btScalar maxAngle,
+ const btVector3& color, bool drawSect, btScalar stepDegrees = btScalar(10.f))
+ {
+ const btVector3& vx = axis;
+ btVector3 vy = normal.cross(axis);
+ btScalar step = stepDegrees * SIMD_RADS_PER_DEG;
+ int nSteps = (int)((maxAngle - minAngle) / step);
+ if(!nSteps) nSteps = 1;
+ btVector3 prev = center + radiusA * vx * btCos(minAngle) + radiusB * vy * btSin(minAngle);
+ if(drawSect)
+ {
+ drawLine(center, prev, color);
+ }
+ for(int i = 1; i <= nSteps; i++)
+ {
+ btScalar angle = minAngle + (maxAngle - minAngle) * btScalar(i) / btScalar(nSteps);
+ btVector3 next = center + radiusA * vx * btCos(angle) + radiusB * vy * btSin(angle);
+ drawLine(prev, next, color);
+ prev = next;
+ }
+ if(drawSect)
+ {
+ drawLine(center, prev, color);
+ }
+ }
+ virtual void drawSpherePatch(const btVector3& center, const btVector3& up, const btVector3& axis, btScalar radius,
+ btScalar minTh, btScalar maxTh, btScalar minPs, btScalar maxPs, const btVector3& color, btScalar stepDegrees = btScalar(10.f))
+ {
+ btVector3 vA[74];
+ btVector3 vB[74];
+ btVector3 *pvA = vA, *pvB = vB, *pT;
+ btVector3 npole = center + up * radius;
+ btVector3 spole = center - up * radius;
+ btVector3 arcStart;
+ btScalar step = stepDegrees * SIMD_RADS_PER_DEG;
+ const btVector3& kv = up;
+ const btVector3& iv = axis;
+ btVector3 jv = kv.cross(iv);
+ bool drawN = false;
+ bool drawS = false;
+ if(minTh <= -SIMD_HALF_PI)
+ {
+ minTh = -SIMD_HALF_PI + step;
+ drawN = true;
+ }
+ if(maxTh >= SIMD_HALF_PI)
+ {
+ maxTh = SIMD_HALF_PI - step;
+ drawS = true;
+ }
+ if(minTh > maxTh)
+ {
+ minTh = -SIMD_HALF_PI + step;
+ maxTh = SIMD_HALF_PI - step;
+ drawN = drawS = true;
+ }
+ int n_hor = (int)((maxTh - minTh) / step) + 1;
+ if(n_hor < 2) n_hor = 2;
+ btScalar step_h = (maxTh - minTh) / btScalar(n_hor - 1);
+ bool isClosed = false;
+ if(minPs > maxPs)
+ {
+ minPs = -SIMD_PI + step;
+ maxPs = SIMD_PI;
+ isClosed = true;
+ }
+ else if((maxPs - minPs) >= SIMD_PI * btScalar(2.f))
+ {
+ isClosed = true;
+ }
+ else
+ {
+ isClosed = false;
+ }
+ int n_vert = (int)((maxPs - minPs) / step) + 1;
+ if(n_vert < 2) n_vert = 2;
+ btScalar step_v = (maxPs - minPs) / btScalar(n_vert - 1);
+ for(int i = 0; i < n_hor; i++)
+ {
+ btScalar th = minTh + btScalar(i) * step_h;
+ btScalar sth = radius * btSin(th);
+ btScalar cth = radius * btCos(th);
+ for(int j = 0; j < n_vert; j++)
+ {
+ btScalar psi = minPs + btScalar(j) * step_v;
+ btScalar sps = btSin(psi);
+ btScalar cps = btCos(psi);
+ pvB[j] = center + cth * cps * iv + cth * sps * jv + sth * kv;
+ if(i)
+ {
+ drawLine(pvA[j], pvB[j], color);
+ }
+ else if(drawS)
+ {
+ drawLine(spole, pvB[j], color);
+ }
+ if(j)
+ {
+ drawLine(pvB[j-1], pvB[j], color);
+ }
+ else
+ {
+ arcStart = pvB[j];
+ }
+ if((i == (n_hor - 1)) && drawN)
+ {
+ drawLine(npole, pvB[j], color);
+ }
+ if(isClosed)
+ {
+ if(j == (n_vert-1))
+ {
+ drawLine(arcStart, pvB[j], color);
+ }
+ }
+ else
+ {
+ if(((!i) || (i == (n_hor-1))) && ((!j) || (j == (n_vert-1))))
+ {
+ drawLine(center, pvB[j], color);
+ }
+ }
+ }
+ pT = pvA; pvA = pvB; pvB = pT;
+ }
+ }
+
+ virtual void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btVector3& color)
+ {
+ drawLine(btVector3(bbMin[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMin[1], bbMin[2]), color);
+ drawLine(btVector3(bbMax[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMax[1], bbMin[2]), color);
+ drawLine(btVector3(bbMax[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMax[1], bbMin[2]), color);
+ drawLine(btVector3(bbMin[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMin[1], bbMin[2]), color);
+ drawLine(btVector3(bbMin[0], bbMin[1], bbMin[2]), btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
+ drawLine(btVector3(bbMax[0], bbMin[1], bbMin[2]), btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
+ drawLine(btVector3(bbMax[0], bbMax[1], bbMin[2]), btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
+ drawLine(btVector3(bbMin[0], bbMax[1], bbMin[2]), btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
+ drawLine(btVector3(bbMin[0], bbMin[1], bbMax[2]), btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
+ drawLine(btVector3(bbMax[0], bbMin[1], bbMax[2]), btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
+ drawLine(btVector3(bbMax[0], bbMax[1], bbMax[2]), btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
+ drawLine(btVector3(bbMin[0], bbMax[1], bbMax[2]), btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
+ }
+ virtual void drawBox(const btVector3& bbMin, const btVector3& bbMax, const btTransform& trans, const btVector3& color)
+ {
+ drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), color);
+ drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), color);
+ drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), color);
+ drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), color);
+ drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMin[2]), trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
+ drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMin[2]), trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
+ drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMin[2]), trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
+ drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMin[2]), trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
+ drawLine(trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), color);
+ drawLine(trans * btVector3(bbMax[0], bbMin[1], bbMax[2]), trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), color);
+ drawLine(trans * btVector3(bbMax[0], bbMax[1], bbMax[2]), trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), color);
+ drawLine(trans * btVector3(bbMin[0], bbMax[1], bbMax[2]), trans * btVector3(bbMin[0], bbMin[1], bbMax[2]), color);
+ }
+
+ virtual void drawCapsule(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color)
+ {
+ btVector3 capStart(0.f,0.f,0.f);
+ capStart[upAxis] = -halfHeight;
+
+ btVector3 capEnd(0.f,0.f,0.f);
+ capEnd[upAxis] = halfHeight;
+
+ // Draw the ends
+ {
+
+ btTransform childTransform = transform;
+ childTransform.getOrigin() = transform * capStart;
+ drawSphere(radius, childTransform, color);
+ }
+
+ {
+ btTransform childTransform = transform;
+ childTransform.getOrigin() = transform * capEnd;
+ drawSphere(radius, childTransform, color);
+ }
+
+ // Draw some additional lines
+ btVector3 start = transform.getOrigin();
+
+ capStart[(upAxis+1)%3] = radius;
+ capEnd[(upAxis+1)%3] = radius;
+ drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
+ capStart[(upAxis+1)%3] = -radius;
+ capEnd[(upAxis+1)%3] = -radius;
+ drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
+
+ capStart[(upAxis+1)%3] = 0.f;
+ capEnd[(upAxis+1)%3] = 0.f;
+
+ capStart[(upAxis+2)%3] = radius;
+ capEnd[(upAxis+2)%3] = radius;
+ drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
+ capStart[(upAxis+2)%3] = -radius;
+ capEnd[(upAxis+2)%3] = -radius;
+ drawLine(start+transform.getBasis() * capStart,start+transform.getBasis() * capEnd, color);
+ }
+
+ virtual void drawCylinder(btScalar radius, btScalar halfHeight, int upAxis, const btTransform& transform, const btVector3& color)
+ {
+ btVector3 start = transform.getOrigin();
+ btVector3 offsetHeight(0,0,0);
+ offsetHeight[upAxis] = halfHeight;
+ btVector3 offsetRadius(0,0,0);
+ offsetRadius[(upAxis+1)%3] = radius;
+ drawLine(start+transform.getBasis() * (offsetHeight+offsetRadius),start+transform.getBasis() * (-offsetHeight+offsetRadius),color);
+ drawLine(start+transform.getBasis() * (offsetHeight-offsetRadius),start+transform.getBasis() * (-offsetHeight-offsetRadius),color);
+
+ // Drawing top and bottom caps of the cylinder
+ btVector3 yaxis(0,0,0);
+ yaxis[upAxis] = btScalar(1.0);
+ btVector3 xaxis(0,0,0);
+ xaxis[(upAxis+1)%3] = btScalar(1.0);
+ drawArc(start-transform.getBasis()*(offsetHeight),transform.getBasis()*yaxis,transform.getBasis()*xaxis,radius,radius,0,SIMD_2_PI,color,false,btScalar(10.0));
+ drawArc(start+transform.getBasis()*(offsetHeight),transform.getBasis()*yaxis,transform.getBasis()*xaxis,radius,radius,0,SIMD_2_PI,color,false,btScalar(10.0));
+ }
+
+ virtual void drawCone(btScalar radius, btScalar height, int upAxis, const btTransform& transform, const btVector3& color)
+ {
+
+ btVector3 start = transform.getOrigin();
+
+ btVector3 offsetHeight(0,0,0);
+ offsetHeight[upAxis] = height * btScalar(0.5);
+ btVector3 offsetRadius(0,0,0);
+ offsetRadius[(upAxis+1)%3] = radius;
+ btVector3 offset2Radius(0,0,0);
+ offset2Radius[(upAxis+2)%3] = radius;
+
+ drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * (-offsetHeight+offsetRadius),color);
+ drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * (-offsetHeight-offsetRadius),color);
+ drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * (-offsetHeight+offset2Radius),color);
+ drawLine(start+transform.getBasis() * (offsetHeight),start+transform.getBasis() * (-offsetHeight-offset2Radius),color);
+
+ // Drawing the base of the cone
+ btVector3 yaxis(0,0,0);
+ yaxis[upAxis] = btScalar(1.0);
+ btVector3 xaxis(0,0,0);
+ xaxis[(upAxis+1)%3] = btScalar(1.0);
+ drawArc(start-transform.getBasis()*(offsetHeight),transform.getBasis()*yaxis,transform.getBasis()*xaxis,radius,radius,0,SIMD_2_PI,color,false,10.0);
+ }
+
+ virtual void drawPlane(const btVector3& planeNormal, btScalar planeConst, const btTransform& transform, const btVector3& color)
+ {
+ btVector3 planeOrigin = planeNormal * planeConst;
+ btVector3 vec0,vec1;
+ btPlaneSpace1(planeNormal,vec0,vec1);
+ btScalar vecLen = 100.f;
+ btVector3 pt0 = planeOrigin + vec0*vecLen;
+ btVector3 pt1 = planeOrigin - vec0*vecLen;
+ btVector3 pt2 = planeOrigin + vec1*vecLen;
+ btVector3 pt3 = planeOrigin - vec1*vecLen;
+ drawLine(transform*pt0,transform*pt1,color);
+ drawLine(transform*pt2,transform*pt3,color);
+ }
+};
+
+
+#endif //BT_IDEBUG_DRAW__H
+
diff --git a/tests/bullet/src/LinearMath/btList.h b/tests/bullet/src/LinearMath/btList.h
new file mode 100644
index 00000000..eec80a70
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btList.h
@@ -0,0 +1,73 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_GEN_LIST_H
+#define BT_GEN_LIST_H
+
+class btGEN_Link {
+public:
+ btGEN_Link() : m_next(0), m_prev(0) {}
+ btGEN_Link(btGEN_Link *next, btGEN_Link *prev) : m_next(next), m_prev(prev) {}
+
+ btGEN_Link *getNext() const { return m_next; }
+ btGEN_Link *getPrev() const { return m_prev; }
+
+ bool isHead() const { return m_prev == 0; }
+ bool isTail() const { return m_next == 0; }
+
+ void insertBefore(btGEN_Link *link) {
+ m_next = link;
+ m_prev = link->m_prev;
+ m_next->m_prev = this;
+ m_prev->m_next = this;
+ }
+
+ void insertAfter(btGEN_Link *link) {
+ m_next = link->m_next;
+ m_prev = link;
+ m_next->m_prev = this;
+ m_prev->m_next = this;
+ }
+
+ void remove() {
+ m_next->m_prev = m_prev;
+ m_prev->m_next = m_next;
+ }
+
+private:
+ btGEN_Link *m_next;
+ btGEN_Link *m_prev;
+};
+
+class btGEN_List {
+public:
+ btGEN_List() : m_head(&m_tail, 0), m_tail(0, &m_head) {}
+
+ btGEN_Link *getHead() const { return m_head.getNext(); }
+ btGEN_Link *getTail() const { return m_tail.getPrev(); }
+
+ void addHead(btGEN_Link *link) { link->insertAfter(&m_head); }
+ void addTail(btGEN_Link *link) { link->insertBefore(&m_tail); }
+
+private:
+ btGEN_Link m_head;
+ btGEN_Link m_tail;
+};
+
+#endif //BT_GEN_LIST_H
+
+
+
diff --git a/tests/bullet/src/LinearMath/btMatrix3x3.h b/tests/bullet/src/LinearMath/btMatrix3x3.h
new file mode 100644
index 00000000..d0234a04
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btMatrix3x3.h
@@ -0,0 +1,771 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_MATRIX3x3_H
+#define BT_MATRIX3x3_H
+
+#include "btVector3.h"
+#include "btQuaternion.h"
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btMatrix3x3Data btMatrix3x3DoubleData
+#else
+#define btMatrix3x3Data btMatrix3x3FloatData
+#endif //BT_USE_DOUBLE_PRECISION
+
+
+/**@brief The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with btQuaternion, btTransform and btVector3.
+* Make sure to only include a pure orthogonal matrix without scaling. */
+class btMatrix3x3 {
+
+ ///Data storage for the matrix, each vector is a row of the matrix
+ btVector3 m_el[3];
+
+public:
+ /** @brief No initializaion constructor */
+ btMatrix3x3 () {}
+
+ // explicit btMatrix3x3(const btScalar *m) { setFromOpenGLSubMatrix(m); }
+
+ /**@brief Constructor from Quaternion */
+ explicit btMatrix3x3(const btQuaternion& q) { setRotation(q); }
+ /*
+ template <typename btScalar>
+ Matrix3x3(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
+ {
+ setEulerYPR(yaw, pitch, roll);
+ }
+ */
+ /** @brief Constructor with row major formatting */
+ btMatrix3x3(const btScalar& xx, const btScalar& xy, const btScalar& xz,
+ const btScalar& yx, const btScalar& yy, const btScalar& yz,
+ const btScalar& zx, const btScalar& zy, const btScalar& zz)
+ {
+ setValue(xx, xy, xz,
+ yx, yy, yz,
+ zx, zy, zz);
+ }
+ /** @brief Copy constructor */
+ SIMD_FORCE_INLINE btMatrix3x3 (const btMatrix3x3& other)
+ {
+ m_el[0] = other.m_el[0];
+ m_el[1] = other.m_el[1];
+ m_el[2] = other.m_el[2];
+ }
+ /** @brief Assignment Operator */
+ SIMD_FORCE_INLINE btMatrix3x3& operator=(const btMatrix3x3& other)
+ {
+ m_el[0] = other.m_el[0];
+ m_el[1] = other.m_el[1];
+ m_el[2] = other.m_el[2];
+ return *this;
+ }
+
+ /** @brief Get a column of the matrix as a vector
+ * @param i Column number 0 indexed */
+ SIMD_FORCE_INLINE btVector3 getColumn(int i) const
+ {
+ return btVector3(m_el[0][i],m_el[1][i],m_el[2][i]);
+ }
+
+
+ /** @brief Get a row of the matrix as a vector
+ * @param i Row number 0 indexed */
+ SIMD_FORCE_INLINE const btVector3& getRow(int i) const
+ {
+ btFullAssert(0 <= i && i < 3);
+ return m_el[i];
+ }
+
+ /** @brief Get a mutable reference to a row of the matrix as a vector
+ * @param i Row number 0 indexed */
+ SIMD_FORCE_INLINE btVector3& operator[](int i)
+ {
+ btFullAssert(0 <= i && i < 3);
+ return m_el[i];
+ }
+
+ /** @brief Get a const reference to a row of the matrix as a vector
+ * @param i Row number 0 indexed */
+ SIMD_FORCE_INLINE const btVector3& operator[](int i) const
+ {
+ btFullAssert(0 <= i && i < 3);
+ return m_el[i];
+ }
+
+ /** @brief Multiply by the target matrix on the right
+ * @param m Rotation matrix to be applied
+ * Equivilant to this = this * m */
+ btMatrix3x3& operator*=(const btMatrix3x3& m);
+
+ /** @brief Adds by the target matrix on the right
+ * @param m matrix to be applied
+ * Equivilant to this = this + m */
+ btMatrix3x3& operator+=(const btMatrix3x3& m);
+
+ /** @brief Substractss by the target matrix on the right
+ * @param m matrix to be applied
+ * Equivilant to this = this - m */
+ btMatrix3x3& operator-=(const btMatrix3x3& m);
+
+ /** @brief Set from the rotational part of a 4x4 OpenGL matrix
+ * @param m A pointer to the beginning of the array of scalars*/
+ void setFromOpenGLSubMatrix(const btScalar *m)
+ {
+ m_el[0].setValue(m[0],m[4],m[8]);
+ m_el[1].setValue(m[1],m[5],m[9]);
+ m_el[2].setValue(m[2],m[6],m[10]);
+
+ }
+ /** @brief Set the values of the matrix explicitly (row major)
+ * @param xx Top left
+ * @param xy Top Middle
+ * @param xz Top Right
+ * @param yx Middle Left
+ * @param yy Middle Middle
+ * @param yz Middle Right
+ * @param zx Bottom Left
+ * @param zy Bottom Middle
+ * @param zz Bottom Right*/
+ void setValue(const btScalar& xx, const btScalar& xy, const btScalar& xz,
+ const btScalar& yx, const btScalar& yy, const btScalar& yz,
+ const btScalar& zx, const btScalar& zy, const btScalar& zz)
+ {
+ m_el[0].setValue(xx,xy,xz);
+ m_el[1].setValue(yx,yy,yz);
+ m_el[2].setValue(zx,zy,zz);
+ }
+
+ /** @brief Set the matrix from a quaternion
+ * @param q The Quaternion to match */
+ void setRotation(const btQuaternion& q)
+ {
+ btScalar d = q.length2();
+ btFullAssert(d != btScalar(0.0));
+ btScalar s = btScalar(2.0) / d;
+ btScalar xs = q.x() * s, ys = q.y() * s, zs = q.z() * s;
+ btScalar wx = q.w() * xs, wy = q.w() * ys, wz = q.w() * zs;
+ btScalar xx = q.x() * xs, xy = q.x() * ys, xz = q.x() * zs;
+ btScalar yy = q.y() * ys, yz = q.y() * zs, zz = q.z() * zs;
+ setValue(btScalar(1.0) - (yy + zz), xy - wz, xz + wy,
+ xy + wz, btScalar(1.0) - (xx + zz), yz - wx,
+ xz - wy, yz + wx, btScalar(1.0) - (xx + yy));
+ }
+
+
+ /** @brief Set the matrix from euler angles using YPR around YXZ respectively
+ * @param yaw Yaw about Y axis
+ * @param pitch Pitch about X axis
+ * @param roll Roll about Z axis
+ */
+ void setEulerYPR(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
+ {
+ setEulerZYX(roll, pitch, yaw);
+ }
+
+ /** @brief Set the matrix from euler angles YPR around ZYX axes
+ * @param eulerX Roll about X axis
+ * @param eulerY Pitch around Y axis
+ * @param eulerZ Yaw aboud Z axis
+ *
+ * These angles are used to produce a rotation matrix. The euler
+ * angles are applied in ZYX order. I.e a vector is first rotated
+ * about X then Y and then Z
+ **/
+ void setEulerZYX(btScalar eulerX,btScalar eulerY,btScalar eulerZ) {
+ ///@todo proposed to reverse this since it's labeled zyx but takes arguments xyz and it will match all other parts of the code
+ btScalar ci ( btCos(eulerX));
+ btScalar cj ( btCos(eulerY));
+ btScalar ch ( btCos(eulerZ));
+ btScalar si ( btSin(eulerX));
+ btScalar sj ( btSin(eulerY));
+ btScalar sh ( btSin(eulerZ));
+ btScalar cc = ci * ch;
+ btScalar cs = ci * sh;
+ btScalar sc = si * ch;
+ btScalar ss = si * sh;
+
+ setValue(cj * ch, sj * sc - cs, sj * cc + ss,
+ cj * sh, sj * ss + cc, sj * cs - sc,
+ -sj, cj * si, cj * ci);
+ }
+
+ /**@brief Set the matrix to the identity */
+ void setIdentity()
+ {
+ setValue(btScalar(1.0), btScalar(0.0), btScalar(0.0),
+ btScalar(0.0), btScalar(1.0), btScalar(0.0),
+ btScalar(0.0), btScalar(0.0), btScalar(1.0));
+ }
+
+ static const btMatrix3x3& getIdentity()
+ {
+ static const btMatrix3x3 identityMatrix(btScalar(1.0), btScalar(0.0), btScalar(0.0),
+ btScalar(0.0), btScalar(1.0), btScalar(0.0),
+ btScalar(0.0), btScalar(0.0), btScalar(1.0));
+ return identityMatrix;
+ }
+
+ /**@brief Fill the rotational part of an OpenGL matrix and clear the shear/perspective
+ * @param m The array to be filled */
+ void getOpenGLSubMatrix(btScalar *m) const
+ {
+ m[0] = btScalar(m_el[0].x());
+ m[1] = btScalar(m_el[1].x());
+ m[2] = btScalar(m_el[2].x());
+ m[3] = btScalar(0.0);
+ m[4] = btScalar(m_el[0].y());
+ m[5] = btScalar(m_el[1].y());
+ m[6] = btScalar(m_el[2].y());
+ m[7] = btScalar(0.0);
+ m[8] = btScalar(m_el[0].z());
+ m[9] = btScalar(m_el[1].z());
+ m[10] = btScalar(m_el[2].z());
+ m[11] = btScalar(0.0);
+ }
+
+ /**@brief Get the matrix represented as a quaternion
+ * @param q The quaternion which will be set */
+ void getRotation(btQuaternion& q) const
+ {
+ btScalar trace = m_el[0].x() + m_el[1].y() + m_el[2].z();
+ btScalar temp[4];
+
+ if (trace > btScalar(0.0))
+ {
+ btScalar s = btSqrt(trace + btScalar(1.0));
+ temp[3]=(s * btScalar(0.5));
+ s = btScalar(0.5) / s;
+
+ temp[0]=((m_el[2].y() - m_el[1].z()) * s);
+ temp[1]=((m_el[0].z() - m_el[2].x()) * s);
+ temp[2]=((m_el[1].x() - m_el[0].y()) * s);
+ }
+ else
+ {
+ int i = m_el[0].x() < m_el[1].y() ?
+ (m_el[1].y() < m_el[2].z() ? 2 : 1) :
+ (m_el[0].x() < m_el[2].z() ? 2 : 0);
+ int j = (i + 1) % 3;
+ int k = (i + 2) % 3;
+
+ btScalar s = btSqrt(m_el[i][i] - m_el[j][j] - m_el[k][k] + btScalar(1.0));
+ temp[i] = s * btScalar(0.5);
+ s = btScalar(0.5) / s;
+
+ temp[3] = (m_el[k][j] - m_el[j][k]) * s;
+ temp[j] = (m_el[j][i] + m_el[i][j]) * s;
+ temp[k] = (m_el[k][i] + m_el[i][k]) * s;
+ }
+ q.setValue(temp[0],temp[1],temp[2],temp[3]);
+ }
+
+ /**@brief Get the matrix represented as euler angles around YXZ, roundtrip with setEulerYPR
+ * @param yaw Yaw around Y axis
+ * @param pitch Pitch around X axis
+ * @param roll around Z axis */
+ void getEulerYPR(btScalar& yaw, btScalar& pitch, btScalar& roll) const
+ {
+
+ // first use the normal calculus
+ yaw = btScalar(btAtan2(m_el[1].x(), m_el[0].x()));
+ pitch = btScalar(btAsin(-m_el[2].x()));
+ roll = btScalar(btAtan2(m_el[2].y(), m_el[2].z()));
+
+ // on pitch = +/-HalfPI
+ if (btFabs(pitch)==SIMD_HALF_PI)
+ {
+ if (yaw>0)
+ yaw-=SIMD_PI;
+ else
+ yaw+=SIMD_PI;
+
+ if (roll>0)
+ roll-=SIMD_PI;
+ else
+ roll+=SIMD_PI;
+ }
+ };
+
+
+ /**@brief Get the matrix represented as euler angles around ZYX
+ * @param yaw Yaw around X axis
+ * @param pitch Pitch around Y axis
+ * @param roll around X axis
+ * @param solution_number Which solution of two possible solutions ( 1 or 2) are possible values*/
+ void getEulerZYX(btScalar& yaw, btScalar& pitch, btScalar& roll, unsigned int solution_number = 1) const
+ {
+ struct Euler
+ {
+ btScalar yaw;
+ btScalar pitch;
+ btScalar roll;
+ };
+
+ Euler euler_out;
+ Euler euler_out2; //second solution
+ //get the pointer to the raw data
+
+ // Check that pitch is not at a singularity
+ if (btFabs(m_el[2].x()) >= 1)
+ {
+ euler_out.yaw = 0;
+ euler_out2.yaw = 0;
+
+ // From difference of angles formula
+ btScalar delta = btAtan2(m_el[0].x(),m_el[0].z());
+ if (m_el[2].x() > 0) //gimbal locked up
+ {
+ euler_out.pitch = SIMD_PI / btScalar(2.0);
+ euler_out2.pitch = SIMD_PI / btScalar(2.0);
+ euler_out.roll = euler_out.pitch + delta;
+ euler_out2.roll = euler_out.pitch + delta;
+ }
+ else // gimbal locked down
+ {
+ euler_out.pitch = -SIMD_PI / btScalar(2.0);
+ euler_out2.pitch = -SIMD_PI / btScalar(2.0);
+ euler_out.roll = -euler_out.pitch + delta;
+ euler_out2.roll = -euler_out.pitch + delta;
+ }
+ }
+ else
+ {
+ euler_out.pitch = - btAsin(m_el[2].x());
+ euler_out2.pitch = SIMD_PI - euler_out.pitch;
+
+ euler_out.roll = btAtan2(m_el[2].y()/btCos(euler_out.pitch),
+ m_el[2].z()/btCos(euler_out.pitch));
+ euler_out2.roll = btAtan2(m_el[2].y()/btCos(euler_out2.pitch),
+ m_el[2].z()/btCos(euler_out2.pitch));
+
+ euler_out.yaw = btAtan2(m_el[1].x()/btCos(euler_out.pitch),
+ m_el[0].x()/btCos(euler_out.pitch));
+ euler_out2.yaw = btAtan2(m_el[1].x()/btCos(euler_out2.pitch),
+ m_el[0].x()/btCos(euler_out2.pitch));
+ }
+
+ if (solution_number == 1)
+ {
+ yaw = euler_out.yaw;
+ pitch = euler_out.pitch;
+ roll = euler_out.roll;
+ }
+ else
+ {
+ yaw = euler_out2.yaw;
+ pitch = euler_out2.pitch;
+ roll = euler_out2.roll;
+ }
+ }
+
+ /**@brief Create a scaled copy of the matrix
+ * @param s Scaling vector The elements of the vector will scale each column */
+
+ btMatrix3x3 scaled(const btVector3& s) const
+ {
+ return btMatrix3x3(m_el[0].x() * s.x(), m_el[0].y() * s.y(), m_el[0].z() * s.z(),
+ m_el[1].x() * s.x(), m_el[1].y() * s.y(), m_el[1].z() * s.z(),
+ m_el[2].x() * s.x(), m_el[2].y() * s.y(), m_el[2].z() * s.z());
+ }
+
+ /**@brief Return the determinant of the matrix */
+ btScalar determinant() const;
+ /**@brief Return the adjoint of the matrix */
+ btMatrix3x3 adjoint() const;
+ /**@brief Return the matrix with all values non negative */
+ btMatrix3x3 absolute() const;
+ /**@brief Return the transpose of the matrix */
+ btMatrix3x3 transpose() const;
+ /**@brief Return the inverse of the matrix */
+ btMatrix3x3 inverse() const;
+
+ btMatrix3x3 transposeTimes(const btMatrix3x3& m) const;
+ btMatrix3x3 timesTranspose(const btMatrix3x3& m) const;
+
+ SIMD_FORCE_INLINE btScalar tdotx(const btVector3& v) const
+ {
+ return m_el[0].x() * v.x() + m_el[1].x() * v.y() + m_el[2].x() * v.z();
+ }
+ SIMD_FORCE_INLINE btScalar tdoty(const btVector3& v) const
+ {
+ return m_el[0].y() * v.x() + m_el[1].y() * v.y() + m_el[2].y() * v.z();
+ }
+ SIMD_FORCE_INLINE btScalar tdotz(const btVector3& v) const
+ {
+ return m_el[0].z() * v.x() + m_el[1].z() * v.y() + m_el[2].z() * v.z();
+ }
+
+
+ /**@brief diagonalizes this matrix by the Jacobi method.
+ * @param rot stores the rotation from the coordinate system in which the matrix is diagonal to the original
+ * coordinate system, i.e., old_this = rot * new_this * rot^T.
+ * @param threshold See iteration
+ * @param iteration The iteration stops when all off-diagonal elements are less than the threshold multiplied
+ * by the sum of the absolute values of the diagonal, or when maxSteps have been executed.
+ *
+ * Note that this matrix is assumed to be symmetric.
+ */
+ void diagonalize(btMatrix3x3& rot, btScalar threshold, int maxSteps)
+ {
+ rot.setIdentity();
+ for (int step = maxSteps; step > 0; step--)
+ {
+ // find off-diagonal element [p][q] with largest magnitude
+ int p = 0;
+ int q = 1;
+ int r = 2;
+ btScalar max = btFabs(m_el[0][1]);
+ btScalar v = btFabs(m_el[0][2]);
+ if (v > max)
+ {
+ q = 2;
+ r = 1;
+ max = v;
+ }
+ v = btFabs(m_el[1][2]);
+ if (v > max)
+ {
+ p = 1;
+ q = 2;
+ r = 0;
+ max = v;
+ }
+
+ btScalar t = threshold * (btFabs(m_el[0][0]) + btFabs(m_el[1][1]) + btFabs(m_el[2][2]));
+ if (max <= t)
+ {
+ if (max <= SIMD_EPSILON * t)
+ {
+ return;
+ }
+ step = 1;
+ }
+
+ // compute Jacobi rotation J which leads to a zero for element [p][q]
+ btScalar mpq = m_el[p][q];
+ btScalar theta = (m_el[q][q] - m_el[p][p]) / (2 * mpq);
+ btScalar theta2 = theta * theta;
+ btScalar cos;
+ btScalar sin;
+ if (theta2 * theta2 < btScalar(10 / SIMD_EPSILON))
+ {
+ t = (theta >= 0) ? 1 / (theta + btSqrt(1 + theta2))
+ : 1 / (theta - btSqrt(1 + theta2));
+ cos = 1 / btSqrt(1 + t * t);
+ sin = cos * t;
+ }
+ else
+ {
+ // approximation for large theta-value, i.e., a nearly diagonal matrix
+ t = 1 / (theta * (2 + btScalar(0.5) / theta2));
+ cos = 1 - btScalar(0.5) * t * t;
+ sin = cos * t;
+ }
+
+ // apply rotation to matrix (this = J^T * this * J)
+ m_el[p][q] = m_el[q][p] = 0;
+ m_el[p][p] -= t * mpq;
+ m_el[q][q] += t * mpq;
+ btScalar mrp = m_el[r][p];
+ btScalar mrq = m_el[r][q];
+ m_el[r][p] = m_el[p][r] = cos * mrp - sin * mrq;
+ m_el[r][q] = m_el[q][r] = cos * mrq + sin * mrp;
+
+ // apply rotation to rot (rot = rot * J)
+ for (int i = 0; i < 3; i++)
+ {
+ btVector3& row = rot[i];
+ mrp = row[p];
+ mrq = row[q];
+ row[p] = cos * mrp - sin * mrq;
+ row[q] = cos * mrq + sin * mrp;
+ }
+ }
+ }
+
+
+
+
+ /**@brief Calculate the matrix cofactor
+ * @param r1 The first row to use for calculating the cofactor
+ * @param c1 The first column to use for calculating the cofactor
+ * @param r1 The second row to use for calculating the cofactor
+ * @param c1 The second column to use for calculating the cofactor
+ * See http://en.wikipedia.org/wiki/Cofactor_(linear_algebra) for more details
+ */
+ btScalar cofac(int r1, int c1, int r2, int c2) const
+ {
+ return m_el[r1][c1] * m_el[r2][c2] - m_el[r1][c2] * m_el[r2][c1];
+ }
+
+ void serialize(struct btMatrix3x3Data& dataOut) const;
+
+ void serializeFloat(struct btMatrix3x3FloatData& dataOut) const;
+
+ void deSerialize(const struct btMatrix3x3Data& dataIn);
+
+ void deSerializeFloat(const struct btMatrix3x3FloatData& dataIn);
+
+ void deSerializeDouble(const struct btMatrix3x3DoubleData& dataIn);
+
+};
+
+
+SIMD_FORCE_INLINE btMatrix3x3&
+btMatrix3x3::operator*=(const btMatrix3x3& m)
+{
+ setValue(m.tdotx(m_el[0]), m.tdoty(m_el[0]), m.tdotz(m_el[0]),
+ m.tdotx(m_el[1]), m.tdoty(m_el[1]), m.tdotz(m_el[1]),
+ m.tdotx(m_el[2]), m.tdoty(m_el[2]), m.tdotz(m_el[2]));
+ return *this;
+}
+
+SIMD_FORCE_INLINE btMatrix3x3&
+btMatrix3x3::operator+=(const btMatrix3x3& m)
+{
+ setValue(
+ m_el[0][0]+m.m_el[0][0],
+ m_el[0][1]+m.m_el[0][1],
+ m_el[0][2]+m.m_el[0][2],
+ m_el[1][0]+m.m_el[1][0],
+ m_el[1][1]+m.m_el[1][1],
+ m_el[1][2]+m.m_el[1][2],
+ m_el[2][0]+m.m_el[2][0],
+ m_el[2][1]+m.m_el[2][1],
+ m_el[2][2]+m.m_el[2][2]);
+ return *this;
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+operator*(const btMatrix3x3& m, const btScalar & k)
+{
+ return btMatrix3x3(
+ m[0].x()*k,m[0].y()*k,m[0].z()*k,
+ m[1].x()*k,m[1].y()*k,m[1].z()*k,
+ m[2].x()*k,m[2].y()*k,m[2].z()*k);
+}
+
+ SIMD_FORCE_INLINE btMatrix3x3
+operator+(const btMatrix3x3& m1, const btMatrix3x3& m2)
+{
+ return btMatrix3x3(
+ m1[0][0]+m2[0][0],
+ m1[0][1]+m2[0][1],
+ m1[0][2]+m2[0][2],
+ m1[1][0]+m2[1][0],
+ m1[1][1]+m2[1][1],
+ m1[1][2]+m2[1][2],
+ m1[2][0]+m2[2][0],
+ m1[2][1]+m2[2][1],
+ m1[2][2]+m2[2][2]);
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+operator-(const btMatrix3x3& m1, const btMatrix3x3& m2)
+{
+ return btMatrix3x3(
+ m1[0][0]-m2[0][0],
+ m1[0][1]-m2[0][1],
+ m1[0][2]-m2[0][2],
+ m1[1][0]-m2[1][0],
+ m1[1][1]-m2[1][1],
+ m1[1][2]-m2[1][2],
+ m1[2][0]-m2[2][0],
+ m1[2][1]-m2[2][1],
+ m1[2][2]-m2[2][2]);
+}
+
+
+SIMD_FORCE_INLINE btMatrix3x3&
+btMatrix3x3::operator-=(const btMatrix3x3& m)
+{
+ setValue(
+ m_el[0][0]-m.m_el[0][0],
+ m_el[0][1]-m.m_el[0][1],
+ m_el[0][2]-m.m_el[0][2],
+ m_el[1][0]-m.m_el[1][0],
+ m_el[1][1]-m.m_el[1][1],
+ m_el[1][2]-m.m_el[1][2],
+ m_el[2][0]-m.m_el[2][0],
+ m_el[2][1]-m.m_el[2][1],
+ m_el[2][2]-m.m_el[2][2]);
+ return *this;
+}
+
+
+SIMD_FORCE_INLINE btScalar
+btMatrix3x3::determinant() const
+{
+ return btTriple((*this)[0], (*this)[1], (*this)[2]);
+}
+
+
+SIMD_FORCE_INLINE btMatrix3x3
+btMatrix3x3::absolute() const
+{
+ return btMatrix3x3(
+ btFabs(m_el[0].x()), btFabs(m_el[0].y()), btFabs(m_el[0].z()),
+ btFabs(m_el[1].x()), btFabs(m_el[1].y()), btFabs(m_el[1].z()),
+ btFabs(m_el[2].x()), btFabs(m_el[2].y()), btFabs(m_el[2].z()));
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+btMatrix3x3::transpose() const
+{
+ return btMatrix3x3(m_el[0].x(), m_el[1].x(), m_el[2].x(),
+ m_el[0].y(), m_el[1].y(), m_el[2].y(),
+ m_el[0].z(), m_el[1].z(), m_el[2].z());
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+btMatrix3x3::adjoint() const
+{
+ return btMatrix3x3(cofac(1, 1, 2, 2), cofac(0, 2, 2, 1), cofac(0, 1, 1, 2),
+ cofac(1, 2, 2, 0), cofac(0, 0, 2, 2), cofac(0, 2, 1, 0),
+ cofac(1, 0, 2, 1), cofac(0, 1, 2, 0), cofac(0, 0, 1, 1));
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+btMatrix3x3::inverse() const
+{
+ btVector3 co(cofac(1, 1, 2, 2), cofac(1, 2, 2, 0), cofac(1, 0, 2, 1));
+ btScalar det = (*this)[0].dot(co);
+ btFullAssert(det != btScalar(0.0));
+ btScalar s = btScalar(1.0) / det;
+ return btMatrix3x3(co.x() * s, cofac(0, 2, 2, 1) * s, cofac(0, 1, 1, 2) * s,
+ co.y() * s, cofac(0, 0, 2, 2) * s, cofac(0, 2, 1, 0) * s,
+ co.z() * s, cofac(0, 1, 2, 0) * s, cofac(0, 0, 1, 1) * s);
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+btMatrix3x3::transposeTimes(const btMatrix3x3& m) const
+{
+ return btMatrix3x3(
+ m_el[0].x() * m[0].x() + m_el[1].x() * m[1].x() + m_el[2].x() * m[2].x(),
+ m_el[0].x() * m[0].y() + m_el[1].x() * m[1].y() + m_el[2].x() * m[2].y(),
+ m_el[0].x() * m[0].z() + m_el[1].x() * m[1].z() + m_el[2].x() * m[2].z(),
+ m_el[0].y() * m[0].x() + m_el[1].y() * m[1].x() + m_el[2].y() * m[2].x(),
+ m_el[0].y() * m[0].y() + m_el[1].y() * m[1].y() + m_el[2].y() * m[2].y(),
+ m_el[0].y() * m[0].z() + m_el[1].y() * m[1].z() + m_el[2].y() * m[2].z(),
+ m_el[0].z() * m[0].x() + m_el[1].z() * m[1].x() + m_el[2].z() * m[2].x(),
+ m_el[0].z() * m[0].y() + m_el[1].z() * m[1].y() + m_el[2].z() * m[2].y(),
+ m_el[0].z() * m[0].z() + m_el[1].z() * m[1].z() + m_el[2].z() * m[2].z());
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+btMatrix3x3::timesTranspose(const btMatrix3x3& m) const
+{
+ return btMatrix3x3(
+ m_el[0].dot(m[0]), m_el[0].dot(m[1]), m_el[0].dot(m[2]),
+ m_el[1].dot(m[0]), m_el[1].dot(m[1]), m_el[1].dot(m[2]),
+ m_el[2].dot(m[0]), m_el[2].dot(m[1]), m_el[2].dot(m[2]));
+
+}
+
+SIMD_FORCE_INLINE btVector3
+operator*(const btMatrix3x3& m, const btVector3& v)
+{
+ return btVector3(m[0].dot(v), m[1].dot(v), m[2].dot(v));
+}
+
+
+SIMD_FORCE_INLINE btVector3
+operator*(const btVector3& v, const btMatrix3x3& m)
+{
+ return btVector3(m.tdotx(v), m.tdoty(v), m.tdotz(v));
+}
+
+SIMD_FORCE_INLINE btMatrix3x3
+operator*(const btMatrix3x3& m1, const btMatrix3x3& m2)
+{
+ return btMatrix3x3(
+ m2.tdotx( m1[0]), m2.tdoty( m1[0]), m2.tdotz( m1[0]),
+ m2.tdotx( m1[1]), m2.tdoty( m1[1]), m2.tdotz( m1[1]),
+ m2.tdotx( m1[2]), m2.tdoty( m1[2]), m2.tdotz( m1[2]));
+}
+
+/*
+SIMD_FORCE_INLINE btMatrix3x3 btMultTransposeLeft(const btMatrix3x3& m1, const btMatrix3x3& m2) {
+return btMatrix3x3(
+m1[0][0] * m2[0][0] + m1[1][0] * m2[1][0] + m1[2][0] * m2[2][0],
+m1[0][0] * m2[0][1] + m1[1][0] * m2[1][1] + m1[2][0] * m2[2][1],
+m1[0][0] * m2[0][2] + m1[1][0] * m2[1][2] + m1[2][0] * m2[2][2],
+m1[0][1] * m2[0][0] + m1[1][1] * m2[1][0] + m1[2][1] * m2[2][0],
+m1[0][1] * m2[0][1] + m1[1][1] * m2[1][1] + m1[2][1] * m2[2][1],
+m1[0][1] * m2[0][2] + m1[1][1] * m2[1][2] + m1[2][1] * m2[2][2],
+m1[0][2] * m2[0][0] + m1[1][2] * m2[1][0] + m1[2][2] * m2[2][0],
+m1[0][2] * m2[0][1] + m1[1][2] * m2[1][1] + m1[2][2] * m2[2][1],
+m1[0][2] * m2[0][2] + m1[1][2] * m2[1][2] + m1[2][2] * m2[2][2]);
+}
+*/
+
+/**@brief Equality operator between two matrices
+* It will test all elements are equal. */
+SIMD_FORCE_INLINE bool operator==(const btMatrix3x3& m1, const btMatrix3x3& m2)
+{
+ return ( m1[0][0] == m2[0][0] && m1[1][0] == m2[1][0] && m1[2][0] == m2[2][0] &&
+ m1[0][1] == m2[0][1] && m1[1][1] == m2[1][1] && m1[2][1] == m2[2][1] &&
+ m1[0][2] == m2[0][2] && m1[1][2] == m2[1][2] && m1[2][2] == m2[2][2] );
+}
+
+///for serialization
+struct btMatrix3x3FloatData
+{
+ btVector3FloatData m_el[3];
+};
+
+///for serialization
+struct btMatrix3x3DoubleData
+{
+ btVector3DoubleData m_el[3];
+};
+
+
+
+
+SIMD_FORCE_INLINE void btMatrix3x3::serialize(struct btMatrix3x3Data& dataOut) const
+{
+ for (int i=0;i<3;i++)
+ m_el[i].serialize(dataOut.m_el[i]);
+}
+
+SIMD_FORCE_INLINE void btMatrix3x3::serializeFloat(struct btMatrix3x3FloatData& dataOut) const
+{
+ for (int i=0;i<3;i++)
+ m_el[i].serializeFloat(dataOut.m_el[i]);
+}
+
+
+SIMD_FORCE_INLINE void btMatrix3x3::deSerialize(const struct btMatrix3x3Data& dataIn)
+{
+ for (int i=0;i<3;i++)
+ m_el[i].deSerialize(dataIn.m_el[i]);
+}
+
+SIMD_FORCE_INLINE void btMatrix3x3::deSerializeFloat(const struct btMatrix3x3FloatData& dataIn)
+{
+ for (int i=0;i<3;i++)
+ m_el[i].deSerializeFloat(dataIn.m_el[i]);
+}
+
+SIMD_FORCE_INLINE void btMatrix3x3::deSerializeDouble(const struct btMatrix3x3DoubleData& dataIn)
+{
+ for (int i=0;i<3;i++)
+ m_el[i].deSerializeDouble(dataIn.m_el[i]);
+}
+
+#endif //BT_MATRIX3x3_H
+
diff --git a/tests/bullet/src/LinearMath/btMinMax.h b/tests/bullet/src/LinearMath/btMinMax.h
new file mode 100644
index 00000000..bd5d731a
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btMinMax.h
@@ -0,0 +1,71 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_GEN_MINMAX_H
+#define BT_GEN_MINMAX_H
+
+#include "LinearMath/btScalar.h"
+
+template <class T>
+SIMD_FORCE_INLINE const T& btMin(const T& a, const T& b)
+{
+ return a < b ? a : b ;
+}
+
+template <class T>
+SIMD_FORCE_INLINE const T& btMax(const T& a, const T& b)
+{
+ return a > b ? a : b;
+}
+
+template <class T>
+SIMD_FORCE_INLINE const T& btClamped(const T& a, const T& lb, const T& ub)
+{
+ return a < lb ? lb : (ub < a ? ub : a);
+}
+
+template <class T>
+SIMD_FORCE_INLINE void btSetMin(T& a, const T& b)
+{
+ if (b < a)
+ {
+ a = b;
+ }
+}
+
+template <class T>
+SIMD_FORCE_INLINE void btSetMax(T& a, const T& b)
+{
+ if (a < b)
+ {
+ a = b;
+ }
+}
+
+template <class T>
+SIMD_FORCE_INLINE void btClamp(T& a, const T& lb, const T& ub)
+{
+ if (a < lb)
+ {
+ a = lb;
+ }
+ else if (ub < a)
+ {
+ a = ub;
+ }
+}
+
+#endif //BT_GEN_MINMAX_H
diff --git a/tests/bullet/src/LinearMath/btMotionState.h b/tests/bullet/src/LinearMath/btMotionState.h
new file mode 100644
index 00000000..94318140
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btMotionState.h
@@ -0,0 +1,40 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_MOTIONSTATE_H
+#define BT_MOTIONSTATE_H
+
+#include "btTransform.h"
+
+///The btMotionState interface class allows the dynamics world to synchronize and interpolate the updated world transforms with graphics
+///For optimizations, potentially only moving objects get synchronized (using setWorldPosition/setWorldOrientation)
+class btMotionState
+{
+ public:
+
+ virtual ~btMotionState()
+ {
+
+ }
+
+ virtual void getWorldTransform(btTransform& worldTrans ) const =0;
+
+ //Bullet only calls the update of worldtransform for active objects
+ virtual void setWorldTransform(const btTransform& worldTrans)=0;
+
+
+};
+
+#endif //BT_MOTIONSTATE_H
diff --git a/tests/bullet/src/LinearMath/btPoolAllocator.h b/tests/bullet/src/LinearMath/btPoolAllocator.h
new file mode 100755
index 00000000..ef208453
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btPoolAllocator.h
@@ -0,0 +1,121 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef _BT_POOL_ALLOCATOR_H
+#define _BT_POOL_ALLOCATOR_H
+
+#include "btScalar.h"
+#include "btAlignedAllocator.h"
+
+///The btPoolAllocator class allows to efficiently allocate a large pool of objects, instead of dynamically allocating them separately.
+class btPoolAllocator
+{
+ int m_elemSize;
+ int m_maxElements;
+ int m_freeCount;
+ void* m_firstFree;
+ unsigned char* m_pool;
+
+public:
+
+ btPoolAllocator(int elemSize, int maxElements)
+ :m_elemSize(elemSize),
+ m_maxElements(maxElements)
+ {
+ m_pool = (unsigned char*) btAlignedAlloc( static_cast<unsigned int>(m_elemSize*m_maxElements),16);
+
+ unsigned char* p = m_pool;
+ m_firstFree = p;
+ m_freeCount = m_maxElements;
+ int count = m_maxElements;
+ while (--count) {
+ *(void**)p = (p + m_elemSize);
+ p += m_elemSize;
+ }
+ *(void**)p = 0;
+ }
+
+ ~btPoolAllocator()
+ {
+ btAlignedFree( m_pool);
+ }
+
+ int getFreeCount() const
+ {
+ return m_freeCount;
+ }
+
+ int getUsedCount() const
+ {
+ return m_maxElements - m_freeCount;
+ }
+
+ int getMaxCount() const
+ {
+ return m_maxElements;
+ }
+
+ void* allocate(int size)
+ {
+ // release mode fix
+ (void)size;
+ btAssert(!size || size<=m_elemSize);
+ btAssert(m_freeCount>0);
+ void* result = m_firstFree;
+ m_firstFree = *(void**)m_firstFree;
+ --m_freeCount;
+ return result;
+ }
+
+ bool validPtr(void* ptr)
+ {
+ if (ptr) {
+ if (((unsigned char*)ptr >= m_pool && (unsigned char*)ptr < m_pool + m_maxElements * m_elemSize))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ void freeMemory(void* ptr)
+ {
+ if (ptr) {
+ btAssert((unsigned char*)ptr >= m_pool && (unsigned char*)ptr < m_pool + m_maxElements * m_elemSize);
+
+ *(void**)ptr = m_firstFree;
+ m_firstFree = ptr;
+ ++m_freeCount;
+ }
+ }
+
+ int getElementSize() const
+ {
+ return m_elemSize;
+ }
+
+ unsigned char* getPoolAddress()
+ {
+ return m_pool;
+ }
+
+ const unsigned char* getPoolAddress() const
+ {
+ return m_pool;
+ }
+
+};
+
+#endif //_BT_POOL_ALLOCATOR_H
diff --git a/tests/bullet/src/LinearMath/btQuadWord.h b/tests/bullet/src/LinearMath/btQuadWord.h
new file mode 100644
index 00000000..d5e9daa4
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btQuadWord.h
@@ -0,0 +1,180 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_SIMD_QUADWORD_H
+#define BT_SIMD_QUADWORD_H
+
+#include "btScalar.h"
+#include "btMinMax.h"
+
+
+#if defined (__CELLOS_LV2) && defined (__SPU__)
+#include <altivec.h>
+#endif
+
+/**@brief The btQuadWord class is base class for btVector3 and btQuaternion.
+ * Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword.
+ */
+#ifndef USE_LIBSPE2
+ATTRIBUTE_ALIGNED16(class) btQuadWord
+#else
+class btQuadWord
+#endif
+{
+protected:
+
+#if defined (__SPU__) && defined (__CELLOS_LV2__)
+ union {
+ vec_float4 mVec128;
+ btScalar m_floats[4];
+ };
+public:
+ vec_float4 get128() const
+ {
+ return mVec128;
+ }
+protected:
+#else //__CELLOS_LV2__ __SPU__
+ btScalar m_floats[4];
+#endif //__CELLOS_LV2__ __SPU__
+
+ public:
+
+
+ /**@brief Return the x value */
+ SIMD_FORCE_INLINE const btScalar& getX() const { return m_floats[0]; }
+ /**@brief Return the y value */
+ SIMD_FORCE_INLINE const btScalar& getY() const { return m_floats[1]; }
+ /**@brief Return the z value */
+ SIMD_FORCE_INLINE const btScalar& getZ() const { return m_floats[2]; }
+ /**@brief Set the x value */
+ SIMD_FORCE_INLINE void setX(btScalar x) { m_floats[0] = x;};
+ /**@brief Set the y value */
+ SIMD_FORCE_INLINE void setY(btScalar y) { m_floats[1] = y;};
+ /**@brief Set the z value */
+ SIMD_FORCE_INLINE void setZ(btScalar z) { m_floats[2] = z;};
+ /**@brief Set the w value */
+ SIMD_FORCE_INLINE void setW(btScalar w) { m_floats[3] = w;};
+ /**@brief Return the x value */
+ SIMD_FORCE_INLINE const btScalar& x() const { return m_floats[0]; }
+ /**@brief Return the y value */
+ SIMD_FORCE_INLINE const btScalar& y() const { return m_floats[1]; }
+ /**@brief Return the z value */
+ SIMD_FORCE_INLINE const btScalar& z() const { return m_floats[2]; }
+ /**@brief Return the w value */
+ SIMD_FORCE_INLINE const btScalar& w() const { return m_floats[3]; }
+
+ //SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_floats[0])[i]; }
+ //SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_floats[0])[i]; }
+ ///operator btScalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons.
+ SIMD_FORCE_INLINE operator btScalar *() { return &m_floats[0]; }
+ SIMD_FORCE_INLINE operator const btScalar *() const { return &m_floats[0]; }
+
+ SIMD_FORCE_INLINE bool operator==(const btQuadWord& other) const
+ {
+ return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0]));
+ }
+
+ SIMD_FORCE_INLINE bool operator!=(const btQuadWord& other) const
+ {
+ return !(*this == other);
+ }
+
+ /**@brief Set x,y,z and zero w
+ * @param x Value of x
+ * @param y Value of y
+ * @param z Value of z
+ */
+ SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z)
+ {
+ m_floats[0]=x;
+ m_floats[1]=y;
+ m_floats[2]=z;
+ m_floats[3] = 0.f;
+ }
+
+/* void getValue(btScalar *m) const
+ {
+ m[0] = m_floats[0];
+ m[1] = m_floats[1];
+ m[2] = m_floats[2];
+ }
+*/
+/**@brief Set the values
+ * @param x Value of x
+ * @param y Value of y
+ * @param z Value of z
+ * @param w Value of w
+ */
+ SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
+ {
+ m_floats[0]=x;
+ m_floats[1]=y;
+ m_floats[2]=z;
+ m_floats[3]=w;
+ }
+ /**@brief No initialization constructor */
+ SIMD_FORCE_INLINE btQuadWord()
+ // :m_floats[0](btScalar(0.)),m_floats[1](btScalar(0.)),m_floats[2](btScalar(0.)),m_floats[3](btScalar(0.))
+ {
+ }
+
+ /**@brief Three argument constructor (zeros w)
+ * @param x Value of x
+ * @param y Value of y
+ * @param z Value of z
+ */
+ SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z)
+ {
+ m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = 0.0f;
+ }
+
+/**@brief Initializing constructor
+ * @param x Value of x
+ * @param y Value of y
+ * @param z Value of z
+ * @param w Value of w
+ */
+ SIMD_FORCE_INLINE btQuadWord(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
+ {
+ m_floats[0] = x, m_floats[1] = y, m_floats[2] = z, m_floats[3] = w;
+ }
+
+ /**@brief Set each element to the max of the current values and the values of another btQuadWord
+ * @param other The other btQuadWord to compare with
+ */
+ SIMD_FORCE_INLINE void setMax(const btQuadWord& other)
+ {
+ btSetMax(m_floats[0], other.m_floats[0]);
+ btSetMax(m_floats[1], other.m_floats[1]);
+ btSetMax(m_floats[2], other.m_floats[2]);
+ btSetMax(m_floats[3], other.m_floats[3]);
+ }
+ /**@brief Set each element to the min of the current values and the values of another btQuadWord
+ * @param other The other btQuadWord to compare with
+ */
+ SIMD_FORCE_INLINE void setMin(const btQuadWord& other)
+ {
+ btSetMin(m_floats[0], other.m_floats[0]);
+ btSetMin(m_floats[1], other.m_floats[1]);
+ btSetMin(m_floats[2], other.m_floats[2]);
+ btSetMin(m_floats[3], other.m_floats[3]);
+ }
+
+
+
+};
+
+#endif //BT_SIMD_QUADWORD_H
diff --git a/tests/bullet/src/LinearMath/btQuaternion.h b/tests/bullet/src/LinearMath/btQuaternion.h
new file mode 100644
index 00000000..42e968d5
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btQuaternion.h
@@ -0,0 +1,433 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_SIMD__QUATERNION_H_
+#define BT_SIMD__QUATERNION_H_
+
+
+#include "btVector3.h"
+#include "btQuadWord.h"
+
+/**@brief The btQuaternion implements quaternion to perform linear algebra rotations in combination with btMatrix3x3, btVector3 and btTransform. */
+class btQuaternion : public btQuadWord {
+public:
+ /**@brief No initialization constructor */
+ btQuaternion() {}
+
+ // template <typename btScalar>
+ // explicit Quaternion(const btScalar *v) : Tuple4<btScalar>(v) {}
+ /**@brief Constructor from scalars */
+ btQuaternion(const btScalar& x, const btScalar& y, const btScalar& z, const btScalar& w)
+ : btQuadWord(x, y, z, w)
+ {}
+ /**@brief Axis angle Constructor
+ * @param axis The axis which the rotation is around
+ * @param angle The magnitude of the rotation around the angle (Radians) */
+ btQuaternion(const btVector3& axis, const btScalar& angle)
+ {
+ setRotation(axis, angle);
+ }
+ /**@brief Constructor from Euler angles
+ * @param yaw Angle around Y unless BT_EULER_DEFAULT_ZYX defined then Z
+ * @param pitch Angle around X unless BT_EULER_DEFAULT_ZYX defined then Y
+ * @param roll Angle around Z unless BT_EULER_DEFAULT_ZYX defined then X */
+ btQuaternion(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
+ {
+#ifndef BT_EULER_DEFAULT_ZYX
+ setEuler(yaw, pitch, roll);
+#else
+ setEulerZYX(yaw, pitch, roll);
+#endif
+ }
+ /**@brief Set the rotation using axis angle notation
+ * @param axis The axis around which to rotate
+ * @param angle The magnitude of the rotation in Radians */
+ void setRotation(const btVector3& axis, const btScalar& angle)
+ {
+ btScalar d = axis.length();
+ btAssert(d != btScalar(0.0));
+ btScalar s = btSin(angle * btScalar(0.5)) / d;
+ setValue(axis.x() * s, axis.y() * s, axis.z() * s,
+ btCos(angle * btScalar(0.5)));
+ }
+ /**@brief Set the quaternion using Euler angles
+ * @param yaw Angle around Y
+ * @param pitch Angle around X
+ * @param roll Angle around Z */
+ void setEuler(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
+ {
+ btScalar halfYaw = btScalar(yaw) * btScalar(0.5);
+ btScalar halfPitch = btScalar(pitch) * btScalar(0.5);
+ btScalar halfRoll = btScalar(roll) * btScalar(0.5);
+ btScalar cosYaw = btCos(halfYaw);
+ btScalar sinYaw = btSin(halfYaw);
+ btScalar cosPitch = btCos(halfPitch);
+ btScalar sinPitch = btSin(halfPitch);
+ btScalar cosRoll = btCos(halfRoll);
+ btScalar sinRoll = btSin(halfRoll);
+ setValue(cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw,
+ cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw,
+ sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw,
+ cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw);
+ }
+ /**@brief Set the quaternion using euler angles
+ * @param yaw Angle around Z
+ * @param pitch Angle around Y
+ * @param roll Angle around X */
+ void setEulerZYX(const btScalar& yaw, const btScalar& pitch, const btScalar& roll)
+ {
+ btScalar halfYaw = btScalar(yaw) * btScalar(0.5);
+ btScalar halfPitch = btScalar(pitch) * btScalar(0.5);
+ btScalar halfRoll = btScalar(roll) * btScalar(0.5);
+ btScalar cosYaw = btCos(halfYaw);
+ btScalar sinYaw = btSin(halfYaw);
+ btScalar cosPitch = btCos(halfPitch);
+ btScalar sinPitch = btSin(halfPitch);
+ btScalar cosRoll = btCos(halfRoll);
+ btScalar sinRoll = btSin(halfRoll);
+ setValue(sinRoll * cosPitch * cosYaw - cosRoll * sinPitch * sinYaw, //x
+ cosRoll * sinPitch * cosYaw + sinRoll * cosPitch * sinYaw, //y
+ cosRoll * cosPitch * sinYaw - sinRoll * sinPitch * cosYaw, //z
+ cosRoll * cosPitch * cosYaw + sinRoll * sinPitch * sinYaw); //formerly yzx
+ }
+ /**@brief Add two quaternions
+ * @param q The quaternion to add to this one */
+ SIMD_FORCE_INLINE btQuaternion& operator+=(const btQuaternion& q)
+ {
+ m_floats[0] += q.x(); m_floats[1] += q.y(); m_floats[2] += q.z(); m_floats[3] += q.m_floats[3];
+ return *this;
+ }
+
+ /**@brief Subtract out a quaternion
+ * @param q The quaternion to subtract from this one */
+ btQuaternion& operator-=(const btQuaternion& q)
+ {
+ m_floats[0] -= q.x(); m_floats[1] -= q.y(); m_floats[2] -= q.z(); m_floats[3] -= q.m_floats[3];
+ return *this;
+ }
+
+ /**@brief Scale this quaternion
+ * @param s The scalar to scale by */
+ btQuaternion& operator*=(const btScalar& s)
+ {
+ m_floats[0] *= s; m_floats[1] *= s; m_floats[2] *= s; m_floats[3] *= s;
+ return *this;
+ }
+
+ /**@brief Multiply this quaternion by q on the right
+ * @param q The other quaternion
+ * Equivilant to this = this * q */
+ btQuaternion& operator*=(const btQuaternion& q)
+ {
+ setValue(m_floats[3] * q.x() + m_floats[0] * q.m_floats[3] + m_floats[1] * q.z() - m_floats[2] * q.y(),
+ m_floats[3] * q.y() + m_floats[1] * q.m_floats[3] + m_floats[2] * q.x() - m_floats[0] * q.z(),
+ m_floats[3] * q.z() + m_floats[2] * q.m_floats[3] + m_floats[0] * q.y() - m_floats[1] * q.x(),
+ m_floats[3] * q.m_floats[3] - m_floats[0] * q.x() - m_floats[1] * q.y() - m_floats[2] * q.z());
+ return *this;
+ }
+ /**@brief Return the dot product between this quaternion and another
+ * @param q The other quaternion */
+ btScalar dot(const btQuaternion& q) const
+ {
+ return m_floats[0] * q.x() + m_floats[1] * q.y() + m_floats[2] * q.z() + m_floats[3] * q.m_floats[3];
+ }
+
+ /**@brief Return the length squared of the quaternion */
+ btScalar length2() const
+ {
+ return dot(*this);
+ }
+
+ /**@brief Return the length of the quaternion */
+ btScalar length() const
+ {
+ return btSqrt(length2());
+ }
+
+ /**@brief Normalize the quaternion
+ * Such that x^2 + y^2 + z^2 +w^2 = 1 */
+ btQuaternion& normalize()
+ {
+ return *this /= length();
+ }
+
+ /**@brief Return a scaled version of this quaternion
+ * @param s The scale factor */
+ SIMD_FORCE_INLINE btQuaternion
+ operator*(const btScalar& s) const
+ {
+ return btQuaternion(x() * s, y() * s, z() * s, m_floats[3] * s);
+ }
+
+
+ /**@brief Return an inversely scaled versionof this quaternion
+ * @param s The inverse scale factor */
+ btQuaternion operator/(const btScalar& s) const
+ {
+ btAssert(s != btScalar(0.0));
+ return *this * (btScalar(1.0) / s);
+ }
+
+ /**@brief Inversely scale this quaternion
+ * @param s The scale factor */
+ btQuaternion& operator/=(const btScalar& s)
+ {
+ btAssert(s != btScalar(0.0));
+ return *this *= btScalar(1.0) / s;
+ }
+
+ /**@brief Return a normalized version of this quaternion */
+ btQuaternion normalized() const
+ {
+ return *this / length();
+ }
+ /**@brief Return the angle between this quaternion and the other
+ * @param q The other quaternion */
+ btScalar angle(const btQuaternion& q) const
+ {
+ btScalar s = btSqrt(length2() * q.length2());
+ btAssert(s != btScalar(0.0));
+ return btAcos(dot(q) / s);
+ }
+ /**@brief Return the angle of rotation represented by this quaternion */
+ btScalar getAngle() const
+ {
+ btScalar s = btScalar(2.) * btAcos(m_floats[3]);
+ return s;
+ }
+
+ /**@brief Return the axis of the rotation represented by this quaternion */
+ btVector3 getAxis() const
+ {
+ btScalar s_squared = btScalar(1.) - btPow(m_floats[3], btScalar(2.));
+ if (s_squared < btScalar(10.) * SIMD_EPSILON) //Check for divide by zero
+ return btVector3(1.0, 0.0, 0.0); // Arbitrary
+ btScalar s = btSqrt(s_squared);
+ return btVector3(m_floats[0] / s, m_floats[1] / s, m_floats[2] / s);
+ }
+
+ /**@brief Return the inverse of this quaternion */
+ btQuaternion inverse() const
+ {
+ return btQuaternion(-m_floats[0], -m_floats[1], -m_floats[2], m_floats[3]);
+ }
+
+ /**@brief Return the sum of this quaternion and the other
+ * @param q2 The other quaternion */
+ SIMD_FORCE_INLINE btQuaternion
+ operator+(const btQuaternion& q2) const
+ {
+ const btQuaternion& q1 = *this;
+ return btQuaternion(q1.x() + q2.x(), q1.y() + q2.y(), q1.z() + q2.z(), q1.m_floats[3] + q2.m_floats[3]);
+ }
+
+ /**@brief Return the difference between this quaternion and the other
+ * @param q2 The other quaternion */
+ SIMD_FORCE_INLINE btQuaternion
+ operator-(const btQuaternion& q2) const
+ {
+ const btQuaternion& q1 = *this;
+ return btQuaternion(q1.x() - q2.x(), q1.y() - q2.y(), q1.z() - q2.z(), q1.m_floats[3] - q2.m_floats[3]);
+ }
+
+ /**@brief Return the negative of this quaternion
+ * This simply negates each element */
+ SIMD_FORCE_INLINE btQuaternion operator-() const
+ {
+ const btQuaternion& q2 = *this;
+ return btQuaternion( - q2.x(), - q2.y(), - q2.z(), - q2.m_floats[3]);
+ }
+ /**@todo document this and it's use */
+ SIMD_FORCE_INLINE btQuaternion farthest( const btQuaternion& qd) const
+ {
+ btQuaternion diff,sum;
+ diff = *this - qd;
+ sum = *this + qd;
+ if( diff.dot(diff) > sum.dot(sum) )
+ return qd;
+ return (-qd);
+ }
+
+ /**@todo document this and it's use */
+ SIMD_FORCE_INLINE btQuaternion nearest( const btQuaternion& qd) const
+ {
+ btQuaternion diff,sum;
+ diff = *this - qd;
+ sum = *this + qd;
+ if( diff.dot(diff) < sum.dot(sum) )
+ return qd;
+ return (-qd);
+ }
+
+
+ /**@brief Return the quaternion which is the result of Spherical Linear Interpolation between this and the other quaternion
+ * @param q The other quaternion to interpolate with
+ * @param t The ratio between this and q to interpolate. If t = 0 the result is this, if t=1 the result is q.
+ * Slerp interpolates assuming constant velocity. */
+ btQuaternion slerp(const btQuaternion& q, const btScalar& t) const
+ {
+ btScalar theta = angle(q);
+ if (theta != btScalar(0.0))
+ {
+ btScalar d = btScalar(1.0) / btSin(theta);
+ btScalar s0 = btSin((btScalar(1.0) - t) * theta);
+ btScalar s1 = btSin(t * theta);
+ if (dot(q) < 0) // Take care of long angle case see http://en.wikipedia.org/wiki/Slerp
+ return btQuaternion((m_floats[0] * s0 + -q.x() * s1) * d,
+ (m_floats[1] * s0 + -q.y() * s1) * d,
+ (m_floats[2] * s0 + -q.z() * s1) * d,
+ (m_floats[3] * s0 + -q.m_floats[3] * s1) * d);
+ else
+ return btQuaternion((m_floats[0] * s0 + q.x() * s1) * d,
+ (m_floats[1] * s0 + q.y() * s1) * d,
+ (m_floats[2] * s0 + q.z() * s1) * d,
+ (m_floats[3] * s0 + q.m_floats[3] * s1) * d);
+
+ }
+ else
+ {
+ return *this;
+ }
+ }
+
+ static const btQuaternion& getIdentity()
+ {
+ static const btQuaternion identityQuat(btScalar(0.),btScalar(0.),btScalar(0.),btScalar(1.));
+ return identityQuat;
+ }
+
+ SIMD_FORCE_INLINE const btScalar& getW() const { return m_floats[3]; }
+
+
+};
+
+
+/**@brief Return the negative of a quaternion */
+SIMD_FORCE_INLINE btQuaternion
+operator-(const btQuaternion& q)
+{
+ return btQuaternion(-q.x(), -q.y(), -q.z(), -q.w());
+}
+
+
+
+/**@brief Return the product of two quaternions */
+SIMD_FORCE_INLINE btQuaternion
+operator*(const btQuaternion& q1, const btQuaternion& q2) {
+ return btQuaternion(q1.w() * q2.x() + q1.x() * q2.w() + q1.y() * q2.z() - q1.z() * q2.y(),
+ q1.w() * q2.y() + q1.y() * q2.w() + q1.z() * q2.x() - q1.x() * q2.z(),
+ q1.w() * q2.z() + q1.z() * q2.w() + q1.x() * q2.y() - q1.y() * q2.x(),
+ q1.w() * q2.w() - q1.x() * q2.x() - q1.y() * q2.y() - q1.z() * q2.z());
+}
+
+SIMD_FORCE_INLINE btQuaternion
+operator*(const btQuaternion& q, const btVector3& w)
+{
+ return btQuaternion( q.w() * w.x() + q.y() * w.z() - q.z() * w.y(),
+ q.w() * w.y() + q.z() * w.x() - q.x() * w.z(),
+ q.w() * w.z() + q.x() * w.y() - q.y() * w.x(),
+ -q.x() * w.x() - q.y() * w.y() - q.z() * w.z());
+}
+
+SIMD_FORCE_INLINE btQuaternion
+operator*(const btVector3& w, const btQuaternion& q)
+{
+ return btQuaternion( w.x() * q.w() + w.y() * q.z() - w.z() * q.y(),
+ w.y() * q.w() + w.z() * q.x() - w.x() * q.z(),
+ w.z() * q.w() + w.x() * q.y() - w.y() * q.x(),
+ -w.x() * q.x() - w.y() * q.y() - w.z() * q.z());
+}
+
+/**@brief Calculate the dot product between two quaternions */
+SIMD_FORCE_INLINE btScalar
+dot(const btQuaternion& q1, const btQuaternion& q2)
+{
+ return q1.dot(q2);
+}
+
+
+/**@brief Return the length of a quaternion */
+SIMD_FORCE_INLINE btScalar
+length(const btQuaternion& q)
+{
+ return q.length();
+}
+
+/**@brief Return the angle between two quaternions*/
+SIMD_FORCE_INLINE btScalar
+angle(const btQuaternion& q1, const btQuaternion& q2)
+{
+ return q1.angle(q2);
+}
+
+/**@brief Return the inverse of a quaternion*/
+SIMD_FORCE_INLINE btQuaternion
+inverse(const btQuaternion& q)
+{
+ return q.inverse();
+}
+
+/**@brief Return the result of spherical linear interpolation betwen two quaternions
+ * @param q1 The first quaternion
+ * @param q2 The second quaternion
+ * @param t The ration between q1 and q2. t = 0 return q1, t=1 returns q2
+ * Slerp assumes constant velocity between positions. */
+SIMD_FORCE_INLINE btQuaternion
+slerp(const btQuaternion& q1, const btQuaternion& q2, const btScalar& t)
+{
+ return q1.slerp(q2, t);
+}
+
+SIMD_FORCE_INLINE btVector3
+quatRotate(const btQuaternion& rotation, const btVector3& v)
+{
+ btQuaternion q = rotation * v;
+ q *= rotation.inverse();
+ return btVector3(q.getX(),q.getY(),q.getZ());
+}
+
+SIMD_FORCE_INLINE btQuaternion
+shortestArcQuat(const btVector3& v0, const btVector3& v1) // Game Programming Gems 2.10. make sure v0,v1 are normalized
+{
+ btVector3 c = v0.cross(v1);
+ btScalar d = v0.dot(v1);
+
+ if (d < -1.0 + SIMD_EPSILON)
+ {
+ btVector3 n,unused;
+ btPlaneSpace1(v0,n,unused);
+ return btQuaternion(n.x(),n.y(),n.z(),0.0f); // just pick any vector that is orthogonal to v0
+ }
+
+ btScalar s = btSqrt((1.0f + d) * 2.0f);
+ btScalar rs = 1.0f / s;
+
+ return btQuaternion(c.getX()*rs,c.getY()*rs,c.getZ()*rs,s * 0.5f);
+}
+
+SIMD_FORCE_INLINE btQuaternion
+shortestArcQuatNormalize2(btVector3& v0,btVector3& v1)
+{
+ v0.normalize();
+ v1.normalize();
+ return shortestArcQuat(v0,v1);
+}
+
+#endif //BT_SIMD__QUATERNION_H_
+
+
+
+
diff --git a/tests/bullet/src/LinearMath/btQuickprof.cpp b/tests/bullet/src/LinearMath/btQuickprof.cpp
new file mode 100644
index 00000000..14534068
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btQuickprof.cpp
@@ -0,0 +1,565 @@
+/*
+
+***************************************************************************************************
+**
+** profile.cpp
+**
+** Real-Time Hierarchical Profiling for Game Programming Gems 3
+**
+** by Greg Hjelstrom & Byon Garrabrant
+**
+***************************************************************************************************/
+
+// Credits: The Clock class was inspired by the Timer classes in
+// Ogre (www.ogre3d.org).
+
+#include "btQuickprof.h"
+
+#ifndef BT_NO_PROFILE
+
+
+static btClock gProfileClock;
+
+
+#ifdef __CELLOS_LV2__
+#include <sys/sys_time.h>
+#include <sys/time_util.h>
+#include <stdio.h>
+#endif
+
+#if defined (SUNOS) || defined (__SUNOS__)
+#include <stdio.h>
+#endif
+
+#if defined(WIN32) || defined(_WIN32)
+
+#define BT_USE_WINDOWS_TIMERS
+#define WIN32_LEAN_AND_MEAN
+#define NOWINRES
+#define NOMCX
+#define NOIME
+
+#ifdef _XBOX
+ #include <Xtl.h>
+#else //_XBOX
+ #include <windows.h>
+#endif //_XBOX
+
+#include <time.h>
+
+
+#else //_WIN32
+#include <sys/time.h>
+#endif //_WIN32
+
+#define mymin(a,b) (a > b ? a : b)
+
+struct btClockData
+{
+
+#ifdef BT_USE_WINDOWS_TIMERS
+ LARGE_INTEGER mClockFrequency;
+ DWORD mStartTick;
+ LONGLONG mPrevElapsedTime;
+ LARGE_INTEGER mStartTime;
+#else
+#ifdef __CELLOS_LV2__
+ uint64_t mStartTime;
+#else
+ struct timeval mStartTime;
+#endif
+#endif //__CELLOS_LV2__
+
+};
+
+///The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
+btClock::btClock()
+{
+ m_data = new btClockData;
+#ifdef BT_USE_WINDOWS_TIMERS
+ QueryPerformanceFrequency(&m_data->mClockFrequency);
+#endif
+ reset();
+}
+
+btClock::~btClock()
+{
+ delete m_data;
+}
+
+btClock::btClock(const btClock& other)
+{
+ m_data = new btClockData;
+ *m_data = *other.m_data;
+}
+
+btClock& btClock::operator=(const btClock& other)
+{
+ *m_data = *other.m_data;
+ return *this;
+}
+
+
+ /// Resets the initial reference time.
+void btClock::reset()
+{
+#ifdef BT_USE_WINDOWS_TIMERS
+ QueryPerformanceCounter(&m_data->mStartTime);
+ m_data->mStartTick = GetTickCount();
+ m_data->mPrevElapsedTime = 0;
+#else
+#ifdef __CELLOS_LV2__
+
+ typedef uint64_t ClockSize;
+ ClockSize newTime;
+ //__asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory");
+ SYS_TIMEBASE_GET( newTime );
+ m_data->mStartTime = newTime;
+#else
+ gettimeofday(&m_data->mStartTime, 0);
+#endif
+#endif
+}
+
+/// Returns the time in ms since the last call to reset or since
+/// the btClock was created.
+unsigned long int btClock::getTimeMilliseconds()
+{
+#ifdef BT_USE_WINDOWS_TIMERS
+ LARGE_INTEGER currentTime;
+ QueryPerformanceCounter(&currentTime);
+ LONGLONG elapsedTime = currentTime.QuadPart -
+ m_data->mStartTime.QuadPart;
+ // Compute the number of millisecond ticks elapsed.
+ unsigned long msecTicks = (unsigned long)(1000 * elapsedTime /
+ m_data->mClockFrequency.QuadPart);
+ // Check for unexpected leaps in the Win32 performance counter.
+ // (This is caused by unexpected data across the PCI to ISA
+ // bridge, aka south bridge. See Microsoft KB274323.)
+ unsigned long elapsedTicks = GetTickCount() - m_data->mStartTick;
+ signed long msecOff = (signed long)(msecTicks - elapsedTicks);
+ if (msecOff < -100 || msecOff > 100)
+ {
+ // Adjust the starting time forwards.
+ LONGLONG msecAdjustment = mymin(msecOff *
+ m_data->mClockFrequency.QuadPart / 1000, elapsedTime -
+ m_data->mPrevElapsedTime);
+ m_data->mStartTime.QuadPart += msecAdjustment;
+ elapsedTime -= msecAdjustment;
+
+ // Recompute the number of millisecond ticks elapsed.
+ msecTicks = (unsigned long)(1000 * elapsedTime /
+ m_data->mClockFrequency.QuadPart);
+ }
+
+ // Store the current elapsed time for adjustments next time.
+ m_data->mPrevElapsedTime = elapsedTime;
+
+ return msecTicks;
+#else
+
+#ifdef __CELLOS_LV2__
+ uint64_t freq=sys_time_get_timebase_frequency();
+ double dFreq=((double) freq) / 1000.0;
+ typedef uint64_t ClockSize;
+ ClockSize newTime;
+ SYS_TIMEBASE_GET( newTime );
+ //__asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory");
+
+ return (unsigned long int)((double(newTime-m_data->mStartTime)) / dFreq);
+#else
+
+ struct timeval currentTime;
+ gettimeofday(&currentTime, 0);
+ return (currentTime.tv_sec - m_data->mStartTime.tv_sec) * 1000 +
+ (currentTime.tv_usec - m_data->mStartTime.tv_usec) / 1000;
+#endif //__CELLOS_LV2__
+#endif
+}
+
+ /// Returns the time in us since the last call to reset or since
+ /// the Clock was created.
+unsigned long int btClock::getTimeMicroseconds()
+{
+#ifdef BT_USE_WINDOWS_TIMERS
+ LARGE_INTEGER currentTime;
+ QueryPerformanceCounter(&currentTime);
+ LONGLONG elapsedTime = currentTime.QuadPart -
+ m_data->mStartTime.QuadPart;
+
+ // Compute the number of millisecond ticks elapsed.
+ unsigned long msecTicks = (unsigned long)(1000 * elapsedTime /
+ m_data->mClockFrequency.QuadPart);
+
+ // Check for unexpected leaps in the Win32 performance counter.
+ // (This is caused by unexpected data across the PCI to ISA
+ // bridge, aka south bridge. See Microsoft KB274323.)
+ unsigned long elapsedTicks = GetTickCount() - m_data->mStartTick;
+ signed long msecOff = (signed long)(msecTicks - elapsedTicks);
+ if (msecOff < -100 || msecOff > 100)
+ {
+ // Adjust the starting time forwards.
+ LONGLONG msecAdjustment = mymin(msecOff *
+ m_data->mClockFrequency.QuadPart / 1000, elapsedTime -
+ m_data->mPrevElapsedTime);
+ m_data->mStartTime.QuadPart += msecAdjustment;
+ elapsedTime -= msecAdjustment;
+ }
+
+ // Store the current elapsed time for adjustments next time.
+ m_data->mPrevElapsedTime = elapsedTime;
+
+ // Convert to microseconds.
+ unsigned long usecTicks = (unsigned long)(1000000 * elapsedTime /
+ m_data->mClockFrequency.QuadPart);
+
+ return usecTicks;
+#else
+
+#ifdef __CELLOS_LV2__
+ uint64_t freq=sys_time_get_timebase_frequency();
+ double dFreq=((double) freq)/ 1000000.0;
+ typedef uint64_t ClockSize;
+ ClockSize newTime;
+ //__asm __volatile__( "mftb %0" : "=r" (newTime) : : "memory");
+ SYS_TIMEBASE_GET( newTime );
+
+ return (unsigned long int)((double(newTime-m_data->mStartTime)) / dFreq);
+#else
+
+ struct timeval currentTime;
+ gettimeofday(&currentTime, 0);
+ return (currentTime.tv_sec - m_data->mStartTime.tv_sec) * 1000000 +
+ (currentTime.tv_usec - m_data->mStartTime.tv_usec);
+#endif//__CELLOS_LV2__
+#endif
+}
+
+
+
+
+
+inline void Profile_Get_Ticks(unsigned long int * ticks)
+{
+ *ticks = gProfileClock.getTimeMicroseconds();
+}
+
+inline float Profile_Get_Tick_Rate(void)
+{
+// return 1000000.f;
+ return 1000.f;
+
+}
+
+
+
+/***************************************************************************************************
+**
+** CProfileNode
+**
+***************************************************************************************************/
+
+/***********************************************************************************************
+ * INPUT: *
+ * name - pointer to a static string which is the name of this profile node *
+ * parent - parent pointer *
+ * *
+ * WARNINGS: *
+ * The name is assumed to be a static pointer, only the pointer is stored and compared for *
+ * efficiency reasons. *
+ *=============================================================================================*/
+CProfileNode::CProfileNode( const char * name, CProfileNode * parent ) :
+ Name( name ),
+ TotalCalls( 0 ),
+ TotalTime( 0 ),
+ StartTime( 0 ),
+ RecursionCounter( 0 ),
+ Parent( parent ),
+ Child( NULL ),
+ Sibling( NULL )
+{
+ Reset();
+}
+
+
+void CProfileNode::CleanupMemory()
+{
+ delete ( Child);
+ Child = NULL;
+ delete ( Sibling);
+ Sibling = NULL;
+}
+
+CProfileNode::~CProfileNode( void )
+{
+ delete ( Child);
+ delete ( Sibling);
+}
+
+
+/***********************************************************************************************
+ * INPUT: *
+ * name - static string pointer to the name of the node we are searching for *
+ * *
+ * WARNINGS: *
+ * All profile names are assumed to be static strings so this function uses pointer compares *
+ * to find the named node. *
+ *=============================================================================================*/
+CProfileNode * CProfileNode::Get_Sub_Node( const char * name )
+{
+ // Try to find this sub node
+ CProfileNode * child = Child;
+ while ( child ) {
+ if ( child->Name == name ) {
+ return child;
+ }
+ child = child->Sibling;
+ }
+
+ // We didn't find it, so add it
+
+ CProfileNode * node = new CProfileNode( name, this );
+ node->Sibling = Child;
+ Child = node;
+ return node;
+}
+
+
+void CProfileNode::Reset( void )
+{
+ TotalCalls = 0;
+ TotalTime = 0.0f;
+
+
+ if ( Child ) {
+ Child->Reset();
+ }
+ if ( Sibling ) {
+ Sibling->Reset();
+ }
+}
+
+
+void CProfileNode::Call( void )
+{
+ TotalCalls++;
+ if (RecursionCounter++ == 0) {
+ Profile_Get_Ticks(&StartTime);
+ }
+}
+
+
+bool CProfileNode::Return( void )
+{
+ if ( --RecursionCounter == 0 && TotalCalls != 0 ) {
+ unsigned long int time;
+ Profile_Get_Ticks(&time);
+ time-=StartTime;
+ TotalTime += (float)time / Profile_Get_Tick_Rate();
+ }
+ return ( RecursionCounter == 0 );
+}
+
+
+/***************************************************************************************************
+**
+** CProfileIterator
+**
+***************************************************************************************************/
+CProfileIterator::CProfileIterator( CProfileNode * start )
+{
+ CurrentParent = start;
+ CurrentChild = CurrentParent->Get_Child();
+}
+
+
+void CProfileIterator::First(void)
+{
+ CurrentChild = CurrentParent->Get_Child();
+}
+
+
+void CProfileIterator::Next(void)
+{
+ CurrentChild = CurrentChild->Get_Sibling();
+}
+
+
+bool CProfileIterator::Is_Done(void)
+{
+ return CurrentChild == NULL;
+}
+
+
+void CProfileIterator::Enter_Child( int index )
+{
+ CurrentChild = CurrentParent->Get_Child();
+ while ( (CurrentChild != NULL) && (index != 0) ) {
+ index--;
+ CurrentChild = CurrentChild->Get_Sibling();
+ }
+
+ if ( CurrentChild != NULL ) {
+ CurrentParent = CurrentChild;
+ CurrentChild = CurrentParent->Get_Child();
+ }
+}
+
+
+void CProfileIterator::Enter_Parent( void )
+{
+ if ( CurrentParent->Get_Parent() != NULL ) {
+ CurrentParent = CurrentParent->Get_Parent();
+ }
+ CurrentChild = CurrentParent->Get_Child();
+}
+
+
+/***************************************************************************************************
+**
+** CProfileManager
+**
+***************************************************************************************************/
+
+CProfileNode CProfileManager::Root( "Root", NULL );
+CProfileNode * CProfileManager::CurrentNode = &CProfileManager::Root;
+int CProfileManager::FrameCounter = 0;
+unsigned long int CProfileManager::ResetTime = 0;
+
+
+/***********************************************************************************************
+ * CProfileManager::Start_Profile -- Begin a named profile *
+ * *
+ * Steps one level deeper into the tree, if a child already exists with the specified name *
+ * then it accumulates the profiling; otherwise a new child node is added to the profile tree. *
+ * *
+ * INPUT: *
+ * name - name of this profiling record *
+ * *
+ * WARNINGS: *
+ * The string used is assumed to be a static string; pointer compares are used throughout *
+ * the profiling code for efficiency. *
+ *=============================================================================================*/
+void CProfileManager::Start_Profile( const char * name )
+{
+ if (name != CurrentNode->Get_Name()) {
+ CurrentNode = CurrentNode->Get_Sub_Node( name );
+ }
+
+ CurrentNode->Call();
+}
+
+
+/***********************************************************************************************
+ * CProfileManager::Stop_Profile -- Stop timing and record the results. *
+ *=============================================================================================*/
+void CProfileManager::Stop_Profile( void )
+{
+ // Return will indicate whether we should back up to our parent (we may
+ // be profiling a recursive function)
+ if (CurrentNode->Return()) {
+ CurrentNode = CurrentNode->Get_Parent();
+ }
+}
+
+
+/***********************************************************************************************
+ * CProfileManager::Reset -- Reset the contents of the profiling system *
+ * *
+ * This resets everything except for the tree structure. All of the timing data is reset. *
+ *=============================================================================================*/
+void CProfileManager::Reset( void )
+{
+ gProfileClock.reset();
+ Root.Reset();
+ Root.Call();
+ FrameCounter = 0;
+ Profile_Get_Ticks(&ResetTime);
+}
+
+
+/***********************************************************************************************
+ * CProfileManager::Increment_Frame_Counter -- Increment the frame counter *
+ *=============================================================================================*/
+void CProfileManager::Increment_Frame_Counter( void )
+{
+ FrameCounter++;
+}
+
+
+/***********************************************************************************************
+ * CProfileManager::Get_Time_Since_Reset -- returns the elapsed time since last reset *
+ *=============================================================================================*/
+float CProfileManager::Get_Time_Since_Reset( void )
+{
+ unsigned long int time;
+ Profile_Get_Ticks(&time);
+ time -= ResetTime;
+ return (float)time / Profile_Get_Tick_Rate();
+}
+
+#include <stdio.h>
+
+void CProfileManager::dumpRecursive(CProfileIterator* profileIterator, int spacing)
+{
+ profileIterator->First();
+ if (profileIterator->Is_Done())
+ return;
+
+ float accumulated_time=0,parent_time = profileIterator->Is_Root() ? CProfileManager::Get_Time_Since_Reset() : profileIterator->Get_Current_Parent_Total_Time();
+ int i;
+ int frames_since_reset = CProfileManager::Get_Frame_Count_Since_Reset();
+ for (i=0;i<spacing;i++) printf(".");
+ printf("----------------------------------\n");
+ for (i=0;i<spacing;i++) printf(".");
+ printf("Profiling: %s (total running time: %.3f ms) ---\n", profileIterator->Get_Current_Parent_Name(), parent_time );
+ float totalTime = 0.f;
+
+
+ int numChildren = 0;
+
+ for (i = 0; !profileIterator->Is_Done(); i++,profileIterator->Next())
+ {
+ numChildren++;
+ float current_total_time = profileIterator->Get_Current_Total_Time();
+ accumulated_time += current_total_time;
+ float fraction = parent_time > SIMD_EPSILON ? (current_total_time / parent_time) * 100 : 0.f;
+ {
+ int i; for (i=0;i<spacing;i++) printf(".");
+ }
+ printf("%d -- %s (%.2f %%) :: %.3f ms / frame (%d calls)\n",i, profileIterator->Get_Current_Name(), fraction,(current_total_time / (double)frames_since_reset),profileIterator->Get_Current_Total_Calls());
+ totalTime += current_total_time;
+ //recurse into children
+ }
+
+ if (parent_time < accumulated_time)
+ {
+ printf("what's wrong\n");
+ }
+ for (i=0;i<spacing;i++) printf(".");
+ printf("%s (%.3f %%) :: %.3f ms\n", "Unaccounted:",parent_time > SIMD_EPSILON ? ((parent_time - accumulated_time) / parent_time) * 100 : 0.f, parent_time - accumulated_time);
+
+ for (i=0;i<numChildren;i++)
+ {
+ profileIterator->Enter_Child(i);
+ dumpRecursive(profileIterator,spacing+3);
+ profileIterator->Enter_Parent();
+ }
+}
+
+
+
+void CProfileManager::dumpAll()
+{
+ CProfileIterator* profileIterator = 0;
+ profileIterator = CProfileManager::Get_Iterator();
+
+ dumpRecursive(profileIterator,0);
+
+ CProfileManager::Release_Iterator(profileIterator);
+}
+
+
+
+
+#endif //BT_NO_PROFILE
diff --git a/tests/bullet/src/LinearMath/btQuickprof.h b/tests/bullet/src/LinearMath/btQuickprof.h
new file mode 100644
index 00000000..0da13ab3
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btQuickprof.h
@@ -0,0 +1,196 @@
+
+/***************************************************************************************************
+**
+** Real-Time Hierarchical Profiling for Game Programming Gems 3
+**
+** by Greg Hjelstrom & Byon Garrabrant
+**
+***************************************************************************************************/
+
+// Credits: The Clock class was inspired by the Timer classes in
+// Ogre (www.ogre3d.org).
+
+
+
+#ifndef BT_QUICK_PROF_H
+#define BT_QUICK_PROF_H
+
+//To disable built-in profiling, please comment out next line
+//#define BT_NO_PROFILE 1
+#ifndef BT_NO_PROFILE
+#include <stdio.h>//@todo remove this, backwards compatibility
+#include "btScalar.h"
+#include "btAlignedAllocator.h"
+#include <new>
+
+
+
+
+
+#define USE_BT_CLOCK 1
+
+#ifdef USE_BT_CLOCK
+
+///The btClock is a portable basic clock that measures accurate time in seconds, use for profiling.
+class btClock
+{
+public:
+ btClock();
+
+ btClock(const btClock& other);
+ btClock& operator=(const btClock& other);
+
+ ~btClock();
+
+ /// Resets the initial reference time.
+ void reset();
+
+ /// Returns the time in ms since the last call to reset or since
+ /// the btClock was created.
+ unsigned long int getTimeMilliseconds();
+
+ /// Returns the time in us since the last call to reset or since
+ /// the Clock was created.
+ unsigned long int getTimeMicroseconds();
+private:
+ struct btClockData* m_data;
+};
+
+#endif //USE_BT_CLOCK
+
+
+
+
+///A node in the Profile Hierarchy Tree
+class CProfileNode {
+
+public:
+ CProfileNode( const char * name, CProfileNode * parent );
+ ~CProfileNode( void );
+
+ CProfileNode * Get_Sub_Node( const char * name );
+
+ CProfileNode * Get_Parent( void ) { return Parent; }
+ CProfileNode * Get_Sibling( void ) { return Sibling; }
+ CProfileNode * Get_Child( void ) { return Child; }
+
+ void CleanupMemory();
+ void Reset( void );
+ void Call( void );
+ bool Return( void );
+
+ const char * Get_Name( void ) { return Name; }
+ int Get_Total_Calls( void ) { return TotalCalls; }
+ float Get_Total_Time( void ) { return TotalTime; }
+
+protected:
+
+ const char * Name;
+ int TotalCalls;
+ float TotalTime;
+ unsigned long int StartTime;
+ int RecursionCounter;
+
+ CProfileNode * Parent;
+ CProfileNode * Child;
+ CProfileNode * Sibling;
+};
+
+///An iterator to navigate through the tree
+class CProfileIterator
+{
+public:
+ // Access all the children of the current parent
+ void First(void);
+ void Next(void);
+ bool Is_Done(void);
+ bool Is_Root(void) { return (CurrentParent->Get_Parent() == 0); }
+
+ void Enter_Child( int index ); // Make the given child the new parent
+ void Enter_Largest_Child( void ); // Make the largest child the new parent
+ void Enter_Parent( void ); // Make the current parent's parent the new parent
+
+ // Access the current child
+ const char * Get_Current_Name( void ) { return CurrentChild->Get_Name(); }
+ int Get_Current_Total_Calls( void ) { return CurrentChild->Get_Total_Calls(); }
+ float Get_Current_Total_Time( void ) { return CurrentChild->Get_Total_Time(); }
+
+ // Access the current parent
+ const char * Get_Current_Parent_Name( void ) { return CurrentParent->Get_Name(); }
+ int Get_Current_Parent_Total_Calls( void ) { return CurrentParent->Get_Total_Calls(); }
+ float Get_Current_Parent_Total_Time( void ) { return CurrentParent->Get_Total_Time(); }
+
+protected:
+
+ CProfileNode * CurrentParent;
+ CProfileNode * CurrentChild;
+
+ CProfileIterator( CProfileNode * start );
+ friend class CProfileManager;
+};
+
+
+///The Manager for the Profile system
+class CProfileManager {
+public:
+ static void Start_Profile( const char * name );
+ static void Stop_Profile( void );
+
+ static void CleanupMemory(void)
+ {
+ Root.CleanupMemory();
+ }
+
+ static void Reset( void );
+ static void Increment_Frame_Counter( void );
+ static int Get_Frame_Count_Since_Reset( void ) { return FrameCounter; }
+ static float Get_Time_Since_Reset( void );
+
+ static CProfileIterator * Get_Iterator( void )
+ {
+
+ return new CProfileIterator( &Root );
+ }
+ static void Release_Iterator( CProfileIterator * iterator ) { delete ( iterator); }
+
+ static void dumpRecursive(CProfileIterator* profileIterator, int spacing);
+
+ static void dumpAll();
+
+private:
+ static CProfileNode Root;
+ static CProfileNode * CurrentNode;
+ static int FrameCounter;
+ static unsigned long int ResetTime;
+};
+
+
+///ProfileSampleClass is a simple way to profile a function's scope
+///Use the BT_PROFILE macro at the start of scope to time
+class CProfileSample {
+public:
+ CProfileSample( const char * name )
+ {
+ CProfileManager::Start_Profile( name );
+ }
+
+ ~CProfileSample( void )
+ {
+ CProfileManager::Stop_Profile();
+ }
+};
+
+
+#define BT_PROFILE( name ) CProfileSample __profile( name )
+
+#else
+
+#define BT_PROFILE( name )
+
+#endif //#ifndef BT_NO_PROFILE
+
+
+
+#endif //BT_QUICK_PROF_H
+
+
diff --git a/tests/bullet/src/LinearMath/btRandom.h b/tests/bullet/src/LinearMath/btRandom.h
new file mode 100644
index 00000000..4cbfc6bf
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btRandom.h
@@ -0,0 +1,42 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_GEN_RANDOM_H
+#define BT_GEN_RANDOM_H
+
+#ifdef MT19937
+
+#include <limits.h>
+#include <mt19937.h>
+
+#define GEN_RAND_MAX UINT_MAX
+
+SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand(seed); }
+SIMD_FORCE_INLINE unsigned int GEN_rand() { return genrand_int32(); }
+
+#else
+
+#include <stdlib.h>
+
+#define GEN_RAND_MAX RAND_MAX
+
+SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); }
+SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand(); }
+
+#endif
+
+#endif //BT_GEN_RANDOM_H
+
diff --git a/tests/bullet/src/LinearMath/btScalar.h b/tests/bullet/src/LinearMath/btScalar.h
new file mode 100644
index 00000000..d36af1e8
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btScalar.h
@@ -0,0 +1,522 @@
+/*
+Copyright (c) 2003-2009 Erwin Coumans http://bullet.googlecode.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_SCALAR_H
+#define BT_SCALAR_H
+
+#ifdef BT_MANAGED_CODE
+//Aligned data types not supported in managed code
+#pragma unmanaged
+#endif
+
+
+#include <math.h>
+#include <stdlib.h>//size_t for MSVC 6.0
+#include <float.h>
+
+/* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/
+#define BT_BULLET_VERSION 278
+
+inline int btGetVersion()
+{
+ return BT_BULLET_VERSION;
+}
+
+#if defined(DEBUG) || defined (_DEBUG)
+#define BT_DEBUG
+#endif
+
+
+#ifdef _WIN32
+
+ #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
+
+ #define SIMD_FORCE_INLINE inline
+ #define ATTRIBUTE_ALIGNED16(a) a
+ #define ATTRIBUTE_ALIGNED64(a) a
+ #define ATTRIBUTE_ALIGNED128(a) a
+ #else
+ //#define BT_HAS_ALIGNED_ALLOCATOR
+ #pragma warning(disable : 4324) // disable padding warning
+// #pragma warning(disable:4530) // Disable the exception disable but used in MSCV Stl warning.
+// #pragma warning(disable:4996) //Turn off warnings about deprecated C routines
+// #pragma warning(disable:4786) // Disable the "debug name too long" warning
+
+ #define SIMD_FORCE_INLINE __forceinline
+ #define ATTRIBUTE_ALIGNED16(a) __declspec(align(16)) a
+ #define ATTRIBUTE_ALIGNED64(a) __declspec(align(64)) a
+ #define ATTRIBUTE_ALIGNED128(a) __declspec (align(128)) a
+ #ifdef _XBOX
+ #define BT_USE_VMX128
+
+ #include <ppcintrinsics.h>
+ #define BT_HAVE_NATIVE_FSEL
+ #define btFsel(a,b,c) __fsel((a),(b),(c))
+ #else
+
+#if (defined (_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined (BT_USE_DOUBLE_PRECISION))
+ #define BT_USE_SSE
+ #include <emmintrin.h>
+#endif
+
+ #endif//_XBOX
+
+ #endif //__MINGW32__
+
+ #include <assert.h>
+#ifdef BT_DEBUG
+ #define btAssert assert
+#else
+ #define btAssert(x)
+#endif
+ //btFullAssert is optional, slows down a lot
+ #define btFullAssert(x)
+
+ #define btLikely(_c) _c
+ #define btUnlikely(_c) _c
+
+#else
+
+#if defined (__CELLOS_LV2__)
+ #define SIMD_FORCE_INLINE inline __attribute__((always_inline))
+ #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
+ #define ATTRIBUTE_ALIGNED64(a) a __attribute__ ((aligned (64)))
+ #define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
+ #ifndef assert
+ #include <assert.h>
+ #endif
+#ifdef BT_DEBUG
+#ifdef __SPU__
+#include <spu_printf.h>
+#define printf spu_printf
+ #define btAssert(x) {if(!(x)){printf("Assert "__FILE__ ":%u ("#x")\n", __LINE__);spu_hcmpeq(0,0);}}
+#else
+ #define btAssert assert
+#endif
+
+#else
+ #define btAssert(x)
+#endif
+ //btFullAssert is optional, slows down a lot
+ #define btFullAssert(x)
+
+ #define btLikely(_c) _c
+ #define btUnlikely(_c) _c
+
+#else
+
+#ifdef USE_LIBSPE2
+
+ #define SIMD_FORCE_INLINE __inline
+ #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
+ #define ATTRIBUTE_ALIGNED64(a) a __attribute__ ((aligned (64)))
+ #define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
+ #ifndef assert
+ #include <assert.h>
+ #endif
+#ifdef BT_DEBUG
+ #define btAssert assert
+#else
+ #define btAssert(x)
+#endif
+ //btFullAssert is optional, slows down a lot
+ #define btFullAssert(x)
+
+
+ #define btLikely(_c) __builtin_expect((_c), 1)
+ #define btUnlikely(_c) __builtin_expect((_c), 0)
+
+
+#else
+ //non-windows systems
+
+#if (defined (__APPLE__) && defined (__i386__) && (!defined (BT_USE_DOUBLE_PRECISION)))
+ #define BT_USE_SSE
+ #include <emmintrin.h>
+
+ #define SIMD_FORCE_INLINE inline
+///@todo: check out alignment methods for other platforms/compilers
+ #define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
+ #define ATTRIBUTE_ALIGNED64(a) a __attribute__ ((aligned (64)))
+ #define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
+ #ifndef assert
+ #include <assert.h>
+ #endif
+
+ #if defined(DEBUG) || defined (_DEBUG)
+ #define btAssert assert
+ #else
+ #define btAssert(x)
+ #endif
+
+ //btFullAssert is optional, slows down a lot
+ #define btFullAssert(x)
+ #define btLikely(_c) _c
+ #define btUnlikely(_c) _c
+
+#else
+
+ #define SIMD_FORCE_INLINE inline
+ ///@todo: check out alignment methods for other platforms/compilers
+ ///#define ATTRIBUTE_ALIGNED16(a) a __attribute__ ((aligned (16)))
+ ///#define ATTRIBUTE_ALIGNED64(a) a __attribute__ ((aligned (64)))
+ ///#define ATTRIBUTE_ALIGNED128(a) a __attribute__ ((aligned (128)))
+ #define ATTRIBUTE_ALIGNED16(a) a
+ #define ATTRIBUTE_ALIGNED64(a) a
+ #define ATTRIBUTE_ALIGNED128(a) a
+ #ifndef assert
+ #include <assert.h>
+ #endif
+
+#if defined(DEBUG) || defined (_DEBUG)
+ #define btAssert assert
+#else
+ #define btAssert(x)
+#endif
+
+ //btFullAssert is optional, slows down a lot
+ #define btFullAssert(x)
+ #define btLikely(_c) _c
+ #define btUnlikely(_c) _c
+#endif //__APPLE__
+
+#endif // LIBSPE2
+
+#endif //__CELLOS_LV2__
+#endif
+
+
+///The btScalar type abstracts floating point numbers, to easily switch between double and single floating point precision.
+#if defined(BT_USE_DOUBLE_PRECISION)
+typedef double btScalar;
+//this number could be bigger in double precision
+#define BT_LARGE_FLOAT 1e30
+#else
+typedef float btScalar;
+//keep BT_LARGE_FLOAT*BT_LARGE_FLOAT < FLT_MAX
+#define BT_LARGE_FLOAT 1e18f
+#endif
+
+
+
+#define BT_DECLARE_ALIGNED_ALLOCATOR() \
+ SIMD_FORCE_INLINE void* operator new(size_t sizeInBytes) { return btAlignedAlloc(sizeInBytes,16); } \
+ SIMD_FORCE_INLINE void operator delete(void* ptr) { btAlignedFree(ptr); } \
+ SIMD_FORCE_INLINE void* operator new(size_t, void* ptr) { return ptr; } \
+ SIMD_FORCE_INLINE void operator delete(void*, void*) { } \
+ SIMD_FORCE_INLINE void* operator new[](size_t sizeInBytes) { return btAlignedAlloc(sizeInBytes,16); } \
+ SIMD_FORCE_INLINE void operator delete[](void* ptr) { btAlignedFree(ptr); } \
+ SIMD_FORCE_INLINE void* operator new[](size_t, void* ptr) { return ptr; } \
+ SIMD_FORCE_INLINE void operator delete[](void*, void*) { } \
+
+
+
+#if defined(BT_USE_DOUBLE_PRECISION) || defined(BT_FORCE_DOUBLE_FUNCTIONS)
+
+SIMD_FORCE_INLINE btScalar btSqrt(btScalar x) { return sqrt(x); }
+SIMD_FORCE_INLINE btScalar btFabs(btScalar x) { return fabs(x); }
+SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cos(x); }
+SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sin(x); }
+SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tan(x); }
+SIMD_FORCE_INLINE btScalar btAcos(btScalar x) { if (x<btScalar(-1)) x=btScalar(-1); if (x>btScalar(1)) x=btScalar(1); return acos(x); }
+SIMD_FORCE_INLINE btScalar btAsin(btScalar x) { if (x<btScalar(-1)) x=btScalar(-1); if (x>btScalar(1)) x=btScalar(1); return asin(x); }
+SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atan(x); }
+SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2(x, y); }
+SIMD_FORCE_INLINE btScalar btExp(btScalar x) { return exp(x); }
+SIMD_FORCE_INLINE btScalar btLog(btScalar x) { return log(x); }
+SIMD_FORCE_INLINE btScalar btPow(btScalar x,btScalar y) { return pow(x,y); }
+SIMD_FORCE_INLINE btScalar btFmod(btScalar x,btScalar y) { return fmod(x,y); }
+
+#else
+
+SIMD_FORCE_INLINE btScalar btSqrt(btScalar y)
+{
+#ifdef USE_APPROXIMATION
+ double x, z, tempf;
+ unsigned long *tfptr = ((unsigned long *)&tempf) + 1;
+
+ tempf = y;
+ *tfptr = (0xbfcdd90a - *tfptr)>>1; /* estimate of 1/sqrt(y) */
+ x = tempf;
+ z = y*btScalar(0.5);
+ x = (btScalar(1.5)*x)-(x*x)*(x*z); /* iteration formula */
+ x = (btScalar(1.5)*x)-(x*x)*(x*z);
+ x = (btScalar(1.5)*x)-(x*x)*(x*z);
+ x = (btScalar(1.5)*x)-(x*x)*(x*z);
+ x = (btScalar(1.5)*x)-(x*x)*(x*z);
+ return x*y;
+#else
+ return sqrtf(y);
+#endif
+}
+SIMD_FORCE_INLINE btScalar btFabs(btScalar x) { return fabsf(x); }
+SIMD_FORCE_INLINE btScalar btCos(btScalar x) { return cosf(x); }
+SIMD_FORCE_INLINE btScalar btSin(btScalar x) { return sinf(x); }
+SIMD_FORCE_INLINE btScalar btTan(btScalar x) { return tanf(x); }
+SIMD_FORCE_INLINE btScalar btAcos(btScalar x) {
+ if (x<btScalar(-1))
+ x=btScalar(-1);
+ if (x>btScalar(1))
+ x=btScalar(1);
+ return acosf(x);
+}
+SIMD_FORCE_INLINE btScalar btAsin(btScalar x) {
+ if (x<btScalar(-1))
+ x=btScalar(-1);
+ if (x>btScalar(1))
+ x=btScalar(1);
+ return asinf(x);
+}
+SIMD_FORCE_INLINE btScalar btAtan(btScalar x) { return atanf(x); }
+SIMD_FORCE_INLINE btScalar btAtan2(btScalar x, btScalar y) { return atan2f(x, y); }
+SIMD_FORCE_INLINE btScalar btExp(btScalar x) { return expf(x); }
+SIMD_FORCE_INLINE btScalar btLog(btScalar x) { return logf(x); }
+SIMD_FORCE_INLINE btScalar btPow(btScalar x,btScalar y) { return powf(x,y); }
+SIMD_FORCE_INLINE btScalar btFmod(btScalar x,btScalar y) { return fmodf(x,y); }
+
+#endif
+
+#define SIMD_2_PI btScalar(6.283185307179586232)
+#define SIMD_PI (SIMD_2_PI * btScalar(0.5))
+#define SIMD_HALF_PI (SIMD_2_PI * btScalar(0.25))
+#define SIMD_RADS_PER_DEG (SIMD_2_PI / btScalar(360.0))
+#define SIMD_DEGS_PER_RAD (btScalar(360.0) / SIMD_2_PI)
+#define SIMDSQRT12 btScalar(0.7071067811865475244008443621048490)
+
+#define btRecipSqrt(x) ((btScalar)(btScalar(1.0)/btSqrt(btScalar(x)))) /* reciprocal square root */
+
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define SIMD_EPSILON DBL_EPSILON
+#define SIMD_INFINITY DBL_MAX
+#else
+#define SIMD_EPSILON FLT_EPSILON
+#define SIMD_INFINITY FLT_MAX
+#endif
+
+SIMD_FORCE_INLINE btScalar btAtan2Fast(btScalar y, btScalar x)
+{
+ btScalar coeff_1 = SIMD_PI / 4.0f;
+ btScalar coeff_2 = 3.0f * coeff_1;
+ btScalar abs_y = btFabs(y);
+ btScalar angle;
+ if (x >= 0.0f) {
+ btScalar r = (x - abs_y) / (x + abs_y);
+ angle = coeff_1 - coeff_1 * r;
+ } else {
+ btScalar r = (x + abs_y) / (abs_y - x);
+ angle = coeff_2 - coeff_1 * r;
+ }
+ return (y < 0.0f) ? -angle : angle;
+}
+
+SIMD_FORCE_INLINE bool btFuzzyZero(btScalar x) { return btFabs(x) < SIMD_EPSILON; }
+
+SIMD_FORCE_INLINE bool btEqual(btScalar a, btScalar eps) {
+ return (((a) <= eps) && !((a) < -eps));
+}
+SIMD_FORCE_INLINE bool btGreaterEqual (btScalar a, btScalar eps) {
+ return (!((a) <= eps));
+}
+
+
+SIMD_FORCE_INLINE int btIsNegative(btScalar x) {
+ return x < btScalar(0.0) ? 1 : 0;
+}
+
+SIMD_FORCE_INLINE btScalar btRadians(btScalar x) { return x * SIMD_RADS_PER_DEG; }
+SIMD_FORCE_INLINE btScalar btDegrees(btScalar x) { return x * SIMD_DEGS_PER_RAD; }
+
+#define BT_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
+
+#ifndef btFsel
+SIMD_FORCE_INLINE btScalar btFsel(btScalar a, btScalar b, btScalar c)
+{
+ return a >= 0 ? b : c;
+}
+#endif
+#define btFsels(a,b,c) (btScalar)btFsel(a,b,c)
+
+
+SIMD_FORCE_INLINE bool btMachineIsLittleEndian()
+{
+ long int i = 1;
+ const char *p = (const char *) &i;
+ if (p[0] == 1) // Lowest address contains the least significant byte
+ return true;
+ else
+ return false;
+}
+
+
+
+///btSelect avoids branches, which makes performance much better for consoles like Playstation 3 and XBox 360
+///Thanks Phil Knight. See also http://www.cellperformance.com/articles/2006/04/more_techniques_for_eliminatin_1.html
+SIMD_FORCE_INLINE unsigned btSelect(unsigned condition, unsigned valueIfConditionNonZero, unsigned valueIfConditionZero)
+{
+ // Set testNz to 0xFFFFFFFF if condition is nonzero, 0x00000000 if condition is zero
+ // Rely on positive value or'ed with its negative having sign bit on
+ // and zero value or'ed with its negative (which is still zero) having sign bit off
+ // Use arithmetic shift right, shifting the sign bit through all 32 bits
+ unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31);
+ unsigned testEqz = ~testNz;
+ return ((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz));
+}
+SIMD_FORCE_INLINE int btSelect(unsigned condition, int valueIfConditionNonZero, int valueIfConditionZero)
+{
+ unsigned testNz = (unsigned)(((int)condition | -(int)condition) >> 31);
+ unsigned testEqz = ~testNz;
+ return static_cast<int>((valueIfConditionNonZero & testNz) | (valueIfConditionZero & testEqz));
+}
+SIMD_FORCE_INLINE float btSelect(unsigned condition, float valueIfConditionNonZero, float valueIfConditionZero)
+{
+#ifdef BT_HAVE_NATIVE_FSEL
+ return (float)btFsel((btScalar)condition - btScalar(1.0f), valueIfConditionNonZero, valueIfConditionZero);
+#else
+ return (condition != 0) ? valueIfConditionNonZero : valueIfConditionZero;
+#endif
+}
+
+template<typename T> SIMD_FORCE_INLINE void btSwap(T& a, T& b)
+{
+ T tmp = a;
+ a = b;
+ b = tmp;
+}
+
+
+//PCK: endian swapping functions
+SIMD_FORCE_INLINE unsigned btSwapEndian(unsigned val)
+{
+ return (((val & 0xff000000) >> 24) | ((val & 0x00ff0000) >> 8) | ((val & 0x0000ff00) << 8) | ((val & 0x000000ff) << 24));
+}
+
+SIMD_FORCE_INLINE unsigned short btSwapEndian(unsigned short val)
+{
+ return static_cast<unsigned short>(((val & 0xff00) >> 8) | ((val & 0x00ff) << 8));
+}
+
+SIMD_FORCE_INLINE unsigned btSwapEndian(int val)
+{
+ return btSwapEndian((unsigned)val);
+}
+
+SIMD_FORCE_INLINE unsigned short btSwapEndian(short val)
+{
+ return btSwapEndian((unsigned short) val);
+}
+
+///btSwapFloat uses using char pointers to swap the endianness
+////btSwapFloat/btSwapDouble will NOT return a float, because the machine might 'correct' invalid floating point values
+///Not all values of sign/exponent/mantissa are valid floating point numbers according to IEEE 754.
+///When a floating point unit is faced with an invalid value, it may actually change the value, or worse, throw an exception.
+///In most systems, running user mode code, you wouldn't get an exception, but instead the hardware/os/runtime will 'fix' the number for you.
+///so instead of returning a float/double, we return integer/long long integer
+SIMD_FORCE_INLINE unsigned int btSwapEndianFloat(float d)
+{
+ unsigned int a = 0;
+ unsigned char *dst = (unsigned char *)&a;
+ unsigned char *src = (unsigned char *)&d;
+
+ dst[0] = src[3];
+ dst[1] = src[2];
+ dst[2] = src[1];
+ dst[3] = src[0];
+ return a;
+}
+
+// unswap using char pointers
+SIMD_FORCE_INLINE float btUnswapEndianFloat(unsigned int a)
+{
+ float d = 0.0f;
+ unsigned char *src = (unsigned char *)&a;
+ unsigned char *dst = (unsigned char *)&d;
+
+ dst[0] = src[3];
+ dst[1] = src[2];
+ dst[2] = src[1];
+ dst[3] = src[0];
+
+ return d;
+}
+
+
+// swap using char pointers
+SIMD_FORCE_INLINE void btSwapEndianDouble(double d, unsigned char* dst)
+{
+ unsigned char *src = (unsigned char *)&d;
+
+ dst[0] = src[7];
+ dst[1] = src[6];
+ dst[2] = src[5];
+ dst[3] = src[4];
+ dst[4] = src[3];
+ dst[5] = src[2];
+ dst[6] = src[1];
+ dst[7] = src[0];
+
+}
+
+// unswap using char pointers
+SIMD_FORCE_INLINE double btUnswapEndianDouble(const unsigned char *src)
+{
+ double d = 0.0;
+ unsigned char *dst = (unsigned char *)&d;
+
+ dst[0] = src[7];
+ dst[1] = src[6];
+ dst[2] = src[5];
+ dst[3] = src[4];
+ dst[4] = src[3];
+ dst[5] = src[2];
+ dst[6] = src[1];
+ dst[7] = src[0];
+
+ return d;
+}
+
+// returns normalized value in range [-SIMD_PI, SIMD_PI]
+SIMD_FORCE_INLINE btScalar btNormalizeAngle(btScalar angleInRadians)
+{
+ angleInRadians = btFmod(angleInRadians, SIMD_2_PI);
+ if(angleInRadians < -SIMD_PI)
+ {
+ return angleInRadians + SIMD_2_PI;
+ }
+ else if(angleInRadians > SIMD_PI)
+ {
+ return angleInRadians - SIMD_2_PI;
+ }
+ else
+ {
+ return angleInRadians;
+ }
+}
+
+///rudimentary class to provide type info
+struct btTypedObject
+{
+ btTypedObject(int objectType)
+ :m_objectType(objectType)
+ {
+ }
+ int m_objectType;
+ inline int getObjectType() const
+ {
+ return m_objectType;
+ }
+};
+#endif //BT_SCALAR_H
diff --git a/tests/bullet/src/LinearMath/btSerializer.cpp b/tests/bullet/src/LinearMath/btSerializer.cpp
new file mode 100644
index 00000000..c6d387e6
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btSerializer.cpp
@@ -0,0 +1,832 @@
+unsigned char sBulletDNAstr[]= {
+83,68,78,65,78,65,77,69,42,1,0,0,109,95,115,105,122,101,0,109,
+95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95,
+99,111,108,108,105,115,105,111,110,83,104,97,112,101,115,0,109,95,99,111,
+108,108,105,115,105,111,110,79,98,106,101,99,116,115,0,109,95,99,111,110,
+115,116,114,97,105,110,116,115,0,42,102,105,114,115,116,0,42,108,97,115,
+116,0,109,95,102,108,111,97,116,115,91,52,93,0,109,95,101,108,91,51,
+93,0,109,95,98,97,115,105,115,0,109,95,111,114,105,103,105,110,0,109,
+95,114,111,111,116,78,111,100,101,73,110,100,101,120,0,109,95,115,117,98,
+116,114,101,101,83,105,122,101,0,109,95,113,117,97,110,116,105,122,101,100,
+65,97,98,98,77,105,110,91,51,93,0,109,95,113,117,97,110,116,105,122,
+101,100,65,97,98,98,77,97,120,91,51,93,0,109,95,97,97,98,98,77,
+105,110,79,114,103,0,109,95,97,97,98,98,77,97,120,79,114,103,0,109,
+95,101,115,99,97,112,101,73,110,100,101,120,0,109,95,115,117,98,80,97,
+114,116,0,109,95,116,114,105,97,110,103,108,101,73,110,100,101,120,0,109,
+95,112,97,100,91,52,93,0,109,95,101,115,99,97,112,101,73,110,100,101,
+120,79,114,84,114,105,97,110,103,108,101,73,110,100,101,120,0,109,95,98,
+118,104,65,97,98,98,77,105,110,0,109,95,98,118,104,65,97,98,98,77,
+97,120,0,109,95,98,118,104,81,117,97,110,116,105,122,97,116,105,111,110,
+0,109,95,99,117,114,78,111,100,101,73,110,100,101,120,0,109,95,117,115,
+101,81,117,97,110,116,105,122,97,116,105,111,110,0,109,95,110,117,109,67,
+111,110,116,105,103,117,111,117,115,76,101,97,102,78,111,100,101,115,0,109,
+95,110,117,109,81,117,97,110,116,105,122,101,100,67,111,110,116,105,103,117,
+111,117,115,78,111,100,101,115,0,42,109,95,99,111,110,116,105,103,117,111,
+117,115,78,111,100,101,115,80,116,114,0,42,109,95,113,117,97,110,116,105,
+122,101,100,67,111,110,116,105,103,117,111,117,115,78,111,100,101,115,80,116,
+114,0,42,109,95,115,117,98,84,114,101,101,73,110,102,111,80,116,114,0,
+109,95,116,114,97,118,101,114,115,97,108,77,111,100,101,0,109,95,110,117,
+109,83,117,98,116,114,101,101,72,101,97,100,101,114,115,0,42,109,95,110,
+97,109,101,0,109,95,115,104,97,112,101,84,121,112,101,0,109,95,112,97,
+100,100,105,110,103,91,52,93,0,109,95,99,111,108,108,105,115,105,111,110,
+83,104,97,112,101,68,97,116,97,0,109,95,108,111,99,97,108,83,99,97,
+108,105,110,103,0,109,95,112,108,97,110,101,78,111,114,109,97,108,0,109,
+95,112,108,97,110,101,67,111,110,115,116,97,110,116,0,109,95,105,109,112,
+108,105,99,105,116,83,104,97,112,101,68,105,109,101,110,115,105,111,110,115,
+0,109,95,99,111,108,108,105,115,105,111,110,77,97,114,103,105,110,0,109,
+95,112,97,100,100,105,110,103,0,109,95,112,111,115,0,109,95,114,97,100,
+105,117,115,0,109,95,99,111,110,118,101,120,73,110,116,101,114,110,97,108,
+83,104,97,112,101,68,97,116,97,0,42,109,95,108,111,99,97,108,80,111,
+115,105,116,105,111,110,65,114,114,97,121,80,116,114,0,109,95,108,111,99,
+97,108,80,111,115,105,116,105,111,110,65,114,114,97,121,83,105,122,101,0,
+109,95,118,97,108,117,101,0,109,95,112,97,100,91,50,93,0,109,95,118,
+97,108,117,101,115,91,51,93,0,109,95,112,97,100,0,42,109,95,118,101,
+114,116,105,99,101,115,51,102,0,42,109,95,118,101,114,116,105,99,101,115,
+51,100,0,42,109,95,105,110,100,105,99,101,115,51,50,0,42,109,95,51,
+105,110,100,105,99,101,115,49,54,0,42,109,95,51,105,110,100,105,99,101,
+115,56,0,42,109,95,105,110,100,105,99,101,115,49,54,0,109,95,110,117,
+109,84,114,105,97,110,103,108,101,115,0,109,95,110,117,109,86,101,114,116,
+105,99,101,115,0,42,109,95,109,101,115,104,80,97,114,116,115,80,116,114,
+0,109,95,115,99,97,108,105,110,103,0,109,95,110,117,109,77,101,115,104,
+80,97,114,116,115,0,109,95,109,101,115,104,73,110,116,101,114,102,97,99,
+101,0,42,109,95,113,117,97,110,116,105,122,101,100,70,108,111,97,116,66,
+118,104,0,42,109,95,113,117,97,110,116,105,122,101,100,68,111,117,98,108,
+101,66,118,104,0,42,109,95,116,114,105,97,110,103,108,101,73,110,102,111,
+77,97,112,0,109,95,112,97,100,51,91,52,93,0,109,95,116,114,105,109,
+101,115,104,83,104,97,112,101,68,97,116,97,0,109,95,116,114,97,110,115,
+102,111,114,109,0,42,109,95,99,104,105,108,100,83,104,97,112,101,0,109,
+95,99,104,105,108,100,83,104,97,112,101,84,121,112,101,0,109,95,99,104,
+105,108,100,77,97,114,103,105,110,0,42,109,95,99,104,105,108,100,83,104,
+97,112,101,80,116,114,0,109,95,110,117,109,67,104,105,108,100,83,104,97,
+112,101,115,0,109,95,117,112,65,120,105,115,0,109,95,102,108,97,103,115,
+0,109,95,101,100,103,101,86,48,86,49,65,110,103,108,101,0,109,95,101,
+100,103,101,86,49,86,50,65,110,103,108,101,0,109,95,101,100,103,101,86,
+50,86,48,65,110,103,108,101,0,42,109,95,104,97,115,104,84,97,98,108,
+101,80,116,114,0,42,109,95,110,101,120,116,80,116,114,0,42,109,95,118,
+97,108,117,101,65,114,114,97,121,80,116,114,0,42,109,95,107,101,121,65,
+114,114,97,121,80,116,114,0,109,95,99,111,110,118,101,120,69,112,115,105,
+108,111,110,0,109,95,112,108,97,110,97,114,69,112,115,105,108,111,110,0,
+109,95,101,113,117,97,108,86,101,114,116,101,120,84,104,114,101,115,104,111,
+108,100,0,109,95,101,100,103,101,68,105,115,116,97,110,99,101,84,104,114,
+101,115,104,111,108,100,0,109,95,122,101,114,111,65,114,101,97,84,104,114,
+101,115,104,111,108,100,0,109,95,110,101,120,116,83,105,122,101,0,109,95,
+104,97,115,104,84,97,98,108,101,83,105,122,101,0,109,95,110,117,109,86,
+97,108,117,101,115,0,109,95,110,117,109,75,101,121,115,0,109,95,103,105,
+109,112,97,99,116,83,117,98,84,121,112,101,0,42,109,95,117,110,115,99,
+97,108,101,100,80,111,105,110,116,115,70,108,111,97,116,80,116,114,0,42,
+109,95,117,110,115,99,97,108,101,100,80,111,105,110,116,115,68,111,117,98,
+108,101,80,116,114,0,109,95,110,117,109,85,110,115,99,97,108,101,100,80,
+111,105,110,116,115,0,109,95,112,97,100,100,105,110,103,51,91,52,93,0,
+42,109,95,98,114,111,97,100,112,104,97,115,101,72,97,110,100,108,101,0,
+42,109,95,99,111,108,108,105,115,105,111,110,83,104,97,112,101,0,42,109,
+95,114,111,111,116,67,111,108,108,105,115,105,111,110,83,104,97,112,101,0,
+109,95,119,111,114,108,100,84,114,97,110,115,102,111,114,109,0,109,95,105,
+110,116,101,114,112,111,108,97,116,105,111,110,87,111,114,108,100,84,114,97,
+110,115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,108,97,116,105,
+111,110,76,105,110,101,97,114,86,101,108,111,99,105,116,121,0,109,95,105,
+110,116,101,114,112,111,108,97,116,105,111,110,65,110,103,117,108,97,114,86,
+101,108,111,99,105,116,121,0,109,95,97,110,105,115,111,116,114,111,112,105,
+99,70,114,105,99,116,105,111,110,0,109,95,99,111,110,116,97,99,116,80,
+114,111,99,101,115,115,105,110,103,84,104,114,101,115,104,111,108,100,0,109,
+95,100,101,97,99,116,105,118,97,116,105,111,110,84,105,109,101,0,109,95,
+102,114,105,99,116,105,111,110,0,109,95,114,101,115,116,105,116,117,116,105,
+111,110,0,109,95,104,105,116,70,114,97,99,116,105,111,110,0,109,95,99,
+99,100,83,119,101,112,116,83,112,104,101,114,101,82,97,100,105,117,115,0,
+109,95,99,99,100,77,111,116,105,111,110,84,104,114,101,115,104,111,108,100,
+0,109,95,104,97,115,65,110,105,115,111,116,114,111,112,105,99,70,114,105,
+99,116,105,111,110,0,109,95,99,111,108,108,105,115,105,111,110,70,108,97,
+103,115,0,109,95,105,115,108,97,110,100,84,97,103,49,0,109,95,99,111,
+109,112,97,110,105,111,110,73,100,0,109,95,97,99,116,105,118,97,116,105,
+111,110,83,116,97,116,101,49,0,109,95,105,110,116,101,114,110,97,108,84,
+121,112,101,0,109,95,99,104,101,99,107,67,111,108,108,105,100,101,87,105,
+116,104,0,109,95,99,111,108,108,105,115,105,111,110,79,98,106,101,99,116,
+68,97,116,97,0,109,95,105,110,118,73,110,101,114,116,105,97,84,101,110,
+115,111,114,87,111,114,108,100,0,109,95,108,105,110,101,97,114,86,101,108,
+111,99,105,116,121,0,109,95,97,110,103,117,108,97,114,86,101,108,111,99,
+105,116,121,0,109,95,97,110,103,117,108,97,114,70,97,99,116,111,114,0,
+109,95,108,105,110,101,97,114,70,97,99,116,111,114,0,109,95,103,114,97,
+118,105,116,121,0,109,95,103,114,97,118,105,116,121,95,97,99,99,101,108,
+101,114,97,116,105,111,110,0,109,95,105,110,118,73,110,101,114,116,105,97,
+76,111,99,97,108,0,109,95,116,111,116,97,108,70,111,114,99,101,0,109,
+95,116,111,116,97,108,84,111,114,113,117,101,0,109,95,105,110,118,101,114,
+115,101,77,97,115,115,0,109,95,108,105,110,101,97,114,68,97,109,112,105,
+110,103,0,109,95,97,110,103,117,108,97,114,68,97,109,112,105,110,103,0,
+109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,112,105,110,103,70,
+97,99,116,111,114,0,109,95,97,100,100,105,116,105,111,110,97,108,76,105,
+110,101,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,
+83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,
+108,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,83,
+113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,108,
+97,114,68,97,109,112,105,110,103,70,97,99,116,111,114,0,109,95,108,105,
+110,101,97,114,83,108,101,101,112,105,110,103,84,104,114,101,115,104,111,108,
+100,0,109,95,97,110,103,117,108,97,114,83,108,101,101,112,105,110,103,84,
+104,114,101,115,104,111,108,100,0,109,95,97,100,100,105,116,105,111,110,97,
+108,68,97,109,112,105,110,103,0,109,95,110,117,109,67,111,110,115,116,114,
+97,105,110,116,82,111,119,115,0,110,117,98,0,42,109,95,114,98,65,0,
+42,109,95,114,98,66,0,109,95,111,98,106,101,99,116,84,121,112,101,0,
+109,95,117,115,101,114,67,111,110,115,116,114,97,105,110,116,84,121,112,101,
+0,109,95,117,115,101,114,67,111,110,115,116,114,97,105,110,116,73,100,0,
+109,95,110,101,101,100,115,70,101,101,100,98,97,99,107,0,109,95,97,112,
+112,108,105,101,100,73,109,112,117,108,115,101,0,109,95,100,98,103,68,114,
+97,119,83,105,122,101,0,109,95,100,105,115,97,98,108,101,67,111,108,108,
+105,115,105,111,110,115,66,101,116,119,101,101,110,76,105,110,107,101,100,66,
+111,100,105,101,115,0,109,95,112,97,100,52,91,52,93,0,109,95,116,121,
+112,101,67,111,110,115,116,114,97,105,110,116,68,97,116,97,0,109,95,112,
+105,118,111,116,73,110,65,0,109,95,112,105,118,111,116,73,110,66,0,109,
+95,114,98,65,70,114,97,109,101,0,109,95,114,98,66,70,114,97,109,101,
+0,109,95,117,115,101,82,101,102,101,114,101,110,99,101,70,114,97,109,101,
+65,0,109,95,97,110,103,117,108,97,114,79,110,108,121,0,109,95,101,110,
+97,98,108,101,65,110,103,117,108,97,114,77,111,116,111,114,0,109,95,109,
+111,116,111,114,84,97,114,103,101,116,86,101,108,111,99,105,116,121,0,109,
+95,109,97,120,77,111,116,111,114,73,109,112,117,108,115,101,0,109,95,108,
+111,119,101,114,76,105,109,105,116,0,109,95,117,112,112,101,114,76,105,109,
+105,116,0,109,95,108,105,109,105,116,83,111,102,116,110,101,115,115,0,109,
+95,98,105,97,115,70,97,99,116,111,114,0,109,95,114,101,108,97,120,97,
+116,105,111,110,70,97,99,116,111,114,0,109,95,115,119,105,110,103,83,112,
+97,110,49,0,109,95,115,119,105,110,103,83,112,97,110,50,0,109,95,116,
+119,105,115,116,83,112,97,110,0,109,95,100,97,109,112,105,110,103,0,109,
+95,108,105,110,101,97,114,85,112,112,101,114,76,105,109,105,116,0,109,95,
+108,105,110,101,97,114,76,111,119,101,114,76,105,109,105,116,0,109,95,97,
+110,103,117,108,97,114,85,112,112,101,114,76,105,109,105,116,0,109,95,97,
+110,103,117,108,97,114,76,111,119,101,114,76,105,109,105,116,0,109,95,117,
+115,101,76,105,110,101,97,114,82,101,102,101,114,101,110,99,101,70,114,97,
+109,101,65,0,109,95,117,115,101,79,102,102,115,101,116,70,111,114,67,111,
+110,115,116,114,97,105,110,116,70,114,97,109,101,0,109,95,54,100,111,102,
+68,97,116,97,0,109,95,115,112,114,105,110,103,69,110,97,98,108,101,100,
+91,54,93,0,109,95,101,113,117,105,108,105,98,114,105,117,109,80,111,105,
+110,116,91,54,93,0,109,95,115,112,114,105,110,103,83,116,105,102,102,110,
+101,115,115,91,54,93,0,109,95,115,112,114,105,110,103,68,97,109,112,105,
+110,103,91,54,93,0,109,95,108,105,110,101,97,114,83,116,105,102,102,110,
+101,115,115,0,109,95,97,110,103,117,108,97,114,83,116,105,102,102,110,101,
+115,115,0,109,95,118,111,108,117,109,101,83,116,105,102,102,110,101,115,115,
+0,42,109,95,109,97,116,101,114,105,97,108,0,109,95,112,111,115,105,116,
+105,111,110,0,109,95,112,114,101,118,105,111,117,115,80,111,115,105,116,105,
+111,110,0,109,95,118,101,108,111,99,105,116,121,0,109,95,97,99,99,117,
+109,117,108,97,116,101,100,70,111,114,99,101,0,109,95,110,111,114,109,97,
+108,0,109,95,97,114,101,97,0,109,95,97,116,116,97,99,104,0,109,95,
+110,111,100,101,73,110,100,105,99,101,115,91,50,93,0,109,95,114,101,115,
+116,76,101,110,103,116,104,0,109,95,98,98,101,110,100,105,110,103,0,109,
+95,110,111,100,101,73,110,100,105,99,101,115,91,51,93,0,109,95,114,101,
+115,116,65,114,101,97,0,109,95,99,48,91,52,93,0,109,95,110,111,100,
+101,73,110,100,105,99,101,115,91,52,93,0,109,95,114,101,115,116,86,111,
+108,117,109,101,0,109,95,99,49,0,109,95,99,50,0,109,95,99,48,0,
+109,95,108,111,99,97,108,70,114,97,109,101,0,42,109,95,114,105,103,105,
+100,66,111,100,121,0,109,95,110,111,100,101,73,110,100,101,120,0,109,95,
+97,101,114,111,77,111,100,101,108,0,109,95,98,97,117,109,103,97,114,116,
+101,0,109,95,100,114,97,103,0,109,95,108,105,102,116,0,109,95,112,114,
+101,115,115,117,114,101,0,109,95,118,111,108,117,109,101,0,109,95,100,121,
+110,97,109,105,99,70,114,105,99,116,105,111,110,0,109,95,112,111,115,101,
+77,97,116,99,104,0,109,95,114,105,103,105,100,67,111,110,116,97,99,116,
+72,97,114,100,110,101,115,115,0,109,95,107,105,110,101,116,105,99,67,111,
+110,116,97,99,116,72,97,114,100,110,101,115,115,0,109,95,115,111,102,116,
+67,111,110,116,97,99,116,72,97,114,100,110,101,115,115,0,109,95,97,110,
+99,104,111,114,72,97,114,100,110,101,115,115,0,109,95,115,111,102,116,82,
+105,103,105,100,67,108,117,115,116,101,114,72,97,114,100,110,101,115,115,0,
+109,95,115,111,102,116,75,105,110,101,116,105,99,67,108,117,115,116,101,114,
+72,97,114,100,110,101,115,115,0,109,95,115,111,102,116,83,111,102,116,67,
+108,117,115,116,101,114,72,97,114,100,110,101,115,115,0,109,95,115,111,102,
+116,82,105,103,105,100,67,108,117,115,116,101,114,73,109,112,117,108,115,101,
+83,112,108,105,116,0,109,95,115,111,102,116,75,105,110,101,116,105,99,67,
+108,117,115,116,101,114,73,109,112,117,108,115,101,83,112,108,105,116,0,109,
+95,115,111,102,116,83,111,102,116,67,108,117,115,116,101,114,73,109,112,117,
+108,115,101,83,112,108,105,116,0,109,95,109,97,120,86,111,108,117,109,101,
+0,109,95,116,105,109,101,83,99,97,108,101,0,109,95,118,101,108,111,99,
+105,116,121,73,116,101,114,97,116,105,111,110,115,0,109,95,112,111,115,105,
+116,105,111,110,73,116,101,114,97,116,105,111,110,115,0,109,95,100,114,105,
+102,116,73,116,101,114,97,116,105,111,110,115,0,109,95,99,108,117,115,116,
+101,114,73,116,101,114,97,116,105,111,110,115,0,109,95,114,111,116,0,109,
+95,115,99,97,108,101,0,109,95,97,113,113,0,109,95,99,111,109,0,42,
+109,95,112,111,115,105,116,105,111,110,115,0,42,109,95,119,101,105,103,104,
+116,115,0,109,95,110,117,109,80,111,115,105,116,105,111,110,115,0,109,95,
+110,117,109,87,101,105,103,116,115,0,109,95,98,118,111,108,117,109,101,0,
+109,95,98,102,114,97,109,101,0,109,95,102,114,97,109,101,120,102,111,114,
+109,0,109,95,108,111,99,105,105,0,109,95,105,110,118,119,105,0,109,95,
+118,105,109,112,117,108,115,101,115,91,50,93,0,109,95,100,105,109,112,117,
+108,115,101,115,91,50,93,0,109,95,108,118,0,109,95,97,118,0,42,109,
+95,102,114,97,109,101,114,101,102,115,0,42,109,95,110,111,100,101,73,110,
+100,105,99,101,115,0,42,109,95,109,97,115,115,101,115,0,109,95,110,117,
+109,70,114,97,109,101,82,101,102,115,0,109,95,110,117,109,78,111,100,101,
+115,0,109,95,110,117,109,77,97,115,115,101,115,0,109,95,105,100,109,97,
+115,115,0,109,95,105,109,97,115,115,0,109,95,110,118,105,109,112,117,108,
+115,101,115,0,109,95,110,100,105,109,112,117,108,115,101,115,0,109,95,110,
+100,97,109,112,105,110,103,0,109,95,108,100,97,109,112,105,110,103,0,109,
+95,97,100,97,109,112,105,110,103,0,109,95,109,97,116,99,104,105,110,103,
+0,109,95,109,97,120,83,101,108,102,67,111,108,108,105,115,105,111,110,73,
+109,112,117,108,115,101,0,109,95,115,101,108,102,67,111,108,108,105,115,105,
+111,110,73,109,112,117,108,115,101,70,97,99,116,111,114,0,109,95,99,111,
+110,116,97,105,110,115,65,110,99,104,111,114,0,109,95,99,111,108,108,105,
+100,101,0,109,95,99,108,117,115,116,101,114,73,110,100,101,120,0,42,109,
+95,98,111,100,121,65,0,42,109,95,98,111,100,121,66,0,109,95,114,101,
+102,115,91,50,93,0,109,95,99,102,109,0,109,95,101,114,112,0,109,95,
+115,112,108,105,116,0,109,95,100,101,108,101,116,101,0,109,95,114,101,108,
+80,111,115,105,116,105,111,110,91,50,93,0,109,95,98,111,100,121,65,116,
+121,112,101,0,109,95,98,111,100,121,66,116,121,112,101,0,109,95,106,111,
+105,110,116,84,121,112,101,0,42,109,95,112,111,115,101,0,42,42,109,95,
+109,97,116,101,114,105,97,108,115,0,42,109,95,110,111,100,101,115,0,42,
+109,95,108,105,110,107,115,0,42,109,95,102,97,99,101,115,0,42,109,95,
+116,101,116,114,97,104,101,100,114,97,0,42,109,95,97,110,99,104,111,114,
+115,0,42,109,95,99,108,117,115,116,101,114,115,0,42,109,95,106,111,105,
+110,116,115,0,109,95,110,117,109,77,97,116,101,114,105,97,108,115,0,109,
+95,110,117,109,76,105,110,107,115,0,109,95,110,117,109,70,97,99,101,115,
+0,109,95,110,117,109,84,101,116,114,97,104,101,100,114,97,0,109,95,110,
+117,109,65,110,99,104,111,114,115,0,109,95,110,117,109,67,108,117,115,116,
+101,114,115,0,109,95,110,117,109,74,111,105,110,116,115,0,109,95,99,111,
+110,102,105,103,0,0,0,0,84,89,80,69,72,0,0,0,99,104,97,114,
+0,117,99,104,97,114,0,115,104,111,114,116,0,117,115,104,111,114,116,0,
+105,110,116,0,108,111,110,103,0,117,108,111,110,103,0,102,108,111,97,116,
+0,100,111,117,98,108,101,0,118,111,105,100,0,80,111,105,110,116,101,114,
+65,114,114,97,121,0,98,116,80,104,121,115,105,99,115,83,121,115,116,101,
+109,0,76,105,115,116,66,97,115,101,0,98,116,86,101,99,116,111,114,51,
+70,108,111,97,116,68,97,116,97,0,98,116,86,101,99,116,111,114,51,68,
+111,117,98,108,101,68,97,116,97,0,98,116,77,97,116,114,105,120,51,120,
+51,70,108,111,97,116,68,97,116,97,0,98,116,77,97,116,114,105,120,51,
+120,51,68,111,117,98,108,101,68,97,116,97,0,98,116,84,114,97,110,115,
+102,111,114,109,70,108,111,97,116,68,97,116,97,0,98,116,84,114,97,110,
+115,102,111,114,109,68,111,117,98,108,101,68,97,116,97,0,98,116,66,118,
+104,83,117,98,116,114,101,101,73,110,102,111,68,97,116,97,0,98,116,79,
+112,116,105,109,105,122,101,100,66,118,104,78,111,100,101,70,108,111,97,116,
+68,97,116,97,0,98,116,79,112,116,105,109,105,122,101,100,66,118,104,78,
+111,100,101,68,111,117,98,108,101,68,97,116,97,0,98,116,81,117,97,110,
+116,105,122,101,100,66,118,104,78,111,100,101,68,97,116,97,0,98,116,81,
+117,97,110,116,105,122,101,100,66,118,104,70,108,111,97,116,68,97,116,97,
+0,98,116,81,117,97,110,116,105,122,101,100,66,118,104,68,111,117,98,108,
+101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,111,110,83,104,97,
+112,101,68,97,116,97,0,98,116,83,116,97,116,105,99,80,108,97,110,101,
+83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,101,120,73,110,
+116,101,114,110,97,108,83,104,97,112,101,68,97,116,97,0,98,116,80,111,
+115,105,116,105,111,110,65,110,100,82,97,100,105,117,115,0,98,116,77,117,
+108,116,105,83,112,104,101,114,101,83,104,97,112,101,68,97,116,97,0,98,
+116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116,83,104,111,114,
+116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116,83,104,111,114,
+116,73,110,116,73,110,100,101,120,84,114,105,112,108,101,116,68,97,116,97,
+0,98,116,67,104,97,114,73,110,100,101,120,84,114,105,112,108,101,116,68,
+97,116,97,0,98,116,77,101,115,104,80,97,114,116,68,97,116,97,0,98,
+116,83,116,114,105,100,105,110,103,77,101,115,104,73,110,116,101,114,102,97,
+99,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,77,101,115,
+104,83,104,97,112,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,
+101,73,110,102,111,77,97,112,68,97,116,97,0,98,116,83,99,97,108,101,
+100,84,114,105,97,110,103,108,101,77,101,115,104,83,104,97,112,101,68,97,
+116,97,0,98,116,67,111,109,112,111,117,110,100,83,104,97,112,101,67,104,
+105,108,100,68,97,116,97,0,98,116,67,111,109,112,111,117,110,100,83,104,
+97,112,101,68,97,116,97,0,98,116,67,121,108,105,110,100,101,114,83,104,
+97,112,101,68,97,116,97,0,98,116,67,97,112,115,117,108,101,83,104,97,
+112,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,73,110,102,
+111,68,97,116,97,0,98,116,71,73,109,112,97,99,116,77,101,115,104,83,
+104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,101,120,72,117,108,
+108,83,104,97,112,101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,
+111,110,79,98,106,101,99,116,68,111,117,98,108,101,68,97,116,97,0,98,
+116,67,111,108,108,105,115,105,111,110,79,98,106,101,99,116,70,108,111,97,
+116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,70,108,111,
+97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,68,111,
+117,98,108,101,68,97,116,97,0,98,116,67,111,110,115,116,114,97,105,110,
+116,73,110,102,111,49,0,98,116,84,121,112,101,100,67,111,110,115,116,114,
+97,105,110,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,
+68,97,116,97,0,98,116,80,111,105,110,116,50,80,111,105,110,116,67,111,
+110,115,116,114,97,105,110,116,70,108,111,97,116,68,97,116,97,0,98,116,
+80,111,105,110,116,50,80,111,105,110,116,67,111,110,115,116,114,97,105,110,
+116,68,111,117,98,108,101,68,97,116,97,0,98,116,72,105,110,103,101,67,
+111,110,115,116,114,97,105,110,116,68,111,117,98,108,101,68,97,116,97,0,
+98,116,72,105,110,103,101,67,111,110,115,116,114,97,105,110,116,70,108,111,
+97,116,68,97,116,97,0,98,116,67,111,110,101,84,119,105,115,116,67,111,
+110,115,116,114,97,105,110,116,68,97,116,97,0,98,116,71,101,110,101,114,
+105,99,54,68,111,102,67,111,110,115,116,114,97,105,110,116,68,97,116,97,
+0,98,116,71,101,110,101,114,105,99,54,68,111,102,83,112,114,105,110,103,
+67,111,110,115,116,114,97,105,110,116,68,97,116,97,0,98,116,83,108,105,
+100,101,114,67,111,110,115,116,114,97,105,110,116,68,97,116,97,0,83,111,
+102,116,66,111,100,121,77,97,116,101,114,105,97,108,68,97,116,97,0,83,
+111,102,116,66,111,100,121,78,111,100,101,68,97,116,97,0,83,111,102,116,
+66,111,100,121,76,105,110,107,68,97,116,97,0,83,111,102,116,66,111,100,
+121,70,97,99,101,68,97,116,97,0,83,111,102,116,66,111,100,121,84,101,
+116,114,97,68,97,116,97,0,83,111,102,116,82,105,103,105,100,65,110,99,
+104,111,114,68,97,116,97,0,83,111,102,116,66,111,100,121,67,111,110,102,
+105,103,68,97,116,97,0,83,111,102,116,66,111,100,121,80,111,115,101,68,
+97,116,97,0,83,111,102,116,66,111,100,121,67,108,117,115,116,101,114,68,
+97,116,97,0,98,116,83,111,102,116,66,111,100,121,74,111,105,110,116,68,
+97,116,97,0,98,116,83,111,102,116,66,111,100,121,70,108,111,97,116,68,
+97,116,97,0,84,76,69,78,1,0,1,0,2,0,2,0,4,0,4,0,
+4,0,4,0,8,0,0,0,12,0,36,0,8,0,16,0,32,0,48,0,
+96,0,64,0,-128,0,20,0,48,0,80,0,16,0,84,0,-124,0,12,0,
+52,0,52,0,20,0,64,0,4,0,4,0,8,0,4,0,32,0,28,0,
+60,0,56,0,76,0,76,0,24,0,60,0,60,0,16,0,64,0,68,0,
+-56,1,-8,0,-32,1,-104,3,8,0,44,0,0,0,76,0,108,0,84,1,
+-44,0,-52,0,-12,0,84,1,-60,0,16,0,100,0,20,0,36,0,100,0,
+92,0,104,0,-64,0,92,1,104,0,-92,1,83,84,82,67,61,0,0,0,
+10,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,11,0,3,0,
+10,0,3,0,10,0,4,0,10,0,5,0,12,0,2,0,9,0,6,0,
+9,0,7,0,13,0,1,0,7,0,8,0,14,0,1,0,8,0,8,0,
+15,0,1,0,13,0,9,0,16,0,1,0,14,0,9,0,17,0,2,0,
+15,0,10,0,13,0,11,0,18,0,2,0,16,0,10,0,14,0,11,0,
+19,0,4,0,4,0,12,0,4,0,13,0,2,0,14,0,2,0,15,0,
+20,0,6,0,13,0,16,0,13,0,17,0,4,0,18,0,4,0,19,0,
+4,0,20,0,0,0,21,0,21,0,6,0,14,0,16,0,14,0,17,0,
+4,0,18,0,4,0,19,0,4,0,20,0,0,0,21,0,22,0,3,0,
+2,0,14,0,2,0,15,0,4,0,22,0,23,0,12,0,13,0,23,0,
+13,0,24,0,13,0,25,0,4,0,26,0,4,0,27,0,4,0,28,0,
+4,0,29,0,20,0,30,0,22,0,31,0,19,0,32,0,4,0,33,0,
+4,0,34,0,24,0,12,0,14,0,23,0,14,0,24,0,14,0,25,0,
+4,0,26,0,4,0,27,0,4,0,28,0,4,0,29,0,21,0,30,0,
+22,0,31,0,4,0,33,0,4,0,34,0,19,0,32,0,25,0,3,0,
+0,0,35,0,4,0,36,0,0,0,37,0,26,0,5,0,25,0,38,0,
+13,0,39,0,13,0,40,0,7,0,41,0,0,0,21,0,27,0,5,0,
+25,0,38,0,13,0,39,0,13,0,42,0,7,0,43,0,4,0,44,0,
+28,0,2,0,13,0,45,0,7,0,46,0,29,0,4,0,27,0,47,0,
+28,0,48,0,4,0,49,0,0,0,37,0,30,0,1,0,4,0,50,0,
+31,0,2,0,2,0,50,0,0,0,51,0,32,0,2,0,2,0,52,0,
+0,0,51,0,33,0,2,0,0,0,52,0,0,0,53,0,34,0,8,0,
+13,0,54,0,14,0,55,0,30,0,56,0,32,0,57,0,33,0,58,0,
+31,0,59,0,4,0,60,0,4,0,61,0,35,0,4,0,34,0,62,0,
+13,0,63,0,4,0,64,0,0,0,37,0,36,0,7,0,25,0,38,0,
+35,0,65,0,23,0,66,0,24,0,67,0,37,0,68,0,7,0,43,0,
+0,0,69,0,38,0,2,0,36,0,70,0,13,0,39,0,39,0,4,0,
+17,0,71,0,25,0,72,0,4,0,73,0,7,0,74,0,40,0,4,0,
+25,0,38,0,39,0,75,0,4,0,76,0,7,0,43,0,41,0,3,0,
+27,0,47,0,4,0,77,0,0,0,37,0,42,0,3,0,27,0,47,0,
+4,0,77,0,0,0,37,0,43,0,4,0,4,0,78,0,7,0,79,0,
+7,0,80,0,7,0,81,0,37,0,14,0,4,0,82,0,4,0,83,0,
+43,0,84,0,4,0,85,0,7,0,86,0,7,0,87,0,7,0,88,0,
+7,0,89,0,7,0,90,0,4,0,91,0,4,0,92,0,4,0,93,0,
+4,0,94,0,0,0,37,0,44,0,5,0,25,0,38,0,35,0,65,0,
+13,0,39,0,7,0,43,0,4,0,95,0,45,0,5,0,27,0,47,0,
+13,0,96,0,14,0,97,0,4,0,98,0,0,0,99,0,46,0,24,0,
+9,0,100,0,9,0,101,0,25,0,102,0,0,0,35,0,18,0,103,0,
+18,0,104,0,14,0,105,0,14,0,106,0,14,0,107,0,8,0,108,0,
+8,0,109,0,8,0,110,0,8,0,111,0,8,0,112,0,8,0,113,0,
+8,0,114,0,4,0,115,0,4,0,116,0,4,0,117,0,4,0,118,0,
+4,0,119,0,4,0,120,0,4,0,121,0,0,0,37,0,47,0,23,0,
+9,0,100,0,9,0,101,0,25,0,102,0,0,0,35,0,17,0,103,0,
+17,0,104,0,13,0,105,0,13,0,106,0,13,0,107,0,7,0,108,0,
+7,0,109,0,7,0,110,0,7,0,111,0,7,0,112,0,7,0,113,0,
+7,0,114,0,4,0,115,0,4,0,116,0,4,0,117,0,4,0,118,0,
+4,0,119,0,4,0,120,0,4,0,121,0,48,0,21,0,47,0,122,0,
+15,0,123,0,13,0,124,0,13,0,125,0,13,0,126,0,13,0,127,0,
+13,0,-128,0,13,0,-127,0,13,0,-126,0,13,0,-125,0,13,0,-124,0,
+7,0,-123,0,7,0,-122,0,7,0,-121,0,7,0,-120,0,7,0,-119,0,
+7,0,-118,0,7,0,-117,0,7,0,-116,0,7,0,-115,0,4,0,-114,0,
+49,0,22,0,46,0,122,0,16,0,123,0,14,0,124,0,14,0,125,0,
+14,0,126,0,14,0,127,0,14,0,-128,0,14,0,-127,0,14,0,-126,0,
+14,0,-125,0,14,0,-124,0,8,0,-123,0,8,0,-122,0,8,0,-121,0,
+8,0,-120,0,8,0,-119,0,8,0,-118,0,8,0,-117,0,8,0,-116,0,
+8,0,-115,0,4,0,-114,0,0,0,37,0,50,0,2,0,4,0,-113,0,
+4,0,-112,0,51,0,11,0,52,0,-111,0,52,0,-110,0,0,0,35,0,
+4,0,-109,0,4,0,-108,0,4,0,-107,0,4,0,-106,0,7,0,-105,0,
+7,0,-104,0,4,0,-103,0,0,0,-102,0,53,0,3,0,51,0,-101,0,
+13,0,-100,0,13,0,-99,0,54,0,3,0,51,0,-101,0,14,0,-100,0,
+14,0,-99,0,55,0,13,0,51,0,-101,0,18,0,-98,0,18,0,-97,0,
+4,0,-96,0,4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,
+7,0,-91,0,7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,
+56,0,13,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,4,0,-96,0,
+4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,7,0,-91,0,
+7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,57,0,11,0,
+51,0,-101,0,17,0,-98,0,17,0,-97,0,7,0,-86,0,7,0,-85,0,
+7,0,-84,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,7,0,-83,0,
+0,0,21,0,58,0,9,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,
+13,0,-82,0,13,0,-81,0,13,0,-80,0,13,0,-79,0,4,0,-78,0,
+4,0,-77,0,59,0,5,0,58,0,-76,0,4,0,-75,0,7,0,-74,0,
+7,0,-73,0,7,0,-72,0,60,0,9,0,51,0,-101,0,17,0,-98,0,
+17,0,-97,0,7,0,-82,0,7,0,-81,0,7,0,-80,0,7,0,-79,0,
+4,0,-78,0,4,0,-77,0,61,0,4,0,7,0,-71,0,7,0,-70,0,
+7,0,-69,0,4,0,78,0,62,0,10,0,61,0,-68,0,13,0,-67,0,
+13,0,-66,0,13,0,-65,0,13,0,-64,0,13,0,-63,0,7,0,-123,0,
+7,0,-62,0,4,0,-61,0,4,0,53,0,63,0,4,0,61,0,-68,0,
+4,0,-60,0,7,0,-59,0,4,0,-58,0,64,0,4,0,13,0,-63,0,
+61,0,-68,0,4,0,-57,0,7,0,-56,0,65,0,7,0,13,0,-55,0,
+61,0,-68,0,4,0,-54,0,7,0,-53,0,7,0,-52,0,7,0,-51,0,
+4,0,53,0,66,0,6,0,15,0,-50,0,13,0,-52,0,13,0,-49,0,
+52,0,-48,0,4,0,-47,0,7,0,-51,0,67,0,26,0,4,0,-46,0,
+7,0,-45,0,7,0,-83,0,7,0,-44,0,7,0,-43,0,7,0,-42,0,
+7,0,-41,0,7,0,-40,0,7,0,-39,0,7,0,-38,0,7,0,-37,0,
+7,0,-36,0,7,0,-35,0,7,0,-34,0,7,0,-33,0,7,0,-32,0,
+7,0,-31,0,7,0,-30,0,7,0,-29,0,7,0,-28,0,7,0,-27,0,
+4,0,-26,0,4,0,-25,0,4,0,-24,0,4,0,-23,0,4,0,116,0,
+68,0,12,0,15,0,-22,0,15,0,-21,0,15,0,-20,0,13,0,-19,0,
+13,0,-18,0,7,0,-17,0,4,0,-16,0,4,0,-15,0,4,0,-14,0,
+4,0,-13,0,7,0,-53,0,4,0,53,0,69,0,27,0,17,0,-12,0,
+15,0,-11,0,15,0,-10,0,13,0,-19,0,13,0,-9,0,13,0,-8,0,
+13,0,-7,0,13,0,-6,0,13,0,-5,0,4,0,-4,0,7,0,-3,0,
+4,0,-2,0,4,0,-1,0,4,0,0,1,7,0,1,1,7,0,2,1,
+4,0,3,1,4,0,4,1,7,0,5,1,7,0,6,1,7,0,7,1,
+7,0,8,1,7,0,9,1,7,0,10,1,4,0,11,1,4,0,12,1,
+4,0,13,1,70,0,12,0,9,0,14,1,9,0,15,1,13,0,16,1,
+7,0,17,1,7,0,18,1,7,0,19,1,4,0,20,1,13,0,21,1,
+4,0,22,1,4,0,23,1,4,0,24,1,4,0,53,0,71,0,19,0,
+47,0,122,0,68,0,25,1,61,0,26,1,62,0,27,1,63,0,28,1,
+64,0,29,1,65,0,30,1,66,0,31,1,69,0,32,1,70,0,33,1,
+4,0,34,1,4,0,-1,0,4,0,35,1,4,0,36,1,4,0,37,1,
+4,0,38,1,4,0,39,1,4,0,40,1,67,0,41,1,};
+int sBulletDNAlen= sizeof(sBulletDNAstr);
+unsigned char sBulletDNAstr64[]= {
+83,68,78,65,78,65,77,69,42,1,0,0,109,95,115,105,122,101,0,109,
+95,99,97,112,97,99,105,116,121,0,42,109,95,100,97,116,97,0,109,95,
+99,111,108,108,105,115,105,111,110,83,104,97,112,101,115,0,109,95,99,111,
+108,108,105,115,105,111,110,79,98,106,101,99,116,115,0,109,95,99,111,110,
+115,116,114,97,105,110,116,115,0,42,102,105,114,115,116,0,42,108,97,115,
+116,0,109,95,102,108,111,97,116,115,91,52,93,0,109,95,101,108,91,51,
+93,0,109,95,98,97,115,105,115,0,109,95,111,114,105,103,105,110,0,109,
+95,114,111,111,116,78,111,100,101,73,110,100,101,120,0,109,95,115,117,98,
+116,114,101,101,83,105,122,101,0,109,95,113,117,97,110,116,105,122,101,100,
+65,97,98,98,77,105,110,91,51,93,0,109,95,113,117,97,110,116,105,122,
+101,100,65,97,98,98,77,97,120,91,51,93,0,109,95,97,97,98,98,77,
+105,110,79,114,103,0,109,95,97,97,98,98,77,97,120,79,114,103,0,109,
+95,101,115,99,97,112,101,73,110,100,101,120,0,109,95,115,117,98,80,97,
+114,116,0,109,95,116,114,105,97,110,103,108,101,73,110,100,101,120,0,109,
+95,112,97,100,91,52,93,0,109,95,101,115,99,97,112,101,73,110,100,101,
+120,79,114,84,114,105,97,110,103,108,101,73,110,100,101,120,0,109,95,98,
+118,104,65,97,98,98,77,105,110,0,109,95,98,118,104,65,97,98,98,77,
+97,120,0,109,95,98,118,104,81,117,97,110,116,105,122,97,116,105,111,110,
+0,109,95,99,117,114,78,111,100,101,73,110,100,101,120,0,109,95,117,115,
+101,81,117,97,110,116,105,122,97,116,105,111,110,0,109,95,110,117,109,67,
+111,110,116,105,103,117,111,117,115,76,101,97,102,78,111,100,101,115,0,109,
+95,110,117,109,81,117,97,110,116,105,122,101,100,67,111,110,116,105,103,117,
+111,117,115,78,111,100,101,115,0,42,109,95,99,111,110,116,105,103,117,111,
+117,115,78,111,100,101,115,80,116,114,0,42,109,95,113,117,97,110,116,105,
+122,101,100,67,111,110,116,105,103,117,111,117,115,78,111,100,101,115,80,116,
+114,0,42,109,95,115,117,98,84,114,101,101,73,110,102,111,80,116,114,0,
+109,95,116,114,97,118,101,114,115,97,108,77,111,100,101,0,109,95,110,117,
+109,83,117,98,116,114,101,101,72,101,97,100,101,114,115,0,42,109,95,110,
+97,109,101,0,109,95,115,104,97,112,101,84,121,112,101,0,109,95,112,97,
+100,100,105,110,103,91,52,93,0,109,95,99,111,108,108,105,115,105,111,110,
+83,104,97,112,101,68,97,116,97,0,109,95,108,111,99,97,108,83,99,97,
+108,105,110,103,0,109,95,112,108,97,110,101,78,111,114,109,97,108,0,109,
+95,112,108,97,110,101,67,111,110,115,116,97,110,116,0,109,95,105,109,112,
+108,105,99,105,116,83,104,97,112,101,68,105,109,101,110,115,105,111,110,115,
+0,109,95,99,111,108,108,105,115,105,111,110,77,97,114,103,105,110,0,109,
+95,112,97,100,100,105,110,103,0,109,95,112,111,115,0,109,95,114,97,100,
+105,117,115,0,109,95,99,111,110,118,101,120,73,110,116,101,114,110,97,108,
+83,104,97,112,101,68,97,116,97,0,42,109,95,108,111,99,97,108,80,111,
+115,105,116,105,111,110,65,114,114,97,121,80,116,114,0,109,95,108,111,99,
+97,108,80,111,115,105,116,105,111,110,65,114,114,97,121,83,105,122,101,0,
+109,95,118,97,108,117,101,0,109,95,112,97,100,91,50,93,0,109,95,118,
+97,108,117,101,115,91,51,93,0,109,95,112,97,100,0,42,109,95,118,101,
+114,116,105,99,101,115,51,102,0,42,109,95,118,101,114,116,105,99,101,115,
+51,100,0,42,109,95,105,110,100,105,99,101,115,51,50,0,42,109,95,51,
+105,110,100,105,99,101,115,49,54,0,42,109,95,51,105,110,100,105,99,101,
+115,56,0,42,109,95,105,110,100,105,99,101,115,49,54,0,109,95,110,117,
+109,84,114,105,97,110,103,108,101,115,0,109,95,110,117,109,86,101,114,116,
+105,99,101,115,0,42,109,95,109,101,115,104,80,97,114,116,115,80,116,114,
+0,109,95,115,99,97,108,105,110,103,0,109,95,110,117,109,77,101,115,104,
+80,97,114,116,115,0,109,95,109,101,115,104,73,110,116,101,114,102,97,99,
+101,0,42,109,95,113,117,97,110,116,105,122,101,100,70,108,111,97,116,66,
+118,104,0,42,109,95,113,117,97,110,116,105,122,101,100,68,111,117,98,108,
+101,66,118,104,0,42,109,95,116,114,105,97,110,103,108,101,73,110,102,111,
+77,97,112,0,109,95,112,97,100,51,91,52,93,0,109,95,116,114,105,109,
+101,115,104,83,104,97,112,101,68,97,116,97,0,109,95,116,114,97,110,115,
+102,111,114,109,0,42,109,95,99,104,105,108,100,83,104,97,112,101,0,109,
+95,99,104,105,108,100,83,104,97,112,101,84,121,112,101,0,109,95,99,104,
+105,108,100,77,97,114,103,105,110,0,42,109,95,99,104,105,108,100,83,104,
+97,112,101,80,116,114,0,109,95,110,117,109,67,104,105,108,100,83,104,97,
+112,101,115,0,109,95,117,112,65,120,105,115,0,109,95,102,108,97,103,115,
+0,109,95,101,100,103,101,86,48,86,49,65,110,103,108,101,0,109,95,101,
+100,103,101,86,49,86,50,65,110,103,108,101,0,109,95,101,100,103,101,86,
+50,86,48,65,110,103,108,101,0,42,109,95,104,97,115,104,84,97,98,108,
+101,80,116,114,0,42,109,95,110,101,120,116,80,116,114,0,42,109,95,118,
+97,108,117,101,65,114,114,97,121,80,116,114,0,42,109,95,107,101,121,65,
+114,114,97,121,80,116,114,0,109,95,99,111,110,118,101,120,69,112,115,105,
+108,111,110,0,109,95,112,108,97,110,97,114,69,112,115,105,108,111,110,0,
+109,95,101,113,117,97,108,86,101,114,116,101,120,84,104,114,101,115,104,111,
+108,100,0,109,95,101,100,103,101,68,105,115,116,97,110,99,101,84,104,114,
+101,115,104,111,108,100,0,109,95,122,101,114,111,65,114,101,97,84,104,114,
+101,115,104,111,108,100,0,109,95,110,101,120,116,83,105,122,101,0,109,95,
+104,97,115,104,84,97,98,108,101,83,105,122,101,0,109,95,110,117,109,86,
+97,108,117,101,115,0,109,95,110,117,109,75,101,121,115,0,109,95,103,105,
+109,112,97,99,116,83,117,98,84,121,112,101,0,42,109,95,117,110,115,99,
+97,108,101,100,80,111,105,110,116,115,70,108,111,97,116,80,116,114,0,42,
+109,95,117,110,115,99,97,108,101,100,80,111,105,110,116,115,68,111,117,98,
+108,101,80,116,114,0,109,95,110,117,109,85,110,115,99,97,108,101,100,80,
+111,105,110,116,115,0,109,95,112,97,100,100,105,110,103,51,91,52,93,0,
+42,109,95,98,114,111,97,100,112,104,97,115,101,72,97,110,100,108,101,0,
+42,109,95,99,111,108,108,105,115,105,111,110,83,104,97,112,101,0,42,109,
+95,114,111,111,116,67,111,108,108,105,115,105,111,110,83,104,97,112,101,0,
+109,95,119,111,114,108,100,84,114,97,110,115,102,111,114,109,0,109,95,105,
+110,116,101,114,112,111,108,97,116,105,111,110,87,111,114,108,100,84,114,97,
+110,115,102,111,114,109,0,109,95,105,110,116,101,114,112,111,108,97,116,105,
+111,110,76,105,110,101,97,114,86,101,108,111,99,105,116,121,0,109,95,105,
+110,116,101,114,112,111,108,97,116,105,111,110,65,110,103,117,108,97,114,86,
+101,108,111,99,105,116,121,0,109,95,97,110,105,115,111,116,114,111,112,105,
+99,70,114,105,99,116,105,111,110,0,109,95,99,111,110,116,97,99,116,80,
+114,111,99,101,115,115,105,110,103,84,104,114,101,115,104,111,108,100,0,109,
+95,100,101,97,99,116,105,118,97,116,105,111,110,84,105,109,101,0,109,95,
+102,114,105,99,116,105,111,110,0,109,95,114,101,115,116,105,116,117,116,105,
+111,110,0,109,95,104,105,116,70,114,97,99,116,105,111,110,0,109,95,99,
+99,100,83,119,101,112,116,83,112,104,101,114,101,82,97,100,105,117,115,0,
+109,95,99,99,100,77,111,116,105,111,110,84,104,114,101,115,104,111,108,100,
+0,109,95,104,97,115,65,110,105,115,111,116,114,111,112,105,99,70,114,105,
+99,116,105,111,110,0,109,95,99,111,108,108,105,115,105,111,110,70,108,97,
+103,115,0,109,95,105,115,108,97,110,100,84,97,103,49,0,109,95,99,111,
+109,112,97,110,105,111,110,73,100,0,109,95,97,99,116,105,118,97,116,105,
+111,110,83,116,97,116,101,49,0,109,95,105,110,116,101,114,110,97,108,84,
+121,112,101,0,109,95,99,104,101,99,107,67,111,108,108,105,100,101,87,105,
+116,104,0,109,95,99,111,108,108,105,115,105,111,110,79,98,106,101,99,116,
+68,97,116,97,0,109,95,105,110,118,73,110,101,114,116,105,97,84,101,110,
+115,111,114,87,111,114,108,100,0,109,95,108,105,110,101,97,114,86,101,108,
+111,99,105,116,121,0,109,95,97,110,103,117,108,97,114,86,101,108,111,99,
+105,116,121,0,109,95,97,110,103,117,108,97,114,70,97,99,116,111,114,0,
+109,95,108,105,110,101,97,114,70,97,99,116,111,114,0,109,95,103,114,97,
+118,105,116,121,0,109,95,103,114,97,118,105,116,121,95,97,99,99,101,108,
+101,114,97,116,105,111,110,0,109,95,105,110,118,73,110,101,114,116,105,97,
+76,111,99,97,108,0,109,95,116,111,116,97,108,70,111,114,99,101,0,109,
+95,116,111,116,97,108,84,111,114,113,117,101,0,109,95,105,110,118,101,114,
+115,101,77,97,115,115,0,109,95,108,105,110,101,97,114,68,97,109,112,105,
+110,103,0,109,95,97,110,103,117,108,97,114,68,97,109,112,105,110,103,0,
+109,95,97,100,100,105,116,105,111,110,97,108,68,97,109,112,105,110,103,70,
+97,99,116,111,114,0,109,95,97,100,100,105,116,105,111,110,97,108,76,105,
+110,101,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,
+83,113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,
+108,97,114,68,97,109,112,105,110,103,84,104,114,101,115,104,111,108,100,83,
+113,114,0,109,95,97,100,100,105,116,105,111,110,97,108,65,110,103,117,108,
+97,114,68,97,109,112,105,110,103,70,97,99,116,111,114,0,109,95,108,105,
+110,101,97,114,83,108,101,101,112,105,110,103,84,104,114,101,115,104,111,108,
+100,0,109,95,97,110,103,117,108,97,114,83,108,101,101,112,105,110,103,84,
+104,114,101,115,104,111,108,100,0,109,95,97,100,100,105,116,105,111,110,97,
+108,68,97,109,112,105,110,103,0,109,95,110,117,109,67,111,110,115,116,114,
+97,105,110,116,82,111,119,115,0,110,117,98,0,42,109,95,114,98,65,0,
+42,109,95,114,98,66,0,109,95,111,98,106,101,99,116,84,121,112,101,0,
+109,95,117,115,101,114,67,111,110,115,116,114,97,105,110,116,84,121,112,101,
+0,109,95,117,115,101,114,67,111,110,115,116,114,97,105,110,116,73,100,0,
+109,95,110,101,101,100,115,70,101,101,100,98,97,99,107,0,109,95,97,112,
+112,108,105,101,100,73,109,112,117,108,115,101,0,109,95,100,98,103,68,114,
+97,119,83,105,122,101,0,109,95,100,105,115,97,98,108,101,67,111,108,108,
+105,115,105,111,110,115,66,101,116,119,101,101,110,76,105,110,107,101,100,66,
+111,100,105,101,115,0,109,95,112,97,100,52,91,52,93,0,109,95,116,121,
+112,101,67,111,110,115,116,114,97,105,110,116,68,97,116,97,0,109,95,112,
+105,118,111,116,73,110,65,0,109,95,112,105,118,111,116,73,110,66,0,109,
+95,114,98,65,70,114,97,109,101,0,109,95,114,98,66,70,114,97,109,101,
+0,109,95,117,115,101,82,101,102,101,114,101,110,99,101,70,114,97,109,101,
+65,0,109,95,97,110,103,117,108,97,114,79,110,108,121,0,109,95,101,110,
+97,98,108,101,65,110,103,117,108,97,114,77,111,116,111,114,0,109,95,109,
+111,116,111,114,84,97,114,103,101,116,86,101,108,111,99,105,116,121,0,109,
+95,109,97,120,77,111,116,111,114,73,109,112,117,108,115,101,0,109,95,108,
+111,119,101,114,76,105,109,105,116,0,109,95,117,112,112,101,114,76,105,109,
+105,116,0,109,95,108,105,109,105,116,83,111,102,116,110,101,115,115,0,109,
+95,98,105,97,115,70,97,99,116,111,114,0,109,95,114,101,108,97,120,97,
+116,105,111,110,70,97,99,116,111,114,0,109,95,115,119,105,110,103,83,112,
+97,110,49,0,109,95,115,119,105,110,103,83,112,97,110,50,0,109,95,116,
+119,105,115,116,83,112,97,110,0,109,95,100,97,109,112,105,110,103,0,109,
+95,108,105,110,101,97,114,85,112,112,101,114,76,105,109,105,116,0,109,95,
+108,105,110,101,97,114,76,111,119,101,114,76,105,109,105,116,0,109,95,97,
+110,103,117,108,97,114,85,112,112,101,114,76,105,109,105,116,0,109,95,97,
+110,103,117,108,97,114,76,111,119,101,114,76,105,109,105,116,0,109,95,117,
+115,101,76,105,110,101,97,114,82,101,102,101,114,101,110,99,101,70,114,97,
+109,101,65,0,109,95,117,115,101,79,102,102,115,101,116,70,111,114,67,111,
+110,115,116,114,97,105,110,116,70,114,97,109,101,0,109,95,54,100,111,102,
+68,97,116,97,0,109,95,115,112,114,105,110,103,69,110,97,98,108,101,100,
+91,54,93,0,109,95,101,113,117,105,108,105,98,114,105,117,109,80,111,105,
+110,116,91,54,93,0,109,95,115,112,114,105,110,103,83,116,105,102,102,110,
+101,115,115,91,54,93,0,109,95,115,112,114,105,110,103,68,97,109,112,105,
+110,103,91,54,93,0,109,95,108,105,110,101,97,114,83,116,105,102,102,110,
+101,115,115,0,109,95,97,110,103,117,108,97,114,83,116,105,102,102,110,101,
+115,115,0,109,95,118,111,108,117,109,101,83,116,105,102,102,110,101,115,115,
+0,42,109,95,109,97,116,101,114,105,97,108,0,109,95,112,111,115,105,116,
+105,111,110,0,109,95,112,114,101,118,105,111,117,115,80,111,115,105,116,105,
+111,110,0,109,95,118,101,108,111,99,105,116,121,0,109,95,97,99,99,117,
+109,117,108,97,116,101,100,70,111,114,99,101,0,109,95,110,111,114,109,97,
+108,0,109,95,97,114,101,97,0,109,95,97,116,116,97,99,104,0,109,95,
+110,111,100,101,73,110,100,105,99,101,115,91,50,93,0,109,95,114,101,115,
+116,76,101,110,103,116,104,0,109,95,98,98,101,110,100,105,110,103,0,109,
+95,110,111,100,101,73,110,100,105,99,101,115,91,51,93,0,109,95,114,101,
+115,116,65,114,101,97,0,109,95,99,48,91,52,93,0,109,95,110,111,100,
+101,73,110,100,105,99,101,115,91,52,93,0,109,95,114,101,115,116,86,111,
+108,117,109,101,0,109,95,99,49,0,109,95,99,50,0,109,95,99,48,0,
+109,95,108,111,99,97,108,70,114,97,109,101,0,42,109,95,114,105,103,105,
+100,66,111,100,121,0,109,95,110,111,100,101,73,110,100,101,120,0,109,95,
+97,101,114,111,77,111,100,101,108,0,109,95,98,97,117,109,103,97,114,116,
+101,0,109,95,100,114,97,103,0,109,95,108,105,102,116,0,109,95,112,114,
+101,115,115,117,114,101,0,109,95,118,111,108,117,109,101,0,109,95,100,121,
+110,97,109,105,99,70,114,105,99,116,105,111,110,0,109,95,112,111,115,101,
+77,97,116,99,104,0,109,95,114,105,103,105,100,67,111,110,116,97,99,116,
+72,97,114,100,110,101,115,115,0,109,95,107,105,110,101,116,105,99,67,111,
+110,116,97,99,116,72,97,114,100,110,101,115,115,0,109,95,115,111,102,116,
+67,111,110,116,97,99,116,72,97,114,100,110,101,115,115,0,109,95,97,110,
+99,104,111,114,72,97,114,100,110,101,115,115,0,109,95,115,111,102,116,82,
+105,103,105,100,67,108,117,115,116,101,114,72,97,114,100,110,101,115,115,0,
+109,95,115,111,102,116,75,105,110,101,116,105,99,67,108,117,115,116,101,114,
+72,97,114,100,110,101,115,115,0,109,95,115,111,102,116,83,111,102,116,67,
+108,117,115,116,101,114,72,97,114,100,110,101,115,115,0,109,95,115,111,102,
+116,82,105,103,105,100,67,108,117,115,116,101,114,73,109,112,117,108,115,101,
+83,112,108,105,116,0,109,95,115,111,102,116,75,105,110,101,116,105,99,67,
+108,117,115,116,101,114,73,109,112,117,108,115,101,83,112,108,105,116,0,109,
+95,115,111,102,116,83,111,102,116,67,108,117,115,116,101,114,73,109,112,117,
+108,115,101,83,112,108,105,116,0,109,95,109,97,120,86,111,108,117,109,101,
+0,109,95,116,105,109,101,83,99,97,108,101,0,109,95,118,101,108,111,99,
+105,116,121,73,116,101,114,97,116,105,111,110,115,0,109,95,112,111,115,105,
+116,105,111,110,73,116,101,114,97,116,105,111,110,115,0,109,95,100,114,105,
+102,116,73,116,101,114,97,116,105,111,110,115,0,109,95,99,108,117,115,116,
+101,114,73,116,101,114,97,116,105,111,110,115,0,109,95,114,111,116,0,109,
+95,115,99,97,108,101,0,109,95,97,113,113,0,109,95,99,111,109,0,42,
+109,95,112,111,115,105,116,105,111,110,115,0,42,109,95,119,101,105,103,104,
+116,115,0,109,95,110,117,109,80,111,115,105,116,105,111,110,115,0,109,95,
+110,117,109,87,101,105,103,116,115,0,109,95,98,118,111,108,117,109,101,0,
+109,95,98,102,114,97,109,101,0,109,95,102,114,97,109,101,120,102,111,114,
+109,0,109,95,108,111,99,105,105,0,109,95,105,110,118,119,105,0,109,95,
+118,105,109,112,117,108,115,101,115,91,50,93,0,109,95,100,105,109,112,117,
+108,115,101,115,91,50,93,0,109,95,108,118,0,109,95,97,118,0,42,109,
+95,102,114,97,109,101,114,101,102,115,0,42,109,95,110,111,100,101,73,110,
+100,105,99,101,115,0,42,109,95,109,97,115,115,101,115,0,109,95,110,117,
+109,70,114,97,109,101,82,101,102,115,0,109,95,110,117,109,78,111,100,101,
+115,0,109,95,110,117,109,77,97,115,115,101,115,0,109,95,105,100,109,97,
+115,115,0,109,95,105,109,97,115,115,0,109,95,110,118,105,109,112,117,108,
+115,101,115,0,109,95,110,100,105,109,112,117,108,115,101,115,0,109,95,110,
+100,97,109,112,105,110,103,0,109,95,108,100,97,109,112,105,110,103,0,109,
+95,97,100,97,109,112,105,110,103,0,109,95,109,97,116,99,104,105,110,103,
+0,109,95,109,97,120,83,101,108,102,67,111,108,108,105,115,105,111,110,73,
+109,112,117,108,115,101,0,109,95,115,101,108,102,67,111,108,108,105,115,105,
+111,110,73,109,112,117,108,115,101,70,97,99,116,111,114,0,109,95,99,111,
+110,116,97,105,110,115,65,110,99,104,111,114,0,109,95,99,111,108,108,105,
+100,101,0,109,95,99,108,117,115,116,101,114,73,110,100,101,120,0,42,109,
+95,98,111,100,121,65,0,42,109,95,98,111,100,121,66,0,109,95,114,101,
+102,115,91,50,93,0,109,95,99,102,109,0,109,95,101,114,112,0,109,95,
+115,112,108,105,116,0,109,95,100,101,108,101,116,101,0,109,95,114,101,108,
+80,111,115,105,116,105,111,110,91,50,93,0,109,95,98,111,100,121,65,116,
+121,112,101,0,109,95,98,111,100,121,66,116,121,112,101,0,109,95,106,111,
+105,110,116,84,121,112,101,0,42,109,95,112,111,115,101,0,42,42,109,95,
+109,97,116,101,114,105,97,108,115,0,42,109,95,110,111,100,101,115,0,42,
+109,95,108,105,110,107,115,0,42,109,95,102,97,99,101,115,0,42,109,95,
+116,101,116,114,97,104,101,100,114,97,0,42,109,95,97,110,99,104,111,114,
+115,0,42,109,95,99,108,117,115,116,101,114,115,0,42,109,95,106,111,105,
+110,116,115,0,109,95,110,117,109,77,97,116,101,114,105,97,108,115,0,109,
+95,110,117,109,76,105,110,107,115,0,109,95,110,117,109,70,97,99,101,115,
+0,109,95,110,117,109,84,101,116,114,97,104,101,100,114,97,0,109,95,110,
+117,109,65,110,99,104,111,114,115,0,109,95,110,117,109,67,108,117,115,116,
+101,114,115,0,109,95,110,117,109,74,111,105,110,116,115,0,109,95,99,111,
+110,102,105,103,0,0,0,0,84,89,80,69,72,0,0,0,99,104,97,114,
+0,117,99,104,97,114,0,115,104,111,114,116,0,117,115,104,111,114,116,0,
+105,110,116,0,108,111,110,103,0,117,108,111,110,103,0,102,108,111,97,116,
+0,100,111,117,98,108,101,0,118,111,105,100,0,80,111,105,110,116,101,114,
+65,114,114,97,121,0,98,116,80,104,121,115,105,99,115,83,121,115,116,101,
+109,0,76,105,115,116,66,97,115,101,0,98,116,86,101,99,116,111,114,51,
+70,108,111,97,116,68,97,116,97,0,98,116,86,101,99,116,111,114,51,68,
+111,117,98,108,101,68,97,116,97,0,98,116,77,97,116,114,105,120,51,120,
+51,70,108,111,97,116,68,97,116,97,0,98,116,77,97,116,114,105,120,51,
+120,51,68,111,117,98,108,101,68,97,116,97,0,98,116,84,114,97,110,115,
+102,111,114,109,70,108,111,97,116,68,97,116,97,0,98,116,84,114,97,110,
+115,102,111,114,109,68,111,117,98,108,101,68,97,116,97,0,98,116,66,118,
+104,83,117,98,116,114,101,101,73,110,102,111,68,97,116,97,0,98,116,79,
+112,116,105,109,105,122,101,100,66,118,104,78,111,100,101,70,108,111,97,116,
+68,97,116,97,0,98,116,79,112,116,105,109,105,122,101,100,66,118,104,78,
+111,100,101,68,111,117,98,108,101,68,97,116,97,0,98,116,81,117,97,110,
+116,105,122,101,100,66,118,104,78,111,100,101,68,97,116,97,0,98,116,81,
+117,97,110,116,105,122,101,100,66,118,104,70,108,111,97,116,68,97,116,97,
+0,98,116,81,117,97,110,116,105,122,101,100,66,118,104,68,111,117,98,108,
+101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,111,110,83,104,97,
+112,101,68,97,116,97,0,98,116,83,116,97,116,105,99,80,108,97,110,101,
+83,104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,101,120,73,110,
+116,101,114,110,97,108,83,104,97,112,101,68,97,116,97,0,98,116,80,111,
+115,105,116,105,111,110,65,110,100,82,97,100,105,117,115,0,98,116,77,117,
+108,116,105,83,112,104,101,114,101,83,104,97,112,101,68,97,116,97,0,98,
+116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116,83,104,111,114,
+116,73,110,116,73,110,100,101,120,68,97,116,97,0,98,116,83,104,111,114,
+116,73,110,116,73,110,100,101,120,84,114,105,112,108,101,116,68,97,116,97,
+0,98,116,67,104,97,114,73,110,100,101,120,84,114,105,112,108,101,116,68,
+97,116,97,0,98,116,77,101,115,104,80,97,114,116,68,97,116,97,0,98,
+116,83,116,114,105,100,105,110,103,77,101,115,104,73,110,116,101,114,102,97,
+99,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,77,101,115,
+104,83,104,97,112,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,
+101,73,110,102,111,77,97,112,68,97,116,97,0,98,116,83,99,97,108,101,
+100,84,114,105,97,110,103,108,101,77,101,115,104,83,104,97,112,101,68,97,
+116,97,0,98,116,67,111,109,112,111,117,110,100,83,104,97,112,101,67,104,
+105,108,100,68,97,116,97,0,98,116,67,111,109,112,111,117,110,100,83,104,
+97,112,101,68,97,116,97,0,98,116,67,121,108,105,110,100,101,114,83,104,
+97,112,101,68,97,116,97,0,98,116,67,97,112,115,117,108,101,83,104,97,
+112,101,68,97,116,97,0,98,116,84,114,105,97,110,103,108,101,73,110,102,
+111,68,97,116,97,0,98,116,71,73,109,112,97,99,116,77,101,115,104,83,
+104,97,112,101,68,97,116,97,0,98,116,67,111,110,118,101,120,72,117,108,
+108,83,104,97,112,101,68,97,116,97,0,98,116,67,111,108,108,105,115,105,
+111,110,79,98,106,101,99,116,68,111,117,98,108,101,68,97,116,97,0,98,
+116,67,111,108,108,105,115,105,111,110,79,98,106,101,99,116,70,108,111,97,
+116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,70,108,111,
+97,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,68,111,
+117,98,108,101,68,97,116,97,0,98,116,67,111,110,115,116,114,97,105,110,
+116,73,110,102,111,49,0,98,116,84,121,112,101,100,67,111,110,115,116,114,
+97,105,110,116,68,97,116,97,0,98,116,82,105,103,105,100,66,111,100,121,
+68,97,116,97,0,98,116,80,111,105,110,116,50,80,111,105,110,116,67,111,
+110,115,116,114,97,105,110,116,70,108,111,97,116,68,97,116,97,0,98,116,
+80,111,105,110,116,50,80,111,105,110,116,67,111,110,115,116,114,97,105,110,
+116,68,111,117,98,108,101,68,97,116,97,0,98,116,72,105,110,103,101,67,
+111,110,115,116,114,97,105,110,116,68,111,117,98,108,101,68,97,116,97,0,
+98,116,72,105,110,103,101,67,111,110,115,116,114,97,105,110,116,70,108,111,
+97,116,68,97,116,97,0,98,116,67,111,110,101,84,119,105,115,116,67,111,
+110,115,116,114,97,105,110,116,68,97,116,97,0,98,116,71,101,110,101,114,
+105,99,54,68,111,102,67,111,110,115,116,114,97,105,110,116,68,97,116,97,
+0,98,116,71,101,110,101,114,105,99,54,68,111,102,83,112,114,105,110,103,
+67,111,110,115,116,114,97,105,110,116,68,97,116,97,0,98,116,83,108,105,
+100,101,114,67,111,110,115,116,114,97,105,110,116,68,97,116,97,0,83,111,
+102,116,66,111,100,121,77,97,116,101,114,105,97,108,68,97,116,97,0,83,
+111,102,116,66,111,100,121,78,111,100,101,68,97,116,97,0,83,111,102,116,
+66,111,100,121,76,105,110,107,68,97,116,97,0,83,111,102,116,66,111,100,
+121,70,97,99,101,68,97,116,97,0,83,111,102,116,66,111,100,121,84,101,
+116,114,97,68,97,116,97,0,83,111,102,116,82,105,103,105,100,65,110,99,
+104,111,114,68,97,116,97,0,83,111,102,116,66,111,100,121,67,111,110,102,
+105,103,68,97,116,97,0,83,111,102,116,66,111,100,121,80,111,115,101,68,
+97,116,97,0,83,111,102,116,66,111,100,121,67,108,117,115,116,101,114,68,
+97,116,97,0,98,116,83,111,102,116,66,111,100,121,74,111,105,110,116,68,
+97,116,97,0,98,116,83,111,102,116,66,111,100,121,70,108,111,97,116,68,
+97,116,97,0,84,76,69,78,1,0,1,0,2,0,2,0,4,0,4,0,
+4,0,4,0,8,0,0,0,16,0,48,0,16,0,16,0,32,0,48,0,
+96,0,64,0,-128,0,20,0,48,0,80,0,16,0,96,0,-112,0,16,0,
+56,0,56,0,20,0,72,0,4,0,4,0,8,0,4,0,56,0,32,0,
+80,0,72,0,96,0,80,0,32,0,64,0,64,0,16,0,72,0,80,0,
+-40,1,8,1,-16,1,-88,3,8,0,56,0,0,0,88,0,120,0,96,1,
+-32,0,-40,0,0,1,96,1,-48,0,16,0,104,0,24,0,40,0,104,0,
+96,0,104,0,-56,0,104,1,112,0,-40,1,83,84,82,67,61,0,0,0,
+10,0,3,0,4,0,0,0,4,0,1,0,9,0,2,0,11,0,3,0,
+10,0,3,0,10,0,4,0,10,0,5,0,12,0,2,0,9,0,6,0,
+9,0,7,0,13,0,1,0,7,0,8,0,14,0,1,0,8,0,8,0,
+15,0,1,0,13,0,9,0,16,0,1,0,14,0,9,0,17,0,2,0,
+15,0,10,0,13,0,11,0,18,0,2,0,16,0,10,0,14,0,11,0,
+19,0,4,0,4,0,12,0,4,0,13,0,2,0,14,0,2,0,15,0,
+20,0,6,0,13,0,16,0,13,0,17,0,4,0,18,0,4,0,19,0,
+4,0,20,0,0,0,21,0,21,0,6,0,14,0,16,0,14,0,17,0,
+4,0,18,0,4,0,19,0,4,0,20,0,0,0,21,0,22,0,3,0,
+2,0,14,0,2,0,15,0,4,0,22,0,23,0,12,0,13,0,23,0,
+13,0,24,0,13,0,25,0,4,0,26,0,4,0,27,0,4,0,28,0,
+4,0,29,0,20,0,30,0,22,0,31,0,19,0,32,0,4,0,33,0,
+4,0,34,0,24,0,12,0,14,0,23,0,14,0,24,0,14,0,25,0,
+4,0,26,0,4,0,27,0,4,0,28,0,4,0,29,0,21,0,30,0,
+22,0,31,0,4,0,33,0,4,0,34,0,19,0,32,0,25,0,3,0,
+0,0,35,0,4,0,36,0,0,0,37,0,26,0,5,0,25,0,38,0,
+13,0,39,0,13,0,40,0,7,0,41,0,0,0,21,0,27,0,5,0,
+25,0,38,0,13,0,39,0,13,0,42,0,7,0,43,0,4,0,44,0,
+28,0,2,0,13,0,45,0,7,0,46,0,29,0,4,0,27,0,47,0,
+28,0,48,0,4,0,49,0,0,0,37,0,30,0,1,0,4,0,50,0,
+31,0,2,0,2,0,50,0,0,0,51,0,32,0,2,0,2,0,52,0,
+0,0,51,0,33,0,2,0,0,0,52,0,0,0,53,0,34,0,8,0,
+13,0,54,0,14,0,55,0,30,0,56,0,32,0,57,0,33,0,58,0,
+31,0,59,0,4,0,60,0,4,0,61,0,35,0,4,0,34,0,62,0,
+13,0,63,0,4,0,64,0,0,0,37,0,36,0,7,0,25,0,38,0,
+35,0,65,0,23,0,66,0,24,0,67,0,37,0,68,0,7,0,43,0,
+0,0,69,0,38,0,2,0,36,0,70,0,13,0,39,0,39,0,4,0,
+17,0,71,0,25,0,72,0,4,0,73,0,7,0,74,0,40,0,4,0,
+25,0,38,0,39,0,75,0,4,0,76,0,7,0,43,0,41,0,3,0,
+27,0,47,0,4,0,77,0,0,0,37,0,42,0,3,0,27,0,47,0,
+4,0,77,0,0,0,37,0,43,0,4,0,4,0,78,0,7,0,79,0,
+7,0,80,0,7,0,81,0,37,0,14,0,4,0,82,0,4,0,83,0,
+43,0,84,0,4,0,85,0,7,0,86,0,7,0,87,0,7,0,88,0,
+7,0,89,0,7,0,90,0,4,0,91,0,4,0,92,0,4,0,93,0,
+4,0,94,0,0,0,37,0,44,0,5,0,25,0,38,0,35,0,65,0,
+13,0,39,0,7,0,43,0,4,0,95,0,45,0,5,0,27,0,47,0,
+13,0,96,0,14,0,97,0,4,0,98,0,0,0,99,0,46,0,24,0,
+9,0,100,0,9,0,101,0,25,0,102,0,0,0,35,0,18,0,103,0,
+18,0,104,0,14,0,105,0,14,0,106,0,14,0,107,0,8,0,108,0,
+8,0,109,0,8,0,110,0,8,0,111,0,8,0,112,0,8,0,113,0,
+8,0,114,0,4,0,115,0,4,0,116,0,4,0,117,0,4,0,118,0,
+4,0,119,0,4,0,120,0,4,0,121,0,0,0,37,0,47,0,23,0,
+9,0,100,0,9,0,101,0,25,0,102,0,0,0,35,0,17,0,103,0,
+17,0,104,0,13,0,105,0,13,0,106,0,13,0,107,0,7,0,108,0,
+7,0,109,0,7,0,110,0,7,0,111,0,7,0,112,0,7,0,113,0,
+7,0,114,0,4,0,115,0,4,0,116,0,4,0,117,0,4,0,118,0,
+4,0,119,0,4,0,120,0,4,0,121,0,48,0,21,0,47,0,122,0,
+15,0,123,0,13,0,124,0,13,0,125,0,13,0,126,0,13,0,127,0,
+13,0,-128,0,13,0,-127,0,13,0,-126,0,13,0,-125,0,13,0,-124,0,
+7,0,-123,0,7,0,-122,0,7,0,-121,0,7,0,-120,0,7,0,-119,0,
+7,0,-118,0,7,0,-117,0,7,0,-116,0,7,0,-115,0,4,0,-114,0,
+49,0,22,0,46,0,122,0,16,0,123,0,14,0,124,0,14,0,125,0,
+14,0,126,0,14,0,127,0,14,0,-128,0,14,0,-127,0,14,0,-126,0,
+14,0,-125,0,14,0,-124,0,8,0,-123,0,8,0,-122,0,8,0,-121,0,
+8,0,-120,0,8,0,-119,0,8,0,-118,0,8,0,-117,0,8,0,-116,0,
+8,0,-115,0,4,0,-114,0,0,0,37,0,50,0,2,0,4,0,-113,0,
+4,0,-112,0,51,0,11,0,52,0,-111,0,52,0,-110,0,0,0,35,0,
+4,0,-109,0,4,0,-108,0,4,0,-107,0,4,0,-106,0,7,0,-105,0,
+7,0,-104,0,4,0,-103,0,0,0,-102,0,53,0,3,0,51,0,-101,0,
+13,0,-100,0,13,0,-99,0,54,0,3,0,51,0,-101,0,14,0,-100,0,
+14,0,-99,0,55,0,13,0,51,0,-101,0,18,0,-98,0,18,0,-97,0,
+4,0,-96,0,4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,
+7,0,-91,0,7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,
+56,0,13,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,4,0,-96,0,
+4,0,-95,0,4,0,-94,0,7,0,-93,0,7,0,-92,0,7,0,-91,0,
+7,0,-90,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,57,0,11,0,
+51,0,-101,0,17,0,-98,0,17,0,-97,0,7,0,-86,0,7,0,-85,0,
+7,0,-84,0,7,0,-89,0,7,0,-88,0,7,0,-87,0,7,0,-83,0,
+0,0,21,0,58,0,9,0,51,0,-101,0,17,0,-98,0,17,0,-97,0,
+13,0,-82,0,13,0,-81,0,13,0,-80,0,13,0,-79,0,4,0,-78,0,
+4,0,-77,0,59,0,5,0,58,0,-76,0,4,0,-75,0,7,0,-74,0,
+7,0,-73,0,7,0,-72,0,60,0,9,0,51,0,-101,0,17,0,-98,0,
+17,0,-97,0,7,0,-82,0,7,0,-81,0,7,0,-80,0,7,0,-79,0,
+4,0,-78,0,4,0,-77,0,61,0,4,0,7,0,-71,0,7,0,-70,0,
+7,0,-69,0,4,0,78,0,62,0,10,0,61,0,-68,0,13,0,-67,0,
+13,0,-66,0,13,0,-65,0,13,0,-64,0,13,0,-63,0,7,0,-123,0,
+7,0,-62,0,4,0,-61,0,4,0,53,0,63,0,4,0,61,0,-68,0,
+4,0,-60,0,7,0,-59,0,4,0,-58,0,64,0,4,0,13,0,-63,0,
+61,0,-68,0,4,0,-57,0,7,0,-56,0,65,0,7,0,13,0,-55,0,
+61,0,-68,0,4,0,-54,0,7,0,-53,0,7,0,-52,0,7,0,-51,0,
+4,0,53,0,66,0,6,0,15,0,-50,0,13,0,-52,0,13,0,-49,0,
+52,0,-48,0,4,0,-47,0,7,0,-51,0,67,0,26,0,4,0,-46,0,
+7,0,-45,0,7,0,-83,0,7,0,-44,0,7,0,-43,0,7,0,-42,0,
+7,0,-41,0,7,0,-40,0,7,0,-39,0,7,0,-38,0,7,0,-37,0,
+7,0,-36,0,7,0,-35,0,7,0,-34,0,7,0,-33,0,7,0,-32,0,
+7,0,-31,0,7,0,-30,0,7,0,-29,0,7,0,-28,0,7,0,-27,0,
+4,0,-26,0,4,0,-25,0,4,0,-24,0,4,0,-23,0,4,0,116,0,
+68,0,12,0,15,0,-22,0,15,0,-21,0,15,0,-20,0,13,0,-19,0,
+13,0,-18,0,7,0,-17,0,4,0,-16,0,4,0,-15,0,4,0,-14,0,
+4,0,-13,0,7,0,-53,0,4,0,53,0,69,0,27,0,17,0,-12,0,
+15,0,-11,0,15,0,-10,0,13,0,-19,0,13,0,-9,0,13,0,-8,0,
+13,0,-7,0,13,0,-6,0,13,0,-5,0,4,0,-4,0,7,0,-3,0,
+4,0,-2,0,4,0,-1,0,4,0,0,1,7,0,1,1,7,0,2,1,
+4,0,3,1,4,0,4,1,7,0,5,1,7,0,6,1,7,0,7,1,
+7,0,8,1,7,0,9,1,7,0,10,1,4,0,11,1,4,0,12,1,
+4,0,13,1,70,0,12,0,9,0,14,1,9,0,15,1,13,0,16,1,
+7,0,17,1,7,0,18,1,7,0,19,1,4,0,20,1,13,0,21,1,
+4,0,22,1,4,0,23,1,4,0,24,1,4,0,53,0,71,0,19,0,
+47,0,122,0,68,0,25,1,61,0,26,1,62,0,27,1,63,0,28,1,
+64,0,29,1,65,0,30,1,66,0,31,1,69,0,32,1,70,0,33,1,
+4,0,34,1,4,0,-1,0,4,0,35,1,4,0,36,1,4,0,37,1,
+4,0,38,1,4,0,39,1,4,0,40,1,67,0,41,1,};
+int sBulletDNAlen64= sizeof(sBulletDNAstr64);
diff --git a/tests/bullet/src/LinearMath/btSerializer.h b/tests/bullet/src/LinearMath/btSerializer.h
new file mode 100644
index 00000000..8a89374c
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btSerializer.h
@@ -0,0 +1,655 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BT_SERIALIZER_H
+#define BT_SERIALIZER_H
+
+#include "btScalar.h" // has definitions like SIMD_FORCE_INLINE
+#include "btStackAlloc.h"
+#include "btHashMap.h"
+
+#if !defined( __CELLOS_LV2__) && !defined(__MWERKS__)
+#include <memory.h>
+#endif
+#include <string.h>
+
+
+
+///only the 32bit versions for now
+extern unsigned char sBulletDNAstr[];
+extern int sBulletDNAlen;
+extern unsigned char sBulletDNAstr64[];
+extern int sBulletDNAlen64;
+
+SIMD_FORCE_INLINE int btStrLen(const char* str)
+{
+ if (!str)
+ return(0);
+ int len = 0;
+
+ while (*str != 0)
+ {
+ str++;
+ len++;
+ }
+
+ return len;
+}
+
+
+class btChunk
+{
+public:
+ int m_chunkCode;
+ int m_length;
+ void *m_oldPtr;
+ int m_dna_nr;
+ int m_number;
+};
+
+enum btSerializationFlags
+{
+ BT_SERIALIZE_NO_BVH = 1,
+ BT_SERIALIZE_NO_TRIANGLEINFOMAP = 2,
+ BT_SERIALIZE_NO_DUPLICATE_ASSERT = 4
+};
+
+class btSerializer
+{
+
+public:
+
+ virtual ~btSerializer() {}
+
+ virtual const unsigned char* getBufferPointer() const = 0;
+
+ virtual int getCurrentBufferSize() const = 0;
+
+ virtual btChunk* allocate(size_t size, int numElements) = 0;
+
+ virtual void finalizeChunk(btChunk* chunk, const char* structType, int chunkCode,void* oldPtr)= 0;
+
+ virtual void* findPointer(void* oldPtr) = 0;
+
+ virtual void* getUniquePointer(void*oldPtr) = 0;
+
+ virtual void startSerialization() = 0;
+
+ virtual void finishSerialization() = 0;
+
+ virtual const char* findNameForPointer(const void* ptr) const = 0;
+
+ virtual void registerNameForPointer(const void* ptr, const char* name) = 0;
+
+ virtual void serializeName(const char* ptr) = 0;
+
+ virtual int getSerializationFlags() const = 0;
+
+ virtual void setSerializationFlags(int flags) = 0;
+
+
+};
+
+
+
+#define BT_HEADER_LENGTH 12
+#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
+# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+#else
+# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+#endif
+
+#define BT_SOFTBODY_CODE MAKE_ID('S','B','D','Y')
+#define BT_COLLISIONOBJECT_CODE MAKE_ID('C','O','B','J')
+#define BT_RIGIDBODY_CODE MAKE_ID('R','B','D','Y')
+#define BT_CONSTRAINT_CODE MAKE_ID('C','O','N','S')
+#define BT_BOXSHAPE_CODE MAKE_ID('B','O','X','S')
+#define BT_QUANTIZED_BVH_CODE MAKE_ID('Q','B','V','H')
+#define BT_TRIANLGE_INFO_MAP MAKE_ID('T','M','A','P')
+#define BT_SHAPE_CODE MAKE_ID('S','H','A','P')
+#define BT_ARRAY_CODE MAKE_ID('A','R','A','Y')
+#define BT_SBMATERIAL_CODE MAKE_ID('S','B','M','T')
+#define BT_SBNODE_CODE MAKE_ID('S','B','N','D')
+#define BT_DNA_CODE MAKE_ID('D','N','A','1')
+
+
+struct btPointerUid
+{
+ union
+ {
+ void* m_ptr;
+ int m_uniqueIds[2];
+ };
+};
+
+///The btDefaultSerializer is the main Bullet serialization class.
+///The constructor takes an optional argument for backwards compatibility, it is recommended to leave this empty/zero.
+class btDefaultSerializer : public btSerializer
+{
+
+
+ btAlignedObjectArray<char*> mTypes;
+ btAlignedObjectArray<short*> mStructs;
+ btAlignedObjectArray<short> mTlens;
+ btHashMap<btHashInt, int> mStructReverse;
+ btHashMap<btHashString,int> mTypeLookup;
+
+
+ btHashMap<btHashPtr,void*> m_chunkP;
+
+ btHashMap<btHashPtr,const char*> m_nameMap;
+
+ btHashMap<btHashPtr,btPointerUid> m_uniquePointers;
+ int m_uniqueIdGenerator;
+
+ int m_totalSize;
+ unsigned char* m_buffer;
+ int m_currentSize;
+ void* m_dna;
+ int m_dnaLength;
+
+ int m_serializationFlags;
+
+
+ btAlignedObjectArray<btChunk*> m_chunkPtrs;
+
+protected:
+
+ virtual void* findPointer(void* oldPtr)
+ {
+ void** ptr = m_chunkP.find(oldPtr);
+ if (ptr && *ptr)
+ return *ptr;
+ return 0;
+ }
+
+
+
+
+
+ void writeDNA()
+ {
+ btChunk* dnaChunk = allocate(m_dnaLength,1);
+ memcpy(dnaChunk->m_oldPtr,m_dna,m_dnaLength);
+ finalizeChunk(dnaChunk,"DNA1",BT_DNA_CODE, m_dna);
+ }
+
+ int getReverseType(const char *type) const
+ {
+
+ btHashString key(type);
+ const int* valuePtr = mTypeLookup.find(key);
+ if (valuePtr)
+ return *valuePtr;
+
+ return -1;
+ }
+
+ void initDNA(const char* bdnaOrg,int dnalen)
+ {
+ ///was already initialized
+ if (m_dna)
+ return;
+
+ int littleEndian= 1;
+ littleEndian= ((char*)&littleEndian)[0];
+
+
+ m_dna = btAlignedAlloc(dnalen,16);
+ memcpy(m_dna,bdnaOrg,dnalen);
+ m_dnaLength = dnalen;
+
+ int *intPtr=0;
+ short *shtPtr=0;
+ char *cp = 0;int dataLen =0;long nr=0;
+ intPtr = (int*)m_dna;
+
+ /*
+ SDNA (4 bytes) (magic number)
+ NAME (4 bytes)
+ <nr> (4 bytes) amount of names (int)
+ <string>
+ <string>
+ */
+
+ if (strncmp((const char*)m_dna, "SDNA", 4)==0)
+ {
+ // skip ++ NAME
+ intPtr++; intPtr++;
+ }
+
+ // Parse names
+ if (!littleEndian)
+ *intPtr = btSwapEndian(*intPtr);
+
+ dataLen = *intPtr;
+
+ intPtr++;
+
+ cp = (char*)intPtr;
+ int i;
+ for ( i=0; i<dataLen; i++)
+ {
+
+ while (*cp)cp++;
+ cp++;
+ }
+ {
+ nr= (long)cp;
+ // long mask=3;
+ nr= ((nr+3)&~3)-nr;
+ while (nr--)
+ {
+ cp++;
+ }
+ }
+
+ /*
+ TYPE (4 bytes)
+ <nr> amount of types (int)
+ <string>
+ <string>
+ */
+
+ intPtr = (int*)cp;
+ assert(strncmp(cp, "TYPE", 4)==0); intPtr++;
+
+ if (!littleEndian)
+ *intPtr = btSwapEndian(*intPtr);
+
+ dataLen = *intPtr;
+ intPtr++;
+
+
+ cp = (char*)intPtr;
+ for (i=0; i<dataLen; i++)
+ {
+ mTypes.push_back(cp);
+ while (*cp)cp++;
+ cp++;
+ }
+
+ {
+ nr= (long)cp;
+ // long mask=3;
+ nr= ((nr+3)&~3)-nr;
+ while (nr--)
+ {
+ cp++;
+ }
+ }
+
+
+ /*
+ TLEN (4 bytes)
+ <len> (short) the lengths of types
+ <len>
+ */
+
+ // Parse type lens
+ intPtr = (int*)cp;
+ assert(strncmp(cp, "TLEN", 4)==0); intPtr++;
+
+ dataLen = (int)mTypes.size();
+
+ shtPtr = (short*)intPtr;
+ for (i=0; i<dataLen; i++, shtPtr++)
+ {
+ if (!littleEndian)
+ shtPtr[0] = btSwapEndian(shtPtr[0]);
+ mTlens.push_back(shtPtr[0]);
+ }
+
+ if (dataLen & 1) shtPtr++;
+
+ /*
+ STRC (4 bytes)
+ <nr> amount of structs (int)
+ <typenr>
+ <nr_of_elems>
+ <typenr>
+ <namenr>
+ <typenr>
+ <namenr>
+ */
+
+ intPtr = (int*)shtPtr;
+ cp = (char*)intPtr;
+ assert(strncmp(cp, "STRC", 4)==0); intPtr++;
+
+ if (!littleEndian)
+ *intPtr = btSwapEndian(*intPtr);
+ dataLen = *intPtr ;
+ intPtr++;
+
+
+ shtPtr = (short*)intPtr;
+ for (i=0; i<dataLen; i++)
+ {
+ mStructs.push_back (shtPtr);
+
+ if (!littleEndian)
+ {
+ shtPtr[0]= btSwapEndian(shtPtr[0]);
+ shtPtr[1]= btSwapEndian(shtPtr[1]);
+
+ int len = shtPtr[1];
+ shtPtr+= 2;
+
+ for (int a=0; a<len; a++, shtPtr+=2)
+ {
+ shtPtr[0]= btSwapEndian(shtPtr[0]);
+ shtPtr[1]= btSwapEndian(shtPtr[1]);
+ }
+
+ } else
+ {
+ shtPtr+= (2*shtPtr[1])+2;
+ }
+ }
+
+ // build reverse lookups
+ for (i=0; i<(int)mStructs.size(); i++)
+ {
+ short *strc = mStructs.at(i);
+ mStructReverse.insert(strc[0], i);
+ mTypeLookup.insert(btHashString(mTypes[strc[0]]),i);
+ }
+ }
+
+public:
+
+
+
+
+ btDefaultSerializer(int totalSize=0)
+ :m_totalSize(totalSize),
+ m_currentSize(0),
+ m_dna(0),
+ m_dnaLength(0),
+ m_serializationFlags(0)
+ {
+ m_buffer = m_totalSize?(unsigned char*)btAlignedAlloc(totalSize,16):0;
+
+ const bool VOID_IS_8 = ((sizeof(void*)==8));
+
+#ifdef BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
+ if (VOID_IS_8)
+ {
+#if _WIN64
+ initDNA((const char*)sBulletDNAstr64,sBulletDNAlen64);
+#else
+ btAssert(0);
+#endif
+ } else
+ {
+#ifndef _WIN64
+ initDNA((const char*)sBulletDNAstr,sBulletDNAlen);
+#else
+ btAssert(0);
+#endif
+ }
+
+#else //BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
+ if (VOID_IS_8)
+ {
+ initDNA((const char*)sBulletDNAstr64,sBulletDNAlen64);
+ } else
+ {
+ initDNA((const char*)sBulletDNAstr,sBulletDNAlen);
+ }
+#endif //BT_INTERNAL_UPDATE_SERIALIZATION_STRUCTURES
+
+ }
+
+ virtual ~btDefaultSerializer()
+ {
+ if (m_buffer)
+ btAlignedFree(m_buffer);
+ if (m_dna)
+ btAlignedFree(m_dna);
+ }
+
+ void writeHeader(unsigned char* buffer) const
+ {
+
+
+#ifdef BT_USE_DOUBLE_PRECISION
+ memcpy(buffer, "BULLETd", 7);
+#else
+ memcpy(buffer, "BULLETf", 7);
+#endif //BT_USE_DOUBLE_PRECISION
+
+ int littleEndian= 1;
+ littleEndian= ((char*)&littleEndian)[0];
+
+ if (sizeof(void*)==8)
+ {
+ buffer[7] = '-';
+ } else
+ {
+ buffer[7] = '_';
+ }
+
+ if (littleEndian)
+ {
+ buffer[8]='v';
+ } else
+ {
+ buffer[8]='V';
+ }
+
+
+ buffer[9] = '2';
+ buffer[10] = '7';
+ buffer[11] = '8';
+
+ }
+
+ virtual void startSerialization()
+ {
+ m_uniqueIdGenerator= 1;
+ if (m_totalSize)
+ {
+ unsigned char* buffer = internalAlloc(BT_HEADER_LENGTH);
+ writeHeader(buffer);
+ }
+
+ }
+
+ virtual void finishSerialization()
+ {
+ writeDNA();
+
+ //if we didn't pre-allocate a buffer, we need to create a contiguous buffer now
+ int mysize = 0;
+ if (!m_totalSize)
+ {
+ if (m_buffer)
+ btAlignedFree(m_buffer);
+
+ m_currentSize += BT_HEADER_LENGTH;
+ m_buffer = (unsigned char*)btAlignedAlloc(m_currentSize,16);
+
+ unsigned char* currentPtr = m_buffer;
+ writeHeader(m_buffer);
+ currentPtr += BT_HEADER_LENGTH;
+ mysize+=BT_HEADER_LENGTH;
+ for (int i=0;i< m_chunkPtrs.size();i++)
+ {
+ int curLength = sizeof(btChunk)+m_chunkPtrs[i]->m_length;
+ memcpy(currentPtr,m_chunkPtrs[i], curLength);
+ btAlignedFree(m_chunkPtrs[i]);
+ currentPtr+=curLength;
+ mysize+=curLength;
+ }
+ }
+
+ mTypes.clear();
+ mStructs.clear();
+ mTlens.clear();
+ mStructReverse.clear();
+ mTypeLookup.clear();
+ m_chunkP.clear();
+ m_nameMap.clear();
+ m_uniquePointers.clear();
+ m_chunkPtrs.clear();
+ }
+
+ virtual void* getUniquePointer(void*oldPtr)
+ {
+ if (!oldPtr)
+ return 0;
+
+ btPointerUid* uptr = (btPointerUid*)m_uniquePointers.find(oldPtr);
+ if (uptr)
+ {
+ return uptr->m_ptr;
+ }
+ m_uniqueIdGenerator++;
+
+ btPointerUid uid;
+ uid.m_uniqueIds[0] = m_uniqueIdGenerator;
+ uid.m_uniqueIds[1] = m_uniqueIdGenerator;
+ m_uniquePointers.insert(oldPtr,uid);
+ return uid.m_ptr;
+
+ }
+
+ virtual const unsigned char* getBufferPointer() const
+ {
+ return m_buffer;
+ }
+
+ virtual int getCurrentBufferSize() const
+ {
+ return m_currentSize;
+ }
+
+ virtual void finalizeChunk(btChunk* chunk, const char* structType, int chunkCode,void* oldPtr)
+ {
+ if (!(m_serializationFlags&BT_SERIALIZE_NO_DUPLICATE_ASSERT))
+ {
+ btAssert(!findPointer(oldPtr));
+ }
+
+ chunk->m_dna_nr = getReverseType(structType);
+
+ chunk->m_chunkCode = chunkCode;
+
+ void* uniquePtr = getUniquePointer(oldPtr);
+
+ m_chunkP.insert(oldPtr,uniquePtr);//chunk->m_oldPtr);
+ chunk->m_oldPtr = uniquePtr;//oldPtr;
+
+ }
+
+
+ virtual unsigned char* internalAlloc(size_t size)
+ {
+ unsigned char* ptr = 0;
+
+ if (m_totalSize)
+ {
+ ptr = m_buffer+m_currentSize;
+ m_currentSize += int(size);
+ btAssert(m_currentSize<m_totalSize);
+ } else
+ {
+ ptr = (unsigned char*)btAlignedAlloc(size,16);
+ m_currentSize += int(size);
+ }
+ return ptr;
+ }
+
+
+
+ virtual btChunk* allocate(size_t size, int numElements)
+ {
+
+ unsigned char* ptr = internalAlloc(int(size)*numElements+sizeof(btChunk));
+
+ unsigned char* data = ptr + sizeof(btChunk);
+
+ btChunk* chunk = (btChunk*)ptr;
+ chunk->m_chunkCode = 0;
+ chunk->m_oldPtr = data;
+ chunk->m_length = int(size)*numElements;
+ chunk->m_number = numElements;
+
+ m_chunkPtrs.push_back(chunk);
+
+
+ return chunk;
+ }
+
+ virtual const char* findNameForPointer(const void* ptr) const
+ {
+ const char*const * namePtr = m_nameMap.find(ptr);
+ if (namePtr && *namePtr)
+ return *namePtr;
+ return 0;
+
+ }
+
+ virtual void registerNameForPointer(const void* ptr, const char* name)
+ {
+ m_nameMap.insert(ptr,name);
+ }
+
+ virtual void serializeName(const char* name)
+ {
+ if (name)
+ {
+ //don't serialize name twice
+ if (findPointer((void*)name))
+ return;
+
+ int len = btStrLen(name);
+ if (len)
+ {
+
+ int newLen = len+1;
+ int padding = ((newLen+3)&~3)-newLen;
+ newLen += padding;
+
+ //serialize name string now
+ btChunk* chunk = allocate(sizeof(char),newLen);
+ char* destinationName = (char*)chunk->m_oldPtr;
+ for (int i=0;i<len;i++)
+ {
+ destinationName[i] = name[i];
+ }
+ destinationName[len] = 0;
+ finalizeChunk(chunk,"char",BT_ARRAY_CODE,(void*)name);
+ }
+ }
+ }
+
+ virtual int getSerializationFlags() const
+ {
+ return m_serializationFlags;
+ }
+
+ virtual void setSerializationFlags(int flags)
+ {
+ m_serializationFlags = flags;
+ }
+
+};
+
+
+#endif //BT_SERIALIZER_H
+
diff --git a/tests/bullet/src/LinearMath/btStackAlloc.h b/tests/bullet/src/LinearMath/btStackAlloc.h
new file mode 100644
index 00000000..397b0848
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btStackAlloc.h
@@ -0,0 +1,116 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/*
+StackAlloc extracted from GJK-EPA collision solver by Nathanael Presson
+Nov.2006
+*/
+
+#ifndef BT_STACK_ALLOC
+#define BT_STACK_ALLOC
+
+#include "btScalar.h" //for btAssert
+#include "btAlignedAllocator.h"
+
+///The btBlock class is an internal structure for the btStackAlloc memory allocator.
+struct btBlock
+{
+ btBlock* previous;
+ unsigned char* address;
+};
+
+///The StackAlloc class provides some fast stack-based memory allocator (LIFO last-in first-out)
+class btStackAlloc
+{
+public:
+
+ btStackAlloc(unsigned int size) { ctor();create(size); }
+ ~btStackAlloc() { destroy(); }
+
+ inline void create(unsigned int size)
+ {
+ destroy();
+ data = (unsigned char*) btAlignedAlloc(size,16);
+ totalsize = size;
+ }
+ inline void destroy()
+ {
+ btAssert(usedsize==0);
+ //Raise(L"StackAlloc is still in use");
+
+ if(usedsize==0)
+ {
+ if(!ischild && data)
+ btAlignedFree(data);
+
+ data = 0;
+ usedsize = 0;
+ }
+
+ }
+
+ int getAvailableMemory() const
+ {
+ return static_cast<int>(totalsize - usedsize);
+ }
+
+ unsigned char* allocate(unsigned int size)
+ {
+ const unsigned int nus(usedsize+size);
+ if(nus<totalsize)
+ {
+ usedsize=nus;
+ return(data+(usedsize-size));
+ }
+ btAssert(0);
+ //&& (L"Not enough memory"));
+
+ return(0);
+ }
+ SIMD_FORCE_INLINE btBlock* beginBlock()
+ {
+ btBlock* pb = (btBlock*)allocate(sizeof(btBlock));
+ pb->previous = current;
+ pb->address = data+usedsize;
+ current = pb;
+ return(pb);
+ }
+ SIMD_FORCE_INLINE void endBlock(btBlock* block)
+ {
+ btAssert(block==current);
+ //Raise(L"Unmatched blocks");
+ if(block==current)
+ {
+ current = block->previous;
+ usedsize = (unsigned int)((block->address-data)-sizeof(btBlock));
+ }
+ }
+
+private:
+ void ctor()
+ {
+ data = 0;
+ totalsize = 0;
+ usedsize = 0;
+ current = 0;
+ ischild = false;
+ }
+ unsigned char* data;
+ unsigned int totalsize;
+ unsigned int usedsize;
+ btBlock* current;
+ bool ischild;
+};
+
+#endif //BT_STACK_ALLOC
diff --git a/tests/bullet/src/LinearMath/btTransform.h b/tests/bullet/src/LinearMath/btTransform.h
new file mode 100644
index 00000000..5e52d183
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btTransform.h
@@ -0,0 +1,307 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_TRANSFORM_H
+#define BT_TRANSFORM_H
+
+
+#include "btMatrix3x3.h"
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btTransformData btTransformDoubleData
+#else
+#define btTransformData btTransformFloatData
+#endif
+
+
+
+
+/**@brief The btTransform class supports rigid transforms with only translation and rotation and no scaling/shear.
+ *It can be used in combination with btVector3, btQuaternion and btMatrix3x3 linear algebra classes. */
+class btTransform {
+
+ ///Storage for the rotation
+ btMatrix3x3 m_basis;
+ ///Storage for the translation
+ btVector3 m_origin;
+
+public:
+
+ /**@brief No initialization constructor */
+ btTransform() {}
+ /**@brief Constructor from btQuaternion (optional btVector3 )
+ * @param q Rotation from quaternion
+ * @param c Translation from Vector (default 0,0,0) */
+ explicit SIMD_FORCE_INLINE btTransform(const btQuaternion& q,
+ const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0)))
+ : m_basis(q),
+ m_origin(c)
+ {}
+
+ /**@brief Constructor from btMatrix3x3 (optional btVector3)
+ * @param b Rotation from Matrix
+ * @param c Translation from Vector default (0,0,0)*/
+ explicit SIMD_FORCE_INLINE btTransform(const btMatrix3x3& b,
+ const btVector3& c = btVector3(btScalar(0), btScalar(0), btScalar(0)))
+ : m_basis(b),
+ m_origin(c)
+ {}
+ /**@brief Copy constructor */
+ SIMD_FORCE_INLINE btTransform (const btTransform& other)
+ : m_basis(other.m_basis),
+ m_origin(other.m_origin)
+ {
+ }
+ /**@brief Assignment Operator */
+ SIMD_FORCE_INLINE btTransform& operator=(const btTransform& other)
+ {
+ m_basis = other.m_basis;
+ m_origin = other.m_origin;
+ return *this;
+ }
+
+
+ /**@brief Set the current transform as the value of the product of two transforms
+ * @param t1 Transform 1
+ * @param t2 Transform 2
+ * This = Transform1 * Transform2 */
+ SIMD_FORCE_INLINE void mult(const btTransform& t1, const btTransform& t2) {
+ m_basis = t1.m_basis * t2.m_basis;
+ m_origin = t1(t2.m_origin);
+ }
+
+/* void multInverseLeft(const btTransform& t1, const btTransform& t2) {
+ btVector3 v = t2.m_origin - t1.m_origin;
+ m_basis = btMultTransposeLeft(t1.m_basis, t2.m_basis);
+ m_origin = v * t1.m_basis;
+ }
+ */
+
+/**@brief Return the transform of the vector */
+ SIMD_FORCE_INLINE btVector3 operator()(const btVector3& x) const
+ {
+ return btVector3(m_basis[0].dot(x) + m_origin.x(),
+ m_basis[1].dot(x) + m_origin.y(),
+ m_basis[2].dot(x) + m_origin.z());
+ }
+
+ /**@brief Return the transform of the vector */
+ SIMD_FORCE_INLINE btVector3 operator*(const btVector3& x) const
+ {
+ return (*this)(x);
+ }
+
+ /**@brief Return the transform of the btQuaternion */
+ SIMD_FORCE_INLINE btQuaternion operator*(const btQuaternion& q) const
+ {
+ return getRotation() * q;
+ }
+
+ /**@brief Return the basis matrix for the rotation */
+ SIMD_FORCE_INLINE btMatrix3x3& getBasis() { return m_basis; }
+ /**@brief Return the basis matrix for the rotation */
+ SIMD_FORCE_INLINE const btMatrix3x3& getBasis() const { return m_basis; }
+
+ /**@brief Return the origin vector translation */
+ SIMD_FORCE_INLINE btVector3& getOrigin() { return m_origin; }
+ /**@brief Return the origin vector translation */
+ SIMD_FORCE_INLINE const btVector3& getOrigin() const { return m_origin; }
+
+ /**@brief Return a quaternion representing the rotation */
+ btQuaternion getRotation() const {
+ btQuaternion q;
+ m_basis.getRotation(q);
+ return q;
+ }
+
+
+ /**@brief Set from an array
+ * @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */
+ void setFromOpenGLMatrix(const btScalar *m)
+ {
+ m_basis.setFromOpenGLSubMatrix(m);
+ m_origin.setValue(m[12],m[13],m[14]);
+ }
+
+ /**@brief Fill an array representation
+ * @param m A pointer to a 15 element array (12 rotation(row major padded on the right by 1), and 3 translation */
+ void getOpenGLMatrix(btScalar *m) const
+ {
+ m_basis.getOpenGLSubMatrix(m);
+ m[12] = m_origin.x();
+ m[13] = m_origin.y();
+ m[14] = m_origin.z();
+ m[15] = btScalar(1.0);
+ }
+
+ /**@brief Set the translational element
+ * @param origin The vector to set the translation to */
+ SIMD_FORCE_INLINE void setOrigin(const btVector3& origin)
+ {
+ m_origin = origin;
+ }
+
+ SIMD_FORCE_INLINE btVector3 invXform(const btVector3& inVec) const;
+
+
+ /**@brief Set the rotational element by btMatrix3x3 */
+ SIMD_FORCE_INLINE void setBasis(const btMatrix3x3& basis)
+ {
+ m_basis = basis;
+ }
+
+ /**@brief Set the rotational element by btQuaternion */
+ SIMD_FORCE_INLINE void setRotation(const btQuaternion& q)
+ {
+ m_basis.setRotation(q);
+ }
+
+
+ /**@brief Set this transformation to the identity */
+ void setIdentity()
+ {
+ m_basis.setIdentity();
+ m_origin.setValue(btScalar(0.0), btScalar(0.0), btScalar(0.0));
+ }
+
+ /**@brief Multiply this Transform by another(this = this * another)
+ * @param t The other transform */
+ btTransform& operator*=(const btTransform& t)
+ {
+ m_origin += m_basis * t.m_origin;
+ m_basis *= t.m_basis;
+ return *this;
+ }
+
+ /**@brief Return the inverse of this transform */
+ btTransform inverse() const
+ {
+ btMatrix3x3 inv = m_basis.transpose();
+ return btTransform(inv, inv * -m_origin);
+ }
+
+ /**@brief Return the inverse of this transform times the other transform
+ * @param t The other transform
+ * return this.inverse() * the other */
+ btTransform inverseTimes(const btTransform& t) const;
+
+ /**@brief Return the product of this transform and the other */
+ btTransform operator*(const btTransform& t) const;
+
+ /**@brief Return an identity transform */
+ static const btTransform& getIdentity()
+ {
+ static const btTransform identityTransform(btMatrix3x3::getIdentity());
+ return identityTransform;
+ }
+
+ void serialize(struct btTransformData& dataOut) const;
+
+ void serializeFloat(struct btTransformFloatData& dataOut) const;
+
+ void deSerialize(const struct btTransformData& dataIn);
+
+ void deSerializeDouble(const struct btTransformDoubleData& dataIn);
+
+ void deSerializeFloat(const struct btTransformFloatData& dataIn);
+
+};
+
+
+SIMD_FORCE_INLINE btVector3
+btTransform::invXform(const btVector3& inVec) const
+{
+ btVector3 v = inVec - m_origin;
+ return (m_basis.transpose() * v);
+}
+
+SIMD_FORCE_INLINE btTransform
+btTransform::inverseTimes(const btTransform& t) const
+{
+ btVector3 v = t.getOrigin() - m_origin;
+ return btTransform(m_basis.transposeTimes(t.m_basis),
+ v * m_basis);
+}
+
+SIMD_FORCE_INLINE btTransform
+btTransform::operator*(const btTransform& t) const
+{
+ return btTransform(m_basis * t.m_basis,
+ (*this)(t.m_origin));
+}
+
+/**@brief Test if two transforms have all elements equal */
+SIMD_FORCE_INLINE bool operator==(const btTransform& t1, const btTransform& t2)
+{
+ return ( t1.getBasis() == t2.getBasis() &&
+ t1.getOrigin() == t2.getOrigin() );
+}
+
+
+///for serialization
+struct btTransformFloatData
+{
+ btMatrix3x3FloatData m_basis;
+ btVector3FloatData m_origin;
+};
+
+struct btTransformDoubleData
+{
+ btMatrix3x3DoubleData m_basis;
+ btVector3DoubleData m_origin;
+};
+
+
+
+SIMD_FORCE_INLINE void btTransform::serialize(btTransformData& dataOut) const
+{
+ m_basis.serialize(dataOut.m_basis);
+ m_origin.serialize(dataOut.m_origin);
+}
+
+SIMD_FORCE_INLINE void btTransform::serializeFloat(btTransformFloatData& dataOut) const
+{
+ m_basis.serializeFloat(dataOut.m_basis);
+ m_origin.serializeFloat(dataOut.m_origin);
+}
+
+
+SIMD_FORCE_INLINE void btTransform::deSerialize(const btTransformData& dataIn)
+{
+ m_basis.deSerialize(dataIn.m_basis);
+ m_origin.deSerialize(dataIn.m_origin);
+}
+
+SIMD_FORCE_INLINE void btTransform::deSerializeFloat(const btTransformFloatData& dataIn)
+{
+ m_basis.deSerializeFloat(dataIn.m_basis);
+ m_origin.deSerializeFloat(dataIn.m_origin);
+}
+
+SIMD_FORCE_INLINE void btTransform::deSerializeDouble(const btTransformDoubleData& dataIn)
+{
+ m_basis.deSerializeDouble(dataIn.m_basis);
+ m_origin.deSerializeDouble(dataIn.m_origin);
+}
+
+
+#endif //BT_TRANSFORM_H
+
+
+
+
+
+
diff --git a/tests/bullet/src/LinearMath/btTransformUtil.h b/tests/bullet/src/LinearMath/btTransformUtil.h
new file mode 100644
index 00000000..2303c274
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btTransformUtil.h
@@ -0,0 +1,228 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+#ifndef BT_TRANSFORM_UTIL_H
+#define BT_TRANSFORM_UTIL_H
+
+#include "btTransform.h"
+#define ANGULAR_MOTION_THRESHOLD btScalar(0.5)*SIMD_HALF_PI
+
+
+
+
+SIMD_FORCE_INLINE btVector3 btAabbSupport(const btVector3& halfExtents,const btVector3& supportDir)
+{
+ return btVector3(supportDir.x() < btScalar(0.0) ? -halfExtents.x() : halfExtents.x(),
+ supportDir.y() < btScalar(0.0) ? -halfExtents.y() : halfExtents.y(),
+ supportDir.z() < btScalar(0.0) ? -halfExtents.z() : halfExtents.z());
+}
+
+
+
+
+
+
+/// Utils related to temporal transforms
+class btTransformUtil
+{
+
+public:
+
+ static void integrateTransform(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep,btTransform& predictedTransform)
+ {
+ predictedTransform.setOrigin(curTrans.getOrigin() + linvel * timeStep);
+// #define QUATERNION_DERIVATIVE
+ #ifdef QUATERNION_DERIVATIVE
+ btQuaternion predictedOrn = curTrans.getRotation();
+ predictedOrn += (angvel * predictedOrn) * (timeStep * btScalar(0.5));
+ predictedOrn.normalize();
+ #else
+ //Exponential map
+ //google for "Practical Parameterization of Rotations Using the Exponential Map", F. Sebastian Grassia
+
+ btVector3 axis;
+ btScalar fAngle = angvel.length();
+ //limit the angular motion
+ if (fAngle*timeStep > ANGULAR_MOTION_THRESHOLD)
+ {
+ fAngle = ANGULAR_MOTION_THRESHOLD / timeStep;
+ }
+
+ if ( fAngle < btScalar(0.001) )
+ {
+ // use Taylor's expansions of sync function
+ axis = angvel*( btScalar(0.5)*timeStep-(timeStep*timeStep*timeStep)*(btScalar(0.020833333333))*fAngle*fAngle );
+ }
+ else
+ {
+ // sync(fAngle) = sin(c*fAngle)/t
+ axis = angvel*( btSin(btScalar(0.5)*fAngle*timeStep)/fAngle );
+ }
+ btQuaternion dorn (axis.x(),axis.y(),axis.z(),btCos( fAngle*timeStep*btScalar(0.5) ));
+ btQuaternion orn0 = curTrans.getRotation();
+
+ btQuaternion predictedOrn = dorn * orn0;
+ predictedOrn.normalize();
+ #endif
+ predictedTransform.setRotation(predictedOrn);
+ }
+
+ static void calculateVelocityQuaternion(const btVector3& pos0,const btVector3& pos1,const btQuaternion& orn0,const btQuaternion& orn1,btScalar timeStep,btVector3& linVel,btVector3& angVel)
+ {
+ linVel = (pos1 - pos0) / timeStep;
+ btVector3 axis;
+ btScalar angle;
+ if (orn0 != orn1)
+ {
+ calculateDiffAxisAngleQuaternion(orn0,orn1,axis,angle);
+ angVel = axis * angle / timeStep;
+ } else
+ {
+ angVel.setValue(0,0,0);
+ }
+ }
+
+ static void calculateDiffAxisAngleQuaternion(const btQuaternion& orn0,const btQuaternion& orn1a,btVector3& axis,btScalar& angle)
+ {
+ btQuaternion orn1 = orn0.nearest(orn1a);
+ btQuaternion dorn = orn1 * orn0.inverse();
+ angle = dorn.getAngle();
+ axis = btVector3(dorn.x(),dorn.y(),dorn.z());
+ axis[3] = btScalar(0.);
+ //check for axis length
+ btScalar len = axis.length2();
+ if (len < SIMD_EPSILON*SIMD_EPSILON)
+ axis = btVector3(btScalar(1.),btScalar(0.),btScalar(0.));
+ else
+ axis /= btSqrt(len);
+ }
+
+ static void calculateVelocity(const btTransform& transform0,const btTransform& transform1,btScalar timeStep,btVector3& linVel,btVector3& angVel)
+ {
+ linVel = (transform1.getOrigin() - transform0.getOrigin()) / timeStep;
+ btVector3 axis;
+ btScalar angle;
+ calculateDiffAxisAngle(transform0,transform1,axis,angle);
+ angVel = axis * angle / timeStep;
+ }
+
+ static void calculateDiffAxisAngle(const btTransform& transform0,const btTransform& transform1,btVector3& axis,btScalar& angle)
+ {
+ btMatrix3x3 dmat = transform1.getBasis() * transform0.getBasis().inverse();
+ btQuaternion dorn;
+ dmat.getRotation(dorn);
+
+ ///floating point inaccuracy can lead to w component > 1..., which breaks
+ dorn.normalize();
+
+ angle = dorn.getAngle();
+ axis = btVector3(dorn.x(),dorn.y(),dorn.z());
+ axis[3] = btScalar(0.);
+ //check for axis length
+ btScalar len = axis.length2();
+ if (len < SIMD_EPSILON*SIMD_EPSILON)
+ axis = btVector3(btScalar(1.),btScalar(0.),btScalar(0.));
+ else
+ axis /= btSqrt(len);
+ }
+
+};
+
+
+///The btConvexSeparatingDistanceUtil can help speed up convex collision detection
+///by conservatively updating a cached separating distance/vector instead of re-calculating the closest distance
+class btConvexSeparatingDistanceUtil
+{
+ btQuaternion m_ornA;
+ btQuaternion m_ornB;
+ btVector3 m_posA;
+ btVector3 m_posB;
+
+ btVector3 m_separatingNormal;
+
+ btScalar m_boundingRadiusA;
+ btScalar m_boundingRadiusB;
+ btScalar m_separatingDistance;
+
+public:
+
+ btConvexSeparatingDistanceUtil(btScalar boundingRadiusA,btScalar boundingRadiusB)
+ :m_boundingRadiusA(boundingRadiusA),
+ m_boundingRadiusB(boundingRadiusB),
+ m_separatingDistance(0.f)
+ {
+ }
+
+ btScalar getConservativeSeparatingDistance()
+ {
+ return m_separatingDistance;
+ }
+
+ void updateSeparatingDistance(const btTransform& transA,const btTransform& transB)
+ {
+ const btVector3& toPosA = transA.getOrigin();
+ const btVector3& toPosB = transB.getOrigin();
+ btQuaternion toOrnA = transA.getRotation();
+ btQuaternion toOrnB = transB.getRotation();
+
+ if (m_separatingDistance>0.f)
+ {
+
+
+ btVector3 linVelA,angVelA,linVelB,angVelB;
+ btTransformUtil::calculateVelocityQuaternion(m_posA,toPosA,m_ornA,toOrnA,btScalar(1.),linVelA,angVelA);
+ btTransformUtil::calculateVelocityQuaternion(m_posB,toPosB,m_ornB,toOrnB,btScalar(1.),linVelB,angVelB);
+ btScalar maxAngularProjectedVelocity = angVelA.length() * m_boundingRadiusA + angVelB.length() * m_boundingRadiusB;
+ btVector3 relLinVel = (linVelB-linVelA);
+ btScalar relLinVelocLength = relLinVel.dot(m_separatingNormal);
+ if (relLinVelocLength<0.f)
+ {
+ relLinVelocLength = 0.f;
+ }
+
+ btScalar projectedMotion = maxAngularProjectedVelocity +relLinVelocLength;
+ m_separatingDistance -= projectedMotion;
+ }
+
+ m_posA = toPosA;
+ m_posB = toPosB;
+ m_ornA = toOrnA;
+ m_ornB = toOrnB;
+ }
+
+ void initSeparatingDistance(const btVector3& separatingVector,btScalar separatingDistance,const btTransform& transA,const btTransform& transB)
+ {
+ m_separatingDistance = separatingDistance;
+
+ if (m_separatingDistance>0.f)
+ {
+ m_separatingNormal = separatingVector;
+
+ const btVector3& toPosA = transA.getOrigin();
+ const btVector3& toPosB = transB.getOrigin();
+ btQuaternion toOrnA = transA.getRotation();
+ btQuaternion toOrnB = transB.getRotation();
+ m_posA = toPosA;
+ m_posB = toPosB;
+ m_ornA = toOrnA;
+ m_ornB = toOrnB;
+ }
+ }
+
+};
+
+
+#endif //BT_TRANSFORM_UTIL_H
+
diff --git a/tests/bullet/src/LinearMath/btVector3.h b/tests/bullet/src/LinearMath/btVector3.h
new file mode 100644
index 00000000..d99b7c83
--- /dev/null
+++ b/tests/bullet/src/LinearMath/btVector3.h
@@ -0,0 +1,766 @@
+/*
+Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef BT_VECTOR3_H
+#define BT_VECTOR3_H
+
+
+#include "btScalar.h"
+#include "btMinMax.h"
+
+#ifdef BT_USE_DOUBLE_PRECISION
+#define btVector3Data btVector3DoubleData
+#define btVector3DataName "btVector3DoubleData"
+#else
+#define btVector3Data btVector3FloatData
+#define btVector3DataName "btVector3FloatData"
+#endif //BT_USE_DOUBLE_PRECISION
+
+
+
+
+/**@brief btVector3 can be used to represent 3D points and vectors.
+ * It has an un-used w component to suit 16-byte alignment when btVector3 is stored in containers. This extra component can be used by derived classes (Quaternion?) or by user
+ * Ideally, this class should be replaced by a platform optimized SIMD version that keeps the data in registers
+ */
+ATTRIBUTE_ALIGNED16(class) btVector3
+{
+public:
+
+#if defined (__SPU__) && defined (__CELLOS_LV2__)
+ btScalar m_floats[4];
+public:
+ SIMD_FORCE_INLINE const vec_float4& get128() const
+ {
+ return *((const vec_float4*)&m_floats[0]);
+ }
+public:
+#else //__CELLOS_LV2__ __SPU__
+#ifdef BT_USE_SSE // _WIN32
+ union {
+ __m128 mVec128;
+ btScalar m_floats[4];
+ };
+ SIMD_FORCE_INLINE __m128 get128() const
+ {
+ return mVec128;
+ }
+ SIMD_FORCE_INLINE void set128(__m128 v128)
+ {
+ mVec128 = v128;
+ }
+#else
+ btScalar m_floats[4];
+#endif
+#endif //__CELLOS_LV2__ __SPU__
+
+ public:
+
+ /**@brief No initialization constructor */
+ SIMD_FORCE_INLINE btVector3() {}
+
+
+
+ /**@brief Constructor from scalars
+ * @param x X value
+ * @param y Y value
+ * @param z Z value
+ */
+ SIMD_FORCE_INLINE btVector3(const btScalar& x, const btScalar& y, const btScalar& z)
+ {
+ m_floats[0] = x;
+ m_floats[1] = y;
+ m_floats[2] = z;
+ m_floats[3] = btScalar(0.);
+ }
+
+
+/**@brief Add a vector to this one
+ * @param The vector to add to this one */
+ SIMD_FORCE_INLINE btVector3& operator+=(const btVector3& v)
+ {
+
+ m_floats[0] += v.m_floats[0]; m_floats[1] += v.m_floats[1];m_floats[2] += v.m_floats[2];
+ return *this;
+ }
+
+
+ /**@brief Subtract a vector from this one
+ * @param The vector to subtract */
+ SIMD_FORCE_INLINE btVector3& operator-=(const btVector3& v)
+ {
+ m_floats[0] -= v.m_floats[0]; m_floats[1] -= v.m_floats[1];m_floats[2] -= v.m_floats[2];
+ return *this;
+ }
+ /**@brief Scale the vector
+ * @param s Scale factor */
+ SIMD_FORCE_INLINE btVector3& operator*=(const btScalar& s)
+ {
+ m_floats[0] *= s; m_floats[1] *= s;m_floats[2] *= s;
+ return *this;
+ }
+
+ /**@brief Inversely scale the vector
+ * @param s Scale factor to divide by */
+ SIMD_FORCE_INLINE btVector3& operator/=(const btScalar& s)
+ {
+ btFullAssert(s != btScalar(0.0));
+ return *this *= btScalar(1.0) / s;
+ }
+
+ /**@brief Return the dot product
+ * @param v The other vector in the dot product */
+ SIMD_FORCE_INLINE btScalar dot(const btVector3& v) const
+ {
+ return m_floats[0] * v.m_floats[0] + m_floats[1] * v.m_floats[1] +m_floats[2] * v.m_floats[2];
+ }
+
+ /**@brief Return the length of the vector squared */
+ SIMD_FORCE_INLINE btScalar length2() const
+ {
+ return dot(*this);
+ }
+
+ /**@brief Return the length of the vector */
+ SIMD_FORCE_INLINE btScalar length() const
+ {
+ return btSqrt(length2());
+ }
+
+ /**@brief Return the distance squared between the ends of this and another vector
+ * This is symantically treating the vector like a point */
+ SIMD_FORCE_INLINE btScalar distance2(const btVector3& v) const;
+
+ /**@brief Return the distance between the ends of this and another vector
+ * This is symantically treating the vector like a point */
+ SIMD_FORCE_INLINE btScalar distance(const btVector3& v) const;
+
+ SIMD_FORCE_INLINE btVector3& safeNormalize()
+ {
+ btVector3 absVec = this->absolute();
+ int maxIndex = absVec.maxAxis();
+ if (absVec[maxIndex]>0)
+ {
+ *this /= absVec[maxIndex];
+ return *this /= length();
+ }
+ setValue(1,0,0);
+ return *this;
+ }
+
+ /**@brief Normalize this vector
+ * x^2 + y^2 + z^2 = 1 */
+ SIMD_FORCE_INLINE btVector3& normalize()
+ {
+ return *this /= length();
+ }
+
+ /**@brief Return a normalized version of this vector */
+ SIMD_FORCE_INLINE btVector3 normalized() const;
+
+ /**@brief Return a rotated version of this vector
+ * @param wAxis The axis to rotate about
+ * @param angle The angle to rotate by */
+ SIMD_FORCE_INLINE btVector3 rotate( const btVector3& wAxis, const btScalar angle ) const;
+
+ /**@brief Return the angle between this and another vector
+ * @param v The other vector */
+ SIMD_FORCE_INLINE btScalar angle(const btVector3& v) const
+ {
+ btScalar s = btSqrt(length2() * v.length2());
+ btFullAssert(s != btScalar(0.0));
+ return btAcos(dot(v) / s);
+ }
+ /**@brief Return a vector will the absolute values of each element */
+ SIMD_FORCE_INLINE btVector3 absolute() const
+ {
+ return btVector3(
+ btFabs(m_floats[0]),
+ btFabs(m_floats[1]),
+ btFabs(m_floats[2]));
+ }
+ /**@brief Return the cross product between this and another vector
+ * @param v The other vector */
+ SIMD_FORCE_INLINE btVector3 cross(const btVector3& v) const
+ {
+ return btVector3(
+ m_floats[1] * v.m_floats[2] -m_floats[2] * v.m_floats[1],
+ m_floats[2] * v.m_floats[0] - m_floats[0] * v.m_floats[2],
+ m_floats[0] * v.m_floats[1] - m_floats[1] * v.m_floats[0]);
+ }
+
+ SIMD_FORCE_INLINE btScalar triple(const btVector3& v1, const btVector3& v2) const
+ {
+ return m_floats[0] * (v1.m_floats[1] * v2.m_floats[2] - v1.m_floats[2] * v2.m_floats[1]) +
+ m_floats[1] * (v1.m_floats[2] * v2.m_floats[0] - v1.m_floats[0] * v2.m_floats[2]) +
+ m_floats[2] * (v1.m_floats[0] * v2.m_floats[1] - v1.m_floats[1] * v2.m_floats[0]);
+ }
+
+ /**@brief Return the axis with the smallest value
+ * Note return values are 0,1,2 for x, y, or z */
+ SIMD_FORCE_INLINE int minAxis() const
+ {
+ return m_floats[0] < m_floats[1] ? (m_floats[0] <m_floats[2] ? 0 : 2) : (m_floats[1] <m_floats[2] ? 1 : 2);
+ }
+
+ /**@brief Return the axis with the largest value
+ * Note return values are 0,1,2 for x, y, or z */
+ SIMD_FORCE_INLINE int maxAxis() const
+ {
+ return m_floats[0] < m_floats[1] ? (m_floats[1] <m_floats[2] ? 2 : 1) : (m_floats[0] <m_floats[2] ? 2 : 0);
+ }
+
+ SIMD_FORCE_INLINE int furthestAxis() const
+ {
+ return absolute().minAxis();
+ }
+
+ SIMD_FORCE_INLINE int closestAxis() const
+ {
+ return absolute().maxAxis();
+ }
+
+ SIMD_FORCE_INLINE void setInterpolate3(const btVector3& v0, const btVector3& v1, btScalar rt)
+ {
+ btScalar s = btScalar(1.0) - rt;
+ m_floats[0] = s * v0.m_floats[0] + rt * v1.m_floats[0];
+ m_floats[1] = s * v0.m_floats[1] + rt * v1.m_floats[1];
+ m_floats[2] = s * v0.m_floats[2] + rt * v1.m_floats[2];
+ //don't do the unused w component
+ // m_co[3] = s * v0[3] + rt * v1[3];
+ }
+
+ /**@brief Return the linear interpolation between this and another vector
+ * @param v The other vector
+ * @param t The ration of this to v (t = 0 => return this, t=1 => return other) */
+ SIMD_FORCE_INLINE btVector3 lerp(const btVector3& v, const btScalar& t) const
+ {
+ return btVector3(m_floats[0] + (v.m_floats[0] - m_floats[0]) * t,
+ m_floats[1] + (v.m_floats[1] - m_floats[1]) * t,
+ m_floats[2] + (v.m_floats[2] -m_floats[2]) * t);
+ }
+
+ /**@brief Elementwise multiply this vector by the other
+ * @param v The other vector */
+ SIMD_FORCE_INLINE btVector3& operator*=(const btVector3& v)
+ {
+ m_floats[0] *= v.m_floats[0]; m_floats[1] *= v.m_floats[1];m_floats[2] *= v.m_floats[2];
+ return *this;
+ }
+
+ /**@brief Return the x value */
+ SIMD_FORCE_INLINE const btScalar& getX() const { return m_floats[0]; }
+ /**@brief Return the y value */
+ SIMD_FORCE_INLINE const btScalar& getY() const { return m_floats[1]; }
+ /**@brief Return the z value */
+ SIMD_FORCE_INLINE const btScalar& getZ() const { return m_floats[2]; }
+ /**@brief Set the x value */
+ SIMD_FORCE_INLINE void setX(btScalar x) { m_floats[0] = x;};
+ /**@brief Set the y value */
+ SIMD_FORCE_INLINE void setY(btScalar y) { m_floats[1] = y;};
+ /**@brief Set the z value */
+ SIMD_FORCE_INLINE void setZ(btScalar z) {m_floats[2] = z;};
+ /**@brief Set the w value */
+ SIMD_FORCE_INLINE void setW(btScalar w) { m_floats[3] = w;};
+ /**@brief Return the x value */
+ SIMD_FORCE_INLINE const btScalar& x() const { return m_floats[0]; }
+ /**@brief Return the y value */
+ SIMD_FORCE_INLINE const btScalar& y() const { return m_floats[1]; }
+ /**@brief Return the z value */
+ SIMD_FORCE_INLINE const btScalar& z() const { return m_floats[2]; }
+ /**@brief Return the w value */
+ SIMD_FORCE_INLINE const btScalar& w() const { return m_floats[3]; }
+
+ //SIMD_FORCE_INLINE btScalar& operator[](int i) { return (&m_floats[0])[i]; }
+ //SIMD_FORCE_INLINE const btScalar& operator[](int i) const { return (&m_floats[0])[i]; }
+ ///operator btScalar*() replaces operator[], using implicit conversion. We added operator != and operator == to avoid pointer comparisons.
+ SIMD_FORCE_INLINE operator btScalar *() { return &m_floats[0]; }
+ SIMD_FORCE_INLINE operator const btScalar *() const { return &m_floats[0]; }
+
+ SIMD_FORCE_INLINE bool operator==(const btVector3& other) const
+ {
+ return ((m_floats[3]==other.m_floats[3]) && (m_floats[2]==other.m_floats[2]) && (m_floats[1]==other.m_floats[1]) && (m_floats[0]==other.m_floats[0]));
+ }
+
+ SIMD_FORCE_INLINE bool operator!=(const btVector3& other) const
+ {
+ return !(*this == other);
+ }
+
+ /**@brief Set each element to the max of the current values and the values of another btVector3
+ * @param other The other btVector3 to compare with
+ */
+ SIMD_FORCE_INLINE void setMax(const btVector3& other)
+ {
+ btSetMax(m_floats[0], other.m_floats[0]);
+ btSetMax(m_floats[1], other.m_floats[1]);
+ btSetMax(m_floats[2], other.m_floats[2]);
+ btSetMax(m_floats[3], other.w());
+ }
+ /**@brief Set each element to the min of the current values and the values of another btVector3
+ * @param other The other btVector3 to compare with
+ */
+ SIMD_FORCE_INLINE void setMin(const btVector3& other)
+ {
+ btSetMin(m_floats[0], other.m_floats[0]);
+ btSetMin(m_floats[1], other.m_floats[1]);
+ btSetMin(m_floats[2], other.m_floats[2]);
+ btSetMin(m_floats[3], other.w());
+ }
+
+ SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z)
+ {
+ m_floats[0]=x;
+ m_floats[1]=y;
+ m_floats[2]=z;
+ m_floats[3] = btScalar(0.);
+ }
+
+ void getSkewSymmetricMatrix(btVector3* v0,btVector3* v1,btVector3* v2) const
+ {
+ v0->setValue(0. ,-z() ,y());
+ v1->setValue(z() ,0. ,-x());
+ v2->setValue(-y() ,x() ,0.);
+ }
+
+ void setZero()
+ {
+ setValue(btScalar(0.),btScalar(0.),btScalar(0.));
+ }
+
+ SIMD_FORCE_INLINE bool isZero() const
+ {
+ return m_floats[0] == btScalar(0) && m_floats[1] == btScalar(0) && m_floats[2] == btScalar(0);
+ }
+
+ SIMD_FORCE_INLINE bool fuzzyZero() const
+ {
+ return length2() < SIMD_EPSILON;
+ }
+
+ SIMD_FORCE_INLINE void serialize(struct btVector3Data& dataOut) const;
+
+ SIMD_FORCE_INLINE void deSerialize(const struct btVector3Data& dataIn);
+
+ SIMD_FORCE_INLINE void serializeFloat(struct btVector3FloatData& dataOut) const;
+
+ SIMD_FORCE_INLINE void deSerializeFloat(const struct btVector3FloatData& dataIn);
+
+ SIMD_FORCE_INLINE void serializeDouble(struct btVector3DoubleData& dataOut) const;
+
+ SIMD_FORCE_INLINE void deSerializeDouble(const struct btVector3DoubleData& dataIn);
+
+};
+
+/**@brief Return the sum of two vectors (Point symantics)*/
+SIMD_FORCE_INLINE btVector3
+operator+(const btVector3& v1, const btVector3& v2)
+{
+ return btVector3(v1.m_floats[0] + v2.m_floats[0], v1.m_floats[1] + v2.m_floats[1], v1.m_floats[2] + v2.m_floats[2]);
+}
+
+/**@brief Return the elementwise product of two vectors */
+SIMD_FORCE_INLINE btVector3
+operator*(const btVector3& v1, const btVector3& v2)
+{
+ return btVector3(v1.m_floats[0] * v2.m_floats[0], v1.m_floats[1] * v2.m_floats[1], v1.m_floats[2] * v2.m_floats[2]);
+}
+
+/**@brief Return the difference between two vectors */
+SIMD_FORCE_INLINE btVector3
+operator-(const btVector3& v1, const btVector3& v2)
+{
+ return btVector3(v1.m_floats[0] - v2.m_floats[0], v1.m_floats[1] - v2.m_floats[1], v1.m_floats[2] - v2.m_floats[2]);
+}
+/**@brief Return the negative of the vector */
+SIMD_FORCE_INLINE btVector3
+operator-(const btVector3& v)
+{
+ return btVector3(-v.m_floats[0], -v.m_floats[1], -v.m_floats[2]);
+}
+
+/**@brief Return the vector scaled by s */
+SIMD_FORCE_INLINE btVector3
+operator*(const btVector3& v, const btScalar& s)
+{
+ return btVector3(v.m_floats[0] * s, v.m_floats[1] * s, v.m_floats[2] * s);
+}
+
+/**@brief Return the vector scaled by s */
+SIMD_FORCE_INLINE btVector3
+operator*(const btScalar& s, const btVector3& v)
+{
+ return v * s;
+}
+
+/**@brief Return the vector inversely scaled by s */
+SIMD_FORCE_INLINE btVector3
+operator/(const btVector3& v, const btScalar& s)
+{
+ btFullAssert(s != btScalar(0.0));
+ return v * (btScalar(1.0) / s);
+}
+
+/**@brief Return the vector inversely scaled by s */
+SIMD_FORCE_INLINE btVector3
+operator/(const btVector3& v1, const btVector3& v2)
+{
+ return btVector3(v1.m_floats[0] / v2.m_floats[0],v1.m_floats[1] / v2.m_floats[1],v1.m_floats[2] / v2.m_floats[2]);
+}
+
+/**@brief Return the dot product between two vectors */
+SIMD_FORCE_INLINE btScalar
+btDot(const btVector3& v1, const btVector3& v2)
+{
+ return v1.dot(v2);
+}
+
+
+/**@brief Return the distance squared between two vectors */
+SIMD_FORCE_INLINE btScalar
+btDistance2(const btVector3& v1, const btVector3& v2)
+{
+ return v1.distance2(v2);
+}
+
+
+/**@brief Return the distance between two vectors */
+SIMD_FORCE_INLINE btScalar
+btDistance(const btVector3& v1, const btVector3& v2)
+{
+ return v1.distance(v2);
+}
+
+/**@brief Return the angle between two vectors */
+SIMD_FORCE_INLINE btScalar
+btAngle(const btVector3& v1, const btVector3& v2)
+{
+ return v1.angle(v2);
+}
+
+/**@brief Return the cross product of two vectors */
+SIMD_FORCE_INLINE btVector3
+btCross(const btVector3& v1, const btVector3& v2)
+{
+ return v1.cross(v2);
+}
+
+SIMD_FORCE_INLINE btScalar
+btTriple(const btVector3& v1, const btVector3& v2, const btVector3& v3)
+{
+ return v1.triple(v2, v3);
+}
+
+/**@brief Return the linear interpolation between two vectors
+ * @param v1 One vector
+ * @param v2 The other vector
+ * @param t The ration of this to v (t = 0 => return v1, t=1 => return v2) */
+SIMD_FORCE_INLINE btVector3
+lerp(const btVector3& v1, const btVector3& v2, const btScalar& t)
+{
+ return v1.lerp(v2, t);
+}
+
+
+
+SIMD_FORCE_INLINE btScalar btVector3::distance2(const btVector3& v) const
+{
+ return (v - *this).length2();
+}
+
+SIMD_FORCE_INLINE btScalar btVector3::distance(const btVector3& v) const
+{
+ return (v - *this).length();
+}
+
+SIMD_FORCE_INLINE btVector3 btVector3::normalized() const
+{
+ return *this / length();
+}
+
+SIMD_FORCE_INLINE btVector3 btVector3::rotate( const btVector3& wAxis, const btScalar angle ) const
+{
+ // wAxis must be a unit lenght vector
+
+ btVector3 o = wAxis * wAxis.dot( *this );
+ btVector3 x = *this - o;
+ btVector3 y;
+
+ y = wAxis.cross( *this );
+
+ return ( o + x * btCos( angle ) + y * btSin( angle ) );
+}
+
+class btVector4 : public btVector3
+{
+public:
+
+ SIMD_FORCE_INLINE btVector4() {}
+
+
+ SIMD_FORCE_INLINE btVector4(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
+ : btVector3(x,y,z)
+ {
+ m_floats[3] = w;
+ }
+
+
+ SIMD_FORCE_INLINE btVector4 absolute4() const
+ {
+ return btVector4(
+ btFabs(m_floats[0]),
+ btFabs(m_floats[1]),
+ btFabs(m_floats[2]),
+ btFabs(m_floats[3]));
+ }
+
+
+
+ btScalar getW() const { return m_floats[3];}
+
+
+ SIMD_FORCE_INLINE int maxAxis4() const
+ {
+ int maxIndex = -1;
+ btScalar maxVal = btScalar(-BT_LARGE_FLOAT);
+ if (m_floats[0] > maxVal)
+ {
+ maxIndex = 0;
+ maxVal = m_floats[0];
+ }
+ if (m_floats[1] > maxVal)
+ {
+ maxIndex = 1;
+ maxVal = m_floats[1];
+ }
+ if (m_floats[2] > maxVal)
+ {
+ maxIndex = 2;
+ maxVal =m_floats[2];
+ }
+ if (m_floats[3] > maxVal)
+ {
+ maxIndex = 3;
+ maxVal = m_floats[3];
+ }
+
+
+
+
+ return maxIndex;
+
+ }
+
+
+ SIMD_FORCE_INLINE int minAxis4() const
+ {
+ int minIndex = -1;
+ btScalar minVal = btScalar(BT_LARGE_FLOAT);
+ if (m_floats[0] < minVal)
+ {
+ minIndex = 0;
+ minVal = m_floats[0];
+ }
+ if (m_floats[1] < minVal)
+ {
+ minIndex = 1;
+ minVal = m_floats[1];
+ }
+ if (m_floats[2] < minVal)
+ {
+ minIndex = 2;
+ minVal =m_floats[2];
+ }
+ if (m_floats[3] < minVal)
+ {
+ minIndex = 3;
+ minVal = m_floats[3];
+ }
+
+ return minIndex;
+
+ }
+
+
+ SIMD_FORCE_INLINE int closestAxis4() const
+ {
+ return absolute4().maxAxis4();
+ }
+
+
+
+
+ /**@brief Set x,y,z and zero w
+ * @param x Value of x
+ * @param y Value of y
+ * @param z Value of z
+ */
+
+
+/* void getValue(btScalar *m) const
+ {
+ m[0] = m_floats[0];
+ m[1] = m_floats[1];
+ m[2] =m_floats[2];
+ }
+*/
+/**@brief Set the values
+ * @param x Value of x
+ * @param y Value of y
+ * @param z Value of z
+ * @param w Value of w
+ */
+ SIMD_FORCE_INLINE void setValue(const btScalar& x, const btScalar& y, const btScalar& z,const btScalar& w)
+ {
+ m_floats[0]=x;
+ m_floats[1]=y;
+ m_floats[2]=z;
+ m_floats[3]=w;
+ }
+
+
+};
+
+
+///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
+SIMD_FORCE_INLINE void btSwapScalarEndian(const btScalar& sourceVal, btScalar& destVal)
+{
+ #ifdef BT_USE_DOUBLE_PRECISION
+ unsigned char* dest = (unsigned char*) &destVal;
+ unsigned char* src = (unsigned char*) &sourceVal;
+ dest[0] = src[7];
+ dest[1] = src[6];
+ dest[2] = src[5];
+ dest[3] = src[4];
+ dest[4] = src[3];
+ dest[5] = src[2];
+ dest[6] = src[1];
+ dest[7] = src[0];
+#else
+ unsigned char* dest = (unsigned char*) &destVal;
+ unsigned char* src = (unsigned char*) &sourceVal;
+ dest[0] = src[3];
+ dest[1] = src[2];
+ dest[2] = src[1];
+ dest[3] = src[0];
+#endif //BT_USE_DOUBLE_PRECISION
+}
+///btSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
+SIMD_FORCE_INLINE void btSwapVector3Endian(const btVector3& sourceVec, btVector3& destVec)
+{
+ for (int i=0;i<4;i++)
+ {
+ btSwapScalarEndian(sourceVec[i],destVec[i]);
+ }
+
+}
+
+///btUnSwapVector3Endian swaps vector endianness, useful for network and cross-platform serialization
+SIMD_FORCE_INLINE void btUnSwapVector3Endian(btVector3& vector)
+{
+
+ btVector3 swappedVec;
+ for (int i=0;i<4;i++)
+ {
+ btSwapScalarEndian(vector[i],swappedVec[i]);
+ }
+ vector = swappedVec;
+}
+
+template <class T>
+SIMD_FORCE_INLINE void btPlaneSpace1 (const T& n, T& p, T& q)
+{
+ if (btFabs(n[2]) > SIMDSQRT12) {
+ // choose p in y-z plane
+ btScalar a = n[1]*n[1] + n[2]*n[2];
+ btScalar k = btRecipSqrt (a);
+ p[0] = 0;
+ p[1] = -n[2]*k;
+ p[2] = n[1]*k;
+ // set q = n x p
+ q[0] = a*k;
+ q[1] = -n[0]*p[2];
+ q[2] = n[0]*p[1];
+ }
+ else {
+ // choose p in x-y plane
+ btScalar a = n[0]*n[0] + n[1]*n[1];
+ btScalar k = btRecipSqrt (a);
+ p[0] = -n[1]*k;
+ p[1] = n[0]*k;
+ p[2] = 0;
+ // set q = n x p
+ q[0] = -n[2]*p[1];
+ q[1] = n[2]*p[0];
+ q[2] = a*k;
+ }
+}
+
+
+struct btVector3FloatData
+{
+ float m_floats[4];
+};
+
+struct btVector3DoubleData
+{
+ double m_floats[4];
+
+};
+
+SIMD_FORCE_INLINE void btVector3::serializeFloat(struct btVector3FloatData& dataOut) const
+{
+ ///could also do a memcpy, check if it is worth it
+ for (int i=0;i<4;i++)
+ dataOut.m_floats[i] = float(m_floats[i]);
+}
+
+SIMD_FORCE_INLINE void btVector3::deSerializeFloat(const struct btVector3FloatData& dataIn)
+{
+ for (int i=0;i<4;i++)
+ m_floats[i] = btScalar(dataIn.m_floats[i]);
+}
+
+
+SIMD_FORCE_INLINE void btVector3::serializeDouble(struct btVector3DoubleData& dataOut) const
+{
+ ///could also do a memcpy, check if it is worth it
+ for (int i=0;i<4;i++)
+ dataOut.m_floats[i] = double(m_floats[i]);
+}
+
+SIMD_FORCE_INLINE void btVector3::deSerializeDouble(const struct btVector3DoubleData& dataIn)
+{
+ for (int i=0;i<4;i++)
+ m_floats[i] = btScalar(dataIn.m_floats[i]);
+}
+
+
+SIMD_FORCE_INLINE void btVector3::serialize(struct btVector3Data& dataOut) const
+{
+ ///could also do a memcpy, check if it is worth it
+ for (int i=0;i<4;i++)
+ dataOut.m_floats[i] = m_floats[i];
+}
+
+SIMD_FORCE_INLINE void btVector3::deSerialize(const struct btVector3Data& dataIn)
+{
+ for (int i=0;i<4;i++)
+ m_floats[i] = dataIn.m_floats[i];
+}
+
+
+#endif //BT_VECTOR3_H
diff --git a/tests/bullet/src/LinearMath/ibmsdk/Makefile b/tests/bullet/src/LinearMath/ibmsdk/Makefile
new file mode 100644
index 00000000..04148730
--- /dev/null
+++ b/tests/bullet/src/LinearMath/ibmsdk/Makefile
@@ -0,0 +1,39 @@
+#### Source code Dirs
+VPATH = ../
+
+ROOT = ../../..
+
+#### Library
+LIBRARY_ppu = bulletmath.a
+
+#### Compiler flags
+CPPFLAGS = \
+-DUSE_LIBSPE2 \
+-I$(ROOT)/src \
+-I$(SDKINC)
+
+#### Optimization level flags
+#CC_OPT_LEVEL = $(CC_OPT_LEVEL_DEBUG)
+CC_OPT_LEVEL = -O3
+
+##### Objects to be archived in lib
+
+OBJS = \
+btAlignedAllocator.o \
+btGeometryUtil.o \
+btQuickprof.o
+
+#### Install directories
+INSTALL_DIR = $(ROOT)/lib/ibmsdk
+INSTALL_FILES = $(LIBRARY_ppu)
+
+IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
+
+ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
+ CELL_TOP ?= /opt/cell/sdk
+ include $(CELL_TOP)/buildutils/make.footer
+else
+ CELL_TOP ?= /opt/ibm/cell-sdk/prototype
+ include $(CELL_TOP)/make.footer
+endif
+
diff --git a/tests/bullet/src/Makefile.am b/tests/bullet/src/Makefile.am
new file mode 100644
index 00000000..af50d184
--- /dev/null
+++ b/tests/bullet/src/Makefile.am
@@ -0,0 +1,557 @@
+bullet_includedir = $(includedir)/bullet
+nobase_bullet_include_HEADERS = \
+ btBulletDynamicsCommon.h \
+ Bullet-C-Api.h \
+ btBulletCollisionCommon.h
+
+if CONDITIONAL_BUILD_MULTITHREADED
+nobase_bullet_include_HEADERS += \
+ BulletMultiThreaded/PosixThreadSupport.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/mat_aos.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/vec_aos.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/quat_aos.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/vectormath_aos.h \
+ BulletMultiThreaded/PpuAddressSpace.h \
+ BulletMultiThreaded/SpuCollisionTaskProcess.h \
+ BulletMultiThreaded/PlatformDefinitions.h \
+ BulletMultiThreaded/vectormath2bullet.h \
+ BulletMultiThreaded/SpuGatheringCollisionDispatcher.h \
+ BulletMultiThreaded/SpuCollisionObjectWrapper.h \
+ BulletMultiThreaded/SpuSampleTaskProcess.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h \
+ BulletMultiThreaded/SpuSync.h \
+ BulletMultiThreaded/btThreadSupportInterface.h \
+ BulletMultiThreaded/SpuLibspe2Support.h \
+ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h \
+ BulletMultiThreaded/SpuFakeDma.h \
+ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h \
+ BulletMultiThreaded/SpuDoubleBuffer.h \
+ BulletMultiThreaded/Win32ThreadSupport.h \
+ BulletMultiThreaded/SequentialThreadSupport.h
+
+lib_LTLIBRARIES = libLinearMath.la libBulletCollision.la libBulletDynamics.la libBulletSoftBody.la libBulletMultiThreaded.la
+
+libBulletMultiThreaded_la_CXXFLAGS = ${CXXFLAGS} -I./BulletMultiThreaded/vectormath/scalar/cpp
+libBulletMultiThreaded_la_SOURCES =\
+ BulletMultiThreaded/SpuCollisionObjectWrapper.cpp \
+ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp \
+ BulletMultiThreaded/SpuLibspe2Support.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp \
+ BulletMultiThreaded/btThreadSupportInterface.cpp \
+ BulletMultiThreaded/SequentialThreadSupport.cpp \
+ BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp \
+ BulletMultiThreaded/Win32ThreadSupport.cpp \
+ BulletMultiThreaded/SpuFakeDma.cpp \
+ BulletMultiThreaded/PosixThreadSupport.cpp \
+ BulletMultiThreaded/SpuCollisionTaskProcess.cpp \
+ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp \
+ BulletMultiThreaded/SpuSampleTaskProcess.cpp \
+ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h \
+ BulletMultiThreaded/PpuAddressSpace.h \
+ BulletMultiThreaded/SpuSampleTaskProcess.h \
+ BulletMultiThreaded/SequentialThreadSupport.h \
+ BulletMultiThreaded/PlatformDefinitions.h \
+ BulletMultiThreaded/Win32ThreadSupport.h \
+ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h \
+ BulletMultiThreaded/btThreadSupportInterface.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h \
+ BulletMultiThreaded/SpuGatheringCollisionDispatcher.h \
+ BulletMultiThreaded/SpuFakeDma.h \
+ BulletMultiThreaded/SpuSync.h \
+ BulletMultiThreaded/SpuCollisionObjectWrapper.h \
+ BulletMultiThreaded/SpuDoubleBuffer.h \
+ BulletMultiThreaded/SpuCollisionTaskProcess.h \
+ BulletMultiThreaded/PosixThreadSupport.h \
+ BulletMultiThreaded/SpuLibspe2Support.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h
+
+else
+lib_LTLIBRARIES = libLinearMath.la libBulletCollision.la libBulletDynamics.la libBulletSoftBody.la
+endif
+
+
+libLinearMath_la_SOURCES = \
+ LinearMath/btQuickprof.cpp \
+ LinearMath/btGeometryUtil.cpp \
+ LinearMath/btAlignedAllocator.cpp \
+ LinearMath/btSerializer.cpp \
+ LinearMath/btConvexHull.cpp \
+ LinearMath/btConvexHullComputer.cpp \
+ LinearMath/btHashMap.h \
+ LinearMath/btConvexHull.h \
+ LinearMath/btAabbUtil2.h \
+ LinearMath/btGeometryUtil.h \
+ LinearMath/btQuadWord.h \
+ LinearMath/btPoolAllocator.h \
+ LinearMath/btScalar.h \
+ LinearMath/btMinMax.h \
+ LinearMath/btVector3.h \
+ LinearMath/btList.h \
+ LinearMath/btStackAlloc.h \
+ LinearMath/btMatrix3x3.h \
+ LinearMath/btMotionState.h \
+ LinearMath/btAlignedAllocator.h \
+ LinearMath/btQuaternion.h \
+ LinearMath/btAlignedObjectArray.h \
+ LinearMath/btQuickprof.h \
+ LinearMath/btSerializer.h \
+ LinearMath/btTransformUtil.h \
+ LinearMath/btTransform.h \
+ LinearMath/btDefaultMotionState.h \
+ LinearMath/btIDebugDraw.h \
+ LinearMath/btRandom.h
+
+
+libBulletCollision_la_SOURCES = \
+ BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp \
+ BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp \
+ BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp \
+ BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp \
+ BulletCollision/NarrowPhaseCollision/btConvexCast.cpp \
+ BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp \
+ BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp \
+ BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp \
+ BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btCollisionObject.cpp \
+ BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btGhostObject.cpp \
+ BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp \
+ BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp \
+ BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp \
+ BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp \
+ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp \
+ BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp \
+ BulletCollision/CollisionDispatch/btManifoldResult.cpp \
+ BulletCollision/CollisionDispatch/btCollisionWorld.cpp \
+ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btUnionFind.cpp \
+ BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp \
+ BulletCollision/CollisionShapes/btTetrahedronShape.cpp \
+ BulletCollision/CollisionShapes/btShapeHull.cpp \
+ BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp \
+ BulletCollision/CollisionShapes/btCompoundShape.cpp \
+ BulletCollision/CollisionShapes/btConeShape.cpp \
+ BulletCollision/CollisionShapes/btConvexPolyhedron.cpp \
+ BulletCollision/CollisionShapes/btMultiSphereShape.cpp \
+ BulletCollision/CollisionShapes/btUniformScalingShape.cpp \
+ BulletCollision/CollisionShapes/btSphereShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp \
+ BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleBuffer.cpp \
+ BulletCollision/CollisionShapes/btStaticPlaneShape.cpp \
+ BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp \
+ BulletCollision/CollisionShapes/btEmptyShape.cpp \
+ BulletCollision/CollisionShapes/btCollisionShape.cpp \
+ BulletCollision/CollisionShapes/btConvexShape.cpp \
+ BulletCollision/CollisionShapes/btConvex2dShape.cpp \
+ BulletCollision/CollisionShapes/btConvexInternalShape.cpp \
+ BulletCollision/CollisionShapes/btConvexHullShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleCallback.cpp \
+ BulletCollision/CollisionShapes/btCapsuleShape.cpp \
+ BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btConcaveShape.cpp \
+ BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp \
+ BulletCollision/CollisionShapes/btBoxShape.cpp \
+ BulletCollision/CollisionShapes/btBox2dShape.cpp \
+ BulletCollision/CollisionShapes/btOptimizedBvh.cpp \
+ BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp \
+ BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btCylinderShape.cpp \
+ BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btStridingMeshInterface.cpp \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp \
+ BulletCollision/CollisionShapes/btTriangleMesh.cpp \
+ BulletCollision/BroadphaseCollision/btAxisSweep3.cpp \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp \
+ BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp \
+ BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp \
+ BulletCollision/BroadphaseCollision/btDispatcher.cpp \
+ BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp \
+ BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp \
+ BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp \
+ BulletCollision/BroadphaseCollision/btDbvt.cpp \
+ BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h \
+ BulletCollision/NarrowPhaseCollision/btConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpa2.h \
+ BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h \
+ BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btPointCollector.h \
+ BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h \
+ BulletCollision/NarrowPhaseCollision/btRaycastCallback.h \
+ BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h \
+ BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btPersistentManifold.h \
+ BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \
+ BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h \
+ BulletCollision/CollisionDispatch/btCollisionObject.h \
+ BulletCollision/CollisionDispatch/btGhostObject.h \
+ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionCreateFunc.h \
+ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxDetector.h \
+ BulletCollision/CollisionDispatch/btCollisionDispatcher.h \
+ BulletCollision/CollisionDispatch/SphereTriangleDetector.h \
+ BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btUnionFind.h \
+ BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btSimulationIslandManager.h \
+ BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCollisionWorld.h \
+ BulletCollision/CollisionDispatch/btInternalEdgeUtility.h \
+ BulletCollision/CollisionDispatch/btManifoldResult.h \
+ BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionConfiguration.h \
+ BulletCollision/CollisionShapes/btConvexShape.h \
+ BulletCollision/CollisionShapes/btConvex2dShape.h \
+ BulletCollision/CollisionShapes/btTriangleCallback.h \
+ BulletCollision/CollisionShapes/btPolyhedralConvexShape.h \
+ BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btCompoundShape.h \
+ BulletCollision/CollisionShapes/btBoxShape.h \
+ BulletCollision/CollisionShapes/btBox2dShape.h \
+ BulletCollision/CollisionShapes/btMultiSphereShape.h \
+ BulletCollision/CollisionShapes/btCollisionMargin.h \
+ BulletCollision/CollisionShapes/btConcaveShape.h \
+ BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btEmptyShape.h \
+ BulletCollision/CollisionShapes/btUniformScalingShape.h \
+ BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btMaterial.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h \
+ BulletCollision/CollisionShapes/btTriangleInfoMap.h \
+ BulletCollision/CollisionShapes/btSphereShape.h \
+ BulletCollision/CollisionShapes/btConvexPointCloudShape.h \
+ BulletCollision/CollisionShapes/btCapsuleShape.h \
+ BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h \
+ BulletCollision/CollisionShapes/btCollisionShape.h \
+ BulletCollision/CollisionShapes/btStaticPlaneShape.h \
+ BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btStridingMeshInterface.h \
+ BulletCollision/CollisionShapes/btTriangleMesh.h \
+ BulletCollision/CollisionShapes/btTriangleBuffer.h \
+ BulletCollision/CollisionShapes/btShapeHull.h \
+ BulletCollision/CollisionShapes/btMinkowskiSumShape.h \
+ BulletCollision/CollisionShapes/btOptimizedBvh.h \
+ BulletCollision/CollisionShapes/btTriangleShape.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h \
+ BulletCollision/CollisionShapes/btCylinderShape.h \
+ BulletCollision/CollisionShapes/btTetrahedronShape.h \
+ BulletCollision/CollisionShapes/btConvexInternalShape.h \
+ BulletCollision/CollisionShapes/btConeShape.h \
+ BulletCollision/CollisionShapes/btConvexHullShape.h \
+ BulletCollision/BroadphaseCollision/btAxisSweep3.h \
+ BulletCollision/BroadphaseCollision/btDbvtBroadphase.h \
+ BulletCollision/BroadphaseCollision/btSimpleBroadphase.h \
+ BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h \
+ BulletCollision/BroadphaseCollision/btDbvt.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h \
+ BulletCollision/BroadphaseCollision/btDispatcher.h \
+ BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseProxy.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCache.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseInterface.h \
+ BulletCollision/BroadphaseCollision/btQuantizedBvh.h \
+ BulletCollision/Gimpact/btGImpactBvh.cpp\
+ BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp\
+ BulletCollision/Gimpact/btTriangleShapeEx.cpp\
+ BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp\
+ BulletCollision/Gimpact/btGImpactShape.cpp\
+ BulletCollision/Gimpact/gim_box_set.cpp\
+ BulletCollision/Gimpact/gim_contact.cpp\
+ BulletCollision/Gimpact/gim_memory.cpp\
+ BulletCollision/Gimpact/gim_tri_collision.cpp
+
+libBulletDynamics_la_SOURCES = \
+ BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp \
+ BulletDynamics/Dynamics/btRigidBody.cpp \
+ BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp \
+ BulletDynamics/Dynamics/Bullet-C-API.cpp \
+ BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp \
+ BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btTypedConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btContactConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btSliderConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btHingeConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp \
+ BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp \
+ BulletDynamics/Vehicle/btWheelInfo.cpp \
+ BulletDynamics/Vehicle/btRaycastVehicle.cpp \
+ BulletDynamics/Character/btKinematicCharacterController.cpp \
+ BulletDynamics/Character/btKinematicCharacterController.h \
+ BulletDynamics/Character/btCharacterControllerInterface.h \
+ BulletDynamics/Dynamics/btActionInterface.h \
+ BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
+ BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
+ BulletDynamics/Dynamics/btRigidBody.h \
+ BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
+ BulletDynamics/Dynamics/btDynamicsWorld.h \
+ BulletDynamics/ConstraintSolver/btSolverBody.h \
+ BulletDynamics/ConstraintSolver/btConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btConeTwistConstraint.h \
+ BulletDynamics/ConstraintSolver/btTypedConstraint.h \
+ BulletDynamics/ConstraintSolver/btContactSolverInfo.h \
+ BulletDynamics/ConstraintSolver/btContactConstraint.h \
+ BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h \
+ BulletDynamics/ConstraintSolver/btJacobianEntry.h \
+ BulletDynamics/ConstraintSolver/btSolverConstraint.h \
+ BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h \
+ BulletDynamics/ConstraintSolver/btSliderConstraint.h \
+ BulletDynamics/ConstraintSolver/btHingeConstraint.h \
+ BulletDynamics/ConstraintSolver/btHinge2Constraint.h \
+ BulletDynamics/ConstraintSolver/btUniversalConstraint.h \
+ BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h \
+ BulletDynamics/Vehicle/btVehicleRaycaster.h \
+ BulletDynamics/Vehicle/btRaycastVehicle.h \
+ BulletDynamics/Vehicle/btWheelInfo.h
+
+libBulletSoftBody_la_SOURCES = \
+ BulletSoftBody/btDefaultSoftBodySolver.cpp \
+ BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp \
+ BulletSoftBody/btSoftBody.cpp \
+ BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp \
+ BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp \
+ BulletSoftBody/btSoftRigidDynamicsWorld.cpp \
+ BulletSoftBody/btSoftBodyHelpers.cpp \
+ BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp \
+ BulletSoftBody/btSparseSDF.h \
+ BulletSoftBody/btSoftRigidCollisionAlgorithm.h \
+ BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h \
+ BulletSoftBody/btSoftBody.h \
+ BulletSoftBody/btSoftSoftCollisionAlgorithm.h \
+ BulletSoftBody/btSoftBodyInternals.h \
+ BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h \
+ BulletSoftBody/btSoftRigidDynamicsWorld.h \
+ BulletSoftBody/btSoftBodyHelpers.h
+
+
+
+nobase_bullet_include_HEADERS += \
+ BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h \
+ BulletSoftBody/btSoftBodyInternals.h \
+ BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h \
+ BulletSoftBody/btSoftSoftCollisionAlgorithm.h \
+ BulletSoftBody/btSoftBody.h \
+ BulletSoftBody/btSoftBodyHelpers.h \
+ BulletSoftBody/btSparseSDF.h \
+ BulletSoftBody/btSoftRigidCollisionAlgorithm.h \
+ BulletSoftBody/btSoftRigidDynamicsWorld.h \
+ BulletDynamics/Vehicle/btRaycastVehicle.h \
+ BulletDynamics/Vehicle/btWheelInfo.h \
+ BulletDynamics/Vehicle/btVehicleRaycaster.h \
+ BulletDynamics/Dynamics/btActionInterface.h \
+ BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
+ BulletDynamics/Dynamics/btRigidBody.h \
+ BulletDynamics/Dynamics/btDynamicsWorld.h \
+ BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
+ BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
+ BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btSolverConstraint.h \
+ BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h \
+ BulletDynamics/ConstraintSolver/btTypedConstraint.h \
+ BulletDynamics/ConstraintSolver/btSliderConstraint.h \
+ BulletDynamics/ConstraintSolver/btConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btContactConstraint.h \
+ BulletDynamics/ConstraintSolver/btContactSolverInfo.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h \
+ BulletDynamics/ConstraintSolver/btJacobianEntry.h \
+ BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h \
+ BulletDynamics/ConstraintSolver/btConeTwistConstraint.h \
+ BulletDynamics/ConstraintSolver/btHingeConstraint.h \
+ BulletDynamics/ConstraintSolver/btHinge2Constraint.h \
+ BulletDynamics/ConstraintSolver/btUniversalConstraint.h \
+ BulletDynamics/ConstraintSolver/btSolverBody.h \
+ BulletDynamics/Character/btCharacterControllerInterface.h \
+ BulletDynamics/Character/btKinematicCharacterController.h \
+ BulletCollision/CollisionShapes/btShapeHull.h \
+ BulletCollision/CollisionShapes/btConcaveShape.h \
+ BulletCollision/CollisionShapes/btCollisionMargin.h \
+ BulletCollision/CollisionShapes/btCompoundShape.h \
+ BulletCollision/CollisionShapes/btConvexHullShape.h \
+ BulletCollision/CollisionShapes/btCylinderShape.h \
+ BulletCollision/CollisionShapes/btTriangleMesh.h \
+ BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h \
+ BulletCollision/CollisionShapes/btUniformScalingShape.h \
+ BulletCollision/CollisionShapes/btConvexPointCloudShape.h \
+ BulletCollision/CollisionShapes/btTetrahedronShape.h \
+ BulletCollision/CollisionShapes/btCapsuleShape.h \
+ BulletCollision/CollisionShapes/btSphereShape.h \
+ BulletCollision/CollisionShapes/btMultiSphereShape.h \
+ BulletCollision/CollisionShapes/btConvexInternalShape.h \
+ BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btStridingMeshInterface.h \
+ BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btEmptyShape.h \
+ BulletCollision/CollisionShapes/btOptimizedBvh.h \
+ BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btTriangleCallback.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h \
+ BulletCollision/CollisionShapes/btTriangleInfoMap.h \
+ BulletCollision/CollisionShapes/btTriangleBuffer.h \
+ BulletCollision/CollisionShapes/btConvexShape.h \
+ BulletCollision/CollisionShapes/btConvex2dShape.h \
+ BulletCollision/CollisionShapes/btStaticPlaneShape.h \
+ BulletCollision/CollisionShapes/btConeShape.h \
+ BulletCollision/CollisionShapes/btCollisionShape.h \
+ BulletCollision/CollisionShapes/btTriangleShape.h \
+ BulletCollision/CollisionShapes/btBoxShape.h \
+ BulletCollision/CollisionShapes/btBox2dShape.h \
+ BulletCollision/CollisionShapes/btMinkowskiSumShape.h \
+ BulletCollision/CollisionShapes/btTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btMaterial.h \
+ BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btPolyhedralConvexShape.h \
+ BulletCollision/NarrowPhaseCollision/btConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpa2.h \
+ BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h \
+ BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h \
+ BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h \
+ BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h \
+ BulletCollision/NarrowPhaseCollision/btPersistentManifold.h \
+ BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \
+ BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btRaycastCallback.h \
+ BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btPointCollector.h \
+ BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h \
+ BulletCollision/BroadphaseCollision/btDbvt.h \
+ BulletCollision/BroadphaseCollision/btDispatcher.h \
+ BulletCollision/BroadphaseCollision/btDbvtBroadphase.h \
+ BulletCollision/BroadphaseCollision/btSimpleBroadphase.h \
+ BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h \
+ BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h \
+ BulletCollision/BroadphaseCollision/btQuantizedBvh.h \
+ BulletCollision/BroadphaseCollision/btAxisSweep3.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseInterface.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCache.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseProxy.h \
+ BulletCollision/CollisionDispatch/btUnionFind.h \
+ BulletCollision/CollisionDispatch/btCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCollisionDispatcher.h \
+ BulletCollision/CollisionDispatch/SphereTriangleDetector.h \
+ BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionWorld.h \
+ BulletCollision/CollisionDispatch/btCollisionCreateFunc.h \
+ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionObject.h \
+ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btGhostObject.h \
+ BulletCollision/CollisionDispatch/btSimulationIslandManager.h \
+ BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxDetector.h \
+ BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btInternalEdgeUtility.h \
+ BulletCollision/CollisionDispatch/btManifoldResult.h \
+ BulletCollision/Gimpact/gim_memory.h \
+ BulletCollision/Gimpact/gim_clip_polygon.h \
+ BulletCollision/Gimpact/gim_bitset.h \
+ BulletCollision/Gimpact/gim_linear_math.h \
+ BulletCollision/Gimpact/btGeometryOperations.h \
+ BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h \
+ BulletCollision/Gimpact/btGImpactBvh.h \
+ BulletCollision/Gimpact/gim_box_set.h \
+ BulletCollision/Gimpact/gim_array.h \
+ BulletCollision/Gimpact/btGImpactShape.h \
+ BulletCollision/Gimpact/btTriangleShapeEx.h \
+ BulletCollision/Gimpact/btClipPolygon.h \
+ BulletCollision/Gimpact/gim_box_collision.h \
+ BulletCollision/Gimpact/gim_tri_collision.h \
+ BulletCollision/Gimpact/gim_geometry.h \
+ BulletCollision/Gimpact/gim_math.h \
+ BulletCollision/Gimpact/btQuantization.h \
+ BulletCollision/Gimpact/btGImpactQuantizedBvh.h \
+ BulletCollision/Gimpact/gim_geom_types.h \
+ BulletCollision/Gimpact/gim_basic_geometry_operations.h \
+ BulletCollision/Gimpact/gim_contact.h \
+ BulletCollision/Gimpact/gim_hash_table.h \
+ BulletCollision/Gimpact/gim_radixsort.h \
+ BulletCollision/Gimpact/btGImpactMassUtil.h \
+ BulletCollision/Gimpact/btGenericPoolAllocator.h \
+ BulletCollision/Gimpact/btBoxCollision.h \
+ BulletCollision/Gimpact/btContactProcessing.h \
+ LinearMath/btGeometryUtil.h \
+ LinearMath/btConvexHull.h \
+ LinearMath/btList.h \
+ LinearMath/btMatrix3x3.h \
+ LinearMath/btVector3.h \
+ LinearMath/btPoolAllocator.h \
+ LinearMath/btScalar.h \
+ LinearMath/btDefaultMotionState.h \
+ LinearMath/btTransform.h \
+ LinearMath/btQuadWord.h \
+ LinearMath/btAabbUtil2.h \
+ LinearMath/btTransformUtil.h \
+ LinearMath/btRandom.h \
+ LinearMath/btQuaternion.h \
+ LinearMath/btMinMax.h \
+ LinearMath/btMotionState.h \
+ LinearMath/btIDebugDraw.h \
+ LinearMath/btAlignedAllocator.h \
+ LinearMath/btStackAlloc.h \
+ LinearMath/btAlignedObjectArray.h \
+ LinearMath/btHashMap.h \
+ LinearMath/btQuickprof.h\
+ LinearMath/btSerializer.h
diff --git a/tests/bullet/src/Makefile.in b/tests/bullet/src/Makefile.in
new file mode 100644
index 00000000..b047f86b
--- /dev/null
+++ b/tests/bullet/src/Makefile.in
@@ -0,0 +1,2527 @@
+# Makefile.in generated by automake 1.10 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@am__append_1 = \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/PosixThreadSupport.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/vectormath/scalar/cpp/mat_aos.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/vectormath/scalar/cpp/vec_aos.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/vectormath/scalar/cpp/quat_aos.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/vectormath/scalar/cpp/vectormath_aos.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/PpuAddressSpace.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuCollisionTaskProcess.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/PlatformDefinitions.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/vectormath2bullet.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuGatheringCollisionDispatcher.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuCollisionObjectWrapper.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSampleTaskProcess.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSync.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/btThreadSupportInterface.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuLibspe2Support.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuFakeDma.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuDoubleBuffer.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/Win32ThreadSupport.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SequentialThreadSupport.h
+
+subdir = src
+DIST_COMMON = $(am__nobase_bullet_include_HEADERS_DIST) \
+ $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(libdir)" \
+ "$(DESTDIR)$(bullet_includedir)"
+libLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libBulletCollision_la_LIBADD =
+am_libBulletCollision_la_OBJECTS = btRaycastCallback.lo \
+ btMinkowskiPenetrationDepthSolver.lo btSubSimplexConvexCast.lo \
+ btGjkEpaPenetrationDepthSolver.lo btGjkConvexCast.lo \
+ btPersistentManifold.lo btConvexCast.lo \
+ btPolyhedralContactClipping.lo btContinuousConvexCollision.lo \
+ btGjkPairDetector.lo btGjkEpa2.lo btVoronoiSimplexSolver.lo \
+ btActivatingCollisionAlgorithm.lo btCollisionObject.lo \
+ btEmptyCollisionAlgorithm.lo btGhostObject.lo \
+ btSphereSphereCollisionAlgorithm.lo \
+ btSphereBoxCollisionAlgorithm.lo btCollisionDispatcher.lo \
+ btDefaultCollisionConfiguration.lo \
+ btSimulationIslandManager.lo btBoxBoxDetector.lo \
+ btConvexPlaneCollisionAlgorithm.lo \
+ btConvexConcaveCollisionAlgorithm.lo \
+ btBoxBoxCollisionAlgorithm.lo \
+ btBox2dBox2dCollisionAlgorithm.lo SphereTriangleDetector.lo \
+ btInternalEdgeUtility.lo btManifoldResult.lo \
+ btCollisionWorld.lo btSphereTriangleCollisionAlgorithm.lo \
+ btConvexConvexAlgorithm.lo btConvex2dConvex2dAlgorithm.lo \
+ btUnionFind.lo btCompoundCollisionAlgorithm.lo \
+ btTetrahedronShape.lo btShapeHull.lo btMinkowskiSumShape.lo \
+ btCompoundShape.lo btConeShape.lo btConvexPolyhedron.lo \
+ btMultiSphereShape.lo btUniformScalingShape.lo \
+ btSphereShape.lo btTriangleIndexVertexArray.lo \
+ btBvhTriangleMeshShape.lo btTriangleMeshShape.lo \
+ btTriangleBuffer.lo btStaticPlaneShape.lo \
+ btPolyhedralConvexShape.lo btEmptyShape.lo btCollisionShape.lo \
+ btConvexShape.lo btConvex2dShape.lo btConvexInternalShape.lo \
+ btConvexHullShape.lo btTriangleCallback.lo btCapsuleShape.lo \
+ btConvexTriangleMeshShape.lo btConcaveShape.lo \
+ btConvexPointCloudShape.lo btBoxShape.lo btBox2dShape.lo \
+ btOptimizedBvh.lo btHeightfieldTerrainShape.lo \
+ btMultimaterialTriangleMeshShape.lo btCylinderShape.lo \
+ btScaledBvhTriangleMeshShape.lo btStridingMeshInterface.lo \
+ btTriangleIndexVertexMaterialArray.lo btTriangleMesh.lo \
+ btAxisSweep3.lo btOverlappingPairCache.lo btDbvtBroadphase.lo \
+ btMultiSapBroadphase.lo btDispatcher.lo btBroadphaseProxy.lo \
+ btQuantizedBvh.lo btCollisionAlgorithm.lo btDbvt.lo \
+ btSimpleBroadphase.lo btGImpactBvh.lo btGImpactQuantizedBvh.lo \
+ btTriangleShapeEx.lo btGImpactCollisionAlgorithm.lo \
+ btGImpactShape.lo gim_box_set.lo gim_contact.lo gim_memory.lo \
+ gim_tri_collision.lo
+libBulletCollision_la_OBJECTS = $(am_libBulletCollision_la_OBJECTS)
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@am_libBulletCollision_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@ -rpath $(libdir)
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@am_libBulletCollision_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ -rpath $(libdir)
+libBulletDynamics_la_LIBADD =
+am_libBulletDynamics_la_OBJECTS = btContinuousDynamicsWorld.lo \
+ btRigidBody.lo btSimpleDynamicsWorld.lo Bullet-C-API.lo \
+ btDiscreteDynamicsWorld.lo btGeneric6DofConstraint.lo \
+ btGeneric6DofSpringConstraint.lo btSolve2LinearConstraint.lo \
+ btPoint2PointConstraint.lo btTypedConstraint.lo \
+ btContactConstraint.lo btSliderConstraint.lo \
+ btConeTwistConstraint.lo btHingeConstraint.lo \
+ btHinge2Constraint.lo btUniversalConstraint.lo \
+ btSequentialImpulseConstraintSolver.lo btWheelInfo.lo \
+ btRaycastVehicle.lo btKinematicCharacterController.lo
+libBulletDynamics_la_OBJECTS = $(am_libBulletDynamics_la_OBJECTS)
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@am_libBulletDynamics_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@ -rpath $(libdir)
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@am_libBulletDynamics_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ -rpath $(libdir)
+libBulletMultiThreaded_la_LIBADD =
+am__libBulletMultiThreaded_la_SOURCES_DIST = \
+ BulletMultiThreaded/SpuCollisionObjectWrapper.cpp \
+ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp \
+ BulletMultiThreaded/SpuLibspe2Support.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp \
+ BulletMultiThreaded/btThreadSupportInterface.cpp \
+ BulletMultiThreaded/SequentialThreadSupport.cpp \
+ BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp \
+ BulletMultiThreaded/Win32ThreadSupport.cpp \
+ BulletMultiThreaded/SpuFakeDma.cpp \
+ BulletMultiThreaded/PosixThreadSupport.cpp \
+ BulletMultiThreaded/SpuCollisionTaskProcess.cpp \
+ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp \
+ BulletMultiThreaded/SpuSampleTaskProcess.cpp \
+ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h \
+ BulletMultiThreaded/PpuAddressSpace.h \
+ BulletMultiThreaded/SpuSampleTaskProcess.h \
+ BulletMultiThreaded/SequentialThreadSupport.h \
+ BulletMultiThreaded/PlatformDefinitions.h \
+ BulletMultiThreaded/Win32ThreadSupport.h \
+ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h \
+ BulletMultiThreaded/btThreadSupportInterface.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h \
+ BulletMultiThreaded/SpuGatheringCollisionDispatcher.h \
+ BulletMultiThreaded/SpuFakeDma.h BulletMultiThreaded/SpuSync.h \
+ BulletMultiThreaded/SpuCollisionObjectWrapper.h \
+ BulletMultiThreaded/SpuDoubleBuffer.h \
+ BulletMultiThreaded/SpuCollisionTaskProcess.h \
+ BulletMultiThreaded/PosixThreadSupport.h \
+ BulletMultiThreaded/SpuLibspe2Support.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@am_libBulletMultiThreaded_la_OBJECTS = libBulletMultiThreaded_la-SpuCollisionObjectWrapper.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuSampleTask.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuLibspe2Support.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuContactResult.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuGatheringCollisionTask.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuCollisionShapes.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-btThreadSupportInterface.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SequentialThreadSupport.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-Win32ThreadSupport.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuFakeDma.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-PosixThreadSupport.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuCollisionTaskProcess.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-SpuSampleTaskProcess.lo \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ libBulletMultiThreaded_la-boxBoxDistance.lo
+libBulletMultiThreaded_la_OBJECTS = \
+ $(am_libBulletMultiThreaded_la_OBJECTS)
+libBulletMultiThreaded_la_LINK = $(LIBTOOL) --tag=CXX \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+ $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@am_libBulletMultiThreaded_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ -rpath $(libdir)
+libBulletSoftBody_la_LIBADD =
+am_libBulletSoftBody_la_OBJECTS = btDefaultSoftBodySolver.lo \
+ btSoftBodyRigidBodyCollisionConfiguration.lo btSoftBody.lo \
+ btSoftRigidCollisionAlgorithm.lo \
+ btSoftBodyConcaveCollisionAlgorithm.lo \
+ btSoftRigidDynamicsWorld.lo btSoftBodyHelpers.lo \
+ btSoftSoftCollisionAlgorithm.lo
+libBulletSoftBody_la_OBJECTS = $(am_libBulletSoftBody_la_OBJECTS)
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@am_libBulletSoftBody_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@ -rpath $(libdir)
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@am_libBulletSoftBody_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ -rpath $(libdir)
+libLinearMath_la_LIBADD =
+am_libLinearMath_la_OBJECTS = btQuickprof.lo btGeometryUtil.lo \
+ btAlignedAllocator.lo btSerializer.lo btConvexHull.lo \
+ btConvexHullComputer.lo
+libLinearMath_la_OBJECTS = $(am_libLinearMath_la_OBJECTS)
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@am_libLinearMath_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@ -rpath $(libdir)
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@am_libLinearMath_la_rpath = \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ -rpath $(libdir)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libBulletCollision_la_SOURCES) \
+ $(libBulletDynamics_la_SOURCES) \
+ $(libBulletMultiThreaded_la_SOURCES) \
+ $(libBulletSoftBody_la_SOURCES) $(libLinearMath_la_SOURCES)
+DIST_SOURCES = $(libBulletCollision_la_SOURCES) \
+ $(libBulletDynamics_la_SOURCES) \
+ $(am__libBulletMultiThreaded_la_SOURCES_DIST) \
+ $(libBulletSoftBody_la_SOURCES) $(libLinearMath_la_SOURCES)
+am__nobase_bullet_include_HEADERS_DIST = btBulletDynamicsCommon.h \
+ Bullet-C-Api.h btBulletCollisionCommon.h \
+ BulletMultiThreaded/PosixThreadSupport.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/mat_aos.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/vec_aos.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/quat_aos.h \
+ BulletMultiThreaded/vectormath/scalar/cpp/vectormath_aos.h \
+ BulletMultiThreaded/PpuAddressSpace.h \
+ BulletMultiThreaded/SpuCollisionTaskProcess.h \
+ BulletMultiThreaded/PlatformDefinitions.h \
+ BulletMultiThreaded/vectormath2bullet.h \
+ BulletMultiThreaded/SpuGatheringCollisionDispatcher.h \
+ BulletMultiThreaded/SpuCollisionObjectWrapper.h \
+ BulletMultiThreaded/SpuSampleTaskProcess.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h \
+ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h \
+ BulletMultiThreaded/SpuSync.h \
+ BulletMultiThreaded/btThreadSupportInterface.h \
+ BulletMultiThreaded/SpuLibspe2Support.h \
+ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h \
+ BulletMultiThreaded/SpuFakeDma.h \
+ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h \
+ BulletMultiThreaded/SpuDoubleBuffer.h \
+ BulletMultiThreaded/Win32ThreadSupport.h \
+ BulletMultiThreaded/SequentialThreadSupport.h \
+ BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h \
+ BulletSoftBody/btSoftBodyInternals.h \
+ BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h \
+ BulletSoftBody/btSoftSoftCollisionAlgorithm.h \
+ BulletSoftBody/btSoftBody.h BulletSoftBody/btSoftBodyHelpers.h \
+ BulletSoftBody/btSparseSDF.h \
+ BulletSoftBody/btSoftRigidCollisionAlgorithm.h \
+ BulletSoftBody/btSoftRigidDynamicsWorld.h \
+ BulletDynamics/Vehicle/btRaycastVehicle.h \
+ BulletDynamics/Vehicle/btWheelInfo.h \
+ BulletDynamics/Vehicle/btVehicleRaycaster.h \
+ BulletDynamics/Dynamics/btActionInterface.h \
+ BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
+ BulletDynamics/Dynamics/btRigidBody.h \
+ BulletDynamics/Dynamics/btDynamicsWorld.h \
+ BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
+ BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
+ BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btSolverConstraint.h \
+ BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h \
+ BulletDynamics/ConstraintSolver/btTypedConstraint.h \
+ BulletDynamics/ConstraintSolver/btSliderConstraint.h \
+ BulletDynamics/ConstraintSolver/btConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btContactConstraint.h \
+ BulletDynamics/ConstraintSolver/btContactSolverInfo.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h \
+ BulletDynamics/ConstraintSolver/btJacobianEntry.h \
+ BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h \
+ BulletDynamics/ConstraintSolver/btConeTwistConstraint.h \
+ BulletDynamics/ConstraintSolver/btHingeConstraint.h \
+ BulletDynamics/ConstraintSolver/btHinge2Constraint.h \
+ BulletDynamics/ConstraintSolver/btUniversalConstraint.h \
+ BulletDynamics/ConstraintSolver/btSolverBody.h \
+ BulletDynamics/Character/btCharacterControllerInterface.h \
+ BulletDynamics/Character/btKinematicCharacterController.h \
+ BulletCollision/CollisionShapes/btShapeHull.h \
+ BulletCollision/CollisionShapes/btConcaveShape.h \
+ BulletCollision/CollisionShapes/btCollisionMargin.h \
+ BulletCollision/CollisionShapes/btCompoundShape.h \
+ BulletCollision/CollisionShapes/btConvexHullShape.h \
+ BulletCollision/CollisionShapes/btCylinderShape.h \
+ BulletCollision/CollisionShapes/btTriangleMesh.h \
+ BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h \
+ BulletCollision/CollisionShapes/btUniformScalingShape.h \
+ BulletCollision/CollisionShapes/btConvexPointCloudShape.h \
+ BulletCollision/CollisionShapes/btTetrahedronShape.h \
+ BulletCollision/CollisionShapes/btCapsuleShape.h \
+ BulletCollision/CollisionShapes/btSphereShape.h \
+ BulletCollision/CollisionShapes/btMultiSphereShape.h \
+ BulletCollision/CollisionShapes/btConvexInternalShape.h \
+ BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btStridingMeshInterface.h \
+ BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btEmptyShape.h \
+ BulletCollision/CollisionShapes/btOptimizedBvh.h \
+ BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btTriangleCallback.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h \
+ BulletCollision/CollisionShapes/btTriangleInfoMap.h \
+ BulletCollision/CollisionShapes/btTriangleBuffer.h \
+ BulletCollision/CollisionShapes/btConvexShape.h \
+ BulletCollision/CollisionShapes/btConvex2dShape.h \
+ BulletCollision/CollisionShapes/btStaticPlaneShape.h \
+ BulletCollision/CollisionShapes/btConeShape.h \
+ BulletCollision/CollisionShapes/btCollisionShape.h \
+ BulletCollision/CollisionShapes/btTriangleShape.h \
+ BulletCollision/CollisionShapes/btBoxShape.h \
+ BulletCollision/CollisionShapes/btBox2dShape.h \
+ BulletCollision/CollisionShapes/btMinkowskiSumShape.h \
+ BulletCollision/CollisionShapes/btTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btMaterial.h \
+ BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btPolyhedralConvexShape.h \
+ BulletCollision/NarrowPhaseCollision/btConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpa2.h \
+ BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h \
+ BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h \
+ BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h \
+ BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h \
+ BulletCollision/NarrowPhaseCollision/btPersistentManifold.h \
+ BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \
+ BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btRaycastCallback.h \
+ BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btPointCollector.h \
+ BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h \
+ BulletCollision/BroadphaseCollision/btDbvt.h \
+ BulletCollision/BroadphaseCollision/btDispatcher.h \
+ BulletCollision/BroadphaseCollision/btDbvtBroadphase.h \
+ BulletCollision/BroadphaseCollision/btSimpleBroadphase.h \
+ BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h \
+ BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h \
+ BulletCollision/BroadphaseCollision/btQuantizedBvh.h \
+ BulletCollision/BroadphaseCollision/btAxisSweep3.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseInterface.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCache.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseProxy.h \
+ BulletCollision/CollisionDispatch/btUnionFind.h \
+ BulletCollision/CollisionDispatch/btCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCollisionDispatcher.h \
+ BulletCollision/CollisionDispatch/SphereTriangleDetector.h \
+ BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionWorld.h \
+ BulletCollision/CollisionDispatch/btCollisionCreateFunc.h \
+ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionObject.h \
+ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btGhostObject.h \
+ BulletCollision/CollisionDispatch/btSimulationIslandManager.h \
+ BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxDetector.h \
+ BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btInternalEdgeUtility.h \
+ BulletCollision/CollisionDispatch/btManifoldResult.h \
+ BulletCollision/Gimpact/gim_memory.h \
+ BulletCollision/Gimpact/gim_clip_polygon.h \
+ BulletCollision/Gimpact/gim_bitset.h \
+ BulletCollision/Gimpact/gim_linear_math.h \
+ BulletCollision/Gimpact/btGeometryOperations.h \
+ BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h \
+ BulletCollision/Gimpact/btGImpactBvh.h \
+ BulletCollision/Gimpact/gim_box_set.h \
+ BulletCollision/Gimpact/gim_array.h \
+ BulletCollision/Gimpact/btGImpactShape.h \
+ BulletCollision/Gimpact/btTriangleShapeEx.h \
+ BulletCollision/Gimpact/btClipPolygon.h \
+ BulletCollision/Gimpact/gim_box_collision.h \
+ BulletCollision/Gimpact/gim_tri_collision.h \
+ BulletCollision/Gimpact/gim_geometry.h \
+ BulletCollision/Gimpact/gim_math.h \
+ BulletCollision/Gimpact/btQuantization.h \
+ BulletCollision/Gimpact/btGImpactQuantizedBvh.h \
+ BulletCollision/Gimpact/gim_geom_types.h \
+ BulletCollision/Gimpact/gim_basic_geometry_operations.h \
+ BulletCollision/Gimpact/gim_contact.h \
+ BulletCollision/Gimpact/gim_hash_table.h \
+ BulletCollision/Gimpact/gim_radixsort.h \
+ BulletCollision/Gimpact/btGImpactMassUtil.h \
+ BulletCollision/Gimpact/btGenericPoolAllocator.h \
+ BulletCollision/Gimpact/btBoxCollision.h \
+ BulletCollision/Gimpact/btContactProcessing.h \
+ LinearMath/btGeometryUtil.h LinearMath/btConvexHull.h \
+ LinearMath/btList.h LinearMath/btMatrix3x3.h \
+ LinearMath/btVector3.h LinearMath/btPoolAllocator.h \
+ LinearMath/btScalar.h LinearMath/btDefaultMotionState.h \
+ LinearMath/btTransform.h LinearMath/btQuadWord.h \
+ LinearMath/btAabbUtil2.h LinearMath/btTransformUtil.h \
+ LinearMath/btRandom.h LinearMath/btQuaternion.h \
+ LinearMath/btMinMax.h LinearMath/btMotionState.h \
+ LinearMath/btIDebugDraw.h LinearMath/btAlignedAllocator.h \
+ LinearMath/btStackAlloc.h LinearMath/btAlignedObjectArray.h \
+ LinearMath/btHashMap.h LinearMath/btQuickprof.h \
+ LinearMath/btSerializer.h
+nobase_bullet_includeHEADERS_INSTALL = $(install_sh_DATA)
+HEADERS = $(nobase_bullet_include_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GL_LIBS = @GL_LIBS@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+opengl_LIBS = @opengl_LIBS@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bullet_includedir = $(includedir)/bullet
+nobase_bullet_include_HEADERS = btBulletDynamicsCommon.h \
+ Bullet-C-Api.h btBulletCollisionCommon.h $(am__append_1) \
+ BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h \
+ BulletSoftBody/btSoftBodyInternals.h \
+ BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h \
+ BulletSoftBody/btSoftSoftCollisionAlgorithm.h \
+ BulletSoftBody/btSoftBody.h BulletSoftBody/btSoftBodyHelpers.h \
+ BulletSoftBody/btSparseSDF.h \
+ BulletSoftBody/btSoftRigidCollisionAlgorithm.h \
+ BulletSoftBody/btSoftRigidDynamicsWorld.h \
+ BulletDynamics/Vehicle/btRaycastVehicle.h \
+ BulletDynamics/Vehicle/btWheelInfo.h \
+ BulletDynamics/Vehicle/btVehicleRaycaster.h \
+ BulletDynamics/Dynamics/btActionInterface.h \
+ BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
+ BulletDynamics/Dynamics/btRigidBody.h \
+ BulletDynamics/Dynamics/btDynamicsWorld.h \
+ BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
+ BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
+ BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btSolverConstraint.h \
+ BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h \
+ BulletDynamics/ConstraintSolver/btTypedConstraint.h \
+ BulletDynamics/ConstraintSolver/btSliderConstraint.h \
+ BulletDynamics/ConstraintSolver/btConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btContactConstraint.h \
+ BulletDynamics/ConstraintSolver/btContactSolverInfo.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h \
+ BulletDynamics/ConstraintSolver/btJacobianEntry.h \
+ BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h \
+ BulletDynamics/ConstraintSolver/btConeTwistConstraint.h \
+ BulletDynamics/ConstraintSolver/btHingeConstraint.h \
+ BulletDynamics/ConstraintSolver/btHinge2Constraint.h \
+ BulletDynamics/ConstraintSolver/btUniversalConstraint.h \
+ BulletDynamics/ConstraintSolver/btSolverBody.h \
+ BulletDynamics/Character/btCharacterControllerInterface.h \
+ BulletDynamics/Character/btKinematicCharacterController.h \
+ BulletCollision/CollisionShapes/btShapeHull.h \
+ BulletCollision/CollisionShapes/btConcaveShape.h \
+ BulletCollision/CollisionShapes/btCollisionMargin.h \
+ BulletCollision/CollisionShapes/btCompoundShape.h \
+ BulletCollision/CollisionShapes/btConvexHullShape.h \
+ BulletCollision/CollisionShapes/btCylinderShape.h \
+ BulletCollision/CollisionShapes/btTriangleMesh.h \
+ BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h \
+ BulletCollision/CollisionShapes/btUniformScalingShape.h \
+ BulletCollision/CollisionShapes/btConvexPointCloudShape.h \
+ BulletCollision/CollisionShapes/btTetrahedronShape.h \
+ BulletCollision/CollisionShapes/btCapsuleShape.h \
+ BulletCollision/CollisionShapes/btSphereShape.h \
+ BulletCollision/CollisionShapes/btMultiSphereShape.h \
+ BulletCollision/CollisionShapes/btConvexInternalShape.h \
+ BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btStridingMeshInterface.h \
+ BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btEmptyShape.h \
+ BulletCollision/CollisionShapes/btOptimizedBvh.h \
+ BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btTriangleCallback.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h \
+ BulletCollision/CollisionShapes/btTriangleInfoMap.h \
+ BulletCollision/CollisionShapes/btTriangleBuffer.h \
+ BulletCollision/CollisionShapes/btConvexShape.h \
+ BulletCollision/CollisionShapes/btConvex2dShape.h \
+ BulletCollision/CollisionShapes/btStaticPlaneShape.h \
+ BulletCollision/CollisionShapes/btConeShape.h \
+ BulletCollision/CollisionShapes/btCollisionShape.h \
+ BulletCollision/CollisionShapes/btTriangleShape.h \
+ BulletCollision/CollisionShapes/btBoxShape.h \
+ BulletCollision/CollisionShapes/btBox2dShape.h \
+ BulletCollision/CollisionShapes/btMinkowskiSumShape.h \
+ BulletCollision/CollisionShapes/btTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btMaterial.h \
+ BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btPolyhedralConvexShape.h \
+ BulletCollision/NarrowPhaseCollision/btConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpa2.h \
+ BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h \
+ BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h \
+ BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h \
+ BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h \
+ BulletCollision/NarrowPhaseCollision/btPersistentManifold.h \
+ BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \
+ BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btRaycastCallback.h \
+ BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btPointCollector.h \
+ BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h \
+ BulletCollision/BroadphaseCollision/btDbvt.h \
+ BulletCollision/BroadphaseCollision/btDispatcher.h \
+ BulletCollision/BroadphaseCollision/btDbvtBroadphase.h \
+ BulletCollision/BroadphaseCollision/btSimpleBroadphase.h \
+ BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h \
+ BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h \
+ BulletCollision/BroadphaseCollision/btQuantizedBvh.h \
+ BulletCollision/BroadphaseCollision/btAxisSweep3.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseInterface.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCache.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseProxy.h \
+ BulletCollision/CollisionDispatch/btUnionFind.h \
+ BulletCollision/CollisionDispatch/btCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCollisionDispatcher.h \
+ BulletCollision/CollisionDispatch/SphereTriangleDetector.h \
+ BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionWorld.h \
+ BulletCollision/CollisionDispatch/btCollisionCreateFunc.h \
+ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionObject.h \
+ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btGhostObject.h \
+ BulletCollision/CollisionDispatch/btSimulationIslandManager.h \
+ BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxDetector.h \
+ BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btInternalEdgeUtility.h \
+ BulletCollision/CollisionDispatch/btManifoldResult.h \
+ BulletCollision/Gimpact/gim_memory.h \
+ BulletCollision/Gimpact/gim_clip_polygon.h \
+ BulletCollision/Gimpact/gim_bitset.h \
+ BulletCollision/Gimpact/gim_linear_math.h \
+ BulletCollision/Gimpact/btGeometryOperations.h \
+ BulletCollision/Gimpact/btGImpactCollisionAlgorithm.h \
+ BulletCollision/Gimpact/btGImpactBvh.h \
+ BulletCollision/Gimpact/gim_box_set.h \
+ BulletCollision/Gimpact/gim_array.h \
+ BulletCollision/Gimpact/btGImpactShape.h \
+ BulletCollision/Gimpact/btTriangleShapeEx.h \
+ BulletCollision/Gimpact/btClipPolygon.h \
+ BulletCollision/Gimpact/gim_box_collision.h \
+ BulletCollision/Gimpact/gim_tri_collision.h \
+ BulletCollision/Gimpact/gim_geometry.h \
+ BulletCollision/Gimpact/gim_math.h \
+ BulletCollision/Gimpact/btQuantization.h \
+ BulletCollision/Gimpact/btGImpactQuantizedBvh.h \
+ BulletCollision/Gimpact/gim_geom_types.h \
+ BulletCollision/Gimpact/gim_basic_geometry_operations.h \
+ BulletCollision/Gimpact/gim_contact.h \
+ BulletCollision/Gimpact/gim_hash_table.h \
+ BulletCollision/Gimpact/gim_radixsort.h \
+ BulletCollision/Gimpact/btGImpactMassUtil.h \
+ BulletCollision/Gimpact/btGenericPoolAllocator.h \
+ BulletCollision/Gimpact/btBoxCollision.h \
+ BulletCollision/Gimpact/btContactProcessing.h \
+ LinearMath/btGeometryUtil.h LinearMath/btConvexHull.h \
+ LinearMath/btList.h LinearMath/btMatrix3x3.h \
+ LinearMath/btVector3.h LinearMath/btPoolAllocator.h \
+ LinearMath/btScalar.h LinearMath/btDefaultMotionState.h \
+ LinearMath/btTransform.h LinearMath/btQuadWord.h \
+ LinearMath/btAabbUtil2.h LinearMath/btTransformUtil.h \
+ LinearMath/btRandom.h LinearMath/btQuaternion.h \
+ LinearMath/btMinMax.h LinearMath/btMotionState.h \
+ LinearMath/btIDebugDraw.h LinearMath/btAlignedAllocator.h \
+ LinearMath/btStackAlloc.h LinearMath/btAlignedObjectArray.h \
+ LinearMath/btHashMap.h LinearMath/btQuickprof.h \
+ LinearMath/btSerializer.h
+@CONDITIONAL_BUILD_MULTITHREADED_FALSE@lib_LTLIBRARIES = libLinearMath.la libBulletCollision.la libBulletDynamics.la libBulletSoftBody.la
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@lib_LTLIBRARIES = libLinearMath.la libBulletCollision.la libBulletDynamics.la libBulletSoftBody.la libBulletMultiThreaded.la
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@libBulletMultiThreaded_la_CXXFLAGS = ${CXXFLAGS} -I./BulletMultiThreaded/vectormath/scalar/cpp
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@libBulletMultiThreaded_la_SOURCES = \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuCollisionObjectWrapper.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuLibspe2Support.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/btThreadSupportInterface.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SequentialThreadSupport.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/Win32ThreadSupport.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuFakeDma.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/PosixThreadSupport.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuCollisionTaskProcess.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSampleTaskProcess.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSampleTask/SpuSampleTask.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/PpuAddressSpace.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSampleTaskProcess.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SequentialThreadSupport.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/PlatformDefinitions.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/Win32ThreadSupport.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/btThreadSupportInterface.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuConvexPenetrationDepthSolver.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuPreferredPenetrationDirections.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuLocalSupport.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuGatheringCollisionDispatcher.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuFakeDma.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuSync.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuCollisionObjectWrapper.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuDoubleBuffer.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuCollisionTaskProcess.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/PosixThreadSupport.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuLibspe2Support.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.h \
+@CONDITIONAL_BUILD_MULTITHREADED_TRUE@ BulletMultiThreaded/SpuNarrowPhaseCollisionTask/Box.h
+
+libLinearMath_la_SOURCES = \
+ LinearMath/btQuickprof.cpp \
+ LinearMath/btGeometryUtil.cpp \
+ LinearMath/btAlignedAllocator.cpp \
+ LinearMath/btSerializer.cpp \
+ LinearMath/btConvexHull.cpp \
+ LinearMath/btConvexHullComputer.cpp \
+ LinearMath/btHashMap.h \
+ LinearMath/btConvexHull.h \
+ LinearMath/btAabbUtil2.h \
+ LinearMath/btGeometryUtil.h \
+ LinearMath/btQuadWord.h \
+ LinearMath/btPoolAllocator.h \
+ LinearMath/btScalar.h \
+ LinearMath/btMinMax.h \
+ LinearMath/btVector3.h \
+ LinearMath/btList.h \
+ LinearMath/btStackAlloc.h \
+ LinearMath/btMatrix3x3.h \
+ LinearMath/btMotionState.h \
+ LinearMath/btAlignedAllocator.h \
+ LinearMath/btQuaternion.h \
+ LinearMath/btAlignedObjectArray.h \
+ LinearMath/btQuickprof.h \
+ LinearMath/btSerializer.h \
+ LinearMath/btTransformUtil.h \
+ LinearMath/btTransform.h \
+ LinearMath/btDefaultMotionState.h \
+ LinearMath/btIDebugDraw.h \
+ LinearMath/btRandom.h
+
+libBulletCollision_la_SOURCES = \
+ BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp \
+ BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp \
+ BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp \
+ BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp \
+ BulletCollision/NarrowPhaseCollision/btConvexCast.cpp \
+ BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp \
+ BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp \
+ BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp \
+ BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btCollisionObject.cpp \
+ BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btGhostObject.cpp \
+ BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp \
+ BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp \
+ BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp \
+ BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp \
+ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp \
+ BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp \
+ BulletCollision/CollisionDispatch/btManifoldResult.cpp \
+ BulletCollision/CollisionDispatch/btCollisionWorld.cpp \
+ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp \
+ BulletCollision/CollisionDispatch/btUnionFind.cpp \
+ BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp \
+ BulletCollision/CollisionShapes/btTetrahedronShape.cpp \
+ BulletCollision/CollisionShapes/btShapeHull.cpp \
+ BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp \
+ BulletCollision/CollisionShapes/btCompoundShape.cpp \
+ BulletCollision/CollisionShapes/btConeShape.cpp \
+ BulletCollision/CollisionShapes/btConvexPolyhedron.cpp \
+ BulletCollision/CollisionShapes/btMultiSphereShape.cpp \
+ BulletCollision/CollisionShapes/btUniformScalingShape.cpp \
+ BulletCollision/CollisionShapes/btSphereShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp \
+ BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleBuffer.cpp \
+ BulletCollision/CollisionShapes/btStaticPlaneShape.cpp \
+ BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp \
+ BulletCollision/CollisionShapes/btEmptyShape.cpp \
+ BulletCollision/CollisionShapes/btCollisionShape.cpp \
+ BulletCollision/CollisionShapes/btConvexShape.cpp \
+ BulletCollision/CollisionShapes/btConvex2dShape.cpp \
+ BulletCollision/CollisionShapes/btConvexInternalShape.cpp \
+ BulletCollision/CollisionShapes/btConvexHullShape.cpp \
+ BulletCollision/CollisionShapes/btTriangleCallback.cpp \
+ BulletCollision/CollisionShapes/btCapsuleShape.cpp \
+ BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btConcaveShape.cpp \
+ BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp \
+ BulletCollision/CollisionShapes/btBoxShape.cpp \
+ BulletCollision/CollisionShapes/btBox2dShape.cpp \
+ BulletCollision/CollisionShapes/btOptimizedBvh.cpp \
+ BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp \
+ BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btCylinderShape.cpp \
+ BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp \
+ BulletCollision/CollisionShapes/btStridingMeshInterface.cpp \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp \
+ BulletCollision/CollisionShapes/btTriangleMesh.cpp \
+ BulletCollision/BroadphaseCollision/btAxisSweep3.cpp \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp \
+ BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp \
+ BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp \
+ BulletCollision/BroadphaseCollision/btDispatcher.cpp \
+ BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp \
+ BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp \
+ BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp \
+ BulletCollision/BroadphaseCollision/btDbvt.cpp \
+ BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp \
+ BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.h \
+ BulletCollision/NarrowPhaseCollision/btConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btGjkEpa2.h \
+ BulletCollision/NarrowPhaseCollision/btGjkPairDetector.h \
+ BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btPointCollector.h \
+ BulletCollision/NarrowPhaseCollision/btConvexPenetrationDepthSolver.h \
+ BulletCollision/NarrowPhaseCollision/btSimplexSolverInterface.h \
+ BulletCollision/NarrowPhaseCollision/btRaycastCallback.h \
+ BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h \
+ BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btPersistentManifold.h \
+ BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h \
+ BulletCollision/NarrowPhaseCollision/btManifoldPoint.h \
+ BulletCollision/NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h \
+ BulletCollision/CollisionDispatch/btCollisionObject.h \
+ BulletCollision/CollisionDispatch/btGhostObject.h \
+ BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionCreateFunc.h \
+ BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.h \
+ BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.h \
+ BulletCollision/CollisionDispatch/btBoxBoxDetector.h \
+ BulletCollision/CollisionDispatch/btCollisionDispatcher.h \
+ BulletCollision/CollisionDispatch/SphereTriangleDetector.h \
+ BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btUnionFind.h \
+ BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btSimulationIslandManager.h \
+ BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h \
+ BulletCollision/CollisionDispatch/btCollisionWorld.h \
+ BulletCollision/CollisionDispatch/btInternalEdgeUtility.h \
+ BulletCollision/CollisionDispatch/btManifoldResult.h \
+ BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h \
+ BulletCollision/CollisionDispatch/btCollisionConfiguration.h \
+ BulletCollision/CollisionShapes/btConvexShape.h \
+ BulletCollision/CollisionShapes/btConvex2dShape.h \
+ BulletCollision/CollisionShapes/btTriangleCallback.h \
+ BulletCollision/CollisionShapes/btPolyhedralConvexShape.h \
+ BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btCompoundShape.h \
+ BulletCollision/CollisionShapes/btBoxShape.h \
+ BulletCollision/CollisionShapes/btBox2dShape.h \
+ BulletCollision/CollisionShapes/btMultiSphereShape.h \
+ BulletCollision/CollisionShapes/btCollisionMargin.h \
+ BulletCollision/CollisionShapes/btConcaveShape.h \
+ BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btEmptyShape.h \
+ BulletCollision/CollisionShapes/btUniformScalingShape.h \
+ BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btMaterial.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h \
+ BulletCollision/CollisionShapes/btTriangleInfoMap.h \
+ BulletCollision/CollisionShapes/btSphereShape.h \
+ BulletCollision/CollisionShapes/btConvexPointCloudShape.h \
+ BulletCollision/CollisionShapes/btCapsuleShape.h \
+ BulletCollision/CollisionShapes/btHeightfieldTerrainShape.h \
+ BulletCollision/CollisionShapes/btCollisionShape.h \
+ BulletCollision/CollisionShapes/btStaticPlaneShape.h \
+ BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btTriangleMeshShape.h \
+ BulletCollision/CollisionShapes/btStridingMeshInterface.h \
+ BulletCollision/CollisionShapes/btTriangleMesh.h \
+ BulletCollision/CollisionShapes/btTriangleBuffer.h \
+ BulletCollision/CollisionShapes/btShapeHull.h \
+ BulletCollision/CollisionShapes/btMinkowskiSumShape.h \
+ BulletCollision/CollisionShapes/btOptimizedBvh.h \
+ BulletCollision/CollisionShapes/btTriangleShape.h \
+ BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.h \
+ BulletCollision/CollisionShapes/btCylinderShape.h \
+ BulletCollision/CollisionShapes/btTetrahedronShape.h \
+ BulletCollision/CollisionShapes/btConvexInternalShape.h \
+ BulletCollision/CollisionShapes/btConeShape.h \
+ BulletCollision/CollisionShapes/btConvexHullShape.h \
+ BulletCollision/BroadphaseCollision/btAxisSweep3.h \
+ BulletCollision/BroadphaseCollision/btDbvtBroadphase.h \
+ BulletCollision/BroadphaseCollision/btSimpleBroadphase.h \
+ BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h \
+ BulletCollision/BroadphaseCollision/btDbvt.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h \
+ BulletCollision/BroadphaseCollision/btDispatcher.h \
+ BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseProxy.h \
+ BulletCollision/BroadphaseCollision/btOverlappingPairCache.h \
+ BulletCollision/BroadphaseCollision/btBroadphaseInterface.h \
+ BulletCollision/BroadphaseCollision/btQuantizedBvh.h \
+ BulletCollision/Gimpact/btGImpactBvh.cpp\
+ BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp\
+ BulletCollision/Gimpact/btTriangleShapeEx.cpp\
+ BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp\
+ BulletCollision/Gimpact/btGImpactShape.cpp\
+ BulletCollision/Gimpact/gim_box_set.cpp\
+ BulletCollision/Gimpact/gim_contact.cpp\
+ BulletCollision/Gimpact/gim_memory.cpp\
+ BulletCollision/Gimpact/gim_tri_collision.cpp
+
+libBulletDynamics_la_SOURCES = \
+ BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp \
+ BulletDynamics/Dynamics/btRigidBody.cpp \
+ BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp \
+ BulletDynamics/Dynamics/Bullet-C-API.cpp \
+ BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp \
+ BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btTypedConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btContactConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btSliderConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btHingeConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp \
+ BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp \
+ BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp \
+ BulletDynamics/Vehicle/btWheelInfo.cpp \
+ BulletDynamics/Vehicle/btRaycastVehicle.cpp \
+ BulletDynamics/Character/btKinematicCharacterController.cpp \
+ BulletDynamics/Character/btKinematicCharacterController.h \
+ BulletDynamics/Character/btCharacterControllerInterface.h \
+ BulletDynamics/Dynamics/btActionInterface.h \
+ BulletDynamics/Dynamics/btContinuousDynamicsWorld.h \
+ BulletDynamics/Dynamics/btSimpleDynamicsWorld.h \
+ BulletDynamics/Dynamics/btRigidBody.h \
+ BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h \
+ BulletDynamics/Dynamics/btDynamicsWorld.h \
+ BulletDynamics/ConstraintSolver/btSolverBody.h \
+ BulletDynamics/ConstraintSolver/btConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btConeTwistConstraint.h \
+ BulletDynamics/ConstraintSolver/btTypedConstraint.h \
+ BulletDynamics/ConstraintSolver/btContactSolverInfo.h \
+ BulletDynamics/ConstraintSolver/btContactConstraint.h \
+ BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h \
+ BulletDynamics/ConstraintSolver/btJacobianEntry.h \
+ BulletDynamics/ConstraintSolver/btSolverConstraint.h \
+ BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h \
+ BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h \
+ BulletDynamics/ConstraintSolver/btSliderConstraint.h \
+ BulletDynamics/ConstraintSolver/btHingeConstraint.h \
+ BulletDynamics/ConstraintSolver/btHinge2Constraint.h \
+ BulletDynamics/ConstraintSolver/btUniversalConstraint.h \
+ BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.h \
+ BulletDynamics/Vehicle/btVehicleRaycaster.h \
+ BulletDynamics/Vehicle/btRaycastVehicle.h \
+ BulletDynamics/Vehicle/btWheelInfo.h
+
+libBulletSoftBody_la_SOURCES = \
+ BulletSoftBody/btDefaultSoftBodySolver.cpp \
+ BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp \
+ BulletSoftBody/btSoftBody.cpp \
+ BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp \
+ BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp \
+ BulletSoftBody/btSoftRigidDynamicsWorld.cpp \
+ BulletSoftBody/btSoftBodyHelpers.cpp \
+ BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp \
+ BulletSoftBody/btSparseSDF.h \
+ BulletSoftBody/btSoftRigidCollisionAlgorithm.h \
+ BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.h \
+ BulletSoftBody/btSoftBody.h \
+ BulletSoftBody/btSoftSoftCollisionAlgorithm.h \
+ BulletSoftBody/btSoftBodyInternals.h \
+ BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h \
+ BulletSoftBody/btSoftRigidDynamicsWorld.h \
+ BulletSoftBody/btSoftBodyHelpers.h
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
+ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libBulletCollision.la: $(libBulletCollision_la_OBJECTS) $(libBulletCollision_la_DEPENDENCIES)
+ $(CXXLINK) $(am_libBulletCollision_la_rpath) $(libBulletCollision_la_OBJECTS) $(libBulletCollision_la_LIBADD) $(LIBS)
+libBulletDynamics.la: $(libBulletDynamics_la_OBJECTS) $(libBulletDynamics_la_DEPENDENCIES)
+ $(CXXLINK) $(am_libBulletDynamics_la_rpath) $(libBulletDynamics_la_OBJECTS) $(libBulletDynamics_la_LIBADD) $(LIBS)
+libBulletMultiThreaded.la: $(libBulletMultiThreaded_la_OBJECTS) $(libBulletMultiThreaded_la_DEPENDENCIES)
+ $(libBulletMultiThreaded_la_LINK) $(am_libBulletMultiThreaded_la_rpath) $(libBulletMultiThreaded_la_OBJECTS) $(libBulletMultiThreaded_la_LIBADD) $(LIBS)
+libBulletSoftBody.la: $(libBulletSoftBody_la_OBJECTS) $(libBulletSoftBody_la_DEPENDENCIES)
+ $(CXXLINK) $(am_libBulletSoftBody_la_rpath) $(libBulletSoftBody_la_OBJECTS) $(libBulletSoftBody_la_LIBADD) $(LIBS)
+libLinearMath.la: $(libLinearMath_la_OBJECTS) $(libLinearMath_la_DEPENDENCIES)
+ $(CXXLINK) $(am_libLinearMath_la_rpath) $(libLinearMath_la_OBJECTS) $(libLinearMath_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Bullet-C-API.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SphereTriangleDetector.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btActivatingCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btAlignedAllocator.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btAxisSweep3.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btBox2dBox2dCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btBox2dShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btBoxBoxCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btBoxBoxDetector.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btBoxShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btBroadphaseProxy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btBvhTriangleMeshShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCapsuleShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCollisionDispatcher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCollisionObject.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCollisionShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCollisionWorld.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCompoundCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCompoundShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConcaveShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConeShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConeTwistConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btContactConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btContinuousConvexCollision.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btContinuousDynamicsWorld.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvex2dConvex2dAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvex2dShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexCast.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexConcaveCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexConvexAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexHull.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexHullComputer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexHullShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexInternalShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexPlaneCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexPointCloudShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexPolyhedron.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btConvexTriangleMeshShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btCylinderShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btDbvt.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btDbvtBroadphase.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btDefaultCollisionConfiguration.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btDefaultSoftBodySolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btDiscreteDynamicsWorld.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btDispatcher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btEmptyCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btEmptyShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGImpactBvh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGImpactCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGImpactQuantizedBvh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGImpactShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGeneric6DofConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGeneric6DofSpringConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGeometryUtil.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGhostObject.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGjkConvexCast.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGjkEpa2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGjkEpaPenetrationDepthSolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btGjkPairDetector.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btHeightfieldTerrainShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btHinge2Constraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btHingeConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btInternalEdgeUtility.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btKinematicCharacterController.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btManifoldResult.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btMinkowskiPenetrationDepthSolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btMinkowskiSumShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btMultiSapBroadphase.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btMultiSphereShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btMultimaterialTriangleMeshShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btOptimizedBvh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btOverlappingPairCache.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btPersistentManifold.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btPoint2PointConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btPolyhedralContactClipping.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btPolyhedralConvexShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btQuantizedBvh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btQuickprof.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btRaycastCallback.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btRaycastVehicle.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btRigidBody.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btScaledBvhTriangleMeshShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSequentialImpulseConstraintSolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSerializer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btShapeHull.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSimpleBroadphase.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSimpleDynamicsWorld.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSimulationIslandManager.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSliderConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSoftBody.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSoftBodyConcaveCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSoftBodyHelpers.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSoftBodyRigidBodyCollisionConfiguration.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSoftRigidCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSoftRigidDynamicsWorld.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSoftSoftCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSolve2LinearConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSphereBoxCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSphereShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSphereSphereCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSphereTriangleCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btStaticPlaneShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btStridingMeshInterface.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btSubSimplexConvexCast.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTetrahedronShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTriangleBuffer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTriangleCallback.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTriangleIndexVertexArray.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTriangleIndexVertexMaterialArray.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTriangleMesh.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTriangleMeshShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTriangleShapeEx.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btTypedConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btUniformScalingShape.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btUnionFind.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btUniversalConstraint.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btVoronoiSimplexSolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btWheelInfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_box_set.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_contact.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_memory.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gim_tri_collision.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-PosixThreadSupport.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SequentialThreadSupport.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionObjectWrapper.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionShapes.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionTaskProcess.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuContactResult.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuFakeDma.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionTask.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuLibspe2Support.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTask.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTaskProcess.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-Win32ThreadSupport.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-boxBoxDistance.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libBulletMultiThreaded_la-btThreadSupportInterface.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+btRaycastCallback.lo: BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btRaycastCallback.lo -MD -MP -MF $(DEPDIR)/btRaycastCallback.Tpo -c -o btRaycastCallback.lo `test -f 'BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btRaycastCallback.Tpo $(DEPDIR)/btRaycastCallback.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp' object='btRaycastCallback.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btRaycastCallback.lo `test -f 'BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
+
+btMinkowskiPenetrationDepthSolver.lo: BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btMinkowskiPenetrationDepthSolver.lo -MD -MP -MF $(DEPDIR)/btMinkowskiPenetrationDepthSolver.Tpo -c -o btMinkowskiPenetrationDepthSolver.lo `test -f 'BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btMinkowskiPenetrationDepthSolver.Tpo $(DEPDIR)/btMinkowskiPenetrationDepthSolver.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp' object='btMinkowskiPenetrationDepthSolver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btMinkowskiPenetrationDepthSolver.lo `test -f 'BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
+
+btSubSimplexConvexCast.lo: BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSubSimplexConvexCast.lo -MD -MP -MF $(DEPDIR)/btSubSimplexConvexCast.Tpo -c -o btSubSimplexConvexCast.lo `test -f 'BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSubSimplexConvexCast.Tpo $(DEPDIR)/btSubSimplexConvexCast.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp' object='btSubSimplexConvexCast.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSubSimplexConvexCast.lo `test -f 'BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp
+
+btGjkEpaPenetrationDepthSolver.lo: BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGjkEpaPenetrationDepthSolver.lo -MD -MP -MF $(DEPDIR)/btGjkEpaPenetrationDepthSolver.Tpo -c -o btGjkEpaPenetrationDepthSolver.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGjkEpaPenetrationDepthSolver.Tpo $(DEPDIR)/btGjkEpaPenetrationDepthSolver.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp' object='btGjkEpaPenetrationDepthSolver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGjkEpaPenetrationDepthSolver.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp
+
+btGjkConvexCast.lo: BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGjkConvexCast.lo -MD -MP -MF $(DEPDIR)/btGjkConvexCast.Tpo -c -o btGjkConvexCast.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGjkConvexCast.Tpo $(DEPDIR)/btGjkConvexCast.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp' object='btGjkConvexCast.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGjkConvexCast.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp
+
+btPersistentManifold.lo: BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btPersistentManifold.lo -MD -MP -MF $(DEPDIR)/btPersistentManifold.Tpo -c -o btPersistentManifold.lo `test -f 'BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btPersistentManifold.Tpo $(DEPDIR)/btPersistentManifold.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp' object='btPersistentManifold.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btPersistentManifold.lo `test -f 'BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp
+
+btConvexCast.lo: BulletCollision/NarrowPhaseCollision/btConvexCast.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexCast.lo -MD -MP -MF $(DEPDIR)/btConvexCast.Tpo -c -o btConvexCast.lo `test -f 'BulletCollision/NarrowPhaseCollision/btConvexCast.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btConvexCast.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexCast.Tpo $(DEPDIR)/btConvexCast.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btConvexCast.cpp' object='btConvexCast.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexCast.lo `test -f 'BulletCollision/NarrowPhaseCollision/btConvexCast.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btConvexCast.cpp
+
+btPolyhedralContactClipping.lo: BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btPolyhedralContactClipping.lo -MD -MP -MF $(DEPDIR)/btPolyhedralContactClipping.Tpo -c -o btPolyhedralContactClipping.lo `test -f 'BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btPolyhedralContactClipping.Tpo $(DEPDIR)/btPolyhedralContactClipping.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp' object='btPolyhedralContactClipping.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btPolyhedralContactClipping.lo `test -f 'BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
+
+btContinuousConvexCollision.lo: BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btContinuousConvexCollision.lo -MD -MP -MF $(DEPDIR)/btContinuousConvexCollision.Tpo -c -o btContinuousConvexCollision.lo `test -f 'BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btContinuousConvexCollision.Tpo $(DEPDIR)/btContinuousConvexCollision.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp' object='btContinuousConvexCollision.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btContinuousConvexCollision.lo `test -f 'BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp
+
+btGjkPairDetector.lo: BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGjkPairDetector.lo -MD -MP -MF $(DEPDIR)/btGjkPairDetector.Tpo -c -o btGjkPairDetector.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGjkPairDetector.Tpo $(DEPDIR)/btGjkPairDetector.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp' object='btGjkPairDetector.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGjkPairDetector.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp
+
+btGjkEpa2.lo: BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGjkEpa2.lo -MD -MP -MF $(DEPDIR)/btGjkEpa2.Tpo -c -o btGjkEpa2.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGjkEpa2.Tpo $(DEPDIR)/btGjkEpa2.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp' object='btGjkEpa2.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGjkEpa2.lo `test -f 'BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp
+
+btVoronoiSimplexSolver.lo: BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btVoronoiSimplexSolver.lo -MD -MP -MF $(DEPDIR)/btVoronoiSimplexSolver.Tpo -c -o btVoronoiSimplexSolver.lo `test -f 'BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btVoronoiSimplexSolver.Tpo $(DEPDIR)/btVoronoiSimplexSolver.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp' object='btVoronoiSimplexSolver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btVoronoiSimplexSolver.lo `test -f 'BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp' || echo '$(srcdir)/'`BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
+
+btActivatingCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btActivatingCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btActivatingCollisionAlgorithm.Tpo -c -o btActivatingCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btActivatingCollisionAlgorithm.Tpo $(DEPDIR)/btActivatingCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp' object='btActivatingCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btActivatingCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp
+
+btCollisionObject.lo: BulletCollision/CollisionDispatch/btCollisionObject.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCollisionObject.lo -MD -MP -MF $(DEPDIR)/btCollisionObject.Tpo -c -o btCollisionObject.lo `test -f 'BulletCollision/CollisionDispatch/btCollisionObject.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCollisionObject.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCollisionObject.Tpo $(DEPDIR)/btCollisionObject.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btCollisionObject.cpp' object='btCollisionObject.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCollisionObject.lo `test -f 'BulletCollision/CollisionDispatch/btCollisionObject.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCollisionObject.cpp
+
+btEmptyCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btEmptyCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btEmptyCollisionAlgorithm.Tpo -c -o btEmptyCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btEmptyCollisionAlgorithm.Tpo $(DEPDIR)/btEmptyCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp' object='btEmptyCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btEmptyCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp
+
+btGhostObject.lo: BulletCollision/CollisionDispatch/btGhostObject.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGhostObject.lo -MD -MP -MF $(DEPDIR)/btGhostObject.Tpo -c -o btGhostObject.lo `test -f 'BulletCollision/CollisionDispatch/btGhostObject.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btGhostObject.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGhostObject.Tpo $(DEPDIR)/btGhostObject.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btGhostObject.cpp' object='btGhostObject.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGhostObject.lo `test -f 'BulletCollision/CollisionDispatch/btGhostObject.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btGhostObject.cpp
+
+btSphereSphereCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSphereSphereCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btSphereSphereCollisionAlgorithm.Tpo -c -o btSphereSphereCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSphereSphereCollisionAlgorithm.Tpo $(DEPDIR)/btSphereSphereCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp' object='btSphereSphereCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSphereSphereCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp
+
+btSphereBoxCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSphereBoxCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btSphereBoxCollisionAlgorithm.Tpo -c -o btSphereBoxCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSphereBoxCollisionAlgorithm.Tpo $(DEPDIR)/btSphereBoxCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp' object='btSphereBoxCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSphereBoxCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp
+
+btCollisionDispatcher.lo: BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCollisionDispatcher.lo -MD -MP -MF $(DEPDIR)/btCollisionDispatcher.Tpo -c -o btCollisionDispatcher.lo `test -f 'BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCollisionDispatcher.Tpo $(DEPDIR)/btCollisionDispatcher.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp' object='btCollisionDispatcher.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCollisionDispatcher.lo `test -f 'BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp
+
+btDefaultCollisionConfiguration.lo: BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btDefaultCollisionConfiguration.lo -MD -MP -MF $(DEPDIR)/btDefaultCollisionConfiguration.Tpo -c -o btDefaultCollisionConfiguration.lo `test -f 'BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btDefaultCollisionConfiguration.Tpo $(DEPDIR)/btDefaultCollisionConfiguration.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp' object='btDefaultCollisionConfiguration.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btDefaultCollisionConfiguration.lo `test -f 'BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp
+
+btSimulationIslandManager.lo: BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSimulationIslandManager.lo -MD -MP -MF $(DEPDIR)/btSimulationIslandManager.Tpo -c -o btSimulationIslandManager.lo `test -f 'BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSimulationIslandManager.Tpo $(DEPDIR)/btSimulationIslandManager.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp' object='btSimulationIslandManager.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSimulationIslandManager.lo `test -f 'BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp
+
+btBoxBoxDetector.lo: BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btBoxBoxDetector.lo -MD -MP -MF $(DEPDIR)/btBoxBoxDetector.Tpo -c -o btBoxBoxDetector.lo `test -f 'BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btBoxBoxDetector.Tpo $(DEPDIR)/btBoxBoxDetector.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp' object='btBoxBoxDetector.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btBoxBoxDetector.lo `test -f 'BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp
+
+btConvexPlaneCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexPlaneCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btConvexPlaneCollisionAlgorithm.Tpo -c -o btConvexPlaneCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexPlaneCollisionAlgorithm.Tpo $(DEPDIR)/btConvexPlaneCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp' object='btConvexPlaneCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexPlaneCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
+
+btConvexConcaveCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexConcaveCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btConvexConcaveCollisionAlgorithm.Tpo -c -o btConvexConcaveCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexConcaveCollisionAlgorithm.Tpo $(DEPDIR)/btConvexConcaveCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp' object='btConvexConcaveCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexConcaveCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp
+
+btBoxBoxCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btBoxBoxCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btBoxBoxCollisionAlgorithm.Tpo -c -o btBoxBoxCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btBoxBoxCollisionAlgorithm.Tpo $(DEPDIR)/btBoxBoxCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp' object='btBoxBoxCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btBoxBoxCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp
+
+btBox2dBox2dCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btBox2dBox2dCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btBox2dBox2dCollisionAlgorithm.Tpo -c -o btBox2dBox2dCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btBox2dBox2dCollisionAlgorithm.Tpo $(DEPDIR)/btBox2dBox2dCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp' object='btBox2dBox2dCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btBox2dBox2dCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp
+
+SphereTriangleDetector.lo: BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SphereTriangleDetector.lo -MD -MP -MF $(DEPDIR)/SphereTriangleDetector.Tpo -c -o SphereTriangleDetector.lo `test -f 'BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/SphereTriangleDetector.Tpo $(DEPDIR)/SphereTriangleDetector.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp' object='SphereTriangleDetector.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SphereTriangleDetector.lo `test -f 'BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp
+
+btInternalEdgeUtility.lo: BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btInternalEdgeUtility.lo -MD -MP -MF $(DEPDIR)/btInternalEdgeUtility.Tpo -c -o btInternalEdgeUtility.lo `test -f 'BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btInternalEdgeUtility.Tpo $(DEPDIR)/btInternalEdgeUtility.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp' object='btInternalEdgeUtility.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btInternalEdgeUtility.lo `test -f 'BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp
+
+btManifoldResult.lo: BulletCollision/CollisionDispatch/btManifoldResult.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btManifoldResult.lo -MD -MP -MF $(DEPDIR)/btManifoldResult.Tpo -c -o btManifoldResult.lo `test -f 'BulletCollision/CollisionDispatch/btManifoldResult.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btManifoldResult.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btManifoldResult.Tpo $(DEPDIR)/btManifoldResult.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btManifoldResult.cpp' object='btManifoldResult.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btManifoldResult.lo `test -f 'BulletCollision/CollisionDispatch/btManifoldResult.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btManifoldResult.cpp
+
+btCollisionWorld.lo: BulletCollision/CollisionDispatch/btCollisionWorld.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCollisionWorld.lo -MD -MP -MF $(DEPDIR)/btCollisionWorld.Tpo -c -o btCollisionWorld.lo `test -f 'BulletCollision/CollisionDispatch/btCollisionWorld.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCollisionWorld.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCollisionWorld.Tpo $(DEPDIR)/btCollisionWorld.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btCollisionWorld.cpp' object='btCollisionWorld.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCollisionWorld.lo `test -f 'BulletCollision/CollisionDispatch/btCollisionWorld.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCollisionWorld.cpp
+
+btSphereTriangleCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSphereTriangleCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btSphereTriangleCollisionAlgorithm.Tpo -c -o btSphereTriangleCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSphereTriangleCollisionAlgorithm.Tpo $(DEPDIR)/btSphereTriangleCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp' object='btSphereTriangleCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSphereTriangleCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp
+
+btConvexConvexAlgorithm.lo: BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexConvexAlgorithm.lo -MD -MP -MF $(DEPDIR)/btConvexConvexAlgorithm.Tpo -c -o btConvexConvexAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexConvexAlgorithm.Tpo $(DEPDIR)/btConvexConvexAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp' object='btConvexConvexAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexConvexAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
+
+btConvex2dConvex2dAlgorithm.lo: BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvex2dConvex2dAlgorithm.lo -MD -MP -MF $(DEPDIR)/btConvex2dConvex2dAlgorithm.Tpo -c -o btConvex2dConvex2dAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvex2dConvex2dAlgorithm.Tpo $(DEPDIR)/btConvex2dConvex2dAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp' object='btConvex2dConvex2dAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvex2dConvex2dAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp
+
+btUnionFind.lo: BulletCollision/CollisionDispatch/btUnionFind.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btUnionFind.lo -MD -MP -MF $(DEPDIR)/btUnionFind.Tpo -c -o btUnionFind.lo `test -f 'BulletCollision/CollisionDispatch/btUnionFind.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btUnionFind.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btUnionFind.Tpo $(DEPDIR)/btUnionFind.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btUnionFind.cpp' object='btUnionFind.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btUnionFind.lo `test -f 'BulletCollision/CollisionDispatch/btUnionFind.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btUnionFind.cpp
+
+btCompoundCollisionAlgorithm.lo: BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCompoundCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btCompoundCollisionAlgorithm.Tpo -c -o btCompoundCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCompoundCollisionAlgorithm.Tpo $(DEPDIR)/btCompoundCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp' object='btCompoundCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCompoundCollisionAlgorithm.lo `test -f 'BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp
+
+btTetrahedronShape.lo: BulletCollision/CollisionShapes/btTetrahedronShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTetrahedronShape.lo -MD -MP -MF $(DEPDIR)/btTetrahedronShape.Tpo -c -o btTetrahedronShape.lo `test -f 'BulletCollision/CollisionShapes/btTetrahedronShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTetrahedronShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTetrahedronShape.Tpo $(DEPDIR)/btTetrahedronShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btTetrahedronShape.cpp' object='btTetrahedronShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTetrahedronShape.lo `test -f 'BulletCollision/CollisionShapes/btTetrahedronShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTetrahedronShape.cpp
+
+btShapeHull.lo: BulletCollision/CollisionShapes/btShapeHull.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btShapeHull.lo -MD -MP -MF $(DEPDIR)/btShapeHull.Tpo -c -o btShapeHull.lo `test -f 'BulletCollision/CollisionShapes/btShapeHull.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btShapeHull.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btShapeHull.Tpo $(DEPDIR)/btShapeHull.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btShapeHull.cpp' object='btShapeHull.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btShapeHull.lo `test -f 'BulletCollision/CollisionShapes/btShapeHull.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btShapeHull.cpp
+
+btMinkowskiSumShape.lo: BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btMinkowskiSumShape.lo -MD -MP -MF $(DEPDIR)/btMinkowskiSumShape.Tpo -c -o btMinkowskiSumShape.lo `test -f 'BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btMinkowskiSumShape.Tpo $(DEPDIR)/btMinkowskiSumShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp' object='btMinkowskiSumShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btMinkowskiSumShape.lo `test -f 'BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp
+
+btCompoundShape.lo: BulletCollision/CollisionShapes/btCompoundShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCompoundShape.lo -MD -MP -MF $(DEPDIR)/btCompoundShape.Tpo -c -o btCompoundShape.lo `test -f 'BulletCollision/CollisionShapes/btCompoundShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCompoundShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCompoundShape.Tpo $(DEPDIR)/btCompoundShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btCompoundShape.cpp' object='btCompoundShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCompoundShape.lo `test -f 'BulletCollision/CollisionShapes/btCompoundShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCompoundShape.cpp
+
+btConeShape.lo: BulletCollision/CollisionShapes/btConeShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConeShape.lo -MD -MP -MF $(DEPDIR)/btConeShape.Tpo -c -o btConeShape.lo `test -f 'BulletCollision/CollisionShapes/btConeShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConeShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConeShape.Tpo $(DEPDIR)/btConeShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConeShape.cpp' object='btConeShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConeShape.lo `test -f 'BulletCollision/CollisionShapes/btConeShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConeShape.cpp
+
+btConvexPolyhedron.lo: BulletCollision/CollisionShapes/btConvexPolyhedron.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexPolyhedron.lo -MD -MP -MF $(DEPDIR)/btConvexPolyhedron.Tpo -c -o btConvexPolyhedron.lo `test -f 'BulletCollision/CollisionShapes/btConvexPolyhedron.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexPolyhedron.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexPolyhedron.Tpo $(DEPDIR)/btConvexPolyhedron.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConvexPolyhedron.cpp' object='btConvexPolyhedron.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexPolyhedron.lo `test -f 'BulletCollision/CollisionShapes/btConvexPolyhedron.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexPolyhedron.cpp
+
+btMultiSphereShape.lo: BulletCollision/CollisionShapes/btMultiSphereShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btMultiSphereShape.lo -MD -MP -MF $(DEPDIR)/btMultiSphereShape.Tpo -c -o btMultiSphereShape.lo `test -f 'BulletCollision/CollisionShapes/btMultiSphereShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btMultiSphereShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btMultiSphereShape.Tpo $(DEPDIR)/btMultiSphereShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btMultiSphereShape.cpp' object='btMultiSphereShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btMultiSphereShape.lo `test -f 'BulletCollision/CollisionShapes/btMultiSphereShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btMultiSphereShape.cpp
+
+btUniformScalingShape.lo: BulletCollision/CollisionShapes/btUniformScalingShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btUniformScalingShape.lo -MD -MP -MF $(DEPDIR)/btUniformScalingShape.Tpo -c -o btUniformScalingShape.lo `test -f 'BulletCollision/CollisionShapes/btUniformScalingShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btUniformScalingShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btUniformScalingShape.Tpo $(DEPDIR)/btUniformScalingShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btUniformScalingShape.cpp' object='btUniformScalingShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btUniformScalingShape.lo `test -f 'BulletCollision/CollisionShapes/btUniformScalingShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btUniformScalingShape.cpp
+
+btSphereShape.lo: BulletCollision/CollisionShapes/btSphereShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSphereShape.lo -MD -MP -MF $(DEPDIR)/btSphereShape.Tpo -c -o btSphereShape.lo `test -f 'BulletCollision/CollisionShapes/btSphereShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btSphereShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSphereShape.Tpo $(DEPDIR)/btSphereShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btSphereShape.cpp' object='btSphereShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSphereShape.lo `test -f 'BulletCollision/CollisionShapes/btSphereShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btSphereShape.cpp
+
+btTriangleIndexVertexArray.lo: BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTriangleIndexVertexArray.lo -MD -MP -MF $(DEPDIR)/btTriangleIndexVertexArray.Tpo -c -o btTriangleIndexVertexArray.lo `test -f 'BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTriangleIndexVertexArray.Tpo $(DEPDIR)/btTriangleIndexVertexArray.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp' object='btTriangleIndexVertexArray.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTriangleIndexVertexArray.lo `test -f 'BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp
+
+btBvhTriangleMeshShape.lo: BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btBvhTriangleMeshShape.lo -MD -MP -MF $(DEPDIR)/btBvhTriangleMeshShape.Tpo -c -o btBvhTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btBvhTriangleMeshShape.Tpo $(DEPDIR)/btBvhTriangleMeshShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp' object='btBvhTriangleMeshShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btBvhTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp
+
+btTriangleMeshShape.lo: BulletCollision/CollisionShapes/btTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTriangleMeshShape.lo -MD -MP -MF $(DEPDIR)/btTriangleMeshShape.Tpo -c -o btTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTriangleMeshShape.Tpo $(DEPDIR)/btTriangleMeshShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btTriangleMeshShape.cpp' object='btTriangleMeshShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleMeshShape.cpp
+
+btTriangleBuffer.lo: BulletCollision/CollisionShapes/btTriangleBuffer.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTriangleBuffer.lo -MD -MP -MF $(DEPDIR)/btTriangleBuffer.Tpo -c -o btTriangleBuffer.lo `test -f 'BulletCollision/CollisionShapes/btTriangleBuffer.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleBuffer.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTriangleBuffer.Tpo $(DEPDIR)/btTriangleBuffer.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btTriangleBuffer.cpp' object='btTriangleBuffer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTriangleBuffer.lo `test -f 'BulletCollision/CollisionShapes/btTriangleBuffer.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleBuffer.cpp
+
+btStaticPlaneShape.lo: BulletCollision/CollisionShapes/btStaticPlaneShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btStaticPlaneShape.lo -MD -MP -MF $(DEPDIR)/btStaticPlaneShape.Tpo -c -o btStaticPlaneShape.lo `test -f 'BulletCollision/CollisionShapes/btStaticPlaneShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btStaticPlaneShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btStaticPlaneShape.Tpo $(DEPDIR)/btStaticPlaneShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btStaticPlaneShape.cpp' object='btStaticPlaneShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btStaticPlaneShape.lo `test -f 'BulletCollision/CollisionShapes/btStaticPlaneShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btStaticPlaneShape.cpp
+
+btPolyhedralConvexShape.lo: BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btPolyhedralConvexShape.lo -MD -MP -MF $(DEPDIR)/btPolyhedralConvexShape.Tpo -c -o btPolyhedralConvexShape.lo `test -f 'BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btPolyhedralConvexShape.Tpo $(DEPDIR)/btPolyhedralConvexShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp' object='btPolyhedralConvexShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btPolyhedralConvexShape.lo `test -f 'BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
+
+btEmptyShape.lo: BulletCollision/CollisionShapes/btEmptyShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btEmptyShape.lo -MD -MP -MF $(DEPDIR)/btEmptyShape.Tpo -c -o btEmptyShape.lo `test -f 'BulletCollision/CollisionShapes/btEmptyShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btEmptyShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btEmptyShape.Tpo $(DEPDIR)/btEmptyShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btEmptyShape.cpp' object='btEmptyShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btEmptyShape.lo `test -f 'BulletCollision/CollisionShapes/btEmptyShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btEmptyShape.cpp
+
+btCollisionShape.lo: BulletCollision/CollisionShapes/btCollisionShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCollisionShape.lo -MD -MP -MF $(DEPDIR)/btCollisionShape.Tpo -c -o btCollisionShape.lo `test -f 'BulletCollision/CollisionShapes/btCollisionShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCollisionShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCollisionShape.Tpo $(DEPDIR)/btCollisionShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btCollisionShape.cpp' object='btCollisionShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCollisionShape.lo `test -f 'BulletCollision/CollisionShapes/btCollisionShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCollisionShape.cpp
+
+btConvexShape.lo: BulletCollision/CollisionShapes/btConvexShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexShape.lo -MD -MP -MF $(DEPDIR)/btConvexShape.Tpo -c -o btConvexShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexShape.Tpo $(DEPDIR)/btConvexShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConvexShape.cpp' object='btConvexShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexShape.cpp
+
+btConvex2dShape.lo: BulletCollision/CollisionShapes/btConvex2dShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvex2dShape.lo -MD -MP -MF $(DEPDIR)/btConvex2dShape.Tpo -c -o btConvex2dShape.lo `test -f 'BulletCollision/CollisionShapes/btConvex2dShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvex2dShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvex2dShape.Tpo $(DEPDIR)/btConvex2dShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConvex2dShape.cpp' object='btConvex2dShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvex2dShape.lo `test -f 'BulletCollision/CollisionShapes/btConvex2dShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvex2dShape.cpp
+
+btConvexInternalShape.lo: BulletCollision/CollisionShapes/btConvexInternalShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexInternalShape.lo -MD -MP -MF $(DEPDIR)/btConvexInternalShape.Tpo -c -o btConvexInternalShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexInternalShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexInternalShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexInternalShape.Tpo $(DEPDIR)/btConvexInternalShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConvexInternalShape.cpp' object='btConvexInternalShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexInternalShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexInternalShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexInternalShape.cpp
+
+btConvexHullShape.lo: BulletCollision/CollisionShapes/btConvexHullShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexHullShape.lo -MD -MP -MF $(DEPDIR)/btConvexHullShape.Tpo -c -o btConvexHullShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexHullShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexHullShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexHullShape.Tpo $(DEPDIR)/btConvexHullShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConvexHullShape.cpp' object='btConvexHullShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexHullShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexHullShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexHullShape.cpp
+
+btTriangleCallback.lo: BulletCollision/CollisionShapes/btTriangleCallback.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTriangleCallback.lo -MD -MP -MF $(DEPDIR)/btTriangleCallback.Tpo -c -o btTriangleCallback.lo `test -f 'BulletCollision/CollisionShapes/btTriangleCallback.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleCallback.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTriangleCallback.Tpo $(DEPDIR)/btTriangleCallback.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btTriangleCallback.cpp' object='btTriangleCallback.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTriangleCallback.lo `test -f 'BulletCollision/CollisionShapes/btTriangleCallback.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleCallback.cpp
+
+btCapsuleShape.lo: BulletCollision/CollisionShapes/btCapsuleShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCapsuleShape.lo -MD -MP -MF $(DEPDIR)/btCapsuleShape.Tpo -c -o btCapsuleShape.lo `test -f 'BulletCollision/CollisionShapes/btCapsuleShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCapsuleShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCapsuleShape.Tpo $(DEPDIR)/btCapsuleShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btCapsuleShape.cpp' object='btCapsuleShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCapsuleShape.lo `test -f 'BulletCollision/CollisionShapes/btCapsuleShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCapsuleShape.cpp
+
+btConvexTriangleMeshShape.lo: BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexTriangleMeshShape.lo -MD -MP -MF $(DEPDIR)/btConvexTriangleMeshShape.Tpo -c -o btConvexTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexTriangleMeshShape.Tpo $(DEPDIR)/btConvexTriangleMeshShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp' object='btConvexTriangleMeshShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp
+
+btConcaveShape.lo: BulletCollision/CollisionShapes/btConcaveShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConcaveShape.lo -MD -MP -MF $(DEPDIR)/btConcaveShape.Tpo -c -o btConcaveShape.lo `test -f 'BulletCollision/CollisionShapes/btConcaveShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConcaveShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConcaveShape.Tpo $(DEPDIR)/btConcaveShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConcaveShape.cpp' object='btConcaveShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConcaveShape.lo `test -f 'BulletCollision/CollisionShapes/btConcaveShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConcaveShape.cpp
+
+btConvexPointCloudShape.lo: BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexPointCloudShape.lo -MD -MP -MF $(DEPDIR)/btConvexPointCloudShape.Tpo -c -o btConvexPointCloudShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexPointCloudShape.Tpo $(DEPDIR)/btConvexPointCloudShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp' object='btConvexPointCloudShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexPointCloudShape.lo `test -f 'BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp
+
+btBoxShape.lo: BulletCollision/CollisionShapes/btBoxShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btBoxShape.lo -MD -MP -MF $(DEPDIR)/btBoxShape.Tpo -c -o btBoxShape.lo `test -f 'BulletCollision/CollisionShapes/btBoxShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btBoxShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btBoxShape.Tpo $(DEPDIR)/btBoxShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btBoxShape.cpp' object='btBoxShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btBoxShape.lo `test -f 'BulletCollision/CollisionShapes/btBoxShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btBoxShape.cpp
+
+btBox2dShape.lo: BulletCollision/CollisionShapes/btBox2dShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btBox2dShape.lo -MD -MP -MF $(DEPDIR)/btBox2dShape.Tpo -c -o btBox2dShape.lo `test -f 'BulletCollision/CollisionShapes/btBox2dShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btBox2dShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btBox2dShape.Tpo $(DEPDIR)/btBox2dShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btBox2dShape.cpp' object='btBox2dShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btBox2dShape.lo `test -f 'BulletCollision/CollisionShapes/btBox2dShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btBox2dShape.cpp
+
+btOptimizedBvh.lo: BulletCollision/CollisionShapes/btOptimizedBvh.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btOptimizedBvh.lo -MD -MP -MF $(DEPDIR)/btOptimizedBvh.Tpo -c -o btOptimizedBvh.lo `test -f 'BulletCollision/CollisionShapes/btOptimizedBvh.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btOptimizedBvh.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btOptimizedBvh.Tpo $(DEPDIR)/btOptimizedBvh.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btOptimizedBvh.cpp' object='btOptimizedBvh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btOptimizedBvh.lo `test -f 'BulletCollision/CollisionShapes/btOptimizedBvh.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btOptimizedBvh.cpp
+
+btHeightfieldTerrainShape.lo: BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btHeightfieldTerrainShape.lo -MD -MP -MF $(DEPDIR)/btHeightfieldTerrainShape.Tpo -c -o btHeightfieldTerrainShape.lo `test -f 'BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btHeightfieldTerrainShape.Tpo $(DEPDIR)/btHeightfieldTerrainShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp' object='btHeightfieldTerrainShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btHeightfieldTerrainShape.lo `test -f 'BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp
+
+btMultimaterialTriangleMeshShape.lo: BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btMultimaterialTriangleMeshShape.lo -MD -MP -MF $(DEPDIR)/btMultimaterialTriangleMeshShape.Tpo -c -o btMultimaterialTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btMultimaterialTriangleMeshShape.Tpo $(DEPDIR)/btMultimaterialTriangleMeshShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp' object='btMultimaterialTriangleMeshShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btMultimaterialTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp
+
+btCylinderShape.lo: BulletCollision/CollisionShapes/btCylinderShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCylinderShape.lo -MD -MP -MF $(DEPDIR)/btCylinderShape.Tpo -c -o btCylinderShape.lo `test -f 'BulletCollision/CollisionShapes/btCylinderShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCylinderShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCylinderShape.Tpo $(DEPDIR)/btCylinderShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btCylinderShape.cpp' object='btCylinderShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCylinderShape.lo `test -f 'BulletCollision/CollisionShapes/btCylinderShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btCylinderShape.cpp
+
+btScaledBvhTriangleMeshShape.lo: BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btScaledBvhTriangleMeshShape.lo -MD -MP -MF $(DEPDIR)/btScaledBvhTriangleMeshShape.Tpo -c -o btScaledBvhTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btScaledBvhTriangleMeshShape.Tpo $(DEPDIR)/btScaledBvhTriangleMeshShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp' object='btScaledBvhTriangleMeshShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btScaledBvhTriangleMeshShape.lo `test -f 'BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp
+
+btStridingMeshInterface.lo: BulletCollision/CollisionShapes/btStridingMeshInterface.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btStridingMeshInterface.lo -MD -MP -MF $(DEPDIR)/btStridingMeshInterface.Tpo -c -o btStridingMeshInterface.lo `test -f 'BulletCollision/CollisionShapes/btStridingMeshInterface.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btStridingMeshInterface.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btStridingMeshInterface.Tpo $(DEPDIR)/btStridingMeshInterface.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btStridingMeshInterface.cpp' object='btStridingMeshInterface.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btStridingMeshInterface.lo `test -f 'BulletCollision/CollisionShapes/btStridingMeshInterface.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btStridingMeshInterface.cpp
+
+btTriangleIndexVertexMaterialArray.lo: BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTriangleIndexVertexMaterialArray.lo -MD -MP -MF $(DEPDIR)/btTriangleIndexVertexMaterialArray.Tpo -c -o btTriangleIndexVertexMaterialArray.lo `test -f 'BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTriangleIndexVertexMaterialArray.Tpo $(DEPDIR)/btTriangleIndexVertexMaterialArray.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp' object='btTriangleIndexVertexMaterialArray.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTriangleIndexVertexMaterialArray.lo `test -f 'BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp
+
+btTriangleMesh.lo: BulletCollision/CollisionShapes/btTriangleMesh.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTriangleMesh.lo -MD -MP -MF $(DEPDIR)/btTriangleMesh.Tpo -c -o btTriangleMesh.lo `test -f 'BulletCollision/CollisionShapes/btTriangleMesh.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleMesh.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTriangleMesh.Tpo $(DEPDIR)/btTriangleMesh.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/CollisionShapes/btTriangleMesh.cpp' object='btTriangleMesh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTriangleMesh.lo `test -f 'BulletCollision/CollisionShapes/btTriangleMesh.cpp' || echo '$(srcdir)/'`BulletCollision/CollisionShapes/btTriangleMesh.cpp
+
+btAxisSweep3.lo: BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btAxisSweep3.lo -MD -MP -MF $(DEPDIR)/btAxisSweep3.Tpo -c -o btAxisSweep3.lo `test -f 'BulletCollision/BroadphaseCollision/btAxisSweep3.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btAxisSweep3.Tpo $(DEPDIR)/btAxisSweep3.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btAxisSweep3.cpp' object='btAxisSweep3.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btAxisSweep3.lo `test -f 'BulletCollision/BroadphaseCollision/btAxisSweep3.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btAxisSweep3.cpp
+
+btOverlappingPairCache.lo: BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btOverlappingPairCache.lo -MD -MP -MF $(DEPDIR)/btOverlappingPairCache.Tpo -c -o btOverlappingPairCache.lo `test -f 'BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btOverlappingPairCache.Tpo $(DEPDIR)/btOverlappingPairCache.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp' object='btOverlappingPairCache.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btOverlappingPairCache.lo `test -f 'BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp
+
+btDbvtBroadphase.lo: BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btDbvtBroadphase.lo -MD -MP -MF $(DEPDIR)/btDbvtBroadphase.Tpo -c -o btDbvtBroadphase.lo `test -f 'BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btDbvtBroadphase.Tpo $(DEPDIR)/btDbvtBroadphase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp' object='btDbvtBroadphase.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btDbvtBroadphase.lo `test -f 'BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp
+
+btMultiSapBroadphase.lo: BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btMultiSapBroadphase.lo -MD -MP -MF $(DEPDIR)/btMultiSapBroadphase.Tpo -c -o btMultiSapBroadphase.lo `test -f 'BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btMultiSapBroadphase.Tpo $(DEPDIR)/btMultiSapBroadphase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp' object='btMultiSapBroadphase.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btMultiSapBroadphase.lo `test -f 'BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btMultiSapBroadphase.cpp
+
+btDispatcher.lo: BulletCollision/BroadphaseCollision/btDispatcher.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btDispatcher.lo -MD -MP -MF $(DEPDIR)/btDispatcher.Tpo -c -o btDispatcher.lo `test -f 'BulletCollision/BroadphaseCollision/btDispatcher.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btDispatcher.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btDispatcher.Tpo $(DEPDIR)/btDispatcher.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btDispatcher.cpp' object='btDispatcher.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btDispatcher.lo `test -f 'BulletCollision/BroadphaseCollision/btDispatcher.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btDispatcher.cpp
+
+btBroadphaseProxy.lo: BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btBroadphaseProxy.lo -MD -MP -MF $(DEPDIR)/btBroadphaseProxy.Tpo -c -o btBroadphaseProxy.lo `test -f 'BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btBroadphaseProxy.Tpo $(DEPDIR)/btBroadphaseProxy.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp' object='btBroadphaseProxy.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btBroadphaseProxy.lo `test -f 'BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp
+
+btQuantizedBvh.lo: BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btQuantizedBvh.lo -MD -MP -MF $(DEPDIR)/btQuantizedBvh.Tpo -c -o btQuantizedBvh.lo `test -f 'BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btQuantizedBvh.Tpo $(DEPDIR)/btQuantizedBvh.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp' object='btQuantizedBvh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btQuantizedBvh.lo `test -f 'BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp
+
+btCollisionAlgorithm.lo: BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btCollisionAlgorithm.Tpo -c -o btCollisionAlgorithm.lo `test -f 'BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btCollisionAlgorithm.Tpo $(DEPDIR)/btCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp' object='btCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btCollisionAlgorithm.lo `test -f 'BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp
+
+btDbvt.lo: BulletCollision/BroadphaseCollision/btDbvt.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btDbvt.lo -MD -MP -MF $(DEPDIR)/btDbvt.Tpo -c -o btDbvt.lo `test -f 'BulletCollision/BroadphaseCollision/btDbvt.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btDbvt.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btDbvt.Tpo $(DEPDIR)/btDbvt.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btDbvt.cpp' object='btDbvt.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btDbvt.lo `test -f 'BulletCollision/BroadphaseCollision/btDbvt.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btDbvt.cpp
+
+btSimpleBroadphase.lo: BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSimpleBroadphase.lo -MD -MP -MF $(DEPDIR)/btSimpleBroadphase.Tpo -c -o btSimpleBroadphase.lo `test -f 'BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSimpleBroadphase.Tpo $(DEPDIR)/btSimpleBroadphase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp' object='btSimpleBroadphase.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSimpleBroadphase.lo `test -f 'BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp' || echo '$(srcdir)/'`BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp
+
+btGImpactBvh.lo: BulletCollision/Gimpact/btGImpactBvh.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGImpactBvh.lo -MD -MP -MF $(DEPDIR)/btGImpactBvh.Tpo -c -o btGImpactBvh.lo `test -f 'BulletCollision/Gimpact/btGImpactBvh.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactBvh.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGImpactBvh.Tpo $(DEPDIR)/btGImpactBvh.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/btGImpactBvh.cpp' object='btGImpactBvh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGImpactBvh.lo `test -f 'BulletCollision/Gimpact/btGImpactBvh.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactBvh.cpp
+
+btGImpactQuantizedBvh.lo: BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGImpactQuantizedBvh.lo -MD -MP -MF $(DEPDIR)/btGImpactQuantizedBvh.Tpo -c -o btGImpactQuantizedBvh.lo `test -f 'BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGImpactQuantizedBvh.Tpo $(DEPDIR)/btGImpactQuantizedBvh.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp' object='btGImpactQuantizedBvh.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGImpactQuantizedBvh.lo `test -f 'BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp
+
+btTriangleShapeEx.lo: BulletCollision/Gimpact/btTriangleShapeEx.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTriangleShapeEx.lo -MD -MP -MF $(DEPDIR)/btTriangleShapeEx.Tpo -c -o btTriangleShapeEx.lo `test -f 'BulletCollision/Gimpact/btTriangleShapeEx.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btTriangleShapeEx.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTriangleShapeEx.Tpo $(DEPDIR)/btTriangleShapeEx.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/btTriangleShapeEx.cpp' object='btTriangleShapeEx.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTriangleShapeEx.lo `test -f 'BulletCollision/Gimpact/btTriangleShapeEx.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btTriangleShapeEx.cpp
+
+btGImpactCollisionAlgorithm.lo: BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGImpactCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btGImpactCollisionAlgorithm.Tpo -c -o btGImpactCollisionAlgorithm.lo `test -f 'BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGImpactCollisionAlgorithm.Tpo $(DEPDIR)/btGImpactCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp' object='btGImpactCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGImpactCollisionAlgorithm.lo `test -f 'BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp
+
+btGImpactShape.lo: BulletCollision/Gimpact/btGImpactShape.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGImpactShape.lo -MD -MP -MF $(DEPDIR)/btGImpactShape.Tpo -c -o btGImpactShape.lo `test -f 'BulletCollision/Gimpact/btGImpactShape.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactShape.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGImpactShape.Tpo $(DEPDIR)/btGImpactShape.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/btGImpactShape.cpp' object='btGImpactShape.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGImpactShape.lo `test -f 'BulletCollision/Gimpact/btGImpactShape.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/btGImpactShape.cpp
+
+gim_box_set.lo: BulletCollision/Gimpact/gim_box_set.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gim_box_set.lo -MD -MP -MF $(DEPDIR)/gim_box_set.Tpo -c -o gim_box_set.lo `test -f 'BulletCollision/Gimpact/gim_box_set.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_box_set.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gim_box_set.Tpo $(DEPDIR)/gim_box_set.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/gim_box_set.cpp' object='gim_box_set.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gim_box_set.lo `test -f 'BulletCollision/Gimpact/gim_box_set.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_box_set.cpp
+
+gim_contact.lo: BulletCollision/Gimpact/gim_contact.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gim_contact.lo -MD -MP -MF $(DEPDIR)/gim_contact.Tpo -c -o gim_contact.lo `test -f 'BulletCollision/Gimpact/gim_contact.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_contact.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gim_contact.Tpo $(DEPDIR)/gim_contact.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/gim_contact.cpp' object='gim_contact.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gim_contact.lo `test -f 'BulletCollision/Gimpact/gim_contact.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_contact.cpp
+
+gim_memory.lo: BulletCollision/Gimpact/gim_memory.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gim_memory.lo -MD -MP -MF $(DEPDIR)/gim_memory.Tpo -c -o gim_memory.lo `test -f 'BulletCollision/Gimpact/gim_memory.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_memory.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gim_memory.Tpo $(DEPDIR)/gim_memory.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/gim_memory.cpp' object='gim_memory.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gim_memory.lo `test -f 'BulletCollision/Gimpact/gim_memory.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_memory.cpp
+
+gim_tri_collision.lo: BulletCollision/Gimpact/gim_tri_collision.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT gim_tri_collision.lo -MD -MP -MF $(DEPDIR)/gim_tri_collision.Tpo -c -o gim_tri_collision.lo `test -f 'BulletCollision/Gimpact/gim_tri_collision.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_tri_collision.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/gim_tri_collision.Tpo $(DEPDIR)/gim_tri_collision.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletCollision/Gimpact/gim_tri_collision.cpp' object='gim_tri_collision.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o gim_tri_collision.lo `test -f 'BulletCollision/Gimpact/gim_tri_collision.cpp' || echo '$(srcdir)/'`BulletCollision/Gimpact/gim_tri_collision.cpp
+
+btContinuousDynamicsWorld.lo: BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btContinuousDynamicsWorld.lo -MD -MP -MF $(DEPDIR)/btContinuousDynamicsWorld.Tpo -c -o btContinuousDynamicsWorld.lo `test -f 'BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btContinuousDynamicsWorld.Tpo $(DEPDIR)/btContinuousDynamicsWorld.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp' object='btContinuousDynamicsWorld.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btContinuousDynamicsWorld.lo `test -f 'BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btContinuousDynamicsWorld.cpp
+
+btRigidBody.lo: BulletDynamics/Dynamics/btRigidBody.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btRigidBody.lo -MD -MP -MF $(DEPDIR)/btRigidBody.Tpo -c -o btRigidBody.lo `test -f 'BulletDynamics/Dynamics/btRigidBody.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btRigidBody.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btRigidBody.Tpo $(DEPDIR)/btRigidBody.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Dynamics/btRigidBody.cpp' object='btRigidBody.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btRigidBody.lo `test -f 'BulletDynamics/Dynamics/btRigidBody.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btRigidBody.cpp
+
+btSimpleDynamicsWorld.lo: BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSimpleDynamicsWorld.lo -MD -MP -MF $(DEPDIR)/btSimpleDynamicsWorld.Tpo -c -o btSimpleDynamicsWorld.lo `test -f 'BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSimpleDynamicsWorld.Tpo $(DEPDIR)/btSimpleDynamicsWorld.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp' object='btSimpleDynamicsWorld.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSimpleDynamicsWorld.lo `test -f 'BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp
+
+Bullet-C-API.lo: BulletDynamics/Dynamics/Bullet-C-API.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Bullet-C-API.lo -MD -MP -MF $(DEPDIR)/Bullet-C-API.Tpo -c -o Bullet-C-API.lo `test -f 'BulletDynamics/Dynamics/Bullet-C-API.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/Bullet-C-API.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/Bullet-C-API.Tpo $(DEPDIR)/Bullet-C-API.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Dynamics/Bullet-C-API.cpp' object='Bullet-C-API.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Bullet-C-API.lo `test -f 'BulletDynamics/Dynamics/Bullet-C-API.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/Bullet-C-API.cpp
+
+btDiscreteDynamicsWorld.lo: BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btDiscreteDynamicsWorld.lo -MD -MP -MF $(DEPDIR)/btDiscreteDynamicsWorld.Tpo -c -o btDiscreteDynamicsWorld.lo `test -f 'BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btDiscreteDynamicsWorld.Tpo $(DEPDIR)/btDiscreteDynamicsWorld.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp' object='btDiscreteDynamicsWorld.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btDiscreteDynamicsWorld.lo `test -f 'BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp
+
+btGeneric6DofConstraint.lo: BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGeneric6DofConstraint.lo -MD -MP -MF $(DEPDIR)/btGeneric6DofConstraint.Tpo -c -o btGeneric6DofConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGeneric6DofConstraint.Tpo $(DEPDIR)/btGeneric6DofConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp' object='btGeneric6DofConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGeneric6DofConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp
+
+btGeneric6DofSpringConstraint.lo: BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGeneric6DofSpringConstraint.lo -MD -MP -MF $(DEPDIR)/btGeneric6DofSpringConstraint.Tpo -c -o btGeneric6DofSpringConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGeneric6DofSpringConstraint.Tpo $(DEPDIR)/btGeneric6DofSpringConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp' object='btGeneric6DofSpringConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGeneric6DofSpringConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp
+
+btSolve2LinearConstraint.lo: BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSolve2LinearConstraint.lo -MD -MP -MF $(DEPDIR)/btSolve2LinearConstraint.Tpo -c -o btSolve2LinearConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSolve2LinearConstraint.Tpo $(DEPDIR)/btSolve2LinearConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp' object='btSolve2LinearConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSolve2LinearConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp
+
+btPoint2PointConstraint.lo: BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btPoint2PointConstraint.lo -MD -MP -MF $(DEPDIR)/btPoint2PointConstraint.Tpo -c -o btPoint2PointConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btPoint2PointConstraint.Tpo $(DEPDIR)/btPoint2PointConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp' object='btPoint2PointConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btPoint2PointConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp
+
+btTypedConstraint.lo: BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btTypedConstraint.lo -MD -MP -MF $(DEPDIR)/btTypedConstraint.Tpo -c -o btTypedConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btTypedConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btTypedConstraint.Tpo $(DEPDIR)/btTypedConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btTypedConstraint.cpp' object='btTypedConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btTypedConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btTypedConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btTypedConstraint.cpp
+
+btContactConstraint.lo: BulletDynamics/ConstraintSolver/btContactConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btContactConstraint.lo -MD -MP -MF $(DEPDIR)/btContactConstraint.Tpo -c -o btContactConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btContactConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btContactConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btContactConstraint.Tpo $(DEPDIR)/btContactConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btContactConstraint.cpp' object='btContactConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btContactConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btContactConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btContactConstraint.cpp
+
+btSliderConstraint.lo: BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSliderConstraint.lo -MD -MP -MF $(DEPDIR)/btSliderConstraint.Tpo -c -o btSliderConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btSliderConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSliderConstraint.Tpo $(DEPDIR)/btSliderConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btSliderConstraint.cpp' object='btSliderConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSliderConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btSliderConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btSliderConstraint.cpp
+
+btConeTwistConstraint.lo: BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConeTwistConstraint.lo -MD -MP -MF $(DEPDIR)/btConeTwistConstraint.Tpo -c -o btConeTwistConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConeTwistConstraint.Tpo $(DEPDIR)/btConeTwistConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp' object='btConeTwistConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConeTwistConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
+
+btHingeConstraint.lo: BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btHingeConstraint.lo -MD -MP -MF $(DEPDIR)/btHingeConstraint.Tpo -c -o btHingeConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btHingeConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btHingeConstraint.Tpo $(DEPDIR)/btHingeConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btHingeConstraint.cpp' object='btHingeConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btHingeConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btHingeConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
+
+btHinge2Constraint.lo: BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btHinge2Constraint.lo -MD -MP -MF $(DEPDIR)/btHinge2Constraint.Tpo -c -o btHinge2Constraint.lo `test -f 'BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btHinge2Constraint.Tpo $(DEPDIR)/btHinge2Constraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp' object='btHinge2Constraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btHinge2Constraint.lo `test -f 'BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp
+
+btUniversalConstraint.lo: BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btUniversalConstraint.lo -MD -MP -MF $(DEPDIR)/btUniversalConstraint.Tpo -c -o btUniversalConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btUniversalConstraint.Tpo $(DEPDIR)/btUniversalConstraint.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp' object='btUniversalConstraint.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btUniversalConstraint.lo `test -f 'BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp
+
+btSequentialImpulseConstraintSolver.lo: BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSequentialImpulseConstraintSolver.lo -MD -MP -MF $(DEPDIR)/btSequentialImpulseConstraintSolver.Tpo -c -o btSequentialImpulseConstraintSolver.lo `test -f 'BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSequentialImpulseConstraintSolver.Tpo $(DEPDIR)/btSequentialImpulseConstraintSolver.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp' object='btSequentialImpulseConstraintSolver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSequentialImpulseConstraintSolver.lo `test -f 'BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp' || echo '$(srcdir)/'`BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
+
+btWheelInfo.lo: BulletDynamics/Vehicle/btWheelInfo.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btWheelInfo.lo -MD -MP -MF $(DEPDIR)/btWheelInfo.Tpo -c -o btWheelInfo.lo `test -f 'BulletDynamics/Vehicle/btWheelInfo.cpp' || echo '$(srcdir)/'`BulletDynamics/Vehicle/btWheelInfo.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btWheelInfo.Tpo $(DEPDIR)/btWheelInfo.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Vehicle/btWheelInfo.cpp' object='btWheelInfo.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btWheelInfo.lo `test -f 'BulletDynamics/Vehicle/btWheelInfo.cpp' || echo '$(srcdir)/'`BulletDynamics/Vehicle/btWheelInfo.cpp
+
+btRaycastVehicle.lo: BulletDynamics/Vehicle/btRaycastVehicle.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btRaycastVehicle.lo -MD -MP -MF $(DEPDIR)/btRaycastVehicle.Tpo -c -o btRaycastVehicle.lo `test -f 'BulletDynamics/Vehicle/btRaycastVehicle.cpp' || echo '$(srcdir)/'`BulletDynamics/Vehicle/btRaycastVehicle.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btRaycastVehicle.Tpo $(DEPDIR)/btRaycastVehicle.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Vehicle/btRaycastVehicle.cpp' object='btRaycastVehicle.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btRaycastVehicle.lo `test -f 'BulletDynamics/Vehicle/btRaycastVehicle.cpp' || echo '$(srcdir)/'`BulletDynamics/Vehicle/btRaycastVehicle.cpp
+
+btKinematicCharacterController.lo: BulletDynamics/Character/btKinematicCharacterController.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btKinematicCharacterController.lo -MD -MP -MF $(DEPDIR)/btKinematicCharacterController.Tpo -c -o btKinematicCharacterController.lo `test -f 'BulletDynamics/Character/btKinematicCharacterController.cpp' || echo '$(srcdir)/'`BulletDynamics/Character/btKinematicCharacterController.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btKinematicCharacterController.Tpo $(DEPDIR)/btKinematicCharacterController.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletDynamics/Character/btKinematicCharacterController.cpp' object='btKinematicCharacterController.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btKinematicCharacterController.lo `test -f 'BulletDynamics/Character/btKinematicCharacterController.cpp' || echo '$(srcdir)/'`BulletDynamics/Character/btKinematicCharacterController.cpp
+
+libBulletMultiThreaded_la-SpuCollisionObjectWrapper.lo: BulletMultiThreaded/SpuCollisionObjectWrapper.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuCollisionObjectWrapper.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionObjectWrapper.Tpo -c -o libBulletMultiThreaded_la-SpuCollisionObjectWrapper.lo `test -f 'BulletMultiThreaded/SpuCollisionObjectWrapper.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuCollisionObjectWrapper.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionObjectWrapper.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionObjectWrapper.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuCollisionObjectWrapper.cpp' object='libBulletMultiThreaded_la-SpuCollisionObjectWrapper.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuCollisionObjectWrapper.lo `test -f 'BulletMultiThreaded/SpuCollisionObjectWrapper.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuCollisionObjectWrapper.cpp
+
+libBulletMultiThreaded_la-SpuSampleTask.lo: BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuSampleTask.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTask.Tpo -c -o libBulletMultiThreaded_la-SpuSampleTask.lo `test -f 'BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTask.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTask.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp' object='libBulletMultiThreaded_la-SpuSampleTask.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuSampleTask.lo `test -f 'BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuSampleTask/SpuSampleTask.cpp
+
+libBulletMultiThreaded_la-SpuLibspe2Support.lo: BulletMultiThreaded/SpuLibspe2Support.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuLibspe2Support.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuLibspe2Support.Tpo -c -o libBulletMultiThreaded_la-SpuLibspe2Support.lo `test -f 'BulletMultiThreaded/SpuLibspe2Support.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuLibspe2Support.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuLibspe2Support.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuLibspe2Support.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuLibspe2Support.cpp' object='libBulletMultiThreaded_la-SpuLibspe2Support.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuLibspe2Support.lo `test -f 'BulletMultiThreaded/SpuLibspe2Support.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuLibspe2Support.cpp
+
+libBulletMultiThreaded_la-SpuContactResult.lo: BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuContactResult.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuContactResult.Tpo -c -o libBulletMultiThreaded_la-SpuContactResult.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuContactResult.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuContactResult.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp' object='libBulletMultiThreaded_la-SpuContactResult.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuContactResult.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuContactResult.cpp
+
+libBulletMultiThreaded_la-SpuGatheringCollisionTask.lo: BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuGatheringCollisionTask.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionTask.Tpo -c -o libBulletMultiThreaded_la-SpuGatheringCollisionTask.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionTask.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionTask.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp' object='libBulletMultiThreaded_la-SpuGatheringCollisionTask.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuGatheringCollisionTask.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.cpp
+
+libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.lo: BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.Tpo -c -o libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp' object='libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuMinkowskiPenetrationDepthSolver.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuMinkowskiPenetrationDepthSolver.cpp
+
+libBulletMultiThreaded_la-SpuCollisionShapes.lo: BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuCollisionShapes.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionShapes.Tpo -c -o libBulletMultiThreaded_la-SpuCollisionShapes.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionShapes.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionShapes.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp' object='libBulletMultiThreaded_la-SpuCollisionShapes.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuCollisionShapes.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/SpuCollisionShapes.cpp
+
+libBulletMultiThreaded_la-btThreadSupportInterface.lo: BulletMultiThreaded/btThreadSupportInterface.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-btThreadSupportInterface.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-btThreadSupportInterface.Tpo -c -o libBulletMultiThreaded_la-btThreadSupportInterface.lo `test -f 'BulletMultiThreaded/btThreadSupportInterface.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/btThreadSupportInterface.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-btThreadSupportInterface.Tpo $(DEPDIR)/libBulletMultiThreaded_la-btThreadSupportInterface.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/btThreadSupportInterface.cpp' object='libBulletMultiThreaded_la-btThreadSupportInterface.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-btThreadSupportInterface.lo `test -f 'BulletMultiThreaded/btThreadSupportInterface.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/btThreadSupportInterface.cpp
+
+libBulletMultiThreaded_la-SequentialThreadSupport.lo: BulletMultiThreaded/SequentialThreadSupport.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SequentialThreadSupport.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SequentialThreadSupport.Tpo -c -o libBulletMultiThreaded_la-SequentialThreadSupport.lo `test -f 'BulletMultiThreaded/SequentialThreadSupport.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SequentialThreadSupport.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SequentialThreadSupport.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SequentialThreadSupport.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SequentialThreadSupport.cpp' object='libBulletMultiThreaded_la-SequentialThreadSupport.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SequentialThreadSupport.lo `test -f 'BulletMultiThreaded/SequentialThreadSupport.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SequentialThreadSupport.cpp
+
+libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.lo: BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.Tpo -c -o libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.lo `test -f 'BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp' object='libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuGatheringCollisionDispatcher.lo `test -f 'BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuGatheringCollisionDispatcher.cpp
+
+libBulletMultiThreaded_la-Win32ThreadSupport.lo: BulletMultiThreaded/Win32ThreadSupport.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-Win32ThreadSupport.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-Win32ThreadSupport.Tpo -c -o libBulletMultiThreaded_la-Win32ThreadSupport.lo `test -f 'BulletMultiThreaded/Win32ThreadSupport.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/Win32ThreadSupport.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-Win32ThreadSupport.Tpo $(DEPDIR)/libBulletMultiThreaded_la-Win32ThreadSupport.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/Win32ThreadSupport.cpp' object='libBulletMultiThreaded_la-Win32ThreadSupport.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-Win32ThreadSupport.lo `test -f 'BulletMultiThreaded/Win32ThreadSupport.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/Win32ThreadSupport.cpp
+
+libBulletMultiThreaded_la-SpuFakeDma.lo: BulletMultiThreaded/SpuFakeDma.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuFakeDma.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuFakeDma.Tpo -c -o libBulletMultiThreaded_la-SpuFakeDma.lo `test -f 'BulletMultiThreaded/SpuFakeDma.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuFakeDma.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuFakeDma.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuFakeDma.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuFakeDma.cpp' object='libBulletMultiThreaded_la-SpuFakeDma.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuFakeDma.lo `test -f 'BulletMultiThreaded/SpuFakeDma.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuFakeDma.cpp
+
+libBulletMultiThreaded_la-PosixThreadSupport.lo: BulletMultiThreaded/PosixThreadSupport.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-PosixThreadSupport.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-PosixThreadSupport.Tpo -c -o libBulletMultiThreaded_la-PosixThreadSupport.lo `test -f 'BulletMultiThreaded/PosixThreadSupport.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/PosixThreadSupport.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-PosixThreadSupport.Tpo $(DEPDIR)/libBulletMultiThreaded_la-PosixThreadSupport.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/PosixThreadSupport.cpp' object='libBulletMultiThreaded_la-PosixThreadSupport.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-PosixThreadSupport.lo `test -f 'BulletMultiThreaded/PosixThreadSupport.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/PosixThreadSupport.cpp
+
+libBulletMultiThreaded_la-SpuCollisionTaskProcess.lo: BulletMultiThreaded/SpuCollisionTaskProcess.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuCollisionTaskProcess.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionTaskProcess.Tpo -c -o libBulletMultiThreaded_la-SpuCollisionTaskProcess.lo `test -f 'BulletMultiThreaded/SpuCollisionTaskProcess.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuCollisionTaskProcess.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionTaskProcess.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuCollisionTaskProcess.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuCollisionTaskProcess.cpp' object='libBulletMultiThreaded_la-SpuCollisionTaskProcess.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuCollisionTaskProcess.lo `test -f 'BulletMultiThreaded/SpuCollisionTaskProcess.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuCollisionTaskProcess.cpp
+
+libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.lo: BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.Tpo -c -o libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.lo `test -f 'BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp' object='libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuContactManifoldCollisionAlgorithm.lo `test -f 'BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuContactManifoldCollisionAlgorithm.cpp
+
+libBulletMultiThreaded_la-SpuSampleTaskProcess.lo: BulletMultiThreaded/SpuSampleTaskProcess.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-SpuSampleTaskProcess.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTaskProcess.Tpo -c -o libBulletMultiThreaded_la-SpuSampleTaskProcess.lo `test -f 'BulletMultiThreaded/SpuSampleTaskProcess.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuSampleTaskProcess.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTaskProcess.Tpo $(DEPDIR)/libBulletMultiThreaded_la-SpuSampleTaskProcess.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuSampleTaskProcess.cpp' object='libBulletMultiThreaded_la-SpuSampleTaskProcess.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-SpuSampleTaskProcess.lo `test -f 'BulletMultiThreaded/SpuSampleTaskProcess.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuSampleTaskProcess.cpp
+
+libBulletMultiThreaded_la-boxBoxDistance.lo: BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -MT libBulletMultiThreaded_la-boxBoxDistance.lo -MD -MP -MF $(DEPDIR)/libBulletMultiThreaded_la-boxBoxDistance.Tpo -c -o libBulletMultiThreaded_la-boxBoxDistance.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libBulletMultiThreaded_la-boxBoxDistance.Tpo $(DEPDIR)/libBulletMultiThreaded_la-boxBoxDistance.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp' object='libBulletMultiThreaded_la-boxBoxDistance.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libBulletMultiThreaded_la_CXXFLAGS) $(CXXFLAGS) -c -o libBulletMultiThreaded_la-boxBoxDistance.lo `test -f 'BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp' || echo '$(srcdir)/'`BulletMultiThreaded/SpuNarrowPhaseCollisionTask/boxBoxDistance.cpp
+
+btDefaultSoftBodySolver.lo: BulletSoftBody/btDefaultSoftBodySolver.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btDefaultSoftBodySolver.lo -MD -MP -MF $(DEPDIR)/btDefaultSoftBodySolver.Tpo -c -o btDefaultSoftBodySolver.lo `test -f 'BulletSoftBody/btDefaultSoftBodySolver.cpp' || echo '$(srcdir)/'`BulletSoftBody/btDefaultSoftBodySolver.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btDefaultSoftBodySolver.Tpo $(DEPDIR)/btDefaultSoftBodySolver.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btDefaultSoftBodySolver.cpp' object='btDefaultSoftBodySolver.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btDefaultSoftBodySolver.lo `test -f 'BulletSoftBody/btDefaultSoftBodySolver.cpp' || echo '$(srcdir)/'`BulletSoftBody/btDefaultSoftBodySolver.cpp
+
+btSoftBodyRigidBodyCollisionConfiguration.lo: BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSoftBodyRigidBodyCollisionConfiguration.lo -MD -MP -MF $(DEPDIR)/btSoftBodyRigidBodyCollisionConfiguration.Tpo -c -o btSoftBodyRigidBodyCollisionConfiguration.lo `test -f 'BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSoftBodyRigidBodyCollisionConfiguration.Tpo $(DEPDIR)/btSoftBodyRigidBodyCollisionConfiguration.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp' object='btSoftBodyRigidBodyCollisionConfiguration.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSoftBodyRigidBodyCollisionConfiguration.lo `test -f 'BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp
+
+btSoftBody.lo: BulletSoftBody/btSoftBody.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSoftBody.lo -MD -MP -MF $(DEPDIR)/btSoftBody.Tpo -c -o btSoftBody.lo `test -f 'BulletSoftBody/btSoftBody.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBody.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSoftBody.Tpo $(DEPDIR)/btSoftBody.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btSoftBody.cpp' object='btSoftBody.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSoftBody.lo `test -f 'BulletSoftBody/btSoftBody.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBody.cpp
+
+btSoftRigidCollisionAlgorithm.lo: BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSoftRigidCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btSoftRigidCollisionAlgorithm.Tpo -c -o btSoftRigidCollisionAlgorithm.lo `test -f 'BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSoftRigidCollisionAlgorithm.Tpo $(DEPDIR)/btSoftRigidCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp' object='btSoftRigidCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSoftRigidCollisionAlgorithm.lo `test -f 'BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp
+
+btSoftBodyConcaveCollisionAlgorithm.lo: BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSoftBodyConcaveCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btSoftBodyConcaveCollisionAlgorithm.Tpo -c -o btSoftBodyConcaveCollisionAlgorithm.lo `test -f 'BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSoftBodyConcaveCollisionAlgorithm.Tpo $(DEPDIR)/btSoftBodyConcaveCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp' object='btSoftBodyConcaveCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSoftBodyConcaveCollisionAlgorithm.lo `test -f 'BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp
+
+btSoftRigidDynamicsWorld.lo: BulletSoftBody/btSoftRigidDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSoftRigidDynamicsWorld.lo -MD -MP -MF $(DEPDIR)/btSoftRigidDynamicsWorld.Tpo -c -o btSoftRigidDynamicsWorld.lo `test -f 'BulletSoftBody/btSoftRigidDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftRigidDynamicsWorld.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSoftRigidDynamicsWorld.Tpo $(DEPDIR)/btSoftRigidDynamicsWorld.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btSoftRigidDynamicsWorld.cpp' object='btSoftRigidDynamicsWorld.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSoftRigidDynamicsWorld.lo `test -f 'BulletSoftBody/btSoftRigidDynamicsWorld.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftRigidDynamicsWorld.cpp
+
+btSoftBodyHelpers.lo: BulletSoftBody/btSoftBodyHelpers.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSoftBodyHelpers.lo -MD -MP -MF $(DEPDIR)/btSoftBodyHelpers.Tpo -c -o btSoftBodyHelpers.lo `test -f 'BulletSoftBody/btSoftBodyHelpers.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBodyHelpers.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSoftBodyHelpers.Tpo $(DEPDIR)/btSoftBodyHelpers.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btSoftBodyHelpers.cpp' object='btSoftBodyHelpers.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSoftBodyHelpers.lo `test -f 'BulletSoftBody/btSoftBodyHelpers.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftBodyHelpers.cpp
+
+btSoftSoftCollisionAlgorithm.lo: BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSoftSoftCollisionAlgorithm.lo -MD -MP -MF $(DEPDIR)/btSoftSoftCollisionAlgorithm.Tpo -c -o btSoftSoftCollisionAlgorithm.lo `test -f 'BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSoftSoftCollisionAlgorithm.Tpo $(DEPDIR)/btSoftSoftCollisionAlgorithm.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp' object='btSoftSoftCollisionAlgorithm.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSoftSoftCollisionAlgorithm.lo `test -f 'BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp' || echo '$(srcdir)/'`BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp
+
+btQuickprof.lo: LinearMath/btQuickprof.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btQuickprof.lo -MD -MP -MF $(DEPDIR)/btQuickprof.Tpo -c -o btQuickprof.lo `test -f 'LinearMath/btQuickprof.cpp' || echo '$(srcdir)/'`LinearMath/btQuickprof.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btQuickprof.Tpo $(DEPDIR)/btQuickprof.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='LinearMath/btQuickprof.cpp' object='btQuickprof.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btQuickprof.lo `test -f 'LinearMath/btQuickprof.cpp' || echo '$(srcdir)/'`LinearMath/btQuickprof.cpp
+
+btGeometryUtil.lo: LinearMath/btGeometryUtil.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btGeometryUtil.lo -MD -MP -MF $(DEPDIR)/btGeometryUtil.Tpo -c -o btGeometryUtil.lo `test -f 'LinearMath/btGeometryUtil.cpp' || echo '$(srcdir)/'`LinearMath/btGeometryUtil.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btGeometryUtil.Tpo $(DEPDIR)/btGeometryUtil.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='LinearMath/btGeometryUtil.cpp' object='btGeometryUtil.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btGeometryUtil.lo `test -f 'LinearMath/btGeometryUtil.cpp' || echo '$(srcdir)/'`LinearMath/btGeometryUtil.cpp
+
+btAlignedAllocator.lo: LinearMath/btAlignedAllocator.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btAlignedAllocator.lo -MD -MP -MF $(DEPDIR)/btAlignedAllocator.Tpo -c -o btAlignedAllocator.lo `test -f 'LinearMath/btAlignedAllocator.cpp' || echo '$(srcdir)/'`LinearMath/btAlignedAllocator.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btAlignedAllocator.Tpo $(DEPDIR)/btAlignedAllocator.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='LinearMath/btAlignedAllocator.cpp' object='btAlignedAllocator.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btAlignedAllocator.lo `test -f 'LinearMath/btAlignedAllocator.cpp' || echo '$(srcdir)/'`LinearMath/btAlignedAllocator.cpp
+
+btSerializer.lo: LinearMath/btSerializer.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btSerializer.lo -MD -MP -MF $(DEPDIR)/btSerializer.Tpo -c -o btSerializer.lo `test -f 'LinearMath/btSerializer.cpp' || echo '$(srcdir)/'`LinearMath/btSerializer.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btSerializer.Tpo $(DEPDIR)/btSerializer.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='LinearMath/btSerializer.cpp' object='btSerializer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btSerializer.lo `test -f 'LinearMath/btSerializer.cpp' || echo '$(srcdir)/'`LinearMath/btSerializer.cpp
+
+btConvexHull.lo: LinearMath/btConvexHull.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexHull.lo -MD -MP -MF $(DEPDIR)/btConvexHull.Tpo -c -o btConvexHull.lo `test -f 'LinearMath/btConvexHull.cpp' || echo '$(srcdir)/'`LinearMath/btConvexHull.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexHull.Tpo $(DEPDIR)/btConvexHull.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='LinearMath/btConvexHull.cpp' object='btConvexHull.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexHull.lo `test -f 'LinearMath/btConvexHull.cpp' || echo '$(srcdir)/'`LinearMath/btConvexHull.cpp
+
+btConvexHullComputer.lo: LinearMath/btConvexHullComputer.cpp
+@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT btConvexHullComputer.lo -MD -MP -MF $(DEPDIR)/btConvexHullComputer.Tpo -c -o btConvexHullComputer.lo `test -f 'LinearMath/btConvexHullComputer.cpp' || echo '$(srcdir)/'`LinearMath/btConvexHullComputer.cpp
+@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/btConvexHullComputer.Tpo $(DEPDIR)/btConvexHullComputer.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='LinearMath/btConvexHullComputer.cpp' object='btConvexHullComputer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o btConvexHullComputer.lo `test -f 'LinearMath/btConvexHullComputer.cpp' || echo '$(srcdir)/'`LinearMath/btConvexHullComputer.cpp
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-nobase_bullet_includeHEADERS: $(nobase_bullet_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bullet_includedir)" || $(MKDIR_P) "$(DESTDIR)$(bullet_includedir)"
+ @$(am__vpath_adj_setup) \
+ list='$(nobase_bullet_include_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ $(am__vpath_adj) \
+ echo " $(nobase_bullet_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(bullet_includedir)/$$f'"; \
+ $(nobase_bullet_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(bullet_includedir)/$$f"; \
+ done
+
+uninstall-nobase_bullet_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @$(am__vpath_adj_setup) \
+ list='$(nobase_bullet_include_HEADERS)'; for p in $$list; do \
+ $(am__vpath_adj) \
+ echo " rm -f '$(DESTDIR)$(bullet_includedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(bullet_includedir)/$$f"; \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$tags $$unique; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ tags=; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
+ test -z "$(CTAGS_ARGS)$$tags$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$tags $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && cd $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) $$here
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+ fi; \
+ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bullet_includedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-nobase_bullet_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-info: install-info-am
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-libLTLIBRARIES \
+ uninstall-nobase_bullet_includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-man \
+ install-nobase_bullet_includeHEADERS install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libLTLIBRARIES \
+ uninstall-nobase_bullet_includeHEADERS
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/bullet/src/MiniCL/CMakeLists.txt b/tests/bullet/src/MiniCL/CMakeLists.txt
new file mode 100644
index 00000000..bfaaf6b7
--- /dev/null
+++ b/tests/bullet/src/MiniCL/CMakeLists.txt
@@ -0,0 +1,44 @@
+#MiniCL provides a small subset of OpenCL
+
+INCLUDE_DIRECTORIES(
+ ${BULLET_PHYSICS_SOURCE_DIR}/src
+ ${VECTOR_MATH_INCLUDE}
+)
+
+ADD_LIBRARY(MiniCL
+ MiniCL.cpp
+ MiniCLTaskScheduler.cpp
+ MiniCLTaskScheduler.h
+ MiniCLTask/MiniCLTask.cpp
+ MiniCLTask/MiniCLTask.h
+ ../MiniCL/cl.h
+ ../MiniCL/cl_gl.h
+ ../MiniCL/cl_platform.h
+ ../MiniCL/cl_MiniCL_Defs.h
+)
+SET_TARGET_PROPERTIES(MiniCL PROPERTIES VERSION ${BULLET_VERSION})
+SET_TARGET_PROPERTIES(MiniCL PROPERTIES SOVERSION ${BULLET_VERSION})
+
+
+IF (BUILD_SHARED_LIBS)
+ TARGET_LINK_LIBRARIES(MiniCL BulletMultiThreaded BulletDynamics BulletCollision)
+ENDIF (BUILD_SHARED_LIBS)
+
+IF (INSTALL_LIBS)
+ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ #INSTALL of other files requires CMake 2.6
+ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+# IF(INSTALL_EXTRA_LIBS)
+ IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS MiniCL DESTINATION .)
+ ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+ INSTALL(TARGETS MiniCL DESTINATION lib${LIB_SUFFIX})
+ INSTALL(DIRECTORY
+${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING
+PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
+ ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
+# ENDIF (INSTALL_EXTRA_LIBS)
+ ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
+ ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
+ENDIF (INSTALL_LIBS)
+
diff --git a/tests/bullet/src/MiniCL/MiniCL.cpp b/tests/bullet/src/MiniCL/MiniCL.cpp
new file mode 100644
index 00000000..1e0823a1
--- /dev/null
+++ b/tests/bullet/src/MiniCL/MiniCL.cpp
@@ -0,0 +1,720 @@
+/*
+ Copyright (C) 2010 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+
+#include "MiniCL/cl.h"
+#define __PHYSICS_COMMON_H__ 1
+#ifdef _WIN32
+#include "BulletMultiThreaded/Win32ThreadSupport.h"
+#endif
+
+#include "BulletMultiThreaded/SequentialThreadSupport.h"
+#include "MiniCLTaskScheduler.h"
+#include "MiniCLTask/MiniCLTask.h"
+#include "LinearMath/btMinMax.h"
+#include <stdio.h>
+
+//#define DEBUG_MINICL_KERNELS 1
+
+static char* spPlatformID = "MiniCL, SCEA";
+static char* spDriverVersion= "1.0";
+
+CL_API_ENTRY cl_int CL_API_CALL clGetPlatformIDs(
+ cl_uint num_entries,
+ cl_platform_id * platforms,
+ cl_uint * num_platforms ) CL_API_SUFFIX__VERSION_1_0
+{
+ if(platforms != NULL)
+ {
+ if(num_entries <= 0)
+ {
+ return CL_INVALID_VALUE;
+ }
+ *((char**)platforms) = spPlatformID;
+ }
+ if(num_platforms != NULL)
+ {
+ *num_platforms = 1;
+ }
+ return CL_SUCCESS;
+}
+
+
+CL_API_ENTRY cl_int CL_API_CALL clGetPlatformInfo(
+ cl_platform_id platform,
+ cl_platform_info param_name,
+ size_t param_value_size,
+ void * param_value,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
+{
+ char* pId = (char*)platform;
+ if(strcmp(pId, spPlatformID))
+ {
+ return CL_INVALID_PLATFORM;
+ }
+ switch(param_name)
+ {
+ case CL_PLATFORM_VENDOR :
+ if(param_value_size < (strlen(spPlatformID) + 1))
+ {
+ return CL_INVALID_VALUE;
+ }
+ strcpy((char*)param_value, spPlatformID);
+ if(param_value_size_ret != NULL)
+ {
+ *param_value_size_ret = strlen(spPlatformID) + 1;
+ }
+ break;
+ default :
+ return CL_INVALID_VALUE;
+ }
+ return CL_SUCCESS;
+}
+
+
+
+
+CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo(
+ cl_device_id device ,
+ cl_device_info param_name ,
+ size_t param_value_size ,
+ void * param_value ,
+ size_t * param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
+{
+
+ switch (param_name)
+ {
+ case CL_DEVICE_NAME:
+ {
+ char deviceName[] = "MiniCL CPU";
+ unsigned int nameLen = strlen(deviceName)+1;
+ btAssert(param_value_size>strlen(deviceName));
+ if (nameLen < param_value_size)
+ {
+ const char* cpuName = "MiniCL CPU";
+ sprintf((char*)param_value,"%s",cpuName);
+ } else
+ {
+ printf("error: param_value_size should be at least %d, but it is %d\n",nameLen,param_value_size);
+ return CL_INVALID_VALUE;
+ }
+ break;
+ }
+ case CL_DEVICE_TYPE:
+ {
+ if (param_value_size>=sizeof(cl_device_type))
+ {
+ cl_device_type* deviceType = (cl_device_type*)param_value;
+ *deviceType = CL_DEVICE_TYPE_CPU;
+ } else
+ {
+ printf("error: param_value_size should be at least %d\n",sizeof(cl_device_type));
+ return CL_INVALID_VALUE;
+ }
+ break;
+ }
+ case CL_DEVICE_MAX_COMPUTE_UNITS:
+ {
+ if (param_value_size>=sizeof(cl_uint))
+ {
+ cl_uint* numUnits = (cl_uint*)param_value;
+ *numUnits= 4;
+ } else
+ {
+ printf("error: param_value_size should be at least %d\n",sizeof(cl_uint));
+ return CL_INVALID_VALUE;
+ }
+
+ break;
+ }
+ case CL_DEVICE_MAX_WORK_ITEM_SIZES:
+ {
+ size_t workitem_size[3];
+
+ if (param_value_size>=sizeof(workitem_size))
+ {
+ size_t* workItemSize = (size_t*)param_value;
+ workItemSize[0] = 64;
+ workItemSize[1] = 24;
+ workItemSize[2] = 16;
+ } else
+ {
+ printf("error: param_value_size should be at least %d\n",sizeof(cl_uint));
+ return CL_INVALID_VALUE;
+ }
+ break;
+ }
+ case CL_DEVICE_MAX_CLOCK_FREQUENCY:
+ {
+ cl_uint* clock_frequency = (cl_uint*)param_value;
+ *clock_frequency = 3*1024;
+ break;
+ }
+
+ case CL_DEVICE_VENDOR :
+ {
+ if(param_value_size < (strlen(spPlatformID) + 1))
+ {
+ return CL_INVALID_VALUE;
+ }
+ strcpy((char*)param_value, spPlatformID);
+ if(param_value_size_ret != NULL)
+ {
+ *param_value_size_ret = strlen(spPlatformID) + 1;
+ }
+ break;
+ }
+ case CL_DRIVER_VERSION:
+ {
+ if(param_value_size < (strlen(spDriverVersion) + 1))
+ {
+ return CL_INVALID_VALUE;
+ }
+ strcpy((char*)param_value, spDriverVersion);
+ if(param_value_size_ret != NULL)
+ {
+ *param_value_size_ret = strlen(spDriverVersion) + 1;
+ }
+
+ break;
+ }
+ case CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS:
+ {
+ cl_uint* maxDimensions = (cl_uint*)param_value;
+ *maxDimensions = 1;
+ break;
+ }
+ case CL_DEVICE_MAX_WORK_GROUP_SIZE:
+ {
+ cl_uint* maxWorkGroupSize = (cl_uint*)param_value;
+ *maxWorkGroupSize = 128;//1;
+ break;
+ }
+ case CL_DEVICE_ADDRESS_BITS:
+ {
+ cl_uint* addressBits = (cl_uint*)param_value;
+ *addressBits= 32; //@todo: should this be 64 for 64bit builds?
+ break;
+ }
+ case CL_DEVICE_MAX_MEM_ALLOC_SIZE:
+ {
+ cl_ulong* maxMemAlloc = (cl_ulong*)param_value;
+ *maxMemAlloc= 512*1024*1024; //this "should be enough for everyone" ?
+ break;
+ }
+ case CL_DEVICE_GLOBAL_MEM_SIZE:
+ {
+ cl_ulong* maxMemAlloc = (cl_ulong*)param_value;
+ *maxMemAlloc= 1024*1024*1024; //this "should be enough for everyone" ?
+ break;
+ }
+
+ case CL_DEVICE_ERROR_CORRECTION_SUPPORT:
+ {
+ cl_bool* error_correction_support = (cl_bool*)param_value;
+ *error_correction_support = CL_FALSE;
+ break;
+ }
+
+ case CL_DEVICE_LOCAL_MEM_TYPE:
+ {
+ cl_device_local_mem_type* local_mem_type = (cl_device_local_mem_type*)param_value;
+ *local_mem_type = CL_GLOBAL;
+ break;
+ }
+ case CL_DEVICE_LOCAL_MEM_SIZE:
+ {
+ cl_ulong* localmem = (cl_ulong*) param_value;
+ *localmem = 32*1024;
+ break;
+ }
+
+ case CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE:
+ {
+ cl_ulong* localmem = (cl_ulong*) param_value;
+ *localmem = 64*1024;
+ break;
+ }
+ case CL_DEVICE_QUEUE_PROPERTIES:
+ {
+ cl_command_queue_properties* queueProp = (cl_command_queue_properties*) param_value;
+ memset(queueProp,0,param_value_size);
+
+ break;
+ }
+ case CL_DEVICE_IMAGE_SUPPORT:
+ {
+ cl_bool* imageSupport = (cl_bool*) param_value;
+ *imageSupport = CL_FALSE;
+ break;
+ }
+
+ case CL_DEVICE_MAX_WRITE_IMAGE_ARGS:
+ case CL_DEVICE_MAX_READ_IMAGE_ARGS:
+ {
+ cl_uint* imageArgs = (cl_uint*) param_value;
+ *imageArgs = 0;
+ break;
+ }
+ case CL_DEVICE_IMAGE3D_MAX_DEPTH:
+ case CL_DEVICE_IMAGE3D_MAX_HEIGHT:
+ case CL_DEVICE_IMAGE2D_MAX_HEIGHT:
+ case CL_DEVICE_IMAGE3D_MAX_WIDTH:
+ case CL_DEVICE_IMAGE2D_MAX_WIDTH:
+ {
+ size_t* maxSize = (size_t*) param_value;
+ *maxSize = 0;
+ break;
+ }
+
+ case CL_DEVICE_EXTENSIONS:
+ {
+ char* extensions = (char*) param_value;
+ *extensions = 0;
+ break;
+ }
+
+ case CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE:
+ case CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT:
+ case CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG:
+ case CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT:
+ case CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT:
+ case CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR:
+ {
+ cl_uint* width = (cl_uint*) param_value;
+ *width = 1;
+ break;
+ }
+
+ default:
+ {
+ printf("error: unsupported param_name:%d\n",param_name);
+ }
+ }
+
+
+ return 0;
+}
+
+CL_API_ENTRY cl_int CL_API_CALL clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0
+{
+ return 0;
+}
+
+
+
+CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0
+{
+ return 0;
+}
+
+CL_API_ENTRY cl_int CL_API_CALL clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0
+{
+ return 0;
+}
+
+CL_API_ENTRY cl_int CL_API_CALL clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0
+{
+ return 0;
+}
+
+
+// Enqueued Commands APIs
+CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBuffer(cl_command_queue command_queue ,
+ cl_mem buffer ,
+ cl_bool /* blocking_read */,
+ size_t offset ,
+ size_t cb ,
+ void * ptr ,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0
+{
+ MiniCLTaskScheduler* scheduler = (MiniCLTaskScheduler*) command_queue;
+
+ ///wait for all work items to be completed
+ scheduler->flush();
+
+ memcpy(ptr,(char*)buffer + offset,cb);
+ return 0;
+}
+
+
+CL_API_ENTRY cl_int clGetProgramBuildInfo(cl_program /* program */,
+ cl_device_id /* device */,
+ cl_program_build_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0
+{
+
+ return 0;
+}
+
+
+// Program Object APIs
+CL_API_ENTRY cl_program
+clCreateProgramWithSource(cl_context context ,
+ cl_uint /* count */,
+ const char ** /* strings */,
+ const size_t * /* lengths */,
+ cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
+{
+ *errcode_ret = CL_SUCCESS;
+ return (cl_program)context;
+}
+
+CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBuffer(cl_command_queue command_queue ,
+ cl_mem buffer ,
+ cl_bool /* blocking_read */,
+ size_t offset,
+ size_t cb ,
+ const void * ptr ,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0
+{
+ MiniCLTaskScheduler* scheduler = (MiniCLTaskScheduler*) command_queue;
+
+ ///wait for all work items to be completed
+ scheduler->flush();
+
+ memcpy((char*)buffer + offset, ptr,cb);
+ return 0;
+}
+
+CL_API_ENTRY cl_int CL_API_CALL clFlush(cl_command_queue command_queue)
+{
+ MiniCLTaskScheduler* scheduler = (MiniCLTaskScheduler*) command_queue;
+ ///wait for all work items to be completed
+ scheduler->flush();
+ return 0;
+}
+
+
+CL_API_ENTRY cl_int CL_API_CALL clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
+ cl_kernel clKernel ,
+ cl_uint work_dim ,
+ const size_t * /* global_work_offset */,
+ const size_t * global_work_size ,
+ const size_t * /* local_work_size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0
+{
+
+
+ MiniCLKernel* kernel = (MiniCLKernel*) clKernel;
+ for (unsigned int ii=0;ii<work_dim;ii++)
+ {
+ int maxTask = kernel->m_scheduler->getMaxNumOutstandingTasks();
+ int numWorkItems = global_work_size[ii];
+
+// //at minimum 64 work items per task
+// int numWorkItemsPerTask = btMax(64,numWorkItems / maxTask);
+ int numWorkItemsPerTask = numWorkItems / maxTask;
+ if (!numWorkItemsPerTask) numWorkItemsPerTask = 1;
+
+ for (int t=0;t<numWorkItems;)
+ {
+ //Performance Hint: tweak this number during benchmarking
+ int endIndex = (t+numWorkItemsPerTask) < numWorkItems ? t+numWorkItemsPerTask : numWorkItems;
+ kernel->m_scheduler->issueTask(t, endIndex, kernel);
+ t = endIndex;
+ }
+ }
+/*
+
+ void* bla = 0;
+
+ scheduler->issueTask(bla,2,3);
+ scheduler->flush();
+
+ */
+
+ return 0;
+}
+
+#define LOCAL_BUF_SIZE 32768
+static int sLocalMemBuf[LOCAL_BUF_SIZE * 4 + 16];
+static int* spLocalBufCurr = NULL;
+static int sLocalBufUsed = LOCAL_BUF_SIZE; // so it will be reset at the first call
+static void* localBufMalloc(int size)
+{
+ int size16 = (size + 15) >> 4; // in 16-byte units
+ if((sLocalBufUsed + size16) > LOCAL_BUF_SIZE)
+ { // reset
+ spLocalBufCurr = sLocalMemBuf;
+ while((unsigned long)spLocalBufCurr & 0x0F) spLocalBufCurr++; // align to 16 bytes
+ sLocalBufUsed = 0;
+ }
+ void* ret = spLocalBufCurr;
+ spLocalBufCurr += size16 * 4;
+ sLocalBufUsed += size;
+ return ret;
+}
+
+
+
+CL_API_ENTRY cl_int CL_API_CALL clSetKernelArg(cl_kernel clKernel ,
+ cl_uint arg_index ,
+ size_t arg_size ,
+ const void * arg_value ) CL_API_SUFFIX__VERSION_1_0
+{
+ MiniCLKernel* kernel = (MiniCLKernel* ) clKernel;
+ btAssert(arg_size <= MINICL_MAX_ARGLENGTH);
+ if (arg_index>MINI_CL_MAX_ARG)
+ {
+ printf("error: clSetKernelArg arg_index (%d) exceeds %d\n",arg_index,MINI_CL_MAX_ARG);
+ } else
+ {
+ if (arg_size>MINICL_MAX_ARGLENGTH)
+ //if (arg_size != MINICL_MAX_ARGLENGTH)
+ {
+ printf("error: clSetKernelArg argdata too large: %d (maximum is %d)\n",arg_size,MINICL_MAX_ARGLENGTH);
+ }
+ else
+ {
+ if(arg_value == NULL)
+ { // this is only for __local memory qualifier
+ void* ptr = localBufMalloc(arg_size);
+ kernel->m_argData[arg_index] = ptr;
+ }
+ else
+ {
+ memcpy(&(kernel->m_argData[arg_index]), arg_value, arg_size);
+ }
+ kernel->m_argSizes[arg_index] = arg_size;
+ if(arg_index >= kernel->m_numArgs)
+ {
+ kernel->m_numArgs = arg_index + 1;
+ kernel->updateLauncher();
+ }
+ }
+ }
+ return 0;
+}
+
+// Kernel Object APIs
+CL_API_ENTRY cl_kernel CL_API_CALL clCreateKernel(cl_program program ,
+ const char * kernel_name ,
+ cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
+{
+ MiniCLTaskScheduler* scheduler = (MiniCLTaskScheduler*) program;
+ MiniCLKernel* kernel = new MiniCLKernel();
+ int nameLen = strlen(kernel_name);
+ if(nameLen >= MINI_CL_MAX_KERNEL_NAME)
+ {
+ *errcode_ret = CL_INVALID_KERNEL_NAME;
+ return NULL;
+ }
+ strcpy(kernel->m_name, kernel_name);
+ kernel->m_numArgs = 0;
+
+ //kernel->m_kernelProgramCommandId = scheduler->findProgramCommandIdByName(kernel_name);
+ //if (kernel->m_kernelProgramCommandId>=0)
+ //{
+ // *errcode_ret = CL_SUCCESS;
+ //} else
+ //{
+ // *errcode_ret = CL_INVALID_KERNEL_NAME;
+ //}
+ kernel->m_scheduler = scheduler;
+ if(kernel->registerSelf() == NULL)
+ {
+ *errcode_ret = CL_INVALID_KERNEL_NAME;
+ return NULL;
+ }
+ else
+ {
+ *errcode_ret = CL_SUCCESS;
+ }
+
+ return (cl_kernel)kernel;
+
+}
+
+
+CL_API_ENTRY cl_int CL_API_CALL clBuildProgram(cl_program /* program */,
+ cl_uint /* num_devices */,
+ const cl_device_id * /* device_list */,
+ const char * /* options */,
+ void (*pfn_notify)(cl_program /* program */, void * /* user_data */),
+ void * /* user_data */) CL_API_SUFFIX__VERSION_1_0
+{
+ return CL_SUCCESS;
+}
+
+CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithBinary(cl_context context ,
+ cl_uint /* num_devices */,
+ const cl_device_id * /* device_list */,
+ const size_t * /* lengths */,
+ const unsigned char ** /* binaries */,
+ cl_int * /* binary_status */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0
+{
+ return (cl_program)context;
+}
+
+
+// Memory Object APIs
+CL_API_ENTRY cl_mem CL_API_CALL clCreateBuffer(cl_context /* context */,
+ cl_mem_flags flags ,
+ size_t size,
+ void * host_ptr ,
+ cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
+{
+ cl_mem buf = (cl_mem)malloc(size);
+ if ((flags&CL_MEM_COPY_HOST_PTR) && host_ptr)
+ {
+ memcpy(buf,host_ptr,size);
+ }
+ *errcode_ret = 0;
+ return buf;
+}
+
+// Command Queue APIs
+CL_API_ENTRY cl_command_queue CL_API_CALL clCreateCommandQueue(cl_context context ,
+ cl_device_id /* device */,
+ cl_command_queue_properties /* properties */,
+ cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
+{
+ *errcode_ret = 0;
+ return (cl_command_queue) context;
+}
+
+extern CL_API_ENTRY cl_int CL_API_CALL clGetContextInfo(cl_context /* context */,
+ cl_context_info param_name ,
+ size_t param_value_size ,
+ void * param_value,
+ size_t * param_value_size_ret ) CL_API_SUFFIX__VERSION_1_0
+{
+
+ switch (param_name)
+ {
+ case CL_CONTEXT_DEVICES:
+ {
+ if (!param_value_size)
+ {
+ *param_value_size_ret = 13;
+ } else
+ {
+ const char* testName = "MiniCL_Test.";
+ sprintf((char*)param_value,"%s",testName);
+ }
+ break;
+ };
+ default:
+ {
+ printf("unsupported\n");
+ }
+ }
+
+ return 0;
+}
+
+CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType(cl_context_properties * /* properties */,
+ cl_device_type device_type ,
+ void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */,
+ void * /* user_data */,
+ cl_int * errcode_ret ) CL_API_SUFFIX__VERSION_1_0
+{
+ int maxNumOutstandingTasks = 4;
+// int maxNumOutstandingTasks = 2;
+// int maxNumOutstandingTasks = 1;
+ gMiniCLNumOutstandingTasks = maxNumOutstandingTasks;
+ const int maxNumOfThreadSupports = 8;
+ static int sUniqueThreadSupportIndex = 0;
+ static char* sUniqueThreadSupportName[maxNumOfThreadSupports] =
+ {
+ "MiniCL_0", "MiniCL_1", "MiniCL_2", "MiniCL_3", "MiniCL_4", "MiniCL_5", "MiniCL_6", "MiniCL_7"
+ };
+
+ btThreadSupportInterface* threadSupport = 0;
+
+ if (device_type==CL_DEVICE_TYPE_DEBUG)
+ {
+ SequentialThreadSupport::SequentialThreadConstructionInfo stc("MiniCL",processMiniCLTask,createMiniCLLocalStoreMemory);
+ threadSupport = new SequentialThreadSupport(stc);
+ } else
+ {
+
+#if _WIN32
+ btAssert(sUniqueThreadSupportIndex < maxNumOfThreadSupports);
+ threadSupport = new Win32ThreadSupport(Win32ThreadSupport::Win32ThreadConstructionInfo(
+// "MiniCL",
+ sUniqueThreadSupportName[sUniqueThreadSupportIndex++],
+ processMiniCLTask, //processCollisionTask,
+ createMiniCLLocalStoreMemory,//createCollisionLocalStoreMemory,
+ maxNumOutstandingTasks));
+#else
+ ///todo: add posix thread support for other platforms
+ SequentialThreadSupport::SequentialThreadConstructionInfo stc("MiniCL",processMiniCLTask,createMiniCLLocalStoreMemory);
+ threadSupport = new SequentialThreadSupport(stc);
+#endif
+
+ }
+
+
+ MiniCLTaskScheduler* scheduler = new MiniCLTaskScheduler(threadSupport,maxNumOutstandingTasks);
+
+ *errcode_ret = 0;
+ return (cl_context)scheduler;
+}
+
+CL_API_ENTRY cl_int CL_API_CALL clReleaseContext(cl_context context ) CL_API_SUFFIX__VERSION_1_0
+{
+
+ MiniCLTaskScheduler* scheduler = (MiniCLTaskScheduler*) context;
+
+ btThreadSupportInterface* threadSupport = scheduler->getThreadSupportInterface();
+ delete scheduler;
+ delete threadSupport;
+
+ return 0;
+}
+extern CL_API_ENTRY cl_int CL_API_CALL
+clFinish(cl_command_queue command_queue ) CL_API_SUFFIX__VERSION_1_0
+{
+ MiniCLTaskScheduler* scheduler = (MiniCLTaskScheduler*) command_queue;
+ ///wait for all work items to be completed
+ scheduler->flush();
+ return CL_SUCCESS;
+}
+
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelWorkGroupInfo(cl_kernel kernel ,
+ cl_device_id /* device */,
+ cl_kernel_work_group_info wgi/* param_name */,
+ size_t sz /* param_value_size */,
+ void * ptr /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0
+{
+ if((wgi == CL_KERNEL_WORK_GROUP_SIZE)
+ &&(sz == sizeof(size_t))
+ &&(ptr != NULL))
+ {
+ MiniCLKernel* miniCLKernel = (MiniCLKernel*)kernel;
+ MiniCLTaskScheduler* scheduler = miniCLKernel->m_scheduler;
+ *((size_t*)ptr) = scheduler->getMaxNumOutstandingTasks();
+ return CL_SUCCESS;
+ }
+ else
+ {
+ return CL_INVALID_VALUE;
+ }
+}
diff --git a/tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.cpp b/tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.cpp
new file mode 100644
index 00000000..a56e96a0
--- /dev/null
+++ b/tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.cpp
@@ -0,0 +1,74 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, Copyright (c) 2007 Erwin Coumans
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+
+#include "MiniCLTask.h"
+#include "BulletMultiThreaded/PlatformDefinitions.h"
+#include "BulletMultiThreaded/SpuFakeDma.h"
+#include "LinearMath/btMinMax.h"
+#include "MiniCLTask.h"
+#include "MiniCL/MiniCLTaskScheduler.h"
+
+
+#ifdef __SPU__
+#include <spu_printf.h>
+#else
+#include <stdio.h>
+#define spu_printf printf
+#endif
+
+int gMiniCLNumOutstandingTasks = 0;
+
+struct MiniCLTask_LocalStoreMemory
+{
+
+};
+
+
+//-- MAIN METHOD
+void processMiniCLTask(void* userPtr, void* lsMemory)
+{
+ // BT_PROFILE("processSampleTask");
+
+ MiniCLTask_LocalStoreMemory* localMemory = (MiniCLTask_LocalStoreMemory*)lsMemory;
+
+ MiniCLTaskDesc* taskDescPtr = (MiniCLTaskDesc*)userPtr;
+ MiniCLTaskDesc& taskDesc = *taskDescPtr;
+
+ for (unsigned int i=taskDesc.m_firstWorkUnit;i<taskDesc.m_lastWorkUnit;i++)
+ {
+ taskDesc.m_kernel->m_launcher(&taskDesc, i);
+ }
+
+// printf("Compute Unit[%d] executed kernel %d work items [%d..%d)\n",taskDesc.m_taskId,taskDesc.m_kernelProgramId,taskDesc.m_firstWorkUnit,taskDesc.m_lastWorkUnit);
+
+}
+
+
+#if defined(__CELLOS_LV2__) || defined (LIBSPE2)
+
+ATTRIBUTE_ALIGNED16(MiniCLTask_LocalStoreMemory gLocalStoreMemory);
+
+void* createMiniCLLocalStoreMemory()
+{
+ return &gLocalStoreMemory;
+}
+#else
+void* createMiniCLLocalStoreMemory()
+{
+ return new MiniCLTask_LocalStoreMemory;
+};
+
+#endif
diff --git a/tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.h b/tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.h
new file mode 100644
index 00000000..7e78be08
--- /dev/null
+++ b/tests/bullet/src/MiniCL/MiniCLTask/MiniCLTask.h
@@ -0,0 +1,62 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, Copyright (c) 2007 Erwin Coumans
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef MINICL__TASK_H
+#define MINICL__TASK_H
+
+#include "BulletMultiThreaded/PlatformDefinitions.h"
+#include "LinearMath/btScalar.h"
+
+#include "LinearMath/btAlignedAllocator.h"
+
+
+#define MINICL_MAX_ARGLENGTH (sizeof(void*))
+#define MINI_CL_MAX_ARG 16
+#define MINI_CL_MAX_KERNEL_NAME 256
+
+struct MiniCLKernel;
+
+ATTRIBUTE_ALIGNED16(struct) MiniCLTaskDesc
+{
+ BT_DECLARE_ALIGNED_ALLOCATOR();
+
+ MiniCLTaskDesc()
+ {
+ for (int i=0;i<MINI_CL_MAX_ARG;i++)
+ {
+ m_argSizes[i]=0;
+ }
+ }
+
+ uint32_t m_taskId;
+
+ uint32_t m_firstWorkUnit;
+ uint32_t m_lastWorkUnit;
+
+ MiniCLKernel* m_kernel;
+
+ void* m_argData[MINI_CL_MAX_ARG];
+ int m_argSizes[MINI_CL_MAX_ARG];
+};
+
+extern "C" int gMiniCLNumOutstandingTasks;
+
+
+void processMiniCLTask(void* userPtr, void* lsMemory);
+void* createMiniCLLocalStoreMemory();
+
+
+#endif //MINICL__TASK_H
+
diff --git a/tests/bullet/src/MiniCL/MiniCLTaskScheduler.cpp b/tests/bullet/src/MiniCL/MiniCLTaskScheduler.cpp
new file mode 100644
index 00000000..7adee88d
--- /dev/null
+++ b/tests/bullet/src/MiniCL/MiniCLTaskScheduler.cpp
@@ -0,0 +1,519 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+//#define __CELLOS_LV2__ 1
+#define __BT_SKIP_UINT64_H 1
+
+#define USE_SAMPLE_PROCESS 1
+#ifdef USE_SAMPLE_PROCESS
+
+
+#include "MiniCLTaskScheduler.h"
+#include <stdio.h>
+
+#ifdef __SPU__
+
+
+
+void SampleThreadFunc(void* userPtr,void* lsMemory)
+{
+ //do nothing
+ printf("hello world\n");
+}
+
+
+void* SamplelsMemoryFunc()
+{
+ //don't create local store memory, just return 0
+ return 0;
+}
+
+
+#else
+
+
+#include "BulletMultiThreaded/btThreadSupportInterface.h"
+
+//# include "SPUAssert.h"
+#include <string.h>
+
+#include "MiniCL/cl_platform.h"
+
+extern "C" {
+ extern char SPU_SAMPLE_ELF_SYMBOL[];
+}
+
+
+MiniCLTaskScheduler::MiniCLTaskScheduler(btThreadSupportInterface* threadInterface, int maxNumOutstandingTasks)
+:m_threadInterface(threadInterface),
+m_maxNumOutstandingTasks(maxNumOutstandingTasks)
+{
+
+ m_taskBusy.resize(m_maxNumOutstandingTasks);
+ m_spuSampleTaskDesc.resize(m_maxNumOutstandingTasks);
+
+ m_kernels.resize(0);
+
+ for (int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ m_taskBusy[i] = false;
+ }
+ m_numBusyTasks = 0;
+ m_currentTask = 0;
+
+ m_initialized = false;
+
+ m_threadInterface->startSPU();
+
+
+}
+
+MiniCLTaskScheduler::~MiniCLTaskScheduler()
+{
+ m_threadInterface->stopSPU();
+
+}
+
+
+
+void MiniCLTaskScheduler::initialize()
+{
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("MiniCLTaskScheduler::initialize()\n");
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+ for (int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ m_taskBusy[i] = false;
+ }
+ m_numBusyTasks = 0;
+ m_currentTask = 0;
+ m_initialized = true;
+
+}
+
+
+void MiniCLTaskScheduler::issueTask(int firstWorkUnit, int lastWorkUnit, MiniCLKernel* kernel)
+{
+
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("MiniCLTaskScheduler::issueTask (m_currentTask= %d\)n", m_currentTask);
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+ m_taskBusy[m_currentTask] = true;
+ m_numBusyTasks++;
+
+ MiniCLTaskDesc& taskDesc = m_spuSampleTaskDesc[m_currentTask];
+ {
+ // send task description in event message
+ taskDesc.m_firstWorkUnit = firstWorkUnit;
+ taskDesc.m_lastWorkUnit = lastWorkUnit;
+ taskDesc.m_kernel = kernel;
+ //some bookkeeping to recognize finished tasks
+ taskDesc.m_taskId = m_currentTask;
+
+// for (int i=0;i<MINI_CL_MAX_ARG;i++)
+ for (unsigned int i=0; i < kernel->m_numArgs; i++)
+ {
+ taskDesc.m_argSizes[i] = kernel->m_argSizes[i];
+ if (taskDesc.m_argSizes[i])
+ {
+ taskDesc.m_argData[i] = kernel->m_argData[i];
+// memcpy(&taskDesc.m_argData[i],&argData[MINICL_MAX_ARGLENGTH*i],taskDesc.m_argSizes[i]);
+ }
+ }
+ }
+
+
+ m_threadInterface->sendRequest(1, (ppu_address_t) &taskDesc, m_currentTask);
+
+ // if all tasks busy, wait for spu event to clear the task.
+
+ if (m_numBusyTasks >= m_maxNumOutstandingTasks)
+ {
+ unsigned int taskId;
+ unsigned int outputSize;
+
+ for (int i=0;i<m_maxNumOutstandingTasks;i++)
+ {
+ if (m_taskBusy[i])
+ {
+ taskId = i;
+ break;
+ }
+ }
+ m_threadInterface->waitForResponse(&taskId, &outputSize);
+
+ //printf("PPU: after issue, received event: %u %d\n", taskId, outputSize);
+
+ postProcess(taskId, outputSize);
+
+ m_taskBusy[taskId] = false;
+
+ m_numBusyTasks--;
+ }
+
+ // find new task buffer
+ for (int i = 0; i < m_maxNumOutstandingTasks; i++)
+ {
+ if (!m_taskBusy[i])
+ {
+ m_currentTask = i;
+ break;
+ }
+ }
+}
+
+
+///Optional PPU-size post processing for each task
+void MiniCLTaskScheduler::postProcess(int taskId, int outputSize)
+{
+
+}
+
+
+void MiniCLTaskScheduler::flush()
+{
+#ifdef DEBUG_SPU_TASK_SCHEDULING
+ printf("\nSpuCollisionTaskProcess::flush()\n");
+#endif //DEBUG_SPU_TASK_SCHEDULING
+
+
+ // all tasks are issued, wait for all tasks to be complete
+ while(m_numBusyTasks > 0)
+ {
+// Consolidating SPU code
+ unsigned int taskId;
+ unsigned int outputSize;
+
+ for (int i=0;i<m_maxNumOutstandingTasks;i++)
+ {
+ if (m_taskBusy[i])
+ {
+ taskId = i;
+ break;
+ }
+ }
+ {
+
+ m_threadInterface->waitForResponse(&taskId, &outputSize);
+ }
+
+ //printf("PPU: flushing, received event: %u %d\n", taskId, outputSize);
+
+ postProcess(taskId, outputSize);
+
+ m_taskBusy[taskId] = false;
+
+ m_numBusyTasks--;
+ }
+
+
+}
+
+
+
+typedef void (*MiniCLKernelLauncher0)(int);
+typedef void (*MiniCLKernelLauncher1)(void*, int);
+typedef void (*MiniCLKernelLauncher2)(void*, void*, int);
+typedef void (*MiniCLKernelLauncher3)(void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher4)(void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher5)(void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher6)(void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher7)(void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher8)(void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher9)(void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher10)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher11)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher12)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher13)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher14)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher15)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+typedef void (*MiniCLKernelLauncher16)(void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, void*, int);
+
+
+static void kernelLauncher0(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher0)(taskDesc->m_kernel->m_launcher))(guid);
+}
+static void kernelLauncher1(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher1)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ guid);
+}
+static void kernelLauncher2(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher2)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ guid);
+}
+static void kernelLauncher3(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher3)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ guid);
+}
+static void kernelLauncher4(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher4)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ guid);
+}
+static void kernelLauncher5(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher5)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ guid);
+}
+static void kernelLauncher6(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher6)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ guid);
+}
+static void kernelLauncher7(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher7)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ guid);
+}
+static void kernelLauncher8(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher8)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ guid);
+}
+static void kernelLauncher9(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher9)(taskDesc->m_kernel->m_pCode))( taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ guid);
+}
+static void kernelLauncher10(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher10)(taskDesc->m_kernel->m_pCode))(taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ taskDesc->m_argData[9],
+ guid);
+}
+static void kernelLauncher11(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher11)(taskDesc->m_kernel->m_pCode))(taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ taskDesc->m_argData[9],
+ taskDesc->m_argData[10],
+ guid);
+}
+static void kernelLauncher12(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher12)(taskDesc->m_kernel->m_pCode))(taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ taskDesc->m_argData[9],
+ taskDesc->m_argData[10],
+ taskDesc->m_argData[11],
+ guid);
+}
+static void kernelLauncher13(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher13)(taskDesc->m_kernel->m_pCode))(taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ taskDesc->m_argData[9],
+ taskDesc->m_argData[10],
+ taskDesc->m_argData[11],
+ taskDesc->m_argData[12],
+ guid);
+}
+static void kernelLauncher14(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher14)(taskDesc->m_kernel->m_pCode))(taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ taskDesc->m_argData[9],
+ taskDesc->m_argData[10],
+ taskDesc->m_argData[11],
+ taskDesc->m_argData[12],
+ taskDesc->m_argData[13],
+ guid);
+}
+static void kernelLauncher15(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher15)(taskDesc->m_kernel->m_pCode))(taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ taskDesc->m_argData[9],
+ taskDesc->m_argData[10],
+ taskDesc->m_argData[11],
+ taskDesc->m_argData[12],
+ taskDesc->m_argData[13],
+ taskDesc->m_argData[14],
+ guid);
+}
+static void kernelLauncher16(MiniCLTaskDesc* taskDesc, int guid)
+{
+ ((MiniCLKernelLauncher16)(taskDesc->m_kernel->m_pCode))(taskDesc->m_argData[0],
+ taskDesc->m_argData[1],
+ taskDesc->m_argData[2],
+ taskDesc->m_argData[3],
+ taskDesc->m_argData[4],
+ taskDesc->m_argData[5],
+ taskDesc->m_argData[6],
+ taskDesc->m_argData[7],
+ taskDesc->m_argData[8],
+ taskDesc->m_argData[9],
+ taskDesc->m_argData[10],
+ taskDesc->m_argData[11],
+ taskDesc->m_argData[12],
+ taskDesc->m_argData[13],
+ taskDesc->m_argData[14],
+ taskDesc->m_argData[15],
+ guid);
+}
+
+static kernelLauncherCB spLauncherList[MINI_CL_MAX_ARG+1] =
+{
+ kernelLauncher0,
+ kernelLauncher1,
+ kernelLauncher2,
+ kernelLauncher3,
+ kernelLauncher4,
+ kernelLauncher5,
+ kernelLauncher6,
+ kernelLauncher7,
+ kernelLauncher8,
+ kernelLauncher9,
+ kernelLauncher10,
+ kernelLauncher11,
+ kernelLauncher12,
+ kernelLauncher13,
+ kernelLauncher14,
+ kernelLauncher15,
+ kernelLauncher16
+};
+
+void MiniCLKernel::updateLauncher()
+{
+ m_launcher = spLauncherList[m_numArgs];
+}
+
+struct MiniCLKernelDescEntry
+{
+ void* pCode;
+ char* pName;
+};
+static MiniCLKernelDescEntry spKernelDesc[256];
+static int sNumKernelDesc = 0;
+
+MiniCLKernelDesc::MiniCLKernelDesc(void* pCode, char* pName)
+{
+ for(int i = 0; i < sNumKernelDesc; i++)
+ {
+ if(!strcmp(pName, spKernelDesc[i].pName))
+ { // already registered
+ btAssert(spKernelDesc[i].pCode == pCode);
+ return;
+ }
+ }
+ spKernelDesc[sNumKernelDesc].pCode = pCode;
+ spKernelDesc[sNumKernelDesc].pName = pName;
+ sNumKernelDesc++;
+}
+
+
+MiniCLKernel* MiniCLKernel::registerSelf()
+{
+ m_scheduler->registerKernel(this);
+ for(int i = 0; i < sNumKernelDesc; i++)
+ {
+ if(!strcmp(m_name, spKernelDesc[i].pName))
+ {
+ m_pCode = spKernelDesc[i].pCode;
+ return this;
+ }
+ }
+ return NULL;
+}
+
+#endif
+
+
+#endif //USE_SAMPLE_PROCESS
diff --git a/tests/bullet/src/MiniCL/MiniCLTaskScheduler.h b/tests/bullet/src/MiniCL/MiniCLTaskScheduler.h
new file mode 100644
index 00000000..3061a713
--- /dev/null
+++ b/tests/bullet/src/MiniCL/MiniCLTaskScheduler.h
@@ -0,0 +1,194 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2007 Erwin Coumans http://bulletphysics.com
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+
+
+#ifndef MINICL_TASK_SCHEDULER_H
+#define MINICL_TASK_SCHEDULER_H
+
+#include <assert.h>
+
+
+#include "BulletMultiThreaded/PlatformDefinitions.h"
+
+#include <stdlib.h>
+
+#include "LinearMath/btAlignedObjectArray.h"
+
+
+#include "MiniCLTask/MiniCLTask.h"
+
+//just add your commands here, try to keep them globally unique for debugging purposes
+#define CMD_SAMPLE_TASK_COMMAND 10
+
+struct MiniCLKernel;
+
+/// MiniCLTaskScheduler handles SPU processing of collision pairs.
+/// When PPU issues a task, it will look for completed task buffers
+/// PPU will do postprocessing, dependent on workunit output (not likely)
+class MiniCLTaskScheduler
+{
+ // track task buffers that are being used, and total busy tasks
+ btAlignedObjectArray<bool> m_taskBusy;
+ btAlignedObjectArray<MiniCLTaskDesc> m_spuSampleTaskDesc;
+
+
+ btAlignedObjectArray<const MiniCLKernel*> m_kernels;
+
+
+ int m_numBusyTasks;
+
+ // the current task and the current entry to insert a new work unit
+ int m_currentTask;
+
+ bool m_initialized;
+
+ void postProcess(int taskId, int outputSize);
+
+ class btThreadSupportInterface* m_threadInterface;
+
+ int m_maxNumOutstandingTasks;
+
+
+
+public:
+ MiniCLTaskScheduler(btThreadSupportInterface* threadInterface, int maxNumOutstandingTasks);
+
+ ~MiniCLTaskScheduler();
+
+ ///call initialize in the beginning of the frame, before addCollisionPairToTask
+ void initialize();
+
+ void issueTask(int firstWorkUnit, int lastWorkUnit, MiniCLKernel* kernel);
+
+ ///call flush to submit potential outstanding work to SPUs and wait for all involved SPUs to be finished
+ void flush();
+
+ class btThreadSupportInterface* getThreadSupportInterface()
+ {
+ return m_threadInterface;
+ }
+
+ int findProgramCommandIdByName(const char* programName) const;
+
+ int getMaxNumOutstandingTasks() const
+ {
+ return m_maxNumOutstandingTasks;
+ }
+
+ void registerKernel(MiniCLKernel* kernel)
+ {
+ m_kernels.push_back(kernel);
+ }
+};
+
+typedef void (*kernelLauncherCB)(MiniCLTaskDesc* taskDesc, int guid);
+
+struct MiniCLKernel
+{
+ MiniCLTaskScheduler* m_scheduler;
+
+// int m_kernelProgramCommandId;
+
+ char m_name[MINI_CL_MAX_KERNEL_NAME];
+ unsigned int m_numArgs;
+ kernelLauncherCB m_launcher;
+ void* m_pCode;
+ void updateLauncher();
+ MiniCLKernel* registerSelf();
+
+ void* m_argData[MINI_CL_MAX_ARG];
+ int m_argSizes[MINI_CL_MAX_ARG];
+};
+
+
+#if defined(USE_LIBSPE2) && defined(__SPU__)
+////////////////////MAIN/////////////////////////////
+#include "../SpuLibspe2Support.h"
+#include <spu_intrinsics.h>
+#include <spu_mfcio.h>
+#include <SpuFakeDma.h>
+
+void * SamplelsMemoryFunc();
+void SampleThreadFunc(void* userPtr,void* lsMemory);
+
+//#define DEBUG_LIBSPE2_MAINLOOP
+
+int main(unsigned long long speid, addr64 argp, addr64 envp)
+{
+ printf("SPU is up \n");
+
+ ATTRIBUTE_ALIGNED128(btSpuStatus status);
+ ATTRIBUTE_ALIGNED16( SpuSampleTaskDesc taskDesc ) ;
+ unsigned int received_message = Spu_Mailbox_Event_Nothing;
+ bool shutdown = false;
+
+ cellDmaGet(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ status.m_status = Spu_Status_Free;
+ status.m_lsMemory.p = SamplelsMemoryFunc();
+
+ cellDmaLargePut(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+
+ while (!shutdown)
+ {
+ received_message = spu_read_in_mbox();
+
+
+
+ switch(received_message)
+ {
+ case Spu_Mailbox_Event_Shutdown:
+ shutdown = true;
+ break;
+ case Spu_Mailbox_Event_Task:
+ // refresh the status
+#ifdef DEBUG_LIBSPE2_MAINLOOP
+ printf("SPU recieved Task \n");
+#endif //DEBUG_LIBSPE2_MAINLOOP
+ cellDmaGet(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ btAssert(status.m_status==Spu_Status_Occupied);
+
+ cellDmaGet(&taskDesc, status.m_taskDesc.p, sizeof(SpuSampleTaskDesc), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+ SampleThreadFunc((void*)&taskDesc, reinterpret_cast<void*> (taskDesc.m_mainMemoryPtr) );
+ break;
+ case Spu_Mailbox_Event_Nothing:
+ default:
+ break;
+ }
+
+ // set to status free and wait for next task
+ status.m_status = Spu_Status_Free;
+ cellDmaLargePut(&status, argp.ull, sizeof(btSpuStatus), DMA_TAG(3), 0, 0);
+ cellDmaWaitTagStatusAll(DMA_MASK(3));
+
+
+ }
+ return 0;
+}
+//////////////////////////////////////////////////////
+#endif
+
+
+
+#endif // MINICL_TASK_SCHEDULER_H
+
diff --git a/tests/bullet/src/MiniCL/cl.h b/tests/bullet/src/MiniCL/cl.h
new file mode 100644
index 00000000..053491ee
--- /dev/null
+++ b/tests/bullet/src/MiniCL/cl.h
@@ -0,0 +1,867 @@
+/*******************************************************************************
+ * Copyright (c) 2008-2009 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and/or associated documentation files (the
+ * "Materials"), to deal in the Materials without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Materials, and to
+ * permit persons to whom the Materials are furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ ******************************************************************************/
+
+#ifndef __OPENCL_CL_H
+#define __OPENCL_CL_H
+
+#ifdef __APPLE__
+#include <MiniCL/cl_platform.h>
+#else
+#include <MiniCL/cl_platform.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/******************************************************************************/
+
+typedef struct _cl_platform_id * cl_platform_id;
+typedef struct _cl_device_id * cl_device_id;
+typedef struct _cl_context * cl_context;
+typedef struct _cl_command_queue * cl_command_queue;
+typedef struct _cl_mem * cl_mem;
+typedef struct _cl_program * cl_program;
+typedef struct _cl_kernel * cl_kernel;
+typedef struct _cl_event * cl_event;
+typedef struct _cl_sampler * cl_sampler;
+
+typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */
+typedef cl_ulong cl_bitfield;
+typedef cl_bitfield cl_device_type;
+typedef cl_uint cl_platform_info;
+typedef cl_uint cl_device_info;
+typedef cl_bitfield cl_device_address_info;
+typedef cl_bitfield cl_device_fp_config;
+typedef cl_uint cl_device_mem_cache_type;
+typedef cl_uint cl_device_local_mem_type;
+typedef cl_bitfield cl_device_exec_capabilities;
+typedef cl_bitfield cl_command_queue_properties;
+
+typedef intptr_t cl_context_properties;
+typedef cl_uint cl_context_info;
+typedef cl_uint cl_command_queue_info;
+typedef cl_uint cl_channel_order;
+typedef cl_uint cl_channel_type;
+typedef cl_bitfield cl_mem_flags;
+typedef cl_uint cl_mem_object_type;
+typedef cl_uint cl_mem_info;
+typedef cl_uint cl_image_info;
+typedef cl_uint cl_addressing_mode;
+typedef cl_uint cl_filter_mode;
+typedef cl_uint cl_sampler_info;
+typedef cl_bitfield cl_map_flags;
+typedef cl_uint cl_program_info;
+typedef cl_uint cl_program_build_info;
+typedef cl_int cl_build_status;
+typedef cl_uint cl_kernel_info;
+typedef cl_uint cl_kernel_work_group_info;
+typedef cl_uint cl_event_info;
+typedef cl_uint cl_command_type;
+typedef cl_uint cl_profiling_info;
+
+typedef struct _cl_image_format {
+ cl_channel_order image_channel_order;
+ cl_channel_type image_channel_data_type;
+} cl_image_format;
+
+/******************************************************************************/
+
+// Error Codes
+#define CL_SUCCESS 0
+#define CL_DEVICE_NOT_FOUND -1
+#define CL_DEVICE_NOT_AVAILABLE -2
+#define CL_DEVICE_COMPILER_NOT_AVAILABLE -3
+#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4
+#define CL_OUT_OF_RESOURCES -5
+#define CL_OUT_OF_HOST_MEMORY -6
+#define CL_PROFILING_INFO_NOT_AVAILABLE -7
+#define CL_MEM_COPY_OVERLAP -8
+#define CL_IMAGE_FORMAT_MISMATCH -9
+#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
+#define CL_BUILD_PROGRAM_FAILURE -11
+#define CL_MAP_FAILURE -12
+
+#define CL_INVALID_VALUE -30
+#define CL_INVALID_DEVICE_TYPE -31
+#define CL_INVALID_PLATFORM -32
+#define CL_INVALID_DEVICE -33
+#define CL_INVALID_CONTEXT -34
+#define CL_INVALID_QUEUE_PROPERTIES -35
+#define CL_INVALID_COMMAND_QUEUE -36
+#define CL_INVALID_HOST_PTR -37
+#define CL_INVALID_MEM_OBJECT -38
+#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39
+#define CL_INVALID_IMAGE_SIZE -40
+#define CL_INVALID_SAMPLER -41
+#define CL_INVALID_BINARY -42
+#define CL_INVALID_BUILD_OPTIONS -43
+#define CL_INVALID_PROGRAM -44
+#define CL_INVALID_PROGRAM_EXECUTABLE -45
+#define CL_INVALID_KERNEL_NAME -46
+#define CL_INVALID_KERNEL_DEFINITION -47
+#define CL_INVALID_KERNEL -48
+#define CL_INVALID_ARG_INDEX -49
+#define CL_INVALID_ARG_VALUE -50
+#define CL_INVALID_ARG_SIZE -51
+#define CL_INVALID_KERNEL_ARGS -52
+#define CL_INVALID_WORK_DIMENSION -53
+#define CL_INVALID_WORK_GROUP_SIZE -54
+#define CL_INVALID_WORK_ITEM_SIZE -55
+#define CL_INVALID_GLOBAL_OFFSET -56
+#define CL_INVALID_EVENT_WAIT_LIST -57
+#define CL_INVALID_EVENT -58
+#define CL_INVALID_OPERATION -59
+#define CL_INVALID_GL_OBJECT -60
+#define CL_INVALID_BUFFER_SIZE -61
+#define CL_INVALID_MIP_LEVEL -62
+
+// OpenCL Version
+#define CL_VERSION_1_0 1
+
+// cl_bool
+#define CL_FALSE 0
+#define CL_TRUE 1
+
+// cl_platform_info
+#define CL_PLATFORM_PROFILE 0x0900
+#define CL_PLATFORM_VERSION 0x0901
+#define CL_PLATFORM_NAME 0x0902
+#define CL_PLATFORM_VENDOR 0x0903
+#define CL_PLATFORM_EXTENSIONS 0x0904
+
+// cl_device_type - bitfield
+#define CL_DEVICE_TYPE_DEFAULT (1 << 0)
+#define CL_DEVICE_TYPE_CPU (1 << 1)
+#define CL_DEVICE_TYPE_GPU (1 << 2)
+#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
+#define CL_DEVICE_TYPE_DEBUG (1 << 4)
+#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
+
+
+// cl_device_info
+#define CL_DEVICE_TYPE 0x1000
+#define CL_DEVICE_VENDOR_ID 0x1001
+#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002
+#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003
+#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004
+#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A
+#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B
+#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C
+#define CL_DEVICE_ADDRESS_BITS 0x100D
+#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E
+#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F
+#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010
+#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011
+#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012
+#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013
+#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014
+#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015
+#define CL_DEVICE_IMAGE_SUPPORT 0x1016
+#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017
+#define CL_DEVICE_MAX_SAMPLERS 0x1018
+#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019
+#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A
+#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B
+#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C
+#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D
+#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E
+#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F
+#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020
+#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021
+#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022
+#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023
+#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024
+#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025
+#define CL_DEVICE_ENDIAN_LITTLE 0x1026
+#define CL_DEVICE_AVAILABLE 0x1027
+#define CL_DEVICE_COMPILER_AVAILABLE 0x1028
+#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029
+#define CL_DEVICE_QUEUE_PROPERTIES 0x102A
+#define CL_DEVICE_NAME 0x102B
+#define CL_DEVICE_VENDOR 0x102C
+#define CL_DRIVER_VERSION 0x102D
+#define CL_DEVICE_PROFILE 0x102E
+#define CL_DEVICE_VERSION 0x102F
+#define CL_DEVICE_EXTENSIONS 0x1030
+#define CL_DEVICE_PLATFORM 0x1031
+
+// cl_device_address_info - bitfield
+#define CL_DEVICE_ADDRESS_32_BITS (1 << 0)
+#define CL_DEVICE_ADDRESS_64_BITS (1 << 1)
+
+// cl_device_fp_config - bitfield
+#define CL_FP_DENORM (1 << 0)
+#define CL_FP_INF_NAN (1 << 1)
+#define CL_FP_ROUND_TO_NEAREST (1 << 2)
+#define CL_FP_ROUND_TO_ZERO (1 << 3)
+#define CL_FP_ROUND_TO_INF (1 << 4)
+#define CL_FP_FMA (1 << 5)
+
+// cl_device_mem_cache_type
+#define CL_NONE 0x0
+#define CL_READ_ONLY_CACHE 0x1
+#define CL_READ_WRITE_CACHE 0x2
+
+// cl_device_local_mem_type
+#define CL_LOCAL 0x1
+#define CL_GLOBAL 0x2
+
+// cl_device_exec_capabilities - bitfield
+#define CL_EXEC_KERNEL (1 << 0)
+#define CL_EXEC_NATIVE_KERNEL (1 << 1)
+
+// cl_command_queue_properties - bitfield
+#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0)
+#define CL_QUEUE_PROFILING_ENABLE (1 << 1)
+
+// cl_context_info
+#define CL_CONTEXT_REFERENCE_COUNT 0x1080
+#define CL_CONTEXT_NUM_DEVICES 0x1081
+#define CL_CONTEXT_DEVICES 0x1082
+#define CL_CONTEXT_PROPERTIES 0x1083
+#define CL_CONTEXT_PLATFORM 0x1084
+
+// cl_command_queue_info
+#define CL_QUEUE_CONTEXT 0x1090
+#define CL_QUEUE_DEVICE 0x1091
+#define CL_QUEUE_REFERENCE_COUNT 0x1092
+#define CL_QUEUE_PROPERTIES 0x1093
+
+// cl_mem_flags - bitfield
+#define CL_MEM_READ_WRITE (1 << 0)
+#define CL_MEM_WRITE_ONLY (1 << 1)
+#define CL_MEM_READ_ONLY (1 << 2)
+#define CL_MEM_USE_HOST_PTR (1 << 3)
+#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
+#define CL_MEM_COPY_HOST_PTR (1 << 5)
+
+// cl_channel_order
+#define CL_R 0x10B0
+#define CL_A 0x10B1
+#define CL_RG 0x10B2
+#define CL_RA 0x10B3
+#define CL_RGB 0x10B4
+#define CL_RGBA 0x10B5
+#define CL_BGRA 0x10B6
+#define CL_ARGB 0x10B7
+#define CL_INTENSITY 0x10B8
+#define CL_LUMINANCE 0x10B9
+
+// cl_channel_type
+#define CL_SNORM_INT8 0x10D0
+#define CL_SNORM_INT16 0x10D1
+#define CL_UNORM_INT8 0x10D2
+#define CL_UNORM_INT16 0x10D3
+#define CL_UNORM_SHORT_565 0x10D4
+#define CL_UNORM_SHORT_555 0x10D5
+#define CL_UNORM_INT_101010 0x10D6
+#define CL_SIGNED_INT8 0x10D7
+#define CL_SIGNED_INT16 0x10D8
+#define CL_SIGNED_INT32 0x10D9
+#define CL_UNSIGNED_INT8 0x10DA
+#define CL_UNSIGNED_INT16 0x10DB
+#define CL_UNSIGNED_INT32 0x10DC
+#define CL_HALF_FLOAT 0x10DD
+#define CL_FLOAT 0x10DE
+
+// cl_mem_object_type
+#define CL_MEM_OBJECT_BUFFER 0x10F0
+#define CL_MEM_OBJECT_IMAGE2D 0x10F1
+#define CL_MEM_OBJECT_IMAGE3D 0x10F2
+
+// cl_mem_info
+#define CL_MEM_TYPE 0x1100
+#define CL_MEM_FLAGS 0x1101
+#define CL_MEM_SIZE 0x1102
+#define CL_MEM_HOST_PTR 0x1103
+#define CL_MEM_MAP_COUNT 0x1104
+#define CL_MEM_REFERENCE_COUNT 0x1105
+#define CL_MEM_CONTEXT 0x1106
+
+// cl_image_info
+#define CL_IMAGE_FORMAT 0x1110
+#define CL_IMAGE_ELEMENT_SIZE 0x1111
+#define CL_IMAGE_ROW_PITCH 0x1112
+#define CL_IMAGE_SLICE_PITCH 0x1113
+#define CL_IMAGE_WIDTH 0x1114
+#define CL_IMAGE_HEIGHT 0x1115
+#define CL_IMAGE_DEPTH 0x1116
+
+// cl_addressing_mode
+#define CL_ADDRESS_NONE 0x1130
+#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
+#define CL_ADDRESS_CLAMP 0x1132
+#define CL_ADDRESS_REPEAT 0x1133
+
+// cl_filter_mode
+#define CL_FILTER_NEAREST 0x1140
+#define CL_FILTER_LINEAR 0x1141
+
+// cl_sampler_info
+#define CL_SAMPLER_REFERENCE_COUNT 0x1150
+#define CL_SAMPLER_CONTEXT 0x1151
+#define CL_SAMPLER_NORMALIZED_COORDS 0x1152
+#define CL_SAMPLER_ADDRESSING_MODE 0x1153
+#define CL_SAMPLER_FILTER_MODE 0x1154
+
+// cl_map_flags - bitfield
+#define CL_MAP_READ (1 << 0)
+#define CL_MAP_WRITE (1 << 1)
+
+// cl_program_info
+#define CL_PROGRAM_REFERENCE_COUNT 0x1160
+#define CL_PROGRAM_CONTEXT 0x1161
+#define CL_PROGRAM_NUM_DEVICES 0x1162
+#define CL_PROGRAM_DEVICES 0x1163
+#define CL_PROGRAM_SOURCE 0x1164
+#define CL_PROGRAM_BINARY_SIZES 0x1165
+#define CL_PROGRAM_BINARIES 0x1166
+
+// cl_program_build_info
+#define CL_PROGRAM_BUILD_STATUS 0x1181
+#define CL_PROGRAM_BUILD_OPTIONS 0x1182
+#define CL_PROGRAM_BUILD_LOG 0x1183
+
+// cl_build_status
+#define CL_BUILD_SUCCESS 0
+#define CL_BUILD_NONE -1
+#define CL_BUILD_ERROR -2
+#define CL_BUILD_IN_PROGRESS -3
+
+// cl_kernel_info
+#define CL_KERNEL_FUNCTION_NAME 0x1190
+#define CL_KERNEL_NUM_ARGS 0x1191
+#define CL_KERNEL_REFERENCE_COUNT 0x1192
+#define CL_KERNEL_CONTEXT 0x1193
+#define CL_KERNEL_PROGRAM 0x1194
+
+// cl_kernel_work_group_info
+#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
+#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
+#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
+
+// cl_event_info
+#define CL_EVENT_COMMAND_QUEUE 0x11D0
+#define CL_EVENT_COMMAND_TYPE 0x11D1
+#define CL_EVENT_REFERENCE_COUNT 0x11D2
+#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
+
+// cl_command_type
+#define CL_COMMAND_NDRANGE_KERNEL 0x11F0
+#define CL_COMMAND_TASK 0x11F1
+#define CL_COMMAND_NATIVE_KERNEL 0x11F2
+#define CL_COMMAND_READ_BUFFER 0x11F3
+#define CL_COMMAND_WRITE_BUFFER 0x11F4
+#define CL_COMMAND_COPY_BUFFER 0x11F5
+#define CL_COMMAND_READ_IMAGE 0x11F6
+#define CL_COMMAND_WRITE_IMAGE 0x11F7
+#define CL_COMMAND_COPY_IMAGE 0x11F8
+#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9
+#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA
+#define CL_COMMAND_MAP_BUFFER 0x11FB
+#define CL_COMMAND_MAP_IMAGE 0x11FC
+#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD
+#define CL_COMMAND_MARKER 0x11FE
+#define CL_COMMAND_WAIT_FOR_EVENTS 0x11FF
+#define CL_COMMAND_BARRIER 0x1200
+#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x1201
+#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1202
+
+// command execution status
+#define CL_COMPLETE 0x0
+#define CL_RUNNING 0x1
+#define CL_SUBMITTED 0x2
+#define CL_QUEUED 0x3
+
+// cl_profiling_info
+#define CL_PROFILING_COMMAND_QUEUED 0x1280
+#define CL_PROFILING_COMMAND_SUBMIT 0x1281
+#define CL_PROFILING_COMMAND_START 0x1282
+#define CL_PROFILING_COMMAND_END 0x1283
+
+/********************************************************************************************************/
+
+// Platform API
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetPlatformIDs(cl_uint /* num_entries */,
+ cl_platform_id * /* platforms */,
+ cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetPlatformInfo(cl_platform_id /* platform */,
+ cl_platform_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Device APIs
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceIDs(cl_platform_id /* platform */,
+ cl_device_type /* device_type */,
+ cl_uint /* num_entries */,
+ cl_device_id * /* devices */,
+ cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetDeviceInfo(cl_device_id /* device */,
+ cl_device_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Context APIs
+extern CL_API_ENTRY cl_context CL_API_CALL
+clCreateContext(cl_context_properties * /* properties */,
+ cl_uint /* num_devices */,
+ const cl_device_id * /* devices */,
+ void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */,
+ void * /* user_data */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_context CL_API_CALL
+clCreateContextFromType(cl_context_properties * /* properties */,
+ cl_device_type /* device_type */,
+ void (*pfn_notify)(const char *, const void *, size_t, void *) /* pfn_notify */,
+ void * /* user_data */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetContextInfo(cl_context /* context */,
+ cl_context_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Command Queue APIs
+extern CL_API_ENTRY cl_command_queue CL_API_CALL
+clCreateCommandQueue(cl_context /* context */,
+ cl_device_id /* device */,
+ cl_command_queue_properties /* properties */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetCommandQueueInfo(cl_command_queue /* command_queue */,
+ cl_command_queue_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetCommandQueueProperty(cl_command_queue /* command_queue */,
+ cl_command_queue_properties /* properties */,
+ cl_bool /* enable */,
+ cl_command_queue_properties * /* old_properties */) CL_API_SUFFIX__VERSION_1_0;
+
+// Memory Object APIs
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateBuffer(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ size_t /* size */,
+ void * /* host_ptr */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateImage2D(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ const cl_image_format * /* image_format */,
+ size_t /* image_width */,
+ size_t /* image_height */,
+ size_t /* image_row_pitch */,
+ void * /* host_ptr */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateImage3D(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ const cl_image_format * /* image_format */,
+ size_t /* image_width */,
+ size_t /* image_height */,
+ size_t /* image_depth */,
+ size_t /* image_row_pitch */,
+ size_t /* image_slice_pitch */,
+ void * /* host_ptr */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetSupportedImageFormats(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ cl_mem_object_type /* image_type */,
+ cl_uint /* num_entries */,
+ cl_image_format * /* image_formats */,
+ cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetMemObjectInfo(cl_mem /* memobj */,
+ cl_mem_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetImageInfo(cl_mem /* image */,
+ cl_image_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Sampler APIs
+extern CL_API_ENTRY cl_sampler CL_API_CALL
+clCreateSampler(cl_context /* context */,
+ cl_bool /* normalized_coords */,
+ cl_addressing_mode /* addressing_mode */,
+ cl_filter_mode /* filter_mode */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetSamplerInfo(cl_sampler /* sampler */,
+ cl_sampler_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Program Object APIs
+extern CL_API_ENTRY cl_program CL_API_CALL
+clCreateProgramWithSource(cl_context /* context */,
+ cl_uint /* count */,
+ const char ** /* strings */,
+ const size_t * /* lengths */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_program CL_API_CALL
+clCreateProgramWithBinary(cl_context /* context */,
+ cl_uint /* num_devices */,
+ const cl_device_id * /* device_list */,
+ const size_t * /* lengths */,
+ const unsigned char ** /* binaries */,
+ cl_int * /* binary_status */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clBuildProgram(cl_program /* program */,
+ cl_uint /* num_devices */,
+ const cl_device_id * /* device_list */,
+ const char * /* options */,
+ void (*pfn_notify)(cl_program /* program */, void * /* user_data */),
+ void * /* user_data */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetProgramInfo(cl_program /* program */,
+ cl_program_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetProgramBuildInfo(cl_program /* program */,
+ cl_device_id /* device */,
+ cl_program_build_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Kernel Object APIs
+extern CL_API_ENTRY cl_kernel CL_API_CALL
+clCreateKernel(cl_program /* program */,
+ const char * /* kernel_name */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clCreateKernelsInProgram(cl_program /* program */,
+ cl_uint /* num_kernels */,
+ cl_kernel * /* kernels */,
+ cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clSetKernelArg(cl_kernel /* kernel */,
+ cl_uint /* arg_index */,
+ size_t /* arg_size */,
+ const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelInfo(cl_kernel /* kernel */,
+ cl_kernel_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
+ cl_device_id /* device */,
+ cl_kernel_work_group_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Event Object APIs
+extern CL_API_ENTRY cl_int CL_API_CALL
+clWaitForEvents(cl_uint /* num_events */,
+ const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetEventInfo(cl_event /* event */,
+ cl_event_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+// Profiling APIs
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetEventProfilingInfo(cl_event /* event */,
+ cl_profiling_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+// Flush and Finish APIs
+extern CL_API_ENTRY cl_int CL_API_CALL
+clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
+
+// Enqueued Commands APIs
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReadBuffer(cl_command_queue /* command_queue */,
+ cl_mem /* buffer */,
+ cl_bool /* blocking_read */,
+ size_t /* offset */,
+ size_t /* cb */,
+ void * /* ptr */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueWriteBuffer(cl_command_queue /* command_queue */,
+ cl_mem /* buffer */,
+ cl_bool /* blocking_write */,
+ size_t /* offset */,
+ size_t /* cb */,
+ const void * /* ptr */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyBuffer(cl_command_queue /* command_queue */,
+ cl_mem /* src_buffer */,
+ cl_mem /* dst_buffer */,
+ size_t /* src_offset */,
+ size_t /* dst_offset */,
+ size_t /* cb */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReadImage(cl_command_queue /* command_queue */,
+ cl_mem /* image */,
+ cl_bool /* blocking_read */,
+ const size_t * /* origin[3] */,
+ const size_t * /* region[3] */,
+ size_t /* row_pitch */,
+ size_t /* slice_pitch */,
+ void * /* ptr */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueWriteImage(cl_command_queue /* command_queue */,
+ cl_mem /* image */,
+ cl_bool /* blocking_write */,
+ const size_t * /* origin[3] */,
+ const size_t * /* region[3] */,
+ size_t /* input_row_pitch */,
+ size_t /* input_slice_pitch */,
+ const void * /* ptr */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyImage(cl_command_queue /* command_queue */,
+ cl_mem /* src_image */,
+ cl_mem /* dst_image */,
+ const size_t * /* src_origin[3] */,
+ const size_t * /* dst_origin[3] */,
+ const size_t * /* region[3] */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
+ cl_mem /* src_image */,
+ cl_mem /* dst_buffer */,
+ const size_t * /* src_origin[3] */,
+ const size_t * /* region[3] */,
+ size_t /* dst_offset */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
+ cl_mem /* src_buffer */,
+ cl_mem /* dst_image */,
+ size_t /* src_offset */,
+ const size_t * /* dst_origin[3] */,
+ const size_t * /* region[3] */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY void * CL_API_CALL
+clEnqueueMapBuffer(cl_command_queue /* command_queue */,
+ cl_mem /* buffer */,
+ cl_bool /* blocking_map */,
+ cl_map_flags /* map_flags */,
+ size_t /* offset */,
+ size_t /* cb */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY void * CL_API_CALL
+clEnqueueMapImage(cl_command_queue /* command_queue */,
+ cl_mem /* image */,
+ cl_bool /* blocking_map */,
+ cl_map_flags /* map_flags */,
+ const size_t * /* origin[3] */,
+ const size_t * /* region[3] */,
+ size_t * /* image_row_pitch */,
+ size_t * /* image_slice_pitch */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
+ cl_mem /* memobj */,
+ void * /* mapped_ptr */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
+ cl_kernel /* kernel */,
+ cl_uint /* work_dim */,
+ const size_t * /* global_work_offset */,
+ const size_t * /* global_work_size */,
+ const size_t * /* local_work_size */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueTask(cl_command_queue /* command_queue */,
+ cl_kernel /* kernel */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueNativeKernel(cl_command_queue /* command_queue */,
+ void (*user_func)(void *),
+ void * /* args */,
+ size_t /* cb_args */,
+ cl_uint /* num_mem_objects */,
+ const cl_mem * /* mem_list */,
+ const void ** /* args_mem_loc */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueMarker(cl_command_queue /* command_queue */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
+ cl_uint /* num_events */,
+ const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __OPENCL_CL_H
+
diff --git a/tests/bullet/src/MiniCL/cl_MiniCL_Defs.h b/tests/bullet/src/MiniCL/cl_MiniCL_Defs.h
new file mode 100644
index 00000000..9931273c
--- /dev/null
+++ b/tests/bullet/src/MiniCL/cl_MiniCL_Defs.h
@@ -0,0 +1,329 @@
+/*
+Bullet Continuous Collision Detection and Physics Library, Copyright (c) 2007 Erwin Coumans
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#include <float.h>
+#include <math.h>
+#include "LinearMath/btScalar.h"
+
+#include "MiniCL/cl.h"
+
+
+#define __kernel
+#define __global
+#define __local
+#define get_global_id(a) __guid_arg
+#define get_local_id(a) ((__guid_arg) % gMiniCLNumOutstandingTasks)
+#define get_local_size(a) (gMiniCLNumOutstandingTasks)
+#define get_group_id(a) ((__guid_arg) / gMiniCLNumOutstandingTasks)
+
+static unsigned int as_uint(float val) { return *((unsigned int*)&val); }
+
+
+#define CLK_LOCAL_MEM_FENCE 0x01
+#define CLK_GLOBAL_MEM_FENCE 0x02
+
+static void barrier(unsigned int a)
+{
+ // TODO : implement
+}
+
+//ATTRIBUTE_ALIGNED16(struct) float8
+struct float8
+{
+ float s0;
+ float s1;
+ float s2;
+ float s3;
+ float s4;
+ float s5;
+ float s6;
+ float s7;
+
+ float8(float scalar)
+ {
+ s0=s1=s2=s3=s4=s5=s6=s7=scalar;
+ }
+};
+
+//ATTRIBUTE_ALIGNED16(struct) float4
+struct float4
+{
+ float x,y,z,w;
+ float4() {}
+ float4(float v)
+ {
+ x = y = z = w = v;
+ }
+ float4 operator*(const float4& other)
+ {
+ float4 tmp;
+ tmp.x = x*other.x;
+ tmp.y = y*other.y;
+ tmp.z = z*other.z;
+ tmp.w = w*other.w;
+ return tmp;
+ }
+
+ float4 operator*(const float& other)
+ {
+ float4 tmp;
+ tmp.x = x*other;
+ tmp.y = y*other;
+ tmp.z = z*other;
+ tmp.w = w*other;
+ return tmp;
+ }
+
+
+
+ float4& operator+=(const float4& other)
+ {
+ x += other.x;
+ y += other.y;
+ z += other.z;
+ w += other.w;
+ return *this;
+ }
+
+ float4& operator-=(const float4& other)
+ {
+ x -= other.x;
+ y -= other.y;
+ z -= other.z;
+ w -= other.w;
+ return *this;
+ }
+
+ float4& operator *=(float scalar)
+ {
+ x *= scalar;
+ y *= scalar;
+ z *= scalar;
+ w *= scalar;
+ return (*this);
+ }
+
+
+
+
+
+};
+
+static float4 fabs(const float4& a)
+{
+ float4 tmp;
+ tmp.x = a.x < 0.f ? 0.f : a.x;
+ tmp.y = a.y < 0.f ? 0.f : a.y;
+ tmp.z = a.z < 0.f ? 0.f : a.z;
+ tmp.w = a.w < 0.f ? 0.f : a.w;
+ return tmp;
+}
+static float4 operator+(const float4& a,const float4& b)
+{
+ float4 tmp;
+ tmp.x = a.x + b.x;
+ tmp.y = a.y + b.y;
+ tmp.z = a.z + b.z;
+ tmp.w = a.w + b.w;
+ return tmp;
+}
+
+
+static float8 operator+(const float8& a,const float8& b)
+{
+ float8 tmp(0);
+ tmp.s0 = a.s0 + b.s0;
+ tmp.s1 = a.s1 + b.s1;
+ tmp.s2 = a.s2 + b.s2;
+ tmp.s3 = a.s3 + b.s3;
+ tmp.s4 = a.s4 + b.s4;
+ tmp.s5 = a.s5 + b.s5;
+ tmp.s6 = a.s6 + b.s6;
+ tmp.s7 = a.s7 + b.s7;
+ return tmp;
+}
+
+
+static float4 operator-(const float4& a,const float4& b)
+{
+ float4 tmp;
+ tmp.x = a.x - b.x;
+ tmp.y = a.y - b.y;
+ tmp.z = a.z - b.z;
+ tmp.w = a.w - b.w;
+ return tmp;
+}
+
+static float8 operator-(const float8& a,const float8& b)
+{
+ float8 tmp(0);
+ tmp.s0 = a.s0 - b.s0;
+ tmp.s1 = a.s1 - b.s1;
+ tmp.s2 = a.s2 - b.s2;
+ tmp.s3 = a.s3 - b.s3;
+ tmp.s4 = a.s4 - b.s4;
+ tmp.s5 = a.s5 - b.s5;
+ tmp.s6 = a.s6 - b.s6;
+ tmp.s7 = a.s7 - b.s7;
+ return tmp;
+}
+
+static float4 operator*(float a,const float4& b)
+{
+ float4 tmp;
+ tmp.x = a * b.x;
+ tmp.y = a * b.y;
+ tmp.z = a * b.z;
+ tmp.w = a * b.w;
+ return tmp;
+}
+
+static float4 operator/(const float4& b,float a)
+{
+ float4 tmp;
+ tmp.x = b.x/a;
+ tmp.y = b.y/a;
+ tmp.z = b.z/a;
+ tmp.w = b.w/a;
+ return tmp;
+}
+
+
+
+
+static float dot(const float4&a ,const float4& b)
+{
+ float4 tmp;
+ tmp.x = a.x*b.x;
+ tmp.y = a.y*b.y;
+ tmp.z = a.z*b.z;
+ tmp.w = a.w*b.w;
+ return tmp.x+tmp.y+tmp.z+tmp.w;
+}
+
+static float length(const float4&a)
+{
+ float l = sqrtf(a.x*a.x+a.y*a.y+a.z*a.z);
+ return l;
+}
+
+static float4 normalize(const float4&a)
+{
+ float4 tmp;
+ float l = length(a);
+ tmp = 1.f/l*a;
+ return tmp;
+}
+
+
+
+static float4 cross(const float4&a ,const float4& b)
+{
+ float4 tmp;
+ tmp.x = a.y*b.z - a.z*b.y;
+ tmp.y = -a.x*b.z + a.z*b.x;
+ tmp.z = a.x*b.y - a.y*b.x;
+ tmp.w = 0.f;
+ return tmp;
+}
+
+static float max(float a, float b)
+{
+ return (a >= b) ? a : b;
+}
+
+
+static float min(float a, float b)
+{
+ return (a <= b) ? a : b;
+}
+
+static float fmax(float a, float b)
+{
+ return (a >= b) ? a : b;
+}
+
+static float fmin(float a, float b)
+{
+ return (a <= b) ? a : b;
+}
+
+struct int2
+{
+ int x,y;
+};
+
+struct uint2
+{
+ unsigned int x,y;
+};
+
+//typedef int2 uint2;
+
+typedef unsigned int uint;
+
+struct int4
+{
+ int x,y,z,w;
+};
+
+struct uint4
+{
+ unsigned int x,y,z,w;
+ uint4() {}
+ uint4(uint val) { x = y = z = w = val; }
+ uint4& operator+=(const uint4& other)
+ {
+ x += other.x;
+ y += other.y;
+ z += other.z;
+ w += other.w;
+ return *this;
+ }
+};
+static uint4 operator+(const uint4& a,const uint4& b)
+{
+ uint4 tmp;
+ tmp.x = a.x + b.x;
+ tmp.y = a.y + b.y;
+ tmp.z = a.z + b.z;
+ tmp.w = a.w + b.w;
+ return tmp;
+}
+static uint4 operator-(const uint4& a,const uint4& b)
+{
+ uint4 tmp;
+ tmp.x = a.x - b.x;
+ tmp.y = a.y - b.y;
+ tmp.z = a.z - b.z;
+ tmp.w = a.w - b.w;
+ return tmp;
+}
+
+#define native_sqrt sqrtf
+#define native_sin sinf
+#define native_cos cosf
+#define native_powr powf
+
+#define GUID_ARG ,int __guid_arg
+#define GUID_ARG_VAL ,__guid_arg
+
+
+#define as_int(a) (*((int*)&(a)))
+
+extern "C" int gMiniCLNumOutstandingTasks;
+// extern "C" void __kernel_func();
+
+
diff --git a/tests/bullet/src/MiniCL/cl_gl.h b/tests/bullet/src/MiniCL/cl_gl.h
new file mode 100644
index 00000000..0a69d6ec
--- /dev/null
+++ b/tests/bullet/src/MiniCL/cl_gl.h
@@ -0,0 +1,113 @@
+/**********************************************************************************
+ * Copyright (c) 2008-2009 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and/or associated documentation files (the
+ * "Materials"), to deal in the Materials without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Materials, and to
+ * permit persons to whom the Materials are furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ **********************************************************************************/
+
+#ifndef __OPENCL_CL_GL_H
+#define __OPENCL_CL_GL_H
+
+#ifdef __APPLE__
+#include <OpenCL/cl_platform.h>
+#else
+#include <MiniCL/cl_platform.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// NOTE: Make sure that appropriate GL header file is included separately
+
+typedef cl_uint cl_gl_object_type;
+typedef cl_uint cl_gl_texture_info;
+typedef cl_uint cl_gl_platform_info;
+
+// cl_gl_object_type
+#define CL_GL_OBJECT_BUFFER 0x2000
+#define CL_GL_OBJECT_TEXTURE2D 0x2001
+#define CL_GL_OBJECT_TEXTURE3D 0x2002
+#define CL_GL_OBJECT_RENDERBUFFER 0x2003
+
+// cl_gl_texture_info
+#define CL_GL_TEXTURE_TARGET 0x2004
+#define CL_GL_MIPMAP_LEVEL 0x2005
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromGLBuffer(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ GLuint /* bufobj */,
+ int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromGLTexture2D(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ GLenum /* target */,
+ GLint /* miplevel */,
+ GLuint /* texture */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromGLTexture3D(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ GLenum /* target */,
+ GLint /* miplevel */,
+ GLuint /* texture */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_mem CL_API_CALL
+clCreateFromGLRenderbuffer(cl_context /* context */,
+ cl_mem_flags /* flags */,
+ GLuint /* renderbuffer */,
+ cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetGLObjectInfo(cl_mem /* memobj */,
+ cl_gl_object_type * /* gl_object_type */,
+ GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clGetGLTextureInfo(cl_mem /* memobj */,
+ cl_gl_texture_info /* param_name */,
+ size_t /* param_value_size */,
+ void * /* param_value */,
+ size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */,
+ cl_uint /* num_objects */,
+ const cl_mem * /* mem_objects */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+extern CL_API_ENTRY cl_int CL_API_CALL
+clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */,
+ cl_uint /* num_objects */,
+ const cl_mem * /* mem_objects */,
+ cl_uint /* num_events_in_wait_list */,
+ const cl_event * /* event_wait_list */,
+ cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __OPENCL_CL_GL_H
diff --git a/tests/bullet/src/MiniCL/cl_platform.h b/tests/bullet/src/MiniCL/cl_platform.h
new file mode 100644
index 00000000..3d372e30
--- /dev/null
+++ b/tests/bullet/src/MiniCL/cl_platform.h
@@ -0,0 +1,254 @@
+/**********************************************************************************
+ * Copyright (c) 2008-2009 The Khronos Group Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and/or associated documentation files (the
+ * "Materials"), to deal in the Materials without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Materials, and to
+ * permit persons to whom the Materials are furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Materials.
+ *
+ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+ **********************************************************************************/
+
+#ifndef __CL_PLATFORM_H
+#define __CL_PLATFORM_H
+
+#define CL_PLATFORM_MINI_CL 0x12345
+
+struct MiniCLKernelDesc
+{
+ MiniCLKernelDesc(void* pCode, char* pName);
+};
+
+#define MINICL_REGISTER(__kernel_func) static MiniCLKernelDesc __kernel_func##Desc((void*)__kernel_func, #__kernel_func);
+
+
+#ifdef __APPLE__
+ /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
+ #include <AvailabilityMacros.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define CL_API_ENTRY
+#define CL_API_CALL
+#ifdef __APPLE__
+#define CL_API_SUFFIX__VERSION_1_0 // AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
+#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import))
+#else
+#define CL_API_SUFFIX__VERSION_1_0
+#define CL_EXTENSION_WEAK_LINK
+#endif
+
+#if defined (_WIN32) && ! defined (__MINGW32__)
+typedef signed __int8 int8_t;
+typedef unsigned __int8 uint8_t;
+typedef signed __int16 int16_t;
+typedef unsigned __int16 uint16_t;
+typedef signed __int32 int32_t;
+typedef unsigned __int32 uint32_t;
+typedef signed __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+
+typedef int8_t cl_char;
+typedef uint8_t cl_uchar;
+typedef int16_t cl_short ;
+typedef uint16_t cl_ushort ;
+typedef int32_t cl_int ;
+typedef uint32_t cl_uint ;
+typedef int64_t cl_long ;
+typedef uint64_t cl_ulong ;
+
+typedef uint16_t cl_half ;
+typedef float cl_float ;
+typedef double cl_double ;
+
+
+typedef int8_t cl_char2[2] ;
+typedef int8_t cl_char4[4] ;
+typedef int8_t cl_char8[8] ;
+typedef int8_t cl_char16[16] ;
+typedef uint8_t cl_uchar2[2] ;
+typedef uint8_t cl_uchar4[4] ;
+typedef uint8_t cl_uchar8[8] ;
+typedef uint8_t cl_uchar16[16] ;
+
+typedef int16_t cl_short2[2] ;
+typedef int16_t cl_short4[4] ;
+typedef int16_t cl_short8[8] ;
+typedef int16_t cl_short16[16] ;
+typedef uint16_t cl_ushort2[2] ;
+typedef uint16_t cl_ushort4[4] ;
+typedef uint16_t cl_ushort8[8] ;
+typedef uint16_t cl_ushort16[16] ;
+
+typedef int32_t cl_int2[2] ;
+typedef int32_t cl_int4[4] ;
+typedef int32_t cl_int8[8] ;
+typedef int32_t cl_int16[16] ;
+typedef uint32_t cl_uint2[2] ;
+typedef uint32_t cl_uint4[4] ;
+typedef uint32_t cl_uint8[8] ;
+typedef uint32_t cl_uint16[16] ;
+
+typedef int64_t cl_long2[2] ;
+typedef int64_t cl_long4[4] ;
+typedef int64_t cl_long8[8] ;
+typedef int64_t cl_long16[16] ;
+typedef uint64_t cl_ulong2[2] ;
+typedef uint64_t cl_ulong4[4] ;
+typedef uint64_t cl_ulong8[8] ;
+typedef uint64_t cl_ulong16[16] ;
+
+typedef float cl_float2[2] ;
+typedef float cl_float4[4] ;
+typedef float cl_float8[8] ;
+typedef float cl_float16[16] ;
+
+typedef double cl_double2[2] ;
+typedef double cl_double4[4] ;
+typedef double cl_double8[8] ;
+typedef double cl_double16[16] ;
+
+
+#else
+#include <stdint.h>
+
+/* scalar types */
+typedef int8_t cl_char;
+typedef uint8_t cl_uchar;
+typedef int16_t cl_short __attribute__((aligned(2)));
+typedef uint16_t cl_ushort __attribute__((aligned(2)));
+typedef int32_t cl_int __attribute__((aligned(4)));
+typedef uint32_t cl_uint __attribute__((aligned(4)));
+typedef int64_t cl_long __attribute__((aligned(8)));
+typedef uint64_t cl_ulong __attribute__((aligned(8)));
+
+typedef uint16_t cl_half __attribute__((aligned(2)));
+typedef float cl_float __attribute__((aligned(4)));
+typedef double cl_double __attribute__((aligned(8)));
+
+
+/*
+ * Vector types
+ *
+ * Note: OpenCL requires that all types be naturally aligned.
+ * This means that vector types must be naturally aligned.
+ * For example, a vector of four floats must be aligned to
+ * a 16 byte boundary (calculated as 4 * the natural 4-byte
+ * alignment of the float). The alignment qualifiers here
+ * will only function properly if your compiler supports them
+ * and if you don't actively work to defeat them. For example,
+ * in order for a cl_float4 to be 16 byte aligned in a struct,
+ * the start of the struct must itself be 16-byte aligned.
+ *
+ * Maintaining proper alignment is the user's responsibility.
+ */
+typedef int8_t cl_char2[2] __attribute__((aligned(2)));
+typedef int8_t cl_char4[4] __attribute__((aligned(4)));
+typedef int8_t cl_char8[8] __attribute__((aligned(8)));
+typedef int8_t cl_char16[16] __attribute__((aligned(16)));
+typedef uint8_t cl_uchar2[2] __attribute__((aligned(2)));
+typedef uint8_t cl_uchar4[4] __attribute__((aligned(4)));
+typedef uint8_t cl_uchar8[8] __attribute__((aligned(8)));
+typedef uint8_t cl_uchar16[16] __attribute__((aligned(16)));
+
+typedef int16_t cl_short2[2] __attribute__((aligned(4)));
+typedef int16_t cl_short4[4] __attribute__((aligned(8)));
+typedef int16_t cl_short8[8] __attribute__((aligned(16)));
+typedef int16_t cl_short16[16] __attribute__((aligned(32)));
+typedef uint16_t cl_ushort2[2] __attribute__((aligned(4)));
+typedef uint16_t cl_ushort4[4] __attribute__((aligned(8)));
+typedef uint16_t cl_ushort8[8] __attribute__((aligned(16)));
+typedef uint16_t cl_ushort16[16] __attribute__((aligned(32)));
+
+typedef int32_t cl_int2[2] __attribute__((aligned(8)));
+typedef int32_t cl_int4[4] __attribute__((aligned(16)));
+typedef int32_t cl_int8[8] __attribute__((aligned(32)));
+typedef int32_t cl_int16[16] __attribute__((aligned(64)));
+typedef uint32_t cl_uint2[2] __attribute__((aligned(8)));
+typedef uint32_t cl_uint4[4] __attribute__((aligned(16)));
+typedef uint32_t cl_uint8[8] __attribute__((aligned(32)));
+typedef uint32_t cl_uint16[16] __attribute__((aligned(64)));
+
+typedef int64_t cl_long2[2] __attribute__((aligned(16)));
+typedef int64_t cl_long4[4] __attribute__((aligned(32)));
+typedef int64_t cl_long8[8] __attribute__((aligned(64)));
+typedef int64_t cl_long16[16] __attribute__((aligned(128)));
+typedef uint64_t cl_ulong2[2] __attribute__((aligned(16)));
+typedef uint64_t cl_ulong4[4] __attribute__((aligned(32)));
+typedef uint64_t cl_ulong8[8] __attribute__((aligned(64)));
+typedef uint64_t cl_ulong16[16] __attribute__((aligned(128)));
+
+typedef float cl_float2[2] __attribute__((aligned(8)));
+typedef float cl_float4[4] __attribute__((aligned(16)));
+typedef float cl_float8[8] __attribute__((aligned(32)));
+typedef float cl_float16[16] __attribute__((aligned(64)));
+
+typedef double cl_double2[2] __attribute__((aligned(16)));
+typedef double cl_double4[4] __attribute__((aligned(32)));
+typedef double cl_double8[8] __attribute__((aligned(64)));
+typedef double cl_double16[16] __attribute__((aligned(128)));
+#endif
+
+#include <stddef.h>
+
+/* and a few goodies to go with them */
+#define CL_CHAR_BIT 8
+#define CL_SCHAR_MAX 127
+#define CL_SCHAR_MIN (-127-1)
+#define CL_CHAR_MAX CL_SCHAR_MAX
+#define CL_CHAR_MIN CL_SCHAR_MIN
+#define CL_UCHAR_MAX 255
+#define CL_SHRT_MAX 32767
+#define CL_SHRT_MIN (-32767-1)
+#define CL_USHRT_MAX 65535
+#define CL_INT_MAX 2147483647
+#define CL_INT_MIN (-2147483647-1)
+#define CL_UINT_MAX 0xffffffffU
+#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
+#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
+#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
+
+#define CL_FLT_DIG 6
+#define CL_FLT_MANT_DIG 24
+#define CL_FLT_MAX_10_EXP +38
+#define CL_FLT_MAX_EXP +128
+#define CL_FLT_MIN_10_EXP -37
+#define CL_FLT_MIN_EXP -125
+#define CL_FLT_RADIX 2
+#define CL_FLT_MAX 0x1.fffffep127f
+#define CL_FLT_MIN 0x1.0p-126f
+#define CL_FLT_EPSILON 0x1.0p-23f
+
+#define CL_DBL_DIG 15
+#define CL_DBL_MANT_DIG 53
+#define CL_DBL_MAX_10_EXP +308
+#define CL_DBL_MAX_EXP +1024
+#define CL_DBL_MIN_10_EXP -307
+#define CL_DBL_MIN_EXP -1021
+#define CL_DBL_RADIX 2
+#define CL_DBL_MAX 0x1.fffffffffffffp1023
+#define CL_DBL_MIN 0x1.0p-1022
+#define CL_DBL_EPSILON 0x1.0p-52
+
+/* There are no vector types for half */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // __CL_PLATFORM_H
diff --git a/tests/bullet/src/btBulletCollisionCommon.h b/tests/bullet/src/btBulletCollisionCommon.h
new file mode 100644
index 00000000..472690c1
--- /dev/null
+++ b/tests/bullet/src/btBulletCollisionCommon.h
@@ -0,0 +1,69 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BULLET_COLLISION_COMMON_H
+#define BULLET_COLLISION_COMMON_H
+
+///Common headerfile includes for Bullet Collision Detection
+
+///Bullet's btCollisionWorld and btCollisionObject definitions
+#include "BulletCollision/CollisionDispatch/btCollisionWorld.h"
+#include "BulletCollision/CollisionDispatch/btCollisionObject.h"
+
+///Collision Shapes
+#include "BulletCollision/CollisionShapes/btBoxShape.h"
+#include "BulletCollision/CollisionShapes/btSphereShape.h"
+#include "BulletCollision/CollisionShapes/btCapsuleShape.h"
+#include "BulletCollision/CollisionShapes/btCylinderShape.h"
+#include "BulletCollision/CollisionShapes/btConeShape.h"
+#include "BulletCollision/CollisionShapes/btStaticPlaneShape.h"
+#include "BulletCollision/CollisionShapes/btConvexHullShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleMesh.h"
+#include "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleMeshShape.h"
+#include "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.h"
+#include "BulletCollision/CollisionShapes/btCompoundShape.h"
+#include "BulletCollision/CollisionShapes/btTetrahedronShape.h"
+#include "BulletCollision/CollisionShapes/btEmptyShape.h"
+#include "BulletCollision/CollisionShapes/btMultiSphereShape.h"
+#include "BulletCollision/CollisionShapes/btUniformScalingShape.h"
+
+///Narrowphase Collision Detector
+#include "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.h"
+
+//btSphereBoxCollisionAlgorithm is broken, use gjk for now
+//#include "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.h"
+#include "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h"
+
+///Dispatching and generation of collision pairs (broadphase)
+#include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h"
+#include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h"
+#include "BulletCollision/BroadphaseCollision/btAxisSweep3.h"
+#include "BulletCollision/BroadphaseCollision/btMultiSapBroadphase.h"
+#include "BulletCollision/BroadphaseCollision/btDbvtBroadphase.h"
+
+///Math library & Utils
+#include "LinearMath/btQuaternion.h"
+#include "LinearMath/btTransform.h"
+#include "LinearMath/btDefaultMotionState.h"
+#include "LinearMath/btQuickprof.h"
+#include "LinearMath/btIDebugDraw.h"
+#include "LinearMath/btSerializer.h"
+
+
+#endif //BULLET_COLLISION_COMMON_H
+
diff --git a/tests/bullet/src/btBulletDynamicsCommon.h b/tests/bullet/src/btBulletDynamicsCommon.h
new file mode 100644
index 00000000..db8b3798
--- /dev/null
+++ b/tests/bullet/src/btBulletDynamicsCommon.h
@@ -0,0 +1,49 @@
+/*
+Bullet Continuous Collision Detection and Physics Library
+Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+#ifndef BULLET_DYNAMICS_COMMON_H
+#define BULLET_DYNAMICS_COMMON_H
+
+///Common headerfile includes for Bullet Dynamics, including Collision Detection
+#include "btBulletCollisionCommon.h"
+
+#include "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h"
+#include "BulletDynamics/Dynamics/btContinuousDynamicsWorld.h"
+
+#include "BulletDynamics/Dynamics/btSimpleDynamicsWorld.h"
+#include "BulletDynamics/Dynamics/btRigidBody.h"
+
+#include "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btConeTwistConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btUniversalConstraint.h"
+#include "BulletDynamics/ConstraintSolver/btHinge2Constraint.h"
+
+#include "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.h"
+
+
+///Vehicle simulation, with wheel contact simulated by raycasts
+#include "BulletDynamics/Vehicle/btRaycastVehicle.h"
+
+
+
+
+
+
+#endif //BULLET_DYNAMICS_COMMON_H
+
diff --git a/tests/bullet/src/ibmsdk/Makefile b/tests/bullet/src/ibmsdk/Makefile
new file mode 100644
index 00000000..1a0453ee
--- /dev/null
+++ b/tests/bullet/src/ibmsdk/Makefile
@@ -0,0 +1,16 @@
+#### Visit Bullet library ibmsdk dirs and build code
+
+DIRS := \
+../BulletCollision/ibmsdk \
+../BulletDynamics/ibmsdk \
+../LinearMath/ibmsdk
+
+IBM_CELLSDK_VERSION := $(shell if [ -d /opt/cell ]; then echo "3.0"; fi)
+
+ifeq ("$(IBM_CELLSDK_VERSION)","3.0")
+ CELL_TOP ?= /opt/cell/sdk
+ include $(CELL_TOP)/buildutils/make.footer
+else
+ CELL_TOP ?= /opt/ibm/cell-sdk/prototype
+ include $(CELL_TOP)/make.footer
+endif
diff --git a/tests/bullet/src/vectormath/scalar/boolInVec.h b/tests/bullet/src/vectormath/scalar/boolInVec.h
new file mode 100644
index 00000000..c5eeeebd
--- /dev/null
+++ b/tests/bullet/src/vectormath/scalar/boolInVec.h
@@ -0,0 +1,225 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef _BOOLINVEC_H
+#define _BOOLINVEC_H
+
+#include <math.h>
+namespace Vectormath {
+
+class floatInVec;
+
+//--------------------------------------------------------------------------------------------------
+// boolInVec class
+//
+
+class boolInVec
+{
+private:
+ unsigned int mData;
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline boolInVec( ) { };
+
+ // Construct from a value converted from float
+ //
+ inline boolInVec(floatInVec vec);
+
+ // Explicit cast from bool
+ //
+ explicit inline boolInVec(bool scalar);
+
+ // Explicit cast to bool
+ //
+ inline bool getAsBool() const;
+
+#ifndef _VECTORMATH_NO_SCALAR_CAST
+ // Implicit cast to bool
+ //
+ inline operator bool() const;
+#endif
+
+ // Boolean negation operator
+ //
+ inline const boolInVec operator ! () const;
+
+ // Assignment operator
+ //
+ inline boolInVec& operator = (boolInVec vec);
+
+ // Boolean and assignment operator
+ //
+ inline boolInVec& operator &= (boolInVec vec);
+
+ // Boolean exclusive or assignment operator
+ //
+ inline boolInVec& operator ^= (boolInVec vec);
+
+ // Boolean or assignment operator
+ //
+ inline boolInVec& operator |= (boolInVec vec);
+
+};
+
+// Equal operator
+//
+inline const boolInVec operator == (boolInVec vec0, boolInVec vec1);
+
+// Not equal operator
+//
+inline const boolInVec operator != (boolInVec vec0, boolInVec vec1);
+
+// And operator
+//
+inline const boolInVec operator & (boolInVec vec0, boolInVec vec1);
+
+// Exclusive or operator
+//
+inline const boolInVec operator ^ (boolInVec vec0, boolInVec vec1);
+
+// Or operator
+//
+inline const boolInVec operator | (boolInVec vec0, boolInVec vec1);
+
+// Conditionally select between two values
+//
+inline const boolInVec select(boolInVec vec0, boolInVec vec1, boolInVec select_vec1);
+
+
+} // namespace Vectormath
+
+
+//--------------------------------------------------------------------------------------------------
+// boolInVec implementation
+//
+
+#include "floatInVec.h"
+
+namespace Vectormath {
+
+inline
+boolInVec::boolInVec(floatInVec vec)
+{
+ *this = (vec != floatInVec(0.0f));
+}
+
+inline
+boolInVec::boolInVec(bool scalar)
+{
+ mData = -(int)scalar;
+}
+
+inline
+bool
+boolInVec::getAsBool() const
+{
+ return (mData > 0);
+}
+
+#ifndef _VECTORMATH_NO_SCALAR_CAST
+inline
+boolInVec::operator bool() const
+{
+ return getAsBool();
+}
+#endif
+
+inline
+const boolInVec
+boolInVec::operator ! () const
+{
+ return boolInVec(!mData);
+}
+
+inline
+boolInVec&
+boolInVec::operator = (boolInVec vec)
+{
+ mData = vec.mData;
+ return *this;
+}
+
+inline
+boolInVec&
+boolInVec::operator &= (boolInVec vec)
+{
+ *this = *this & vec;
+ return *this;
+}
+
+inline
+boolInVec&
+boolInVec::operator ^= (boolInVec vec)
+{
+ *this = *this ^ vec;
+ return *this;
+}
+
+inline
+boolInVec&
+boolInVec::operator |= (boolInVec vec)
+{
+ *this = *this | vec;
+ return *this;
+}
+
+inline
+const boolInVec
+operator == (boolInVec vec0, boolInVec vec1)
+{
+ return boolInVec(vec0.getAsBool() == vec1.getAsBool());
+}
+
+inline
+const boolInVec
+operator != (boolInVec vec0, boolInVec vec1)
+{
+ return !(vec0 == vec1);
+}
+
+inline
+const boolInVec
+operator & (boolInVec vec0, boolInVec vec1)
+{
+ return boolInVec(vec0.getAsBool() & vec1.getAsBool());
+}
+
+inline
+const boolInVec
+operator | (boolInVec vec0, boolInVec vec1)
+{
+ return boolInVec(vec0.getAsBool() | vec1.getAsBool());
+}
+
+inline
+const boolInVec
+operator ^ (boolInVec vec0, boolInVec vec1)
+{
+ return boolInVec(vec0.getAsBool() ^ vec1.getAsBool());
+}
+
+inline
+const boolInVec
+select(boolInVec vec0, boolInVec vec1, boolInVec select_vec1)
+{
+ return (select_vec1.getAsBool() == 0) ? vec0 : vec1;
+}
+
+} // namespace Vectormath
+
+#endif // boolInVec_h
diff --git a/tests/bullet/src/vectormath/scalar/floatInVec.h b/tests/bullet/src/vectormath/scalar/floatInVec.h
new file mode 100644
index 00000000..12d89e43
--- /dev/null
+++ b/tests/bullet/src/vectormath/scalar/floatInVec.h
@@ -0,0 +1,343 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+#ifndef _FLOATINVEC_H
+#define _FLOATINVEC_H
+
+#include <math.h>
+namespace Vectormath {
+
+class boolInVec;
+
+//--------------------------------------------------------------------------------------------------
+// floatInVec class
+//
+
+// A class representing a scalar float value contained in a vector register
+// This class does not support fastmath
+class floatInVec
+{
+private:
+ float mData;
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline floatInVec( ) { };
+
+ // Construct from a value converted from bool
+ //
+ inline floatInVec(boolInVec vec);
+
+ // Explicit cast from float
+ //
+ explicit inline floatInVec(float scalar);
+
+ // Explicit cast to float
+ //
+ inline float getAsFloat() const;
+
+#ifndef _VECTORMATH_NO_SCALAR_CAST
+ // Implicit cast to float
+ //
+ inline operator float() const;
+#endif
+
+ // Post increment (add 1.0f)
+ //
+ inline const floatInVec operator ++ (int);
+
+ // Post decrement (subtract 1.0f)
+ //
+ inline const floatInVec operator -- (int);
+
+ // Pre increment (add 1.0f)
+ //
+ inline floatInVec& operator ++ ();
+
+ // Pre decrement (subtract 1.0f)
+ //
+ inline floatInVec& operator -- ();
+
+ // Negation operator
+ //
+ inline const floatInVec operator - () const;
+
+ // Assignment operator
+ //
+ inline floatInVec& operator = (floatInVec vec);
+
+ // Multiplication assignment operator
+ //
+ inline floatInVec& operator *= (floatInVec vec);
+
+ // Division assignment operator
+ //
+ inline floatInVec& operator /= (floatInVec vec);
+
+ // Addition assignment operator
+ //
+ inline floatInVec& operator += (floatInVec vec);
+
+ // Subtraction assignment operator
+ //
+ inline floatInVec& operator -= (floatInVec vec);
+
+};
+
+// Multiplication operator
+//
+inline const floatInVec operator * (floatInVec vec0, floatInVec vec1);
+
+// Division operator
+//
+inline const floatInVec operator / (floatInVec vec0, floatInVec vec1);
+
+// Addition operator
+//
+inline const floatInVec operator + (floatInVec vec0, floatInVec vec1);
+
+// Subtraction operator
+//
+inline const floatInVec operator - (floatInVec vec0, floatInVec vec1);
+
+// Less than operator
+//
+inline const boolInVec operator < (floatInVec vec0, floatInVec vec1);
+
+// Less than or equal operator
+//
+inline const boolInVec operator <= (floatInVec vec0, floatInVec vec1);
+
+// Greater than operator
+//
+inline const boolInVec operator > (floatInVec vec0, floatInVec vec1);
+
+// Greater than or equal operator
+//
+inline const boolInVec operator >= (floatInVec vec0, floatInVec vec1);
+
+// Equal operator
+//
+inline const boolInVec operator == (floatInVec vec0, floatInVec vec1);
+
+// Not equal operator
+//
+inline const boolInVec operator != (floatInVec vec0, floatInVec vec1);
+
+// Conditionally select between two values
+//
+inline const floatInVec select(floatInVec vec0, floatInVec vec1, boolInVec select_vec1);
+
+
+} // namespace Vectormath
+
+
+//--------------------------------------------------------------------------------------------------
+// floatInVec implementation
+//
+
+#include "boolInVec.h"
+
+namespace Vectormath {
+
+inline
+floatInVec::floatInVec(boolInVec vec)
+{
+ mData = float(vec.getAsBool());
+}
+
+inline
+floatInVec::floatInVec(float scalar)
+{
+ mData = scalar;
+}
+
+inline
+float
+floatInVec::getAsFloat() const
+{
+ return mData;
+}
+
+#ifndef _VECTORMATH_NO_SCALAR_CAST
+inline
+floatInVec::operator float() const
+{
+ return getAsFloat();
+}
+#endif
+
+inline
+const floatInVec
+floatInVec::operator ++ (int)
+{
+ float olddata = mData;
+ operator ++();
+ return floatInVec(olddata);
+}
+
+inline
+const floatInVec
+floatInVec::operator -- (int)
+{
+ float olddata = mData;
+ operator --();
+ return floatInVec(olddata);
+}
+
+inline
+floatInVec&
+floatInVec::operator ++ ()
+{
+ *this += floatInVec(1.0f);
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator -- ()
+{
+ *this -= floatInVec(1.0f);
+ return *this;
+}
+
+inline
+const floatInVec
+floatInVec::operator - () const
+{
+ return floatInVec(-mData);
+}
+
+inline
+floatInVec&
+floatInVec::operator = (floatInVec vec)
+{
+ mData = vec.mData;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator *= (floatInVec vec)
+{
+ *this = *this * vec;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator /= (floatInVec vec)
+{
+ *this = *this / vec;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator += (floatInVec vec)
+{
+ *this = *this + vec;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator -= (floatInVec vec)
+{
+ *this = *this - vec;
+ return *this;
+}
+
+inline
+const floatInVec
+operator * (floatInVec vec0, floatInVec vec1)
+{
+ return floatInVec(vec0.getAsFloat() * vec1.getAsFloat());
+}
+
+inline
+const floatInVec
+operator / (floatInVec num, floatInVec den)
+{
+ return floatInVec(num.getAsFloat() / den.getAsFloat());
+}
+
+inline
+const floatInVec
+operator + (floatInVec vec0, floatInVec vec1)
+{
+ return floatInVec(vec0.getAsFloat() + vec1.getAsFloat());
+}
+
+inline
+const floatInVec
+operator - (floatInVec vec0, floatInVec vec1)
+{
+ return floatInVec(vec0.getAsFloat() - vec1.getAsFloat());
+}
+
+inline
+const boolInVec
+operator < (floatInVec vec0, floatInVec vec1)
+{
+ return boolInVec(vec0.getAsFloat() < vec1.getAsFloat());
+}
+
+inline
+const boolInVec
+operator <= (floatInVec vec0, floatInVec vec1)
+{
+ return !(vec0 > vec1);
+}
+
+inline
+const boolInVec
+operator > (floatInVec vec0, floatInVec vec1)
+{
+ return boolInVec(vec0.getAsFloat() > vec1.getAsFloat());
+}
+
+inline
+const boolInVec
+operator >= (floatInVec vec0, floatInVec vec1)
+{
+ return !(vec0 < vec1);
+}
+
+inline
+const boolInVec
+operator == (floatInVec vec0, floatInVec vec1)
+{
+ return boolInVec(vec0.getAsFloat() == vec1.getAsFloat());
+}
+
+inline
+const boolInVec
+operator != (floatInVec vec0, floatInVec vec1)
+{
+ return !(vec0 == vec1);
+}
+
+inline
+const floatInVec
+select(floatInVec vec0, floatInVec vec1, boolInVec select_vec1)
+{
+ return (select_vec1.getAsBool() == 0) ? vec0 : vec1;
+}
+
+} // namespace Vectormath
+
+#endif // floatInVec_h
diff --git a/tests/bullet/src/vectormath/scalar/mat_aos.h b/tests/bullet/src/vectormath/scalar/mat_aos.h
new file mode 100644
index 00000000..e103243d
--- /dev/null
+++ b/tests/bullet/src/vectormath/scalar/mat_aos.h
@@ -0,0 +1,1630 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef _VECTORMATH_MAT_AOS_CPP_H
+#define _VECTORMATH_MAT_AOS_CPP_H
+
+namespace Vectormath {
+namespace Aos {
+
+//-----------------------------------------------------------------------------
+// Constants
+
+#define _VECTORMATH_PI_OVER_2 1.570796327f
+
+//-----------------------------------------------------------------------------
+// Definitions
+
+inline Matrix3::Matrix3( const Matrix3 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+}
+
+inline Matrix3::Matrix3( float scalar )
+{
+ mCol0 = Vector3( scalar );
+ mCol1 = Vector3( scalar );
+ mCol2 = Vector3( scalar );
+}
+
+inline Matrix3::Matrix3( const Quat & unitQuat )
+{
+ float qx, qy, qz, qw, qx2, qy2, qz2, qxqx2, qyqy2, qzqz2, qxqy2, qyqz2, qzqw2, qxqz2, qyqw2, qxqw2;
+ qx = unitQuat.getX();
+ qy = unitQuat.getY();
+ qz = unitQuat.getZ();
+ qw = unitQuat.getW();
+ qx2 = ( qx + qx );
+ qy2 = ( qy + qy );
+ qz2 = ( qz + qz );
+ qxqx2 = ( qx * qx2 );
+ qxqy2 = ( qx * qy2 );
+ qxqz2 = ( qx * qz2 );
+ qxqw2 = ( qw * qx2 );
+ qyqy2 = ( qy * qy2 );
+ qyqz2 = ( qy * qz2 );
+ qyqw2 = ( qw * qy2 );
+ qzqz2 = ( qz * qz2 );
+ qzqw2 = ( qw * qz2 );
+ mCol0 = Vector3( ( ( 1.0f - qyqy2 ) - qzqz2 ), ( qxqy2 + qzqw2 ), ( qxqz2 - qyqw2 ) );
+ mCol1 = Vector3( ( qxqy2 - qzqw2 ), ( ( 1.0f - qxqx2 ) - qzqz2 ), ( qyqz2 + qxqw2 ) );
+ mCol2 = Vector3( ( qxqz2 + qyqw2 ), ( qyqz2 - qxqw2 ), ( ( 1.0f - qxqx2 ) - qyqy2 ) );
+}
+
+inline Matrix3::Matrix3( const Vector3 & _col0, const Vector3 & _col1, const Vector3 & _col2 )
+{
+ mCol0 = _col0;
+ mCol1 = _col1;
+ mCol2 = _col2;
+}
+
+inline Matrix3 & Matrix3::setCol0( const Vector3 & _col0 )
+{
+ mCol0 = _col0;
+ return *this;
+}
+
+inline Matrix3 & Matrix3::setCol1( const Vector3 & _col1 )
+{
+ mCol1 = _col1;
+ return *this;
+}
+
+inline Matrix3 & Matrix3::setCol2( const Vector3 & _col2 )
+{
+ mCol2 = _col2;
+ return *this;
+}
+
+inline Matrix3 & Matrix3::setCol( int col, const Vector3 & vec )
+{
+ *(&mCol0 + col) = vec;
+ return *this;
+}
+
+inline Matrix3 & Matrix3::setRow( int row, const Vector3 & vec )
+{
+ mCol0.setElem( row, vec.getElem( 0 ) );
+ mCol1.setElem( row, vec.getElem( 1 ) );
+ mCol2.setElem( row, vec.getElem( 2 ) );
+ return *this;
+}
+
+inline Matrix3 & Matrix3::setElem( int col, int row, float val )
+{
+ Vector3 tmpV3_0;
+ tmpV3_0 = this->getCol( col );
+ tmpV3_0.setElem( row, val );
+ this->setCol( col, tmpV3_0 );
+ return *this;
+}
+
+inline float Matrix3::getElem( int col, int row ) const
+{
+ return this->getCol( col ).getElem( row );
+}
+
+inline const Vector3 Matrix3::getCol0( ) const
+{
+ return mCol0;
+}
+
+inline const Vector3 Matrix3::getCol1( ) const
+{
+ return mCol1;
+}
+
+inline const Vector3 Matrix3::getCol2( ) const
+{
+ return mCol2;
+}
+
+inline const Vector3 Matrix3::getCol( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+inline const Vector3 Matrix3::getRow( int row ) const
+{
+ return Vector3( mCol0.getElem( row ), mCol1.getElem( row ), mCol2.getElem( row ) );
+}
+
+inline Vector3 & Matrix3::operator []( int col )
+{
+ return *(&mCol0 + col);
+}
+
+inline const Vector3 Matrix3::operator []( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+inline Matrix3 & Matrix3::operator =( const Matrix3 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+ return *this;
+}
+
+inline const Matrix3 transpose( const Matrix3 & mat )
+{
+ return Matrix3(
+ Vector3( mat.getCol0().getX(), mat.getCol1().getX(), mat.getCol2().getX() ),
+ Vector3( mat.getCol0().getY(), mat.getCol1().getY(), mat.getCol2().getY() ),
+ Vector3( mat.getCol0().getZ(), mat.getCol1().getZ(), mat.getCol2().getZ() )
+ );
+}
+
+inline const Matrix3 inverse( const Matrix3 & mat )
+{
+ Vector3 tmp0, tmp1, tmp2;
+ float detinv;
+ tmp0 = cross( mat.getCol1(), mat.getCol2() );
+ tmp1 = cross( mat.getCol2(), mat.getCol0() );
+ tmp2 = cross( mat.getCol0(), mat.getCol1() );
+ detinv = ( 1.0f / dot( mat.getCol2(), tmp2 ) );
+ return Matrix3(
+ Vector3( ( tmp0.getX() * detinv ), ( tmp1.getX() * detinv ), ( tmp2.getX() * detinv ) ),
+ Vector3( ( tmp0.getY() * detinv ), ( tmp1.getY() * detinv ), ( tmp2.getY() * detinv ) ),
+ Vector3( ( tmp0.getZ() * detinv ), ( tmp1.getZ() * detinv ), ( tmp2.getZ() * detinv ) )
+ );
+}
+
+inline float determinant( const Matrix3 & mat )
+{
+ return dot( mat.getCol2(), cross( mat.getCol0(), mat.getCol1() ) );
+}
+
+inline const Matrix3 Matrix3::operator +( const Matrix3 & mat ) const
+{
+ return Matrix3(
+ ( mCol0 + mat.mCol0 ),
+ ( mCol1 + mat.mCol1 ),
+ ( mCol2 + mat.mCol2 )
+ );
+}
+
+inline const Matrix3 Matrix3::operator -( const Matrix3 & mat ) const
+{
+ return Matrix3(
+ ( mCol0 - mat.mCol0 ),
+ ( mCol1 - mat.mCol1 ),
+ ( mCol2 - mat.mCol2 )
+ );
+}
+
+inline Matrix3 & Matrix3::operator +=( const Matrix3 & mat )
+{
+ *this = *this + mat;
+ return *this;
+}
+
+inline Matrix3 & Matrix3::operator -=( const Matrix3 & mat )
+{
+ *this = *this - mat;
+ return *this;
+}
+
+inline const Matrix3 Matrix3::operator -( ) const
+{
+ return Matrix3(
+ ( -mCol0 ),
+ ( -mCol1 ),
+ ( -mCol2 )
+ );
+}
+
+inline const Matrix3 absPerElem( const Matrix3 & mat )
+{
+ return Matrix3(
+ absPerElem( mat.getCol0() ),
+ absPerElem( mat.getCol1() ),
+ absPerElem( mat.getCol2() )
+ );
+}
+
+inline const Matrix3 Matrix3::operator *( float scalar ) const
+{
+ return Matrix3(
+ ( mCol0 * scalar ),
+ ( mCol1 * scalar ),
+ ( mCol2 * scalar )
+ );
+}
+
+inline Matrix3 & Matrix3::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+inline const Matrix3 operator *( float scalar, const Matrix3 & mat )
+{
+ return mat * scalar;
+}
+
+inline const Vector3 Matrix3::operator *( const Vector3 & vec ) const
+{
+ return Vector3(
+ ( ( ( mCol0.getX() * vec.getX() ) + ( mCol1.getX() * vec.getY() ) ) + ( mCol2.getX() * vec.getZ() ) ),
+ ( ( ( mCol0.getY() * vec.getX() ) + ( mCol1.getY() * vec.getY() ) ) + ( mCol2.getY() * vec.getZ() ) ),
+ ( ( ( mCol0.getZ() * vec.getX() ) + ( mCol1.getZ() * vec.getY() ) ) + ( mCol2.getZ() * vec.getZ() ) )
+ );
+}
+
+inline const Matrix3 Matrix3::operator *( const Matrix3 & mat ) const
+{
+ return Matrix3(
+ ( *this * mat.mCol0 ),
+ ( *this * mat.mCol1 ),
+ ( *this * mat.mCol2 )
+ );
+}
+
+inline Matrix3 & Matrix3::operator *=( const Matrix3 & mat )
+{
+ *this = *this * mat;
+ return *this;
+}
+
+inline const Matrix3 mulPerElem( const Matrix3 & mat0, const Matrix3 & mat1 )
+{
+ return Matrix3(
+ mulPerElem( mat0.getCol0(), mat1.getCol0() ),
+ mulPerElem( mat0.getCol1(), mat1.getCol1() ),
+ mulPerElem( mat0.getCol2(), mat1.getCol2() )
+ );
+}
+
+inline const Matrix3 Matrix3::identity( )
+{
+ return Matrix3(
+ Vector3::xAxis( ),
+ Vector3::yAxis( ),
+ Vector3::zAxis( )
+ );
+}
+
+inline const Matrix3 Matrix3::rotationX( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Matrix3(
+ Vector3::xAxis( ),
+ Vector3( 0.0f, c, s ),
+ Vector3( 0.0f, -s, c )
+ );
+}
+
+inline const Matrix3 Matrix3::rotationY( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Matrix3(
+ Vector3( c, 0.0f, -s ),
+ Vector3::yAxis( ),
+ Vector3( s, 0.0f, c )
+ );
+}
+
+inline const Matrix3 Matrix3::rotationZ( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Matrix3(
+ Vector3( c, s, 0.0f ),
+ Vector3( -s, c, 0.0f ),
+ Vector3::zAxis( )
+ );
+}
+
+inline const Matrix3 Matrix3::rotationZYX( const Vector3 & radiansXYZ )
+{
+ float sX, cX, sY, cY, sZ, cZ, tmp0, tmp1;
+ sX = sinf( radiansXYZ.getX() );
+ cX = cosf( radiansXYZ.getX() );
+ sY = sinf( radiansXYZ.getY() );
+ cY = cosf( radiansXYZ.getY() );
+ sZ = sinf( radiansXYZ.getZ() );
+ cZ = cosf( radiansXYZ.getZ() );
+ tmp0 = ( cZ * sY );
+ tmp1 = ( sZ * sY );
+ return Matrix3(
+ Vector3( ( cZ * cY ), ( sZ * cY ), -sY ),
+ Vector3( ( ( tmp0 * sX ) - ( sZ * cX ) ), ( ( tmp1 * sX ) + ( cZ * cX ) ), ( cY * sX ) ),
+ Vector3( ( ( tmp0 * cX ) + ( sZ * sX ) ), ( ( tmp1 * cX ) - ( cZ * sX ) ), ( cY * cX ) )
+ );
+}
+
+inline const Matrix3 Matrix3::rotation( float radians, const Vector3 & unitVec )
+{
+ float x, y, z, s, c, oneMinusC, xy, yz, zx;
+ s = sinf( radians );
+ c = cosf( radians );
+ x = unitVec.getX();
+ y = unitVec.getY();
+ z = unitVec.getZ();
+ xy = ( x * y );
+ yz = ( y * z );
+ zx = ( z * x );
+ oneMinusC = ( 1.0f - c );
+ return Matrix3(
+ Vector3( ( ( ( x * x ) * oneMinusC ) + c ), ( ( xy * oneMinusC ) + ( z * s ) ), ( ( zx * oneMinusC ) - ( y * s ) ) ),
+ Vector3( ( ( xy * oneMinusC ) - ( z * s ) ), ( ( ( y * y ) * oneMinusC ) + c ), ( ( yz * oneMinusC ) + ( x * s ) ) ),
+ Vector3( ( ( zx * oneMinusC ) + ( y * s ) ), ( ( yz * oneMinusC ) - ( x * s ) ), ( ( ( z * z ) * oneMinusC ) + c ) )
+ );
+}
+
+inline const Matrix3 Matrix3::rotation( const Quat & unitQuat )
+{
+ return Matrix3( unitQuat );
+}
+
+inline const Matrix3 Matrix3::scale( const Vector3 & scaleVec )
+{
+ return Matrix3(
+ Vector3( scaleVec.getX(), 0.0f, 0.0f ),
+ Vector3( 0.0f, scaleVec.getY(), 0.0f ),
+ Vector3( 0.0f, 0.0f, scaleVec.getZ() )
+ );
+}
+
+inline const Matrix3 appendScale( const Matrix3 & mat, const Vector3 & scaleVec )
+{
+ return Matrix3(
+ ( mat.getCol0() * scaleVec.getX( ) ),
+ ( mat.getCol1() * scaleVec.getY( ) ),
+ ( mat.getCol2() * scaleVec.getZ( ) )
+ );
+}
+
+inline const Matrix3 prependScale( const Vector3 & scaleVec, const Matrix3 & mat )
+{
+ return Matrix3(
+ mulPerElem( mat.getCol0(), scaleVec ),
+ mulPerElem( mat.getCol1(), scaleVec ),
+ mulPerElem( mat.getCol2(), scaleVec )
+ );
+}
+
+inline const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, bool select1 )
+{
+ return Matrix3(
+ select( mat0.getCol0(), mat1.getCol0(), select1 ),
+ select( mat0.getCol1(), mat1.getCol1(), select1 ),
+ select( mat0.getCol2(), mat1.getCol2(), select1 )
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+inline void print( const Matrix3 & mat )
+{
+ print( mat.getRow( 0 ) );
+ print( mat.getRow( 1 ) );
+ print( mat.getRow( 2 ) );
+}
+
+inline void print( const Matrix3 & mat, const char * name )
+{
+ printf("%s:\n", name);
+ print( mat );
+}
+
+#endif
+
+inline Matrix4::Matrix4( const Matrix4 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+ mCol3 = mat.mCol3;
+}
+
+inline Matrix4::Matrix4( float scalar )
+{
+ mCol0 = Vector4( scalar );
+ mCol1 = Vector4( scalar );
+ mCol2 = Vector4( scalar );
+ mCol3 = Vector4( scalar );
+}
+
+inline Matrix4::Matrix4( const Transform3 & mat )
+{
+ mCol0 = Vector4( mat.getCol0(), 0.0f );
+ mCol1 = Vector4( mat.getCol1(), 0.0f );
+ mCol2 = Vector4( mat.getCol2(), 0.0f );
+ mCol3 = Vector4( mat.getCol3(), 1.0f );
+}
+
+inline Matrix4::Matrix4( const Vector4 & _col0, const Vector4 & _col1, const Vector4 & _col2, const Vector4 & _col3 )
+{
+ mCol0 = _col0;
+ mCol1 = _col1;
+ mCol2 = _col2;
+ mCol3 = _col3;
+}
+
+inline Matrix4::Matrix4( const Matrix3 & mat, const Vector3 & translateVec )
+{
+ mCol0 = Vector4( mat.getCol0(), 0.0f );
+ mCol1 = Vector4( mat.getCol1(), 0.0f );
+ mCol2 = Vector4( mat.getCol2(), 0.0f );
+ mCol3 = Vector4( translateVec, 1.0f );
+}
+
+inline Matrix4::Matrix4( const Quat & unitQuat, const Vector3 & translateVec )
+{
+ Matrix3 mat;
+ mat = Matrix3( unitQuat );
+ mCol0 = Vector4( mat.getCol0(), 0.0f );
+ mCol1 = Vector4( mat.getCol1(), 0.0f );
+ mCol2 = Vector4( mat.getCol2(), 0.0f );
+ mCol3 = Vector4( translateVec, 1.0f );
+}
+
+inline Matrix4 & Matrix4::setCol0( const Vector4 & _col0 )
+{
+ mCol0 = _col0;
+ return *this;
+}
+
+inline Matrix4 & Matrix4::setCol1( const Vector4 & _col1 )
+{
+ mCol1 = _col1;
+ return *this;
+}
+
+inline Matrix4 & Matrix4::setCol2( const Vector4 & _col2 )
+{
+ mCol2 = _col2;
+ return *this;
+}
+
+inline Matrix4 & Matrix4::setCol3( const Vector4 & _col3 )
+{
+ mCol3 = _col3;
+ return *this;
+}
+
+inline Matrix4 & Matrix4::setCol( int col, const Vector4 & vec )
+{
+ *(&mCol0 + col) = vec;
+ return *this;
+}
+
+inline Matrix4 & Matrix4::setRow( int row, const Vector4 & vec )
+{
+ mCol0.setElem( row, vec.getElem( 0 ) );
+ mCol1.setElem( row, vec.getElem( 1 ) );
+ mCol2.setElem( row, vec.getElem( 2 ) );
+ mCol3.setElem( row, vec.getElem( 3 ) );
+ return *this;
+}
+
+inline Matrix4 & Matrix4::setElem( int col, int row, float val )
+{
+ Vector4 tmpV3_0;
+ tmpV3_0 = this->getCol( col );
+ tmpV3_0.setElem( row, val );
+ this->setCol( col, tmpV3_0 );
+ return *this;
+}
+
+inline float Matrix4::getElem( int col, int row ) const
+{
+ return this->getCol( col ).getElem( row );
+}
+
+inline const Vector4 Matrix4::getCol0( ) const
+{
+ return mCol0;
+}
+
+inline const Vector4 Matrix4::getCol1( ) const
+{
+ return mCol1;
+}
+
+inline const Vector4 Matrix4::getCol2( ) const
+{
+ return mCol2;
+}
+
+inline const Vector4 Matrix4::getCol3( ) const
+{
+ return mCol3;
+}
+
+inline const Vector4 Matrix4::getCol( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+inline const Vector4 Matrix4::getRow( int row ) const
+{
+ return Vector4( mCol0.getElem( row ), mCol1.getElem( row ), mCol2.getElem( row ), mCol3.getElem( row ) );
+}
+
+inline Vector4 & Matrix4::operator []( int col )
+{
+ return *(&mCol0 + col);
+}
+
+inline const Vector4 Matrix4::operator []( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+inline Matrix4 & Matrix4::operator =( const Matrix4 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+ mCol3 = mat.mCol3;
+ return *this;
+}
+
+inline const Matrix4 transpose( const Matrix4 & mat )
+{
+ return Matrix4(
+ Vector4( mat.getCol0().getX(), mat.getCol1().getX(), mat.getCol2().getX(), mat.getCol3().getX() ),
+ Vector4( mat.getCol0().getY(), mat.getCol1().getY(), mat.getCol2().getY(), mat.getCol3().getY() ),
+ Vector4( mat.getCol0().getZ(), mat.getCol1().getZ(), mat.getCol2().getZ(), mat.getCol3().getZ() ),
+ Vector4( mat.getCol0().getW(), mat.getCol1().getW(), mat.getCol2().getW(), mat.getCol3().getW() )
+ );
+}
+
+inline const Matrix4 inverse( const Matrix4 & mat )
+{
+ Vector4 res0, res1, res2, res3;
+ float mA, mB, mC, mD, mE, mF, mG, mH, mI, mJ, mK, mL, mM, mN, mO, mP, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, detInv;
+ mA = mat.getCol0().getX();
+ mB = mat.getCol0().getY();
+ mC = mat.getCol0().getZ();
+ mD = mat.getCol0().getW();
+ mE = mat.getCol1().getX();
+ mF = mat.getCol1().getY();
+ mG = mat.getCol1().getZ();
+ mH = mat.getCol1().getW();
+ mI = mat.getCol2().getX();
+ mJ = mat.getCol2().getY();
+ mK = mat.getCol2().getZ();
+ mL = mat.getCol2().getW();
+ mM = mat.getCol3().getX();
+ mN = mat.getCol3().getY();
+ mO = mat.getCol3().getZ();
+ mP = mat.getCol3().getW();
+ tmp0 = ( ( mK * mD ) - ( mC * mL ) );
+ tmp1 = ( ( mO * mH ) - ( mG * mP ) );
+ tmp2 = ( ( mB * mK ) - ( mJ * mC ) );
+ tmp3 = ( ( mF * mO ) - ( mN * mG ) );
+ tmp4 = ( ( mJ * mD ) - ( mB * mL ) );
+ tmp5 = ( ( mN * mH ) - ( mF * mP ) );
+ res0.setX( ( ( ( mJ * tmp1 ) - ( mL * tmp3 ) ) - ( mK * tmp5 ) ) );
+ res0.setY( ( ( ( mN * tmp0 ) - ( mP * tmp2 ) ) - ( mO * tmp4 ) ) );
+ res0.setZ( ( ( ( mD * tmp3 ) + ( mC * tmp5 ) ) - ( mB * tmp1 ) ) );
+ res0.setW( ( ( ( mH * tmp2 ) + ( mG * tmp4 ) ) - ( mF * tmp0 ) ) );
+ detInv = ( 1.0f / ( ( ( ( mA * res0.getX() ) + ( mE * res0.getY() ) ) + ( mI * res0.getZ() ) ) + ( mM * res0.getW() ) ) );
+ res1.setX( ( mI * tmp1 ) );
+ res1.setY( ( mM * tmp0 ) );
+ res1.setZ( ( mA * tmp1 ) );
+ res1.setW( ( mE * tmp0 ) );
+ res3.setX( ( mI * tmp3 ) );
+ res3.setY( ( mM * tmp2 ) );
+ res3.setZ( ( mA * tmp3 ) );
+ res3.setW( ( mE * tmp2 ) );
+ res2.setX( ( mI * tmp5 ) );
+ res2.setY( ( mM * tmp4 ) );
+ res2.setZ( ( mA * tmp5 ) );
+ res2.setW( ( mE * tmp4 ) );
+ tmp0 = ( ( mI * mB ) - ( mA * mJ ) );
+ tmp1 = ( ( mM * mF ) - ( mE * mN ) );
+ tmp2 = ( ( mI * mD ) - ( mA * mL ) );
+ tmp3 = ( ( mM * mH ) - ( mE * mP ) );
+ tmp4 = ( ( mI * mC ) - ( mA * mK ) );
+ tmp5 = ( ( mM * mG ) - ( mE * mO ) );
+ res2.setX( ( ( ( mL * tmp1 ) - ( mJ * tmp3 ) ) + res2.getX() ) );
+ res2.setY( ( ( ( mP * tmp0 ) - ( mN * tmp2 ) ) + res2.getY() ) );
+ res2.setZ( ( ( ( mB * tmp3 ) - ( mD * tmp1 ) ) - res2.getZ() ) );
+ res2.setW( ( ( ( mF * tmp2 ) - ( mH * tmp0 ) ) - res2.getW() ) );
+ res3.setX( ( ( ( mJ * tmp5 ) - ( mK * tmp1 ) ) + res3.getX() ) );
+ res3.setY( ( ( ( mN * tmp4 ) - ( mO * tmp0 ) ) + res3.getY() ) );
+ res3.setZ( ( ( ( mC * tmp1 ) - ( mB * tmp5 ) ) - res3.getZ() ) );
+ res3.setW( ( ( ( mG * tmp0 ) - ( mF * tmp4 ) ) - res3.getW() ) );
+ res1.setX( ( ( ( mK * tmp3 ) - ( mL * tmp5 ) ) - res1.getX() ) );
+ res1.setY( ( ( ( mO * tmp2 ) - ( mP * tmp4 ) ) - res1.getY() ) );
+ res1.setZ( ( ( ( mD * tmp5 ) - ( mC * tmp3 ) ) + res1.getZ() ) );
+ res1.setW( ( ( ( mH * tmp4 ) - ( mG * tmp2 ) ) + res1.getW() ) );
+ return Matrix4(
+ ( res0 * detInv ),
+ ( res1 * detInv ),
+ ( res2 * detInv ),
+ ( res3 * detInv )
+ );
+}
+
+inline const Matrix4 affineInverse( const Matrix4 & mat )
+{
+ Transform3 affineMat;
+ affineMat.setCol0( mat.getCol0().getXYZ( ) );
+ affineMat.setCol1( mat.getCol1().getXYZ( ) );
+ affineMat.setCol2( mat.getCol2().getXYZ( ) );
+ affineMat.setCol3( mat.getCol3().getXYZ( ) );
+ return Matrix4( inverse( affineMat ) );
+}
+
+inline const Matrix4 orthoInverse( const Matrix4 & mat )
+{
+ Transform3 affineMat;
+ affineMat.setCol0( mat.getCol0().getXYZ( ) );
+ affineMat.setCol1( mat.getCol1().getXYZ( ) );
+ affineMat.setCol2( mat.getCol2().getXYZ( ) );
+ affineMat.setCol3( mat.getCol3().getXYZ( ) );
+ return Matrix4( orthoInverse( affineMat ) );
+}
+
+inline float determinant( const Matrix4 & mat )
+{
+ float dx, dy, dz, dw, mA, mB, mC, mD, mE, mF, mG, mH, mI, mJ, mK, mL, mM, mN, mO, mP, tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ mA = mat.getCol0().getX();
+ mB = mat.getCol0().getY();
+ mC = mat.getCol0().getZ();
+ mD = mat.getCol0().getW();
+ mE = mat.getCol1().getX();
+ mF = mat.getCol1().getY();
+ mG = mat.getCol1().getZ();
+ mH = mat.getCol1().getW();
+ mI = mat.getCol2().getX();
+ mJ = mat.getCol2().getY();
+ mK = mat.getCol2().getZ();
+ mL = mat.getCol2().getW();
+ mM = mat.getCol3().getX();
+ mN = mat.getCol3().getY();
+ mO = mat.getCol3().getZ();
+ mP = mat.getCol3().getW();
+ tmp0 = ( ( mK * mD ) - ( mC * mL ) );
+ tmp1 = ( ( mO * mH ) - ( mG * mP ) );
+ tmp2 = ( ( mB * mK ) - ( mJ * mC ) );
+ tmp3 = ( ( mF * mO ) - ( mN * mG ) );
+ tmp4 = ( ( mJ * mD ) - ( mB * mL ) );
+ tmp5 = ( ( mN * mH ) - ( mF * mP ) );
+ dx = ( ( ( mJ * tmp1 ) - ( mL * tmp3 ) ) - ( mK * tmp5 ) );
+ dy = ( ( ( mN * tmp0 ) - ( mP * tmp2 ) ) - ( mO * tmp4 ) );
+ dz = ( ( ( mD * tmp3 ) + ( mC * tmp5 ) ) - ( mB * tmp1 ) );
+ dw = ( ( ( mH * tmp2 ) + ( mG * tmp4 ) ) - ( mF * tmp0 ) );
+ return ( ( ( ( mA * dx ) + ( mE * dy ) ) + ( mI * dz ) ) + ( mM * dw ) );
+}
+
+inline const Matrix4 Matrix4::operator +( const Matrix4 & mat ) const
+{
+ return Matrix4(
+ ( mCol0 + mat.mCol0 ),
+ ( mCol1 + mat.mCol1 ),
+ ( mCol2 + mat.mCol2 ),
+ ( mCol3 + mat.mCol3 )
+ );
+}
+
+inline const Matrix4 Matrix4::operator -( const Matrix4 & mat ) const
+{
+ return Matrix4(
+ ( mCol0 - mat.mCol0 ),
+ ( mCol1 - mat.mCol1 ),
+ ( mCol2 - mat.mCol2 ),
+ ( mCol3 - mat.mCol3 )
+ );
+}
+
+inline Matrix4 & Matrix4::operator +=( const Matrix4 & mat )
+{
+ *this = *this + mat;
+ return *this;
+}
+
+inline Matrix4 & Matrix4::operator -=( const Matrix4 & mat )
+{
+ *this = *this - mat;
+ return *this;
+}
+
+inline const Matrix4 Matrix4::operator -( ) const
+{
+ return Matrix4(
+ ( -mCol0 ),
+ ( -mCol1 ),
+ ( -mCol2 ),
+ ( -mCol3 )
+ );
+}
+
+inline const Matrix4 absPerElem( const Matrix4 & mat )
+{
+ return Matrix4(
+ absPerElem( mat.getCol0() ),
+ absPerElem( mat.getCol1() ),
+ absPerElem( mat.getCol2() ),
+ absPerElem( mat.getCol3() )
+ );
+}
+
+inline const Matrix4 Matrix4::operator *( float scalar ) const
+{
+ return Matrix4(
+ ( mCol0 * scalar ),
+ ( mCol1 * scalar ),
+ ( mCol2 * scalar ),
+ ( mCol3 * scalar )
+ );
+}
+
+inline Matrix4 & Matrix4::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+inline const Matrix4 operator *( float scalar, const Matrix4 & mat )
+{
+ return mat * scalar;
+}
+
+inline const Vector4 Matrix4::operator *( const Vector4 & vec ) const
+{
+ return Vector4(
+ ( ( ( ( mCol0.getX() * vec.getX() ) + ( mCol1.getX() * vec.getY() ) ) + ( mCol2.getX() * vec.getZ() ) ) + ( mCol3.getX() * vec.getW() ) ),
+ ( ( ( ( mCol0.getY() * vec.getX() ) + ( mCol1.getY() * vec.getY() ) ) + ( mCol2.getY() * vec.getZ() ) ) + ( mCol3.getY() * vec.getW() ) ),
+ ( ( ( ( mCol0.getZ() * vec.getX() ) + ( mCol1.getZ() * vec.getY() ) ) + ( mCol2.getZ() * vec.getZ() ) ) + ( mCol3.getZ() * vec.getW() ) ),
+ ( ( ( ( mCol0.getW() * vec.getX() ) + ( mCol1.getW() * vec.getY() ) ) + ( mCol2.getW() * vec.getZ() ) ) + ( mCol3.getW() * vec.getW() ) )
+ );
+}
+
+inline const Vector4 Matrix4::operator *( const Vector3 & vec ) const
+{
+ return Vector4(
+ ( ( ( mCol0.getX() * vec.getX() ) + ( mCol1.getX() * vec.getY() ) ) + ( mCol2.getX() * vec.getZ() ) ),
+ ( ( ( mCol0.getY() * vec.getX() ) + ( mCol1.getY() * vec.getY() ) ) + ( mCol2.getY() * vec.getZ() ) ),
+ ( ( ( mCol0.getZ() * vec.getX() ) + ( mCol1.getZ() * vec.getY() ) ) + ( mCol2.getZ() * vec.getZ() ) ),
+ ( ( ( mCol0.getW() * vec.getX() ) + ( mCol1.getW() * vec.getY() ) ) + ( mCol2.getW() * vec.getZ() ) )
+ );
+}
+
+inline const Vector4 Matrix4::operator *( const Point3 & pnt ) const
+{
+ return Vector4(
+ ( ( ( ( mCol0.getX() * pnt.getX() ) + ( mCol1.getX() * pnt.getY() ) ) + ( mCol2.getX() * pnt.getZ() ) ) + mCol3.getX() ),
+ ( ( ( ( mCol0.getY() * pnt.getX() ) + ( mCol1.getY() * pnt.getY() ) ) + ( mCol2.getY() * pnt.getZ() ) ) + mCol3.getY() ),
+ ( ( ( ( mCol0.getZ() * pnt.getX() ) + ( mCol1.getZ() * pnt.getY() ) ) + ( mCol2.getZ() * pnt.getZ() ) ) + mCol3.getZ() ),
+ ( ( ( ( mCol0.getW() * pnt.getX() ) + ( mCol1.getW() * pnt.getY() ) ) + ( mCol2.getW() * pnt.getZ() ) ) + mCol3.getW() )
+ );
+}
+
+inline const Matrix4 Matrix4::operator *( const Matrix4 & mat ) const
+{
+ return Matrix4(
+ ( *this * mat.mCol0 ),
+ ( *this * mat.mCol1 ),
+ ( *this * mat.mCol2 ),
+ ( *this * mat.mCol3 )
+ );
+}
+
+inline Matrix4 & Matrix4::operator *=( const Matrix4 & mat )
+{
+ *this = *this * mat;
+ return *this;
+}
+
+inline const Matrix4 Matrix4::operator *( const Transform3 & tfrm ) const
+{
+ return Matrix4(
+ ( *this * tfrm.getCol0() ),
+ ( *this * tfrm.getCol1() ),
+ ( *this * tfrm.getCol2() ),
+ ( *this * Point3( tfrm.getCol3() ) )
+ );
+}
+
+inline Matrix4 & Matrix4::operator *=( const Transform3 & tfrm )
+{
+ *this = *this * tfrm;
+ return *this;
+}
+
+inline const Matrix4 mulPerElem( const Matrix4 & mat0, const Matrix4 & mat1 )
+{
+ return Matrix4(
+ mulPerElem( mat0.getCol0(), mat1.getCol0() ),
+ mulPerElem( mat0.getCol1(), mat1.getCol1() ),
+ mulPerElem( mat0.getCol2(), mat1.getCol2() ),
+ mulPerElem( mat0.getCol3(), mat1.getCol3() )
+ );
+}
+
+inline const Matrix4 Matrix4::identity( )
+{
+ return Matrix4(
+ Vector4::xAxis( ),
+ Vector4::yAxis( ),
+ Vector4::zAxis( ),
+ Vector4::wAxis( )
+ );
+}
+
+inline Matrix4 & Matrix4::setUpper3x3( const Matrix3 & mat3 )
+{
+ mCol0.setXYZ( mat3.getCol0() );
+ mCol1.setXYZ( mat3.getCol1() );
+ mCol2.setXYZ( mat3.getCol2() );
+ return *this;
+}
+
+inline const Matrix3 Matrix4::getUpper3x3( ) const
+{
+ return Matrix3(
+ mCol0.getXYZ( ),
+ mCol1.getXYZ( ),
+ mCol2.getXYZ( )
+ );
+}
+
+inline Matrix4 & Matrix4::setTranslation( const Vector3 & translateVec )
+{
+ mCol3.setXYZ( translateVec );
+ return *this;
+}
+
+inline const Vector3 Matrix4::getTranslation( ) const
+{
+ return mCol3.getXYZ( );
+}
+
+inline const Matrix4 Matrix4::rotationX( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Matrix4(
+ Vector4::xAxis( ),
+ Vector4( 0.0f, c, s, 0.0f ),
+ Vector4( 0.0f, -s, c, 0.0f ),
+ Vector4::wAxis( )
+ );
+}
+
+inline const Matrix4 Matrix4::rotationY( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Matrix4(
+ Vector4( c, 0.0f, -s, 0.0f ),
+ Vector4::yAxis( ),
+ Vector4( s, 0.0f, c, 0.0f ),
+ Vector4::wAxis( )
+ );
+}
+
+inline const Matrix4 Matrix4::rotationZ( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Matrix4(
+ Vector4( c, s, 0.0f, 0.0f ),
+ Vector4( -s, c, 0.0f, 0.0f ),
+ Vector4::zAxis( ),
+ Vector4::wAxis( )
+ );
+}
+
+inline const Matrix4 Matrix4::rotationZYX( const Vector3 & radiansXYZ )
+{
+ float sX, cX, sY, cY, sZ, cZ, tmp0, tmp1;
+ sX = sinf( radiansXYZ.getX() );
+ cX = cosf( radiansXYZ.getX() );
+ sY = sinf( radiansXYZ.getY() );
+ cY = cosf( radiansXYZ.getY() );
+ sZ = sinf( radiansXYZ.getZ() );
+ cZ = cosf( radiansXYZ.getZ() );
+ tmp0 = ( cZ * sY );
+ tmp1 = ( sZ * sY );
+ return Matrix4(
+ Vector4( ( cZ * cY ), ( sZ * cY ), -sY, 0.0f ),
+ Vector4( ( ( tmp0 * sX ) - ( sZ * cX ) ), ( ( tmp1 * sX ) + ( cZ * cX ) ), ( cY * sX ), 0.0f ),
+ Vector4( ( ( tmp0 * cX ) + ( sZ * sX ) ), ( ( tmp1 * cX ) - ( cZ * sX ) ), ( cY * cX ), 0.0f ),
+ Vector4::wAxis( )
+ );
+}
+
+inline const Matrix4 Matrix4::rotation( float radians, const Vector3 & unitVec )
+{
+ float x, y, z, s, c, oneMinusC, xy, yz, zx;
+ s = sinf( radians );
+ c = cosf( radians );
+ x = unitVec.getX();
+ y = unitVec.getY();
+ z = unitVec.getZ();
+ xy = ( x * y );
+ yz = ( y * z );
+ zx = ( z * x );
+ oneMinusC = ( 1.0f - c );
+ return Matrix4(
+ Vector4( ( ( ( x * x ) * oneMinusC ) + c ), ( ( xy * oneMinusC ) + ( z * s ) ), ( ( zx * oneMinusC ) - ( y * s ) ), 0.0f ),
+ Vector4( ( ( xy * oneMinusC ) - ( z * s ) ), ( ( ( y * y ) * oneMinusC ) + c ), ( ( yz * oneMinusC ) + ( x * s ) ), 0.0f ),
+ Vector4( ( ( zx * oneMinusC ) + ( y * s ) ), ( ( yz * oneMinusC ) - ( x * s ) ), ( ( ( z * z ) * oneMinusC ) + c ), 0.0f ),
+ Vector4::wAxis( )
+ );
+}
+
+inline const Matrix4 Matrix4::rotation( const Quat & unitQuat )
+{
+ return Matrix4( Transform3::rotation( unitQuat ) );
+}
+
+inline const Matrix4 Matrix4::scale( const Vector3 & scaleVec )
+{
+ return Matrix4(
+ Vector4( scaleVec.getX(), 0.0f, 0.0f, 0.0f ),
+ Vector4( 0.0f, scaleVec.getY(), 0.0f, 0.0f ),
+ Vector4( 0.0f, 0.0f, scaleVec.getZ(), 0.0f ),
+ Vector4::wAxis( )
+ );
+}
+
+inline const Matrix4 appendScale( const Matrix4 & mat, const Vector3 & scaleVec )
+{
+ return Matrix4(
+ ( mat.getCol0() * scaleVec.getX( ) ),
+ ( mat.getCol1() * scaleVec.getY( ) ),
+ ( mat.getCol2() * scaleVec.getZ( ) ),
+ mat.getCol3()
+ );
+}
+
+inline const Matrix4 prependScale( const Vector3 & scaleVec, const Matrix4 & mat )
+{
+ Vector4 scale4;
+ scale4 = Vector4( scaleVec, 1.0f );
+ return Matrix4(
+ mulPerElem( mat.getCol0(), scale4 ),
+ mulPerElem( mat.getCol1(), scale4 ),
+ mulPerElem( mat.getCol2(), scale4 ),
+ mulPerElem( mat.getCol3(), scale4 )
+ );
+}
+
+inline const Matrix4 Matrix4::translation( const Vector3 & translateVec )
+{
+ return Matrix4(
+ Vector4::xAxis( ),
+ Vector4::yAxis( ),
+ Vector4::zAxis( ),
+ Vector4( translateVec, 1.0f )
+ );
+}
+
+inline const Matrix4 Matrix4::lookAt( const Point3 & eyePos, const Point3 & lookAtPos, const Vector3 & upVec )
+{
+ Matrix4 m4EyeFrame;
+ Vector3 v3X, v3Y, v3Z;
+ v3Y = normalize( upVec );
+ v3Z = normalize( ( eyePos - lookAtPos ) );
+ v3X = normalize( cross( v3Y, v3Z ) );
+ v3Y = cross( v3Z, v3X );
+ m4EyeFrame = Matrix4( Vector4( v3X ), Vector4( v3Y ), Vector4( v3Z ), Vector4( eyePos ) );
+ return orthoInverse( m4EyeFrame );
+}
+
+inline const Matrix4 Matrix4::perspective( float fovyRadians, float aspect, float zNear, float zFar )
+{
+ float f, rangeInv;
+ f = tanf( ( (float)( _VECTORMATH_PI_OVER_2 ) - ( 0.5f * fovyRadians ) ) );
+ rangeInv = ( 1.0f / ( zNear - zFar ) );
+ return Matrix4(
+ Vector4( ( f / aspect ), 0.0f, 0.0f, 0.0f ),
+ Vector4( 0.0f, f, 0.0f, 0.0f ),
+ Vector4( 0.0f, 0.0f, ( ( zNear + zFar ) * rangeInv ), -1.0f ),
+ Vector4( 0.0f, 0.0f, ( ( ( zNear * zFar ) * rangeInv ) * 2.0f ), 0.0f )
+ );
+}
+
+inline const Matrix4 Matrix4::frustum( float left, float right, float bottom, float top, float zNear, float zFar )
+{
+ float sum_rl, sum_tb, sum_nf, inv_rl, inv_tb, inv_nf, n2;
+ sum_rl = ( right + left );
+ sum_tb = ( top + bottom );
+ sum_nf = ( zNear + zFar );
+ inv_rl = ( 1.0f / ( right - left ) );
+ inv_tb = ( 1.0f / ( top - bottom ) );
+ inv_nf = ( 1.0f / ( zNear - zFar ) );
+ n2 = ( zNear + zNear );
+ return Matrix4(
+ Vector4( ( n2 * inv_rl ), 0.0f, 0.0f, 0.0f ),
+ Vector4( 0.0f, ( n2 * inv_tb ), 0.0f, 0.0f ),
+ Vector4( ( sum_rl * inv_rl ), ( sum_tb * inv_tb ), ( sum_nf * inv_nf ), -1.0f ),
+ Vector4( 0.0f, 0.0f, ( ( n2 * inv_nf ) * zFar ), 0.0f )
+ );
+}
+
+inline const Matrix4 Matrix4::orthographic( float left, float right, float bottom, float top, float zNear, float zFar )
+{
+ float sum_rl, sum_tb, sum_nf, inv_rl, inv_tb, inv_nf;
+ sum_rl = ( right + left );
+ sum_tb = ( top + bottom );
+ sum_nf = ( zNear + zFar );
+ inv_rl = ( 1.0f / ( right - left ) );
+ inv_tb = ( 1.0f / ( top - bottom ) );
+ inv_nf = ( 1.0f / ( zNear - zFar ) );
+ return Matrix4(
+ Vector4( ( inv_rl + inv_rl ), 0.0f, 0.0f, 0.0f ),
+ Vector4( 0.0f, ( inv_tb + inv_tb ), 0.0f, 0.0f ),
+ Vector4( 0.0f, 0.0f, ( inv_nf + inv_nf ), 0.0f ),
+ Vector4( ( -sum_rl * inv_rl ), ( -sum_tb * inv_tb ), ( sum_nf * inv_nf ), 1.0f )
+ );
+}
+
+inline const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, bool select1 )
+{
+ return Matrix4(
+ select( mat0.getCol0(), mat1.getCol0(), select1 ),
+ select( mat0.getCol1(), mat1.getCol1(), select1 ),
+ select( mat0.getCol2(), mat1.getCol2(), select1 ),
+ select( mat0.getCol3(), mat1.getCol3(), select1 )
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+inline void print( const Matrix4 & mat )
+{
+ print( mat.getRow( 0 ) );
+ print( mat.getRow( 1 ) );
+ print( mat.getRow( 2 ) );
+ print( mat.getRow( 3 ) );
+}
+
+inline void print( const Matrix4 & mat, const char * name )
+{
+ printf("%s:\n", name);
+ print( mat );
+}
+
+#endif
+
+inline Transform3::Transform3( const Transform3 & tfrm )
+{
+ mCol0 = tfrm.mCol0;
+ mCol1 = tfrm.mCol1;
+ mCol2 = tfrm.mCol2;
+ mCol3 = tfrm.mCol3;
+}
+
+inline Transform3::Transform3( float scalar )
+{
+ mCol0 = Vector3( scalar );
+ mCol1 = Vector3( scalar );
+ mCol2 = Vector3( scalar );
+ mCol3 = Vector3( scalar );
+}
+
+inline Transform3::Transform3( const Vector3 & _col0, const Vector3 & _col1, const Vector3 & _col2, const Vector3 & _col3 )
+{
+ mCol0 = _col0;
+ mCol1 = _col1;
+ mCol2 = _col2;
+ mCol3 = _col3;
+}
+
+inline Transform3::Transform3( const Matrix3 & tfrm, const Vector3 & translateVec )
+{
+ this->setUpper3x3( tfrm );
+ this->setTranslation( translateVec );
+}
+
+inline Transform3::Transform3( const Quat & unitQuat, const Vector3 & translateVec )
+{
+ this->setUpper3x3( Matrix3( unitQuat ) );
+ this->setTranslation( translateVec );
+}
+
+inline Transform3 & Transform3::setCol0( const Vector3 & _col0 )
+{
+ mCol0 = _col0;
+ return *this;
+}
+
+inline Transform3 & Transform3::setCol1( const Vector3 & _col1 )
+{
+ mCol1 = _col1;
+ return *this;
+}
+
+inline Transform3 & Transform3::setCol2( const Vector3 & _col2 )
+{
+ mCol2 = _col2;
+ return *this;
+}
+
+inline Transform3 & Transform3::setCol3( const Vector3 & _col3 )
+{
+ mCol3 = _col3;
+ return *this;
+}
+
+inline Transform3 & Transform3::setCol( int col, const Vector3 & vec )
+{
+ *(&mCol0 + col) = vec;
+ return *this;
+}
+
+inline Transform3 & Transform3::setRow( int row, const Vector4 & vec )
+{
+ mCol0.setElem( row, vec.getElem( 0 ) );
+ mCol1.setElem( row, vec.getElem( 1 ) );
+ mCol2.setElem( row, vec.getElem( 2 ) );
+ mCol3.setElem( row, vec.getElem( 3 ) );
+ return *this;
+}
+
+inline Transform3 & Transform3::setElem( int col, int row, float val )
+{
+ Vector3 tmpV3_0;
+ tmpV3_0 = this->getCol( col );
+ tmpV3_0.setElem( row, val );
+ this->setCol( col, tmpV3_0 );
+ return *this;
+}
+
+inline float Transform3::getElem( int col, int row ) const
+{
+ return this->getCol( col ).getElem( row );
+}
+
+inline const Vector3 Transform3::getCol0( ) const
+{
+ return mCol0;
+}
+
+inline const Vector3 Transform3::getCol1( ) const
+{
+ return mCol1;
+}
+
+inline const Vector3 Transform3::getCol2( ) const
+{
+ return mCol2;
+}
+
+inline const Vector3 Transform3::getCol3( ) const
+{
+ return mCol3;
+}
+
+inline const Vector3 Transform3::getCol( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+inline const Vector4 Transform3::getRow( int row ) const
+{
+ return Vector4( mCol0.getElem( row ), mCol1.getElem( row ), mCol2.getElem( row ), mCol3.getElem( row ) );
+}
+
+inline Vector3 & Transform3::operator []( int col )
+{
+ return *(&mCol0 + col);
+}
+
+inline const Vector3 Transform3::operator []( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+inline Transform3 & Transform3::operator =( const Transform3 & tfrm )
+{
+ mCol0 = tfrm.mCol0;
+ mCol1 = tfrm.mCol1;
+ mCol2 = tfrm.mCol2;
+ mCol3 = tfrm.mCol3;
+ return *this;
+}
+
+inline const Transform3 inverse( const Transform3 & tfrm )
+{
+ Vector3 tmp0, tmp1, tmp2, inv0, inv1, inv2;
+ float detinv;
+ tmp0 = cross( tfrm.getCol1(), tfrm.getCol2() );
+ tmp1 = cross( tfrm.getCol2(), tfrm.getCol0() );
+ tmp2 = cross( tfrm.getCol0(), tfrm.getCol1() );
+ detinv = ( 1.0f / dot( tfrm.getCol2(), tmp2 ) );
+ inv0 = Vector3( ( tmp0.getX() * detinv ), ( tmp1.getX() * detinv ), ( tmp2.getX() * detinv ) );
+ inv1 = Vector3( ( tmp0.getY() * detinv ), ( tmp1.getY() * detinv ), ( tmp2.getY() * detinv ) );
+ inv2 = Vector3( ( tmp0.getZ() * detinv ), ( tmp1.getZ() * detinv ), ( tmp2.getZ() * detinv ) );
+ return Transform3(
+ inv0,
+ inv1,
+ inv2,
+ Vector3( ( -( ( inv0 * tfrm.getCol3().getX() ) + ( ( inv1 * tfrm.getCol3().getY() ) + ( inv2 * tfrm.getCol3().getZ() ) ) ) ) )
+ );
+}
+
+inline const Transform3 orthoInverse( const Transform3 & tfrm )
+{
+ Vector3 inv0, inv1, inv2;
+ inv0 = Vector3( tfrm.getCol0().getX(), tfrm.getCol1().getX(), tfrm.getCol2().getX() );
+ inv1 = Vector3( tfrm.getCol0().getY(), tfrm.getCol1().getY(), tfrm.getCol2().getY() );
+ inv2 = Vector3( tfrm.getCol0().getZ(), tfrm.getCol1().getZ(), tfrm.getCol2().getZ() );
+ return Transform3(
+ inv0,
+ inv1,
+ inv2,
+ Vector3( ( -( ( inv0 * tfrm.getCol3().getX() ) + ( ( inv1 * tfrm.getCol3().getY() ) + ( inv2 * tfrm.getCol3().getZ() ) ) ) ) )
+ );
+}
+
+inline const Transform3 absPerElem( const Transform3 & tfrm )
+{
+ return Transform3(
+ absPerElem( tfrm.getCol0() ),
+ absPerElem( tfrm.getCol1() ),
+ absPerElem( tfrm.getCol2() ),
+ absPerElem( tfrm.getCol3() )
+ );
+}
+
+inline const Vector3 Transform3::operator *( const Vector3 & vec ) const
+{
+ return Vector3(
+ ( ( ( mCol0.getX() * vec.getX() ) + ( mCol1.getX() * vec.getY() ) ) + ( mCol2.getX() * vec.getZ() ) ),
+ ( ( ( mCol0.getY() * vec.getX() ) + ( mCol1.getY() * vec.getY() ) ) + ( mCol2.getY() * vec.getZ() ) ),
+ ( ( ( mCol0.getZ() * vec.getX() ) + ( mCol1.getZ() * vec.getY() ) ) + ( mCol2.getZ() * vec.getZ() ) )
+ );
+}
+
+inline const Point3 Transform3::operator *( const Point3 & pnt ) const
+{
+ return Point3(
+ ( ( ( ( mCol0.getX() * pnt.getX() ) + ( mCol1.getX() * pnt.getY() ) ) + ( mCol2.getX() * pnt.getZ() ) ) + mCol3.getX() ),
+ ( ( ( ( mCol0.getY() * pnt.getX() ) + ( mCol1.getY() * pnt.getY() ) ) + ( mCol2.getY() * pnt.getZ() ) ) + mCol3.getY() ),
+ ( ( ( ( mCol0.getZ() * pnt.getX() ) + ( mCol1.getZ() * pnt.getY() ) ) + ( mCol2.getZ() * pnt.getZ() ) ) + mCol3.getZ() )
+ );
+}
+
+inline const Transform3 Transform3::operator *( const Transform3 & tfrm ) const
+{
+ return Transform3(
+ ( *this * tfrm.mCol0 ),
+ ( *this * tfrm.mCol1 ),
+ ( *this * tfrm.mCol2 ),
+ Vector3( ( *this * Point3( tfrm.mCol3 ) ) )
+ );
+}
+
+inline Transform3 & Transform3::operator *=( const Transform3 & tfrm )
+{
+ *this = *this * tfrm;
+ return *this;
+}
+
+inline const Transform3 mulPerElem( const Transform3 & tfrm0, const Transform3 & tfrm1 )
+{
+ return Transform3(
+ mulPerElem( tfrm0.getCol0(), tfrm1.getCol0() ),
+ mulPerElem( tfrm0.getCol1(), tfrm1.getCol1() ),
+ mulPerElem( tfrm0.getCol2(), tfrm1.getCol2() ),
+ mulPerElem( tfrm0.getCol3(), tfrm1.getCol3() )
+ );
+}
+
+inline const Transform3 Transform3::identity( )
+{
+ return Transform3(
+ Vector3::xAxis( ),
+ Vector3::yAxis( ),
+ Vector3::zAxis( ),
+ Vector3( 0.0f )
+ );
+}
+
+inline Transform3 & Transform3::setUpper3x3( const Matrix3 & tfrm )
+{
+ mCol0 = tfrm.getCol0();
+ mCol1 = tfrm.getCol1();
+ mCol2 = tfrm.getCol2();
+ return *this;
+}
+
+inline const Matrix3 Transform3::getUpper3x3( ) const
+{
+ return Matrix3( mCol0, mCol1, mCol2 );
+}
+
+inline Transform3 & Transform3::setTranslation( const Vector3 & translateVec )
+{
+ mCol3 = translateVec;
+ return *this;
+}
+
+inline const Vector3 Transform3::getTranslation( ) const
+{
+ return mCol3;
+}
+
+inline const Transform3 Transform3::rotationX( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Transform3(
+ Vector3::xAxis( ),
+ Vector3( 0.0f, c, s ),
+ Vector3( 0.0f, -s, c ),
+ Vector3( 0.0f )
+ );
+}
+
+inline const Transform3 Transform3::rotationY( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Transform3(
+ Vector3( c, 0.0f, -s ),
+ Vector3::yAxis( ),
+ Vector3( s, 0.0f, c ),
+ Vector3( 0.0f )
+ );
+}
+
+inline const Transform3 Transform3::rotationZ( float radians )
+{
+ float s, c;
+ s = sinf( radians );
+ c = cosf( radians );
+ return Transform3(
+ Vector3( c, s, 0.0f ),
+ Vector3( -s, c, 0.0f ),
+ Vector3::zAxis( ),
+ Vector3( 0.0f )
+ );
+}
+
+inline const Transform3 Transform3::rotationZYX( const Vector3 & radiansXYZ )
+{
+ float sX, cX, sY, cY, sZ, cZ, tmp0, tmp1;
+ sX = sinf( radiansXYZ.getX() );
+ cX = cosf( radiansXYZ.getX() );
+ sY = sinf( radiansXYZ.getY() );
+ cY = cosf( radiansXYZ.getY() );
+ sZ = sinf( radiansXYZ.getZ() );
+ cZ = cosf( radiansXYZ.getZ() );
+ tmp0 = ( cZ * sY );
+ tmp1 = ( sZ * sY );
+ return Transform3(
+ Vector3( ( cZ * cY ), ( sZ * cY ), -sY ),
+ Vector3( ( ( tmp0 * sX ) - ( sZ * cX ) ), ( ( tmp1 * sX ) + ( cZ * cX ) ), ( cY * sX ) ),
+ Vector3( ( ( tmp0 * cX ) + ( sZ * sX ) ), ( ( tmp1 * cX ) - ( cZ * sX ) ), ( cY * cX ) ),
+ Vector3( 0.0f )
+ );
+}
+
+inline const Transform3 Transform3::rotation( float radians, const Vector3 & unitVec )
+{
+ return Transform3( Matrix3::rotation( radians, unitVec ), Vector3( 0.0f ) );
+}
+
+inline const Transform3 Transform3::rotation( const Quat & unitQuat )
+{
+ return Transform3( Matrix3( unitQuat ), Vector3( 0.0f ) );
+}
+
+inline const Transform3 Transform3::scale( const Vector3 & scaleVec )
+{
+ return Transform3(
+ Vector3( scaleVec.getX(), 0.0f, 0.0f ),
+ Vector3( 0.0f, scaleVec.getY(), 0.0f ),
+ Vector3( 0.0f, 0.0f, scaleVec.getZ() ),
+ Vector3( 0.0f )
+ );
+}
+
+inline const Transform3 appendScale( const Transform3 & tfrm, const Vector3 & scaleVec )
+{
+ return Transform3(
+ ( tfrm.getCol0() * scaleVec.getX( ) ),
+ ( tfrm.getCol1() * scaleVec.getY( ) ),
+ ( tfrm.getCol2() * scaleVec.getZ( ) ),
+ tfrm.getCol3()
+ );
+}
+
+inline const Transform3 prependScale( const Vector3 & scaleVec, const Transform3 & tfrm )
+{
+ return Transform3(
+ mulPerElem( tfrm.getCol0(), scaleVec ),
+ mulPerElem( tfrm.getCol1(), scaleVec ),
+ mulPerElem( tfrm.getCol2(), scaleVec ),
+ mulPerElem( tfrm.getCol3(), scaleVec )
+ );
+}
+
+inline const Transform3 Transform3::translation( const Vector3 & translateVec )
+{
+ return Transform3(
+ Vector3::xAxis( ),
+ Vector3::yAxis( ),
+ Vector3::zAxis( ),
+ translateVec
+ );
+}
+
+inline const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, bool select1 )
+{
+ return Transform3(
+ select( tfrm0.getCol0(), tfrm1.getCol0(), select1 ),
+ select( tfrm0.getCol1(), tfrm1.getCol1(), select1 ),
+ select( tfrm0.getCol2(), tfrm1.getCol2(), select1 ),
+ select( tfrm0.getCol3(), tfrm1.getCol3(), select1 )
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+inline void print( const Transform3 & tfrm )
+{
+ print( tfrm.getRow( 0 ) );
+ print( tfrm.getRow( 1 ) );
+ print( tfrm.getRow( 2 ) );
+}
+
+inline void print( const Transform3 & tfrm, const char * name )
+{
+ printf("%s:\n", name);
+ print( tfrm );
+}
+
+#endif
+
+inline Quat::Quat( const Matrix3 & tfrm )
+{
+ float trace, radicand, scale, xx, yx, zx, xy, yy, zy, xz, yz, zz, tmpx, tmpy, tmpz, tmpw, qx, qy, qz, qw;
+ int negTrace, ZgtX, ZgtY, YgtX;
+ int largestXorY, largestYorZ, largestZorX;
+
+ xx = tfrm.getCol0().getX();
+ yx = tfrm.getCol0().getY();
+ zx = tfrm.getCol0().getZ();
+ xy = tfrm.getCol1().getX();
+ yy = tfrm.getCol1().getY();
+ zy = tfrm.getCol1().getZ();
+ xz = tfrm.getCol2().getX();
+ yz = tfrm.getCol2().getY();
+ zz = tfrm.getCol2().getZ();
+
+ trace = ( ( xx + yy ) + zz );
+
+ negTrace = ( trace < 0.0f );
+ ZgtX = zz > xx;
+ ZgtY = zz > yy;
+ YgtX = yy > xx;
+ largestXorY = ( !ZgtX || !ZgtY ) && negTrace;
+ largestYorZ = ( YgtX || ZgtX ) && negTrace;
+ largestZorX = ( ZgtY || !YgtX ) && negTrace;
+
+ if ( largestXorY )
+ {
+ zz = -zz;
+ xy = -xy;
+ }
+ if ( largestYorZ )
+ {
+ xx = -xx;
+ yz = -yz;
+ }
+ if ( largestZorX )
+ {
+ yy = -yy;
+ zx = -zx;
+ }
+
+ radicand = ( ( ( xx + yy ) + zz ) + 1.0f );
+ scale = ( 0.5f * ( 1.0f / sqrtf( radicand ) ) );
+
+ tmpx = ( ( zy - yz ) * scale );
+ tmpy = ( ( xz - zx ) * scale );
+ tmpz = ( ( yx - xy ) * scale );
+ tmpw = ( radicand * scale );
+ qx = tmpx;
+ qy = tmpy;
+ qz = tmpz;
+ qw = tmpw;
+
+ if ( largestXorY )
+ {
+ qx = tmpw;
+ qy = tmpz;
+ qz = tmpy;
+ qw = tmpx;
+ }
+ if ( largestYorZ )
+ {
+ tmpx = qx;
+ tmpz = qz;
+ qx = qy;
+ qy = tmpx;
+ qz = qw;
+ qw = tmpz;
+ }
+
+ mX = qx;
+ mY = qy;
+ mZ = qz;
+ mW = qw;
+}
+
+inline const Matrix3 outer( const Vector3 & tfrm0, const Vector3 & tfrm1 )
+{
+ return Matrix3(
+ ( tfrm0 * tfrm1.getX( ) ),
+ ( tfrm0 * tfrm1.getY( ) ),
+ ( tfrm0 * tfrm1.getZ( ) )
+ );
+}
+
+inline const Matrix4 outer( const Vector4 & tfrm0, const Vector4 & tfrm1 )
+{
+ return Matrix4(
+ ( tfrm0 * tfrm1.getX( ) ),
+ ( tfrm0 * tfrm1.getY( ) ),
+ ( tfrm0 * tfrm1.getZ( ) ),
+ ( tfrm0 * tfrm1.getW( ) )
+ );
+}
+
+inline const Vector3 rowMul( const Vector3 & vec, const Matrix3 & mat )
+{
+ return Vector3(
+ ( ( ( vec.getX() * mat.getCol0().getX() ) + ( vec.getY() * mat.getCol0().getY() ) ) + ( vec.getZ() * mat.getCol0().getZ() ) ),
+ ( ( ( vec.getX() * mat.getCol1().getX() ) + ( vec.getY() * mat.getCol1().getY() ) ) + ( vec.getZ() * mat.getCol1().getZ() ) ),
+ ( ( ( vec.getX() * mat.getCol2().getX() ) + ( vec.getY() * mat.getCol2().getY() ) ) + ( vec.getZ() * mat.getCol2().getZ() ) )
+ );
+}
+
+inline const Matrix3 crossMatrix( const Vector3 & vec )
+{
+ return Matrix3(
+ Vector3( 0.0f, vec.getZ(), -vec.getY() ),
+ Vector3( -vec.getZ(), 0.0f, vec.getX() ),
+ Vector3( vec.getY(), -vec.getX(), 0.0f )
+ );
+}
+
+inline const Matrix3 crossMatrixMul( const Vector3 & vec, const Matrix3 & mat )
+{
+ return Matrix3( cross( vec, mat.getCol0() ), cross( vec, mat.getCol1() ), cross( vec, mat.getCol2() ) );
+}
+
+} // namespace Aos
+} // namespace Vectormath
+
+#endif
diff --git a/tests/bullet/src/vectormath/scalar/quat_aos.h b/tests/bullet/src/vectormath/scalar/quat_aos.h
new file mode 100644
index 00000000..764e0170
--- /dev/null
+++ b/tests/bullet/src/vectormath/scalar/quat_aos.h
@@ -0,0 +1,433 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef _VECTORMATH_QUAT_AOS_CPP_H
+#define _VECTORMATH_QUAT_AOS_CPP_H
+
+//-----------------------------------------------------------------------------
+// Definitions
+
+#ifndef _VECTORMATH_INTERNAL_FUNCTIONS
+#define _VECTORMATH_INTERNAL_FUNCTIONS
+
+#endif
+
+namespace Vectormath {
+namespace Aos {
+
+inline Quat::Quat( const Quat & quat )
+{
+ mX = quat.mX;
+ mY = quat.mY;
+ mZ = quat.mZ;
+ mW = quat.mW;
+}
+
+inline Quat::Quat( float _x, float _y, float _z, float _w )
+{
+ mX = _x;
+ mY = _y;
+ mZ = _z;
+ mW = _w;
+}
+
+inline Quat::Quat( const Vector3 & xyz, float _w )
+{
+ this->setXYZ( xyz );
+ this->setW( _w );
+}
+
+inline Quat::Quat( const Vector4 & vec )
+{
+ mX = vec.getX();
+ mY = vec.getY();
+ mZ = vec.getZ();
+ mW = vec.getW();
+}
+
+inline Quat::Quat( float scalar )
+{
+ mX = scalar;
+ mY = scalar;
+ mZ = scalar;
+ mW = scalar;
+}
+
+inline const Quat Quat::identity( )
+{
+ return Quat( 0.0f, 0.0f, 0.0f, 1.0f );
+}
+
+inline const Quat lerp( float t, const Quat & quat0, const Quat & quat1 )
+{
+ return ( quat0 + ( ( quat1 - quat0 ) * t ) );
+}
+
+inline const Quat slerp( float t, const Quat & unitQuat0, const Quat & unitQuat1 )
+{
+ Quat start;
+ float recipSinAngle, scale0, scale1, cosAngle, angle;
+ cosAngle = dot( unitQuat0, unitQuat1 );
+ if ( cosAngle < 0.0f ) {
+ cosAngle = -cosAngle;
+ start = ( -unitQuat0 );
+ } else {
+ start = unitQuat0;
+ }
+ if ( cosAngle < _VECTORMATH_SLERP_TOL ) {
+ angle = acosf( cosAngle );
+ recipSinAngle = ( 1.0f / sinf( angle ) );
+ scale0 = ( sinf( ( ( 1.0f - t ) * angle ) ) * recipSinAngle );
+ scale1 = ( sinf( ( t * angle ) ) * recipSinAngle );
+ } else {
+ scale0 = ( 1.0f - t );
+ scale1 = t;
+ }
+ return ( ( start * scale0 ) + ( unitQuat1 * scale1 ) );
+}
+
+inline const Quat squad( float t, const Quat & unitQuat0, const Quat & unitQuat1, const Quat & unitQuat2, const Quat & unitQuat3 )
+{
+ Quat tmp0, tmp1;
+ tmp0 = slerp( t, unitQuat0, unitQuat3 );
+ tmp1 = slerp( t, unitQuat1, unitQuat2 );
+ return slerp( ( ( 2.0f * t ) * ( 1.0f - t ) ), tmp0, tmp1 );
+}
+
+inline void loadXYZW( Quat & quat, const float * fptr )
+{
+ quat = Quat( fptr[0], fptr[1], fptr[2], fptr[3] );
+}
+
+inline void storeXYZW( const Quat & quat, float * fptr )
+{
+ fptr[0] = quat.getX();
+ fptr[1] = quat.getY();
+ fptr[2] = quat.getZ();
+ fptr[3] = quat.getW();
+}
+
+inline Quat & Quat::operator =( const Quat & quat )
+{
+ mX = quat.mX;
+ mY = quat.mY;
+ mZ = quat.mZ;
+ mW = quat.mW;
+ return *this;
+}
+
+inline Quat & Quat::setXYZ( const Vector3 & vec )
+{
+ mX = vec.getX();
+ mY = vec.getY();
+ mZ = vec.getZ();
+ return *this;
+}
+
+inline const Vector3 Quat::getXYZ( ) const
+{
+ return Vector3( mX, mY, mZ );
+}
+
+inline Quat & Quat::setX( float _x )
+{
+ mX = _x;
+ return *this;
+}
+
+inline float Quat::getX( ) const
+{
+ return mX;
+}
+
+inline Quat & Quat::setY( float _y )
+{
+ mY = _y;
+ return *this;
+}
+
+inline float Quat::getY( ) const
+{
+ return mY;
+}
+
+inline Quat & Quat::setZ( float _z )
+{
+ mZ = _z;
+ return *this;
+}
+
+inline float Quat::getZ( ) const
+{
+ return mZ;
+}
+
+inline Quat & Quat::setW( float _w )
+{
+ mW = _w;
+ return *this;
+}
+
+inline float Quat::getW( ) const
+{
+ return mW;
+}
+
+inline Quat & Quat::setElem( int idx, float value )
+{
+ *(&mX + idx) = value;
+ return *this;
+}
+
+inline float Quat::getElem( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline float & Quat::operator []( int idx )
+{
+ return *(&mX + idx);
+}
+
+inline float Quat::operator []( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline const Quat Quat::operator +( const Quat & quat ) const
+{
+ return Quat(
+ ( mX + quat.mX ),
+ ( mY + quat.mY ),
+ ( mZ + quat.mZ ),
+ ( mW + quat.mW )
+ );
+}
+
+inline const Quat Quat::operator -( const Quat & quat ) const
+{
+ return Quat(
+ ( mX - quat.mX ),
+ ( mY - quat.mY ),
+ ( mZ - quat.mZ ),
+ ( mW - quat.mW )
+ );
+}
+
+inline const Quat Quat::operator *( float scalar ) const
+{
+ return Quat(
+ ( mX * scalar ),
+ ( mY * scalar ),
+ ( mZ * scalar ),
+ ( mW * scalar )
+ );
+}
+
+inline Quat & Quat::operator +=( const Quat & quat )
+{
+ *this = *this + quat;
+ return *this;
+}
+
+inline Quat & Quat::operator -=( const Quat & quat )
+{
+ *this = *this - quat;
+ return *this;
+}
+
+inline Quat & Quat::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+inline const Quat Quat::operator /( float scalar ) const
+{
+ return Quat(
+ ( mX / scalar ),
+ ( mY / scalar ),
+ ( mZ / scalar ),
+ ( mW / scalar )
+ );
+}
+
+inline Quat & Quat::operator /=( float scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+inline const Quat Quat::operator -( ) const
+{
+ return Quat(
+ -mX,
+ -mY,
+ -mZ,
+ -mW
+ );
+}
+
+inline const Quat operator *( float scalar, const Quat & quat )
+{
+ return quat * scalar;
+}
+
+inline float dot( const Quat & quat0, const Quat & quat1 )
+{
+ float result;
+ result = ( quat0.getX() * quat1.getX() );
+ result = ( result + ( quat0.getY() * quat1.getY() ) );
+ result = ( result + ( quat0.getZ() * quat1.getZ() ) );
+ result = ( result + ( quat0.getW() * quat1.getW() ) );
+ return result;
+}
+
+inline float norm( const Quat & quat )
+{
+ float result;
+ result = ( quat.getX() * quat.getX() );
+ result = ( result + ( quat.getY() * quat.getY() ) );
+ result = ( result + ( quat.getZ() * quat.getZ() ) );
+ result = ( result + ( quat.getW() * quat.getW() ) );
+ return result;
+}
+
+inline float length( const Quat & quat )
+{
+ return ::sqrtf( norm( quat ) );
+}
+
+inline const Quat normalize( const Quat & quat )
+{
+ float lenSqr, lenInv;
+ lenSqr = norm( quat );
+ lenInv = ( 1.0f / sqrtf( lenSqr ) );
+ return Quat(
+ ( quat.getX() * lenInv ),
+ ( quat.getY() * lenInv ),
+ ( quat.getZ() * lenInv ),
+ ( quat.getW() * lenInv )
+ );
+}
+
+inline const Quat Quat::rotation( const Vector3 & unitVec0, const Vector3 & unitVec1 )
+{
+ float cosHalfAngleX2, recipCosHalfAngleX2;
+ cosHalfAngleX2 = sqrtf( ( 2.0f * ( 1.0f + dot( unitVec0, unitVec1 ) ) ) );
+ recipCosHalfAngleX2 = ( 1.0f / cosHalfAngleX2 );
+ return Quat( ( cross( unitVec0, unitVec1 ) * recipCosHalfAngleX2 ), ( cosHalfAngleX2 * 0.5f ) );
+}
+
+inline const Quat Quat::rotation( float radians, const Vector3 & unitVec )
+{
+ float s, c, angle;
+ angle = ( radians * 0.5f );
+ s = sinf( angle );
+ c = cosf( angle );
+ return Quat( ( unitVec * s ), c );
+}
+
+inline const Quat Quat::rotationX( float radians )
+{
+ float s, c, angle;
+ angle = ( radians * 0.5f );
+ s = sinf( angle );
+ c = cosf( angle );
+ return Quat( s, 0.0f, 0.0f, c );
+}
+
+inline const Quat Quat::rotationY( float radians )
+{
+ float s, c, angle;
+ angle = ( radians * 0.5f );
+ s = sinf( angle );
+ c = cosf( angle );
+ return Quat( 0.0f, s, 0.0f, c );
+}
+
+inline const Quat Quat::rotationZ( float radians )
+{
+ float s, c, angle;
+ angle = ( radians * 0.5f );
+ s = sinf( angle );
+ c = cosf( angle );
+ return Quat( 0.0f, 0.0f, s, c );
+}
+
+inline const Quat Quat::operator *( const Quat & quat ) const
+{
+ return Quat(
+ ( ( ( ( mW * quat.mX ) + ( mX * quat.mW ) ) + ( mY * quat.mZ ) ) - ( mZ * quat.mY ) ),
+ ( ( ( ( mW * quat.mY ) + ( mY * quat.mW ) ) + ( mZ * quat.mX ) ) - ( mX * quat.mZ ) ),
+ ( ( ( ( mW * quat.mZ ) + ( mZ * quat.mW ) ) + ( mX * quat.mY ) ) - ( mY * quat.mX ) ),
+ ( ( ( ( mW * quat.mW ) - ( mX * quat.mX ) ) - ( mY * quat.mY ) ) - ( mZ * quat.mZ ) )
+ );
+}
+
+inline Quat & Quat::operator *=( const Quat & quat )
+{
+ *this = *this * quat;
+ return *this;
+}
+
+inline const Vector3 rotate( const Quat & quat, const Vector3 & vec )
+{
+ float tmpX, tmpY, tmpZ, tmpW;
+ tmpX = ( ( ( quat.getW() * vec.getX() ) + ( quat.getY() * vec.getZ() ) ) - ( quat.getZ() * vec.getY() ) );
+ tmpY = ( ( ( quat.getW() * vec.getY() ) + ( quat.getZ() * vec.getX() ) ) - ( quat.getX() * vec.getZ() ) );
+ tmpZ = ( ( ( quat.getW() * vec.getZ() ) + ( quat.getX() * vec.getY() ) ) - ( quat.getY() * vec.getX() ) );
+ tmpW = ( ( ( quat.getX() * vec.getX() ) + ( quat.getY() * vec.getY() ) ) + ( quat.getZ() * vec.getZ() ) );
+ return Vector3(
+ ( ( ( ( tmpW * quat.getX() ) + ( tmpX * quat.getW() ) ) - ( tmpY * quat.getZ() ) ) + ( tmpZ * quat.getY() ) ),
+ ( ( ( ( tmpW * quat.getY() ) + ( tmpY * quat.getW() ) ) - ( tmpZ * quat.getX() ) ) + ( tmpX * quat.getZ() ) ),
+ ( ( ( ( tmpW * quat.getZ() ) + ( tmpZ * quat.getW() ) ) - ( tmpX * quat.getY() ) ) + ( tmpY * quat.getX() ) )
+ );
+}
+
+inline const Quat conj( const Quat & quat )
+{
+ return Quat( -quat.getX(), -quat.getY(), -quat.getZ(), quat.getW() );
+}
+
+inline const Quat select( const Quat & quat0, const Quat & quat1, bool select1 )
+{
+ return Quat(
+ ( select1 )? quat1.getX() : quat0.getX(),
+ ( select1 )? quat1.getY() : quat0.getY(),
+ ( select1 )? quat1.getZ() : quat0.getZ(),
+ ( select1 )? quat1.getW() : quat0.getW()
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+inline void print( const Quat & quat )
+{
+ printf( "( %f %f %f %f )\n", quat.getX(), quat.getY(), quat.getZ(), quat.getW() );
+}
+
+inline void print( const Quat & quat, const char * name )
+{
+ printf( "%s: ( %f %f %f %f )\n", name, quat.getX(), quat.getY(), quat.getZ(), quat.getW() );
+}
+
+#endif
+
+} // namespace Aos
+} // namespace Vectormath
+
+#endif
diff --git a/tests/bullet/src/vectormath/scalar/vec_aos.h b/tests/bullet/src/vectormath/scalar/vec_aos.h
new file mode 100644
index 00000000..46d4d6b3
--- /dev/null
+++ b/tests/bullet/src/vectormath/scalar/vec_aos.h
@@ -0,0 +1,1426 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef _VECTORMATH_VEC_AOS_CPP_H
+#define _VECTORMATH_VEC_AOS_CPP_H
+
+//-----------------------------------------------------------------------------
+// Constants
+
+#define _VECTORMATH_SLERP_TOL 0.999f
+
+//-----------------------------------------------------------------------------
+// Definitions
+
+#ifndef _VECTORMATH_INTERNAL_FUNCTIONS
+#define _VECTORMATH_INTERNAL_FUNCTIONS
+
+#endif
+
+namespace Vectormath {
+namespace Aos {
+
+inline Vector3::Vector3( const Vector3 & vec )
+{
+ mX = vec.mX;
+ mY = vec.mY;
+ mZ = vec.mZ;
+}
+
+inline Vector3::Vector3( float _x, float _y, float _z )
+{
+ mX = _x;
+ mY = _y;
+ mZ = _z;
+}
+
+inline Vector3::Vector3( const Point3 & pnt )
+{
+ mX = pnt.getX();
+ mY = pnt.getY();
+ mZ = pnt.getZ();
+}
+
+inline Vector3::Vector3( float scalar )
+{
+ mX = scalar;
+ mY = scalar;
+ mZ = scalar;
+}
+
+inline const Vector3 Vector3::xAxis( )
+{
+ return Vector3( 1.0f, 0.0f, 0.0f );
+}
+
+inline const Vector3 Vector3::yAxis( )
+{
+ return Vector3( 0.0f, 1.0f, 0.0f );
+}
+
+inline const Vector3 Vector3::zAxis( )
+{
+ return Vector3( 0.0f, 0.0f, 1.0f );
+}
+
+inline const Vector3 lerp( float t, const Vector3 & vec0, const Vector3 & vec1 )
+{
+ return ( vec0 + ( ( vec1 - vec0 ) * t ) );
+}
+
+inline const Vector3 slerp( float t, const Vector3 & unitVec0, const Vector3 & unitVec1 )
+{
+ float recipSinAngle, scale0, scale1, cosAngle, angle;
+ cosAngle = dot( unitVec0, unitVec1 );
+ if ( cosAngle < _VECTORMATH_SLERP_TOL ) {
+ angle = acosf( cosAngle );
+ recipSinAngle = ( 1.0f / sinf( angle ) );
+ scale0 = ( sinf( ( ( 1.0f - t ) * angle ) ) * recipSinAngle );
+ scale1 = ( sinf( ( t * angle ) ) * recipSinAngle );
+ } else {
+ scale0 = ( 1.0f - t );
+ scale1 = t;
+ }
+ return ( ( unitVec0 * scale0 ) + ( unitVec1 * scale1 ) );
+}
+
+inline void loadXYZ( Vector3 & vec, const float * fptr )
+{
+ vec = Vector3( fptr[0], fptr[1], fptr[2] );
+}
+
+inline void storeXYZ( const Vector3 & vec, float * fptr )
+{
+ fptr[0] = vec.getX();
+ fptr[1] = vec.getY();
+ fptr[2] = vec.getZ();
+}
+
+inline void loadHalfFloats( Vector3 & vec, const unsigned short * hfptr )
+{
+ union Data32 {
+ unsigned int u32;
+ float f32;
+ };
+
+ for (int i = 0; i < 3; i++) {
+ unsigned short fp16 = hfptr[i];
+ unsigned int sign = fp16 >> 15;
+ unsigned int exponent = (fp16 >> 10) & ((1 << 5) - 1);
+ unsigned int mantissa = fp16 & ((1 << 10) - 1);
+
+ if (exponent == 0) {
+ // zero
+ mantissa = 0;
+
+ } else if (exponent == 31) {
+ // infinity or nan -> infinity
+ exponent = 255;
+ mantissa = 0;
+
+ } else {
+ exponent += 127 - 15;
+ mantissa <<= 13;
+ }
+
+ Data32 d;
+ d.u32 = (sign << 31) | (exponent << 23) | mantissa;
+ vec[i] = d.f32;
+ }
+}
+
+inline void storeHalfFloats( const Vector3 & vec, unsigned short * hfptr )
+{
+ union Data32 {
+ unsigned int u32;
+ float f32;
+ };
+
+ for (int i = 0; i < 3; i++) {
+ Data32 d;
+ d.f32 = vec[i];
+
+ unsigned int sign = d.u32 >> 31;
+ unsigned int exponent = (d.u32 >> 23) & ((1 << 8) - 1);
+ unsigned int mantissa = d.u32 & ((1 << 23) - 1);;
+
+ if (exponent == 0) {
+ // zero or denorm -> zero
+ mantissa = 0;
+
+ } else if (exponent == 255 && mantissa != 0) {
+ // nan -> infinity
+ exponent = 31;
+ mantissa = 0;
+
+ } else if (exponent >= 127 - 15 + 31) {
+ // overflow or infinity -> infinity
+ exponent = 31;
+ mantissa = 0;
+
+ } else if (exponent <= 127 - 15) {
+ // underflow -> zero
+ exponent = 0;
+ mantissa = 0;
+
+ } else {
+ exponent -= 127 - 15;
+ mantissa >>= 13;
+ }
+
+ hfptr[i] = (unsigned short)((sign << 15) | (exponent << 10) | mantissa);
+ }
+}
+
+inline Vector3 & Vector3::operator =( const Vector3 & vec )
+{
+ mX = vec.mX;
+ mY = vec.mY;
+ mZ = vec.mZ;
+ return *this;
+}
+
+inline Vector3 & Vector3::setX( float _x )
+{
+ mX = _x;
+ return *this;
+}
+
+inline float Vector3::getX( ) const
+{
+ return mX;
+}
+
+inline Vector3 & Vector3::setY( float _y )
+{
+ mY = _y;
+ return *this;
+}
+
+inline float Vector3::getY( ) const
+{
+ return mY;
+}
+
+inline Vector3 & Vector3::setZ( float _z )
+{
+ mZ = _z;
+ return *this;
+}
+
+inline float Vector3::getZ( ) const
+{
+ return mZ;
+}
+
+inline Vector3 & Vector3::setElem( int idx, float value )
+{
+ *(&mX + idx) = value;
+ return *this;
+}
+
+inline float Vector3::getElem( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline float & Vector3::operator []( int idx )
+{
+ return *(&mX + idx);
+}
+
+inline float Vector3::operator []( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline const Vector3 Vector3::operator +( const Vector3 & vec ) const
+{
+ return Vector3(
+ ( mX + vec.mX ),
+ ( mY + vec.mY ),
+ ( mZ + vec.mZ )
+ );
+}
+
+inline const Vector3 Vector3::operator -( const Vector3 & vec ) const
+{
+ return Vector3(
+ ( mX - vec.mX ),
+ ( mY - vec.mY ),
+ ( mZ - vec.mZ )
+ );
+}
+
+inline const Point3 Vector3::operator +( const Point3 & pnt ) const
+{
+ return Point3(
+ ( mX + pnt.getX() ),
+ ( mY + pnt.getY() ),
+ ( mZ + pnt.getZ() )
+ );
+}
+
+inline const Vector3 Vector3::operator *( float scalar ) const
+{
+ return Vector3(
+ ( mX * scalar ),
+ ( mY * scalar ),
+ ( mZ * scalar )
+ );
+}
+
+inline Vector3 & Vector3::operator +=( const Vector3 & vec )
+{
+ *this = *this + vec;
+ return *this;
+}
+
+inline Vector3 & Vector3::operator -=( const Vector3 & vec )
+{
+ *this = *this - vec;
+ return *this;
+}
+
+inline Vector3 & Vector3::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+inline const Vector3 Vector3::operator /( float scalar ) const
+{
+ return Vector3(
+ ( mX / scalar ),
+ ( mY / scalar ),
+ ( mZ / scalar )
+ );
+}
+
+inline Vector3 & Vector3::operator /=( float scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+inline const Vector3 Vector3::operator -( ) const
+{
+ return Vector3(
+ -mX,
+ -mY,
+ -mZ
+ );
+}
+
+inline const Vector3 operator *( float scalar, const Vector3 & vec )
+{
+ return vec * scalar;
+}
+
+inline const Vector3 mulPerElem( const Vector3 & vec0, const Vector3 & vec1 )
+{
+ return Vector3(
+ ( vec0.getX() * vec1.getX() ),
+ ( vec0.getY() * vec1.getY() ),
+ ( vec0.getZ() * vec1.getZ() )
+ );
+}
+
+inline const Vector3 divPerElem( const Vector3 & vec0, const Vector3 & vec1 )
+{
+ return Vector3(
+ ( vec0.getX() / vec1.getX() ),
+ ( vec0.getY() / vec1.getY() ),
+ ( vec0.getZ() / vec1.getZ() )
+ );
+}
+
+inline const Vector3 recipPerElem( const Vector3 & vec )
+{
+ return Vector3(
+ ( 1.0f / vec.getX() ),
+ ( 1.0f / vec.getY() ),
+ ( 1.0f / vec.getZ() )
+ );
+}
+
+inline const Vector3 sqrtPerElem( const Vector3 & vec )
+{
+ return Vector3(
+ sqrtf( vec.getX() ),
+ sqrtf( vec.getY() ),
+ sqrtf( vec.getZ() )
+ );
+}
+
+inline const Vector3 rsqrtPerElem( const Vector3 & vec )
+{
+ return Vector3(
+ ( 1.0f / sqrtf( vec.getX() ) ),
+ ( 1.0f / sqrtf( vec.getY() ) ),
+ ( 1.0f / sqrtf( vec.getZ() ) )
+ );
+}
+
+inline const Vector3 absPerElem( const Vector3 & vec )
+{
+ return Vector3(
+ fabsf( vec.getX() ),
+ fabsf( vec.getY() ),
+ fabsf( vec.getZ() )
+ );
+}
+
+inline const Vector3 copySignPerElem( const Vector3 & vec0, const Vector3 & vec1 )
+{
+ return Vector3(
+ ( vec1.getX() < 0.0f )? -fabsf( vec0.getX() ) : fabsf( vec0.getX() ),
+ ( vec1.getY() < 0.0f )? -fabsf( vec0.getY() ) : fabsf( vec0.getY() ),
+ ( vec1.getZ() < 0.0f )? -fabsf( vec0.getZ() ) : fabsf( vec0.getZ() )
+ );
+}
+
+inline const Vector3 maxPerElem( const Vector3 & vec0, const Vector3 & vec1 )
+{
+ return Vector3(
+ (vec0.getX() > vec1.getX())? vec0.getX() : vec1.getX(),
+ (vec0.getY() > vec1.getY())? vec0.getY() : vec1.getY(),
+ (vec0.getZ() > vec1.getZ())? vec0.getZ() : vec1.getZ()
+ );
+}
+
+inline float maxElem( const Vector3 & vec )
+{
+ float result;
+ result = (vec.getX() > vec.getY())? vec.getX() : vec.getY();
+ result = (vec.getZ() > result)? vec.getZ() : result;
+ return result;
+}
+
+inline const Vector3 minPerElem( const Vector3 & vec0, const Vector3 & vec1 )
+{
+ return Vector3(
+ (vec0.getX() < vec1.getX())? vec0.getX() : vec1.getX(),
+ (vec0.getY() < vec1.getY())? vec0.getY() : vec1.getY(),
+ (vec0.getZ() < vec1.getZ())? vec0.getZ() : vec1.getZ()
+ );
+}
+
+inline float minElem( const Vector3 & vec )
+{
+ float result;
+ result = (vec.getX() < vec.getY())? vec.getX() : vec.getY();
+ result = (vec.getZ() < result)? vec.getZ() : result;
+ return result;
+}
+
+inline float sum( const Vector3 & vec )
+{
+ float result;
+ result = ( vec.getX() + vec.getY() );
+ result = ( result + vec.getZ() );
+ return result;
+}
+
+inline float dot( const Vector3 & vec0, const Vector3 & vec1 )
+{
+ float result;
+ result = ( vec0.getX() * vec1.getX() );
+ result = ( result + ( vec0.getY() * vec1.getY() ) );
+ result = ( result + ( vec0.getZ() * vec1.getZ() ) );
+ return result;
+}
+
+inline float lengthSqr( const Vector3 & vec )
+{
+ float result;
+ result = ( vec.getX() * vec.getX() );
+ result = ( result + ( vec.getY() * vec.getY() ) );
+ result = ( result + ( vec.getZ() * vec.getZ() ) );
+ return result;
+}
+
+inline float length( const Vector3 & vec )
+{
+ return ::sqrtf( lengthSqr( vec ) );
+}
+
+inline const Vector3 normalize( const Vector3 & vec )
+{
+ float lenSqr, lenInv;
+ lenSqr = lengthSqr( vec );
+ lenInv = ( 1.0f / sqrtf( lenSqr ) );
+ return Vector3(
+ ( vec.getX() * lenInv ),
+ ( vec.getY() * lenInv ),
+ ( vec.getZ() * lenInv )
+ );
+}
+
+inline const Vector3 cross( const Vector3 & vec0, const Vector3 & vec1 )
+{
+ return Vector3(
+ ( ( vec0.getY() * vec1.getZ() ) - ( vec0.getZ() * vec1.getY() ) ),
+ ( ( vec0.getZ() * vec1.getX() ) - ( vec0.getX() * vec1.getZ() ) ),
+ ( ( vec0.getX() * vec1.getY() ) - ( vec0.getY() * vec1.getX() ) )
+ );
+}
+
+inline const Vector3 select( const Vector3 & vec0, const Vector3 & vec1, bool select1 )
+{
+ return Vector3(
+ ( select1 )? vec1.getX() : vec0.getX(),
+ ( select1 )? vec1.getY() : vec0.getY(),
+ ( select1 )? vec1.getZ() : vec0.getZ()
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+inline void print( const Vector3 & vec )
+{
+ printf( "( %f %f %f )\n", vec.getX(), vec.getY(), vec.getZ() );
+}
+
+inline void print( const Vector3 & vec, const char * name )
+{
+ printf( "%s: ( %f %f %f )\n", name, vec.getX(), vec.getY(), vec.getZ() );
+}
+
+#endif
+
+inline Vector4::Vector4( const Vector4 & vec )
+{
+ mX = vec.mX;
+ mY = vec.mY;
+ mZ = vec.mZ;
+ mW = vec.mW;
+}
+
+inline Vector4::Vector4( float _x, float _y, float _z, float _w )
+{
+ mX = _x;
+ mY = _y;
+ mZ = _z;
+ mW = _w;
+}
+
+inline Vector4::Vector4( const Vector3 & xyz, float _w )
+{
+ this->setXYZ( xyz );
+ this->setW( _w );
+}
+
+inline Vector4::Vector4( const Vector3 & vec )
+{
+ mX = vec.getX();
+ mY = vec.getY();
+ mZ = vec.getZ();
+ mW = 0.0f;
+}
+
+inline Vector4::Vector4( const Point3 & pnt )
+{
+ mX = pnt.getX();
+ mY = pnt.getY();
+ mZ = pnt.getZ();
+ mW = 1.0f;
+}
+
+inline Vector4::Vector4( const Quat & quat )
+{
+ mX = quat.getX();
+ mY = quat.getY();
+ mZ = quat.getZ();
+ mW = quat.getW();
+}
+
+inline Vector4::Vector4( float scalar )
+{
+ mX = scalar;
+ mY = scalar;
+ mZ = scalar;
+ mW = scalar;
+}
+
+inline const Vector4 Vector4::xAxis( )
+{
+ return Vector4( 1.0f, 0.0f, 0.0f, 0.0f );
+}
+
+inline const Vector4 Vector4::yAxis( )
+{
+ return Vector4( 0.0f, 1.0f, 0.0f, 0.0f );
+}
+
+inline const Vector4 Vector4::zAxis( )
+{
+ return Vector4( 0.0f, 0.0f, 1.0f, 0.0f );
+}
+
+inline const Vector4 Vector4::wAxis( )
+{
+ return Vector4( 0.0f, 0.0f, 0.0f, 1.0f );
+}
+
+inline const Vector4 lerp( float t, const Vector4 & vec0, const Vector4 & vec1 )
+{
+ return ( vec0 + ( ( vec1 - vec0 ) * t ) );
+}
+
+inline const Vector4 slerp( float t, const Vector4 & unitVec0, const Vector4 & unitVec1 )
+{
+ float recipSinAngle, scale0, scale1, cosAngle, angle;
+ cosAngle = dot( unitVec0, unitVec1 );
+ if ( cosAngle < _VECTORMATH_SLERP_TOL ) {
+ angle = acosf( cosAngle );
+ recipSinAngle = ( 1.0f / sinf( angle ) );
+ scale0 = ( sinf( ( ( 1.0f - t ) * angle ) ) * recipSinAngle );
+ scale1 = ( sinf( ( t * angle ) ) * recipSinAngle );
+ } else {
+ scale0 = ( 1.0f - t );
+ scale1 = t;
+ }
+ return ( ( unitVec0 * scale0 ) + ( unitVec1 * scale1 ) );
+}
+
+inline void loadXYZW( Vector4 & vec, const float * fptr )
+{
+ vec = Vector4( fptr[0], fptr[1], fptr[2], fptr[3] );
+}
+
+inline void storeXYZW( const Vector4 & vec, float * fptr )
+{
+ fptr[0] = vec.getX();
+ fptr[1] = vec.getY();
+ fptr[2] = vec.getZ();
+ fptr[3] = vec.getW();
+}
+
+inline void loadHalfFloats( Vector4 & vec, const unsigned short * hfptr )
+{
+ union Data32 {
+ unsigned int u32;
+ float f32;
+ };
+
+ for (int i = 0; i < 4; i++) {
+ unsigned short fp16 = hfptr[i];
+ unsigned int sign = fp16 >> 15;
+ unsigned int exponent = (fp16 >> 10) & ((1 << 5) - 1);
+ unsigned int mantissa = fp16 & ((1 << 10) - 1);
+
+ if (exponent == 0) {
+ // zero
+ mantissa = 0;
+
+ } else if (exponent == 31) {
+ // infinity or nan -> infinity
+ exponent = 255;
+ mantissa = 0;
+
+ } else {
+ exponent += 127 - 15;
+ mantissa <<= 13;
+ }
+
+ Data32 d;
+ d.u32 = (sign << 31) | (exponent << 23) | mantissa;
+ vec[i] = d.f32;
+ }
+}
+
+inline void storeHalfFloats( const Vector4 & vec, unsigned short * hfptr )
+{
+ union Data32 {
+ unsigned int u32;
+ float f32;
+ };
+
+ for (int i = 0; i < 4; i++) {
+ Data32 d;
+ d.f32 = vec[i];
+
+ unsigned int sign = d.u32 >> 31;
+ unsigned int exponent = (d.u32 >> 23) & ((1 << 8) - 1);
+ unsigned int mantissa = d.u32 & ((1 << 23) - 1);;
+
+ if (exponent == 0) {
+ // zero or denorm -> zero
+ mantissa = 0;
+
+ } else if (exponent == 255 && mantissa != 0) {
+ // nan -> infinity
+ exponent = 31;
+ mantissa = 0;
+
+ } else if (exponent >= 127 - 15 + 31) {
+ // overflow or infinity -> infinity
+ exponent = 31;
+ mantissa = 0;
+
+ } else if (exponent <= 127 - 15) {
+ // underflow -> zero
+ exponent = 0;
+ mantissa = 0;
+
+ } else {
+ exponent -= 127 - 15;
+ mantissa >>= 13;
+ }
+
+ hfptr[i] = (unsigned short)((sign << 15) | (exponent << 10) | mantissa);
+ }
+}
+
+inline Vector4 & Vector4::operator =( const Vector4 & vec )
+{
+ mX = vec.mX;
+ mY = vec.mY;
+ mZ = vec.mZ;
+ mW = vec.mW;
+ return *this;
+}
+
+inline Vector4 & Vector4::setXYZ( const Vector3 & vec )
+{
+ mX = vec.getX();
+ mY = vec.getY();
+ mZ = vec.getZ();
+ return *this;
+}
+
+inline const Vector3 Vector4::getXYZ( ) const
+{
+ return Vector3( mX, mY, mZ );
+}
+
+inline Vector4 & Vector4::setX( float _x )
+{
+ mX = _x;
+ return *this;
+}
+
+inline float Vector4::getX( ) const
+{
+ return mX;
+}
+
+inline Vector4 & Vector4::setY( float _y )
+{
+ mY = _y;
+ return *this;
+}
+
+inline float Vector4::getY( ) const
+{
+ return mY;
+}
+
+inline Vector4 & Vector4::setZ( float _z )
+{
+ mZ = _z;
+ return *this;
+}
+
+inline float Vector4::getZ( ) const
+{
+ return mZ;
+}
+
+inline Vector4 & Vector4::setW( float _w )
+{
+ mW = _w;
+ return *this;
+}
+
+inline float Vector4::getW( ) const
+{
+ return mW;
+}
+
+inline Vector4 & Vector4::setElem( int idx, float value )
+{
+ *(&mX + idx) = value;
+ return *this;
+}
+
+inline float Vector4::getElem( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline float & Vector4::operator []( int idx )
+{
+ return *(&mX + idx);
+}
+
+inline float Vector4::operator []( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline const Vector4 Vector4::operator +( const Vector4 & vec ) const
+{
+ return Vector4(
+ ( mX + vec.mX ),
+ ( mY + vec.mY ),
+ ( mZ + vec.mZ ),
+ ( mW + vec.mW )
+ );
+}
+
+inline const Vector4 Vector4::operator -( const Vector4 & vec ) const
+{
+ return Vector4(
+ ( mX - vec.mX ),
+ ( mY - vec.mY ),
+ ( mZ - vec.mZ ),
+ ( mW - vec.mW )
+ );
+}
+
+inline const Vector4 Vector4::operator *( float scalar ) const
+{
+ return Vector4(
+ ( mX * scalar ),
+ ( mY * scalar ),
+ ( mZ * scalar ),
+ ( mW * scalar )
+ );
+}
+
+inline Vector4 & Vector4::operator +=( const Vector4 & vec )
+{
+ *this = *this + vec;
+ return *this;
+}
+
+inline Vector4 & Vector4::operator -=( const Vector4 & vec )
+{
+ *this = *this - vec;
+ return *this;
+}
+
+inline Vector4 & Vector4::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+inline const Vector4 Vector4::operator /( float scalar ) const
+{
+ return Vector4(
+ ( mX / scalar ),
+ ( mY / scalar ),
+ ( mZ / scalar ),
+ ( mW / scalar )
+ );
+}
+
+inline Vector4 & Vector4::operator /=( float scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+inline const Vector4 Vector4::operator -( ) const
+{
+ return Vector4(
+ -mX,
+ -mY,
+ -mZ,
+ -mW
+ );
+}
+
+inline const Vector4 operator *( float scalar, const Vector4 & vec )
+{
+ return vec * scalar;
+}
+
+inline const Vector4 mulPerElem( const Vector4 & vec0, const Vector4 & vec1 )
+{
+ return Vector4(
+ ( vec0.getX() * vec1.getX() ),
+ ( vec0.getY() * vec1.getY() ),
+ ( vec0.getZ() * vec1.getZ() ),
+ ( vec0.getW() * vec1.getW() )
+ );
+}
+
+inline const Vector4 divPerElem( const Vector4 & vec0, const Vector4 & vec1 )
+{
+ return Vector4(
+ ( vec0.getX() / vec1.getX() ),
+ ( vec0.getY() / vec1.getY() ),
+ ( vec0.getZ() / vec1.getZ() ),
+ ( vec0.getW() / vec1.getW() )
+ );
+}
+
+inline const Vector4 recipPerElem( const Vector4 & vec )
+{
+ return Vector4(
+ ( 1.0f / vec.getX() ),
+ ( 1.0f / vec.getY() ),
+ ( 1.0f / vec.getZ() ),
+ ( 1.0f / vec.getW() )
+ );
+}
+
+inline const Vector4 sqrtPerElem( const Vector4 & vec )
+{
+ return Vector4(
+ sqrtf( vec.getX() ),
+ sqrtf( vec.getY() ),
+ sqrtf( vec.getZ() ),
+ sqrtf( vec.getW() )
+ );
+}
+
+inline const Vector4 rsqrtPerElem( const Vector4 & vec )
+{
+ return Vector4(
+ ( 1.0f / sqrtf( vec.getX() ) ),
+ ( 1.0f / sqrtf( vec.getY() ) ),
+ ( 1.0f / sqrtf( vec.getZ() ) ),
+ ( 1.0f / sqrtf( vec.getW() ) )
+ );
+}
+
+inline const Vector4 absPerElem( const Vector4 & vec )
+{
+ return Vector4(
+ fabsf( vec.getX() ),
+ fabsf( vec.getY() ),
+ fabsf( vec.getZ() ),
+ fabsf( vec.getW() )
+ );
+}
+
+inline const Vector4 copySignPerElem( const Vector4 & vec0, const Vector4 & vec1 )
+{
+ return Vector4(
+ ( vec1.getX() < 0.0f )? -fabsf( vec0.getX() ) : fabsf( vec0.getX() ),
+ ( vec1.getY() < 0.0f )? -fabsf( vec0.getY() ) : fabsf( vec0.getY() ),
+ ( vec1.getZ() < 0.0f )? -fabsf( vec0.getZ() ) : fabsf( vec0.getZ() ),
+ ( vec1.getW() < 0.0f )? -fabsf( vec0.getW() ) : fabsf( vec0.getW() )
+ );
+}
+
+inline const Vector4 maxPerElem( const Vector4 & vec0, const Vector4 & vec1 )
+{
+ return Vector4(
+ (vec0.getX() > vec1.getX())? vec0.getX() : vec1.getX(),
+ (vec0.getY() > vec1.getY())? vec0.getY() : vec1.getY(),
+ (vec0.getZ() > vec1.getZ())? vec0.getZ() : vec1.getZ(),
+ (vec0.getW() > vec1.getW())? vec0.getW() : vec1.getW()
+ );
+}
+
+inline float maxElem( const Vector4 & vec )
+{
+ float result;
+ result = (vec.getX() > vec.getY())? vec.getX() : vec.getY();
+ result = (vec.getZ() > result)? vec.getZ() : result;
+ result = (vec.getW() > result)? vec.getW() : result;
+ return result;
+}
+
+inline const Vector4 minPerElem( const Vector4 & vec0, const Vector4 & vec1 )
+{
+ return Vector4(
+ (vec0.getX() < vec1.getX())? vec0.getX() : vec1.getX(),
+ (vec0.getY() < vec1.getY())? vec0.getY() : vec1.getY(),
+ (vec0.getZ() < vec1.getZ())? vec0.getZ() : vec1.getZ(),
+ (vec0.getW() < vec1.getW())? vec0.getW() : vec1.getW()
+ );
+}
+
+inline float minElem( const Vector4 & vec )
+{
+ float result;
+ result = (vec.getX() < vec.getY())? vec.getX() : vec.getY();
+ result = (vec.getZ() < result)? vec.getZ() : result;
+ result = (vec.getW() < result)? vec.getW() : result;
+ return result;
+}
+
+inline float sum( const Vector4 & vec )
+{
+ float result;
+ result = ( vec.getX() + vec.getY() );
+ result = ( result + vec.getZ() );
+ result = ( result + vec.getW() );
+ return result;
+}
+
+inline float dot( const Vector4 & vec0, const Vector4 & vec1 )
+{
+ float result;
+ result = ( vec0.getX() * vec1.getX() );
+ result = ( result + ( vec0.getY() * vec1.getY() ) );
+ result = ( result + ( vec0.getZ() * vec1.getZ() ) );
+ result = ( result + ( vec0.getW() * vec1.getW() ) );
+ return result;
+}
+
+inline float lengthSqr( const Vector4 & vec )
+{
+ float result;
+ result = ( vec.getX() * vec.getX() );
+ result = ( result + ( vec.getY() * vec.getY() ) );
+ result = ( result + ( vec.getZ() * vec.getZ() ) );
+ result = ( result + ( vec.getW() * vec.getW() ) );
+ return result;
+}
+
+inline float length( const Vector4 & vec )
+{
+ return ::sqrtf( lengthSqr( vec ) );
+}
+
+inline const Vector4 normalize( const Vector4 & vec )
+{
+ float lenSqr, lenInv;
+ lenSqr = lengthSqr( vec );
+ lenInv = ( 1.0f / sqrtf( lenSqr ) );
+ return Vector4(
+ ( vec.getX() * lenInv ),
+ ( vec.getY() * lenInv ),
+ ( vec.getZ() * lenInv ),
+ ( vec.getW() * lenInv )
+ );
+}
+
+inline const Vector4 select( const Vector4 & vec0, const Vector4 & vec1, bool select1 )
+{
+ return Vector4(
+ ( select1 )? vec1.getX() : vec0.getX(),
+ ( select1 )? vec1.getY() : vec0.getY(),
+ ( select1 )? vec1.getZ() : vec0.getZ(),
+ ( select1 )? vec1.getW() : vec0.getW()
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+inline void print( const Vector4 & vec )
+{
+ printf( "( %f %f %f %f )\n", vec.getX(), vec.getY(), vec.getZ(), vec.getW() );
+}
+
+inline void print( const Vector4 & vec, const char * name )
+{
+ printf( "%s: ( %f %f %f %f )\n", name, vec.getX(), vec.getY(), vec.getZ(), vec.getW() );
+}
+
+#endif
+
+inline Point3::Point3( const Point3 & pnt )
+{
+ mX = pnt.mX;
+ mY = pnt.mY;
+ mZ = pnt.mZ;
+}
+
+inline Point3::Point3( float _x, float _y, float _z )
+{
+ mX = _x;
+ mY = _y;
+ mZ = _z;
+}
+
+inline Point3::Point3( const Vector3 & vec )
+{
+ mX = vec.getX();
+ mY = vec.getY();
+ mZ = vec.getZ();
+}
+
+inline Point3::Point3( float scalar )
+{
+ mX = scalar;
+ mY = scalar;
+ mZ = scalar;
+}
+
+inline const Point3 lerp( float t, const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return ( pnt0 + ( ( pnt1 - pnt0 ) * t ) );
+}
+
+inline void loadXYZ( Point3 & pnt, const float * fptr )
+{
+ pnt = Point3( fptr[0], fptr[1], fptr[2] );
+}
+
+inline void storeXYZ( const Point3 & pnt, float * fptr )
+{
+ fptr[0] = pnt.getX();
+ fptr[1] = pnt.getY();
+ fptr[2] = pnt.getZ();
+}
+
+inline void loadHalfFloats( Point3 & vec, const unsigned short * hfptr )
+{
+ union Data32 {
+ unsigned int u32;
+ float f32;
+ };
+
+ for (int i = 0; i < 3; i++) {
+ unsigned short fp16 = hfptr[i];
+ unsigned int sign = fp16 >> 15;
+ unsigned int exponent = (fp16 >> 10) & ((1 << 5) - 1);
+ unsigned int mantissa = fp16 & ((1 << 10) - 1);
+
+ if (exponent == 0) {
+ // zero
+ mantissa = 0;
+
+ } else if (exponent == 31) {
+ // infinity or nan -> infinity
+ exponent = 255;
+ mantissa = 0;
+
+ } else {
+ exponent += 127 - 15;
+ mantissa <<= 13;
+ }
+
+ Data32 d;
+ d.u32 = (sign << 31) | (exponent << 23) | mantissa;
+ vec[i] = d.f32;
+ }
+}
+
+inline void storeHalfFloats( const Point3 & vec, unsigned short * hfptr )
+{
+ union Data32 {
+ unsigned int u32;
+ float f32;
+ };
+
+ for (int i = 0; i < 3; i++) {
+ Data32 d;
+ d.f32 = vec[i];
+
+ unsigned int sign = d.u32 >> 31;
+ unsigned int exponent = (d.u32 >> 23) & ((1 << 8) - 1);
+ unsigned int mantissa = d.u32 & ((1 << 23) - 1);;
+
+ if (exponent == 0) {
+ // zero or denorm -> zero
+ mantissa = 0;
+
+ } else if (exponent == 255 && mantissa != 0) {
+ // nan -> infinity
+ exponent = 31;
+ mantissa = 0;
+
+ } else if (exponent >= 127 - 15 + 31) {
+ // overflow or infinity -> infinity
+ exponent = 31;
+ mantissa = 0;
+
+ } else if (exponent <= 127 - 15) {
+ // underflow -> zero
+ exponent = 0;
+ mantissa = 0;
+
+ } else {
+ exponent -= 127 - 15;
+ mantissa >>= 13;
+ }
+
+ hfptr[i] = (unsigned short)((sign << 15) | (exponent << 10) | mantissa);
+ }
+}
+
+inline Point3 & Point3::operator =( const Point3 & pnt )
+{
+ mX = pnt.mX;
+ mY = pnt.mY;
+ mZ = pnt.mZ;
+ return *this;
+}
+
+inline Point3 & Point3::setX( float _x )
+{
+ mX = _x;
+ return *this;
+}
+
+inline float Point3::getX( ) const
+{
+ return mX;
+}
+
+inline Point3 & Point3::setY( float _y )
+{
+ mY = _y;
+ return *this;
+}
+
+inline float Point3::getY( ) const
+{
+ return mY;
+}
+
+inline Point3 & Point3::setZ( float _z )
+{
+ mZ = _z;
+ return *this;
+}
+
+inline float Point3::getZ( ) const
+{
+ return mZ;
+}
+
+inline Point3 & Point3::setElem( int idx, float value )
+{
+ *(&mX + idx) = value;
+ return *this;
+}
+
+inline float Point3::getElem( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline float & Point3::operator []( int idx )
+{
+ return *(&mX + idx);
+}
+
+inline float Point3::operator []( int idx ) const
+{
+ return *(&mX + idx);
+}
+
+inline const Vector3 Point3::operator -( const Point3 & pnt ) const
+{
+ return Vector3(
+ ( mX - pnt.mX ),
+ ( mY - pnt.mY ),
+ ( mZ - pnt.mZ )
+ );
+}
+
+inline const Point3 Point3::operator +( const Vector3 & vec ) const
+{
+ return Point3(
+ ( mX + vec.getX() ),
+ ( mY + vec.getY() ),
+ ( mZ + vec.getZ() )
+ );
+}
+
+inline const Point3 Point3::operator -( const Vector3 & vec ) const
+{
+ return Point3(
+ ( mX - vec.getX() ),
+ ( mY - vec.getY() ),
+ ( mZ - vec.getZ() )
+ );
+}
+
+inline Point3 & Point3::operator +=( const Vector3 & vec )
+{
+ *this = *this + vec;
+ return *this;
+}
+
+inline Point3 & Point3::operator -=( const Vector3 & vec )
+{
+ *this = *this - vec;
+ return *this;
+}
+
+inline const Point3 mulPerElem( const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return Point3(
+ ( pnt0.getX() * pnt1.getX() ),
+ ( pnt0.getY() * pnt1.getY() ),
+ ( pnt0.getZ() * pnt1.getZ() )
+ );
+}
+
+inline const Point3 divPerElem( const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return Point3(
+ ( pnt0.getX() / pnt1.getX() ),
+ ( pnt0.getY() / pnt1.getY() ),
+ ( pnt0.getZ() / pnt1.getZ() )
+ );
+}
+
+inline const Point3 recipPerElem( const Point3 & pnt )
+{
+ return Point3(
+ ( 1.0f / pnt.getX() ),
+ ( 1.0f / pnt.getY() ),
+ ( 1.0f / pnt.getZ() )
+ );
+}
+
+inline const Point3 sqrtPerElem( const Point3 & pnt )
+{
+ return Point3(
+ sqrtf( pnt.getX() ),
+ sqrtf( pnt.getY() ),
+ sqrtf( pnt.getZ() )
+ );
+}
+
+inline const Point3 rsqrtPerElem( const Point3 & pnt )
+{
+ return Point3(
+ ( 1.0f / sqrtf( pnt.getX() ) ),
+ ( 1.0f / sqrtf( pnt.getY() ) ),
+ ( 1.0f / sqrtf( pnt.getZ() ) )
+ );
+}
+
+inline const Point3 absPerElem( const Point3 & pnt )
+{
+ return Point3(
+ fabsf( pnt.getX() ),
+ fabsf( pnt.getY() ),
+ fabsf( pnt.getZ() )
+ );
+}
+
+inline const Point3 copySignPerElem( const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return Point3(
+ ( pnt1.getX() < 0.0f )? -fabsf( pnt0.getX() ) : fabsf( pnt0.getX() ),
+ ( pnt1.getY() < 0.0f )? -fabsf( pnt0.getY() ) : fabsf( pnt0.getY() ),
+ ( pnt1.getZ() < 0.0f )? -fabsf( pnt0.getZ() ) : fabsf( pnt0.getZ() )
+ );
+}
+
+inline const Point3 maxPerElem( const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return Point3(
+ (pnt0.getX() > pnt1.getX())? pnt0.getX() : pnt1.getX(),
+ (pnt0.getY() > pnt1.getY())? pnt0.getY() : pnt1.getY(),
+ (pnt0.getZ() > pnt1.getZ())? pnt0.getZ() : pnt1.getZ()
+ );
+}
+
+inline float maxElem( const Point3 & pnt )
+{
+ float result;
+ result = (pnt.getX() > pnt.getY())? pnt.getX() : pnt.getY();
+ result = (pnt.getZ() > result)? pnt.getZ() : result;
+ return result;
+}
+
+inline const Point3 minPerElem( const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return Point3(
+ (pnt0.getX() < pnt1.getX())? pnt0.getX() : pnt1.getX(),
+ (pnt0.getY() < pnt1.getY())? pnt0.getY() : pnt1.getY(),
+ (pnt0.getZ() < pnt1.getZ())? pnt0.getZ() : pnt1.getZ()
+ );
+}
+
+inline float minElem( const Point3 & pnt )
+{
+ float result;
+ result = (pnt.getX() < pnt.getY())? pnt.getX() : pnt.getY();
+ result = (pnt.getZ() < result)? pnt.getZ() : result;
+ return result;
+}
+
+inline float sum( const Point3 & pnt )
+{
+ float result;
+ result = ( pnt.getX() + pnt.getY() );
+ result = ( result + pnt.getZ() );
+ return result;
+}
+
+inline const Point3 scale( const Point3 & pnt, float scaleVal )
+{
+ return mulPerElem( pnt, Point3( scaleVal ) );
+}
+
+inline const Point3 scale( const Point3 & pnt, const Vector3 & scaleVec )
+{
+ return mulPerElem( pnt, Point3( scaleVec ) );
+}
+
+inline float projection( const Point3 & pnt, const Vector3 & unitVec )
+{
+ float result;
+ result = ( pnt.getX() * unitVec.getX() );
+ result = ( result + ( pnt.getY() * unitVec.getY() ) );
+ result = ( result + ( pnt.getZ() * unitVec.getZ() ) );
+ return result;
+}
+
+inline float distSqrFromOrigin( const Point3 & pnt )
+{
+ return lengthSqr( Vector3( pnt ) );
+}
+
+inline float distFromOrigin( const Point3 & pnt )
+{
+ return length( Vector3( pnt ) );
+}
+
+inline float distSqr( const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return lengthSqr( ( pnt1 - pnt0 ) );
+}
+
+inline float dist( const Point3 & pnt0, const Point3 & pnt1 )
+{
+ return length( ( pnt1 - pnt0 ) );
+}
+
+inline const Point3 select( const Point3 & pnt0, const Point3 & pnt1, bool select1 )
+{
+ return Point3(
+ ( select1 )? pnt1.getX() : pnt0.getX(),
+ ( select1 )? pnt1.getY() : pnt0.getY(),
+ ( select1 )? pnt1.getZ() : pnt0.getZ()
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+inline void print( const Point3 & pnt )
+{
+ printf( "( %f %f %f )\n", pnt.getX(), pnt.getY(), pnt.getZ() );
+}
+
+inline void print( const Point3 & pnt, const char * name )
+{
+ printf( "%s: ( %f %f %f )\n", name, pnt.getX(), pnt.getY(), pnt.getZ() );
+}
+
+#endif
+
+} // namespace Aos
+} // namespace Vectormath
+
+#endif
diff --git a/tests/bullet/src/vectormath/scalar/vectormath_aos.h b/tests/bullet/src/vectormath/scalar/vectormath_aos.h
new file mode 100644
index 00000000..d00456df
--- /dev/null
+++ b/tests/bullet/src/vectormath/scalar/vectormath_aos.h
@@ -0,0 +1,1872 @@
+/*
+ Copyright (C) 2009 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+This software is provided 'as-is', without any express or implied warranty.
+In no event will the authors be held liable for any damages arising from the use of this software.
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it freely,
+subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
+*/
+
+#ifndef _VECTORMATH_AOS_CPP_H
+#define _VECTORMATH_AOS_CPP_H
+
+#include <math.h>
+
+#ifdef _VECTORMATH_DEBUG
+#include <stdio.h>
+#endif
+
+namespace Vectormath {
+
+namespace Aos {
+
+//-----------------------------------------------------------------------------
+// Forward Declarations
+//
+
+class Vector3;
+class Vector4;
+class Point3;
+class Quat;
+class Matrix3;
+class Matrix4;
+class Transform3;
+
+// A 3-D vector in array-of-structures format
+//
+class Vector3
+{
+ float mX;
+ float mY;
+ float mZ;
+#ifndef __GNUC__
+ float d;
+#endif
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline Vector3( ) { };
+
+ // Copy a 3-D vector
+ //
+ inline Vector3( const Vector3 & vec );
+
+ // Construct a 3-D vector from x, y, and z elements
+ //
+ inline Vector3( float x, float y, float z );
+
+ // Copy elements from a 3-D point into a 3-D vector
+ //
+ explicit inline Vector3( const Point3 & pnt );
+
+ // Set all elements of a 3-D vector to the same scalar value
+ //
+ explicit inline Vector3( float scalar );
+
+ // Assign one 3-D vector to another
+ //
+ inline Vector3 & operator =( const Vector3 & vec );
+
+ // Set the x element of a 3-D vector
+ //
+ inline Vector3 & setX( float x );
+
+ // Set the y element of a 3-D vector
+ //
+ inline Vector3 & setY( float y );
+
+ // Set the z element of a 3-D vector
+ //
+ inline Vector3 & setZ( float z );
+
+ // Get the x element of a 3-D vector
+ //
+ inline float getX( ) const;
+
+ // Get the y element of a 3-D vector
+ //
+ inline float getY( ) const;
+
+ // Get the z element of a 3-D vector
+ //
+ inline float getZ( ) const;
+
+ // Set an x, y, or z element of a 3-D vector by index
+ //
+ inline Vector3 & setElem( int idx, float value );
+
+ // Get an x, y, or z element of a 3-D vector by index
+ //
+ inline float getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ inline float & operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ inline float operator []( int idx ) const;
+
+ // Add two 3-D vectors
+ //
+ inline const Vector3 operator +( const Vector3 & vec ) const;
+
+ // Subtract a 3-D vector from another 3-D vector
+ //
+ inline const Vector3 operator -( const Vector3 & vec ) const;
+
+ // Add a 3-D vector to a 3-D point
+ //
+ inline const Point3 operator +( const Point3 & pnt ) const;
+
+ // Multiply a 3-D vector by a scalar
+ //
+ inline const Vector3 operator *( float scalar ) const;
+
+ // Divide a 3-D vector by a scalar
+ //
+ inline const Vector3 operator /( float scalar ) const;
+
+ // Perform compound assignment and addition with a 3-D vector
+ //
+ inline Vector3 & operator +=( const Vector3 & vec );
+
+ // Perform compound assignment and subtraction by a 3-D vector
+ //
+ inline Vector3 & operator -=( const Vector3 & vec );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ inline Vector3 & operator *=( float scalar );
+
+ // Perform compound assignment and division by a scalar
+ //
+ inline Vector3 & operator /=( float scalar );
+
+ // Negate all elements of a 3-D vector
+ //
+ inline const Vector3 operator -( ) const;
+
+ // Construct x axis
+ //
+ static inline const Vector3 xAxis( );
+
+ // Construct y axis
+ //
+ static inline const Vector3 yAxis( );
+
+ // Construct z axis
+ //
+ static inline const Vector3 zAxis( );
+
+}
+#ifdef __GNUC__
+__attribute__ ((aligned(16)))
+#endif
+;
+
+// Multiply a 3-D vector by a scalar
+//
+inline const Vector3 operator *( float scalar, const Vector3 & vec );
+
+// Multiply two 3-D vectors per element
+//
+inline const Vector3 mulPerElem( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Divide two 3-D vectors per element
+// NOTE:
+// Floating-point behavior matches standard library function divf4.
+//
+inline const Vector3 divPerElem( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Compute the reciprocal of a 3-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function recipf4.
+//
+inline const Vector3 recipPerElem( const Vector3 & vec );
+
+// Compute the square root of a 3-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function sqrtf4.
+//
+inline const Vector3 sqrtPerElem( const Vector3 & vec );
+
+// Compute the reciprocal square root of a 3-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function rsqrtf4.
+//
+inline const Vector3 rsqrtPerElem( const Vector3 & vec );
+
+// Compute the absolute value of a 3-D vector per element
+//
+inline const Vector3 absPerElem( const Vector3 & vec );
+
+// Copy sign from one 3-D vector to another, per element
+//
+inline const Vector3 copySignPerElem( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Maximum of two 3-D vectors per element
+//
+inline const Vector3 maxPerElem( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Minimum of two 3-D vectors per element
+//
+inline const Vector3 minPerElem( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Maximum element of a 3-D vector
+//
+inline float maxElem( const Vector3 & vec );
+
+// Minimum element of a 3-D vector
+//
+inline float minElem( const Vector3 & vec );
+
+// Compute the sum of all elements of a 3-D vector
+//
+inline float sum( const Vector3 & vec );
+
+// Compute the dot product of two 3-D vectors
+//
+inline float dot( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Compute the square of the length of a 3-D vector
+//
+inline float lengthSqr( const Vector3 & vec );
+
+// Compute the length of a 3-D vector
+//
+inline float length( const Vector3 & vec );
+
+// Normalize a 3-D vector
+// NOTE:
+// The result is unpredictable when all elements of vec are at or near zero.
+//
+inline const Vector3 normalize( const Vector3 & vec );
+
+// Compute cross product of two 3-D vectors
+//
+inline const Vector3 cross( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Outer product of two 3-D vectors
+//
+inline const Matrix3 outer( const Vector3 & vec0, const Vector3 & vec1 );
+
+// Pre-multiply a row vector by a 3x3 matrix
+//
+inline const Vector3 rowMul( const Vector3 & vec, const Matrix3 & mat );
+
+// Cross-product matrix of a 3-D vector
+//
+inline const Matrix3 crossMatrix( const Vector3 & vec );
+
+// Create cross-product matrix and multiply
+// NOTE:
+// Faster than separately creating a cross-product matrix and multiplying.
+//
+inline const Matrix3 crossMatrixMul( const Vector3 & vec, const Matrix3 & mat );
+
+// Linear interpolation between two 3-D vectors
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+inline const Vector3 lerp( float t, const Vector3 & vec0, const Vector3 & vec1 );
+
+// Spherical linear interpolation between two 3-D vectors
+// NOTE:
+// The result is unpredictable if the vectors point in opposite directions.
+// Does not clamp t between 0 and 1.
+//
+inline const Vector3 slerp( float t, const Vector3 & unitVec0, const Vector3 & unitVec1 );
+
+// Conditionally select between two 3-D vectors
+//
+inline const Vector3 select( const Vector3 & vec0, const Vector3 & vec1, bool select1 );
+
+// Load x, y, and z elements from the first three words of a float array.
+//
+//
+inline void loadXYZ( Vector3 & vec, const float * fptr );
+
+// Store x, y, and z elements of a 3-D vector in the first three words of a float array.
+// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
+//
+inline void storeXYZ( const Vector3 & vec, float * fptr );
+
+// Load three-half-floats as a 3-D vector
+// NOTE:
+// This transformation does not support either denormalized numbers or NaNs.
+//
+inline void loadHalfFloats( Vector3 & vec, const unsigned short * hfptr );
+
+// Store a 3-D vector as half-floats. Memory area of previous 16 bytes and next 32 bytes from <code><i>hfptr</i></code> might be accessed.
+// NOTE:
+// This transformation does not support either denormalized numbers or NaNs. Memory area of previous 16 bytes and next 32 bytes from hfptr might be accessed.
+//
+inline void storeHalfFloats( const Vector3 & vec, unsigned short * hfptr );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3-D vector
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Vector3 & vec );
+
+// Print a 3-D vector and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Vector3 & vec, const char * name );
+
+#endif
+
+// A 4-D vector in array-of-structures format
+//
+class Vector4
+{
+ float mX;
+ float mY;
+ float mZ;
+ float mW;
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline Vector4( ) { };
+
+ // Copy a 4-D vector
+ //
+ inline Vector4( const Vector4 & vec );
+
+ // Construct a 4-D vector from x, y, z, and w elements
+ //
+ inline Vector4( float x, float y, float z, float w );
+
+ // Construct a 4-D vector from a 3-D vector and a scalar
+ //
+ inline Vector4( const Vector3 & xyz, float w );
+
+ // Copy x, y, and z from a 3-D vector into a 4-D vector, and set w to 0
+ //
+ explicit inline Vector4( const Vector3 & vec );
+
+ // Copy x, y, and z from a 3-D point into a 4-D vector, and set w to 1
+ //
+ explicit inline Vector4( const Point3 & pnt );
+
+ // Copy elements from a quaternion into a 4-D vector
+ //
+ explicit inline Vector4( const Quat & quat );
+
+ // Set all elements of a 4-D vector to the same scalar value
+ //
+ explicit inline Vector4( float scalar );
+
+ // Assign one 4-D vector to another
+ //
+ inline Vector4 & operator =( const Vector4 & vec );
+
+ // Set the x, y, and z elements of a 4-D vector
+ // NOTE:
+ // This function does not change the w element.
+ //
+ inline Vector4 & setXYZ( const Vector3 & vec );
+
+ // Get the x, y, and z elements of a 4-D vector
+ //
+ inline const Vector3 getXYZ( ) const;
+
+ // Set the x element of a 4-D vector
+ //
+ inline Vector4 & setX( float x );
+
+ // Set the y element of a 4-D vector
+ //
+ inline Vector4 & setY( float y );
+
+ // Set the z element of a 4-D vector
+ //
+ inline Vector4 & setZ( float z );
+
+ // Set the w element of a 4-D vector
+ //
+ inline Vector4 & setW( float w );
+
+ // Get the x element of a 4-D vector
+ //
+ inline float getX( ) const;
+
+ // Get the y element of a 4-D vector
+ //
+ inline float getY( ) const;
+
+ // Get the z element of a 4-D vector
+ //
+ inline float getZ( ) const;
+
+ // Get the w element of a 4-D vector
+ //
+ inline float getW( ) const;
+
+ // Set an x, y, z, or w element of a 4-D vector by index
+ //
+ inline Vector4 & setElem( int idx, float value );
+
+ // Get an x, y, z, or w element of a 4-D vector by index
+ //
+ inline float getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ inline float & operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ inline float operator []( int idx ) const;
+
+ // Add two 4-D vectors
+ //
+ inline const Vector4 operator +( const Vector4 & vec ) const;
+
+ // Subtract a 4-D vector from another 4-D vector
+ //
+ inline const Vector4 operator -( const Vector4 & vec ) const;
+
+ // Multiply a 4-D vector by a scalar
+ //
+ inline const Vector4 operator *( float scalar ) const;
+
+ // Divide a 4-D vector by a scalar
+ //
+ inline const Vector4 operator /( float scalar ) const;
+
+ // Perform compound assignment and addition with a 4-D vector
+ //
+ inline Vector4 & operator +=( const Vector4 & vec );
+
+ // Perform compound assignment and subtraction by a 4-D vector
+ //
+ inline Vector4 & operator -=( const Vector4 & vec );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ inline Vector4 & operator *=( float scalar );
+
+ // Perform compound assignment and division by a scalar
+ //
+ inline Vector4 & operator /=( float scalar );
+
+ // Negate all elements of a 4-D vector
+ //
+ inline const Vector4 operator -( ) const;
+
+ // Construct x axis
+ //
+ static inline const Vector4 xAxis( );
+
+ // Construct y axis
+ //
+ static inline const Vector4 yAxis( );
+
+ // Construct z axis
+ //
+ static inline const Vector4 zAxis( );
+
+ // Construct w axis
+ //
+ static inline const Vector4 wAxis( );
+
+}
+#ifdef __GNUC__
+__attribute__ ((aligned(16)))
+#endif
+;
+
+// Multiply a 4-D vector by a scalar
+//
+inline const Vector4 operator *( float scalar, const Vector4 & vec );
+
+// Multiply two 4-D vectors per element
+//
+inline const Vector4 mulPerElem( const Vector4 & vec0, const Vector4 & vec1 );
+
+// Divide two 4-D vectors per element
+// NOTE:
+// Floating-point behavior matches standard library function divf4.
+//
+inline const Vector4 divPerElem( const Vector4 & vec0, const Vector4 & vec1 );
+
+// Compute the reciprocal of a 4-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function recipf4.
+//
+inline const Vector4 recipPerElem( const Vector4 & vec );
+
+// Compute the square root of a 4-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function sqrtf4.
+//
+inline const Vector4 sqrtPerElem( const Vector4 & vec );
+
+// Compute the reciprocal square root of a 4-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function rsqrtf4.
+//
+inline const Vector4 rsqrtPerElem( const Vector4 & vec );
+
+// Compute the absolute value of a 4-D vector per element
+//
+inline const Vector4 absPerElem( const Vector4 & vec );
+
+// Copy sign from one 4-D vector to another, per element
+//
+inline const Vector4 copySignPerElem( const Vector4 & vec0, const Vector4 & vec1 );
+
+// Maximum of two 4-D vectors per element
+//
+inline const Vector4 maxPerElem( const Vector4 & vec0, const Vector4 & vec1 );
+
+// Minimum of two 4-D vectors per element
+//
+inline const Vector4 minPerElem( const Vector4 & vec0, const Vector4 & vec1 );
+
+// Maximum element of a 4-D vector
+//
+inline float maxElem( const Vector4 & vec );
+
+// Minimum element of a 4-D vector
+//
+inline float minElem( const Vector4 & vec );
+
+// Compute the sum of all elements of a 4-D vector
+//
+inline float sum( const Vector4 & vec );
+
+// Compute the dot product of two 4-D vectors
+//
+inline float dot( const Vector4 & vec0, const Vector4 & vec1 );
+
+// Compute the square of the length of a 4-D vector
+//
+inline float lengthSqr( const Vector4 & vec );
+
+// Compute the length of a 4-D vector
+//
+inline float length( const Vector4 & vec );
+
+// Normalize a 4-D vector
+// NOTE:
+// The result is unpredictable when all elements of vec are at or near zero.
+//
+inline const Vector4 normalize( const Vector4 & vec );
+
+// Outer product of two 4-D vectors
+//
+inline const Matrix4 outer( const Vector4 & vec0, const Vector4 & vec1 );
+
+// Linear interpolation between two 4-D vectors
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+inline const Vector4 lerp( float t, const Vector4 & vec0, const Vector4 & vec1 );
+
+// Spherical linear interpolation between two 4-D vectors
+// NOTE:
+// The result is unpredictable if the vectors point in opposite directions.
+// Does not clamp t between 0 and 1.
+//
+inline const Vector4 slerp( float t, const Vector4 & unitVec0, const Vector4 & unitVec1 );
+
+// Conditionally select between two 4-D vectors
+//
+inline const Vector4 select( const Vector4 & vec0, const Vector4 & vec1, bool select1 );
+
+// Load x, y, z, and w elements from the first four words of a float array.
+//
+//
+inline void loadXYZW( Vector4 & vec, const float * fptr );
+
+// Store x, y, z, and w elements of a 4-D vector in the first four words of a float array.
+// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
+//
+inline void storeXYZW( const Vector4 & vec, float * fptr );
+
+// Load four-half-floats as a 4-D vector
+// NOTE:
+// This transformation does not support either denormalized numbers or NaNs.
+//
+inline void loadHalfFloats( Vector4 & vec, const unsigned short * hfptr );
+
+// Store a 4-D vector as half-floats. Memory area of previous 16 bytes and next 32 bytes from <code><i>hfptr</i></code> might be accessed.
+// NOTE:
+// This transformation does not support either denormalized numbers or NaNs. Memory area of previous 16 bytes and next 32 bytes from hfptr might be accessed.
+//
+inline void storeHalfFloats( const Vector4 & vec, unsigned short * hfptr );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 4-D vector
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Vector4 & vec );
+
+// Print a 4-D vector and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Vector4 & vec, const char * name );
+
+#endif
+
+// A 3-D point in array-of-structures format
+//
+class Point3
+{
+ float mX;
+ float mY;
+ float mZ;
+#ifndef __GNUC__
+ float d;
+#endif
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline Point3( ) { };
+
+ // Copy a 3-D point
+ //
+ inline Point3( const Point3 & pnt );
+
+ // Construct a 3-D point from x, y, and z elements
+ //
+ inline Point3( float x, float y, float z );
+
+ // Copy elements from a 3-D vector into a 3-D point
+ //
+ explicit inline Point3( const Vector3 & vec );
+
+ // Set all elements of a 3-D point to the same scalar value
+ //
+ explicit inline Point3( float scalar );
+
+ // Assign one 3-D point to another
+ //
+ inline Point3 & operator =( const Point3 & pnt );
+
+ // Set the x element of a 3-D point
+ //
+ inline Point3 & setX( float x );
+
+ // Set the y element of a 3-D point
+ //
+ inline Point3 & setY( float y );
+
+ // Set the z element of a 3-D point
+ //
+ inline Point3 & setZ( float z );
+
+ // Get the x element of a 3-D point
+ //
+ inline float getX( ) const;
+
+ // Get the y element of a 3-D point
+ //
+ inline float getY( ) const;
+
+ // Get the z element of a 3-D point
+ //
+ inline float getZ( ) const;
+
+ // Set an x, y, or z element of a 3-D point by index
+ //
+ inline Point3 & setElem( int idx, float value );
+
+ // Get an x, y, or z element of a 3-D point by index
+ //
+ inline float getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ inline float & operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ inline float operator []( int idx ) const;
+
+ // Subtract a 3-D point from another 3-D point
+ //
+ inline const Vector3 operator -( const Point3 & pnt ) const;
+
+ // Add a 3-D point to a 3-D vector
+ //
+ inline const Point3 operator +( const Vector3 & vec ) const;
+
+ // Subtract a 3-D vector from a 3-D point
+ //
+ inline const Point3 operator -( const Vector3 & vec ) const;
+
+ // Perform compound assignment and addition with a 3-D vector
+ //
+ inline Point3 & operator +=( const Vector3 & vec );
+
+ // Perform compound assignment and subtraction by a 3-D vector
+ //
+ inline Point3 & operator -=( const Vector3 & vec );
+
+}
+#ifdef __GNUC__
+__attribute__ ((aligned(16)))
+#endif
+;
+
+// Multiply two 3-D points per element
+//
+inline const Point3 mulPerElem( const Point3 & pnt0, const Point3 & pnt1 );
+
+// Divide two 3-D points per element
+// NOTE:
+// Floating-point behavior matches standard library function divf4.
+//
+inline const Point3 divPerElem( const Point3 & pnt0, const Point3 & pnt1 );
+
+// Compute the reciprocal of a 3-D point per element
+// NOTE:
+// Floating-point behavior matches standard library function recipf4.
+//
+inline const Point3 recipPerElem( const Point3 & pnt );
+
+// Compute the square root of a 3-D point per element
+// NOTE:
+// Floating-point behavior matches standard library function sqrtf4.
+//
+inline const Point3 sqrtPerElem( const Point3 & pnt );
+
+// Compute the reciprocal square root of a 3-D point per element
+// NOTE:
+// Floating-point behavior matches standard library function rsqrtf4.
+//
+inline const Point3 rsqrtPerElem( const Point3 & pnt );
+
+// Compute the absolute value of a 3-D point per element
+//
+inline const Point3 absPerElem( const Point3 & pnt );
+
+// Copy sign from one 3-D point to another, per element
+//
+inline const Point3 copySignPerElem( const Point3 & pnt0, const Point3 & pnt1 );
+
+// Maximum of two 3-D points per element
+//
+inline const Point3 maxPerElem( const Point3 & pnt0, const Point3 & pnt1 );
+
+// Minimum of two 3-D points per element
+//
+inline const Point3 minPerElem( const Point3 & pnt0, const Point3 & pnt1 );
+
+// Maximum element of a 3-D point
+//
+inline float maxElem( const Point3 & pnt );
+
+// Minimum element of a 3-D point
+//
+inline float minElem( const Point3 & pnt );
+
+// Compute the sum of all elements of a 3-D point
+//
+inline float sum( const Point3 & pnt );
+
+// Apply uniform scale to a 3-D point
+//
+inline const Point3 scale( const Point3 & pnt, float scaleVal );
+
+// Apply non-uniform scale to a 3-D point
+//
+inline const Point3 scale( const Point3 & pnt, const Vector3 & scaleVec );
+
+// Scalar projection of a 3-D point on a unit-length 3-D vector
+//
+inline float projection( const Point3 & pnt, const Vector3 & unitVec );
+
+// Compute the square of the distance of a 3-D point from the coordinate-system origin
+//
+inline float distSqrFromOrigin( const Point3 & pnt );
+
+// Compute the distance of a 3-D point from the coordinate-system origin
+//
+inline float distFromOrigin( const Point3 & pnt );
+
+// Compute the square of the distance between two 3-D points
+//
+inline float distSqr( const Point3 & pnt0, const Point3 & pnt1 );
+
+// Compute the distance between two 3-D points
+//
+inline float dist( const Point3 & pnt0, const Point3 & pnt1 );
+
+// Linear interpolation between two 3-D points
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+inline const Point3 lerp( float t, const Point3 & pnt0, const Point3 & pnt1 );
+
+// Conditionally select between two 3-D points
+//
+inline const Point3 select( const Point3 & pnt0, const Point3 & pnt1, bool select1 );
+
+// Load x, y, and z elements from the first three words of a float array.
+//
+//
+inline void loadXYZ( Point3 & pnt, const float * fptr );
+
+// Store x, y, and z elements of a 3-D point in the first three words of a float array.
+// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
+//
+inline void storeXYZ( const Point3 & pnt, float * fptr );
+
+// Load three-half-floats as a 3-D point
+// NOTE:
+// This transformation does not support either denormalized numbers or NaNs.
+//
+inline void loadHalfFloats( Point3 & pnt, const unsigned short * hfptr );
+
+// Store a 3-D point as half-floats. Memory area of previous 16 bytes and next 32 bytes from <code><i>hfptr</i></code> might be accessed.
+// NOTE:
+// This transformation does not support either denormalized numbers or NaNs. Memory area of previous 16 bytes and next 32 bytes from hfptr might be accessed.
+//
+inline void storeHalfFloats( const Point3 & pnt, unsigned short * hfptr );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3-D point
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Point3 & pnt );
+
+// Print a 3-D point and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Point3 & pnt, const char * name );
+
+#endif
+
+// A quaternion in array-of-structures format
+//
+class Quat
+{
+ float mX;
+ float mY;
+ float mZ;
+ float mW;
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline Quat( ) { };
+
+ // Copy a quaternion
+ //
+ inline Quat( const Quat & quat );
+
+ // Construct a quaternion from x, y, z, and w elements
+ //
+ inline Quat( float x, float y, float z, float w );
+
+ // Construct a quaternion from a 3-D vector and a scalar
+ //
+ inline Quat( const Vector3 & xyz, float w );
+
+ // Copy elements from a 4-D vector into a quaternion
+ //
+ explicit inline Quat( const Vector4 & vec );
+
+ // Convert a rotation matrix to a unit-length quaternion
+ //
+ explicit inline Quat( const Matrix3 & rotMat );
+
+ // Set all elements of a quaternion to the same scalar value
+ //
+ explicit inline Quat( float scalar );
+
+ // Assign one quaternion to another
+ //
+ inline Quat & operator =( const Quat & quat );
+
+ // Set the x, y, and z elements of a quaternion
+ // NOTE:
+ // This function does not change the w element.
+ //
+ inline Quat & setXYZ( const Vector3 & vec );
+
+ // Get the x, y, and z elements of a quaternion
+ //
+ inline const Vector3 getXYZ( ) const;
+
+ // Set the x element of a quaternion
+ //
+ inline Quat & setX( float x );
+
+ // Set the y element of a quaternion
+ //
+ inline Quat & setY( float y );
+
+ // Set the z element of a quaternion
+ //
+ inline Quat & setZ( float z );
+
+ // Set the w element of a quaternion
+ //
+ inline Quat & setW( float w );
+
+ // Get the x element of a quaternion
+ //
+ inline float getX( ) const;
+
+ // Get the y element of a quaternion
+ //
+ inline float getY( ) const;
+
+ // Get the z element of a quaternion
+ //
+ inline float getZ( ) const;
+
+ // Get the w element of a quaternion
+ //
+ inline float getW( ) const;
+
+ // Set an x, y, z, or w element of a quaternion by index
+ //
+ inline Quat & setElem( int idx, float value );
+
+ // Get an x, y, z, or w element of a quaternion by index
+ //
+ inline float getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ inline float & operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ inline float operator []( int idx ) const;
+
+ // Add two quaternions
+ //
+ inline const Quat operator +( const Quat & quat ) const;
+
+ // Subtract a quaternion from another quaternion
+ //
+ inline const Quat operator -( const Quat & quat ) const;
+
+ // Multiply two quaternions
+ //
+ inline const Quat operator *( const Quat & quat ) const;
+
+ // Multiply a quaternion by a scalar
+ //
+ inline const Quat operator *( float scalar ) const;
+
+ // Divide a quaternion by a scalar
+ //
+ inline const Quat operator /( float scalar ) const;
+
+ // Perform compound assignment and addition with a quaternion
+ //
+ inline Quat & operator +=( const Quat & quat );
+
+ // Perform compound assignment and subtraction by a quaternion
+ //
+ inline Quat & operator -=( const Quat & quat );
+
+ // Perform compound assignment and multiplication by a quaternion
+ //
+ inline Quat & operator *=( const Quat & quat );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ inline Quat & operator *=( float scalar );
+
+ // Perform compound assignment and division by a scalar
+ //
+ inline Quat & operator /=( float scalar );
+
+ // Negate all elements of a quaternion
+ //
+ inline const Quat operator -( ) const;
+
+ // Construct an identity quaternion
+ //
+ static inline const Quat identity( );
+
+ // Construct a quaternion to rotate between two unit-length 3-D vectors
+ // NOTE:
+ // The result is unpredictable if unitVec0 and unitVec1 point in opposite directions.
+ //
+ static inline const Quat rotation( const Vector3 & unitVec0, const Vector3 & unitVec1 );
+
+ // Construct a quaternion to rotate around a unit-length 3-D vector
+ //
+ static inline const Quat rotation( float radians, const Vector3 & unitVec );
+
+ // Construct a quaternion to rotate around the x axis
+ //
+ static inline const Quat rotationX( float radians );
+
+ // Construct a quaternion to rotate around the y axis
+ //
+ static inline const Quat rotationY( float radians );
+
+ // Construct a quaternion to rotate around the z axis
+ //
+ static inline const Quat rotationZ( float radians );
+
+}
+#ifdef __GNUC__
+__attribute__ ((aligned(16)))
+#endif
+;
+
+// Multiply a quaternion by a scalar
+//
+inline const Quat operator *( float scalar, const Quat & quat );
+
+// Compute the conjugate of a quaternion
+//
+inline const Quat conj( const Quat & quat );
+
+// Use a unit-length quaternion to rotate a 3-D vector
+//
+inline const Vector3 rotate( const Quat & unitQuat, const Vector3 & vec );
+
+// Compute the dot product of two quaternions
+//
+inline float dot( const Quat & quat0, const Quat & quat1 );
+
+// Compute the norm of a quaternion
+//
+inline float norm( const Quat & quat );
+
+// Compute the length of a quaternion
+//
+inline float length( const Quat & quat );
+
+// Normalize a quaternion
+// NOTE:
+// The result is unpredictable when all elements of quat are at or near zero.
+//
+inline const Quat normalize( const Quat & quat );
+
+// Linear interpolation between two quaternions
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+inline const Quat lerp( float t, const Quat & quat0, const Quat & quat1 );
+
+// Spherical linear interpolation between two quaternions
+// NOTE:
+// Interpolates along the shortest path between orientations.
+// Does not clamp t between 0 and 1.
+//
+inline const Quat slerp( float t, const Quat & unitQuat0, const Quat & unitQuat1 );
+
+// Spherical quadrangle interpolation
+//
+inline const Quat squad( float t, const Quat & unitQuat0, const Quat & unitQuat1, const Quat & unitQuat2, const Quat & unitQuat3 );
+
+// Conditionally select between two quaternions
+//
+inline const Quat select( const Quat & quat0, const Quat & quat1, bool select1 );
+
+// Load x, y, z, and w elements from the first four words of a float array.
+//
+//
+inline void loadXYZW( Quat & quat, const float * fptr );
+
+// Store x, y, z, and w elements of a quaternion in the first four words of a float array.
+// Memory area of previous 16 bytes and next 32 bytes from fptr might be accessed
+//
+inline void storeXYZW( const Quat & quat, float * fptr );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a quaternion
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Quat & quat );
+
+// Print a quaternion and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Quat & quat, const char * name );
+
+#endif
+
+// A 3x3 matrix in array-of-structures format
+//
+class Matrix3
+{
+ Vector3 mCol0;
+ Vector3 mCol1;
+ Vector3 mCol2;
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline Matrix3( ) { };
+
+ // Copy a 3x3 matrix
+ //
+ inline Matrix3( const Matrix3 & mat );
+
+ // Construct a 3x3 matrix containing the specified columns
+ //
+ inline Matrix3( const Vector3 & col0, const Vector3 & col1, const Vector3 & col2 );
+
+ // Construct a 3x3 rotation matrix from a unit-length quaternion
+ //
+ explicit inline Matrix3( const Quat & unitQuat );
+
+ // Set all elements of a 3x3 matrix to the same scalar value
+ //
+ explicit inline Matrix3( float scalar );
+
+ // Assign one 3x3 matrix to another
+ //
+ inline Matrix3 & operator =( const Matrix3 & mat );
+
+ // Set column 0 of a 3x3 matrix
+ //
+ inline Matrix3 & setCol0( const Vector3 & col0 );
+
+ // Set column 1 of a 3x3 matrix
+ //
+ inline Matrix3 & setCol1( const Vector3 & col1 );
+
+ // Set column 2 of a 3x3 matrix
+ //
+ inline Matrix3 & setCol2( const Vector3 & col2 );
+
+ // Get column 0 of a 3x3 matrix
+ //
+ inline const Vector3 getCol0( ) const;
+
+ // Get column 1 of a 3x3 matrix
+ //
+ inline const Vector3 getCol1( ) const;
+
+ // Get column 2 of a 3x3 matrix
+ //
+ inline const Vector3 getCol2( ) const;
+
+ // Set the column of a 3x3 matrix referred to by the specified index
+ //
+ inline Matrix3 & setCol( int col, const Vector3 & vec );
+
+ // Set the row of a 3x3 matrix referred to by the specified index
+ //
+ inline Matrix3 & setRow( int row, const Vector3 & vec );
+
+ // Get the column of a 3x3 matrix referred to by the specified index
+ //
+ inline const Vector3 getCol( int col ) const;
+
+ // Get the row of a 3x3 matrix referred to by the specified index
+ //
+ inline const Vector3 getRow( int row ) const;
+
+ // Subscripting operator to set or get a column
+ //
+ inline Vector3 & operator []( int col );
+
+ // Subscripting operator to get a column
+ //
+ inline const Vector3 operator []( int col ) const;
+
+ // Set the element of a 3x3 matrix referred to by column and row indices
+ //
+ inline Matrix3 & setElem( int col, int row, float val );
+
+ // Get the element of a 3x3 matrix referred to by column and row indices
+ //
+ inline float getElem( int col, int row ) const;
+
+ // Add two 3x3 matrices
+ //
+ inline const Matrix3 operator +( const Matrix3 & mat ) const;
+
+ // Subtract a 3x3 matrix from another 3x3 matrix
+ //
+ inline const Matrix3 operator -( const Matrix3 & mat ) const;
+
+ // Negate all elements of a 3x3 matrix
+ //
+ inline const Matrix3 operator -( ) const;
+
+ // Multiply a 3x3 matrix by a scalar
+ //
+ inline const Matrix3 operator *( float scalar ) const;
+
+ // Multiply a 3x3 matrix by a 3-D vector
+ //
+ inline const Vector3 operator *( const Vector3 & vec ) const;
+
+ // Multiply two 3x3 matrices
+ //
+ inline const Matrix3 operator *( const Matrix3 & mat ) const;
+
+ // Perform compound assignment and addition with a 3x3 matrix
+ //
+ inline Matrix3 & operator +=( const Matrix3 & mat );
+
+ // Perform compound assignment and subtraction by a 3x3 matrix
+ //
+ inline Matrix3 & operator -=( const Matrix3 & mat );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ inline Matrix3 & operator *=( float scalar );
+
+ // Perform compound assignment and multiplication by a 3x3 matrix
+ //
+ inline Matrix3 & operator *=( const Matrix3 & mat );
+
+ // Construct an identity 3x3 matrix
+ //
+ static inline const Matrix3 identity( );
+
+ // Construct a 3x3 matrix to rotate around the x axis
+ //
+ static inline const Matrix3 rotationX( float radians );
+
+ // Construct a 3x3 matrix to rotate around the y axis
+ //
+ static inline const Matrix3 rotationY( float radians );
+
+ // Construct a 3x3 matrix to rotate around the z axis
+ //
+ static inline const Matrix3 rotationZ( float radians );
+
+ // Construct a 3x3 matrix to rotate around the x, y, and z axes
+ //
+ static inline const Matrix3 rotationZYX( const Vector3 & radiansXYZ );
+
+ // Construct a 3x3 matrix to rotate around a unit-length 3-D vector
+ //
+ static inline const Matrix3 rotation( float radians, const Vector3 & unitVec );
+
+ // Construct a rotation matrix from a unit-length quaternion
+ //
+ static inline const Matrix3 rotation( const Quat & unitQuat );
+
+ // Construct a 3x3 matrix to perform scaling
+ //
+ static inline const Matrix3 scale( const Vector3 & scaleVec );
+
+};
+// Multiply a 3x3 matrix by a scalar
+//
+inline const Matrix3 operator *( float scalar, const Matrix3 & mat );
+
+// Append (post-multiply) a scale transformation to a 3x3 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+inline const Matrix3 appendScale( const Matrix3 & mat, const Vector3 & scaleVec );
+
+// Prepend (pre-multiply) a scale transformation to a 3x3 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+inline const Matrix3 prependScale( const Vector3 & scaleVec, const Matrix3 & mat );
+
+// Multiply two 3x3 matrices per element
+//
+inline const Matrix3 mulPerElem( const Matrix3 & mat0, const Matrix3 & mat1 );
+
+// Compute the absolute value of a 3x3 matrix per element
+//
+inline const Matrix3 absPerElem( const Matrix3 & mat );
+
+// Transpose of a 3x3 matrix
+//
+inline const Matrix3 transpose( const Matrix3 & mat );
+
+// Compute the inverse of a 3x3 matrix
+// NOTE:
+// Result is unpredictable when the determinant of mat is equal to or near 0.
+//
+inline const Matrix3 inverse( const Matrix3 & mat );
+
+// Determinant of a 3x3 matrix
+//
+inline float determinant( const Matrix3 & mat );
+
+// Conditionally select between two 3x3 matrices
+//
+inline const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, bool select1 );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3x3 matrix
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Matrix3 & mat );
+
+// Print a 3x3 matrix and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Matrix3 & mat, const char * name );
+
+#endif
+
+// A 4x4 matrix in array-of-structures format
+//
+class Matrix4
+{
+ Vector4 mCol0;
+ Vector4 mCol1;
+ Vector4 mCol2;
+ Vector4 mCol3;
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline Matrix4( ) { };
+
+ // Copy a 4x4 matrix
+ //
+ inline Matrix4( const Matrix4 & mat );
+
+ // Construct a 4x4 matrix containing the specified columns
+ //
+ inline Matrix4( const Vector4 & col0, const Vector4 & col1, const Vector4 & col2, const Vector4 & col3 );
+
+ // Construct a 4x4 matrix from a 3x4 transformation matrix
+ //
+ explicit inline Matrix4( const Transform3 & mat );
+
+ // Construct a 4x4 matrix from a 3x3 matrix and a 3-D vector
+ //
+ inline Matrix4( const Matrix3 & mat, const Vector3 & translateVec );
+
+ // Construct a 4x4 matrix from a unit-length quaternion and a 3-D vector
+ //
+ inline Matrix4( const Quat & unitQuat, const Vector3 & translateVec );
+
+ // Set all elements of a 4x4 matrix to the same scalar value
+ //
+ explicit inline Matrix4( float scalar );
+
+ // Assign one 4x4 matrix to another
+ //
+ inline Matrix4 & operator =( const Matrix4 & mat );
+
+ // Set the upper-left 3x3 submatrix
+ // NOTE:
+ // This function does not change the bottom row elements.
+ //
+ inline Matrix4 & setUpper3x3( const Matrix3 & mat3 );
+
+ // Get the upper-left 3x3 submatrix of a 4x4 matrix
+ //
+ inline const Matrix3 getUpper3x3( ) const;
+
+ // Set translation component
+ // NOTE:
+ // This function does not change the bottom row elements.
+ //
+ inline Matrix4 & setTranslation( const Vector3 & translateVec );
+
+ // Get the translation component of a 4x4 matrix
+ //
+ inline const Vector3 getTranslation( ) const;
+
+ // Set column 0 of a 4x4 matrix
+ //
+ inline Matrix4 & setCol0( const Vector4 & col0 );
+
+ // Set column 1 of a 4x4 matrix
+ //
+ inline Matrix4 & setCol1( const Vector4 & col1 );
+
+ // Set column 2 of a 4x4 matrix
+ //
+ inline Matrix4 & setCol2( const Vector4 & col2 );
+
+ // Set column 3 of a 4x4 matrix
+ //
+ inline Matrix4 & setCol3( const Vector4 & col3 );
+
+ // Get column 0 of a 4x4 matrix
+ //
+ inline const Vector4 getCol0( ) const;
+
+ // Get column 1 of a 4x4 matrix
+ //
+ inline const Vector4 getCol1( ) const;
+
+ // Get column 2 of a 4x4 matrix
+ //
+ inline const Vector4 getCol2( ) const;
+
+ // Get column 3 of a 4x4 matrix
+ //
+ inline const Vector4 getCol3( ) const;
+
+ // Set the column of a 4x4 matrix referred to by the specified index
+ //
+ inline Matrix4 & setCol( int col, const Vector4 & vec );
+
+ // Set the row of a 4x4 matrix referred to by the specified index
+ //
+ inline Matrix4 & setRow( int row, const Vector4 & vec );
+
+ // Get the column of a 4x4 matrix referred to by the specified index
+ //
+ inline const Vector4 getCol( int col ) const;
+
+ // Get the row of a 4x4 matrix referred to by the specified index
+ //
+ inline const Vector4 getRow( int row ) const;
+
+ // Subscripting operator to set or get a column
+ //
+ inline Vector4 & operator []( int col );
+
+ // Subscripting operator to get a column
+ //
+ inline const Vector4 operator []( int col ) const;
+
+ // Set the element of a 4x4 matrix referred to by column and row indices
+ //
+ inline Matrix4 & setElem( int col, int row, float val );
+
+ // Get the element of a 4x4 matrix referred to by column and row indices
+ //
+ inline float getElem( int col, int row ) const;
+
+ // Add two 4x4 matrices
+ //
+ inline const Matrix4 operator +( const Matrix4 & mat ) const;
+
+ // Subtract a 4x4 matrix from another 4x4 matrix
+ //
+ inline const Matrix4 operator -( const Matrix4 & mat ) const;
+
+ // Negate all elements of a 4x4 matrix
+ //
+ inline const Matrix4 operator -( ) const;
+
+ // Multiply a 4x4 matrix by a scalar
+ //
+ inline const Matrix4 operator *( float scalar ) const;
+
+ // Multiply a 4x4 matrix by a 4-D vector
+ //
+ inline const Vector4 operator *( const Vector4 & vec ) const;
+
+ // Multiply a 4x4 matrix by a 3-D vector
+ //
+ inline const Vector4 operator *( const Vector3 & vec ) const;
+
+ // Multiply a 4x4 matrix by a 3-D point
+ //
+ inline const Vector4 operator *( const Point3 & pnt ) const;
+
+ // Multiply two 4x4 matrices
+ //
+ inline const Matrix4 operator *( const Matrix4 & mat ) const;
+
+ // Multiply a 4x4 matrix by a 3x4 transformation matrix
+ //
+ inline const Matrix4 operator *( const Transform3 & tfrm ) const;
+
+ // Perform compound assignment and addition with a 4x4 matrix
+ //
+ inline Matrix4 & operator +=( const Matrix4 & mat );
+
+ // Perform compound assignment and subtraction by a 4x4 matrix
+ //
+ inline Matrix4 & operator -=( const Matrix4 & mat );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ inline Matrix4 & operator *=( float scalar );
+
+ // Perform compound assignment and multiplication by a 4x4 matrix
+ //
+ inline Matrix4 & operator *=( const Matrix4 & mat );
+
+ // Perform compound assignment and multiplication by a 3x4 transformation matrix
+ //
+ inline Matrix4 & operator *=( const Transform3 & tfrm );
+
+ // Construct an identity 4x4 matrix
+ //
+ static inline const Matrix4 identity( );
+
+ // Construct a 4x4 matrix to rotate around the x axis
+ //
+ static inline const Matrix4 rotationX( float radians );
+
+ // Construct a 4x4 matrix to rotate around the y axis
+ //
+ static inline const Matrix4 rotationY( float radians );
+
+ // Construct a 4x4 matrix to rotate around the z axis
+ //
+ static inline const Matrix4 rotationZ( float radians );
+
+ // Construct a 4x4 matrix to rotate around the x, y, and z axes
+ //
+ static inline const Matrix4 rotationZYX( const Vector3 & radiansXYZ );
+
+ // Construct a 4x4 matrix to rotate around a unit-length 3-D vector
+ //
+ static inline const Matrix4 rotation( float radians, const Vector3 & unitVec );
+
+ // Construct a rotation matrix from a unit-length quaternion
+ //
+ static inline const Matrix4 rotation( const Quat & unitQuat );
+
+ // Construct a 4x4 matrix to perform scaling
+ //
+ static inline const Matrix4 scale( const Vector3 & scaleVec );
+
+ // Construct a 4x4 matrix to perform translation
+ //
+ static inline const Matrix4 translation( const Vector3 & translateVec );
+
+ // Construct viewing matrix based on eye position, position looked at, and up direction
+ //
+ static inline const Matrix4 lookAt( const Point3 & eyePos, const Point3 & lookAtPos, const Vector3 & upVec );
+
+ // Construct a perspective projection matrix
+ //
+ static inline const Matrix4 perspective( float fovyRadians, float aspect, float zNear, float zFar );
+
+ // Construct a perspective projection matrix based on frustum
+ //
+ static inline const Matrix4 frustum( float left, float right, float bottom, float top, float zNear, float zFar );
+
+ // Construct an orthographic projection matrix
+ //
+ static inline const Matrix4 orthographic( float left, float right, float bottom, float top, float zNear, float zFar );
+
+};
+// Multiply a 4x4 matrix by a scalar
+//
+inline const Matrix4 operator *( float scalar, const Matrix4 & mat );
+
+// Append (post-multiply) a scale transformation to a 4x4 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+inline const Matrix4 appendScale( const Matrix4 & mat, const Vector3 & scaleVec );
+
+// Prepend (pre-multiply) a scale transformation to a 4x4 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+inline const Matrix4 prependScale( const Vector3 & scaleVec, const Matrix4 & mat );
+
+// Multiply two 4x4 matrices per element
+//
+inline const Matrix4 mulPerElem( const Matrix4 & mat0, const Matrix4 & mat1 );
+
+// Compute the absolute value of a 4x4 matrix per element
+//
+inline const Matrix4 absPerElem( const Matrix4 & mat );
+
+// Transpose of a 4x4 matrix
+//
+inline const Matrix4 transpose( const Matrix4 & mat );
+
+// Compute the inverse of a 4x4 matrix
+// NOTE:
+// Result is unpredictable when the determinant of mat is equal to or near 0.
+//
+inline const Matrix4 inverse( const Matrix4 & mat );
+
+// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix
+// NOTE:
+// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions. The result is unpredictable when the determinant of mat is equal to or near 0.
+//
+inline const Matrix4 affineInverse( const Matrix4 & mat );
+
+// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix with an orthogonal upper-left 3x3 submatrix
+// NOTE:
+// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions.
+//
+inline const Matrix4 orthoInverse( const Matrix4 & mat );
+
+// Determinant of a 4x4 matrix
+//
+inline float determinant( const Matrix4 & mat );
+
+// Conditionally select between two 4x4 matrices
+//
+inline const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, bool select1 );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 4x4 matrix
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Matrix4 & mat );
+
+// Print a 4x4 matrix and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Matrix4 & mat, const char * name );
+
+#endif
+
+// A 3x4 transformation matrix in array-of-structures format
+//
+class Transform3
+{
+ Vector3 mCol0;
+ Vector3 mCol1;
+ Vector3 mCol2;
+ Vector3 mCol3;
+
+public:
+ // Default constructor; does no initialization
+ //
+ inline Transform3( ) { };
+
+ // Copy a 3x4 transformation matrix
+ //
+ inline Transform3( const Transform3 & tfrm );
+
+ // Construct a 3x4 transformation matrix containing the specified columns
+ //
+ inline Transform3( const Vector3 & col0, const Vector3 & col1, const Vector3 & col2, const Vector3 & col3 );
+
+ // Construct a 3x4 transformation matrix from a 3x3 matrix and a 3-D vector
+ //
+ inline Transform3( const Matrix3 & tfrm, const Vector3 & translateVec );
+
+ // Construct a 3x4 transformation matrix from a unit-length quaternion and a 3-D vector
+ //
+ inline Transform3( const Quat & unitQuat, const Vector3 & translateVec );
+
+ // Set all elements of a 3x4 transformation matrix to the same scalar value
+ //
+ explicit inline Transform3( float scalar );
+
+ // Assign one 3x4 transformation matrix to another
+ //
+ inline Transform3 & operator =( const Transform3 & tfrm );
+
+ // Set the upper-left 3x3 submatrix
+ //
+ inline Transform3 & setUpper3x3( const Matrix3 & mat3 );
+
+ // Get the upper-left 3x3 submatrix of a 3x4 transformation matrix
+ //
+ inline const Matrix3 getUpper3x3( ) const;
+
+ // Set translation component
+ //
+ inline Transform3 & setTranslation( const Vector3 & translateVec );
+
+ // Get the translation component of a 3x4 transformation matrix
+ //
+ inline const Vector3 getTranslation( ) const;
+
+ // Set column 0 of a 3x4 transformation matrix
+ //
+ inline Transform3 & setCol0( const Vector3 & col0 );
+
+ // Set column 1 of a 3x4 transformation matrix
+ //
+ inline Transform3 & setCol1( const Vector3 & col1 );
+
+ // Set column 2 of a 3x4 transformation matrix
+ //
+ inline Transform3 & setCol2( const Vector3 & col2 );
+
+ // Set column 3 of a 3x4 transformation matrix
+ //
+ inline Transform3 & setCol3( const Vector3 & col3 );
+
+ // Get column 0 of a 3x4 transformation matrix
+ //
+ inline const Vector3 getCol0( ) const;
+
+ // Get column 1 of a 3x4 transformation matrix
+ //
+ inline const Vector3 getCol1( ) const;
+
+ // Get column 2 of a 3x4 transformation matrix
+ //
+ inline const Vector3 getCol2( ) const;
+
+ // Get column 3 of a 3x4 transformation matrix
+ //
+ inline const Vector3 getCol3( ) const;
+
+ // Set the column of a 3x4 transformation matrix referred to by the specified index
+ //
+ inline Transform3 & setCol( int col, const Vector3 & vec );
+
+ // Set the row of a 3x4 transformation matrix referred to by the specified index
+ //
+ inline Transform3 & setRow( int row, const Vector4 & vec );
+
+ // Get the column of a 3x4 transformation matrix referred to by the specified index
+ //
+ inline const Vector3 getCol( int col ) const;
+
+ // Get the row of a 3x4 transformation matrix referred to by the specified index
+ //
+ inline const Vector4 getRow( int row ) const;
+
+ // Subscripting operator to set or get a column
+ //
+ inline Vector3 & operator []( int col );
+
+ // Subscripting operator to get a column
+ //
+ inline const Vector3 operator []( int col ) const;
+
+ // Set the element of a 3x4 transformation matrix referred to by column and row indices
+ //
+ inline Transform3 & setElem( int col, int row, float val );
+
+ // Get the element of a 3x4 transformation matrix referred to by column and row indices
+ //
+ inline float getElem( int col, int row ) const;
+
+ // Multiply a 3x4 transformation matrix by a 3-D vector
+ //
+ inline const Vector3 operator *( const Vector3 & vec ) const;
+
+ // Multiply a 3x4 transformation matrix by a 3-D point
+ //
+ inline const Point3 operator *( const Point3 & pnt ) const;
+
+ // Multiply two 3x4 transformation matrices
+ //
+ inline const Transform3 operator *( const Transform3 & tfrm ) const;
+
+ // Perform compound assignment and multiplication by a 3x4 transformation matrix
+ //
+ inline Transform3 & operator *=( const Transform3 & tfrm );
+
+ // Construct an identity 3x4 transformation matrix
+ //
+ static inline const Transform3 identity( );
+
+ // Construct a 3x4 transformation matrix to rotate around the x axis
+ //
+ static inline const Transform3 rotationX( float radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the y axis
+ //
+ static inline const Transform3 rotationY( float radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the z axis
+ //
+ static inline const Transform3 rotationZ( float radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the x, y, and z axes
+ //
+ static inline const Transform3 rotationZYX( const Vector3 & radiansXYZ );
+
+ // Construct a 3x4 transformation matrix to rotate around a unit-length 3-D vector
+ //
+ static inline const Transform3 rotation( float radians, const Vector3 & unitVec );
+
+ // Construct a rotation matrix from a unit-length quaternion
+ //
+ static inline const Transform3 rotation( const Quat & unitQuat );
+
+ // Construct a 3x4 transformation matrix to perform scaling
+ //
+ static inline const Transform3 scale( const Vector3 & scaleVec );
+
+ // Construct a 3x4 transformation matrix to perform translation
+ //
+ static inline const Transform3 translation( const Vector3 & translateVec );
+
+};
+// Append (post-multiply) a scale transformation to a 3x4 transformation matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+inline const Transform3 appendScale( const Transform3 & tfrm, const Vector3 & scaleVec );
+
+// Prepend (pre-multiply) a scale transformation to a 3x4 transformation matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+inline const Transform3 prependScale( const Vector3 & scaleVec, const Transform3 & tfrm );
+
+// Multiply two 3x4 transformation matrices per element
+//
+inline const Transform3 mulPerElem( const Transform3 & tfrm0, const Transform3 & tfrm1 );
+
+// Compute the absolute value of a 3x4 transformation matrix per element
+//
+inline const Transform3 absPerElem( const Transform3 & tfrm );
+
+// Inverse of a 3x4 transformation matrix
+// NOTE:
+// Result is unpredictable when the determinant of the left 3x3 submatrix is equal to or near 0.
+//
+inline const Transform3 inverse( const Transform3 & tfrm );
+
+// Compute the inverse of a 3x4 transformation matrix, expected to have an orthogonal upper-left 3x3 submatrix
+// NOTE:
+// This can be used to achieve better performance than a general inverse when the specified 3x4 transformation matrix meets the given restrictions.
+//
+inline const Transform3 orthoInverse( const Transform3 & tfrm );
+
+// Conditionally select between two 3x4 transformation matrices
+//
+inline const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, bool select1 );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3x4 transformation matrix
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Transform3 & tfrm );
+
+// Print a 3x4 transformation matrix and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+inline void print( const Transform3 & tfrm, const char * name );
+
+#endif
+
+} // namespace Aos
+} // namespace Vectormath
+
+#include "vec_aos.h"
+#include "quat_aos.h"
+#include "mat_aos.h"
+
+#endif
diff --git a/tests/bullet/src/vectormath/sse/boolInVec.h b/tests/bullet/src/vectormath/sse/boolInVec.h
new file mode 100644
index 00000000..d18cb15c
--- /dev/null
+++ b/tests/bullet/src/vectormath/sse/boolInVec.h
@@ -0,0 +1,247 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _BOOLINVEC_H
+#define _BOOLINVEC_H
+
+#include <math.h>
+
+namespace Vectormath {
+
+class floatInVec;
+
+//--------------------------------------------------------------------------------------------------
+// boolInVec class
+//
+
+class boolInVec
+{
+ private:
+ __m128 mData;
+
+ inline boolInVec(__m128 vec);
+ public:
+ inline boolInVec() {}
+
+ // matches standard type conversions
+ //
+ inline boolInVec(const floatInVec &vec);
+
+ // explicit cast from bool
+ //
+ explicit inline boolInVec(bool scalar);
+
+#ifdef _VECTORMATH_NO_SCALAR_CAST
+ // explicit cast to bool
+ //
+ inline bool getAsBool() const;
+#else
+ // implicit cast to bool
+ //
+ inline operator bool() const;
+#endif
+
+ // get vector data
+ // bool value is splatted across all word slots of vector as 0 (false) or -1 (true)
+ //
+ inline __m128 get128() const;
+
+ // operators
+ //
+ inline const boolInVec operator ! () const;
+ inline boolInVec& operator = (const boolInVec &vec);
+ inline boolInVec& operator &= (const boolInVec &vec);
+ inline boolInVec& operator ^= (const boolInVec &vec);
+ inline boolInVec& operator |= (const boolInVec &vec);
+
+ // friend functions
+ //
+ friend inline const boolInVec operator == (const boolInVec &vec0, const boolInVec &vec1);
+ friend inline const boolInVec operator != (const boolInVec &vec0, const boolInVec &vec1);
+ friend inline const boolInVec operator < (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const boolInVec operator <= (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const boolInVec operator > (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const boolInVec operator >= (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const boolInVec operator == (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const boolInVec operator != (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const boolInVec operator & (const boolInVec &vec0, const boolInVec &vec1);
+ friend inline const boolInVec operator ^ (const boolInVec &vec0, const boolInVec &vec1);
+ friend inline const boolInVec operator | (const boolInVec &vec0, const boolInVec &vec1);
+ friend inline const boolInVec select(const boolInVec &vec0, const boolInVec &vec1, const boolInVec &select_vec1);
+};
+
+//--------------------------------------------------------------------------------------------------
+// boolInVec functions
+//
+
+// operators
+//
+inline const boolInVec operator == (const boolInVec &vec0, const boolInVec &vec1);
+inline const boolInVec operator != (const boolInVec &vec0, const boolInVec &vec1);
+inline const boolInVec operator & (const boolInVec &vec0, const boolInVec &vec1);
+inline const boolInVec operator ^ (const boolInVec &vec0, const boolInVec &vec1);
+inline const boolInVec operator | (const boolInVec &vec0, const boolInVec &vec1);
+
+// select between vec0 and vec1 using boolInVec.
+// false selects vec0, true selects vec1
+//
+inline const boolInVec select(const boolInVec &vec0, const boolInVec &vec1, const boolInVec &select_vec1);
+
+} // namespace Vectormath
+
+//--------------------------------------------------------------------------------------------------
+// boolInVec implementation
+//
+
+#include "floatInVec.h"
+
+namespace Vectormath {
+
+inline
+boolInVec::boolInVec(__m128 vec)
+{
+ mData = vec;
+}
+
+inline
+boolInVec::boolInVec(const floatInVec &vec)
+{
+ *this = (vec != floatInVec(0.0f));
+}
+
+inline
+boolInVec::boolInVec(bool scalar)
+{
+ unsigned int mask = -(int)scalar;
+ mData = _mm_set1_ps(*(float *)&mask); // TODO: Union
+}
+
+#ifdef _VECTORMATH_NO_SCALAR_CAST
+inline
+bool
+boolInVec::getAsBool() const
+#else
+inline
+boolInVec::operator bool() const
+#endif
+{
+ return *(bool *)&mData;
+}
+
+inline
+__m128
+boolInVec::get128() const
+{
+ return mData;
+}
+
+inline
+const boolInVec
+boolInVec::operator ! () const
+{
+ return boolInVec(_mm_andnot_ps(mData, _mm_cmpneq_ps(_mm_setzero_ps(),_mm_setzero_ps())));
+}
+
+inline
+boolInVec&
+boolInVec::operator = (const boolInVec &vec)
+{
+ mData = vec.mData;
+ return *this;
+}
+
+inline
+boolInVec&
+boolInVec::operator &= (const boolInVec &vec)
+{
+ *this = *this & vec;
+ return *this;
+}
+
+inline
+boolInVec&
+boolInVec::operator ^= (const boolInVec &vec)
+{
+ *this = *this ^ vec;
+ return *this;
+}
+
+inline
+boolInVec&
+boolInVec::operator |= (const boolInVec &vec)
+{
+ *this = *this | vec;
+ return *this;
+}
+
+inline
+const boolInVec
+operator == (const boolInVec &vec0, const boolInVec &vec1)
+{
+ return boolInVec(_mm_cmpeq_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator != (const boolInVec &vec0, const boolInVec &vec1)
+{
+ return boolInVec(_mm_cmpneq_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator & (const boolInVec &vec0, const boolInVec &vec1)
+{
+ return boolInVec(_mm_and_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator | (const boolInVec &vec0, const boolInVec &vec1)
+{
+ return boolInVec(_mm_or_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator ^ (const boolInVec &vec0, const boolInVec &vec1)
+{
+ return boolInVec(_mm_xor_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+select(const boolInVec &vec0, const boolInVec &vec1, const boolInVec &select_vec1)
+{
+ return boolInVec(vec_sel(vec0.get128(), vec1.get128(), select_vec1.get128()));
+}
+
+} // namespace Vectormath
+
+#endif // boolInVec_h
diff --git a/tests/bullet/src/vectormath/sse/floatInVec.h b/tests/bullet/src/vectormath/sse/floatInVec.h
new file mode 100644
index 00000000..6443865b
--- /dev/null
+++ b/tests/bullet/src/vectormath/sse/floatInVec.h
@@ -0,0 +1,340 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _FLOATINVEC_H
+#define _FLOATINVEC_H
+
+#include <math.h>
+#include <xmmintrin.h>
+
+namespace Vectormath {
+
+class boolInVec;
+
+//--------------------------------------------------------------------------------------------------
+// floatInVec class
+//
+
+class floatInVec
+{
+ private:
+ __m128 mData;
+
+ public:
+ inline floatInVec(__m128 vec);
+
+ inline floatInVec() {}
+
+ // matches standard type conversions
+ //
+ inline floatInVec(const boolInVec &vec);
+
+ // construct from a slot of __m128
+ //
+ inline floatInVec(__m128 vec, int slot);
+
+ // explicit cast from float
+ //
+ explicit inline floatInVec(float scalar);
+
+#ifdef _VECTORMATH_NO_SCALAR_CAST
+ // explicit cast to float
+ //
+ inline float getAsFloat() const;
+#else
+ // implicit cast to float
+ //
+ inline operator float() const;
+#endif
+
+ // get vector data
+ // float value is splatted across all word slots of vector
+ //
+ inline __m128 get128() const;
+
+ // operators
+ //
+ inline const floatInVec operator ++ (int);
+ inline const floatInVec operator -- (int);
+ inline floatInVec& operator ++ ();
+ inline floatInVec& operator -- ();
+ inline const floatInVec operator - () const;
+ inline floatInVec& operator = (const floatInVec &vec);
+ inline floatInVec& operator *= (const floatInVec &vec);
+ inline floatInVec& operator /= (const floatInVec &vec);
+ inline floatInVec& operator += (const floatInVec &vec);
+ inline floatInVec& operator -= (const floatInVec &vec);
+
+ // friend functions
+ //
+ friend inline const floatInVec operator * (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const floatInVec operator / (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const floatInVec operator + (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const floatInVec operator - (const floatInVec &vec0, const floatInVec &vec1);
+ friend inline const floatInVec select(const floatInVec &vec0, const floatInVec &vec1, boolInVec select_vec1);
+};
+
+//--------------------------------------------------------------------------------------------------
+// floatInVec functions
+//
+
+// operators
+//
+inline const floatInVec operator * (const floatInVec &vec0, const floatInVec &vec1);
+inline const floatInVec operator / (const floatInVec &vec0, const floatInVec &vec1);
+inline const floatInVec operator + (const floatInVec &vec0, const floatInVec &vec1);
+inline const floatInVec operator - (const floatInVec &vec0, const floatInVec &vec1);
+inline const boolInVec operator < (const floatInVec &vec0, const floatInVec &vec1);
+inline const boolInVec operator <= (const floatInVec &vec0, const floatInVec &vec1);
+inline const boolInVec operator > (const floatInVec &vec0, const floatInVec &vec1);
+inline const boolInVec operator >= (const floatInVec &vec0, const floatInVec &vec1);
+inline const boolInVec operator == (const floatInVec &vec0, const floatInVec &vec1);
+inline const boolInVec operator != (const floatInVec &vec0, const floatInVec &vec1);
+
+// select between vec0 and vec1 using boolInVec.
+// false selects vec0, true selects vec1
+//
+inline const floatInVec select(const floatInVec &vec0, const floatInVec &vec1, const boolInVec &select_vec1);
+
+} // namespace Vectormath
+
+//--------------------------------------------------------------------------------------------------
+// floatInVec implementation
+//
+
+#include "boolInVec.h"
+
+namespace Vectormath {
+
+inline
+floatInVec::floatInVec(__m128 vec)
+{
+ mData = vec;
+}
+
+inline
+floatInVec::floatInVec(const boolInVec &vec)
+{
+ mData = vec_sel(_mm_setzero_ps(), _mm_set1_ps(1.0f), vec.get128());
+}
+
+inline
+floatInVec::floatInVec(__m128 vec, int slot)
+{
+ SSEFloat v;
+ v.m128 = vec;
+ mData = _mm_set1_ps(v.f[slot]);
+}
+
+inline
+floatInVec::floatInVec(float scalar)
+{
+ mData = _mm_set1_ps(scalar);
+}
+
+#ifdef _VECTORMATH_NO_SCALAR_CAST
+inline
+float
+floatInVec::getAsFloat() const
+#else
+inline
+floatInVec::operator float() const
+#endif
+{
+ return *((float *)&mData);
+}
+
+inline
+__m128
+floatInVec::get128() const
+{
+ return mData;
+}
+
+inline
+const floatInVec
+floatInVec::operator ++ (int)
+{
+ __m128 olddata = mData;
+ operator ++();
+ return floatInVec(olddata);
+}
+
+inline
+const floatInVec
+floatInVec::operator -- (int)
+{
+ __m128 olddata = mData;
+ operator --();
+ return floatInVec(olddata);
+}
+
+inline
+floatInVec&
+floatInVec::operator ++ ()
+{
+ *this += floatInVec(_mm_set1_ps(1.0f));
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator -- ()
+{
+ *this -= floatInVec(_mm_set1_ps(1.0f));
+ return *this;
+}
+
+inline
+const floatInVec
+floatInVec::operator - () const
+{
+ return floatInVec(_mm_sub_ps(_mm_setzero_ps(), mData));
+}
+
+inline
+floatInVec&
+floatInVec::operator = (const floatInVec &vec)
+{
+ mData = vec.mData;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator *= (const floatInVec &vec)
+{
+ *this = *this * vec;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator /= (const floatInVec &vec)
+{
+ *this = *this / vec;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator += (const floatInVec &vec)
+{
+ *this = *this + vec;
+ return *this;
+}
+
+inline
+floatInVec&
+floatInVec::operator -= (const floatInVec &vec)
+{
+ *this = *this - vec;
+ return *this;
+}
+
+inline
+const floatInVec
+operator * (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return floatInVec(_mm_mul_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const floatInVec
+operator / (const floatInVec &num, const floatInVec &den)
+{
+ return floatInVec(_mm_div_ps(num.get128(), den.get128()));
+}
+
+inline
+const floatInVec
+operator + (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return floatInVec(_mm_add_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const floatInVec
+operator - (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return floatInVec(_mm_sub_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator < (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return boolInVec(_mm_cmpgt_ps(vec1.get128(), vec0.get128()));
+}
+
+inline
+const boolInVec
+operator <= (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return boolInVec(_mm_cmpge_ps(vec1.get128(), vec0.get128()));
+}
+
+inline
+const boolInVec
+operator > (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return boolInVec(_mm_cmpgt_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator >= (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return boolInVec(_mm_cmpge_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator == (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return boolInVec(_mm_cmpeq_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const boolInVec
+operator != (const floatInVec &vec0, const floatInVec &vec1)
+{
+ return boolInVec(_mm_cmpneq_ps(vec0.get128(), vec1.get128()));
+}
+
+inline
+const floatInVec
+select(const floatInVec &vec0, const floatInVec &vec1, const boolInVec &select_vec1)
+{
+ return floatInVec(vec_sel(vec0.get128(), vec1.get128(), select_vec1.get128()));
+}
+
+} // namespace Vectormath
+
+#endif // floatInVec_h
diff --git a/tests/bullet/src/vectormath/sse/mat_aos.h b/tests/bullet/src/vectormath/sse/mat_aos.h
new file mode 100644
index 00000000..fe6aa62b
--- /dev/null
+++ b/tests/bullet/src/vectormath/sse/mat_aos.h
@@ -0,0 +1,2190 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#ifndef _VECTORMATH_MAT_AOS_CPP_H
+#define _VECTORMATH_MAT_AOS_CPP_H
+
+namespace Vectormath {
+namespace Aos {
+
+//-----------------------------------------------------------------------------
+// Constants
+// for shuffles, words are labeled [x,y,z,w] [a,b,c,d]
+
+#define _VECTORMATH_PERM_ZBWX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_B, _VECTORMATH_PERM_W, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_XCYX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_C, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_XYAB ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_A, _VECTORMATH_PERM_B })
+#define _VECTORMATH_PERM_ZWCD ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_W, _VECTORMATH_PERM_C, _VECTORMATH_PERM_D })
+#define _VECTORMATH_PERM_XZBX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_B, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_CXXX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_C, _VECTORMATH_PERM_X, _VECTORMATH_PERM_X, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_YAXX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_A, _VECTORMATH_PERM_X, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_XAZC ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_A, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_C })
+#define _VECTORMATH_PERM_YXWZ ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_X, _VECTORMATH_PERM_W, _VECTORMATH_PERM_Z })
+#define _VECTORMATH_PERM_YBWD ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_B, _VECTORMATH_PERM_W, _VECTORMATH_PERM_D })
+#define _VECTORMATH_PERM_XYCX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_C, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_YCXY ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_C, _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y })
+#define _VECTORMATH_PERM_CXYC ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_C, _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_C })
+#define _VECTORMATH_PERM_ZAYX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_BZXX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_B, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PERM_XZYA ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_A })
+#define _VECTORMATH_PERM_ZXXB ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_X, _VECTORMATH_PERM_B })
+#define _VECTORMATH_PERM_YXXC ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_X, _VECTORMATH_PERM_X, _VECTORMATH_PERM_C })
+#define _VECTORMATH_PERM_BBYX ((vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_B, _VECTORMATH_PERM_B, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_X })
+#define _VECTORMATH_PI_OVER_2 1.570796327f
+
+//-----------------------------------------------------------------------------
+// Definitions
+
+VECTORMATH_FORCE_INLINE Matrix3::Matrix3( const Matrix3 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3::Matrix3( float scalar )
+{
+ mCol0 = Vector3( scalar );
+ mCol1 = Vector3( scalar );
+ mCol2 = Vector3( scalar );
+}
+
+VECTORMATH_FORCE_INLINE Matrix3::Matrix3( const floatInVec &scalar )
+{
+ mCol0 = Vector3( scalar );
+ mCol1 = Vector3( scalar );
+ mCol2 = Vector3( scalar );
+}
+
+VECTORMATH_FORCE_INLINE Matrix3::Matrix3( const Quat &unitQuat )
+{
+ __m128 xyzw_2, wwww, yzxw, zxyw, yzxw_2, zxyw_2;
+ __m128 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
+ VM_ATTRIBUTE_ALIGN16 unsigned int sx[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int sz[4] = {0, 0, 0xffffffff, 0};
+ __m128 select_x = _mm_load_ps((float *)sx);
+ __m128 select_z = _mm_load_ps((float *)sz);
+
+ xyzw_2 = _mm_add_ps( unitQuat.get128(), unitQuat.get128() );
+ wwww = _mm_shuffle_ps( unitQuat.get128(), unitQuat.get128(), _MM_SHUFFLE(3,3,3,3) );
+ yzxw = _mm_shuffle_ps( unitQuat.get128(), unitQuat.get128(), _MM_SHUFFLE(3,0,2,1) );
+ zxyw = _mm_shuffle_ps( unitQuat.get128(), unitQuat.get128(), _MM_SHUFFLE(3,1,0,2) );
+ yzxw_2 = _mm_shuffle_ps( xyzw_2, xyzw_2, _MM_SHUFFLE(3,0,2,1) );
+ zxyw_2 = _mm_shuffle_ps( xyzw_2, xyzw_2, _MM_SHUFFLE(3,1,0,2) );
+
+ tmp0 = _mm_mul_ps( yzxw_2, wwww ); // tmp0 = 2yw, 2zw, 2xw, 2w2
+ tmp1 = _mm_sub_ps( _mm_set1_ps(1.0f), _mm_mul_ps(yzxw, yzxw_2) ); // tmp1 = 1 - 2y2, 1 - 2z2, 1 - 2x2, 1 - 2w2
+ tmp2 = _mm_mul_ps( yzxw, xyzw_2 ); // tmp2 = 2xy, 2yz, 2xz, 2w2
+ tmp0 = _mm_add_ps( _mm_mul_ps(zxyw, xyzw_2), tmp0 ); // tmp0 = 2yw + 2zx, 2zw + 2xy, 2xw + 2yz, 2w2 + 2w2
+ tmp1 = _mm_sub_ps( tmp1, _mm_mul_ps(zxyw, zxyw_2) ); // tmp1 = 1 - 2y2 - 2z2, 1 - 2z2 - 2x2, 1 - 2x2 - 2y2, 1 - 2w2 - 2w2
+ tmp2 = _mm_sub_ps( tmp2, _mm_mul_ps(zxyw_2, wwww) ); // tmp2 = 2xy - 2zw, 2yz - 2xw, 2xz - 2yw, 2w2 -2w2
+
+ tmp3 = vec_sel( tmp0, tmp1, select_x );
+ tmp4 = vec_sel( tmp1, tmp2, select_x );
+ tmp5 = vec_sel( tmp2, tmp0, select_x );
+ mCol0 = Vector3( vec_sel( tmp3, tmp2, select_z ) );
+ mCol1 = Vector3( vec_sel( tmp4, tmp0, select_z ) );
+ mCol2 = Vector3( vec_sel( tmp5, tmp1, select_z ) );
+}
+
+VECTORMATH_FORCE_INLINE Matrix3::Matrix3( const Vector3 &_col0, const Vector3 &_col1, const Vector3 &_col2 )
+{
+ mCol0 = _col0;
+ mCol1 = _col1;
+ mCol2 = _col2;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::setCol0( const Vector3 &_col0 )
+{
+ mCol0 = _col0;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::setCol1( const Vector3 &_col1 )
+{
+ mCol1 = _col1;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::setCol2( const Vector3 &_col2 )
+{
+ mCol2 = _col2;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::setCol( int col, const Vector3 &vec )
+{
+ *(&mCol0 + col) = vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::setRow( int row, const Vector3 &vec )
+{
+ mCol0.setElem( row, vec.getElem( 0 ) );
+ mCol1.setElem( row, vec.getElem( 1 ) );
+ mCol2.setElem( row, vec.getElem( 2 ) );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::setElem( int col, int row, float val )
+{
+ (*this)[col].setElem(row, val);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::setElem( int col, int row, const floatInVec &val )
+{
+ Vector3 tmpV3_0;
+ tmpV3_0 = this->getCol( col );
+ tmpV3_0.setElem( row, val );
+ this->setCol( col, tmpV3_0 );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Matrix3::getElem( int col, int row ) const
+{
+ return this->getCol( col ).getElem( row );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix3::getCol0( ) const
+{
+ return mCol0;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix3::getCol1( ) const
+{
+ return mCol1;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix3::getCol2( ) const
+{
+ return mCol2;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix3::getCol( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix3::getRow( int row ) const
+{
+ return Vector3( mCol0.getElem( row ), mCol1.getElem( row ), mCol2.getElem( row ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Matrix3::operator []( int col )
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix3::operator []( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::operator =( const Matrix3 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 transpose( const Matrix3 & mat )
+{
+ __m128 tmp0, tmp1, res0, res1, res2;
+ tmp0 = vec_mergeh( mat.getCol0().get128(), mat.getCol2().get128() );
+ tmp1 = vec_mergel( mat.getCol0().get128(), mat.getCol2().get128() );
+ res0 = vec_mergeh( tmp0, mat.getCol1().get128() );
+ //res1 = vec_perm( tmp0, mat.getCol1().get128(), _VECTORMATH_PERM_ZBWX );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ res1 = _mm_shuffle_ps( tmp0, tmp0, _MM_SHUFFLE(0,3,2,2));
+ res1 = vec_sel(res1, mat.getCol1().get128(), select_y);
+ //res2 = vec_perm( tmp1, mat.getCol1().get128(), _VECTORMATH_PERM_XCYX );
+ res2 = _mm_shuffle_ps( tmp1, tmp1, _MM_SHUFFLE(0,1,1,0));
+ res2 = vec_sel(res2, vec_splat(mat.getCol1().get128(), 2), select_y);
+ return Matrix3(
+ Vector3( res0 ),
+ Vector3( res1 ),
+ Vector3( res2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 inverse( const Matrix3 & mat )
+{
+ __m128 tmp0, tmp1, tmp2, tmp3, tmp4, dot, invdet, inv0, inv1, inv2;
+ tmp2 = _vmathVfCross( mat.getCol0().get128(), mat.getCol1().get128() );
+ tmp0 = _vmathVfCross( mat.getCol1().get128(), mat.getCol2().get128() );
+ tmp1 = _vmathVfCross( mat.getCol2().get128(), mat.getCol0().get128() );
+ dot = _vmathVfDot3( tmp2, mat.getCol2().get128() );
+ dot = vec_splat( dot, 0 );
+ invdet = recipf4( dot );
+ tmp3 = vec_mergeh( tmp0, tmp2 );
+ tmp4 = vec_mergel( tmp0, tmp2 );
+ inv0 = vec_mergeh( tmp3, tmp1 );
+ //inv1 = vec_perm( tmp3, tmp1, _VECTORMATH_PERM_ZBWX );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ inv1 = _mm_shuffle_ps( tmp3, tmp3, _MM_SHUFFLE(0,3,2,2));
+ inv1 = vec_sel(inv1, tmp1, select_y);
+ //inv2 = vec_perm( tmp4, tmp1, _VECTORMATH_PERM_XCYX );
+ inv2 = _mm_shuffle_ps( tmp4, tmp4, _MM_SHUFFLE(0,1,1,0));
+ inv2 = vec_sel(inv2, vec_splat(tmp1, 2), select_y);
+ inv0 = vec_mul( inv0, invdet );
+ inv1 = vec_mul( inv1, invdet );
+ inv2 = vec_mul( inv2, invdet );
+ return Matrix3(
+ Vector3( inv0 ),
+ Vector3( inv1 ),
+ Vector3( inv2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec determinant( const Matrix3 & mat )
+{
+ return dot( mat.getCol2(), cross( mat.getCol0(), mat.getCol1() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::operator +( const Matrix3 & mat ) const
+{
+ return Matrix3(
+ ( mCol0 + mat.mCol0 ),
+ ( mCol1 + mat.mCol1 ),
+ ( mCol2 + mat.mCol2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::operator -( const Matrix3 & mat ) const
+{
+ return Matrix3(
+ ( mCol0 - mat.mCol0 ),
+ ( mCol1 - mat.mCol1 ),
+ ( mCol2 - mat.mCol2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::operator +=( const Matrix3 & mat )
+{
+ *this = *this + mat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::operator -=( const Matrix3 & mat )
+{
+ *this = *this - mat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::operator -( ) const
+{
+ return Matrix3(
+ ( -mCol0 ),
+ ( -mCol1 ),
+ ( -mCol2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 absPerElem( const Matrix3 & mat )
+{
+ return Matrix3(
+ absPerElem( mat.getCol0() ),
+ absPerElem( mat.getCol1() ),
+ absPerElem( mat.getCol2() )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::operator *( float scalar ) const
+{
+ return *this * floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::operator *( const floatInVec &scalar ) const
+{
+ return Matrix3(
+ ( mCol0 * scalar ),
+ ( mCol1 * scalar ),
+ ( mCol2 * scalar )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::operator *=( float scalar )
+{
+ return *this *= floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::operator *=( const floatInVec &scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 operator *( float scalar, const Matrix3 & mat )
+{
+ return floatInVec(scalar) * mat;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 operator *( const floatInVec &scalar, const Matrix3 & mat )
+{
+ return mat * scalar;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix3::operator *( const Vector3 &vec ) const
+{
+ __m128 res;
+ __m128 xxxx, yyyy, zzzz;
+ xxxx = vec_splat( vec.get128(), 0 );
+ yyyy = vec_splat( vec.get128(), 1 );
+ zzzz = vec_splat( vec.get128(), 2 );
+ res = vec_mul( mCol0.get128(), xxxx );
+ res = vec_madd( mCol1.get128(), yyyy, res );
+ res = vec_madd( mCol2.get128(), zzzz, res );
+ return Vector3( res );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::operator *( const Matrix3 & mat ) const
+{
+ return Matrix3(
+ ( *this * mat.mCol0 ),
+ ( *this * mat.mCol1 ),
+ ( *this * mat.mCol2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix3 & Matrix3::operator *=( const Matrix3 & mat )
+{
+ *this = *this * mat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 mulPerElem( const Matrix3 & mat0, const Matrix3 & mat1 )
+{
+ return Matrix3(
+ mulPerElem( mat0.getCol0(), mat1.getCol0() ),
+ mulPerElem( mat0.getCol1(), mat1.getCol1() ),
+ mulPerElem( mat0.getCol2(), mat1.getCol2() )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::identity( )
+{
+ return Matrix3(
+ Vector3::xAxis( ),
+ Vector3::yAxis( ),
+ Vector3::zAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotationX( float radians )
+{
+ return rotationX( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotationX( const floatInVec &radians )
+{
+ __m128 s, c, res1, res2;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res1 = vec_sel( zero, c, select_y );
+ res1 = vec_sel( res1, s, select_z );
+ res2 = vec_sel( zero, negatef4(s), select_y );
+ res2 = vec_sel( res2, c, select_z );
+ return Matrix3(
+ Vector3::xAxis( ),
+ Vector3( res1 ),
+ Vector3( res2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotationY( float radians )
+{
+ return rotationY( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotationY( const floatInVec &radians )
+{
+ __m128 s, c, res0, res2;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res0 = vec_sel( zero, c, select_x );
+ res0 = vec_sel( res0, negatef4(s), select_z );
+ res2 = vec_sel( zero, s, select_x );
+ res2 = vec_sel( res2, c, select_z );
+ return Matrix3(
+ Vector3( res0 ),
+ Vector3::yAxis( ),
+ Vector3( res2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotationZ( float radians )
+{
+ return rotationZ( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotationZ( const floatInVec &radians )
+{
+ __m128 s, c, res0, res1;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res0 = vec_sel( zero, c, select_x );
+ res0 = vec_sel( res0, s, select_y );
+ res1 = vec_sel( zero, negatef4(s), select_x );
+ res1 = vec_sel( res1, c, select_y );
+ return Matrix3(
+ Vector3( res0 ),
+ Vector3( res1 ),
+ Vector3::zAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotationZYX( const Vector3 &radiansXYZ )
+{
+ __m128 angles, s, negS, c, X0, X1, Y0, Y1, Z0, Z1, tmp;
+ angles = Vector4( radiansXYZ, 0.0f ).get128();
+ sincosf4( angles, &s, &c );
+ negS = negatef4( s );
+ Z0 = vec_mergel( c, s );
+ Z1 = vec_mergel( negS, c );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_xyz[4] = {0xffffffff, 0xffffffff, 0xffffffff, 0};
+ Z1 = vec_and( Z1, _mm_load_ps( (float *)select_xyz ) );
+ Y0 = _mm_shuffle_ps( c, negS, _MM_SHUFFLE(0,1,1,1) );
+ Y1 = _mm_shuffle_ps( s, c, _MM_SHUFFLE(0,1,1,1) );
+ X0 = vec_splat( s, 0 );
+ X1 = vec_splat( c, 0 );
+ tmp = vec_mul( Z0, Y1 );
+ return Matrix3(
+ Vector3( vec_mul( Z0, Y0 ) ),
+ Vector3( vec_madd( Z1, X1, vec_mul( tmp, X0 ) ) ),
+ Vector3( vec_nmsub( Z1, X0, vec_mul( tmp, X1 ) ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotation( float radians, const Vector3 &unitVec )
+{
+ return rotation( floatInVec(radians), unitVec );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotation( const floatInVec &radians, const Vector3 &unitVec )
+{
+ __m128 axis, s, c, oneMinusC, axisS, negAxisS, xxxx, yyyy, zzzz, tmp0, tmp1, tmp2;
+ axis = unitVec.get128();
+ sincosf4( radians.get128(), &s, &c );
+ xxxx = vec_splat( axis, 0 );
+ yyyy = vec_splat( axis, 1 );
+ zzzz = vec_splat( axis, 2 );
+ oneMinusC = vec_sub( _mm_set1_ps(1.0f), c );
+ axisS = vec_mul( axis, s );
+ negAxisS = negatef4( axisS );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ //tmp0 = vec_perm( axisS, negAxisS, _VECTORMATH_PERM_XZBX );
+ tmp0 = _mm_shuffle_ps( axisS, axisS, _MM_SHUFFLE(0,0,2,0) );
+ tmp0 = vec_sel(tmp0, vec_splat(negAxisS, 1), select_z);
+ //tmp1 = vec_perm( axisS, negAxisS, _VECTORMATH_PERM_CXXX );
+ tmp1 = vec_sel( vec_splat(axisS, 0), vec_splat(negAxisS, 2), select_x );
+ //tmp2 = vec_perm( axisS, negAxisS, _VECTORMATH_PERM_YAXX );
+ tmp2 = _mm_shuffle_ps( axisS, axisS, _MM_SHUFFLE(0,0,0,1) );
+ tmp2 = vec_sel(tmp2, vec_splat(negAxisS, 0), select_y);
+ tmp0 = vec_sel( tmp0, c, select_x );
+ tmp1 = vec_sel( tmp1, c, select_y );
+ tmp2 = vec_sel( tmp2, c, select_z );
+ return Matrix3(
+ Vector3( vec_madd( vec_mul( axis, xxxx ), oneMinusC, tmp0 ) ),
+ Vector3( vec_madd( vec_mul( axis, yyyy ), oneMinusC, tmp1 ) ),
+ Vector3( vec_madd( vec_mul( axis, zzzz ), oneMinusC, tmp2 ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::rotation( const Quat &unitQuat )
+{
+ return Matrix3( unitQuat );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix3::scale( const Vector3 &scaleVec )
+{
+ __m128 zero = _mm_setzero_ps();
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ return Matrix3(
+ Vector3( vec_sel( zero, scaleVec.get128(), select_x ) ),
+ Vector3( vec_sel( zero, scaleVec.get128(), select_y ) ),
+ Vector3( vec_sel( zero, scaleVec.get128(), select_z ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 appendScale( const Matrix3 & mat, const Vector3 &scaleVec )
+{
+ return Matrix3(
+ ( mat.getCol0() * scaleVec.getX( ) ),
+ ( mat.getCol1() * scaleVec.getY( ) ),
+ ( mat.getCol2() * scaleVec.getZ( ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 prependScale( const Vector3 &scaleVec, const Matrix3 & mat )
+{
+ return Matrix3(
+ mulPerElem( mat.getCol0(), scaleVec ),
+ mulPerElem( mat.getCol1(), scaleVec ),
+ mulPerElem( mat.getCol2(), scaleVec )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, bool select1 )
+{
+ return Matrix3(
+ select( mat0.getCol0(), mat1.getCol0(), select1 ),
+ select( mat0.getCol1(), mat1.getCol1(), select1 ),
+ select( mat0.getCol2(), mat1.getCol2(), select1 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, const boolInVec &select1 )
+{
+ return Matrix3(
+ select( mat0.getCol0(), mat1.getCol0(), select1 ),
+ select( mat0.getCol1(), mat1.getCol1(), select1 ),
+ select( mat0.getCol2(), mat1.getCol2(), select1 )
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+VECTORMATH_FORCE_INLINE void print( const Matrix3 & mat )
+{
+ print( mat.getRow( 0 ) );
+ print( mat.getRow( 1 ) );
+ print( mat.getRow( 2 ) );
+}
+
+VECTORMATH_FORCE_INLINE void print( const Matrix3 & mat, const char * name )
+{
+ printf("%s:\n", name);
+ print( mat );
+}
+
+#endif
+
+VECTORMATH_FORCE_INLINE Matrix4::Matrix4( const Matrix4 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+ mCol3 = mat.mCol3;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4::Matrix4( float scalar )
+{
+ mCol0 = Vector4( scalar );
+ mCol1 = Vector4( scalar );
+ mCol2 = Vector4( scalar );
+ mCol3 = Vector4( scalar );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4::Matrix4( const floatInVec &scalar )
+{
+ mCol0 = Vector4( scalar );
+ mCol1 = Vector4( scalar );
+ mCol2 = Vector4( scalar );
+ mCol3 = Vector4( scalar );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4::Matrix4( const Transform3 & mat )
+{
+ mCol0 = Vector4( mat.getCol0(), 0.0f );
+ mCol1 = Vector4( mat.getCol1(), 0.0f );
+ mCol2 = Vector4( mat.getCol2(), 0.0f );
+ mCol3 = Vector4( mat.getCol3(), 1.0f );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4::Matrix4( const Vector4 &_col0, const Vector4 &_col1, const Vector4 &_col2, const Vector4 &_col3 )
+{
+ mCol0 = _col0;
+ mCol1 = _col1;
+ mCol2 = _col2;
+ mCol3 = _col3;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4::Matrix4( const Matrix3 & mat, const Vector3 &translateVec )
+{
+ mCol0 = Vector4( mat.getCol0(), 0.0f );
+ mCol1 = Vector4( mat.getCol1(), 0.0f );
+ mCol2 = Vector4( mat.getCol2(), 0.0f );
+ mCol3 = Vector4( translateVec, 1.0f );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4::Matrix4( const Quat &unitQuat, const Vector3 &translateVec )
+{
+ Matrix3 mat;
+ mat = Matrix3( unitQuat );
+ mCol0 = Vector4( mat.getCol0(), 0.0f );
+ mCol1 = Vector4( mat.getCol1(), 0.0f );
+ mCol2 = Vector4( mat.getCol2(), 0.0f );
+ mCol3 = Vector4( translateVec, 1.0f );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setCol0( const Vector4 &_col0 )
+{
+ mCol0 = _col0;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setCol1( const Vector4 &_col1 )
+{
+ mCol1 = _col1;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setCol2( const Vector4 &_col2 )
+{
+ mCol2 = _col2;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setCol3( const Vector4 &_col3 )
+{
+ mCol3 = _col3;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setCol( int col, const Vector4 &vec )
+{
+ *(&mCol0 + col) = vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setRow( int row, const Vector4 &vec )
+{
+ mCol0.setElem( row, vec.getElem( 0 ) );
+ mCol1.setElem( row, vec.getElem( 1 ) );
+ mCol2.setElem( row, vec.getElem( 2 ) );
+ mCol3.setElem( row, vec.getElem( 3 ) );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setElem( int col, int row, float val )
+{
+ (*this)[col].setElem(row, val);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setElem( int col, int row, const floatInVec &val )
+{
+ Vector4 tmpV3_0;
+ tmpV3_0 = this->getCol( col );
+ tmpV3_0.setElem( row, val );
+ this->setCol( col, tmpV3_0 );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Matrix4::getElem( int col, int row ) const
+{
+ return this->getCol( col ).getElem( row );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::getCol0( ) const
+{
+ return mCol0;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::getCol1( ) const
+{
+ return mCol1;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::getCol2( ) const
+{
+ return mCol2;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::getCol3( ) const
+{
+ return mCol3;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::getCol( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::getRow( int row ) const
+{
+ return Vector4( mCol0.getElem( row ), mCol1.getElem( row ), mCol2.getElem( row ), mCol3.getElem( row ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Matrix4::operator []( int col )
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::operator []( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::operator =( const Matrix4 & mat )
+{
+ mCol0 = mat.mCol0;
+ mCol1 = mat.mCol1;
+ mCol2 = mat.mCol2;
+ mCol3 = mat.mCol3;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 transpose( const Matrix4 & mat )
+{
+ __m128 tmp0, tmp1, tmp2, tmp3, res0, res1, res2, res3;
+ tmp0 = vec_mergeh( mat.getCol0().get128(), mat.getCol2().get128() );
+ tmp1 = vec_mergeh( mat.getCol1().get128(), mat.getCol3().get128() );
+ tmp2 = vec_mergel( mat.getCol0().get128(), mat.getCol2().get128() );
+ tmp3 = vec_mergel( mat.getCol1().get128(), mat.getCol3().get128() );
+ res0 = vec_mergeh( tmp0, tmp1 );
+ res1 = vec_mergel( tmp0, tmp1 );
+ res2 = vec_mergeh( tmp2, tmp3 );
+ res3 = vec_mergel( tmp2, tmp3 );
+ return Matrix4(
+ Vector4( res0 ),
+ Vector4( res1 ),
+ Vector4( res2 ),
+ Vector4( res3 )
+ );
+}
+
+// TODO: Tidy
+static VM_ATTRIBUTE_ALIGN16 const unsigned int _vmathPNPN[4] = {0x00000000, 0x80000000, 0x00000000, 0x80000000};
+static VM_ATTRIBUTE_ALIGN16 const unsigned int _vmathNPNP[4] = {0x80000000, 0x00000000, 0x80000000, 0x00000000};
+static VM_ATTRIBUTE_ALIGN16 const float _vmathZERONE[4] = {1.0f, 0.0f, 0.0f, 1.0f};
+
+VECTORMATH_FORCE_INLINE const Matrix4 inverse( const Matrix4 & mat )
+{
+ __m128 Va,Vb,Vc;
+ __m128 r1,r2,r3,tt,tt2;
+ __m128 sum,Det,RDet;
+ __m128 trns0,trns1,trns2,trns3;
+
+ __m128 _L1 = mat.getCol0().get128();
+ __m128 _L2 = mat.getCol1().get128();
+ __m128 _L3 = mat.getCol2().get128();
+ __m128 _L4 = mat.getCol3().get128();
+ // Calculating the minterms for the first line.
+
+ // _mm_ror_ps is just a macro using _mm_shuffle_ps().
+ tt = _L4; tt2 = _mm_ror_ps(_L3,1);
+ Vc = _mm_mul_ps(tt2,_mm_ror_ps(tt,0)); // V3'dot V4
+ Va = _mm_mul_ps(tt2,_mm_ror_ps(tt,2)); // V3'dot V4"
+ Vb = _mm_mul_ps(tt2,_mm_ror_ps(tt,3)); // V3' dot V4^
+
+ r1 = _mm_sub_ps(_mm_ror_ps(Va,1),_mm_ror_ps(Vc,2)); // V3" dot V4^ - V3^ dot V4"
+ r2 = _mm_sub_ps(_mm_ror_ps(Vb,2),_mm_ror_ps(Vb,0)); // V3^ dot V4' - V3' dot V4^
+ r3 = _mm_sub_ps(_mm_ror_ps(Va,0),_mm_ror_ps(Vc,1)); // V3' dot V4" - V3" dot V4'
+
+ tt = _L2;
+ Va = _mm_ror_ps(tt,1); sum = _mm_mul_ps(Va,r1);
+ Vb = _mm_ror_ps(tt,2); sum = _mm_add_ps(sum,_mm_mul_ps(Vb,r2));
+ Vc = _mm_ror_ps(tt,3); sum = _mm_add_ps(sum,_mm_mul_ps(Vc,r3));
+
+ // Calculating the determinant.
+ Det = _mm_mul_ps(sum,_L1);
+ Det = _mm_add_ps(Det,_mm_movehl_ps(Det,Det));
+
+ const __m128 Sign_PNPN = _mm_load_ps((float *)_vmathPNPN);
+ const __m128 Sign_NPNP = _mm_load_ps((float *)_vmathNPNP);
+
+ __m128 mtL1 = _mm_xor_ps(sum,Sign_PNPN);
+
+ // Calculating the minterms of the second line (using previous results).
+ tt = _mm_ror_ps(_L1,1); sum = _mm_mul_ps(tt,r1);
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2));
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3));
+ __m128 mtL2 = _mm_xor_ps(sum,Sign_NPNP);
+
+ // Testing the determinant.
+ Det = _mm_sub_ss(Det,_mm_shuffle_ps(Det,Det,1));
+
+ // Calculating the minterms of the third line.
+ tt = _mm_ror_ps(_L1,1);
+ Va = _mm_mul_ps(tt,Vb); // V1' dot V2"
+ Vb = _mm_mul_ps(tt,Vc); // V1' dot V2^
+ Vc = _mm_mul_ps(tt,_L2); // V1' dot V2
+
+ r1 = _mm_sub_ps(_mm_ror_ps(Va,1),_mm_ror_ps(Vc,2)); // V1" dot V2^ - V1^ dot V2"
+ r2 = _mm_sub_ps(_mm_ror_ps(Vb,2),_mm_ror_ps(Vb,0)); // V1^ dot V2' - V1' dot V2^
+ r3 = _mm_sub_ps(_mm_ror_ps(Va,0),_mm_ror_ps(Vc,1)); // V1' dot V2" - V1" dot V2'
+
+ tt = _mm_ror_ps(_L4,1); sum = _mm_mul_ps(tt,r1);
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2));
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3));
+ __m128 mtL3 = _mm_xor_ps(sum,Sign_PNPN);
+
+ // Dividing is FASTER than rcp_nr! (Because rcp_nr causes many register-memory RWs).
+ RDet = _mm_div_ss(_mm_load_ss((float *)&_vmathZERONE), Det); // TODO: just 1.0f?
+ RDet = _mm_shuffle_ps(RDet,RDet,0x00);
+
+ // Devide the first 12 minterms with the determinant.
+ mtL1 = _mm_mul_ps(mtL1, RDet);
+ mtL2 = _mm_mul_ps(mtL2, RDet);
+ mtL3 = _mm_mul_ps(mtL3, RDet);
+
+ // Calculate the minterms of the forth line and devide by the determinant.
+ tt = _mm_ror_ps(_L3,1); sum = _mm_mul_ps(tt,r1);
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2));
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3));
+ __m128 mtL4 = _mm_xor_ps(sum,Sign_NPNP);
+ mtL4 = _mm_mul_ps(mtL4, RDet);
+
+ // Now we just have to transpose the minterms matrix.
+ trns0 = _mm_unpacklo_ps(mtL1,mtL2);
+ trns1 = _mm_unpacklo_ps(mtL3,mtL4);
+ trns2 = _mm_unpackhi_ps(mtL1,mtL2);
+ trns3 = _mm_unpackhi_ps(mtL3,mtL4);
+ _L1 = _mm_movelh_ps(trns0,trns1);
+ _L2 = _mm_movehl_ps(trns1,trns0);
+ _L3 = _mm_movelh_ps(trns2,trns3);
+ _L4 = _mm_movehl_ps(trns3,trns2);
+
+ return Matrix4(
+ Vector4( _L1 ),
+ Vector4( _L2 ),
+ Vector4( _L3 ),
+ Vector4( _L4 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 affineInverse( const Matrix4 & mat )
+{
+ Transform3 affineMat;
+ affineMat.setCol0( mat.getCol0().getXYZ( ) );
+ affineMat.setCol1( mat.getCol1().getXYZ( ) );
+ affineMat.setCol2( mat.getCol2().getXYZ( ) );
+ affineMat.setCol3( mat.getCol3().getXYZ( ) );
+ return Matrix4( inverse( affineMat ) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 orthoInverse( const Matrix4 & mat )
+{
+ Transform3 affineMat;
+ affineMat.setCol0( mat.getCol0().getXYZ( ) );
+ affineMat.setCol1( mat.getCol1().getXYZ( ) );
+ affineMat.setCol2( mat.getCol2().getXYZ( ) );
+ affineMat.setCol3( mat.getCol3().getXYZ( ) );
+ return Matrix4( orthoInverse( affineMat ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec determinant( const Matrix4 & mat )
+{
+ __m128 Va,Vb,Vc;
+ __m128 r1,r2,r3,tt,tt2;
+ __m128 sum,Det;
+
+ __m128 _L1 = mat.getCol0().get128();
+ __m128 _L2 = mat.getCol1().get128();
+ __m128 _L3 = mat.getCol2().get128();
+ __m128 _L4 = mat.getCol3().get128();
+ // Calculating the minterms for the first line.
+
+ // _mm_ror_ps is just a macro using _mm_shuffle_ps().
+ tt = _L4; tt2 = _mm_ror_ps(_L3,1);
+ Vc = _mm_mul_ps(tt2,_mm_ror_ps(tt,0)); // V3' dot V4
+ Va = _mm_mul_ps(tt2,_mm_ror_ps(tt,2)); // V3' dot V4"
+ Vb = _mm_mul_ps(tt2,_mm_ror_ps(tt,3)); // V3' dot V4^
+
+ r1 = _mm_sub_ps(_mm_ror_ps(Va,1),_mm_ror_ps(Vc,2)); // V3" dot V4^ - V3^ dot V4"
+ r2 = _mm_sub_ps(_mm_ror_ps(Vb,2),_mm_ror_ps(Vb,0)); // V3^ dot V4' - V3' dot V4^
+ r3 = _mm_sub_ps(_mm_ror_ps(Va,0),_mm_ror_ps(Vc,1)); // V3' dot V4" - V3" dot V4'
+
+ tt = _L2;
+ Va = _mm_ror_ps(tt,1); sum = _mm_mul_ps(Va,r1);
+ Vb = _mm_ror_ps(tt,2); sum = _mm_add_ps(sum,_mm_mul_ps(Vb,r2));
+ Vc = _mm_ror_ps(tt,3); sum = _mm_add_ps(sum,_mm_mul_ps(Vc,r3));
+
+ // Calculating the determinant.
+ Det = _mm_mul_ps(sum,_L1);
+ Det = _mm_add_ps(Det,_mm_movehl_ps(Det,Det));
+
+ // Calculating the minterms of the second line (using previous results).
+ tt = _mm_ror_ps(_L1,1); sum = _mm_mul_ps(tt,r1);
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r2));
+ tt = _mm_ror_ps(tt,1); sum = _mm_add_ps(sum,_mm_mul_ps(tt,r3));
+
+ // Testing the determinant.
+ Det = _mm_sub_ss(Det,_mm_shuffle_ps(Det,Det,1));
+ return floatInVec(Det, 0);
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::operator +( const Matrix4 & mat ) const
+{
+ return Matrix4(
+ ( mCol0 + mat.mCol0 ),
+ ( mCol1 + mat.mCol1 ),
+ ( mCol2 + mat.mCol2 ),
+ ( mCol3 + mat.mCol3 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::operator -( const Matrix4 & mat ) const
+{
+ return Matrix4(
+ ( mCol0 - mat.mCol0 ),
+ ( mCol1 - mat.mCol1 ),
+ ( mCol2 - mat.mCol2 ),
+ ( mCol3 - mat.mCol3 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::operator +=( const Matrix4 & mat )
+{
+ *this = *this + mat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::operator -=( const Matrix4 & mat )
+{
+ *this = *this - mat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::operator -( ) const
+{
+ return Matrix4(
+ ( -mCol0 ),
+ ( -mCol1 ),
+ ( -mCol2 ),
+ ( -mCol3 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 absPerElem( const Matrix4 & mat )
+{
+ return Matrix4(
+ absPerElem( mat.getCol0() ),
+ absPerElem( mat.getCol1() ),
+ absPerElem( mat.getCol2() ),
+ absPerElem( mat.getCol3() )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::operator *( float scalar ) const
+{
+ return *this * floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::operator *( const floatInVec &scalar ) const
+{
+ return Matrix4(
+ ( mCol0 * scalar ),
+ ( mCol1 * scalar ),
+ ( mCol2 * scalar ),
+ ( mCol3 * scalar )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::operator *=( float scalar )
+{
+ return *this *= floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::operator *=( const floatInVec &scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 operator *( float scalar, const Matrix4 & mat )
+{
+ return floatInVec(scalar) * mat;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 operator *( const floatInVec &scalar, const Matrix4 & mat )
+{
+ return mat * scalar;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::operator *( const Vector4 &vec ) const
+{
+ return Vector4(
+ _mm_add_ps(
+ _mm_add_ps(_mm_mul_ps(mCol0.get128(), _mm_shuffle_ps(vec.get128(), vec.get128(), _MM_SHUFFLE(0,0,0,0))), _mm_mul_ps(mCol1.get128(), _mm_shuffle_ps(vec.get128(), vec.get128(), _MM_SHUFFLE(1,1,1,1)))),
+ _mm_add_ps(_mm_mul_ps(mCol2.get128(), _mm_shuffle_ps(vec.get128(), vec.get128(), _MM_SHUFFLE(2,2,2,2))), _mm_mul_ps(mCol3.get128(), _mm_shuffle_ps(vec.get128(), vec.get128(), _MM_SHUFFLE(3,3,3,3)))))
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::operator *( const Vector3 &vec ) const
+{
+ return Vector4(
+ _mm_add_ps(
+ _mm_add_ps(_mm_mul_ps(mCol0.get128(), _mm_shuffle_ps(vec.get128(), vec.get128(), _MM_SHUFFLE(0,0,0,0))), _mm_mul_ps(mCol1.get128(), _mm_shuffle_ps(vec.get128(), vec.get128(), _MM_SHUFFLE(1,1,1,1)))),
+ _mm_mul_ps(mCol2.get128(), _mm_shuffle_ps(vec.get128(), vec.get128(), _MM_SHUFFLE(2,2,2,2))))
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Matrix4::operator *( const Point3 &pnt ) const
+{
+ return Vector4(
+ _mm_add_ps(
+ _mm_add_ps(_mm_mul_ps(mCol0.get128(), _mm_shuffle_ps(pnt.get128(), pnt.get128(), _MM_SHUFFLE(0,0,0,0))), _mm_mul_ps(mCol1.get128(), _mm_shuffle_ps(pnt.get128(), pnt.get128(), _MM_SHUFFLE(1,1,1,1)))),
+ _mm_add_ps(_mm_mul_ps(mCol2.get128(), _mm_shuffle_ps(pnt.get128(), pnt.get128(), _MM_SHUFFLE(2,2,2,2))), mCol3.get128()))
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::operator *( const Matrix4 & mat ) const
+{
+ return Matrix4(
+ ( *this * mat.mCol0 ),
+ ( *this * mat.mCol1 ),
+ ( *this * mat.mCol2 ),
+ ( *this * mat.mCol3 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::operator *=( const Matrix4 & mat )
+{
+ *this = *this * mat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::operator *( const Transform3 & tfrm ) const
+{
+ return Matrix4(
+ ( *this * tfrm.getCol0() ),
+ ( *this * tfrm.getCol1() ),
+ ( *this * tfrm.getCol2() ),
+ ( *this * Point3( tfrm.getCol3() ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::operator *=( const Transform3 & tfrm )
+{
+ *this = *this * tfrm;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 mulPerElem( const Matrix4 & mat0, const Matrix4 & mat1 )
+{
+ return Matrix4(
+ mulPerElem( mat0.getCol0(), mat1.getCol0() ),
+ mulPerElem( mat0.getCol1(), mat1.getCol1() ),
+ mulPerElem( mat0.getCol2(), mat1.getCol2() ),
+ mulPerElem( mat0.getCol3(), mat1.getCol3() )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::identity( )
+{
+ return Matrix4(
+ Vector4::xAxis( ),
+ Vector4::yAxis( ),
+ Vector4::zAxis( ),
+ Vector4::wAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setUpper3x3( const Matrix3 & mat3 )
+{
+ mCol0.setXYZ( mat3.getCol0() );
+ mCol1.setXYZ( mat3.getCol1() );
+ mCol2.setXYZ( mat3.getCol2() );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Matrix4::getUpper3x3( ) const
+{
+ return Matrix3(
+ mCol0.getXYZ( ),
+ mCol1.getXYZ( ),
+ mCol2.getXYZ( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Matrix4 & Matrix4::setTranslation( const Vector3 &translateVec )
+{
+ mCol3.setXYZ( translateVec );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Matrix4::getTranslation( ) const
+{
+ return mCol3.getXYZ( );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotationX( float radians )
+{
+ return rotationX( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotationX( const floatInVec &radians )
+{
+ __m128 s, c, res1, res2;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res1 = vec_sel( zero, c, select_y );
+ res1 = vec_sel( res1, s, select_z );
+ res2 = vec_sel( zero, negatef4(s), select_y );
+ res2 = vec_sel( res2, c, select_z );
+ return Matrix4(
+ Vector4::xAxis( ),
+ Vector4( res1 ),
+ Vector4( res2 ),
+ Vector4::wAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotationY( float radians )
+{
+ return rotationY( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotationY( const floatInVec &radians )
+{
+ __m128 s, c, res0, res2;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res0 = vec_sel( zero, c, select_x );
+ res0 = vec_sel( res0, negatef4(s), select_z );
+ res2 = vec_sel( zero, s, select_x );
+ res2 = vec_sel( res2, c, select_z );
+ return Matrix4(
+ Vector4( res0 ),
+ Vector4::yAxis( ),
+ Vector4( res2 ),
+ Vector4::wAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotationZ( float radians )
+{
+ return rotationZ( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotationZ( const floatInVec &radians )
+{
+ __m128 s, c, res0, res1;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res0 = vec_sel( zero, c, select_x );
+ res0 = vec_sel( res0, s, select_y );
+ res1 = vec_sel( zero, negatef4(s), select_x );
+ res1 = vec_sel( res1, c, select_y );
+ return Matrix4(
+ Vector4( res0 ),
+ Vector4( res1 ),
+ Vector4::zAxis( ),
+ Vector4::wAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotationZYX( const Vector3 &radiansXYZ )
+{
+ __m128 angles, s, negS, c, X0, X1, Y0, Y1, Z0, Z1, tmp;
+ angles = Vector4( radiansXYZ, 0.0f ).get128();
+ sincosf4( angles, &s, &c );
+ negS = negatef4( s );
+ Z0 = vec_mergel( c, s );
+ Z1 = vec_mergel( negS, c );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_xyz[4] = {0xffffffff, 0xffffffff, 0xffffffff, 0};
+ Z1 = vec_and( Z1, _mm_load_ps( (float *)select_xyz ) );
+ Y0 = _mm_shuffle_ps( c, negS, _MM_SHUFFLE(0,1,1,1) );
+ Y1 = _mm_shuffle_ps( s, c, _MM_SHUFFLE(0,1,1,1) );
+ X0 = vec_splat( s, 0 );
+ X1 = vec_splat( c, 0 );
+ tmp = vec_mul( Z0, Y1 );
+ return Matrix4(
+ Vector4( vec_mul( Z0, Y0 ) ),
+ Vector4( vec_madd( Z1, X1, vec_mul( tmp, X0 ) ) ),
+ Vector4( vec_nmsub( Z1, X0, vec_mul( tmp, X1 ) ) ),
+ Vector4::wAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotation( float radians, const Vector3 &unitVec )
+{
+ return rotation( floatInVec(radians), unitVec );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotation( const floatInVec &radians, const Vector3 &unitVec )
+{
+ __m128 axis, s, c, oneMinusC, axisS, negAxisS, xxxx, yyyy, zzzz, tmp0, tmp1, tmp2;
+ axis = unitVec.get128();
+ sincosf4( radians.get128(), &s, &c );
+ xxxx = vec_splat( axis, 0 );
+ yyyy = vec_splat( axis, 1 );
+ zzzz = vec_splat( axis, 2 );
+ oneMinusC = vec_sub( _mm_set1_ps(1.0f), c );
+ axisS = vec_mul( axis, s );
+ negAxisS = negatef4( axisS );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ //tmp0 = vec_perm( axisS, negAxisS, _VECTORMATH_PERM_XZBX );
+ tmp0 = _mm_shuffle_ps( axisS, axisS, _MM_SHUFFLE(0,0,2,0) );
+ tmp0 = vec_sel(tmp0, vec_splat(negAxisS, 1), select_z);
+ //tmp1 = vec_perm( axisS, negAxisS, _VECTORMATH_PERM_CXXX );
+ tmp1 = vec_sel( vec_splat(axisS, 0), vec_splat(negAxisS, 2), select_x );
+ //tmp2 = vec_perm( axisS, negAxisS, _VECTORMATH_PERM_YAXX );
+ tmp2 = _mm_shuffle_ps( axisS, axisS, _MM_SHUFFLE(0,0,0,1) );
+ tmp2 = vec_sel(tmp2, vec_splat(negAxisS, 0), select_y);
+ tmp0 = vec_sel( tmp0, c, select_x );
+ tmp1 = vec_sel( tmp1, c, select_y );
+ tmp2 = vec_sel( tmp2, c, select_z );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_xyz[4] = {0xffffffff, 0xffffffff, 0xffffffff, 0};
+ axis = vec_and( axis, _mm_load_ps( (float *)select_xyz ) );
+ tmp0 = vec_and( tmp0, _mm_load_ps( (float *)select_xyz ) );
+ tmp1 = vec_and( tmp1, _mm_load_ps( (float *)select_xyz ) );
+ tmp2 = vec_and( tmp2, _mm_load_ps( (float *)select_xyz ) );
+ return Matrix4(
+ Vector4( vec_madd( vec_mul( axis, xxxx ), oneMinusC, tmp0 ) ),
+ Vector4( vec_madd( vec_mul( axis, yyyy ), oneMinusC, tmp1 ) ),
+ Vector4( vec_madd( vec_mul( axis, zzzz ), oneMinusC, tmp2 ) ),
+ Vector4::wAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::rotation( const Quat &unitQuat )
+{
+ return Matrix4( Transform3::rotation( unitQuat ) );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::scale( const Vector3 &scaleVec )
+{
+ __m128 zero = _mm_setzero_ps();
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ return Matrix4(
+ Vector4( vec_sel( zero, scaleVec.get128(), select_x ) ),
+ Vector4( vec_sel( zero, scaleVec.get128(), select_y ) ),
+ Vector4( vec_sel( zero, scaleVec.get128(), select_z ) ),
+ Vector4::wAxis( )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 appendScale( const Matrix4 & mat, const Vector3 &scaleVec )
+{
+ return Matrix4(
+ ( mat.getCol0() * scaleVec.getX( ) ),
+ ( mat.getCol1() * scaleVec.getY( ) ),
+ ( mat.getCol2() * scaleVec.getZ( ) ),
+ mat.getCol3()
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 prependScale( const Vector3 &scaleVec, const Matrix4 & mat )
+{
+ Vector4 scale4;
+ scale4 = Vector4( scaleVec, 1.0f );
+ return Matrix4(
+ mulPerElem( mat.getCol0(), scale4 ),
+ mulPerElem( mat.getCol1(), scale4 ),
+ mulPerElem( mat.getCol2(), scale4 ),
+ mulPerElem( mat.getCol3(), scale4 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::translation( const Vector3 &translateVec )
+{
+ return Matrix4(
+ Vector4::xAxis( ),
+ Vector4::yAxis( ),
+ Vector4::zAxis( ),
+ Vector4( translateVec, 1.0f )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::lookAt( const Point3 &eyePos, const Point3 &lookAtPos, const Vector3 &upVec )
+{
+ Matrix4 m4EyeFrame;
+ Vector3 v3X, v3Y, v3Z;
+ v3Y = normalize( upVec );
+ v3Z = normalize( ( eyePos - lookAtPos ) );
+ v3X = normalize( cross( v3Y, v3Z ) );
+ v3Y = cross( v3Z, v3X );
+ m4EyeFrame = Matrix4( Vector4( v3X ), Vector4( v3Y ), Vector4( v3Z ), Vector4( eyePos ) );
+ return orthoInverse( m4EyeFrame );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::perspective( float fovyRadians, float aspect, float zNear, float zFar )
+{
+ float f, rangeInv;
+ __m128 zero, col0, col1, col2, col3;
+ union { __m128 v; float s[4]; } tmp;
+ f = tanf( _VECTORMATH_PI_OVER_2 - fovyRadians * 0.5f );
+ rangeInv = 1.0f / ( zNear - zFar );
+ zero = _mm_setzero_ps();
+ tmp.v = zero;
+ tmp.s[0] = f / aspect;
+ col0 = tmp.v;
+ tmp.v = zero;
+ tmp.s[1] = f;
+ col1 = tmp.v;
+ tmp.v = zero;
+ tmp.s[2] = ( zNear + zFar ) * rangeInv;
+ tmp.s[3] = -1.0f;
+ col2 = tmp.v;
+ tmp.v = zero;
+ tmp.s[2] = zNear * zFar * rangeInv * 2.0f;
+ col3 = tmp.v;
+ return Matrix4(
+ Vector4( col0 ),
+ Vector4( col1 ),
+ Vector4( col2 ),
+ Vector4( col3 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::frustum( float left, float right, float bottom, float top, float zNear, float zFar )
+{
+ /* function implementation based on code from STIDC SDK: */
+ /* -------------------------------------------------------------- */
+ /* PLEASE DO NOT MODIFY THIS SECTION */
+ /* This prolog section is automatically generated. */
+ /* */
+ /* (C)Copyright */
+ /* Sony Computer Entertainment, Inc., */
+ /* Toshiba Corporation, */
+ /* International Business Machines Corporation, */
+ /* 2001,2002. */
+ /* S/T/I Confidential Information */
+ /* -------------------------------------------------------------- */
+ __m128 lbf, rtn;
+ __m128 diff, sum, inv_diff;
+ __m128 diagonal, column, near2;
+ __m128 zero = _mm_setzero_ps();
+ union { __m128 v; float s[4]; } l, f, r, n, b, t; // TODO: Union?
+ l.s[0] = left;
+ f.s[0] = zFar;
+ r.s[0] = right;
+ n.s[0] = zNear;
+ b.s[0] = bottom;
+ t.s[0] = top;
+ lbf = vec_mergeh( l.v, f.v );
+ rtn = vec_mergeh( r.v, n.v );
+ lbf = vec_mergeh( lbf, b.v );
+ rtn = vec_mergeh( rtn, t.v );
+ diff = vec_sub( rtn, lbf );
+ sum = vec_add( rtn, lbf );
+ inv_diff = recipf4( diff );
+ near2 = vec_splat( n.v, 0 );
+ near2 = vec_add( near2, near2 );
+ diagonal = vec_mul( near2, inv_diff );
+ column = vec_mul( sum, inv_diff );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_w[4] = {0, 0, 0, 0xffffffff};
+ return Matrix4(
+ Vector4( vec_sel( zero, diagonal, select_x ) ),
+ Vector4( vec_sel( zero, diagonal, select_y ) ),
+ Vector4( vec_sel( column, _mm_set1_ps(-1.0f), select_w ) ),
+ Vector4( vec_sel( zero, vec_mul( diagonal, vec_splat( f.v, 0 ) ), select_z ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 Matrix4::orthographic( float left, float right, float bottom, float top, float zNear, float zFar )
+{
+ /* function implementation based on code from STIDC SDK: */
+ /* -------------------------------------------------------------- */
+ /* PLEASE DO NOT MODIFY THIS SECTION */
+ /* This prolog section is automatically generated. */
+ /* */
+ /* (C)Copyright */
+ /* Sony Computer Entertainment, Inc., */
+ /* Toshiba Corporation, */
+ /* International Business Machines Corporation, */
+ /* 2001,2002. */
+ /* S/T/I Confidential Information */
+ /* -------------------------------------------------------------- */
+ __m128 lbf, rtn;
+ __m128 diff, sum, inv_diff, neg_inv_diff;
+ __m128 diagonal, column;
+ __m128 zero = _mm_setzero_ps();
+ union { __m128 v; float s[4]; } l, f, r, n, b, t;
+ l.s[0] = left;
+ f.s[0] = zFar;
+ r.s[0] = right;
+ n.s[0] = zNear;
+ b.s[0] = bottom;
+ t.s[0] = top;
+ lbf = vec_mergeh( l.v, f.v );
+ rtn = vec_mergeh( r.v, n.v );
+ lbf = vec_mergeh( lbf, b.v );
+ rtn = vec_mergeh( rtn, t.v );
+ diff = vec_sub( rtn, lbf );
+ sum = vec_add( rtn, lbf );
+ inv_diff = recipf4( diff );
+ neg_inv_diff = negatef4( inv_diff );
+ diagonal = vec_add( inv_diff, inv_diff );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_w[4] = {0, 0, 0, 0xffffffff};
+ column = vec_mul( sum, vec_sel( neg_inv_diff, inv_diff, select_z ) ); // TODO: no madds with zero
+ return Matrix4(
+ Vector4( vec_sel( zero, diagonal, select_x ) ),
+ Vector4( vec_sel( zero, diagonal, select_y ) ),
+ Vector4( vec_sel( zero, diagonal, select_z ) ),
+ Vector4( vec_sel( column, _mm_set1_ps(1.0f), select_w ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, bool select1 )
+{
+ return Matrix4(
+ select( mat0.getCol0(), mat1.getCol0(), select1 ),
+ select( mat0.getCol1(), mat1.getCol1(), select1 ),
+ select( mat0.getCol2(), mat1.getCol2(), select1 ),
+ select( mat0.getCol3(), mat1.getCol3(), select1 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, const boolInVec &select1 )
+{
+ return Matrix4(
+ select( mat0.getCol0(), mat1.getCol0(), select1 ),
+ select( mat0.getCol1(), mat1.getCol1(), select1 ),
+ select( mat0.getCol2(), mat1.getCol2(), select1 ),
+ select( mat0.getCol3(), mat1.getCol3(), select1 )
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+VECTORMATH_FORCE_INLINE void print( const Matrix4 & mat )
+{
+ print( mat.getRow( 0 ) );
+ print( mat.getRow( 1 ) );
+ print( mat.getRow( 2 ) );
+ print( mat.getRow( 3 ) );
+}
+
+VECTORMATH_FORCE_INLINE void print( const Matrix4 & mat, const char * name )
+{
+ printf("%s:\n", name);
+ print( mat );
+}
+
+#endif
+
+VECTORMATH_FORCE_INLINE Transform3::Transform3( const Transform3 & tfrm )
+{
+ mCol0 = tfrm.mCol0;
+ mCol1 = tfrm.mCol1;
+ mCol2 = tfrm.mCol2;
+ mCol3 = tfrm.mCol3;
+}
+
+VECTORMATH_FORCE_INLINE Transform3::Transform3( float scalar )
+{
+ mCol0 = Vector3( scalar );
+ mCol1 = Vector3( scalar );
+ mCol2 = Vector3( scalar );
+ mCol3 = Vector3( scalar );
+}
+
+VECTORMATH_FORCE_INLINE Transform3::Transform3( const floatInVec &scalar )
+{
+ mCol0 = Vector3( scalar );
+ mCol1 = Vector3( scalar );
+ mCol2 = Vector3( scalar );
+ mCol3 = Vector3( scalar );
+}
+
+VECTORMATH_FORCE_INLINE Transform3::Transform3( const Vector3 &_col0, const Vector3 &_col1, const Vector3 &_col2, const Vector3 &_col3 )
+{
+ mCol0 = _col0;
+ mCol1 = _col1;
+ mCol2 = _col2;
+ mCol3 = _col3;
+}
+
+VECTORMATH_FORCE_INLINE Transform3::Transform3( const Matrix3 & tfrm, const Vector3 &translateVec )
+{
+ this->setUpper3x3( tfrm );
+ this->setTranslation( translateVec );
+}
+
+VECTORMATH_FORCE_INLINE Transform3::Transform3( const Quat &unitQuat, const Vector3 &translateVec )
+{
+ this->setUpper3x3( Matrix3( unitQuat ) );
+ this->setTranslation( translateVec );
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setCol0( const Vector3 &_col0 )
+{
+ mCol0 = _col0;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setCol1( const Vector3 &_col1 )
+{
+ mCol1 = _col1;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setCol2( const Vector3 &_col2 )
+{
+ mCol2 = _col2;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setCol3( const Vector3 &_col3 )
+{
+ mCol3 = _col3;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setCol( int col, const Vector3 &vec )
+{
+ *(&mCol0 + col) = vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setRow( int row, const Vector4 &vec )
+{
+ mCol0.setElem( row, vec.getElem( 0 ) );
+ mCol1.setElem( row, vec.getElem( 1 ) );
+ mCol2.setElem( row, vec.getElem( 2 ) );
+ mCol3.setElem( row, vec.getElem( 3 ) );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setElem( int col, int row, float val )
+{
+ (*this)[col].setElem(row, val);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setElem( int col, int row, const floatInVec &val )
+{
+ Vector3 tmpV3_0;
+ tmpV3_0 = this->getCol( col );
+ tmpV3_0.setElem( row, val );
+ this->setCol( col, tmpV3_0 );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Transform3::getElem( int col, int row ) const
+{
+ return this->getCol( col ).getElem( row );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::getCol0( ) const
+{
+ return mCol0;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::getCol1( ) const
+{
+ return mCol1;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::getCol2( ) const
+{
+ return mCol2;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::getCol3( ) const
+{
+ return mCol3;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::getCol( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Transform3::getRow( int row ) const
+{
+ return Vector4( mCol0.getElem( row ), mCol1.getElem( row ), mCol2.getElem( row ), mCol3.getElem( row ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Transform3::operator []( int col )
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::operator []( int col ) const
+{
+ return *(&mCol0 + col);
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::operator =( const Transform3 & tfrm )
+{
+ mCol0 = tfrm.mCol0;
+ mCol1 = tfrm.mCol1;
+ mCol2 = tfrm.mCol2;
+ mCol3 = tfrm.mCol3;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 inverse( const Transform3 & tfrm )
+{
+ __m128 inv0, inv1, inv2, inv3;
+ __m128 tmp0, tmp1, tmp2, tmp3, tmp4, dot, invdet;
+ __m128 xxxx, yyyy, zzzz;
+ tmp2 = _vmathVfCross( tfrm.getCol0().get128(), tfrm.getCol1().get128() );
+ tmp0 = _vmathVfCross( tfrm.getCol1().get128(), tfrm.getCol2().get128() );
+ tmp1 = _vmathVfCross( tfrm.getCol2().get128(), tfrm.getCol0().get128() );
+ inv3 = negatef4( tfrm.getCol3().get128() );
+ dot = _vmathVfDot3( tmp2, tfrm.getCol2().get128() );
+ dot = vec_splat( dot, 0 );
+ invdet = recipf4( dot );
+ tmp3 = vec_mergeh( tmp0, tmp2 );
+ tmp4 = vec_mergel( tmp0, tmp2 );
+ inv0 = vec_mergeh( tmp3, tmp1 );
+ xxxx = vec_splat( inv3, 0 );
+ //inv1 = vec_perm( tmp3, tmp1, _VECTORMATH_PERM_ZBWX );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ inv1 = _mm_shuffle_ps( tmp3, tmp3, _MM_SHUFFLE(0,3,2,2));
+ inv1 = vec_sel(inv1, tmp1, select_y);
+ //inv2 = vec_perm( tmp4, tmp1, _VECTORMATH_PERM_XCYX );
+ inv2 = _mm_shuffle_ps( tmp4, tmp4, _MM_SHUFFLE(0,1,1,0));
+ inv2 = vec_sel(inv2, vec_splat(tmp1, 2), select_y);
+ yyyy = vec_splat( inv3, 1 );
+ zzzz = vec_splat( inv3, 2 );
+ inv3 = vec_mul( inv0, xxxx );
+ inv3 = vec_madd( inv1, yyyy, inv3 );
+ inv3 = vec_madd( inv2, zzzz, inv3 );
+ inv0 = vec_mul( inv0, invdet );
+ inv1 = vec_mul( inv1, invdet );
+ inv2 = vec_mul( inv2, invdet );
+ inv3 = vec_mul( inv3, invdet );
+ return Transform3(
+ Vector3( inv0 ),
+ Vector3( inv1 ),
+ Vector3( inv2 ),
+ Vector3( inv3 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 orthoInverse( const Transform3 & tfrm )
+{
+ __m128 inv0, inv1, inv2, inv3;
+ __m128 tmp0, tmp1;
+ __m128 xxxx, yyyy, zzzz;
+ tmp0 = vec_mergeh( tfrm.getCol0().get128(), tfrm.getCol2().get128() );
+ tmp1 = vec_mergel( tfrm.getCol0().get128(), tfrm.getCol2().get128() );
+ inv3 = negatef4( tfrm.getCol3().get128() );
+ inv0 = vec_mergeh( tmp0, tfrm.getCol1().get128() );
+ xxxx = vec_splat( inv3, 0 );
+ //inv1 = vec_perm( tmp0, tfrm.getCol1().get128(), _VECTORMATH_PERM_ZBWX );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ inv1 = _mm_shuffle_ps( tmp0, tmp0, _MM_SHUFFLE(0,3,2,2));
+ inv1 = vec_sel(inv1, tfrm.getCol1().get128(), select_y);
+ //inv2 = vec_perm( tmp1, tfrm.getCol1().get128(), _VECTORMATH_PERM_XCYX );
+ inv2 = _mm_shuffle_ps( tmp1, tmp1, _MM_SHUFFLE(0,1,1,0));
+ inv2 = vec_sel(inv2, vec_splat(tfrm.getCol1().get128(), 2), select_y);
+ yyyy = vec_splat( inv3, 1 );
+ zzzz = vec_splat( inv3, 2 );
+ inv3 = vec_mul( inv0, xxxx );
+ inv3 = vec_madd( inv1, yyyy, inv3 );
+ inv3 = vec_madd( inv2, zzzz, inv3 );
+ return Transform3(
+ Vector3( inv0 ),
+ Vector3( inv1 ),
+ Vector3( inv2 ),
+ Vector3( inv3 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 absPerElem( const Transform3 & tfrm )
+{
+ return Transform3(
+ absPerElem( tfrm.getCol0() ),
+ absPerElem( tfrm.getCol1() ),
+ absPerElem( tfrm.getCol2() ),
+ absPerElem( tfrm.getCol3() )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::operator *( const Vector3 &vec ) const
+{
+ __m128 res;
+ __m128 xxxx, yyyy, zzzz;
+ xxxx = vec_splat( vec.get128(), 0 );
+ yyyy = vec_splat( vec.get128(), 1 );
+ zzzz = vec_splat( vec.get128(), 2 );
+ res = vec_mul( mCol0.get128(), xxxx );
+ res = vec_madd( mCol1.get128(), yyyy, res );
+ res = vec_madd( mCol2.get128(), zzzz, res );
+ return Vector3( res );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 Transform3::operator *( const Point3 &pnt ) const
+{
+ __m128 tmp0, tmp1, res;
+ __m128 xxxx, yyyy, zzzz;
+ xxxx = vec_splat( pnt.get128(), 0 );
+ yyyy = vec_splat( pnt.get128(), 1 );
+ zzzz = vec_splat( pnt.get128(), 2 );
+ tmp0 = vec_mul( mCol0.get128(), xxxx );
+ tmp1 = vec_mul( mCol1.get128(), yyyy );
+ tmp0 = vec_madd( mCol2.get128(), zzzz, tmp0 );
+ tmp1 = vec_add( mCol3.get128(), tmp1 );
+ res = vec_add( tmp0, tmp1 );
+ return Point3( res );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::operator *( const Transform3 & tfrm ) const
+{
+ return Transform3(
+ ( *this * tfrm.mCol0 ),
+ ( *this * tfrm.mCol1 ),
+ ( *this * tfrm.mCol2 ),
+ Vector3( ( *this * Point3( tfrm.mCol3 ) ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::operator *=( const Transform3 & tfrm )
+{
+ *this = *this * tfrm;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 mulPerElem( const Transform3 & tfrm0, const Transform3 & tfrm1 )
+{
+ return Transform3(
+ mulPerElem( tfrm0.getCol0(), tfrm1.getCol0() ),
+ mulPerElem( tfrm0.getCol1(), tfrm1.getCol1() ),
+ mulPerElem( tfrm0.getCol2(), tfrm1.getCol2() ),
+ mulPerElem( tfrm0.getCol3(), tfrm1.getCol3() )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::identity( )
+{
+ return Transform3(
+ Vector3::xAxis( ),
+ Vector3::yAxis( ),
+ Vector3::zAxis( ),
+ Vector3( 0.0f )
+ );
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setUpper3x3( const Matrix3 & tfrm )
+{
+ mCol0 = tfrm.getCol0();
+ mCol1 = tfrm.getCol1();
+ mCol2 = tfrm.getCol2();
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 Transform3::getUpper3x3( ) const
+{
+ return Matrix3( mCol0, mCol1, mCol2 );
+}
+
+VECTORMATH_FORCE_INLINE Transform3 & Transform3::setTranslation( const Vector3 &translateVec )
+{
+ mCol3 = translateVec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Transform3::getTranslation( ) const
+{
+ return mCol3;
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotationX( float radians )
+{
+ return rotationX( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotationX( const floatInVec &radians )
+{
+ __m128 s, c, res1, res2;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res1 = vec_sel( zero, c, select_y );
+ res1 = vec_sel( res1, s, select_z );
+ res2 = vec_sel( zero, negatef4(s), select_y );
+ res2 = vec_sel( res2, c, select_z );
+ return Transform3(
+ Vector3::xAxis( ),
+ Vector3( res1 ),
+ Vector3( res2 ),
+ Vector3( _mm_setzero_ps() )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotationY( float radians )
+{
+ return rotationY( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotationY( const floatInVec &radians )
+{
+ __m128 s, c, res0, res2;
+ __m128 zero;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res0 = vec_sel( zero, c, select_x );
+ res0 = vec_sel( res0, negatef4(s), select_z );
+ res2 = vec_sel( zero, s, select_x );
+ res2 = vec_sel( res2, c, select_z );
+ return Transform3(
+ Vector3( res0 ),
+ Vector3::yAxis( ),
+ Vector3( res2 ),
+ Vector3( 0.0f )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotationZ( float radians )
+{
+ return rotationZ( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotationZ( const floatInVec &radians )
+{
+ __m128 s, c, res0, res1;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ __m128 zero = _mm_setzero_ps();
+ sincosf4( radians.get128(), &s, &c );
+ res0 = vec_sel( zero, c, select_x );
+ res0 = vec_sel( res0, s, select_y );
+ res1 = vec_sel( zero, negatef4(s), select_x );
+ res1 = vec_sel( res1, c, select_y );
+ return Transform3(
+ Vector3( res0 ),
+ Vector3( res1 ),
+ Vector3::zAxis( ),
+ Vector3( 0.0f )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotationZYX( const Vector3 &radiansXYZ )
+{
+ __m128 angles, s, negS, c, X0, X1, Y0, Y1, Z0, Z1, tmp;
+ angles = Vector4( radiansXYZ, 0.0f ).get128();
+ sincosf4( angles, &s, &c );
+ negS = negatef4( s );
+ Z0 = vec_mergel( c, s );
+ Z1 = vec_mergel( negS, c );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_xyz[4] = {0xffffffff, 0xffffffff, 0xffffffff, 0};
+ Z1 = vec_and( Z1, _mm_load_ps( (float *)select_xyz ) );
+ Y0 = _mm_shuffle_ps( c, negS, _MM_SHUFFLE(0,1,1,1) );
+ Y1 = _mm_shuffle_ps( s, c, _MM_SHUFFLE(0,1,1,1) );
+ X0 = vec_splat( s, 0 );
+ X1 = vec_splat( c, 0 );
+ tmp = vec_mul( Z0, Y1 );
+ return Transform3(
+ Vector3( vec_mul( Z0, Y0 ) ),
+ Vector3( vec_madd( Z1, X1, vec_mul( tmp, X0 ) ) ),
+ Vector3( vec_nmsub( Z1, X0, vec_mul( tmp, X1 ) ) ),
+ Vector3( 0.0f )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotation( float radians, const Vector3 &unitVec )
+{
+ return rotation( floatInVec(radians), unitVec );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotation( const floatInVec &radians, const Vector3 &unitVec )
+{
+ return Transform3( Matrix3::rotation( radians, unitVec ), Vector3( 0.0f ) );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::rotation( const Quat &unitQuat )
+{
+ return Transform3( Matrix3( unitQuat ), Vector3( 0.0f ) );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::scale( const Vector3 &scaleVec )
+{
+ __m128 zero = _mm_setzero_ps();
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ return Transform3(
+ Vector3( vec_sel( zero, scaleVec.get128(), select_x ) ),
+ Vector3( vec_sel( zero, scaleVec.get128(), select_y ) ),
+ Vector3( vec_sel( zero, scaleVec.get128(), select_z ) ),
+ Vector3( 0.0f )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 appendScale( const Transform3 & tfrm, const Vector3 &scaleVec )
+{
+ return Transform3(
+ ( tfrm.getCol0() * scaleVec.getX( ) ),
+ ( tfrm.getCol1() * scaleVec.getY( ) ),
+ ( tfrm.getCol2() * scaleVec.getZ( ) ),
+ tfrm.getCol3()
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 prependScale( const Vector3 &scaleVec, const Transform3 & tfrm )
+{
+ return Transform3(
+ mulPerElem( tfrm.getCol0(), scaleVec ),
+ mulPerElem( tfrm.getCol1(), scaleVec ),
+ mulPerElem( tfrm.getCol2(), scaleVec ),
+ mulPerElem( tfrm.getCol3(), scaleVec )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 Transform3::translation( const Vector3 &translateVec )
+{
+ return Transform3(
+ Vector3::xAxis( ),
+ Vector3::yAxis( ),
+ Vector3::zAxis( ),
+ translateVec
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, bool select1 )
+{
+ return Transform3(
+ select( tfrm0.getCol0(), tfrm1.getCol0(), select1 ),
+ select( tfrm0.getCol1(), tfrm1.getCol1(), select1 ),
+ select( tfrm0.getCol2(), tfrm1.getCol2(), select1 ),
+ select( tfrm0.getCol3(), tfrm1.getCol3(), select1 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, const boolInVec &select1 )
+{
+ return Transform3(
+ select( tfrm0.getCol0(), tfrm1.getCol0(), select1 ),
+ select( tfrm0.getCol1(), tfrm1.getCol1(), select1 ),
+ select( tfrm0.getCol2(), tfrm1.getCol2(), select1 ),
+ select( tfrm0.getCol3(), tfrm1.getCol3(), select1 )
+ );
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+VECTORMATH_FORCE_INLINE void print( const Transform3 & tfrm )
+{
+ print( tfrm.getRow( 0 ) );
+ print( tfrm.getRow( 1 ) );
+ print( tfrm.getRow( 2 ) );
+}
+
+VECTORMATH_FORCE_INLINE void print( const Transform3 & tfrm, const char * name )
+{
+ printf("%s:\n", name);
+ print( tfrm );
+}
+
+#endif
+
+VECTORMATH_FORCE_INLINE Quat::Quat( const Matrix3 & tfrm )
+{
+ __m128 res;
+ __m128 col0, col1, col2;
+ __m128 xx_yy, xx_yy_zz_xx, yy_zz_xx_yy, zz_xx_yy_zz, diagSum, diagDiff;
+ __m128 zy_xz_yx, yz_zx_xy, sum, diff;
+ __m128 radicand, invSqrt, scale;
+ __m128 res0, res1, res2, res3;
+ __m128 xx, yy, zz;
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_w[4] = {0, 0, 0, 0xffffffff};
+
+ col0 = tfrm.getCol0().get128();
+ col1 = tfrm.getCol1().get128();
+ col2 = tfrm.getCol2().get128();
+
+ /* four cases: */
+ /* trace > 0 */
+ /* else */
+ /* xx largest diagonal element */
+ /* yy largest diagonal element */
+ /* zz largest diagonal element */
+
+ /* compute quaternion for each case */
+
+ xx_yy = vec_sel( col0, col1, select_y );
+ //xx_yy_zz_xx = vec_perm( xx_yy, col2, _VECTORMATH_PERM_XYCX );
+ //yy_zz_xx_yy = vec_perm( xx_yy, col2, _VECTORMATH_PERM_YCXY );
+ //zz_xx_yy_zz = vec_perm( xx_yy, col2, _VECTORMATH_PERM_CXYC );
+ xx_yy_zz_xx = _mm_shuffle_ps( xx_yy, xx_yy, _MM_SHUFFLE(0,0,1,0) );
+ xx_yy_zz_xx = vec_sel( xx_yy_zz_xx, col2, select_z ); // TODO: Ck
+ yy_zz_xx_yy = _mm_shuffle_ps( xx_yy_zz_xx, xx_yy_zz_xx, _MM_SHUFFLE(1,0,2,1) );
+ zz_xx_yy_zz = _mm_shuffle_ps( xx_yy_zz_xx, xx_yy_zz_xx, _MM_SHUFFLE(2,1,0,2) );
+
+ diagSum = vec_add( vec_add( xx_yy_zz_xx, yy_zz_xx_yy ), zz_xx_yy_zz );
+ diagDiff = vec_sub( vec_sub( xx_yy_zz_xx, yy_zz_xx_yy ), zz_xx_yy_zz );
+ radicand = vec_add( vec_sel( diagDiff, diagSum, select_w ), _mm_set1_ps(1.0f) );
+ // invSqrt = rsqrtf4( radicand );
+ invSqrt = newtonrapson_rsqrt4( radicand );
+
+
+
+ zy_xz_yx = vec_sel( col0, col1, select_z ); // zy_xz_yx = 00 01 12 03
+ //zy_xz_yx = vec_perm( zy_xz_yx, col2, _VECTORMATH_PERM_ZAYX );
+ zy_xz_yx = _mm_shuffle_ps( zy_xz_yx, zy_xz_yx, _MM_SHUFFLE(0,1,2,2) ); // zy_xz_yx = 12 12 01 00
+ zy_xz_yx = vec_sel( zy_xz_yx, vec_splat(col2, 0), select_y ); // zy_xz_yx = 12 20 01 00
+ yz_zx_xy = vec_sel( col0, col1, select_x ); // yz_zx_xy = 10 01 02 03
+ //yz_zx_xy = vec_perm( yz_zx_xy, col2, _VECTORMATH_PERM_BZXX );
+ yz_zx_xy = _mm_shuffle_ps( yz_zx_xy, yz_zx_xy, _MM_SHUFFLE(0,0,2,0) ); // yz_zx_xy = 10 02 10 10
+ yz_zx_xy = vec_sel( yz_zx_xy, vec_splat(col2, 1), select_x ); // yz_zx_xy = 21 02 10 10
+
+ sum = vec_add( zy_xz_yx, yz_zx_xy );
+ diff = vec_sub( zy_xz_yx, yz_zx_xy );
+
+ scale = vec_mul( invSqrt, _mm_set1_ps(0.5f) );
+
+ //res0 = vec_perm( sum, diff, _VECTORMATH_PERM_XZYA );
+ res0 = _mm_shuffle_ps( sum, sum, _MM_SHUFFLE(0,1,2,0) );
+ res0 = vec_sel( res0, vec_splat(diff, 0), select_w ); // TODO: Ck
+ //res1 = vec_perm( sum, diff, _VECTORMATH_PERM_ZXXB );
+ res1 = _mm_shuffle_ps( sum, sum, _MM_SHUFFLE(0,0,0,2) );
+ res1 = vec_sel( res1, vec_splat(diff, 1), select_w ); // TODO: Ck
+ //res2 = vec_perm( sum, diff, _VECTORMATH_PERM_YXXC );
+ res2 = _mm_shuffle_ps( sum, sum, _MM_SHUFFLE(0,0,0,1) );
+ res2 = vec_sel( res2, vec_splat(diff, 2), select_w ); // TODO: Ck
+ res3 = diff;
+ res0 = vec_sel( res0, radicand, select_x );
+ res1 = vec_sel( res1, radicand, select_y );
+ res2 = vec_sel( res2, radicand, select_z );
+ res3 = vec_sel( res3, radicand, select_w );
+ res0 = vec_mul( res0, vec_splat( scale, 0 ) );
+ res1 = vec_mul( res1, vec_splat( scale, 1 ) );
+ res2 = vec_mul( res2, vec_splat( scale, 2 ) );
+ res3 = vec_mul( res3, vec_splat( scale, 3 ) );
+
+ /* determine case and select answer */
+
+ xx = vec_splat( col0, 0 );
+ yy = vec_splat( col1, 1 );
+ zz = vec_splat( col2, 2 );
+ res = vec_sel( res0, res1, vec_cmpgt( yy, xx ) );
+ res = vec_sel( res, res2, vec_and( vec_cmpgt( zz, xx ), vec_cmpgt( zz, yy ) ) );
+ res = vec_sel( res, res3, vec_cmpgt( vec_splat( diagSum, 0 ), _mm_setzero_ps() ) );
+ mVec128 = res;
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 outer( const Vector3 &tfrm0, const Vector3 &tfrm1 )
+{
+ return Matrix3(
+ ( tfrm0 * tfrm1.getX( ) ),
+ ( tfrm0 * tfrm1.getY( ) ),
+ ( tfrm0 * tfrm1.getZ( ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix4 outer( const Vector4 &tfrm0, const Vector4 &tfrm1 )
+{
+ return Matrix4(
+ ( tfrm0 * tfrm1.getX( ) ),
+ ( tfrm0 * tfrm1.getY( ) ),
+ ( tfrm0 * tfrm1.getZ( ) ),
+ ( tfrm0 * tfrm1.getW( ) )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 rowMul( const Vector3 &vec, const Matrix3 & mat )
+{
+ __m128 tmp0, tmp1, mcol0, mcol1, mcol2, res;
+ __m128 xxxx, yyyy, zzzz;
+ tmp0 = vec_mergeh( mat.getCol0().get128(), mat.getCol2().get128() );
+ tmp1 = vec_mergel( mat.getCol0().get128(), mat.getCol2().get128() );
+ xxxx = vec_splat( vec.get128(), 0 );
+ mcol0 = vec_mergeh( tmp0, mat.getCol1().get128() );
+ //mcol1 = vec_perm( tmp0, mat.getCol1().get128(), _VECTORMATH_PERM_ZBWX );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ mcol1 = _mm_shuffle_ps( tmp0, tmp0, _MM_SHUFFLE(0,3,2,2));
+ mcol1 = vec_sel(mcol1, mat.getCol1().get128(), select_y);
+ //mcol2 = vec_perm( tmp1, mat.getCol1().get128(), _VECTORMATH_PERM_XCYX );
+ mcol2 = _mm_shuffle_ps( tmp1, tmp1, _MM_SHUFFLE(0,1,1,0));
+ mcol2 = vec_sel(mcol2, vec_splat(mat.getCol1().get128(), 2), select_y);
+ yyyy = vec_splat( vec.get128(), 1 );
+ res = vec_mul( mcol0, xxxx );
+ zzzz = vec_splat( vec.get128(), 2 );
+ res = vec_madd( mcol1, yyyy, res );
+ res = vec_madd( mcol2, zzzz, res );
+ return Vector3( res );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 crossMatrix( const Vector3 &vec )
+{
+ __m128 neg, res0, res1, res2;
+ neg = negatef4( vec.get128() );
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_x[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_y[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int select_z[4] = {0, 0, 0xffffffff, 0};
+ //res0 = vec_perm( vec.get128(), neg, _VECTORMATH_PERM_XZBX );
+ res0 = _mm_shuffle_ps( vec.get128(), vec.get128(), _MM_SHUFFLE(0,2,2,0) );
+ res0 = vec_sel(res0, vec_splat(neg, 1), select_z);
+ //res1 = vec_perm( vec.get128(), neg, _VECTORMATH_PERM_CXXX );
+ res1 = vec_sel(vec_splat(vec.get128(), 0), vec_splat(neg, 2), select_x);
+ //res2 = vec_perm( vec.get128(), neg, _VECTORMATH_PERM_YAXX );
+ res2 = _mm_shuffle_ps( vec.get128(), vec.get128(), _MM_SHUFFLE(0,0,1,1) );
+ res2 = vec_sel(res2, vec_splat(neg, 0), select_y);
+ VM_ATTRIBUTE_ALIGN16 unsigned int filter_x[4] = {0, 0xffffffff, 0xffffffff, 0xffffffff};
+ VM_ATTRIBUTE_ALIGN16 unsigned int filter_y[4] = {0xffffffff, 0, 0xffffffff, 0xffffffff};
+ VM_ATTRIBUTE_ALIGN16 unsigned int filter_z[4] = {0xffffffff, 0xffffffff, 0, 0xffffffff};
+ res0 = vec_and( res0, _mm_load_ps((float *)filter_x ) );
+ res1 = vec_and( res1, _mm_load_ps((float *)filter_y ) );
+ res2 = vec_and( res2, _mm_load_ps((float *)filter_z ) ); // TODO: Use selects?
+ return Matrix3(
+ Vector3( res0 ),
+ Vector3( res1 ),
+ Vector3( res2 )
+ );
+}
+
+VECTORMATH_FORCE_INLINE const Matrix3 crossMatrixMul( const Vector3 &vec, const Matrix3 & mat )
+{
+ return Matrix3( cross( vec, mat.getCol0() ), cross( vec, mat.getCol1() ), cross( vec, mat.getCol2() ) );
+}
+
+} // namespace Aos
+} // namespace Vectormath
+
+#endif
diff --git a/tests/bullet/src/vectormath/sse/quat_aos.h b/tests/bullet/src/vectormath/sse/quat_aos.h
new file mode 100644
index 00000000..d7091ecf
--- /dev/null
+++ b/tests/bullet/src/vectormath/sse/quat_aos.h
@@ -0,0 +1,579 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#ifndef _VECTORMATH_QUAT_AOS_CPP_H
+#define _VECTORMATH_QUAT_AOS_CPP_H
+
+//-----------------------------------------------------------------------------
+// Definitions
+
+#ifndef _VECTORMATH_INTERNAL_FUNCTIONS
+#define _VECTORMATH_INTERNAL_FUNCTIONS
+
+#endif
+
+namespace Vectormath {
+namespace Aos {
+
+VECTORMATH_FORCE_INLINE void Quat::set128(vec_float4 vec)
+{
+ mVec128 = vec;
+}
+
+VECTORMATH_FORCE_INLINE Quat::Quat( const floatInVec &_x, const floatInVec &_y, const floatInVec &_z, const floatInVec &_w )
+{
+ mVec128 = _mm_unpacklo_ps(
+ _mm_unpacklo_ps( _x.get128(), _z.get128() ),
+ _mm_unpacklo_ps( _y.get128(), _w.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Quat::Quat( const Vector3 &xyz, float _w )
+{
+ mVec128 = xyz.get128();
+ _vmathVfSetElement(mVec128, _w, 3);
+}
+
+
+
+VECTORMATH_FORCE_INLINE Quat::Quat(const Quat& quat)
+{
+ mVec128 = quat.get128();
+}
+
+VECTORMATH_FORCE_INLINE Quat::Quat( float _x, float _y, float _z, float _w )
+{
+ mVec128 = _mm_setr_ps(_x, _y, _z, _w);
+}
+
+
+
+
+
+VECTORMATH_FORCE_INLINE Quat::Quat( const Vector3 &xyz, const floatInVec &_w )
+{
+ mVec128 = xyz.get128();
+ mVec128 = _vmathVfInsert(mVec128, _w.get128(), 3);
+}
+
+VECTORMATH_FORCE_INLINE Quat::Quat( const Vector4 &vec )
+{
+ mVec128 = vec.get128();
+}
+
+VECTORMATH_FORCE_INLINE Quat::Quat( float scalar )
+{
+ mVec128 = floatInVec(scalar).get128();
+}
+
+VECTORMATH_FORCE_INLINE Quat::Quat( const floatInVec &scalar )
+{
+ mVec128 = scalar.get128();
+}
+
+VECTORMATH_FORCE_INLINE Quat::Quat( __m128 vf4 )
+{
+ mVec128 = vf4;
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::identity( )
+{
+ return Quat( _VECTORMATH_UNIT_0001 );
+}
+
+VECTORMATH_FORCE_INLINE const Quat lerp( float t, const Quat &quat0, const Quat &quat1 )
+{
+ return lerp( floatInVec(t), quat0, quat1 );
+}
+
+VECTORMATH_FORCE_INLINE const Quat lerp( const floatInVec &t, const Quat &quat0, const Quat &quat1 )
+{
+ return ( quat0 + ( ( quat1 - quat0 ) * t ) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat slerp( float t, const Quat &unitQuat0, const Quat &unitQuat1 )
+{
+ return slerp( floatInVec(t), unitQuat0, unitQuat1 );
+}
+
+VECTORMATH_FORCE_INLINE const Quat slerp( const floatInVec &t, const Quat &unitQuat0, const Quat &unitQuat1 )
+{
+ Quat start;
+ vec_float4 scales, scale0, scale1, cosAngle, angle, tttt, oneMinusT, angles, sines;
+ __m128 selectMask;
+ cosAngle = _vmathVfDot4( unitQuat0.get128(), unitQuat1.get128() );
+ selectMask = (__m128)vec_cmpgt( _mm_setzero_ps(), cosAngle );
+ cosAngle = vec_sel( cosAngle, negatef4( cosAngle ), selectMask );
+ start = Quat( vec_sel( unitQuat0.get128(), negatef4( unitQuat0.get128() ), selectMask ) );
+ selectMask = (__m128)vec_cmpgt( _mm_set1_ps(_VECTORMATH_SLERP_TOL), cosAngle );
+ angle = acosf4( cosAngle );
+ tttt = t.get128();
+ oneMinusT = vec_sub( _mm_set1_ps(1.0f), tttt );
+ angles = vec_mergeh( _mm_set1_ps(1.0f), tttt );
+ angles = vec_mergeh( angles, oneMinusT );
+ angles = vec_madd( angles, angle, _mm_setzero_ps() );
+ sines = sinf4( angles );
+ scales = _mm_div_ps( sines, vec_splat( sines, 0 ) );
+ scale0 = vec_sel( oneMinusT, vec_splat( scales, 1 ), selectMask );
+ scale1 = vec_sel( tttt, vec_splat( scales, 2 ), selectMask );
+ return Quat( vec_madd( start.get128(), scale0, vec_mul( unitQuat1.get128(), scale1 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat squad( float t, const Quat &unitQuat0, const Quat &unitQuat1, const Quat &unitQuat2, const Quat &unitQuat3 )
+{
+ return squad( floatInVec(t), unitQuat0, unitQuat1, unitQuat2, unitQuat3 );
+}
+
+VECTORMATH_FORCE_INLINE const Quat squad( const floatInVec &t, const Quat &unitQuat0, const Quat &unitQuat1, const Quat &unitQuat2, const Quat &unitQuat3 )
+{
+ return slerp( ( ( floatInVec(2.0f) * t ) * ( floatInVec(1.0f) - t ) ), slerp( t, unitQuat0, unitQuat3 ), slerp( t, unitQuat1, unitQuat2 ) );
+}
+
+VECTORMATH_FORCE_INLINE __m128 Quat::get128( ) const
+{
+ return mVec128;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator =( const Quat &quat )
+{
+ mVec128 = quat.mVec128;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setXYZ( const Vector3 &vec )
+{
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0, 0, 0, 0xffffffff};
+ mVec128 = vec_sel( vec.get128(), mVec128, sw );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Quat::getXYZ( ) const
+{
+ return Vector3( mVec128 );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setX( float _x )
+{
+ _vmathVfSetElement(mVec128, _x, 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setX( const floatInVec &_x )
+{
+ mVec128 = _vmathVfInsert(mVec128, _x.get128(), 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Quat::getX( ) const
+{
+ return floatInVec( mVec128, 0 );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setY( float _y )
+{
+ _vmathVfSetElement(mVec128, _y, 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setY( const floatInVec &_y )
+{
+ mVec128 = _vmathVfInsert(mVec128, _y.get128(), 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Quat::getY( ) const
+{
+ return floatInVec( mVec128, 1 );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setZ( float _z )
+{
+ _vmathVfSetElement(mVec128, _z, 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setZ( const floatInVec &_z )
+{
+ mVec128 = _vmathVfInsert(mVec128, _z.get128(), 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Quat::getZ( ) const
+{
+ return floatInVec( mVec128, 2 );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setW( float _w )
+{
+ _vmathVfSetElement(mVec128, _w, 3);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setW( const floatInVec &_w )
+{
+ mVec128 = _vmathVfInsert(mVec128, _w.get128(), 3);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Quat::getW( ) const
+{
+ return floatInVec( mVec128, 3 );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setElem( int idx, float value )
+{
+ _vmathVfSetElement(mVec128, value, idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::setElem( int idx, const floatInVec &value )
+{
+ mVec128 = _vmathVfInsert(mVec128, value.get128(), idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Quat::getElem( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE VecIdx Quat::operator []( int idx )
+{
+ return VecIdx( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Quat::operator []( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator +( const Quat &quat ) const
+{
+ return Quat( _mm_add_ps( mVec128, quat.mVec128 ) );
+}
+
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator -( const Quat &quat ) const
+{
+ return Quat( _mm_sub_ps( mVec128, quat.mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator *( float scalar ) const
+{
+ return *this * floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator *( const floatInVec &scalar ) const
+{
+ return Quat( _mm_mul_ps( mVec128, scalar.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator +=( const Quat &quat )
+{
+ *this = *this + quat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator -=( const Quat &quat )
+{
+ *this = *this - quat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator *=( const floatInVec &scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator /( float scalar ) const
+{
+ return *this / floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator /( const floatInVec &scalar ) const
+{
+ return Quat( _mm_div_ps( mVec128, scalar.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator /=( float scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator /=( const floatInVec &scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator -( ) const
+{
+ return Quat(_mm_sub_ps( _mm_setzero_ps(), mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat operator *( float scalar, const Quat &quat )
+{
+ return floatInVec(scalar) * quat;
+}
+
+VECTORMATH_FORCE_INLINE const Quat operator *( const floatInVec &scalar, const Quat &quat )
+{
+ return quat * scalar;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec dot( const Quat &quat0, const Quat &quat1 )
+{
+ return floatInVec( _vmathVfDot4( quat0.get128(), quat1.get128() ), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec norm( const Quat &quat )
+{
+ return floatInVec( _vmathVfDot4( quat.get128(), quat.get128() ), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec length( const Quat &quat )
+{
+ return floatInVec( _mm_sqrt_ps(_vmathVfDot4( quat.get128(), quat.get128() )), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const Quat normalize( const Quat &quat )
+{
+ vec_float4 dot =_vmathVfDot4( quat.get128(), quat.get128());
+ return Quat( _mm_mul_ps( quat.get128(), newtonrapson_rsqrt4( dot ) ) );
+}
+
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotation( const Vector3 &unitVec0, const Vector3 &unitVec1 )
+{
+ Vector3 crossVec;
+ __m128 cosAngle, cosAngleX2Plus2, recipCosHalfAngleX2, cosHalfAngleX2, res;
+ cosAngle = _vmathVfDot3( unitVec0.get128(), unitVec1.get128() );
+ cosAngleX2Plus2 = vec_madd( cosAngle, _mm_set1_ps(2.0f), _mm_set1_ps(2.0f) );
+ recipCosHalfAngleX2 = _mm_rsqrt_ps( cosAngleX2Plus2 );
+ cosHalfAngleX2 = vec_mul( recipCosHalfAngleX2, cosAngleX2Plus2 );
+ crossVec = cross( unitVec0, unitVec1 );
+ res = vec_mul( crossVec.get128(), recipCosHalfAngleX2 );
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0, 0, 0, 0xffffffff};
+ res = vec_sel( res, vec_mul( cosHalfAngleX2, _mm_set1_ps(0.5f) ), sw );
+ return Quat( res );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotation( float radians, const Vector3 &unitVec )
+{
+ return rotation( floatInVec(radians), unitVec );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotation( const floatInVec &radians, const Vector3 &unitVec )
+{
+ __m128 s, c, angle, res;
+ angle = vec_mul( radians.get128(), _mm_set1_ps(0.5f) );
+ sincosf4( angle, &s, &c );
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0, 0, 0, 0xffffffff};
+ res = vec_sel( vec_mul( unitVec.get128(), s ), c, sw );
+ return Quat( res );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotationX( float radians )
+{
+ return rotationX( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotationX( const floatInVec &radians )
+{
+ __m128 s, c, angle, res;
+ angle = vec_mul( radians.get128(), _mm_set1_ps(0.5f) );
+ sincosf4( angle, &s, &c );
+ VM_ATTRIBUTE_ALIGN16 unsigned int xsw[4] = {0xffffffff, 0, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int wsw[4] = {0, 0, 0, 0xffffffff};
+ res = vec_sel( _mm_setzero_ps(), s, xsw );
+ res = vec_sel( res, c, wsw );
+ return Quat( res );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotationY( float radians )
+{
+ return rotationY( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotationY( const floatInVec &radians )
+{
+ __m128 s, c, angle, res;
+ angle = vec_mul( radians.get128(), _mm_set1_ps(0.5f) );
+ sincosf4( angle, &s, &c );
+ VM_ATTRIBUTE_ALIGN16 unsigned int ysw[4] = {0, 0xffffffff, 0, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int wsw[4] = {0, 0, 0, 0xffffffff};
+ res = vec_sel( _mm_setzero_ps(), s, ysw );
+ res = vec_sel( res, c, wsw );
+ return Quat( res );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotationZ( float radians )
+{
+ return rotationZ( floatInVec(radians) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::rotationZ( const floatInVec &radians )
+{
+ __m128 s, c, angle, res;
+ angle = vec_mul( radians.get128(), _mm_set1_ps(0.5f) );
+ sincosf4( angle, &s, &c );
+ VM_ATTRIBUTE_ALIGN16 unsigned int zsw[4] = {0, 0, 0xffffffff, 0};
+ VM_ATTRIBUTE_ALIGN16 unsigned int wsw[4] = {0, 0, 0, 0xffffffff};
+ res = vec_sel( _mm_setzero_ps(), s, zsw );
+ res = vec_sel( res, c, wsw );
+ return Quat( res );
+}
+
+VECTORMATH_FORCE_INLINE const Quat Quat::operator *( const Quat &quat ) const
+{
+ __m128 ldata, rdata, qv, tmp0, tmp1, tmp2, tmp3;
+ __m128 product, l_wxyz, r_wxyz, xy, qw;
+ ldata = mVec128;
+ rdata = quat.mVec128;
+ tmp0 = _mm_shuffle_ps( ldata, ldata, _MM_SHUFFLE(3,0,2,1) );
+ tmp1 = _mm_shuffle_ps( rdata, rdata, _MM_SHUFFLE(3,1,0,2) );
+ tmp2 = _mm_shuffle_ps( ldata, ldata, _MM_SHUFFLE(3,1,0,2) );
+ tmp3 = _mm_shuffle_ps( rdata, rdata, _MM_SHUFFLE(3,0,2,1) );
+ qv = vec_mul( vec_splat( ldata, 3 ), rdata );
+ qv = vec_madd( vec_splat( rdata, 3 ), ldata, qv );
+ qv = vec_madd( tmp0, tmp1, qv );
+ qv = vec_nmsub( tmp2, tmp3, qv );
+ product = vec_mul( ldata, rdata );
+ l_wxyz = vec_sld( ldata, ldata, 12 );
+ r_wxyz = vec_sld( rdata, rdata, 12 );
+ qw = vec_nmsub( l_wxyz, r_wxyz, product );
+ xy = vec_madd( l_wxyz, r_wxyz, product );
+ qw = vec_sub( qw, vec_sld( xy, xy, 8 ) );
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0, 0, 0, 0xffffffff};
+ return Quat( vec_sel( qv, qw, sw ) );
+}
+
+VECTORMATH_FORCE_INLINE Quat & Quat::operator *=( const Quat &quat )
+{
+ *this = *this * quat;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 rotate( const Quat &quat, const Vector3 &vec )
+{ __m128 qdata, vdata, product, tmp0, tmp1, tmp2, tmp3, wwww, qv, qw, res;
+ qdata = quat.get128();
+ vdata = vec.get128();
+ tmp0 = _mm_shuffle_ps( qdata, qdata, _MM_SHUFFLE(3,0,2,1) );
+ tmp1 = _mm_shuffle_ps( vdata, vdata, _MM_SHUFFLE(3,1,0,2) );
+ tmp2 = _mm_shuffle_ps( qdata, qdata, _MM_SHUFFLE(3,1,0,2) );
+ tmp3 = _mm_shuffle_ps( vdata, vdata, _MM_SHUFFLE(3,0,2,1) );
+ wwww = vec_splat( qdata, 3 );
+ qv = vec_mul( wwww, vdata );
+ qv = vec_madd( tmp0, tmp1, qv );
+ qv = vec_nmsub( tmp2, tmp3, qv );
+ product = vec_mul( qdata, vdata );
+ qw = vec_madd( vec_sld( qdata, qdata, 4 ), vec_sld( vdata, vdata, 4 ), product );
+ qw = vec_add( vec_sld( product, product, 8 ), qw );
+ tmp1 = _mm_shuffle_ps( qv, qv, _MM_SHUFFLE(3,1,0,2) );
+ tmp3 = _mm_shuffle_ps( qv, qv, _MM_SHUFFLE(3,0,2,1) );
+ res = vec_mul( vec_splat( qw, 0 ), qdata );
+ res = vec_madd( wwww, qv, res );
+ res = vec_madd( tmp0, tmp1, res );
+ res = vec_nmsub( tmp2, tmp3, res );
+ return Vector3( res );
+}
+
+VECTORMATH_FORCE_INLINE const Quat conj( const Quat &quat )
+{
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0x80000000,0x80000000,0x80000000,0};
+ return Quat( vec_xor( quat.get128(), _mm_load_ps((float *)sw) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Quat select( const Quat &quat0, const Quat &quat1, bool select1 )
+{
+ return select( quat0, quat1, boolInVec(select1) );
+}
+
+//VECTORMATH_FORCE_INLINE const Quat select( const Quat &quat0, const Quat &quat1, const boolInVec &select1 )
+//{
+// return Quat( vec_sel( quat0.get128(), quat1.get128(), select1.get128() ) );
+//}
+
+VECTORMATH_FORCE_INLINE void loadXYZW(Quat& quat, const float* fptr)
+{
+#ifdef USE_SSE3_LDDQU
+ quat = Quat( SSEFloat(_mm_lddqu_si128((const __m128i*)((float*)(fptr)))).m128 );
+#else
+ SSEFloat fl;
+ fl.f[0] = fptr[0];
+ fl.f[1] = fptr[1];
+ fl.f[2] = fptr[2];
+ fl.f[3] = fptr[3];
+ quat = Quat( fl.m128);
+#endif
+
+
+}
+
+VECTORMATH_FORCE_INLINE void storeXYZW(const Quat& quat, float* fptr)
+{
+ fptr[0] = quat.getX();
+ fptr[1] = quat.getY();
+ fptr[2] = quat.getZ();
+ fptr[3] = quat.getW();
+// _mm_storeu_ps((float*)quat.get128(),fptr);
+}
+
+
+
+#ifdef _VECTORMATH_DEBUG
+
+VECTORMATH_FORCE_INLINE void print( const Quat &quat )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = quat.get128();
+ printf( "( %f %f %f %f )\n", tmp.s[0], tmp.s[1], tmp.s[2], tmp.s[3] );
+}
+
+VECTORMATH_FORCE_INLINE void print( const Quat &quat, const char * name )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = quat.get128();
+ printf( "%s: ( %f %f %f %f )\n", name, tmp.s[0], tmp.s[1], tmp.s[2], tmp.s[3] );
+}
+
+#endif
+
+} // namespace Aos
+} // namespace Vectormath
+
+#endif
diff --git a/tests/bullet/src/vectormath/sse/vec_aos.h b/tests/bullet/src/vectormath/sse/vec_aos.h
new file mode 100644
index 00000000..05ebac55
--- /dev/null
+++ b/tests/bullet/src/vectormath/sse/vec_aos.h
@@ -0,0 +1,1455 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _VECTORMATH_VEC_AOS_CPP_H
+#define _VECTORMATH_VEC_AOS_CPP_H
+
+//-----------------------------------------------------------------------------
+// Constants
+// for permutes words are labeled [x,y,z,w] [a,b,c,d]
+
+#define _VECTORMATH_PERM_X 0x00010203
+#define _VECTORMATH_PERM_Y 0x04050607
+#define _VECTORMATH_PERM_Z 0x08090a0b
+#define _VECTORMATH_PERM_W 0x0c0d0e0f
+#define _VECTORMATH_PERM_A 0x10111213
+#define _VECTORMATH_PERM_B 0x14151617
+#define _VECTORMATH_PERM_C 0x18191a1b
+#define _VECTORMATH_PERM_D 0x1c1d1e1f
+#define _VECTORMATH_PERM_XYZA (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A }
+#define _VECTORMATH_PERM_ZXYW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_W }
+#define _VECTORMATH_PERM_YZXW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_X, _VECTORMATH_PERM_W }
+#define _VECTORMATH_PERM_YZAB (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Y, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A, _VECTORMATH_PERM_B }
+#define _VECTORMATH_PERM_ZABC (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_Z, _VECTORMATH_PERM_A, _VECTORMATH_PERM_B, _VECTORMATH_PERM_C }
+#define _VECTORMATH_PERM_XYAW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_Y, _VECTORMATH_PERM_A, _VECTORMATH_PERM_W }
+#define _VECTORMATH_PERM_XAZW (vec_uchar16)(vec_uint4){ _VECTORMATH_PERM_X, _VECTORMATH_PERM_A, _VECTORMATH_PERM_Z, _VECTORMATH_PERM_W }
+#define _VECTORMATH_MASK_0xF000 (vec_uint4){ 0xffffffff, 0, 0, 0 }
+#define _VECTORMATH_MASK_0x0F00 (vec_uint4){ 0, 0xffffffff, 0, 0 }
+#define _VECTORMATH_MASK_0x00F0 (vec_uint4){ 0, 0, 0xffffffff, 0 }
+#define _VECTORMATH_MASK_0x000F (vec_uint4){ 0, 0, 0, 0xffffffff }
+#define _VECTORMATH_UNIT_1000 _mm_setr_ps(1.0f,0.0f,0.0f,0.0f) // (__m128){ 1.0f, 0.0f, 0.0f, 0.0f }
+#define _VECTORMATH_UNIT_0100 _mm_setr_ps(0.0f,1.0f,0.0f,0.0f) // (__m128){ 0.0f, 1.0f, 0.0f, 0.0f }
+#define _VECTORMATH_UNIT_0010 _mm_setr_ps(0.0f,0.0f,1.0f,0.0f) // (__m128){ 0.0f, 0.0f, 1.0f, 0.0f }
+#define _VECTORMATH_UNIT_0001 _mm_setr_ps(0.0f,0.0f,0.0f,1.0f) // (__m128){ 0.0f, 0.0f, 0.0f, 1.0f }
+#define _VECTORMATH_SLERP_TOL 0.999f
+//_VECTORMATH_SLERP_TOLF
+
+//-----------------------------------------------------------------------------
+// Definitions
+
+#ifndef _VECTORMATH_INTERNAL_FUNCTIONS
+#define _VECTORMATH_INTERNAL_FUNCTIONS
+
+#define _vmath_shufps(a, b, immx, immy, immz, immw) _mm_shuffle_ps(a, b, _MM_SHUFFLE(immw, immz, immy, immx))
+static VECTORMATH_FORCE_INLINE __m128 _vmathVfDot3( __m128 vec0, __m128 vec1 )
+{
+ __m128 result = _mm_mul_ps( vec0, vec1);
+ return _mm_add_ps( vec_splat( result, 0 ), _mm_add_ps( vec_splat( result, 1 ), vec_splat( result, 2 ) ) );
+}
+
+static VECTORMATH_FORCE_INLINE __m128 _vmathVfDot4( __m128 vec0, __m128 vec1 )
+{
+ __m128 result = _mm_mul_ps(vec0, vec1);
+ return _mm_add_ps(_mm_shuffle_ps(result, result, _MM_SHUFFLE(0,0,0,0)),
+ _mm_add_ps(_mm_shuffle_ps(result, result, _MM_SHUFFLE(1,1,1,1)),
+ _mm_add_ps(_mm_shuffle_ps(result, result, _MM_SHUFFLE(2,2,2,2)), _mm_shuffle_ps(result, result, _MM_SHUFFLE(3,3,3,3)))));
+}
+
+static VECTORMATH_FORCE_INLINE __m128 _vmathVfCross( __m128 vec0, __m128 vec1 )
+{
+ __m128 tmp0, tmp1, tmp2, tmp3, result;
+ tmp0 = _mm_shuffle_ps( vec0, vec0, _MM_SHUFFLE(3,0,2,1) );
+ tmp1 = _mm_shuffle_ps( vec1, vec1, _MM_SHUFFLE(3,1,0,2) );
+ tmp2 = _mm_shuffle_ps( vec0, vec0, _MM_SHUFFLE(3,1,0,2) );
+ tmp3 = _mm_shuffle_ps( vec1, vec1, _MM_SHUFFLE(3,0,2,1) );
+ result = vec_mul( tmp0, tmp1 );
+ result = vec_nmsub( tmp2, tmp3, result );
+ return result;
+}
+/*
+static VECTORMATH_FORCE_INLINE vec_uint4 _vmathVfToHalfFloatsUnpacked(__m128 v)
+{
+#if 0
+ vec_int4 bexp;
+ vec_uint4 mant, sign, hfloat;
+ vec_uint4 notZero, isInf;
+ const vec_uint4 hfloatInf = (vec_uint4)(0x00007c00u);
+ const vec_uint4 mergeMant = (vec_uint4)(0x000003ffu);
+ const vec_uint4 mergeSign = (vec_uint4)(0x00008000u);
+
+ sign = vec_sr((vec_uint4)v, (vec_uint4)16);
+ mant = vec_sr((vec_uint4)v, (vec_uint4)13);
+ bexp = vec_and(vec_sr((vec_int4)v, (vec_uint4)23), (vec_int4)0xff);
+
+ notZero = (vec_uint4)vec_cmpgt(bexp, (vec_int4)112);
+ isInf = (vec_uint4)vec_cmpgt(bexp, (vec_int4)142);
+
+ bexp = _mm_add_ps(bexp, (vec_int4)-112);
+ bexp = vec_sl(bexp, (vec_uint4)10);
+
+ hfloat = vec_sel((vec_uint4)bexp, mant, mergeMant);
+ hfloat = vec_sel((vec_uint4)(0), hfloat, notZero);
+ hfloat = vec_sel(hfloat, hfloatInf, isInf);
+ hfloat = vec_sel(hfloat, sign, mergeSign);
+
+ return hfloat;
+#else
+ assert(0);
+ return _mm_setzero_ps();
+#endif
+}
+
+static VECTORMATH_FORCE_INLINE vec_ushort8 _vmath2VfToHalfFloats(__m128 u, __m128 v)
+{
+#if 0
+ vec_uint4 hfloat_u, hfloat_v;
+ const vec_uchar16 pack = (vec_uchar16){2,3,6,7,10,11,14,15,18,19,22,23,26,27,30,31};
+ hfloat_u = _vmathVfToHalfFloatsUnpacked(u);
+ hfloat_v = _vmathVfToHalfFloatsUnpacked(v);
+ return (vec_ushort8)vec_perm(hfloat_u, hfloat_v, pack);
+#else
+ assert(0);
+ return _mm_setzero_si128();
+#endif
+}
+*/
+
+static VECTORMATH_FORCE_INLINE __m128 _vmathVfInsert(__m128 dst, __m128 src, int slot)
+{
+ SSEFloat s;
+ s.m128 = src;
+ SSEFloat d;
+ d.m128 = dst;
+ d.f[slot] = s.f[slot];
+ return d.m128;
+}
+
+#define _vmathVfSetElement(vec, scalar, slot) ((float *)&(vec))[slot] = scalar
+
+static VECTORMATH_FORCE_INLINE __m128 _vmathVfSplatScalar(float scalar)
+{
+ return _mm_set1_ps(scalar);
+}
+
+#endif
+
+namespace Vectormath {
+namespace Aos {
+
+
+#ifdef _VECTORMATH_NO_SCALAR_CAST
+VECTORMATH_FORCE_INLINE VecIdx::operator floatInVec() const
+{
+ return floatInVec(ref, i);
+}
+
+VECTORMATH_FORCE_INLINE float VecIdx::getAsFloat() const
+#else
+VECTORMATH_FORCE_INLINE VecIdx::operator float() const
+#endif
+{
+ return ((float *)&ref)[i];
+}
+
+VECTORMATH_FORCE_INLINE float VecIdx::operator =( float scalar )
+{
+ _vmathVfSetElement(ref, scalar, i);
+ return scalar;
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator =( const floatInVec &scalar )
+{
+ ref = _vmathVfInsert(ref, scalar.get128(), i);
+ return scalar;
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator =( const VecIdx& scalar )
+{
+ return *this = floatInVec(scalar.ref, scalar.i);
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator *=( float scalar )
+{
+ return *this *= floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator *=( const floatInVec &scalar )
+{
+ return *this = floatInVec(ref, i) * scalar;
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator /=( float scalar )
+{
+ return *this /= floatInVec(scalar);
+}
+
+inline floatInVec VecIdx::operator /=( const floatInVec &scalar )
+{
+ return *this = floatInVec(ref, i) / scalar;
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator +=( float scalar )
+{
+ return *this += floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator +=( const floatInVec &scalar )
+{
+ return *this = floatInVec(ref, i) + scalar;
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator -=( float scalar )
+{
+ return *this -= floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE floatInVec VecIdx::operator -=( const floatInVec &scalar )
+{
+ return *this = floatInVec(ref, i) - scalar;
+}
+
+VECTORMATH_FORCE_INLINE Vector3::Vector3(const Vector3& vec)
+{
+ set128(vec.get128());
+}
+
+VECTORMATH_FORCE_INLINE void Vector3::set128(vec_float4 vec)
+{
+ mVec128 = vec;
+}
+
+
+VECTORMATH_FORCE_INLINE Vector3::Vector3( float _x, float _y, float _z )
+{
+ mVec128 = _mm_setr_ps(_x, _y, _z, 0.0f);
+}
+
+VECTORMATH_FORCE_INLINE Vector3::Vector3( const floatInVec &_x, const floatInVec &_y, const floatInVec &_z )
+{
+ __m128 xz = _mm_unpacklo_ps( _x.get128(), _z.get128() );
+ mVec128 = _mm_unpacklo_ps( xz, _y.get128() );
+}
+
+VECTORMATH_FORCE_INLINE Vector3::Vector3( const Point3 &pnt )
+{
+ mVec128 = pnt.get128();
+}
+
+VECTORMATH_FORCE_INLINE Vector3::Vector3( float scalar )
+{
+ mVec128 = floatInVec(scalar).get128();
+}
+
+VECTORMATH_FORCE_INLINE Vector3::Vector3( const floatInVec &scalar )
+{
+ mVec128 = scalar.get128();
+}
+
+VECTORMATH_FORCE_INLINE Vector3::Vector3( __m128 vf4 )
+{
+ mVec128 = vf4;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::xAxis( )
+{
+ return Vector3( _VECTORMATH_UNIT_1000 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::yAxis( )
+{
+ return Vector3( _VECTORMATH_UNIT_0100 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::zAxis( )
+{
+ return Vector3( _VECTORMATH_UNIT_0010 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 lerp( float t, const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return lerp( floatInVec(t), vec0, vec1 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 lerp( const floatInVec &t, const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return ( vec0 + ( ( vec1 - vec0 ) * t ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 slerp( float t, const Vector3 &unitVec0, const Vector3 &unitVec1 )
+{
+ return slerp( floatInVec(t), unitVec0, unitVec1 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 slerp( const floatInVec &t, const Vector3 &unitVec0, const Vector3 &unitVec1 )
+{
+ __m128 scales, scale0, scale1, cosAngle, angle, tttt, oneMinusT, angles, sines;
+ cosAngle = _vmathVfDot3( unitVec0.get128(), unitVec1.get128() );
+ __m128 selectMask = _mm_cmpgt_ps( _mm_set1_ps(_VECTORMATH_SLERP_TOL), cosAngle );
+ angle = acosf4( cosAngle );
+ tttt = t.get128();
+ oneMinusT = _mm_sub_ps( _mm_set1_ps(1.0f), tttt );
+ angles = _mm_unpacklo_ps( _mm_set1_ps(1.0f), tttt ); // angles = 1, t, 1, t
+ angles = _mm_unpacklo_ps( angles, oneMinusT ); // angles = 1, 1-t, t, 1-t
+ angles = _mm_mul_ps( angles, angle );
+ sines = sinf4( angles );
+ scales = _mm_div_ps( sines, vec_splat( sines, 0 ) );
+ scale0 = vec_sel( oneMinusT, vec_splat( scales, 1 ), selectMask );
+ scale1 = vec_sel( tttt, vec_splat( scales, 2 ), selectMask );
+ return Vector3( vec_madd( unitVec0.get128(), scale0, _mm_mul_ps( unitVec1.get128(), scale1 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE __m128 Vector3::get128( ) const
+{
+ return mVec128;
+}
+
+VECTORMATH_FORCE_INLINE void loadXYZ(Point3& vec, const float* fptr)
+{
+#ifdef USE_SSE3_LDDQU
+ vec = Point3( SSEFloat(_mm_lddqu_si128((const __m128i*)((float*)(fptr)))).m128 );
+#else
+ SSEFloat fl;
+ fl.f[0] = fptr[0];
+ fl.f[1] = fptr[1];
+ fl.f[2] = fptr[2];
+ fl.f[3] = fptr[3];
+ vec = Point3( fl.m128);
+#endif //USE_SSE3_LDDQU
+
+}
+
+
+
+VECTORMATH_FORCE_INLINE void loadXYZ(Vector3& vec, const float* fptr)
+{
+#ifdef USE_SSE3_LDDQU
+ vec = Vector3( SSEFloat(_mm_lddqu_si128((const __m128i*)((float*)(fptr)))).m128 );
+#else
+ SSEFloat fl;
+ fl.f[0] = fptr[0];
+ fl.f[1] = fptr[1];
+ fl.f[2] = fptr[2];
+ fl.f[3] = fptr[3];
+ vec = Vector3( fl.m128);
+#endif //USE_SSE3_LDDQU
+
+}
+
+VECTORMATH_FORCE_INLINE void storeXYZ( const Vector3 &vec, __m128 * quad )
+{
+ __m128 dstVec = *quad;
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0, 0, 0, 0xffffffff}; // TODO: Centralize
+ dstVec = vec_sel(vec.get128(), dstVec, sw);
+ *quad = dstVec;
+}
+
+VECTORMATH_FORCE_INLINE void storeXYZ(const Point3& vec, float* fptr)
+{
+ fptr[0] = vec.getX();
+ fptr[1] = vec.getY();
+ fptr[2] = vec.getZ();
+}
+
+VECTORMATH_FORCE_INLINE void storeXYZ(const Vector3& vec, float* fptr)
+{
+ fptr[0] = vec.getX();
+ fptr[1] = vec.getY();
+ fptr[2] = vec.getZ();
+}
+
+
+VECTORMATH_FORCE_INLINE void loadXYZArray( Vector3 & vec0, Vector3 & vec1, Vector3 & vec2, Vector3 & vec3, const __m128 * threeQuads )
+{
+ const float *quads = (float *)threeQuads;
+ vec0 = Vector3( _mm_load_ps(quads) );
+ vec1 = Vector3( _mm_loadu_ps(quads + 3) );
+ vec2 = Vector3( _mm_loadu_ps(quads + 6) );
+ vec3 = Vector3( _mm_loadu_ps(quads + 9) );
+}
+
+VECTORMATH_FORCE_INLINE void storeXYZArray( const Vector3 &vec0, const Vector3 &vec1, const Vector3 &vec2, const Vector3 &vec3, __m128 * threeQuads )
+{
+ __m128 xxxx = _mm_shuffle_ps( vec1.get128(), vec1.get128(), _MM_SHUFFLE(0, 0, 0, 0) );
+ __m128 zzzz = _mm_shuffle_ps( vec2.get128(), vec2.get128(), _MM_SHUFFLE(2, 2, 2, 2) );
+ VM_ATTRIBUTE_ALIGN16 unsigned int xsw[4] = {0, 0, 0, 0xffffffff};
+ VM_ATTRIBUTE_ALIGN16 unsigned int zsw[4] = {0xffffffff, 0, 0, 0};
+ threeQuads[0] = vec_sel( vec0.get128(), xxxx, xsw );
+ threeQuads[1] = _mm_shuffle_ps( vec1.get128(), vec2.get128(), _MM_SHUFFLE(1, 0, 2, 1) );
+ threeQuads[2] = vec_sel( _mm_shuffle_ps( vec3.get128(), vec3.get128(), _MM_SHUFFLE(2, 1, 0, 3) ), zzzz, zsw );
+}
+/*
+VECTORMATH_FORCE_INLINE void storeHalfFloats( const Vector3 &vec0, const Vector3 &vec1, const Vector3 &vec2, const Vector3 &vec3, const Vector3 &vec4, const Vector3 &vec5, const Vector3 &vec6, const Vector3 &vec7, vec_ushort8 * threeQuads )
+{
+ assert(0);
+#if 0
+ __m128 xyz0[3];
+ __m128 xyz1[3];
+ storeXYZArray( vec0, vec1, vec2, vec3, xyz0 );
+ storeXYZArray( vec4, vec5, vec6, vec7, xyz1 );
+ threeQuads[0] = _vmath2VfToHalfFloats(xyz0[0], xyz0[1]);
+ threeQuads[1] = _vmath2VfToHalfFloats(xyz0[2], xyz1[0]);
+ threeQuads[2] = _vmath2VfToHalfFloats(xyz1[1], xyz1[2]);
+#endif
+}
+*/
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::operator =( const Vector3 &vec )
+{
+ mVec128 = vec.mVec128;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setX( float _x )
+{
+ _vmathVfSetElement(mVec128, _x, 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setX( const floatInVec &_x )
+{
+ mVec128 = _vmathVfInsert(mVec128, _x.get128(), 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector3::getX( ) const
+{
+ return floatInVec( mVec128, 0 );
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setY( float _y )
+{
+ _vmathVfSetElement(mVec128, _y, 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setY( const floatInVec &_y )
+{
+ mVec128 = _vmathVfInsert(mVec128, _y.get128(), 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector3::getY( ) const
+{
+ return floatInVec( mVec128, 1 );
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setZ( float _z )
+{
+ _vmathVfSetElement(mVec128, _z, 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setZ( const floatInVec &_z )
+{
+ mVec128 = _vmathVfInsert(mVec128, _z.get128(), 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector3::getZ( ) const
+{
+ return floatInVec( mVec128, 2 );
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setElem( int idx, float value )
+{
+ _vmathVfSetElement(mVec128, value, idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::setElem( int idx, const floatInVec &value )
+{
+ mVec128 = _vmathVfInsert(mVec128, value.get128(), idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector3::getElem( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE VecIdx Vector3::operator []( int idx )
+{
+ return VecIdx( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector3::operator []( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::operator +( const Vector3 &vec ) const
+{
+ return Vector3( _mm_add_ps( mVec128, vec.mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::operator -( const Vector3 &vec ) const
+{
+ return Vector3( _mm_sub_ps( mVec128, vec.mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 Vector3::operator +( const Point3 &pnt ) const
+{
+ return Point3( _mm_add_ps( mVec128, pnt.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::operator *( float scalar ) const
+{
+ return *this * floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::operator *( const floatInVec &scalar ) const
+{
+ return Vector3( _mm_mul_ps( mVec128, scalar.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::operator +=( const Vector3 &vec )
+{
+ *this = *this + vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::operator -=( const Vector3 &vec )
+{
+ *this = *this - vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::operator *=( const floatInVec &scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::operator /( float scalar ) const
+{
+ return *this / floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::operator /( const floatInVec &scalar ) const
+{
+ return Vector3( _mm_div_ps( mVec128, scalar.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::operator /=( float scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector3 & Vector3::operator /=( const floatInVec &scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector3::operator -( ) const
+{
+ //return Vector3(_mm_sub_ps( _mm_setzero_ps(), mVec128 ) );
+
+ VM_ATTRIBUTE_ALIGN16 static const int array[] = {0x80000000, 0x80000000, 0x80000000, 0x80000000};
+ __m128 NEG_MASK = SSEFloat(*(const vec_float4*)array).vf;
+ return Vector3(_mm_xor_ps(get128(),NEG_MASK));
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 operator *( float scalar, const Vector3 &vec )
+{
+ return floatInVec(scalar) * vec;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 operator *( const floatInVec &scalar, const Vector3 &vec )
+{
+ return vec * scalar;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 mulPerElem( const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return Vector3( _mm_mul_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 divPerElem( const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return Vector3( _mm_div_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 recipPerElem( const Vector3 &vec )
+{
+ return Vector3( _mm_rcp_ps( vec.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 absPerElem( const Vector3 &vec )
+{
+ return Vector3( fabsf4( vec.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 copySignPerElem( const Vector3 &vec0, const Vector3 &vec1 )
+{
+ __m128 vmask = toM128(0x7fffffff);
+ return Vector3( _mm_or_ps(
+ _mm_and_ps ( vmask, vec0.get128() ), // Value
+ _mm_andnot_ps( vmask, vec1.get128() ) ) ); // Signs
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 maxPerElem( const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return Vector3( _mm_max_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec maxElem( const Vector3 &vec )
+{
+ return floatInVec( _mm_max_ps( _mm_max_ps( vec_splat( vec.get128(), 0 ), vec_splat( vec.get128(), 1 ) ), vec_splat( vec.get128(), 2 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 minPerElem( const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return Vector3( _mm_min_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec minElem( const Vector3 &vec )
+{
+ return floatInVec( _mm_min_ps( _mm_min_ps( vec_splat( vec.get128(), 0 ), vec_splat( vec.get128(), 1 ) ), vec_splat( vec.get128(), 2 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec sum( const Vector3 &vec )
+{
+ return floatInVec( _mm_add_ps( _mm_add_ps( vec_splat( vec.get128(), 0 ), vec_splat( vec.get128(), 1 ) ), vec_splat( vec.get128(), 2 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec dot( const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return floatInVec( _vmathVfDot3( vec0.get128(), vec1.get128() ), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec lengthSqr( const Vector3 &vec )
+{
+ return floatInVec( _vmathVfDot3( vec.get128(), vec.get128() ), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec length( const Vector3 &vec )
+{
+ return floatInVec( _mm_sqrt_ps(_vmathVfDot3( vec.get128(), vec.get128() )), 0 );
+}
+
+
+VECTORMATH_FORCE_INLINE const Vector3 normalizeApprox( const Vector3 &vec )
+{
+ return Vector3( _mm_mul_ps( vec.get128(), _mm_rsqrt_ps( _vmathVfDot3( vec.get128(), vec.get128() ) ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 normalize( const Vector3 &vec )
+{
+ return Vector3( _mm_mul_ps( vec.get128(), newtonrapson_rsqrt4( _vmathVfDot3( vec.get128(), vec.get128() ) ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 cross( const Vector3 &vec0, const Vector3 &vec1 )
+{
+ return Vector3( _vmathVfCross( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 select( const Vector3 &vec0, const Vector3 &vec1, bool select1 )
+{
+ return select( vec0, vec1, boolInVec(select1) );
+}
+
+
+VECTORMATH_FORCE_INLINE const Vector4 select(const Vector4& vec0, const Vector4& vec1, const boolInVec& select1)
+{
+ return Vector4(vec_sel(vec0.get128(), vec1.get128(), select1.get128()));
+}
+
+#ifdef _VECTORMATH_DEBUG
+
+VECTORMATH_FORCE_INLINE void print( const Vector3 &vec )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = vec.get128();
+ printf( "( %f %f %f )\n", tmp.s[0], tmp.s[1], tmp.s[2] );
+}
+
+VECTORMATH_FORCE_INLINE void print( const Vector3 &vec, const char * name )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = vec.get128();
+ printf( "%s: ( %f %f %f )\n", name, tmp.s[0], tmp.s[1], tmp.s[2] );
+}
+
+#endif
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( float _x, float _y, float _z, float _w )
+{
+ mVec128 = _mm_setr_ps(_x, _y, _z, _w);
+ }
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( const floatInVec &_x, const floatInVec &_y, const floatInVec &_z, const floatInVec &_w )
+{
+ mVec128 = _mm_unpacklo_ps(
+ _mm_unpacklo_ps( _x.get128(), _z.get128() ),
+ _mm_unpacklo_ps( _y.get128(), _w.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( const Vector3 &xyz, float _w )
+{
+ mVec128 = xyz.get128();
+ _vmathVfSetElement(mVec128, _w, 3);
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( const Vector3 &xyz, const floatInVec &_w )
+{
+ mVec128 = xyz.get128();
+ mVec128 = _vmathVfInsert(mVec128, _w.get128(), 3);
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( const Vector3 &vec )
+{
+ mVec128 = vec.get128();
+ mVec128 = _vmathVfInsert(mVec128, _mm_setzero_ps(), 3);
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( const Point3 &pnt )
+{
+ mVec128 = pnt.get128();
+ mVec128 = _vmathVfInsert(mVec128, _mm_set1_ps(1.0f), 3);
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( const Quat &quat )
+{
+ mVec128 = quat.get128();
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( float scalar )
+{
+ mVec128 = floatInVec(scalar).get128();
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( const floatInVec &scalar )
+{
+ mVec128 = scalar.get128();
+}
+
+VECTORMATH_FORCE_INLINE Vector4::Vector4( __m128 vf4 )
+{
+ mVec128 = vf4;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::xAxis( )
+{
+ return Vector4( _VECTORMATH_UNIT_1000 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::yAxis( )
+{
+ return Vector4( _VECTORMATH_UNIT_0100 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::zAxis( )
+{
+ return Vector4( _VECTORMATH_UNIT_0010 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::wAxis( )
+{
+ return Vector4( _VECTORMATH_UNIT_0001 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 lerp( float t, const Vector4 &vec0, const Vector4 &vec1 )
+{
+ return lerp( floatInVec(t), vec0, vec1 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 lerp( const floatInVec &t, const Vector4 &vec0, const Vector4 &vec1 )
+{
+ return ( vec0 + ( ( vec1 - vec0 ) * t ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 slerp( float t, const Vector4 &unitVec0, const Vector4 &unitVec1 )
+{
+ return slerp( floatInVec(t), unitVec0, unitVec1 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 slerp( const floatInVec &t, const Vector4 &unitVec0, const Vector4 &unitVec1 )
+{
+ __m128 scales, scale0, scale1, cosAngle, angle, tttt, oneMinusT, angles, sines;
+ cosAngle = _vmathVfDot4( unitVec0.get128(), unitVec1.get128() );
+ __m128 selectMask = _mm_cmpgt_ps( _mm_set1_ps(_VECTORMATH_SLERP_TOL), cosAngle );
+ angle = acosf4( cosAngle );
+ tttt = t.get128();
+ oneMinusT = _mm_sub_ps( _mm_set1_ps(1.0f), tttt );
+ angles = _mm_unpacklo_ps( _mm_set1_ps(1.0f), tttt ); // angles = 1, t, 1, t
+ angles = _mm_unpacklo_ps( angles, oneMinusT ); // angles = 1, 1-t, t, 1-t
+ angles = _mm_mul_ps( angles, angle );
+ sines = sinf4( angles );
+ scales = _mm_div_ps( sines, vec_splat( sines, 0 ) );
+ scale0 = vec_sel( oneMinusT, vec_splat( scales, 1 ), selectMask );
+ scale1 = vec_sel( tttt, vec_splat( scales, 2 ), selectMask );
+ return Vector4( vec_madd( unitVec0.get128(), scale0, _mm_mul_ps( unitVec1.get128(), scale1 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE __m128 Vector4::get128( ) const
+{
+ return mVec128;
+}
+/*
+VECTORMATH_FORCE_INLINE void storeHalfFloats( const Vector4 &vec0, const Vector4 &vec1, const Vector4 &vec2, const Vector4 &vec3, vec_ushort8 * twoQuads )
+{
+ twoQuads[0] = _vmath2VfToHalfFloats(vec0.get128(), vec1.get128());
+ twoQuads[1] = _vmath2VfToHalfFloats(vec2.get128(), vec3.get128());
+}
+*/
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::operator =( const Vector4 &vec )
+{
+ mVec128 = vec.mVec128;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setXYZ( const Vector3 &vec )
+{
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0, 0, 0, 0xffffffff};
+ mVec128 = vec_sel( vec.get128(), mVec128, sw );
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Vector4::getXYZ( ) const
+{
+ return Vector3( mVec128 );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setX( float _x )
+{
+ _vmathVfSetElement(mVec128, _x, 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setX( const floatInVec &_x )
+{
+ mVec128 = _vmathVfInsert(mVec128, _x.get128(), 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector4::getX( ) const
+{
+ return floatInVec( mVec128, 0 );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setY( float _y )
+{
+ _vmathVfSetElement(mVec128, _y, 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setY( const floatInVec &_y )
+{
+ mVec128 = _vmathVfInsert(mVec128, _y.get128(), 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector4::getY( ) const
+{
+ return floatInVec( mVec128, 1 );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setZ( float _z )
+{
+ _vmathVfSetElement(mVec128, _z, 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setZ( const floatInVec &_z )
+{
+ mVec128 = _vmathVfInsert(mVec128, _z.get128(), 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector4::getZ( ) const
+{
+ return floatInVec( mVec128, 2 );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setW( float _w )
+{
+ _vmathVfSetElement(mVec128, _w, 3);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setW( const floatInVec &_w )
+{
+ mVec128 = _vmathVfInsert(mVec128, _w.get128(), 3);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector4::getW( ) const
+{
+ return floatInVec( mVec128, 3 );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setElem( int idx, float value )
+{
+ _vmathVfSetElement(mVec128, value, idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::setElem( int idx, const floatInVec &value )
+{
+ mVec128 = _vmathVfInsert(mVec128, value.get128(), idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector4::getElem( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE VecIdx Vector4::operator []( int idx )
+{
+ return VecIdx( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Vector4::operator []( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::operator +( const Vector4 &vec ) const
+{
+ return Vector4( _mm_add_ps( mVec128, vec.mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::operator -( const Vector4 &vec ) const
+{
+ return Vector4( _mm_sub_ps( mVec128, vec.mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::operator *( float scalar ) const
+{
+ return *this * floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::operator *( const floatInVec &scalar ) const
+{
+ return Vector4( _mm_mul_ps( mVec128, scalar.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::operator +=( const Vector4 &vec )
+{
+ *this = *this + vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::operator -=( const Vector4 &vec )
+{
+ *this = *this - vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::operator *=( float scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::operator *=( const floatInVec &scalar )
+{
+ *this = *this * scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::operator /( float scalar ) const
+{
+ return *this / floatInVec(scalar);
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::operator /( const floatInVec &scalar ) const
+{
+ return Vector4( _mm_div_ps( mVec128, scalar.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::operator /=( float scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Vector4 & Vector4::operator /=( const floatInVec &scalar )
+{
+ *this = *this / scalar;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 Vector4::operator -( ) const
+{
+ return Vector4(_mm_sub_ps( _mm_setzero_ps(), mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 operator *( float scalar, const Vector4 &vec )
+{
+ return floatInVec(scalar) * vec;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 operator *( const floatInVec &scalar, const Vector4 &vec )
+{
+ return vec * scalar;
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 mulPerElem( const Vector4 &vec0, const Vector4 &vec1 )
+{
+ return Vector4( _mm_mul_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 divPerElem( const Vector4 &vec0, const Vector4 &vec1 )
+{
+ return Vector4( _mm_div_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 recipPerElem( const Vector4 &vec )
+{
+ return Vector4( _mm_rcp_ps( vec.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 absPerElem( const Vector4 &vec )
+{
+ return Vector4( fabsf4( vec.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 copySignPerElem( const Vector4 &vec0, const Vector4 &vec1 )
+{
+ __m128 vmask = toM128(0x7fffffff);
+ return Vector4( _mm_or_ps(
+ _mm_and_ps ( vmask, vec0.get128() ), // Value
+ _mm_andnot_ps( vmask, vec1.get128() ) ) ); // Signs
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 maxPerElem( const Vector4 &vec0, const Vector4 &vec1 )
+{
+ return Vector4( _mm_max_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec maxElem( const Vector4 &vec )
+{
+ return floatInVec( _mm_max_ps(
+ _mm_max_ps( vec_splat( vec.get128(), 0 ), vec_splat( vec.get128(), 1 ) ),
+ _mm_max_ps( vec_splat( vec.get128(), 2 ), vec_splat( vec.get128(), 3 ) ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 minPerElem( const Vector4 &vec0, const Vector4 &vec1 )
+{
+ return Vector4( _mm_min_ps( vec0.get128(), vec1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec minElem( const Vector4 &vec )
+{
+ return floatInVec( _mm_min_ps(
+ _mm_min_ps( vec_splat( vec.get128(), 0 ), vec_splat( vec.get128(), 1 ) ),
+ _mm_min_ps( vec_splat( vec.get128(), 2 ), vec_splat( vec.get128(), 3 ) ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec sum( const Vector4 &vec )
+{
+ return floatInVec( _mm_add_ps(
+ _mm_add_ps( vec_splat( vec.get128(), 0 ), vec_splat( vec.get128(), 1 ) ),
+ _mm_add_ps( vec_splat( vec.get128(), 2 ), vec_splat( vec.get128(), 3 ) ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec dot( const Vector4 &vec0, const Vector4 &vec1 )
+{
+ return floatInVec( _vmathVfDot4( vec0.get128(), vec1.get128() ), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec lengthSqr( const Vector4 &vec )
+{
+ return floatInVec( _vmathVfDot4( vec.get128(), vec.get128() ), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec length( const Vector4 &vec )
+{
+ return floatInVec( _mm_sqrt_ps(_vmathVfDot4( vec.get128(), vec.get128() )), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 normalizeApprox( const Vector4 &vec )
+{
+ return Vector4( _mm_mul_ps( vec.get128(), _mm_rsqrt_ps( _vmathVfDot4( vec.get128(), vec.get128() ) ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 normalize( const Vector4 &vec )
+{
+ return Vector4( _mm_mul_ps( vec.get128(), newtonrapson_rsqrt4( _vmathVfDot4( vec.get128(), vec.get128() ) ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Vector4 select( const Vector4 &vec0, const Vector4 &vec1, bool select1 )
+{
+ return select( vec0, vec1, boolInVec(select1) );
+}
+
+
+#ifdef _VECTORMATH_DEBUG
+
+VECTORMATH_FORCE_INLINE void print( const Vector4 &vec )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = vec.get128();
+ printf( "( %f %f %f %f )\n", tmp.s[0], tmp.s[1], tmp.s[2], tmp.s[3] );
+}
+
+VECTORMATH_FORCE_INLINE void print( const Vector4 &vec, const char * name )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = vec.get128();
+ printf( "%s: ( %f %f %f %f )\n", name, tmp.s[0], tmp.s[1], tmp.s[2], tmp.s[3] );
+}
+
+#endif
+
+VECTORMATH_FORCE_INLINE Point3::Point3( float _x, float _y, float _z )
+{
+ mVec128 = _mm_setr_ps(_x, _y, _z, 0.0f);
+}
+
+VECTORMATH_FORCE_INLINE Point3::Point3( const floatInVec &_x, const floatInVec &_y, const floatInVec &_z )
+{
+ mVec128 = _mm_unpacklo_ps( _mm_unpacklo_ps( _x.get128(), _z.get128() ), _y.get128() );
+}
+
+VECTORMATH_FORCE_INLINE Point3::Point3( const Vector3 &vec )
+{
+ mVec128 = vec.get128();
+}
+
+VECTORMATH_FORCE_INLINE Point3::Point3( float scalar )
+{
+ mVec128 = floatInVec(scalar).get128();
+}
+
+VECTORMATH_FORCE_INLINE Point3::Point3( const floatInVec &scalar )
+{
+ mVec128 = scalar.get128();
+}
+
+VECTORMATH_FORCE_INLINE Point3::Point3( __m128 vf4 )
+{
+ mVec128 = vf4;
+}
+
+VECTORMATH_FORCE_INLINE const Point3 lerp( float t, const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return lerp( floatInVec(t), pnt0, pnt1 );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 lerp( const floatInVec &t, const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return ( pnt0 + ( ( pnt1 - pnt0 ) * t ) );
+}
+
+VECTORMATH_FORCE_INLINE __m128 Point3::get128( ) const
+{
+ return mVec128;
+}
+
+VECTORMATH_FORCE_INLINE void storeXYZ( const Point3 &pnt, __m128 * quad )
+{
+ __m128 dstVec = *quad;
+ VM_ATTRIBUTE_ALIGN16 unsigned int sw[4] = {0, 0, 0, 0xffffffff}; // TODO: Centralize
+ dstVec = vec_sel(pnt.get128(), dstVec, sw);
+ *quad = dstVec;
+}
+
+VECTORMATH_FORCE_INLINE void loadXYZArray( Point3 & pnt0, Point3 & pnt1, Point3 & pnt2, Point3 & pnt3, const __m128 * threeQuads )
+{
+ const float *quads = (float *)threeQuads;
+ pnt0 = Point3( _mm_load_ps(quads) );
+ pnt1 = Point3( _mm_loadu_ps(quads + 3) );
+ pnt2 = Point3( _mm_loadu_ps(quads + 6) );
+ pnt3 = Point3( _mm_loadu_ps(quads + 9) );
+}
+
+VECTORMATH_FORCE_INLINE void storeXYZArray( const Point3 &pnt0, const Point3 &pnt1, const Point3 &pnt2, const Point3 &pnt3, __m128 * threeQuads )
+{
+ __m128 xxxx = _mm_shuffle_ps( pnt1.get128(), pnt1.get128(), _MM_SHUFFLE(0, 0, 0, 0) );
+ __m128 zzzz = _mm_shuffle_ps( pnt2.get128(), pnt2.get128(), _MM_SHUFFLE(2, 2, 2, 2) );
+ VM_ATTRIBUTE_ALIGN16 unsigned int xsw[4] = {0, 0, 0, 0xffffffff};
+ VM_ATTRIBUTE_ALIGN16 unsigned int zsw[4] = {0xffffffff, 0, 0, 0};
+ threeQuads[0] = vec_sel( pnt0.get128(), xxxx, xsw );
+ threeQuads[1] = _mm_shuffle_ps( pnt1.get128(), pnt2.get128(), _MM_SHUFFLE(1, 0, 2, 1) );
+ threeQuads[2] = vec_sel( _mm_shuffle_ps( pnt3.get128(), pnt3.get128(), _MM_SHUFFLE(2, 1, 0, 3) ), zzzz, zsw );
+}
+/*
+VECTORMATH_FORCE_INLINE void storeHalfFloats( const Point3 &pnt0, const Point3 &pnt1, const Point3 &pnt2, const Point3 &pnt3, const Point3 &pnt4, const Point3 &pnt5, const Point3 &pnt6, const Point3 &pnt7, vec_ushort8 * threeQuads )
+{
+#if 0
+ __m128 xyz0[3];
+ __m128 xyz1[3];
+ storeXYZArray( pnt0, pnt1, pnt2, pnt3, xyz0 );
+ storeXYZArray( pnt4, pnt5, pnt6, pnt7, xyz1 );
+ threeQuads[0] = _vmath2VfToHalfFloats(xyz0[0], xyz0[1]);
+ threeQuads[1] = _vmath2VfToHalfFloats(xyz0[2], xyz1[0]);
+ threeQuads[2] = _vmath2VfToHalfFloats(xyz1[1], xyz1[2]);
+#else
+ assert(0);
+#endif
+}
+*/
+VECTORMATH_FORCE_INLINE Point3 & Point3::operator =( const Point3 &pnt )
+{
+ mVec128 = pnt.mVec128;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setX( float _x )
+{
+ _vmathVfSetElement(mVec128, _x, 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setX( const floatInVec &_x )
+{
+ mVec128 = _vmathVfInsert(mVec128, _x.get128(), 0);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Point3::getX( ) const
+{
+ return floatInVec( mVec128, 0 );
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setY( float _y )
+{
+ _vmathVfSetElement(mVec128, _y, 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setY( const floatInVec &_y )
+{
+ mVec128 = _vmathVfInsert(mVec128, _y.get128(), 1);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Point3::getY( ) const
+{
+ return floatInVec( mVec128, 1 );
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setZ( float _z )
+{
+ _vmathVfSetElement(mVec128, _z, 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setZ( const floatInVec &_z )
+{
+ mVec128 = _vmathVfInsert(mVec128, _z.get128(), 2);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Point3::getZ( ) const
+{
+ return floatInVec( mVec128, 2 );
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setElem( int idx, float value )
+{
+ _vmathVfSetElement(mVec128, value, idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::setElem( int idx, const floatInVec &value )
+{
+ mVec128 = _vmathVfInsert(mVec128, value.get128(), idx);
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Point3::getElem( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE VecIdx Point3::operator []( int idx )
+{
+ return VecIdx( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec Point3::operator []( int idx ) const
+{
+ return floatInVec( mVec128, idx );
+}
+
+VECTORMATH_FORCE_INLINE const Vector3 Point3::operator -( const Point3 &pnt ) const
+{
+ return Vector3( _mm_sub_ps( mVec128, pnt.mVec128 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 Point3::operator +( const Vector3 &vec ) const
+{
+ return Point3( _mm_add_ps( mVec128, vec.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 Point3::operator -( const Vector3 &vec ) const
+{
+ return Point3( _mm_sub_ps( mVec128, vec.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::operator +=( const Vector3 &vec )
+{
+ *this = *this + vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE Point3 & Point3::operator -=( const Vector3 &vec )
+{
+ *this = *this - vec;
+ return *this;
+}
+
+VECTORMATH_FORCE_INLINE const Point3 mulPerElem( const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return Point3( _mm_mul_ps( pnt0.get128(), pnt1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 divPerElem( const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return Point3( _mm_div_ps( pnt0.get128(), pnt1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 recipPerElem( const Point3 &pnt )
+{
+ return Point3( _mm_rcp_ps( pnt.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 absPerElem( const Point3 &pnt )
+{
+ return Point3( fabsf4( pnt.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 copySignPerElem( const Point3 &pnt0, const Point3 &pnt1 )
+{
+ __m128 vmask = toM128(0x7fffffff);
+ return Point3( _mm_or_ps(
+ _mm_and_ps ( vmask, pnt0.get128() ), // Value
+ _mm_andnot_ps( vmask, pnt1.get128() ) ) ); // Signs
+}
+
+VECTORMATH_FORCE_INLINE const Point3 maxPerElem( const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return Point3( _mm_max_ps( pnt0.get128(), pnt1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec maxElem( const Point3 &pnt )
+{
+ return floatInVec( _mm_max_ps( _mm_max_ps( vec_splat( pnt.get128(), 0 ), vec_splat( pnt.get128(), 1 ) ), vec_splat( pnt.get128(), 2 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 minPerElem( const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return Point3( _mm_min_ps( pnt0.get128(), pnt1.get128() ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec minElem( const Point3 &pnt )
+{
+ return floatInVec( _mm_min_ps( _mm_min_ps( vec_splat( pnt.get128(), 0 ), vec_splat( pnt.get128(), 1 ) ), vec_splat( pnt.get128(), 2 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec sum( const Point3 &pnt )
+{
+ return floatInVec( _mm_add_ps( _mm_add_ps( vec_splat( pnt.get128(), 0 ), vec_splat( pnt.get128(), 1 ) ), vec_splat( pnt.get128(), 2 ) ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 scale( const Point3 &pnt, float scaleVal )
+{
+ return scale( pnt, floatInVec( scaleVal ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 scale( const Point3 &pnt, const floatInVec &scaleVal )
+{
+ return mulPerElem( pnt, Point3( scaleVal ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 scale( const Point3 &pnt, const Vector3 &scaleVec )
+{
+ return mulPerElem( pnt, Point3( scaleVec ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec projection( const Point3 &pnt, const Vector3 &unitVec )
+{
+ return floatInVec( _vmathVfDot3( pnt.get128(), unitVec.get128() ), 0 );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec distSqrFromOrigin( const Point3 &pnt )
+{
+ return lengthSqr( Vector3( pnt ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec distFromOrigin( const Point3 &pnt )
+{
+ return length( Vector3( pnt ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec distSqr( const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return lengthSqr( ( pnt1 - pnt0 ) );
+}
+
+VECTORMATH_FORCE_INLINE const floatInVec dist( const Point3 &pnt0, const Point3 &pnt1 )
+{
+ return length( ( pnt1 - pnt0 ) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 select( const Point3 &pnt0, const Point3 &pnt1, bool select1 )
+{
+ return select( pnt0, pnt1, boolInVec(select1) );
+}
+
+VECTORMATH_FORCE_INLINE const Point3 select( const Point3 &pnt0, const Point3 &pnt1, const boolInVec &select1 )
+{
+ return Point3( vec_sel( pnt0.get128(), pnt1.get128(), select1.get128() ) );
+}
+
+
+
+#ifdef _VECTORMATH_DEBUG
+
+VECTORMATH_FORCE_INLINE void print( const Point3 &pnt )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = pnt.get128();
+ printf( "( %f %f %f )\n", tmp.s[0], tmp.s[1], tmp.s[2] );
+}
+
+VECTORMATH_FORCE_INLINE void print( const Point3 &pnt, const char * name )
+{
+ union { __m128 v; float s[4]; } tmp;
+ tmp.v = pnt.get128();
+ printf( "%s: ( %f %f %f )\n", name, tmp.s[0], tmp.s[1], tmp.s[2] );
+}
+
+#endif
+
+} // namespace Aos
+} // namespace Vectormath
+
+#endif
diff --git a/tests/bullet/src/vectormath/sse/vecidx_aos.h b/tests/bullet/src/vectormath/sse/vecidx_aos.h
new file mode 100644
index 00000000..32e837a5
--- /dev/null
+++ b/tests/bullet/src/vectormath/sse/vecidx_aos.h
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef _VECTORMATH_VECIDX_AOS_H
+#define _VECTORMATH_VECIDX_AOS_H
+
+
+#include "floatInVec.h"
+
+namespace Vectormath {
+namespace Aos {
+
+//-----------------------------------------------------------------------------
+// VecIdx
+// Used in setting elements of Vector3, Vector4, Point3, or Quat with the
+// subscripting operator.
+//
+
+VM_ATTRIBUTE_ALIGNED_CLASS16 (class) VecIdx
+{
+private:
+ __m128 &ref;
+ int i;
+public:
+ inline VecIdx( __m128& vec, int idx ): ref(vec) { i = idx; }
+
+ // implicitly casts to float unless _VECTORMATH_NO_SCALAR_CAST defined
+ // in which case, implicitly casts to floatInVec, and one must call
+ // getAsFloat to convert to float.
+ //
+#ifdef _VECTORMATH_NO_SCALAR_CAST
+ inline operator floatInVec() const;
+ inline float getAsFloat() const;
+#else
+ inline operator float() const;
+#endif
+
+ inline float operator =( float scalar );
+ inline floatInVec operator =( const floatInVec &scalar );
+ inline floatInVec operator =( const VecIdx& scalar );
+ inline floatInVec operator *=( float scalar );
+ inline floatInVec operator *=( const floatInVec &scalar );
+ inline floatInVec operator /=( float scalar );
+ inline floatInVec operator /=( const floatInVec &scalar );
+ inline floatInVec operator +=( float scalar );
+ inline floatInVec operator +=( const floatInVec &scalar );
+ inline floatInVec operator -=( float scalar );
+ inline floatInVec operator -=( const floatInVec &scalar );
+};
+
+} // namespace Aos
+} // namespace Vectormath
+
+#endif
diff --git a/tests/bullet/src/vectormath/sse/vectormath_aos.h b/tests/bullet/src/vectormath/sse/vectormath_aos.h
new file mode 100644
index 00000000..b802810d
--- /dev/null
+++ b/tests/bullet/src/vectormath/sse/vectormath_aos.h
@@ -0,0 +1,2547 @@
+/*
+ Copyright (C) 2006, 2007 Sony Computer Entertainment Inc.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms,
+ with or without modification, are permitted provided that the
+ following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the Sony Computer Entertainment Inc nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+
+#ifndef _VECTORMATH_AOS_CPP_SSE_H
+#define _VECTORMATH_AOS_CPP_SSE_H
+
+#include <math.h>
+#include <xmmintrin.h>
+#include <emmintrin.h>
+#include <assert.h>
+
+#define Vector3Ref Vector3&
+#define QuatRef Quat&
+#define Matrix3Ref Matrix3&
+
+#if (defined (_WIN32) && (_MSC_VER) && _MSC_VER >= 1400)
+ #define USE_SSE3_LDDQU
+
+ #define VM_ATTRIBUTE_ALIGNED_CLASS16(a) __declspec(align(16)) a
+ #define VM_ATTRIBUTE_ALIGN16 __declspec(align(16))
+ #define VECTORMATH_FORCE_INLINE __forceinline
+#else
+ #define VM_ATTRIBUTE_ALIGNED_CLASS16(a) a __attribute__ ((aligned (16)))
+ #define VM_ATTRIBUTE_ALIGN16 __attribute__ ((aligned (16)))
+ #define VECTORMATH_FORCE_INLINE inline
+ #ifdef __SSE3__
+ #define USE_SSE3_LDDQU
+ #endif //__SSE3__
+#endif//_WIN32
+
+
+#ifdef USE_SSE3_LDDQU
+#include <pmmintrin.h>//_mm_lddqu_si128
+#endif //USE_SSE3_LDDQU
+
+
+// TODO: Tidy
+typedef __m128 vec_float4;
+typedef __m128 vec_uint4;
+typedef __m128 vec_int4;
+typedef __m128i vec_uchar16;
+typedef __m128i vec_ushort8;
+
+#define vec_splat(x, e) _mm_shuffle_ps(x, x, _MM_SHUFFLE(e,e,e,e))
+
+#define _mm_ror_ps(vec,i) \
+ (((i)%4) ? (_mm_shuffle_ps(vec,vec, _MM_SHUFFLE((unsigned char)(i+3)%4,(unsigned char)(i+2)%4,(unsigned char)(i+1)%4,(unsigned char)(i+0)%4))) : (vec))
+#define _mm_rol_ps(vec,i) \
+ (((i)%4) ? (_mm_shuffle_ps(vec,vec, _MM_SHUFFLE((unsigned char)(7-i)%4,(unsigned char)(6-i)%4,(unsigned char)(5-i)%4,(unsigned char)(4-i)%4))) : (vec))
+
+#define vec_sld(vec,vec2,x) _mm_ror_ps(vec, ((x)/4))
+
+#define _mm_abs_ps(vec) _mm_andnot_ps(_MASKSIGN_,vec)
+#define _mm_neg_ps(vec) _mm_xor_ps(_MASKSIGN_,vec)
+
+#define vec_madd(a, b, c) _mm_add_ps(c, _mm_mul_ps(a, b) )
+
+union SSEFloat
+{
+ __m128i vi;
+ __m128 m128;
+ __m128 vf;
+ unsigned int ui[4];
+ unsigned short s[8];
+ float f[4];
+ SSEFloat(__m128 v) : m128(v) {}
+ SSEFloat(__m128i v) : vi(v) {}
+ SSEFloat() {}//uninitialized
+};
+
+static VECTORMATH_FORCE_INLINE __m128 vec_sel(__m128 a, __m128 b, __m128 mask)
+{
+ return _mm_or_ps(_mm_and_ps(mask, b), _mm_andnot_ps(mask, a));
+}
+static VECTORMATH_FORCE_INLINE __m128 vec_sel(__m128 a, __m128 b, const unsigned int *_mask)
+{
+ return vec_sel(a, b, _mm_load_ps((float *)_mask));
+}
+static VECTORMATH_FORCE_INLINE __m128 vec_sel(__m128 a, __m128 b, unsigned int _mask)
+{
+ return vec_sel(a, b, _mm_set1_ps(*(float *)&_mask));
+}
+
+static VECTORMATH_FORCE_INLINE __m128 toM128(unsigned int x)
+{
+ return _mm_set1_ps( *(float *)&x );
+}
+
+static VECTORMATH_FORCE_INLINE __m128 fabsf4(__m128 x)
+{
+ return _mm_and_ps( x, toM128( 0x7fffffff ) );
+}
+/*
+union SSE64
+{
+ __m128 m128;
+ struct
+ {
+ __m64 m01;
+ __m64 m23;
+ } m64;
+};
+
+static VECTORMATH_FORCE_INLINE __m128 vec_cts(__m128 x, int a)
+{
+ assert(a == 0); // Only 2^0 supported
+ (void)a;
+ SSE64 sse64;
+ sse64.m64.m01 = _mm_cvttps_pi32(x);
+ sse64.m64.m23 = _mm_cvttps_pi32(_mm_ror_ps(x,2));
+ _mm_empty();
+ return sse64.m128;
+}
+
+static VECTORMATH_FORCE_INLINE __m128 vec_ctf(__m128 x, int a)
+{
+ assert(a == 0); // Only 2^0 supported
+ (void)a;
+ SSE64 sse64;
+ sse64.m128 = x;
+ __m128 result =_mm_movelh_ps(
+ _mm_cvt_pi2ps(_mm_setzero_ps(), sse64.m64.m01),
+ _mm_cvt_pi2ps(_mm_setzero_ps(), sse64.m64.m23));
+ _mm_empty();
+ return result;
+}
+*/
+static VECTORMATH_FORCE_INLINE __m128 vec_cts(__m128 x, int a)
+{
+ assert(a == 0); // Only 2^0 supported
+ (void)a;
+ __m128i result = _mm_cvtps_epi32(x);
+ return (__m128 &)result;
+}
+
+static VECTORMATH_FORCE_INLINE __m128 vec_ctf(__m128 x, int a)
+{
+ assert(a == 0); // Only 2^0 supported
+ (void)a;
+ return _mm_cvtepi32_ps((__m128i &)x);
+}
+
+#define vec_nmsub(a,b,c) _mm_sub_ps( c, _mm_mul_ps( a, b ) )
+#define vec_sub(a,b) _mm_sub_ps( a, b )
+#define vec_add(a,b) _mm_add_ps( a, b )
+#define vec_mul(a,b) _mm_mul_ps( a, b )
+#define vec_xor(a,b) _mm_xor_ps( a, b )
+#define vec_and(a,b) _mm_and_ps( a, b )
+#define vec_cmpeq(a,b) _mm_cmpeq_ps( a, b )
+#define vec_cmpgt(a,b) _mm_cmpgt_ps( a, b )
+
+#define vec_mergeh(a,b) _mm_unpacklo_ps( a, b )
+#define vec_mergel(a,b) _mm_unpackhi_ps( a, b )
+
+#define vec_andc(a,b) _mm_andnot_ps( b, a )
+
+#define sqrtf4(x) _mm_sqrt_ps( x )
+#define rsqrtf4(x) _mm_rsqrt_ps( x )
+#define recipf4(x) _mm_rcp_ps( x )
+#define negatef4(x) _mm_sub_ps( _mm_setzero_ps(), x )
+
+static VECTORMATH_FORCE_INLINE __m128 newtonrapson_rsqrt4( const __m128 v )
+{
+#define _half4 _mm_setr_ps(.5f,.5f,.5f,.5f)
+#define _three _mm_setr_ps(3.f,3.f,3.f,3.f)
+const __m128 approx = _mm_rsqrt_ps( v );
+const __m128 muls = _mm_mul_ps(_mm_mul_ps(v, approx), approx);
+return _mm_mul_ps(_mm_mul_ps(_half4, approx), _mm_sub_ps(_three, muls) );
+}
+
+static VECTORMATH_FORCE_INLINE __m128 acosf4(__m128 x)
+{
+ __m128 xabs = fabsf4(x);
+ __m128 select = _mm_cmplt_ps( x, _mm_setzero_ps() );
+ __m128 t1 = sqrtf4(vec_sub(_mm_set1_ps(1.0f), xabs));
+
+ /* Instruction counts can be reduced if the polynomial was
+ * computed entirely from nested (dependent) fma's. However,
+ * to reduce the number of pipeline stalls, the polygon is evaluated
+ * in two halves (hi amd lo).
+ */
+ __m128 xabs2 = _mm_mul_ps(xabs, xabs);
+ __m128 xabs4 = _mm_mul_ps(xabs2, xabs2);
+ __m128 hi = vec_madd(vec_madd(vec_madd(_mm_set1_ps(-0.0012624911f),
+ xabs, _mm_set1_ps(0.0066700901f)),
+ xabs, _mm_set1_ps(-0.0170881256f)),
+ xabs, _mm_set1_ps( 0.0308918810f));
+ __m128 lo = vec_madd(vec_madd(vec_madd(_mm_set1_ps(-0.0501743046f),
+ xabs, _mm_set1_ps(0.0889789874f)),
+ xabs, _mm_set1_ps(-0.2145988016f)),
+ xabs, _mm_set1_ps( 1.5707963050f));
+
+ __m128 result = vec_madd(hi, xabs4, lo);
+
+ // Adjust the result if x is negactive.
+ return vec_sel(
+ vec_mul(t1, result), // Positive
+ vec_nmsub(t1, result, _mm_set1_ps(3.1415926535898f)), // Negative
+ select);
+}
+
+static VECTORMATH_FORCE_INLINE __m128 sinf4(vec_float4 x)
+{
+
+//
+// Common constants used to evaluate sinf4/cosf4/tanf4
+//
+#define _SINCOS_CC0 -0.0013602249f
+#define _SINCOS_CC1 0.0416566950f
+#define _SINCOS_CC2 -0.4999990225f
+#define _SINCOS_SC0 -0.0001950727f
+#define _SINCOS_SC1 0.0083320758f
+#define _SINCOS_SC2 -0.1666665247f
+
+#define _SINCOS_KC1 1.57079625129f
+#define _SINCOS_KC2 7.54978995489e-8f
+
+ vec_float4 xl,xl2,xl3,res;
+
+ // Range reduction using : xl = angle * TwoOverPi;
+ //
+ xl = vec_mul(x, _mm_set1_ps(0.63661977236f));
+
+ // Find the quadrant the angle falls in
+ // using: q = (int) (ceil(abs(xl))*sign(xl))
+ //
+ vec_int4 q = vec_cts(xl,0);
+
+ // Compute an offset based on the quadrant that the angle falls in
+ //
+ vec_int4 offset = _mm_and_ps(q,toM128(0x3));
+
+ // Remainder in range [-pi/4..pi/4]
+ //
+ vec_float4 qf = vec_ctf(q,0);
+ xl = vec_nmsub(qf,_mm_set1_ps(_SINCOS_KC2),vec_nmsub(qf,_mm_set1_ps(_SINCOS_KC1),x));
+
+ // Compute x^2 and x^3
+ //
+ xl2 = vec_mul(xl,xl);
+ xl3 = vec_mul(xl2,xl);
+
+ // Compute both the sin and cos of the angles
+ // using a polynomial expression:
+ // cx = 1.0f + xl2 * ((C0 * xl2 + C1) * xl2 + C2), and
+ // sx = xl + xl3 * ((S0 * xl2 + S1) * xl2 + S2)
+ //
+
+ vec_float4 cx =
+ vec_madd(
+ vec_madd(
+ vec_madd(_mm_set1_ps(_SINCOS_CC0),xl2,_mm_set1_ps(_SINCOS_CC1)),xl2,_mm_set1_ps(_SINCOS_CC2)),xl2,_mm_set1_ps(1.0f));
+ vec_float4 sx =
+ vec_madd(
+ vec_madd(
+ vec_madd(_mm_set1_ps(_SINCOS_SC0),xl2,_mm_set1_ps(_SINCOS_SC1)),xl2,_mm_set1_ps(_SINCOS_SC2)),xl3,xl);
+
+ // Use the cosine when the offset is odd and the sin
+ // when the offset is even
+ //
+ res = vec_sel(cx,sx,vec_cmpeq(vec_and(offset,
+ toM128(0x1)),
+ _mm_setzero_ps()));
+
+ // Flip the sign of the result when (offset mod 4) = 1 or 2
+ //
+ return vec_sel(
+ vec_xor(toM128(0x80000000U), res), // Negative
+ res, // Positive
+ vec_cmpeq(vec_and(offset,toM128(0x2)),_mm_setzero_ps()));
+}
+
+static VECTORMATH_FORCE_INLINE void sincosf4(vec_float4 x, vec_float4* s, vec_float4* c)
+{
+ vec_float4 xl,xl2,xl3;
+ vec_int4 offsetSin, offsetCos;
+
+ // Range reduction using : xl = angle * TwoOverPi;
+ //
+ xl = vec_mul(x, _mm_set1_ps(0.63661977236f));
+
+ // Find the quadrant the angle falls in
+ // using: q = (int) (ceil(abs(xl))*sign(xl))
+ //
+ //vec_int4 q = vec_cts(vec_add(xl,vec_sel(_mm_set1_ps(0.5f),xl,(0x80000000))),0);
+ vec_int4 q = vec_cts(xl,0);
+
+ // Compute the offset based on the quadrant that the angle falls in.
+ // Add 1 to the offset for the cosine.
+ //
+ offsetSin = vec_and(q,toM128((int)0x3));
+ __m128i temp = _mm_add_epi32(_mm_set1_epi32(1),(__m128i &)offsetSin);
+ offsetCos = (__m128 &)temp;
+
+ // Remainder in range [-pi/4..pi/4]
+ //
+ vec_float4 qf = vec_ctf(q,0);
+ xl = vec_nmsub(qf,_mm_set1_ps(_SINCOS_KC2),vec_nmsub(qf,_mm_set1_ps(_SINCOS_KC1),x));
+
+ // Compute x^2 and x^3
+ //
+ xl2 = vec_mul(xl,xl);
+ xl3 = vec_mul(xl2,xl);
+
+ // Compute both the sin and cos of the angles
+ // using a polynomial expression:
+ // cx = 1.0f + xl2 * ((C0 * xl2 + C1) * xl2 + C2), and
+ // sx = xl + xl3 * ((S0 * xl2 + S1) * xl2 + S2)
+ //
+ vec_float4 cx =
+ vec_madd(
+ vec_madd(
+ vec_madd(_mm_set1_ps(_SINCOS_CC0),xl2,_mm_set1_ps(_SINCOS_CC1)),xl2,_mm_set1_ps(_SINCOS_CC2)),xl2,_mm_set1_ps(1.0f));
+ vec_float4 sx =
+ vec_madd(
+ vec_madd(
+ vec_madd(_mm_set1_ps(_SINCOS_SC0),xl2,_mm_set1_ps(_SINCOS_SC1)),xl2,_mm_set1_ps(_SINCOS_SC2)),xl3,xl);
+
+ // Use the cosine when the offset is odd and the sin
+ // when the offset is even
+ //
+ vec_uint4 sinMask = (vec_uint4)vec_cmpeq(vec_and(offsetSin,toM128(0x1)),_mm_setzero_ps());
+ vec_uint4 cosMask = (vec_uint4)vec_cmpeq(vec_and(offsetCos,toM128(0x1)),_mm_setzero_ps());
+ *s = vec_sel(cx,sx,sinMask);
+ *c = vec_sel(cx,sx,cosMask);
+
+ // Flip the sign of the result when (offset mod 4) = 1 or 2
+ //
+ sinMask = vec_cmpeq(vec_and(offsetSin,toM128(0x2)),_mm_setzero_ps());
+ cosMask = vec_cmpeq(vec_and(offsetCos,toM128(0x2)),_mm_setzero_ps());
+
+ *s = vec_sel((vec_float4)vec_xor(toM128(0x80000000),(vec_uint4)*s),*s,sinMask);
+ *c = vec_sel((vec_float4)vec_xor(toM128(0x80000000),(vec_uint4)*c),*c,cosMask);
+}
+
+#include "vecidx_aos.h"
+#include "floatInVec.h"
+#include "boolInVec.h"
+
+#ifdef _VECTORMATH_DEBUG
+#include <stdio.h>
+#endif
+namespace Vectormath {
+
+namespace Aos {
+
+//-----------------------------------------------------------------------------
+// Forward Declarations
+//
+
+class Vector3;
+class Vector4;
+class Point3;
+class Quat;
+class Matrix3;
+class Matrix4;
+class Transform3;
+
+// A 3-D vector in array-of-structures format
+//
+class Vector3
+{
+ __m128 mVec128;
+
+ VECTORMATH_FORCE_INLINE void set128(vec_float4 vec);
+
+ VECTORMATH_FORCE_INLINE vec_float4& get128Ref();
+
+public:
+ // Default constructor; does no initialization
+ //
+ VECTORMATH_FORCE_INLINE Vector3( ) { };
+
+ // Default copy constructor
+ //
+ VECTORMATH_FORCE_INLINE Vector3(const Vector3& vec);
+
+ // Construct a 3-D vector from x, y, and z elements
+ //
+ VECTORMATH_FORCE_INLINE Vector3( float x, float y, float z );
+
+ // Construct a 3-D vector from x, y, and z elements (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector3( const floatInVec &x, const floatInVec &y, const floatInVec &z );
+
+ // Copy elements from a 3-D point into a 3-D vector
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector3( const Point3 &pnt );
+
+ // Set all elements of a 3-D vector to the same scalar value
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector3( float scalar );
+
+ // Set all elements of a 3-D vector to the same scalar value (scalar data contained in vector data type)
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector3( const floatInVec &scalar );
+
+ // Set vector float data in a 3-D vector
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector3( __m128 vf4 );
+
+ // Get vector float data from a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE __m128 get128( ) const;
+
+ // Assign one 3-D vector to another
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator =( const Vector3 &vec );
+
+ // Set the x element of a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setX( float x );
+
+ // Set the y element of a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setY( float y );
+
+ // Set the z element of a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setZ( float z );
+
+ // Set the x element of a 3-D vector (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setX( const floatInVec &x );
+
+ // Set the y element of a 3-D vector (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setY( const floatInVec &y );
+
+ // Set the z element of a 3-D vector (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setZ( const floatInVec &z );
+
+ // Get the x element of a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getX( ) const;
+
+ // Get the y element of a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getY( ) const;
+
+ // Get the z element of a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getZ( ) const;
+
+ // Set an x, y, or z element of a 3-D vector by index
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setElem( int idx, float value );
+
+ // Set an x, y, or z element of a 3-D vector by index (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & setElem( int idx, const floatInVec &value );
+
+ // Get an x, y, or z element of a 3-D vector by index
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ VECTORMATH_FORCE_INLINE VecIdx operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec operator []( int idx ) const;
+
+ // Add two 3-D vectors
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator +( const Vector3 &vec ) const;
+
+ // Subtract a 3-D vector from another 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator -( const Vector3 &vec ) const;
+
+ // Add a 3-D vector to a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const Point3 operator +( const Point3 &pnt ) const;
+
+ // Multiply a 3-D vector by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator *( float scalar ) const;
+
+ // Divide a 3-D vector by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator /( float scalar ) const;
+
+ // Multiply a 3-D vector by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator *( const floatInVec &scalar ) const;
+
+ // Divide a 3-D vector by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator /( const floatInVec &scalar ) const;
+
+ // Perform compound assignment and addition with a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator +=( const Vector3 &vec );
+
+ // Perform compound assignment and subtraction by a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator -=( const Vector3 &vec );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator *=( float scalar );
+
+ // Perform compound assignment and division by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator /=( float scalar );
+
+ // Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator *=( const floatInVec &scalar );
+
+ // Perform compound assignment and division by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator /=( const floatInVec &scalar );
+
+ // Negate all elements of a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator -( ) const;
+
+ // Construct x axis
+ //
+ static VECTORMATH_FORCE_INLINE const Vector3 xAxis( );
+
+ // Construct y axis
+ //
+ static VECTORMATH_FORCE_INLINE const Vector3 yAxis( );
+
+ // Construct z axis
+ //
+ static VECTORMATH_FORCE_INLINE const Vector3 zAxis( );
+
+};
+
+// Multiply a 3-D vector by a scalar
+//
+VECTORMATH_FORCE_INLINE const Vector3 operator *( float scalar, const Vector3 &vec );
+
+// Multiply a 3-D vector by a scalar (scalar data contained in vector data type)
+//
+VECTORMATH_FORCE_INLINE const Vector3 operator *( const floatInVec &scalar, const Vector3 &vec );
+
+// Multiply two 3-D vectors per element
+//
+VECTORMATH_FORCE_INLINE const Vector3 mulPerElem( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Divide two 3-D vectors per element
+// NOTE:
+// Floating-point behavior matches standard library function divf4.
+//
+VECTORMATH_FORCE_INLINE const Vector3 divPerElem( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Compute the reciprocal of a 3-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function recipf4.
+//
+VECTORMATH_FORCE_INLINE const Vector3 recipPerElem( const Vector3 &vec );
+
+// Compute the absolute value of a 3-D vector per element
+//
+VECTORMATH_FORCE_INLINE const Vector3 absPerElem( const Vector3 &vec );
+
+// Copy sign from one 3-D vector to another, per element
+//
+VECTORMATH_FORCE_INLINE const Vector3 copySignPerElem( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Maximum of two 3-D vectors per element
+//
+VECTORMATH_FORCE_INLINE const Vector3 maxPerElem( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Minimum of two 3-D vectors per element
+//
+VECTORMATH_FORCE_INLINE const Vector3 minPerElem( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Maximum element of a 3-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec maxElem( const Vector3 &vec );
+
+// Minimum element of a 3-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec minElem( const Vector3 &vec );
+
+// Compute the sum of all elements of a 3-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec sum( const Vector3 &vec );
+
+// Compute the dot product of two 3-D vectors
+//
+VECTORMATH_FORCE_INLINE const floatInVec dot( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Compute the square of the length of a 3-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec lengthSqr( const Vector3 &vec );
+
+// Compute the length of a 3-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec length( const Vector3 &vec );
+
+// Normalize a 3-D vector
+// NOTE:
+// The result is unpredictable when all elements of vec are at or near zero.
+//
+VECTORMATH_FORCE_INLINE const Vector3 normalize( const Vector3 &vec );
+
+// Compute cross product of two 3-D vectors
+//
+VECTORMATH_FORCE_INLINE const Vector3 cross( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Outer product of two 3-D vectors
+//
+VECTORMATH_FORCE_INLINE const Matrix3 outer( const Vector3 &vec0, const Vector3 &vec1 );
+
+// Pre-multiply a row vector by a 3x3 matrix
+// NOTE:
+// Slower than column post-multiply.
+//
+VECTORMATH_FORCE_INLINE const Vector3 rowMul( const Vector3 &vec, const Matrix3 & mat );
+
+// Cross-product matrix of a 3-D vector
+//
+VECTORMATH_FORCE_INLINE const Matrix3 crossMatrix( const Vector3 &vec );
+
+// Create cross-product matrix and multiply
+// NOTE:
+// Faster than separately creating a cross-product matrix and multiplying.
+//
+VECTORMATH_FORCE_INLINE const Matrix3 crossMatrixMul( const Vector3 &vec, const Matrix3 & mat );
+
+// Linear interpolation between two 3-D vectors
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector3 lerp( float t, const Vector3 &vec0, const Vector3 &vec1 );
+
+// Linear interpolation between two 3-D vectors (scalar data contained in vector data type)
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector3 lerp( const floatInVec &t, const Vector3 &vec0, const Vector3 &vec1 );
+
+// Spherical linear interpolation between two 3-D vectors
+// NOTE:
+// The result is unpredictable if the vectors point in opposite directions.
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector3 slerp( float t, const Vector3 &unitVec0, const Vector3 &unitVec1 );
+
+// Spherical linear interpolation between two 3-D vectors (scalar data contained in vector data type)
+// NOTE:
+// The result is unpredictable if the vectors point in opposite directions.
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector3 slerp( const floatInVec &t, const Vector3 &unitVec0, const Vector3 &unitVec1 );
+
+// Conditionally select between two 3-D vectors
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+// However, the transfer of select1 to a VMX register may use more processing time than a branch.
+// Use the boolInVec version for better performance.
+//
+VECTORMATH_FORCE_INLINE const Vector3 select( const Vector3 &vec0, const Vector3 &vec1, bool select1 );
+
+// Conditionally select between two 3-D vectors (scalar data contained in vector data type)
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+//
+VECTORMATH_FORCE_INLINE const Vector3 select( const Vector3 &vec0, const Vector3 &vec1, const boolInVec &select1 );
+
+// Store x, y, and z elements of 3-D vector in first three words of a quadword, preserving fourth word
+//
+VECTORMATH_FORCE_INLINE void storeXYZ( const Vector3 &vec, __m128 * quad );
+
+// Load four three-float 3-D vectors, stored in three quadwords
+//
+VECTORMATH_FORCE_INLINE void loadXYZArray( Vector3 & vec0, Vector3 & vec1, Vector3 & vec2, Vector3 & vec3, const __m128 * threeQuads );
+
+// Store four 3-D vectors in three quadwords
+//
+VECTORMATH_FORCE_INLINE void storeXYZArray( const Vector3 &vec0, const Vector3 &vec1, const Vector3 &vec2, const Vector3 &vec3, __m128 * threeQuads );
+
+// Store eight 3-D vectors as half-floats
+//
+VECTORMATH_FORCE_INLINE void storeHalfFloats( const Vector3 &vec0, const Vector3 &vec1, const Vector3 &vec2, const Vector3 &vec3, const Vector3 &vec4, const Vector3 &vec5, const Vector3 &vec6, const Vector3 &vec7, vec_ushort8 * threeQuads );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3-D vector
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Vector3 &vec );
+
+// Print a 3-D vector and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Vector3 &vec, const char * name );
+
+#endif
+
+// A 4-D vector in array-of-structures format
+//
+class Vector4
+{
+ __m128 mVec128;
+
+public:
+ // Default constructor; does no initialization
+ //
+ VECTORMATH_FORCE_INLINE Vector4( ) { };
+
+ // Construct a 4-D vector from x, y, z, and w elements
+ //
+ VECTORMATH_FORCE_INLINE Vector4( float x, float y, float z, float w );
+
+ // Construct a 4-D vector from x, y, z, and w elements (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4( const floatInVec &x, const floatInVec &y, const floatInVec &z, const floatInVec &w );
+
+ // Construct a 4-D vector from a 3-D vector and a scalar
+ //
+ VECTORMATH_FORCE_INLINE Vector4( const Vector3 &xyz, float w );
+
+ // Construct a 4-D vector from a 3-D vector and a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4( const Vector3 &xyz, const floatInVec &w );
+
+ // Copy x, y, and z from a 3-D vector into a 4-D vector, and set w to 0
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector4( const Vector3 &vec );
+
+ // Copy x, y, and z from a 3-D point into a 4-D vector, and set w to 1
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector4( const Point3 &pnt );
+
+ // Copy elements from a quaternion into a 4-D vector
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector4( const Quat &quat );
+
+ // Set all elements of a 4-D vector to the same scalar value
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector4( float scalar );
+
+ // Set all elements of a 4-D vector to the same scalar value (scalar data contained in vector data type)
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector4( const floatInVec &scalar );
+
+ // Set vector float data in a 4-D vector
+ //
+ explicit VECTORMATH_FORCE_INLINE Vector4( __m128 vf4 );
+
+ // Get vector float data from a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE __m128 get128( ) const;
+
+ // Assign one 4-D vector to another
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator =( const Vector4 &vec );
+
+ // Set the x, y, and z elements of a 4-D vector
+ // NOTE:
+ // This function does not change the w element.
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setXYZ( const Vector3 &vec );
+
+ // Get the x, y, and z elements of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getXYZ( ) const;
+
+ // Set the x element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setX( float x );
+
+ // Set the y element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setY( float y );
+
+ // Set the z element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setZ( float z );
+
+ // Set the w element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setW( float w );
+
+ // Set the x element of a 4-D vector (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setX( const floatInVec &x );
+
+ // Set the y element of a 4-D vector (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setY( const floatInVec &y );
+
+ // Set the z element of a 4-D vector (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setZ( const floatInVec &z );
+
+ // Set the w element of a 4-D vector (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setW( const floatInVec &w );
+
+ // Get the x element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getX( ) const;
+
+ // Get the y element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getY( ) const;
+
+ // Get the z element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getZ( ) const;
+
+ // Get the w element of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getW( ) const;
+
+ // Set an x, y, z, or w element of a 4-D vector by index
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setElem( int idx, float value );
+
+ // Set an x, y, z, or w element of a 4-D vector by index (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & setElem( int idx, const floatInVec &value );
+
+ // Get an x, y, z, or w element of a 4-D vector by index
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ VECTORMATH_FORCE_INLINE VecIdx operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec operator []( int idx ) const;
+
+ // Add two 4-D vectors
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator +( const Vector4 &vec ) const;
+
+ // Subtract a 4-D vector from another 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator -( const Vector4 &vec ) const;
+
+ // Multiply a 4-D vector by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator *( float scalar ) const;
+
+ // Divide a 4-D vector by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator /( float scalar ) const;
+
+ // Multiply a 4-D vector by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator *( const floatInVec &scalar ) const;
+
+ // Divide a 4-D vector by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator /( const floatInVec &scalar ) const;
+
+ // Perform compound assignment and addition with a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator +=( const Vector4 &vec );
+
+ // Perform compound assignment and subtraction by a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator -=( const Vector4 &vec );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator *=( float scalar );
+
+ // Perform compound assignment and division by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator /=( float scalar );
+
+ // Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator *=( const floatInVec &scalar );
+
+ // Perform compound assignment and division by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator /=( const floatInVec &scalar );
+
+ // Negate all elements of a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator -( ) const;
+
+ // Construct x axis
+ //
+ static VECTORMATH_FORCE_INLINE const Vector4 xAxis( );
+
+ // Construct y axis
+ //
+ static VECTORMATH_FORCE_INLINE const Vector4 yAxis( );
+
+ // Construct z axis
+ //
+ static VECTORMATH_FORCE_INLINE const Vector4 zAxis( );
+
+ // Construct w axis
+ //
+ static VECTORMATH_FORCE_INLINE const Vector4 wAxis( );
+
+};
+
+// Multiply a 4-D vector by a scalar
+//
+VECTORMATH_FORCE_INLINE const Vector4 operator *( float scalar, const Vector4 &vec );
+
+// Multiply a 4-D vector by a scalar (scalar data contained in vector data type)
+//
+VECTORMATH_FORCE_INLINE const Vector4 operator *( const floatInVec &scalar, const Vector4 &vec );
+
+// Multiply two 4-D vectors per element
+//
+VECTORMATH_FORCE_INLINE const Vector4 mulPerElem( const Vector4 &vec0, const Vector4 &vec1 );
+
+// Divide two 4-D vectors per element
+// NOTE:
+// Floating-point behavior matches standard library function divf4.
+//
+VECTORMATH_FORCE_INLINE const Vector4 divPerElem( const Vector4 &vec0, const Vector4 &vec1 );
+
+// Compute the reciprocal of a 4-D vector per element
+// NOTE:
+// Floating-point behavior matches standard library function recipf4.
+//
+VECTORMATH_FORCE_INLINE const Vector4 recipPerElem( const Vector4 &vec );
+
+// Compute the absolute value of a 4-D vector per element
+//
+VECTORMATH_FORCE_INLINE const Vector4 absPerElem( const Vector4 &vec );
+
+// Copy sign from one 4-D vector to another, per element
+//
+VECTORMATH_FORCE_INLINE const Vector4 copySignPerElem( const Vector4 &vec0, const Vector4 &vec1 );
+
+// Maximum of two 4-D vectors per element
+//
+VECTORMATH_FORCE_INLINE const Vector4 maxPerElem( const Vector4 &vec0, const Vector4 &vec1 );
+
+// Minimum of two 4-D vectors per element
+//
+VECTORMATH_FORCE_INLINE const Vector4 minPerElem( const Vector4 &vec0, const Vector4 &vec1 );
+
+// Maximum element of a 4-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec maxElem( const Vector4 &vec );
+
+// Minimum element of a 4-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec minElem( const Vector4 &vec );
+
+// Compute the sum of all elements of a 4-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec sum( const Vector4 &vec );
+
+// Compute the dot product of two 4-D vectors
+//
+VECTORMATH_FORCE_INLINE const floatInVec dot( const Vector4 &vec0, const Vector4 &vec1 );
+
+// Compute the square of the length of a 4-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec lengthSqr( const Vector4 &vec );
+
+// Compute the length of a 4-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec length( const Vector4 &vec );
+
+// Normalize a 4-D vector
+// NOTE:
+// The result is unpredictable when all elements of vec are at or near zero.
+//
+VECTORMATH_FORCE_INLINE const Vector4 normalize( const Vector4 &vec );
+
+// Outer product of two 4-D vectors
+//
+VECTORMATH_FORCE_INLINE const Matrix4 outer( const Vector4 &vec0, const Vector4 &vec1 );
+
+// Linear interpolation between two 4-D vectors
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector4 lerp( float t, const Vector4 &vec0, const Vector4 &vec1 );
+
+// Linear interpolation between two 4-D vectors (scalar data contained in vector data type)
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector4 lerp( const floatInVec &t, const Vector4 &vec0, const Vector4 &vec1 );
+
+// Spherical linear interpolation between two 4-D vectors
+// NOTE:
+// The result is unpredictable if the vectors point in opposite directions.
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector4 slerp( float t, const Vector4 &unitVec0, const Vector4 &unitVec1 );
+
+// Spherical linear interpolation between two 4-D vectors (scalar data contained in vector data type)
+// NOTE:
+// The result is unpredictable if the vectors point in opposite directions.
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Vector4 slerp( const floatInVec &t, const Vector4 &unitVec0, const Vector4 &unitVec1 );
+
+// Conditionally select between two 4-D vectors
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+// However, the transfer of select1 to a VMX register may use more processing time than a branch.
+// Use the boolInVec version for better performance.
+//
+VECTORMATH_FORCE_INLINE const Vector4 select( const Vector4 &vec0, const Vector4 &vec1, bool select1 );
+
+// Conditionally select between two 4-D vectors (scalar data contained in vector data type)
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+//
+VECTORMATH_FORCE_INLINE const Vector4 select( const Vector4 &vec0, const Vector4 &vec1, const boolInVec &select1 );
+
+// Store four 4-D vectors as half-floats
+//
+VECTORMATH_FORCE_INLINE void storeHalfFloats( const Vector4 &vec0, const Vector4 &vec1, const Vector4 &vec2, const Vector4 &vec3, vec_ushort8 * twoQuads );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 4-D vector
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Vector4 &vec );
+
+// Print a 4-D vector and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Vector4 &vec, const char * name );
+
+#endif
+
+// A 3-D point in array-of-structures format
+//
+class Point3
+{
+ __m128 mVec128;
+
+public:
+ // Default constructor; does no initialization
+ //
+ VECTORMATH_FORCE_INLINE Point3( ) { };
+
+ // Construct a 3-D point from x, y, and z elements
+ //
+ VECTORMATH_FORCE_INLINE Point3( float x, float y, float z );
+
+ // Construct a 3-D point from x, y, and z elements (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Point3( const floatInVec &x, const floatInVec &y, const floatInVec &z );
+
+ // Copy elements from a 3-D vector into a 3-D point
+ //
+ explicit VECTORMATH_FORCE_INLINE Point3( const Vector3 &vec );
+
+ // Set all elements of a 3-D point to the same scalar value
+ //
+ explicit VECTORMATH_FORCE_INLINE Point3( float scalar );
+
+ // Set all elements of a 3-D point to the same scalar value (scalar data contained in vector data type)
+ //
+ explicit VECTORMATH_FORCE_INLINE Point3( const floatInVec &scalar );
+
+ // Set vector float data in a 3-D point
+ //
+ explicit VECTORMATH_FORCE_INLINE Point3( __m128 vf4 );
+
+ // Get vector float data from a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE __m128 get128( ) const;
+
+ // Assign one 3-D point to another
+ //
+ VECTORMATH_FORCE_INLINE Point3 & operator =( const Point3 &pnt );
+
+ // Set the x element of a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setX( float x );
+
+ // Set the y element of a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setY( float y );
+
+ // Set the z element of a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setZ( float z );
+
+ // Set the x element of a 3-D point (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setX( const floatInVec &x );
+
+ // Set the y element of a 3-D point (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setY( const floatInVec &y );
+
+ // Set the z element of a 3-D point (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setZ( const floatInVec &z );
+
+ // Get the x element of a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getX( ) const;
+
+ // Get the y element of a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getY( ) const;
+
+ // Get the z element of a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getZ( ) const;
+
+ // Set an x, y, or z element of a 3-D point by index
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setElem( int idx, float value );
+
+ // Set an x, y, or z element of a 3-D point by index (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Point3 & setElem( int idx, const floatInVec &value );
+
+ // Get an x, y, or z element of a 3-D point by index
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ VECTORMATH_FORCE_INLINE VecIdx operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec operator []( int idx ) const;
+
+ // Subtract a 3-D point from another 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator -( const Point3 &pnt ) const;
+
+ // Add a 3-D point to a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Point3 operator +( const Vector3 &vec ) const;
+
+ // Subtract a 3-D vector from a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const Point3 operator -( const Vector3 &vec ) const;
+
+ // Perform compound assignment and addition with a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Point3 & operator +=( const Vector3 &vec );
+
+ // Perform compound assignment and subtraction by a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Point3 & operator -=( const Vector3 &vec );
+
+};
+
+// Multiply two 3-D points per element
+//
+VECTORMATH_FORCE_INLINE const Point3 mulPerElem( const Point3 &pnt0, const Point3 &pnt1 );
+
+// Divide two 3-D points per element
+// NOTE:
+// Floating-point behavior matches standard library function divf4.
+//
+VECTORMATH_FORCE_INLINE const Point3 divPerElem( const Point3 &pnt0, const Point3 &pnt1 );
+
+// Compute the reciprocal of a 3-D point per element
+// NOTE:
+// Floating-point behavior matches standard library function recipf4.
+//
+VECTORMATH_FORCE_INLINE const Point3 recipPerElem( const Point3 &pnt );
+
+// Compute the absolute value of a 3-D point per element
+//
+VECTORMATH_FORCE_INLINE const Point3 absPerElem( const Point3 &pnt );
+
+// Copy sign from one 3-D point to another, per element
+//
+VECTORMATH_FORCE_INLINE const Point3 copySignPerElem( const Point3 &pnt0, const Point3 &pnt1 );
+
+// Maximum of two 3-D points per element
+//
+VECTORMATH_FORCE_INLINE const Point3 maxPerElem( const Point3 &pnt0, const Point3 &pnt1 );
+
+// Minimum of two 3-D points per element
+//
+VECTORMATH_FORCE_INLINE const Point3 minPerElem( const Point3 &pnt0, const Point3 &pnt1 );
+
+// Maximum element of a 3-D point
+//
+VECTORMATH_FORCE_INLINE const floatInVec maxElem( const Point3 &pnt );
+
+// Minimum element of a 3-D point
+//
+VECTORMATH_FORCE_INLINE const floatInVec minElem( const Point3 &pnt );
+
+// Compute the sum of all elements of a 3-D point
+//
+VECTORMATH_FORCE_INLINE const floatInVec sum( const Point3 &pnt );
+
+// Apply uniform scale to a 3-D point
+//
+VECTORMATH_FORCE_INLINE const Point3 scale( const Point3 &pnt, float scaleVal );
+
+// Apply uniform scale to a 3-D point (scalar data contained in vector data type)
+//
+VECTORMATH_FORCE_INLINE const Point3 scale( const Point3 &pnt, const floatInVec &scaleVal );
+
+// Apply non-uniform scale to a 3-D point
+//
+VECTORMATH_FORCE_INLINE const Point3 scale( const Point3 &pnt, const Vector3 &scaleVec );
+
+// Scalar projection of a 3-D point on a unit-length 3-D vector
+//
+VECTORMATH_FORCE_INLINE const floatInVec projection( const Point3 &pnt, const Vector3 &unitVec );
+
+// Compute the square of the distance of a 3-D point from the coordinate-system origin
+//
+VECTORMATH_FORCE_INLINE const floatInVec distSqrFromOrigin( const Point3 &pnt );
+
+// Compute the distance of a 3-D point from the coordinate-system origin
+//
+VECTORMATH_FORCE_INLINE const floatInVec distFromOrigin( const Point3 &pnt );
+
+// Compute the square of the distance between two 3-D points
+//
+VECTORMATH_FORCE_INLINE const floatInVec distSqr( const Point3 &pnt0, const Point3 &pnt1 );
+
+// Compute the distance between two 3-D points
+//
+VECTORMATH_FORCE_INLINE const floatInVec dist( const Point3 &pnt0, const Point3 &pnt1 );
+
+// Linear interpolation between two 3-D points
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Point3 lerp( float t, const Point3 &pnt0, const Point3 &pnt1 );
+
+// Linear interpolation between two 3-D points (scalar data contained in vector data type)
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Point3 lerp( const floatInVec &t, const Point3 &pnt0, const Point3 &pnt1 );
+
+// Conditionally select between two 3-D points
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+// However, the transfer of select1 to a VMX register may use more processing time than a branch.
+// Use the boolInVec version for better performance.
+//
+VECTORMATH_FORCE_INLINE const Point3 select( const Point3 &pnt0, const Point3 &pnt1, bool select1 );
+
+// Conditionally select between two 3-D points (scalar data contained in vector data type)
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+//
+VECTORMATH_FORCE_INLINE const Point3 select( const Point3 &pnt0, const Point3 &pnt1, const boolInVec &select1 );
+
+// Store x, y, and z elements of 3-D point in first three words of a quadword, preserving fourth word
+//
+VECTORMATH_FORCE_INLINE void storeXYZ( const Point3 &pnt, __m128 * quad );
+
+// Load four three-float 3-D points, stored in three quadwords
+//
+VECTORMATH_FORCE_INLINE void loadXYZArray( Point3 & pnt0, Point3 & pnt1, Point3 & pnt2, Point3 & pnt3, const __m128 * threeQuads );
+
+// Store four 3-D points in three quadwords
+//
+VECTORMATH_FORCE_INLINE void storeXYZArray( const Point3 &pnt0, const Point3 &pnt1, const Point3 &pnt2, const Point3 &pnt3, __m128 * threeQuads );
+
+// Store eight 3-D points as half-floats
+//
+VECTORMATH_FORCE_INLINE void storeHalfFloats( const Point3 &pnt0, const Point3 &pnt1, const Point3 &pnt2, const Point3 &pnt3, const Point3 &pnt4, const Point3 &pnt5, const Point3 &pnt6, const Point3 &pnt7, vec_ushort8 * threeQuads );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3-D point
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Point3 &pnt );
+
+// Print a 3-D point and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Point3 &pnt, const char * name );
+
+#endif
+
+// A quaternion in array-of-structures format
+//
+class Quat
+{
+ __m128 mVec128;
+
+public:
+ // Default constructor; does no initialization
+ //
+ VECTORMATH_FORCE_INLINE Quat( ) { };
+
+ VECTORMATH_FORCE_INLINE Quat(const Quat& quat);
+
+ // Construct a quaternion from x, y, z, and w elements
+ //
+ VECTORMATH_FORCE_INLINE Quat( float x, float y, float z, float w );
+
+ // Construct a quaternion from x, y, z, and w elements (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat( const floatInVec &x, const floatInVec &y, const floatInVec &z, const floatInVec &w );
+
+ // Construct a quaternion from a 3-D vector and a scalar
+ //
+ VECTORMATH_FORCE_INLINE Quat( const Vector3 &xyz, float w );
+
+ // Construct a quaternion from a 3-D vector and a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat( const Vector3 &xyz, const floatInVec &w );
+
+ // Copy elements from a 4-D vector into a quaternion
+ //
+ explicit VECTORMATH_FORCE_INLINE Quat( const Vector4 &vec );
+
+ // Convert a rotation matrix to a unit-length quaternion
+ //
+ explicit VECTORMATH_FORCE_INLINE Quat( const Matrix3 & rotMat );
+
+ // Set all elements of a quaternion to the same scalar value
+ //
+ explicit VECTORMATH_FORCE_INLINE Quat( float scalar );
+
+ // Set all elements of a quaternion to the same scalar value (scalar data contained in vector data type)
+ //
+ explicit VECTORMATH_FORCE_INLINE Quat( const floatInVec &scalar );
+
+ // Set vector float data in a quaternion
+ //
+ explicit VECTORMATH_FORCE_INLINE Quat( __m128 vf4 );
+
+ // Get vector float data from a quaternion
+ //
+ VECTORMATH_FORCE_INLINE __m128 get128( ) const;
+
+ // Set a quaterion from vector float data
+ //
+ VECTORMATH_FORCE_INLINE void set128(vec_float4 vec);
+
+ // Assign one quaternion to another
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator =( const Quat &quat );
+
+ // Set the x, y, and z elements of a quaternion
+ // NOTE:
+ // This function does not change the w element.
+ //
+ VECTORMATH_FORCE_INLINE Quat & setXYZ( const Vector3 &vec );
+
+ // Get the x, y, and z elements of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getXYZ( ) const;
+
+ // Set the x element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE Quat & setX( float x );
+
+ // Set the y element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE Quat & setY( float y );
+
+ // Set the z element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE Quat & setZ( float z );
+
+ // Set the w element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE Quat & setW( float w );
+
+ // Set the x element of a quaternion (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat & setX( const floatInVec &x );
+
+ // Set the y element of a quaternion (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat & setY( const floatInVec &y );
+
+ // Set the z element of a quaternion (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat & setZ( const floatInVec &z );
+
+ // Set the w element of a quaternion (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat & setW( const floatInVec &w );
+
+ // Get the x element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getX( ) const;
+
+ // Get the y element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getY( ) const;
+
+ // Get the z element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getZ( ) const;
+
+ // Get the w element of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getW( ) const;
+
+ // Set an x, y, z, or w element of a quaternion by index
+ //
+ VECTORMATH_FORCE_INLINE Quat & setElem( int idx, float value );
+
+ // Set an x, y, z, or w element of a quaternion by index (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat & setElem( int idx, const floatInVec &value );
+
+ // Get an x, y, z, or w element of a quaternion by index
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getElem( int idx ) const;
+
+ // Subscripting operator to set or get an element
+ //
+ VECTORMATH_FORCE_INLINE VecIdx operator []( int idx );
+
+ // Subscripting operator to get an element
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec operator []( int idx ) const;
+
+ // Add two quaternions
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator +( const Quat &quat ) const;
+
+ // Subtract a quaternion from another quaternion
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator -( const Quat &quat ) const;
+
+ // Multiply two quaternions
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator *( const Quat &quat ) const;
+
+ // Multiply a quaternion by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator *( float scalar ) const;
+
+ // Divide a quaternion by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator /( float scalar ) const;
+
+ // Multiply a quaternion by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator *( const floatInVec &scalar ) const;
+
+ // Divide a quaternion by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator /( const floatInVec &scalar ) const;
+
+ // Perform compound assignment and addition with a quaternion
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator +=( const Quat &quat );
+
+ // Perform compound assignment and subtraction by a quaternion
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator -=( const Quat &quat );
+
+ // Perform compound assignment and multiplication by a quaternion
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator *=( const Quat &quat );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator *=( float scalar );
+
+ // Perform compound assignment and division by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator /=( float scalar );
+
+ // Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator *=( const floatInVec &scalar );
+
+ // Perform compound assignment and division by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Quat & operator /=( const floatInVec &scalar );
+
+ // Negate all elements of a quaternion
+ //
+ VECTORMATH_FORCE_INLINE const Quat operator -( ) const;
+
+ // Construct an identity quaternion
+ //
+ static VECTORMATH_FORCE_INLINE const Quat identity( );
+
+ // Construct a quaternion to rotate between two unit-length 3-D vectors
+ // NOTE:
+ // The result is unpredictable if unitVec0 and unitVec1 point in opposite directions.
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotation( const Vector3 &unitVec0, const Vector3 &unitVec1 );
+
+ // Construct a quaternion to rotate around a unit-length 3-D vector
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotation( float radians, const Vector3 &unitVec );
+
+ // Construct a quaternion to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotation( const floatInVec &radians, const Vector3 &unitVec );
+
+ // Construct a quaternion to rotate around the x axis
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotationX( float radians );
+
+ // Construct a quaternion to rotate around the y axis
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotationY( float radians );
+
+ // Construct a quaternion to rotate around the z axis
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotationZ( float radians );
+
+ // Construct a quaternion to rotate around the x axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotationX( const floatInVec &radians );
+
+ // Construct a quaternion to rotate around the y axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotationY( const floatInVec &radians );
+
+ // Construct a quaternion to rotate around the z axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Quat rotationZ( const floatInVec &radians );
+
+};
+
+// Multiply a quaternion by a scalar
+//
+VECTORMATH_FORCE_INLINE const Quat operator *( float scalar, const Quat &quat );
+
+// Multiply a quaternion by a scalar (scalar data contained in vector data type)
+//
+VECTORMATH_FORCE_INLINE const Quat operator *( const floatInVec &scalar, const Quat &quat );
+
+// Compute the conjugate of a quaternion
+//
+VECTORMATH_FORCE_INLINE const Quat conj( const Quat &quat );
+
+// Use a unit-length quaternion to rotate a 3-D vector
+//
+VECTORMATH_FORCE_INLINE const Vector3 rotate( const Quat &unitQuat, const Vector3 &vec );
+
+// Compute the dot product of two quaternions
+//
+VECTORMATH_FORCE_INLINE const floatInVec dot( const Quat &quat0, const Quat &quat1 );
+
+// Compute the norm of a quaternion
+//
+VECTORMATH_FORCE_INLINE const floatInVec norm( const Quat &quat );
+
+// Compute the length of a quaternion
+//
+VECTORMATH_FORCE_INLINE const floatInVec length( const Quat &quat );
+
+// Normalize a quaternion
+// NOTE:
+// The result is unpredictable when all elements of quat are at or near zero.
+//
+VECTORMATH_FORCE_INLINE const Quat normalize( const Quat &quat );
+
+// Linear interpolation between two quaternions
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Quat lerp( float t, const Quat &quat0, const Quat &quat1 );
+
+// Linear interpolation between two quaternions (scalar data contained in vector data type)
+// NOTE:
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Quat lerp( const floatInVec &t, const Quat &quat0, const Quat &quat1 );
+
+// Spherical linear interpolation between two quaternions
+// NOTE:
+// Interpolates along the shortest path between orientations.
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Quat slerp( float t, const Quat &unitQuat0, const Quat &unitQuat1 );
+
+// Spherical linear interpolation between two quaternions (scalar data contained in vector data type)
+// NOTE:
+// Interpolates along the shortest path between orientations.
+// Does not clamp t between 0 and 1.
+//
+VECTORMATH_FORCE_INLINE const Quat slerp( const floatInVec &t, const Quat &unitQuat0, const Quat &unitQuat1 );
+
+// Spherical quadrangle interpolation
+//
+VECTORMATH_FORCE_INLINE const Quat squad( float t, const Quat &unitQuat0, const Quat &unitQuat1, const Quat &unitQuat2, const Quat &unitQuat3 );
+
+// Spherical quadrangle interpolation (scalar data contained in vector data type)
+//
+VECTORMATH_FORCE_INLINE const Quat squad( const floatInVec &t, const Quat &unitQuat0, const Quat &unitQuat1, const Quat &unitQuat2, const Quat &unitQuat3 );
+
+// Conditionally select between two quaternions
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+// However, the transfer of select1 to a VMX register may use more processing time than a branch.
+// Use the boolInVec version for better performance.
+//
+VECTORMATH_FORCE_INLINE const Quat select( const Quat &quat0, const Quat &quat1, bool select1 );
+
+// Conditionally select between two quaternions (scalar data contained in vector data type)
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+//
+VECTORMATH_FORCE_INLINE const Quat select( const Quat &quat0, const Quat &quat1, const boolInVec &select1 );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a quaternion
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Quat &quat );
+
+// Print a quaternion and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Quat &quat, const char * name );
+
+#endif
+
+// A 3x3 matrix in array-of-structures format
+//
+class Matrix3
+{
+ Vector3 mCol0;
+ Vector3 mCol1;
+ Vector3 mCol2;
+
+public:
+ // Default constructor; does no initialization
+ //
+ VECTORMATH_FORCE_INLINE Matrix3( ) { };
+
+ // Copy a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix3( const Matrix3 & mat );
+
+ // Construct a 3x3 matrix containing the specified columns
+ //
+ VECTORMATH_FORCE_INLINE Matrix3( const Vector3 &col0, const Vector3 &col1, const Vector3 &col2 );
+
+ // Construct a 3x3 rotation matrix from a unit-length quaternion
+ //
+ explicit VECTORMATH_FORCE_INLINE Matrix3( const Quat &unitQuat );
+
+ // Set all elements of a 3x3 matrix to the same scalar value
+ //
+ explicit VECTORMATH_FORCE_INLINE Matrix3( float scalar );
+
+ // Set all elements of a 3x3 matrix to the same scalar value (scalar data contained in vector data type)
+ //
+ explicit VECTORMATH_FORCE_INLINE Matrix3( const floatInVec &scalar );
+
+ // Assign one 3x3 matrix to another
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & operator =( const Matrix3 & mat );
+
+ // Set column 0 of a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & setCol0( const Vector3 &col0 );
+
+ // Set column 1 of a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & setCol1( const Vector3 &col1 );
+
+ // Set column 2 of a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & setCol2( const Vector3 &col2 );
+
+ // Get column 0 of a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol0( ) const;
+
+ // Get column 1 of a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol1( ) const;
+
+ // Get column 2 of a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol2( ) const;
+
+ // Set the column of a 3x3 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & setCol( int col, const Vector3 &vec );
+
+ // Set the row of a 3x3 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & setRow( int row, const Vector3 &vec );
+
+ // Get the column of a 3x3 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol( int col ) const;
+
+ // Get the row of a 3x3 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getRow( int row ) const;
+
+ // Subscripting operator to set or get a column
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator []( int col );
+
+ // Subscripting operator to get a column
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator []( int col ) const;
+
+ // Set the element of a 3x3 matrix referred to by column and row indices
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & setElem( int col, int row, float val );
+
+ // Set the element of a 3x3 matrix referred to by column and row indices (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & setElem( int col, int row, const floatInVec &val );
+
+ // Get the element of a 3x3 matrix referred to by column and row indices
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getElem( int col, int row ) const;
+
+ // Add two 3x3 matrices
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 operator +( const Matrix3 & mat ) const;
+
+ // Subtract a 3x3 matrix from another 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 operator -( const Matrix3 & mat ) const;
+
+ // Negate all elements of a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 operator -( ) const;
+
+ // Multiply a 3x3 matrix by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 operator *( float scalar ) const;
+
+ // Multiply a 3x3 matrix by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 operator *( const floatInVec &scalar ) const;
+
+ // Multiply a 3x3 matrix by a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator *( const Vector3 &vec ) const;
+
+ // Multiply two 3x3 matrices
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 operator *( const Matrix3 & mat ) const;
+
+ // Perform compound assignment and addition with a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & operator +=( const Matrix3 & mat );
+
+ // Perform compound assignment and subtraction by a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & operator -=( const Matrix3 & mat );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & operator *=( float scalar );
+
+ // Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & operator *=( const floatInVec &scalar );
+
+ // Perform compound assignment and multiplication by a 3x3 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix3 & operator *=( const Matrix3 & mat );
+
+ // Construct an identity 3x3 matrix
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 identity( );
+
+ // Construct a 3x3 matrix to rotate around the x axis
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotationX( float radians );
+
+ // Construct a 3x3 matrix to rotate around the y axis
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotationY( float radians );
+
+ // Construct a 3x3 matrix to rotate around the z axis
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotationZ( float radians );
+
+ // Construct a 3x3 matrix to rotate around the x axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotationX( const floatInVec &radians );
+
+ // Construct a 3x3 matrix to rotate around the y axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotationY( const floatInVec &radians );
+
+ // Construct a 3x3 matrix to rotate around the z axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotationZ( const floatInVec &radians );
+
+ // Construct a 3x3 matrix to rotate around the x, y, and z axes
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotationZYX( const Vector3 &radiansXYZ );
+
+ // Construct a 3x3 matrix to rotate around a unit-length 3-D vector
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotation( float radians, const Vector3 &unitVec );
+
+ // Construct a 3x3 matrix to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotation( const floatInVec &radians, const Vector3 &unitVec );
+
+ // Construct a rotation matrix from a unit-length quaternion
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 rotation( const Quat &unitQuat );
+
+ // Construct a 3x3 matrix to perform scaling
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix3 scale( const Vector3 &scaleVec );
+
+};
+// Multiply a 3x3 matrix by a scalar
+//
+VECTORMATH_FORCE_INLINE const Matrix3 operator *( float scalar, const Matrix3 & mat );
+
+// Multiply a 3x3 matrix by a scalar (scalar data contained in vector data type)
+//
+VECTORMATH_FORCE_INLINE const Matrix3 operator *( const floatInVec &scalar, const Matrix3 & mat );
+
+// Append (post-multiply) a scale transformation to a 3x3 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+VECTORMATH_FORCE_INLINE const Matrix3 appendScale( const Matrix3 & mat, const Vector3 &scaleVec );
+
+// Prepend (pre-multiply) a scale transformation to a 3x3 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+VECTORMATH_FORCE_INLINE const Matrix3 prependScale( const Vector3 &scaleVec, const Matrix3 & mat );
+
+// Multiply two 3x3 matrices per element
+//
+VECTORMATH_FORCE_INLINE const Matrix3 mulPerElem( const Matrix3 & mat0, const Matrix3 & mat1 );
+
+// Compute the absolute value of a 3x3 matrix per element
+//
+VECTORMATH_FORCE_INLINE const Matrix3 absPerElem( const Matrix3 & mat );
+
+// Transpose of a 3x3 matrix
+//
+VECTORMATH_FORCE_INLINE const Matrix3 transpose( const Matrix3 & mat );
+
+// Compute the inverse of a 3x3 matrix
+// NOTE:
+// Result is unpredictable when the determinant of mat is equal to or near 0.
+//
+VECTORMATH_FORCE_INLINE const Matrix3 inverse( const Matrix3 & mat );
+
+// Determinant of a 3x3 matrix
+//
+VECTORMATH_FORCE_INLINE const floatInVec determinant( const Matrix3 & mat );
+
+// Conditionally select between two 3x3 matrices
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+// However, the transfer of select1 to a VMX register may use more processing time than a branch.
+// Use the boolInVec version for better performance.
+//
+VECTORMATH_FORCE_INLINE const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, bool select1 );
+
+// Conditionally select between two 3x3 matrices (scalar data contained in vector data type)
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+//
+VECTORMATH_FORCE_INLINE const Matrix3 select( const Matrix3 & mat0, const Matrix3 & mat1, const boolInVec &select1 );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3x3 matrix
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Matrix3 & mat );
+
+// Print a 3x3 matrix and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Matrix3 & mat, const char * name );
+
+#endif
+
+// A 4x4 matrix in array-of-structures format
+//
+class Matrix4
+{
+ Vector4 mCol0;
+ Vector4 mCol1;
+ Vector4 mCol2;
+ Vector4 mCol3;
+
+public:
+ // Default constructor; does no initialization
+ //
+ VECTORMATH_FORCE_INLINE Matrix4( ) { };
+
+ // Copy a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4( const Matrix4 & mat );
+
+ // Construct a 4x4 matrix containing the specified columns
+ //
+ VECTORMATH_FORCE_INLINE Matrix4( const Vector4 &col0, const Vector4 &col1, const Vector4 &col2, const Vector4 &col3 );
+
+ // Construct a 4x4 matrix from a 3x4 transformation matrix
+ //
+ explicit VECTORMATH_FORCE_INLINE Matrix4( const Transform3 & mat );
+
+ // Construct a 4x4 matrix from a 3x3 matrix and a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Matrix4( const Matrix3 & mat, const Vector3 &translateVec );
+
+ // Construct a 4x4 matrix from a unit-length quaternion and a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Matrix4( const Quat &unitQuat, const Vector3 &translateVec );
+
+ // Set all elements of a 4x4 matrix to the same scalar value
+ //
+ explicit VECTORMATH_FORCE_INLINE Matrix4( float scalar );
+
+ // Set all elements of a 4x4 matrix to the same scalar value (scalar data contained in vector data type)
+ //
+ explicit VECTORMATH_FORCE_INLINE Matrix4( const floatInVec &scalar );
+
+ // Assign one 4x4 matrix to another
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & operator =( const Matrix4 & mat );
+
+ // Set the upper-left 3x3 submatrix
+ // NOTE:
+ // This function does not change the bottom row elements.
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setUpper3x3( const Matrix3 & mat3 );
+
+ // Get the upper-left 3x3 submatrix of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 getUpper3x3( ) const;
+
+ // Set translation component
+ // NOTE:
+ // This function does not change the bottom row elements.
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setTranslation( const Vector3 &translateVec );
+
+ // Get the translation component of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getTranslation( ) const;
+
+ // Set column 0 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setCol0( const Vector4 &col0 );
+
+ // Set column 1 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setCol1( const Vector4 &col1 );
+
+ // Set column 2 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setCol2( const Vector4 &col2 );
+
+ // Set column 3 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setCol3( const Vector4 &col3 );
+
+ // Get column 0 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 getCol0( ) const;
+
+ // Get column 1 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 getCol1( ) const;
+
+ // Get column 2 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 getCol2( ) const;
+
+ // Get column 3 of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 getCol3( ) const;
+
+ // Set the column of a 4x4 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setCol( int col, const Vector4 &vec );
+
+ // Set the row of a 4x4 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setRow( int row, const Vector4 &vec );
+
+ // Get the column of a 4x4 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 getCol( int col ) const;
+
+ // Get the row of a 4x4 matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 getRow( int row ) const;
+
+ // Subscripting operator to set or get a column
+ //
+ VECTORMATH_FORCE_INLINE Vector4 & operator []( int col );
+
+ // Subscripting operator to get a column
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator []( int col ) const;
+
+ // Set the element of a 4x4 matrix referred to by column and row indices
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setElem( int col, int row, float val );
+
+ // Set the element of a 4x4 matrix referred to by column and row indices (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & setElem( int col, int row, const floatInVec &val );
+
+ // Get the element of a 4x4 matrix referred to by column and row indices
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getElem( int col, int row ) const;
+
+ // Add two 4x4 matrices
+ //
+ VECTORMATH_FORCE_INLINE const Matrix4 operator +( const Matrix4 & mat ) const;
+
+ // Subtract a 4x4 matrix from another 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Matrix4 operator -( const Matrix4 & mat ) const;
+
+ // Negate all elements of a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE const Matrix4 operator -( ) const;
+
+ // Multiply a 4x4 matrix by a scalar
+ //
+ VECTORMATH_FORCE_INLINE const Matrix4 operator *( float scalar ) const;
+
+ // Multiply a 4x4 matrix by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE const Matrix4 operator *( const floatInVec &scalar ) const;
+
+ // Multiply a 4x4 matrix by a 4-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator *( const Vector4 &vec ) const;
+
+ // Multiply a 4x4 matrix by a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator *( const Vector3 &vec ) const;
+
+ // Multiply a 4x4 matrix by a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 operator *( const Point3 &pnt ) const;
+
+ // Multiply two 4x4 matrices
+ //
+ VECTORMATH_FORCE_INLINE const Matrix4 operator *( const Matrix4 & mat ) const;
+
+ // Multiply a 4x4 matrix by a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE const Matrix4 operator *( const Transform3 & tfrm ) const;
+
+ // Perform compound assignment and addition with a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & operator +=( const Matrix4 & mat );
+
+ // Perform compound assignment and subtraction by a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & operator -=( const Matrix4 & mat );
+
+ // Perform compound assignment and multiplication by a scalar
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & operator *=( float scalar );
+
+ // Perform compound assignment and multiplication by a scalar (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & operator *=( const floatInVec &scalar );
+
+ // Perform compound assignment and multiplication by a 4x4 matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & operator *=( const Matrix4 & mat );
+
+ // Perform compound assignment and multiplication by a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE Matrix4 & operator *=( const Transform3 & tfrm );
+
+ // Construct an identity 4x4 matrix
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 identity( );
+
+ // Construct a 4x4 matrix to rotate around the x axis
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotationX( float radians );
+
+ // Construct a 4x4 matrix to rotate around the y axis
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotationY( float radians );
+
+ // Construct a 4x4 matrix to rotate around the z axis
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotationZ( float radians );
+
+ // Construct a 4x4 matrix to rotate around the x axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotationX( const floatInVec &radians );
+
+ // Construct a 4x4 matrix to rotate around the y axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotationY( const floatInVec &radians );
+
+ // Construct a 4x4 matrix to rotate around the z axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotationZ( const floatInVec &radians );
+
+ // Construct a 4x4 matrix to rotate around the x, y, and z axes
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotationZYX( const Vector3 &radiansXYZ );
+
+ // Construct a 4x4 matrix to rotate around a unit-length 3-D vector
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotation( float radians, const Vector3 &unitVec );
+
+ // Construct a 4x4 matrix to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotation( const floatInVec &radians, const Vector3 &unitVec );
+
+ // Construct a rotation matrix from a unit-length quaternion
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 rotation( const Quat &unitQuat );
+
+ // Construct a 4x4 matrix to perform scaling
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 scale( const Vector3 &scaleVec );
+
+ // Construct a 4x4 matrix to perform translation
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 translation( const Vector3 &translateVec );
+
+ // Construct viewing matrix based on eye, position looked at, and up direction
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 lookAt( const Point3 &eyePos, const Point3 &lookAtPos, const Vector3 &upVec );
+
+ // Construct a perspective projection matrix
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 perspective( float fovyRadians, float aspect, float zNear, float zFar );
+
+ // Construct a perspective projection matrix based on frustum
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 frustum( float left, float right, float bottom, float top, float zNear, float zFar );
+
+ // Construct an orthographic projection matrix
+ //
+ static VECTORMATH_FORCE_INLINE const Matrix4 orthographic( float left, float right, float bottom, float top, float zNear, float zFar );
+
+};
+// Multiply a 4x4 matrix by a scalar
+//
+VECTORMATH_FORCE_INLINE const Matrix4 operator *( float scalar, const Matrix4 & mat );
+
+// Multiply a 4x4 matrix by a scalar (scalar data contained in vector data type)
+//
+VECTORMATH_FORCE_INLINE const Matrix4 operator *( const floatInVec &scalar, const Matrix4 & mat );
+
+// Append (post-multiply) a scale transformation to a 4x4 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+VECTORMATH_FORCE_INLINE const Matrix4 appendScale( const Matrix4 & mat, const Vector3 &scaleVec );
+
+// Prepend (pre-multiply) a scale transformation to a 4x4 matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+VECTORMATH_FORCE_INLINE const Matrix4 prependScale( const Vector3 &scaleVec, const Matrix4 & mat );
+
+// Multiply two 4x4 matrices per element
+//
+VECTORMATH_FORCE_INLINE const Matrix4 mulPerElem( const Matrix4 & mat0, const Matrix4 & mat1 );
+
+// Compute the absolute value of a 4x4 matrix per element
+//
+VECTORMATH_FORCE_INLINE const Matrix4 absPerElem( const Matrix4 & mat );
+
+// Transpose of a 4x4 matrix
+//
+VECTORMATH_FORCE_INLINE const Matrix4 transpose( const Matrix4 & mat );
+
+// Compute the inverse of a 4x4 matrix
+// NOTE:
+// Result is unpredictable when the determinant of mat is equal to or near 0.
+//
+VECTORMATH_FORCE_INLINE const Matrix4 inverse( const Matrix4 & mat );
+
+// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix
+// NOTE:
+// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions. The result is unpredictable when the determinant of mat is equal to or near 0.
+//
+VECTORMATH_FORCE_INLINE const Matrix4 affineInverse( const Matrix4 & mat );
+
+// Compute the inverse of a 4x4 matrix, which is expected to be an affine matrix with an orthogonal upper-left 3x3 submatrix
+// NOTE:
+// This can be used to achieve better performance than a general inverse when the specified 4x4 matrix meets the given restrictions.
+//
+VECTORMATH_FORCE_INLINE const Matrix4 orthoInverse( const Matrix4 & mat );
+
+// Determinant of a 4x4 matrix
+//
+VECTORMATH_FORCE_INLINE const floatInVec determinant( const Matrix4 & mat );
+
+// Conditionally select between two 4x4 matrices
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+// However, the transfer of select1 to a VMX register may use more processing time than a branch.
+// Use the boolInVec version for better performance.
+//
+VECTORMATH_FORCE_INLINE const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, bool select1 );
+
+// Conditionally select between two 4x4 matrices (scalar data contained in vector data type)
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+//
+VECTORMATH_FORCE_INLINE const Matrix4 select( const Matrix4 & mat0, const Matrix4 & mat1, const boolInVec &select1 );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 4x4 matrix
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Matrix4 & mat );
+
+// Print a 4x4 matrix and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Matrix4 & mat, const char * name );
+
+#endif
+
+// A 3x4 transformation matrix in array-of-structures format
+//
+class Transform3
+{
+ Vector3 mCol0;
+ Vector3 mCol1;
+ Vector3 mCol2;
+ Vector3 mCol3;
+
+public:
+ // Default constructor; does no initialization
+ //
+ VECTORMATH_FORCE_INLINE Transform3( ) { };
+
+ // Copy a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE Transform3( const Transform3 & tfrm );
+
+ // Construct a 3x4 transformation matrix containing the specified columns
+ //
+ VECTORMATH_FORCE_INLINE Transform3( const Vector3 &col0, const Vector3 &col1, const Vector3 &col2, const Vector3 &col3 );
+
+ // Construct a 3x4 transformation matrix from a 3x3 matrix and a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Transform3( const Matrix3 & tfrm, const Vector3 &translateVec );
+
+ // Construct a 3x4 transformation matrix from a unit-length quaternion and a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE Transform3( const Quat &unitQuat, const Vector3 &translateVec );
+
+ // Set all elements of a 3x4 transformation matrix to the same scalar value
+ //
+ explicit VECTORMATH_FORCE_INLINE Transform3( float scalar );
+
+ // Set all elements of a 3x4 transformation matrix to the same scalar value (scalar data contained in vector data type)
+ //
+ explicit VECTORMATH_FORCE_INLINE Transform3( const floatInVec &scalar );
+
+ // Assign one 3x4 transformation matrix to another
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & operator =( const Transform3 & tfrm );
+
+ // Set the upper-left 3x3 submatrix
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setUpper3x3( const Matrix3 & mat3 );
+
+ // Get the upper-left 3x3 submatrix of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE const Matrix3 getUpper3x3( ) const;
+
+ // Set translation component
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setTranslation( const Vector3 &translateVec );
+
+ // Get the translation component of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getTranslation( ) const;
+
+ // Set column 0 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setCol0( const Vector3 &col0 );
+
+ // Set column 1 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setCol1( const Vector3 &col1 );
+
+ // Set column 2 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setCol2( const Vector3 &col2 );
+
+ // Set column 3 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setCol3( const Vector3 &col3 );
+
+ // Get column 0 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol0( ) const;
+
+ // Get column 1 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol1( ) const;
+
+ // Get column 2 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol2( ) const;
+
+ // Get column 3 of a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol3( ) const;
+
+ // Set the column of a 3x4 transformation matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setCol( int col, const Vector3 &vec );
+
+ // Set the row of a 3x4 transformation matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setRow( int row, const Vector4 &vec );
+
+ // Get the column of a 3x4 transformation matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 getCol( int col ) const;
+
+ // Get the row of a 3x4 transformation matrix referred to by the specified index
+ //
+ VECTORMATH_FORCE_INLINE const Vector4 getRow( int row ) const;
+
+ // Subscripting operator to set or get a column
+ //
+ VECTORMATH_FORCE_INLINE Vector3 & operator []( int col );
+
+ // Subscripting operator to get a column
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator []( int col ) const;
+
+ // Set the element of a 3x4 transformation matrix referred to by column and row indices
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setElem( int col, int row, float val );
+
+ // Set the element of a 3x4 transformation matrix referred to by column and row indices (scalar data contained in vector data type)
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & setElem( int col, int row, const floatInVec &val );
+
+ // Get the element of a 3x4 transformation matrix referred to by column and row indices
+ //
+ VECTORMATH_FORCE_INLINE const floatInVec getElem( int col, int row ) const;
+
+ // Multiply a 3x4 transformation matrix by a 3-D vector
+ //
+ VECTORMATH_FORCE_INLINE const Vector3 operator *( const Vector3 &vec ) const;
+
+ // Multiply a 3x4 transformation matrix by a 3-D point
+ //
+ VECTORMATH_FORCE_INLINE const Point3 operator *( const Point3 &pnt ) const;
+
+ // Multiply two 3x4 transformation matrices
+ //
+ VECTORMATH_FORCE_INLINE const Transform3 operator *( const Transform3 & tfrm ) const;
+
+ // Perform compound assignment and multiplication by a 3x4 transformation matrix
+ //
+ VECTORMATH_FORCE_INLINE Transform3 & operator *=( const Transform3 & tfrm );
+
+ // Construct an identity 3x4 transformation matrix
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 identity( );
+
+ // Construct a 3x4 transformation matrix to rotate around the x axis
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotationX( float radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the y axis
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotationY( float radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the z axis
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotationZ( float radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the x axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotationX( const floatInVec &radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the y axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotationY( const floatInVec &radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the z axis (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotationZ( const floatInVec &radians );
+
+ // Construct a 3x4 transformation matrix to rotate around the x, y, and z axes
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotationZYX( const Vector3 &radiansXYZ );
+
+ // Construct a 3x4 transformation matrix to rotate around a unit-length 3-D vector
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotation( float radians, const Vector3 &unitVec );
+
+ // Construct a 3x4 transformation matrix to rotate around a unit-length 3-D vector (scalar data contained in vector data type)
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotation( const floatInVec &radians, const Vector3 &unitVec );
+
+ // Construct a rotation matrix from a unit-length quaternion
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 rotation( const Quat &unitQuat );
+
+ // Construct a 3x4 transformation matrix to perform scaling
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 scale( const Vector3 &scaleVec );
+
+ // Construct a 3x4 transformation matrix to perform translation
+ //
+ static VECTORMATH_FORCE_INLINE const Transform3 translation( const Vector3 &translateVec );
+
+};
+// Append (post-multiply) a scale transformation to a 3x4 transformation matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+VECTORMATH_FORCE_INLINE const Transform3 appendScale( const Transform3 & tfrm, const Vector3 &scaleVec );
+
+// Prepend (pre-multiply) a scale transformation to a 3x4 transformation matrix
+// NOTE:
+// Faster than creating and multiplying a scale transformation matrix.
+//
+VECTORMATH_FORCE_INLINE const Transform3 prependScale( const Vector3 &scaleVec, const Transform3 & tfrm );
+
+// Multiply two 3x4 transformation matrices per element
+//
+VECTORMATH_FORCE_INLINE const Transform3 mulPerElem( const Transform3 & tfrm0, const Transform3 & tfrm1 );
+
+// Compute the absolute value of a 3x4 transformation matrix per element
+//
+VECTORMATH_FORCE_INLINE const Transform3 absPerElem( const Transform3 & tfrm );
+
+// Inverse of a 3x4 transformation matrix
+// NOTE:
+// Result is unpredictable when the determinant of the left 3x3 submatrix is equal to or near 0.
+//
+VECTORMATH_FORCE_INLINE const Transform3 inverse( const Transform3 & tfrm );
+
+// Compute the inverse of a 3x4 transformation matrix, expected to have an orthogonal upper-left 3x3 submatrix
+// NOTE:
+// This can be used to achieve better performance than a general inverse when the specified 3x4 transformation matrix meets the given restrictions.
+//
+VECTORMATH_FORCE_INLINE const Transform3 orthoInverse( const Transform3 & tfrm );
+
+// Conditionally select between two 3x4 transformation matrices
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+// However, the transfer of select1 to a VMX register may use more processing time than a branch.
+// Use the boolInVec version for better performance.
+//
+VECTORMATH_FORCE_INLINE const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, bool select1 );
+
+// Conditionally select between two 3x4 transformation matrices (scalar data contained in vector data type)
+// NOTE:
+// This function uses a conditional select instruction to avoid a branch.
+//
+VECTORMATH_FORCE_INLINE const Transform3 select( const Transform3 & tfrm0, const Transform3 & tfrm1, const boolInVec &select1 );
+
+#ifdef _VECTORMATH_DEBUG
+
+// Print a 3x4 transformation matrix
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Transform3 & tfrm );
+
+// Print a 3x4 transformation matrix and an associated string identifier
+// NOTE:
+// Function is only defined when _VECTORMATH_DEBUG is defined.
+//
+VECTORMATH_FORCE_INLINE void print( const Transform3 & tfrm, const char * name );
+
+#endif
+
+} // namespace Aos
+} // namespace Vectormath
+
+#include "vec_aos.h"
+#include "quat_aos.h"
+#include "mat_aos.h"
+
+#endif
diff --git a/tests/bullet/src/vectormath/vmInclude.h b/tests/bullet/src/vectormath/vmInclude.h
new file mode 100644
index 00000000..63a84998
--- /dev/null
+++ b/tests/bullet/src/vectormath/vmInclude.h
@@ -0,0 +1,27 @@
+
+#ifndef __VM_INCLUDE_H
+#define __VM_INCLUDE_H
+
+#include "LinearMath/btScalar.h"
+
+#if defined (USE_SYSTEM_VECTORMATH) || defined (__CELLOS_LV2__)
+ #include <vectormath_aos.h>
+#else //(USE_SYSTEM_VECTORMATH)
+ #if defined (BT_USE_SSE) && defined (_WIN32)
+ #include "sse/vectormath_aos.h"
+ #else //all other platforms
+ #include "scalar/vectormath_aos.h"
+ #endif //(BT_USE_SSE) && defined (_WIN32)
+#endif //(USE_SYSTEM_VECTORMATH)
+
+
+
+typedef Vectormath::Aos::Vector3 vmVector3;
+typedef Vectormath::Aos::Quat vmQuat;
+typedef Vectormath::Aos::Matrix3 vmMatrix3;
+typedef Vectormath::Aos::Transform3 vmTransform3;
+typedef Vectormath::Aos::Point3 vmPoint3;
+
+#endif //__VM_INCLUDE_H
+
+
diff --git a/tests/bullet/test1.oec b/tests/bullet/test1.oec
new file mode 100644
index 00000000..7fac1d15
--- /dev/null
+++ b/tests/bullet/test1.oec
@@ -0,0 +1,227 @@
+# OctaveEngine Casual (Jul 14 2008)
+version 2
+p 22000 1 ff 7fff66ff 13 79 0 0 13 79 0 0 0
+p 22000 1 ff 7fff66ff 12.25 77.5 0 0 12.25 77.5 0 0 0
+p 22000 1 ff 7fff66ff 12.25 78.25 0 0 12.25 78.25 0 0 0
+p 22000 1 ff 7fff66ff 13 77.5 0 0 13 77.5 0 0 0
+p 22000 1 ff 7fff66ff 13 78.25 0 0 13 78.25 0 0 0
+p 22000 1 ff 7fff66ff 13.75 77.5 0 0 13.75 77.5 0 0 0
+p 22000 1 ff 7fff66ff 13.75 78.25 0 0 13.75 78.25 0 0 0
+p 22000 2 ff 7fff66ff 14.75 73.625 0 0 14.75 73.625 0 0 0
+p 22000 2 ff 7fff66ff 15.5 73.625 0 0 15.5 73.625 0 0 0
+p 22000 2 ff 7fff66ff 16.25 73.625 0 0 16.25 73.625 0 0 0
+p 22000 2 ff 7fff66ff 17 73.625 0 0 17 73.625 0 0 0
+p 22000 2 ff 7fff66ff 17.75 73.625 0 0 17.75 73.625 0 0 0
+p 22000 2 ff 7fff66ff 18.5 73.625 0 0 18.5 73.625 0 0 0
+p 22000 3 ff 7fff66ff 26 79 0 0 26 79 0 0 0
+p 22000 3 ff 7fff66ff 26.2372 78.2885 0 0 26.2372 78.2885 0 0 0
+p 22000 3 ff 7fff66ff 26.9705 78.1313 0 0 26.9705 78.1313 0 0 0
+p 22000 3 ff 7fff66ff 27.2344 78.8334 0 0 27.2344 78.8334 0 0 0
+p 22000 3 ff 7fff66ff 27.0215 79.5525 0 0 27.0215 79.5525 0 0 0
+p 22000 3 ff 7fff66ff 26.5164 80.107 0 0 26.5164 80.107 0 0 0
+p 22000 4 ff 7fff66ff 42 73.875 0 0 42 73.875 0 0 0
+p 22000 4 ff 7fff66ff 42.5857 73.4065 0 0 42.5857 73.4065 0 0 0
+p 22000 4 ff 7fff66ff 41.8884 73.1303 0 0 41.8884 73.1303 0 0 0
+p 22000 4 ff 7fff66ff 41.3003 72.6648 0 0 41.3003 72.6648 0 0 0
+p 22000 4 ff 7fff66ff 40.6805 73.0872 0 0 40.6805 73.0872 0 0 0
+p 22000 5 ff 7fff66ff 57.125 74 0 0 57.125 74 0 0 0
+p 22000 5 ff 7fff66ff 57.7958 73.6646 0 0 57.7958 73.6646 0 0 0
+p 22000 5 ff 7fff66ff 58.1111 74.3451 0 0 58.1111 74.3451 0 0 0
+p 22000 5 ff 7fff66ff 57.5445 74.8364 0 0 57.5445 74.8364 0 0 0
+p 822000 12 ff 99cc7fff 41.875 70 0 0 41.875 70 0 0 0
+p 822000 12 ff 99cc7fff 41.125 70 0 0 41.125 70 0 0 0
+p 822000 12 ff 99cc7fff 40.3852 70.1233 0 0 40.3852 70.1233 0 0 0
+p 822000 12 ff 99cc7fff 39.6352 70.125 0 0 39.6352 70.125 0 0 0
+p 822000 12 ff 99cc7fff 38.8926 70.2299 0 0 38.8926 70.2299 0 0 0
+p 822000 12 ff 99cc7fff 38.1428 70.2495 0 0 38.1428 70.2495 0 0 0
+p 822000 12 ff 99cc7fff 37.3928 70.25 0 0 37.3928 70.25 0 0 0
+p 22000 15 ff 7fff66ff 62.25 57.625 0 0 62.25 57.625 0 0 0
+p 22000 15 ff 7fff66ff 62.9615 57.3878 0 0 62.9615 57.3878 0 0 0
+p 22000 15 ff 7fff66ff 62.8866 58.1341 0 0 62.8866 58.1341 0 0 0
+p 22000 15 ff 7fff66ff 62.2927 58.5921 0 0 62.2927 58.5921 0 0 0
+p 22000 14 ff 7fff66ff 46.875 59 0 0 46.875 59 0 0 0
+p 22000 14 ff 7fff66ff 47.3435 58.4143 0 0 47.3435 58.4143 0 0 0
+p 22000 14 ff 7fff66ff 48.0775 58.26 0 0 48.0775 58.26 0 0 0
+p 22000 14 ff 7fff66ff 48.4494 58.9113 0 0 48.4494 58.9113 0 0 0
+p 22000 14 ff 7fff66ff 48.2759 59.641 0 0 48.2759 59.641 0 0 0
+p 22000 17 ff 7fff66ff 32.625 58.625 0 0 32.625 58.625 0 0 0
+p 22000 17 ff 7fff66ff 33.2958 58.2896 0 0 33.2958 58.2896 0 0 0
+p 22000 17 ff 7fff66ff 34.045 58.2538 0 0 34.045 58.2538 0 0 0
+p 22000 17 ff 7fff66ff 34.3483 58.9397 0 0 34.3483 58.9397 0 0 0
+p 22000 16 ff 7fff66ff 23 50 0 0 23 50 0 0 0
+p 22000 16 ff 7fff66ff 23.6512 49.6279 0 0 23.6512 49.6279 0 0 0
+p 22000 16 ff 7fff66ff 24.3928 49.5162 0 0 24.3928 49.5162 0 0 0
+p 22000 16 ff 7fff66ff 24.1695 50.2321 0 0 24.1695 50.2321 0 0 0
+p 22000 18 ff 7fff66ff 18.375 59.25 0 0 18.375 59.25 0 0 0
+p 22000 18 ff 7fff66ff 18.9053 58.7197 0 0 18.9053 58.7197 0 0 0
+p 22000 18 ff 7fff66ff 19.4651 59.2189 0 0 19.4651 59.2189 0 0 0
+p 22000 18 ff 7fff66ff 19.3792 59.9639 0 0 19.3792 59.9639 0 0 0
+p 22000 7 ff 7fff66ff 44.125 51.75 0 0 44.125 51.75 0 0 0
+p 22000 7 ff 7fff66ff 44.0017 51.0102 0 0 44.0017 51.0102 0 0 0
+p 22000 7 ff 7fff66ff 44.743 51.1239 0 0 44.743 51.1239 0 0 0
+p 22000 7 ff 7fff66ff 45.0428 51.8114 0 0 45.0428 51.8114 0 0 0
+p 22000 8 ff 7fff66ff 59.125 49.375 0 0 59.125 49.375 0 0 0
+p 22000 8 ff 7fff66ff 59.125 48.625 0 0 59.125 48.625 0 0 0
+p 22000 8 ff 7fff66ff 59.7958 48.2896 0 0 59.7958 48.2896 0 0 0
+p 22000 8 ff 7fff66ff 59.9739 49.0181 0 0 59.9739 49.0181 0 0 0
+p 22000 9 ff 7fff66ff 42.5 41.625 0 0 42.5 41.625 0 0 0
+p 22000 9 ff 7fff66ff 43.0303 41.0947 0 0 43.0303 41.0947 0 0 0
+p 22000 9 ff 7fff66ff 43.7798 41.1216 0 0 43.7798 41.1216 0 0 0
+p 22000 9 ff 7fff66ff 44.3525 41.6059 0 0 44.3525 41.6059 0 0 0
+p 22000 9 ff 7fff66ff 43.9569 42.2431 0 0 43.9569 42.2431 0 0 0
+p 22000 a ff 7fff66ff 70.375 63.125 0 0 70.375 63.125 0 0 0
+p 22000 a ff 7fff66ff 70.375 62.375 0 0 70.375 62.375 0 0 0
+p 22000 a ff 7fff66ff 71.1148 62.4983 0 0 71.1148 62.4983 0 0 0
+p 22000 a ff 7fff66ff 71.2476 63.2365 0 0 71.2476 63.2365 0 0 0
+p 22000 b ff 7fff66ff 15.5 40.375 0 0 15.5 40.375 0 0 0
+p 22000 b ff 7fff66ff 16.124 39.959 0 0 16.124 39.959 0 0 0
+p 22000 b ff 7fff66ff 16.8729 39.9999 0 0 16.8729 39.9999 0 0 0
+p 22000 b ff 7fff66ff 17.2098 40.67 0 0 17.2098 40.67 0 0 0
+p 22000 c ff 7fff66ff 29.375 37.875 0 0 29.375 37.875 0 0 0
+p 22000 c ff 7fff66ff 29.791 37.251 0 0 29.791 37.251 0 0 0
+p 22000 c ff 7fff66ff 30.5326 37.139 0 0 30.5326 37.139 0 0 0
+p 22000 c ff 7fff66ff 30.6126 37.8847 0 0 30.6126 37.8847 0 0 0
+p 22000 d ff 7fff66ff 69.75 49 0 0 69.75 49 0 0 0
+p 22000 d ff 7fff66ff 69.8733 48.2602 0 0 69.8733 48.2602 0 0 0
+p 22000 d ff 7fff66ff 69.875 47.5102 0 0 69.875 47.5102 0 0 0
+p 22000 d ff 7fff66ff 69.875 46.7602 0 0 69.875 46.7602 0 0 0
+p 22000 d ff 7fff66ff 69.875 46.0102 0 0 69.875 46.0102 0 0 0
+p 22000 e ff 7fff66ff 61.625 38 0 0 61.625 38 0 0 0
+p 22000 e ff 7fff66ff 61.625 37.25 0 0 61.625 37.25 0 0 0
+p 22000 e ff 7fff66ff 61.625 36.5 0 0 61.625 36.5 0 0 0
+p 22000 e ff 7fff66ff 61.625 35.75 0 0 61.625 35.75 0 0 0
+p 22000 e ff 7fff66ff 61.625 35 0 0 61.625 35 0 0 0
+p 22000 11 ff 7fff66ff 7.25 54 0 0 7.25 54 0 0 0
+p 22000 11 ff 7fff66ff 7.25 53.25 0 0 7.25 53.25 0 0 0
+p 22000 11 ff 7fff66ff 7.25 52.5 0 0 7.25 52.5 0 0 0
+p 22000 11 ff 7fff66ff 7.25 51.75 0 0 7.25 51.75 0 0 0
+p 402000 0 ff b26666ff 55.75 70.75 0 0 55.75 70.75 0 0 0
+p 402000 0 ff b26666ff 55.75 70 0 0 55.75 70 0 0 0
+p 402000 0 ff b26666ff 56.5 70 0 0 56.5 70 0 0 0
+p 402000 0 ff b26666ff 56.5 70.75 0 0 56.5 70.75 0 0 0
+p 402000 0 ff b26666ff 57.25 70.75 0 0 57.25 70.75 0 0 0
+p 402000 0 ff b26666ff 57.25 70 0 0 57.25 70 0 0 0
+p 402000 0 ff b26666ff 58 70 0 0 58 70 0 0 0
+p 402000 0 ff b26666ff 58 70.75 0 0 58 70.75 0 0 0
+p 402000 0 ff b26666ff 58.75 70 0 0 58.75 70 0 0 0
+p 402000 0 ff b26666ff 58.75 70.75 0 0 58.75 70.75 0 0 0
+p 402000 0 ff b26666ff 59.5 70.75 0 0 59.5 70.75 0 0 0
+p 402000 0 ff b26666ff 59.5 70 0 0 59.5 70 0 0 0
+p 402000 0 ff b26666ff 60.25 70 0 0 60.25 70 0 0 0
+p 402000 0 ff b26666ff 60.25 70.75 0 0 60.25 70.75 0 0 0
+p 402000 0 ff b26666ff 61 70 0 0 61 70 0 0 0
+p 402000 0 ff b26666ff 61 70.75 0 0 61 70.75 0 0 0
+p 402000 0 ff b26666ff 43 35.5 0 0 43 35.5 0 0 0
+p 402000 0 ff b26666ff 43 34 0 0 43 34 0 0 0
+p 402000 0 ff b26666ff 43 34.75 0 0 43 34.75 0 0 0
+p 402000 0 ff b26666ff 43.75 35.5 0 0 43.75 35.5 0 0 0
+p 402000 0 ff b26666ff 43.75 34 0 0 43.75 34 0 0 0
+p 402000 0 ff b26666ff 43.75 34.75 0 0 43.75 34.75 0 0 0
+p 402000 0 ff b26666ff 44.5 34.75 0 0 44.5 34.75 0 0 0
+p 402000 0 ff b26666ff 44.5 34 0 0 44.5 34 0 0 0
+p 402000 0 ff b26666ff 45.25 34 0 0 45.25 34 0 0 0
+p 402000 0 ff b26666ff 45.25 34.75 0 0 45.25 34.75 0 0 0
+p 402000 0 ff b26666ff 46 34 0 0 46 34 0 0 0
+p 402000 0 ff b26666ff 46 34.75 0 0 46 34.75 0 0 0
+@ time 7.52012
+@ timeStep 1504
+@ scale 8
+@ timeStepsPerFrame 8
+@ framesPerSecond 25
+@ pauseFlag 1
+@ randSeed 0
+@ gravityFlag 1
+@ gravityAcceleration 0.001
+@ gravityAmplification 1
+@ gravityAngle 0
+@ boundsFlag 1
+@ boundsThickness 0.25
+@ boundsLeft 0
+@ boundsRight 94.75
+@ boundsBottom 0
+@ boundsTop 89.25
+@ boundsRadius 1
+@ standardDistance 0.75
+@ standardDensity 1.0025
+@ maxSpeed 0.5
+@ pressureCoefficient 0.05
+@ repulsionCoefficient 0.05
+@ dampingFlag 1
+@ dampingCoefficient 0.05
+@ staticPressureFlag 0
+@ staticPressureCoefficient 0.5
+@ staticPressureIteration 1
+@ staticMaxPressure 0.5
+@ springCoefficient 0.05
+@ springIteration 5
+@ elasticCoefficient 0.5
+@ elasticIteration 5
+@ mochiElasticityCoefficient 0.1
+@ mochiSpringCoefficient 0.1
+@ mochiIteration 3
+@ viscosityCoefficient 0.4
+@ viscosityIteration 5
+@ surfaceTensionCoefficient 0.1
+@ surfacePressureCoefficient 0.05
+@ surfaceTensionIteration 5
+@ powderSpringCoefficient 0.5
+@ powderDampingCoefficient 0.3
+@ powderFrictionCoefficient 0.05
+@ powderLightProbability 0.5
+@ powderExtinguishProbability 0.05
+@ powderExplosionCoefficient 1
+@ brittlenessCoefficient 0.5
+@ jetCoefficient 0.5
+@ fuelLightProbability 0.01
+@ fuelExtinguishProbability 0.0005
+@ upCoefficient 10
+@ downCoefficient 10
+@ yukiSpringCoefficient 0.02
+@ yukiMeltingProbability 0.0001
+@ resistanceFlag 0
+@ resistanceCoefficient 0.02
+@ fireFlag 1
+@ fireProbability 0.005
+@ fireLife 1000
+@ fireBuoyancyCoefficient 10
+@ splashFlag 0
+@ splashProbability 0.05
+@ splashExpansion 1e-005
+@ splashMinLife 50
+@ bubbleFlag 0
+@ bubbleProbability 0.05
+@ bubbleLife 10000
+@ bubbleBuoyancyCoefficient 20
+@ pouringFlag 0
+@ pouringRainFlag 0
+@ pouringLocation 10
+@ pouringThickness 2
+@ pouringVelocity 0.1
+@ pouringTimer 0
+@ pouringMaterial 113
+@ pouringLayer -1
+@ clearFlag 1
+@ clearColorRed 0.2
+@ clearColorBlue 0.2
+@ clearColorGreen 0.2
+@ clearColorAlpha 1
+@ mouseRadius 1
+@ mouseDelay 10
+@ mouseForce 1
+@ lineWidth 1
+@ usersCharge 0
+@ usersMaxCharge 15
+@ usersSpeedX 0.05
+@ usersSpeedY 0.15
+@ usersForceX 0.05
+@ usersForceY 0.5
+@ usersX 0
+@ usersY 0
+@ viewWidth 0
+@ viewHeight 0
+@ scrollFlag 0
+@ scrollX 0
+@ scrollY 0
+@ scrollAngle 0
+@ colorFlag 1
+@ renderMode 2